Hello,

I have been looking at a piece of code that fails to vectorize because GCC4.7.0 
is unable in suportable_widening_operation to provide proper conversions for a 
WIDEN_MULT_EXPR. vectype_in is V8HI and vectype_out is V2DI. The problem seems 
to be that GCC code at the end of this functions blocks the search for 
intermediate conversions. If GCC would look for them it would find:
vec_widen_smult_lo_v8hi with v4si output
vec_widen_smult_lo_v4si with v2di output 
however, since this search doesn't occur, vectorization fails.

How can I instruct GCC that it should take this steps to enable vectorization 
between these vectypes?
I thought about defining vec_widen_smult_lo_v8hi with v2di output but can't 
because of the constraints on the pattern ("Multiply the high/low elements of 
the two vectors, and put the N/2 products of size 2*S in the output vector 
(operand 0).").

The hook TARGET_VECTORIZE_BUILTIN_CONVERSION sounds like it could be what I 
want but I added some test code and in my simple example this function is never 
called.

Any suggestions on how to work this out in the backend?

Cheers,

Paulo Matos


Reply via email to