+2015-06-23 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/66636
+ * tree-vect-stmts.c (vectorizable_store): Properly compute the
+ def type for further defs for strided stores.
+
2015-06-23 Nathan Sidwell <nathan@codesourcery.com>
* config/nvptx/nvptx.md (sel_true<mode>, sel_false<mode>): New
+2015-06-23 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/66636
+ * gcc.dg/vect/pr66636.c: New testcase.
+
2015-06-23 Marek Polacek <polacek@redhat.com>
* gcc.dg/fold-minus-4.c: New test.
--- /dev/null
+/* { dg-additional-options "-mavx2" { target avx_runtime } } */
+
+#include "tree-vect.h"
+
+extern void abort (void);
+
+struct X { double x; double y; };
+
+void foo (struct X *x, double px, int s)
+{
+ int i;
+ for (i = 0; i < 256; ++i)
+ {
+ x[i*s].x = px;
+ x[i*s].y = i + px;
+ }
+}
+
+int main()
+{
+ struct X x[512];
+ int i;
+ check_vect ();
+ foo (x, 1., 2);
+ if (x[0].x != 1. || x[0].y != 1.
+ || x[510].x != 1. || x[510].y != 256.)
+ abort ();
+ return 0;
+}
if (slp)
vec_oprnd = vec_oprnds[j];
else
- vec_oprnd = vect_get_vec_def_for_stmt_copy (dt, vec_oprnd);
+ {
+ vect_is_simple_use (vec_oprnd, NULL, loop_vinfo,
+ bb_vinfo, &def_stmt, &def, &dt);
+ vec_oprnd = vect_get_vec_def_for_stmt_copy (dt, vec_oprnd);
+ }
}
for (i = 0; i < nstores; i++)