4 /* { dg-options "-O3" } */
9 extern void abort (void);
12 test_square_root_v2sf ()
14 const float32_t pool
[] = {4.0f
, 9.0f
};
18 val
= vld1_f32 (pool
);
19 res
= vsqrt_f32 (val
);
21 if (vget_lane_f32 (res
, 0) != 2.0f
)
23 if (vget_lane_f32 (res
, 1) != 3.0f
)
28 test_square_root_v4sf ()
30 const float32_t pool
[] = {4.0f
, 9.0f
, 16.0f
, 25.0f
};
34 val
= vld1q_f32 (pool
);
35 res
= vsqrtq_f32 (val
);
37 if (vgetq_lane_f32 (res
, 0) != 2.0f
)
39 if (vgetq_lane_f32 (res
, 1) != 3.0f
)
41 if (vgetq_lane_f32 (res
, 2) != 4.0f
)
43 if (vgetq_lane_f32 (res
, 3) != 5.0f
)
48 test_square_root_v2df ()
50 const float64_t pool
[] = {4.0, 9.0};
54 val
= vld1q_f64 (pool
);
55 res
= vsqrtq_f64 (val
);
57 if (vgetq_lane_f64 (res
, 0) != 2.0)
60 if (vgetq_lane_f64 (res
, 1) != 3.0)
67 test_square_root_v2sf ();
68 test_square_root_v4sf ();
69 test_square_root_v2df ();