Landing: ac91bb5b441c
Project / Subsystem
gcc / aarch64
Date
2026-06-29
Author
Pengfei Li
Commit
ac91bb5b441cd7330c1644937830fe83201c69c3
Source
github
Perf win
Yes
Breaking
No
All attributes
- project
- gcc
- subsystem
- aarch64
- patch_id
- —
- commit_hash
- ac91bb5b441cd7330c1644937830fe83201c69c3
- source_type
- github
- headline
- AArch64: Cap suggested unroll factor for small known-niters loops
- tldr
- AArch64 vectorizer caps suggested unroll factor for small loops to avoid unnecessary overhead.
- author
- Pengfei Li
- outcome
- committed
- performance_win
- true
- breaking_change
- false
- series_id
- —
- series_parts
- []
- tags
-
- • aarch64
- • vectorization
- • optimization
- discussion_id_link
- —
- bugzilla_pr
- —
- date
- 2026-06-29T00:00:00.000Z
The AArch64 backend now caps the suggested unroll factor for small, known-iteration loops during vectorization. This prevents the backend from suggesting an excessively high unroll factor (e.g., 4 when only 1 or 2 are needed), which could lead to suboptimal code generation due to extra epilogue loops. The cap is calculated using CEIL(niters, VF) to ensure all scalar iterations are covered by the vectorized loop.