public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "hjl.tools at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/59458] New: alternative 13 in *movsf_internal is mishandled
Date: Tue, 10 Dec 2013 21:06:00 -0000	[thread overview]
Message-ID: <bug-59458-4@http.gcc.gnu.org/bugzilla/> (raw)

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

            Bug ID: 59458
           Summary: alternative 13 in *movsf_internal is mishandled
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: hjl.tools at gmail dot com
                CC: ubizjak at gmail dot com

We have

(define_insn "*movsf_internal"
  [(set (match_operand:SF 0 "nonimmediate_operand"
          "=Yf*f,m   ,Yf*f,?r ,?m,v,v,v,m,?r,?Yi,!*y,!*y,!m,!r ,!*Ym")
        (match_operand:SF 1 "general_operand"
          "Yf*fm,Yf*f,G   ,rmF,rF,C,v,m,v,Yj,r  ,*y ,m  ,*y,*Yn,r"))]

alternative 13 is MMXMOV instruction to store "*y" to "!m".  But
alternative 13 gets the default mode, SF.  But MMXMOV is

    case TYPE_MMXMOV:
      switch (get_attr_mode (insn))
        {
        case MODE_DI:
          return "movq\t{%1, %0|%0, %1}";
        case MODE_SI:
          return "movd\t{%1, %0|%0, %1}";

        default:
          gcc_unreachable ();
        }

MODE_SF gets gcc_unreachable.  This patch:

diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md
index 7138868..aa2664f 100644
--- a/gcc/config/i386/i386.md
+++ b/gcc/config/i386/i386.md
@@ -3126,7 +3140,7 @@
        (const_string "1")
        (const_string "*")))
    (set (attr "mode")
-        (cond [(eq_attr "alternative" "3,4,9,10,14,15")
+        (cond [(eq_attr "alternative" "3,4,9,10,13,14,15")
          (const_string "SI")
            (eq_attr "alternative" "11")
          (const_string "DI")

sets mode to SI for alternative 13.


             reply	other threads:[~2013-12-10 21:06 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-10 21:06 hjl.tools at gmail dot com [this message]
2013-12-10 23:21 ` [Bug target/59458] " hjl at gcc dot gnu.org
2013-12-10 23:29 ` hjl.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=bug-59458-4@http.gcc.gnu.org/bugzilla/ \
    --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).