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

via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 7 14:03:01 PDT 2026


================
@@ -8988,8 +8987,9 @@ static SmallVector<Instruction *> preparePlanForEpilogueVectorLoop(
                             m_VPValue(SentinelVPV)));
       });
 
-      if (RdxResult->getOpcode() == VPInstruction::ComputeAnyOfResult) {
-        Value *StartV = RdxResult->getOperand(0)->getLiveInIRValue();
+      if (RecurrenceDescriptor::isAnyOfRecurrenceKind(RK)) {
+        Value *StartV = cast<PHINode>(ResumeV)->getIncomingValueForBlock(
+            EPI.MainLoopIterationCountCheck);
----------------
ayalz wrote:

Worth a comment, as in the "// Get the frozen start value from the main loop." below?

Would be good unite common parts of IsFindIV case below with AnyOf case here, clarifying the distinction between them.

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


More information about the llvm-commits mailing list