tree-vect-transform.c (vectorizable_call): Fix tuplification.

2008-08-04  Richard Guenther  <rguenther@suse.de>

	* tree-vect-transform.c (vectorizable_call): Fix tuplification.

From-SVN: r138642
This commit is contained in:
Richard Guenther 2008-08-04 17:22:17 +00:00 committed by Richard Biener
parent 795dc4fc90
commit 26c86972af
2 changed files with 11 additions and 11 deletions

View File

@ -1,3 +1,7 @@
2008-08-04 Richard Guenther <rguenther@suse.de>
* tree-vect-transform.c (vectorizable_call): Fix tuplification.
2008-08-04 Paul Brook <paul@codesourcery.com>
* cofig/arm/arm.c (thumb_core_reg_alloc_order): New.

View File

@ -3127,16 +3127,16 @@ vectorizable_call (gimple stmt, gimple_stmt_iterator *gsi, gimple *vec_stmt)
rhs_type = NULL_TREE;
nargs = gimple_call_num_args (stmt);
/* Bail out if the function has more than two arguments, we
do not have interesting builtin functions to vectorize with
more than two arguments. No arguments is also not good. */
if (nargs == 0 || nargs > 2)
return false;
for (i = 0; i < nargs; i++)
{
op = gimple_call_arg (stmt, i);
/* Bail out if the function has more than two arguments, we
do not have interesting builtin functions to vectorize with
more than two arguments. */
if (i >= 2)
return false;
/* We can only handle calls with arguments of the same type. */
if (rhs_type
&& rhs_type != TREE_TYPE (op))
@ -3147,7 +3147,7 @@ vectorizable_call (gimple stmt, gimple_stmt_iterator *gsi, gimple *vec_stmt)
}
rhs_type = TREE_TYPE (op);
if (!vect_is_simple_use (op, loop_vinfo, &def_stmt, &def, &dt[nargs]))
if (!vect_is_simple_use (op, loop_vinfo, &def_stmt, &def, &dt[i]))
{
if (vect_print_dump_info (REPORT_DETAILS))
fprintf (vect_dump, "use not simple.");
@ -3155,10 +3155,6 @@ vectorizable_call (gimple stmt, gimple_stmt_iterator *gsi, gimple *vec_stmt)
}
}
/* No arguments is also not good. */
if (nargs == 0)
return false;
vectype_in = get_vectype_for_scalar_type (rhs_type);
if (!vectype_in)
return false;