[Mlir-commits] [mlir] [MLIR][SCF] Update TestTileUsingCustomLoopOp to check `loops` param (PR #161490)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Wed Oct 1 05:21:22 PDT 2025
================
@@ -586,6 +589,16 @@ DiagnosedSilenceableFailure transform::TestTileUsingCustomLoopOp::apply(
ArrayRef<SmallVector<OpFoldResult>> resultOffsets,
ArrayRef<SmallVector<OpFoldResult>> resultSizes,
ValueRange destinationTensors) -> LogicalResult {
+ if (loops.size() != 1) {
+ return emitOpError("loop size must be 1");
+ }
+ LoopLikeOpInterface loop = loops.front();
+ scf::ForOp *forOp = dyn_cast<scf::ForOp>(&loop);
+ if (!forOp) {
+ return emitOpError("unexpected loop type. Expecting scf::ForOp");
+ }
+ rewriter.setInsertionPointToEnd(forOp->getBody());
----------------
sebvince wrote:
This test needs the insertionPoint to be set at the end of getBody of the loop. Previously, it was implicitly set in generateLoopHeaderFn.
https://github.com/llvm/llvm-project/pull/161490
More information about the Mlir-commits
mailing list