Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions llvm/lib/Transforms/Vectorize/VPlanConstruction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -422,13 +422,11 @@ static void createLoopRegion(VPlan &Plan, VPBlockBase *HeaderVPB) {
R->setEntry(HeaderVPB);
R->setExiting(LatchVPBB);

// All VPBB's reachable shallowly from HeaderVPB belong to the current region,
// except the exit blocks reachable via non-latch exiting blocks.
// All VPBB's reachable shallowly from HeaderVPB belong to the current region.
SmallPtrSet<VPBlockBase *, 2> ExitBlocks(Plan.getExitBlocks().begin(),
Plan.getExitBlocks().end());
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
SmallPtrSet<VPBlockBase *, 2> ExitBlocks(Plan.getExitBlocks().begin(),
Plan.getExitBlocks().end());

?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed thanks

for (VPBlockBase *VPBB : vp_depth_first_shallow(HeaderVPB))
if (!ExitBlocks.contains(VPBB))
VPBB->setParent(R);
VPBB->setParent(R);
}

// Add the necessary canonical IV and branch recipes required to control the
Expand Down Expand Up @@ -546,7 +544,8 @@ void VPlanTransforms::prepareForVectorization(VPlan &Plan, Type *InductionTy,
return;
}

// The connection order corresponds to the operands of the conditional branch.
// The connection order corresponds to the operands of the conditional branch,
// with the middle block already connected to the exit block.
VPBlockUtils::connectBlocks(MiddleVPBB, ScalarPH);

auto *ScalarLatchTerm = TheLoop->getLoopLatch()->getTerminator();
Expand Down
Loading