[clang] [Clang][AMDGPU] Add __builtin_amdgcn_s_buffer_load_<T> (PR #203352)

via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 15 07:08:40 PDT 2026


macurtis-amd wrote:

> ... Ok, actually, I've had a thought - could you make this thing take a buffer_rsrc_t and emit it with a bitcast?
> 
> Because that can lead to a world where `__builtin_s_buffer_load` maps to `llvm.amdgcn.raw.buffer.load` with the appropriate flags set (noclobber etc.).
> 
> But that's kinda a nice-to-have.

Updated intrinsics to take `__amdgpu_buffer_rsrc_t` but there is no checking to ensure that it is valid for `llvm.amdgcn.s.buffer.load`. This seems consistent with other builtins that take a `__amdgpu_buffer_rsrc_t`.


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


More information about the cfe-commits mailing list