diff options
author | Chris Lattner <sabre@nondot.org> | 2008-03-08 23:43:36 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2008-03-08 23:43:36 +0000 |
commit | a1f25b0020ade9291dc393424389a665180ddd25 (patch) | |
tree | ff904dd2f68dd36b0cfe9fd60bdd007319e25b0d /llvm/test | |
parent | ad58828354e97fdea2124eb02ffe1ae80e9e8b34 (diff) | |
download | bcm5719-llvm-a1f25b0020ade9291dc393424389a665180ddd25.tar.gz bcm5719-llvm-a1f25b0020ade9291dc393424389a665180ddd25.zip |
Teach SD some vector identities, allowing us to compile vec_set-9 into:
_test3:
movd %rdi, %xmm1
#IMPLICIT_DEF %xmm0
punpcklqdq %xmm1, %xmm0
ret
instead of:
_test3:
#IMPLICIT_DEF %rax
movd %rax, %xmm0
movd %rdi, %xmm1
punpcklqdq %xmm1, %xmm0
ret
This is still not ideal. There is no reason to two xmm regs.
llvm-svn: 48058
Diffstat (limited to 'llvm/test')
-rw-r--r-- | llvm/test/CodeGen/X86/vec_set-9.ll | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/X86/vec_set-9.ll b/llvm/test/CodeGen/X86/vec_set-9.ll new file mode 100644 index 00000000000..d00ceff5404 --- /dev/null +++ b/llvm/test/CodeGen/X86/vec_set-9.ll @@ -0,0 +1,8 @@ +; RUN: llvm-as < %s | llc -march=x86-64 | grep movd | count 1 + +define <2 x i64> @test3(i64 %A) { +entry: + %B = insertelement <2 x i64> undef, i64 %A, i32 1 + ret <2 x i64> %B +} + |