[llvm] [ValueTracking] [ValueTracking] Add more conditions in `isTruePredicate` (PR #86083)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 21 04:46:33 PDT 2024
================
@@ -216,7 +222,13 @@ define i1 @test13(i32 %length.i, i32 %x) {
define i1 @test14(i32 %length.i, i32 %x.full) {
; CHECK-LABEL: @test14(
-; CHECK-NEXT: ret i1 true
+; CHECK-NEXT: [[X:%.*]] = and i32 [[X_FULL:%.*]], -61681
+; CHECK-NEXT: [[LARGE:%.*]] = or i32 [[X]], 8224
+; CHECK-NEXT: [[SMALL:%.*]] = or i32 [[X]], 4112
+; CHECK-NEXT: [[KNOWN:%.*]] = icmp ult i32 [[LARGE]], [[LENGTH_I:%.*]]
+; CHECK-NEXT: [[TO_PROVE:%.*]] = icmp ult i32 [[SMALL]], [[LENGTH_I]]
+; CHECK-NEXT: [[RES:%.*]] = icmp ule i1 [[KNOWN]], [[TO_PROVE]]
+; CHECK-NEXT: ret i1 [[RES]]
----------------
nikic wrote:
That's fine, but I'd adjust the test to add the disjoint flag.
https://github.com/llvm/llvm-project/pull/86083
More information about the llvm-commits
mailing list