]> git.ipfire.org Git - thirdparty/gcc.git/commit
[IRA]: Check autoinc and memory address after temporary equivalence substitution
authorVladimir N. Makarov <vmakarov@redhat.com>
Fri, 10 Nov 2023 16:14:46 +0000 (11:14 -0500)
committerVladimir N. Makarov <vmakarov@redhat.com>
Fri, 10 Nov 2023 16:15:50 +0000 (11:15 -0500)
commitdf66fa08578a28b3acc8bdb6257b68c245a6a0fa
treeebd1ba1ba8be48926731c163a3cc086648d17bc5
parentd44dca8da472eac29ab1b566838174e5203fdbc1
[IRA]: Check autoinc and memory address after temporary equivalence substitution

My previous RA patches to take register equivalence into account do
temporary register equivalence substitution to find out that the
equivalence can be consumed by insns.  The insn with the substitution is
checked on validity using target-depended code.  This code expects that
autoinc operations work on register but this register can be substituted
by equivalent memory.  The patch fixes this problem.  The patch also adds
checking that the substitution can be consumed in memory address too.

gcc/ChangeLog:

PR target/112337
* ira-costs.cc: (validate_autoinc_and_mem_addr_p): New function.
(equiv_can_be_consumed_p): Use it.

gcc/testsuite/ChangeLog:

PR target/112337
* gcc.target/arm/pr112337.c: New.
gcc/ira-costs.cc
gcc/testsuite/gcc.target/arm/pr112337.c [new file with mode: 0644]