diff options
author | Andrew Stubbs <ams@codesourcery.com> | 2023-04-14 17:05:15 +0100 |
---|---|---|
committer | Andrew Stubbs <ams@codesourcery.com> | 2023-04-18 12:26:40 +0100 |
commit | d985ae9b5b8409aed4801dcf6cb1f223c589409e (patch) | |
tree | 527779d38980e56a7a5341a5113a6c7a5fd0c52e /gcc/tree-ssa-loop-split.cc | |
parent | 74c492ea1299d1d6a35d135f4ddd3fe0ea072e40 (diff) | |
download | gcc-d985ae9b5b8409aed4801dcf6cb1f223c589409e.zip gcc-d985ae9b5b8409aed4801dcf6cb1f223c589409e.tar.gz gcc-d985ae9b5b8409aed4801dcf6cb1f223c589409e.tar.bz2 |
amdgcn: HardFP divide
Implement FP division using hardware instructions. This replaces both the
softfp library calls, and the --fast-math inaccurate divsion we had previously.
The GCN architecture does not have a single divide instruction, but it does
have a number of support instructions designed to make multiply-by-reciprocal
sufficiently accurate for non-fast-math usage.
gcc/ChangeLog:
* config/gcn/gcn-valu.md (SV_SFDF): New iterator.
(SV_FP): New iterator.
(scalar_mode, SCALAR_MODE): Add identity mappings for scalar modes.
(recip<mode>2): Unify the two patterns using SV_FP.
(div_scale<mode><exec_vcc>): New insn.
(div_fmas<mode><exec>): New insn.
(div_fixup<mode><exec>): New insn.
(div<mode>3): Unify the two expanders and rewrite using hardfp.
* config/gcn/gcn.cc (gcn_md_reorg): Support "vccwait" attribute.
* config/gcn/gcn.md (unspec): Add UNSPEC_DIV_SCALE, UNSPEC_DIV_FMAS,
and UNSPEC_DIV_FIXUP.
(vccwait): New attribute.
gcc/testsuite/ChangeLog:
* gcc.target/gcn/fpdiv.c: Remove the -ffast-math requirement.
(cherry picked from commit cfdc45f73c56ad051a53576a4e88675ced2660d4)
Diffstat (limited to 'gcc/tree-ssa-loop-split.cc')
0 files changed, 0 insertions, 0 deletions