Landing: fc96e933de8d
Project / Subsystem
gcc / fold-mem-offsets
Date
2026-09-01
Author
Konstantinos Eleftheriou
Commit
fc96e933de8d29f91ad7ab9cf982ad498bc5c9d0
Source
github
Perf win
Yes
Breaking
No
All attributes
- project
- gcc
- subsystem
- fold-mem-offsets
- patch_id
- —
- commit_hash
- fc96e933de8d29f91ad7ab9cf982ad498bc5c9d0
- source_type
- github
- headline
- Group fold-mem-offsets changes by shared fold insns
- tldr
- Corrects fold-mem-offsets to group related changes by shared instructions, preventing incorrect optimizations.
- author
- Konstantinos Eleftheriou
- outcome
- committed
- performance_win
- true
- breaking_change
- false
- series_id
- —
- series_parts
- []
- tags
-
- • optimization
- • rtl
- • bugfix
- discussion_id_link
- —
- bugzilla_pr
- —
- date
- 2026-09-01T00:00:00.000Z
This change addresses a bug in the fold-mem-offsets pass where related memory offset computations were not correctly grouped. Previously, changes were grouped based on the final register defined by a fold instruction, which could lead to incorrect zeroing of shared base offsets if different chains ended in different registers. The fix now groups changes by the connected components of roots sharing a fold instruction, ensuring that if any part of a component cannot be updated, the entire group is rolled back, preventing incorrect optimizations and fixing PR126412.