From: ebotcazou Date: Mon, 25 Mar 2013 11:25:28 +0000 (+0000) Subject: * postreload.c (reload_combine): Fix code detecting returns. X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7777a93979a807766a53c0a28a0d6db34c5dc0cb;p=thirdparty%2Fgcc.git * postreload.c (reload_combine): Fix code detecting returns. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@197037 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 072efd7d65a4..89e0b7a2cdb3 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2013-03-25 Eric Botcazou + + * postreload.c (reload_combine): Fix code detecting returns. + 2013-03-25 Eric Botcazou * function.c (emit_use_return_register_into_block): On cc0 targets, diff --git a/gcc/postreload.c b/gcc/postreload.c index daabaa1b703c..33462e4dbadc 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,