https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96030
Bug ID: 96030
Summary: AArch64: Add an option to control 64bits simdclone of
math functions for fortran
Product: gcc
Version: 11.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: bule1 at huawei dot com
Target Milestone: ---
Target: AARCH64
Created attachment 48824
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48824&action=edit
patch for the problem
Hi,
I found that currently fortran can only enable simdclone of math functions by
declare "!GCC$ builtin (exp) attributes simd" derivative. This kind of
declaration seems cannot indicate whether the simdlen is 64bits or 128bits. By
reading the source code and some tests, I believe the simdclone of both mode
will be generated with a single derivative declaration. At present, vector math
lib for aarch64 (mathlib and sleef) donot support the 64bits mode functions.
So when I want to enable the simd math on some application, if the application
has an oppotunity for 64bits mode simdclone, there is no matching math library
call, which leads to a link time error.
For now, to solve this problem, I added a new backend option -msimdmath-64 to
control the generation of the 64bits mode simdclone, which is default to
disable. The patch is attached.
I think it is reasonable to set a switch to control the generation of the
64bits mode simdclone. Do we have something alike already?
If not, is this the right way to go?
Thanks.