From 956d69504d77d301015532d2f0564213f0efc706 Mon Sep 17 00:00:00 2001 From: Jeff Law Date: Sat, 6 Dec 1997 17:31:01 -0700 Subject: Merge from gcc-2.8 From-SVN: r16987 --- gcc/unroll.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'gcc/unroll.c') diff --git a/gcc/unroll.c b/gcc/unroll.c index 688ee64..b2879b3 100644 --- a/gcc/unroll.c +++ b/gcc/unroll.c @@ -2160,6 +2160,7 @@ back_branch_in_range_p (insn, loop_start, loop_end) rtx loop_start, loop_end; { rtx p, q, target_insn; + rtx orig_loop_end = loop_end; /* Stop before we get to the backward branch at the end of the loop. */ loop_end = prev_nonnote_insn (loop_end); @@ -2171,8 +2172,10 @@ back_branch_in_range_p (insn, loop_start, loop_end) while (INSN_DELETED_P (insn)) insn = NEXT_INSN (insn); - /* Check for the case where insn is the last insn in the loop. */ - if (insn == loop_end) + /* Check for the case where insn is the last insn in the loop. Deal + with the case where INSN was a deleted loop test insn, in which case + it will now be the NOTE_LOOP_END. */ + if (insn == loop_end || insn == orig_loop_end) return 0; for (p = NEXT_INSN (insn); p != loop_end; p = NEXT_INSN (p)) -- cgit v1.1