diff options
-rw-r--r-- | gcc/ChangeLog | 4 | ||||
-rw-r--r-- | 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 <amylaar@cygnus.co.uk> * 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. */ |