scalar.addcarryui
← scalar dialect
Unsigned integer addition returning the width-wrapped sum and an i1 carry that is set exactly when the mathematical sum does not fit in the result width.
Operation contract
| Property |
Value |
| Semantic phase |
executable |
| Traits |
Pure, DistributionTransfer, SafeToSpeculate |
Signature
| Kind |
Name |
Type |
Cardinality |
Description |
| Operand |
lhs |
integer |
required |
— |
| Operand |
rhs |
integer |
required |
— |
| Result |
sum |
integer |
required |
— |
| Result |
carry |
i1 |
required |
— |
Verification constraints
Examples
%sum, %carry = scalar.addcarryui %lhs, %rhs : i32