summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/X86
diff options
context:
space:
mode:
authorSimon Pilgrim <llvm-dev@redking.me.uk>2016-06-18 21:18:21 +0000
committerSimon Pilgrim <llvm-dev@redking.me.uk>2016-06-18 21:18:21 +0000
commitcd6d4352bc665727d4814e5e09ee855a59d77ba7 (patch)
tree18346eb748f73dd96d5e095b9020a07865e4ba59 /llvm/test/CodeGen/X86
parentab009e9f4167b3ed1973db6de44ea543118c4688 (diff)
downloadbcm5719-llvm-cd6d4352bc665727d4814e5e09ee855a59d77ba7.tar.gz
bcm5719-llvm-cd6d4352bc665727d4814e5e09ee855a59d77ba7.zip
[X86][SSSE3] Added examples of target shuffle combining failing to match undefs in shuffle masks
llvm-svn: 273097
Diffstat (limited to 'llvm/test/CodeGen/X86')
-rw-r--r--llvm/test/CodeGen/X86/vector-shuffle-combining-ssse3.ll28
1 files changed, 28 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/X86/vector-shuffle-combining-ssse3.ll b/llvm/test/CodeGen/X86/vector-shuffle-combining-ssse3.ll
index e6b46c42f79..54af924d2af 100644
--- a/llvm/test/CodeGen/X86/vector-shuffle-combining-ssse3.ll
+++ b/llvm/test/CodeGen/X86/vector-shuffle-combining-ssse3.ll
@@ -137,6 +137,34 @@ define <16 x i8> @combine_pshufb_psrldq(<16 x i8> %a0) {
ret <16 x i8> %2
}
+define <16 x i8> @combine_pshufb_as_unary_unpcklbw(<16 x i8> %a0) {
+; SSE-LABEL: combine_pshufb_as_unary_unpcklbw:
+; SSE: # BB#0:
+; SSE-NEXT: pshufb {{.*#+}} xmm0 = xmm0[0,u,u,1,2,2,3,3,4,4,5,5,6,6,7,7]
+; SSE-NEXT: retq
+;
+; AVX-LABEL: combine_pshufb_as_unary_unpcklbw:
+; AVX: # BB#0:
+; AVX-NEXT: vpshufb {{.*#+}} xmm0 = xmm0[0,u,u,1,2,2,3,3,4,4,5,5,6,6,7,7]
+; AVX-NEXT: retq
+ %1 = tail call <16 x i8> @llvm.x86.ssse3.pshuf.b.128(<16 x i8> %a0, <16 x i8> <i8 0, i8 undef, i8 undef, i8 1, i8 2, i8 2, i8 3, i8 3, i8 4, i8 4, i8 5, i8 5, i8 6, i8 6, i8 7, i8 7>)
+ ret <16 x i8> %1
+}
+
+define <16 x i8> @combine_pshufb_as_unary_unpckhwd(<16 x i8> %a0) {
+; SSE-LABEL: combine_pshufb_as_unary_unpckhwd:
+; SSE: # BB#0:
+; SSE-NEXT: pshufb {{.*#+}} xmm0 = xmm0[8,9,8,9,10,11,10,11,12,13,12,13,14,15,u,u]
+; SSE-NEXT: retq
+;
+; AVX-LABEL: combine_pshufb_as_unary_unpckhwd:
+; AVX: # BB#0:
+; AVX-NEXT: vpshufb {{.*#+}} xmm0 = xmm0[8,9,8,9,10,11,10,11,12,13,12,13,14,15,u,u]
+; AVX-NEXT: retq
+ %1 = tail call <16 x i8> @llvm.x86.ssse3.pshuf.b.128(<16 x i8> %a0, <16 x i8> <i8 8, i8 9, i8 8, i8 9, i8 10, i8 11, i8 10, i8 11, i8 12, i8 13, i8 12, i8 13, i8 14, i8 15, i8 undef, i8 undef>)
+ ret <16 x i8> %1
+}
+
define <16 x i8> @combine_unpckl_arg0_pshufb(<16 x i8> %a0, <16 x i8> %a1) {
; SSE-LABEL: combine_unpckl_arg0_pshufb:
; SSE: # BB#0:
OpenPOWER on IntegriCloud