mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-24 06:25:18 +00:00
Fix PR2568: Fix bug that cause redudant kill marker after its live interval has been extended due to coalescing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54346 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -533,14 +533,16 @@ void SimpleRegisterCoalescing::RemoveUnnecessaryKills(unsigned Reg,
|
||||
MachineOperand &UseMO = UI.getOperand();
|
||||
if (UseMO.isKill()) {
|
||||
MachineInstr *UseMI = UseMO.getParent();
|
||||
#if 0
|
||||
unsigned SReg, DReg;
|
||||
if (!tii_->isMoveInstr(*UseMI, SReg, DReg))
|
||||
continue;
|
||||
#endif
|
||||
unsigned UseIdx = li_->getUseIndex(li_->getInstructionIndex(UseMI));
|
||||
if (JoinedCopies.count(UseMI))
|
||||
continue;
|
||||
const LiveRange *UI = LI.getLiveRangeContaining(UseIdx);
|
||||
if (!LI.isKill(UI->valno, UseIdx+1))
|
||||
if (!UI || !LI.isKill(UI->valno, UseIdx+1))
|
||||
UseMO.setIsKill(false);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user