File tree 1 file changed +4
-3
lines changed
llvm/lib/Transforms/Vectorize 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -1089,19 +1089,20 @@ static void narrowToSingleScalarRecipes(VPlan &Plan) {
1089
1089
if (Plan.hasScalarVFOnly ())
1090
1090
return ;
1091
1091
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.
1092
1095
for (VPBasicBlock *VPBB : VPBlockUtils::blocksOnly<VPBasicBlock>(
1093
1096
vp_depth_first_shallow (Plan.getVectorLoopRegion ()->getEntry ()))) {
1094
1097
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.
1097
1098
auto *RepR = dyn_cast<VPReplicateRecipe>(&R);
1098
1099
if (!RepR && !isa<VPWidenRecipe>(&R))
1099
1100
continue ;
1100
1101
if (RepR && RepR->isSingleScalar ())
1101
1102
continue ;
1102
1103
1103
1104
auto *RepOrWidenR = cast<VPSingleDefRecipe>(&R);
1104
- // Skip recipes that aren't single scalars and don't have only their
1105
+ // Skip recipes that aren't single scalars or don't have only their
1105
1106
// scalar results used. In the latter case, we would introduce extra
1106
1107
// broadcasts.
1107
1108
if (!vputils::isSingleScalar (RepOrWidenR) ||
You can’t perform that action at this time.
0 commit comments