[AArch64] Add SVE support for integer division
commit0bbf725c6b5c5c386484c2990e3a668feca2a8d4
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 25 May 2018 08:38:12 +0000 (25 08:38 +0000)
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 25 May 2018 08:38:12 +0000 (25 08:38 +0000)
treee3b7dc7cf92bd1d7eb18165d0f7a61b1ce89f84f
parent1c91e6c28bc3a384316d83c3437def66b251485d
[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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@260712 138bc75d-0d04-0410-961f-82ee72b054a4
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]