Commit 7f11183e by Jim Wilson

(copy_loop_body...

(copy_loop_body, JUMP_INSN case): When invert jump
insn, must first construct new insn before trying to invert it,
so that validate_change will work properly.

From-SVN: r2277
parent 4024394c
...@@ -1659,27 +1659,21 @@ copy_loop_body (copy_start, copy_end, map, exit_label, last_iteration, ...@@ -1659,27 +1659,21 @@ copy_loop_body (copy_start, copy_end, map, exit_label, last_iteration,
In this case, we want to change the original fall through In this case, we want to change the original fall through
case to be a branch past the end of the loop, and the case to be a branch past the end of the loop, and the
original jump label case to fall_through. */ original jump label case to fall_through. */
int fall_through;
/* Never map the label in this case. */ /* Never map the label in this case. */
rtx tmp_pattern = copy_rtx (PATTERN (insn));
/* Set the fall through case to the exit label. If we pattern = copy_rtx (PATTERN (insn));
can't do this in place, abort for now. Maybe copy = emit_jump_insn (pattern);
we can do something more sophisticated eventually. */
if (! invert_exp (tmp_pattern, insn) if (! invert_exp (pattern, copy)
|| ! redirect_exp (&tmp_pattern, JUMP_LABEL (insn), || ! redirect_exp (&pattern, JUMP_LABEL (insn),
exit_label, insn)) exit_label, copy))
abort (); abort ();
pattern = tmp_pattern;
} }
else else
{
pattern = copy_rtx_and_substitute (PATTERN (insn), map); pattern = copy_rtx_and_substitute (PATTERN (insn), map);
copy = emit_jump_insn (pattern); copy = emit_jump_insn (pattern);
}
#ifdef HAVE_cc0 #ifdef HAVE_cc0
if (cc0_insn) if (cc0_insn)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment