unroll.c (copy_loop_body): Always ensure at least two insns are in the copied loop.
authorJeffrey A Law <law@cygnus.com>
Wed, 7 Apr 1999 13:22:29 +0000 (13:22 +0000)
committerJeff Law <law@gcc.gnu.org>
Wed, 7 Apr 1999 13:22:29 +0000 (07:22 -0600)
        * unroll.c (copy_loop_body): Always ensure at least two insns
        are in the copied loop.

From-SVN: r26261

gcc/ChangeLog
gcc/unroll.c

index da8276f3c32a3aca9103bdf5f45dd12a8d2748c9..d33bd4b6344a5babc2a93fb2664d5faeda5cac88 100644 (file)
@@ -1,3 +1,8 @@
+Wed Apr  7 14:07:34 1999  Jeffrey A Law  (law@cygnus.com)
+
+       * unroll.c (copy_loop_body): Always ensure at least two insns
+       are in the copied loop.
+
 Wed Apr  7 14:52:18 1999  Catherine Moore  <clm@cygnus.com>
 
         * config/mips/elf.h (MAKE_DECL_ONE_ONLY): Define.
index e119352dc8a5ccef4217940a4828d67f71a6c22e..9c0109da86bf6eae4fa28dd89c93a4ccbf17eeac 100644 (file)
@@ -1671,6 +1671,12 @@ copy_loop_body (copy_start, copy_end, map, exit_label, last_iteration,
 
   start_sequence ();
 
+  /* Emit a NOTE_INSN_DELETED to force at least two insns onto the sequence.
+     Else gen_sequence could return a raw pattern for a jump which we pass
+     off to emit_insn_before (instead of emit_jump_insn_before) which causes
+     a variety of losing behaviors later.  */
+  emit_note (0, NOTE_INSN_DELETED);
+
   insn = copy_start;
   do
     {