[llvm] [LV][NFC] Improve readability with `bool` instead of `auto` (PR #111532)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 8 12:23:42 PDT 2024
================
@@ -3649,11 +3649,10 @@ void LoopVectorizationCostModel::collectLoopUniforms(ElementCount VF) {
if (IsOutOfScope(V))
continue;
auto *I = cast<Instruction>(V);
- auto 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 {
----------------
fhahn wrote:
while you are editing the line, might as well drop redundant llvm::
```suggestion
bool UsersAreMemAccesses = all_of(I->users(), [&](User *U) -> bool {
```
https://github.com/llvm/llvm-project/pull/111532
More information about the llvm-commits
mailing list