[llvm] [WebAssembly] Don't fold non-nuw add/sub in FastISel (PR #111278)

Heejin Ahn via llvm-commits llvm-commits at lists.llvm.org
Sat Oct 5 22:29:56 PDT 2024


================
@@ -14,7 +14,7 @@ target triple = "wasm32-unknown-unknown"
 define i32 @foo() {
   %stack_addr = alloca i32
   %stack_i = ptrtoint ptr %stack_addr to i32
-  %added = add i32 %stack_i, undef
+  %added = add nuw i32 %stack_i, undef
----------------
aheejin wrote:

This test is supposed to be folded. So I added `nuw`

https://github.com/llvm/llvm-project/pull/111278


More information about the llvm-commits mailing list