From c30a5558f26dc6b29902c320d781bb8faaaf6316 Mon Sep 17 00:00:00 2001 From: Evan Cheng Date: Fri, 12 May 2006 01:46:26 +0000 Subject: [PATCH] Typo! How did we commute nodes before?! llvm-svn: 28229 --- llvm/lib/Target/TargetInstrInfo.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm/lib/Target/TargetInstrInfo.cpp b/llvm/lib/Target/TargetInstrInfo.cpp index 6377de88655b..4346203d9176 100644 --- a/llvm/lib/Target/TargetInstrInfo.cpp +++ b/llvm/lib/Target/TargetInstrInfo.cpp @@ -45,7 +45,7 @@ MachineInstr *TargetInstrInfo::commuteInstruction(MachineInstr *MI) const { assert(MI->getOperand(1).isRegister() && MI->getOperand(2).isRegister() && "This only knows how to commute register operands so far"); unsigned Reg1 = MI->getOperand(1).getReg(); - unsigned Reg2 = MI->getOperand(1).getReg(); + unsigned Reg2 = MI->getOperand(2).getReg(); MI->getOperand(2).setReg(Reg1); MI->getOperand(1).setReg(Reg2); return MI;