jump.c (jump_optimize): Correctly identify branches to the end of a function so that they may be turned...

* jump.c (jump_optimize): Correctly identify branches to the end
	of a function so that they may be turned into RETURN insns.

From-SVN: r4903
This commit is contained in:
Jeff Law 1993-07-10 17:48:56 -06:00
parent 0d8c1ccd98
commit 8e318904de
1 changed files with 3 additions and 1 deletions

View File

@ -641,7 +641,9 @@ jump_optimize (f, cross_jump, noop_moves, after_regscan)
/* If a jump references the end of the function, try to turn
it into a RETURN insn, possibly a conditional one. */
if (JUMP_LABEL (insn)
&& next_active_insn (JUMP_LABEL (insn)) == 0)
&& (next_active_insn (JUMP_LABEL (insn)) == 0
|| GET_CODE (PATTERN (next_active_insn (JUMP_LABEL (insn))))
== RETURN))
changed |= redirect_jump (insn, NULL_RTX);
/* Detect jump to following insn. */