[PATCH, i386]: Remaining FP moves cleanups

H.J. Lu hjl.tools@gmail.com
Tue Jun 7 13:43:00 GMT 2011


On Sun, Jun 5, 2011 at 1:46 PM, Uros Bizjak <ubizjak@gmail.com> wrote:
> Hello!
>
> 2011-06-05  Uros Bizjak  <ubizjak@gmail.com>
>
>        * config/i386/i386.md (*movdf_internal_rex64) <case 8,9,10>:
>        Remove MODE_TI handling.  Remove SSE1 handling in attribute "mode"
>        calculation.
>        (*movdf_internal_rex64) <case 6,7,8>: Remove MODE_TI handling.
>        Simplify MODE_V1DF and MODE_V2SF handling.
>        (*movsf_internal): Remove x constraint from operand 1 alternative 7.
>        Simplify MODE_SF handling.
>
> Patch was bootstrapped and regression tested on x86_64-pc-linux-gnuj
> {,-m32} AVX target. Committed to mainline SVN.
>

Hi Uros,

The new *movsf_internal patter has

 [(set (match_operand:SF 0 "nonimmediate_operand"
          "=f,m,f,?r ,?m,x,x,x,m,!*y,!m,!*y,?Yi,?r,!*Ym,!r")
        (match_operand:SF 1 "general_operand"
          "fm,f,G,rmF,Fr,C,x,m,x,m  ,*y,*y ,r  ,Yi,r   ,*Ym"))]
...
    case 7:
    case 8:
      if (TARGET_AVX && REG_P (operands[0]) && REG_P (operands[1]))
        return "vmovss\t{%1, %0, %0|%0, %0, %1}";
      return "%vmovss\t{%1, %0|%0, %1}";

Since 7 is store and 8 is load,

if (TARGET_AVX && REG_P (operands[0]) && REG_P (operands[1]))

will always be false.  Should we remove it?

Thanks.

-- 
H.J.



More information about the Gcc-patches mailing list