[WinEH] Create an llvm.x86.seh.exceptioninfo intrinsic
[oota-llvm.git] / include / llvm / CodeGen / ValueTypes.h
index b5dc14a7047b7fe30bcb664d99f3c4d2d71ea00c..e1a9fd38290ba20846d33687181ece75726ecbb9 100644 (file)
@@ -34,10 +34,9 @@ namespace llvm {
     Type *LLVMTy;
 
   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) {}
+    LLVM_CONSTEXPR EVT() : V(MVT::INVALID_SIMPLE_VALUE_TYPE), LLVMTy(nullptr) {}
+    LLVM_CONSTEXPR EVT(MVT::SimpleValueType SVT) : V(SVT), LLVMTy(nullptr) {}
+    LLVM_CONSTEXPR EVT(MVT S) : V(S), LLVMTy(nullptr) {}
 
     bool operator==(EVT VT) const {
       return !(*this != VT);
@@ -280,6 +279,14 @@ namespace llvm {
       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();