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

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 20 12:13:52 PST 2025


================
@@ -7996,8 +8002,9 @@ void VPRecipeBuilder::collectScaledReductions(VFRange &Range) {
   SmallVector<std::pair<PartialReductionChain, unsigned>>
       PartialReductionChains;
   for (const auto &[Phi, RdxDesc] : Legal->getReductionVars()) {
-    getScaledReductions(Phi, RdxDesc.getLoopExitInstr(), Range,
-                        PartialReductionChains);
+    if (Instruction *RdxExitInstr = RdxDesc.getLoopExitInstr()) {
----------------
fhahn wrote:

Yep

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


More information about the llvm-commits mailing list