// 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 && isTypeLegal(TVT)) {
+ if (TVT != MVT::Other) {
SDOperand N = SDOperand(Result, i++);
// Handle copies from generic vectors to registers.
MVT::ValueType PTyElementVT, PTyLegalElementVT;
unsigned NE = getPackedTypeBreakdown(PTy, PTyElementVT,
PTyLegalElementVT);
- // Insert a VBIT_CONVERT of the FORMAL_ARGUMENTS to a
- // "N x PTyElementVT" MVT::Vector type.
- N = DAG.getNode(ISD::VBIT_CONVERT, MVT::Vector, N,
- DAG.getConstant(NE, MVT::i32),
- DAG.getValueType(PTyElementVT));
- Ops.push_back(N);
- } else {
+ // FIXME: handle NE > 1 cases.
+ if (NE == 1) {
+ N = DAG.getNode(ISD::VBIT_CONVERT, MVT::Vector, N,
+ DAG.getConstant(NumElems, MVT::i32),
+ DAG.getValueType(getValueType(EltTy)));
+ Ops.push_back(N);
+ Supported = true;
+ }
+ }
+
+ if (!Supported) {
assert(0 && "Don't support illegal by-val vector arguments yet!");
abort();
}
// 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 && isTypeLegal(TVT)) {
+ if (TVT != MVT::Other) {
// Handle copies from generic vectors to registers.
MVT::ValueType PTyElementVT, PTyLegalElementVT;
unsigned NE = getPackedTypeBreakdown(PTy, PTyElementVT,
PTyLegalElementVT);
- // Insert a VBIT_CONVERT of the MVT::Vector type to the packed type.
- Ops.push_back(DAG.getNode(ISD::VBIT_CONVERT, TVT, Op));
- } 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!");
abort();
}