public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/43056] New: __builtin_prefetch causes ICE: in rtl_verify_flow_info, at cfgrtl.c:2205 with -fsched2-use-superblocks
@ 2010-02-13 13:00 zsojka at seznam dot cz
2010-02-13 23:09 ` [Bug rtl-optimization/43056] " steven at gcc dot gnu dot org
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: zsojka at seznam dot cz @ 2010-02-13 13:00 UTC (permalink / raw)
To: gcc-bugs
Command line:
gcc -O1 -fschedule-insns2 -fsched2-use-superblocks -c testcase.c
-------- testcase.c --------
int x[1];
void foo()
{
__builtin_prefetch(x);
}
----------------------------
Tested revisions:
trunk r156745 - crash
trunk r153685 - crash
4.4 r156256 - crash
4.4 r155365 - OK (no checking)
4.4 r149995 - crash
Output:
$ /mnt/svn/gcc-trunk/binary-156745-lto/bin/gcc -O1 -fschedule-insns2
-fsched2-use-superblocks -c testcase.c
testcase.c: In function ‘foo’:
testcase.c:5:1: error: missing barrier after block 2
testcase.c:5:1: error: return not followed by barrier
(jump_insn:TI 11 14 8 2 testcase.c:5 (return) 648 {return_internal} (nil))
testcase.c:5:1: internal compiler error: in rtl_verify_flow_info, at
cfgrtl.c:2205
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
--
Summary: __builtin_prefetch causes ICE: in rtl_verify_flow_info,
at cfgrtl.c:2205 with -fsched2-use-superblocks
Product: gcc
Version: 4.4.4
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: rtl-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: zsojka at seznam dot cz
GCC host triplet: x86_64-pc-linux-gnu
GCC target triplet: x86_64-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43056
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug rtl-optimization/43056] __builtin_prefetch causes ICE: in rtl_verify_flow_info, at cfgrtl.c:2205 with -fsched2-use-superblocks
2010-02-13 13:00 [Bug rtl-optimization/43056] New: __builtin_prefetch causes ICE: in rtl_verify_flow_info, at cfgrtl.c:2205 with -fsched2-use-superblocks zsojka at seznam dot cz
@ 2010-02-13 23:09 ` steven at gcc dot gnu dot org
2010-02-13 23:18 ` steven at gcc dot gnu dot org
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: steven at gcc dot gnu dot org @ 2010-02-13 23:09 UTC (permalink / raw)
To: gcc-bugs
--
steven at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2010-02-13 23:09:24
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43056
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug rtl-optimization/43056] __builtin_prefetch causes ICE: in rtl_verify_flow_info, at cfgrtl.c:2205 with -fsched2-use-superblocks
2010-02-13 13:00 [Bug rtl-optimization/43056] New: __builtin_prefetch causes ICE: in rtl_verify_flow_info, at cfgrtl.c:2205 with -fsched2-use-superblocks zsojka at seznam dot cz
2010-02-13 23:09 ` [Bug rtl-optimization/43056] " steven at gcc dot gnu dot org
@ 2010-02-13 23:18 ` steven at gcc dot gnu dot org
2010-02-13 23:29 ` steven at gcc dot gnu dot org
2010-02-14 0:08 ` steven at gcc dot gnu dot org
3 siblings, 0 replies; 5+ messages in thread
From: steven at gcc dot gnu dot org @ 2010-02-13 23:18 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from steven at gcc dot gnu dot org 2010-02-13 23:18 -------
Breakpoint 7, rest_of_handle_sched2 () at ../../trunk/gcc/sched-rgn.c:3534
3534 && ! maybe_skip_selective_scheduling ())
(gdb) p brief_dump_cfg(stderr)
Basic block 2 (reachable, rtl)
Predecessors: ENTRY [100.0%] (fallthru)
Successors: EXIT [100.0%]
The .split4 dump (just before .sched2):
;; Function foo (foo)
1 NOTE_INSN_DELETED
3 NOTE_INSN_BASIC_BLOCK
9 NOTE_INSN_PROLOGUE_END
2 NOTE_INSN_FUNCTION_BEG
5 prefetch(`x',0x0,0x3)
10 NOTE_INSN_EPILOGUE_BEG
11 return
i 12: barrier
8 NOTE_INSN_DELETED
And the .sched2 dump:
changing bb of uid 13
unscanned insn
changing bb of uid 5
from 2 to 3
deleting block 3
1 NOTE_INSN_DELETED
3 NOTE_INSN_BASIC_BLOCK
9 NOTE_INSN_PROLOGUE_END
2 NOTE_INSN_FUNCTION_BEG
14 NOTE_INSN_EPILOGUE_BEG
11 return
8 NOTE_INSN_DELETED
What insn 13? What basic block 3?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43056
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug rtl-optimization/43056] __builtin_prefetch causes ICE: in rtl_verify_flow_info, at cfgrtl.c:2205 with -fsched2-use-superblocks
2010-02-13 13:00 [Bug rtl-optimization/43056] New: __builtin_prefetch causes ICE: in rtl_verify_flow_info, at cfgrtl.c:2205 with -fsched2-use-superblocks zsojka at seznam dot cz
2010-02-13 23:09 ` [Bug rtl-optimization/43056] " steven at gcc dot gnu dot org
2010-02-13 23:18 ` steven at gcc dot gnu dot org
@ 2010-02-13 23:29 ` steven at gcc dot gnu dot org
2010-02-14 0:08 ` steven at gcc dot gnu dot org
3 siblings, 0 replies; 5+ messages in thread
From: steven at gcc dot gnu dot org @ 2010-02-13 23:29 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from steven at gcc dot gnu dot org 2010-02-13 23:29 -------
This is a gem, the scheduler attempts to schedule the prefetch *after* the
return.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43056
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug rtl-optimization/43056] __builtin_prefetch causes ICE: in rtl_verify_flow_info, at cfgrtl.c:2205 with -fsched2-use-superblocks
2010-02-13 13:00 [Bug rtl-optimization/43056] New: __builtin_prefetch causes ICE: in rtl_verify_flow_info, at cfgrtl.c:2205 with -fsched2-use-superblocks zsojka at seznam dot cz
` (2 preceding siblings ...)
2010-02-13 23:29 ` steven at gcc dot gnu dot org
@ 2010-02-14 0:08 ` steven at gcc dot gnu dot org
3 siblings, 0 replies; 5+ messages in thread
From: steven at gcc dot gnu dot org @ 2010-02-14 0:08 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from steven at gcc dot gnu dot org 2010-02-14 00:07 -------
User prefetches should never be scheduled. Andreas Krebbel posted a patch
towards that (http://gcc.gnu.org/ml/gcc-patches/2009-09/msg00130.html) but he
hasn't followed up on it, so far.
Of course, in very rare corner cases, it is possible to have a non-user
prefetch and then all other code removed as dead. To handle this situation,
sched-ebb.c should not move the barrier after the jump into a new basic block.
But I don't know if this is the responsibility of the CFGRTL modification
interface, or of the user of this interface. If the latter, the following patch
would be necessary:
Index: sched-ebb.c
===================================================================
--- sched-ebb.c (revision 156750)
+++ sched-ebb.c (working copy)
@@ -174,8 +174,13 @@
gcc_assert (NOTE_INSN_BASIC_BLOCK_P (BB_END (bb)));
}
else
- /* Create an empty unreachable block after the INSN. */
- bb = create_basic_block (NEXT_INSN (insn), NULL_RTX, last_bb);
+ {
+ /* Create an empty unreachable block after the INSN. */
+ rtx head = NEXT_INSN (insn);
+ while (head && BARRIER_P (head))
+ head = NEXT_INSN (head);
+ bb = create_basic_block (head, NULL_RTX, last_bb);
+ }
/* split_edge () creates BB before E->DEST. Keep in mind, that
this operation extends scheduling region till the end of BB.
--
steven at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |krebbel at gcc dot gnu dot
| |org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43056
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-02-14 0:08 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-02-13 13:00 [Bug rtl-optimization/43056] New: __builtin_prefetch causes ICE: in rtl_verify_flow_info, at cfgrtl.c:2205 with -fsched2-use-superblocks zsojka at seznam dot cz
2010-02-13 23:09 ` [Bug rtl-optimization/43056] " steven at gcc dot gnu dot org
2010-02-13 23:18 ` steven at gcc dot gnu dot org
2010-02-13 23:29 ` steven at gcc dot gnu dot org
2010-02-14 0:08 ` steven 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).