]> git.ipfire.org Git - thirdparty/gcc.git/commit
[PR112918][LRA]: Fixing IRA ICE on m68k
authorVladimir N. Makarov <vmakarov@redhat.com>
Mon, 18 Dec 2023 22:12:23 +0000 (17:12 -0500)
committerVladimir N. Makarov <vmakarov@redhat.com>
Mon, 18 Dec 2023 22:14:50 +0000 (17:14 -0500)
commit989e67f827b74b76e58abe137ce12d948af2290c
tree17f07faea79e65b89a542f9b64d78e557a5ef3c4
parent86b6daefc8ca00f6879779f6002ca575920d38d2
[PR112918][LRA]: Fixing IRA ICE on m68k

Some GCC tests on m68K port of LRA is failed on `maximum number of
generated reload insns per insn achieved`.  The problem is in that for
subreg reload LRA can not narrow reg class more from ALL_REGS to
GENERAL_REGS and then to data regs or address regs.  The patch permits
narowing reg class from reload insns if this results in succesful
matching of reg operand.

gcc/ChangeLog:

PR rtl-optimization/112918
* lra-constraints.cc (SMALL_REGISTER_CLASS_P): Move before in_class_p.
(in_class_p): Restrict condition for narrowing class in case of
allow_all_reload_class_changes_p.
(process_alt_operands): Pass true for
allow_all_reload_class_changes_p in calls of in_class_p.
(curr_insn_transform): Ditto for reg operand win.
gcc/lra-constraints.cc