[clang] [AMDGPU] Add builtin to test for constant memory (PR #209679)

Yaxun Liu via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 15 12:47:15 PDT 2026


================
@@ -47,6 +50,95 @@ static Value *emitAMDGPUSBufferLoadBuiltin(CodeGenFunction &CGF,
                                     CGF.EmitScalarExpr(E->getArg(2))});
 }
 
+constexpr char AMDGPUConstantSectionMarker[] =
+    "__clang_amdgpu_constant_section_marker";
+
+static llvm::GlobalVariable *
----------------
yxsamliu wrote:

Done. Factored this into a generic “pointer is inside named section” helper and used it for `__amdgpu_constant`.

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


More information about the cfe-commits mailing list