[Mlir-commits] [llvm] [mlir] [MLIR] Add passthrough attribute to mlir.global (PR #154706)

Tobias Gysi llvmlistbot at llvm.org
Fri Aug 22 02:23:59 PDT 2025


================
@@ -3028,3 +3028,15 @@ llvm.mlir.global internal constant @test_array_attr_struct_with_struct() : !llvm
   %0 = llvm.mlir.constant([#llvm.zero, [2 : i32, 1.0 : f32], #llvm.undef]) : !llvm.array<3 x struct<(i32, f32)>>
   llvm.return %0 : !llvm.array<3 x struct<(i32, f32)>>
 }
+
+// -----
+
+// CHECK: @passthrough_only = external global double #[[ATTRS:[0-9]+]]
+// CHECK: attributes #[[ATTRS]] = { memory(none) "int-attr"="4" "no-enum-attr" "string-attr"="string" }
+ llvm.mlir.global external @passthrough_only() {passthrough = [["memory", "0"], ["int-attr", "4"], "no-enum-attr", ["string-attr", "string"]]} : f64
----------------
gysit wrote:

```suggestion
llvm.mlir.global external @passthrough_only() {passthrough = [["memory", "0"], ["int-attr", "4"], "no-enum-attr", ["string-attr", "string"]]} : f64
```
ultra nit: there is some redundant space here

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


More information about the Mlir-commits mailing list