[llvm] [VPlan] Create header phi recipes after initial scalar optimizations. (PR #200920)

Ramkumar Ramachandra via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 10 06:19:01 PDT 2026


================
@@ -635,19 +635,20 @@ createWidenInductionRecipe(PHINode *Phi, VPPhi *PhiR, VPIRValue *Start,
                            const InductionDescriptor &IndDesc, VPlan &Plan,
                            PredicatedScalarEvolution &PSE, Loop &OrigLoop,
                            DebugLoc DL) {
-  [[maybe_unused]] ScalarEvolution &SE = *PSE.getSE();
+  ScalarEvolution &SE = *PSE.getSE();
   assert(SE.isLoopInvariant(IndDesc.getStep(), &OrigLoop) &&
          "step must be loop invariant");
   assert((Plan.getLiveIn(IndDesc.getStartValue()) == Start ||
           (SE.isSCEVable(IndDesc.getStartValue()->getType()) &&
-           SE.getSCEV(IndDesc.getStartValue()) ==
+           PSE.getSCEV(IndDesc.getStartValue()) ==
                vputils::getSCEVExprForVPValue(Start, PSE))) &&
          "Start VPValue must match IndDesc's start value");
 
   VPValue *Step =
       vputils::getOrCreateVPValueForSCEVExpr(Plan, IndDesc.getStep());
 
   VPValue *BackedgeVal = PhiR->getOperand(1);
+
----------------
artagnon wrote:

Could revert stray hunk?

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


More information about the llvm-commits mailing list