3 extern float copysignf (float, float);
4 extern float sqrtf (float);
5 extern float fabsf (float);
6 extern void abort (void);
7 float a
[64], b
[64], c
[64], d
[64];
9 __attribute__((noinline
, noclone
)) void
13 for (i
= 0; i
< n
; i
++)
15 a
[4 * i
+ 0] = copysignf (b
[4 * i
+ 0], c
[4 * i
+ 0]) + 1.0f
+ sqrtf (d
[4 * i
+ 0]);
16 a
[4 * i
+ 1] = copysignf (b
[4 * i
+ 1], c
[4 * i
+ 1]) + 2.0f
+ sqrtf (d
[4 * i
+ 1]);
17 a
[4 * i
+ 2] = copysignf (b
[4 * i
+ 2], c
[4 * i
+ 2]) + 3.0f
+ sqrtf (d
[4 * i
+ 2]);
18 a
[4 * i
+ 3] = copysignf (b
[4 * i
+ 3], c
[4 * i
+ 3]) + 4.0f
+ sqrtf (d
[4 * i
+ 3]);
22 __attribute__((noinline
, noclone
)) void
26 for (i
= 0; i
< 2 * n
; i
++)
28 a
[2 * i
+ 0] = copysignf (b
[2 * i
+ 0], c
[2 * i
+ 0]) + 1.0f
+ sqrtf (d
[2 * i
+ 0]);
29 a
[2 * i
+ 1] = copysignf (b
[2 * i
+ 1], c
[2 * i
+ 1]) + 2.0f
+ sqrtf (d
[2 * i
+ 1]);
33 __attribute__((noinline
, noclone
)) void
37 for (i
= 0; i
< 64; i
++)
38 a
[i
] = copysignf (b
[i
], c
[i
]) + 1.0f
+ sqrtf (d
[i
]);
41 __attribute__((noinline
, noclone
)) void
45 for (i
= 0; i
< 2 * n
; i
++)
47 a
[3 * i
+ 0] = copysignf (b
[3 * i
+ 0], c
[3 * i
+ 0]) + 1.0f
+ sqrtf (d
[3 * i
+ 0]);
48 a
[3 * i
+ 1] = copysignf (b
[3 * i
+ 1], c
[3 * i
+ 1]) + 2.0f
+ sqrtf (d
[3 * i
+ 1]);
49 a
[3 * i
+ 2] = copysignf (b
[3 * i
+ 2], c
[3 * i
+ 2]) + 3.0f
+ sqrtf (d
[3 * i
+ 2]);
53 __attribute__((noinline
, noclone
)) int
58 for (i
= 0; i
< 64; i
++)
61 b
[i
] = (i
& 1) ? -4 * i
: 4 * i
;
62 c
[i
] = (i
& 2) ? -8 * i
: 8 * i
;
66 for (i
= 0; i
< 64; i
++)
67 if (fabsf (((i
& 2) ? -4 * i
: 4 * i
) + 1 + (i
& 3) + i
- a
[i
]) >= 0.0001f
)
72 for (i
= 0; i
< 64; i
++)
73 if (fabsf (((i
& 2) ? -4 * i
: 4 * i
) + 1 + (i
& 1) + i
- a
[i
]) >= 0.0001f
)
78 for (i
= 0; i
< 64; i
++)
79 if (fabsf (((i
& 2) ? -4 * i
: 4 * i
) + 1 + i
- a
[i
]) >= 0.0001f
)
84 for (i
= 0; i
< 60; i
++)
85 if (fabsf (((i
& 2) ? -4 * i
: 4 * i
) + 1 + (i
% 3) + i
- a
[i
]) >= 0.0001f
)
97 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 4 "vect" { target { vect_call_copysignf && vect_call_sqrtf } } } } */
98 /* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 3 "vect" { target { vect_call_copysignf && vect_call_sqrtf } } } } */
99 /* { dg-final { cleanup-tree-dump "vect" } } */