Skip to content

Commit c9b3a38

Browse files
author
git apple-llvm automerger
committed
Merge commit '0c5df8dbe561' from llvm.org/master into apple/master
2 parents e65bd2e + 0c5df8d commit c9b3a38

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/lib/Transforms/Scalar/IndVarSimplify.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2268,8 +2268,8 @@ static PHINode *FindLoopCounter(Loop *L, BasicBlock *ExitingBB,
22682268
if (BECount->getType()->isPointerTy() && !Phi->getType()->isPointerTy())
22692269
continue;
22702270

2271-
const auto *AR = dyn_cast<SCEVAddRecExpr>(SE->getSCEV(Phi));
2272-
2271+
const auto *AR = cast<SCEVAddRecExpr>(SE->getSCEV(Phi));
2272+
22732273
// AR may be a pointer type, while BECount is an integer type.
22742274
// AR may be wider than BECount. With eq/ne tests overflow is immaterial.
22752275
// AR may not be a narrower type, or we may never exit.

0 commit comments

Comments
 (0)