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 | 89c283fce3031e9231156d5d33a03f4377ce99c0 (patch) | |
tree | 1122fb317c479e0e029b933609bef68dcde43c01 /lib/Target/X86/README-SSE.txt | |
parent | f0d88cf8847b7a8093570ba551b8cc65be49d87b (diff) | |
download | external_llvm-89c283fce3031e9231156d5d33a03f4377ce99c0.zip external_llvm-89c283fce3031e9231156d5d33a03f4377ce99c0.tar.gz external_llvm-89c283fce3031e9231156d5d33a03f4377ce99c0.tar.bz2 |
add a note
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56391 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86/README-SSE.txt')
-rw-r--r-- | lib/Target/X86/README-SSE.txt | 33 |
1 files changed, 32 insertions, 1 deletions
diff --git a/lib/Target/X86/README-SSE.txt b/lib/Target/X86/README-SSE.txt index 7c4bf37..7110b31 100644 --- a/lib/Target/X86/README-SSE.txt +++ b/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. + |