aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2013-03-25 11:25:28 +0000
committerEric Botcazou <ebotcazou@gcc.gnu.org>2013-03-25 11:25:28 +0000
commit5789594736ea2fae7b4d45a5486560fd2f8d9aea (patch)
treebc2816e197c9accfc84982ebdc9f561349e2ae2a
parent1e1b18c1c7963e3f5ea48c7f4bca0e25481cf07c (diff)
downloadgcc-5789594736ea2fae7b4d45a5486560fd2f8d9aea.zip
gcc-5789594736ea2fae7b4d45a5486560fd2f8d9aea.tar.gz
gcc-5789594736ea2fae7b4d45a5486560fd2f8d9aea.tar.bz2
* postreload.c (reload_combine): Fix code detecting returns.
From-SVN: r197037
-rw-r--r--gcc/ChangeLog4
-rw-r--r--gcc/postreload.c16
2 files changed, 15 insertions, 5 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 072efd7..89e0b7a 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,9 @@
2013-03-25 Eric Botcazou <ebotcazou@adacore.com>
+ * postreload.c (reload_combine): Fix code detecting returns.
+
+2013-03-25 Eric Botcazou <ebotcazou@adacore.com>
+
* function.c (emit_use_return_register_into_block): On cc0 targets,
do not emit the sequence between cc0 setter and user.
diff --git a/gcc/postreload.c b/gcc/postreload.c
index daabaa1..33462e4 100644
--- a/gcc/postreload.c
+++ b/gcc/postreload.c
@@ -1387,7 +1387,7 @@ reload_combine (void)
}
}
- if (control_flow_insn && GET_CODE (PATTERN (insn)) != RETURN)
+ if (control_flow_insn && !ANY_RETURN_P (PATTERN (insn)))
{
/* Non-spill registers might be used at the call destination in
some unknown fashion, so we have to mark the unknown use. */
@@ -1395,13 +1395,19 @@ reload_combine (void)
if ((condjump_p (insn) || condjump_in_parallel_p (insn))
&& JUMP_LABEL (insn))
- live = &LABEL_LIVE (JUMP_LABEL (insn));
+ {
+ if (ANY_RETURN_P (JUMP_LABEL (insn)))
+ live = NULL;
+ else
+ live = &LABEL_LIVE (JUMP_LABEL (insn));
+ }
else
live = &ever_live_at_start;
- for (r = 0; r < FIRST_PSEUDO_REGISTER; r++)
- if (TEST_HARD_REG_BIT (*live, r))
- reg_state[r].use_index = -1;
+ if (live)
+ for (r = 0; r < FIRST_PSEUDO_REGISTER; r++)
+ if (TEST_HARD_REG_BIT (*live, r))
+ reg_state[r].use_index = -1;
}
reload_combine_note_use (&PATTERN (insn), insn, reload_combine_ruid,