tree-vect-loop.c (vect_analyze_loop_2): Use also max_loop_iterations_int.
authorJan Hubicka <hubicka@ucw.cz>
Thu, 19 May 2016 15:50:56 +0000 (17:50 +0200)
committerJan Hubicka <hubicka@gcc.gnu.org>
Thu, 19 May 2016 15:50:56 +0000 (15:50 +0000)
* tree-vect-loop.c (vect_analyze_loop_2): Use also
max_loop_iterations_int.

From-SVN: r236478

gcc/ChangeLog
gcc/tree-vect-loop.c

index 4900c7e2d4643f8aa6ab5eea945620e844b88da5..3d68ae1c237feac475eb48fa3a0fab961ade3412 100644 (file)
@@ -1,3 +1,8 @@
+2016-05-19  Jan Hubicka  <hubicka@ucw.cz>
+
+       * tree-vect-loop.c (vect_analyze_loop_2): Use also 
+       max_loop_iterations_int.
+
 2016-05-19  Marek Polacek  <polacek@redhat.com>
 
        PR tree-optimization/71031
index 67053af324640d0ecde7f90d7aaf22983cf33436..153372b4d3d9f68c40b588d237bdc5abdd6a865c 100644 (file)
@@ -2065,6 +2065,8 @@ start_over:
 
   estimated_niter
     = estimated_stmt_executions_int (LOOP_VINFO_LOOP (loop_vinfo));
+  if (estimated_niter == -1)
+    estimated_niter = max_niter;
   if (estimated_niter != -1
       && ((unsigned HOST_WIDE_INT) estimated_niter
           <= MAX (th, (unsigned)min_profitable_estimate)))