diff options
| author | Chris Lattner <sabre@nondot.org> | 2008-01-16 05:56:59 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2008-01-16 05:56:59 +0000 |
| commit | 8f7cec859e8960a361165a323a3e5f6d44f012ba (patch) | |
| tree | ed4d31e596ef0905d14d06e4464d0286c2cd1501 /llvm/lib | |
| parent | ea001f1db7c78d469a0e6adec539d7e1b0638e65 (diff) | |
| download | bcm5719-llvm-8f7cec859e8960a361165a323a3e5f6d44f012ba.tar.gz bcm5719-llvm-8f7cec859e8960a361165a323a3e5f6d44f012ba.zip | |
My previous commit had an incomplete message, it should have been:
make the 'fp return in ST(0)' optimization smart enough to
look through token factor nodes. THis allows us to compile
testcases like CodeGen/X86/fp-stack-retcopy.ll into:
_carg:
subl $12, %esp
call L_foo$stub
fstpl (%esp)
fldl (%esp)
addl $12, %esp
ret
instead of:
_carg:
subl $28, %esp
call L_foo$stub
fstpl 16(%esp)
movsd 16(%esp), %xmm0
movsd %xmm0, 8(%esp)
fldl 8(%esp)
addl $28, %esp
ret
Still not optimal, but much better and this is a trivial patch. Fixing
the rest requires invasive surgery that is is not llvm 2.2 material.
llvm-svn: 46054
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/Target/X86/X86ISelLowering.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp index eb8e5e38320..de55a7c6f4b 100644 --- a/llvm/lib/Target/X86/X86ISelLowering.cpp +++ b/llvm/lib/Target/X86/X86ISelLowering.cpp @@ -767,7 +767,7 @@ SDOperand X86TargetLowering::LowerRET(SDOperand Op, SelectionDAG &DAG) { // If this is a load into a scalarsse value, don't store the loaded value // back to the stack, only to reload it: just replace the scalar-sse load. if (ISD::isNON_EXTLoad(Value.Val) && - Chain.reachesChainWithoutSideEffects(Value.getOperand(0))) { + Chain.reachesChainWithoutSideEffects(Value.getOperand(0))) { Chain = Value.getOperand(0); MemLoc = Value.getOperand(1); } else { |

