ifcvt.c (merge_if_block): Use any_uncondjump_p...
authorJeffrey A Law <law@cygnus.com>
Thu, 10 May 2001 15:15:48 +0000 (15:15 +0000)
committerJeff Law <law@gcc.gnu.org>
Thu, 10 May 2001 15:15:48 +0000 (09:15 -0600)
        * ifcvt.c (merge_if_block): Use any_uncondjump_p, not simplejump_p
        to determine if a block has an unconditional jump at its end.

        * jump.c (jump_optimize_1): When converting a conditional jump
        to an unconditional jump, build the jump using gen_jump instead
        of just modify operands in-place.

From-SVN: r41939

gcc/ChangeLog
gcc/ifcvt.c
gcc/jump.c

index a081dfe90a61ca9d8c4c4c1cb4e911d8f66eb835..c6401124b24f732c609d732a7692576357a27c3a 100644 (file)
@@ -1,3 +1,12 @@
+Thu May 10 09:17:42 2001  Jeffrey A Law  (law@cygnus.com)
+
+       * ifcvt.c (merge_if_block): Use any_uncondjump_p, not simplejump_p
+       to determine if a block has an unconditional jump at its end.
+
+       * jump.c (jump_optimize_1): When converting a conditional jump
+       to an unconditional jump, build the jump using gen_jump instead
+       of just modify operands in-place.
+
 2001-05-09  Zack Weinberg  <zackw@stanford.edu>
 
        * cppinit.c (cpp_post_options): Shut off macro expansion if
index f40a656da34448f5607967c37d44ab85aebfc421..b57cb138e6b53a0f87ff2697fb2ed349f8013a2b 100644 (file)
@@ -1745,7 +1745,7 @@ merge_if_block (test_bb, then_bb, else_bb, join_bb)
 
       /* There should sill be a branch at the end of the THEN or ELSE
          blocks taking us to our final destination.  */
-      if (! simplejump_p (combo_bb->end)
+      if (! any_uncondjump_p (combo_bb->end)
           && ! returnjump_p (combo_bb->end))
        abort ();
     }
index 314a20bb0290f9649d59c80d9c6c31aaa42189d1..68adb83589083dab32037d51868fc60469cf00cf 100644 (file)
@@ -608,8 +608,9 @@ jump_optimize_1 (f, cross_jump, noop_moves, after_regscan,
                      do_cross_jump (insn, newjpos, newlpos);
                      /* Make the old conditional jump
                         into an unconditional one.  */
-                     SET_SRC (PATTERN (insn))
-                       = gen_rtx_LABEL_REF (VOIDmode, JUMP_LABEL (insn));
+                     PATTERN (insn)
+                        = gen_jump (gen_rtx_LABEL_REF (VOIDmode,
+                                                       JUMP_LABEL (insn)));
                      INSN_CODE (insn) = -1;
                      emit_barrier_after (insn);
                      /* Add to jump_chain unless this is a new label