https://gcc.gnu.org/bugzilla/show_bug.cgi?id=127142
--- Comment #2 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by John David Anglin <[email protected]>: https://gcc.gnu.org/g:b55ba08f1055d5c8748699a36f419c8078044594 commit r17-4041-gb55ba08f1055d5c8748699a36f419c8078044594 Author: John David Anglin <[email protected]> Date: Wed Sep 9 13:25:24 2026 -0400 hppa: Reduce r1 register pressure I have seen a few compiles fail where LRA is unable to find a register to spill. If we don't need a spill, the best way to load the high part of a symbolic operand is to use the addil instruction. It uses register r1 as its destinition operand. In the best case, the linker can remove unnecessary addil instructions. However, when there are multiple symbolic loads in a function, LRA is sometimes unable to find a register to spill. The original reload was better at handling r1 register spills. This change adds an additional alternative using a ldil/addl sequence which avoids using the r1 register. This is less costly than spilling r1. There is one PIC insn that I didn't update. When PIC code is linked into non PIC executable, the linker needs to change the PIC register, r19, to the DP register, r27. Currently, GNU ld only supports doing this with addil instructions. 2026-09-09 John David Anglin <[email protected]> gcc/ChangeLog: PR rtl-optimization/127142 * config/pa/pa.md: Add alternatives using ldil/addl sequence to various insns to load the high part of a symbolic operand.
