Landing: d9d70a5fbbe2
Project / Subsystem
gcc / gcc
Date
2026-07-13
Author
Vladimir N. Makarov
Commit
d9d70a5fbbe25ddbed66c05b9ec04fe97a23059f
Source
github
Perf win
No
Breaking
No
All attributes
- project
- gcc
- subsystem
- gcc
- patch_id
- —
- commit_hash
- d9d70a5fbbe25ddbed66c05b9ec04fe97a23059f
- source_type
- github
- headline
- Prevent equivalence substitution in LRA from causing incorrect reloads
- tldr
- LRA optimization pass now avoids a specific equivalence substitution that could lead to wrong memory reload offsets.
- author
- Vladimir N. Makarov
- outcome
- committed
- performance_win
- false
- breaking_change
- false
- series_id
- —
- series_parts
- []
- tags
-
- • optimization
- • compiler
- discussion_id_link
- —
- bugzilla_pr
- —
- date
- 2026-07-13T00:00:00.000Z
A bug in the GCC Link-Time Register Allocation (LRA) pass could cause incorrect memory addresses to be used for reloads when employing equivalence substitution. This occurred because the elimination offset was updated only once per instruction, leading to an incorrect offset in the output reload instruction. To fix this, equivalence substitution is now disabled in specific cases where it is not profitable and complex to fix, preventing the incorrect reloads.