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

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 10 12:53:20 PDT 2026


================
@@ -635,12 +635,12 @@ createWidenInductionRecipe(PHINode *Phi, VPPhi *PhiR, VPIRValue *Start,
                            const InductionDescriptor &IndDesc, VPlan &Plan,
                            PredicatedScalarEvolution &PSE, Loop &OrigLoop,
                            DebugLoc DL) {
-  [[maybe_unused]] ScalarEvolution &SE = *PSE.getSE();
+  [[maybe_unused] 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()) ==
----------------
fhahn wrote:

We need PSE now, due to applying predicates early. 

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


More information about the llvm-commits mailing list