diff options
Diffstat (limited to 'lib/Transforms/Scalar/LoopStrengthReduce.cpp')
-rw-r--r-- | lib/Transforms/Scalar/LoopStrengthReduce.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Transforms/Scalar/LoopStrengthReduce.cpp b/lib/Transforms/Scalar/LoopStrengthReduce.cpp index f3834158c1..a39ba6eda2 100644 --- a/lib/Transforms/Scalar/LoopStrengthReduce.cpp +++ b/lib/Transforms/Scalar/LoopStrengthReduce.cpp @@ -632,7 +632,7 @@ void LoopStrengthReduce::runOnLoop(Loop *L) { BasicBlock::iterator I = L->getHeader()->begin(); PHINode *PN; - for (; (PN = dyn_cast<PHINode>(I)); ) { + while ((PN = dyn_cast<PHINode>(I))) { ++I; // Preincrement iterator to avoid invalidating it when deleting PN. // At this point, we know that we have killed one or more GEP instructions. @@ -664,5 +664,6 @@ void LoopStrengthReduce::runOnLoop(Loop *L) { } IVUsesByStride.clear(); + CastedBasePointers.clear(); return; } |