summaryrefslogtreecommitdiffstats
path: root/llvm/test
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@gmail.com>2017-04-09 06:12:41 +0000
committerCraig Topper <craig.topper@gmail.com>2017-04-09 06:12:41 +0000
commitafa07c5ef6a56ecab41680e3fc032bb76a360f67 (patch)
treeab96ddc961f3c5694f4a7f09d2e8574b511c99cd /llvm/test
parente63c21b1bab0e99b830f6e56db127f06133567fd (diff)
downloadbcm5719-llvm-afa07c5ef6a56ecab41680e3fc032bb76a360f67.tar.gz
bcm5719-llvm-afa07c5ef6a56ecab41680e3fc032bb76a360f67.zip
[InstCombine] Extend some OR combines to support vectors.
This adds support for these combines for vectors (X^C)|Y -> (X|Y)^C iff Y&C == 0 Y|(X^C) -> (X|Y)^C iff Y&C == 0 llvm-svn: 299822
Diffstat (limited to 'llvm/test')
-rw-r--r--llvm/test/Transforms/InstCombine/and.ll10
1 files changed, 2 insertions, 8 deletions
diff --git a/llvm/test/Transforms/InstCombine/and.ll b/llvm/test/Transforms/InstCombine/and.ll
index 868042be773..cc2e0bb7b70 100644
--- a/llvm/test/Transforms/InstCombine/and.ll
+++ b/llvm/test/Transforms/InstCombine/and.ll
@@ -431,10 +431,7 @@ define i32 @test33b(i32 %b) {
define <2 x i32> @test33vec(<2 x i32> %b) {
; CHECK-LABEL: @test33vec(
-; CHECK-NEXT: [[TMP_4_MASK:%.*]] = and <2 x i32> [[B:%.*]], <i32 1, i32 1>
-; CHECK-NEXT: [[TMP_10:%.*]] = xor <2 x i32> [[TMP_4_MASK]], <i32 1, i32 1>
-; CHECK-NEXT: [[TMP_12:%.*]] = and <2 x i32> [[B]], <i32 -2, i32 -2>
-; CHECK-NEXT: [[TMP_13:%.*]] = or <2 x i32> [[TMP_12]], [[TMP_10]]
+; CHECK-NEXT: [[TMP_13:%.*]] = xor <2 x i32> [[B:%.*]], <i32 1, i32 1>
; CHECK-NEXT: ret <2 x i32> [[TMP_13]]
;
%tmp.4.mask = and <2 x i32> %b, <i32 1, i32 1>
@@ -446,10 +443,7 @@ define <2 x i32> @test33vec(<2 x i32> %b) {
define <2 x i32> @test33vecb(<2 x i32> %b) {
; CHECK-LABEL: @test33vecb(
-; CHECK-NEXT: [[TMP_4_MASK:%.*]] = and <2 x i32> [[B:%.*]], <i32 1, i32 1>
-; CHECK-NEXT: [[TMP_10:%.*]] = xor <2 x i32> [[TMP_4_MASK]], <i32 1, i32 1>
-; CHECK-NEXT: [[TMP_12:%.*]] = and <2 x i32> [[B]], <i32 -2, i32 -2>
-; CHECK-NEXT: [[TMP_13:%.*]] = or <2 x i32> [[TMP_10]], [[TMP_12]]
+; CHECK-NEXT: [[TMP_13:%.*]] = xor <2 x i32> [[B:%.*]], <i32 1, i32 1>
; CHECK-NEXT: ret <2 x i32> [[TMP_13]]
;
%tmp.4.mask = and <2 x i32> %b, <i32 1, i32 1>
OpenPOWER on IntegriCloud