[AArch64] Add support for SVE CNOT
authorRichard Sandiford <richard.sandiford@arm.com>
Wed, 14 Aug 2019 09:06:12 +0000 (09:06 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Wed, 14 Aug 2019 09:06:12 +0000 (09:06 +0000)
commite0a0be93d7c2b760779c3085c5abfd0496e3458b
tree17baa373c4ffe1295960726017011cd0a73766f0
parentbca5a9971f47cf5fe79e6595beb762539f200f46
[AArch64] Add support for SVE CNOT

This patch adds support for predicated and unpredicated CNOT
(logical NOT on integers).  In RTL terms, this is a select between
1 and 0 in which the predicate is fed by a comparison with zero.

2019-08-14  Richard Sandiford  <richard.sandiford@arm.com>

gcc/
* config/aarch64/predicates.md (aarch64_simd_imm_one): New predicate.
* config/aarch64/aarch64-sve.md (*cnot<mode>): New pattern.
(*cond_cnot<mode>_2, *cond_cnot<mode>_any): Likewise.

gcc/testsuite/
* gcc.target/aarch64/sve/cnot_1.c: New test.
* gcc.target/aarch64/sve/cond_cnot_1.c: Likewise.
* gcc.target/aarch64/sve/cond_cnot_1_run.c: Likewise.
* gcc.target/aarch64/sve/cond_cnot_2.c: Likewise.
* gcc.target/aarch64/sve/cond_cnot_2_run.c: Likewise.
* gcc.target/aarch64/sve/cond_cnot_3.c: Likewise.
* gcc.target/aarch64/sve/cond_cnot_3_run.c: Likewise.

From-SVN: r274438
gcc/ChangeLog
gcc/config/aarch64/aarch64-sve.md
gcc/config/aarch64/predicates.md
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/aarch64/sve/cnot_1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/aarch64/sve/cond_cnot_1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/aarch64/sve/cond_cnot_1_run.c [new file with mode: 0644]
gcc/testsuite/gcc.target/aarch64/sve/cond_cnot_2.c [new file with mode: 0644]
gcc/testsuite/gcc.target/aarch64/sve/cond_cnot_2_run.c [new file with mode: 0644]
gcc/testsuite/gcc.target/aarch64/sve/cond_cnot_3.c [new file with mode: 0644]
gcc/testsuite/gcc.target/aarch64/sve/cond_cnot_3_run.c [new file with mode: 0644]