summaryrefslogtreecommitdiff
path: root/gcc/unroll.c
diff options
context:
space:
mode:
authorwilson <wilson@138bc75d-0d04-0410-961f-82ee72b054a4>1994-07-03 01:14:43 +0000
committerwilson <wilson@138bc75d-0d04-0410-961f-82ee72b054a4>1994-07-03 01:14:43 +0000
commit124df6e0f685975fa2c6bd7fe64d7a03c5f9516a (patch)
treeb6c065365a005bbc4a112ca043ca60d838e08b9e /gcc/unroll.c
parent0b9871981339ed06116e06fb17eae6472ba90a91 (diff)
downloadgcc-124df6e0f685975fa2c6bd7fe64d7a03c5f9516a.tar.gz
(loop_iterations): Only use REG_EQUAL note value if it
is constant. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@7648 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/unroll.c')
-rw-r--r--gcc/unroll.c6
1 files changed, 5 insertions, 1 deletions
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;