aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJeffrey A Law <law@cygnus.com>1998-07-08 23:37:50 +0000
committerJeff Law <law@gcc.gnu.org>1998-07-08 17:37:50 -0600
commit752e74f910cfe9bacbca383e5ea87e7f39c0e00f (patch)
tree5bd953a50a849d4e66717c40dff62db5fd8aaedd /gcc
parenta550815273219b4b9281b2ec9fd79e2bb6dc1cca (diff)
downloadgcc-752e74f910cfe9bacbca383e5ea87e7f39c0e00f.zip
gcc-752e74f910cfe9bacbca383e5ea87e7f39c0e00f.tar.gz
gcc-752e74f910cfe9bacbca383e5ea87e7f39c0e00f.tar.bz2
jump.c (duplicate_loop_exit_test): Do not duplicate the loop exit test if the exit code has an insn with ASM_OPERANDS.
* 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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog3
-rw-r--r--gcc/jump.c8
2 files changed, 10 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 5675c37..31ed342 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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.
diff --git a/gcc/jump.c b/gcc/jump.c
index 7184e11..4bc925d 100644
--- a/gcc/jump.c
+++ b/gcc/jump.c
@@ -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: