------- Comment #4 from jakub at gcc dot gnu dot org 2007-10-11 16:27 -------
If cprop_jump changes a conditional jump into unconditional, then it forgets
to add a BARRIER after it. When not in cfglayout mode that's enough, but
in cfglayout mode it is uglier, though I haven't found a cfg hook which would
do what cprop_jump needs.
--- gcc/gcse.c.jj 2007-10-03 21:33:54.000000000 +0200
+++ gcc/gcse.c 2007-10-11 18:13:45.000000000 +0200
@@ -2853,6 +2853,14 @@ cprop_jump (basic_block bb, rtx setcc, r
/* Remove REG_EQUAL note after simplification. */
if (note_src)
remove_note (jump, note);
+
+ if (any_uncondjump_p (jump)
+ || (returnjump_p (jump) && !any_condjump_p (jump)))
+ {
+ rtx barrier = emit_barrier_after (jump);
+ if (current_ir_type () == IR_RTL_CFGLAYOUT)
+ bb->il.rtl->footer = unlink_insn_chain (barrier, barrier);
+ }
}
#ifdef HAVE_cc0
is ugly, but fixes this bug.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33673