[llvm] [LoopVectorize] Use CodeSize as the cost kind for minsize (PR #124119)

via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 23 06:26:54 PST 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 cb714e74cc0efd5bfdb3e5e80978239425bd83d4 337a02f540661adeb85844321e4f7a61e674a8a2 --extensions cpp -- llvm/lib/Transforms/Vectorize/LoopVectorize.cpp llvm/lib/Transforms/Vectorize/VPlan.cpp
``````````

</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 9a617fc66c..f8921ec857 100644
--- a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+++ b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
@@ -4284,7 +4284,7 @@ bool LoopVectorizationPlanner::isMoreProfitable(
   // vector width, on the assumption that throughput will be greater.
   if (CM.CostKind == TTI::TCK_CodeSize)
     return CostA < CostB ||
-      (CostA == CostB && EstimatedWidthA > EstimatedWidthB);
+           (CostA == CostB && EstimatedWidthA > EstimatedWidthB);
 
   // Assume vscale may be larger than 1 (or the value being tuned for),
   // so that scalable vectorization is slightly favorable over fixed-width

``````````

</details>


https://github.com/llvm/llvm-project/pull/124119


More information about the llvm-commits mailing list