]> granicus.if.org Git - llvm/commitdiff
[ARM] Fix for verifier buildbot
authorSam Parker <sam.parker@arm.com>
Thu, 10 Jan 2019 10:47:23 +0000 (10:47 +0000)
committerSam Parker <sam.parker@arm.com>
Thu, 10 Jan 2019 10:47:23 +0000 (10:47 +0000)
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

lib/Target/ARM/Thumb2SizeReduction.cpp

index 7dcd1c7cfdd6ec86e7a489275f8712f554975708..65889fc4e28b97ec6f440afcd3387fdab2490cbc 100644 (file)
@@ -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));