Landing: 481222de94ad
Project / Subsystem
gcc / gcc/lra
Date
2026-09-22
Author
Vladimir N. Makarov
Commit
481222de94ad9eac9ecdb5f3fea7f82d5fda7443
Source
github
Perf win
No
Breaking
No
All attributes
- project
- gcc
- subsystem
- gcc/lra
- patch_id
- —
- commit_hash
- 481222de94ad9eac9ecdb5f3fea7f82d5fda7443
- source_type
- github
- headline
- LRA: Implement fallback to memory for memory and reg constraint
- tldr
- Fixes the LRA register allocator to correctly handle 'g' constraints when a register cannot hold the mode value.
- author
- Vladimir N. Makarov
- outcome
- committed
- performance_win
- false
- breaking_change
- false
- series_id
- —
- series_parts
- []
- tags
-
- • optimization
- • register allocation
- • bugfix
- discussion_id_link
- github:gcc-mirror/gcc#127326
- bugzilla_pr
- —
- date
- 2026-09-22T00:00:00.000Z
The Local Register Allocation (LRA) pass in GCC had a bug where it would fail for ‘g’ constraints when a suitable register could not hold the required mode value. This commit adjusts LRA to ignore such registers, falling back to memory, and includes a new test case for this scenario.