public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/66306] New: ICE in reload
@ 2015-05-27 12:17 krebbel at gcc dot gnu.org
2015-06-24 6:51 ` [Bug rtl-optimization/66306] " krebbel at gcc dot gnu.org
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: krebbel at gcc dot gnu.org @ 2015-05-27 12:17 UTC (permalink / raw)
To: gcc-bugs
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.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug rtl-optimization/66306] ICE in reload
2015-05-27 12:17 [Bug rtl-optimization/66306] New: ICE in reload krebbel at gcc dot gnu.org
@ 2015-06-24 6:51 ` 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
2 siblings, 0 replies; 4+ messages in thread
From: krebbel at gcc dot gnu.org @ 2015-06-24 6:51 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66306
--- Comment #2 from Andreas Krebbel <krebbel at gcc dot gnu.org> ---
Author: krebbel
Date: Wed Jun 24 06:50:53 2015
New Revision: 224875
URL: https://gcc.gnu.org/viewcvs?rev=224875&root=gcc&view=rev
Log:
PR66306: Fix match_dups on swapped operands.
2015-06-24 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
PR rtl-optimization/66306
* reload.c (find_reloads): Swap the match_dup info for
commutative operands.
2015-06-24 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
PR rtl-optimization/66306
* gcc.target/s390/pr66306.c: New test.
Added:
trunk/gcc/testsuite/gcc.target/s390/pr66306.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/reload.c
trunk/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug rtl-optimization/66306] ICE in reload
2015-05-27 12:17 [Bug rtl-optimization/66306] New: ICE in reload krebbel at gcc dot gnu.org
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
2 siblings, 0 replies; 4+ messages in thread
From: krebbel at gcc dot gnu.org @ 2015-10-09 8:14 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66306
Andreas Krebbel <krebbel at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
--- Comment #3 from Andreas Krebbel <krebbel at gcc dot gnu.org> ---
Fixed.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug rtl-optimization/66306] ICE in reload
2015-05-27 12:17 [Bug rtl-optimization/66306] New: ICE in reload krebbel at gcc dot gnu.org
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
2 siblings, 0 replies; 4+ messages in thread
From: krebbel at gcc dot gnu.org @ 2015-10-09 8:14 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66306
Andreas Krebbel <krebbel at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |CLOSED
--- Comment #4 from Andreas Krebbel <krebbel at gcc dot gnu.org> ---
Closing
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-10-09 8:14 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-27 12:17 [Bug rtl-optimization/66306] New: ICE in reload krebbel at gcc dot gnu.org
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
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).