diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2008-11-21 21:19:34 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@adacore.com> | 2008-11-21 21:19:34 +0000 |
commit | c269681410a304aeec07be7a0fa136593cd21ecd (patch) | |
tree | a1ca0a56e67cbb52b3a6103157469400ab09d65a /gcc/caller-save.c | |
parent | eba316b97789cf9ca5a795cdc9c323756cca89a7 (diff) |
* caller-save.c (insert_one_insn): Take into account REG_INC notes
for the liveness computation of the new insn.
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@142099 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/caller-save.c')
-rw-r--r-- | gcc/caller-save.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/caller-save.c b/gcc/caller-save.c index 2d0925a4686..002f76054a1 100644 --- a/gcc/caller-save.c +++ b/gcc/caller-save.c @@ -1216,10 +1216,12 @@ insert_one_insn (struct insn_chain *chain, int before_p, int code, rtx pat) /* ??? It would be nice if we could exclude the already / still saved registers from the live sets. */ COPY_REG_SET (&new_chain->live_throughout, &chain->live_throughout); - /* Registers that die in CHAIN->INSN still live in the new insn. */ + /* Registers that die in CHAIN->INSN still live in the new insn. + Likewise for those which are autoincremented or autodecremented. */ for (link = REG_NOTES (chain->insn); link; link = XEXP (link, 1)) { - if (REG_NOTE_KIND (link) == REG_DEAD) + enum reg_note kind = REG_NOTE_KIND (link); + if (kind == REG_DEAD || kind == REG_INC) { rtx reg = XEXP (link, 0); int regno, i; |