[aarch64]: add usra and ssra combine patterns
authorSylvia Taylor <sylvia.taylor@arm.com>
Mon, 22 Jul 2019 16:21:17 +0000 (16:21 +0000)
committerJames Greenhalgh <jgreenhalgh@gcc.gnu.org>
Mon, 22 Jul 2019 16:21:17 +0000 (16:21 +0000)
commit462e6f9a932a44ca73715dc5c2960e5b332f63f7
tree68bce4e33c455b34662b665581dbed6cc7d4634d
parent310b5fb79316511295c04f956f4c6630437ba204
[aarch64]: add usra and ssra combine patterns

This patch adds support to combine:

1) ushr and add into usra, example:

ushr    v0.16b, v0.16b, 2
add     v0.16b, v0.16b, v2.16b
---
usra    v2.16b, v0.16b, 2

2) sshr and add into ssra, example:

sshr    v1.16b, v1.16b, 2
add     v1.16b, v1.16b, v3.16b
---
ssra    v3.16b, v1.16b, 2

Committed on behalf of Sylvia Taylor <sylvia.taylor@arm.com>.
Reviewed-by: <James.greenhalgh@arm.com>
gcc/ChangeLog:

        * config/aarch64/aarch64-simd.md
        (*aarch64_simd_sra<mode>): New.
        * config/aarch64/iterators.md
        (SHIFTRT): New iterator.
        (sra_op): New attribute.

gcc/testsuite/ChangeLog:

        * gcc.target/aarch64/simd/ssra.c: New test.
        * gcc.target/aarch64/simd/usra.c: New test.

From-SVN: r273703
gcc/ChangeLog
gcc/config/aarch64/aarch64-simd.md
gcc/config/aarch64/iterators.md
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/aarch64/simd/ssra.c [new file with mode: 0644]
gcc/testsuite/gcc.target/aarch64/simd/usra.c [new file with mode: 0644]