[llvm] [VPlan] Model branch cond to enter scalar epilogue in VPlan. (PR #92651)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 4 05:25:16 PDT 2024
================
@@ -9114,8 +9067,8 @@ void LoopVectorizationPlanner::adjustRecipesForReductions(
// also modeled in VPlan.
auto *FinalReductionResult = new VPInstruction(
VPInstruction::ComputeReductionResult, {PhiR, NewExitingVPV}, ExitDL);
- cast<VPBasicBlock>(VectorLoopRegion->getSingleSuccessor())
- ->appendRecipe(FinalReductionResult);
+ FinalReductionResult->insertBefore(*MiddleVPBB, IP);
+ IP = std::next(FinalReductionResult->getIterator());
----------------
ayalz wrote:
Is this std::next needed - having inserted FinalReductionResult before IP implies that the latter already follows the former?
https://github.com/llvm/llvm-project/pull/92651
More information about the llvm-commits
mailing list