r274508 - in /trunk/gcc: ChangeLog config/aarch...

rsandifo@gcc.gnu.org rsandifo@gcc.gnu.org
Thu Aug 15 08:18:00 GMT 2019


Author: rsandifo
Date: Thu Aug 15 08:18:03 2019
New Revision: 274508

URL: https://gcc.gnu.org/viewcvs?rev=274508&root=gcc&view=rev
Log:
[AArch64] Use SVE binary immediate instructions for conditional arithmetic

This patch lets us use the immediate forms of FADD, FSUB, FSUBR,
FMUL, FMAXNM and FMINNM for conditional arithmetic.  (We already
use them for normal unconditional arithmetic.)

2019-08-15  Richard Sandiford  <richard.sandiford@arm.com>
	    Kugan Vivekanandarajah  <kugan.vivekanandarajah@linaro.org>

gcc/
	* config/aarch64/aarch64.c (aarch64_print_vector_float_operand):
	Print 2.0 naturally.
	(aarch64_sve_float_mul_immediate_p): Return true for 2.0.
	* config/aarch64/predicates.md
	(aarch64_sve_float_negated_arith_immediate): New predicate,
	renamed from aarch64_sve_float_arith_with_sub_immediate.
	(aarch64_sve_float_arith_with_sub_immediate): Test for both
	positive and negative constants.
	(aarch64_sve_float_arith_with_sub_operand): Redefine as a register
	or an aarch64_sve_float_arith_with_sub_immediate.
	* config/aarch64/constraints.md (vsN): Use
	aarch64_sve_float_negated_arith_immediate.
	* config/aarch64/iterators.md (SVE_COND_FP_BINARY_I1): New int
	iterator.
	(sve_pred_fp_rhs2_immediate): New int attribute.
	* config/aarch64/aarch64-sve.md
	(cond_<SVE_COND_FP_BINARY:optab><SVE_F:mode>): Use
	sve_pred_fp_rhs1_operand and sve_pred_fp_rhs2_operand.
	(*cond_<SVE_COND_FP_BINARY_I1:optab><SVE_F:mode>_2_const)
	(*cond_<SVE_COND_FP_BINARY_I1:optab><SVE_F:mode>_any_const)
	(*cond_add<SVE_F:mode>_2_const, *cond_add<SVE_F:mode>_any_const)
	(*cond_sub<mode>_3_const, *cond_sub<mode>_any_const): New patterns.

gcc/testsuite/
	* gcc.target/aarch64/sve/cond_fadd_1.c: New test.
	* gcc.target/aarch64/sve/cond_fadd_1_run.c: Likewise.
	* gcc.target/aarch64/sve/cond_fadd_2.c: Likewise.
	* gcc.target/aarch64/sve/cond_fadd_2_run.c: Likewise.
	* gcc.target/aarch64/sve/cond_fadd_3.c: Likewise.
	* gcc.target/aarch64/sve/cond_fadd_3_run.c: Likewise.
	* gcc.target/aarch64/sve/cond_fadd_4.c: Likewise.
	* gcc.target/aarch64/sve/cond_fadd_4_run.c: Likewise.
	* gcc.target/aarch64/sve/cond_fsubr_1.c: Likewise.
	* gcc.target/aarch64/sve/cond_fsubr_1_run.c: Likewise.
	* gcc.target/aarch64/sve/cond_fsubr_2.c: Likewise.
	* gcc.target/aarch64/sve/cond_fsubr_2_run.c: Likewise.
	* gcc.target/aarch64/sve/cond_fsubr_3.c: Likewise.
	* gcc.target/aarch64/sve/cond_fsubr_3_run.c: Likewise.
	* gcc.target/aarch64/sve/cond_fsubr_4.c: Likewise.
	* gcc.target/aarch64/sve/cond_fsubr_4_run.c: Likewise.
	* gcc.target/aarch64/sve/cond_fmaxnm_1.c: Likewise.
	* gcc.target/aarch64/sve/cond_fmaxnm_1_run.c: Likewise.
	* gcc.target/aarch64/sve/cond_fmaxnm_2.c: Likewise.
	* gcc.target/aarch64/sve/cond_fmaxnm_2_run.c: Likewise.
	* gcc.target/aarch64/sve/cond_fmaxnm_3.c: Likewise.
	* gcc.target/aarch64/sve/cond_fmaxnm_3_run.c: Likewise.
	* gcc.target/aarch64/sve/cond_fmaxnm_4.c: Likewise.
	* gcc.target/aarch64/sve/cond_fmaxnm_4_run.c: Likewise.
	* gcc.target/aarch64/sve/cond_fminnm_1.c: Likewise.
	* gcc.target/aarch64/sve/cond_fminnm_1_run.c: Likewise.
	* gcc.target/aarch64/sve/cond_fminnm_2.c: Likewise.
	* gcc.target/aarch64/sve/cond_fminnm_2_run.c: Likewise.
	* gcc.target/aarch64/sve/cond_fminnm_3.c: Likewise.
	* gcc.target/aarch64/sve/cond_fminnm_3_run.c: Likewise.
	* gcc.target/aarch64/sve/cond_fminnm_4.c: Likewise.
	* gcc.target/aarch64/sve/cond_fminnm_4_run.c: Likewise.
	* gcc.target/aarch64/sve/cond_fmul_1.c: Likewise.
	* gcc.target/aarch64/sve/cond_fmul_1_run.c: Likewise.
	* gcc.target/aarch64/sve/cond_fmul_2.c: Likewise.
	* gcc.target/aarch64/sve/cond_fmul_2_run.c: Likewise.
	* gcc.target/aarch64/sve/cond_fmul_3.c: Likewise.
	* gcc.target/aarch64/sve/cond_fmul_3_run.c: Likewise.
	* gcc.target/aarch64/sve/cond_fmul_4.c: Likewise.
	* gcc.target/aarch64/sve/cond_fmul_4_run.c: Likewise.

Added:
    trunk/gcc/testsuite/gcc.target/aarch64/sve/cond_fadd_1.c
    trunk/gcc/testsuite/gcc.target/aarch64/sve/cond_fadd_1_run.c
    trunk/gcc/testsuite/gcc.target/aarch64/sve/cond_fadd_2.c
    trunk/gcc/testsuite/gcc.target/aarch64/sve/cond_fadd_2_run.c
    trunk/gcc/testsuite/gcc.target/aarch64/sve/cond_fadd_3.c
    trunk/gcc/testsuite/gcc.target/aarch64/sve/cond_fadd_3_run.c
    trunk/gcc/testsuite/gcc.target/aarch64/sve/cond_fadd_4.c
    trunk/gcc/testsuite/gcc.target/aarch64/sve/cond_fadd_4_run.c
    trunk/gcc/testsuite/gcc.target/aarch64/sve/cond_fmaxnm_1.c
    trunk/gcc/testsuite/gcc.target/aarch64/sve/cond_fmaxnm_1_run.c
    trunk/gcc/testsuite/gcc.target/aarch64/sve/cond_fmaxnm_2.c
    trunk/gcc/testsuite/gcc.target/aarch64/sve/cond_fmaxnm_2_run.c
    trunk/gcc/testsuite/gcc.target/aarch64/sve/cond_fmaxnm_3.c
    trunk/gcc/testsuite/gcc.target/aarch64/sve/cond_fmaxnm_3_run.c
    trunk/gcc/testsuite/gcc.target/aarch64/sve/cond_fmaxnm_4.c
    trunk/gcc/testsuite/gcc.target/aarch64/sve/cond_fmaxnm_4_run.c
    trunk/gcc/testsuite/gcc.target/aarch64/sve/cond_fminnm_1.c
    trunk/gcc/testsuite/gcc.target/aarch64/sve/cond_fminnm_1_run.c
    trunk/gcc/testsuite/gcc.target/aarch64/sve/cond_fminnm_2.c
    trunk/gcc/testsuite/gcc.target/aarch64/sve/cond_fminnm_2_run.c
    trunk/gcc/testsuite/gcc.target/aarch64/sve/cond_fminnm_3.c
    trunk/gcc/testsuite/gcc.target/aarch64/sve/cond_fminnm_3_run.c
    trunk/gcc/testsuite/gcc.target/aarch64/sve/cond_fminnm_4.c
    trunk/gcc/testsuite/gcc.target/aarch64/sve/cond_fminnm_4_run.c
    trunk/gcc/testsuite/gcc.target/aarch64/sve/cond_fmul_1.c
    trunk/gcc/testsuite/gcc.target/aarch64/sve/cond_fmul_1_run.c
    trunk/gcc/testsuite/gcc.target/aarch64/sve/cond_fmul_2.c
    trunk/gcc/testsuite/gcc.target/aarch64/sve/cond_fmul_2_run.c
    trunk/gcc/testsuite/gcc.target/aarch64/sve/cond_fmul_3.c
    trunk/gcc/testsuite/gcc.target/aarch64/sve/cond_fmul_3_run.c
    trunk/gcc/testsuite/gcc.target/aarch64/sve/cond_fmul_4.c
    trunk/gcc/testsuite/gcc.target/aarch64/sve/cond_fmul_4_run.c
    trunk/gcc/testsuite/gcc.target/aarch64/sve/cond_fsubr_1.c
    trunk/gcc/testsuite/gcc.target/aarch64/sve/cond_fsubr_1_run.c
    trunk/gcc/testsuite/gcc.target/aarch64/sve/cond_fsubr_2.c
    trunk/gcc/testsuite/gcc.target/aarch64/sve/cond_fsubr_2_run.c
    trunk/gcc/testsuite/gcc.target/aarch64/sve/cond_fsubr_3.c
    trunk/gcc/testsuite/gcc.target/aarch64/sve/cond_fsubr_3_run.c
    trunk/gcc/testsuite/gcc.target/aarch64/sve/cond_fsubr_4.c
    trunk/gcc/testsuite/gcc.target/aarch64/sve/cond_fsubr_4_run.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/aarch64/aarch64-sve.md
    trunk/gcc/config/aarch64/aarch64.c
    trunk/gcc/config/aarch64/constraints.md
    trunk/gcc/config/aarch64/iterators.md
    trunk/gcc/config/aarch64/predicates.md
    trunk/gcc/testsuite/ChangeLog



More information about the Gcc-cvs mailing list