llvm::canVectorizeTy

Returns true 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.

Synopsis

Declared in <llvm/IR/VectorTypeUtils.h>

bool
canVectorizeTy(Type* Ty);

Parameters

NameDescription
TyThe instances of the Type class are immutable: once they are created, they are never changed. Also note that only one instance of a particular type is ever created. Thus seeing if two types are equal is a matter of doing a trivial pointer comparison. To enforce that no two equal instances are created, Type instances can only be created via static factory methods in class Type and in derived classes. Once allocated, Types are never free'd.