[llvm] [VPlan] Introduce scalar loop header in plan, remove VPLiveOut. (PR #109975)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 25 14:35:01 PDT 2024
================
@@ -8957,7 +8941,14 @@ static void addLiveOutsForFirstOrderRecurrences(
VPInstruction::ResumePhi, {Resume, FOR->getStartValue()}, {},
"scalar.recur.init");
auto *FORPhi = cast<PHINode>(FOR->getUnderlyingInstr());
- Plan.addLiveOut(FORPhi, ResumePhiRecipe);
+ for (VPRecipeBase &R :
+ *cast<VPIRBasicBlock>(ScalarPHVPBB->getSingleSuccessor())) {
+ auto *IRI = cast<VPIRInstruction>(&R);
+ if (&IRI->getInstruction() == FORPhi) {
+ IRI->addOperand(ResumePhiRecipe);
+ break;
----------------
ayalz wrote:
Worth asserting this took place, say by having the loop set IRI which is added an operand afterwards?
https://github.com/llvm/llvm-project/pull/109975
More information about the llvm-commits
mailing list