From: Jim Wilson Date: Sun, 3 Jul 1994 01:14:43 +0000 (-0700) Subject: (loop_iterations): Only use REG_EQUAL note value if it X-Git-Tag: misc/cutover-egcs-0~6295 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f0c94be0eb12ba81c9c2c893ba6d85a8bd28267f;p=thirdparty%2Fgcc.git (loop_iterations): Only use REG_EQUAL note value if it is constant. From-SVN: r7648 --- diff --git a/gcc/unroll.c b/gcc/unroll.c index 3f628bddc8a7..9b968ac9696c 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;