[AArch64] Add SVE support for integer division
authorRichard Sandiford <richard.sandiford@linaro.org>
Fri, 25 May 2018 08:38:12 +0000 (08:38 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Fri, 25 May 2018 08:38:12 +0000 (08:38 +0000)
commitc38f73190ba3669a9cd8b57626b9d0e7087fd55c
treee3b7dc7cf92bd1d7eb18165d0f7a61b1ce89f84f
parent8f76f377861b4195487416806c4a0eacabc433c9
[AArch64] Add SVE support for integer division

After the previous patch to prevent pessimisation of divisions
by constants, this patch adds support for the SVE integer division
instructions.

2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>

gcc/
* config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
(optab, sve_int_op): Handle div and udiv.
* config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
for SVE_INT_BINARY_SD.
(*<optab><mode>3): New insn for the same.

gcc/testsuite/
* gcc.target/aarch64/sve/div_1.c: New test.
* gcc.target/aarch64/sve/div_1_run.c: Likewise.
* gcc.target/aarch64/sve/mul_highpart_2.c: Likewise.
* gcc.target/aarch64/sve/mul_highpart_2_run.c: Likewise.

From-SVN: r260712
gcc/ChangeLog
gcc/config/aarch64/aarch64-sve.md
gcc/config/aarch64/iterators.md
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/aarch64/sve/div_1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/aarch64/sve/div_1_run.c [new file with mode: 0644]
gcc/testsuite/gcc.target/aarch64/sve/mul_highpart_2.c [new file with mode: 0644]
gcc/testsuite/gcc.target/aarch64/sve/mul_highpart_2_run.c [new file with mode: 0644]