Fix ICE in vectorizable_store ().

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

From-SVN: r232568
This commit is contained in:
Kirill Yukhin 2016-01-19 14:37:23 +00:00 committed by Kirill Yukhin
parent d6874f5662
commit f4d0971224
2 changed files with 11 additions and 2 deletions

View File

@ -1,3 +1,8 @@
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>
PR jit/68446

View File

@ -5282,7 +5282,7 @@ vectorizable_store (gimple *stmt, gimple_stmt_iterator *gsi, gimple **vec_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);
if (loop_vinfo)
@ -5308,7 +5308,8 @@ vectorizable_store (gimple *stmt, gimple_stmt_iterator *gsi, gimple **vec_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 ())
dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location,
@ -5316,6 +5317,9 @@ vectorizable_store (gimple *stmt, gimple_stmt_iterator *gsi, gimple **vec_stmt,
return false;
}
if (rhs_vectype && !useless_type_conversion_p (vectype, rhs_vectype))
return false;
elem_type = TREE_TYPE (vectype);
vec_mode = TYPE_MODE (vectype);