diff options
author | Jakub Jelinek <jakub@redhat.com> | 2021-04-16 13:44:23 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2021-04-16 13:44:23 +0200 |
commit | 47f42744f6e10ad41db926d739306e6f237fd3ac (patch) | |
tree | 7be1205e234f2b3a3ce70d2a2973e6a64a23cee0 /libcpp | |
parent | 49e651990a6966936a0273138dd56ac394e57b16 (diff) | |
download | gcc-47f42744f6e10ad41db926d739306e6f237fd3ac.zip gcc-47f42744f6e10ad41db926d739306e6f237fd3ac.tar.gz gcc-47f42744f6e10ad41db926d739306e6f237fd3ac.tar.bz2 |
aarch64: Fix up 2 other combine opt regressions vs. GCC8 [PR100075]
The testcase used to be compiled at -O2 by GCC8 and earlier to:
f1:
neg w1, w0, asr 16
and w1, w1, 65535
orr w0, w1, w0, lsl 16
ret
f2:
neg w1, w0
extr w0, w1, w0, 16
ret
but since GCC9 (r9-3594 for f1 and r9-6926 for f2) we compile it into:
f1:
mov w1, w0
sbfx x0, x1, 16, 16
neg w0, w0
bfi w0, w1, 16, 16
ret
f2:
neg w1, w0
sbfx x0, x0, 16, 16
bfi w0, w1, 16, 16
ret
instead, i.e. one insn longer each. With this patch we get:
f1:
mov w1, w0
neg w0, w1, asr 16
bfi w0, w1, 16, 16
ret
f2:
neg w1, w0
extr w0, w1, w0, 16
ret
i.e. identical f2 and same number of insns as in GCC8 in f1.
The combiner unfortunately doesn't try splitters when doing 2 -> 1
combination, so it can't be implemented as combine splitters, but
it could be implemented as define_insn_and_split if desirable.
2021-04-16 Jakub Jelinek <jakub@redhat.com>
PR target/100075
* config/aarch64/aarch64.md (*neg_asr_si2_extr, *extrsi5_insn_di): New
define_insn patterns.
* gcc.target/aarch64/pr100075.c: New test.
Diffstat (limited to 'libcpp')
0 files changed, 0 insertions, 0 deletions