[llvm] [LV][NFC] Improve readability with `bool` instead of `auto` (PR #111532)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 8 07:05:52 PDT 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 88a239d292da80f260788c0817a07cbc0a8ac758 3d552fd10db9149d6900cba83b33889579eb91a3 --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 dc0a9fc68c..8d0bb02f8a 100644
--- a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+++ b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
@@ -3649,11 +3649,10 @@ void LoopVectorizationCostModel::collectLoopUniforms(ElementCount VF) {
if (IsOutOfScope(V))
continue;
auto *I = cast<Instruction>(V);
- bool UsersAreMemAccesses =
- llvm::all_of(I->users(), [&](User *U) -> bool {
- auto *UI = cast<Instruction>(U);
- return TheLoop->contains(UI) && IsVectorizedMemAccessUse(UI, V);
- });
+ bool UsersAreMemAccesses = llvm::all_of(I->users(), [&](User *U) -> bool {
+ auto *UI = cast<Instruction>(U);
+ return TheLoop->contains(UI) && IsVectorizedMemAccessUse(UI, V);
+ });
if (UsersAreMemAccesses)
AddToWorklistIfAllowed(I);
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/111532
More information about the llvm-commits
mailing list