diff options
author | Chris Lattner <sabre@nondot.org> | 2008-09-20 19:17:53 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2008-09-20 19:17:53 +0000 |
commit | 9a8eb0d534cd04b8ba8b47396b93699c56c9f53c (patch) | |
tree | f6ab4e438954b9de1bc5a8005ebdc3b724a52dca /llvm/lib/Target | |
parent | b074a21b0898ec41178d9b293e784c4f7ebefcfc (diff) | |
download | bcm5719-llvm-9a8eb0d534cd04b8ba8b47396b93699c56c9f53c.tar.gz bcm5719-llvm-9a8eb0d534cd04b8ba8b47396b93699c56c9f53c.zip |
add a note
llvm-svn: 56391
Diffstat (limited to 'llvm/lib/Target')
-rw-r--r-- | llvm/lib/Target/X86/README-SSE.txt | 33 |
1 files changed, 32 insertions, 1 deletions
diff --git a/llvm/lib/Target/X86/README-SSE.txt b/llvm/lib/Target/X86/README-SSE.txt index 7c4bf37e34d..7110b314871 100644 --- a/llvm/lib/Target/X86/README-SSE.txt +++ b/llvm/lib/Target/X86/README-SSE.txt @@ -17,7 +17,7 @@ other fast SSE modes. //===---------------------------------------------------------------------===// -Think about doing i64 math in SSE regs. +Think about doing i64 math in SSE regs on x86-32. //===---------------------------------------------------------------------===// @@ -876,3 +876,34 @@ orpd %xmm1, %xmm0 // 2^52 + x in double precision subsd %xmm1, %xmm0 // x in double precision cvtsd2ss %xmm0, %xmm0 // x in single precision +//===---------------------------------------------------------------------===// +rdar://5907648 + +This function: + +float foo(unsigned char x) { + return x; +} + +compiles to (x86-32): + +define float @foo(i8 zeroext %x) nounwind { + %tmp12 = uitofp i8 %x to float ; <float> [#uses=1] + ret float %tmp12 +} + +compiles to: + +_foo: + subl $4, %esp + movzbl 8(%esp), %eax + cvtsi2ss %eax, %xmm0 + movss %xmm0, (%esp) + flds (%esp) + addl $4, %esp + ret + +We should be able to use: + cvtsi2ss 8($esp), %xmm0 +since we know the stack slot is already zext'd. + |