PR rtl-optimization/87918
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / pr81706.c
blobb4b7c781b701767804838f7d013ac5ae5cf5724a
1 /* PR libstdc++/81706 */
2 /* { dg-do compile } */
3 /* { dg-options "-O3 -mavx2 -mno-avx512f" } */
4 /* { dg-final { scan-assembler "call\[^\n\r]__?ZGVdN4v_cos" } } */
5 /* { dg-final { scan-assembler "call\[^\n\r]__?ZGVdN4v_sin" } } */
7 #ifdef __cplusplus
8 extern "C" {
9 #endif
10 extern double cos (double) __attribute__ ((nothrow, leaf, simd ("notinbranch")));
11 extern double sin (double) __attribute__ ((nothrow, leaf, simd ("notinbranch")));
12 #ifdef __cplusplus
14 #endif
15 double p[1024] = { 1.0 };
16 double q[1024] = { 1.0 };
18 void
19 foo (void)
21 int i;
22 for (i = 0; i < 1024; i++)
23 p[i] = cos (q[i]);
26 void
27 bar (void)
29 int i;
30 for (i = 0; i < 1024; i++)
31 p[i] = __builtin_sin (q[i]);