[llvm-branch-commits] [llvm] [LV] Reduce register usage for scaled reductions (PR #133090)
via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Mon Mar 31 08:02:22 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 5f81501485b6c9d3e6a35fd382e1c10634e9658c b11c7631712479056bfd588c5031c065a53466fc --extensions h,cpp -- llvm/lib/Transforms/Vectorize/LoopVectorize.cpp llvm/lib/Transforms/Vectorize/VPRecipeBuilder.h llvm/lib/Transforms/Vectorize/VPlan.h
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
index 8b17622538..101ce4a8ab 100644
--- a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+++ b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
@@ -5033,7 +5033,8 @@ calculateRegisterUsage(VPlan &Plan, ArrayRef<ElementCount> VFs,
VF = VF.divideCoefficientBy(ReductionR->getVFScaleFactor());
else if (auto *PartialReductionR =
dyn_cast<VPPartialReductionRecipe>(R))
- VF = VF.divideCoefficientBy(PartialReductionR->getVFScaleFactor());
+ VF =
+ VF.divideCoefficientBy(PartialReductionR->getVFScaleFactor());
LLVM_DEBUG(if (VF != VFs[J]) {
dbgs() << "LV(REG): Scaled down VF from " << VFs[J] << " to "
<< VF << " for ";
``````````
</details>
https://github.com/llvm/llvm-project/pull/133090
More information about the llvm-branch-commits
mailing list