Skip to content

Commit ab5da4b

Browse files
authored
[X86] Add test showing failure to concat X86ISD::PERMI nodes with different immediates (llvm#203487)
1 parent 125242e commit ab5da4b

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

llvm/test/CodeGen/X86/vector-shuffle-combining-avx512f.ll

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1112,6 +1112,22 @@ define <16 x i32> @combine_vcompressd_splat(i16 %m) {
11121112
ret <16 x i32> %res
11131113
}
11141114

1115+
define <8 x i64> @concat_nonuniform_permq_v4i64_v8i64(<4 x i64> %a0, <4 x i64> %a1, <2 x i64> %a2) nounwind {
1116+
; CHECK-LABEL: concat_nonuniform_permq_v4i64_v8i64:
1117+
; CHECK: # %bb.0:
1118+
; CHECK-NEXT: vpermq {{.*#+}} ymm0 = ymm0[1,3,2,0]
1119+
; CHECK-NEXT: vpermq {{.*#+}} ymm1 = ymm1[3,2,1,0]
1120+
; CHECK-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
1121+
; CHECK-NEXT: vpsrlq %xmm2, %zmm0, %zmm0
1122+
; CHECK-NEXT: ret{{[l|q]}}
1123+
%perm0 = shufflevector <4 x i64> %a0, <4 x i64> poison, <4 x i32> <i32 1, i32 3, i32 2, i32 0>
1124+
%perm1 = shufflevector <4 x i64> %a1, <4 x i64> poison, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
1125+
%shift0 = tail call noundef <4 x i64> @llvm.x86.avx2.psrl.q(<4 x i64> %perm0, <2 x i64> %a2)
1126+
%shift1 = tail call noundef <4 x i64> @llvm.x86.avx2.psrl.q(<4 x i64> %perm1, <2 x i64> %a2)
1127+
%shuffle = shufflevector <4 x i64> %shift0, <4 x i64> %shift1, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7>
1128+
ret <8 x i64> %shuffle
1129+
}
1130+
11151131
define <8 x i64> @PR179008(ptr %p0) {
11161132
; X86-AVX512F-LABEL: PR179008:
11171133
; X86-AVX512F: # %bb.0:

0 commit comments

Comments
 (0)