This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Make vectorizer to use likely upper bounds
- From: Jan Hubicka <hubicka at ucw dot cz>
- To: gcc-patches at gcc dot gnu dot org
- Date: Sun, 29 May 2016 20:57:37 +0200
- Subject: Make vectorizer to use likely upper bounds
- Authentication-results: sourceware.org; auth=none
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