public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/59803] New: [4.8 Regression] s390x -march=z10 reload ICE
@ 2014-01-14 11:38 jakub at gcc dot gnu.org
  2014-01-14 11:38 ` [Bug target/59803] " jakub at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-01-14 11:38 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 59803
           Summary: [4.8 Regression] s390x -march=z10 reload ICE
           Product: gcc
           Version: 4.8.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jakub at gcc dot gnu.org

extern void baz (void) __attribute__ ((__noreturn__));
struct A { int g, h; };
extern struct A a;
struct B { unsigned char i, j, k, l, m; };
int c, d, e;
static int f;

void
foo (void)
{
  f = 1;
}

void
bar (struct B *x)
{
  x->i = e;
  x->k = c;
  x->l = d;
  x->j = a.h;
  x->m = f;
  if (x->i != e) baz ();
  if (x->k != c) baz ();
  if (x->j != a.h) baz ();
}

ICEs with -O2 -march=z10 on 4.8 branch (verified with x86_64-linux ->
s390x-linux cross at r206599).  Works in 4.6 and works on the trunk, though it
is unclear if it just isn't latent.

Before reload we have:
(insn 10 9 11 2 (set (reg:SI 58 [ d ])
        (mem/c:SI (symbol_ref:DI ("d")  <var_decl 0x7f11a63617b8 d>) [2 d+0 S4
A32])) rh1052372.ii:19 67 {*movsi_zarch}
     (expr_list:REG_EQUIV (mem/c:SI (symbol_ref:DI ("d")  <var_decl
0x7f11a63617b8 d>) [2 d+0 S4 A32])
        (nil)))
(insn 11 10 13 2 (set (mem:QI (plus:DI (reg/v/f:DI 57 [ x ])
                (const_int 3 [0x3])) [0 x_4(D)->l+0 S1 A8])
        (subreg:QI (reg:SI 58 [ d ]) 3)) rh1052372.ii:19 74 {*movqi}
     (expr_list:REG_DEAD (reg:SI 58 [ d ])
        (nil)))
and the ICE is about unrecognized instruction:
(insn 61 10 11 2 (set (reg:DI 12 %r12)
        (const:DI (plus:DI (symbol_ref:DI ("d") <var_decl 0x7fbc425267b8 d>)
                (const_int 3 [0x3])))) rh1052372.ii:19 -1
     (nil))
If I look at trunk dumps, it seems the difference there is already at expansion
time, while on the trunk *.expand has separate insns to set (symbol_ref:DI
("d")
to a pseudo and load (mem:SI (that pseudo)), 4.8 branch uses movsi_zarch insn
which is load from (mem:SI (symbol_ref:DI ("d"))).  Then, at combine time
trunk combines the store with the load (and not symbol_ref larl), while 4.8
fails to combine the store with the load because I suppose lowest bit in larl
loaded value can't be set?


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

* [Bug target/59803] [4.8 Regression] s390x -march=z10 reload ICE
  2014-01-14 11:38 [Bug target/59803] New: [4.8 Regression] s390x -march=z10 reload ICE jakub at gcc dot gnu.org
@ 2014-01-14 11:38 ` jakub at gcc dot gnu.org
  2014-01-14 12:55 ` krebbel at gcc dot gnu.org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-01-14 11:38 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |krebbel at gcc dot gnu.org
   Target Milestone|---                         |4.8.3


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

* [Bug target/59803] [4.8 Regression] s390x -march=z10 reload ICE
  2014-01-14 11:38 [Bug target/59803] New: [4.8 Regression] s390x -march=z10 reload ICE jakub at gcc dot gnu.org
  2014-01-14 11:38 ` [Bug target/59803] " jakub at gcc dot gnu.org
@ 2014-01-14 12:55 ` krebbel at gcc dot gnu.org
  2014-01-14 17:00 ` krebbel at gcc dot gnu.org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: krebbel at gcc dot gnu.org @ 2014-01-14 12:55 UTC (permalink / raw)
  To: gcc-bugs

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

Andreas Krebbel <krebbel at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2014-01-14
           Assignee|unassigned at gcc dot gnu.org      |krebbel at gcc dot gnu.org
     Ever confirmed|0                           |1

--- Comment #1 from Andreas Krebbel <krebbel at gcc dot gnu.org> ---
There is a secondary reload which is supposed to handle that case. I'll try to
figure out what went wrong here.

Due to LRA being enabled by default on S/390 the situation on trunk is probably
not comparable.


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

* [Bug target/59803] [4.8 Regression] s390x -march=z10 reload ICE
  2014-01-14 11:38 [Bug target/59803] New: [4.8 Regression] s390x -march=z10 reload ICE jakub at gcc dot gnu.org
  2014-01-14 11:38 ` [Bug target/59803] " jakub at gcc dot gnu.org
  2014-01-14 12:55 ` krebbel at gcc dot gnu.org
@ 2014-01-14 17:00 ` krebbel at gcc dot gnu.org
  2014-01-15  9:39 ` jakub at gcc dot gnu.org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: krebbel at gcc dot gnu.org @ 2014-01-14 17:00 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Andreas Krebbel <krebbel at gcc dot gnu.org> ---
Created attachment 31832
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=31832&action=edit
Experimental fix

This patch fixes the problem. I'll post/commit it when it passed regtesting.


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

* [Bug target/59803] [4.8 Regression] s390x -march=z10 reload ICE
  2014-01-14 11:38 [Bug target/59803] New: [4.8 Regression] s390x -march=z10 reload ICE jakub at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2014-01-14 17:00 ` krebbel at gcc dot gnu.org
@ 2014-01-15  9:39 ` jakub at gcc dot gnu.org
  2014-01-15  9:41 ` jakub at gcc dot gnu.org
  2014-01-15  9:41 ` jakub at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-01-15  9:39 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Wed Jan 15 09:39:11 2014
New Revision: 206625

URL: http://gcc.gnu.org/viewcvs?rev=206625&root=gcc&view=rev
Log:
Add
PR target/59803
reference to ChangeLog entries.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/testsuite/ChangeLog


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

* [Bug target/59803] [4.8 Regression] s390x -march=z10 reload ICE
  2014-01-14 11:38 [Bug target/59803] New: [4.8 Regression] s390x -march=z10 reload ICE jakub at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2014-01-15  9:41 ` jakub at gcc dot gnu.org
@ 2014-01-15  9:41 ` jakub at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-01-15  9:41 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Wed Jan 15 09:40:25 2014
New Revision: 206626

URL: http://gcc.gnu.org/viewcvs?rev=206626&root=gcc&view=rev
Log:
Add
PR target/59803
to ChangeLog entries.

Modified:
    branches/gcc-4_8-branch/gcc/ChangeLog
    branches/gcc-4_8-branch/gcc/testsuite/ChangeLog


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

* [Bug target/59803] [4.8 Regression] s390x -march=z10 reload ICE
  2014-01-14 11:38 [Bug target/59803] New: [4.8 Regression] s390x -march=z10 reload ICE jakub at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2014-01-15  9:39 ` jakub at gcc dot gnu.org
@ 2014-01-15  9:41 ` jakub at gcc dot gnu.org
  2014-01-15  9:41 ` jakub at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-01-15  9:41 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: krebbel
Date: Wed Jan 15 08:36:44 2014
New Revision: 206623

URL: http://gcc.gnu.org/viewcvs?rev=206623&root=gcc&view=rev
Log:
2014-01-15  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>

    * config/s390/s390.c (s390_preferred_reload_class): Don't return
    ADDR_REGS for invalid symrefs in non-PIC code.

2014-01-15  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>

    * gcc.c-torture/compile/pr59803.c: New testcase.



Added:
    trunk/gcc/testsuite/gcc.c-torture/compile/pr59803.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/s390/s390.c
    trunk/gcc/testsuite/ChangeLog

Author: krebbel
Date: Wed Jan 15 08:34:46 2014
New Revision: 206622

URL: http://gcc.gnu.org/viewcvs?rev=206622&root=gcc&view=rev
Log:
2014-01-15  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>

    * config/s390/s390.c (s390_preferred_reload_class): Don't return
    ADDR_REGS for invalid symrefs in non-PIC code.

2014-01-15  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>

    * gcc.c-torture/compile/pr59803.c: New testcase.



Added:
    branches/gcc-4_8-branch/gcc/testsuite/gcc.c-torture/compile/pr59803.c
Modified:
    branches/gcc-4_8-branch/gcc/ChangeLog
    branches/gcc-4_8-branch/gcc/config/s390/s390.c
    branches/gcc-4_8-branch/gcc/testsuite/ChangeLog


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

end of thread, other threads:[~2014-01-15  9:41 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-14 11:38 [Bug target/59803] New: [4.8 Regression] s390x -march=z10 reload ICE jakub at gcc dot gnu.org
2014-01-14 11:38 ` [Bug target/59803] " jakub at gcc dot gnu.org
2014-01-14 12:55 ` krebbel at gcc dot gnu.org
2014-01-14 17:00 ` krebbel at gcc dot gnu.org
2014-01-15  9:39 ` jakub at gcc dot gnu.org
2014-01-15  9:41 ` jakub at gcc dot gnu.org
2014-01-15  9:41 ` 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).