Patchwork Fix part of PR30442

login
register
mail settings
Submitter Richard Guenther
Date June 5, 2012, 2:25 p.m.
Message ID <Pine.LNX.4.64.1206051625250.29541@jbgna.fhfr.qr>
Download mbox | patch
Permalink /patch/163088/
State New
Headers show

Comments

Richard Guenther - June 5, 2012, 2:25 p.m.
On Tue, 5 Jun 2012, Richard Guenther wrote:

> On Tue, 5 Jun 2012, Nathan Froyd wrote:
> 
> > On Tue, Jun 05, 2012 at 02:35:30PM +0200, Richard Guenther wrote:
> > > Index: gcc/tree-vect-data-refs.c
> > > ! 	  gimple stmt = gsi_stmt (gsi);
> > > ! 	  if (!find_data_references_in_stmt (NULL, stmt,
> > > ! 					     &BB_VINFO_DATAREFS (bb_vinfo)))
> > > ! 	    {
> > > ! 	      /* Mark the rest of the basic-block as unvectorizable.  */
> > > ! 	      for (; !gsi_end_p (gsi); gsi_next (&gsi))
> > 
> > I see iteration through the rest of the basic block...
> > 
> > > ! 		STMT_VINFO_VECTORIZABLE (vinfo_for_stmt (stmt)) = false;
> > 
> > ...but I don't see corresponding updates to stmt.
> 
> Eh ...
> 
> fix in testing.

Tested on x86_64-unknown-linxu-gnu, applied.

Richard.

2012-06-05  Richard Guenther  <rguenther@suse.de>

	* tree-vect-data-refs.c (vect_analyze_data_refs): Fix last
	change.

Patch

Index: gcc/tree-vect-data-refs.c
===================================================================
--- gcc/tree-vect-data-refs.c	(revision 188235)
+++ gcc/tree-vect-data-refs.c	(working copy)
@@ -2855,7 +2855,10 @@  vect_analyze_data_refs (loop_vec_info lo
 	    {
 	      /* Mark the rest of the basic-block as unvectorizable.  */
 	      for (; !gsi_end_p (gsi); gsi_next (&gsi))
-		STMT_VINFO_VECTORIZABLE (vinfo_for_stmt (stmt)) = false;
+		{
+		  stmt = gsi_stmt (gsi);
+		  STMT_VINFO_VECTORIZABLE (vinfo_for_stmt (stmt)) = false;
+		}
 	      break;
 	    }
 	}