[LoopFlatten] Replace unchecked dyn_cast with cast.

Spotted while reading through the code.

Reviewed By: SjoerdMeijer

Differential Revision: https://reviews.llvm.org/D127146
This commit is contained in:
Craig Topper 2022-06-07 08:20:59 -07:00
parent 0c66deb498
commit fdd5843572
1 changed files with 1 additions and 1 deletions

View File

@ -411,7 +411,7 @@ static bool findLoopComponents(
// pre-header and one from the latch. The incoming latch value is the
// increment variable.
Increment =
dyn_cast<BinaryOperator>(InductionPHI->getIncomingValueForBlock(Latch));
cast<BinaryOperator>(InductionPHI->getIncomingValueForBlock(Latch));
if (Increment->hasNUsesOrMore(3)) {
LLVM_DEBUG(dbgs() << "Could not find valid increment\n");
return false;