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

PoojaYadav via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 19 08:59:30 PDT 2021


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

Removed the redundant line.


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,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
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^


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


More information about the llvm-commits mailing list