PPC64 libmvec implementation of sincos

GT tnggil@protonmail.com
Sun Dec 8 21:40:00 GMT 2019

‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Friday, December 6, 2019 12:43 PM, Richard Biener richard.guenther@gmail.com wrote:


> > Are we certain the change we want is to support _Complex double so that
> > cexpi is auto-vectorized?
> > Looking at the resulting executable of the code with sincos in the
> > loop, the only function called
> > is sincos. Not builtin_cexpi or any variant of cexpi. File
> > gcc/builtins.c expands calls to builtin_cexpi
> > to sincos! What is gained by the compiler going through the
> > transformations sincos -> builtin_cexpi ->
> > sincos?
> Yes, we want to support vectorizing cexpi because that is what the compiler will lower sincos to. The sincos API is painful to deal with due to the data dependences it introduces. Now, the vectorizer can of course emit calls to a vectorized sincos it just needs to be able to deal with cexpi input IL.
> Richard.

I'm modifying the code trying to get complex double accepted as a valid type by the vectorizer.
This is the first time I'm dealing with GCC source so I ask for some patience.

Function mode_for_vector in gcc/stor-layout.c requires a new else-if for complex double. I cannot
seem to find a header file where MIN_MODE_VECTOR_FLOAT and similar macros are defined. I expect
a new MIN_MODE_COMPLEX_VECTOR_FLOAT to be defined in the same file as the existing similar macros.
How do I go about making this change?


More information about the Gcc mailing list