1
2
3 package ssa
4
5 import "math"
6 import "cmd/compile/internal/types"
7
8 func rewriteValueWasm(v *Value) bool {
9 switch v.Op {
10 case OpAbs:
11 v.Op = OpWasmF64Abs
12 return true
13 case OpAbsFloat32x4:
14 v.Op = OpWasmF32x4Abs
15 return true
16 case OpAbsFloat64x2:
17 v.Op = OpWasmF64x2Abs
18 return true
19 case OpAbsInt16x8:
20 v.Op = OpWasmI16x8Abs
21 return true
22 case OpAbsInt32x4:
23 v.Op = OpWasmI32x4Abs
24 return true
25 case OpAbsInt64x2:
26 v.Op = OpWasmI64x2Abs
27 return true
28 case OpAbsInt8x16:
29 v.Op = OpWasmI8x16Abs
30 return true
31 case OpAdd16:
32 v.Op = OpWasmI64Add
33 return true
34 case OpAdd32:
35 v.Op = OpWasmI64Add
36 return true
37 case OpAdd32F:
38 v.Op = OpWasmF32Add
39 return true
40 case OpAdd64:
41 v.Op = OpWasmI64Add
42 return true
43 case OpAdd64F:
44 v.Op = OpWasmF64Add
45 return true
46 case OpAdd8:
47 v.Op = OpWasmI64Add
48 return true
49 case OpAddFloat32x4:
50 v.Op = OpWasmF32x4Add
51 return true
52 case OpAddFloat64x2:
53 v.Op = OpWasmF64x2Add
54 return true
55 case OpAddInt16x8:
56 v.Op = OpWasmI16x8Add
57 return true
58 case OpAddInt32x4:
59 v.Op = OpWasmI32x4Add
60 return true
61 case OpAddInt64x2:
62 v.Op = OpWasmI64x2Add
63 return true
64 case OpAddInt8x16:
65 v.Op = OpWasmI8x16Add
66 return true
67 case OpAddPtr:
68 v.Op = OpWasmI64Add
69 return true
70 case OpAddSaturatedInt16x8:
71 v.Op = OpWasmI16x8AddSatS
72 return true
73 case OpAddSaturatedInt8x16:
74 v.Op = OpWasmI8x16AddSatS
75 return true
76 case OpAddSaturatedUint16x8:
77 v.Op = OpWasmI16x8AddSatU
78 return true
79 case OpAddSaturatedUint8x16:
80 v.Op = OpWasmI8x16AddSatU
81 return true
82 case OpAddr:
83 return rewriteValueWasm_OpAddr(v)
84 case OpAnd16:
85 v.Op = OpWasmI64And
86 return true
87 case OpAnd32:
88 v.Op = OpWasmI64And
89 return true
90 case OpAnd64:
91 v.Op = OpWasmI64And
92 return true
93 case OpAnd8:
94 v.Op = OpWasmI64And
95 return true
96 case OpAndB:
97 v.Op = OpWasmI64And
98 return true
99 case OpAndInt16x8:
100 v.Op = OpWasmV128And
101 return true
102 case OpAndInt32x4:
103 v.Op = OpWasmV128And
104 return true
105 case OpAndInt64x2:
106 v.Op = OpWasmV128And
107 return true
108 case OpAndInt8x16:
109 v.Op = OpWasmV128And
110 return true
111 case OpAndNotInt16x8:
112 v.Op = OpWasmV128Andnot
113 return true
114 case OpAndNotInt32x4:
115 v.Op = OpWasmV128Andnot
116 return true
117 case OpAndNotInt64x2:
118 v.Op = OpWasmV128Andnot
119 return true
120 case OpAndNotInt8x16:
121 v.Op = OpWasmV128Andnot
122 return true
123 case OpAndNotUint16x8:
124 v.Op = OpWasmV128Andnot
125 return true
126 case OpAndNotUint32x4:
127 v.Op = OpWasmV128Andnot
128 return true
129 case OpAndNotUint64x2:
130 v.Op = OpWasmV128Andnot
131 return true
132 case OpAndNotUint8x16:
133 v.Op = OpWasmV128Andnot
134 return true
135 case OpAndUint16x8:
136 v.Op = OpWasmV128And
137 return true
138 case OpAndUint32x4:
139 v.Op = OpWasmV128And
140 return true
141 case OpAndUint64x2:
142 v.Op = OpWasmV128And
143 return true
144 case OpAndUint8x16:
145 v.Op = OpWasmV128And
146 return true
147 case OpAverageUint16x8:
148 v.Op = OpWasmI16x8AvgrU
149 return true
150 case OpAverageUint8x16:
151 v.Op = OpWasmI8x16AvgrU
152 return true
153 case OpAvg64u:
154 return rewriteValueWasm_OpAvg64u(v)
155 case OpBitLen16:
156 return rewriteValueWasm_OpBitLen16(v)
157 case OpBitLen32:
158 return rewriteValueWasm_OpBitLen32(v)
159 case OpBitLen64:
160 return rewriteValueWasm_OpBitLen64(v)
161 case OpBitLen8:
162 return rewriteValueWasm_OpBitLen8(v)
163 case OpBitSelectInt16x8:
164 v.Op = OpWasmV128Bitselect
165 return true
166 case OpBitSelectInt32x4:
167 v.Op = OpWasmV128Bitselect
168 return true
169 case OpBitSelectInt64x2:
170 v.Op = OpWasmV128Bitselect
171 return true
172 case OpBitSelectInt8x16:
173 v.Op = OpWasmV128Bitselect
174 return true
175 case OpBitSelectUint16x8:
176 v.Op = OpWasmV128Bitselect
177 return true
178 case OpBitSelectUint32x4:
179 v.Op = OpWasmV128Bitselect
180 return true
181 case OpBitSelectUint64x2:
182 v.Op = OpWasmV128Bitselect
183 return true
184 case OpBitSelectUint8x16:
185 v.Op = OpWasmV128Bitselect
186 return true
187 case OpBroadcastFloat32x4:
188 v.Op = OpWasmF32x4Splat
189 return true
190 case OpBroadcastFloat64x2:
191 v.Op = OpWasmF64x2Splat
192 return true
193 case OpBroadcastInt16x8:
194 v.Op = OpWasmI16x8Splat
195 return true
196 case OpBroadcastInt32x4:
197 v.Op = OpWasmI32x4Splat
198 return true
199 case OpBroadcastInt64x2:
200 v.Op = OpWasmI64x2Splat
201 return true
202 case OpBroadcastInt8x16:
203 v.Op = OpWasmI8x16Splat
204 return true
205 case OpCeil:
206 v.Op = OpWasmF64Ceil
207 return true
208 case OpCeilFloat32x4:
209 v.Op = OpWasmF32x4Ceil
210 return true
211 case OpCeilFloat64x2:
212 v.Op = OpWasmF64x2Ceil
213 return true
214 case OpClosureCall:
215 v.Op = OpWasmLoweredClosureCall
216 return true
217 case OpCom16:
218 return rewriteValueWasm_OpCom16(v)
219 case OpCom32:
220 return rewriteValueWasm_OpCom32(v)
221 case OpCom64:
222 return rewriteValueWasm_OpCom64(v)
223 case OpCom8:
224 return rewriteValueWasm_OpCom8(v)
225 case OpCondSelect:
226 v.Op = OpWasmSelect
227 return true
228 case OpConst16:
229 return rewriteValueWasm_OpConst16(v)
230 case OpConst32:
231 return rewriteValueWasm_OpConst32(v)
232 case OpConst32F:
233 v.Op = OpWasmF32Const
234 return true
235 case OpConst64:
236 v.Op = OpWasmI64Const
237 return true
238 case OpConst64F:
239 v.Op = OpWasmF64Const
240 return true
241 case OpConst8:
242 return rewriteValueWasm_OpConst8(v)
243 case OpConstBool:
244 return rewriteValueWasm_OpConstBool(v)
245 case OpConstNil:
246 return rewriteValueWasm_OpConstNil(v)
247 case OpConvert:
248 v.Op = OpWasmLoweredConvert
249 return true
250 case OpConvertLo2ToFloat64Int32x4:
251 v.Op = OpWasmF64x2ConvertLowI32x4S
252 return true
253 case OpConvertLo2ToFloat64Uint32x4:
254 v.Op = OpWasmF64x2ConvertLowI32x4U
255 return true
256 case OpConvertToFloat32Int32x4:
257 v.Op = OpWasmF32x4ConvertI32x4S
258 return true
259 case OpConvertToFloat32Uint32x4:
260 v.Op = OpWasmF32x4ConvertI32x4U
261 return true
262 case OpConvertToInt32Float32x4:
263 v.Op = OpWasmI32x4TruncSatF32x4S
264 return true
265 case OpConvertToUint32Float32x4:
266 v.Op = OpWasmI32x4TruncSatF32x4U
267 return true
268 case OpCopysign:
269 v.Op = OpWasmF64Copysign
270 return true
271 case OpCtz16:
272 return rewriteValueWasm_OpCtz16(v)
273 case OpCtz16NonZero:
274 v.Op = OpWasmI64Ctz
275 return true
276 case OpCtz32:
277 return rewriteValueWasm_OpCtz32(v)
278 case OpCtz32NonZero:
279 v.Op = OpWasmI64Ctz
280 return true
281 case OpCtz64:
282 v.Op = OpWasmI64Ctz
283 return true
284 case OpCtz64NonZero:
285 v.Op = OpWasmI64Ctz
286 return true
287 case OpCtz8:
288 return rewriteValueWasm_OpCtz8(v)
289 case OpCtz8NonZero:
290 v.Op = OpWasmI64Ctz
291 return true
292 case OpCvt32Fto32:
293 v.Op = OpWasmI64TruncSatF32S
294 return true
295 case OpCvt32Fto32U:
296 v.Op = OpWasmI64TruncSatF32U
297 return true
298 case OpCvt32Fto64:
299 v.Op = OpWasmI64TruncSatF32S
300 return true
301 case OpCvt32Fto64F:
302 v.Op = OpWasmF64PromoteF32
303 return true
304 case OpCvt32Fto64U:
305 v.Op = OpWasmI64TruncSatF32U
306 return true
307 case OpCvt32Uto32F:
308 return rewriteValueWasm_OpCvt32Uto32F(v)
309 case OpCvt32Uto64F:
310 return rewriteValueWasm_OpCvt32Uto64F(v)
311 case OpCvt32to32F:
312 return rewriteValueWasm_OpCvt32to32F(v)
313 case OpCvt32to64F:
314 return rewriteValueWasm_OpCvt32to64F(v)
315 case OpCvt64Fto32:
316 v.Op = OpWasmI64TruncSatF64S
317 return true
318 case OpCvt64Fto32F:
319 v.Op = OpWasmF32DemoteF64
320 return true
321 case OpCvt64Fto32U:
322 v.Op = OpWasmI64TruncSatF64U
323 return true
324 case OpCvt64Fto64:
325 v.Op = OpWasmI64TruncSatF64S
326 return true
327 case OpCvt64Fto64U:
328 v.Op = OpWasmI64TruncSatF64U
329 return true
330 case OpCvt64Uto32F:
331 v.Op = OpWasmF32ConvertI64U
332 return true
333 case OpCvt64Uto64F:
334 v.Op = OpWasmF64ConvertI64U
335 return true
336 case OpCvt64to32F:
337 v.Op = OpWasmF32ConvertI64S
338 return true
339 case OpCvt64to64F:
340 v.Op = OpWasmF64ConvertI64S
341 return true
342 case OpCvtBoolToUint8:
343 v.Op = OpCopy
344 return true
345 case OpDiv16:
346 return rewriteValueWasm_OpDiv16(v)
347 case OpDiv16u:
348 return rewriteValueWasm_OpDiv16u(v)
349 case OpDiv32:
350 return rewriteValueWasm_OpDiv32(v)
351 case OpDiv32F:
352 v.Op = OpWasmF32Div
353 return true
354 case OpDiv32u:
355 return rewriteValueWasm_OpDiv32u(v)
356 case OpDiv64:
357 return rewriteValueWasm_OpDiv64(v)
358 case OpDiv64F:
359 v.Op = OpWasmF64Div
360 return true
361 case OpDiv64u:
362 v.Op = OpWasmI64DivU
363 return true
364 case OpDiv8:
365 return rewriteValueWasm_OpDiv8(v)
366 case OpDiv8u:
367 return rewriteValueWasm_OpDiv8u(v)
368 case OpDivFloat32x4:
369 v.Op = OpWasmF32x4Div
370 return true
371 case OpDivFloat64x2:
372 v.Op = OpWasmF64x2Div
373 return true
374 case OpEq16:
375 return rewriteValueWasm_OpEq16(v)
376 case OpEq32:
377 return rewriteValueWasm_OpEq32(v)
378 case OpEq32F:
379 v.Op = OpWasmF32Eq
380 return true
381 case OpEq64:
382 v.Op = OpWasmI64Eq
383 return true
384 case OpEq64F:
385 v.Op = OpWasmF64Eq
386 return true
387 case OpEq8:
388 return rewriteValueWasm_OpEq8(v)
389 case OpEqB:
390 v.Op = OpWasmI64Eq
391 return true
392 case OpEqPtr:
393 v.Op = OpWasmI64Eq
394 return true
395 case OpEqualFloat32x4:
396 v.Op = OpWasmF32x4Eq
397 return true
398 case OpEqualFloat64x2:
399 v.Op = OpWasmF64x2Eq
400 return true
401 case OpEqualInt16x8:
402 v.Op = OpWasmI16x8Eq
403 return true
404 case OpEqualInt32x4:
405 v.Op = OpWasmI32x4Eq
406 return true
407 case OpEqualInt64x2:
408 v.Op = OpWasmI64x2Eq
409 return true
410 case OpEqualInt8x16:
411 v.Op = OpWasmI8x16Eq
412 return true
413 case OpEqualUint16x8:
414 v.Op = OpWasmI16x8Eq
415 return true
416 case OpEqualUint32x4:
417 v.Op = OpWasmI32x4Eq
418 return true
419 case OpEqualUint64x2:
420 v.Op = OpWasmI64x2Eq
421 return true
422 case OpEqualUint8x16:
423 v.Op = OpWasmI8x16Eq
424 return true
425 case OpExtendHi2ToInt64Int32x4:
426 v.Op = OpWasmI64x2ExtendHighI32x4S
427 return true
428 case OpExtendHi2ToUint64Uint32x4:
429 v.Op = OpWasmI64x2ExtendHighI32x4U
430 return true
431 case OpExtendHi4ToInt32Int16x8:
432 v.Op = OpWasmI32x4ExtendHighI16x8S
433 return true
434 case OpExtendHi4ToUint32Uint16x8:
435 v.Op = OpWasmI32x4ExtendHighI16x8U
436 return true
437 case OpExtendHi8ToInt16Int8x16:
438 v.Op = OpWasmI16x8ExtendHighI8x16S
439 return true
440 case OpExtendHi8ToUint16Uint8x16:
441 v.Op = OpWasmI16x8ExtendHighI8x16U
442 return true
443 case OpExtendLo2ToInt64Int32x4:
444 v.Op = OpWasmI64x2ExtendLowI32x4S
445 return true
446 case OpExtendLo2ToUint64Uint32x4:
447 v.Op = OpWasmI64x2ExtendLowI32x4U
448 return true
449 case OpExtendLo4ToInt32Int16x8:
450 v.Op = OpWasmI32x4ExtendLowI16x8S
451 return true
452 case OpExtendLo4ToUint32Uint16x8:
453 v.Op = OpWasmI32x4ExtendLowI16x8U
454 return true
455 case OpExtendLo8ToInt16Int8x16:
456 v.Op = OpWasmI16x8ExtendLowI8x16S
457 return true
458 case OpExtendLo8ToUint16Uint8x16:
459 v.Op = OpWasmI16x8ExtendLowI8x16U
460 return true
461 case OpFloor:
462 v.Op = OpWasmF64Floor
463 return true
464 case OpFloorFloat32x4:
465 v.Op = OpWasmF32x4Floor
466 return true
467 case OpFloorFloat64x2:
468 v.Op = OpWasmF64x2Floor
469 return true
470 case OpGetCallerPC:
471 v.Op = OpWasmLoweredGetCallerPC
472 return true
473 case OpGetCallerSP:
474 v.Op = OpWasmLoweredGetCallerSP
475 return true
476 case OpGetClosurePtr:
477 v.Op = OpWasmLoweredGetClosurePtr
478 return true
479 case OpGetElemFloat32x4:
480 v.Op = OpWasmF32x4ExtractLane
481 return true
482 case OpGetElemFloat64x2:
483 v.Op = OpWasmF64x2ExtractLane
484 return true
485 case OpGetElemInt16x8:
486 v.Op = OpWasmI16x8ExtractLaneS
487 return true
488 case OpGetElemInt32x4:
489 v.Op = OpWasmI32x4ExtractLane
490 return true
491 case OpGetElemInt64x2:
492 v.Op = OpWasmI64x2ExtractLane
493 return true
494 case OpGetElemInt8x16:
495 v.Op = OpWasmI8x16ExtractLaneS
496 return true
497 case OpGetElemUint16x8:
498 v.Op = OpWasmI16x8ExtractLaneU
499 return true
500 case OpGetElemUint32x4:
501 v.Op = OpWasmI32x4ExtractLane
502 return true
503 case OpGetElemUint64x2:
504 v.Op = OpWasmI64x2ExtractLane
505 return true
506 case OpGetElemUint8x16:
507 v.Op = OpWasmI8x16ExtractLaneU
508 return true
509 case OpGreaterEqualFloat32x4:
510 v.Op = OpWasmF32x4Ge
511 return true
512 case OpGreaterEqualFloat64x2:
513 v.Op = OpWasmF64x2Ge
514 return true
515 case OpGreaterEqualInt16x8:
516 v.Op = OpWasmI16x8GeS
517 return true
518 case OpGreaterEqualInt32x4:
519 v.Op = OpWasmI32x4GeS
520 return true
521 case OpGreaterEqualInt64x2:
522 v.Op = OpWasmI64x2GeS
523 return true
524 case OpGreaterEqualInt8x16:
525 v.Op = OpWasmI8x16GeS
526 return true
527 case OpGreaterEqualUint16x8:
528 v.Op = OpWasmI16x8GeU
529 return true
530 case OpGreaterEqualUint32x4:
531 v.Op = OpWasmI32x4GeU
532 return true
533 case OpGreaterEqualUint8x16:
534 v.Op = OpWasmI8x16GeU
535 return true
536 case OpGreaterFloat32x4:
537 v.Op = OpWasmF32x4Gt
538 return true
539 case OpGreaterFloat64x2:
540 v.Op = OpWasmF64x2Gt
541 return true
542 case OpGreaterInt16x8:
543 v.Op = OpWasmI16x8GtS
544 return true
545 case OpGreaterInt32x4:
546 v.Op = OpWasmI32x4GtS
547 return true
548 case OpGreaterInt64x2:
549 v.Op = OpWasmI64x2GtS
550 return true
551 case OpGreaterInt8x16:
552 v.Op = OpWasmI8x16GtS
553 return true
554 case OpGreaterUint16x8:
555 v.Op = OpWasmI16x8GtU
556 return true
557 case OpGreaterUint32x4:
558 v.Op = OpWasmI32x4GtU
559 return true
560 case OpGreaterUint8x16:
561 v.Op = OpWasmI8x16GtU
562 return true
563 case OpHmul64:
564 return rewriteValueWasm_OpHmul64(v)
565 case OpHmul64u:
566 return rewriteValueWasm_OpHmul64u(v)
567 case OpInterCall:
568 v.Op = OpWasmLoweredInterCall
569 return true
570 case OpIsInBounds:
571 v.Op = OpWasmI64LtU
572 return true
573 case OpIsNonNil:
574 return rewriteValueWasm_OpIsNonNil(v)
575 case OpIsSliceInBounds:
576 v.Op = OpWasmI64LeU
577 return true
578 case OpLast:
579 return rewriteValueWasm_OpLast(v)
580 case OpLeq16:
581 return rewriteValueWasm_OpLeq16(v)
582 case OpLeq16U:
583 return rewriteValueWasm_OpLeq16U(v)
584 case OpLeq32:
585 return rewriteValueWasm_OpLeq32(v)
586 case OpLeq32F:
587 v.Op = OpWasmF32Le
588 return true
589 case OpLeq32U:
590 return rewriteValueWasm_OpLeq32U(v)
591 case OpLeq64:
592 v.Op = OpWasmI64LeS
593 return true
594 case OpLeq64F:
595 v.Op = OpWasmF64Le
596 return true
597 case OpLeq64U:
598 v.Op = OpWasmI64LeU
599 return true
600 case OpLeq8:
601 return rewriteValueWasm_OpLeq8(v)
602 case OpLeq8U:
603 return rewriteValueWasm_OpLeq8U(v)
604 case OpLess16:
605 return rewriteValueWasm_OpLess16(v)
606 case OpLess16U:
607 return rewriteValueWasm_OpLess16U(v)
608 case OpLess32:
609 return rewriteValueWasm_OpLess32(v)
610 case OpLess32F:
611 v.Op = OpWasmF32Lt
612 return true
613 case OpLess32U:
614 return rewriteValueWasm_OpLess32U(v)
615 case OpLess64:
616 v.Op = OpWasmI64LtS
617 return true
618 case OpLess64F:
619 v.Op = OpWasmF64Lt
620 return true
621 case OpLess64U:
622 v.Op = OpWasmI64LtU
623 return true
624 case OpLess8:
625 return rewriteValueWasm_OpLess8(v)
626 case OpLess8U:
627 return rewriteValueWasm_OpLess8U(v)
628 case OpLessEqualFloat32x4:
629 v.Op = OpWasmF32x4Le
630 return true
631 case OpLessEqualFloat64x2:
632 v.Op = OpWasmF64x2Le
633 return true
634 case OpLessEqualInt16x8:
635 v.Op = OpWasmI16x8LeS
636 return true
637 case OpLessEqualInt32x4:
638 v.Op = OpWasmI32x4LeS
639 return true
640 case OpLessEqualInt64x2:
641 v.Op = OpWasmI64x2LeS
642 return true
643 case OpLessEqualInt8x16:
644 v.Op = OpWasmI8x16LeS
645 return true
646 case OpLessEqualUint16x8:
647 v.Op = OpWasmI16x8LeU
648 return true
649 case OpLessEqualUint32x4:
650 v.Op = OpWasmI32x4LeU
651 return true
652 case OpLessEqualUint8x16:
653 v.Op = OpWasmI8x16LeU
654 return true
655 case OpLessFloat32x4:
656 v.Op = OpWasmF32x4Lt
657 return true
658 case OpLessFloat64x2:
659 v.Op = OpWasmF64x2Lt
660 return true
661 case OpLessInt16x8:
662 v.Op = OpWasmI16x8LtS
663 return true
664 case OpLessInt32x4:
665 v.Op = OpWasmI32x4LtS
666 return true
667 case OpLessInt64x2:
668 v.Op = OpWasmI64x2LtS
669 return true
670 case OpLessInt8x16:
671 v.Op = OpWasmI8x16LtS
672 return true
673 case OpLessUint16x8:
674 v.Op = OpWasmI16x8LtU
675 return true
676 case OpLessUint32x4:
677 v.Op = OpWasmI32x4LtU
678 return true
679 case OpLessUint8x16:
680 v.Op = OpWasmI8x16LtU
681 return true
682 case OpLoad:
683 return rewriteValueWasm_OpLoad(v)
684 case OpLocalAddr:
685 return rewriteValueWasm_OpLocalAddr(v)
686 case OpLookupOrZeroInt8x16:
687 v.Op = OpWasmI8x16Swizzle
688 return true
689 case OpLsh16x16:
690 return rewriteValueWasm_OpLsh16x16(v)
691 case OpLsh16x32:
692 return rewriteValueWasm_OpLsh16x32(v)
693 case OpLsh16x64:
694 v.Op = OpLsh64x64
695 return true
696 case OpLsh16x8:
697 return rewriteValueWasm_OpLsh16x8(v)
698 case OpLsh32x16:
699 return rewriteValueWasm_OpLsh32x16(v)
700 case OpLsh32x32:
701 return rewriteValueWasm_OpLsh32x32(v)
702 case OpLsh32x64:
703 v.Op = OpLsh64x64
704 return true
705 case OpLsh32x8:
706 return rewriteValueWasm_OpLsh32x8(v)
707 case OpLsh64x16:
708 return rewriteValueWasm_OpLsh64x16(v)
709 case OpLsh64x32:
710 return rewriteValueWasm_OpLsh64x32(v)
711 case OpLsh64x64:
712 return rewriteValueWasm_OpLsh64x64(v)
713 case OpLsh64x8:
714 return rewriteValueWasm_OpLsh64x8(v)
715 case OpLsh8x16:
716 return rewriteValueWasm_OpLsh8x16(v)
717 case OpLsh8x32:
718 return rewriteValueWasm_OpLsh8x32(v)
719 case OpLsh8x64:
720 v.Op = OpLsh64x64
721 return true
722 case OpLsh8x8:
723 return rewriteValueWasm_OpLsh8x8(v)
724 case OpMaxFloat32x4:
725 v.Op = OpWasmF32x4Max
726 return true
727 case OpMaxFloat64x2:
728 v.Op = OpWasmF64x2Max
729 return true
730 case OpMaxInt16x8:
731 v.Op = OpWasmI16x8MaxS
732 return true
733 case OpMaxInt32x4:
734 v.Op = OpWasmI32x4MaxS
735 return true
736 case OpMaxInt8x16:
737 v.Op = OpWasmI8x16MaxS
738 return true
739 case OpMaxUint16x8:
740 v.Op = OpWasmI16x8MaxU
741 return true
742 case OpMaxUint32x4:
743 v.Op = OpWasmI32x4MaxU
744 return true
745 case OpMaxUint8x16:
746 v.Op = OpWasmI8x16MaxU
747 return true
748 case OpMinFloat32x4:
749 v.Op = OpWasmF32x4Min
750 return true
751 case OpMinFloat64x2:
752 v.Op = OpWasmF64x2Min
753 return true
754 case OpMinInt16x8:
755 v.Op = OpWasmI16x8MinS
756 return true
757 case OpMinInt32x4:
758 v.Op = OpWasmI32x4MinS
759 return true
760 case OpMinInt8x16:
761 v.Op = OpWasmI8x16MinS
762 return true
763 case OpMinUint16x8:
764 v.Op = OpWasmI16x8MinU
765 return true
766 case OpMinUint32x4:
767 v.Op = OpWasmI32x4MinU
768 return true
769 case OpMinUint8x16:
770 v.Op = OpWasmI8x16MinU
771 return true
772 case OpMod16:
773 return rewriteValueWasm_OpMod16(v)
774 case OpMod16u:
775 return rewriteValueWasm_OpMod16u(v)
776 case OpMod32:
777 return rewriteValueWasm_OpMod32(v)
778 case OpMod32u:
779 return rewriteValueWasm_OpMod32u(v)
780 case OpMod64:
781 return rewriteValueWasm_OpMod64(v)
782 case OpMod64u:
783 v.Op = OpWasmI64RemU
784 return true
785 case OpMod8:
786 return rewriteValueWasm_OpMod8(v)
787 case OpMod8u:
788 return rewriteValueWasm_OpMod8u(v)
789 case OpMove:
790 return rewriteValueWasm_OpMove(v)
791 case OpMul16:
792 v.Op = OpWasmI64Mul
793 return true
794 case OpMul32:
795 v.Op = OpWasmI64Mul
796 return true
797 case OpMul32F:
798 v.Op = OpWasmF32Mul
799 return true
800 case OpMul64:
801 v.Op = OpWasmI64Mul
802 return true
803 case OpMul64F:
804 v.Op = OpWasmF64Mul
805 return true
806 case OpMul8:
807 v.Op = OpWasmI64Mul
808 return true
809 case OpMulFloat32x4:
810 v.Op = OpWasmF32x4Mul
811 return true
812 case OpMulFloat64x2:
813 v.Op = OpWasmF64x2Mul
814 return true
815 case OpMulInt16x8:
816 v.Op = OpWasmI16x8Mul
817 return true
818 case OpMulInt32x4:
819 v.Op = OpWasmI32x4Mul
820 return true
821 case OpMulInt64x2:
822 v.Op = OpWasmI64x2Mul
823 return true
824 case OpMulUint16x8:
825 v.Op = OpWasmI16x8Mul
826 return true
827 case OpMulUint32x4:
828 v.Op = OpWasmI32x4Mul
829 return true
830 case OpMulUint64x2:
831 v.Op = OpWasmI64x2Mul
832 return true
833 case OpMulWidenHiInt16x8:
834 v.Op = OpWasmI32x4ExtmulHighI16x8S
835 return true
836 case OpMulWidenHiInt32x4:
837 v.Op = OpWasmI64x2ExtmulHighI32x4S
838 return true
839 case OpMulWidenHiInt8x16:
840 v.Op = OpWasmI16x8ExtmulHighI8x16S
841 return true
842 case OpMulWidenHiUint16x8:
843 v.Op = OpWasmI32x4ExtmulHighI16x8U
844 return true
845 case OpMulWidenHiUint32x4:
846 v.Op = OpWasmI64x2ExtmulHighI32x4U
847 return true
848 case OpMulWidenHiUint8x16:
849 v.Op = OpWasmI16x8ExtmulHighI8x16U
850 return true
851 case OpMulWidenLoInt16x8:
852 v.Op = OpWasmI32x4ExtmulLowI16x8S
853 return true
854 case OpMulWidenLoInt32x4:
855 v.Op = OpWasmI64x2ExtmulLowI32x4S
856 return true
857 case OpMulWidenLoInt8x16:
858 v.Op = OpWasmI16x8ExtmulLowI8x16S
859 return true
860 case OpMulWidenLoUint16x8:
861 v.Op = OpWasmI32x4ExtmulLowI16x8U
862 return true
863 case OpMulWidenLoUint32x4:
864 v.Op = OpWasmI64x2ExtmulLowI32x4U
865 return true
866 case OpMulWidenLoUint8x16:
867 v.Op = OpWasmI16x8ExtmulLowI8x16U
868 return true
869 case OpNeg16:
870 return rewriteValueWasm_OpNeg16(v)
871 case OpNeg32:
872 return rewriteValueWasm_OpNeg32(v)
873 case OpNeg32F:
874 v.Op = OpWasmF32Neg
875 return true
876 case OpNeg64:
877 return rewriteValueWasm_OpNeg64(v)
878 case OpNeg64F:
879 v.Op = OpWasmF64Neg
880 return true
881 case OpNeg8:
882 return rewriteValueWasm_OpNeg8(v)
883 case OpNegFloat32x4:
884 v.Op = OpWasmF32x4Neg
885 return true
886 case OpNegFloat64x2:
887 v.Op = OpWasmF64x2Neg
888 return true
889 case OpNegInt16x8:
890 v.Op = OpWasmI16x8Neg
891 return true
892 case OpNegInt32x4:
893 v.Op = OpWasmI32x4Neg
894 return true
895 case OpNegInt64x2:
896 v.Op = OpWasmI64x2Neg
897 return true
898 case OpNegInt8x16:
899 v.Op = OpWasmI8x16Neg
900 return true
901 case OpNeq16:
902 return rewriteValueWasm_OpNeq16(v)
903 case OpNeq32:
904 return rewriteValueWasm_OpNeq32(v)
905 case OpNeq32F:
906 v.Op = OpWasmF32Ne
907 return true
908 case OpNeq64:
909 v.Op = OpWasmI64Ne
910 return true
911 case OpNeq64F:
912 v.Op = OpWasmF64Ne
913 return true
914 case OpNeq8:
915 return rewriteValueWasm_OpNeq8(v)
916 case OpNeqB:
917 v.Op = OpWasmI64Ne
918 return true
919 case OpNeqPtr:
920 v.Op = OpWasmI64Ne
921 return true
922 case OpNilCheck:
923 v.Op = OpWasmLoweredNilCheck
924 return true
925 case OpNot:
926 v.Op = OpWasmI64Eqz
927 return true
928 case OpNotEqualFloat32x4:
929 v.Op = OpWasmF32x4Ne
930 return true
931 case OpNotEqualFloat64x2:
932 v.Op = OpWasmF64x2Ne
933 return true
934 case OpNotEqualInt16x8:
935 v.Op = OpWasmI16x8Ne
936 return true
937 case OpNotEqualInt32x4:
938 v.Op = OpWasmI32x4Ne
939 return true
940 case OpNotEqualInt64x2:
941 v.Op = OpWasmI64x2Ne
942 return true
943 case OpNotEqualInt8x16:
944 v.Op = OpWasmI8x16Ne
945 return true
946 case OpNotEqualUint16x8:
947 v.Op = OpWasmI16x8Ne
948 return true
949 case OpNotEqualUint32x4:
950 v.Op = OpWasmI32x4Ne
951 return true
952 case OpNotEqualUint64x2:
953 v.Op = OpWasmI64x2Ne
954 return true
955 case OpNotEqualUint8x16:
956 v.Op = OpWasmI8x16Ne
957 return true
958 case OpNotInt16x8:
959 v.Op = OpWasmV128Not
960 return true
961 case OpNotInt32x4:
962 v.Op = OpWasmV128Not
963 return true
964 case OpNotInt64x2:
965 v.Op = OpWasmV128Not
966 return true
967 case OpNotInt8x16:
968 v.Op = OpWasmV128Not
969 return true
970 case OpNotUint16x8:
971 v.Op = OpWasmV128Not
972 return true
973 case OpNotUint32x4:
974 v.Op = OpWasmV128Not
975 return true
976 case OpNotUint64x2:
977 v.Op = OpWasmV128Not
978 return true
979 case OpNotUint8x16:
980 v.Op = OpWasmV128Not
981 return true
982 case OpOffPtr:
983 v.Op = OpWasmI64AddConst
984 return true
985 case OpOnesCountInt8x16:
986 v.Op = OpWasmI8x16Popcnt
987 return true
988 case OpOr16:
989 v.Op = OpWasmI64Or
990 return true
991 case OpOr32:
992 v.Op = OpWasmI64Or
993 return true
994 case OpOr64:
995 v.Op = OpWasmI64Or
996 return true
997 case OpOr8:
998 v.Op = OpWasmI64Or
999 return true
1000 case OpOrB:
1001 v.Op = OpWasmI64Or
1002 return true
1003 case OpOrInt16x8:
1004 v.Op = OpWasmV128Or
1005 return true
1006 case OpOrInt32x4:
1007 v.Op = OpWasmV128Or
1008 return true
1009 case OpOrInt64x2:
1010 v.Op = OpWasmV128Or
1011 return true
1012 case OpOrInt8x16:
1013 v.Op = OpWasmV128Or
1014 return true
1015 case OpOrUint16x8:
1016 v.Op = OpWasmV128Or
1017 return true
1018 case OpOrUint32x4:
1019 v.Op = OpWasmV128Or
1020 return true
1021 case OpOrUint64x2:
1022 v.Op = OpWasmV128Or
1023 return true
1024 case OpOrUint8x16:
1025 v.Op = OpWasmV128Or
1026 return true
1027 case OpPopCount16:
1028 return rewriteValueWasm_OpPopCount16(v)
1029 case OpPopCount32:
1030 return rewriteValueWasm_OpPopCount32(v)
1031 case OpPopCount64:
1032 v.Op = OpWasmI64Popcnt
1033 return true
1034 case OpPopCount8:
1035 return rewriteValueWasm_OpPopCount8(v)
1036 case OpRotateAllLeftVarInt16x8:
1037 return rewriteValueWasm_OpRotateAllLeftVarInt16x8(v)
1038 case OpRotateAllLeftVarInt32x4:
1039 return rewriteValueWasm_OpRotateAllLeftVarInt32x4(v)
1040 case OpRotateAllLeftVarInt64x2:
1041 return rewriteValueWasm_OpRotateAllLeftVarInt64x2(v)
1042 case OpRotateAllLeftVarInt8x16:
1043 return rewriteValueWasm_OpRotateAllLeftVarInt8x16(v)
1044 case OpRotateAllLeftVarUint16x8:
1045 return rewriteValueWasm_OpRotateAllLeftVarUint16x8(v)
1046 case OpRotateAllLeftVarUint32x4:
1047 return rewriteValueWasm_OpRotateAllLeftVarUint32x4(v)
1048 case OpRotateAllLeftVarUint64x2:
1049 return rewriteValueWasm_OpRotateAllLeftVarUint64x2(v)
1050 case OpRotateAllLeftVarUint8x16:
1051 return rewriteValueWasm_OpRotateAllLeftVarUint8x16(v)
1052 case OpRotateAllRightVarInt16x8:
1053 return rewriteValueWasm_OpRotateAllRightVarInt16x8(v)
1054 case OpRotateAllRightVarInt32x4:
1055 return rewriteValueWasm_OpRotateAllRightVarInt32x4(v)
1056 case OpRotateAllRightVarInt64x2:
1057 return rewriteValueWasm_OpRotateAllRightVarInt64x2(v)
1058 case OpRotateAllRightVarInt8x16:
1059 return rewriteValueWasm_OpRotateAllRightVarInt8x16(v)
1060 case OpRotateAllRightVarUint16x8:
1061 return rewriteValueWasm_OpRotateAllRightVarUint16x8(v)
1062 case OpRotateAllRightVarUint32x4:
1063 return rewriteValueWasm_OpRotateAllRightVarUint32x4(v)
1064 case OpRotateAllRightVarUint64x2:
1065 return rewriteValueWasm_OpRotateAllRightVarUint64x2(v)
1066 case OpRotateAllRightVarUint8x16:
1067 return rewriteValueWasm_OpRotateAllRightVarUint8x16(v)
1068 case OpRotateLeft16:
1069 return rewriteValueWasm_OpRotateLeft16(v)
1070 case OpRotateLeft32:
1071 v.Op = OpWasmI32Rotl
1072 return true
1073 case OpRotateLeft64:
1074 v.Op = OpWasmI64Rotl
1075 return true
1076 case OpRotateLeft8:
1077 return rewriteValueWasm_OpRotateLeft8(v)
1078 case OpRound32F:
1079 v.Op = OpCopy
1080 return true
1081 case OpRound64F:
1082 v.Op = OpCopy
1083 return true
1084 case OpRoundFloat32x4:
1085 v.Op = OpWasmF32x4Nearest
1086 return true
1087 case OpRoundFloat64x2:
1088 v.Op = OpWasmF64x2Nearest
1089 return true
1090 case OpRoundToEven:
1091 v.Op = OpWasmF64Nearest
1092 return true
1093 case OpRsh16Ux16:
1094 return rewriteValueWasm_OpRsh16Ux16(v)
1095 case OpRsh16Ux32:
1096 return rewriteValueWasm_OpRsh16Ux32(v)
1097 case OpRsh16Ux64:
1098 return rewriteValueWasm_OpRsh16Ux64(v)
1099 case OpRsh16Ux8:
1100 return rewriteValueWasm_OpRsh16Ux8(v)
1101 case OpRsh16x16:
1102 return rewriteValueWasm_OpRsh16x16(v)
1103 case OpRsh16x32:
1104 return rewriteValueWasm_OpRsh16x32(v)
1105 case OpRsh16x64:
1106 return rewriteValueWasm_OpRsh16x64(v)
1107 case OpRsh16x8:
1108 return rewriteValueWasm_OpRsh16x8(v)
1109 case OpRsh32Ux16:
1110 return rewriteValueWasm_OpRsh32Ux16(v)
1111 case OpRsh32Ux32:
1112 return rewriteValueWasm_OpRsh32Ux32(v)
1113 case OpRsh32Ux64:
1114 return rewriteValueWasm_OpRsh32Ux64(v)
1115 case OpRsh32Ux8:
1116 return rewriteValueWasm_OpRsh32Ux8(v)
1117 case OpRsh32x16:
1118 return rewriteValueWasm_OpRsh32x16(v)
1119 case OpRsh32x32:
1120 return rewriteValueWasm_OpRsh32x32(v)
1121 case OpRsh32x64:
1122 return rewriteValueWasm_OpRsh32x64(v)
1123 case OpRsh32x8:
1124 return rewriteValueWasm_OpRsh32x8(v)
1125 case OpRsh64Ux16:
1126 return rewriteValueWasm_OpRsh64Ux16(v)
1127 case OpRsh64Ux32:
1128 return rewriteValueWasm_OpRsh64Ux32(v)
1129 case OpRsh64Ux64:
1130 return rewriteValueWasm_OpRsh64Ux64(v)
1131 case OpRsh64Ux8:
1132 return rewriteValueWasm_OpRsh64Ux8(v)
1133 case OpRsh64x16:
1134 return rewriteValueWasm_OpRsh64x16(v)
1135 case OpRsh64x32:
1136 return rewriteValueWasm_OpRsh64x32(v)
1137 case OpRsh64x64:
1138 return rewriteValueWasm_OpRsh64x64(v)
1139 case OpRsh64x8:
1140 return rewriteValueWasm_OpRsh64x8(v)
1141 case OpRsh8Ux16:
1142 return rewriteValueWasm_OpRsh8Ux16(v)
1143 case OpRsh8Ux32:
1144 return rewriteValueWasm_OpRsh8Ux32(v)
1145 case OpRsh8Ux64:
1146 return rewriteValueWasm_OpRsh8Ux64(v)
1147 case OpRsh8Ux8:
1148 return rewriteValueWasm_OpRsh8Ux8(v)
1149 case OpRsh8x16:
1150 return rewriteValueWasm_OpRsh8x16(v)
1151 case OpRsh8x32:
1152 return rewriteValueWasm_OpRsh8x32(v)
1153 case OpRsh8x64:
1154 return rewriteValueWasm_OpRsh8x64(v)
1155 case OpRsh8x8:
1156 return rewriteValueWasm_OpRsh8x8(v)
1157 case OpSelect0:
1158 return rewriteValueWasm_OpSelect0(v)
1159 case OpSelect1:
1160 return rewriteValueWasm_OpSelect1(v)
1161 case OpSetElemFloat32x4:
1162 v.Op = OpWasmF32x4ReplaceLane
1163 return true
1164 case OpSetElemFloat64x2:
1165 v.Op = OpWasmF64x2ReplaceLane
1166 return true
1167 case OpSetElemInt16x8:
1168 v.Op = OpWasmI16x8ReplaceLane
1169 return true
1170 case OpSetElemInt32x4:
1171 v.Op = OpWasmI32x4ReplaceLane
1172 return true
1173 case OpSetElemInt64x2:
1174 v.Op = OpWasmI64x2ReplaceLane
1175 return true
1176 case OpSetElemInt8x16:
1177 v.Op = OpWasmI8x16ReplaceLane
1178 return true
1179 case OpSetElemUint16x8:
1180 v.Op = OpWasmI16x8ReplaceLane
1181 return true
1182 case OpSetElemUint32x4:
1183 v.Op = OpWasmI32x4ReplaceLane
1184 return true
1185 case OpSetElemUint64x2:
1186 v.Op = OpWasmI64x2ReplaceLane
1187 return true
1188 case OpSetElemUint8x16:
1189 v.Op = OpWasmI8x16ReplaceLane
1190 return true
1191 case OpShiftAllLeftInt16x8:
1192 return rewriteValueWasm_OpShiftAllLeftInt16x8(v)
1193 case OpShiftAllLeftInt32x4:
1194 return rewriteValueWasm_OpShiftAllLeftInt32x4(v)
1195 case OpShiftAllLeftInt64x2:
1196 return rewriteValueWasm_OpShiftAllLeftInt64x2(v)
1197 case OpShiftAllLeftInt8x16:
1198 return rewriteValueWasm_OpShiftAllLeftInt8x16(v)
1199 case OpShiftAllLeftUint16x8:
1200 return rewriteValueWasm_OpShiftAllLeftUint16x8(v)
1201 case OpShiftAllLeftUint32x4:
1202 return rewriteValueWasm_OpShiftAllLeftUint32x4(v)
1203 case OpShiftAllLeftUint64x2:
1204 return rewriteValueWasm_OpShiftAllLeftUint64x2(v)
1205 case OpShiftAllLeftUint8x16:
1206 return rewriteValueWasm_OpShiftAllLeftUint8x16(v)
1207 case OpShiftAllRightInt16x8:
1208 return rewriteValueWasm_OpShiftAllRightInt16x8(v)
1209 case OpShiftAllRightInt32x4:
1210 return rewriteValueWasm_OpShiftAllRightInt32x4(v)
1211 case OpShiftAllRightInt64x2:
1212 return rewriteValueWasm_OpShiftAllRightInt64x2(v)
1213 case OpShiftAllRightInt8x16:
1214 return rewriteValueWasm_OpShiftAllRightInt8x16(v)
1215 case OpShiftAllRightUint16x8:
1216 return rewriteValueWasm_OpShiftAllRightUint16x8(v)
1217 case OpShiftAllRightUint32x4:
1218 return rewriteValueWasm_OpShiftAllRightUint32x4(v)
1219 case OpShiftAllRightUint64x2:
1220 return rewriteValueWasm_OpShiftAllRightUint64x2(v)
1221 case OpShiftAllRightUint8x16:
1222 return rewriteValueWasm_OpShiftAllRightUint8x16(v)
1223 case OpSignExt16to32:
1224 return rewriteValueWasm_OpSignExt16to32(v)
1225 case OpSignExt16to64:
1226 return rewriteValueWasm_OpSignExt16to64(v)
1227 case OpSignExt32to64:
1228 return rewriteValueWasm_OpSignExt32to64(v)
1229 case OpSignExt8to16:
1230 return rewriteValueWasm_OpSignExt8to16(v)
1231 case OpSignExt8to32:
1232 return rewriteValueWasm_OpSignExt8to32(v)
1233 case OpSignExt8to64:
1234 return rewriteValueWasm_OpSignExt8to64(v)
1235 case OpSlicemask:
1236 return rewriteValueWasm_OpSlicemask(v)
1237 case OpSqrt:
1238 v.Op = OpWasmF64Sqrt
1239 return true
1240 case OpSqrt32:
1241 v.Op = OpWasmF32Sqrt
1242 return true
1243 case OpSqrtFloat32x4:
1244 v.Op = OpWasmF32x4Sqrt
1245 return true
1246 case OpSqrtFloat64x2:
1247 v.Op = OpWasmF64x2Sqrt
1248 return true
1249 case OpStaticCall:
1250 v.Op = OpWasmLoweredStaticCall
1251 return true
1252 case OpStore:
1253 return rewriteValueWasm_OpStore(v)
1254 case OpSub16:
1255 v.Op = OpWasmI64Sub
1256 return true
1257 case OpSub32:
1258 v.Op = OpWasmI64Sub
1259 return true
1260 case OpSub32F:
1261 v.Op = OpWasmF32Sub
1262 return true
1263 case OpSub64:
1264 v.Op = OpWasmI64Sub
1265 return true
1266 case OpSub64F:
1267 v.Op = OpWasmF64Sub
1268 return true
1269 case OpSub8:
1270 v.Op = OpWasmI64Sub
1271 return true
1272 case OpSubFloat32x4:
1273 v.Op = OpWasmF32x4Sub
1274 return true
1275 case OpSubFloat64x2:
1276 v.Op = OpWasmF64x2Sub
1277 return true
1278 case OpSubInt16x8:
1279 v.Op = OpWasmI16x8Sub
1280 return true
1281 case OpSubInt32x4:
1282 v.Op = OpWasmI32x4Sub
1283 return true
1284 case OpSubInt64x2:
1285 v.Op = OpWasmI64x2Sub
1286 return true
1287 case OpSubInt8x16:
1288 v.Op = OpWasmI8x16Sub
1289 return true
1290 case OpSubPtr:
1291 v.Op = OpWasmI64Sub
1292 return true
1293 case OpSubSaturatedInt16x8:
1294 v.Op = OpWasmI16x8SubSatS
1295 return true
1296 case OpSubSaturatedInt8x16:
1297 v.Op = OpWasmI8x16SubSatS
1298 return true
1299 case OpSubSaturatedUint16x8:
1300 v.Op = OpWasmI16x8SubSatU
1301 return true
1302 case OpSubSaturatedUint8x16:
1303 v.Op = OpWasmI8x16SubSatU
1304 return true
1305 case OpTailCall:
1306 v.Op = OpWasmLoweredTailCall
1307 return true
1308 case OpTailCallInter:
1309 v.Op = OpWasmLoweredTailCallInter
1310 return true
1311 case OpTrunc:
1312 v.Op = OpWasmF64Trunc
1313 return true
1314 case OpTrunc16to8:
1315 v.Op = OpCopy
1316 return true
1317 case OpTrunc32to16:
1318 v.Op = OpCopy
1319 return true
1320 case OpTrunc32to8:
1321 v.Op = OpCopy
1322 return true
1323 case OpTrunc64to16:
1324 v.Op = OpCopy
1325 return true
1326 case OpTrunc64to32:
1327 v.Op = OpCopy
1328 return true
1329 case OpTrunc64to8:
1330 v.Op = OpCopy
1331 return true
1332 case OpTruncFloat32x4:
1333 v.Op = OpWasmF32x4Trunc
1334 return true
1335 case OpTruncFloat64x2:
1336 v.Op = OpWasmF64x2Trunc
1337 return true
1338 case OpWB:
1339 v.Op = OpWasmLoweredWB
1340 return true
1341 case OpWasmF32DemoteF64:
1342 return rewriteValueWasm_OpWasmF32DemoteF64(v)
1343 case OpWasmF64Add:
1344 return rewriteValueWasm_OpWasmF64Add(v)
1345 case OpWasmF64Mul:
1346 return rewriteValueWasm_OpWasmF64Mul(v)
1347 case OpWasmI64Add:
1348 return rewriteValueWasm_OpWasmI64Add(v)
1349 case OpWasmI64AddConst:
1350 return rewriteValueWasm_OpWasmI64AddConst(v)
1351 case OpWasmI64And:
1352 return rewriteValueWasm_OpWasmI64And(v)
1353 case OpWasmI64Eq:
1354 return rewriteValueWasm_OpWasmI64Eq(v)
1355 case OpWasmI64Eqz:
1356 return rewriteValueWasm_OpWasmI64Eqz(v)
1357 case OpWasmI64Extend16S:
1358 return rewriteValueWasm_OpWasmI64Extend16S(v)
1359 case OpWasmI64Extend32S:
1360 return rewriteValueWasm_OpWasmI64Extend32S(v)
1361 case OpWasmI64Extend8S:
1362 return rewriteValueWasm_OpWasmI64Extend8S(v)
1363 case OpWasmI64LeU:
1364 return rewriteValueWasm_OpWasmI64LeU(v)
1365 case OpWasmI64Load:
1366 return rewriteValueWasm_OpWasmI64Load(v)
1367 case OpWasmI64Load16S:
1368 return rewriteValueWasm_OpWasmI64Load16S(v)
1369 case OpWasmI64Load16U:
1370 return rewriteValueWasm_OpWasmI64Load16U(v)
1371 case OpWasmI64Load32S:
1372 return rewriteValueWasm_OpWasmI64Load32S(v)
1373 case OpWasmI64Load32U:
1374 return rewriteValueWasm_OpWasmI64Load32U(v)
1375 case OpWasmI64Load8S:
1376 return rewriteValueWasm_OpWasmI64Load8S(v)
1377 case OpWasmI64Load8U:
1378 return rewriteValueWasm_OpWasmI64Load8U(v)
1379 case OpWasmI64LtU:
1380 return rewriteValueWasm_OpWasmI64LtU(v)
1381 case OpWasmI64Mul:
1382 return rewriteValueWasm_OpWasmI64Mul(v)
1383 case OpWasmI64Ne:
1384 return rewriteValueWasm_OpWasmI64Ne(v)
1385 case OpWasmI64Or:
1386 return rewriteValueWasm_OpWasmI64Or(v)
1387 case OpWasmI64Shl:
1388 return rewriteValueWasm_OpWasmI64Shl(v)
1389 case OpWasmI64ShrS:
1390 return rewriteValueWasm_OpWasmI64ShrS(v)
1391 case OpWasmI64ShrU:
1392 return rewriteValueWasm_OpWasmI64ShrU(v)
1393 case OpWasmI64Store:
1394 return rewriteValueWasm_OpWasmI64Store(v)
1395 case OpWasmI64Store16:
1396 return rewriteValueWasm_OpWasmI64Store16(v)
1397 case OpWasmI64Store32:
1398 return rewriteValueWasm_OpWasmI64Store32(v)
1399 case OpWasmI64Store8:
1400 return rewriteValueWasm_OpWasmI64Store8(v)
1401 case OpWasmI64Sub:
1402 return rewriteValueWasm_OpWasmI64Sub(v)
1403 case OpWasmI64Xor:
1404 return rewriteValueWasm_OpWasmI64Xor(v)
1405 case OpXor16:
1406 v.Op = OpWasmI64Xor
1407 return true
1408 case OpXor32:
1409 v.Op = OpWasmI64Xor
1410 return true
1411 case OpXor64:
1412 v.Op = OpWasmI64Xor
1413 return true
1414 case OpXor8:
1415 v.Op = OpWasmI64Xor
1416 return true
1417 case OpXorInt16x8:
1418 v.Op = OpWasmV128Xor
1419 return true
1420 case OpXorInt32x4:
1421 v.Op = OpWasmV128Xor
1422 return true
1423 case OpXorInt64x2:
1424 v.Op = OpWasmV128Xor
1425 return true
1426 case OpXorInt8x16:
1427 v.Op = OpWasmV128Xor
1428 return true
1429 case OpXorUint16x8:
1430 v.Op = OpWasmV128Xor
1431 return true
1432 case OpXorUint32x4:
1433 v.Op = OpWasmV128Xor
1434 return true
1435 case OpXorUint64x2:
1436 v.Op = OpWasmV128Xor
1437 return true
1438 case OpXorUint8x16:
1439 v.Op = OpWasmV128Xor
1440 return true
1441 case OpZero:
1442 return rewriteValueWasm_OpZero(v)
1443 case OpZeroExt16to32:
1444 return rewriteValueWasm_OpZeroExt16to32(v)
1445 case OpZeroExt16to64:
1446 return rewriteValueWasm_OpZeroExt16to64(v)
1447 case OpZeroExt32to64:
1448 return rewriteValueWasm_OpZeroExt32to64(v)
1449 case OpZeroExt8to16:
1450 return rewriteValueWasm_OpZeroExt8to16(v)
1451 case OpZeroExt8to32:
1452 return rewriteValueWasm_OpZeroExt8to32(v)
1453 case OpZeroExt8to64:
1454 return rewriteValueWasm_OpZeroExt8to64(v)
1455 case OpZeroSIMD:
1456 return rewriteValueWasm_OpZeroSIMD(v)
1457 }
1458 return false
1459 }
1460 func rewriteValueWasm_OpAddr(v *Value) bool {
1461 v_0 := v.Args[0]
1462
1463
1464 for {
1465 sym := auxToSym(v.Aux)
1466 base := v_0
1467 v.reset(OpWasmLoweredAddr)
1468 v.AuxInt = int32ToAuxInt(0)
1469 v.Aux = symToAux(sym)
1470 v.AddArg(base)
1471 return true
1472 }
1473 }
1474 func rewriteValueWasm_OpAvg64u(v *Value) bool {
1475 v_1 := v.Args[1]
1476 v_0 := v.Args[0]
1477 b := v.Block
1478 typ := &b.Func.Config.Types
1479
1480
1481 for {
1482 x := v_0
1483 y := v_1
1484 v.reset(OpWasmI64Add)
1485 v0 := b.NewValue0(v.Pos, OpWasmI64ShrU, typ.Int64)
1486 v1 := b.NewValue0(v.Pos, OpWasmI64Sub, typ.Int64)
1487 v1.AddArg2(x, y)
1488 v2 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
1489 v2.AuxInt = int64ToAuxInt(1)
1490 v0.AddArg2(v1, v2)
1491 v.AddArg2(v0, y)
1492 return true
1493 }
1494 }
1495 func rewriteValueWasm_OpBitLen16(v *Value) bool {
1496 v_0 := v.Args[0]
1497 b := v.Block
1498 typ := &b.Func.Config.Types
1499
1500
1501 for {
1502 x := v_0
1503 v.reset(OpBitLen64)
1504 v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
1505 v0.AddArg(x)
1506 v.AddArg(v0)
1507 return true
1508 }
1509 }
1510 func rewriteValueWasm_OpBitLen32(v *Value) bool {
1511 v_0 := v.Args[0]
1512 b := v.Block
1513 typ := &b.Func.Config.Types
1514
1515
1516 for {
1517 x := v_0
1518 v.reset(OpBitLen64)
1519 v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
1520 v0.AddArg(x)
1521 v.AddArg(v0)
1522 return true
1523 }
1524 }
1525 func rewriteValueWasm_OpBitLen64(v *Value) bool {
1526 v_0 := v.Args[0]
1527 b := v.Block
1528 typ := &b.Func.Config.Types
1529
1530
1531 for {
1532 x := v_0
1533 v.reset(OpWasmI64Sub)
1534 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
1535 v0.AuxInt = int64ToAuxInt(64)
1536 v1 := b.NewValue0(v.Pos, OpWasmI64Clz, typ.Int64)
1537 v1.AddArg(x)
1538 v.AddArg2(v0, v1)
1539 return true
1540 }
1541 }
1542 func rewriteValueWasm_OpBitLen8(v *Value) bool {
1543 v_0 := v.Args[0]
1544 b := v.Block
1545 typ := &b.Func.Config.Types
1546
1547
1548 for {
1549 x := v_0
1550 v.reset(OpBitLen64)
1551 v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
1552 v0.AddArg(x)
1553 v.AddArg(v0)
1554 return true
1555 }
1556 }
1557 func rewriteValueWasm_OpCom16(v *Value) bool {
1558 v_0 := v.Args[0]
1559 b := v.Block
1560 typ := &b.Func.Config.Types
1561
1562
1563 for {
1564 x := v_0
1565 v.reset(OpWasmI64Xor)
1566 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
1567 v0.AuxInt = int64ToAuxInt(-1)
1568 v.AddArg2(x, v0)
1569 return true
1570 }
1571 }
1572 func rewriteValueWasm_OpCom32(v *Value) bool {
1573 v_0 := v.Args[0]
1574 b := v.Block
1575 typ := &b.Func.Config.Types
1576
1577
1578 for {
1579 x := v_0
1580 v.reset(OpWasmI64Xor)
1581 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
1582 v0.AuxInt = int64ToAuxInt(-1)
1583 v.AddArg2(x, v0)
1584 return true
1585 }
1586 }
1587 func rewriteValueWasm_OpCom64(v *Value) bool {
1588 v_0 := v.Args[0]
1589 b := v.Block
1590 typ := &b.Func.Config.Types
1591
1592
1593 for {
1594 x := v_0
1595 v.reset(OpWasmI64Xor)
1596 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
1597 v0.AuxInt = int64ToAuxInt(-1)
1598 v.AddArg2(x, v0)
1599 return true
1600 }
1601 }
1602 func rewriteValueWasm_OpCom8(v *Value) bool {
1603 v_0 := v.Args[0]
1604 b := v.Block
1605 typ := &b.Func.Config.Types
1606
1607
1608 for {
1609 x := v_0
1610 v.reset(OpWasmI64Xor)
1611 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
1612 v0.AuxInt = int64ToAuxInt(-1)
1613 v.AddArg2(x, v0)
1614 return true
1615 }
1616 }
1617 func rewriteValueWasm_OpConst16(v *Value) bool {
1618
1619
1620 for {
1621 c := auxIntToInt16(v.AuxInt)
1622 v.reset(OpWasmI64Const)
1623 v.AuxInt = int64ToAuxInt(int64(c))
1624 return true
1625 }
1626 }
1627 func rewriteValueWasm_OpConst32(v *Value) bool {
1628
1629
1630 for {
1631 c := auxIntToInt32(v.AuxInt)
1632 v.reset(OpWasmI64Const)
1633 v.AuxInt = int64ToAuxInt(int64(c))
1634 return true
1635 }
1636 }
1637 func rewriteValueWasm_OpConst8(v *Value) bool {
1638
1639
1640 for {
1641 c := auxIntToInt8(v.AuxInt)
1642 v.reset(OpWasmI64Const)
1643 v.AuxInt = int64ToAuxInt(int64(c))
1644 return true
1645 }
1646 }
1647 func rewriteValueWasm_OpConstBool(v *Value) bool {
1648
1649
1650 for {
1651 c := auxIntToBool(v.AuxInt)
1652 v.reset(OpWasmI64Const)
1653 v.AuxInt = int64ToAuxInt(b2i(c))
1654 return true
1655 }
1656 }
1657 func rewriteValueWasm_OpConstNil(v *Value) bool {
1658
1659
1660 for {
1661 v.reset(OpWasmI64Const)
1662 v.AuxInt = int64ToAuxInt(0)
1663 return true
1664 }
1665 }
1666 func rewriteValueWasm_OpCtz16(v *Value) bool {
1667 v_0 := v.Args[0]
1668 b := v.Block
1669 typ := &b.Func.Config.Types
1670
1671
1672 for {
1673 x := v_0
1674 v.reset(OpWasmI64Ctz)
1675 v0 := b.NewValue0(v.Pos, OpWasmI64Or, typ.Int64)
1676 v1 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
1677 v1.AuxInt = int64ToAuxInt(0x10000)
1678 v0.AddArg2(x, v1)
1679 v.AddArg(v0)
1680 return true
1681 }
1682 }
1683 func rewriteValueWasm_OpCtz32(v *Value) bool {
1684 v_0 := v.Args[0]
1685 b := v.Block
1686 typ := &b.Func.Config.Types
1687
1688
1689 for {
1690 x := v_0
1691 v.reset(OpWasmI64Ctz)
1692 v0 := b.NewValue0(v.Pos, OpWasmI64Or, typ.Int64)
1693 v1 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
1694 v1.AuxInt = int64ToAuxInt(0x100000000)
1695 v0.AddArg2(x, v1)
1696 v.AddArg(v0)
1697 return true
1698 }
1699 }
1700 func rewriteValueWasm_OpCtz8(v *Value) bool {
1701 v_0 := v.Args[0]
1702 b := v.Block
1703 typ := &b.Func.Config.Types
1704
1705
1706 for {
1707 x := v_0
1708 v.reset(OpWasmI64Ctz)
1709 v0 := b.NewValue0(v.Pos, OpWasmI64Or, typ.Int64)
1710 v1 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
1711 v1.AuxInt = int64ToAuxInt(0x100)
1712 v0.AddArg2(x, v1)
1713 v.AddArg(v0)
1714 return true
1715 }
1716 }
1717 func rewriteValueWasm_OpCvt32Uto32F(v *Value) bool {
1718 v_0 := v.Args[0]
1719 b := v.Block
1720 typ := &b.Func.Config.Types
1721
1722
1723 for {
1724 x := v_0
1725 v.reset(OpWasmF32ConvertI64U)
1726 v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
1727 v0.AddArg(x)
1728 v.AddArg(v0)
1729 return true
1730 }
1731 }
1732 func rewriteValueWasm_OpCvt32Uto64F(v *Value) bool {
1733 v_0 := v.Args[0]
1734 b := v.Block
1735 typ := &b.Func.Config.Types
1736
1737
1738 for {
1739 x := v_0
1740 v.reset(OpWasmF64ConvertI64U)
1741 v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
1742 v0.AddArg(x)
1743 v.AddArg(v0)
1744 return true
1745 }
1746 }
1747 func rewriteValueWasm_OpCvt32to32F(v *Value) bool {
1748 v_0 := v.Args[0]
1749 b := v.Block
1750 typ := &b.Func.Config.Types
1751
1752
1753 for {
1754 x := v_0
1755 v.reset(OpWasmF32ConvertI64S)
1756 v0 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
1757 v0.AddArg(x)
1758 v.AddArg(v0)
1759 return true
1760 }
1761 }
1762 func rewriteValueWasm_OpCvt32to64F(v *Value) bool {
1763 v_0 := v.Args[0]
1764 b := v.Block
1765 typ := &b.Func.Config.Types
1766
1767
1768 for {
1769 x := v_0
1770 v.reset(OpWasmF64ConvertI64S)
1771 v0 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
1772 v0.AddArg(x)
1773 v.AddArg(v0)
1774 return true
1775 }
1776 }
1777 func rewriteValueWasm_OpDiv16(v *Value) bool {
1778 v_1 := v.Args[1]
1779 v_0 := v.Args[0]
1780 b := v.Block
1781 typ := &b.Func.Config.Types
1782
1783
1784 for {
1785 if auxIntToBool(v.AuxInt) != false {
1786 break
1787 }
1788 x := v_0
1789 y := v_1
1790 v.reset(OpWasmI64DivS)
1791 v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
1792 v0.AddArg(x)
1793 v1 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
1794 v1.AddArg(y)
1795 v.AddArg2(v0, v1)
1796 return true
1797 }
1798 return false
1799 }
1800 func rewriteValueWasm_OpDiv16u(v *Value) bool {
1801 v_1 := v.Args[1]
1802 v_0 := v.Args[0]
1803 b := v.Block
1804 typ := &b.Func.Config.Types
1805
1806
1807 for {
1808 x := v_0
1809 y := v_1
1810 v.reset(OpWasmI64DivU)
1811 v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
1812 v0.AddArg(x)
1813 v1 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
1814 v1.AddArg(y)
1815 v.AddArg2(v0, v1)
1816 return true
1817 }
1818 }
1819 func rewriteValueWasm_OpDiv32(v *Value) bool {
1820 v_1 := v.Args[1]
1821 v_0 := v.Args[0]
1822 b := v.Block
1823 typ := &b.Func.Config.Types
1824
1825
1826 for {
1827 if auxIntToBool(v.AuxInt) != false {
1828 break
1829 }
1830 x := v_0
1831 y := v_1
1832 v.reset(OpWasmI64DivS)
1833 v0 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
1834 v0.AddArg(x)
1835 v1 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
1836 v1.AddArg(y)
1837 v.AddArg2(v0, v1)
1838 return true
1839 }
1840 return false
1841 }
1842 func rewriteValueWasm_OpDiv32u(v *Value) bool {
1843 v_1 := v.Args[1]
1844 v_0 := v.Args[0]
1845 b := v.Block
1846 typ := &b.Func.Config.Types
1847
1848
1849 for {
1850 x := v_0
1851 y := v_1
1852 v.reset(OpWasmI64DivU)
1853 v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
1854 v0.AddArg(x)
1855 v1 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
1856 v1.AddArg(y)
1857 v.AddArg2(v0, v1)
1858 return true
1859 }
1860 }
1861 func rewriteValueWasm_OpDiv64(v *Value) bool {
1862 v_1 := v.Args[1]
1863 v_0 := v.Args[0]
1864
1865
1866 for {
1867 if auxIntToBool(v.AuxInt) != false {
1868 break
1869 }
1870 x := v_0
1871 y := v_1
1872 v.reset(OpWasmI64DivS)
1873 v.AddArg2(x, y)
1874 return true
1875 }
1876 return false
1877 }
1878 func rewriteValueWasm_OpDiv8(v *Value) bool {
1879 v_1 := v.Args[1]
1880 v_0 := v.Args[0]
1881 b := v.Block
1882 typ := &b.Func.Config.Types
1883
1884
1885 for {
1886 x := v_0
1887 y := v_1
1888 v.reset(OpWasmI64DivS)
1889 v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
1890 v0.AddArg(x)
1891 v1 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
1892 v1.AddArg(y)
1893 v.AddArg2(v0, v1)
1894 return true
1895 }
1896 }
1897 func rewriteValueWasm_OpDiv8u(v *Value) bool {
1898 v_1 := v.Args[1]
1899 v_0 := v.Args[0]
1900 b := v.Block
1901 typ := &b.Func.Config.Types
1902
1903
1904 for {
1905 x := v_0
1906 y := v_1
1907 v.reset(OpWasmI64DivU)
1908 v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
1909 v0.AddArg(x)
1910 v1 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
1911 v1.AddArg(y)
1912 v.AddArg2(v0, v1)
1913 return true
1914 }
1915 }
1916 func rewriteValueWasm_OpEq16(v *Value) bool {
1917 v_1 := v.Args[1]
1918 v_0 := v.Args[0]
1919 b := v.Block
1920 typ := &b.Func.Config.Types
1921
1922
1923 for {
1924 x := v_0
1925 y := v_1
1926 v.reset(OpWasmI64Eq)
1927 v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
1928 v0.AddArg(x)
1929 v1 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
1930 v1.AddArg(y)
1931 v.AddArg2(v0, v1)
1932 return true
1933 }
1934 }
1935 func rewriteValueWasm_OpEq32(v *Value) bool {
1936 v_1 := v.Args[1]
1937 v_0 := v.Args[0]
1938 b := v.Block
1939 typ := &b.Func.Config.Types
1940
1941
1942 for {
1943 x := v_0
1944 y := v_1
1945 v.reset(OpWasmI64Eq)
1946 v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
1947 v0.AddArg(x)
1948 v1 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
1949 v1.AddArg(y)
1950 v.AddArg2(v0, v1)
1951 return true
1952 }
1953 }
1954 func rewriteValueWasm_OpEq8(v *Value) bool {
1955 v_1 := v.Args[1]
1956 v_0 := v.Args[0]
1957 b := v.Block
1958 typ := &b.Func.Config.Types
1959
1960
1961 for {
1962 x := v_0
1963 y := v_1
1964 v.reset(OpWasmI64Eq)
1965 v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
1966 v0.AddArg(x)
1967 v1 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
1968 v1.AddArg(y)
1969 v.AddArg2(v0, v1)
1970 return true
1971 }
1972 }
1973 func rewriteValueWasm_OpHmul64(v *Value) bool {
1974 v_1 := v.Args[1]
1975 v_0 := v.Args[0]
1976 b := v.Block
1977 typ := &b.Func.Config.Types
1978
1979
1980 for {
1981 t := v.Type
1982 x := v_0
1983 y := v_1
1984 v.reset(OpLast)
1985 v.Type = t
1986 x0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
1987 x0.AddArg(x)
1988 x1 := b.NewValue0(v.Pos, OpWasmI64ShrS, typ.Int64)
1989 v2 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
1990 v2.AuxInt = int64ToAuxInt(32)
1991 x1.AddArg2(x, v2)
1992 y0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
1993 y0.AddArg(y)
1994 y1 := b.NewValue0(v.Pos, OpWasmI64ShrS, typ.Int64)
1995 y1.AddArg2(y, v2)
1996 x0y0 := b.NewValue0(v.Pos, OpWasmI64Mul, typ.Int64)
1997 x0y0.AddArg2(x0, y0)
1998 tt := b.NewValue0(v.Pos, OpWasmI64Add, typ.Int64)
1999 v7 := b.NewValue0(v.Pos, OpWasmI64Mul, typ.Int64)
2000 v7.AddArg2(x1, y0)
2001 v8 := b.NewValue0(v.Pos, OpWasmI64ShrU, typ.Int64)
2002 v8.AddArg2(x0y0, v2)
2003 tt.AddArg2(v7, v8)
2004 w1 := b.NewValue0(v.Pos, OpWasmI64Add, typ.Int64)
2005 v10 := b.NewValue0(v.Pos, OpWasmI64Mul, typ.Int64)
2006 v10.AddArg2(x0, y1)
2007 v11 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
2008 v11.AddArg(tt)
2009 w1.AddArg2(v10, v11)
2010 w2 := b.NewValue0(v.Pos, OpWasmI64ShrS, typ.Int64)
2011 w2.AddArg2(tt, v2)
2012 v13 := b.NewValue0(v.Pos, OpWasmI64Add, typ.Int64)
2013 v14 := b.NewValue0(v.Pos, OpWasmI64Add, typ.Int64)
2014 v15 := b.NewValue0(v.Pos, OpWasmI64Mul, typ.Int64)
2015 v15.AddArg2(x1, y1)
2016 v14.AddArg2(v15, w2)
2017 v16 := b.NewValue0(v.Pos, OpWasmI64ShrS, typ.Int64)
2018 v16.AddArg2(w1, v2)
2019 v13.AddArg2(v14, v16)
2020 v.AddArgs(x0, x1, y0, y1, x0y0, tt, w1, w2, v13)
2021 return true
2022 }
2023 }
2024 func rewriteValueWasm_OpHmul64u(v *Value) bool {
2025 v_1 := v.Args[1]
2026 v_0 := v.Args[0]
2027 b := v.Block
2028 typ := &b.Func.Config.Types
2029
2030
2031 for {
2032 t := v.Type
2033 x := v_0
2034 y := v_1
2035 v.reset(OpLast)
2036 v.Type = t
2037 x0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
2038 x0.AddArg(x)
2039 x1 := b.NewValue0(v.Pos, OpWasmI64ShrU, typ.Int64)
2040 v2 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
2041 v2.AuxInt = int64ToAuxInt(32)
2042 x1.AddArg2(x, v2)
2043 y0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
2044 y0.AddArg(y)
2045 y1 := b.NewValue0(v.Pos, OpWasmI64ShrU, typ.Int64)
2046 y1.AddArg2(y, v2)
2047 w0 := b.NewValue0(v.Pos, OpWasmI64Mul, typ.Int64)
2048 w0.AddArg2(x0, y0)
2049 tt := b.NewValue0(v.Pos, OpWasmI64Add, typ.Int64)
2050 v7 := b.NewValue0(v.Pos, OpWasmI64Mul, typ.Int64)
2051 v7.AddArg2(x1, y0)
2052 v8 := b.NewValue0(v.Pos, OpWasmI64ShrU, typ.Int64)
2053 v8.AddArg2(w0, v2)
2054 tt.AddArg2(v7, v8)
2055 w1 := b.NewValue0(v.Pos, OpWasmI64Add, typ.Int64)
2056 v10 := b.NewValue0(v.Pos, OpWasmI64Mul, typ.Int64)
2057 v10.AddArg2(x0, y1)
2058 v11 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
2059 v11.AddArg(tt)
2060 w1.AddArg2(v10, v11)
2061 w2 := b.NewValue0(v.Pos, OpWasmI64ShrU, typ.Int64)
2062 w2.AddArg2(tt, v2)
2063 hi := b.NewValue0(v.Pos, OpWasmI64Add, typ.Int64)
2064 v14 := b.NewValue0(v.Pos, OpWasmI64Add, typ.Int64)
2065 v15 := b.NewValue0(v.Pos, OpWasmI64Mul, typ.Int64)
2066 v15.AddArg2(x1, y1)
2067 v14.AddArg2(v15, w2)
2068 v16 := b.NewValue0(v.Pos, OpWasmI64ShrU, typ.Int64)
2069 v16.AddArg2(w1, v2)
2070 hi.AddArg2(v14, v16)
2071 v.AddArgs(x0, x1, y0, y1, w0, tt, w1, w2, hi)
2072 return true
2073 }
2074 }
2075 func rewriteValueWasm_OpIsNonNil(v *Value) bool {
2076 v_0 := v.Args[0]
2077 b := v.Block
2078 typ := &b.Func.Config.Types
2079
2080
2081 for {
2082 p := v_0
2083 v.reset(OpWasmI64Eqz)
2084 v0 := b.NewValue0(v.Pos, OpWasmI64Eqz, typ.Bool)
2085 v0.AddArg(p)
2086 v.AddArg(v0)
2087 return true
2088 }
2089 }
2090 func rewriteValueWasm_OpLast(v *Value) bool {
2091
2092
2093 for {
2094 v.copyOf(v.Args[len(v.Args)-1])
2095 return true
2096 }
2097 }
2098 func rewriteValueWasm_OpLeq16(v *Value) bool {
2099 v_1 := v.Args[1]
2100 v_0 := v.Args[0]
2101 b := v.Block
2102 typ := &b.Func.Config.Types
2103
2104
2105 for {
2106 x := v_0
2107 y := v_1
2108 v.reset(OpWasmI64LeS)
2109 v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
2110 v0.AddArg(x)
2111 v1 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
2112 v1.AddArg(y)
2113 v.AddArg2(v0, v1)
2114 return true
2115 }
2116 }
2117 func rewriteValueWasm_OpLeq16U(v *Value) bool {
2118 v_1 := v.Args[1]
2119 v_0 := v.Args[0]
2120 b := v.Block
2121 typ := &b.Func.Config.Types
2122
2123
2124 for {
2125 x := v_0
2126 y := v_1
2127 v.reset(OpWasmI64LeU)
2128 v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
2129 v0.AddArg(x)
2130 v1 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
2131 v1.AddArg(y)
2132 v.AddArg2(v0, v1)
2133 return true
2134 }
2135 }
2136 func rewriteValueWasm_OpLeq32(v *Value) bool {
2137 v_1 := v.Args[1]
2138 v_0 := v.Args[0]
2139 b := v.Block
2140 typ := &b.Func.Config.Types
2141
2142
2143 for {
2144 x := v_0
2145 y := v_1
2146 v.reset(OpWasmI64LeS)
2147 v0 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
2148 v0.AddArg(x)
2149 v1 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
2150 v1.AddArg(y)
2151 v.AddArg2(v0, v1)
2152 return true
2153 }
2154 }
2155 func rewriteValueWasm_OpLeq32U(v *Value) bool {
2156 v_1 := v.Args[1]
2157 v_0 := v.Args[0]
2158 b := v.Block
2159 typ := &b.Func.Config.Types
2160
2161
2162 for {
2163 x := v_0
2164 y := v_1
2165 v.reset(OpWasmI64LeU)
2166 v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
2167 v0.AddArg(x)
2168 v1 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
2169 v1.AddArg(y)
2170 v.AddArg2(v0, v1)
2171 return true
2172 }
2173 }
2174 func rewriteValueWasm_OpLeq8(v *Value) bool {
2175 v_1 := v.Args[1]
2176 v_0 := v.Args[0]
2177 b := v.Block
2178 typ := &b.Func.Config.Types
2179
2180
2181 for {
2182 x := v_0
2183 y := v_1
2184 v.reset(OpWasmI64LeS)
2185 v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
2186 v0.AddArg(x)
2187 v1 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
2188 v1.AddArg(y)
2189 v.AddArg2(v0, v1)
2190 return true
2191 }
2192 }
2193 func rewriteValueWasm_OpLeq8U(v *Value) bool {
2194 v_1 := v.Args[1]
2195 v_0 := v.Args[0]
2196 b := v.Block
2197 typ := &b.Func.Config.Types
2198
2199
2200 for {
2201 x := v_0
2202 y := v_1
2203 v.reset(OpWasmI64LeU)
2204 v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
2205 v0.AddArg(x)
2206 v1 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
2207 v1.AddArg(y)
2208 v.AddArg2(v0, v1)
2209 return true
2210 }
2211 }
2212 func rewriteValueWasm_OpLess16(v *Value) bool {
2213 v_1 := v.Args[1]
2214 v_0 := v.Args[0]
2215 b := v.Block
2216 typ := &b.Func.Config.Types
2217
2218
2219 for {
2220 x := v_0
2221 y := v_1
2222 v.reset(OpWasmI64LtS)
2223 v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
2224 v0.AddArg(x)
2225 v1 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
2226 v1.AddArg(y)
2227 v.AddArg2(v0, v1)
2228 return true
2229 }
2230 }
2231 func rewriteValueWasm_OpLess16U(v *Value) bool {
2232 v_1 := v.Args[1]
2233 v_0 := v.Args[0]
2234 b := v.Block
2235 typ := &b.Func.Config.Types
2236
2237
2238 for {
2239 x := v_0
2240 y := v_1
2241 v.reset(OpWasmI64LtU)
2242 v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
2243 v0.AddArg(x)
2244 v1 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
2245 v1.AddArg(y)
2246 v.AddArg2(v0, v1)
2247 return true
2248 }
2249 }
2250 func rewriteValueWasm_OpLess32(v *Value) bool {
2251 v_1 := v.Args[1]
2252 v_0 := v.Args[0]
2253 b := v.Block
2254 typ := &b.Func.Config.Types
2255
2256
2257 for {
2258 x := v_0
2259 y := v_1
2260 v.reset(OpWasmI64LtS)
2261 v0 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
2262 v0.AddArg(x)
2263 v1 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
2264 v1.AddArg(y)
2265 v.AddArg2(v0, v1)
2266 return true
2267 }
2268 }
2269 func rewriteValueWasm_OpLess32U(v *Value) bool {
2270 v_1 := v.Args[1]
2271 v_0 := v.Args[0]
2272 b := v.Block
2273 typ := &b.Func.Config.Types
2274
2275
2276 for {
2277 x := v_0
2278 y := v_1
2279 v.reset(OpWasmI64LtU)
2280 v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
2281 v0.AddArg(x)
2282 v1 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
2283 v1.AddArg(y)
2284 v.AddArg2(v0, v1)
2285 return true
2286 }
2287 }
2288 func rewriteValueWasm_OpLess8(v *Value) bool {
2289 v_1 := v.Args[1]
2290 v_0 := v.Args[0]
2291 b := v.Block
2292 typ := &b.Func.Config.Types
2293
2294
2295 for {
2296 x := v_0
2297 y := v_1
2298 v.reset(OpWasmI64LtS)
2299 v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
2300 v0.AddArg(x)
2301 v1 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
2302 v1.AddArg(y)
2303 v.AddArg2(v0, v1)
2304 return true
2305 }
2306 }
2307 func rewriteValueWasm_OpLess8U(v *Value) bool {
2308 v_1 := v.Args[1]
2309 v_0 := v.Args[0]
2310 b := v.Block
2311 typ := &b.Func.Config.Types
2312
2313
2314 for {
2315 x := v_0
2316 y := v_1
2317 v.reset(OpWasmI64LtU)
2318 v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
2319 v0.AddArg(x)
2320 v1 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
2321 v1.AddArg(y)
2322 v.AddArg2(v0, v1)
2323 return true
2324 }
2325 }
2326 func rewriteValueWasm_OpLoad(v *Value) bool {
2327 v_1 := v.Args[1]
2328 v_0 := v.Args[0]
2329
2330
2331
2332 for {
2333 t := v.Type
2334 ptr := v_0
2335 mem := v_1
2336 if !(is32BitFloat(t)) {
2337 break
2338 }
2339 v.reset(OpWasmF32Load)
2340 v.AddArg2(ptr, mem)
2341 return true
2342 }
2343
2344
2345
2346 for {
2347 t := v.Type
2348 ptr := v_0
2349 mem := v_1
2350 if !(is64BitFloat(t)) {
2351 break
2352 }
2353 v.reset(OpWasmF64Load)
2354 v.AddArg2(ptr, mem)
2355 return true
2356 }
2357
2358
2359
2360 for {
2361 t := v.Type
2362 ptr := v_0
2363 mem := v_1
2364 if !(t.Size() == 16) {
2365 break
2366 }
2367 v.reset(OpWasmV128Load)
2368 v.AddArg2(ptr, mem)
2369 return true
2370 }
2371
2372
2373
2374 for {
2375 t := v.Type
2376 ptr := v_0
2377 mem := v_1
2378 if !(t.Size() == 8) {
2379 break
2380 }
2381 v.reset(OpWasmI64Load)
2382 v.AddArg2(ptr, mem)
2383 return true
2384 }
2385
2386
2387
2388 for {
2389 t := v.Type
2390 ptr := v_0
2391 mem := v_1
2392 if !(t.Size() == 4 && !t.IsSigned()) {
2393 break
2394 }
2395 v.reset(OpWasmI64Load32U)
2396 v.AddArg2(ptr, mem)
2397 return true
2398 }
2399
2400
2401
2402 for {
2403 t := v.Type
2404 ptr := v_0
2405 mem := v_1
2406 if !(t.Size() == 4 && t.IsSigned()) {
2407 break
2408 }
2409 v.reset(OpWasmI64Load32S)
2410 v.AddArg2(ptr, mem)
2411 return true
2412 }
2413
2414
2415
2416 for {
2417 t := v.Type
2418 ptr := v_0
2419 mem := v_1
2420 if !(t.Size() == 2 && !t.IsSigned()) {
2421 break
2422 }
2423 v.reset(OpWasmI64Load16U)
2424 v.AddArg2(ptr, mem)
2425 return true
2426 }
2427
2428
2429
2430 for {
2431 t := v.Type
2432 ptr := v_0
2433 mem := v_1
2434 if !(t.Size() == 2 && t.IsSigned()) {
2435 break
2436 }
2437 v.reset(OpWasmI64Load16S)
2438 v.AddArg2(ptr, mem)
2439 return true
2440 }
2441
2442
2443
2444 for {
2445 t := v.Type
2446 ptr := v_0
2447 mem := v_1
2448 if !(t.Size() == 1 && !t.IsSigned()) {
2449 break
2450 }
2451 v.reset(OpWasmI64Load8U)
2452 v.AddArg2(ptr, mem)
2453 return true
2454 }
2455
2456
2457
2458 for {
2459 t := v.Type
2460 ptr := v_0
2461 mem := v_1
2462 if !(t.Size() == 1 && t.IsSigned()) {
2463 break
2464 }
2465 v.reset(OpWasmI64Load8S)
2466 v.AddArg2(ptr, mem)
2467 return true
2468 }
2469 return false
2470 }
2471 func rewriteValueWasm_OpLocalAddr(v *Value) bool {
2472 v_1 := v.Args[1]
2473 v_0 := v.Args[0]
2474 b := v.Block
2475 typ := &b.Func.Config.Types
2476
2477
2478
2479 for {
2480 t := v.Type
2481 sym := auxToSym(v.Aux)
2482 base := v_0
2483 mem := v_1
2484 if !(t.Elem().HasPointers()) {
2485 break
2486 }
2487 v.reset(OpWasmLoweredAddr)
2488 v.Aux = symToAux(sym)
2489 v0 := b.NewValue0(v.Pos, OpSPanchored, typ.Uintptr)
2490 v0.AddArg2(base, mem)
2491 v.AddArg(v0)
2492 return true
2493 }
2494
2495
2496
2497 for {
2498 t := v.Type
2499 sym := auxToSym(v.Aux)
2500 base := v_0
2501 if !(!t.Elem().HasPointers()) {
2502 break
2503 }
2504 v.reset(OpWasmLoweredAddr)
2505 v.Aux = symToAux(sym)
2506 v.AddArg(base)
2507 return true
2508 }
2509 return false
2510 }
2511 func rewriteValueWasm_OpLsh16x16(v *Value) bool {
2512 v_1 := v.Args[1]
2513 v_0 := v.Args[0]
2514 b := v.Block
2515 typ := &b.Func.Config.Types
2516
2517
2518 for {
2519 c := auxIntToBool(v.AuxInt)
2520 x := v_0
2521 y := v_1
2522 v.reset(OpLsh64x64)
2523 v.AuxInt = boolToAuxInt(c)
2524 v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
2525 v0.AddArg(y)
2526 v.AddArg2(x, v0)
2527 return true
2528 }
2529 }
2530 func rewriteValueWasm_OpLsh16x32(v *Value) bool {
2531 v_1 := v.Args[1]
2532 v_0 := v.Args[0]
2533 b := v.Block
2534 typ := &b.Func.Config.Types
2535
2536
2537 for {
2538 c := auxIntToBool(v.AuxInt)
2539 x := v_0
2540 y := v_1
2541 v.reset(OpLsh64x64)
2542 v.AuxInt = boolToAuxInt(c)
2543 v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
2544 v0.AddArg(y)
2545 v.AddArg2(x, v0)
2546 return true
2547 }
2548 }
2549 func rewriteValueWasm_OpLsh16x8(v *Value) bool {
2550 v_1 := v.Args[1]
2551 v_0 := v.Args[0]
2552 b := v.Block
2553 typ := &b.Func.Config.Types
2554
2555
2556 for {
2557 c := auxIntToBool(v.AuxInt)
2558 x := v_0
2559 y := v_1
2560 v.reset(OpLsh64x64)
2561 v.AuxInt = boolToAuxInt(c)
2562 v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
2563 v0.AddArg(y)
2564 v.AddArg2(x, v0)
2565 return true
2566 }
2567 }
2568 func rewriteValueWasm_OpLsh32x16(v *Value) bool {
2569 v_1 := v.Args[1]
2570 v_0 := v.Args[0]
2571 b := v.Block
2572 typ := &b.Func.Config.Types
2573
2574
2575 for {
2576 c := auxIntToBool(v.AuxInt)
2577 x := v_0
2578 y := v_1
2579 v.reset(OpLsh64x64)
2580 v.AuxInt = boolToAuxInt(c)
2581 v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
2582 v0.AddArg(y)
2583 v.AddArg2(x, v0)
2584 return true
2585 }
2586 }
2587 func rewriteValueWasm_OpLsh32x32(v *Value) bool {
2588 v_1 := v.Args[1]
2589 v_0 := v.Args[0]
2590 b := v.Block
2591 typ := &b.Func.Config.Types
2592
2593
2594 for {
2595 c := auxIntToBool(v.AuxInt)
2596 x := v_0
2597 y := v_1
2598 v.reset(OpLsh64x64)
2599 v.AuxInt = boolToAuxInt(c)
2600 v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
2601 v0.AddArg(y)
2602 v.AddArg2(x, v0)
2603 return true
2604 }
2605 }
2606 func rewriteValueWasm_OpLsh32x8(v *Value) bool {
2607 v_1 := v.Args[1]
2608 v_0 := v.Args[0]
2609 b := v.Block
2610 typ := &b.Func.Config.Types
2611
2612
2613 for {
2614 c := auxIntToBool(v.AuxInt)
2615 x := v_0
2616 y := v_1
2617 v.reset(OpLsh64x64)
2618 v.AuxInt = boolToAuxInt(c)
2619 v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
2620 v0.AddArg(y)
2621 v.AddArg2(x, v0)
2622 return true
2623 }
2624 }
2625 func rewriteValueWasm_OpLsh64x16(v *Value) bool {
2626 v_1 := v.Args[1]
2627 v_0 := v.Args[0]
2628 b := v.Block
2629 typ := &b.Func.Config.Types
2630
2631
2632 for {
2633 c := auxIntToBool(v.AuxInt)
2634 x := v_0
2635 y := v_1
2636 v.reset(OpLsh64x64)
2637 v.AuxInt = boolToAuxInt(c)
2638 v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
2639 v0.AddArg(y)
2640 v.AddArg2(x, v0)
2641 return true
2642 }
2643 }
2644 func rewriteValueWasm_OpLsh64x32(v *Value) bool {
2645 v_1 := v.Args[1]
2646 v_0 := v.Args[0]
2647 b := v.Block
2648 typ := &b.Func.Config.Types
2649
2650
2651 for {
2652 c := auxIntToBool(v.AuxInt)
2653 x := v_0
2654 y := v_1
2655 v.reset(OpLsh64x64)
2656 v.AuxInt = boolToAuxInt(c)
2657 v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
2658 v0.AddArg(y)
2659 v.AddArg2(x, v0)
2660 return true
2661 }
2662 }
2663 func rewriteValueWasm_OpLsh64x64(v *Value) bool {
2664 v_1 := v.Args[1]
2665 v_0 := v.Args[0]
2666 b := v.Block
2667 typ := &b.Func.Config.Types
2668
2669
2670
2671 for {
2672 x := v_0
2673 y := v_1
2674 if !(shiftIsBounded(v)) {
2675 break
2676 }
2677 v.reset(OpWasmI64Shl)
2678 v.AddArg2(x, y)
2679 return true
2680 }
2681
2682
2683
2684 for {
2685 x := v_0
2686 if v_1.Op != OpWasmI64Const {
2687 break
2688 }
2689 c := auxIntToInt64(v_1.AuxInt)
2690 if !(uint64(c) < 64) {
2691 break
2692 }
2693 v.reset(OpWasmI64Shl)
2694 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
2695 v0.AuxInt = int64ToAuxInt(c)
2696 v.AddArg2(x, v0)
2697 return true
2698 }
2699
2700
2701
2702 for {
2703 if v_1.Op != OpWasmI64Const {
2704 break
2705 }
2706 c := auxIntToInt64(v_1.AuxInt)
2707 if !(uint64(c) >= 64) {
2708 break
2709 }
2710 v.reset(OpWasmI64Const)
2711 v.AuxInt = int64ToAuxInt(0)
2712 return true
2713 }
2714
2715
2716 for {
2717 x := v_0
2718 y := v_1
2719 v.reset(OpWasmSelect)
2720 v0 := b.NewValue0(v.Pos, OpWasmI64Shl, typ.Int64)
2721 v0.AddArg2(x, y)
2722 v1 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
2723 v1.AuxInt = int64ToAuxInt(0)
2724 v2 := b.NewValue0(v.Pos, OpWasmI64LtU, typ.Bool)
2725 v3 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
2726 v3.AuxInt = int64ToAuxInt(64)
2727 v2.AddArg2(y, v3)
2728 v.AddArg3(v0, v1, v2)
2729 return true
2730 }
2731 }
2732 func rewriteValueWasm_OpLsh64x8(v *Value) bool {
2733 v_1 := v.Args[1]
2734 v_0 := v.Args[0]
2735 b := v.Block
2736 typ := &b.Func.Config.Types
2737
2738
2739 for {
2740 c := auxIntToBool(v.AuxInt)
2741 x := v_0
2742 y := v_1
2743 v.reset(OpLsh64x64)
2744 v.AuxInt = boolToAuxInt(c)
2745 v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
2746 v0.AddArg(y)
2747 v.AddArg2(x, v0)
2748 return true
2749 }
2750 }
2751 func rewriteValueWasm_OpLsh8x16(v *Value) bool {
2752 v_1 := v.Args[1]
2753 v_0 := v.Args[0]
2754 b := v.Block
2755 typ := &b.Func.Config.Types
2756
2757
2758 for {
2759 c := auxIntToBool(v.AuxInt)
2760 x := v_0
2761 y := v_1
2762 v.reset(OpLsh64x64)
2763 v.AuxInt = boolToAuxInt(c)
2764 v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
2765 v0.AddArg(y)
2766 v.AddArg2(x, v0)
2767 return true
2768 }
2769 }
2770 func rewriteValueWasm_OpLsh8x32(v *Value) bool {
2771 v_1 := v.Args[1]
2772 v_0 := v.Args[0]
2773 b := v.Block
2774 typ := &b.Func.Config.Types
2775
2776
2777 for {
2778 c := auxIntToBool(v.AuxInt)
2779 x := v_0
2780 y := v_1
2781 v.reset(OpLsh64x64)
2782 v.AuxInt = boolToAuxInt(c)
2783 v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
2784 v0.AddArg(y)
2785 v.AddArg2(x, v0)
2786 return true
2787 }
2788 }
2789 func rewriteValueWasm_OpLsh8x8(v *Value) bool {
2790 v_1 := v.Args[1]
2791 v_0 := v.Args[0]
2792 b := v.Block
2793 typ := &b.Func.Config.Types
2794
2795
2796 for {
2797 c := auxIntToBool(v.AuxInt)
2798 x := v_0
2799 y := v_1
2800 v.reset(OpLsh64x64)
2801 v.AuxInt = boolToAuxInt(c)
2802 v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
2803 v0.AddArg(y)
2804 v.AddArg2(x, v0)
2805 return true
2806 }
2807 }
2808 func rewriteValueWasm_OpMod16(v *Value) bool {
2809 v_1 := v.Args[1]
2810 v_0 := v.Args[0]
2811 b := v.Block
2812 typ := &b.Func.Config.Types
2813
2814
2815 for {
2816 if auxIntToBool(v.AuxInt) != false {
2817 break
2818 }
2819 x := v_0
2820 y := v_1
2821 v.reset(OpWasmI64RemS)
2822 v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
2823 v0.AddArg(x)
2824 v1 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
2825 v1.AddArg(y)
2826 v.AddArg2(v0, v1)
2827 return true
2828 }
2829 return false
2830 }
2831 func rewriteValueWasm_OpMod16u(v *Value) bool {
2832 v_1 := v.Args[1]
2833 v_0 := v.Args[0]
2834 b := v.Block
2835 typ := &b.Func.Config.Types
2836
2837
2838 for {
2839 x := v_0
2840 y := v_1
2841 v.reset(OpWasmI64RemU)
2842 v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
2843 v0.AddArg(x)
2844 v1 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
2845 v1.AddArg(y)
2846 v.AddArg2(v0, v1)
2847 return true
2848 }
2849 }
2850 func rewriteValueWasm_OpMod32(v *Value) bool {
2851 v_1 := v.Args[1]
2852 v_0 := v.Args[0]
2853 b := v.Block
2854 typ := &b.Func.Config.Types
2855
2856
2857 for {
2858 if auxIntToBool(v.AuxInt) != false {
2859 break
2860 }
2861 x := v_0
2862 y := v_1
2863 v.reset(OpWasmI64RemS)
2864 v0 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
2865 v0.AddArg(x)
2866 v1 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
2867 v1.AddArg(y)
2868 v.AddArg2(v0, v1)
2869 return true
2870 }
2871 return false
2872 }
2873 func rewriteValueWasm_OpMod32u(v *Value) bool {
2874 v_1 := v.Args[1]
2875 v_0 := v.Args[0]
2876 b := v.Block
2877 typ := &b.Func.Config.Types
2878
2879
2880 for {
2881 x := v_0
2882 y := v_1
2883 v.reset(OpWasmI64RemU)
2884 v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
2885 v0.AddArg(x)
2886 v1 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
2887 v1.AddArg(y)
2888 v.AddArg2(v0, v1)
2889 return true
2890 }
2891 }
2892 func rewriteValueWasm_OpMod64(v *Value) bool {
2893 v_1 := v.Args[1]
2894 v_0 := v.Args[0]
2895
2896
2897 for {
2898 if auxIntToBool(v.AuxInt) != false {
2899 break
2900 }
2901 x := v_0
2902 y := v_1
2903 v.reset(OpWasmI64RemS)
2904 v.AddArg2(x, y)
2905 return true
2906 }
2907 return false
2908 }
2909 func rewriteValueWasm_OpMod8(v *Value) bool {
2910 v_1 := v.Args[1]
2911 v_0 := v.Args[0]
2912 b := v.Block
2913 typ := &b.Func.Config.Types
2914
2915
2916 for {
2917 x := v_0
2918 y := v_1
2919 v.reset(OpWasmI64RemS)
2920 v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
2921 v0.AddArg(x)
2922 v1 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
2923 v1.AddArg(y)
2924 v.AddArg2(v0, v1)
2925 return true
2926 }
2927 }
2928 func rewriteValueWasm_OpMod8u(v *Value) bool {
2929 v_1 := v.Args[1]
2930 v_0 := v.Args[0]
2931 b := v.Block
2932 typ := &b.Func.Config.Types
2933
2934
2935 for {
2936 x := v_0
2937 y := v_1
2938 v.reset(OpWasmI64RemU)
2939 v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
2940 v0.AddArg(x)
2941 v1 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
2942 v1.AddArg(y)
2943 v.AddArg2(v0, v1)
2944 return true
2945 }
2946 }
2947 func rewriteValueWasm_OpMove(v *Value) bool {
2948 v_2 := v.Args[2]
2949 v_1 := v.Args[1]
2950 v_0 := v.Args[0]
2951 b := v.Block
2952 typ := &b.Func.Config.Types
2953
2954
2955 for {
2956 if auxIntToInt64(v.AuxInt) != 0 {
2957 break
2958 }
2959 mem := v_2
2960 v.copyOf(mem)
2961 return true
2962 }
2963
2964
2965 for {
2966 if auxIntToInt64(v.AuxInt) != 1 {
2967 break
2968 }
2969 dst := v_0
2970 src := v_1
2971 mem := v_2
2972 v.reset(OpWasmI64Store8)
2973 v0 := b.NewValue0(v.Pos, OpWasmI64Load8U, typ.UInt8)
2974 v0.AddArg2(src, mem)
2975 v.AddArg3(dst, v0, mem)
2976 return true
2977 }
2978
2979
2980 for {
2981 if auxIntToInt64(v.AuxInt) != 2 {
2982 break
2983 }
2984 dst := v_0
2985 src := v_1
2986 mem := v_2
2987 v.reset(OpWasmI64Store16)
2988 v0 := b.NewValue0(v.Pos, OpWasmI64Load16U, typ.UInt16)
2989 v0.AddArg2(src, mem)
2990 v.AddArg3(dst, v0, mem)
2991 return true
2992 }
2993
2994
2995 for {
2996 if auxIntToInt64(v.AuxInt) != 4 {
2997 break
2998 }
2999 dst := v_0
3000 src := v_1
3001 mem := v_2
3002 v.reset(OpWasmI64Store32)
3003 v0 := b.NewValue0(v.Pos, OpWasmI64Load32U, typ.UInt32)
3004 v0.AddArg2(src, mem)
3005 v.AddArg3(dst, v0, mem)
3006 return true
3007 }
3008
3009
3010 for {
3011 if auxIntToInt64(v.AuxInt) != 8 {
3012 break
3013 }
3014 dst := v_0
3015 src := v_1
3016 mem := v_2
3017 v.reset(OpWasmI64Store)
3018 v0 := b.NewValue0(v.Pos, OpWasmI64Load, typ.UInt64)
3019 v0.AddArg2(src, mem)
3020 v.AddArg3(dst, v0, mem)
3021 return true
3022 }
3023
3024
3025 for {
3026 if auxIntToInt64(v.AuxInt) != 16 {
3027 break
3028 }
3029 dst := v_0
3030 src := v_1
3031 mem := v_2
3032 v.reset(OpWasmI64Store)
3033 v.AuxInt = int64ToAuxInt(8)
3034 v0 := b.NewValue0(v.Pos, OpWasmI64Load, typ.UInt64)
3035 v0.AuxInt = int64ToAuxInt(8)
3036 v0.AddArg2(src, mem)
3037 v1 := b.NewValue0(v.Pos, OpWasmI64Store, types.TypeMem)
3038 v2 := b.NewValue0(v.Pos, OpWasmI64Load, typ.UInt64)
3039 v2.AddArg2(src, mem)
3040 v1.AddArg3(dst, v2, mem)
3041 v.AddArg3(dst, v0, v1)
3042 return true
3043 }
3044
3045
3046 for {
3047 if auxIntToInt64(v.AuxInt) != 3 {
3048 break
3049 }
3050 dst := v_0
3051 src := v_1
3052 mem := v_2
3053 v.reset(OpWasmI64Store8)
3054 v.AuxInt = int64ToAuxInt(2)
3055 v0 := b.NewValue0(v.Pos, OpWasmI64Load8U, typ.UInt8)
3056 v0.AuxInt = int64ToAuxInt(2)
3057 v0.AddArg2(src, mem)
3058 v1 := b.NewValue0(v.Pos, OpWasmI64Store16, types.TypeMem)
3059 v2 := b.NewValue0(v.Pos, OpWasmI64Load16U, typ.UInt16)
3060 v2.AddArg2(src, mem)
3061 v1.AddArg3(dst, v2, mem)
3062 v.AddArg3(dst, v0, v1)
3063 return true
3064 }
3065
3066
3067 for {
3068 if auxIntToInt64(v.AuxInt) != 5 {
3069 break
3070 }
3071 dst := v_0
3072 src := v_1
3073 mem := v_2
3074 v.reset(OpWasmI64Store8)
3075 v.AuxInt = int64ToAuxInt(4)
3076 v0 := b.NewValue0(v.Pos, OpWasmI64Load8U, typ.UInt8)
3077 v0.AuxInt = int64ToAuxInt(4)
3078 v0.AddArg2(src, mem)
3079 v1 := b.NewValue0(v.Pos, OpWasmI64Store32, types.TypeMem)
3080 v2 := b.NewValue0(v.Pos, OpWasmI64Load32U, typ.UInt32)
3081 v2.AddArg2(src, mem)
3082 v1.AddArg3(dst, v2, mem)
3083 v.AddArg3(dst, v0, v1)
3084 return true
3085 }
3086
3087
3088 for {
3089 if auxIntToInt64(v.AuxInt) != 6 {
3090 break
3091 }
3092 dst := v_0
3093 src := v_1
3094 mem := v_2
3095 v.reset(OpWasmI64Store16)
3096 v.AuxInt = int64ToAuxInt(4)
3097 v0 := b.NewValue0(v.Pos, OpWasmI64Load16U, typ.UInt16)
3098 v0.AuxInt = int64ToAuxInt(4)
3099 v0.AddArg2(src, mem)
3100 v1 := b.NewValue0(v.Pos, OpWasmI64Store32, types.TypeMem)
3101 v2 := b.NewValue0(v.Pos, OpWasmI64Load32U, typ.UInt32)
3102 v2.AddArg2(src, mem)
3103 v1.AddArg3(dst, v2, mem)
3104 v.AddArg3(dst, v0, v1)
3105 return true
3106 }
3107
3108
3109 for {
3110 if auxIntToInt64(v.AuxInt) != 7 {
3111 break
3112 }
3113 dst := v_0
3114 src := v_1
3115 mem := v_2
3116 v.reset(OpWasmI64Store32)
3117 v.AuxInt = int64ToAuxInt(3)
3118 v0 := b.NewValue0(v.Pos, OpWasmI64Load32U, typ.UInt32)
3119 v0.AuxInt = int64ToAuxInt(3)
3120 v0.AddArg2(src, mem)
3121 v1 := b.NewValue0(v.Pos, OpWasmI64Store32, types.TypeMem)
3122 v2 := b.NewValue0(v.Pos, OpWasmI64Load32U, typ.UInt32)
3123 v2.AddArg2(src, mem)
3124 v1.AddArg3(dst, v2, mem)
3125 v.AddArg3(dst, v0, v1)
3126 return true
3127 }
3128
3129
3130
3131 for {
3132 s := auxIntToInt64(v.AuxInt)
3133 dst := v_0
3134 src := v_1
3135 mem := v_2
3136 if !(s > 8 && s < 16) {
3137 break
3138 }
3139 v.reset(OpWasmI64Store)
3140 v.AuxInt = int64ToAuxInt(s - 8)
3141 v0 := b.NewValue0(v.Pos, OpWasmI64Load, typ.UInt64)
3142 v0.AuxInt = int64ToAuxInt(s - 8)
3143 v0.AddArg2(src, mem)
3144 v1 := b.NewValue0(v.Pos, OpWasmI64Store, types.TypeMem)
3145 v2 := b.NewValue0(v.Pos, OpWasmI64Load, typ.UInt64)
3146 v2.AddArg2(src, mem)
3147 v1.AddArg3(dst, v2, mem)
3148 v.AddArg3(dst, v0, v1)
3149 return true
3150 }
3151
3152
3153
3154 for {
3155 s := auxIntToInt64(v.AuxInt)
3156 dst := v_0
3157 src := v_1
3158 mem := v_2
3159 if !(logLargeCopy(v, s)) {
3160 break
3161 }
3162 v.reset(OpWasmLoweredMove)
3163 v.AuxInt = int64ToAuxInt(s)
3164 v.AddArg3(dst, src, mem)
3165 return true
3166 }
3167 return false
3168 }
3169 func rewriteValueWasm_OpNeg16(v *Value) bool {
3170 v_0 := v.Args[0]
3171 b := v.Block
3172 typ := &b.Func.Config.Types
3173
3174
3175 for {
3176 x := v_0
3177 v.reset(OpWasmI64Sub)
3178 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
3179 v0.AuxInt = int64ToAuxInt(0)
3180 v.AddArg2(v0, x)
3181 return true
3182 }
3183 }
3184 func rewriteValueWasm_OpNeg32(v *Value) bool {
3185 v_0 := v.Args[0]
3186 b := v.Block
3187 typ := &b.Func.Config.Types
3188
3189
3190 for {
3191 x := v_0
3192 v.reset(OpWasmI64Sub)
3193 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
3194 v0.AuxInt = int64ToAuxInt(0)
3195 v.AddArg2(v0, x)
3196 return true
3197 }
3198 }
3199 func rewriteValueWasm_OpNeg64(v *Value) bool {
3200 v_0 := v.Args[0]
3201 b := v.Block
3202 typ := &b.Func.Config.Types
3203
3204
3205 for {
3206 x := v_0
3207 v.reset(OpWasmI64Sub)
3208 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
3209 v0.AuxInt = int64ToAuxInt(0)
3210 v.AddArg2(v0, x)
3211 return true
3212 }
3213 }
3214 func rewriteValueWasm_OpNeg8(v *Value) bool {
3215 v_0 := v.Args[0]
3216 b := v.Block
3217 typ := &b.Func.Config.Types
3218
3219
3220 for {
3221 x := v_0
3222 v.reset(OpWasmI64Sub)
3223 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
3224 v0.AuxInt = int64ToAuxInt(0)
3225 v.AddArg2(v0, x)
3226 return true
3227 }
3228 }
3229 func rewriteValueWasm_OpNeq16(v *Value) bool {
3230 v_1 := v.Args[1]
3231 v_0 := v.Args[0]
3232 b := v.Block
3233 typ := &b.Func.Config.Types
3234
3235
3236 for {
3237 x := v_0
3238 y := v_1
3239 v.reset(OpWasmI64Ne)
3240 v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
3241 v0.AddArg(x)
3242 v1 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
3243 v1.AddArg(y)
3244 v.AddArg2(v0, v1)
3245 return true
3246 }
3247 }
3248 func rewriteValueWasm_OpNeq32(v *Value) bool {
3249 v_1 := v.Args[1]
3250 v_0 := v.Args[0]
3251 b := v.Block
3252 typ := &b.Func.Config.Types
3253
3254
3255 for {
3256 x := v_0
3257 y := v_1
3258 v.reset(OpWasmI64Ne)
3259 v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
3260 v0.AddArg(x)
3261 v1 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
3262 v1.AddArg(y)
3263 v.AddArg2(v0, v1)
3264 return true
3265 }
3266 }
3267 func rewriteValueWasm_OpNeq8(v *Value) bool {
3268 v_1 := v.Args[1]
3269 v_0 := v.Args[0]
3270 b := v.Block
3271 typ := &b.Func.Config.Types
3272
3273
3274 for {
3275 x := v_0
3276 y := v_1
3277 v.reset(OpWasmI64Ne)
3278 v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
3279 v0.AddArg(x)
3280 v1 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
3281 v1.AddArg(y)
3282 v.AddArg2(v0, v1)
3283 return true
3284 }
3285 }
3286 func rewriteValueWasm_OpPopCount16(v *Value) bool {
3287 v_0 := v.Args[0]
3288 b := v.Block
3289 typ := &b.Func.Config.Types
3290
3291
3292 for {
3293 x := v_0
3294 v.reset(OpWasmI64Popcnt)
3295 v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
3296 v0.AddArg(x)
3297 v.AddArg(v0)
3298 return true
3299 }
3300 }
3301 func rewriteValueWasm_OpPopCount32(v *Value) bool {
3302 v_0 := v.Args[0]
3303 b := v.Block
3304 typ := &b.Func.Config.Types
3305
3306
3307 for {
3308 x := v_0
3309 v.reset(OpWasmI64Popcnt)
3310 v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
3311 v0.AddArg(x)
3312 v.AddArg(v0)
3313 return true
3314 }
3315 }
3316 func rewriteValueWasm_OpPopCount8(v *Value) bool {
3317 v_0 := v.Args[0]
3318 b := v.Block
3319 typ := &b.Func.Config.Types
3320
3321
3322 for {
3323 x := v_0
3324 v.reset(OpWasmI64Popcnt)
3325 v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
3326 v0.AddArg(x)
3327 v.AddArg(v0)
3328 return true
3329 }
3330 }
3331 func rewriteValueWasm_OpRotateAllLeftVarInt16x8(v *Value) bool {
3332 v_1 := v.Args[1]
3333 v_0 := v.Args[0]
3334 b := v.Block
3335 typ := &b.Func.Config.Types
3336
3337
3338 for {
3339 x := v_0
3340 y := v_1
3341 v.reset(OpWasmV128Or)
3342 v0 := b.NewValue0(v.Pos, OpWasmI16x8Shl, typ.Vec128)
3343 v0.AddArg2(x, y)
3344 v1 := b.NewValue0(v.Pos, OpWasmI16x8ShrU, typ.Vec128)
3345 v2 := b.NewValue0(v.Pos, OpWasmI64Sub, typ.Int64)
3346 v3 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
3347 v3.AuxInt = int64ToAuxInt(16)
3348 v2.AddArg2(v3, y)
3349 v1.AddArg2(x, v2)
3350 v.AddArg2(v0, v1)
3351 return true
3352 }
3353 }
3354 func rewriteValueWasm_OpRotateAllLeftVarInt32x4(v *Value) bool {
3355 v_1 := v.Args[1]
3356 v_0 := v.Args[0]
3357 b := v.Block
3358 typ := &b.Func.Config.Types
3359
3360
3361 for {
3362 x := v_0
3363 y := v_1
3364 v.reset(OpWasmV128Or)
3365 v0 := b.NewValue0(v.Pos, OpWasmI32x4Shl, typ.Vec128)
3366 v0.AddArg2(x, y)
3367 v1 := b.NewValue0(v.Pos, OpWasmI32x4ShrU, typ.Vec128)
3368 v2 := b.NewValue0(v.Pos, OpWasmI64Sub, typ.Int64)
3369 v3 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
3370 v3.AuxInt = int64ToAuxInt(32)
3371 v2.AddArg2(v3, y)
3372 v1.AddArg2(x, v2)
3373 v.AddArg2(v0, v1)
3374 return true
3375 }
3376 }
3377 func rewriteValueWasm_OpRotateAllLeftVarInt64x2(v *Value) bool {
3378 v_1 := v.Args[1]
3379 v_0 := v.Args[0]
3380 b := v.Block
3381 typ := &b.Func.Config.Types
3382
3383
3384 for {
3385 x := v_0
3386 y := v_1
3387 v.reset(OpWasmV128Or)
3388 v0 := b.NewValue0(v.Pos, OpWasmI64x2Shl, typ.Vec128)
3389 v0.AddArg2(x, y)
3390 v1 := b.NewValue0(v.Pos, OpWasmI64x2ShrU, typ.Vec128)
3391 v2 := b.NewValue0(v.Pos, OpWasmI64Sub, typ.Int64)
3392 v3 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
3393 v3.AuxInt = int64ToAuxInt(64)
3394 v2.AddArg2(v3, y)
3395 v1.AddArg2(x, v2)
3396 v.AddArg2(v0, v1)
3397 return true
3398 }
3399 }
3400 func rewriteValueWasm_OpRotateAllLeftVarInt8x16(v *Value) bool {
3401 v_1 := v.Args[1]
3402 v_0 := v.Args[0]
3403 b := v.Block
3404 typ := &b.Func.Config.Types
3405
3406
3407 for {
3408 x := v_0
3409 y := v_1
3410 v.reset(OpWasmV128Or)
3411 v0 := b.NewValue0(v.Pos, OpWasmI8x16Shl, typ.Vec128)
3412 v0.AddArg2(x, y)
3413 v1 := b.NewValue0(v.Pos, OpWasmI8x16ShrU, typ.Vec128)
3414 v2 := b.NewValue0(v.Pos, OpWasmI64Sub, typ.Int64)
3415 v3 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
3416 v3.AuxInt = int64ToAuxInt(8)
3417 v2.AddArg2(v3, y)
3418 v1.AddArg2(x, v2)
3419 v.AddArg2(v0, v1)
3420 return true
3421 }
3422 }
3423 func rewriteValueWasm_OpRotateAllLeftVarUint16x8(v *Value) bool {
3424 v_1 := v.Args[1]
3425 v_0 := v.Args[0]
3426 b := v.Block
3427 typ := &b.Func.Config.Types
3428
3429
3430 for {
3431 x := v_0
3432 y := v_1
3433 v.reset(OpWasmV128Or)
3434 v0 := b.NewValue0(v.Pos, OpWasmI16x8Shl, typ.Vec128)
3435 v0.AddArg2(x, y)
3436 v1 := b.NewValue0(v.Pos, OpWasmI16x8ShrU, typ.Vec128)
3437 v2 := b.NewValue0(v.Pos, OpWasmI64Sub, typ.Int64)
3438 v3 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
3439 v3.AuxInt = int64ToAuxInt(16)
3440 v2.AddArg2(v3, y)
3441 v1.AddArg2(x, v2)
3442 v.AddArg2(v0, v1)
3443 return true
3444 }
3445 }
3446 func rewriteValueWasm_OpRotateAllLeftVarUint32x4(v *Value) bool {
3447 v_1 := v.Args[1]
3448 v_0 := v.Args[0]
3449 b := v.Block
3450 typ := &b.Func.Config.Types
3451
3452
3453 for {
3454 x := v_0
3455 y := v_1
3456 v.reset(OpWasmV128Or)
3457 v0 := b.NewValue0(v.Pos, OpWasmI32x4Shl, typ.Vec128)
3458 v0.AddArg2(x, y)
3459 v1 := b.NewValue0(v.Pos, OpWasmI32x4ShrU, typ.Vec128)
3460 v2 := b.NewValue0(v.Pos, OpWasmI64Sub, typ.Int64)
3461 v3 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
3462 v3.AuxInt = int64ToAuxInt(32)
3463 v2.AddArg2(v3, y)
3464 v1.AddArg2(x, v2)
3465 v.AddArg2(v0, v1)
3466 return true
3467 }
3468 }
3469 func rewriteValueWasm_OpRotateAllLeftVarUint64x2(v *Value) bool {
3470 v_1 := v.Args[1]
3471 v_0 := v.Args[0]
3472 b := v.Block
3473 typ := &b.Func.Config.Types
3474
3475
3476 for {
3477 x := v_0
3478 y := v_1
3479 v.reset(OpWasmV128Or)
3480 v0 := b.NewValue0(v.Pos, OpWasmI64x2Shl, typ.Vec128)
3481 v0.AddArg2(x, y)
3482 v1 := b.NewValue0(v.Pos, OpWasmI64x2ShrU, typ.Vec128)
3483 v2 := b.NewValue0(v.Pos, OpWasmI64Sub, typ.Int64)
3484 v3 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
3485 v3.AuxInt = int64ToAuxInt(64)
3486 v2.AddArg2(v3, y)
3487 v1.AddArg2(x, v2)
3488 v.AddArg2(v0, v1)
3489 return true
3490 }
3491 }
3492 func rewriteValueWasm_OpRotateAllLeftVarUint8x16(v *Value) bool {
3493 v_1 := v.Args[1]
3494 v_0 := v.Args[0]
3495 b := v.Block
3496 typ := &b.Func.Config.Types
3497
3498
3499 for {
3500 x := v_0
3501 y := v_1
3502 v.reset(OpWasmV128Or)
3503 v0 := b.NewValue0(v.Pos, OpWasmI8x16Shl, typ.Vec128)
3504 v0.AddArg2(x, y)
3505 v1 := b.NewValue0(v.Pos, OpWasmI8x16ShrU, typ.Vec128)
3506 v2 := b.NewValue0(v.Pos, OpWasmI64Sub, typ.Int64)
3507 v3 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
3508 v3.AuxInt = int64ToAuxInt(8)
3509 v2.AddArg2(v3, y)
3510 v1.AddArg2(x, v2)
3511 v.AddArg2(v0, v1)
3512 return true
3513 }
3514 }
3515 func rewriteValueWasm_OpRotateAllRightVarInt16x8(v *Value) bool {
3516 v_1 := v.Args[1]
3517 v_0 := v.Args[0]
3518 b := v.Block
3519 typ := &b.Func.Config.Types
3520
3521
3522 for {
3523 x := v_0
3524 y := v_1
3525 v.reset(OpWasmV128Or)
3526 v0 := b.NewValue0(v.Pos, OpWasmI16x8ShrU, typ.Vec128)
3527 v0.AddArg2(x, y)
3528 v1 := b.NewValue0(v.Pos, OpWasmI16x8Shl, typ.Vec128)
3529 v2 := b.NewValue0(v.Pos, OpWasmI64Sub, typ.Int64)
3530 v3 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
3531 v3.AuxInt = int64ToAuxInt(16)
3532 v2.AddArg2(v3, y)
3533 v1.AddArg2(x, v2)
3534 v.AddArg2(v0, v1)
3535 return true
3536 }
3537 }
3538 func rewriteValueWasm_OpRotateAllRightVarInt32x4(v *Value) bool {
3539 v_1 := v.Args[1]
3540 v_0 := v.Args[0]
3541 b := v.Block
3542 typ := &b.Func.Config.Types
3543
3544
3545 for {
3546 x := v_0
3547 y := v_1
3548 v.reset(OpWasmV128Or)
3549 v0 := b.NewValue0(v.Pos, OpWasmI32x4ShrU, typ.Vec128)
3550 v0.AddArg2(x, y)
3551 v1 := b.NewValue0(v.Pos, OpWasmI32x4Shl, typ.Vec128)
3552 v2 := b.NewValue0(v.Pos, OpWasmI64Sub, typ.Int64)
3553 v3 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
3554 v3.AuxInt = int64ToAuxInt(32)
3555 v2.AddArg2(v3, y)
3556 v1.AddArg2(x, v2)
3557 v.AddArg2(v0, v1)
3558 return true
3559 }
3560 }
3561 func rewriteValueWasm_OpRotateAllRightVarInt64x2(v *Value) bool {
3562 v_1 := v.Args[1]
3563 v_0 := v.Args[0]
3564 b := v.Block
3565 typ := &b.Func.Config.Types
3566
3567
3568 for {
3569 x := v_0
3570 y := v_1
3571 v.reset(OpWasmV128Or)
3572 v0 := b.NewValue0(v.Pos, OpWasmI64x2ShrU, typ.Vec128)
3573 v0.AddArg2(x, y)
3574 v1 := b.NewValue0(v.Pos, OpWasmI64x2Shl, typ.Vec128)
3575 v2 := b.NewValue0(v.Pos, OpWasmI64Sub, typ.Int64)
3576 v3 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
3577 v3.AuxInt = int64ToAuxInt(64)
3578 v2.AddArg2(v3, y)
3579 v1.AddArg2(x, v2)
3580 v.AddArg2(v0, v1)
3581 return true
3582 }
3583 }
3584 func rewriteValueWasm_OpRotateAllRightVarInt8x16(v *Value) bool {
3585 v_1 := v.Args[1]
3586 v_0 := v.Args[0]
3587 b := v.Block
3588 typ := &b.Func.Config.Types
3589
3590
3591 for {
3592 x := v_0
3593 y := v_1
3594 v.reset(OpWasmV128Or)
3595 v0 := b.NewValue0(v.Pos, OpWasmI8x16ShrU, typ.Vec128)
3596 v0.AddArg2(x, y)
3597 v1 := b.NewValue0(v.Pos, OpWasmI8x16Shl, typ.Vec128)
3598 v2 := b.NewValue0(v.Pos, OpWasmI64Sub, typ.Int64)
3599 v3 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
3600 v3.AuxInt = int64ToAuxInt(8)
3601 v2.AddArg2(v3, y)
3602 v1.AddArg2(x, v2)
3603 v.AddArg2(v0, v1)
3604 return true
3605 }
3606 }
3607 func rewriteValueWasm_OpRotateAllRightVarUint16x8(v *Value) bool {
3608 v_1 := v.Args[1]
3609 v_0 := v.Args[0]
3610 b := v.Block
3611 typ := &b.Func.Config.Types
3612
3613
3614 for {
3615 x := v_0
3616 y := v_1
3617 v.reset(OpWasmV128Or)
3618 v0 := b.NewValue0(v.Pos, OpWasmI16x8ShrU, typ.Vec128)
3619 v0.AddArg2(x, y)
3620 v1 := b.NewValue0(v.Pos, OpWasmI16x8Shl, typ.Vec128)
3621 v2 := b.NewValue0(v.Pos, OpWasmI64Sub, typ.Int64)
3622 v3 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
3623 v3.AuxInt = int64ToAuxInt(16)
3624 v2.AddArg2(v3, y)
3625 v1.AddArg2(x, v2)
3626 v.AddArg2(v0, v1)
3627 return true
3628 }
3629 }
3630 func rewriteValueWasm_OpRotateAllRightVarUint32x4(v *Value) bool {
3631 v_1 := v.Args[1]
3632 v_0 := v.Args[0]
3633 b := v.Block
3634 typ := &b.Func.Config.Types
3635
3636
3637 for {
3638 x := v_0
3639 y := v_1
3640 v.reset(OpWasmV128Or)
3641 v0 := b.NewValue0(v.Pos, OpWasmI32x4ShrU, typ.Vec128)
3642 v0.AddArg2(x, y)
3643 v1 := b.NewValue0(v.Pos, OpWasmI32x4Shl, typ.Vec128)
3644 v2 := b.NewValue0(v.Pos, OpWasmI64Sub, typ.Int64)
3645 v3 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
3646 v3.AuxInt = int64ToAuxInt(32)
3647 v2.AddArg2(v3, y)
3648 v1.AddArg2(x, v2)
3649 v.AddArg2(v0, v1)
3650 return true
3651 }
3652 }
3653 func rewriteValueWasm_OpRotateAllRightVarUint64x2(v *Value) bool {
3654 v_1 := v.Args[1]
3655 v_0 := v.Args[0]
3656 b := v.Block
3657 typ := &b.Func.Config.Types
3658
3659
3660 for {
3661 x := v_0
3662 y := v_1
3663 v.reset(OpWasmV128Or)
3664 v0 := b.NewValue0(v.Pos, OpWasmI64x2ShrU, typ.Vec128)
3665 v0.AddArg2(x, y)
3666 v1 := b.NewValue0(v.Pos, OpWasmI64x2Shl, typ.Vec128)
3667 v2 := b.NewValue0(v.Pos, OpWasmI64Sub, typ.Int64)
3668 v3 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
3669 v3.AuxInt = int64ToAuxInt(64)
3670 v2.AddArg2(v3, y)
3671 v1.AddArg2(x, v2)
3672 v.AddArg2(v0, v1)
3673 return true
3674 }
3675 }
3676 func rewriteValueWasm_OpRotateAllRightVarUint8x16(v *Value) bool {
3677 v_1 := v.Args[1]
3678 v_0 := v.Args[0]
3679 b := v.Block
3680 typ := &b.Func.Config.Types
3681
3682
3683 for {
3684 x := v_0
3685 y := v_1
3686 v.reset(OpWasmV128Or)
3687 v0 := b.NewValue0(v.Pos, OpWasmI8x16ShrU, typ.Vec128)
3688 v0.AddArg2(x, y)
3689 v1 := b.NewValue0(v.Pos, OpWasmI8x16Shl, typ.Vec128)
3690 v2 := b.NewValue0(v.Pos, OpWasmI64Sub, typ.Int64)
3691 v3 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
3692 v3.AuxInt = int64ToAuxInt(8)
3693 v2.AddArg2(v3, y)
3694 v1.AddArg2(x, v2)
3695 v.AddArg2(v0, v1)
3696 return true
3697 }
3698 }
3699 func rewriteValueWasm_OpRotateLeft16(v *Value) bool {
3700 v_1 := v.Args[1]
3701 v_0 := v.Args[0]
3702 b := v.Block
3703 typ := &b.Func.Config.Types
3704
3705
3706 for {
3707 t := v.Type
3708 x := v_0
3709 if v_1.Op != OpWasmI64Const {
3710 break
3711 }
3712 c := auxIntToInt64(v_1.AuxInt)
3713 v.reset(OpOr16)
3714 v0 := b.NewValue0(v.Pos, OpLsh16x64, t)
3715 v1 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
3716 v1.AuxInt = int64ToAuxInt(c & 15)
3717 v0.AddArg2(x, v1)
3718 v2 := b.NewValue0(v.Pos, OpRsh16Ux64, t)
3719 v3 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
3720 v3.AuxInt = int64ToAuxInt(-c & 15)
3721 v2.AddArg2(x, v3)
3722 v.AddArg2(v0, v2)
3723 return true
3724 }
3725 return false
3726 }
3727 func rewriteValueWasm_OpRotateLeft8(v *Value) bool {
3728 v_1 := v.Args[1]
3729 v_0 := v.Args[0]
3730 b := v.Block
3731 typ := &b.Func.Config.Types
3732
3733
3734 for {
3735 t := v.Type
3736 x := v_0
3737 if v_1.Op != OpWasmI64Const {
3738 break
3739 }
3740 c := auxIntToInt64(v_1.AuxInt)
3741 v.reset(OpOr8)
3742 v0 := b.NewValue0(v.Pos, OpLsh8x64, t)
3743 v1 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
3744 v1.AuxInt = int64ToAuxInt(c & 7)
3745 v0.AddArg2(x, v1)
3746 v2 := b.NewValue0(v.Pos, OpRsh8Ux64, t)
3747 v3 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
3748 v3.AuxInt = int64ToAuxInt(-c & 7)
3749 v2.AddArg2(x, v3)
3750 v.AddArg2(v0, v2)
3751 return true
3752 }
3753 return false
3754 }
3755 func rewriteValueWasm_OpRsh16Ux16(v *Value) bool {
3756 v_1 := v.Args[1]
3757 v_0 := v.Args[0]
3758 b := v.Block
3759 typ := &b.Func.Config.Types
3760
3761
3762 for {
3763 c := auxIntToBool(v.AuxInt)
3764 x := v_0
3765 y := v_1
3766 v.reset(OpRsh64Ux64)
3767 v.AuxInt = boolToAuxInt(c)
3768 v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
3769 v0.AddArg(x)
3770 v1 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
3771 v1.AddArg(y)
3772 v.AddArg2(v0, v1)
3773 return true
3774 }
3775 }
3776 func rewriteValueWasm_OpRsh16Ux32(v *Value) bool {
3777 v_1 := v.Args[1]
3778 v_0 := v.Args[0]
3779 b := v.Block
3780 typ := &b.Func.Config.Types
3781
3782
3783 for {
3784 c := auxIntToBool(v.AuxInt)
3785 x := v_0
3786 y := v_1
3787 v.reset(OpRsh64Ux64)
3788 v.AuxInt = boolToAuxInt(c)
3789 v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
3790 v0.AddArg(x)
3791 v1 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
3792 v1.AddArg(y)
3793 v.AddArg2(v0, v1)
3794 return true
3795 }
3796 }
3797 func rewriteValueWasm_OpRsh16Ux64(v *Value) bool {
3798 v_1 := v.Args[1]
3799 v_0 := v.Args[0]
3800 b := v.Block
3801 typ := &b.Func.Config.Types
3802
3803
3804 for {
3805 c := auxIntToBool(v.AuxInt)
3806 x := v_0
3807 y := v_1
3808 v.reset(OpRsh64Ux64)
3809 v.AuxInt = boolToAuxInt(c)
3810 v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
3811 v0.AddArg(x)
3812 v.AddArg2(v0, y)
3813 return true
3814 }
3815 }
3816 func rewriteValueWasm_OpRsh16Ux8(v *Value) bool {
3817 v_1 := v.Args[1]
3818 v_0 := v.Args[0]
3819 b := v.Block
3820 typ := &b.Func.Config.Types
3821
3822
3823 for {
3824 c := auxIntToBool(v.AuxInt)
3825 x := v_0
3826 y := v_1
3827 v.reset(OpRsh64Ux64)
3828 v.AuxInt = boolToAuxInt(c)
3829 v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
3830 v0.AddArg(x)
3831 v1 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
3832 v1.AddArg(y)
3833 v.AddArg2(v0, v1)
3834 return true
3835 }
3836 }
3837 func rewriteValueWasm_OpRsh16x16(v *Value) bool {
3838 v_1 := v.Args[1]
3839 v_0 := v.Args[0]
3840 b := v.Block
3841 typ := &b.Func.Config.Types
3842
3843
3844 for {
3845 c := auxIntToBool(v.AuxInt)
3846 x := v_0
3847 y := v_1
3848 v.reset(OpRsh64x64)
3849 v.AuxInt = boolToAuxInt(c)
3850 v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
3851 v0.AddArg(x)
3852 v1 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
3853 v1.AddArg(y)
3854 v.AddArg2(v0, v1)
3855 return true
3856 }
3857 }
3858 func rewriteValueWasm_OpRsh16x32(v *Value) bool {
3859 v_1 := v.Args[1]
3860 v_0 := v.Args[0]
3861 b := v.Block
3862 typ := &b.Func.Config.Types
3863
3864
3865 for {
3866 c := auxIntToBool(v.AuxInt)
3867 x := v_0
3868 y := v_1
3869 v.reset(OpRsh64x64)
3870 v.AuxInt = boolToAuxInt(c)
3871 v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
3872 v0.AddArg(x)
3873 v1 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
3874 v1.AddArg(y)
3875 v.AddArg2(v0, v1)
3876 return true
3877 }
3878 }
3879 func rewriteValueWasm_OpRsh16x64(v *Value) bool {
3880 v_1 := v.Args[1]
3881 v_0 := v.Args[0]
3882 b := v.Block
3883 typ := &b.Func.Config.Types
3884
3885
3886 for {
3887 c := auxIntToBool(v.AuxInt)
3888 x := v_0
3889 y := v_1
3890 v.reset(OpRsh64x64)
3891 v.AuxInt = boolToAuxInt(c)
3892 v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
3893 v0.AddArg(x)
3894 v.AddArg2(v0, y)
3895 return true
3896 }
3897 }
3898 func rewriteValueWasm_OpRsh16x8(v *Value) bool {
3899 v_1 := v.Args[1]
3900 v_0 := v.Args[0]
3901 b := v.Block
3902 typ := &b.Func.Config.Types
3903
3904
3905 for {
3906 c := auxIntToBool(v.AuxInt)
3907 x := v_0
3908 y := v_1
3909 v.reset(OpRsh64x64)
3910 v.AuxInt = boolToAuxInt(c)
3911 v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
3912 v0.AddArg(x)
3913 v1 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
3914 v1.AddArg(y)
3915 v.AddArg2(v0, v1)
3916 return true
3917 }
3918 }
3919 func rewriteValueWasm_OpRsh32Ux16(v *Value) bool {
3920 v_1 := v.Args[1]
3921 v_0 := v.Args[0]
3922 b := v.Block
3923 typ := &b.Func.Config.Types
3924
3925
3926 for {
3927 c := auxIntToBool(v.AuxInt)
3928 x := v_0
3929 y := v_1
3930 v.reset(OpRsh64Ux64)
3931 v.AuxInt = boolToAuxInt(c)
3932 v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
3933 v0.AddArg(x)
3934 v1 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
3935 v1.AddArg(y)
3936 v.AddArg2(v0, v1)
3937 return true
3938 }
3939 }
3940 func rewriteValueWasm_OpRsh32Ux32(v *Value) bool {
3941 v_1 := v.Args[1]
3942 v_0 := v.Args[0]
3943 b := v.Block
3944 typ := &b.Func.Config.Types
3945
3946
3947 for {
3948 c := auxIntToBool(v.AuxInt)
3949 x := v_0
3950 y := v_1
3951 v.reset(OpRsh64Ux64)
3952 v.AuxInt = boolToAuxInt(c)
3953 v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
3954 v0.AddArg(x)
3955 v1 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
3956 v1.AddArg(y)
3957 v.AddArg2(v0, v1)
3958 return true
3959 }
3960 }
3961 func rewriteValueWasm_OpRsh32Ux64(v *Value) bool {
3962 v_1 := v.Args[1]
3963 v_0 := v.Args[0]
3964 b := v.Block
3965 typ := &b.Func.Config.Types
3966
3967
3968 for {
3969 c := auxIntToBool(v.AuxInt)
3970 x := v_0
3971 y := v_1
3972 v.reset(OpRsh64Ux64)
3973 v.AuxInt = boolToAuxInt(c)
3974 v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
3975 v0.AddArg(x)
3976 v.AddArg2(v0, y)
3977 return true
3978 }
3979 }
3980 func rewriteValueWasm_OpRsh32Ux8(v *Value) bool {
3981 v_1 := v.Args[1]
3982 v_0 := v.Args[0]
3983 b := v.Block
3984 typ := &b.Func.Config.Types
3985
3986
3987 for {
3988 c := auxIntToBool(v.AuxInt)
3989 x := v_0
3990 y := v_1
3991 v.reset(OpRsh64Ux64)
3992 v.AuxInt = boolToAuxInt(c)
3993 v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
3994 v0.AddArg(x)
3995 v1 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
3996 v1.AddArg(y)
3997 v.AddArg2(v0, v1)
3998 return true
3999 }
4000 }
4001 func rewriteValueWasm_OpRsh32x16(v *Value) bool {
4002 v_1 := v.Args[1]
4003 v_0 := v.Args[0]
4004 b := v.Block
4005 typ := &b.Func.Config.Types
4006
4007
4008 for {
4009 c := auxIntToBool(v.AuxInt)
4010 x := v_0
4011 y := v_1
4012 v.reset(OpRsh64x64)
4013 v.AuxInt = boolToAuxInt(c)
4014 v0 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
4015 v0.AddArg(x)
4016 v1 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
4017 v1.AddArg(y)
4018 v.AddArg2(v0, v1)
4019 return true
4020 }
4021 }
4022 func rewriteValueWasm_OpRsh32x32(v *Value) bool {
4023 v_1 := v.Args[1]
4024 v_0 := v.Args[0]
4025 b := v.Block
4026 typ := &b.Func.Config.Types
4027
4028
4029 for {
4030 c := auxIntToBool(v.AuxInt)
4031 x := v_0
4032 y := v_1
4033 v.reset(OpRsh64x64)
4034 v.AuxInt = boolToAuxInt(c)
4035 v0 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
4036 v0.AddArg(x)
4037 v1 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
4038 v1.AddArg(y)
4039 v.AddArg2(v0, v1)
4040 return true
4041 }
4042 }
4043 func rewriteValueWasm_OpRsh32x64(v *Value) bool {
4044 v_1 := v.Args[1]
4045 v_0 := v.Args[0]
4046 b := v.Block
4047 typ := &b.Func.Config.Types
4048
4049
4050 for {
4051 c := auxIntToBool(v.AuxInt)
4052 x := v_0
4053 y := v_1
4054 v.reset(OpRsh64x64)
4055 v.AuxInt = boolToAuxInt(c)
4056 v0 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
4057 v0.AddArg(x)
4058 v.AddArg2(v0, y)
4059 return true
4060 }
4061 }
4062 func rewriteValueWasm_OpRsh32x8(v *Value) bool {
4063 v_1 := v.Args[1]
4064 v_0 := v.Args[0]
4065 b := v.Block
4066 typ := &b.Func.Config.Types
4067
4068
4069 for {
4070 c := auxIntToBool(v.AuxInt)
4071 x := v_0
4072 y := v_1
4073 v.reset(OpRsh64x64)
4074 v.AuxInt = boolToAuxInt(c)
4075 v0 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
4076 v0.AddArg(x)
4077 v1 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
4078 v1.AddArg(y)
4079 v.AddArg2(v0, v1)
4080 return true
4081 }
4082 }
4083 func rewriteValueWasm_OpRsh64Ux16(v *Value) bool {
4084 v_1 := v.Args[1]
4085 v_0 := v.Args[0]
4086 b := v.Block
4087 typ := &b.Func.Config.Types
4088
4089
4090 for {
4091 c := auxIntToBool(v.AuxInt)
4092 x := v_0
4093 y := v_1
4094 v.reset(OpRsh64Ux64)
4095 v.AuxInt = boolToAuxInt(c)
4096 v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
4097 v0.AddArg(y)
4098 v.AddArg2(x, v0)
4099 return true
4100 }
4101 }
4102 func rewriteValueWasm_OpRsh64Ux32(v *Value) bool {
4103 v_1 := v.Args[1]
4104 v_0 := v.Args[0]
4105 b := v.Block
4106 typ := &b.Func.Config.Types
4107
4108
4109 for {
4110 c := auxIntToBool(v.AuxInt)
4111 x := v_0
4112 y := v_1
4113 v.reset(OpRsh64Ux64)
4114 v.AuxInt = boolToAuxInt(c)
4115 v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
4116 v0.AddArg(y)
4117 v.AddArg2(x, v0)
4118 return true
4119 }
4120 }
4121 func rewriteValueWasm_OpRsh64Ux64(v *Value) bool {
4122 v_1 := v.Args[1]
4123 v_0 := v.Args[0]
4124 b := v.Block
4125 typ := &b.Func.Config.Types
4126
4127
4128
4129 for {
4130 x := v_0
4131 y := v_1
4132 if !(shiftIsBounded(v)) {
4133 break
4134 }
4135 v.reset(OpWasmI64ShrU)
4136 v.AddArg2(x, y)
4137 return true
4138 }
4139
4140
4141
4142 for {
4143 x := v_0
4144 if v_1.Op != OpWasmI64Const {
4145 break
4146 }
4147 c := auxIntToInt64(v_1.AuxInt)
4148 if !(uint64(c) < 64) {
4149 break
4150 }
4151 v.reset(OpWasmI64ShrU)
4152 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
4153 v0.AuxInt = int64ToAuxInt(c)
4154 v.AddArg2(x, v0)
4155 return true
4156 }
4157
4158
4159
4160 for {
4161 if v_1.Op != OpWasmI64Const {
4162 break
4163 }
4164 c := auxIntToInt64(v_1.AuxInt)
4165 if !(uint64(c) >= 64) {
4166 break
4167 }
4168 v.reset(OpWasmI64Const)
4169 v.AuxInt = int64ToAuxInt(0)
4170 return true
4171 }
4172
4173
4174 for {
4175 x := v_0
4176 y := v_1
4177 v.reset(OpWasmSelect)
4178 v0 := b.NewValue0(v.Pos, OpWasmI64ShrU, typ.Int64)
4179 v0.AddArg2(x, y)
4180 v1 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
4181 v1.AuxInt = int64ToAuxInt(0)
4182 v2 := b.NewValue0(v.Pos, OpWasmI64LtU, typ.Bool)
4183 v3 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
4184 v3.AuxInt = int64ToAuxInt(64)
4185 v2.AddArg2(y, v3)
4186 v.AddArg3(v0, v1, v2)
4187 return true
4188 }
4189 }
4190 func rewriteValueWasm_OpRsh64Ux8(v *Value) bool {
4191 v_1 := v.Args[1]
4192 v_0 := v.Args[0]
4193 b := v.Block
4194 typ := &b.Func.Config.Types
4195
4196
4197 for {
4198 c := auxIntToBool(v.AuxInt)
4199 x := v_0
4200 y := v_1
4201 v.reset(OpRsh64Ux64)
4202 v.AuxInt = boolToAuxInt(c)
4203 v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
4204 v0.AddArg(y)
4205 v.AddArg2(x, v0)
4206 return true
4207 }
4208 }
4209 func rewriteValueWasm_OpRsh64x16(v *Value) bool {
4210 v_1 := v.Args[1]
4211 v_0 := v.Args[0]
4212 b := v.Block
4213 typ := &b.Func.Config.Types
4214
4215
4216 for {
4217 c := auxIntToBool(v.AuxInt)
4218 x := v_0
4219 y := v_1
4220 v.reset(OpRsh64x64)
4221 v.AuxInt = boolToAuxInt(c)
4222 v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
4223 v0.AddArg(y)
4224 v.AddArg2(x, v0)
4225 return true
4226 }
4227 }
4228 func rewriteValueWasm_OpRsh64x32(v *Value) bool {
4229 v_1 := v.Args[1]
4230 v_0 := v.Args[0]
4231 b := v.Block
4232 typ := &b.Func.Config.Types
4233
4234
4235 for {
4236 c := auxIntToBool(v.AuxInt)
4237 x := v_0
4238 y := v_1
4239 v.reset(OpRsh64x64)
4240 v.AuxInt = boolToAuxInt(c)
4241 v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
4242 v0.AddArg(y)
4243 v.AddArg2(x, v0)
4244 return true
4245 }
4246 }
4247 func rewriteValueWasm_OpRsh64x64(v *Value) bool {
4248 v_1 := v.Args[1]
4249 v_0 := v.Args[0]
4250 b := v.Block
4251 typ := &b.Func.Config.Types
4252
4253
4254
4255 for {
4256 x := v_0
4257 y := v_1
4258 if !(shiftIsBounded(v)) {
4259 break
4260 }
4261 v.reset(OpWasmI64ShrS)
4262 v.AddArg2(x, y)
4263 return true
4264 }
4265
4266
4267
4268 for {
4269 x := v_0
4270 if v_1.Op != OpWasmI64Const {
4271 break
4272 }
4273 c := auxIntToInt64(v_1.AuxInt)
4274 if !(uint64(c) < 64) {
4275 break
4276 }
4277 v.reset(OpWasmI64ShrS)
4278 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
4279 v0.AuxInt = int64ToAuxInt(c)
4280 v.AddArg2(x, v0)
4281 return true
4282 }
4283
4284
4285
4286 for {
4287 x := v_0
4288 if v_1.Op != OpWasmI64Const {
4289 break
4290 }
4291 c := auxIntToInt64(v_1.AuxInt)
4292 if !(uint64(c) >= 64) {
4293 break
4294 }
4295 v.reset(OpWasmI64ShrS)
4296 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
4297 v0.AuxInt = int64ToAuxInt(63)
4298 v.AddArg2(x, v0)
4299 return true
4300 }
4301
4302
4303 for {
4304 x := v_0
4305 y := v_1
4306 v.reset(OpWasmI64ShrS)
4307 v0 := b.NewValue0(v.Pos, OpWasmSelect, typ.Int64)
4308 v1 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
4309 v1.AuxInt = int64ToAuxInt(63)
4310 v2 := b.NewValue0(v.Pos, OpWasmI64LtU, typ.Bool)
4311 v3 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
4312 v3.AuxInt = int64ToAuxInt(64)
4313 v2.AddArg2(y, v3)
4314 v0.AddArg3(y, v1, v2)
4315 v.AddArg2(x, v0)
4316 return true
4317 }
4318 }
4319 func rewriteValueWasm_OpRsh64x8(v *Value) bool {
4320 v_1 := v.Args[1]
4321 v_0 := v.Args[0]
4322 b := v.Block
4323 typ := &b.Func.Config.Types
4324
4325
4326 for {
4327 c := auxIntToBool(v.AuxInt)
4328 x := v_0
4329 y := v_1
4330 v.reset(OpRsh64x64)
4331 v.AuxInt = boolToAuxInt(c)
4332 v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
4333 v0.AddArg(y)
4334 v.AddArg2(x, v0)
4335 return true
4336 }
4337 }
4338 func rewriteValueWasm_OpRsh8Ux16(v *Value) bool {
4339 v_1 := v.Args[1]
4340 v_0 := v.Args[0]
4341 b := v.Block
4342 typ := &b.Func.Config.Types
4343
4344
4345 for {
4346 c := auxIntToBool(v.AuxInt)
4347 x := v_0
4348 y := v_1
4349 v.reset(OpRsh64Ux64)
4350 v.AuxInt = boolToAuxInt(c)
4351 v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
4352 v0.AddArg(x)
4353 v1 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
4354 v1.AddArg(y)
4355 v.AddArg2(v0, v1)
4356 return true
4357 }
4358 }
4359 func rewriteValueWasm_OpRsh8Ux32(v *Value) bool {
4360 v_1 := v.Args[1]
4361 v_0 := v.Args[0]
4362 b := v.Block
4363 typ := &b.Func.Config.Types
4364
4365
4366 for {
4367 c := auxIntToBool(v.AuxInt)
4368 x := v_0
4369 y := v_1
4370 v.reset(OpRsh64Ux64)
4371 v.AuxInt = boolToAuxInt(c)
4372 v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
4373 v0.AddArg(x)
4374 v1 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
4375 v1.AddArg(y)
4376 v.AddArg2(v0, v1)
4377 return true
4378 }
4379 }
4380 func rewriteValueWasm_OpRsh8Ux64(v *Value) bool {
4381 v_1 := v.Args[1]
4382 v_0 := v.Args[0]
4383 b := v.Block
4384 typ := &b.Func.Config.Types
4385
4386
4387 for {
4388 c := auxIntToBool(v.AuxInt)
4389 x := v_0
4390 y := v_1
4391 v.reset(OpRsh64Ux64)
4392 v.AuxInt = boolToAuxInt(c)
4393 v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
4394 v0.AddArg(x)
4395 v.AddArg2(v0, y)
4396 return true
4397 }
4398 }
4399 func rewriteValueWasm_OpRsh8Ux8(v *Value) bool {
4400 v_1 := v.Args[1]
4401 v_0 := v.Args[0]
4402 b := v.Block
4403 typ := &b.Func.Config.Types
4404
4405
4406 for {
4407 c := auxIntToBool(v.AuxInt)
4408 x := v_0
4409 y := v_1
4410 v.reset(OpRsh64Ux64)
4411 v.AuxInt = boolToAuxInt(c)
4412 v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
4413 v0.AddArg(x)
4414 v1 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
4415 v1.AddArg(y)
4416 v.AddArg2(v0, v1)
4417 return true
4418 }
4419 }
4420 func rewriteValueWasm_OpRsh8x16(v *Value) bool {
4421 v_1 := v.Args[1]
4422 v_0 := v.Args[0]
4423 b := v.Block
4424 typ := &b.Func.Config.Types
4425
4426
4427 for {
4428 c := auxIntToBool(v.AuxInt)
4429 x := v_0
4430 y := v_1
4431 v.reset(OpRsh64x64)
4432 v.AuxInt = boolToAuxInt(c)
4433 v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
4434 v0.AddArg(x)
4435 v1 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
4436 v1.AddArg(y)
4437 v.AddArg2(v0, v1)
4438 return true
4439 }
4440 }
4441 func rewriteValueWasm_OpRsh8x32(v *Value) bool {
4442 v_1 := v.Args[1]
4443 v_0 := v.Args[0]
4444 b := v.Block
4445 typ := &b.Func.Config.Types
4446
4447
4448 for {
4449 c := auxIntToBool(v.AuxInt)
4450 x := v_0
4451 y := v_1
4452 v.reset(OpRsh64x64)
4453 v.AuxInt = boolToAuxInt(c)
4454 v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
4455 v0.AddArg(x)
4456 v1 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
4457 v1.AddArg(y)
4458 v.AddArg2(v0, v1)
4459 return true
4460 }
4461 }
4462 func rewriteValueWasm_OpRsh8x64(v *Value) bool {
4463 v_1 := v.Args[1]
4464 v_0 := v.Args[0]
4465 b := v.Block
4466 typ := &b.Func.Config.Types
4467
4468
4469 for {
4470 c := auxIntToBool(v.AuxInt)
4471 x := v_0
4472 y := v_1
4473 v.reset(OpRsh64x64)
4474 v.AuxInt = boolToAuxInt(c)
4475 v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
4476 v0.AddArg(x)
4477 v.AddArg2(v0, y)
4478 return true
4479 }
4480 }
4481 func rewriteValueWasm_OpRsh8x8(v *Value) bool {
4482 v_1 := v.Args[1]
4483 v_0 := v.Args[0]
4484 b := v.Block
4485 typ := &b.Func.Config.Types
4486
4487
4488 for {
4489 c := auxIntToBool(v.AuxInt)
4490 x := v_0
4491 y := v_1
4492 v.reset(OpRsh64x64)
4493 v.AuxInt = boolToAuxInt(c)
4494 v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
4495 v0.AddArg(x)
4496 v1 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
4497 v1.AddArg(y)
4498 v.AddArg2(v0, v1)
4499 return true
4500 }
4501 }
4502 func rewriteValueWasm_OpSelect0(v *Value) bool {
4503 v_0 := v.Args[0]
4504
4505
4506 for {
4507 t := v.Type
4508 if v_0.Op != OpMul64uhilo {
4509 break
4510 }
4511 y := v_0.Args[1]
4512 x := v_0.Args[0]
4513 v.reset(OpHmul64u)
4514 v.Type = t
4515 v.AddArg2(x, y)
4516 return true
4517 }
4518 return false
4519 }
4520 func rewriteValueWasm_OpSelect1(v *Value) bool {
4521 v_0 := v.Args[0]
4522
4523
4524 for {
4525 if v_0.Op != OpMul64uhilo {
4526 break
4527 }
4528 y := v_0.Args[1]
4529 x := v_0.Args[0]
4530 v.reset(OpWasmI64Mul)
4531 v.AddArg2(x, y)
4532 return true
4533 }
4534 return false
4535 }
4536 func rewriteValueWasm_OpShiftAllLeftInt16x8(v *Value) bool {
4537 v_1 := v.Args[1]
4538 v_0 := v.Args[0]
4539 b := v.Block
4540 typ := &b.Func.Config.Types
4541
4542
4543
4544 for {
4545 x := v_0
4546 d := v_1
4547 if d.Op != OpConst64 {
4548 break
4549 }
4550 c := auxIntToInt64(d.AuxInt)
4551 if !(uint64(c) < 16) {
4552 break
4553 }
4554 v.reset(OpWasmI16x8Shl)
4555 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
4556 v0.AuxInt = int64ToAuxInt(c)
4557 v.AddArg2(x, v0)
4558 return true
4559 }
4560
4561
4562
4563 for {
4564 x := v_0
4565 d := v_1
4566 if d.Op != OpWasmI64Const {
4567 break
4568 }
4569 c := auxIntToInt64(d.AuxInt)
4570 if !(uint64(c) < 16) {
4571 break
4572 }
4573 v.reset(OpWasmI16x8Shl)
4574 v.AddArg2(x, d)
4575 return true
4576 }
4577
4578
4579 for {
4580 x := v_0
4581 y := v_1
4582 v.reset(OpWasmSelectV)
4583 v0 := b.NewValue0(v.Pos, OpWasmI16x8Shl, typ.Vec128)
4584 v0.AddArg2(x, y)
4585 v1 := b.NewValue0(v.Pos, OpWasmV128Xor, typ.Vec128)
4586 v1.AddArg2(x, x)
4587 v2 := b.NewValue0(v.Pos, OpWasmI64LtU, typ.Bool)
4588 v3 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
4589 v3.AuxInt = int64ToAuxInt(16)
4590 v2.AddArg2(y, v3)
4591 v.AddArg3(v0, v1, v2)
4592 return true
4593 }
4594 }
4595 func rewriteValueWasm_OpShiftAllLeftInt32x4(v *Value) bool {
4596 v_1 := v.Args[1]
4597 v_0 := v.Args[0]
4598 b := v.Block
4599 typ := &b.Func.Config.Types
4600
4601
4602
4603 for {
4604 x := v_0
4605 d := v_1
4606 if d.Op != OpConst64 {
4607 break
4608 }
4609 c := auxIntToInt64(d.AuxInt)
4610 if !(uint64(c) < 32) {
4611 break
4612 }
4613 v.reset(OpWasmI32x4Shl)
4614 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
4615 v0.AuxInt = int64ToAuxInt(c)
4616 v.AddArg2(x, v0)
4617 return true
4618 }
4619
4620
4621
4622 for {
4623 x := v_0
4624 d := v_1
4625 if d.Op != OpWasmI64Const {
4626 break
4627 }
4628 c := auxIntToInt64(d.AuxInt)
4629 if !(uint64(c) < 32) {
4630 break
4631 }
4632 v.reset(OpWasmI32x4Shl)
4633 v.AddArg2(x, d)
4634 return true
4635 }
4636
4637
4638 for {
4639 x := v_0
4640 y := v_1
4641 v.reset(OpWasmSelectV)
4642 v0 := b.NewValue0(v.Pos, OpWasmI32x4Shl, typ.Vec128)
4643 v0.AddArg2(x, y)
4644 v1 := b.NewValue0(v.Pos, OpWasmV128Xor, typ.Vec128)
4645 v1.AddArg2(x, x)
4646 v2 := b.NewValue0(v.Pos, OpWasmI64LtU, typ.Bool)
4647 v3 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
4648 v3.AuxInt = int64ToAuxInt(32)
4649 v2.AddArg2(y, v3)
4650 v.AddArg3(v0, v1, v2)
4651 return true
4652 }
4653 }
4654 func rewriteValueWasm_OpShiftAllLeftInt64x2(v *Value) bool {
4655 v_1 := v.Args[1]
4656 v_0 := v.Args[0]
4657 b := v.Block
4658 typ := &b.Func.Config.Types
4659
4660
4661
4662 for {
4663 x := v_0
4664 d := v_1
4665 if d.Op != OpConst64 {
4666 break
4667 }
4668 c := auxIntToInt64(d.AuxInt)
4669 if !(uint64(c) < 64) {
4670 break
4671 }
4672 v.reset(OpWasmI64x2Shl)
4673 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
4674 v0.AuxInt = int64ToAuxInt(c)
4675 v.AddArg2(x, v0)
4676 return true
4677 }
4678
4679
4680
4681 for {
4682 x := v_0
4683 d := v_1
4684 if d.Op != OpWasmI64Const {
4685 break
4686 }
4687 c := auxIntToInt64(d.AuxInt)
4688 if !(uint64(c) < 64) {
4689 break
4690 }
4691 v.reset(OpWasmI64x2Shl)
4692 v.AddArg2(x, d)
4693 return true
4694 }
4695
4696
4697 for {
4698 x := v_0
4699 y := v_1
4700 v.reset(OpWasmSelectV)
4701 v0 := b.NewValue0(v.Pos, OpWasmI64x2Shl, typ.Vec128)
4702 v0.AddArg2(x, y)
4703 v1 := b.NewValue0(v.Pos, OpWasmV128Xor, typ.Vec128)
4704 v1.AddArg2(x, x)
4705 v2 := b.NewValue0(v.Pos, OpWasmI64LtU, typ.Bool)
4706 v3 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
4707 v3.AuxInt = int64ToAuxInt(64)
4708 v2.AddArg2(y, v3)
4709 v.AddArg3(v0, v1, v2)
4710 return true
4711 }
4712 }
4713 func rewriteValueWasm_OpShiftAllLeftInt8x16(v *Value) bool {
4714 v_1 := v.Args[1]
4715 v_0 := v.Args[0]
4716 b := v.Block
4717 typ := &b.Func.Config.Types
4718
4719
4720
4721 for {
4722 x := v_0
4723 d := v_1
4724 if d.Op != OpConst64 {
4725 break
4726 }
4727 c := auxIntToInt64(d.AuxInt)
4728 if !(uint64(c) < 8) {
4729 break
4730 }
4731 v.reset(OpWasmI8x16Shl)
4732 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
4733 v0.AuxInt = int64ToAuxInt(c)
4734 v.AddArg2(x, v0)
4735 return true
4736 }
4737
4738
4739
4740 for {
4741 x := v_0
4742 d := v_1
4743 if d.Op != OpWasmI64Const {
4744 break
4745 }
4746 c := auxIntToInt64(d.AuxInt)
4747 if !(uint64(c) < 8) {
4748 break
4749 }
4750 v.reset(OpWasmI8x16Shl)
4751 v.AddArg2(x, d)
4752 return true
4753 }
4754
4755
4756 for {
4757 x := v_0
4758 y := v_1
4759 v.reset(OpWasmSelectV)
4760 v0 := b.NewValue0(v.Pos, OpWasmI8x16Shl, typ.Vec128)
4761 v0.AddArg2(x, y)
4762 v1 := b.NewValue0(v.Pos, OpWasmV128Xor, typ.Vec128)
4763 v1.AddArg2(x, x)
4764 v2 := b.NewValue0(v.Pos, OpWasmI64LtU, typ.Bool)
4765 v3 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
4766 v3.AuxInt = int64ToAuxInt(8)
4767 v2.AddArg2(y, v3)
4768 v.AddArg3(v0, v1, v2)
4769 return true
4770 }
4771 }
4772 func rewriteValueWasm_OpShiftAllLeftUint16x8(v *Value) bool {
4773 v_1 := v.Args[1]
4774 v_0 := v.Args[0]
4775 b := v.Block
4776 typ := &b.Func.Config.Types
4777
4778
4779
4780 for {
4781 x := v_0
4782 d := v_1
4783 if d.Op != OpConst64 {
4784 break
4785 }
4786 c := auxIntToInt64(d.AuxInt)
4787 if !(uint64(c) < 16) {
4788 break
4789 }
4790 v.reset(OpWasmI16x8Shl)
4791 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
4792 v0.AuxInt = int64ToAuxInt(c)
4793 v.AddArg2(x, v0)
4794 return true
4795 }
4796
4797
4798
4799 for {
4800 x := v_0
4801 d := v_1
4802 if d.Op != OpWasmI64Const {
4803 break
4804 }
4805 c := auxIntToInt64(d.AuxInt)
4806 if !(uint64(c) < 16) {
4807 break
4808 }
4809 v.reset(OpWasmI16x8Shl)
4810 v.AddArg2(x, d)
4811 return true
4812 }
4813
4814
4815 for {
4816 x := v_0
4817 y := v_1
4818 v.reset(OpWasmSelectV)
4819 v0 := b.NewValue0(v.Pos, OpWasmI16x8Shl, typ.Vec128)
4820 v0.AddArg2(x, y)
4821 v1 := b.NewValue0(v.Pos, OpWasmV128Xor, typ.Vec128)
4822 v1.AddArg2(x, x)
4823 v2 := b.NewValue0(v.Pos, OpWasmI64LtU, typ.Bool)
4824 v3 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
4825 v3.AuxInt = int64ToAuxInt(16)
4826 v2.AddArg2(y, v3)
4827 v.AddArg3(v0, v1, v2)
4828 return true
4829 }
4830 }
4831 func rewriteValueWasm_OpShiftAllLeftUint32x4(v *Value) bool {
4832 v_1 := v.Args[1]
4833 v_0 := v.Args[0]
4834 b := v.Block
4835 typ := &b.Func.Config.Types
4836
4837
4838
4839 for {
4840 x := v_0
4841 d := v_1
4842 if d.Op != OpConst64 {
4843 break
4844 }
4845 c := auxIntToInt64(d.AuxInt)
4846 if !(uint64(c) < 32) {
4847 break
4848 }
4849 v.reset(OpWasmI32x4Shl)
4850 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
4851 v0.AuxInt = int64ToAuxInt(c)
4852 v.AddArg2(x, v0)
4853 return true
4854 }
4855
4856
4857
4858 for {
4859 x := v_0
4860 d := v_1
4861 if d.Op != OpWasmI64Const {
4862 break
4863 }
4864 c := auxIntToInt64(d.AuxInt)
4865 if !(uint64(c) < 32) {
4866 break
4867 }
4868 v.reset(OpWasmI32x4Shl)
4869 v.AddArg2(x, d)
4870 return true
4871 }
4872
4873
4874 for {
4875 x := v_0
4876 y := v_1
4877 v.reset(OpWasmSelectV)
4878 v0 := b.NewValue0(v.Pos, OpWasmI32x4Shl, typ.Vec128)
4879 v0.AddArg2(x, y)
4880 v1 := b.NewValue0(v.Pos, OpWasmV128Xor, typ.Vec128)
4881 v1.AddArg2(x, x)
4882 v2 := b.NewValue0(v.Pos, OpWasmI64LtU, typ.Bool)
4883 v3 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
4884 v3.AuxInt = int64ToAuxInt(32)
4885 v2.AddArg2(y, v3)
4886 v.AddArg3(v0, v1, v2)
4887 return true
4888 }
4889 }
4890 func rewriteValueWasm_OpShiftAllLeftUint64x2(v *Value) bool {
4891 v_1 := v.Args[1]
4892 v_0 := v.Args[0]
4893 b := v.Block
4894 typ := &b.Func.Config.Types
4895
4896
4897
4898 for {
4899 x := v_0
4900 d := v_1
4901 if d.Op != OpConst64 {
4902 break
4903 }
4904 c := auxIntToInt64(d.AuxInt)
4905 if !(uint64(c) < 64) {
4906 break
4907 }
4908 v.reset(OpWasmI64x2Shl)
4909 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
4910 v0.AuxInt = int64ToAuxInt(c)
4911 v.AddArg2(x, v0)
4912 return true
4913 }
4914
4915
4916
4917 for {
4918 x := v_0
4919 d := v_1
4920 if d.Op != OpWasmI64Const {
4921 break
4922 }
4923 c := auxIntToInt64(d.AuxInt)
4924 if !(uint64(c) < 64) {
4925 break
4926 }
4927 v.reset(OpWasmI64x2Shl)
4928 v.AddArg2(x, d)
4929 return true
4930 }
4931
4932
4933 for {
4934 x := v_0
4935 y := v_1
4936 v.reset(OpWasmSelectV)
4937 v0 := b.NewValue0(v.Pos, OpWasmI64x2Shl, typ.Vec128)
4938 v0.AddArg2(x, y)
4939 v1 := b.NewValue0(v.Pos, OpWasmV128Xor, typ.Vec128)
4940 v1.AddArg2(x, x)
4941 v2 := b.NewValue0(v.Pos, OpWasmI64LtU, typ.Bool)
4942 v3 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
4943 v3.AuxInt = int64ToAuxInt(64)
4944 v2.AddArg2(y, v3)
4945 v.AddArg3(v0, v1, v2)
4946 return true
4947 }
4948 }
4949 func rewriteValueWasm_OpShiftAllLeftUint8x16(v *Value) bool {
4950 v_1 := v.Args[1]
4951 v_0 := v.Args[0]
4952 b := v.Block
4953 typ := &b.Func.Config.Types
4954
4955
4956
4957 for {
4958 x := v_0
4959 d := v_1
4960 if d.Op != OpConst64 {
4961 break
4962 }
4963 c := auxIntToInt64(d.AuxInt)
4964 if !(uint64(c) < 8) {
4965 break
4966 }
4967 v.reset(OpWasmI8x16Shl)
4968 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
4969 v0.AuxInt = int64ToAuxInt(c)
4970 v.AddArg2(x, v0)
4971 return true
4972 }
4973
4974
4975
4976 for {
4977 x := v_0
4978 d := v_1
4979 if d.Op != OpWasmI64Const {
4980 break
4981 }
4982 c := auxIntToInt64(d.AuxInt)
4983 if !(uint64(c) < 8) {
4984 break
4985 }
4986 v.reset(OpWasmI8x16Shl)
4987 v.AddArg2(x, d)
4988 return true
4989 }
4990
4991
4992 for {
4993 x := v_0
4994 y := v_1
4995 v.reset(OpWasmSelectV)
4996 v0 := b.NewValue0(v.Pos, OpWasmI8x16Shl, typ.Vec128)
4997 v0.AddArg2(x, y)
4998 v1 := b.NewValue0(v.Pos, OpWasmV128Xor, typ.Vec128)
4999 v1.AddArg2(x, x)
5000 v2 := b.NewValue0(v.Pos, OpWasmI64LtU, typ.Bool)
5001 v3 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
5002 v3.AuxInt = int64ToAuxInt(8)
5003 v2.AddArg2(y, v3)
5004 v.AddArg3(v0, v1, v2)
5005 return true
5006 }
5007 }
5008 func rewriteValueWasm_OpShiftAllRightInt16x8(v *Value) bool {
5009 v_1 := v.Args[1]
5010 v_0 := v.Args[0]
5011 b := v.Block
5012 typ := &b.Func.Config.Types
5013
5014
5015
5016 for {
5017 x := v_0
5018 d := v_1
5019 if d.Op != OpConst64 {
5020 break
5021 }
5022 c := auxIntToInt64(d.AuxInt)
5023 if !(uint64(c) < 16) {
5024 break
5025 }
5026 v.reset(OpWasmI16x8ShrS)
5027 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
5028 v0.AuxInt = int64ToAuxInt(c)
5029 v.AddArg2(x, v0)
5030 return true
5031 }
5032
5033
5034
5035 for {
5036 x := v_0
5037 d := v_1
5038 if d.Op != OpWasmI64Const {
5039 break
5040 }
5041 c := auxIntToInt64(d.AuxInt)
5042 if !(uint64(c) < 16) {
5043 break
5044 }
5045 v.reset(OpWasmI16x8ShrS)
5046 v.AddArg2(x, d)
5047 return true
5048 }
5049
5050
5051 for {
5052 x := v_0
5053 y := v_1
5054 v.reset(OpWasmSelectV)
5055 v0 := b.NewValue0(v.Pos, OpWasmI16x8ShrS, typ.Vec128)
5056 v0.AddArg2(x, y)
5057 v1 := b.NewValue0(v.Pos, OpWasmI16x8ShrS, typ.Vec128)
5058 v2 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
5059 v2.AuxInt = int64ToAuxInt(15)
5060 v1.AddArg2(x, v2)
5061 v3 := b.NewValue0(v.Pos, OpWasmI64LtU, typ.Bool)
5062 v4 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
5063 v4.AuxInt = int64ToAuxInt(16)
5064 v3.AddArg2(y, v4)
5065 v.AddArg3(v0, v1, v3)
5066 return true
5067 }
5068 }
5069 func rewriteValueWasm_OpShiftAllRightInt32x4(v *Value) bool {
5070 v_1 := v.Args[1]
5071 v_0 := v.Args[0]
5072 b := v.Block
5073 typ := &b.Func.Config.Types
5074
5075
5076
5077 for {
5078 x := v_0
5079 d := v_1
5080 if d.Op != OpConst64 {
5081 break
5082 }
5083 c := auxIntToInt64(d.AuxInt)
5084 if !(uint64(c) < 32) {
5085 break
5086 }
5087 v.reset(OpWasmI32x4ShrS)
5088 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
5089 v0.AuxInt = int64ToAuxInt(c)
5090 v.AddArg2(x, v0)
5091 return true
5092 }
5093
5094
5095
5096 for {
5097 x := v_0
5098 d := v_1
5099 if d.Op != OpWasmI64Const {
5100 break
5101 }
5102 c := auxIntToInt64(d.AuxInt)
5103 if !(uint64(c) < 32) {
5104 break
5105 }
5106 v.reset(OpWasmI32x4ShrS)
5107 v.AddArg2(x, d)
5108 return true
5109 }
5110
5111
5112 for {
5113 x := v_0
5114 y := v_1
5115 v.reset(OpWasmSelectV)
5116 v0 := b.NewValue0(v.Pos, OpWasmI32x4ShrS, typ.Vec128)
5117 v0.AddArg2(x, y)
5118 v1 := b.NewValue0(v.Pos, OpWasmI32x4ShrS, typ.Vec128)
5119 v2 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
5120 v2.AuxInt = int64ToAuxInt(31)
5121 v1.AddArg2(x, v2)
5122 v3 := b.NewValue0(v.Pos, OpWasmI64LtU, typ.Bool)
5123 v4 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
5124 v4.AuxInt = int64ToAuxInt(32)
5125 v3.AddArg2(y, v4)
5126 v.AddArg3(v0, v1, v3)
5127 return true
5128 }
5129 }
5130 func rewriteValueWasm_OpShiftAllRightInt64x2(v *Value) bool {
5131 v_1 := v.Args[1]
5132 v_0 := v.Args[0]
5133 b := v.Block
5134 typ := &b.Func.Config.Types
5135
5136
5137
5138 for {
5139 x := v_0
5140 d := v_1
5141 if d.Op != OpConst64 {
5142 break
5143 }
5144 c := auxIntToInt64(d.AuxInt)
5145 if !(uint64(c) < 64) {
5146 break
5147 }
5148 v.reset(OpWasmI64x2ShrS)
5149 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
5150 v0.AuxInt = int64ToAuxInt(c)
5151 v.AddArg2(x, v0)
5152 return true
5153 }
5154
5155
5156
5157 for {
5158 x := v_0
5159 d := v_1
5160 if d.Op != OpWasmI64Const {
5161 break
5162 }
5163 c := auxIntToInt64(d.AuxInt)
5164 if !(uint64(c) < 64) {
5165 break
5166 }
5167 v.reset(OpWasmI64x2ShrS)
5168 v.AddArg2(x, d)
5169 return true
5170 }
5171
5172
5173 for {
5174 x := v_0
5175 y := v_1
5176 v.reset(OpWasmSelectV)
5177 v0 := b.NewValue0(v.Pos, OpWasmI64x2ShrS, typ.Vec128)
5178 v0.AddArg2(x, y)
5179 v1 := b.NewValue0(v.Pos, OpWasmI64x2ShrS, typ.Vec128)
5180 v2 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
5181 v2.AuxInt = int64ToAuxInt(63)
5182 v1.AddArg2(x, v2)
5183 v3 := b.NewValue0(v.Pos, OpWasmI64LtU, typ.Bool)
5184 v4 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
5185 v4.AuxInt = int64ToAuxInt(64)
5186 v3.AddArg2(y, v4)
5187 v.AddArg3(v0, v1, v3)
5188 return true
5189 }
5190 }
5191 func rewriteValueWasm_OpShiftAllRightInt8x16(v *Value) bool {
5192 v_1 := v.Args[1]
5193 v_0 := v.Args[0]
5194 b := v.Block
5195 typ := &b.Func.Config.Types
5196
5197
5198
5199 for {
5200 x := v_0
5201 d := v_1
5202 if d.Op != OpConst64 {
5203 break
5204 }
5205 c := auxIntToInt64(d.AuxInt)
5206 if !(uint64(c) < 8) {
5207 break
5208 }
5209 v.reset(OpWasmI8x16ShrS)
5210 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
5211 v0.AuxInt = int64ToAuxInt(c)
5212 v.AddArg2(x, v0)
5213 return true
5214 }
5215
5216
5217
5218 for {
5219 x := v_0
5220 d := v_1
5221 if d.Op != OpWasmI64Const {
5222 break
5223 }
5224 c := auxIntToInt64(d.AuxInt)
5225 if !(uint64(c) < 8) {
5226 break
5227 }
5228 v.reset(OpWasmI8x16ShrS)
5229 v.AddArg2(x, d)
5230 return true
5231 }
5232
5233
5234 for {
5235 x := v_0
5236 y := v_1
5237 v.reset(OpWasmSelectV)
5238 v0 := b.NewValue0(v.Pos, OpWasmI8x16ShrS, typ.Vec128)
5239 v0.AddArg2(x, y)
5240 v1 := b.NewValue0(v.Pos, OpWasmI8x16ShrS, typ.Vec128)
5241 v2 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
5242 v2.AuxInt = int64ToAuxInt(7)
5243 v1.AddArg2(x, v2)
5244 v3 := b.NewValue0(v.Pos, OpWasmI64LtU, typ.Bool)
5245 v4 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
5246 v4.AuxInt = int64ToAuxInt(8)
5247 v3.AddArg2(y, v4)
5248 v.AddArg3(v0, v1, v3)
5249 return true
5250 }
5251 }
5252 func rewriteValueWasm_OpShiftAllRightUint16x8(v *Value) bool {
5253 v_1 := v.Args[1]
5254 v_0 := v.Args[0]
5255 b := v.Block
5256 typ := &b.Func.Config.Types
5257
5258
5259
5260 for {
5261 x := v_0
5262 d := v_1
5263 if d.Op != OpConst64 {
5264 break
5265 }
5266 c := auxIntToInt64(d.AuxInt)
5267 if !(uint64(c) < 16) {
5268 break
5269 }
5270 v.reset(OpWasmI16x8ShrU)
5271 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
5272 v0.AuxInt = int64ToAuxInt(c)
5273 v.AddArg2(x, v0)
5274 return true
5275 }
5276
5277
5278
5279 for {
5280 x := v_0
5281 d := v_1
5282 if d.Op != OpWasmI64Const {
5283 break
5284 }
5285 c := auxIntToInt64(d.AuxInt)
5286 if !(uint64(c) < 16) {
5287 break
5288 }
5289 v.reset(OpWasmI16x8ShrU)
5290 v.AddArg2(x, d)
5291 return true
5292 }
5293
5294
5295 for {
5296 x := v_0
5297 y := v_1
5298 v.reset(OpWasmSelectV)
5299 v0 := b.NewValue0(v.Pos, OpWasmI16x8ShrU, typ.Vec128)
5300 v0.AddArg2(x, y)
5301 v1 := b.NewValue0(v.Pos, OpWasmV128Xor, typ.Vec128)
5302 v1.AddArg2(x, x)
5303 v2 := b.NewValue0(v.Pos, OpWasmI64LtU, typ.Bool)
5304 v3 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
5305 v3.AuxInt = int64ToAuxInt(16)
5306 v2.AddArg2(y, v3)
5307 v.AddArg3(v0, v1, v2)
5308 return true
5309 }
5310 }
5311 func rewriteValueWasm_OpShiftAllRightUint32x4(v *Value) bool {
5312 v_1 := v.Args[1]
5313 v_0 := v.Args[0]
5314 b := v.Block
5315 typ := &b.Func.Config.Types
5316
5317
5318
5319 for {
5320 x := v_0
5321 d := v_1
5322 if d.Op != OpConst64 {
5323 break
5324 }
5325 c := auxIntToInt64(d.AuxInt)
5326 if !(uint64(c) < 32) {
5327 break
5328 }
5329 v.reset(OpWasmI32x4ShrU)
5330 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
5331 v0.AuxInt = int64ToAuxInt(c)
5332 v.AddArg2(x, v0)
5333 return true
5334 }
5335
5336
5337
5338 for {
5339 x := v_0
5340 d := v_1
5341 if d.Op != OpWasmI64Const {
5342 break
5343 }
5344 c := auxIntToInt64(d.AuxInt)
5345 if !(uint64(c) < 32) {
5346 break
5347 }
5348 v.reset(OpWasmI32x4ShrU)
5349 v.AddArg2(x, d)
5350 return true
5351 }
5352
5353
5354 for {
5355 x := v_0
5356 y := v_1
5357 v.reset(OpWasmSelectV)
5358 v0 := b.NewValue0(v.Pos, OpWasmI32x4ShrU, typ.Vec128)
5359 v0.AddArg2(x, y)
5360 v1 := b.NewValue0(v.Pos, OpWasmV128Xor, typ.Vec128)
5361 v1.AddArg2(x, x)
5362 v2 := b.NewValue0(v.Pos, OpWasmI64LtU, typ.Bool)
5363 v3 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
5364 v3.AuxInt = int64ToAuxInt(32)
5365 v2.AddArg2(y, v3)
5366 v.AddArg3(v0, v1, v2)
5367 return true
5368 }
5369 }
5370 func rewriteValueWasm_OpShiftAllRightUint64x2(v *Value) bool {
5371 v_1 := v.Args[1]
5372 v_0 := v.Args[0]
5373 b := v.Block
5374 typ := &b.Func.Config.Types
5375
5376
5377
5378 for {
5379 x := v_0
5380 d := v_1
5381 if d.Op != OpConst64 {
5382 break
5383 }
5384 c := auxIntToInt64(d.AuxInt)
5385 if !(uint64(c) < 64) {
5386 break
5387 }
5388 v.reset(OpWasmI64x2ShrU)
5389 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
5390 v0.AuxInt = int64ToAuxInt(c)
5391 v.AddArg2(x, v0)
5392 return true
5393 }
5394
5395
5396
5397 for {
5398 x := v_0
5399 d := v_1
5400 if d.Op != OpWasmI64Const {
5401 break
5402 }
5403 c := auxIntToInt64(d.AuxInt)
5404 if !(uint64(c) < 64) {
5405 break
5406 }
5407 v.reset(OpWasmI64x2ShrU)
5408 v.AddArg2(x, d)
5409 return true
5410 }
5411
5412
5413 for {
5414 x := v_0
5415 y := v_1
5416 v.reset(OpWasmSelectV)
5417 v0 := b.NewValue0(v.Pos, OpWasmI64x2ShrU, typ.Vec128)
5418 v0.AddArg2(x, y)
5419 v1 := b.NewValue0(v.Pos, OpWasmV128Xor, typ.Vec128)
5420 v1.AddArg2(x, x)
5421 v2 := b.NewValue0(v.Pos, OpWasmI64LtU, typ.Bool)
5422 v3 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
5423 v3.AuxInt = int64ToAuxInt(64)
5424 v2.AddArg2(y, v3)
5425 v.AddArg3(v0, v1, v2)
5426 return true
5427 }
5428 }
5429 func rewriteValueWasm_OpShiftAllRightUint8x16(v *Value) bool {
5430 v_1 := v.Args[1]
5431 v_0 := v.Args[0]
5432 b := v.Block
5433 typ := &b.Func.Config.Types
5434
5435
5436
5437 for {
5438 x := v_0
5439 d := v_1
5440 if d.Op != OpConst64 {
5441 break
5442 }
5443 c := auxIntToInt64(d.AuxInt)
5444 if !(uint64(c) < 8) {
5445 break
5446 }
5447 v.reset(OpWasmI8x16ShrU)
5448 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
5449 v0.AuxInt = int64ToAuxInt(c)
5450 v.AddArg2(x, v0)
5451 return true
5452 }
5453
5454
5455
5456 for {
5457 x := v_0
5458 d := v_1
5459 if d.Op != OpWasmI64Const {
5460 break
5461 }
5462 c := auxIntToInt64(d.AuxInt)
5463 if !(uint64(c) < 8) {
5464 break
5465 }
5466 v.reset(OpWasmI8x16ShrU)
5467 v.AddArg2(x, d)
5468 return true
5469 }
5470
5471
5472 for {
5473 x := v_0
5474 y := v_1
5475 v.reset(OpWasmSelectV)
5476 v0 := b.NewValue0(v.Pos, OpWasmI8x16ShrU, typ.Vec128)
5477 v0.AddArg2(x, y)
5478 v1 := b.NewValue0(v.Pos, OpWasmV128Xor, typ.Vec128)
5479 v1.AddArg2(x, x)
5480 v2 := b.NewValue0(v.Pos, OpWasmI64LtU, typ.Bool)
5481 v3 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
5482 v3.AuxInt = int64ToAuxInt(8)
5483 v2.AddArg2(y, v3)
5484 v.AddArg3(v0, v1, v2)
5485 return true
5486 }
5487 }
5488 func rewriteValueWasm_OpSignExt16to32(v *Value) bool {
5489 v_0 := v.Args[0]
5490
5491
5492 for {
5493 x := v_0
5494 if x.Op != OpWasmI64Load16S {
5495 break
5496 }
5497 v.copyOf(x)
5498 return true
5499 }
5500
5501
5502 for {
5503 x := v_0
5504 v.reset(OpWasmI64Extend16S)
5505 v.AddArg(x)
5506 return true
5507 }
5508 }
5509 func rewriteValueWasm_OpSignExt16to64(v *Value) bool {
5510 v_0 := v.Args[0]
5511
5512
5513 for {
5514 x := v_0
5515 if x.Op != OpWasmI64Load16S {
5516 break
5517 }
5518 v.copyOf(x)
5519 return true
5520 }
5521
5522
5523 for {
5524 x := v_0
5525 v.reset(OpWasmI64Extend16S)
5526 v.AddArg(x)
5527 return true
5528 }
5529 }
5530 func rewriteValueWasm_OpSignExt32to64(v *Value) bool {
5531 v_0 := v.Args[0]
5532
5533
5534 for {
5535 x := v_0
5536 if x.Op != OpWasmI64Load32S {
5537 break
5538 }
5539 v.copyOf(x)
5540 return true
5541 }
5542
5543
5544 for {
5545 x := v_0
5546 v.reset(OpWasmI64Extend32S)
5547 v.AddArg(x)
5548 return true
5549 }
5550 }
5551 func rewriteValueWasm_OpSignExt8to16(v *Value) bool {
5552 v_0 := v.Args[0]
5553
5554
5555 for {
5556 x := v_0
5557 if x.Op != OpWasmI64Load8S {
5558 break
5559 }
5560 v.copyOf(x)
5561 return true
5562 }
5563
5564
5565 for {
5566 x := v_0
5567 v.reset(OpWasmI64Extend8S)
5568 v.AddArg(x)
5569 return true
5570 }
5571 }
5572 func rewriteValueWasm_OpSignExt8to32(v *Value) bool {
5573 v_0 := v.Args[0]
5574
5575
5576 for {
5577 x := v_0
5578 if x.Op != OpWasmI64Load8S {
5579 break
5580 }
5581 v.copyOf(x)
5582 return true
5583 }
5584
5585
5586 for {
5587 x := v_0
5588 v.reset(OpWasmI64Extend8S)
5589 v.AddArg(x)
5590 return true
5591 }
5592 }
5593 func rewriteValueWasm_OpSignExt8to64(v *Value) bool {
5594 v_0 := v.Args[0]
5595
5596
5597 for {
5598 x := v_0
5599 if x.Op != OpWasmI64Load8S {
5600 break
5601 }
5602 v.copyOf(x)
5603 return true
5604 }
5605
5606
5607 for {
5608 x := v_0
5609 v.reset(OpWasmI64Extend8S)
5610 v.AddArg(x)
5611 return true
5612 }
5613 }
5614 func rewriteValueWasm_OpSlicemask(v *Value) bool {
5615 v_0 := v.Args[0]
5616 b := v.Block
5617 typ := &b.Func.Config.Types
5618
5619
5620 for {
5621 x := v_0
5622 v.reset(OpWasmI64ShrS)
5623 v0 := b.NewValue0(v.Pos, OpWasmI64Sub, typ.Int64)
5624 v1 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
5625 v1.AuxInt = int64ToAuxInt(0)
5626 v0.AddArg2(v1, x)
5627 v2 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
5628 v2.AuxInt = int64ToAuxInt(63)
5629 v.AddArg2(v0, v2)
5630 return true
5631 }
5632 }
5633 func rewriteValueWasm_OpStore(v *Value) bool {
5634 v_2 := v.Args[2]
5635 v_1 := v.Args[1]
5636 v_0 := v.Args[0]
5637
5638
5639
5640 for {
5641 t := auxToType(v.Aux)
5642 ptr := v_0
5643 val := v_1
5644 mem := v_2
5645 if !(is64BitFloat(t)) {
5646 break
5647 }
5648 v.reset(OpWasmF64Store)
5649 v.AddArg3(ptr, val, mem)
5650 return true
5651 }
5652
5653
5654
5655 for {
5656 t := auxToType(v.Aux)
5657 ptr := v_0
5658 val := v_1
5659 mem := v_2
5660 if !(is32BitFloat(t)) {
5661 break
5662 }
5663 v.reset(OpWasmF32Store)
5664 v.AddArg3(ptr, val, mem)
5665 return true
5666 }
5667
5668
5669
5670 for {
5671 t := auxToType(v.Aux)
5672 ptr := v_0
5673 val := v_1
5674 mem := v_2
5675 if !(t.Size() == 16) {
5676 break
5677 }
5678 v.reset(OpWasmV128Store)
5679 v.AddArg3(ptr, val, mem)
5680 return true
5681 }
5682
5683
5684
5685 for {
5686 t := auxToType(v.Aux)
5687 ptr := v_0
5688 val := v_1
5689 mem := v_2
5690 if !(t.Size() == 8) {
5691 break
5692 }
5693 v.reset(OpWasmI64Store)
5694 v.AddArg3(ptr, val, mem)
5695 return true
5696 }
5697
5698
5699
5700 for {
5701 t := auxToType(v.Aux)
5702 ptr := v_0
5703 val := v_1
5704 mem := v_2
5705 if !(t.Size() == 4) {
5706 break
5707 }
5708 v.reset(OpWasmI64Store32)
5709 v.AddArg3(ptr, val, mem)
5710 return true
5711 }
5712
5713
5714
5715 for {
5716 t := auxToType(v.Aux)
5717 ptr := v_0
5718 val := v_1
5719 mem := v_2
5720 if !(t.Size() == 2) {
5721 break
5722 }
5723 v.reset(OpWasmI64Store16)
5724 v.AddArg3(ptr, val, mem)
5725 return true
5726 }
5727
5728
5729
5730 for {
5731 t := auxToType(v.Aux)
5732 ptr := v_0
5733 val := v_1
5734 mem := v_2
5735 if !(t.Size() == 1) {
5736 break
5737 }
5738 v.reset(OpWasmI64Store8)
5739 v.AddArg3(ptr, val, mem)
5740 return true
5741 }
5742 return false
5743 }
5744 func rewriteValueWasm_OpWasmF32DemoteF64(v *Value) bool {
5745 v_0 := v.Args[0]
5746
5747
5748 for {
5749 if v_0.Op != OpWasmF64Sqrt {
5750 break
5751 }
5752 v_0_0 := v_0.Args[0]
5753 if v_0_0.Op != OpWasmF64PromoteF32 {
5754 break
5755 }
5756 x := v_0_0.Args[0]
5757 v.reset(OpWasmF32Sqrt)
5758 v.AddArg(x)
5759 return true
5760 }
5761
5762
5763 for {
5764 if v_0.Op != OpWasmF64Trunc {
5765 break
5766 }
5767 v_0_0 := v_0.Args[0]
5768 if v_0_0.Op != OpWasmF64PromoteF32 {
5769 break
5770 }
5771 x := v_0_0.Args[0]
5772 v.reset(OpWasmF32Trunc)
5773 v.AddArg(x)
5774 return true
5775 }
5776
5777
5778 for {
5779 if v_0.Op != OpWasmF64Ceil {
5780 break
5781 }
5782 v_0_0 := v_0.Args[0]
5783 if v_0_0.Op != OpWasmF64PromoteF32 {
5784 break
5785 }
5786 x := v_0_0.Args[0]
5787 v.reset(OpWasmF32Ceil)
5788 v.AddArg(x)
5789 return true
5790 }
5791
5792
5793 for {
5794 if v_0.Op != OpWasmF64Floor {
5795 break
5796 }
5797 v_0_0 := v_0.Args[0]
5798 if v_0_0.Op != OpWasmF64PromoteF32 {
5799 break
5800 }
5801 x := v_0_0.Args[0]
5802 v.reset(OpWasmF32Floor)
5803 v.AddArg(x)
5804 return true
5805 }
5806
5807
5808 for {
5809 if v_0.Op != OpWasmF64Nearest {
5810 break
5811 }
5812 v_0_0 := v_0.Args[0]
5813 if v_0_0.Op != OpWasmF64PromoteF32 {
5814 break
5815 }
5816 x := v_0_0.Args[0]
5817 v.reset(OpWasmF32Nearest)
5818 v.AddArg(x)
5819 return true
5820 }
5821
5822
5823 for {
5824 if v_0.Op != OpWasmF64Abs {
5825 break
5826 }
5827 v_0_0 := v_0.Args[0]
5828 if v_0_0.Op != OpWasmF64PromoteF32 {
5829 break
5830 }
5831 x := v_0_0.Args[0]
5832 v.reset(OpWasmF32Abs)
5833 v.AddArg(x)
5834 return true
5835 }
5836
5837
5838 for {
5839 if v_0.Op != OpWasmF64Copysign {
5840 break
5841 }
5842 _ = v_0.Args[1]
5843 v_0_0 := v_0.Args[0]
5844 if v_0_0.Op != OpWasmF64PromoteF32 {
5845 break
5846 }
5847 x := v_0_0.Args[0]
5848 v_0_1 := v_0.Args[1]
5849 if v_0_1.Op != OpWasmF64PromoteF32 {
5850 break
5851 }
5852 y := v_0_1.Args[0]
5853 v.reset(OpWasmF32Copysign)
5854 v.AddArg2(x, y)
5855 return true
5856 }
5857 return false
5858 }
5859 func rewriteValueWasm_OpWasmF64Add(v *Value) bool {
5860 v_1 := v.Args[1]
5861 v_0 := v.Args[0]
5862 b := v.Block
5863 typ := &b.Func.Config.Types
5864
5865
5866 for {
5867 if v_0.Op != OpWasmF64Const {
5868 break
5869 }
5870 x := auxIntToFloat64(v_0.AuxInt)
5871 if v_1.Op != OpWasmF64Const {
5872 break
5873 }
5874 y := auxIntToFloat64(v_1.AuxInt)
5875 v.reset(OpWasmF64Const)
5876 v.AuxInt = float64ToAuxInt(x + y)
5877 return true
5878 }
5879
5880
5881
5882 for {
5883 if v_0.Op != OpWasmF64Const {
5884 break
5885 }
5886 x := auxIntToFloat64(v_0.AuxInt)
5887 y := v_1
5888 if !(y.Op != OpWasmF64Const) {
5889 break
5890 }
5891 v.reset(OpWasmF64Add)
5892 v0 := b.NewValue0(v.Pos, OpWasmF64Const, typ.Float64)
5893 v0.AuxInt = float64ToAuxInt(x)
5894 v.AddArg2(y, v0)
5895 return true
5896 }
5897 return false
5898 }
5899 func rewriteValueWasm_OpWasmF64Mul(v *Value) bool {
5900 v_1 := v.Args[1]
5901 v_0 := v.Args[0]
5902 b := v.Block
5903 typ := &b.Func.Config.Types
5904
5905
5906
5907 for {
5908 if v_0.Op != OpWasmF64Const {
5909 break
5910 }
5911 x := auxIntToFloat64(v_0.AuxInt)
5912 if v_1.Op != OpWasmF64Const {
5913 break
5914 }
5915 y := auxIntToFloat64(v_1.AuxInt)
5916 if !(!math.IsNaN(x * y)) {
5917 break
5918 }
5919 v.reset(OpWasmF64Const)
5920 v.AuxInt = float64ToAuxInt(x * y)
5921 return true
5922 }
5923
5924
5925
5926 for {
5927 if v_0.Op != OpWasmF64Const {
5928 break
5929 }
5930 x := auxIntToFloat64(v_0.AuxInt)
5931 y := v_1
5932 if !(y.Op != OpWasmF64Const) {
5933 break
5934 }
5935 v.reset(OpWasmF64Mul)
5936 v0 := b.NewValue0(v.Pos, OpWasmF64Const, typ.Float64)
5937 v0.AuxInt = float64ToAuxInt(x)
5938 v.AddArg2(y, v0)
5939 return true
5940 }
5941 return false
5942 }
5943 func rewriteValueWasm_OpWasmI64Add(v *Value) bool {
5944 v_1 := v.Args[1]
5945 v_0 := v.Args[0]
5946 b := v.Block
5947 typ := &b.Func.Config.Types
5948
5949
5950 for {
5951 if v_0.Op != OpWasmI64Const {
5952 break
5953 }
5954 x := auxIntToInt64(v_0.AuxInt)
5955 if v_1.Op != OpWasmI64Const {
5956 break
5957 }
5958 y := auxIntToInt64(v_1.AuxInt)
5959 v.reset(OpWasmI64Const)
5960 v.AuxInt = int64ToAuxInt(x + y)
5961 return true
5962 }
5963
5964
5965
5966 for {
5967 if v_0.Op != OpWasmI64Const {
5968 break
5969 }
5970 x := auxIntToInt64(v_0.AuxInt)
5971 y := v_1
5972 if !(y.Op != OpWasmI64Const) {
5973 break
5974 }
5975 v.reset(OpWasmI64Add)
5976 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
5977 v0.AuxInt = int64ToAuxInt(x)
5978 v.AddArg2(y, v0)
5979 return true
5980 }
5981
5982
5983
5984 for {
5985 x := v_0
5986 if v_1.Op != OpWasmI64Const {
5987 break
5988 }
5989 t := v_1.Type
5990 y := auxIntToInt64(v_1.AuxInt)
5991 if !(!t.IsPtr()) {
5992 break
5993 }
5994 v.reset(OpWasmI64AddConst)
5995 v.AuxInt = int64ToAuxInt(y)
5996 v.AddArg(x)
5997 return true
5998 }
5999 return false
6000 }
6001 func rewriteValueWasm_OpWasmI64AddConst(v *Value) bool {
6002 v_0 := v.Args[0]
6003
6004
6005 for {
6006 if auxIntToInt64(v.AuxInt) != 0 {
6007 break
6008 }
6009 x := v_0
6010 v.copyOf(x)
6011 return true
6012 }
6013
6014
6015
6016 for {
6017 off := auxIntToInt64(v.AuxInt)
6018 if v_0.Op != OpWasmLoweredAddr {
6019 break
6020 }
6021 off2 := auxIntToInt32(v_0.AuxInt)
6022 sym := auxToSym(v_0.Aux)
6023 base := v_0.Args[0]
6024 if !(isU32Bit(off + int64(off2))) {
6025 break
6026 }
6027 v.reset(OpWasmLoweredAddr)
6028 v.AuxInt = int32ToAuxInt(int32(off) + off2)
6029 v.Aux = symToAux(sym)
6030 v.AddArg(base)
6031 return true
6032 }
6033
6034
6035
6036 for {
6037 off := auxIntToInt64(v.AuxInt)
6038 x := v_0
6039 if x.Op != OpSP || !(isU32Bit(off)) {
6040 break
6041 }
6042 v.reset(OpWasmLoweredAddr)
6043 v.AuxInt = int32ToAuxInt(int32(off))
6044 v.AddArg(x)
6045 return true
6046 }
6047 return false
6048 }
6049 func rewriteValueWasm_OpWasmI64And(v *Value) bool {
6050 v_1 := v.Args[1]
6051 v_0 := v.Args[0]
6052 b := v.Block
6053 typ := &b.Func.Config.Types
6054
6055
6056 for {
6057 if v_0.Op != OpWasmI64Const {
6058 break
6059 }
6060 x := auxIntToInt64(v_0.AuxInt)
6061 if v_1.Op != OpWasmI64Const {
6062 break
6063 }
6064 y := auxIntToInt64(v_1.AuxInt)
6065 v.reset(OpWasmI64Const)
6066 v.AuxInt = int64ToAuxInt(x & y)
6067 return true
6068 }
6069
6070
6071 for {
6072 x := v_0
6073 if v_1.Op != OpWasmI64Const || auxIntToInt64(v_1.AuxInt) != -1 {
6074 break
6075 }
6076 v.copyOf(x)
6077 return true
6078 }
6079
6080
6081 for {
6082 if v_1.Op != OpWasmI64Const || auxIntToInt64(v_1.AuxInt) != 0 {
6083 break
6084 }
6085 v.reset(OpWasmI64Const)
6086 v.AuxInt = int64ToAuxInt(0)
6087 return true
6088 }
6089
6090
6091 for {
6092 if v_0.Op != OpWasmI64And {
6093 break
6094 }
6095 _ = v_0.Args[1]
6096 x := v_0.Args[0]
6097 v_0_1 := v_0.Args[1]
6098 if v_0_1.Op != OpWasmI64Const {
6099 break
6100 }
6101 c1 := auxIntToInt64(v_0_1.AuxInt)
6102 if v_1.Op != OpWasmI64Const {
6103 break
6104 }
6105 c2 := auxIntToInt64(v_1.AuxInt)
6106 v.reset(OpWasmI64And)
6107 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
6108 v0.AuxInt = int64ToAuxInt(c1 & c2)
6109 v.AddArg2(x, v0)
6110 return true
6111 }
6112
6113
6114
6115 for {
6116 if v_0.Op != OpWasmI64Const {
6117 break
6118 }
6119 x := auxIntToInt64(v_0.AuxInt)
6120 y := v_1
6121 if !(y.Op != OpWasmI64Const) {
6122 break
6123 }
6124 v.reset(OpWasmI64And)
6125 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
6126 v0.AuxInt = int64ToAuxInt(x)
6127 v.AddArg2(y, v0)
6128 return true
6129 }
6130 return false
6131 }
6132 func rewriteValueWasm_OpWasmI64Eq(v *Value) bool {
6133 v_1 := v.Args[1]
6134 v_0 := v.Args[0]
6135 b := v.Block
6136 typ := &b.Func.Config.Types
6137
6138
6139
6140 for {
6141 if v_0.Op != OpWasmI64Const {
6142 break
6143 }
6144 x := auxIntToInt64(v_0.AuxInt)
6145 if v_1.Op != OpWasmI64Const {
6146 break
6147 }
6148 y := auxIntToInt64(v_1.AuxInt)
6149 if !(x == y) {
6150 break
6151 }
6152 v.reset(OpWasmI64Const)
6153 v.AuxInt = int64ToAuxInt(1)
6154 return true
6155 }
6156
6157
6158
6159 for {
6160 if v_0.Op != OpWasmI64Const {
6161 break
6162 }
6163 x := auxIntToInt64(v_0.AuxInt)
6164 if v_1.Op != OpWasmI64Const {
6165 break
6166 }
6167 y := auxIntToInt64(v_1.AuxInt)
6168 if !(x != y) {
6169 break
6170 }
6171 v.reset(OpWasmI64Const)
6172 v.AuxInt = int64ToAuxInt(0)
6173 return true
6174 }
6175
6176
6177
6178 for {
6179 if v_0.Op != OpWasmI64Const {
6180 break
6181 }
6182 x := auxIntToInt64(v_0.AuxInt)
6183 y := v_1
6184 if !(y.Op != OpWasmI64Const) {
6185 break
6186 }
6187 v.reset(OpWasmI64Eq)
6188 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
6189 v0.AuxInt = int64ToAuxInt(x)
6190 v.AddArg2(y, v0)
6191 return true
6192 }
6193
6194
6195 for {
6196 x := v_0
6197 if v_1.Op != OpWasmI64Const || auxIntToInt64(v_1.AuxInt) != 0 {
6198 break
6199 }
6200 v.reset(OpWasmI64Eqz)
6201 v.AddArg(x)
6202 return true
6203 }
6204 return false
6205 }
6206 func rewriteValueWasm_OpWasmI64Eqz(v *Value) bool {
6207 v_0 := v.Args[0]
6208
6209
6210 for {
6211 if v_0.Op != OpWasmI64Eqz {
6212 break
6213 }
6214 v_0_0 := v_0.Args[0]
6215 if v_0_0.Op != OpWasmI64Eqz {
6216 break
6217 }
6218 x := v_0_0.Args[0]
6219 v.reset(OpWasmI64Eqz)
6220 v.AddArg(x)
6221 return true
6222 }
6223 return false
6224 }
6225 func rewriteValueWasm_OpWasmI64Extend16S(v *Value) bool {
6226 v_0 := v.Args[0]
6227
6228
6229 for {
6230 if v_0.Op != OpWasmI64Extend16S {
6231 break
6232 }
6233 x := v_0.Args[0]
6234 v.reset(OpWasmI64Extend16S)
6235 v.AddArg(x)
6236 return true
6237 }
6238
6239
6240 for {
6241 if v_0.Op != OpWasmI64Extend8S {
6242 break
6243 }
6244 x := v_0.Args[0]
6245 v.reset(OpWasmI64Extend8S)
6246 v.AddArg(x)
6247 return true
6248 }
6249
6250
6251
6252 for {
6253 x := v_0
6254 if x.Op != OpWasmI64And {
6255 break
6256 }
6257 _ = x.Args[1]
6258 x_1 := x.Args[1]
6259 if x_1.Op != OpWasmI64Const {
6260 break
6261 }
6262 c := auxIntToInt64(x_1.AuxInt)
6263 if !(c >= 0 && int64(int16(c)) == c) {
6264 break
6265 }
6266 v.copyOf(x)
6267 return true
6268 }
6269 return false
6270 }
6271 func rewriteValueWasm_OpWasmI64Extend32S(v *Value) bool {
6272 v_0 := v.Args[0]
6273
6274
6275 for {
6276 if v_0.Op != OpWasmI64Extend32S {
6277 break
6278 }
6279 x := v_0.Args[0]
6280 v.reset(OpWasmI64Extend32S)
6281 v.AddArg(x)
6282 return true
6283 }
6284
6285
6286 for {
6287 if v_0.Op != OpWasmI64Extend16S {
6288 break
6289 }
6290 x := v_0.Args[0]
6291 v.reset(OpWasmI64Extend16S)
6292 v.AddArg(x)
6293 return true
6294 }
6295
6296
6297 for {
6298 if v_0.Op != OpWasmI64Extend8S {
6299 break
6300 }
6301 x := v_0.Args[0]
6302 v.reset(OpWasmI64Extend8S)
6303 v.AddArg(x)
6304 return true
6305 }
6306
6307
6308
6309 for {
6310 x := v_0
6311 if x.Op != OpWasmI64And {
6312 break
6313 }
6314 _ = x.Args[1]
6315 x_1 := x.Args[1]
6316 if x_1.Op != OpWasmI64Const {
6317 break
6318 }
6319 c := auxIntToInt64(x_1.AuxInt)
6320 if !(c >= 0 && int64(int32(c)) == c) {
6321 break
6322 }
6323 v.copyOf(x)
6324 return true
6325 }
6326 return false
6327 }
6328 func rewriteValueWasm_OpWasmI64Extend8S(v *Value) bool {
6329 v_0 := v.Args[0]
6330
6331
6332 for {
6333 if v_0.Op != OpWasmI64Extend8S {
6334 break
6335 }
6336 x := v_0.Args[0]
6337 v.reset(OpWasmI64Extend8S)
6338 v.AddArg(x)
6339 return true
6340 }
6341
6342
6343
6344 for {
6345 x := v_0
6346 if x.Op != OpWasmI64And {
6347 break
6348 }
6349 _ = x.Args[1]
6350 x_1 := x.Args[1]
6351 if x_1.Op != OpWasmI64Const {
6352 break
6353 }
6354 c := auxIntToInt64(x_1.AuxInt)
6355 if !(c >= 0 && int64(int8(c)) == c) {
6356 break
6357 }
6358 v.copyOf(x)
6359 return true
6360 }
6361 return false
6362 }
6363 func rewriteValueWasm_OpWasmI64LeU(v *Value) bool {
6364 v_1 := v.Args[1]
6365 v_0 := v.Args[0]
6366 b := v.Block
6367 typ := &b.Func.Config.Types
6368
6369
6370 for {
6371 x := v_0
6372 if v_1.Op != OpWasmI64Const || auxIntToInt64(v_1.AuxInt) != 0 {
6373 break
6374 }
6375 v.reset(OpWasmI64Eqz)
6376 v.AddArg(x)
6377 return true
6378 }
6379
6380
6381 for {
6382 if v_0.Op != OpWasmI64Const || auxIntToInt64(v_0.AuxInt) != 1 {
6383 break
6384 }
6385 x := v_1
6386 v.reset(OpWasmI64Eqz)
6387 v0 := b.NewValue0(v.Pos, OpWasmI64Eqz, typ.Bool)
6388 v0.AddArg(x)
6389 v.AddArg(v0)
6390 return true
6391 }
6392 return false
6393 }
6394 func rewriteValueWasm_OpWasmI64Load(v *Value) bool {
6395 v_1 := v.Args[1]
6396 v_0 := v.Args[0]
6397 b := v.Block
6398 config := b.Func.Config
6399
6400
6401
6402 for {
6403 off := auxIntToInt64(v.AuxInt)
6404 if v_0.Op != OpWasmI64AddConst {
6405 break
6406 }
6407 off2 := auxIntToInt64(v_0.AuxInt)
6408 ptr := v_0.Args[0]
6409 mem := v_1
6410 if !(isU32Bit(off + off2)) {
6411 break
6412 }
6413 v.reset(OpWasmI64Load)
6414 v.AuxInt = int64ToAuxInt(off + off2)
6415 v.AddArg2(ptr, mem)
6416 return true
6417 }
6418
6419
6420
6421 for {
6422 off := auxIntToInt64(v.AuxInt)
6423 if v_0.Op != OpWasmLoweredAddr {
6424 break
6425 }
6426 off2 := auxIntToInt32(v_0.AuxInt)
6427 sym := auxToSym(v_0.Aux)
6428 v_0_0 := v_0.Args[0]
6429 if v_0_0.Op != OpSB || !(symIsRO(sym) && isU32Bit(off+int64(off2))) {
6430 break
6431 }
6432 v.reset(OpWasmI64Const)
6433 v.AuxInt = int64ToAuxInt(int64(read64(sym, off+int64(off2), config.ctxt.Arch.ByteOrder)))
6434 return true
6435 }
6436 return false
6437 }
6438 func rewriteValueWasm_OpWasmI64Load16S(v *Value) bool {
6439 v_1 := v.Args[1]
6440 v_0 := v.Args[0]
6441 b := v.Block
6442 config := b.Func.Config
6443
6444
6445
6446 for {
6447 off := auxIntToInt64(v.AuxInt)
6448 if v_0.Op != OpWasmI64AddConst {
6449 break
6450 }
6451 off2 := auxIntToInt64(v_0.AuxInt)
6452 ptr := v_0.Args[0]
6453 mem := v_1
6454 if !(isU32Bit(off + off2)) {
6455 break
6456 }
6457 v.reset(OpWasmI64Load16S)
6458 v.AuxInt = int64ToAuxInt(off + off2)
6459 v.AddArg2(ptr, mem)
6460 return true
6461 }
6462
6463
6464
6465 for {
6466 off := auxIntToInt64(v.AuxInt)
6467 if v_0.Op != OpWasmLoweredAddr {
6468 break
6469 }
6470 off2 := auxIntToInt32(v_0.AuxInt)
6471 sym := auxToSym(v_0.Aux)
6472 v_0_0 := v_0.Args[0]
6473 if v_0_0.Op != OpSB || !(symIsRO(sym) && isU32Bit(off+int64(off2))) {
6474 break
6475 }
6476 v.reset(OpWasmI64Const)
6477 v.AuxInt = int64ToAuxInt(int64(int16(read16(sym, off+int64(off2), config.ctxt.Arch.ByteOrder))))
6478 return true
6479 }
6480 return false
6481 }
6482 func rewriteValueWasm_OpWasmI64Load16U(v *Value) bool {
6483 v_1 := v.Args[1]
6484 v_0 := v.Args[0]
6485 b := v.Block
6486 config := b.Func.Config
6487
6488
6489
6490 for {
6491 off := auxIntToInt64(v.AuxInt)
6492 if v_0.Op != OpWasmI64AddConst {
6493 break
6494 }
6495 off2 := auxIntToInt64(v_0.AuxInt)
6496 ptr := v_0.Args[0]
6497 mem := v_1
6498 if !(isU32Bit(off + off2)) {
6499 break
6500 }
6501 v.reset(OpWasmI64Load16U)
6502 v.AuxInt = int64ToAuxInt(off + off2)
6503 v.AddArg2(ptr, mem)
6504 return true
6505 }
6506
6507
6508
6509 for {
6510 off := auxIntToInt64(v.AuxInt)
6511 if v_0.Op != OpWasmLoweredAddr {
6512 break
6513 }
6514 off2 := auxIntToInt32(v_0.AuxInt)
6515 sym := auxToSym(v_0.Aux)
6516 v_0_0 := v_0.Args[0]
6517 if v_0_0.Op != OpSB || !(symIsRO(sym) && isU32Bit(off+int64(off2))) {
6518 break
6519 }
6520 v.reset(OpWasmI64Const)
6521 v.AuxInt = int64ToAuxInt(int64(read16(sym, off+int64(off2), config.ctxt.Arch.ByteOrder)))
6522 return true
6523 }
6524 return false
6525 }
6526 func rewriteValueWasm_OpWasmI64Load32S(v *Value) bool {
6527 v_1 := v.Args[1]
6528 v_0 := v.Args[0]
6529 b := v.Block
6530 config := b.Func.Config
6531
6532
6533
6534 for {
6535 off := auxIntToInt64(v.AuxInt)
6536 if v_0.Op != OpWasmI64AddConst {
6537 break
6538 }
6539 off2 := auxIntToInt64(v_0.AuxInt)
6540 ptr := v_0.Args[0]
6541 mem := v_1
6542 if !(isU32Bit(off + off2)) {
6543 break
6544 }
6545 v.reset(OpWasmI64Load32S)
6546 v.AuxInt = int64ToAuxInt(off + off2)
6547 v.AddArg2(ptr, mem)
6548 return true
6549 }
6550
6551
6552
6553 for {
6554 off := auxIntToInt64(v.AuxInt)
6555 if v_0.Op != OpWasmLoweredAddr {
6556 break
6557 }
6558 off2 := auxIntToInt32(v_0.AuxInt)
6559 sym := auxToSym(v_0.Aux)
6560 v_0_0 := v_0.Args[0]
6561 if v_0_0.Op != OpSB || !(symIsRO(sym) && isU32Bit(off+int64(off2))) {
6562 break
6563 }
6564 v.reset(OpWasmI64Const)
6565 v.AuxInt = int64ToAuxInt(int64(int32(read32(sym, off+int64(off2), config.ctxt.Arch.ByteOrder))))
6566 return true
6567 }
6568 return false
6569 }
6570 func rewriteValueWasm_OpWasmI64Load32U(v *Value) bool {
6571 v_1 := v.Args[1]
6572 v_0 := v.Args[0]
6573 b := v.Block
6574 config := b.Func.Config
6575
6576
6577
6578 for {
6579 off := auxIntToInt64(v.AuxInt)
6580 if v_0.Op != OpWasmI64AddConst {
6581 break
6582 }
6583 off2 := auxIntToInt64(v_0.AuxInt)
6584 ptr := v_0.Args[0]
6585 mem := v_1
6586 if !(isU32Bit(off + off2)) {
6587 break
6588 }
6589 v.reset(OpWasmI64Load32U)
6590 v.AuxInt = int64ToAuxInt(off + off2)
6591 v.AddArg2(ptr, mem)
6592 return true
6593 }
6594
6595
6596
6597 for {
6598 off := auxIntToInt64(v.AuxInt)
6599 if v_0.Op != OpWasmLoweredAddr {
6600 break
6601 }
6602 off2 := auxIntToInt32(v_0.AuxInt)
6603 sym := auxToSym(v_0.Aux)
6604 v_0_0 := v_0.Args[0]
6605 if v_0_0.Op != OpSB || !(symIsRO(sym) && isU32Bit(off+int64(off2))) {
6606 break
6607 }
6608 v.reset(OpWasmI64Const)
6609 v.AuxInt = int64ToAuxInt(int64(read32(sym, off+int64(off2), config.ctxt.Arch.ByteOrder)))
6610 return true
6611 }
6612 return false
6613 }
6614 func rewriteValueWasm_OpWasmI64Load8S(v *Value) bool {
6615 v_1 := v.Args[1]
6616 v_0 := v.Args[0]
6617
6618
6619
6620 for {
6621 off := auxIntToInt64(v.AuxInt)
6622 if v_0.Op != OpWasmI64AddConst {
6623 break
6624 }
6625 off2 := auxIntToInt64(v_0.AuxInt)
6626 ptr := v_0.Args[0]
6627 mem := v_1
6628 if !(isU32Bit(off + off2)) {
6629 break
6630 }
6631 v.reset(OpWasmI64Load8S)
6632 v.AuxInt = int64ToAuxInt(off + off2)
6633 v.AddArg2(ptr, mem)
6634 return true
6635 }
6636
6637
6638
6639 for {
6640 off := auxIntToInt64(v.AuxInt)
6641 if v_0.Op != OpWasmLoweredAddr {
6642 break
6643 }
6644 off2 := auxIntToInt32(v_0.AuxInt)
6645 sym := auxToSym(v_0.Aux)
6646 v_0_0 := v_0.Args[0]
6647 if v_0_0.Op != OpSB || !(symIsRO(sym) && isU32Bit(off+int64(off2))) {
6648 break
6649 }
6650 v.reset(OpWasmI64Const)
6651 v.AuxInt = int64ToAuxInt(int64(int8(read8(sym, off+int64(off2)))))
6652 return true
6653 }
6654 return false
6655 }
6656 func rewriteValueWasm_OpWasmI64Load8U(v *Value) bool {
6657 v_1 := v.Args[1]
6658 v_0 := v.Args[0]
6659
6660
6661
6662 for {
6663 off := auxIntToInt64(v.AuxInt)
6664 if v_0.Op != OpWasmI64AddConst {
6665 break
6666 }
6667 off2 := auxIntToInt64(v_0.AuxInt)
6668 ptr := v_0.Args[0]
6669 mem := v_1
6670 if !(isU32Bit(off + off2)) {
6671 break
6672 }
6673 v.reset(OpWasmI64Load8U)
6674 v.AuxInt = int64ToAuxInt(off + off2)
6675 v.AddArg2(ptr, mem)
6676 return true
6677 }
6678
6679
6680
6681 for {
6682 off := auxIntToInt64(v.AuxInt)
6683 if v_0.Op != OpWasmLoweredAddr {
6684 break
6685 }
6686 off2 := auxIntToInt32(v_0.AuxInt)
6687 sym := auxToSym(v_0.Aux)
6688 v_0_0 := v_0.Args[0]
6689 if v_0_0.Op != OpSB || !(symIsRO(sym) && isU32Bit(off+int64(off2))) {
6690 break
6691 }
6692 v.reset(OpWasmI64Const)
6693 v.AuxInt = int64ToAuxInt(int64(read8(sym, off+int64(off2))))
6694 return true
6695 }
6696 return false
6697 }
6698 func rewriteValueWasm_OpWasmI64LtU(v *Value) bool {
6699 v_1 := v.Args[1]
6700 v_0 := v.Args[0]
6701 b := v.Block
6702 typ := &b.Func.Config.Types
6703
6704
6705 for {
6706 if v_0.Op != OpWasmI64Const || auxIntToInt64(v_0.AuxInt) != 0 {
6707 break
6708 }
6709 x := v_1
6710 v.reset(OpWasmI64Eqz)
6711 v0 := b.NewValue0(v.Pos, OpWasmI64Eqz, typ.Bool)
6712 v0.AddArg(x)
6713 v.AddArg(v0)
6714 return true
6715 }
6716
6717
6718 for {
6719 x := v_0
6720 if v_1.Op != OpWasmI64Const || auxIntToInt64(v_1.AuxInt) != 1 {
6721 break
6722 }
6723 v.reset(OpWasmI64Eqz)
6724 v.AddArg(x)
6725 return true
6726 }
6727 return false
6728 }
6729 func rewriteValueWasm_OpWasmI64Mul(v *Value) bool {
6730 v_1 := v.Args[1]
6731 v_0 := v.Args[0]
6732 b := v.Block
6733 typ := &b.Func.Config.Types
6734
6735
6736 for {
6737 if v_0.Op != OpWasmI64Const {
6738 break
6739 }
6740 x := auxIntToInt64(v_0.AuxInt)
6741 if v_1.Op != OpWasmI64Const {
6742 break
6743 }
6744 y := auxIntToInt64(v_1.AuxInt)
6745 v.reset(OpWasmI64Const)
6746 v.AuxInt = int64ToAuxInt(x * y)
6747 return true
6748 }
6749
6750
6751 for {
6752 if v_1.Op != OpWasmI64Const || auxIntToInt64(v_1.AuxInt) != 0 {
6753 break
6754 }
6755 v.reset(OpWasmI64Const)
6756 v.AuxInt = int64ToAuxInt(0)
6757 return true
6758 }
6759
6760
6761 for {
6762 x := v_0
6763 if v_1.Op != OpWasmI64Const || auxIntToInt64(v_1.AuxInt) != 1 {
6764 break
6765 }
6766 v.copyOf(x)
6767 return true
6768 }
6769
6770
6771
6772 for {
6773 if v_0.Op != OpWasmI64Const {
6774 break
6775 }
6776 x := auxIntToInt64(v_0.AuxInt)
6777 y := v_1
6778 if !(y.Op != OpWasmI64Const) {
6779 break
6780 }
6781 v.reset(OpWasmI64Mul)
6782 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
6783 v0.AuxInt = int64ToAuxInt(x)
6784 v.AddArg2(y, v0)
6785 return true
6786 }
6787 return false
6788 }
6789 func rewriteValueWasm_OpWasmI64Ne(v *Value) bool {
6790 v_1 := v.Args[1]
6791 v_0 := v.Args[0]
6792 b := v.Block
6793 typ := &b.Func.Config.Types
6794
6795
6796
6797 for {
6798 if v_0.Op != OpWasmI64Const {
6799 break
6800 }
6801 x := auxIntToInt64(v_0.AuxInt)
6802 if v_1.Op != OpWasmI64Const {
6803 break
6804 }
6805 y := auxIntToInt64(v_1.AuxInt)
6806 if !(x == y) {
6807 break
6808 }
6809 v.reset(OpWasmI64Const)
6810 v.AuxInt = int64ToAuxInt(0)
6811 return true
6812 }
6813
6814
6815
6816 for {
6817 if v_0.Op != OpWasmI64Const {
6818 break
6819 }
6820 x := auxIntToInt64(v_0.AuxInt)
6821 if v_1.Op != OpWasmI64Const {
6822 break
6823 }
6824 y := auxIntToInt64(v_1.AuxInt)
6825 if !(x != y) {
6826 break
6827 }
6828 v.reset(OpWasmI64Const)
6829 v.AuxInt = int64ToAuxInt(1)
6830 return true
6831 }
6832
6833
6834
6835 for {
6836 if v_0.Op != OpWasmI64Const {
6837 break
6838 }
6839 x := auxIntToInt64(v_0.AuxInt)
6840 y := v_1
6841 if !(y.Op != OpWasmI64Const) {
6842 break
6843 }
6844 v.reset(OpWasmI64Ne)
6845 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
6846 v0.AuxInt = int64ToAuxInt(x)
6847 v.AddArg2(y, v0)
6848 return true
6849 }
6850
6851
6852 for {
6853 x := v_0
6854 if v_1.Op != OpWasmI64Const || auxIntToInt64(v_1.AuxInt) != 0 {
6855 break
6856 }
6857 v.reset(OpWasmI64Eqz)
6858 v0 := b.NewValue0(v.Pos, OpWasmI64Eqz, typ.Bool)
6859 v0.AddArg(x)
6860 v.AddArg(v0)
6861 return true
6862 }
6863 return false
6864 }
6865 func rewriteValueWasm_OpWasmI64Or(v *Value) bool {
6866 v_1 := v.Args[1]
6867 v_0 := v.Args[0]
6868 b := v.Block
6869 typ := &b.Func.Config.Types
6870
6871
6872 for {
6873 if v_0.Op != OpWasmI64Const {
6874 break
6875 }
6876 x := auxIntToInt64(v_0.AuxInt)
6877 if v_1.Op != OpWasmI64Const {
6878 break
6879 }
6880 y := auxIntToInt64(v_1.AuxInt)
6881 v.reset(OpWasmI64Const)
6882 v.AuxInt = int64ToAuxInt(x | y)
6883 return true
6884 }
6885
6886
6887 for {
6888 x := v_0
6889 if v_1.Op != OpWasmI64Const || auxIntToInt64(v_1.AuxInt) != 0 {
6890 break
6891 }
6892 v.copyOf(x)
6893 return true
6894 }
6895
6896
6897 for {
6898 if v_1.Op != OpWasmI64Const || auxIntToInt64(v_1.AuxInt) != -1 {
6899 break
6900 }
6901 v.reset(OpWasmI64Const)
6902 v.AuxInt = int64ToAuxInt(-1)
6903 return true
6904 }
6905
6906
6907
6908 for {
6909 if v_0.Op != OpWasmI64Const {
6910 break
6911 }
6912 x := auxIntToInt64(v_0.AuxInt)
6913 y := v_1
6914 if !(y.Op != OpWasmI64Const) {
6915 break
6916 }
6917 v.reset(OpWasmI64Or)
6918 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
6919 v0.AuxInt = int64ToAuxInt(x)
6920 v.AddArg2(y, v0)
6921 return true
6922 }
6923 return false
6924 }
6925 func rewriteValueWasm_OpWasmI64Shl(v *Value) bool {
6926 v_1 := v.Args[1]
6927 v_0 := v.Args[0]
6928
6929
6930 for {
6931 if v_0.Op != OpWasmI64Const {
6932 break
6933 }
6934 x := auxIntToInt64(v_0.AuxInt)
6935 if v_1.Op != OpWasmI64Const {
6936 break
6937 }
6938 y := auxIntToInt64(v_1.AuxInt)
6939 v.reset(OpWasmI64Const)
6940 v.AuxInt = int64ToAuxInt(x << uint64(y))
6941 return true
6942 }
6943 return false
6944 }
6945 func rewriteValueWasm_OpWasmI64ShrS(v *Value) bool {
6946 v_1 := v.Args[1]
6947 v_0 := v.Args[0]
6948
6949
6950 for {
6951 if v_0.Op != OpWasmI64Const {
6952 break
6953 }
6954 x := auxIntToInt64(v_0.AuxInt)
6955 if v_1.Op != OpWasmI64Const {
6956 break
6957 }
6958 y := auxIntToInt64(v_1.AuxInt)
6959 v.reset(OpWasmI64Const)
6960 v.AuxInt = int64ToAuxInt(x >> uint64(y))
6961 return true
6962 }
6963 return false
6964 }
6965 func rewriteValueWasm_OpWasmI64ShrU(v *Value) bool {
6966 v_1 := v.Args[1]
6967 v_0 := v.Args[0]
6968
6969
6970 for {
6971 if v_0.Op != OpWasmI64Const {
6972 break
6973 }
6974 x := auxIntToInt64(v_0.AuxInt)
6975 if v_1.Op != OpWasmI64Const {
6976 break
6977 }
6978 y := auxIntToInt64(v_1.AuxInt)
6979 v.reset(OpWasmI64Const)
6980 v.AuxInt = int64ToAuxInt(int64(uint64(x) >> uint64(y)))
6981 return true
6982 }
6983 return false
6984 }
6985 func rewriteValueWasm_OpWasmI64Store(v *Value) bool {
6986 v_2 := v.Args[2]
6987 v_1 := v.Args[1]
6988 v_0 := v.Args[0]
6989
6990
6991
6992 for {
6993 off := auxIntToInt64(v.AuxInt)
6994 if v_0.Op != OpWasmI64AddConst {
6995 break
6996 }
6997 off2 := auxIntToInt64(v_0.AuxInt)
6998 ptr := v_0.Args[0]
6999 val := v_1
7000 mem := v_2
7001 if !(isU32Bit(off + off2)) {
7002 break
7003 }
7004 v.reset(OpWasmI64Store)
7005 v.AuxInt = int64ToAuxInt(off + off2)
7006 v.AddArg3(ptr, val, mem)
7007 return true
7008 }
7009 return false
7010 }
7011 func rewriteValueWasm_OpWasmI64Store16(v *Value) bool {
7012 v_2 := v.Args[2]
7013 v_1 := v.Args[1]
7014 v_0 := v.Args[0]
7015
7016
7017
7018 for {
7019 off := auxIntToInt64(v.AuxInt)
7020 if v_0.Op != OpWasmI64AddConst {
7021 break
7022 }
7023 off2 := auxIntToInt64(v_0.AuxInt)
7024 ptr := v_0.Args[0]
7025 val := v_1
7026 mem := v_2
7027 if !(isU32Bit(off + off2)) {
7028 break
7029 }
7030 v.reset(OpWasmI64Store16)
7031 v.AuxInt = int64ToAuxInt(off + off2)
7032 v.AddArg3(ptr, val, mem)
7033 return true
7034 }
7035 return false
7036 }
7037 func rewriteValueWasm_OpWasmI64Store32(v *Value) bool {
7038 v_2 := v.Args[2]
7039 v_1 := v.Args[1]
7040 v_0 := v.Args[0]
7041
7042
7043
7044 for {
7045 off := auxIntToInt64(v.AuxInt)
7046 if v_0.Op != OpWasmI64AddConst {
7047 break
7048 }
7049 off2 := auxIntToInt64(v_0.AuxInt)
7050 ptr := v_0.Args[0]
7051 val := v_1
7052 mem := v_2
7053 if !(isU32Bit(off + off2)) {
7054 break
7055 }
7056 v.reset(OpWasmI64Store32)
7057 v.AuxInt = int64ToAuxInt(off + off2)
7058 v.AddArg3(ptr, val, mem)
7059 return true
7060 }
7061 return false
7062 }
7063 func rewriteValueWasm_OpWasmI64Store8(v *Value) bool {
7064 v_2 := v.Args[2]
7065 v_1 := v.Args[1]
7066 v_0 := v.Args[0]
7067
7068
7069
7070 for {
7071 off := auxIntToInt64(v.AuxInt)
7072 if v_0.Op != OpWasmI64AddConst {
7073 break
7074 }
7075 off2 := auxIntToInt64(v_0.AuxInt)
7076 ptr := v_0.Args[0]
7077 val := v_1
7078 mem := v_2
7079 if !(isU32Bit(off + off2)) {
7080 break
7081 }
7082 v.reset(OpWasmI64Store8)
7083 v.AuxInt = int64ToAuxInt(off + off2)
7084 v.AddArg3(ptr, val, mem)
7085 return true
7086 }
7087 return false
7088 }
7089 func rewriteValueWasm_OpWasmI64Sub(v *Value) bool {
7090 v_1 := v.Args[1]
7091 v_0 := v.Args[0]
7092
7093
7094 for {
7095 if v_0.Op != OpWasmI64Const {
7096 break
7097 }
7098 x := auxIntToInt64(v_0.AuxInt)
7099 if v_1.Op != OpWasmI64Const {
7100 break
7101 }
7102 y := auxIntToInt64(v_1.AuxInt)
7103 v.reset(OpWasmI64Const)
7104 v.AuxInt = int64ToAuxInt(x - y)
7105 return true
7106 }
7107 return false
7108 }
7109 func rewriteValueWasm_OpWasmI64Xor(v *Value) bool {
7110 v_1 := v.Args[1]
7111 v_0 := v.Args[0]
7112 b := v.Block
7113 typ := &b.Func.Config.Types
7114
7115
7116 for {
7117 if v_0.Op != OpWasmI64Const {
7118 break
7119 }
7120 x := auxIntToInt64(v_0.AuxInt)
7121 if v_1.Op != OpWasmI64Const {
7122 break
7123 }
7124 y := auxIntToInt64(v_1.AuxInt)
7125 v.reset(OpWasmI64Const)
7126 v.AuxInt = int64ToAuxInt(x ^ y)
7127 return true
7128 }
7129
7130
7131 for {
7132 x := v_0
7133 if v_1.Op != OpWasmI64Const || auxIntToInt64(v_1.AuxInt) != 0 {
7134 break
7135 }
7136 v.copyOf(x)
7137 return true
7138 }
7139
7140
7141
7142 for {
7143 if v_0.Op != OpWasmI64Const {
7144 break
7145 }
7146 x := auxIntToInt64(v_0.AuxInt)
7147 y := v_1
7148 if !(y.Op != OpWasmI64Const) {
7149 break
7150 }
7151 v.reset(OpWasmI64Xor)
7152 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
7153 v0.AuxInt = int64ToAuxInt(x)
7154 v.AddArg2(y, v0)
7155 return true
7156 }
7157 return false
7158 }
7159 func rewriteValueWasm_OpZero(v *Value) bool {
7160 v_1 := v.Args[1]
7161 v_0 := v.Args[0]
7162 b := v.Block
7163 typ := &b.Func.Config.Types
7164
7165
7166 for {
7167 if auxIntToInt64(v.AuxInt) != 0 {
7168 break
7169 }
7170 mem := v_1
7171 v.copyOf(mem)
7172 return true
7173 }
7174
7175
7176 for {
7177 if auxIntToInt64(v.AuxInt) != 1 {
7178 break
7179 }
7180 destptr := v_0
7181 mem := v_1
7182 v.reset(OpWasmI64Store8)
7183 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
7184 v0.AuxInt = int64ToAuxInt(0)
7185 v.AddArg3(destptr, v0, mem)
7186 return true
7187 }
7188
7189
7190 for {
7191 if auxIntToInt64(v.AuxInt) != 2 {
7192 break
7193 }
7194 destptr := v_0
7195 mem := v_1
7196 v.reset(OpWasmI64Store16)
7197 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
7198 v0.AuxInt = int64ToAuxInt(0)
7199 v.AddArg3(destptr, v0, mem)
7200 return true
7201 }
7202
7203
7204 for {
7205 if auxIntToInt64(v.AuxInt) != 4 {
7206 break
7207 }
7208 destptr := v_0
7209 mem := v_1
7210 v.reset(OpWasmI64Store32)
7211 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
7212 v0.AuxInt = int64ToAuxInt(0)
7213 v.AddArg3(destptr, v0, mem)
7214 return true
7215 }
7216
7217
7218 for {
7219 if auxIntToInt64(v.AuxInt) != 8 {
7220 break
7221 }
7222 destptr := v_0
7223 mem := v_1
7224 v.reset(OpWasmI64Store)
7225 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
7226 v0.AuxInt = int64ToAuxInt(0)
7227 v.AddArg3(destptr, v0, mem)
7228 return true
7229 }
7230
7231
7232 for {
7233 if auxIntToInt64(v.AuxInt) != 3 {
7234 break
7235 }
7236 destptr := v_0
7237 mem := v_1
7238 v.reset(OpWasmI64Store8)
7239 v.AuxInt = int64ToAuxInt(2)
7240 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
7241 v0.AuxInt = int64ToAuxInt(0)
7242 v1 := b.NewValue0(v.Pos, OpWasmI64Store16, types.TypeMem)
7243 v1.AddArg3(destptr, v0, mem)
7244 v.AddArg3(destptr, v0, v1)
7245 return true
7246 }
7247
7248
7249 for {
7250 if auxIntToInt64(v.AuxInt) != 5 {
7251 break
7252 }
7253 destptr := v_0
7254 mem := v_1
7255 v.reset(OpWasmI64Store8)
7256 v.AuxInt = int64ToAuxInt(4)
7257 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
7258 v0.AuxInt = int64ToAuxInt(0)
7259 v1 := b.NewValue0(v.Pos, OpWasmI64Store32, types.TypeMem)
7260 v1.AddArg3(destptr, v0, mem)
7261 v.AddArg3(destptr, v0, v1)
7262 return true
7263 }
7264
7265
7266 for {
7267 if auxIntToInt64(v.AuxInt) != 6 {
7268 break
7269 }
7270 destptr := v_0
7271 mem := v_1
7272 v.reset(OpWasmI64Store16)
7273 v.AuxInt = int64ToAuxInt(4)
7274 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
7275 v0.AuxInt = int64ToAuxInt(0)
7276 v1 := b.NewValue0(v.Pos, OpWasmI64Store32, types.TypeMem)
7277 v1.AddArg3(destptr, v0, mem)
7278 v.AddArg3(destptr, v0, v1)
7279 return true
7280 }
7281
7282
7283 for {
7284 if auxIntToInt64(v.AuxInt) != 7 {
7285 break
7286 }
7287 destptr := v_0
7288 mem := v_1
7289 v.reset(OpWasmI64Store32)
7290 v.AuxInt = int64ToAuxInt(3)
7291 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
7292 v0.AuxInt = int64ToAuxInt(0)
7293 v1 := b.NewValue0(v.Pos, OpWasmI64Store32, types.TypeMem)
7294 v1.AddArg3(destptr, v0, mem)
7295 v.AddArg3(destptr, v0, v1)
7296 return true
7297 }
7298
7299
7300
7301 for {
7302 s := auxIntToInt64(v.AuxInt)
7303 destptr := v_0
7304 mem := v_1
7305 if !(s%8 != 0 && s > 8 && s < 32) {
7306 break
7307 }
7308 v.reset(OpZero)
7309 v.AuxInt = int64ToAuxInt(s - s%8)
7310 v0 := b.NewValue0(v.Pos, OpOffPtr, destptr.Type)
7311 v0.AuxInt = int64ToAuxInt(s % 8)
7312 v0.AddArg(destptr)
7313 v1 := b.NewValue0(v.Pos, OpWasmI64Store, types.TypeMem)
7314 v2 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
7315 v2.AuxInt = int64ToAuxInt(0)
7316 v1.AddArg3(destptr, v2, mem)
7317 v.AddArg2(v0, v1)
7318 return true
7319 }
7320
7321
7322 for {
7323 if auxIntToInt64(v.AuxInt) != 16 {
7324 break
7325 }
7326 destptr := v_0
7327 mem := v_1
7328 v.reset(OpWasmI64Store)
7329 v.AuxInt = int64ToAuxInt(8)
7330 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
7331 v0.AuxInt = int64ToAuxInt(0)
7332 v1 := b.NewValue0(v.Pos, OpWasmI64Store, types.TypeMem)
7333 v1.AddArg3(destptr, v0, mem)
7334 v.AddArg3(destptr, v0, v1)
7335 return true
7336 }
7337
7338
7339 for {
7340 if auxIntToInt64(v.AuxInt) != 24 {
7341 break
7342 }
7343 destptr := v_0
7344 mem := v_1
7345 v.reset(OpWasmI64Store)
7346 v.AuxInt = int64ToAuxInt(16)
7347 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
7348 v0.AuxInt = int64ToAuxInt(0)
7349 v1 := b.NewValue0(v.Pos, OpWasmI64Store, types.TypeMem)
7350 v1.AuxInt = int64ToAuxInt(8)
7351 v2 := b.NewValue0(v.Pos, OpWasmI64Store, types.TypeMem)
7352 v2.AddArg3(destptr, v0, mem)
7353 v1.AddArg3(destptr, v0, v2)
7354 v.AddArg3(destptr, v0, v1)
7355 return true
7356 }
7357
7358
7359 for {
7360 if auxIntToInt64(v.AuxInt) != 32 {
7361 break
7362 }
7363 destptr := v_0
7364 mem := v_1
7365 v.reset(OpWasmI64Store)
7366 v.AuxInt = int64ToAuxInt(24)
7367 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
7368 v0.AuxInt = int64ToAuxInt(0)
7369 v1 := b.NewValue0(v.Pos, OpWasmI64Store, types.TypeMem)
7370 v1.AuxInt = int64ToAuxInt(16)
7371 v2 := b.NewValue0(v.Pos, OpWasmI64Store, types.TypeMem)
7372 v2.AuxInt = int64ToAuxInt(8)
7373 v3 := b.NewValue0(v.Pos, OpWasmI64Store, types.TypeMem)
7374 v3.AddArg3(destptr, v0, mem)
7375 v2.AddArg3(destptr, v0, v3)
7376 v1.AddArg3(destptr, v0, v2)
7377 v.AddArg3(destptr, v0, v1)
7378 return true
7379 }
7380
7381
7382 for {
7383 s := auxIntToInt64(v.AuxInt)
7384 destptr := v_0
7385 mem := v_1
7386 v.reset(OpWasmLoweredZero)
7387 v.AuxInt = int64ToAuxInt(s)
7388 v.AddArg2(destptr, mem)
7389 return true
7390 }
7391 }
7392 func rewriteValueWasm_OpZeroExt16to32(v *Value) bool {
7393 v_0 := v.Args[0]
7394 b := v.Block
7395 typ := &b.Func.Config.Types
7396
7397
7398 for {
7399 x := v_0
7400 if x.Op != OpWasmI64Load16U {
7401 break
7402 }
7403 v.copyOf(x)
7404 return true
7405 }
7406
7407
7408 for {
7409 x := v_0
7410 v.reset(OpWasmI64And)
7411 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
7412 v0.AuxInt = int64ToAuxInt(0xffff)
7413 v.AddArg2(x, v0)
7414 return true
7415 }
7416 }
7417 func rewriteValueWasm_OpZeroExt16to64(v *Value) bool {
7418 v_0 := v.Args[0]
7419 b := v.Block
7420 typ := &b.Func.Config.Types
7421
7422
7423 for {
7424 x := v_0
7425 if x.Op != OpWasmI64Load16U {
7426 break
7427 }
7428 v.copyOf(x)
7429 return true
7430 }
7431
7432
7433 for {
7434 x := v_0
7435 v.reset(OpWasmI64And)
7436 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
7437 v0.AuxInt = int64ToAuxInt(0xffff)
7438 v.AddArg2(x, v0)
7439 return true
7440 }
7441 }
7442 func rewriteValueWasm_OpZeroExt32to64(v *Value) bool {
7443 v_0 := v.Args[0]
7444 b := v.Block
7445 typ := &b.Func.Config.Types
7446
7447
7448 for {
7449 x := v_0
7450 if x.Op != OpWasmI64Load32U {
7451 break
7452 }
7453 v.copyOf(x)
7454 return true
7455 }
7456
7457
7458 for {
7459 x := v_0
7460 v.reset(OpWasmI64And)
7461 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
7462 v0.AuxInt = int64ToAuxInt(0xffffffff)
7463 v.AddArg2(x, v0)
7464 return true
7465 }
7466 }
7467 func rewriteValueWasm_OpZeroExt8to16(v *Value) bool {
7468 v_0 := v.Args[0]
7469 b := v.Block
7470 typ := &b.Func.Config.Types
7471
7472
7473 for {
7474 x := v_0
7475 if x.Op != OpWasmI64Load8U {
7476 break
7477 }
7478 v.copyOf(x)
7479 return true
7480 }
7481
7482
7483 for {
7484 x := v_0
7485 v.reset(OpWasmI64And)
7486 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
7487 v0.AuxInt = int64ToAuxInt(0xff)
7488 v.AddArg2(x, v0)
7489 return true
7490 }
7491 }
7492 func rewriteValueWasm_OpZeroExt8to32(v *Value) bool {
7493 v_0 := v.Args[0]
7494 b := v.Block
7495 typ := &b.Func.Config.Types
7496
7497
7498 for {
7499 x := v_0
7500 if x.Op != OpWasmI64Load8U {
7501 break
7502 }
7503 v.copyOf(x)
7504 return true
7505 }
7506
7507
7508 for {
7509 x := v_0
7510 v.reset(OpWasmI64And)
7511 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
7512 v0.AuxInt = int64ToAuxInt(0xff)
7513 v.AddArg2(x, v0)
7514 return true
7515 }
7516 }
7517 func rewriteValueWasm_OpZeroExt8to64(v *Value) bool {
7518 v_0 := v.Args[0]
7519 b := v.Block
7520 typ := &b.Func.Config.Types
7521
7522
7523 for {
7524 x := v_0
7525 if x.Op != OpWasmI64Load8U {
7526 break
7527 }
7528 v.copyOf(x)
7529 return true
7530 }
7531
7532
7533 for {
7534 x := v_0
7535 v.reset(OpWasmI64And)
7536 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
7537 v0.AuxInt = int64ToAuxInt(0xff)
7538 v.AddArg2(x, v0)
7539 return true
7540 }
7541 }
7542 func rewriteValueWasm_OpZeroSIMD(v *Value) bool {
7543
7544
7545 for {
7546 t := v.Type
7547 v.reset(OpWasmV128Zero)
7548 v.Type = t
7549 return true
7550 }
7551 }
7552 func rewriteBlockWasm(b *Block) bool {
7553 return false
7554 }
7555
View as plain text