Commit 34cd48e5 by Richard Biener Committed by Richard Biener

tree-vect-stmts.c (vectorizable_load): Set new vinfo only if it was not yet set.

2015-12-09  Richard Biener  <rguenther@suse.de>

	* tree-vect-stmts.c (vectorizable_load): Set new vinfo only
	if it was not yet set.
	* tree-vectorizer.h (set_vinfo_for_stmt): Assert we don't
	overwrite an existing entry.

From-SVN: r231443
parent 37074a02
2015-12-09 Richard Biener <rguenther@suse.de>
* tree-vect-stmts.c (vectorizable_load): Set new vinfo only
if it was not yet set.
* tree-vectorizer.h (set_vinfo_for_stmt): Assert we don't
overwrite an existing entry.
2015-12-09 Chung-Lin Tang <cltang@codesourcery.com>
* c-family/c-omp.c (c_finish_oacc_wait): Remove add_stmt() call.
......@@ -7276,6 +7276,9 @@ vectorizable_load (gimple *stmt, gimple_stmt_iterator *gsi, gimple **vec_stmt,
unshare_expr
(gimple_assign_rhs1 (stmt))));
new_temp = vect_init_vector (stmt, tem, vectype, NULL);
new_stmt = SSA_NAME_DEF_STMT (new_temp);
set_vinfo_for_stmt (new_stmt,
new_stmt_vec_info (new_stmt, vinfo));
}
else
{
......@@ -7283,10 +7286,8 @@ vectorizable_load (gimple *stmt, gimple_stmt_iterator *gsi, gimple **vec_stmt,
gsi_next (&gsi2);
new_temp = vect_init_vector (stmt, scalar_dest,
vectype, &gsi2);
new_stmt = SSA_NAME_DEF_STMT (new_temp);
}
new_stmt = SSA_NAME_DEF_STMT (new_temp);
set_vinfo_for_stmt (new_stmt,
new_stmt_vec_info (new_stmt, vinfo));
}
if (negative)
......
......@@ -715,7 +715,10 @@ set_vinfo_for_stmt (gimple *stmt, stmt_vec_info info)
stmt_vec_info_vec.safe_push (info);
}
else
stmt_vec_info_vec[uid - 1] = info;
{
gcc_checking_assert (info == NULL);
stmt_vec_info_vec[uid - 1] = info;
}
}
/* Return the earlier statement between STMT1 and STMT2. */
......
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