[llvm] [LV] Relax high loop trip count threshold for deciding to interleave a loop (PR #67725)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 25 09:03:53 PST 2024
================
@@ -5381,6 +5381,11 @@ LoopVectorizationCostModel::selectInterleaveCount(ElementCount VF,
unsigned KnownTC = PSE.getSE()->getSmallConstantTripCount(TheLoop);
if (KnownTC) {
+ // At least one iteration must be scalar when this constraint holds. So the
+ // maximum available iterations for interleaving is one less.
+ if (requiresScalarEpilogue(VF.isVector()))
+ KnownTC--;
----------------
fhahn wrote:
Is KnownTC guaranteed to be > 0 here?
https://github.com/llvm/llvm-project/pull/67725
More information about the llvm-commits
mailing list