public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "ubizjak at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/36992] Very stange code for _mm_move_epi64
Date: Sat, 02 Aug 2008 15:08:00 -0000	[thread overview]
Message-ID: <20080802150713.15778.qmail@sourceware.org> (raw)
In-Reply-To: <bug-36992-682@http.gcc.gnu.org/bugzilla/>



------- Comment #12 from ubizjak at gmail dot com  2008-08-02 15:07 -------
Patch in testing:

Index: testsuite/gcc.target/i386/pr36992.c
===================================================================
--- testsuite/gcc.target/i386/pr36992.c (revision 0)
+++ testsuite/gcc.target/i386/pr36992.c (revision 0)
@@ -0,0 +1,12 @@
+/* { dg-do compile }
+/* { dg-options "-msse2 -O2" } */
+
+#include <emmintrin.h>
+
+__m128i
+test (__m128i b)
+{
+  return _mm_move_epi64 (b);
+}
+
+/* { dg-final { scan-assembler-times "mov\[qd\]\[ \\t\]+.*%xmm" 1 } } */
Index: config/i386/sse.md
===================================================================
--- config/i386/sse.md  (revision 138553)
+++ config/i386/sse.md  (working copy)
@@ -4777,7 +4777,7 @@
   "")

 (define_insn "*sse2_storeq_rex64"
-  [(set (match_operand:DI 0 "nonimmediate_operand" "=mx,r,r")
+  [(set (match_operand:DI 0 "nonimmediate_operand" "=mx,*r,r")
        (vec_select:DI
          (match_operand:V2DI 1 "nonimmediate_operand" "x,Yi,o")
          (parallel [(const_int 0)])))]
@@ -4940,10 +4940,10 @@
    (set_attr "mode" "TI,V4SF,V2SF")])

 (define_insn "vec_concatv2di"
-  [(set (match_operand:V2DI 0 "register_operand"     "=Y2,?Y2,Y2,x,x,x")
+  [(set (match_operand:V2DI 0 "register_operand"     "=Y2 ,?Y2,Y2,x,x,x")
        (vec_concat:V2DI
-         (match_operand:DI 1 "nonimmediate_operand" "  m,*y ,0 ,0,0,m")
-         (match_operand:DI 2 "vector_move_operand"  "  C,  C,Y2,x,m,0")))]
+         (match_operand:DI 1 "nonimmediate_operand" " mY2,*y ,0 ,0,0,m")
+         (match_operand:DI 2 "vector_move_operand"  " C  ,  C,Y2,x,m,0")))]
   "!TARGET_64BIT && TARGET_SSE"
   "@
    movq\t{%1, %0|%0, %1}
@@ -4956,10 +4956,10 @@
    (set_attr "mode" "TI,TI,TI,V4SF,V2SF,V2SF")])

 (define_insn "*vec_concatv2di_rex64_sse4_1"
-  [(set (match_operand:V2DI 0 "register_operand"     "=x,x,Yi,!x,x,x,x,x")
+  [(set (match_operand:V2DI 0 "register_operand"     "=x ,x ,Yi,!x,x,x,x,x")
        (vec_concat:V2DI
-         (match_operand:DI 1 "nonimmediate_operand" " 0,m,r ,*y,0,0,0,m")
-         (match_operand:DI 2 "vector_move_operand"  "rm,C,C ,C ,x,x,m,0")))]
+         (match_operand:DI 1 "nonimmediate_operand" " 0 ,mx,r ,*y,0,0,0,m")
+         (match_operand:DI 2 "vector_move_operand"  " rm,C ,C ,C ,x,x,m,0")))]
   "TARGET_64BIT && TARGET_SSE4_1"
   "@
    pinsrq\t{$0x1, %2, %0|%0, %2, 0x1}
@@ -4975,10 +4975,10 @@
    (set_attr "mode" "TI,TI,TI,TI,TI,V4SF,V2SF,V2SF")])

 (define_insn "*vec_concatv2di_rex64_sse"
-  [(set (match_operand:V2DI 0 "register_operand"     "=Y2,Yi,!Y2,Y2,x,x,x")
+  [(set (match_operand:V2DI 0 "register_operand"     "=Y2 ,Yi,!Y2,Y2,x,x,x")
        (vec_concat:V2DI
-         (match_operand:DI 1 "nonimmediate_operand" "  m,r ,*y ,0 ,0,0,m")
-         (match_operand:DI 2 "vector_move_operand"  "  C,C ,C  ,Y2,x,m,0")))]
+         (match_operand:DI 1 "nonimmediate_operand" " mY2,r ,*y ,0 ,0,0,m")
+         (match_operand:DI 2 "vector_move_operand"  " C  ,C ,C  ,Y2,x,m,0")))]
   "TARGET_64BIT && TARGET_SSE"
   "@
    movq\t{%1, %0|%0, %1}


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36992


  parent reply	other threads:[~2008-08-02 15:08 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-01  3:30 [Bug target/36992] New: " hjl dot tools at gmail dot com
2008-08-01 11:59 ` [Bug target/36992] " rguenth at gcc dot gnu dot org
2008-08-01 12:05 ` rguenth at gcc dot gnu dot org
2008-08-01 12:08 ` rguenth at gcc dot gnu dot org
2008-08-01 12:54 ` hjl dot tools at gmail dot com
2008-08-01 12:57 ` hjl dot tools at gmail dot com
2008-08-01 13:22 ` rguenth at gcc dot gnu dot org
2008-08-01 13:27 ` hjl dot tools at gmail dot com
2008-08-01 19:34 ` ubizjak at gmail dot com
2008-08-02 13:10 ` ubizjak at gmail dot com
2008-08-02 13:11 ` ubizjak at gmail dot com
2008-08-02 13:23 ` ubizjak at gmail dot com
2008-08-02 15:08 ` ubizjak at gmail dot com [this message]
2008-08-02 15:20 ` hjl dot tools at gmail dot com
2008-08-02 16:03 ` ubizjak at gmail dot com
2008-08-02 18:45 ` ubizjak at gmail dot com
2008-08-03  6:15 ` uros at gcc dot gnu dot org
2008-08-03  6:50 ` ubizjak at gmail dot com
2008-08-05 14:20 ` hjl dot tools at gmail dot com
2008-08-05 17:35 ` hjl dot tools at gmail dot com
2008-08-05 17:42 ` hjl at gcc dot gnu dot org
2008-08-07 13:18 ` hjl at gcc dot gnu dot org
2008-08-07 13:19 ` hjl dot tools at gmail dot com

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080802150713.15778.qmail@sourceware.org \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).