[llvm] [LV] Add support for cmp reductions with decreasing IVs. (PR #140451)
Ramkumar Ramachandra via llvm-commits
llvm-commits at lists.llvm.org
Wed May 28 05:34:25 PDT 2025
================
@@ -990,6 +1018,12 @@ bool RecurrenceDescriptor::isReductionPHI(PHINode *Phi, Loop *TheLoop,
LLVM_DEBUG(dbgs() << "Found a FindLastIV reduction PHI." << *Phi << "\n");
return true;
}
+ if (AddReductionVar(Phi, RecurKind::FindFirstIVUMin, TheLoop, FMF, RedDes, DB,
+ AC, DT, SE)) {
+ LLVM_DEBUG(dbgs() << "Found a FindFirstV reduction PHI." << *Phi << "\n");
+ return true;
+ }
----------------
artagnon wrote:
See #141752. You can rebase on top of it, assuming it's a good direction.
https://github.com/llvm/llvm-project/pull/140451
More information about the llvm-commits
mailing list