diff options
author | Richard Guenther <rguenther@suse.de> | 2008-08-04 17:22:17 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2008-08-04 17:22:17 +0000 |
commit | 26c86972af57d2d1f645ff2118de00b50ac8234e (patch) | |
tree | 1749dd228b40ea2206a9f113831265de16a7f063 /gcc/tree-vect-transform.c | |
parent | 795dc4fc9010a608ed06857c4781f0c51b839431 (diff) | |
download | gcc-26c86972af57d2d1f645ff2118de00b50ac8234e.zip gcc-26c86972af57d2d1f645ff2118de00b50ac8234e.tar.gz gcc-26c86972af57d2d1f645ff2118de00b50ac8234e.tar.bz2 |
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
Diffstat (limited to 'gcc/tree-vect-transform.c')
-rw-r--r-- | gcc/tree-vect-transform.c | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/gcc/tree-vect-transform.c b/gcc/tree-vect-transform.c index 362d37c..e466594 100644 --- a/gcc/tree-vect-transform.c +++ b/gcc/tree-vect-transform.c @@ -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; |