[clang] [llvm] [IR][HLSL] Add llvm.structured.gep instruction (PR #176145)
Nathan Gauër via cfe-commits
cfe-commits at lists.llvm.org
Thu Jan 15 06:59:59 PST 2026
================
@@ -14991,6 +14991,188 @@ Semantics:
See the description for :ref:`llvm.stacksave <int_stacksave>`.
+.. _i_structured_gep:
+
+'``llvm.structured.gep``' Intrinsic
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+Syntax:
+"""""""
+
+::
+
+ declare <ret_type>
+ @llvm.structured.gep(ptr elementtype(<basetype>) <source>
+ {, [i32/i64] <index> }*)
+
+Overview:
+"""""""""
+
+The '``llvm.structured.gep``' intrinsic (structured **G**\ et\ **E**\ lement\ **P**\ tr) computes a new pointer address
+resulting of a logical indexing into the ``<source>`` pointer. The returned
+address depends on the indices and may depend on the layout of %basetype at
+runtime.
+
+Arguments:
+""""""""""
+
+``<ty> basetype``:
+The actual value passed is ignored, and should be ``poison``.
----------------
Keenuts wrote:
changed to merge with the line below.
https://github.com/llvm/llvm-project/pull/176145
More information about the cfe-commits
mailing list