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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278879 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Duncan P. N. Exon Smith 2016-08-17 00:43:59 +00:00
parent f623792723
commit d4e0802b9b

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