2 /* { dg-additional-options "-Ofast -fno-common" } */
3 /* { dg-additional-options "-Ofast -fno-common -mavx" { target avx_runtime } } */
8 __attribute__((noinline
, noclone
)) void
9 foo (double *x
, double *y
)
11 double *p
= __builtin_assume_aligned (x
, 16);
12 double *q
= __builtin_assume_aligned (y
, 16);
15 for (i
= 0; i
< 1024; i
++)
18 z
= q
[i
], h
= q
[i
] * 7.0 + 3.0;
20 z
= p
[i
] + 6.0, h
= p
[1024 + i
];
25 double a
[2048] __attribute__((aligned (16)));
26 double b
[1024] __attribute__((aligned (16)));
33 for (i
= 0; i
< 1024; i
++)
35 a
[i
] = (i
& 1) ? -i
: 2 * i
;
41 for (i
= 0; i
< 1024; i
++)
43 ? 7 * i
+ 2.0 * (7 * i
* 7.0 + 3.0)
44 : 2 * i
+ 6.0 + 2.0 * i
)
51 /* { dg-final { scan-tree-dump-times "note: vectorized 1 loops" 1 "vect" { target avx_runtime } } } */
52 /* { dg-final { cleanup-tree-dump "vect" } } */