Source file src/pkg/cmd/compile/internal/ssa/rewriteWasm.go
1
2
3
4 package ssa
5
6 import "fmt"
7 import "math"
8 import "cmd/internal/obj"
9 import "cmd/internal/objabi"
10 import "cmd/compile/internal/types"
11
12 var _ = fmt.Println
13 var _ = math.MinInt8
14 var _ = obj.ANOP
15 var _ = objabi.GOROOT
16 var _ = types.TypeMem
17
18 func rewriteValueWasm(v *Value) bool {
19 switch v.Op {
20 case OpAbs:
21 return rewriteValueWasm_OpAbs_0(v)
22 case OpAdd16:
23 return rewriteValueWasm_OpAdd16_0(v)
24 case OpAdd32:
25 return rewriteValueWasm_OpAdd32_0(v)
26 case OpAdd32F:
27 return rewriteValueWasm_OpAdd32F_0(v)
28 case OpAdd64:
29 return rewriteValueWasm_OpAdd64_0(v)
30 case OpAdd64F:
31 return rewriteValueWasm_OpAdd64F_0(v)
32 case OpAdd8:
33 return rewriteValueWasm_OpAdd8_0(v)
34 case OpAddPtr:
35 return rewriteValueWasm_OpAddPtr_0(v)
36 case OpAddr:
37 return rewriteValueWasm_OpAddr_0(v)
38 case OpAnd16:
39 return rewriteValueWasm_OpAnd16_0(v)
40 case OpAnd32:
41 return rewriteValueWasm_OpAnd32_0(v)
42 case OpAnd64:
43 return rewriteValueWasm_OpAnd64_0(v)
44 case OpAnd8:
45 return rewriteValueWasm_OpAnd8_0(v)
46 case OpAndB:
47 return rewriteValueWasm_OpAndB_0(v)
48 case OpBitLen64:
49 return rewriteValueWasm_OpBitLen64_0(v)
50 case OpCeil:
51 return rewriteValueWasm_OpCeil_0(v)
52 case OpClosureCall:
53 return rewriteValueWasm_OpClosureCall_0(v)
54 case OpCom16:
55 return rewriteValueWasm_OpCom16_0(v)
56 case OpCom32:
57 return rewriteValueWasm_OpCom32_0(v)
58 case OpCom64:
59 return rewriteValueWasm_OpCom64_0(v)
60 case OpCom8:
61 return rewriteValueWasm_OpCom8_0(v)
62 case OpConst16:
63 return rewriteValueWasm_OpConst16_0(v)
64 case OpConst32:
65 return rewriteValueWasm_OpConst32_0(v)
66 case OpConst32F:
67 return rewriteValueWasm_OpConst32F_0(v)
68 case OpConst64:
69 return rewriteValueWasm_OpConst64_0(v)
70 case OpConst64F:
71 return rewriteValueWasm_OpConst64F_0(v)
72 case OpConst8:
73 return rewriteValueWasm_OpConst8_0(v)
74 case OpConstBool:
75 return rewriteValueWasm_OpConstBool_0(v)
76 case OpConstNil:
77 return rewriteValueWasm_OpConstNil_0(v)
78 case OpConvert:
79 return rewriteValueWasm_OpConvert_0(v)
80 case OpCopysign:
81 return rewriteValueWasm_OpCopysign_0(v)
82 case OpCtz16:
83 return rewriteValueWasm_OpCtz16_0(v)
84 case OpCtz16NonZero:
85 return rewriteValueWasm_OpCtz16NonZero_0(v)
86 case OpCtz32:
87 return rewriteValueWasm_OpCtz32_0(v)
88 case OpCtz32NonZero:
89 return rewriteValueWasm_OpCtz32NonZero_0(v)
90 case OpCtz64:
91 return rewriteValueWasm_OpCtz64_0(v)
92 case OpCtz64NonZero:
93 return rewriteValueWasm_OpCtz64NonZero_0(v)
94 case OpCtz8:
95 return rewriteValueWasm_OpCtz8_0(v)
96 case OpCtz8NonZero:
97 return rewriteValueWasm_OpCtz8NonZero_0(v)
98 case OpCvt32Fto32:
99 return rewriteValueWasm_OpCvt32Fto32_0(v)
100 case OpCvt32Fto32U:
101 return rewriteValueWasm_OpCvt32Fto32U_0(v)
102 case OpCvt32Fto64:
103 return rewriteValueWasm_OpCvt32Fto64_0(v)
104 case OpCvt32Fto64F:
105 return rewriteValueWasm_OpCvt32Fto64F_0(v)
106 case OpCvt32Fto64U:
107 return rewriteValueWasm_OpCvt32Fto64U_0(v)
108 case OpCvt32Uto32F:
109 return rewriteValueWasm_OpCvt32Uto32F_0(v)
110 case OpCvt32Uto64F:
111 return rewriteValueWasm_OpCvt32Uto64F_0(v)
112 case OpCvt32to32F:
113 return rewriteValueWasm_OpCvt32to32F_0(v)
114 case OpCvt32to64F:
115 return rewriteValueWasm_OpCvt32to64F_0(v)
116 case OpCvt64Fto32:
117 return rewriteValueWasm_OpCvt64Fto32_0(v)
118 case OpCvt64Fto32F:
119 return rewriteValueWasm_OpCvt64Fto32F_0(v)
120 case OpCvt64Fto32U:
121 return rewriteValueWasm_OpCvt64Fto32U_0(v)
122 case OpCvt64Fto64:
123 return rewriteValueWasm_OpCvt64Fto64_0(v)
124 case OpCvt64Fto64U:
125 return rewriteValueWasm_OpCvt64Fto64U_0(v)
126 case OpCvt64Uto32F:
127 return rewriteValueWasm_OpCvt64Uto32F_0(v)
128 case OpCvt64Uto64F:
129 return rewriteValueWasm_OpCvt64Uto64F_0(v)
130 case OpCvt64to32F:
131 return rewriteValueWasm_OpCvt64to32F_0(v)
132 case OpCvt64to64F:
133 return rewriteValueWasm_OpCvt64to64F_0(v)
134 case OpDiv16:
135 return rewriteValueWasm_OpDiv16_0(v)
136 case OpDiv16u:
137 return rewriteValueWasm_OpDiv16u_0(v)
138 case OpDiv32:
139 return rewriteValueWasm_OpDiv32_0(v)
140 case OpDiv32F:
141 return rewriteValueWasm_OpDiv32F_0(v)
142 case OpDiv32u:
143 return rewriteValueWasm_OpDiv32u_0(v)
144 case OpDiv64:
145 return rewriteValueWasm_OpDiv64_0(v)
146 case OpDiv64F:
147 return rewriteValueWasm_OpDiv64F_0(v)
148 case OpDiv64u:
149 return rewriteValueWasm_OpDiv64u_0(v)
150 case OpDiv8:
151 return rewriteValueWasm_OpDiv8_0(v)
152 case OpDiv8u:
153 return rewriteValueWasm_OpDiv8u_0(v)
154 case OpEq16:
155 return rewriteValueWasm_OpEq16_0(v)
156 case OpEq32:
157 return rewriteValueWasm_OpEq32_0(v)
158 case OpEq32F:
159 return rewriteValueWasm_OpEq32F_0(v)
160 case OpEq64:
161 return rewriteValueWasm_OpEq64_0(v)
162 case OpEq64F:
163 return rewriteValueWasm_OpEq64F_0(v)
164 case OpEq8:
165 return rewriteValueWasm_OpEq8_0(v)
166 case OpEqB:
167 return rewriteValueWasm_OpEqB_0(v)
168 case OpEqPtr:
169 return rewriteValueWasm_OpEqPtr_0(v)
170 case OpFloor:
171 return rewriteValueWasm_OpFloor_0(v)
172 case OpGeq16:
173 return rewriteValueWasm_OpGeq16_0(v)
174 case OpGeq16U:
175 return rewriteValueWasm_OpGeq16U_0(v)
176 case OpGeq32:
177 return rewriteValueWasm_OpGeq32_0(v)
178 case OpGeq32F:
179 return rewriteValueWasm_OpGeq32F_0(v)
180 case OpGeq32U:
181 return rewriteValueWasm_OpGeq32U_0(v)
182 case OpGeq64:
183 return rewriteValueWasm_OpGeq64_0(v)
184 case OpGeq64F:
185 return rewriteValueWasm_OpGeq64F_0(v)
186 case OpGeq64U:
187 return rewriteValueWasm_OpGeq64U_0(v)
188 case OpGeq8:
189 return rewriteValueWasm_OpGeq8_0(v)
190 case OpGeq8U:
191 return rewriteValueWasm_OpGeq8U_0(v)
192 case OpGetCallerPC:
193 return rewriteValueWasm_OpGetCallerPC_0(v)
194 case OpGetCallerSP:
195 return rewriteValueWasm_OpGetCallerSP_0(v)
196 case OpGetClosurePtr:
197 return rewriteValueWasm_OpGetClosurePtr_0(v)
198 case OpGreater16:
199 return rewriteValueWasm_OpGreater16_0(v)
200 case OpGreater16U:
201 return rewriteValueWasm_OpGreater16U_0(v)
202 case OpGreater32:
203 return rewriteValueWasm_OpGreater32_0(v)
204 case OpGreater32F:
205 return rewriteValueWasm_OpGreater32F_0(v)
206 case OpGreater32U:
207 return rewriteValueWasm_OpGreater32U_0(v)
208 case OpGreater64:
209 return rewriteValueWasm_OpGreater64_0(v)
210 case OpGreater64F:
211 return rewriteValueWasm_OpGreater64F_0(v)
212 case OpGreater64U:
213 return rewriteValueWasm_OpGreater64U_0(v)
214 case OpGreater8:
215 return rewriteValueWasm_OpGreater8_0(v)
216 case OpGreater8U:
217 return rewriteValueWasm_OpGreater8U_0(v)
218 case OpInterCall:
219 return rewriteValueWasm_OpInterCall_0(v)
220 case OpIsInBounds:
221 return rewriteValueWasm_OpIsInBounds_0(v)
222 case OpIsNonNil:
223 return rewriteValueWasm_OpIsNonNil_0(v)
224 case OpIsSliceInBounds:
225 return rewriteValueWasm_OpIsSliceInBounds_0(v)
226 case OpLeq16:
227 return rewriteValueWasm_OpLeq16_0(v)
228 case OpLeq16U:
229 return rewriteValueWasm_OpLeq16U_0(v)
230 case OpLeq32:
231 return rewriteValueWasm_OpLeq32_0(v)
232 case OpLeq32F:
233 return rewriteValueWasm_OpLeq32F_0(v)
234 case OpLeq32U:
235 return rewriteValueWasm_OpLeq32U_0(v)
236 case OpLeq64:
237 return rewriteValueWasm_OpLeq64_0(v)
238 case OpLeq64F:
239 return rewriteValueWasm_OpLeq64F_0(v)
240 case OpLeq64U:
241 return rewriteValueWasm_OpLeq64U_0(v)
242 case OpLeq8:
243 return rewriteValueWasm_OpLeq8_0(v)
244 case OpLeq8U:
245 return rewriteValueWasm_OpLeq8U_0(v)
246 case OpLess16:
247 return rewriteValueWasm_OpLess16_0(v)
248 case OpLess16U:
249 return rewriteValueWasm_OpLess16U_0(v)
250 case OpLess32:
251 return rewriteValueWasm_OpLess32_0(v)
252 case OpLess32F:
253 return rewriteValueWasm_OpLess32F_0(v)
254 case OpLess32U:
255 return rewriteValueWasm_OpLess32U_0(v)
256 case OpLess64:
257 return rewriteValueWasm_OpLess64_0(v)
258 case OpLess64F:
259 return rewriteValueWasm_OpLess64F_0(v)
260 case OpLess64U:
261 return rewriteValueWasm_OpLess64U_0(v)
262 case OpLess8:
263 return rewriteValueWasm_OpLess8_0(v)
264 case OpLess8U:
265 return rewriteValueWasm_OpLess8U_0(v)
266 case OpLoad:
267 return rewriteValueWasm_OpLoad_0(v)
268 case OpLocalAddr:
269 return rewriteValueWasm_OpLocalAddr_0(v)
270 case OpLsh16x16:
271 return rewriteValueWasm_OpLsh16x16_0(v)
272 case OpLsh16x32:
273 return rewriteValueWasm_OpLsh16x32_0(v)
274 case OpLsh16x64:
275 return rewriteValueWasm_OpLsh16x64_0(v)
276 case OpLsh16x8:
277 return rewriteValueWasm_OpLsh16x8_0(v)
278 case OpLsh32x16:
279 return rewriteValueWasm_OpLsh32x16_0(v)
280 case OpLsh32x32:
281 return rewriteValueWasm_OpLsh32x32_0(v)
282 case OpLsh32x64:
283 return rewriteValueWasm_OpLsh32x64_0(v)
284 case OpLsh32x8:
285 return rewriteValueWasm_OpLsh32x8_0(v)
286 case OpLsh64x16:
287 return rewriteValueWasm_OpLsh64x16_0(v)
288 case OpLsh64x32:
289 return rewriteValueWasm_OpLsh64x32_0(v)
290 case OpLsh64x64:
291 return rewriteValueWasm_OpLsh64x64_0(v)
292 case OpLsh64x8:
293 return rewriteValueWasm_OpLsh64x8_0(v)
294 case OpLsh8x16:
295 return rewriteValueWasm_OpLsh8x16_0(v)
296 case OpLsh8x32:
297 return rewriteValueWasm_OpLsh8x32_0(v)
298 case OpLsh8x64:
299 return rewriteValueWasm_OpLsh8x64_0(v)
300 case OpLsh8x8:
301 return rewriteValueWasm_OpLsh8x8_0(v)
302 case OpMod16:
303 return rewriteValueWasm_OpMod16_0(v)
304 case OpMod16u:
305 return rewriteValueWasm_OpMod16u_0(v)
306 case OpMod32:
307 return rewriteValueWasm_OpMod32_0(v)
308 case OpMod32u:
309 return rewriteValueWasm_OpMod32u_0(v)
310 case OpMod64:
311 return rewriteValueWasm_OpMod64_0(v)
312 case OpMod64u:
313 return rewriteValueWasm_OpMod64u_0(v)
314 case OpMod8:
315 return rewriteValueWasm_OpMod8_0(v)
316 case OpMod8u:
317 return rewriteValueWasm_OpMod8u_0(v)
318 case OpMove:
319 return rewriteValueWasm_OpMove_0(v) || rewriteValueWasm_OpMove_10(v)
320 case OpMul16:
321 return rewriteValueWasm_OpMul16_0(v)
322 case OpMul32:
323 return rewriteValueWasm_OpMul32_0(v)
324 case OpMul32F:
325 return rewriteValueWasm_OpMul32F_0(v)
326 case OpMul64:
327 return rewriteValueWasm_OpMul64_0(v)
328 case OpMul64F:
329 return rewriteValueWasm_OpMul64F_0(v)
330 case OpMul8:
331 return rewriteValueWasm_OpMul8_0(v)
332 case OpNeg16:
333 return rewriteValueWasm_OpNeg16_0(v)
334 case OpNeg32:
335 return rewriteValueWasm_OpNeg32_0(v)
336 case OpNeg32F:
337 return rewriteValueWasm_OpNeg32F_0(v)
338 case OpNeg64:
339 return rewriteValueWasm_OpNeg64_0(v)
340 case OpNeg64F:
341 return rewriteValueWasm_OpNeg64F_0(v)
342 case OpNeg8:
343 return rewriteValueWasm_OpNeg8_0(v)
344 case OpNeq16:
345 return rewriteValueWasm_OpNeq16_0(v)
346 case OpNeq32:
347 return rewriteValueWasm_OpNeq32_0(v)
348 case OpNeq32F:
349 return rewriteValueWasm_OpNeq32F_0(v)
350 case OpNeq64:
351 return rewriteValueWasm_OpNeq64_0(v)
352 case OpNeq64F:
353 return rewriteValueWasm_OpNeq64F_0(v)
354 case OpNeq8:
355 return rewriteValueWasm_OpNeq8_0(v)
356 case OpNeqB:
357 return rewriteValueWasm_OpNeqB_0(v)
358 case OpNeqPtr:
359 return rewriteValueWasm_OpNeqPtr_0(v)
360 case OpNilCheck:
361 return rewriteValueWasm_OpNilCheck_0(v)
362 case OpNot:
363 return rewriteValueWasm_OpNot_0(v)
364 case OpOffPtr:
365 return rewriteValueWasm_OpOffPtr_0(v)
366 case OpOr16:
367 return rewriteValueWasm_OpOr16_0(v)
368 case OpOr32:
369 return rewriteValueWasm_OpOr32_0(v)
370 case OpOr64:
371 return rewriteValueWasm_OpOr64_0(v)
372 case OpOr8:
373 return rewriteValueWasm_OpOr8_0(v)
374 case OpOrB:
375 return rewriteValueWasm_OpOrB_0(v)
376 case OpPopCount16:
377 return rewriteValueWasm_OpPopCount16_0(v)
378 case OpPopCount32:
379 return rewriteValueWasm_OpPopCount32_0(v)
380 case OpPopCount64:
381 return rewriteValueWasm_OpPopCount64_0(v)
382 case OpPopCount8:
383 return rewriteValueWasm_OpPopCount8_0(v)
384 case OpRotateLeft16:
385 return rewriteValueWasm_OpRotateLeft16_0(v)
386 case OpRotateLeft32:
387 return rewriteValueWasm_OpRotateLeft32_0(v)
388 case OpRotateLeft64:
389 return rewriteValueWasm_OpRotateLeft64_0(v)
390 case OpRotateLeft8:
391 return rewriteValueWasm_OpRotateLeft8_0(v)
392 case OpRound32F:
393 return rewriteValueWasm_OpRound32F_0(v)
394 case OpRound64F:
395 return rewriteValueWasm_OpRound64F_0(v)
396 case OpRoundToEven:
397 return rewriteValueWasm_OpRoundToEven_0(v)
398 case OpRsh16Ux16:
399 return rewriteValueWasm_OpRsh16Ux16_0(v)
400 case OpRsh16Ux32:
401 return rewriteValueWasm_OpRsh16Ux32_0(v)
402 case OpRsh16Ux64:
403 return rewriteValueWasm_OpRsh16Ux64_0(v)
404 case OpRsh16Ux8:
405 return rewriteValueWasm_OpRsh16Ux8_0(v)
406 case OpRsh16x16:
407 return rewriteValueWasm_OpRsh16x16_0(v)
408 case OpRsh16x32:
409 return rewriteValueWasm_OpRsh16x32_0(v)
410 case OpRsh16x64:
411 return rewriteValueWasm_OpRsh16x64_0(v)
412 case OpRsh16x8:
413 return rewriteValueWasm_OpRsh16x8_0(v)
414 case OpRsh32Ux16:
415 return rewriteValueWasm_OpRsh32Ux16_0(v)
416 case OpRsh32Ux32:
417 return rewriteValueWasm_OpRsh32Ux32_0(v)
418 case OpRsh32Ux64:
419 return rewriteValueWasm_OpRsh32Ux64_0(v)
420 case OpRsh32Ux8:
421 return rewriteValueWasm_OpRsh32Ux8_0(v)
422 case OpRsh32x16:
423 return rewriteValueWasm_OpRsh32x16_0(v)
424 case OpRsh32x32:
425 return rewriteValueWasm_OpRsh32x32_0(v)
426 case OpRsh32x64:
427 return rewriteValueWasm_OpRsh32x64_0(v)
428 case OpRsh32x8:
429 return rewriteValueWasm_OpRsh32x8_0(v)
430 case OpRsh64Ux16:
431 return rewriteValueWasm_OpRsh64Ux16_0(v)
432 case OpRsh64Ux32:
433 return rewriteValueWasm_OpRsh64Ux32_0(v)
434 case OpRsh64Ux64:
435 return rewriteValueWasm_OpRsh64Ux64_0(v)
436 case OpRsh64Ux8:
437 return rewriteValueWasm_OpRsh64Ux8_0(v)
438 case OpRsh64x16:
439 return rewriteValueWasm_OpRsh64x16_0(v)
440 case OpRsh64x32:
441 return rewriteValueWasm_OpRsh64x32_0(v)
442 case OpRsh64x64:
443 return rewriteValueWasm_OpRsh64x64_0(v)
444 case OpRsh64x8:
445 return rewriteValueWasm_OpRsh64x8_0(v)
446 case OpRsh8Ux16:
447 return rewriteValueWasm_OpRsh8Ux16_0(v)
448 case OpRsh8Ux32:
449 return rewriteValueWasm_OpRsh8Ux32_0(v)
450 case OpRsh8Ux64:
451 return rewriteValueWasm_OpRsh8Ux64_0(v)
452 case OpRsh8Ux8:
453 return rewriteValueWasm_OpRsh8Ux8_0(v)
454 case OpRsh8x16:
455 return rewriteValueWasm_OpRsh8x16_0(v)
456 case OpRsh8x32:
457 return rewriteValueWasm_OpRsh8x32_0(v)
458 case OpRsh8x64:
459 return rewriteValueWasm_OpRsh8x64_0(v)
460 case OpRsh8x8:
461 return rewriteValueWasm_OpRsh8x8_0(v)
462 case OpSignExt16to32:
463 return rewriteValueWasm_OpSignExt16to32_0(v)
464 case OpSignExt16to64:
465 return rewriteValueWasm_OpSignExt16to64_0(v)
466 case OpSignExt32to64:
467 return rewriteValueWasm_OpSignExt32to64_0(v)
468 case OpSignExt8to16:
469 return rewriteValueWasm_OpSignExt8to16_0(v)
470 case OpSignExt8to32:
471 return rewriteValueWasm_OpSignExt8to32_0(v)
472 case OpSignExt8to64:
473 return rewriteValueWasm_OpSignExt8to64_0(v)
474 case OpSlicemask:
475 return rewriteValueWasm_OpSlicemask_0(v)
476 case OpSqrt:
477 return rewriteValueWasm_OpSqrt_0(v)
478 case OpStaticCall:
479 return rewriteValueWasm_OpStaticCall_0(v)
480 case OpStore:
481 return rewriteValueWasm_OpStore_0(v)
482 case OpSub16:
483 return rewriteValueWasm_OpSub16_0(v)
484 case OpSub32:
485 return rewriteValueWasm_OpSub32_0(v)
486 case OpSub32F:
487 return rewriteValueWasm_OpSub32F_0(v)
488 case OpSub64:
489 return rewriteValueWasm_OpSub64_0(v)
490 case OpSub64F:
491 return rewriteValueWasm_OpSub64F_0(v)
492 case OpSub8:
493 return rewriteValueWasm_OpSub8_0(v)
494 case OpSubPtr:
495 return rewriteValueWasm_OpSubPtr_0(v)
496 case OpTrunc:
497 return rewriteValueWasm_OpTrunc_0(v)
498 case OpTrunc16to8:
499 return rewriteValueWasm_OpTrunc16to8_0(v)
500 case OpTrunc32to16:
501 return rewriteValueWasm_OpTrunc32to16_0(v)
502 case OpTrunc32to8:
503 return rewriteValueWasm_OpTrunc32to8_0(v)
504 case OpTrunc64to16:
505 return rewriteValueWasm_OpTrunc64to16_0(v)
506 case OpTrunc64to32:
507 return rewriteValueWasm_OpTrunc64to32_0(v)
508 case OpTrunc64to8:
509 return rewriteValueWasm_OpTrunc64to8_0(v)
510 case OpWB:
511 return rewriteValueWasm_OpWB_0(v)
512 case OpWasmF64Add:
513 return rewriteValueWasm_OpWasmF64Add_0(v)
514 case OpWasmF64Mul:
515 return rewriteValueWasm_OpWasmF64Mul_0(v)
516 case OpWasmI64Add:
517 return rewriteValueWasm_OpWasmI64Add_0(v)
518 case OpWasmI64AddConst:
519 return rewriteValueWasm_OpWasmI64AddConst_0(v)
520 case OpWasmI64And:
521 return rewriteValueWasm_OpWasmI64And_0(v)
522 case OpWasmI64Eq:
523 return rewriteValueWasm_OpWasmI64Eq_0(v)
524 case OpWasmI64Eqz:
525 return rewriteValueWasm_OpWasmI64Eqz_0(v)
526 case OpWasmI64Load:
527 return rewriteValueWasm_OpWasmI64Load_0(v)
528 case OpWasmI64Load16S:
529 return rewriteValueWasm_OpWasmI64Load16S_0(v)
530 case OpWasmI64Load16U:
531 return rewriteValueWasm_OpWasmI64Load16U_0(v)
532 case OpWasmI64Load32S:
533 return rewriteValueWasm_OpWasmI64Load32S_0(v)
534 case OpWasmI64Load32U:
535 return rewriteValueWasm_OpWasmI64Load32U_0(v)
536 case OpWasmI64Load8S:
537 return rewriteValueWasm_OpWasmI64Load8S_0(v)
538 case OpWasmI64Load8U:
539 return rewriteValueWasm_OpWasmI64Load8U_0(v)
540 case OpWasmI64Mul:
541 return rewriteValueWasm_OpWasmI64Mul_0(v)
542 case OpWasmI64Ne:
543 return rewriteValueWasm_OpWasmI64Ne_0(v)
544 case OpWasmI64Or:
545 return rewriteValueWasm_OpWasmI64Or_0(v)
546 case OpWasmI64Shl:
547 return rewriteValueWasm_OpWasmI64Shl_0(v)
548 case OpWasmI64ShrS:
549 return rewriteValueWasm_OpWasmI64ShrS_0(v)
550 case OpWasmI64ShrU:
551 return rewriteValueWasm_OpWasmI64ShrU_0(v)
552 case OpWasmI64Store:
553 return rewriteValueWasm_OpWasmI64Store_0(v)
554 case OpWasmI64Store16:
555 return rewriteValueWasm_OpWasmI64Store16_0(v)
556 case OpWasmI64Store32:
557 return rewriteValueWasm_OpWasmI64Store32_0(v)
558 case OpWasmI64Store8:
559 return rewriteValueWasm_OpWasmI64Store8_0(v)
560 case OpWasmI64Xor:
561 return rewriteValueWasm_OpWasmI64Xor_0(v)
562 case OpXor16:
563 return rewriteValueWasm_OpXor16_0(v)
564 case OpXor32:
565 return rewriteValueWasm_OpXor32_0(v)
566 case OpXor64:
567 return rewriteValueWasm_OpXor64_0(v)
568 case OpXor8:
569 return rewriteValueWasm_OpXor8_0(v)
570 case OpZero:
571 return rewriteValueWasm_OpZero_0(v) || rewriteValueWasm_OpZero_10(v)
572 case OpZeroExt16to32:
573 return rewriteValueWasm_OpZeroExt16to32_0(v)
574 case OpZeroExt16to64:
575 return rewriteValueWasm_OpZeroExt16to64_0(v)
576 case OpZeroExt32to64:
577 return rewriteValueWasm_OpZeroExt32to64_0(v)
578 case OpZeroExt8to16:
579 return rewriteValueWasm_OpZeroExt8to16_0(v)
580 case OpZeroExt8to32:
581 return rewriteValueWasm_OpZeroExt8to32_0(v)
582 case OpZeroExt8to64:
583 return rewriteValueWasm_OpZeroExt8to64_0(v)
584 }
585 return false
586 }
587 func rewriteValueWasm_OpAbs_0(v *Value) bool {
588
589
590
591 for {
592 x := v.Args[0]
593 v.reset(OpWasmF64Abs)
594 v.AddArg(x)
595 return true
596 }
597 }
598 func rewriteValueWasm_OpAdd16_0(v *Value) bool {
599
600
601
602 for {
603 y := v.Args[1]
604 x := v.Args[0]
605 v.reset(OpWasmI64Add)
606 v.AddArg(x)
607 v.AddArg(y)
608 return true
609 }
610 }
611 func rewriteValueWasm_OpAdd32_0(v *Value) bool {
612
613
614
615 for {
616 y := v.Args[1]
617 x := v.Args[0]
618 v.reset(OpWasmI64Add)
619 v.AddArg(x)
620 v.AddArg(y)
621 return true
622 }
623 }
624 func rewriteValueWasm_OpAdd32F_0(v *Value) bool {
625
626
627
628 for {
629 y := v.Args[1]
630 x := v.Args[0]
631 v.reset(OpWasmF64Add)
632 v.AddArg(x)
633 v.AddArg(y)
634 return true
635 }
636 }
637 func rewriteValueWasm_OpAdd64_0(v *Value) bool {
638
639
640
641 for {
642 y := v.Args[1]
643 x := v.Args[0]
644 v.reset(OpWasmI64Add)
645 v.AddArg(x)
646 v.AddArg(y)
647 return true
648 }
649 }
650 func rewriteValueWasm_OpAdd64F_0(v *Value) bool {
651
652
653
654 for {
655 y := v.Args[1]
656 x := v.Args[0]
657 v.reset(OpWasmF64Add)
658 v.AddArg(x)
659 v.AddArg(y)
660 return true
661 }
662 }
663 func rewriteValueWasm_OpAdd8_0(v *Value) bool {
664
665
666
667 for {
668 y := v.Args[1]
669 x := v.Args[0]
670 v.reset(OpWasmI64Add)
671 v.AddArg(x)
672 v.AddArg(y)
673 return true
674 }
675 }
676 func rewriteValueWasm_OpAddPtr_0(v *Value) bool {
677
678
679
680 for {
681 y := v.Args[1]
682 x := v.Args[0]
683 v.reset(OpWasmI64Add)
684 v.AddArg(x)
685 v.AddArg(y)
686 return true
687 }
688 }
689 func rewriteValueWasm_OpAddr_0(v *Value) bool {
690
691
692
693 for {
694 sym := v.Aux
695 base := v.Args[0]
696 v.reset(OpWasmLoweredAddr)
697 v.Aux = sym
698 v.AddArg(base)
699 return true
700 }
701 }
702 func rewriteValueWasm_OpAnd16_0(v *Value) bool {
703
704
705
706 for {
707 y := v.Args[1]
708 x := v.Args[0]
709 v.reset(OpWasmI64And)
710 v.AddArg(x)
711 v.AddArg(y)
712 return true
713 }
714 }
715 func rewriteValueWasm_OpAnd32_0(v *Value) bool {
716
717
718
719 for {
720 y := v.Args[1]
721 x := v.Args[0]
722 v.reset(OpWasmI64And)
723 v.AddArg(x)
724 v.AddArg(y)
725 return true
726 }
727 }
728 func rewriteValueWasm_OpAnd64_0(v *Value) bool {
729
730
731
732 for {
733 y := v.Args[1]
734 x := v.Args[0]
735 v.reset(OpWasmI64And)
736 v.AddArg(x)
737 v.AddArg(y)
738 return true
739 }
740 }
741 func rewriteValueWasm_OpAnd8_0(v *Value) bool {
742
743
744
745 for {
746 y := v.Args[1]
747 x := v.Args[0]
748 v.reset(OpWasmI64And)
749 v.AddArg(x)
750 v.AddArg(y)
751 return true
752 }
753 }
754 func rewriteValueWasm_OpAndB_0(v *Value) bool {
755
756
757
758 for {
759 y := v.Args[1]
760 x := v.Args[0]
761 v.reset(OpWasmI64And)
762 v.AddArg(x)
763 v.AddArg(y)
764 return true
765 }
766 }
767 func rewriteValueWasm_OpBitLen64_0(v *Value) bool {
768 b := v.Block
769 typ := &b.Func.Config.Types
770
771
772
773 for {
774 x := v.Args[0]
775 v.reset(OpWasmI64Sub)
776 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
777 v0.AuxInt = 64
778 v.AddArg(v0)
779 v1 := b.NewValue0(v.Pos, OpWasmI64Clz, typ.Int64)
780 v1.AddArg(x)
781 v.AddArg(v1)
782 return true
783 }
784 }
785 func rewriteValueWasm_OpCeil_0(v *Value) bool {
786
787
788
789 for {
790 x := v.Args[0]
791 v.reset(OpWasmF64Ceil)
792 v.AddArg(x)
793 return true
794 }
795 }
796 func rewriteValueWasm_OpClosureCall_0(v *Value) bool {
797
798
799
800 for {
801 argwid := v.AuxInt
802 mem := v.Args[2]
803 entry := v.Args[0]
804 closure := v.Args[1]
805 v.reset(OpWasmLoweredClosureCall)
806 v.AuxInt = argwid
807 v.AddArg(entry)
808 v.AddArg(closure)
809 v.AddArg(mem)
810 return true
811 }
812 }
813 func rewriteValueWasm_OpCom16_0(v *Value) bool {
814 b := v.Block
815 typ := &b.Func.Config.Types
816
817
818
819 for {
820 x := v.Args[0]
821 v.reset(OpWasmI64Xor)
822 v.AddArg(x)
823 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
824 v0.AuxInt = -1
825 v.AddArg(v0)
826 return true
827 }
828 }
829 func rewriteValueWasm_OpCom32_0(v *Value) bool {
830 b := v.Block
831 typ := &b.Func.Config.Types
832
833
834
835 for {
836 x := v.Args[0]
837 v.reset(OpWasmI64Xor)
838 v.AddArg(x)
839 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
840 v0.AuxInt = -1
841 v.AddArg(v0)
842 return true
843 }
844 }
845 func rewriteValueWasm_OpCom64_0(v *Value) bool {
846 b := v.Block
847 typ := &b.Func.Config.Types
848
849
850
851 for {
852 x := v.Args[0]
853 v.reset(OpWasmI64Xor)
854 v.AddArg(x)
855 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
856 v0.AuxInt = -1
857 v.AddArg(v0)
858 return true
859 }
860 }
861 func rewriteValueWasm_OpCom8_0(v *Value) bool {
862 b := v.Block
863 typ := &b.Func.Config.Types
864
865
866
867 for {
868 x := v.Args[0]
869 v.reset(OpWasmI64Xor)
870 v.AddArg(x)
871 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
872 v0.AuxInt = -1
873 v.AddArg(v0)
874 return true
875 }
876 }
877 func rewriteValueWasm_OpConst16_0(v *Value) bool {
878
879
880
881 for {
882 val := v.AuxInt
883 v.reset(OpWasmI64Const)
884 v.AuxInt = val
885 return true
886 }
887 }
888 func rewriteValueWasm_OpConst32_0(v *Value) bool {
889
890
891
892 for {
893 val := v.AuxInt
894 v.reset(OpWasmI64Const)
895 v.AuxInt = val
896 return true
897 }
898 }
899 func rewriteValueWasm_OpConst32F_0(v *Value) bool {
900
901
902
903 for {
904 val := v.AuxInt
905 v.reset(OpWasmF64Const)
906 v.AuxInt = val
907 return true
908 }
909 }
910 func rewriteValueWasm_OpConst64_0(v *Value) bool {
911
912
913
914 for {
915 val := v.AuxInt
916 v.reset(OpWasmI64Const)
917 v.AuxInt = val
918 return true
919 }
920 }
921 func rewriteValueWasm_OpConst64F_0(v *Value) bool {
922
923
924
925 for {
926 val := v.AuxInt
927 v.reset(OpWasmF64Const)
928 v.AuxInt = val
929 return true
930 }
931 }
932 func rewriteValueWasm_OpConst8_0(v *Value) bool {
933
934
935
936 for {
937 val := v.AuxInt
938 v.reset(OpWasmI64Const)
939 v.AuxInt = val
940 return true
941 }
942 }
943 func rewriteValueWasm_OpConstBool_0(v *Value) bool {
944
945
946
947 for {
948 b := v.AuxInt
949 v.reset(OpWasmI64Const)
950 v.AuxInt = b
951 return true
952 }
953 }
954 func rewriteValueWasm_OpConstNil_0(v *Value) bool {
955
956
957
958 for {
959 v.reset(OpWasmI64Const)
960 v.AuxInt = 0
961 return true
962 }
963 }
964 func rewriteValueWasm_OpConvert_0(v *Value) bool {
965
966
967
968 for {
969 t := v.Type
970 mem := v.Args[1]
971 x := v.Args[0]
972 v.reset(OpWasmLoweredConvert)
973 v.Type = t
974 v.AddArg(x)
975 v.AddArg(mem)
976 return true
977 }
978 }
979 func rewriteValueWasm_OpCopysign_0(v *Value) bool {
980
981
982
983 for {
984 y := v.Args[1]
985 x := v.Args[0]
986 v.reset(OpWasmF64Copysign)
987 v.AddArg(x)
988 v.AddArg(y)
989 return true
990 }
991 }
992 func rewriteValueWasm_OpCtz16_0(v *Value) bool {
993 b := v.Block
994 typ := &b.Func.Config.Types
995
996
997
998 for {
999 x := v.Args[0]
1000 v.reset(OpWasmI64Ctz)
1001 v0 := b.NewValue0(v.Pos, OpWasmI64Or, typ.Int64)
1002 v0.AddArg(x)
1003 v1 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
1004 v1.AuxInt = 0x10000
1005 v0.AddArg(v1)
1006 v.AddArg(v0)
1007 return true
1008 }
1009 }
1010 func rewriteValueWasm_OpCtz16NonZero_0(v *Value) bool {
1011
1012
1013
1014 for {
1015 x := v.Args[0]
1016 v.reset(OpWasmI64Ctz)
1017 v.AddArg(x)
1018 return true
1019 }
1020 }
1021 func rewriteValueWasm_OpCtz32_0(v *Value) bool {
1022 b := v.Block
1023 typ := &b.Func.Config.Types
1024
1025
1026
1027 for {
1028 x := v.Args[0]
1029 v.reset(OpWasmI64Ctz)
1030 v0 := b.NewValue0(v.Pos, OpWasmI64Or, typ.Int64)
1031 v0.AddArg(x)
1032 v1 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
1033 v1.AuxInt = 0x100000000
1034 v0.AddArg(v1)
1035 v.AddArg(v0)
1036 return true
1037 }
1038 }
1039 func rewriteValueWasm_OpCtz32NonZero_0(v *Value) bool {
1040
1041
1042
1043 for {
1044 x := v.Args[0]
1045 v.reset(OpWasmI64Ctz)
1046 v.AddArg(x)
1047 return true
1048 }
1049 }
1050 func rewriteValueWasm_OpCtz64_0(v *Value) bool {
1051
1052
1053
1054 for {
1055 x := v.Args[0]
1056 v.reset(OpWasmI64Ctz)
1057 v.AddArg(x)
1058 return true
1059 }
1060 }
1061 func rewriteValueWasm_OpCtz64NonZero_0(v *Value) bool {
1062
1063
1064
1065 for {
1066 x := v.Args[0]
1067 v.reset(OpWasmI64Ctz)
1068 v.AddArg(x)
1069 return true
1070 }
1071 }
1072 func rewriteValueWasm_OpCtz8_0(v *Value) bool {
1073 b := v.Block
1074 typ := &b.Func.Config.Types
1075
1076
1077
1078 for {
1079 x := v.Args[0]
1080 v.reset(OpWasmI64Ctz)
1081 v0 := b.NewValue0(v.Pos, OpWasmI64Or, typ.Int64)
1082 v0.AddArg(x)
1083 v1 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
1084 v1.AuxInt = 0x100
1085 v0.AddArg(v1)
1086 v.AddArg(v0)
1087 return true
1088 }
1089 }
1090 func rewriteValueWasm_OpCtz8NonZero_0(v *Value) bool {
1091
1092
1093
1094 for {
1095 x := v.Args[0]
1096 v.reset(OpWasmI64Ctz)
1097 v.AddArg(x)
1098 return true
1099 }
1100 }
1101 func rewriteValueWasm_OpCvt32Fto32_0(v *Value) bool {
1102
1103
1104
1105 for {
1106 x := v.Args[0]
1107 v.reset(OpWasmI64TruncSatF64S)
1108 v.AddArg(x)
1109 return true
1110 }
1111 }
1112 func rewriteValueWasm_OpCvt32Fto32U_0(v *Value) bool {
1113
1114
1115
1116 for {
1117 x := v.Args[0]
1118 v.reset(OpWasmI64TruncSatF64U)
1119 v.AddArg(x)
1120 return true
1121 }
1122 }
1123 func rewriteValueWasm_OpCvt32Fto64_0(v *Value) bool {
1124
1125
1126
1127 for {
1128 x := v.Args[0]
1129 v.reset(OpWasmI64TruncSatF64S)
1130 v.AddArg(x)
1131 return true
1132 }
1133 }
1134 func rewriteValueWasm_OpCvt32Fto64F_0(v *Value) bool {
1135
1136
1137
1138 for {
1139 x := v.Args[0]
1140 v.reset(OpCopy)
1141 v.Type = x.Type
1142 v.AddArg(x)
1143 return true
1144 }
1145 }
1146 func rewriteValueWasm_OpCvt32Fto64U_0(v *Value) bool {
1147
1148
1149
1150 for {
1151 x := v.Args[0]
1152 v.reset(OpWasmI64TruncSatF64U)
1153 v.AddArg(x)
1154 return true
1155 }
1156 }
1157 func rewriteValueWasm_OpCvt32Uto32F_0(v *Value) bool {
1158 b := v.Block
1159 typ := &b.Func.Config.Types
1160
1161
1162
1163 for {
1164 x := v.Args[0]
1165 v.reset(OpWasmLoweredRound32F)
1166 v0 := b.NewValue0(v.Pos, OpWasmF64ConvertI64U, typ.Float64)
1167 v1 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
1168 v1.AddArg(x)
1169 v0.AddArg(v1)
1170 v.AddArg(v0)
1171 return true
1172 }
1173 }
1174 func rewriteValueWasm_OpCvt32Uto64F_0(v *Value) bool {
1175 b := v.Block
1176 typ := &b.Func.Config.Types
1177
1178
1179
1180 for {
1181 x := v.Args[0]
1182 v.reset(OpWasmF64ConvertI64U)
1183 v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
1184 v0.AddArg(x)
1185 v.AddArg(v0)
1186 return true
1187 }
1188 }
1189 func rewriteValueWasm_OpCvt32to32F_0(v *Value) bool {
1190 b := v.Block
1191 typ := &b.Func.Config.Types
1192
1193
1194
1195 for {
1196 x := v.Args[0]
1197 v.reset(OpWasmLoweredRound32F)
1198 v0 := b.NewValue0(v.Pos, OpWasmF64ConvertI64S, typ.Float64)
1199 v1 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
1200 v1.AddArg(x)
1201 v0.AddArg(v1)
1202 v.AddArg(v0)
1203 return true
1204 }
1205 }
1206 func rewriteValueWasm_OpCvt32to64F_0(v *Value) bool {
1207 b := v.Block
1208 typ := &b.Func.Config.Types
1209
1210
1211
1212 for {
1213 x := v.Args[0]
1214 v.reset(OpWasmF64ConvertI64S)
1215 v0 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
1216 v0.AddArg(x)
1217 v.AddArg(v0)
1218 return true
1219 }
1220 }
1221 func rewriteValueWasm_OpCvt64Fto32_0(v *Value) bool {
1222
1223
1224
1225 for {
1226 x := v.Args[0]
1227 v.reset(OpWasmI64TruncSatF64S)
1228 v.AddArg(x)
1229 return true
1230 }
1231 }
1232 func rewriteValueWasm_OpCvt64Fto32F_0(v *Value) bool {
1233
1234
1235
1236 for {
1237 x := v.Args[0]
1238 v.reset(OpWasmLoweredRound32F)
1239 v.AddArg(x)
1240 return true
1241 }
1242 }
1243 func rewriteValueWasm_OpCvt64Fto32U_0(v *Value) bool {
1244
1245
1246
1247 for {
1248 x := v.Args[0]
1249 v.reset(OpWasmI64TruncSatF64U)
1250 v.AddArg(x)
1251 return true
1252 }
1253 }
1254 func rewriteValueWasm_OpCvt64Fto64_0(v *Value) bool {
1255
1256
1257
1258 for {
1259 x := v.Args[0]
1260 v.reset(OpWasmI64TruncSatF64S)
1261 v.AddArg(x)
1262 return true
1263 }
1264 }
1265 func rewriteValueWasm_OpCvt64Fto64U_0(v *Value) bool {
1266
1267
1268
1269 for {
1270 x := v.Args[0]
1271 v.reset(OpWasmI64TruncSatF64U)
1272 v.AddArg(x)
1273 return true
1274 }
1275 }
1276 func rewriteValueWasm_OpCvt64Uto32F_0(v *Value) bool {
1277 b := v.Block
1278 typ := &b.Func.Config.Types
1279
1280
1281
1282 for {
1283 x := v.Args[0]
1284 v.reset(OpWasmLoweredRound32F)
1285 v0 := b.NewValue0(v.Pos, OpWasmF64ConvertI64U, typ.Float64)
1286 v0.AddArg(x)
1287 v.AddArg(v0)
1288 return true
1289 }
1290 }
1291 func rewriteValueWasm_OpCvt64Uto64F_0(v *Value) bool {
1292
1293
1294
1295 for {
1296 x := v.Args[0]
1297 v.reset(OpWasmF64ConvertI64U)
1298 v.AddArg(x)
1299 return true
1300 }
1301 }
1302 func rewriteValueWasm_OpCvt64to32F_0(v *Value) bool {
1303 b := v.Block
1304 typ := &b.Func.Config.Types
1305
1306
1307
1308 for {
1309 x := v.Args[0]
1310 v.reset(OpWasmLoweredRound32F)
1311 v0 := b.NewValue0(v.Pos, OpWasmF64ConvertI64S, typ.Float64)
1312 v0.AddArg(x)
1313 v.AddArg(v0)
1314 return true
1315 }
1316 }
1317 func rewriteValueWasm_OpCvt64to64F_0(v *Value) bool {
1318
1319
1320
1321 for {
1322 x := v.Args[0]
1323 v.reset(OpWasmF64ConvertI64S)
1324 v.AddArg(x)
1325 return true
1326 }
1327 }
1328 func rewriteValueWasm_OpDiv16_0(v *Value) bool {
1329 b := v.Block
1330 typ := &b.Func.Config.Types
1331
1332
1333
1334 for {
1335 y := v.Args[1]
1336 x := v.Args[0]
1337 v.reset(OpWasmI64DivS)
1338 v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
1339 v0.AddArg(x)
1340 v.AddArg(v0)
1341 v1 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
1342 v1.AddArg(y)
1343 v.AddArg(v1)
1344 return true
1345 }
1346 }
1347 func rewriteValueWasm_OpDiv16u_0(v *Value) bool {
1348 b := v.Block
1349 typ := &b.Func.Config.Types
1350
1351
1352
1353 for {
1354 y := v.Args[1]
1355 x := v.Args[0]
1356 v.reset(OpWasmI64DivU)
1357 v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
1358 v0.AddArg(x)
1359 v.AddArg(v0)
1360 v1 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
1361 v1.AddArg(y)
1362 v.AddArg(v1)
1363 return true
1364 }
1365 }
1366 func rewriteValueWasm_OpDiv32_0(v *Value) bool {
1367 b := v.Block
1368 typ := &b.Func.Config.Types
1369
1370
1371
1372 for {
1373 y := v.Args[1]
1374 x := v.Args[0]
1375 v.reset(OpWasmI64DivS)
1376 v0 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
1377 v0.AddArg(x)
1378 v.AddArg(v0)
1379 v1 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
1380 v1.AddArg(y)
1381 v.AddArg(v1)
1382 return true
1383 }
1384 }
1385 func rewriteValueWasm_OpDiv32F_0(v *Value) bool {
1386
1387
1388
1389 for {
1390 y := v.Args[1]
1391 x := v.Args[0]
1392 v.reset(OpWasmF64Div)
1393 v.AddArg(x)
1394 v.AddArg(y)
1395 return true
1396 }
1397 }
1398 func rewriteValueWasm_OpDiv32u_0(v *Value) bool {
1399 b := v.Block
1400 typ := &b.Func.Config.Types
1401
1402
1403
1404 for {
1405 y := v.Args[1]
1406 x := v.Args[0]
1407 v.reset(OpWasmI64DivU)
1408 v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
1409 v0.AddArg(x)
1410 v.AddArg(v0)
1411 v1 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
1412 v1.AddArg(y)
1413 v.AddArg(v1)
1414 return true
1415 }
1416 }
1417 func rewriteValueWasm_OpDiv64_0(v *Value) bool {
1418
1419
1420
1421 for {
1422 y := v.Args[1]
1423 x := v.Args[0]
1424 v.reset(OpWasmI64DivS)
1425 v.AddArg(x)
1426 v.AddArg(y)
1427 return true
1428 }
1429 }
1430 func rewriteValueWasm_OpDiv64F_0(v *Value) bool {
1431
1432
1433
1434 for {
1435 y := v.Args[1]
1436 x := v.Args[0]
1437 v.reset(OpWasmF64Div)
1438 v.AddArg(x)
1439 v.AddArg(y)
1440 return true
1441 }
1442 }
1443 func rewriteValueWasm_OpDiv64u_0(v *Value) bool {
1444
1445
1446
1447 for {
1448 y := v.Args[1]
1449 x := v.Args[0]
1450 v.reset(OpWasmI64DivU)
1451 v.AddArg(x)
1452 v.AddArg(y)
1453 return true
1454 }
1455 }
1456 func rewriteValueWasm_OpDiv8_0(v *Value) bool {
1457 b := v.Block
1458 typ := &b.Func.Config.Types
1459
1460
1461
1462 for {
1463 y := v.Args[1]
1464 x := v.Args[0]
1465 v.reset(OpWasmI64DivS)
1466 v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
1467 v0.AddArg(x)
1468 v.AddArg(v0)
1469 v1 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
1470 v1.AddArg(y)
1471 v.AddArg(v1)
1472 return true
1473 }
1474 }
1475 func rewriteValueWasm_OpDiv8u_0(v *Value) bool {
1476 b := v.Block
1477 typ := &b.Func.Config.Types
1478
1479
1480
1481 for {
1482 y := v.Args[1]
1483 x := v.Args[0]
1484 v.reset(OpWasmI64DivU)
1485 v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
1486 v0.AddArg(x)
1487 v.AddArg(v0)
1488 v1 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
1489 v1.AddArg(y)
1490 v.AddArg(v1)
1491 return true
1492 }
1493 }
1494 func rewriteValueWasm_OpEq16_0(v *Value) bool {
1495 b := v.Block
1496 typ := &b.Func.Config.Types
1497
1498
1499
1500 for {
1501 y := v.Args[1]
1502 x := v.Args[0]
1503 v.reset(OpWasmI64Eq)
1504 v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
1505 v0.AddArg(x)
1506 v.AddArg(v0)
1507 v1 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
1508 v1.AddArg(y)
1509 v.AddArg(v1)
1510 return true
1511 }
1512 }
1513 func rewriteValueWasm_OpEq32_0(v *Value) bool {
1514 b := v.Block
1515 typ := &b.Func.Config.Types
1516
1517
1518
1519 for {
1520 y := v.Args[1]
1521 x := v.Args[0]
1522 v.reset(OpWasmI64Eq)
1523 v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
1524 v0.AddArg(x)
1525 v.AddArg(v0)
1526 v1 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
1527 v1.AddArg(y)
1528 v.AddArg(v1)
1529 return true
1530 }
1531 }
1532 func rewriteValueWasm_OpEq32F_0(v *Value) bool {
1533 b := v.Block
1534 typ := &b.Func.Config.Types
1535
1536
1537
1538 for {
1539 y := v.Args[1]
1540 x := v.Args[0]
1541 v.reset(OpWasmF64Eq)
1542 v0 := b.NewValue0(v.Pos, OpWasmLoweredRound32F, typ.Float32)
1543 v0.AddArg(x)
1544 v.AddArg(v0)
1545 v1 := b.NewValue0(v.Pos, OpWasmLoweredRound32F, typ.Float32)
1546 v1.AddArg(y)
1547 v.AddArg(v1)
1548 return true
1549 }
1550 }
1551 func rewriteValueWasm_OpEq64_0(v *Value) bool {
1552
1553
1554
1555 for {
1556 y := v.Args[1]
1557 x := v.Args[0]
1558 v.reset(OpWasmI64Eq)
1559 v.AddArg(x)
1560 v.AddArg(y)
1561 return true
1562 }
1563 }
1564 func rewriteValueWasm_OpEq64F_0(v *Value) bool {
1565
1566
1567
1568 for {
1569 y := v.Args[1]
1570 x := v.Args[0]
1571 v.reset(OpWasmF64Eq)
1572 v.AddArg(x)
1573 v.AddArg(y)
1574 return true
1575 }
1576 }
1577 func rewriteValueWasm_OpEq8_0(v *Value) bool {
1578 b := v.Block
1579 typ := &b.Func.Config.Types
1580
1581
1582
1583 for {
1584 y := v.Args[1]
1585 x := v.Args[0]
1586 v.reset(OpWasmI64Eq)
1587 v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
1588 v0.AddArg(x)
1589 v.AddArg(v0)
1590 v1 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
1591 v1.AddArg(y)
1592 v.AddArg(v1)
1593 return true
1594 }
1595 }
1596 func rewriteValueWasm_OpEqB_0(v *Value) bool {
1597
1598
1599
1600 for {
1601 y := v.Args[1]
1602 x := v.Args[0]
1603 v.reset(OpWasmI64Eq)
1604 v.AddArg(x)
1605 v.AddArg(y)
1606 return true
1607 }
1608 }
1609 func rewriteValueWasm_OpEqPtr_0(v *Value) bool {
1610
1611
1612
1613 for {
1614 y := v.Args[1]
1615 x := v.Args[0]
1616 v.reset(OpWasmI64Eq)
1617 v.AddArg(x)
1618 v.AddArg(y)
1619 return true
1620 }
1621 }
1622 func rewriteValueWasm_OpFloor_0(v *Value) bool {
1623
1624
1625
1626 for {
1627 x := v.Args[0]
1628 v.reset(OpWasmF64Floor)
1629 v.AddArg(x)
1630 return true
1631 }
1632 }
1633 func rewriteValueWasm_OpGeq16_0(v *Value) bool {
1634 b := v.Block
1635 typ := &b.Func.Config.Types
1636
1637
1638
1639 for {
1640 y := v.Args[1]
1641 x := v.Args[0]
1642 v.reset(OpWasmI64GeS)
1643 v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
1644 v0.AddArg(x)
1645 v.AddArg(v0)
1646 v1 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
1647 v1.AddArg(y)
1648 v.AddArg(v1)
1649 return true
1650 }
1651 }
1652 func rewriteValueWasm_OpGeq16U_0(v *Value) bool {
1653 b := v.Block
1654 typ := &b.Func.Config.Types
1655
1656
1657
1658 for {
1659 y := v.Args[1]
1660 x := v.Args[0]
1661 v.reset(OpWasmI64GeU)
1662 v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
1663 v0.AddArg(x)
1664 v.AddArg(v0)
1665 v1 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
1666 v1.AddArg(y)
1667 v.AddArg(v1)
1668 return true
1669 }
1670 }
1671 func rewriteValueWasm_OpGeq32_0(v *Value) bool {
1672 b := v.Block
1673 typ := &b.Func.Config.Types
1674
1675
1676
1677 for {
1678 y := v.Args[1]
1679 x := v.Args[0]
1680 v.reset(OpWasmI64GeS)
1681 v0 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
1682 v0.AddArg(x)
1683 v.AddArg(v0)
1684 v1 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
1685 v1.AddArg(y)
1686 v.AddArg(v1)
1687 return true
1688 }
1689 }
1690 func rewriteValueWasm_OpGeq32F_0(v *Value) bool {
1691 b := v.Block
1692 typ := &b.Func.Config.Types
1693
1694
1695
1696 for {
1697 y := v.Args[1]
1698 x := v.Args[0]
1699 v.reset(OpWasmF64Ge)
1700 v0 := b.NewValue0(v.Pos, OpWasmLoweredRound32F, typ.Float32)
1701 v0.AddArg(x)
1702 v.AddArg(v0)
1703 v1 := b.NewValue0(v.Pos, OpWasmLoweredRound32F, typ.Float32)
1704 v1.AddArg(y)
1705 v.AddArg(v1)
1706 return true
1707 }
1708 }
1709 func rewriteValueWasm_OpGeq32U_0(v *Value) bool {
1710 b := v.Block
1711 typ := &b.Func.Config.Types
1712
1713
1714
1715 for {
1716 y := v.Args[1]
1717 x := v.Args[0]
1718 v.reset(OpWasmI64GeU)
1719 v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
1720 v0.AddArg(x)
1721 v.AddArg(v0)
1722 v1 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
1723 v1.AddArg(y)
1724 v.AddArg(v1)
1725 return true
1726 }
1727 }
1728 func rewriteValueWasm_OpGeq64_0(v *Value) bool {
1729
1730
1731
1732 for {
1733 y := v.Args[1]
1734 x := v.Args[0]
1735 v.reset(OpWasmI64GeS)
1736 v.AddArg(x)
1737 v.AddArg(y)
1738 return true
1739 }
1740 }
1741 func rewriteValueWasm_OpGeq64F_0(v *Value) bool {
1742
1743
1744
1745 for {
1746 y := v.Args[1]
1747 x := v.Args[0]
1748 v.reset(OpWasmF64Ge)
1749 v.AddArg(x)
1750 v.AddArg(y)
1751 return true
1752 }
1753 }
1754 func rewriteValueWasm_OpGeq64U_0(v *Value) bool {
1755
1756
1757
1758 for {
1759 y := v.Args[1]
1760 x := v.Args[0]
1761 v.reset(OpWasmI64GeU)
1762 v.AddArg(x)
1763 v.AddArg(y)
1764 return true
1765 }
1766 }
1767 func rewriteValueWasm_OpGeq8_0(v *Value) bool {
1768 b := v.Block
1769 typ := &b.Func.Config.Types
1770
1771
1772
1773 for {
1774 y := v.Args[1]
1775 x := v.Args[0]
1776 v.reset(OpWasmI64GeS)
1777 v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
1778 v0.AddArg(x)
1779 v.AddArg(v0)
1780 v1 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
1781 v1.AddArg(y)
1782 v.AddArg(v1)
1783 return true
1784 }
1785 }
1786 func rewriteValueWasm_OpGeq8U_0(v *Value) bool {
1787 b := v.Block
1788 typ := &b.Func.Config.Types
1789
1790
1791
1792 for {
1793 y := v.Args[1]
1794 x := v.Args[0]
1795 v.reset(OpWasmI64GeU)
1796 v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
1797 v0.AddArg(x)
1798 v.AddArg(v0)
1799 v1 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
1800 v1.AddArg(y)
1801 v.AddArg(v1)
1802 return true
1803 }
1804 }
1805 func rewriteValueWasm_OpGetCallerPC_0(v *Value) bool {
1806
1807
1808
1809 for {
1810 v.reset(OpWasmLoweredGetCallerPC)
1811 return true
1812 }
1813 }
1814 func rewriteValueWasm_OpGetCallerSP_0(v *Value) bool {
1815
1816
1817
1818 for {
1819 v.reset(OpWasmLoweredGetCallerSP)
1820 return true
1821 }
1822 }
1823 func rewriteValueWasm_OpGetClosurePtr_0(v *Value) bool {
1824
1825
1826
1827 for {
1828 v.reset(OpWasmLoweredGetClosurePtr)
1829 return true
1830 }
1831 }
1832 func rewriteValueWasm_OpGreater16_0(v *Value) bool {
1833 b := v.Block
1834 typ := &b.Func.Config.Types
1835
1836
1837
1838 for {
1839 y := v.Args[1]
1840 x := v.Args[0]
1841 v.reset(OpWasmI64GtS)
1842 v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
1843 v0.AddArg(x)
1844 v.AddArg(v0)
1845 v1 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
1846 v1.AddArg(y)
1847 v.AddArg(v1)
1848 return true
1849 }
1850 }
1851 func rewriteValueWasm_OpGreater16U_0(v *Value) bool {
1852 b := v.Block
1853 typ := &b.Func.Config.Types
1854
1855
1856
1857 for {
1858 y := v.Args[1]
1859 x := v.Args[0]
1860 v.reset(OpWasmI64GtU)
1861 v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
1862 v0.AddArg(x)
1863 v.AddArg(v0)
1864 v1 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
1865 v1.AddArg(y)
1866 v.AddArg(v1)
1867 return true
1868 }
1869 }
1870 func rewriteValueWasm_OpGreater32_0(v *Value) bool {
1871 b := v.Block
1872 typ := &b.Func.Config.Types
1873
1874
1875
1876 for {
1877 y := v.Args[1]
1878 x := v.Args[0]
1879 v.reset(OpWasmI64GtS)
1880 v0 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
1881 v0.AddArg(x)
1882 v.AddArg(v0)
1883 v1 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
1884 v1.AddArg(y)
1885 v.AddArg(v1)
1886 return true
1887 }
1888 }
1889 func rewriteValueWasm_OpGreater32F_0(v *Value) bool {
1890 b := v.Block
1891 typ := &b.Func.Config.Types
1892
1893
1894
1895 for {
1896 y := v.Args[1]
1897 x := v.Args[0]
1898 v.reset(OpWasmF64Gt)
1899 v0 := b.NewValue0(v.Pos, OpWasmLoweredRound32F, typ.Float32)
1900 v0.AddArg(x)
1901 v.AddArg(v0)
1902 v1 := b.NewValue0(v.Pos, OpWasmLoweredRound32F, typ.Float32)
1903 v1.AddArg(y)
1904 v.AddArg(v1)
1905 return true
1906 }
1907 }
1908 func rewriteValueWasm_OpGreater32U_0(v *Value) bool {
1909 b := v.Block
1910 typ := &b.Func.Config.Types
1911
1912
1913
1914 for {
1915 y := v.Args[1]
1916 x := v.Args[0]
1917 v.reset(OpWasmI64GtU)
1918 v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
1919 v0.AddArg(x)
1920 v.AddArg(v0)
1921 v1 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
1922 v1.AddArg(y)
1923 v.AddArg(v1)
1924 return true
1925 }
1926 }
1927 func rewriteValueWasm_OpGreater64_0(v *Value) bool {
1928
1929
1930
1931 for {
1932 y := v.Args[1]
1933 x := v.Args[0]
1934 v.reset(OpWasmI64GtS)
1935 v.AddArg(x)
1936 v.AddArg(y)
1937 return true
1938 }
1939 }
1940 func rewriteValueWasm_OpGreater64F_0(v *Value) bool {
1941
1942
1943
1944 for {
1945 y := v.Args[1]
1946 x := v.Args[0]
1947 v.reset(OpWasmF64Gt)
1948 v.AddArg(x)
1949 v.AddArg(y)
1950 return true
1951 }
1952 }
1953 func rewriteValueWasm_OpGreater64U_0(v *Value) bool {
1954
1955
1956
1957 for {
1958 y := v.Args[1]
1959 x := v.Args[0]
1960 v.reset(OpWasmI64GtU)
1961 v.AddArg(x)
1962 v.AddArg(y)
1963 return true
1964 }
1965 }
1966 func rewriteValueWasm_OpGreater8_0(v *Value) bool {
1967 b := v.Block
1968 typ := &b.Func.Config.Types
1969
1970
1971
1972 for {
1973 y := v.Args[1]
1974 x := v.Args[0]
1975 v.reset(OpWasmI64GtS)
1976 v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
1977 v0.AddArg(x)
1978 v.AddArg(v0)
1979 v1 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
1980 v1.AddArg(y)
1981 v.AddArg(v1)
1982 return true
1983 }
1984 }
1985 func rewriteValueWasm_OpGreater8U_0(v *Value) bool {
1986 b := v.Block
1987 typ := &b.Func.Config.Types
1988
1989
1990
1991 for {
1992 y := v.Args[1]
1993 x := v.Args[0]
1994 v.reset(OpWasmI64GtU)
1995 v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
1996 v0.AddArg(x)
1997 v.AddArg(v0)
1998 v1 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
1999 v1.AddArg(y)
2000 v.AddArg(v1)
2001 return true
2002 }
2003 }
2004 func rewriteValueWasm_OpInterCall_0(v *Value) bool {
2005
2006
2007
2008 for {
2009 argwid := v.AuxInt
2010 mem := v.Args[1]
2011 entry := v.Args[0]
2012 v.reset(OpWasmLoweredInterCall)
2013 v.AuxInt = argwid
2014 v.AddArg(entry)
2015 v.AddArg(mem)
2016 return true
2017 }
2018 }
2019 func rewriteValueWasm_OpIsInBounds_0(v *Value) bool {
2020
2021
2022
2023 for {
2024 len := v.Args[1]
2025 idx := v.Args[0]
2026 v.reset(OpWasmI64LtU)
2027 v.AddArg(idx)
2028 v.AddArg(len)
2029 return true
2030 }
2031 }
2032 func rewriteValueWasm_OpIsNonNil_0(v *Value) bool {
2033 b := v.Block
2034 typ := &b.Func.Config.Types
2035
2036
2037
2038 for {
2039 p := v.Args[0]
2040 v.reset(OpWasmI64Eqz)
2041 v0 := b.NewValue0(v.Pos, OpWasmI64Eqz, typ.Bool)
2042 v0.AddArg(p)
2043 v.AddArg(v0)
2044 return true
2045 }
2046 }
2047 func rewriteValueWasm_OpIsSliceInBounds_0(v *Value) bool {
2048
2049
2050
2051 for {
2052 len := v.Args[1]
2053 idx := v.Args[0]
2054 v.reset(OpWasmI64LeU)
2055 v.AddArg(idx)
2056 v.AddArg(len)
2057 return true
2058 }
2059 }
2060 func rewriteValueWasm_OpLeq16_0(v *Value) bool {
2061 b := v.Block
2062 typ := &b.Func.Config.Types
2063
2064
2065
2066 for {
2067 y := v.Args[1]
2068 x := v.Args[0]
2069 v.reset(OpWasmI64LeS)
2070 v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
2071 v0.AddArg(x)
2072 v.AddArg(v0)
2073 v1 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
2074 v1.AddArg(y)
2075 v.AddArg(v1)
2076 return true
2077 }
2078 }
2079 func rewriteValueWasm_OpLeq16U_0(v *Value) bool {
2080 b := v.Block
2081 typ := &b.Func.Config.Types
2082
2083
2084
2085 for {
2086 y := v.Args[1]
2087 x := v.Args[0]
2088 v.reset(OpWasmI64LeU)
2089 v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
2090 v0.AddArg(x)
2091 v.AddArg(v0)
2092 v1 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
2093 v1.AddArg(y)
2094 v.AddArg(v1)
2095 return true
2096 }
2097 }
2098 func rewriteValueWasm_OpLeq32_0(v *Value) bool {
2099 b := v.Block
2100 typ := &b.Func.Config.Types
2101
2102
2103
2104 for {
2105 y := v.Args[1]
2106 x := v.Args[0]
2107 v.reset(OpWasmI64LeS)
2108 v0 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
2109 v0.AddArg(x)
2110 v.AddArg(v0)
2111 v1 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
2112 v1.AddArg(y)
2113 v.AddArg(v1)
2114 return true
2115 }
2116 }
2117 func rewriteValueWasm_OpLeq32F_0(v *Value) bool {
2118 b := v.Block
2119 typ := &b.Func.Config.Types
2120
2121
2122
2123 for {
2124 y := v.Args[1]
2125 x := v.Args[0]
2126 v.reset(OpWasmF64Le)
2127 v0 := b.NewValue0(v.Pos, OpWasmLoweredRound32F, typ.Float32)
2128 v0.AddArg(x)
2129 v.AddArg(v0)
2130 v1 := b.NewValue0(v.Pos, OpWasmLoweredRound32F, typ.Float32)
2131 v1.AddArg(y)
2132 v.AddArg(v1)
2133 return true
2134 }
2135 }
2136 func rewriteValueWasm_OpLeq32U_0(v *Value) bool {
2137 b := v.Block
2138 typ := &b.Func.Config.Types
2139
2140
2141
2142 for {
2143 y := v.Args[1]
2144 x := v.Args[0]
2145 v.reset(OpWasmI64LeU)
2146 v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
2147 v0.AddArg(x)
2148 v.AddArg(v0)
2149 v1 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
2150 v1.AddArg(y)
2151 v.AddArg(v1)
2152 return true
2153 }
2154 }
2155 func rewriteValueWasm_OpLeq64_0(v *Value) bool {
2156
2157
2158
2159 for {
2160 y := v.Args[1]
2161 x := v.Args[0]
2162 v.reset(OpWasmI64LeS)
2163 v.AddArg(x)
2164 v.AddArg(y)
2165 return true
2166 }
2167 }
2168 func rewriteValueWasm_OpLeq64F_0(v *Value) bool {
2169
2170
2171
2172 for {
2173 y := v.Args[1]
2174 x := v.Args[0]
2175 v.reset(OpWasmF64Le)
2176 v.AddArg(x)
2177 v.AddArg(y)
2178 return true
2179 }
2180 }
2181 func rewriteValueWasm_OpLeq64U_0(v *Value) bool {
2182
2183
2184
2185 for {
2186 y := v.Args[1]
2187 x := v.Args[0]
2188 v.reset(OpWasmI64LeU)
2189 v.AddArg(x)
2190 v.AddArg(y)
2191 return true
2192 }
2193 }
2194 func rewriteValueWasm_OpLeq8_0(v *Value) bool {
2195 b := v.Block
2196 typ := &b.Func.Config.Types
2197
2198
2199
2200 for {
2201 y := v.Args[1]
2202 x := v.Args[0]
2203 v.reset(OpWasmI64LeS)
2204 v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
2205 v0.AddArg(x)
2206 v.AddArg(v0)
2207 v1 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
2208 v1.AddArg(y)
2209 v.AddArg(v1)
2210 return true
2211 }
2212 }
2213 func rewriteValueWasm_OpLeq8U_0(v *Value) bool {
2214 b := v.Block
2215 typ := &b.Func.Config.Types
2216
2217
2218
2219 for {
2220 y := v.Args[1]
2221 x := v.Args[0]
2222 v.reset(OpWasmI64LeU)
2223 v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
2224 v0.AddArg(x)
2225 v.AddArg(v0)
2226 v1 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
2227 v1.AddArg(y)
2228 v.AddArg(v1)
2229 return true
2230 }
2231 }
2232 func rewriteValueWasm_OpLess16_0(v *Value) bool {
2233 b := v.Block
2234 typ := &b.Func.Config.Types
2235
2236
2237
2238 for {
2239 y := v.Args[1]
2240 x := v.Args[0]
2241 v.reset(OpWasmI64LtS)
2242 v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
2243 v0.AddArg(x)
2244 v.AddArg(v0)
2245 v1 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
2246 v1.AddArg(y)
2247 v.AddArg(v1)
2248 return true
2249 }
2250 }
2251 func rewriteValueWasm_OpLess16U_0(v *Value) bool {
2252 b := v.Block
2253 typ := &b.Func.Config.Types
2254
2255
2256
2257 for {
2258 y := v.Args[1]
2259 x := v.Args[0]
2260 v.reset(OpWasmI64LtU)
2261 v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
2262 v0.AddArg(x)
2263 v.AddArg(v0)
2264 v1 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
2265 v1.AddArg(y)
2266 v.AddArg(v1)
2267 return true
2268 }
2269 }
2270 func rewriteValueWasm_OpLess32_0(v *Value) bool {
2271 b := v.Block
2272 typ := &b.Func.Config.Types
2273
2274
2275
2276 for {
2277 y := v.Args[1]
2278 x := v.Args[0]
2279 v.reset(OpWasmI64LtS)
2280 v0 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
2281 v0.AddArg(x)
2282 v.AddArg(v0)
2283 v1 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
2284 v1.AddArg(y)
2285 v.AddArg(v1)
2286 return true
2287 }
2288 }
2289 func rewriteValueWasm_OpLess32F_0(v *Value) bool {
2290 b := v.Block
2291 typ := &b.Func.Config.Types
2292
2293
2294
2295 for {
2296 y := v.Args[1]
2297 x := v.Args[0]
2298 v.reset(OpWasmF64Lt)
2299 v0 := b.NewValue0(v.Pos, OpWasmLoweredRound32F, typ.Float32)
2300 v0.AddArg(x)
2301 v.AddArg(v0)
2302 v1 := b.NewValue0(v.Pos, OpWasmLoweredRound32F, typ.Float32)
2303 v1.AddArg(y)
2304 v.AddArg(v1)
2305 return true
2306 }
2307 }
2308 func rewriteValueWasm_OpLess32U_0(v *Value) bool {
2309 b := v.Block
2310 typ := &b.Func.Config.Types
2311
2312
2313
2314 for {
2315 y := v.Args[1]
2316 x := v.Args[0]
2317 v.reset(OpWasmI64LtU)
2318 v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
2319 v0.AddArg(x)
2320 v.AddArg(v0)
2321 v1 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
2322 v1.AddArg(y)
2323 v.AddArg(v1)
2324 return true
2325 }
2326 }
2327 func rewriteValueWasm_OpLess64_0(v *Value) bool {
2328
2329
2330
2331 for {
2332 y := v.Args[1]
2333 x := v.Args[0]
2334 v.reset(OpWasmI64LtS)
2335 v.AddArg(x)
2336 v.AddArg(y)
2337 return true
2338 }
2339 }
2340 func rewriteValueWasm_OpLess64F_0(v *Value) bool {
2341
2342
2343
2344 for {
2345 y := v.Args[1]
2346 x := v.Args[0]
2347 v.reset(OpWasmF64Lt)
2348 v.AddArg(x)
2349 v.AddArg(y)
2350 return true
2351 }
2352 }
2353 func rewriteValueWasm_OpLess64U_0(v *Value) bool {
2354
2355
2356
2357 for {
2358 y := v.Args[1]
2359 x := v.Args[0]
2360 v.reset(OpWasmI64LtU)
2361 v.AddArg(x)
2362 v.AddArg(y)
2363 return true
2364 }
2365 }
2366 func rewriteValueWasm_OpLess8_0(v *Value) bool {
2367 b := v.Block
2368 typ := &b.Func.Config.Types
2369
2370
2371
2372 for {
2373 y := v.Args[1]
2374 x := v.Args[0]
2375 v.reset(OpWasmI64LtS)
2376 v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
2377 v0.AddArg(x)
2378 v.AddArg(v0)
2379 v1 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
2380 v1.AddArg(y)
2381 v.AddArg(v1)
2382 return true
2383 }
2384 }
2385 func rewriteValueWasm_OpLess8U_0(v *Value) bool {
2386 b := v.Block
2387 typ := &b.Func.Config.Types
2388
2389
2390
2391 for {
2392 y := v.Args[1]
2393 x := v.Args[0]
2394 v.reset(OpWasmI64LtU)
2395 v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
2396 v0.AddArg(x)
2397 v.AddArg(v0)
2398 v1 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
2399 v1.AddArg(y)
2400 v.AddArg(v1)
2401 return true
2402 }
2403 }
2404 func rewriteValueWasm_OpLoad_0(v *Value) bool {
2405
2406
2407
2408 for {
2409 t := v.Type
2410 mem := v.Args[1]
2411 ptr := v.Args[0]
2412 if !(is32BitFloat(t)) {
2413 break
2414 }
2415 v.reset(OpWasmF32Load)
2416 v.AddArg(ptr)
2417 v.AddArg(mem)
2418 return true
2419 }
2420
2421
2422
2423 for {
2424 t := v.Type
2425 mem := v.Args[1]
2426 ptr := v.Args[0]
2427 if !(is64BitFloat(t)) {
2428 break
2429 }
2430 v.reset(OpWasmF64Load)
2431 v.AddArg(ptr)
2432 v.AddArg(mem)
2433 return true
2434 }
2435
2436
2437
2438 for {
2439 t := v.Type
2440 mem := v.Args[1]
2441 ptr := v.Args[0]
2442 if !(t.Size() == 8) {
2443 break
2444 }
2445 v.reset(OpWasmI64Load)
2446 v.AddArg(ptr)
2447 v.AddArg(mem)
2448 return true
2449 }
2450
2451
2452
2453 for {
2454 t := v.Type
2455 mem := v.Args[1]
2456 ptr := v.Args[0]
2457 if !(t.Size() == 4 && !t.IsSigned()) {
2458 break
2459 }
2460 v.reset(OpWasmI64Load32U)
2461 v.AddArg(ptr)
2462 v.AddArg(mem)
2463 return true
2464 }
2465
2466
2467
2468 for {
2469 t := v.Type
2470 mem := v.Args[1]
2471 ptr := v.Args[0]
2472 if !(t.Size() == 4 && t.IsSigned()) {
2473 break
2474 }
2475 v.reset(OpWasmI64Load32S)
2476 v.AddArg(ptr)
2477 v.AddArg(mem)
2478 return true
2479 }
2480
2481
2482
2483 for {
2484 t := v.Type
2485 mem := v.Args[1]
2486 ptr := v.Args[0]
2487 if !(t.Size() == 2 && !t.IsSigned()) {
2488 break
2489 }
2490 v.reset(OpWasmI64Load16U)
2491 v.AddArg(ptr)
2492 v.AddArg(mem)
2493 return true
2494 }
2495
2496
2497
2498 for {
2499 t := v.Type
2500 mem := v.Args[1]
2501 ptr := v.Args[0]
2502 if !(t.Size() == 2 && t.IsSigned()) {
2503 break
2504 }
2505 v.reset(OpWasmI64Load16S)
2506 v.AddArg(ptr)
2507 v.AddArg(mem)
2508 return true
2509 }
2510
2511
2512
2513 for {
2514 t := v.Type
2515 mem := v.Args[1]
2516 ptr := v.Args[0]
2517 if !(t.Size() == 1 && !t.IsSigned()) {
2518 break
2519 }
2520 v.reset(OpWasmI64Load8U)
2521 v.AddArg(ptr)
2522 v.AddArg(mem)
2523 return true
2524 }
2525
2526
2527
2528 for {
2529 t := v.Type
2530 mem := v.Args[1]
2531 ptr := v.Args[0]
2532 if !(t.Size() == 1 && t.IsSigned()) {
2533 break
2534 }
2535 v.reset(OpWasmI64Load8S)
2536 v.AddArg(ptr)
2537 v.AddArg(mem)
2538 return true
2539 }
2540 return false
2541 }
2542 func rewriteValueWasm_OpLocalAddr_0(v *Value) bool {
2543
2544
2545
2546 for {
2547 sym := v.Aux
2548 _ = v.Args[1]
2549 base := v.Args[0]
2550 v.reset(OpWasmLoweredAddr)
2551 v.Aux = sym
2552 v.AddArg(base)
2553 return true
2554 }
2555 }
2556 func rewriteValueWasm_OpLsh16x16_0(v *Value) bool {
2557 b := v.Block
2558 typ := &b.Func.Config.Types
2559
2560
2561
2562 for {
2563 y := v.Args[1]
2564 x := v.Args[0]
2565 v.reset(OpLsh64x64)
2566 v.AddArg(x)
2567 v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
2568 v0.AddArg(y)
2569 v.AddArg(v0)
2570 return true
2571 }
2572 }
2573 func rewriteValueWasm_OpLsh16x32_0(v *Value) bool {
2574 b := v.Block
2575 typ := &b.Func.Config.Types
2576
2577
2578
2579 for {
2580 y := v.Args[1]
2581 x := v.Args[0]
2582 v.reset(OpLsh64x64)
2583 v.AddArg(x)
2584 v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
2585 v0.AddArg(y)
2586 v.AddArg(v0)
2587 return true
2588 }
2589 }
2590 func rewriteValueWasm_OpLsh16x64_0(v *Value) bool {
2591
2592
2593
2594 for {
2595 y := v.Args[1]
2596 x := v.Args[0]
2597 v.reset(OpLsh64x64)
2598 v.AddArg(x)
2599 v.AddArg(y)
2600 return true
2601 }
2602 }
2603 func rewriteValueWasm_OpLsh16x8_0(v *Value) bool {
2604 b := v.Block
2605 typ := &b.Func.Config.Types
2606
2607
2608
2609 for {
2610 y := v.Args[1]
2611 x := v.Args[0]
2612 v.reset(OpLsh64x64)
2613 v.AddArg(x)
2614 v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
2615 v0.AddArg(y)
2616 v.AddArg(v0)
2617 return true
2618 }
2619 }
2620 func rewriteValueWasm_OpLsh32x16_0(v *Value) bool {
2621 b := v.Block
2622 typ := &b.Func.Config.Types
2623
2624
2625
2626 for {
2627 y := v.Args[1]
2628 x := v.Args[0]
2629 v.reset(OpLsh64x64)
2630 v.AddArg(x)
2631 v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
2632 v0.AddArg(y)
2633 v.AddArg(v0)
2634 return true
2635 }
2636 }
2637 func rewriteValueWasm_OpLsh32x32_0(v *Value) bool {
2638 b := v.Block
2639 typ := &b.Func.Config.Types
2640
2641
2642
2643 for {
2644 y := v.Args[1]
2645 x := v.Args[0]
2646 v.reset(OpLsh64x64)
2647 v.AddArg(x)
2648 v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
2649 v0.AddArg(y)
2650 v.AddArg(v0)
2651 return true
2652 }
2653 }
2654 func rewriteValueWasm_OpLsh32x64_0(v *Value) bool {
2655
2656
2657
2658 for {
2659 y := v.Args[1]
2660 x := v.Args[0]
2661 v.reset(OpLsh64x64)
2662 v.AddArg(x)
2663 v.AddArg(y)
2664 return true
2665 }
2666 }
2667 func rewriteValueWasm_OpLsh32x8_0(v *Value) bool {
2668 b := v.Block
2669 typ := &b.Func.Config.Types
2670
2671
2672
2673 for {
2674 y := v.Args[1]
2675 x := v.Args[0]
2676 v.reset(OpLsh64x64)
2677 v.AddArg(x)
2678 v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
2679 v0.AddArg(y)
2680 v.AddArg(v0)
2681 return true
2682 }
2683 }
2684 func rewriteValueWasm_OpLsh64x16_0(v *Value) bool {
2685 b := v.Block
2686 typ := &b.Func.Config.Types
2687
2688
2689
2690 for {
2691 y := v.Args[1]
2692 x := v.Args[0]
2693 v.reset(OpLsh64x64)
2694 v.AddArg(x)
2695 v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
2696 v0.AddArg(y)
2697 v.AddArg(v0)
2698 return true
2699 }
2700 }
2701 func rewriteValueWasm_OpLsh64x32_0(v *Value) bool {
2702 b := v.Block
2703 typ := &b.Func.Config.Types
2704
2705
2706
2707 for {
2708 y := v.Args[1]
2709 x := v.Args[0]
2710 v.reset(OpLsh64x64)
2711 v.AddArg(x)
2712 v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
2713 v0.AddArg(y)
2714 v.AddArg(v0)
2715 return true
2716 }
2717 }
2718 func rewriteValueWasm_OpLsh64x64_0(v *Value) bool {
2719 b := v.Block
2720 typ := &b.Func.Config.Types
2721
2722
2723
2724 for {
2725 y := v.Args[1]
2726 x := v.Args[0]
2727 v.reset(OpWasmSelect)
2728 v0 := b.NewValue0(v.Pos, OpWasmI64Shl, typ.Int64)
2729 v0.AddArg(x)
2730 v0.AddArg(y)
2731 v.AddArg(v0)
2732 v1 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
2733 v1.AuxInt = 0
2734 v.AddArg(v1)
2735 v2 := b.NewValue0(v.Pos, OpWasmI64LtU, typ.Bool)
2736 v2.AddArg(y)
2737 v3 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
2738 v3.AuxInt = 64
2739 v2.AddArg(v3)
2740 v.AddArg(v2)
2741 return true
2742 }
2743 }
2744 func rewriteValueWasm_OpLsh64x8_0(v *Value) bool {
2745 b := v.Block
2746 typ := &b.Func.Config.Types
2747
2748
2749
2750 for {
2751 y := v.Args[1]
2752 x := v.Args[0]
2753 v.reset(OpLsh64x64)
2754 v.AddArg(x)
2755 v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
2756 v0.AddArg(y)
2757 v.AddArg(v0)
2758 return true
2759 }
2760 }
2761 func rewriteValueWasm_OpLsh8x16_0(v *Value) bool {
2762 b := v.Block
2763 typ := &b.Func.Config.Types
2764
2765
2766
2767 for {
2768 y := v.Args[1]
2769 x := v.Args[0]
2770 v.reset(OpLsh64x64)
2771 v.AddArg(x)
2772 v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
2773 v0.AddArg(y)
2774 v.AddArg(v0)
2775 return true
2776 }
2777 }
2778 func rewriteValueWasm_OpLsh8x32_0(v *Value) bool {
2779 b := v.Block
2780 typ := &b.Func.Config.Types
2781
2782
2783
2784 for {
2785 y := v.Args[1]
2786 x := v.Args[0]
2787 v.reset(OpLsh64x64)
2788 v.AddArg(x)
2789 v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
2790 v0.AddArg(y)
2791 v.AddArg(v0)
2792 return true
2793 }
2794 }
2795 func rewriteValueWasm_OpLsh8x64_0(v *Value) bool {
2796
2797
2798
2799 for {
2800 y := v.Args[1]
2801 x := v.Args[0]
2802 v.reset(OpLsh64x64)
2803 v.AddArg(x)
2804 v.AddArg(y)
2805 return true
2806 }
2807 }
2808 func rewriteValueWasm_OpLsh8x8_0(v *Value) bool {
2809 b := v.Block
2810 typ := &b.Func.Config.Types
2811
2812
2813
2814 for {
2815 y := v.Args[1]
2816 x := v.Args[0]
2817 v.reset(OpLsh64x64)
2818 v.AddArg(x)
2819 v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
2820 v0.AddArg(y)
2821 v.AddArg(v0)
2822 return true
2823 }
2824 }
2825 func rewriteValueWasm_OpMod16_0(v *Value) bool {
2826 b := v.Block
2827 typ := &b.Func.Config.Types
2828
2829
2830
2831 for {
2832 y := v.Args[1]
2833 x := v.Args[0]
2834 v.reset(OpWasmI64RemS)
2835 v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
2836 v0.AddArg(x)
2837 v.AddArg(v0)
2838 v1 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
2839 v1.AddArg(y)
2840 v.AddArg(v1)
2841 return true
2842 }
2843 }
2844 func rewriteValueWasm_OpMod16u_0(v *Value) bool {
2845 b := v.Block
2846 typ := &b.Func.Config.Types
2847
2848
2849
2850 for {
2851 y := v.Args[1]
2852 x := v.Args[0]
2853 v.reset(OpWasmI64RemU)
2854 v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
2855 v0.AddArg(x)
2856 v.AddArg(v0)
2857 v1 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
2858 v1.AddArg(y)
2859 v.AddArg(v1)
2860 return true
2861 }
2862 }
2863 func rewriteValueWasm_OpMod32_0(v *Value) bool {
2864 b := v.Block
2865 typ := &b.Func.Config.Types
2866
2867
2868
2869 for {
2870 y := v.Args[1]
2871 x := v.Args[0]
2872 v.reset(OpWasmI64RemS)
2873 v0 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
2874 v0.AddArg(x)
2875 v.AddArg(v0)
2876 v1 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
2877 v1.AddArg(y)
2878 v.AddArg(v1)
2879 return true
2880 }
2881 }
2882 func rewriteValueWasm_OpMod32u_0(v *Value) bool {
2883 b := v.Block
2884 typ := &b.Func.Config.Types
2885
2886
2887
2888 for {
2889 y := v.Args[1]
2890 x := v.Args[0]
2891 v.reset(OpWasmI64RemU)
2892 v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
2893 v0.AddArg(x)
2894 v.AddArg(v0)
2895 v1 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
2896 v1.AddArg(y)
2897 v.AddArg(v1)
2898 return true
2899 }
2900 }
2901 func rewriteValueWasm_OpMod64_0(v *Value) bool {
2902
2903
2904
2905 for {
2906 y := v.Args[1]
2907 x := v.Args[0]
2908 v.reset(OpWasmI64RemS)
2909 v.AddArg(x)
2910 v.AddArg(y)
2911 return true
2912 }
2913 }
2914 func rewriteValueWasm_OpMod64u_0(v *Value) bool {
2915
2916
2917
2918 for {
2919 y := v.Args[1]
2920 x := v.Args[0]
2921 v.reset(OpWasmI64RemU)
2922 v.AddArg(x)
2923 v.AddArg(y)
2924 return true
2925 }
2926 }
2927 func rewriteValueWasm_OpMod8_0(v *Value) bool {
2928 b := v.Block
2929 typ := &b.Func.Config.Types
2930
2931
2932
2933 for {
2934 y := v.Args[1]
2935 x := v.Args[0]
2936 v.reset(OpWasmI64RemS)
2937 v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
2938 v0.AddArg(x)
2939 v.AddArg(v0)
2940 v1 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
2941 v1.AddArg(y)
2942 v.AddArg(v1)
2943 return true
2944 }
2945 }
2946 func rewriteValueWasm_OpMod8u_0(v *Value) bool {
2947 b := v.Block
2948 typ := &b.Func.Config.Types
2949
2950
2951
2952 for {
2953 y := v.Args[1]
2954 x := v.Args[0]
2955 v.reset(OpWasmI64RemU)
2956 v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
2957 v0.AddArg(x)
2958 v.AddArg(v0)
2959 v1 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
2960 v1.AddArg(y)
2961 v.AddArg(v1)
2962 return true
2963 }
2964 }
2965 func rewriteValueWasm_OpMove_0(v *Value) bool {
2966 b := v.Block
2967 typ := &b.Func.Config.Types
2968
2969
2970
2971 for {
2972 if v.AuxInt != 0 {
2973 break
2974 }
2975 mem := v.Args[2]
2976 v.reset(OpCopy)
2977 v.Type = mem.Type
2978 v.AddArg(mem)
2979 return true
2980 }
2981
2982
2983
2984 for {
2985 if v.AuxInt != 1 {
2986 break
2987 }
2988 mem := v.Args[2]
2989 dst := v.Args[0]
2990 src := v.Args[1]
2991 v.reset(OpWasmI64Store8)
2992 v.AddArg(dst)
2993 v0 := b.NewValue0(v.Pos, OpWasmI64Load8U, typ.UInt8)
2994 v0.AddArg(src)
2995 v0.AddArg(mem)
2996 v.AddArg(v0)
2997 v.AddArg(mem)
2998 return true
2999 }
3000
3001
3002
3003 for {
3004 if v.AuxInt != 2 {
3005 break
3006 }
3007 mem := v.Args[2]
3008 dst := v.Args[0]
3009 src := v.Args[1]
3010 v.reset(OpWasmI64Store16)
3011 v.AddArg(dst)
3012 v0 := b.NewValue0(v.Pos, OpWasmI64Load16U, typ.UInt16)
3013 v0.AddArg(src)
3014 v0.AddArg(mem)
3015 v.AddArg(v0)
3016 v.AddArg(mem)
3017 return true
3018 }
3019
3020
3021
3022 for {
3023 if v.AuxInt != 4 {
3024 break
3025 }
3026 mem := v.Args[2]
3027 dst := v.Args[0]
3028 src := v.Args[1]
3029 v.reset(OpWasmI64Store32)
3030 v.AddArg(dst)
3031 v0 := b.NewValue0(v.Pos, OpWasmI64Load32U, typ.UInt32)
3032 v0.AddArg(src)
3033 v0.AddArg(mem)
3034 v.AddArg(v0)
3035 v.AddArg(mem)
3036 return true
3037 }
3038
3039
3040
3041 for {
3042 if v.AuxInt != 8 {
3043 break
3044 }
3045 mem := v.Args[2]
3046 dst := v.Args[0]
3047 src := v.Args[1]
3048 v.reset(OpWasmI64Store)
3049 v.AddArg(dst)
3050 v0 := b.NewValue0(v.Pos, OpWasmI64Load, typ.UInt64)
3051 v0.AddArg(src)
3052 v0.AddArg(mem)
3053 v.AddArg(v0)
3054 v.AddArg(mem)
3055 return true
3056 }
3057
3058
3059
3060 for {
3061 if v.AuxInt != 16 {
3062 break
3063 }
3064 mem := v.Args[2]
3065 dst := v.Args[0]
3066 src := v.Args[1]
3067 v.reset(OpWasmI64Store)
3068 v.AuxInt = 8
3069 v.AddArg(dst)
3070 v0 := b.NewValue0(v.Pos, OpWasmI64Load, typ.UInt64)
3071 v0.AuxInt = 8
3072 v0.AddArg(src)
3073 v0.AddArg(mem)
3074 v.AddArg(v0)
3075 v1 := b.NewValue0(v.Pos, OpWasmI64Store, types.TypeMem)
3076 v1.AddArg(dst)
3077 v2 := b.NewValue0(v.Pos, OpWasmI64Load, typ.UInt64)
3078 v2.AddArg(src)
3079 v2.AddArg(mem)
3080 v1.AddArg(v2)
3081 v1.AddArg(mem)
3082 v.AddArg(v1)
3083 return true
3084 }
3085
3086
3087
3088 for {
3089 if v.AuxInt != 3 {
3090 break
3091 }
3092 mem := v.Args[2]
3093 dst := v.Args[0]
3094 src := v.Args[1]
3095 v.reset(OpWasmI64Store8)
3096 v.AuxInt = 2
3097 v.AddArg(dst)
3098 v0 := b.NewValue0(v.Pos, OpWasmI64Load8U, typ.UInt8)
3099 v0.AuxInt = 2
3100 v0.AddArg(src)
3101 v0.AddArg(mem)
3102 v.AddArg(v0)
3103 v1 := b.NewValue0(v.Pos, OpWasmI64Store16, types.TypeMem)
3104 v1.AddArg(dst)
3105 v2 := b.NewValue0(v.Pos, OpWasmI64Load16U, typ.UInt16)
3106 v2.AddArg(src)
3107 v2.AddArg(mem)
3108 v1.AddArg(v2)
3109 v1.AddArg(mem)
3110 v.AddArg(v1)
3111 return true
3112 }
3113
3114
3115
3116 for {
3117 if v.AuxInt != 5 {
3118 break
3119 }
3120 mem := v.Args[2]
3121 dst := v.Args[0]
3122 src := v.Args[1]
3123 v.reset(OpWasmI64Store8)
3124 v.AuxInt = 4
3125 v.AddArg(dst)
3126 v0 := b.NewValue0(v.Pos, OpWasmI64Load8U, typ.UInt8)
3127 v0.AuxInt = 4
3128 v0.AddArg(src)
3129 v0.AddArg(mem)
3130 v.AddArg(v0)
3131 v1 := b.NewValue0(v.Pos, OpWasmI64Store32, types.TypeMem)
3132 v1.AddArg(dst)
3133 v2 := b.NewValue0(v.Pos, OpWasmI64Load32U, typ.UInt32)
3134 v2.AddArg(src)
3135 v2.AddArg(mem)
3136 v1.AddArg(v2)
3137 v1.AddArg(mem)
3138 v.AddArg(v1)
3139 return true
3140 }
3141
3142
3143
3144 for {
3145 if v.AuxInt != 6 {
3146 break
3147 }
3148 mem := v.Args[2]
3149 dst := v.Args[0]
3150 src := v.Args[1]
3151 v.reset(OpWasmI64Store16)
3152 v.AuxInt = 4
3153 v.AddArg(dst)
3154 v0 := b.NewValue0(v.Pos, OpWasmI64Load16U, typ.UInt16)
3155 v0.AuxInt = 4
3156 v0.AddArg(src)
3157 v0.AddArg(mem)
3158 v.AddArg(v0)
3159 v1 := b.NewValue0(v.Pos, OpWasmI64Store32, types.TypeMem)
3160 v1.AddArg(dst)
3161 v2 := b.NewValue0(v.Pos, OpWasmI64Load32U, typ.UInt32)
3162 v2.AddArg(src)
3163 v2.AddArg(mem)
3164 v1.AddArg(v2)
3165 v1.AddArg(mem)
3166 v.AddArg(v1)
3167 return true
3168 }
3169
3170
3171
3172 for {
3173 if v.AuxInt != 7 {
3174 break
3175 }
3176 mem := v.Args[2]
3177 dst := v.Args[0]
3178 src := v.Args[1]
3179 v.reset(OpWasmI64Store32)
3180 v.AuxInt = 3
3181 v.AddArg(dst)
3182 v0 := b.NewValue0(v.Pos, OpWasmI64Load32U, typ.UInt32)
3183 v0.AuxInt = 3
3184 v0.AddArg(src)
3185 v0.AddArg(mem)
3186 v.AddArg(v0)
3187 v1 := b.NewValue0(v.Pos, OpWasmI64Store32, types.TypeMem)
3188 v1.AddArg(dst)
3189 v2 := b.NewValue0(v.Pos, OpWasmI64Load32U, typ.UInt32)
3190 v2.AddArg(src)
3191 v2.AddArg(mem)
3192 v1.AddArg(v2)
3193 v1.AddArg(mem)
3194 v.AddArg(v1)
3195 return true
3196 }
3197 return false
3198 }
3199 func rewriteValueWasm_OpMove_10(v *Value) bool {
3200 b := v.Block
3201 typ := &b.Func.Config.Types
3202
3203
3204
3205 for {
3206 s := v.AuxInt
3207 mem := v.Args[2]
3208 dst := v.Args[0]
3209 src := v.Args[1]
3210 if !(s > 8 && s < 16) {
3211 break
3212 }
3213 v.reset(OpWasmI64Store)
3214 v.AuxInt = s - 8
3215 v.AddArg(dst)
3216 v0 := b.NewValue0(v.Pos, OpWasmI64Load, typ.UInt64)
3217 v0.AuxInt = s - 8
3218 v0.AddArg(src)
3219 v0.AddArg(mem)
3220 v.AddArg(v0)
3221 v1 := b.NewValue0(v.Pos, OpWasmI64Store, types.TypeMem)
3222 v1.AddArg(dst)
3223 v2 := b.NewValue0(v.Pos, OpWasmI64Load, typ.UInt64)
3224 v2.AddArg(src)
3225 v2.AddArg(mem)
3226 v1.AddArg(v2)
3227 v1.AddArg(mem)
3228 v.AddArg(v1)
3229 return true
3230 }
3231
3232
3233
3234 for {
3235 s := v.AuxInt
3236 mem := v.Args[2]
3237 dst := v.Args[0]
3238 src := v.Args[1]
3239 if !(s > 16 && s%16 != 0 && s%16 <= 8) {
3240 break
3241 }
3242 v.reset(OpMove)
3243 v.AuxInt = s - s%16
3244 v0 := b.NewValue0(v.Pos, OpOffPtr, dst.Type)
3245 v0.AuxInt = s % 16
3246 v0.AddArg(dst)
3247 v.AddArg(v0)
3248 v1 := b.NewValue0(v.Pos, OpOffPtr, src.Type)
3249 v1.AuxInt = s % 16
3250 v1.AddArg(src)
3251 v.AddArg(v1)
3252 v2 := b.NewValue0(v.Pos, OpWasmI64Store, types.TypeMem)
3253 v2.AddArg(dst)
3254 v3 := b.NewValue0(v.Pos, OpWasmI64Load, typ.UInt64)
3255 v3.AddArg(src)
3256 v3.AddArg(mem)
3257 v2.AddArg(v3)
3258 v2.AddArg(mem)
3259 v.AddArg(v2)
3260 return true
3261 }
3262
3263
3264
3265 for {
3266 s := v.AuxInt
3267 mem := v.Args[2]
3268 dst := v.Args[0]
3269 src := v.Args[1]
3270 if !(s > 16 && s%16 != 0 && s%16 > 8) {
3271 break
3272 }
3273 v.reset(OpMove)
3274 v.AuxInt = s - s%16
3275 v0 := b.NewValue0(v.Pos, OpOffPtr, dst.Type)
3276 v0.AuxInt = s % 16
3277 v0.AddArg(dst)
3278 v.AddArg(v0)
3279 v1 := b.NewValue0(v.Pos, OpOffPtr, src.Type)
3280 v1.AuxInt = s % 16
3281 v1.AddArg(src)
3282 v.AddArg(v1)
3283 v2 := b.NewValue0(v.Pos, OpWasmI64Store, types.TypeMem)
3284 v2.AuxInt = 8
3285 v2.AddArg(dst)
3286 v3 := b.NewValue0(v.Pos, OpWasmI64Load, typ.UInt64)
3287 v3.AuxInt = 8
3288 v3.AddArg(src)
3289 v3.AddArg(mem)
3290 v2.AddArg(v3)
3291 v4 := b.NewValue0(v.Pos, OpWasmI64Store, types.TypeMem)
3292 v4.AddArg(dst)
3293 v5 := b.NewValue0(v.Pos, OpWasmI64Load, typ.UInt64)
3294 v5.AddArg(src)
3295 v5.AddArg(mem)
3296 v4.AddArg(v5)
3297 v4.AddArg(mem)
3298 v2.AddArg(v4)
3299 v.AddArg(v2)
3300 return true
3301 }
3302
3303
3304
3305 for {
3306 s := v.AuxInt
3307 mem := v.Args[2]
3308 dst := v.Args[0]
3309 src := v.Args[1]
3310 if !(s%8 == 0) {
3311 break
3312 }
3313 v.reset(OpWasmLoweredMove)
3314 v.AuxInt = s / 8
3315 v.AddArg(dst)
3316 v.AddArg(src)
3317 v.AddArg(mem)
3318 return true
3319 }
3320 return false
3321 }
3322 func rewriteValueWasm_OpMul16_0(v *Value) bool {
3323
3324
3325
3326 for {
3327 y := v.Args[1]
3328 x := v.Args[0]
3329 v.reset(OpWasmI64Mul)
3330 v.AddArg(x)
3331 v.AddArg(y)
3332 return true
3333 }
3334 }
3335 func rewriteValueWasm_OpMul32_0(v *Value) bool {
3336
3337
3338
3339 for {
3340 y := v.Args[1]
3341 x := v.Args[0]
3342 v.reset(OpWasmI64Mul)
3343 v.AddArg(x)
3344 v.AddArg(y)
3345 return true
3346 }
3347 }
3348 func rewriteValueWasm_OpMul32F_0(v *Value) bool {
3349
3350
3351
3352 for {
3353 y := v.Args[1]
3354 x := v.Args[0]
3355 v.reset(OpWasmF64Mul)
3356 v.AddArg(x)
3357 v.AddArg(y)
3358 return true
3359 }
3360 }
3361 func rewriteValueWasm_OpMul64_0(v *Value) bool {
3362
3363
3364
3365 for {
3366 y := v.Args[1]
3367 x := v.Args[0]
3368 v.reset(OpWasmI64Mul)
3369 v.AddArg(x)
3370 v.AddArg(y)
3371 return true
3372 }
3373 }
3374 func rewriteValueWasm_OpMul64F_0(v *Value) bool {
3375
3376
3377
3378 for {
3379 y := v.Args[1]
3380 x := v.Args[0]
3381 v.reset(OpWasmF64Mul)
3382 v.AddArg(x)
3383 v.AddArg(y)
3384 return true
3385 }
3386 }
3387 func rewriteValueWasm_OpMul8_0(v *Value) bool {
3388
3389
3390
3391 for {
3392 y := v.Args[1]
3393 x := v.Args[0]
3394 v.reset(OpWasmI64Mul)
3395 v.AddArg(x)
3396 v.AddArg(y)
3397 return true
3398 }
3399 }
3400 func rewriteValueWasm_OpNeg16_0(v *Value) bool {
3401 b := v.Block
3402 typ := &b.Func.Config.Types
3403
3404
3405
3406 for {
3407 x := v.Args[0]
3408 v.reset(OpWasmI64Sub)
3409 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
3410 v0.AuxInt = 0
3411 v.AddArg(v0)
3412 v.AddArg(x)
3413 return true
3414 }
3415 }
3416 func rewriteValueWasm_OpNeg32_0(v *Value) bool {
3417 b := v.Block
3418 typ := &b.Func.Config.Types
3419
3420
3421
3422 for {
3423 x := v.Args[0]
3424 v.reset(OpWasmI64Sub)
3425 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
3426 v0.AuxInt = 0
3427 v.AddArg(v0)
3428 v.AddArg(x)
3429 return true
3430 }
3431 }
3432 func rewriteValueWasm_OpNeg32F_0(v *Value) bool {
3433
3434
3435
3436 for {
3437 x := v.Args[0]
3438 v.reset(OpWasmF64Neg)
3439 v.AddArg(x)
3440 return true
3441 }
3442 }
3443 func rewriteValueWasm_OpNeg64_0(v *Value) bool {
3444 b := v.Block
3445 typ := &b.Func.Config.Types
3446
3447
3448
3449 for {
3450 x := v.Args[0]
3451 v.reset(OpWasmI64Sub)
3452 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
3453 v0.AuxInt = 0
3454 v.AddArg(v0)
3455 v.AddArg(x)
3456 return true
3457 }
3458 }
3459 func rewriteValueWasm_OpNeg64F_0(v *Value) bool {
3460
3461
3462
3463 for {
3464 x := v.Args[0]
3465 v.reset(OpWasmF64Neg)
3466 v.AddArg(x)
3467 return true
3468 }
3469 }
3470 func rewriteValueWasm_OpNeg8_0(v *Value) bool {
3471 b := v.Block
3472 typ := &b.Func.Config.Types
3473
3474
3475
3476 for {
3477 x := v.Args[0]
3478 v.reset(OpWasmI64Sub)
3479 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
3480 v0.AuxInt = 0
3481 v.AddArg(v0)
3482 v.AddArg(x)
3483 return true
3484 }
3485 }
3486 func rewriteValueWasm_OpNeq16_0(v *Value) bool {
3487 b := v.Block
3488 typ := &b.Func.Config.Types
3489
3490
3491
3492 for {
3493 y := v.Args[1]
3494 x := v.Args[0]
3495 v.reset(OpWasmI64Ne)
3496 v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
3497 v0.AddArg(x)
3498 v.AddArg(v0)
3499 v1 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
3500 v1.AddArg(y)
3501 v.AddArg(v1)
3502 return true
3503 }
3504 }
3505 func rewriteValueWasm_OpNeq32_0(v *Value) bool {
3506 b := v.Block
3507 typ := &b.Func.Config.Types
3508
3509
3510
3511 for {
3512 y := v.Args[1]
3513 x := v.Args[0]
3514 v.reset(OpWasmI64Ne)
3515 v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
3516 v0.AddArg(x)
3517 v.AddArg(v0)
3518 v1 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
3519 v1.AddArg(y)
3520 v.AddArg(v1)
3521 return true
3522 }
3523 }
3524 func rewriteValueWasm_OpNeq32F_0(v *Value) bool {
3525 b := v.Block
3526 typ := &b.Func.Config.Types
3527
3528
3529
3530 for {
3531 y := v.Args[1]
3532 x := v.Args[0]
3533 v.reset(OpWasmF64Ne)
3534 v0 := b.NewValue0(v.Pos, OpWasmLoweredRound32F, typ.Float32)
3535 v0.AddArg(x)
3536 v.AddArg(v0)
3537 v1 := b.NewValue0(v.Pos, OpWasmLoweredRound32F, typ.Float32)
3538 v1.AddArg(y)
3539 v.AddArg(v1)
3540 return true
3541 }
3542 }
3543 func rewriteValueWasm_OpNeq64_0(v *Value) bool {
3544
3545
3546
3547 for {
3548 y := v.Args[1]
3549 x := v.Args[0]
3550 v.reset(OpWasmI64Ne)
3551 v.AddArg(x)
3552 v.AddArg(y)
3553 return true
3554 }
3555 }
3556 func rewriteValueWasm_OpNeq64F_0(v *Value) bool {
3557
3558
3559
3560 for {
3561 y := v.Args[1]
3562 x := v.Args[0]
3563 v.reset(OpWasmF64Ne)
3564 v.AddArg(x)
3565 v.AddArg(y)
3566 return true
3567 }
3568 }
3569 func rewriteValueWasm_OpNeq8_0(v *Value) bool {
3570 b := v.Block
3571 typ := &b.Func.Config.Types
3572
3573
3574
3575 for {
3576 y := v.Args[1]
3577 x := v.Args[0]
3578 v.reset(OpWasmI64Ne)
3579 v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
3580 v0.AddArg(x)
3581 v.AddArg(v0)
3582 v1 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
3583 v1.AddArg(y)
3584 v.AddArg(v1)
3585 return true
3586 }
3587 }
3588 func rewriteValueWasm_OpNeqB_0(v *Value) bool {
3589
3590
3591
3592 for {
3593 y := v.Args[1]
3594 x := v.Args[0]
3595 v.reset(OpWasmI64Ne)
3596 v.AddArg(x)
3597 v.AddArg(y)
3598 return true
3599 }
3600 }
3601 func rewriteValueWasm_OpNeqPtr_0(v *Value) bool {
3602
3603
3604
3605 for {
3606 y := v.Args[1]
3607 x := v.Args[0]
3608 v.reset(OpWasmI64Ne)
3609 v.AddArg(x)
3610 v.AddArg(y)
3611 return true
3612 }
3613 }
3614 func rewriteValueWasm_OpNilCheck_0(v *Value) bool {
3615
3616
3617
3618 for {
3619 mem := v.Args[1]
3620 ptr := v.Args[0]
3621 v.reset(OpWasmLoweredNilCheck)
3622 v.AddArg(ptr)
3623 v.AddArg(mem)
3624 return true
3625 }
3626 }
3627 func rewriteValueWasm_OpNot_0(v *Value) bool {
3628
3629
3630
3631 for {
3632 x := v.Args[0]
3633 v.reset(OpWasmI64Eqz)
3634 v.AddArg(x)
3635 return true
3636 }
3637 }
3638 func rewriteValueWasm_OpOffPtr_0(v *Value) bool {
3639
3640
3641
3642 for {
3643 off := v.AuxInt
3644 ptr := v.Args[0]
3645 v.reset(OpWasmI64AddConst)
3646 v.AuxInt = off
3647 v.AddArg(ptr)
3648 return true
3649 }
3650 }
3651 func rewriteValueWasm_OpOr16_0(v *Value) bool {
3652
3653
3654
3655 for {
3656 y := v.Args[1]
3657 x := v.Args[0]
3658 v.reset(OpWasmI64Or)
3659 v.AddArg(x)
3660 v.AddArg(y)
3661 return true
3662 }
3663 }
3664 func rewriteValueWasm_OpOr32_0(v *Value) bool {
3665
3666
3667
3668 for {
3669 y := v.Args[1]
3670 x := v.Args[0]
3671 v.reset(OpWasmI64Or)
3672 v.AddArg(x)
3673 v.AddArg(y)
3674 return true
3675 }
3676 }
3677 func rewriteValueWasm_OpOr64_0(v *Value) bool {
3678
3679
3680
3681 for {
3682 y := v.Args[1]
3683 x := v.Args[0]
3684 v.reset(OpWasmI64Or)
3685 v.AddArg(x)
3686 v.AddArg(y)
3687 return true
3688 }
3689 }
3690 func rewriteValueWasm_OpOr8_0(v *Value) bool {
3691
3692
3693
3694 for {
3695 y := v.Args[1]
3696 x := v.Args[0]
3697 v.reset(OpWasmI64Or)
3698 v.AddArg(x)
3699 v.AddArg(y)
3700 return true
3701 }
3702 }
3703 func rewriteValueWasm_OpOrB_0(v *Value) bool {
3704
3705
3706
3707 for {
3708 y := v.Args[1]
3709 x := v.Args[0]
3710 v.reset(OpWasmI64Or)
3711 v.AddArg(x)
3712 v.AddArg(y)
3713 return true
3714 }
3715 }
3716 func rewriteValueWasm_OpPopCount16_0(v *Value) bool {
3717 b := v.Block
3718 typ := &b.Func.Config.Types
3719
3720
3721
3722 for {
3723 x := v.Args[0]
3724 v.reset(OpWasmI64Popcnt)
3725 v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
3726 v0.AddArg(x)
3727 v.AddArg(v0)
3728 return true
3729 }
3730 }
3731 func rewriteValueWasm_OpPopCount32_0(v *Value) bool {
3732 b := v.Block
3733 typ := &b.Func.Config.Types
3734
3735
3736
3737 for {
3738 x := v.Args[0]
3739 v.reset(OpWasmI64Popcnt)
3740 v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
3741 v0.AddArg(x)
3742 v.AddArg(v0)
3743 return true
3744 }
3745 }
3746 func rewriteValueWasm_OpPopCount64_0(v *Value) bool {
3747
3748
3749
3750 for {
3751 x := v.Args[0]
3752 v.reset(OpWasmI64Popcnt)
3753 v.AddArg(x)
3754 return true
3755 }
3756 }
3757 func rewriteValueWasm_OpPopCount8_0(v *Value) bool {
3758 b := v.Block
3759 typ := &b.Func.Config.Types
3760
3761
3762
3763 for {
3764 x := v.Args[0]
3765 v.reset(OpWasmI64Popcnt)
3766 v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
3767 v0.AddArg(x)
3768 v.AddArg(v0)
3769 return true
3770 }
3771 }
3772 func rewriteValueWasm_OpRotateLeft16_0(v *Value) bool {
3773 b := v.Block
3774 typ := &b.Func.Config.Types
3775
3776
3777
3778 for {
3779 t := v.Type
3780 _ = v.Args[1]
3781 x := v.Args[0]
3782 v_1 := v.Args[1]
3783 if v_1.Op != OpWasmI64Const {
3784 break
3785 }
3786 c := v_1.AuxInt
3787 v.reset(OpOr16)
3788 v0 := b.NewValue0(v.Pos, OpLsh16x64, t)
3789 v0.AddArg(x)
3790 v1 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
3791 v1.AuxInt = c & 15
3792 v0.AddArg(v1)
3793 v.AddArg(v0)
3794 v2 := b.NewValue0(v.Pos, OpRsh16Ux64, t)
3795 v2.AddArg(x)
3796 v3 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
3797 v3.AuxInt = -c & 15
3798 v2.AddArg(v3)
3799 v.AddArg(v2)
3800 return true
3801 }
3802 return false
3803 }
3804 func rewriteValueWasm_OpRotateLeft32_0(v *Value) bool {
3805 b := v.Block
3806 typ := &b.Func.Config.Types
3807
3808
3809
3810 for {
3811 t := v.Type
3812 _ = v.Args[1]
3813 x := v.Args[0]
3814 v_1 := v.Args[1]
3815 if v_1.Op != OpWasmI64Const {
3816 break
3817 }
3818 c := v_1.AuxInt
3819 v.reset(OpOr32)
3820 v0 := b.NewValue0(v.Pos, OpLsh32x64, t)
3821 v0.AddArg(x)
3822 v1 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
3823 v1.AuxInt = c & 31
3824 v0.AddArg(v1)
3825 v.AddArg(v0)
3826 v2 := b.NewValue0(v.Pos, OpRsh32Ux64, t)
3827 v2.AddArg(x)
3828 v3 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
3829 v3.AuxInt = -c & 31
3830 v2.AddArg(v3)
3831 v.AddArg(v2)
3832 return true
3833 }
3834 return false
3835 }
3836 func rewriteValueWasm_OpRotateLeft64_0(v *Value) bool {
3837
3838
3839
3840 for {
3841 y := v.Args[1]
3842 x := v.Args[0]
3843 v.reset(OpWasmI64Rotl)
3844 v.AddArg(x)
3845 v.AddArg(y)
3846 return true
3847 }
3848 }
3849 func rewriteValueWasm_OpRotateLeft8_0(v *Value) bool {
3850 b := v.Block
3851 typ := &b.Func.Config.Types
3852
3853
3854
3855 for {
3856 t := v.Type
3857 _ = v.Args[1]
3858 x := v.Args[0]
3859 v_1 := v.Args[1]
3860 if v_1.Op != OpWasmI64Const {
3861 break
3862 }
3863 c := v_1.AuxInt
3864 v.reset(OpOr8)
3865 v0 := b.NewValue0(v.Pos, OpLsh8x64, t)
3866 v0.AddArg(x)
3867 v1 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
3868 v1.AuxInt = c & 7
3869 v0.AddArg(v1)
3870 v.AddArg(v0)
3871 v2 := b.NewValue0(v.Pos, OpRsh8Ux64, t)
3872 v2.AddArg(x)
3873 v3 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
3874 v3.AuxInt = -c & 7
3875 v2.AddArg(v3)
3876 v.AddArg(v2)
3877 return true
3878 }
3879 return false
3880 }
3881 func rewriteValueWasm_OpRound32F_0(v *Value) bool {
3882
3883
3884
3885 for {
3886 x := v.Args[0]
3887 v.reset(OpWasmLoweredRound32F)
3888 v.AddArg(x)
3889 return true
3890 }
3891 }
3892 func rewriteValueWasm_OpRound64F_0(v *Value) bool {
3893
3894
3895
3896 for {
3897 x := v.Args[0]
3898 v.reset(OpCopy)
3899 v.Type = x.Type
3900 v.AddArg(x)
3901 return true
3902 }
3903 }
3904 func rewriteValueWasm_OpRoundToEven_0(v *Value) bool {
3905
3906
3907
3908 for {
3909 x := v.Args[0]
3910 v.reset(OpWasmF64Nearest)
3911 v.AddArg(x)
3912 return true
3913 }
3914 }
3915 func rewriteValueWasm_OpRsh16Ux16_0(v *Value) bool {
3916 b := v.Block
3917 typ := &b.Func.Config.Types
3918
3919
3920
3921 for {
3922 y := v.Args[1]
3923 x := v.Args[0]
3924 v.reset(OpRsh64Ux64)
3925 v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
3926 v0.AddArg(x)
3927 v.AddArg(v0)
3928 v1 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
3929 v1.AddArg(y)
3930 v.AddArg(v1)
3931 return true
3932 }
3933 }
3934 func rewriteValueWasm_OpRsh16Ux32_0(v *Value) bool {
3935 b := v.Block
3936 typ := &b.Func.Config.Types
3937
3938
3939
3940 for {
3941 y := v.Args[1]
3942 x := v.Args[0]
3943 v.reset(OpRsh64Ux64)
3944 v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
3945 v0.AddArg(x)
3946 v.AddArg(v0)
3947 v1 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
3948 v1.AddArg(y)
3949 v.AddArg(v1)
3950 return true
3951 }
3952 }
3953 func rewriteValueWasm_OpRsh16Ux64_0(v *Value) bool {
3954 b := v.Block
3955 typ := &b.Func.Config.Types
3956
3957
3958
3959 for {
3960 y := v.Args[1]
3961 x := v.Args[0]
3962 v.reset(OpRsh64Ux64)
3963 v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
3964 v0.AddArg(x)
3965 v.AddArg(v0)
3966 v.AddArg(y)
3967 return true
3968 }
3969 }
3970 func rewriteValueWasm_OpRsh16Ux8_0(v *Value) bool {
3971 b := v.Block
3972 typ := &b.Func.Config.Types
3973
3974
3975
3976 for {
3977 y := v.Args[1]
3978 x := v.Args[0]
3979 v.reset(OpRsh64Ux64)
3980 v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
3981 v0.AddArg(x)
3982 v.AddArg(v0)
3983 v1 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
3984 v1.AddArg(y)
3985 v.AddArg(v1)
3986 return true
3987 }
3988 }
3989 func rewriteValueWasm_OpRsh16x16_0(v *Value) bool {
3990 b := v.Block
3991 typ := &b.Func.Config.Types
3992
3993
3994
3995 for {
3996 y := v.Args[1]
3997 x := v.Args[0]
3998 v.reset(OpRsh64x64)
3999 v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
4000 v0.AddArg(x)
4001 v.AddArg(v0)
4002 v1 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
4003 v1.AddArg(y)
4004 v.AddArg(v1)
4005 return true
4006 }
4007 }
4008 func rewriteValueWasm_OpRsh16x32_0(v *Value) bool {
4009 b := v.Block
4010 typ := &b.Func.Config.Types
4011
4012
4013
4014 for {
4015 y := v.Args[1]
4016 x := v.Args[0]
4017 v.reset(OpRsh64x64)
4018 v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
4019 v0.AddArg(x)
4020 v.AddArg(v0)
4021 v1 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
4022 v1.AddArg(y)
4023 v.AddArg(v1)
4024 return true
4025 }
4026 }
4027 func rewriteValueWasm_OpRsh16x64_0(v *Value) bool {
4028 b := v.Block
4029 typ := &b.Func.Config.Types
4030
4031
4032
4033 for {
4034 y := v.Args[1]
4035 x := v.Args[0]
4036 v.reset(OpRsh64x64)
4037 v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
4038 v0.AddArg(x)
4039 v.AddArg(v0)
4040 v.AddArg(y)
4041 return true
4042 }
4043 }
4044 func rewriteValueWasm_OpRsh16x8_0(v *Value) bool {
4045 b := v.Block
4046 typ := &b.Func.Config.Types
4047
4048
4049
4050 for {
4051 y := v.Args[1]
4052 x := v.Args[0]
4053 v.reset(OpRsh64x64)
4054 v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
4055 v0.AddArg(x)
4056 v.AddArg(v0)
4057 v1 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
4058 v1.AddArg(y)
4059 v.AddArg(v1)
4060 return true
4061 }
4062 }
4063 func rewriteValueWasm_OpRsh32Ux16_0(v *Value) bool {
4064 b := v.Block
4065 typ := &b.Func.Config.Types
4066
4067
4068
4069 for {
4070 y := v.Args[1]
4071 x := v.Args[0]
4072 v.reset(OpRsh64Ux64)
4073 v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
4074 v0.AddArg(x)
4075 v.AddArg(v0)
4076 v1 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
4077 v1.AddArg(y)
4078 v.AddArg(v1)
4079 return true
4080 }
4081 }
4082 func rewriteValueWasm_OpRsh32Ux32_0(v *Value) bool {
4083 b := v.Block
4084 typ := &b.Func.Config.Types
4085
4086
4087
4088 for {
4089 y := v.Args[1]
4090 x := v.Args[0]
4091 v.reset(OpRsh64Ux64)
4092 v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
4093 v0.AddArg(x)
4094 v.AddArg(v0)
4095 v1 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
4096 v1.AddArg(y)
4097 v.AddArg(v1)
4098 return true
4099 }
4100 }
4101 func rewriteValueWasm_OpRsh32Ux64_0(v *Value) bool {
4102 b := v.Block
4103 typ := &b.Func.Config.Types
4104
4105
4106
4107 for {
4108 y := v.Args[1]
4109 x := v.Args[0]
4110 v.reset(OpRsh64Ux64)
4111 v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
4112 v0.AddArg(x)
4113 v.AddArg(v0)
4114 v.AddArg(y)
4115 return true
4116 }
4117 }
4118 func rewriteValueWasm_OpRsh32Ux8_0(v *Value) bool {
4119 b := v.Block
4120 typ := &b.Func.Config.Types
4121
4122
4123
4124 for {
4125 y := v.Args[1]
4126 x := v.Args[0]
4127 v.reset(OpRsh64Ux64)
4128 v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
4129 v0.AddArg(x)
4130 v.AddArg(v0)
4131 v1 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
4132 v1.AddArg(y)
4133 v.AddArg(v1)
4134 return true
4135 }
4136 }
4137 func rewriteValueWasm_OpRsh32x16_0(v *Value) bool {
4138 b := v.Block
4139 typ := &b.Func.Config.Types
4140
4141
4142
4143 for {
4144 y := v.Args[1]
4145 x := v.Args[0]
4146 v.reset(OpRsh64x64)
4147 v0 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
4148 v0.AddArg(x)
4149 v.AddArg(v0)
4150 v1 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
4151 v1.AddArg(y)
4152 v.AddArg(v1)
4153 return true
4154 }
4155 }
4156 func rewriteValueWasm_OpRsh32x32_0(v *Value) bool {
4157 b := v.Block
4158 typ := &b.Func.Config.Types
4159
4160
4161
4162 for {
4163 y := v.Args[1]
4164 x := v.Args[0]
4165 v.reset(OpRsh64x64)
4166 v0 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
4167 v0.AddArg(x)
4168 v.AddArg(v0)
4169 v1 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
4170 v1.AddArg(y)
4171 v.AddArg(v1)
4172 return true
4173 }
4174 }
4175 func rewriteValueWasm_OpRsh32x64_0(v *Value) bool {
4176 b := v.Block
4177 typ := &b.Func.Config.Types
4178
4179
4180
4181 for {
4182 y := v.Args[1]
4183 x := v.Args[0]
4184 v.reset(OpRsh64x64)
4185 v0 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
4186 v0.AddArg(x)
4187 v.AddArg(v0)
4188 v.AddArg(y)
4189 return true
4190 }
4191 }
4192 func rewriteValueWasm_OpRsh32x8_0(v *Value) bool {
4193 b := v.Block
4194 typ := &b.Func.Config.Types
4195
4196
4197
4198 for {
4199 y := v.Args[1]
4200 x := v.Args[0]
4201 v.reset(OpRsh64x64)
4202 v0 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
4203 v0.AddArg(x)
4204 v.AddArg(v0)
4205 v1 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
4206 v1.AddArg(y)
4207 v.AddArg(v1)
4208 return true
4209 }
4210 }
4211 func rewriteValueWasm_OpRsh64Ux16_0(v *Value) bool {
4212 b := v.Block
4213 typ := &b.Func.Config.Types
4214
4215
4216
4217 for {
4218 y := v.Args[1]
4219 x := v.Args[0]
4220 v.reset(OpRsh64Ux64)
4221 v.AddArg(x)
4222 v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
4223 v0.AddArg(y)
4224 v.AddArg(v0)
4225 return true
4226 }
4227 }
4228 func rewriteValueWasm_OpRsh64Ux32_0(v *Value) bool {
4229 b := v.Block
4230 typ := &b.Func.Config.Types
4231
4232
4233
4234 for {
4235 y := v.Args[1]
4236 x := v.Args[0]
4237 v.reset(OpRsh64Ux64)
4238 v.AddArg(x)
4239 v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
4240 v0.AddArg(y)
4241 v.AddArg(v0)
4242 return true
4243 }
4244 }
4245 func rewriteValueWasm_OpRsh64Ux64_0(v *Value) bool {
4246 b := v.Block
4247 typ := &b.Func.Config.Types
4248
4249
4250
4251 for {
4252 y := v.Args[1]
4253 x := v.Args[0]
4254 v.reset(OpWasmSelect)
4255 v0 := b.NewValue0(v.Pos, OpWasmI64ShrU, typ.Int64)
4256 v0.AddArg(x)
4257 v0.AddArg(y)
4258 v.AddArg(v0)
4259 v1 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
4260 v1.AuxInt = 0
4261 v.AddArg(v1)
4262 v2 := b.NewValue0(v.Pos, OpWasmI64LtU, typ.Bool)
4263 v2.AddArg(y)
4264 v3 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
4265 v3.AuxInt = 64
4266 v2.AddArg(v3)
4267 v.AddArg(v2)
4268 return true
4269 }
4270 }
4271 func rewriteValueWasm_OpRsh64Ux8_0(v *Value) bool {
4272 b := v.Block
4273 typ := &b.Func.Config.Types
4274
4275
4276
4277 for {
4278 y := v.Args[1]
4279 x := v.Args[0]
4280 v.reset(OpRsh64Ux64)
4281 v.AddArg(x)
4282 v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
4283 v0.AddArg(y)
4284 v.AddArg(v0)
4285 return true
4286 }
4287 }
4288 func rewriteValueWasm_OpRsh64x16_0(v *Value) bool {
4289 b := v.Block
4290 typ := &b.Func.Config.Types
4291
4292
4293
4294 for {
4295 y := v.Args[1]
4296 x := v.Args[0]
4297 v.reset(OpRsh64x64)
4298 v.AddArg(x)
4299 v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
4300 v0.AddArg(y)
4301 v.AddArg(v0)
4302 return true
4303 }
4304 }
4305 func rewriteValueWasm_OpRsh64x32_0(v *Value) bool {
4306 b := v.Block
4307 typ := &b.Func.Config.Types
4308
4309
4310
4311 for {
4312 y := v.Args[1]
4313 x := v.Args[0]
4314 v.reset(OpRsh64x64)
4315 v.AddArg(x)
4316 v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
4317 v0.AddArg(y)
4318 v.AddArg(v0)
4319 return true
4320 }
4321 }
4322 func rewriteValueWasm_OpRsh64x64_0(v *Value) bool {
4323 b := v.Block
4324 typ := &b.Func.Config.Types
4325
4326
4327
4328 for {
4329 y := v.Args[1]
4330 x := v.Args[0]
4331 v.reset(OpWasmI64ShrS)
4332 v.AddArg(x)
4333 v0 := b.NewValue0(v.Pos, OpWasmSelect, typ.Int64)
4334 v0.AddArg(y)
4335 v1 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
4336 v1.AuxInt = 63
4337 v0.AddArg(v1)
4338 v2 := b.NewValue0(v.Pos, OpWasmI64LtU, typ.Bool)
4339 v2.AddArg(y)
4340 v3 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
4341 v3.AuxInt = 64
4342 v2.AddArg(v3)
4343 v0.AddArg(v2)
4344 v.AddArg(v0)
4345 return true
4346 }
4347 }
4348 func rewriteValueWasm_OpRsh64x8_0(v *Value) bool {
4349 b := v.Block
4350 typ := &b.Func.Config.Types
4351
4352
4353
4354 for {
4355 y := v.Args[1]
4356 x := v.Args[0]
4357 v.reset(OpRsh64x64)
4358 v.AddArg(x)
4359 v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
4360 v0.AddArg(y)
4361 v.AddArg(v0)
4362 return true
4363 }
4364 }
4365 func rewriteValueWasm_OpRsh8Ux16_0(v *Value) bool {
4366 b := v.Block
4367 typ := &b.Func.Config.Types
4368
4369
4370
4371 for {
4372 y := v.Args[1]
4373 x := v.Args[0]
4374 v.reset(OpRsh64Ux64)
4375 v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
4376 v0.AddArg(x)
4377 v.AddArg(v0)
4378 v1 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
4379 v1.AddArg(y)
4380 v.AddArg(v1)
4381 return true
4382 }
4383 }
4384 func rewriteValueWasm_OpRsh8Ux32_0(v *Value) bool {
4385 b := v.Block
4386 typ := &b.Func.Config.Types
4387
4388
4389
4390 for {
4391 y := v.Args[1]
4392 x := v.Args[0]
4393 v.reset(OpRsh64Ux64)
4394 v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
4395 v0.AddArg(x)
4396 v.AddArg(v0)
4397 v1 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
4398 v1.AddArg(y)
4399 v.AddArg(v1)
4400 return true
4401 }
4402 }
4403 func rewriteValueWasm_OpRsh8Ux64_0(v *Value) bool {
4404 b := v.Block
4405 typ := &b.Func.Config.Types
4406
4407
4408
4409 for {
4410 y := v.Args[1]
4411 x := v.Args[0]
4412 v.reset(OpRsh64Ux64)
4413 v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
4414 v0.AddArg(x)
4415 v.AddArg(v0)
4416 v.AddArg(y)
4417 return true
4418 }
4419 }
4420 func rewriteValueWasm_OpRsh8Ux8_0(v *Value) bool {
4421 b := v.Block
4422 typ := &b.Func.Config.Types
4423
4424
4425
4426 for {
4427 y := v.Args[1]
4428 x := v.Args[0]
4429 v.reset(OpRsh64Ux64)
4430 v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
4431 v0.AddArg(x)
4432 v.AddArg(v0)
4433 v1 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
4434 v1.AddArg(y)
4435 v.AddArg(v1)
4436 return true
4437 }
4438 }
4439 func rewriteValueWasm_OpRsh8x16_0(v *Value) bool {
4440 b := v.Block
4441 typ := &b.Func.Config.Types
4442
4443
4444
4445 for {
4446 y := v.Args[1]
4447 x := v.Args[0]
4448 v.reset(OpRsh64x64)
4449 v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
4450 v0.AddArg(x)
4451 v.AddArg(v0)
4452 v1 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
4453 v1.AddArg(y)
4454 v.AddArg(v1)
4455 return true
4456 }
4457 }
4458 func rewriteValueWasm_OpRsh8x32_0(v *Value) bool {
4459 b := v.Block
4460 typ := &b.Func.Config.Types
4461
4462
4463
4464 for {
4465 y := v.Args[1]
4466 x := v.Args[0]
4467 v.reset(OpRsh64x64)
4468 v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
4469 v0.AddArg(x)
4470 v.AddArg(v0)
4471 v1 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
4472 v1.AddArg(y)
4473 v.AddArg(v1)
4474 return true
4475 }
4476 }
4477 func rewriteValueWasm_OpRsh8x64_0(v *Value) bool {
4478 b := v.Block
4479 typ := &b.Func.Config.Types
4480
4481
4482
4483 for {
4484 y := v.Args[1]
4485 x := v.Args[0]
4486 v.reset(OpRsh64x64)
4487 v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
4488 v0.AddArg(x)
4489 v.AddArg(v0)
4490 v.AddArg(y)
4491 return true
4492 }
4493 }
4494 func rewriteValueWasm_OpRsh8x8_0(v *Value) bool {
4495 b := v.Block
4496 typ := &b.Func.Config.Types
4497
4498
4499
4500 for {
4501 y := v.Args[1]
4502 x := v.Args[0]
4503 v.reset(OpRsh64x64)
4504 v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
4505 v0.AddArg(x)
4506 v.AddArg(v0)
4507 v1 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
4508 v1.AddArg(y)
4509 v.AddArg(v1)
4510 return true
4511 }
4512 }
4513 func rewriteValueWasm_OpSignExt16to32_0(v *Value) bool {
4514 b := v.Block
4515 typ := &b.Func.Config.Types
4516
4517
4518
4519 for {
4520 x := v.Args[0]
4521 if x.Op != OpWasmI64Load16S {
4522 break
4523 }
4524 _ = x.Args[1]
4525 v.reset(OpCopy)
4526 v.Type = x.Type
4527 v.AddArg(x)
4528 return true
4529 }
4530
4531
4532
4533 for {
4534 x := v.Args[0]
4535 if !(objabi.GOWASM.SignExt) {
4536 break
4537 }
4538 v.reset(OpWasmI64Extend16S)
4539 v.AddArg(x)
4540 return true
4541 }
4542
4543
4544
4545 for {
4546 x := v.Args[0]
4547 v.reset(OpWasmI64ShrS)
4548 v0 := b.NewValue0(v.Pos, OpWasmI64Shl, typ.Int64)
4549 v0.AddArg(x)
4550 v1 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
4551 v1.AuxInt = 48
4552 v0.AddArg(v1)
4553 v.AddArg(v0)
4554 v2 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
4555 v2.AuxInt = 48
4556 v.AddArg(v2)
4557 return true
4558 }
4559 }
4560 func rewriteValueWasm_OpSignExt16to64_0(v *Value) bool {
4561 b := v.Block
4562 typ := &b.Func.Config.Types
4563
4564
4565
4566 for {
4567 x := v.Args[0]
4568 if x.Op != OpWasmI64Load16S {
4569 break
4570 }
4571 _ = x.Args[1]
4572 v.reset(OpCopy)
4573 v.Type = x.Type
4574 v.AddArg(x)
4575 return true
4576 }
4577
4578
4579
4580 for {
4581 x := v.Args[0]
4582 if !(objabi.GOWASM.SignExt) {
4583 break
4584 }
4585 v.reset(OpWasmI64Extend16S)
4586 v.AddArg(x)
4587 return true
4588 }
4589
4590
4591
4592 for {
4593 x := v.Args[0]
4594 v.reset(OpWasmI64ShrS)
4595 v0 := b.NewValue0(v.Pos, OpWasmI64Shl, typ.Int64)
4596 v0.AddArg(x)
4597 v1 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
4598 v1.AuxInt = 48
4599 v0.AddArg(v1)
4600 v.AddArg(v0)
4601 v2 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
4602 v2.AuxInt = 48
4603 v.AddArg(v2)
4604 return true
4605 }
4606 }
4607 func rewriteValueWasm_OpSignExt32to64_0(v *Value) bool {
4608 b := v.Block
4609 typ := &b.Func.Config.Types
4610
4611
4612
4613 for {
4614 x := v.Args[0]
4615 if x.Op != OpWasmI64Load32S {
4616 break
4617 }
4618 _ = x.Args[1]
4619 v.reset(OpCopy)
4620 v.Type = x.Type
4621 v.AddArg(x)
4622 return true
4623 }
4624
4625
4626
4627 for {
4628 x := v.Args[0]
4629 if !(objabi.GOWASM.SignExt) {
4630 break
4631 }
4632 v.reset(OpWasmI64Extend32S)
4633 v.AddArg(x)
4634 return true
4635 }
4636
4637
4638
4639 for {
4640 x := v.Args[0]
4641 v.reset(OpWasmI64ShrS)
4642 v0 := b.NewValue0(v.Pos, OpWasmI64Shl, typ.Int64)
4643 v0.AddArg(x)
4644 v1 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
4645 v1.AuxInt = 32
4646 v0.AddArg(v1)
4647 v.AddArg(v0)
4648 v2 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
4649 v2.AuxInt = 32
4650 v.AddArg(v2)
4651 return true
4652 }
4653 }
4654 func rewriteValueWasm_OpSignExt8to16_0(v *Value) bool {
4655 b := v.Block
4656 typ := &b.Func.Config.Types
4657
4658
4659
4660 for {
4661 x := v.Args[0]
4662 if x.Op != OpWasmI64Load8S {
4663 break
4664 }
4665 _ = x.Args[1]
4666 v.reset(OpCopy)
4667 v.Type = x.Type
4668 v.AddArg(x)
4669 return true
4670 }
4671
4672
4673
4674 for {
4675 x := v.Args[0]
4676 if !(objabi.GOWASM.SignExt) {
4677 break
4678 }
4679 v.reset(OpWasmI64Extend8S)
4680 v.AddArg(x)
4681 return true
4682 }
4683
4684
4685
4686 for {
4687 x := v.Args[0]
4688 v.reset(OpWasmI64ShrS)
4689 v0 := b.NewValue0(v.Pos, OpWasmI64Shl, typ.Int64)
4690 v0.AddArg(x)
4691 v1 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
4692 v1.AuxInt = 56
4693 v0.AddArg(v1)
4694 v.AddArg(v0)
4695 v2 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
4696 v2.AuxInt = 56
4697 v.AddArg(v2)
4698 return true
4699 }
4700 }
4701 func rewriteValueWasm_OpSignExt8to32_0(v *Value) bool {
4702 b := v.Block
4703 typ := &b.Func.Config.Types
4704
4705
4706
4707 for {
4708 x := v.Args[0]
4709 if x.Op != OpWasmI64Load8S {
4710 break
4711 }
4712 _ = x.Args[1]
4713 v.reset(OpCopy)
4714 v.Type = x.Type
4715 v.AddArg(x)
4716 return true
4717 }
4718
4719
4720
4721 for {
4722 x := v.Args[0]
4723 if !(objabi.GOWASM.SignExt) {
4724 break
4725 }
4726 v.reset(OpWasmI64Extend8S)
4727 v.AddArg(x)
4728 return true
4729 }
4730
4731
4732
4733 for {
4734 x := v.Args[0]
4735 v.reset(OpWasmI64ShrS)
4736 v0 := b.NewValue0(v.Pos, OpWasmI64Shl, typ.Int64)
4737 v0.AddArg(x)
4738 v1 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
4739 v1.AuxInt = 56
4740 v0.AddArg(v1)
4741 v.AddArg(v0)
4742 v2 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
4743 v2.AuxInt = 56
4744 v.AddArg(v2)
4745 return true
4746 }
4747 }
4748 func rewriteValueWasm_OpSignExt8to64_0(v *Value) bool {
4749 b := v.Block
4750 typ := &b.Func.Config.Types
4751
4752
4753
4754 for {
4755 x := v.Args[0]
4756 if x.Op != OpWasmI64Load8S {
4757 break
4758 }
4759 _ = x.Args[1]
4760 v.reset(OpCopy)
4761 v.Type = x.Type
4762 v.AddArg(x)
4763 return true
4764 }
4765
4766
4767
4768 for {
4769 x := v.Args[0]
4770 if !(objabi.GOWASM.SignExt) {
4771 break
4772 }
4773 v.reset(OpWasmI64Extend8S)
4774 v.AddArg(x)
4775 return true
4776 }
4777
4778
4779
4780 for {
4781 x := v.Args[0]
4782 v.reset(OpWasmI64ShrS)
4783 v0 := b.NewValue0(v.Pos, OpWasmI64Shl, typ.Int64)
4784 v0.AddArg(x)
4785 v1 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
4786 v1.AuxInt = 56
4787 v0.AddArg(v1)
4788 v.AddArg(v0)
4789 v2 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
4790 v2.AuxInt = 56
4791 v.AddArg(v2)
4792 return true
4793 }
4794 }
4795 func rewriteValueWasm_OpSlicemask_0(v *Value) bool {
4796 b := v.Block
4797 typ := &b.Func.Config.Types
4798
4799
4800
4801 for {
4802 x := v.Args[0]
4803 v.reset(OpWasmI64ShrS)
4804 v0 := b.NewValue0(v.Pos, OpWasmI64Sub, typ.Int64)
4805 v1 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
4806 v1.AuxInt = 0
4807 v0.AddArg(v1)
4808 v0.AddArg(x)
4809 v.AddArg(v0)
4810 v2 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
4811 v2.AuxInt = 63
4812 v.AddArg(v2)
4813 return true
4814 }
4815 }
4816 func rewriteValueWasm_OpSqrt_0(v *Value) bool {
4817
4818
4819
4820 for {
4821 x := v.Args[0]
4822 v.reset(OpWasmF64Sqrt)
4823 v.AddArg(x)
4824 return true
4825 }
4826 }
4827 func rewriteValueWasm_OpStaticCall_0(v *Value) bool {
4828
4829
4830
4831 for {
4832 argwid := v.AuxInt
4833 target := v.Aux
4834 mem := v.Args[0]
4835 v.reset(OpWasmLoweredStaticCall)
4836 v.AuxInt = argwid
4837 v.Aux = target
4838 v.AddArg(mem)
4839 return true
4840 }
4841 }
4842 func rewriteValueWasm_OpStore_0(v *Value) bool {
4843
4844
4845
4846 for {
4847 t := v.Aux
4848 mem := v.Args[2]
4849 ptr := v.Args[0]
4850 val := v.Args[1]
4851 if !(is64BitFloat(t.(*types.Type))) {
4852 break
4853 }
4854 v.reset(OpWasmF64Store)
4855 v.AddArg(ptr)
4856 v.AddArg(val)
4857 v.AddArg(mem)
4858 return true
4859 }
4860
4861
4862
4863 for {
4864 t := v.Aux
4865 mem := v.Args[2]
4866 ptr := v.Args[0]
4867 val := v.Args[1]
4868 if !(is32BitFloat(t.(*types.Type))) {
4869 break
4870 }
4871 v.reset(OpWasmF32Store)
4872 v.AddArg(ptr)
4873 v.AddArg(val)
4874 v.AddArg(mem)
4875 return true
4876 }
4877
4878
4879
4880 for {
4881 t := v.Aux
4882 mem := v.Args[2]
4883 ptr := v.Args[0]
4884 val := v.Args[1]
4885 if !(t.(*types.Type).Size() == 8) {
4886 break
4887 }
4888 v.reset(OpWasmI64Store)
4889 v.AddArg(ptr)
4890 v.AddArg(val)
4891 v.AddArg(mem)
4892 return true
4893 }
4894
4895
4896
4897 for {
4898 t := v.Aux
4899 mem := v.Args[2]
4900 ptr := v.Args[0]
4901 val := v.Args[1]
4902 if !(t.(*types.Type).Size() == 4) {
4903 break
4904 }
4905 v.reset(OpWasmI64Store32)
4906 v.AddArg(ptr)
4907 v.AddArg(val)
4908 v.AddArg(mem)
4909 return true
4910 }
4911
4912
4913
4914 for {
4915 t := v.Aux
4916 mem := v.Args[2]
4917 ptr := v.Args[0]
4918 val := v.Args[1]
4919 if !(t.(*types.Type).Size() == 2) {
4920 break
4921 }
4922 v.reset(OpWasmI64Store16)
4923 v.AddArg(ptr)
4924 v.AddArg(val)
4925 v.AddArg(mem)
4926 return true
4927 }
4928
4929
4930
4931 for {
4932 t := v.Aux
4933 mem := v.Args[2]
4934 ptr := v.Args[0]
4935 val := v.Args[1]
4936 if !(t.(*types.Type).Size() == 1) {
4937 break
4938 }
4939 v.reset(OpWasmI64Store8)
4940 v.AddArg(ptr)
4941 v.AddArg(val)
4942 v.AddArg(mem)
4943 return true
4944 }
4945 return false
4946 }
4947 func rewriteValueWasm_OpSub16_0(v *Value) bool {
4948
4949
4950
4951 for {
4952 y := v.Args[1]
4953 x := v.Args[0]
4954 v.reset(OpWasmI64Sub)
4955 v.AddArg(x)
4956 v.AddArg(y)
4957 return true
4958 }
4959 }
4960 func rewriteValueWasm_OpSub32_0(v *Value) bool {
4961
4962
4963
4964 for {
4965 y := v.Args[1]
4966 x := v.Args[0]
4967 v.reset(OpWasmI64Sub)
4968 v.AddArg(x)
4969 v.AddArg(y)
4970 return true
4971 }
4972 }
4973 func rewriteValueWasm_OpSub32F_0(v *Value) bool {
4974
4975
4976
4977 for {
4978 y := v.Args[1]
4979 x := v.Args[0]
4980 v.reset(OpWasmF64Sub)
4981 v.AddArg(x)
4982 v.AddArg(y)
4983 return true
4984 }
4985 }
4986 func rewriteValueWasm_OpSub64_0(v *Value) bool {
4987
4988
4989
4990 for {
4991 y := v.Args[1]
4992 x := v.Args[0]
4993 v.reset(OpWasmI64Sub)
4994 v.AddArg(x)
4995 v.AddArg(y)
4996 return true
4997 }
4998 }
4999 func rewriteValueWasm_OpSub64F_0(v *Value) bool {
5000
5001
5002
5003 for {
5004 y := v.Args[1]
5005 x := v.Args[0]
5006 v.reset(OpWasmF64Sub)
5007 v.AddArg(x)
5008 v.AddArg(y)
5009 return true
5010 }
5011 }
5012 func rewriteValueWasm_OpSub8_0(v *Value) bool {
5013
5014
5015
5016 for {
5017 y := v.Args[1]
5018 x := v.Args[0]
5019 v.reset(OpWasmI64Sub)
5020 v.AddArg(x)
5021 v.AddArg(y)
5022 return true
5023 }
5024 }
5025 func rewriteValueWasm_OpSubPtr_0(v *Value) bool {
5026
5027
5028
5029 for {
5030 y := v.Args[1]
5031 x := v.Args[0]
5032 v.reset(OpWasmI64Sub)
5033 v.AddArg(x)
5034 v.AddArg(y)
5035 return true
5036 }
5037 }
5038 func rewriteValueWasm_OpTrunc_0(v *Value) bool {
5039
5040
5041
5042 for {
5043 x := v.Args[0]
5044 v.reset(OpWasmF64Trunc)
5045 v.AddArg(x)
5046 return true
5047 }
5048 }
5049 func rewriteValueWasm_OpTrunc16to8_0(v *Value) bool {
5050
5051
5052
5053 for {
5054 x := v.Args[0]
5055 v.reset(OpCopy)
5056 v.Type = x.Type
5057 v.AddArg(x)
5058 return true
5059 }
5060 }
5061 func rewriteValueWasm_OpTrunc32to16_0(v *Value) bool {
5062
5063
5064
5065 for {
5066 x := v.Args[0]
5067 v.reset(OpCopy)
5068 v.Type = x.Type
5069 v.AddArg(x)
5070 return true
5071 }
5072 }
5073 func rewriteValueWasm_OpTrunc32to8_0(v *Value) bool {
5074
5075
5076
5077 for {
5078 x := v.Args[0]
5079 v.reset(OpCopy)
5080 v.Type = x.Type
5081 v.AddArg(x)
5082 return true
5083 }
5084 }
5085 func rewriteValueWasm_OpTrunc64to16_0(v *Value) bool {
5086
5087
5088
5089 for {
5090 x := v.Args[0]
5091 v.reset(OpCopy)
5092 v.Type = x.Type
5093 v.AddArg(x)
5094 return true
5095 }
5096 }
5097 func rewriteValueWasm_OpTrunc64to32_0(v *Value) bool {
5098
5099
5100
5101 for {
5102 x := v.Args[0]
5103 v.reset(OpCopy)
5104 v.Type = x.Type
5105 v.AddArg(x)
5106 return true
5107 }
5108 }
5109 func rewriteValueWasm_OpTrunc64to8_0(v *Value) bool {
5110
5111
5112
5113 for {
5114 x := v.Args[0]
5115 v.reset(OpCopy)
5116 v.Type = x.Type
5117 v.AddArg(x)
5118 return true
5119 }
5120 }
5121 func rewriteValueWasm_OpWB_0(v *Value) bool {
5122
5123
5124
5125 for {
5126 fn := v.Aux
5127 mem := v.Args[2]
5128 destptr := v.Args[0]
5129 srcptr := v.Args[1]
5130 v.reset(OpWasmLoweredWB)
5131 v.Aux = fn
5132 v.AddArg(destptr)
5133 v.AddArg(srcptr)
5134 v.AddArg(mem)
5135 return true
5136 }
5137 }
5138 func rewriteValueWasm_OpWasmF64Add_0(v *Value) bool {
5139 b := v.Block
5140 typ := &b.Func.Config.Types
5141
5142
5143
5144 for {
5145 _ = v.Args[1]
5146 v_0 := v.Args[0]
5147 if v_0.Op != OpWasmF64Const {
5148 break
5149 }
5150 x := v_0.AuxInt
5151 v_1 := v.Args[1]
5152 if v_1.Op != OpWasmF64Const {
5153 break
5154 }
5155 y := v_1.AuxInt
5156 v.reset(OpWasmF64Const)
5157 v.AuxInt = auxFrom64F(auxTo64F(x) + auxTo64F(y))
5158 return true
5159 }
5160
5161
5162
5163 for {
5164 y := v.Args[1]
5165 v_0 := v.Args[0]
5166 if v_0.Op != OpWasmF64Const {
5167 break
5168 }
5169 x := v_0.AuxInt
5170 v.reset(OpWasmF64Add)
5171 v.AddArg(y)
5172 v0 := b.NewValue0(v.Pos, OpWasmF64Const, typ.Float64)
5173 v0.AuxInt = x
5174 v.AddArg(v0)
5175 return true
5176 }
5177 return false
5178 }
5179 func rewriteValueWasm_OpWasmF64Mul_0(v *Value) bool {
5180 b := v.Block
5181 typ := &b.Func.Config.Types
5182
5183
5184
5185 for {
5186 _ = v.Args[1]
5187 v_0 := v.Args[0]
5188 if v_0.Op != OpWasmF64Const {
5189 break
5190 }
5191 x := v_0.AuxInt
5192 v_1 := v.Args[1]
5193 if v_1.Op != OpWasmF64Const {
5194 break
5195 }
5196 y := v_1.AuxInt
5197 v.reset(OpWasmF64Const)
5198 v.AuxInt = auxFrom64F(auxTo64F(x) * auxTo64F(y))
5199 return true
5200 }
5201
5202
5203
5204 for {
5205 y := v.Args[1]
5206 v_0 := v.Args[0]
5207 if v_0.Op != OpWasmF64Const {
5208 break
5209 }
5210 x := v_0.AuxInt
5211 v.reset(OpWasmF64Mul)
5212 v.AddArg(y)
5213 v0 := b.NewValue0(v.Pos, OpWasmF64Const, typ.Float64)
5214 v0.AuxInt = x
5215 v.AddArg(v0)
5216 return true
5217 }
5218 return false
5219 }
5220 func rewriteValueWasm_OpWasmI64Add_0(v *Value) bool {
5221 b := v.Block
5222 typ := &b.Func.Config.Types
5223
5224
5225
5226 for {
5227 _ = v.Args[1]
5228 v_0 := v.Args[0]
5229 if v_0.Op != OpWasmI64Const {
5230 break
5231 }
5232 x := v_0.AuxInt
5233 v_1 := v.Args[1]
5234 if v_1.Op != OpWasmI64Const {
5235 break
5236 }
5237 y := v_1.AuxInt
5238 v.reset(OpWasmI64Const)
5239 v.AuxInt = x + y
5240 return true
5241 }
5242
5243
5244
5245 for {
5246 y := v.Args[1]
5247 v_0 := v.Args[0]
5248 if v_0.Op != OpWasmI64Const {
5249 break
5250 }
5251 x := v_0.AuxInt
5252 v.reset(OpWasmI64Add)
5253 v.AddArg(y)
5254 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
5255 v0.AuxInt = x
5256 v.AddArg(v0)
5257 return true
5258 }
5259
5260
5261
5262 for {
5263 _ = v.Args[1]
5264 x := v.Args[0]
5265 v_1 := v.Args[1]
5266 if v_1.Op != OpWasmI64Const {
5267 break
5268 }
5269 y := v_1.AuxInt
5270 v.reset(OpWasmI64AddConst)
5271 v.AuxInt = y
5272 v.AddArg(x)
5273 return true
5274 }
5275 return false
5276 }
5277 func rewriteValueWasm_OpWasmI64AddConst_0(v *Value) bool {
5278
5279
5280
5281 for {
5282 if v.AuxInt != 0 {
5283 break
5284 }
5285 x := v.Args[0]
5286 v.reset(OpCopy)
5287 v.Type = x.Type
5288 v.AddArg(x)
5289 return true
5290 }
5291
5292
5293
5294 for {
5295 off := v.AuxInt
5296 v_0 := v.Args[0]
5297 if v_0.Op != OpWasmLoweredAddr {
5298 break
5299 }
5300 off2 := v_0.AuxInt
5301 sym := v_0.Aux
5302 base := v_0.Args[0]
5303 if !(isU32Bit(off + off2)) {
5304 break
5305 }
5306 v.reset(OpWasmLoweredAddr)
5307 v.AuxInt = off + off2
5308 v.Aux = sym
5309 v.AddArg(base)
5310 return true
5311 }
5312 return false
5313 }
5314 func rewriteValueWasm_OpWasmI64And_0(v *Value) bool {
5315 b := v.Block
5316 typ := &b.Func.Config.Types
5317
5318
5319
5320 for {
5321 _ = v.Args[1]
5322 v_0 := v.Args[0]
5323 if v_0.Op != OpWasmI64Const {
5324 break
5325 }
5326 x := v_0.AuxInt
5327 v_1 := v.Args[1]
5328 if v_1.Op != OpWasmI64Const {
5329 break
5330 }
5331 y := v_1.AuxInt
5332 v.reset(OpWasmI64Const)
5333 v.AuxInt = x & y
5334 return true
5335 }
5336
5337
5338
5339 for {
5340 y := v.Args[1]
5341 v_0 := v.Args[0]
5342 if v_0.Op != OpWasmI64Const {
5343 break
5344 }
5345 x := v_0.AuxInt
5346 v.reset(OpWasmI64And)
5347 v.AddArg(y)
5348 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
5349 v0.AuxInt = x
5350 v.AddArg(v0)
5351 return true
5352 }
5353 return false
5354 }
5355 func rewriteValueWasm_OpWasmI64Eq_0(v *Value) bool {
5356 b := v.Block
5357 typ := &b.Func.Config.Types
5358
5359
5360
5361 for {
5362 _ = v.Args[1]
5363 v_0 := v.Args[0]
5364 if v_0.Op != OpWasmI64Const {
5365 break
5366 }
5367 x := v_0.AuxInt
5368 v_1 := v.Args[1]
5369 if v_1.Op != OpWasmI64Const {
5370 break
5371 }
5372 y := v_1.AuxInt
5373 if !(x == y) {
5374 break
5375 }
5376 v.reset(OpWasmI64Const)
5377 v.AuxInt = 1
5378 return true
5379 }
5380
5381
5382
5383 for {
5384 _ = v.Args[1]
5385 v_0 := v.Args[0]
5386 if v_0.Op != OpWasmI64Const {
5387 break
5388 }
5389 x := v_0.AuxInt
5390 v_1 := v.Args[1]
5391 if v_1.Op != OpWasmI64Const {
5392 break
5393 }
5394 y := v_1.AuxInt
5395 if !(x != y) {
5396 break
5397 }
5398 v.reset(OpWasmI64Const)
5399 v.AuxInt = 0
5400 return true
5401 }
5402
5403
5404
5405 for {
5406 y := v.Args[1]
5407 v_0 := v.Args[0]
5408 if v_0.Op != OpWasmI64Const {
5409 break
5410 }
5411 x := v_0.AuxInt
5412 v.reset(OpWasmI64Eq)
5413 v.AddArg(y)
5414 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
5415 v0.AuxInt = x
5416 v.AddArg(v0)
5417 return true
5418 }
5419
5420
5421
5422 for {
5423 _ = v.Args[1]
5424 x := v.Args[0]
5425 v_1 := v.Args[1]
5426 if v_1.Op != OpWasmI64Const {
5427 break
5428 }
5429 if v_1.AuxInt != 0 {
5430 break
5431 }
5432 v.reset(OpWasmI64Eqz)
5433 v.AddArg(x)
5434 return true
5435 }
5436 return false
5437 }
5438 func rewriteValueWasm_OpWasmI64Eqz_0(v *Value) bool {
5439
5440
5441
5442 for {
5443 v_0 := v.Args[0]
5444 if v_0.Op != OpWasmI64Eqz {
5445 break
5446 }
5447 v_0_0 := v_0.Args[0]
5448 if v_0_0.Op != OpWasmI64Eqz {
5449 break
5450 }
5451 x := v_0_0.Args[0]
5452 v.reset(OpWasmI64Eqz)
5453 v.AddArg(x)
5454 return true
5455 }
5456 return false
5457 }
5458 func rewriteValueWasm_OpWasmI64Load_0(v *Value) bool {
5459
5460
5461
5462 for {
5463 off := v.AuxInt
5464 mem := v.Args[1]
5465 v_0 := v.Args[0]
5466 if v_0.Op != OpWasmI64AddConst {
5467 break
5468 }
5469 off2 := v_0.AuxInt
5470 ptr := v_0.Args[0]
5471 if !(isU32Bit(off + off2)) {
5472 break
5473 }
5474 v.reset(OpWasmI64Load)
5475 v.AuxInt = off + off2
5476 v.AddArg(ptr)
5477 v.AddArg(mem)
5478 return true
5479 }
5480 return false
5481 }
5482 func rewriteValueWasm_OpWasmI64Load16S_0(v *Value) bool {
5483
5484
5485
5486 for {
5487 off := v.AuxInt
5488 mem := v.Args[1]
5489 v_0 := v.Args[0]
5490 if v_0.Op != OpWasmI64AddConst {
5491 break
5492 }
5493 off2 := v_0.AuxInt
5494 ptr := v_0.Args[0]
5495 if !(isU32Bit(off + off2)) {
5496 break
5497 }
5498 v.reset(OpWasmI64Load16S)
5499 v.AuxInt = off + off2
5500 v.AddArg(ptr)
5501 v.AddArg(mem)
5502 return true
5503 }
5504 return false
5505 }
5506 func rewriteValueWasm_OpWasmI64Load16U_0(v *Value) bool {
5507
5508
5509
5510 for {
5511 off := v.AuxInt
5512 mem := v.Args[1]
5513 v_0 := v.Args[0]
5514 if v_0.Op != OpWasmI64AddConst {
5515 break
5516 }
5517 off2 := v_0.AuxInt
5518 ptr := v_0.Args[0]
5519 if !(isU32Bit(off + off2)) {
5520 break
5521 }
5522 v.reset(OpWasmI64Load16U)
5523 v.AuxInt = off + off2
5524 v.AddArg(ptr)
5525 v.AddArg(mem)
5526 return true
5527 }
5528 return false
5529 }
5530 func rewriteValueWasm_OpWasmI64Load32S_0(v *Value) bool {
5531
5532
5533
5534 for {
5535 off := v.AuxInt
5536 mem := v.Args[1]
5537 v_0 := v.Args[0]
5538 if v_0.Op != OpWasmI64AddConst {
5539 break
5540 }
5541 off2 := v_0.AuxInt
5542 ptr := v_0.Args[0]
5543 if !(isU32Bit(off + off2)) {
5544 break
5545 }
5546 v.reset(OpWasmI64Load32S)
5547 v.AuxInt = off + off2
5548 v.AddArg(ptr)
5549 v.AddArg(mem)
5550 return true
5551 }
5552 return false
5553 }
5554 func rewriteValueWasm_OpWasmI64Load32U_0(v *Value) bool {
5555
5556
5557
5558 for {
5559 off := v.AuxInt
5560 mem := v.Args[1]
5561 v_0 := v.Args[0]
5562 if v_0.Op != OpWasmI64AddConst {
5563 break
5564 }
5565 off2 := v_0.AuxInt
5566 ptr := v_0.Args[0]
5567 if !(isU32Bit(off + off2)) {
5568 break
5569 }
5570 v.reset(OpWasmI64Load32U)
5571 v.AuxInt = off + off2
5572 v.AddArg(ptr)
5573 v.AddArg(mem)
5574 return true
5575 }
5576 return false
5577 }
5578 func rewriteValueWasm_OpWasmI64Load8S_0(v *Value) bool {
5579
5580
5581
5582 for {
5583 off := v.AuxInt
5584 mem := v.Args[1]
5585 v_0 := v.Args[0]
5586 if v_0.Op != OpWasmI64AddConst {
5587 break
5588 }
5589 off2 := v_0.AuxInt
5590 ptr := v_0.Args[0]
5591 if !(isU32Bit(off + off2)) {
5592 break
5593 }
5594 v.reset(OpWasmI64Load8S)
5595 v.AuxInt = off + off2
5596 v.AddArg(ptr)
5597 v.AddArg(mem)
5598 return true
5599 }
5600 return false
5601 }
5602 func rewriteValueWasm_OpWasmI64Load8U_0(v *Value) bool {
5603
5604
5605
5606 for {
5607 off := v.AuxInt
5608 mem := v.Args[1]
5609 v_0 := v.Args[0]
5610 if v_0.Op != OpWasmI64AddConst {
5611 break
5612 }
5613 off2 := v_0.AuxInt
5614 ptr := v_0.Args[0]
5615 if !(isU32Bit(off + off2)) {
5616 break
5617 }
5618 v.reset(OpWasmI64Load8U)
5619 v.AuxInt = off + off2
5620 v.AddArg(ptr)
5621 v.AddArg(mem)
5622 return true
5623 }
5624 return false
5625 }
5626 func rewriteValueWasm_OpWasmI64Mul_0(v *Value) bool {
5627 b := v.Block
5628 typ := &b.Func.Config.Types
5629
5630
5631
5632 for {
5633 _ = v.Args[1]
5634 v_0 := v.Args[0]
5635 if v_0.Op != OpWasmI64Const {
5636 break
5637 }
5638 x := v_0.AuxInt
5639 v_1 := v.Args[1]
5640 if v_1.Op != OpWasmI64Const {
5641 break
5642 }
5643 y := v_1.AuxInt
5644 v.reset(OpWasmI64Const)
5645 v.AuxInt = x * y
5646 return true
5647 }
5648
5649
5650
5651 for {
5652 y := v.Args[1]
5653 v_0 := v.Args[0]
5654 if v_0.Op != OpWasmI64Const {
5655 break
5656 }
5657 x := v_0.AuxInt
5658 v.reset(OpWasmI64Mul)
5659 v.AddArg(y)
5660 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
5661 v0.AuxInt = x
5662 v.AddArg(v0)
5663 return true
5664 }
5665 return false
5666 }
5667 func rewriteValueWasm_OpWasmI64Ne_0(v *Value) bool {
5668 b := v.Block
5669 typ := &b.Func.Config.Types
5670
5671
5672
5673 for {
5674 _ = v.Args[1]
5675 v_0 := v.Args[0]
5676 if v_0.Op != OpWasmI64Const {
5677 break
5678 }
5679 x := v_0.AuxInt
5680 v_1 := v.Args[1]
5681 if v_1.Op != OpWasmI64Const {
5682 break
5683 }
5684 y := v_1.AuxInt
5685 if !(x == y) {
5686 break
5687 }
5688 v.reset(OpWasmI64Const)
5689 v.AuxInt = 0
5690 return true
5691 }
5692
5693
5694
5695 for {
5696 _ = v.Args[1]
5697 v_0 := v.Args[0]
5698 if v_0.Op != OpWasmI64Const {
5699 break
5700 }
5701 x := v_0.AuxInt
5702 v_1 := v.Args[1]
5703 if v_1.Op != OpWasmI64Const {
5704 break
5705 }
5706 y := v_1.AuxInt
5707 if !(x != y) {
5708 break
5709 }
5710 v.reset(OpWasmI64Const)
5711 v.AuxInt = 1
5712 return true
5713 }
5714
5715
5716
5717 for {
5718 y := v.Args[1]
5719 v_0 := v.Args[0]
5720 if v_0.Op != OpWasmI64Const {
5721 break
5722 }
5723 x := v_0.AuxInt
5724 v.reset(OpWasmI64Ne)
5725 v.AddArg(y)
5726 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
5727 v0.AuxInt = x
5728 v.AddArg(v0)
5729 return true
5730 }
5731
5732
5733
5734 for {
5735 _ = v.Args[1]
5736 x := v.Args[0]
5737 v_1 := v.Args[1]
5738 if v_1.Op != OpWasmI64Const {
5739 break
5740 }
5741 if v_1.AuxInt != 0 {
5742 break
5743 }
5744 v.reset(OpWasmI64Eqz)
5745 v0 := b.NewValue0(v.Pos, OpWasmI64Eqz, typ.Bool)
5746 v0.AddArg(x)
5747 v.AddArg(v0)
5748 return true
5749 }
5750 return false
5751 }
5752 func rewriteValueWasm_OpWasmI64Or_0(v *Value) bool {
5753 b := v.Block
5754 typ := &b.Func.Config.Types
5755
5756
5757
5758 for {
5759 _ = v.Args[1]
5760 v_0 := v.Args[0]
5761 if v_0.Op != OpWasmI64Const {
5762 break
5763 }
5764 x := v_0.AuxInt
5765 v_1 := v.Args[1]
5766 if v_1.Op != OpWasmI64Const {
5767 break
5768 }
5769 y := v_1.AuxInt
5770 v.reset(OpWasmI64Const)
5771 v.AuxInt = x | y
5772 return true
5773 }
5774
5775
5776
5777 for {
5778 y := v.Args[1]
5779 v_0 := v.Args[0]
5780 if v_0.Op != OpWasmI64Const {
5781 break
5782 }
5783 x := v_0.AuxInt
5784 v.reset(OpWasmI64Or)
5785 v.AddArg(y)
5786 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
5787 v0.AuxInt = x
5788 v.AddArg(v0)
5789 return true
5790 }
5791 return false
5792 }
5793 func rewriteValueWasm_OpWasmI64Shl_0(v *Value) bool {
5794
5795
5796
5797 for {
5798 _ = v.Args[1]
5799 v_0 := v.Args[0]
5800 if v_0.Op != OpWasmI64Const {
5801 break
5802 }
5803 x := v_0.AuxInt
5804 v_1 := v.Args[1]
5805 if v_1.Op != OpWasmI64Const {
5806 break
5807 }
5808 y := v_1.AuxInt
5809 v.reset(OpWasmI64Const)
5810 v.AuxInt = x << uint64(y)
5811 return true
5812 }
5813 return false
5814 }
5815 func rewriteValueWasm_OpWasmI64ShrS_0(v *Value) bool {
5816
5817
5818
5819 for {
5820 _ = v.Args[1]
5821 v_0 := v.Args[0]
5822 if v_0.Op != OpWasmI64Const {
5823 break
5824 }
5825 x := v_0.AuxInt
5826 v_1 := v.Args[1]
5827 if v_1.Op != OpWasmI64Const {
5828 break
5829 }
5830 y := v_1.AuxInt
5831 v.reset(OpWasmI64Const)
5832 v.AuxInt = x >> uint64(y)
5833 return true
5834 }
5835 return false
5836 }
5837 func rewriteValueWasm_OpWasmI64ShrU_0(v *Value) bool {
5838
5839
5840
5841 for {
5842 _ = v.Args[1]
5843 v_0 := v.Args[0]
5844 if v_0.Op != OpWasmI64Const {
5845 break
5846 }
5847 x := v_0.AuxInt
5848 v_1 := v.Args[1]
5849 if v_1.Op != OpWasmI64Const {
5850 break
5851 }
5852 y := v_1.AuxInt
5853 v.reset(OpWasmI64Const)
5854 v.AuxInt = int64(uint64(x) >> uint64(y))
5855 return true
5856 }
5857 return false
5858 }
5859 func rewriteValueWasm_OpWasmI64Store_0(v *Value) bool {
5860
5861
5862
5863 for {
5864 off := v.AuxInt
5865 mem := v.Args[2]
5866 v_0 := v.Args[0]
5867 if v_0.Op != OpWasmI64AddConst {
5868 break
5869 }
5870 off2 := v_0.AuxInt
5871 ptr := v_0.Args[0]
5872 val := v.Args[1]
5873 if !(isU32Bit(off + off2)) {
5874 break
5875 }
5876 v.reset(OpWasmI64Store)
5877 v.AuxInt = off + off2
5878 v.AddArg(ptr)
5879 v.AddArg(val)
5880 v.AddArg(mem)
5881 return true
5882 }
5883 return false
5884 }
5885 func rewriteValueWasm_OpWasmI64Store16_0(v *Value) bool {
5886
5887
5888
5889 for {
5890 off := v.AuxInt
5891 mem := v.Args[2]
5892 v_0 := v.Args[0]
5893 if v_0.Op != OpWasmI64AddConst {
5894 break
5895 }
5896 off2 := v_0.AuxInt
5897 ptr := v_0.Args[0]
5898 val := v.Args[1]
5899 if !(isU32Bit(off + off2)) {
5900 break
5901 }
5902 v.reset(OpWasmI64Store16)
5903 v.AuxInt = off + off2
5904 v.AddArg(ptr)
5905 v.AddArg(val)
5906 v.AddArg(mem)
5907 return true
5908 }
5909 return false
5910 }
5911 func rewriteValueWasm_OpWasmI64Store32_0(v *Value) bool {
5912
5913
5914
5915 for {
5916 off := v.AuxInt
5917 mem := v.Args[2]
5918 v_0 := v.Args[0]
5919 if v_0.Op != OpWasmI64AddConst {
5920 break
5921 }
5922 off2 := v_0.AuxInt
5923 ptr := v_0.Args[0]
5924 val := v.Args[1]
5925 if !(isU32Bit(off + off2)) {
5926 break
5927 }
5928 v.reset(OpWasmI64Store32)
5929 v.AuxInt = off + off2
5930 v.AddArg(ptr)
5931 v.AddArg(val)
5932 v.AddArg(mem)
5933 return true
5934 }
5935 return false
5936 }
5937 func rewriteValueWasm_OpWasmI64Store8_0(v *Value) bool {
5938
5939
5940
5941 for {
5942 off := v.AuxInt
5943 mem := v.Args[2]
5944 v_0 := v.Args[0]
5945 if v_0.Op != OpWasmI64AddConst {
5946 break
5947 }
5948 off2 := v_0.AuxInt
5949 ptr := v_0.Args[0]
5950 val := v.Args[1]
5951 if !(isU32Bit(off + off2)) {
5952 break
5953 }
5954 v.reset(OpWasmI64Store8)
5955 v.AuxInt = off + off2
5956 v.AddArg(ptr)
5957 v.AddArg(val)
5958 v.AddArg(mem)
5959 return true
5960 }
5961 return false
5962 }
5963 func rewriteValueWasm_OpWasmI64Xor_0(v *Value) bool {
5964 b := v.Block
5965 typ := &b.Func.Config.Types
5966
5967
5968
5969 for {
5970 _ = v.Args[1]
5971 v_0 := v.Args[0]
5972 if v_0.Op != OpWasmI64Const {
5973 break
5974 }
5975 x := v_0.AuxInt
5976 v_1 := v.Args[1]
5977 if v_1.Op != OpWasmI64Const {
5978 break
5979 }
5980 y := v_1.AuxInt
5981 v.reset(OpWasmI64Const)
5982 v.AuxInt = x ^ y
5983 return true
5984 }
5985
5986
5987
5988 for {
5989 y := v.Args[1]
5990 v_0 := v.Args[0]
5991 if v_0.Op != OpWasmI64Const {
5992 break
5993 }
5994 x := v_0.AuxInt
5995 v.reset(OpWasmI64Xor)
5996 v.AddArg(y)
5997 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
5998 v0.AuxInt = x
5999 v.AddArg(v0)
6000 return true
6001 }
6002 return false
6003 }
6004 func rewriteValueWasm_OpXor16_0(v *Value) bool {
6005
6006
6007
6008 for {
6009 y := v.Args[1]
6010 x := v.Args[0]
6011 v.reset(OpWasmI64Xor)
6012 v.AddArg(x)
6013 v.AddArg(y)
6014 return true
6015 }
6016 }
6017 func rewriteValueWasm_OpXor32_0(v *Value) bool {
6018
6019
6020
6021 for {
6022 y := v.Args[1]
6023 x := v.Args[0]
6024 v.reset(OpWasmI64Xor)
6025 v.AddArg(x)
6026 v.AddArg(y)
6027 return true
6028 }
6029 }
6030 func rewriteValueWasm_OpXor64_0(v *Value) bool {
6031
6032
6033
6034 for {
6035 y := v.Args[1]
6036 x := v.Args[0]
6037 v.reset(OpWasmI64Xor)
6038 v.AddArg(x)
6039 v.AddArg(y)
6040 return true
6041 }
6042 }
6043 func rewriteValueWasm_OpXor8_0(v *Value) bool {
6044
6045
6046
6047 for {
6048 y := v.Args[1]
6049 x := v.Args[0]
6050 v.reset(OpWasmI64Xor)
6051 v.AddArg(x)
6052 v.AddArg(y)
6053 return true
6054 }
6055 }
6056 func rewriteValueWasm_OpZero_0(v *Value) bool {
6057 b := v.Block
6058 typ := &b.Func.Config.Types
6059
6060
6061
6062 for {
6063 if v.AuxInt != 0 {
6064 break
6065 }
6066 mem := v.Args[1]
6067 v.reset(OpCopy)
6068 v.Type = mem.Type
6069 v.AddArg(mem)
6070 return true
6071 }
6072
6073
6074
6075 for {
6076 if v.AuxInt != 1 {
6077 break
6078 }
6079 mem := v.Args[1]
6080 destptr := v.Args[0]
6081 v.reset(OpWasmI64Store8)
6082 v.AddArg(destptr)
6083 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
6084 v0.AuxInt = 0
6085 v.AddArg(v0)
6086 v.AddArg(mem)
6087 return true
6088 }
6089
6090
6091
6092 for {
6093 if v.AuxInt != 2 {
6094 break
6095 }
6096 mem := v.Args[1]
6097 destptr := v.Args[0]
6098 v.reset(OpWasmI64Store16)
6099 v.AddArg(destptr)
6100 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
6101 v0.AuxInt = 0
6102 v.AddArg(v0)
6103 v.AddArg(mem)
6104 return true
6105 }
6106
6107
6108
6109 for {
6110 if v.AuxInt != 4 {
6111 break
6112 }
6113 mem := v.Args[1]
6114 destptr := v.Args[0]
6115 v.reset(OpWasmI64Store32)
6116 v.AddArg(destptr)
6117 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
6118 v0.AuxInt = 0
6119 v.AddArg(v0)
6120 v.AddArg(mem)
6121 return true
6122 }
6123
6124
6125
6126 for {
6127 if v.AuxInt != 8 {
6128 break
6129 }
6130 mem := v.Args[1]
6131 destptr := v.Args[0]
6132 v.reset(OpWasmI64Store)
6133 v.AddArg(destptr)
6134 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
6135 v0.AuxInt = 0
6136 v.AddArg(v0)
6137 v.AddArg(mem)
6138 return true
6139 }
6140
6141
6142
6143 for {
6144 if v.AuxInt != 3 {
6145 break
6146 }
6147 mem := v.Args[1]
6148 destptr := v.Args[0]
6149 v.reset(OpWasmI64Store8)
6150 v.AuxInt = 2
6151 v.AddArg(destptr)
6152 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
6153 v0.AuxInt = 0
6154 v.AddArg(v0)
6155 v1 := b.NewValue0(v.Pos, OpWasmI64Store16, types.TypeMem)
6156 v1.AddArg(destptr)
6157 v2 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
6158 v2.AuxInt = 0
6159 v1.AddArg(v2)
6160 v1.AddArg(mem)
6161 v.AddArg(v1)
6162 return true
6163 }
6164
6165
6166
6167 for {
6168 if v.AuxInt != 5 {
6169 break
6170 }
6171 mem := v.Args[1]
6172 destptr := v.Args[0]
6173 v.reset(OpWasmI64Store8)
6174 v.AuxInt = 4
6175 v.AddArg(destptr)
6176 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
6177 v0.AuxInt = 0
6178 v.AddArg(v0)
6179 v1 := b.NewValue0(v.Pos, OpWasmI64Store32, types.TypeMem)
6180 v1.AddArg(destptr)
6181 v2 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
6182 v2.AuxInt = 0
6183 v1.AddArg(v2)
6184 v1.AddArg(mem)
6185 v.AddArg(v1)
6186 return true
6187 }
6188
6189
6190
6191 for {
6192 if v.AuxInt != 6 {
6193 break
6194 }
6195 mem := v.Args[1]
6196 destptr := v.Args[0]
6197 v.reset(OpWasmI64Store16)
6198 v.AuxInt = 4
6199 v.AddArg(destptr)
6200 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
6201 v0.AuxInt = 0
6202 v.AddArg(v0)
6203 v1 := b.NewValue0(v.Pos, OpWasmI64Store32, types.TypeMem)
6204 v1.AddArg(destptr)
6205 v2 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
6206 v2.AuxInt = 0
6207 v1.AddArg(v2)
6208 v1.AddArg(mem)
6209 v.AddArg(v1)
6210 return true
6211 }
6212
6213
6214
6215 for {
6216 if v.AuxInt != 7 {
6217 break
6218 }
6219 mem := v.Args[1]
6220 destptr := v.Args[0]
6221 v.reset(OpWasmI64Store32)
6222 v.AuxInt = 3
6223 v.AddArg(destptr)
6224 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
6225 v0.AuxInt = 0
6226 v.AddArg(v0)
6227 v1 := b.NewValue0(v.Pos, OpWasmI64Store32, types.TypeMem)
6228 v1.AddArg(destptr)
6229 v2 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
6230 v2.AuxInt = 0
6231 v1.AddArg(v2)
6232 v1.AddArg(mem)
6233 v.AddArg(v1)
6234 return true
6235 }
6236
6237
6238
6239 for {
6240 s := v.AuxInt
6241 mem := v.Args[1]
6242 destptr := v.Args[0]
6243 if !(s%8 != 0 && s > 8) {
6244 break
6245 }
6246 v.reset(OpZero)
6247 v.AuxInt = s - s%8
6248 v0 := b.NewValue0(v.Pos, OpOffPtr, destptr.Type)
6249 v0.AuxInt = s % 8
6250 v0.AddArg(destptr)
6251 v.AddArg(v0)
6252 v1 := b.NewValue0(v.Pos, OpWasmI64Store, types.TypeMem)
6253 v1.AddArg(destptr)
6254 v2 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
6255 v2.AuxInt = 0
6256 v1.AddArg(v2)
6257 v1.AddArg(mem)
6258 v.AddArg(v1)
6259 return true
6260 }
6261 return false
6262 }
6263 func rewriteValueWasm_OpZero_10(v *Value) bool {
6264 b := v.Block
6265 typ := &b.Func.Config.Types
6266
6267
6268
6269 for {
6270 if v.AuxInt != 16 {
6271 break
6272 }
6273 mem := v.Args[1]
6274 destptr := v.Args[0]
6275 v.reset(OpWasmI64Store)
6276 v.AuxInt = 8
6277 v.AddArg(destptr)
6278 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
6279 v0.AuxInt = 0
6280 v.AddArg(v0)
6281 v1 := b.NewValue0(v.Pos, OpWasmI64Store, types.TypeMem)
6282 v1.AddArg(destptr)
6283 v2 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
6284 v2.AuxInt = 0
6285 v1.AddArg(v2)
6286 v1.AddArg(mem)
6287 v.AddArg(v1)
6288 return true
6289 }
6290
6291
6292
6293 for {
6294 if v.AuxInt != 24 {
6295 break
6296 }
6297 mem := v.Args[1]
6298 destptr := v.Args[0]
6299 v.reset(OpWasmI64Store)
6300 v.AuxInt = 16
6301 v.AddArg(destptr)
6302 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
6303 v0.AuxInt = 0
6304 v.AddArg(v0)
6305 v1 := b.NewValue0(v.Pos, OpWasmI64Store, types.TypeMem)
6306 v1.AuxInt = 8
6307 v1.AddArg(destptr)
6308 v2 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
6309 v2.AuxInt = 0
6310 v1.AddArg(v2)
6311 v3 := b.NewValue0(v.Pos, OpWasmI64Store, types.TypeMem)
6312 v3.AddArg(destptr)
6313 v4 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
6314 v4.AuxInt = 0
6315 v3.AddArg(v4)
6316 v3.AddArg(mem)
6317 v1.AddArg(v3)
6318 v.AddArg(v1)
6319 return true
6320 }
6321
6322
6323
6324 for {
6325 if v.AuxInt != 32 {
6326 break
6327 }
6328 mem := v.Args[1]
6329 destptr := v.Args[0]
6330 v.reset(OpWasmI64Store)
6331 v.AuxInt = 24
6332 v.AddArg(destptr)
6333 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
6334 v0.AuxInt = 0
6335 v.AddArg(v0)
6336 v1 := b.NewValue0(v.Pos, OpWasmI64Store, types.TypeMem)
6337 v1.AuxInt = 16
6338 v1.AddArg(destptr)
6339 v2 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
6340 v2.AuxInt = 0
6341 v1.AddArg(v2)
6342 v3 := b.NewValue0(v.Pos, OpWasmI64Store, types.TypeMem)
6343 v3.AuxInt = 8
6344 v3.AddArg(destptr)
6345 v4 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
6346 v4.AuxInt = 0
6347 v3.AddArg(v4)
6348 v5 := b.NewValue0(v.Pos, OpWasmI64Store, types.TypeMem)
6349 v5.AddArg(destptr)
6350 v6 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
6351 v6.AuxInt = 0
6352 v5.AddArg(v6)
6353 v5.AddArg(mem)
6354 v3.AddArg(v5)
6355 v1.AddArg(v3)
6356 v.AddArg(v1)
6357 return true
6358 }
6359
6360
6361
6362 for {
6363 s := v.AuxInt
6364 mem := v.Args[1]
6365 destptr := v.Args[0]
6366 if !(s%8 == 0 && s > 32) {
6367 break
6368 }
6369 v.reset(OpWasmLoweredZero)
6370 v.AuxInt = s / 8
6371 v.AddArg(destptr)
6372 v.AddArg(mem)
6373 return true
6374 }
6375 return false
6376 }
6377 func rewriteValueWasm_OpZeroExt16to32_0(v *Value) bool {
6378 b := v.Block
6379 typ := &b.Func.Config.Types
6380
6381
6382
6383 for {
6384 x := v.Args[0]
6385 if x.Op != OpWasmI64Load16U {
6386 break
6387 }
6388 _ = x.Args[1]
6389 v.reset(OpCopy)
6390 v.Type = x.Type
6391 v.AddArg(x)
6392 return true
6393 }
6394
6395
6396
6397 for {
6398 x := v.Args[0]
6399 v.reset(OpWasmI64And)
6400 v.AddArg(x)
6401 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
6402 v0.AuxInt = 0xffff
6403 v.AddArg(v0)
6404 return true
6405 }
6406 }
6407 func rewriteValueWasm_OpZeroExt16to64_0(v *Value) bool {
6408 b := v.Block
6409 typ := &b.Func.Config.Types
6410
6411
6412
6413 for {
6414 x := v.Args[0]
6415 if x.Op != OpWasmI64Load16U {
6416 break
6417 }
6418 _ = x.Args[1]
6419 v.reset(OpCopy)
6420 v.Type = x.Type
6421 v.AddArg(x)
6422 return true
6423 }
6424
6425
6426
6427 for {
6428 x := v.Args[0]
6429 v.reset(OpWasmI64And)
6430 v.AddArg(x)
6431 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
6432 v0.AuxInt = 0xffff
6433 v.AddArg(v0)
6434 return true
6435 }
6436 }
6437 func rewriteValueWasm_OpZeroExt32to64_0(v *Value) bool {
6438 b := v.Block
6439 typ := &b.Func.Config.Types
6440
6441
6442
6443 for {
6444 x := v.Args[0]
6445 if x.Op != OpWasmI64Load32U {
6446 break
6447 }
6448 _ = x.Args[1]
6449 v.reset(OpCopy)
6450 v.Type = x.Type
6451 v.AddArg(x)
6452 return true
6453 }
6454
6455
6456
6457 for {
6458 x := v.Args[0]
6459 v.reset(OpWasmI64And)
6460 v.AddArg(x)
6461 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
6462 v0.AuxInt = 0xffffffff
6463 v.AddArg(v0)
6464 return true
6465 }
6466 }
6467 func rewriteValueWasm_OpZeroExt8to16_0(v *Value) bool {
6468 b := v.Block
6469 typ := &b.Func.Config.Types
6470
6471
6472
6473 for {
6474 x := v.Args[0]
6475 if x.Op != OpWasmI64Load8U {
6476 break
6477 }
6478 _ = x.Args[1]
6479 v.reset(OpCopy)
6480 v.Type = x.Type
6481 v.AddArg(x)
6482 return true
6483 }
6484
6485
6486
6487 for {
6488 x := v.Args[0]
6489 v.reset(OpWasmI64And)
6490 v.AddArg(x)
6491 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
6492 v0.AuxInt = 0xff
6493 v.AddArg(v0)
6494 return true
6495 }
6496 }
6497 func rewriteValueWasm_OpZeroExt8to32_0(v *Value) bool {
6498 b := v.Block
6499 typ := &b.Func.Config.Types
6500
6501
6502
6503 for {
6504 x := v.Args[0]
6505 if x.Op != OpWasmI64Load8U {
6506 break
6507 }
6508 _ = x.Args[1]
6509 v.reset(OpCopy)
6510 v.Type = x.Type
6511 v.AddArg(x)
6512 return true
6513 }
6514
6515
6516
6517 for {
6518 x := v.Args[0]
6519 v.reset(OpWasmI64And)
6520 v.AddArg(x)
6521 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
6522 v0.AuxInt = 0xff
6523 v.AddArg(v0)
6524 return true
6525 }
6526 }
6527 func rewriteValueWasm_OpZeroExt8to64_0(v *Value) bool {
6528 b := v.Block
6529 typ := &b.Func.Config.Types
6530
6531
6532
6533 for {
6534 x := v.Args[0]
6535 if x.Op != OpWasmI64Load8U {
6536 break
6537 }
6538 _ = x.Args[1]
6539 v.reset(OpCopy)
6540 v.Type = x.Type
6541 v.AddArg(x)
6542 return true
6543 }
6544
6545
6546
6547 for {
6548 x := v.Args[0]
6549 v.reset(OpWasmI64And)
6550 v.AddArg(x)
6551 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
6552 v0.AuxInt = 0xff
6553 v.AddArg(v0)
6554 return true
6555 }
6556 }
6557 func rewriteBlockWasm(b *Block) bool {
6558 config := b.Func.Config
6559 typ := &config.Types
6560 _ = typ
6561 v := b.Control
6562 _ = v
6563 switch b.Kind {
6564 }
6565 return false
6566 }
6567
View as plain text