diff --git a/llvm/docs/GlobalISel/GenericOpcode.rst b/llvm/docs/GlobalISel/GenericOpcode.rst --- a/llvm/docs/GlobalISel/GenericOpcode.rst +++ b/llvm/docs/GlobalISel/GenericOpcode.rst @@ -798,9 +798,18 @@ G_JUMP_TABLE ^^^^^^^^^^^^ -.. caution:: +Generates a pointer to the address of the jump table specified by the source +operand. The source operand is a jump table index. A jump table is an array +of addresses the CPU should jump to based on certain conditions. +G_JUMP_TABLE can be used in conjunction with G_BRJT to support jump table +codegen with GlobalISel. + +.. code-block:: none + + %dst:_(p0) = G_JUMP_TABLE %jump-table.0 + +The above example generates a pointer to the source jump table index. - I found no documentation for this instruction at the time of writing. G_INTRINSIC, G_INTRINSIC_W_SIDE_EFFECTS ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^