public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* PATCH: Replace x86 vec_extractXXXX with vec_extract<mode>
@ 2008-05-21 18:15 H.J. Lu
  2008-05-21 18:16 ` Uros Bizjak
  0 siblings, 1 reply; 2+ messages in thread
From: H.J. Lu @ 2008-05-21 18:15 UTC (permalink / raw)
  To: GCC Patches, Uros Bizjak

[-- Attachment #1: Type: text/plain, Size: 406 bytes --]

Hi,

Here is a similar patch for vec_extract. OK for mainline?

Thanks.


H.J.
----
2008-05-21  H.J. Lu  <hongjiu.lu@intel.com>

        * config/i386/sse.md (vec_extractv4sf): Removed.
        (vec_extractv2df): Likewise.
        (vec_extractv2di): Likewise.
        (vec_extractv4si): Likewise.
        (vec_extractv8hi): Likewise.
        (vec_extractv16qi): Likewise.
        (vec_extract<mode>): New.

[-- Attachment #2: e.txt --]
[-- Type: text/plain, Size: 2585 bytes --]

Index: sse.md
===================================================================
--- sse.md	(revision 135726)
+++ sse.md	(working copy)
@@ -2429,9 +2429,9 @@
   DONE;
 })
 
-(define_expand "vec_extractv4sf"
-  [(match_operand:SF 0 "register_operand" "")
-   (match_operand:V4SF 1 "register_operand" "")
+(define_expand "vec_extract<mode>"
+  [(match_operand:<ssescalarmode> 0 "register_operand" "")
+   (match_operand:SSEMODE 1 "register_operand" "")
    (match_operand 2 "const_int_operand" "")]
   "TARGET_SSE"
 {
@@ -2786,17 +2786,6 @@
   [(set_attr "type" "sselog,ssemov,ssemov,ssemov,ssemov")
    (set_attr "mode" "V2DF,V1DF,DF,V4SF,V2SF")])
 
-(define_expand "vec_extractv2df"
-  [(match_operand:DF 0 "register_operand" "")
-   (match_operand:V2DF 1 "register_operand" "")
-   (match_operand 2 "const_int_operand" "")]
-  "TARGET_SSE"
-{
-  ix86_expand_vector_extract (false, operands[0], operands[1],
-			      INTVAL (operands[2]));
-  DONE;
-})
-
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;;
 ;; Parallel integral arithmetic
@@ -4910,50 +4899,6 @@
   [(set_attr "type" "ssemov,ssemov,ssemov,sselog,ssemov,ssemov,ssemov")
    (set_attr "mode" "TI,TI,TI,TI,V4SF,V2SF,V2SF")])
 
-(define_expand "vec_extractv2di"
-  [(match_operand:DI 0 "register_operand" "")
-   (match_operand:V2DI 1 "register_operand" "")
-   (match_operand 2 "const_int_operand" "")]
-  "TARGET_SSE"
-{
-  ix86_expand_vector_extract (false, operands[0], operands[1],
-			      INTVAL (operands[2]));
-  DONE;
-})
-
-(define_expand "vec_extractv4si"
-  [(match_operand:SI 0 "register_operand" "")
-   (match_operand:V4SI 1 "register_operand" "")
-   (match_operand 2 "const_int_operand" "")]
-  "TARGET_SSE"
-{
-  ix86_expand_vector_extract (false, operands[0], operands[1],
-			      INTVAL (operands[2]));
-  DONE;
-})
-
-(define_expand "vec_extractv8hi"
-  [(match_operand:HI 0 "register_operand" "")
-   (match_operand:V8HI 1 "register_operand" "")
-   (match_operand 2 "const_int_operand" "")]
-  "TARGET_SSE"
-{
-  ix86_expand_vector_extract (false, operands[0], operands[1],
-			      INTVAL (operands[2]));
-  DONE;
-})
-
-(define_expand "vec_extractv16qi"
-  [(match_operand:QI 0 "register_operand" "")
-   (match_operand:V16QI 1 "register_operand" "")
-   (match_operand 2 "const_int_operand" "")]
-  "TARGET_SSE"
-{
-  ix86_expand_vector_extract (false, operands[0], operands[1],
-			      INTVAL (operands[2]));
-  DONE;
-})
-
 (define_expand "vec_unpacku_hi_v16qi"
   [(match_operand:V8HI 0 "register_operand" "")
    (match_operand:V16QI 1 "register_operand" "")]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: PATCH: Replace x86 vec_extractXXXX with vec_extract<mode>
  2008-05-21 18:15 PATCH: Replace x86 vec_extractXXXX with vec_extract<mode> H.J. Lu
@ 2008-05-21 18:16 ` Uros Bizjak
  0 siblings, 0 replies; 2+ messages in thread
From: Uros Bizjak @ 2008-05-21 18:16 UTC (permalink / raw)
  To: H.J. Lu; +Cc: GCC Patches

H.J. Lu wrote:

> Here is a similar patch for vec_extract. OK for mainline?
>   

OK for mainline.

Thanks,
Uros.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-05-21 17:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-05-21 18:15 PATCH: Replace x86 vec_extractXXXX with vec_extract<mode> H.J. Lu
2008-05-21 18:16 ` 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).