[llvm] [LV] Increase vectorize-memory-check-threshold to 256 (PR #151712)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 1 08:30:21 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-vectorizers
@llvm/pr-subscribers-llvm-transforms
Author: Igor Kirillov (igogo-x86)
<details>
<summary>Changes</summary>
We have a benchmark with large loops that benefit from vectorisation; however, they currently require several thousands runtime checks due to the way `LoopAccessAnalysis` is implemented. I would like to improve LAA to enable vectorisation with significantly fewer checks - though still somewhat more than the current limit of 128. Before committing to this task, I need to know whether we can raise this threshold. I checked and found that increasing it to 256 caused no performance or compile-time regressions, including when using the benchmarks from https://llvm-compile-time-tracker.com/
---
Full diff: https://github.com/llvm/llvm-project/pull/151712.diff
1 Files Affected:
- (modified) llvm/lib/Transforms/Vectorize/LoopVectorize.cpp (+1-1)
``````````diff
diff --git a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
index 850c4a11edc67..45460003f4a4e 100644
--- a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+++ b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
@@ -203,7 +203,7 @@ static cl::opt<unsigned> TinyTripCountVectorThreshold(
"are incurred."));
static cl::opt<unsigned> VectorizeMemoryCheckThreshold(
- "vectorize-memory-check-threshold", cl::init(128), cl::Hidden,
+ "vectorize-memory-check-threshold", cl::init(256), cl::Hidden,
cl::desc("The maximum allowed number of runtime memory checks"));
// Option prefer-predicate-over-epilogue indicates that an epilogue is undesired,
``````````
</details>
https://github.com/llvm/llvm-project/pull/151712
More information about the llvm-commits
mailing list