[AArch64] Add support for SVE F{MAX,MIN}NM immediate

Programming / Compilers / GCC - rsandifo [138bc75d-0d04-0410-961f-82ee72b054a4] - 14 August 2019 09:14 EDT

This patch uses the immediate forms of FMAXNM and FMINNM for unconditional arithmetic.

The same rules apply to FMAX and FMIN, but we only generate those
via the ACLE.

2019-08-14 Richard Sandiford

gcc/
- config/aarch64/predicates.md (aarch64_sve_float_maxmin_immediate) (aarch64_sve_float_maxmin_operand): New predicates.
- config/aarch64/constraints.md (vsB): New constraint. (vsM): Fix typo.
- config/aarch64/iterators.md (sve_pred_fp_rhs2_operand): Use aarch64_sve_float_maxmin_operand for UNSPEC_COND_FMAXNM and UNSPEC_COND_FMINNM.
- config/aarch64/aarch64-sve.md (3): Use aarch64_sve_float_maxmin_operand for operand 2. (*3): Likewise. Add alternatives for the constant forms.

gcc/testsuite/
- gcc.target/aarch64/sve/fmaxnm_1.c: New test.
- gcc.target/aarch64/sve/fminnm_1.c: Likewise.

0f0ea79f45b [AArch64] Add support for SVE F{MAX,MIN}NM immediate
gcc/ChangeLog | 14 ++++++++
gcc/config/aarch64/aarch64-sve.md | 14 ++++----
gcc/config/aarch64/constraints.md | 9 ++++-
gcc/config/aarch64/iterators.md | 4 +--
gcc/config/aarch64/predicates.md | 9 +++++
gcc/testsuite/ChangeLog | 5 +++
gcc/testsuite/gcc.target/aarch64/sve/fmaxnm_1.c | 45 +++++++++++++++++++++++++
gcc/testsuite/gcc.target/aarch64/sve/fminnm_1.c | 21 ++++++++++++
8 files changed, 112 insertions(+), 9 deletions(-)

Upstream: gcc.gnu.org


  • Share