lialan wrote: I think we probably need a type converter that also linearize other memrefs not being handled by this transformation (by collapsing their shapes?), so at the end we would only deal with 1-dimensional memrefs. https://github.com/llvm/llvm-project/pull/136797