]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
flow.c (propagate_one_insn): Kill function return value registers across tail calls.
authorRichard Henderson <rth@redhat.com>
Thu, 26 Jun 2003 20:45:18 +0000 (13:45 -0700)
committerRichard Henderson <rth@gcc.gnu.org>
Thu, 26 Jun 2003 20:45:18 +0000 (13:45 -0700)
        * flow.c (propagate_one_insn): Kill function return value
        registers across tail calls.

From-SVN: r68546

gcc/ChangeLog
gcc/flow.c

index 274e7a531ab9d515da9ff2a2c199c7f0b35abd1e..31b981517112c1d86ea99739ea157513c5c9a583 100644 (file)
@@ -1,5 +1,8 @@
 2003-06-26  Richard Henderson  <rth@redhat.com>
 
+       * flow.c (propagate_one_insn): Kill function return value 
+       registers across tail calls.
+
        * flow.c (propagate_one_insn): Preserve live-at-end registers
        across tail calls.
 
index 58859405aab3c2bb5ce8a9760d3ccb533ba0fece..e51d477c94f996ab7b93dade5bc045c87474510d 100644 (file)
@@ -1799,13 +1799,16 @@ propagate_one_insn (pbi, insn)
                          cond, insn, pbi->flags);
 
          /* Calls change all call-used and global registers; sibcalls do not
-            clobber anything that must be preserved at end-of-function.  */
+            clobber anything that must be preserved at end-of-function,
+            except for return values.  */
 
          sibcall_p = SIBLING_CALL_P (insn);
          live_at_end = EXIT_BLOCK_PTR->global_live_at_start;
          for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
            if (TEST_HARD_REG_BIT (regs_invalidated_by_call, i)
-               && ! (sibcall_p && REGNO_REG_SET_P (live_at_end, i)))
+               && ! (sibcall_p
+                     && REGNO_REG_SET_P (live_at_end, i)
+                     && !FUNCTION_VALUE_REGNO_P (i)))
              {
                /* We do not want REG_UNUSED notes for these registers.  */
                mark_set_1 (pbi, CLOBBER, regno_reg_rtx[i], cond, insn,