diff options
| author | Filipe Cabecinhas <me@filcab.net> | 2014-05-05 19:36:28 +0000 |
|---|---|---|
| committer | Filipe Cabecinhas <me@filcab.net> | 2014-05-05 19:36:28 +0000 |
| commit | 263d98c19f97cc06154613d5ab92d137edc4659f (patch) | |
| tree | 360d65df7592ed75075370c4a275449d7e8729dd /llvm/test | |
| parent | c67b8152173d25d9eff86958a4ac51ca6701b082 (diff) | |
| download | bcm5719-llvm-263d98c19f97cc06154613d5ab92d137edc4659f.tar.gz bcm5719-llvm-263d98c19f97cc06154613d5ab92d137edc4659f.zip | |
Optimize shufflevector that copies an i64/f64 and zeros the rest.
Summary:
Also ran clang-format on the function. The code added is the last else
if block.
Reviewers: nadav, craig.topper
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D3518
llvm-svn: 207992
Diffstat (limited to 'llvm/test')
| -rw-r--r-- | llvm/test/CodeGen/X86/avx-shuffle.ll | 8 | ||||
| -rw-r--r-- | llvm/test/CodeGen/X86/sse2.ll | 8 |
2 files changed, 16 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/X86/avx-shuffle.ll b/llvm/test/CodeGen/X86/avx-shuffle.ll index 02aa617c56c..e472042b2ce 100644 --- a/llvm/test/CodeGen/X86/avx-shuffle.ll +++ b/llvm/test/CodeGen/X86/avx-shuffle.ll @@ -306,3 +306,11 @@ define void @test20() { store <3 x double> %a1, <3 x double>* undef, align 1 ret void } + +define <2 x i64> @test_insert_64_zext(<2 x i64> %i) { +; CHECK-LABEL: test_insert_64_zext +; CHECK-NOT: xor +; CHECK: vmovq + %1 = shufflevector <2 x i64> %i, <2 x i64> <i64 0, i64 undef>, <2 x i32> <i32 0, i32 2> + ret <2 x i64> %1 +} diff --git a/llvm/test/CodeGen/X86/sse2.ll b/llvm/test/CodeGen/X86/sse2.ll index 628dba0b101..0a17eaca411 100644 --- a/llvm/test/CodeGen/X86/sse2.ll +++ b/llvm/test/CodeGen/X86/sse2.ll @@ -221,3 +221,11 @@ entry: %double2float.i = fptrunc <4 x double> %0 to <4 x float> ret <4 x float> %double2float.i } + +define <2 x i64> @test_insert_64_zext(<2 x i64> %i) { +; CHECK-LABEL: test_insert_64_zext +; CHECK-NOT: xor +; CHECK: movq + %1 = shufflevector <2 x i64> %i, <2 x i64> <i64 0, i64 undef>, <2 x i32> <i32 0, i32 2> + ret <2 x i64> %1 +} |

