Skip to content

Commit 4f6e119

Browse files
committed
[CVP] Make srem test more robust (NFC)
D69686 will be able to determine that the icmp is always false. As this is not the purpose of the test, use a different modulus that doesn't trivialize the condition.
1 parent 709d03f commit 4f6e119

File tree

1 file changed

+2
-2
lines changed
  • llvm/test/Transforms/CorrelatedValuePropagation

1 file changed

+2
-2
lines changed

llvm/test/Transforms/CorrelatedValuePropagation/srem.ll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ define void @test4(i32 %n) {
4343
; CHECK-NEXT: [[A:%.*]] = phi i32 [ [[N]], [[ENTRY:%.*]] ], [ [[REM1:%.*]], [[LOOP]] ]
4444
; CHECK-NEXT: [[COND:%.*]] = icmp sgt i32 [[A]], 4
4545
; CHECK-NEXT: call void @llvm.assume(i1 [[COND]])
46-
; CHECK-NEXT: [[REM1]] = urem i32 [[A]], 6
46+
; CHECK-NEXT: [[REM1]] = urem i32 [[A]], 17
4747
; CHECK-NEXT: [[LOOPCOND:%.*]] = icmp sgt i32 [[REM1]], 8
4848
; CHECK-NEXT: br i1 [[LOOPCOND]], label [[LOOP]], label [[EXIT]]
4949
; CHECK: exit:
@@ -57,7 +57,7 @@ loop:
5757
%a = phi i32 [ %n, %entry ], [ %rem, %loop ]
5858
%cond = icmp sgt i32 %a, 4
5959
call void @llvm.assume(i1 %cond)
60-
%rem = srem i32 %a, 6
60+
%rem = srem i32 %a, 17
6161
%loopcond = icmp sgt i32 %rem, 8
6262
br i1 %loopcond, label %loop, label %exit
6363

0 commit comments

Comments
 (0)