================
@@ -7267,6 +7293,19 @@ getEpilogueTailLowering(const LoopVectorizationCostModel
&MainCM, const Loop *L,
return CM_EpilogueAllowed;
}
+ bool HasReductions = !LVL.getReductionVars().empty();
+ bool HasSelectCmpReductions =
+ HasReductions &&
+ any_of(LVL.getReductionVars(), [&](auto &Reduction) -> bool {
+ const RecurrenceDescriptor &RdxDesc = Reduction.second;
+ RecurKind RK = RdxDesc.getRecurrenceKind();
+ return RecurrenceDescriptor::isAnyOfRecurrenceKind(RK) ||
+ RecurrenceDescriptor::isFindIVRecurrenceKind(RK) ||
+ RecurrenceDescriptor::isMinMaxRecurrenceKind(RK);
----------------
sdesmalen-arm wrote:
What's the reason for not tail-folding here? is that for functional or
performance reasons?
https://github.com/llvm/llvm-project/pull/207815
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits