[AArch64] Add SVE conditional integer unary patterns

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

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 Kugan Vivekanandarajah

gcc/
- config/aarch64/aarch64-sve.md (*cond__2): New pattern. (*cond__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.

db254d3145f [AArch64] Add SVE conditional integer unary patterns
gcc/ChangeLog | 7 ++++
gcc/config/aarch64/aarch64-sve.md | 39 ++++++++++++++++++
gcc/testsuite/ChangeLog | 12 ++++++
.../gcc.target/aarch64/sve/cond_unary_1.c | 44 ++++++++++++++++++++
.../gcc.target/aarch64/sve/cond_unary_1_run.c | 27 +++++++++++++
.../gcc.target/aarch64/sve/cond_unary_2.c | 43 ++++++++++++++++++++
.../gcc.target/aarch64/sve/cond_unary_2_run.c | 28 +++++++++++++
.../gcc.target/aarch64/sve/cond_unary_3.c | 43 ++++++++++++++++++++
.../gcc.target/aarch64/sve/cond_unary_3_run.c | 27 +++++++++++++
.../gcc.target/aarch64/sve/cond_unary_4.c | 47 ++++++++++++++++++++++
.../gcc.target/aarch64/sve/cond_unary_4_run.c | 27 +++++++++++++
11 files changed, 344 insertions(+)

Upstream: gcc.gnu.org


  • Share