https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126167
Bug ID: 126167
Summary: LRA / SH: Improve on R0 spill failures
Product: gcc
Version: 16.1.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: middle-end
Assignee: unassigned at gcc dot gnu.org
Reporter: olegendo at gcc dot gnu.org
Target Milestone: ---
SH has been switched to LRA. Most of the R0 spill failures from previous
reload have improved. However, only because several workaround move patterns
have been added (using R0 as clobber and so on).
While experimenting with other new optimizations such as for PR 56590, the
spill failures get worse. This is because the addressing mode selection
optimization increases the usage of "@(R0,Rm)" type of addresses which put even
more pressure on R0.
Moreover, I'd like to remove the added R0-clobber workaround patterns
eventually, but it will require some investigation and fix in LRA itself.