[clang] [clang][AMDGPU] Clean-up handling of named barrier type (PR #207687)
Pierre van Houtryve via cfe-commits
cfe-commits at lists.llvm.org
Thu Jul 9 01:56:56 PDT 2026
================
@@ -3,6 +3,30 @@
// RUN: %clang_cc1 -verify -cl-std=CL2.0 -triple amdgcn-amd-amdhsa -Wno-unused-value %s
void foo() {
+ typedef __amdgpu_named_workgroup_barrier_t SugaredArray[2];
+
+ struct TestSimple {
+ __amdgpu_named_workgroup_barrier_t x;
+ };
+
+ struct TestArray {
+ __amdgpu_named_workgroup_barrier_t y[2];
+ };
+
+ struct TestSugared {
+ SugaredArray z[2];
+ };
+
+ struct GoodWrapper {
+ __amdgpu_named_workgroup_barrier_t x;
----------------
Pierre-vh wrote:
Downstream has a need for it because there is a desire to create wrappers around named barriers with helper functions. Of course the example here is simple but in reality you'd have a few helper functions in a struct like that.
https://github.com/llvm/llvm-project/pull/207687
More information about the cfe-commits
mailing list