toVectorTy overloads

Synopses

Declared in <llvm/IR/VectorTypeUtils.h>

Convert a scalar type to a vector type.

Type*
toVectorTy(
    Type* Scalar,
    ElementCount EC);

Convert a scalar type to a fixed‐length vector type.

Type*
toVectorTy(
    Type* Scalar,
    unsigned int VF);

Return Value

  • The vector type with element type Scalar and element count EC, or Scalar when it is void/metadata or EC is scalar.

  • The fixed‐length vector type with element type Scalar and length VF.

Parameters

Name

Description

Scalar

Scalar (or void/metadata) type to widen.

EC

Element count of the resulting vector.

VF

Fixed vector length (number of elements).

Created with MrDocs