Don't rely on the isDead() MachineOperand flag when updating LiveIntervals.

llvm-svn: 175732
This commit is contained in:
Cameron Zwarich 2013-02-21 08:51:58 +00:00
parent d113292bce
commit 3ab4c4ba30
1 changed files with 3 additions and 1 deletions

View File

@ -320,7 +320,9 @@ void PHIElimination::LowerPHINode(MachineBasicBlock &MBB,
}
LiveInterval &DestLI = LIS->getInterval(DestReg);
if (NewInstr->getOperand(0).isDead()) {
assert(DestLI.begin() != DestLI.end() &&
"PHIs should have nonempty LiveIntervals.");
if (DestLI.endIndex().isDead()) {
// A dead PHI's live range begins and ends at the start of the MBB, but
// the lowered copy, which will still be dead, needs to begin and end at
// the copy instruction.