Reset isUndef when removing subreg from a def operand

llvm-svn: 279437
This commit is contained in:
Krzysztof Parzyszek 2016-08-22 14:50:12 +00:00
parent ed87d788d6
commit 673b347e5a
1 changed files with 2 additions and 0 deletions

View 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. // Note that getSubReg() may return 0 if the sub-register doesn't exist.
// That won't happen in legal code. // That won't happen in legal code.
setSubReg(0); setSubReg(0);
if (isDef())
setIsUndef(false);
} }
setReg(Reg); setReg(Reg);
} }