Skip to content

Commit 7e37490

Browse files
Fix warning (leading to build errors when warnings are treated as error)
Signed-off-by: MaheshRavishankar <[email protected]>
1 parent 640cd80 commit 7e37490

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

mlir/lib/Dialect/SCF/Transforms/TileUsingInterface.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff 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());

0 commit comments

Comments
 (0)