[llvm] [LV] Relax high loop trip count threshold for deciding to interleave a loop (PR #67725)
Nilanjana Basu via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 24 18:25:26 PDT 2023
================
@@ -5755,8 +5745,12 @@ LoopVectorizationCostModel::selectInterleaveCount(ElementCount VF,
// the InterleaveCount as if vscale is '1', although if some information about
// the vector is known (e.g. min vector size), we can make a better decision.
if (BestKnownTC) {
- MaxInterleaveCount =
- std::min(*BestKnownTC / VF.getKnownMinValue(), MaxInterleaveCount);
+ if (InterleaveSmallLoopScalarReduction)
+ MaxInterleaveCount =
+ std::min(*BestKnownTC / VF.getKnownMinValue(), MaxInterleaveCount);
+ else
+ MaxInterleaveCount = std::min(*BestKnownTC / (VF.getKnownMinValue() * 2),
----------------
nilanjana87 wrote:
Added part 1 of the changes for interleaving count in https://github.com/llvm/llvm-project/pull/70141
https://github.com/llvm/llvm-project/pull/67725
More information about the llvm-commits
mailing list