[llvm] [LoopVectorize] Vectorize select-cmp reduction pattern for increasing integer induction variable (PR #67812)
Graham Hunter via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 29 08:19:39 PST 2024
================
@@ -900,6 +993,11 @@ bool RecurrenceDescriptor::isReductionPHI(PHINode *Phi, Loop *TheLoop,
<< *Phi << "\n");
return true;
}
+ if (AddReductionVar(Phi, RecurKind::IFindLastIV, TheLoop, FMF, RedDes, DB, AC,
----------------
huntergr-arm wrote:
The AnyOf recurrence kinds do the same thing, although there is a separate check for `FAnyOf` below which wouldn't be reached if `IAnyOf` matched it first, and is just redundant work if there wasn't a match.
We would only see that when looking at iv-descriptors debug output, and there's no tests for that. This code at least reports the correct type for an fcmp.
I figure it's fine with just the single case here.
https://github.com/llvm/llvm-project/pull/67812
More information about the llvm-commits
mailing list