diff options
-rw-r--r-- | lib/Target/X86/FloatingPoint.cpp | 3 | ||||
-rw-r--r-- | lib/Target/X86/X86FloatingPoint.cpp | 3 |
2 files changed, 6 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); diff --git a/lib/Target/X86/X86FloatingPoint.cpp b/lib/Target/X86/X86FloatingPoint.cpp index ab6d77b77d..a56e071cf1 100644 --- a/lib/Target/X86/X86FloatingPoint.cpp +++ b/lib/Target/X86/X86FloatingPoint.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); |