diff options
author | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-03-29 17:16:06 +0000 |
---|---|---|
committer | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-03-29 17:16:06 +0000 |
commit | edbeda1b4e69d851381d12860a1f8050615604df (patch) | |
tree | 3bc43c40a0d8cf38e398f3a4c8c7a948126fb865 /gcc/reload1.c | |
parent | a66b13e495139f604850a6a6af89c0acefeb4de2 (diff) | |
download | gcc-edbeda1b4e69d851381d12860a1f8050615604df.tar.gz |
2009-03-29 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk r145230
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@145246 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/reload1.c')
-rw-r--r-- | gcc/reload1.c | 34 |
1 files changed, 22 insertions, 12 deletions
diff --git a/gcc/reload1.c b/gcc/reload1.c index 9a485f08300..fcf0bd3fc4d 100644 --- a/gcc/reload1.c +++ b/gcc/reload1.c @@ -4367,29 +4367,39 @@ reload_as_needed (int live_known) SET_REGNO_REG_SET (®_has_output_reload, REGNO (XEXP (in_reg, 0))); } - else if ((code == PRE_INC || code == PRE_DEC - || code == POST_INC || code == POST_DEC)) + else if (code == PRE_INC || code == PRE_DEC + || code == POST_INC || code == POST_DEC) { - int in_hard_regno; int in_regno = REGNO (XEXP (in_reg, 0)); if (reg_last_reload_reg[in_regno] != NULL_RTX) { + int in_hard_regno; + bool forget_p = true; + in_hard_regno = REGNO (reg_last_reload_reg[in_regno]); - gcc_assert (TEST_HARD_REG_BIT (reg_reloaded_valid, - in_hard_regno)); - for (x = old_prev ? NEXT_INSN (old_prev) : insn; - x != old_next; - x = NEXT_INSN (x)) - if (x == reg_reloaded_insn[in_hard_regno]) - break; + if (TEST_HARD_REG_BIT (reg_reloaded_valid, + in_hard_regno)) + { + for (x = old_prev ? NEXT_INSN (old_prev) : insn; + x != old_next; + x = NEXT_INSN (x)) + if (x == reg_reloaded_insn[in_hard_regno]) + { + forget_p = false; + break; + } + } /* If for some reasons, we didn't set up reg_last_reload_reg in this insn, invalidate inheritance from previous insns for the incremented/decremented register. Such registers will be not in - reg_has_output_reload. */ - if (x == old_next) + reg_has_output_reload. Invalidate it + also if the corresponding element in + reg_reloaded_insn is also + invalidated. */ + if (forget_p) forget_old_reloads_1 (XEXP (in_reg, 0), NULL_RTX, NULL); } |