[clang] [llvm] Disable pre-link LTO vectorisation and loop unroll (PR #195886)
Kiran Chandramohan via cfe-commits
cfe-commits at lists.llvm.org
Sat Sep 19 16:43:08 PDT 2026
kiranchandramohan wrote:
Could you check forced vectorization for the full-LTO -O1 case? It looks like we have a change of behaviour for this case: the pre-link vectorizer is removed, while the post-link pipeline returns before adding it. Can we preserve existing behaviour and add a test, or add a suitable explanation for the change?
```
void forced(float *restrict dst, const float *restrict src, int n) {
#pragma clang loop vectorize(enable) vectorize_width(4) interleave_count(1)
for (int i = 0; i < n; ++i)
dst[i] = src[i] + 1.0f;
}
```
Do we need to document that vectorisation remarks will now be emitted during LTO linking, and -Rpass=loop-vectorize needs to be supplied on the link command?
Could you check whether the `WarnMissedTransformationsPass` is run twice after the change in `PassBuilder::addVectorPasses()` and can result in duplicated warnings?
Note: Review was prepared with AI assistance.
https://github.com/llvm/llvm-project/pull/195886
More information about the cfe-commits
mailing list