match.pd: Replace incorrect simplifications into copysign [PR90248]
[gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / copy-sign-1.c
1 /* { dg-do compile } */
2 /* { dg-require-effective-target c99_runtime } */
3 /* { dg-options "-O2 -ffast-math -fdump-tree-gimple" } */
4 float f(float x)
5 {
6 return (x > 0.f ? -1.f : 1.f);
7 }
8 float f1(float x)
9 {
10 return (x > 0.f ? 1.f : -1.f);
11 }
12 float g(float x)
13 {
14 return (x >= 0.f ? -1.f : 1.f);
15 }
16 float g1(float x)
17 {
18 return (x >= 0.f ? 1.f : -1.f);
19 }
20 float h(float x)
21 {
22 return (x < 0.f ? -1.f : 1.f);
23 }
24 float h1(float x)
25 {
26 return (x < 0.f ? 1.f : -1.f);
27 }
28 float i(float x)
29 {
30 return (x <= 0.f ? -1.f : 1.f);
31 }
32 float i1(float x)
33 {
34 return (x <= 0.f ? 1.f : -1.f);
35 }
36 /* { dg-final { scan-tree-dump-not "copysign" "gimple"} } */