gcc/testsuite/gcc.target/mips/rsqrt-1.c
raw| 1 | /* { dg-do compile } */ |
| 2 | /* { dg-options "-ffast-math isa=4 -mhard-float -mgp64" } */ |
| 3 | /* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */ |
| 4 | /* { dg-final { scan-assembler "\trsqrt.d\t" } } */ |
| 5 | /* { dg-final { scan-assembler "\trsqrt.s\t" } } */ |
| 6 | |
| 7 | extern double sqrt(double); |
| 8 | extern float sqrtf(float); |
| 9 | |
| 10 | NOMIPS16 double foo(double x) |
| 11 | { |
| 12 | return 1.0/sqrt(x); |
| 13 | } |
| 14 | |
| 15 | NOMIPS16 float bar(float x) |
| 16 | { |
| 17 | return 1.0f/sqrtf(x); |
| 18 | } |