[llvm] [VectorCombine] Pull out TargetCostKind argument to allow globally set cost kind value (PR #118652)

via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 4 07:07:03 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 026fbe519e16a4993601d2bac509e182081fc068 094e288e6241613e7d497907fb663e14dc70d0b2 --extensions cpp -- llvm/lib/Transforms/Vectorize/VectorCombine.cpp
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/llvm/lib/Transforms/Vectorize/VectorCombine.cpp b/llvm/lib/Transforms/Vectorize/VectorCombine.cpp
index 385b2d1e80..e655e73fa9 100644
--- a/llvm/lib/Transforms/Vectorize/VectorCombine.cpp
+++ b/llvm/lib/Transforms/Vectorize/VectorCombine.cpp
@@ -295,7 +295,8 @@ bool VectorCombine::vectorizeLoadInsert(Instruction &I,
 /// If we are loading a vector and then inserting it into a larger vector with
 /// undefined elements, try to load the larger vector and eliminate the insert.
 /// This removes a shuffle in IR and may allow combining of other loaded values.
-bool VectorCombine::widenSubvectorLoad(Instruction &I, TTI::TargetCostKind CostKind) {
+bool VectorCombine::widenSubvectorLoad(Instruction &I,
+                                       TTI::TargetCostKind CostKind) {
   // Match subvector insert of fixed vector.
   auto *Shuf = cast<ShuffleVectorInst>(&I);
   if (!Shuf->isIdentityWithPadding())

``````````

</details>


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


More information about the llvm-commits mailing list