2018-05-17 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / l_fma_1.h
blob4a0fd6e0050765deac4293bef9e674a194dd6beb
2 #ifndef l_fma_1
3 #define l_fma_1
5 void __attribute__((sseregparm))
6 test_noneg_add_noneg_add (TYPE *a, TYPE *b, TYPE *c, TYPE *d, int n)
8 int i;
9 for (i = 0; i < n; i++)
10 d[i] = ((a[i] * b[i]) + c[i]) * a[i] + b[i];
13 void __attribute__((sseregparm))
14 test_noneg_add_noneg_sub (TYPE *a, TYPE *b, TYPE *c, TYPE *d, int n)
16 int i;
17 for (i = 0; i < n; i++)
18 d[i] = ((a[i] * b[i]) + c[i]) * a[i] - b[i];
21 void __attribute__((sseregparm))
22 test_noneg_add_neg_add (TYPE *a, TYPE *b, TYPE *c, TYPE *d, int n)
24 int i;
25 for (i = 0; i < n; i++)
26 d[i] = -((a[i] * b[i]) + c[i]) * a[i] + b[i];
29 void __attribute__((sseregparm))
30 test_noneg_add_neg_sub (TYPE *a, TYPE *b, TYPE *c, TYPE *d, int n)
32 int i;
33 for (i = 0; i < n; i++)
34 d[i] = -((a[i] * b[i]) + c[i]) * a[i] - b[i];
37 void __attribute__((sseregparm))
38 test_noneg_sub_noneg_add (TYPE *a, TYPE *b, TYPE *c, TYPE *d, int n)
40 int i;
41 for (i = 0; i < n; i++)
42 d[i] = ((a[i] * b[i]) - c[i]) * a[i] + b[i];
45 void __attribute__((sseregparm))
46 test_noneg_sub_noneg_sub (TYPE *a, TYPE *b, TYPE *c, TYPE *d, int n)
48 int i;
49 for (i = 0; i < n; i++)
50 d[i] = ((a[i] * b[i]) - c[i]) * a[i] - b[i];
53 void __attribute__((sseregparm))
54 test_noneg_sub_neg_add (TYPE *a, TYPE *b, TYPE *c, TYPE *d, int n)
56 int i;
57 for (i = 0; i < n; i++)
58 d[i] = -((a[i] * b[i]) - c[i]) * a[i] + b[i];
61 void __attribute__((sseregparm))
62 test_noneg_sub_neg_sub (TYPE *a, TYPE *b, TYPE *c, TYPE *d, int n)
64 int i;
65 for (i = 0; i < n; i++)
66 d[i] = -((a[i] * b[i]) - c[i]) * a[i] - b[i];
69 void __attribute__((sseregparm))
70 test_neg_add_noneg_add (TYPE *a, TYPE *b, TYPE *c, TYPE *d, int n)
72 int i;
73 for (i = 0; i < n; i++)
74 d[i] = (-(a[i] * b[i]) + c[i]) * a[i] + b[i];
77 void __attribute__((sseregparm))
78 test_neg_add_noneg_sub (TYPE *a, TYPE *b, TYPE *c, TYPE *d, int n)
80 int i;
81 for (i = 0; i < n; i++)
82 d[i] = (-(a[i] * b[i]) + c[i]) * a[i] - b[i];
85 void __attribute__((sseregparm))
86 test_neg_add_neg_add (TYPE *a, TYPE *b, TYPE *c, TYPE *d, int n)
88 int i;
89 for (i = 0; i < n; i++)
90 d[i] = -(-(a[i] * b[i]) + c[i]) * a[i] + b[i];
93 void __attribute__((sseregparm))
94 test_neg_add_neg_sub (TYPE *a, TYPE *b, TYPE *c, TYPE *d, int n)
96 int i;
97 for (i = 0; i < n; i++)
98 d[i] = -(-(a[i] * b[i]) + c[i]) * a[i] - b[i];
101 void __attribute__((sseregparm))
102 test_neg_sub_noneg_add (TYPE *a, TYPE *b, TYPE *c, TYPE *d, int n)
104 int i;
105 for (i = 0; i < n; i++)
106 d[i] = (-(a[i] * b[i]) - c[i]) * a[i] + b[i];
109 void __attribute__((sseregparm))
110 test_neg_sub_noneg_sub (TYPE *a, TYPE *b, TYPE *c, TYPE *d, int n)
112 int i;
113 for (i = 0; i < n; i++)
114 d[i] = (-(a[i] * b[i]) - c[i]) * a[i] - b[i];
117 void __attribute__((sseregparm))
118 test_neg_sub_neg_add (TYPE *a, TYPE *b, TYPE *c, TYPE *d, int n)
120 int i;
121 for (i = 0; i < n; i++)
122 d[i] = -(-(a[i] * b[i]) - c[i]) * a[i] + b[i];
125 void __attribute__((sseregparm))
126 test_neg_sub_neg_sub (TYPE *a, TYPE *b, TYPE *c, TYPE *d, int n)
128 int i;
129 for (i = 0; i < n; i++)
130 d[i] = -(-(a[i] * b[i]) - c[i]) * a[i] - b[i];
133 #endif