Commit e72baed7 by Jakub Jelinek Committed by Jakub Jelinek

re PR tree-optimization/65533 (252.eon in SPEC CPU 2000 failed to build)

	PR tree-optimization/65533
	* tree-vect-slp.c (vect_build_slp_tree): Before re-trying
	with swapped operands, call vect_free_slp_tree on
	SLP_TREE_CHILDREN of child and truncate the SLP_TREE_CHILDREN
	vector.

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

From-SVN: r221622
parent 34d9d749
2015-03-24 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/65533
* tree-vect-slp.c (vect_build_slp_tree): Before re-trying
with swapped operands, call vect_free_slp_tree on
SLP_TREE_CHILDREN of child and truncate the SLP_TREE_CHILDREN
vector.
2015-03-24 Richard Biener <rguenther@suse.de>
PR middle-end/65517
......
2015-03-24 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/65533
* gcc.dg/pr65533.c: New test.
2015-03-24 Andre Vehreschild <vehre@gmx.de>
* gfortran.dg/allocate_alloc_opt_13.f90: Added tests for
......
/* PR tree-optimization/65533 */
/* { dg-do compile } */
/* { dg-options "-Ofast -w" } */
struct A { int a[2]; };
struct B { double b[2]; };
struct C { double c[4][1]; };
static inline void
bar (struct B *x, double y, double z)
{
x->b[0] = y;
x->b[1] = z;
}
void baz (struct B *);
void
foo (struct C *x, struct A *y)
{
struct B d;
bar (&d, x->c[1][0] * y->a[0] + x->c[0][1] * y->a[1] + x->c[0][0] * x->c[0][1],
x->c[0][0] * y->a[0] + x->c[0][1] * y->a[1] + x->c[0][1] * y->a[0] + x->c[0][0]);
baz (&d);
}
......@@ -1035,13 +1035,20 @@ vect_build_slp_tree (loop_vec_info loop_vinfo, bb_vec_info bb_vinfo,
behavior. */
&& *npermutes < 4)
{
unsigned int j;
slp_tree grandchild;
/* Roll back. */
*max_nunits = old_max_nunits;
loads->truncate (old_nloads);
FOR_EACH_VEC_ELT (SLP_TREE_CHILDREN (child), j, grandchild)
vect_free_slp_tree (grandchild);
SLP_TREE_CHILDREN (child).truncate (0);
/* Swap mismatched definition stmts. */
dump_printf_loc (MSG_NOTE, vect_location,
"Re-trying with swapped operands of stmts ");
for (unsigned j = 0; j < group_size; ++j)
for (j = 0; j < group_size; ++j)
if (!matches[j])
{
gimple tem = oprnds_info[0]->def_stmts[j];
......
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