On 30/03/16 14:36, Richard Biener wrote:
On Wed, 30 Mar 2016, Jan Hubicka wrote:
> >
> >You are only changing one place in this file.
>
>You are right. I am attaching the updated patch which I am re-testing now.
> >
> >The vectorizer already checks this (albeit indirectly):
> >
> > HOST_WIDE_INT max_niter
> > = 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
> > && (unsigned HOST_WIDE_INT) max_niter < vectorization_factor))
> > {
> > if (dump_enabled_p ())
> > dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location,
> > "not vectorized: iteration count smaller than "
> > "vectorization factor.\n");
> > return false;
> > }
>
>Yes, but one tests only vectorization_factor and other min_profitable_estimate
>which probably should be greater than vectorization_factor.
>
>The check above should therefore become redundant. My reading of the code is
>that min_profiltable_estimate is computed after the check above, so it is
>probably an useful shortcut and the message is also bit more informative.
>I updated the later test to use max_niter variable once it is computed.
>
>OK with those changes assuming testing passes?
Ok.
This patch caused PR70577 - 'tree-ssa/prefetch-5.c scan-tree-dump-times
aprefetch failures' ( https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70577 ).
Thanks,
- Tom