[llvm] [LV] Extend FindFirstIV to unsigned case (PR #146386)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 9 03:49:56 PDT 2025


================
@@ -719,16 +723,12 @@ RecurrenceDescriptor::isFindIVPattern(RecurKind Kind, Loop *TheLoop,
         (isFindLastIVRecurrenceKind(Kind) && !SE.isKnownPositive(Step)))
       return std::nullopt;
 
-    // Keep the minimum value of the recurrence type as the sentinel value.
-    // The maximum acceptable range for the increasing induction variable,
-    // called the valid range, will be defined as
-
     // Keep the minimum (FindLast) or maximum (FindFirst) value of the
     // recurrence type as the sentinel value. The maximum acceptable range for
----------------
fhahn wrote:

While updating the comments here, 

```suggestion
    // Check if the minimum (FindLast) or maximum (FindFirst) value of the
    // recurrence type can be used as a sentinel value. The maximum acceptable range for
```

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


More information about the llvm-commits mailing list