1// RUN: %clang_builtins %s %librt -o %t && %run %t
2// REQUIRES: librt_has_comparesf2
3
4#include <stdio.h>
5
6int __eqsf2(float, float);
7int __gesf2(float, float);
8int __gtsf2(float, float);
9int __lesf2(float, float);
10int __ltsf2(float, float);
11int __nesf2(float, float);
12int __unordsf2(float, float);
13
14struct TestVector {
15 float a;
16 float b;
17 int eqReference;
18 int geReference;
19 int gtReference;
20 int leReference;
21 int ltReference;
22 int neReference;
23 int unReference;
24};
25
26int test__cmpsf2(const struct TestVector *vector) {
27
28 if (__eqsf2(vector->a, vector->b) != vector->eqReference) {
29 printf("error in __eqsf2(%a, %a) = %d, expected %d\n",
30 vector->a, vector->b,
31 __eqsf2(vector->a, vector->b),
32 vector->eqReference);
33 return 1;
34 }
35
36 if (__gesf2(vector->a, vector->b) != vector->geReference) {
37 printf("error in __gesf2(%a, %a) = %d, expected %d\n",
38 vector->a, vector->b,
39 __gesf2(vector->a, vector->b),
40 vector->geReference);
41 return 1;
42 }
43
44 if (__gtsf2(vector->a, vector->b) != vector->gtReference) {
45 printf("error in __gtsf2(%a, %a) = %d, expected %d\n",
46 vector->a, vector->b,
47 __gtsf2(vector->a, vector->b),
48 vector->gtReference);
49 return 1;
50 }
51
52 if (__lesf2(vector->a, vector->b) != vector->leReference) {
53 printf("error in __lesf2(%a, %a) = %d, expected %d\n",
54 vector->a, vector->b,
55 __lesf2(vector->a, vector->b),
56 vector->leReference);
57 return 1;
58 }
59
60 if (__ltsf2(vector->a, vector->b) != vector->ltReference) {
61 printf("error in __ltsf2(%a, %a) = %d, expected %d\n",
62 vector->a, vector->b,
63 __ltsf2(vector->a, vector->b),
64 vector->ltReference);
65 return 1;
66 }
67
68 if (__nesf2(vector->a, vector->b) != vector->neReference) {
69 printf("error in __nesf2(%a, %a) = %d, expected %d\n",
70 vector->a, vector->b,
71 __nesf2(vector->a, vector->b),
72 vector->neReference);
73 return 1;
74 }
75
76 if (__unordsf2(vector->a, vector->b) != vector->unReference) {
77 printf("error in __unordsf2(%a, %a) = %d, expected %d\n",
78 vector->a, vector->b,
79 __unordsf2(vector->a, vector->b),
80 vector->unReference);
81 return 1;
82 }
83
84 return 0;
85}
86
87/*
88void generateVectors() {
89
90 const float arguments[] = {
91 __builtin_nanf(""),
92 -__builtin_inff(),
93 -0x1.fffffep127,
94 -0x1.000002p0
95 -0x1.000000p0,
96 -0x1.fffffep-1f,
97 -0x1.000000p-126f,
98 -0x0.fffffep-126f,
99 -0x0.000002p-126f,
100 -0.0,
101 0.0,
102 0x0.000002p-126f,
103 0x0.fffffep-126f,
104 0x1.000000p-126f,
105 0x1.fffffep-1f,
106 0x1.000000p0,
107 0x1.000002p0,
108 0x1.fffffep127,
109 __builtin_inff()
110 };
111
112 int numArguments = sizeof arguments / sizeof arguments[0];
113
114 for (int i=0; i<numArguments; ++i) {
115 for (int j=0; j<numArguments; ++j) {
116 const float a = arguments[i];
117 const float b = arguments[j];
118 const int leResult = a < b ? -1 : a == b ? 0 : 1;
119 const int geResult = a > b ? 1 : a == b ? 0 : -1;
120 const int unResult = a != a || b != b ? 1 : 0;
121 printf("{%a,%a,%d,%d,%d,%d,%d,%d,%d},\n",
122 a, b,
123 leResult,
124 geResult,
125 geResult,
126 leResult,
127 leResult,
128 leResult,
129 unResult);
130 }
131 }
132} */
133
134static const struct TestVector vectors[] = {
135 {__builtin_nanf(""),__builtin_nanf(""),1,-1,-1,1,1,1,1},
136 {__builtin_nanf(""),-__builtin_inff(),1,-1,-1,1,1,1,1},
137 {__builtin_nanf(""),-0x1.fffffep+127f,1,-1,-1,1,1,1,1},
138 {__builtin_nanf(""),-0x1p0f,1,-1,-1,1,1,1,1},
139 {__builtin_nanf(""),-0x1.fffffep-1f,1,-1,-1,1,1,1,1},
140 {__builtin_nanf(""),-0x1p-126f,1,-1,-1,1,1,1,1},
141 {__builtin_nanf(""),-0x1.fffffcp-127,1,-1,-1,1,1,1,1},
142 {__builtin_nanf(""),-0x1p-149f,1,-1,-1,1,1,1,1},
143 {__builtin_nanf(""),-0x0p0f,1,-1,-1,1,1,1,1},
144 {__builtin_nanf(""),0x0p0f,1,-1,-1,1,1,1,1},
145 {__builtin_nanf(""),0x1p-149f,1,-1,-1,1,1,1,1},
146 {__builtin_nanf(""),0x1.fffffcp-127,1,-1,-1,1,1,1,1},
147 {__builtin_nanf(""),0x1p-126f,1,-1,-1,1,1,1,1},
148 {__builtin_nanf(""),0x1.fffffep-1f,1,-1,-1,1,1,1,1},
149 {__builtin_nanf(""),0x1p0f,1,-1,-1,1,1,1,1},
150 {__builtin_nanf(""),0x1.000002p0f,1,-1,-1,1,1,1,1},
151 {__builtin_nanf(""),0x1.fffffep+127f,1,-1,-1,1,1,1,1},
152 {__builtin_nanf(""),__builtin_inff(),1,-1,-1,1,1,1,1},
153 {-__builtin_inff(),__builtin_nanf(""),1,-1,-1,1,1,1,1},
154 {-__builtin_inff(),-__builtin_inff(),0,0,0,0,0,0,0},
155 {-__builtin_inff(),-0x1.fffffep+127f,-1,-1,-1,-1,-1,-1,0},
156 {-__builtin_inff(),-0x1p0f,-1,-1,-1,-1,-1,-1,0},
157 {-__builtin_inff(),-0x1.fffffep-1f,-1,-1,-1,-1,-1,-1,0},
158 {-__builtin_inff(),-0x1p-126f,-1,-1,-1,-1,-1,-1,0},
159 {-__builtin_inff(),-0x1.fffffcp-127,-1,-1,-1,-1,-1,-1,0},
160 {-__builtin_inff(),-0x1p-149f,-1,-1,-1,-1,-1,-1,0},
161 {-__builtin_inff(),-0x0p0f,-1,-1,-1,-1,-1,-1,0},
162 {-__builtin_inff(),0x0p0f,-1,-1,-1,-1,-1,-1,0},
163 {-__builtin_inff(),0x1p-149f,-1,-1,-1,-1,-1,-1,0},
164 {-__builtin_inff(),0x1.fffffcp-127,-1,-1,-1,-1,-1,-1,0},
165 {-__builtin_inff(),0x1p-126f,-1,-1,-1,-1,-1,-1,0},
166 {-__builtin_inff(),0x1.fffffep-1f,-1,-1,-1,-1,-1,-1,0},
167 {-__builtin_inff(),0x1p0f,-1,-1,-1,-1,-1,-1,0},
168 {-__builtin_inff(),0x1.000002p0f,-1,-1,-1,-1,-1,-1,0},
169 {-__builtin_inff(),0x1.fffffep+127f,-1,-1,-1,-1,-1,-1,0},
170 {-__builtin_inff(),__builtin_inff(),-1,-1,-1,-1,-1,-1,0},
171 {-0x1.fffffep+127f,__builtin_nanf(""),1,-1,-1,1,1,1,1},
172 {-0x1.fffffep+127f,-__builtin_inff(),1,1,1,1,1,1,0},
173 {-0x1.fffffep+127f,-0x1.fffffep+127f,0,0,0,0,0,0,0},
174 {-0x1.fffffep+127f,-0x1p0f,-1,-1,-1,-1,-1,-1,0},
175 {-0x1.fffffep+127f,-0x1.fffffep-1f,-1,-1,-1,-1,-1,-1,0},
176 {-0x1.fffffep+127f,-0x1p-126f,-1,-1,-1,-1,-1,-1,0},
177 {-0x1.fffffep+127f,-0x1.fffffcp-127,-1,-1,-1,-1,-1,-1,0},
178 {-0x1.fffffep+127f,-0x1p-149f,-1,-1,-1,-1,-1,-1,0},
179 {-0x1.fffffep+127f,-0x0p0f,-1,-1,-1,-1,-1,-1,0},
180 {-0x1.fffffep+127f,0x0p0f,-1,-1,-1,-1,-1,-1,0},
181 {-0x1.fffffep+127f,0x1p-149f,-1,-1,-1,-1,-1,-1,0},
182 {-0x1.fffffep+127f,0x1.fffffcp-127,-1,-1,-1,-1,-1,-1,0},
183 {-0x1.fffffep+127f,0x1p-126f,-1,-1,-1,-1,-1,-1,0},
184 {-0x1.fffffep+127f,0x1.fffffep-1f,-1,-1,-1,-1,-1,-1,0},
185 {-0x1.fffffep+127f,0x1p0f,-1,-1,-1,-1,-1,-1,0},
186 {-0x1.fffffep+127f,0x1.000002p0f,-1,-1,-1,-1,-1,-1,0},
187 {-0x1.fffffep+127f,0x1.fffffep+127f,-1,-1,-1,-1,-1,-1,0},
188 {-0x1.fffffep+127f,__builtin_inff(),-1,-1,-1,-1,-1,-1,0},
189 {-0x1p0f,__builtin_nanf(""),1,-1,-1,1,1,1,1},
190 {-0x1p0f,-__builtin_inff(),1,1,1,1,1,1,0},
191 {-0x1p0f,-0x1.fffffep+127f,1,1,1,1,1,1,0},
192 {-0x1p0f,-0x1p0f,0,0,0,0,0,0,0},
193 {-0x1p0f,-0x1.fffffep-1f,-1,-1,-1,-1,-1,-1,0},
194 {-0x1p0f,-0x1p-126f,-1,-1,-1,-1,-1,-1,0},
195 {-0x1p0f,-0x1.fffffcp-127,-1,-1,-1,-1,-1,-1,0},
196 {-0x1p0f,-0x1p-149f,-1,-1,-1,-1,-1,-1,0},
197 {-0x1p0f,-0x0p0f,-1,-1,-1,-1,-1,-1,0},
198 {-0x1p0f,0x0p0f,-1,-1,-1,-1,-1,-1,0},
199 {-0x1p0f,0x1p-149f,-1,-1,-1,-1,-1,-1,0},
200 {-0x1p0f,0x1.fffffcp-127,-1,-1,-1,-1,-1,-1,0},
201 {-0x1p0f,0x1p-126f,-1,-1,-1,-1,-1,-1,0},
202 {-0x1p0f,0x1.fffffep-1f,-1,-1,-1,-1,-1,-1,0},
203 {-0x1p0f,0x1p0f,-1,-1,-1,-1,-1,-1,0},
204 {-0x1p0f,0x1.000002p0f,-1,-1,-1,-1,-1,-1,0},
205 {-0x1p0f,0x1.fffffep+127f,-1,-1,-1,-1,-1,-1,0},
206 {-0x1p0f,__builtin_inff(),-1,-1,-1,-1,-1,-1,0},
207 {-0x1.fffffep-1f,__builtin_nanf(""),1,-1,-1,1,1,1,1},
208 {-0x1.fffffep-1f,-__builtin_inff(),1,1,1,1,1,1,0},
209 {-0x1.fffffep-1f,-0x1.fffffep+127f,1,1,1,1,1,1,0},
210 {-0x1.fffffep-1f,-0x1p0f,1,1,1,1,1,1,0},
211 {-0x1.fffffep-1f,-0x1.fffffep-1f,0,0,0,0,0,0,0},
212 {-0x1.fffffep-1f,-0x1p-126f,-1,-1,-1,-1,-1,-1,0},
213 {-0x1.fffffep-1f,-0x1.fffffcp-127,-1,-1,-1,-1,-1,-1,0},
214 {-0x1.fffffep-1f,-0x1p-149f,-1,-1,-1,-1,-1,-1,0},
215 {-0x1.fffffep-1f,-0x0p0f,-1,-1,-1,-1,-1,-1,0},
216 {-0x1.fffffep-1f,0x0p0f,-1,-1,-1,-1,-1,-1,0},
217 {-0x1.fffffep-1f,0x1p-149f,-1,-1,-1,-1,-1,-1,0},
218 {-0x1.fffffep-1f,0x1.fffffcp-127,-1,-1,-1,-1,-1,-1,0},
219 {-0x1.fffffep-1f,0x1p-126f,-1,-1,-1,-1,-1,-1,0},
220 {-0x1.fffffep-1f,0x1.fffffep-1f,-1,-1,-1,-1,-1,-1,0},
221 {-0x1.fffffep-1f,0x1p0f,-1,-1,-1,-1,-1,-1,0},
222 {-0x1.fffffep-1f,0x1.000002p0f,-1,-1,-1,-1,-1,-1,0},
223 {-0x1.fffffep-1f,0x1.fffffep+127f,-1,-1,-1,-1,-1,-1,0},
224 {-0x1.fffffep-1f,__builtin_inff(),-1,-1,-1,-1,-1,-1,0},
225 {-0x1p-126f,__builtin_nanf(""),1,-1,-1,1,1,1,1},
226 {-0x1p-126f,-__builtin_inff(),1,1,1,1,1,1,0},
227 {-0x1p-126f,-0x1.fffffep+127f,1,1,1,1,1,1,0},
228 {-0x1p-126f,-0x1p0f,1,1,1,1,1,1,0},
229 {-0x1p-126f,-0x1.fffffep-1f,1,1,1,1,1,1,0},
230 {-0x1p-126f,-0x1p-126f,0,0,0,0,0,0,0},
231 {-0x1p-126f,-0x1.fffffcp-127,-1,-1,-1,-1,-1,-1,0},
232 {-0x1p-126f,-0x1p-149f,-1,-1,-1,-1,-1,-1,0},
233 {-0x1p-126f,-0x0p0f,-1,-1,-1,-1,-1,-1,0},
234 {-0x1p-126f,0x0p0f,-1,-1,-1,-1,-1,-1,0},
235 {-0x1p-126f,0x1p-149f,-1,-1,-1,-1,-1,-1,0},
236 {-0x1p-126f,0x1.fffffcp-127,-1,-1,-1,-1,-1,-1,0},
237 {-0x1p-126f,0x1p-126f,-1,-1,-1,-1,-1,-1,0},
238 {-0x1p-126f,0x1.fffffep-1f,-1,-1,-1,-1,-1,-1,0},
239 {-0x1p-126f,0x1p0f,-1,-1,-1,-1,-1,-1,0},
240 {-0x1p-126f,0x1.000002p0f,-1,-1,-1,-1,-1,-1,0},
241 {-0x1p-126f,0x1.fffffep+127f,-1,-1,-1,-1,-1,-1,0},
242 {-0x1p-126f,__builtin_inff(),-1,-1,-1,-1,-1,-1,0},
243 {-0x1.fffffcp-127,__builtin_nanf(""),1,-1,-1,1,1,1,1},
244 {-0x1.fffffcp-127,-__builtin_inff(),1,1,1,1,1,1,0},
245 {-0x1.fffffcp-127,-0x1.fffffep+127f,1,1,1,1,1,1,0},
246 {-0x1.fffffcp-127,-0x1p0f,1,1,1,1,1,1,0},
247 {-0x1.fffffcp-127,-0x1.fffffep-1f,1,1,1,1,1,1,0},
248 {-0x1.fffffcp-127,-0x1p-126f,1,1,1,1,1,1,0},
249 {-0x1.fffffcp-127,-0x1.fffffcp-127,0,0,0,0,0,0,0},
250 {-0x1.fffffcp-127,-0x1p-149f,-1,-1,-1,-1,-1,-1,0},
251 {-0x1.fffffcp-127,-0x0p0f,-1,-1,-1,-1,-1,-1,0},
252 {-0x1.fffffcp-127,0x0p0f,-1,-1,-1,-1,-1,-1,0},
253 {-0x1.fffffcp-127,0x1p-149f,-1,-1,-1,-1,-1,-1,0},
254 {-0x1.fffffcp-127,0x1.fffffcp-127,-1,-1,-1,-1,-1,-1,0},
255 {-0x1.fffffcp-127,0x1p-126f,-1,-1,-1,-1,-1,-1,0},
256 {-0x1.fffffcp-127,0x1.fffffep-1f,-1,-1,-1,-1,-1,-1,0},
257 {-0x1.fffffcp-127,0x1p0f,-1,-1,-1,-1,-1,-1,0},
258 {-0x1.fffffcp-127,0x1.000002p0f,-1,-1,-1,-1,-1,-1,0},
259 {-0x1.fffffcp-127,0x1.fffffep+127f,-1,-1,-1,-1,-1,-1,0},
260 {-0x1.fffffcp-127,__builtin_inff(),-1,-1,-1,-1,-1,-1,0},
261 {-0x1p-149f,__builtin_nanf(""),1,-1,-1,1,1,1,1},
262 {-0x1p-149f,-__builtin_inff(),1,1,1,1,1,1,0},
263 {-0x1p-149f,-0x1.fffffep+127f,1,1,1,1,1,1,0},
264 {-0x1p-149f,-0x1p0f,1,1,1,1,1,1,0},
265 {-0x1p-149f,-0x1.fffffep-1f,1,1,1,1,1,1,0},
266 {-0x1p-149f,-0x1p-126f,1,1,1,1,1,1,0},
267 {-0x1p-149f,-0x1.fffffcp-127,1,1,1,1,1,1,0},
268 {-0x1p-149f,-0x1p-149f,0,0,0,0,0,0,0},
269 {-0x1p-149f,-0x0p0f,-1,-1,-1,-1,-1,-1,0},
270 {-0x1p-149f,0x0p0f,-1,-1,-1,-1,-1,-1,0},
271 {-0x1p-149f,0x1p-149f,-1,-1,-1,-1,-1,-1,0},
272 {-0x1p-149f,0x1.fffffcp-127,-1,-1,-1,-1,-1,-1,0},
273 {-0x1p-149f,0x1p-126f,-1,-1,-1,-1,-1,-1,0},
274 {-0x1p-149f,0x1.fffffep-1f,-1,-1,-1,-1,-1,-1,0},
275 {-0x1p-149f,0x1p0f,-1,-1,-1,-1,-1,-1,0},
276 {-0x1p-149f,0x1.000002p0f,-1,-1,-1,-1,-1,-1,0},
277 {-0x1p-149f,0x1.fffffep+127f,-1,-1,-1,-1,-1,-1,0},
278 {-0x1p-149f,__builtin_inff(),-1,-1,-1,-1,-1,-1,0},
279 {-0x0p0f,__builtin_nanf(""),1,-1,-1,1,1,1,1},
280 {-0x0p0f,-__builtin_inff(),1,1,1,1,1,1,0},
281 {-0x0p0f,-0x1.fffffep+127f,1,1,1,1,1,1,0},
282 {-0x0p0f,-0x1p0f,1,1,1,1,1,1,0},
283 {-0x0p0f,-0x1.fffffep-1f,1,1,1,1,1,1,0},
284 {-0x0p0f,-0x1p-126f,1,1,1,1,1,1,0},
285 {-0x0p0f,-0x1.fffffcp-127,1,1,1,1,1,1,0},
286 {-0x0p0f,-0x1p-149f,1,1,1,1,1,1,0},
287 {-0x0p0f,-0x0p0f,0,0,0,0,0,0,0},
288 {-0x0p0f,0x0p0f,0,0,0,0,0,0,0},
289 {-0x0p0f,0x1p-149f,-1,-1,-1,-1,-1,-1,0},
290 {-0x0p0f,0x1.fffffcp-127,-1,-1,-1,-1,-1,-1,0},
291 {-0x0p0f,0x1p-126f,-1,-1,-1,-1,-1,-1,0},
292 {-0x0p0f,0x1.fffffep-1f,-1,-1,-1,-1,-1,-1,0},
293 {-0x0p0f,0x1p0f,-1,-1,-1,-1,-1,-1,0},
294 {-0x0p0f,0x1.000002p0f,-1,-1,-1,-1,-1,-1,0},
295 {-0x0p0f,0x1.fffffep+127f,-1,-1,-1,-1,-1,-1,0},
296 {-0x0p0f,__builtin_inff(),-1,-1,-1,-1,-1,-1,0},
297 {0x0p0f,__builtin_nanf(""),1,-1,-1,1,1,1,1},
298 {0x0p0f,-__builtin_inff(),1,1,1,1,1,1,0},
299 {0x0p0f,-0x1.fffffep+127f,1,1,1,1,1,1,0},
300 {0x0p0f,-0x1p0f,1,1,1,1,1,1,0},
301 {0x0p0f,-0x1.fffffep-1f,1,1,1,1,1,1,0},
302 {0x0p0f,-0x1p-126f,1,1,1,1,1,1,0},
303 {0x0p0f,-0x1.fffffcp-127,1,1,1,1,1,1,0},
304 {0x0p0f,-0x1p-149f,1,1,1,1,1,1,0},
305 {0x0p0f,-0x0p0f,0,0,0,0,0,0,0},
306 {0x0p0f,0x0p0f,0,0,0,0,0,0,0},
307 {0x0p0f,0x1p-149f,-1,-1,-1,-1,-1,-1,0},
308 {0x0p0f,0x1.fffffcp-127,-1,-1,-1,-1,-1,-1,0},
309 {0x0p0f,0x1p-126f,-1,-1,-1,-1,-1,-1,0},
310 {0x0p0f,0x1.fffffep-1f,-1,-1,-1,-1,-1,-1,0},
311 {0x0p0f,0x1p0f,-1,-1,-1,-1,-1,-1,0},
312 {0x0p0f,0x1.000002p0f,-1,-1,-1,-1,-1,-1,0},
313 {0x0p0f,0x1.fffffep+127f,-1,-1,-1,-1,-1,-1,0},
314 {0x0p0f,__builtin_inff(),-1,-1,-1,-1,-1,-1,0},
315 {0x1p-149f,__builtin_nanf(""),1,-1,-1,1,1,1,1},
316 {0x1p-149f,-__builtin_inff(),1,1,1,1,1,1,0},
317 {0x1p-149f,-0x1.fffffep+127f,1,1,1,1,1,1,0},
318 {0x1p-149f,-0x1p0f,1,1,1,1,1,1,0},
319 {0x1p-149f,-0x1.fffffep-1f,1,1,1,1,1,1,0},
320 {0x1p-149f,-0x1p-126f,1,1,1,1,1,1,0},
321 {0x1p-149f,-0x1.fffffcp-127,1,1,1,1,1,1,0},
322 {0x1p-149f,-0x1p-149f,1,1,1,1,1,1,0},
323 {0x1p-149f,-0x0p0f,1,1,1,1,1,1,0},
324 {0x1p-149f,0x0p0f,1,1,1,1,1,1,0},
325 {0x1p-149f,0x1p-149f,0,0,0,0,0,0,0},
326 {0x1p-149f,0x1.fffffcp-127,-1,-1,-1,-1,-1,-1,0},
327 {0x1p-149f,0x1p-126f,-1,-1,-1,-1,-1,-1,0},
328 {0x1p-149f,0x1.fffffep-1f,-1,-1,-1,-1,-1,-1,0},
329 {0x1p-149f,0x1p0f,-1,-1,-1,-1,-1,-1,0},
330 {0x1p-149f,0x1.000002p0f,-1,-1,-1,-1,-1,-1,0},
331 {0x1p-149f,0x1.fffffep+127f,-1,-1,-1,-1,-1,-1,0},
332 {0x1p-149f,__builtin_inff(),-1,-1,-1,-1,-1,-1,0},
333 {0x1.fffffcp-127,__builtin_nanf(""),1,-1,-1,1,1,1,1},
334 {0x1.fffffcp-127,-__builtin_inff(),1,1,1,1,1,1,0},
335 {0x1.fffffcp-127,-0x1.fffffep+127f,1,1,1,1,1,1,0},
336 {0x1.fffffcp-127,-0x1p0f,1,1,1,1,1,1,0},
337 {0x1.fffffcp-127,-0x1.fffffep-1f,1,1,1,1,1,1,0},
338 {0x1.fffffcp-127,-0x1p-126f,1,1,1,1,1,1,0},
339 {0x1.fffffcp-127,-0x1.fffffcp-127,1,1,1,1,1,1,0},
340 {0x1.fffffcp-127,-0x1p-149f,1,1,1,1,1,1,0},
341 {0x1.fffffcp-127,-0x0p0f,1,1,1,1,1,1,0},
342 {0x1.fffffcp-127,0x0p0f,1,1,1,1,1,1,0},
343 {0x1.fffffcp-127,0x1p-149f,1,1,1,1,1,1,0},
344 {0x1.fffffcp-127,0x1.fffffcp-127,0,0,0,0,0,0,0},
345 {0x1.fffffcp-127,0x1p-126f,-1,-1,-1,-1,-1,-1,0},
346 {0x1.fffffcp-127,0x1.fffffep-1f,-1,-1,-1,-1,-1,-1,0},
347 {0x1.fffffcp-127,0x1p0f,-1,-1,-1,-1,-1,-1,0},
348 {0x1.fffffcp-127,0x1.000002p0f,-1,-1,-1,-1,-1,-1,0},
349 {0x1.fffffcp-127,0x1.fffffep+127f,-1,-1,-1,-1,-1,-1,0},
350 {0x1.fffffcp-127,__builtin_inff(),-1,-1,-1,-1,-1,-1,0},
351 {0x1p-126f,__builtin_nanf(""),1,-1,-1,1,1,1,1},
352 {0x1p-126f,-__builtin_inff(),1,1,1,1,1,1,0},
353 {0x1p-126f,-0x1.fffffep+127f,1,1,1,1,1,1,0},
354 {0x1p-126f,-0x1p0f,1,1,1,1,1,1,0},
355 {0x1p-126f,-0x1.fffffep-1f,1,1,1,1,1,1,0},
356 {0x1p-126f,-0x1p-126f,1,1,1,1,1,1,0},
357 {0x1p-126f,-0x1.fffffcp-127,1,1,1,1,1,1,0},
358 {0x1p-126f,-0x1p-149f,1,1,1,1,1,1,0},
359 {0x1p-126f,-0x0p0f,1,1,1,1,1,1,0},
360 {0x1p-126f,0x0p0f,1,1,1,1,1,1,0},
361 {0x1p-126f,0x1p-149f,1,1,1,1,1,1,0},
362 {0x1p-126f,0x1.fffffcp-127,1,1,1,1,1,1,0},
363 {0x1p-126f,0x1p-126f,0,0,0,0,0,0,0},
364 {0x1p-126f,0x1.fffffep-1f,-1,-1,-1,-1,-1,-1,0},
365 {0x1p-126f,0x1p0f,-1,-1,-1,-1,-1,-1,0},
366 {0x1p-126f,0x1.000002p0f,-1,-1,-1,-1,-1,-1,0},
367 {0x1p-126f,0x1.fffffep+127f,-1,-1,-1,-1,-1,-1,0},
368 {0x1p-126f,__builtin_inff(),-1,-1,-1,-1,-1,-1,0},
369 {0x1.fffffep-1f,__builtin_nanf(""),1,-1,-1,1,1,1,1},
370 {0x1.fffffep-1f,-__builtin_inff(),1,1,1,1,1,1,0},
371 {0x1.fffffep-1f,-0x1.fffffep+127f,1,1,1,1,1,1,0},
372 {0x1.fffffep-1f,-0x1p0f,1,1,1,1,1,1,0},
373 {0x1.fffffep-1f,-0x1.fffffep-1f,1,1,1,1,1,1,0},
374 {0x1.fffffep-1f,-0x1p-126f,1,1,1,1,1,1,0},
375 {0x1.fffffep-1f,-0x1.fffffcp-127,1,1,1,1,1,1,0},
376 {0x1.fffffep-1f,-0x1p-149f,1,1,1,1,1,1,0},
377 {0x1.fffffep-1f,-0x0p0f,1,1,1,1,1,1,0},
378 {0x1.fffffep-1f,0x0p0f,1,1,1,1,1,1,0},
379 {0x1.fffffep-1f,0x1p-149f,1,1,1,1,1,1,0},
380 {0x1.fffffep-1f,0x1.fffffcp-127,1,1,1,1,1,1,0},
381 {0x1.fffffep-1f,0x1p-126f,1,1,1,1,1,1,0},
382 {0x1.fffffep-1f,0x1.fffffep-1f,0,0,0,0,0,0,0},
383 {0x1.fffffep-1f,0x1p0f,-1,-1,-1,-1,-1,-1,0},
384 {0x1.fffffep-1f,0x1.000002p0f,-1,-1,-1,-1,-1,-1,0},
385 {0x1.fffffep-1f,0x1.fffffep+127f,-1,-1,-1,-1,-1,-1,0},
386 {0x1.fffffep-1f,__builtin_inff(),-1,-1,-1,-1,-1,-1,0},
387 {0x1p0f,__builtin_nanf(""),1,-1,-1,1,1,1,1},
388 {0x1p0f,-__builtin_inff(),1,1,1,1,1,1,0},
389 {0x1p0f,-0x1.fffffep+127f,1,1,1,1,1,1,0},
390 {0x1p0f,-0x1p0f,1,1,1,1,1,1,0},
391 {0x1p0f,-0x1.fffffep-1f,1,1,1,1,1,1,0},
392 {0x1p0f,-0x1p-126f,1,1,1,1,1,1,0},
393 {0x1p0f,-0x1.fffffcp-127,1,1,1,1,1,1,0},
394 {0x1p0f,-0x1p-149f,1,1,1,1,1,1,0},
395 {0x1p0f,-0x0p0f,1,1,1,1,1,1,0},
396 {0x1p0f,0x0p0f,1,1,1,1,1,1,0},
397 {0x1p0f,0x1p-149f,1,1,1,1,1,1,0},
398 {0x1p0f,0x1.fffffcp-127,1,1,1,1,1,1,0},
399 {0x1p0f,0x1p-126f,1,1,1,1,1,1,0},
400 {0x1p0f,0x1.fffffep-1f,1,1,1,1,1,1,0},
401 {0x1p0f,0x1p0f,0,0,0,0,0,0,0},
402 {0x1p0f,0x1.000002p0f,-1,-1,-1,-1,-1,-1,0},
403 {0x1p0f,0x1.fffffep+127f,-1,-1,-1,-1,-1,-1,0},
404 {0x1p0f,__builtin_inff(),-1,-1,-1,-1,-1,-1,0},
405 {0x1.000002p0f,__builtin_nanf(""),1,-1,-1,1,1,1,1},
406 {0x1.000002p0f,-__builtin_inff(),1,1,1,1,1,1,0},
407 {0x1.000002p0f,-0x1.fffffep+127f,1,1,1,1,1,1,0},
408 {0x1.000002p0f,-0x1p0f,1,1,1,1,1,1,0},
409 {0x1.000002p0f,-0x1.fffffep-1f,1,1,1,1,1,1,0},
410 {0x1.000002p0f,-0x1p-126f,1,1,1,1,1,1,0},
411 {0x1.000002p0f,-0x1.fffffcp-127,1,1,1,1,1,1,0},
412 {0x1.000002p0f,-0x1p-149f,1,1,1,1,1,1,0},
413 {0x1.000002p0f,-0x0p0f,1,1,1,1,1,1,0},
414 {0x1.000002p0f,0x0p0f,1,1,1,1,1,1,0},
415 {0x1.000002p0f,0x1p-149f,1,1,1,1,1,1,0},
416 {0x1.000002p0f,0x1.fffffcp-127,1,1,1,1,1,1,0},
417 {0x1.000002p0f,0x1p-126f,1,1,1,1,1,1,0},
418 {0x1.000002p0f,0x1.fffffep-1f,1,1,1,1,1,1,0},
419 {0x1.000002p0f,0x1p0f,1,1,1,1,1,1,0},
420 {0x1.000002p0f,0x1.000002p0f,0,0,0,0,0,0,0},
421 {0x1.000002p0f,0x1.fffffep+127f,-1,-1,-1,-1,-1,-1,0},
422 {0x1.000002p0f,__builtin_inff(),-1,-1,-1,-1,-1,-1,0},
423 {0x1.fffffep+127f,__builtin_nanf(""),1,-1,-1,1,1,1,1},
424 {0x1.fffffep+127f,-__builtin_inff(),1,1,1,1,1,1,0},
425 {0x1.fffffep+127f,-0x1.fffffep+127f,1,1,1,1,1,1,0},
426 {0x1.fffffep+127f,-0x1p0f,1,1,1,1,1,1,0},
427 {0x1.fffffep+127f,-0x1.fffffep-1f,1,1,1,1,1,1,0},
428 {0x1.fffffep+127f,-0x1p-126f,1,1,1,1,1,1,0},
429 {0x1.fffffep+127f,-0x1.fffffcp-127,1,1,1,1,1,1,0},
430 {0x1.fffffep+127f,-0x1p-149f,1,1,1,1,1,1,0},
431 {0x1.fffffep+127f,-0x0p0f,1,1,1,1,1,1,0},
432 {0x1.fffffep+127f,0x0p0f,1,1,1,1,1,1,0},
433 {0x1.fffffep+127f,0x1p-149f,1,1,1,1,1,1,0},
434 {0x1.fffffep+127f,0x1.fffffcp-127,1,1,1,1,1,1,0},
435 {0x1.fffffep+127f,0x1p-126f,1,1,1,1,1,1,0},
436 {0x1.fffffep+127f,0x1.fffffep-1f,1,1,1,1,1,1,0},
437 {0x1.fffffep+127f,0x1p0f,1,1,1,1,1,1,0},
438 {0x1.fffffep+127f,0x1.000002p0f,1,1,1,1,1,1,0},
439 {0x1.fffffep+127f,0x1.fffffep+127f,0,0,0,0,0,0,0},
440 {0x1.fffffep+127f,__builtin_inff(),-1,-1,-1,-1,-1,-1,0},
441 {__builtin_inff(),__builtin_nanf(""),1,-1,-1,1,1,1,1},
442 {__builtin_inff(),-__builtin_inff(),1,1,1,1,1,1,0},
443 {__builtin_inff(),-0x1.fffffep+127f,1,1,1,1,1,1,0},
444 {__builtin_inff(),-0x1p0f,1,1,1,1,1,1,0},
445 {__builtin_inff(),-0x1.fffffep-1f,1,1,1,1,1,1,0},
446 {__builtin_inff(),-0x1p-126f,1,1,1,1,1,1,0},
447 {__builtin_inff(),-0x1.fffffcp-127,1,1,1,1,1,1,0},
448 {__builtin_inff(),-0x1p-149f,1,1,1,1,1,1,0},
449 {__builtin_inff(),-0x0p0f,1,1,1,1,1,1,0},
450 {__builtin_inff(),0x0p0f,1,1,1,1,1,1,0},
451 {__builtin_inff(),0x1p-149f,1,1,1,1,1,1,0},
452 {__builtin_inff(),0x1.fffffcp-127,1,1,1,1,1,1,0},
453 {__builtin_inff(),0x1p-126f,1,1,1,1,1,1,0},
454 {__builtin_inff(),0x1.fffffep-1f,1,1,1,1,1,1,0},
455 {__builtin_inff(),0x1p0f,1,1,1,1,1,1,0},
456 {__builtin_inff(),0x1.000002p0f,1,1,1,1,1,1,0},
457 {__builtin_inff(),0x1.fffffep+127f,1,1,1,1,1,1,0},
458 {__builtin_inff(),__builtin_inff(),0,0,0,0,0,0,0},
459};
460
461int main(int argc, char *argv[]) {
462 const int numVectors = sizeof vectors / sizeof vectors[0];
463 int i;
464 for (i = 0; i<numVectors; ++i) {
465 if (test__cmpsf2(&vectors[i])) return 1;
466 }
467 return 0;
468}
469