diff options
author | Nate Begeman <natebegeman@mac.com> | 2005-11-22 01:29:36 +0000 |
---|---|---|
committer | Nate Begeman <natebegeman@mac.com> | 2005-11-22 01:29:36 +0000 |
commit | 4ef3b817fee7ea5be7219e00ab8e15976bfe279f (patch) | |
tree | 37dfe08135d61e46741caaf2a29f305f2fc3befa /lib/CodeGen/SelectionDAG/TargetLowering.cpp | |
parent | ac2902bcb5568c9a4ff8fe1bbe794f656498ff89 (diff) |
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24482 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/TargetLowering.cpp')
-rw-r--r-- | lib/CodeGen/SelectionDAG/TargetLowering.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/CodeGen/SelectionDAG/TargetLowering.cpp b/lib/CodeGen/SelectionDAG/TargetLowering.cpp index eaca703ad9..8570e64968 100644 --- a/lib/CodeGen/SelectionDAG/TargetLowering.cpp +++ b/lib/CodeGen/SelectionDAG/TargetLowering.cpp @@ -64,7 +64,7 @@ static void SetValueTypeAction(MVT::ValueType VT, 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 @@ void TargetLowering::computeRegisterProperties() { 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; |