]> git.ipfire.org Git - thirdparty/gcc.git/commit
[PR118663][LRA]: Change secondary memory mode only if there are regs holding the...
authorVladimir N. Makarov <vmakarov@redhat.com>
Tue, 28 Jan 2025 13:37:33 +0000 (08:37 -0500)
committerVladimir N. Makarov <vmakarov@redhat.com>
Tue, 28 Jan 2025 13:41:04 +0000 (08:41 -0500)
commit01339d29b7663d85eea6145eac2b1ad1da428c11
treebe46ad25ad78de2e775433951be2f7a26a17529d
parentf1e776ce58ae4a6ae67886adb4ae806598e2c7ef
[PR118663][LRA]: Change secondary memory mode only if there are regs holding the changed mode

  My recent patch for PR118067 changes the secondary memory mode if
all regs of the pseudo reg class are prohibited in the secondary mode.
But the patch does not check a special case when the
corresponding target hook returns this mode although there are no hard
regs of pseudo class holding value of the mode at all.  This results
in given PR and this patch fixes it.

gcc/ChangeLog:

PR target/118663
* lra-constraints.cc (invalid_mode_reg_p): Check empty
reg_class_contents.

gcc/testsuite/ChangeLog:

PR target/118663
* gcc.target/powerpc/pr118663.c: New.
gcc/lra-constraints.cc
gcc/testsuite/gcc.target/powerpc/pr118663.c [new file with mode: 0644]