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

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 1 13:19:31 PST 2026


================
@@ -1288,6 +1289,132 @@ bool VPlanTransforms::handleMaxMinNumReductions(VPlan &Plan) {
   return true;
 }
 
+/// For argmin/argmax reductions with strict predicates, convert the existing
+/// FindLastIV reduction to a new UMin reduction of a wide canonical IV. If the
+/// original IV was not canonical, a new canonical wide IV is added, and the
+/// final result is scaled back to the original IV.
+static bool handleFirstArgMinArgMax(VPlan &Plan,
----------------
fhahn wrote:

Done thanks.

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


More information about the llvm-commits mailing list