From f0c94be0eb12ba81c9c2c893ba6d85a8bd28267f Mon Sep 17 00:00:00 2001 From: Jim Wilson Date: Sat, 2 Jul 1994 18:14:43 -0700 Subject: [PATCH] (loop_iterations): Only use REG_EQUAL note value if it is constant. From-SVN: r7648 --- gcc/unroll.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gcc/unroll.c b/gcc/unroll.c index 3f628bddc8a..9b968ac9696 100644 --- a/gcc/unroll.c +++ b/gcc/unroll.c @@ -3160,7 +3160,11 @@ loop_iterations (loop_start, loop_end) { rtx note = find_reg_note (insn, REG_EQUAL, NULL_RTX); - if (note && GET_CODE (XEXP (note, 0)) != EXPR_LIST) + /* Only use the REG_EQUAL note if it is a constant. + Other things, divide in particular, will cause + problems later if we use them. */ + if (note && GET_CODE (XEXP (note, 0)) != EXPR_LIST + && CONSTANT_P (XEXP (note, 0))) comparison_value = XEXP (note, 0); } break; -- 2.30.2