[llvm] [SLP]Improved/fixed FMAD support in reductions (PR #152787)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 8 13:20:17 PDT 2025
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff HEAD~1 HEAD --extensions cpp -- llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
index afdf73ab5..9d5b73fc8 100644
--- a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+++ b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
@@ -23720,8 +23720,8 @@ private:
FMF &= FPCI->getFastMathFlags();
Ops.push_back(RdxVal->user_back());
}
- FMACost = canConvertToFMA(
- Ops, getSameOpcode(Ops, TLI), DT, DL, *TTI, TLI);
+ FMACost = canConvertToFMA(Ops, getSameOpcode(Ops, TLI), DT, DL,
+ *TTI, TLI);
if (FMACost.isValid()) {
// Calculate actual FMAD cost.
IntrinsicCostAttributes ICA(Intrinsic::fmuladd, RVecTy,
@@ -23732,7 +23732,8 @@ private:
// Also, exclude vector fmul cost.
InstructionCost FMulCost = TTI->getArithmeticInstrCost(
Instruction::FMul, RVecTy, CostKind);
- LLVM_DEBUG(dbgs() << "Minus vector FMul cost: " << FMulCost << "\n");
+ LLVM_DEBUG(dbgs()
+ << "Minus vector FMul cost: " << FMulCost << "\n");
FMACost -= FMulCost;
}
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/152787
More information about the llvm-commits
mailing list