← scalar dialect
Extract one fixed integer bitfield and zero-extend it into the result.
Operation contract
| Property |
Value |
| Semantic phase |
executable |
| Traits |
Pure, DistributionTransfer |
Signature
| Kind |
Name |
Type |
Cardinality |
Description |
| Operand |
source |
integer |
required |
— |
| Result |
result |
integer |
required |
— |
| Attribute |
offset |
i64 |
required |
Least-significant bit position of the field within the source. |
| Attribute |
width |
i64 |
required |
Number of bits in the extracted field. |
Verification constraints
SameKind(source, result)
BitRangeWithinElementWidth(source, offset, width)
ElementWidthAtLeastAttr(result, width)
Examples
%byte = scalar.bitfield.extractu %word {offset = 8, width = 8} : i32 -> i32