[Mlir-commits] [mlir] [mlir][MemRef] Add ExtractStridedMetadataOpCollapseShapeFolder (PR #89954)

Quentin Colombet llvmlistbot at llvm.org
Wed Apr 24 12:37:16 PDT 2024


qcolombet wrote:

> > Interesting enough, I can't find where `memref::populateExpandStridedMetadataPatterns` is being tested???
> 
> `mlir/test/Dialect/MemRef/expand-strided-metadata.mlir`, no?

I guess you meant `populateResolveExtractStridedMetadataPatterns` since that's the one you're modifying.
I thought that `populateResolveExtractStridedMetadataPatterns` was a subset of `populateExpandStridedMetadataPatterns` but looks like it changed with https://reviews.llvm.org/D147393 and I didn't notice.

I see two paths forward
1. use `populateResolveExtractStridedMetadataPatterns` inside `populateExpandStridedMetadataPatterns` so that we can be sure `Resolve` is a subset of `Expand`. I think this is true today (modulo what https://reviews.llvm.org/D147393 added, but re-converging remains good IMHO) and we can revisit when they need to diverge.
2. integrate a test in the narrowing type test pass, since this is the only place where `Resolve` is used.

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


More information about the Mlir-commits mailing list