[llvm] [VPlan] Model branch cond to enter scalar epilogue in VPlan. (PR #92651)

via llvm-commits llvm-commits at lists.llvm.org
Sun Jun 16 16:24:36 PDT 2024


================
@@ -8992,6 +8979,9 @@ void LoopVectorizationPlanner::adjustRecipesForReductions(
     }
   }
   Builder.setInsertPoint(&*LatchVPBB->begin());
+  VPBasicBlock *MiddleVPBB =
+      cast<VPBasicBlock>(VectorLoopRegion->getSingleSuccessor());
+  VPBasicBlock::iterator IP = MiddleVPBB->begin();
----------------
ayalz wrote:

getFirstNonPhi() instead of begin()?
Is this change needed, perhaps to retain insn order in tests, compared to the current code which seems to use end()?

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


More information about the llvm-commits mailing list