-
- Downloads
i386: Add -mveclibabi=aocl [PR56504]
We currently support generating vectorized math calls to the AMD core
math library (ACML) (-mveclibabi=acml). That library is end-of-life and
its successor is the math library from AMD Optimizing CPU Libraries
(AOCL).
This patch adds support for AOCL (-mveclibabi=aocl). That significantly
broadens the range of vectorized math functions optimized for AMD CPUs
that GCC can generate calls to.
See the edit to invoke.texi for a complete list of added functions.
Compared to the list of functions in AOCL LibM docs I left out these
vectorized function families:
- sincos and all functions working with arrays ... Because these
functions have pointer arguments and that would require a bigger
rework of ix86_veclibabi_aocl(). Also, I'm not sure if GCC even ever
generates calls to these functions.
- linearfrac ... Because these functions are specific to the AMD
library. There's no equivalent glibc function nor GCC internal
function nor GCC built-in.
- powx, sqrt, fabs ... Because GCC doesn't vectorize these functions
into calls and uses instructions instead.
I also left amd_vrd2_expm1() (the AMD docs list the function but I
wasn't able to link calls to it with the current version of the
library).
gcc/ChangeLog:
PR target/56504
* config/i386/i386-options.cc (ix86_option_override_internal):
Add ix86_veclibabi_type_aocl case.
* config/i386/i386-options.h (ix86_veclibabi_aocl): Add extern
ix86_veclibabi_aocl().
* config/i386/i386-opts.h (enum ix86_veclibabi): Add
ix86_veclibabi_type_aocl into the ix86_veclibabi enum.
* config/i386/i386.cc (ix86_veclibabi_aocl): New function.
* config/i386/i386.opt: Add the 'aocl' type.
* doc/invoke.texi: Document -mveclibabi=aocl.
gcc/testsuite/ChangeLog:
PR target/56504
* gcc.target/i386/vectorize-aocl1.c: New test.
Signed-off-by:
Filip Kastl <fkastl@suse.cz>
Showing
- gcc/config/i386/i386-options.cc 4 additions, 0 deletionsgcc/config/i386/i386-options.cc
- gcc/config/i386/i386-options.h 1 addition, 0 deletionsgcc/config/i386/i386-options.h
- gcc/config/i386/i386-opts.h 2 additions, 1 deletiongcc/config/i386/i386-opts.h
- gcc/config/i386/i386.cc 142 additions, 0 deletionsgcc/config/i386/i386.cc
- gcc/config/i386/i386.opt 3 additions, 0 deletionsgcc/config/i386/i386.opt
- gcc/doc/invoke.texi 42 additions, 15 deletionsgcc/doc/invoke.texi
- gcc/testsuite/gcc.target/i386/vectorize-aocl1.c 224 additions, 0 deletionsgcc/testsuite/gcc.target/i386/vectorize-aocl1.c
Loading
Please register or sign in to comment