[llvm] [LV] Vectorize selecting last IV of min/max element. (PR #141431)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 18 05:53:59 PST 2025
================
@@ -225,6 +259,10 @@ bool RecurrenceDescriptor::AddReductionVar(
if (Phi->getParent() != TheLoop->getHeader())
return false;
+ if (auto RD = getMultiUseMinMax(Phi, Kind, TheLoop)) {
----------------
ayalz wrote:
As a simple early-exit case of AddReductionVar(), should getMultiUseMinMax() also return bool and receive a reference of `RecurrenceDescriptor` as parameter, rather than return an optional? Name could also be more aligned.
https://github.com/llvm/llvm-project/pull/141431
More information about the llvm-commits
mailing list