[AArch64] Rework SVE FP comparisons

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

This patch rewrites the SVE FP comparisons so that they always use unspecs and so that they have an additional operand to indicate whether the predicate is known to be a PTRUE. It's part of a series that rewrites the SVE FP patterns so that they can cope with non-PTRUE predicates.

2019-08-14 Richard Sandiford

gcc/
- config/aarch64/iterators.md (UNSPEC_COND_FCMUO): New unspec. (cmp_op): Handle it. (SVE_COND_FP_CMP): Rename to... (SVE_COND_FP_CMP_I0): ...this. (SVE_FP_CMP): Remove.
- config/aarch64/aarch64-sve.md (*fcm): Replace with... (*fcm): ...this new pattern, using unspecs to represent the comparison. (*fcmuo): Use UNSPEC_COND_FCMUO. (*fcm_and_combine, *fcmuo_and_combine): Update accordingly.
- config/aarch64/aarch64.c (aarch64_emit_sve_ptrue_op): Delete. (aarch64_unspec_cond_code): Move after integer code. Handle UNORDERED. (aarch64_emit_sve_predicated_cond): Replace with... (aarch64_emit_sve_fp_cond): ...this new function. (aarch64_emit_sve_or_conds): Replace with... (aarch64_emit_sve_or_fp_conds): ...this new function. (aarch64_emit_sve_inverted_cond): Replace with... (aarch64_emit_sve_invert_fp_cond): ...this new function. (aarch64_expand_sve_vec_cmp_float): Update accordingly.

e55acb2c582 [AArch64] Rework SVE FP comparisons
gcc/ChangeLog | 25 ++++++++
gcc/config/aarch64/aarch64-sve.md | 96 +++++++++---------------------
gcc/config/aarch64/aarch64.c | 122 +++++++++++++++++---------------------
gcc/config/aarch64/iterators.md | 20 +++----
4 files changed, 118 insertions(+), 145 deletions(-)

Upstream: gcc.gnu.org


  • Share