Skip to content

vector.bitcast

vector dialect

Bitwise reinterpretation between vector register types with the same total bit count. No numeric conversion is performed; only the lane shape and element interpretation change.

Operation contract

Property Value
Semantic phase executable
Traits Pure

Signature

Kind Name Type Cardinality Description
Operand input vector required
Result result vector required

Verification constraints

  • TotalBitCountEqual(input, result)

Examples

%r = vector.bitcast %input : vector<16xf32> to vector<16xi32>
%s = vector.bitcast %bytes : vector<2xi8> to vector<1xf16>