Skip to content

Commit 32d0603

Browse files
Add test
1 parent 4f2e5e4 commit 32d0603

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

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

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -990,3 +990,23 @@ bb:
990990
ret void
991991
}
992992

993+
define <8 x i64> @pr121147(<8 x i64> %a) {
994+
; AVX512F-LABEL: pr121147:
995+
; AVX512F: # %bb.0: # %entry
996+
; AVX512F-NEXT: movw $-21846, %ax # imm = 0xAAAA
997+
; AVX512F-NEXT: kmovw %eax, %k1
998+
; AVX512F-NEXT: vpshufd {{.*#+}} zmm0 {%k1} {z} = zmm0[0,2,0,2,4,6,4,6,8,10,8,10,12,14,12,14]
999+
; AVX512F-NEXT: retq
1000+
;
1001+
; AVX512BW-LABEL: pr121147:
1002+
; AVX512BW: # %bb.0: # %entry
1003+
; AVX512BW-NEXT: movw $-21846, %ax # imm = 0xAAAA
1004+
; AVX512BW-NEXT: kmovd %eax, %k1
1005+
; AVX512BW-NEXT: vpshufd {{.*#+}} zmm0 {%k1} {z} = zmm0[0,2,0,2,4,6,4,6,8,10,8,10,12,14,12,14]
1006+
; AVX512BW-NEXT: retq
1007+
entry:
1008+
%0 = bitcast <8 x i64> %a to <16 x i32>
1009+
%1 = shufflevector <16 x i32> <i32 0, i32 poison, i32 0, i32 poison, i32 0, i32 poison, i32 0, i32 poison, i32 0, i32 poison, i32 0, i32 poison, i32 0, i32 poison, i32 0, i32 poison>, <16 x i32> %0, <16 x i32> <i32 0, i32 18, i32 2, i32 18, i32 4, i32 22, i32 6, i32 22, i32 8, i32 26, i32 10, i32 26, i32 12, i32 30, i32 14, i32 30>
1010+
%2 = bitcast <16 x i32> %1 to <8 x i64>
1011+
ret <8 x i64> %2
1012+
}

0 commit comments

Comments
 (0)