* mips.c (mips_expand_prologue) Add REG_MAYBE_DEAD to
authorRichard Henderson <rth@gcc.gnu.org>
Sun, 18 Feb 2001 20:44:44 +0000 (12:44 -0800)
committerRichard Henderson <rth@gcc.gnu.org>
Sun, 18 Feb 2001 20:44:44 +0000 (12:44 -0800)
        structure shift insns.

From-SVN: r39848

gcc/ChangeLog
gcc/config/mips/mips.c

index 6dad4f9e014ea8aebfa308a44df9ce314fb5b19e..b76448443294421e10f3bdabf733bb4e4631a905 100644 (file)
@@ -1,4 +1,9 @@
-2001-02-17  Mark Mitchell  <mark@codesourcery.com>
+2001-02-18  Shane Nay  <shane@agendacomputing.com>
+
+       * mips.c (mips_expand_prologue) Add REG_MAYBE_DEAD to 
+       structure shift insns.
+
+2001-02-18  Mark Mitchell  <mark@codesourcery.com>
 
        * invoke.texi (-fsquangle): Remove documentation.
        (-fname-mangling-version): Likewise.
index 1f19c98028ee0e0d605c1200fe68134fb070cc62..74c548ca73ded0b6ea2cae935f77e0fcbd0b9424 100644 (file)
@@ -7115,13 +7115,22 @@ mips_expand_prologue ()
 
       for (i = 0; i < num; i++)
        {
-         rtx pattern = RTVEC_ELT (adjust, i);
+         rtx insn, pattern;
+
+         pattern = RTVEC_ELT (adjust, i);
          if (GET_CODE (pattern) != SET
              || GET_CODE (SET_SRC (pattern)) != ASHIFT)
            abort_with_insn (pattern, "Insn is not a shift");
-
          PUT_CODE (SET_SRC (pattern), ASHIFTRT);
-         emit_insn (pattern);
+
+         insn = emit_insn (pattern);
+
+         /* Global life information isn't valid at this point, so we
+            can't check whether these shifts are actually used.  Mark
+            them MAYBE_DEAD so that flow2 will remove them, and not
+            complain about dead code in the prologue.  */
+         REG_NOTES(insn) = gen_rtx_EXPR_LIST (REG_MAYBE_DEAD, NULL_RTX,
+                                              REG_NOTES (insn));
        }
     }