[llvm] [LV] Vectorize selecting last IV of min/max element. (PR #141431)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 21 03:58:42 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.
----------------
fhahn wrote:
Yep I adjusted the name + comment to clarify this returns a VPInstruction user matching the opcode.
https://github.com/llvm/llvm-project/pull/141431
More information about the llvm-commits
mailing list