Skip to content

Commit ed19ef7

Browse files
authored
[NVPTX][docs] Add isspacep.* to usage doc (llvm#114839)
1 parent 6c3704d commit ed19ef7

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

llvm/docs/NVPTXUsage.rst

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,36 @@ The ``@llvm.nvvm.fence.proxy.tensormap_generic.*`` is a uni-directional fence us
250250

251251
The address operand ``addr`` and the operand ``size`` together specify the memory range ``[addr, addr+size)`` on which the ordering guarantees on the memory accesses across the proxies is to be provided. The only supported value for the ``size`` operand is ``128`` and must be an immediate. Generic Addressing is used unconditionally, and the address specified by the operand addr must fall within the ``.global`` state space. Otherwise, the behavior is undefined. For more information, see `PTX ISA <https://docs.nvidia.com/cuda/parallel-thread-execution/#parallel-synchronization-and-communication-instructions-membar>`_.
252252

253+
Address Space Intrinsics
254+
------------------------
255+
256+
'``llvm.nvvm.isspacep.*``' Intrinsics
257+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
258+
259+
Syntax:
260+
"""""""
261+
262+
.. code-block:: llvm
263+
264+
declare i1 @llvm.nvvm.isspacep.const(ptr %p)
265+
declare i1 @llvm.nvvm.isspacep.global(ptr %p)
266+
declare i1 @llvm.nvvm.isspacep.local(ptr %p)
267+
declare i1 @llvm.nvvm.isspacep.shared(ptr %p)
268+
declare i1 @llvm.nvvm.isspacep.shared.cluster(ptr %p)
269+
270+
Overview:
271+
"""""""""
272+
273+
The '``llvm.nvvm.isspacep.*``' intrinsics determine whether the provided generic
274+
pointer references memory which falls within a particular address space.
275+
276+
Semantics:
277+
""""""""""
278+
279+
If the given pointer in the generic address space refers to memory which falls
280+
within the state space of the intrinsic (and therefore could be safely address
281+
space casted to this space), 1 is returned, otherwise 0 is returned.
282+
253283
Arithmetic Intrinsics
254284
---------------------
255285

0 commit comments

Comments
 (0)