diff mbox

Make vectorizer to use likely upper bounds

Message ID 20160529185736.GD10245@kam.mff.cuni.cz
State New
Headers show

Commit Message

Jan Hubicka May 29, 2016, 6:57 p.m. UTC
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.
diff mbox

Patch

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