[PR97701] LRA: Don't narrow class only for REG or MEM.
authorVladimir N. Makarov <vmakarov@redhat.com>
Fri, 29 Jan 2021 16:51:44 +0000 (11:51 -0500)
committerVladimir N. Makarov <vmakarov@redhat.com>
Fri, 29 Jan 2021 19:54:41 +0000 (14:54 -0500)
commit7f9f83ef300e8734dccb90a7c347997b2787e9e9
tree55c36a274feef77806287dc0a394bcd0c4bb41a2
parent726b7aa004d6885388a76521222602b8552a41ee
[PR97701] LRA: Don't narrow class only for REG or MEM.

Reload pseudos of ALL_REGS class did not narrow class from constraint
in insn (set (pseudo) (lo_sum ...)) because lo_sum is considered an
object (OBJECT_P) although the insn is not a classic move.  To permit
narrowing we are starting to use MEM_P and REG_P instead of OBJECT_P.

gcc/ChangeLog:

PR target/97701
* lra-constraints.c (in_class_p): Don't narrow class only for REG
or MEM.

gcc/testsuite/ChangeLog:

PR target/97701
* gcc.target/aarch64/pr97701.c: New.
gcc/lra-constraints.c
gcc/testsuite/gcc.target/aarch64/pr97701.c [new file with mode: 0644]