From: Roman Lebedev Date: Fri, 20 Sep 2019 17:43:46 +0000 (+0000) Subject: [NFC][InstCombine] Fixup newly-added tests X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=081eebc58fcc9baa7517b20eb1243e0bf056a683;p=platform%2Fupstream%2Fllvm.git [NFC][InstCombine] Fixup newly-added tests llvm-svn: 372413 --- diff --git a/llvm/test/Transforms/InstCombine/result-of-add-of-negative-is-non-zero-and-no-underflow.ll b/llvm/test/Transforms/InstCombine/result-of-add-of-negative-is-non-zero-and-no-underflow.ll index 1253988..00a37a58 100644 --- a/llvm/test/Transforms/InstCombine/result-of-add-of-negative-is-non-zero-and-no-underflow.ll +++ b/llvm/test/Transforms/InstCombine/result-of-add-of-negative-is-non-zero-and-no-underflow.ll @@ -171,7 +171,7 @@ define i1 @t7_commutativity1(i8 %base, i8 %offset) { ; CHECK-NEXT: [[ADJUSTED:%.*]] = add i8 [[BASE]], [[OFFSET:%.*]] ; CHECK-NEXT: call void @use8(i8 [[ADJUSTED]]) ; CHECK-NEXT: [[NOT_NULL:%.*]] = icmp ne i8 [[ADJUSTED]], 0 -; CHECK-NEXT: [[NO_UNDERFLOW:%.*]] = icmp ule i8 [[ADJUSTED]], [[BASE]] +; CHECK-NEXT: [[NO_UNDERFLOW:%.*]] = icmp ult i8 [[ADJUSTED]], [[BASE]] ; CHECK-NEXT: [[R:%.*]] = and i1 [[NOT_NULL]], [[NO_UNDERFLOW]] ; CHECK-NEXT: ret i1 [[R]] ; @@ -181,7 +181,7 @@ define i1 @t7_commutativity1(i8 %base, i8 %offset) { %adjusted = add i8 %base, %offset call void @use8(i8 %adjusted) %not_null = icmp ne i8 %adjusted, 0 - %no_underflow = icmp uge i8 %base, %adjusted ; swapped + %no_underflow = icmp ugt i8 %base, %adjusted ; swapped %r = and i1 %not_null, %no_underflow ret i1 %r } @@ -192,7 +192,7 @@ define i1 @t7_commutativity3(i8 %base, i8 %offset) { ; CHECK-NEXT: [[ADJUSTED:%.*]] = add i8 [[BASE]], [[OFFSET:%.*]] ; CHECK-NEXT: call void @use8(i8 [[ADJUSTED]]) ; CHECK-NEXT: [[NOT_NULL:%.*]] = icmp ne i8 [[ADJUSTED]], 0 -; CHECK-NEXT: [[NO_UNDERFLOW:%.*]] = icmp ule i8 [[ADJUSTED]], [[BASE]] +; CHECK-NEXT: [[NO_UNDERFLOW:%.*]] = icmp ult i8 [[ADJUSTED]], [[BASE]] ; CHECK-NEXT: [[R:%.*]] = and i1 [[NO_UNDERFLOW]], [[NOT_NULL]] ; CHECK-NEXT: ret i1 [[R]] ; @@ -202,7 +202,7 @@ define i1 @t7_commutativity3(i8 %base, i8 %offset) { %adjusted = add i8 %base, %offset call void @use8(i8 %adjusted) %not_null = icmp ne i8 %adjusted, 0 - %no_underflow = icmp uge i8 %base, %adjusted ; swapped + %no_underflow = icmp ugt i8 %base, %adjusted ; swapped %r = and i1 %no_underflow, %not_null ; swapped ret i1 %r } diff --git a/llvm/test/Transforms/InstCombine/result-of-add-of-negative-or-zero-is-non-zero-and-no-underflow.ll b/llvm/test/Transforms/InstCombine/result-of-add-of-negative-or-zero-is-non-zero-and-no-underflow.ll index abf8f9b..de4fd42 100644 --- a/llvm/test/Transforms/InstCombine/result-of-add-of-negative-or-zero-is-non-zero-and-no-underflow.ll +++ b/llvm/test/Transforms/InstCombine/result-of-add-of-negative-or-zero-is-non-zero-and-no-underflow.ll @@ -102,14 +102,14 @@ define i1 @t5_commutativity1(i8 %base, i8 %offset) { ; CHECK-NEXT: [[ADJUSTED:%.*]] = add i8 [[BASE:%.*]], [[OFFSET:%.*]] ; CHECK-NEXT: call void @use8(i8 [[ADJUSTED]]) ; CHECK-NEXT: [[NOT_NULL:%.*]] = icmp ne i8 [[ADJUSTED]], 0 -; CHECK-NEXT: [[NO_UNDERFLOW:%.*]] = icmp ult i8 [[ADJUSTED]], [[BASE]] +; CHECK-NEXT: [[NO_UNDERFLOW:%.*]] = icmp ule i8 [[ADJUSTED]], [[BASE]] ; CHECK-NEXT: [[R:%.*]] = and i1 [[NOT_NULL]], [[NO_UNDERFLOW]] ; CHECK-NEXT: ret i1 [[R]] ; %adjusted = add i8 %base, %offset call void @use8(i8 %adjusted) %not_null = icmp ne i8 %adjusted, 0 - %no_underflow = icmp ugt i8 %base, %adjusted ; swapped + %no_underflow = icmp uge i8 %base, %adjusted ; swapped %r = and i1 %not_null, %no_underflow ret i1 %r } @@ -118,14 +118,14 @@ define i1 @t6_commutativity3(i8 %base, i8 %offset) { ; CHECK-NEXT: [[ADJUSTED:%.*]] = add i8 [[BASE:%.*]], [[OFFSET:%.*]] ; CHECK-NEXT: call void @use8(i8 [[ADJUSTED]]) ; CHECK-NEXT: [[NOT_NULL:%.*]] = icmp ne i8 [[ADJUSTED]], 0 -; CHECK-NEXT: [[NO_UNDERFLOW:%.*]] = icmp ult i8 [[ADJUSTED]], [[BASE]] +; CHECK-NEXT: [[NO_UNDERFLOW:%.*]] = icmp ule i8 [[ADJUSTED]], [[BASE]] ; CHECK-NEXT: [[R:%.*]] = and i1 [[NO_UNDERFLOW]], [[NOT_NULL]] ; CHECK-NEXT: ret i1 [[R]] ; %adjusted = add i8 %base, %offset call void @use8(i8 %adjusted) %not_null = icmp ne i8 %adjusted, 0 - %no_underflow = icmp ugt i8 %base, %adjusted ; swapped + %no_underflow = icmp uge i8 %base, %adjusted ; swapped %r = and i1 %no_underflow, %not_null ; swapped ret i1 %r }