fix rdar://8878965, a regression I introduced with the recent
llvm.objectsize changes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123771 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Transforms/Scalar/CodeGenPrepare.cpp b/lib/Transforms/Scalar/CodeGenPrepare.cpp
index 72c8bf3..9536939 100644
--- a/lib/Transforms/Scalar/CodeGenPrepare.cpp
+++ b/lib/Transforms/Scalar/CodeGenPrepare.cpp
@@ -644,8 +644,10 @@
 
     // If the iterator instruction was recursively deleted, start over at the
     // start of the block.
-    if (IterHandle != CurInstIterator)
+    if (IterHandle != CurInstIterator) {
       CurInstIterator = BB->begin();
+      SunkAddrs.clear();
+    }
     return true;
   }