[clang] [CIR][CUDA][HIP] Skip initializer for static __shared__ variables (PR #231172)

Arseniy Obolenskiy via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 12 21:06:20 PDT 2026


================
@@ -181,3 +184,10 @@ __global__ void fn() {
 // OGCG-DEVICE:   %[[VAL:.*]] = load i32, ptr %[[ALLOCA]], align 4
 // OGCG-DEVICE:   store i32 %[[VAL]], ptr addrspacecast (ptr addrspace(3) @_ZZ2fnvE1j to ptr), align 4
 // OGCG-DEVICE:   ret void
+
+struct S { int a; float b[4]; };
+
+__global__ void fnStruct() {
+  __shared__ S s;
----------------
aobolensk wrote:

Done

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


More information about the cfe-commits mailing list