Use an iterator instead of calling .size() on the worklist every time, which is wasteful.
[oota-llvm.git] / lib / Transforms / InstCombine / InstCombineLoadStoreAlloca.cpp
index e4012ef759ba0daa9a66ab5a57604ac4abca237e..7446a51a4db11822c8a752c8f8fff8f80acea0aa 100644 (file)
@@ -600,7 +600,7 @@ bool InstCombiner::SimplifyStoreAtEndOfBlock(StoreInst &SI) {
   
   // Advance to a place where it is safe to insert the new store and
   // insert it.
-  BBI = DestBB->getFirstNonPHI();
+  BBI = DestBB->getFirstInsertionPt();
   StoreInst *NewSI = new StoreInst(MergedVal, SI.getOperand(1),
                                    SI.isVolatile(),
                                    SI.getAlignment(),