‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Monday, December 9, 2019 3:39 AM, Richard Biener 
<richard.guent...@gmail.com> wrote:

> > 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?
>
> You don't want to do it this way but map _Complex double to a vector
> of 2 * n doubles instead.
> Look into get_related_vectype_for_scalar_type where it alreday has
> code to "change" the
> scalar type into something that fits what we allow for vectors.
>

I need more guidance on how to proceed here. Function mode_for_vector is called 
by
build_vector_type_for_mode. The latter is called by 
get_related_vectype_for_scalar_type,
which you suggested to study for a preferred implementation. The code in 
mode_for_vector
relies on the relationship that vector mode E_V2DFmode is composed of E_DFmode 
scalars.
The complex argument has mode E_DCmode. Where should I create a relationship 
between
E_V2DFmode and E_DCmode so that mode_for_vector returns the appropriate vector 
mode?
The solution has to be general so that single precision float complex 
vectorization is
also supported.

Bert.

Reply via email to