From: Sam Parker Date: Thu, 10 Jan 2019 10:47:23 +0000 (+0000) Subject: [ARM] Fix for verifier buildbot X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=322f6c9d898e7f0aa2a319c4be68581c9308ac21;p=llvm [ARM] Fix for verifier buildbot Copy the MachineOperand first and then change the flags instead of making a copy. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350811 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/ARM/Thumb2SizeReduction.cpp b/lib/Target/ARM/Thumb2SizeReduction.cpp index 7dcd1c7cfdd..65889fc4e28 100644 --- a/lib/Target/ARM/Thumb2SizeReduction.cpp +++ b/lib/Target/ARM/Thumb2SizeReduction.cpp @@ -919,11 +919,11 @@ Thumb2SizeReduce::ReduceToNarrow(MachineBasicBlock &MBB, MachineInstr *MI, // it into an EOR which does. So add the first operand as a def and then // again as a use. if (MCID.getOpcode() == ARM::t2TEQrr) { - MachineOperand MO = MI->getOperand(0); - MO.setIsKill(false); - MO.setIsDef(true); - MO.setIsDead(true); - MIB.add(MO); + MIB.add(MI->getOperand(0)); + MIB->getOperand(0).setIsKill(false); + MIB->getOperand(0).setIsDef(true); + MIB->getOperand(0).setIsDead(true); + if (NewMCID.hasOptionalDef()) MIB.add(HasCC ? t1CondCodeOp(CCDead) : condCodeOp()); MIB.add(MI->getOperand(0));