From 090cd8dc70b80183c83d9f43f1e6ab9970481efd Mon Sep 17 00:00:00 2001 From: Cong Hou Date: Thu, 3 Apr 2014 19:05:42 -0400 Subject: re PR tree-optimization/60505 (Warning caused by GCC vectorizer.) 2014-04-03 Cong Hou PR tree-optimization/60505 * tree-vectorizer.h (struct _stmt_vec_info): Add th field as the threshold of number of iterations below which no vectorization will be done. * tree-vect-loop.c (new_loop_vec_info): Initialize LOOP_VINFO_COST_MODEL_THRESHOLD. * tree-vect-loop.c (vect_analyze_loop_operations): Set LOOP_VINFO_COST_MODEL_THRESHOLD. * tree-vect-loop.c (vect_transform_loop): Use LOOP_VINFO_COST_MODEL_THRESHOLD. * tree-vect-loop.c (vect_analyze_loop_2): Check the maximum number of iterations of the loop and see if we should build the epilogue. 2014-04-03 Cong Hou PR tree-optimization/60505 * gcc.dg/vect/pr60505.c: New test. From-SVN: r209065 --- gcc/tree-vectorizer.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'gcc/tree-vectorizer.h') diff --git a/gcc/tree-vectorizer.h b/gcc/tree-vectorizer.h index f8efe47..f2087e2 100644 --- a/gcc/tree-vectorizer.h +++ b/gcc/tree-vectorizer.h @@ -264,6 +264,11 @@ typedef struct _loop_vec_info { values unknown at compile time. */ int min_profitable_iters; + /* Threshold of number of iterations below which vectorzation will not be + performed. It is calculated from MIN_PROFITABLE_ITERS and + PARAM_MIN_VECT_LOOP_BOUND. */ + unsigned int th; + /* Is the loop vectorizable? */ bool vectorizable; @@ -382,6 +387,7 @@ typedef struct _loop_vec_info { cost model. */ #define LOOP_VINFO_NITERS_UNCHANGED(L) (L)->num_iters_unchanged #define LOOP_VINFO_COST_MODEL_MIN_ITERS(L) (L)->min_profitable_iters +#define LOOP_VINFO_COST_MODEL_THRESHOLD(L) (L)->th #define LOOP_VINFO_VECTORIZABLE_P(L) (L)->vectorizable #define LOOP_VINFO_VECT_FACTOR(L) (L)->vectorization_factor #define LOOP_VINFO_PTR_MASK(L) (L)->ptr_mask -- cgit v1.1