c++: normalizing ttp constraints [PR115656]
[official-gcc.git] / gcc / testsuite / gcc.target / powerpc / ppc-fma-7.c
blob4092e463452c69f846429ef088ebfcbdef9fec4a
1 /* { dg-do compile { target { powerpc*-*-* } } } */
2 /* { dg-skip-if "" { powerpc*-*-darwin* } } */
3 /* { dg-options "-O3 -ftree-vectorize -mdejagnu-cpu=power6 -ffast-math" } */
4 /* { dg-require-effective-target powerpc_altivec } */
5 /* { dg-require-effective-target powerpc_fprs } */
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 " } } */
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. */
14 void
15 fft (double *result, double a, double b, double c)
17 result[0] = (a*b) + c;
18 result[1] = (a*b) - c;