This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix PR46723


On Thu, 2 Dec 2010, Richard Guenther wrote:

> On Thu, 2 Dec 2010, Ira Rosen wrote:
> 
> > 
> > 
> > Richard Guenther <rguenther@suse.de> wrote on 02/12/2010 02:32:53 PM:
> > 
> > > This tries to fix PR46723 where vectorizer analysis of induction
> > > fails to recongize the effect that peeling does on SCEV analysis
> > > and the result doesn't end up being properly analyzable.  The
> > > fix here is to treat sign changing conversions like we do at
> > > copy statements - use a vector VIEW_CONVERT_EXPR at uses.
> > >
> > > The patch doesn't touch the analysis part which makes the patch
> > eventually
> > > more suitable for backporting to 4.5.  But in principle we can
> > > ignore this kind of conversions at analysis time as well.
> > 
> > It's only a matter of adding STRIP_NOPS in the analysis (in
> > vect_analyze_scalar_cycles_1), right?
> 
> Yes.
> 
> > Maybe we can do that for 4.6 only?
> 
> Ok, I'll test a patch doing that (I'll commit it separately so
> we can bisect in case that change alone causes a regression).

Committed as rev. 167377.

I bootstrapped and tested the following on x86_64-unknown-linux-gnu
and committed to trunk.

Richard.

2010-12-02  Richard Guenther  <rguenther@suse.de>

	* tree-vect-loop.c (vect_analyze_scalar_cycles_1): Disregard
	sign-changing conversions for induction detection.

Index: gcc/tree-vect-loop.c
===================================================================
*** gcc/tree-vect-loop.c	(revision 167377)
--- gcc/tree-vect-loop.c	(working copy)
*************** vect_analyze_scalar_cycles_1 (loop_vec_i
*** 478,483 ****
--- 478,485 ----
  
        /* Analyze the evolution function.  */
        access_fn = analyze_scalar_evolution (loop, def);
+       if (access_fn)
+ 	STRIP_NOPS (access_fn);
        if (access_fn && vect_print_dump_info (REPORT_DETAILS))
  	{
  	  fprintf (vect_dump, "Access function of PHI: ");


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]