diff options
author | Jeff Law <law@gcc.gnu.org> | 1993-07-10 17:48:56 -0600 |
---|---|---|
committer | Jeff Law <law@gcc.gnu.org> | 1993-07-10 17:48:56 -0600 |
commit | 8e318904de7104de65f093a0abfdd23abc9224be (patch) | |
tree | 9d403d51593035e08eeece5509c1dd6514233eee | |
parent | 0d8c1ccd98a08f6e2dedaf2d86dd615b004d7543 (diff) | |
download | gcc-8e318904de7104de65f093a0abfdd23abc9224be.zip gcc-8e318904de7104de65f093a0abfdd23abc9224be.tar.gz gcc-8e318904de7104de65f093a0abfdd23abc9224be.tar.bz2 |
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
-rw-r--r-- | gcc/jump.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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. */ |