[AArch64] Add support for SVE CLS and CLZ

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

This patch adds support for unpredicated SVE CLS and CLZ. A later patch will add support for predicated unary integer arithmetic.

2019-08-14 Richard Sandiford

gcc/
- config/aarch64/iterators.md (SVE_INT_UNARY): Add clrsb and clz. (optab, sve_int_op): Handle them.
- config/aarch64/aarch64-sve.md: Expand comment.

gcc/testsuite/
- gcc.target/aarch64/vect-clz.c: Force SVE off.
- gcc.target/aarch64/sve/clrsb_1.c: New test.
- gcc.target/aarch64/sve/clrsb_1_run.c: Likewise.
- gcc.target/aarch64/sve/clz_1.c: Likewise.
- gcc.target/aarch64/sve/clz_1_run.c: Likewise.

c9508c99f6a [AArch64] Add support for SVE CLS and CLZ
gcc/ChangeLog | 6 +++
gcc/config/aarch64/aarch64-sve.md | 2 +
gcc/config/aarch64/iterators.md | 6 ++-
gcc/testsuite/ChangeLog | 8 ++++
gcc/testsuite/gcc.target/aarch64/sve/clrsb_1.c | 22 ++++++++++
gcc/testsuite/gcc.target/aarch64/sve/clrsb_1_run.c | 50 ++++++++++++++++++++++
gcc/testsuite/gcc.target/aarch64/sve/clz_1.c | 22 ++++++++++
gcc/testsuite/gcc.target/aarch64/sve/clz_1_run.c | 50 ++++++++++++++++++++++
gcc/testsuite/gcc.target/aarch64/vect-clz.c | 2 +
9 files changed, 167 insertions(+), 1 deletion(-)

Upstream: gcc.gnu.org


  • Share