[llvm] 9ea3972 - [Vectorize] Strip away lambdas (NFC) (#143279)
via llvm-commits
llvm-commits at lists.llvm.org
Sun Jun 8 01:34:12 PDT 2025
Author: Kazu Hirata
Date: 2025-06-08T01:34:09-07:00
New Revision: 9ea3972cd10e46cea0624bb149ad655301db0c6b
URL: https://github.com/llvm/llvm-project/commit/9ea3972cd10e46cea0624bb149ad655301db0c6b
DIFF: https://github.com/llvm/llvm-project/commit/9ea3972cd10e46cea0624bb149ad655301db0c6b.diff
LOG: [Vectorize] Strip away lambdas (NFC) (#143279)
We don't need lambdas here.
Added:
Modified:
llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
index 6fcd606afaa22..ec40124c57a6a 100644
--- a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+++ b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
@@ -6885,8 +6885,7 @@ BoUpSLP::getReorderingData(const TreeEntry &TE, bool TopToBottom,
int Sz = TE.Scalars.size();
if (isSplat(TE.Scalars) && !allConstant(TE.Scalars) &&
count_if(TE.Scalars, IsaPred<UndefValue>) == Sz - 1) {
- const auto *It =
- find_if(TE.Scalars, [](Value *V) { return !isConstant(V); });
+ const auto *It = find_if_not(TE.Scalars, isConstant);
if (It == TE.Scalars.begin())
return OrdersType();
auto *Ty = getWidenedType(TE.Scalars.front()->getType(), Sz);
@@ -15321,13 +15320,11 @@ BoUpSLP::isGatherShuffledSingleRegisterEntry(
if (TEUseEI.UserTE->State == TreeEntry::Vectorize &&
(TEUseEI.UserTE->getOpcode() != Instruction::PHI ||
TEUseEI.UserTE->isAltShuffle()) &&
- all_of(TEUseEI.UserTE->Scalars,
- [](Value *V) { return isUsedOutsideBlock(V); })) {
+ all_of(TEUseEI.UserTE->Scalars, isUsedOutsideBlock)) {
if (UseEI.UserTE->State != TreeEntry::Vectorize ||
(UseEI.UserTE->getOpcode() == Instruction::PHI &&
!UseEI.UserTE->isAltShuffle()) ||
- any_of(UseEI.UserTE->Scalars,
- [](Value *V) { return !isUsedOutsideBlock(V); }))
+ !all_of(UseEI.UserTE->Scalars, isUsedOutsideBlock))
continue;
}
More information about the llvm-commits
mailing list