Commit 8e318904 by Jeff Law

jump.c (jump_optimize): Correctly identify branches to the end of a function so…

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
parent 0d8c1ccd
......@@ -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. */
......
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