]> git.ipfire.org Git - thirdparty/gcc.git/commit
[PR102842] Consider all outputs in generation of matching reloads
authorVladimir N. Makarov <vmakarov@redhat.com>
Tue, 26 Oct 2021 18:03:42 +0000 (14:03 -0400)
committerVladimir N. Makarov <vmakarov@redhat.com>
Tue, 26 Oct 2021 19:17:29 +0000 (15:17 -0400)
commit8c59f4118357789cfa8df2cf0d3ecb61be7e9041
treec88f788cc7906fb84cbb1da9308d5e12cae80857
parentcfcb27cfcb1d32b8cf7bc463cc1fc5cacae8d199
[PR102842] Consider all outputs in generation of matching reloads

Without considering all output insn operands (not only processed
before), in rare cases LRA can use the same hard register for
different outputs of the insn on different assignment subpasses.  The
patch fixes the problem.

gcc/ChangeLog:

PR rtl-optimization/102842
* lra-constraints.c (match_reload): Ignore out in checking values
of outs.
(curr_insn_transform): Collect outputs before doing reloads of operands.

gcc/testsuite/ChangeLog:

PR rtl-optimization/102842
* g++.target/arm/pr102842.C: New test.
gcc/lra-constraints.c
gcc/testsuite/g++.target/arm/pr102842.C [new file with mode: 0644]