Reset isUndef when removing subreg from a def operand
authorKrzysztof Parzyszek <kparzysz@codeaurora.org>
Mon, 22 Aug 2016 14:50:12 +0000 (14:50 +0000)
committerKrzysztof Parzyszek <kparzysz@codeaurora.org>
Mon, 22 Aug 2016 14:50:12 +0000 (14:50 +0000)
llvm-svn: 279437

llvm/lib/CodeGen/MachineInstr.cpp

index f860bac..12081a9 100644 (file)
@@ -93,6 +93,8 @@ void MachineOperand::substPhysReg(unsigned Reg, const TargetRegisterInfo &TRI) {
     // Note that getSubReg() may return 0 if the sub-register doesn't exist.
     // That won't happen in legal code.
     setSubReg(0);
+    if (isDef())
+      setIsUndef(false);
   }
   setReg(Reg);
 }