public:
EVT() : V((MVT::SimpleValueType)(MVT::INVALID_SIMPLE_VALUE_TYPE)),
- LLVMTy(0) {}
- EVT(MVT::SimpleValueType SVT) : V(SVT), LLVMTy(0) { }
- EVT(MVT S) : V(S), LLVMTy(0) {}
+ LLVMTy(nullptr) {}
+ EVT(MVT::SimpleValueType SVT) : V(SVT), LLVMTy(nullptr) { }
+ EVT(MVT S) : V(S), LLVMTy(nullptr) {}
bool operator==(EVT VT) const {
return !(*this != VT);
return getIntegerVT(Context, (EVTSize + 1) / 2);
}
+ /// \brief Return a VT for an integer vector type with the size of the
+ /// elements doubled. The typed returned may be an extended type.
+ EVT widenIntegerVectorElementType(LLVMContext &Context) const {
+ EVT EltVT = getVectorElementType();
+ EltVT = EVT::getIntegerVT(Context, 2 * EltVT.getSizeInBits());
+ return EVT::getVectorVT(Context, EltVT, getVectorNumElements());
+ }
+
/// isPow2VectorType - Returns true if the given vector is a power of 2.
bool isPow2VectorType() const {
unsigned NElts = getVectorNumElements();