@@ -158,3 +158,22 @@ define <64 x i8> @combine_vpermi2var_v64i8_with_mask(<64 x i8> %a0, <64 x i8> %a
158
158
%sel = select <64 x i1 > %cmp , <64 x i8 > zeroinitializer , <64 x i8 > %perm
159
159
ret <64 x i8 > %sel
160
160
}
161
+
162
+ define <32 x i8 > @concat_vpermt2var_v16i8 (<32 x i8 > %x0 , <32 x i8 > %x1 ) {
163
+ ; CHECK-LABEL: concat_vpermt2var_v16i8:
164
+ ; CHECK: # %bb.0:
165
+ ; CHECK-NEXT: vmovdqa {{.*#+}} xmm2 = [0,17,2,18,4,19,6,21,8,23,10,25,12,27,14,29]
166
+ ; CHECK-NEXT: vpermi2b %xmm1, %xmm0, %xmm2
167
+ ; CHECK-NEXT: vmovdqa {{.*#+}} xmm3 = [16,49,18,50,20,51,22,53,24,55,26,57,28,59,30,61]
168
+ ; CHECK-NEXT: vpermi2b %ymm1, %ymm0, %ymm3
169
+ ; CHECK-NEXT: vinserti128 $1, %xmm3, %ymm2, %ymm0
170
+ ; CHECK-NEXT: ret{{[l|q]}}
171
+ %l0 = shufflevector <32 x i8 > %x0 , <32 x i8 > poison, <16 x i32 > <i32 0 , i32 1 , i32 2 , i32 3 , i32 4 , i32 5 , i32 6 , i32 7 , i32 8 , i32 9 , i32 10 , i32 11 , i32 12 , i32 13 , i32 14 , i32 15 >
172
+ %l1 = shufflevector <32 x i8 > %x1 , <32 x i8 > poison, <16 x i32 > <i32 0 , i32 1 , i32 2 , i32 3 , i32 4 , i32 5 , i32 6 , i32 7 , i32 8 , i32 9 , i32 10 , i32 11 , i32 12 , i32 13 , i32 14 , i32 15 >
173
+ %h0 = shufflevector <32 x i8 > %x0 , <32 x i8 > poison, <16 x i32 > <i32 16 , i32 17 , i32 18 , i32 19 , i32 20 , i32 21 , i32 22 , i32 23 , i32 24 , i32 25 , i32 26 , i32 27 , i32 28 , i32 29 , i32 30 , i32 31 >
174
+ %h1 = shufflevector <32 x i8 > %x1 , <32 x i8 > poison, <16 x i32 > <i32 16 , i32 17 , i32 18 , i32 19 , i32 20 , i32 21 , i32 22 , i32 23 , i32 24 , i32 25 , i32 26 , i32 27 , i32 28 , i32 29 , i32 30 , i32 31 >
175
+ %v0 = call <16 x i8 > @llvm.x86.avx512.maskz.vpermt2var.qi.128 (<16 x i8 > <i8 0 , i8 17 , i8 2 , i8 18 , i8 4 , i8 19 , i8 6 , i8 21 , i8 8 , i8 23 , i8 10 , i8 25 , i8 12 , i8 27 , i8 14 , i8 29 >, <16 x i8 > %l0 , <16 x i8 > %l1 , i16 -1 )
176
+ %v1 = call <16 x i8 > @llvm.x86.avx512.maskz.vpermt2var.qi.128 (<16 x i8 > <i8 0 , i8 17 , i8 2 , i8 18 , i8 4 , i8 19 , i8 6 , i8 21 , i8 8 , i8 23 , i8 10 , i8 25 , i8 12 , i8 27 , i8 14 , i8 29 >, <16 x i8 > %h0 , <16 x i8 > %h1 , i16 -1 )
177
+ %res = shufflevector <16 x i8 > %v0 , <16 x i8 > %v1 , <32 x i32 > <i32 0 , i32 1 , i32 2 , i32 3 , i32 4 , i32 5 , i32 6 , i32 7 , i32 8 , i32 9 , i32 10 , i32 11 , i32 12 , i32 13 , i32 14 , i32 15 , i32 16 , i32 17 , i32 18 , i32 19 , i32 20 , i32 21 , i32 22 , i32 23 , i32 24 , i32 25 , i32 26 , i32 27 , i32 28 , i32 29 , i32 30 , i32 31 >
178
+ ret <32 x i8 > %res
179
+ }
0 commit comments