[llvm] [LoopVectorizer] Add a -force-vscale-for-tuning override option. (PR #156916)
David Sherwood via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 4 08:54:55 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()) {
----------------
david-arm wrote:
Thanks for this! I like the idea of having a flag to force the choice of vscale, but should this be sanitised according to vscale_range on the function or at least emit a warning that it's architecturally unsupported? For example, if the function has the `vscale_range(1, 16)` attribute then only power-of-2 vscale values are permitted leading to choices of 1,2,4,8 or 16.
https://github.com/llvm/llvm-project/pull/156916
More information about the llvm-commits
mailing list