[Mlir-commits] [mlir] f3ebf22 - [MLIR] Fix: `cast` were meant to be `dyn_cast`. (#110518)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Mon Sep 30 08:36:31 PDT 2024
Author: Benoit Jacob
Date: 2024-09-30T11:36:27-04:00
New Revision: f3ebf22428211160001b53285e78436aa704c24b
URL: https://github.com/llvm/llvm-project/commit/f3ebf22428211160001b53285e78436aa704c24b
DIFF: https://github.com/llvm/llvm-project/commit/f3ebf22428211160001b53285e78436aa704c24b.diff
LOG: [MLIR] Fix: `cast` were meant to be `dyn_cast`. (#110518)
This fixes `cast`'s that were introduced in
https://github.com/llvm/llvm-project/pull/108450.
Signed-off-by: Benoit Jacob <jacob.benoit.1 at gmail.com>
Added:
Modified:
mlir/lib/Dialect/Affine/IR/AffineOps.cpp
Removed:
################################################################################
diff --git a/mlir/lib/Dialect/Affine/IR/AffineOps.cpp b/mlir/lib/Dialect/Affine/IR/AffineOps.cpp
index 1ccff7324f514d..5e7a6b6ca883c3 100644
--- a/mlir/lib/Dialect/Affine/IR/AffineOps.cpp
+++ b/mlir/lib/Dialect/Affine/IR/AffineOps.cpp
@@ -4612,12 +4612,12 @@ struct DropDelinearizeOfSingleLoop
return failure();
// Check that the `linear_index` is an induction variable.
- auto inductionVar = cast<BlockArgument>(delinearizeOp.getLinearIndex());
+ auto inductionVar = dyn_cast<BlockArgument>(delinearizeOp.getLinearIndex());
if (!inductionVar)
return failure();
// Check that the parent is a `LoopLikeOpInterface`.
- auto loopLikeOp = cast<LoopLikeOpInterface>(
+ auto loopLikeOp = dyn_cast<LoopLikeOpInterface>(
inductionVar.getParentRegion()->getParentOp());
if (!loopLikeOp)
return failure();
More information about the Mlir-commits
mailing list