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

Nate Begeman natebegeman at mac.com
Mon Nov 21 17:29:49 PST 2005



Changes in directory llvm/lib/Target:

TargetLowering.cpp updated: 1.13 -> 1.14
---
Log message:

Rather than attempting to legalize 1 x float, make sure the SD ISel never
generates it.  Make MVT::Vector expand-only, and remove the code in
Legalize that attempts to legalize it.

The plan for supporting N x Type is to continually epxand it in ExpandOp
until it gets down to 2 x Type, where it will be scalarized into a pair of
scalars.


---
Diffs of the changes:  (+5 -1)

 TargetLowering.cpp |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletion(-)


Index: llvm/lib/Target/TargetLowering.cpp
diff -u llvm/lib/Target/TargetLowering.cpp:1.13 llvm/lib/Target/TargetLowering.cpp:1.14
--- llvm/lib/Target/TargetLowering.cpp:1.13	Thu Oct 20 19:02:42 2005
+++ llvm/lib/Target/TargetLowering.cpp	Mon Nov 21 19:29:36 2005
@@ -64,7 +64,7 @@
     assert(VT < PromoteTo && "Must promote to a larger type!");
     TransformToType[VT] = PromoteTo;
   } else if (Action == TargetLowering::Expand) {
-    assert(MVT::isInteger(VT) && VT > MVT::i8 &&
+    assert((VT == MVT::Vector || MVT::isInteger(VT)) && VT > MVT::i8 &&
            "Cannot expand this type: target must support SOME integer reg!");
     // Expand to the next smaller integer type!
     TransformToType[VT] = (MVT::ValueType)(VT-1);
@@ -113,6 +113,10 @@
                        TransformToType, ValueTypeActions);
   else
     TransformToType[MVT::f32] = MVT::f32;
+  
+  // Set MVT::Vector to always be Expanded
+  SetValueTypeAction(MVT::Vector, Expand, *this, TransformToType, 
+                     ValueTypeActions);
 
   assert(isTypeLegal(MVT::f64) && "Target does not support FP?");
   TransformToType[MVT::f64] = MVT::f64;






More information about the llvm-commits mailing list