Skip to content

Commit e4eec51

Browse files
sushmaunnibhavixgupta
authored and
xgupta
committed
[DOCS] Added example for G_EXTRACT and G_INSERT
Reviewed By: xgupta, gargaroff Differential Revision: https://reviews.llvm.org/D101227
1 parent 4f4aa7b commit e4eec51

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

llvm/docs/GlobalISel/GenericOpcode.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,11 +186,19 @@ Extract a register of the specified size, starting from the block given by
186186
index. This will almost certainly be mapped to sub-register COPYs after
187187
register banks have been selected.
188188

189+
.. code-block:: none
190+
191+
%3:_(s32) = G_EXTRACT %2:_(s64), 32
192+
189193
G_INSERT
190194
^^^^^^^^
191195

192196
Insert a smaller register into a larger one at the specified bit-index.
193197

198+
.. code-block:: none
199+
200+
%2:_(s64) = G_INSERT %0:(_s64), %1:_(s32), 0
201+
194202
G_MERGE_VALUES
195203
^^^^^^^^^^^^^^
196204

0 commit comments

Comments
 (0)