From: Simon Pilgrim Date: Mon, 24 Sep 2018 17:26:31 +0000 (+0000) Subject: [X86][AVX] Add truncation as shuffle test for PR31451 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=51cbd838d04c7a8792031bd0a3d48d0c12b25816;p=platform%2Fupstream%2Fllvm.git [X86][AVX] Add truncation as shuffle test for PR31451 llvm-svn: 342908 --- diff --git a/llvm/test/CodeGen/X86/vector-shuffle-512-v16.ll b/llvm/test/CodeGen/X86/vector-shuffle-512-v16.ll index 46fadca..e35a0e9 100644 --- a/llvm/test/CodeGen/X86/vector-shuffle-512-v16.ll +++ b/llvm/test/CodeGen/X86/vector-shuffle-512-v16.ll @@ -306,6 +306,23 @@ define <4 x i32> @test_v16i32_0_1_2_12 (<16 x i32> %v) { ret <4 x i32> %res } +;PR31451 +;FIXME: can do better with vpcompress +define <4 x i32> @test_v16i32_0_4_8_12(<16 x i32> %v) { +; ALL-LABEL: test_v16i32_0_4_8_12: +; ALL: # %bb.0: +; ALL-NEXT: vextractf64x4 $1, %zmm0, %ymm1 +; ALL-NEXT: vmovaps {{.*#+}} ymm2 = +; ALL-NEXT: vpermps %ymm1, %ymm2, %ymm1 +; ALL-NEXT: vmovaps {{.*#+}} ymm2 = <0,4,u,u,u,u,u,u> +; ALL-NEXT: vpermps %ymm0, %ymm2, %ymm0 +; ALL-NEXT: vblendps {{.*#+}} xmm0 = xmm0[0,1],xmm1[2,3] +; ALL-NEXT: vzeroupper +; ALL-NEXT: retq + %res = shufflevector <16 x i32> %v, <16 x i32> undef, <4 x i32> + ret <4 x i32> %res +} + define <8 x float> @shuffle_v16f32_extract_256(float* %RET, float* %a) { ; ALL-LABEL: shuffle_v16f32_extract_256: ; ALL: # %bb.0: