[llvm] [AArch64] Avoid streaming mode hazards from FP constant stores (PR #114207)
Benjamin Maxwell via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 30 07:05:09 PDT 2024
================
@@ -22514,14 +22514,22 @@ static SDValue performSTNT1Combine(SDNode *N, SelectionDAG &DAG) {
/// movi v0.2d, #0
/// str q0, [x0]
///
-static SDValue replaceZeroVectorStore(SelectionDAG &DAG, StoreSDNode &St) {
+static SDValue replaceZeroVectorStore(SelectionDAG &DAG, StoreSDNode &St,
+ AArch64Subtarget const &Subtarget) {
SDValue StVal = St.getValue();
EVT VT = StVal.getValueType();
// Avoid scalarizing zero splat stores for scalable vectors.
if (VT.isScalableVector())
return SDValue();
+ // Do not replace the FP store when it could result in a streaming memory
+ // hazard.
+ if (VT.getVectorElementType().isFloatingPoint() &&
+ Subtarget.getStreamingHazardSize() > 0 &&
+ (Subtarget.isStreaming() || Subtarget.isStreamingCompatible()))
----------------
MacDue wrote:
Yep, done :+1:
https://github.com/llvm/llvm-project/pull/114207
More information about the llvm-commits
mailing list