[llvm] e4eec51 - [DOCS] Added example for G_EXTRACT and G_INSERT

via llvm-commits llvm-commits at lists.llvm.org
Wed May 5 03:18:47 PDT 2021


Author: Sushma Unnibhavi
Date: 2021-05-05T15:47:35+05:30
New Revision: e4eec519370b7bf42f31d51f7730e5c91cb53d18

URL: https://github.com/llvm/llvm-project/commit/e4eec519370b7bf42f31d51f7730e5c91cb53d18
DIFF: https://github.com/llvm/llvm-project/commit/e4eec519370b7bf42f31d51f7730e5c91cb53d18.diff

LOG:  [DOCS] Added example for G_EXTRACT and G_INSERT

Reviewed By: xgupta, gargaroff

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

Added: 
    

Modified: 
    llvm/docs/GlobalISel/GenericOpcode.rst

Removed: 
    


################################################################################
diff  --git a/llvm/docs/GlobalISel/GenericOpcode.rst b/llvm/docs/GlobalISel/GenericOpcode.rst
index 0ceaa5b6f8497..6f0d7b5b4a6e9 100644
--- a/llvm/docs/GlobalISel/GenericOpcode.rst
+++ b/llvm/docs/GlobalISel/GenericOpcode.rst
@@ -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
 ^^^^^^^^^^^^^^
 


        


More information about the llvm-commits mailing list