File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
llvm/lib/Transforms/Vectorize Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -1089,19 +1089,21 @@ static void narrowToSingleScalarRecipes(VPlan &Plan) {
10891089 if (Plan.hasScalarVFOnly ())
10901090 return ;
10911091
1092+ // Try to narrow wide and replicating recipes to single scalar recipes,
1093+ // based on VPlan analysis. Only process blocks in the loop region for now,
1094+ // without traversing into nested regions, as recipes in replicate regions
1095+ // cannot be converted yet.
10921096 for (VPBasicBlock *VPBB : VPBlockUtils::blocksOnly<VPBasicBlock>(
10931097 vp_depth_first_shallow (Plan.getVectorLoopRegion ()->getEntry ()))) {
10941098 for (VPRecipeBase &R : make_early_inc_range (reverse (*VPBB))) {
1095- // Try to narrow wide and replicating recipes to single scalar recipes,
1096- // based on VPlan analysis.
10971099 auto *RepR = dyn_cast<VPReplicateRecipe>(&R);
10981100 if (!RepR && !isa<VPWidenRecipe>(&R))
10991101 continue ;
11001102 if (RepR && RepR->isSingleScalar ())
11011103 continue ;
11021104
11031105 auto *RepOrWidenR = cast<VPSingleDefRecipe>(&R);
1104- // Skip recipes that aren't single scalars and don't have only their
1106+ // Skip recipes that aren't single scalars or don't have only their
11051107 // scalar results used. In the latter case, we would introduce extra
11061108 // broadcasts.
11071109 if (!vputils::isSingleScalar (RepOrWidenR) ||
You can’t perform that action at this time.
0 commit comments