cse.c (delete_trivially_dead_insns): Do not delete stores to the internal_arg_pointer.
authorJeffrey A Law <law@cygnus.com>
Tue, 31 Aug 1999 22:48:58 +0000 (22:48 +0000)
committerJeff Law <law@gcc.gnu.org>
Tue, 31 Aug 1999 22:48:58 +0000 (16:48 -0600)
        * cse.c (delete_trivially_dead_insns): Do not delete stores to
        the internal_arg_pointer.

From-SVN: r29017

gcc/ChangeLog
gcc/cse.c

index c5fa34ce5cecad706c183d8e319823c68998f09d..f8a09810fab1d340c5cb5f7135499b45fa50432f 100644 (file)
@@ -1,3 +1,8 @@
+Tue Aug 31 16:44:52 1999  Jeffrey A Law  (law@cygnus.com)
+
+       * cse.c (delete_trivially_dead_insns): Do not delete stores to
+       the internal_arg_pointer.
+
 Tue Aug 31 13:35:42 1999  Richard Henderson  <rth@cygnus.com>
 
        Merge peephole2 from new_ia32_branch:
index 6c7aef31ecd3b89ce884b0d22f4a5f93694579fa..68fe7b04a9240855cb7fff5dbaa000d016c2a397 100644 (file)
--- a/gcc/cse.c
+++ b/gcc/cse.c
@@ -9191,7 +9191,13 @@ delete_trivially_dead_insns (insns, nreg)
          else if (GET_CODE (SET_DEST (PATTERN (insn))) != REG
                   || REGNO (SET_DEST (PATTERN (insn))) < FIRST_PSEUDO_REGISTER
                   || counts[REGNO (SET_DEST (PATTERN (insn)))] != 0
-                  || side_effects_p (SET_SRC (PATTERN (insn))))
+                  || side_effects_p (SET_SRC (PATTERN (insn)))
+                  /* An ADDRESSOF expression can turn into a use of the
+                     internal arg pointer, so always consider the
+                     internal arg pointer live.  If it is truly dead,
+                     flow will delete the initializing insn.  */
+                  || (SET_DEST (PATTERN (insn))
+                      == current_function_internal_arg_pointer))
            live_insn = 1;
        }
       else if (GET_CODE (PATTERN (insn)) == PARALLEL)