public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "kkojima at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/31022] [4.1/4.2/4.3 Regression] [SH4] internal compiler error with inline
Date: Thu, 15 Mar 2007 13:17:00 -0000	[thread overview]
Message-ID: <20070315131657.28383.qmail@sourceware.org> (raw)
In-Reply-To: <bug-31022-1624@http.gcc.gnu.org/bugzilla/>



------- Comment #1 from kkojima at gcc dot gnu dot org  2007-03-15 13:16 -------
I've confirmed that the trunk and 4.2 compilers ice on the testcase
and 4.0 doesn't fail.  So this is a 4.1/4.2/4.3 regression.

In the problematic case, sh_adjust_cost takes SET_DEST (PATTERN (dep_insn))
where dep_insn is

(insn:HI 8 7 47 2 (parallel [
            (set (reg:SF 2 r2 [orig:160 num ] [160])
                (mem/c/i:SF (reg/f:SI 1 r1 [162]) [2 f+0 S4 A32]))
            (use (reg/v:PSI 151 ))
            (clobber (scratch:SI))
        ]) 202 {movsf_ie} (nil)
    (nil))

and calls reg_overlap_mentioned_p with it as the first argument.
We can't use SET_DEST for parallel patterns directly.  Now I'm
testing the patch below on the trunk.

--- ORIG/trunk/gcc/config/sh/sh.c       2007-03-10 16:04:12.000000000 +0900
+++ LOCAL/trunk/gcc/config/sh/sh.c      2007-03-15 08:43:32.000000000 +0900
@@ -8966,7 +8966,7 @@ sh_adjust_cost (rtx insn, rtx link ATTRI
             by 1 cycle.  */
          if (get_attr_type (insn) == TYPE_DYN_SHIFT
              && get_attr_any_int_load (dep_insn) == ANY_INT_LOAD_YES
-             && reg_overlap_mentioned_p (SET_DEST (PATTERN (dep_insn)),
+             && reg_overlap_mentioned_p (SET_DEST (dep_set),
                                          XEXP (SET_SRC (single_set (insn)),
                                                1)))
            cost++;


For the 4.1-branch, the patch will be

--- ORIG/gcc-4_1-branch/gcc/config/sh/sh.c      2006-10-23 20:35:45.000000000
+0900
+++ LOCAL/gcc-4_1-branch/gcc/config/sh/sh.c     2007-03-15 09:06:26.000000000
+0900
@@ -8477,7 +8477,7 @@ sh_adjust_cost (rtx insn, rtx link ATTRI
       else if (TARGET_SH4
               && get_attr_type (insn) == TYPE_DYN_SHIFT
               && get_attr_any_int_load (dep_insn) == ANY_INT_LOAD_YES
-              && reg_overlap_mentioned_p (SET_DEST (PATTERN (dep_insn)),
+              && reg_overlap_mentioned_p (SET_DEST (single_set (dep_insn)),
                                           XEXP (SET_SRC (single_set (insn)),
                                                 1)))
        cost++;


-- 

kkojima at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kkojima at gcc dot gnu dot
                   |                            |org
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
      Known to fail|                            |4.1.2 4.2.0 4.3.0
      Known to work|                            |4.0.4
   Last reconfirmed|0000-00-00 00:00:00         |2007-03-15 13:16:57
               date|                            |
            Summary|[SH4] internal compiler     |[4.1/4.2/4.3 Regression]
                   |error with inline           |[SH4] internal compiler
                   |                            |error with inline


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


  reply	other threads:[~2007-03-15 13:17 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-02  8:52 [Bug target/31022] New: " saito at densan dot co dot jp
2007-03-15 13:17 ` kkojima at gcc dot gnu dot org [this message]
2007-03-19  4:15 ` [Bug target/31022] [4.1/4.2/4.3 Regression] " kkojima at gcc dot gnu dot org
2007-04-28  4:19 ` kargl at gcc dot gnu dot org
2007-05-20 23:23 ` kkojima at gcc dot gnu dot org
2007-05-20 23:54 ` kkojima at gcc dot gnu dot org
2007-05-21  0:01 ` kkojima at gcc dot gnu dot org
2007-05-26  3:15 ` pinskia at gcc dot gnu dot org

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=20070315131657.28383.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).