Fix a compiler warning
authorSanjoy Das <sanjoy@playingwithpointers.com>
Fri, 3 Mar 2017 18:53:09 +0000 (18:53 +0000)
committerSanjoy Das <sanjoy@playingwithpointers.com>
Fri, 3 Mar 2017 18:53:09 +0000 (18:53 +0000)
llvm-svn: 296903

llvm/lib/Transforms/Utils/LoopUnrollPeel.cpp

index e45aef8..55bfc25 100644 (file)
@@ -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;