public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/38857] New: [4.4 Regression] ICE in selective scheduler
@ 2009-01-15 19:19 sje at cup dot hp dot com
2009-01-15 19:20 ` [Bug middle-end/38857] " pinskia at gcc dot gnu dot org
` (11 more replies)
0 siblings, 12 replies; 13+ messages in thread
From: sje at cup dot hp dot com @ 2009-01-15 19:19 UTC (permalink / raw)
To: gcc-bugs
With this test case the selective scheduler is hitting a gcc_assert in
sel-sched-ir.c I see this on IA64 Linux or on IA64 HP-UX when in 64 bit mode.
In both cases it happens when compiling with -O3.
x.c: In function 'dv_guess_qnos':
x.c:22: internal compiler error: in sel_move_insn, at sel-sched-ir.c:1395
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
Test case:
static const int vs_total_ac_bits = 2680;
typedef struct EncBlockInfo {
short mb[64];
unsigned char next[64];
} EncBlockInfo;
inline void dv_guess_qnos(EncBlockInfo* blks, int* qnos) {
int size[5];
int j, k, a, prev;
EncBlockInfo* b;
for(a=2; a==2 || vs_total_ac_bits < size[0]; a+=a){
for (j=0; j<6*5; j++, b++) {
for (k= b->next[prev]; k<64; k= b->next[k]) {
if(b->mb[k] < a && b->mb[k] > -a){
b->next[prev] = b->next[k];
}
else{
prev = k;
}
}
}
}
}
--
Summary: [4.4 Regression] ICE in selective scheduler
Product: gcc
Version: 4.4.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: middle-end
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: sje at cup dot hp dot com
GCC target triplet: ia64-*-*
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38857
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug middle-end/38857] [4.4 Regression] ICE in selective scheduler
2009-01-15 19:19 [Bug middle-end/38857] New: [4.4 Regression] ICE in selective scheduler sje at cup dot hp dot com
@ 2009-01-15 19:20 ` pinskia at gcc dot gnu dot org
2009-01-19 9:49 ` rguenth at gcc dot gnu dot org
` (10 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2009-01-15 19:20 UTC (permalink / raw)
To: gcc-bugs
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |pinskia at gcc dot gnu dot
| |org
Target Milestone|--- |4.4.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38857
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug middle-end/38857] [4.4 Regression] ICE in selective scheduler
2009-01-15 19:19 [Bug middle-end/38857] New: [4.4 Regression] ICE in selective scheduler sje at cup dot hp dot com
2009-01-15 19:20 ` [Bug middle-end/38857] " pinskia at gcc dot gnu dot org
@ 2009-01-19 9:49 ` rguenth at gcc dot gnu dot org
2009-01-19 22:50 ` steven at gcc dot gnu dot org
` (9 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-01-19 9:49 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from rguenth at gcc dot gnu dot org 2009-01-19 09:49 -------
P1 as this happens on a secondary target with -O3.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to work| |4.3.3
Priority|P3 |P1
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38857
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug middle-end/38857] [4.4 Regression] ICE in selective scheduler
2009-01-15 19:19 [Bug middle-end/38857] New: [4.4 Regression] ICE in selective scheduler sje at cup dot hp dot com
2009-01-15 19:20 ` [Bug middle-end/38857] " pinskia at gcc dot gnu dot org
2009-01-19 9:49 ` rguenth at gcc dot gnu dot org
@ 2009-01-19 22:50 ` steven at gcc dot gnu dot org
2009-01-20 15:45 ` amonakov at gcc dot gnu dot org
` (8 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: steven at gcc dot gnu dot org @ 2009-01-19 22:50 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from steven at gcc dot gnu dot org 2009-01-19 22:49 -------
Yah, seen -> CONFIRMED
--
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 |2009-01-19 22:49:52
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38857
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug middle-end/38857] [4.4 Regression] ICE in selective scheduler
2009-01-15 19:19 [Bug middle-end/38857] New: [4.4 Regression] ICE in selective scheduler sje at cup dot hp dot com
` (2 preceding siblings ...)
2009-01-19 22:50 ` steven at gcc dot gnu dot org
@ 2009-01-20 15:45 ` amonakov at gcc dot gnu dot org
2009-01-20 15:47 ` amonakov at gcc dot gnu dot org
` (7 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: amonakov at gcc dot gnu dot org @ 2009-01-20 15:45 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from amonakov at gcc dot gnu dot org 2009-01-20 15:45 -------
The assert that fails is checking whether an instruction was correctly
disconnected from the insn stream (at its original location) to be inserted on
the scheduling boundary by adjusting PREV_INSN/NEXT_INSN links (we try to move
instructions instead of removing and reissuing new instruction to avoid cost of
re-initialization of associated structures).
There are two different versions of code to decide whether it is appropriate to
move an instruction for places where instructions are disconnected or inserted
into the stream, as different scheduler data is available there. Attached
patch (by Andrey) changes it so that decision is made at instruction's original
location and saved until we need to move/issue it at the scheduling boundary in
should_move parameter.
Bootstrapped & regtested on ia64-linux. I will include the testcase when
sending patch to gcc-patches@
Steven, can you please also check if it fixes the testcase you've seen fail on
this assert?
--
amonakov at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |amonakov at gcc dot gnu dot
| |org
AssignedTo|unassigned at gcc dot gnu |amonakov at gcc dot gnu dot
|dot org |org
Status|NEW |ASSIGNED
Last reconfirmed|2009-01-19 22:49:52 |2009-01-20 15:45:10
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38857
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug middle-end/38857] [4.4 Regression] ICE in selective scheduler
2009-01-15 19:19 [Bug middle-end/38857] New: [4.4 Regression] ICE in selective scheduler sje at cup dot hp dot com
` (3 preceding siblings ...)
2009-01-20 15:45 ` amonakov at gcc dot gnu dot org
@ 2009-01-20 15:47 ` amonakov at gcc dot gnu dot org
2009-01-20 23:13 ` sje at cup dot hp dot com
` (6 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: amonakov at gcc dot gnu dot org @ 2009-01-20 15:47 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from amonakov at gcc dot gnu dot org 2009-01-20 15:47 -------
Created an attachment (id=17153)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=17153&action=view)
proposed patch
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38857
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug middle-end/38857] [4.4 Regression] ICE in selective scheduler
2009-01-15 19:19 [Bug middle-end/38857] New: [4.4 Regression] ICE in selective scheduler sje at cup dot hp dot com
` (4 preceding siblings ...)
2009-01-20 15:47 ` amonakov at gcc dot gnu dot org
@ 2009-01-20 23:13 ` sje at cup dot hp dot com
2009-01-20 23:16 ` steven at gcc dot gnu dot org
` (5 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: sje at cup dot hp dot com @ 2009-01-20 23:13 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from sje at cup dot hp dot com 2009-01-20 23:12 -------
I tested the patch on my original code (that the included test was cut down
from) and it compiled that program with no problem.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38857
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug middle-end/38857] [4.4 Regression] ICE in selective scheduler
2009-01-15 19:19 [Bug middle-end/38857] New: [4.4 Regression] ICE in selective scheduler sje at cup dot hp dot com
` (5 preceding siblings ...)
2009-01-20 23:13 ` sje at cup dot hp dot com
@ 2009-01-20 23:16 ` steven at gcc dot gnu dot org
2009-01-22 12:19 ` amonakov at gcc dot gnu dot org
` (4 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: steven at gcc dot gnu dot org @ 2009-01-20 23:16 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from steven at gcc dot gnu dot org 2009-01-20 23:16 -------
-static bool code_motion_path_driver (insn_t, av_set_t, ilist_t,
- cmpd_local_params_p, void *);
+static int code_motion_path_driver (insn_t, av_set_t, ilist_t,
+ cmpd_local_params_p, void *);
You probably don't want this bit...?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38857
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug middle-end/38857] [4.4 Regression] ICE in selective scheduler
2009-01-15 19:19 [Bug middle-end/38857] New: [4.4 Regression] ICE in selective scheduler sje at cup dot hp dot com
` (6 preceding siblings ...)
2009-01-20 23:16 ` steven at gcc dot gnu dot org
@ 2009-01-22 12:19 ` amonakov at gcc dot gnu dot org
2009-01-25 11:31 ` jakub at gcc dot gnu dot org
` (3 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: amonakov at gcc dot gnu dot org @ 2009-01-22 12:19 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from amonakov at gcc dot gnu dot org 2009-01-22 12:19 -------
(In reply to comment #6)
> -static bool code_motion_path_driver (insn_t, av_set_t, ilist_t,
> - cmpd_local_params_p, void *);
> +static int code_motion_path_driver (insn_t, av_set_t, ilist_t,
> + cmpd_local_params_p, void *);
>
> You probably don't want this bit...?
>
The function returns -1 in some circumstances. This change is not relevant to
the ICE in question, but is nevertheless a correction (maybe not the best, as
'return true' and 'return false' are used in function's body). I'm not sure
what's best here -- to include this in PR fix submission, or as a separate
patch.
FWIW, there're a couple more unrelated changes:
1) check if a reg is actually a hard reg
if (REG_P (*cur_rtx)
+ && HARD_REGISTER_P (*cur_rtx)
&& hard_regno_nregs[REGNO(*cur_rtx)][GET_MODE (*cur_rtx)] > 1)
and
2) Do not merge info from successors if not relevant
/* Merge data, clean up, etc. */
- if (code_motion_path_driver_info->after_merge_succs)
+ if (res != -1 && code_motion_path_driver_info->after_merge_succs)
code_motion_path_driver_info->after_merge_succs (&lparams, static_params);
Again, I will submit them separately if so desired.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38857
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug middle-end/38857] [4.4 Regression] ICE in selective scheduler
2009-01-15 19:19 [Bug middle-end/38857] New: [4.4 Regression] ICE in selective scheduler sje at cup dot hp dot com
` (7 preceding siblings ...)
2009-01-22 12:19 ` amonakov at gcc dot gnu dot org
@ 2009-01-25 11:31 ` jakub at gcc dot gnu dot org
2009-01-29 10:53 ` amonakov at gcc dot gnu dot org
` (2 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: jakub at gcc dot gnu dot org @ 2009-01-25 11:31 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from jakub at gcc dot gnu dot org 2009-01-25 11:31 -------
I think it is fine to submit the patch as is, assuming you've
bootstrapped/regtested it. Please mail it to gcc-patches for review.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38857
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug middle-end/38857] [4.4 Regression] ICE in selective scheduler
2009-01-15 19:19 [Bug middle-end/38857] New: [4.4 Regression] ICE in selective scheduler sje at cup dot hp dot com
` (8 preceding siblings ...)
2009-01-25 11:31 ` jakub at gcc dot gnu dot org
@ 2009-01-29 10:53 ` amonakov at gcc dot gnu dot org
2009-01-29 10:55 ` amonakov at gcc dot gnu dot org
2009-01-29 17:06 ` hjl at gcc dot gnu dot org
11 siblings, 0 replies; 13+ messages in thread
From: amonakov at gcc dot gnu dot org @ 2009-01-29 10:53 UTC (permalink / raw)
To: gcc-bugs
------- Comment #9 from amonakov at gcc dot gnu dot org 2009-01-29 10:53 -------
Subject: Bug 38857
Author: amonakov
Date: Thu Jan 29 10:53:15 2009
New Revision: 143753
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=143753
Log:
2009-01-29 Andrey Belevantsev <abel@ispras.ru>
Alexander Monakov <amonakov@ispras.ru>
PR middle-end/38857
* sel-sched.c (count_occurrences_1): Check that *cur_rtx is a hard
register.
(move_exprs_to_boundary): Change return type and pass through
should_move from move_op. Relax assert. Update usage ...
(schedule_expr_on_boundary): ... here. Use should_move instead of
cant_move.
(move_op_orig_expr_found): Indicate that insn was disconnected from
stream.
(code_motion_process_successors): Do not call after_merge_succs
callback if original expression was not found when traversing any of
the branches.
(code_motion_path_driver): Change return type. Update prototype.
(move_op): Update comment. Add a new parameter (should_move). Update
prototype. Set *should_move based on indication provided by
move_op_orig_expr_found.
2009-01-29 Steve Ellcey <sje@cup.hp.com>
PR middle-end/38857
* gcc.c-torture/compile/pr38857.c: New test.
Added:
trunk/gcc/testsuite/gcc.c-torture/compile/pr38857.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/sel-sched.c
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38857
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug middle-end/38857] [4.4 Regression] ICE in selective scheduler
2009-01-15 19:19 [Bug middle-end/38857] New: [4.4 Regression] ICE in selective scheduler sje at cup dot hp dot com
` (9 preceding siblings ...)
2009-01-29 10:53 ` amonakov at gcc dot gnu dot org
@ 2009-01-29 10:55 ` amonakov at gcc dot gnu dot org
2009-01-29 17:06 ` hjl at gcc dot gnu dot org
11 siblings, 0 replies; 13+ messages in thread
From: amonakov at gcc dot gnu dot org @ 2009-01-29 10:55 UTC (permalink / raw)
To: gcc-bugs
------- Comment #10 from amonakov at gcc dot gnu dot org 2009-01-29 10:55 -------
Fixed with above commit.
--
amonakov at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38857
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug middle-end/38857] [4.4 Regression] ICE in selective scheduler
2009-01-15 19:19 [Bug middle-end/38857] New: [4.4 Regression] ICE in selective scheduler sje at cup dot hp dot com
` (10 preceding siblings ...)
2009-01-29 10:55 ` amonakov at gcc dot gnu dot org
@ 2009-01-29 17:06 ` hjl at gcc dot gnu dot org
11 siblings, 0 replies; 13+ messages in thread
From: hjl at gcc dot gnu dot org @ 2009-01-29 17:06 UTC (permalink / raw)
To: gcc-bugs
------- Comment #11 from hjl at gcc dot gnu dot org 2009-01-29 17:06 -------
Subject: Bug 38857
Author: hjl
Date: Thu Jan 29 17:06:01 2009
New Revision: 143762
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=143762
Log:
2009-01-29 H.J. Lu <hongjiu.lu@intel.com>
Backport from mainline:
2009-01-29 Steve Ellcey <sje@cup.hp.com>
PR middle-end/38857
* gcc.c-torture/compile/pr38857.c: New test.
2009-01-28 Richard Guenther <rguenther@suse.de>
PR tree-optimization/38926
* gcc.c-torture/compile/pr38926.c: New testcase.
Added:
branches/gcc-4_3-branch/gcc/testsuite/gcc.c-torture/compile/pr38857.c
- copied unchanged from r143760,
trunk/gcc/testsuite/gcc.c-torture/compile/pr38857.c
branches/gcc-4_3-branch/gcc/testsuite/gcc.c-torture/compile/pr38926.c
- copied unchanged from r143759,
trunk/gcc/testsuite/gcc.c-torture/compile/pr38926.c
Modified:
branches/gcc-4_3-branch/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38857
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2009-01-29 17:06 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-01-15 19:19 [Bug middle-end/38857] New: [4.4 Regression] ICE in selective scheduler sje at cup dot hp dot com
2009-01-15 19:20 ` [Bug middle-end/38857] " pinskia at gcc dot gnu dot org
2009-01-19 9:49 ` rguenth at gcc dot gnu dot org
2009-01-19 22:50 ` steven at gcc dot gnu dot org
2009-01-20 15:45 ` amonakov at gcc dot gnu dot org
2009-01-20 15:47 ` amonakov at gcc dot gnu dot org
2009-01-20 23:13 ` sje at cup dot hp dot com
2009-01-20 23:16 ` steven at gcc dot gnu dot org
2009-01-22 12:19 ` amonakov at gcc dot gnu dot org
2009-01-25 11:31 ` jakub at gcc dot gnu dot org
2009-01-29 10:53 ` amonakov at gcc dot gnu dot org
2009-01-29 10:55 ` amonakov at gcc dot gnu dot org
2009-01-29 17:06 ` hjl 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).