1 /* { dg-do compile } */
2 /* { dg-require-effective-target c99_runtime } */
3 /* { dg-options "-O2 -ffast-math -fdump-tree-gimple" } */
4 /* { dg-add-options c99_runtime } */
f(float x)5 float f(float x)
6 {
7   return (x > 0.f ? -1.f : 1.f);
8 }
f1(float x)9 float f1(float x)
10 {
11   return (x > 0.f ? 1.f : -1.f);
12 }
g(float x)13 float g(float x)
14 {
15   return (x >= 0.f ? -1.f : 1.f);
16 }
g1(float x)17 float g1(float x)
18 {
19   return (x >= 0.f ? 1.f : -1.f);
20 }
h(float x)21 float h(float x)
22 {
23   return (x < 0.f ? -1.f : 1.f);
24 }
h1(float x)25 float h1(float x)
26 {
27   return (x < 0.f ? 1.f : -1.f);
28 }
i(float x)29 float i(float x)
30 {
31   return (x <= 0.f ? -1.f : 1.f);
32 }
i1(float x)33 float i1(float x)
34 {
35   return (x <= 0.f ? 1.f : -1.f);
36 }
37 /* { dg-final { scan-tree-dump-times "copysign" 8 "gimple"} } */
38