15 #ifndef LLVM_CODEGEN_MACHINEVALUETYPE_H
16 #define LLVM_CODEGEN_MACHINEVALUETYPE_H
248 : Min(Min), Scalable(Scalable) {}
273 constexpr
MVT() =
default;
393 return !(NElts & (NElts - 1));
634 "in codegen and has no size");
689 case f80 :
return 80;
982 struct mvt_iterator {
988 bool operator!=(
const mvt_iterator &LHS)
const {
return VT != LHS.VT; }
990 mvt_iterator& operator++() {
993 "MVT iterator overflowed.");
999 using mvt_range = iterator_range<mvt_iterator>;
1049 #endif // LLVM_CODEGEN_MACHINEVALUETYPE_H
bool is16BitVector() const
Return true if this is a 16-bit vector type.
static MVT getIntegerVT(unsigned BitWidth)
unsigned Log2_32_Ceil(uint32_t Value)
Return the ceil log base 2 of the specified value, 32 if the value is zero.
bool is1024BitVector() const
Return true if this is a 1024-bit vector type.
ElementCount & operator/=(unsigned RHS)
static MVT getVectorVT(MVT VT, unsigned NumElements)
This provides a very simple, boring adaptor for a begin and end iterator into a range type...
unsigned getScalarSizeInBits() const
bool is512BitVector() const
Return true if this is a 512-bit vector type.
bool operator>=(const MVT &S) const
static MVT getFloatingPointVT(unsigned BitWidth)
unsigned getSizeInBits() const
bool is32BitVector() const
Return true if this is a 32-bit vector type.
bool bitsLT(MVT VT) const
Return true if this has less bits than VT.
static MVT getScalableVectorVT(MVT VT, unsigned NumElements)
constexpr MVT(SimpleValueType SVT)
bool bitsLE(MVT VT) const
Return true if this has no more bits than VT.
bool operator!=(const MVT &S) const
MVT getScalarType() const
If this is a vector, return the element type, otherwise return this.
static MVT getVectorVT(MVT VT, MVT::ElementCount EC)
unsigned getStoreSize() const
Return the number of bytes overwritten by a store of the specified value type.
APInt operator*(APInt a, uint64_t RHS)
bool bitsGE(MVT VT) const
Return true if this has no less bits than VT.
bool operator==(const MVT &S) const
static mvt_range integer_vector_valuetypes()
bool isScalarInteger() const
Return true if this is an integer, not including vectors.
ElementCount(unsigned Min, bool Scalable)
bool isScalableVector() const
Return true if this is a vector value type where the runtime length is machine dependent.
bool operator<(const MVT &S) const
static mvt_range fp_vector_valuetypes()
ElementCount operator*(unsigned RHS)
bool isInteger() const
Return true if this is an integer or a vector integer type.
unsigned getVectorNumElements() const
The instances of the Type class are immutable: once they are created, they are never changed...
bool isVector() const
Return true if this is a vector value type.
bool operator<=(const MVT &S) const
bool isFloatingPoint() const
Return true if this is a FP or a vector FP type.
bool isPow2VectorType() const
Returns true if the given vector is a power of 2.
MVT::ElementCount getVectorElementCount() const
static mvt_range fp_valuetypes()
ElementCount & operator*=(unsigned RHS)
static mvt_range vector_valuetypes()
static MVT getVT(Type *Ty, bool HandleUnknown=false)
Return the value type corresponding to the specified type.
bool isOverloaded() const
Return true if this is an overloaded type for TableGen.
static mvt_range integer_scalable_vector_valuetypes()
static mvt_range fp_scalable_vector_valuetypes()
bool is64BitVector() const
Return true if this is a 64-bit vector type.
static mvt_range integer_valuetypes()
bool is128BitVector() const
Return true if this is a 128-bit vector type.
A range adaptor for a pair of iterators.
llvm_unreachable("Unknown RegBank!")
static mvt_range all_valuetypes()
SimpleValueType Iteration.
static MVT getVectorVT(MVT VT, unsigned NumElements, bool IsScalable)
bool isValid() const
Return true if this is a valid simple valuetype.
bool is256BitVector() const
Return true if this is a 256-bit vector type.
unsigned getStoreSizeInBits() const
Return the number of bits overwritten by a store of the specified value type.
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
bool operator>(const MVT &S) const
bool bitsGT(MVT VT) const
Return true if this has more bits than VT.
bool is2048BitVector() const
Return true if this is a 1024-bit vector type.
MVT getPow2VectorType() const
Widens the length of the given vector MVT up to the nearest power of 2 and returns that type...
MVT getVectorElementType() const
ElementCount operator/(unsigned RHS)
bool operator==(const ElementCount &RHS)