[llvm] [VPlan] Introduce ResumePhi VPInstruction, use to create phi for FOR. (PR #94760)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 11 04:52:19 PDT 2024
================
@@ -196,9 +196,22 @@ void VPLiveOut::fixPhi(VPlan &Plan, VPTransformState &State) {
: VPLane::getLastLaneForVF(State.VF);
VPBasicBlock *MiddleVPBB =
cast<VPBasicBlock>(Plan.getVectorLoopRegion()->getSingleSuccessor());
- BasicBlock *MiddleBB = State.CFG.VPBB2IRBB[MiddleVPBB];
- Phi->addIncoming(State.get(ExitValue, VPIteration(State.UF - 1, Lane)),
- MiddleBB);
+ VPRecipeBase *DefRecipe = ExitValue->getDefiningRecipe();
+ auto *ExitingVPBB = DefRecipe ? DefRecipe->getParent() : nullptr;
----------------
fhahn wrote:
Adjusted, thanks!
https://github.com/llvm/llvm-project/pull/94760
More information about the llvm-commits
mailing list