[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:37 PDT 2025


================
@@ -376,6 +378,10 @@ bool RecurrenceDescriptor::AddReductionVar(
       ExactFPMathInst = ExactFPMathInst == nullptr
                             ? ReduxDesc.getExactFPMathInst()
                             : ExactFPMathInst;
+      if (auto *Sentinel = ReduxDesc.getSentinelValue()) {
+        assert(!SentinelValue && "Sentinel value can only be assigned once");
+        SentinelValue = Sentinel;
+      }
----------------
artagnon wrote:

Move to end of block?

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


More information about the llvm-commits mailing list