@@ -15305,18 +15305,19 @@ performCONCAT_VECTORSSplitCombine(SDNode *N, SelectionDAG &DAG,
15305
15305
MVT VT = N->getSimpleValueType(0);
15306
15306
15307
15307
MVT HalfVT = VT.getHalfNumVectorElementsVT();
15308
- size_t HalfNumOps = (N->getNumOperands() + 1) / 2;
15309
- SDValue BotSubConcat = DAG.getNode(ISD::CONCAT_VECTORS, DL, HalfVT,
15310
- N->ops().take_front(HalfNumOps));
15311
- SDValue TopSubConcat = DAG.getNode(ISD::CONCAT_VECTORS, DL, HalfVT,
15312
- N->ops().drop_front(HalfNumOps));
15308
+ assert(isPowerOf2_32(N->getNumOperands()));
15309
+ size_t HalfNumOps = N->getNumOperands() / 2;
15310
+ SDValue Lo = DAG.getNode(ISD::CONCAT_VECTORS, DL, HalfVT,
15311
+ N->ops().take_front(HalfNumOps));
15312
+ SDValue Hi = DAG.getNode(ISD::CONCAT_VECTORS, DL, HalfVT,
15313
+ N->ops().drop_front(HalfNumOps));
15313
15314
15314
15315
// Lower to an insert_subvector directly so the concat_vectors don't get
15315
15316
// recombined.
15316
- SDValue Vec = DAG.getNode(ISD::INSERT_SUBVECTOR, DL, VT, DAG.getUNDEF(VT),
15317
- BotSubConcat, DAG.getVectorIdxConstant(0, DL));
15317
+ SDValue Vec = DAG.getNode(ISD::INSERT_SUBVECTOR, DL, VT, DAG.getUNDEF(VT), Lo,
15318
+ DAG.getVectorIdxConstant(0, DL));
15318
15319
Vec = DAG.getNode(
15319
- ISD::INSERT_SUBVECTOR, DL, VT, Vec, TopSubConcat ,
15320
+ ISD::INSERT_SUBVECTOR, DL, VT, Vec, Hi ,
15320
15321
DAG.getVectorIdxConstant(HalfVT.getVectorMinNumElements(), DL));
15321
15322
return Vec;
15322
15323
}
0 commit comments