| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-options "-ffast-math -mips64 -mhard-float -mgp32" } */ |
| 3 |
/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */ |
| 4 |
/* { dg-final { scan-assembler-not "\trsqrt.d\t" } } */ |
| 5 |
/* { dg-final { scan-assembler-times "\trsqrt.s\t" 2 } } */ |
| 6 |
|
| 7 |
extern double sqrt(double); |
| 8 |
extern float sqrtf(float); |
| 9 |
|
| 10 |
NOMIPS16 double f1 (double x) |
| 11 |
{ |
| 12 |
return 1.0 / sqrt (x); |
| 13 |
} |
| 14 |
|
| 15 |
NOMIPS16 double f2 (double x) |
| 16 |
{ |
| 17 |
return sqrt (1.0 / x); |
| 18 |
} |
| 19 |
|
| 20 |
NOMIPS16 float f3 (float x) |
| 21 |
{ |
| 22 |
return 1.0f / sqrtf (x); |
| 23 |
} |
| 24 |
|
| 25 |
NOMIPS16 float f4 (float x) |
| 26 |
{ |
| 27 |
return sqrtf (1.0f / x); |
| 28 |
} |