1 /* { dg-additional-options "-Ofast -fno-common" } */
2 /* { dg-additional-options "-Ofast -fno-common -mavx" { target avx_runtime } } */
6 __attribute__((noinline
, noclone
)) void
7 foo (double *x
, double *y
)
9 double *p
= __builtin_assume_aligned (x
, 16);
10 double *q
= __builtin_assume_aligned (y
, 16);
13 for (i
= 0; i
< 1024; i
++)
16 z
= q
[i
], h
= q
[i
] * 7.0 + 3.0;
18 z
= p
[i
] + 6.0, h
= p
[1024 + i
];
23 double a
[2048] __attribute__((aligned (16)));
24 double b
[1024] __attribute__((aligned (16)));
31 for (i
= 0; i
< 1024; i
++)
33 a
[i
] = (i
& 1) ? -i
: 2 * i
;
39 for (i
= 0; i
< 1024; i
++)
41 ? 7 * i
+ 2.0 * (7 * i
* 7.0 + 3.0)
42 : 2 * i
+ 6.0 + 2.0 * i
)
49 /* { dg-final { scan-tree-dump-times "note: vectorized 1 loops" 1 "vect" { target avx_runtime } } } */