+2013-12-17 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/59523
+ * tree-vectorizer.c (fold_loop_vectorized_call): Call update_stmt
+ on updated stmts.
+
2013-12-17 Aldy Hernandez <aldyh@redhat.com>
* ipa-inline.c (gate_ipa_inline): Remove.
+2013-12-17 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/59523
+ * gcc.dg/pr59523.c: New test.
+
2013-12-17 Marek Polacek <polacek@redhat.com>
* c-c++-common/ubsan/overflow-int128.c: New test.
--- /dev/null
+/* PR tree-optimization/59523 */
+/* { dg-do compile } */
+/* { dg-options "-O3" } */
+/* { dg-additional-options "-mavx2" { target { i?86-*-* x86_64-*-* } } } */
+
+int *
+foo (int a, int *b, int *c, int *d)
+{
+ int i, *r = __builtin_alloca (a * sizeof (int));
+ __builtin_memcpy (r, d, a * sizeof (int));
+ for (i = 0; i < 64; i++)
+ c[i] += b[i];
+ for (i = 0; i < a; i++)
+ if (r[i] == 0)
+ r[i] = 1;
+ return r;
+}
update_call_from_tree (&gsi, value);
FOR_EACH_IMM_USE_STMT (use_stmt, iter, lhs)
- FOR_EACH_IMM_USE_ON_STMT (use_p, iter)
- SET_USE (use_p, value);
+ {
+ FOR_EACH_IMM_USE_ON_STMT (use_p, iter)
+ SET_USE (use_p, value);
+ update_stmt (use_stmt);
+ }
}
/* Function vectorize_loops.