[llvm] fdd5843 - [LoopFlatten] Replace unchecked dyn_cast with cast.
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 7 08:25:21 PDT 2022
Author: Craig Topper
Date: 2022-06-07T08:21:00-07:00
New Revision: fdd5843572c02bea2ac4d537a09b32e633994a8a
URL: https://github.com/llvm/llvm-project/commit/fdd5843572c02bea2ac4d537a09b32e633994a8a
DIFF: https://github.com/llvm/llvm-project/commit/fdd5843572c02bea2ac4d537a09b32e633994a8a.diff
LOG: [LoopFlatten] Replace unchecked dyn_cast with cast.
Spotted while reading through the code.
Reviewed By: SjoerdMeijer
Differential Revision: https://reviews.llvm.org/D127146
Added:
Modified:
llvm/lib/Transforms/Scalar/LoopFlatten.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/Scalar/LoopFlatten.cpp b/llvm/lib/Transforms/Scalar/LoopFlatten.cpp
index df88931eda7ed..de05d695e1e1e 100644
--- a/llvm/lib/Transforms/Scalar/LoopFlatten.cpp
+++ b/llvm/lib/Transforms/Scalar/LoopFlatten.cpp
@@ -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;
More information about the llvm-commits
mailing list