Patchwork [i386] : Some further TARGET_SSE_PACKED_SINGLE_INSN_OPTIMAL cleanups

login
register
mail settings
Submitter Uros Bizjak
Date May 9, 2012, 6:45 p.m.
Message ID <CAFULd4ZJvp6ruA7yQW1R1xLuCBGdVYgjOxy9FYYQD3ofyDjXdQ@mail.gmail.com>
Download mbox | patch
Permalink /patch/158032/
State New
Headers show

Comments

Uros Bizjak - May 9, 2012, 6:45 p.m.
Hello!

Practically no functional change.

2012-05-09  Uros Bizjak  <ubizjak@gmail.com>

	* config/i386/i386.c (*movdf_internal_rex64): Remove
	TARGET_SSE_PACKED_SINGLE_INSN_OPTIMAL handling from asm output code.
	Calculate "mode" attribute according to
	TARGET_SSE_PACKED_SINGLE_INSN_OPTIMAL flag.
	(*movdf_internal): Ditto.

Tested on x86_64-pc-linux-gnu {,-m32}, committed to mainline SVN.

Uros.

Patch

Index: i386.md
===================================================================
--- i386.md	(revision 187347)
+++ i386.md	(working copy)
@@ -2953,8 +2953,7 @@ 
       switch (get_attr_mode (insn))
 	{
 	case MODE_V2DF:
-	  if (!TARGET_SSE_PACKED_SINGLE_INSN_OPTIMAL)
-	    return "%vmovapd\t{%1, %0|%0, %1}";
+	  return "%vmovapd\t{%1, %0|%0, %1}";
 	case MODE_V4SF:
 	  return "%vmovaps\t{%1, %0|%0, %1}";
 
@@ -3032,7 +3031,8 @@ 
 		  movaps encodes one byte shorter.  */
 	       (eq_attr "alternative" "8")
 		 (cond
-		   [(match_test "optimize_function_for_size_p (cfun)")
+		   [(ior (match_test "TARGET_SSE_PACKED_SINGLE_INSN_OPTIMAL")
+			 (match_test "optimize_function_for_size_p (cfun)"))
 		      (const_string "V4SF")
 		    (match_test "TARGET_SSE_PARTIAL_REG_DEPENDENCY")
 		      (const_string "V2DF")
@@ -3094,8 +3094,7 @@ 
       switch (get_attr_mode (insn))
 	{
 	case MODE_V2DF:
-	  if (!TARGET_SSE_PACKED_SINGLE_INSN_OPTIMAL)
-	    return "%vmovapd\t{%1, %0|%0, %1}";
+	  return "%vmovapd\t{%1, %0|%0, %1}";
 	case MODE_V4SF:
 	  return "%vmovaps\t{%1, %0|%0, %1}";
 
@@ -3167,7 +3166,8 @@ 
 		  movaps encodes one byte shorter.  */
 	       (eq_attr "alternative" "6,10")
 		 (cond
-		   [(match_test "optimize_function_for_size_p (cfun)")
+		   [(ior (match_test "TARGET_SSE_PACKED_SINGLE_INSN_OPTIMAL")
+			 (match_test "optimize_function_for_size_p (cfun)"))
 		      (const_string "V4SF")
 		    (match_test "TARGET_SSE_PARTIAL_REG_DEPENDENCY")
 		      (const_string "V2DF")