diff options
author | Lang Hames <lhames@gmail.com> | 2009-11-16 02:07:31 +0000 |
---|---|---|
committer | Lang Hames <lhames@gmail.com> | 2009-11-16 02:07:31 +0000 |
commit | 79ac32de3bdaf8da2213945c808f6ec26cf2a7fa (patch) | |
tree | c137911e20c5fd4ab6b88caf7dc7af7c780b9f0c /lib/CodeGen/ProcessImplicitDefs.cpp | |
parent | b126d0530d48890e1689975483b9f923a0fca1da (diff) | |
download | llvm-79ac32de3bdaf8da2213945c808f6ec26cf2a7fa.tar.gz llvm-79ac32de3bdaf8da2213945c808f6ec26cf2a7fa.tar.bz2 llvm-79ac32de3bdaf8da2213945c808f6ec26cf2a7fa.tar.xz |
Fixes the bug exposed by Anton's test case in PR 5495:
Make sure when ProcessImplicitDefs removes a copy which kills its source reg that it
removes the copy from said reg's Kills list.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88881 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/ProcessImplicitDefs.cpp')
-rw-r--r-- | lib/CodeGen/ProcessImplicitDefs.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/CodeGen/ProcessImplicitDefs.cpp b/lib/CodeGen/ProcessImplicitDefs.cpp index 48567a0fc7..23b78c7438 100644 --- a/lib/CodeGen/ProcessImplicitDefs.cpp +++ b/lib/CodeGen/ProcessImplicitDefs.cpp @@ -209,6 +209,10 @@ bool ProcessImplicitDefs::runOnMachineFunction(MachineFunction &fn) { unsigned SrcReg, DstReg, SrcSubReg, DstSubReg; if (tii_->isMoveInstr(*RMI, SrcReg, DstReg, SrcSubReg, DstSubReg) && Reg == SrcReg) { + if (RMO.isKill()) { + LiveVariables::VarInfo& vi = lv_->getVarInfo(Reg); + vi.removeKill(RMI); + } RMI->setDesc(tii_->get(TargetInstrInfo::IMPLICIT_DEF)); for (int j = RMI->getNumOperands() - 1, ee = 0; j > ee; --j) RMI->RemoveOperand(j); |