//
// The LLVM Compiler Infrastructure
//
-// This file was developed by the LLVM research group and is distributed under
-// the University of Illinois Open Source License. See LICENSE.TXT for details.
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
///
/// 31--------------16-----------8-------------0
/// | Vector length | Precision | Simple type |
- /// | Vector element |
+ /// | | Vector element |
+ ///
+ /// Note that the verifier currently requires the top bit to be zero.
typedef uint32_t ValueType;
}
}
+ /// MVT::getStoreSizeInBits - Return the number of bits overwritten by a
+ /// store of the specified value type.
+ ///
+ static inline unsigned getStoreSizeInBits(ValueType VT) {
+ return (getSizeInBits(VT) + 7)/8*8;
+ }
+
/// MVT::getIntegerType - Returns the ValueType that represents an integer
/// with the given number of bits.
///
if (NumElements == 2) return MVT::v2f64;
break;
}
- ValueType Result = VT | ((NumElements + 1) << (32 - VectorBits));
+ // Set the length with the top bit forced to zero (needed by the verifier).
+ ValueType Result = VT | (((NumElements + 1) << (33 - VectorBits)) >> 1);
assert(getVectorElementType(Result) == VT &&
"Bad vector element type!");
assert(getVectorNumElements(Result) == NumElements &&