diff options
-rw-r--r-- | lib/Target/X86/X86ISelLowering.cpp | 2 | ||||
-rw-r--r-- | test/CodeGen/X86/fp-stack-retcopy.ll | 12 |
2 files changed, 13 insertions, 1 deletions
diff --git a/lib/Target/X86/X86ISelLowering.cpp b/lib/Target/X86/X86ISelLowering.cpp index eb8e5e3..de55a7c 100644 --- a/lib/Target/X86/X86ISelLowering.cpp +++ b/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 { diff --git a/test/CodeGen/X86/fp-stack-retcopy.ll b/test/CodeGen/X86/fp-stack-retcopy.ll new file mode 100644 index 0000000..997f8df --- /dev/null +++ b/test/CodeGen/X86/fp-stack-retcopy.ll @@ -0,0 +1,12 @@ +; This should not copy the result of foo into an xmm register. +; RUN: llvm-as < %s | llc -march=x86 -mcpu=yonah -mtriple=i686-apple-darwin9 | not grep xmm +; rdar://5689903 + +declare double @foo() + +define double @carg({ double, double }* byval %z) nounwind { +entry: + %tmp5 = tail call double @foo() nounwind ; <double> [#uses=1] + ret double %tmp5 +} + |