Skip to content

Commit 9ea3972

Browse files
[Vectorize] Strip away lambdas (NFC) (#143279)
We don't need lambdas here.
1 parent 0613f8b commit 9ea3972

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6885,8 +6885,7 @@ BoUpSLP::getReorderingData(const TreeEntry &TE, bool TopToBottom,
68856885
int Sz = TE.Scalars.size();
68866886
if (isSplat(TE.Scalars) && !allConstant(TE.Scalars) &&
68876887
count_if(TE.Scalars, IsaPred<UndefValue>) == Sz - 1) {
6888-
const auto *It =
6889-
find_if(TE.Scalars, [](Value *V) { return !isConstant(V); });
6888+
const auto *It = find_if_not(TE.Scalars, isConstant);
68906889
if (It == TE.Scalars.begin())
68916890
return OrdersType();
68926891
auto *Ty = getWidenedType(TE.Scalars.front()->getType(), Sz);
@@ -15321,13 +15320,11 @@ BoUpSLP::isGatherShuffledSingleRegisterEntry(
1532115320
if (TEUseEI.UserTE->State == TreeEntry::Vectorize &&
1532215321
(TEUseEI.UserTE->getOpcode() != Instruction::PHI ||
1532315322
TEUseEI.UserTE->isAltShuffle()) &&
15324-
all_of(TEUseEI.UserTE->Scalars,
15325-
[](Value *V) { return isUsedOutsideBlock(V); })) {
15323+
all_of(TEUseEI.UserTE->Scalars, isUsedOutsideBlock)) {
1532615324
if (UseEI.UserTE->State != TreeEntry::Vectorize ||
1532715325
(UseEI.UserTE->getOpcode() == Instruction::PHI &&
1532815326
!UseEI.UserTE->isAltShuffle()) ||
15329-
any_of(UseEI.UserTE->Scalars,
15330-
[](Value *V) { return !isUsedOutsideBlock(V); }))
15327+
!all_of(UseEI.UserTE->Scalars, isUsedOutsideBlock))
1533115328
continue;
1533215329
}
1533315330

0 commit comments

Comments
 (0)