From: Max Kazantsev Date: Fri, 4 Sep 2020 12:06:14 +0000 (+0700) Subject: [Test] Range fix in test X-Git-Tag: llvmorg-13-init~12921 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8784e9016d3d586dca90d6dd24fe663ce2e096ae;p=platform%2Fupstream%2Fllvm.git [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. --- diff --git a/llvm/test/Transforms/IndVarSimplify/monotonic_checks.ll b/llvm/test/Transforms/IndVarSimplify/monotonic_checks.ll index 6a97134..988b392 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}