[llvm] [VPlan] Fold common edges away in convertPhisToBlends (PR #150368)
Luke Lau via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 24 05:20:43 PDT 2025
================
@@ -238,6 +257,7 @@ void VPPredicator::convertPhisToBlends(VPBasicBlock *VPBB) {
// be duplications since this is a simple recursive scan, but future
// optimizations will clean it up.
+ VPValue *CommonEdgeMask = findCommonEdgeMask(PhiR);
SmallVector<VPValue *, 2> OperandsWithMask;
unsigned NumIncoming = PhiR->getNumIncoming();
for (unsigned In = 0; In < NumIncoming; In++) {
----------------
lukel97 wrote:
I think we always need to do at least two iterations, because we can't remove the common edge mask until we've gone through every edge mask and checked that they all contain it
https://github.com/llvm/llvm-project/pull/150368
More information about the llvm-commits
mailing list