[AArch64] Add SVE conditional integer unary patterns
authorRichard Sandiford <richard.sandiford@arm.com>
Wed, 14 Aug 2019 10:48:50 +0000 (10:48 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Wed, 14 Aug 2019 10:48:50 +0000 (10:48 +0000)
commit3c9f496337f754f7c22afb46b017871db5844a97
treec7f6bc70f479f067509224ea9e24e87b31444d03
parent7eeb5982c3d5b7fdd024769d076f4eca15b87aa9
[AArch64] Add SVE conditional integer unary patterns

This patch adds patterns to match conditional unary operations
on integers.  At the moment we rely on combine to merge separate
arithmetic and vcond_mask operations, and since the latter doesn't
accept zero operands, we miss out on the opportunity to use the
movprfx /z alternative.  (This alternative is tested by the ACLE
patches though.)

2019-08-14  Richard Sandiford  <richard.sandiford@arm.com>
    Kugan Vivekanandarajah  <kugan.vivekanandarajah@linaro.org>

gcc/
* config/aarch64/aarch64-sve.md
(*cond_<SVE_INT_UNARY:optab><SVE_I:mode>_2): New pattern.
(*cond_<SVE_INT_UNARY:optab><SVE_I:mode>_any): Likewise.

gcc/testsuite/
* gcc.target/aarch64/sve/cond_unary_1.c: New test.
* gcc.target/aarch64/sve/cond_unary_1_run.c: Likewise.
* gcc.target/aarch64/sve/cond_unary_2.c: Likewise.
* gcc.target/aarch64/sve/cond_unary_2_run.c: Likewise.
* gcc.target/aarch64/sve/cond_unary_3.c: Likewise.
* gcc.target/aarch64/sve/cond_unary_3_run.c: Likewise.
* gcc.target/aarch64/sve/cond_unary_4.c: Likewise.
* gcc.target/aarch64/sve/cond_unary_4_run.c: Likewise.

Co-Authored-By: Kugan Vivekanandarajah <kuganv@linaro.org>
From-SVN: r274476
gcc/ChangeLog
gcc/config/aarch64/aarch64-sve.md
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/aarch64/sve/cond_unary_1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/aarch64/sve/cond_unary_1_run.c [new file with mode: 0644]
gcc/testsuite/gcc.target/aarch64/sve/cond_unary_2.c [new file with mode: 0644]
gcc/testsuite/gcc.target/aarch64/sve/cond_unary_2_run.c [new file with mode: 0644]
gcc/testsuite/gcc.target/aarch64/sve/cond_unary_3.c [new file with mode: 0644]
gcc/testsuite/gcc.target/aarch64/sve/cond_unary_3_run.c [new file with mode: 0644]
gcc/testsuite/gcc.target/aarch64/sve/cond_unary_4.c [new file with mode: 0644]
gcc/testsuite/gcc.target/aarch64/sve/cond_unary_4_run.c [new file with mode: 0644]