summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Pilgrim <llvm-dev@redking.me.uk>2018-10-04 15:06:09 +0000
committerSimon Pilgrim <llvm-dev@redking.me.uk>2018-10-04 15:06:09 +0000
commitf9c3d3e46410d9f1e65ce295622cd51e84126ce2 (patch)
treef9928ee125ec70f7e7a7b6178e897ff8237a18f4
parent98e0505d9e90e5ef4af42e4bc31a181068e4182b (diff)
[X86][AVX] Add PR39161 test case for v4f64 zzww shuffle
-rw-r--r--llvm/test/CodeGen/X86/vector-shuffle-256-v4.ll22
1 files changed, 22 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/X86/vector-shuffle-256-v4.ll b/llvm/test/CodeGen/X86/vector-shuffle-256-v4.ll
index dea9d51c4d2..fc1abdf6b1f 100644
--- a/llvm/test/CodeGen/X86/vector-shuffle-256-v4.ll
+++ b/llvm/test/CodeGen/X86/vector-shuffle-256-v4.ll
@@ -171,6 +171,28 @@ define <4 x double> @shuffle_v4f64_2222_bc(<4 x i64> %a, <4 x i64> %b) {
ret <4 x double> %shuffle
}
+define <4 x double> @shuffle_v4f64_2233(<4 x double> %a, <4 x double> %b) {
+; AVX1-LABEL: shuffle_v4f64_2233:
+; AVX1: # %bb.0:
+; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
+; AVX1-NEXT: vmovddup {{.*#+}} xmm1 = xmm0[0,0]
+; AVX1-NEXT: vpermilpd {{.*#+}} xmm0 = xmm0[1,1]
+; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
+; AVX1-NEXT: retq
+;
+; AVX2-LABEL: shuffle_v4f64_2233:
+; AVX2: # %bb.0:
+; AVX2-NEXT: vpermpd {{.*#+}} ymm0 = ymm0[2,2,3,3]
+; AVX2-NEXT: retq
+;
+; AVX512VL-LABEL: shuffle_v4f64_2233:
+; AVX512VL: # %bb.0:
+; AVX512VL-NEXT: vpermpd {{.*#+}} ymm0 = ymm0[2,2,3,3]
+; AVX512VL-NEXT: retq
+ %shuffle = shufflevector <4 x double> %a, <4 x double> %b, <4 x i32> <i32 2, i32 2, i32 3, i32 3>
+ ret <4 x double> %shuffle
+}
+
define <4 x double> @shuffle_v4f64_3330(<4 x double> %a, <4 x double> %b) {
; AVX1-LABEL: shuffle_v4f64_3330:
; AVX1: # %bb.0: