]> git.ipfire.org Git - thirdparty/gcc.git/commit
CRIS: peephole2 an add into two addq or subq
authorHans-Peter Nilsson <hp@axis.com>
Sun, 23 Apr 2023 04:21:13 +0000 (06:21 +0200)
committerHans-Peter Nilsson <hp@bitrange.com>
Sat, 6 May 2023 00:02:14 +0000 (02:02 +0200)
commit35b7618e3ae25b3a293c456e24edc5432a936e22
treea1cd31855f7f8fba7e4a22dcab41c31fa219727f
parentfe50e419086f5b781b6fe8242741e6213b788337
CRIS: peephole2 an add into two addq or subq

Unfortunately, doesn't cause a performance improvement for coremark,
but happens a few times in newlib, just enough to affect coremark
0.01% by size (or 4 bytes, and three cycles (__fwalk_sglue and
__vfiprintf_r each two bytes).

gcc:
* config/cris/cris.md (splitop): Add PLUS.
* config/cris/cris.cc (cris_split_constant): Also handle
PLUS when a split into two insns may be useful.

gcc/testsuite:
* gcc.target/cris/peep2-addsplit1.c: New test.
gcc/config/cris/cris.cc
gcc/config/cris/cris.md
gcc/testsuite/gcc.target/cris/peep2-addsplit1.c [new file with mode: 0644]