diff options
author | Simon Pilgrim <llvm-dev@redking.me.uk> | 2016-07-05 09:10:07 +0000 |
---|---|---|
committer | Simon Pilgrim <llvm-dev@redking.me.uk> | 2016-07-05 09:10:07 +0000 |
commit | dea33cc2f3b1f6c37cdb4178c8a213fea7db118b (patch) | |
tree | 9045294083e7a07ec10ff5c31f7b5a2f9f97fce3 /llvm/test | |
parent | 8a01915bd267e0525c2c352b6338f3fb7484424e (diff) | |
download | bcm5719-llvm-dea33cc2f3b1f6c37cdb4178c8a213fea7db118b.tar.gz bcm5719-llvm-dea33cc2f3b1f6c37cdb4178c8a213fea7db118b.zip |
[X86][AVX512] Added VSHUFPD intrinsics fast-isel generic IR tests
llvm-svn: 274534
Diffstat (limited to 'llvm/test')
-rw-r--r-- | llvm/test/CodeGen/X86/avx512-intrinsics-fast-isel.ll | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/X86/avx512-intrinsics-fast-isel.ll b/llvm/test/CodeGen/X86/avx512-intrinsics-fast-isel.ll index 84e12ba7974..2018d68a68d 100644 --- a/llvm/test/CodeGen/X86/avx512-intrinsics-fast-isel.ll +++ b/llvm/test/CodeGen/X86/avx512-intrinsics-fast-isel.ll @@ -427,6 +427,58 @@ define <8 x i64> @test_mm512_maskz_shuffle_epi32(i16 %a0, <8 x i64> %a1) { ret <8 x i64> %res2 } +define <8 x double> @test_mm512_shuffle_pd(<8 x double> %a0, <8 x double> %a1) { +; X32-LABEL: test_mm512_shuffle_pd: +; X32: # BB#0: +; X32-NEXT: vshufpd {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[3],zmm1[2],zmm0[4],zmm1[4],zmm0[6],zmm1[6] +; X32-NEXT: retl +; +; X64-LABEL: test_mm512_shuffle_pd: +; X64: # BB#0: +; X64-NEXT: vshufpd {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[3],zmm1[2],zmm0[4],zmm1[4],zmm0[6],zmm1[6] +; X64-NEXT: retq + %res = shufflevector <8 x double> %a0, <8 x double> %a1, <8 x i32> <i32 0, i32 8, i32 3, i32 10, i32 4, i32 12, i32 6, i32 14> + ret <8 x double> %res +} + +define <8 x double> @test_mm512_mask_shuffle_pd(<8 x double> %a0, i8 %a1, <8 x double> %a2, <8 x double> %a3) { +; X32-LABEL: test_mm512_mask_shuffle_pd: +; X32: # BB#0: +; X32-NEXT: movb {{[0-9]+}}(%esp), %al +; X32-NEXT: kmovw %eax, %k1 +; X32-NEXT: vshufpd {{.*#+}} zmm0 {%k1} = zmm1[0],zmm2[0],zmm1[3],zmm2[2],zmm1[4],zmm2[4],zmm1[6],zmm2[6] +; X32-NEXT: retl +; +; X64-LABEL: test_mm512_mask_shuffle_pd: +; X64: # BB#0: +; X64-NEXT: kmovw %edi, %k1 +; X64-NEXT: vshufpd {{.*#+}} zmm0 {%k1} = zmm1[0],zmm2[0],zmm1[3],zmm2[2],zmm1[4],zmm2[4],zmm1[6],zmm2[6] +; X64-NEXT: retq + %arg1 = bitcast i8 %a1 to <8 x i1> + %res0 = shufflevector <8 x double> %a2, <8 x double> %a3, <8 x i32> <i32 0, i32 8, i32 3, i32 10, i32 4, i32 12, i32 6, i32 14> + %res1 = select <8 x i1> %arg1, <8 x double> %res0, <8 x double> %a0 + ret <8 x double> %res1 +} + +define <8 x double> @test_mm512_maskz_shuffle_pd(i8 %a0, <8 x double> %a1, <8 x double> %a2) { +; X32-LABEL: test_mm512_maskz_shuffle_pd: +; X32: # BB#0: +; X32-NEXT: movb {{[0-9]+}}(%esp), %al +; X32-NEXT: kmovw %eax, %k1 +; X32-NEXT: vshufpd {{.*#+}} zmm0 {%k1} {z} = zmm0[0],zmm1[0],zmm0[3],zmm1[2],zmm0[4],zmm1[4],zmm0[6],zmm1[6] +; X32-NEXT: retl +; +; X64-LABEL: test_mm512_maskz_shuffle_pd: +; X64: # BB#0: +; X64-NEXT: kmovw %edi, %k1 +; X64-NEXT: vshufpd {{.*#+}} zmm0 {%k1} {z} = zmm0[0],zmm1[0],zmm0[3],zmm1[2],zmm0[4],zmm1[4],zmm0[6],zmm1[6] +; X64-NEXT: retq + %arg0 = bitcast i8 %a0 to <8 x i1> + %res0 = shufflevector <8 x double> %a1, <8 x double> %a2, <8 x i32> <i32 0, i32 8, i32 3, i32 10, i32 4, i32 12, i32 6, i32 14> + %res1 = select <8 x i1> %arg0, <8 x double> %res0, <8 x double> zeroinitializer + ret <8 x double> %res1 +} + define <8 x i64> @test_mm512_unpackhi_epi32(<8 x i64> %a0, <8 x i64> %a1) { ; X32-LABEL: test_mm512_unpackhi_epi32: ; X32: # BB#0: |