aarch64: Restore bfxil optimization [PR100028]
authorJakub Jelinek <jakub@redhat.com>
Tue, 13 Apr 2021 10:43:39 +0000 (12:43 +0200)
committerJakub Jelinek <jakub@redhat.com>
Tue, 13 Apr 2021 10:43:39 +0000 (12:43 +0200)
commitf6ba5d039f988babdd99b5cdfb4557c380e57d69
tree7810bdb3edd8761a9ebe04676ec9882965f6c97e
parent1174314811af52779497462f26d21ea0038d1a85
aarch64: Restore bfxil optimization [PR100028]

Similarly to PR87763 for bfi, the GCC 9 combiner changes to not combine
moves from hard registers regressed the following testcase where we no
longer recognize bfxil and emit 3 instructions instead.

The following patch adds define_insn patterns that match what the combiner
is trying to match in these cases.  I haven't been able to see patterns
with the other order of the IOR operands, seems the IL is canonicalized this
way no matter what is written in the source.

2021-04-13  Jakub Jelinek  <jakub@redhat.com>

PR target/100028
* config/aarch64/aarch64.md (*aarch64_bfxil<mode>_extr,
*aarch64_bfxilsi_extrdi): New define_insn patterns.

* gcc.target/aarch64/pr100028.c: New test.
gcc/config/aarch64/aarch64.md
gcc/testsuite/gcc.target/aarch64/pr100028.c [new file with mode: 0644]