When commuting these instructions, make sure to actually swap the operands too.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19694 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2005-01-19 16:55:52 +00:00
parent 7d719c3cd8
commit a76f04828a

View File

@ -143,7 +143,7 @@ MachineInstr *X86InstrInfo::commuteInstruction(MachineInstr *MI) const {
unsigned A = MI->getOperand(0).getReg();
unsigned B = MI->getOperand(1).getReg();
unsigned C = MI->getOperand(2).getReg();
return BuildMI(Opc, 3, A).addReg(B).addReg(C).addImm(Size-Amt);
return BuildMI(Opc, 3, A).addReg(C).addReg(B).addImm(Size-Amt);
}
default:
return TargetInstrInfo::commuteInstruction(MI);