llvm.org GIT mirror llvm / 2fee386
[X86][AVX512] Added additional shuffle+trunc test case. An existing test should have covered this but a typo caused it to fail. I've kept both as the codegen for the typo case needs addressing as well. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310791 91177308-0d34-0410-b5e6-96231b3b80d8 Simon Pilgrim 2 years ago
1 changed file(s) with 50 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
225225 %strided.vec = trunc <8 x i64> %bc to <8 x i8>
226226 store <8 x i8> %strided.vec, <8 x i8>* %S
227227 ret void
228 }
229
230 define <16 x i8> @trunc_shuffle_v64i8_01_05_09_13_17_21_25_29_33_37_41_45_49_53_57_61(<64 x i8> %x) {
231 ; AVX512F-LABEL: trunc_shuffle_v64i8_01_05_09_13_17_21_25_29_33_37_41_45_49_53_57_61:
232 ; AVX512F: # BB#0:
233 ; AVX512F-NEXT: vextracti128 $1, %ymm1, %xmm2
234 ; AVX512F-NEXT: vmovdqa {{.*#+}} xmm3 =
235 ; AVX512F-NEXT: vpshufb %xmm3, %xmm2, %xmm2
236 ; AVX512F-NEXT: vpshufb %xmm3, %xmm1, %xmm1
237 ; AVX512F-NEXT: vpunpckldq {{.*#+}} xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1]
238 ; AVX512F-NEXT: vextracti128 $1, %ymm0, %xmm2
239 ; AVX512F-NEXT: vmovdqa {{.*#+}} xmm3 = <1,5,9,13,u,u,u,u,u,u,u,u,u,u,u,u>
240 ; AVX512F-NEXT: vpshufb %xmm3, %xmm2, %xmm2
241 ; AVX512F-NEXT: vpshufb %xmm3, %xmm0, %xmm0
242 ; AVX512F-NEXT: vpunpckldq {{.*#+}} xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1]
243 ; AVX512F-NEXT: vpblendd {{.*#+}} xmm0 = xmm0[0,1],xmm1[2,3]
244 ; AVX512F-NEXT: vzeroupper
245 ; AVX512F-NEXT: retq
246 ;
247 ; AVX512VL-LABEL: trunc_shuffle_v64i8_01_05_09_13_17_21_25_29_33_37_41_45_49_53_57_61:
248 ; AVX512VL: # BB#0:
249 ; AVX512VL-NEXT: vextracti128 $1, %ymm1, %xmm2
250 ; AVX512VL-NEXT: vmovdqa {{.*#+}} xmm3 =
251 ; AVX512VL-NEXT: vpshufb %xmm3, %xmm2, %xmm2
252 ; AVX512VL-NEXT: vpshufb %xmm3, %xmm1, %xmm1
253 ; AVX512VL-NEXT: vpunpckldq {{.*#+}} xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1]
254 ; AVX512VL-NEXT: vextracti128 $1, %ymm0, %xmm2
255 ; AVX512VL-NEXT: vmovdqa {{.*#+}} xmm3 = <1,5,9,13,u,u,u,u,u,u,u,u,u,u,u,u>
256 ; AVX512VL-NEXT: vpshufb %xmm3, %xmm2, %xmm2
257 ; AVX512VL-NEXT: vpshufb %xmm3, %xmm0, %xmm0
258 ; AVX512VL-NEXT: vpunpckldq {{.*#+}} xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1]
259 ; AVX512VL-NEXT: vpblendd {{.*#+}} xmm0 = xmm0[0,1],xmm1[2,3]
260 ; AVX512VL-NEXT: vzeroupper
261 ; AVX512VL-NEXT: retq
262 ;
263 ; AVX512BW-LABEL: trunc_shuffle_v64i8_01_05_09_13_17_21_25_29_33_37_41_45_49_53_57_61:
264 ; AVX512BW: # BB#0:
265 ; AVX512BW-NEXT: vpsrlw $8, %zmm0, %zmm0
266 ; AVX512BW-NEXT: vpmovdb %zmm0, %xmm0
267 ; AVX512BW-NEXT: vzeroupper
268 ; AVX512BW-NEXT: retq
269 ;
270 ; AVX512BWVL-LABEL: trunc_shuffle_v64i8_01_05_09_13_17_21_25_29_33_37_41_45_49_53_57_61:
271 ; AVX512BWVL: # BB#0:
272 ; AVX512BWVL-NEXT: vpsrlw $8, %zmm0, %zmm0
273 ; AVX512BWVL-NEXT: vpmovdb %zmm0, %xmm0
274 ; AVX512BWVL-NEXT: vzeroupper
275 ; AVX512BWVL-NEXT: retq
276 %res = shufflevector <64 x i8> %x, <64 x i8> %x, <16 x i32>
277 ret <16 x i8> %res
228278 }
229279
230280 define <16 x i8> @trunc_shuffle_v64i8_01_05_09_13_17_21_25_29_33_37_41_45_49_53_57_62(<64 x i8> %x) {