[DOCS] Added example for G_EXTRACT and G_INSERT
authorSushma Unnibhavi <sushmaunnibhavi@gmail.com>
Wed, 5 May 2021 10:11:23 +0000 (15:41 +0530)
committerxgupta <shivam98.tkg@rediffmail.com>
Wed, 5 May 2021 10:17:35 +0000 (15:47 +0530)
Reviewed By: xgupta, gargaroff

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

llvm/docs/GlobalISel/GenericOpcode.rst

index 0ceaa5b..6f0d7b5 100644 (file)
@@ -186,11 +186,19 @@ Extract a register of the specified size, starting from the block given by
 index. This will almost certainly be mapped to sub-register COPYs after
 register banks have been selected.
 
+.. code-block:: none
+
+  %3:_(s32) = G_EXTRACT %2:_(s64), 32
+
 G_INSERT
 ^^^^^^^^
 
 Insert a smaller register into a larger one at the specified bit-index.
 
+.. code-block:: none
+
+  %2:_(s64) = G_INSERT %0:(_s64), %1:_(s32), 0
+
 G_MERGE_VALUES
 ^^^^^^^^^^^^^^