Commit ef785d9f by Richard Biener Committed by Richard Biener

tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Handle memory…

tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Handle memory using/clobbering stmts without a STMT_VINFO_DATA_REF conservatively.

2015-11-10  Richard Biener  <rguenther@suse.de>

	* tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
	Handle memory using/clobbering stmts without a STMT_VINFO_DATA_REF
	conservatively.

From-SVN: r230094
parent a6524bba
2015-11-10 Richard Biener <rguenther@suse.de> 2015-11-10 Richard Biener <rguenther@suse.de>
* tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
Handle memory using/clobbering stmts without a STMT_VINFO_DATA_REF
conservatively.
2015-11-10 Richard Biener <rguenther@suse.de>
PR tree-optimization/56118 PR tree-optimization/56118
* tree-vect-slp.c (vect_bb_vectorization_profitable_p): Make equal * tree-vect-slp.c (vect_bb_vectorization_profitable_p): Make equal
cost favor vectorized version. cost favor vectorized version.
...@@ -573,21 +573,22 @@ vect_slp_analyze_node_dependences (slp_instance instance, slp_tree node) ...@@ -573,21 +573,22 @@ vect_slp_analyze_node_dependences (slp_instance instance, slp_tree node)
gimple *access = SLP_TREE_SCALAR_STMTS (node)[k]; gimple *access = SLP_TREE_SCALAR_STMTS (node)[k];
if (access == last_access) if (access == last_access)
continue; continue;
stmt_vec_info access_stmt_info = vinfo_for_stmt (access); data_reference *dr_a = STMT_VINFO_DATA_REF (vinfo_for_stmt (access));
gimple_stmt_iterator gsi = gsi_for_stmt (access); for (gimple_stmt_iterator gsi = gsi_for_stmt (access);
gsi_next (&gsi); gsi_stmt (gsi) != last_access; gsi_next (&gsi))
for (; gsi_stmt (gsi) != last_access; gsi_next (&gsi))
{ {
gimple *stmt = gsi_stmt (gsi); gimple *stmt = gsi_stmt (gsi);
stmt_vec_info stmt_info = vinfo_for_stmt (stmt); if (! gimple_vuse (stmt)
if (!STMT_VINFO_DATA_REF (stmt_info) || (DR_IS_READ (dr_a) && ! gimple_vdef (stmt)))
|| (DR_IS_READ (STMT_VINFO_DATA_REF (stmt_info))
&& DR_IS_READ (STMT_VINFO_DATA_REF (access_stmt_info))))
continue; continue;
ddr_p ddr = initialize_data_dependence_relation /* If we couldn't record a (single) data reference for this
(STMT_VINFO_DATA_REF (access_stmt_info), stmt we have to give up. */
STMT_VINFO_DATA_REF (stmt_info), vNULL); data_reference *dr_b = STMT_VINFO_DATA_REF (vinfo_for_stmt (stmt));
if (!dr_b)
return false;
ddr_p ddr = initialize_data_dependence_relation (dr_a, dr_b, vNULL);
if (vect_slp_analyze_data_ref_dependence (ddr)) if (vect_slp_analyze_data_ref_dependence (ddr))
{ {
/* ??? If the dependence analysis failed we can resort to the /* ??? If the dependence analysis failed we can resort to the
......
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