Hi,
this patch makes vectorizer to give up when likely maximal number of iterations
is low.
boostrapped/regtested x86_64-linux, will commit it once benchmark machines
pick up the earlier changes.
* tree-vect-loop.c (vect_analyze_loop_2): Use
likely_max_stmt_executions_int.
Index: tree-vect-loop.c
===================================================================
--- tree-vect-loop.c (revision 236850)
+++ tree-vect-loop.c (working copy)
@@ -1945,7 +1945,7 @@ start_over:
LOOP_VINFO_INT_NITERS (loop_vinfo));
HOST_WIDE_INT max_niter
- = max_stmt_executions_int (LOOP_VINFO_LOOP (loop_vinfo));
+ = likely_max_stmt_executions_int (LOOP_VINFO_LOOP (loop_vinfo));
if ((LOOP_VINFO_NITERS_KNOWN_P (loop_vinfo)
&& (LOOP_VINFO_INT_NITERS (loop_vinfo) < vectorization_factor))
|| (max_niter != -1