[AArch64][SVE] Utilize ASRD instruction for division and remainder
authorYuliang Wang <yuliang.wang@arm.com>
Mon, 30 Sep 2019 16:55:45 +0000 (16:55 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Mon, 30 Sep 2019 16:55:45 +0000 (16:55 +0000)
commitc0c2f013906a695b8a02226f119649a370d9e083
tree6743c5d13bf23522c114e0de5e187c1dade8a1c4
parentdcdd0f055731a8c960a15e5de8715d041d9a7876
[AArch64][SVE] Utilize ASRD instruction for division and remainder

2019-09-30  Yuliang Wang  <yuliang.wang@arm.com>

gcc/
* config/aarch64/aarch64-sve.md (sdiv_pow2<mode>3):
New pattern for ASRD.
* config/aarch64/iterators.md (UNSPEC_ASRD): New unspec.
* internal-fn.def (IFN_DIV_POW2): New internal function.
* optabs.def (sdiv_pow2_optab): New optab.
* tree-vect-patterns.c (vect_recog_divmod_pattern):
Modify pattern to support new operation.
* doc/md.texi (sdiv_pow2$var{m3}): Documentation for the above.
* doc/sourcebuild.texi (vect_sdiv_pow2_si):
Document new target selector.

gcc/testsuite/
* gcc.dg/vect/vect-sdiv-pow2-1.c: New test.
* gcc.target/aarch64/sve/asrdiv_1.c: As above.
* lib/target-supports.exp (check_effective_target_vect_sdiv_pow2_si):
Return true for AArch64 with SVE.

From-SVN: r276343
12 files changed:
gcc/ChangeLog
gcc/config/aarch64/aarch64-sve.md
gcc/config/aarch64/iterators.md
gcc/doc/md.texi
gcc/doc/sourcebuild.texi
gcc/internal-fn.def
gcc/optabs.def
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/vect/vect-sdiv-pow2-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/aarch64/sve/asrdiv_1.c [new file with mode: 0644]
gcc/testsuite/lib/target-supports.exp
gcc/tree-vect-patterns.c