Use conditional internal functions in if-conversion
[official-gcc.git] / gcc / testsuite / gcc.target / powerpc / recip-3.c
blobe3496ab82b32eefdedc4d4d7c201f6a8ca4b10a6
1 /* { dg-do compile { target { { powerpc*-*-* } && { ! powerpc*-apple-darwin* } } } } */
2 /* { dg-require-effective-target powerpc_fprs } */
3 /* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power7" } } */
4 /* { dg-options "-O2 -mrecip -ffast-math -mcpu=power7" } */
5 /* { dg-final { scan-assembler-times "xsrsqrtedp\|frsqrte\ " 1 } } */
6 /* { dg-final { scan-assembler-times "xsmuldp\|fmul\ " 2 } } */
7 /* { dg-final { scan-assembler-times "xsnmsub.dp\|fnmsub\ " 2 } } */
8 /* { dg-final { scan-assembler-times "xsmadd.dp\|fmadd\ " 3 } } */
9 /* { dg-final { scan-assembler-times "xsrsqrtesp\|frsqrtes" 1 } } */
10 /* { dg-final { scan-assembler-times "xsmulsp\|fmuls" 2 } } */
11 /* { dg-final { scan-assembler-times "xsmadd.sp\|fmadds" 1 } } */
12 /* { dg-final { scan-assembler-times "xsnmsub.sp\|fnmsubs" 1 } } */
14 double
15 rsqrt_d (double a)
17 return 1.0 / __builtin_sqrt (a);
20 float
21 rsqrt_f (float a)
23 return 1.0f / __builtin_sqrtf (a);