Don't dereference MBB->end().

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49043 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Owen Anderson 2008-04-01 18:05:08 +00:00
parent 038112a4e0
commit 78216bc9f8

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.