[mlir][MemRef] Fix the lowering of extract_strided_metadata
authorQuentin Colombet <quentin.colombet@gmail.com>
Thu, 3 Nov 2022 19:14:52 +0000 (19:14 +0000)
committerQuentin Colombet <quentin.colombet@gmail.com>
Sat, 5 Nov 2022 01:06:38 +0000 (01:06 +0000)
commit200266a0a12b0af77967c8770e1e1bdd634bfc4a
treeb690e22c6c236e26f9a2931a7e35a2d2246a4436
parent91aa233bdf9da29391e107e0575a733deb38c4c2
[mlir][MemRef] Fix the lowering of extract_strided_metadata

The first result of the extract_strided_metadata operation is a MemRef,
not a naked pointer.
This patch fixes the lowering of this operation in MemRefToLLVM so that
we properly materialize the full MemRef structure and not just the base,
naked, pointer.

Differential Revision: https://reviews.llvm.org/D137364
mlir/include/mlir/Conversion/LLVMCommon/MemRefBuilder.h
mlir/lib/Conversion/LLVMCommon/MemRefBuilder.cpp
mlir/lib/Conversion/MemRefToLLVM/MemRefToLLVM.cpp
mlir/test/Conversion/MemRefToLLVM/memref-to-llvm.mlir