Skip to content

Commit 843da6f

Browse files
committed
[docs][GlobalISel]Adding info for G_JUMP_TABLE generic opcode
Added description of jump table and G_JUMP_TABLE opcode. Differential Revision: https://reviews.llvm.org/D107630
1 parent efa340f commit 843da6f

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

llvm/docs/GlobalISel/GenericOpcode.rst

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -822,9 +822,17 @@ Indirect branch to jump table entry
822822
G_JUMP_TABLE
823823
^^^^^^^^^^^^
824824

825-
.. caution::
825+
Generates a pointer to the address of the jump table specified by the source
826+
operand. The source operand is a jump table index.
827+
G_JUMP_TABLE can be used in conjunction with G_BRJT to support jump table
828+
codegen with GlobalISel.
829+
830+
.. code-block:: none
831+
832+
%dst:_(p0) = G_JUMP_TABLE %jump-table.0
833+
834+
The above example generates a pointer to the source jump table index.
826835

827-
I found no documentation for this instruction at the time of writing.
828836

829837
G_INTRINSIC, G_INTRINSIC_W_SIDE_EFFECTS
830838
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

0 commit comments

Comments
 (0)