mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-04 01:51:31 +00:00
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
This commit is contained in:
parent
ce9d705846
commit
bd7b181f94
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user