[Mlir-commits] [mlir] [mlir][EmitC] Support pointer-based memrefs in load/store lowering (PR #186828)

ioana ghiban llvmlistbot at llvm.org
Wed Mar 18 13:58:10 PDT 2026


================
@@ -0,0 +1,75 @@
+// RUN: mlir-opt -convert-to-emitc %s -split-input-file \
+// RUN: | FileCheck %s
+
+/// NOTE: This test intentionally uses `-convert-to-emitc` only.
+///
+/// The `-convert-memref-to-emitc` pass introduces
+/// `builtin.unrealized_conversion_cast` operations when lowering
+/// `memref.alloc` results (which are lowered to `emitc.ptr`) to the canonical
+/// memref representation used by the type converter (`emitc.array`).
+/// These casts are expected at that stage of the pipeline.
+///
+/// The purpose of this test is to verify the final lowering produced by
+/// `-convert-to-emitc`, where `memref.load` and `memref.store` conversions now
+/// handle pointer-backed buffers directly and eliminate the intermediate
+/// `unrealized_conversion_cast`.
+/// Therefore, the test must run the full EmitC conversion pipeline.
----------------
ioghiban wrote:

I believe the summary is already covered (?)

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


More information about the Mlir-commits mailing list