From: Simon Pilgrim Date: Sat, 18 Jun 2016 21:18:21 +0000 (+0000) Subject: [X86][SSSE3] Added examples of target shuffle combining failing to match undefs in... X-Git-Tag: android-x86-7.1-r4~31566 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=a5c0d0faede14c706e09452c931ea39be7db74f7;p=android-x86%2Fexternal-llvm.git [X86][SSSE3] Added examples of target shuffle combining failing to match undefs in shuffle masks git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273097 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/CodeGen/X86/vector-shuffle-combining-ssse3.ll b/test/CodeGen/X86/vector-shuffle-combining-ssse3.ll index e6b46c42f79..54af924d2af 100644 --- a/test/CodeGen/X86/vector-shuffle-combining-ssse3.ll +++ b/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> ) + 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> ) + 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: