jump.c (jump_optimize_1): Remove inactive but real insns in jump-to-next-insn optimiz...
authorRichard Henderson <rth@cygnus.com>
Wed, 17 May 2000 21:02:22 +0000 (14:02 -0700)
committerRichard Henderson <rth@gcc.gnu.org>
Wed, 17 May 2000 21:02:22 +0000 (14:02 -0700)
        * jump.c (jump_optimize_1): Remove inactive but real insns
        in jump-to-next-insn optimization.

From-SVN: r33966

gcc/ChangeLog
gcc/jump.c

index 577189f75aa0f70a7bf75ba2e39fa618f593c974..ba7e67afc534d3c83560e759390382781b74b919 100644 (file)
@@ -1,3 +1,8 @@
+2000-05-17  Richard Henderson  <rth@cygnus.com>
+
+       * jump.c (jump_optimize_1): Remove inactive but real insns
+       in jump-to-next-insn optimization.
+
 2000-05-17  Richard Henderson  <rth@cygnus.com>
 
        * toplev.c (rest_of_compilation): Don't call optimize_mode_switching
index 7f42235f4f7df13ffabba07fa8bc6b7d44a6e416..bdc1b1aeaf4cf88633720b38e62308d175c4e286 100644 (file)
@@ -390,6 +390,13 @@ jump_optimize_1 (f, cross_jump, noop_moves, after_regscan,
            {
              next = next_real_insn (JUMP_LABEL (insn));
              delete_jump (insn);
+
+             /* Remove the "inactive" but "real" insns (i.e. uses and
+                clobbers) in between here and there.  */
+             temp = insn;
+             while ((temp = next_real_insn (temp)) != next)
+               delete_insn (temp);
+
              changed = 1;
              continue;
            }