================
@@ -8,7 +8,8 @@
 // CHECK:      entry:
 // CHECK-NEXT:   %retval = alloca i32
 // CHECK-NEXT:   store i32 0, ptr %retval
-// CHECK-NEXT:   [[ZEXT:%.*]] = zext i1 true to i32
+// CHECK-NEXT:   [[CMP:%.*]] = icmp ne ptr @b, @a
+// CHECK-NEXT:   [[ZEXT:%.*]] = zext i1 [[CMP]] to i32
----------------
nikic wrote:

I remember looking into this test a while ago (the `zext i1 true` is pretty 
weird, usually IRBuilder would fold that away) and the context is that one of 
the values here gets RAUWed and that would enable the folding. For constant 
expressions, replacing an operand will also re-fold the expression. For 
instructions, this doesn't happen. In any case, it will get folded later if 
optimizations are enabled.

https://github.com/llvm/llvm-project/pull/92885
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to