Debian Codegraph @

gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvfcvt.c

raw
1 /* { dg-options "-mlasx -w -fno-strict-aliasing" } */
2 #include "../simd_correctness_check.h"
3 #include <lasxintrin.h>
4
5 int
6 main ()
7 {
8 __m256i __m256i_op0, __m256i_op1, __m256i_op2, __m256i_out, __m256i_result;
9 __m256 __m256_op0, __m256_op1, __m256_op2, __m256_out, __m256_result;
10 __m256d __m256d_op0, __m256d_op1, __m256d_op2, __m256d_out, __m256d_result;
11
12 int int_op0, int_op1, int_op2, int_out, int_result, i = 1, fail;
13 long int long_op0, long_op1, long_op2, lont_out, lont_result;
14 long int long_int_out, long_int_result;
15 unsigned int unsigned_int_out, unsigned_int_result;
16 unsigned long int unsigned_long_int_out, unsigned_long_int_result;
17
18 *((int *)&__m256_op0[7]) = 0x00000000;
19 *((int *)&__m256_op0[6]) = 0x00000000;
20 *((int *)&__m256_op0[5]) = 0x00000000;
21 *((int *)&__m256_op0[4]) = 0x00000000;
22 *((int *)&__m256_op0[3]) = 0x00000000;
23 *((int *)&__m256_op0[2]) = 0x00000000;
24 *((int *)&__m256_op0[1]) = 0x00000000;
25 *((int *)&__m256_op0[0]) = 0x00000000;
26 *((int *)&__m256_op1[7]) = 0x00000000;
27 *((int *)&__m256_op1[6]) = 0x00000000;
28 *((int *)&__m256_op1[5]) = 0x00000000;
29 *((int *)&__m256_op1[4]) = 0x00000000;
30 *((int *)&__m256_op1[3]) = 0x00000000;
31 *((int *)&__m256_op1[2]) = 0x00000000;
32 *((int *)&__m256_op1[1]) = 0x00000000;
33 *((int *)&__m256_op1[0]) = 0x00000000;
34 *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000;
35 *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000;
36 *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000;
37 *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000;
38 __m256i_out = __lasx_xvfcvt_h_s (__m256_op0, __m256_op1);
39 ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
40
41 *((int *)&__m256_op0[7]) = 0x00000000;
42 *((int *)&__m256_op0[6]) = 0x00000000;
43 *((int *)&__m256_op0[5]) = 0x00000000;
44 *((int *)&__m256_op0[4]) = 0x00000000;
45 *((int *)&__m256_op0[3]) = 0x00000000;
46 *((int *)&__m256_op0[2]) = 0x00000000;
47 *((int *)&__m256_op0[1]) = 0x00000000;
48 *((int *)&__m256_op0[0]) = 0x00000000;
49 *((int *)&__m256_op1[7]) = 0x00000000;
50 *((int *)&__m256_op1[6]) = 0x00000000;
51 *((int *)&__m256_op1[5]) = 0x00000000;
52 *((int *)&__m256_op1[4]) = 0x00000000;
53 *((int *)&__m256_op1[3]) = 0x00000000;
54 *((int *)&__m256_op1[2]) = 0x00000000;
55 *((int *)&__m256_op1[1]) = 0x00000000;
56 *((int *)&__m256_op1[0]) = 0x00000000;
57 *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000;
58 *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000;
59 *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000;
60 *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000;
61 __m256i_out = __lasx_xvfcvt_h_s (__m256_op0, __m256_op1);
62 ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
63
64 *((int *)&__m256_op0[7]) = 0x00000000;
65 *((int *)&__m256_op0[6]) = 0x00000000;
66 *((int *)&__m256_op0[5]) = 0x00000000;
67 *((int *)&__m256_op0[4]) = 0x00000000;
68 *((int *)&__m256_op0[3]) = 0x00000000;
69 *((int *)&__m256_op0[2]) = 0x00000000;
70 *((int *)&__m256_op0[1]) = 0x00000000;
71 *((int *)&__m256_op0[0]) = 0x00000000;
72 *((int *)&__m256_op1[7]) = 0x00000003;
73 *((int *)&__m256_op1[6]) = 0x0000000c;
74 *((int *)&__m256_op1[5]) = 0x00000011;
75 *((int *)&__m256_op1[4]) = 0x00000000;
76 *((int *)&__m256_op1[3]) = 0x00000005;
77 *((int *)&__m256_op1[2]) = 0x00000000;
78 *((int *)&__m256_op1[1]) = 0x00000008;
79 *((int *)&__m256_op1[0]) = 0x00000010;
80 *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000;
81 *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000;
82 *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000;
83 *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000;
84 __m256i_out = __lasx_xvfcvt_h_s (__m256_op0, __m256_op1);
85 ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
86
87 *((int *)&__m256_op0[7]) = 0x6d6d6d6d;
88 *((int *)&__m256_op0[6]) = 0x6d6d6d6d;
89 *((int *)&__m256_op0[5]) = 0x6d6d6d6d;
90 *((int *)&__m256_op0[4]) = 0x6d6d6d6d;
91 *((int *)&__m256_op0[3]) = 0x6d6d6d6d;
92 *((int *)&__m256_op0[2]) = 0x6d6d6d6d;
93 *((int *)&__m256_op0[1]) = 0x6d6d6d6d;
94 *((int *)&__m256_op0[0]) = 0x6d6d6d6d;
95 *((int *)&__m256_op1[7]) = 0x6d6d6d6d;
96 *((int *)&__m256_op1[6]) = 0x6d6d6d6d;
97 *((int *)&__m256_op1[5]) = 0x6d6d6d6d;
98 *((int *)&__m256_op1[4]) = 0x6d6d6d6d;
99 *((int *)&__m256_op1[3]) = 0x6d6d6d6d;
100 *((int *)&__m256_op1[2]) = 0x6d6d6d6d;
101 *((int *)&__m256_op1[1]) = 0x6d6d6d6d;
102 *((int *)&__m256_op1[0]) = 0x6d6d6d6d;
103 *((unsigned long *)&__m256i_result[3]) = 0x7c007c007c007c00;
104 *((unsigned long *)&__m256i_result[2]) = 0x7c007c007c007c00;
105 *((unsigned long *)&__m256i_result[1]) = 0x7c007c007c007c00;
106 *((unsigned long *)&__m256i_result[0]) = 0x7c007c007c007c00;
107 __m256i_out = __lasx_xvfcvt_h_s (__m256_op0, __m256_op1);
108 ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
109
110 *((int *)&__m256_op0[7]) = 0x00000000;
111 *((int *)&__m256_op0[6]) = 0x00000000;
112 *((int *)&__m256_op0[5]) = 0x00000000;
113 *((int *)&__m256_op0[4]) = 0x00000000;
114 *((int *)&__m256_op0[3]) = 0x00000000;
115 *((int *)&__m256_op0[2]) = 0x00000000;
116 *((int *)&__m256_op0[1]) = 0x00000000;
117 *((int *)&__m256_op0[0]) = 0x00000000;
118 *((int *)&__m256_op1[7]) = 0x00000000;
119 *((int *)&__m256_op1[6]) = 0x00000000;
120 *((int *)&__m256_op1[5]) = 0x00000000;
121 *((int *)&__m256_op1[4]) = 0x00000000;
122 *((int *)&__m256_op1[3]) = 0x00000000;
123 *((int *)&__m256_op1[2]) = 0x00000000;
124 *((int *)&__m256_op1[1]) = 0x00000000;
125 *((int *)&__m256_op1[0]) = 0x00000000;
126 *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000;
127 *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000;
128 *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000;
129 *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000;
130 __m256i_out = __lasx_xvfcvt_h_s (__m256_op0, __m256_op1);
131 ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
132
133 *((int *)&__m256_op0[7]) = 0xffffffff;
134 *((int *)&__m256_op0[6]) = 0xffffffff;
135 *((int *)&__m256_op0[5]) = 0xffffffff;
136 *((int *)&__m256_op0[4]) = 0xffffffff;
137 *((int *)&__m256_op0[3]) = 0xffffffff;
138 *((int *)&__m256_op0[2]) = 0xffffffff;
139 *((int *)&__m256_op0[1]) = 0xffffffff;
140 *((int *)&__m256_op0[0]) = 0xffffffff;
141 *((int *)&__m256_op1[7]) = 0x00000000;
142 *((int *)&__m256_op1[6]) = 0x00000000;
143 *((int *)&__m256_op1[5]) = 0x00000000;
144 *((int *)&__m256_op1[4]) = 0x00000000;
145 *((int *)&__m256_op1[3]) = 0x00000000;
146 *((int *)&__m256_op1[2]) = 0x00000000;
147 *((int *)&__m256_op1[1]) = 0x00000000;
148 *((int *)&__m256_op1[0]) = 0x00000000;
149 *((unsigned long *)&__m256i_result[3]) = 0xffffffffffffffff;
150 *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000;
151 *((unsigned long *)&__m256i_result[1]) = 0xffffffffffffffff;
152 *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000;
153 __m256i_out = __lasx_xvfcvt_h_s (__m256_op0, __m256_op1);
154 ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
155
156 *((int *)&__m256_op0[7]) = 0x00000000;
157 *((int *)&__m256_op0[6]) = 0x00000000;
158 *((int *)&__m256_op0[5]) = 0x00000000;
159 *((int *)&__m256_op0[4]) = 0x00000000;
160 *((int *)&__m256_op0[3]) = 0x00000000;
161 *((int *)&__m256_op0[2]) = 0x00000000;
162 *((int *)&__m256_op0[1]) = 0x00000000;
163 *((int *)&__m256_op0[0]) = 0x00000000;
164 *((int *)&__m256_op1[7]) = 0x00020000;
165 *((int *)&__m256_op1[6]) = 0x00020000;
166 *((int *)&__m256_op1[5]) = 0x00020000;
167 *((int *)&__m256_op1[4]) = 0x00010000;
168 *((int *)&__m256_op1[3]) = 0x00020000;
169 *((int *)&__m256_op1[2]) = 0x00020000;
170 *((int *)&__m256_op1[1]) = 0x00020000;
171 *((int *)&__m256_op1[0]) = 0x00010000;
172 *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000;
173 *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000;
174 *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000;
175 *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000;
176 __m256i_out = __lasx_xvfcvt_h_s (__m256_op0, __m256_op1);
177 ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
178
179 *((int *)&__m256_op0[7]) = 0x00000000;
180 *((int *)&__m256_op0[6]) = 0x00000000;
181 *((int *)&__m256_op0[5]) = 0x00000000;
182 *((int *)&__m256_op0[4]) = 0x00000000;
183 *((int *)&__m256_op0[3]) = 0x00000000;
184 *((int *)&__m256_op0[2]) = 0x00000000;
185 *((int *)&__m256_op0[1]) = 0x00000000;
186 *((int *)&__m256_op0[0]) = 0x00000000;
187 *((int *)&__m256_op1[7]) = 0x00000000;
188 *((int *)&__m256_op1[6]) = 0x00000000;
189 *((int *)&__m256_op1[5]) = 0x00000000;
190 *((int *)&__m256_op1[4]) = 0x00000000;
191 *((int *)&__m256_op1[3]) = 0x00000000;
192 *((int *)&__m256_op1[2]) = 0x00000000;
193 *((int *)&__m256_op1[1]) = 0x00000000;
194 *((int *)&__m256_op1[0]) = 0x00000000;
195 *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000;
196 *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000;
197 *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000;
198 *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000;
199 __m256i_out = __lasx_xvfcvt_h_s (__m256_op0, __m256_op1);
200 ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
201
202 *((int *)&__m256_op0[7]) = 0x00000000;
203 *((int *)&__m256_op0[6]) = 0x00000000;
204 *((int *)&__m256_op0[5]) = 0xffffffff;
205 *((int *)&__m256_op0[4]) = 0xffffffff;
206 *((int *)&__m256_op0[3]) = 0x00000000;
207 *((int *)&__m256_op0[2]) = 0x00000000;
208 *((int *)&__m256_op0[1]) = 0xffffffff;
209 *((int *)&__m256_op0[0]) = 0xffffffff;
210 *((int *)&__m256_op1[7]) = 0x71717171;
211 *((int *)&__m256_op1[6]) = 0x71010101;
212 *((int *)&__m256_op1[5]) = 0x8e8e8e8e;
213 *((int *)&__m256_op1[4]) = 0x8f00ffff;
214 *((int *)&__m256_op1[3]) = 0x71717171;
215 *((int *)&__m256_op1[2]) = 0x71010101;
216 *((int *)&__m256_op1[1]) = 0x8e8e8e8e;
217 *((int *)&__m256_op1[0]) = 0x8f00ffff;
218 *((unsigned long *)&__m256i_result[3]) = 0x00000000ffffffff;
219 *((unsigned long *)&__m256i_result[2]) = 0x7c007c0080008000;
220 *((unsigned long *)&__m256i_result[1]) = 0x00000000ffffffff;
221 *((unsigned long *)&__m256i_result[0]) = 0x7c007c0080008000;
222 __m256i_out = __lasx_xvfcvt_h_s (__m256_op0, __m256_op1);
223 ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
224
225 *((int *)&__m256_op0[7]) = 0x00000000;
226 *((int *)&__m256_op0[6]) = 0x00000000;
227 *((int *)&__m256_op0[5]) = 0xfff10000;
228 *((int *)&__m256_op0[4]) = 0xfff10000;
229 *((int *)&__m256_op0[3]) = 0x00000000;
230 *((int *)&__m256_op0[2]) = 0x00000000;
231 *((int *)&__m256_op0[1]) = 0xfff10000;
232 *((int *)&__m256_op0[0]) = 0xfff10000;
233 *((int *)&__m256_op1[7]) = 0x00000000;
234 *((int *)&__m256_op1[6]) = 0x00000000;
235 *((int *)&__m256_op1[5]) = 0xfff10000;
236 *((int *)&__m256_op1[4]) = 0xfff10000;
237 *((int *)&__m256_op1[3]) = 0x00000000;
238 *((int *)&__m256_op1[2]) = 0x00000000;
239 *((int *)&__m256_op1[1]) = 0xfff10000;
240 *((int *)&__m256_op1[0]) = 0xfff10000;
241 *((unsigned long *)&__m256i_result[3]) = 0x00000000ff88ff88;
242 *((unsigned long *)&__m256i_result[2]) = 0x00000000ff88ff88;
243 *((unsigned long *)&__m256i_result[1]) = 0x00000000ff88ff88;
244 *((unsigned long *)&__m256i_result[0]) = 0x00000000ff88ff88;
245 __m256i_out = __lasx_xvfcvt_h_s (__m256_op0, __m256_op1);
246 ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
247
248 *((int *)&__m256_op0[7]) = 0x00000000;
249 *((int *)&__m256_op0[6]) = 0x00000000;
250 *((int *)&__m256_op0[5]) = 0x00000000;
251 *((int *)&__m256_op0[4]) = 0x00040000;
252 *((int *)&__m256_op0[3]) = 0x00000000;
253 *((int *)&__m256_op0[2]) = 0x00000000;
254 *((int *)&__m256_op0[1]) = 0x00000000;
255 *((int *)&__m256_op0[0]) = 0x00040000;
256 *((int *)&__m256_op1[7]) = 0x00000000;
257 *((int *)&__m256_op1[6]) = 0x00000000;
258 *((int *)&__m256_op1[5]) = 0x00000000;
259 *((int *)&__m256_op1[4]) = 0x00000000;
260 *((int *)&__m256_op1[3]) = 0x00000000;
261 *((int *)&__m256_op1[2]) = 0x00000000;
262 *((int *)&__m256_op1[1]) = 0x00000000;
263 *((int *)&__m256_op1[0]) = 0x00000000;
264 *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000;
265 *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000;
266 *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000;
267 *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000;
268 __m256i_out = __lasx_xvfcvt_h_s (__m256_op0, __m256_op1);
269 ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
270
271 *((int *)&__m256_op0[7]) = 0xff00ff00;
272 *((int *)&__m256_op0[6]) = 0x3f003f00;
273 *((int *)&__m256_op0[5]) = 0xff0101fd;
274 *((int *)&__m256_op0[4]) = 0x00010100;
275 *((int *)&__m256_op0[3]) = 0xff00ff00;
276 *((int *)&__m256_op0[2]) = 0x3f003f00;
277 *((int *)&__m256_op0[1]) = 0xff0101fd;
278 *((int *)&__m256_op0[0]) = 0x00010100;
279 *((int *)&__m256_op1[7]) = 0x01ffff43;
280 *((int *)&__m256_op1[6]) = 0x00fffeff;
281 *((int *)&__m256_op1[5]) = 0xfe0000bc;
282 *((int *)&__m256_op1[4]) = 0xff000100;
283 *((int *)&__m256_op1[3]) = 0x01ffff43;
284 *((int *)&__m256_op1[2]) = 0x00fffeff;
285 *((int *)&__m256_op1[1]) = 0xfe0000bc;
286 *((int *)&__m256_op1[0]) = 0xff000100;
287 *((unsigned long *)&__m256i_result[3]) = 0xfc003802fc000000;
288 *((unsigned long *)&__m256i_result[2]) = 0x00000000fc00fc00;
289 *((unsigned long *)&__m256i_result[1]) = 0xfc003802fc000000;
290 *((unsigned long *)&__m256i_result[0]) = 0x00000000fc00fc00;
291 __m256i_out = __lasx_xvfcvt_h_s (__m256_op0, __m256_op1);
292 ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
293
294 *((int *)&__m256_op0[7]) = 0x00000000;
295 *((int *)&__m256_op0[6]) = 0x00000000;
296 *((int *)&__m256_op0[5]) = 0x00000000;
297 *((int *)&__m256_op0[4]) = 0x00000000;
298 *((int *)&__m256_op0[3]) = 0x00000000;
299 *((int *)&__m256_op0[2]) = 0x00000000;
300 *((int *)&__m256_op0[1]) = 0x00000000;
301 *((int *)&__m256_op0[0]) = 0x00000000;
302 *((int *)&__m256_op1[7]) = 0x00000000;
303 *((int *)&__m256_op1[6]) = 0x00000000;
304 *((int *)&__m256_op1[5]) = 0x00000000;
305 *((int *)&__m256_op1[4]) = 0x00000000;
306 *((int *)&__m256_op1[3]) = 0x00000000;
307 *((int *)&__m256_op1[2]) = 0x00000000;
308 *((int *)&__m256_op1[1]) = 0x00000000;
309 *((int *)&__m256_op1[0]) = 0x00000000;
310 *((unsigned long *)&__m256i_result[3]) = 0x0000000000000000;
311 *((unsigned long *)&__m256i_result[2]) = 0x0000000000000000;
312 *((unsigned long *)&__m256i_result[1]) = 0x0000000000000000;
313 *((unsigned long *)&__m256i_result[0]) = 0x0000000000000000;
314 __m256i_out = __lasx_xvfcvt_h_s (__m256_op0, __m256_op1);
315 ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
316
317 *((unsigned long *)&__m256d_op0[3]) = 0x0000000000000000;
318 *((unsigned long *)&__m256d_op0[2]) = 0x0cc08723ff900001;
319 *((unsigned long *)&__m256d_op0[1]) = 0xffffffffffffffff;
320 *((unsigned long *)&__m256d_op0[0]) = 0xcc9b89f2f6cef440;
321 *((unsigned long *)&__m256d_op1[3]) = 0xffffffffffffffff;
322 *((unsigned long *)&__m256d_op1[2]) = 0xffffffff00000000;
323 *((unsigned long *)&__m256d_op1[1]) = 0xffffffffffffffff;
324 *((unsigned long *)&__m256d_op1[0]) = 0xffffffff00000000;
325 *((int *)&__m256_result[7]) = 0x00000000;
326 *((int *)&__m256_result[6]) = 0x00000000;
327 *((int *)&__m256_result[5]) = 0xffffffff;
328 *((int *)&__m256_result[4]) = 0xfffffff8;
329 *((int *)&__m256_result[3]) = 0xffffffff;
330 *((int *)&__m256_result[2]) = 0xff800000;
331 *((int *)&__m256_result[1]) = 0xffffffff;
332 *((int *)&__m256_result[0]) = 0xfffffff8;
333 __m256_out = __lasx_xvfcvt_s_d (__m256d_op0, __m256d_op1);
334 ASSERTEQ_32 (__LINE__, __m256_result, __m256_out);
335
336 *((unsigned long *)&__m256d_op0[3]) = 0x0000ffff0000ffff;
337 *((unsigned long *)&__m256d_op0[2]) = 0x0000ffff0000ffff;
338 *((unsigned long *)&__m256d_op0[1]) = 0x0000ffff0000ffff;
339 *((unsigned long *)&__m256d_op0[0]) = 0x0000ffff0000ffff;
340 *((unsigned long *)&__m256d_op1[3]) = 0x0000000000000000;
341 *((unsigned long *)&__m256d_op1[2]) = 0x0000000000000000;
342 *((unsigned long *)&__m256d_op1[1]) = 0x0000000000000000;
343 *((unsigned long *)&__m256d_op1[0]) = 0x0000000000000000;
344 *((int *)&__m256_result[7]) = 0x00000000;
345 *((int *)&__m256_result[6]) = 0x00000000;
346 *((int *)&__m256_result[5]) = 0x00000000;
347 *((int *)&__m256_result[4]) = 0x00000000;
348 *((int *)&__m256_result[3]) = 0x00000000;
349 *((int *)&__m256_result[2]) = 0x00000000;
350 *((int *)&__m256_result[1]) = 0x00000000;
351 *((int *)&__m256_result[0]) = 0x00000000;
352 __m256_out = __lasx_xvfcvt_s_d (__m256d_op0, __m256d_op1);
353 ASSERTEQ_32 (__LINE__, __m256_result, __m256_out);
354
355 *((unsigned long *)&__m256d_op0[3]) = 0x0000000000000000;
356 *((unsigned long *)&__m256d_op0[2]) = 0x0000000000000000;
357 *((unsigned long *)&__m256d_op0[1]) = 0x0000000000000000;
358 *((unsigned long *)&__m256d_op0[0]) = 0x0000000000000000;
359 *((unsigned long *)&__m256d_op1[3]) = 0xffffffffffffffff;
360 *((unsigned long *)&__m256d_op1[2]) = 0xffffffffffffffff;
361 *((unsigned long *)&__m256d_op1[1]) = 0xffffffffffffffff;
362 *((unsigned long *)&__m256d_op1[0]) = 0xffffffffffffffff;
363 *((int *)&__m256_result[7]) = 0x00000000;
364 *((int *)&__m256_result[6]) = 0x00000000;
365 *((int *)&__m256_result[5]) = 0xffffffff;
366 *((int *)&__m256_result[4]) = 0xffffffff;
367 *((int *)&__m256_result[3]) = 0x00000000;
368 *((int *)&__m256_result[2]) = 0x00000000;
369 *((int *)&__m256_result[1]) = 0xffffffff;
370 *((int *)&__m256_result[0]) = 0xffffffff;
371 __m256_out = __lasx_xvfcvt_s_d (__m256d_op0, __m256d_op1);
372 ASSERTEQ_32 (__LINE__, __m256_result, __m256_out);
373
374 *((unsigned long *)&__m256d_op0[3]) = 0xdbc8000000003fff;
375 *((unsigned long *)&__m256d_op0[2]) = 0x0000000000000000;
376 *((unsigned long *)&__m256d_op0[1]) = 0xdbc8000000003fff;
377 *((unsigned long *)&__m256d_op0[0]) = 0x0000000000000000;
378 *((unsigned long *)&__m256d_op1[3]) = 0x0000000000000000;
379 *((unsigned long *)&__m256d_op1[2]) = 0x0000000000000000;
380 *((unsigned long *)&__m256d_op1[1]) = 0x0000000000000000;
381 *((unsigned long *)&__m256d_op1[0]) = 0x0000000000000000;
382 *((int *)&__m256_result[7]) = 0xff800000;
383 *((int *)&__m256_result[6]) = 0x00000000;
384 *((int *)&__m256_result[5]) = 0x00000000;
385 *((int *)&__m256_result[4]) = 0x00000000;
386 *((int *)&__m256_result[3]) = 0xff800000;
387 *((int *)&__m256_result[2]) = 0x00000000;
388 *((int *)&__m256_result[1]) = 0x00000000;
389 *((int *)&__m256_result[0]) = 0x00000000;
390 __m256_out = __lasx_xvfcvt_s_d (__m256d_op0, __m256d_op1);
391 ASSERTEQ_32 (__LINE__, __m256_result, __m256_out);
392
393 *((unsigned long *)&__m256d_op0[3]) = 0x0000000000000000;
394 *((unsigned long *)&__m256d_op0[2]) = 0x0000000000000000;
395 *((unsigned long *)&__m256d_op0[1]) = 0x0000000000000000;
396 *((unsigned long *)&__m256d_op0[0]) = 0x0000000000000000;
397 *((unsigned long *)&__m256d_op1[3]) = 0xff800000ff800000;
398 *((unsigned long *)&__m256d_op1[2]) = 0xff800000ff800000;
399 *((unsigned long *)&__m256d_op1[1]) = 0xff800000ff800000;
400 *((unsigned long *)&__m256d_op1[0]) = 0xff800000ff800000;
401 *((int *)&__m256_result[7]) = 0x00000000;
402 *((int *)&__m256_result[6]) = 0x00000000;
403 *((int *)&__m256_result[5]) = 0xff800000;
404 *((int *)&__m256_result[4]) = 0xff800000;
405 *((int *)&__m256_result[3]) = 0x00000000;
406 *((int *)&__m256_result[2]) = 0x00000000;
407 *((int *)&__m256_result[1]) = 0xff800000;
408 *((int *)&__m256_result[0]) = 0xff800000;
409 __m256_out = __lasx_xvfcvt_s_d (__m256d_op0, __m256d_op1);
410 ASSERTEQ_32 (__LINE__, __m256_result, __m256_out);
411
412 *((unsigned long *)&__m256d_op0[3]) = 0x0000ffff0000ffff;
413 *((unsigned long *)&__m256d_op0[2]) = 0x0000000000000000;
414 *((unsigned long *)&__m256d_op0[1]) = 0x0000ffff0000ffff;
415 *((unsigned long *)&__m256d_op0[0]) = 0x0000000000000000;
416 *((unsigned long *)&__m256d_op1[3]) = 0x0000000000000000;
417 *((unsigned long *)&__m256d_op1[2]) = 0x0000000000000000;
418 *((unsigned long *)&__m256d_op1[1]) = 0x0000000000000000;
419 *((unsigned long *)&__m256d_op1[0]) = 0x0000000000000000;
420 *((int *)&__m256_result[7]) = 0x00000000;
421 *((int *)&__m256_result[6]) = 0x00000000;
422 *((int *)&__m256_result[5]) = 0x00000000;
423 *((int *)&__m256_result[4]) = 0x00000000;
424 *((int *)&__m256_result[3]) = 0x00000000;
425 *((int *)&__m256_result[2]) = 0x00000000;
426 *((int *)&__m256_result[1]) = 0x00000000;
427 *((int *)&__m256_result[0]) = 0x00000000;
428 __m256_out = __lasx_xvfcvt_s_d (__m256d_op0, __m256d_op1);
429 ASSERTEQ_32 (__LINE__, __m256_result, __m256_out);
430
431 *((unsigned long *)&__m256d_op0[3]) = 0x0000000000000000;
432 *((unsigned long *)&__m256d_op0[2]) = 0x0000000000000000;
433 *((unsigned long *)&__m256d_op0[1]) = 0x0000000000000000;
434 *((unsigned long *)&__m256d_op0[0]) = 0x0000000000000000;
435 *((unsigned long *)&__m256d_op1[3]) = 0xf7f8f7f8f800f800;
436 *((unsigned long *)&__m256d_op1[2]) = 0x00003f784000ff80;
437 *((unsigned long *)&__m256d_op1[1]) = 0xf7f8f7f84000fff9;
438 *((unsigned long *)&__m256d_op1[0]) = 0x00003f784000ff80;
439 *((int *)&__m256_result[7]) = 0x00000000;
440 *((int *)&__m256_result[6]) = 0x00000000;
441 *((int *)&__m256_result[5]) = 0xff800000;
442 *((int *)&__m256_result[4]) = 0x00000000;
443 *((int *)&__m256_result[3]) = 0x00000000;
444 *((int *)&__m256_result[2]) = 0x00000000;
445 *((int *)&__m256_result[1]) = 0xff800000;
446 *((int *)&__m256_result[0]) = 0x00000000;
447 __m256_out = __lasx_xvfcvt_s_d (__m256d_op0, __m256d_op1);
448 ASSERTEQ_32 (__LINE__, __m256_result, __m256_out);
449
450 *((unsigned long *)&__m256d_op0[3]) = 0x0000555500005555;
451 *((unsigned long *)&__m256d_op0[2]) = 0x0000555500005555;
452 *((unsigned long *)&__m256d_op0[1]) = 0x0000555500005555;
453 *((unsigned long *)&__m256d_op0[0]) = 0x0000555500005555;
454 *((unsigned long *)&__m256d_op1[3]) = 0x0000000000000000;
455 *((unsigned long *)&__m256d_op1[2]) = 0x0000000000000000;
456 *((unsigned long *)&__m256d_op1[1]) = 0x0000000000000000;
457 *((unsigned long *)&__m256d_op1[0]) = 0x0000000000000000;
458 *((int *)&__m256_result[7]) = 0x00000000;
459 *((int *)&__m256_result[6]) = 0x00000000;
460 *((int *)&__m256_result[5]) = 0x00000000;
461 *((int *)&__m256_result[4]) = 0x00000000;
462 *((int *)&__m256_result[3]) = 0x00000000;
463 *((int *)&__m256_result[2]) = 0x00000000;
464 *((int *)&__m256_result[1]) = 0x00000000;
465 *((int *)&__m256_result[0]) = 0x00000000;
466 __m256_out = __lasx_xvfcvt_s_d (__m256d_op0, __m256d_op1);
467 ASSERTEQ_32 (__LINE__, __m256_result, __m256_out);
468
469 *((unsigned long *)&__m256d_op0[3]) = 0x0000000000000000;
470 *((unsigned long *)&__m256d_op0[2]) = 0x0000000000000000;
471 *((unsigned long *)&__m256d_op0[1]) = 0x0000000000000000;
472 *((unsigned long *)&__m256d_op0[0]) = 0x0000000000000000;
473 *((unsigned long *)&__m256d_op1[3]) = 0xffffffffb6804cb9;
474 *((unsigned long *)&__m256d_op1[2]) = 0xffffffffb7bbdec0;
475 *((unsigned long *)&__m256d_op1[1]) = 0xffffffffb680489b;
476 *((unsigned long *)&__m256d_op1[0]) = 0xffffffffb7bc02a0;
477 *((int *)&__m256_result[7]) = 0x00000000;
478 *((int *)&__m256_result[6]) = 0x00000000;
479 *((int *)&__m256_result[5]) = 0xfffffffd;
480 *((int *)&__m256_result[4]) = 0xfffffffd;
481 *((int *)&__m256_result[3]) = 0x00000000;
482 *((int *)&__m256_result[2]) = 0x00000000;
483 *((int *)&__m256_result[1]) = 0xfffffffd;
484 *((int *)&__m256_result[0]) = 0xfffffffd;
485 __m256_out = __lasx_xvfcvt_s_d (__m256d_op0, __m256d_op1);
486 ASSERTEQ_32 (__LINE__, __m256_result, __m256_out);
487
488 *((unsigned long *)&__m256d_op0[3]) = 0x0000000000000000;
489 *((unsigned long *)&__m256d_op0[2]) = 0x0000000000000000;
490 *((unsigned long *)&__m256d_op0[1]) = 0x0000000000000000;
491 *((unsigned long *)&__m256d_op0[0]) = 0x0000000000000000;
492 *((unsigned long *)&__m256d_op1[3]) = 0x0101010202020203;
493 *((unsigned long *)&__m256d_op1[2]) = 0x0101010201010102;
494 *((unsigned long *)&__m256d_op1[1]) = 0x0101010202020203;
495 *((unsigned long *)&__m256d_op1[0]) = 0x0101010201010102;
496 *((int *)&__m256_result[7]) = 0x00000000;
497 *((int *)&__m256_result[6]) = 0x00000000;
498 *((int *)&__m256_result[5]) = 0x00000000;
499 *((int *)&__m256_result[4]) = 0x00000000;
500 *((int *)&__m256_result[3]) = 0x00000000;
501 *((int *)&__m256_result[2]) = 0x00000000;
502 *((int *)&__m256_result[1]) = 0x00000000;
503 *((int *)&__m256_result[0]) = 0x00000000;
504 __m256_out = __lasx_xvfcvt_s_d (__m256d_op0, __m256d_op1);
505 ASSERTEQ_32 (__LINE__, __m256_result, __m256_out);
506
507 *((unsigned long *)&__m256d_op0[3]) = 0x0000000000000000;
508 *((unsigned long *)&__m256d_op0[2]) = 0x0000000000000000;
509 *((unsigned long *)&__m256d_op0[1]) = 0x0000000000000000;
510 *((unsigned long *)&__m256d_op0[0]) = 0x0000000000000000;
511 *((unsigned long *)&__m256d_op1[3]) = 0x3fff3fff3fff3fff;
512 *((unsigned long *)&__m256d_op1[2]) = 0x3fff3fff3fff3fc4;
513 *((unsigned long *)&__m256d_op1[1]) = 0x3fff3fff3fff3fff;
514 *((unsigned long *)&__m256d_op1[0]) = 0x3fff3fff3fff3fc4;
515 *((int *)&__m256_result[7]) = 0x00000000;
516 *((int *)&__m256_result[6]) = 0x00000000;
517 *((int *)&__m256_result[5]) = 0x3ff9fffa;
518 *((int *)&__m256_result[4]) = 0x3ff9fffa;
519 *((int *)&__m256_result[3]) = 0x00000000;
520 *((int *)&__m256_result[2]) = 0x00000000;
521 *((int *)&__m256_result[1]) = 0x3ff9fffa;
522 *((int *)&__m256_result[0]) = 0x3ff9fffa;
523 __m256_out = __lasx_xvfcvt_s_d (__m256d_op0, __m256d_op1);
524 ASSERTEQ_32 (__LINE__, __m256_result, __m256_out);
525
526 return 0;
527 }