(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.target/
powerpc/
ppc-fma-7.c
       1  /* { dg-do compile { target { powerpc*-*-* } } } */
       2  /* { dg-skip-if "" { powerpc*-*-darwin* } } */
       3  /* { dg-require-effective-target powerpc_altivec_ok } */
       4  /* { dg-require-effective-target powerpc_fprs } */
       5  /* { dg-options "-O3 -ftree-vectorize -mdejagnu-cpu=power6 -ffast-math" } */
       6  /* { dg-final { scan-assembler-times "fmadd" 1 } } */
       7  /* { dg-final { scan-assembler-times "fmsub " 1 } } */
       8  /* { dg-final { scan-assembler-not "fmul" } } */
       9  /* { dg-final { scan-assembler-not "fadd " } } */
      10  
      11  /* Check whether the common FFT idiom (a*b)+c and (a*b)-c generates two fma
      12     instructions, instead of a multiply, add, and subtract.  */
      13  
      14  void
      15  fft (double *result, double a, double b, double c)
      16  {
      17    result[0] = (a*b) + c;
      18    result[1] = (a*b) - c;
      19  }