[llvm-commits] CVS: llvm/include/llvm/CodeGen/ValueTypes.h

Chris Lattner lattner at cs.uiuc.edu
Thu Mar 16 11:42:56 PST 2006



Changes in directory llvm/include/llvm/CodeGen:

ValueTypes.h updated: 1.21 -> 1.22
---
Log message:

Add markers for the first and last vector value type.


---
Diffs of the changes:  (+6 -2)

 ValueTypes.h |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)


Index: llvm/include/llvm/CodeGen/ValueTypes.h
diff -u llvm/include/llvm/CodeGen/ValueTypes.h:1.21 llvm/include/llvm/CodeGen/ValueTypes.h:1.22
--- llvm/include/llvm/CodeGen/ValueTypes.h:1.21	Thu Mar  2 19:55:49 2006
+++ llvm/include/llvm/CodeGen/ValueTypes.h	Thu Mar 16 13:42:44 2006
@@ -48,6 +48,7 @@
     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 @@
     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 @@
     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






More information about the llvm-commits mailing list