[PATCH] Add vec_pack_ufix_trunc_{v4df,v2df} expanders (take 2)

Uros Bizjak ubizjak@gmail.com
Tue Nov 1 19:30:00 GMT 2011


On Tue, Nov 1, 2011 at 2:35 PM, Jakub Jelinek <jakub@redhat.com> wrote:

>> > Similarly to the V{4,8}SFmode -> unsigned V{4,8}SImode conversion
>> > support for AVX this one adds V{2,4}DFmode -> unsigned V{4,8}SImode
>> > conversion.
>> >
>> > Ok for trunk?
>>
>> Please put expander function into i386.c. IMO, this expander can be
>> better written using variable mode and indirect functions.
>
> Like this?
> Advantage is that fixuns_trunc<mode><sseintvecmodelower>2 pattern can use
> the helper too and shrink, disadvantage is that the stmts in the new
> pattern are now in vcmppd; vandpd; vaddpd; vcmppd; vandpd; vaddpd order
> instead of vcmppd; vcmppd; vandpd; vandpd; vaddpd; vaddpd; (not sure why
> the scheduler didn't change it, but on the other side it is scheduler's
> job).
>
> 2011-11-01  Jakub Jelinek  <jakub@redhat.com>
>
>        * config/i386/i386-protos.h (ix86_expand_adjust_ufix_to_sfix_si): New
>        prototype.
>        * config/i386/i386.c (ix86_expand_adjust_ufix_to_sfix_si): New
>        function.
>        * config/i386/sse.md (fixuns_trunc<mode><sseintvecmodelower>2): Use
>        it.
>        (ssepackfltmode): New mode attr.
>        (vec_pack_ufix_trunc_<mode>): New expander.

OK.

Thanks,
Uros.



More information about the Gcc-patches mailing list