Landing: a1ff104826c5
Project / Subsystem
gcc / gcc
Date
2026-07-10
Author
Roger Sayle
Commit
a1ff104826c59ead40f8e864cd1aa1ce2e5fc6ba
Source
github
Perf win
Yes
Breaking
No
All attributes
- project
- gcc
- subsystem
- gcc
- patch_id
- —
- commit_hash
- a1ff104826c59ead40f8e864cd1aa1ce2e5fc6ba
- source_type
- github
- headline
- PR target/48609: Improve RTL expansion of complex value return.
- tldr
- Optimizes returning complex values by directly composing parts in registers, avoiding memory spills.
- author
- Roger Sayle
- outcome
- committed
- performance_win
- true
- breaking_change
- false
- series_id
- —
- series_parts
- []
- tags
-
- • optimization
- • ABI
- • x86
- • complex numbers
- • bugfix
- discussion_id_link
- —
- bugzilla_pr
- —
- date
- 2026-07-10T00:00:00.000Z
This patch optimizes the return of complex values, specifically for architectures like x86 that use integer registers for this purpose according to their ABI. Previously, GCC would inefficiently spill the complex value to memory and then reload it. The change improves RTL expansion to directly compose the real and imaginary parts using shifts and additions, generating more efficient code.