[llvm] [VPlan] Optimize resume values of IVs together with other exit values. (PR #174239)
David Sherwood via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 3 07:02:20 PST 2026
================
@@ -562,12 +562,21 @@ static void addInitialSkeleton(VPlan &Plan, Type *InductionTy, DebugLoc IVDL,
createExtractsForLiveOuts(Plan, MiddleVPBB);
+ VPBuilder MiddleBuilder(MiddleVPBB, MiddleVPBB->getFirstNonPhi());
VPBuilder ScalarPHBuilder(ScalarPH);
for (const auto &[PhiR, ScalarPhiR] : zip_equal(
drop_begin(HeaderVPBB->phis()), Plan.getScalarHeader()->phis())) {
auto *VectorPhiR = cast<VPPhi>(&PhiR);
+ VPValue *ResumeFromVectorLoop = VectorPhiR->getOperand(1);
+ if (!isa<VPIRValue>(ResumeFromVectorLoop)) {
----------------
david-arm wrote:
How could the PHI update ever be a VPIRValue? By definition surely an update must have come from an actual recipe in the vector loop?
https://github.com/llvm/llvm-project/pull/174239
More information about the llvm-commits
mailing list