[WinEH] Add 32-bit SEH state table emission prototype
[oota-llvm.git] / lib / CodeGen / TailDuplication.cpp
index 04b39922627e034c03bdde038601312c932fcd1b..23f41c8dd4bd3112b19a0b75664c3b5f942c5d4d 100644 (file)
@@ -449,6 +449,9 @@ void TailDuplicatePass::DuplicateInstruction(MachineInstr *MI,
       DenseMap<unsigned, unsigned>::iterator VI = LocalVRMap.find(Reg);
       if (VI != LocalVRMap.end()) {
         MO.setReg(VI->second);
+        // Clear any kill flags from this operand.  The new register could have
+        // uses after this one, so kills are not valid here.
+        MO.setIsKill(false);
         MRI->constrainRegClass(VI->second, MRI->getRegClass(Reg));
       }
     }