CodeGen: Avoid dereferencing end() in OptimizePHIs::OptimizeBB

llvm-svn: 278879
This commit is contained in:
Duncan P. N. Exon Smith 2016-08-17 00:43:59 +00:00
parent e04fe1a394
commit 00ec93da26
1 changed files with 1 additions and 1 deletions

View File

@ -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();
}