+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
--- /dev/null
+/* { 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" } } */
{
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)
/* 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.");