[llvm] [LoopVectorizer] Add a -force-vscale-for-tuning override option. (PR #156916)

David Green via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 8 03:32:05 PDT 2025


================
@@ -1473,6 +1477,11 @@ class LoopVectorizationCostModel {
   /// vscale_range.min == vscale_range.max then return vscale_range.max, else
   /// return the value returned by the corresponding TTI method.
   void initializeVScaleForTuning() {
+    if (VScaleForTuningOpt.getNumOccurrences()) {
----------------
davemgreen wrote:

I was thinking that as it is a tuning / debug option we would leave it to the user. I don't believe there is any technical reason why the factor we multiply by and the vscale_range need to match. It will just be the same as TTI.getVScaleForTuning() in the latest version though.

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


More information about the llvm-commits mailing list