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-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power6" } } */
6 /* { dg-options "-O3 -ftree-vectorize -mcpu=power6 -ffast-math" } */
7 /* { dg-final { scan-assembler-times "fmadd" 1 } } */
8 /* { dg-final { scan-assembler-times "fmsub " 1 } } */
9 /* { dg-final { scan-assembler-not "fmul" } } */
10 /* { dg-final { scan-assembler-not "fadd " } } */
12 /* Check whether the common FFT idiom (a*b)+c and (a*b)-c generates two fma
13 instructions, instead of a multiply, add, and subtract. */
16 fft (double *result
, double a
, double b
, double c
)
18 result
[0] = (a
*b
) + c
;
19 result
[1] = (a
*b
) - c
;