re PR tree-optimization/50162 (Wrong vectorization)
authorRichard Guenther <rguenther@suse.de>
Tue, 23 Aug 2011 10:20:26 +0000 (10:20 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Tue, 23 Aug 2011 10:20:26 +0000 (10:20 +0000)
2011-08-23  Richard Guenther  <rguenther@suse.de>

PR tree-optimization/50162
* tree-vect-stmts.c (vectorizable_call): Fix argument lookup.

From-SVN: r177984

gcc/ChangeLog
gcc/tree-vect-stmts.c

index 3913dbf7bef67bc406f6d9bade375d8d183b8889..6c07b82295fdc131936a9e8aa8dbebfb05673f42 100644 (file)
@@ -1,3 +1,8 @@
+2011-08-23  Richard Guenther  <rguenther@suse.de>
+
+       PR tree-optimization/50162
+       * tree-vect-stmts.c (vectorizable_call): Fix argument lookup.
+
 2011-08-23  Richard Guenther  <rguenther@suse.de>
 
        * tree-data-ref.c (dr_analyze_indices): Add comments, handle
index bab19b8845b498b6f5fe44e57c754f24dc068508..3b5fa01f8fbd700144d63fe161e81f7b8bc40a5f 100644 (file)
@@ -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