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

Shilei Tian via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 14 22:00:12 PDT 2026


================
@@ -356,6 +356,7 @@ def __builtin_amdgcn_fcmpf : AMDGPUBuiltin<"uint64_t(float, float, _Constant int
 //===----------------------------------------------------------------------===//
 def __builtin_amdgcn_is_shared : AMDGPUBuiltin<"bool(void const address_space<0> *)", [Const]>;
 def __builtin_amdgcn_is_private : AMDGPUBuiltin<"bool(void const address_space<0> *)", [Const]>;
+def __builtin_amdgcn_is_constant : AMDGPUBuiltin<"bool(void const address_space<0> *)", [Const]>;
----------------
shiltian wrote:

I thought we could reuse 90% of the code for `__builtin_amdgcn_is_shared`. Why does it have to be so complicated?

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


More information about the cfe-commits mailing list