summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms/InstCombine/icmp-logical.ll
diff options
context:
space:
mode:
authorRoman Lebedev <lebedev.ri@gmail.com>2018-07-12 14:56:17 +0000
committerRoman Lebedev <lebedev.ri@gmail.com>2018-07-12 14:56:17 +0000
commit733a8d6886ee0380007c77c0b7d2dbbba64a0272 (patch)
tree42d0e96e4e547cf7d2b7dc4a3a6901d36f28d629 /llvm/test/Transforms/InstCombine/icmp-logical.ll
parent74f899f0f42416fe44233820ea464776a3784a28 (diff)
downloadbcm5719-llvm-733a8d6886ee0380007c77c0b7d2dbbba64a0272.tar.gz
bcm5719-llvm-733a8d6886ee0380007c77c0b7d2dbbba64a0272.zip
[InstCombine] icmp-logical.ll: restore the original intention of the test.
While that fold is clearly not happening [anymore], we do now have separate test cases for these cases, so we should be ok to slightly adjust these tests to not potentially loose test coverage. As suggested by Hiroshi Yamauchi in https://reviews.llvm.org/D49179#1159345 llvm-svn: 336912
Diffstat (limited to 'llvm/test/Transforms/InstCombine/icmp-logical.ll')
-rw-r--r--llvm/test/Transforms/InstCombine/icmp-logical.ll20
1 files changed, 8 insertions, 12 deletions
diff --git a/llvm/test/Transforms/InstCombine/icmp-logical.ll b/llvm/test/Transforms/InstCombine/icmp-logical.ll
index 4d6f09db410..f6f552a32c2 100644
--- a/llvm/test/Transforms/InstCombine/icmp-logical.ll
+++ b/llvm/test/Transforms/InstCombine/icmp-logical.ll
@@ -59,15 +59,13 @@ define i1 @masked_or_allones(i32 %A) {
define i1 @masked_and_notA(i32 %A) {
; CHECK-LABEL: @masked_and_notA(
-; CHECK-NEXT: [[TMP1:%.*]] = icmp ugt i32 [[A:%.*]], 7
-; CHECK-NEXT: [[MASK2:%.*]] = and i32 [[A]], 39
+; CHECK-NEXT: [[MASK2:%.*]] = and i32 [[A:%.*]], 78
; CHECK-NEXT: [[TST2:%.*]] = icmp ne i32 [[MASK2]], [[A]]
-; CHECK-NEXT: [[RES:%.*]] = and i1 [[TMP1]], [[TST2]]
-; CHECK-NEXT: ret i1 [[RES]]
+; CHECK-NEXT: ret i1 [[TST2]]
;
- %mask1 = and i32 %A, 7
+ %mask1 = and i32 %A, 14
%tst1 = icmp ne i32 %mask1, %A
- %mask2 = and i32 %A, 39
+ %mask2 = and i32 %A, 78
%tst2 = icmp ne i32 %mask2, %A
%res = and i1 %tst1, %tst2
ret i1 %res
@@ -90,15 +88,13 @@ define i1 @masked_and_notA_slightly_optimized(i32 %A) {
define i1 @masked_or_A(i32 %A) {
; CHECK-LABEL: @masked_or_A(
-; CHECK-NEXT: [[TMP1:%.*]] = icmp ult i32 [[A:%.*]], 8
-; CHECK-NEXT: [[MASK2:%.*]] = and i32 [[A]], 39
+; CHECK-NEXT: [[MASK2:%.*]] = and i32 [[A:%.*]], 78
; CHECK-NEXT: [[TST2:%.*]] = icmp eq i32 [[MASK2]], [[A]]
-; CHECK-NEXT: [[RES:%.*]] = or i1 [[TMP1]], [[TST2]]
-; CHECK-NEXT: ret i1 [[RES]]
+; CHECK-NEXT: ret i1 [[TST2]]
;
- %mask1 = and i32 %A, 7
+ %mask1 = and i32 %A, 14
%tst1 = icmp eq i32 %mask1, %A
- %mask2 = and i32 %A, 39
+ %mask2 = and i32 %A, 78
%tst2 = icmp eq i32 %mask2, %A
%res = or i1 %tst1, %tst2
ret i1 %res
OpenPOWER on IntegriCloud