summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorkkojima <kkojima@138bc75d-0d04-0410-961f-82ee72b054a4>2005-10-23 21:15:18 +0000
committerkkojima <kkojima@138bc75d-0d04-0410-961f-82ee72b054a4>2005-10-23 21:15:18 +0000
commit36221a962dfb0a5d4343b1e504eed8d01079c3e1 (patch)
treec58fff39baf8ba2c2774d18b13eddf3fda41cb6c /gcc
parentdaad4fd542e74d22445a05a5be91761f094d4f27 (diff)
downloadgcc-36221a962dfb0a5d4343b1e504eed8d01079c3e1.tar.gz
PR target/23832
* recog.c (peephole2_optimize): Increment peep2_current_count only when the slot is empty. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@105827 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/recog.c6
2 files changed, 10 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 2b8de766fbf..f659e64c12e 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2005-10-23 Kaz Kojima <kkojima@gcc.gnu.org>
+
+ PR target/23832
+ * recog.c (peephole2_optimize): Increment peep2_current_count
+ only when the slot is empty.
+
2005-10-23 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
PR ada/23957
diff --git a/gcc/recog.c b/gcc/recog.c
index 1b8394c47b4..111f9cb62f8 100644
--- a/gcc/recog.c
+++ b/gcc/recog.c
@@ -3091,7 +3091,8 @@ peephole2_optimize (FILE *dump_file ATTRIBUTE_UNUSED)
/* Record this insn. */
if (--peep2_current < 0)
peep2_current = MAX_INSNS_PER_PEEP2;
- if (peep2_current_count < MAX_INSNS_PER_PEEP2)
+ if (peep2_current_count < MAX_INSNS_PER_PEEP2
+ && peep2_insn_data[peep2_current].insn == NULL_RTX)
peep2_current_count++;
peep2_insn_data[peep2_current].insn = insn;
propagate_one_insn (pbi, insn);
@@ -3253,7 +3254,8 @@ peephole2_optimize (FILE *dump_file ATTRIBUTE_UNUSED)
{
if (--i < 0)
i = MAX_INSNS_PER_PEEP2;
- if (peep2_current_count < MAX_INSNS_PER_PEEP2)
+ if (peep2_current_count < MAX_INSNS_PER_PEEP2
+ && peep2_insn_data[i].insn == NULL_RTX)
peep2_current_count++;
peep2_insn_data[i].insn = x;
propagate_one_insn (pbi, x);