[llvm] [LV]: Improve accuracy of calculating remaining iterations of MainLoopVF (PR #156723)
via llvm-commits
llvm-commits at lists.llvm.org
Sun Sep 7 15:43:16 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 origin/main HEAD --extensions cpp -- llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</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 68d28a5e6..287808df3 100644
--- a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+++ b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
@@ -4381,7 +4381,8 @@ VectorizationFactor LoopVectorizationPlanner::selectEpilogueVectorizationFactor(
// 'vscale'.
// If TC is multiple of vscale, try to get estimated value:
if (match(TC, m_scev_Mul(m_SCEV(), m_SCEVVScale()))) {
- if (std::optional<ElementCount> BestKnownTC = getSmallBestKnownTC(PSE, OrigLoop)) {
+ if (std::optional<ElementCount> BestKnownTC =
+ getSmallBestKnownTC(PSE, OrigLoop)) {
unsigned EstimatedRuntimeTC =
estimateElementCount(*BestKnownTC, CM.getVScaleForTuning());
TC = SE.getConstant(TCType, EstimatedRuntimeTC);
``````````
</details>
https://github.com/llvm/llvm-project/pull/156723
More information about the llvm-commits
mailing list