[AArch64] Add support for SVE CLS and CLZ
authorRichard Sandiford <richard.sandiford@arm.com>
Wed, 14 Aug 2019 09:02:47 +0000 (09:02 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Wed, 14 Aug 2019 09:02:47 +0000 (09:02 +0000)
commitbca5a9971f47cf5fe79e6595beb762539f200f46
tree37297284d9c4420e434605cce6746d9d597990b1
parenta229966c9c76afe0cf18c566a3c13ddde3878288
[AArch64] Add support for SVE CLS and CLZ

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  <richard.sandiford@arm.com>

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.

From-SVN: r274437
gcc/ChangeLog
gcc/config/aarch64/aarch64-sve.md
gcc/config/aarch64/iterators.md
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/aarch64/sve/clrsb_1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/aarch64/sve/clrsb_1_run.c [new file with mode: 0644]
gcc/testsuite/gcc.target/aarch64/sve/clz_1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/aarch64/sve/clz_1_run.c [new file with mode: 0644]
gcc/testsuite/gcc.target/aarch64/vect-clz.c