Landing: 82a07ea30aa3
Project / Subsystem
gcc / amdgcn
Date
2026-08-24
Author
Andrew Stubbs
Commit
82a07ea30aa3a2442dcb0f3e2c9ff073a2c475e7
Source
github
Perf win
Yes
Breaking
No
All attributes
- project
- gcc
- subsystem
- amdgcn
- patch_id
- —
- commit_hash
- 82a07ea30aa3a2442dcb0f3e2c9ff073a2c475e7
- source_type
- github
- headline
- amdgcn: Spill scalars to SGPRS instead of AVGPRs
- tldr
- Prefer SGPRs over AVGPRs for spilling scalars on AMD GPUs to improve performance and compatibility.
- author
- Andrew Stubbs
- outcome
- committed
- performance_win
- true
- breaking_change
- false
- series_id
- —
- series_parts
- []
- tags
-
- • amd
- • gpu
- • optimization
- • register allocation
- discussion_id_link
- —
- bugzilla_pr
- —
- date
- 2026-08-24T00:00:00.000Z
This change modifies the AMDGPU backend to spill scalar values to SGPRs instead of AVGPRs. AVGPRs are a more limited and expensive resource, especially around function calls. Using SGPRs for spills is more efficient and also ensures compatibility with devices lacking AVGPRs. Test cases were updated to reflect this change, with vector spills now tested for AVGPRs and scalar spills tested for SGPRs.