[llvm] [LV] Vectorize Epilogues for loops with small VF but high IC (PR #108190)
David Sherwood via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 18 02:21:14 PST 2024
================
@@ -4677,7 +4683,11 @@ VectorizationFactor LoopVectorizationPlanner::selectEpilogueVectorizationFactor(
return Result;
}
- if (!CM.isEpilogueVectorizationProfitable(MainLoopVF)) {
+ unsigned Multiplier = IC;
+ if (MainLoopVF.isScalable())
+ Multiplier = getVScaleForTuning(OrigLoop, TTI).value_or(1);
----------------
david-arm wrote:
Hi @fhahn can you verify this as well? I think it should be one of the following:
```
unsigned Multiplier = IC;
if (MainLoopVF.isScalable())
Multiplier *= getVScaleForTuning(OrigLoop, TTI).value_or(1);
```
or
```
unsigned Multiplier = 1;
if (MainLoopVF.isScalable())
Multiplier = getVScaleForTuning(OrigLoop, TTI).value_or(1);
```
https://github.com/llvm/llvm-project/pull/108190
More information about the llvm-commits
mailing list