diff options
| author | Zvi Rackover <zvi.rackover@intel.com> | 2017-03-28 16:45:23 +0000 |
|---|---|---|
| committer | Zvi Rackover <zvi.rackover@intel.com> | 2017-03-28 16:45:23 +0000 |
| commit | a4c354951bd8c998294110e92e18d65e5ce363d4 (patch) | |
| tree | 300d8f1b032e454984f22e2fd8b03bbe1baf66cf /llvm/test/CodeGen/X86 | |
| parent | 3e2aa7f40ed5901abe7117c7462a7550c1b043c8 (diff) | |
| download | bcm5719-llvm-a4c354951bd8c998294110e92e18d65e5ce363d4.tar.gz bcm5719-llvm-a4c354951bd8c998294110e92e18d65e5ce363d4.zip | |
Add reproducer test for pr32449. NFC.
llvm-svn: 298930
Diffstat (limited to 'llvm/test/CodeGen/X86')
| -rw-r--r-- | llvm/test/CodeGen/X86/shuffle-of-splat-multiuses.ll | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/X86/shuffle-of-splat-multiuses.ll b/llvm/test/CodeGen/X86/shuffle-of-splat-multiuses.ll new file mode 100644 index 00000000000..38d45ca99eb --- /dev/null +++ b/llvm/test/CodeGen/X86/shuffle-of-splat-multiuses.ll @@ -0,0 +1,44 @@ +; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py +; RUN: llc < %s -mtriple=x86_64-unknown -mattr=+avx2 | FileCheck %s --check-prefix=AVX2 +; PR32449 + +define <2 x double> @foo2(<2 x double> %v, <2 x double> *%p) nounwind { +; AVX2-LABEL: foo2: +; AVX2: # BB#0: +; AVX2-NEXT: vpermilpd {{.*#+}} xmm1 = xmm0[1,1] +; AVX2-NEXT: vpermilpd {{.*#+}} xmm0 = xmm1[1,0] +; AVX2-NEXT: vmovapd %xmm1, (%rdi) +; AVX2-NEXT: retq + %res = shufflevector <2 x double> %v, <2 x double> undef, <2 x i32> <i32 1, i32 1> + %res1 = shufflevector<2 x double> %res, <2 x double> undef, <2 x i32> <i32 1, i32 undef> + store <2 x double> %res, <2 x double>* %p + ret <2 x double> %res1 +} + +define <4 x double> @foo4(<4 x double> %v, <4 x double> *%p) nounwind { +; AVX2-LABEL: foo4: +; AVX2: # BB#0: +; AVX2-NEXT: vpermpd {{.*#+}} ymm1 = ymm0[2,2,2,2] +; AVX2-NEXT: vpermpd {{.*#+}} ymm0 = ymm1[2,0,2,3] +; AVX2-NEXT: vmovapd %ymm1, (%rdi) +; AVX2-NEXT: retq + %res = shufflevector <4 x double> %v, <4 x double> undef, <4 x i32> <i32 2, i32 2, i32 2, i32 2> + %res1 = shufflevector<4 x double> %res, <4 x double> undef, <4 x i32> <i32 2, i32 0, i32 undef, i32 undef> + store <4 x double> %res, <4 x double>* %p + ret <4 x double> %res1 +} + +define <8 x float> @foo8(<8 x float> %v, <8 x float> *%p) nounwind { +; AVX2-LABEL: foo8: +; AVX2: # BB#0: +; AVX2-NEXT: vmovshdup {{.*#+}} ymm0 = ymm0[1,1,3,3,5,5,7,7] +; AVX2-NEXT: vpermpd {{.*#+}} ymm1 = ymm0[2,2,2,2] +; AVX2-NEXT: vmovaps {{.*#+}} ymm0 = <2,0,u,u,5,1,3,7> +; AVX2-NEXT: vpermps %ymm1, %ymm0, %ymm0 +; AVX2-NEXT: vmovapd %ymm1, (%rdi) +; AVX2-NEXT: retq + %res = shufflevector <8 x float> %v, <8 x float> undef, <8 x i32> <i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5> + %res1 = shufflevector<8 x float> %res, <8 x float> undef, <8 x i32> <i32 2, i32 0, i32 undef, i32 undef, i32 5, i32 1, i32 3, i32 7> + store <8 x float> %res, <8 x float>* %p + ret <8 x float> %res1 +} |

