aboutsummaryrefslogtreecommitdiffstats
path: root/test/Transforms
diff options
context:
space:
mode:
authorJim Grosbach <grosbach@apple.com>2013-05-01 00:25:27 +0000
committerJim Grosbach <grosbach@apple.com>2013-05-01 00:25:27 +0000
commit10cc563bfe330cf4118b2f0db6706c244e77ebb3 (patch)
tree10bb99077f66c2aa389886f2f43633db0eeff196 /test/Transforms
parentc147c1b994e1187cb471cdb7ee05f5f875eff4e0 (diff)
downloadexternal_llvm-10cc563bfe330cf4118b2f0db6706c244e77ebb3.zip
external_llvm-10cc563bfe330cf4118b2f0db6706c244e77ebb3.tar.gz
external_llvm-10cc563bfe330cf4118b2f0db6706c244e77ebb3.tar.bz2
Revert "InstCombine: Fold more shuffles of shuffles."
This reverts commit r180802 There's ongoing discussion about whether this is the right place to make this transformation. Reverting for now while we figure it out. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180834 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms')
-rw-r--r--test/Transforms/BBVectorize/simple.ll9
-rw-r--r--test/Transforms/InstCombine/vec_shuffle.ll12
2 files changed, 11 insertions, 10 deletions
diff --git a/test/Transforms/BBVectorize/simple.ll b/test/Transforms/BBVectorize/simple.ll
index a22ad15..a447908 100644
--- a/test/Transforms/BBVectorize/simple.ll
+++ b/test/Transforms/BBVectorize/simple.ll
@@ -139,10 +139,11 @@ define <8 x i8> @test6(<8 x i8> %A1, <8 x i8> %A2, <8 x i8> %B1, <8 x i8> %B2) {
; CHECK: %Z1 = add <16 x i8> %Y1, %X1.v.i1
%Q1 = shufflevector <8 x i8> %Z1, <8 x i8> %Z2, <8 x i32> <i32 15, i32 8, i32 6, i32 1, i32 13, i32 10, i32 4, i32 3>
%Q2 = shufflevector <8 x i8> %Z2, <8 x i8> %Z2, <8 x i32> <i32 6, i32 7, i32 0, i32 1, i32 2, i32 4, i32 4, i32 1>
- %R = mul <8 x i8> %Q1, %Q2
-; CHECK: %Q1.v.i1 = shufflevector <16 x i8> %Z1, <16 x i8> undef, <16 x i32> <i32 8, i32 undef, i32 10, i32 undef, i32 undef, i32 13, i32 undef, i32 15, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>
-; CHECK: %Q1.v.r1 = shufflevector <16 x i8> %Z1, <16 x i8> %Q1.v.i1, <8 x i32> <i32 23, i32 16, i32 6, i32 1, i32 21, i32 18, i32 4, i32 3>
-; CHECK: %Q1.v.r2 = shufflevector <16 x i8> %Z1, <16 x i8> undef, <8 x i32> <i32 14, i32 15, i32 8, i32 9, i32 10, i32 12, i32 12, i32 9>
+; CHECK: %Q1.v.i1 = shufflevector <16 x i8> %Z1, <16 x i8> undef, <16 x i32> <i32 8, i32 undef, i32 10, i32 undef, i32 undef, i32 13, i32 undef, i32 15, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>
+; CHECK: %Q1 = shufflevector <16 x i8> %Z1, <16 x i8> %Q1.v.i1, <16 x i32> <i32 23, i32 16, i32 6, i32 1, i32 21, i32 18, i32 4, i32 3, i32 14, i32 15, i32 8, i32 9, i32 10, i32 12, i32 12, i32 9>
+ %R = mul <8 x i8> %Q1, %Q2
+; CHECK: %Q1.v.r1 = shufflevector <16 x i8> %Q1, <16 x i8> undef, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7>
+; CHECK: %Q1.v.r2 = shufflevector <16 x i8> %Q1, <16 x i8> undef, <8 x i32> <i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15>
; CHECK: %R = mul <8 x i8> %Q1.v.r1, %Q1.v.r2
ret <8 x i8> %R
; CHECK: ret <8 x i8> %R
diff --git a/test/Transforms/InstCombine/vec_shuffle.ll b/test/Transforms/InstCombine/vec_shuffle.ll
index 37c19f1..37d4d56 100644
--- a/test/Transforms/InstCombine/vec_shuffle.ll
+++ b/test/Transforms/InstCombine/vec_shuffle.ll
@@ -86,14 +86,14 @@ define <4 x i8> @test9(<16 x i8> %tmp6) nounwind {
}
; Same as test9, but make sure that "undef" mask values are not confused with
-; mask values of 2*N, where N is the mask length of the result. Make sure when
-; folding these shuffles that 'undef' mask values stay that way in the result
-; instead of getting mapped to the 2*N'th entry of the source.
-define <4 x i8> @test9a(<16 x i8> %in, <16 x i8> %in2) nounwind {
+; mask values of 2*N, where N is the mask length. These shuffles should not
+; be folded (because [8,9,4,8] may not be a mask supported by the target).
+define <4 x i8> @test9a(<16 x i8> %tmp6) nounwind {
; CHECK: @test9a
-; CHECK-NEXT: shufflevector <16 x i8> %in, <16 x i8> %in2, <4 x i32> <i32 16, i32 9, i32 4, i32 undef>
+; CHECK-NEXT: shufflevector
+; CHECK-NEXT: shufflevector
; CHECK-NEXT: ret
- %tmp7 = shufflevector <16 x i8> %in, <16 x i8> %in2, <4 x i32> < i32 undef, i32 9, i32 4, i32 16 > ; <<4 x i8>> [#uses=1]
+ %tmp7 = shufflevector <16 x i8> %tmp6, <16 x i8> undef, <4 x i32> < i32 undef, i32 9, i32 4, i32 8 > ; <<4 x i8>> [#uses=1]
%tmp9 = shufflevector <4 x i8> %tmp7, <4 x i8> undef, <4 x i32> < i32 3, i32 1, i32 2, i32 0 > ; <<4 x i8>> [#uses=1]
ret <4 x i8> %tmp9
}