Reset isUndef when removing subreg from a def operand

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279437 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Krzysztof Parzyszek 2016-08-22 14:50:12 +00:00
parent 82a414cf29
commit b24532b4e0

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.
// That won't happen in legal code.
setSubReg(0);
if (isDef())
setIsUndef(false);
}
setReg(Reg);
}