Skip to content

Commit fcbaf6f

Browse files
committed
[X86] Add v4i64 test coverage for llvm#58585
Turns out we fail to do this for concat_v4i64(broadcast_v2i64,broadcast_v2i64) as well
1 parent af1bb28 commit fcbaf6f

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

llvm/test/CodeGen/X86/vector-shuffle-256-v4.ll

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1540,6 +1540,33 @@ define <4 x i64> @shuffle_v4i64_1z3z(<4 x i64> %a, <4 x i64> %b) {
15401540
ret <4 x i64> %shuffle
15411541
}
15421542

1543+
define <4 x i64> @shuffle_v4i64_0044_v2i64(<2 x i64> %a, <2 x i64> %b) {
1544+
; AVX1-LABEL: shuffle_v4i64_0044_v2i64:
1545+
; AVX1: # %bb.0:
1546+
; AVX1-NEXT: # kill: def $xmm0 killed $xmm0 def $ymm0
1547+
; AVX1-NEXT: vinsertf128 $1, %xmm1, %ymm0, %ymm0
1548+
; AVX1-NEXT: vmovddup {{.*#+}} ymm0 = ymm0[0,0,2,2]
1549+
; AVX1-NEXT: retq
1550+
;
1551+
; AVX2-LABEL: shuffle_v4i64_0044_v2i64:
1552+
; AVX2: # %bb.0:
1553+
; AVX2-NEXT: vmovddup {{.*#+}} xmm0 = xmm0[0,0]
1554+
; AVX2-NEXT: vmovddup {{.*#+}} xmm1 = xmm1[0,0]
1555+
; AVX2-NEXT: vinsertf128 $1, %xmm1, %ymm0, %ymm0
1556+
; AVX2-NEXT: retq
1557+
;
1558+
; AVX512VL-LABEL: shuffle_v4i64_0044_v2i64:
1559+
; AVX512VL: # %bb.0:
1560+
; AVX512VL-NEXT: vmovddup {{.*#+}} xmm0 = xmm0[0,0]
1561+
; AVX512VL-NEXT: vmovddup {{.*#+}} xmm1 = xmm1[0,0]
1562+
; AVX512VL-NEXT: vinsertf128 $1, %xmm1, %ymm0, %ymm0
1563+
; AVX512VL-NEXT: retq
1564+
%1 = shufflevector <2 x i64> %a, <2 x i64> undef, <2 x i32> <i32 0, i32 0>
1565+
%2 = shufflevector <2 x i64> %b, <2 x i64> undef, <2 x i32> <i32 0, i32 0>
1566+
%3 = shufflevector <2 x i64> %1, <2 x i64> %2, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
1567+
ret <4 x i64> %3
1568+
}
1569+
15431570
define <4 x i64> @shuffle_v4i64_1032_v2i64(<2 x i64> %a, <2 x i64> %b) {
15441571
; ALL-LABEL: shuffle_v4i64_1032_v2i64:
15451572
; ALL: # %bb.0:

0 commit comments

Comments
 (0)