+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
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)
}
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,
return false;
}
+ if (rhs_vectype && !useless_type_conversion_p (vectype, rhs_vectype))
+ return false;
+
elem_type = TREE_TYPE (vectype);
vec_mode = TYPE_MODE (vectype);