[AArch64] Add support for SVE CNOT

Programming / Compilers / GCC - rsandifo [138bc75d-0d04-0410-961f-82ee72b054a4] - 14 August 2019 09:06 EDT

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

gcc/
- config/aarch64/predicates.md (aarch64_simd_imm_one): New predicate.
- config/aarch64/aarch64-sve.md (*cnot): New pattern. (*cond_cnot_2, *cond_cnot_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.

563b232723a [AArch64] Add support for SVE CNOT
gcc/ChangeLog | 6 ++
gcc/config/aarch64/aarch64-sve.md | 90 ++++++++++++++++++++++
gcc/config/aarch64/predicates.md | 4 +
gcc/testsuite/ChangeLog | 10 +++
gcc/testsuite/gcc.target/aarch64/sve/cnot_1.c | 30 ++++++++
gcc/testsuite/gcc.target/aarch64/sve/cond_cnot_1.c | 35 +++++++++
.../gcc.target/aarch64/sve/cond_cnot_1_run.c | 32 ++++++++
gcc/testsuite/gcc.target/aarch64/sve/cond_cnot_2.c | 35 +++++++++
.../gcc.target/aarch64/sve/cond_cnot_2_run.c | 32 ++++++++
gcc/testsuite/gcc.target/aarch64/sve/cond_cnot_3.c | 35 +++++++++
.../gcc.target/aarch64/sve/cond_cnot_3_run.c | 32 ++++++++
11 files changed, 341 insertions(+)

Upstream: gcc.gnu.org


  • Share