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 | 07890bbec4a8949be67e487bab91dda3e9e712e6 (patch) | |
tree | 83afb4bf8fd1f0e81f675174f52b70fa2168bb5e /llvm/lib/Target/TargetLowering.cpp | |
parent | ac6cb46429075215285a23654b4e29801139774e (diff) | |
download | bcm5719-llvm-07890bbec4a8949be67e487bab91dda3e9e712e6.tar.gz bcm5719-llvm-07890bbec4a8949be67e487bab91dda3e9e712e6.zip |
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.
llvm-svn: 24482
Diffstat (limited to 'llvm/lib/Target/TargetLowering.cpp')
-rw-r--r-- | llvm/lib/Target/TargetLowering.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/llvm/lib/Target/TargetLowering.cpp b/llvm/lib/Target/TargetLowering.cpp index eaca703ad9f..8570e649686 100644 --- a/llvm/lib/Target/TargetLowering.cpp +++ b/llvm/lib/Target/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; |