[Mlir-commits] [mlir] [mlir][LLVM] handle ArrayAttr for constant array of structs (PR #139724)
Christian Ulmann
llvmlistbot at llvm.org
Tue May 13 07:20:49 PDT 2025
================
@@ -1850,3 +1850,25 @@ llvm.func @gep_inbounds_flag_usage(%ptr: !llvm.ptr, %idx: i64) {
llvm.getelementptr inbounds_flag %ptr[%idx, 0, %idx] : (!llvm.ptr, i64, i64) -> !llvm.ptr, !llvm.struct<(array<10 x f32>)>
llvm.return
}
+
+// -----
+
+llvm.mlir.global @x1() : !llvm.array<2x!llvm.struct<(i32, f32)>> {
+ // expected-error at +1{{'llvm.mlir.constant' op array attribute size does not match array type size in dimension 0: 1 vs. 2}}
----------------
Dinistro wrote:
```suggestion
// expected-error at below{{'llvm.mlir.constant' op array attribute size does not match array type size in dimension 0: 1 vs. 2}}
```
Nit: Same for the other test cases.
https://github.com/llvm/llvm-project/pull/139724
More information about the Mlir-commits
mailing list