[Bug middle-end/38857] [4.4 Regression] ICE in selective scheduler
--- 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=gccview=revrev=143753 Log: 2009-01-29 Andrey Belevantsev a...@ispras.ru Alexander Monakov amona...@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 s...@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
[Bug middle-end/38857] [4.4 Regression] ICE in selective scheduler
--- 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
[Bug middle-end/38857] [4.4 Regression] ICE in selective scheduler
--- 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=gccview=revrev=143762 Log: 2009-01-29 H.J. Lu hongjiu...@intel.com Backport from mainline: 2009-01-29 Steve Ellcey s...@cup.hp.com PR middle-end/38857 * gcc.c-torture/compile/pr38857.c: New test. 2009-01-28 Richard Guenther rguent...@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
[Bug middle-end/38857] [4.4 Regression] ICE in selective scheduler
--- 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
[Bug middle-end/38857] [4.4 Regression] ICE in selective scheduler
--- 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
[Bug middle-end/38857] [4.4 Regression] ICE in selective scheduler
--- 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
[Bug middle-end/38857] [4.4 Regression] ICE in selective scheduler
--- 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=17153action=view) proposed patch -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38857
[Bug middle-end/38857] [4.4 Regression] ICE in selective scheduler
--- 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
[Bug middle-end/38857] [4.4 Regression] ICE in selective scheduler
--- 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
[Bug middle-end/38857] [4.4 Regression] ICE in selective scheduler
--- 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
[Bug middle-end/38857] [4.4 Regression] ICE in selective scheduler
--- 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|-00-00 00:00:00 |2009-01-19 22:49:52 date|| http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38857
[Bug middle-end/38857] [4.4 Regression] ICE in selective scheduler
-- 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