Ignore jumps that have side effects in loop processing as pasting the
body of a loop multiple times within is semantically equivalent to jump
deletion (between the iterations unrolled) even if we do not physically
delete the jump RTL insn.
gcc/
* loop-iv.c (simplify_using_initial_values): Only process jumps
that match `onlyjump_p'.
(check_simple_exit): Likewise.
while (1)
{
insn = BB_END (e->src);
- if (any_condjump_p (insn))
+ if (any_condjump_p (insn) && onlyjump_p (insn))
{
rtx cond = get_condition (BB_END (e->src), NULL, false, true);
return;
/* It must end in a simple conditional jump. */
- if (!any_condjump_p (BB_END (exit_bb)))
+ if (!any_condjump_p (BB_END (exit_bb)) || !onlyjump_p (BB_END (exit_bb)))
return;
ein = EDGE_SUCC (exit_bb, 0);