This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[AArch64] Add precision choices for the reciprocal square root approximation
- From: Evandro Menezes <e dot menezes at samsung dot com>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Cc: James Greenhalgh <james dot greenhalgh at arm dot com>, Wilco Dijkstra <Wilco dot Dijkstra at arm dot com>, Andrew Pinski <pinskia at gmail dot com>
- Date: Thu, 17 Mar 2016 17:11:19 -0500
- Subject: [AArch64] Add precision choices for the reciprocal square root approximation
- Authentication-results: sourceware.org; auth=none
Add precision choices for the reciprocal square root approximation
Allow a target to prefer such operation depending on the FP
precision.
gcc/
* config/aarch64/aarch64-protos.h
(AARCH64_EXTRA_TUNE_APPROX_RSQRT): New macro.
* config/aarch64/aarch64-tuning-flags.def
(AARCH64_EXTRA_TUNE_APPROX_RSQRT_DF): New mask.
(AARCH64_EXTRA_TUNE_APPROX_RSQRT_SF): Likewise.
* config/aarch64/aarch64.c
(use_rsqrt_p): New argument for the mode.
(aarch64_builtin_reciprocal): Devise mode from builtin.
(aarch64_optab_supported_p): New argument for the mode.
This patch allows a target to choose for which FP precision the
reciprocal square root approximation is used.
For example, though this approximation is improves the performance
noticeably for DF on A57, for SF, not so much, if at all.
Feedback appreciated.
Thank you,
--
Evandro Menezes