[Mlir-commits] [mlir] [mlir] Compose expand of collapse to cast (PR #172864)
Kunwar Grover
llvmlistbot at llvm.org
Thu Dec 18 07:48:29 PST 2025
Groverkss wrote:
Actually, looking at the context now, this may not be a bad pattern... I think you need to include more context in this PR otherwise it looks weird.
This PR is attempting to fold memref.expand_shape/memref.collapse_shape when the shape is compatible, the layouts are effectively same, but the layouts represent the same thing as two different layouts. Here, a cast is not a bad idea, because both layouts are equivalent.
Can you mention this in the PR and also include tests that this is the only case where this happens?
https://github.com/llvm/llvm-project/pull/172864
More information about the Mlir-commits
mailing list