Landing: bb6660183276
Project / Subsystem
gcc / ranger
Date
2026-09-30
Author
Aldy Hernandez
Commit
bb6660183276d4b5b450beb2303e8b6e6aaa2f08
Source
github
Perf win
No
Breaking
No
All attributes
- project
- gcc
- subsystem
- ranger
- patch_id
- —
- commit_hash
- bb6660183276d4b5b450beb2303e8b6e6aaa2f08
- source_type
- github
- headline
- ranger: walk a constant array's initializer by index
- tldr
- VRP pass now walks array initializers by index for constant loads, improving analysis accuracy for missing elements.
- author
- Aldy Hernandez
- outcome
- committed
- performance_win
- false
- breaking_change
- false
- series_id
- —
- series_parts
- []
- tags
-
- • optimization
- • compiler pass
- • analysis
- discussion_id_link
- —
- bugzilla_pr
- —
- date
- 2026-09-30T00:00:00.000Z
The GCC ranger (Value Range Propagation) pass now walks constant array initializers by index when processing loads from arrays with unknown indices. Previously, it would union all initializer elements regardless of their position, potentially leading to inaccuracies if elements were missing. This change improves the analysis by correctly identifying missing elements and adds new tests for this behavior.