summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorm.hayes <m.hayes@138bc75d-0d04-0410-961f-82ee72b054a4>2003-03-15 02:44:29 +0000
committerm.hayes <m.hayes@138bc75d-0d04-0410-961f-82ee72b054a4>2003-03-15 02:44:29 +0000
commitfc308e433078a81b845e87acf3c7002f66a138dd (patch)
tree9969c224172f9573e7cd998f797e895995e04841
parentc55e96a8a069ecc481e469c389e2b8e52fee1233 (diff)
downloadgcc-fc308e433078a81b845e87acf3c7002f66a138dd.tar.gz
PR optimization/9387
* function.c (thread_prologue_and_epilogue_insns): Use redirect_jump for conditional returns. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@64390 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/function.c13
2 files changed, 7 insertions, 12 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 146eb18973b..206fffc9567 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2003-03-15 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
+
+ PR optimization/9387
+ * function.c (thread_prologue_and_epilogue_insns): Use redirect_jump
+ for conditional returns.
+
2003-03-14 Jason Merrill <jason@redhat.com>
PR optimization/6871
diff --git a/gcc/function.c b/gcc/function.c
index 73527bc037e..26fc9ecca76 100644
--- a/gcc/function.c
+++ b/gcc/function.c
@@ -7601,19 +7601,8 @@ thread_prologue_and_epilogue_insns (f)
that with a conditional return instruction. */
else if (condjump_p (jump))
{
- rtx ret, *loc;
-
- ret = SET_SRC (PATTERN (jump));
- if (GET_CODE (XEXP (ret, 1)) == LABEL_REF)
- loc = &XEXP (ret, 1);
- else
- loc = &XEXP (ret, 2);
- ret = gen_rtx_RETURN (VOIDmode);
-
- if (! validate_change (jump, loc, ret, 0))
+ if (! redirect_jump (jump, 0, 1))
continue;
- if (JUMP_LABEL (jump))
- LABEL_NUSES (JUMP_LABEL (jump))--;
/* If this block has only one successor, it both jumps
and falls through to the fallthru block, so we can't