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 v.Op = OpWasmV128Zero
1457 return true
1458 }
1459 return false
1460 }
1461 func rewriteValueWasm_OpAddr(v *Value) bool {
1462 v_0 := v.Args[0]
1463
1464
1465 for {
1466 sym := auxToSym(v.Aux)
1467 base := v_0
1468 v.reset(OpWasmLoweredAddr)
1469 v.AuxInt = int32ToAuxInt(0)
1470 v.Aux = symToAux(sym)
1471 v.AddArg(base)
1472 return true
1473 }
1474 }
1475 func rewriteValueWasm_OpAvg64u(v *Value) bool {
1476 v_1 := v.Args[1]
1477 v_0 := v.Args[0]
1478 b := v.Block
1479 typ := &b.Func.Config.Types
1480
1481
1482 for {
1483 x := v_0
1484 y := v_1
1485 v.reset(OpWasmI64Add)
1486 v0 := b.NewValue0(v.Pos, OpWasmI64ShrU, typ.Int64)
1487 v1 := b.NewValue0(v.Pos, OpWasmI64Sub, typ.Int64)
1488 v1.AddArg2(x, y)
1489 v2 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
1490 v2.AuxInt = int64ToAuxInt(1)
1491 v0.AddArg2(v1, v2)
1492 v.AddArg2(v0, y)
1493 return true
1494 }
1495 }
1496 func rewriteValueWasm_OpBitLen16(v *Value) bool {
1497 v_0 := v.Args[0]
1498 b := v.Block
1499 typ := &b.Func.Config.Types
1500
1501
1502 for {
1503 x := v_0
1504 v.reset(OpBitLen64)
1505 v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
1506 v0.AddArg(x)
1507 v.AddArg(v0)
1508 return true
1509 }
1510 }
1511 func rewriteValueWasm_OpBitLen32(v *Value) bool {
1512 v_0 := v.Args[0]
1513 b := v.Block
1514 typ := &b.Func.Config.Types
1515
1516
1517 for {
1518 x := v_0
1519 v.reset(OpBitLen64)
1520 v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
1521 v0.AddArg(x)
1522 v.AddArg(v0)
1523 return true
1524 }
1525 }
1526 func rewriteValueWasm_OpBitLen64(v *Value) bool {
1527 v_0 := v.Args[0]
1528 b := v.Block
1529 typ := &b.Func.Config.Types
1530
1531
1532 for {
1533 x := v_0
1534 v.reset(OpWasmI64Sub)
1535 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
1536 v0.AuxInt = int64ToAuxInt(64)
1537 v1 := b.NewValue0(v.Pos, OpWasmI64Clz, typ.Int64)
1538 v1.AddArg(x)
1539 v.AddArg2(v0, v1)
1540 return true
1541 }
1542 }
1543 func rewriteValueWasm_OpBitLen8(v *Value) bool {
1544 v_0 := v.Args[0]
1545 b := v.Block
1546 typ := &b.Func.Config.Types
1547
1548
1549 for {
1550 x := v_0
1551 v.reset(OpBitLen64)
1552 v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
1553 v0.AddArg(x)
1554 v.AddArg(v0)
1555 return true
1556 }
1557 }
1558 func rewriteValueWasm_OpCom16(v *Value) bool {
1559 v_0 := v.Args[0]
1560 b := v.Block
1561 typ := &b.Func.Config.Types
1562
1563
1564 for {
1565 x := v_0
1566 v.reset(OpWasmI64Xor)
1567 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
1568 v0.AuxInt = int64ToAuxInt(-1)
1569 v.AddArg2(x, v0)
1570 return true
1571 }
1572 }
1573 func rewriteValueWasm_OpCom32(v *Value) bool {
1574 v_0 := v.Args[0]
1575 b := v.Block
1576 typ := &b.Func.Config.Types
1577
1578
1579 for {
1580 x := v_0
1581 v.reset(OpWasmI64Xor)
1582 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
1583 v0.AuxInt = int64ToAuxInt(-1)
1584 v.AddArg2(x, v0)
1585 return true
1586 }
1587 }
1588 func rewriteValueWasm_OpCom64(v *Value) bool {
1589 v_0 := v.Args[0]
1590 b := v.Block
1591 typ := &b.Func.Config.Types
1592
1593
1594 for {
1595 x := v_0
1596 v.reset(OpWasmI64Xor)
1597 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
1598 v0.AuxInt = int64ToAuxInt(-1)
1599 v.AddArg2(x, v0)
1600 return true
1601 }
1602 }
1603 func rewriteValueWasm_OpCom8(v *Value) bool {
1604 v_0 := v.Args[0]
1605 b := v.Block
1606 typ := &b.Func.Config.Types
1607
1608
1609 for {
1610 x := v_0
1611 v.reset(OpWasmI64Xor)
1612 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
1613 v0.AuxInt = int64ToAuxInt(-1)
1614 v.AddArg2(x, v0)
1615 return true
1616 }
1617 }
1618 func rewriteValueWasm_OpConst16(v *Value) bool {
1619
1620
1621 for {
1622 c := auxIntToInt16(v.AuxInt)
1623 v.reset(OpWasmI64Const)
1624 v.AuxInt = int64ToAuxInt(int64(c))
1625 return true
1626 }
1627 }
1628 func rewriteValueWasm_OpConst32(v *Value) bool {
1629
1630
1631 for {
1632 c := auxIntToInt32(v.AuxInt)
1633 v.reset(OpWasmI64Const)
1634 v.AuxInt = int64ToAuxInt(int64(c))
1635 return true
1636 }
1637 }
1638 func rewriteValueWasm_OpConst8(v *Value) bool {
1639
1640
1641 for {
1642 c := auxIntToInt8(v.AuxInt)
1643 v.reset(OpWasmI64Const)
1644 v.AuxInt = int64ToAuxInt(int64(c))
1645 return true
1646 }
1647 }
1648 func rewriteValueWasm_OpConstBool(v *Value) bool {
1649
1650
1651 for {
1652 c := auxIntToBool(v.AuxInt)
1653 v.reset(OpWasmI64Const)
1654 v.AuxInt = int64ToAuxInt(b2i(c))
1655 return true
1656 }
1657 }
1658 func rewriteValueWasm_OpConstNil(v *Value) bool {
1659
1660
1661 for {
1662 v.reset(OpWasmI64Const)
1663 v.AuxInt = int64ToAuxInt(0)
1664 return true
1665 }
1666 }
1667 func rewriteValueWasm_OpCtz16(v *Value) bool {
1668 v_0 := v.Args[0]
1669 b := v.Block
1670 typ := &b.Func.Config.Types
1671
1672
1673 for {
1674 x := v_0
1675 v.reset(OpWasmI64Ctz)
1676 v0 := b.NewValue0(v.Pos, OpWasmI64Or, typ.Int64)
1677 v1 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
1678 v1.AuxInt = int64ToAuxInt(0x10000)
1679 v0.AddArg2(x, v1)
1680 v.AddArg(v0)
1681 return true
1682 }
1683 }
1684 func rewriteValueWasm_OpCtz32(v *Value) bool {
1685 v_0 := v.Args[0]
1686 b := v.Block
1687 typ := &b.Func.Config.Types
1688
1689
1690 for {
1691 x := v_0
1692 v.reset(OpWasmI64Ctz)
1693 v0 := b.NewValue0(v.Pos, OpWasmI64Or, typ.Int64)
1694 v1 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
1695 v1.AuxInt = int64ToAuxInt(0x100000000)
1696 v0.AddArg2(x, v1)
1697 v.AddArg(v0)
1698 return true
1699 }
1700 }
1701 func rewriteValueWasm_OpCtz8(v *Value) bool {
1702 v_0 := v.Args[0]
1703 b := v.Block
1704 typ := &b.Func.Config.Types
1705
1706
1707 for {
1708 x := v_0
1709 v.reset(OpWasmI64Ctz)
1710 v0 := b.NewValue0(v.Pos, OpWasmI64Or, typ.Int64)
1711 v1 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
1712 v1.AuxInt = int64ToAuxInt(0x100)
1713 v0.AddArg2(x, v1)
1714 v.AddArg(v0)
1715 return true
1716 }
1717 }
1718 func rewriteValueWasm_OpCvt32Uto32F(v *Value) bool {
1719 v_0 := v.Args[0]
1720 b := v.Block
1721 typ := &b.Func.Config.Types
1722
1723
1724 for {
1725 x := v_0
1726 v.reset(OpWasmF32ConvertI64U)
1727 v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
1728 v0.AddArg(x)
1729 v.AddArg(v0)
1730 return true
1731 }
1732 }
1733 func rewriteValueWasm_OpCvt32Uto64F(v *Value) bool {
1734 v_0 := v.Args[0]
1735 b := v.Block
1736 typ := &b.Func.Config.Types
1737
1738
1739 for {
1740 x := v_0
1741 v.reset(OpWasmF64ConvertI64U)
1742 v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
1743 v0.AddArg(x)
1744 v.AddArg(v0)
1745 return true
1746 }
1747 }
1748 func rewriteValueWasm_OpCvt32to32F(v *Value) bool {
1749 v_0 := v.Args[0]
1750 b := v.Block
1751 typ := &b.Func.Config.Types
1752
1753
1754 for {
1755 x := v_0
1756 v.reset(OpWasmF32ConvertI64S)
1757 v0 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
1758 v0.AddArg(x)
1759 v.AddArg(v0)
1760 return true
1761 }
1762 }
1763 func rewriteValueWasm_OpCvt32to64F(v *Value) bool {
1764 v_0 := v.Args[0]
1765 b := v.Block
1766 typ := &b.Func.Config.Types
1767
1768
1769 for {
1770 x := v_0
1771 v.reset(OpWasmF64ConvertI64S)
1772 v0 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
1773 v0.AddArg(x)
1774 v.AddArg(v0)
1775 return true
1776 }
1777 }
1778 func rewriteValueWasm_OpDiv16(v *Value) bool {
1779 v_1 := v.Args[1]
1780 v_0 := v.Args[0]
1781 b := v.Block
1782 typ := &b.Func.Config.Types
1783
1784
1785 for {
1786 if auxIntToBool(v.AuxInt) != false {
1787 break
1788 }
1789 x := v_0
1790 y := v_1
1791 v.reset(OpWasmI64DivS)
1792 v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
1793 v0.AddArg(x)
1794 v1 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
1795 v1.AddArg(y)
1796 v.AddArg2(v0, v1)
1797 return true
1798 }
1799 return false
1800 }
1801 func rewriteValueWasm_OpDiv16u(v *Value) bool {
1802 v_1 := v.Args[1]
1803 v_0 := v.Args[0]
1804 b := v.Block
1805 typ := &b.Func.Config.Types
1806
1807
1808 for {
1809 x := v_0
1810 y := v_1
1811 v.reset(OpWasmI64DivU)
1812 v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
1813 v0.AddArg(x)
1814 v1 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
1815 v1.AddArg(y)
1816 v.AddArg2(v0, v1)
1817 return true
1818 }
1819 }
1820 func rewriteValueWasm_OpDiv32(v *Value) bool {
1821 v_1 := v.Args[1]
1822 v_0 := v.Args[0]
1823 b := v.Block
1824 typ := &b.Func.Config.Types
1825
1826
1827 for {
1828 if auxIntToBool(v.AuxInt) != false {
1829 break
1830 }
1831 x := v_0
1832 y := v_1
1833 v.reset(OpWasmI64DivS)
1834 v0 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
1835 v0.AddArg(x)
1836 v1 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
1837 v1.AddArg(y)
1838 v.AddArg2(v0, v1)
1839 return true
1840 }
1841 return false
1842 }
1843 func rewriteValueWasm_OpDiv32u(v *Value) bool {
1844 v_1 := v.Args[1]
1845 v_0 := v.Args[0]
1846 b := v.Block
1847 typ := &b.Func.Config.Types
1848
1849
1850 for {
1851 x := v_0
1852 y := v_1
1853 v.reset(OpWasmI64DivU)
1854 v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
1855 v0.AddArg(x)
1856 v1 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
1857 v1.AddArg(y)
1858 v.AddArg2(v0, v1)
1859 return true
1860 }
1861 }
1862 func rewriteValueWasm_OpDiv64(v *Value) bool {
1863 v_1 := v.Args[1]
1864 v_0 := v.Args[0]
1865
1866
1867 for {
1868 if auxIntToBool(v.AuxInt) != false {
1869 break
1870 }
1871 x := v_0
1872 y := v_1
1873 v.reset(OpWasmI64DivS)
1874 v.AddArg2(x, y)
1875 return true
1876 }
1877 return false
1878 }
1879 func rewriteValueWasm_OpDiv8(v *Value) bool {
1880 v_1 := v.Args[1]
1881 v_0 := v.Args[0]
1882 b := v.Block
1883 typ := &b.Func.Config.Types
1884
1885
1886 for {
1887 x := v_0
1888 y := v_1
1889 v.reset(OpWasmI64DivS)
1890 v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
1891 v0.AddArg(x)
1892 v1 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
1893 v1.AddArg(y)
1894 v.AddArg2(v0, v1)
1895 return true
1896 }
1897 }
1898 func rewriteValueWasm_OpDiv8u(v *Value) bool {
1899 v_1 := v.Args[1]
1900 v_0 := v.Args[0]
1901 b := v.Block
1902 typ := &b.Func.Config.Types
1903
1904
1905 for {
1906 x := v_0
1907 y := v_1
1908 v.reset(OpWasmI64DivU)
1909 v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
1910 v0.AddArg(x)
1911 v1 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
1912 v1.AddArg(y)
1913 v.AddArg2(v0, v1)
1914 return true
1915 }
1916 }
1917 func rewriteValueWasm_OpEq16(v *Value) bool {
1918 v_1 := v.Args[1]
1919 v_0 := v.Args[0]
1920 b := v.Block
1921 typ := &b.Func.Config.Types
1922
1923
1924 for {
1925 x := v_0
1926 y := v_1
1927 v.reset(OpWasmI64Eq)
1928 v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
1929 v0.AddArg(x)
1930 v1 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
1931 v1.AddArg(y)
1932 v.AddArg2(v0, v1)
1933 return true
1934 }
1935 }
1936 func rewriteValueWasm_OpEq32(v *Value) bool {
1937 v_1 := v.Args[1]
1938 v_0 := v.Args[0]
1939 b := v.Block
1940 typ := &b.Func.Config.Types
1941
1942
1943 for {
1944 x := v_0
1945 y := v_1
1946 v.reset(OpWasmI64Eq)
1947 v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
1948 v0.AddArg(x)
1949 v1 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
1950 v1.AddArg(y)
1951 v.AddArg2(v0, v1)
1952 return true
1953 }
1954 }
1955 func rewriteValueWasm_OpEq8(v *Value) bool {
1956 v_1 := v.Args[1]
1957 v_0 := v.Args[0]
1958 b := v.Block
1959 typ := &b.Func.Config.Types
1960
1961
1962 for {
1963 x := v_0
1964 y := v_1
1965 v.reset(OpWasmI64Eq)
1966 v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
1967 v0.AddArg(x)
1968 v1 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
1969 v1.AddArg(y)
1970 v.AddArg2(v0, v1)
1971 return true
1972 }
1973 }
1974 func rewriteValueWasm_OpHmul64(v *Value) bool {
1975 v_1 := v.Args[1]
1976 v_0 := v.Args[0]
1977 b := v.Block
1978 typ := &b.Func.Config.Types
1979
1980
1981 for {
1982 t := v.Type
1983 x := v_0
1984 y := v_1
1985 v.reset(OpLast)
1986 v.Type = t
1987 x0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
1988 x0.AddArg(x)
1989 x1 := b.NewValue0(v.Pos, OpWasmI64ShrS, typ.Int64)
1990 v2 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
1991 v2.AuxInt = int64ToAuxInt(32)
1992 x1.AddArg2(x, v2)
1993 y0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
1994 y0.AddArg(y)
1995 y1 := b.NewValue0(v.Pos, OpWasmI64ShrS, typ.Int64)
1996 y1.AddArg2(y, v2)
1997 x0y0 := b.NewValue0(v.Pos, OpWasmI64Mul, typ.Int64)
1998 x0y0.AddArg2(x0, y0)
1999 tt := b.NewValue0(v.Pos, OpWasmI64Add, typ.Int64)
2000 v7 := b.NewValue0(v.Pos, OpWasmI64Mul, typ.Int64)
2001 v7.AddArg2(x1, y0)
2002 v8 := b.NewValue0(v.Pos, OpWasmI64ShrU, typ.Int64)
2003 v8.AddArg2(x0y0, v2)
2004 tt.AddArg2(v7, v8)
2005 w1 := b.NewValue0(v.Pos, OpWasmI64Add, typ.Int64)
2006 v10 := b.NewValue0(v.Pos, OpWasmI64Mul, typ.Int64)
2007 v10.AddArg2(x0, y1)
2008 v11 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
2009 v11.AddArg(tt)
2010 w1.AddArg2(v10, v11)
2011 w2 := b.NewValue0(v.Pos, OpWasmI64ShrS, typ.Int64)
2012 w2.AddArg2(tt, v2)
2013 v13 := b.NewValue0(v.Pos, OpWasmI64Add, typ.Int64)
2014 v14 := b.NewValue0(v.Pos, OpWasmI64Add, typ.Int64)
2015 v15 := b.NewValue0(v.Pos, OpWasmI64Mul, typ.Int64)
2016 v15.AddArg2(x1, y1)
2017 v14.AddArg2(v15, w2)
2018 v16 := b.NewValue0(v.Pos, OpWasmI64ShrS, typ.Int64)
2019 v16.AddArg2(w1, v2)
2020 v13.AddArg2(v14, v16)
2021 v.AddArgs(x0, x1, y0, y1, x0y0, tt, w1, w2, v13)
2022 return true
2023 }
2024 }
2025 func rewriteValueWasm_OpHmul64u(v *Value) bool {
2026 v_1 := v.Args[1]
2027 v_0 := v.Args[0]
2028 b := v.Block
2029 typ := &b.Func.Config.Types
2030
2031
2032 for {
2033 t := v.Type
2034 x := v_0
2035 y := v_1
2036 v.reset(OpLast)
2037 v.Type = t
2038 x0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
2039 x0.AddArg(x)
2040 x1 := b.NewValue0(v.Pos, OpWasmI64ShrU, typ.Int64)
2041 v2 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
2042 v2.AuxInt = int64ToAuxInt(32)
2043 x1.AddArg2(x, v2)
2044 y0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
2045 y0.AddArg(y)
2046 y1 := b.NewValue0(v.Pos, OpWasmI64ShrU, typ.Int64)
2047 y1.AddArg2(y, v2)
2048 w0 := b.NewValue0(v.Pos, OpWasmI64Mul, typ.Int64)
2049 w0.AddArg2(x0, y0)
2050 tt := b.NewValue0(v.Pos, OpWasmI64Add, typ.Int64)
2051 v7 := b.NewValue0(v.Pos, OpWasmI64Mul, typ.Int64)
2052 v7.AddArg2(x1, y0)
2053 v8 := b.NewValue0(v.Pos, OpWasmI64ShrU, typ.Int64)
2054 v8.AddArg2(w0, v2)
2055 tt.AddArg2(v7, v8)
2056 w1 := b.NewValue0(v.Pos, OpWasmI64Add, typ.Int64)
2057 v10 := b.NewValue0(v.Pos, OpWasmI64Mul, typ.Int64)
2058 v10.AddArg2(x0, y1)
2059 v11 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
2060 v11.AddArg(tt)
2061 w1.AddArg2(v10, v11)
2062 w2 := b.NewValue0(v.Pos, OpWasmI64ShrU, typ.Int64)
2063 w2.AddArg2(tt, v2)
2064 hi := b.NewValue0(v.Pos, OpWasmI64Add, typ.Int64)
2065 v14 := b.NewValue0(v.Pos, OpWasmI64Add, typ.Int64)
2066 v15 := b.NewValue0(v.Pos, OpWasmI64Mul, typ.Int64)
2067 v15.AddArg2(x1, y1)
2068 v14.AddArg2(v15, w2)
2069 v16 := b.NewValue0(v.Pos, OpWasmI64ShrU, typ.Int64)
2070 v16.AddArg2(w1, v2)
2071 hi.AddArg2(v14, v16)
2072 v.AddArgs(x0, x1, y0, y1, w0, tt, w1, w2, hi)
2073 return true
2074 }
2075 }
2076 func rewriteValueWasm_OpIsNonNil(v *Value) bool {
2077 v_0 := v.Args[0]
2078 b := v.Block
2079 typ := &b.Func.Config.Types
2080
2081
2082 for {
2083 p := v_0
2084 v.reset(OpWasmI64Eqz)
2085 v0 := b.NewValue0(v.Pos, OpWasmI64Eqz, typ.Bool)
2086 v0.AddArg(p)
2087 v.AddArg(v0)
2088 return true
2089 }
2090 }
2091 func rewriteValueWasm_OpLast(v *Value) bool {
2092
2093
2094 for {
2095 v.copyOf(v.Args[len(v.Args)-1])
2096 return true
2097 }
2098 }
2099 func rewriteValueWasm_OpLeq16(v *Value) bool {
2100 v_1 := v.Args[1]
2101 v_0 := v.Args[0]
2102 b := v.Block
2103 typ := &b.Func.Config.Types
2104
2105
2106 for {
2107 x := v_0
2108 y := v_1
2109 v.reset(OpWasmI64LeS)
2110 v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
2111 v0.AddArg(x)
2112 v1 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
2113 v1.AddArg(y)
2114 v.AddArg2(v0, v1)
2115 return true
2116 }
2117 }
2118 func rewriteValueWasm_OpLeq16U(v *Value) bool {
2119 v_1 := v.Args[1]
2120 v_0 := v.Args[0]
2121 b := v.Block
2122 typ := &b.Func.Config.Types
2123
2124
2125 for {
2126 x := v_0
2127 y := v_1
2128 v.reset(OpWasmI64LeU)
2129 v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
2130 v0.AddArg(x)
2131 v1 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
2132 v1.AddArg(y)
2133 v.AddArg2(v0, v1)
2134 return true
2135 }
2136 }
2137 func rewriteValueWasm_OpLeq32(v *Value) bool {
2138 v_1 := v.Args[1]
2139 v_0 := v.Args[0]
2140 b := v.Block
2141 typ := &b.Func.Config.Types
2142
2143
2144 for {
2145 x := v_0
2146 y := v_1
2147 v.reset(OpWasmI64LeS)
2148 v0 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
2149 v0.AddArg(x)
2150 v1 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
2151 v1.AddArg(y)
2152 v.AddArg2(v0, v1)
2153 return true
2154 }
2155 }
2156 func rewriteValueWasm_OpLeq32U(v *Value) bool {
2157 v_1 := v.Args[1]
2158 v_0 := v.Args[0]
2159 b := v.Block
2160 typ := &b.Func.Config.Types
2161
2162
2163 for {
2164 x := v_0
2165 y := v_1
2166 v.reset(OpWasmI64LeU)
2167 v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
2168 v0.AddArg(x)
2169 v1 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
2170 v1.AddArg(y)
2171 v.AddArg2(v0, v1)
2172 return true
2173 }
2174 }
2175 func rewriteValueWasm_OpLeq8(v *Value) bool {
2176 v_1 := v.Args[1]
2177 v_0 := v.Args[0]
2178 b := v.Block
2179 typ := &b.Func.Config.Types
2180
2181
2182 for {
2183 x := v_0
2184 y := v_1
2185 v.reset(OpWasmI64LeS)
2186 v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
2187 v0.AddArg(x)
2188 v1 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
2189 v1.AddArg(y)
2190 v.AddArg2(v0, v1)
2191 return true
2192 }
2193 }
2194 func rewriteValueWasm_OpLeq8U(v *Value) bool {
2195 v_1 := v.Args[1]
2196 v_0 := v.Args[0]
2197 b := v.Block
2198 typ := &b.Func.Config.Types
2199
2200
2201 for {
2202 x := v_0
2203 y := v_1
2204 v.reset(OpWasmI64LeU)
2205 v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
2206 v0.AddArg(x)
2207 v1 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
2208 v1.AddArg(y)
2209 v.AddArg2(v0, v1)
2210 return true
2211 }
2212 }
2213 func rewriteValueWasm_OpLess16(v *Value) bool {
2214 v_1 := v.Args[1]
2215 v_0 := v.Args[0]
2216 b := v.Block
2217 typ := &b.Func.Config.Types
2218
2219
2220 for {
2221 x := v_0
2222 y := v_1
2223 v.reset(OpWasmI64LtS)
2224 v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
2225 v0.AddArg(x)
2226 v1 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
2227 v1.AddArg(y)
2228 v.AddArg2(v0, v1)
2229 return true
2230 }
2231 }
2232 func rewriteValueWasm_OpLess16U(v *Value) bool {
2233 v_1 := v.Args[1]
2234 v_0 := v.Args[0]
2235 b := v.Block
2236 typ := &b.Func.Config.Types
2237
2238
2239 for {
2240 x := v_0
2241 y := v_1
2242 v.reset(OpWasmI64LtU)
2243 v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
2244 v0.AddArg(x)
2245 v1 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
2246 v1.AddArg(y)
2247 v.AddArg2(v0, v1)
2248 return true
2249 }
2250 }
2251 func rewriteValueWasm_OpLess32(v *Value) bool {
2252 v_1 := v.Args[1]
2253 v_0 := v.Args[0]
2254 b := v.Block
2255 typ := &b.Func.Config.Types
2256
2257
2258 for {
2259 x := v_0
2260 y := v_1
2261 v.reset(OpWasmI64LtS)
2262 v0 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
2263 v0.AddArg(x)
2264 v1 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
2265 v1.AddArg(y)
2266 v.AddArg2(v0, v1)
2267 return true
2268 }
2269 }
2270 func rewriteValueWasm_OpLess32U(v *Value) bool {
2271 v_1 := v.Args[1]
2272 v_0 := v.Args[0]
2273 b := v.Block
2274 typ := &b.Func.Config.Types
2275
2276
2277 for {
2278 x := v_0
2279 y := v_1
2280 v.reset(OpWasmI64LtU)
2281 v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
2282 v0.AddArg(x)
2283 v1 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
2284 v1.AddArg(y)
2285 v.AddArg2(v0, v1)
2286 return true
2287 }
2288 }
2289 func rewriteValueWasm_OpLess8(v *Value) bool {
2290 v_1 := v.Args[1]
2291 v_0 := v.Args[0]
2292 b := v.Block
2293 typ := &b.Func.Config.Types
2294
2295
2296 for {
2297 x := v_0
2298 y := v_1
2299 v.reset(OpWasmI64LtS)
2300 v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
2301 v0.AddArg(x)
2302 v1 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
2303 v1.AddArg(y)
2304 v.AddArg2(v0, v1)
2305 return true
2306 }
2307 }
2308 func rewriteValueWasm_OpLess8U(v *Value) bool {
2309 v_1 := v.Args[1]
2310 v_0 := v.Args[0]
2311 b := v.Block
2312 typ := &b.Func.Config.Types
2313
2314
2315 for {
2316 x := v_0
2317 y := v_1
2318 v.reset(OpWasmI64LtU)
2319 v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
2320 v0.AddArg(x)
2321 v1 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
2322 v1.AddArg(y)
2323 v.AddArg2(v0, v1)
2324 return true
2325 }
2326 }
2327 func rewriteValueWasm_OpLoad(v *Value) bool {
2328 v_1 := v.Args[1]
2329 v_0 := v.Args[0]
2330
2331
2332
2333 for {
2334 t := v.Type
2335 ptr := v_0
2336 mem := v_1
2337 if !(is32BitFloat(t)) {
2338 break
2339 }
2340 v.reset(OpWasmF32Load)
2341 v.AddArg2(ptr, mem)
2342 return true
2343 }
2344
2345
2346
2347 for {
2348 t := v.Type
2349 ptr := v_0
2350 mem := v_1
2351 if !(is64BitFloat(t)) {
2352 break
2353 }
2354 v.reset(OpWasmF64Load)
2355 v.AddArg2(ptr, mem)
2356 return true
2357 }
2358
2359
2360
2361 for {
2362 t := v.Type
2363 ptr := v_0
2364 mem := v_1
2365 if !(t.Size() == 16) {
2366 break
2367 }
2368 v.reset(OpWasmV128Load)
2369 v.AddArg2(ptr, mem)
2370 return true
2371 }
2372
2373
2374
2375 for {
2376 t := v.Type
2377 ptr := v_0
2378 mem := v_1
2379 if !(t.Size() == 8) {
2380 break
2381 }
2382 v.reset(OpWasmI64Load)
2383 v.AddArg2(ptr, mem)
2384 return true
2385 }
2386
2387
2388
2389 for {
2390 t := v.Type
2391 ptr := v_0
2392 mem := v_1
2393 if !(t.Size() == 4 && !t.IsSigned()) {
2394 break
2395 }
2396 v.reset(OpWasmI64Load32U)
2397 v.AddArg2(ptr, mem)
2398 return true
2399 }
2400
2401
2402
2403 for {
2404 t := v.Type
2405 ptr := v_0
2406 mem := v_1
2407 if !(t.Size() == 4 && t.IsSigned()) {
2408 break
2409 }
2410 v.reset(OpWasmI64Load32S)
2411 v.AddArg2(ptr, mem)
2412 return true
2413 }
2414
2415
2416
2417 for {
2418 t := v.Type
2419 ptr := v_0
2420 mem := v_1
2421 if !(t.Size() == 2 && !t.IsSigned()) {
2422 break
2423 }
2424 v.reset(OpWasmI64Load16U)
2425 v.AddArg2(ptr, mem)
2426 return true
2427 }
2428
2429
2430
2431 for {
2432 t := v.Type
2433 ptr := v_0
2434 mem := v_1
2435 if !(t.Size() == 2 && t.IsSigned()) {
2436 break
2437 }
2438 v.reset(OpWasmI64Load16S)
2439 v.AddArg2(ptr, mem)
2440 return true
2441 }
2442
2443
2444
2445 for {
2446 t := v.Type
2447 ptr := v_0
2448 mem := v_1
2449 if !(t.Size() == 1 && !t.IsSigned()) {
2450 break
2451 }
2452 v.reset(OpWasmI64Load8U)
2453 v.AddArg2(ptr, mem)
2454 return true
2455 }
2456
2457
2458
2459 for {
2460 t := v.Type
2461 ptr := v_0
2462 mem := v_1
2463 if !(t.Size() == 1 && t.IsSigned()) {
2464 break
2465 }
2466 v.reset(OpWasmI64Load8S)
2467 v.AddArg2(ptr, mem)
2468 return true
2469 }
2470 return false
2471 }
2472 func rewriteValueWasm_OpLocalAddr(v *Value) bool {
2473 v_1 := v.Args[1]
2474 v_0 := v.Args[0]
2475 b := v.Block
2476 typ := &b.Func.Config.Types
2477
2478
2479
2480 for {
2481 t := v.Type
2482 sym := auxToSym(v.Aux)
2483 base := v_0
2484 mem := v_1
2485 if !(t.Elem().HasPointers()) {
2486 break
2487 }
2488 v.reset(OpWasmLoweredAddr)
2489 v.Aux = symToAux(sym)
2490 v0 := b.NewValue0(v.Pos, OpSPanchored, typ.Uintptr)
2491 v0.AddArg2(base, mem)
2492 v.AddArg(v0)
2493 return true
2494 }
2495
2496
2497
2498 for {
2499 t := v.Type
2500 sym := auxToSym(v.Aux)
2501 base := v_0
2502 if !(!t.Elem().HasPointers()) {
2503 break
2504 }
2505 v.reset(OpWasmLoweredAddr)
2506 v.Aux = symToAux(sym)
2507 v.AddArg(base)
2508 return true
2509 }
2510 return false
2511 }
2512 func rewriteValueWasm_OpLsh16x16(v *Value) bool {
2513 v_1 := v.Args[1]
2514 v_0 := v.Args[0]
2515 b := v.Block
2516 typ := &b.Func.Config.Types
2517
2518
2519 for {
2520 c := auxIntToBool(v.AuxInt)
2521 x := v_0
2522 y := v_1
2523 v.reset(OpLsh64x64)
2524 v.AuxInt = boolToAuxInt(c)
2525 v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
2526 v0.AddArg(y)
2527 v.AddArg2(x, v0)
2528 return true
2529 }
2530 }
2531 func rewriteValueWasm_OpLsh16x32(v *Value) bool {
2532 v_1 := v.Args[1]
2533 v_0 := v.Args[0]
2534 b := v.Block
2535 typ := &b.Func.Config.Types
2536
2537
2538 for {
2539 c := auxIntToBool(v.AuxInt)
2540 x := v_0
2541 y := v_1
2542 v.reset(OpLsh64x64)
2543 v.AuxInt = boolToAuxInt(c)
2544 v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
2545 v0.AddArg(y)
2546 v.AddArg2(x, v0)
2547 return true
2548 }
2549 }
2550 func rewriteValueWasm_OpLsh16x8(v *Value) bool {
2551 v_1 := v.Args[1]
2552 v_0 := v.Args[0]
2553 b := v.Block
2554 typ := &b.Func.Config.Types
2555
2556
2557 for {
2558 c := auxIntToBool(v.AuxInt)
2559 x := v_0
2560 y := v_1
2561 v.reset(OpLsh64x64)
2562 v.AuxInt = boolToAuxInt(c)
2563 v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
2564 v0.AddArg(y)
2565 v.AddArg2(x, v0)
2566 return true
2567 }
2568 }
2569 func rewriteValueWasm_OpLsh32x16(v *Value) bool {
2570 v_1 := v.Args[1]
2571 v_0 := v.Args[0]
2572 b := v.Block
2573 typ := &b.Func.Config.Types
2574
2575
2576 for {
2577 c := auxIntToBool(v.AuxInt)
2578 x := v_0
2579 y := v_1
2580 v.reset(OpLsh64x64)
2581 v.AuxInt = boolToAuxInt(c)
2582 v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
2583 v0.AddArg(y)
2584 v.AddArg2(x, v0)
2585 return true
2586 }
2587 }
2588 func rewriteValueWasm_OpLsh32x32(v *Value) bool {
2589 v_1 := v.Args[1]
2590 v_0 := v.Args[0]
2591 b := v.Block
2592 typ := &b.Func.Config.Types
2593
2594
2595 for {
2596 c := auxIntToBool(v.AuxInt)
2597 x := v_0
2598 y := v_1
2599 v.reset(OpLsh64x64)
2600 v.AuxInt = boolToAuxInt(c)
2601 v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
2602 v0.AddArg(y)
2603 v.AddArg2(x, v0)
2604 return true
2605 }
2606 }
2607 func rewriteValueWasm_OpLsh32x8(v *Value) bool {
2608 v_1 := v.Args[1]
2609 v_0 := v.Args[0]
2610 b := v.Block
2611 typ := &b.Func.Config.Types
2612
2613
2614 for {
2615 c := auxIntToBool(v.AuxInt)
2616 x := v_0
2617 y := v_1
2618 v.reset(OpLsh64x64)
2619 v.AuxInt = boolToAuxInt(c)
2620 v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
2621 v0.AddArg(y)
2622 v.AddArg2(x, v0)
2623 return true
2624 }
2625 }
2626 func rewriteValueWasm_OpLsh64x16(v *Value) bool {
2627 v_1 := v.Args[1]
2628 v_0 := v.Args[0]
2629 b := v.Block
2630 typ := &b.Func.Config.Types
2631
2632
2633 for {
2634 c := auxIntToBool(v.AuxInt)
2635 x := v_0
2636 y := v_1
2637 v.reset(OpLsh64x64)
2638 v.AuxInt = boolToAuxInt(c)
2639 v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
2640 v0.AddArg(y)
2641 v.AddArg2(x, v0)
2642 return true
2643 }
2644 }
2645 func rewriteValueWasm_OpLsh64x32(v *Value) bool {
2646 v_1 := v.Args[1]
2647 v_0 := v.Args[0]
2648 b := v.Block
2649 typ := &b.Func.Config.Types
2650
2651
2652 for {
2653 c := auxIntToBool(v.AuxInt)
2654 x := v_0
2655 y := v_1
2656 v.reset(OpLsh64x64)
2657 v.AuxInt = boolToAuxInt(c)
2658 v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
2659 v0.AddArg(y)
2660 v.AddArg2(x, v0)
2661 return true
2662 }
2663 }
2664 func rewriteValueWasm_OpLsh64x64(v *Value) bool {
2665 v_1 := v.Args[1]
2666 v_0 := v.Args[0]
2667 b := v.Block
2668 typ := &b.Func.Config.Types
2669
2670
2671
2672 for {
2673 x := v_0
2674 y := v_1
2675 if !(shiftIsBounded(v)) {
2676 break
2677 }
2678 v.reset(OpWasmI64Shl)
2679 v.AddArg2(x, y)
2680 return true
2681 }
2682
2683
2684
2685 for {
2686 x := v_0
2687 if v_1.Op != OpWasmI64Const {
2688 break
2689 }
2690 c := auxIntToInt64(v_1.AuxInt)
2691 if !(uint64(c) < 64) {
2692 break
2693 }
2694 v.reset(OpWasmI64Shl)
2695 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
2696 v0.AuxInt = int64ToAuxInt(c)
2697 v.AddArg2(x, v0)
2698 return true
2699 }
2700
2701
2702
2703 for {
2704 if v_1.Op != OpWasmI64Const {
2705 break
2706 }
2707 c := auxIntToInt64(v_1.AuxInt)
2708 if !(uint64(c) >= 64) {
2709 break
2710 }
2711 v.reset(OpWasmI64Const)
2712 v.AuxInt = int64ToAuxInt(0)
2713 return true
2714 }
2715
2716
2717 for {
2718 x := v_0
2719 y := v_1
2720 v.reset(OpWasmSelect)
2721 v0 := b.NewValue0(v.Pos, OpWasmI64Shl, typ.Int64)
2722 v0.AddArg2(x, y)
2723 v1 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
2724 v1.AuxInt = int64ToAuxInt(0)
2725 v2 := b.NewValue0(v.Pos, OpWasmI64LtU, typ.Bool)
2726 v3 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
2727 v3.AuxInt = int64ToAuxInt(64)
2728 v2.AddArg2(y, v3)
2729 v.AddArg3(v0, v1, v2)
2730 return true
2731 }
2732 }
2733 func rewriteValueWasm_OpLsh64x8(v *Value) bool {
2734 v_1 := v.Args[1]
2735 v_0 := v.Args[0]
2736 b := v.Block
2737 typ := &b.Func.Config.Types
2738
2739
2740 for {
2741 c := auxIntToBool(v.AuxInt)
2742 x := v_0
2743 y := v_1
2744 v.reset(OpLsh64x64)
2745 v.AuxInt = boolToAuxInt(c)
2746 v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
2747 v0.AddArg(y)
2748 v.AddArg2(x, v0)
2749 return true
2750 }
2751 }
2752 func rewriteValueWasm_OpLsh8x16(v *Value) bool {
2753 v_1 := v.Args[1]
2754 v_0 := v.Args[0]
2755 b := v.Block
2756 typ := &b.Func.Config.Types
2757
2758
2759 for {
2760 c := auxIntToBool(v.AuxInt)
2761 x := v_0
2762 y := v_1
2763 v.reset(OpLsh64x64)
2764 v.AuxInt = boolToAuxInt(c)
2765 v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
2766 v0.AddArg(y)
2767 v.AddArg2(x, v0)
2768 return true
2769 }
2770 }
2771 func rewriteValueWasm_OpLsh8x32(v *Value) bool {
2772 v_1 := v.Args[1]
2773 v_0 := v.Args[0]
2774 b := v.Block
2775 typ := &b.Func.Config.Types
2776
2777
2778 for {
2779 c := auxIntToBool(v.AuxInt)
2780 x := v_0
2781 y := v_1
2782 v.reset(OpLsh64x64)
2783 v.AuxInt = boolToAuxInt(c)
2784 v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
2785 v0.AddArg(y)
2786 v.AddArg2(x, v0)
2787 return true
2788 }
2789 }
2790 func rewriteValueWasm_OpLsh8x8(v *Value) bool {
2791 v_1 := v.Args[1]
2792 v_0 := v.Args[0]
2793 b := v.Block
2794 typ := &b.Func.Config.Types
2795
2796
2797 for {
2798 c := auxIntToBool(v.AuxInt)
2799 x := v_0
2800 y := v_1
2801 v.reset(OpLsh64x64)
2802 v.AuxInt = boolToAuxInt(c)
2803 v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
2804 v0.AddArg(y)
2805 v.AddArg2(x, v0)
2806 return true
2807 }
2808 }
2809 func rewriteValueWasm_OpMod16(v *Value) bool {
2810 v_1 := v.Args[1]
2811 v_0 := v.Args[0]
2812 b := v.Block
2813 typ := &b.Func.Config.Types
2814
2815
2816 for {
2817 if auxIntToBool(v.AuxInt) != false {
2818 break
2819 }
2820 x := v_0
2821 y := v_1
2822 v.reset(OpWasmI64RemS)
2823 v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
2824 v0.AddArg(x)
2825 v1 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
2826 v1.AddArg(y)
2827 v.AddArg2(v0, v1)
2828 return true
2829 }
2830 return false
2831 }
2832 func rewriteValueWasm_OpMod16u(v *Value) bool {
2833 v_1 := v.Args[1]
2834 v_0 := v.Args[0]
2835 b := v.Block
2836 typ := &b.Func.Config.Types
2837
2838
2839 for {
2840 x := v_0
2841 y := v_1
2842 v.reset(OpWasmI64RemU)
2843 v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
2844 v0.AddArg(x)
2845 v1 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
2846 v1.AddArg(y)
2847 v.AddArg2(v0, v1)
2848 return true
2849 }
2850 }
2851 func rewriteValueWasm_OpMod32(v *Value) bool {
2852 v_1 := v.Args[1]
2853 v_0 := v.Args[0]
2854 b := v.Block
2855 typ := &b.Func.Config.Types
2856
2857
2858 for {
2859 if auxIntToBool(v.AuxInt) != false {
2860 break
2861 }
2862 x := v_0
2863 y := v_1
2864 v.reset(OpWasmI64RemS)
2865 v0 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
2866 v0.AddArg(x)
2867 v1 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
2868 v1.AddArg(y)
2869 v.AddArg2(v0, v1)
2870 return true
2871 }
2872 return false
2873 }
2874 func rewriteValueWasm_OpMod32u(v *Value) bool {
2875 v_1 := v.Args[1]
2876 v_0 := v.Args[0]
2877 b := v.Block
2878 typ := &b.Func.Config.Types
2879
2880
2881 for {
2882 x := v_0
2883 y := v_1
2884 v.reset(OpWasmI64RemU)
2885 v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
2886 v0.AddArg(x)
2887 v1 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
2888 v1.AddArg(y)
2889 v.AddArg2(v0, v1)
2890 return true
2891 }
2892 }
2893 func rewriteValueWasm_OpMod64(v *Value) bool {
2894 v_1 := v.Args[1]
2895 v_0 := v.Args[0]
2896
2897
2898 for {
2899 if auxIntToBool(v.AuxInt) != false {
2900 break
2901 }
2902 x := v_0
2903 y := v_1
2904 v.reset(OpWasmI64RemS)
2905 v.AddArg2(x, y)
2906 return true
2907 }
2908 return false
2909 }
2910 func rewriteValueWasm_OpMod8(v *Value) bool {
2911 v_1 := v.Args[1]
2912 v_0 := v.Args[0]
2913 b := v.Block
2914 typ := &b.Func.Config.Types
2915
2916
2917 for {
2918 x := v_0
2919 y := v_1
2920 v.reset(OpWasmI64RemS)
2921 v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
2922 v0.AddArg(x)
2923 v1 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
2924 v1.AddArg(y)
2925 v.AddArg2(v0, v1)
2926 return true
2927 }
2928 }
2929 func rewriteValueWasm_OpMod8u(v *Value) bool {
2930 v_1 := v.Args[1]
2931 v_0 := v.Args[0]
2932 b := v.Block
2933 typ := &b.Func.Config.Types
2934
2935
2936 for {
2937 x := v_0
2938 y := v_1
2939 v.reset(OpWasmI64RemU)
2940 v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
2941 v0.AddArg(x)
2942 v1 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
2943 v1.AddArg(y)
2944 v.AddArg2(v0, v1)
2945 return true
2946 }
2947 }
2948 func rewriteValueWasm_OpMove(v *Value) bool {
2949 v_2 := v.Args[2]
2950 v_1 := v.Args[1]
2951 v_0 := v.Args[0]
2952 b := v.Block
2953 typ := &b.Func.Config.Types
2954
2955
2956 for {
2957 if auxIntToInt64(v.AuxInt) != 0 {
2958 break
2959 }
2960 mem := v_2
2961 v.copyOf(mem)
2962 return true
2963 }
2964
2965
2966 for {
2967 if auxIntToInt64(v.AuxInt) != 1 {
2968 break
2969 }
2970 dst := v_0
2971 src := v_1
2972 mem := v_2
2973 v.reset(OpWasmI64Store8)
2974 v0 := b.NewValue0(v.Pos, OpWasmI64Load8U, typ.UInt8)
2975 v0.AddArg2(src, mem)
2976 v.AddArg3(dst, v0, mem)
2977 return true
2978 }
2979
2980
2981 for {
2982 if auxIntToInt64(v.AuxInt) != 2 {
2983 break
2984 }
2985 dst := v_0
2986 src := v_1
2987 mem := v_2
2988 v.reset(OpWasmI64Store16)
2989 v0 := b.NewValue0(v.Pos, OpWasmI64Load16U, typ.UInt16)
2990 v0.AddArg2(src, mem)
2991 v.AddArg3(dst, v0, mem)
2992 return true
2993 }
2994
2995
2996 for {
2997 if auxIntToInt64(v.AuxInt) != 4 {
2998 break
2999 }
3000 dst := v_0
3001 src := v_1
3002 mem := v_2
3003 v.reset(OpWasmI64Store32)
3004 v0 := b.NewValue0(v.Pos, OpWasmI64Load32U, typ.UInt32)
3005 v0.AddArg2(src, mem)
3006 v.AddArg3(dst, v0, mem)
3007 return true
3008 }
3009
3010
3011 for {
3012 if auxIntToInt64(v.AuxInt) != 8 {
3013 break
3014 }
3015 dst := v_0
3016 src := v_1
3017 mem := v_2
3018 v.reset(OpWasmI64Store)
3019 v0 := b.NewValue0(v.Pos, OpWasmI64Load, typ.UInt64)
3020 v0.AddArg2(src, mem)
3021 v.AddArg3(dst, v0, mem)
3022 return true
3023 }
3024
3025
3026 for {
3027 if auxIntToInt64(v.AuxInt) != 16 {
3028 break
3029 }
3030 dst := v_0
3031 src := v_1
3032 mem := v_2
3033 v.reset(OpWasmI64Store)
3034 v.AuxInt = int64ToAuxInt(8)
3035 v0 := b.NewValue0(v.Pos, OpWasmI64Load, typ.UInt64)
3036 v0.AuxInt = int64ToAuxInt(8)
3037 v0.AddArg2(src, mem)
3038 v1 := b.NewValue0(v.Pos, OpWasmI64Store, types.TypeMem)
3039 v2 := b.NewValue0(v.Pos, OpWasmI64Load, typ.UInt64)
3040 v2.AddArg2(src, mem)
3041 v1.AddArg3(dst, v2, mem)
3042 v.AddArg3(dst, v0, v1)
3043 return true
3044 }
3045
3046
3047 for {
3048 if auxIntToInt64(v.AuxInt) != 3 {
3049 break
3050 }
3051 dst := v_0
3052 src := v_1
3053 mem := v_2
3054 v.reset(OpWasmI64Store8)
3055 v.AuxInt = int64ToAuxInt(2)
3056 v0 := b.NewValue0(v.Pos, OpWasmI64Load8U, typ.UInt8)
3057 v0.AuxInt = int64ToAuxInt(2)
3058 v0.AddArg2(src, mem)
3059 v1 := b.NewValue0(v.Pos, OpWasmI64Store16, types.TypeMem)
3060 v2 := b.NewValue0(v.Pos, OpWasmI64Load16U, typ.UInt16)
3061 v2.AddArg2(src, mem)
3062 v1.AddArg3(dst, v2, mem)
3063 v.AddArg3(dst, v0, v1)
3064 return true
3065 }
3066
3067
3068 for {
3069 if auxIntToInt64(v.AuxInt) != 5 {
3070 break
3071 }
3072 dst := v_0
3073 src := v_1
3074 mem := v_2
3075 v.reset(OpWasmI64Store8)
3076 v.AuxInt = int64ToAuxInt(4)
3077 v0 := b.NewValue0(v.Pos, OpWasmI64Load8U, typ.UInt8)
3078 v0.AuxInt = int64ToAuxInt(4)
3079 v0.AddArg2(src, mem)
3080 v1 := b.NewValue0(v.Pos, OpWasmI64Store32, types.TypeMem)
3081 v2 := b.NewValue0(v.Pos, OpWasmI64Load32U, typ.UInt32)
3082 v2.AddArg2(src, mem)
3083 v1.AddArg3(dst, v2, mem)
3084 v.AddArg3(dst, v0, v1)
3085 return true
3086 }
3087
3088
3089 for {
3090 if auxIntToInt64(v.AuxInt) != 6 {
3091 break
3092 }
3093 dst := v_0
3094 src := v_1
3095 mem := v_2
3096 v.reset(OpWasmI64Store16)
3097 v.AuxInt = int64ToAuxInt(4)
3098 v0 := b.NewValue0(v.Pos, OpWasmI64Load16U, typ.UInt16)
3099 v0.AuxInt = int64ToAuxInt(4)
3100 v0.AddArg2(src, mem)
3101 v1 := b.NewValue0(v.Pos, OpWasmI64Store32, types.TypeMem)
3102 v2 := b.NewValue0(v.Pos, OpWasmI64Load32U, typ.UInt32)
3103 v2.AddArg2(src, mem)
3104 v1.AddArg3(dst, v2, mem)
3105 v.AddArg3(dst, v0, v1)
3106 return true
3107 }
3108
3109
3110 for {
3111 if auxIntToInt64(v.AuxInt) != 7 {
3112 break
3113 }
3114 dst := v_0
3115 src := v_1
3116 mem := v_2
3117 v.reset(OpWasmI64Store32)
3118 v.AuxInt = int64ToAuxInt(3)
3119 v0 := b.NewValue0(v.Pos, OpWasmI64Load32U, typ.UInt32)
3120 v0.AuxInt = int64ToAuxInt(3)
3121 v0.AddArg2(src, mem)
3122 v1 := b.NewValue0(v.Pos, OpWasmI64Store32, types.TypeMem)
3123 v2 := b.NewValue0(v.Pos, OpWasmI64Load32U, typ.UInt32)
3124 v2.AddArg2(src, mem)
3125 v1.AddArg3(dst, v2, mem)
3126 v.AddArg3(dst, v0, v1)
3127 return true
3128 }
3129
3130
3131
3132 for {
3133 s := auxIntToInt64(v.AuxInt)
3134 dst := v_0
3135 src := v_1
3136 mem := v_2
3137 if !(s > 8 && s < 16) {
3138 break
3139 }
3140 v.reset(OpWasmI64Store)
3141 v.AuxInt = int64ToAuxInt(s - 8)
3142 v0 := b.NewValue0(v.Pos, OpWasmI64Load, typ.UInt64)
3143 v0.AuxInt = int64ToAuxInt(s - 8)
3144 v0.AddArg2(src, mem)
3145 v1 := b.NewValue0(v.Pos, OpWasmI64Store, types.TypeMem)
3146 v2 := b.NewValue0(v.Pos, OpWasmI64Load, typ.UInt64)
3147 v2.AddArg2(src, mem)
3148 v1.AddArg3(dst, v2, mem)
3149 v.AddArg3(dst, v0, v1)
3150 return true
3151 }
3152
3153
3154
3155 for {
3156 s := auxIntToInt64(v.AuxInt)
3157 dst := v_0
3158 src := v_1
3159 mem := v_2
3160 if !(logLargeCopy(v, s)) {
3161 break
3162 }
3163 v.reset(OpWasmLoweredMove)
3164 v.AuxInt = int64ToAuxInt(s)
3165 v.AddArg3(dst, src, mem)
3166 return true
3167 }
3168 return false
3169 }
3170 func rewriteValueWasm_OpNeg16(v *Value) bool {
3171 v_0 := v.Args[0]
3172 b := v.Block
3173 typ := &b.Func.Config.Types
3174
3175
3176 for {
3177 x := v_0
3178 v.reset(OpWasmI64Sub)
3179 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
3180 v0.AuxInt = int64ToAuxInt(0)
3181 v.AddArg2(v0, x)
3182 return true
3183 }
3184 }
3185 func rewriteValueWasm_OpNeg32(v *Value) bool {
3186 v_0 := v.Args[0]
3187 b := v.Block
3188 typ := &b.Func.Config.Types
3189
3190
3191 for {
3192 x := v_0
3193 v.reset(OpWasmI64Sub)
3194 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
3195 v0.AuxInt = int64ToAuxInt(0)
3196 v.AddArg2(v0, x)
3197 return true
3198 }
3199 }
3200 func rewriteValueWasm_OpNeg64(v *Value) bool {
3201 v_0 := v.Args[0]
3202 b := v.Block
3203 typ := &b.Func.Config.Types
3204
3205
3206 for {
3207 x := v_0
3208 v.reset(OpWasmI64Sub)
3209 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
3210 v0.AuxInt = int64ToAuxInt(0)
3211 v.AddArg2(v0, x)
3212 return true
3213 }
3214 }
3215 func rewriteValueWasm_OpNeg8(v *Value) bool {
3216 v_0 := v.Args[0]
3217 b := v.Block
3218 typ := &b.Func.Config.Types
3219
3220
3221 for {
3222 x := v_0
3223 v.reset(OpWasmI64Sub)
3224 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
3225 v0.AuxInt = int64ToAuxInt(0)
3226 v.AddArg2(v0, x)
3227 return true
3228 }
3229 }
3230 func rewriteValueWasm_OpNeq16(v *Value) bool {
3231 v_1 := v.Args[1]
3232 v_0 := v.Args[0]
3233 b := v.Block
3234 typ := &b.Func.Config.Types
3235
3236
3237 for {
3238 x := v_0
3239 y := v_1
3240 v.reset(OpWasmI64Ne)
3241 v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
3242 v0.AddArg(x)
3243 v1 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
3244 v1.AddArg(y)
3245 v.AddArg2(v0, v1)
3246 return true
3247 }
3248 }
3249 func rewriteValueWasm_OpNeq32(v *Value) bool {
3250 v_1 := v.Args[1]
3251 v_0 := v.Args[0]
3252 b := v.Block
3253 typ := &b.Func.Config.Types
3254
3255
3256 for {
3257 x := v_0
3258 y := v_1
3259 v.reset(OpWasmI64Ne)
3260 v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
3261 v0.AddArg(x)
3262 v1 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
3263 v1.AddArg(y)
3264 v.AddArg2(v0, v1)
3265 return true
3266 }
3267 }
3268 func rewriteValueWasm_OpNeq8(v *Value) bool {
3269 v_1 := v.Args[1]
3270 v_0 := v.Args[0]
3271 b := v.Block
3272 typ := &b.Func.Config.Types
3273
3274
3275 for {
3276 x := v_0
3277 y := v_1
3278 v.reset(OpWasmI64Ne)
3279 v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
3280 v0.AddArg(x)
3281 v1 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
3282 v1.AddArg(y)
3283 v.AddArg2(v0, v1)
3284 return true
3285 }
3286 }
3287 func rewriteValueWasm_OpPopCount16(v *Value) bool {
3288 v_0 := v.Args[0]
3289 b := v.Block
3290 typ := &b.Func.Config.Types
3291
3292
3293 for {
3294 x := v_0
3295 v.reset(OpWasmI64Popcnt)
3296 v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
3297 v0.AddArg(x)
3298 v.AddArg(v0)
3299 return true
3300 }
3301 }
3302 func rewriteValueWasm_OpPopCount32(v *Value) bool {
3303 v_0 := v.Args[0]
3304 b := v.Block
3305 typ := &b.Func.Config.Types
3306
3307
3308 for {
3309 x := v_0
3310 v.reset(OpWasmI64Popcnt)
3311 v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
3312 v0.AddArg(x)
3313 v.AddArg(v0)
3314 return true
3315 }
3316 }
3317 func rewriteValueWasm_OpPopCount8(v *Value) bool {
3318 v_0 := v.Args[0]
3319 b := v.Block
3320 typ := &b.Func.Config.Types
3321
3322
3323 for {
3324 x := v_0
3325 v.reset(OpWasmI64Popcnt)
3326 v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
3327 v0.AddArg(x)
3328 v.AddArg(v0)
3329 return true
3330 }
3331 }
3332 func rewriteValueWasm_OpRotateAllLeftVarInt16x8(v *Value) bool {
3333 v_1 := v.Args[1]
3334 v_0 := v.Args[0]
3335 b := v.Block
3336 typ := &b.Func.Config.Types
3337
3338
3339 for {
3340 x := v_0
3341 y := v_1
3342 v.reset(OpWasmV128Or)
3343 v0 := b.NewValue0(v.Pos, OpWasmI16x8Shl, typ.Vec128)
3344 v0.AddArg2(x, y)
3345 v1 := b.NewValue0(v.Pos, OpWasmI16x8ShrU, typ.Vec128)
3346 v2 := b.NewValue0(v.Pos, OpWasmI64Sub, typ.Int64)
3347 v3 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
3348 v3.AuxInt = int64ToAuxInt(16)
3349 v2.AddArg2(v3, y)
3350 v1.AddArg2(x, v2)
3351 v.AddArg2(v0, v1)
3352 return true
3353 }
3354 }
3355 func rewriteValueWasm_OpRotateAllLeftVarInt32x4(v *Value) bool {
3356 v_1 := v.Args[1]
3357 v_0 := v.Args[0]
3358 b := v.Block
3359 typ := &b.Func.Config.Types
3360
3361
3362 for {
3363 x := v_0
3364 y := v_1
3365 v.reset(OpWasmV128Or)
3366 v0 := b.NewValue0(v.Pos, OpWasmI32x4Shl, typ.Vec128)
3367 v0.AddArg2(x, y)
3368 v1 := b.NewValue0(v.Pos, OpWasmI32x4ShrU, typ.Vec128)
3369 v2 := b.NewValue0(v.Pos, OpWasmI64Sub, typ.Int64)
3370 v3 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
3371 v3.AuxInt = int64ToAuxInt(32)
3372 v2.AddArg2(v3, y)
3373 v1.AddArg2(x, v2)
3374 v.AddArg2(v0, v1)
3375 return true
3376 }
3377 }
3378 func rewriteValueWasm_OpRotateAllLeftVarInt64x2(v *Value) bool {
3379 v_1 := v.Args[1]
3380 v_0 := v.Args[0]
3381 b := v.Block
3382 typ := &b.Func.Config.Types
3383
3384
3385 for {
3386 x := v_0
3387 y := v_1
3388 v.reset(OpWasmV128Or)
3389 v0 := b.NewValue0(v.Pos, OpWasmI64x2Shl, typ.Vec128)
3390 v0.AddArg2(x, y)
3391 v1 := b.NewValue0(v.Pos, OpWasmI64x2ShrU, typ.Vec128)
3392 v2 := b.NewValue0(v.Pos, OpWasmI64Sub, typ.Int64)
3393 v3 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
3394 v3.AuxInt = int64ToAuxInt(64)
3395 v2.AddArg2(v3, y)
3396 v1.AddArg2(x, v2)
3397 v.AddArg2(v0, v1)
3398 return true
3399 }
3400 }
3401 func rewriteValueWasm_OpRotateAllLeftVarInt8x16(v *Value) bool {
3402 v_1 := v.Args[1]
3403 v_0 := v.Args[0]
3404 b := v.Block
3405 typ := &b.Func.Config.Types
3406
3407
3408 for {
3409 x := v_0
3410 y := v_1
3411 v.reset(OpWasmV128Or)
3412 v0 := b.NewValue0(v.Pos, OpWasmI8x16Shl, typ.Vec128)
3413 v0.AddArg2(x, y)
3414 v1 := b.NewValue0(v.Pos, OpWasmI8x16ShrU, typ.Vec128)
3415 v2 := b.NewValue0(v.Pos, OpWasmI64Sub, typ.Int64)
3416 v3 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
3417 v3.AuxInt = int64ToAuxInt(8)
3418 v2.AddArg2(v3, y)
3419 v1.AddArg2(x, v2)
3420 v.AddArg2(v0, v1)
3421 return true
3422 }
3423 }
3424 func rewriteValueWasm_OpRotateAllLeftVarUint16x8(v *Value) bool {
3425 v_1 := v.Args[1]
3426 v_0 := v.Args[0]
3427 b := v.Block
3428 typ := &b.Func.Config.Types
3429
3430
3431 for {
3432 x := v_0
3433 y := v_1
3434 v.reset(OpWasmV128Or)
3435 v0 := b.NewValue0(v.Pos, OpWasmI16x8Shl, typ.Vec128)
3436 v0.AddArg2(x, y)
3437 v1 := b.NewValue0(v.Pos, OpWasmI16x8ShrU, typ.Vec128)
3438 v2 := b.NewValue0(v.Pos, OpWasmI64Sub, typ.Int64)
3439 v3 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
3440 v3.AuxInt = int64ToAuxInt(16)
3441 v2.AddArg2(v3, y)
3442 v1.AddArg2(x, v2)
3443 v.AddArg2(v0, v1)
3444 return true
3445 }
3446 }
3447 func rewriteValueWasm_OpRotateAllLeftVarUint32x4(v *Value) bool {
3448 v_1 := v.Args[1]
3449 v_0 := v.Args[0]
3450 b := v.Block
3451 typ := &b.Func.Config.Types
3452
3453
3454 for {
3455 x := v_0
3456 y := v_1
3457 v.reset(OpWasmV128Or)
3458 v0 := b.NewValue0(v.Pos, OpWasmI32x4Shl, typ.Vec128)
3459 v0.AddArg2(x, y)
3460 v1 := b.NewValue0(v.Pos, OpWasmI32x4ShrU, typ.Vec128)
3461 v2 := b.NewValue0(v.Pos, OpWasmI64Sub, typ.Int64)
3462 v3 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
3463 v3.AuxInt = int64ToAuxInt(32)
3464 v2.AddArg2(v3, y)
3465 v1.AddArg2(x, v2)
3466 v.AddArg2(v0, v1)
3467 return true
3468 }
3469 }
3470 func rewriteValueWasm_OpRotateAllLeftVarUint64x2(v *Value) bool {
3471 v_1 := v.Args[1]
3472 v_0 := v.Args[0]
3473 b := v.Block
3474 typ := &b.Func.Config.Types
3475
3476
3477 for {
3478 x := v_0
3479 y := v_1
3480 v.reset(OpWasmV128Or)
3481 v0 := b.NewValue0(v.Pos, OpWasmI64x2Shl, typ.Vec128)
3482 v0.AddArg2(x, y)
3483 v1 := b.NewValue0(v.Pos, OpWasmI64x2ShrU, typ.Vec128)
3484 v2 := b.NewValue0(v.Pos, OpWasmI64Sub, typ.Int64)
3485 v3 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
3486 v3.AuxInt = int64ToAuxInt(64)
3487 v2.AddArg2(v3, y)
3488 v1.AddArg2(x, v2)
3489 v.AddArg2(v0, v1)
3490 return true
3491 }
3492 }
3493 func rewriteValueWasm_OpRotateAllLeftVarUint8x16(v *Value) bool {
3494 v_1 := v.Args[1]
3495 v_0 := v.Args[0]
3496 b := v.Block
3497 typ := &b.Func.Config.Types
3498
3499
3500 for {
3501 x := v_0
3502 y := v_1
3503 v.reset(OpWasmV128Or)
3504 v0 := b.NewValue0(v.Pos, OpWasmI8x16Shl, typ.Vec128)
3505 v0.AddArg2(x, y)
3506 v1 := b.NewValue0(v.Pos, OpWasmI8x16ShrU, typ.Vec128)
3507 v2 := b.NewValue0(v.Pos, OpWasmI64Sub, typ.Int64)
3508 v3 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
3509 v3.AuxInt = int64ToAuxInt(8)
3510 v2.AddArg2(v3, y)
3511 v1.AddArg2(x, v2)
3512 v.AddArg2(v0, v1)
3513 return true
3514 }
3515 }
3516 func rewriteValueWasm_OpRotateAllRightVarInt16x8(v *Value) bool {
3517 v_1 := v.Args[1]
3518 v_0 := v.Args[0]
3519 b := v.Block
3520 typ := &b.Func.Config.Types
3521
3522
3523 for {
3524 x := v_0
3525 y := v_1
3526 v.reset(OpWasmV128Or)
3527 v0 := b.NewValue0(v.Pos, OpWasmI16x8ShrU, typ.Vec128)
3528 v0.AddArg2(x, y)
3529 v1 := b.NewValue0(v.Pos, OpWasmI16x8Shl, typ.Vec128)
3530 v2 := b.NewValue0(v.Pos, OpWasmI64Sub, typ.Int64)
3531 v3 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
3532 v3.AuxInt = int64ToAuxInt(16)
3533 v2.AddArg2(v3, y)
3534 v1.AddArg2(x, v2)
3535 v.AddArg2(v0, v1)
3536 return true
3537 }
3538 }
3539 func rewriteValueWasm_OpRotateAllRightVarInt32x4(v *Value) bool {
3540 v_1 := v.Args[1]
3541 v_0 := v.Args[0]
3542 b := v.Block
3543 typ := &b.Func.Config.Types
3544
3545
3546 for {
3547 x := v_0
3548 y := v_1
3549 v.reset(OpWasmV128Or)
3550 v0 := b.NewValue0(v.Pos, OpWasmI32x4ShrU, typ.Vec128)
3551 v0.AddArg2(x, y)
3552 v1 := b.NewValue0(v.Pos, OpWasmI32x4Shl, typ.Vec128)
3553 v2 := b.NewValue0(v.Pos, OpWasmI64Sub, typ.Int64)
3554 v3 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
3555 v3.AuxInt = int64ToAuxInt(32)
3556 v2.AddArg2(v3, y)
3557 v1.AddArg2(x, v2)
3558 v.AddArg2(v0, v1)
3559 return true
3560 }
3561 }
3562 func rewriteValueWasm_OpRotateAllRightVarInt64x2(v *Value) bool {
3563 v_1 := v.Args[1]
3564 v_0 := v.Args[0]
3565 b := v.Block
3566 typ := &b.Func.Config.Types
3567
3568
3569 for {
3570 x := v_0
3571 y := v_1
3572 v.reset(OpWasmV128Or)
3573 v0 := b.NewValue0(v.Pos, OpWasmI64x2ShrU, typ.Vec128)
3574 v0.AddArg2(x, y)
3575 v1 := b.NewValue0(v.Pos, OpWasmI64x2Shl, typ.Vec128)
3576 v2 := b.NewValue0(v.Pos, OpWasmI64Sub, typ.Int64)
3577 v3 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
3578 v3.AuxInt = int64ToAuxInt(64)
3579 v2.AddArg2(v3, y)
3580 v1.AddArg2(x, v2)
3581 v.AddArg2(v0, v1)
3582 return true
3583 }
3584 }
3585 func rewriteValueWasm_OpRotateAllRightVarInt8x16(v *Value) bool {
3586 v_1 := v.Args[1]
3587 v_0 := v.Args[0]
3588 b := v.Block
3589 typ := &b.Func.Config.Types
3590
3591
3592 for {
3593 x := v_0
3594 y := v_1
3595 v.reset(OpWasmV128Or)
3596 v0 := b.NewValue0(v.Pos, OpWasmI8x16ShrU, typ.Vec128)
3597 v0.AddArg2(x, y)
3598 v1 := b.NewValue0(v.Pos, OpWasmI8x16Shl, typ.Vec128)
3599 v2 := b.NewValue0(v.Pos, OpWasmI64Sub, typ.Int64)
3600 v3 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
3601 v3.AuxInt = int64ToAuxInt(8)
3602 v2.AddArg2(v3, y)
3603 v1.AddArg2(x, v2)
3604 v.AddArg2(v0, v1)
3605 return true
3606 }
3607 }
3608 func rewriteValueWasm_OpRotateAllRightVarUint16x8(v *Value) bool {
3609 v_1 := v.Args[1]
3610 v_0 := v.Args[0]
3611 b := v.Block
3612 typ := &b.Func.Config.Types
3613
3614
3615 for {
3616 x := v_0
3617 y := v_1
3618 v.reset(OpWasmV128Or)
3619 v0 := b.NewValue0(v.Pos, OpWasmI16x8ShrU, typ.Vec128)
3620 v0.AddArg2(x, y)
3621 v1 := b.NewValue0(v.Pos, OpWasmI16x8Shl, typ.Vec128)
3622 v2 := b.NewValue0(v.Pos, OpWasmI64Sub, typ.Int64)
3623 v3 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
3624 v3.AuxInt = int64ToAuxInt(16)
3625 v2.AddArg2(v3, y)
3626 v1.AddArg2(x, v2)
3627 v.AddArg2(v0, v1)
3628 return true
3629 }
3630 }
3631 func rewriteValueWasm_OpRotateAllRightVarUint32x4(v *Value) bool {
3632 v_1 := v.Args[1]
3633 v_0 := v.Args[0]
3634 b := v.Block
3635 typ := &b.Func.Config.Types
3636
3637
3638 for {
3639 x := v_0
3640 y := v_1
3641 v.reset(OpWasmV128Or)
3642 v0 := b.NewValue0(v.Pos, OpWasmI32x4ShrU, typ.Vec128)
3643 v0.AddArg2(x, y)
3644 v1 := b.NewValue0(v.Pos, OpWasmI32x4Shl, typ.Vec128)
3645 v2 := b.NewValue0(v.Pos, OpWasmI64Sub, typ.Int64)
3646 v3 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
3647 v3.AuxInt = int64ToAuxInt(32)
3648 v2.AddArg2(v3, y)
3649 v1.AddArg2(x, v2)
3650 v.AddArg2(v0, v1)
3651 return true
3652 }
3653 }
3654 func rewriteValueWasm_OpRotateAllRightVarUint64x2(v *Value) bool {
3655 v_1 := v.Args[1]
3656 v_0 := v.Args[0]
3657 b := v.Block
3658 typ := &b.Func.Config.Types
3659
3660
3661 for {
3662 x := v_0
3663 y := v_1
3664 v.reset(OpWasmV128Or)
3665 v0 := b.NewValue0(v.Pos, OpWasmI64x2ShrU, typ.Vec128)
3666 v0.AddArg2(x, y)
3667 v1 := b.NewValue0(v.Pos, OpWasmI64x2Shl, typ.Vec128)
3668 v2 := b.NewValue0(v.Pos, OpWasmI64Sub, typ.Int64)
3669 v3 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
3670 v3.AuxInt = int64ToAuxInt(64)
3671 v2.AddArg2(v3, y)
3672 v1.AddArg2(x, v2)
3673 v.AddArg2(v0, v1)
3674 return true
3675 }
3676 }
3677 func rewriteValueWasm_OpRotateAllRightVarUint8x16(v *Value) bool {
3678 v_1 := v.Args[1]
3679 v_0 := v.Args[0]
3680 b := v.Block
3681 typ := &b.Func.Config.Types
3682
3683
3684 for {
3685 x := v_0
3686 y := v_1
3687 v.reset(OpWasmV128Or)
3688 v0 := b.NewValue0(v.Pos, OpWasmI8x16ShrU, typ.Vec128)
3689 v0.AddArg2(x, y)
3690 v1 := b.NewValue0(v.Pos, OpWasmI8x16Shl, typ.Vec128)
3691 v2 := b.NewValue0(v.Pos, OpWasmI64Sub, typ.Int64)
3692 v3 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
3693 v3.AuxInt = int64ToAuxInt(8)
3694 v2.AddArg2(v3, y)
3695 v1.AddArg2(x, v2)
3696 v.AddArg2(v0, v1)
3697 return true
3698 }
3699 }
3700 func rewriteValueWasm_OpRotateLeft16(v *Value) bool {
3701 v_1 := v.Args[1]
3702 v_0 := v.Args[0]
3703 b := v.Block
3704 typ := &b.Func.Config.Types
3705
3706
3707 for {
3708 t := v.Type
3709 x := v_0
3710 if v_1.Op != OpWasmI64Const {
3711 break
3712 }
3713 c := auxIntToInt64(v_1.AuxInt)
3714 v.reset(OpOr16)
3715 v0 := b.NewValue0(v.Pos, OpLsh16x64, t)
3716 v1 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
3717 v1.AuxInt = int64ToAuxInt(c & 15)
3718 v0.AddArg2(x, v1)
3719 v2 := b.NewValue0(v.Pos, OpRsh16Ux64, t)
3720 v3 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
3721 v3.AuxInt = int64ToAuxInt(-c & 15)
3722 v2.AddArg2(x, v3)
3723 v.AddArg2(v0, v2)
3724 return true
3725 }
3726 return false
3727 }
3728 func rewriteValueWasm_OpRotateLeft8(v *Value) bool {
3729 v_1 := v.Args[1]
3730 v_0 := v.Args[0]
3731 b := v.Block
3732 typ := &b.Func.Config.Types
3733
3734
3735 for {
3736 t := v.Type
3737 x := v_0
3738 if v_1.Op != OpWasmI64Const {
3739 break
3740 }
3741 c := auxIntToInt64(v_1.AuxInt)
3742 v.reset(OpOr8)
3743 v0 := b.NewValue0(v.Pos, OpLsh8x64, t)
3744 v1 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
3745 v1.AuxInt = int64ToAuxInt(c & 7)
3746 v0.AddArg2(x, v1)
3747 v2 := b.NewValue0(v.Pos, OpRsh8Ux64, t)
3748 v3 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
3749 v3.AuxInt = int64ToAuxInt(-c & 7)
3750 v2.AddArg2(x, v3)
3751 v.AddArg2(v0, v2)
3752 return true
3753 }
3754 return false
3755 }
3756 func rewriteValueWasm_OpRsh16Ux16(v *Value) bool {
3757 v_1 := v.Args[1]
3758 v_0 := v.Args[0]
3759 b := v.Block
3760 typ := &b.Func.Config.Types
3761
3762
3763 for {
3764 c := auxIntToBool(v.AuxInt)
3765 x := v_0
3766 y := v_1
3767 v.reset(OpRsh64Ux64)
3768 v.AuxInt = boolToAuxInt(c)
3769 v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
3770 v0.AddArg(x)
3771 v1 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
3772 v1.AddArg(y)
3773 v.AddArg2(v0, v1)
3774 return true
3775 }
3776 }
3777 func rewriteValueWasm_OpRsh16Ux32(v *Value) bool {
3778 v_1 := v.Args[1]
3779 v_0 := v.Args[0]
3780 b := v.Block
3781 typ := &b.Func.Config.Types
3782
3783
3784 for {
3785 c := auxIntToBool(v.AuxInt)
3786 x := v_0
3787 y := v_1
3788 v.reset(OpRsh64Ux64)
3789 v.AuxInt = boolToAuxInt(c)
3790 v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
3791 v0.AddArg(x)
3792 v1 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
3793 v1.AddArg(y)
3794 v.AddArg2(v0, v1)
3795 return true
3796 }
3797 }
3798 func rewriteValueWasm_OpRsh16Ux64(v *Value) bool {
3799 v_1 := v.Args[1]
3800 v_0 := v.Args[0]
3801 b := v.Block
3802 typ := &b.Func.Config.Types
3803
3804
3805 for {
3806 c := auxIntToBool(v.AuxInt)
3807 x := v_0
3808 y := v_1
3809 v.reset(OpRsh64Ux64)
3810 v.AuxInt = boolToAuxInt(c)
3811 v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
3812 v0.AddArg(x)
3813 v.AddArg2(v0, y)
3814 return true
3815 }
3816 }
3817 func rewriteValueWasm_OpRsh16Ux8(v *Value) bool {
3818 v_1 := v.Args[1]
3819 v_0 := v.Args[0]
3820 b := v.Block
3821 typ := &b.Func.Config.Types
3822
3823
3824 for {
3825 c := auxIntToBool(v.AuxInt)
3826 x := v_0
3827 y := v_1
3828 v.reset(OpRsh64Ux64)
3829 v.AuxInt = boolToAuxInt(c)
3830 v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
3831 v0.AddArg(x)
3832 v1 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
3833 v1.AddArg(y)
3834 v.AddArg2(v0, v1)
3835 return true
3836 }
3837 }
3838 func rewriteValueWasm_OpRsh16x16(v *Value) bool {
3839 v_1 := v.Args[1]
3840 v_0 := v.Args[0]
3841 b := v.Block
3842 typ := &b.Func.Config.Types
3843
3844
3845 for {
3846 c := auxIntToBool(v.AuxInt)
3847 x := v_0
3848 y := v_1
3849 v.reset(OpRsh64x64)
3850 v.AuxInt = boolToAuxInt(c)
3851 v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
3852 v0.AddArg(x)
3853 v1 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
3854 v1.AddArg(y)
3855 v.AddArg2(v0, v1)
3856 return true
3857 }
3858 }
3859 func rewriteValueWasm_OpRsh16x32(v *Value) bool {
3860 v_1 := v.Args[1]
3861 v_0 := v.Args[0]
3862 b := v.Block
3863 typ := &b.Func.Config.Types
3864
3865
3866 for {
3867 c := auxIntToBool(v.AuxInt)
3868 x := v_0
3869 y := v_1
3870 v.reset(OpRsh64x64)
3871 v.AuxInt = boolToAuxInt(c)
3872 v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
3873 v0.AddArg(x)
3874 v1 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
3875 v1.AddArg(y)
3876 v.AddArg2(v0, v1)
3877 return true
3878 }
3879 }
3880 func rewriteValueWasm_OpRsh16x64(v *Value) bool {
3881 v_1 := v.Args[1]
3882 v_0 := v.Args[0]
3883 b := v.Block
3884 typ := &b.Func.Config.Types
3885
3886
3887 for {
3888 c := auxIntToBool(v.AuxInt)
3889 x := v_0
3890 y := v_1
3891 v.reset(OpRsh64x64)
3892 v.AuxInt = boolToAuxInt(c)
3893 v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
3894 v0.AddArg(x)
3895 v.AddArg2(v0, y)
3896 return true
3897 }
3898 }
3899 func rewriteValueWasm_OpRsh16x8(v *Value) bool {
3900 v_1 := v.Args[1]
3901 v_0 := v.Args[0]
3902 b := v.Block
3903 typ := &b.Func.Config.Types
3904
3905
3906 for {
3907 c := auxIntToBool(v.AuxInt)
3908 x := v_0
3909 y := v_1
3910 v.reset(OpRsh64x64)
3911 v.AuxInt = boolToAuxInt(c)
3912 v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
3913 v0.AddArg(x)
3914 v1 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
3915 v1.AddArg(y)
3916 v.AddArg2(v0, v1)
3917 return true
3918 }
3919 }
3920 func rewriteValueWasm_OpRsh32Ux16(v *Value) bool {
3921 v_1 := v.Args[1]
3922 v_0 := v.Args[0]
3923 b := v.Block
3924 typ := &b.Func.Config.Types
3925
3926
3927 for {
3928 c := auxIntToBool(v.AuxInt)
3929 x := v_0
3930 y := v_1
3931 v.reset(OpRsh64Ux64)
3932 v.AuxInt = boolToAuxInt(c)
3933 v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
3934 v0.AddArg(x)
3935 v1 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
3936 v1.AddArg(y)
3937 v.AddArg2(v0, v1)
3938 return true
3939 }
3940 }
3941 func rewriteValueWasm_OpRsh32Ux32(v *Value) bool {
3942 v_1 := v.Args[1]
3943 v_0 := v.Args[0]
3944 b := v.Block
3945 typ := &b.Func.Config.Types
3946
3947
3948 for {
3949 c := auxIntToBool(v.AuxInt)
3950 x := v_0
3951 y := v_1
3952 v.reset(OpRsh64Ux64)
3953 v.AuxInt = boolToAuxInt(c)
3954 v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
3955 v0.AddArg(x)
3956 v1 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
3957 v1.AddArg(y)
3958 v.AddArg2(v0, v1)
3959 return true
3960 }
3961 }
3962 func rewriteValueWasm_OpRsh32Ux64(v *Value) bool {
3963 v_1 := v.Args[1]
3964 v_0 := v.Args[0]
3965 b := v.Block
3966 typ := &b.Func.Config.Types
3967
3968
3969 for {
3970 c := auxIntToBool(v.AuxInt)
3971 x := v_0
3972 y := v_1
3973 v.reset(OpRsh64Ux64)
3974 v.AuxInt = boolToAuxInt(c)
3975 v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
3976 v0.AddArg(x)
3977 v.AddArg2(v0, y)
3978 return true
3979 }
3980 }
3981 func rewriteValueWasm_OpRsh32Ux8(v *Value) bool {
3982 v_1 := v.Args[1]
3983 v_0 := v.Args[0]
3984 b := v.Block
3985 typ := &b.Func.Config.Types
3986
3987
3988 for {
3989 c := auxIntToBool(v.AuxInt)
3990 x := v_0
3991 y := v_1
3992 v.reset(OpRsh64Ux64)
3993 v.AuxInt = boolToAuxInt(c)
3994 v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
3995 v0.AddArg(x)
3996 v1 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
3997 v1.AddArg(y)
3998 v.AddArg2(v0, v1)
3999 return true
4000 }
4001 }
4002 func rewriteValueWasm_OpRsh32x16(v *Value) bool {
4003 v_1 := v.Args[1]
4004 v_0 := v.Args[0]
4005 b := v.Block
4006 typ := &b.Func.Config.Types
4007
4008
4009 for {
4010 c := auxIntToBool(v.AuxInt)
4011 x := v_0
4012 y := v_1
4013 v.reset(OpRsh64x64)
4014 v.AuxInt = boolToAuxInt(c)
4015 v0 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
4016 v0.AddArg(x)
4017 v1 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
4018 v1.AddArg(y)
4019 v.AddArg2(v0, v1)
4020 return true
4021 }
4022 }
4023 func rewriteValueWasm_OpRsh32x32(v *Value) bool {
4024 v_1 := v.Args[1]
4025 v_0 := v.Args[0]
4026 b := v.Block
4027 typ := &b.Func.Config.Types
4028
4029
4030 for {
4031 c := auxIntToBool(v.AuxInt)
4032 x := v_0
4033 y := v_1
4034 v.reset(OpRsh64x64)
4035 v.AuxInt = boolToAuxInt(c)
4036 v0 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
4037 v0.AddArg(x)
4038 v1 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
4039 v1.AddArg(y)
4040 v.AddArg2(v0, v1)
4041 return true
4042 }
4043 }
4044 func rewriteValueWasm_OpRsh32x64(v *Value) bool {
4045 v_1 := v.Args[1]
4046 v_0 := v.Args[0]
4047 b := v.Block
4048 typ := &b.Func.Config.Types
4049
4050
4051 for {
4052 c := auxIntToBool(v.AuxInt)
4053 x := v_0
4054 y := v_1
4055 v.reset(OpRsh64x64)
4056 v.AuxInt = boolToAuxInt(c)
4057 v0 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
4058 v0.AddArg(x)
4059 v.AddArg2(v0, y)
4060 return true
4061 }
4062 }
4063 func rewriteValueWasm_OpRsh32x8(v *Value) bool {
4064 v_1 := v.Args[1]
4065 v_0 := v.Args[0]
4066 b := v.Block
4067 typ := &b.Func.Config.Types
4068
4069
4070 for {
4071 c := auxIntToBool(v.AuxInt)
4072 x := v_0
4073 y := v_1
4074 v.reset(OpRsh64x64)
4075 v.AuxInt = boolToAuxInt(c)
4076 v0 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
4077 v0.AddArg(x)
4078 v1 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
4079 v1.AddArg(y)
4080 v.AddArg2(v0, v1)
4081 return true
4082 }
4083 }
4084 func rewriteValueWasm_OpRsh64Ux16(v *Value) bool {
4085 v_1 := v.Args[1]
4086 v_0 := v.Args[0]
4087 b := v.Block
4088 typ := &b.Func.Config.Types
4089
4090
4091 for {
4092 c := auxIntToBool(v.AuxInt)
4093 x := v_0
4094 y := v_1
4095 v.reset(OpRsh64Ux64)
4096 v.AuxInt = boolToAuxInt(c)
4097 v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
4098 v0.AddArg(y)
4099 v.AddArg2(x, v0)
4100 return true
4101 }
4102 }
4103 func rewriteValueWasm_OpRsh64Ux32(v *Value) bool {
4104 v_1 := v.Args[1]
4105 v_0 := v.Args[0]
4106 b := v.Block
4107 typ := &b.Func.Config.Types
4108
4109
4110 for {
4111 c := auxIntToBool(v.AuxInt)
4112 x := v_0
4113 y := v_1
4114 v.reset(OpRsh64Ux64)
4115 v.AuxInt = boolToAuxInt(c)
4116 v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
4117 v0.AddArg(y)
4118 v.AddArg2(x, v0)
4119 return true
4120 }
4121 }
4122 func rewriteValueWasm_OpRsh64Ux64(v *Value) bool {
4123 v_1 := v.Args[1]
4124 v_0 := v.Args[0]
4125 b := v.Block
4126 typ := &b.Func.Config.Types
4127
4128
4129
4130 for {
4131 x := v_0
4132 y := v_1
4133 if !(shiftIsBounded(v)) {
4134 break
4135 }
4136 v.reset(OpWasmI64ShrU)
4137 v.AddArg2(x, y)
4138 return true
4139 }
4140
4141
4142
4143 for {
4144 x := v_0
4145 if v_1.Op != OpWasmI64Const {
4146 break
4147 }
4148 c := auxIntToInt64(v_1.AuxInt)
4149 if !(uint64(c) < 64) {
4150 break
4151 }
4152 v.reset(OpWasmI64ShrU)
4153 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
4154 v0.AuxInt = int64ToAuxInt(c)
4155 v.AddArg2(x, v0)
4156 return true
4157 }
4158
4159
4160
4161 for {
4162 if v_1.Op != OpWasmI64Const {
4163 break
4164 }
4165 c := auxIntToInt64(v_1.AuxInt)
4166 if !(uint64(c) >= 64) {
4167 break
4168 }
4169 v.reset(OpWasmI64Const)
4170 v.AuxInt = int64ToAuxInt(0)
4171 return true
4172 }
4173
4174
4175 for {
4176 x := v_0
4177 y := v_1
4178 v.reset(OpWasmSelect)
4179 v0 := b.NewValue0(v.Pos, OpWasmI64ShrU, typ.Int64)
4180 v0.AddArg2(x, y)
4181 v1 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
4182 v1.AuxInt = int64ToAuxInt(0)
4183 v2 := b.NewValue0(v.Pos, OpWasmI64LtU, typ.Bool)
4184 v3 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
4185 v3.AuxInt = int64ToAuxInt(64)
4186 v2.AddArg2(y, v3)
4187 v.AddArg3(v0, v1, v2)
4188 return true
4189 }
4190 }
4191 func rewriteValueWasm_OpRsh64Ux8(v *Value) bool {
4192 v_1 := v.Args[1]
4193 v_0 := v.Args[0]
4194 b := v.Block
4195 typ := &b.Func.Config.Types
4196
4197
4198 for {
4199 c := auxIntToBool(v.AuxInt)
4200 x := v_0
4201 y := v_1
4202 v.reset(OpRsh64Ux64)
4203 v.AuxInt = boolToAuxInt(c)
4204 v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
4205 v0.AddArg(y)
4206 v.AddArg2(x, v0)
4207 return true
4208 }
4209 }
4210 func rewriteValueWasm_OpRsh64x16(v *Value) bool {
4211 v_1 := v.Args[1]
4212 v_0 := v.Args[0]
4213 b := v.Block
4214 typ := &b.Func.Config.Types
4215
4216
4217 for {
4218 c := auxIntToBool(v.AuxInt)
4219 x := v_0
4220 y := v_1
4221 v.reset(OpRsh64x64)
4222 v.AuxInt = boolToAuxInt(c)
4223 v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
4224 v0.AddArg(y)
4225 v.AddArg2(x, v0)
4226 return true
4227 }
4228 }
4229 func rewriteValueWasm_OpRsh64x32(v *Value) bool {
4230 v_1 := v.Args[1]
4231 v_0 := v.Args[0]
4232 b := v.Block
4233 typ := &b.Func.Config.Types
4234
4235
4236 for {
4237 c := auxIntToBool(v.AuxInt)
4238 x := v_0
4239 y := v_1
4240 v.reset(OpRsh64x64)
4241 v.AuxInt = boolToAuxInt(c)
4242 v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
4243 v0.AddArg(y)
4244 v.AddArg2(x, v0)
4245 return true
4246 }
4247 }
4248 func rewriteValueWasm_OpRsh64x64(v *Value) bool {
4249 v_1 := v.Args[1]
4250 v_0 := v.Args[0]
4251 b := v.Block
4252 typ := &b.Func.Config.Types
4253
4254
4255
4256 for {
4257 x := v_0
4258 y := v_1
4259 if !(shiftIsBounded(v)) {
4260 break
4261 }
4262 v.reset(OpWasmI64ShrS)
4263 v.AddArg2(x, y)
4264 return true
4265 }
4266
4267
4268
4269 for {
4270 x := v_0
4271 if v_1.Op != OpWasmI64Const {
4272 break
4273 }
4274 c := auxIntToInt64(v_1.AuxInt)
4275 if !(uint64(c) < 64) {
4276 break
4277 }
4278 v.reset(OpWasmI64ShrS)
4279 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
4280 v0.AuxInt = int64ToAuxInt(c)
4281 v.AddArg2(x, v0)
4282 return true
4283 }
4284
4285
4286
4287 for {
4288 x := v_0
4289 if v_1.Op != OpWasmI64Const {
4290 break
4291 }
4292 c := auxIntToInt64(v_1.AuxInt)
4293 if !(uint64(c) >= 64) {
4294 break
4295 }
4296 v.reset(OpWasmI64ShrS)
4297 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
4298 v0.AuxInt = int64ToAuxInt(63)
4299 v.AddArg2(x, v0)
4300 return true
4301 }
4302
4303
4304 for {
4305 x := v_0
4306 y := v_1
4307 v.reset(OpWasmI64ShrS)
4308 v0 := b.NewValue0(v.Pos, OpWasmSelect, typ.Int64)
4309 v1 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
4310 v1.AuxInt = int64ToAuxInt(63)
4311 v2 := b.NewValue0(v.Pos, OpWasmI64LtU, typ.Bool)
4312 v3 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
4313 v3.AuxInt = int64ToAuxInt(64)
4314 v2.AddArg2(y, v3)
4315 v0.AddArg3(y, v1, v2)
4316 v.AddArg2(x, v0)
4317 return true
4318 }
4319 }
4320 func rewriteValueWasm_OpRsh64x8(v *Value) bool {
4321 v_1 := v.Args[1]
4322 v_0 := v.Args[0]
4323 b := v.Block
4324 typ := &b.Func.Config.Types
4325
4326
4327 for {
4328 c := auxIntToBool(v.AuxInt)
4329 x := v_0
4330 y := v_1
4331 v.reset(OpRsh64x64)
4332 v.AuxInt = boolToAuxInt(c)
4333 v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
4334 v0.AddArg(y)
4335 v.AddArg2(x, v0)
4336 return true
4337 }
4338 }
4339 func rewriteValueWasm_OpRsh8Ux16(v *Value) bool {
4340 v_1 := v.Args[1]
4341 v_0 := v.Args[0]
4342 b := v.Block
4343 typ := &b.Func.Config.Types
4344
4345
4346 for {
4347 c := auxIntToBool(v.AuxInt)
4348 x := v_0
4349 y := v_1
4350 v.reset(OpRsh64Ux64)
4351 v.AuxInt = boolToAuxInt(c)
4352 v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
4353 v0.AddArg(x)
4354 v1 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
4355 v1.AddArg(y)
4356 v.AddArg2(v0, v1)
4357 return true
4358 }
4359 }
4360 func rewriteValueWasm_OpRsh8Ux32(v *Value) bool {
4361 v_1 := v.Args[1]
4362 v_0 := v.Args[0]
4363 b := v.Block
4364 typ := &b.Func.Config.Types
4365
4366
4367 for {
4368 c := auxIntToBool(v.AuxInt)
4369 x := v_0
4370 y := v_1
4371 v.reset(OpRsh64Ux64)
4372 v.AuxInt = boolToAuxInt(c)
4373 v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
4374 v0.AddArg(x)
4375 v1 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
4376 v1.AddArg(y)
4377 v.AddArg2(v0, v1)
4378 return true
4379 }
4380 }
4381 func rewriteValueWasm_OpRsh8Ux64(v *Value) bool {
4382 v_1 := v.Args[1]
4383 v_0 := v.Args[0]
4384 b := v.Block
4385 typ := &b.Func.Config.Types
4386
4387
4388 for {
4389 c := auxIntToBool(v.AuxInt)
4390 x := v_0
4391 y := v_1
4392 v.reset(OpRsh64Ux64)
4393 v.AuxInt = boolToAuxInt(c)
4394 v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
4395 v0.AddArg(x)
4396 v.AddArg2(v0, y)
4397 return true
4398 }
4399 }
4400 func rewriteValueWasm_OpRsh8Ux8(v *Value) bool {
4401 v_1 := v.Args[1]
4402 v_0 := v.Args[0]
4403 b := v.Block
4404 typ := &b.Func.Config.Types
4405
4406
4407 for {
4408 c := auxIntToBool(v.AuxInt)
4409 x := v_0
4410 y := v_1
4411 v.reset(OpRsh64Ux64)
4412 v.AuxInt = boolToAuxInt(c)
4413 v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
4414 v0.AddArg(x)
4415 v1 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
4416 v1.AddArg(y)
4417 v.AddArg2(v0, v1)
4418 return true
4419 }
4420 }
4421 func rewriteValueWasm_OpRsh8x16(v *Value) bool {
4422 v_1 := v.Args[1]
4423 v_0 := v.Args[0]
4424 b := v.Block
4425 typ := &b.Func.Config.Types
4426
4427
4428 for {
4429 c := auxIntToBool(v.AuxInt)
4430 x := v_0
4431 y := v_1
4432 v.reset(OpRsh64x64)
4433 v.AuxInt = boolToAuxInt(c)
4434 v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
4435 v0.AddArg(x)
4436 v1 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
4437 v1.AddArg(y)
4438 v.AddArg2(v0, v1)
4439 return true
4440 }
4441 }
4442 func rewriteValueWasm_OpRsh8x32(v *Value) bool {
4443 v_1 := v.Args[1]
4444 v_0 := v.Args[0]
4445 b := v.Block
4446 typ := &b.Func.Config.Types
4447
4448
4449 for {
4450 c := auxIntToBool(v.AuxInt)
4451 x := v_0
4452 y := v_1
4453 v.reset(OpRsh64x64)
4454 v.AuxInt = boolToAuxInt(c)
4455 v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
4456 v0.AddArg(x)
4457 v1 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
4458 v1.AddArg(y)
4459 v.AddArg2(v0, v1)
4460 return true
4461 }
4462 }
4463 func rewriteValueWasm_OpRsh8x64(v *Value) bool {
4464 v_1 := v.Args[1]
4465 v_0 := v.Args[0]
4466 b := v.Block
4467 typ := &b.Func.Config.Types
4468
4469
4470 for {
4471 c := auxIntToBool(v.AuxInt)
4472 x := v_0
4473 y := v_1
4474 v.reset(OpRsh64x64)
4475 v.AuxInt = boolToAuxInt(c)
4476 v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
4477 v0.AddArg(x)
4478 v.AddArg2(v0, y)
4479 return true
4480 }
4481 }
4482 func rewriteValueWasm_OpRsh8x8(v *Value) bool {
4483 v_1 := v.Args[1]
4484 v_0 := v.Args[0]
4485 b := v.Block
4486 typ := &b.Func.Config.Types
4487
4488
4489 for {
4490 c := auxIntToBool(v.AuxInt)
4491 x := v_0
4492 y := v_1
4493 v.reset(OpRsh64x64)
4494 v.AuxInt = boolToAuxInt(c)
4495 v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
4496 v0.AddArg(x)
4497 v1 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
4498 v1.AddArg(y)
4499 v.AddArg2(v0, v1)
4500 return true
4501 }
4502 }
4503 func rewriteValueWasm_OpSelect0(v *Value) bool {
4504 v_0 := v.Args[0]
4505
4506
4507 for {
4508 t := v.Type
4509 if v_0.Op != OpMul64uhilo {
4510 break
4511 }
4512 y := v_0.Args[1]
4513 x := v_0.Args[0]
4514 v.reset(OpHmul64u)
4515 v.Type = t
4516 v.AddArg2(x, y)
4517 return true
4518 }
4519 return false
4520 }
4521 func rewriteValueWasm_OpSelect1(v *Value) bool {
4522 v_0 := v.Args[0]
4523
4524
4525 for {
4526 if v_0.Op != OpMul64uhilo {
4527 break
4528 }
4529 y := v_0.Args[1]
4530 x := v_0.Args[0]
4531 v.reset(OpWasmI64Mul)
4532 v.AddArg2(x, y)
4533 return true
4534 }
4535 return false
4536 }
4537 func rewriteValueWasm_OpShiftAllLeftInt16x8(v *Value) bool {
4538 v_1 := v.Args[1]
4539 v_0 := v.Args[0]
4540 b := v.Block
4541 typ := &b.Func.Config.Types
4542
4543
4544
4545 for {
4546 x := v_0
4547 d := v_1
4548 if d.Op != OpConst64 {
4549 break
4550 }
4551 c := auxIntToInt64(d.AuxInt)
4552 if !(uint64(c) < 16) {
4553 break
4554 }
4555 v.reset(OpWasmI16x8Shl)
4556 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
4557 v0.AuxInt = int64ToAuxInt(c)
4558 v.AddArg2(x, v0)
4559 return true
4560 }
4561
4562
4563
4564 for {
4565 x := v_0
4566 d := v_1
4567 if d.Op != OpWasmI64Const {
4568 break
4569 }
4570 c := auxIntToInt64(d.AuxInt)
4571 if !(uint64(c) < 16) {
4572 break
4573 }
4574 v.reset(OpWasmI16x8Shl)
4575 v.AddArg2(x, d)
4576 return true
4577 }
4578
4579
4580 for {
4581 x := v_0
4582 y := v_1
4583 v.reset(OpWasmSelectV)
4584 v0 := b.NewValue0(v.Pos, OpWasmI16x8Shl, typ.Vec128)
4585 v0.AddArg2(x, y)
4586 v1 := b.NewValue0(v.Pos, OpWasmV128Xor, typ.Vec128)
4587 v1.AddArg2(x, x)
4588 v2 := b.NewValue0(v.Pos, OpWasmI64LtU, typ.Bool)
4589 v3 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
4590 v3.AuxInt = int64ToAuxInt(16)
4591 v2.AddArg2(y, v3)
4592 v.AddArg3(v0, v1, v2)
4593 return true
4594 }
4595 }
4596 func rewriteValueWasm_OpShiftAllLeftInt32x4(v *Value) bool {
4597 v_1 := v.Args[1]
4598 v_0 := v.Args[0]
4599 b := v.Block
4600 typ := &b.Func.Config.Types
4601
4602
4603
4604 for {
4605 x := v_0
4606 d := v_1
4607 if d.Op != OpConst64 {
4608 break
4609 }
4610 c := auxIntToInt64(d.AuxInt)
4611 if !(uint64(c) < 32) {
4612 break
4613 }
4614 v.reset(OpWasmI32x4Shl)
4615 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
4616 v0.AuxInt = int64ToAuxInt(c)
4617 v.AddArg2(x, v0)
4618 return true
4619 }
4620
4621
4622
4623 for {
4624 x := v_0
4625 d := v_1
4626 if d.Op != OpWasmI64Const {
4627 break
4628 }
4629 c := auxIntToInt64(d.AuxInt)
4630 if !(uint64(c) < 32) {
4631 break
4632 }
4633 v.reset(OpWasmI32x4Shl)
4634 v.AddArg2(x, d)
4635 return true
4636 }
4637
4638
4639 for {
4640 x := v_0
4641 y := v_1
4642 v.reset(OpWasmSelectV)
4643 v0 := b.NewValue0(v.Pos, OpWasmI32x4Shl, typ.Vec128)
4644 v0.AddArg2(x, y)
4645 v1 := b.NewValue0(v.Pos, OpWasmV128Xor, typ.Vec128)
4646 v1.AddArg2(x, x)
4647 v2 := b.NewValue0(v.Pos, OpWasmI64LtU, typ.Bool)
4648 v3 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
4649 v3.AuxInt = int64ToAuxInt(32)
4650 v2.AddArg2(y, v3)
4651 v.AddArg3(v0, v1, v2)
4652 return true
4653 }
4654 }
4655 func rewriteValueWasm_OpShiftAllLeftInt64x2(v *Value) bool {
4656 v_1 := v.Args[1]
4657 v_0 := v.Args[0]
4658 b := v.Block
4659 typ := &b.Func.Config.Types
4660
4661
4662
4663 for {
4664 x := v_0
4665 d := v_1
4666 if d.Op != OpConst64 {
4667 break
4668 }
4669 c := auxIntToInt64(d.AuxInt)
4670 if !(uint64(c) < 64) {
4671 break
4672 }
4673 v.reset(OpWasmI64x2Shl)
4674 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
4675 v0.AuxInt = int64ToAuxInt(c)
4676 v.AddArg2(x, v0)
4677 return true
4678 }
4679
4680
4681
4682 for {
4683 x := v_0
4684 d := v_1
4685 if d.Op != OpWasmI64Const {
4686 break
4687 }
4688 c := auxIntToInt64(d.AuxInt)
4689 if !(uint64(c) < 64) {
4690 break
4691 }
4692 v.reset(OpWasmI64x2Shl)
4693 v.AddArg2(x, d)
4694 return true
4695 }
4696
4697
4698 for {
4699 x := v_0
4700 y := v_1
4701 v.reset(OpWasmSelectV)
4702 v0 := b.NewValue0(v.Pos, OpWasmI64x2Shl, typ.Vec128)
4703 v0.AddArg2(x, y)
4704 v1 := b.NewValue0(v.Pos, OpWasmV128Xor, typ.Vec128)
4705 v1.AddArg2(x, x)
4706 v2 := b.NewValue0(v.Pos, OpWasmI64LtU, typ.Bool)
4707 v3 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
4708 v3.AuxInt = int64ToAuxInt(64)
4709 v2.AddArg2(y, v3)
4710 v.AddArg3(v0, v1, v2)
4711 return true
4712 }
4713 }
4714 func rewriteValueWasm_OpShiftAllLeftInt8x16(v *Value) bool {
4715 v_1 := v.Args[1]
4716 v_0 := v.Args[0]
4717 b := v.Block
4718 typ := &b.Func.Config.Types
4719
4720
4721
4722 for {
4723 x := v_0
4724 d := v_1
4725 if d.Op != OpConst64 {
4726 break
4727 }
4728 c := auxIntToInt64(d.AuxInt)
4729 if !(uint64(c) < 8) {
4730 break
4731 }
4732 v.reset(OpWasmI8x16Shl)
4733 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
4734 v0.AuxInt = int64ToAuxInt(c)
4735 v.AddArg2(x, v0)
4736 return true
4737 }
4738
4739
4740
4741 for {
4742 x := v_0
4743 d := v_1
4744 if d.Op != OpWasmI64Const {
4745 break
4746 }
4747 c := auxIntToInt64(d.AuxInt)
4748 if !(uint64(c) < 8) {
4749 break
4750 }
4751 v.reset(OpWasmI8x16Shl)
4752 v.AddArg2(x, d)
4753 return true
4754 }
4755
4756
4757 for {
4758 x := v_0
4759 y := v_1
4760 v.reset(OpWasmSelectV)
4761 v0 := b.NewValue0(v.Pos, OpWasmI8x16Shl, typ.Vec128)
4762 v0.AddArg2(x, y)
4763 v1 := b.NewValue0(v.Pos, OpWasmV128Xor, typ.Vec128)
4764 v1.AddArg2(x, x)
4765 v2 := b.NewValue0(v.Pos, OpWasmI64LtU, typ.Bool)
4766 v3 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
4767 v3.AuxInt = int64ToAuxInt(8)
4768 v2.AddArg2(y, v3)
4769 v.AddArg3(v0, v1, v2)
4770 return true
4771 }
4772 }
4773 func rewriteValueWasm_OpShiftAllLeftUint16x8(v *Value) bool {
4774 v_1 := v.Args[1]
4775 v_0 := v.Args[0]
4776 b := v.Block
4777 typ := &b.Func.Config.Types
4778
4779
4780
4781 for {
4782 x := v_0
4783 d := v_1
4784 if d.Op != OpConst64 {
4785 break
4786 }
4787 c := auxIntToInt64(d.AuxInt)
4788 if !(uint64(c) < 16) {
4789 break
4790 }
4791 v.reset(OpWasmI16x8Shl)
4792 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
4793 v0.AuxInt = int64ToAuxInt(c)
4794 v.AddArg2(x, v0)
4795 return true
4796 }
4797
4798
4799
4800 for {
4801 x := v_0
4802 d := v_1
4803 if d.Op != OpWasmI64Const {
4804 break
4805 }
4806 c := auxIntToInt64(d.AuxInt)
4807 if !(uint64(c) < 16) {
4808 break
4809 }
4810 v.reset(OpWasmI16x8Shl)
4811 v.AddArg2(x, d)
4812 return true
4813 }
4814
4815
4816 for {
4817 x := v_0
4818 y := v_1
4819 v.reset(OpWasmSelectV)
4820 v0 := b.NewValue0(v.Pos, OpWasmI16x8Shl, typ.Vec128)
4821 v0.AddArg2(x, y)
4822 v1 := b.NewValue0(v.Pos, OpWasmV128Xor, typ.Vec128)
4823 v1.AddArg2(x, x)
4824 v2 := b.NewValue0(v.Pos, OpWasmI64LtU, typ.Bool)
4825 v3 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
4826 v3.AuxInt = int64ToAuxInt(16)
4827 v2.AddArg2(y, v3)
4828 v.AddArg3(v0, v1, v2)
4829 return true
4830 }
4831 }
4832 func rewriteValueWasm_OpShiftAllLeftUint32x4(v *Value) bool {
4833 v_1 := v.Args[1]
4834 v_0 := v.Args[0]
4835 b := v.Block
4836 typ := &b.Func.Config.Types
4837
4838
4839
4840 for {
4841 x := v_0
4842 d := v_1
4843 if d.Op != OpConst64 {
4844 break
4845 }
4846 c := auxIntToInt64(d.AuxInt)
4847 if !(uint64(c) < 32) {
4848 break
4849 }
4850 v.reset(OpWasmI32x4Shl)
4851 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
4852 v0.AuxInt = int64ToAuxInt(c)
4853 v.AddArg2(x, v0)
4854 return true
4855 }
4856
4857
4858
4859 for {
4860 x := v_0
4861 d := v_1
4862 if d.Op != OpWasmI64Const {
4863 break
4864 }
4865 c := auxIntToInt64(d.AuxInt)
4866 if !(uint64(c) < 32) {
4867 break
4868 }
4869 v.reset(OpWasmI32x4Shl)
4870 v.AddArg2(x, d)
4871 return true
4872 }
4873
4874
4875 for {
4876 x := v_0
4877 y := v_1
4878 v.reset(OpWasmSelectV)
4879 v0 := b.NewValue0(v.Pos, OpWasmI32x4Shl, typ.Vec128)
4880 v0.AddArg2(x, y)
4881 v1 := b.NewValue0(v.Pos, OpWasmV128Xor, typ.Vec128)
4882 v1.AddArg2(x, x)
4883 v2 := b.NewValue0(v.Pos, OpWasmI64LtU, typ.Bool)
4884 v3 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
4885 v3.AuxInt = int64ToAuxInt(32)
4886 v2.AddArg2(y, v3)
4887 v.AddArg3(v0, v1, v2)
4888 return true
4889 }
4890 }
4891 func rewriteValueWasm_OpShiftAllLeftUint64x2(v *Value) bool {
4892 v_1 := v.Args[1]
4893 v_0 := v.Args[0]
4894 b := v.Block
4895 typ := &b.Func.Config.Types
4896
4897
4898
4899 for {
4900 x := v_0
4901 d := v_1
4902 if d.Op != OpConst64 {
4903 break
4904 }
4905 c := auxIntToInt64(d.AuxInt)
4906 if !(uint64(c) < 64) {
4907 break
4908 }
4909 v.reset(OpWasmI64x2Shl)
4910 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
4911 v0.AuxInt = int64ToAuxInt(c)
4912 v.AddArg2(x, v0)
4913 return true
4914 }
4915
4916
4917
4918 for {
4919 x := v_0
4920 d := v_1
4921 if d.Op != OpWasmI64Const {
4922 break
4923 }
4924 c := auxIntToInt64(d.AuxInt)
4925 if !(uint64(c) < 64) {
4926 break
4927 }
4928 v.reset(OpWasmI64x2Shl)
4929 v.AddArg2(x, d)
4930 return true
4931 }
4932
4933
4934 for {
4935 x := v_0
4936 y := v_1
4937 v.reset(OpWasmSelectV)
4938 v0 := b.NewValue0(v.Pos, OpWasmI64x2Shl, typ.Vec128)
4939 v0.AddArg2(x, y)
4940 v1 := b.NewValue0(v.Pos, OpWasmV128Xor, typ.Vec128)
4941 v1.AddArg2(x, x)
4942 v2 := b.NewValue0(v.Pos, OpWasmI64LtU, typ.Bool)
4943 v3 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
4944 v3.AuxInt = int64ToAuxInt(64)
4945 v2.AddArg2(y, v3)
4946 v.AddArg3(v0, v1, v2)
4947 return true
4948 }
4949 }
4950 func rewriteValueWasm_OpShiftAllLeftUint8x16(v *Value) bool {
4951 v_1 := v.Args[1]
4952 v_0 := v.Args[0]
4953 b := v.Block
4954 typ := &b.Func.Config.Types
4955
4956
4957
4958 for {
4959 x := v_0
4960 d := v_1
4961 if d.Op != OpConst64 {
4962 break
4963 }
4964 c := auxIntToInt64(d.AuxInt)
4965 if !(uint64(c) < 8) {
4966 break
4967 }
4968 v.reset(OpWasmI8x16Shl)
4969 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
4970 v0.AuxInt = int64ToAuxInt(c)
4971 v.AddArg2(x, v0)
4972 return true
4973 }
4974
4975
4976
4977 for {
4978 x := v_0
4979 d := v_1
4980 if d.Op != OpWasmI64Const {
4981 break
4982 }
4983 c := auxIntToInt64(d.AuxInt)
4984 if !(uint64(c) < 8) {
4985 break
4986 }
4987 v.reset(OpWasmI8x16Shl)
4988 v.AddArg2(x, d)
4989 return true
4990 }
4991
4992
4993 for {
4994 x := v_0
4995 y := v_1
4996 v.reset(OpWasmSelectV)
4997 v0 := b.NewValue0(v.Pos, OpWasmI8x16Shl, typ.Vec128)
4998 v0.AddArg2(x, y)
4999 v1 := b.NewValue0(v.Pos, OpWasmV128Xor, typ.Vec128)
5000 v1.AddArg2(x, x)
5001 v2 := b.NewValue0(v.Pos, OpWasmI64LtU, typ.Bool)
5002 v3 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
5003 v3.AuxInt = int64ToAuxInt(8)
5004 v2.AddArg2(y, v3)
5005 v.AddArg3(v0, v1, v2)
5006 return true
5007 }
5008 }
5009 func rewriteValueWasm_OpShiftAllRightInt16x8(v *Value) bool {
5010 v_1 := v.Args[1]
5011 v_0 := v.Args[0]
5012 b := v.Block
5013 typ := &b.Func.Config.Types
5014
5015
5016
5017 for {
5018 x := v_0
5019 d := v_1
5020 if d.Op != OpConst64 {
5021 break
5022 }
5023 c := auxIntToInt64(d.AuxInt)
5024 if !(uint64(c) < 16) {
5025 break
5026 }
5027 v.reset(OpWasmI16x8ShrS)
5028 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
5029 v0.AuxInt = int64ToAuxInt(c)
5030 v.AddArg2(x, v0)
5031 return true
5032 }
5033
5034
5035
5036 for {
5037 x := v_0
5038 d := v_1
5039 if d.Op != OpWasmI64Const {
5040 break
5041 }
5042 c := auxIntToInt64(d.AuxInt)
5043 if !(uint64(c) < 16) {
5044 break
5045 }
5046 v.reset(OpWasmI16x8ShrS)
5047 v.AddArg2(x, d)
5048 return true
5049 }
5050
5051
5052 for {
5053 x := v_0
5054 y := v_1
5055 v.reset(OpWasmSelectV)
5056 v0 := b.NewValue0(v.Pos, OpWasmI16x8ShrS, typ.Vec128)
5057 v0.AddArg2(x, y)
5058 v1 := b.NewValue0(v.Pos, OpWasmI16x8ShrS, typ.Vec128)
5059 v2 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
5060 v2.AuxInt = int64ToAuxInt(15)
5061 v1.AddArg2(x, v2)
5062 v3 := b.NewValue0(v.Pos, OpWasmI64LtU, typ.Bool)
5063 v4 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
5064 v4.AuxInt = int64ToAuxInt(16)
5065 v3.AddArg2(y, v4)
5066 v.AddArg3(v0, v1, v3)
5067 return true
5068 }
5069 }
5070 func rewriteValueWasm_OpShiftAllRightInt32x4(v *Value) bool {
5071 v_1 := v.Args[1]
5072 v_0 := v.Args[0]
5073 b := v.Block
5074 typ := &b.Func.Config.Types
5075
5076
5077
5078 for {
5079 x := v_0
5080 d := v_1
5081 if d.Op != OpConst64 {
5082 break
5083 }
5084 c := auxIntToInt64(d.AuxInt)
5085 if !(uint64(c) < 32) {
5086 break
5087 }
5088 v.reset(OpWasmI32x4ShrS)
5089 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
5090 v0.AuxInt = int64ToAuxInt(c)
5091 v.AddArg2(x, v0)
5092 return true
5093 }
5094
5095
5096
5097 for {
5098 x := v_0
5099 d := v_1
5100 if d.Op != OpWasmI64Const {
5101 break
5102 }
5103 c := auxIntToInt64(d.AuxInt)
5104 if !(uint64(c) < 32) {
5105 break
5106 }
5107 v.reset(OpWasmI32x4ShrS)
5108 v.AddArg2(x, d)
5109 return true
5110 }
5111
5112
5113 for {
5114 x := v_0
5115 y := v_1
5116 v.reset(OpWasmSelectV)
5117 v0 := b.NewValue0(v.Pos, OpWasmI32x4ShrS, typ.Vec128)
5118 v0.AddArg2(x, y)
5119 v1 := b.NewValue0(v.Pos, OpWasmI32x4ShrS, typ.Vec128)
5120 v2 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
5121 v2.AuxInt = int64ToAuxInt(31)
5122 v1.AddArg2(x, v2)
5123 v3 := b.NewValue0(v.Pos, OpWasmI64LtU, typ.Bool)
5124 v4 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
5125 v4.AuxInt = int64ToAuxInt(32)
5126 v3.AddArg2(y, v4)
5127 v.AddArg3(v0, v1, v3)
5128 return true
5129 }
5130 }
5131 func rewriteValueWasm_OpShiftAllRightInt64x2(v *Value) bool {
5132 v_1 := v.Args[1]
5133 v_0 := v.Args[0]
5134 b := v.Block
5135 typ := &b.Func.Config.Types
5136
5137
5138
5139 for {
5140 x := v_0
5141 d := v_1
5142 if d.Op != OpConst64 {
5143 break
5144 }
5145 c := auxIntToInt64(d.AuxInt)
5146 if !(uint64(c) < 64) {
5147 break
5148 }
5149 v.reset(OpWasmI64x2ShrS)
5150 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
5151 v0.AuxInt = int64ToAuxInt(c)
5152 v.AddArg2(x, v0)
5153 return true
5154 }
5155
5156
5157
5158 for {
5159 x := v_0
5160 d := v_1
5161 if d.Op != OpWasmI64Const {
5162 break
5163 }
5164 c := auxIntToInt64(d.AuxInt)
5165 if !(uint64(c) < 64) {
5166 break
5167 }
5168 v.reset(OpWasmI64x2ShrS)
5169 v.AddArg2(x, d)
5170 return true
5171 }
5172
5173
5174 for {
5175 x := v_0
5176 y := v_1
5177 v.reset(OpWasmSelectV)
5178 v0 := b.NewValue0(v.Pos, OpWasmI64x2ShrS, typ.Vec128)
5179 v0.AddArg2(x, y)
5180 v1 := b.NewValue0(v.Pos, OpWasmI64x2ShrS, typ.Vec128)
5181 v2 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
5182 v2.AuxInt = int64ToAuxInt(63)
5183 v1.AddArg2(x, v2)
5184 v3 := b.NewValue0(v.Pos, OpWasmI64LtU, typ.Bool)
5185 v4 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
5186 v4.AuxInt = int64ToAuxInt(64)
5187 v3.AddArg2(y, v4)
5188 v.AddArg3(v0, v1, v3)
5189 return true
5190 }
5191 }
5192 func rewriteValueWasm_OpShiftAllRightInt8x16(v *Value) bool {
5193 v_1 := v.Args[1]
5194 v_0 := v.Args[0]
5195 b := v.Block
5196 typ := &b.Func.Config.Types
5197
5198
5199
5200 for {
5201 x := v_0
5202 d := v_1
5203 if d.Op != OpConst64 {
5204 break
5205 }
5206 c := auxIntToInt64(d.AuxInt)
5207 if !(uint64(c) < 8) {
5208 break
5209 }
5210 v.reset(OpWasmI8x16ShrS)
5211 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
5212 v0.AuxInt = int64ToAuxInt(c)
5213 v.AddArg2(x, v0)
5214 return true
5215 }
5216
5217
5218
5219 for {
5220 x := v_0
5221 d := v_1
5222 if d.Op != OpWasmI64Const {
5223 break
5224 }
5225 c := auxIntToInt64(d.AuxInt)
5226 if !(uint64(c) < 8) {
5227 break
5228 }
5229 v.reset(OpWasmI8x16ShrS)
5230 v.AddArg2(x, d)
5231 return true
5232 }
5233
5234
5235 for {
5236 x := v_0
5237 y := v_1
5238 v.reset(OpWasmSelectV)
5239 v0 := b.NewValue0(v.Pos, OpWasmI8x16ShrS, typ.Vec128)
5240 v0.AddArg2(x, y)
5241 v1 := b.NewValue0(v.Pos, OpWasmI8x16ShrS, typ.Vec128)
5242 v2 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
5243 v2.AuxInt = int64ToAuxInt(7)
5244 v1.AddArg2(x, v2)
5245 v3 := b.NewValue0(v.Pos, OpWasmI64LtU, typ.Bool)
5246 v4 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
5247 v4.AuxInt = int64ToAuxInt(8)
5248 v3.AddArg2(y, v4)
5249 v.AddArg3(v0, v1, v3)
5250 return true
5251 }
5252 }
5253 func rewriteValueWasm_OpShiftAllRightUint16x8(v *Value) bool {
5254 v_1 := v.Args[1]
5255 v_0 := v.Args[0]
5256 b := v.Block
5257 typ := &b.Func.Config.Types
5258
5259
5260
5261 for {
5262 x := v_0
5263 d := v_1
5264 if d.Op != OpConst64 {
5265 break
5266 }
5267 c := auxIntToInt64(d.AuxInt)
5268 if !(uint64(c) < 16) {
5269 break
5270 }
5271 v.reset(OpWasmI16x8ShrU)
5272 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
5273 v0.AuxInt = int64ToAuxInt(c)
5274 v.AddArg2(x, v0)
5275 return true
5276 }
5277
5278
5279
5280 for {
5281 x := v_0
5282 d := v_1
5283 if d.Op != OpWasmI64Const {
5284 break
5285 }
5286 c := auxIntToInt64(d.AuxInt)
5287 if !(uint64(c) < 16) {
5288 break
5289 }
5290 v.reset(OpWasmI16x8ShrU)
5291 v.AddArg2(x, d)
5292 return true
5293 }
5294
5295
5296 for {
5297 x := v_0
5298 y := v_1
5299 v.reset(OpWasmSelectV)
5300 v0 := b.NewValue0(v.Pos, OpWasmI16x8ShrU, typ.Vec128)
5301 v0.AddArg2(x, y)
5302 v1 := b.NewValue0(v.Pos, OpWasmV128Xor, typ.Vec128)
5303 v1.AddArg2(x, x)
5304 v2 := b.NewValue0(v.Pos, OpWasmI64LtU, typ.Bool)
5305 v3 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
5306 v3.AuxInt = int64ToAuxInt(16)
5307 v2.AddArg2(y, v3)
5308 v.AddArg3(v0, v1, v2)
5309 return true
5310 }
5311 }
5312 func rewriteValueWasm_OpShiftAllRightUint32x4(v *Value) bool {
5313 v_1 := v.Args[1]
5314 v_0 := v.Args[0]
5315 b := v.Block
5316 typ := &b.Func.Config.Types
5317
5318
5319
5320 for {
5321 x := v_0
5322 d := v_1
5323 if d.Op != OpConst64 {
5324 break
5325 }
5326 c := auxIntToInt64(d.AuxInt)
5327 if !(uint64(c) < 32) {
5328 break
5329 }
5330 v.reset(OpWasmI32x4ShrU)
5331 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
5332 v0.AuxInt = int64ToAuxInt(c)
5333 v.AddArg2(x, v0)
5334 return true
5335 }
5336
5337
5338
5339 for {
5340 x := v_0
5341 d := v_1
5342 if d.Op != OpWasmI64Const {
5343 break
5344 }
5345 c := auxIntToInt64(d.AuxInt)
5346 if !(uint64(c) < 32) {
5347 break
5348 }
5349 v.reset(OpWasmI32x4ShrU)
5350 v.AddArg2(x, d)
5351 return true
5352 }
5353
5354
5355 for {
5356 x := v_0
5357 y := v_1
5358 v.reset(OpWasmSelectV)
5359 v0 := b.NewValue0(v.Pos, OpWasmI32x4ShrU, typ.Vec128)
5360 v0.AddArg2(x, y)
5361 v1 := b.NewValue0(v.Pos, OpWasmV128Xor, typ.Vec128)
5362 v1.AddArg2(x, x)
5363 v2 := b.NewValue0(v.Pos, OpWasmI64LtU, typ.Bool)
5364 v3 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
5365 v3.AuxInt = int64ToAuxInt(32)
5366 v2.AddArg2(y, v3)
5367 v.AddArg3(v0, v1, v2)
5368 return true
5369 }
5370 }
5371 func rewriteValueWasm_OpShiftAllRightUint64x2(v *Value) bool {
5372 v_1 := v.Args[1]
5373 v_0 := v.Args[0]
5374 b := v.Block
5375 typ := &b.Func.Config.Types
5376
5377
5378
5379 for {
5380 x := v_0
5381 d := v_1
5382 if d.Op != OpConst64 {
5383 break
5384 }
5385 c := auxIntToInt64(d.AuxInt)
5386 if !(uint64(c) < 64) {
5387 break
5388 }
5389 v.reset(OpWasmI64x2ShrU)
5390 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
5391 v0.AuxInt = int64ToAuxInt(c)
5392 v.AddArg2(x, v0)
5393 return true
5394 }
5395
5396
5397
5398 for {
5399 x := v_0
5400 d := v_1
5401 if d.Op != OpWasmI64Const {
5402 break
5403 }
5404 c := auxIntToInt64(d.AuxInt)
5405 if !(uint64(c) < 64) {
5406 break
5407 }
5408 v.reset(OpWasmI64x2ShrU)
5409 v.AddArg2(x, d)
5410 return true
5411 }
5412
5413
5414 for {
5415 x := v_0
5416 y := v_1
5417 v.reset(OpWasmSelectV)
5418 v0 := b.NewValue0(v.Pos, OpWasmI64x2ShrU, typ.Vec128)
5419 v0.AddArg2(x, y)
5420 v1 := b.NewValue0(v.Pos, OpWasmV128Xor, typ.Vec128)
5421 v1.AddArg2(x, x)
5422 v2 := b.NewValue0(v.Pos, OpWasmI64LtU, typ.Bool)
5423 v3 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
5424 v3.AuxInt = int64ToAuxInt(64)
5425 v2.AddArg2(y, v3)
5426 v.AddArg3(v0, v1, v2)
5427 return true
5428 }
5429 }
5430 func rewriteValueWasm_OpShiftAllRightUint8x16(v *Value) bool {
5431 v_1 := v.Args[1]
5432 v_0 := v.Args[0]
5433 b := v.Block
5434 typ := &b.Func.Config.Types
5435
5436
5437
5438 for {
5439 x := v_0
5440 d := v_1
5441 if d.Op != OpConst64 {
5442 break
5443 }
5444 c := auxIntToInt64(d.AuxInt)
5445 if !(uint64(c) < 8) {
5446 break
5447 }
5448 v.reset(OpWasmI8x16ShrU)
5449 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
5450 v0.AuxInt = int64ToAuxInt(c)
5451 v.AddArg2(x, v0)
5452 return true
5453 }
5454
5455
5456
5457 for {
5458 x := v_0
5459 d := v_1
5460 if d.Op != OpWasmI64Const {
5461 break
5462 }
5463 c := auxIntToInt64(d.AuxInt)
5464 if !(uint64(c) < 8) {
5465 break
5466 }
5467 v.reset(OpWasmI8x16ShrU)
5468 v.AddArg2(x, d)
5469 return true
5470 }
5471
5472
5473 for {
5474 x := v_0
5475 y := v_1
5476 v.reset(OpWasmSelectV)
5477 v0 := b.NewValue0(v.Pos, OpWasmI8x16ShrU, typ.Vec128)
5478 v0.AddArg2(x, y)
5479 v1 := b.NewValue0(v.Pos, OpWasmV128Xor, typ.Vec128)
5480 v1.AddArg2(x, x)
5481 v2 := b.NewValue0(v.Pos, OpWasmI64LtU, typ.Bool)
5482 v3 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
5483 v3.AuxInt = int64ToAuxInt(8)
5484 v2.AddArg2(y, v3)
5485 v.AddArg3(v0, v1, v2)
5486 return true
5487 }
5488 }
5489 func rewriteValueWasm_OpSignExt16to32(v *Value) bool {
5490 v_0 := v.Args[0]
5491
5492
5493 for {
5494 x := v_0
5495 if x.Op != OpWasmI64Load16S {
5496 break
5497 }
5498 v.copyOf(x)
5499 return true
5500 }
5501
5502
5503 for {
5504 x := v_0
5505 v.reset(OpWasmI64Extend16S)
5506 v.AddArg(x)
5507 return true
5508 }
5509 }
5510 func rewriteValueWasm_OpSignExt16to64(v *Value) bool {
5511 v_0 := v.Args[0]
5512
5513
5514 for {
5515 x := v_0
5516 if x.Op != OpWasmI64Load16S {
5517 break
5518 }
5519 v.copyOf(x)
5520 return true
5521 }
5522
5523
5524 for {
5525 x := v_0
5526 v.reset(OpWasmI64Extend16S)
5527 v.AddArg(x)
5528 return true
5529 }
5530 }
5531 func rewriteValueWasm_OpSignExt32to64(v *Value) bool {
5532 v_0 := v.Args[0]
5533
5534
5535 for {
5536 x := v_0
5537 if x.Op != OpWasmI64Load32S {
5538 break
5539 }
5540 v.copyOf(x)
5541 return true
5542 }
5543
5544
5545 for {
5546 x := v_0
5547 v.reset(OpWasmI64Extend32S)
5548 v.AddArg(x)
5549 return true
5550 }
5551 }
5552 func rewriteValueWasm_OpSignExt8to16(v *Value) bool {
5553 v_0 := v.Args[0]
5554
5555
5556 for {
5557 x := v_0
5558 if x.Op != OpWasmI64Load8S {
5559 break
5560 }
5561 v.copyOf(x)
5562 return true
5563 }
5564
5565
5566 for {
5567 x := v_0
5568 v.reset(OpWasmI64Extend8S)
5569 v.AddArg(x)
5570 return true
5571 }
5572 }
5573 func rewriteValueWasm_OpSignExt8to32(v *Value) bool {
5574 v_0 := v.Args[0]
5575
5576
5577 for {
5578 x := v_0
5579 if x.Op != OpWasmI64Load8S {
5580 break
5581 }
5582 v.copyOf(x)
5583 return true
5584 }
5585
5586
5587 for {
5588 x := v_0
5589 v.reset(OpWasmI64Extend8S)
5590 v.AddArg(x)
5591 return true
5592 }
5593 }
5594 func rewriteValueWasm_OpSignExt8to64(v *Value) bool {
5595 v_0 := v.Args[0]
5596
5597
5598 for {
5599 x := v_0
5600 if x.Op != OpWasmI64Load8S {
5601 break
5602 }
5603 v.copyOf(x)
5604 return true
5605 }
5606
5607
5608 for {
5609 x := v_0
5610 v.reset(OpWasmI64Extend8S)
5611 v.AddArg(x)
5612 return true
5613 }
5614 }
5615 func rewriteValueWasm_OpSlicemask(v *Value) bool {
5616 v_0 := v.Args[0]
5617 b := v.Block
5618 typ := &b.Func.Config.Types
5619
5620
5621 for {
5622 x := v_0
5623 v.reset(OpWasmI64ShrS)
5624 v0 := b.NewValue0(v.Pos, OpWasmI64Sub, typ.Int64)
5625 v1 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
5626 v1.AuxInt = int64ToAuxInt(0)
5627 v0.AddArg2(v1, x)
5628 v2 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
5629 v2.AuxInt = int64ToAuxInt(63)
5630 v.AddArg2(v0, v2)
5631 return true
5632 }
5633 }
5634 func rewriteValueWasm_OpStore(v *Value) bool {
5635 v_2 := v.Args[2]
5636 v_1 := v.Args[1]
5637 v_0 := v.Args[0]
5638
5639
5640
5641 for {
5642 t := auxToType(v.Aux)
5643 ptr := v_0
5644 val := v_1
5645 mem := v_2
5646 if !(is64BitFloat(t)) {
5647 break
5648 }
5649 v.reset(OpWasmF64Store)
5650 v.AddArg3(ptr, val, mem)
5651 return true
5652 }
5653
5654
5655
5656 for {
5657 t := auxToType(v.Aux)
5658 ptr := v_0
5659 val := v_1
5660 mem := v_2
5661 if !(is32BitFloat(t)) {
5662 break
5663 }
5664 v.reset(OpWasmF32Store)
5665 v.AddArg3(ptr, val, mem)
5666 return true
5667 }
5668
5669
5670
5671 for {
5672 t := auxToType(v.Aux)
5673 ptr := v_0
5674 val := v_1
5675 mem := v_2
5676 if !(t.Size() == 16) {
5677 break
5678 }
5679 v.reset(OpWasmV128Store)
5680 v.AddArg3(ptr, val, mem)
5681 return true
5682 }
5683
5684
5685
5686 for {
5687 t := auxToType(v.Aux)
5688 ptr := v_0
5689 val := v_1
5690 mem := v_2
5691 if !(t.Size() == 8) {
5692 break
5693 }
5694 v.reset(OpWasmI64Store)
5695 v.AddArg3(ptr, val, mem)
5696 return true
5697 }
5698
5699
5700
5701 for {
5702 t := auxToType(v.Aux)
5703 ptr := v_0
5704 val := v_1
5705 mem := v_2
5706 if !(t.Size() == 4) {
5707 break
5708 }
5709 v.reset(OpWasmI64Store32)
5710 v.AddArg3(ptr, val, mem)
5711 return true
5712 }
5713
5714
5715
5716 for {
5717 t := auxToType(v.Aux)
5718 ptr := v_0
5719 val := v_1
5720 mem := v_2
5721 if !(t.Size() == 2) {
5722 break
5723 }
5724 v.reset(OpWasmI64Store16)
5725 v.AddArg3(ptr, val, mem)
5726 return true
5727 }
5728
5729
5730
5731 for {
5732 t := auxToType(v.Aux)
5733 ptr := v_0
5734 val := v_1
5735 mem := v_2
5736 if !(t.Size() == 1) {
5737 break
5738 }
5739 v.reset(OpWasmI64Store8)
5740 v.AddArg3(ptr, val, mem)
5741 return true
5742 }
5743 return false
5744 }
5745 func rewriteValueWasm_OpWasmF32DemoteF64(v *Value) bool {
5746 v_0 := v.Args[0]
5747
5748
5749 for {
5750 if v_0.Op != OpWasmF64Sqrt {
5751 break
5752 }
5753 v_0_0 := v_0.Args[0]
5754 if v_0_0.Op != OpWasmF64PromoteF32 {
5755 break
5756 }
5757 x := v_0_0.Args[0]
5758 v.reset(OpWasmF32Sqrt)
5759 v.AddArg(x)
5760 return true
5761 }
5762
5763
5764 for {
5765 if v_0.Op != OpWasmF64Trunc {
5766 break
5767 }
5768 v_0_0 := v_0.Args[0]
5769 if v_0_0.Op != OpWasmF64PromoteF32 {
5770 break
5771 }
5772 x := v_0_0.Args[0]
5773 v.reset(OpWasmF32Trunc)
5774 v.AddArg(x)
5775 return true
5776 }
5777
5778
5779 for {
5780 if v_0.Op != OpWasmF64Ceil {
5781 break
5782 }
5783 v_0_0 := v_0.Args[0]
5784 if v_0_0.Op != OpWasmF64PromoteF32 {
5785 break
5786 }
5787 x := v_0_0.Args[0]
5788 v.reset(OpWasmF32Ceil)
5789 v.AddArg(x)
5790 return true
5791 }
5792
5793
5794 for {
5795 if v_0.Op != OpWasmF64Floor {
5796 break
5797 }
5798 v_0_0 := v_0.Args[0]
5799 if v_0_0.Op != OpWasmF64PromoteF32 {
5800 break
5801 }
5802 x := v_0_0.Args[0]
5803 v.reset(OpWasmF32Floor)
5804 v.AddArg(x)
5805 return true
5806 }
5807
5808
5809 for {
5810 if v_0.Op != OpWasmF64Nearest {
5811 break
5812 }
5813 v_0_0 := v_0.Args[0]
5814 if v_0_0.Op != OpWasmF64PromoteF32 {
5815 break
5816 }
5817 x := v_0_0.Args[0]
5818 v.reset(OpWasmF32Nearest)
5819 v.AddArg(x)
5820 return true
5821 }
5822
5823
5824 for {
5825 if v_0.Op != OpWasmF64Abs {
5826 break
5827 }
5828 v_0_0 := v_0.Args[0]
5829 if v_0_0.Op != OpWasmF64PromoteF32 {
5830 break
5831 }
5832 x := v_0_0.Args[0]
5833 v.reset(OpWasmF32Abs)
5834 v.AddArg(x)
5835 return true
5836 }
5837
5838
5839 for {
5840 if v_0.Op != OpWasmF64Copysign {
5841 break
5842 }
5843 _ = v_0.Args[1]
5844 v_0_0 := v_0.Args[0]
5845 if v_0_0.Op != OpWasmF64PromoteF32 {
5846 break
5847 }
5848 x := v_0_0.Args[0]
5849 v_0_1 := v_0.Args[1]
5850 if v_0_1.Op != OpWasmF64PromoteF32 {
5851 break
5852 }
5853 y := v_0_1.Args[0]
5854 v.reset(OpWasmF32Copysign)
5855 v.AddArg2(x, y)
5856 return true
5857 }
5858 return false
5859 }
5860 func rewriteValueWasm_OpWasmF64Add(v *Value) bool {
5861 v_1 := v.Args[1]
5862 v_0 := v.Args[0]
5863 b := v.Block
5864 typ := &b.Func.Config.Types
5865
5866
5867 for {
5868 if v_0.Op != OpWasmF64Const {
5869 break
5870 }
5871 x := auxIntToFloat64(v_0.AuxInt)
5872 if v_1.Op != OpWasmF64Const {
5873 break
5874 }
5875 y := auxIntToFloat64(v_1.AuxInt)
5876 v.reset(OpWasmF64Const)
5877 v.AuxInt = float64ToAuxInt(x + y)
5878 return true
5879 }
5880
5881
5882
5883 for {
5884 if v_0.Op != OpWasmF64Const {
5885 break
5886 }
5887 x := auxIntToFloat64(v_0.AuxInt)
5888 y := v_1
5889 if !(y.Op != OpWasmF64Const) {
5890 break
5891 }
5892 v.reset(OpWasmF64Add)
5893 v0 := b.NewValue0(v.Pos, OpWasmF64Const, typ.Float64)
5894 v0.AuxInt = float64ToAuxInt(x)
5895 v.AddArg2(y, v0)
5896 return true
5897 }
5898 return false
5899 }
5900 func rewriteValueWasm_OpWasmF64Mul(v *Value) bool {
5901 v_1 := v.Args[1]
5902 v_0 := v.Args[0]
5903 b := v.Block
5904 typ := &b.Func.Config.Types
5905
5906
5907
5908 for {
5909 if v_0.Op != OpWasmF64Const {
5910 break
5911 }
5912 x := auxIntToFloat64(v_0.AuxInt)
5913 if v_1.Op != OpWasmF64Const {
5914 break
5915 }
5916 y := auxIntToFloat64(v_1.AuxInt)
5917 if !(!math.IsNaN(x * y)) {
5918 break
5919 }
5920 v.reset(OpWasmF64Const)
5921 v.AuxInt = float64ToAuxInt(x * y)
5922 return true
5923 }
5924
5925
5926
5927 for {
5928 if v_0.Op != OpWasmF64Const {
5929 break
5930 }
5931 x := auxIntToFloat64(v_0.AuxInt)
5932 y := v_1
5933 if !(y.Op != OpWasmF64Const) {
5934 break
5935 }
5936 v.reset(OpWasmF64Mul)
5937 v0 := b.NewValue0(v.Pos, OpWasmF64Const, typ.Float64)
5938 v0.AuxInt = float64ToAuxInt(x)
5939 v.AddArg2(y, v0)
5940 return true
5941 }
5942 return false
5943 }
5944 func rewriteValueWasm_OpWasmI64Add(v *Value) bool {
5945 v_1 := v.Args[1]
5946 v_0 := v.Args[0]
5947 b := v.Block
5948 typ := &b.Func.Config.Types
5949
5950
5951 for {
5952 if v_0.Op != OpWasmI64Const {
5953 break
5954 }
5955 x := auxIntToInt64(v_0.AuxInt)
5956 if v_1.Op != OpWasmI64Const {
5957 break
5958 }
5959 y := auxIntToInt64(v_1.AuxInt)
5960 v.reset(OpWasmI64Const)
5961 v.AuxInt = int64ToAuxInt(x + y)
5962 return true
5963 }
5964
5965
5966
5967 for {
5968 if v_0.Op != OpWasmI64Const {
5969 break
5970 }
5971 x := auxIntToInt64(v_0.AuxInt)
5972 y := v_1
5973 if !(y.Op != OpWasmI64Const) {
5974 break
5975 }
5976 v.reset(OpWasmI64Add)
5977 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
5978 v0.AuxInt = int64ToAuxInt(x)
5979 v.AddArg2(y, v0)
5980 return true
5981 }
5982
5983
5984
5985 for {
5986 x := v_0
5987 if v_1.Op != OpWasmI64Const {
5988 break
5989 }
5990 t := v_1.Type
5991 y := auxIntToInt64(v_1.AuxInt)
5992 if !(!t.IsPtr()) {
5993 break
5994 }
5995 v.reset(OpWasmI64AddConst)
5996 v.AuxInt = int64ToAuxInt(y)
5997 v.AddArg(x)
5998 return true
5999 }
6000 return false
6001 }
6002 func rewriteValueWasm_OpWasmI64AddConst(v *Value) bool {
6003 v_0 := v.Args[0]
6004
6005
6006 for {
6007 if auxIntToInt64(v.AuxInt) != 0 {
6008 break
6009 }
6010 x := v_0
6011 v.copyOf(x)
6012 return true
6013 }
6014
6015
6016
6017 for {
6018 off := auxIntToInt64(v.AuxInt)
6019 if v_0.Op != OpWasmLoweredAddr {
6020 break
6021 }
6022 off2 := auxIntToInt32(v_0.AuxInt)
6023 sym := auxToSym(v_0.Aux)
6024 base := v_0.Args[0]
6025 if !(isU32Bit(off + int64(off2))) {
6026 break
6027 }
6028 v.reset(OpWasmLoweredAddr)
6029 v.AuxInt = int32ToAuxInt(int32(off) + off2)
6030 v.Aux = symToAux(sym)
6031 v.AddArg(base)
6032 return true
6033 }
6034
6035
6036
6037 for {
6038 off := auxIntToInt64(v.AuxInt)
6039 x := v_0
6040 if x.Op != OpSP || !(isU32Bit(off)) {
6041 break
6042 }
6043 v.reset(OpWasmLoweredAddr)
6044 v.AuxInt = int32ToAuxInt(int32(off))
6045 v.AddArg(x)
6046 return true
6047 }
6048 return false
6049 }
6050 func rewriteValueWasm_OpWasmI64And(v *Value) bool {
6051 v_1 := v.Args[1]
6052 v_0 := v.Args[0]
6053 b := v.Block
6054 typ := &b.Func.Config.Types
6055
6056
6057 for {
6058 if v_0.Op != OpWasmI64Const {
6059 break
6060 }
6061 x := auxIntToInt64(v_0.AuxInt)
6062 if v_1.Op != OpWasmI64Const {
6063 break
6064 }
6065 y := auxIntToInt64(v_1.AuxInt)
6066 v.reset(OpWasmI64Const)
6067 v.AuxInt = int64ToAuxInt(x & y)
6068 return true
6069 }
6070
6071
6072 for {
6073 x := v_0
6074 if v_1.Op != OpWasmI64Const || auxIntToInt64(v_1.AuxInt) != -1 {
6075 break
6076 }
6077 v.copyOf(x)
6078 return true
6079 }
6080
6081
6082 for {
6083 if v_1.Op != OpWasmI64Const || auxIntToInt64(v_1.AuxInt) != 0 {
6084 break
6085 }
6086 v.reset(OpWasmI64Const)
6087 v.AuxInt = int64ToAuxInt(0)
6088 return true
6089 }
6090
6091
6092 for {
6093 if v_0.Op != OpWasmI64And {
6094 break
6095 }
6096 _ = v_0.Args[1]
6097 x := v_0.Args[0]
6098 v_0_1 := v_0.Args[1]
6099 if v_0_1.Op != OpWasmI64Const {
6100 break
6101 }
6102 c1 := auxIntToInt64(v_0_1.AuxInt)
6103 if v_1.Op != OpWasmI64Const {
6104 break
6105 }
6106 c2 := auxIntToInt64(v_1.AuxInt)
6107 v.reset(OpWasmI64And)
6108 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
6109 v0.AuxInt = int64ToAuxInt(c1 & c2)
6110 v.AddArg2(x, v0)
6111 return true
6112 }
6113
6114
6115
6116 for {
6117 if v_0.Op != OpWasmI64Const {
6118 break
6119 }
6120 x := auxIntToInt64(v_0.AuxInt)
6121 y := v_1
6122 if !(y.Op != OpWasmI64Const) {
6123 break
6124 }
6125 v.reset(OpWasmI64And)
6126 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
6127 v0.AuxInt = int64ToAuxInt(x)
6128 v.AddArg2(y, v0)
6129 return true
6130 }
6131 return false
6132 }
6133 func rewriteValueWasm_OpWasmI64Eq(v *Value) bool {
6134 v_1 := v.Args[1]
6135 v_0 := v.Args[0]
6136 b := v.Block
6137 typ := &b.Func.Config.Types
6138
6139
6140
6141 for {
6142 if v_0.Op != OpWasmI64Const {
6143 break
6144 }
6145 x := auxIntToInt64(v_0.AuxInt)
6146 if v_1.Op != OpWasmI64Const {
6147 break
6148 }
6149 y := auxIntToInt64(v_1.AuxInt)
6150 if !(x == y) {
6151 break
6152 }
6153 v.reset(OpWasmI64Const)
6154 v.AuxInt = int64ToAuxInt(1)
6155 return true
6156 }
6157
6158
6159
6160 for {
6161 if v_0.Op != OpWasmI64Const {
6162 break
6163 }
6164 x := auxIntToInt64(v_0.AuxInt)
6165 if v_1.Op != OpWasmI64Const {
6166 break
6167 }
6168 y := auxIntToInt64(v_1.AuxInt)
6169 if !(x != y) {
6170 break
6171 }
6172 v.reset(OpWasmI64Const)
6173 v.AuxInt = int64ToAuxInt(0)
6174 return true
6175 }
6176
6177
6178
6179 for {
6180 if v_0.Op != OpWasmI64Const {
6181 break
6182 }
6183 x := auxIntToInt64(v_0.AuxInt)
6184 y := v_1
6185 if !(y.Op != OpWasmI64Const) {
6186 break
6187 }
6188 v.reset(OpWasmI64Eq)
6189 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
6190 v0.AuxInt = int64ToAuxInt(x)
6191 v.AddArg2(y, v0)
6192 return true
6193 }
6194
6195
6196 for {
6197 x := v_0
6198 if v_1.Op != OpWasmI64Const || auxIntToInt64(v_1.AuxInt) != 0 {
6199 break
6200 }
6201 v.reset(OpWasmI64Eqz)
6202 v.AddArg(x)
6203 return true
6204 }
6205 return false
6206 }
6207 func rewriteValueWasm_OpWasmI64Eqz(v *Value) bool {
6208 v_0 := v.Args[0]
6209
6210
6211 for {
6212 if v_0.Op != OpWasmI64Eqz {
6213 break
6214 }
6215 v_0_0 := v_0.Args[0]
6216 if v_0_0.Op != OpWasmI64Eqz {
6217 break
6218 }
6219 x := v_0_0.Args[0]
6220 v.reset(OpWasmI64Eqz)
6221 v.AddArg(x)
6222 return true
6223 }
6224 return false
6225 }
6226 func rewriteValueWasm_OpWasmI64Extend16S(v *Value) bool {
6227 v_0 := v.Args[0]
6228
6229
6230 for {
6231 if v_0.Op != OpWasmI64Extend16S {
6232 break
6233 }
6234 x := v_0.Args[0]
6235 v.reset(OpWasmI64Extend16S)
6236 v.AddArg(x)
6237 return true
6238 }
6239
6240
6241 for {
6242 if v_0.Op != OpWasmI64Extend8S {
6243 break
6244 }
6245 x := v_0.Args[0]
6246 v.reset(OpWasmI64Extend8S)
6247 v.AddArg(x)
6248 return true
6249 }
6250
6251
6252
6253 for {
6254 x := v_0
6255 if x.Op != OpWasmI64And {
6256 break
6257 }
6258 _ = x.Args[1]
6259 x_1 := x.Args[1]
6260 if x_1.Op != OpWasmI64Const {
6261 break
6262 }
6263 c := auxIntToInt64(x_1.AuxInt)
6264 if !(c >= 0 && int64(int16(c)) == c) {
6265 break
6266 }
6267 v.copyOf(x)
6268 return true
6269 }
6270 return false
6271 }
6272 func rewriteValueWasm_OpWasmI64Extend32S(v *Value) bool {
6273 v_0 := v.Args[0]
6274
6275
6276 for {
6277 if v_0.Op != OpWasmI64Extend32S {
6278 break
6279 }
6280 x := v_0.Args[0]
6281 v.reset(OpWasmI64Extend32S)
6282 v.AddArg(x)
6283 return true
6284 }
6285
6286
6287 for {
6288 if v_0.Op != OpWasmI64Extend16S {
6289 break
6290 }
6291 x := v_0.Args[0]
6292 v.reset(OpWasmI64Extend16S)
6293 v.AddArg(x)
6294 return true
6295 }
6296
6297
6298 for {
6299 if v_0.Op != OpWasmI64Extend8S {
6300 break
6301 }
6302 x := v_0.Args[0]
6303 v.reset(OpWasmI64Extend8S)
6304 v.AddArg(x)
6305 return true
6306 }
6307
6308
6309
6310 for {
6311 x := v_0
6312 if x.Op != OpWasmI64And {
6313 break
6314 }
6315 _ = x.Args[1]
6316 x_1 := x.Args[1]
6317 if x_1.Op != OpWasmI64Const {
6318 break
6319 }
6320 c := auxIntToInt64(x_1.AuxInt)
6321 if !(c >= 0 && int64(int32(c)) == c) {
6322 break
6323 }
6324 v.copyOf(x)
6325 return true
6326 }
6327 return false
6328 }
6329 func rewriteValueWasm_OpWasmI64Extend8S(v *Value) bool {
6330 v_0 := v.Args[0]
6331
6332
6333 for {
6334 if v_0.Op != OpWasmI64Extend8S {
6335 break
6336 }
6337 x := v_0.Args[0]
6338 v.reset(OpWasmI64Extend8S)
6339 v.AddArg(x)
6340 return true
6341 }
6342
6343
6344
6345 for {
6346 x := v_0
6347 if x.Op != OpWasmI64And {
6348 break
6349 }
6350 _ = x.Args[1]
6351 x_1 := x.Args[1]
6352 if x_1.Op != OpWasmI64Const {
6353 break
6354 }
6355 c := auxIntToInt64(x_1.AuxInt)
6356 if !(c >= 0 && int64(int8(c)) == c) {
6357 break
6358 }
6359 v.copyOf(x)
6360 return true
6361 }
6362 return false
6363 }
6364 func rewriteValueWasm_OpWasmI64LeU(v *Value) bool {
6365 v_1 := v.Args[1]
6366 v_0 := v.Args[0]
6367 b := v.Block
6368 typ := &b.Func.Config.Types
6369
6370
6371 for {
6372 x := v_0
6373 if v_1.Op != OpWasmI64Const || auxIntToInt64(v_1.AuxInt) != 0 {
6374 break
6375 }
6376 v.reset(OpWasmI64Eqz)
6377 v.AddArg(x)
6378 return true
6379 }
6380
6381
6382 for {
6383 if v_0.Op != OpWasmI64Const || auxIntToInt64(v_0.AuxInt) != 1 {
6384 break
6385 }
6386 x := v_1
6387 v.reset(OpWasmI64Eqz)
6388 v0 := b.NewValue0(v.Pos, OpWasmI64Eqz, typ.Bool)
6389 v0.AddArg(x)
6390 v.AddArg(v0)
6391 return true
6392 }
6393 return false
6394 }
6395 func rewriteValueWasm_OpWasmI64Load(v *Value) bool {
6396 v_1 := v.Args[1]
6397 v_0 := v.Args[0]
6398 b := v.Block
6399 config := b.Func.Config
6400
6401
6402
6403 for {
6404 off := auxIntToInt64(v.AuxInt)
6405 if v_0.Op != OpWasmI64AddConst {
6406 break
6407 }
6408 off2 := auxIntToInt64(v_0.AuxInt)
6409 ptr := v_0.Args[0]
6410 mem := v_1
6411 if !(isU32Bit(off + off2)) {
6412 break
6413 }
6414 v.reset(OpWasmI64Load)
6415 v.AuxInt = int64ToAuxInt(off + off2)
6416 v.AddArg2(ptr, mem)
6417 return true
6418 }
6419
6420
6421
6422 for {
6423 off := auxIntToInt64(v.AuxInt)
6424 if v_0.Op != OpWasmLoweredAddr {
6425 break
6426 }
6427 off2 := auxIntToInt32(v_0.AuxInt)
6428 sym := auxToSym(v_0.Aux)
6429 v_0_0 := v_0.Args[0]
6430 if v_0_0.Op != OpSB || !(symIsRO(sym) && isU32Bit(off+int64(off2))) {
6431 break
6432 }
6433 v.reset(OpWasmI64Const)
6434 v.AuxInt = int64ToAuxInt(int64(read64(sym, off+int64(off2), config.ctxt.Arch.ByteOrder)))
6435 return true
6436 }
6437 return false
6438 }
6439 func rewriteValueWasm_OpWasmI64Load16S(v *Value) bool {
6440 v_1 := v.Args[1]
6441 v_0 := v.Args[0]
6442 b := v.Block
6443 config := b.Func.Config
6444
6445
6446
6447 for {
6448 off := auxIntToInt64(v.AuxInt)
6449 if v_0.Op != OpWasmI64AddConst {
6450 break
6451 }
6452 off2 := auxIntToInt64(v_0.AuxInt)
6453 ptr := v_0.Args[0]
6454 mem := v_1
6455 if !(isU32Bit(off + off2)) {
6456 break
6457 }
6458 v.reset(OpWasmI64Load16S)
6459 v.AuxInt = int64ToAuxInt(off + off2)
6460 v.AddArg2(ptr, mem)
6461 return true
6462 }
6463
6464
6465
6466 for {
6467 off := auxIntToInt64(v.AuxInt)
6468 if v_0.Op != OpWasmLoweredAddr {
6469 break
6470 }
6471 off2 := auxIntToInt32(v_0.AuxInt)
6472 sym := auxToSym(v_0.Aux)
6473 v_0_0 := v_0.Args[0]
6474 if v_0_0.Op != OpSB || !(symIsRO(sym) && isU32Bit(off+int64(off2))) {
6475 break
6476 }
6477 v.reset(OpWasmI64Const)
6478 v.AuxInt = int64ToAuxInt(int64(int16(read16(sym, off+int64(off2), config.ctxt.Arch.ByteOrder))))
6479 return true
6480 }
6481 return false
6482 }
6483 func rewriteValueWasm_OpWasmI64Load16U(v *Value) bool {
6484 v_1 := v.Args[1]
6485 v_0 := v.Args[0]
6486 b := v.Block
6487 config := b.Func.Config
6488
6489
6490
6491 for {
6492 off := auxIntToInt64(v.AuxInt)
6493 if v_0.Op != OpWasmI64AddConst {
6494 break
6495 }
6496 off2 := auxIntToInt64(v_0.AuxInt)
6497 ptr := v_0.Args[0]
6498 mem := v_1
6499 if !(isU32Bit(off + off2)) {
6500 break
6501 }
6502 v.reset(OpWasmI64Load16U)
6503 v.AuxInt = int64ToAuxInt(off + off2)
6504 v.AddArg2(ptr, mem)
6505 return true
6506 }
6507
6508
6509
6510 for {
6511 off := auxIntToInt64(v.AuxInt)
6512 if v_0.Op != OpWasmLoweredAddr {
6513 break
6514 }
6515 off2 := auxIntToInt32(v_0.AuxInt)
6516 sym := auxToSym(v_0.Aux)
6517 v_0_0 := v_0.Args[0]
6518 if v_0_0.Op != OpSB || !(symIsRO(sym) && isU32Bit(off+int64(off2))) {
6519 break
6520 }
6521 v.reset(OpWasmI64Const)
6522 v.AuxInt = int64ToAuxInt(int64(read16(sym, off+int64(off2), config.ctxt.Arch.ByteOrder)))
6523 return true
6524 }
6525 return false
6526 }
6527 func rewriteValueWasm_OpWasmI64Load32S(v *Value) bool {
6528 v_1 := v.Args[1]
6529 v_0 := v.Args[0]
6530 b := v.Block
6531 config := b.Func.Config
6532
6533
6534
6535 for {
6536 off := auxIntToInt64(v.AuxInt)
6537 if v_0.Op != OpWasmI64AddConst {
6538 break
6539 }
6540 off2 := auxIntToInt64(v_0.AuxInt)
6541 ptr := v_0.Args[0]
6542 mem := v_1
6543 if !(isU32Bit(off + off2)) {
6544 break
6545 }
6546 v.reset(OpWasmI64Load32S)
6547 v.AuxInt = int64ToAuxInt(off + off2)
6548 v.AddArg2(ptr, mem)
6549 return true
6550 }
6551
6552
6553
6554 for {
6555 off := auxIntToInt64(v.AuxInt)
6556 if v_0.Op != OpWasmLoweredAddr {
6557 break
6558 }
6559 off2 := auxIntToInt32(v_0.AuxInt)
6560 sym := auxToSym(v_0.Aux)
6561 v_0_0 := v_0.Args[0]
6562 if v_0_0.Op != OpSB || !(symIsRO(sym) && isU32Bit(off+int64(off2))) {
6563 break
6564 }
6565 v.reset(OpWasmI64Const)
6566 v.AuxInt = int64ToAuxInt(int64(int32(read32(sym, off+int64(off2), config.ctxt.Arch.ByteOrder))))
6567 return true
6568 }
6569 return false
6570 }
6571 func rewriteValueWasm_OpWasmI64Load32U(v *Value) bool {
6572 v_1 := v.Args[1]
6573 v_0 := v.Args[0]
6574 b := v.Block
6575 config := b.Func.Config
6576
6577
6578
6579 for {
6580 off := auxIntToInt64(v.AuxInt)
6581 if v_0.Op != OpWasmI64AddConst {
6582 break
6583 }
6584 off2 := auxIntToInt64(v_0.AuxInt)
6585 ptr := v_0.Args[0]
6586 mem := v_1
6587 if !(isU32Bit(off + off2)) {
6588 break
6589 }
6590 v.reset(OpWasmI64Load32U)
6591 v.AuxInt = int64ToAuxInt(off + off2)
6592 v.AddArg2(ptr, mem)
6593 return true
6594 }
6595
6596
6597
6598 for {
6599 off := auxIntToInt64(v.AuxInt)
6600 if v_0.Op != OpWasmLoweredAddr {
6601 break
6602 }
6603 off2 := auxIntToInt32(v_0.AuxInt)
6604 sym := auxToSym(v_0.Aux)
6605 v_0_0 := v_0.Args[0]
6606 if v_0_0.Op != OpSB || !(symIsRO(sym) && isU32Bit(off+int64(off2))) {
6607 break
6608 }
6609 v.reset(OpWasmI64Const)
6610 v.AuxInt = int64ToAuxInt(int64(read32(sym, off+int64(off2), config.ctxt.Arch.ByteOrder)))
6611 return true
6612 }
6613 return false
6614 }
6615 func rewriteValueWasm_OpWasmI64Load8S(v *Value) bool {
6616 v_1 := v.Args[1]
6617 v_0 := v.Args[0]
6618
6619
6620
6621 for {
6622 off := auxIntToInt64(v.AuxInt)
6623 if v_0.Op != OpWasmI64AddConst {
6624 break
6625 }
6626 off2 := auxIntToInt64(v_0.AuxInt)
6627 ptr := v_0.Args[0]
6628 mem := v_1
6629 if !(isU32Bit(off + off2)) {
6630 break
6631 }
6632 v.reset(OpWasmI64Load8S)
6633 v.AuxInt = int64ToAuxInt(off + off2)
6634 v.AddArg2(ptr, mem)
6635 return true
6636 }
6637
6638
6639
6640 for {
6641 off := auxIntToInt64(v.AuxInt)
6642 if v_0.Op != OpWasmLoweredAddr {
6643 break
6644 }
6645 off2 := auxIntToInt32(v_0.AuxInt)
6646 sym := auxToSym(v_0.Aux)
6647 v_0_0 := v_0.Args[0]
6648 if v_0_0.Op != OpSB || !(symIsRO(sym) && isU32Bit(off+int64(off2))) {
6649 break
6650 }
6651 v.reset(OpWasmI64Const)
6652 v.AuxInt = int64ToAuxInt(int64(int8(read8(sym, off+int64(off2)))))
6653 return true
6654 }
6655 return false
6656 }
6657 func rewriteValueWasm_OpWasmI64Load8U(v *Value) bool {
6658 v_1 := v.Args[1]
6659 v_0 := v.Args[0]
6660
6661
6662
6663 for {
6664 off := auxIntToInt64(v.AuxInt)
6665 if v_0.Op != OpWasmI64AddConst {
6666 break
6667 }
6668 off2 := auxIntToInt64(v_0.AuxInt)
6669 ptr := v_0.Args[0]
6670 mem := v_1
6671 if !(isU32Bit(off + off2)) {
6672 break
6673 }
6674 v.reset(OpWasmI64Load8U)
6675 v.AuxInt = int64ToAuxInt(off + off2)
6676 v.AddArg2(ptr, mem)
6677 return true
6678 }
6679
6680
6681
6682 for {
6683 off := auxIntToInt64(v.AuxInt)
6684 if v_0.Op != OpWasmLoweredAddr {
6685 break
6686 }
6687 off2 := auxIntToInt32(v_0.AuxInt)
6688 sym := auxToSym(v_0.Aux)
6689 v_0_0 := v_0.Args[0]
6690 if v_0_0.Op != OpSB || !(symIsRO(sym) && isU32Bit(off+int64(off2))) {
6691 break
6692 }
6693 v.reset(OpWasmI64Const)
6694 v.AuxInt = int64ToAuxInt(int64(read8(sym, off+int64(off2))))
6695 return true
6696 }
6697 return false
6698 }
6699 func rewriteValueWasm_OpWasmI64LtU(v *Value) bool {
6700 v_1 := v.Args[1]
6701 v_0 := v.Args[0]
6702 b := v.Block
6703 typ := &b.Func.Config.Types
6704
6705
6706 for {
6707 if v_0.Op != OpWasmI64Const || auxIntToInt64(v_0.AuxInt) != 0 {
6708 break
6709 }
6710 x := v_1
6711 v.reset(OpWasmI64Eqz)
6712 v0 := b.NewValue0(v.Pos, OpWasmI64Eqz, typ.Bool)
6713 v0.AddArg(x)
6714 v.AddArg(v0)
6715 return true
6716 }
6717
6718
6719 for {
6720 x := v_0
6721 if v_1.Op != OpWasmI64Const || auxIntToInt64(v_1.AuxInt) != 1 {
6722 break
6723 }
6724 v.reset(OpWasmI64Eqz)
6725 v.AddArg(x)
6726 return true
6727 }
6728 return false
6729 }
6730 func rewriteValueWasm_OpWasmI64Mul(v *Value) bool {
6731 v_1 := v.Args[1]
6732 v_0 := v.Args[0]
6733 b := v.Block
6734 typ := &b.Func.Config.Types
6735
6736
6737 for {
6738 if v_0.Op != OpWasmI64Const {
6739 break
6740 }
6741 x := auxIntToInt64(v_0.AuxInt)
6742 if v_1.Op != OpWasmI64Const {
6743 break
6744 }
6745 y := auxIntToInt64(v_1.AuxInt)
6746 v.reset(OpWasmI64Const)
6747 v.AuxInt = int64ToAuxInt(x * y)
6748 return true
6749 }
6750
6751
6752 for {
6753 if v_1.Op != OpWasmI64Const || auxIntToInt64(v_1.AuxInt) != 0 {
6754 break
6755 }
6756 v.reset(OpWasmI64Const)
6757 v.AuxInt = int64ToAuxInt(0)
6758 return true
6759 }
6760
6761
6762 for {
6763 x := v_0
6764 if v_1.Op != OpWasmI64Const || auxIntToInt64(v_1.AuxInt) != 1 {
6765 break
6766 }
6767 v.copyOf(x)
6768 return true
6769 }
6770
6771
6772
6773 for {
6774 if v_0.Op != OpWasmI64Const {
6775 break
6776 }
6777 x := auxIntToInt64(v_0.AuxInt)
6778 y := v_1
6779 if !(y.Op != OpWasmI64Const) {
6780 break
6781 }
6782 v.reset(OpWasmI64Mul)
6783 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
6784 v0.AuxInt = int64ToAuxInt(x)
6785 v.AddArg2(y, v0)
6786 return true
6787 }
6788 return false
6789 }
6790 func rewriteValueWasm_OpWasmI64Ne(v *Value) bool {
6791 v_1 := v.Args[1]
6792 v_0 := v.Args[0]
6793 b := v.Block
6794 typ := &b.Func.Config.Types
6795
6796
6797
6798 for {
6799 if v_0.Op != OpWasmI64Const {
6800 break
6801 }
6802 x := auxIntToInt64(v_0.AuxInt)
6803 if v_1.Op != OpWasmI64Const {
6804 break
6805 }
6806 y := auxIntToInt64(v_1.AuxInt)
6807 if !(x == y) {
6808 break
6809 }
6810 v.reset(OpWasmI64Const)
6811 v.AuxInt = int64ToAuxInt(0)
6812 return true
6813 }
6814
6815
6816
6817 for {
6818 if v_0.Op != OpWasmI64Const {
6819 break
6820 }
6821 x := auxIntToInt64(v_0.AuxInt)
6822 if v_1.Op != OpWasmI64Const {
6823 break
6824 }
6825 y := auxIntToInt64(v_1.AuxInt)
6826 if !(x != y) {
6827 break
6828 }
6829 v.reset(OpWasmI64Const)
6830 v.AuxInt = int64ToAuxInt(1)
6831 return true
6832 }
6833
6834
6835
6836 for {
6837 if v_0.Op != OpWasmI64Const {
6838 break
6839 }
6840 x := auxIntToInt64(v_0.AuxInt)
6841 y := v_1
6842 if !(y.Op != OpWasmI64Const) {
6843 break
6844 }
6845 v.reset(OpWasmI64Ne)
6846 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
6847 v0.AuxInt = int64ToAuxInt(x)
6848 v.AddArg2(y, v0)
6849 return true
6850 }
6851
6852
6853 for {
6854 x := v_0
6855 if v_1.Op != OpWasmI64Const || auxIntToInt64(v_1.AuxInt) != 0 {
6856 break
6857 }
6858 v.reset(OpWasmI64Eqz)
6859 v0 := b.NewValue0(v.Pos, OpWasmI64Eqz, typ.Bool)
6860 v0.AddArg(x)
6861 v.AddArg(v0)
6862 return true
6863 }
6864 return false
6865 }
6866 func rewriteValueWasm_OpWasmI64Or(v *Value) bool {
6867 v_1 := v.Args[1]
6868 v_0 := v.Args[0]
6869 b := v.Block
6870 typ := &b.Func.Config.Types
6871
6872
6873 for {
6874 if v_0.Op != OpWasmI64Const {
6875 break
6876 }
6877 x := auxIntToInt64(v_0.AuxInt)
6878 if v_1.Op != OpWasmI64Const {
6879 break
6880 }
6881 y := auxIntToInt64(v_1.AuxInt)
6882 v.reset(OpWasmI64Const)
6883 v.AuxInt = int64ToAuxInt(x | y)
6884 return true
6885 }
6886
6887
6888 for {
6889 x := v_0
6890 if v_1.Op != OpWasmI64Const || auxIntToInt64(v_1.AuxInt) != 0 {
6891 break
6892 }
6893 v.copyOf(x)
6894 return true
6895 }
6896
6897
6898 for {
6899 if v_1.Op != OpWasmI64Const || auxIntToInt64(v_1.AuxInt) != -1 {
6900 break
6901 }
6902 v.reset(OpWasmI64Const)
6903 v.AuxInt = int64ToAuxInt(-1)
6904 return true
6905 }
6906
6907
6908
6909 for {
6910 if v_0.Op != OpWasmI64Const {
6911 break
6912 }
6913 x := auxIntToInt64(v_0.AuxInt)
6914 y := v_1
6915 if !(y.Op != OpWasmI64Const) {
6916 break
6917 }
6918 v.reset(OpWasmI64Or)
6919 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
6920 v0.AuxInt = int64ToAuxInt(x)
6921 v.AddArg2(y, v0)
6922 return true
6923 }
6924 return false
6925 }
6926 func rewriteValueWasm_OpWasmI64Shl(v *Value) bool {
6927 v_1 := v.Args[1]
6928 v_0 := v.Args[0]
6929
6930
6931 for {
6932 if v_0.Op != OpWasmI64Const {
6933 break
6934 }
6935 x := auxIntToInt64(v_0.AuxInt)
6936 if v_1.Op != OpWasmI64Const {
6937 break
6938 }
6939 y := auxIntToInt64(v_1.AuxInt)
6940 v.reset(OpWasmI64Const)
6941 v.AuxInt = int64ToAuxInt(x << uint64(y))
6942 return true
6943 }
6944 return false
6945 }
6946 func rewriteValueWasm_OpWasmI64ShrS(v *Value) bool {
6947 v_1 := v.Args[1]
6948 v_0 := v.Args[0]
6949
6950
6951 for {
6952 if v_0.Op != OpWasmI64Const {
6953 break
6954 }
6955 x := auxIntToInt64(v_0.AuxInt)
6956 if v_1.Op != OpWasmI64Const {
6957 break
6958 }
6959 y := auxIntToInt64(v_1.AuxInt)
6960 v.reset(OpWasmI64Const)
6961 v.AuxInt = int64ToAuxInt(x >> uint64(y))
6962 return true
6963 }
6964 return false
6965 }
6966 func rewriteValueWasm_OpWasmI64ShrU(v *Value) bool {
6967 v_1 := v.Args[1]
6968 v_0 := v.Args[0]
6969
6970
6971 for {
6972 if v_0.Op != OpWasmI64Const {
6973 break
6974 }
6975 x := auxIntToInt64(v_0.AuxInt)
6976 if v_1.Op != OpWasmI64Const {
6977 break
6978 }
6979 y := auxIntToInt64(v_1.AuxInt)
6980 v.reset(OpWasmI64Const)
6981 v.AuxInt = int64ToAuxInt(int64(uint64(x) >> uint64(y)))
6982 return true
6983 }
6984 return false
6985 }
6986 func rewriteValueWasm_OpWasmI64Store(v *Value) bool {
6987 v_2 := v.Args[2]
6988 v_1 := v.Args[1]
6989 v_0 := v.Args[0]
6990
6991
6992
6993 for {
6994 off := auxIntToInt64(v.AuxInt)
6995 if v_0.Op != OpWasmI64AddConst {
6996 break
6997 }
6998 off2 := auxIntToInt64(v_0.AuxInt)
6999 ptr := v_0.Args[0]
7000 val := v_1
7001 mem := v_2
7002 if !(isU32Bit(off + off2)) {
7003 break
7004 }
7005 v.reset(OpWasmI64Store)
7006 v.AuxInt = int64ToAuxInt(off + off2)
7007 v.AddArg3(ptr, val, mem)
7008 return true
7009 }
7010 return false
7011 }
7012 func rewriteValueWasm_OpWasmI64Store16(v *Value) bool {
7013 v_2 := v.Args[2]
7014 v_1 := v.Args[1]
7015 v_0 := v.Args[0]
7016
7017
7018
7019 for {
7020 off := auxIntToInt64(v.AuxInt)
7021 if v_0.Op != OpWasmI64AddConst {
7022 break
7023 }
7024 off2 := auxIntToInt64(v_0.AuxInt)
7025 ptr := v_0.Args[0]
7026 val := v_1
7027 mem := v_2
7028 if !(isU32Bit(off + off2)) {
7029 break
7030 }
7031 v.reset(OpWasmI64Store16)
7032 v.AuxInt = int64ToAuxInt(off + off2)
7033 v.AddArg3(ptr, val, mem)
7034 return true
7035 }
7036 return false
7037 }
7038 func rewriteValueWasm_OpWasmI64Store32(v *Value) bool {
7039 v_2 := v.Args[2]
7040 v_1 := v.Args[1]
7041 v_0 := v.Args[0]
7042
7043
7044
7045 for {
7046 off := auxIntToInt64(v.AuxInt)
7047 if v_0.Op != OpWasmI64AddConst {
7048 break
7049 }
7050 off2 := auxIntToInt64(v_0.AuxInt)
7051 ptr := v_0.Args[0]
7052 val := v_1
7053 mem := v_2
7054 if !(isU32Bit(off + off2)) {
7055 break
7056 }
7057 v.reset(OpWasmI64Store32)
7058 v.AuxInt = int64ToAuxInt(off + off2)
7059 v.AddArg3(ptr, val, mem)
7060 return true
7061 }
7062 return false
7063 }
7064 func rewriteValueWasm_OpWasmI64Store8(v *Value) bool {
7065 v_2 := v.Args[2]
7066 v_1 := v.Args[1]
7067 v_0 := v.Args[0]
7068
7069
7070
7071 for {
7072 off := auxIntToInt64(v.AuxInt)
7073 if v_0.Op != OpWasmI64AddConst {
7074 break
7075 }
7076 off2 := auxIntToInt64(v_0.AuxInt)
7077 ptr := v_0.Args[0]
7078 val := v_1
7079 mem := v_2
7080 if !(isU32Bit(off + off2)) {
7081 break
7082 }
7083 v.reset(OpWasmI64Store8)
7084 v.AuxInt = int64ToAuxInt(off + off2)
7085 v.AddArg3(ptr, val, mem)
7086 return true
7087 }
7088 return false
7089 }
7090 func rewriteValueWasm_OpWasmI64Sub(v *Value) bool {
7091 v_1 := v.Args[1]
7092 v_0 := v.Args[0]
7093
7094
7095 for {
7096 if v_0.Op != OpWasmI64Const {
7097 break
7098 }
7099 x := auxIntToInt64(v_0.AuxInt)
7100 if v_1.Op != OpWasmI64Const {
7101 break
7102 }
7103 y := auxIntToInt64(v_1.AuxInt)
7104 v.reset(OpWasmI64Const)
7105 v.AuxInt = int64ToAuxInt(x - y)
7106 return true
7107 }
7108 return false
7109 }
7110 func rewriteValueWasm_OpWasmI64Xor(v *Value) bool {
7111 v_1 := v.Args[1]
7112 v_0 := v.Args[0]
7113 b := v.Block
7114 typ := &b.Func.Config.Types
7115
7116
7117 for {
7118 if v_0.Op != OpWasmI64Const {
7119 break
7120 }
7121 x := auxIntToInt64(v_0.AuxInt)
7122 if v_1.Op != OpWasmI64Const {
7123 break
7124 }
7125 y := auxIntToInt64(v_1.AuxInt)
7126 v.reset(OpWasmI64Const)
7127 v.AuxInt = int64ToAuxInt(x ^ y)
7128 return true
7129 }
7130
7131
7132 for {
7133 x := v_0
7134 if v_1.Op != OpWasmI64Const || auxIntToInt64(v_1.AuxInt) != 0 {
7135 break
7136 }
7137 v.copyOf(x)
7138 return true
7139 }
7140
7141
7142
7143 for {
7144 if v_0.Op != OpWasmI64Const {
7145 break
7146 }
7147 x := auxIntToInt64(v_0.AuxInt)
7148 y := v_1
7149 if !(y.Op != OpWasmI64Const) {
7150 break
7151 }
7152 v.reset(OpWasmI64Xor)
7153 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
7154 v0.AuxInt = int64ToAuxInt(x)
7155 v.AddArg2(y, v0)
7156 return true
7157 }
7158 return false
7159 }
7160 func rewriteValueWasm_OpZero(v *Value) bool {
7161 v_1 := v.Args[1]
7162 v_0 := v.Args[0]
7163 b := v.Block
7164 typ := &b.Func.Config.Types
7165
7166
7167 for {
7168 if auxIntToInt64(v.AuxInt) != 0 {
7169 break
7170 }
7171 mem := v_1
7172 v.copyOf(mem)
7173 return true
7174 }
7175
7176
7177 for {
7178 if auxIntToInt64(v.AuxInt) != 1 {
7179 break
7180 }
7181 destptr := v_0
7182 mem := v_1
7183 v.reset(OpWasmI64Store8)
7184 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
7185 v0.AuxInt = int64ToAuxInt(0)
7186 v.AddArg3(destptr, v0, mem)
7187 return true
7188 }
7189
7190
7191 for {
7192 if auxIntToInt64(v.AuxInt) != 2 {
7193 break
7194 }
7195 destptr := v_0
7196 mem := v_1
7197 v.reset(OpWasmI64Store16)
7198 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
7199 v0.AuxInt = int64ToAuxInt(0)
7200 v.AddArg3(destptr, v0, mem)
7201 return true
7202 }
7203
7204
7205 for {
7206 if auxIntToInt64(v.AuxInt) != 4 {
7207 break
7208 }
7209 destptr := v_0
7210 mem := v_1
7211 v.reset(OpWasmI64Store32)
7212 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
7213 v0.AuxInt = int64ToAuxInt(0)
7214 v.AddArg3(destptr, v0, mem)
7215 return true
7216 }
7217
7218
7219 for {
7220 if auxIntToInt64(v.AuxInt) != 8 {
7221 break
7222 }
7223 destptr := v_0
7224 mem := v_1
7225 v.reset(OpWasmI64Store)
7226 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
7227 v0.AuxInt = int64ToAuxInt(0)
7228 v.AddArg3(destptr, v0, mem)
7229 return true
7230 }
7231
7232
7233 for {
7234 if auxIntToInt64(v.AuxInt) != 3 {
7235 break
7236 }
7237 destptr := v_0
7238 mem := v_1
7239 v.reset(OpWasmI64Store8)
7240 v.AuxInt = int64ToAuxInt(2)
7241 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
7242 v0.AuxInt = int64ToAuxInt(0)
7243 v1 := b.NewValue0(v.Pos, OpWasmI64Store16, types.TypeMem)
7244 v1.AddArg3(destptr, v0, mem)
7245 v.AddArg3(destptr, v0, v1)
7246 return true
7247 }
7248
7249
7250 for {
7251 if auxIntToInt64(v.AuxInt) != 5 {
7252 break
7253 }
7254 destptr := v_0
7255 mem := v_1
7256 v.reset(OpWasmI64Store8)
7257 v.AuxInt = int64ToAuxInt(4)
7258 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
7259 v0.AuxInt = int64ToAuxInt(0)
7260 v1 := b.NewValue0(v.Pos, OpWasmI64Store32, types.TypeMem)
7261 v1.AddArg3(destptr, v0, mem)
7262 v.AddArg3(destptr, v0, v1)
7263 return true
7264 }
7265
7266
7267 for {
7268 if auxIntToInt64(v.AuxInt) != 6 {
7269 break
7270 }
7271 destptr := v_0
7272 mem := v_1
7273 v.reset(OpWasmI64Store16)
7274 v.AuxInt = int64ToAuxInt(4)
7275 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
7276 v0.AuxInt = int64ToAuxInt(0)
7277 v1 := b.NewValue0(v.Pos, OpWasmI64Store32, types.TypeMem)
7278 v1.AddArg3(destptr, v0, mem)
7279 v.AddArg3(destptr, v0, v1)
7280 return true
7281 }
7282
7283
7284 for {
7285 if auxIntToInt64(v.AuxInt) != 7 {
7286 break
7287 }
7288 destptr := v_0
7289 mem := v_1
7290 v.reset(OpWasmI64Store32)
7291 v.AuxInt = int64ToAuxInt(3)
7292 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
7293 v0.AuxInt = int64ToAuxInt(0)
7294 v1 := b.NewValue0(v.Pos, OpWasmI64Store32, types.TypeMem)
7295 v1.AddArg3(destptr, v0, mem)
7296 v.AddArg3(destptr, v0, v1)
7297 return true
7298 }
7299
7300
7301
7302 for {
7303 s := auxIntToInt64(v.AuxInt)
7304 destptr := v_0
7305 mem := v_1
7306 if !(s%8 != 0 && s > 8 && s < 32) {
7307 break
7308 }
7309 v.reset(OpZero)
7310 v.AuxInt = int64ToAuxInt(s - s%8)
7311 v0 := b.NewValue0(v.Pos, OpOffPtr, destptr.Type)
7312 v0.AuxInt = int64ToAuxInt(s % 8)
7313 v0.AddArg(destptr)
7314 v1 := b.NewValue0(v.Pos, OpWasmI64Store, types.TypeMem)
7315 v2 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
7316 v2.AuxInt = int64ToAuxInt(0)
7317 v1.AddArg3(destptr, v2, mem)
7318 v.AddArg2(v0, v1)
7319 return true
7320 }
7321
7322
7323 for {
7324 if auxIntToInt64(v.AuxInt) != 16 {
7325 break
7326 }
7327 destptr := v_0
7328 mem := v_1
7329 v.reset(OpWasmI64Store)
7330 v.AuxInt = int64ToAuxInt(8)
7331 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
7332 v0.AuxInt = int64ToAuxInt(0)
7333 v1 := b.NewValue0(v.Pos, OpWasmI64Store, types.TypeMem)
7334 v1.AddArg3(destptr, v0, mem)
7335 v.AddArg3(destptr, v0, v1)
7336 return true
7337 }
7338
7339
7340 for {
7341 if auxIntToInt64(v.AuxInt) != 24 {
7342 break
7343 }
7344 destptr := v_0
7345 mem := v_1
7346 v.reset(OpWasmI64Store)
7347 v.AuxInt = int64ToAuxInt(16)
7348 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
7349 v0.AuxInt = int64ToAuxInt(0)
7350 v1 := b.NewValue0(v.Pos, OpWasmI64Store, types.TypeMem)
7351 v1.AuxInt = int64ToAuxInt(8)
7352 v2 := b.NewValue0(v.Pos, OpWasmI64Store, types.TypeMem)
7353 v2.AddArg3(destptr, v0, mem)
7354 v1.AddArg3(destptr, v0, v2)
7355 v.AddArg3(destptr, v0, v1)
7356 return true
7357 }
7358
7359
7360 for {
7361 if auxIntToInt64(v.AuxInt) != 32 {
7362 break
7363 }
7364 destptr := v_0
7365 mem := v_1
7366 v.reset(OpWasmI64Store)
7367 v.AuxInt = int64ToAuxInt(24)
7368 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
7369 v0.AuxInt = int64ToAuxInt(0)
7370 v1 := b.NewValue0(v.Pos, OpWasmI64Store, types.TypeMem)
7371 v1.AuxInt = int64ToAuxInt(16)
7372 v2 := b.NewValue0(v.Pos, OpWasmI64Store, types.TypeMem)
7373 v2.AuxInt = int64ToAuxInt(8)
7374 v3 := b.NewValue0(v.Pos, OpWasmI64Store, types.TypeMem)
7375 v3.AddArg3(destptr, v0, mem)
7376 v2.AddArg3(destptr, v0, v3)
7377 v1.AddArg3(destptr, v0, v2)
7378 v.AddArg3(destptr, v0, v1)
7379 return true
7380 }
7381
7382
7383 for {
7384 s := auxIntToInt64(v.AuxInt)
7385 destptr := v_0
7386 mem := v_1
7387 v.reset(OpWasmLoweredZero)
7388 v.AuxInt = int64ToAuxInt(s)
7389 v.AddArg2(destptr, mem)
7390 return true
7391 }
7392 }
7393 func rewriteValueWasm_OpZeroExt16to32(v *Value) bool {
7394 v_0 := v.Args[0]
7395 b := v.Block
7396 typ := &b.Func.Config.Types
7397
7398
7399 for {
7400 x := v_0
7401 if x.Op != OpWasmI64Load16U {
7402 break
7403 }
7404 v.copyOf(x)
7405 return true
7406 }
7407
7408
7409 for {
7410 x := v_0
7411 v.reset(OpWasmI64And)
7412 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
7413 v0.AuxInt = int64ToAuxInt(0xffff)
7414 v.AddArg2(x, v0)
7415 return true
7416 }
7417 }
7418 func rewriteValueWasm_OpZeroExt16to64(v *Value) bool {
7419 v_0 := v.Args[0]
7420 b := v.Block
7421 typ := &b.Func.Config.Types
7422
7423
7424 for {
7425 x := v_0
7426 if x.Op != OpWasmI64Load16U {
7427 break
7428 }
7429 v.copyOf(x)
7430 return true
7431 }
7432
7433
7434 for {
7435 x := v_0
7436 v.reset(OpWasmI64And)
7437 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
7438 v0.AuxInt = int64ToAuxInt(0xffff)
7439 v.AddArg2(x, v0)
7440 return true
7441 }
7442 }
7443 func rewriteValueWasm_OpZeroExt32to64(v *Value) bool {
7444 v_0 := v.Args[0]
7445 b := v.Block
7446 typ := &b.Func.Config.Types
7447
7448
7449 for {
7450 x := v_0
7451 if x.Op != OpWasmI64Load32U {
7452 break
7453 }
7454 v.copyOf(x)
7455 return true
7456 }
7457
7458
7459 for {
7460 x := v_0
7461 v.reset(OpWasmI64And)
7462 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
7463 v0.AuxInt = int64ToAuxInt(0xffffffff)
7464 v.AddArg2(x, v0)
7465 return true
7466 }
7467 }
7468 func rewriteValueWasm_OpZeroExt8to16(v *Value) bool {
7469 v_0 := v.Args[0]
7470 b := v.Block
7471 typ := &b.Func.Config.Types
7472
7473
7474 for {
7475 x := v_0
7476 if x.Op != OpWasmI64Load8U {
7477 break
7478 }
7479 v.copyOf(x)
7480 return true
7481 }
7482
7483
7484 for {
7485 x := v_0
7486 v.reset(OpWasmI64And)
7487 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
7488 v0.AuxInt = int64ToAuxInt(0xff)
7489 v.AddArg2(x, v0)
7490 return true
7491 }
7492 }
7493 func rewriteValueWasm_OpZeroExt8to32(v *Value) bool {
7494 v_0 := v.Args[0]
7495 b := v.Block
7496 typ := &b.Func.Config.Types
7497
7498
7499 for {
7500 x := v_0
7501 if x.Op != OpWasmI64Load8U {
7502 break
7503 }
7504 v.copyOf(x)
7505 return true
7506 }
7507
7508
7509 for {
7510 x := v_0
7511 v.reset(OpWasmI64And)
7512 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
7513 v0.AuxInt = int64ToAuxInt(0xff)
7514 v.AddArg2(x, v0)
7515 return true
7516 }
7517 }
7518 func rewriteValueWasm_OpZeroExt8to64(v *Value) bool {
7519 v_0 := v.Args[0]
7520 b := v.Block
7521 typ := &b.Func.Config.Types
7522
7523
7524 for {
7525 x := v_0
7526 if x.Op != OpWasmI64Load8U {
7527 break
7528 }
7529 v.copyOf(x)
7530 return true
7531 }
7532
7533
7534 for {
7535 x := v_0
7536 v.reset(OpWasmI64And)
7537 v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64)
7538 v0.AuxInt = int64ToAuxInt(0xff)
7539 v.AddArg2(x, v0)
7540 return true
7541 }
7542 }
7543 func rewriteBlockWasm(b *Block) bool {
7544 return false
7545 }
7546
View as plain text