From 673b347e5a4aa8ca382dfb38e0cc3e9ead6c68fe Mon Sep 17 00:00:00 2001 From: Krzysztof Parzyszek Date: Mon, 22 Aug 2016 14:50:12 +0000 Subject: [PATCH] Reset isUndef when removing subreg from a def operand llvm-svn: 279437 --- llvm/lib/CodeGen/MachineInstr.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/llvm/lib/CodeGen/MachineInstr.cpp b/llvm/lib/CodeGen/MachineInstr.cpp index f860bac21696..12081a9fa90f 100644 --- a/llvm/lib/CodeGen/MachineInstr.cpp +++ b/llvm/lib/CodeGen/MachineInstr.cpp @@ -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); }