[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:53 PST 2025


================
@@ -7966,6 +7978,9 @@ void VPRecipeBuilder::collectScaledReductions(VFRange &Range) {
   SmallVector<std::pair<PartialReductionChain, unsigned>>
       PartialReductionChains;
   for (const auto &[Phi, RdxDesc] : Legal->getReductionVars()) {
+    if (RecurrenceDescriptor::isMinMaxRecurrenceKind(
+            RdxDesc.getRecurrenceKind()))
+      continue;
----------------
Mel-Chen wrote:

Would the min/max recurrences originally be collected for partial reduction?

https://github.com/llvm/llvm-project/pull/141431


More information about the llvm-commits mailing list