diff options
-rw-r--r-- | lib/Target/ARM/NEONMoveFix.cpp | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/lib/Target/ARM/NEONMoveFix.cpp b/lib/Target/ARM/NEONMoveFix.cpp index bd8c882afe..843534b08d 100644 --- a/lib/Target/ARM/NEONMoveFix.cpp +++ b/lib/Target/ARM/NEONMoveFix.cpp @@ -40,8 +40,6 @@ namespace { typedef DenseMap<unsigned, const MachineInstr*> RegMap; bool InsertMoves(MachineBasicBlock &MBB); - - void TransferImpOps(MachineInstr &Old, MachineInstr &New); }; char NEONMoveFixPass::ID = 0; } @@ -51,16 +49,6 @@ static bool inNEONDomain(unsigned Domain, bool isA8) { (isA8 && (Domain & ARMII::DomainNEONA8)); } -/// Transfer implicit kill and def operands from Old to New. -void NEONMoveFixPass::TransferImpOps(MachineInstr &Old, MachineInstr &New) { - for (unsigned i = 0, e = Old.getNumOperands(); i != e; ++i) { - MachineOperand &MO = Old.getOperand(i); - if (!MO.isReg() || !MO.isImplicit()) - continue; - New.addOperand(MO); - } -} - bool NEONMoveFixPass::InsertMoves(MachineBasicBlock &MBB) { RegMap Defs; bool Modified = false; @@ -100,7 +88,7 @@ bool NEONMoveFixPass::InsertMoves(MachineBasicBlock &MBB) { AddDefaultPred(BuildMI(MBB, *MI, MI->getDebugLoc(), TII->get(ARM::VORRd), DestReg) .addReg(SrcReg).addReg(SrcReg)); - TransferImpOps(*MI, *NewMI); + NewMI->copyImplicitOps(MI); MBB.erase(MI); MI = NewMI; |