[RS6000] dg-do !compile and scan-assembler
[official-gcc.git] / gcc / testsuite / gcc.target / powerpc / recip-3.c
blob478200f3f635839c8357c8a6fb5739e75551c226
1 /* { dg-do compile { target { { powerpc*-*-* } && { ! powerpc*-apple-darwin* } } } } */
2 /* { dg-require-effective-target powerpc_fprs } */
3 /* { dg-options "-O2 -mrecip -ffast-math -mdejagnu-cpu=power7" } */
4 /* { dg-final { scan-assembler-times "xsrsqrtedp\|frsqrte\ " 1 } } */
5 /* { dg-final { scan-assembler-times "xsmuldp\|fmul\ " 2 } } */
6 /* { dg-final { scan-assembler-times "xsnmsub.dp\|fnmsub\ " 2 } } */
7 /* { dg-final { scan-assembler-times "xsmadd.dp\|fmadd\ " 3 } } */
8 /* { dg-final { scan-assembler-times "xsrsqrtesp\|frsqrtes" 1 } } */
9 /* { dg-final { scan-assembler-times "xsmulsp\|fmuls" 2 } } */
10 /* { dg-final { scan-assembler-times "xsmadd.sp\|fmadds" 1 } } */
11 /* { dg-final { scan-assembler-times "xsnmsub.sp\|fnmsubs" 1 } } */
13 double
14 rsqrt_d (double a)
16 return 1.0 / __builtin_sqrt (a);
19 float
20 rsqrt_f (float a)
22 return 1.0f / __builtin_sqrtf (a);