Skip to content

Commit 2f1ef50

Browse files
committed
Let lowerToLoopsUsingSCFForOp delete target op.
The function mlir::scf::lowerToLoopsUsingSCFForOp was not deleting its (structured) target op, resulting in IR with the expected loop nest in front of the still remaining (structured) op, e.g. a linalg.matmul.
1 parent fe97a59 commit 2f1ef50

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1133,5 +1133,6 @@ mlir::scf::lowerToLoopsUsingSCFForOp(RewriterBase &rewriter,
11331133
if (failed(op.generateScalarImplementation(rewriter, op.getLoc(), ivs))) {
11341134
return failure();
11351135
}
1136+
rewriter.eraseOp(op);
11361137
return loops;
11371138
}

0 commit comments

Comments
 (0)