]> git.ipfire.org Git - thirdparty/gcc.git/commit
[LRA]: Fix sparc bootstrap after recent patch for fp elimination for avr LRA port
authorVladimir N. Makarov <vmakarov@redhat.com>
Sat, 22 Jul 2023 00:28:50 +0000 (20:28 -0400)
committerVladimir N. Makarov <vmakarov@redhat.com>
Sat, 22 Jul 2023 00:29:55 +0000 (20:29 -0400)
commit16894253cd152dd8e02ba48708ec8ec0a9f99e24
tree9f0eaa565da04a3d9906dec393ab496ef8b13a9b
parent0ce6353046ec3fccc16bb6465f8a7f3eb00547fa
[LRA]: Fix sparc bootstrap after recent patch for fp elimination for avr LRA port

The recent patch for fp elimination for avr LRA port modified an assert
which can be wrong for targets using hard frame pointer different from
frame pointer.  Also for such ports spilling pseudos assigned to fp
was wrong too in the new code.  Although this code is not used for any target
currently using LRA except for avr.  Given patch fixes the issues.

gcc/ChangeLog:

* lra-eliminations.cc (update_reg_eliminate): Fix the assert.
(lra_update_fp2sp_elimination): Use HARD_FRAME_POINTER_REGNUM
instead of FRAME_POINTER_REGNUM to spill pseudos.
gcc/lra-eliminations.cc