index.add
← index dialect
Address-domain addition. Operands and result must all be index or all offset. Offset addition wraps modulo the selected target's unsigned offset carrier.
Operation contract
| Property |
Value |
| Semantic phase |
executable |
| Traits |
Pure, Commutative, DistributionTransfer |
Signature
| Kind |
Name |
Type |
Cardinality |
Description |
| Operand |
lhs |
address |
required |
— |
| Operand |
rhs |
address |
required |
— |
| Result |
result |
address |
required |
— |
Verification constraints
SameType(lhs, rhs, result)
Examples
%r = index.add %lhs, %rhs : index
%bytes = index.add %base, %delta : offset