[clang] [mlir] [llvm] [AMDGPU] - Add address space for strided buffers (PR #74471)

Nicolai Hähnle via cfe-commits cfe-commits at lists.llvm.org
Mon Dec 11 12:41:18 PST 2023


nhaehnle wrote:

>     1. Isn't a strided buffer one where the field that's named something like `stride` (bits 61:48 or 63:48) is non-zero

Yes, and one that is meant to use with buffer instructions using `idxen`.

>     2. And therefore it uses structured buffers and the `llvm.struct[.ptr].buffer.*` intrinsics?

Yes.

>     3. So, with LLVM's gep, how do you tell which field you're GEPing on to?

The intended use is that GEPs affect only the offset part of the fat pointer. The index part is changed using a separate instruction/operation/intrinsic.

>     4. Therefore, is 32-bit index length the right one?

Yes, because that's the index size in the underlying HW.

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


More information about the cfe-commits mailing list