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
This commit is contained in:
Chris Lattner 2006-05-17 20:43:21 +00:00
parent 2618d07765
commit 1b8daae71b

View File

@ -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 // Figure out if there is a Packed type corresponding to this Vector
// type. If so, convert to the packed type. // type. If so, convert to the packed type.
bool Supported = false;
MVT::ValueType TVT = MVT::getVectorType(getValueType(EltTy), NumElems); MVT::ValueType TVT = MVT::getVectorType(getValueType(EltTy), NumElems);
if (TVT != MVT::Other) { if (TVT != MVT::Other && isTypeLegal(TVT)) {
// Handle copies from generic vectors to registers. // Insert a VBIT_CONVERT of the MVT::Vector type to the packed type.
MVT::ValueType PTyElementVT, PTyLegalElementVT; Op = DAG.getNode(ISD::VBIT_CONVERT, TVT, Op);
unsigned NE = getPackedTypeBreakdown(PTy, PTyElementVT, Ops.push_back(Op);
PTyLegalElementVT); } else {
// 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) {
assert(0 && "Don't support illegal by-val vector call args yet!"); assert(0 && "Don't support illegal by-val vector call args yet!");
abort(); abort();
} }