diff options
author | Chris Lattner <sabre@nondot.org> | 2008-02-27 05:57:41 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2008-02-27 05:57:41 +0000 |
commit | b09916bdfbd7ffdc8fbadb5ee0c0b50567823f46 (patch) | |
tree | 82b26d049ca1b0873011990f2b19c852a663bf65 /lib/Target/X86/README-X86-64.txt | |
parent | 22eedf4eec990f90988af819c034787019440cbd (diff) | |
download | llvm-b09916bdfbd7ffdc8fbadb5ee0c0b50567823f46.tar.gz llvm-b09916bdfbd7ffdc8fbadb5ee0c0b50567823f46.tar.bz2 llvm-b09916bdfbd7ffdc8fbadb5ee0c0b50567823f46.tar.xz |
Make X86TargetLowering::LowerSINT_TO_FP return without creating a dead
stack slot and store if the SINT_TO_FP is actually legal. This allows
us to compile:
double a(double b) {return (unsigned)b;}
to:
_a:
cvttsd2siq %xmm0, %rax
movl %eax, %eax
cvtsi2sdq %rax, %xmm0
ret
instead of:
_a:
subq $8, %rsp
cvttsd2siq %xmm0, %rax
movl %eax, %eax
cvtsi2sdq %rax, %xmm0
addq $8, %rsp
ret
crazy.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47660 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86/README-X86-64.txt')
-rw-r--r-- | lib/Target/X86/README-X86-64.txt | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/lib/Target/X86/README-X86-64.txt b/lib/Target/X86/README-X86-64.txt index efe3b73da5..359b83d01a 100644 --- a/lib/Target/X86/README-X86-64.txt +++ b/lib/Target/X86/README-X86-64.txt @@ -236,18 +236,3 @@ on the result of the movb). //===---------------------------------------------------------------------===// -This function: -double a(double b) {return (unsigned)b;} -compiles to this code: - -_a: - subq $8, %rsp - cvttsd2siq %xmm0, %rax - movl %eax, %eax - cvtsi2sdq %rax, %xmm0 - addq $8, %rsp - ret - -note the dead rsp adjustments. - -//===---------------------------------------------------------------------===// |