2 /* { dg-options "-O2 --save-temps" } */
7 check (float x
, float y
)
9 return __builtin_copysignf (x
, y
);
15 return __builtin_copysignf (x
, 1.0);
21 return __builtin_copysignf (1.0, x
);
27 return -__builtin_copysignf (x
, 1.0);
31 check4 (float x
, float y
)
33 return x
* __builtin_copysignf (x
, y
);
37 check5 (float x
, float y
)
39 return __builtin_copysignf (-x
, -y
);
43 main (int argc
, char** argv
)
47 float epsilon
= 0.00001f
;
49 float expected
= -2.0f
;
51 if (fabsf (check (x
, y
) - expected
) >= epsilon
)
56 if (fabsf (check1 (x
) - expected
) >= epsilon
)
61 if (fabsf (check2 (x
) - expected
) >= epsilon
)
66 if (fabsf (check3 (x
) - expected
) >= epsilon
)
71 if (fabsf (check4 (x
, y
) - expected
) >= epsilon
)
76 if (fabsf (check5 (x
, y
) - expected
) >= epsilon
)
80 /* { dg-final { scan-assembler-not "copysign\tw" } } */