[llvm] [LV] Vectorize selecting last IV of min/max element. (PR #141431)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 19 07:11:03 PST 2025


================
@@ -1251,7 +1251,9 @@ llvm::canParallelizeReductionWhenUnrolling(PHINode &Phi, Loop *L,
   RecurrenceDescriptor RdxDesc;
   if (!RecurrenceDescriptor::isReductionPHI(&Phi, L, RdxDesc,
                                             /*DemandedBits=*/nullptr,
-                                            /*AC=*/nullptr, /*DT=*/nullptr, SE))
+                                            /*AC=*/nullptr, /*DT=*/nullptr,
+                                            SE) ||
+      RdxDesc.isPhiMultiUse())
----------------
fhahn wrote:

Done thanks

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


More information about the llvm-commits mailing list