Skip to content

Commit f13d583

Browse files
committed
[VPlan] Pass some functions directly to all_of (NFC).
Remove some unneeded lambdas.
1 parent 933ecf5 commit f13d583

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

llvm/lib/Transforms/Vectorize/VPlanUtils.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,7 @@ bool vputils::isUniformAcrossVFsAndUFs(VPValue *V) {
9292
m_VPInstruction<VPInstruction::CanonicalIVIncrementForPart>(
9393
m_VPValue())))
9494
return false;
95-
return all_of(R->operands(),
96-
[](VPValue *Op) { return isUniformAcrossVFsAndUFs(Op); });
95+
return all_of(R->operands(), isUniformAcrossVFsAndUFs);
9796
}
9897

9998
auto *CanonicalIV = R->getParent()->getPlan()->getCanonicalIV();
@@ -110,8 +109,7 @@ bool vputils::isUniformAcrossVFsAndUFs(VPValue *V) {
110109
// TODO: Further relax the restrictions.
111110
return R->isUniform() &&
112111
(isa<LoadInst, StoreInst>(R->getUnderlyingValue())) &&
113-
all_of(R->operands(),
114-
[](VPValue *Op) { return isUniformAcrossVFsAndUFs(Op); });
112+
all_of(R->operands(), isUniformAcrossVFsAndUFs);
115113
})
116114
.Case<VPScalarCastRecipe, VPWidenCastRecipe>([](const auto *R) {
117115
// A cast is uniform according to its operand.

0 commit comments

Comments
 (0)