mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-01 15:40:53 +00:00
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:
parent
f623792723
commit
d4e0802b9b
@ -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
Block a user