From: Ralf Jung Date: Sat, 13 Aug 2022 16:15:00 +0000 (-0400) Subject: wording X-Git-Url: https://git.ralfj.de/web.git/commitdiff_plain/97bbbee3f4a2f9890df31b19c31a8d48a509dcba?hp=6ea5be5ce86fa20f99063cbc35a594956b763542 wording --- diff --git a/ralf/_posts/2020-12-14-provenance.md b/ralf/_posts/2020-12-14-provenance.md index b591c00..249c3e4 100644 --- a/ralf/_posts/2020-12-14-provenance.md +++ b/ralf/_posts/2020-12-14-provenance.md @@ -59,7 +59,7 @@ However, after the desired optimization, the program now causes a signed integer [^loop]: If you are a regular reader of my blog, you will recognize this as the same optimization that already played a crucial role in [a previous post of mine]({% post_url 2020-07-15-unused-data %}). Loop-invariant code motion is a great optimization to look at when considering corner cases of IR semantics. -[^signed-int-overflow]: If you are coming here from Rust, imagine `i + j` was written as `i.unchecked_add(j)`. +[^signed-int-overflow]: If you are coming here with a Rust mindset, imagine `i + j` was written as `i.unchecked_add(j)`. One might be tempted to ignore this problem because the UB on integer overflow is a compiler-only concept; every target supported by the compiler will do the obvious thing and just produce an overflowing result. However, there might be other compiler passes running after the optimization we are considering.