@@ -24036,13 +24036,12 @@ static SDValue performSTORECombine(SDNode *N,
2403624036 if ((!ExtCst || !ExtCst->isZero()) && !Value.hasOneUse())
2403724037 return SDValue();
2403824038
24039+ // These can lower to st1, which is preferable if we're unlikely to fold the
24040+ // addressing into the store.
2403924041 if (Subtarget->isNeonAvailable() && ElemVT == MemVT &&
2404024042 (VectorVT.is64BitVector() || VectorVT.is128BitVector()) && ExtCst &&
24041- !ExtCst->isZero() && ST->getBasePtr().getOpcode() != ISD::ADD) {
24042- // These can lower to st1, which is preferable if we're unlikely to fold
24043- // the addressing into the store.
24043+ !ExtCst->isZero() && ST->getBasePtr().getOpcode() != ISD::ADD)
2404424044 return SDValue();
24045- }
2404624045
2404724046 if (MemVT == MVT::i64 || MemVT == MVT::i32) {
2404824047 // Heuristic: If there are other users of w/x integer scalars extracted
@@ -24066,10 +24065,11 @@ static SDValue performSTORECombine(SDNode *N,
2406624065 Value.getValueType(), Vector, ExtIdx);
2406724066 // FIXME: Using a fixed-size vector for the insertion should not be
2406824067 // necessary, but SVE ISEL is missing some folds to avoid fmovs.
24069- SDValue Zero = DAG.getConstant (0, DL, MVT::i64 );
24068+ SDValue Zero = DAG.getVectorIdxConstant (0, DL);
2407024069 EVT InsertVectorVT = EVT::getVectorVT(
2407124070 *DAG.getContext(), ElemVT,
24072- VectorVT.getVectorElementCount().getKnownMinValue(), false);
24071+ ElementCount::getFixed(
24072+ VectorVT.getVectorElementCount().getKnownMinValue()));
2407324073 ExtVector = DAG.getNode(ISD::INSERT_VECTOR_ELT, DL, InsertVectorVT,
2407424074 DAG.getUNDEF(InsertVectorVT), Ext, Zero);
2407524075 }
0 commit comments