Skip to content

vector.constantf

← vector dialect

Materialize a non-empty all-static floating-point vector from ordered binary64 literal lanes. Values use logical row-major lane order, and their count must match the result shape. The result element type determines each lane's target floating-point format. Uniform literals canonicalize to vector.splatf; target legalization expands remaining literals through the shared scalar construction path.

Operation contract

Property Value
Semantic phase executable
Traits Pure, ConstantLike

Signature

Kind Name Type Cardinality Description
Result result vector required —
Attribute values f64_array required Ordered binary64 lanes.

Verification constraints

  • HasAllStaticVector(result)
  • HasFloatElement(result)

Examples

%v = vector.constantf [1.0, -2.0, 3.5, 4.0] : vector<2x2xf16>