From: Chris Lattner Date: Wed, 19 Jan 2005 16:55:52 +0000 (+0000) Subject: When commuting these instructions, make sure to actually swap the operands too. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=a76f04828ab32c70d2358fec18e4dd941d281c4e;p=oota-llvm.git 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 --- diff --git a/lib/Target/X86/X86InstrInfo.cpp b/lib/Target/X86/X86InstrInfo.cpp index a402a382c86..35782a48f03 100644 --- a/lib/Target/X86/X86InstrInfo.cpp +++ b/lib/Target/X86/X86InstrInfo.cpp @@ -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);