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

Krzysztof Drewniak via cfe-commits cfe-commits at lists.llvm.org
Fri Jun 7 08:33:24 PDT 2024


krzysz00 wrote:

1. For the swizzled case, that's `struct.ptr.buffer.*`, and yeah, those will always need builtins because LLVM can't deal in 2D addressing schemes
2. What I mean is that "types that work" isn't the right framing: any type can be legalized to one or more types that work. That is, down in the isel legalizer, if I call for, for example
    ````llvm
    %0 = call {i64, i64, i8} @llvm.amdgcn.raw.buffer.ptr.load(ptr addrspace(8) %rsrc, i32 %off, ...)
     ````
that should become two `BUFFER_LOAD` instructions, one that loads a `<4 x i32>` and one that loads an `i8` from `%off + 16`

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


More information about the cfe-commits mailing list