[llvm] [VPlan] Check FOR/FMinMaxNum epilogue restrictions in VPlan. (PR #191815)

via llvm-commits llvm-commits at lists.llvm.org
Sat Apr 18 01:22:44 PDT 2026


================
@@ -4267,22 +4267,28 @@ static bool hasUnsupportedHeaderPhiRecipe(VPlan &Plan) {
   return any_of(
       Plan.getVectorLoopRegion()->getEntryBasicBlock()->phis(),
       [](VPRecipeBase &R) {
+        // Fixed-order recurrences need special handling and are currently
+        // unsupported.
+        if (isa<VPFirstOrderRecurrencePHIRecipe>(R))
+          return true;
         if (auto *WidenInd = dyn_cast<VPWidenIntOrFpInductionRecipe>(&R))
           return !WidenInd->getPHINode();
         auto *RedPhi = dyn_cast<VPReductionPHIRecipe>(&R);
----------------
ayalz wrote:

May be better to switch to `switch` over R's derived types.

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


More information about the llvm-commits mailing list