diff options
Diffstat (limited to 'gcc/tree-ssa-loop-niter.c')
-rw-r--r-- | gcc/tree-ssa-loop-niter.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/tree-ssa-loop-niter.c b/gcc/tree-ssa-loop-niter.c index b97f1db..b067a0d 100644 --- a/gcc/tree-ssa-loop-niter.c +++ b/gcc/tree-ssa-loop-niter.c @@ -3510,6 +3510,12 @@ infer_loop_bounds_from_signedness (struct loop *loop, gimple *stmt) low = lower_bound_in_type (type, type); high = upper_bound_in_type (type, type); + wide_int minv, maxv; + if (get_range_info (def, &minv, &maxv) == VR_RANGE) + { + low = wide_int_to_tree (type, minv); + high = wide_int_to_tree (type, maxv); + } record_nonwrapping_iv (loop, base, step, stmt, low, high, false, true); } |