Fix bogus RTL on the H8.
commit4374c424a60777a7658050f0aeb1dcc9af915647
authorJeff Law <jeffreyalaw@gmail.com>
Mon, 17 Oct 2022 23:52:18 +0000 (17 19:52 -0400)
committerJeff Law <jeffreyalaw@gmail.com>
Mon, 17 Oct 2022 23:52:18 +0000 (17 19:52 -0400)
treea31de396af505f11260c8927389008cb0466039f
parent19859bd72119708c85cc6976b3547738be6f5b1c
Fix bogus RTL on the H8.

This patch actually fixes the bogus RTL seen in PR101697.

Basically we continue to use the insn condition to catch most of the problem
cases related to autoinc addressing modes.  This patch adds constraints which
can guide reload (and hopefully LRA) away from doing blind replacements during
register elimination that would ultimately result in bogus RTL.  The idea is
from Paul K. who has done something very similar on the pdp11.  I guess it
shouldn't be a big surprise that the H8 and pdp11 need the same kind of
handling given some of the similarities in their architectures.

gcc/
PR target/101697
* config/h8300/combiner.md: Replace '<' preincment constraint with
ZA/Z1..ZH/Z7 combinations.
* config/h8300/movepush.md: Similarly
gcc/config/h8300/combiner.md
gcc/config/h8300/movepush.md