SimpleTy <= MVT::LAST_VECTOR_VALUETYPE);
}
- /// isPow2VectorType - Retuns true if the given vector is a power of 2.
+ /// isPow2VectorType - Returns true if the given vector is a power of 2.
bool isPow2VectorType() const {
unsigned NElts = getVectorNumElements();
return !(NElts & (NElts - 1));
/// isFloatingPoint - Return true if this is a FP, or a vector FP type.
bool isFloatingPoint() const {
- return isSimple() ?
- ((V >= MVT::f32 && V <= MVT::ppcf128) ||
- (V >= MVT::v2f32 && V <= MVT::v4f64)) : isExtendedFloatingPoint();
+ return isSimple() ? V.isFloatingPoint() : isExtendedFloatingPoint();
}
/// isInteger - Return true if this is an integer, or a vector integer type.
bool isInteger() const {
- return isSimple() ?
- ((V >= MVT::FIRST_INTEGER_VALUETYPE &&
- V <= MVT::LAST_INTEGER_VALUETYPE) ||
- (V >= MVT::v2i8 && V <= MVT::v4i64)) : isExtendedInteger();
+ return isSimple() ? V.isInteger() : isExtendedInteger();
}
/// isVector - Return true if this is a vector value type.
bool isVector() const {
- return isSimple() ?
- (V >= MVT::FIRST_VECTOR_VALUETYPE && V <=
- MVT::LAST_VECTOR_VALUETYPE) :
- isExtendedVector();
+ return isSimple() ? V.isVector() : isExtendedVector();
}
/// is64BitVector - Return true if this is a 64-bit vector type.
/// bitsEq - Return true if this has the same number of bits as VT.
bool bitsEq(EVT VT) const {
+ if (EVT::operator==(VT)) return true;
return getSizeInBits() == VT.getSizeInBits();
}
/// bitsGT - Return true if this has more bits than VT.
bool bitsGT(EVT VT) const {
+ if (EVT::operator==(VT)) return false;
return getSizeInBits() > VT.getSizeInBits();
}
/// bitsGE - Return true if this has no less bits than VT.
bool bitsGE(EVT VT) const {
+ if (EVT::operator==(VT)) return true;
return getSizeInBits() >= VT.getSizeInBits();
}
/// bitsLT - Return true if this has less bits than VT.
bool bitsLT(EVT VT) const {
+ if (EVT::operator==(VT)) return false;
return getSizeInBits() < VT.getSizeInBits();
}
/// bitsLE - Return true if this has no more bits than VT.
bool bitsLE(EVT VT) const {
+ if (EVT::operator==(VT)) return true;
return getSizeInBits() <= VT.getSizeInBits();
}
static EVT getEVT(const Type *Ty, bool HandleUnknown = false);
intptr_t getRawBits() {
- if (V.SimpleTy <= MVT::LastSimpleValueType)
+ if (isSimple())
return V.SimpleTy;
else
return (intptr_t)(LLVMTy);