From: Richard Guenther Date: Tue, 23 Aug 2011 10:20:26 +0000 (+0000) Subject: re PR tree-optimization/50162 (Wrong vectorization) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=336ecb6550395820cea7c0bbc13c0b7bb5045e91;p=gcc.git re PR tree-optimization/50162 (Wrong vectorization) 2011-08-23 Richard Guenther PR tree-optimization/50162 * tree-vect-stmts.c (vectorizable_call): Fix argument lookup. From-SVN: r177984 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 3913dbf7bef..6c07b82295f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2011-08-23 Richard Guenther + + PR tree-optimization/50162 + * tree-vect-stmts.c (vectorizable_call): Fix argument lookup. + 2011-08-23 Richard Guenther * tree-data-ref.c (dr_analyze_indices): Add comments, handle diff --git a/gcc/tree-vect-stmts.c b/gcc/tree-vect-stmts.c index bab19b8845b..3b5fa01f8fb 100644 --- a/gcc/tree-vect-stmts.c +++ b/gcc/tree-vect-stmts.c @@ -1697,7 +1697,7 @@ vectorizable_call (gimple stmt, gimple_stmt_iterator *gsi, gimple *vec_stmt) } else { - vec_oprnd1 = gimple_call_arg (new_stmt, 2*i); + vec_oprnd1 = gimple_call_arg (new_stmt, 2*i + 1); vec_oprnd0 = vect_get_vec_def_for_stmt_copy (dt[i], vec_oprnd1); vec_oprnd1