On Thu, Oct 31, 2013 at 07:02:28PM +0400, Yuri Rumyantsev wrote: > Here is a simple fix which allows to vectorize loop marked with > 'pragma omp simd' even if cost model tells us that vectorization is > not profitable. > I checked that on simple test-case is works as expected. > > Is it Ok for trunk? > > ChangeLog: > > 2013-10-31 Yuri Rumyantsev <ysrum...@gmail.com> > > * tree-vect-loop.c (vect_estimate_min_profitable_iters): Override > cost estimation for loops marked as vectorizable.
That looks too simplistics, IMHO it is undesirable to disregard the profitability checks together. For #pragma omp simd or #pragma simd loops, I can understand that we should admit our cost model is not very high quality and so in border cases consider vectorizing rather than not vectorizing, say for force_vect by increasing the scalar cost by some factor or decreasing vector cost by some factor, but disregarding it altogether doesn't look wise. The question is what factor should we use? 150% of scalar cost, something else? Jakub