]> git.ipfire.org Git - thirdparty/gcc.git/commit
[PR118017][LRA]: Don't inherit reg of non-uniform reg class
authorVladimir N. Makarov <vmakarov@redhat.com>
Thu, 9 Jan 2025 21:22:02 +0000 (16:22 -0500)
committerVladimir N. Makarov <vmakarov@redhat.com>
Thu, 9 Jan 2025 21:27:28 +0000 (16:27 -0500)
commitfab96de044f1f023f52d43af866205d17d8895fb
tree23f29efb13193de1b4b6e79cb0c80b1de3483dc9
parent3cae3a80695e5aabd7353c02e179c997158eef30
[PR118017][LRA]: Don't inherit reg of non-uniform reg class

In the PR case LRA inherited value of register of class INT_SSE_REGS
which resulted in LRA cycling when LRA tried to use different move
alternatives with SSE/general regs and memory.  The patch rejects to
inherit such (non-uniform) classes to prevent cycling.

gcc/ChangeLog:

PR target/118017
* lra-constraints.cc (inherit_reload_reg): Check reg class on uniformity.

gcc/testsuite/ChangeLog:

PR target/118017
* gcc.target/i386/pr118017.c: New.
gcc/lra-constraints.cc
gcc/testsuite/gcc.target/i386/pr118017.c [new file with mode: 0644]