public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-6373] i386: Robustify V2QI and V4QI move patterns
@ 2022-01-07 19:41 Uros Bizjak
  0 siblings, 0 replies; only message in thread
From: Uros Bizjak @ 2022-01-07 19:41 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:42ae7ebfb2665f8565c8d6c04f6214785a6765ce

commit r12-6373-g42ae7ebfb2665f8565c8d6c04f6214785a6765ce
Author: Uros Bizjak <ubizjak@gmail.com>
Date:   Fri Jan 7 20:40:35 2022 +0100

    i386: Robustify V2QI and V4QI move patterns
    
    Add sse2 isa attribute where needed and remove where not needed.
    
    2022-01-07  Uroš Bizjak  <ubizjak@gmail.com>
    
    gcc/ChangeLog:
    
            * config/i386/mmx.md (*move<V_32:mode>_internal): Add isa attribute.
            (*movv2qi_internal): Remve sse2 requirement for alternatives 4,5.

Diff:
---
 gcc/config/i386/mmx.md | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/gcc/config/i386/mmx.md b/gcc/config/i386/mmx.md
index 8e0a6490b7b..4fc3e00f100 100644
--- a/gcc/config/i386/mmx.md
+++ b/gcc/config/i386/mmx.md
@@ -285,7 +285,12 @@
       gcc_unreachable ();
     }
 }
-  [(set (attr "type")
+  [(set (attr "isa")
+     (cond [(eq_attr "alternative" "6,7")
+	      (const_string "sse2")
+	   ]
+	   (const_string "*")))
+   (set (attr "type")
      (cond [(eq_attr "alternative" "2")
 	      (const_string "sselog1")
 	    (eq_attr "alternative" "3,4,5,6,7")
@@ -306,12 +311,15 @@
 		       (const_string "V4SF")
 		     (match_test "TARGET_AVX")
 		       (const_string "TI")
-		     (match_test "optimize_function_for_size_p (cfun)")
+		     (ior (not (match_test "TARGET_SSE2"))
+			  (match_test "optimize_function_for_size_p (cfun)"))
 		       (const_string "V4SF")
 		    ]
 		    (const_string "TI"))
+
 	    (and (eq_attr "alternative" "4,5")
-		 (match_test "<MODE>mode == V2HFmode"))
+		 (ior (match_test "<MODE>mode == V2HFmode")
+		      (not (match_test "TARGET_SSE2"))))
 	      (const_string "SF")
 	   ]
 	   (const_string "SI")))
@@ -401,7 +409,7 @@
     }
 }
   [(set (attr "isa")
-	(cond [(eq_attr "alternative" "4,5,6,8,9")
+	(cond [(eq_attr "alternative" "6,8,9")
 		  (const_string "sse2")
 	       (eq_attr "alternative" "7")
 		  (const_string "sse4")


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-01-07 19:41 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-07 19:41 [gcc r12-6373] i386: Robustify V2QI and V4QI move patterns Uros Bizjak

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).