On Wed, Sep 21, 2011 at 9:45 AM, Jakub Jelinek <ja...@redhat.com> wrote:

>>       * config/i386/i386.md (maxmin): New code iterator.
>>       * config/i386/sse.md (<maxmin:code><mode>3): Macroize expander
>>       from <umaxmin:code><mode>3 and <smaxmin:code><mode>3 using maxmin
>>       code iterator.
>>       (*avx2_<maxmin:code><mode>3): Macroize isn from
>>       *avx2_<umaxmin:code><mode>3 and *avx2_<smaxmin:code><mode>3 using
>>       maxmin code iterator.
>>       (<smaxmin:code><VI124_128:mode>3): Merge with <smaxmin:code>v8hi3.
>>       (<umaxmin:code><VI124_128:mode>3): Merge with umaxv4si3 and
>>       <umaxmin:code>v16qi3.
>>
>> Tested on x86_64-pc-linux-gnu {,-m32}, committed to mainline SVN.
>
> This regressed gcc.dg/vect/vect-reduc-10.c code quality with -msse2,
> -       psubusw (%rax), %xmm0
> -       paddw   (%rax), %xmm0
> +       movdqa  (%rax), %xmm1
>        addq    $16, %rax
>        cmpq    $aus+2048, %rax
> +       psubusw %xmm1, %xmm0
> +       paddw   %xmm1, %xmm0
>
> the problem is that the two expanders force arguments into registers
> unconditionally, while previously in some cases they were
> nonimmediate_operand instead of register_operand predicated.
> This patch fixes that by always using nonimmediate_operand and adding
> force_reg where needed.
>
> 2011-09-21  Jakub Jelinek  <ja...@redhat.com>
>
>        * config/i386/sse.md (<code><mode>3 smaxmin:VI124_128 expander): Use
>        nonimmediate_operand instead of register_operand predicate for operands
>        1 and 2, force them into registers if expanding them as comparison.
>        (<code><mode>3 umaxmin:VI124_128 expander): Similarly.  For UMAX
>        V8HImode force into register just operand 1.

OK.

Thanks,
Uros.

Reply via email to