Skip to content

Commit a076aa5

Browse files
bjacobpuja2196
authored andcommitted
[MLIR] Fix: cast were meant to be dyn_cast. (#110518)
This fixes `cast`'s that were introduced in llvm/llvm-project#108450. Signed-off-by: Benoit Jacob <[email protected]>
1 parent e90a827 commit a076aa5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mlir/lib/Dialect/Affine/IR/AffineOps.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4612,12 +4612,12 @@ struct DropDelinearizeOfSingleLoop
46124612
return failure();
46134613

46144614
// Check that the `linear_index` is an induction variable.
4615-
auto inductionVar = cast<BlockArgument>(delinearizeOp.getLinearIndex());
4615+
auto inductionVar = dyn_cast<BlockArgument>(delinearizeOp.getLinearIndex());
46164616
if (!inductionVar)
46174617
return failure();
46184618

46194619
// Check that the parent is a `LoopLikeOpInterface`.
4620-
auto loopLikeOp = cast<LoopLikeOpInterface>(
4620+
auto loopLikeOp = dyn_cast<LoopLikeOpInterface>(
46214621
inductionVar.getParentRegion()->getParentOp());
46224622
if (!loopLikeOp)
46234623
return failure();

0 commit comments

Comments
 (0)