[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:
However, this doesn't seem precise enough. If it's a cmp-select form of min/max, it's normal for phi to have more than one user. It should more accurately refer to multiple users outside the recurrence chain.
https://github.com/llvm/llvm-project/pull/141431
More information about the llvm-commits
mailing list