[Mlir-commits] [mlir] [MLIR][SCF] Update TestTileUsingCustomLoopOp to check `loops` param (PR #161490)

Mehdi Amini llvmlistbot at llvm.org
Wed Oct 1 03:42:00 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());
----------------
joker-eph wrote:

Why is this changing nothing to the rest of the test?

https://github.com/llvm/llvm-project/pull/161490


More information about the Mlir-commits mailing list