[llvm] [LV] Add support for cmp reductions with decreasing IVs. (PR #140451)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 26 13:44:38 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;
+ }
----------------
fhahn wrote:
Rebased now after https://github.com/llvm/llvm-project/pull/141752 landed. The current version retains the Min suffix, similar to landed version of https://github.com/llvm/llvm-project/pull/141752.
https://github.com/llvm/llvm-project/pull/140451
More information about the llvm-commits
mailing list