Fix a compiler warning

llvm-svn: 296903
This commit is contained in:
Sanjoy Das 2017-03-03 18:53:09 +00:00
parent d97381367a
commit 0a4ec554c1
1 changed files with 2 additions and 1 deletions

View 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;