‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐ On Thursday, January 9, 2020 8:42 AM, Richard Biener <richard.guent...@gmail.com> wrote:
> > As for the other question for testing you probably want to provide a > OMP simd declaration > of a function like > > _Complex double mycexpi (double); > > and make a testcase like > > void foo (_Complex double * __restrict out, double *in) > { > for (int i = 0; i < 1024; ++i) > { > out[i] = mycexpi (in[i]); > } > } > > or eventually with two output arrays and explicit __real/__imag > processing. The real > and main question is how is the OMP SIMD declaration of mycexpi looking like? > > So I'd completely side-step sincos() and GCCs sincos() -> > __builtin_cepxi transform > and concentrate on OMP SIMD of a function with the signature we need to > handle. > > Richard. I think what is required here is to attach either #pragma omp declare simd or __attribute__ ((simd)) to the declaration of builtin cexpi. In gcc/builtins.def, some attributes are provided during creation of cexpi (line 656, call containing BUILT_IN_CEXPI). Attaching the simd attributes to function declarations is how sin, cos, and the other math functions were handled in math-vector.h glibc header file.