[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
Sun Oct 22 21:08:05 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:

Working on this. 

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


More information about the llvm-commits mailing list