[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:50 PST 2025
================
@@ -8162,13 +8174,19 @@ VPRecipeBase *VPRecipeBuilder::tryToCreateWidenRecipe(VPSingleDefRecipe *R,
getScalingForReduction(RdxDesc.getLoopExitInstr()).value_or(1);
PhiRecipe = new VPReductionPHIRecipe(
Phi, RdxDesc.getRecurrenceKind(), *StartV, CM.isInLoopReduction(Phi),
- CM.useOrderedReductions(RdxDesc), ScaleFactor);
- } else {
+ CM.useOrderedReductions(RdxDesc), ScaleFactor,
+ RdxDesc.isPhiMultiUse());
+ } else if (Legal->isFixedOrderRecurrence(Phi)) {
----------------
fhahn wrote:
Ah yes, remove the if again, as this was still left over
https://github.com/llvm/llvm-project/pull/141431
More information about the llvm-commits
mailing list