[llvm] [VPlan] Simplify branch on False in VPlan transform (NFC). (PR #140409)

via llvm-commits llvm-commits at lists.llvm.org
Thu May 29 05:37:37 PDT 2025


================
@@ -507,8 +507,12 @@ void VPlanTransforms::prepareForVectorization(
                                    cast<VPBasicBlock>(HeaderVPB),
                                    cast<VPBasicBlock>(LatchVPB), Range);
         HandledUncountableEarlyExit = true;
+      } else {
+        for (VPRecipeBase &R : cast<VPIRBasicBlock>(EB)->phis()) {
+          if (auto *PhiR = dyn_cast<VPIRPhi>(&R))
+            PhiR->removeIncomingValue(Pred);
----------------
ayalz wrote:

Is this part of disconnecting (countable) early exits? Can PhiR remain w/o any incoming value, and if so should it be removed?

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


More information about the llvm-commits mailing list