public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/56484] New: ICE in assign_by_spills, at lra-assigns.c:1268
@ 2013-02-28 15:03 mgretton at gcc dot gnu.org
  2013-02-28 15:23 ` [Bug target/56484] " doko at gcc dot gnu.org
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: mgretton at gcc dot gnu.org @ 2013-02-28 15:03 UTC (permalink / raw)
  To: gcc-bugs


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

             Bug #: 56484
           Summary: ICE in assign_by_spills, at lra-assigns.c:1268
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: mgretton@gcc.gnu.org


Created attachment 29552
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=29552
Test case

The attached test case ICEs on trunk (svn revision: 196329) as follows:

$ x86_64-unknown-linux-gnu-gcc -O2 besttry.c
besttry.c: In function ‘output_spdif’:
besttry.c:26:1: internal compiler error: in assign_by_spills, at
lra-assigns.c:1268
 }
 ^
0x7f1cf8 assign_by_spills
    /work/sources/gcc-fsf/master/gcc/lra-assigns.c:1268
0x7f29b3 lra_assign()
    /work/sources/gcc-fsf/master/gcc/lra-assigns.c:1425
0x7eebe1 lra(_IO_FILE*)
    /work/sources/gcc-fsf/master/gcc/lra.c:2307
0x7b6e18 do_reload
    /work/sources/gcc-fsf/master/gcc/ira.c:4619
0x7b6e18 rest_of_handle_reload
    /work/sources/gcc-fsf/master/gcc/ira.c:4731
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.

Believe this is a target issue as the original test case does not trigger the
failure for arm-none-linux-gnueabihf


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug target/56484] ICE in assign_by_spills, at lra-assigns.c:1268
  2013-02-28 15:03 [Bug target/56484] New: ICE in assign_by_spills, at lra-assigns.c:1268 mgretton at gcc dot gnu.org
@ 2013-02-28 15:23 ` doko at gcc dot gnu.org
  2013-02-28 16:19 ` mgretton at gcc dot gnu.org
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: doko at gcc dot gnu.org @ 2013-02-28 15:23 UTC (permalink / raw)
  To: gcc-bugs


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

Matthias Klose <doko at gcc dot gnu.org> changed:

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

--- Comment #1 from Matthias Klose <doko at gcc dot gnu.org> 2013-02-28 15:22:58 UTC ---
I can't reproduce this with r196236


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug target/56484] ICE in assign_by_spills, at lra-assigns.c:1268
  2013-02-28 15:03 [Bug target/56484] New: ICE in assign_by_spills, at lra-assigns.c:1268 mgretton at gcc dot gnu.org
  2013-02-28 15:23 ` [Bug target/56484] " doko at gcc dot gnu.org
@ 2013-02-28 16:19 ` mgretton at gcc dot gnu.org
  2013-03-01  7:04 ` venkataramanan.kumar at amd dot com
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: mgretton at gcc dot gnu.org @ 2013-02-28 16:19 UTC (permalink / raw)
  To: gcc-bugs


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

mgretton at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Target|                            |x86_64-none-linux-gnu
               Host|                            |x86_64-none-linux-gnu

--- Comment #2 from mgretton at gcc dot gnu.org 2013-02-28 16:18:30 UTC ---
Forgot to add gcc -v output:
Using built-in specs.
COLLECT_GCC=/work/builds/gcc-fsf-master/tools/bin/x86_64-unknown-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/work/builds/gcc-fsf-master/tools/libexec/gcc/x86_64-unknown-linux-gnu/4.8.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: /work/sources/gcc-fsf/master/configure
--target=x86_64-unknown-linux-gnu --host=x86_64-unknown-linux-gnu
--build=x86_64-unknown-linux-gnu --prefix=/work/builds/gcc-fsf-master/tools
--enable-languages=c,c++,fortran
--with-ppl-include=/usr/include/x86_64-linux-gnu
Thread model: posix
gcc version 4.8.0 20130228 (experimental) (GCC)


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug target/56484] ICE in assign_by_spills, at lra-assigns.c:1268
  2013-02-28 15:03 [Bug target/56484] New: ICE in assign_by_spills, at lra-assigns.c:1268 mgretton at gcc dot gnu.org
  2013-02-28 15:23 ` [Bug target/56484] " doko at gcc dot gnu.org
  2013-02-28 16:19 ` mgretton at gcc dot gnu.org
@ 2013-03-01  7:04 ` venkataramanan.kumar at amd dot com
  2013-03-01  8:31 ` [Bug target/56484] [4.8 Regression] " jakub at gcc dot gnu.org
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: venkataramanan.kumar at amd dot com @ 2013-03-01  7:04 UTC (permalink / raw)
  To: gcc-bugs


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

Venkataramanan <venkataramanan.kumar at amd dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |venkataramanan.kumar at amd
                   |                            |dot com

--- Comment #3 from Venkataramanan <venkataramanan.kumar at amd dot com> 2013-03-01 07:04:28 UTC ---
(In reply to comment #1)
> I can't reproduce this with r196236

I tried with some old revisions I had on a SLES 11 SP1 machine.

I am getting this issue with r193549 at lra-assigns.c.
reload.c spill failure when I use 190150 (does not have LRA). This seems to be
a long known issue in trunk. 

I am triaging further


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug target/56484] [4.8 Regression] ICE in assign_by_spills, at lra-assigns.c:1268
  2013-02-28 15:03 [Bug target/56484] New: ICE in assign_by_spills, at lra-assigns.c:1268 mgretton at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2013-03-01  7:04 ` venkataramanan.kumar at amd dot com
@ 2013-03-01  8:31 ` jakub at gcc dot gnu.org
  2013-03-01  8:43 ` venkataramanan.kumar at amd dot com
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-03-01  8:31 UTC (permalink / raw)
  To: gcc-bugs


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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2013-03-01
                 CC|                            |jakub at gcc dot gnu.org,
                   |                            |uros at gcc dot gnu.org
   Target Milestone|---                         |4.8.0
            Summary|ICE in assign_by_spills, at |[4.8 Regression] ICE in
                   |lra-assigns.c:1268          |assign_by_spills, at
                   |                            |lra-assigns.c:1268
     Ever Confirmed|0                           |1

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-03-01 08:30:31 UTC ---
Started with http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=188526
but it was merely latent before that, so it isn't LRA bug, because it fails
with reload equally.
I think the problem is in combine, where we have:
ax = call ...
flags = r59 != 0
r60 = flags >= 0 ? ax : r59
r65 = buf
r68 = 768
rep stosd [r65 .. r65 + r68 - 4] = 0
r59 = r60

and the combiner combines the r60 = flags >= 0 ? ax : r59 instruction with
r59 = r60 into r59 = flags >= 0 ? ax : r59 instruction in the last spot, thus
extending the lifetime of the ax and flags hard registers across various other
instructions.


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug target/56484] [4.8 Regression] ICE in assign_by_spills, at lra-assigns.c:1268
  2013-02-28 15:03 [Bug target/56484] New: ICE in assign_by_spills, at lra-assigns.c:1268 mgretton at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2013-03-01  8:31 ` [Bug target/56484] [4.8 Regression] " jakub at gcc dot gnu.org
@ 2013-03-01  8:43 ` venkataramanan.kumar at amd dot com
  2013-03-01 18:06 ` ubizjak at gmail dot com
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: venkataramanan.kumar at amd dot com @ 2013-03-01  8:43 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #5 from Venkataramanan <venkataramanan.kumar at amd dot com> 2013-03-01 08:42:42 UTC ---
-fno-tree-coalesce-vars for workarround


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug target/56484] [4.8 Regression] ICE in assign_by_spills, at lra-assigns.c:1268
  2013-02-28 15:03 [Bug target/56484] New: ICE in assign_by_spills, at lra-assigns.c:1268 mgretton at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2013-03-01  8:43 ` venkataramanan.kumar at amd dot com
@ 2013-03-01 18:06 ` ubizjak at gmail dot com
  2013-03-05 11:06 ` jakub at gcc dot gnu.org
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: ubizjak at gmail dot com @ 2013-03-01 18:06 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #6 from Uros Bizjak <ubizjak at gmail dot com> 2013-03-01 18:06:28 UTC ---
(In reply to comment #4)

> and the combiner combines the r60 = flags >= 0 ? ax : r59 instruction with
> r59 = r60 into r59 = flags >= 0 ? ax : r59 instruction in the last spot, thus
> extending the lifetime of the ax and flags hard registers across various other
> instructions.

But AX is member of likely spilled class, so combine should take some more care
with this insn. Should we just prevent propagations of all insns that mention
likely spilled hard regs?


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug target/56484] [4.8 Regression] ICE in assign_by_spills, at lra-assigns.c:1268
  2013-02-28 15:03 [Bug target/56484] New: ICE in assign_by_spills, at lra-assigns.c:1268 mgretton at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2013-03-01 18:06 ` ubizjak at gmail dot com
@ 2013-03-05 11:06 ` jakub at gcc dot gnu.org
  2013-03-05 11:49 ` [Bug rtl-optimization/56484] " jakub at gcc dot gnu.org
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-03-05 11:06 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-03-05 11:06:26 UTC ---
Actually, looking more at this, I'd say combiner is innocent here, the problem
is earlier , during ce1 pass, which transforms:
   16: ax:SI=call [`output_play'] argc:0
      REG_DEAD di:DI
      REG_DEAD si:SI
   17: r60:SI=ax:SI
      REG_DEAD ax:SI
   18: flags:CCGOC=cmp(r59:SI,0)
   19: pc={(flags:CCGOC>=0)?L21:pc}
      REG_DEAD flags:CCGOC
      REG_BR_PROB 0x1c84
   20: NOTE_INSN_BASIC_BLOCK 4
    6: r60:SI=r59:SI
      REG_DEAD r59:SI
   21: L21:
   22: NOTE_INSN_BASIC_BLOCK 5
into:
   16: ax:SI=call [`output_play'] argc:0
      REG_DEAD di:DI
      REG_DEAD si:SI
   17: r60:SI=ax:SI
      REG_DEAD ax:SI
   18: flags:CCGOC=cmp(r59:SI,0)
   53: flags:CCGOC=cmp(r59:SI,0)
   54: r60:SI={(flags:CCGOC>=0)?ax:SI:r59:SI}
   22: NOTE_INSN_BASIC_BLOCK 4

i.e. does what combiner tries to avoid with hard registers.  I don't understand
why it can't use r60:SI instead of ax:SI.


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug rtl-optimization/56484] [4.8 Regression] ICE in assign_by_spills, at lra-assigns.c:1268
  2013-02-28 15:03 [Bug target/56484] New: ICE in assign_by_spills, at lra-assigns.c:1268 mgretton at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2013-03-05 11:06 ` jakub at gcc dot gnu.org
@ 2013-03-05 11:49 ` jakub at gcc dot gnu.org
  2013-03-05 22:26 ` jakub at gcc dot gnu.org
  2013-03-05 22:35 ` jakub at gcc dot gnu.org
  9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-03-05 11:49 UTC (permalink / raw)
  To: gcc-bugs


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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
         AssignedTo|unassigned at gcc dot       |jakub at gcc dot gnu.org
                   |gnu.org                     |

--- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-03-05 11:48:49 UTC ---
Created attachment 29583
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=29583
gcc48-pr56484.patch

Untested fix.


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug rtl-optimization/56484] [4.8 Regression] ICE in assign_by_spills, at lra-assigns.c:1268
  2013-02-28 15:03 [Bug target/56484] New: ICE in assign_by_spills, at lra-assigns.c:1268 mgretton at gcc dot gnu.org
                   ` (7 preceding siblings ...)
  2013-03-05 11:49 ` [Bug rtl-optimization/56484] " jakub at gcc dot gnu.org
@ 2013-03-05 22:26 ` jakub at gcc dot gnu.org
  2013-03-05 22:35 ` jakub at gcc dot gnu.org
  9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-03-05 22:26 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #9 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-03-05 22:25:50 UTC ---
Author: jakub
Date: Tue Mar  5 22:25:43 2013
New Revision: 196478

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=196478
Log:
    PR rtl-optimization/56484
    * ifcvt.c (noce_process_if_block): If else_bb is NULL, avoid extending
    lifetimes of hard registers on small register class machines.

Added:
    trunk/gcc/testsuite/gcc.c-torture/compile/pr56484.c
Modified:
    trunk/gcc/ifcvt.c


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug rtl-optimization/56484] [4.8 Regression] ICE in assign_by_spills, at lra-assigns.c:1268
  2013-02-28 15:03 [Bug target/56484] New: ICE in assign_by_spills, at lra-assigns.c:1268 mgretton at gcc dot gnu.org
                   ` (8 preceding siblings ...)
  2013-03-05 22:26 ` jakub at gcc dot gnu.org
@ 2013-03-05 22:35 ` jakub at gcc dot gnu.org
  9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-03-05 22:35 UTC (permalink / raw)
  To: gcc-bugs


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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED

--- Comment #10 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-03-05 22:34:19 UTC ---
Fixed.


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2013-03-05 22:35 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-28 15:03 [Bug target/56484] New: ICE in assign_by_spills, at lra-assigns.c:1268 mgretton at gcc dot gnu.org
2013-02-28 15:23 ` [Bug target/56484] " doko at gcc dot gnu.org
2013-02-28 16:19 ` mgretton at gcc dot gnu.org
2013-03-01  7:04 ` venkataramanan.kumar at amd dot com
2013-03-01  8:31 ` [Bug target/56484] [4.8 Regression] " jakub at gcc dot gnu.org
2013-03-01  8:43 ` venkataramanan.kumar at amd dot com
2013-03-01 18:06 ` ubizjak at gmail dot com
2013-03-05 11:06 ` jakub at gcc dot gnu.org
2013-03-05 11:49 ` [Bug rtl-optimization/56484] " jakub at gcc dot gnu.org
2013-03-05 22:26 ` jakub at gcc dot gnu.org
2013-03-05 22:35 ` jakub at gcc dot gnu.org

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