]> git.ipfire.org Git - thirdparty/gcc.git/commit
[PR118067][LRA]: Check secondary memory mode for the reg class
authorVladimir N. Makarov <vmakarov@redhat.com>
Fri, 17 Jan 2025 20:56:29 +0000 (15:56 -0500)
committerVladimir N. Makarov <vmakarov@redhat.com>
Fri, 17 Jan 2025 20:57:12 +0000 (15:57 -0500)
commit9f009e8865cda01310c52f7ec8bdaa3c557a2745
treeccc7deac792a3a4430de37c5b1db9051e695c1bb
parentd8a31b5bead0c64d7e4a59d6834bc649f68de765
[PR118067][LRA]: Check secondary memory mode for the reg class

  This is the second patch for the PR for the new test.  The patch
solves problem in the case when secondary memory mode (SImode in the
PR test) returned by hook secondary_memory_needed_mode can not be used
for reg class (ALL_MASK_REGS) involved in secondary memory moves.  The
patch uses reg mode instead of one returned by
secondary_memory_needed_mode in this case.

gcc/ChangeLog:

PR rtl-optimization/118067
* lra-constraints.cc (invalid_mode_reg_p): New function.
(curr_insn_transform): Use it to check mode returned by target
secondary_memory_needed_mode.

gcc/testsuite/ChangeLog:

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