111
|
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 } */
|
|
5
|
|
6 float f(float x)
|
|
7 {
|
|
8 return x * (x > 0.f ? -1.f : 1.f);
|
|
9 }
|
|
10 float f1(float x)
|
|
11 {
|
|
12 return x * (x > 0.f ? 1.f : -1.f);
|
|
13 }
|
|
14 float g(float x)
|
|
15 {
|
|
16 return x * (x >= 0.f ? -1.f : 1.f);
|
|
17 }
|
|
18 float g1(float x)
|
|
19 {
|
|
20 return x * (x >= 0.f ? 1.f : -1.f);
|
|
21 }
|
|
22 float h(float x)
|
|
23 {
|
|
24 return x * (x < 0.f ? -1.f : 1.f);
|
|
25 }
|
|
26 float h1(float x)
|
|
27 {
|
|
28 return x * (x < 0.f ? 1.f : -1.f);
|
|
29 }
|
|
30 float i(float x)
|
|
31 {
|
|
32 return x * (x <= 0.f ? -1.f : 1.f);
|
|
33 }
|
|
34 float i1(float x)
|
|
35 {
|
|
36 return x * (x <= 0.f ? 1.f : -1.f);
|
|
37 }
|
|
38 /* { dg-final { scan-tree-dump-times "ABS" 8 "gimple"} } */
|