[PATCH] D107630: [docs][GlobalISel]Adding info for G_JUMP_TABLE generic opcode

PoojaYadav via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 17 04:47:20 PDT 2021


pooja2299 updated this revision to Diff 366861.
pooja2299 added a comment.

Improved the description of G_JUMP_TABLE


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D107630/new/

https://reviews.llvm.org/D107630

Files:
  llvm/docs/GlobalISel/GenericOpcode.rst


Index: llvm/docs/GlobalISel/GenericOpcode.rst
===================================================================
--- llvm/docs/GlobalISel/GenericOpcode.rst
+++ llvm/docs/GlobalISel/GenericOpcode.rst
@@ -798,9 +798,19 @@
 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. Source 
+operand must be a jump table index.
 
-  I found no documentation for this instruction at the time of writing.
 
 G_INTRINSIC, G_INTRINSIC_W_SIDE_EFFECTS
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D107630.366861.patch
Type: text/x-patch
Size: 936 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210817/a378e517/attachment.bin>


More information about the llvm-commits mailing list