aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/X86/FloatingPoint.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Target/X86/FloatingPoint.cpp')
-rw-r--r--lib/Target/X86/FloatingPoint.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Target/X86/FloatingPoint.cpp b/lib/Target/X86/FloatingPoint.cpp
index ab6d77b77d..a56e071cf1 100644
--- a/lib/Target/X86/FloatingPoint.cpp
+++ b/lib/Target/X86/FloatingPoint.cpp
@@ -638,6 +638,9 @@ void FPS::handleCompareFP(MachineBasicBlock::iterator &I) {
// anywhere.
moveToTop(Op0, I);
+ MI->getOperand(0).setReg(getSTReg(Op1));
+ MI->RemoveOperand(1);
+
// If any of the operands are killed by this instruction, free them.
if (KillsOp0) freeStackSlotAfter(I, Op0);
if (KillsOp1 && Op0 != Op1) freeStackSlotAfter(I, Op1);