From 1b8daae71b0118b489cbecf2f1b8ed86b6bc8e57 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Wed, 17 May 2006 20:43:21 +0000 Subject: Correct a previous patch which broke CodeGen/PowerPC/vec_call.ll git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28364 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | 23 +++++------------------ 1 file changed, 5 insertions(+), 18 deletions(-) (limited to 'lib/CodeGen') diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp index e1d4d8e1e6..517b760854 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp +++ b/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(); } -- cgit v1.2.3