35 return canVectorizeTy(Ty) && !Ty->isX86_FP80Ty() && !Ty->isPPC_FP128Ty() &&
41 return SI->getValueOperand()->getType();
44 return CI->getOperand(0)->getType();
47 return IE->getOperand(1)->getType();
49 return IV->getOperand(1)->getType();
61 "expected unpacked struct literal");
63 "expected all element types to be valid vector element types");
65 StructTy->getContext(),
67 return FixedVectorType::get(ElTy, 1);
77 unsigned Sz,
bool ReVec) {
82 if (NumParts == 0 || NumParts >= Sz)
88 Type *Ty,
unsigned Sz,
bool ReVec) {
93 if (NumParts == 0 || NumParts >= Sz)
98 return (Sz / RegVF) * RegVF;
102 unsigned Opcode,
Type *ScalarTy,
103 unsigned NumElts,
bool ReVec) {
106 unsigned PaddedNumElts =
108 if (PaddedNumElts == NumElts)
114 unsigned Sz,
bool ReVec) {
124 return NumParts > 0 && NumParts < Sz &&
has_single_bit(Sz / NumParts) &&
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
This file implements the C++20 <bit> header.
static const uint32_t IV[8]
static constexpr ElementCount getFixed(ScalarTy MinVal)
Class to represent fixed width SIMD vectors.
static LLVM_ABI FixedVectorType * get(Type *ElementType, unsigned NumElts)
static LLVM_ABI StructType * get(LLVMContext &Context, ArrayRef< Type * > Elements, bool isPacked=false)
This static method is the primary way to create a literal StructType.
The instances of the Type class are immutable: once they are created, they are never changed.
LLVM Value Representation.
static LLVM_ABI bool isValidElementType(Type *ElemTy)
Return true if the specified type is valid as a element type.
A private "module" namespace for types and utilities used by this pass.
unsigned getFloorFullVectorNumberOfElements(const TargetTransformInfo &TTI, Type *Ty, unsigned Sz, bool ReVec)
Returns the number of elements of the given type Ty, not greater than Sz, which forms type,...
unsigned getNumElements(Type *Ty)
Type * getWidenedType(Type *ScalarTy, unsigned VF)
bool hasFullVectorsOrPowerOf2(const TargetTransformInfo &TTI, Type *Ty, unsigned Sz, bool ReVec)
Returns true if widened type of Ty elements with size Sz represents full vector type,...
FixedVectorType * getMaskedDivRemType(const TargetTransformInfo &TTI, unsigned Opcode, Type *ScalarTy, unsigned NumElts, bool ReVec)
For a non-power-of-2 NumElts-wide integer div/rem Opcode, returns the padded full-register vector typ...
bool isValidElementType(Type *Ty, bool ReVec)
Predicate for the element types that the SLP vectorizer supports.
Type * getValueType(Value *V, bool ReVec, bool LookThroughCmp)
Returns the "element type" of the given value/instruction V.
unsigned getFullVectorNumberOfElements(const TargetTransformInfo &TTI, Type *Ty, unsigned Sz, bool ReVec)
Returns the number of elements of the given type Ty, not less than Sz, which forms type,...
This is an optimization pass for GlobalISel generic memory operations.
bool all_of(R &&range, UnaryPredicate P)
Provide wrappers to std::all_of which take ranges instead of having to pass begin/end explicitly.
Type * toScalarizedTy(Type *Ty)
A helper for converting vectorized types to scalarized (non-vector) types.
decltype(auto) dyn_cast(const From &Val)
dyn_cast<X> - Return the argument parameter cast to the specified type.
bool isUnpackedStructLiteral(StructType *StructTy)
auto map_to_vector(ContainerTy &&C, FuncTy &&F)
Map a range to a SmallVector with element types deduced from the mapping.
bool isVectorizedTy(Type *Ty)
Returns true if Ty is a vector type or a struct of vector types where all vector types share the same...
T bit_ceil(T Value)
Returns the smallest integral power of two no smaller than Value if Value is nonzero.
constexpr bool has_single_bit(T Value) noexcept
ElementCount getVectorizedTypeVF(Type *Ty)
Returns the number of vector elements for a vectorized type.
Type * toVectorizedTy(Type *Ty, ElementCount EC)
A helper for converting to vectorized types.
bool isa(const From &Val)
isa<X> - Return true if the parameter to the template is an instance of one of the template type argu...
constexpr T divideCeil(U Numerator, V Denominator)
Returns the integer ceil(Numerator / Denominator).
bool canVectorizeTy(Type *Ty)
Returns true if Ty is a valid vector element type, void, or an unpacked literal struct where all elem...
decltype(auto) cast(const From &Val)
cast<X> - Return the argument parameter cast to the specified type.
T bit_floor(T Value)
Returns the largest integral power of two no greater than Value if Value is nonzero.