[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


================
@@ -8324,7 +8322,7 @@ void LoopVectorizationPlanner::addReductionResultComputation(
     VPBuilder::InsertPointGuard Guard(Builder);
     Builder.setInsertPoint(MiddleVPBB, IP);
     // For AnyOf reductions, find the select among PhiR's users. This is used
-    // both to find NewVal for ComputeAnyOfResult and to adjust the reduction.
+    // both to find NewVal for the final result and to adjust the reduction.
     VPRecipeBase *AnyOfSelect = nullptr;
     if (RecurrenceDescriptor::isAnyOfRecurrenceKind(RecurrenceKind)) {
       AnyOfSelect = cast<VPRecipeBase>(*find_if(PhiR->users(), [](VPUser *U) {
----------------
ayalz wrote:

Independent: (only) in this case AnyOfSelect is non-null (otherwise use `cast_if_present`), so the following `if (AnyOfSelect)` can be fused into here.

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


More information about the llvm-commits mailing list