[llvm] [LV] Add support for cmp reductions with decreasing IVs. (PR #140451)
Mel Chen via llvm-commits
llvm-commits at lists.llvm.org
Wed May 28 08:32:36 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.
----------------
Mel-Chen wrote:
This patch introduces too many new idioms at once.
To keep the patch reviewable and focused, I suggest we pick one direction to extend first:
either support unsigned FindLastIV, or add signed FindFirstIV support.
https://github.com/llvm/llvm-project/pull/140451
More information about the llvm-commits
mailing list