return SDValue();
}
-static SDValue FoldCONCAT_VECTORS(const SDLoc &DL, EVT VT,
+/// Try to simplify vector concatenation to an input value, undef, or build
+/// vector.
+static SDValue foldCONCAT_VECTORS(const SDLoc &DL, EVT VT,
ArrayRef<SDValue> Ops,
SelectionDAG &DAG) {
assert(!Ops.empty() && "Can't concatenate an empty list of vectors!");
break;
}
case ISD::CONCAT_VECTORS: {
- // Attempt to fold CONCAT_VECTORS into BUILD_VECTOR or UNDEF.
SDValue Ops[] = {N1, N2};
- if (SDValue V = FoldCONCAT_VECTORS(DL, VT, Ops, *this))
+ if (SDValue V = foldCONCAT_VECTORS(DL, VT, Ops, *this))
return V;
break;
}
break;
}
case ISD::CONCAT_VECTORS: {
- // Attempt to fold CONCAT_VECTORS into BUILD_VECTOR or UNDEF.
SDValue Ops[] = {N1, N2, N3};
- if (SDValue V = FoldCONCAT_VECTORS(DL, VT, Ops, *this))
+ if (SDValue V = foldCONCAT_VECTORS(DL, VT, Ops, *this))
return V;
break;
}
return V;
break;
case ISD::CONCAT_VECTORS:
- // Attempt to fold CONCAT_VECTORS into BUILD_VECTOR or UNDEF.
- if (SDValue V = FoldCONCAT_VECTORS(DL, VT, Ops, *this))
+ if (SDValue V = foldCONCAT_VECTORS(DL, VT, Ops, *this))
return V;
break;
case ISD::SELECT_CC: