[Mlir-commits] [mlir] EmitC: Add emitc.global and emitc.get_global (#145) (PR #88701)

Simon Camphausen llvmlistbot at llvm.org
Mon Apr 22 06:21:23 PDT 2024


================
@@ -26,3 +27,19 @@ func.func @memref_load(%i: index, %j: index) -> f32 {
   // CHECK: return %[[VAR]] : f32
   return %1 : f32
 }
+
+// -----
+
+// CHECK-LABEL: globals
+module @globals {
+  memref.global "private" constant @internal_global : memref<3x7xf32> = dense<4.0>
----------------
simon-camp wrote:

We should have a test for uninitialized globals like
```mlir
memref.global @uninit : memref<2xf32> = uninitialized
```

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


More information about the Mlir-commits mailing list