| 1 |
/* PR tree-optimization/96715 */ |
| 2 |
/* { dg-do compile } */ |
| 3 |
/* { dg-options "-O2 -fdump-tree-optimized" } */ |
| 4 |
/* { dg-final { scan-tree-dump-not "= __builtin_copysign" "optimized" } } */ |
| 5 |
/* { dg-final { scan-tree-dump-times " = -x_\[0-9]*\\(D\\)" 3 "optimized" } } */ |
| 6 |
|
| 7 |
float |
| 8 |
foo (float x) |
| 9 |
{ |
| 10 |
return __builtin_copysignf (x, -x); |
| 11 |
} |
| 12 |
|
| 13 |
double |
| 14 |
bar (double x) |
| 15 |
{ |
| 16 |
return __builtin_copysign (x, -x); |
| 17 |
} |
| 18 |
|
| 19 |
long double |
| 20 |
baz (long double x) |
| 21 |
{ |
| 22 |
return __builtin_copysignl (x, -x); |
| 23 |
} |