[llvm-commits] [llvm] r170795 - /llvm/trunk/lib/Target/ARM/ARMBaseInstrInfo.cpp
Jakob Stoklund Olesen
stoklund at 2pi.dk
Thu Dec 20 14:53:55 PST 2012
Author: stoklund
Date: Thu Dec 20 16:53:55 2012
New Revision: 170795
URL: http://llvm.org/viewvc/llvm-project?rev=170795&view=rev
Log:
MachineInstrBuilderize ARM.
Modified:
llvm/trunk/lib/Target/ARM/ARMBaseInstrInfo.cpp
Modified: llvm/trunk/lib/Target/ARM/ARMBaseInstrInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMBaseInstrInfo.cpp?rev=170795&r1=170794&r2=170795&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMBaseInstrInfo.cpp (original)
+++ llvm/trunk/lib/Target/ARM/ARMBaseInstrInfo.cpp Thu Dec 20 16:53:55 2012
@@ -464,8 +464,9 @@
unsigned Opc = MI->getOpcode();
if (isUncondBranchOpcode(Opc)) {
MI->setDesc(get(getMatchingCondBranchOpcode(Opc)));
- MI->addOperand(MachineOperand::CreateImm(Pred[0].getImm()));
- MI->addOperand(MachineOperand::CreateReg(Pred[1].getReg(), false));
+ MachineInstrBuilder(*MI->getParent()->getParent(), MI)
+ .addImm(Pred[0].getImm())
+ .addReg(Pred[1].getReg());
return true;
}
@@ -1717,7 +1718,7 @@
// same register as operand 0.
MachineOperand FalseReg = MI->getOperand(Invert ? 2 : 1);
FalseReg.setImplicit();
- NewMI->addOperand(FalseReg);
+ NewMI.addOperand(FalseReg);
NewMI->tieOperands(0, NewMI->getNumOperands() - 1);
// The caller will erase MI, but not DefMI.
More information about the llvm-commits
mailing list