[Mlir-commits] [mlir] [mlir][memref] Allow out-of-bounds semantics for memref.subview (PR #152164)
Matthias Springer
llvmlistbot at llvm.org
Tue Aug 5 11:48:10 PDT 2025
https://github.com/matthias-springer commented:
> The op has ir that verifies, but will not verify after canonicalization: [...]
> This ir will verify, but after canonicalization it will not verify. This makes the operation definition inconsistent.
This should not be the case. This case is accounted for in `OpWithOffsetSizesAndStridesConstantArgumentFolder`:
```c++
// Pattern does not apply if the produced op would not verify.
SliceBoundsVerificationResult sliceResult = verifyInBoundsSlice(
cast<ShapedType>(op.getSource().getType()).getShape(), mixedOffsets,
mixedSizes, mixedStrides);
```
This check should be relaxed for `memref.subview`, so that the canonicalizer can kick in.
https://github.com/llvm/llvm-project/pull/152164
More information about the Mlir-commits
mailing list