GLIBC libmvec status

Jakub Jelinek jakub@redhat.com
Wed Feb 26 13:46:00 GMT 2020


On Wed, Feb 26, 2020 at 10:32:17AM -0300, Tulio Magno Quites Machado Filho wrote:
> Jakub Jelinek <jakub@redhat.com> writes:
> 
> > Can you please explain how do you want to pass the
> > void sincos (double, double *, double *);
> > arguments?  I must say it isn't entirely clear from the document.
> > You talk there about double[2], but sincos certainly doesn't have such an
> > argument.
> 
> The plan [1] is to return a struct instead, i.e.:
> 
>     struct sincosret _ZGVbN2v_sincos (vector double);
>     struct sincosretf _ZGVbN4v_sincosf (vector float);

Ugh, then certainly it shouldn't be mangled as simd variant of sincos, it
needs to be called something else.
The ABI can't be written for a single, even if commonly used, function, but
needs to be generic.
And if I have a
#pragma omp declare simd
void foo (double x, double *y, double *z);
then from the prototype there is no way to find out that it only uses the
second two arguments to store a single double through them.  It could very
well do
void foo (double x, double *y, double *z) {
  y[0] = y[1] + x;
  z[0] = z[1] + x;
}
or anything else and then you can't transform it to something like that.

	Jakub



More information about the Gcc-patches mailing list