On Wed 2024-11-13 15:18:32, Jan Hubicka wrote:
> > - 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.
> GCC is able to recognize sin and cos calls and turn them into single sincos.
> 
> double a[2];
> void test (double b)
> {
>         a[0]=__builtin_sin (b);
>         a[1]=__builtin_cos (b);
> }
> 
> There is sincos pass for this.
> 
> For functions working on arrays, I think we would need to pattern match
> them like we do memset/memcpy in -ftree-loop-distribute-patterns...
> > - 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.
> sqrt/fabs are vectorized, but produced inline since these are easily
> doable with SSE/AVX.

Ah, ok.

Since you said that the patch is ok in response to the first version already,
I've pushed the second version of the patch and changed "Because GCC doesn't
vectorize these functions." to "Because GCC doesn't vectorize these functions
into calls and uses instruction instead."

I hope that's ok.

Cheers,
Filip

Reply via email to