aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJim Wilson <wilson@gcc.gnu.org>1996-06-06 12:05:21 -0700
committerJim Wilson <wilson@gcc.gnu.org>1996-06-06 12:05:21 -0700
commitbb91b814bd698e504ccdcc5c426060ea659438fc (patch)
treeedcf3aaa2a0e050a6e77bbb46d211ef6aa790a98 /gcc
parent7d473b076dd3c41fa46f835564a0827c28f0422e (diff)
downloadgcc-bb91b814bd698e504ccdcc5c426060ea659438fc.zip
gcc-bb91b814bd698e504ccdcc5c426060ea659438fc.tar.gz
gcc-bb91b814bd698e504ccdcc5c426060ea659438fc.tar.bz2
(strength_reduce): If HAVE_cc0 defined, disable auto_inc_opt
if it would put an insn between a cc0 setter/user pair. From-SVN: r12176
Diffstat (limited to 'gcc')
-rw-r--r--gcc/loop.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/loop.c b/gcc/loop.c
index 0ee43c9..8e48236 100644
--- a/gcc/loop.c
+++ b/gcc/loop.c
@@ -3937,6 +3937,15 @@ strength_reduce (scan_start, end, loop_top, insn_count,
else
auto_inc_opt = 1;
+#ifdef HAVE_cc0
+ /* We can't put an insn immediately after one setting
+ cc0, or immediately before one using cc0. */
+ if ((auto_inc_opt == 1 && sets_cc0_p (PATTERN (v->insn)))
+ || (auto_inc_opt == -1
+ && sets_cc0_p (PATTERN (prev_nonnote_insn (v->insn)))))
+ auto_inc_opt = 0;
+#endif
+
if (auto_inc_opt)
v->auto_inc_opt = 1;
}