From 26c86972af57d2d1f645ff2118de00b50ac8234e Mon Sep 17 00:00:00 2001 From: Richard Guenther Date: Mon, 4 Aug 2008 17:22:17 +0000 Subject: [PATCH] tree-vect-transform.c (vectorizable_call): Fix tuplification. 2008-08-04 Richard Guenther * tree-vect-transform.c (vectorizable_call): Fix tuplification. From-SVN: r138642 --- gcc/ChangeLog | 4 ++++ gcc/tree-vect-transform.c | 18 +++++++----------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 51138d6..80b26c5 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2008-08-04 Richard Guenther + + * tree-vect-transform.c (vectorizable_call): Fix tuplification. + 2008-08-04 Paul Brook * cofig/arm/arm.c (thumb_core_reg_alloc_order): New. 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; -- 2.7.4