[Mlir-commits] [mlir] [MLIR] Fix after #108450: `cast` were meant to be `dyn_cast`. (PR #110518)
Benoit Jacob
llvmlistbot at llvm.org
Mon Sep 30 08:02:57 PDT 2024
https://github.com/bjacob created https://github.com/llvm/llvm-project/pull/110518
None
>From 1d31576f4cb3fdaaab80794af7c61732c3bbd733 Mon Sep 17 00:00:00 2001
From: Benoit Jacob <jacob.benoit.1 at gmail.com>
Date: Mon, 30 Sep 2024 10:59:06 -0400
Subject: [PATCH] fix dyn_cast
Signed-off-by: Benoit Jacob <jacob.benoit.1 at gmail.com>
---
mlir/lib/Dialect/Affine/IR/AffineOps.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
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