[Mlir-commits] [mlir] [mlir][memref]: Collapse strided unit dim even if strides are dynamic (PR #157330)

Han-Chung Wang llvmlistbot at llvm.org
Tue Nov 4 11:39:36 PST 2025


hanhanW wrote:

Hi, I'd like to signal that this breaks IREE downstream lit tests.

With the change, the below memref is no longer collapsable, but it should be okay to collapse?

```mlir
memref<3x3x1x96xf32, strided<[288, 96, 96, 1], offset: 864>>
```

The below method starts returning false with the change.

https://github.com/llvm/llvm-project/blob/92a1eb37122fa24e3045fbabdea2bf87127cace5/mlir/lib/Dialect/MemRef/IR/MemRefOps.cpp#L2597-L2605

which does not compute `stride` properly in the change.


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


More information about the Mlir-commits mailing list