Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit ba2702e

Browse filesBrowse files
committed
!fixup update comment, add comment re regions.
1 parent fbf5f9d commit ba2702e
Copy full SHA for ba2702e

File tree

1 file changed

+4
-3
lines changed
Filter options

1 file changed

+4
-3
lines changed

‎llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp

Copy file name to clipboardExpand all lines: llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
+4-3Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1089,19 +1089,20 @@ 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.
10921095
for (VPBasicBlock *VPBB : VPBlockUtils::blocksOnly<VPBasicBlock>(
10931096
vp_depth_first_shallow(Plan.getVectorLoopRegion()->getEntry()))) {
10941097
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.
10971098
auto *RepR = dyn_cast<VPReplicateRecipe>(&R);
10981099
if (!RepR && !isa<VPWidenRecipe>(&R))
10991100
continue;
11001101
if (RepR && RepR->isSingleScalar())
11011102
continue;
11021103

11031104
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
11051106
// scalar results used. In the latter case, we would introduce extra
11061107
// broadcasts.
11071108
if (!vputils::isSingleScalar(RepOrWidenR) ||

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.