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; 9+ 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] 9+ 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; 9+ 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] 9+ 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; 9+ 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] 9+ 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; 9+ 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] 9+ 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; 9+ 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] 9+ messages in thread
* [Bug rtl-optimization/43056] __builtin_prefetch causes ICE: in rtl_verify_flow_info, at cfgrtl.c:2205 with -fsched2-use-superblocks
[not found] <bug-43056-4@http.gcc.gnu.org/bugzilla/>
` (2 preceding siblings ...)
2021-08-27 6:33 ` pinskia at gcc dot gnu.org
@ 2021-08-27 6:46 ` pinskia at gcc dot gnu.org
3 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-08-27 6:46 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43056
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |DUPLICATE
Status|NEW |RESOLVED
--- Comment #8 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Dup of bug 55153.
*** This bug has been marked as a duplicate of bug 55153 ***
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug rtl-optimization/43056] __builtin_prefetch causes ICE: in rtl_verify_flow_info, at cfgrtl.c:2205 with -fsched2-use-superblocks
[not found] <bug-43056-4@http.gcc.gnu.org/bugzilla/>
2012-11-11 20:46 ` steven at gcc dot gnu.org
2013-04-04 5:09 ` mpolacek at gcc dot gnu.org
@ 2021-08-27 6:33 ` pinskia at gcc dot gnu.org
2021-08-27 6:46 ` pinskia at gcc dot gnu.org
3 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-08-27 6:33 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43056
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to work| |4.8.0
--- Comment #7 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
4.7:
;; 0--> 11 simple_return
:athlon-vector,athlon-ieu,athlon-ieu
;; 0--> 5 prefetch(`x',0,0x3) :nothing
4.8.0:
;; 0--> 5prefetch(`x',0,0x3) :nothing
;; 0--> 10simple_return
:athlon-vector,athlon-ieu,athlon-ieu
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug rtl-optimization/43056] __builtin_prefetch causes ICE: in rtl_verify_flow_info, at cfgrtl.c:2205 with -fsched2-use-superblocks
[not found] <bug-43056-4@http.gcc.gnu.org/bugzilla/>
2012-11-11 20:46 ` steven at gcc dot gnu.org
@ 2013-04-04 5:09 ` mpolacek at gcc dot gnu.org
2021-08-27 6:33 ` pinskia at gcc dot gnu.org
2021-08-27 6:46 ` pinskia at gcc dot gnu.org
3 siblings, 0 replies; 9+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2013-04-04 5:09 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43056
Marek Polacek <mpolacek at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mpolacek at gcc dot gnu.org
--- Comment #5 from Marek Polacek <mpolacek at gcc dot gnu.org> 2013-04-04 05:09:24 UTC ---
Can't reproduce anymore with 4.7/4.8/trunk, only with 4.6.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug rtl-optimization/43056] __builtin_prefetch causes ICE: in rtl_verify_flow_info, at cfgrtl.c:2205 with -fsched2-use-superblocks
[not found] <bug-43056-4@http.gcc.gnu.org/bugzilla/>
@ 2012-11-11 20:46 ` steven at gcc dot gnu.org
2013-04-04 5:09 ` mpolacek at gcc dot gnu.org
` (2 subsequent siblings)
3 siblings, 0 replies; 9+ messages in thread
From: steven at gcc dot gnu.org @ 2012-11-11 20:46 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43056
Steven Bosscher <steven at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed|2010-02-13 23:09:24 |2012-11-11 23:09:24
Known to fail| |
--- Comment #4 from Steven Bosscher <steven at gcc dot gnu.org> 2012-11-11 20:46:17 UTC ---
Not fixed by r151475, still fails at r193411.
t.c: In function 'foo':
t.c:5:1: internal compiler error: in begin_move_insn, at sched-ebb.c:205
}
^
0xff9b0d begin_move_insn
../../trunk/gcc/sched-ebb.c:205
0xfa3e9b commit_schedule
../../trunk/gcc/haifa-sched.c:5647
0xfaeca4 schedule_block(basic_block_def**, void*)
../../trunk/gcc/haifa-sched.c:6429
0xff94e3 schedule_ebb(rtx_def*, rtx_def*, bool)
../../trunk/gcc/sched-ebb.c:547
0xff97af schedule_ebbs()
../../trunk/gcc/sched-ebb.c:666
0x9ce502 rest_of_handle_sched2
../../trunk/gcc/sched-rgn.c:3565
Please submit a full bug report,
with preprocessed source if appropriate.
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2021-08-27 6:46 UTC | newest]
Thread overview: 9+ 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
[not found] <bug-43056-4@http.gcc.gnu.org/bugzilla/>
2012-11-11 20:46 ` steven at gcc dot gnu.org
2013-04-04 5:09 ` mpolacek at gcc dot gnu.org
2021-08-27 6:33 ` pinskia at gcc dot gnu.org
2021-08-27 6:46 ` pinskia 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).