]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
caller-save.c (insert_one_insn): Take into account REG_INC notes for the liveness...
authorEric Botcazou <ebotcazou@adacore.com>
Fri, 21 Nov 2008 21:19:34 +0000 (21:19 +0000)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Fri, 21 Nov 2008 21:19:34 +0000 (21:19 +0000)
* caller-save.c (insert_one_insn): Take into account REG_INC notes
for the liveness computation of the new insn.

From-SVN: r142099

gcc/ChangeLog
gcc/caller-save.c

index fc1f691ed066ecbc1b1a7cc7a1e76099b5b03e16..1f0b3fc24390d195aeee314cbb037f7176299043 100644 (file)
@@ -1,3 +1,8 @@
+2008-11-21  Eric Botcazou  <ebotcazou@adacore.com>
+
+       * caller-save.c (insert_one_insn): Take into account REG_INC notes
+       for the liveness computation of the new insn.
+
 2008-11-21  DJ Delorie  <dj@redhat.com>
 
        * config/stormy16/stormy16.md (movqi_internal, movhi_internal):
index 2d0925a4686e9c04623bcad92adeb335e592b416..002f76054a1f90ba6686c4f0eebf7bab32b5118d 100644 (file)
@@ -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;