131
|
1 /* { dg-options "-O2 -fdump-tree-optimized" } */
|
|
2
|
|
3 float
|
|
4 f1 (float a, float b, float c)
|
|
5 {
|
|
6 return __builtin_fmaf (a, b, -c);
|
|
7 }
|
|
8
|
|
9 double
|
|
10 f2 (double a, double b, double c)
|
|
11 {
|
|
12 return __builtin_fma (a, b, -c);
|
|
13 }
|
|
14
|
|
15 void
|
|
16 f3 (float a, float b, float c, float d, float e, float *res)
|
|
17 {
|
|
18 res[0] = __builtin_fmaf (a, b, -e);
|
|
19 res[1] = __builtin_fmaf (c, d, -e);
|
|
20 }
|
|
21
|
|
22 void
|
|
23 f4 (double a, double b, double c, double d, double e, double *res)
|
|
24 {
|
|
25 res[0] = __builtin_fma (a, b, -e);
|
|
26 res[1] = __builtin_fma (c, d, -e);
|
|
27 }
|
|
28
|
|
29 float
|
|
30 f5 (float a, float b, float c)
|
|
31 {
|
|
32 return -__builtin_fmaf (-a, b, c);
|
|
33 }
|
|
34
|
|
35 double
|
|
36 f6 (double a, double b, double c)
|
|
37 {
|
|
38 return -__builtin_fma (-a, b, c);
|
|
39 }
|
|
40
|
|
41 float
|
|
42 f7 (float a, float b, float c)
|
|
43 {
|
|
44 return -__builtin_fmaf (a, -b, c);
|
|
45 }
|
|
46
|
|
47 double
|
|
48 f8 (double a, double b, double c)
|
|
49 {
|
|
50 return -__builtin_fma (a, -b, c);
|
|
51 }
|
|
52
|
|
53 /* { dg-final { scan-tree-dump-times { = \.FMS \(} 10 "optimized" { target scalar_all_fma } } } */
|