This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Fix PR50162
- From: Richard Guenther <rguenther at suse dot de>
- To: gcc-patches at gcc dot gnu dot org
- Date: Tue, 23 Aug 2011 12:19:39 +0200 (CEST)
- Subject: [PATCH] Fix PR50162
We fail to properly lookup the last argument of a pair of vectorized
args when vectorizing a packing function call.
Bootstrapped and tested on x86_64-unknown-linux-gnu, applied to trunk
sofar, to eventually catch fallout.
Richard.
2011-08-23 Richard Guenther <rguenther@suse.de>
PR tree-optimization/50162
* tree-vect-stmts.c (vectorizable_call): Fix argument lookup.
Index: gcc/tree-vect-stmts.c
===================================================================
--- gcc/tree-vect-stmts.c (revision 177983)
+++ gcc/tree-vect-stmts.c (working copy)
@@ -1697,7 +1697,7 @@ vectorizable_call (gimple stmt, gimple_s
}
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