[llvm] [LV] Support argmin/argmax with strict predicates. (PR #170223)
via llvm-commits
llvm-commits at lists.llvm.org
Sun Jan 25 15:57:24 PST 2026
================
@@ -1403,7 +1405,139 @@ bool VPlanTransforms::handleFindLastReductions(VPlan &Plan) {
return true;
}
-bool VPlanTransforms::handleMultiUseReductions(VPlan &Plan) {
+/// For an argmin/argmax reduction with strict predicate \p MinOrMaxPhiR,
+/// convert the FindLastIV reduction \p FindLastIVPhiR of induction \p WideIV to
+/// a new UMin reduction of a wide canonical IV. If the original IV was not
----------------
ayalz wrote:
Should the epilog stitching be updated to avoid relying on header phi kind for conveying the kind of compute reduction result, now that they are distinct?
Having a header reduction phi of kind UMin looks confusing as it suggests a MinOrMax reduction, but this reduction works on a canonical IV (whose UMin is 0).
https://github.com/llvm/llvm-project/pull/170223
More information about the llvm-commits
mailing list