aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-vect-loop-manip.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree-vect-loop-manip.cc')
-rw-r--r--gcc/tree-vect-loop-manip.cc14
1 files changed, 13 insertions, 1 deletions
diff --git a/gcc/tree-vect-loop-manip.cc b/gcc/tree-vect-loop-manip.cc
index 4696943..2d01a4b 100644
--- a/gcc/tree-vect-loop-manip.cc
+++ b/gcc/tree-vect-loop-manip.cc
@@ -2859,7 +2859,19 @@ vect_gen_vector_loop_niters (loop_vec_info loop_vinfo, tree niters,
we have to represent the vector niter TYPE_MAX_VALUE + 1 / vf. */
if (stmts != NULL && const_vf > 0)
{
- if (niters_no_overflow)
+ if (niters_no_overflow
+ && LOOP_VINFO_USING_PARTIAL_VECTORS_P (loop_vinfo))
+ {
+ int_range<1> vr (type,
+ wi::one (TYPE_PRECISION (type)),
+ wi::div_ceil (wi::max_value
+ (TYPE_PRECISION (type),
+ TYPE_SIGN (type)),
+ const_vf,
+ TYPE_SIGN (type)));
+ set_range_info (niters_vector, vr);
+ }
+ else if (niters_no_overflow)
{
int_range<1> vr (type,
wi::one (TYPE_PRECISION (type)),