[clang] [llvm] [IR] Avoid creating icmp/fcmp constant expressions (PR #92885)
Philip Reames via llvm-commits
llvm-commits at lists.llvm.org
Tue May 21 12:51:26 PDT 2024
================
@@ -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
----------------
preames wrote:
This looks to be a missing constant fold somewhere. The compare should be folded to true, not a constantexpr.
https://github.com/llvm/llvm-project/pull/92885
More information about the llvm-commits
mailing list