Commit d3ef8c53 by Jakub Jelinek Committed by Jakub Jelinek

re PR middle-end/59150 (ICE: in expand_one_var, at cfgexpand.c:1242 with -fopenmp)

	PR middle-end/59150
	* tree-vect-data-refs.c (vect_analyze_data_refs): For clobbers, call
	free_data_ref on the dr first, and before goto again also set dr
	to the next dr.  For simd_lane_access, free old datarefs[i] before
	overwriting it.  For get_vectype_for_scalar_type failure, don't
	free_data_ref if simd_lane_access.

From-SVN: r207551
parent 2754b38f
2014-02-06 Jakub Jelinek <jakub@redhat.com> 2014-02-06 Jakub Jelinek <jakub@redhat.com>
PR middle-end/59150
* tree-vect-data-refs.c (vect_analyze_data_refs): For clobbers, call
free_data_ref on the dr first, and before goto again also set dr
to the next dr. For simd_lane_access, free old datarefs[i] before
overwriting it. For get_vectype_for_scalar_type failure, don't
free_data_ref if simd_lane_access.
* Makefile.in (prefix.o, cppbuiltin.o): Depend on $(BASEVER). * Makefile.in (prefix.o, cppbuiltin.o): Depend on $(BASEVER).
PR target/60062 PR target/60062
......
...@@ -3297,12 +3297,13 @@ again: ...@@ -3297,12 +3297,13 @@ again:
clobber stmts during vectorization. */ clobber stmts during vectorization. */
if (gimple_clobber_p (stmt)) if (gimple_clobber_p (stmt))
{ {
free_data_ref (dr);
if (i == datarefs.length () - 1) if (i == datarefs.length () - 1)
{ {
datarefs.pop (); datarefs.pop ();
break; break;
} }
datarefs[i] = datarefs.pop (); datarefs[i] = dr = datarefs.pop ();
goto again; goto again;
} }
...@@ -3643,13 +3644,14 @@ again: ...@@ -3643,13 +3644,14 @@ again:
if (simd_lane_access) if (simd_lane_access)
{ {
STMT_VINFO_SIMD_LANE_ACCESS_P (stmt_info) = true; STMT_VINFO_SIMD_LANE_ACCESS_P (stmt_info) = true;
free_data_ref (datarefs[i]);
datarefs[i] = dr; datarefs[i] = dr;
} }
/* Set vectype for STMT. */ /* Set vectype for STMT. */
scalar_type = TREE_TYPE (DR_REF (dr)); scalar_type = TREE_TYPE (DR_REF (dr));
STMT_VINFO_VECTYPE (stmt_info) = STMT_VINFO_VECTYPE (stmt_info)
get_vectype_for_scalar_type (scalar_type); = get_vectype_for_scalar_type (scalar_type);
if (!STMT_VINFO_VECTYPE (stmt_info)) if (!STMT_VINFO_VECTYPE (stmt_info))
{ {
if (dump_enabled_p ()) if (dump_enabled_p ())
...@@ -3669,6 +3671,7 @@ again: ...@@ -3669,6 +3671,7 @@ again:
if (gather || simd_lane_access) if (gather || simd_lane_access)
{ {
STMT_VINFO_DATA_REF (stmt_info) = NULL; STMT_VINFO_DATA_REF (stmt_info) = NULL;
if (gather)
free_data_ref (dr); free_data_ref (dr);
} }
return false; return false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment