Landing: 4d22d3ead95e

Project / Subsystem

gcc / ranger

Date

2026-09-30

Author

Aldy Hernandez

Commit

4d22d3ead95ec862afd6726a10230e27587f4663

Source

github

Perf win

Yes

Breaking

No

All attributes

project
gcc
subsystem
ranger
patch_id
—
commit_hash
4d22d3ead95ec862afd6726a10230e27587f4663
source_type
github
headline
ranger: Use index range for loads from constant aggregates
tldr
Improves constant aggregate load optimization by using known index ranges.
author
Aldy Hernandez
outcome
committed
performance_win
true
breaking_change
false
series_id
—
series_parts
[]
tags
  • • optimization
  • • compiler
  • • range analysis
discussion_id_link
—
bugzilla_pr
—
date
2026-09-30T00:00:00.000Z

The GCC compiler now optimizes loads from constant aggregates more effectively by considering the known range of the index. Instead of assuming the entire aggregate might be accessed, it now narrows the loaded values to only those elements that could possibly be reached by the index’s known range. This enables further optimizations, such as folding comparisons involving these narrowed loads.