diff options
| author | Chris Lattner <sabre@nondot.org> | 2008-03-09 01:08:22 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2008-03-09 01:08:22 +0000 |
| commit | 93930dc28c9a751a95a1c181b26e66bad91b372e (patch) | |
| tree | 44eff3c649c1d7d141189f8c9de5c664c733c7d5 /llvm | |
| parent | eef374c197710ef86fd03fbcd2c586819067d77b (diff) | |
| download | bcm5719-llvm-93930dc28c9a751a95a1c181b26e66bad91b372e.tar.gz bcm5719-llvm-93930dc28c9a751a95a1c181b26e66bad91b372e.zip | |
add a note
llvm-svn: 48064
Diffstat (limited to 'llvm')
| -rw-r--r-- | llvm/lib/Target/X86/README-SSE.txt | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/llvm/lib/Target/X86/README-SSE.txt b/llvm/lib/Target/X86/README-SSE.txt index 4ec5a5ac4b9..7087c681737 100644 --- a/llvm/lib/Target/X86/README-SSE.txt +++ b/llvm/lib/Target/X86/README-SSE.txt @@ -782,3 +782,40 @@ just a matter of matching (scalar_to_vector (load x)) to movd. //===---------------------------------------------------------------------===// +These two functions should compile to identical code on x86-32: + +define <2 x i64> @test2(i64 %arg) { +entry: + %A = and i64 %arg, 1234567 + %B = insertelement <2 x i64> undef, i64 %A, i32 0 + ret <2 x i64> %B +} + +define <2 x i64> @test2(i64 %arg) { +entry: + %A = and i64 %arg, 1234567 + %B = insertelement <2 x i64> zeroinitializer, i64 %A, i32 0 + ret <2 x i64> %B +} + +The later compiles to: + +_test2: + movl $1234567, %eax + andl 4(%esp), %eax + movd %eax, %xmm0 + ret + +the former compiles to: + +_test2: + subl $28, %esp + movl $1234567, %eax + andl 32(%esp), %eax + movl %eax, (%esp) + movl $0, 4(%esp) + movaps (%esp), %xmm0 + addl $28, %esp + ret + +//===---------------------------------------------------------------------===// |

