public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/33673] New: ICE in verify_flow_info, missing barrier, when multiple tree opts disabled
@ 2007-10-06 1:21 janis at gcc dot gnu dot org
2007-10-06 1:23 ` [Bug tree-optimization/33673] " janis at gcc dot gnu dot org
` (12 more replies)
0 siblings, 13 replies; 14+ messages in thread
From: janis at gcc dot gnu dot org @ 2007-10-06 1:21 UTC (permalink / raw)
To: gcc-bugs
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1518 bytes --]
Benchmark 176.gcc from SPEC CPU2000 fails with an ICE in verify_flow_info and a
message about a missing barrier when compiled on powerpc-linux with "-Os
-fno-forward-propagate -fno-guess-branch-probability -fno-move-loop-invariants
-fno-tree-dominator-opts -fno-tree-loop-optimize". It's an odd set of options
but the failure probably demonstrates some sort of dependency between the
optimizations. All of the options are documented, none as experimental.
A minimized test case (I'll attach it) fails with these options for a cross cc1
for any of power*-*-*, s390*-linux, cris-elf, frv-elf, or m32c-elf with the
output:
bug11.c: In function find_reg:
bug11.c:32: error: missing barrier after block 4
bug11.c:32: internal compiler error: verify_flow_info failed
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
The failure starts with this patch:
http://gcc.gnu.org/viewcvs?view=rev&rev=124786
r124786 | rakdver | 2007-05-17 08:10:24 +0000 (Thu, 17 May 2007)
--
Summary: ICE in verify_flow_info, missing barrier, when multiple
tree opts disabled
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: tree-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: janis at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33673
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug tree-optimization/33673] ICE in verify_flow_info, missing barrier, when multiple tree opts disabled
2007-10-06 1:21 [Bug tree-optimization/33673] New: ICE in verify_flow_info, missing barrier, when multiple tree opts disabled janis at gcc dot gnu dot org
@ 2007-10-06 1:23 ` janis at gcc dot gnu dot org
2007-10-06 1:31 ` [Bug rtl-optimization/33673] [4.3 Regression] " pinskia at gcc dot gnu dot org
` (11 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: janis at gcc dot gnu dot org @ 2007-10-06 1:23 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from janis at gcc dot gnu dot org 2007-10-06 01:23 -------
Created an attachment (id=14309)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=14309&action=view)
minimized testcase
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33673
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug rtl-optimization/33673] [4.3 Regression] ICE in verify_flow_info, missing barrier, when multiple tree opts disabled
2007-10-06 1:21 [Bug tree-optimization/33673] New: ICE in verify_flow_info, missing barrier, when multiple tree opts disabled janis at gcc dot gnu dot org
2007-10-06 1:23 ` [Bug tree-optimization/33673] " janis at gcc dot gnu dot org
@ 2007-10-06 1:31 ` pinskia at gcc dot gnu dot org
2007-10-06 12:36 ` steven at gcc dot gnu dot org
` (10 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-10-06 1:31 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from pinskia at gcc dot gnu dot org 2007-10-06 01:30 -------
Even though the patch was for Tree level, the patch exposed a latent bug in the
rtl optimizers (missing barrier after can only happen on the rtl level).
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |pinskia at gcc dot gnu dot
| |org
Component|tree-optimization |rtl-optimization
Keywords| |ice-on-valid-code
Summary|ICE in verify_flow_info, |[4.3 Regression] ICE in
|missing barrier, when |verify_flow_info, missing
|multiple tree opts disabled |barrier, when multiple tree
| |opts disabled
Target Milestone|--- |4.3.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33673
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug rtl-optimization/33673] [4.3 Regression] ICE in verify_flow_info, missing barrier, when multiple tree opts disabled
2007-10-06 1:21 [Bug tree-optimization/33673] New: ICE in verify_flow_info, missing barrier, when multiple tree opts disabled janis at gcc dot gnu dot org
2007-10-06 1:23 ` [Bug tree-optimization/33673] " janis at gcc dot gnu dot org
2007-10-06 1:31 ` [Bug rtl-optimization/33673] [4.3 Regression] " pinskia at gcc dot gnu dot org
@ 2007-10-06 12:36 ` steven at gcc dot gnu dot org
2007-10-10 18:14 ` mmitchel at gcc dot gnu dot org
` (9 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: steven at gcc dot gnu dot org @ 2007-10-06 12:36 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from steven at gcc dot gnu dot org 2007-10-06 12:36 -------
10 to 1 this is a problem with coming out of cfglayout mode somewhere.
--
steven at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |steven at gcc dot gnu dot
| |org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33673
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug rtl-optimization/33673] [4.3 Regression] ICE in verify_flow_info, missing barrier, when multiple tree opts disabled
2007-10-06 1:21 [Bug tree-optimization/33673] New: ICE in verify_flow_info, missing barrier, when multiple tree opts disabled janis at gcc dot gnu dot org
` (2 preceding siblings ...)
2007-10-06 12:36 ` steven at gcc dot gnu dot org
@ 2007-10-10 18:14 ` mmitchel at gcc dot gnu dot org
2007-10-11 12:53 ` jakub at gcc dot gnu dot org
` (8 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2007-10-10 18:14 UTC (permalink / raw)
To: gcc-bugs
--
mmitchel at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P1
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33673
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug rtl-optimization/33673] [4.3 Regression] ICE in verify_flow_info, missing barrier, when multiple tree opts disabled
2007-10-06 1:21 [Bug tree-optimization/33673] New: ICE in verify_flow_info, missing barrier, when multiple tree opts disabled janis at gcc dot gnu dot org
` (3 preceding siblings ...)
2007-10-10 18:14 ` mmitchel at gcc dot gnu dot org
@ 2007-10-11 12:53 ` jakub at gcc dot gnu dot org
2007-10-11 16:27 ` jakub at gcc dot gnu dot org
` (7 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: jakub at gcc dot gnu dot org @ 2007-10-11 12:53 UTC (permalink / raw)
To: gcc-bugs
--
jakub at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |jakub at gcc dot gnu dot org
|dot org |
Status|UNCONFIRMED |ASSIGNED
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2007-10-11 12:53:19
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33673
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug rtl-optimization/33673] [4.3 Regression] ICE in verify_flow_info, missing barrier, when multiple tree opts disabled
2007-10-06 1:21 [Bug tree-optimization/33673] New: ICE in verify_flow_info, missing barrier, when multiple tree opts disabled janis at gcc dot gnu dot org
` (4 preceding siblings ...)
2007-10-11 12:53 ` jakub at gcc dot gnu dot org
@ 2007-10-11 16:27 ` jakub at gcc dot gnu dot org
2007-10-11 18:53 ` steven at gcc dot gnu dot org
` (6 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: jakub at gcc dot gnu dot org @ 2007-10-11 16:27 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from jakub at gcc dot gnu dot org 2007-10-11 16:27 -------
If cprop_jump changes a conditional jump into unconditional, then it forgets
to add a BARRIER after it. When not in cfglayout mode that's enough, but
in cfglayout mode it is uglier, though I haven't found a cfg hook which would
do what cprop_jump needs.
--- gcc/gcse.c.jj 2007-10-03 21:33:54.000000000 +0200
+++ gcc/gcse.c 2007-10-11 18:13:45.000000000 +0200
@@ -2853,6 +2853,14 @@ cprop_jump (basic_block bb, rtx setcc, r
/* Remove REG_EQUAL note after simplification. */
if (note_src)
remove_note (jump, note);
+
+ if (any_uncondjump_p (jump)
+ || (returnjump_p (jump) && !any_condjump_p (jump)))
+ {
+ rtx barrier = emit_barrier_after (jump);
+ if (current_ir_type () == IR_RTL_CFGLAYOUT)
+ bb->il.rtl->footer = unlink_insn_chain (barrier, barrier);
+ }
}
#ifdef HAVE_cc0
is ugly, but fixes this bug.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33673
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug rtl-optimization/33673] [4.3 Regression] ICE in verify_flow_info, missing barrier, when multiple tree opts disabled
2007-10-06 1:21 [Bug tree-optimization/33673] New: ICE in verify_flow_info, missing barrier, when multiple tree opts disabled janis at gcc dot gnu dot org
` (5 preceding siblings ...)
2007-10-11 16:27 ` jakub at gcc dot gnu dot org
@ 2007-10-11 18:53 ` steven at gcc dot gnu dot org
2007-10-11 18:53 ` steven at gcc dot gnu dot org
` (5 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: steven at gcc dot gnu dot org @ 2007-10-11 18:53 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from steven at gcc dot gnu dot org 2007-10-11 18:53 -------
The patch from comment #4 is wrong and should not be applied.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33673
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug rtl-optimization/33673] [4.3 Regression] ICE in verify_flow_info, missing barrier, when multiple tree opts disabled
2007-10-06 1:21 [Bug tree-optimization/33673] New: ICE in verify_flow_info, missing barrier, when multiple tree opts disabled janis at gcc dot gnu dot org
` (6 preceding siblings ...)
2007-10-11 18:53 ` steven at gcc dot gnu dot org
@ 2007-10-11 18:53 ` steven at gcc dot gnu dot org
2007-10-11 19:29 ` jakub at gcc dot gnu dot org
` (4 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: steven at gcc dot gnu dot org @ 2007-10-11 18:53 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from steven at gcc dot gnu dot org 2007-10-11 18:52 -------
What do the edge flags look like after cprop changes the jump? EDGE_FALLTHRU
should be set.
Also, the unconditional JUMP_INSN should be removed. Unconditional jumps are
removed when going into cfglayout mode, and when a conditional jump is turned
into an unconditional jump, the whole JUMP_INSN can be removed.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33673
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug rtl-optimization/33673] [4.3 Regression] ICE in verify_flow_info, missing barrier, when multiple tree opts disabled
2007-10-06 1:21 [Bug tree-optimization/33673] New: ICE in verify_flow_info, missing barrier, when multiple tree opts disabled janis at gcc dot gnu dot org
` (7 preceding siblings ...)
2007-10-11 18:53 ` steven at gcc dot gnu dot org
@ 2007-10-11 19:29 ` jakub at gcc dot gnu dot org
2007-10-11 19:55 ` steven at gcc dot gnu dot org
` (3 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: jakub at gcc dot gnu dot org @ 2007-10-11 19:29 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from jakub at gcc dot gnu dot org 2007-10-11 19:29 -------
It calls purge_dead_edges after changing the jump, so if it changed that into
an unconditional jump, purge_dead_edges will purge the EDGE_FALLTHRU
edge and keep the other edge.
If cfglayout mode is supposed to avoid unconditional jumps, then that needs to
be changed, so that the old non-fallthrough edge becomes EDGE_FALLTHRU and old
EDGE_FALLTHRU is removed. I believe in other cases cprop_jump could e.g. only
simplify an conditional jump (then what it does ATM is probably ok) or could
e.g. change a conditional returnjump_p into unconditional one (how are those
supposed to be expressed in cfglayout mode)?
Anyway, it seems both pass_gcse and pass_bypass are both always in cfglayout
mode, so no conditionalization on current_ir_type () is needed.
--
jakub at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|jakub at gcc dot gnu dot org|unassigned at gcc dot gnu
| |dot org
Status|ASSIGNED |NEW
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33673
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug rtl-optimization/33673] [4.3 Regression] ICE in verify_flow_info, missing barrier, when multiple tree opts disabled
2007-10-06 1:21 [Bug tree-optimization/33673] New: ICE in verify_flow_info, missing barrier, when multiple tree opts disabled janis at gcc dot gnu dot org
` (8 preceding siblings ...)
2007-10-11 19:29 ` jakub at gcc dot gnu dot org
@ 2007-10-11 19:55 ` steven at gcc dot gnu dot org
2007-10-31 10:29 ` jakub at gcc dot gnu dot org
` (2 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: steven at gcc dot gnu dot org @ 2007-10-11 19:55 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from steven at gcc dot gnu dot org 2007-10-11 19:55 -------
Updating the CFG as suggested in comment #7 is the appropriate thing to do.
How about using delete_insn_and_edges() on the jump insn, and setting
EDGE_FALLTHRU on the remaining edge?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33673
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug rtl-optimization/33673] [4.3 Regression] ICE in verify_flow_info, missing barrier, when multiple tree opts disabled
2007-10-06 1:21 [Bug tree-optimization/33673] New: ICE in verify_flow_info, missing barrier, when multiple tree opts disabled janis at gcc dot gnu dot org
` (9 preceding siblings ...)
2007-10-11 19:55 ` steven at gcc dot gnu dot org
@ 2007-10-31 10:29 ` jakub at gcc dot gnu dot org
2007-11-01 8:48 ` jakub at gcc dot gnu dot org
2007-11-01 8:49 ` jakub at gcc dot gnu dot org
12 siblings, 0 replies; 14+ messages in thread
From: jakub at gcc dot gnu dot org @ 2007-10-31 10:29 UTC (permalink / raw)
To: gcc-bugs
--
jakub at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |jakub at gcc dot gnu dot org
|dot org |
URL| |http://gcc.gnu.org/ml/gcc-
| |patches/2007-
| |10/msg01845.html
Status|NEW |ASSIGNED
Last reconfirmed|2007-10-11 12:53:19 |2007-10-31 10:29:42
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33673
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug rtl-optimization/33673] [4.3 Regression] ICE in verify_flow_info, missing barrier, when multiple tree opts disabled
2007-10-06 1:21 [Bug tree-optimization/33673] New: ICE in verify_flow_info, missing barrier, when multiple tree opts disabled janis at gcc dot gnu dot org
` (10 preceding siblings ...)
2007-10-31 10:29 ` jakub at gcc dot gnu dot org
@ 2007-11-01 8:48 ` jakub at gcc dot gnu dot org
2007-11-01 8:49 ` jakub at gcc dot gnu dot org
12 siblings, 0 replies; 14+ messages in thread
From: jakub at gcc dot gnu dot org @ 2007-11-01 8:48 UTC (permalink / raw)
To: gcc-bugs
------- Comment #9 from jakub at gcc dot gnu dot org 2007-11-01 08:48 -------
Subject: Bug 33673
Author: jakub
Date: Thu Nov 1 08:48:05 2007
New Revision: 129819
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=129819
Log:
PR rtl-optimization/33673
* gcse.c (cprop_jump): If a conditional jump has been optimized
into unconditional jump, make the remaining normal edge fallthru
and delete the jump insn.
* gcc.dg/pr33673.c: New test.
Added:
trunk/gcc/testsuite/gcc.dg/pr33673.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/gcse.c
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33673
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug rtl-optimization/33673] [4.3 Regression] ICE in verify_flow_info, missing barrier, when multiple tree opts disabled
2007-10-06 1:21 [Bug tree-optimization/33673] New: ICE in verify_flow_info, missing barrier, when multiple tree opts disabled janis at gcc dot gnu dot org
` (11 preceding siblings ...)
2007-11-01 8:48 ` jakub at gcc dot gnu dot org
@ 2007-11-01 8:49 ` jakub at gcc dot gnu dot org
12 siblings, 0 replies; 14+ messages in thread
From: jakub at gcc dot gnu dot org @ 2007-11-01 8:49 UTC (permalink / raw)
To: gcc-bugs
------- Comment #10 from jakub at gcc dot gnu dot org 2007-11-01 08:49 -------
Fixed.
--
jakub at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33673
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2007-11-01 8:49 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-10-06 1:21 [Bug tree-optimization/33673] New: ICE in verify_flow_info, missing barrier, when multiple tree opts disabled janis at gcc dot gnu dot org
2007-10-06 1:23 ` [Bug tree-optimization/33673] " janis at gcc dot gnu dot org
2007-10-06 1:31 ` [Bug rtl-optimization/33673] [4.3 Regression] " pinskia at gcc dot gnu dot org
2007-10-06 12:36 ` steven at gcc dot gnu dot org
2007-10-10 18:14 ` mmitchel at gcc dot gnu dot org
2007-10-11 12:53 ` jakub at gcc dot gnu dot org
2007-10-11 16:27 ` jakub at gcc dot gnu dot org
2007-10-11 18:53 ` steven at gcc dot gnu dot org
2007-10-11 18:53 ` steven at gcc dot gnu dot org
2007-10-11 19:29 ` jakub at gcc dot gnu dot org
2007-10-11 19:55 ` steven at gcc dot gnu dot org
2007-10-31 10:29 ` jakub at gcc dot gnu dot org
2007-11-01 8:48 ` jakub at gcc dot gnu dot org
2007-11-01 8:49 ` jakub at gcc dot gnu dot 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).