aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/TargetInstrInfo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Target/TargetInstrInfo.cpp')
-rw-r--r--lib/Target/TargetInstrInfo.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Target/TargetInstrInfo.cpp b/lib/Target/TargetInstrInfo.cpp
index 60dd28c..6377de8 100644
--- a/lib/Target/TargetInstrInfo.cpp
+++ b/lib/Target/TargetInstrInfo.cpp
@@ -46,7 +46,7 @@ MachineInstr *TargetInstrInfo::commuteInstruction(MachineInstr *MI) const {
"This only knows how to commute register operands so far");
unsigned Reg1 = MI->getOperand(1).getReg();
unsigned Reg2 = MI->getOperand(1).getReg();
- MI->SetMachineOperandReg(2, Reg1);
- MI->SetMachineOperandReg(1, Reg2);
+ MI->getOperand(2).setReg(Reg1);
+ MI->getOperand(1).setReg(Reg2);
return MI;
}