[llvm] [LV] Add support for cmp reductions with decreasing IVs. (PR #140451)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 26 13:44:39 PDT 2025


================
@@ -56,6 +56,13 @@ enum class RecurKind {
   FindLastIV, ///< FindLast reduction with select(cmp(),x,y) where one of
               ///< (x,y) is increasing loop induction, and both x and y are
               ///< integer type.
+  FindFirstIVUMin, /// FindFirst reduction with select(icmp(),x,y) where one of
+                   ///< (x,y) is a decreasing loop induction, and both x and y
+                   ///< are integer type.
+  FindFirstIVSMin /// FindFirst reduction with select(icmp(),x,y) where one of
+                  ///< (x,y) is a decreasing loop induction, and both x and y
+                  ///< are integer type.
----------------
fhahn wrote:

The latest version just adds FindFirstIVSMin, as suggested by @Mel-Chen. Updated the mention SMin

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


More information about the llvm-commits mailing list