[llvm-branch-commits] [clang] [lld] [llvm] [mlir] [RFC][AMDGPU] Add BARRIER address space (PR #195613)

Nicolai Hähnle via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Mon Jun 8 07:37:35 PDT 2026


================
@@ -1139,6 +1140,23 @@ supported for the ``amdgcn`` target.
   a buffer strided pointer, this means that the base pointer is ``align(4)``, that
   the offset is a multiple of 4 bytes, and that the stride is a multiple of 4.
 
+**Barrier**
+  This address space represents barrier IDs (introduced in GFX12) as addresses.
+  It does not map directly to any addressable memory, thus pointers into this address space:
+
+  * Never alias with any other pointers outside this address space.
+  * Cannot be dereferenced.
+  * Can only be consumed by intrinsics.
+  * Are always uniform.
----------------
nhaehnle wrote:

I don't think this is accurate. You can only use uniform pointers with the intrinsics, but that doesn't mean that every pointer value is inherently uniform. Somebody could have a divergent pointer value and wrap barrier intrinsics with a waterfall loop. Not that it makes a lot of sense to do so, but preventing it doesn't make a lot of sense either? So it'd be best to just delete this bullet point.

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


More information about the llvm-branch-commits mailing list