Commit 2fa6eeff by Ulrich Weigand Committed by Ulrich Weigand

tree-vect-generic.c (expand_vector_operations_1): When using vector/ vector…

tree-vect-generic.c (expand_vector_operations_1): When using vector/ vector optab to expand vector/scalar shift...

	* tree-vect-generic.c (expand_vector_operations_1): When using vector/
	vector optab to expand vector/scalar shift, update gimple to vector.

From-SVN: r168423
parent 76df0ae6
2010-01-03 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
* tree-vect-generic.c (expand_vector_operations_1): When using vector/
vector optab to expand vector/scalar shift, update gimple to vector.
2011-01-03 Martin Jambor <mjambor@suse.cz>
* cgraphunit.c (verify_cgraph_node): Verify there is no direct call to
......
......@@ -520,7 +520,24 @@ expand_vector_operations_1 (gimple_stmt_iterator *gsi)
/* Try for a vector/scalar shift, and if we don't have one, see if we
have a vector/vector shift */
else if (!vector_scalar_shift)
op = optab_for_tree_code (code, type, optab_vector);
{
op = optab_for_tree_code (code, type, optab_vector);
if (op && (optab_handler (op, TYPE_MODE (type))
!= CODE_FOR_nothing))
{
/* Transform vector <op> scalar => vector <op> {x,x,x,x}. */
int n_parts = TYPE_VECTOR_SUBPARTS (type);
int part_size = tree_low_cst (TYPE_SIZE (TREE_TYPE (type)), 1);
tree part_type = lang_hooks.types.type_for_size (part_size, 1);
tree vect_type = build_vector_type (part_type, n_parts);
rhs2 = fold_convert (part_type, rhs2);
rhs2 = build_vector_from_val (vect_type, rhs2);
gimple_assign_set_rhs2 (stmt, rhs2);
update_stmt (stmt);
}
}
}
else
op = optab_for_tree_code (code, type, optab_default);
......
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