2015-12-09 Richard Biener <rguenther@suse.de>
PR tree-optimization/68417
* gcc.dg/vect/pr68417.c: New testcase.
From-SVN: r231452
+2015-12-09 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/68417
+ * gcc.dg/vect/pr68417.c: New testcase.
+
2015-12-09 Martin Liska <mliska@suse.cz>
* gcc.dg/ipa/pr68790.c: New test.
--- /dev/null
+/* { dg-do compile } */
+/* { dg-require-effective-target vect_int } */
+/* { dg-require-effective-target vect_condition } */
+
+#define N 16
+
+typedef struct {
+ int x;
+ int y;
+} Point;
+
+void
+foo(Point *p1, Point *p2, Point *p3, int *data)
+{
+ int m, m1, m2;
+ int i;
+
+ for (i = 0; i < N; i++) {
+ m = *data++;
+
+ m1 = p1->x - m;
+ m2 = p2->x + m;
+
+ p3->y = (m1 >= m2) ? p1->y : p2->y;
+
+ p1++;
+ p2++;
+ p3++;
+ }
+}
+
+/* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" } } */