vector.index_cast
← vector dialect
Lanewise integer conversion at an address boundary. Index uses a signed target-selected carrier and offset uses an independently selected unsigned carrier. Each lane follows index.cast semantics, including 0/1 conversion for i1, source-domain signedness, low-bit preservation when narrowing, and destination representability. Source and result shapes match exactly. Pure fixed-width integer changes use the ordinary vector extension and truncation ops.
Operation contract
| Property |
Value |
| Semantic phase |
executable |
| Traits |
Pure, Elementwise, Decomposable, DistributionTransfer |
Signature
| Kind |
Name |
Type |
Cardinality |
Description |
| Operand |
input |
vector |
required |
— |
| Result |
result |
vector |
required |
— |
Verification constraints
SameKind(input, result)
SameShape(input, result)
Examples
%indices = vector.index_cast %lanes : vector<16xi32> to vector<16xindex>
%bytes = vector.index_cast %raw : vector<8xi64> to vector<8xoffset>