commit | 00ec93da2655a42195dd3864104bf335ed11c73f | [log] [tgz] |
---|---|---|
author | Duncan P. N. Exon Smith <dexonsmith@apple.com> | Wed Aug 17 00:43:59 2016 +0000 |
committer | Duncan P. N. Exon Smith <dexonsmith@apple.com> | Wed Aug 17 00:43:59 2016 +0000 |
tree | 57f88b45e2c29156f9ddd803d83d8a2ba31bef68 | |
parent | e04fe1a39404394ace7616aba3ce0f5c378292fb [diff] [blame] |
CodeGen: Avoid dereferencing end() in OptimizePHIs::OptimizeBB llvm-svn: 278879
diff --git a/llvm/lib/CodeGen/OptimizePHIs.cpp b/llvm/lib/CodeGen/OptimizePHIs.cpp index 0177e41..2a8531f 100644 --- a/llvm/lib/CodeGen/OptimizePHIs.cpp +++ b/llvm/lib/CodeGen/OptimizePHIs.cpp
@@ -184,7 +184,7 @@ for (InstrSetIterator PI = PHIsInCycle.begin(), PE = PHIsInCycle.end(); PI != PE; ++PI) { MachineInstr *PhiMI = *PI; - if (&*MII == PhiMI) + if (MII == PhiMI) ++MII; PhiMI->eraseFromParent(); }