public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug rtl-optimization/55686] [4.8 Regression] ICE in assign_by_spills, at lra-assigns.c:1244
Date: Fri, 14 Dec 2012 16:34:00 -0000	[thread overview]
Message-ID: <bug-55686-4-vXAr7Qkgqd@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-55686-4@http.gcc.gnu.org/bugzilla/>


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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |uros at gcc dot gnu.org

--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-12-14 16:34:24 UTC ---
The problem here are the local register asm vars, we have tests like
!fixed_regs[DI_REG] all around the stos/etc. code, but that catches just global
register asm vars, not local ones.  Perhaps we should gather during expansion
time or so what local register asm vars are being used in the current function,
and use that along with the global vars tests.

In this testcase it actually isn't a memset/memcpy, but combine combining:
(insn 50 49 51 6 (parallel [
            (set (reg/v/f:DI 72 [ d ])
                (plus:DI (reg/v/f:DI 72 [ d ])
                    (const_int 8 [0x8])))
            (clobber (reg:CC 17 flags))
        ]) pr55686.c:10 272 {*adddi_1}
     (expr_list:REG_UNUSED (reg:CC 17 flags)
        (nil)))
...
(insn 52 51 53 6 (set (mem:DI (plus:DI (reg/v/f:DI 72 [ d ])
                (const_int -8 [0xfffffffffffffff8])) [4 MEM[base: d_10, offset:
-8B]+0 S8 A64])
        (reg:DI 73 [ D.1766 ])) pr55686.c:10 87 {*movdi_internal_rex64}
     (expr_list:REG_DEAD (reg:DI 73 [ D.1766 ])
        (nil)))
into:
(note 50 49 51 6 NOTE_INSN_DELETED)
...
(insn 52 51 53 6 (parallel [
            (set (mem:DI (reg/v/f:DI 72 [ d ]) [4 MEM[base: d_10, offset:
-8B]+0 S8 A64])
                (reg:DI 73 [ D.1766 ]))
            (set (reg/v/f:DI 72 [ d ])
                (plus:DI (reg/v/f:DI 72 [ d ])
                    (const_int 8 [0x8])))
        ]) pr55686.c:10 914 {*strsetdi_rex_1}
     (expr_list:REG_DEAD (reg:DI 73 [ D.1766 ])
        (nil)))
I'd say this combining is always a bad idea, there is just a single register
that can be used for this, so merging it into stosl increases the register
pressure.
Not sure if we shouldn't reject strset* in the legitimate combine insn
targhook, or modify those patterns to contain some UNSPEC somewhere so that
combine just wouldn't match them, or similar.  That said, local register asm
("edi") etc. might still fail with aggregate copies (or
memset/memcpy/strlen/etc. calls) if expanded inline.


  parent reply	other threads:[~2012-12-14 16:34 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-14  9:25 [Bug rtl-optimization/55686] New: " rguenth at gcc dot gnu.org
2012-12-14  9:25 ` [Bug rtl-optimization/55686] " rguenth at gcc dot gnu.org
2012-12-14 10:03 ` rguenth at gcc dot gnu.org
2012-12-14 11:16 ` mpolacek at gcc dot gnu.org
2012-12-14 11:26 ` jakub at gcc dot gnu.org
2012-12-14 11:27 ` jakub at gcc dot gnu.org
2012-12-14 15:13 ` vmakarov at gcc dot gnu.org
2012-12-14 16:34 ` jakub at gcc dot gnu.org [this message]
2012-12-17 15:41 ` steven at gcc dot gnu.org
2012-12-19 15:29 ` rguenth at gcc dot gnu.org
2012-12-19 15:32 ` jakub at gcc dot gnu.org
2012-12-21 13:48 ` hubicka at ucw dot cz
2013-01-07 15:31 ` rguenth at gcc dot gnu.org
2013-01-22  9:20 ` jakub at gcc dot gnu.org
2013-01-22 16:42 ` jakub at gcc dot gnu.org
2013-01-22 17:05 ` jakub at gcc dot gnu.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=bug-55686-4-vXAr7Qkgqd@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).