public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "olegendo at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/65151] [SH][4.9 Regression] Internal compiler error when trying to build libav 11.2 on sh4
Date: Sat, 21 Feb 2015 23:09:00 -0000	[thread overview]
Message-ID: <bug-65151-4-T65kgIwShg@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-65151-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65151

--- Comment #6 from Oleg Endo <olegendo at gcc dot gnu.org> ---
(In reply to Oleg Endo from comment #5)
> The problem is the following insn:
> 
> (insn 45 11 12 2 (set (reg:HI 168 [ x ])
>         (subreg/s/u:HI (reg:SI 147 t) 0)) cchMsw9Z.out:9 -1
>      (expr_list:REG_DEAD (reg:SI 147 t)
>         (nil)))
> 
> which is not in sh.md.
> The insn is created by the asmcons pass.

More precisely, it's 'emit_move_insn' in gcc/function.c in function
match_asm_constraints_1 at line 7152.
BTW, the test case from attachment 34825 also fails at -O1, -O2 and -Os.


On current trunk (GCC 5), the problem doesn't happen due to the treg_set_expr
stuff that has been recently added, it seems.

After combine, the insns are:

(insn 11 8 12 2 (parallel [
            (set (reg/v:SI 163 [ x ])
                (eq:SI (reg:SI 6 r6 [ bits_per_component ])
                    (const_int 10 [0xa])))
            (clobber (reg:SI 147 t))
        ]) 410 {any_treg_expr_to_reg}
     (expr_list:REG_UNUSED (reg:SI 147 t)
        (expr_list:REG_DEAD (reg:SI 6 r6 [ bits_per_component ])
            (nil))))
(insn 12 11 13 2 (set (reg:HI 170 [ x ])
        (asm_operands:HI ("swap.b %0,%0") ("=r") 0 [
                (subreg/s/v:HI (reg/v:SI 163 [ x ]) 0)
            ]
             [
                (asm_input:HI ("0") cchMsw9Z.out:8)
            ]
             [] cchMsw9Z.out:8)) cchMsw9Z.out:8 -1
     (expr_list:REG_DEAD (reg/v:SI 163 [ x ])
        (nil)))

Which is then converted by the treg_set_expr splitter code during the split1
pass into:

(insn 52 8 53 2 (set (reg:SI 147 t)
        (eq:SI (reg:SI 6 r6 [ bits_per_component ])
            (const_int 10 [0xa]))) -1
     (nil))
(insn 53 52 12 2 (set (reg/v:SI 163 [ x ])
        (reg:SI 147 t)) -1
     (expr_list:REG_UNUSED (reg:SI 147 t)
        (nil)))
(insn 12 53 13 2 (set (reg:HI 170 [ x ])
        (asm_operands:HI ("swap.b %0,%0") ("=r") 0 [
                (subreg/s/v:HI (reg/v:SI 163 [ x ]) 0)
            ]
             [
                (asm_input:HI ("0") cchMsw9Z.out:8)
            ]
             [] cchMsw9Z.out:8)) cchMsw9Z.out:8 -1
     (expr_list:REG_DEAD (reg/v:SI 163 [ x ])
        (nil)))

In asmcons, emit_move_insn then adds the following insn:

(insn 58 53 12 2 (set (reg:HI 170 [ x ])
        (subreg/s/v:HI (reg/v:SI 163 [ x ]) 0)) cchMsw9Z.out:8 -1
     (nil))

from there on everything works out.


  parent reply	other threads:[~2015-02-21 21:58 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-21  4:48 [Bug c/65151] New: " glaubitz at physik dot fu-berlin.de
2015-02-21 13:29 ` [Bug target/65151] " olegendo at gcc dot gnu.org
2015-02-21 14:16 ` glaubitz at physik dot fu-berlin.de
2015-02-21 14:47 ` [Bug target/65151] [SH][4.9 Regression] " olegendo at gcc dot gnu.org
2015-02-21 21:29 ` olegendo at gcc dot gnu.org
2015-02-21 23:09 ` olegendo at gcc dot gnu.org [this message]
2015-02-21 23:26 ` olegendo at gcc dot gnu.org
2015-02-22 14:17 ` olegendo at gcc dot gnu.org
2015-02-23  0:00 ` kkojima at gcc dot gnu.org
2015-02-23 11:07 ` rguenth at gcc dot gnu.org
2015-06-26 19:59 ` jakub at gcc dot gnu.org
2015-06-26 20:30 ` jakub at gcc dot gnu.org
2015-08-08 14:54 ` thomas.petazzoni@free-electrons.com
2015-08-08 15:09 ` glaubitz at physik dot fu-berlin.de
2015-08-08 15:24 ` thomas.petazzoni@free-electrons.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-65151-4-T65kgIwShg@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).