]> git.ipfire.org Git - thirdparty/gcc.git/commit
[PR102627] Use at least natural mode during splitting hard reg live range
authorVladimir N. Makarov <vmakarov@redhat.com>
Fri, 8 Oct 2021 14:16:09 +0000 (10:16 -0400)
committerVladimir N. Makarov <vmakarov@redhat.com>
Fri, 8 Oct 2021 16:53:32 +0000 (12:53 -0400)
commit9046e0d46fc285e5c59c87182d48c8de0f7f929c
treeaf51f6db9c95be448bf7c59cc7c2dffd1e8d80be
parente6f6972b5f4711c110fa753c926df49415f230da
[PR102627] Use at least natural mode during splitting hard reg live range

In the PR test case SImode was used to split live range of cx on x86-64
because it was the biggest mode for this hard reg in the function.  But
all 64-bits of cx contain structure members.  We need always to use at least
natural mode of hard reg in splitting to fix this problem.

gcc/ChangeLog:

PR rtl-optimization/102627
* lra-constraints.c (split_reg): Use at least natural mode of hard reg.

gcc/testsuite/ChangeLog:

PR rtl-optimization/102627
* gcc.target/i386/pr102627.c: New test.
gcc/lra-constraints.c
gcc/testsuite/gcc.target/i386/pr102627.c [new file with mode: 0644]