@@ -22514,20 +22514,18 @@ static SDValue performSTNT1Combine(SDNode *N, SelectionDAG &DAG) {
2251422514/// movi v0.2d, #0
2251522515/// str q0, [x0]
2251622516///
22517- static SDValue replaceZeroVectorStore(SelectionDAG &DAG, StoreSDNode &St,
22518- AArch64Subtarget const &Subtarget) {
22517+ static SDValue replaceZeroVectorStore(SelectionDAG &DAG, StoreSDNode &St) {
2251922518 SDValue StVal = St.getValue();
2252022519 EVT VT = StVal.getValueType();
2252122520
2252222521 // Avoid scalarizing zero splat stores for scalable vectors.
2252322522 if (VT.isScalableVector())
2252422523 return SDValue();
2252522524
22526- // Do not replace the FP store when it could result in a streaming memory
22525+ // Do not replace the vector store when it could result in a streaming memory
2252722526 // hazard.
22528- if (VT.getVectorElementType().isFloatingPoint() &&
22529- Subtarget.getStreamingHazardSize() > 0 &&
22530- (Subtarget.isStreaming() || Subtarget.isStreamingCompatible()))
22527+ const TargetLowering &TLI = DAG.getTargetLoweringInfo();
22528+ if (!TLI.canUseIntLoadStoreForFloatValues())
2253122529 return SDValue();
2253222530
2253322531 // It is beneficial to scalarize a zero splat store for 2 or 3 i64 elements or
@@ -22659,7 +22657,7 @@ static SDValue splitStores(SDNode *N, TargetLowering::DAGCombinerInfo &DCI,
2265922657 // If we get a splat of zeros, convert this vector store to a store of
2266022658 // scalars. They will be merged into store pairs of xzr thereby removing one
2266122659 // instruction and one register.
22662- if (SDValue ReplacedZeroSplat = replaceZeroVectorStore(DAG, *S, *Subtarget ))
22660+ if (SDValue ReplacedZeroSplat = replaceZeroVectorStore(DAG, *S))
2266322661 return ReplacedZeroSplat;
2266422662
2266522663 // FIXME: The logic for deciding if an unaligned store should be split should
0 commit comments