diff options
Diffstat (limited to 'gcc/tree-vectorizer.c')
-rw-r--r-- | gcc/tree-vectorizer.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/gcc/tree-vectorizer.c b/gcc/tree-vectorizer.c index e82750c..48eed40 100644 --- a/gcc/tree-vectorizer.c +++ b/gcc/tree-vectorizer.c @@ -1887,11 +1887,13 @@ vector_costs::better_epilogue_loop_than_p (const vector_costs *other, { unsigned HOST_WIDE_INT main_vf_max = estimated_poly_value (main_poly_vf, POLY_VALUE_MAX); + unsigned HOST_WIDE_INT other_vf_max + = estimated_poly_value (other_vf, POLY_VALUE_MAX); + unsigned HOST_WIDE_INT this_vf_max + = estimated_poly_value (this_vf, POLY_VALUE_MAX); - other_factor = main_vf_max / estimated_poly_value (other_vf, - POLY_VALUE_MAX); - this_factor = main_vf_max / estimated_poly_value (this_vf, - POLY_VALUE_MAX); + other_factor = CEIL (main_vf_max, other_vf_max); + this_factor = CEIL (main_vf_max, this_vf_max); /* If the loop is not using partial vectors then it will iterate one time less than one that does. It is safe to subtract one here, |