aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-03-16 19:42:44 +0000
committerChris Lattner <sabre@nondot.org>2006-03-16 19:42:44 +0000
commit804d995f997287572496af0800587a3d4046be60 (patch)
tree75fb67a2b0db342786c4f03ad52a2cd43e4f8494
parent2df992883b2efbcb5aae55c6dc2b50861224e6f9 (diff)
Add markers for the first and last vector value type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26796 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/llvm/CodeGen/ValueTypes.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/include/llvm/CodeGen/ValueTypes.h b/include/llvm/CodeGen/ValueTypes.h
index aed3b5e9a8..206b493801 100644
--- a/include/llvm/CodeGen/ValueTypes.h
+++ b/include/llvm/CodeGen/ValueTypes.h
@@ -48,6 +48,7 @@ namespace MVT { // MVT = Machine Value Types
Vector = 13, // This is an abstract vector type, which will
// be expanded into a target vector type, or scalars
// if no matching vector type is available.
+
v8i8 = 14, // 8 x i8
v4i16 = 15, // 4 x i16
v2i32 = 16, // 2 x i32
@@ -59,8 +60,10 @@ namespace MVT { // MVT = Machine Value Types
v2f32 = 21, // 2 x f32
v4f32 = 22, // 4 x f32
v2f64 = 23, // 2 x f64
+ FIRST_VECTOR_VALUETYPE = v8i8,
+ LAST_VECTOR_VALUETYPE = v2f64,
- LAST_VALUETYPE // This always remains at the end of the list.
+ LAST_VALUETYPE = 24 // This always remains at the end of the list.
};
static inline bool isInteger(ValueType VT) {
@@ -70,7 +73,8 @@ namespace MVT { // MVT = Machine Value Types
return (VT >= f32 && VT <= f128) || (VT >= v4f32 && VT <= v2f64);
}
static inline bool isVector(ValueType VT) {
- return (VT >= v8i8 && VT <= v2f64);
+ return (VT >= FIRST_VECTOR_VALUETYPE &&
+ VT <= LAST_VECTOR_VALUETYPE);
}
/// getVectorType - Returns the ValueType that represents a vector NumElements