[llvm] ValueTracking: strip stray break in recur-match (PR #109794)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 1 06:21:03 PDT 2024


================
@@ -102,12 +102,11 @@ define void @D60846_miscompile(ptr %p) {
 ; CHECK-NEXT:    [[IS_ZERO:%.*]] = icmp eq i16 [[I]], 0
 ; CHECK-NEXT:    br i1 [[IS_ZERO]], label [[COMMON]], label [[NON_ZERO:%.*]]
 ; CHECK:       non_zero:
-; CHECK-NEXT:    [[IS_ONE:%.*]] = icmp eq i16 [[I]], 1
-; CHECK-NEXT:    store i1 [[IS_ONE]], ptr [[P:%.*]], align 1
+; CHECK-NEXT:    store i1 true, ptr [[P:%.*]], align 1
----------------
nikic wrote:

It would be good to update the comment above the test, as folding does happen now, but in the correct direction. Based on https://reviews.llvm.org/D60846#1497243 it used to be optimized to false instead of true.

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


More information about the llvm-commits mailing list