Debian Codegraph @

gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vfcmp_caf.c

raw
1 /* { dg-options "-mlsx -w -fno-strict-aliasing" } */
2 #include "../simd_correctness_check.h"
3 #include <lsxintrin.h>
4
5 int
6 main ()
7 {
8 __m128i __m128i_op0, __m128i_op1, __m128i_op2, __m128i_out, __m128i_result;
9 __m128 __m128_op0, __m128_op1, __m128_op2, __m128_out, __m128_result;
10 __m128d __m128d_op0, __m128d_op1, __m128d_op2, __m128d_out, __m128d_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 *)&__m128_op0[3]) = 0x00000000;
19 *((int *)&__m128_op0[2]) = 0x00000000;
20 *((int *)&__m128_op0[1]) = 0x01010101;
21 *((int *)&__m128_op0[0]) = 0x01010101;
22 *((int *)&__m128_op1[3]) = 0x00000000;
23 *((int *)&__m128_op1[2]) = 0x00000000;
24 *((int *)&__m128_op1[1]) = 0x00000000;
25 *((int *)&__m128_op1[0]) = 0x00000000;
26 *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
27 *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
28 __m128i_out = __lsx_vfcmp_caf_s (__m128_op0, __m128_op1);
29 ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
30
31 *((int *)&__m128_op0[3]) = 0x7ef400ad;
32 *((int *)&__m128_op0[2]) = 0x21fc7081;
33 *((int *)&__m128_op0[1]) = 0x28bf0351;
34 *((int *)&__m128_op0[0]) = 0xec69b5f2;
35 *((int *)&__m128_op1[3]) = 0xff800000;
36 *((int *)&__m128_op1[2]) = 0xff800000;
37 *((int *)&__m128_op1[1]) = 0xff800000;
38 *((int *)&__m128_op1[0]) = 0x7fc00000;
39 *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
40 *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
41 __m128i_out = __lsx_vfcmp_caf_s (__m128_op0, __m128_op1);
42 ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
43
44 *((int *)&__m128_op0[3]) = 0x00000000;
45 *((int *)&__m128_op0[2]) = 0x00000000;
46 *((int *)&__m128_op0[1]) = 0x00000000;
47 *((int *)&__m128_op0[0]) = 0x00000000;
48 *((int *)&__m128_op1[3]) = 0x00000000;
49 *((int *)&__m128_op1[2]) = 0x00000000;
50 *((int *)&__m128_op1[1]) = 0x00000000;
51 *((int *)&__m128_op1[0]) = 0x00000000;
52 *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
53 *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
54 __m128i_out = __lsx_vfcmp_caf_s (__m128_op0, __m128_op1);
55 ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
56
57 *((int *)&__m128_op0[3]) = 0x00000000;
58 *((int *)&__m128_op0[2]) = 0x00000000;
59 *((int *)&__m128_op0[1]) = 0x01000100;
60 *((int *)&__m128_op0[0]) = 0x01000100;
61 *((int *)&__m128_op1[3]) = 0xffffffff;
62 *((int *)&__m128_op1[2]) = 0xffffffff;
63 *((int *)&__m128_op1[1]) = 0x64e464e4;
64 *((int *)&__m128_op1[0]) = 0x64e464e4;
65 *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
66 *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
67 __m128i_out = __lsx_vfcmp_caf_s (__m128_op0, __m128_op1);
68 ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
69
70 *((int *)&__m128_op0[3]) = 0x00000000;
71 *((int *)&__m128_op0[2]) = 0x00000000;
72 *((int *)&__m128_op0[1]) = 0x00000000;
73 *((int *)&__m128_op0[0]) = 0x00000000;
74 *((int *)&__m128_op1[3]) = 0xffc0ff80;
75 *((int *)&__m128_op1[2]) = 0xff800000;
76 *((int *)&__m128_op1[1]) = 0x00000000;
77 *((int *)&__m128_op1[0]) = 0x00000005;
78 *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
79 *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
80 __m128i_out = __lsx_vfcmp_caf_s (__m128_op0, __m128_op1);
81 ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
82
83 *((int *)&__m128_op0[3]) = 0x00000000;
84 *((int *)&__m128_op0[2]) = 0x00000000;
85 *((int *)&__m128_op0[1]) = 0x00000000;
86 *((int *)&__m128_op0[0]) = 0x00000000;
87 *((int *)&__m128_op1[3]) = 0x00000000;
88 *((int *)&__m128_op1[2]) = 0x00000000;
89 *((int *)&__m128_op1[1]) = 0x00000000;
90 *((int *)&__m128_op1[0]) = 0x00000000;
91 *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
92 *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
93 __m128i_out = __lsx_vfcmp_caf_s (__m128_op0, __m128_op1);
94 ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
95
96 *((int *)&__m128_op0[3]) = 0x00000000;
97 *((int *)&__m128_op0[2]) = 0x00000000;
98 *((int *)&__m128_op0[1]) = 0xffffffff;
99 *((int *)&__m128_op0[0]) = 0xc0800000;
100 *((int *)&__m128_op1[3]) = 0x0000001b;
101 *((int *)&__m128_op1[2]) = 0x0000001b;
102 *((int *)&__m128_op1[1]) = 0x0000001b;
103 *((int *)&__m128_op1[0]) = 0x0000001b;
104 *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
105 *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
106 __m128i_out = __lsx_vfcmp_caf_s (__m128_op0, __m128_op1);
107 ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
108
109 *((int *)&__m128_op0[3]) = 0x00000002;
110 *((int *)&__m128_op0[2]) = 0x00000000;
111 *((int *)&__m128_op0[1]) = 0x00000002;
112 *((int *)&__m128_op0[0]) = 0x00000000;
113 *((int *)&__m128_op1[3]) = 0x00000000;
114 *((int *)&__m128_op1[2]) = 0x00000000;
115 *((int *)&__m128_op1[1]) = 0x34500292;
116 *((int *)&__m128_op1[0]) = 0x0f3017d6;
117 *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
118 *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
119 __m128i_out = __lsx_vfcmp_caf_s (__m128_op0, __m128_op1);
120 ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
121
122 *((int *)&__m128_op0[3]) = 0x00000000;
123 *((int *)&__m128_op0[2]) = 0x00000000;
124 *((int *)&__m128_op0[1]) = 0x00830029;
125 *((int *)&__m128_op0[0]) = 0x0038ff50;
126 *((int *)&__m128_op1[3]) = 0x00000000;
127 *((int *)&__m128_op1[2]) = 0x00000000;
128 *((int *)&__m128_op1[1]) = 0x00000000;
129 *((int *)&__m128_op1[0]) = 0x00000000;
130 *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
131 *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
132 __m128i_out = __lsx_vfcmp_caf_s (__m128_op0, __m128_op1);
133 ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
134
135 *((int *)&__m128_op0[3]) = 0xff7fff80;
136 *((int *)&__m128_op0[2]) = 0xff800001;
137 *((int *)&__m128_op0[1]) = 0xe593d844;
138 *((int *)&__m128_op0[0]) = 0xe593c8c4;
139 *((int *)&__m128_op1[3]) = 0xff800000;
140 *((int *)&__m128_op1[2]) = 0xff800000;
141 *((int *)&__m128_op1[1]) = 0xe593c8c4;
142 *((int *)&__m128_op1[0]) = 0xe593c8c4;
143 *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
144 *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
145 __m128i_out = __lsx_vfcmp_caf_s (__m128_op0, __m128_op1);
146 ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
147
148 *((int *)&__m128_op0[3]) = 0x00000000;
149 *((int *)&__m128_op0[2]) = 0x00000000;
150 *((int *)&__m128_op0[1]) = 0x00000000;
151 *((int *)&__m128_op0[0]) = 0x00000000;
152 *((int *)&__m128_op1[3]) = 0x8a8a8a8a;
153 *((int *)&__m128_op1[2]) = 0x8a8a8a8a;
154 *((int *)&__m128_op1[1]) = 0x8a8a8a8a;
155 *((int *)&__m128_op1[0]) = 0x8a8a8a8a;
156 *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
157 *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
158 __m128i_out = __lsx_vfcmp_caf_s (__m128_op0, __m128_op1);
159 ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
160
161 *((unsigned long *)&__m128d_op0[1]) = 0xffffffffffffffff;
162 *((unsigned long *)&__m128d_op0[0]) = 0xffffffffffffffff;
163 *((unsigned long *)&__m128d_op1[1]) = 0xffffffffffffffff;
164 *((unsigned long *)&__m128d_op1[0]) = 0xffffffffff01ff01;
165 *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
166 *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
167 __m128i_out = __lsx_vfcmp_caf_d (__m128d_op0, __m128d_op1);
168 ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
169
170 *((unsigned long *)&__m128d_op0[1]) = 0x66b34f643c9c626a;
171 *((unsigned long *)&__m128d_op0[0]) = 0x38d60e366e547876;
172 *((unsigned long *)&__m128d_op1[1]) = 0x66b34f643c9c626a;
173 *((unsigned long *)&__m128d_op1[0]) = 0x38d60e366e547876;
174 *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
175 *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
176 __m128i_out = __lsx_vfcmp_caf_d (__m128d_op0, __m128d_op1);
177 ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
178
179 *((unsigned long *)&__m128d_op0[1]) = 0x0000000000000000;
180 *((unsigned long *)&__m128d_op0[0]) = 0x0000000000000000;
181 *((unsigned long *)&__m128d_op1[1]) = 0x0000000000000000;
182 *((unsigned long *)&__m128d_op1[0]) = 0x0000000000000000;
183 *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
184 *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
185 __m128i_out = __lsx_vfcmp_caf_d (__m128d_op0, __m128d_op1);
186 ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
187
188 *((unsigned long *)&__m128d_op0[1]) = 0x0000000000000000;
189 *((unsigned long *)&__m128d_op0[0]) = 0x0000000000000000;
190 *((unsigned long *)&__m128d_op1[1]) = 0x0000000000000000;
191 *((unsigned long *)&__m128d_op1[0]) = 0x0000000000000000;
192 *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
193 *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
194 __m128i_out = __lsx_vfcmp_caf_d (__m128d_op0, __m128d_op1);
195 ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
196
197 *((unsigned long *)&__m128d_op0[1]) = 0xffffffffffffffff;
198 *((unsigned long *)&__m128d_op0[0]) = 0x0000000000000000;
199 *((unsigned long *)&__m128d_op1[1]) = 0xffffffffffffffff;
200 *((unsigned long *)&__m128d_op1[0]) = 0x0000000000000000;
201 *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
202 *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
203 __m128i_out = __lsx_vfcmp_caf_d (__m128d_op0, __m128d_op1);
204 ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
205
206 *((unsigned long *)&__m128d_op0[1]) = 0xfcfcfcdcfcfcfcdc;
207 *((unsigned long *)&__m128d_op0[0]) = 0xfcfcfcdcfcfcfcdc;
208 *((unsigned long *)&__m128d_op1[1]) = 0xffffffffffffffff;
209 *((unsigned long *)&__m128d_op1[0]) = 0x0000000000000000;
210 *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
211 *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
212 __m128i_out = __lsx_vfcmp_caf_d (__m128d_op0, __m128d_op1);
213 ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
214
215 *((unsigned long *)&__m128d_op0[1]) = 0x0000000000000005;
216 *((unsigned long *)&__m128d_op0[0]) = 0x0000000000000005;
217 *((unsigned long *)&__m128d_op1[1]) = 0x000700000004fdff;
218 *((unsigned long *)&__m128d_op1[0]) = 0x000300000000fdff;
219 *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
220 *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
221 __m128i_out = __lsx_vfcmp_caf_d (__m128d_op0, __m128d_op1);
222 ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
223
224 *((unsigned long *)&__m128d_op0[1]) = 0xf2f444429d96dbe1;
225 *((unsigned long *)&__m128d_op0[0]) = 0xddd76c75f2f44442;
226 *((unsigned long *)&__m128d_op1[1]) = 0x0001000100010001;
227 *((unsigned long *)&__m128d_op1[0]) = 0xc1f03e1042208410;
228 *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
229 *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
230 __m128i_out = __lsx_vfcmp_caf_d (__m128d_op0, __m128d_op1);
231 ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
232
233 *((unsigned long *)&__m128d_op0[1]) = 0xffffbfff7fffc000;
234 *((unsigned long *)&__m128d_op0[0]) = 0xffff43dfffff81fb;
235 *((unsigned long *)&__m128d_op1[1]) = 0x0000000000000000;
236 *((unsigned long *)&__m128d_op1[0]) = 0x0000000000000000;
237 *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
238 *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
239 __m128i_out = __lsx_vfcmp_caf_d (__m128d_op0, __m128d_op1);
240 ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
241
242 return 0;
243 }