[Mlir-commits] [mlir] [mlir][memref][vector] Fold memref.subview into out-of-bounds vector transfer ops (PR #80517)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Mon Feb 5 20:21:15 PST 2024


MaheshRavishankar wrote:

> Is this really correct? The `memref.subview` could cause more padding to be added.
> 
> ```mlir
> %0 = memref.subview %m[0][10][1] : memref<100xf32> to memref<10xf32>
> // this will add padding
> %1 = vector.transfer_read %0[%c0], %p {in_bounds = [false]} : memref<10xf32>, vector<20xf32>
> ```
> 
> It looks like after this change the IR would be:
> 
> ```mlir
> // this will not add padding
> %1 = vector.transfer_read %m[%c0], %p {in_bounds = [false]} : memref<100xf32>, vector<20xf32>
> ```

Geez, maybe the `vector.transfer_read` is carrying too much semantics... Is the padding value optional? If so we can fold this in the optional cases.

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


More information about the Mlir-commits mailing list