From 225a7e3dabcc242145202f0a76d01a765a1a658e Mon Sep 17 00:00:00 2001 From: Jeffrey A Law Date: Sat, 21 Nov 1998 21:14:46 +0000 Subject: [PATCH] loop.c (check_dbra_loop): Avoid using gen_add2_insn. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit � * loop.c (check_dbra_loop): Avoid using gen_add2_insn. From-SVN: r23745 --- gcc/ChangeLog | 4 ++++ gcc/loop.c | 12 ++++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 837d4ef8f78..7253ffad9ce 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +Sat Nov 21 22:12:09 1998 Jeffrey A Law (law@cygnus.com) + + * loop.c (check_dbra_loop): Avoid using gen_add2_insn. + Sat Nov 21 02:18:38 1998 J"orn Rennecke * loop.c (move_movables): Start of libcall might be new loop start. diff --git a/gcc/loop.c b/gcc/loop.c index bce59ad318b..7eafea08df1 100644 --- a/gcc/loop.c +++ b/gcc/loop.c @@ -7061,10 +7061,14 @@ check_dbra_loop (loop_end, insn_count, loop_start) better to have a testcase first. */ return 0; - /* Add insn to decrement register, and delete insn - that incremented the register. */ - p = emit_insn_before (gen_add2_insn (reg, new_add_val), - bl->biv->insn); + /* We may not have a single insn which can increment a reg, so + create a sequence to hold all the insns from expand_inc. */ + start_sequence (); + expand_inc (reg, new_add_val); + tem = gen_sequence (); + end_sequence (); + + p = emit_insn_before (tem, bl->biv->insn); delete_insn (bl->biv->insn); /* Update biv info to reflect its new status. */ -- 2.30.2