[llvm] r278879 - CodeGen: Avoid dereferencing end() in OptimizePHIs::OptimizeBB
Duncan P. N. Exon Smith via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 16 17:43:59 PDT 2016
Author: dexonsmith
Date: Tue Aug 16 19:43:59 2016
New Revision: 278879
URL: http://llvm.org/viewvc/llvm-project?rev=278879&view=rev
Log:
CodeGen: Avoid dereferencing end() in OptimizePHIs::OptimizeBB
Modified:
llvm/trunk/lib/CodeGen/OptimizePHIs.cpp
Modified: llvm/trunk/lib/CodeGen/OptimizePHIs.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/OptimizePHIs.cpp?rev=278879&r1=278878&r2=278879&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/OptimizePHIs.cpp (original)
+++ llvm/trunk/lib/CodeGen/OptimizePHIs.cpp Tue Aug 16 19:43:59 2016
@@ -184,7 +184,7 @@ bool OptimizePHIs::OptimizeBB(MachineBas
for (InstrSetIterator PI = PHIsInCycle.begin(), PE = PHIsInCycle.end();
PI != PE; ++PI) {
MachineInstr *PhiMI = *PI;
- if (&*MII == PhiMI)
+ if (MII == PhiMI)
++MII;
PhiMI->eraseFromParent();
}
More information about the llvm-commits
mailing list