]> git.ipfire.org Git - thirdparty/gcc.git/commit
aarch64: Reimplement URSHR,SRSHR patterns with standard RTL codes
authorKyrylo Tkachov <kyrylo.tkachov@arm.com>
Tue, 6 Jun 2023 09:51:34 +0000 (10:51 +0100)
committerKyrylo Tkachov <kyrylo.tkachov@arm.com>
Tue, 6 Jun 2023 09:51:34 +0000 (10:51 +0100)
commit9371640999eedb8bac3fb9d1429db8a1a905b853
treed0501a4e8d674c0807eb0c6d85ab33316ff34fab
parentd2cdfafde2060ba2a96b01da223fe33c67439b94
aarch64: Reimplement URSHR,SRSHR patterns with standard RTL codes

Having converted the patterns for the URSRA,SRSRA instructions to standard RTL codes we can also
easily convert the non-accumulating forms URSHR,SRSHR.
This patch does that, reusing the various helpers and predicates from that patch in a straightforward way.
This allows GCC to perform the optimisations in the testcase, matching what Clang does.

Bootstrapped and tested on aarch64-none-linux-gnu and aarch64_be-none-elf.

gcc/ChangeLog:

* config/aarch64/aarch64-simd.md (aarch64_<sur>shr_n<mode>): Delete.
(aarch64_<sra_op>rshr_n<mode><vczle><vczbe>_insn): New define_insn.
(aarch64_<sra_op>rshr_n<mode>): New define_expand.

gcc/testsuite/ChangeLog:

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