On 27 June 2012 21:27, Richard Henderson <r...@redhat.com> wrote:
> On 06/20/2012 05:44 AM, Ramana Radhakrishnan wrote:
>> +         case NEON_DUP:
>> +           if (TREE_CODE (argp[0]) == INTEGER_CST
>> +               || TREE_CODE (argp[0]) == REAL_CST)
>> +             return build_vector_from_val (result_type, argp[0]);
>> +           return NULL_TREE;
>
> You can expand this in all cases.  Constants go to VECTOR_CST,
> as you're doing, but variables can be expanded via a CONSTRUCTOR.
>
> Check out what we generate for
>
>   (v4si){ x, x, x, x }

I finally wrote something like this up. It has to special case the
fact  the DUP intrinsics take a non-vector 64 bit form and hence you
just can't use expand_vector_from_val.

This however has fallout  in the neon intrinsics test results
especially all the vdup* and the vmov*_n* intrinsics.

Sigh and that needs some cleanup.

regards,
Ramana

>
>
> r~

Attachment: vdup-improvement.patch
Description: Binary data

Reply via email to