[llvm] [LV] Vectorize selecting last IV of min/max element. (PR #141431)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 21 07:44:00 PST 2025
================
@@ -818,13 +818,14 @@ void VPlanTransforms::addMinimumVectorEpilogueIterationCheck(
Branch->setMetadata(LLVMContext::MD_prof, BranchWeights);
}
-/// If \p RedPhiR is used by a ComputeReductionResult recipe, return it.
-/// Otherwise return nullptr.
-static VPInstruction *
-findComputeReductionResult(VPReductionPHIRecipe *RedPhiR) {
- auto It = find_if(RedPhiR->users(), [](VPUser *U) {
+/// If \p RedPhiR is used to compute are reduction result via a
+/// ComputeReductionResult, ComputeFindIVResult or ComputeAnyOfResult
+/// VPInstruction, return it. Otherwise return nullptr.
----------------
ayalz wrote:
Worth generalizing to any VPValue (single def recipe), rather than restricting to reduction phi recipes?
https://github.com/llvm/llvm-project/pull/141431
More information about the llvm-commits
mailing list