diff options
Diffstat (limited to 'llvm/test/CodeGen/X86/avx512-trunc.ll')
-rw-r--r-- | llvm/test/CodeGen/X86/avx512-trunc.ll | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/X86/avx512-trunc.ll b/llvm/test/CodeGen/X86/avx512-trunc.ll index 572b6065b2f..45384a4df4f 100644 --- a/llvm/test/CodeGen/X86/avx512-trunc.ll +++ b/llvm/test/CodeGen/X86/avx512-trunc.ll @@ -514,6 +514,26 @@ define void @trunc_wb_256_mem(<16 x i16> %i, <16 x i8>* %res) #0 { ret void } +define <16 x i8> @trunc_wb_256_mem_and_ret(<16 x i16> %i, <16 x i8>* %res) #0 { +; KNL-LABEL: trunc_wb_256_mem_and_ret: +; KNL: ## %bb.0: +; KNL-NEXT: vpmovzxwd {{.*#+}} zmm0 = ymm0[0],zero,ymm0[1],zero,ymm0[2],zero,ymm0[3],zero,ymm0[4],zero,ymm0[5],zero,ymm0[6],zero,ymm0[7],zero,ymm0[8],zero,ymm0[9],zero,ymm0[10],zero,ymm0[11],zero,ymm0[12],zero,ymm0[13],zero,ymm0[14],zero,ymm0[15],zero +; KNL-NEXT: vpmovdb %zmm0, %xmm0 +; KNL-NEXT: vmovdqa %xmm0, (%rdi) +; KNL-NEXT: vzeroupper +; KNL-NEXT: retq +; +; SKX-LABEL: trunc_wb_256_mem_and_ret: +; SKX: ## %bb.0: +; SKX-NEXT: vpmovwb %ymm0, %xmm0 +; SKX-NEXT: vmovdqa %xmm0, (%rdi) +; SKX-NEXT: vzeroupper +; SKX-NEXT: retq + %x = trunc <16 x i16> %i to <16 x i8> + store <16 x i8> %x, <16 x i8>* %res + ret <16 x i8> %x +} + define <8 x i8> @trunc_wb_128(<8 x i16> %i) #0 { ; ALL-LABEL: trunc_wb_128: ; ALL: ## %bb.0: |