diff mbox

Fix PR50162

Message ID alpine.LNX.2.00.1108231217380.2130@zhemvz.fhfr.qr
State New
Headers show

Commit Message

Richard Biener Aug. 23, 2011, 10:19 a.m. UTC
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.
diff mbox

Patch

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