Another coalescer bug. When a dead copy is eliminated, transfer the kill to a def of the exact register rather than a super-register.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78376 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Evan Cheng
2009-08-07 07:14:14 +00:00
parent 53c67c0218
commit 15c592ddff
2 changed files with 22 additions and 5 deletions

View File

@@ -888,12 +888,13 @@ static void PropagateDeadness(LiveInterval &li, MachineInstr *CopyMI,
MachineInstr *DefMI =
li_->getInstructionFromIndex(li_->getDefIndex(LRStart));
if (DefMI && DefMI != CopyMI) {
int DeadIdx = DefMI->findRegisterDefOperandIdx(li.reg, false, tri_);
if (DeadIdx != -1) {
int DeadIdx = DefMI->findRegisterDefOperandIdx(li.reg, false);
if (DeadIdx != -1)
DefMI->getOperand(DeadIdx).setIsDead();
// A dead def should have a single cycle interval.
++LRStart;
}
else
DefMI->addOperand(MachineOperand::CreateReg(li.reg,
true, true, false, true));
++LRStart;
}
}