+2015-05-19 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/66165
+ * tree-vect-slp.c (vect_supported_load_permutation_p): Add guard
+ for no load permutation.
+
+ PR tree-optimization/66185
+ * tree-vect-slp.c (vect_build_slp_tree): Properly roll back
+ when building the SLP node from scalars.
+
2015-05-19 Eric Botcazou <ebotcazou@adacore.com>
Tristan Gingold <gingold@adacore.com>
+2015-05-19 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/66165
+ * gcc.dg/torture/pr66165.c: New testcase.
+
+ PR tree-optimization/66185
+ * gcc.dg/torture/pr66185.c: New testcase.
+
2015-05-19 Oleg Endo <olegendo@gcc.gnu.org>
PR target/54236
--- /dev/null
+/* { dg-do compile } */
+
+void foo(double *d, double *a)
+{
+ d[0] += d[2];
+ d[1] += d[3];
+ d[2] += d[4];
+ d[3] += d[5];
+ a[0] = d[0];
+ a[1] = d[1];
+}
--- /dev/null
+/* { dg-do compile } */
+
+unsigned int a;
+int b[5], c;
+
+int
+main ()
+{
+ for (c = 0; c < 4; c++)
+ b[c] = b[c+1] > ((b[0] > 0) > a);
+
+ return 0;
+}
scalar version. */
&& !is_pattern_stmt_p (vinfo_for_stmt (stmt)))
{
+ 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);
+
dump_printf_loc (MSG_NOTE, vect_location,
"Building vector operands from scalars\n");
oprnd_info->def_stmts = vNULL;
no permutation is necessary. */
FOR_EACH_VEC_ELT (SLP_INSTANCE_LOADS (slp_instn), i, node)
{
+ if (!SLP_TREE_LOAD_PERMUTATION (node).exists ())
+ continue;
bool subchain_p = true;
next_load = NULL;
FOR_EACH_VEC_ELT (SLP_TREE_SCALAR_STMTS (node), j, load)