[llvm] [NVPTX][docs] Add isspacep.* to usage doc (PR #114839)
Alex MacLean via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 4 09:47:44 PST 2024
https://github.com/AlexMaclean created https://github.com/llvm/llvm-project/pull/114839
None
>From ab58488b42bf45b53123ad74672338231c92ec31 Mon Sep 17 00:00:00 2001
From: Alex Maclean <amaclean at nvidia.com>
Date: Mon, 4 Nov 2024 17:09:53 +0000
Subject: [PATCH] [NVPTX][docs] Add isspacep.* to usage doc
---
llvm/docs/NVPTXUsage.rst | 30 ++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)
diff --git a/llvm/docs/NVPTXUsage.rst b/llvm/docs/NVPTXUsage.rst
index f225b9e8bd268b..eed68155c73193 100644
--- a/llvm/docs/NVPTXUsage.rst
+++ b/llvm/docs/NVPTXUsage.rst
@@ -250,6 +250,36 @@ The ``@llvm.nvvm.fence.proxy.tensormap_generic.*`` is a uni-directional fence us
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>`_.
+Address Space Intrinsics
+------------------------
+
+'``llvm.nvvm.isspacep.*``' Intrinsics
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+Syntax:
+"""""""
+
+.. code-block:: llvm
+
+ declare i1 @llvm.nvvm.isspacep.const(ptr %p)
+ declare i1 @llvm.nvvm.isspacep.global(ptr %p)
+ declare i1 @llvm.nvvm.isspacep.local(ptr %p)
+ declare i1 @llvm.nvvm.isspacep.shared(ptr %p)
+ declare i1 @llvm.nvvm.isspacep.shared.cluster(ptr %p)
+
+Overview:
+"""""""""
+
+The '``llvm.nvvm.isspacep.*``' intrinsics determine whether the provided generic
+pointer references memory which falls within a particular address space.
+
+Semantics:
+""""""""""
+
+If the given pointer in the generic address space refers to memory which falls
+within the state space of the intrinsic (and therefore could be safely address
+space casted to this space), 1 is returned, otherwise 0 is returned.
+
Arithmetic Intrinsics
---------------------
More information about the llvm-commits
mailing list