[llvm] [VPlan] Insert VPBlendRecipes in post order. NFC (PR #201782)
Luke Lau via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 8 00:33:35 PDT 2026
================
@@ -136,6 +138,12 @@ void VPPredicator::createBlockInMask(VPBasicBlock *VPBB) {
// Start inserting after the block's phis, which be replaced by blends later.
Builder.setInsertPoint(VPBB, VPBB->getFirstNonPhi());
+ // Keep track of where in VPBB we are inserting the masks into.
+ scope_exit UpdateInsertPoint([this, &VPBB]() {
+ assert(!InsertPoints.contains(VPBB) && "InsertPoint clobbered?");
+ InsertPoints[VPBB] = Builder.getInsertPoint();
+ });
----------------
lukel97 wrote:
We don't reset the insert point but it changes when new edge masks or block in-masks are created. Although I think we can just recalculate the insert point based off of the block-in mask. I've removed the InsertPoints map in 73427ee2b2dec03dd65f9f6c65e4bb0d31a969f6
https://github.com/llvm/llvm-project/pull/201782
More information about the llvm-commits
mailing list