diff options
author | Chris Lattner <sabre@nondot.org> | 2006-05-17 20:43:21 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2006-05-17 20:43:21 +0000 |
commit | 938155ca57de4f7dd2719c43298dc255369e5487 (patch) | |
tree | f36fa8dc98d50a2aef4f23c271fa926ff2c40fbf | |
parent | f5ef47fe74023c7214da5751db728e95eff599f9 (diff) | |
download | bcm5719-llvm-938155ca57de4f7dd2719c43298dc255369e5487.tar.gz bcm5719-llvm-938155ca57de4f7dd2719c43298dc255369e5487.zip |
Correct a previous patch which broke CodeGen/PowerPC/vec_call.ll
llvm-svn: 28364
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | 23 |
1 files changed, 5 insertions, 18 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp index e1d4d8e1e6d..517b760854d 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp @@ -2551,25 +2551,12 @@ TargetLowering::LowerCallTo(SDOperand Chain, const Type *RetTy, bool isVarArg, // Figure out if there is a Packed type corresponding to this Vector // type. If so, convert to the packed type. - bool Supported = false; MVT::ValueType TVT = MVT::getVectorType(getValueType(EltTy), NumElems); - if (TVT != MVT::Other) { - // Handle copies from generic vectors to registers. - MVT::ValueType PTyElementVT, PTyLegalElementVT; - unsigned NE = getPackedTypeBreakdown(PTy, PTyElementVT, - PTyLegalElementVT); - // FIXME: handle NE > 1 cases. - if (NE == 1) { - // Insert a VBIT_CONVERT of the MVT::Vector type to the packed type. - Op = DAG.getNode(ISD::VBIT_CONVERT, MVT::Vector, Op, - DAG.getConstant(NumElems, MVT::i32), - DAG.getValueType(getValueType(EltTy))); - Ops.push_back(Op); - Supported = true; - } - } - - if (!Supported) { + if (TVT != MVT::Other && isTypeLegal(TVT)) { + // Insert a VBIT_CONVERT of the MVT::Vector type to the packed type. + Op = DAG.getNode(ISD::VBIT_CONVERT, TVT, Op); + Ops.push_back(Op); + } else { assert(0 && "Don't support illegal by-val vector call args yet!"); abort(); } |