Don't dereference MBB->end().

llvm-svn: 49043
This commit is contained in:
Owen Anderson 2008-04-01 18:05:08 +00:00
parent 595cf9ff81
commit 49dd9f16a9
1 changed files with 1 additions and 1 deletions

View File

@ -408,7 +408,7 @@ void StrongPHIElimination::processBlock(MachineBasicBlock* MBB) {
// Iterate over all the PHI nodes in this block
MachineBasicBlock::iterator P = MBB->begin();
while (P->getOpcode() == TargetInstrInfo::PHI) {
while (P != MBB->end() && P->getOpcode() == TargetInstrInfo::PHI) {
unsigned DestReg = P->getOperand(0).getReg();
// Don't both doing PHI elimination for dead PHI's.