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