[llvm] [VPlan] Fold common edges away in convertPhisToBlends (PR #150368)

Ramkumar Ramachandra via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 24 05:17:53 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++) {
----------------
artagnon wrote:

We are already iterating over the incoming blocks here: can we fold the logic of findCommonEdgeMask here?

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


More information about the llvm-commits mailing list