[llvm] [VPlan] Remove ComputeAnyOfResult, use ComputeReductionResult. (PR #190039)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 8 14:34:19 PDT 2026


================
@@ -8966,17 +8967,15 @@ static SmallVector<Instruction *> preparePlanForEpilogueVectorLoop(
       // value.
       auto IsReductionResult = [](VPRecipeBase *R) {
         auto *VPI = dyn_cast<VPInstruction>(R);
-        if (!VPI)
-          return false;
-        return VPI->getOpcode() == VPInstruction::ComputeAnyOfResult ||
-               VPI->getOpcode() == VPInstruction::ComputeReductionResult;
+        return VPI && VPI->getOpcode() == VPInstruction::ComputeReductionResult;
       };
       auto *RdxResult = cast<VPInstruction>(
           vputils::findRecipe(ReductionPhi->getBackedgeValue(), IsReductionResult));
       assert(RdxResult && "expected to find reduction result");
 
       ResumeV = cast<PHINode>(ReductionPhi->getUnderlyingInstr())
                     ->getIncomingValueForBlock(L->getLoopPreheader());
+      RecurKind RK = ReductionPhi->getRecurrenceKind();
----------------
fhahn wrote:

Sunk thanks

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


More information about the llvm-commits mailing list