================
@@ -0,0 +1,31 @@
+// RUN: %clang_cc1 -std=c++17 -triple amdgpu-amd-amdhsa -fclangir \
+// RUN: -emit-llvm %s -o %t.ll
+// RUN: FileCheck %s --input-file=%t.ll
+// RUN: %clang_cc1 -std=c++17 -triple amdgpu-amd-amdhsa -fclangir \
+// RUN: -O3 -emit-llvm %s -o /dev/null
+
+struct BoolArray {
+ bool values[3];
+};
+
+// CHECK-LABEL: define {{.+}}i1 @record()
+// CHECK: store %struct.BoolArray { [3 x i8] c"\01\00\01" }
+// CHECK: ret i1
+extern "C" bool record() {
+ BoolArray value{true, false, true};
+ return value.values[0];
+}
+
+// CHECK-LABEL: define {{.+}}i1 @partial_array()
+// CHECK: store [3 x i8] c"\01\00\00"
----------------
martin-luecke wrote:
The container is already 3 x i8, but the constant payload was tensor<3xi1>,
which the verifier rejects. The fix makes the payload match. The AMDGPU triple
exercises the failing path: https://godbolt.org/z/8vcnsxcKv
https://github.com/llvm/llvm-project/pull/236082
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits