summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/X86/vector-shuffle-256-v8.ll
diff options
context:
space:
mode:
authorSimon Pilgrim <llvm-dev@redking.me.uk>2019-06-12 16:38:20 +0000
committerSimon Pilgrim <llvm-dev@redking.me.uk>2019-06-12 16:38:20 +0000
commit5b0e0dd709f96cb987cd3178217517b45ee1febb (patch)
treefbf0ea114bef55d48c325c2d687d65b6e3895419 /llvm/test/CodeGen/X86/vector-shuffle-256-v8.ll
parent64006896ac0ba773c0d1d7de6930d032bd4b4ba1 (diff)
downloadbcm5719-llvm-5b0e0dd709f96cb987cd3178217517b45ee1febb.tar.gz
bcm5719-llvm-5b0e0dd709f96cb987cd3178217517b45ee1febb.zip
[X86][AVX] Fold concat(vpermilps(x,c),vpermilps(y,c)) -> vpermilps(concat(x,y),c)
Handles PSHUFD/PSHUFLW/PSHUFHW (AVX2) + VPERMILPS (AVX1). An extra AVX1 PSHUFD->VPERMILPS combine will be added in a future commit. llvm-svn: 363178
Diffstat (limited to 'llvm/test/CodeGen/X86/vector-shuffle-256-v8.ll')
-rw-r--r--llvm/test/CodeGen/X86/vector-shuffle-256-v8.ll23
1 files changed, 15 insertions, 8 deletions
diff --git a/llvm/test/CodeGen/X86/vector-shuffle-256-v8.ll b/llvm/test/CodeGen/X86/vector-shuffle-256-v8.ll
index 6390851bfea..3f9d9ade272 100644
--- a/llvm/test/CodeGen/X86/vector-shuffle-256-v8.ll
+++ b/llvm/test/CodeGen/X86/vector-shuffle-256-v8.ll
@@ -1219,9 +1219,9 @@ define <8 x float> @shuffle_v8f32_5555uuuu(<8 x float> %a, <8 x float> %b) {
define <8 x float> @shuffle_v8f32_32107654_v4f32(<4 x float> %a, <4 x float> %b) {
; ALL-LABEL: shuffle_v8f32_32107654_v4f32:
; ALL: # %bb.0:
-; ALL-NEXT: vpermilps {{.*#+}} xmm0 = xmm0[3,2,1,0]
-; ALL-NEXT: vpermilps {{.*#+}} xmm1 = xmm1[3,2,1,0]
+; ALL-NEXT: # kill: def $xmm0 killed $xmm0 def $ymm0
; ALL-NEXT: vinsertf128 $1, %xmm1, %ymm0, %ymm0
+; ALL-NEXT: vpermilps {{.*#+}} ymm0 = ymm0[3,2,1,0,7,6,5,4]
; ALL-NEXT: retq
%1 = shufflevector <4 x float> %a, <4 x float> undef, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
%2 = shufflevector <4 x float> %b, <4 x float> undef, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
@@ -2520,12 +2520,19 @@ define <8 x i32> @shuffle_v8i32_uuuuuu7u(<8 x i32> %a, <8 x i32> %b) nounwind {
}
define <8 x i32> @shuffle_v8i32_32107654_v4i32(<4 x i32> %a, <4 x i32> %b) {
-; ALL-LABEL: shuffle_v8i32_32107654_v4i32:
-; ALL: # %bb.0:
-; ALL-NEXT: vpermilps {{.*#+}} xmm0 = xmm0[3,2,1,0]
-; ALL-NEXT: vpermilps {{.*#+}} xmm1 = xmm1[3,2,1,0]
-; ALL-NEXT: vinsertf128 $1, %xmm1, %ymm0, %ymm0
-; ALL-NEXT: retq
+; AVX1-LABEL: shuffle_v8i32_32107654_v4i32:
+; AVX1: # %bb.0:
+; AVX1-NEXT: vpermilps {{.*#+}} xmm0 = xmm0[3,2,1,0]
+; AVX1-NEXT: vpermilps {{.*#+}} xmm1 = xmm1[3,2,1,0]
+; AVX1-NEXT: vinsertf128 $1, %xmm1, %ymm0, %ymm0
+; AVX1-NEXT: retq
+;
+; AVX2OR512VL-LABEL: shuffle_v8i32_32107654_v4i32:
+; AVX2OR512VL: # %bb.0:
+; AVX2OR512VL-NEXT: # kill: def $xmm0 killed $xmm0 def $ymm0
+; AVX2OR512VL-NEXT: vinsertf128 $1, %xmm1, %ymm0, %ymm0
+; AVX2OR512VL-NEXT: vpermilps {{.*#+}} ymm0 = ymm0[3,2,1,0,7,6,5,4]
+; AVX2OR512VL-NEXT: retq
%1 = shufflevector <4 x i32> %a, <4 x i32> undef, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
%2 = shufflevector <4 x i32> %b, <4 x i32> undef, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
%3 = shufflevector <4 x i32> %1, <4 x i32> %2, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7>
OpenPOWER on IntegriCloud