[llvm] [LV] Vectorize Epilogues for loops with small VF but high IC (PR #108190)

David Green via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 8 09:58:23 PDT 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);
----------------
davemgreen wrote:

I believe this could be `Multiplier *= ` for SVE, so that both the IC and the VScaleForTuning are accounted for.

https://github.com/llvm/llvm-project/pull/108190


More information about the llvm-commits mailing list