]> git.ipfire.org Git - thirdparty/gcc.git/commit
RA: Constrain class of pic offset table pseudo to general regs
authorVladimir N. Makarov <vmakarov@redhat.com>
Wed, 7 Jun 2023 13:51:54 +0000 (09:51 -0400)
committerVladimir N. Makarov <vmakarov@redhat.com>
Wed, 7 Jun 2023 15:34:28 +0000 (11:34 -0400)
commit8cc8707446b77f9413654b31704f5a639673c916
tree8f7641ca7e3bb1c0bfb2960441c9115977874766
parentb747f54a2a930da55330c2861cd1e344f67a88d9
RA: Constrain class of pic offset table pseudo to general regs

On some targets an integer pseudo can be assigned to a FP reg.  For
pic offset table pseudo it means we will reload the pseudo in this
case and, as a consequence, memory containing the pseudo might be
recognized as wrong one.  The patch fix this problem.

        PR target/109541

gcc/ChangeLog:

* ira-costs.cc: (find_costs_and_classes): Constrain classes of pic
offset table pseudo to a general reg subset.

gcc/testsuite/ChangeLog:

* gcc.target/sparc/pr109541.c: New.
gcc/ira-costs.cc
gcc/testsuite/gcc.target/sparc/pr109541.c [new file with mode: 0644]