Skip to content

Commit 57e22f5

Browse files
committed
[X86] Add tests showing failure to concat matching VPSHUFLW/HW ymm shuffles.
1 parent 85318ba commit 57e22f5

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

llvm/test/CodeGen/X86/vector-shuffle-512-v32.ll

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,28 @@ define <32 x i16> @shuffle_v32i16_lshr_00_02_04_06_32_34_36_38_08_10_12_14_40_42
264264
ret <32 x i16> %5
265265
}
266266

267+
define <32 x i16> @shuffle_v32i16_concat_00_00_00_00_04_05_06_07_08_08_08_08_12_13_14_15_16_16_16_16_20_21_22_23_24_24_24_24_28_29_30_31(<16 x i16> %a0, <16 x i16> %a1) {
268+
; ALL-LABEL: shuffle_v32i16_concat_00_00_00_00_04_05_06_07_08_08_08_08_12_13_14_15_16_16_16_16_20_21_22_23_24_24_24_24_28_29_30_31:
269+
; ALL: ## %bb.0:
270+
; ALL-NEXT: vpshuflw {{.*#+}} ymm0 = ymm0[0,0,0,0,4,5,6,7,8,8,8,8,12,13,14,15]
271+
; ALL-NEXT: vpshuflw {{.*#+}} ymm1 = ymm1[0,0,0,0,4,5,6,7,8,8,8,8,12,13,14,15]
272+
; ALL-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
273+
; ALL-NEXT: retq
274+
%shuffle = shufflevector <16 x i16> %a0, <16 x i16> %a1, <32 x i32> <i32 0, i32 0, i32 0, i32 0, i32 4, i32 5, i32 6, i32 7, i32 8, i32 8, i32 8, i32 8, i32 12, i32 13, i32 14, i32 15, i32 16, i32 16, i32 16, i32 16, i32 20, i32 21, i32 22, i32 23, i32 24, i32 24, i32 24, i32 24, i32 28, i32 29, i32 30, i32 31>
275+
ret <32 x i16> %shuffle
276+
}
277+
278+
define <32 x i16> @shuffle_v32i16_concat_00_01_02_03_04_07_06_04_08_09_10_11_12_15_14_12_16_17_18_19_20_23_22_20_24_25_26_27_28_31_30_28(<16 x i16> %a0, <16 x i16> %a1) {
279+
; ALL-LABEL: shuffle_v32i16_concat_00_01_02_03_04_07_06_04_08_09_10_11_12_15_14_12_16_17_18_19_20_23_22_20_24_25_26_27_28_31_30_28:
280+
; ALL: ## %bb.0:
281+
; ALL-NEXT: vpshufhw {{.*#+}} ymm0 = ymm0[0,1,2,3,4,7,6,4,8,9,10,11,12,15,14,12]
282+
; ALL-NEXT: vpshufhw {{.*#+}} ymm1 = ymm1[0,1,2,3,4,7,6,4,8,9,10,11,12,15,14,12]
283+
; ALL-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
284+
; ALL-NEXT: retq
285+
%shuffle = shufflevector <16 x i16> %a0, <16 x i16> %a1, <32 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 7, i32 6, i32 4, i32 8, i32 9, i32 10, i32 11, i32 12, i32 15, i32 14, i32 12, i32 16, i32 17, i32 18, i32 19, i32 20, i32 23, i32 22, i32 20, i32 24, i32 25, i32 26, i32 27, i32 28, i32 31, i32 30, i32 28>
286+
ret <32 x i16> %shuffle
287+
}
288+
267289
define <32 x i16> @insert_dup_mem_v32i16_i32(ptr %ptr) {
268290
; KNL-LABEL: insert_dup_mem_v32i16_i32:
269291
; KNL: ## %bb.0:

0 commit comments

Comments
 (0)