aboutsummaryrefslogtreecommitdiff
path: root/gcc/recog.c
diff options
context:
space:
mode:
authorKaz Kojima <kkojima@gcc.gnu.org>2005-10-23 21:15:18 +0000
committerKaz Kojima <kkojima@gcc.gnu.org>2005-10-23 21:15:18 +0000
commit034145450454972c6ac635706c4c279b15a1e52e (patch)
treec58fff39baf8ba2c2774d18b13eddf3fda41cb6c /gcc/recog.c
parentad238e4ff7d574bf58d5345ca050949c866867d3 (diff)
downloadgcc-034145450454972c6ac635706c4c279b15a1e52e.zip
gcc-034145450454972c6ac635706c4c279b15a1e52e.tar.gz
gcc-034145450454972c6ac635706c4c279b15a1e52e.tar.bz2
re PR target/23832 (libjava build failure on sh64)
PR target/23832 * recog.c (peephole2_optimize): Increment peep2_current_count only when the slot is empty. From-SVN: r105827
Diffstat (limited to 'gcc/recog.c')
-rw-r--r--gcc/recog.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/recog.c b/gcc/recog.c
index 1b8394c..111f9cb 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);