[Mlir-commits] [mlir] [mlir][memref] Canonicalize memref.reinterpret_cast when offset/sizes/strides are constants. (PR #163505)
Matthias Springer
llvmlistbot at llvm.org
Mon Oct 20 09:07:34 PDT 2025
matthias-springer wrote:
> I'd argue that the op was already invalid before canonicalization - just not verifiably invalid?
What about this IR?
```
%sz = ...
scf.if (%sz >= 0) {
%0 = memref.reinterpret_cast %m to offset: [%off], sizes: [%sz], strides: [%str] : memref<f32> to memref<?xf32, strided<[?], offset: ?>>
...
}
```
https://github.com/llvm/llvm-project/pull/163505
More information about the Mlir-commits
mailing list