This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]