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>
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).
PR target/60062
......
......@@ -3297,12 +3297,13 @@ again:
clobber stmts during vectorization. */
if (gimple_clobber_p (stmt))
{
free_data_ref (dr);
if (i == datarefs.length () - 1)
{
datarefs.pop ();
break;
}
datarefs[i] = datarefs.pop ();
datarefs[i] = dr = datarefs.pop ();
goto again;
}
......@@ -3643,13 +3644,14 @@ again:
if (simd_lane_access)
{
STMT_VINFO_SIMD_LANE_ACCESS_P (stmt_info) = true;
free_data_ref (datarefs[i]);
datarefs[i] = dr;
}
/* Set vectype for STMT. */
scalar_type = TREE_TYPE (DR_REF (dr));
STMT_VINFO_VECTYPE (stmt_info) =
get_vectype_for_scalar_type (scalar_type);
STMT_VINFO_VECTYPE (stmt_info)
= get_vectype_for_scalar_type (scalar_type);
if (!STMT_VINFO_VECTYPE (stmt_info))
{
if (dump_enabled_p ())
......@@ -3669,7 +3671,8 @@ again:
if (gather || simd_lane_access)
{
STMT_VINFO_DATA_REF (stmt_info) = NULL;
free_data_ref (dr);
if (gather)
free_data_ref (dr);
}
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