[clang] [Clang][AMDGPU] Add builtins for instrinsic `llvm.amdgcn.raw.buffer.store` (PR #94576)

Matt Arsenault via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 6 01:56:04 PDT 2024


arsenm wrote:

> Is there really a good use case for this? Can you use regular stores to addrspace(7) instead? @krzysz00

I see these regularly used via inline asm in various ML code. We need to expose these in some way to stop people from doing that 

> 
> Also, do you really need a separate builtin for every legal type, or is there some way they can be type-overloaded?

Yes, I imagined we would handle images similar to the elementwise intrinsics. However, I don't think that approach works for loads. If we have to have overloads for loads, we probably should mirror it for stores.

I think it makes more sense to solve the issue for the load case before the stores. They're a bit more complicated because you have the sign vs. zero extended cases to consider, and the overload would be on the return type 

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


More information about the cfe-commits mailing list