[llvm] [LV][EVL] Emit vp.merge intrinsic to enable out-loop reduction in EVL vectorization. (PR #101641)
Mel Chen via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 22 07:27:16 PDT 2024
================
@@ -9386,10 +9397,8 @@ void LoopVectorizationPlanner::adjustRecipesForReductions(
cast<VPInstruction>(&U)->getOpcode() ==
VPInstruction::ComputeReductionResult;
});
- if (PreferPredicatedReductionSelect ||
- TTI.preferPredicatedReductionSelect(
- PhiR->getRecurrenceDescriptor().getOpcode(), PhiTy,
- TargetTransformInfo::ReductionFlags()))
+ if (CM.usePredicatedReductionSelect(
+ PhiR->getRecurrenceDescriptor().getOpcode(), PhiTy))
----------------
Mel-Chen wrote:
It can be adjusted in the EVL transformation. patch 8a3982fa6c65c08271b43194698d27e4cb29d0f4
But I don't recommend this. Such an implementation is more complicated and may lose the opportunity to sink the non-predicated reduction select outside the loop in the future VPlan transformation.
Could you point out why you want to adjust it in the EVL transformation?
https://github.com/llvm/llvm-project/pull/101641
More information about the llvm-commits
mailing list