aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-09-05 20:27:32 +0000
committerChris Lattner <sabre@nondot.org>2006-09-05 20:27:32 +0000
commit6cdb1ea610c2d802696da55c55bf73c44202a2db (patch)
treeb9ebf1c0bd258ae0fe20e3d666e1d2b8def948ce
parentc39d19449971c9313cfa65155a530c158002652f (diff)
Bugfix to work with the two-addr changes that have been made in the tree recently
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30121 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Target/X86/X86FloatingPoint.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Target/X86/X86FloatingPoint.cpp b/lib/Target/X86/X86FloatingPoint.cpp
index cd32ef5e02..832e09a53c 100644
--- a/lib/Target/X86/X86FloatingPoint.cpp
+++ b/lib/Target/X86/X86FloatingPoint.cpp
@@ -752,7 +752,7 @@ void FPS::handleCondMovFP(MachineBasicBlock::iterator &I) {
MachineInstr *MI = I;
unsigned Op0 = getFPReg(MI->getOperand(0));
- unsigned Op1 = getFPReg(MI->getOperand(1));
+ unsigned Op1 = getFPReg(MI->getOperand(2));
// The first operand *must* be on the top of the stack.
moveToTop(Op0, I);
@@ -760,6 +760,7 @@ void FPS::handleCondMovFP(MachineBasicBlock::iterator &I) {
// Change the second operand to the stack register that the operand is in.
// Change from the pseudo instruction to the concrete instruction.
MI->RemoveOperand(0);
+ MI->RemoveOperand(1);
MI->getOperand(0).setReg(getSTReg(Op1));
MI->setOpcode(getConcreteOpcode(MI->getOpcode()));