jump.c (duplicate_loop_exit_test): Do not duplicate the loop exit test if the exit...
authorJeffrey A Law <law@cygnus.com>
Wed, 8 Jul 1998 23:37:50 +0000 (23:37 +0000)
committerJeff Law <law@gcc.gnu.org>
Wed, 8 Jul 1998 23:37:50 +0000 (17:37 -0600)
        * jump.c (duplicate_loop_exit_test): Do not duplicate the loop exit
        test if the exit code has an insn with ASM_OPERANDS.

From-SVN: r21017

gcc/ChangeLog
gcc/jump.c

index 5675c37c165ba5f4cb4345d54d3e629b59d1df93..31ed342f05b0735e39b8f7fab3455264e765498d 100644 (file)
@@ -1,5 +1,8 @@
 Wed Jul  8 21:43:14 1998  Jeffrey A Law  (law@cygnus.com)
 
+       * jump.c (duplicate_loop_exit_test): Do not duplicate the loop exit
+       test if the exit code has an insn with ASM_OPERANDS.
+
        * i386/cygwin32.h (STDIO_PROTO): Fix typo.
        * m32r.h (STDIO_PROTO): Fix typo.
 
index 7184e11b77fc9874b269f161b445102cb34c7a03..4bc925ddbd4e6dcdb8ea814fb95f108f71cb8205 100644 (file)
@@ -2380,6 +2380,11 @@ duplicate_loop_exit_test (loop_start)
         is a NOTE_INSN_LOOP_BEG because this means we have a nested loop
         is a NOTE_INSN_BLOCK_{BEG,END} because duplicating these notes
              are not valid
+           
+
+     We also do not do this if we find an insn with ASM_OPERANDS.  While
+     this restriction should not be necessary, copying an insn with
+     ASM_OPERANDS can confuse asm_noperands in some cases.
 
      Also, don't do this if the exit code is more than 20 insns.  */
 
@@ -2422,7 +2427,8 @@ duplicate_loop_exit_test (loop_start)
        case INSN:
          if (++num_insns > 20
              || find_reg_note (insn, REG_RETVAL, NULL_RTX)
-             || find_reg_note (insn, REG_LIBCALL, NULL_RTX))
+             || find_reg_note (insn, REG_LIBCALL, NULL_RTX)
+             || asm_noperands (PATTERN (insn)))
            return 0;
          break;
        default: