diff options
author | Roman Lebedev <lebedev.ri@gmail.com> | 2019-07-23 12:42:57 +0000 |
---|---|---|
committer | Roman Lebedev <lebedev.ri@gmail.com> | 2019-07-23 12:42:57 +0000 |
commit | 402bf28ecc87493e2164ba2e6e3ac00734eb300a (patch) | |
tree | 63311a977218f3aeb84420d0094c60772080469f | |
parent | 4153f17181369a988450ccabde0de6a407324738 (diff) | |
download | bcm5719-llvm-402bf28ecc87493e2164ba2e6e3ac00734eb300a.tar.gz bcm5719-llvm-402bf28ecc87493e2164ba2e6e3ac00734eb300a.zip |
[NFC][InstCombine] Fixup commutative/negative tests with icmp preds in @llvm.umul.with.overflow tests
llvm-svn: 366802
-rw-r--r-- | llvm/test/Transforms/InstCombine/unsigned-mul-lack-of-overflow-check-via-udiv-of-allones.ll | 14 | ||||
-rw-r--r-- | llvm/test/Transforms/InstCombine/unsigned-mul-overflow-check-via-udiv-of-allones.ll | 8 |
2 files changed, 10 insertions, 12 deletions
diff --git a/llvm/test/Transforms/InstCombine/unsigned-mul-lack-of-overflow-check-via-udiv-of-allones.ll b/llvm/test/Transforms/InstCombine/unsigned-mul-lack-of-overflow-check-via-udiv-of-allones.ll index 2865dfafd51..314ab09024f 100644 --- a/llvm/test/Transforms/InstCombine/unsigned-mul-lack-of-overflow-check-via-udiv-of-allones.ll +++ b/llvm/test/Transforms/InstCombine/unsigned-mul-lack-of-overflow-check-via-udiv-of-allones.ll @@ -45,12 +45,12 @@ define i1 @t3_commutative(i8 %x) { ; CHECK-LABEL: @t3_commutative( ; CHECK-NEXT: [[T0:%.*]] = udiv i8 -1, [[X:%.*]] ; CHECK-NEXT: [[Y:%.*]] = call i8 @gen8() -; CHECK-NEXT: [[R:%.*]] = icmp ult i8 [[Y]], [[T0]] +; CHECK-NEXT: [[R:%.*]] = icmp ule i8 [[Y]], [[T0]] ; CHECK-NEXT: ret i1 [[R]] ; %t0 = udiv i8 -1, %x %y = call i8 @gen8() - %r = icmp ult i8 %y, %t0 ; swapped + %r = icmp ule i8 %y, %t0 ; swapped ret i1 %r } @@ -89,19 +89,17 @@ define i1 @n6_wrong_pred0(i8 %x, i8 %y) { ; CHECK-NEXT: ret i1 [[R]] ; %t0 = udiv i8 -1, %x - %r = icmp ule i8 %t0, %y + %r = icmp ule i8 %t0, %y ; not uge ret i1 %r } -define i1 @n6_wrong_pred1(i8 %x) { +define i1 @n6_wrong_pred1(i8 %x, i8 %y) { ; CHECK-LABEL: @n6_wrong_pred1( ; CHECK-NEXT: [[T0:%.*]] = udiv i8 -1, [[X:%.*]] -; CHECK-NEXT: [[Y:%.*]] = call i8 @gen8() -; CHECK-NEXT: [[R:%.*]] = icmp ugt i8 [[Y]], [[T0]] +; CHECK-NEXT: [[R:%.*]] = icmp ugt i8 [[T0]], [[Y:%.*]] ; CHECK-NEXT: ret i1 [[R]] ; %t0 = udiv i8 -1, %x - %y = call i8 @gen8() - %r = icmp ugt i8 %y, %t0 ; swapped + %r = icmp ugt i8 %t0, %y ; not uge ret i1 %r } diff --git a/llvm/test/Transforms/InstCombine/unsigned-mul-overflow-check-via-udiv-of-allones.ll b/llvm/test/Transforms/InstCombine/unsigned-mul-overflow-check-via-udiv-of-allones.ll index d66f5f7c40a..4a555cbefee 100644 --- a/llvm/test/Transforms/InstCombine/unsigned-mul-overflow-check-via-udiv-of-allones.ll +++ b/llvm/test/Transforms/InstCombine/unsigned-mul-overflow-check-via-udiv-of-allones.ll @@ -45,12 +45,12 @@ define i1 @t3_commutative(i8 %x) { ; CHECK-LABEL: @t3_commutative( ; CHECK-NEXT: [[T0:%.*]] = udiv i8 -1, [[X:%.*]] ; CHECK-NEXT: [[Y:%.*]] = call i8 @gen8() -; CHECK-NEXT: [[R:%.*]] = icmp uge i8 [[Y]], [[T0]] +; CHECK-NEXT: [[R:%.*]] = icmp ugt i8 [[Y]], [[T0]] ; CHECK-NEXT: ret i1 [[R]] ; %t0 = udiv i8 -1, %x %y = call i8 @gen8() - %r = icmp uge i8 %y, %t0 ; swapped + %r = icmp ugt i8 %y, %t0 ; swapped ret i1 %r } @@ -89,7 +89,7 @@ define i1 @n6_wrong_pred0(i8 %x, i8 %y) { ; CHECK-NEXT: ret i1 [[R]] ; %t0 = udiv i8 -1, %x - %r = icmp ule i8 %t0, %y + %r = icmp ule i8 %t0, %y ; not ult ret i1 %r } @@ -100,6 +100,6 @@ define i1 @n6_wrong_pred1(i8 %x, i8 %y) { ; CHECK-NEXT: ret i1 [[R]] ; %t0 = udiv i8 -1, %x - %r = icmp ugt i8 %t0, %y + %r = icmp ugt i8 %t0, %y ; not ult ret i1 %r } |