From 4dc7782d15938a44634f16465a4dab55a25d70d2 Mon Sep 17 00:00:00 2001 From: Jeff Law Date: Wed, 22 Mar 2006 11:00:50 -0700 Subject: loop-unroll.c (analyze_iv_to_split_insn): Handle iv_analyze_result returning false. * loop-unroll.c (analyze_iv_to_split_insn): Handle iv_analyze_result returning false. From-SVN: r112289 --- gcc/loop-unroll.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'gcc/loop-unroll.c') diff --git a/gcc/loop-unroll.c b/gcc/loop-unroll.c index 6ef59476657..5c28eaf2f19 100644 --- a/gcc/loop-unroll.c +++ b/gcc/loop-unroll.c @@ -1670,7 +1670,17 @@ analyze_iv_to_split_insn (rtx insn) return NULL; ok = iv_analyze_result (insn, dest, &iv); - gcc_assert (ok); + + /* This used to be an assert under the assumption that if biv_p returns + true that iv_analyze_result must also return true. However, that + assumption is not strictly correct as evidenced by pr25569. + + Returning NULL when iv_analyze_result returns false is safe and + avoids the problems in pr25569 until the iv_analyze_* routines + can be fixed, which is apparently hard and time consuming + according to their author. */ + if (! ok) + return NULL; if (iv.step == const0_rtx || iv.mode != iv.extend_mode) -- cgit v1.2.1