[PATCH, i386]: Remaining FP moves cleanups

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


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.


-- 
H.J.
----
2011-06-07  H.J. Lu  <hongjiu.lu@intel.com>

	* config/i386/i386.md (*movsf_internal): Optimize AVX check.
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:



More information about the Gcc-patches mailing list