1 /* Disabling epilogues until we find a better way to deal with scans. */
2 /* { dg-additional-options "--param vect-epilogues-nomask=0" } */
5 extern float copysignf (float, float);
6 extern float sqrtf (float);
7 extern float fabsf (float);
8 extern void abort (void);
9 float a
[64], b
[64], c
[64], d
[64];
11 __attribute__((noinline
, noclone
)) void
15 for (i
= 0; i
< n
; i
++)
17 a
[4 * i
+ 0] = copysignf (b
[4 * i
+ 0], c
[4 * i
+ 0]) + 1.0f
+ sqrtf (d
[4 * i
+ 0]);
18 a
[4 * i
+ 1] = copysignf (b
[4 * i
+ 1], c
[4 * i
+ 1]) + 2.0f
+ sqrtf (d
[4 * i
+ 1]);
19 a
[4 * i
+ 2] = copysignf (b
[4 * i
+ 2], c
[4 * i
+ 2]) + 3.0f
+ sqrtf (d
[4 * i
+ 2]);
20 a
[4 * i
+ 3] = copysignf (b
[4 * i
+ 3], c
[4 * i
+ 3]) + 4.0f
+ sqrtf (d
[4 * i
+ 3]);
24 __attribute__((noinline
, noclone
)) void
28 for (i
= 0; i
< 2 * n
; i
++)
30 a
[2 * i
+ 0] = copysignf (b
[2 * i
+ 0], c
[2 * i
+ 0]) + 1.0f
+ sqrtf (d
[2 * i
+ 0]);
31 a
[2 * i
+ 1] = copysignf (b
[2 * i
+ 1], c
[2 * i
+ 1]) + 2.0f
+ sqrtf (d
[2 * i
+ 1]);
35 __attribute__((noinline
, noclone
)) void
39 for (i
= 0; i
< 64; i
++)
40 a
[i
] = copysignf (b
[i
], c
[i
]) + 1.0f
+ sqrtf (d
[i
]);
43 __attribute__((noinline
, noclone
)) void
47 for (i
= 0; i
< 2 * n
; i
++)
49 a
[3 * i
+ 0] = copysignf (b
[3 * i
+ 0], c
[3 * i
+ 0]) + 1.0f
+ sqrtf (d
[3 * i
+ 0]);
50 a
[3 * i
+ 1] = copysignf (b
[3 * i
+ 1], c
[3 * i
+ 1]) + 2.0f
+ sqrtf (d
[3 * i
+ 1]);
51 a
[3 * i
+ 2] = copysignf (b
[3 * i
+ 2], c
[3 * i
+ 2]) + 3.0f
+ sqrtf (d
[3 * i
+ 2]);
55 __attribute__((noinline
, noclone
)) int
60 for (i
= 0; i
< 64; i
++)
63 b
[i
] = (i
& 1) ? -4 * i
: 4 * i
;
64 c
[i
] = (i
& 2) ? -8 * i
: 8 * i
;
69 for (i
= 0; i
< 64; i
++)
70 if (fabsf (((i
& 2) ? -4 * i
: 4 * i
) + 1 + (i
& 3) + i
- a
[i
]) >= 0.0001f
)
76 for (i
= 0; i
< 64; i
++)
77 if (fabsf (((i
& 2) ? -4 * i
: 4 * i
) + 1 + (i
& 1) + i
- a
[i
]) >= 0.0001f
)
83 for (i
= 0; i
< 64; i
++)
84 if (fabsf (((i
& 2) ? -4 * i
: 4 * i
) + 1 + i
- a
[i
]) >= 0.0001f
)
90 for (i
= 0; i
< 60; i
++)
91 if (fabsf (((i
& 2) ? -4 * i
: 4 * i
) + 1 + (i
% 3) + i
- a
[i
]) >= 0.0001f
)
103 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 4 "vect" { target { vect_call_copysignf && vect_call_sqrtf } } } } */
104 /* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 4 "vect" { target { { vect_call_copysignf && vect_call_sqrtf } && vect_perm3_int } } } } */