[llvm] [VPlan] Simplify the computation of the block entry mask. (PR #173265)

Mel Chen via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 10 01:47:49 PDT 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 =
----------------
Mel-Chen wrote:

Yes, please refer to https://github.com/llvm/llvm-project/pull/185595

https://github.com/llvm/llvm-project/pull/173265


More information about the llvm-commits mailing list