[Bug middle-end/53411] [4.8 Regression] ICE in move_unallocated_pseudos
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53411 --- Comment #8 from Jakub Jelinek 2012-08-14 07:43:14 UTC --- Author: jakub Date: Tue Aug 14 07:43:09 2012 New Revision: 190376 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=190376 Log: PR middle-end/53411 PR rtl-optimization/53495 * ira.c (ira): Move delete_trivially_dead_insns call before find_moveable_pseudos call. * gcc.c-torture/compile/pr53411.c: New test. * gcc.c-torture/compile/pr53495.c: New test. Added: trunk/gcc/testsuite/gcc.c-torture/compile/pr53411.c trunk/gcc/testsuite/gcc.c-torture/compile/pr53495.c Modified: trunk/gcc/ChangeLog trunk/gcc/ira.c trunk/gcc/testsuite/ChangeLog
[Bug middle-end/53411] [4.8 Regression] ICE in move_unallocated_pseudos
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53411 Jakub Jelinek changed: What|Removed |Added CC||vmakarov at gcc dot gnu.org --- Comment #7 from Jakub Jelinek 2012-08-13 11:24:31 UTC --- ira itself also removes something, e.g. in rebuild_jump_labels (get_insns ()); if (purge_all_dead_edges ()) delete_unreachable_blocks (); so I wouldn't move that if (delete_trivially_dead_insns (get_insns (), max_reg_num ())) df_analyze (); too early in the function. But perhaps it could be moved before the /* It is not worth to do such improvement when we use a simple allocation because of -O0 usage or because the function is too big. */ if (ira_conflicts_p) find_moveable_pseudos (); hunk. Vlad, what do you think? There is still ira_flattening that tweaks the RTL in between, dunno if it could create trivially dead insns or not. Moving d_t_d_i call before f_m_p call certainly fixes both of the testcases too, haven't bootstrapped/regtested either of the patches yet.
[Bug middle-end/53411] [4.8 Regression] ICE in move_unallocated_pseudos
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53411 --- Comment #6 from Bernd Schmidt 2012-08-13 11:07:27 UTC --- If the call to delete_trivially_dead_insns is supposed to eliminate only pre-existing dead insns, then just moving it to the beginning of IRA fixes this bug.
[Bug middle-end/53411] [4.8 Regression] ICE in move_unallocated_pseudos
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53411 Jakub Jelinek changed: What|Removed |Added Status|NEW |RESOLVED Resolution||DUPLICATE --- Comment #5 from Jakub Jelinek 2012-08-13 10:55:39 UTC --- If we want to rely on no dead insns before IRA, it would make no point calling delete_trivially_dead_insns in it. *** This bug has been marked as a duplicate of bug 53495 ***
[Bug middle-end/53411] [4.8 Regression] ICE in move_unallocated_pseudos
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53411 --- Comment #4 from Bernd Schmidt 2012-05-25 18:32:40 UTC --- Looks like an earlier dce pass (during .ce2) leaves a dead insn lying around. Bug in DCE?
[Bug middle-end/53411] [4.8 Regression] ICE in move_unallocated_pseudos
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53411 H.J. Lu changed: What|Removed |Added CC||bernds at gcc dot gnu.org --- Comment #2 from H.J. Lu 2012-05-21 16:24:58 UTC --- It is caused by revision 186378: http://gcc.gnu.org/ml/gcc-cvs/2012-04/msg00329.html
[Bug middle-end/53411] [4.8 Regression] ICE in move_unallocated_pseudos
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53411 --- Comment #3 from Bernd Schmidt 2012-05-21 16:52:06 UTC --- Odd. The following is in 190r.asmcons: (insn 39 51 141 3 (set (reg:DI 135 [ D.1745 ]) (sign_extend:DI (reg:SI 132 [ j ]))) regehr.c:22 122 {*extendsidi2_rex64} (expr_list:REG_DEAD (reg:SI 132 [ j ]) (expr_list:REG_UNUSED (reg:DI 135 [ D.1745 ]) (nil That insn has no purpose. We then run delete_trivially_dead_insns in IRA... but it happens after find_moveable_pseudos, and probably needs to happen before as well.
[Bug middle-end/53411] [4.8 Regression] ICE in move_unallocated_pseudos
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53411 Jakub Jelinek changed: What|Removed |Added Target Milestone|--- |4.8.0
[Bug middle-end/53411] [4.8 Regression] ICE in move_unallocated_pseudos
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53411 Andrew Pinski changed: What|Removed |Added Status|UNCONFIRMED |NEW Keywords||ice-on-valid-code, ra Last reconfirmed||2012-05-20 Component|c |middle-end Ever Confirmed|0 |1 Summary|segfault|[4.8 Regression] ICE in ||move_unallocated_pseudos --- Comment #1 from Andrew Pinski 2012-05-20 19:26:39 UTC --- Confirmed. (gdb) p i $1 = 144 (gdb) l 4004 for (i = first_moveable_pseudo; i < last_moveable_pseudo; i++) 4005if (reg_renumber[i] < 0) 4006 { 4007int idx = i - first_moveable_pseudo; 4008rtx other_reg = VEC_index (rtx, pseudo_replaced_reg, idx); 4009rtx def_insn = DF_REF_INSN (DF_REG_DEF_CHAIN (i)); 144 does not exist in the IR as far as I can tell.