aboutsummaryrefslogtreecommitdiff
path: root/gcc/config
diff options
context:
space:
mode:
authorJim Wilson <wilson@gcc.gnu.org>1996-03-08 11:10:35 -0800
committerJim Wilson <wilson@gcc.gnu.org>1996-03-08 11:10:35 -0800
commit8b760293d7b65995bb5d80729777d927d839ad5e (patch)
tree7c46eff3ffea522a7d7b04a4946e2409deb68157 /gcc/config
parent449bf2aa18c7d9c86954c0c148b6b87c288721e7 (diff)
downloadgcc-8b760293d7b65995bb5d80729777d927d839ad5e.zip
gcc-8b760293d7b65995bb5d80729777d927d839ad5e.tar.gz
gcc-8b760293d7b65995bb5d80729777d927d839ad5e.tar.bz2
(reg_unused_after): Return 0 if see a JUMP_INSN.
From-SVN: r11501
Diffstat (limited to 'gcc/config')
-rw-r--r--gcc/config/sh/sh.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/gcc/config/sh/sh.c b/gcc/config/sh/sh.c
index 144a5b0..cae782a 100644
--- a/gcc/config/sh/sh.c
+++ b/gcc/config/sh/sh.c
@@ -2338,7 +2338,7 @@ fp_one_operand (op)
/* Return non-zero if REG is not used after INSN.
We assume REG is a reload reg, and therefore does
- not live past labels or calls or jumps. */
+ not live past labels. It may live past calls or jumps though. */
int
reg_unused_after (reg, insn)
rtx reg;
@@ -2369,11 +2369,14 @@ reg_unused_after (reg, insn)
/* else */
#endif
+ if (code == JUMP_INSN)
+ return 0;
+
/* If this is a sequence, we must handle them all at once.
We could have for instance a call that sets the target register,
and a insn in a delay slot that uses the register. In this case,
we must return 0. */
- if (code == INSN && GET_CODE (PATTERN (insn)) == SEQUENCE)
+ else if (code == INSN && GET_CODE (PATTERN (insn)) == SEQUENCE)
{
int i;
int retval = 0;