[Mlir-commits] [mlir] [MLIR][SCF] Update TestTileUsingCustomLoopOp to check `loops` param (PR #161490)
Mehdi Amini
llvmlistbot at llvm.org
Wed Oct 1 03:41:12 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");
+ }
----------------
joker-eph wrote:
```suggestion
if (!forOp)
return emitOpError("unexpected loop type. Expecting scf::ForOp");
```
https://github.com/llvm/llvm-project/pull/161490
More information about the Mlir-commits
mailing list