Commit 7daac345 by Jakub Jelinek Committed by Jakub Jelinek

re PR tree-optimization/52210 (vect_model_simple_cost: reading uninitialised memory)

	PR tree-optimization/52210
	* tree-vect-slp.c (vect_get_and_check_slp_defs): Call
	vect_model_simple_cost with two entry vect_def_type array instead
	of an address of dt.

	* gcc.dg/pr52210.c: New test.

From-SVN: r184201
parent 837487be
2012-02-14 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/52210
* tree-vect-slp.c (vect_get_and_check_slp_defs): Call
vect_model_simple_cost with two entry vect_def_type array instead
of an address of dt.
2012-02-14 Richard Guenther <rguenther@suse.de>
PR lto/52178
......
2012-02-14 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/52210
* gcc.dg/pr52210.c: New test.
2012-02-14 Jason Merrill <jason@redhat.com>
PR c++/39055
......
/* PR tree-optimization/52210 */
/* { dg-do compile } */
/* { dg-options "-O3" } */
void
foo (long *x, long y, long z)
{
long a = x[0];
long b = x[1];
x[0] = a & ~y;
x[1] = b & ~z;
}
......@@ -321,10 +321,15 @@ vect_get_and_check_slp_defs (loop_vec_info loop_vinfo, bb_vec_info bb_vinfo,
vect_model_store_cost (stmt_info, ncopies_for_cost, false,
dt, slp_node);
else
/* Not memory operation (we don't call this function for
loads). */
vect_model_simple_cost (stmt_info, ncopies_for_cost, &dt,
slp_node);
{
enum vect_def_type dts[2];
dts[0] = dt;
dts[1] = vect_uninitialized_def;
/* Not memory operation (we don't call this function for
loads). */
vect_model_simple_cost (stmt_info, ncopies_for_cost, dts,
slp_node);
}
}
}
else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment