Landing: ea27cb48a346

Project / Subsystem

gcc / x86

Date

2026-07-28

Author

H.J. Lu

Commit

ea27cb48a346633d6bfabcde75f88affb9463e40

Source

github

Perf win

No

Breaking

No

All attributes

project
gcc
subsystem
x86
patch_id
—
commit_hash
ea27cb48a346633d6bfabcde75f88affb9463e40
source_type
github
headline
x86: Check argument-linked memory used for local variable
tldr
Correctly handles spilling SSA_NAMEs to argument-linked memory for local variables on x86.
author
H.J. Lu
outcome
committed
performance_win
false
breaking_change
false
series_id
—
series_parts
[]
tags
  • • x86
  • • register allocation
  • • spilling
  • • compiler bug
discussion_id_link
—
bugzilla_pr
—
date
2026-07-28T00:00:00.000Z

This commit enhances the x86 backend’s handling of local variables passed as register arguments. It now correctly identifies and processes cases where an SSA_NAME is spilled into argument-linked memory, specifically when that memory is used to store a local variable. Previously, the compiler might incorrectly return true in such scenarios, preventing proper optimization. The change, motivated by PR target/126450, ensures more accurate register allocation and spilling by properly recognizing the usage of argument-linked memory for local variables.