Reviewed-by: vlivanov, dpochepk
Prevent over-unrolling of loops by computing upper bound for trip count. Reviewed-by: kvn