[llvm] [IR] Implementation and lowering of bitinsert and bitextract (PR #200605)

Pedro Lobo via llvm-commits llvm-commits at lists.llvm.org
Sat Sep 12 11:02:48 PDT 2026


================
@@ -11533,6 +11533,111 @@ The truth table used for the '`xor`' instruction is:
 <result> = xor i32 %V, -1          ; yields i32:result = ~%V
 ```
 
+### Byte Operations
+
+Instructions for bit-range manipulation on {ref}`byte type <t_byte>` values.
+
+(i_bitextract)=
+
+#### '`bitextract`' Instruction
+
+##### Syntax:
+
+```
+<result> = bitextract <ty>, <bty> <source>, i32 <offset>
+```
+
+##### Overview:
+
+The '`bitextract`' instruction reads a contiguous range of bits from a
+{ref}`byte type <t_byte>` value and returns them as a value of type `ty`.
+
+##### Arguments:
+
+`<ty>` is any {ref}`single value type <t_single_value>` and specifies
----------------
pedroclobo wrote:

Agreed. Addressed in efd35c2bd1d6.

https://github.com/llvm/llvm-project/pull/200605


More information about the llvm-commits mailing list