===================================================================
@@ -223,7 +223,8 @@ code_size_limit_factor(struct loop *loop)
/* Next, set the value of the codesize-based unroll factor divisor which in
most loops will need to be set to a value that will reduce or eliminate
unrolling/peeling. */
- if (profile_info->num_hot_counters < size_threshold * 2)
+ if (profile_info->num_hot_counters < size_threshold * 2
+ && loop->header->count > 0)
{
/* For applications that are less than twice the codesize limit, allow
limited unrolling for very hot loops. */