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

PoojaYadav via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 11 10:45:48 PDT 2021


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

Updated with required changes with sentences of the G_JUMP_TABLE documentation.


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,20 @@
 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:_(s32) = G_JUMP_TABLE %jump-table.0
+
+The above example shows assignment of pointer to jump table of given index.
+Source operand must be a jump table index.
+Destination operand must have a pointer type. 
 
-  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.365799.patch
Type: text/x-patch
Size: 990 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210811/38325211/attachment.bin>


More information about the llvm-commits mailing list