r274509 - in /trunk/gcc: ChangeLog config/aarch...
rsandifo@gcc.gnu.org
rsandifo@gcc.gnu.org
Thu Aug 15 08:22:00 GMT 2019
Author: rsandifo
Date: Thu Aug 15 08:22:07 2019
New Revision: 274509
URL: https://gcc.gnu.org/viewcvs?rev=274509&root=gcc&view=rev
Log:
[AArch64] Use SVE MLA, MLS, MAD and MSB for conditional arithmetic
This patch uses predicated MLA, MLS, MAD and MSB to implement
conditional "FMA"s on integers. This also requires providing
the unpredicated optabs (fma and fnma) since otherwise
tree-ssa-math-opts.c won't try to use the conditional forms.
We still want to use shifts and adds in preference to multiplications,
so the patch makes the optab expanders check for that.
The tests cover floating-point types too, which are already handled,
and which were already tested to some extent by gcc.dg/vect.
2019-08-15 Richard Sandiford <richard.sandiford@arm.com>
Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
gcc/
* config/aarch64/aarch64-protos.h (aarch64_prepare_sve_int_fma)
(aarch64_prepare_sve_cond_int_fma): Declare.
* config/aarch64/aarch64.c (aarch64_convert_mult_to_shift)
(aarch64_prepare_sve_int_fma): New functions.
(aarch64_prepare_sve_cond_int_fma): Likewise.
* config/aarch64/aarch64-sve.md
(cond_<SVE_INT_BINARY:optab><SVE_I:mode>): Add a "@" marker.
(fma<SVE_I:mode>4, cond_fma<SVE_I:mode>, *cond_fma<SVE_I:mode>_2)
(*cond_fma<SVE_I:mode>_4, *cond_fma<SVE_I:mode>_any, fnma<SVE_I:mode>4)
(cond_fnma<SVE_I:mode>, *cond_fnma<SVE_I:mode>_2)
(*cond_fnma<SVE_I:mode>_4, *cond_fnma<SVE_I:mode>_any): New patterns.
(*madd<mode>): Rename to...
(*fma<mode>4): ...this.
(*msub<mode>): Rename to...
(*fnma<mode>4): ...this.
gcc/testsuite/
* gcc.target/aarch64/sve/cond_mla_1.c: New test.
* gcc.target/aarch64/sve/cond_mla_1_run.c: Likewise.
* gcc.target/aarch64/sve/cond_mla_2.c: Likewise.
* gcc.target/aarch64/sve/cond_mla_2_run.c: Likewise.
* gcc.target/aarch64/sve/cond_mla_3.c: Likewise.
* gcc.target/aarch64/sve/cond_mla_3_run.c: Likewise.
* gcc.target/aarch64/sve/cond_mla_4.c: Likewise.
* gcc.target/aarch64/sve/cond_mla_4_run.c: Likewise.
* gcc.target/aarch64/sve/cond_mla_5.c: Likewise.
* gcc.target/aarch64/sve/cond_mla_5_run.c: Likewise.
* gcc.target/aarch64/sve/cond_mla_6.c: Likewise.
* gcc.target/aarch64/sve/cond_mla_6_run.c: Likewise.
* gcc.target/aarch64/sve/cond_mla_7.c: Likewise.
* gcc.target/aarch64/sve/cond_mla_7_run.c: Likewise.
* gcc.target/aarch64/sve/cond_mla_8.c: Likewise.
* gcc.target/aarch64/sve/cond_mla_8_run.c: Likewise.
Added:
trunk/gcc/testsuite/gcc.target/aarch64/sve/cond_mla_1.c
trunk/gcc/testsuite/gcc.target/aarch64/sve/cond_mla_1_run.c
trunk/gcc/testsuite/gcc.target/aarch64/sve/cond_mla_2.c
trunk/gcc/testsuite/gcc.target/aarch64/sve/cond_mla_2_run.c
trunk/gcc/testsuite/gcc.target/aarch64/sve/cond_mla_3.c
trunk/gcc/testsuite/gcc.target/aarch64/sve/cond_mla_3_run.c
trunk/gcc/testsuite/gcc.target/aarch64/sve/cond_mla_4.c
trunk/gcc/testsuite/gcc.target/aarch64/sve/cond_mla_4_run.c
trunk/gcc/testsuite/gcc.target/aarch64/sve/cond_mla_5.c
trunk/gcc/testsuite/gcc.target/aarch64/sve/cond_mla_5_run.c
trunk/gcc/testsuite/gcc.target/aarch64/sve/cond_mla_6.c
trunk/gcc/testsuite/gcc.target/aarch64/sve/cond_mla_6_run.c
trunk/gcc/testsuite/gcc.target/aarch64/sve/cond_mla_7.c
trunk/gcc/testsuite/gcc.target/aarch64/sve/cond_mla_7_run.c
trunk/gcc/testsuite/gcc.target/aarch64/sve/cond_mla_8.c
trunk/gcc/testsuite/gcc.target/aarch64/sve/cond_mla_8_run.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/aarch64/aarch64-protos.h
trunk/gcc/config/aarch64/aarch64-sve.md
trunk/gcc/config/aarch64/aarch64.c
trunk/gcc/testsuite/ChangeLog
More information about the Gcc-cvs
mailing list