File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
mlir/lib/Dialect/SCF/Transforms Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -2478,9 +2478,10 @@ getProducingInsertSliceLikeOp(OpResult result,
24782478 // tiling and retrieve the `tensor.insert_slice` operation used to construct
24792479 // the result.
24802480 while (loops.size () != 1 ) {
2481- if (result.getOwner () != loops.front ())
2481+ LoopLikeOpInterface loop = loops.front ();
2482+ if (result.getOwner () != loop)
24822483 return std::nullopt ;
2483- auto forOp = dyn_cast<scf::ForOp>(loops. front ());
2484+ auto forOp = dyn_cast<scf::ForOp>(loop. getOperation ());
24842485 if (!forOp)
24852486 return std::nullopt ;
24862487 auto yieldOp = cast<scf::YieldOp>(forOp.getBody ()->getTerminator ());
@@ -2491,9 +2492,10 @@ getProducingInsertSliceLikeOp(OpResult result,
24912492 result = innerForResult;
24922493 loops = loops.drop_front ();
24932494 }
2494- if (result.getOwner () != loops.front ())
2495+ LoopLikeOpInterface loop = loops.front ();
2496+ if (result.getOwner () != loop)
24952497 return std::nullopt ;
2496- auto forOp = dyn_cast<scf::ForOp>(loops. front ());
2498+ auto forOp = dyn_cast<scf::ForOp>(loop. getOperation ());
24972499 if (!forOp)
24982500 return std::nullopt ;
24992501 auto yieldOp = cast<scf::YieldOp>(forOp.getBody ()->getTerminator ());
You can’t perform that action at this time.
0 commit comments