diff options
author | Jim Wilson <wilson@gcc.gnu.org> | 1994-07-02 18:14:43 -0700 |
---|---|---|
committer | Jim Wilson <wilson@gcc.gnu.org> | 1994-07-02 18:14:43 -0700 |
commit | f0c94be0eb12ba81c9c2c893ba6d85a8bd28267f (patch) | |
tree | b6c065365a005bbc4a112ca043ca60d838e08b9e | |
parent | 6859741315c5be659065d18e1cb17b183f5c006d (diff) | |
download | gcc-f0c94be0eb12ba81c9c2c893ba6d85a8bd28267f.zip gcc-f0c94be0eb12ba81c9c2c893ba6d85a8bd28267f.tar.gz gcc-f0c94be0eb12ba81c9c2c893ba6d85a8bd28267f.tar.bz2 |
(loop_iterations): Only use REG_EQUAL note value if it
is constant.
From-SVN: r7648
-rw-r--r-- | gcc/unroll.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/unroll.c b/gcc/unroll.c index 3f628bd..9b968ac 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; |