aboutsummaryrefslogtreecommitdiff
path: root/gcc/loop.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/loop.c')
-rw-r--r--gcc/loop.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/loop.c b/gcc/loop.c
index a3b2bb0..59628fd 100644
--- a/gcc/loop.c
+++ b/gcc/loop.c
@@ -7797,7 +7797,8 @@ check_dbra_loop (loop_end, insn_count, loop_start, loop_info)
}
}
}
- else if (INTVAL (bl->biv->add_val) > 0)
+ else if (GET_CODE (bl->biv->add_val) == CONST_INT
+ && INTVAL (bl->biv->add_val) > 0)
{
/* Try to change inc to dec, so can apply above optimization. */
/* Can do this if: