diff options
author | Nate Begeman <natebegeman@mac.com> | 2005-11-29 05:45:29 +0000 |
---|---|---|
committer | Nate Begeman <natebegeman@mac.com> | 2005-11-29 05:45:29 +0000 |
commit | 6a648614e88586e85a36ceb5c1d3b84e4f55b458 (patch) | |
tree | e290d6746a7f0bd2787814446293dbf52a7dcc8c /include | |
parent | 5ee16ea41792e38ce9240c0bd7b165cefb752612 (diff) | |
download | external_llvm-6a648614e88586e85a36ceb5c1d3b84e4f55b458.zip external_llvm-6a648614e88586e85a36ceb5c1d3b84e4f55b458.tar.gz external_llvm-6a648614e88586e85a36ceb5c1d3b84e4f55b458.tar.bz2 |
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24511 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/CodeGen/ValueTypes.h | 24 | ||||
-rw-r--r-- | include/llvm/Target/TargetLowering.h | 4 |
2 files changed, 23 insertions, 5 deletions
diff --git a/include/llvm/CodeGen/ValueTypes.h b/include/llvm/CodeGen/ValueTypes.h index 600c188..783c0f8a 100644 --- a/include/llvm/CodeGen/ValueTypes.h +++ b/include/llvm/CodeGen/ValueTypes.h @@ -48,14 +48,26 @@ namespace MVT { // MVT = Machine Value Types // 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 @@ namespace MVT { // MVT = Machine Value Types 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; } } diff --git a/include/llvm/Target/TargetLowering.h b/include/llvm/Target/TargetLowering.h index 08865e0..29572f9 100644 --- a/include/llvm/Target/TargetLowering.h +++ b/include/llvm/Target/TargetLowering.h @@ -123,7 +123,7 @@ public: LegalizeAction getTypeAction(MVT::ValueType VT) const { return (LegalizeAction)((ValueTypeActions >> (2*VT)) & 3); } - unsigned getValueTypeActions() const { return ValueTypeActions; } + unsigned long long getValueTypeActions() const { return ValueTypeActions; } /// getTypeToTransformTo - For types supported by the target, this is an /// identity function. For types that must be promoted to larger types, this @@ -441,7 +441,7 @@ private: /// ValueTypeActions - This is a bitvector that contains two bits for each /// value type, where the two bits correspond to the LegalizeAction enum. /// This can be queried with "getTypeAction(VT)". - unsigned ValueTypeActions; + unsigned long long ValueTypeActions; /// TransformToType - For any value types we are promoting or expanding, this /// contains the value type that we are changing to. For Expanded types, this |