[llvm-branch-commits] [clang] [llvm] [mlir] [RFC][AMDGPU] Add BARRIER address space (PR #195613)

Pierre van Houtryve via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Tue May 12 05:07:31 PDT 2026


================
@@ -555,8 +555,21 @@ AMDGPUTargetCodeGenInfo::getSRetAddrSpace(const CXXRecordDecl *RD) const {
 
 LangAS AMDGPUTargetCodeGenInfo::adjustGlobalVarAddressSpace(
     CodeGenModule &CGM, const VarDecl *D, std::optional<LangAS> AS) const {
-  if (AS)
+  if (AS) {
+    // NamedWorkgroupBarrier GVs are declared as __shared__, but the back-end
----------------
Pierre-vh wrote:

I do not think it should be `__shared__` but that is outside of the scope of this change to fix. It needs to be handled separately as language changes like that are much more delicate

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


More information about the llvm-branch-commits mailing list