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 | 01f31c0a48499561ec02df038137407dde5245f9 (patch) | |
| tree | 68456a4152e4bf31b5d7674c24455f31538f4bcc /llvm/lib/CodeGen | |
| parent | 968bd90f880a3b418c41393092ecf8c5edd706c1 (diff) | |
| download | bcm5719-llvm-01f31c0a48499561ec02df038137407dde5245f9.tar.gz bcm5719-llvm-01f31c0a48499561ec02df038137407dde5245f9.zip | |
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.
llvm-svn: 88881
Diffstat (limited to 'llvm/lib/CodeGen')
| -rw-r--r-- | llvm/lib/CodeGen/ProcessImplicitDefs.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/ProcessImplicitDefs.cpp b/llvm/lib/CodeGen/ProcessImplicitDefs.cpp index 48567a0fc7f..23b78c74386 100644 --- a/llvm/lib/CodeGen/ProcessImplicitDefs.cpp +++ b/llvm/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); |

