Skip to content

vector.from_elements

← vector dialect

Build an all-static vector from scalar element operands in logical lane order. The result vector type defines both the lane count and element type: the number of operands must equal the static element count, and every operand must have the vector element type.

Operation contract

Property Value
Semantic phase executable
Traits Pure

Signature

Kind Name Type Cardinality Description
Operand elements scalar variadic —
Result result vector required —

Verification constraints

  • HasAllStaticVector(result)
  • SameElementType(elements, result)
  • ValueCountMatchesStaticElementCount(result, elements)

Examples

%v = vector.from_elements %a, %b, %c, %d : vector<4xf32>