From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16831 invoked by alias); 14 Jan 2014 11:38:10 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 16802 invoked by uid 48); 14 Jan 2014 11:38:07 -0000 From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/59803] New: [4.8 Regression] s390x -march=z10 reload ICE Date: Tue, 14 Jan 2014 11:38:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 4.8.2 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-01/txt/msg01448.txt.bz2 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") ) [2 d+0 S4 A32])) rh1052372.ii:19 67 {*movsi_zarch} (expr_list:REG_EQUIV (mem/c:SI (symbol_ref:DI ("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") ) (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?