[PATCH] D101227: Added example for G_EXTRACT and G_INSERT [DOCS]

Sushma Unnibhavi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Apr 24 00:57:50 PDT 2021


sushmaunnibhavi created this revision.
sushmaunnibhavi added a reviewer: xgupta.
sushmaunnibhavi requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D101227

Files:
  llvm/docs/GlobalISel/GenericOpcode.rst


Index: llvm/docs/GlobalISel/GenericOpcode.rst
===================================================================
--- llvm/docs/GlobalISel/GenericOpcode.rst
+++ llvm/docs/GlobalISel/GenericOpcode.rst
@@ -186,11 +186,17 @@
 index. This will almost certainly be mapped to sub-register COPYs after
 register banks have been selected.
 
+.. code-block:: none
+  %res = G_EXTRACT <1 x i32> %vec, i32 0
+
 G_INSERT
 ^^^^^^^^
 
 Insert a smaller register into a larger one at the specified bit-index.
 
+.. code-block:: none
+%vec = G_INSERT <1 x i32> undef, i32 %elt, i32 0
+
 G_MERGE_VALUES
 ^^^^^^^^^^^^^^
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D101227.340248.patch
Type: text/x-patch
Size: 604 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210424/dbdbff47/attachment.bin>


More information about the llvm-commits mailing list