[mlir][MemRefToLLVM] Remove the code for lowering subview
Subviews are supposed to be expanded before we hit the lowering code. The expansion is done with the pass called expand-strided-metadata. Add a test that demonstrate how these passes can be linked up to achieve the desired lowering. This patch is NFC in spirit but not in practice because `subview` gets lowered into `reinterpret_cast(extract_strided_metadata, <some math>)` which lowers in two memref descriptors (one for `reinterpert_cast` and one for `extract_strided_metadata`), which creates some noise of the form: `extractvalue(unrealized_cast(extractvalue[0]))[0]` that is currently not simplified within MLIR but that is really just noop in that case. Differential Revision: https://reviews.llvm.org/D136377
Loading
Please sign in to comment