]> git.ipfire.org Git - thirdparty/gcc.git/commit
AVR: Use avr_add_ccclobber / DONE_ADD_CCC in md instead of repeats.
authorGeorg-Johann Lay <avr@gjlay.de>
Fri, 1 Aug 2025 13:42:53 +0000 (15:42 +0200)
committerGeorg-Johann Lay <avr@gjlay.de>
Sun, 3 Aug 2025 08:47:57 +0000 (10:47 +0200)
commit835595d43eb8fe19b6cf5a5f381d3dc458350c95
treef06a6f32b6cb9f01550cd3067a9874523a9d9270
parentd0e62f3783f34c6591628ca771f46fd30d8b4b7b
AVR: Use avr_add_ccclobber / DONE_ADD_CCC in md instead of repeats.

There are many post-reload define_insn_and_split's that just append
a  (clobber (reg:CC REG_CC))  to the pattern.  Instead of repeating
the original patterns, avr_add_ccclobber (curr_insn) is used to do
that job.

This avoids repeating patterns all over the place, and splits that do
something different (like using a canonical form) stand out clearly.

gcc/
* config/avr/avr.md (define_insn_and_split) [reload_completed]:
For splits that just append a (clobber (reg:CC REG_CC)) to
the pattern, use avr_add_ccclobber (curr_insn) instead of
repeating the original pattern.
* config/avr/avr-dimode.md: Same.
* config/avr/avr-fixed.md: Same.
gcc/config/avr/avr-dimode.md
gcc/config/avr/avr-fixed.md
gcc/config/avr/avr.md