diff options
author | Hans-Peter Nilsson <hp@axis.com> | 2023-04-20 07:14:26 +0200 |
---|---|---|
committer | Hans-Peter Nilsson <hp@bitrange.com> | 2023-05-06 01:15:30 +0200 |
commit | 0a5e8d492a7efc739110289bf97ef4c9fe0674f4 (patch) | |
tree | aac4d5968888f59b74b17ffdf8de972bc6c57543 /gcc/combine.cc | |
parent | 07527e3eabb00ada0e7c9e083084e4e56d97f34f (diff) | |
download | gcc-0a5e8d492a7efc739110289bf97ef4c9fe0674f4.zip gcc-0a5e8d492a7efc739110289bf97ef4c9fe0674f4.tar.gz gcc-0a5e8d492a7efc739110289bf97ef4c9fe0674f4.tar.bz2 |
CRIS: peephole2 a lsrq into a lslq+lsrq pair
Observed after opsplit1 with AND in libgcc floating-point
functions, like the first spottings of opsplit1/AND
opportunities. Two patterns are nominally needed, as the
peephole2 optimizer continues from the *first replacement*
insn, not from a minimum context for general matching; one
that includes it as the last match.
But, the "free-standing" opportunity (three shifts) didn't
match by itself in a gcc build of libraries plus running the
test-suite, and thus deemed uninteresting and left out.
(As expected; if it had matched, that'd have indicated a
previously missed optimization or other problem elsewhere.)
Only the one that includes the previous define_peephole2
that may generate the sequence (i.e. opsplit1/AND), matches
easily.
Coremark results aren't impressive though: 0.003%
improvement in speed and slightly less than 0.1% in size.
A testcase is added to match and another one to cover a case
of movulsr checking that it's used; it's preferable to
lsrandsplit when both would match.
gcc:
* config/cris/cris.md (lsrandsplit1): New define_peephole2.
gcc/testsuite:
* gcc.target/cris/peep2-lsrandsplit1.c,
gcc.target/cris/peep2-movulsr2.c: New tests.
Diffstat (limited to 'gcc/combine.cc')
0 files changed, 0 insertions, 0 deletions