[llvm] [LV] Support argmin/argmax with strict predicates. (PR #170223)

via llvm-commits llvm-commits at lists.llvm.org
Sat Jan 24 14:35:54 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:

FindLastIV reduction \p FindLastIVPhiR should remain a FindLastIV reduction - it continues to produce a vector of IV's which record the iteration in which the running MinOrMax value was last updated within the loop, right?

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


More information about the llvm-commits mailing list