2 /* { dg-require-effective-target arm_neon_hw } */
3 /* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-details" } */
4 /* { dg-add-options "arm_neon" } */
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
};
24 for (i
= 0; i
< N
; i
++)
25 r
[i
] = __builtin_copysignf (a
[i
], b
[i
]);
28 for (i
= 0; i
< N
; i
++)
29 if (r
[i
] != __builtin_copysignf (a
[i
], b
[i
]))
35 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
36 /* { dg-final { cleanup-tree-dump "vect" } } */