On 2012-06-18 22:46, Jakub Jelinek wrote:
> On Mon, Jun 18, 2012 at 04:44:21PM -0700, Richard Henderson wrote:
>> On 2012-06-14 13:58, Jakub Jelinek wrote:
>>> + if (!supportable_widening_operation (WIDEN_MULT_EXPR, last_stmt,
>>> + vecwtype, vectype,
>>> + &dummy, &dummy, &dummy_code,
>>> + &dummy_code, &dummy_int, &dummy_vec))
>>> + return NULL;
>>
>>
>> It would be nice to be able to handle high-part multiplies as well, e.g.
>> VEC_WIDEN_MULT_HI_EXPR. Which is what Altivec provides, and not
>> VEC_WIDEN_MULT.
>
> Sure, but we don't have a tree code for that right now, do we?
> VEC_WIDEN_MULT_HI_EXPR is just one half of the widened multiply results,
> not all the high halves of the widened multiply.
Actually, it is all the high parts of the multiply results. The comment
in tree.def is incorrect. Likewise MULT_LO_EXPR is the low parts (and
fully redundant with plain MULT_EXPR, really).
> For 16-bit multiplication we could also use {,V}PMULH{,U}W
> (for 32-bit multiplication we use two {,V}PMUL{,U}DQ plus shifts afterwards).
Well, an single interleave, not shifts, but yes.
r~