[llvm] 4f6e119 - [CVP] Make srem test more robust (NFC)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Sun Sep 27 09:57:43 PDT 2020
Author: Nikita Popov
Date: 2020-09-27T18:57:07+02:00
New Revision: 4f6e11948c37b58e307df5aeeca4c27c546e371e
URL: https://github.com/llvm/llvm-project/commit/4f6e11948c37b58e307df5aeeca4c27c546e371e
DIFF: https://github.com/llvm/llvm-project/commit/4f6e11948c37b58e307df5aeeca4c27c546e371e.diff
LOG: [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.
Added:
Modified:
llvm/test/Transforms/CorrelatedValuePropagation/srem.ll
Removed:
################################################################################
diff --git a/llvm/test/Transforms/CorrelatedValuePropagation/srem.ll b/llvm/test/Transforms/CorrelatedValuePropagation/srem.ll
index 8d55de9eb1eb..b84c0ace278c 100644
--- a/llvm/test/Transforms/CorrelatedValuePropagation/srem.ll
+++ b/llvm/test/Transforms/CorrelatedValuePropagation/srem.ll
@@ -43,7 +43,7 @@ define void @test4(i32 %n) {
; CHECK-NEXT: [[A:%.*]] = phi i32 [ [[N]], [[ENTRY:%.*]] ], [ [[REM1:%.*]], [[LOOP]] ]
; CHECK-NEXT: [[COND:%.*]] = icmp sgt i32 [[A]], 4
; CHECK-NEXT: call void @llvm.assume(i1 [[COND]])
-; CHECK-NEXT: [[REM1]] = urem i32 [[A]], 6
+; CHECK-NEXT: [[REM1]] = urem i32 [[A]], 17
; CHECK-NEXT: [[LOOPCOND:%.*]] = icmp sgt i32 [[REM1]], 8
; CHECK-NEXT: br i1 [[LOOPCOND]], label [[LOOP]], label [[EXIT]]
; CHECK: exit:
@@ -57,7 +57,7 @@ loop:
%a = phi i32 [ %n, %entry ], [ %rem, %loop ]
%cond = icmp sgt i32 %a, 4
call void @llvm.assume(i1 %cond)
- %rem = srem i32 %a, 6
+ %rem = srem i32 %a, 17
%loopcond = icmp sgt i32 %rem, 8
br i1 %loopcond, label %loop, label %exit
More information about the llvm-commits
mailing list