------- Comment #7 from irar at il dot ibm dot com  2009-07-20 11:18 -------
AFAIU, querying for the component type of complex type is not difficult to
implement. 
I think, that loop-based vectorization is preferable here, so we should stay
with vectorization factor of 2 for doubles.

The next problem is to vectorize 
  D.1611_4 = IMAGPART_EXPR <sincostmp.1_1>;
and
  D.1612_6 = REALPART_EXPR <sincostmp.1_1>;

Currently, we support only loads and stores with IMAGPART/REALPART_EXPR,
vectorizing them as strided accesses, with extract odd and even operations for
loads. So, we will have to support interleaving of non-memory variables. 

Does __builtin_cexpi have a vector implementation? If so, does it return two
vectors?

If not, I guess, we need something like:

  sincostmp.1 = __builtin_cexpi (xd[i]);
  sincostmp.2 = __builtin_cexpi (xd[i+1]);
  v1 = VEC_EXTRACT_EVEN (sincostmp.1, sincostmp.2);
  v2 = VEC_EXTRACT_ODD (sincostmp.1, sincostmp.2);
  sf[i:i+1] = v1;
  cf[i:i+1] = v2;
  i = i + 2;

Or we can use the two vectors from vectorized __builtin_cexpi as parameters of
extract operations.
Does that make sense?

Ira


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40770

Reply via email to