OSDN Git Service

* gcc.target/sh/mfmovd.c: Extend list of supported targets.
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.target / powerpc / recip-1.c
1 /* { dg-do compile { target { { powerpc*-*-* } && { ! powerpc*-apple-darwin* } } } } */
2 /* { dg-options "-O2 -mrecip -ffast-math -mcpu=power6" } */
3 /* { dg-final { scan-assembler-times "frsqrte" 2 } } */
4 /* { dg-final { scan-assembler-times "fmsub" 2 } } */
5 /* { dg-final { scan-assembler-times "fmul" 8 } } */
6 /* { dg-final { scan-assembler-times "fnmsub" 4 } } */
7
8 double
9 rsqrt_d (double a)
10 {
11   return 1.0 / __builtin_sqrt (a);
12 }
13
14 float
15 rsqrt_f (float a)
16 {
17   return 1.0f / __builtin_sqrtf (a);
18 }