Landing: 1dd02e1deffd
Project / Subsystem
gcc / middle-end
Date
2026-08-21
Author
Tamar Christina
Commit
1dd02e1deffddc3b6c17b26d78569d93d8a0dac0
Source
github
Perf win
Yes
Breaking
No
All attributes
- project
- gcc
- subsystem
- middle-end
- patch_id
- —
- commit_hash
- 1dd02e1deffddc3b6c17b26d78569d93d8a0dac0
- source_type
- github
- headline
- middle-end: Teach ranger about POLY_INT_CST ranges for VRP
- tldr
- Improves optimization of SVE-based VLA branches by enabling range analysis for vector length constants.
- author
- Tamar Christina
- outcome
- committed
- performance_win
- true
- breaking_change
- false
- series_id
- —
- series_parts
- []
- tags
-
- • optimization
- • sve
- • middle-end
- • aarch64
- discussion_id_link
- —
- bugzilla_pr
- —
- date
- 2026-08-21T00:00:00.000Z
This patch enhances GCC’s ranger pass to better optimize branches guarded by variable-length array (VLA) constants, particularly for SVE. By introducing a poly_int_indeterminate_bound target hook, GCC can now understand that SVE vector length queries (svcntb, svcntw) have defined bounds. This allows the compiler to fold away known true/false comparisons, simplifying code generation for loop pre-headers and matching LLVM’s optimization capabilities.