[llvm] [LV] Vectorize selecting last IV of min/max element. (PR #141431)
Mel Chen via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 18 06:16:55 PST 2025
================
@@ -376,6 +383,9 @@ class RecurrenceDescriptor {
// Currently only a non-reassociative FAdd can be considered in-order,
// if it is also the only FAdd in the PHI's use chain.
bool IsOrdered = false;
+ // True if the reduction PHI has multiple in-loop users. This is relevant
+ // for min/max reductions that are part of a FindLastIV pattern.
+ bool IsPhiMultiUse = false;
----------------
Mel-Chen wrote:
That sounds good, but I think "IsMultiUse" would be enough. If there is more than one operation in the recurrence chain, i.e., phi-> max -> max, not only phi will have user, but max in the middle will also have user.
https://github.com/llvm/llvm-project/pull/141431
More information about the llvm-commits
mailing list