[llvm] 8784e90 - [Test] Range fix in test
Max Kazantsev via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 4 05:29:24 PDT 2020
Author: Max Kazantsev
Date: 2020-09-04T19:28:58+07:00
New Revision: 8784e9016d3d586dca90d6dd24fe663ce2e096ae
URL: https://github.com/llvm/llvm-project/commit/8784e9016d3d586dca90d6dd24fe663ce2e096ae
DIFF: https://github.com/llvm/llvm-project/commit/8784e9016d3d586dca90d6dd24fe663ce2e096ae.diff
LOG: [Test] Range fix in test
test02_neg is not testing what it claims to test because its starting
value -1 lies outside of specified range.
Added:
Modified:
llvm/test/Transforms/IndVarSimplify/monotonic_checks.ll
Removed:
################################################################################
diff --git a/llvm/test/Transforms/IndVarSimplify/monotonic_checks.ll b/llvm/test/Transforms/IndVarSimplify/monotonic_checks.ll
index 6a9713410200..988b3923263f 100644
--- a/llvm/test/Transforms/IndVarSimplify/monotonic_checks.ll
+++ b/llvm/test/Transforms/IndVarSimplify/monotonic_checks.ll
@@ -92,7 +92,7 @@ define i32 @test_02(i32* %p) {
; CHECK-NEXT: br label [[LOOP:%.*]]
; CHECK: loop:
; CHECK-NEXT: [[IV:%.*]] = phi i32 [ [[LEN]], [[ENTRY:%.*]] ], [ [[IV_NEXT:%.*]], [[BACKEDGE:%.*]] ]
-; CHECK-NEXT: [[IV_NEXT]] = add nsw i32 [[IV]], 1
+; CHECK-NEXT: [[IV_NEXT]] = add i32 [[IV]], 1
; CHECK-NEXT: [[RC:%.*]] = icmp sgt i32 [[IV_NEXT]], [[LEN]]
; CHECK-NEXT: br i1 [[RC]], label [[BACKEDGE]], label [[FAIL:%.*]]
; CHECK: backedge:
@@ -132,7 +132,7 @@ define i32 @test_02_neg(i32* %p) {
; CHECK-NEXT: br label [[LOOP:%.*]]
; CHECK: loop:
; CHECK-NEXT: [[IV:%.*]] = phi i32 [ [[LEN]], [[ENTRY:%.*]] ], [ [[IV_NEXT:%.*]], [[BACKEDGE:%.*]] ]
-; CHECK-NEXT: [[IV_NEXT]] = add nuw nsw i32 [[IV]], 1
+; CHECK-NEXT: [[IV_NEXT]] = add i32 [[IV]], 1
; CHECK-NEXT: [[RC:%.*]] = icmp sgt i32 [[IV_NEXT]], [[LEN]]
; CHECK-NEXT: br i1 [[RC]], label [[BACKEDGE]], label [[FAIL:%.*]]
; CHECK: backedge:
@@ -166,4 +166,4 @@ exit:
!0 = !{i32 0, i32 2147483647}
-!1 = !{i32 -2147483648, i32 -1}
+!1 = !{i32 -2147483648, i32 0}
More information about the llvm-commits
mailing list