Skip to content

Commit b92725e

Browse files
committed
[X86] Add test coverage for llvm#58585
1 parent 14de3d5 commit b92725e

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

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

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -638,6 +638,24 @@ define <8 x float> @shuffle_v8f32_00224466_v4f32(<4 x float> %a, <4 x float> %b)
638638
ret <8 x float> %3
639639
}
640640

641+
define <8 x float> @shuffle_v8f32_00004444_v4f32(<4 x float> %a, <4 x float> %b) {
642+
; AVX1-LABEL: shuffle_v8f32_00004444_v4f32:
643+
; AVX1: # %bb.0:
644+
; AVX1-NEXT: # kill: def $xmm0 killed $xmm0 def $ymm0
645+
; AVX1-NEXT: vinsertf128 $1, %xmm1, %ymm0, %ymm0
646+
; AVX1-NEXT: vpermilps {{.*#+}} ymm0 = ymm0[0,0,0,0,4,4,4,4]
647+
; AVX1-NEXT: retq
648+
;
649+
; AVX2OR512VL-LABEL: shuffle_v8f32_00004444_v4f32:
650+
; AVX2OR512VL: # %bb.0:
651+
; AVX2OR512VL-NEXT: vbroadcastss %xmm0, %xmm0
652+
; AVX2OR512VL-NEXT: vbroadcastss %xmm1, %xmm1
653+
; AVX2OR512VL-NEXT: vinsertf128 $1, %xmm1, %ymm0, %ymm0
654+
; AVX2OR512VL-NEXT: retq
655+
%1 = shufflevector <4 x float> %a, <4 x float> %b, <8 x i32> <i32 0, i32 0, i32 0, i32 0, i32 4, i32 4, i32 4, i32 4>
656+
ret <8 x float> %1
657+
}
658+
641659
define <8 x float> @shuffle_v8f32_10325476(<8 x float> %a, <8 x float> %b) {
642660
; ALL-LABEL: shuffle_v8f32_10325476:
643661
; ALL: # %bb.0:
@@ -3270,6 +3288,24 @@ define <8 x i32> @shuffle_v8i32_32107654_v4i32(<4 x i32> %a, <4 x i32> %b) {
32703288
ret <8 x i32> %3
32713289
}
32723290

3291+
define <8 x i32> @shuffle_v8i32_00004444_v4f32(<4 x i32> %a, <4 x i32> %b) {
3292+
; AVX1-LABEL: shuffle_v8i32_00004444_v4f32:
3293+
; AVX1: # %bb.0:
3294+
; AVX1-NEXT: # kill: def $xmm0 killed $xmm0 def $ymm0
3295+
; AVX1-NEXT: vinsertf128 $1, %xmm1, %ymm0, %ymm0
3296+
; AVX1-NEXT: vpermilps {{.*#+}} ymm0 = ymm0[0,0,0,0,4,4,4,4]
3297+
; AVX1-NEXT: retq
3298+
;
3299+
; AVX2OR512VL-LABEL: shuffle_v8i32_00004444_v4f32:
3300+
; AVX2OR512VL: # %bb.0:
3301+
; AVX2OR512VL-NEXT: vbroadcastss %xmm0, %xmm0
3302+
; AVX2OR512VL-NEXT: vbroadcastss %xmm1, %xmm1
3303+
; AVX2OR512VL-NEXT: vinsertf128 $1, %xmm1, %ymm0, %ymm0
3304+
; AVX2OR512VL-NEXT: retq
3305+
%1 = shufflevector <4 x i32> %a, <4 x i32> %b, <8 x i32> <i32 0, i32 0, i32 0, i32 0, i32 4, i32 4, i32 4, i32 4>
3306+
ret <8 x i32> %1
3307+
}
3308+
32733309
define <8 x float> @splat_mem_v8f32_2(ptr %p) {
32743310
; ALL-LABEL: splat_mem_v8f32_2:
32753311
; ALL: # %bb.0:

0 commit comments

Comments
 (0)