diff mbox

[i386] : Remaining FP moves cleanups

Message ID BANLkTi=xS9eBEdUGUyp0MfS3L7Uh0TqGhQ@mail.gmail.com
State New
Headers show

Commit Message

H.J. Lu June 7, 2011, 2:54 p.m. UTC
On Tue, Jun 7, 2011 at 7:12 AM, Uros Bizjak <ubizjak@gmail.com> wrote:
> On Tue, Jun 7, 2011 at 4:07 PM, H.J. Lu <hjl.tools@gmail.com> wrote:
>
>>> OTOH, you are right, this statement can be moved to case 6, without
>>> the check for registers.
>>>
>>
>> Like this?  OK for trunk with a ChangeLog entry?
>>
>> Thanks.
>>
>> --
>> H.J.
>> ----
>> diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md
>> index 58de87b..a61bffb 100644
>> --- a/gcc/config/i386/i386.md
>> +++ b/gcc/config/i386/i386.md
>> @@ -3207,11 +3207,11 @@
>>     case 6:
>>       if (get_attr_mode (insn) == MODE_V4SF)
>>        return "%vmovaps\t{%1, %0|%0, %1}";
>> +      else if (TARGET_AVX && REG_P (operands[0]) && REG_P (operands[1]))
>
> if (TARGET_AVX)
>
>> +       return "vmovss\t{%1, %0, %0|%0, %0, %1}";
>>
>>     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}";
>>
>>     case 9:
>>
>
> OK with this change and suitable ChangeLog entry.
>

This is what I checked in.

Thanks.
diff mbox

Patch

diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md
index 58de87b..3e18e7a 100644
--- a/gcc/config/i386/i386.md
+++ b/gcc/config/i386/i386.md
@@ -3207,11 +3207,11 @@ 
     case 6:
       if (get_attr_mode (insn) == MODE_V4SF)
 	return "%vmovaps\t{%1, %0|%0, %1}";
+      if (TARGET_AVX)
+	return "vmovss\t{%1, %0, %0|%0, %0, %1}";

     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}";

     case 9: