[llvm] [VPlan] Simplify the computation of the block entry mask. (PR #173265)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 5 01:28:54 PST 2026
================
@@ -130,6 +136,15 @@ VPValue *VPPredicator::createEdgeMask(const VPBasicBlock *Src,
void VPPredicator::createBlockInMask(VPBasicBlock *VPBB) {
// Start inserting after the block's phis, which be replaced by blends later.
Builder.setInsertPoint(VPBB, VPBB->getFirstNonPhi());
+
+ // Reuse the mask of the header if the VPBB post-dominates the header.
+ // TODO: Generalize to reuse mask of immediate dominator.
+ VPBasicBlock *Header =
----------------
fhahn wrote:
might want to retrieve header once and set it in the constructor, if all calls to `createBlockInMask` need it
https://github.com/llvm/llvm-project/pull/173265
More information about the llvm-commits
mailing list