1 /* { dg-do run } */
2 /* { dg-require-effective-target arm_neon_hw } */
3 /* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-details" } */
4 /* { dg-add-options "arm_neon" } */
5 
6 extern void abort ();
7 
8 #define N 16
9 float a[N] = {-0.1f, -3.2f, -6.3f, -9.4f,
10 	      -12.5f, -15.6f, -18.7f, -21.8f,
11 	      24.9f, 27.1f, 30.2f, 33.3f,
12 	      36.4f, 39.5f, 42.6f, 45.7f};
13 float b[N] = {-1.2f, 3.4f, -5.6f, 7.8f,
14 	      -9.0f, 1.0f, -2.0f, 3.0f,
15 	      -4.0f, -5.0f, 6.0f, 7.0f,
16 	      -8.0f, -9.0f, 10.0f, 11.0f};
17 float r[N];
18 
19 int
main(void)20 main (void)
21 {
22   int i;
23 
24   for (i = 0; i < N; i++)
25     r[i] = __builtin_copysignf (a[i], b[i]);
26 
27   /* check results:  */
28   for (i = 0; i < N; i++)
29     if (r[i] != __builtin_copysignf (a[i], b[i]))
30       abort ();
31 
32   return 0;
33 }
34 
35 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
36