public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "krebbel at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/66306] New: ICE in reload Date: Wed, 27 May 2015 12:17:00 -0000 [thread overview] Message-ID: <bug-66306-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66306 Bug ID: 66306 Summary: ICE in reload Product: gcc Version: 4.8.5 Status: UNCONFIRMED Severity: major Priority: P3 Component: rtl-optimization Assignee: unassigned at gcc dot gnu.org Reporter: krebbel at gcc dot gnu.org Target Milestone: --- Created attachment 35635 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35635&action=edit Reduced testcase cc1plus -O1 t.c ... unsigned int linemap_position_for_loc_and_offset(unsigned int, unsigned int) t.c: In function ‘unsigned int linemap_position_for_loc_and_offset(unsigned int, unsigned int)’: t.c:20:1: internal compiler error: in subst_reloads, at reload.c:6308 } ... t.c.193r.ira: (insn 15 14 16 2 (parallel [ (set (reg:CCL1 33 %cc) (compare:CCL1 (plus:SI (reg:SI 46 [ D.1846 ]) (mem/j:SI (plus:DI (reg/f:DI 44 [ map.0 ]) (const_int 4 [0x4])) [0 map.0_1->ordinary+0 S4 A32])) (reg:SI 46 [ D.1846 ]))) (clobber (scratch:SI)) ]) t.c:15 276 {*addsi3_carry1_cconly} (expr_list:REG_DEAD (reg/f:DI 44 [ map.0 ]) (nil))) Insn 15 is supposed to match the following pattern. Admittedly a nasty combination of a commutative constraint modifier, matching constraints and a scratch register: (define_insn "*add<mode>3_carry1_cconly" [(set (reg CC_REGNUM) (compare (plus:GPR (match_operand:GPR 1 "nonimmediate_operand" "%0,d,0,0") (match_operand:GPR 2 "general_operand" "d,d,R,T")) (match_dup 1))) (clobber (match_scratch:GPR 0 "=d,d,d,d"))] "s390_match_ccmode (insn, CCL1mode)" "@ al<g>r\t%0,%2 al<g>rk\t%0,%1,%2 al<g>\t%0,%2 al<y>\t%0,%2" [(set_attr "op_type" "RR<E>,RRF,RX<Y>,RXY") (set_attr "cpu_facility" "*,z196,*,*") (set_attr "z10prop" "z10_super_E1,*,z10_super_E1,z10_super_E1")]) Reload ends up picking alternative 0 with swapped operands 1 and 2. Unfortunately the reload does not get a reload register assigned and therefore dies with the ICE. Reloads for insn # 15 Reload 0: reload_in (SI) = (mem/j:SI (plus:DI (reg/f:DI 1 %r1 [orig:44 map.0 ] [44]) (const_int 4 [0x4])) [0 map.0_1->ordinary+0 S4 A32]) reload_out (SI) = (scratch:SI) GENERAL_REGS, RELOAD_OTHER (opnum = 0) reload_in_reg: (mem/j:SI (plus:DI (reg/f:DI 1 %r1 [orig:44 map.0 ] [44]) (const_int 4 [0x4])) [0 map.0_1->ordinary+0 S4 A32]) reload_out_reg: (scratch:SI) Regression hunt returns r186861 as the culprit (unfortunately one of my patches :(. However, the patch only seems to reveal the problem since it changes which alternative gets chosen in that example. Even with the patch reverted the same error appears when disabling/removing the other alternatives manually. E.g. by limiting them to higher CPU levels: diff --git a/gcc/config/s390/s390.md b/gcc/config/s390/s390.md index a875eec..71b2e57 100644 --- a/gcc/config/s390/s390.md +++ b/gcc/config/s390/s390.md @@ -4592,7 +4592,7 @@ al<g>\t%0,%2 al<y>\t%0,%2" [(set_attr "op_type" "RR<E>,RRF,RX<Y>,RXY") - (set_attr "cpu_facility" "*,z196,*,*") + (set_attr "cpu_facility" "*,z196,z196,z196") (set_attr "z10prop" "z10_super_E1,*,z10_super_E1,z10_super_E1")]) ; alr, alfi, slfi, al, aly, algr, algfi, slgfi, alg, alsi, algsi, alrk, algrk, alhsik, alghsik >From gcc-bugs-return-487386-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed May 27 12:18:52 2015 Return-Path: <gcc-bugs-return-487386-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org> Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 75706 invoked by alias); 27 May 2015 12:18:51 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: <gcc-bugs.gcc.gnu.org> List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/> List-Post: <mailto:gcc-bugs@gcc.gnu.org> List-Help: <mailto:gcc-bugs-help@gcc.gnu.org> Sender: gcc-bugs-owner@gcc.gnu.org Delivered-To: mailing list gcc-bugs@gcc.gnu.org Received: (qmail 71259 invoked by uid 48); 27 May 2015 12:18:47 -0000 From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/66304] Can't bootstrap on x86_64-linux-gnu with gcc 4.3.4 Date: Wed, 27 May 2015 12:18:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 6.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: 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: version Message-ID: <bug-66304-4-rm6ub4Yn6N@http.gcc.gnu.org/bugzilla/> In-Reply-To: <bug-66304-4@http.gcc.gnu.org/bugzilla/> References: <bug-66304-4@http.gcc.gnu.org/bugzilla/> 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: 2015-05/txt/msg02226.txt.bz2 Content-length: 409 https://gcc.gnu.org/bugzilla/show_bug.cgi?idf304 Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|5.1.0 |6.0 --- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> --- I suppose you are reporting this against trunk.
next reply other threads:[~2015-05-27 12:17 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2015-05-27 12:17 krebbel at gcc dot gnu.org [this message] 2015-06-24 6:51 ` [Bug rtl-optimization/66306] " krebbel at gcc dot gnu.org 2015-10-09 8:14 ` krebbel at gcc dot gnu.org 2015-10-09 8:14 ` krebbel 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-66306-4@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: linkBe 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).