[docs][GlobalISel]Adding info for G_JUMP_TABLE generic opcode
authorpooja2299 <pyadav2299@gmail.com>
Thu, 5 Aug 2021 18:24:56 +0000 (23:54 +0530)
committerpooja2299 <pyadav2299@gmail.com>
Mon, 30 Aug 2021 19:11:28 +0000 (00:41 +0530)
Added description of jump table and G_JUMP_TABLE opcode.

Differential Revision: https://reviews.llvm.org/D107630

llvm/docs/GlobalISel/GenericOpcode.rst

index 5bfff8f..3f21158 100644 (file)
@@ -822,9 +822,17 @@ Indirect branch to jump table entry
 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.
+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
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^