[llvm-commits] CVS: llvm/lib/Target/Target.td TargetLowering.cpp

Nate Begeman natebegeman at mac.com
Mon Nov 28 21:45:44 PST 2005



Changes in directory llvm/lib/Target:

Target.td updated: 1.61 -> 1.62
TargetLowering.cpp updated: 1.14 -> 1.15
---
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:  (+10 -4)

 Target.td          |    8 +++++++-
 TargetLowering.cpp |    6 +++---
 2 files changed, 10 insertions(+), 4 deletions(-)


Index: llvm/lib/Target/Target.td
diff -u llvm/lib/Target/Target.td:1.61 llvm/lib/Target/Target.td:1.62
--- llvm/lib/Target/Target.td:1.61	Mon Nov 28 18:42:30 2005
+++ llvm/lib/Target/Target.td	Mon Nov 28 23:45:29 2005
@@ -38,7 +38,13 @@
 def f128   : ValueType<128, 10>;   // 128-bit floating point value
 def FlagVT : ValueType<0  , 11>;   // Condition code or machine flag
 def isVoid : ValueType<0  , 12>;   // Produces no value
-def Vector : ValueType<0  , 13>;   // Abstract vector type
+def Vector : ValueType<0  , 13>;   // Abstract vector value
+def v16i8  : ValueType<128, 14>;   // 16 x i8  vector value
+def v8i16  : ValueType<128, 15>;   //  8 x i16 vector value
+def v4i32  : ValueType<128, 16>;   //  4 x i32 vector value
+def v2i64  : ValueType<128, 17>;   //  2 x i64 vector value
+def v4f32  : ValueType<128, 18>;   //  4 x f32 vector value
+def v2f64  : ValueType<128, 19>;   //  2 x f64 vector value
 
 //===----------------------------------------------------------------------===//
 // Register file description - These classes are used to fill in the target


Index: llvm/lib/Target/TargetLowering.cpp
diff -u llvm/lib/Target/TargetLowering.cpp:1.14 llvm/lib/Target/TargetLowering.cpp:1.15
--- llvm/lib/Target/TargetLowering.cpp:1.14	Mon Nov 21 19:29:36 2005
+++ llvm/lib/Target/TargetLowering.cpp	Mon Nov 28 23:45:29 2005
@@ -42,8 +42,8 @@
                                TargetLowering::LegalizeAction Action,
                                TargetLowering &TLI,
                                MVT::ValueType *TransformToType,
-                               unsigned &ValueTypeActions) {
-  ValueTypeActions |= Action << (VT*2);
+                               unsigned long long &ValueTypeActions) {
+  ValueTypeActions |= (unsigned long long)Action << (VT*2);
   if (Action == TargetLowering::Promote) {
     MVT::ValueType PromoteTo;
     if (VT == MVT::f32)
@@ -75,7 +75,7 @@
 /// computeRegisterProperties - Once all of the register classes are added,
 /// this allows us to compute derived properties we expose.
 void TargetLowering::computeRegisterProperties() {
-  assert(MVT::LAST_VALUETYPE <= 16 &&
+  assert(MVT::LAST_VALUETYPE <= 32 &&
          "Too many value types for ValueTypeActions to hold!");
 
   // Everything defaults to one.






More information about the llvm-commits mailing list