Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/70138
* tree-vect-loop-manip.c (vect_update_ivs_after_vectorizer):
Also skip vect_double_reduction_def.
* gcc.dg/vect/pr70138-1.c: New testcase.
* gcc.dg/vect/pr70138-2.c: Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@234086
138bc75d-0d04-0410-961f-
82ee72b054a4
+2016-03-09 Richard Biener <rguenther@suse.de>
+ Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/70138
+ * tree-vect-loop-manip.c (vect_update_ivs_after_vectorizer):
+ Also skip vect_double_reduction_def.
+
2016-03-09 Jakub Jelinek <jakub@redhat.com>
PR target/70049
+2016-03-09 Richard Biener <rguenther@suse.de>
+ Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/70138
+ * gcc.dg/vect/pr70138-1.c: New testcase.
+ * gcc.dg/vect/pr70138-2.c: Likewise.
+
2016-03-09 Jakub Jelinek <jakub@redhat.com>
PR target/70049
--- /dev/null
+/* { dg-do run } */
+
+#include "tree-vect.h"
+
+double u[33 * 33];
+
+__attribute__((noinline, noclone)) static void
+foo (int *x)
+{
+ double c = 0.0;
+ int a, b;
+ for (a = 0; a < 33; a++)
+ {
+ for (b = 0; b < 33; b++)
+ c = c + u[34 * a];
+ u[34 * a] *= 2.0;
+ }
+ *x = c;
+}
+
+int
+main ()
+{
+ int d, e;
+ check_vect ();
+ for (d = 0; d < 33 * 33; d++)
+ {
+ u[d] = 499.0;
+ __asm__ volatile ("" : : : "memory");
+ }
+ for (d = 0; d < 33; d++)
+ {
+ u[d * 34] = (d + 2);
+ __asm__ volatile ("" : : : "memory");
+ }
+ foo (&e);
+ if (e != 33 * (2 + 34) / 2 * 33)
+ __builtin_abort ();
+ return 0;
+}
--- /dev/null
+/* { dg-do run } */
+
+#include "tree-vect.h"
+
+double u[33];
+
+__attribute__((noinline, noclone)) static void
+foo (int *x)
+{
+ double c = 0.0;
+ int a, b;
+ for (a = 0; a < 33; a++)
+ {
+ for (b = 0; b < 33; b++)
+ c = c + u[a];
+ u[a] *= 2.0;
+ }
+ *x = c;
+}
+
+int
+main ()
+{
+ int d, e;
+ check_vect ();
+ for (d = 0; d < 33; d++)
+ {
+ u[d] = (d + 2);
+ __asm__ volatile ("" : : : "memory");
+ }
+ foo (&e);
+ if (e != 33 * (2 + 34) / 2 * 33)
+ __builtin_abort ();
+ return 0;
+}
/* Skip reduction phis. */
stmt_info = vinfo_for_stmt (phi);
- if (STMT_VINFO_DEF_TYPE (stmt_info) == vect_reduction_def)
+ if (STMT_VINFO_DEF_TYPE (stmt_info) == vect_reduction_def
+ || STMT_VINFO_DEF_TYPE (stmt_info) == vect_double_reduction_def)
{
if (dump_enabled_p ())
dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location,