diff options
Diffstat (limited to 'llvm/lib/Transforms/Utils/LoopUnrollPeel.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/LoopUnrollPeel.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Utils/LoopUnrollPeel.cpp b/llvm/lib/Transforms/Utils/LoopUnrollPeel.cpp index e45aef88722..55bfc25a086 100644 --- a/llvm/lib/Transforms/Utils/LoopUnrollPeel.cpp +++ b/llvm/lib/Transforms/Utils/LoopUnrollPeel.cpp @@ -80,7 +80,8 @@ void llvm::computePeelCount(Loop *L, unsigned LoopSize, // Iterate over Phis to find one with invariant input on back edge. bool FoundCandidate = false; PHINode *Phi; - for (auto BI = Header->begin(); Phi = dyn_cast<PHINode>(&*BI); ++BI) { + for (auto BI = Header->begin(); isa<PHINode>(&*BI); ++BI) { + Phi = cast<PHINode>(&*BI); Value *Input = Phi->getIncomingValueForBlock(BackEdge); if (L->isLoopInvariant(Input)) { FoundCandidate = true; |