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

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Thu May 29 10:45:25 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);
----------------
fhahn wrote:

Yes this is related to disconnecting the early exit, complementing `VPBlockUtils::disconnectBlocks(Pred, EB)` below

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


More information about the llvm-commits mailing list