[llvm] [LV] Skip sentinel value for FindLastIV reductions when start value is provably less than IV start. (PR #141788)

Ramkumar Ramachandra via llvm-commits llvm-commits at lists.llvm.org
Thu May 29 01:18:38 PDT 2025


================
@@ -97,9 +98,10 @@ class RecurrenceDescriptor {
         : IsRecurrence(IsRecur), PatternLastInst(I),
           RecKind(RecurKind::None), ExactFPMathInst(ExactFP) {}
 
-    InstDesc(Instruction *I, RecurKind K, Instruction *ExactFP = nullptr)
+    InstDesc(Instruction *I, RecurKind K, Value *Sentinel = nullptr,
+             Instruction *ExactFP = nullptr)
         : IsRecurrence(true), PatternLastInst(I), RecKind(K),
-          ExactFPMathInst(ExactFP) {}
+          ExactFPMathInst(ExactFP), SentinelValue(Sentinel) {}
----------------
artagnon wrote:

I don't think ExactFP is ever used via this constructor call: you can strip it?

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


More information about the llvm-commits mailing list