[llvm] [VPlan] Dispatch to multiple exit blocks via middle blocks. (PR #112138)
    David Sherwood via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Wed Oct 23 08:16:42 PDT 2024
    
    
  
================
@@ -7692,12 +7697,15 @@ DenseMap<const SCEV *, Value *> LoopVectorizationPlanner::executePlan(
   BestVPlan.execute(&State);
 
   // 2.5 Collect reduction resume values.
-  auto *ExitVPBB =
-      cast<VPBasicBlock>(BestVPlan.getVectorLoopRegion()->getSingleSuccessor());
-  for (VPRecipeBase &R : *ExitVPBB) {
-    createAndCollectMergePhiForReduction(
-        dyn_cast<VPInstruction>(&R), State, OrigLoop,
-        State.CFG.VPBB2IRBB[ExitVPBB], ExpandedSCEVs);
+  VPBasicBlock *ExitVPBB = nullptr;
+  if (BestVPlan.getVectorLoopRegion()->getSingleSuccessor()) {
----------------
david-arm wrote:
In fact there can only be one successor in this patch.
https://github.com/llvm/llvm-project/pull/112138
    
    
More information about the llvm-commits
mailing list