File tree Expand file tree Collapse file tree 2 files changed +7
-10
lines changed
llvm/lib/Transforms/Vectorize Expand file tree Collapse file tree 2 files changed +7
-10
lines changed Original file line number Diff line number Diff line change @@ -3153,9 +3153,8 @@ void LoopVectorizationCostModel::collectLoopScalars(ElementCount VF) {
3153
3153
// If the use of the pointer will be a scalar use, and all users of the
3154
3154
// pointer are memory accesses, place the pointer in ScalarPtrs. Otherwise,
3155
3155
// place the pointer in PossibleNonScalarPtrs.
3156
- if (IsScalarUse (MemAccess, Ptr ) && llvm::all_of (I->users (), [&](User *U) {
3157
- return isa<LoadInst>(U) || isa<StoreInst>(U);
3158
- }))
3156
+ if (IsScalarUse (MemAccess, Ptr ) &&
3157
+ all_of (I->users (), IsaPred<LoadInst, StoreInst>))
3159
3158
ScalarPtrs.insert (I);
3160
3159
else
3161
3160
PossibleNonScalarPtrs.insert (I);
Original file line number Diff line number Diff line change @@ -1157,9 +1157,8 @@ void VPlanTransforms::truncateToMinimalBitwidths(
1157
1157
continue ;
1158
1158
auto *UV = dyn_cast_or_null<Instruction>(Op->getUnderlyingValue ());
1159
1159
if (UV && MinBWs.contains (UV) && !ProcessedTruncs.contains (Op) &&
1160
- all_of (Op->users (), [](VPUser *U) {
1161
- return !isa<VPWidenRecipe, VPWidenSelectRecipe>(U);
1162
- })) {
1160
+ none_of (Op->users (),
1161
+ IsaPred<VPWidenRecipe, VPWidenSelectRecipe>)) {
1163
1162
// Add an entry to ProcessedTruncs to avoid counting the same
1164
1163
// operand multiple times.
1165
1164
ProcessedTruncs[Op] = nullptr ;
@@ -1593,10 +1592,9 @@ bool VPlanTransforms::tryAddExplicitVectorLength(
1593
1592
// The transform updates all users of inductions to work based on EVL, instead
1594
1593
// of the VF directly. At the moment, widened inductions cannot be updated, so
1595
1594
// bail out if the plan contains any.
1596
- bool ContainsWidenInductions = any_of (Header->phis (), [](VPRecipeBase &Phi) {
1597
- return isa<VPWidenIntOrFpInductionRecipe, VPWidenPointerInductionRecipe>(
1598
- &Phi);
1599
- });
1595
+ bool ContainsWidenInductions = any_of (
1596
+ Header->phis (),
1597
+ IsaPred<VPWidenIntOrFpInductionRecipe, VPWidenPointerInductionRecipe>);
1600
1598
if (ContainsWidenInductions)
1601
1599
return false ;
1602
1600
You can’t perform that action at this time.
0 commit comments