Landing: 3050eeeee418
Project / Subsystem
gcc / caller_save_regs
Date
2026-05-15
Author
H.J. Lu
Commit
3050eeeee4183b9723a1465552b5798a1c21d223
Source
github
Perf win
No
Breaking
No
All attributes
- project
- gcc
- subsystem
- caller_save_regs
- patch_id
- —
- commit_hash
- 3050eeeee4183b9723a1465552b5798a1c21d223
- source_type
- github
- headline
- Caller_save_regs: Return the enabled registers.
- tldr
- GCC now only considers enabled registers when determining caller-saved registers, fixing a potential optimization issue.
- author
- H.J. Lu
- outcome
- committed
- performance_win
- false
- breaking_change
- false
- series_id
- —
- series_parts
- []
- tags
-
- • rtl-optimization
- • register allocation
- • abi
- discussion_id_link
- —
- bugzilla_pr
- —
- date
- 2026-05-15T00:00:00.000Z
GCC’s caller_save_regs function now returns only the enabled registers. Since a caller can only save a register if it is enabled in the caller, this change ensures that the register allocation process considers only valid registers for saving. This resolves a potential issue where disabled registers might have been incorrectly considered as caller-saved, which could lead to suboptimal code generation.