[llvm] [LV] Also clamp MaxVF by trip count when maximizing vector bandwidth. (PR #149794)

David Sherwood via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 22 01:47:56 PDT 2025


================
@@ -3940,6 +3951,8 @@ ElementCount LoopVectorizationCostModel::getMaximizedVFForTarget(
       }
     }
 
+    MaxVF = clampVFByMaxTripCount(MaxVF, MaxTripCount, FoldTailByMasking);
+
----------------
david-arm wrote:

Should we be invalidating cost modelling decisions if we clamp back to MaxVectorElementCount, since nothing will have changed?

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


More information about the llvm-commits mailing list