diff options
| author | Chandler Carruth <chandlerc@gmail.com> | 2014-09-30 02:32:36 +0000 |
|---|---|---|
| committer | Chandler Carruth <chandlerc@gmail.com> | 2014-09-30 02:32:36 +0000 |
| commit | 964747adcfb8b8f6b63d819981b9234bcef71898 (patch) | |
| tree | da804175a32a77fa10aafb39bd44b361b554713f | |
| parent | 2a057f872d1bf8733d30178c9a6b32db300b44d3 (diff) | |
| download | bcm5719-llvm-964747adcfb8b8f6b63d819981b9234bcef71898.tar.gz bcm5719-llvm-964747adcfb8b8f6b63d819981b9234bcef71898.zip | |
[x86] Add some vector-register broadcast operations to the 256-bit v4
tests which were missing them.
llvm-svn: 218657
| -rw-r--r-- | llvm/test/CodeGen/X86/vector-shuffle-256-v4.ll | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/X86/vector-shuffle-256-v4.ll b/llvm/test/CodeGen/X86/vector-shuffle-256-v4.ll index b7cfa0b1dab..717c7cddba7 100644 --- a/llvm/test/CodeGen/X86/vector-shuffle-256-v4.ll +++ b/llvm/test/CodeGen/X86/vector-shuffle-256-v4.ll @@ -3,6 +3,21 @@ target triple = "x86_64-unknown-unknown" +define <4 x double> @shuffle_v4f64_0000(<4 x double> %a, <4 x double> %b) { +; AVX1-LABEL: @shuffle_v4f64_0000 +; AVX1: # BB#0: +; AVX1-NEXT: vunpcklpd {{.*}} # xmm0 = xmm0[0,0] +; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm0, %ymm0 +; AVX1-NEXT: retq +; +; AVX2-LABEL: @shuffle_v4f64_0000 +; AVX2: # BB#0: +; AVX2-NEXT: vpermpd {{.*}} # ymm0 = ymm0[0,0,0,0] +; AVX2-NEXT: retq + %shuffle = shufflevector <4 x double> %a, <4 x double> %b, <4 x i32> <i32 0, i32 0, i32 0, i32 0> + ret <4 x double> %shuffle +} + define <4 x double> @shuffle_v4f64_0001(<4 x double> %a, <4 x double> %b) { ; AVX1-LABEL: @shuffle_v4f64_0001 ; AVX1: # BB#0: @@ -293,6 +308,21 @@ define <4 x double> @shuffle_v4f64_0167(<4 x double> %a, <4 x double> %b) { ret <4 x double> %shuffle } +define <4 x i64> @shuffle_v4i64_0000(<4 x i64> %a, <4 x i64> %b) { +; AVX1-LABEL: @shuffle_v4i64_0000 +; AVX1: # BB#0: +; AVX1-NEXT: vunpcklpd {{.*}} # xmm0 = xmm0[0,0] +; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm0, %ymm0 +; AVX1-NEXT: retq +; +; AVX2-LABEL: @shuffle_v4i64_0000 +; AVX2: # BB#0: +; AVX2-NEXT: vpermq {{.*}} # ymm0 = ymm0[0,0,0,0] +; AVX2-NEXT: retq + %shuffle = shufflevector <4 x i64> %a, <4 x i64> %b, <4 x i32> <i32 0, i32 0, i32 0, i32 0> + ret <4 x i64> %shuffle +} + define <4 x i64> @shuffle_v4i64_0001(<4 x i64> %a, <4 x i64> %b) { ; AVX1-LABEL: @shuffle_v4i64_0001 ; AVX1: # BB#0: |

