Commit f4d09712 by Kirill Yukhin Committed by Kirill Yukhin

Fix ICE in vectorizable_store ().

gcc/
	* tree-vect-stmts.c (vectorizable_store): Check
	rhs vectype.

From-SVN: r232568
parent d6874f56
2016-01-19 Kirill Yukhin <kirill.yukhin@intel.com>
* tree-vect-stmts.c (vectorizable_store): Check
rhs vectype.
2016-01-19 David Malcolm <dmalcolm@redhat.com> 2016-01-19 David Malcolm <dmalcolm@redhat.com>
PR jit/68446 PR jit/68446
......
...@@ -5282,7 +5282,7 @@ vectorizable_store (gimple *stmt, gimple_stmt_iterator *gsi, gimple **vec_stmt, ...@@ -5282,7 +5282,7 @@ vectorizable_store (gimple *stmt, gimple_stmt_iterator *gsi, gimple **vec_stmt,
gcc_assert (gimple_assign_single_p (stmt)); gcc_assert (gimple_assign_single_p (stmt));
tree vectype = STMT_VINFO_VECTYPE (stmt_info); tree vectype = STMT_VINFO_VECTYPE (stmt_info), rhs_vectype = NULL_TREE;
unsigned int nunits = TYPE_VECTOR_SUBPARTS (vectype); unsigned int nunits = TYPE_VECTOR_SUBPARTS (vectype);
if (loop_vinfo) if (loop_vinfo)
...@@ -5308,7 +5308,8 @@ vectorizable_store (gimple *stmt, gimple_stmt_iterator *gsi, gimple **vec_stmt, ...@@ -5308,7 +5308,8 @@ vectorizable_store (gimple *stmt, gimple_stmt_iterator *gsi, gimple **vec_stmt,
} }
op = gimple_assign_rhs1 (stmt); op = gimple_assign_rhs1 (stmt);
if (!vect_is_simple_use (op, vinfo, &def_stmt, &dt))
if (!vect_is_simple_use (op, vinfo, &def_stmt, &dt, &rhs_vectype))
{ {
if (dump_enabled_p ()) if (dump_enabled_p ())
dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location,
...@@ -5316,6 +5317,9 @@ vectorizable_store (gimple *stmt, gimple_stmt_iterator *gsi, gimple **vec_stmt, ...@@ -5316,6 +5317,9 @@ vectorizable_store (gimple *stmt, gimple_stmt_iterator *gsi, gimple **vec_stmt,
return false; return false;
} }
if (rhs_vectype && !useless_type_conversion_p (vectype, rhs_vectype))
return false;
elem_type = TREE_TYPE (vectype); elem_type = TREE_TYPE (vectype);
vec_mode = TYPE_MODE (vectype); vec_mode = TYPE_MODE (vectype);
......
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