[llvm] [CVP] Propagate constant range on icmp at use level (PR #73767)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 13 04:09:27 PST 2023
================
@@ -482,15 +482,11 @@ entry:
define i9 @test18_i9_i9(i9 %x, i9 %y) {
; CHECK-LABEL: @test18_i9_i9(
; CHECK-NEXT: entry:
-; CHECK-NEXT: [[C0:%.*]] = icmp sle i9 [[X:%.*]], 255
-; CHECK-NEXT: call void @llvm.assume(i1 [[C0]])
-; CHECK-NEXT: [[C1:%.*]] = icmp sge i9 [[X]], -256
-; CHECK-NEXT: call void @llvm.assume(i1 [[C1]])
-; CHECK-NEXT: [[C2:%.*]] = icmp sle i9 [[Y:%.*]], 255
-; CHECK-NEXT: call void @llvm.assume(i1 [[C2]])
-; CHECK-NEXT: [[C3:%.*]] = icmp sge i9 [[Y]], -256
-; CHECK-NEXT: call void @llvm.assume(i1 [[C3]])
-; CHECK-NEXT: [[DIV:%.*]] = sdiv i9 [[X]], [[Y]]
+; CHECK-NEXT: call void @llvm.assume(i1 true)
----------------
XChy wrote:
I think it's correct, with proof: https://alive2.llvm.org/ce/z/E2E-bA
https://github.com/llvm/llvm-project/pull/73767
More information about the llvm-commits
mailing list