From 8e318904de7104de65f093a0abfdd23abc9224be Mon Sep 17 00:00:00 2001 From: Jeff Law Date: Sat, 10 Jul 1993 17:48:56 -0600 Subject: 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 --- gcc/jump.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/jump.c b/gcc/jump.c index 9773ce6..4025d8b 100644 --- a/gcc/jump.c +++ b/gcc/jump.c @@ -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. */ -- cgit v1.1