25178f2c8ff66d7ead6903c2e0727fbfff8340b5
[platform/upstream/gcc48.git] / gcc / testsuite / gcc.target / mips / rsqrt-3.c
1 /* { dg-do compile } */
2 /* { dg-options "isa=4 -mhard-float" } */
3 /* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
4 /* { dg-final { scan-assembler-not "\trsqrt.d\t" } } */
5 /* { dg-final { scan-assembler-not "\trsqrt.s\t" } } */
6
7 extern double sqrt(double);
8 extern float sqrtf(float);
9
10 double foo(double x)
11 {
12   return 1.0/sqrt(x);
13 }
14
15 double bar(double x)
16 {
17   return sqrt(1.0/x);
18 }
19
20 float foof(float x)
21 {
22   return 1.0f/sqrtf(x);
23 }
24
25 float barf(float x)
26 {
27   return sqrtf(1.0f/x);
28 }