forked from OSchip/llvm-project
CodeGen: Avoid dereferencing end() in OptimizePHIs::OptimizeBB
llvm-svn: 278879
This commit is contained in:
parent
e04fe1a394
commit
00ec93da26
|
@ -184,7 +184,7 @@ bool OptimizePHIs::OptimizeBB(MachineBasicBlock &MBB) {
|
|||
for (InstrSetIterator PI = PHIsInCycle.begin(), PE = PHIsInCycle.end();
|
||||
PI != PE; ++PI) {
|
||||
MachineInstr *PhiMI = *PI;
|
||||
if (&*MII == PhiMI)
|
||||
if (MII == PhiMI)
|
||||
++MII;
|
||||
PhiMI->eraseFromParent();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue