2018-01-16 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / pr67790.c
blob5e2d506a730b3d44e5153c08b9b6dca57c0f8402
1 /* { dg-require-effective-target vect_int } */
3 #include "tree-vect.h"
5 struct {
6 int x_advance;
7 int y_advance;
8 } a[256];
10 int b, c;
12 void __attribute__((noinline,noclone)) fn1()
14 for (int i = 0; i < 256; i++)
16 c -= a[i].x_advance;
17 b -= a[i].y_advance;
21 int main()
23 check_vect ();
25 for (int i = 0; i < 256; ++i)
27 a[i].x_advance = i;
28 a[i].y_advance = -i + 3;
29 __asm__ volatile ("" : : : "memory");
32 fn1();
34 if (c != -32640 || b != 31872)
35 abort ();
37 return 0;
40 /* { dg-final { scan-tree-dump "vectorizing stmts using SLP" "vect" } } */