scalar.subborrowui
← scalar dialect
Unsigned integer subtraction returning the width-wrapped difference and an i1 borrow that is set exactly when lhs is less than rhs.
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 |
difference |
integer |
required |
— |
| Result |
borrow |
i1 |
required |
— |
Verification constraints
SameType(lhs, rhs, difference)
Examples
%difference, %borrow = scalar.subborrowui %lhs, %rhs : i32