i386: Return true for (SUBREG (MEM....)) in register_no_elim_operand [PR105927]
commitb3dd7d8b48227d3489039ca66b6c0ea2da743255
authorUros Bizjak <ubizjak@gmail.com>
Mon, 13 Jun 2022 15:08:18 +0000 (13 17:08 +0200)
committerUros Bizjak <ubizjak@gmail.com>
Mon, 13 Jun 2022 15:10:49 +0000 (13 17:10 +0200)
tree8b281209304c75c22f647cb7a0e4c80866c68d51
parent77718f38f896191e39b1e14c66ed990f0fff391b
i386: Return true for (SUBREG (MEM....)) in register_no_elim_operand [PR105927]

Under certain conditions register_operand predicate also allows
subregs of memory operands.  When RTL checking is enabled, these
will fail with REGNO (op).

Allow subregs of memory operands, these are guaranteed
to be reloaded to a register.

2022-06-13  Uroš Bizjak  <ubizjak@gmail.com>

gcc/ChangeLog:

PR target/105927
* config/i386/predicates.md (register_no_elim_operand):
Return true for subreg of a memory operand.

gcc/testsuite/ChangeLog:

PR target/105927
* gcc.target/i386/pr105927.c: New test.
gcc/config/i386/predicates.md
gcc/testsuite/gcc.target/i386/pr105927.c [new file with mode: 0644]