[llvm-commits] CVS: llvm/include/llvm/CodeGen/ValueTypes.h
Nate Begeman
natebegeman at mac.com
Mon Nov 28 21:45:44 PST 2005
Changes in directory llvm/include/llvm/CodeGen:
ValueTypes.h updated: 1.13 -> 1.14
---
Log message:
Add the majority of the vector machien value types we expect to support,
and make a few changes to the legalization machinery to support more than
16 types.
---
Diffs of the changes: (+21 -3)
ValueTypes.h | 24 +++++++++++++++++++++---
1 files changed, 21 insertions(+), 3 deletions(-)
Index: llvm/include/llvm/CodeGen/ValueTypes.h
diff -u llvm/include/llvm/CodeGen/ValueTypes.h:1.13 llvm/include/llvm/CodeGen/ValueTypes.h:1.14
--- llvm/include/llvm/CodeGen/ValueTypes.h:1.13 Thu Nov 17 15:44:42 2005
+++ llvm/include/llvm/CodeGen/ValueTypes.h Mon Nov 28 23:45:28 2005
@@ -48,14 +48,26 @@
// be refined into a target vector type, or
// scalarized.
+ // These are 128 bit vectors of varying packed types
+ v16i8 = 14, // 16 x i8
+ v8i16 = 15, // 8 x i16
+ v4i32 = 16, // 4 x i32
+ v2i64 = 17, // 2 x i64
+
+ v4f32 = 18, // 4 x f32
+ v2f64 = 19, // 2 x f64
+
LAST_VALUETYPE, // This always remains at the end of the list.
};
static inline bool isInteger(ValueType VT) {
- return VT >= i1 && VT <= i128;
+ return (VT >= i1 && VT <= i128) || (VT >= v16i8 && VT <= v2i64);
}
static inline bool isFloatingPoint(ValueType VT) {
- return VT >= f32 && VT <= f128;
+ return (VT >= f32 && VT <= f128) || (VT >= v4f32 && VT <= v2f64);
+ }
+ static inline bool isVector(ValueType VT) {
+ return (VT >= v16i8 && VT <= v2f64);
}
static inline unsigned getSizeInBits(ValueType VT) {
@@ -70,7 +82,13 @@
case MVT::i64 : return 64;
case MVT::f80 : return 80;
case MVT::f128:
- case MVT::i128: return 128;
+ case MVT::i128:
+ case MVT::v16i8:
+ case MVT::v8i16:
+ case MVT::v4i32:
+ case MVT::v2i64:
+ case MVT::v4f32:
+ case MVT::v2f64: return 128;
}
}
More information about the llvm-commits
mailing list