sh.c (sh_expand_prologue): Let the second toggle_sz be optimized away.
authorAlexandre Oliva <aoliva@redhat.com>
Sat, 13 Jan 2001 07:21:35 +0000 (07:21 +0000)
committerAlexandre Oliva <aoliva@gcc.gnu.org>
Sat, 13 Jan 2001 07:21:35 +0000 (07:21 +0000)
* config/sh/sh.c (sh_expand_prologue): Let the second toggle_sz be
optimized away.

From-SVN: r38976

gcc/ChangeLog
gcc/config/sh/sh.c

index cb9b83535d09b92c7c7b3c0ed244859600160fd1..e4ea11f2b79e0583cac5664df681a500538c7b63 100644 (file)
@@ -1,5 +1,8 @@
 2001-01-13  Alexandre Oliva  <aoliva@redhat.com>
 
+       * config/sh/sh.c (sh_expand_prologue): Let the second toggle_sz be
+       optimized away.
+
        * config/sh/sh.c (mova_p): Fix test for mova_const.
 
 2001-01-13  Neil Booth  <neil@daikokuya.demon.co.uk>
index 1526d78f93001b8b8393da06384048d70dde954a..d0142e6efe4eddb0165e1781c8650d4ad790d094 100644 (file)
@@ -3969,7 +3969,16 @@ sh_expand_prologue ()
     emit_insn (gen_GOTaddr2picreg ());
 
   if (target_flags != save_flags)
-    emit_insn (gen_toggle_sz ());
+    {
+      rtx insn = emit_insn (gen_toggle_sz ());
+
+      /* If we're lucky, a mode switch in the function body will
+        overwrite fpscr, turning this insn dead.  Tell flow this
+        insn is ok to delete.  */
+      REG_NOTES (insn) = gen_rtx_EXPR_LIST (REG_MAYBE_DEAD,
+                                           const0_rtx,
+                                           REG_NOTES (insn));
+    }
 
   target_flags = save_flags;