(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.target/
powerpc/
recip-2.c
       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=power5" } */
       4  /* { dg-final { scan-assembler-times "frsqrtes" 1 } } */
       5  /* { dg-final { scan-assembler-times "fmuls" 2 } } */
       6  /* { dg-final { scan-assembler-times "fnmsubs" 3 } } */
       7  /* { dg-final { scan-assembler-times "fmadds" 5 } } */
       8  /* { dg-final { scan-assembler-times "fadds" 1 } } */
       9  /* { dg-final { scan-assembler-times "fsqrt" 1 } } */
      10  
      11  /* power5 resqrte is not accurate enough, and should not be generated by
      12     default for -mrecip.  */
      13  double
      14  rsqrt_d (double a)
      15  {
      16    return 1.0 / __builtin_sqrt (a);
      17  }
      18  
      19  float
      20  rsqrt_f (float a)
      21  {
      22    return 1.0f / __builtin_sqrtf (a);
      23  }