Fix warning with -Wsign-compare -Wsystem-headers
[official-gcc.git] / gcc / testsuite / gcc.dg / fma-6.c
blob87258cec4a27e708392dc07bd1815a4d6b68946e
1 /* { dg-options "-O2 -fdump-tree-optimized" } */
3 float
4 f1 (float a, float b, float c)
6 return __builtin_fmaf (-a, b, c);
9 double
10 f2 (double a, double b, double c)
12 return __builtin_fma (-a, b, c);
15 float
16 f3 (float a, float b, float c)
18 return __builtin_fmaf (a, -b, c);
21 double
22 f4 (double a, double b, double c)
24 return __builtin_fma (a, -b, c);
27 void
28 f5 (float a, float b, float c, float d, float e, float *res)
30 res[0] = __builtin_fmaf (-a, b, c);
31 res[1] = __builtin_fmaf (-a, d, e);
34 void
35 f6 (double a, double b, double c, double d, double e, double *res)
37 res[0] = __builtin_fma (-a, b, c);
38 res[1] = __builtin_fma (-a, d, e);
41 void
42 f7 (float a, float b, float c, float d, float e, float *res)
44 res[0] = __builtin_fmaf (a, -b, c);
45 res[1] = __builtin_fmaf (d, -b, e);
48 void
49 f8 (double a, double b, double c, double d, double e, double *res)
51 res[0] = __builtin_fma (a, -b, c);
52 res[1] = __builtin_fma (d, -b, e);
55 float
56 f9 (float a, float b, float c)
58 return -__builtin_fmaf (a, b, -c);
61 double
62 f10 (double a, double b, double c)
64 return -__builtin_fma (a, b, -c);
67 /* { dg-final { scan-tree-dump-times { = \.FNMA \(} 14 "optimized" { target scalar_all_fma } } } */