* flow.c (propagate_one_insn): Mark sets even when the insn is dead.
authorRichard Henderson <rth@cygnus.com>
Mon, 1 May 2000 07:21:29 +0000 (00:21 -0700)
committerRichard Henderson <rth@gcc.gnu.org>
Mon, 1 May 2000 07:21:29 +0000 (00:21 -0700)
From-SVN: r33564

gcc/ChangeLog
gcc/flow.c

index 24a3187dbd2da5e846facc8fc50831b3ddf5abb7..c3a414f177797ac7f3f9a5a1e1d082ca40264a94 100644 (file)
@@ -1,5 +1,7 @@
 2000-04-30  Richard Henderson  <rth@cygnus.com>
 
+       * flow.c (propagate_one_insn): Mark sets even when the insn is dead.
+
        * ifcvt.c (noce_process_if_block): Fail the conversion if X is
        referenced bewteen the condition and the jump.  Don't delete
        anything but the jump.
index 16f008c8c3cdb44b2cd9532813791e3e4828472b..73cb173ba81fe25f7fd4f77ddbbe0705a884d340 100644 (file)
@@ -3364,6 +3364,15 @@ propagate_one_insn (pbi, insn)
      delete it.  */
   if ((flags & PROP_KILL_DEAD_CODE) && insn_is_dead)
     {
+      /* Record sets.  Do this even for dead instructions, since they
+        would have killed the values if they hadn't been deleted.  */
+      mark_set_regs (pbi, PATTERN (insn), insn);
+
+      /* CC0 is now known to be dead.  Either this insn used it,
+        in which case it doesn't anymore, or clobbered it,
+        so the next insn can't use it.  */
+      pbi->cc0_live = 0;
+
       if (libcall_is_dead)
        {
          prev = propagate_block_delete_libcall (pbi->bb, insn, note);
@@ -3372,11 +3381,6 @@ propagate_one_insn (pbi, insn)
       else
        propagate_block_delete_insn (pbi->bb, insn);
 
-      /* CC0 is now known to be dead.  Either this insn used it,
-        in which case it doesn't anymore, or clobbered it,
-        so the next insn can't use it.  */
-      pbi->cc0_live = 0;
-
       return prev;
     }