llvm::canVectorizeTy

Returns true if Ty can be used as a vector element or vectorized struct.

Synopsis

Declared in <llvm/IR/VectorTypeUtils.h>

bool
canVectorizeTy(Type* Ty);

Description

That is, if Ty is a valid vector element type, void, or an unpacked literal struct where all elements are valid vector element types. Note: Even if a type can be vectorized that does not mean it is valid to do so in all cases. For example, a vectorized struct (as returned by toVectorizedTy) does not perform (de)interleaving, so it can't be used for vectorizing loads/stores.

Return Value

True if Ty can be used as a vector element or vectorized struct.

Parameters

NameDescription
TyType to test for vectorizability.