[llvm] [LV] Account for vp_merge in out of loop EVL reductions in legacy cost model (PR #115903)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 12 09:01:04 PST 2024
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 f9125ddc1faafaceac9064e889cd9b4a77523677 577290a0b4cbace14fa2aff0dae28a78b9835eae --extensions cpp -- llvm/lib/Transforms/Vectorize/LoopVectorize.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 5c3afbe521..d029997e95 100644
--- a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+++ b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
@@ -6567,8 +6567,8 @@ LoopVectorizationCostModel::getInstructionCost(Instruction *I,
CmpInst::BAD_ICMP_PREDICATE, CostKind);
}
- // When tail folding with EVL, if the phi is part of an out of loop reduction
- // then it will be transformed into a wide vp_merge.
+ // When tail folding with EVL, if the phi is part of an out of loop
+ // reduction then it will be transformed into a wide vp_merge.
if (VF.isVector() && foldTailWithEVL() &&
Legal->getReductionVars().contains(Phi) && !isInLoopReduction(Phi)) {
IntrinsicCostAttributes ICA(
``````````
</details>
https://github.com/llvm/llvm-project/pull/115903
More information about the llvm-commits
mailing list