Masked Load / Store Intrinsics - the CodeGen part.
[oota-llvm.git] / include / llvm / CodeGen / ValueTypes.h
index b5dc14a7047b7fe30bcb664d99f3c4d2d71ea00c..4e93940e223ef8295e3376d91b747737bd68453e 100644 (file)
@@ -35,9 +35,9 @@ namespace llvm {
 
   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);
@@ -280,6 +280,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();