[llvm-commits] vector types
Chris Lattner
sabre at nondot.org
Tue Nov 29 08:36:19 PST 2005
On Tue, 29 Nov 2005, Andrew Lenharth wrote:
>> 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.
>
> Just in case anyone cares, the relevant vector types for alpha are:
>
> v8i8, v4i16, and maybe v2i32 (only one unpack operation produces this
> and one pack operations consumes it). Of course all the operations that
> exist are (s|u)(min|max), packing, unpacking, and comparison. Not that
> I am too worried about support.
Ok, sounds good. We figured that the list could be expanded on demand. :)
MMX also has several other supported types that aren't on the list, so we
would add those if we ever decided to add support.
-Chris
>> ---
>> 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;
>> }
>> }
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
-Chris
--
http://nondot.org/sabre/
http://llvm.org/
More information about the llvm-commits
mailing list