[llvm] [VPlan] Compute induction end values in VPlan. (PR #112145)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 19 06:56:23 PST 2024


================
@@ -8935,9 +8901,20 @@ static void addScalarResumePhis(VPRecipeBuilder &Builder, VPlan &Plan) {
     auto *ScalarPhiI = dyn_cast<PHINode>(&ScalarPhiIRI->getInstruction());
     if (!ScalarPhiI)
       break;
-    auto *VectorPhiR = cast<VPHeaderPHIRecipe>(Builder.getRecipe(ScalarPhiI));
-    if (!isa<VPFirstOrderRecurrencePHIRecipe, VPReductionPHIRecipe>(VectorPhiR))
+    auto *VectorPhiR = GetHeaderPhiRecipe(ScalarPhiI);
----------------
fhahn wrote:

Sounds like a great cleanup, will do separately.

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


More information about the llvm-commits mailing list