[Mlir-commits] [mlir] [mlir][EmitC] Expand the MemRefToEmitC pass - Lowering `CopyOp` (PR #151206)
Paul Kirth
llvmlistbot at llvm.org
Fri Aug 8 10:16:22 PDT 2025
================
@@ -0,0 +1,30 @@
+// RUN: mlir-opt -convert-memref-to-emitc="lower-to-cpp=true" %s -split-input-file | FileCheck %s --check-prefix=CPP
+// RUN: mlir-opt -convert-memref-to-emitc="lower-to-cpp=false" %s -split-input-file | FileCheck %s --check-prefix=NOCPP
+
+func.func @copying(%arg0 : memref<9x4x5x7xf32>, %arg1 : memref<9x4x5x7xf32>) {
+ memref.copy %arg0, %arg1 : memref<9x4x5x7xf32> to memref<9x4x5x7xf32>
+ return
+}
+
+// CHECK: module {
+// NOCPP: emitc.include <"string.h">
+
+// CPP: emitc.include <"cstring">
----------------
ilovepi wrote:
```suggestion
// NOCPP: emitc.include <"string.h">
// CPP: emitc.include <"cstring">
```
I think this a more readable formatting, since its makes it a bit obvious that these are variants of the same line. This is a rather minor nit though, so up to you.
https://github.com/llvm/llvm-project/pull/151206
More information about the Mlir-commits
mailing list