Commit 12a43ab8 by Richard Biener Committed by Richard Biener

re PR tree-optimization/56270 (loop over array of struct float causes compiler…

re PR tree-optimization/56270 (loop over array of struct float causes compiler error: segmentation fault)

2013-03-05  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/56270
	* tree-vect-slp.c (vect_schedule_slp): Clear vectorized stmts
	of loads after scheduling an SLP instance.

	* gcc.dg/vect/slp-38.c: New testcase.

From-SVN: r196458
parent db4138e3
2013-03-05 Richard Biener <rguenther@suse.de>
PR tree-optimization/56270
* tree-vect-slp.c (vect_schedule_slp): Clear vectorized stmts
of loads after scheduling an SLP instance.
2013-03-05 Jakub Jelinek <jakub@redhat.com>
* Makefile.in (dg_target_exps): Add aarch64.exp, epiphany.exp and
......
2013-03-05 Richard Biener <rguenther@suse.de>
PR tree-optimization/56270
* gcc.dg/vect/slp-38.c: New testcase.
2013-03-05 Jakub Jelinek <jakub@redhat.com>
PR rtl-optimization/56494
......
/* { dg-do compile } */
typedef struct {
float l, h;
} tFPinterval;
tFPinterval X[1024];
tFPinterval Y[1024];
tFPinterval Z[1024];
void Compute(void)
{
int d;
for (d= 0; d < 1024; d++)
{
Y[d].l= X[d].l + X[d].h;
Y[d].h= Y[d].l;
Z[d].l= X[d].l;
Z[d].h= X[d].h;
}
}
/* { dg-final { scan-tree-dump-times "vectorized 1 loops in function" 1 "vect" { target { vect_float && vect_perm } } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
......@@ -3141,7 +3141,8 @@ vect_schedule_slp (loop_vec_info loop_vinfo, bb_vec_info bb_vinfo)
{
vec<slp_instance> slp_instances;
slp_instance instance;
unsigned int i, vf;
slp_tree loads_node;
unsigned int i, j, vf;
bool is_store = false;
if (loop_vinfo)
......@@ -3160,6 +3161,14 @@ vect_schedule_slp (loop_vec_info loop_vinfo, bb_vec_info bb_vinfo)
/* Schedule the tree of INSTANCE. */
is_store = vect_schedule_slp_instance (SLP_INSTANCE_TREE (instance),
instance, vf);
/* Clear STMT_VINFO_VEC_STMT of all loads. With shared loads
between SLP instances we fail to properly initialize the
vectorized SLP stmts and confuse different load permutations. */
FOR_EACH_VEC_ELT (SLP_INSTANCE_LOADS (instance), j, loads_node)
STMT_VINFO_VEC_STMT
(vinfo_for_stmt (SLP_TREE_SCALAR_STMTS (loads_node)[0])) = NULL;
if (dump_enabled_p ())
dump_printf_loc (MSG_NOTE, vect_location,
"vectorizing stmts using SLP.");
......
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