From: Chris Lattner Date: Tue, 5 Sep 2006 20:27:32 +0000 (+0000) Subject: Bugfix to work with the two-addr changes that have been made in the tree recently X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=6cdb1ea610c2d802696da55c55bf73c44202a2db;p=oota-llvm.git 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 --- diff --git a/lib/Target/X86/X86FloatingPoint.cpp b/lib/Target/X86/X86FloatingPoint.cpp index cd32ef5e02f..832e09a53c9 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()));