1
2
3 package ssa
4
5 import "math"
6 import "math/bits"
7 import "cmd/internal/obj"
8 import "cmd/compile/internal/types"
9 import "cmd/compile/internal/ir"
10
11 func rewriteValuegeneric(v *Value) bool {
12 switch v.Op {
13 case OpAdd16:
14 return rewriteValuegeneric_OpAdd16(v)
15 case OpAdd32:
16 return rewriteValuegeneric_OpAdd32(v)
17 case OpAdd32F:
18 return rewriteValuegeneric_OpAdd32F(v)
19 case OpAdd64:
20 return rewriteValuegeneric_OpAdd64(v)
21 case OpAdd64F:
22 return rewriteValuegeneric_OpAdd64F(v)
23 case OpAdd64carry:
24 return rewriteValuegeneric_OpAdd64carry(v)
25 case OpAdd8:
26 return rewriteValuegeneric_OpAdd8(v)
27 case OpAddPtr:
28 return rewriteValuegeneric_OpAddPtr(v)
29 case OpAnd16:
30 return rewriteValuegeneric_OpAnd16(v)
31 case OpAnd32:
32 return rewriteValuegeneric_OpAnd32(v)
33 case OpAnd64:
34 return rewriteValuegeneric_OpAnd64(v)
35 case OpAnd8:
36 return rewriteValuegeneric_OpAnd8(v)
37 case OpAndB:
38 return rewriteValuegeneric_OpAndB(v)
39 case OpArraySelect:
40 return rewriteValuegeneric_OpArraySelect(v)
41 case OpBitLen16:
42 return rewriteValuegeneric_OpBitLen16(v)
43 case OpBitLen32:
44 return rewriteValuegeneric_OpBitLen32(v)
45 case OpBitLen64:
46 return rewriteValuegeneric_OpBitLen64(v)
47 case OpBitLen8:
48 return rewriteValuegeneric_OpBitLen8(v)
49 case OpCeil:
50 return rewriteValuegeneric_OpCeil(v)
51 case OpCom16:
52 return rewriteValuegeneric_OpCom16(v)
53 case OpCom32:
54 return rewriteValuegeneric_OpCom32(v)
55 case OpCom64:
56 return rewriteValuegeneric_OpCom64(v)
57 case OpCom8:
58 return rewriteValuegeneric_OpCom8(v)
59 case OpConstInterface:
60 return rewriteValuegeneric_OpConstInterface(v)
61 case OpConstSlice:
62 return rewriteValuegeneric_OpConstSlice(v)
63 case OpConstString:
64 return rewriteValuegeneric_OpConstString(v)
65 case OpConvert:
66 return rewriteValuegeneric_OpConvert(v)
67 case OpCtz16:
68 return rewriteValuegeneric_OpCtz16(v)
69 case OpCtz32:
70 return rewriteValuegeneric_OpCtz32(v)
71 case OpCtz64:
72 return rewriteValuegeneric_OpCtz64(v)
73 case OpCtz8:
74 return rewriteValuegeneric_OpCtz8(v)
75 case OpCvt32Fto32:
76 return rewriteValuegeneric_OpCvt32Fto32(v)
77 case OpCvt32Fto64:
78 return rewriteValuegeneric_OpCvt32Fto64(v)
79 case OpCvt32Fto64F:
80 return rewriteValuegeneric_OpCvt32Fto64F(v)
81 case OpCvt32to32F:
82 return rewriteValuegeneric_OpCvt32to32F(v)
83 case OpCvt32to64F:
84 return rewriteValuegeneric_OpCvt32to64F(v)
85 case OpCvt64Fto32:
86 return rewriteValuegeneric_OpCvt64Fto32(v)
87 case OpCvt64Fto32F:
88 return rewriteValuegeneric_OpCvt64Fto32F(v)
89 case OpCvt64Fto64:
90 return rewriteValuegeneric_OpCvt64Fto64(v)
91 case OpCvt64to32F:
92 return rewriteValuegeneric_OpCvt64to32F(v)
93 case OpCvt64to64F:
94 return rewriteValuegeneric_OpCvt64to64F(v)
95 case OpCvtBoolToUint8:
96 return rewriteValuegeneric_OpCvtBoolToUint8(v)
97 case OpDiv128u:
98 return rewriteValuegeneric_OpDiv128u(v)
99 case OpDiv16:
100 return rewriteValuegeneric_OpDiv16(v)
101 case OpDiv16u:
102 return rewriteValuegeneric_OpDiv16u(v)
103 case OpDiv32:
104 return rewriteValuegeneric_OpDiv32(v)
105 case OpDiv32F:
106 return rewriteValuegeneric_OpDiv32F(v)
107 case OpDiv32u:
108 return rewriteValuegeneric_OpDiv32u(v)
109 case OpDiv64:
110 return rewriteValuegeneric_OpDiv64(v)
111 case OpDiv64F:
112 return rewriteValuegeneric_OpDiv64F(v)
113 case OpDiv64u:
114 return rewriteValuegeneric_OpDiv64u(v)
115 case OpDiv8:
116 return rewriteValuegeneric_OpDiv8(v)
117 case OpDiv8u:
118 return rewriteValuegeneric_OpDiv8u(v)
119 case OpEq16:
120 return rewriteValuegeneric_OpEq16(v)
121 case OpEq32:
122 return rewriteValuegeneric_OpEq32(v)
123 case OpEq32F:
124 return rewriteValuegeneric_OpEq32F(v)
125 case OpEq64:
126 return rewriteValuegeneric_OpEq64(v)
127 case OpEq64F:
128 return rewriteValuegeneric_OpEq64F(v)
129 case OpEq8:
130 return rewriteValuegeneric_OpEq8(v)
131 case OpEqB:
132 return rewriteValuegeneric_OpEqB(v)
133 case OpEqInter:
134 return rewriteValuegeneric_OpEqInter(v)
135 case OpEqPtr:
136 return rewriteValuegeneric_OpEqPtr(v)
137 case OpEqSlice:
138 return rewriteValuegeneric_OpEqSlice(v)
139 case OpFloor:
140 return rewriteValuegeneric_OpFloor(v)
141 case OpIMake:
142 return rewriteValuegeneric_OpIMake(v)
143 case OpInterLECall:
144 return rewriteValuegeneric_OpInterLECall(v)
145 case OpIsInBounds:
146 return rewriteValuegeneric_OpIsInBounds(v)
147 case OpIsNonNil:
148 return rewriteValuegeneric_OpIsNonNil(v)
149 case OpIsSliceInBounds:
150 return rewriteValuegeneric_OpIsSliceInBounds(v)
151 case OpLeq16:
152 return rewriteValuegeneric_OpLeq16(v)
153 case OpLeq16U:
154 return rewriteValuegeneric_OpLeq16U(v)
155 case OpLeq32:
156 return rewriteValuegeneric_OpLeq32(v)
157 case OpLeq32F:
158 return rewriteValuegeneric_OpLeq32F(v)
159 case OpLeq32U:
160 return rewriteValuegeneric_OpLeq32U(v)
161 case OpLeq64:
162 return rewriteValuegeneric_OpLeq64(v)
163 case OpLeq64F:
164 return rewriteValuegeneric_OpLeq64F(v)
165 case OpLeq64U:
166 return rewriteValuegeneric_OpLeq64U(v)
167 case OpLeq8:
168 return rewriteValuegeneric_OpLeq8(v)
169 case OpLeq8U:
170 return rewriteValuegeneric_OpLeq8U(v)
171 case OpLess16:
172 return rewriteValuegeneric_OpLess16(v)
173 case OpLess16U:
174 return rewriteValuegeneric_OpLess16U(v)
175 case OpLess32:
176 return rewriteValuegeneric_OpLess32(v)
177 case OpLess32F:
178 return rewriteValuegeneric_OpLess32F(v)
179 case OpLess32U:
180 return rewriteValuegeneric_OpLess32U(v)
181 case OpLess64:
182 return rewriteValuegeneric_OpLess64(v)
183 case OpLess64F:
184 return rewriteValuegeneric_OpLess64F(v)
185 case OpLess64U:
186 return rewriteValuegeneric_OpLess64U(v)
187 case OpLess8:
188 return rewriteValuegeneric_OpLess8(v)
189 case OpLess8U:
190 return rewriteValuegeneric_OpLess8U(v)
191 case OpLoad:
192 return rewriteValuegeneric_OpLoad(v)
193 case OpLsh16x16:
194 return rewriteValuegeneric_OpLsh16x16(v)
195 case OpLsh16x32:
196 return rewriteValuegeneric_OpLsh16x32(v)
197 case OpLsh16x64:
198 return rewriteValuegeneric_OpLsh16x64(v)
199 case OpLsh16x8:
200 return rewriteValuegeneric_OpLsh16x8(v)
201 case OpLsh32x16:
202 return rewriteValuegeneric_OpLsh32x16(v)
203 case OpLsh32x32:
204 return rewriteValuegeneric_OpLsh32x32(v)
205 case OpLsh32x64:
206 return rewriteValuegeneric_OpLsh32x64(v)
207 case OpLsh32x8:
208 return rewriteValuegeneric_OpLsh32x8(v)
209 case OpLsh64x16:
210 return rewriteValuegeneric_OpLsh64x16(v)
211 case OpLsh64x32:
212 return rewriteValuegeneric_OpLsh64x32(v)
213 case OpLsh64x64:
214 return rewriteValuegeneric_OpLsh64x64(v)
215 case OpLsh64x8:
216 return rewriteValuegeneric_OpLsh64x8(v)
217 case OpLsh8x16:
218 return rewriteValuegeneric_OpLsh8x16(v)
219 case OpLsh8x32:
220 return rewriteValuegeneric_OpLsh8x32(v)
221 case OpLsh8x64:
222 return rewriteValuegeneric_OpLsh8x64(v)
223 case OpLsh8x8:
224 return rewriteValuegeneric_OpLsh8x8(v)
225 case OpMod16:
226 return rewriteValuegeneric_OpMod16(v)
227 case OpMod16u:
228 return rewriteValuegeneric_OpMod16u(v)
229 case OpMod32:
230 return rewriteValuegeneric_OpMod32(v)
231 case OpMod32u:
232 return rewriteValuegeneric_OpMod32u(v)
233 case OpMod64:
234 return rewriteValuegeneric_OpMod64(v)
235 case OpMod64u:
236 return rewriteValuegeneric_OpMod64u(v)
237 case OpMod8:
238 return rewriteValuegeneric_OpMod8(v)
239 case OpMod8u:
240 return rewriteValuegeneric_OpMod8u(v)
241 case OpMove:
242 return rewriteValuegeneric_OpMove(v)
243 case OpMul16:
244 return rewriteValuegeneric_OpMul16(v)
245 case OpMul32:
246 return rewriteValuegeneric_OpMul32(v)
247 case OpMul32F:
248 return rewriteValuegeneric_OpMul32F(v)
249 case OpMul32uover:
250 return rewriteValuegeneric_OpMul32uover(v)
251 case OpMul64:
252 return rewriteValuegeneric_OpMul64(v)
253 case OpMul64F:
254 return rewriteValuegeneric_OpMul64F(v)
255 case OpMul64uover:
256 return rewriteValuegeneric_OpMul64uover(v)
257 case OpMul8:
258 return rewriteValuegeneric_OpMul8(v)
259 case OpNeg16:
260 return rewriteValuegeneric_OpNeg16(v)
261 case OpNeg32:
262 return rewriteValuegeneric_OpNeg32(v)
263 case OpNeg32F:
264 return rewriteValuegeneric_OpNeg32F(v)
265 case OpNeg64:
266 return rewriteValuegeneric_OpNeg64(v)
267 case OpNeg64F:
268 return rewriteValuegeneric_OpNeg64F(v)
269 case OpNeg8:
270 return rewriteValuegeneric_OpNeg8(v)
271 case OpNeq16:
272 return rewriteValuegeneric_OpNeq16(v)
273 case OpNeq32:
274 return rewriteValuegeneric_OpNeq32(v)
275 case OpNeq32F:
276 return rewriteValuegeneric_OpNeq32F(v)
277 case OpNeq64:
278 return rewriteValuegeneric_OpNeq64(v)
279 case OpNeq64F:
280 return rewriteValuegeneric_OpNeq64F(v)
281 case OpNeq8:
282 return rewriteValuegeneric_OpNeq8(v)
283 case OpNeqB:
284 return rewriteValuegeneric_OpNeqB(v)
285 case OpNeqInter:
286 return rewriteValuegeneric_OpNeqInter(v)
287 case OpNeqPtr:
288 return rewriteValuegeneric_OpNeqPtr(v)
289 case OpNeqSlice:
290 return rewriteValuegeneric_OpNeqSlice(v)
291 case OpNilCheck:
292 return rewriteValuegeneric_OpNilCheck(v)
293 case OpNot:
294 return rewriteValuegeneric_OpNot(v)
295 case OpOffPtr:
296 return rewriteValuegeneric_OpOffPtr(v)
297 case OpOr16:
298 return rewriteValuegeneric_OpOr16(v)
299 case OpOr32:
300 return rewriteValuegeneric_OpOr32(v)
301 case OpOr64:
302 return rewriteValuegeneric_OpOr64(v)
303 case OpOr8:
304 return rewriteValuegeneric_OpOr8(v)
305 case OpOrB:
306 return rewriteValuegeneric_OpOrB(v)
307 case OpPhi:
308 return rewriteValuegeneric_OpPhi(v)
309 case OpPopCount16:
310 return rewriteValuegeneric_OpPopCount16(v)
311 case OpPopCount32:
312 return rewriteValuegeneric_OpPopCount32(v)
313 case OpPopCount64:
314 return rewriteValuegeneric_OpPopCount64(v)
315 case OpPopCount8:
316 return rewriteValuegeneric_OpPopCount8(v)
317 case OpPtrIndex:
318 return rewriteValuegeneric_OpPtrIndex(v)
319 case OpRotateLeft16:
320 return rewriteValuegeneric_OpRotateLeft16(v)
321 case OpRotateLeft32:
322 return rewriteValuegeneric_OpRotateLeft32(v)
323 case OpRotateLeft64:
324 return rewriteValuegeneric_OpRotateLeft64(v)
325 case OpRotateLeft8:
326 return rewriteValuegeneric_OpRotateLeft8(v)
327 case OpRound32F:
328 return rewriteValuegeneric_OpRound32F(v)
329 case OpRound64F:
330 return rewriteValuegeneric_OpRound64F(v)
331 case OpRoundToEven:
332 return rewriteValuegeneric_OpRoundToEven(v)
333 case OpRsh16Ux16:
334 return rewriteValuegeneric_OpRsh16Ux16(v)
335 case OpRsh16Ux32:
336 return rewriteValuegeneric_OpRsh16Ux32(v)
337 case OpRsh16Ux64:
338 return rewriteValuegeneric_OpRsh16Ux64(v)
339 case OpRsh16Ux8:
340 return rewriteValuegeneric_OpRsh16Ux8(v)
341 case OpRsh16x16:
342 return rewriteValuegeneric_OpRsh16x16(v)
343 case OpRsh16x32:
344 return rewriteValuegeneric_OpRsh16x32(v)
345 case OpRsh16x64:
346 return rewriteValuegeneric_OpRsh16x64(v)
347 case OpRsh16x8:
348 return rewriteValuegeneric_OpRsh16x8(v)
349 case OpRsh32Ux16:
350 return rewriteValuegeneric_OpRsh32Ux16(v)
351 case OpRsh32Ux32:
352 return rewriteValuegeneric_OpRsh32Ux32(v)
353 case OpRsh32Ux64:
354 return rewriteValuegeneric_OpRsh32Ux64(v)
355 case OpRsh32Ux8:
356 return rewriteValuegeneric_OpRsh32Ux8(v)
357 case OpRsh32x16:
358 return rewriteValuegeneric_OpRsh32x16(v)
359 case OpRsh32x32:
360 return rewriteValuegeneric_OpRsh32x32(v)
361 case OpRsh32x64:
362 return rewriteValuegeneric_OpRsh32x64(v)
363 case OpRsh32x8:
364 return rewriteValuegeneric_OpRsh32x8(v)
365 case OpRsh64Ux16:
366 return rewriteValuegeneric_OpRsh64Ux16(v)
367 case OpRsh64Ux32:
368 return rewriteValuegeneric_OpRsh64Ux32(v)
369 case OpRsh64Ux64:
370 return rewriteValuegeneric_OpRsh64Ux64(v)
371 case OpRsh64Ux8:
372 return rewriteValuegeneric_OpRsh64Ux8(v)
373 case OpRsh64x16:
374 return rewriteValuegeneric_OpRsh64x16(v)
375 case OpRsh64x32:
376 return rewriteValuegeneric_OpRsh64x32(v)
377 case OpRsh64x64:
378 return rewriteValuegeneric_OpRsh64x64(v)
379 case OpRsh64x8:
380 return rewriteValuegeneric_OpRsh64x8(v)
381 case OpRsh8Ux16:
382 return rewriteValuegeneric_OpRsh8Ux16(v)
383 case OpRsh8Ux32:
384 return rewriteValuegeneric_OpRsh8Ux32(v)
385 case OpRsh8Ux64:
386 return rewriteValuegeneric_OpRsh8Ux64(v)
387 case OpRsh8Ux8:
388 return rewriteValuegeneric_OpRsh8Ux8(v)
389 case OpRsh8x16:
390 return rewriteValuegeneric_OpRsh8x16(v)
391 case OpRsh8x32:
392 return rewriteValuegeneric_OpRsh8x32(v)
393 case OpRsh8x64:
394 return rewriteValuegeneric_OpRsh8x64(v)
395 case OpRsh8x8:
396 return rewriteValuegeneric_OpRsh8x8(v)
397 case OpSelect0:
398 return rewriteValuegeneric_OpSelect0(v)
399 case OpSelect1:
400 return rewriteValuegeneric_OpSelect1(v)
401 case OpSelectN:
402 return rewriteValuegeneric_OpSelectN(v)
403 case OpSignExt16to32:
404 return rewriteValuegeneric_OpSignExt16to32(v)
405 case OpSignExt16to64:
406 return rewriteValuegeneric_OpSignExt16to64(v)
407 case OpSignExt32to64:
408 return rewriteValuegeneric_OpSignExt32to64(v)
409 case OpSignExt8to16:
410 return rewriteValuegeneric_OpSignExt8to16(v)
411 case OpSignExt8to32:
412 return rewriteValuegeneric_OpSignExt8to32(v)
413 case OpSignExt8to64:
414 return rewriteValuegeneric_OpSignExt8to64(v)
415 case OpSliceCap:
416 return rewriteValuegeneric_OpSliceCap(v)
417 case OpSliceLen:
418 return rewriteValuegeneric_OpSliceLen(v)
419 case OpSlicePtr:
420 return rewriteValuegeneric_OpSlicePtr(v)
421 case OpSlicemask:
422 return rewriteValuegeneric_OpSlicemask(v)
423 case OpSqrt:
424 return rewriteValuegeneric_OpSqrt(v)
425 case OpStaticCall:
426 return rewriteValuegeneric_OpStaticCall(v)
427 case OpStaticLECall:
428 return rewriteValuegeneric_OpStaticLECall(v)
429 case OpStore:
430 return rewriteValuegeneric_OpStore(v)
431 case OpStringLen:
432 return rewriteValuegeneric_OpStringLen(v)
433 case OpStringPtr:
434 return rewriteValuegeneric_OpStringPtr(v)
435 case OpStructSelect:
436 return rewriteValuegeneric_OpStructSelect(v)
437 case OpSub16:
438 return rewriteValuegeneric_OpSub16(v)
439 case OpSub32:
440 return rewriteValuegeneric_OpSub32(v)
441 case OpSub32F:
442 return rewriteValuegeneric_OpSub32F(v)
443 case OpSub64:
444 return rewriteValuegeneric_OpSub64(v)
445 case OpSub64F:
446 return rewriteValuegeneric_OpSub64F(v)
447 case OpSub8:
448 return rewriteValuegeneric_OpSub8(v)
449 case OpTrunc:
450 return rewriteValuegeneric_OpTrunc(v)
451 case OpTrunc16to8:
452 return rewriteValuegeneric_OpTrunc16to8(v)
453 case OpTrunc32to16:
454 return rewriteValuegeneric_OpTrunc32to16(v)
455 case OpTrunc32to8:
456 return rewriteValuegeneric_OpTrunc32to8(v)
457 case OpTrunc64to16:
458 return rewriteValuegeneric_OpTrunc64to16(v)
459 case OpTrunc64to32:
460 return rewriteValuegeneric_OpTrunc64to32(v)
461 case OpTrunc64to8:
462 return rewriteValuegeneric_OpTrunc64to8(v)
463 case OpXor16:
464 return rewriteValuegeneric_OpXor16(v)
465 case OpXor32:
466 return rewriteValuegeneric_OpXor32(v)
467 case OpXor64:
468 return rewriteValuegeneric_OpXor64(v)
469 case OpXor8:
470 return rewriteValuegeneric_OpXor8(v)
471 case OpZero:
472 return rewriteValuegeneric_OpZero(v)
473 case OpZeroExt16to32:
474 return rewriteValuegeneric_OpZeroExt16to32(v)
475 case OpZeroExt16to64:
476 return rewriteValuegeneric_OpZeroExt16to64(v)
477 case OpZeroExt32to64:
478 return rewriteValuegeneric_OpZeroExt32to64(v)
479 case OpZeroExt8to16:
480 return rewriteValuegeneric_OpZeroExt8to16(v)
481 case OpZeroExt8to32:
482 return rewriteValuegeneric_OpZeroExt8to32(v)
483 case OpZeroExt8to64:
484 return rewriteValuegeneric_OpZeroExt8to64(v)
485 }
486 return false
487 }
488 func rewriteValuegeneric_OpAdd16(v *Value) bool {
489 v_1 := v.Args[1]
490 v_0 := v.Args[0]
491 b := v.Block
492 config := b.Func.Config
493
494
495 for {
496 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
497 if v_0.Op != OpConst16 {
498 continue
499 }
500 c := auxIntToInt16(v_0.AuxInt)
501 if v_1.Op != OpConst16 {
502 continue
503 }
504 d := auxIntToInt16(v_1.AuxInt)
505 v.reset(OpConst16)
506 v.AuxInt = int16ToAuxInt(c + d)
507 return true
508 }
509 break
510 }
511
512
513 for {
514 t := v.Type
515 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
516 if v_0.Op != OpMul16 {
517 continue
518 }
519 _ = v_0.Args[1]
520 v_0_0 := v_0.Args[0]
521 v_0_1 := v_0.Args[1]
522 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
523 x := v_0_0
524 y := v_0_1
525 if v_1.Op != OpMul16 {
526 continue
527 }
528 _ = v_1.Args[1]
529 v_1_0 := v_1.Args[0]
530 v_1_1 := v_1.Args[1]
531 for _i2 := 0; _i2 <= 1; _i2, v_1_0, v_1_1 = _i2+1, v_1_1, v_1_0 {
532 if x != v_1_0 {
533 continue
534 }
535 z := v_1_1
536 v.reset(OpMul16)
537 v0 := b.NewValue0(v.Pos, OpAdd16, t)
538 v0.AddArg2(y, z)
539 v.AddArg2(x, v0)
540 return true
541 }
542 }
543 }
544 break
545 }
546
547
548 for {
549 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
550 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 {
551 continue
552 }
553 x := v_1
554 v.copyOf(x)
555 return true
556 }
557 break
558 }
559
560
561 for {
562 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
563 x := v_0
564 if v_1.Op != OpNeg16 {
565 continue
566 }
567 y := v_1.Args[0]
568 v.reset(OpSub16)
569 v.AddArg2(x, y)
570 return true
571 }
572 break
573 }
574
575
576 for {
577 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
578 if v_0.Op != OpCom16 {
579 continue
580 }
581 x := v_0.Args[0]
582 if x != v_1 {
583 continue
584 }
585 v.reset(OpConst16)
586 v.AuxInt = int16ToAuxInt(-1)
587 return true
588 }
589 break
590 }
591
592
593 for {
594 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
595 if v_0.Op != OpSub16 {
596 continue
597 }
598 t := v_0.Args[1]
599 x := v_0.Args[0]
600 if v_1.Op != OpAdd16 {
601 continue
602 }
603 _ = v_1.Args[1]
604 v_1_0 := v_1.Args[0]
605 v_1_1 := v_1.Args[1]
606 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
607 if t != v_1_0 {
608 continue
609 }
610 y := v_1_1
611 v.reset(OpAdd16)
612 v.AddArg2(x, y)
613 return true
614 }
615 }
616 break
617 }
618
619
620 for {
621 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
622 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 1 || v_1.Op != OpCom16 {
623 continue
624 }
625 x := v_1.Args[0]
626 v.reset(OpNeg16)
627 v.AddArg(x)
628 return true
629 }
630 break
631 }
632
633
634 for {
635 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
636 x := v_0
637 if v_1.Op != OpSub16 {
638 continue
639 }
640 _ = v_1.Args[1]
641 y := v_1.Args[0]
642 if x != v_1.Args[1] {
643 continue
644 }
645 v.copyOf(y)
646 return true
647 }
648 break
649 }
650
651
652 for {
653 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
654 x := v_0
655 if v_1.Op != OpAdd16 {
656 continue
657 }
658 _ = v_1.Args[1]
659 v_1_0 := v_1.Args[0]
660 v_1_1 := v_1.Args[1]
661 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
662 y := v_1_0
663 if v_1_1.Op != OpSub16 {
664 continue
665 }
666 _ = v_1_1.Args[1]
667 z := v_1_1.Args[0]
668 if x != v_1_1.Args[1] {
669 continue
670 }
671 v.reset(OpAdd16)
672 v.AddArg2(y, z)
673 return true
674 }
675 }
676 break
677 }
678
679
680
681 for {
682 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
683 if v_0.Op != OpAdd16 {
684 continue
685 }
686 _ = v_0.Args[1]
687 v_0_0 := v_0.Args[0]
688 v_0_1 := v_0.Args[1]
689 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
690 i := v_0_0
691 if i.Op != OpConst16 {
692 continue
693 }
694 t := i.Type
695 z := v_0_1
696 x := v_1
697 if !(z.Op != OpConst16 && x.Op != OpConst16) {
698 continue
699 }
700 v.reset(OpAdd16)
701 v0 := b.NewValue0(v.Pos, OpAdd16, t)
702 v0.AddArg2(z, x)
703 v.AddArg2(i, v0)
704 return true
705 }
706 }
707 break
708 }
709
710
711
712 for {
713 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
714 if v_0.Op != OpSub16 {
715 continue
716 }
717 z := v_0.Args[1]
718 i := v_0.Args[0]
719 if i.Op != OpConst16 {
720 continue
721 }
722 t := i.Type
723 x := v_1
724 if !(z.Op != OpConst16 && x.Op != OpConst16) {
725 continue
726 }
727 v.reset(OpAdd16)
728 v0 := b.NewValue0(v.Pos, OpSub16, t)
729 v0.AddArg2(x, z)
730 v.AddArg2(i, v0)
731 return true
732 }
733 break
734 }
735
736
737 for {
738 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
739 if v_0.Op != OpConst16 {
740 continue
741 }
742 t := v_0.Type
743 c := auxIntToInt16(v_0.AuxInt)
744 if v_1.Op != OpAdd16 {
745 continue
746 }
747 _ = v_1.Args[1]
748 v_1_0 := v_1.Args[0]
749 v_1_1 := v_1.Args[1]
750 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
751 if v_1_0.Op != OpConst16 || v_1_0.Type != t {
752 continue
753 }
754 d := auxIntToInt16(v_1_0.AuxInt)
755 x := v_1_1
756 v.reset(OpAdd16)
757 v0 := b.NewValue0(v.Pos, OpConst16, t)
758 v0.AuxInt = int16ToAuxInt(c + d)
759 v.AddArg2(v0, x)
760 return true
761 }
762 }
763 break
764 }
765
766
767 for {
768 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
769 if v_0.Op != OpConst16 {
770 continue
771 }
772 t := v_0.Type
773 c := auxIntToInt16(v_0.AuxInt)
774 if v_1.Op != OpSub16 {
775 continue
776 }
777 x := v_1.Args[1]
778 v_1_0 := v_1.Args[0]
779 if v_1_0.Op != OpConst16 || v_1_0.Type != t {
780 continue
781 }
782 d := auxIntToInt16(v_1_0.AuxInt)
783 v.reset(OpSub16)
784 v0 := b.NewValue0(v.Pos, OpConst16, t)
785 v0.AuxInt = int16ToAuxInt(c + d)
786 v.AddArg2(v0, x)
787 return true
788 }
789 break
790 }
791
792
793
794 for {
795 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
796 if v_0.Op != OpLsh16x64 {
797 continue
798 }
799 _ = v_0.Args[1]
800 x := v_0.Args[0]
801 z := v_0.Args[1]
802 if z.Op != OpConst64 {
803 continue
804 }
805 c := auxIntToInt64(z.AuxInt)
806 if v_1.Op != OpRsh16Ux64 {
807 continue
808 }
809 _ = v_1.Args[1]
810 if x != v_1.Args[0] {
811 continue
812 }
813 v_1_1 := v_1.Args[1]
814 if v_1_1.Op != OpConst64 {
815 continue
816 }
817 d := auxIntToInt64(v_1_1.AuxInt)
818 if !(c < 16 && d == 16-c && canRotate(config, 16)) {
819 continue
820 }
821 v.reset(OpRotateLeft16)
822 v.AddArg2(x, z)
823 return true
824 }
825 break
826 }
827
828
829
830 for {
831 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
832 left := v_0
833 if left.Op != OpLsh16x64 {
834 continue
835 }
836 y := left.Args[1]
837 x := left.Args[0]
838 right := v_1
839 if right.Op != OpRsh16Ux64 {
840 continue
841 }
842 _ = right.Args[1]
843 if x != right.Args[0] {
844 continue
845 }
846 right_1 := right.Args[1]
847 if right_1.Op != OpSub64 {
848 continue
849 }
850 _ = right_1.Args[1]
851 right_1_0 := right_1.Args[0]
852 if right_1_0.Op != OpConst64 || auxIntToInt64(right_1_0.AuxInt) != 16 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 16)) {
853 continue
854 }
855 v.reset(OpRotateLeft16)
856 v.AddArg2(x, y)
857 return true
858 }
859 break
860 }
861
862
863
864 for {
865 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
866 left := v_0
867 if left.Op != OpLsh16x32 {
868 continue
869 }
870 y := left.Args[1]
871 x := left.Args[0]
872 right := v_1
873 if right.Op != OpRsh16Ux32 {
874 continue
875 }
876 _ = right.Args[1]
877 if x != right.Args[0] {
878 continue
879 }
880 right_1 := right.Args[1]
881 if right_1.Op != OpSub32 {
882 continue
883 }
884 _ = right_1.Args[1]
885 right_1_0 := right_1.Args[0]
886 if right_1_0.Op != OpConst32 || auxIntToInt32(right_1_0.AuxInt) != 16 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 16)) {
887 continue
888 }
889 v.reset(OpRotateLeft16)
890 v.AddArg2(x, y)
891 return true
892 }
893 break
894 }
895
896
897
898 for {
899 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
900 left := v_0
901 if left.Op != OpLsh16x16 {
902 continue
903 }
904 y := left.Args[1]
905 x := left.Args[0]
906 right := v_1
907 if right.Op != OpRsh16Ux16 {
908 continue
909 }
910 _ = right.Args[1]
911 if x != right.Args[0] {
912 continue
913 }
914 right_1 := right.Args[1]
915 if right_1.Op != OpSub16 {
916 continue
917 }
918 _ = right_1.Args[1]
919 right_1_0 := right_1.Args[0]
920 if right_1_0.Op != OpConst16 || auxIntToInt16(right_1_0.AuxInt) != 16 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 16)) {
921 continue
922 }
923 v.reset(OpRotateLeft16)
924 v.AddArg2(x, y)
925 return true
926 }
927 break
928 }
929
930
931
932 for {
933 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
934 left := v_0
935 if left.Op != OpLsh16x8 {
936 continue
937 }
938 y := left.Args[1]
939 x := left.Args[0]
940 right := v_1
941 if right.Op != OpRsh16Ux8 {
942 continue
943 }
944 _ = right.Args[1]
945 if x != right.Args[0] {
946 continue
947 }
948 right_1 := right.Args[1]
949 if right_1.Op != OpSub8 {
950 continue
951 }
952 _ = right_1.Args[1]
953 right_1_0 := right_1.Args[0]
954 if right_1_0.Op != OpConst8 || auxIntToInt8(right_1_0.AuxInt) != 16 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 16)) {
955 continue
956 }
957 v.reset(OpRotateLeft16)
958 v.AddArg2(x, y)
959 return true
960 }
961 break
962 }
963
964
965
966 for {
967 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
968 right := v_0
969 if right.Op != OpRsh16Ux64 {
970 continue
971 }
972 y := right.Args[1]
973 x := right.Args[0]
974 left := v_1
975 if left.Op != OpLsh16x64 {
976 continue
977 }
978 _ = left.Args[1]
979 if x != left.Args[0] {
980 continue
981 }
982 z := left.Args[1]
983 if z.Op != OpSub64 {
984 continue
985 }
986 _ = z.Args[1]
987 z_0 := z.Args[0]
988 if z_0.Op != OpConst64 || auxIntToInt64(z_0.AuxInt) != 16 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 16)) {
989 continue
990 }
991 v.reset(OpRotateLeft16)
992 v.AddArg2(x, z)
993 return true
994 }
995 break
996 }
997
998
999
1000 for {
1001 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1002 right := v_0
1003 if right.Op != OpRsh16Ux32 {
1004 continue
1005 }
1006 y := right.Args[1]
1007 x := right.Args[0]
1008 left := v_1
1009 if left.Op != OpLsh16x32 {
1010 continue
1011 }
1012 _ = left.Args[1]
1013 if x != left.Args[0] {
1014 continue
1015 }
1016 z := left.Args[1]
1017 if z.Op != OpSub32 {
1018 continue
1019 }
1020 _ = z.Args[1]
1021 z_0 := z.Args[0]
1022 if z_0.Op != OpConst32 || auxIntToInt32(z_0.AuxInt) != 16 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 16)) {
1023 continue
1024 }
1025 v.reset(OpRotateLeft16)
1026 v.AddArg2(x, z)
1027 return true
1028 }
1029 break
1030 }
1031
1032
1033
1034 for {
1035 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1036 right := v_0
1037 if right.Op != OpRsh16Ux16 {
1038 continue
1039 }
1040 y := right.Args[1]
1041 x := right.Args[0]
1042 left := v_1
1043 if left.Op != OpLsh16x16 {
1044 continue
1045 }
1046 _ = left.Args[1]
1047 if x != left.Args[0] {
1048 continue
1049 }
1050 z := left.Args[1]
1051 if z.Op != OpSub16 {
1052 continue
1053 }
1054 _ = z.Args[1]
1055 z_0 := z.Args[0]
1056 if z_0.Op != OpConst16 || auxIntToInt16(z_0.AuxInt) != 16 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 16)) {
1057 continue
1058 }
1059 v.reset(OpRotateLeft16)
1060 v.AddArg2(x, z)
1061 return true
1062 }
1063 break
1064 }
1065
1066
1067
1068 for {
1069 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1070 right := v_0
1071 if right.Op != OpRsh16Ux8 {
1072 continue
1073 }
1074 y := right.Args[1]
1075 x := right.Args[0]
1076 left := v_1
1077 if left.Op != OpLsh16x8 {
1078 continue
1079 }
1080 _ = left.Args[1]
1081 if x != left.Args[0] {
1082 continue
1083 }
1084 z := left.Args[1]
1085 if z.Op != OpSub8 {
1086 continue
1087 }
1088 _ = z.Args[1]
1089 z_0 := z.Args[0]
1090 if z_0.Op != OpConst8 || auxIntToInt8(z_0.AuxInt) != 16 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 16)) {
1091 continue
1092 }
1093 v.reset(OpRotateLeft16)
1094 v.AddArg2(x, z)
1095 return true
1096 }
1097 break
1098 }
1099 return false
1100 }
1101 func rewriteValuegeneric_OpAdd32(v *Value) bool {
1102 v_1 := v.Args[1]
1103 v_0 := v.Args[0]
1104 b := v.Block
1105 config := b.Func.Config
1106
1107
1108 for {
1109 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1110 if v_0.Op != OpConst32 {
1111 continue
1112 }
1113 c := auxIntToInt32(v_0.AuxInt)
1114 if v_1.Op != OpConst32 {
1115 continue
1116 }
1117 d := auxIntToInt32(v_1.AuxInt)
1118 v.reset(OpConst32)
1119 v.AuxInt = int32ToAuxInt(c + d)
1120 return true
1121 }
1122 break
1123 }
1124
1125
1126 for {
1127 t := v.Type
1128 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1129 if v_0.Op != OpMul32 {
1130 continue
1131 }
1132 _ = v_0.Args[1]
1133 v_0_0 := v_0.Args[0]
1134 v_0_1 := v_0.Args[1]
1135 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
1136 x := v_0_0
1137 y := v_0_1
1138 if v_1.Op != OpMul32 {
1139 continue
1140 }
1141 _ = v_1.Args[1]
1142 v_1_0 := v_1.Args[0]
1143 v_1_1 := v_1.Args[1]
1144 for _i2 := 0; _i2 <= 1; _i2, v_1_0, v_1_1 = _i2+1, v_1_1, v_1_0 {
1145 if x != v_1_0 {
1146 continue
1147 }
1148 z := v_1_1
1149 v.reset(OpMul32)
1150 v0 := b.NewValue0(v.Pos, OpAdd32, t)
1151 v0.AddArg2(y, z)
1152 v.AddArg2(x, v0)
1153 return true
1154 }
1155 }
1156 }
1157 break
1158 }
1159
1160
1161 for {
1162 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1163 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
1164 continue
1165 }
1166 x := v_1
1167 v.copyOf(x)
1168 return true
1169 }
1170 break
1171 }
1172
1173
1174 for {
1175 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1176 x := v_0
1177 if v_1.Op != OpNeg32 {
1178 continue
1179 }
1180 y := v_1.Args[0]
1181 v.reset(OpSub32)
1182 v.AddArg2(x, y)
1183 return true
1184 }
1185 break
1186 }
1187
1188
1189 for {
1190 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1191 if v_0.Op != OpCom32 {
1192 continue
1193 }
1194 x := v_0.Args[0]
1195 if x != v_1 {
1196 continue
1197 }
1198 v.reset(OpConst32)
1199 v.AuxInt = int32ToAuxInt(-1)
1200 return true
1201 }
1202 break
1203 }
1204
1205
1206 for {
1207 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1208 if v_0.Op != OpSub32 {
1209 continue
1210 }
1211 t := v_0.Args[1]
1212 x := v_0.Args[0]
1213 if v_1.Op != OpAdd32 {
1214 continue
1215 }
1216 _ = v_1.Args[1]
1217 v_1_0 := v_1.Args[0]
1218 v_1_1 := v_1.Args[1]
1219 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
1220 if t != v_1_0 {
1221 continue
1222 }
1223 y := v_1_1
1224 v.reset(OpAdd32)
1225 v.AddArg2(x, y)
1226 return true
1227 }
1228 }
1229 break
1230 }
1231
1232
1233 for {
1234 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1235 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 1 || v_1.Op != OpCom32 {
1236 continue
1237 }
1238 x := v_1.Args[0]
1239 v.reset(OpNeg32)
1240 v.AddArg(x)
1241 return true
1242 }
1243 break
1244 }
1245
1246
1247 for {
1248 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1249 x := v_0
1250 if v_1.Op != OpSub32 {
1251 continue
1252 }
1253 _ = v_1.Args[1]
1254 y := v_1.Args[0]
1255 if x != v_1.Args[1] {
1256 continue
1257 }
1258 v.copyOf(y)
1259 return true
1260 }
1261 break
1262 }
1263
1264
1265 for {
1266 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1267 x := v_0
1268 if v_1.Op != OpAdd32 {
1269 continue
1270 }
1271 _ = v_1.Args[1]
1272 v_1_0 := v_1.Args[0]
1273 v_1_1 := v_1.Args[1]
1274 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
1275 y := v_1_0
1276 if v_1_1.Op != OpSub32 {
1277 continue
1278 }
1279 _ = v_1_1.Args[1]
1280 z := v_1_1.Args[0]
1281 if x != v_1_1.Args[1] {
1282 continue
1283 }
1284 v.reset(OpAdd32)
1285 v.AddArg2(y, z)
1286 return true
1287 }
1288 }
1289 break
1290 }
1291
1292
1293
1294 for {
1295 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1296 if v_0.Op != OpAdd32 {
1297 continue
1298 }
1299 _ = v_0.Args[1]
1300 v_0_0 := v_0.Args[0]
1301 v_0_1 := v_0.Args[1]
1302 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
1303 i := v_0_0
1304 if i.Op != OpConst32 {
1305 continue
1306 }
1307 t := i.Type
1308 z := v_0_1
1309 x := v_1
1310 if !(z.Op != OpConst32 && x.Op != OpConst32) {
1311 continue
1312 }
1313 v.reset(OpAdd32)
1314 v0 := b.NewValue0(v.Pos, OpAdd32, t)
1315 v0.AddArg2(z, x)
1316 v.AddArg2(i, v0)
1317 return true
1318 }
1319 }
1320 break
1321 }
1322
1323
1324
1325 for {
1326 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1327 if v_0.Op != OpSub32 {
1328 continue
1329 }
1330 z := v_0.Args[1]
1331 i := v_0.Args[0]
1332 if i.Op != OpConst32 {
1333 continue
1334 }
1335 t := i.Type
1336 x := v_1
1337 if !(z.Op != OpConst32 && x.Op != OpConst32) {
1338 continue
1339 }
1340 v.reset(OpAdd32)
1341 v0 := b.NewValue0(v.Pos, OpSub32, t)
1342 v0.AddArg2(x, z)
1343 v.AddArg2(i, v0)
1344 return true
1345 }
1346 break
1347 }
1348
1349
1350 for {
1351 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1352 if v_0.Op != OpConst32 {
1353 continue
1354 }
1355 t := v_0.Type
1356 c := auxIntToInt32(v_0.AuxInt)
1357 if v_1.Op != OpAdd32 {
1358 continue
1359 }
1360 _ = v_1.Args[1]
1361 v_1_0 := v_1.Args[0]
1362 v_1_1 := v_1.Args[1]
1363 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
1364 if v_1_0.Op != OpConst32 || v_1_0.Type != t {
1365 continue
1366 }
1367 d := auxIntToInt32(v_1_0.AuxInt)
1368 x := v_1_1
1369 v.reset(OpAdd32)
1370 v0 := b.NewValue0(v.Pos, OpConst32, t)
1371 v0.AuxInt = int32ToAuxInt(c + d)
1372 v.AddArg2(v0, x)
1373 return true
1374 }
1375 }
1376 break
1377 }
1378
1379
1380 for {
1381 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1382 if v_0.Op != OpConst32 {
1383 continue
1384 }
1385 t := v_0.Type
1386 c := auxIntToInt32(v_0.AuxInt)
1387 if v_1.Op != OpSub32 {
1388 continue
1389 }
1390 x := v_1.Args[1]
1391 v_1_0 := v_1.Args[0]
1392 if v_1_0.Op != OpConst32 || v_1_0.Type != t {
1393 continue
1394 }
1395 d := auxIntToInt32(v_1_0.AuxInt)
1396 v.reset(OpSub32)
1397 v0 := b.NewValue0(v.Pos, OpConst32, t)
1398 v0.AuxInt = int32ToAuxInt(c + d)
1399 v.AddArg2(v0, x)
1400 return true
1401 }
1402 break
1403 }
1404
1405
1406
1407 for {
1408 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1409 if v_0.Op != OpLsh32x64 {
1410 continue
1411 }
1412 _ = v_0.Args[1]
1413 x := v_0.Args[0]
1414 z := v_0.Args[1]
1415 if z.Op != OpConst64 {
1416 continue
1417 }
1418 c := auxIntToInt64(z.AuxInt)
1419 if v_1.Op != OpRsh32Ux64 {
1420 continue
1421 }
1422 _ = v_1.Args[1]
1423 if x != v_1.Args[0] {
1424 continue
1425 }
1426 v_1_1 := v_1.Args[1]
1427 if v_1_1.Op != OpConst64 {
1428 continue
1429 }
1430 d := auxIntToInt64(v_1_1.AuxInt)
1431 if !(c < 32 && d == 32-c && canRotate(config, 32)) {
1432 continue
1433 }
1434 v.reset(OpRotateLeft32)
1435 v.AddArg2(x, z)
1436 return true
1437 }
1438 break
1439 }
1440
1441
1442
1443 for {
1444 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1445 left := v_0
1446 if left.Op != OpLsh32x64 {
1447 continue
1448 }
1449 y := left.Args[1]
1450 x := left.Args[0]
1451 right := v_1
1452 if right.Op != OpRsh32Ux64 {
1453 continue
1454 }
1455 _ = right.Args[1]
1456 if x != right.Args[0] {
1457 continue
1458 }
1459 right_1 := right.Args[1]
1460 if right_1.Op != OpSub64 {
1461 continue
1462 }
1463 _ = right_1.Args[1]
1464 right_1_0 := right_1.Args[0]
1465 if right_1_0.Op != OpConst64 || auxIntToInt64(right_1_0.AuxInt) != 32 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 32)) {
1466 continue
1467 }
1468 v.reset(OpRotateLeft32)
1469 v.AddArg2(x, y)
1470 return true
1471 }
1472 break
1473 }
1474
1475
1476
1477 for {
1478 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1479 left := v_0
1480 if left.Op != OpLsh32x32 {
1481 continue
1482 }
1483 y := left.Args[1]
1484 x := left.Args[0]
1485 right := v_1
1486 if right.Op != OpRsh32Ux32 {
1487 continue
1488 }
1489 _ = right.Args[1]
1490 if x != right.Args[0] {
1491 continue
1492 }
1493 right_1 := right.Args[1]
1494 if right_1.Op != OpSub32 {
1495 continue
1496 }
1497 _ = right_1.Args[1]
1498 right_1_0 := right_1.Args[0]
1499 if right_1_0.Op != OpConst32 || auxIntToInt32(right_1_0.AuxInt) != 32 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 32)) {
1500 continue
1501 }
1502 v.reset(OpRotateLeft32)
1503 v.AddArg2(x, y)
1504 return true
1505 }
1506 break
1507 }
1508
1509
1510
1511 for {
1512 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1513 left := v_0
1514 if left.Op != OpLsh32x16 {
1515 continue
1516 }
1517 y := left.Args[1]
1518 x := left.Args[0]
1519 right := v_1
1520 if right.Op != OpRsh32Ux16 {
1521 continue
1522 }
1523 _ = right.Args[1]
1524 if x != right.Args[0] {
1525 continue
1526 }
1527 right_1 := right.Args[1]
1528 if right_1.Op != OpSub16 {
1529 continue
1530 }
1531 _ = right_1.Args[1]
1532 right_1_0 := right_1.Args[0]
1533 if right_1_0.Op != OpConst16 || auxIntToInt16(right_1_0.AuxInt) != 32 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 32)) {
1534 continue
1535 }
1536 v.reset(OpRotateLeft32)
1537 v.AddArg2(x, y)
1538 return true
1539 }
1540 break
1541 }
1542
1543
1544
1545 for {
1546 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1547 left := v_0
1548 if left.Op != OpLsh32x8 {
1549 continue
1550 }
1551 y := left.Args[1]
1552 x := left.Args[0]
1553 right := v_1
1554 if right.Op != OpRsh32Ux8 {
1555 continue
1556 }
1557 _ = right.Args[1]
1558 if x != right.Args[0] {
1559 continue
1560 }
1561 right_1 := right.Args[1]
1562 if right_1.Op != OpSub8 {
1563 continue
1564 }
1565 _ = right_1.Args[1]
1566 right_1_0 := right_1.Args[0]
1567 if right_1_0.Op != OpConst8 || auxIntToInt8(right_1_0.AuxInt) != 32 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 32)) {
1568 continue
1569 }
1570 v.reset(OpRotateLeft32)
1571 v.AddArg2(x, y)
1572 return true
1573 }
1574 break
1575 }
1576
1577
1578
1579 for {
1580 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1581 right := v_0
1582 if right.Op != OpRsh32Ux64 {
1583 continue
1584 }
1585 y := right.Args[1]
1586 x := right.Args[0]
1587 left := v_1
1588 if left.Op != OpLsh32x64 {
1589 continue
1590 }
1591 _ = left.Args[1]
1592 if x != left.Args[0] {
1593 continue
1594 }
1595 z := left.Args[1]
1596 if z.Op != OpSub64 {
1597 continue
1598 }
1599 _ = z.Args[1]
1600 z_0 := z.Args[0]
1601 if z_0.Op != OpConst64 || auxIntToInt64(z_0.AuxInt) != 32 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 32)) {
1602 continue
1603 }
1604 v.reset(OpRotateLeft32)
1605 v.AddArg2(x, z)
1606 return true
1607 }
1608 break
1609 }
1610
1611
1612
1613 for {
1614 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1615 right := v_0
1616 if right.Op != OpRsh32Ux32 {
1617 continue
1618 }
1619 y := right.Args[1]
1620 x := right.Args[0]
1621 left := v_1
1622 if left.Op != OpLsh32x32 {
1623 continue
1624 }
1625 _ = left.Args[1]
1626 if x != left.Args[0] {
1627 continue
1628 }
1629 z := left.Args[1]
1630 if z.Op != OpSub32 {
1631 continue
1632 }
1633 _ = z.Args[1]
1634 z_0 := z.Args[0]
1635 if z_0.Op != OpConst32 || auxIntToInt32(z_0.AuxInt) != 32 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 32)) {
1636 continue
1637 }
1638 v.reset(OpRotateLeft32)
1639 v.AddArg2(x, z)
1640 return true
1641 }
1642 break
1643 }
1644
1645
1646
1647 for {
1648 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1649 right := v_0
1650 if right.Op != OpRsh32Ux16 {
1651 continue
1652 }
1653 y := right.Args[1]
1654 x := right.Args[0]
1655 left := v_1
1656 if left.Op != OpLsh32x16 {
1657 continue
1658 }
1659 _ = left.Args[1]
1660 if x != left.Args[0] {
1661 continue
1662 }
1663 z := left.Args[1]
1664 if z.Op != OpSub16 {
1665 continue
1666 }
1667 _ = z.Args[1]
1668 z_0 := z.Args[0]
1669 if z_0.Op != OpConst16 || auxIntToInt16(z_0.AuxInt) != 32 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 32)) {
1670 continue
1671 }
1672 v.reset(OpRotateLeft32)
1673 v.AddArg2(x, z)
1674 return true
1675 }
1676 break
1677 }
1678
1679
1680
1681 for {
1682 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1683 right := v_0
1684 if right.Op != OpRsh32Ux8 {
1685 continue
1686 }
1687 y := right.Args[1]
1688 x := right.Args[0]
1689 left := v_1
1690 if left.Op != OpLsh32x8 {
1691 continue
1692 }
1693 _ = left.Args[1]
1694 if x != left.Args[0] {
1695 continue
1696 }
1697 z := left.Args[1]
1698 if z.Op != OpSub8 {
1699 continue
1700 }
1701 _ = z.Args[1]
1702 z_0 := z.Args[0]
1703 if z_0.Op != OpConst8 || auxIntToInt8(z_0.AuxInt) != 32 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 32)) {
1704 continue
1705 }
1706 v.reset(OpRotateLeft32)
1707 v.AddArg2(x, z)
1708 return true
1709 }
1710 break
1711 }
1712 return false
1713 }
1714 func rewriteValuegeneric_OpAdd32F(v *Value) bool {
1715 v_1 := v.Args[1]
1716 v_0 := v.Args[0]
1717
1718
1719
1720 for {
1721 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1722 if v_0.Op != OpConst32F {
1723 continue
1724 }
1725 c := auxIntToFloat32(v_0.AuxInt)
1726 if v_1.Op != OpConst32F {
1727 continue
1728 }
1729 d := auxIntToFloat32(v_1.AuxInt)
1730 if !(c+d == c+d) {
1731 continue
1732 }
1733 v.reset(OpConst32F)
1734 v.AuxInt = float32ToAuxInt(c + d)
1735 return true
1736 }
1737 break
1738 }
1739 return false
1740 }
1741 func rewriteValuegeneric_OpAdd64(v *Value) bool {
1742 v_1 := v.Args[1]
1743 v_0 := v.Args[0]
1744 b := v.Block
1745 config := b.Func.Config
1746
1747
1748 for {
1749 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1750 if v_0.Op != OpConst64 {
1751 continue
1752 }
1753 c := auxIntToInt64(v_0.AuxInt)
1754 if v_1.Op != OpConst64 {
1755 continue
1756 }
1757 d := auxIntToInt64(v_1.AuxInt)
1758 v.reset(OpConst64)
1759 v.AuxInt = int64ToAuxInt(c + d)
1760 return true
1761 }
1762 break
1763 }
1764
1765
1766 for {
1767 t := v.Type
1768 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1769 if v_0.Op != OpMul64 {
1770 continue
1771 }
1772 _ = v_0.Args[1]
1773 v_0_0 := v_0.Args[0]
1774 v_0_1 := v_0.Args[1]
1775 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
1776 x := v_0_0
1777 y := v_0_1
1778 if v_1.Op != OpMul64 {
1779 continue
1780 }
1781 _ = v_1.Args[1]
1782 v_1_0 := v_1.Args[0]
1783 v_1_1 := v_1.Args[1]
1784 for _i2 := 0; _i2 <= 1; _i2, v_1_0, v_1_1 = _i2+1, v_1_1, v_1_0 {
1785 if x != v_1_0 {
1786 continue
1787 }
1788 z := v_1_1
1789 v.reset(OpMul64)
1790 v0 := b.NewValue0(v.Pos, OpAdd64, t)
1791 v0.AddArg2(y, z)
1792 v.AddArg2(x, v0)
1793 return true
1794 }
1795 }
1796 }
1797 break
1798 }
1799
1800
1801 for {
1802 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1803 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
1804 continue
1805 }
1806 x := v_1
1807 v.copyOf(x)
1808 return true
1809 }
1810 break
1811 }
1812
1813
1814 for {
1815 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1816 x := v_0
1817 if v_1.Op != OpNeg64 {
1818 continue
1819 }
1820 y := v_1.Args[0]
1821 v.reset(OpSub64)
1822 v.AddArg2(x, y)
1823 return true
1824 }
1825 break
1826 }
1827
1828
1829 for {
1830 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1831 if v_0.Op != OpCom64 {
1832 continue
1833 }
1834 x := v_0.Args[0]
1835 if x != v_1 {
1836 continue
1837 }
1838 v.reset(OpConst64)
1839 v.AuxInt = int64ToAuxInt(-1)
1840 return true
1841 }
1842 break
1843 }
1844
1845
1846 for {
1847 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1848 if v_0.Op != OpSub64 {
1849 continue
1850 }
1851 t := v_0.Args[1]
1852 x := v_0.Args[0]
1853 if v_1.Op != OpAdd64 {
1854 continue
1855 }
1856 _ = v_1.Args[1]
1857 v_1_0 := v_1.Args[0]
1858 v_1_1 := v_1.Args[1]
1859 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
1860 if t != v_1_0 {
1861 continue
1862 }
1863 y := v_1_1
1864 v.reset(OpAdd64)
1865 v.AddArg2(x, y)
1866 return true
1867 }
1868 }
1869 break
1870 }
1871
1872
1873 for {
1874 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1875 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 1 || v_1.Op != OpCom64 {
1876 continue
1877 }
1878 x := v_1.Args[0]
1879 v.reset(OpNeg64)
1880 v.AddArg(x)
1881 return true
1882 }
1883 break
1884 }
1885
1886
1887 for {
1888 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1889 x := v_0
1890 if v_1.Op != OpSub64 {
1891 continue
1892 }
1893 _ = v_1.Args[1]
1894 y := v_1.Args[0]
1895 if x != v_1.Args[1] {
1896 continue
1897 }
1898 v.copyOf(y)
1899 return true
1900 }
1901 break
1902 }
1903
1904
1905 for {
1906 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1907 x := v_0
1908 if v_1.Op != OpAdd64 {
1909 continue
1910 }
1911 _ = v_1.Args[1]
1912 v_1_0 := v_1.Args[0]
1913 v_1_1 := v_1.Args[1]
1914 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
1915 y := v_1_0
1916 if v_1_1.Op != OpSub64 {
1917 continue
1918 }
1919 _ = v_1_1.Args[1]
1920 z := v_1_1.Args[0]
1921 if x != v_1_1.Args[1] {
1922 continue
1923 }
1924 v.reset(OpAdd64)
1925 v.AddArg2(y, z)
1926 return true
1927 }
1928 }
1929 break
1930 }
1931
1932
1933
1934 for {
1935 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1936 if v_0.Op != OpAdd64 {
1937 continue
1938 }
1939 _ = v_0.Args[1]
1940 v_0_0 := v_0.Args[0]
1941 v_0_1 := v_0.Args[1]
1942 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
1943 i := v_0_0
1944 if i.Op != OpConst64 {
1945 continue
1946 }
1947 t := i.Type
1948 z := v_0_1
1949 x := v_1
1950 if !(z.Op != OpConst64 && x.Op != OpConst64) {
1951 continue
1952 }
1953 v.reset(OpAdd64)
1954 v0 := b.NewValue0(v.Pos, OpAdd64, t)
1955 v0.AddArg2(z, x)
1956 v.AddArg2(i, v0)
1957 return true
1958 }
1959 }
1960 break
1961 }
1962
1963
1964
1965 for {
1966 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1967 if v_0.Op != OpSub64 {
1968 continue
1969 }
1970 z := v_0.Args[1]
1971 i := v_0.Args[0]
1972 if i.Op != OpConst64 {
1973 continue
1974 }
1975 t := i.Type
1976 x := v_1
1977 if !(z.Op != OpConst64 && x.Op != OpConst64) {
1978 continue
1979 }
1980 v.reset(OpAdd64)
1981 v0 := b.NewValue0(v.Pos, OpSub64, t)
1982 v0.AddArg2(x, z)
1983 v.AddArg2(i, v0)
1984 return true
1985 }
1986 break
1987 }
1988
1989
1990 for {
1991 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1992 if v_0.Op != OpConst64 {
1993 continue
1994 }
1995 t := v_0.Type
1996 c := auxIntToInt64(v_0.AuxInt)
1997 if v_1.Op != OpAdd64 {
1998 continue
1999 }
2000 _ = v_1.Args[1]
2001 v_1_0 := v_1.Args[0]
2002 v_1_1 := v_1.Args[1]
2003 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
2004 if v_1_0.Op != OpConst64 || v_1_0.Type != t {
2005 continue
2006 }
2007 d := auxIntToInt64(v_1_0.AuxInt)
2008 x := v_1_1
2009 v.reset(OpAdd64)
2010 v0 := b.NewValue0(v.Pos, OpConst64, t)
2011 v0.AuxInt = int64ToAuxInt(c + d)
2012 v.AddArg2(v0, x)
2013 return true
2014 }
2015 }
2016 break
2017 }
2018
2019
2020 for {
2021 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2022 if v_0.Op != OpConst64 {
2023 continue
2024 }
2025 t := v_0.Type
2026 c := auxIntToInt64(v_0.AuxInt)
2027 if v_1.Op != OpSub64 {
2028 continue
2029 }
2030 x := v_1.Args[1]
2031 v_1_0 := v_1.Args[0]
2032 if v_1_0.Op != OpConst64 || v_1_0.Type != t {
2033 continue
2034 }
2035 d := auxIntToInt64(v_1_0.AuxInt)
2036 v.reset(OpSub64)
2037 v0 := b.NewValue0(v.Pos, OpConst64, t)
2038 v0.AuxInt = int64ToAuxInt(c + d)
2039 v.AddArg2(v0, x)
2040 return true
2041 }
2042 break
2043 }
2044
2045
2046
2047 for {
2048 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2049 if v_0.Op != OpLsh64x64 {
2050 continue
2051 }
2052 _ = v_0.Args[1]
2053 x := v_0.Args[0]
2054 z := v_0.Args[1]
2055 if z.Op != OpConst64 {
2056 continue
2057 }
2058 c := auxIntToInt64(z.AuxInt)
2059 if v_1.Op != OpRsh64Ux64 {
2060 continue
2061 }
2062 _ = v_1.Args[1]
2063 if x != v_1.Args[0] {
2064 continue
2065 }
2066 v_1_1 := v_1.Args[1]
2067 if v_1_1.Op != OpConst64 {
2068 continue
2069 }
2070 d := auxIntToInt64(v_1_1.AuxInt)
2071 if !(c < 64 && d == 64-c && canRotate(config, 64)) {
2072 continue
2073 }
2074 v.reset(OpRotateLeft64)
2075 v.AddArg2(x, z)
2076 return true
2077 }
2078 break
2079 }
2080
2081
2082
2083 for {
2084 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2085 left := v_0
2086 if left.Op != OpLsh64x64 {
2087 continue
2088 }
2089 y := left.Args[1]
2090 x := left.Args[0]
2091 right := v_1
2092 if right.Op != OpRsh64Ux64 {
2093 continue
2094 }
2095 _ = right.Args[1]
2096 if x != right.Args[0] {
2097 continue
2098 }
2099 right_1 := right.Args[1]
2100 if right_1.Op != OpSub64 {
2101 continue
2102 }
2103 _ = right_1.Args[1]
2104 right_1_0 := right_1.Args[0]
2105 if right_1_0.Op != OpConst64 || auxIntToInt64(right_1_0.AuxInt) != 64 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 64)) {
2106 continue
2107 }
2108 v.reset(OpRotateLeft64)
2109 v.AddArg2(x, y)
2110 return true
2111 }
2112 break
2113 }
2114
2115
2116
2117 for {
2118 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2119 left := v_0
2120 if left.Op != OpLsh64x32 {
2121 continue
2122 }
2123 y := left.Args[1]
2124 x := left.Args[0]
2125 right := v_1
2126 if right.Op != OpRsh64Ux32 {
2127 continue
2128 }
2129 _ = right.Args[1]
2130 if x != right.Args[0] {
2131 continue
2132 }
2133 right_1 := right.Args[1]
2134 if right_1.Op != OpSub32 {
2135 continue
2136 }
2137 _ = right_1.Args[1]
2138 right_1_0 := right_1.Args[0]
2139 if right_1_0.Op != OpConst32 || auxIntToInt32(right_1_0.AuxInt) != 64 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 64)) {
2140 continue
2141 }
2142 v.reset(OpRotateLeft64)
2143 v.AddArg2(x, y)
2144 return true
2145 }
2146 break
2147 }
2148
2149
2150
2151 for {
2152 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2153 left := v_0
2154 if left.Op != OpLsh64x16 {
2155 continue
2156 }
2157 y := left.Args[1]
2158 x := left.Args[0]
2159 right := v_1
2160 if right.Op != OpRsh64Ux16 {
2161 continue
2162 }
2163 _ = right.Args[1]
2164 if x != right.Args[0] {
2165 continue
2166 }
2167 right_1 := right.Args[1]
2168 if right_1.Op != OpSub16 {
2169 continue
2170 }
2171 _ = right_1.Args[1]
2172 right_1_0 := right_1.Args[0]
2173 if right_1_0.Op != OpConst16 || auxIntToInt16(right_1_0.AuxInt) != 64 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 64)) {
2174 continue
2175 }
2176 v.reset(OpRotateLeft64)
2177 v.AddArg2(x, y)
2178 return true
2179 }
2180 break
2181 }
2182
2183
2184
2185 for {
2186 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2187 left := v_0
2188 if left.Op != OpLsh64x8 {
2189 continue
2190 }
2191 y := left.Args[1]
2192 x := left.Args[0]
2193 right := v_1
2194 if right.Op != OpRsh64Ux8 {
2195 continue
2196 }
2197 _ = right.Args[1]
2198 if x != right.Args[0] {
2199 continue
2200 }
2201 right_1 := right.Args[1]
2202 if right_1.Op != OpSub8 {
2203 continue
2204 }
2205 _ = right_1.Args[1]
2206 right_1_0 := right_1.Args[0]
2207 if right_1_0.Op != OpConst8 || auxIntToInt8(right_1_0.AuxInt) != 64 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 64)) {
2208 continue
2209 }
2210 v.reset(OpRotateLeft64)
2211 v.AddArg2(x, y)
2212 return true
2213 }
2214 break
2215 }
2216
2217
2218
2219 for {
2220 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2221 right := v_0
2222 if right.Op != OpRsh64Ux64 {
2223 continue
2224 }
2225 y := right.Args[1]
2226 x := right.Args[0]
2227 left := v_1
2228 if left.Op != OpLsh64x64 {
2229 continue
2230 }
2231 _ = left.Args[1]
2232 if x != left.Args[0] {
2233 continue
2234 }
2235 z := left.Args[1]
2236 if z.Op != OpSub64 {
2237 continue
2238 }
2239 _ = z.Args[1]
2240 z_0 := z.Args[0]
2241 if z_0.Op != OpConst64 || auxIntToInt64(z_0.AuxInt) != 64 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 64)) {
2242 continue
2243 }
2244 v.reset(OpRotateLeft64)
2245 v.AddArg2(x, z)
2246 return true
2247 }
2248 break
2249 }
2250
2251
2252
2253 for {
2254 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2255 right := v_0
2256 if right.Op != OpRsh64Ux32 {
2257 continue
2258 }
2259 y := right.Args[1]
2260 x := right.Args[0]
2261 left := v_1
2262 if left.Op != OpLsh64x32 {
2263 continue
2264 }
2265 _ = left.Args[1]
2266 if x != left.Args[0] {
2267 continue
2268 }
2269 z := left.Args[1]
2270 if z.Op != OpSub32 {
2271 continue
2272 }
2273 _ = z.Args[1]
2274 z_0 := z.Args[0]
2275 if z_0.Op != OpConst32 || auxIntToInt32(z_0.AuxInt) != 64 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 64)) {
2276 continue
2277 }
2278 v.reset(OpRotateLeft64)
2279 v.AddArg2(x, z)
2280 return true
2281 }
2282 break
2283 }
2284
2285
2286
2287 for {
2288 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2289 right := v_0
2290 if right.Op != OpRsh64Ux16 {
2291 continue
2292 }
2293 y := right.Args[1]
2294 x := right.Args[0]
2295 left := v_1
2296 if left.Op != OpLsh64x16 {
2297 continue
2298 }
2299 _ = left.Args[1]
2300 if x != left.Args[0] {
2301 continue
2302 }
2303 z := left.Args[1]
2304 if z.Op != OpSub16 {
2305 continue
2306 }
2307 _ = z.Args[1]
2308 z_0 := z.Args[0]
2309 if z_0.Op != OpConst16 || auxIntToInt16(z_0.AuxInt) != 64 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 64)) {
2310 continue
2311 }
2312 v.reset(OpRotateLeft64)
2313 v.AddArg2(x, z)
2314 return true
2315 }
2316 break
2317 }
2318
2319
2320
2321 for {
2322 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2323 right := v_0
2324 if right.Op != OpRsh64Ux8 {
2325 continue
2326 }
2327 y := right.Args[1]
2328 x := right.Args[0]
2329 left := v_1
2330 if left.Op != OpLsh64x8 {
2331 continue
2332 }
2333 _ = left.Args[1]
2334 if x != left.Args[0] {
2335 continue
2336 }
2337 z := left.Args[1]
2338 if z.Op != OpSub8 {
2339 continue
2340 }
2341 _ = z.Args[1]
2342 z_0 := z.Args[0]
2343 if z_0.Op != OpConst8 || auxIntToInt8(z_0.AuxInt) != 64 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 64)) {
2344 continue
2345 }
2346 v.reset(OpRotateLeft64)
2347 v.AddArg2(x, z)
2348 return true
2349 }
2350 break
2351 }
2352 return false
2353 }
2354 func rewriteValuegeneric_OpAdd64F(v *Value) bool {
2355 v_1 := v.Args[1]
2356 v_0 := v.Args[0]
2357
2358
2359
2360 for {
2361 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2362 if v_0.Op != OpConst64F {
2363 continue
2364 }
2365 c := auxIntToFloat64(v_0.AuxInt)
2366 if v_1.Op != OpConst64F {
2367 continue
2368 }
2369 d := auxIntToFloat64(v_1.AuxInt)
2370 if !(c+d == c+d) {
2371 continue
2372 }
2373 v.reset(OpConst64F)
2374 v.AuxInt = float64ToAuxInt(c + d)
2375 return true
2376 }
2377 break
2378 }
2379 return false
2380 }
2381 func rewriteValuegeneric_OpAdd64carry(v *Value) bool {
2382 v_2 := v.Args[2]
2383 v_1 := v.Args[1]
2384 v_0 := v.Args[0]
2385 b := v.Block
2386
2387
2388
2389 for {
2390 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2391 if v_0.Op != OpConst64 {
2392 continue
2393 }
2394 t := v_0.Type
2395 x := auxIntToInt64(v_0.AuxInt)
2396 if v_1.Op != OpConst64 {
2397 continue
2398 }
2399 y := auxIntToInt64(v_1.AuxInt)
2400 if v_2.Op != OpConst64 {
2401 continue
2402 }
2403 c := auxIntToInt64(v_2.AuxInt)
2404 if !(c >= 0 && c <= 1) {
2405 continue
2406 }
2407 v.reset(OpMakeTuple)
2408 v0 := b.NewValue0(v.Pos, OpConst64, t)
2409 v0.AuxInt = int64ToAuxInt(bitsAdd64(x, y, c).sum)
2410 v1 := b.NewValue0(v.Pos, OpConst64, t)
2411 v1.AuxInt = int64ToAuxInt(bitsAdd64(x, y, c).carry)
2412 v.AddArg2(v0, v1)
2413 return true
2414 }
2415 break
2416 }
2417 return false
2418 }
2419 func rewriteValuegeneric_OpAdd8(v *Value) bool {
2420 v_1 := v.Args[1]
2421 v_0 := v.Args[0]
2422 b := v.Block
2423 config := b.Func.Config
2424
2425
2426 for {
2427 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2428 if v_0.Op != OpConst8 {
2429 continue
2430 }
2431 c := auxIntToInt8(v_0.AuxInt)
2432 if v_1.Op != OpConst8 {
2433 continue
2434 }
2435 d := auxIntToInt8(v_1.AuxInt)
2436 v.reset(OpConst8)
2437 v.AuxInt = int8ToAuxInt(c + d)
2438 return true
2439 }
2440 break
2441 }
2442
2443
2444 for {
2445 t := v.Type
2446 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2447 if v_0.Op != OpMul8 {
2448 continue
2449 }
2450 _ = v_0.Args[1]
2451 v_0_0 := v_0.Args[0]
2452 v_0_1 := v_0.Args[1]
2453 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
2454 x := v_0_0
2455 y := v_0_1
2456 if v_1.Op != OpMul8 {
2457 continue
2458 }
2459 _ = v_1.Args[1]
2460 v_1_0 := v_1.Args[0]
2461 v_1_1 := v_1.Args[1]
2462 for _i2 := 0; _i2 <= 1; _i2, v_1_0, v_1_1 = _i2+1, v_1_1, v_1_0 {
2463 if x != v_1_0 {
2464 continue
2465 }
2466 z := v_1_1
2467 v.reset(OpMul8)
2468 v0 := b.NewValue0(v.Pos, OpAdd8, t)
2469 v0.AddArg2(y, z)
2470 v.AddArg2(x, v0)
2471 return true
2472 }
2473 }
2474 }
2475 break
2476 }
2477
2478
2479 for {
2480 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2481 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 {
2482 continue
2483 }
2484 x := v_1
2485 v.copyOf(x)
2486 return true
2487 }
2488 break
2489 }
2490
2491
2492 for {
2493 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2494 x := v_0
2495 if v_1.Op != OpNeg8 {
2496 continue
2497 }
2498 y := v_1.Args[0]
2499 v.reset(OpSub8)
2500 v.AddArg2(x, y)
2501 return true
2502 }
2503 break
2504 }
2505
2506
2507 for {
2508 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2509 if v_0.Op != OpCom8 {
2510 continue
2511 }
2512 x := v_0.Args[0]
2513 if x != v_1 {
2514 continue
2515 }
2516 v.reset(OpConst8)
2517 v.AuxInt = int8ToAuxInt(-1)
2518 return true
2519 }
2520 break
2521 }
2522
2523
2524 for {
2525 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2526 if v_0.Op != OpSub8 {
2527 continue
2528 }
2529 t := v_0.Args[1]
2530 x := v_0.Args[0]
2531 if v_1.Op != OpAdd8 {
2532 continue
2533 }
2534 _ = v_1.Args[1]
2535 v_1_0 := v_1.Args[0]
2536 v_1_1 := v_1.Args[1]
2537 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
2538 if t != v_1_0 {
2539 continue
2540 }
2541 y := v_1_1
2542 v.reset(OpAdd8)
2543 v.AddArg2(x, y)
2544 return true
2545 }
2546 }
2547 break
2548 }
2549
2550
2551 for {
2552 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2553 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 1 || v_1.Op != OpCom8 {
2554 continue
2555 }
2556 x := v_1.Args[0]
2557 v.reset(OpNeg8)
2558 v.AddArg(x)
2559 return true
2560 }
2561 break
2562 }
2563
2564
2565 for {
2566 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2567 x := v_0
2568 if v_1.Op != OpSub8 {
2569 continue
2570 }
2571 _ = v_1.Args[1]
2572 y := v_1.Args[0]
2573 if x != v_1.Args[1] {
2574 continue
2575 }
2576 v.copyOf(y)
2577 return true
2578 }
2579 break
2580 }
2581
2582
2583 for {
2584 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2585 x := v_0
2586 if v_1.Op != OpAdd8 {
2587 continue
2588 }
2589 _ = v_1.Args[1]
2590 v_1_0 := v_1.Args[0]
2591 v_1_1 := v_1.Args[1]
2592 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
2593 y := v_1_0
2594 if v_1_1.Op != OpSub8 {
2595 continue
2596 }
2597 _ = v_1_1.Args[1]
2598 z := v_1_1.Args[0]
2599 if x != v_1_1.Args[1] {
2600 continue
2601 }
2602 v.reset(OpAdd8)
2603 v.AddArg2(y, z)
2604 return true
2605 }
2606 }
2607 break
2608 }
2609
2610
2611
2612 for {
2613 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2614 if v_0.Op != OpAdd8 {
2615 continue
2616 }
2617 _ = v_0.Args[1]
2618 v_0_0 := v_0.Args[0]
2619 v_0_1 := v_0.Args[1]
2620 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
2621 i := v_0_0
2622 if i.Op != OpConst8 {
2623 continue
2624 }
2625 t := i.Type
2626 z := v_0_1
2627 x := v_1
2628 if !(z.Op != OpConst8 && x.Op != OpConst8) {
2629 continue
2630 }
2631 v.reset(OpAdd8)
2632 v0 := b.NewValue0(v.Pos, OpAdd8, t)
2633 v0.AddArg2(z, x)
2634 v.AddArg2(i, v0)
2635 return true
2636 }
2637 }
2638 break
2639 }
2640
2641
2642
2643 for {
2644 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2645 if v_0.Op != OpSub8 {
2646 continue
2647 }
2648 z := v_0.Args[1]
2649 i := v_0.Args[0]
2650 if i.Op != OpConst8 {
2651 continue
2652 }
2653 t := i.Type
2654 x := v_1
2655 if !(z.Op != OpConst8 && x.Op != OpConst8) {
2656 continue
2657 }
2658 v.reset(OpAdd8)
2659 v0 := b.NewValue0(v.Pos, OpSub8, t)
2660 v0.AddArg2(x, z)
2661 v.AddArg2(i, v0)
2662 return true
2663 }
2664 break
2665 }
2666
2667
2668 for {
2669 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2670 if v_0.Op != OpConst8 {
2671 continue
2672 }
2673 t := v_0.Type
2674 c := auxIntToInt8(v_0.AuxInt)
2675 if v_1.Op != OpAdd8 {
2676 continue
2677 }
2678 _ = v_1.Args[1]
2679 v_1_0 := v_1.Args[0]
2680 v_1_1 := v_1.Args[1]
2681 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
2682 if v_1_0.Op != OpConst8 || v_1_0.Type != t {
2683 continue
2684 }
2685 d := auxIntToInt8(v_1_0.AuxInt)
2686 x := v_1_1
2687 v.reset(OpAdd8)
2688 v0 := b.NewValue0(v.Pos, OpConst8, t)
2689 v0.AuxInt = int8ToAuxInt(c + d)
2690 v.AddArg2(v0, x)
2691 return true
2692 }
2693 }
2694 break
2695 }
2696
2697
2698 for {
2699 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2700 if v_0.Op != OpConst8 {
2701 continue
2702 }
2703 t := v_0.Type
2704 c := auxIntToInt8(v_0.AuxInt)
2705 if v_1.Op != OpSub8 {
2706 continue
2707 }
2708 x := v_1.Args[1]
2709 v_1_0 := v_1.Args[0]
2710 if v_1_0.Op != OpConst8 || v_1_0.Type != t {
2711 continue
2712 }
2713 d := auxIntToInt8(v_1_0.AuxInt)
2714 v.reset(OpSub8)
2715 v0 := b.NewValue0(v.Pos, OpConst8, t)
2716 v0.AuxInt = int8ToAuxInt(c + d)
2717 v.AddArg2(v0, x)
2718 return true
2719 }
2720 break
2721 }
2722
2723
2724
2725 for {
2726 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2727 if v_0.Op != OpLsh8x64 {
2728 continue
2729 }
2730 _ = v_0.Args[1]
2731 x := v_0.Args[0]
2732 z := v_0.Args[1]
2733 if z.Op != OpConst64 {
2734 continue
2735 }
2736 c := auxIntToInt64(z.AuxInt)
2737 if v_1.Op != OpRsh8Ux64 {
2738 continue
2739 }
2740 _ = v_1.Args[1]
2741 if x != v_1.Args[0] {
2742 continue
2743 }
2744 v_1_1 := v_1.Args[1]
2745 if v_1_1.Op != OpConst64 {
2746 continue
2747 }
2748 d := auxIntToInt64(v_1_1.AuxInt)
2749 if !(c < 8 && d == 8-c && canRotate(config, 8)) {
2750 continue
2751 }
2752 v.reset(OpRotateLeft8)
2753 v.AddArg2(x, z)
2754 return true
2755 }
2756 break
2757 }
2758
2759
2760
2761 for {
2762 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2763 left := v_0
2764 if left.Op != OpLsh8x64 {
2765 continue
2766 }
2767 y := left.Args[1]
2768 x := left.Args[0]
2769 right := v_1
2770 if right.Op != OpRsh8Ux64 {
2771 continue
2772 }
2773 _ = right.Args[1]
2774 if x != right.Args[0] {
2775 continue
2776 }
2777 right_1 := right.Args[1]
2778 if right_1.Op != OpSub64 {
2779 continue
2780 }
2781 _ = right_1.Args[1]
2782 right_1_0 := right_1.Args[0]
2783 if right_1_0.Op != OpConst64 || auxIntToInt64(right_1_0.AuxInt) != 8 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 8)) {
2784 continue
2785 }
2786 v.reset(OpRotateLeft8)
2787 v.AddArg2(x, y)
2788 return true
2789 }
2790 break
2791 }
2792
2793
2794
2795 for {
2796 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2797 left := v_0
2798 if left.Op != OpLsh8x32 {
2799 continue
2800 }
2801 y := left.Args[1]
2802 x := left.Args[0]
2803 right := v_1
2804 if right.Op != OpRsh8Ux32 {
2805 continue
2806 }
2807 _ = right.Args[1]
2808 if x != right.Args[0] {
2809 continue
2810 }
2811 right_1 := right.Args[1]
2812 if right_1.Op != OpSub32 {
2813 continue
2814 }
2815 _ = right_1.Args[1]
2816 right_1_0 := right_1.Args[0]
2817 if right_1_0.Op != OpConst32 || auxIntToInt32(right_1_0.AuxInt) != 8 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 8)) {
2818 continue
2819 }
2820 v.reset(OpRotateLeft8)
2821 v.AddArg2(x, y)
2822 return true
2823 }
2824 break
2825 }
2826
2827
2828
2829 for {
2830 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2831 left := v_0
2832 if left.Op != OpLsh8x16 {
2833 continue
2834 }
2835 y := left.Args[1]
2836 x := left.Args[0]
2837 right := v_1
2838 if right.Op != OpRsh8Ux16 {
2839 continue
2840 }
2841 _ = right.Args[1]
2842 if x != right.Args[0] {
2843 continue
2844 }
2845 right_1 := right.Args[1]
2846 if right_1.Op != OpSub16 {
2847 continue
2848 }
2849 _ = right_1.Args[1]
2850 right_1_0 := right_1.Args[0]
2851 if right_1_0.Op != OpConst16 || auxIntToInt16(right_1_0.AuxInt) != 8 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 8)) {
2852 continue
2853 }
2854 v.reset(OpRotateLeft8)
2855 v.AddArg2(x, y)
2856 return true
2857 }
2858 break
2859 }
2860
2861
2862
2863 for {
2864 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2865 left := v_0
2866 if left.Op != OpLsh8x8 {
2867 continue
2868 }
2869 y := left.Args[1]
2870 x := left.Args[0]
2871 right := v_1
2872 if right.Op != OpRsh8Ux8 {
2873 continue
2874 }
2875 _ = right.Args[1]
2876 if x != right.Args[0] {
2877 continue
2878 }
2879 right_1 := right.Args[1]
2880 if right_1.Op != OpSub8 {
2881 continue
2882 }
2883 _ = right_1.Args[1]
2884 right_1_0 := right_1.Args[0]
2885 if right_1_0.Op != OpConst8 || auxIntToInt8(right_1_0.AuxInt) != 8 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 8)) {
2886 continue
2887 }
2888 v.reset(OpRotateLeft8)
2889 v.AddArg2(x, y)
2890 return true
2891 }
2892 break
2893 }
2894
2895
2896
2897 for {
2898 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2899 right := v_0
2900 if right.Op != OpRsh8Ux64 {
2901 continue
2902 }
2903 y := right.Args[1]
2904 x := right.Args[0]
2905 left := v_1
2906 if left.Op != OpLsh8x64 {
2907 continue
2908 }
2909 _ = left.Args[1]
2910 if x != left.Args[0] {
2911 continue
2912 }
2913 z := left.Args[1]
2914 if z.Op != OpSub64 {
2915 continue
2916 }
2917 _ = z.Args[1]
2918 z_0 := z.Args[0]
2919 if z_0.Op != OpConst64 || auxIntToInt64(z_0.AuxInt) != 8 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 8)) {
2920 continue
2921 }
2922 v.reset(OpRotateLeft8)
2923 v.AddArg2(x, z)
2924 return true
2925 }
2926 break
2927 }
2928
2929
2930
2931 for {
2932 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2933 right := v_0
2934 if right.Op != OpRsh8Ux32 {
2935 continue
2936 }
2937 y := right.Args[1]
2938 x := right.Args[0]
2939 left := v_1
2940 if left.Op != OpLsh8x32 {
2941 continue
2942 }
2943 _ = left.Args[1]
2944 if x != left.Args[0] {
2945 continue
2946 }
2947 z := left.Args[1]
2948 if z.Op != OpSub32 {
2949 continue
2950 }
2951 _ = z.Args[1]
2952 z_0 := z.Args[0]
2953 if z_0.Op != OpConst32 || auxIntToInt32(z_0.AuxInt) != 8 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 8)) {
2954 continue
2955 }
2956 v.reset(OpRotateLeft8)
2957 v.AddArg2(x, z)
2958 return true
2959 }
2960 break
2961 }
2962
2963
2964
2965 for {
2966 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2967 right := v_0
2968 if right.Op != OpRsh8Ux16 {
2969 continue
2970 }
2971 y := right.Args[1]
2972 x := right.Args[0]
2973 left := v_1
2974 if left.Op != OpLsh8x16 {
2975 continue
2976 }
2977 _ = left.Args[1]
2978 if x != left.Args[0] {
2979 continue
2980 }
2981 z := left.Args[1]
2982 if z.Op != OpSub16 {
2983 continue
2984 }
2985 _ = z.Args[1]
2986 z_0 := z.Args[0]
2987 if z_0.Op != OpConst16 || auxIntToInt16(z_0.AuxInt) != 8 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 8)) {
2988 continue
2989 }
2990 v.reset(OpRotateLeft8)
2991 v.AddArg2(x, z)
2992 return true
2993 }
2994 break
2995 }
2996
2997
2998
2999 for {
3000 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3001 right := v_0
3002 if right.Op != OpRsh8Ux8 {
3003 continue
3004 }
3005 y := right.Args[1]
3006 x := right.Args[0]
3007 left := v_1
3008 if left.Op != OpLsh8x8 {
3009 continue
3010 }
3011 _ = left.Args[1]
3012 if x != left.Args[0] {
3013 continue
3014 }
3015 z := left.Args[1]
3016 if z.Op != OpSub8 {
3017 continue
3018 }
3019 _ = z.Args[1]
3020 z_0 := z.Args[0]
3021 if z_0.Op != OpConst8 || auxIntToInt8(z_0.AuxInt) != 8 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 8)) {
3022 continue
3023 }
3024 v.reset(OpRotateLeft8)
3025 v.AddArg2(x, z)
3026 return true
3027 }
3028 break
3029 }
3030 return false
3031 }
3032 func rewriteValuegeneric_OpAddPtr(v *Value) bool {
3033 v_1 := v.Args[1]
3034 v_0 := v.Args[0]
3035
3036
3037 for {
3038 t := v.Type
3039 x := v_0
3040 if v_1.Op != OpConst64 {
3041 break
3042 }
3043 c := auxIntToInt64(v_1.AuxInt)
3044 v.reset(OpOffPtr)
3045 v.Type = t
3046 v.AuxInt = int64ToAuxInt(c)
3047 v.AddArg(x)
3048 return true
3049 }
3050
3051
3052 for {
3053 t := v.Type
3054 x := v_0
3055 if v_1.Op != OpConst32 {
3056 break
3057 }
3058 c := auxIntToInt32(v_1.AuxInt)
3059 v.reset(OpOffPtr)
3060 v.Type = t
3061 v.AuxInt = int64ToAuxInt(int64(c))
3062 v.AddArg(x)
3063 return true
3064 }
3065 return false
3066 }
3067 func rewriteValuegeneric_OpAnd16(v *Value) bool {
3068 v_1 := v.Args[1]
3069 v_0 := v.Args[0]
3070 b := v.Block
3071
3072
3073 for {
3074 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3075 if v_0.Op != OpConst16 {
3076 continue
3077 }
3078 c := auxIntToInt16(v_0.AuxInt)
3079 if v_1.Op != OpConst16 {
3080 continue
3081 }
3082 d := auxIntToInt16(v_1.AuxInt)
3083 v.reset(OpConst16)
3084 v.AuxInt = int16ToAuxInt(c & d)
3085 return true
3086 }
3087 break
3088 }
3089
3090
3091 for {
3092 t := v.Type
3093 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3094 if v_0.Op != OpCom16 {
3095 continue
3096 }
3097 x := v_0.Args[0]
3098 if v_1.Op != OpCom16 {
3099 continue
3100 }
3101 y := v_1.Args[0]
3102 v.reset(OpCom16)
3103 v0 := b.NewValue0(v.Pos, OpOr16, t)
3104 v0.AddArg2(x, y)
3105 v.AddArg(v0)
3106 return true
3107 }
3108 break
3109 }
3110
3111
3112
3113 for {
3114 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3115 if v_0.Op != OpConst16 {
3116 continue
3117 }
3118 m := auxIntToInt16(v_0.AuxInt)
3119 if v_1.Op != OpRsh16Ux64 {
3120 continue
3121 }
3122 _ = v_1.Args[1]
3123 v_1_1 := v_1.Args[1]
3124 if v_1_1.Op != OpConst64 {
3125 continue
3126 }
3127 c := auxIntToInt64(v_1_1.AuxInt)
3128 if !(c >= int64(16-ntz16(m))) {
3129 continue
3130 }
3131 v.reset(OpConst16)
3132 v.AuxInt = int16ToAuxInt(0)
3133 return true
3134 }
3135 break
3136 }
3137
3138
3139
3140 for {
3141 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3142 if v_0.Op != OpConst16 {
3143 continue
3144 }
3145 m := auxIntToInt16(v_0.AuxInt)
3146 if v_1.Op != OpLsh16x64 {
3147 continue
3148 }
3149 _ = v_1.Args[1]
3150 v_1_1 := v_1.Args[1]
3151 if v_1_1.Op != OpConst64 {
3152 continue
3153 }
3154 c := auxIntToInt64(v_1_1.AuxInt)
3155 if !(c >= int64(16-nlz16(m))) {
3156 continue
3157 }
3158 v.reset(OpConst16)
3159 v.AuxInt = int16ToAuxInt(0)
3160 return true
3161 }
3162 break
3163 }
3164
3165
3166 for {
3167 x := v_0
3168 if x != v_1 {
3169 break
3170 }
3171 v.copyOf(x)
3172 return true
3173 }
3174
3175
3176 for {
3177 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3178 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != -1 {
3179 continue
3180 }
3181 x := v_1
3182 v.copyOf(x)
3183 return true
3184 }
3185 break
3186 }
3187
3188
3189 for {
3190 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3191 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 {
3192 continue
3193 }
3194 v.reset(OpConst16)
3195 v.AuxInt = int16ToAuxInt(0)
3196 return true
3197 }
3198 break
3199 }
3200
3201
3202 for {
3203 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3204 if v_0.Op != OpCom16 {
3205 continue
3206 }
3207 x := v_0.Args[0]
3208 if x != v_1 {
3209 continue
3210 }
3211 v.reset(OpConst16)
3212 v.AuxInt = int16ToAuxInt(0)
3213 return true
3214 }
3215 break
3216 }
3217
3218
3219 for {
3220 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3221 x := v_0
3222 if v_1.Op != OpAnd16 {
3223 continue
3224 }
3225 _ = v_1.Args[1]
3226 v_1_0 := v_1.Args[0]
3227 v_1_1 := v_1.Args[1]
3228 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
3229 if x != v_1_0 {
3230 continue
3231 }
3232 y := v_1_1
3233 v.reset(OpAnd16)
3234 v.AddArg2(x, y)
3235 return true
3236 }
3237 }
3238 break
3239 }
3240
3241
3242
3243 for {
3244 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3245 if v_0.Op != OpAnd16 {
3246 continue
3247 }
3248 _ = v_0.Args[1]
3249 v_0_0 := v_0.Args[0]
3250 v_0_1 := v_0.Args[1]
3251 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
3252 i := v_0_0
3253 if i.Op != OpConst16 {
3254 continue
3255 }
3256 t := i.Type
3257 z := v_0_1
3258 x := v_1
3259 if !(z.Op != OpConst16 && x.Op != OpConst16) {
3260 continue
3261 }
3262 v.reset(OpAnd16)
3263 v0 := b.NewValue0(v.Pos, OpAnd16, t)
3264 v0.AddArg2(z, x)
3265 v.AddArg2(i, v0)
3266 return true
3267 }
3268 }
3269 break
3270 }
3271
3272
3273 for {
3274 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3275 if v_0.Op != OpConst16 {
3276 continue
3277 }
3278 t := v_0.Type
3279 c := auxIntToInt16(v_0.AuxInt)
3280 if v_1.Op != OpAnd16 {
3281 continue
3282 }
3283 _ = v_1.Args[1]
3284 v_1_0 := v_1.Args[0]
3285 v_1_1 := v_1.Args[1]
3286 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
3287 if v_1_0.Op != OpConst16 || v_1_0.Type != t {
3288 continue
3289 }
3290 d := auxIntToInt16(v_1_0.AuxInt)
3291 x := v_1_1
3292 v.reset(OpAnd16)
3293 v0 := b.NewValue0(v.Pos, OpConst16, t)
3294 v0.AuxInt = int16ToAuxInt(c & d)
3295 v.AddArg2(v0, x)
3296 return true
3297 }
3298 }
3299 break
3300 }
3301 return false
3302 }
3303 func rewriteValuegeneric_OpAnd32(v *Value) bool {
3304 v_1 := v.Args[1]
3305 v_0 := v.Args[0]
3306 b := v.Block
3307
3308
3309 for {
3310 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3311 if v_0.Op != OpConst32 {
3312 continue
3313 }
3314 c := auxIntToInt32(v_0.AuxInt)
3315 if v_1.Op != OpConst32 {
3316 continue
3317 }
3318 d := auxIntToInt32(v_1.AuxInt)
3319 v.reset(OpConst32)
3320 v.AuxInt = int32ToAuxInt(c & d)
3321 return true
3322 }
3323 break
3324 }
3325
3326
3327 for {
3328 t := v.Type
3329 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3330 if v_0.Op != OpCom32 {
3331 continue
3332 }
3333 x := v_0.Args[0]
3334 if v_1.Op != OpCom32 {
3335 continue
3336 }
3337 y := v_1.Args[0]
3338 v.reset(OpCom32)
3339 v0 := b.NewValue0(v.Pos, OpOr32, t)
3340 v0.AddArg2(x, y)
3341 v.AddArg(v0)
3342 return true
3343 }
3344 break
3345 }
3346
3347
3348
3349 for {
3350 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3351 if v_0.Op != OpConst32 {
3352 continue
3353 }
3354 m := auxIntToInt32(v_0.AuxInt)
3355 if v_1.Op != OpRsh32Ux64 {
3356 continue
3357 }
3358 _ = v_1.Args[1]
3359 v_1_1 := v_1.Args[1]
3360 if v_1_1.Op != OpConst64 {
3361 continue
3362 }
3363 c := auxIntToInt64(v_1_1.AuxInt)
3364 if !(c >= int64(32-ntz32(m))) {
3365 continue
3366 }
3367 v.reset(OpConst32)
3368 v.AuxInt = int32ToAuxInt(0)
3369 return true
3370 }
3371 break
3372 }
3373
3374
3375
3376 for {
3377 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3378 if v_0.Op != OpConst32 {
3379 continue
3380 }
3381 m := auxIntToInt32(v_0.AuxInt)
3382 if v_1.Op != OpLsh32x64 {
3383 continue
3384 }
3385 _ = v_1.Args[1]
3386 v_1_1 := v_1.Args[1]
3387 if v_1_1.Op != OpConst64 {
3388 continue
3389 }
3390 c := auxIntToInt64(v_1_1.AuxInt)
3391 if !(c >= int64(32-nlz32(m))) {
3392 continue
3393 }
3394 v.reset(OpConst32)
3395 v.AuxInt = int32ToAuxInt(0)
3396 return true
3397 }
3398 break
3399 }
3400
3401
3402 for {
3403 x := v_0
3404 if x != v_1 {
3405 break
3406 }
3407 v.copyOf(x)
3408 return true
3409 }
3410
3411
3412 for {
3413 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3414 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != -1 {
3415 continue
3416 }
3417 x := v_1
3418 v.copyOf(x)
3419 return true
3420 }
3421 break
3422 }
3423
3424
3425 for {
3426 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3427 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
3428 continue
3429 }
3430 v.reset(OpConst32)
3431 v.AuxInt = int32ToAuxInt(0)
3432 return true
3433 }
3434 break
3435 }
3436
3437
3438 for {
3439 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3440 if v_0.Op != OpCom32 {
3441 continue
3442 }
3443 x := v_0.Args[0]
3444 if x != v_1 {
3445 continue
3446 }
3447 v.reset(OpConst32)
3448 v.AuxInt = int32ToAuxInt(0)
3449 return true
3450 }
3451 break
3452 }
3453
3454
3455 for {
3456 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3457 x := v_0
3458 if v_1.Op != OpAnd32 {
3459 continue
3460 }
3461 _ = v_1.Args[1]
3462 v_1_0 := v_1.Args[0]
3463 v_1_1 := v_1.Args[1]
3464 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
3465 if x != v_1_0 {
3466 continue
3467 }
3468 y := v_1_1
3469 v.reset(OpAnd32)
3470 v.AddArg2(x, y)
3471 return true
3472 }
3473 }
3474 break
3475 }
3476
3477
3478
3479 for {
3480 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3481 if v_0.Op != OpAnd32 {
3482 continue
3483 }
3484 _ = v_0.Args[1]
3485 v_0_0 := v_0.Args[0]
3486 v_0_1 := v_0.Args[1]
3487 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
3488 i := v_0_0
3489 if i.Op != OpConst32 {
3490 continue
3491 }
3492 t := i.Type
3493 z := v_0_1
3494 x := v_1
3495 if !(z.Op != OpConst32 && x.Op != OpConst32) {
3496 continue
3497 }
3498 v.reset(OpAnd32)
3499 v0 := b.NewValue0(v.Pos, OpAnd32, t)
3500 v0.AddArg2(z, x)
3501 v.AddArg2(i, v0)
3502 return true
3503 }
3504 }
3505 break
3506 }
3507
3508
3509 for {
3510 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3511 if v_0.Op != OpConst32 {
3512 continue
3513 }
3514 t := v_0.Type
3515 c := auxIntToInt32(v_0.AuxInt)
3516 if v_1.Op != OpAnd32 {
3517 continue
3518 }
3519 _ = v_1.Args[1]
3520 v_1_0 := v_1.Args[0]
3521 v_1_1 := v_1.Args[1]
3522 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
3523 if v_1_0.Op != OpConst32 || v_1_0.Type != t {
3524 continue
3525 }
3526 d := auxIntToInt32(v_1_0.AuxInt)
3527 x := v_1_1
3528 v.reset(OpAnd32)
3529 v0 := b.NewValue0(v.Pos, OpConst32, t)
3530 v0.AuxInt = int32ToAuxInt(c & d)
3531 v.AddArg2(v0, x)
3532 return true
3533 }
3534 }
3535 break
3536 }
3537 return false
3538 }
3539 func rewriteValuegeneric_OpAnd64(v *Value) bool {
3540 v_1 := v.Args[1]
3541 v_0 := v.Args[0]
3542 b := v.Block
3543
3544
3545 for {
3546 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3547 if v_0.Op != OpConst64 {
3548 continue
3549 }
3550 c := auxIntToInt64(v_0.AuxInt)
3551 if v_1.Op != OpConst64 {
3552 continue
3553 }
3554 d := auxIntToInt64(v_1.AuxInt)
3555 v.reset(OpConst64)
3556 v.AuxInt = int64ToAuxInt(c & d)
3557 return true
3558 }
3559 break
3560 }
3561
3562
3563 for {
3564 t := v.Type
3565 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3566 if v_0.Op != OpCom64 {
3567 continue
3568 }
3569 x := v_0.Args[0]
3570 if v_1.Op != OpCom64 {
3571 continue
3572 }
3573 y := v_1.Args[0]
3574 v.reset(OpCom64)
3575 v0 := b.NewValue0(v.Pos, OpOr64, t)
3576 v0.AddArg2(x, y)
3577 v.AddArg(v0)
3578 return true
3579 }
3580 break
3581 }
3582
3583
3584
3585 for {
3586 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3587 if v_0.Op != OpConst64 {
3588 continue
3589 }
3590 m := auxIntToInt64(v_0.AuxInt)
3591 if v_1.Op != OpRsh64Ux64 {
3592 continue
3593 }
3594 _ = v_1.Args[1]
3595 v_1_1 := v_1.Args[1]
3596 if v_1_1.Op != OpConst64 {
3597 continue
3598 }
3599 c := auxIntToInt64(v_1_1.AuxInt)
3600 if !(c >= int64(64-ntz64(m))) {
3601 continue
3602 }
3603 v.reset(OpConst64)
3604 v.AuxInt = int64ToAuxInt(0)
3605 return true
3606 }
3607 break
3608 }
3609
3610
3611
3612 for {
3613 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3614 if v_0.Op != OpConst64 {
3615 continue
3616 }
3617 m := auxIntToInt64(v_0.AuxInt)
3618 if v_1.Op != OpLsh64x64 {
3619 continue
3620 }
3621 _ = v_1.Args[1]
3622 v_1_1 := v_1.Args[1]
3623 if v_1_1.Op != OpConst64 {
3624 continue
3625 }
3626 c := auxIntToInt64(v_1_1.AuxInt)
3627 if !(c >= int64(64-nlz64(m))) {
3628 continue
3629 }
3630 v.reset(OpConst64)
3631 v.AuxInt = int64ToAuxInt(0)
3632 return true
3633 }
3634 break
3635 }
3636
3637
3638 for {
3639 x := v_0
3640 if x != v_1 {
3641 break
3642 }
3643 v.copyOf(x)
3644 return true
3645 }
3646
3647
3648 for {
3649 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3650 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != -1 {
3651 continue
3652 }
3653 x := v_1
3654 v.copyOf(x)
3655 return true
3656 }
3657 break
3658 }
3659
3660
3661 for {
3662 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3663 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
3664 continue
3665 }
3666 v.reset(OpConst64)
3667 v.AuxInt = int64ToAuxInt(0)
3668 return true
3669 }
3670 break
3671 }
3672
3673
3674 for {
3675 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3676 if v_0.Op != OpCom64 {
3677 continue
3678 }
3679 x := v_0.Args[0]
3680 if x != v_1 {
3681 continue
3682 }
3683 v.reset(OpConst64)
3684 v.AuxInt = int64ToAuxInt(0)
3685 return true
3686 }
3687 break
3688 }
3689
3690
3691 for {
3692 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3693 x := v_0
3694 if v_1.Op != OpAnd64 {
3695 continue
3696 }
3697 _ = v_1.Args[1]
3698 v_1_0 := v_1.Args[0]
3699 v_1_1 := v_1.Args[1]
3700 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
3701 if x != v_1_0 {
3702 continue
3703 }
3704 y := v_1_1
3705 v.reset(OpAnd64)
3706 v.AddArg2(x, y)
3707 return true
3708 }
3709 }
3710 break
3711 }
3712
3713
3714
3715 for {
3716 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3717 if v_0.Op != OpAnd64 {
3718 continue
3719 }
3720 _ = v_0.Args[1]
3721 v_0_0 := v_0.Args[0]
3722 v_0_1 := v_0.Args[1]
3723 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
3724 i := v_0_0
3725 if i.Op != OpConst64 {
3726 continue
3727 }
3728 t := i.Type
3729 z := v_0_1
3730 x := v_1
3731 if !(z.Op != OpConst64 && x.Op != OpConst64) {
3732 continue
3733 }
3734 v.reset(OpAnd64)
3735 v0 := b.NewValue0(v.Pos, OpAnd64, t)
3736 v0.AddArg2(z, x)
3737 v.AddArg2(i, v0)
3738 return true
3739 }
3740 }
3741 break
3742 }
3743
3744
3745 for {
3746 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3747 if v_0.Op != OpConst64 {
3748 continue
3749 }
3750 t := v_0.Type
3751 c := auxIntToInt64(v_0.AuxInt)
3752 if v_1.Op != OpAnd64 {
3753 continue
3754 }
3755 _ = v_1.Args[1]
3756 v_1_0 := v_1.Args[0]
3757 v_1_1 := v_1.Args[1]
3758 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
3759 if v_1_0.Op != OpConst64 || v_1_0.Type != t {
3760 continue
3761 }
3762 d := auxIntToInt64(v_1_0.AuxInt)
3763 x := v_1_1
3764 v.reset(OpAnd64)
3765 v0 := b.NewValue0(v.Pos, OpConst64, t)
3766 v0.AuxInt = int64ToAuxInt(c & d)
3767 v.AddArg2(v0, x)
3768 return true
3769 }
3770 }
3771 break
3772 }
3773 return false
3774 }
3775 func rewriteValuegeneric_OpAnd8(v *Value) bool {
3776 v_1 := v.Args[1]
3777 v_0 := v.Args[0]
3778 b := v.Block
3779
3780
3781 for {
3782 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3783 if v_0.Op != OpConst8 {
3784 continue
3785 }
3786 c := auxIntToInt8(v_0.AuxInt)
3787 if v_1.Op != OpConst8 {
3788 continue
3789 }
3790 d := auxIntToInt8(v_1.AuxInt)
3791 v.reset(OpConst8)
3792 v.AuxInt = int8ToAuxInt(c & d)
3793 return true
3794 }
3795 break
3796 }
3797
3798
3799 for {
3800 t := v.Type
3801 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3802 if v_0.Op != OpCom8 {
3803 continue
3804 }
3805 x := v_0.Args[0]
3806 if v_1.Op != OpCom8 {
3807 continue
3808 }
3809 y := v_1.Args[0]
3810 v.reset(OpCom8)
3811 v0 := b.NewValue0(v.Pos, OpOr8, t)
3812 v0.AddArg2(x, y)
3813 v.AddArg(v0)
3814 return true
3815 }
3816 break
3817 }
3818
3819
3820
3821 for {
3822 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3823 if v_0.Op != OpConst8 {
3824 continue
3825 }
3826 m := auxIntToInt8(v_0.AuxInt)
3827 if v_1.Op != OpRsh8Ux64 {
3828 continue
3829 }
3830 _ = v_1.Args[1]
3831 v_1_1 := v_1.Args[1]
3832 if v_1_1.Op != OpConst64 {
3833 continue
3834 }
3835 c := auxIntToInt64(v_1_1.AuxInt)
3836 if !(c >= int64(8-ntz8(m))) {
3837 continue
3838 }
3839 v.reset(OpConst8)
3840 v.AuxInt = int8ToAuxInt(0)
3841 return true
3842 }
3843 break
3844 }
3845
3846
3847
3848 for {
3849 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3850 if v_0.Op != OpConst8 {
3851 continue
3852 }
3853 m := auxIntToInt8(v_0.AuxInt)
3854 if v_1.Op != OpLsh8x64 {
3855 continue
3856 }
3857 _ = v_1.Args[1]
3858 v_1_1 := v_1.Args[1]
3859 if v_1_1.Op != OpConst64 {
3860 continue
3861 }
3862 c := auxIntToInt64(v_1_1.AuxInt)
3863 if !(c >= int64(8-nlz8(m))) {
3864 continue
3865 }
3866 v.reset(OpConst8)
3867 v.AuxInt = int8ToAuxInt(0)
3868 return true
3869 }
3870 break
3871 }
3872
3873
3874 for {
3875 x := v_0
3876 if x != v_1 {
3877 break
3878 }
3879 v.copyOf(x)
3880 return true
3881 }
3882
3883
3884 for {
3885 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3886 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != -1 {
3887 continue
3888 }
3889 x := v_1
3890 v.copyOf(x)
3891 return true
3892 }
3893 break
3894 }
3895
3896
3897 for {
3898 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3899 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 {
3900 continue
3901 }
3902 v.reset(OpConst8)
3903 v.AuxInt = int8ToAuxInt(0)
3904 return true
3905 }
3906 break
3907 }
3908
3909
3910 for {
3911 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3912 if v_0.Op != OpCom8 {
3913 continue
3914 }
3915 x := v_0.Args[0]
3916 if x != v_1 {
3917 continue
3918 }
3919 v.reset(OpConst8)
3920 v.AuxInt = int8ToAuxInt(0)
3921 return true
3922 }
3923 break
3924 }
3925
3926
3927 for {
3928 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3929 x := v_0
3930 if v_1.Op != OpAnd8 {
3931 continue
3932 }
3933 _ = v_1.Args[1]
3934 v_1_0 := v_1.Args[0]
3935 v_1_1 := v_1.Args[1]
3936 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
3937 if x != v_1_0 {
3938 continue
3939 }
3940 y := v_1_1
3941 v.reset(OpAnd8)
3942 v.AddArg2(x, y)
3943 return true
3944 }
3945 }
3946 break
3947 }
3948
3949
3950
3951 for {
3952 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3953 if v_0.Op != OpAnd8 {
3954 continue
3955 }
3956 _ = v_0.Args[1]
3957 v_0_0 := v_0.Args[0]
3958 v_0_1 := v_0.Args[1]
3959 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
3960 i := v_0_0
3961 if i.Op != OpConst8 {
3962 continue
3963 }
3964 t := i.Type
3965 z := v_0_1
3966 x := v_1
3967 if !(z.Op != OpConst8 && x.Op != OpConst8) {
3968 continue
3969 }
3970 v.reset(OpAnd8)
3971 v0 := b.NewValue0(v.Pos, OpAnd8, t)
3972 v0.AddArg2(z, x)
3973 v.AddArg2(i, v0)
3974 return true
3975 }
3976 }
3977 break
3978 }
3979
3980
3981 for {
3982 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3983 if v_0.Op != OpConst8 {
3984 continue
3985 }
3986 t := v_0.Type
3987 c := auxIntToInt8(v_0.AuxInt)
3988 if v_1.Op != OpAnd8 {
3989 continue
3990 }
3991 _ = v_1.Args[1]
3992 v_1_0 := v_1.Args[0]
3993 v_1_1 := v_1.Args[1]
3994 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
3995 if v_1_0.Op != OpConst8 || v_1_0.Type != t {
3996 continue
3997 }
3998 d := auxIntToInt8(v_1_0.AuxInt)
3999 x := v_1_1
4000 v.reset(OpAnd8)
4001 v0 := b.NewValue0(v.Pos, OpConst8, t)
4002 v0.AuxInt = int8ToAuxInt(c & d)
4003 v.AddArg2(v0, x)
4004 return true
4005 }
4006 }
4007 break
4008 }
4009 return false
4010 }
4011 func rewriteValuegeneric_OpAndB(v *Value) bool {
4012 v_1 := v.Args[1]
4013 v_0 := v.Args[0]
4014 b := v.Block
4015
4016
4017
4018 for {
4019 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
4020 if v_0.Op != OpLeq64 {
4021 continue
4022 }
4023 x := v_0.Args[1]
4024 v_0_0 := v_0.Args[0]
4025 if v_0_0.Op != OpConst64 {
4026 continue
4027 }
4028 c := auxIntToInt64(v_0_0.AuxInt)
4029 if v_1.Op != OpLess64 {
4030 continue
4031 }
4032 _ = v_1.Args[1]
4033 if x != v_1.Args[0] {
4034 continue
4035 }
4036 v_1_1 := v_1.Args[1]
4037 if v_1_1.Op != OpConst64 {
4038 continue
4039 }
4040 d := auxIntToInt64(v_1_1.AuxInt)
4041 if !(d >= c) {
4042 continue
4043 }
4044 v.reset(OpLess64U)
4045 v0 := b.NewValue0(v.Pos, OpSub64, x.Type)
4046 v1 := b.NewValue0(v.Pos, OpConst64, x.Type)
4047 v1.AuxInt = int64ToAuxInt(c)
4048 v0.AddArg2(x, v1)
4049 v2 := b.NewValue0(v.Pos, OpConst64, x.Type)
4050 v2.AuxInt = int64ToAuxInt(d - c)
4051 v.AddArg2(v0, v2)
4052 return true
4053 }
4054 break
4055 }
4056
4057
4058
4059 for {
4060 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
4061 if v_0.Op != OpLeq64 {
4062 continue
4063 }
4064 x := v_0.Args[1]
4065 v_0_0 := v_0.Args[0]
4066 if v_0_0.Op != OpConst64 {
4067 continue
4068 }
4069 c := auxIntToInt64(v_0_0.AuxInt)
4070 if v_1.Op != OpLeq64 {
4071 continue
4072 }
4073 _ = v_1.Args[1]
4074 if x != v_1.Args[0] {
4075 continue
4076 }
4077 v_1_1 := v_1.Args[1]
4078 if v_1_1.Op != OpConst64 {
4079 continue
4080 }
4081 d := auxIntToInt64(v_1_1.AuxInt)
4082 if !(d >= c) {
4083 continue
4084 }
4085 v.reset(OpLeq64U)
4086 v0 := b.NewValue0(v.Pos, OpSub64, x.Type)
4087 v1 := b.NewValue0(v.Pos, OpConst64, x.Type)
4088 v1.AuxInt = int64ToAuxInt(c)
4089 v0.AddArg2(x, v1)
4090 v2 := b.NewValue0(v.Pos, OpConst64, x.Type)
4091 v2.AuxInt = int64ToAuxInt(d - c)
4092 v.AddArg2(v0, v2)
4093 return true
4094 }
4095 break
4096 }
4097
4098
4099
4100 for {
4101 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
4102 if v_0.Op != OpLeq32 {
4103 continue
4104 }
4105 x := v_0.Args[1]
4106 v_0_0 := v_0.Args[0]
4107 if v_0_0.Op != OpConst32 {
4108 continue
4109 }
4110 c := auxIntToInt32(v_0_0.AuxInt)
4111 if v_1.Op != OpLess32 {
4112 continue
4113 }
4114 _ = v_1.Args[1]
4115 if x != v_1.Args[0] {
4116 continue
4117 }
4118 v_1_1 := v_1.Args[1]
4119 if v_1_1.Op != OpConst32 {
4120 continue
4121 }
4122 d := auxIntToInt32(v_1_1.AuxInt)
4123 if !(d >= c) {
4124 continue
4125 }
4126 v.reset(OpLess32U)
4127 v0 := b.NewValue0(v.Pos, OpSub32, x.Type)
4128 v1 := b.NewValue0(v.Pos, OpConst32, x.Type)
4129 v1.AuxInt = int32ToAuxInt(c)
4130 v0.AddArg2(x, v1)
4131 v2 := b.NewValue0(v.Pos, OpConst32, x.Type)
4132 v2.AuxInt = int32ToAuxInt(d - c)
4133 v.AddArg2(v0, v2)
4134 return true
4135 }
4136 break
4137 }
4138
4139
4140
4141 for {
4142 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
4143 if v_0.Op != OpLeq32 {
4144 continue
4145 }
4146 x := v_0.Args[1]
4147 v_0_0 := v_0.Args[0]
4148 if v_0_0.Op != OpConst32 {
4149 continue
4150 }
4151 c := auxIntToInt32(v_0_0.AuxInt)
4152 if v_1.Op != OpLeq32 {
4153 continue
4154 }
4155 _ = v_1.Args[1]
4156 if x != v_1.Args[0] {
4157 continue
4158 }
4159 v_1_1 := v_1.Args[1]
4160 if v_1_1.Op != OpConst32 {
4161 continue
4162 }
4163 d := auxIntToInt32(v_1_1.AuxInt)
4164 if !(d >= c) {
4165 continue
4166 }
4167 v.reset(OpLeq32U)
4168 v0 := b.NewValue0(v.Pos, OpSub32, x.Type)
4169 v1 := b.NewValue0(v.Pos, OpConst32, x.Type)
4170 v1.AuxInt = int32ToAuxInt(c)
4171 v0.AddArg2(x, v1)
4172 v2 := b.NewValue0(v.Pos, OpConst32, x.Type)
4173 v2.AuxInt = int32ToAuxInt(d - c)
4174 v.AddArg2(v0, v2)
4175 return true
4176 }
4177 break
4178 }
4179
4180
4181
4182 for {
4183 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
4184 if v_0.Op != OpLeq16 {
4185 continue
4186 }
4187 x := v_0.Args[1]
4188 v_0_0 := v_0.Args[0]
4189 if v_0_0.Op != OpConst16 {
4190 continue
4191 }
4192 c := auxIntToInt16(v_0_0.AuxInt)
4193 if v_1.Op != OpLess16 {
4194 continue
4195 }
4196 _ = v_1.Args[1]
4197 if x != v_1.Args[0] {
4198 continue
4199 }
4200 v_1_1 := v_1.Args[1]
4201 if v_1_1.Op != OpConst16 {
4202 continue
4203 }
4204 d := auxIntToInt16(v_1_1.AuxInt)
4205 if !(d >= c) {
4206 continue
4207 }
4208 v.reset(OpLess16U)
4209 v0 := b.NewValue0(v.Pos, OpSub16, x.Type)
4210 v1 := b.NewValue0(v.Pos, OpConst16, x.Type)
4211 v1.AuxInt = int16ToAuxInt(c)
4212 v0.AddArg2(x, v1)
4213 v2 := b.NewValue0(v.Pos, OpConst16, x.Type)
4214 v2.AuxInt = int16ToAuxInt(d - c)
4215 v.AddArg2(v0, v2)
4216 return true
4217 }
4218 break
4219 }
4220
4221
4222
4223 for {
4224 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
4225 if v_0.Op != OpLeq16 {
4226 continue
4227 }
4228 x := v_0.Args[1]
4229 v_0_0 := v_0.Args[0]
4230 if v_0_0.Op != OpConst16 {
4231 continue
4232 }
4233 c := auxIntToInt16(v_0_0.AuxInt)
4234 if v_1.Op != OpLeq16 {
4235 continue
4236 }
4237 _ = v_1.Args[1]
4238 if x != v_1.Args[0] {
4239 continue
4240 }
4241 v_1_1 := v_1.Args[1]
4242 if v_1_1.Op != OpConst16 {
4243 continue
4244 }
4245 d := auxIntToInt16(v_1_1.AuxInt)
4246 if !(d >= c) {
4247 continue
4248 }
4249 v.reset(OpLeq16U)
4250 v0 := b.NewValue0(v.Pos, OpSub16, x.Type)
4251 v1 := b.NewValue0(v.Pos, OpConst16, x.Type)
4252 v1.AuxInt = int16ToAuxInt(c)
4253 v0.AddArg2(x, v1)
4254 v2 := b.NewValue0(v.Pos, OpConst16, x.Type)
4255 v2.AuxInt = int16ToAuxInt(d - c)
4256 v.AddArg2(v0, v2)
4257 return true
4258 }
4259 break
4260 }
4261
4262
4263
4264 for {
4265 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
4266 if v_0.Op != OpLeq8 {
4267 continue
4268 }
4269 x := v_0.Args[1]
4270 v_0_0 := v_0.Args[0]
4271 if v_0_0.Op != OpConst8 {
4272 continue
4273 }
4274 c := auxIntToInt8(v_0_0.AuxInt)
4275 if v_1.Op != OpLess8 {
4276 continue
4277 }
4278 _ = v_1.Args[1]
4279 if x != v_1.Args[0] {
4280 continue
4281 }
4282 v_1_1 := v_1.Args[1]
4283 if v_1_1.Op != OpConst8 {
4284 continue
4285 }
4286 d := auxIntToInt8(v_1_1.AuxInt)
4287 if !(d >= c) {
4288 continue
4289 }
4290 v.reset(OpLess8U)
4291 v0 := b.NewValue0(v.Pos, OpSub8, x.Type)
4292 v1 := b.NewValue0(v.Pos, OpConst8, x.Type)
4293 v1.AuxInt = int8ToAuxInt(c)
4294 v0.AddArg2(x, v1)
4295 v2 := b.NewValue0(v.Pos, OpConst8, x.Type)
4296 v2.AuxInt = int8ToAuxInt(d - c)
4297 v.AddArg2(v0, v2)
4298 return true
4299 }
4300 break
4301 }
4302
4303
4304
4305 for {
4306 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
4307 if v_0.Op != OpLeq8 {
4308 continue
4309 }
4310 x := v_0.Args[1]
4311 v_0_0 := v_0.Args[0]
4312 if v_0_0.Op != OpConst8 {
4313 continue
4314 }
4315 c := auxIntToInt8(v_0_0.AuxInt)
4316 if v_1.Op != OpLeq8 {
4317 continue
4318 }
4319 _ = v_1.Args[1]
4320 if x != v_1.Args[0] {
4321 continue
4322 }
4323 v_1_1 := v_1.Args[1]
4324 if v_1_1.Op != OpConst8 {
4325 continue
4326 }
4327 d := auxIntToInt8(v_1_1.AuxInt)
4328 if !(d >= c) {
4329 continue
4330 }
4331 v.reset(OpLeq8U)
4332 v0 := b.NewValue0(v.Pos, OpSub8, x.Type)
4333 v1 := b.NewValue0(v.Pos, OpConst8, x.Type)
4334 v1.AuxInt = int8ToAuxInt(c)
4335 v0.AddArg2(x, v1)
4336 v2 := b.NewValue0(v.Pos, OpConst8, x.Type)
4337 v2.AuxInt = int8ToAuxInt(d - c)
4338 v.AddArg2(v0, v2)
4339 return true
4340 }
4341 break
4342 }
4343
4344
4345
4346 for {
4347 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
4348 if v_0.Op != OpLess64 {
4349 continue
4350 }
4351 x := v_0.Args[1]
4352 v_0_0 := v_0.Args[0]
4353 if v_0_0.Op != OpConst64 {
4354 continue
4355 }
4356 c := auxIntToInt64(v_0_0.AuxInt)
4357 if v_1.Op != OpLess64 {
4358 continue
4359 }
4360 _ = v_1.Args[1]
4361 if x != v_1.Args[0] {
4362 continue
4363 }
4364 v_1_1 := v_1.Args[1]
4365 if v_1_1.Op != OpConst64 {
4366 continue
4367 }
4368 d := auxIntToInt64(v_1_1.AuxInt)
4369 if !(d >= c+1 && c+1 > c) {
4370 continue
4371 }
4372 v.reset(OpLess64U)
4373 v0 := b.NewValue0(v.Pos, OpSub64, x.Type)
4374 v1 := b.NewValue0(v.Pos, OpConst64, x.Type)
4375 v1.AuxInt = int64ToAuxInt(c + 1)
4376 v0.AddArg2(x, v1)
4377 v2 := b.NewValue0(v.Pos, OpConst64, x.Type)
4378 v2.AuxInt = int64ToAuxInt(d - c - 1)
4379 v.AddArg2(v0, v2)
4380 return true
4381 }
4382 break
4383 }
4384
4385
4386
4387 for {
4388 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
4389 if v_0.Op != OpLess64 {
4390 continue
4391 }
4392 x := v_0.Args[1]
4393 v_0_0 := v_0.Args[0]
4394 if v_0_0.Op != OpConst64 {
4395 continue
4396 }
4397 c := auxIntToInt64(v_0_0.AuxInt)
4398 if v_1.Op != OpLeq64 {
4399 continue
4400 }
4401 _ = v_1.Args[1]
4402 if x != v_1.Args[0] {
4403 continue
4404 }
4405 v_1_1 := v_1.Args[1]
4406 if v_1_1.Op != OpConst64 {
4407 continue
4408 }
4409 d := auxIntToInt64(v_1_1.AuxInt)
4410 if !(d >= c+1 && c+1 > c) {
4411 continue
4412 }
4413 v.reset(OpLeq64U)
4414 v0 := b.NewValue0(v.Pos, OpSub64, x.Type)
4415 v1 := b.NewValue0(v.Pos, OpConst64, x.Type)
4416 v1.AuxInt = int64ToAuxInt(c + 1)
4417 v0.AddArg2(x, v1)
4418 v2 := b.NewValue0(v.Pos, OpConst64, x.Type)
4419 v2.AuxInt = int64ToAuxInt(d - c - 1)
4420 v.AddArg2(v0, v2)
4421 return true
4422 }
4423 break
4424 }
4425
4426
4427
4428 for {
4429 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
4430 if v_0.Op != OpLess32 {
4431 continue
4432 }
4433 x := v_0.Args[1]
4434 v_0_0 := v_0.Args[0]
4435 if v_0_0.Op != OpConst32 {
4436 continue
4437 }
4438 c := auxIntToInt32(v_0_0.AuxInt)
4439 if v_1.Op != OpLess32 {
4440 continue
4441 }
4442 _ = v_1.Args[1]
4443 if x != v_1.Args[0] {
4444 continue
4445 }
4446 v_1_1 := v_1.Args[1]
4447 if v_1_1.Op != OpConst32 {
4448 continue
4449 }
4450 d := auxIntToInt32(v_1_1.AuxInt)
4451 if !(d >= c+1 && c+1 > c) {
4452 continue
4453 }
4454 v.reset(OpLess32U)
4455 v0 := b.NewValue0(v.Pos, OpSub32, x.Type)
4456 v1 := b.NewValue0(v.Pos, OpConst32, x.Type)
4457 v1.AuxInt = int32ToAuxInt(c + 1)
4458 v0.AddArg2(x, v1)
4459 v2 := b.NewValue0(v.Pos, OpConst32, x.Type)
4460 v2.AuxInt = int32ToAuxInt(d - c - 1)
4461 v.AddArg2(v0, v2)
4462 return true
4463 }
4464 break
4465 }
4466
4467
4468
4469 for {
4470 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
4471 if v_0.Op != OpLess32 {
4472 continue
4473 }
4474 x := v_0.Args[1]
4475 v_0_0 := v_0.Args[0]
4476 if v_0_0.Op != OpConst32 {
4477 continue
4478 }
4479 c := auxIntToInt32(v_0_0.AuxInt)
4480 if v_1.Op != OpLeq32 {
4481 continue
4482 }
4483 _ = v_1.Args[1]
4484 if x != v_1.Args[0] {
4485 continue
4486 }
4487 v_1_1 := v_1.Args[1]
4488 if v_1_1.Op != OpConst32 {
4489 continue
4490 }
4491 d := auxIntToInt32(v_1_1.AuxInt)
4492 if !(d >= c+1 && c+1 > c) {
4493 continue
4494 }
4495 v.reset(OpLeq32U)
4496 v0 := b.NewValue0(v.Pos, OpSub32, x.Type)
4497 v1 := b.NewValue0(v.Pos, OpConst32, x.Type)
4498 v1.AuxInt = int32ToAuxInt(c + 1)
4499 v0.AddArg2(x, v1)
4500 v2 := b.NewValue0(v.Pos, OpConst32, x.Type)
4501 v2.AuxInt = int32ToAuxInt(d - c - 1)
4502 v.AddArg2(v0, v2)
4503 return true
4504 }
4505 break
4506 }
4507
4508
4509
4510 for {
4511 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
4512 if v_0.Op != OpLess16 {
4513 continue
4514 }
4515 x := v_0.Args[1]
4516 v_0_0 := v_0.Args[0]
4517 if v_0_0.Op != OpConst16 {
4518 continue
4519 }
4520 c := auxIntToInt16(v_0_0.AuxInt)
4521 if v_1.Op != OpLess16 {
4522 continue
4523 }
4524 _ = v_1.Args[1]
4525 if x != v_1.Args[0] {
4526 continue
4527 }
4528 v_1_1 := v_1.Args[1]
4529 if v_1_1.Op != OpConst16 {
4530 continue
4531 }
4532 d := auxIntToInt16(v_1_1.AuxInt)
4533 if !(d >= c+1 && c+1 > c) {
4534 continue
4535 }
4536 v.reset(OpLess16U)
4537 v0 := b.NewValue0(v.Pos, OpSub16, x.Type)
4538 v1 := b.NewValue0(v.Pos, OpConst16, x.Type)
4539 v1.AuxInt = int16ToAuxInt(c + 1)
4540 v0.AddArg2(x, v1)
4541 v2 := b.NewValue0(v.Pos, OpConst16, x.Type)
4542 v2.AuxInt = int16ToAuxInt(d - c - 1)
4543 v.AddArg2(v0, v2)
4544 return true
4545 }
4546 break
4547 }
4548
4549
4550
4551 for {
4552 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
4553 if v_0.Op != OpLess16 {
4554 continue
4555 }
4556 x := v_0.Args[1]
4557 v_0_0 := v_0.Args[0]
4558 if v_0_0.Op != OpConst16 {
4559 continue
4560 }
4561 c := auxIntToInt16(v_0_0.AuxInt)
4562 if v_1.Op != OpLeq16 {
4563 continue
4564 }
4565 _ = v_1.Args[1]
4566 if x != v_1.Args[0] {
4567 continue
4568 }
4569 v_1_1 := v_1.Args[1]
4570 if v_1_1.Op != OpConst16 {
4571 continue
4572 }
4573 d := auxIntToInt16(v_1_1.AuxInt)
4574 if !(d >= c+1 && c+1 > c) {
4575 continue
4576 }
4577 v.reset(OpLeq16U)
4578 v0 := b.NewValue0(v.Pos, OpSub16, x.Type)
4579 v1 := b.NewValue0(v.Pos, OpConst16, x.Type)
4580 v1.AuxInt = int16ToAuxInt(c + 1)
4581 v0.AddArg2(x, v1)
4582 v2 := b.NewValue0(v.Pos, OpConst16, x.Type)
4583 v2.AuxInt = int16ToAuxInt(d - c - 1)
4584 v.AddArg2(v0, v2)
4585 return true
4586 }
4587 break
4588 }
4589
4590
4591
4592 for {
4593 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
4594 if v_0.Op != OpLess8 {
4595 continue
4596 }
4597 x := v_0.Args[1]
4598 v_0_0 := v_0.Args[0]
4599 if v_0_0.Op != OpConst8 {
4600 continue
4601 }
4602 c := auxIntToInt8(v_0_0.AuxInt)
4603 if v_1.Op != OpLess8 {
4604 continue
4605 }
4606 _ = v_1.Args[1]
4607 if x != v_1.Args[0] {
4608 continue
4609 }
4610 v_1_1 := v_1.Args[1]
4611 if v_1_1.Op != OpConst8 {
4612 continue
4613 }
4614 d := auxIntToInt8(v_1_1.AuxInt)
4615 if !(d >= c+1 && c+1 > c) {
4616 continue
4617 }
4618 v.reset(OpLess8U)
4619 v0 := b.NewValue0(v.Pos, OpSub8, x.Type)
4620 v1 := b.NewValue0(v.Pos, OpConst8, x.Type)
4621 v1.AuxInt = int8ToAuxInt(c + 1)
4622 v0.AddArg2(x, v1)
4623 v2 := b.NewValue0(v.Pos, OpConst8, x.Type)
4624 v2.AuxInt = int8ToAuxInt(d - c - 1)
4625 v.AddArg2(v0, v2)
4626 return true
4627 }
4628 break
4629 }
4630
4631
4632
4633 for {
4634 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
4635 if v_0.Op != OpLess8 {
4636 continue
4637 }
4638 x := v_0.Args[1]
4639 v_0_0 := v_0.Args[0]
4640 if v_0_0.Op != OpConst8 {
4641 continue
4642 }
4643 c := auxIntToInt8(v_0_0.AuxInt)
4644 if v_1.Op != OpLeq8 {
4645 continue
4646 }
4647 _ = v_1.Args[1]
4648 if x != v_1.Args[0] {
4649 continue
4650 }
4651 v_1_1 := v_1.Args[1]
4652 if v_1_1.Op != OpConst8 {
4653 continue
4654 }
4655 d := auxIntToInt8(v_1_1.AuxInt)
4656 if !(d >= c+1 && c+1 > c) {
4657 continue
4658 }
4659 v.reset(OpLeq8U)
4660 v0 := b.NewValue0(v.Pos, OpSub8, x.Type)
4661 v1 := b.NewValue0(v.Pos, OpConst8, x.Type)
4662 v1.AuxInt = int8ToAuxInt(c + 1)
4663 v0.AddArg2(x, v1)
4664 v2 := b.NewValue0(v.Pos, OpConst8, x.Type)
4665 v2.AuxInt = int8ToAuxInt(d - c - 1)
4666 v.AddArg2(v0, v2)
4667 return true
4668 }
4669 break
4670 }
4671
4672
4673
4674 for {
4675 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
4676 if v_0.Op != OpLeq64U {
4677 continue
4678 }
4679 x := v_0.Args[1]
4680 v_0_0 := v_0.Args[0]
4681 if v_0_0.Op != OpConst64 {
4682 continue
4683 }
4684 c := auxIntToInt64(v_0_0.AuxInt)
4685 if v_1.Op != OpLess64U {
4686 continue
4687 }
4688 _ = v_1.Args[1]
4689 if x != v_1.Args[0] {
4690 continue
4691 }
4692 v_1_1 := v_1.Args[1]
4693 if v_1_1.Op != OpConst64 {
4694 continue
4695 }
4696 d := auxIntToInt64(v_1_1.AuxInt)
4697 if !(uint64(d) >= uint64(c)) {
4698 continue
4699 }
4700 v.reset(OpLess64U)
4701 v0 := b.NewValue0(v.Pos, OpSub64, x.Type)
4702 v1 := b.NewValue0(v.Pos, OpConst64, x.Type)
4703 v1.AuxInt = int64ToAuxInt(c)
4704 v0.AddArg2(x, v1)
4705 v2 := b.NewValue0(v.Pos, OpConst64, x.Type)
4706 v2.AuxInt = int64ToAuxInt(d - c)
4707 v.AddArg2(v0, v2)
4708 return true
4709 }
4710 break
4711 }
4712
4713
4714
4715 for {
4716 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
4717 if v_0.Op != OpLeq64U {
4718 continue
4719 }
4720 x := v_0.Args[1]
4721 v_0_0 := v_0.Args[0]
4722 if v_0_0.Op != OpConst64 {
4723 continue
4724 }
4725 c := auxIntToInt64(v_0_0.AuxInt)
4726 if v_1.Op != OpLeq64U {
4727 continue
4728 }
4729 _ = v_1.Args[1]
4730 if x != v_1.Args[0] {
4731 continue
4732 }
4733 v_1_1 := v_1.Args[1]
4734 if v_1_1.Op != OpConst64 {
4735 continue
4736 }
4737 d := auxIntToInt64(v_1_1.AuxInt)
4738 if !(uint64(d) >= uint64(c)) {
4739 continue
4740 }
4741 v.reset(OpLeq64U)
4742 v0 := b.NewValue0(v.Pos, OpSub64, x.Type)
4743 v1 := b.NewValue0(v.Pos, OpConst64, x.Type)
4744 v1.AuxInt = int64ToAuxInt(c)
4745 v0.AddArg2(x, v1)
4746 v2 := b.NewValue0(v.Pos, OpConst64, x.Type)
4747 v2.AuxInt = int64ToAuxInt(d - c)
4748 v.AddArg2(v0, v2)
4749 return true
4750 }
4751 break
4752 }
4753
4754
4755
4756 for {
4757 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
4758 if v_0.Op != OpLeq32U {
4759 continue
4760 }
4761 x := v_0.Args[1]
4762 v_0_0 := v_0.Args[0]
4763 if v_0_0.Op != OpConst32 {
4764 continue
4765 }
4766 c := auxIntToInt32(v_0_0.AuxInt)
4767 if v_1.Op != OpLess32U {
4768 continue
4769 }
4770 _ = v_1.Args[1]
4771 if x != v_1.Args[0] {
4772 continue
4773 }
4774 v_1_1 := v_1.Args[1]
4775 if v_1_1.Op != OpConst32 {
4776 continue
4777 }
4778 d := auxIntToInt32(v_1_1.AuxInt)
4779 if !(uint32(d) >= uint32(c)) {
4780 continue
4781 }
4782 v.reset(OpLess32U)
4783 v0 := b.NewValue0(v.Pos, OpSub32, x.Type)
4784 v1 := b.NewValue0(v.Pos, OpConst32, x.Type)
4785 v1.AuxInt = int32ToAuxInt(c)
4786 v0.AddArg2(x, v1)
4787 v2 := b.NewValue0(v.Pos, OpConst32, x.Type)
4788 v2.AuxInt = int32ToAuxInt(d - c)
4789 v.AddArg2(v0, v2)
4790 return true
4791 }
4792 break
4793 }
4794
4795
4796
4797 for {
4798 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
4799 if v_0.Op != OpLeq32U {
4800 continue
4801 }
4802 x := v_0.Args[1]
4803 v_0_0 := v_0.Args[0]
4804 if v_0_0.Op != OpConst32 {
4805 continue
4806 }
4807 c := auxIntToInt32(v_0_0.AuxInt)
4808 if v_1.Op != OpLeq32U {
4809 continue
4810 }
4811 _ = v_1.Args[1]
4812 if x != v_1.Args[0] {
4813 continue
4814 }
4815 v_1_1 := v_1.Args[1]
4816 if v_1_1.Op != OpConst32 {
4817 continue
4818 }
4819 d := auxIntToInt32(v_1_1.AuxInt)
4820 if !(uint32(d) >= uint32(c)) {
4821 continue
4822 }
4823 v.reset(OpLeq32U)
4824 v0 := b.NewValue0(v.Pos, OpSub32, x.Type)
4825 v1 := b.NewValue0(v.Pos, OpConst32, x.Type)
4826 v1.AuxInt = int32ToAuxInt(c)
4827 v0.AddArg2(x, v1)
4828 v2 := b.NewValue0(v.Pos, OpConst32, x.Type)
4829 v2.AuxInt = int32ToAuxInt(d - c)
4830 v.AddArg2(v0, v2)
4831 return true
4832 }
4833 break
4834 }
4835
4836
4837
4838 for {
4839 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
4840 if v_0.Op != OpLeq16U {
4841 continue
4842 }
4843 x := v_0.Args[1]
4844 v_0_0 := v_0.Args[0]
4845 if v_0_0.Op != OpConst16 {
4846 continue
4847 }
4848 c := auxIntToInt16(v_0_0.AuxInt)
4849 if v_1.Op != OpLess16U {
4850 continue
4851 }
4852 _ = v_1.Args[1]
4853 if x != v_1.Args[0] {
4854 continue
4855 }
4856 v_1_1 := v_1.Args[1]
4857 if v_1_1.Op != OpConst16 {
4858 continue
4859 }
4860 d := auxIntToInt16(v_1_1.AuxInt)
4861 if !(uint16(d) >= uint16(c)) {
4862 continue
4863 }
4864 v.reset(OpLess16U)
4865 v0 := b.NewValue0(v.Pos, OpSub16, x.Type)
4866 v1 := b.NewValue0(v.Pos, OpConst16, x.Type)
4867 v1.AuxInt = int16ToAuxInt(c)
4868 v0.AddArg2(x, v1)
4869 v2 := b.NewValue0(v.Pos, OpConst16, x.Type)
4870 v2.AuxInt = int16ToAuxInt(d - c)
4871 v.AddArg2(v0, v2)
4872 return true
4873 }
4874 break
4875 }
4876
4877
4878
4879 for {
4880 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
4881 if v_0.Op != OpLeq16U {
4882 continue
4883 }
4884 x := v_0.Args[1]
4885 v_0_0 := v_0.Args[0]
4886 if v_0_0.Op != OpConst16 {
4887 continue
4888 }
4889 c := auxIntToInt16(v_0_0.AuxInt)
4890 if v_1.Op != OpLeq16U {
4891 continue
4892 }
4893 _ = v_1.Args[1]
4894 if x != v_1.Args[0] {
4895 continue
4896 }
4897 v_1_1 := v_1.Args[1]
4898 if v_1_1.Op != OpConst16 {
4899 continue
4900 }
4901 d := auxIntToInt16(v_1_1.AuxInt)
4902 if !(uint16(d) >= uint16(c)) {
4903 continue
4904 }
4905 v.reset(OpLeq16U)
4906 v0 := b.NewValue0(v.Pos, OpSub16, x.Type)
4907 v1 := b.NewValue0(v.Pos, OpConst16, x.Type)
4908 v1.AuxInt = int16ToAuxInt(c)
4909 v0.AddArg2(x, v1)
4910 v2 := b.NewValue0(v.Pos, OpConst16, x.Type)
4911 v2.AuxInt = int16ToAuxInt(d - c)
4912 v.AddArg2(v0, v2)
4913 return true
4914 }
4915 break
4916 }
4917
4918
4919
4920 for {
4921 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
4922 if v_0.Op != OpLeq8U {
4923 continue
4924 }
4925 x := v_0.Args[1]
4926 v_0_0 := v_0.Args[0]
4927 if v_0_0.Op != OpConst8 {
4928 continue
4929 }
4930 c := auxIntToInt8(v_0_0.AuxInt)
4931 if v_1.Op != OpLess8U {
4932 continue
4933 }
4934 _ = v_1.Args[1]
4935 if x != v_1.Args[0] {
4936 continue
4937 }
4938 v_1_1 := v_1.Args[1]
4939 if v_1_1.Op != OpConst8 {
4940 continue
4941 }
4942 d := auxIntToInt8(v_1_1.AuxInt)
4943 if !(uint8(d) >= uint8(c)) {
4944 continue
4945 }
4946 v.reset(OpLess8U)
4947 v0 := b.NewValue0(v.Pos, OpSub8, x.Type)
4948 v1 := b.NewValue0(v.Pos, OpConst8, x.Type)
4949 v1.AuxInt = int8ToAuxInt(c)
4950 v0.AddArg2(x, v1)
4951 v2 := b.NewValue0(v.Pos, OpConst8, x.Type)
4952 v2.AuxInt = int8ToAuxInt(d - c)
4953 v.AddArg2(v0, v2)
4954 return true
4955 }
4956 break
4957 }
4958
4959
4960
4961 for {
4962 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
4963 if v_0.Op != OpLeq8U {
4964 continue
4965 }
4966 x := v_0.Args[1]
4967 v_0_0 := v_0.Args[0]
4968 if v_0_0.Op != OpConst8 {
4969 continue
4970 }
4971 c := auxIntToInt8(v_0_0.AuxInt)
4972 if v_1.Op != OpLeq8U {
4973 continue
4974 }
4975 _ = v_1.Args[1]
4976 if x != v_1.Args[0] {
4977 continue
4978 }
4979 v_1_1 := v_1.Args[1]
4980 if v_1_1.Op != OpConst8 {
4981 continue
4982 }
4983 d := auxIntToInt8(v_1_1.AuxInt)
4984 if !(uint8(d) >= uint8(c)) {
4985 continue
4986 }
4987 v.reset(OpLeq8U)
4988 v0 := b.NewValue0(v.Pos, OpSub8, x.Type)
4989 v1 := b.NewValue0(v.Pos, OpConst8, x.Type)
4990 v1.AuxInt = int8ToAuxInt(c)
4991 v0.AddArg2(x, v1)
4992 v2 := b.NewValue0(v.Pos, OpConst8, x.Type)
4993 v2.AuxInt = int8ToAuxInt(d - c)
4994 v.AddArg2(v0, v2)
4995 return true
4996 }
4997 break
4998 }
4999
5000
5001
5002 for {
5003 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
5004 if v_0.Op != OpLess64U {
5005 continue
5006 }
5007 x := v_0.Args[1]
5008 v_0_0 := v_0.Args[0]
5009 if v_0_0.Op != OpConst64 {
5010 continue
5011 }
5012 c := auxIntToInt64(v_0_0.AuxInt)
5013 if v_1.Op != OpLess64U {
5014 continue
5015 }
5016 _ = v_1.Args[1]
5017 if x != v_1.Args[0] {
5018 continue
5019 }
5020 v_1_1 := v_1.Args[1]
5021 if v_1_1.Op != OpConst64 {
5022 continue
5023 }
5024 d := auxIntToInt64(v_1_1.AuxInt)
5025 if !(uint64(d) >= uint64(c+1) && uint64(c+1) > uint64(c)) {
5026 continue
5027 }
5028 v.reset(OpLess64U)
5029 v0 := b.NewValue0(v.Pos, OpSub64, x.Type)
5030 v1 := b.NewValue0(v.Pos, OpConst64, x.Type)
5031 v1.AuxInt = int64ToAuxInt(c + 1)
5032 v0.AddArg2(x, v1)
5033 v2 := b.NewValue0(v.Pos, OpConst64, x.Type)
5034 v2.AuxInt = int64ToAuxInt(d - c - 1)
5035 v.AddArg2(v0, v2)
5036 return true
5037 }
5038 break
5039 }
5040
5041
5042
5043 for {
5044 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
5045 if v_0.Op != OpLess64U {
5046 continue
5047 }
5048 x := v_0.Args[1]
5049 v_0_0 := v_0.Args[0]
5050 if v_0_0.Op != OpConst64 {
5051 continue
5052 }
5053 c := auxIntToInt64(v_0_0.AuxInt)
5054 if v_1.Op != OpLeq64U {
5055 continue
5056 }
5057 _ = v_1.Args[1]
5058 if x != v_1.Args[0] {
5059 continue
5060 }
5061 v_1_1 := v_1.Args[1]
5062 if v_1_1.Op != OpConst64 {
5063 continue
5064 }
5065 d := auxIntToInt64(v_1_1.AuxInt)
5066 if !(uint64(d) >= uint64(c+1) && uint64(c+1) > uint64(c)) {
5067 continue
5068 }
5069 v.reset(OpLeq64U)
5070 v0 := b.NewValue0(v.Pos, OpSub64, x.Type)
5071 v1 := b.NewValue0(v.Pos, OpConst64, x.Type)
5072 v1.AuxInt = int64ToAuxInt(c + 1)
5073 v0.AddArg2(x, v1)
5074 v2 := b.NewValue0(v.Pos, OpConst64, x.Type)
5075 v2.AuxInt = int64ToAuxInt(d - c - 1)
5076 v.AddArg2(v0, v2)
5077 return true
5078 }
5079 break
5080 }
5081
5082
5083
5084 for {
5085 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
5086 if v_0.Op != OpLess32U {
5087 continue
5088 }
5089 x := v_0.Args[1]
5090 v_0_0 := v_0.Args[0]
5091 if v_0_0.Op != OpConst32 {
5092 continue
5093 }
5094 c := auxIntToInt32(v_0_0.AuxInt)
5095 if v_1.Op != OpLess32U {
5096 continue
5097 }
5098 _ = v_1.Args[1]
5099 if x != v_1.Args[0] {
5100 continue
5101 }
5102 v_1_1 := v_1.Args[1]
5103 if v_1_1.Op != OpConst32 {
5104 continue
5105 }
5106 d := auxIntToInt32(v_1_1.AuxInt)
5107 if !(uint32(d) >= uint32(c+1) && uint32(c+1) > uint32(c)) {
5108 continue
5109 }
5110 v.reset(OpLess32U)
5111 v0 := b.NewValue0(v.Pos, OpSub32, x.Type)
5112 v1 := b.NewValue0(v.Pos, OpConst32, x.Type)
5113 v1.AuxInt = int32ToAuxInt(c + 1)
5114 v0.AddArg2(x, v1)
5115 v2 := b.NewValue0(v.Pos, OpConst32, x.Type)
5116 v2.AuxInt = int32ToAuxInt(d - c - 1)
5117 v.AddArg2(v0, v2)
5118 return true
5119 }
5120 break
5121 }
5122
5123
5124
5125 for {
5126 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
5127 if v_0.Op != OpLess32U {
5128 continue
5129 }
5130 x := v_0.Args[1]
5131 v_0_0 := v_0.Args[0]
5132 if v_0_0.Op != OpConst32 {
5133 continue
5134 }
5135 c := auxIntToInt32(v_0_0.AuxInt)
5136 if v_1.Op != OpLeq32U {
5137 continue
5138 }
5139 _ = v_1.Args[1]
5140 if x != v_1.Args[0] {
5141 continue
5142 }
5143 v_1_1 := v_1.Args[1]
5144 if v_1_1.Op != OpConst32 {
5145 continue
5146 }
5147 d := auxIntToInt32(v_1_1.AuxInt)
5148 if !(uint32(d) >= uint32(c+1) && uint32(c+1) > uint32(c)) {
5149 continue
5150 }
5151 v.reset(OpLeq32U)
5152 v0 := b.NewValue0(v.Pos, OpSub32, x.Type)
5153 v1 := b.NewValue0(v.Pos, OpConst32, x.Type)
5154 v1.AuxInt = int32ToAuxInt(c + 1)
5155 v0.AddArg2(x, v1)
5156 v2 := b.NewValue0(v.Pos, OpConst32, x.Type)
5157 v2.AuxInt = int32ToAuxInt(d - c - 1)
5158 v.AddArg2(v0, v2)
5159 return true
5160 }
5161 break
5162 }
5163
5164
5165
5166 for {
5167 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
5168 if v_0.Op != OpLess16U {
5169 continue
5170 }
5171 x := v_0.Args[1]
5172 v_0_0 := v_0.Args[0]
5173 if v_0_0.Op != OpConst16 {
5174 continue
5175 }
5176 c := auxIntToInt16(v_0_0.AuxInt)
5177 if v_1.Op != OpLess16U {
5178 continue
5179 }
5180 _ = v_1.Args[1]
5181 if x != v_1.Args[0] {
5182 continue
5183 }
5184 v_1_1 := v_1.Args[1]
5185 if v_1_1.Op != OpConst16 {
5186 continue
5187 }
5188 d := auxIntToInt16(v_1_1.AuxInt)
5189 if !(uint16(d) >= uint16(c+1) && uint16(c+1) > uint16(c)) {
5190 continue
5191 }
5192 v.reset(OpLess16U)
5193 v0 := b.NewValue0(v.Pos, OpSub16, x.Type)
5194 v1 := b.NewValue0(v.Pos, OpConst16, x.Type)
5195 v1.AuxInt = int16ToAuxInt(c + 1)
5196 v0.AddArg2(x, v1)
5197 v2 := b.NewValue0(v.Pos, OpConst16, x.Type)
5198 v2.AuxInt = int16ToAuxInt(d - c - 1)
5199 v.AddArg2(v0, v2)
5200 return true
5201 }
5202 break
5203 }
5204
5205
5206
5207 for {
5208 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
5209 if v_0.Op != OpLess16U {
5210 continue
5211 }
5212 x := v_0.Args[1]
5213 v_0_0 := v_0.Args[0]
5214 if v_0_0.Op != OpConst16 {
5215 continue
5216 }
5217 c := auxIntToInt16(v_0_0.AuxInt)
5218 if v_1.Op != OpLeq16U {
5219 continue
5220 }
5221 _ = v_1.Args[1]
5222 if x != v_1.Args[0] {
5223 continue
5224 }
5225 v_1_1 := v_1.Args[1]
5226 if v_1_1.Op != OpConst16 {
5227 continue
5228 }
5229 d := auxIntToInt16(v_1_1.AuxInt)
5230 if !(uint16(d) >= uint16(c+1) && uint16(c+1) > uint16(c)) {
5231 continue
5232 }
5233 v.reset(OpLeq16U)
5234 v0 := b.NewValue0(v.Pos, OpSub16, x.Type)
5235 v1 := b.NewValue0(v.Pos, OpConst16, x.Type)
5236 v1.AuxInt = int16ToAuxInt(c + 1)
5237 v0.AddArg2(x, v1)
5238 v2 := b.NewValue0(v.Pos, OpConst16, x.Type)
5239 v2.AuxInt = int16ToAuxInt(d - c - 1)
5240 v.AddArg2(v0, v2)
5241 return true
5242 }
5243 break
5244 }
5245
5246
5247
5248 for {
5249 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
5250 if v_0.Op != OpLess8U {
5251 continue
5252 }
5253 x := v_0.Args[1]
5254 v_0_0 := v_0.Args[0]
5255 if v_0_0.Op != OpConst8 {
5256 continue
5257 }
5258 c := auxIntToInt8(v_0_0.AuxInt)
5259 if v_1.Op != OpLess8U {
5260 continue
5261 }
5262 _ = v_1.Args[1]
5263 if x != v_1.Args[0] {
5264 continue
5265 }
5266 v_1_1 := v_1.Args[1]
5267 if v_1_1.Op != OpConst8 {
5268 continue
5269 }
5270 d := auxIntToInt8(v_1_1.AuxInt)
5271 if !(uint8(d) >= uint8(c+1) && uint8(c+1) > uint8(c)) {
5272 continue
5273 }
5274 v.reset(OpLess8U)
5275 v0 := b.NewValue0(v.Pos, OpSub8, x.Type)
5276 v1 := b.NewValue0(v.Pos, OpConst8, x.Type)
5277 v1.AuxInt = int8ToAuxInt(c + 1)
5278 v0.AddArg2(x, v1)
5279 v2 := b.NewValue0(v.Pos, OpConst8, x.Type)
5280 v2.AuxInt = int8ToAuxInt(d - c - 1)
5281 v.AddArg2(v0, v2)
5282 return true
5283 }
5284 break
5285 }
5286
5287
5288
5289 for {
5290 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
5291 if v_0.Op != OpLess8U {
5292 continue
5293 }
5294 x := v_0.Args[1]
5295 v_0_0 := v_0.Args[0]
5296 if v_0_0.Op != OpConst8 {
5297 continue
5298 }
5299 c := auxIntToInt8(v_0_0.AuxInt)
5300 if v_1.Op != OpLeq8U {
5301 continue
5302 }
5303 _ = v_1.Args[1]
5304 if x != v_1.Args[0] {
5305 continue
5306 }
5307 v_1_1 := v_1.Args[1]
5308 if v_1_1.Op != OpConst8 {
5309 continue
5310 }
5311 d := auxIntToInt8(v_1_1.AuxInt)
5312 if !(uint8(d) >= uint8(c+1) && uint8(c+1) > uint8(c)) {
5313 continue
5314 }
5315 v.reset(OpLeq8U)
5316 v0 := b.NewValue0(v.Pos, OpSub8, x.Type)
5317 v1 := b.NewValue0(v.Pos, OpConst8, x.Type)
5318 v1.AuxInt = int8ToAuxInt(c + 1)
5319 v0.AddArg2(x, v1)
5320 v2 := b.NewValue0(v.Pos, OpConst8, x.Type)
5321 v2.AuxInt = int8ToAuxInt(d - c - 1)
5322 v.AddArg2(v0, v2)
5323 return true
5324 }
5325 break
5326 }
5327 return false
5328 }
5329 func rewriteValuegeneric_OpArraySelect(v *Value) bool {
5330 v_0 := v.Args[0]
5331
5332
5333 for {
5334 if v_0.Op != OpArrayMake1 {
5335 break
5336 }
5337 x := v_0.Args[0]
5338 v.copyOf(x)
5339 return true
5340 }
5341
5342
5343 for {
5344 if auxIntToInt64(v.AuxInt) != 0 || v_0.Op != OpIData {
5345 break
5346 }
5347 x := v_0.Args[0]
5348 v.reset(OpIData)
5349 v.AddArg(x)
5350 return true
5351 }
5352 return false
5353 }
5354 func rewriteValuegeneric_OpBitLen16(v *Value) bool {
5355 v_0 := v.Args[0]
5356 b := v.Block
5357 config := b.Func.Config
5358
5359
5360
5361 for {
5362 if v_0.Op != OpConst16 {
5363 break
5364 }
5365 c := auxIntToInt16(v_0.AuxInt)
5366 if !(config.PtrSize == 8) {
5367 break
5368 }
5369 v.reset(OpConst64)
5370 v.AuxInt = int64ToAuxInt(int64(bits.Len16(uint16(c))))
5371 return true
5372 }
5373
5374
5375
5376 for {
5377 if v_0.Op != OpConst16 {
5378 break
5379 }
5380 c := auxIntToInt16(v_0.AuxInt)
5381 if !(config.PtrSize == 4) {
5382 break
5383 }
5384 v.reset(OpConst32)
5385 v.AuxInt = int32ToAuxInt(int32(bits.Len16(uint16(c))))
5386 return true
5387 }
5388 return false
5389 }
5390 func rewriteValuegeneric_OpBitLen32(v *Value) bool {
5391 v_0 := v.Args[0]
5392 b := v.Block
5393 config := b.Func.Config
5394
5395
5396
5397 for {
5398 if v_0.Op != OpConst32 {
5399 break
5400 }
5401 c := auxIntToInt32(v_0.AuxInt)
5402 if !(config.PtrSize == 8) {
5403 break
5404 }
5405 v.reset(OpConst64)
5406 v.AuxInt = int64ToAuxInt(int64(bits.Len32(uint32(c))))
5407 return true
5408 }
5409
5410
5411
5412 for {
5413 if v_0.Op != OpConst32 {
5414 break
5415 }
5416 c := auxIntToInt32(v_0.AuxInt)
5417 if !(config.PtrSize == 4) {
5418 break
5419 }
5420 v.reset(OpConst32)
5421 v.AuxInt = int32ToAuxInt(int32(bits.Len32(uint32(c))))
5422 return true
5423 }
5424 return false
5425 }
5426 func rewriteValuegeneric_OpBitLen64(v *Value) bool {
5427 v_0 := v.Args[0]
5428 b := v.Block
5429 config := b.Func.Config
5430
5431
5432
5433 for {
5434 if v_0.Op != OpConst64 {
5435 break
5436 }
5437 c := auxIntToInt64(v_0.AuxInt)
5438 if !(config.PtrSize == 8) {
5439 break
5440 }
5441 v.reset(OpConst64)
5442 v.AuxInt = int64ToAuxInt(int64(bits.Len64(uint64(c))))
5443 return true
5444 }
5445
5446
5447
5448 for {
5449 if v_0.Op != OpConst64 {
5450 break
5451 }
5452 c := auxIntToInt64(v_0.AuxInt)
5453 if !(config.PtrSize == 4) {
5454 break
5455 }
5456 v.reset(OpConst32)
5457 v.AuxInt = int32ToAuxInt(int32(bits.Len64(uint64(c))))
5458 return true
5459 }
5460 return false
5461 }
5462 func rewriteValuegeneric_OpBitLen8(v *Value) bool {
5463 v_0 := v.Args[0]
5464 b := v.Block
5465 config := b.Func.Config
5466
5467
5468
5469 for {
5470 if v_0.Op != OpConst8 {
5471 break
5472 }
5473 c := auxIntToInt8(v_0.AuxInt)
5474 if !(config.PtrSize == 8) {
5475 break
5476 }
5477 v.reset(OpConst64)
5478 v.AuxInt = int64ToAuxInt(int64(bits.Len8(uint8(c))))
5479 return true
5480 }
5481
5482
5483
5484 for {
5485 if v_0.Op != OpConst8 {
5486 break
5487 }
5488 c := auxIntToInt8(v_0.AuxInt)
5489 if !(config.PtrSize == 4) {
5490 break
5491 }
5492 v.reset(OpConst32)
5493 v.AuxInt = int32ToAuxInt(int32(bits.Len8(uint8(c))))
5494 return true
5495 }
5496 return false
5497 }
5498 func rewriteValuegeneric_OpCeil(v *Value) bool {
5499 v_0 := v.Args[0]
5500
5501
5502 for {
5503 if v_0.Op != OpConst64F {
5504 break
5505 }
5506 c := auxIntToFloat64(v_0.AuxInt)
5507 v.reset(OpConst64F)
5508 v.AuxInt = float64ToAuxInt(math.Ceil(c))
5509 return true
5510 }
5511 return false
5512 }
5513 func rewriteValuegeneric_OpCom16(v *Value) bool {
5514 v_0 := v.Args[0]
5515
5516
5517 for {
5518 if v_0.Op != OpCom16 {
5519 break
5520 }
5521 x := v_0.Args[0]
5522 v.copyOf(x)
5523 return true
5524 }
5525
5526
5527 for {
5528 if v_0.Op != OpConst16 {
5529 break
5530 }
5531 c := auxIntToInt16(v_0.AuxInt)
5532 v.reset(OpConst16)
5533 v.AuxInt = int16ToAuxInt(^c)
5534 return true
5535 }
5536
5537
5538 for {
5539 if v_0.Op != OpAdd16 {
5540 break
5541 }
5542 _ = v_0.Args[1]
5543 v_0_0 := v_0.Args[0]
5544 v_0_1 := v_0.Args[1]
5545 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
5546 if v_0_0.Op != OpConst16 || auxIntToInt16(v_0_0.AuxInt) != -1 {
5547 continue
5548 }
5549 x := v_0_1
5550 v.reset(OpNeg16)
5551 v.AddArg(x)
5552 return true
5553 }
5554 break
5555 }
5556 return false
5557 }
5558 func rewriteValuegeneric_OpCom32(v *Value) bool {
5559 v_0 := v.Args[0]
5560
5561
5562 for {
5563 if v_0.Op != OpCom32 {
5564 break
5565 }
5566 x := v_0.Args[0]
5567 v.copyOf(x)
5568 return true
5569 }
5570
5571
5572 for {
5573 if v_0.Op != OpConst32 {
5574 break
5575 }
5576 c := auxIntToInt32(v_0.AuxInt)
5577 v.reset(OpConst32)
5578 v.AuxInt = int32ToAuxInt(^c)
5579 return true
5580 }
5581
5582
5583 for {
5584 if v_0.Op != OpAdd32 {
5585 break
5586 }
5587 _ = v_0.Args[1]
5588 v_0_0 := v_0.Args[0]
5589 v_0_1 := v_0.Args[1]
5590 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
5591 if v_0_0.Op != OpConst32 || auxIntToInt32(v_0_0.AuxInt) != -1 {
5592 continue
5593 }
5594 x := v_0_1
5595 v.reset(OpNeg32)
5596 v.AddArg(x)
5597 return true
5598 }
5599 break
5600 }
5601 return false
5602 }
5603 func rewriteValuegeneric_OpCom64(v *Value) bool {
5604 v_0 := v.Args[0]
5605
5606
5607 for {
5608 if v_0.Op != OpCom64 {
5609 break
5610 }
5611 x := v_0.Args[0]
5612 v.copyOf(x)
5613 return true
5614 }
5615
5616
5617 for {
5618 if v_0.Op != OpConst64 {
5619 break
5620 }
5621 c := auxIntToInt64(v_0.AuxInt)
5622 v.reset(OpConst64)
5623 v.AuxInt = int64ToAuxInt(^c)
5624 return true
5625 }
5626
5627
5628 for {
5629 if v_0.Op != OpAdd64 {
5630 break
5631 }
5632 _ = v_0.Args[1]
5633 v_0_0 := v_0.Args[0]
5634 v_0_1 := v_0.Args[1]
5635 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
5636 if v_0_0.Op != OpConst64 || auxIntToInt64(v_0_0.AuxInt) != -1 {
5637 continue
5638 }
5639 x := v_0_1
5640 v.reset(OpNeg64)
5641 v.AddArg(x)
5642 return true
5643 }
5644 break
5645 }
5646 return false
5647 }
5648 func rewriteValuegeneric_OpCom8(v *Value) bool {
5649 v_0 := v.Args[0]
5650
5651
5652 for {
5653 if v_0.Op != OpCom8 {
5654 break
5655 }
5656 x := v_0.Args[0]
5657 v.copyOf(x)
5658 return true
5659 }
5660
5661
5662 for {
5663 if v_0.Op != OpConst8 {
5664 break
5665 }
5666 c := auxIntToInt8(v_0.AuxInt)
5667 v.reset(OpConst8)
5668 v.AuxInt = int8ToAuxInt(^c)
5669 return true
5670 }
5671
5672
5673 for {
5674 if v_0.Op != OpAdd8 {
5675 break
5676 }
5677 _ = v_0.Args[1]
5678 v_0_0 := v_0.Args[0]
5679 v_0_1 := v_0.Args[1]
5680 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
5681 if v_0_0.Op != OpConst8 || auxIntToInt8(v_0_0.AuxInt) != -1 {
5682 continue
5683 }
5684 x := v_0_1
5685 v.reset(OpNeg8)
5686 v.AddArg(x)
5687 return true
5688 }
5689 break
5690 }
5691 return false
5692 }
5693 func rewriteValuegeneric_OpConstInterface(v *Value) bool {
5694 b := v.Block
5695 typ := &b.Func.Config.Types
5696
5697
5698 for {
5699 v.reset(OpIMake)
5700 v0 := b.NewValue0(v.Pos, OpConstNil, typ.Uintptr)
5701 v1 := b.NewValue0(v.Pos, OpConstNil, typ.BytePtr)
5702 v.AddArg2(v0, v1)
5703 return true
5704 }
5705 }
5706 func rewriteValuegeneric_OpConstSlice(v *Value) bool {
5707 b := v.Block
5708 config := b.Func.Config
5709 typ := &b.Func.Config.Types
5710
5711
5712
5713 for {
5714 if !(config.PtrSize == 4) {
5715 break
5716 }
5717 v.reset(OpSliceMake)
5718 v0 := b.NewValue0(v.Pos, OpConstNil, v.Type.Elem().PtrTo())
5719 v1 := b.NewValue0(v.Pos, OpConst32, typ.Int)
5720 v1.AuxInt = int32ToAuxInt(0)
5721 v.AddArg3(v0, v1, v1)
5722 return true
5723 }
5724
5725
5726
5727 for {
5728 if !(config.PtrSize == 8) {
5729 break
5730 }
5731 v.reset(OpSliceMake)
5732 v0 := b.NewValue0(v.Pos, OpConstNil, v.Type.Elem().PtrTo())
5733 v1 := b.NewValue0(v.Pos, OpConst64, typ.Int)
5734 v1.AuxInt = int64ToAuxInt(0)
5735 v.AddArg3(v0, v1, v1)
5736 return true
5737 }
5738 return false
5739 }
5740 func rewriteValuegeneric_OpConstString(v *Value) bool {
5741 b := v.Block
5742 config := b.Func.Config
5743 fe := b.Func.fe
5744 typ := &b.Func.Config.Types
5745
5746
5747
5748 for {
5749 str := auxToString(v.Aux)
5750 if !(config.PtrSize == 4 && str == "") {
5751 break
5752 }
5753 v.reset(OpStringMake)
5754 v0 := b.NewValue0(v.Pos, OpConstNil, typ.BytePtr)
5755 v1 := b.NewValue0(v.Pos, OpConst32, typ.Int)
5756 v1.AuxInt = int32ToAuxInt(0)
5757 v.AddArg2(v0, v1)
5758 return true
5759 }
5760
5761
5762
5763 for {
5764 str := auxToString(v.Aux)
5765 if !(config.PtrSize == 8 && str == "") {
5766 break
5767 }
5768 v.reset(OpStringMake)
5769 v0 := b.NewValue0(v.Pos, OpConstNil, typ.BytePtr)
5770 v1 := b.NewValue0(v.Pos, OpConst64, typ.Int)
5771 v1.AuxInt = int64ToAuxInt(0)
5772 v.AddArg2(v0, v1)
5773 return true
5774 }
5775
5776
5777
5778 for {
5779 str := auxToString(v.Aux)
5780 if !(config.PtrSize == 4 && str != "") {
5781 break
5782 }
5783 v.reset(OpStringMake)
5784 v0 := b.NewValue0(v.Pos, OpAddr, typ.BytePtr)
5785 v0.Aux = symToAux(fe.StringData(str))
5786 v1 := b.NewValue0(v.Pos, OpSB, typ.Uintptr)
5787 v0.AddArg(v1)
5788 v2 := b.NewValue0(v.Pos, OpConst32, typ.Int)
5789 v2.AuxInt = int32ToAuxInt(int32(len(str)))
5790 v.AddArg2(v0, v2)
5791 return true
5792 }
5793
5794
5795
5796 for {
5797 str := auxToString(v.Aux)
5798 if !(config.PtrSize == 8 && str != "") {
5799 break
5800 }
5801 v.reset(OpStringMake)
5802 v0 := b.NewValue0(v.Pos, OpAddr, typ.BytePtr)
5803 v0.Aux = symToAux(fe.StringData(str))
5804 v1 := b.NewValue0(v.Pos, OpSB, typ.Uintptr)
5805 v0.AddArg(v1)
5806 v2 := b.NewValue0(v.Pos, OpConst64, typ.Int)
5807 v2.AuxInt = int64ToAuxInt(int64(len(str)))
5808 v.AddArg2(v0, v2)
5809 return true
5810 }
5811 return false
5812 }
5813 func rewriteValuegeneric_OpConvert(v *Value) bool {
5814 v_1 := v.Args[1]
5815 v_0 := v.Args[0]
5816 b := v.Block
5817
5818
5819 for {
5820 if v_0.Op != OpAdd64 {
5821 break
5822 }
5823 _ = v_0.Args[1]
5824 v_0_0 := v_0.Args[0]
5825 v_0_1 := v_0.Args[1]
5826 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
5827 if v_0_0.Op != OpConvert {
5828 continue
5829 }
5830 mem := v_0_0.Args[1]
5831 ptr := v_0_0.Args[0]
5832 off := v_0_1
5833 if mem != v_1 {
5834 continue
5835 }
5836 v.reset(OpAddPtr)
5837 v.AddArg2(ptr, off)
5838 return true
5839 }
5840 break
5841 }
5842
5843
5844 for {
5845 if v_0.Op != OpAdd32 {
5846 break
5847 }
5848 _ = v_0.Args[1]
5849 v_0_0 := v_0.Args[0]
5850 v_0_1 := v_0.Args[1]
5851 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
5852 if v_0_0.Op != OpConvert {
5853 continue
5854 }
5855 mem := v_0_0.Args[1]
5856 ptr := v_0_0.Args[0]
5857 off := v_0_1
5858 if mem != v_1 {
5859 continue
5860 }
5861 v.reset(OpAddPtr)
5862 v.AddArg2(ptr, off)
5863 return true
5864 }
5865 break
5866 }
5867
5868
5869 for {
5870 if v_0.Op != OpConvert {
5871 break
5872 }
5873 mem := v_0.Args[1]
5874 ptr := v_0.Args[0]
5875 if mem != v_1 {
5876 break
5877 }
5878 v.copyOf(ptr)
5879 return true
5880 }
5881
5882
5883 for {
5884 a := v_0
5885 if a.Op != OpAdd64 {
5886 break
5887 }
5888 _ = a.Args[1]
5889 a_0 := a.Args[0]
5890 a_1 := a.Args[1]
5891 for _i0 := 0; _i0 <= 1; _i0, a_0, a_1 = _i0+1, a_1, a_0 {
5892 if a_0.Op != OpAdd64 {
5893 continue
5894 }
5895 _ = a_0.Args[1]
5896 a_0_0 := a_0.Args[0]
5897 a_0_1 := a_0.Args[1]
5898 for _i1 := 0; _i1 <= 1; _i1, a_0_0, a_0_1 = _i1+1, a_0_1, a_0_0 {
5899 if a_0_0.Op != OpConvert {
5900 continue
5901 }
5902 mem := a_0_0.Args[1]
5903 ptr := a_0_0.Args[0]
5904 off1 := a_0_1
5905 off2 := a_1
5906 if mem != v_1 {
5907 continue
5908 }
5909 v.reset(OpAddPtr)
5910 v0 := b.NewValue0(v.Pos, OpAdd64, a.Type)
5911 v0.AddArg2(off1, off2)
5912 v.AddArg2(ptr, v0)
5913 return true
5914 }
5915 }
5916 break
5917 }
5918
5919
5920 for {
5921 a := v_0
5922 if a.Op != OpAdd32 {
5923 break
5924 }
5925 _ = a.Args[1]
5926 a_0 := a.Args[0]
5927 a_1 := a.Args[1]
5928 for _i0 := 0; _i0 <= 1; _i0, a_0, a_1 = _i0+1, a_1, a_0 {
5929 if a_0.Op != OpAdd32 {
5930 continue
5931 }
5932 _ = a_0.Args[1]
5933 a_0_0 := a_0.Args[0]
5934 a_0_1 := a_0.Args[1]
5935 for _i1 := 0; _i1 <= 1; _i1, a_0_0, a_0_1 = _i1+1, a_0_1, a_0_0 {
5936 if a_0_0.Op != OpConvert {
5937 continue
5938 }
5939 mem := a_0_0.Args[1]
5940 ptr := a_0_0.Args[0]
5941 off1 := a_0_1
5942 off2 := a_1
5943 if mem != v_1 {
5944 continue
5945 }
5946 v.reset(OpAddPtr)
5947 v0 := b.NewValue0(v.Pos, OpAdd32, a.Type)
5948 v0.AddArg2(off1, off2)
5949 v.AddArg2(ptr, v0)
5950 return true
5951 }
5952 }
5953 break
5954 }
5955 return false
5956 }
5957 func rewriteValuegeneric_OpCtz16(v *Value) bool {
5958 v_0 := v.Args[0]
5959 b := v.Block
5960 config := b.Func.Config
5961
5962
5963
5964 for {
5965 if v_0.Op != OpConst16 {
5966 break
5967 }
5968 c := auxIntToInt16(v_0.AuxInt)
5969 if !(config.PtrSize == 4) {
5970 break
5971 }
5972 v.reset(OpConst32)
5973 v.AuxInt = int32ToAuxInt(int32(ntz16(c)))
5974 return true
5975 }
5976
5977
5978
5979 for {
5980 if v_0.Op != OpConst16 {
5981 break
5982 }
5983 c := auxIntToInt16(v_0.AuxInt)
5984 if !(config.PtrSize == 8) {
5985 break
5986 }
5987 v.reset(OpConst64)
5988 v.AuxInt = int64ToAuxInt(int64(ntz16(c)))
5989 return true
5990 }
5991 return false
5992 }
5993 func rewriteValuegeneric_OpCtz32(v *Value) bool {
5994 v_0 := v.Args[0]
5995 b := v.Block
5996 config := b.Func.Config
5997
5998
5999
6000 for {
6001 if v_0.Op != OpConst32 {
6002 break
6003 }
6004 c := auxIntToInt32(v_0.AuxInt)
6005 if !(config.PtrSize == 4) {
6006 break
6007 }
6008 v.reset(OpConst32)
6009 v.AuxInt = int32ToAuxInt(int32(ntz32(c)))
6010 return true
6011 }
6012
6013
6014
6015 for {
6016 if v_0.Op != OpConst32 {
6017 break
6018 }
6019 c := auxIntToInt32(v_0.AuxInt)
6020 if !(config.PtrSize == 8) {
6021 break
6022 }
6023 v.reset(OpConst64)
6024 v.AuxInt = int64ToAuxInt(int64(ntz32(c)))
6025 return true
6026 }
6027 return false
6028 }
6029 func rewriteValuegeneric_OpCtz64(v *Value) bool {
6030 v_0 := v.Args[0]
6031 b := v.Block
6032 config := b.Func.Config
6033
6034
6035
6036 for {
6037 if v_0.Op != OpConst64 {
6038 break
6039 }
6040 c := auxIntToInt64(v_0.AuxInt)
6041 if !(config.PtrSize == 4) {
6042 break
6043 }
6044 v.reset(OpConst32)
6045 v.AuxInt = int32ToAuxInt(int32(ntz64(c)))
6046 return true
6047 }
6048
6049
6050
6051 for {
6052 if v_0.Op != OpConst64 {
6053 break
6054 }
6055 c := auxIntToInt64(v_0.AuxInt)
6056 if !(config.PtrSize == 8) {
6057 break
6058 }
6059 v.reset(OpConst64)
6060 v.AuxInt = int64ToAuxInt(int64(ntz64(c)))
6061 return true
6062 }
6063 return false
6064 }
6065 func rewriteValuegeneric_OpCtz8(v *Value) bool {
6066 v_0 := v.Args[0]
6067 b := v.Block
6068 config := b.Func.Config
6069
6070
6071
6072 for {
6073 if v_0.Op != OpConst8 {
6074 break
6075 }
6076 c := auxIntToInt8(v_0.AuxInt)
6077 if !(config.PtrSize == 4) {
6078 break
6079 }
6080 v.reset(OpConst32)
6081 v.AuxInt = int32ToAuxInt(int32(ntz8(c)))
6082 return true
6083 }
6084
6085
6086
6087 for {
6088 if v_0.Op != OpConst8 {
6089 break
6090 }
6091 c := auxIntToInt8(v_0.AuxInt)
6092 if !(config.PtrSize == 8) {
6093 break
6094 }
6095 v.reset(OpConst64)
6096 v.AuxInt = int64ToAuxInt(int64(ntz8(c)))
6097 return true
6098 }
6099 return false
6100 }
6101 func rewriteValuegeneric_OpCvt32Fto32(v *Value) bool {
6102 v_0 := v.Args[0]
6103
6104
6105 for {
6106 if v_0.Op != OpConst32F {
6107 break
6108 }
6109 c := auxIntToFloat32(v_0.AuxInt)
6110 v.reset(OpConst32)
6111 v.AuxInt = int32ToAuxInt(int32(c))
6112 return true
6113 }
6114 return false
6115 }
6116 func rewriteValuegeneric_OpCvt32Fto64(v *Value) bool {
6117 v_0 := v.Args[0]
6118
6119
6120 for {
6121 if v_0.Op != OpConst32F {
6122 break
6123 }
6124 c := auxIntToFloat32(v_0.AuxInt)
6125 v.reset(OpConst64)
6126 v.AuxInt = int64ToAuxInt(int64(c))
6127 return true
6128 }
6129 return false
6130 }
6131 func rewriteValuegeneric_OpCvt32Fto64F(v *Value) bool {
6132 v_0 := v.Args[0]
6133
6134
6135 for {
6136 if v_0.Op != OpConst32F {
6137 break
6138 }
6139 c := auxIntToFloat32(v_0.AuxInt)
6140 v.reset(OpConst64F)
6141 v.AuxInt = float64ToAuxInt(float64(c))
6142 return true
6143 }
6144 return false
6145 }
6146 func rewriteValuegeneric_OpCvt32to32F(v *Value) bool {
6147 v_0 := v.Args[0]
6148
6149
6150 for {
6151 if v_0.Op != OpConst32 {
6152 break
6153 }
6154 c := auxIntToInt32(v_0.AuxInt)
6155 v.reset(OpConst32F)
6156 v.AuxInt = float32ToAuxInt(float32(c))
6157 return true
6158 }
6159 return false
6160 }
6161 func rewriteValuegeneric_OpCvt32to64F(v *Value) bool {
6162 v_0 := v.Args[0]
6163
6164
6165 for {
6166 if v_0.Op != OpConst32 {
6167 break
6168 }
6169 c := auxIntToInt32(v_0.AuxInt)
6170 v.reset(OpConst64F)
6171 v.AuxInt = float64ToAuxInt(float64(c))
6172 return true
6173 }
6174 return false
6175 }
6176 func rewriteValuegeneric_OpCvt64Fto32(v *Value) bool {
6177 v_0 := v.Args[0]
6178
6179
6180 for {
6181 if v_0.Op != OpConst64F {
6182 break
6183 }
6184 c := auxIntToFloat64(v_0.AuxInt)
6185 v.reset(OpConst32)
6186 v.AuxInt = int32ToAuxInt(int32(c))
6187 return true
6188 }
6189 return false
6190 }
6191 func rewriteValuegeneric_OpCvt64Fto32F(v *Value) bool {
6192 v_0 := v.Args[0]
6193
6194
6195 for {
6196 if v_0.Op != OpConst64F {
6197 break
6198 }
6199 c := auxIntToFloat64(v_0.AuxInt)
6200 v.reset(OpConst32F)
6201 v.AuxInt = float32ToAuxInt(float32(c))
6202 return true
6203 }
6204
6205
6206
6207 for {
6208 sqrt0 := v_0
6209 if sqrt0.Op != OpSqrt {
6210 break
6211 }
6212 sqrt0_0 := sqrt0.Args[0]
6213 if sqrt0_0.Op != OpCvt32Fto64F {
6214 break
6215 }
6216 x := sqrt0_0.Args[0]
6217 if !(sqrt0.Uses == 1) {
6218 break
6219 }
6220 v.reset(OpSqrt32)
6221 v.AddArg(x)
6222 return true
6223 }
6224 return false
6225 }
6226 func rewriteValuegeneric_OpCvt64Fto64(v *Value) bool {
6227 v_0 := v.Args[0]
6228
6229
6230 for {
6231 if v_0.Op != OpConst64F {
6232 break
6233 }
6234 c := auxIntToFloat64(v_0.AuxInt)
6235 v.reset(OpConst64)
6236 v.AuxInt = int64ToAuxInt(int64(c))
6237 return true
6238 }
6239 return false
6240 }
6241 func rewriteValuegeneric_OpCvt64to32F(v *Value) bool {
6242 v_0 := v.Args[0]
6243
6244
6245 for {
6246 if v_0.Op != OpConst64 {
6247 break
6248 }
6249 c := auxIntToInt64(v_0.AuxInt)
6250 v.reset(OpConst32F)
6251 v.AuxInt = float32ToAuxInt(float32(c))
6252 return true
6253 }
6254 return false
6255 }
6256 func rewriteValuegeneric_OpCvt64to64F(v *Value) bool {
6257 v_0 := v.Args[0]
6258
6259
6260 for {
6261 if v_0.Op != OpConst64 {
6262 break
6263 }
6264 c := auxIntToInt64(v_0.AuxInt)
6265 v.reset(OpConst64F)
6266 v.AuxInt = float64ToAuxInt(float64(c))
6267 return true
6268 }
6269 return false
6270 }
6271 func rewriteValuegeneric_OpCvtBoolToUint8(v *Value) bool {
6272 v_0 := v.Args[0]
6273
6274
6275 for {
6276 if v_0.Op != OpConstBool || auxIntToBool(v_0.AuxInt) != false {
6277 break
6278 }
6279 v.reset(OpConst8)
6280 v.AuxInt = int8ToAuxInt(0)
6281 return true
6282 }
6283
6284
6285 for {
6286 if v_0.Op != OpConstBool || auxIntToBool(v_0.AuxInt) != true {
6287 break
6288 }
6289 v.reset(OpConst8)
6290 v.AuxInt = int8ToAuxInt(1)
6291 return true
6292 }
6293 return false
6294 }
6295 func rewriteValuegeneric_OpDiv128u(v *Value) bool {
6296 v_2 := v.Args[2]
6297 v_1 := v.Args[1]
6298 v_0 := v.Args[0]
6299 b := v.Block
6300
6301
6302 for {
6303 t := v.Type
6304 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
6305 break
6306 }
6307 lo := v_1
6308 y := v_2
6309 v.reset(OpMakeTuple)
6310 v0 := b.NewValue0(v.Pos, OpDiv64u, t.FieldType(0))
6311 v0.AddArg2(lo, y)
6312 v1 := b.NewValue0(v.Pos, OpMod64u, t.FieldType(1))
6313 v1.AddArg2(lo, y)
6314 v.AddArg2(v0, v1)
6315 return true
6316 }
6317 return false
6318 }
6319 func rewriteValuegeneric_OpDiv16(v *Value) bool {
6320 v_1 := v.Args[1]
6321 v_0 := v.Args[0]
6322 b := v.Block
6323 typ := &b.Func.Config.Types
6324
6325
6326
6327 for {
6328 if v_0.Op != OpConst16 {
6329 break
6330 }
6331 c := auxIntToInt16(v_0.AuxInt)
6332 if v_1.Op != OpConst16 {
6333 break
6334 }
6335 d := auxIntToInt16(v_1.AuxInt)
6336 if !(d != 0) {
6337 break
6338 }
6339 v.reset(OpConst16)
6340 v.AuxInt = int16ToAuxInt(c / d)
6341 return true
6342 }
6343
6344
6345
6346 for {
6347 n := v_0
6348 if v_1.Op != OpConst16 {
6349 break
6350 }
6351 c := auxIntToInt16(v_1.AuxInt)
6352 if !(isNonNegative(n) && isPowerOfTwo(c)) {
6353 break
6354 }
6355 v.reset(OpRsh16Ux64)
6356 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
6357 v0.AuxInt = int64ToAuxInt(log16(c))
6358 v.AddArg2(n, v0)
6359 return true
6360 }
6361
6362
6363
6364 for {
6365 t := v.Type
6366 n := v_0
6367 if v_1.Op != OpConst16 {
6368 break
6369 }
6370 c := auxIntToInt16(v_1.AuxInt)
6371 if !(c < 0 && c != -1<<15) {
6372 break
6373 }
6374 v.reset(OpNeg16)
6375 v0 := b.NewValue0(v.Pos, OpDiv16, t)
6376 v1 := b.NewValue0(v.Pos, OpConst16, t)
6377 v1.AuxInt = int16ToAuxInt(-c)
6378 v0.AddArg2(n, v1)
6379 v.AddArg(v0)
6380 return true
6381 }
6382
6383
6384 for {
6385 t := v.Type
6386 x := v_0
6387 if v_1.Op != OpConst16 || auxIntToInt16(v_1.AuxInt) != -1<<15 {
6388 break
6389 }
6390 v.reset(OpRsh16Ux64)
6391 v0 := b.NewValue0(v.Pos, OpAnd16, t)
6392 v1 := b.NewValue0(v.Pos, OpNeg16, t)
6393 v1.AddArg(x)
6394 v0.AddArg2(x, v1)
6395 v2 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
6396 v2.AuxInt = int64ToAuxInt(15)
6397 v.AddArg2(v0, v2)
6398 return true
6399 }
6400
6401
6402
6403 for {
6404 t := v.Type
6405 n := v_0
6406 if v_1.Op != OpConst16 {
6407 break
6408 }
6409 c := auxIntToInt16(v_1.AuxInt)
6410 if !(isPowerOfTwo(c)) {
6411 break
6412 }
6413 v.reset(OpRsh16x64)
6414 v0 := b.NewValue0(v.Pos, OpAdd16, t)
6415 v1 := b.NewValue0(v.Pos, OpRsh16Ux64, t)
6416 v2 := b.NewValue0(v.Pos, OpRsh16x64, t)
6417 v3 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
6418 v3.AuxInt = int64ToAuxInt(15)
6419 v2.AddArg2(n, v3)
6420 v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
6421 v4.AuxInt = int64ToAuxInt(int64(16 - log16(c)))
6422 v1.AddArg2(v2, v4)
6423 v0.AddArg2(n, v1)
6424 v5 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
6425 v5.AuxInt = int64ToAuxInt(int64(log16(c)))
6426 v.AddArg2(v0, v5)
6427 return true
6428 }
6429
6430
6431
6432 for {
6433 t := v.Type
6434 x := v_0
6435 if v_1.Op != OpConst16 {
6436 break
6437 }
6438 c := auxIntToInt16(v_1.AuxInt)
6439 if !(smagicOK16(c)) {
6440 break
6441 }
6442 v.reset(OpSub16)
6443 v.Type = t
6444 v0 := b.NewValue0(v.Pos, OpRsh32x64, t)
6445 v1 := b.NewValue0(v.Pos, OpMul32, typ.UInt32)
6446 v2 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
6447 v2.AuxInt = int32ToAuxInt(int32(smagic16(c).m))
6448 v3 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
6449 v3.AddArg(x)
6450 v1.AddArg2(v2, v3)
6451 v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
6452 v4.AuxInt = int64ToAuxInt(16 + smagic16(c).s)
6453 v0.AddArg2(v1, v4)
6454 v5 := b.NewValue0(v.Pos, OpRsh32x64, t)
6455 v6 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
6456 v6.AuxInt = int64ToAuxInt(31)
6457 v5.AddArg2(v3, v6)
6458 v.AddArg2(v0, v5)
6459 return true
6460 }
6461 return false
6462 }
6463 func rewriteValuegeneric_OpDiv16u(v *Value) bool {
6464 v_1 := v.Args[1]
6465 v_0 := v.Args[0]
6466 b := v.Block
6467 config := b.Func.Config
6468 typ := &b.Func.Config.Types
6469
6470
6471
6472 for {
6473 if v_0.Op != OpConst16 {
6474 break
6475 }
6476 c := auxIntToInt16(v_0.AuxInt)
6477 if v_1.Op != OpConst16 {
6478 break
6479 }
6480 d := auxIntToInt16(v_1.AuxInt)
6481 if !(d != 0) {
6482 break
6483 }
6484 v.reset(OpConst16)
6485 v.AuxInt = int16ToAuxInt(int16(uint16(c) / uint16(d)))
6486 return true
6487 }
6488
6489
6490
6491 for {
6492 n := v_0
6493 if v_1.Op != OpConst16 {
6494 break
6495 }
6496 c := auxIntToInt16(v_1.AuxInt)
6497 if !(isPowerOfTwo(c)) {
6498 break
6499 }
6500 v.reset(OpRsh16Ux64)
6501 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
6502 v0.AuxInt = int64ToAuxInt(log16(c))
6503 v.AddArg2(n, v0)
6504 return true
6505 }
6506
6507
6508
6509 for {
6510 x := v_0
6511 if v_1.Op != OpConst16 {
6512 break
6513 }
6514 c := auxIntToInt16(v_1.AuxInt)
6515 if !(umagicOK16(c) && config.RegSize == 8) {
6516 break
6517 }
6518 v.reset(OpTrunc64to16)
6519 v0 := b.NewValue0(v.Pos, OpRsh64Ux64, typ.UInt64)
6520 v1 := b.NewValue0(v.Pos, OpMul64, typ.UInt64)
6521 v2 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
6522 v2.AuxInt = int64ToAuxInt(int64(1<<16 + umagic16(c).m))
6523 v3 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
6524 v3.AddArg(x)
6525 v1.AddArg2(v2, v3)
6526 v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
6527 v4.AuxInt = int64ToAuxInt(16 + umagic16(c).s)
6528 v0.AddArg2(v1, v4)
6529 v.AddArg(v0)
6530 return true
6531 }
6532
6533
6534
6535 for {
6536 x := v_0
6537 if v_1.Op != OpConst16 {
6538 break
6539 }
6540 c := auxIntToInt16(v_1.AuxInt)
6541 if !(umagicOK16(c) && config.RegSize == 4 && umagic16(c).m&1 == 0) {
6542 break
6543 }
6544 v.reset(OpTrunc32to16)
6545 v0 := b.NewValue0(v.Pos, OpRsh32Ux64, typ.UInt32)
6546 v1 := b.NewValue0(v.Pos, OpMul32, typ.UInt32)
6547 v2 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
6548 v2.AuxInt = int32ToAuxInt(int32(1<<15 + umagic16(c).m/2))
6549 v3 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
6550 v3.AddArg(x)
6551 v1.AddArg2(v2, v3)
6552 v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
6553 v4.AuxInt = int64ToAuxInt(16 + umagic16(c).s - 1)
6554 v0.AddArg2(v1, v4)
6555 v.AddArg(v0)
6556 return true
6557 }
6558
6559
6560
6561 for {
6562 x := v_0
6563 if v_1.Op != OpConst16 {
6564 break
6565 }
6566 c := auxIntToInt16(v_1.AuxInt)
6567 if !(umagicOK16(c) && config.RegSize == 4 && c&1 == 0) {
6568 break
6569 }
6570 v.reset(OpTrunc32to16)
6571 v0 := b.NewValue0(v.Pos, OpRsh32Ux64, typ.UInt32)
6572 v1 := b.NewValue0(v.Pos, OpMul32, typ.UInt32)
6573 v2 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
6574 v2.AuxInt = int32ToAuxInt(int32(1<<15 + (umagic16(c).m+1)/2))
6575 v3 := b.NewValue0(v.Pos, OpRsh32Ux64, typ.UInt32)
6576 v4 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
6577 v4.AddArg(x)
6578 v5 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
6579 v5.AuxInt = int64ToAuxInt(1)
6580 v3.AddArg2(v4, v5)
6581 v1.AddArg2(v2, v3)
6582 v6 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
6583 v6.AuxInt = int64ToAuxInt(16 + umagic16(c).s - 2)
6584 v0.AddArg2(v1, v6)
6585 v.AddArg(v0)
6586 return true
6587 }
6588
6589
6590
6591 for {
6592 x := v_0
6593 if v_1.Op != OpConst16 {
6594 break
6595 }
6596 c := auxIntToInt16(v_1.AuxInt)
6597 if !(umagicOK16(c) && config.RegSize == 4 && config.useAvg) {
6598 break
6599 }
6600 v.reset(OpTrunc32to16)
6601 v0 := b.NewValue0(v.Pos, OpRsh32Ux64, typ.UInt32)
6602 v1 := b.NewValue0(v.Pos, OpAvg32u, typ.UInt32)
6603 v2 := b.NewValue0(v.Pos, OpLsh32x64, typ.UInt32)
6604 v3 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
6605 v3.AddArg(x)
6606 v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
6607 v4.AuxInt = int64ToAuxInt(16)
6608 v2.AddArg2(v3, v4)
6609 v5 := b.NewValue0(v.Pos, OpMul32, typ.UInt32)
6610 v6 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
6611 v6.AuxInt = int32ToAuxInt(int32(umagic16(c).m))
6612 v5.AddArg2(v6, v3)
6613 v1.AddArg2(v2, v5)
6614 v7 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
6615 v7.AuxInt = int64ToAuxInt(16 + umagic16(c).s - 1)
6616 v0.AddArg2(v1, v7)
6617 v.AddArg(v0)
6618 return true
6619 }
6620 return false
6621 }
6622 func rewriteValuegeneric_OpDiv32(v *Value) bool {
6623 v_1 := v.Args[1]
6624 v_0 := v.Args[0]
6625 b := v.Block
6626 config := b.Func.Config
6627 typ := &b.Func.Config.Types
6628
6629
6630
6631 for {
6632 if v_0.Op != OpConst32 {
6633 break
6634 }
6635 c := auxIntToInt32(v_0.AuxInt)
6636 if v_1.Op != OpConst32 {
6637 break
6638 }
6639 d := auxIntToInt32(v_1.AuxInt)
6640 if !(d != 0) {
6641 break
6642 }
6643 v.reset(OpConst32)
6644 v.AuxInt = int32ToAuxInt(c / d)
6645 return true
6646 }
6647
6648
6649
6650 for {
6651 n := v_0
6652 if v_1.Op != OpConst32 {
6653 break
6654 }
6655 c := auxIntToInt32(v_1.AuxInt)
6656 if !(isNonNegative(n) && isPowerOfTwo(c)) {
6657 break
6658 }
6659 v.reset(OpRsh32Ux64)
6660 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
6661 v0.AuxInt = int64ToAuxInt(log32(c))
6662 v.AddArg2(n, v0)
6663 return true
6664 }
6665
6666
6667
6668 for {
6669 t := v.Type
6670 n := v_0
6671 if v_1.Op != OpConst32 {
6672 break
6673 }
6674 c := auxIntToInt32(v_1.AuxInt)
6675 if !(c < 0 && c != -1<<31) {
6676 break
6677 }
6678 v.reset(OpNeg32)
6679 v0 := b.NewValue0(v.Pos, OpDiv32, t)
6680 v1 := b.NewValue0(v.Pos, OpConst32, t)
6681 v1.AuxInt = int32ToAuxInt(-c)
6682 v0.AddArg2(n, v1)
6683 v.AddArg(v0)
6684 return true
6685 }
6686
6687
6688 for {
6689 t := v.Type
6690 x := v_0
6691 if v_1.Op != OpConst32 || auxIntToInt32(v_1.AuxInt) != -1<<31 {
6692 break
6693 }
6694 v.reset(OpRsh32Ux64)
6695 v0 := b.NewValue0(v.Pos, OpAnd32, t)
6696 v1 := b.NewValue0(v.Pos, OpNeg32, t)
6697 v1.AddArg(x)
6698 v0.AddArg2(x, v1)
6699 v2 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
6700 v2.AuxInt = int64ToAuxInt(31)
6701 v.AddArg2(v0, v2)
6702 return true
6703 }
6704
6705
6706
6707 for {
6708 t := v.Type
6709 n := v_0
6710 if v_1.Op != OpConst32 {
6711 break
6712 }
6713 c := auxIntToInt32(v_1.AuxInt)
6714 if !(isPowerOfTwo(c)) {
6715 break
6716 }
6717 v.reset(OpRsh32x64)
6718 v0 := b.NewValue0(v.Pos, OpAdd32, t)
6719 v1 := b.NewValue0(v.Pos, OpRsh32Ux64, t)
6720 v2 := b.NewValue0(v.Pos, OpRsh32x64, t)
6721 v3 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
6722 v3.AuxInt = int64ToAuxInt(31)
6723 v2.AddArg2(n, v3)
6724 v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
6725 v4.AuxInt = int64ToAuxInt(int64(32 - log32(c)))
6726 v1.AddArg2(v2, v4)
6727 v0.AddArg2(n, v1)
6728 v5 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
6729 v5.AuxInt = int64ToAuxInt(int64(log32(c)))
6730 v.AddArg2(v0, v5)
6731 return true
6732 }
6733
6734
6735
6736 for {
6737 t := v.Type
6738 x := v_0
6739 if v_1.Op != OpConst32 {
6740 break
6741 }
6742 c := auxIntToInt32(v_1.AuxInt)
6743 if !(smagicOK32(c) && config.RegSize == 8) {
6744 break
6745 }
6746 v.reset(OpSub32)
6747 v.Type = t
6748 v0 := b.NewValue0(v.Pos, OpRsh64x64, t)
6749 v1 := b.NewValue0(v.Pos, OpMul64, typ.UInt64)
6750 v2 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
6751 v2.AuxInt = int64ToAuxInt(int64(smagic32(c).m))
6752 v3 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
6753 v3.AddArg(x)
6754 v1.AddArg2(v2, v3)
6755 v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
6756 v4.AuxInt = int64ToAuxInt(32 + smagic32(c).s)
6757 v0.AddArg2(v1, v4)
6758 v5 := b.NewValue0(v.Pos, OpRsh64x64, t)
6759 v6 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
6760 v6.AuxInt = int64ToAuxInt(63)
6761 v5.AddArg2(v3, v6)
6762 v.AddArg2(v0, v5)
6763 return true
6764 }
6765
6766
6767
6768 for {
6769 t := v.Type
6770 x := v_0
6771 if v_1.Op != OpConst32 {
6772 break
6773 }
6774 c := auxIntToInt32(v_1.AuxInt)
6775 if !(smagicOK32(c) && config.RegSize == 4 && smagic32(c).m&1 == 0 && config.useHmul) {
6776 break
6777 }
6778 v.reset(OpSub32)
6779 v.Type = t
6780 v0 := b.NewValue0(v.Pos, OpRsh32x64, t)
6781 v1 := b.NewValue0(v.Pos, OpHmul32, t)
6782 v2 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
6783 v2.AuxInt = int32ToAuxInt(int32(smagic32(c).m / 2))
6784 v1.AddArg2(v2, x)
6785 v3 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
6786 v3.AuxInt = int64ToAuxInt(smagic32(c).s - 1)
6787 v0.AddArg2(v1, v3)
6788 v4 := b.NewValue0(v.Pos, OpRsh32x64, t)
6789 v5 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
6790 v5.AuxInt = int64ToAuxInt(31)
6791 v4.AddArg2(x, v5)
6792 v.AddArg2(v0, v4)
6793 return true
6794 }
6795
6796
6797
6798 for {
6799 t := v.Type
6800 x := v_0
6801 if v_1.Op != OpConst32 {
6802 break
6803 }
6804 c := auxIntToInt32(v_1.AuxInt)
6805 if !(smagicOK32(c) && config.RegSize == 4 && smagic32(c).m&1 != 0 && config.useHmul) {
6806 break
6807 }
6808 v.reset(OpSub32)
6809 v.Type = t
6810 v0 := b.NewValue0(v.Pos, OpRsh32x64, t)
6811 v1 := b.NewValue0(v.Pos, OpAdd32, t)
6812 v2 := b.NewValue0(v.Pos, OpHmul32, t)
6813 v3 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
6814 v3.AuxInt = int32ToAuxInt(int32(smagic32(c).m))
6815 v2.AddArg2(v3, x)
6816 v1.AddArg2(v2, x)
6817 v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
6818 v4.AuxInt = int64ToAuxInt(smagic32(c).s)
6819 v0.AddArg2(v1, v4)
6820 v5 := b.NewValue0(v.Pos, OpRsh32x64, t)
6821 v6 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
6822 v6.AuxInt = int64ToAuxInt(31)
6823 v5.AddArg2(x, v6)
6824 v.AddArg2(v0, v5)
6825 return true
6826 }
6827 return false
6828 }
6829 func rewriteValuegeneric_OpDiv32F(v *Value) bool {
6830 v_1 := v.Args[1]
6831 v_0 := v.Args[0]
6832 b := v.Block
6833
6834
6835
6836 for {
6837 if v_0.Op != OpConst32F {
6838 break
6839 }
6840 c := auxIntToFloat32(v_0.AuxInt)
6841 if v_1.Op != OpConst32F {
6842 break
6843 }
6844 d := auxIntToFloat32(v_1.AuxInt)
6845 if !(c/d == c/d) {
6846 break
6847 }
6848 v.reset(OpConst32F)
6849 v.AuxInt = float32ToAuxInt(c / d)
6850 return true
6851 }
6852
6853
6854
6855 for {
6856 x := v_0
6857 if v_1.Op != OpConst32F {
6858 break
6859 }
6860 t := v_1.Type
6861 c := auxIntToFloat32(v_1.AuxInt)
6862 if !(reciprocalExact32(c)) {
6863 break
6864 }
6865 v.reset(OpMul32F)
6866 v0 := b.NewValue0(v.Pos, OpConst32F, t)
6867 v0.AuxInt = float32ToAuxInt(1 / c)
6868 v.AddArg2(x, v0)
6869 return true
6870 }
6871 return false
6872 }
6873 func rewriteValuegeneric_OpDiv32u(v *Value) bool {
6874 v_1 := v.Args[1]
6875 v_0 := v.Args[0]
6876 b := v.Block
6877 config := b.Func.Config
6878 typ := &b.Func.Config.Types
6879
6880
6881
6882 for {
6883 if v_0.Op != OpConst32 {
6884 break
6885 }
6886 c := auxIntToInt32(v_0.AuxInt)
6887 if v_1.Op != OpConst32 {
6888 break
6889 }
6890 d := auxIntToInt32(v_1.AuxInt)
6891 if !(d != 0) {
6892 break
6893 }
6894 v.reset(OpConst32)
6895 v.AuxInt = int32ToAuxInt(int32(uint32(c) / uint32(d)))
6896 return true
6897 }
6898
6899
6900
6901 for {
6902 n := v_0
6903 if v_1.Op != OpConst32 {
6904 break
6905 }
6906 c := auxIntToInt32(v_1.AuxInt)
6907 if !(isPowerOfTwo(c)) {
6908 break
6909 }
6910 v.reset(OpRsh32Ux64)
6911 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
6912 v0.AuxInt = int64ToAuxInt(log32(c))
6913 v.AddArg2(n, v0)
6914 return true
6915 }
6916
6917
6918
6919 for {
6920 x := v_0
6921 if v_1.Op != OpConst32 {
6922 break
6923 }
6924 c := auxIntToInt32(v_1.AuxInt)
6925 if !(umagicOK32(c) && config.RegSize == 4 && umagic32(c).m&1 == 0 && config.useHmul) {
6926 break
6927 }
6928 v.reset(OpRsh32Ux64)
6929 v.Type = typ.UInt32
6930 v0 := b.NewValue0(v.Pos, OpHmul32u, typ.UInt32)
6931 v1 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
6932 v1.AuxInt = int32ToAuxInt(int32(1<<31 + umagic32(c).m/2))
6933 v0.AddArg2(v1, x)
6934 v2 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
6935 v2.AuxInt = int64ToAuxInt(umagic32(c).s - 1)
6936 v.AddArg2(v0, v2)
6937 return true
6938 }
6939
6940
6941
6942 for {
6943 x := v_0
6944 if v_1.Op != OpConst32 {
6945 break
6946 }
6947 c := auxIntToInt32(v_1.AuxInt)
6948 if !(umagicOK32(c) && config.RegSize == 4 && c&1 == 0 && config.useHmul) {
6949 break
6950 }
6951 v.reset(OpRsh32Ux64)
6952 v.Type = typ.UInt32
6953 v0 := b.NewValue0(v.Pos, OpHmul32u, typ.UInt32)
6954 v1 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
6955 v1.AuxInt = int32ToAuxInt(int32(1<<31 + (umagic32(c).m+1)/2))
6956 v2 := b.NewValue0(v.Pos, OpRsh32Ux64, typ.UInt32)
6957 v3 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
6958 v3.AuxInt = int64ToAuxInt(1)
6959 v2.AddArg2(x, v3)
6960 v0.AddArg2(v1, v2)
6961 v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
6962 v4.AuxInt = int64ToAuxInt(umagic32(c).s - 2)
6963 v.AddArg2(v0, v4)
6964 return true
6965 }
6966
6967
6968
6969 for {
6970 x := v_0
6971 if v_1.Op != OpConst32 {
6972 break
6973 }
6974 c := auxIntToInt32(v_1.AuxInt)
6975 if !(umagicOK32(c) && config.RegSize == 4 && config.useAvg && config.useHmul) {
6976 break
6977 }
6978 v.reset(OpRsh32Ux64)
6979 v.Type = typ.UInt32
6980 v0 := b.NewValue0(v.Pos, OpAvg32u, typ.UInt32)
6981 v1 := b.NewValue0(v.Pos, OpHmul32u, typ.UInt32)
6982 v2 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
6983 v2.AuxInt = int32ToAuxInt(int32(umagic32(c).m))
6984 v1.AddArg2(v2, x)
6985 v0.AddArg2(x, v1)
6986 v3 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
6987 v3.AuxInt = int64ToAuxInt(umagic32(c).s - 1)
6988 v.AddArg2(v0, v3)
6989 return true
6990 }
6991
6992
6993
6994 for {
6995 x := v_0
6996 if v_1.Op != OpConst32 {
6997 break
6998 }
6999 c := auxIntToInt32(v_1.AuxInt)
7000 if !(umagicOK32(c) && config.RegSize == 8 && umagic32(c).m&1 == 0) {
7001 break
7002 }
7003 v.reset(OpTrunc64to32)
7004 v0 := b.NewValue0(v.Pos, OpRsh64Ux64, typ.UInt64)
7005 v1 := b.NewValue0(v.Pos, OpMul64, typ.UInt64)
7006 v2 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7007 v2.AuxInt = int64ToAuxInt(int64(1<<31 + umagic32(c).m/2))
7008 v3 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
7009 v3.AddArg(x)
7010 v1.AddArg2(v2, v3)
7011 v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7012 v4.AuxInt = int64ToAuxInt(32 + umagic32(c).s - 1)
7013 v0.AddArg2(v1, v4)
7014 v.AddArg(v0)
7015 return true
7016 }
7017
7018
7019
7020 for {
7021 x := v_0
7022 if v_1.Op != OpConst32 {
7023 break
7024 }
7025 c := auxIntToInt32(v_1.AuxInt)
7026 if !(umagicOK32(c) && config.RegSize == 8 && c&1 == 0) {
7027 break
7028 }
7029 v.reset(OpTrunc64to32)
7030 v0 := b.NewValue0(v.Pos, OpRsh64Ux64, typ.UInt64)
7031 v1 := b.NewValue0(v.Pos, OpMul64, typ.UInt64)
7032 v2 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7033 v2.AuxInt = int64ToAuxInt(int64(1<<31 + (umagic32(c).m+1)/2))
7034 v3 := b.NewValue0(v.Pos, OpRsh64Ux64, typ.UInt64)
7035 v4 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
7036 v4.AddArg(x)
7037 v5 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7038 v5.AuxInt = int64ToAuxInt(1)
7039 v3.AddArg2(v4, v5)
7040 v1.AddArg2(v2, v3)
7041 v6 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7042 v6.AuxInt = int64ToAuxInt(32 + umagic32(c).s - 2)
7043 v0.AddArg2(v1, v6)
7044 v.AddArg(v0)
7045 return true
7046 }
7047
7048
7049
7050 for {
7051 x := v_0
7052 if v_1.Op != OpConst32 {
7053 break
7054 }
7055 c := auxIntToInt32(v_1.AuxInt)
7056 if !(umagicOK32(c) && config.RegSize == 8 && config.useAvg) {
7057 break
7058 }
7059 v.reset(OpTrunc64to32)
7060 v0 := b.NewValue0(v.Pos, OpRsh64Ux64, typ.UInt64)
7061 v1 := b.NewValue0(v.Pos, OpAvg64u, typ.UInt64)
7062 v2 := b.NewValue0(v.Pos, OpLsh64x64, typ.UInt64)
7063 v3 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
7064 v3.AddArg(x)
7065 v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7066 v4.AuxInt = int64ToAuxInt(32)
7067 v2.AddArg2(v3, v4)
7068 v5 := b.NewValue0(v.Pos, OpMul64, typ.UInt64)
7069 v6 := b.NewValue0(v.Pos, OpConst64, typ.UInt32)
7070 v6.AuxInt = int64ToAuxInt(int64(umagic32(c).m))
7071 v5.AddArg2(v6, v3)
7072 v1.AddArg2(v2, v5)
7073 v7 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7074 v7.AuxInt = int64ToAuxInt(32 + umagic32(c).s - 1)
7075 v0.AddArg2(v1, v7)
7076 v.AddArg(v0)
7077 return true
7078 }
7079 return false
7080 }
7081 func rewriteValuegeneric_OpDiv64(v *Value) bool {
7082 v_1 := v.Args[1]
7083 v_0 := v.Args[0]
7084 b := v.Block
7085 config := b.Func.Config
7086 typ := &b.Func.Config.Types
7087
7088
7089
7090 for {
7091 if v_0.Op != OpConst64 {
7092 break
7093 }
7094 c := auxIntToInt64(v_0.AuxInt)
7095 if v_1.Op != OpConst64 {
7096 break
7097 }
7098 d := auxIntToInt64(v_1.AuxInt)
7099 if !(d != 0) {
7100 break
7101 }
7102 v.reset(OpConst64)
7103 v.AuxInt = int64ToAuxInt(c / d)
7104 return true
7105 }
7106
7107
7108
7109 for {
7110 n := v_0
7111 if v_1.Op != OpConst64 {
7112 break
7113 }
7114 c := auxIntToInt64(v_1.AuxInt)
7115 if !(isNonNegative(n) && isPowerOfTwo(c)) {
7116 break
7117 }
7118 v.reset(OpRsh64Ux64)
7119 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7120 v0.AuxInt = int64ToAuxInt(log64(c))
7121 v.AddArg2(n, v0)
7122 return true
7123 }
7124
7125
7126
7127 for {
7128 n := v_0
7129 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != -1<<63 || !(isNonNegative(n)) {
7130 break
7131 }
7132 v.reset(OpConst64)
7133 v.AuxInt = int64ToAuxInt(0)
7134 return true
7135 }
7136
7137
7138
7139 for {
7140 t := v.Type
7141 n := v_0
7142 if v_1.Op != OpConst64 {
7143 break
7144 }
7145 c := auxIntToInt64(v_1.AuxInt)
7146 if !(c < 0 && c != -1<<63) {
7147 break
7148 }
7149 v.reset(OpNeg64)
7150 v0 := b.NewValue0(v.Pos, OpDiv64, t)
7151 v1 := b.NewValue0(v.Pos, OpConst64, t)
7152 v1.AuxInt = int64ToAuxInt(-c)
7153 v0.AddArg2(n, v1)
7154 v.AddArg(v0)
7155 return true
7156 }
7157
7158
7159 for {
7160 t := v.Type
7161 x := v_0
7162 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != -1<<63 {
7163 break
7164 }
7165 v.reset(OpRsh64Ux64)
7166 v0 := b.NewValue0(v.Pos, OpAnd64, t)
7167 v1 := b.NewValue0(v.Pos, OpNeg64, t)
7168 v1.AddArg(x)
7169 v0.AddArg2(x, v1)
7170 v2 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7171 v2.AuxInt = int64ToAuxInt(63)
7172 v.AddArg2(v0, v2)
7173 return true
7174 }
7175
7176
7177
7178 for {
7179 t := v.Type
7180 n := v_0
7181 if v_1.Op != OpConst64 {
7182 break
7183 }
7184 c := auxIntToInt64(v_1.AuxInt)
7185 if !(isPowerOfTwo(c)) {
7186 break
7187 }
7188 v.reset(OpRsh64x64)
7189 v0 := b.NewValue0(v.Pos, OpAdd64, t)
7190 v1 := b.NewValue0(v.Pos, OpRsh64Ux64, t)
7191 v2 := b.NewValue0(v.Pos, OpRsh64x64, t)
7192 v3 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7193 v3.AuxInt = int64ToAuxInt(63)
7194 v2.AddArg2(n, v3)
7195 v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7196 v4.AuxInt = int64ToAuxInt(int64(64 - log64(c)))
7197 v1.AddArg2(v2, v4)
7198 v0.AddArg2(n, v1)
7199 v5 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7200 v5.AuxInt = int64ToAuxInt(int64(log64(c)))
7201 v.AddArg2(v0, v5)
7202 return true
7203 }
7204
7205
7206
7207 for {
7208 t := v.Type
7209 x := v_0
7210 if v_1.Op != OpConst64 {
7211 break
7212 }
7213 c := auxIntToInt64(v_1.AuxInt)
7214 if !(smagicOK64(c) && smagic64(c).m&1 == 0 && config.useHmul) {
7215 break
7216 }
7217 v.reset(OpSub64)
7218 v.Type = t
7219 v0 := b.NewValue0(v.Pos, OpRsh64x64, t)
7220 v1 := b.NewValue0(v.Pos, OpHmul64, t)
7221 v2 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7222 v2.AuxInt = int64ToAuxInt(int64(smagic64(c).m / 2))
7223 v1.AddArg2(v2, x)
7224 v3 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7225 v3.AuxInt = int64ToAuxInt(smagic64(c).s - 1)
7226 v0.AddArg2(v1, v3)
7227 v4 := b.NewValue0(v.Pos, OpRsh64x64, t)
7228 v5 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7229 v5.AuxInt = int64ToAuxInt(63)
7230 v4.AddArg2(x, v5)
7231 v.AddArg2(v0, v4)
7232 return true
7233 }
7234
7235
7236
7237 for {
7238 t := v.Type
7239 x := v_0
7240 if v_1.Op != OpConst64 {
7241 break
7242 }
7243 c := auxIntToInt64(v_1.AuxInt)
7244 if !(smagicOK64(c) && smagic64(c).m&1 != 0 && config.useHmul) {
7245 break
7246 }
7247 v.reset(OpSub64)
7248 v.Type = t
7249 v0 := b.NewValue0(v.Pos, OpRsh64x64, t)
7250 v1 := b.NewValue0(v.Pos, OpAdd64, t)
7251 v2 := b.NewValue0(v.Pos, OpHmul64, t)
7252 v3 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7253 v3.AuxInt = int64ToAuxInt(int64(smagic64(c).m))
7254 v2.AddArg2(v3, x)
7255 v1.AddArg2(v2, x)
7256 v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7257 v4.AuxInt = int64ToAuxInt(smagic64(c).s)
7258 v0.AddArg2(v1, v4)
7259 v5 := b.NewValue0(v.Pos, OpRsh64x64, t)
7260 v6 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7261 v6.AuxInt = int64ToAuxInt(63)
7262 v5.AddArg2(x, v6)
7263 v.AddArg2(v0, v5)
7264 return true
7265 }
7266 return false
7267 }
7268 func rewriteValuegeneric_OpDiv64F(v *Value) bool {
7269 v_1 := v.Args[1]
7270 v_0 := v.Args[0]
7271 b := v.Block
7272
7273
7274
7275 for {
7276 if v_0.Op != OpConst64F {
7277 break
7278 }
7279 c := auxIntToFloat64(v_0.AuxInt)
7280 if v_1.Op != OpConst64F {
7281 break
7282 }
7283 d := auxIntToFloat64(v_1.AuxInt)
7284 if !(c/d == c/d) {
7285 break
7286 }
7287 v.reset(OpConst64F)
7288 v.AuxInt = float64ToAuxInt(c / d)
7289 return true
7290 }
7291
7292
7293
7294 for {
7295 x := v_0
7296 if v_1.Op != OpConst64F {
7297 break
7298 }
7299 t := v_1.Type
7300 c := auxIntToFloat64(v_1.AuxInt)
7301 if !(reciprocalExact64(c)) {
7302 break
7303 }
7304 v.reset(OpMul64F)
7305 v0 := b.NewValue0(v.Pos, OpConst64F, t)
7306 v0.AuxInt = float64ToAuxInt(1 / c)
7307 v.AddArg2(x, v0)
7308 return true
7309 }
7310 return false
7311 }
7312 func rewriteValuegeneric_OpDiv64u(v *Value) bool {
7313 v_1 := v.Args[1]
7314 v_0 := v.Args[0]
7315 b := v.Block
7316 config := b.Func.Config
7317 typ := &b.Func.Config.Types
7318
7319
7320
7321 for {
7322 if v_0.Op != OpConst64 {
7323 break
7324 }
7325 c := auxIntToInt64(v_0.AuxInt)
7326 if v_1.Op != OpConst64 {
7327 break
7328 }
7329 d := auxIntToInt64(v_1.AuxInt)
7330 if !(d != 0) {
7331 break
7332 }
7333 v.reset(OpConst64)
7334 v.AuxInt = int64ToAuxInt(int64(uint64(c) / uint64(d)))
7335 return true
7336 }
7337
7338
7339
7340 for {
7341 n := v_0
7342 if v_1.Op != OpConst64 {
7343 break
7344 }
7345 c := auxIntToInt64(v_1.AuxInt)
7346 if !(isPowerOfTwo(c)) {
7347 break
7348 }
7349 v.reset(OpRsh64Ux64)
7350 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7351 v0.AuxInt = int64ToAuxInt(log64(c))
7352 v.AddArg2(n, v0)
7353 return true
7354 }
7355
7356
7357 for {
7358 n := v_0
7359 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != -1<<63 {
7360 break
7361 }
7362 v.reset(OpRsh64Ux64)
7363 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7364 v0.AuxInt = int64ToAuxInt(63)
7365 v.AddArg2(n, v0)
7366 return true
7367 }
7368
7369
7370
7371 for {
7372 x := v_0
7373 if v_1.Op != OpConst64 {
7374 break
7375 }
7376 c := auxIntToInt64(v_1.AuxInt)
7377 if !(c > 0 && c <= 0xFFFF && umagicOK32(int32(c)) && config.RegSize == 4 && config.useHmul) {
7378 break
7379 }
7380 v.reset(OpAdd64)
7381 v0 := b.NewValue0(v.Pos, OpAdd64, typ.UInt64)
7382 v1 := b.NewValue0(v.Pos, OpAdd64, typ.UInt64)
7383 v2 := b.NewValue0(v.Pos, OpLsh64x64, typ.UInt64)
7384 v3 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
7385 v4 := b.NewValue0(v.Pos, OpDiv32u, typ.UInt32)
7386 v5 := b.NewValue0(v.Pos, OpTrunc64to32, typ.UInt32)
7387 v6 := b.NewValue0(v.Pos, OpRsh64Ux64, typ.UInt64)
7388 v7 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7389 v7.AuxInt = int64ToAuxInt(32)
7390 v6.AddArg2(x, v7)
7391 v5.AddArg(v6)
7392 v8 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
7393 v8.AuxInt = int32ToAuxInt(int32(c))
7394 v4.AddArg2(v5, v8)
7395 v3.AddArg(v4)
7396 v2.AddArg2(v3, v7)
7397 v9 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
7398 v10 := b.NewValue0(v.Pos, OpDiv32u, typ.UInt32)
7399 v11 := b.NewValue0(v.Pos, OpTrunc64to32, typ.UInt32)
7400 v11.AddArg(x)
7401 v10.AddArg2(v11, v8)
7402 v9.AddArg(v10)
7403 v1.AddArg2(v2, v9)
7404 v12 := b.NewValue0(v.Pos, OpMul64, typ.UInt64)
7405 v13 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
7406 v14 := b.NewValue0(v.Pos, OpMod32u, typ.UInt32)
7407 v14.AddArg2(v5, v8)
7408 v13.AddArg(v14)
7409 v15 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7410 v15.AuxInt = int64ToAuxInt(int64((1 << 32) / c))
7411 v12.AddArg2(v13, v15)
7412 v0.AddArg2(v1, v12)
7413 v16 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
7414 v17 := b.NewValue0(v.Pos, OpDiv32u, typ.UInt32)
7415 v18 := b.NewValue0(v.Pos, OpAdd32, typ.UInt32)
7416 v19 := b.NewValue0(v.Pos, OpMod32u, typ.UInt32)
7417 v19.AddArg2(v11, v8)
7418 v20 := b.NewValue0(v.Pos, OpMul32, typ.UInt32)
7419 v21 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
7420 v21.AuxInt = int32ToAuxInt(int32((1 << 32) % c))
7421 v20.AddArg2(v14, v21)
7422 v18.AddArg2(v19, v20)
7423 v17.AddArg2(v18, v8)
7424 v16.AddArg(v17)
7425 v.AddArg2(v0, v16)
7426 return true
7427 }
7428
7429
7430
7431 for {
7432 x := v_0
7433 if v_1.Op != OpConst64 {
7434 break
7435 }
7436 c := auxIntToInt64(v_1.AuxInt)
7437 if !(umagicOK64(c) && config.RegSize == 8 && umagic64(c).m&1 == 0 && config.useHmul) {
7438 break
7439 }
7440 v.reset(OpRsh64Ux64)
7441 v.Type = typ.UInt64
7442 v0 := b.NewValue0(v.Pos, OpHmul64u, typ.UInt64)
7443 v1 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7444 v1.AuxInt = int64ToAuxInt(int64(1<<63 + umagic64(c).m/2))
7445 v0.AddArg2(v1, x)
7446 v2 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7447 v2.AuxInt = int64ToAuxInt(umagic64(c).s - 1)
7448 v.AddArg2(v0, v2)
7449 return true
7450 }
7451
7452
7453
7454 for {
7455 x := v_0
7456 if v_1.Op != OpConst64 {
7457 break
7458 }
7459 c := auxIntToInt64(v_1.AuxInt)
7460 if !(umagicOK64(c) && config.RegSize == 8 && c&1 == 0 && config.useHmul) {
7461 break
7462 }
7463 v.reset(OpRsh64Ux64)
7464 v.Type = typ.UInt64
7465 v0 := b.NewValue0(v.Pos, OpHmul64u, typ.UInt64)
7466 v1 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7467 v1.AuxInt = int64ToAuxInt(int64(1<<63 + (umagic64(c).m+1)/2))
7468 v2 := b.NewValue0(v.Pos, OpRsh64Ux64, typ.UInt64)
7469 v3 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7470 v3.AuxInt = int64ToAuxInt(1)
7471 v2.AddArg2(x, v3)
7472 v0.AddArg2(v1, v2)
7473 v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7474 v4.AuxInt = int64ToAuxInt(umagic64(c).s - 2)
7475 v.AddArg2(v0, v4)
7476 return true
7477 }
7478
7479
7480
7481 for {
7482 x := v_0
7483 if v_1.Op != OpConst64 {
7484 break
7485 }
7486 c := auxIntToInt64(v_1.AuxInt)
7487 if !(umagicOK64(c) && config.RegSize == 8 && config.useAvg && config.useHmul) {
7488 break
7489 }
7490 v.reset(OpRsh64Ux64)
7491 v.Type = typ.UInt64
7492 v0 := b.NewValue0(v.Pos, OpAvg64u, typ.UInt64)
7493 v1 := b.NewValue0(v.Pos, OpHmul64u, typ.UInt64)
7494 v2 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7495 v2.AuxInt = int64ToAuxInt(int64(umagic64(c).m))
7496 v1.AddArg2(v2, x)
7497 v0.AddArg2(x, v1)
7498 v3 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7499 v3.AuxInt = int64ToAuxInt(umagic64(c).s - 1)
7500 v.AddArg2(v0, v3)
7501 return true
7502 }
7503 return false
7504 }
7505 func rewriteValuegeneric_OpDiv8(v *Value) bool {
7506 v_1 := v.Args[1]
7507 v_0 := v.Args[0]
7508 b := v.Block
7509 typ := &b.Func.Config.Types
7510
7511
7512
7513 for {
7514 if v_0.Op != OpConst8 {
7515 break
7516 }
7517 c := auxIntToInt8(v_0.AuxInt)
7518 if v_1.Op != OpConst8 {
7519 break
7520 }
7521 d := auxIntToInt8(v_1.AuxInt)
7522 if !(d != 0) {
7523 break
7524 }
7525 v.reset(OpConst8)
7526 v.AuxInt = int8ToAuxInt(c / d)
7527 return true
7528 }
7529
7530
7531
7532 for {
7533 n := v_0
7534 if v_1.Op != OpConst8 {
7535 break
7536 }
7537 c := auxIntToInt8(v_1.AuxInt)
7538 if !(isNonNegative(n) && isPowerOfTwo(c)) {
7539 break
7540 }
7541 v.reset(OpRsh8Ux64)
7542 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7543 v0.AuxInt = int64ToAuxInt(log8(c))
7544 v.AddArg2(n, v0)
7545 return true
7546 }
7547
7548
7549
7550 for {
7551 t := v.Type
7552 n := v_0
7553 if v_1.Op != OpConst8 {
7554 break
7555 }
7556 c := auxIntToInt8(v_1.AuxInt)
7557 if !(c < 0 && c != -1<<7) {
7558 break
7559 }
7560 v.reset(OpNeg8)
7561 v0 := b.NewValue0(v.Pos, OpDiv8, t)
7562 v1 := b.NewValue0(v.Pos, OpConst8, t)
7563 v1.AuxInt = int8ToAuxInt(-c)
7564 v0.AddArg2(n, v1)
7565 v.AddArg(v0)
7566 return true
7567 }
7568
7569
7570 for {
7571 t := v.Type
7572 x := v_0
7573 if v_1.Op != OpConst8 || auxIntToInt8(v_1.AuxInt) != -1<<7 {
7574 break
7575 }
7576 v.reset(OpRsh8Ux64)
7577 v0 := b.NewValue0(v.Pos, OpAnd8, t)
7578 v1 := b.NewValue0(v.Pos, OpNeg8, t)
7579 v1.AddArg(x)
7580 v0.AddArg2(x, v1)
7581 v2 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7582 v2.AuxInt = int64ToAuxInt(7)
7583 v.AddArg2(v0, v2)
7584 return true
7585 }
7586
7587
7588
7589 for {
7590 t := v.Type
7591 n := v_0
7592 if v_1.Op != OpConst8 {
7593 break
7594 }
7595 c := auxIntToInt8(v_1.AuxInt)
7596 if !(isPowerOfTwo(c)) {
7597 break
7598 }
7599 v.reset(OpRsh8x64)
7600 v0 := b.NewValue0(v.Pos, OpAdd8, t)
7601 v1 := b.NewValue0(v.Pos, OpRsh8Ux64, t)
7602 v2 := b.NewValue0(v.Pos, OpRsh8x64, t)
7603 v3 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7604 v3.AuxInt = int64ToAuxInt(7)
7605 v2.AddArg2(n, v3)
7606 v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7607 v4.AuxInt = int64ToAuxInt(int64(8 - log8(c)))
7608 v1.AddArg2(v2, v4)
7609 v0.AddArg2(n, v1)
7610 v5 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7611 v5.AuxInt = int64ToAuxInt(int64(log8(c)))
7612 v.AddArg2(v0, v5)
7613 return true
7614 }
7615
7616
7617
7618 for {
7619 t := v.Type
7620 x := v_0
7621 if v_1.Op != OpConst8 {
7622 break
7623 }
7624 c := auxIntToInt8(v_1.AuxInt)
7625 if !(smagicOK8(c)) {
7626 break
7627 }
7628 v.reset(OpSub8)
7629 v.Type = t
7630 v0 := b.NewValue0(v.Pos, OpRsh32x64, t)
7631 v1 := b.NewValue0(v.Pos, OpMul32, typ.UInt32)
7632 v2 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
7633 v2.AuxInt = int32ToAuxInt(int32(smagic8(c).m))
7634 v3 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
7635 v3.AddArg(x)
7636 v1.AddArg2(v2, v3)
7637 v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7638 v4.AuxInt = int64ToAuxInt(8 + smagic8(c).s)
7639 v0.AddArg2(v1, v4)
7640 v5 := b.NewValue0(v.Pos, OpRsh32x64, t)
7641 v6 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7642 v6.AuxInt = int64ToAuxInt(31)
7643 v5.AddArg2(v3, v6)
7644 v.AddArg2(v0, v5)
7645 return true
7646 }
7647 return false
7648 }
7649 func rewriteValuegeneric_OpDiv8u(v *Value) bool {
7650 v_1 := v.Args[1]
7651 v_0 := v.Args[0]
7652 b := v.Block
7653 typ := &b.Func.Config.Types
7654
7655
7656
7657 for {
7658 if v_0.Op != OpConst8 {
7659 break
7660 }
7661 c := auxIntToInt8(v_0.AuxInt)
7662 if v_1.Op != OpConst8 {
7663 break
7664 }
7665 d := auxIntToInt8(v_1.AuxInt)
7666 if !(d != 0) {
7667 break
7668 }
7669 v.reset(OpConst8)
7670 v.AuxInt = int8ToAuxInt(int8(uint8(c) / uint8(d)))
7671 return true
7672 }
7673
7674
7675
7676 for {
7677 n := v_0
7678 if v_1.Op != OpConst8 {
7679 break
7680 }
7681 c := auxIntToInt8(v_1.AuxInt)
7682 if !(isPowerOfTwo(c)) {
7683 break
7684 }
7685 v.reset(OpRsh8Ux64)
7686 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7687 v0.AuxInt = int64ToAuxInt(log8(c))
7688 v.AddArg2(n, v0)
7689 return true
7690 }
7691
7692
7693
7694 for {
7695 x := v_0
7696 if v_1.Op != OpConst8 {
7697 break
7698 }
7699 c := auxIntToInt8(v_1.AuxInt)
7700 if !(umagicOK8(c)) {
7701 break
7702 }
7703 v.reset(OpTrunc32to8)
7704 v0 := b.NewValue0(v.Pos, OpRsh32Ux64, typ.UInt32)
7705 v1 := b.NewValue0(v.Pos, OpMul32, typ.UInt32)
7706 v2 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
7707 v2.AuxInt = int32ToAuxInt(int32(1<<8 + umagic8(c).m))
7708 v3 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
7709 v3.AddArg(x)
7710 v1.AddArg2(v2, v3)
7711 v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7712 v4.AuxInt = int64ToAuxInt(8 + umagic8(c).s)
7713 v0.AddArg2(v1, v4)
7714 v.AddArg(v0)
7715 return true
7716 }
7717 return false
7718 }
7719 func rewriteValuegeneric_OpEq16(v *Value) bool {
7720 v_1 := v.Args[1]
7721 v_0 := v.Args[0]
7722 b := v.Block
7723 config := b.Func.Config
7724 typ := &b.Func.Config.Types
7725
7726
7727 for {
7728 x := v_0
7729 if x != v_1 {
7730 break
7731 }
7732 v.reset(OpConstBool)
7733 v.AuxInt = boolToAuxInt(true)
7734 return true
7735 }
7736
7737
7738 for {
7739 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
7740 if v_0.Op != OpConst16 {
7741 continue
7742 }
7743 t := v_0.Type
7744 c := auxIntToInt16(v_0.AuxInt)
7745 if v_1.Op != OpAdd16 {
7746 continue
7747 }
7748 _ = v_1.Args[1]
7749 v_1_0 := v_1.Args[0]
7750 v_1_1 := v_1.Args[1]
7751 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
7752 if v_1_0.Op != OpConst16 || v_1_0.Type != t {
7753 continue
7754 }
7755 d := auxIntToInt16(v_1_0.AuxInt)
7756 x := v_1_1
7757 v.reset(OpEq16)
7758 v0 := b.NewValue0(v.Pos, OpConst16, t)
7759 v0.AuxInt = int16ToAuxInt(c - d)
7760 v.AddArg2(v0, x)
7761 return true
7762 }
7763 }
7764 break
7765 }
7766
7767
7768 for {
7769 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
7770 if v_0.Op != OpConst16 {
7771 continue
7772 }
7773 c := auxIntToInt16(v_0.AuxInt)
7774 if v_1.Op != OpConst16 {
7775 continue
7776 }
7777 d := auxIntToInt16(v_1.AuxInt)
7778 v.reset(OpConstBool)
7779 v.AuxInt = boolToAuxInt(c == d)
7780 return true
7781 }
7782 break
7783 }
7784
7785
7786
7787 for {
7788 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
7789 if v_0.Op != OpMod16u {
7790 continue
7791 }
7792 _ = v_0.Args[1]
7793 x := v_0.Args[0]
7794 v_0_1 := v_0.Args[1]
7795 if v_0_1.Op != OpConst16 {
7796 continue
7797 }
7798 c := auxIntToInt16(v_0_1.AuxInt)
7799 if v_1.Op != OpConst16 || auxIntToInt16(v_1.AuxInt) != 0 || !(x.Op != OpConst16 && udivisibleOK16(c) && !hasSmallRotate(config)) {
7800 continue
7801 }
7802 v.reset(OpEq32)
7803 v0 := b.NewValue0(v.Pos, OpMod32u, typ.UInt32)
7804 v1 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
7805 v1.AddArg(x)
7806 v2 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
7807 v2.AuxInt = int32ToAuxInt(int32(uint16(c)))
7808 v0.AddArg2(v1, v2)
7809 v3 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
7810 v3.AuxInt = int32ToAuxInt(0)
7811 v.AddArg2(v0, v3)
7812 return true
7813 }
7814 break
7815 }
7816
7817
7818
7819 for {
7820 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
7821 if v_0.Op != OpMod16 {
7822 continue
7823 }
7824 _ = v_0.Args[1]
7825 x := v_0.Args[0]
7826 v_0_1 := v_0.Args[1]
7827 if v_0_1.Op != OpConst16 {
7828 continue
7829 }
7830 c := auxIntToInt16(v_0_1.AuxInt)
7831 if v_1.Op != OpConst16 || auxIntToInt16(v_1.AuxInt) != 0 || !(x.Op != OpConst16 && sdivisibleOK16(c) && !hasSmallRotate(config)) {
7832 continue
7833 }
7834 v.reset(OpEq32)
7835 v0 := b.NewValue0(v.Pos, OpMod32, typ.Int32)
7836 v1 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
7837 v1.AddArg(x)
7838 v2 := b.NewValue0(v.Pos, OpConst32, typ.Int32)
7839 v2.AuxInt = int32ToAuxInt(int32(c))
7840 v0.AddArg2(v1, v2)
7841 v3 := b.NewValue0(v.Pos, OpConst32, typ.Int32)
7842 v3.AuxInt = int32ToAuxInt(0)
7843 v.AddArg2(v0, v3)
7844 return true
7845 }
7846 break
7847 }
7848
7849
7850
7851 for {
7852 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
7853 x := v_0
7854 if v_1.Op != OpMul16 {
7855 continue
7856 }
7857 _ = v_1.Args[1]
7858 v_1_0 := v_1.Args[0]
7859 v_1_1 := v_1.Args[1]
7860 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
7861 if v_1_0.Op != OpConst16 {
7862 continue
7863 }
7864 c := auxIntToInt16(v_1_0.AuxInt)
7865 if v_1_1.Op != OpTrunc64to16 {
7866 continue
7867 }
7868 v_1_1_0 := v_1_1.Args[0]
7869 if v_1_1_0.Op != OpRsh64Ux64 {
7870 continue
7871 }
7872 _ = v_1_1_0.Args[1]
7873 mul := v_1_1_0.Args[0]
7874 if mul.Op != OpMul64 {
7875 continue
7876 }
7877 _ = mul.Args[1]
7878 mul_0 := mul.Args[0]
7879 mul_1 := mul.Args[1]
7880 for _i2 := 0; _i2 <= 1; _i2, mul_0, mul_1 = _i2+1, mul_1, mul_0 {
7881 if mul_0.Op != OpConst64 {
7882 continue
7883 }
7884 m := auxIntToInt64(mul_0.AuxInt)
7885 if mul_1.Op != OpZeroExt16to64 || x != mul_1.Args[0] {
7886 continue
7887 }
7888 v_1_1_0_1 := v_1_1_0.Args[1]
7889 if v_1_1_0_1.Op != OpConst64 {
7890 continue
7891 }
7892 s := auxIntToInt64(v_1_1_0_1.AuxInt)
7893 if !(v.Block.Func.pass.name != "opt" && mul.Uses == 1 && m == int64(1<<16+umagic16(c).m) && s == 16+umagic16(c).s && x.Op != OpConst16 && udivisibleOK16(c)) {
7894 continue
7895 }
7896 v.reset(OpLeq16U)
7897 v0 := b.NewValue0(v.Pos, OpRotateLeft16, typ.UInt16)
7898 v1 := b.NewValue0(v.Pos, OpMul16, typ.UInt16)
7899 v2 := b.NewValue0(v.Pos, OpConst16, typ.UInt16)
7900 v2.AuxInt = int16ToAuxInt(int16(udivisible16(c).m))
7901 v1.AddArg2(v2, x)
7902 v3 := b.NewValue0(v.Pos, OpConst16, typ.UInt16)
7903 v3.AuxInt = int16ToAuxInt(int16(16 - udivisible16(c).k))
7904 v0.AddArg2(v1, v3)
7905 v4 := b.NewValue0(v.Pos, OpConst16, typ.UInt16)
7906 v4.AuxInt = int16ToAuxInt(int16(udivisible16(c).max))
7907 v.AddArg2(v0, v4)
7908 return true
7909 }
7910 }
7911 }
7912 break
7913 }
7914
7915
7916
7917 for {
7918 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
7919 x := v_0
7920 if v_1.Op != OpMul16 {
7921 continue
7922 }
7923 _ = v_1.Args[1]
7924 v_1_0 := v_1.Args[0]
7925 v_1_1 := v_1.Args[1]
7926 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
7927 if v_1_0.Op != OpConst16 {
7928 continue
7929 }
7930 c := auxIntToInt16(v_1_0.AuxInt)
7931 if v_1_1.Op != OpTrunc32to16 {
7932 continue
7933 }
7934 v_1_1_0 := v_1_1.Args[0]
7935 if v_1_1_0.Op != OpRsh32Ux64 {
7936 continue
7937 }
7938 _ = v_1_1_0.Args[1]
7939 mul := v_1_1_0.Args[0]
7940 if mul.Op != OpMul32 {
7941 continue
7942 }
7943 _ = mul.Args[1]
7944 mul_0 := mul.Args[0]
7945 mul_1 := mul.Args[1]
7946 for _i2 := 0; _i2 <= 1; _i2, mul_0, mul_1 = _i2+1, mul_1, mul_0 {
7947 if mul_0.Op != OpConst32 {
7948 continue
7949 }
7950 m := auxIntToInt32(mul_0.AuxInt)
7951 if mul_1.Op != OpZeroExt16to32 || x != mul_1.Args[0] {
7952 continue
7953 }
7954 v_1_1_0_1 := v_1_1_0.Args[1]
7955 if v_1_1_0_1.Op != OpConst64 {
7956 continue
7957 }
7958 s := auxIntToInt64(v_1_1_0_1.AuxInt)
7959 if !(v.Block.Func.pass.name != "opt" && mul.Uses == 1 && m == int32(1<<15+umagic16(c).m/2) && s == 16+umagic16(c).s-1 && x.Op != OpConst16 && udivisibleOK16(c)) {
7960 continue
7961 }
7962 v.reset(OpLeq16U)
7963 v0 := b.NewValue0(v.Pos, OpRotateLeft16, typ.UInt16)
7964 v1 := b.NewValue0(v.Pos, OpMul16, typ.UInt16)
7965 v2 := b.NewValue0(v.Pos, OpConst16, typ.UInt16)
7966 v2.AuxInt = int16ToAuxInt(int16(udivisible16(c).m))
7967 v1.AddArg2(v2, x)
7968 v3 := b.NewValue0(v.Pos, OpConst16, typ.UInt16)
7969 v3.AuxInt = int16ToAuxInt(int16(16 - udivisible16(c).k))
7970 v0.AddArg2(v1, v3)
7971 v4 := b.NewValue0(v.Pos, OpConst16, typ.UInt16)
7972 v4.AuxInt = int16ToAuxInt(int16(udivisible16(c).max))
7973 v.AddArg2(v0, v4)
7974 return true
7975 }
7976 }
7977 }
7978 break
7979 }
7980
7981
7982
7983 for {
7984 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
7985 x := v_0
7986 if v_1.Op != OpMul16 {
7987 continue
7988 }
7989 _ = v_1.Args[1]
7990 v_1_0 := v_1.Args[0]
7991 v_1_1 := v_1.Args[1]
7992 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
7993 if v_1_0.Op != OpConst16 {
7994 continue
7995 }
7996 c := auxIntToInt16(v_1_0.AuxInt)
7997 if v_1_1.Op != OpTrunc32to16 {
7998 continue
7999 }
8000 v_1_1_0 := v_1_1.Args[0]
8001 if v_1_1_0.Op != OpRsh32Ux64 {
8002 continue
8003 }
8004 _ = v_1_1_0.Args[1]
8005 mul := v_1_1_0.Args[0]
8006 if mul.Op != OpMul32 {
8007 continue
8008 }
8009 _ = mul.Args[1]
8010 mul_0 := mul.Args[0]
8011 mul_1 := mul.Args[1]
8012 for _i2 := 0; _i2 <= 1; _i2, mul_0, mul_1 = _i2+1, mul_1, mul_0 {
8013 if mul_0.Op != OpConst32 {
8014 continue
8015 }
8016 m := auxIntToInt32(mul_0.AuxInt)
8017 if mul_1.Op != OpRsh32Ux64 {
8018 continue
8019 }
8020 _ = mul_1.Args[1]
8021 mul_1_0 := mul_1.Args[0]
8022 if mul_1_0.Op != OpZeroExt16to32 || x != mul_1_0.Args[0] {
8023 continue
8024 }
8025 mul_1_1 := mul_1.Args[1]
8026 if mul_1_1.Op != OpConst64 || auxIntToInt64(mul_1_1.AuxInt) != 1 {
8027 continue
8028 }
8029 v_1_1_0_1 := v_1_1_0.Args[1]
8030 if v_1_1_0_1.Op != OpConst64 {
8031 continue
8032 }
8033 s := auxIntToInt64(v_1_1_0_1.AuxInt)
8034 if !(v.Block.Func.pass.name != "opt" && mul.Uses == 1 && m == int32(1<<15+(umagic16(c).m+1)/2) && s == 16+umagic16(c).s-2 && x.Op != OpConst16 && udivisibleOK16(c)) {
8035 continue
8036 }
8037 v.reset(OpLeq16U)
8038 v0 := b.NewValue0(v.Pos, OpRotateLeft16, typ.UInt16)
8039 v1 := b.NewValue0(v.Pos, OpMul16, typ.UInt16)
8040 v2 := b.NewValue0(v.Pos, OpConst16, typ.UInt16)
8041 v2.AuxInt = int16ToAuxInt(int16(udivisible16(c).m))
8042 v1.AddArg2(v2, x)
8043 v3 := b.NewValue0(v.Pos, OpConst16, typ.UInt16)
8044 v3.AuxInt = int16ToAuxInt(int16(16 - udivisible16(c).k))
8045 v0.AddArg2(v1, v3)
8046 v4 := b.NewValue0(v.Pos, OpConst16, typ.UInt16)
8047 v4.AuxInt = int16ToAuxInt(int16(udivisible16(c).max))
8048 v.AddArg2(v0, v4)
8049 return true
8050 }
8051 }
8052 }
8053 break
8054 }
8055
8056
8057
8058 for {
8059 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
8060 x := v_0
8061 if v_1.Op != OpMul16 {
8062 continue
8063 }
8064 _ = v_1.Args[1]
8065 v_1_0 := v_1.Args[0]
8066 v_1_1 := v_1.Args[1]
8067 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
8068 if v_1_0.Op != OpConst16 {
8069 continue
8070 }
8071 c := auxIntToInt16(v_1_0.AuxInt)
8072 if v_1_1.Op != OpTrunc32to16 {
8073 continue
8074 }
8075 v_1_1_0 := v_1_1.Args[0]
8076 if v_1_1_0.Op != OpRsh32Ux64 {
8077 continue
8078 }
8079 _ = v_1_1_0.Args[1]
8080 v_1_1_0_0 := v_1_1_0.Args[0]
8081 if v_1_1_0_0.Op != OpAvg32u {
8082 continue
8083 }
8084 _ = v_1_1_0_0.Args[1]
8085 v_1_1_0_0_0 := v_1_1_0_0.Args[0]
8086 if v_1_1_0_0_0.Op != OpLsh32x64 {
8087 continue
8088 }
8089 _ = v_1_1_0_0_0.Args[1]
8090 v_1_1_0_0_0_0 := v_1_1_0_0_0.Args[0]
8091 if v_1_1_0_0_0_0.Op != OpZeroExt16to32 || x != v_1_1_0_0_0_0.Args[0] {
8092 continue
8093 }
8094 v_1_1_0_0_0_1 := v_1_1_0_0_0.Args[1]
8095 if v_1_1_0_0_0_1.Op != OpConst64 || auxIntToInt64(v_1_1_0_0_0_1.AuxInt) != 16 {
8096 continue
8097 }
8098 mul := v_1_1_0_0.Args[1]
8099 if mul.Op != OpMul32 {
8100 continue
8101 }
8102 _ = mul.Args[1]
8103 mul_0 := mul.Args[0]
8104 mul_1 := mul.Args[1]
8105 for _i2 := 0; _i2 <= 1; _i2, mul_0, mul_1 = _i2+1, mul_1, mul_0 {
8106 if mul_0.Op != OpConst32 {
8107 continue
8108 }
8109 m := auxIntToInt32(mul_0.AuxInt)
8110 if mul_1.Op != OpZeroExt16to32 || x != mul_1.Args[0] {
8111 continue
8112 }
8113 v_1_1_0_1 := v_1_1_0.Args[1]
8114 if v_1_1_0_1.Op != OpConst64 {
8115 continue
8116 }
8117 s := auxIntToInt64(v_1_1_0_1.AuxInt)
8118 if !(v.Block.Func.pass.name != "opt" && mul.Uses == 1 && m == int32(umagic16(c).m) && s == 16+umagic16(c).s-1 && x.Op != OpConst16 && udivisibleOK16(c)) {
8119 continue
8120 }
8121 v.reset(OpLeq16U)
8122 v0 := b.NewValue0(v.Pos, OpRotateLeft16, typ.UInt16)
8123 v1 := b.NewValue0(v.Pos, OpMul16, typ.UInt16)
8124 v2 := b.NewValue0(v.Pos, OpConst16, typ.UInt16)
8125 v2.AuxInt = int16ToAuxInt(int16(udivisible16(c).m))
8126 v1.AddArg2(v2, x)
8127 v3 := b.NewValue0(v.Pos, OpConst16, typ.UInt16)
8128 v3.AuxInt = int16ToAuxInt(int16(16 - udivisible16(c).k))
8129 v0.AddArg2(v1, v3)
8130 v4 := b.NewValue0(v.Pos, OpConst16, typ.UInt16)
8131 v4.AuxInt = int16ToAuxInt(int16(udivisible16(c).max))
8132 v.AddArg2(v0, v4)
8133 return true
8134 }
8135 }
8136 }
8137 break
8138 }
8139
8140
8141
8142 for {
8143 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
8144 x := v_0
8145 if v_1.Op != OpMul16 {
8146 continue
8147 }
8148 _ = v_1.Args[1]
8149 v_1_0 := v_1.Args[0]
8150 v_1_1 := v_1.Args[1]
8151 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
8152 if v_1_0.Op != OpConst16 {
8153 continue
8154 }
8155 c := auxIntToInt16(v_1_0.AuxInt)
8156 if v_1_1.Op != OpSub16 {
8157 continue
8158 }
8159 _ = v_1_1.Args[1]
8160 v_1_1_0 := v_1_1.Args[0]
8161 if v_1_1_0.Op != OpRsh32x64 {
8162 continue
8163 }
8164 _ = v_1_1_0.Args[1]
8165 mul := v_1_1_0.Args[0]
8166 if mul.Op != OpMul32 {
8167 continue
8168 }
8169 _ = mul.Args[1]
8170 mul_0 := mul.Args[0]
8171 mul_1 := mul.Args[1]
8172 for _i2 := 0; _i2 <= 1; _i2, mul_0, mul_1 = _i2+1, mul_1, mul_0 {
8173 if mul_0.Op != OpConst32 {
8174 continue
8175 }
8176 m := auxIntToInt32(mul_0.AuxInt)
8177 if mul_1.Op != OpSignExt16to32 || x != mul_1.Args[0] {
8178 continue
8179 }
8180 v_1_1_0_1 := v_1_1_0.Args[1]
8181 if v_1_1_0_1.Op != OpConst64 {
8182 continue
8183 }
8184 s := auxIntToInt64(v_1_1_0_1.AuxInt)
8185 v_1_1_1 := v_1_1.Args[1]
8186 if v_1_1_1.Op != OpRsh32x64 {
8187 continue
8188 }
8189 _ = v_1_1_1.Args[1]
8190 v_1_1_1_0 := v_1_1_1.Args[0]
8191 if v_1_1_1_0.Op != OpSignExt16to32 || x != v_1_1_1_0.Args[0] {
8192 continue
8193 }
8194 v_1_1_1_1 := v_1_1_1.Args[1]
8195 if v_1_1_1_1.Op != OpConst64 || auxIntToInt64(v_1_1_1_1.AuxInt) != 31 || !(v.Block.Func.pass.name != "opt" && mul.Uses == 1 && m == int32(smagic16(c).m) && s == 16+smagic16(c).s && x.Op != OpConst16 && sdivisibleOK16(c)) {
8196 continue
8197 }
8198 v.reset(OpLeq16U)
8199 v0 := b.NewValue0(v.Pos, OpRotateLeft16, typ.UInt16)
8200 v1 := b.NewValue0(v.Pos, OpAdd16, typ.UInt16)
8201 v2 := b.NewValue0(v.Pos, OpMul16, typ.UInt16)
8202 v3 := b.NewValue0(v.Pos, OpConst16, typ.UInt16)
8203 v3.AuxInt = int16ToAuxInt(int16(sdivisible16(c).m))
8204 v2.AddArg2(v3, x)
8205 v4 := b.NewValue0(v.Pos, OpConst16, typ.UInt16)
8206 v4.AuxInt = int16ToAuxInt(int16(sdivisible16(c).a))
8207 v1.AddArg2(v2, v4)
8208 v5 := b.NewValue0(v.Pos, OpConst16, typ.UInt16)
8209 v5.AuxInt = int16ToAuxInt(int16(16 - sdivisible16(c).k))
8210 v0.AddArg2(v1, v5)
8211 v6 := b.NewValue0(v.Pos, OpConst16, typ.UInt16)
8212 v6.AuxInt = int16ToAuxInt(int16(sdivisible16(c).max))
8213 v.AddArg2(v0, v6)
8214 return true
8215 }
8216 }
8217 }
8218 break
8219 }
8220
8221
8222
8223 for {
8224 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
8225 n := v_0
8226 if v_1.Op != OpLsh16x64 {
8227 continue
8228 }
8229 _ = v_1.Args[1]
8230 v_1_0 := v_1.Args[0]
8231 if v_1_0.Op != OpRsh16x64 {
8232 continue
8233 }
8234 _ = v_1_0.Args[1]
8235 v_1_0_0 := v_1_0.Args[0]
8236 if v_1_0_0.Op != OpAdd16 {
8237 continue
8238 }
8239 t := v_1_0_0.Type
8240 _ = v_1_0_0.Args[1]
8241 v_1_0_0_0 := v_1_0_0.Args[0]
8242 v_1_0_0_1 := v_1_0_0.Args[1]
8243 for _i1 := 0; _i1 <= 1; _i1, v_1_0_0_0, v_1_0_0_1 = _i1+1, v_1_0_0_1, v_1_0_0_0 {
8244 if n != v_1_0_0_0 || v_1_0_0_1.Op != OpRsh16Ux64 || v_1_0_0_1.Type != t {
8245 continue
8246 }
8247 _ = v_1_0_0_1.Args[1]
8248 v_1_0_0_1_0 := v_1_0_0_1.Args[0]
8249 if v_1_0_0_1_0.Op != OpRsh16x64 || v_1_0_0_1_0.Type != t {
8250 continue
8251 }
8252 _ = v_1_0_0_1_0.Args[1]
8253 if n != v_1_0_0_1_0.Args[0] {
8254 continue
8255 }
8256 v_1_0_0_1_0_1 := v_1_0_0_1_0.Args[1]
8257 if v_1_0_0_1_0_1.Op != OpConst64 || v_1_0_0_1_0_1.Type != typ.UInt64 || auxIntToInt64(v_1_0_0_1_0_1.AuxInt) != 15 {
8258 continue
8259 }
8260 v_1_0_0_1_1 := v_1_0_0_1.Args[1]
8261 if v_1_0_0_1_1.Op != OpConst64 || v_1_0_0_1_1.Type != typ.UInt64 {
8262 continue
8263 }
8264 kbar := auxIntToInt64(v_1_0_0_1_1.AuxInt)
8265 v_1_0_1 := v_1_0.Args[1]
8266 if v_1_0_1.Op != OpConst64 || v_1_0_1.Type != typ.UInt64 {
8267 continue
8268 }
8269 k := auxIntToInt64(v_1_0_1.AuxInt)
8270 v_1_1 := v_1.Args[1]
8271 if v_1_1.Op != OpConst64 || v_1_1.Type != typ.UInt64 || auxIntToInt64(v_1_1.AuxInt) != k || !(k > 0 && k < 15 && kbar == 16-k) {
8272 continue
8273 }
8274 v.reset(OpEq16)
8275 v0 := b.NewValue0(v.Pos, OpAnd16, t)
8276 v1 := b.NewValue0(v.Pos, OpConst16, t)
8277 v1.AuxInt = int16ToAuxInt(1<<uint(k) - 1)
8278 v0.AddArg2(n, v1)
8279 v2 := b.NewValue0(v.Pos, OpConst16, t)
8280 v2.AuxInt = int16ToAuxInt(0)
8281 v.AddArg2(v0, v2)
8282 return true
8283 }
8284 }
8285 break
8286 }
8287
8288
8289
8290 for {
8291 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
8292 s := v_0
8293 if s.Op != OpSub16 {
8294 continue
8295 }
8296 y := s.Args[1]
8297 x := s.Args[0]
8298 if v_1.Op != OpConst16 || auxIntToInt16(v_1.AuxInt) != 0 || !(s.Uses == 1) {
8299 continue
8300 }
8301 v.reset(OpEq16)
8302 v.AddArg2(x, y)
8303 return true
8304 }
8305 break
8306 }
8307
8308
8309
8310 for {
8311 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
8312 if v_0.Op != OpAnd16 {
8313 continue
8314 }
8315 t := v_0.Type
8316 _ = v_0.Args[1]
8317 v_0_0 := v_0.Args[0]
8318 v_0_1 := v_0.Args[1]
8319 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
8320 x := v_0_0
8321 if v_0_1.Op != OpConst16 || v_0_1.Type != t {
8322 continue
8323 }
8324 y := auxIntToInt16(v_0_1.AuxInt)
8325 if v_1.Op != OpConst16 || v_1.Type != t || auxIntToInt16(v_1.AuxInt) != y || !(oneBit16(y)) {
8326 continue
8327 }
8328 v.reset(OpNeq16)
8329 v0 := b.NewValue0(v.Pos, OpAnd16, t)
8330 v1 := b.NewValue0(v.Pos, OpConst16, t)
8331 v1.AuxInt = int16ToAuxInt(y)
8332 v0.AddArg2(x, v1)
8333 v2 := b.NewValue0(v.Pos, OpConst16, t)
8334 v2.AuxInt = int16ToAuxInt(0)
8335 v.AddArg2(v0, v2)
8336 return true
8337 }
8338 }
8339 break
8340 }
8341 return false
8342 }
8343 func rewriteValuegeneric_OpEq32(v *Value) bool {
8344 v_1 := v.Args[1]
8345 v_0 := v.Args[0]
8346 b := v.Block
8347 typ := &b.Func.Config.Types
8348
8349
8350 for {
8351 x := v_0
8352 if x != v_1 {
8353 break
8354 }
8355 v.reset(OpConstBool)
8356 v.AuxInt = boolToAuxInt(true)
8357 return true
8358 }
8359
8360
8361 for {
8362 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
8363 if v_0.Op != OpConst32 {
8364 continue
8365 }
8366 t := v_0.Type
8367 c := auxIntToInt32(v_0.AuxInt)
8368 if v_1.Op != OpAdd32 {
8369 continue
8370 }
8371 _ = v_1.Args[1]
8372 v_1_0 := v_1.Args[0]
8373 v_1_1 := v_1.Args[1]
8374 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
8375 if v_1_0.Op != OpConst32 || v_1_0.Type != t {
8376 continue
8377 }
8378 d := auxIntToInt32(v_1_0.AuxInt)
8379 x := v_1_1
8380 v.reset(OpEq32)
8381 v0 := b.NewValue0(v.Pos, OpConst32, t)
8382 v0.AuxInt = int32ToAuxInt(c - d)
8383 v.AddArg2(v0, x)
8384 return true
8385 }
8386 }
8387 break
8388 }
8389
8390
8391 for {
8392 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
8393 if v_0.Op != OpConst32 {
8394 continue
8395 }
8396 c := auxIntToInt32(v_0.AuxInt)
8397 if v_1.Op != OpConst32 {
8398 continue
8399 }
8400 d := auxIntToInt32(v_1.AuxInt)
8401 v.reset(OpConstBool)
8402 v.AuxInt = boolToAuxInt(c == d)
8403 return true
8404 }
8405 break
8406 }
8407
8408
8409
8410 for {
8411 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
8412 x := v_0
8413 if v_1.Op != OpMul32 {
8414 continue
8415 }
8416 _ = v_1.Args[1]
8417 v_1_0 := v_1.Args[0]
8418 v_1_1 := v_1.Args[1]
8419 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
8420 if v_1_0.Op != OpConst32 {
8421 continue
8422 }
8423 c := auxIntToInt32(v_1_0.AuxInt)
8424 if v_1_1.Op != OpRsh32Ux64 {
8425 continue
8426 }
8427 _ = v_1_1.Args[1]
8428 mul := v_1_1.Args[0]
8429 if mul.Op != OpHmul32u {
8430 continue
8431 }
8432 _ = mul.Args[1]
8433 mul_0 := mul.Args[0]
8434 mul_1 := mul.Args[1]
8435 for _i2 := 0; _i2 <= 1; _i2, mul_0, mul_1 = _i2+1, mul_1, mul_0 {
8436 if mul_0.Op != OpConst32 {
8437 continue
8438 }
8439 m := auxIntToInt32(mul_0.AuxInt)
8440 if x != mul_1 {
8441 continue
8442 }
8443 v_1_1_1 := v_1_1.Args[1]
8444 if v_1_1_1.Op != OpConst64 {
8445 continue
8446 }
8447 s := auxIntToInt64(v_1_1_1.AuxInt)
8448 if !(v.Block.Func.pass.name != "opt" && mul.Uses == 1 && m == int32(1<<31+umagic32(c).m/2) && s == umagic32(c).s-1 && x.Op != OpConst32 && udivisibleOK32(c)) {
8449 continue
8450 }
8451 v.reset(OpLeq32U)
8452 v0 := b.NewValue0(v.Pos, OpRotateLeft32, typ.UInt32)
8453 v1 := b.NewValue0(v.Pos, OpMul32, typ.UInt32)
8454 v2 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
8455 v2.AuxInt = int32ToAuxInt(int32(udivisible32(c).m))
8456 v1.AddArg2(v2, x)
8457 v3 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
8458 v3.AuxInt = int32ToAuxInt(int32(32 - udivisible32(c).k))
8459 v0.AddArg2(v1, v3)
8460 v4 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
8461 v4.AuxInt = int32ToAuxInt(int32(udivisible32(c).max))
8462 v.AddArg2(v0, v4)
8463 return true
8464 }
8465 }
8466 }
8467 break
8468 }
8469
8470
8471
8472 for {
8473 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
8474 x := v_0
8475 if v_1.Op != OpMul32 {
8476 continue
8477 }
8478 _ = v_1.Args[1]
8479 v_1_0 := v_1.Args[0]
8480 v_1_1 := v_1.Args[1]
8481 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
8482 if v_1_0.Op != OpConst32 {
8483 continue
8484 }
8485 c := auxIntToInt32(v_1_0.AuxInt)
8486 if v_1_1.Op != OpRsh32Ux64 {
8487 continue
8488 }
8489 _ = v_1_1.Args[1]
8490 mul := v_1_1.Args[0]
8491 if mul.Op != OpHmul32u {
8492 continue
8493 }
8494 _ = mul.Args[1]
8495 mul_0 := mul.Args[0]
8496 mul_1 := mul.Args[1]
8497 for _i2 := 0; _i2 <= 1; _i2, mul_0, mul_1 = _i2+1, mul_1, mul_0 {
8498 if mul_0.Op != OpConst32 || mul_0.Type != typ.UInt32 {
8499 continue
8500 }
8501 m := auxIntToInt32(mul_0.AuxInt)
8502 if mul_1.Op != OpRsh32Ux64 {
8503 continue
8504 }
8505 _ = mul_1.Args[1]
8506 if x != mul_1.Args[0] {
8507 continue
8508 }
8509 mul_1_1 := mul_1.Args[1]
8510 if mul_1_1.Op != OpConst64 || auxIntToInt64(mul_1_1.AuxInt) != 1 {
8511 continue
8512 }
8513 v_1_1_1 := v_1_1.Args[1]
8514 if v_1_1_1.Op != OpConst64 {
8515 continue
8516 }
8517 s := auxIntToInt64(v_1_1_1.AuxInt)
8518 if !(v.Block.Func.pass.name != "opt" && mul.Uses == 1 && m == int32(1<<31+(umagic32(c).m+1)/2) && s == umagic32(c).s-2 && x.Op != OpConst32 && udivisibleOK32(c)) {
8519 continue
8520 }
8521 v.reset(OpLeq32U)
8522 v0 := b.NewValue0(v.Pos, OpRotateLeft32, typ.UInt32)
8523 v1 := b.NewValue0(v.Pos, OpMul32, typ.UInt32)
8524 v2 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
8525 v2.AuxInt = int32ToAuxInt(int32(udivisible32(c).m))
8526 v1.AddArg2(v2, x)
8527 v3 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
8528 v3.AuxInt = int32ToAuxInt(int32(32 - udivisible32(c).k))
8529 v0.AddArg2(v1, v3)
8530 v4 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
8531 v4.AuxInt = int32ToAuxInt(int32(udivisible32(c).max))
8532 v.AddArg2(v0, v4)
8533 return true
8534 }
8535 }
8536 }
8537 break
8538 }
8539
8540
8541
8542 for {
8543 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
8544 x := v_0
8545 if v_1.Op != OpMul32 {
8546 continue
8547 }
8548 _ = v_1.Args[1]
8549 v_1_0 := v_1.Args[0]
8550 v_1_1 := v_1.Args[1]
8551 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
8552 if v_1_0.Op != OpConst32 {
8553 continue
8554 }
8555 c := auxIntToInt32(v_1_0.AuxInt)
8556 if v_1_1.Op != OpRsh32Ux64 {
8557 continue
8558 }
8559 _ = v_1_1.Args[1]
8560 v_1_1_0 := v_1_1.Args[0]
8561 if v_1_1_0.Op != OpAvg32u {
8562 continue
8563 }
8564 _ = v_1_1_0.Args[1]
8565 if x != v_1_1_0.Args[0] {
8566 continue
8567 }
8568 mul := v_1_1_0.Args[1]
8569 if mul.Op != OpHmul32u {
8570 continue
8571 }
8572 _ = mul.Args[1]
8573 mul_0 := mul.Args[0]
8574 mul_1 := mul.Args[1]
8575 for _i2 := 0; _i2 <= 1; _i2, mul_0, mul_1 = _i2+1, mul_1, mul_0 {
8576 if mul_0.Op != OpConst32 {
8577 continue
8578 }
8579 m := auxIntToInt32(mul_0.AuxInt)
8580 if x != mul_1 {
8581 continue
8582 }
8583 v_1_1_1 := v_1_1.Args[1]
8584 if v_1_1_1.Op != OpConst64 {
8585 continue
8586 }
8587 s := auxIntToInt64(v_1_1_1.AuxInt)
8588 if !(v.Block.Func.pass.name != "opt" && mul.Uses == 1 && m == int32(umagic32(c).m) && s == umagic32(c).s-1 && x.Op != OpConst32 && udivisibleOK32(c)) {
8589 continue
8590 }
8591 v.reset(OpLeq32U)
8592 v0 := b.NewValue0(v.Pos, OpRotateLeft32, typ.UInt32)
8593 v1 := b.NewValue0(v.Pos, OpMul32, typ.UInt32)
8594 v2 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
8595 v2.AuxInt = int32ToAuxInt(int32(udivisible32(c).m))
8596 v1.AddArg2(v2, x)
8597 v3 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
8598 v3.AuxInt = int32ToAuxInt(int32(32 - udivisible32(c).k))
8599 v0.AddArg2(v1, v3)
8600 v4 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
8601 v4.AuxInt = int32ToAuxInt(int32(udivisible32(c).max))
8602 v.AddArg2(v0, v4)
8603 return true
8604 }
8605 }
8606 }
8607 break
8608 }
8609
8610
8611
8612 for {
8613 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
8614 x := v_0
8615 if v_1.Op != OpMul32 {
8616 continue
8617 }
8618 _ = v_1.Args[1]
8619 v_1_0 := v_1.Args[0]
8620 v_1_1 := v_1.Args[1]
8621 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
8622 if v_1_0.Op != OpConst32 {
8623 continue
8624 }
8625 c := auxIntToInt32(v_1_0.AuxInt)
8626 if v_1_1.Op != OpTrunc64to32 {
8627 continue
8628 }
8629 v_1_1_0 := v_1_1.Args[0]
8630 if v_1_1_0.Op != OpRsh64Ux64 {
8631 continue
8632 }
8633 _ = v_1_1_0.Args[1]
8634 mul := v_1_1_0.Args[0]
8635 if mul.Op != OpMul64 {
8636 continue
8637 }
8638 _ = mul.Args[1]
8639 mul_0 := mul.Args[0]
8640 mul_1 := mul.Args[1]
8641 for _i2 := 0; _i2 <= 1; _i2, mul_0, mul_1 = _i2+1, mul_1, mul_0 {
8642 if mul_0.Op != OpConst64 {
8643 continue
8644 }
8645 m := auxIntToInt64(mul_0.AuxInt)
8646 if mul_1.Op != OpZeroExt32to64 || x != mul_1.Args[0] {
8647 continue
8648 }
8649 v_1_1_0_1 := v_1_1_0.Args[1]
8650 if v_1_1_0_1.Op != OpConst64 {
8651 continue
8652 }
8653 s := auxIntToInt64(v_1_1_0_1.AuxInt)
8654 if !(v.Block.Func.pass.name != "opt" && mul.Uses == 1 && m == int64(1<<31+umagic32(c).m/2) && s == 32+umagic32(c).s-1 && x.Op != OpConst32 && udivisibleOK32(c)) {
8655 continue
8656 }
8657 v.reset(OpLeq32U)
8658 v0 := b.NewValue0(v.Pos, OpRotateLeft32, typ.UInt32)
8659 v1 := b.NewValue0(v.Pos, OpMul32, typ.UInt32)
8660 v2 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
8661 v2.AuxInt = int32ToAuxInt(int32(udivisible32(c).m))
8662 v1.AddArg2(v2, x)
8663 v3 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
8664 v3.AuxInt = int32ToAuxInt(int32(32 - udivisible32(c).k))
8665 v0.AddArg2(v1, v3)
8666 v4 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
8667 v4.AuxInt = int32ToAuxInt(int32(udivisible32(c).max))
8668 v.AddArg2(v0, v4)
8669 return true
8670 }
8671 }
8672 }
8673 break
8674 }
8675
8676
8677
8678 for {
8679 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
8680 x := v_0
8681 if v_1.Op != OpMul32 {
8682 continue
8683 }
8684 _ = v_1.Args[1]
8685 v_1_0 := v_1.Args[0]
8686 v_1_1 := v_1.Args[1]
8687 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
8688 if v_1_0.Op != OpConst32 {
8689 continue
8690 }
8691 c := auxIntToInt32(v_1_0.AuxInt)
8692 if v_1_1.Op != OpTrunc64to32 {
8693 continue
8694 }
8695 v_1_1_0 := v_1_1.Args[0]
8696 if v_1_1_0.Op != OpRsh64Ux64 {
8697 continue
8698 }
8699 _ = v_1_1_0.Args[1]
8700 mul := v_1_1_0.Args[0]
8701 if mul.Op != OpMul64 {
8702 continue
8703 }
8704 _ = mul.Args[1]
8705 mul_0 := mul.Args[0]
8706 mul_1 := mul.Args[1]
8707 for _i2 := 0; _i2 <= 1; _i2, mul_0, mul_1 = _i2+1, mul_1, mul_0 {
8708 if mul_0.Op != OpConst64 {
8709 continue
8710 }
8711 m := auxIntToInt64(mul_0.AuxInt)
8712 if mul_1.Op != OpRsh64Ux64 {
8713 continue
8714 }
8715 _ = mul_1.Args[1]
8716 mul_1_0 := mul_1.Args[0]
8717 if mul_1_0.Op != OpZeroExt32to64 || x != mul_1_0.Args[0] {
8718 continue
8719 }
8720 mul_1_1 := mul_1.Args[1]
8721 if mul_1_1.Op != OpConst64 || auxIntToInt64(mul_1_1.AuxInt) != 1 {
8722 continue
8723 }
8724 v_1_1_0_1 := v_1_1_0.Args[1]
8725 if v_1_1_0_1.Op != OpConst64 {
8726 continue
8727 }
8728 s := auxIntToInt64(v_1_1_0_1.AuxInt)
8729 if !(v.Block.Func.pass.name != "opt" && mul.Uses == 1 && m == int64(1<<31+(umagic32(c).m+1)/2) && s == 32+umagic32(c).s-2 && x.Op != OpConst32 && udivisibleOK32(c)) {
8730 continue
8731 }
8732 v.reset(OpLeq32U)
8733 v0 := b.NewValue0(v.Pos, OpRotateLeft32, typ.UInt32)
8734 v1 := b.NewValue0(v.Pos, OpMul32, typ.UInt32)
8735 v2 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
8736 v2.AuxInt = int32ToAuxInt(int32(udivisible32(c).m))
8737 v1.AddArg2(v2, x)
8738 v3 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
8739 v3.AuxInt = int32ToAuxInt(int32(32 - udivisible32(c).k))
8740 v0.AddArg2(v1, v3)
8741 v4 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
8742 v4.AuxInt = int32ToAuxInt(int32(udivisible32(c).max))
8743 v.AddArg2(v0, v4)
8744 return true
8745 }
8746 }
8747 }
8748 break
8749 }
8750
8751
8752
8753 for {
8754 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
8755 x := v_0
8756 if v_1.Op != OpMul32 {
8757 continue
8758 }
8759 _ = v_1.Args[1]
8760 v_1_0 := v_1.Args[0]
8761 v_1_1 := v_1.Args[1]
8762 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
8763 if v_1_0.Op != OpConst32 {
8764 continue
8765 }
8766 c := auxIntToInt32(v_1_0.AuxInt)
8767 if v_1_1.Op != OpTrunc64to32 {
8768 continue
8769 }
8770 v_1_1_0 := v_1_1.Args[0]
8771 if v_1_1_0.Op != OpRsh64Ux64 {
8772 continue
8773 }
8774 _ = v_1_1_0.Args[1]
8775 v_1_1_0_0 := v_1_1_0.Args[0]
8776 if v_1_1_0_0.Op != OpAvg64u {
8777 continue
8778 }
8779 _ = v_1_1_0_0.Args[1]
8780 v_1_1_0_0_0 := v_1_1_0_0.Args[0]
8781 if v_1_1_0_0_0.Op != OpLsh64x64 {
8782 continue
8783 }
8784 _ = v_1_1_0_0_0.Args[1]
8785 v_1_1_0_0_0_0 := v_1_1_0_0_0.Args[0]
8786 if v_1_1_0_0_0_0.Op != OpZeroExt32to64 || x != v_1_1_0_0_0_0.Args[0] {
8787 continue
8788 }
8789 v_1_1_0_0_0_1 := v_1_1_0_0_0.Args[1]
8790 if v_1_1_0_0_0_1.Op != OpConst64 || auxIntToInt64(v_1_1_0_0_0_1.AuxInt) != 32 {
8791 continue
8792 }
8793 mul := v_1_1_0_0.Args[1]
8794 if mul.Op != OpMul64 {
8795 continue
8796 }
8797 _ = mul.Args[1]
8798 mul_0 := mul.Args[0]
8799 mul_1 := mul.Args[1]
8800 for _i2 := 0; _i2 <= 1; _i2, mul_0, mul_1 = _i2+1, mul_1, mul_0 {
8801 if mul_0.Op != OpConst64 {
8802 continue
8803 }
8804 m := auxIntToInt64(mul_0.AuxInt)
8805 if mul_1.Op != OpZeroExt32to64 || x != mul_1.Args[0] {
8806 continue
8807 }
8808 v_1_1_0_1 := v_1_1_0.Args[1]
8809 if v_1_1_0_1.Op != OpConst64 {
8810 continue
8811 }
8812 s := auxIntToInt64(v_1_1_0_1.AuxInt)
8813 if !(v.Block.Func.pass.name != "opt" && mul.Uses == 1 && m == int64(umagic32(c).m) && s == 32+umagic32(c).s-1 && x.Op != OpConst32 && udivisibleOK32(c)) {
8814 continue
8815 }
8816 v.reset(OpLeq32U)
8817 v0 := b.NewValue0(v.Pos, OpRotateLeft32, typ.UInt32)
8818 v1 := b.NewValue0(v.Pos, OpMul32, typ.UInt32)
8819 v2 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
8820 v2.AuxInt = int32ToAuxInt(int32(udivisible32(c).m))
8821 v1.AddArg2(v2, x)
8822 v3 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
8823 v3.AuxInt = int32ToAuxInt(int32(32 - udivisible32(c).k))
8824 v0.AddArg2(v1, v3)
8825 v4 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
8826 v4.AuxInt = int32ToAuxInt(int32(udivisible32(c).max))
8827 v.AddArg2(v0, v4)
8828 return true
8829 }
8830 }
8831 }
8832 break
8833 }
8834
8835
8836
8837 for {
8838 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
8839 x := v_0
8840 if v_1.Op != OpMul32 {
8841 continue
8842 }
8843 _ = v_1.Args[1]
8844 v_1_0 := v_1.Args[0]
8845 v_1_1 := v_1.Args[1]
8846 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
8847 if v_1_0.Op != OpConst32 {
8848 continue
8849 }
8850 c := auxIntToInt32(v_1_0.AuxInt)
8851 if v_1_1.Op != OpSub32 {
8852 continue
8853 }
8854 _ = v_1_1.Args[1]
8855 v_1_1_0 := v_1_1.Args[0]
8856 if v_1_1_0.Op != OpRsh64x64 {
8857 continue
8858 }
8859 _ = v_1_1_0.Args[1]
8860 mul := v_1_1_0.Args[0]
8861 if mul.Op != OpMul64 {
8862 continue
8863 }
8864 _ = mul.Args[1]
8865 mul_0 := mul.Args[0]
8866 mul_1 := mul.Args[1]
8867 for _i2 := 0; _i2 <= 1; _i2, mul_0, mul_1 = _i2+1, mul_1, mul_0 {
8868 if mul_0.Op != OpConst64 {
8869 continue
8870 }
8871 m := auxIntToInt64(mul_0.AuxInt)
8872 if mul_1.Op != OpSignExt32to64 || x != mul_1.Args[0] {
8873 continue
8874 }
8875 v_1_1_0_1 := v_1_1_0.Args[1]
8876 if v_1_1_0_1.Op != OpConst64 {
8877 continue
8878 }
8879 s := auxIntToInt64(v_1_1_0_1.AuxInt)
8880 v_1_1_1 := v_1_1.Args[1]
8881 if v_1_1_1.Op != OpRsh64x64 {
8882 continue
8883 }
8884 _ = v_1_1_1.Args[1]
8885 v_1_1_1_0 := v_1_1_1.Args[0]
8886 if v_1_1_1_0.Op != OpSignExt32to64 || x != v_1_1_1_0.Args[0] {
8887 continue
8888 }
8889 v_1_1_1_1 := v_1_1_1.Args[1]
8890 if v_1_1_1_1.Op != OpConst64 || auxIntToInt64(v_1_1_1_1.AuxInt) != 63 || !(v.Block.Func.pass.name != "opt" && mul.Uses == 1 && m == int64(smagic32(c).m) && s == 32+smagic32(c).s && x.Op != OpConst32 && sdivisibleOK32(c)) {
8891 continue
8892 }
8893 v.reset(OpLeq32U)
8894 v0 := b.NewValue0(v.Pos, OpRotateLeft32, typ.UInt32)
8895 v1 := b.NewValue0(v.Pos, OpAdd32, typ.UInt32)
8896 v2 := b.NewValue0(v.Pos, OpMul32, typ.UInt32)
8897 v3 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
8898 v3.AuxInt = int32ToAuxInt(int32(sdivisible32(c).m))
8899 v2.AddArg2(v3, x)
8900 v4 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
8901 v4.AuxInt = int32ToAuxInt(int32(sdivisible32(c).a))
8902 v1.AddArg2(v2, v4)
8903 v5 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
8904 v5.AuxInt = int32ToAuxInt(int32(32 - sdivisible32(c).k))
8905 v0.AddArg2(v1, v5)
8906 v6 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
8907 v6.AuxInt = int32ToAuxInt(int32(sdivisible32(c).max))
8908 v.AddArg2(v0, v6)
8909 return true
8910 }
8911 }
8912 }
8913 break
8914 }
8915
8916
8917
8918 for {
8919 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
8920 x := v_0
8921 if v_1.Op != OpMul32 {
8922 continue
8923 }
8924 _ = v_1.Args[1]
8925 v_1_0 := v_1.Args[0]
8926 v_1_1 := v_1.Args[1]
8927 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
8928 if v_1_0.Op != OpConst32 {
8929 continue
8930 }
8931 c := auxIntToInt32(v_1_0.AuxInt)
8932 if v_1_1.Op != OpSub32 {
8933 continue
8934 }
8935 _ = v_1_1.Args[1]
8936 v_1_1_0 := v_1_1.Args[0]
8937 if v_1_1_0.Op != OpRsh32x64 {
8938 continue
8939 }
8940 _ = v_1_1_0.Args[1]
8941 mul := v_1_1_0.Args[0]
8942 if mul.Op != OpHmul32 {
8943 continue
8944 }
8945 _ = mul.Args[1]
8946 mul_0 := mul.Args[0]
8947 mul_1 := mul.Args[1]
8948 for _i2 := 0; _i2 <= 1; _i2, mul_0, mul_1 = _i2+1, mul_1, mul_0 {
8949 if mul_0.Op != OpConst32 {
8950 continue
8951 }
8952 m := auxIntToInt32(mul_0.AuxInt)
8953 if x != mul_1 {
8954 continue
8955 }
8956 v_1_1_0_1 := v_1_1_0.Args[1]
8957 if v_1_1_0_1.Op != OpConst64 {
8958 continue
8959 }
8960 s := auxIntToInt64(v_1_1_0_1.AuxInt)
8961 v_1_1_1 := v_1_1.Args[1]
8962 if v_1_1_1.Op != OpRsh32x64 {
8963 continue
8964 }
8965 _ = v_1_1_1.Args[1]
8966 if x != v_1_1_1.Args[0] {
8967 continue
8968 }
8969 v_1_1_1_1 := v_1_1_1.Args[1]
8970 if v_1_1_1_1.Op != OpConst64 || auxIntToInt64(v_1_1_1_1.AuxInt) != 31 || !(v.Block.Func.pass.name != "opt" && mul.Uses == 1 && m == int32(smagic32(c).m/2) && s == smagic32(c).s-1 && x.Op != OpConst32 && sdivisibleOK32(c)) {
8971 continue
8972 }
8973 v.reset(OpLeq32U)
8974 v0 := b.NewValue0(v.Pos, OpRotateLeft32, typ.UInt32)
8975 v1 := b.NewValue0(v.Pos, OpAdd32, typ.UInt32)
8976 v2 := b.NewValue0(v.Pos, OpMul32, typ.UInt32)
8977 v3 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
8978 v3.AuxInt = int32ToAuxInt(int32(sdivisible32(c).m))
8979 v2.AddArg2(v3, x)
8980 v4 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
8981 v4.AuxInt = int32ToAuxInt(int32(sdivisible32(c).a))
8982 v1.AddArg2(v2, v4)
8983 v5 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
8984 v5.AuxInt = int32ToAuxInt(int32(32 - sdivisible32(c).k))
8985 v0.AddArg2(v1, v5)
8986 v6 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
8987 v6.AuxInt = int32ToAuxInt(int32(sdivisible32(c).max))
8988 v.AddArg2(v0, v6)
8989 return true
8990 }
8991 }
8992 }
8993 break
8994 }
8995
8996
8997
8998 for {
8999 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
9000 x := v_0
9001 if v_1.Op != OpMul32 {
9002 continue
9003 }
9004 _ = v_1.Args[1]
9005 v_1_0 := v_1.Args[0]
9006 v_1_1 := v_1.Args[1]
9007 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
9008 if v_1_0.Op != OpConst32 {
9009 continue
9010 }
9011 c := auxIntToInt32(v_1_0.AuxInt)
9012 if v_1_1.Op != OpSub32 {
9013 continue
9014 }
9015 _ = v_1_1.Args[1]
9016 v_1_1_0 := v_1_1.Args[0]
9017 if v_1_1_0.Op != OpRsh32x64 {
9018 continue
9019 }
9020 _ = v_1_1_0.Args[1]
9021 v_1_1_0_0 := v_1_1_0.Args[0]
9022 if v_1_1_0_0.Op != OpAdd32 {
9023 continue
9024 }
9025 _ = v_1_1_0_0.Args[1]
9026 v_1_1_0_0_0 := v_1_1_0_0.Args[0]
9027 v_1_1_0_0_1 := v_1_1_0_0.Args[1]
9028 for _i2 := 0; _i2 <= 1; _i2, v_1_1_0_0_0, v_1_1_0_0_1 = _i2+1, v_1_1_0_0_1, v_1_1_0_0_0 {
9029 mul := v_1_1_0_0_0
9030 if mul.Op != OpHmul32 {
9031 continue
9032 }
9033 _ = mul.Args[1]
9034 mul_0 := mul.Args[0]
9035 mul_1 := mul.Args[1]
9036 for _i3 := 0; _i3 <= 1; _i3, mul_0, mul_1 = _i3+1, mul_1, mul_0 {
9037 if mul_0.Op != OpConst32 {
9038 continue
9039 }
9040 m := auxIntToInt32(mul_0.AuxInt)
9041 if x != mul_1 || x != v_1_1_0_0_1 {
9042 continue
9043 }
9044 v_1_1_0_1 := v_1_1_0.Args[1]
9045 if v_1_1_0_1.Op != OpConst64 {
9046 continue
9047 }
9048 s := auxIntToInt64(v_1_1_0_1.AuxInt)
9049 v_1_1_1 := v_1_1.Args[1]
9050 if v_1_1_1.Op != OpRsh32x64 {
9051 continue
9052 }
9053 _ = v_1_1_1.Args[1]
9054 if x != v_1_1_1.Args[0] {
9055 continue
9056 }
9057 v_1_1_1_1 := v_1_1_1.Args[1]
9058 if v_1_1_1_1.Op != OpConst64 || auxIntToInt64(v_1_1_1_1.AuxInt) != 31 || !(v.Block.Func.pass.name != "opt" && mul.Uses == 1 && m == int32(smagic32(c).m) && s == smagic32(c).s && x.Op != OpConst32 && sdivisibleOK32(c)) {
9059 continue
9060 }
9061 v.reset(OpLeq32U)
9062 v0 := b.NewValue0(v.Pos, OpRotateLeft32, typ.UInt32)
9063 v1 := b.NewValue0(v.Pos, OpAdd32, typ.UInt32)
9064 v2 := b.NewValue0(v.Pos, OpMul32, typ.UInt32)
9065 v3 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
9066 v3.AuxInt = int32ToAuxInt(int32(sdivisible32(c).m))
9067 v2.AddArg2(v3, x)
9068 v4 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
9069 v4.AuxInt = int32ToAuxInt(int32(sdivisible32(c).a))
9070 v1.AddArg2(v2, v4)
9071 v5 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
9072 v5.AuxInt = int32ToAuxInt(int32(32 - sdivisible32(c).k))
9073 v0.AddArg2(v1, v5)
9074 v6 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
9075 v6.AuxInt = int32ToAuxInt(int32(sdivisible32(c).max))
9076 v.AddArg2(v0, v6)
9077 return true
9078 }
9079 }
9080 }
9081 }
9082 break
9083 }
9084
9085
9086
9087 for {
9088 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
9089 n := v_0
9090 if v_1.Op != OpLsh32x64 {
9091 continue
9092 }
9093 _ = v_1.Args[1]
9094 v_1_0 := v_1.Args[0]
9095 if v_1_0.Op != OpRsh32x64 {
9096 continue
9097 }
9098 _ = v_1_0.Args[1]
9099 v_1_0_0 := v_1_0.Args[0]
9100 if v_1_0_0.Op != OpAdd32 {
9101 continue
9102 }
9103 t := v_1_0_0.Type
9104 _ = v_1_0_0.Args[1]
9105 v_1_0_0_0 := v_1_0_0.Args[0]
9106 v_1_0_0_1 := v_1_0_0.Args[1]
9107 for _i1 := 0; _i1 <= 1; _i1, v_1_0_0_0, v_1_0_0_1 = _i1+1, v_1_0_0_1, v_1_0_0_0 {
9108 if n != v_1_0_0_0 || v_1_0_0_1.Op != OpRsh32Ux64 || v_1_0_0_1.Type != t {
9109 continue
9110 }
9111 _ = v_1_0_0_1.Args[1]
9112 v_1_0_0_1_0 := v_1_0_0_1.Args[0]
9113 if v_1_0_0_1_0.Op != OpRsh32x64 || v_1_0_0_1_0.Type != t {
9114 continue
9115 }
9116 _ = v_1_0_0_1_0.Args[1]
9117 if n != v_1_0_0_1_0.Args[0] {
9118 continue
9119 }
9120 v_1_0_0_1_0_1 := v_1_0_0_1_0.Args[1]
9121 if v_1_0_0_1_0_1.Op != OpConst64 || v_1_0_0_1_0_1.Type != typ.UInt64 || auxIntToInt64(v_1_0_0_1_0_1.AuxInt) != 31 {
9122 continue
9123 }
9124 v_1_0_0_1_1 := v_1_0_0_1.Args[1]
9125 if v_1_0_0_1_1.Op != OpConst64 || v_1_0_0_1_1.Type != typ.UInt64 {
9126 continue
9127 }
9128 kbar := auxIntToInt64(v_1_0_0_1_1.AuxInt)
9129 v_1_0_1 := v_1_0.Args[1]
9130 if v_1_0_1.Op != OpConst64 || v_1_0_1.Type != typ.UInt64 {
9131 continue
9132 }
9133 k := auxIntToInt64(v_1_0_1.AuxInt)
9134 v_1_1 := v_1.Args[1]
9135 if v_1_1.Op != OpConst64 || v_1_1.Type != typ.UInt64 || auxIntToInt64(v_1_1.AuxInt) != k || !(k > 0 && k < 31 && kbar == 32-k) {
9136 continue
9137 }
9138 v.reset(OpEq32)
9139 v0 := b.NewValue0(v.Pos, OpAnd32, t)
9140 v1 := b.NewValue0(v.Pos, OpConst32, t)
9141 v1.AuxInt = int32ToAuxInt(1<<uint(k) - 1)
9142 v0.AddArg2(n, v1)
9143 v2 := b.NewValue0(v.Pos, OpConst32, t)
9144 v2.AuxInt = int32ToAuxInt(0)
9145 v.AddArg2(v0, v2)
9146 return true
9147 }
9148 }
9149 break
9150 }
9151
9152
9153
9154 for {
9155 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
9156 s := v_0
9157 if s.Op != OpSub32 {
9158 continue
9159 }
9160 y := s.Args[1]
9161 x := s.Args[0]
9162 if v_1.Op != OpConst32 || auxIntToInt32(v_1.AuxInt) != 0 || !(s.Uses == 1) {
9163 continue
9164 }
9165 v.reset(OpEq32)
9166 v.AddArg2(x, y)
9167 return true
9168 }
9169 break
9170 }
9171
9172
9173
9174 for {
9175 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
9176 if v_0.Op != OpAnd32 {
9177 continue
9178 }
9179 t := v_0.Type
9180 _ = v_0.Args[1]
9181 v_0_0 := v_0.Args[0]
9182 v_0_1 := v_0.Args[1]
9183 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
9184 x := v_0_0
9185 if v_0_1.Op != OpConst32 || v_0_1.Type != t {
9186 continue
9187 }
9188 y := auxIntToInt32(v_0_1.AuxInt)
9189 if v_1.Op != OpConst32 || v_1.Type != t || auxIntToInt32(v_1.AuxInt) != y || !(oneBit32(y)) {
9190 continue
9191 }
9192 v.reset(OpNeq32)
9193 v0 := b.NewValue0(v.Pos, OpAnd32, t)
9194 v1 := b.NewValue0(v.Pos, OpConst32, t)
9195 v1.AuxInt = int32ToAuxInt(y)
9196 v0.AddArg2(x, v1)
9197 v2 := b.NewValue0(v.Pos, OpConst32, t)
9198 v2.AuxInt = int32ToAuxInt(0)
9199 v.AddArg2(v0, v2)
9200 return true
9201 }
9202 }
9203 break
9204 }
9205 return false
9206 }
9207 func rewriteValuegeneric_OpEq32F(v *Value) bool {
9208 v_1 := v.Args[1]
9209 v_0 := v.Args[0]
9210
9211
9212 for {
9213 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
9214 if v_0.Op != OpConst32F {
9215 continue
9216 }
9217 c := auxIntToFloat32(v_0.AuxInt)
9218 if v_1.Op != OpConst32F {
9219 continue
9220 }
9221 d := auxIntToFloat32(v_1.AuxInt)
9222 v.reset(OpConstBool)
9223 v.AuxInt = boolToAuxInt(c == d)
9224 return true
9225 }
9226 break
9227 }
9228 return false
9229 }
9230 func rewriteValuegeneric_OpEq64(v *Value) bool {
9231 v_1 := v.Args[1]
9232 v_0 := v.Args[0]
9233 b := v.Block
9234 typ := &b.Func.Config.Types
9235
9236
9237 for {
9238 x := v_0
9239 if x != v_1 {
9240 break
9241 }
9242 v.reset(OpConstBool)
9243 v.AuxInt = boolToAuxInt(true)
9244 return true
9245 }
9246
9247
9248 for {
9249 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
9250 if v_0.Op != OpConst64 {
9251 continue
9252 }
9253 t := v_0.Type
9254 c := auxIntToInt64(v_0.AuxInt)
9255 if v_1.Op != OpAdd64 {
9256 continue
9257 }
9258 _ = v_1.Args[1]
9259 v_1_0 := v_1.Args[0]
9260 v_1_1 := v_1.Args[1]
9261 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
9262 if v_1_0.Op != OpConst64 || v_1_0.Type != t {
9263 continue
9264 }
9265 d := auxIntToInt64(v_1_0.AuxInt)
9266 x := v_1_1
9267 v.reset(OpEq64)
9268 v0 := b.NewValue0(v.Pos, OpConst64, t)
9269 v0.AuxInt = int64ToAuxInt(c - d)
9270 v.AddArg2(v0, x)
9271 return true
9272 }
9273 }
9274 break
9275 }
9276
9277
9278 for {
9279 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
9280 if v_0.Op != OpConst64 {
9281 continue
9282 }
9283 c := auxIntToInt64(v_0.AuxInt)
9284 if v_1.Op != OpConst64 {
9285 continue
9286 }
9287 d := auxIntToInt64(v_1.AuxInt)
9288 v.reset(OpConstBool)
9289 v.AuxInt = boolToAuxInt(c == d)
9290 return true
9291 }
9292 break
9293 }
9294
9295
9296
9297 for {
9298 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
9299 x := v_0
9300 if v_1.Op != OpMul64 {
9301 continue
9302 }
9303 _ = v_1.Args[1]
9304 v_1_0 := v_1.Args[0]
9305 v_1_1 := v_1.Args[1]
9306 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
9307 if v_1_0.Op != OpConst64 {
9308 continue
9309 }
9310 c := auxIntToInt64(v_1_0.AuxInt)
9311 if v_1_1.Op != OpRsh64Ux64 {
9312 continue
9313 }
9314 _ = v_1_1.Args[1]
9315 mul := v_1_1.Args[0]
9316 if mul.Op != OpHmul64u {
9317 continue
9318 }
9319 _ = mul.Args[1]
9320 mul_0 := mul.Args[0]
9321 mul_1 := mul.Args[1]
9322 for _i2 := 0; _i2 <= 1; _i2, mul_0, mul_1 = _i2+1, mul_1, mul_0 {
9323 if mul_0.Op != OpConst64 {
9324 continue
9325 }
9326 m := auxIntToInt64(mul_0.AuxInt)
9327 if x != mul_1 {
9328 continue
9329 }
9330 v_1_1_1 := v_1_1.Args[1]
9331 if v_1_1_1.Op != OpConst64 {
9332 continue
9333 }
9334 s := auxIntToInt64(v_1_1_1.AuxInt)
9335 if !(v.Block.Func.pass.name != "opt" && mul.Uses == 1 && m == int64(1<<63+umagic64(c).m/2) && s == umagic64(c).s-1 && x.Op != OpConst64 && udivisibleOK64(c)) {
9336 continue
9337 }
9338 v.reset(OpLeq64U)
9339 v0 := b.NewValue0(v.Pos, OpRotateLeft64, typ.UInt64)
9340 v1 := b.NewValue0(v.Pos, OpMul64, typ.UInt64)
9341 v2 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
9342 v2.AuxInt = int64ToAuxInt(int64(udivisible64(c).m))
9343 v1.AddArg2(v2, x)
9344 v3 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
9345 v3.AuxInt = int64ToAuxInt(64 - udivisible64(c).k)
9346 v0.AddArg2(v1, v3)
9347 v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
9348 v4.AuxInt = int64ToAuxInt(int64(udivisible64(c).max))
9349 v.AddArg2(v0, v4)
9350 return true
9351 }
9352 }
9353 }
9354 break
9355 }
9356
9357
9358
9359 for {
9360 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
9361 x := v_0
9362 if v_1.Op != OpMul64 {
9363 continue
9364 }
9365 _ = v_1.Args[1]
9366 v_1_0 := v_1.Args[0]
9367 v_1_1 := v_1.Args[1]
9368 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
9369 if v_1_0.Op != OpConst64 {
9370 continue
9371 }
9372 c := auxIntToInt64(v_1_0.AuxInt)
9373 if v_1_1.Op != OpRsh64Ux64 {
9374 continue
9375 }
9376 _ = v_1_1.Args[1]
9377 mul := v_1_1.Args[0]
9378 if mul.Op != OpHmul64u {
9379 continue
9380 }
9381 _ = mul.Args[1]
9382 mul_0 := mul.Args[0]
9383 mul_1 := mul.Args[1]
9384 for _i2 := 0; _i2 <= 1; _i2, mul_0, mul_1 = _i2+1, mul_1, mul_0 {
9385 if mul_0.Op != OpConst64 {
9386 continue
9387 }
9388 m := auxIntToInt64(mul_0.AuxInt)
9389 if mul_1.Op != OpRsh64Ux64 {
9390 continue
9391 }
9392 _ = mul_1.Args[1]
9393 if x != mul_1.Args[0] {
9394 continue
9395 }
9396 mul_1_1 := mul_1.Args[1]
9397 if mul_1_1.Op != OpConst64 || auxIntToInt64(mul_1_1.AuxInt) != 1 {
9398 continue
9399 }
9400 v_1_1_1 := v_1_1.Args[1]
9401 if v_1_1_1.Op != OpConst64 {
9402 continue
9403 }
9404 s := auxIntToInt64(v_1_1_1.AuxInt)
9405 if !(v.Block.Func.pass.name != "opt" && mul.Uses == 1 && m == int64(1<<63+(umagic64(c).m+1)/2) && s == umagic64(c).s-2 && x.Op != OpConst64 && udivisibleOK64(c)) {
9406 continue
9407 }
9408 v.reset(OpLeq64U)
9409 v0 := b.NewValue0(v.Pos, OpRotateLeft64, typ.UInt64)
9410 v1 := b.NewValue0(v.Pos, OpMul64, typ.UInt64)
9411 v2 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
9412 v2.AuxInt = int64ToAuxInt(int64(udivisible64(c).m))
9413 v1.AddArg2(v2, x)
9414 v3 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
9415 v3.AuxInt = int64ToAuxInt(64 - udivisible64(c).k)
9416 v0.AddArg2(v1, v3)
9417 v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
9418 v4.AuxInt = int64ToAuxInt(int64(udivisible64(c).max))
9419 v.AddArg2(v0, v4)
9420 return true
9421 }
9422 }
9423 }
9424 break
9425 }
9426
9427
9428
9429 for {
9430 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
9431 x := v_0
9432 if v_1.Op != OpMul64 {
9433 continue
9434 }
9435 _ = v_1.Args[1]
9436 v_1_0 := v_1.Args[0]
9437 v_1_1 := v_1.Args[1]
9438 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
9439 if v_1_0.Op != OpConst64 {
9440 continue
9441 }
9442 c := auxIntToInt64(v_1_0.AuxInt)
9443 if v_1_1.Op != OpRsh64Ux64 {
9444 continue
9445 }
9446 _ = v_1_1.Args[1]
9447 v_1_1_0 := v_1_1.Args[0]
9448 if v_1_1_0.Op != OpAvg64u {
9449 continue
9450 }
9451 _ = v_1_1_0.Args[1]
9452 if x != v_1_1_0.Args[0] {
9453 continue
9454 }
9455 mul := v_1_1_0.Args[1]
9456 if mul.Op != OpHmul64u {
9457 continue
9458 }
9459 _ = mul.Args[1]
9460 mul_0 := mul.Args[0]
9461 mul_1 := mul.Args[1]
9462 for _i2 := 0; _i2 <= 1; _i2, mul_0, mul_1 = _i2+1, mul_1, mul_0 {
9463 if mul_0.Op != OpConst64 {
9464 continue
9465 }
9466 m := auxIntToInt64(mul_0.AuxInt)
9467 if x != mul_1 {
9468 continue
9469 }
9470 v_1_1_1 := v_1_1.Args[1]
9471 if v_1_1_1.Op != OpConst64 {
9472 continue
9473 }
9474 s := auxIntToInt64(v_1_1_1.AuxInt)
9475 if !(v.Block.Func.pass.name != "opt" && mul.Uses == 1 && m == int64(umagic64(c).m) && s == umagic64(c).s-1 && x.Op != OpConst64 && udivisibleOK64(c)) {
9476 continue
9477 }
9478 v.reset(OpLeq64U)
9479 v0 := b.NewValue0(v.Pos, OpRotateLeft64, typ.UInt64)
9480 v1 := b.NewValue0(v.Pos, OpMul64, typ.UInt64)
9481 v2 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
9482 v2.AuxInt = int64ToAuxInt(int64(udivisible64(c).m))
9483 v1.AddArg2(v2, x)
9484 v3 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
9485 v3.AuxInt = int64ToAuxInt(64 - udivisible64(c).k)
9486 v0.AddArg2(v1, v3)
9487 v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
9488 v4.AuxInt = int64ToAuxInt(int64(udivisible64(c).max))
9489 v.AddArg2(v0, v4)
9490 return true
9491 }
9492 }
9493 }
9494 break
9495 }
9496
9497
9498
9499 for {
9500 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
9501 x := v_0
9502 if v_1.Op != OpMul64 {
9503 continue
9504 }
9505 _ = v_1.Args[1]
9506 v_1_0 := v_1.Args[0]
9507 v_1_1 := v_1.Args[1]
9508 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
9509 if v_1_0.Op != OpConst64 {
9510 continue
9511 }
9512 c := auxIntToInt64(v_1_0.AuxInt)
9513 if v_1_1.Op != OpSub64 {
9514 continue
9515 }
9516 _ = v_1_1.Args[1]
9517 v_1_1_0 := v_1_1.Args[0]
9518 if v_1_1_0.Op != OpRsh64x64 {
9519 continue
9520 }
9521 _ = v_1_1_0.Args[1]
9522 mul := v_1_1_0.Args[0]
9523 if mul.Op != OpHmul64 {
9524 continue
9525 }
9526 _ = mul.Args[1]
9527 mul_0 := mul.Args[0]
9528 mul_1 := mul.Args[1]
9529 for _i2 := 0; _i2 <= 1; _i2, mul_0, mul_1 = _i2+1, mul_1, mul_0 {
9530 if mul_0.Op != OpConst64 {
9531 continue
9532 }
9533 m := auxIntToInt64(mul_0.AuxInt)
9534 if x != mul_1 {
9535 continue
9536 }
9537 v_1_1_0_1 := v_1_1_0.Args[1]
9538 if v_1_1_0_1.Op != OpConst64 {
9539 continue
9540 }
9541 s := auxIntToInt64(v_1_1_0_1.AuxInt)
9542 v_1_1_1 := v_1_1.Args[1]
9543 if v_1_1_1.Op != OpRsh64x64 {
9544 continue
9545 }
9546 _ = v_1_1_1.Args[1]
9547 if x != v_1_1_1.Args[0] {
9548 continue
9549 }
9550 v_1_1_1_1 := v_1_1_1.Args[1]
9551 if v_1_1_1_1.Op != OpConst64 || auxIntToInt64(v_1_1_1_1.AuxInt) != 63 || !(v.Block.Func.pass.name != "opt" && mul.Uses == 1 && m == int64(smagic64(c).m/2) && s == smagic64(c).s-1 && x.Op != OpConst64 && sdivisibleOK64(c)) {
9552 continue
9553 }
9554 v.reset(OpLeq64U)
9555 v0 := b.NewValue0(v.Pos, OpRotateLeft64, typ.UInt64)
9556 v1 := b.NewValue0(v.Pos, OpAdd64, typ.UInt64)
9557 v2 := b.NewValue0(v.Pos, OpMul64, typ.UInt64)
9558 v3 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
9559 v3.AuxInt = int64ToAuxInt(int64(sdivisible64(c).m))
9560 v2.AddArg2(v3, x)
9561 v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
9562 v4.AuxInt = int64ToAuxInt(int64(sdivisible64(c).a))
9563 v1.AddArg2(v2, v4)
9564 v5 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
9565 v5.AuxInt = int64ToAuxInt(64 - sdivisible64(c).k)
9566 v0.AddArg2(v1, v5)
9567 v6 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
9568 v6.AuxInt = int64ToAuxInt(int64(sdivisible64(c).max))
9569 v.AddArg2(v0, v6)
9570 return true
9571 }
9572 }
9573 }
9574 break
9575 }
9576
9577
9578
9579 for {
9580 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
9581 x := v_0
9582 if v_1.Op != OpMul64 {
9583 continue
9584 }
9585 _ = v_1.Args[1]
9586 v_1_0 := v_1.Args[0]
9587 v_1_1 := v_1.Args[1]
9588 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
9589 if v_1_0.Op != OpConst64 {
9590 continue
9591 }
9592 c := auxIntToInt64(v_1_0.AuxInt)
9593 if v_1_1.Op != OpSub64 {
9594 continue
9595 }
9596 _ = v_1_1.Args[1]
9597 v_1_1_0 := v_1_1.Args[0]
9598 if v_1_1_0.Op != OpRsh64x64 {
9599 continue
9600 }
9601 _ = v_1_1_0.Args[1]
9602 v_1_1_0_0 := v_1_1_0.Args[0]
9603 if v_1_1_0_0.Op != OpAdd64 {
9604 continue
9605 }
9606 _ = v_1_1_0_0.Args[1]
9607 v_1_1_0_0_0 := v_1_1_0_0.Args[0]
9608 v_1_1_0_0_1 := v_1_1_0_0.Args[1]
9609 for _i2 := 0; _i2 <= 1; _i2, v_1_1_0_0_0, v_1_1_0_0_1 = _i2+1, v_1_1_0_0_1, v_1_1_0_0_0 {
9610 mul := v_1_1_0_0_0
9611 if mul.Op != OpHmul64 {
9612 continue
9613 }
9614 _ = mul.Args[1]
9615 mul_0 := mul.Args[0]
9616 mul_1 := mul.Args[1]
9617 for _i3 := 0; _i3 <= 1; _i3, mul_0, mul_1 = _i3+1, mul_1, mul_0 {
9618 if mul_0.Op != OpConst64 {
9619 continue
9620 }
9621 m := auxIntToInt64(mul_0.AuxInt)
9622 if x != mul_1 || x != v_1_1_0_0_1 {
9623 continue
9624 }
9625 v_1_1_0_1 := v_1_1_0.Args[1]
9626 if v_1_1_0_1.Op != OpConst64 {
9627 continue
9628 }
9629 s := auxIntToInt64(v_1_1_0_1.AuxInt)
9630 v_1_1_1 := v_1_1.Args[1]
9631 if v_1_1_1.Op != OpRsh64x64 {
9632 continue
9633 }
9634 _ = v_1_1_1.Args[1]
9635 if x != v_1_1_1.Args[0] {
9636 continue
9637 }
9638 v_1_1_1_1 := v_1_1_1.Args[1]
9639 if v_1_1_1_1.Op != OpConst64 || auxIntToInt64(v_1_1_1_1.AuxInt) != 63 || !(v.Block.Func.pass.name != "opt" && mul.Uses == 1 && m == int64(smagic64(c).m) && s == smagic64(c).s && x.Op != OpConst64 && sdivisibleOK64(c)) {
9640 continue
9641 }
9642 v.reset(OpLeq64U)
9643 v0 := b.NewValue0(v.Pos, OpRotateLeft64, typ.UInt64)
9644 v1 := b.NewValue0(v.Pos, OpAdd64, typ.UInt64)
9645 v2 := b.NewValue0(v.Pos, OpMul64, typ.UInt64)
9646 v3 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
9647 v3.AuxInt = int64ToAuxInt(int64(sdivisible64(c).m))
9648 v2.AddArg2(v3, x)
9649 v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
9650 v4.AuxInt = int64ToAuxInt(int64(sdivisible64(c).a))
9651 v1.AddArg2(v2, v4)
9652 v5 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
9653 v5.AuxInt = int64ToAuxInt(64 - sdivisible64(c).k)
9654 v0.AddArg2(v1, v5)
9655 v6 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
9656 v6.AuxInt = int64ToAuxInt(int64(sdivisible64(c).max))
9657 v.AddArg2(v0, v6)
9658 return true
9659 }
9660 }
9661 }
9662 }
9663 break
9664 }
9665
9666
9667
9668 for {
9669 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
9670 n := v_0
9671 if v_1.Op != OpLsh64x64 {
9672 continue
9673 }
9674 _ = v_1.Args[1]
9675 v_1_0 := v_1.Args[0]
9676 if v_1_0.Op != OpRsh64x64 {
9677 continue
9678 }
9679 _ = v_1_0.Args[1]
9680 v_1_0_0 := v_1_0.Args[0]
9681 if v_1_0_0.Op != OpAdd64 {
9682 continue
9683 }
9684 t := v_1_0_0.Type
9685 _ = v_1_0_0.Args[1]
9686 v_1_0_0_0 := v_1_0_0.Args[0]
9687 v_1_0_0_1 := v_1_0_0.Args[1]
9688 for _i1 := 0; _i1 <= 1; _i1, v_1_0_0_0, v_1_0_0_1 = _i1+1, v_1_0_0_1, v_1_0_0_0 {
9689 if n != v_1_0_0_0 || v_1_0_0_1.Op != OpRsh64Ux64 || v_1_0_0_1.Type != t {
9690 continue
9691 }
9692 _ = v_1_0_0_1.Args[1]
9693 v_1_0_0_1_0 := v_1_0_0_1.Args[0]
9694 if v_1_0_0_1_0.Op != OpRsh64x64 || v_1_0_0_1_0.Type != t {
9695 continue
9696 }
9697 _ = v_1_0_0_1_0.Args[1]
9698 if n != v_1_0_0_1_0.Args[0] {
9699 continue
9700 }
9701 v_1_0_0_1_0_1 := v_1_0_0_1_0.Args[1]
9702 if v_1_0_0_1_0_1.Op != OpConst64 || v_1_0_0_1_0_1.Type != typ.UInt64 || auxIntToInt64(v_1_0_0_1_0_1.AuxInt) != 63 {
9703 continue
9704 }
9705 v_1_0_0_1_1 := v_1_0_0_1.Args[1]
9706 if v_1_0_0_1_1.Op != OpConst64 || v_1_0_0_1_1.Type != typ.UInt64 {
9707 continue
9708 }
9709 kbar := auxIntToInt64(v_1_0_0_1_1.AuxInt)
9710 v_1_0_1 := v_1_0.Args[1]
9711 if v_1_0_1.Op != OpConst64 || v_1_0_1.Type != typ.UInt64 {
9712 continue
9713 }
9714 k := auxIntToInt64(v_1_0_1.AuxInt)
9715 v_1_1 := v_1.Args[1]
9716 if v_1_1.Op != OpConst64 || v_1_1.Type != typ.UInt64 || auxIntToInt64(v_1_1.AuxInt) != k || !(k > 0 && k < 63 && kbar == 64-k) {
9717 continue
9718 }
9719 v.reset(OpEq64)
9720 v0 := b.NewValue0(v.Pos, OpAnd64, t)
9721 v1 := b.NewValue0(v.Pos, OpConst64, t)
9722 v1.AuxInt = int64ToAuxInt(1<<uint(k) - 1)
9723 v0.AddArg2(n, v1)
9724 v2 := b.NewValue0(v.Pos, OpConst64, t)
9725 v2.AuxInt = int64ToAuxInt(0)
9726 v.AddArg2(v0, v2)
9727 return true
9728 }
9729 }
9730 break
9731 }
9732
9733
9734
9735 for {
9736 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
9737 s := v_0
9738 if s.Op != OpSub64 {
9739 continue
9740 }
9741 y := s.Args[1]
9742 x := s.Args[0]
9743 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 0 || !(s.Uses == 1) {
9744 continue
9745 }
9746 v.reset(OpEq64)
9747 v.AddArg2(x, y)
9748 return true
9749 }
9750 break
9751 }
9752
9753
9754
9755 for {
9756 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
9757 if v_0.Op != OpAnd64 {
9758 continue
9759 }
9760 t := v_0.Type
9761 _ = v_0.Args[1]
9762 v_0_0 := v_0.Args[0]
9763 v_0_1 := v_0.Args[1]
9764 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
9765 x := v_0_0
9766 if v_0_1.Op != OpConst64 || v_0_1.Type != t {
9767 continue
9768 }
9769 y := auxIntToInt64(v_0_1.AuxInt)
9770 if v_1.Op != OpConst64 || v_1.Type != t || auxIntToInt64(v_1.AuxInt) != y || !(oneBit64(y)) {
9771 continue
9772 }
9773 v.reset(OpNeq64)
9774 v0 := b.NewValue0(v.Pos, OpAnd64, t)
9775 v1 := b.NewValue0(v.Pos, OpConst64, t)
9776 v1.AuxInt = int64ToAuxInt(y)
9777 v0.AddArg2(x, v1)
9778 v2 := b.NewValue0(v.Pos, OpConst64, t)
9779 v2.AuxInt = int64ToAuxInt(0)
9780 v.AddArg2(v0, v2)
9781 return true
9782 }
9783 }
9784 break
9785 }
9786 return false
9787 }
9788 func rewriteValuegeneric_OpEq64F(v *Value) bool {
9789 v_1 := v.Args[1]
9790 v_0 := v.Args[0]
9791
9792
9793 for {
9794 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
9795 if v_0.Op != OpConst64F {
9796 continue
9797 }
9798 c := auxIntToFloat64(v_0.AuxInt)
9799 if v_1.Op != OpConst64F {
9800 continue
9801 }
9802 d := auxIntToFloat64(v_1.AuxInt)
9803 v.reset(OpConstBool)
9804 v.AuxInt = boolToAuxInt(c == d)
9805 return true
9806 }
9807 break
9808 }
9809 return false
9810 }
9811 func rewriteValuegeneric_OpEq8(v *Value) bool {
9812 v_1 := v.Args[1]
9813 v_0 := v.Args[0]
9814 b := v.Block
9815 config := b.Func.Config
9816 typ := &b.Func.Config.Types
9817
9818
9819 for {
9820 x := v_0
9821 if x != v_1 {
9822 break
9823 }
9824 v.reset(OpConstBool)
9825 v.AuxInt = boolToAuxInt(true)
9826 return true
9827 }
9828
9829
9830 for {
9831 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
9832 if v_0.Op != OpConst8 {
9833 continue
9834 }
9835 t := v_0.Type
9836 c := auxIntToInt8(v_0.AuxInt)
9837 if v_1.Op != OpAdd8 {
9838 continue
9839 }
9840 _ = v_1.Args[1]
9841 v_1_0 := v_1.Args[0]
9842 v_1_1 := v_1.Args[1]
9843 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
9844 if v_1_0.Op != OpConst8 || v_1_0.Type != t {
9845 continue
9846 }
9847 d := auxIntToInt8(v_1_0.AuxInt)
9848 x := v_1_1
9849 v.reset(OpEq8)
9850 v0 := b.NewValue0(v.Pos, OpConst8, t)
9851 v0.AuxInt = int8ToAuxInt(c - d)
9852 v.AddArg2(v0, x)
9853 return true
9854 }
9855 }
9856 break
9857 }
9858
9859
9860 for {
9861 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
9862 if v_0.Op != OpConst8 {
9863 continue
9864 }
9865 c := auxIntToInt8(v_0.AuxInt)
9866 if v_1.Op != OpConst8 {
9867 continue
9868 }
9869 d := auxIntToInt8(v_1.AuxInt)
9870 v.reset(OpConstBool)
9871 v.AuxInt = boolToAuxInt(c == d)
9872 return true
9873 }
9874 break
9875 }
9876
9877
9878
9879 for {
9880 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
9881 if v_0.Op != OpMod8u {
9882 continue
9883 }
9884 _ = v_0.Args[1]
9885 x := v_0.Args[0]
9886 v_0_1 := v_0.Args[1]
9887 if v_0_1.Op != OpConst8 {
9888 continue
9889 }
9890 c := auxIntToInt8(v_0_1.AuxInt)
9891 if v_1.Op != OpConst8 || auxIntToInt8(v_1.AuxInt) != 0 || !(x.Op != OpConst8 && udivisibleOK8(c) && !hasSmallRotate(config)) {
9892 continue
9893 }
9894 v.reset(OpEq32)
9895 v0 := b.NewValue0(v.Pos, OpMod32u, typ.UInt32)
9896 v1 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
9897 v1.AddArg(x)
9898 v2 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
9899 v2.AuxInt = int32ToAuxInt(int32(uint8(c)))
9900 v0.AddArg2(v1, v2)
9901 v3 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
9902 v3.AuxInt = int32ToAuxInt(0)
9903 v.AddArg2(v0, v3)
9904 return true
9905 }
9906 break
9907 }
9908
9909
9910
9911 for {
9912 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
9913 if v_0.Op != OpMod8 {
9914 continue
9915 }
9916 _ = v_0.Args[1]
9917 x := v_0.Args[0]
9918 v_0_1 := v_0.Args[1]
9919 if v_0_1.Op != OpConst8 {
9920 continue
9921 }
9922 c := auxIntToInt8(v_0_1.AuxInt)
9923 if v_1.Op != OpConst8 || auxIntToInt8(v_1.AuxInt) != 0 || !(x.Op != OpConst8 && sdivisibleOK8(c) && !hasSmallRotate(config)) {
9924 continue
9925 }
9926 v.reset(OpEq32)
9927 v0 := b.NewValue0(v.Pos, OpMod32, typ.Int32)
9928 v1 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
9929 v1.AddArg(x)
9930 v2 := b.NewValue0(v.Pos, OpConst32, typ.Int32)
9931 v2.AuxInt = int32ToAuxInt(int32(c))
9932 v0.AddArg2(v1, v2)
9933 v3 := b.NewValue0(v.Pos, OpConst32, typ.Int32)
9934 v3.AuxInt = int32ToAuxInt(0)
9935 v.AddArg2(v0, v3)
9936 return true
9937 }
9938 break
9939 }
9940
9941
9942
9943 for {
9944 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
9945 x := v_0
9946 if v_1.Op != OpMul8 {
9947 continue
9948 }
9949 _ = v_1.Args[1]
9950 v_1_0 := v_1.Args[0]
9951 v_1_1 := v_1.Args[1]
9952 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
9953 if v_1_0.Op != OpConst8 {
9954 continue
9955 }
9956 c := auxIntToInt8(v_1_0.AuxInt)
9957 if v_1_1.Op != OpTrunc32to8 {
9958 continue
9959 }
9960 v_1_1_0 := v_1_1.Args[0]
9961 if v_1_1_0.Op != OpRsh32Ux64 {
9962 continue
9963 }
9964 _ = v_1_1_0.Args[1]
9965 mul := v_1_1_0.Args[0]
9966 if mul.Op != OpMul32 {
9967 continue
9968 }
9969 _ = mul.Args[1]
9970 mul_0 := mul.Args[0]
9971 mul_1 := mul.Args[1]
9972 for _i2 := 0; _i2 <= 1; _i2, mul_0, mul_1 = _i2+1, mul_1, mul_0 {
9973 if mul_0.Op != OpConst32 {
9974 continue
9975 }
9976 m := auxIntToInt32(mul_0.AuxInt)
9977 if mul_1.Op != OpZeroExt8to32 || x != mul_1.Args[0] {
9978 continue
9979 }
9980 v_1_1_0_1 := v_1_1_0.Args[1]
9981 if v_1_1_0_1.Op != OpConst64 {
9982 continue
9983 }
9984 s := auxIntToInt64(v_1_1_0_1.AuxInt)
9985 if !(v.Block.Func.pass.name != "opt" && mul.Uses == 1 && m == int32(1<<8+umagic8(c).m) && s == 8+umagic8(c).s && x.Op != OpConst8 && udivisibleOK8(c)) {
9986 continue
9987 }
9988 v.reset(OpLeq8U)
9989 v0 := b.NewValue0(v.Pos, OpRotateLeft8, typ.UInt8)
9990 v1 := b.NewValue0(v.Pos, OpMul8, typ.UInt8)
9991 v2 := b.NewValue0(v.Pos, OpConst8, typ.UInt8)
9992 v2.AuxInt = int8ToAuxInt(int8(udivisible8(c).m))
9993 v1.AddArg2(v2, x)
9994 v3 := b.NewValue0(v.Pos, OpConst8, typ.UInt8)
9995 v3.AuxInt = int8ToAuxInt(int8(8 - udivisible8(c).k))
9996 v0.AddArg2(v1, v3)
9997 v4 := b.NewValue0(v.Pos, OpConst8, typ.UInt8)
9998 v4.AuxInt = int8ToAuxInt(int8(udivisible8(c).max))
9999 v.AddArg2(v0, v4)
10000 return true
10001 }
10002 }
10003 }
10004 break
10005 }
10006
10007
10008
10009 for {
10010 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
10011 x := v_0
10012 if v_1.Op != OpMul8 {
10013 continue
10014 }
10015 _ = v_1.Args[1]
10016 v_1_0 := v_1.Args[0]
10017 v_1_1 := v_1.Args[1]
10018 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
10019 if v_1_0.Op != OpConst8 {
10020 continue
10021 }
10022 c := auxIntToInt8(v_1_0.AuxInt)
10023 if v_1_1.Op != OpSub8 {
10024 continue
10025 }
10026 _ = v_1_1.Args[1]
10027 v_1_1_0 := v_1_1.Args[0]
10028 if v_1_1_0.Op != OpRsh32x64 {
10029 continue
10030 }
10031 _ = v_1_1_0.Args[1]
10032 mul := v_1_1_0.Args[0]
10033 if mul.Op != OpMul32 {
10034 continue
10035 }
10036 _ = mul.Args[1]
10037 mul_0 := mul.Args[0]
10038 mul_1 := mul.Args[1]
10039 for _i2 := 0; _i2 <= 1; _i2, mul_0, mul_1 = _i2+1, mul_1, mul_0 {
10040 if mul_0.Op != OpConst32 {
10041 continue
10042 }
10043 m := auxIntToInt32(mul_0.AuxInt)
10044 if mul_1.Op != OpSignExt8to32 || x != mul_1.Args[0] {
10045 continue
10046 }
10047 v_1_1_0_1 := v_1_1_0.Args[1]
10048 if v_1_1_0_1.Op != OpConst64 {
10049 continue
10050 }
10051 s := auxIntToInt64(v_1_1_0_1.AuxInt)
10052 v_1_1_1 := v_1_1.Args[1]
10053 if v_1_1_1.Op != OpRsh32x64 {
10054 continue
10055 }
10056 _ = v_1_1_1.Args[1]
10057 v_1_1_1_0 := v_1_1_1.Args[0]
10058 if v_1_1_1_0.Op != OpSignExt8to32 || x != v_1_1_1_0.Args[0] {
10059 continue
10060 }
10061 v_1_1_1_1 := v_1_1_1.Args[1]
10062 if v_1_1_1_1.Op != OpConst64 || auxIntToInt64(v_1_1_1_1.AuxInt) != 31 || !(v.Block.Func.pass.name != "opt" && mul.Uses == 1 && m == int32(smagic8(c).m) && s == 8+smagic8(c).s && x.Op != OpConst8 && sdivisibleOK8(c)) {
10063 continue
10064 }
10065 v.reset(OpLeq8U)
10066 v0 := b.NewValue0(v.Pos, OpRotateLeft8, typ.UInt8)
10067 v1 := b.NewValue0(v.Pos, OpAdd8, typ.UInt8)
10068 v2 := b.NewValue0(v.Pos, OpMul8, typ.UInt8)
10069 v3 := b.NewValue0(v.Pos, OpConst8, typ.UInt8)
10070 v3.AuxInt = int8ToAuxInt(int8(sdivisible8(c).m))
10071 v2.AddArg2(v3, x)
10072 v4 := b.NewValue0(v.Pos, OpConst8, typ.UInt8)
10073 v4.AuxInt = int8ToAuxInt(int8(sdivisible8(c).a))
10074 v1.AddArg2(v2, v4)
10075 v5 := b.NewValue0(v.Pos, OpConst8, typ.UInt8)
10076 v5.AuxInt = int8ToAuxInt(int8(8 - sdivisible8(c).k))
10077 v0.AddArg2(v1, v5)
10078 v6 := b.NewValue0(v.Pos, OpConst8, typ.UInt8)
10079 v6.AuxInt = int8ToAuxInt(int8(sdivisible8(c).max))
10080 v.AddArg2(v0, v6)
10081 return true
10082 }
10083 }
10084 }
10085 break
10086 }
10087
10088
10089
10090 for {
10091 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
10092 n := v_0
10093 if v_1.Op != OpLsh8x64 {
10094 continue
10095 }
10096 _ = v_1.Args[1]
10097 v_1_0 := v_1.Args[0]
10098 if v_1_0.Op != OpRsh8x64 {
10099 continue
10100 }
10101 _ = v_1_0.Args[1]
10102 v_1_0_0 := v_1_0.Args[0]
10103 if v_1_0_0.Op != OpAdd8 {
10104 continue
10105 }
10106 t := v_1_0_0.Type
10107 _ = v_1_0_0.Args[1]
10108 v_1_0_0_0 := v_1_0_0.Args[0]
10109 v_1_0_0_1 := v_1_0_0.Args[1]
10110 for _i1 := 0; _i1 <= 1; _i1, v_1_0_0_0, v_1_0_0_1 = _i1+1, v_1_0_0_1, v_1_0_0_0 {
10111 if n != v_1_0_0_0 || v_1_0_0_1.Op != OpRsh8Ux64 || v_1_0_0_1.Type != t {
10112 continue
10113 }
10114 _ = v_1_0_0_1.Args[1]
10115 v_1_0_0_1_0 := v_1_0_0_1.Args[0]
10116 if v_1_0_0_1_0.Op != OpRsh8x64 || v_1_0_0_1_0.Type != t {
10117 continue
10118 }
10119 _ = v_1_0_0_1_0.Args[1]
10120 if n != v_1_0_0_1_0.Args[0] {
10121 continue
10122 }
10123 v_1_0_0_1_0_1 := v_1_0_0_1_0.Args[1]
10124 if v_1_0_0_1_0_1.Op != OpConst64 || v_1_0_0_1_0_1.Type != typ.UInt64 || auxIntToInt64(v_1_0_0_1_0_1.AuxInt) != 7 {
10125 continue
10126 }
10127 v_1_0_0_1_1 := v_1_0_0_1.Args[1]
10128 if v_1_0_0_1_1.Op != OpConst64 || v_1_0_0_1_1.Type != typ.UInt64 {
10129 continue
10130 }
10131 kbar := auxIntToInt64(v_1_0_0_1_1.AuxInt)
10132 v_1_0_1 := v_1_0.Args[1]
10133 if v_1_0_1.Op != OpConst64 || v_1_0_1.Type != typ.UInt64 {
10134 continue
10135 }
10136 k := auxIntToInt64(v_1_0_1.AuxInt)
10137 v_1_1 := v_1.Args[1]
10138 if v_1_1.Op != OpConst64 || v_1_1.Type != typ.UInt64 || auxIntToInt64(v_1_1.AuxInt) != k || !(k > 0 && k < 7 && kbar == 8-k) {
10139 continue
10140 }
10141 v.reset(OpEq8)
10142 v0 := b.NewValue0(v.Pos, OpAnd8, t)
10143 v1 := b.NewValue0(v.Pos, OpConst8, t)
10144 v1.AuxInt = int8ToAuxInt(1<<uint(k) - 1)
10145 v0.AddArg2(n, v1)
10146 v2 := b.NewValue0(v.Pos, OpConst8, t)
10147 v2.AuxInt = int8ToAuxInt(0)
10148 v.AddArg2(v0, v2)
10149 return true
10150 }
10151 }
10152 break
10153 }
10154
10155
10156
10157 for {
10158 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
10159 s := v_0
10160 if s.Op != OpSub8 {
10161 continue
10162 }
10163 y := s.Args[1]
10164 x := s.Args[0]
10165 if v_1.Op != OpConst8 || auxIntToInt8(v_1.AuxInt) != 0 || !(s.Uses == 1) {
10166 continue
10167 }
10168 v.reset(OpEq8)
10169 v.AddArg2(x, y)
10170 return true
10171 }
10172 break
10173 }
10174
10175
10176
10177 for {
10178 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
10179 if v_0.Op != OpAnd8 {
10180 continue
10181 }
10182 t := v_0.Type
10183 _ = v_0.Args[1]
10184 v_0_0 := v_0.Args[0]
10185 v_0_1 := v_0.Args[1]
10186 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
10187 x := v_0_0
10188 if v_0_1.Op != OpConst8 || v_0_1.Type != t {
10189 continue
10190 }
10191 y := auxIntToInt8(v_0_1.AuxInt)
10192 if v_1.Op != OpConst8 || v_1.Type != t || auxIntToInt8(v_1.AuxInt) != y || !(oneBit8(y)) {
10193 continue
10194 }
10195 v.reset(OpNeq8)
10196 v0 := b.NewValue0(v.Pos, OpAnd8, t)
10197 v1 := b.NewValue0(v.Pos, OpConst8, t)
10198 v1.AuxInt = int8ToAuxInt(y)
10199 v0.AddArg2(x, v1)
10200 v2 := b.NewValue0(v.Pos, OpConst8, t)
10201 v2.AuxInt = int8ToAuxInt(0)
10202 v.AddArg2(v0, v2)
10203 return true
10204 }
10205 }
10206 break
10207 }
10208 return false
10209 }
10210 func rewriteValuegeneric_OpEqB(v *Value) bool {
10211 v_1 := v.Args[1]
10212 v_0 := v.Args[0]
10213
10214
10215 for {
10216 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
10217 if v_0.Op != OpConstBool {
10218 continue
10219 }
10220 c := auxIntToBool(v_0.AuxInt)
10221 if v_1.Op != OpConstBool {
10222 continue
10223 }
10224 d := auxIntToBool(v_1.AuxInt)
10225 v.reset(OpConstBool)
10226 v.AuxInt = boolToAuxInt(c == d)
10227 return true
10228 }
10229 break
10230 }
10231
10232
10233 for {
10234 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
10235 if v_0.Op != OpConstBool || auxIntToBool(v_0.AuxInt) != false {
10236 continue
10237 }
10238 x := v_1
10239 v.reset(OpNot)
10240 v.AddArg(x)
10241 return true
10242 }
10243 break
10244 }
10245
10246
10247 for {
10248 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
10249 if v_0.Op != OpConstBool || auxIntToBool(v_0.AuxInt) != true {
10250 continue
10251 }
10252 x := v_1
10253 v.copyOf(x)
10254 return true
10255 }
10256 break
10257 }
10258 return false
10259 }
10260 func rewriteValuegeneric_OpEqInter(v *Value) bool {
10261 v_1 := v.Args[1]
10262 v_0 := v.Args[0]
10263 b := v.Block
10264 typ := &b.Func.Config.Types
10265
10266
10267 for {
10268 x := v_0
10269 y := v_1
10270 v.reset(OpEqPtr)
10271 v0 := b.NewValue0(v.Pos, OpITab, typ.Uintptr)
10272 v0.AddArg(x)
10273 v1 := b.NewValue0(v.Pos, OpITab, typ.Uintptr)
10274 v1.AddArg(y)
10275 v.AddArg2(v0, v1)
10276 return true
10277 }
10278 }
10279 func rewriteValuegeneric_OpEqPtr(v *Value) bool {
10280 v_1 := v.Args[1]
10281 v_0 := v.Args[0]
10282 b := v.Block
10283 typ := &b.Func.Config.Types
10284
10285
10286 for {
10287 x := v_0
10288 if x != v_1 {
10289 break
10290 }
10291 v.reset(OpConstBool)
10292 v.AuxInt = boolToAuxInt(true)
10293 return true
10294 }
10295
10296
10297 for {
10298 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
10299 if v_0.Op != OpAddr {
10300 continue
10301 }
10302 x := auxToSym(v_0.Aux)
10303 if v_1.Op != OpAddr {
10304 continue
10305 }
10306 y := auxToSym(v_1.Aux)
10307 v.reset(OpConstBool)
10308 v.AuxInt = boolToAuxInt(x == y)
10309 return true
10310 }
10311 break
10312 }
10313
10314
10315 for {
10316 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
10317 if v_0.Op != OpAddr {
10318 continue
10319 }
10320 x := auxToSym(v_0.Aux)
10321 if v_1.Op != OpOffPtr {
10322 continue
10323 }
10324 o := auxIntToInt64(v_1.AuxInt)
10325 v_1_0 := v_1.Args[0]
10326 if v_1_0.Op != OpAddr {
10327 continue
10328 }
10329 y := auxToSym(v_1_0.Aux)
10330 v.reset(OpConstBool)
10331 v.AuxInt = boolToAuxInt(x == y && o == 0)
10332 return true
10333 }
10334 break
10335 }
10336
10337
10338 for {
10339 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
10340 if v_0.Op != OpOffPtr {
10341 continue
10342 }
10343 o1 := auxIntToInt64(v_0.AuxInt)
10344 v_0_0 := v_0.Args[0]
10345 if v_0_0.Op != OpAddr {
10346 continue
10347 }
10348 x := auxToSym(v_0_0.Aux)
10349 if v_1.Op != OpOffPtr {
10350 continue
10351 }
10352 o2 := auxIntToInt64(v_1.AuxInt)
10353 v_1_0 := v_1.Args[0]
10354 if v_1_0.Op != OpAddr {
10355 continue
10356 }
10357 y := auxToSym(v_1_0.Aux)
10358 v.reset(OpConstBool)
10359 v.AuxInt = boolToAuxInt(x == y && o1 == o2)
10360 return true
10361 }
10362 break
10363 }
10364
10365
10366 for {
10367 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
10368 if v_0.Op != OpLocalAddr {
10369 continue
10370 }
10371 x := auxToSym(v_0.Aux)
10372 if v_1.Op != OpLocalAddr {
10373 continue
10374 }
10375 y := auxToSym(v_1.Aux)
10376 v.reset(OpConstBool)
10377 v.AuxInt = boolToAuxInt(x == y)
10378 return true
10379 }
10380 break
10381 }
10382
10383
10384 for {
10385 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
10386 if v_0.Op != OpLocalAddr {
10387 continue
10388 }
10389 x := auxToSym(v_0.Aux)
10390 if v_1.Op != OpOffPtr {
10391 continue
10392 }
10393 o := auxIntToInt64(v_1.AuxInt)
10394 v_1_0 := v_1.Args[0]
10395 if v_1_0.Op != OpLocalAddr {
10396 continue
10397 }
10398 y := auxToSym(v_1_0.Aux)
10399 v.reset(OpConstBool)
10400 v.AuxInt = boolToAuxInt(x == y && o == 0)
10401 return true
10402 }
10403 break
10404 }
10405
10406
10407 for {
10408 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
10409 if v_0.Op != OpOffPtr {
10410 continue
10411 }
10412 o1 := auxIntToInt64(v_0.AuxInt)
10413 v_0_0 := v_0.Args[0]
10414 if v_0_0.Op != OpLocalAddr {
10415 continue
10416 }
10417 x := auxToSym(v_0_0.Aux)
10418 if v_1.Op != OpOffPtr {
10419 continue
10420 }
10421 o2 := auxIntToInt64(v_1.AuxInt)
10422 v_1_0 := v_1.Args[0]
10423 if v_1_0.Op != OpLocalAddr {
10424 continue
10425 }
10426 y := auxToSym(v_1_0.Aux)
10427 v.reset(OpConstBool)
10428 v.AuxInt = boolToAuxInt(x == y && o1 == o2)
10429 return true
10430 }
10431 break
10432 }
10433
10434
10435
10436 for {
10437 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
10438 if v_0.Op != OpOffPtr {
10439 continue
10440 }
10441 o1 := auxIntToInt64(v_0.AuxInt)
10442 p1 := v_0.Args[0]
10443 p2 := v_1
10444 if !(isSamePtr(p1, p2)) {
10445 continue
10446 }
10447 v.reset(OpConstBool)
10448 v.AuxInt = boolToAuxInt(o1 == 0)
10449 return true
10450 }
10451 break
10452 }
10453
10454
10455
10456 for {
10457 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
10458 if v_0.Op != OpOffPtr {
10459 continue
10460 }
10461 o1 := auxIntToInt64(v_0.AuxInt)
10462 p1 := v_0.Args[0]
10463 if v_1.Op != OpOffPtr {
10464 continue
10465 }
10466 o2 := auxIntToInt64(v_1.AuxInt)
10467 p2 := v_1.Args[0]
10468 if !(isSamePtr(p1, p2)) {
10469 continue
10470 }
10471 v.reset(OpConstBool)
10472 v.AuxInt = boolToAuxInt(o1 == o2)
10473 return true
10474 }
10475 break
10476 }
10477
10478
10479 for {
10480 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
10481 if v_0.Op != OpConst32 {
10482 continue
10483 }
10484 c := auxIntToInt32(v_0.AuxInt)
10485 if v_1.Op != OpConst32 {
10486 continue
10487 }
10488 d := auxIntToInt32(v_1.AuxInt)
10489 v.reset(OpConstBool)
10490 v.AuxInt = boolToAuxInt(c == d)
10491 return true
10492 }
10493 break
10494 }
10495
10496
10497 for {
10498 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
10499 if v_0.Op != OpConst64 {
10500 continue
10501 }
10502 c := auxIntToInt64(v_0.AuxInt)
10503 if v_1.Op != OpConst64 {
10504 continue
10505 }
10506 d := auxIntToInt64(v_1.AuxInt)
10507 v.reset(OpConstBool)
10508 v.AuxInt = boolToAuxInt(c == d)
10509 return true
10510 }
10511 break
10512 }
10513
10514
10515 for {
10516 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
10517 if v_0.Op != OpConvert {
10518 continue
10519 }
10520 v_0_0 := v_0.Args[0]
10521 if v_0_0.Op != OpAddr {
10522 continue
10523 }
10524 x := auxToSym(v_0_0.Aux)
10525 if v_1.Op != OpAddr {
10526 continue
10527 }
10528 y := auxToSym(v_1.Aux)
10529 v.reset(OpConstBool)
10530 v.AuxInt = boolToAuxInt(x == y)
10531 return true
10532 }
10533 break
10534 }
10535
10536
10537 for {
10538 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
10539 if v_0.Op != OpLocalAddr || v_1.Op != OpAddr {
10540 continue
10541 }
10542 v.reset(OpConstBool)
10543 v.AuxInt = boolToAuxInt(false)
10544 return true
10545 }
10546 break
10547 }
10548
10549
10550 for {
10551 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
10552 if v_0.Op != OpOffPtr {
10553 continue
10554 }
10555 v_0_0 := v_0.Args[0]
10556 if v_0_0.Op != OpLocalAddr || v_1.Op != OpAddr {
10557 continue
10558 }
10559 v.reset(OpConstBool)
10560 v.AuxInt = boolToAuxInt(false)
10561 return true
10562 }
10563 break
10564 }
10565
10566
10567 for {
10568 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
10569 if v_0.Op != OpLocalAddr || v_1.Op != OpOffPtr {
10570 continue
10571 }
10572 v_1_0 := v_1.Args[0]
10573 if v_1_0.Op != OpAddr {
10574 continue
10575 }
10576 v.reset(OpConstBool)
10577 v.AuxInt = boolToAuxInt(false)
10578 return true
10579 }
10580 break
10581 }
10582
10583
10584 for {
10585 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
10586 if v_0.Op != OpOffPtr {
10587 continue
10588 }
10589 v_0_0 := v_0.Args[0]
10590 if v_0_0.Op != OpLocalAddr || v_1.Op != OpOffPtr {
10591 continue
10592 }
10593 v_1_0 := v_1.Args[0]
10594 if v_1_0.Op != OpAddr {
10595 continue
10596 }
10597 v.reset(OpConstBool)
10598 v.AuxInt = boolToAuxInt(false)
10599 return true
10600 }
10601 break
10602 }
10603
10604
10605
10606 for {
10607 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
10608 if v_0.Op != OpAddPtr {
10609 continue
10610 }
10611 o1 := v_0.Args[1]
10612 p1 := v_0.Args[0]
10613 p2 := v_1
10614 if !(isSamePtr(p1, p2)) {
10615 continue
10616 }
10617 v.reset(OpNot)
10618 v0 := b.NewValue0(v.Pos, OpIsNonNil, typ.Bool)
10619 v0.AddArg(o1)
10620 v.AddArg(v0)
10621 return true
10622 }
10623 break
10624 }
10625
10626
10627 for {
10628 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
10629 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
10630 continue
10631 }
10632 p := v_1
10633 v.reset(OpNot)
10634 v0 := b.NewValue0(v.Pos, OpIsNonNil, typ.Bool)
10635 v0.AddArg(p)
10636 v.AddArg(v0)
10637 return true
10638 }
10639 break
10640 }
10641
10642
10643 for {
10644 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
10645 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
10646 continue
10647 }
10648 p := v_1
10649 v.reset(OpNot)
10650 v0 := b.NewValue0(v.Pos, OpIsNonNil, typ.Bool)
10651 v0.AddArg(p)
10652 v.AddArg(v0)
10653 return true
10654 }
10655 break
10656 }
10657
10658
10659 for {
10660 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
10661 if v_0.Op != OpConstNil {
10662 continue
10663 }
10664 p := v_1
10665 v.reset(OpNot)
10666 v0 := b.NewValue0(v.Pos, OpIsNonNil, typ.Bool)
10667 v0.AddArg(p)
10668 v.AddArg(v0)
10669 return true
10670 }
10671 break
10672 }
10673 return false
10674 }
10675 func rewriteValuegeneric_OpEqSlice(v *Value) bool {
10676 v_1 := v.Args[1]
10677 v_0 := v.Args[0]
10678 b := v.Block
10679 typ := &b.Func.Config.Types
10680
10681
10682 for {
10683 x := v_0
10684 y := v_1
10685 v.reset(OpEqPtr)
10686 v0 := b.NewValue0(v.Pos, OpSlicePtr, typ.BytePtr)
10687 v0.AddArg(x)
10688 v1 := b.NewValue0(v.Pos, OpSlicePtr, typ.BytePtr)
10689 v1.AddArg(y)
10690 v.AddArg2(v0, v1)
10691 return true
10692 }
10693 }
10694 func rewriteValuegeneric_OpFloor(v *Value) bool {
10695 v_0 := v.Args[0]
10696
10697
10698 for {
10699 if v_0.Op != OpConst64F {
10700 break
10701 }
10702 c := auxIntToFloat64(v_0.AuxInt)
10703 v.reset(OpConst64F)
10704 v.AuxInt = float64ToAuxInt(math.Floor(c))
10705 return true
10706 }
10707 return false
10708 }
10709 func rewriteValuegeneric_OpIMake(v *Value) bool {
10710 v_1 := v.Args[1]
10711 v_0 := v.Args[0]
10712
10713
10714 for {
10715 _typ := v_0
10716 if v_1.Op != OpStructMake || len(v_1.Args) != 1 {
10717 break
10718 }
10719 val := v_1.Args[0]
10720 v.reset(OpIMake)
10721 v.AddArg2(_typ, val)
10722 return true
10723 }
10724
10725
10726 for {
10727 _typ := v_0
10728 if v_1.Op != OpArrayMake1 {
10729 break
10730 }
10731 val := v_1.Args[0]
10732 v.reset(OpIMake)
10733 v.AddArg2(_typ, val)
10734 return true
10735 }
10736 return false
10737 }
10738 func rewriteValuegeneric_OpInterLECall(v *Value) bool {
10739
10740
10741 for {
10742 if len(v.Args) < 1 {
10743 break
10744 }
10745 v_0 := v.Args[0]
10746 if v_0.Op != OpAddr {
10747 break
10748 }
10749 fn := auxToSym(v_0.Aux)
10750 v_0_0 := v_0.Args[0]
10751 if v_0_0.Op != OpSB {
10752 break
10753 }
10754 v.copyOf(devirtLECall(v, fn.(*obj.LSym)))
10755 return true
10756 }
10757 return false
10758 }
10759 func rewriteValuegeneric_OpIsInBounds(v *Value) bool {
10760 v_1 := v.Args[1]
10761 v_0 := v.Args[0]
10762
10763
10764
10765 for {
10766 if v_0.Op != OpZeroExt8to32 || v_1.Op != OpConst32 {
10767 break
10768 }
10769 c := auxIntToInt32(v_1.AuxInt)
10770 if !((1 << 8) <= c) {
10771 break
10772 }
10773 v.reset(OpConstBool)
10774 v.AuxInt = boolToAuxInt(true)
10775 return true
10776 }
10777
10778
10779
10780 for {
10781 if v_0.Op != OpZeroExt8to64 || v_1.Op != OpConst64 {
10782 break
10783 }
10784 c := auxIntToInt64(v_1.AuxInt)
10785 if !((1 << 8) <= c) {
10786 break
10787 }
10788 v.reset(OpConstBool)
10789 v.AuxInt = boolToAuxInt(true)
10790 return true
10791 }
10792
10793
10794
10795 for {
10796 if v_0.Op != OpZeroExt16to32 || v_1.Op != OpConst32 {
10797 break
10798 }
10799 c := auxIntToInt32(v_1.AuxInt)
10800 if !((1 << 16) <= c) {
10801 break
10802 }
10803 v.reset(OpConstBool)
10804 v.AuxInt = boolToAuxInt(true)
10805 return true
10806 }
10807
10808
10809
10810 for {
10811 if v_0.Op != OpZeroExt16to64 || v_1.Op != OpConst64 {
10812 break
10813 }
10814 c := auxIntToInt64(v_1.AuxInt)
10815 if !((1 << 16) <= c) {
10816 break
10817 }
10818 v.reset(OpConstBool)
10819 v.AuxInt = boolToAuxInt(true)
10820 return true
10821 }
10822
10823
10824 for {
10825 x := v_0
10826 if x != v_1 {
10827 break
10828 }
10829 v.reset(OpConstBool)
10830 v.AuxInt = boolToAuxInt(false)
10831 return true
10832 }
10833
10834
10835
10836 for {
10837 if v_0.Op != OpAnd8 {
10838 break
10839 }
10840 v_0_0 := v_0.Args[0]
10841 v_0_1 := v_0.Args[1]
10842 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
10843 if v_0_0.Op != OpConst8 {
10844 continue
10845 }
10846 c := auxIntToInt8(v_0_0.AuxInt)
10847 if v_1.Op != OpConst8 {
10848 continue
10849 }
10850 d := auxIntToInt8(v_1.AuxInt)
10851 if !(0 <= c && c < d) {
10852 continue
10853 }
10854 v.reset(OpConstBool)
10855 v.AuxInt = boolToAuxInt(true)
10856 return true
10857 }
10858 break
10859 }
10860
10861
10862
10863 for {
10864 if v_0.Op != OpZeroExt8to16 {
10865 break
10866 }
10867 v_0_0 := v_0.Args[0]
10868 if v_0_0.Op != OpAnd8 {
10869 break
10870 }
10871 v_0_0_0 := v_0_0.Args[0]
10872 v_0_0_1 := v_0_0.Args[1]
10873 for _i0 := 0; _i0 <= 1; _i0, v_0_0_0, v_0_0_1 = _i0+1, v_0_0_1, v_0_0_0 {
10874 if v_0_0_0.Op != OpConst8 {
10875 continue
10876 }
10877 c := auxIntToInt8(v_0_0_0.AuxInt)
10878 if v_1.Op != OpConst16 {
10879 continue
10880 }
10881 d := auxIntToInt16(v_1.AuxInt)
10882 if !(0 <= c && int16(c) < d) {
10883 continue
10884 }
10885 v.reset(OpConstBool)
10886 v.AuxInt = boolToAuxInt(true)
10887 return true
10888 }
10889 break
10890 }
10891
10892
10893
10894 for {
10895 if v_0.Op != OpZeroExt8to32 {
10896 break
10897 }
10898 v_0_0 := v_0.Args[0]
10899 if v_0_0.Op != OpAnd8 {
10900 break
10901 }
10902 v_0_0_0 := v_0_0.Args[0]
10903 v_0_0_1 := v_0_0.Args[1]
10904 for _i0 := 0; _i0 <= 1; _i0, v_0_0_0, v_0_0_1 = _i0+1, v_0_0_1, v_0_0_0 {
10905 if v_0_0_0.Op != OpConst8 {
10906 continue
10907 }
10908 c := auxIntToInt8(v_0_0_0.AuxInt)
10909 if v_1.Op != OpConst32 {
10910 continue
10911 }
10912 d := auxIntToInt32(v_1.AuxInt)
10913 if !(0 <= c && int32(c) < d) {
10914 continue
10915 }
10916 v.reset(OpConstBool)
10917 v.AuxInt = boolToAuxInt(true)
10918 return true
10919 }
10920 break
10921 }
10922
10923
10924
10925 for {
10926 if v_0.Op != OpZeroExt8to64 {
10927 break
10928 }
10929 v_0_0 := v_0.Args[0]
10930 if v_0_0.Op != OpAnd8 {
10931 break
10932 }
10933 v_0_0_0 := v_0_0.Args[0]
10934 v_0_0_1 := v_0_0.Args[1]
10935 for _i0 := 0; _i0 <= 1; _i0, v_0_0_0, v_0_0_1 = _i0+1, v_0_0_1, v_0_0_0 {
10936 if v_0_0_0.Op != OpConst8 {
10937 continue
10938 }
10939 c := auxIntToInt8(v_0_0_0.AuxInt)
10940 if v_1.Op != OpConst64 {
10941 continue
10942 }
10943 d := auxIntToInt64(v_1.AuxInt)
10944 if !(0 <= c && int64(c) < d) {
10945 continue
10946 }
10947 v.reset(OpConstBool)
10948 v.AuxInt = boolToAuxInt(true)
10949 return true
10950 }
10951 break
10952 }
10953
10954
10955
10956 for {
10957 if v_0.Op != OpAnd16 {
10958 break
10959 }
10960 v_0_0 := v_0.Args[0]
10961 v_0_1 := v_0.Args[1]
10962 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
10963 if v_0_0.Op != OpConst16 {
10964 continue
10965 }
10966 c := auxIntToInt16(v_0_0.AuxInt)
10967 if v_1.Op != OpConst16 {
10968 continue
10969 }
10970 d := auxIntToInt16(v_1.AuxInt)
10971 if !(0 <= c && c < d) {
10972 continue
10973 }
10974 v.reset(OpConstBool)
10975 v.AuxInt = boolToAuxInt(true)
10976 return true
10977 }
10978 break
10979 }
10980
10981
10982
10983 for {
10984 if v_0.Op != OpZeroExt16to32 {
10985 break
10986 }
10987 v_0_0 := v_0.Args[0]
10988 if v_0_0.Op != OpAnd16 {
10989 break
10990 }
10991 v_0_0_0 := v_0_0.Args[0]
10992 v_0_0_1 := v_0_0.Args[1]
10993 for _i0 := 0; _i0 <= 1; _i0, v_0_0_0, v_0_0_1 = _i0+1, v_0_0_1, v_0_0_0 {
10994 if v_0_0_0.Op != OpConst16 {
10995 continue
10996 }
10997 c := auxIntToInt16(v_0_0_0.AuxInt)
10998 if v_1.Op != OpConst32 {
10999 continue
11000 }
11001 d := auxIntToInt32(v_1.AuxInt)
11002 if !(0 <= c && int32(c) < d) {
11003 continue
11004 }
11005 v.reset(OpConstBool)
11006 v.AuxInt = boolToAuxInt(true)
11007 return true
11008 }
11009 break
11010 }
11011
11012
11013
11014 for {
11015 if v_0.Op != OpZeroExt16to64 {
11016 break
11017 }
11018 v_0_0 := v_0.Args[0]
11019 if v_0_0.Op != OpAnd16 {
11020 break
11021 }
11022 v_0_0_0 := v_0_0.Args[0]
11023 v_0_0_1 := v_0_0.Args[1]
11024 for _i0 := 0; _i0 <= 1; _i0, v_0_0_0, v_0_0_1 = _i0+1, v_0_0_1, v_0_0_0 {
11025 if v_0_0_0.Op != OpConst16 {
11026 continue
11027 }
11028 c := auxIntToInt16(v_0_0_0.AuxInt)
11029 if v_1.Op != OpConst64 {
11030 continue
11031 }
11032 d := auxIntToInt64(v_1.AuxInt)
11033 if !(0 <= c && int64(c) < d) {
11034 continue
11035 }
11036 v.reset(OpConstBool)
11037 v.AuxInt = boolToAuxInt(true)
11038 return true
11039 }
11040 break
11041 }
11042
11043
11044
11045 for {
11046 if v_0.Op != OpAnd32 {
11047 break
11048 }
11049 v_0_0 := v_0.Args[0]
11050 v_0_1 := v_0.Args[1]
11051 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
11052 if v_0_0.Op != OpConst32 {
11053 continue
11054 }
11055 c := auxIntToInt32(v_0_0.AuxInt)
11056 if v_1.Op != OpConst32 {
11057 continue
11058 }
11059 d := auxIntToInt32(v_1.AuxInt)
11060 if !(0 <= c && c < d) {
11061 continue
11062 }
11063 v.reset(OpConstBool)
11064 v.AuxInt = boolToAuxInt(true)
11065 return true
11066 }
11067 break
11068 }
11069
11070
11071
11072 for {
11073 if v_0.Op != OpZeroExt32to64 {
11074 break
11075 }
11076 v_0_0 := v_0.Args[0]
11077 if v_0_0.Op != OpAnd32 {
11078 break
11079 }
11080 v_0_0_0 := v_0_0.Args[0]
11081 v_0_0_1 := v_0_0.Args[1]
11082 for _i0 := 0; _i0 <= 1; _i0, v_0_0_0, v_0_0_1 = _i0+1, v_0_0_1, v_0_0_0 {
11083 if v_0_0_0.Op != OpConst32 {
11084 continue
11085 }
11086 c := auxIntToInt32(v_0_0_0.AuxInt)
11087 if v_1.Op != OpConst64 {
11088 continue
11089 }
11090 d := auxIntToInt64(v_1.AuxInt)
11091 if !(0 <= c && int64(c) < d) {
11092 continue
11093 }
11094 v.reset(OpConstBool)
11095 v.AuxInt = boolToAuxInt(true)
11096 return true
11097 }
11098 break
11099 }
11100
11101
11102
11103 for {
11104 if v_0.Op != OpAnd64 {
11105 break
11106 }
11107 v_0_0 := v_0.Args[0]
11108 v_0_1 := v_0.Args[1]
11109 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
11110 if v_0_0.Op != OpConst64 {
11111 continue
11112 }
11113 c := auxIntToInt64(v_0_0.AuxInt)
11114 if v_1.Op != OpConst64 {
11115 continue
11116 }
11117 d := auxIntToInt64(v_1.AuxInt)
11118 if !(0 <= c && c < d) {
11119 continue
11120 }
11121 v.reset(OpConstBool)
11122 v.AuxInt = boolToAuxInt(true)
11123 return true
11124 }
11125 break
11126 }
11127
11128
11129 for {
11130 if v_0.Op != OpConst32 {
11131 break
11132 }
11133 c := auxIntToInt32(v_0.AuxInt)
11134 if v_1.Op != OpConst32 {
11135 break
11136 }
11137 d := auxIntToInt32(v_1.AuxInt)
11138 v.reset(OpConstBool)
11139 v.AuxInt = boolToAuxInt(0 <= c && c < d)
11140 return true
11141 }
11142
11143
11144 for {
11145 if v_0.Op != OpConst64 {
11146 break
11147 }
11148 c := auxIntToInt64(v_0.AuxInt)
11149 if v_1.Op != OpConst64 {
11150 break
11151 }
11152 d := auxIntToInt64(v_1.AuxInt)
11153 v.reset(OpConstBool)
11154 v.AuxInt = boolToAuxInt(0 <= c && c < d)
11155 return true
11156 }
11157
11158
11159 for {
11160 if v_0.Op != OpMod32u {
11161 break
11162 }
11163 y := v_0.Args[1]
11164 if y != v_1 {
11165 break
11166 }
11167 v.reset(OpConstBool)
11168 v.AuxInt = boolToAuxInt(true)
11169 return true
11170 }
11171
11172
11173 for {
11174 if v_0.Op != OpMod64u {
11175 break
11176 }
11177 y := v_0.Args[1]
11178 if y != v_1 {
11179 break
11180 }
11181 v.reset(OpConstBool)
11182 v.AuxInt = boolToAuxInt(true)
11183 return true
11184 }
11185
11186
11187
11188 for {
11189 if v_0.Op != OpZeroExt8to64 {
11190 break
11191 }
11192 v_0_0 := v_0.Args[0]
11193 if v_0_0.Op != OpRsh8Ux64 {
11194 break
11195 }
11196 _ = v_0_0.Args[1]
11197 v_0_0_1 := v_0_0.Args[1]
11198 if v_0_0_1.Op != OpConst64 {
11199 break
11200 }
11201 c := auxIntToInt64(v_0_0_1.AuxInt)
11202 if v_1.Op != OpConst64 {
11203 break
11204 }
11205 d := auxIntToInt64(v_1.AuxInt)
11206 if !(0 < c && c < 8 && 1<<uint(8-c)-1 < d) {
11207 break
11208 }
11209 v.reset(OpConstBool)
11210 v.AuxInt = boolToAuxInt(true)
11211 return true
11212 }
11213
11214
11215
11216 for {
11217 if v_0.Op != OpZeroExt8to32 {
11218 break
11219 }
11220 v_0_0 := v_0.Args[0]
11221 if v_0_0.Op != OpRsh8Ux64 {
11222 break
11223 }
11224 _ = v_0_0.Args[1]
11225 v_0_0_1 := v_0_0.Args[1]
11226 if v_0_0_1.Op != OpConst64 {
11227 break
11228 }
11229 c := auxIntToInt64(v_0_0_1.AuxInt)
11230 if v_1.Op != OpConst32 {
11231 break
11232 }
11233 d := auxIntToInt32(v_1.AuxInt)
11234 if !(0 < c && c < 8 && 1<<uint(8-c)-1 < d) {
11235 break
11236 }
11237 v.reset(OpConstBool)
11238 v.AuxInt = boolToAuxInt(true)
11239 return true
11240 }
11241
11242
11243
11244 for {
11245 if v_0.Op != OpZeroExt8to16 {
11246 break
11247 }
11248 v_0_0 := v_0.Args[0]
11249 if v_0_0.Op != OpRsh8Ux64 {
11250 break
11251 }
11252 _ = v_0_0.Args[1]
11253 v_0_0_1 := v_0_0.Args[1]
11254 if v_0_0_1.Op != OpConst64 {
11255 break
11256 }
11257 c := auxIntToInt64(v_0_0_1.AuxInt)
11258 if v_1.Op != OpConst16 {
11259 break
11260 }
11261 d := auxIntToInt16(v_1.AuxInt)
11262 if !(0 < c && c < 8 && 1<<uint(8-c)-1 < d) {
11263 break
11264 }
11265 v.reset(OpConstBool)
11266 v.AuxInt = boolToAuxInt(true)
11267 return true
11268 }
11269
11270
11271
11272 for {
11273 if v_0.Op != OpRsh8Ux64 {
11274 break
11275 }
11276 _ = v_0.Args[1]
11277 v_0_1 := v_0.Args[1]
11278 if v_0_1.Op != OpConst64 {
11279 break
11280 }
11281 c := auxIntToInt64(v_0_1.AuxInt)
11282 if v_1.Op != OpConst64 {
11283 break
11284 }
11285 d := auxIntToInt64(v_1.AuxInt)
11286 if !(0 < c && c < 8 && 1<<uint(8-c)-1 < d) {
11287 break
11288 }
11289 v.reset(OpConstBool)
11290 v.AuxInt = boolToAuxInt(true)
11291 return true
11292 }
11293
11294
11295
11296 for {
11297 if v_0.Op != OpZeroExt16to64 {
11298 break
11299 }
11300 v_0_0 := v_0.Args[0]
11301 if v_0_0.Op != OpRsh16Ux64 {
11302 break
11303 }
11304 _ = v_0_0.Args[1]
11305 v_0_0_1 := v_0_0.Args[1]
11306 if v_0_0_1.Op != OpConst64 {
11307 break
11308 }
11309 c := auxIntToInt64(v_0_0_1.AuxInt)
11310 if v_1.Op != OpConst64 {
11311 break
11312 }
11313 d := auxIntToInt64(v_1.AuxInt)
11314 if !(0 < c && c < 16 && 1<<uint(16-c)-1 < d) {
11315 break
11316 }
11317 v.reset(OpConstBool)
11318 v.AuxInt = boolToAuxInt(true)
11319 return true
11320 }
11321
11322
11323
11324 for {
11325 if v_0.Op != OpZeroExt16to32 {
11326 break
11327 }
11328 v_0_0 := v_0.Args[0]
11329 if v_0_0.Op != OpRsh16Ux64 {
11330 break
11331 }
11332 _ = v_0_0.Args[1]
11333 v_0_0_1 := v_0_0.Args[1]
11334 if v_0_0_1.Op != OpConst64 {
11335 break
11336 }
11337 c := auxIntToInt64(v_0_0_1.AuxInt)
11338 if v_1.Op != OpConst64 {
11339 break
11340 }
11341 d := auxIntToInt64(v_1.AuxInt)
11342 if !(0 < c && c < 16 && 1<<uint(16-c)-1 < d) {
11343 break
11344 }
11345 v.reset(OpConstBool)
11346 v.AuxInt = boolToAuxInt(true)
11347 return true
11348 }
11349
11350
11351
11352 for {
11353 if v_0.Op != OpRsh16Ux64 {
11354 break
11355 }
11356 _ = v_0.Args[1]
11357 v_0_1 := v_0.Args[1]
11358 if v_0_1.Op != OpConst64 {
11359 break
11360 }
11361 c := auxIntToInt64(v_0_1.AuxInt)
11362 if v_1.Op != OpConst64 {
11363 break
11364 }
11365 d := auxIntToInt64(v_1.AuxInt)
11366 if !(0 < c && c < 16 && 1<<uint(16-c)-1 < d) {
11367 break
11368 }
11369 v.reset(OpConstBool)
11370 v.AuxInt = boolToAuxInt(true)
11371 return true
11372 }
11373
11374
11375
11376 for {
11377 if v_0.Op != OpZeroExt32to64 {
11378 break
11379 }
11380 v_0_0 := v_0.Args[0]
11381 if v_0_0.Op != OpRsh32Ux64 {
11382 break
11383 }
11384 _ = v_0_0.Args[1]
11385 v_0_0_1 := v_0_0.Args[1]
11386 if v_0_0_1.Op != OpConst64 {
11387 break
11388 }
11389 c := auxIntToInt64(v_0_0_1.AuxInt)
11390 if v_1.Op != OpConst64 {
11391 break
11392 }
11393 d := auxIntToInt64(v_1.AuxInt)
11394 if !(0 < c && c < 32 && 1<<uint(32-c)-1 < d) {
11395 break
11396 }
11397 v.reset(OpConstBool)
11398 v.AuxInt = boolToAuxInt(true)
11399 return true
11400 }
11401
11402
11403
11404 for {
11405 if v_0.Op != OpRsh32Ux64 {
11406 break
11407 }
11408 _ = v_0.Args[1]
11409 v_0_1 := v_0.Args[1]
11410 if v_0_1.Op != OpConst64 {
11411 break
11412 }
11413 c := auxIntToInt64(v_0_1.AuxInt)
11414 if v_1.Op != OpConst64 {
11415 break
11416 }
11417 d := auxIntToInt64(v_1.AuxInt)
11418 if !(0 < c && c < 32 && 1<<uint(32-c)-1 < d) {
11419 break
11420 }
11421 v.reset(OpConstBool)
11422 v.AuxInt = boolToAuxInt(true)
11423 return true
11424 }
11425
11426
11427
11428 for {
11429 if v_0.Op != OpRsh64Ux64 {
11430 break
11431 }
11432 _ = v_0.Args[1]
11433 v_0_1 := v_0.Args[1]
11434 if v_0_1.Op != OpConst64 {
11435 break
11436 }
11437 c := auxIntToInt64(v_0_1.AuxInt)
11438 if v_1.Op != OpConst64 {
11439 break
11440 }
11441 d := auxIntToInt64(v_1.AuxInt)
11442 if !(0 < c && c < 64 && 1<<uint(64-c)-1 < d) {
11443 break
11444 }
11445 v.reset(OpConstBool)
11446 v.AuxInt = boolToAuxInt(true)
11447 return true
11448 }
11449 return false
11450 }
11451 func rewriteValuegeneric_OpIsNonNil(v *Value) bool {
11452 v_0 := v.Args[0]
11453
11454
11455 for {
11456 if v_0.Op != OpConstNil {
11457 break
11458 }
11459 v.reset(OpConstBool)
11460 v.AuxInt = boolToAuxInt(false)
11461 return true
11462 }
11463
11464
11465 for {
11466 if v_0.Op != OpConst32 {
11467 break
11468 }
11469 c := auxIntToInt32(v_0.AuxInt)
11470 v.reset(OpConstBool)
11471 v.AuxInt = boolToAuxInt(c != 0)
11472 return true
11473 }
11474
11475
11476 for {
11477 if v_0.Op != OpConst64 {
11478 break
11479 }
11480 c := auxIntToInt64(v_0.AuxInt)
11481 v.reset(OpConstBool)
11482 v.AuxInt = boolToAuxInt(c != 0)
11483 return true
11484 }
11485
11486
11487 for {
11488 if v_0.Op != OpAddr {
11489 break
11490 }
11491 v.reset(OpConstBool)
11492 v.AuxInt = boolToAuxInt(true)
11493 return true
11494 }
11495
11496
11497 for {
11498 if v_0.Op != OpConvert {
11499 break
11500 }
11501 v_0_0 := v_0.Args[0]
11502 if v_0_0.Op != OpAddr {
11503 break
11504 }
11505 v.reset(OpConstBool)
11506 v.AuxInt = boolToAuxInt(true)
11507 return true
11508 }
11509
11510
11511 for {
11512 if v_0.Op != OpLocalAddr {
11513 break
11514 }
11515 v.reset(OpConstBool)
11516 v.AuxInt = boolToAuxInt(true)
11517 return true
11518 }
11519 return false
11520 }
11521 func rewriteValuegeneric_OpIsSliceInBounds(v *Value) bool {
11522 v_1 := v.Args[1]
11523 v_0 := v.Args[0]
11524
11525
11526 for {
11527 x := v_0
11528 if x != v_1 {
11529 break
11530 }
11531 v.reset(OpConstBool)
11532 v.AuxInt = boolToAuxInt(true)
11533 return true
11534 }
11535
11536
11537
11538 for {
11539 if v_0.Op != OpAnd32 {
11540 break
11541 }
11542 v_0_0 := v_0.Args[0]
11543 v_0_1 := v_0.Args[1]
11544 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
11545 if v_0_0.Op != OpConst32 {
11546 continue
11547 }
11548 c := auxIntToInt32(v_0_0.AuxInt)
11549 if v_1.Op != OpConst32 {
11550 continue
11551 }
11552 d := auxIntToInt32(v_1.AuxInt)
11553 if !(0 <= c && c <= d) {
11554 continue
11555 }
11556 v.reset(OpConstBool)
11557 v.AuxInt = boolToAuxInt(true)
11558 return true
11559 }
11560 break
11561 }
11562
11563
11564
11565 for {
11566 if v_0.Op != OpAnd64 {
11567 break
11568 }
11569 v_0_0 := v_0.Args[0]
11570 v_0_1 := v_0.Args[1]
11571 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
11572 if v_0_0.Op != OpConst64 {
11573 continue
11574 }
11575 c := auxIntToInt64(v_0_0.AuxInt)
11576 if v_1.Op != OpConst64 {
11577 continue
11578 }
11579 d := auxIntToInt64(v_1.AuxInt)
11580 if !(0 <= c && c <= d) {
11581 continue
11582 }
11583 v.reset(OpConstBool)
11584 v.AuxInt = boolToAuxInt(true)
11585 return true
11586 }
11587 break
11588 }
11589
11590
11591 for {
11592 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
11593 break
11594 }
11595 v.reset(OpConstBool)
11596 v.AuxInt = boolToAuxInt(true)
11597 return true
11598 }
11599
11600
11601 for {
11602 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
11603 break
11604 }
11605 v.reset(OpConstBool)
11606 v.AuxInt = boolToAuxInt(true)
11607 return true
11608 }
11609
11610
11611 for {
11612 if v_0.Op != OpConst32 {
11613 break
11614 }
11615 c := auxIntToInt32(v_0.AuxInt)
11616 if v_1.Op != OpConst32 {
11617 break
11618 }
11619 d := auxIntToInt32(v_1.AuxInt)
11620 v.reset(OpConstBool)
11621 v.AuxInt = boolToAuxInt(0 <= c && c <= d)
11622 return true
11623 }
11624
11625
11626 for {
11627 if v_0.Op != OpConst64 {
11628 break
11629 }
11630 c := auxIntToInt64(v_0.AuxInt)
11631 if v_1.Op != OpConst64 {
11632 break
11633 }
11634 d := auxIntToInt64(v_1.AuxInt)
11635 v.reset(OpConstBool)
11636 v.AuxInt = boolToAuxInt(0 <= c && c <= d)
11637 return true
11638 }
11639
11640
11641 for {
11642 if v_0.Op != OpSliceLen {
11643 break
11644 }
11645 x := v_0.Args[0]
11646 if v_1.Op != OpSliceCap || x != v_1.Args[0] {
11647 break
11648 }
11649 v.reset(OpConstBool)
11650 v.AuxInt = boolToAuxInt(true)
11651 return true
11652 }
11653 return false
11654 }
11655 func rewriteValuegeneric_OpLeq16(v *Value) bool {
11656 v_1 := v.Args[1]
11657 v_0 := v.Args[0]
11658 b := v.Block
11659
11660
11661 for {
11662 if v_0.Op != OpConst16 {
11663 break
11664 }
11665 c := auxIntToInt16(v_0.AuxInt)
11666 if v_1.Op != OpConst16 {
11667 break
11668 }
11669 d := auxIntToInt16(v_1.AuxInt)
11670 v.reset(OpConstBool)
11671 v.AuxInt = boolToAuxInt(c <= d)
11672 return true
11673 }
11674
11675
11676
11677 for {
11678 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 || v_1.Op != OpAnd16 {
11679 break
11680 }
11681 _ = v_1.Args[1]
11682 v_1_0 := v_1.Args[0]
11683 v_1_1 := v_1.Args[1]
11684 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
11685 if v_1_1.Op != OpConst16 {
11686 continue
11687 }
11688 c := auxIntToInt16(v_1_1.AuxInt)
11689 if !(c >= 0) {
11690 continue
11691 }
11692 v.reset(OpConstBool)
11693 v.AuxInt = boolToAuxInt(true)
11694 return true
11695 }
11696 break
11697 }
11698
11699
11700
11701 for {
11702 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 || v_1.Op != OpRsh16Ux64 {
11703 break
11704 }
11705 _ = v_1.Args[1]
11706 v_1_1 := v_1.Args[1]
11707 if v_1_1.Op != OpConst64 {
11708 break
11709 }
11710 c := auxIntToInt64(v_1_1.AuxInt)
11711 if !(c > 0) {
11712 break
11713 }
11714 v.reset(OpConstBool)
11715 v.AuxInt = boolToAuxInt(true)
11716 return true
11717 }
11718
11719
11720 for {
11721 x := v_0
11722 if v_1.Op != OpConst16 {
11723 break
11724 }
11725 t := v_1.Type
11726 if auxIntToInt16(v_1.AuxInt) != -1 {
11727 break
11728 }
11729 v.reset(OpLess16)
11730 v0 := b.NewValue0(v.Pos, OpConst16, t)
11731 v0.AuxInt = int16ToAuxInt(0)
11732 v.AddArg2(x, v0)
11733 return true
11734 }
11735
11736
11737 for {
11738 if v_0.Op != OpConst16 {
11739 break
11740 }
11741 t := v_0.Type
11742 if auxIntToInt16(v_0.AuxInt) != 1 {
11743 break
11744 }
11745 x := v_1
11746 v.reset(OpLess16)
11747 v0 := b.NewValue0(v.Pos, OpConst16, t)
11748 v0.AuxInt = int16ToAuxInt(0)
11749 v.AddArg2(v0, x)
11750 return true
11751 }
11752
11753
11754 for {
11755 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != math.MinInt16 {
11756 break
11757 }
11758 v.reset(OpConstBool)
11759 v.AuxInt = boolToAuxInt(true)
11760 return true
11761 }
11762
11763
11764 for {
11765 if v_1.Op != OpConst16 || auxIntToInt16(v_1.AuxInt) != math.MaxInt16 {
11766 break
11767 }
11768 v.reset(OpConstBool)
11769 v.AuxInt = boolToAuxInt(true)
11770 return true
11771 }
11772
11773
11774 for {
11775 x := v_0
11776 c := v_1
11777 if c.Op != OpConst16 || auxIntToInt16(c.AuxInt) != math.MinInt16 {
11778 break
11779 }
11780 v.reset(OpEq16)
11781 v.AddArg2(x, c)
11782 return true
11783 }
11784
11785
11786 for {
11787 c := v_0
11788 if c.Op != OpConst16 || auxIntToInt16(c.AuxInt) != math.MaxInt16 {
11789 break
11790 }
11791 x := v_1
11792 v.reset(OpEq16)
11793 v.AddArg2(x, c)
11794 return true
11795 }
11796 return false
11797 }
11798 func rewriteValuegeneric_OpLeq16U(v *Value) bool {
11799 v_1 := v.Args[1]
11800 v_0 := v.Args[0]
11801 b := v.Block
11802
11803
11804 for {
11805 if v_0.Op != OpConst16 {
11806 break
11807 }
11808 c := auxIntToInt16(v_0.AuxInt)
11809 if v_1.Op != OpConst16 {
11810 break
11811 }
11812 d := auxIntToInt16(v_1.AuxInt)
11813 v.reset(OpConstBool)
11814 v.AuxInt = boolToAuxInt(uint16(c) <= uint16(d))
11815 return true
11816 }
11817
11818
11819 for {
11820 if v_0.Op != OpConst16 {
11821 break
11822 }
11823 t := v_0.Type
11824 if auxIntToInt16(v_0.AuxInt) != 1 {
11825 break
11826 }
11827 x := v_1
11828 v.reset(OpNeq16)
11829 v0 := b.NewValue0(v.Pos, OpConst16, t)
11830 v0.AuxInt = int16ToAuxInt(0)
11831 v.AddArg2(v0, x)
11832 return true
11833 }
11834
11835
11836 for {
11837 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 {
11838 break
11839 }
11840 v.reset(OpConstBool)
11841 v.AuxInt = boolToAuxInt(true)
11842 return true
11843 }
11844
11845
11846 for {
11847 if v_1.Op != OpConst16 || auxIntToInt16(v_1.AuxInt) != -1 {
11848 break
11849 }
11850 v.reset(OpConstBool)
11851 v.AuxInt = boolToAuxInt(true)
11852 return true
11853 }
11854
11855
11856 for {
11857 x := v_0
11858 c := v_1
11859 if c.Op != OpConst16 || auxIntToInt16(c.AuxInt) != 0 {
11860 break
11861 }
11862 v.reset(OpEq16)
11863 v.AddArg2(x, c)
11864 return true
11865 }
11866
11867
11868 for {
11869 c := v_0
11870 if c.Op != OpConst16 || auxIntToInt16(c.AuxInt) != -1 {
11871 break
11872 }
11873 x := v_1
11874 v.reset(OpEq16)
11875 v.AddArg2(x, c)
11876 return true
11877 }
11878 return false
11879 }
11880 func rewriteValuegeneric_OpLeq32(v *Value) bool {
11881 v_1 := v.Args[1]
11882 v_0 := v.Args[0]
11883 b := v.Block
11884
11885
11886 for {
11887 if v_0.Op != OpConst32 {
11888 break
11889 }
11890 c := auxIntToInt32(v_0.AuxInt)
11891 if v_1.Op != OpConst32 {
11892 break
11893 }
11894 d := auxIntToInt32(v_1.AuxInt)
11895 v.reset(OpConstBool)
11896 v.AuxInt = boolToAuxInt(c <= d)
11897 return true
11898 }
11899
11900
11901
11902 for {
11903 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 || v_1.Op != OpAnd32 {
11904 break
11905 }
11906 _ = v_1.Args[1]
11907 v_1_0 := v_1.Args[0]
11908 v_1_1 := v_1.Args[1]
11909 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
11910 if v_1_1.Op != OpConst32 {
11911 continue
11912 }
11913 c := auxIntToInt32(v_1_1.AuxInt)
11914 if !(c >= 0) {
11915 continue
11916 }
11917 v.reset(OpConstBool)
11918 v.AuxInt = boolToAuxInt(true)
11919 return true
11920 }
11921 break
11922 }
11923
11924
11925
11926 for {
11927 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 || v_1.Op != OpRsh32Ux64 {
11928 break
11929 }
11930 _ = v_1.Args[1]
11931 v_1_1 := v_1.Args[1]
11932 if v_1_1.Op != OpConst64 {
11933 break
11934 }
11935 c := auxIntToInt64(v_1_1.AuxInt)
11936 if !(c > 0) {
11937 break
11938 }
11939 v.reset(OpConstBool)
11940 v.AuxInt = boolToAuxInt(true)
11941 return true
11942 }
11943
11944
11945 for {
11946 x := v_0
11947 if v_1.Op != OpConst32 {
11948 break
11949 }
11950 t := v_1.Type
11951 if auxIntToInt32(v_1.AuxInt) != -1 {
11952 break
11953 }
11954 v.reset(OpLess32)
11955 v0 := b.NewValue0(v.Pos, OpConst32, t)
11956 v0.AuxInt = int32ToAuxInt(0)
11957 v.AddArg2(x, v0)
11958 return true
11959 }
11960
11961
11962 for {
11963 if v_0.Op != OpConst32 {
11964 break
11965 }
11966 t := v_0.Type
11967 if auxIntToInt32(v_0.AuxInt) != 1 {
11968 break
11969 }
11970 x := v_1
11971 v.reset(OpLess32)
11972 v0 := b.NewValue0(v.Pos, OpConst32, t)
11973 v0.AuxInt = int32ToAuxInt(0)
11974 v.AddArg2(v0, x)
11975 return true
11976 }
11977
11978
11979 for {
11980 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != math.MinInt32 {
11981 break
11982 }
11983 v.reset(OpConstBool)
11984 v.AuxInt = boolToAuxInt(true)
11985 return true
11986 }
11987
11988
11989 for {
11990 if v_1.Op != OpConst32 || auxIntToInt32(v_1.AuxInt) != math.MaxInt32 {
11991 break
11992 }
11993 v.reset(OpConstBool)
11994 v.AuxInt = boolToAuxInt(true)
11995 return true
11996 }
11997
11998
11999 for {
12000 x := v_0
12001 c := v_1
12002 if c.Op != OpConst32 || auxIntToInt32(c.AuxInt) != math.MinInt32 {
12003 break
12004 }
12005 v.reset(OpEq32)
12006 v.AddArg2(x, c)
12007 return true
12008 }
12009
12010
12011 for {
12012 c := v_0
12013 if c.Op != OpConst32 || auxIntToInt32(c.AuxInt) != math.MaxInt32 {
12014 break
12015 }
12016 x := v_1
12017 v.reset(OpEq32)
12018 v.AddArg2(x, c)
12019 return true
12020 }
12021 return false
12022 }
12023 func rewriteValuegeneric_OpLeq32F(v *Value) bool {
12024 v_1 := v.Args[1]
12025 v_0 := v.Args[0]
12026
12027
12028 for {
12029 if v_0.Op != OpConst32F {
12030 break
12031 }
12032 c := auxIntToFloat32(v_0.AuxInt)
12033 if v_1.Op != OpConst32F {
12034 break
12035 }
12036 d := auxIntToFloat32(v_1.AuxInt)
12037 v.reset(OpConstBool)
12038 v.AuxInt = boolToAuxInt(c <= d)
12039 return true
12040 }
12041 return false
12042 }
12043 func rewriteValuegeneric_OpLeq32U(v *Value) bool {
12044 v_1 := v.Args[1]
12045 v_0 := v.Args[0]
12046 b := v.Block
12047
12048
12049 for {
12050 if v_0.Op != OpConst32 {
12051 break
12052 }
12053 c := auxIntToInt32(v_0.AuxInt)
12054 if v_1.Op != OpConst32 {
12055 break
12056 }
12057 d := auxIntToInt32(v_1.AuxInt)
12058 v.reset(OpConstBool)
12059 v.AuxInt = boolToAuxInt(uint32(c) <= uint32(d))
12060 return true
12061 }
12062
12063
12064 for {
12065 if v_0.Op != OpConst32 {
12066 break
12067 }
12068 t := v_0.Type
12069 if auxIntToInt32(v_0.AuxInt) != 1 {
12070 break
12071 }
12072 x := v_1
12073 v.reset(OpNeq32)
12074 v0 := b.NewValue0(v.Pos, OpConst32, t)
12075 v0.AuxInt = int32ToAuxInt(0)
12076 v.AddArg2(v0, x)
12077 return true
12078 }
12079
12080
12081 for {
12082 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
12083 break
12084 }
12085 v.reset(OpConstBool)
12086 v.AuxInt = boolToAuxInt(true)
12087 return true
12088 }
12089
12090
12091 for {
12092 if v_1.Op != OpConst32 || auxIntToInt32(v_1.AuxInt) != -1 {
12093 break
12094 }
12095 v.reset(OpConstBool)
12096 v.AuxInt = boolToAuxInt(true)
12097 return true
12098 }
12099
12100
12101 for {
12102 x := v_0
12103 c := v_1
12104 if c.Op != OpConst32 || auxIntToInt32(c.AuxInt) != 0 {
12105 break
12106 }
12107 v.reset(OpEq32)
12108 v.AddArg2(x, c)
12109 return true
12110 }
12111
12112
12113 for {
12114 c := v_0
12115 if c.Op != OpConst32 || auxIntToInt32(c.AuxInt) != -1 {
12116 break
12117 }
12118 x := v_1
12119 v.reset(OpEq32)
12120 v.AddArg2(x, c)
12121 return true
12122 }
12123 return false
12124 }
12125 func rewriteValuegeneric_OpLeq64(v *Value) bool {
12126 v_1 := v.Args[1]
12127 v_0 := v.Args[0]
12128 b := v.Block
12129
12130
12131 for {
12132 if v_0.Op != OpConst64 {
12133 break
12134 }
12135 c := auxIntToInt64(v_0.AuxInt)
12136 if v_1.Op != OpConst64 {
12137 break
12138 }
12139 d := auxIntToInt64(v_1.AuxInt)
12140 v.reset(OpConstBool)
12141 v.AuxInt = boolToAuxInt(c <= d)
12142 return true
12143 }
12144
12145
12146
12147 for {
12148 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 || v_1.Op != OpAnd64 {
12149 break
12150 }
12151 _ = v_1.Args[1]
12152 v_1_0 := v_1.Args[0]
12153 v_1_1 := v_1.Args[1]
12154 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
12155 if v_1_1.Op != OpConst64 {
12156 continue
12157 }
12158 c := auxIntToInt64(v_1_1.AuxInt)
12159 if !(c >= 0) {
12160 continue
12161 }
12162 v.reset(OpConstBool)
12163 v.AuxInt = boolToAuxInt(true)
12164 return true
12165 }
12166 break
12167 }
12168
12169
12170
12171 for {
12172 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 || v_1.Op != OpRsh64Ux64 {
12173 break
12174 }
12175 _ = v_1.Args[1]
12176 v_1_1 := v_1.Args[1]
12177 if v_1_1.Op != OpConst64 {
12178 break
12179 }
12180 c := auxIntToInt64(v_1_1.AuxInt)
12181 if !(c > 0) {
12182 break
12183 }
12184 v.reset(OpConstBool)
12185 v.AuxInt = boolToAuxInt(true)
12186 return true
12187 }
12188
12189
12190 for {
12191 x := v_0
12192 if v_1.Op != OpConst64 {
12193 break
12194 }
12195 t := v_1.Type
12196 if auxIntToInt64(v_1.AuxInt) != -1 {
12197 break
12198 }
12199 v.reset(OpLess64)
12200 v0 := b.NewValue0(v.Pos, OpConst64, t)
12201 v0.AuxInt = int64ToAuxInt(0)
12202 v.AddArg2(x, v0)
12203 return true
12204 }
12205
12206
12207 for {
12208 if v_0.Op != OpConst64 {
12209 break
12210 }
12211 t := v_0.Type
12212 if auxIntToInt64(v_0.AuxInt) != 1 {
12213 break
12214 }
12215 x := v_1
12216 v.reset(OpLess64)
12217 v0 := b.NewValue0(v.Pos, OpConst64, t)
12218 v0.AuxInt = int64ToAuxInt(0)
12219 v.AddArg2(v0, x)
12220 return true
12221 }
12222
12223
12224 for {
12225 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != math.MinInt64 {
12226 break
12227 }
12228 v.reset(OpConstBool)
12229 v.AuxInt = boolToAuxInt(true)
12230 return true
12231 }
12232
12233
12234 for {
12235 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != math.MaxInt64 {
12236 break
12237 }
12238 v.reset(OpConstBool)
12239 v.AuxInt = boolToAuxInt(true)
12240 return true
12241 }
12242
12243
12244 for {
12245 x := v_0
12246 c := v_1
12247 if c.Op != OpConst64 || auxIntToInt64(c.AuxInt) != math.MinInt64 {
12248 break
12249 }
12250 v.reset(OpEq64)
12251 v.AddArg2(x, c)
12252 return true
12253 }
12254
12255
12256 for {
12257 c := v_0
12258 if c.Op != OpConst64 || auxIntToInt64(c.AuxInt) != math.MaxInt64 {
12259 break
12260 }
12261 x := v_1
12262 v.reset(OpEq64)
12263 v.AddArg2(x, c)
12264 return true
12265 }
12266 return false
12267 }
12268 func rewriteValuegeneric_OpLeq64F(v *Value) bool {
12269 v_1 := v.Args[1]
12270 v_0 := v.Args[0]
12271
12272
12273 for {
12274 if v_0.Op != OpConst64F {
12275 break
12276 }
12277 c := auxIntToFloat64(v_0.AuxInt)
12278 if v_1.Op != OpConst64F {
12279 break
12280 }
12281 d := auxIntToFloat64(v_1.AuxInt)
12282 v.reset(OpConstBool)
12283 v.AuxInt = boolToAuxInt(c <= d)
12284 return true
12285 }
12286 return false
12287 }
12288 func rewriteValuegeneric_OpLeq64U(v *Value) bool {
12289 v_1 := v.Args[1]
12290 v_0 := v.Args[0]
12291 b := v.Block
12292
12293
12294 for {
12295 if v_0.Op != OpConst64 {
12296 break
12297 }
12298 c := auxIntToInt64(v_0.AuxInt)
12299 if v_1.Op != OpConst64 {
12300 break
12301 }
12302 d := auxIntToInt64(v_1.AuxInt)
12303 v.reset(OpConstBool)
12304 v.AuxInt = boolToAuxInt(uint64(c) <= uint64(d))
12305 return true
12306 }
12307
12308
12309 for {
12310 if v_0.Op != OpConst64 {
12311 break
12312 }
12313 t := v_0.Type
12314 if auxIntToInt64(v_0.AuxInt) != 1 {
12315 break
12316 }
12317 x := v_1
12318 v.reset(OpNeq64)
12319 v0 := b.NewValue0(v.Pos, OpConst64, t)
12320 v0.AuxInt = int64ToAuxInt(0)
12321 v.AddArg2(v0, x)
12322 return true
12323 }
12324
12325
12326 for {
12327 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
12328 break
12329 }
12330 v.reset(OpConstBool)
12331 v.AuxInt = boolToAuxInt(true)
12332 return true
12333 }
12334
12335
12336 for {
12337 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != -1 {
12338 break
12339 }
12340 v.reset(OpConstBool)
12341 v.AuxInt = boolToAuxInt(true)
12342 return true
12343 }
12344
12345
12346 for {
12347 x := v_0
12348 c := v_1
12349 if c.Op != OpConst64 || auxIntToInt64(c.AuxInt) != 0 {
12350 break
12351 }
12352 v.reset(OpEq64)
12353 v.AddArg2(x, c)
12354 return true
12355 }
12356
12357
12358 for {
12359 c := v_0
12360 if c.Op != OpConst64 || auxIntToInt64(c.AuxInt) != -1 {
12361 break
12362 }
12363 x := v_1
12364 v.reset(OpEq64)
12365 v.AddArg2(x, c)
12366 return true
12367 }
12368 return false
12369 }
12370 func rewriteValuegeneric_OpLeq8(v *Value) bool {
12371 v_1 := v.Args[1]
12372 v_0 := v.Args[0]
12373 b := v.Block
12374
12375
12376 for {
12377 if v_0.Op != OpConst8 {
12378 break
12379 }
12380 c := auxIntToInt8(v_0.AuxInt)
12381 if v_1.Op != OpConst8 {
12382 break
12383 }
12384 d := auxIntToInt8(v_1.AuxInt)
12385 v.reset(OpConstBool)
12386 v.AuxInt = boolToAuxInt(c <= d)
12387 return true
12388 }
12389
12390
12391
12392 for {
12393 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 || v_1.Op != OpAnd8 {
12394 break
12395 }
12396 _ = v_1.Args[1]
12397 v_1_0 := v_1.Args[0]
12398 v_1_1 := v_1.Args[1]
12399 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
12400 if v_1_1.Op != OpConst8 {
12401 continue
12402 }
12403 c := auxIntToInt8(v_1_1.AuxInt)
12404 if !(c >= 0) {
12405 continue
12406 }
12407 v.reset(OpConstBool)
12408 v.AuxInt = boolToAuxInt(true)
12409 return true
12410 }
12411 break
12412 }
12413
12414
12415
12416 for {
12417 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 || v_1.Op != OpRsh8Ux64 {
12418 break
12419 }
12420 _ = v_1.Args[1]
12421 v_1_1 := v_1.Args[1]
12422 if v_1_1.Op != OpConst64 {
12423 break
12424 }
12425 c := auxIntToInt64(v_1_1.AuxInt)
12426 if !(c > 0) {
12427 break
12428 }
12429 v.reset(OpConstBool)
12430 v.AuxInt = boolToAuxInt(true)
12431 return true
12432 }
12433
12434
12435 for {
12436 x := v_0
12437 if v_1.Op != OpConst8 {
12438 break
12439 }
12440 t := v_1.Type
12441 if auxIntToInt8(v_1.AuxInt) != -1 {
12442 break
12443 }
12444 v.reset(OpLess8)
12445 v0 := b.NewValue0(v.Pos, OpConst8, t)
12446 v0.AuxInt = int8ToAuxInt(0)
12447 v.AddArg2(x, v0)
12448 return true
12449 }
12450
12451
12452 for {
12453 if v_0.Op != OpConst8 {
12454 break
12455 }
12456 t := v_0.Type
12457 if auxIntToInt8(v_0.AuxInt) != 1 {
12458 break
12459 }
12460 x := v_1
12461 v.reset(OpLess8)
12462 v0 := b.NewValue0(v.Pos, OpConst8, t)
12463 v0.AuxInt = int8ToAuxInt(0)
12464 v.AddArg2(v0, x)
12465 return true
12466 }
12467
12468
12469 for {
12470 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != math.MinInt8 {
12471 break
12472 }
12473 v.reset(OpConstBool)
12474 v.AuxInt = boolToAuxInt(true)
12475 return true
12476 }
12477
12478
12479 for {
12480 if v_1.Op != OpConst8 || auxIntToInt8(v_1.AuxInt) != math.MaxInt8 {
12481 break
12482 }
12483 v.reset(OpConstBool)
12484 v.AuxInt = boolToAuxInt(true)
12485 return true
12486 }
12487
12488
12489 for {
12490 x := v_0
12491 c := v_1
12492 if c.Op != OpConst8 || auxIntToInt8(c.AuxInt) != math.MinInt8 {
12493 break
12494 }
12495 v.reset(OpEq8)
12496 v.AddArg2(x, c)
12497 return true
12498 }
12499
12500
12501 for {
12502 c := v_0
12503 if c.Op != OpConst8 || auxIntToInt8(c.AuxInt) != math.MaxInt8 {
12504 break
12505 }
12506 x := v_1
12507 v.reset(OpEq8)
12508 v.AddArg2(x, c)
12509 return true
12510 }
12511 return false
12512 }
12513 func rewriteValuegeneric_OpLeq8U(v *Value) bool {
12514 v_1 := v.Args[1]
12515 v_0 := v.Args[0]
12516 b := v.Block
12517
12518
12519 for {
12520 if v_0.Op != OpConst8 {
12521 break
12522 }
12523 c := auxIntToInt8(v_0.AuxInt)
12524 if v_1.Op != OpConst8 {
12525 break
12526 }
12527 d := auxIntToInt8(v_1.AuxInt)
12528 v.reset(OpConstBool)
12529 v.AuxInt = boolToAuxInt(uint8(c) <= uint8(d))
12530 return true
12531 }
12532
12533
12534 for {
12535 if v_0.Op != OpConst8 {
12536 break
12537 }
12538 t := v_0.Type
12539 if auxIntToInt8(v_0.AuxInt) != 1 {
12540 break
12541 }
12542 x := v_1
12543 v.reset(OpNeq8)
12544 v0 := b.NewValue0(v.Pos, OpConst8, t)
12545 v0.AuxInt = int8ToAuxInt(0)
12546 v.AddArg2(v0, x)
12547 return true
12548 }
12549
12550
12551 for {
12552 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 {
12553 break
12554 }
12555 v.reset(OpConstBool)
12556 v.AuxInt = boolToAuxInt(true)
12557 return true
12558 }
12559
12560
12561 for {
12562 if v_1.Op != OpConst8 || auxIntToInt8(v_1.AuxInt) != -1 {
12563 break
12564 }
12565 v.reset(OpConstBool)
12566 v.AuxInt = boolToAuxInt(true)
12567 return true
12568 }
12569
12570
12571 for {
12572 x := v_0
12573 c := v_1
12574 if c.Op != OpConst8 || auxIntToInt8(c.AuxInt) != 0 {
12575 break
12576 }
12577 v.reset(OpEq8)
12578 v.AddArg2(x, c)
12579 return true
12580 }
12581
12582
12583 for {
12584 c := v_0
12585 if c.Op != OpConst8 || auxIntToInt8(c.AuxInt) != -1 {
12586 break
12587 }
12588 x := v_1
12589 v.reset(OpEq8)
12590 v.AddArg2(x, c)
12591 return true
12592 }
12593 return false
12594 }
12595 func rewriteValuegeneric_OpLess16(v *Value) bool {
12596 v_1 := v.Args[1]
12597 v_0 := v.Args[0]
12598 b := v.Block
12599
12600
12601 for {
12602 if v_0.Op != OpConst16 {
12603 break
12604 }
12605 c := auxIntToInt16(v_0.AuxInt)
12606 if v_1.Op != OpConst16 {
12607 break
12608 }
12609 d := auxIntToInt16(v_1.AuxInt)
12610 v.reset(OpConstBool)
12611 v.AuxInt = boolToAuxInt(c < d)
12612 return true
12613 }
12614
12615
12616
12617 for {
12618 if v_0.Op != OpConst16 {
12619 break
12620 }
12621 t := v_0.Type
12622 if auxIntToInt16(v_0.AuxInt) != 0 {
12623 break
12624 }
12625 x := v_1
12626 if !(isNonNegative(x)) {
12627 break
12628 }
12629 v.reset(OpNeq16)
12630 v0 := b.NewValue0(v.Pos, OpConst16, t)
12631 v0.AuxInt = int16ToAuxInt(0)
12632 v.AddArg2(v0, x)
12633 return true
12634 }
12635
12636
12637
12638 for {
12639 x := v_0
12640 if v_1.Op != OpConst16 {
12641 break
12642 }
12643 t := v_1.Type
12644 if auxIntToInt16(v_1.AuxInt) != 1 || !(isNonNegative(x)) {
12645 break
12646 }
12647 v.reset(OpEq16)
12648 v0 := b.NewValue0(v.Pos, OpConst16, t)
12649 v0.AuxInt = int16ToAuxInt(0)
12650 v.AddArg2(v0, x)
12651 return true
12652 }
12653
12654
12655 for {
12656 x := v_0
12657 if v_1.Op != OpConst16 {
12658 break
12659 }
12660 t := v_1.Type
12661 if auxIntToInt16(v_1.AuxInt) != 1 {
12662 break
12663 }
12664 v.reset(OpLeq16)
12665 v0 := b.NewValue0(v.Pos, OpConst16, t)
12666 v0.AuxInt = int16ToAuxInt(0)
12667 v.AddArg2(x, v0)
12668 return true
12669 }
12670
12671
12672 for {
12673 if v_0.Op != OpConst16 {
12674 break
12675 }
12676 t := v_0.Type
12677 if auxIntToInt16(v_0.AuxInt) != -1 {
12678 break
12679 }
12680 x := v_1
12681 v.reset(OpLeq16)
12682 v0 := b.NewValue0(v.Pos, OpConst16, t)
12683 v0.AuxInt = int16ToAuxInt(0)
12684 v.AddArg2(v0, x)
12685 return true
12686 }
12687
12688
12689 for {
12690 if v_1.Op != OpConst16 || auxIntToInt16(v_1.AuxInt) != math.MinInt16 {
12691 break
12692 }
12693 v.reset(OpConstBool)
12694 v.AuxInt = boolToAuxInt(false)
12695 return true
12696 }
12697
12698
12699 for {
12700 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != math.MaxInt16 {
12701 break
12702 }
12703 v.reset(OpConstBool)
12704 v.AuxInt = boolToAuxInt(false)
12705 return true
12706 }
12707
12708
12709 for {
12710 x := v_0
12711 if v_1.Op != OpConst16 {
12712 break
12713 }
12714 t := v_1.Type
12715 if auxIntToInt16(v_1.AuxInt) != math.MinInt16+1 {
12716 break
12717 }
12718 v.reset(OpEq16)
12719 v0 := b.NewValue0(v.Pos, OpConst16, t)
12720 v0.AuxInt = int16ToAuxInt(math.MinInt16)
12721 v.AddArg2(x, v0)
12722 return true
12723 }
12724
12725
12726 for {
12727 if v_0.Op != OpConst16 {
12728 break
12729 }
12730 t := v_0.Type
12731 if auxIntToInt16(v_0.AuxInt) != math.MaxInt16-1 {
12732 break
12733 }
12734 x := v_1
12735 v.reset(OpEq16)
12736 v0 := b.NewValue0(v.Pos, OpConst16, t)
12737 v0.AuxInt = int16ToAuxInt(math.MaxInt16)
12738 v.AddArg2(x, v0)
12739 return true
12740 }
12741 return false
12742 }
12743 func rewriteValuegeneric_OpLess16U(v *Value) bool {
12744 v_1 := v.Args[1]
12745 v_0 := v.Args[0]
12746 b := v.Block
12747
12748
12749 for {
12750 if v_0.Op != OpConst16 {
12751 break
12752 }
12753 c := auxIntToInt16(v_0.AuxInt)
12754 if v_1.Op != OpConst16 {
12755 break
12756 }
12757 d := auxIntToInt16(v_1.AuxInt)
12758 v.reset(OpConstBool)
12759 v.AuxInt = boolToAuxInt(uint16(c) < uint16(d))
12760 return true
12761 }
12762
12763
12764 for {
12765 x := v_0
12766 if v_1.Op != OpConst16 {
12767 break
12768 }
12769 t := v_1.Type
12770 if auxIntToInt16(v_1.AuxInt) != 1 {
12771 break
12772 }
12773 v.reset(OpEq16)
12774 v0 := b.NewValue0(v.Pos, OpConst16, t)
12775 v0.AuxInt = int16ToAuxInt(0)
12776 v.AddArg2(v0, x)
12777 return true
12778 }
12779
12780
12781 for {
12782 if v_1.Op != OpConst16 || auxIntToInt16(v_1.AuxInt) != 0 {
12783 break
12784 }
12785 v.reset(OpConstBool)
12786 v.AuxInt = boolToAuxInt(false)
12787 return true
12788 }
12789
12790
12791 for {
12792 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != -1 {
12793 break
12794 }
12795 v.reset(OpConstBool)
12796 v.AuxInt = boolToAuxInt(false)
12797 return true
12798 }
12799
12800
12801 for {
12802 x := v_0
12803 if v_1.Op != OpConst16 {
12804 break
12805 }
12806 t := v_1.Type
12807 if auxIntToInt16(v_1.AuxInt) != 1 {
12808 break
12809 }
12810 v.reset(OpEq16)
12811 v0 := b.NewValue0(v.Pos, OpConst16, t)
12812 v0.AuxInt = int16ToAuxInt(0)
12813 v.AddArg2(x, v0)
12814 return true
12815 }
12816
12817
12818 for {
12819 if v_0.Op != OpConst16 {
12820 break
12821 }
12822 t := v_0.Type
12823 if auxIntToInt16(v_0.AuxInt) != -2 {
12824 break
12825 }
12826 x := v_1
12827 v.reset(OpEq16)
12828 v0 := b.NewValue0(v.Pos, OpConst16, t)
12829 v0.AuxInt = int16ToAuxInt(-1)
12830 v.AddArg2(x, v0)
12831 return true
12832 }
12833 return false
12834 }
12835 func rewriteValuegeneric_OpLess32(v *Value) bool {
12836 v_1 := v.Args[1]
12837 v_0 := v.Args[0]
12838 b := v.Block
12839
12840
12841 for {
12842 if v_0.Op != OpConst32 {
12843 break
12844 }
12845 c := auxIntToInt32(v_0.AuxInt)
12846 if v_1.Op != OpConst32 {
12847 break
12848 }
12849 d := auxIntToInt32(v_1.AuxInt)
12850 v.reset(OpConstBool)
12851 v.AuxInt = boolToAuxInt(c < d)
12852 return true
12853 }
12854
12855
12856
12857 for {
12858 if v_0.Op != OpConst32 {
12859 break
12860 }
12861 t := v_0.Type
12862 if auxIntToInt32(v_0.AuxInt) != 0 {
12863 break
12864 }
12865 x := v_1
12866 if !(isNonNegative(x)) {
12867 break
12868 }
12869 v.reset(OpNeq32)
12870 v0 := b.NewValue0(v.Pos, OpConst32, t)
12871 v0.AuxInt = int32ToAuxInt(0)
12872 v.AddArg2(v0, x)
12873 return true
12874 }
12875
12876
12877
12878 for {
12879 x := v_0
12880 if v_1.Op != OpConst32 {
12881 break
12882 }
12883 t := v_1.Type
12884 if auxIntToInt32(v_1.AuxInt) != 1 || !(isNonNegative(x)) {
12885 break
12886 }
12887 v.reset(OpEq32)
12888 v0 := b.NewValue0(v.Pos, OpConst32, t)
12889 v0.AuxInt = int32ToAuxInt(0)
12890 v.AddArg2(v0, x)
12891 return true
12892 }
12893
12894
12895 for {
12896 x := v_0
12897 if v_1.Op != OpConst32 {
12898 break
12899 }
12900 t := v_1.Type
12901 if auxIntToInt32(v_1.AuxInt) != 1 {
12902 break
12903 }
12904 v.reset(OpLeq32)
12905 v0 := b.NewValue0(v.Pos, OpConst32, t)
12906 v0.AuxInt = int32ToAuxInt(0)
12907 v.AddArg2(x, v0)
12908 return true
12909 }
12910
12911
12912 for {
12913 if v_0.Op != OpConst32 {
12914 break
12915 }
12916 t := v_0.Type
12917 if auxIntToInt32(v_0.AuxInt) != -1 {
12918 break
12919 }
12920 x := v_1
12921 v.reset(OpLeq32)
12922 v0 := b.NewValue0(v.Pos, OpConst32, t)
12923 v0.AuxInt = int32ToAuxInt(0)
12924 v.AddArg2(v0, x)
12925 return true
12926 }
12927
12928
12929 for {
12930 if v_1.Op != OpConst32 || auxIntToInt32(v_1.AuxInt) != math.MinInt32 {
12931 break
12932 }
12933 v.reset(OpConstBool)
12934 v.AuxInt = boolToAuxInt(false)
12935 return true
12936 }
12937
12938
12939 for {
12940 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != math.MaxInt32 {
12941 break
12942 }
12943 v.reset(OpConstBool)
12944 v.AuxInt = boolToAuxInt(false)
12945 return true
12946 }
12947
12948
12949 for {
12950 x := v_0
12951 if v_1.Op != OpConst32 {
12952 break
12953 }
12954 t := v_1.Type
12955 if auxIntToInt32(v_1.AuxInt) != math.MinInt32+1 {
12956 break
12957 }
12958 v.reset(OpEq32)
12959 v0 := b.NewValue0(v.Pos, OpConst32, t)
12960 v0.AuxInt = int32ToAuxInt(math.MinInt32)
12961 v.AddArg2(x, v0)
12962 return true
12963 }
12964
12965
12966 for {
12967 if v_0.Op != OpConst32 {
12968 break
12969 }
12970 t := v_0.Type
12971 if auxIntToInt32(v_0.AuxInt) != math.MaxInt32-1 {
12972 break
12973 }
12974 x := v_1
12975 v.reset(OpEq32)
12976 v0 := b.NewValue0(v.Pos, OpConst32, t)
12977 v0.AuxInt = int32ToAuxInt(math.MaxInt32)
12978 v.AddArg2(x, v0)
12979 return true
12980 }
12981 return false
12982 }
12983 func rewriteValuegeneric_OpLess32F(v *Value) bool {
12984 v_1 := v.Args[1]
12985 v_0 := v.Args[0]
12986
12987
12988 for {
12989 if v_0.Op != OpConst32F {
12990 break
12991 }
12992 c := auxIntToFloat32(v_0.AuxInt)
12993 if v_1.Op != OpConst32F {
12994 break
12995 }
12996 d := auxIntToFloat32(v_1.AuxInt)
12997 v.reset(OpConstBool)
12998 v.AuxInt = boolToAuxInt(c < d)
12999 return true
13000 }
13001 return false
13002 }
13003 func rewriteValuegeneric_OpLess32U(v *Value) bool {
13004 v_1 := v.Args[1]
13005 v_0 := v.Args[0]
13006 b := v.Block
13007
13008
13009 for {
13010 if v_0.Op != OpConst32 {
13011 break
13012 }
13013 c := auxIntToInt32(v_0.AuxInt)
13014 if v_1.Op != OpConst32 {
13015 break
13016 }
13017 d := auxIntToInt32(v_1.AuxInt)
13018 v.reset(OpConstBool)
13019 v.AuxInt = boolToAuxInt(uint32(c) < uint32(d))
13020 return true
13021 }
13022
13023
13024 for {
13025 x := v_0
13026 if v_1.Op != OpConst32 {
13027 break
13028 }
13029 t := v_1.Type
13030 if auxIntToInt32(v_1.AuxInt) != 1 {
13031 break
13032 }
13033 v.reset(OpEq32)
13034 v0 := b.NewValue0(v.Pos, OpConst32, t)
13035 v0.AuxInt = int32ToAuxInt(0)
13036 v.AddArg2(v0, x)
13037 return true
13038 }
13039
13040
13041 for {
13042 if v_1.Op != OpConst32 || auxIntToInt32(v_1.AuxInt) != 0 {
13043 break
13044 }
13045 v.reset(OpConstBool)
13046 v.AuxInt = boolToAuxInt(false)
13047 return true
13048 }
13049
13050
13051 for {
13052 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != -1 {
13053 break
13054 }
13055 v.reset(OpConstBool)
13056 v.AuxInt = boolToAuxInt(false)
13057 return true
13058 }
13059
13060
13061 for {
13062 x := v_0
13063 if v_1.Op != OpConst32 {
13064 break
13065 }
13066 t := v_1.Type
13067 if auxIntToInt32(v_1.AuxInt) != 1 {
13068 break
13069 }
13070 v.reset(OpEq32)
13071 v0 := b.NewValue0(v.Pos, OpConst32, t)
13072 v0.AuxInt = int32ToAuxInt(0)
13073 v.AddArg2(x, v0)
13074 return true
13075 }
13076
13077
13078 for {
13079 if v_0.Op != OpConst32 {
13080 break
13081 }
13082 t := v_0.Type
13083 if auxIntToInt32(v_0.AuxInt) != -2 {
13084 break
13085 }
13086 x := v_1
13087 v.reset(OpEq32)
13088 v0 := b.NewValue0(v.Pos, OpConst32, t)
13089 v0.AuxInt = int32ToAuxInt(-1)
13090 v.AddArg2(x, v0)
13091 return true
13092 }
13093 return false
13094 }
13095 func rewriteValuegeneric_OpLess64(v *Value) bool {
13096 v_1 := v.Args[1]
13097 v_0 := v.Args[0]
13098 b := v.Block
13099
13100
13101 for {
13102 if v_0.Op != OpConst64 {
13103 break
13104 }
13105 c := auxIntToInt64(v_0.AuxInt)
13106 if v_1.Op != OpConst64 {
13107 break
13108 }
13109 d := auxIntToInt64(v_1.AuxInt)
13110 v.reset(OpConstBool)
13111 v.AuxInt = boolToAuxInt(c < d)
13112 return true
13113 }
13114
13115
13116
13117 for {
13118 if v_0.Op != OpConst64 {
13119 break
13120 }
13121 t := v_0.Type
13122 if auxIntToInt64(v_0.AuxInt) != 0 {
13123 break
13124 }
13125 x := v_1
13126 if !(isNonNegative(x)) {
13127 break
13128 }
13129 v.reset(OpNeq64)
13130 v0 := b.NewValue0(v.Pos, OpConst64, t)
13131 v0.AuxInt = int64ToAuxInt(0)
13132 v.AddArg2(v0, x)
13133 return true
13134 }
13135
13136
13137
13138 for {
13139 x := v_0
13140 if v_1.Op != OpConst64 {
13141 break
13142 }
13143 t := v_1.Type
13144 if auxIntToInt64(v_1.AuxInt) != 1 || !(isNonNegative(x)) {
13145 break
13146 }
13147 v.reset(OpEq64)
13148 v0 := b.NewValue0(v.Pos, OpConst64, t)
13149 v0.AuxInt = int64ToAuxInt(0)
13150 v.AddArg2(v0, x)
13151 return true
13152 }
13153
13154
13155 for {
13156 x := v_0
13157 if v_1.Op != OpConst64 {
13158 break
13159 }
13160 t := v_1.Type
13161 if auxIntToInt64(v_1.AuxInt) != 1 {
13162 break
13163 }
13164 v.reset(OpLeq64)
13165 v0 := b.NewValue0(v.Pos, OpConst64, t)
13166 v0.AuxInt = int64ToAuxInt(0)
13167 v.AddArg2(x, v0)
13168 return true
13169 }
13170
13171
13172 for {
13173 if v_0.Op != OpConst64 {
13174 break
13175 }
13176 t := v_0.Type
13177 if auxIntToInt64(v_0.AuxInt) != -1 {
13178 break
13179 }
13180 x := v_1
13181 v.reset(OpLeq64)
13182 v0 := b.NewValue0(v.Pos, OpConst64, t)
13183 v0.AuxInt = int64ToAuxInt(0)
13184 v.AddArg2(v0, x)
13185 return true
13186 }
13187
13188
13189 for {
13190 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != math.MinInt64 {
13191 break
13192 }
13193 v.reset(OpConstBool)
13194 v.AuxInt = boolToAuxInt(false)
13195 return true
13196 }
13197
13198
13199 for {
13200 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != math.MaxInt64 {
13201 break
13202 }
13203 v.reset(OpConstBool)
13204 v.AuxInt = boolToAuxInt(false)
13205 return true
13206 }
13207
13208
13209 for {
13210 x := v_0
13211 if v_1.Op != OpConst64 {
13212 break
13213 }
13214 t := v_1.Type
13215 if auxIntToInt64(v_1.AuxInt) != math.MinInt64+1 {
13216 break
13217 }
13218 v.reset(OpEq64)
13219 v0 := b.NewValue0(v.Pos, OpConst64, t)
13220 v0.AuxInt = int64ToAuxInt(math.MinInt64)
13221 v.AddArg2(x, v0)
13222 return true
13223 }
13224
13225
13226 for {
13227 if v_0.Op != OpConst64 {
13228 break
13229 }
13230 t := v_0.Type
13231 if auxIntToInt64(v_0.AuxInt) != math.MaxInt64-1 {
13232 break
13233 }
13234 x := v_1
13235 v.reset(OpEq64)
13236 v0 := b.NewValue0(v.Pos, OpConst64, t)
13237 v0.AuxInt = int64ToAuxInt(math.MaxInt64)
13238 v.AddArg2(x, v0)
13239 return true
13240 }
13241 return false
13242 }
13243 func rewriteValuegeneric_OpLess64F(v *Value) bool {
13244 v_1 := v.Args[1]
13245 v_0 := v.Args[0]
13246
13247
13248 for {
13249 if v_0.Op != OpConst64F {
13250 break
13251 }
13252 c := auxIntToFloat64(v_0.AuxInt)
13253 if v_1.Op != OpConst64F {
13254 break
13255 }
13256 d := auxIntToFloat64(v_1.AuxInt)
13257 v.reset(OpConstBool)
13258 v.AuxInt = boolToAuxInt(c < d)
13259 return true
13260 }
13261 return false
13262 }
13263 func rewriteValuegeneric_OpLess64U(v *Value) bool {
13264 v_1 := v.Args[1]
13265 v_0 := v.Args[0]
13266 b := v.Block
13267
13268
13269 for {
13270 if v_0.Op != OpConst64 {
13271 break
13272 }
13273 c := auxIntToInt64(v_0.AuxInt)
13274 if v_1.Op != OpConst64 {
13275 break
13276 }
13277 d := auxIntToInt64(v_1.AuxInt)
13278 v.reset(OpConstBool)
13279 v.AuxInt = boolToAuxInt(uint64(c) < uint64(d))
13280 return true
13281 }
13282
13283
13284 for {
13285 x := v_0
13286 if v_1.Op != OpConst64 {
13287 break
13288 }
13289 t := v_1.Type
13290 if auxIntToInt64(v_1.AuxInt) != 1 {
13291 break
13292 }
13293 v.reset(OpEq64)
13294 v0 := b.NewValue0(v.Pos, OpConst64, t)
13295 v0.AuxInt = int64ToAuxInt(0)
13296 v.AddArg2(v0, x)
13297 return true
13298 }
13299
13300
13301 for {
13302 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 0 {
13303 break
13304 }
13305 v.reset(OpConstBool)
13306 v.AuxInt = boolToAuxInt(false)
13307 return true
13308 }
13309
13310
13311 for {
13312 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != -1 {
13313 break
13314 }
13315 v.reset(OpConstBool)
13316 v.AuxInt = boolToAuxInt(false)
13317 return true
13318 }
13319
13320
13321 for {
13322 x := v_0
13323 if v_1.Op != OpConst64 {
13324 break
13325 }
13326 t := v_1.Type
13327 if auxIntToInt64(v_1.AuxInt) != 1 {
13328 break
13329 }
13330 v.reset(OpEq64)
13331 v0 := b.NewValue0(v.Pos, OpConst64, t)
13332 v0.AuxInt = int64ToAuxInt(0)
13333 v.AddArg2(x, v0)
13334 return true
13335 }
13336
13337
13338 for {
13339 if v_0.Op != OpConst64 {
13340 break
13341 }
13342 t := v_0.Type
13343 if auxIntToInt64(v_0.AuxInt) != -2 {
13344 break
13345 }
13346 x := v_1
13347 v.reset(OpEq64)
13348 v0 := b.NewValue0(v.Pos, OpConst64, t)
13349 v0.AuxInt = int64ToAuxInt(-1)
13350 v.AddArg2(x, v0)
13351 return true
13352 }
13353 return false
13354 }
13355 func rewriteValuegeneric_OpLess8(v *Value) bool {
13356 v_1 := v.Args[1]
13357 v_0 := v.Args[0]
13358 b := v.Block
13359
13360
13361 for {
13362 if v_0.Op != OpConst8 {
13363 break
13364 }
13365 c := auxIntToInt8(v_0.AuxInt)
13366 if v_1.Op != OpConst8 {
13367 break
13368 }
13369 d := auxIntToInt8(v_1.AuxInt)
13370 v.reset(OpConstBool)
13371 v.AuxInt = boolToAuxInt(c < d)
13372 return true
13373 }
13374
13375
13376
13377 for {
13378 if v_0.Op != OpConst8 {
13379 break
13380 }
13381 t := v_0.Type
13382 if auxIntToInt8(v_0.AuxInt) != 0 {
13383 break
13384 }
13385 x := v_1
13386 if !(isNonNegative(x)) {
13387 break
13388 }
13389 v.reset(OpNeq8)
13390 v0 := b.NewValue0(v.Pos, OpConst8, t)
13391 v0.AuxInt = int8ToAuxInt(0)
13392 v.AddArg2(v0, x)
13393 return true
13394 }
13395
13396
13397
13398 for {
13399 x := v_0
13400 if v_1.Op != OpConst8 {
13401 break
13402 }
13403 t := v_1.Type
13404 if auxIntToInt8(v_1.AuxInt) != 1 || !(isNonNegative(x)) {
13405 break
13406 }
13407 v.reset(OpEq8)
13408 v0 := b.NewValue0(v.Pos, OpConst8, t)
13409 v0.AuxInt = int8ToAuxInt(0)
13410 v.AddArg2(v0, x)
13411 return true
13412 }
13413
13414
13415 for {
13416 x := v_0
13417 if v_1.Op != OpConst8 {
13418 break
13419 }
13420 t := v_1.Type
13421 if auxIntToInt8(v_1.AuxInt) != 1 {
13422 break
13423 }
13424 v.reset(OpLeq8)
13425 v0 := b.NewValue0(v.Pos, OpConst8, t)
13426 v0.AuxInt = int8ToAuxInt(0)
13427 v.AddArg2(x, v0)
13428 return true
13429 }
13430
13431
13432 for {
13433 if v_0.Op != OpConst8 {
13434 break
13435 }
13436 t := v_0.Type
13437 if auxIntToInt8(v_0.AuxInt) != -1 {
13438 break
13439 }
13440 x := v_1
13441 v.reset(OpLeq8)
13442 v0 := b.NewValue0(v.Pos, OpConst8, t)
13443 v0.AuxInt = int8ToAuxInt(0)
13444 v.AddArg2(v0, x)
13445 return true
13446 }
13447
13448
13449 for {
13450 if v_1.Op != OpConst8 || auxIntToInt8(v_1.AuxInt) != math.MinInt8 {
13451 break
13452 }
13453 v.reset(OpConstBool)
13454 v.AuxInt = boolToAuxInt(false)
13455 return true
13456 }
13457
13458
13459 for {
13460 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != math.MaxInt8 {
13461 break
13462 }
13463 v.reset(OpConstBool)
13464 v.AuxInt = boolToAuxInt(false)
13465 return true
13466 }
13467
13468
13469 for {
13470 x := v_0
13471 if v_1.Op != OpConst8 {
13472 break
13473 }
13474 t := v_1.Type
13475 if auxIntToInt8(v_1.AuxInt) != math.MinInt8+1 {
13476 break
13477 }
13478 v.reset(OpEq8)
13479 v0 := b.NewValue0(v.Pos, OpConst8, t)
13480 v0.AuxInt = int8ToAuxInt(math.MinInt8)
13481 v.AddArg2(x, v0)
13482 return true
13483 }
13484
13485
13486 for {
13487 if v_0.Op != OpConst8 {
13488 break
13489 }
13490 t := v_0.Type
13491 if auxIntToInt8(v_0.AuxInt) != math.MaxInt8-1 {
13492 break
13493 }
13494 x := v_1
13495 v.reset(OpEq8)
13496 v0 := b.NewValue0(v.Pos, OpConst8, t)
13497 v0.AuxInt = int8ToAuxInt(math.MaxInt8)
13498 v.AddArg2(x, v0)
13499 return true
13500 }
13501 return false
13502 }
13503 func rewriteValuegeneric_OpLess8U(v *Value) bool {
13504 v_1 := v.Args[1]
13505 v_0 := v.Args[0]
13506 b := v.Block
13507
13508
13509 for {
13510 if v_0.Op != OpConst8 {
13511 break
13512 }
13513 c := auxIntToInt8(v_0.AuxInt)
13514 if v_1.Op != OpConst8 {
13515 break
13516 }
13517 d := auxIntToInt8(v_1.AuxInt)
13518 v.reset(OpConstBool)
13519 v.AuxInt = boolToAuxInt(uint8(c) < uint8(d))
13520 return true
13521 }
13522
13523
13524 for {
13525 x := v_0
13526 if v_1.Op != OpConst8 {
13527 break
13528 }
13529 t := v_1.Type
13530 if auxIntToInt8(v_1.AuxInt) != 1 {
13531 break
13532 }
13533 v.reset(OpEq8)
13534 v0 := b.NewValue0(v.Pos, OpConst8, t)
13535 v0.AuxInt = int8ToAuxInt(0)
13536 v.AddArg2(v0, x)
13537 return true
13538 }
13539
13540
13541 for {
13542 if v_1.Op != OpConst8 || auxIntToInt8(v_1.AuxInt) != 0 {
13543 break
13544 }
13545 v.reset(OpConstBool)
13546 v.AuxInt = boolToAuxInt(false)
13547 return true
13548 }
13549
13550
13551 for {
13552 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != -1 {
13553 break
13554 }
13555 v.reset(OpConstBool)
13556 v.AuxInt = boolToAuxInt(false)
13557 return true
13558 }
13559
13560
13561 for {
13562 x := v_0
13563 if v_1.Op != OpConst8 {
13564 break
13565 }
13566 t := v_1.Type
13567 if auxIntToInt8(v_1.AuxInt) != 1 {
13568 break
13569 }
13570 v.reset(OpEq8)
13571 v0 := b.NewValue0(v.Pos, OpConst8, t)
13572 v0.AuxInt = int8ToAuxInt(0)
13573 v.AddArg2(x, v0)
13574 return true
13575 }
13576
13577
13578 for {
13579 if v_0.Op != OpConst8 {
13580 break
13581 }
13582 t := v_0.Type
13583 if auxIntToInt8(v_0.AuxInt) != -2 {
13584 break
13585 }
13586 x := v_1
13587 v.reset(OpEq8)
13588 v0 := b.NewValue0(v.Pos, OpConst8, t)
13589 v0.AuxInt = int8ToAuxInt(-1)
13590 v.AddArg2(x, v0)
13591 return true
13592 }
13593 return false
13594 }
13595 func rewriteValuegeneric_OpLoad(v *Value) bool {
13596 v_1 := v.Args[1]
13597 v_0 := v.Args[0]
13598 b := v.Block
13599 config := b.Func.Config
13600 typ := &b.Func.Config.Types
13601
13602
13603
13604 for {
13605 t1 := v.Type
13606 p1 := v_0
13607 if v_1.Op != OpStore {
13608 break
13609 }
13610 t2 := auxToType(v_1.Aux)
13611 x := v_1.Args[1]
13612 p2 := v_1.Args[0]
13613 if !(isSamePtr(p1, p2) && copyCompatibleType(t1, x.Type) && t1.Size() == t2.Size()) {
13614 break
13615 }
13616 v.copyOf(x)
13617 return true
13618 }
13619
13620
13621
13622 for {
13623 t1 := v.Type
13624 p1 := v_0
13625 if v_1.Op != OpStore {
13626 break
13627 }
13628 t2 := auxToType(v_1.Aux)
13629 _ = v_1.Args[2]
13630 p2 := v_1.Args[0]
13631 v_1_2 := v_1.Args[2]
13632 if v_1_2.Op != OpStore {
13633 break
13634 }
13635 t3 := auxToType(v_1_2.Aux)
13636 x := v_1_2.Args[1]
13637 p3 := v_1_2.Args[0]
13638 if !(isSamePtr(p1, p3) && copyCompatibleType(t1, x.Type) && t1.Size() == t3.Size() && disjoint(p3, t3.Size(), p2, t2.Size())) {
13639 break
13640 }
13641 v.copyOf(x)
13642 return true
13643 }
13644
13645
13646
13647 for {
13648 t1 := v.Type
13649 p1 := v_0
13650 if v_1.Op != OpStore {
13651 break
13652 }
13653 t2 := auxToType(v_1.Aux)
13654 _ = v_1.Args[2]
13655 p2 := v_1.Args[0]
13656 v_1_2 := v_1.Args[2]
13657 if v_1_2.Op != OpStore {
13658 break
13659 }
13660 t3 := auxToType(v_1_2.Aux)
13661 _ = v_1_2.Args[2]
13662 p3 := v_1_2.Args[0]
13663 v_1_2_2 := v_1_2.Args[2]
13664 if v_1_2_2.Op != OpStore {
13665 break
13666 }
13667 t4 := auxToType(v_1_2_2.Aux)
13668 x := v_1_2_2.Args[1]
13669 p4 := v_1_2_2.Args[0]
13670 if !(isSamePtr(p1, p4) && copyCompatibleType(t1, x.Type) && t1.Size() == t4.Size() && disjoint(p4, t4.Size(), p2, t2.Size()) && disjoint(p4, t4.Size(), p3, t3.Size())) {
13671 break
13672 }
13673 v.copyOf(x)
13674 return true
13675 }
13676
13677
13678
13679 for {
13680 t1 := v.Type
13681 p1 := v_0
13682 if v_1.Op != OpStore {
13683 break
13684 }
13685 t2 := auxToType(v_1.Aux)
13686 _ = v_1.Args[2]
13687 p2 := v_1.Args[0]
13688 v_1_2 := v_1.Args[2]
13689 if v_1_2.Op != OpStore {
13690 break
13691 }
13692 t3 := auxToType(v_1_2.Aux)
13693 _ = v_1_2.Args[2]
13694 p3 := v_1_2.Args[0]
13695 v_1_2_2 := v_1_2.Args[2]
13696 if v_1_2_2.Op != OpStore {
13697 break
13698 }
13699 t4 := auxToType(v_1_2_2.Aux)
13700 _ = v_1_2_2.Args[2]
13701 p4 := v_1_2_2.Args[0]
13702 v_1_2_2_2 := v_1_2_2.Args[2]
13703 if v_1_2_2_2.Op != OpStore {
13704 break
13705 }
13706 t5 := auxToType(v_1_2_2_2.Aux)
13707 x := v_1_2_2_2.Args[1]
13708 p5 := v_1_2_2_2.Args[0]
13709 if !(isSamePtr(p1, p5) && copyCompatibleType(t1, x.Type) && t1.Size() == t5.Size() && disjoint(p5, t5.Size(), p2, t2.Size()) && disjoint(p5, t5.Size(), p3, t3.Size()) && disjoint(p5, t5.Size(), p4, t4.Size())) {
13710 break
13711 }
13712 v.copyOf(x)
13713 return true
13714 }
13715
13716
13717
13718 for {
13719 t1 := v.Type
13720 p1 := v_0
13721 if v_1.Op != OpStore {
13722 break
13723 }
13724 t2 := auxToType(v_1.Aux)
13725 _ = v_1.Args[1]
13726 p2 := v_1.Args[0]
13727 v_1_1 := v_1.Args[1]
13728 if v_1_1.Op != OpConst64 {
13729 break
13730 }
13731 x := auxIntToInt64(v_1_1.AuxInt)
13732 if !(isSamePtr(p1, p2) && t2.Size() == 8 && is64BitFloat(t1) && !math.IsNaN(math.Float64frombits(uint64(x)))) {
13733 break
13734 }
13735 v.reset(OpConst64F)
13736 v.AuxInt = float64ToAuxInt(math.Float64frombits(uint64(x)))
13737 return true
13738 }
13739
13740
13741
13742 for {
13743 t1 := v.Type
13744 p1 := v_0
13745 if v_1.Op != OpStore {
13746 break
13747 }
13748 t2 := auxToType(v_1.Aux)
13749 _ = v_1.Args[1]
13750 p2 := v_1.Args[0]
13751 v_1_1 := v_1.Args[1]
13752 if v_1_1.Op != OpConst32 {
13753 break
13754 }
13755 x := auxIntToInt32(v_1_1.AuxInt)
13756 if !(isSamePtr(p1, p2) && t2.Size() == 4 && is32BitFloat(t1) && !math.IsNaN(float64(math.Float32frombits(uint32(x))))) {
13757 break
13758 }
13759 v.reset(OpConst32F)
13760 v.AuxInt = float32ToAuxInt(math.Float32frombits(uint32(x)))
13761 return true
13762 }
13763
13764
13765
13766 for {
13767 t1 := v.Type
13768 p1 := v_0
13769 if v_1.Op != OpStore {
13770 break
13771 }
13772 t2 := auxToType(v_1.Aux)
13773 _ = v_1.Args[1]
13774 p2 := v_1.Args[0]
13775 v_1_1 := v_1.Args[1]
13776 if v_1_1.Op != OpConst64F {
13777 break
13778 }
13779 x := auxIntToFloat64(v_1_1.AuxInt)
13780 if !(isSamePtr(p1, p2) && t2.Size() == 8 && is64BitInt(t1)) {
13781 break
13782 }
13783 v.reset(OpConst64)
13784 v.AuxInt = int64ToAuxInt(int64(math.Float64bits(x)))
13785 return true
13786 }
13787
13788
13789
13790 for {
13791 t1 := v.Type
13792 p1 := v_0
13793 if v_1.Op != OpStore {
13794 break
13795 }
13796 t2 := auxToType(v_1.Aux)
13797 _ = v_1.Args[1]
13798 p2 := v_1.Args[0]
13799 v_1_1 := v_1.Args[1]
13800 if v_1_1.Op != OpConst32F {
13801 break
13802 }
13803 x := auxIntToFloat32(v_1_1.AuxInt)
13804 if !(isSamePtr(p1, p2) && t2.Size() == 4 && is32BitInt(t1)) {
13805 break
13806 }
13807 v.reset(OpConst32)
13808 v.AuxInt = int32ToAuxInt(int32(math.Float32bits(x)))
13809 return true
13810 }
13811
13812
13813
13814 for {
13815 t1 := v.Type
13816 op := v_0
13817 if op.Op != OpOffPtr {
13818 break
13819 }
13820 o1 := auxIntToInt64(op.AuxInt)
13821 p1 := op.Args[0]
13822 if v_1.Op != OpStore {
13823 break
13824 }
13825 t2 := auxToType(v_1.Aux)
13826 _ = v_1.Args[2]
13827 p2 := v_1.Args[0]
13828 mem := v_1.Args[2]
13829 if mem.Op != OpZero {
13830 break
13831 }
13832 n := auxIntToInt64(mem.AuxInt)
13833 p3 := mem.Args[0]
13834 if !(o1 >= 0 && o1+t1.Size() <= n && isSamePtr(p1, p3) && CanSSA(t1) && disjoint(op, t1.Size(), p2, t2.Size())) {
13835 break
13836 }
13837 b = mem.Block
13838 v0 := b.NewValue0(v.Pos, OpLoad, t1)
13839 v.copyOf(v0)
13840 v1 := b.NewValue0(v.Pos, OpOffPtr, op.Type)
13841 v1.AuxInt = int64ToAuxInt(o1)
13842 v1.AddArg(p3)
13843 v0.AddArg2(v1, mem)
13844 return true
13845 }
13846
13847
13848
13849 for {
13850 t1 := v.Type
13851 op := v_0
13852 if op.Op != OpOffPtr {
13853 break
13854 }
13855 o1 := auxIntToInt64(op.AuxInt)
13856 p1 := op.Args[0]
13857 if v_1.Op != OpStore {
13858 break
13859 }
13860 t2 := auxToType(v_1.Aux)
13861 _ = v_1.Args[2]
13862 p2 := v_1.Args[0]
13863 v_1_2 := v_1.Args[2]
13864 if v_1_2.Op != OpStore {
13865 break
13866 }
13867 t3 := auxToType(v_1_2.Aux)
13868 _ = v_1_2.Args[2]
13869 p3 := v_1_2.Args[0]
13870 mem := v_1_2.Args[2]
13871 if mem.Op != OpZero {
13872 break
13873 }
13874 n := auxIntToInt64(mem.AuxInt)
13875 p4 := mem.Args[0]
13876 if !(o1 >= 0 && o1+t1.Size() <= n && isSamePtr(p1, p4) && CanSSA(t1) && disjoint(op, t1.Size(), p2, t2.Size()) && disjoint(op, t1.Size(), p3, t3.Size())) {
13877 break
13878 }
13879 b = mem.Block
13880 v0 := b.NewValue0(v.Pos, OpLoad, t1)
13881 v.copyOf(v0)
13882 v1 := b.NewValue0(v.Pos, OpOffPtr, op.Type)
13883 v1.AuxInt = int64ToAuxInt(o1)
13884 v1.AddArg(p4)
13885 v0.AddArg2(v1, mem)
13886 return true
13887 }
13888
13889
13890
13891 for {
13892 t1 := v.Type
13893 op := v_0
13894 if op.Op != OpOffPtr {
13895 break
13896 }
13897 o1 := auxIntToInt64(op.AuxInt)
13898 p1 := op.Args[0]
13899 if v_1.Op != OpStore {
13900 break
13901 }
13902 t2 := auxToType(v_1.Aux)
13903 _ = v_1.Args[2]
13904 p2 := v_1.Args[0]
13905 v_1_2 := v_1.Args[2]
13906 if v_1_2.Op != OpStore {
13907 break
13908 }
13909 t3 := auxToType(v_1_2.Aux)
13910 _ = v_1_2.Args[2]
13911 p3 := v_1_2.Args[0]
13912 v_1_2_2 := v_1_2.Args[2]
13913 if v_1_2_2.Op != OpStore {
13914 break
13915 }
13916 t4 := auxToType(v_1_2_2.Aux)
13917 _ = v_1_2_2.Args[2]
13918 p4 := v_1_2_2.Args[0]
13919 mem := v_1_2_2.Args[2]
13920 if mem.Op != OpZero {
13921 break
13922 }
13923 n := auxIntToInt64(mem.AuxInt)
13924 p5 := mem.Args[0]
13925 if !(o1 >= 0 && o1+t1.Size() <= n && isSamePtr(p1, p5) && CanSSA(t1) && disjoint(op, t1.Size(), p2, t2.Size()) && disjoint(op, t1.Size(), p3, t3.Size()) && disjoint(op, t1.Size(), p4, t4.Size())) {
13926 break
13927 }
13928 b = mem.Block
13929 v0 := b.NewValue0(v.Pos, OpLoad, t1)
13930 v.copyOf(v0)
13931 v1 := b.NewValue0(v.Pos, OpOffPtr, op.Type)
13932 v1.AuxInt = int64ToAuxInt(o1)
13933 v1.AddArg(p5)
13934 v0.AddArg2(v1, mem)
13935 return true
13936 }
13937
13938
13939
13940 for {
13941 t1 := v.Type
13942 op := v_0
13943 if op.Op != OpOffPtr {
13944 break
13945 }
13946 o1 := auxIntToInt64(op.AuxInt)
13947 p1 := op.Args[0]
13948 if v_1.Op != OpStore {
13949 break
13950 }
13951 t2 := auxToType(v_1.Aux)
13952 _ = v_1.Args[2]
13953 p2 := v_1.Args[0]
13954 v_1_2 := v_1.Args[2]
13955 if v_1_2.Op != OpStore {
13956 break
13957 }
13958 t3 := auxToType(v_1_2.Aux)
13959 _ = v_1_2.Args[2]
13960 p3 := v_1_2.Args[0]
13961 v_1_2_2 := v_1_2.Args[2]
13962 if v_1_2_2.Op != OpStore {
13963 break
13964 }
13965 t4 := auxToType(v_1_2_2.Aux)
13966 _ = v_1_2_2.Args[2]
13967 p4 := v_1_2_2.Args[0]
13968 v_1_2_2_2 := v_1_2_2.Args[2]
13969 if v_1_2_2_2.Op != OpStore {
13970 break
13971 }
13972 t5 := auxToType(v_1_2_2_2.Aux)
13973 _ = v_1_2_2_2.Args[2]
13974 p5 := v_1_2_2_2.Args[0]
13975 mem := v_1_2_2_2.Args[2]
13976 if mem.Op != OpZero {
13977 break
13978 }
13979 n := auxIntToInt64(mem.AuxInt)
13980 p6 := mem.Args[0]
13981 if !(o1 >= 0 && o1+t1.Size() <= n && isSamePtr(p1, p6) && CanSSA(t1) && disjoint(op, t1.Size(), p2, t2.Size()) && disjoint(op, t1.Size(), p3, t3.Size()) && disjoint(op, t1.Size(), p4, t4.Size()) && disjoint(op, t1.Size(), p5, t5.Size())) {
13982 break
13983 }
13984 b = mem.Block
13985 v0 := b.NewValue0(v.Pos, OpLoad, t1)
13986 v.copyOf(v0)
13987 v1 := b.NewValue0(v.Pos, OpOffPtr, op.Type)
13988 v1.AuxInt = int64ToAuxInt(o1)
13989 v1.AddArg(p6)
13990 v0.AddArg2(v1, mem)
13991 return true
13992 }
13993
13994
13995
13996 for {
13997 t1 := v.Type
13998 if v_0.Op != OpOffPtr {
13999 break
14000 }
14001 o := auxIntToInt64(v_0.AuxInt)
14002 p1 := v_0.Args[0]
14003 if v_1.Op != OpZero {
14004 break
14005 }
14006 n := auxIntToInt64(v_1.AuxInt)
14007 p2 := v_1.Args[0]
14008 if !(t1.IsBoolean() && isSamePtr(p1, p2) && n >= o+1) {
14009 break
14010 }
14011 v.reset(OpConstBool)
14012 v.AuxInt = boolToAuxInt(false)
14013 return true
14014 }
14015
14016
14017
14018 for {
14019 t1 := v.Type
14020 if v_0.Op != OpOffPtr {
14021 break
14022 }
14023 o := auxIntToInt64(v_0.AuxInt)
14024 p1 := v_0.Args[0]
14025 if v_1.Op != OpZero {
14026 break
14027 }
14028 n := auxIntToInt64(v_1.AuxInt)
14029 p2 := v_1.Args[0]
14030 if !(is8BitInt(t1) && isSamePtr(p1, p2) && n >= o+1) {
14031 break
14032 }
14033 v.reset(OpConst8)
14034 v.AuxInt = int8ToAuxInt(0)
14035 return true
14036 }
14037
14038
14039
14040 for {
14041 t1 := v.Type
14042 if v_0.Op != OpOffPtr {
14043 break
14044 }
14045 o := auxIntToInt64(v_0.AuxInt)
14046 p1 := v_0.Args[0]
14047 if v_1.Op != OpZero {
14048 break
14049 }
14050 n := auxIntToInt64(v_1.AuxInt)
14051 p2 := v_1.Args[0]
14052 if !(is16BitInt(t1) && isSamePtr(p1, p2) && n >= o+2) {
14053 break
14054 }
14055 v.reset(OpConst16)
14056 v.AuxInt = int16ToAuxInt(0)
14057 return true
14058 }
14059
14060
14061
14062 for {
14063 t1 := v.Type
14064 if v_0.Op != OpOffPtr {
14065 break
14066 }
14067 o := auxIntToInt64(v_0.AuxInt)
14068 p1 := v_0.Args[0]
14069 if v_1.Op != OpZero {
14070 break
14071 }
14072 n := auxIntToInt64(v_1.AuxInt)
14073 p2 := v_1.Args[0]
14074 if !(is32BitInt(t1) && isSamePtr(p1, p2) && n >= o+4) {
14075 break
14076 }
14077 v.reset(OpConst32)
14078 v.AuxInt = int32ToAuxInt(0)
14079 return true
14080 }
14081
14082
14083
14084 for {
14085 t1 := v.Type
14086 if v_0.Op != OpOffPtr {
14087 break
14088 }
14089 o := auxIntToInt64(v_0.AuxInt)
14090 p1 := v_0.Args[0]
14091 if v_1.Op != OpZero {
14092 break
14093 }
14094 n := auxIntToInt64(v_1.AuxInt)
14095 p2 := v_1.Args[0]
14096 if !(is64BitInt(t1) && isSamePtr(p1, p2) && n >= o+8) {
14097 break
14098 }
14099 v.reset(OpConst64)
14100 v.AuxInt = int64ToAuxInt(0)
14101 return true
14102 }
14103
14104
14105
14106 for {
14107 t1 := v.Type
14108 if v_0.Op != OpOffPtr {
14109 break
14110 }
14111 o := auxIntToInt64(v_0.AuxInt)
14112 p1 := v_0.Args[0]
14113 if v_1.Op != OpZero {
14114 break
14115 }
14116 n := auxIntToInt64(v_1.AuxInt)
14117 p2 := v_1.Args[0]
14118 if !(is32BitFloat(t1) && isSamePtr(p1, p2) && n >= o+4) {
14119 break
14120 }
14121 v.reset(OpConst32F)
14122 v.AuxInt = float32ToAuxInt(0)
14123 return true
14124 }
14125
14126
14127
14128 for {
14129 t1 := v.Type
14130 if v_0.Op != OpOffPtr {
14131 break
14132 }
14133 o := auxIntToInt64(v_0.AuxInt)
14134 p1 := v_0.Args[0]
14135 if v_1.Op != OpZero {
14136 break
14137 }
14138 n := auxIntToInt64(v_1.AuxInt)
14139 p2 := v_1.Args[0]
14140 if !(is64BitFloat(t1) && isSamePtr(p1, p2) && n >= o+8) {
14141 break
14142 }
14143 v.reset(OpConst64F)
14144 v.AuxInt = float64ToAuxInt(0)
14145 return true
14146 }
14147
14148
14149
14150 for {
14151 t := v.Type
14152 if !(t.IsStruct() && CanSSA(t)) {
14153 break
14154 }
14155 v.copyOf(rewriteStructLoad(v))
14156 return true
14157 }
14158
14159
14160
14161 for {
14162 t := v.Type
14163 if !(t.IsArray() && t.NumElem() == 0) {
14164 break
14165 }
14166 v.reset(OpArrayMake0)
14167 return true
14168 }
14169
14170
14171
14172 for {
14173 t := v.Type
14174 ptr := v_0
14175 mem := v_1
14176 if !(t.IsArray() && t.NumElem() == 1 && CanSSA(t)) {
14177 break
14178 }
14179 v.reset(OpArrayMake1)
14180 v0 := b.NewValue0(v.Pos, OpLoad, t.Elem())
14181 v0.AddArg2(ptr, mem)
14182 v.AddArg(v0)
14183 return true
14184 }
14185
14186
14187
14188 for {
14189 if v.Type != typ.BytePtr || v_0.Op != OpOffPtr {
14190 break
14191 }
14192 off := auxIntToInt64(v_0.AuxInt)
14193 v_0_0 := v_0.Args[0]
14194 if v_0_0.Op != OpAddr {
14195 break
14196 }
14197 s := auxToSym(v_0_0.Aux)
14198 sb := v_0_0.Args[0]
14199 if !(isFixedSym(s, off)) {
14200 break
14201 }
14202 v.reset(OpAddr)
14203 v.Aux = symToAux(fixedSym(b.Func, s, off))
14204 v.AddArg(sb)
14205 return true
14206 }
14207
14208
14209
14210 for {
14211 if v.Type != typ.BytePtr || v_0.Op != OpOffPtr {
14212 break
14213 }
14214 off := auxIntToInt64(v_0.AuxInt)
14215 v_0_0 := v_0.Args[0]
14216 if v_0_0.Op != OpConvert {
14217 break
14218 }
14219 v_0_0_0 := v_0_0.Args[0]
14220 if v_0_0_0.Op != OpAddr {
14221 break
14222 }
14223 s := auxToSym(v_0_0_0.Aux)
14224 sb := v_0_0_0.Args[0]
14225 if !(isFixedSym(s, off)) {
14226 break
14227 }
14228 v.reset(OpAddr)
14229 v.Aux = symToAux(fixedSym(b.Func, s, off))
14230 v.AddArg(sb)
14231 return true
14232 }
14233
14234
14235
14236 for {
14237 if v.Type != typ.BytePtr || v_0.Op != OpOffPtr {
14238 break
14239 }
14240 off := auxIntToInt64(v_0.AuxInt)
14241 v_0_0 := v_0.Args[0]
14242 if v_0_0.Op != OpITab {
14243 break
14244 }
14245 v_0_0_0 := v_0_0.Args[0]
14246 if v_0_0_0.Op != OpIMake {
14247 break
14248 }
14249 v_0_0_0_0 := v_0_0_0.Args[0]
14250 if v_0_0_0_0.Op != OpAddr {
14251 break
14252 }
14253 s := auxToSym(v_0_0_0_0.Aux)
14254 sb := v_0_0_0_0.Args[0]
14255 if !(isFixedSym(s, off)) {
14256 break
14257 }
14258 v.reset(OpAddr)
14259 v.Aux = symToAux(fixedSym(b.Func, s, off))
14260 v.AddArg(sb)
14261 return true
14262 }
14263
14264
14265
14266 for {
14267 if v.Type != typ.BytePtr || v_0.Op != OpOffPtr {
14268 break
14269 }
14270 off := auxIntToInt64(v_0.AuxInt)
14271 v_0_0 := v_0.Args[0]
14272 if v_0_0.Op != OpITab {
14273 break
14274 }
14275 v_0_0_0 := v_0_0.Args[0]
14276 if v_0_0_0.Op != OpIMake {
14277 break
14278 }
14279 v_0_0_0_0 := v_0_0_0.Args[0]
14280 if v_0_0_0_0.Op != OpConvert {
14281 break
14282 }
14283 v_0_0_0_0_0 := v_0_0_0_0.Args[0]
14284 if v_0_0_0_0_0.Op != OpAddr {
14285 break
14286 }
14287 s := auxToSym(v_0_0_0_0_0.Aux)
14288 sb := v_0_0_0_0_0.Args[0]
14289 if !(isFixedSym(s, off)) {
14290 break
14291 }
14292 v.reset(OpAddr)
14293 v.Aux = symToAux(fixedSym(b.Func, s, off))
14294 v.AddArg(sb)
14295 return true
14296 }
14297
14298
14299
14300 for {
14301 if v.Type != typ.Uintptr || v_0.Op != OpOffPtr {
14302 break
14303 }
14304 off := auxIntToInt64(v_0.AuxInt)
14305 v_0_0 := v_0.Args[0]
14306 if v_0_0.Op != OpAddr {
14307 break
14308 }
14309 s := auxToSym(v_0_0.Aux)
14310 sb := v_0_0.Args[0]
14311 if !(isFixedSym(s, off)) {
14312 break
14313 }
14314 v.reset(OpAddr)
14315 v.Aux = symToAux(fixedSym(b.Func, s, off))
14316 v.AddArg(sb)
14317 return true
14318 }
14319
14320
14321
14322 for {
14323 if v.Type != typ.Uintptr || v_0.Op != OpOffPtr {
14324 break
14325 }
14326 off := auxIntToInt64(v_0.AuxInt)
14327 v_0_0 := v_0.Args[0]
14328 if v_0_0.Op != OpConvert {
14329 break
14330 }
14331 v_0_0_0 := v_0_0.Args[0]
14332 if v_0_0_0.Op != OpAddr {
14333 break
14334 }
14335 s := auxToSym(v_0_0_0.Aux)
14336 sb := v_0_0_0.Args[0]
14337 if !(isFixedSym(s, off)) {
14338 break
14339 }
14340 v.reset(OpAddr)
14341 v.Aux = symToAux(fixedSym(b.Func, s, off))
14342 v.AddArg(sb)
14343 return true
14344 }
14345
14346
14347
14348 for {
14349 if v.Type != typ.Uintptr || v_0.Op != OpOffPtr {
14350 break
14351 }
14352 off := auxIntToInt64(v_0.AuxInt)
14353 v_0_0 := v_0.Args[0]
14354 if v_0_0.Op != OpITab {
14355 break
14356 }
14357 v_0_0_0 := v_0_0.Args[0]
14358 if v_0_0_0.Op != OpIMake {
14359 break
14360 }
14361 v_0_0_0_0 := v_0_0_0.Args[0]
14362 if v_0_0_0_0.Op != OpAddr {
14363 break
14364 }
14365 s := auxToSym(v_0_0_0_0.Aux)
14366 sb := v_0_0_0_0.Args[0]
14367 if !(isFixedSym(s, off)) {
14368 break
14369 }
14370 v.reset(OpAddr)
14371 v.Aux = symToAux(fixedSym(b.Func, s, off))
14372 v.AddArg(sb)
14373 return true
14374 }
14375
14376
14377
14378 for {
14379 if v.Type != typ.Uintptr || v_0.Op != OpOffPtr {
14380 break
14381 }
14382 off := auxIntToInt64(v_0.AuxInt)
14383 v_0_0 := v_0.Args[0]
14384 if v_0_0.Op != OpITab {
14385 break
14386 }
14387 v_0_0_0 := v_0_0.Args[0]
14388 if v_0_0_0.Op != OpIMake {
14389 break
14390 }
14391 v_0_0_0_0 := v_0_0_0.Args[0]
14392 if v_0_0_0_0.Op != OpConvert {
14393 break
14394 }
14395 v_0_0_0_0_0 := v_0_0_0_0.Args[0]
14396 if v_0_0_0_0_0.Op != OpAddr {
14397 break
14398 }
14399 s := auxToSym(v_0_0_0_0_0.Aux)
14400 sb := v_0_0_0_0_0.Args[0]
14401 if !(isFixedSym(s, off)) {
14402 break
14403 }
14404 v.reset(OpAddr)
14405 v.Aux = symToAux(fixedSym(b.Func, s, off))
14406 v.AddArg(sb)
14407 return true
14408 }
14409
14410
14411
14412 for {
14413 t := v.Type
14414 if v_0.Op != OpOffPtr {
14415 break
14416 }
14417 off := auxIntToInt64(v_0.AuxInt)
14418 v_0_0 := v_0.Args[0]
14419 if v_0_0.Op != OpAddr {
14420 break
14421 }
14422 sym := auxToSym(v_0_0.Aux)
14423 if !(t.IsInteger() && t.Size() == 4 && isFixed32(config, sym, off)) {
14424 break
14425 }
14426 v.reset(OpConst32)
14427 v.AuxInt = int32ToAuxInt(fixed32(config, sym, off))
14428 return true
14429 }
14430
14431
14432
14433 for {
14434 t := v.Type
14435 if v_0.Op != OpOffPtr {
14436 break
14437 }
14438 off := auxIntToInt64(v_0.AuxInt)
14439 v_0_0 := v_0.Args[0]
14440 if v_0_0.Op != OpConvert {
14441 break
14442 }
14443 v_0_0_0 := v_0_0.Args[0]
14444 if v_0_0_0.Op != OpAddr {
14445 break
14446 }
14447 sym := auxToSym(v_0_0_0.Aux)
14448 if !(t.IsInteger() && t.Size() == 4 && isFixed32(config, sym, off)) {
14449 break
14450 }
14451 v.reset(OpConst32)
14452 v.AuxInt = int32ToAuxInt(fixed32(config, sym, off))
14453 return true
14454 }
14455
14456
14457
14458 for {
14459 t := v.Type
14460 if v_0.Op != OpOffPtr {
14461 break
14462 }
14463 off := auxIntToInt64(v_0.AuxInt)
14464 v_0_0 := v_0.Args[0]
14465 if v_0_0.Op != OpITab {
14466 break
14467 }
14468 v_0_0_0 := v_0_0.Args[0]
14469 if v_0_0_0.Op != OpIMake {
14470 break
14471 }
14472 v_0_0_0_0 := v_0_0_0.Args[0]
14473 if v_0_0_0_0.Op != OpAddr {
14474 break
14475 }
14476 sym := auxToSym(v_0_0_0_0.Aux)
14477 if !(t.IsInteger() && t.Size() == 4 && isFixed32(config, sym, off)) {
14478 break
14479 }
14480 v.reset(OpConst32)
14481 v.AuxInt = int32ToAuxInt(fixed32(config, sym, off))
14482 return true
14483 }
14484
14485
14486
14487 for {
14488 t := v.Type
14489 if v_0.Op != OpOffPtr {
14490 break
14491 }
14492 off := auxIntToInt64(v_0.AuxInt)
14493 v_0_0 := v_0.Args[0]
14494 if v_0_0.Op != OpITab {
14495 break
14496 }
14497 v_0_0_0 := v_0_0.Args[0]
14498 if v_0_0_0.Op != OpIMake {
14499 break
14500 }
14501 v_0_0_0_0 := v_0_0_0.Args[0]
14502 if v_0_0_0_0.Op != OpConvert {
14503 break
14504 }
14505 v_0_0_0_0_0 := v_0_0_0_0.Args[0]
14506 if v_0_0_0_0_0.Op != OpAddr {
14507 break
14508 }
14509 sym := auxToSym(v_0_0_0_0_0.Aux)
14510 if !(t.IsInteger() && t.Size() == 4 && isFixed32(config, sym, off)) {
14511 break
14512 }
14513 v.reset(OpConst32)
14514 v.AuxInt = int32ToAuxInt(fixed32(config, sym, off))
14515 return true
14516 }
14517 return false
14518 }
14519 func rewriteValuegeneric_OpLsh16x16(v *Value) bool {
14520 v_1 := v.Args[1]
14521 v_0 := v.Args[0]
14522 b := v.Block
14523
14524
14525 for {
14526 t := v.Type
14527 x := v_0
14528 if v_1.Op != OpConst16 {
14529 break
14530 }
14531 c := auxIntToInt16(v_1.AuxInt)
14532 v.reset(OpLsh16x64)
14533 v0 := b.NewValue0(v.Pos, OpConst64, t)
14534 v0.AuxInt = int64ToAuxInt(int64(uint16(c)))
14535 v.AddArg2(x, v0)
14536 return true
14537 }
14538
14539
14540 for {
14541 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 {
14542 break
14543 }
14544 v.reset(OpConst16)
14545 v.AuxInt = int16ToAuxInt(0)
14546 return true
14547 }
14548 return false
14549 }
14550 func rewriteValuegeneric_OpLsh16x32(v *Value) bool {
14551 v_1 := v.Args[1]
14552 v_0 := v.Args[0]
14553 b := v.Block
14554
14555
14556 for {
14557 t := v.Type
14558 x := v_0
14559 if v_1.Op != OpConst32 {
14560 break
14561 }
14562 c := auxIntToInt32(v_1.AuxInt)
14563 v.reset(OpLsh16x64)
14564 v0 := b.NewValue0(v.Pos, OpConst64, t)
14565 v0.AuxInt = int64ToAuxInt(int64(uint32(c)))
14566 v.AddArg2(x, v0)
14567 return true
14568 }
14569
14570
14571 for {
14572 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 {
14573 break
14574 }
14575 v.reset(OpConst16)
14576 v.AuxInt = int16ToAuxInt(0)
14577 return true
14578 }
14579 return false
14580 }
14581 func rewriteValuegeneric_OpLsh16x64(v *Value) bool {
14582 v_1 := v.Args[1]
14583 v_0 := v.Args[0]
14584 b := v.Block
14585 typ := &b.Func.Config.Types
14586
14587
14588 for {
14589 if v_0.Op != OpConst16 {
14590 break
14591 }
14592 c := auxIntToInt16(v_0.AuxInt)
14593 if v_1.Op != OpConst64 {
14594 break
14595 }
14596 d := auxIntToInt64(v_1.AuxInt)
14597 v.reset(OpConst16)
14598 v.AuxInt = int16ToAuxInt(c << uint64(d))
14599 return true
14600 }
14601
14602
14603 for {
14604 x := v_0
14605 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 0 {
14606 break
14607 }
14608 v.copyOf(x)
14609 return true
14610 }
14611
14612
14613 for {
14614 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 {
14615 break
14616 }
14617 v.reset(OpConst16)
14618 v.AuxInt = int16ToAuxInt(0)
14619 return true
14620 }
14621
14622
14623
14624 for {
14625 if v_1.Op != OpConst64 {
14626 break
14627 }
14628 c := auxIntToInt64(v_1.AuxInt)
14629 if !(uint64(c) >= 16) {
14630 break
14631 }
14632 v.reset(OpConst16)
14633 v.AuxInt = int16ToAuxInt(0)
14634 return true
14635 }
14636
14637
14638
14639 for {
14640 t := v.Type
14641 if v_0.Op != OpLsh16x64 {
14642 break
14643 }
14644 _ = v_0.Args[1]
14645 x := v_0.Args[0]
14646 v_0_1 := v_0.Args[1]
14647 if v_0_1.Op != OpConst64 {
14648 break
14649 }
14650 c := auxIntToInt64(v_0_1.AuxInt)
14651 if v_1.Op != OpConst64 {
14652 break
14653 }
14654 d := auxIntToInt64(v_1.AuxInt)
14655 if !(!uaddOvf(c, d)) {
14656 break
14657 }
14658 v.reset(OpLsh16x64)
14659 v0 := b.NewValue0(v.Pos, OpConst64, t)
14660 v0.AuxInt = int64ToAuxInt(c + d)
14661 v.AddArg2(x, v0)
14662 return true
14663 }
14664
14665
14666
14667 for {
14668 i := v_0
14669 if i.Op != OpRsh16x64 {
14670 break
14671 }
14672 _ = i.Args[1]
14673 x := i.Args[0]
14674 i_1 := i.Args[1]
14675 if i_1.Op != OpConst64 {
14676 break
14677 }
14678 c := auxIntToInt64(i_1.AuxInt)
14679 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != c || !(c >= 0 && c < 16 && i.Uses == 1) {
14680 break
14681 }
14682 v.reset(OpAnd16)
14683 v0 := b.NewValue0(v.Pos, OpConst16, v.Type)
14684 v0.AuxInt = int16ToAuxInt(int16(-1) << c)
14685 v.AddArg2(x, v0)
14686 return true
14687 }
14688
14689
14690
14691 for {
14692 i := v_0
14693 if i.Op != OpRsh16Ux64 {
14694 break
14695 }
14696 _ = i.Args[1]
14697 x := i.Args[0]
14698 i_1 := i.Args[1]
14699 if i_1.Op != OpConst64 {
14700 break
14701 }
14702 c := auxIntToInt64(i_1.AuxInt)
14703 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != c || !(c >= 0 && c < 16 && i.Uses == 1) {
14704 break
14705 }
14706 v.reset(OpAnd16)
14707 v0 := b.NewValue0(v.Pos, OpConst16, v.Type)
14708 v0.AuxInt = int16ToAuxInt(int16(-1) << c)
14709 v.AddArg2(x, v0)
14710 return true
14711 }
14712
14713
14714
14715 for {
14716 if v_0.Op != OpRsh16Ux64 {
14717 break
14718 }
14719 _ = v_0.Args[1]
14720 v_0_0 := v_0.Args[0]
14721 if v_0_0.Op != OpLsh16x64 {
14722 break
14723 }
14724 _ = v_0_0.Args[1]
14725 x := v_0_0.Args[0]
14726 v_0_0_1 := v_0_0.Args[1]
14727 if v_0_0_1.Op != OpConst64 {
14728 break
14729 }
14730 c1 := auxIntToInt64(v_0_0_1.AuxInt)
14731 v_0_1 := v_0.Args[1]
14732 if v_0_1.Op != OpConst64 {
14733 break
14734 }
14735 c2 := auxIntToInt64(v_0_1.AuxInt)
14736 if v_1.Op != OpConst64 {
14737 break
14738 }
14739 c3 := auxIntToInt64(v_1.AuxInt)
14740 if !(uint64(c1) >= uint64(c2) && uint64(c3) >= uint64(c2) && !uaddOvf(c1-c2, c3)) {
14741 break
14742 }
14743 v.reset(OpLsh16x64)
14744 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
14745 v0.AuxInt = int64ToAuxInt(c1 - c2 + c3)
14746 v.AddArg2(x, v0)
14747 return true
14748 }
14749
14750
14751
14752 for {
14753 if v_0.Op != OpAnd16 {
14754 break
14755 }
14756 _ = v_0.Args[1]
14757 v_0_0 := v_0.Args[0]
14758 v_0_1 := v_0.Args[1]
14759 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
14760 if v_0_0.Op != OpRsh16x64 {
14761 continue
14762 }
14763 t := v_0_0.Type
14764 _ = v_0_0.Args[1]
14765 x := v_0_0.Args[0]
14766 v_0_0_1 := v_0_0.Args[1]
14767 if v_0_0_1.Op != OpConst64 {
14768 continue
14769 }
14770 t2 := v_0_0_1.Type
14771 c := auxIntToInt64(v_0_0_1.AuxInt)
14772 if v_0_1.Op != OpConst16 {
14773 continue
14774 }
14775 d := auxIntToInt16(v_0_1.AuxInt)
14776 if v_1.Op != OpConst64 {
14777 continue
14778 }
14779 e := auxIntToInt64(v_1.AuxInt)
14780 if !(c >= e) {
14781 continue
14782 }
14783 v.reset(OpAnd16)
14784 v0 := b.NewValue0(v.Pos, OpRsh16x64, t)
14785 v1 := b.NewValue0(v.Pos, OpConst64, t2)
14786 v1.AuxInt = int64ToAuxInt(c - e)
14787 v0.AddArg2(x, v1)
14788 v2 := b.NewValue0(v.Pos, OpConst16, t)
14789 v2.AuxInt = int16ToAuxInt(d << e)
14790 v.AddArg2(v0, v2)
14791 return true
14792 }
14793 break
14794 }
14795
14796
14797
14798 for {
14799 if v_0.Op != OpAnd16 {
14800 break
14801 }
14802 _ = v_0.Args[1]
14803 v_0_0 := v_0.Args[0]
14804 v_0_1 := v_0.Args[1]
14805 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
14806 if v_0_0.Op != OpRsh16Ux64 {
14807 continue
14808 }
14809 t := v_0_0.Type
14810 _ = v_0_0.Args[1]
14811 x := v_0_0.Args[0]
14812 v_0_0_1 := v_0_0.Args[1]
14813 if v_0_0_1.Op != OpConst64 {
14814 continue
14815 }
14816 t2 := v_0_0_1.Type
14817 c := auxIntToInt64(v_0_0_1.AuxInt)
14818 if v_0_1.Op != OpConst16 {
14819 continue
14820 }
14821 d := auxIntToInt16(v_0_1.AuxInt)
14822 if v_1.Op != OpConst64 {
14823 continue
14824 }
14825 e := auxIntToInt64(v_1.AuxInt)
14826 if !(c >= e) {
14827 continue
14828 }
14829 v.reset(OpAnd16)
14830 v0 := b.NewValue0(v.Pos, OpRsh16Ux64, t)
14831 v1 := b.NewValue0(v.Pos, OpConst64, t2)
14832 v1.AuxInt = int64ToAuxInt(c - e)
14833 v0.AddArg2(x, v1)
14834 v2 := b.NewValue0(v.Pos, OpConst16, t)
14835 v2.AuxInt = int16ToAuxInt(d << e)
14836 v.AddArg2(v0, v2)
14837 return true
14838 }
14839 break
14840 }
14841
14842
14843
14844 for {
14845 if v_0.Op != OpAnd16 {
14846 break
14847 }
14848 _ = v_0.Args[1]
14849 v_0_0 := v_0.Args[0]
14850 v_0_1 := v_0.Args[1]
14851 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
14852 if v_0_0.Op != OpRsh16x64 {
14853 continue
14854 }
14855 t := v_0_0.Type
14856 _ = v_0_0.Args[1]
14857 x := v_0_0.Args[0]
14858 v_0_0_1 := v_0_0.Args[1]
14859 if v_0_0_1.Op != OpConst64 {
14860 continue
14861 }
14862 t2 := v_0_0_1.Type
14863 c := auxIntToInt64(v_0_0_1.AuxInt)
14864 if v_0_1.Op != OpConst16 {
14865 continue
14866 }
14867 d := auxIntToInt16(v_0_1.AuxInt)
14868 if v_1.Op != OpConst64 {
14869 continue
14870 }
14871 e := auxIntToInt64(v_1.AuxInt)
14872 if !(c < e) {
14873 continue
14874 }
14875 v.reset(OpAnd16)
14876 v0 := b.NewValue0(v.Pos, OpLsh16x64, t)
14877 v1 := b.NewValue0(v.Pos, OpConst64, t2)
14878 v1.AuxInt = int64ToAuxInt(e - c)
14879 v0.AddArg2(x, v1)
14880 v2 := b.NewValue0(v.Pos, OpConst16, t)
14881 v2.AuxInt = int16ToAuxInt(d << e)
14882 v.AddArg2(v0, v2)
14883 return true
14884 }
14885 break
14886 }
14887
14888
14889
14890 for {
14891 if v_0.Op != OpAnd16 {
14892 break
14893 }
14894 _ = v_0.Args[1]
14895 v_0_0 := v_0.Args[0]
14896 v_0_1 := v_0.Args[1]
14897 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
14898 if v_0_0.Op != OpRsh16Ux64 {
14899 continue
14900 }
14901 t := v_0_0.Type
14902 _ = v_0_0.Args[1]
14903 x := v_0_0.Args[0]
14904 v_0_0_1 := v_0_0.Args[1]
14905 if v_0_0_1.Op != OpConst64 {
14906 continue
14907 }
14908 t2 := v_0_0_1.Type
14909 c := auxIntToInt64(v_0_0_1.AuxInt)
14910 if v_0_1.Op != OpConst16 {
14911 continue
14912 }
14913 d := auxIntToInt16(v_0_1.AuxInt)
14914 if v_1.Op != OpConst64 {
14915 continue
14916 }
14917 e := auxIntToInt64(v_1.AuxInt)
14918 if !(c < e) {
14919 continue
14920 }
14921 v.reset(OpAnd16)
14922 v0 := b.NewValue0(v.Pos, OpLsh16x64, t)
14923 v1 := b.NewValue0(v.Pos, OpConst64, t2)
14924 v1.AuxInt = int64ToAuxInt(e - c)
14925 v0.AddArg2(x, v1)
14926 v2 := b.NewValue0(v.Pos, OpConst16, t)
14927 v2.AuxInt = int16ToAuxInt(d << e)
14928 v.AddArg2(v0, v2)
14929 return true
14930 }
14931 break
14932 }
14933 return false
14934 }
14935 func rewriteValuegeneric_OpLsh16x8(v *Value) bool {
14936 v_1 := v.Args[1]
14937 v_0 := v.Args[0]
14938 b := v.Block
14939
14940
14941 for {
14942 t := v.Type
14943 x := v_0
14944 if v_1.Op != OpConst8 {
14945 break
14946 }
14947 c := auxIntToInt8(v_1.AuxInt)
14948 v.reset(OpLsh16x64)
14949 v0 := b.NewValue0(v.Pos, OpConst64, t)
14950 v0.AuxInt = int64ToAuxInt(int64(uint8(c)))
14951 v.AddArg2(x, v0)
14952 return true
14953 }
14954
14955
14956 for {
14957 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 {
14958 break
14959 }
14960 v.reset(OpConst16)
14961 v.AuxInt = int16ToAuxInt(0)
14962 return true
14963 }
14964 return false
14965 }
14966 func rewriteValuegeneric_OpLsh32x16(v *Value) bool {
14967 v_1 := v.Args[1]
14968 v_0 := v.Args[0]
14969 b := v.Block
14970
14971
14972 for {
14973 t := v.Type
14974 x := v_0
14975 if v_1.Op != OpConst16 {
14976 break
14977 }
14978 c := auxIntToInt16(v_1.AuxInt)
14979 v.reset(OpLsh32x64)
14980 v0 := b.NewValue0(v.Pos, OpConst64, t)
14981 v0.AuxInt = int64ToAuxInt(int64(uint16(c)))
14982 v.AddArg2(x, v0)
14983 return true
14984 }
14985
14986
14987 for {
14988 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
14989 break
14990 }
14991 v.reset(OpConst32)
14992 v.AuxInt = int32ToAuxInt(0)
14993 return true
14994 }
14995 return false
14996 }
14997 func rewriteValuegeneric_OpLsh32x32(v *Value) bool {
14998 v_1 := v.Args[1]
14999 v_0 := v.Args[0]
15000 b := v.Block
15001
15002
15003 for {
15004 t := v.Type
15005 x := v_0
15006 if v_1.Op != OpConst32 {
15007 break
15008 }
15009 c := auxIntToInt32(v_1.AuxInt)
15010 v.reset(OpLsh32x64)
15011 v0 := b.NewValue0(v.Pos, OpConst64, t)
15012 v0.AuxInt = int64ToAuxInt(int64(uint32(c)))
15013 v.AddArg2(x, v0)
15014 return true
15015 }
15016
15017
15018 for {
15019 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
15020 break
15021 }
15022 v.reset(OpConst32)
15023 v.AuxInt = int32ToAuxInt(0)
15024 return true
15025 }
15026 return false
15027 }
15028 func rewriteValuegeneric_OpLsh32x64(v *Value) bool {
15029 v_1 := v.Args[1]
15030 v_0 := v.Args[0]
15031 b := v.Block
15032 typ := &b.Func.Config.Types
15033
15034
15035 for {
15036 if v_0.Op != OpConst32 {
15037 break
15038 }
15039 c := auxIntToInt32(v_0.AuxInt)
15040 if v_1.Op != OpConst64 {
15041 break
15042 }
15043 d := auxIntToInt64(v_1.AuxInt)
15044 v.reset(OpConst32)
15045 v.AuxInt = int32ToAuxInt(c << uint64(d))
15046 return true
15047 }
15048
15049
15050 for {
15051 x := v_0
15052 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 0 {
15053 break
15054 }
15055 v.copyOf(x)
15056 return true
15057 }
15058
15059
15060 for {
15061 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
15062 break
15063 }
15064 v.reset(OpConst32)
15065 v.AuxInt = int32ToAuxInt(0)
15066 return true
15067 }
15068
15069
15070
15071 for {
15072 if v_1.Op != OpConst64 {
15073 break
15074 }
15075 c := auxIntToInt64(v_1.AuxInt)
15076 if !(uint64(c) >= 32) {
15077 break
15078 }
15079 v.reset(OpConst32)
15080 v.AuxInt = int32ToAuxInt(0)
15081 return true
15082 }
15083
15084
15085
15086 for {
15087 t := v.Type
15088 if v_0.Op != OpLsh32x64 {
15089 break
15090 }
15091 _ = v_0.Args[1]
15092 x := v_0.Args[0]
15093 v_0_1 := v_0.Args[1]
15094 if v_0_1.Op != OpConst64 {
15095 break
15096 }
15097 c := auxIntToInt64(v_0_1.AuxInt)
15098 if v_1.Op != OpConst64 {
15099 break
15100 }
15101 d := auxIntToInt64(v_1.AuxInt)
15102 if !(!uaddOvf(c, d)) {
15103 break
15104 }
15105 v.reset(OpLsh32x64)
15106 v0 := b.NewValue0(v.Pos, OpConst64, t)
15107 v0.AuxInt = int64ToAuxInt(c + d)
15108 v.AddArg2(x, v0)
15109 return true
15110 }
15111
15112
15113
15114 for {
15115 i := v_0
15116 if i.Op != OpRsh32x64 {
15117 break
15118 }
15119 _ = i.Args[1]
15120 x := i.Args[0]
15121 i_1 := i.Args[1]
15122 if i_1.Op != OpConst64 {
15123 break
15124 }
15125 c := auxIntToInt64(i_1.AuxInt)
15126 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != c || !(c >= 0 && c < 32 && i.Uses == 1) {
15127 break
15128 }
15129 v.reset(OpAnd32)
15130 v0 := b.NewValue0(v.Pos, OpConst32, v.Type)
15131 v0.AuxInt = int32ToAuxInt(int32(-1) << c)
15132 v.AddArg2(x, v0)
15133 return true
15134 }
15135
15136
15137
15138 for {
15139 i := v_0
15140 if i.Op != OpRsh32Ux64 {
15141 break
15142 }
15143 _ = i.Args[1]
15144 x := i.Args[0]
15145 i_1 := i.Args[1]
15146 if i_1.Op != OpConst64 {
15147 break
15148 }
15149 c := auxIntToInt64(i_1.AuxInt)
15150 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != c || !(c >= 0 && c < 32 && i.Uses == 1) {
15151 break
15152 }
15153 v.reset(OpAnd32)
15154 v0 := b.NewValue0(v.Pos, OpConst32, v.Type)
15155 v0.AuxInt = int32ToAuxInt(int32(-1) << c)
15156 v.AddArg2(x, v0)
15157 return true
15158 }
15159
15160
15161
15162 for {
15163 if v_0.Op != OpRsh32Ux64 {
15164 break
15165 }
15166 _ = v_0.Args[1]
15167 v_0_0 := v_0.Args[0]
15168 if v_0_0.Op != OpLsh32x64 {
15169 break
15170 }
15171 _ = v_0_0.Args[1]
15172 x := v_0_0.Args[0]
15173 v_0_0_1 := v_0_0.Args[1]
15174 if v_0_0_1.Op != OpConst64 {
15175 break
15176 }
15177 c1 := auxIntToInt64(v_0_0_1.AuxInt)
15178 v_0_1 := v_0.Args[1]
15179 if v_0_1.Op != OpConst64 {
15180 break
15181 }
15182 c2 := auxIntToInt64(v_0_1.AuxInt)
15183 if v_1.Op != OpConst64 {
15184 break
15185 }
15186 c3 := auxIntToInt64(v_1.AuxInt)
15187 if !(uint64(c1) >= uint64(c2) && uint64(c3) >= uint64(c2) && !uaddOvf(c1-c2, c3)) {
15188 break
15189 }
15190 v.reset(OpLsh32x64)
15191 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
15192 v0.AuxInt = int64ToAuxInt(c1 - c2 + c3)
15193 v.AddArg2(x, v0)
15194 return true
15195 }
15196
15197
15198
15199 for {
15200 if v_0.Op != OpAnd32 {
15201 break
15202 }
15203 _ = v_0.Args[1]
15204 v_0_0 := v_0.Args[0]
15205 v_0_1 := v_0.Args[1]
15206 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
15207 if v_0_0.Op != OpRsh32x64 {
15208 continue
15209 }
15210 t := v_0_0.Type
15211 _ = v_0_0.Args[1]
15212 x := v_0_0.Args[0]
15213 v_0_0_1 := v_0_0.Args[1]
15214 if v_0_0_1.Op != OpConst64 {
15215 continue
15216 }
15217 t2 := v_0_0_1.Type
15218 c := auxIntToInt64(v_0_0_1.AuxInt)
15219 if v_0_1.Op != OpConst32 {
15220 continue
15221 }
15222 d := auxIntToInt32(v_0_1.AuxInt)
15223 if v_1.Op != OpConst64 {
15224 continue
15225 }
15226 e := auxIntToInt64(v_1.AuxInt)
15227 if !(c >= e) {
15228 continue
15229 }
15230 v.reset(OpAnd32)
15231 v0 := b.NewValue0(v.Pos, OpRsh32x64, t)
15232 v1 := b.NewValue0(v.Pos, OpConst64, t2)
15233 v1.AuxInt = int64ToAuxInt(c - e)
15234 v0.AddArg2(x, v1)
15235 v2 := b.NewValue0(v.Pos, OpConst32, t)
15236 v2.AuxInt = int32ToAuxInt(d << e)
15237 v.AddArg2(v0, v2)
15238 return true
15239 }
15240 break
15241 }
15242
15243
15244
15245 for {
15246 if v_0.Op != OpAnd32 {
15247 break
15248 }
15249 _ = v_0.Args[1]
15250 v_0_0 := v_0.Args[0]
15251 v_0_1 := v_0.Args[1]
15252 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
15253 if v_0_0.Op != OpRsh32Ux64 {
15254 continue
15255 }
15256 t := v_0_0.Type
15257 _ = v_0_0.Args[1]
15258 x := v_0_0.Args[0]
15259 v_0_0_1 := v_0_0.Args[1]
15260 if v_0_0_1.Op != OpConst64 {
15261 continue
15262 }
15263 t2 := v_0_0_1.Type
15264 c := auxIntToInt64(v_0_0_1.AuxInt)
15265 if v_0_1.Op != OpConst32 {
15266 continue
15267 }
15268 d := auxIntToInt32(v_0_1.AuxInt)
15269 if v_1.Op != OpConst64 {
15270 continue
15271 }
15272 e := auxIntToInt64(v_1.AuxInt)
15273 if !(c >= e) {
15274 continue
15275 }
15276 v.reset(OpAnd32)
15277 v0 := b.NewValue0(v.Pos, OpRsh32Ux64, t)
15278 v1 := b.NewValue0(v.Pos, OpConst64, t2)
15279 v1.AuxInt = int64ToAuxInt(c - e)
15280 v0.AddArg2(x, v1)
15281 v2 := b.NewValue0(v.Pos, OpConst32, t)
15282 v2.AuxInt = int32ToAuxInt(d << e)
15283 v.AddArg2(v0, v2)
15284 return true
15285 }
15286 break
15287 }
15288
15289
15290
15291 for {
15292 if v_0.Op != OpAnd32 {
15293 break
15294 }
15295 _ = v_0.Args[1]
15296 v_0_0 := v_0.Args[0]
15297 v_0_1 := v_0.Args[1]
15298 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
15299 if v_0_0.Op != OpRsh32x64 {
15300 continue
15301 }
15302 t := v_0_0.Type
15303 _ = v_0_0.Args[1]
15304 x := v_0_0.Args[0]
15305 v_0_0_1 := v_0_0.Args[1]
15306 if v_0_0_1.Op != OpConst64 {
15307 continue
15308 }
15309 t2 := v_0_0_1.Type
15310 c := auxIntToInt64(v_0_0_1.AuxInt)
15311 if v_0_1.Op != OpConst32 {
15312 continue
15313 }
15314 d := auxIntToInt32(v_0_1.AuxInt)
15315 if v_1.Op != OpConst64 {
15316 continue
15317 }
15318 e := auxIntToInt64(v_1.AuxInt)
15319 if !(c < e) {
15320 continue
15321 }
15322 v.reset(OpAnd32)
15323 v0 := b.NewValue0(v.Pos, OpLsh32x64, t)
15324 v1 := b.NewValue0(v.Pos, OpConst64, t2)
15325 v1.AuxInt = int64ToAuxInt(e - c)
15326 v0.AddArg2(x, v1)
15327 v2 := b.NewValue0(v.Pos, OpConst32, t)
15328 v2.AuxInt = int32ToAuxInt(d << e)
15329 v.AddArg2(v0, v2)
15330 return true
15331 }
15332 break
15333 }
15334
15335
15336
15337 for {
15338 if v_0.Op != OpAnd32 {
15339 break
15340 }
15341 _ = v_0.Args[1]
15342 v_0_0 := v_0.Args[0]
15343 v_0_1 := v_0.Args[1]
15344 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
15345 if v_0_0.Op != OpRsh32Ux64 {
15346 continue
15347 }
15348 t := v_0_0.Type
15349 _ = v_0_0.Args[1]
15350 x := v_0_0.Args[0]
15351 v_0_0_1 := v_0_0.Args[1]
15352 if v_0_0_1.Op != OpConst64 {
15353 continue
15354 }
15355 t2 := v_0_0_1.Type
15356 c := auxIntToInt64(v_0_0_1.AuxInt)
15357 if v_0_1.Op != OpConst32 {
15358 continue
15359 }
15360 d := auxIntToInt32(v_0_1.AuxInt)
15361 if v_1.Op != OpConst64 {
15362 continue
15363 }
15364 e := auxIntToInt64(v_1.AuxInt)
15365 if !(c < e) {
15366 continue
15367 }
15368 v.reset(OpAnd32)
15369 v0 := b.NewValue0(v.Pos, OpLsh32x64, t)
15370 v1 := b.NewValue0(v.Pos, OpConst64, t2)
15371 v1.AuxInt = int64ToAuxInt(e - c)
15372 v0.AddArg2(x, v1)
15373 v2 := b.NewValue0(v.Pos, OpConst32, t)
15374 v2.AuxInt = int32ToAuxInt(d << e)
15375 v.AddArg2(v0, v2)
15376 return true
15377 }
15378 break
15379 }
15380 return false
15381 }
15382 func rewriteValuegeneric_OpLsh32x8(v *Value) bool {
15383 v_1 := v.Args[1]
15384 v_0 := v.Args[0]
15385 b := v.Block
15386
15387
15388 for {
15389 t := v.Type
15390 x := v_0
15391 if v_1.Op != OpConst8 {
15392 break
15393 }
15394 c := auxIntToInt8(v_1.AuxInt)
15395 v.reset(OpLsh32x64)
15396 v0 := b.NewValue0(v.Pos, OpConst64, t)
15397 v0.AuxInt = int64ToAuxInt(int64(uint8(c)))
15398 v.AddArg2(x, v0)
15399 return true
15400 }
15401
15402
15403 for {
15404 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
15405 break
15406 }
15407 v.reset(OpConst32)
15408 v.AuxInt = int32ToAuxInt(0)
15409 return true
15410 }
15411 return false
15412 }
15413 func rewriteValuegeneric_OpLsh64x16(v *Value) bool {
15414 v_1 := v.Args[1]
15415 v_0 := v.Args[0]
15416 b := v.Block
15417
15418
15419 for {
15420 t := v.Type
15421 x := v_0
15422 if v_1.Op != OpConst16 {
15423 break
15424 }
15425 c := auxIntToInt16(v_1.AuxInt)
15426 v.reset(OpLsh64x64)
15427 v0 := b.NewValue0(v.Pos, OpConst64, t)
15428 v0.AuxInt = int64ToAuxInt(int64(uint16(c)))
15429 v.AddArg2(x, v0)
15430 return true
15431 }
15432
15433
15434 for {
15435 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
15436 break
15437 }
15438 v.reset(OpConst64)
15439 v.AuxInt = int64ToAuxInt(0)
15440 return true
15441 }
15442 return false
15443 }
15444 func rewriteValuegeneric_OpLsh64x32(v *Value) bool {
15445 v_1 := v.Args[1]
15446 v_0 := v.Args[0]
15447 b := v.Block
15448
15449
15450 for {
15451 t := v.Type
15452 x := v_0
15453 if v_1.Op != OpConst32 {
15454 break
15455 }
15456 c := auxIntToInt32(v_1.AuxInt)
15457 v.reset(OpLsh64x64)
15458 v0 := b.NewValue0(v.Pos, OpConst64, t)
15459 v0.AuxInt = int64ToAuxInt(int64(uint32(c)))
15460 v.AddArg2(x, v0)
15461 return true
15462 }
15463
15464
15465 for {
15466 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
15467 break
15468 }
15469 v.reset(OpConst64)
15470 v.AuxInt = int64ToAuxInt(0)
15471 return true
15472 }
15473 return false
15474 }
15475 func rewriteValuegeneric_OpLsh64x64(v *Value) bool {
15476 v_1 := v.Args[1]
15477 v_0 := v.Args[0]
15478 b := v.Block
15479 typ := &b.Func.Config.Types
15480
15481
15482 for {
15483 if v_0.Op != OpConst64 {
15484 break
15485 }
15486 c := auxIntToInt64(v_0.AuxInt)
15487 if v_1.Op != OpConst64 {
15488 break
15489 }
15490 d := auxIntToInt64(v_1.AuxInt)
15491 v.reset(OpConst64)
15492 v.AuxInt = int64ToAuxInt(c << uint64(d))
15493 return true
15494 }
15495
15496
15497 for {
15498 x := v_0
15499 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 0 {
15500 break
15501 }
15502 v.copyOf(x)
15503 return true
15504 }
15505
15506
15507 for {
15508 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
15509 break
15510 }
15511 v.reset(OpConst64)
15512 v.AuxInt = int64ToAuxInt(0)
15513 return true
15514 }
15515
15516
15517
15518 for {
15519 if v_1.Op != OpConst64 {
15520 break
15521 }
15522 c := auxIntToInt64(v_1.AuxInt)
15523 if !(uint64(c) >= 64) {
15524 break
15525 }
15526 v.reset(OpConst64)
15527 v.AuxInt = int64ToAuxInt(0)
15528 return true
15529 }
15530
15531
15532
15533 for {
15534 t := v.Type
15535 if v_0.Op != OpLsh64x64 {
15536 break
15537 }
15538 _ = v_0.Args[1]
15539 x := v_0.Args[0]
15540 v_0_1 := v_0.Args[1]
15541 if v_0_1.Op != OpConst64 {
15542 break
15543 }
15544 c := auxIntToInt64(v_0_1.AuxInt)
15545 if v_1.Op != OpConst64 {
15546 break
15547 }
15548 d := auxIntToInt64(v_1.AuxInt)
15549 if !(!uaddOvf(c, d)) {
15550 break
15551 }
15552 v.reset(OpLsh64x64)
15553 v0 := b.NewValue0(v.Pos, OpConst64, t)
15554 v0.AuxInt = int64ToAuxInt(c + d)
15555 v.AddArg2(x, v0)
15556 return true
15557 }
15558
15559
15560
15561 for {
15562 i := v_0
15563 if i.Op != OpRsh64x64 {
15564 break
15565 }
15566 _ = i.Args[1]
15567 x := i.Args[0]
15568 i_1 := i.Args[1]
15569 if i_1.Op != OpConst64 {
15570 break
15571 }
15572 c := auxIntToInt64(i_1.AuxInt)
15573 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != c || !(c >= 0 && c < 64 && i.Uses == 1) {
15574 break
15575 }
15576 v.reset(OpAnd64)
15577 v0 := b.NewValue0(v.Pos, OpConst64, v.Type)
15578 v0.AuxInt = int64ToAuxInt(int64(-1) << c)
15579 v.AddArg2(x, v0)
15580 return true
15581 }
15582
15583
15584
15585 for {
15586 i := v_0
15587 if i.Op != OpRsh64Ux64 {
15588 break
15589 }
15590 _ = i.Args[1]
15591 x := i.Args[0]
15592 i_1 := i.Args[1]
15593 if i_1.Op != OpConst64 {
15594 break
15595 }
15596 c := auxIntToInt64(i_1.AuxInt)
15597 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != c || !(c >= 0 && c < 64 && i.Uses == 1) {
15598 break
15599 }
15600 v.reset(OpAnd64)
15601 v0 := b.NewValue0(v.Pos, OpConst64, v.Type)
15602 v0.AuxInt = int64ToAuxInt(int64(-1) << c)
15603 v.AddArg2(x, v0)
15604 return true
15605 }
15606
15607
15608
15609 for {
15610 if v_0.Op != OpRsh64Ux64 {
15611 break
15612 }
15613 _ = v_0.Args[1]
15614 v_0_0 := v_0.Args[0]
15615 if v_0_0.Op != OpLsh64x64 {
15616 break
15617 }
15618 _ = v_0_0.Args[1]
15619 x := v_0_0.Args[0]
15620 v_0_0_1 := v_0_0.Args[1]
15621 if v_0_0_1.Op != OpConst64 {
15622 break
15623 }
15624 c1 := auxIntToInt64(v_0_0_1.AuxInt)
15625 v_0_1 := v_0.Args[1]
15626 if v_0_1.Op != OpConst64 {
15627 break
15628 }
15629 c2 := auxIntToInt64(v_0_1.AuxInt)
15630 if v_1.Op != OpConst64 {
15631 break
15632 }
15633 c3 := auxIntToInt64(v_1.AuxInt)
15634 if !(uint64(c1) >= uint64(c2) && uint64(c3) >= uint64(c2) && !uaddOvf(c1-c2, c3)) {
15635 break
15636 }
15637 v.reset(OpLsh64x64)
15638 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
15639 v0.AuxInt = int64ToAuxInt(c1 - c2 + c3)
15640 v.AddArg2(x, v0)
15641 return true
15642 }
15643
15644
15645
15646 for {
15647 if v_0.Op != OpAnd64 {
15648 break
15649 }
15650 _ = v_0.Args[1]
15651 v_0_0 := v_0.Args[0]
15652 v_0_1 := v_0.Args[1]
15653 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
15654 if v_0_0.Op != OpRsh64x64 {
15655 continue
15656 }
15657 t := v_0_0.Type
15658 _ = v_0_0.Args[1]
15659 x := v_0_0.Args[0]
15660 v_0_0_1 := v_0_0.Args[1]
15661 if v_0_0_1.Op != OpConst64 {
15662 continue
15663 }
15664 t2 := v_0_0_1.Type
15665 c := auxIntToInt64(v_0_0_1.AuxInt)
15666 if v_0_1.Op != OpConst64 {
15667 continue
15668 }
15669 d := auxIntToInt64(v_0_1.AuxInt)
15670 if v_1.Op != OpConst64 {
15671 continue
15672 }
15673 e := auxIntToInt64(v_1.AuxInt)
15674 if !(c >= e) {
15675 continue
15676 }
15677 v.reset(OpAnd64)
15678 v0 := b.NewValue0(v.Pos, OpRsh64x64, t)
15679 v1 := b.NewValue0(v.Pos, OpConst64, t2)
15680 v1.AuxInt = int64ToAuxInt(c - e)
15681 v0.AddArg2(x, v1)
15682 v2 := b.NewValue0(v.Pos, OpConst64, t)
15683 v2.AuxInt = int64ToAuxInt(d << e)
15684 v.AddArg2(v0, v2)
15685 return true
15686 }
15687 break
15688 }
15689
15690
15691
15692 for {
15693 if v_0.Op != OpAnd64 {
15694 break
15695 }
15696 _ = v_0.Args[1]
15697 v_0_0 := v_0.Args[0]
15698 v_0_1 := v_0.Args[1]
15699 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
15700 if v_0_0.Op != OpRsh64Ux64 {
15701 continue
15702 }
15703 t := v_0_0.Type
15704 _ = v_0_0.Args[1]
15705 x := v_0_0.Args[0]
15706 v_0_0_1 := v_0_0.Args[1]
15707 if v_0_0_1.Op != OpConst64 {
15708 continue
15709 }
15710 t2 := v_0_0_1.Type
15711 c := auxIntToInt64(v_0_0_1.AuxInt)
15712 if v_0_1.Op != OpConst64 {
15713 continue
15714 }
15715 d := auxIntToInt64(v_0_1.AuxInt)
15716 if v_1.Op != OpConst64 {
15717 continue
15718 }
15719 e := auxIntToInt64(v_1.AuxInt)
15720 if !(c >= e) {
15721 continue
15722 }
15723 v.reset(OpAnd64)
15724 v0 := b.NewValue0(v.Pos, OpRsh64Ux64, t)
15725 v1 := b.NewValue0(v.Pos, OpConst64, t2)
15726 v1.AuxInt = int64ToAuxInt(c - e)
15727 v0.AddArg2(x, v1)
15728 v2 := b.NewValue0(v.Pos, OpConst64, t)
15729 v2.AuxInt = int64ToAuxInt(d << e)
15730 v.AddArg2(v0, v2)
15731 return true
15732 }
15733 break
15734 }
15735
15736
15737
15738 for {
15739 if v_0.Op != OpAnd64 {
15740 break
15741 }
15742 _ = v_0.Args[1]
15743 v_0_0 := v_0.Args[0]
15744 v_0_1 := v_0.Args[1]
15745 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
15746 if v_0_0.Op != OpRsh64x64 {
15747 continue
15748 }
15749 t := v_0_0.Type
15750 _ = v_0_0.Args[1]
15751 x := v_0_0.Args[0]
15752 v_0_0_1 := v_0_0.Args[1]
15753 if v_0_0_1.Op != OpConst64 {
15754 continue
15755 }
15756 t2 := v_0_0_1.Type
15757 c := auxIntToInt64(v_0_0_1.AuxInt)
15758 if v_0_1.Op != OpConst64 {
15759 continue
15760 }
15761 d := auxIntToInt64(v_0_1.AuxInt)
15762 if v_1.Op != OpConst64 {
15763 continue
15764 }
15765 e := auxIntToInt64(v_1.AuxInt)
15766 if !(c < e) {
15767 continue
15768 }
15769 v.reset(OpAnd64)
15770 v0 := b.NewValue0(v.Pos, OpLsh64x64, t)
15771 v1 := b.NewValue0(v.Pos, OpConst64, t2)
15772 v1.AuxInt = int64ToAuxInt(e - c)
15773 v0.AddArg2(x, v1)
15774 v2 := b.NewValue0(v.Pos, OpConst64, t)
15775 v2.AuxInt = int64ToAuxInt(d << e)
15776 v.AddArg2(v0, v2)
15777 return true
15778 }
15779 break
15780 }
15781
15782
15783
15784 for {
15785 if v_0.Op != OpAnd64 {
15786 break
15787 }
15788 _ = v_0.Args[1]
15789 v_0_0 := v_0.Args[0]
15790 v_0_1 := v_0.Args[1]
15791 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
15792 if v_0_0.Op != OpRsh64Ux64 {
15793 continue
15794 }
15795 t := v_0_0.Type
15796 _ = v_0_0.Args[1]
15797 x := v_0_0.Args[0]
15798 v_0_0_1 := v_0_0.Args[1]
15799 if v_0_0_1.Op != OpConst64 {
15800 continue
15801 }
15802 t2 := v_0_0_1.Type
15803 c := auxIntToInt64(v_0_0_1.AuxInt)
15804 if v_0_1.Op != OpConst64 {
15805 continue
15806 }
15807 d := auxIntToInt64(v_0_1.AuxInt)
15808 if v_1.Op != OpConst64 {
15809 continue
15810 }
15811 e := auxIntToInt64(v_1.AuxInt)
15812 if !(c < e) {
15813 continue
15814 }
15815 v.reset(OpAnd64)
15816 v0 := b.NewValue0(v.Pos, OpLsh64x64, t)
15817 v1 := b.NewValue0(v.Pos, OpConst64, t2)
15818 v1.AuxInt = int64ToAuxInt(e - c)
15819 v0.AddArg2(x, v1)
15820 v2 := b.NewValue0(v.Pos, OpConst64, t)
15821 v2.AuxInt = int64ToAuxInt(d << e)
15822 v.AddArg2(v0, v2)
15823 return true
15824 }
15825 break
15826 }
15827 return false
15828 }
15829 func rewriteValuegeneric_OpLsh64x8(v *Value) bool {
15830 v_1 := v.Args[1]
15831 v_0 := v.Args[0]
15832 b := v.Block
15833
15834
15835 for {
15836 t := v.Type
15837 x := v_0
15838 if v_1.Op != OpConst8 {
15839 break
15840 }
15841 c := auxIntToInt8(v_1.AuxInt)
15842 v.reset(OpLsh64x64)
15843 v0 := b.NewValue0(v.Pos, OpConst64, t)
15844 v0.AuxInt = int64ToAuxInt(int64(uint8(c)))
15845 v.AddArg2(x, v0)
15846 return true
15847 }
15848
15849
15850 for {
15851 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
15852 break
15853 }
15854 v.reset(OpConst64)
15855 v.AuxInt = int64ToAuxInt(0)
15856 return true
15857 }
15858 return false
15859 }
15860 func rewriteValuegeneric_OpLsh8x16(v *Value) bool {
15861 v_1 := v.Args[1]
15862 v_0 := v.Args[0]
15863 b := v.Block
15864
15865
15866 for {
15867 t := v.Type
15868 x := v_0
15869 if v_1.Op != OpConst16 {
15870 break
15871 }
15872 c := auxIntToInt16(v_1.AuxInt)
15873 v.reset(OpLsh8x64)
15874 v0 := b.NewValue0(v.Pos, OpConst64, t)
15875 v0.AuxInt = int64ToAuxInt(int64(uint16(c)))
15876 v.AddArg2(x, v0)
15877 return true
15878 }
15879
15880
15881 for {
15882 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 {
15883 break
15884 }
15885 v.reset(OpConst8)
15886 v.AuxInt = int8ToAuxInt(0)
15887 return true
15888 }
15889 return false
15890 }
15891 func rewriteValuegeneric_OpLsh8x32(v *Value) bool {
15892 v_1 := v.Args[1]
15893 v_0 := v.Args[0]
15894 b := v.Block
15895
15896
15897 for {
15898 t := v.Type
15899 x := v_0
15900 if v_1.Op != OpConst32 {
15901 break
15902 }
15903 c := auxIntToInt32(v_1.AuxInt)
15904 v.reset(OpLsh8x64)
15905 v0 := b.NewValue0(v.Pos, OpConst64, t)
15906 v0.AuxInt = int64ToAuxInt(int64(uint32(c)))
15907 v.AddArg2(x, v0)
15908 return true
15909 }
15910
15911
15912 for {
15913 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 {
15914 break
15915 }
15916 v.reset(OpConst8)
15917 v.AuxInt = int8ToAuxInt(0)
15918 return true
15919 }
15920 return false
15921 }
15922 func rewriteValuegeneric_OpLsh8x64(v *Value) bool {
15923 v_1 := v.Args[1]
15924 v_0 := v.Args[0]
15925 b := v.Block
15926 typ := &b.Func.Config.Types
15927
15928
15929 for {
15930 if v_0.Op != OpConst8 {
15931 break
15932 }
15933 c := auxIntToInt8(v_0.AuxInt)
15934 if v_1.Op != OpConst64 {
15935 break
15936 }
15937 d := auxIntToInt64(v_1.AuxInt)
15938 v.reset(OpConst8)
15939 v.AuxInt = int8ToAuxInt(c << uint64(d))
15940 return true
15941 }
15942
15943
15944 for {
15945 x := v_0
15946 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 0 {
15947 break
15948 }
15949 v.copyOf(x)
15950 return true
15951 }
15952
15953
15954 for {
15955 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 {
15956 break
15957 }
15958 v.reset(OpConst8)
15959 v.AuxInt = int8ToAuxInt(0)
15960 return true
15961 }
15962
15963
15964
15965 for {
15966 if v_1.Op != OpConst64 {
15967 break
15968 }
15969 c := auxIntToInt64(v_1.AuxInt)
15970 if !(uint64(c) >= 8) {
15971 break
15972 }
15973 v.reset(OpConst8)
15974 v.AuxInt = int8ToAuxInt(0)
15975 return true
15976 }
15977
15978
15979
15980 for {
15981 t := v.Type
15982 if v_0.Op != OpLsh8x64 {
15983 break
15984 }
15985 _ = v_0.Args[1]
15986 x := v_0.Args[0]
15987 v_0_1 := v_0.Args[1]
15988 if v_0_1.Op != OpConst64 {
15989 break
15990 }
15991 c := auxIntToInt64(v_0_1.AuxInt)
15992 if v_1.Op != OpConst64 {
15993 break
15994 }
15995 d := auxIntToInt64(v_1.AuxInt)
15996 if !(!uaddOvf(c, d)) {
15997 break
15998 }
15999 v.reset(OpLsh8x64)
16000 v0 := b.NewValue0(v.Pos, OpConst64, t)
16001 v0.AuxInt = int64ToAuxInt(c + d)
16002 v.AddArg2(x, v0)
16003 return true
16004 }
16005
16006
16007
16008 for {
16009 i := v_0
16010 if i.Op != OpRsh8x64 {
16011 break
16012 }
16013 _ = i.Args[1]
16014 x := i.Args[0]
16015 i_1 := i.Args[1]
16016 if i_1.Op != OpConst64 {
16017 break
16018 }
16019 c := auxIntToInt64(i_1.AuxInt)
16020 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != c || !(c >= 0 && c < 8 && i.Uses == 1) {
16021 break
16022 }
16023 v.reset(OpAnd8)
16024 v0 := b.NewValue0(v.Pos, OpConst8, v.Type)
16025 v0.AuxInt = int8ToAuxInt(int8(-1) << c)
16026 v.AddArg2(x, v0)
16027 return true
16028 }
16029
16030
16031
16032 for {
16033 i := v_0
16034 if i.Op != OpRsh8Ux64 {
16035 break
16036 }
16037 _ = i.Args[1]
16038 x := i.Args[0]
16039 i_1 := i.Args[1]
16040 if i_1.Op != OpConst64 {
16041 break
16042 }
16043 c := auxIntToInt64(i_1.AuxInt)
16044 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != c || !(c >= 0 && c < 8 && i.Uses == 1) {
16045 break
16046 }
16047 v.reset(OpAnd8)
16048 v0 := b.NewValue0(v.Pos, OpConst8, v.Type)
16049 v0.AuxInt = int8ToAuxInt(int8(-1) << c)
16050 v.AddArg2(x, v0)
16051 return true
16052 }
16053
16054
16055
16056 for {
16057 if v_0.Op != OpRsh8Ux64 {
16058 break
16059 }
16060 _ = v_0.Args[1]
16061 v_0_0 := v_0.Args[0]
16062 if v_0_0.Op != OpLsh8x64 {
16063 break
16064 }
16065 _ = v_0_0.Args[1]
16066 x := v_0_0.Args[0]
16067 v_0_0_1 := v_0_0.Args[1]
16068 if v_0_0_1.Op != OpConst64 {
16069 break
16070 }
16071 c1 := auxIntToInt64(v_0_0_1.AuxInt)
16072 v_0_1 := v_0.Args[1]
16073 if v_0_1.Op != OpConst64 {
16074 break
16075 }
16076 c2 := auxIntToInt64(v_0_1.AuxInt)
16077 if v_1.Op != OpConst64 {
16078 break
16079 }
16080 c3 := auxIntToInt64(v_1.AuxInt)
16081 if !(uint64(c1) >= uint64(c2) && uint64(c3) >= uint64(c2) && !uaddOvf(c1-c2, c3)) {
16082 break
16083 }
16084 v.reset(OpLsh8x64)
16085 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
16086 v0.AuxInt = int64ToAuxInt(c1 - c2 + c3)
16087 v.AddArg2(x, v0)
16088 return true
16089 }
16090
16091
16092
16093 for {
16094 if v_0.Op != OpAnd8 {
16095 break
16096 }
16097 _ = v_0.Args[1]
16098 v_0_0 := v_0.Args[0]
16099 v_0_1 := v_0.Args[1]
16100 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
16101 if v_0_0.Op != OpRsh8x64 {
16102 continue
16103 }
16104 t := v_0_0.Type
16105 _ = v_0_0.Args[1]
16106 x := v_0_0.Args[0]
16107 v_0_0_1 := v_0_0.Args[1]
16108 if v_0_0_1.Op != OpConst64 {
16109 continue
16110 }
16111 t2 := v_0_0_1.Type
16112 c := auxIntToInt64(v_0_0_1.AuxInt)
16113 if v_0_1.Op != OpConst8 {
16114 continue
16115 }
16116 d := auxIntToInt8(v_0_1.AuxInt)
16117 if v_1.Op != OpConst64 {
16118 continue
16119 }
16120 e := auxIntToInt64(v_1.AuxInt)
16121 if !(c >= e) {
16122 continue
16123 }
16124 v.reset(OpAnd8)
16125 v0 := b.NewValue0(v.Pos, OpRsh8x64, t)
16126 v1 := b.NewValue0(v.Pos, OpConst64, t2)
16127 v1.AuxInt = int64ToAuxInt(c - e)
16128 v0.AddArg2(x, v1)
16129 v2 := b.NewValue0(v.Pos, OpConst8, t)
16130 v2.AuxInt = int8ToAuxInt(d << e)
16131 v.AddArg2(v0, v2)
16132 return true
16133 }
16134 break
16135 }
16136
16137
16138
16139 for {
16140 if v_0.Op != OpAnd8 {
16141 break
16142 }
16143 _ = v_0.Args[1]
16144 v_0_0 := v_0.Args[0]
16145 v_0_1 := v_0.Args[1]
16146 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
16147 if v_0_0.Op != OpRsh8Ux64 {
16148 continue
16149 }
16150 t := v_0_0.Type
16151 _ = v_0_0.Args[1]
16152 x := v_0_0.Args[0]
16153 v_0_0_1 := v_0_0.Args[1]
16154 if v_0_0_1.Op != OpConst64 {
16155 continue
16156 }
16157 t2 := v_0_0_1.Type
16158 c := auxIntToInt64(v_0_0_1.AuxInt)
16159 if v_0_1.Op != OpConst8 {
16160 continue
16161 }
16162 d := auxIntToInt8(v_0_1.AuxInt)
16163 if v_1.Op != OpConst64 {
16164 continue
16165 }
16166 e := auxIntToInt64(v_1.AuxInt)
16167 if !(c >= e) {
16168 continue
16169 }
16170 v.reset(OpAnd8)
16171 v0 := b.NewValue0(v.Pos, OpRsh8Ux64, t)
16172 v1 := b.NewValue0(v.Pos, OpConst64, t2)
16173 v1.AuxInt = int64ToAuxInt(c - e)
16174 v0.AddArg2(x, v1)
16175 v2 := b.NewValue0(v.Pos, OpConst8, t)
16176 v2.AuxInt = int8ToAuxInt(d << e)
16177 v.AddArg2(v0, v2)
16178 return true
16179 }
16180 break
16181 }
16182
16183
16184
16185 for {
16186 if v_0.Op != OpAnd8 {
16187 break
16188 }
16189 _ = v_0.Args[1]
16190 v_0_0 := v_0.Args[0]
16191 v_0_1 := v_0.Args[1]
16192 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
16193 if v_0_0.Op != OpRsh8x64 {
16194 continue
16195 }
16196 t := v_0_0.Type
16197 _ = v_0_0.Args[1]
16198 x := v_0_0.Args[0]
16199 v_0_0_1 := v_0_0.Args[1]
16200 if v_0_0_1.Op != OpConst64 {
16201 continue
16202 }
16203 t2 := v_0_0_1.Type
16204 c := auxIntToInt64(v_0_0_1.AuxInt)
16205 if v_0_1.Op != OpConst8 {
16206 continue
16207 }
16208 d := auxIntToInt8(v_0_1.AuxInt)
16209 if v_1.Op != OpConst64 {
16210 continue
16211 }
16212 e := auxIntToInt64(v_1.AuxInt)
16213 if !(c < e) {
16214 continue
16215 }
16216 v.reset(OpAnd8)
16217 v0 := b.NewValue0(v.Pos, OpLsh8x64, t)
16218 v1 := b.NewValue0(v.Pos, OpConst64, t2)
16219 v1.AuxInt = int64ToAuxInt(e - c)
16220 v0.AddArg2(x, v1)
16221 v2 := b.NewValue0(v.Pos, OpConst8, t)
16222 v2.AuxInt = int8ToAuxInt(d << e)
16223 v.AddArg2(v0, v2)
16224 return true
16225 }
16226 break
16227 }
16228
16229
16230
16231 for {
16232 if v_0.Op != OpAnd8 {
16233 break
16234 }
16235 _ = v_0.Args[1]
16236 v_0_0 := v_0.Args[0]
16237 v_0_1 := v_0.Args[1]
16238 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
16239 if v_0_0.Op != OpRsh8Ux64 {
16240 continue
16241 }
16242 t := v_0_0.Type
16243 _ = v_0_0.Args[1]
16244 x := v_0_0.Args[0]
16245 v_0_0_1 := v_0_0.Args[1]
16246 if v_0_0_1.Op != OpConst64 {
16247 continue
16248 }
16249 t2 := v_0_0_1.Type
16250 c := auxIntToInt64(v_0_0_1.AuxInt)
16251 if v_0_1.Op != OpConst8 {
16252 continue
16253 }
16254 d := auxIntToInt8(v_0_1.AuxInt)
16255 if v_1.Op != OpConst64 {
16256 continue
16257 }
16258 e := auxIntToInt64(v_1.AuxInt)
16259 if !(c < e) {
16260 continue
16261 }
16262 v.reset(OpAnd8)
16263 v0 := b.NewValue0(v.Pos, OpLsh8x64, t)
16264 v1 := b.NewValue0(v.Pos, OpConst64, t2)
16265 v1.AuxInt = int64ToAuxInt(e - c)
16266 v0.AddArg2(x, v1)
16267 v2 := b.NewValue0(v.Pos, OpConst8, t)
16268 v2.AuxInt = int8ToAuxInt(d << e)
16269 v.AddArg2(v0, v2)
16270 return true
16271 }
16272 break
16273 }
16274 return false
16275 }
16276 func rewriteValuegeneric_OpLsh8x8(v *Value) bool {
16277 v_1 := v.Args[1]
16278 v_0 := v.Args[0]
16279 b := v.Block
16280
16281
16282 for {
16283 t := v.Type
16284 x := v_0
16285 if v_1.Op != OpConst8 {
16286 break
16287 }
16288 c := auxIntToInt8(v_1.AuxInt)
16289 v.reset(OpLsh8x64)
16290 v0 := b.NewValue0(v.Pos, OpConst64, t)
16291 v0.AuxInt = int64ToAuxInt(int64(uint8(c)))
16292 v.AddArg2(x, v0)
16293 return true
16294 }
16295
16296
16297 for {
16298 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 {
16299 break
16300 }
16301 v.reset(OpConst8)
16302 v.AuxInt = int8ToAuxInt(0)
16303 return true
16304 }
16305 return false
16306 }
16307 func rewriteValuegeneric_OpMod16(v *Value) bool {
16308 v_1 := v.Args[1]
16309 v_0 := v.Args[0]
16310 b := v.Block
16311
16312
16313
16314 for {
16315 if v_0.Op != OpConst16 {
16316 break
16317 }
16318 c := auxIntToInt16(v_0.AuxInt)
16319 if v_1.Op != OpConst16 {
16320 break
16321 }
16322 d := auxIntToInt16(v_1.AuxInt)
16323 if !(d != 0) {
16324 break
16325 }
16326 v.reset(OpConst16)
16327 v.AuxInt = int16ToAuxInt(c % d)
16328 return true
16329 }
16330
16331
16332
16333 for {
16334 t := v.Type
16335 n := v_0
16336 if v_1.Op != OpConst16 {
16337 break
16338 }
16339 c := auxIntToInt16(v_1.AuxInt)
16340 if !(isNonNegative(n) && isPowerOfTwo(c)) {
16341 break
16342 }
16343 v.reset(OpAnd16)
16344 v0 := b.NewValue0(v.Pos, OpConst16, t)
16345 v0.AuxInt = int16ToAuxInt(c - 1)
16346 v.AddArg2(n, v0)
16347 return true
16348 }
16349
16350
16351
16352 for {
16353 t := v.Type
16354 n := v_0
16355 if v_1.Op != OpConst16 {
16356 break
16357 }
16358 c := auxIntToInt16(v_1.AuxInt)
16359 if !(c < 0 && c != -1<<15) {
16360 break
16361 }
16362 v.reset(OpMod16)
16363 v.Type = t
16364 v0 := b.NewValue0(v.Pos, OpConst16, t)
16365 v0.AuxInt = int16ToAuxInt(-c)
16366 v.AddArg2(n, v0)
16367 return true
16368 }
16369
16370
16371
16372 for {
16373 t := v.Type
16374 x := v_0
16375 if v_1.Op != OpConst16 {
16376 break
16377 }
16378 c := auxIntToInt16(v_1.AuxInt)
16379 if !(x.Op != OpConst16 && (c > 0 || c == -1<<15)) {
16380 break
16381 }
16382 v.reset(OpSub16)
16383 v0 := b.NewValue0(v.Pos, OpMul16, t)
16384 v1 := b.NewValue0(v.Pos, OpDiv16, t)
16385 v2 := b.NewValue0(v.Pos, OpConst16, t)
16386 v2.AuxInt = int16ToAuxInt(c)
16387 v1.AddArg2(x, v2)
16388 v0.AddArg2(v1, v2)
16389 v.AddArg2(x, v0)
16390 return true
16391 }
16392 return false
16393 }
16394 func rewriteValuegeneric_OpMod16u(v *Value) bool {
16395 v_1 := v.Args[1]
16396 v_0 := v.Args[0]
16397 b := v.Block
16398
16399
16400
16401 for {
16402 if v_0.Op != OpConst16 {
16403 break
16404 }
16405 c := auxIntToInt16(v_0.AuxInt)
16406 if v_1.Op != OpConst16 {
16407 break
16408 }
16409 d := auxIntToInt16(v_1.AuxInt)
16410 if !(d != 0) {
16411 break
16412 }
16413 v.reset(OpConst16)
16414 v.AuxInt = int16ToAuxInt(int16(uint16(c) % uint16(d)))
16415 return true
16416 }
16417
16418
16419
16420 for {
16421 t := v.Type
16422 n := v_0
16423 if v_1.Op != OpConst16 {
16424 break
16425 }
16426 c := auxIntToInt16(v_1.AuxInt)
16427 if !(isPowerOfTwo(c)) {
16428 break
16429 }
16430 v.reset(OpAnd16)
16431 v0 := b.NewValue0(v.Pos, OpConst16, t)
16432 v0.AuxInt = int16ToAuxInt(c - 1)
16433 v.AddArg2(n, v0)
16434 return true
16435 }
16436
16437
16438
16439 for {
16440 t := v.Type
16441 x := v_0
16442 if v_1.Op != OpConst16 {
16443 break
16444 }
16445 c := auxIntToInt16(v_1.AuxInt)
16446 if !(x.Op != OpConst16 && c > 0 && umagicOK16(c)) {
16447 break
16448 }
16449 v.reset(OpSub16)
16450 v0 := b.NewValue0(v.Pos, OpMul16, t)
16451 v1 := b.NewValue0(v.Pos, OpDiv16u, t)
16452 v2 := b.NewValue0(v.Pos, OpConst16, t)
16453 v2.AuxInt = int16ToAuxInt(c)
16454 v1.AddArg2(x, v2)
16455 v0.AddArg2(v1, v2)
16456 v.AddArg2(x, v0)
16457 return true
16458 }
16459 return false
16460 }
16461 func rewriteValuegeneric_OpMod32(v *Value) bool {
16462 v_1 := v.Args[1]
16463 v_0 := v.Args[0]
16464 b := v.Block
16465
16466
16467
16468 for {
16469 if v_0.Op != OpConst32 {
16470 break
16471 }
16472 c := auxIntToInt32(v_0.AuxInt)
16473 if v_1.Op != OpConst32 {
16474 break
16475 }
16476 d := auxIntToInt32(v_1.AuxInt)
16477 if !(d != 0) {
16478 break
16479 }
16480 v.reset(OpConst32)
16481 v.AuxInt = int32ToAuxInt(c % d)
16482 return true
16483 }
16484
16485
16486
16487 for {
16488 t := v.Type
16489 n := v_0
16490 if v_1.Op != OpConst32 {
16491 break
16492 }
16493 c := auxIntToInt32(v_1.AuxInt)
16494 if !(isNonNegative(n) && isPowerOfTwo(c)) {
16495 break
16496 }
16497 v.reset(OpAnd32)
16498 v0 := b.NewValue0(v.Pos, OpConst32, t)
16499 v0.AuxInt = int32ToAuxInt(c - 1)
16500 v.AddArg2(n, v0)
16501 return true
16502 }
16503
16504
16505
16506 for {
16507 t := v.Type
16508 n := v_0
16509 if v_1.Op != OpConst32 {
16510 break
16511 }
16512 c := auxIntToInt32(v_1.AuxInt)
16513 if !(c < 0 && c != -1<<31) {
16514 break
16515 }
16516 v.reset(OpMod32)
16517 v.Type = t
16518 v0 := b.NewValue0(v.Pos, OpConst32, t)
16519 v0.AuxInt = int32ToAuxInt(-c)
16520 v.AddArg2(n, v0)
16521 return true
16522 }
16523
16524
16525
16526 for {
16527 t := v.Type
16528 x := v_0
16529 if v_1.Op != OpConst32 {
16530 break
16531 }
16532 c := auxIntToInt32(v_1.AuxInt)
16533 if !(x.Op != OpConst32 && (c > 0 || c == -1<<31)) {
16534 break
16535 }
16536 v.reset(OpSub32)
16537 v0 := b.NewValue0(v.Pos, OpMul32, t)
16538 v1 := b.NewValue0(v.Pos, OpDiv32, t)
16539 v2 := b.NewValue0(v.Pos, OpConst32, t)
16540 v2.AuxInt = int32ToAuxInt(c)
16541 v1.AddArg2(x, v2)
16542 v0.AddArg2(v1, v2)
16543 v.AddArg2(x, v0)
16544 return true
16545 }
16546 return false
16547 }
16548 func rewriteValuegeneric_OpMod32u(v *Value) bool {
16549 v_1 := v.Args[1]
16550 v_0 := v.Args[0]
16551 b := v.Block
16552
16553
16554
16555 for {
16556 if v_0.Op != OpConst32 {
16557 break
16558 }
16559 c := auxIntToInt32(v_0.AuxInt)
16560 if v_1.Op != OpConst32 {
16561 break
16562 }
16563 d := auxIntToInt32(v_1.AuxInt)
16564 if !(d != 0) {
16565 break
16566 }
16567 v.reset(OpConst32)
16568 v.AuxInt = int32ToAuxInt(int32(uint32(c) % uint32(d)))
16569 return true
16570 }
16571
16572
16573
16574 for {
16575 t := v.Type
16576 n := v_0
16577 if v_1.Op != OpConst32 {
16578 break
16579 }
16580 c := auxIntToInt32(v_1.AuxInt)
16581 if !(isPowerOfTwo(c)) {
16582 break
16583 }
16584 v.reset(OpAnd32)
16585 v0 := b.NewValue0(v.Pos, OpConst32, t)
16586 v0.AuxInt = int32ToAuxInt(c - 1)
16587 v.AddArg2(n, v0)
16588 return true
16589 }
16590
16591
16592
16593 for {
16594 t := v.Type
16595 x := v_0
16596 if v_1.Op != OpConst32 {
16597 break
16598 }
16599 c := auxIntToInt32(v_1.AuxInt)
16600 if !(x.Op != OpConst32 && c > 0 && umagicOK32(c)) {
16601 break
16602 }
16603 v.reset(OpSub32)
16604 v0 := b.NewValue0(v.Pos, OpMul32, t)
16605 v1 := b.NewValue0(v.Pos, OpDiv32u, t)
16606 v2 := b.NewValue0(v.Pos, OpConst32, t)
16607 v2.AuxInt = int32ToAuxInt(c)
16608 v1.AddArg2(x, v2)
16609 v0.AddArg2(v1, v2)
16610 v.AddArg2(x, v0)
16611 return true
16612 }
16613 return false
16614 }
16615 func rewriteValuegeneric_OpMod64(v *Value) bool {
16616 v_1 := v.Args[1]
16617 v_0 := v.Args[0]
16618 b := v.Block
16619
16620
16621
16622 for {
16623 if v_0.Op != OpConst64 {
16624 break
16625 }
16626 c := auxIntToInt64(v_0.AuxInt)
16627 if v_1.Op != OpConst64 {
16628 break
16629 }
16630 d := auxIntToInt64(v_1.AuxInt)
16631 if !(d != 0) {
16632 break
16633 }
16634 v.reset(OpConst64)
16635 v.AuxInt = int64ToAuxInt(c % d)
16636 return true
16637 }
16638
16639
16640
16641 for {
16642 t := v.Type
16643 n := v_0
16644 if v_1.Op != OpConst64 {
16645 break
16646 }
16647 c := auxIntToInt64(v_1.AuxInt)
16648 if !(isNonNegative(n) && isPowerOfTwo(c)) {
16649 break
16650 }
16651 v.reset(OpAnd64)
16652 v0 := b.NewValue0(v.Pos, OpConst64, t)
16653 v0.AuxInt = int64ToAuxInt(c - 1)
16654 v.AddArg2(n, v0)
16655 return true
16656 }
16657
16658
16659
16660 for {
16661 n := v_0
16662 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != -1<<63 || !(isNonNegative(n)) {
16663 break
16664 }
16665 v.copyOf(n)
16666 return true
16667 }
16668
16669
16670
16671 for {
16672 t := v.Type
16673 n := v_0
16674 if v_1.Op != OpConst64 {
16675 break
16676 }
16677 c := auxIntToInt64(v_1.AuxInt)
16678 if !(c < 0 && c != -1<<63) {
16679 break
16680 }
16681 v.reset(OpMod64)
16682 v.Type = t
16683 v0 := b.NewValue0(v.Pos, OpConst64, t)
16684 v0.AuxInt = int64ToAuxInt(-c)
16685 v.AddArg2(n, v0)
16686 return true
16687 }
16688
16689
16690
16691 for {
16692 t := v.Type
16693 x := v_0
16694 if v_1.Op != OpConst64 {
16695 break
16696 }
16697 c := auxIntToInt64(v_1.AuxInt)
16698 if !(x.Op != OpConst64 && (c > 0 || c == -1<<63)) {
16699 break
16700 }
16701 v.reset(OpSub64)
16702 v0 := b.NewValue0(v.Pos, OpMul64, t)
16703 v1 := b.NewValue0(v.Pos, OpDiv64, t)
16704 v2 := b.NewValue0(v.Pos, OpConst64, t)
16705 v2.AuxInt = int64ToAuxInt(c)
16706 v1.AddArg2(x, v2)
16707 v0.AddArg2(v1, v2)
16708 v.AddArg2(x, v0)
16709 return true
16710 }
16711 return false
16712 }
16713 func rewriteValuegeneric_OpMod64u(v *Value) bool {
16714 v_1 := v.Args[1]
16715 v_0 := v.Args[0]
16716 b := v.Block
16717
16718
16719
16720 for {
16721 if v_0.Op != OpConst64 {
16722 break
16723 }
16724 c := auxIntToInt64(v_0.AuxInt)
16725 if v_1.Op != OpConst64 {
16726 break
16727 }
16728 d := auxIntToInt64(v_1.AuxInt)
16729 if !(d != 0) {
16730 break
16731 }
16732 v.reset(OpConst64)
16733 v.AuxInt = int64ToAuxInt(int64(uint64(c) % uint64(d)))
16734 return true
16735 }
16736
16737
16738
16739 for {
16740 t := v.Type
16741 n := v_0
16742 if v_1.Op != OpConst64 {
16743 break
16744 }
16745 c := auxIntToInt64(v_1.AuxInt)
16746 if !(isPowerOfTwo(c)) {
16747 break
16748 }
16749 v.reset(OpAnd64)
16750 v0 := b.NewValue0(v.Pos, OpConst64, t)
16751 v0.AuxInt = int64ToAuxInt(c - 1)
16752 v.AddArg2(n, v0)
16753 return true
16754 }
16755
16756
16757 for {
16758 t := v.Type
16759 n := v_0
16760 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != -1<<63 {
16761 break
16762 }
16763 v.reset(OpAnd64)
16764 v0 := b.NewValue0(v.Pos, OpConst64, t)
16765 v0.AuxInt = int64ToAuxInt(1<<63 - 1)
16766 v.AddArg2(n, v0)
16767 return true
16768 }
16769
16770
16771
16772 for {
16773 t := v.Type
16774 x := v_0
16775 if v_1.Op != OpConst64 {
16776 break
16777 }
16778 c := auxIntToInt64(v_1.AuxInt)
16779 if !(x.Op != OpConst64 && c > 0 && umagicOK64(c)) {
16780 break
16781 }
16782 v.reset(OpSub64)
16783 v0 := b.NewValue0(v.Pos, OpMul64, t)
16784 v1 := b.NewValue0(v.Pos, OpDiv64u, t)
16785 v2 := b.NewValue0(v.Pos, OpConst64, t)
16786 v2.AuxInt = int64ToAuxInt(c)
16787 v1.AddArg2(x, v2)
16788 v0.AddArg2(v1, v2)
16789 v.AddArg2(x, v0)
16790 return true
16791 }
16792 return false
16793 }
16794 func rewriteValuegeneric_OpMod8(v *Value) bool {
16795 v_1 := v.Args[1]
16796 v_0 := v.Args[0]
16797 b := v.Block
16798
16799
16800
16801 for {
16802 if v_0.Op != OpConst8 {
16803 break
16804 }
16805 c := auxIntToInt8(v_0.AuxInt)
16806 if v_1.Op != OpConst8 {
16807 break
16808 }
16809 d := auxIntToInt8(v_1.AuxInt)
16810 if !(d != 0) {
16811 break
16812 }
16813 v.reset(OpConst8)
16814 v.AuxInt = int8ToAuxInt(c % d)
16815 return true
16816 }
16817
16818
16819
16820 for {
16821 t := v.Type
16822 n := v_0
16823 if v_1.Op != OpConst8 {
16824 break
16825 }
16826 c := auxIntToInt8(v_1.AuxInt)
16827 if !(isNonNegative(n) && isPowerOfTwo(c)) {
16828 break
16829 }
16830 v.reset(OpAnd8)
16831 v0 := b.NewValue0(v.Pos, OpConst8, t)
16832 v0.AuxInt = int8ToAuxInt(c - 1)
16833 v.AddArg2(n, v0)
16834 return true
16835 }
16836
16837
16838
16839 for {
16840 t := v.Type
16841 n := v_0
16842 if v_1.Op != OpConst8 {
16843 break
16844 }
16845 c := auxIntToInt8(v_1.AuxInt)
16846 if !(c < 0 && c != -1<<7) {
16847 break
16848 }
16849 v.reset(OpMod8)
16850 v.Type = t
16851 v0 := b.NewValue0(v.Pos, OpConst8, t)
16852 v0.AuxInt = int8ToAuxInt(-c)
16853 v.AddArg2(n, v0)
16854 return true
16855 }
16856
16857
16858
16859 for {
16860 t := v.Type
16861 x := v_0
16862 if v_1.Op != OpConst8 {
16863 break
16864 }
16865 c := auxIntToInt8(v_1.AuxInt)
16866 if !(x.Op != OpConst8 && (c > 0 || c == -1<<7)) {
16867 break
16868 }
16869 v.reset(OpSub8)
16870 v0 := b.NewValue0(v.Pos, OpMul8, t)
16871 v1 := b.NewValue0(v.Pos, OpDiv8, t)
16872 v2 := b.NewValue0(v.Pos, OpConst8, t)
16873 v2.AuxInt = int8ToAuxInt(c)
16874 v1.AddArg2(x, v2)
16875 v0.AddArg2(v1, v2)
16876 v.AddArg2(x, v0)
16877 return true
16878 }
16879 return false
16880 }
16881 func rewriteValuegeneric_OpMod8u(v *Value) bool {
16882 v_1 := v.Args[1]
16883 v_0 := v.Args[0]
16884 b := v.Block
16885
16886
16887
16888 for {
16889 if v_0.Op != OpConst8 {
16890 break
16891 }
16892 c := auxIntToInt8(v_0.AuxInt)
16893 if v_1.Op != OpConst8 {
16894 break
16895 }
16896 d := auxIntToInt8(v_1.AuxInt)
16897 if !(d != 0) {
16898 break
16899 }
16900 v.reset(OpConst8)
16901 v.AuxInt = int8ToAuxInt(int8(uint8(c) % uint8(d)))
16902 return true
16903 }
16904
16905
16906
16907 for {
16908 t := v.Type
16909 n := v_0
16910 if v_1.Op != OpConst8 {
16911 break
16912 }
16913 c := auxIntToInt8(v_1.AuxInt)
16914 if !(isPowerOfTwo(c)) {
16915 break
16916 }
16917 v.reset(OpAnd8)
16918 v0 := b.NewValue0(v.Pos, OpConst8, t)
16919 v0.AuxInt = int8ToAuxInt(c - 1)
16920 v.AddArg2(n, v0)
16921 return true
16922 }
16923
16924
16925
16926 for {
16927 t := v.Type
16928 x := v_0
16929 if v_1.Op != OpConst8 {
16930 break
16931 }
16932 c := auxIntToInt8(v_1.AuxInt)
16933 if !(x.Op != OpConst8 && c > 0 && umagicOK8(c)) {
16934 break
16935 }
16936 v.reset(OpSub8)
16937 v0 := b.NewValue0(v.Pos, OpMul8, t)
16938 v1 := b.NewValue0(v.Pos, OpDiv8u, t)
16939 v2 := b.NewValue0(v.Pos, OpConst8, t)
16940 v2.AuxInt = int8ToAuxInt(c)
16941 v1.AddArg2(x, v2)
16942 v0.AddArg2(v1, v2)
16943 v.AddArg2(x, v0)
16944 return true
16945 }
16946 return false
16947 }
16948 func rewriteValuegeneric_OpMove(v *Value) bool {
16949 v_2 := v.Args[2]
16950 v_1 := v.Args[1]
16951 v_0 := v.Args[0]
16952 b := v.Block
16953 config := b.Func.Config
16954
16955
16956
16957 for {
16958 n := auxIntToInt64(v.AuxInt)
16959 t := auxToType(v.Aux)
16960 dst1 := v_0
16961 src := v_1
16962 mem := v_2
16963 if mem.Op != OpZero || auxIntToInt64(mem.AuxInt) != n || auxToType(mem.Aux) != t {
16964 break
16965 }
16966 dst2 := mem.Args[0]
16967 if !(isSamePtr(src, dst2)) {
16968 break
16969 }
16970 v.reset(OpZero)
16971 v.AuxInt = int64ToAuxInt(n)
16972 v.Aux = typeToAux(t)
16973 v.AddArg2(dst1, mem)
16974 return true
16975 }
16976
16977
16978
16979 for {
16980 n := auxIntToInt64(v.AuxInt)
16981 t := auxToType(v.Aux)
16982 dst1 := v_0
16983 src := v_1
16984 mem := v_2
16985 if mem.Op != OpVarDef {
16986 break
16987 }
16988 mem_0 := mem.Args[0]
16989 if mem_0.Op != OpZero || auxIntToInt64(mem_0.AuxInt) != n || auxToType(mem_0.Aux) != t {
16990 break
16991 }
16992 dst0 := mem_0.Args[0]
16993 if !(isSamePtr(src, dst0)) {
16994 break
16995 }
16996 v.reset(OpZero)
16997 v.AuxInt = int64ToAuxInt(n)
16998 v.Aux = typeToAux(t)
16999 v.AddArg2(dst1, mem)
17000 return true
17001 }
17002
17003
17004
17005 for {
17006 n := auxIntToInt64(v.AuxInt)
17007 t := auxToType(v.Aux)
17008 dst := v_0
17009 if v_1.Op != OpAddr {
17010 break
17011 }
17012 sym := auxToSym(v_1.Aux)
17013 v_1_0 := v_1.Args[0]
17014 if v_1_0.Op != OpSB {
17015 break
17016 }
17017 mem := v_2
17018 if !(symIsROZero(sym)) {
17019 break
17020 }
17021 v.reset(OpZero)
17022 v.AuxInt = int64ToAuxInt(n)
17023 v.Aux = typeToAux(t)
17024 v.AddArg2(dst, mem)
17025 return true
17026 }
17027
17028
17029
17030 for {
17031 n := auxIntToInt64(v.AuxInt)
17032 t1 := auxToType(v.Aux)
17033 dst1 := v_0
17034 src1 := v_1
17035 store := v_2
17036 if store.Op != OpStore {
17037 break
17038 }
17039 t2 := auxToType(store.Aux)
17040 mem := store.Args[2]
17041 op := store.Args[0]
17042 if op.Op != OpOffPtr {
17043 break
17044 }
17045 o2 := auxIntToInt64(op.AuxInt)
17046 dst2 := op.Args[0]
17047 if !(isSamePtr(dst1, dst2) && store.Uses == 1 && n >= o2+t2.Size() && disjoint(src1, n, op, t2.Size()) && clobber(store)) {
17048 break
17049 }
17050 v.reset(OpMove)
17051 v.AuxInt = int64ToAuxInt(n)
17052 v.Aux = typeToAux(t1)
17053 v.AddArg3(dst1, src1, mem)
17054 return true
17055 }
17056
17057
17058
17059 for {
17060 n := auxIntToInt64(v.AuxInt)
17061 t := auxToType(v.Aux)
17062 dst1 := v_0
17063 src1 := v_1
17064 move := v_2
17065 if move.Op != OpMove || auxIntToInt64(move.AuxInt) != n || auxToType(move.Aux) != t {
17066 break
17067 }
17068 mem := move.Args[2]
17069 dst2 := move.Args[0]
17070 if !(move.Uses == 1 && isSamePtr(dst1, dst2) && disjoint(src1, n, dst2, n) && clobber(move)) {
17071 break
17072 }
17073 v.reset(OpMove)
17074 v.AuxInt = int64ToAuxInt(n)
17075 v.Aux = typeToAux(t)
17076 v.AddArg3(dst1, src1, mem)
17077 return true
17078 }
17079
17080
17081
17082 for {
17083 n := auxIntToInt64(v.AuxInt)
17084 t := auxToType(v.Aux)
17085 dst1 := v_0
17086 src1 := v_1
17087 vardef := v_2
17088 if vardef.Op != OpVarDef {
17089 break
17090 }
17091 x := auxToSym(vardef.Aux)
17092 move := vardef.Args[0]
17093 if move.Op != OpMove || auxIntToInt64(move.AuxInt) != n || auxToType(move.Aux) != t {
17094 break
17095 }
17096 mem := move.Args[2]
17097 dst2 := move.Args[0]
17098 if !(move.Uses == 1 && vardef.Uses == 1 && isSamePtr(dst1, dst2) && disjoint(src1, n, dst2, n) && clobber(move, vardef)) {
17099 break
17100 }
17101 v.reset(OpMove)
17102 v.AuxInt = int64ToAuxInt(n)
17103 v.Aux = typeToAux(t)
17104 v0 := b.NewValue0(v.Pos, OpVarDef, types.TypeMem)
17105 v0.Aux = symToAux(x)
17106 v0.AddArg(mem)
17107 v.AddArg3(dst1, src1, v0)
17108 return true
17109 }
17110
17111
17112
17113 for {
17114 n := auxIntToInt64(v.AuxInt)
17115 t := auxToType(v.Aux)
17116 dst1 := v_0
17117 src1 := v_1
17118 zero := v_2
17119 if zero.Op != OpZero || auxIntToInt64(zero.AuxInt) != n || auxToType(zero.Aux) != t {
17120 break
17121 }
17122 mem := zero.Args[1]
17123 dst2 := zero.Args[0]
17124 if !(zero.Uses == 1 && isSamePtr(dst1, dst2) && disjoint(src1, n, dst2, n) && clobber(zero)) {
17125 break
17126 }
17127 v.reset(OpMove)
17128 v.AuxInt = int64ToAuxInt(n)
17129 v.Aux = typeToAux(t)
17130 v.AddArg3(dst1, src1, mem)
17131 return true
17132 }
17133
17134
17135
17136 for {
17137 n := auxIntToInt64(v.AuxInt)
17138 t := auxToType(v.Aux)
17139 dst1 := v_0
17140 src1 := v_1
17141 vardef := v_2
17142 if vardef.Op != OpVarDef {
17143 break
17144 }
17145 x := auxToSym(vardef.Aux)
17146 zero := vardef.Args[0]
17147 if zero.Op != OpZero || auxIntToInt64(zero.AuxInt) != n || auxToType(zero.Aux) != t {
17148 break
17149 }
17150 mem := zero.Args[1]
17151 dst2 := zero.Args[0]
17152 if !(zero.Uses == 1 && vardef.Uses == 1 && isSamePtr(dst1, dst2) && disjoint(src1, n, dst2, n) && clobber(zero, vardef)) {
17153 break
17154 }
17155 v.reset(OpMove)
17156 v.AuxInt = int64ToAuxInt(n)
17157 v.Aux = typeToAux(t)
17158 v0 := b.NewValue0(v.Pos, OpVarDef, types.TypeMem)
17159 v0.Aux = symToAux(x)
17160 v0.AddArg(mem)
17161 v.AddArg3(dst1, src1, v0)
17162 return true
17163 }
17164
17165
17166
17167 for {
17168 n := auxIntToInt64(v.AuxInt)
17169 t1 := auxToType(v.Aux)
17170 dst := v_0
17171 p1 := v_1
17172 mem := v_2
17173 if mem.Op != OpStore {
17174 break
17175 }
17176 t2 := auxToType(mem.Aux)
17177 _ = mem.Args[2]
17178 op2 := mem.Args[0]
17179 if op2.Op != OpOffPtr {
17180 break
17181 }
17182 tt2 := op2.Type
17183 o2 := auxIntToInt64(op2.AuxInt)
17184 p2 := op2.Args[0]
17185 d1 := mem.Args[1]
17186 mem_2 := mem.Args[2]
17187 if mem_2.Op != OpStore {
17188 break
17189 }
17190 t3 := auxToType(mem_2.Aux)
17191 d2 := mem_2.Args[1]
17192 op3 := mem_2.Args[0]
17193 if op3.Op != OpOffPtr {
17194 break
17195 }
17196 tt3 := op3.Type
17197 if auxIntToInt64(op3.AuxInt) != 0 {
17198 break
17199 }
17200 p3 := op3.Args[0]
17201 if !(isSamePtr(p1, p2) && isSamePtr(p2, p3) && t2.Alignment() <= t1.Alignment() && t3.Alignment() <= t1.Alignment() && registerizable(b, t2) && registerizable(b, t3) && o2 == t3.Size() && n == t2.Size()+t3.Size()) {
17202 break
17203 }
17204 v.reset(OpStore)
17205 v.Aux = typeToAux(t2)
17206 v0 := b.NewValue0(v.Pos, OpOffPtr, tt2)
17207 v0.AuxInt = int64ToAuxInt(o2)
17208 v0.AddArg(dst)
17209 v1 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
17210 v1.Aux = typeToAux(t3)
17211 v2 := b.NewValue0(v.Pos, OpOffPtr, tt3)
17212 v2.AuxInt = int64ToAuxInt(0)
17213 v2.AddArg(dst)
17214 v1.AddArg3(v2, d2, mem)
17215 v.AddArg3(v0, d1, v1)
17216 return true
17217 }
17218
17219
17220
17221 for {
17222 n := auxIntToInt64(v.AuxInt)
17223 t1 := auxToType(v.Aux)
17224 dst := v_0
17225 p1 := v_1
17226 mem := v_2
17227 if mem.Op != OpStore {
17228 break
17229 }
17230 t2 := auxToType(mem.Aux)
17231 _ = mem.Args[2]
17232 op2 := mem.Args[0]
17233 if op2.Op != OpOffPtr {
17234 break
17235 }
17236 tt2 := op2.Type
17237 o2 := auxIntToInt64(op2.AuxInt)
17238 p2 := op2.Args[0]
17239 d1 := mem.Args[1]
17240 mem_2 := mem.Args[2]
17241 if mem_2.Op != OpStore {
17242 break
17243 }
17244 t3 := auxToType(mem_2.Aux)
17245 _ = mem_2.Args[2]
17246 op3 := mem_2.Args[0]
17247 if op3.Op != OpOffPtr {
17248 break
17249 }
17250 tt3 := op3.Type
17251 o3 := auxIntToInt64(op3.AuxInt)
17252 p3 := op3.Args[0]
17253 d2 := mem_2.Args[1]
17254 mem_2_2 := mem_2.Args[2]
17255 if mem_2_2.Op != OpStore {
17256 break
17257 }
17258 t4 := auxToType(mem_2_2.Aux)
17259 d3 := mem_2_2.Args[1]
17260 op4 := mem_2_2.Args[0]
17261 if op4.Op != OpOffPtr {
17262 break
17263 }
17264 tt4 := op4.Type
17265 if auxIntToInt64(op4.AuxInt) != 0 {
17266 break
17267 }
17268 p4 := op4.Args[0]
17269 if !(isSamePtr(p1, p2) && isSamePtr(p2, p3) && isSamePtr(p3, p4) && t2.Alignment() <= t1.Alignment() && t3.Alignment() <= t1.Alignment() && t4.Alignment() <= t1.Alignment() && registerizable(b, t2) && registerizable(b, t3) && registerizable(b, t4) && o3 == t4.Size() && o2-o3 == t3.Size() && n == t2.Size()+t3.Size()+t4.Size()) {
17270 break
17271 }
17272 v.reset(OpStore)
17273 v.Aux = typeToAux(t2)
17274 v0 := b.NewValue0(v.Pos, OpOffPtr, tt2)
17275 v0.AuxInt = int64ToAuxInt(o2)
17276 v0.AddArg(dst)
17277 v1 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
17278 v1.Aux = typeToAux(t3)
17279 v2 := b.NewValue0(v.Pos, OpOffPtr, tt3)
17280 v2.AuxInt = int64ToAuxInt(o3)
17281 v2.AddArg(dst)
17282 v3 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
17283 v3.Aux = typeToAux(t4)
17284 v4 := b.NewValue0(v.Pos, OpOffPtr, tt4)
17285 v4.AuxInt = int64ToAuxInt(0)
17286 v4.AddArg(dst)
17287 v3.AddArg3(v4, d3, mem)
17288 v1.AddArg3(v2, d2, v3)
17289 v.AddArg3(v0, d1, v1)
17290 return true
17291 }
17292
17293
17294
17295 for {
17296 n := auxIntToInt64(v.AuxInt)
17297 t1 := auxToType(v.Aux)
17298 dst := v_0
17299 p1 := v_1
17300 mem := v_2
17301 if mem.Op != OpStore {
17302 break
17303 }
17304 t2 := auxToType(mem.Aux)
17305 _ = mem.Args[2]
17306 op2 := mem.Args[0]
17307 if op2.Op != OpOffPtr {
17308 break
17309 }
17310 tt2 := op2.Type
17311 o2 := auxIntToInt64(op2.AuxInt)
17312 p2 := op2.Args[0]
17313 d1 := mem.Args[1]
17314 mem_2 := mem.Args[2]
17315 if mem_2.Op != OpStore {
17316 break
17317 }
17318 t3 := auxToType(mem_2.Aux)
17319 _ = mem_2.Args[2]
17320 op3 := mem_2.Args[0]
17321 if op3.Op != OpOffPtr {
17322 break
17323 }
17324 tt3 := op3.Type
17325 o3 := auxIntToInt64(op3.AuxInt)
17326 p3 := op3.Args[0]
17327 d2 := mem_2.Args[1]
17328 mem_2_2 := mem_2.Args[2]
17329 if mem_2_2.Op != OpStore {
17330 break
17331 }
17332 t4 := auxToType(mem_2_2.Aux)
17333 _ = mem_2_2.Args[2]
17334 op4 := mem_2_2.Args[0]
17335 if op4.Op != OpOffPtr {
17336 break
17337 }
17338 tt4 := op4.Type
17339 o4 := auxIntToInt64(op4.AuxInt)
17340 p4 := op4.Args[0]
17341 d3 := mem_2_2.Args[1]
17342 mem_2_2_2 := mem_2_2.Args[2]
17343 if mem_2_2_2.Op != OpStore {
17344 break
17345 }
17346 t5 := auxToType(mem_2_2_2.Aux)
17347 d4 := mem_2_2_2.Args[1]
17348 op5 := mem_2_2_2.Args[0]
17349 if op5.Op != OpOffPtr {
17350 break
17351 }
17352 tt5 := op5.Type
17353 if auxIntToInt64(op5.AuxInt) != 0 {
17354 break
17355 }
17356 p5 := op5.Args[0]
17357 if !(isSamePtr(p1, p2) && isSamePtr(p2, p3) && isSamePtr(p3, p4) && isSamePtr(p4, p5) && t2.Alignment() <= t1.Alignment() && t3.Alignment() <= t1.Alignment() && t4.Alignment() <= t1.Alignment() && t5.Alignment() <= t1.Alignment() && registerizable(b, t2) && registerizable(b, t3) && registerizable(b, t4) && registerizable(b, t5) && o4 == t5.Size() && o3-o4 == t4.Size() && o2-o3 == t3.Size() && n == t2.Size()+t3.Size()+t4.Size()+t5.Size()) {
17358 break
17359 }
17360 v.reset(OpStore)
17361 v.Aux = typeToAux(t2)
17362 v0 := b.NewValue0(v.Pos, OpOffPtr, tt2)
17363 v0.AuxInt = int64ToAuxInt(o2)
17364 v0.AddArg(dst)
17365 v1 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
17366 v1.Aux = typeToAux(t3)
17367 v2 := b.NewValue0(v.Pos, OpOffPtr, tt3)
17368 v2.AuxInt = int64ToAuxInt(o3)
17369 v2.AddArg(dst)
17370 v3 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
17371 v3.Aux = typeToAux(t4)
17372 v4 := b.NewValue0(v.Pos, OpOffPtr, tt4)
17373 v4.AuxInt = int64ToAuxInt(o4)
17374 v4.AddArg(dst)
17375 v5 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
17376 v5.Aux = typeToAux(t5)
17377 v6 := b.NewValue0(v.Pos, OpOffPtr, tt5)
17378 v6.AuxInt = int64ToAuxInt(0)
17379 v6.AddArg(dst)
17380 v5.AddArg3(v6, d4, mem)
17381 v3.AddArg3(v4, d3, v5)
17382 v1.AddArg3(v2, d2, v3)
17383 v.AddArg3(v0, d1, v1)
17384 return true
17385 }
17386
17387
17388
17389 for {
17390 n := auxIntToInt64(v.AuxInt)
17391 t1 := auxToType(v.Aux)
17392 dst := v_0
17393 p1 := v_1
17394 mem := v_2
17395 if mem.Op != OpVarDef {
17396 break
17397 }
17398 mem_0 := mem.Args[0]
17399 if mem_0.Op != OpStore {
17400 break
17401 }
17402 t2 := auxToType(mem_0.Aux)
17403 _ = mem_0.Args[2]
17404 op2 := mem_0.Args[0]
17405 if op2.Op != OpOffPtr {
17406 break
17407 }
17408 tt2 := op2.Type
17409 o2 := auxIntToInt64(op2.AuxInt)
17410 p2 := op2.Args[0]
17411 d1 := mem_0.Args[1]
17412 mem_0_2 := mem_0.Args[2]
17413 if mem_0_2.Op != OpStore {
17414 break
17415 }
17416 t3 := auxToType(mem_0_2.Aux)
17417 d2 := mem_0_2.Args[1]
17418 op3 := mem_0_2.Args[0]
17419 if op3.Op != OpOffPtr {
17420 break
17421 }
17422 tt3 := op3.Type
17423 if auxIntToInt64(op3.AuxInt) != 0 {
17424 break
17425 }
17426 p3 := op3.Args[0]
17427 if !(isSamePtr(p1, p2) && isSamePtr(p2, p3) && t2.Alignment() <= t1.Alignment() && t3.Alignment() <= t1.Alignment() && registerizable(b, t2) && registerizable(b, t3) && o2 == t3.Size() && n == t2.Size()+t3.Size()) {
17428 break
17429 }
17430 v.reset(OpStore)
17431 v.Aux = typeToAux(t2)
17432 v0 := b.NewValue0(v.Pos, OpOffPtr, tt2)
17433 v0.AuxInt = int64ToAuxInt(o2)
17434 v0.AddArg(dst)
17435 v1 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
17436 v1.Aux = typeToAux(t3)
17437 v2 := b.NewValue0(v.Pos, OpOffPtr, tt3)
17438 v2.AuxInt = int64ToAuxInt(0)
17439 v2.AddArg(dst)
17440 v1.AddArg3(v2, d2, mem)
17441 v.AddArg3(v0, d1, v1)
17442 return true
17443 }
17444
17445
17446
17447 for {
17448 n := auxIntToInt64(v.AuxInt)
17449 t1 := auxToType(v.Aux)
17450 dst := v_0
17451 p1 := v_1
17452 mem := v_2
17453 if mem.Op != OpVarDef {
17454 break
17455 }
17456 mem_0 := mem.Args[0]
17457 if mem_0.Op != OpStore {
17458 break
17459 }
17460 t2 := auxToType(mem_0.Aux)
17461 _ = mem_0.Args[2]
17462 op2 := mem_0.Args[0]
17463 if op2.Op != OpOffPtr {
17464 break
17465 }
17466 tt2 := op2.Type
17467 o2 := auxIntToInt64(op2.AuxInt)
17468 p2 := op2.Args[0]
17469 d1 := mem_0.Args[1]
17470 mem_0_2 := mem_0.Args[2]
17471 if mem_0_2.Op != OpStore {
17472 break
17473 }
17474 t3 := auxToType(mem_0_2.Aux)
17475 _ = mem_0_2.Args[2]
17476 op3 := mem_0_2.Args[0]
17477 if op3.Op != OpOffPtr {
17478 break
17479 }
17480 tt3 := op3.Type
17481 o3 := auxIntToInt64(op3.AuxInt)
17482 p3 := op3.Args[0]
17483 d2 := mem_0_2.Args[1]
17484 mem_0_2_2 := mem_0_2.Args[2]
17485 if mem_0_2_2.Op != OpStore {
17486 break
17487 }
17488 t4 := auxToType(mem_0_2_2.Aux)
17489 d3 := mem_0_2_2.Args[1]
17490 op4 := mem_0_2_2.Args[0]
17491 if op4.Op != OpOffPtr {
17492 break
17493 }
17494 tt4 := op4.Type
17495 if auxIntToInt64(op4.AuxInt) != 0 {
17496 break
17497 }
17498 p4 := op4.Args[0]
17499 if !(isSamePtr(p1, p2) && isSamePtr(p2, p3) && isSamePtr(p3, p4) && t2.Alignment() <= t1.Alignment() && t3.Alignment() <= t1.Alignment() && t4.Alignment() <= t1.Alignment() && registerizable(b, t2) && registerizable(b, t3) && registerizable(b, t4) && o3 == t4.Size() && o2-o3 == t3.Size() && n == t2.Size()+t3.Size()+t4.Size()) {
17500 break
17501 }
17502 v.reset(OpStore)
17503 v.Aux = typeToAux(t2)
17504 v0 := b.NewValue0(v.Pos, OpOffPtr, tt2)
17505 v0.AuxInt = int64ToAuxInt(o2)
17506 v0.AddArg(dst)
17507 v1 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
17508 v1.Aux = typeToAux(t3)
17509 v2 := b.NewValue0(v.Pos, OpOffPtr, tt3)
17510 v2.AuxInt = int64ToAuxInt(o3)
17511 v2.AddArg(dst)
17512 v3 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
17513 v3.Aux = typeToAux(t4)
17514 v4 := b.NewValue0(v.Pos, OpOffPtr, tt4)
17515 v4.AuxInt = int64ToAuxInt(0)
17516 v4.AddArg(dst)
17517 v3.AddArg3(v4, d3, mem)
17518 v1.AddArg3(v2, d2, v3)
17519 v.AddArg3(v0, d1, v1)
17520 return true
17521 }
17522
17523
17524
17525 for {
17526 n := auxIntToInt64(v.AuxInt)
17527 t1 := auxToType(v.Aux)
17528 dst := v_0
17529 p1 := v_1
17530 mem := v_2
17531 if mem.Op != OpVarDef {
17532 break
17533 }
17534 mem_0 := mem.Args[0]
17535 if mem_0.Op != OpStore {
17536 break
17537 }
17538 t2 := auxToType(mem_0.Aux)
17539 _ = mem_0.Args[2]
17540 op2 := mem_0.Args[0]
17541 if op2.Op != OpOffPtr {
17542 break
17543 }
17544 tt2 := op2.Type
17545 o2 := auxIntToInt64(op2.AuxInt)
17546 p2 := op2.Args[0]
17547 d1 := mem_0.Args[1]
17548 mem_0_2 := mem_0.Args[2]
17549 if mem_0_2.Op != OpStore {
17550 break
17551 }
17552 t3 := auxToType(mem_0_2.Aux)
17553 _ = mem_0_2.Args[2]
17554 op3 := mem_0_2.Args[0]
17555 if op3.Op != OpOffPtr {
17556 break
17557 }
17558 tt3 := op3.Type
17559 o3 := auxIntToInt64(op3.AuxInt)
17560 p3 := op3.Args[0]
17561 d2 := mem_0_2.Args[1]
17562 mem_0_2_2 := mem_0_2.Args[2]
17563 if mem_0_2_2.Op != OpStore {
17564 break
17565 }
17566 t4 := auxToType(mem_0_2_2.Aux)
17567 _ = mem_0_2_2.Args[2]
17568 op4 := mem_0_2_2.Args[0]
17569 if op4.Op != OpOffPtr {
17570 break
17571 }
17572 tt4 := op4.Type
17573 o4 := auxIntToInt64(op4.AuxInt)
17574 p4 := op4.Args[0]
17575 d3 := mem_0_2_2.Args[1]
17576 mem_0_2_2_2 := mem_0_2_2.Args[2]
17577 if mem_0_2_2_2.Op != OpStore {
17578 break
17579 }
17580 t5 := auxToType(mem_0_2_2_2.Aux)
17581 d4 := mem_0_2_2_2.Args[1]
17582 op5 := mem_0_2_2_2.Args[0]
17583 if op5.Op != OpOffPtr {
17584 break
17585 }
17586 tt5 := op5.Type
17587 if auxIntToInt64(op5.AuxInt) != 0 {
17588 break
17589 }
17590 p5 := op5.Args[0]
17591 if !(isSamePtr(p1, p2) && isSamePtr(p2, p3) && isSamePtr(p3, p4) && isSamePtr(p4, p5) && t2.Alignment() <= t1.Alignment() && t3.Alignment() <= t1.Alignment() && t4.Alignment() <= t1.Alignment() && t5.Alignment() <= t1.Alignment() && registerizable(b, t2) && registerizable(b, t3) && registerizable(b, t4) && registerizable(b, t5) && o4 == t5.Size() && o3-o4 == t4.Size() && o2-o3 == t3.Size() && n == t2.Size()+t3.Size()+t4.Size()+t5.Size()) {
17592 break
17593 }
17594 v.reset(OpStore)
17595 v.Aux = typeToAux(t2)
17596 v0 := b.NewValue0(v.Pos, OpOffPtr, tt2)
17597 v0.AuxInt = int64ToAuxInt(o2)
17598 v0.AddArg(dst)
17599 v1 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
17600 v1.Aux = typeToAux(t3)
17601 v2 := b.NewValue0(v.Pos, OpOffPtr, tt3)
17602 v2.AuxInt = int64ToAuxInt(o3)
17603 v2.AddArg(dst)
17604 v3 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
17605 v3.Aux = typeToAux(t4)
17606 v4 := b.NewValue0(v.Pos, OpOffPtr, tt4)
17607 v4.AuxInt = int64ToAuxInt(o4)
17608 v4.AddArg(dst)
17609 v5 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
17610 v5.Aux = typeToAux(t5)
17611 v6 := b.NewValue0(v.Pos, OpOffPtr, tt5)
17612 v6.AuxInt = int64ToAuxInt(0)
17613 v6.AddArg(dst)
17614 v5.AddArg3(v6, d4, mem)
17615 v3.AddArg3(v4, d3, v5)
17616 v1.AddArg3(v2, d2, v3)
17617 v.AddArg3(v0, d1, v1)
17618 return true
17619 }
17620
17621
17622
17623 for {
17624 n := auxIntToInt64(v.AuxInt)
17625 t1 := auxToType(v.Aux)
17626 dst := v_0
17627 p1 := v_1
17628 mem := v_2
17629 if mem.Op != OpStore {
17630 break
17631 }
17632 t2 := auxToType(mem.Aux)
17633 _ = mem.Args[2]
17634 op2 := mem.Args[0]
17635 if op2.Op != OpOffPtr {
17636 break
17637 }
17638 tt2 := op2.Type
17639 o2 := auxIntToInt64(op2.AuxInt)
17640 p2 := op2.Args[0]
17641 d1 := mem.Args[1]
17642 mem_2 := mem.Args[2]
17643 if mem_2.Op != OpZero || auxIntToInt64(mem_2.AuxInt) != n {
17644 break
17645 }
17646 t3 := auxToType(mem_2.Aux)
17647 p3 := mem_2.Args[0]
17648 if !(isSamePtr(p1, p2) && isSamePtr(p2, p3) && t2.Alignment() <= t1.Alignment() && t3.Alignment() <= t1.Alignment() && registerizable(b, t2) && n >= o2+t2.Size()) {
17649 break
17650 }
17651 v.reset(OpStore)
17652 v.Aux = typeToAux(t2)
17653 v0 := b.NewValue0(v.Pos, OpOffPtr, tt2)
17654 v0.AuxInt = int64ToAuxInt(o2)
17655 v0.AddArg(dst)
17656 v1 := b.NewValue0(v.Pos, OpZero, types.TypeMem)
17657 v1.AuxInt = int64ToAuxInt(n)
17658 v1.Aux = typeToAux(t1)
17659 v1.AddArg2(dst, mem)
17660 v.AddArg3(v0, d1, v1)
17661 return true
17662 }
17663
17664
17665
17666 for {
17667 n := auxIntToInt64(v.AuxInt)
17668 t1 := auxToType(v.Aux)
17669 dst := v_0
17670 p1 := v_1
17671 mem := v_2
17672 if mem.Op != OpStore {
17673 break
17674 }
17675 t2 := auxToType(mem.Aux)
17676 _ = mem.Args[2]
17677 mem_0 := mem.Args[0]
17678 if mem_0.Op != OpOffPtr {
17679 break
17680 }
17681 tt2 := mem_0.Type
17682 o2 := auxIntToInt64(mem_0.AuxInt)
17683 p2 := mem_0.Args[0]
17684 d1 := mem.Args[1]
17685 mem_2 := mem.Args[2]
17686 if mem_2.Op != OpStore {
17687 break
17688 }
17689 t3 := auxToType(mem_2.Aux)
17690 _ = mem_2.Args[2]
17691 mem_2_0 := mem_2.Args[0]
17692 if mem_2_0.Op != OpOffPtr {
17693 break
17694 }
17695 tt3 := mem_2_0.Type
17696 o3 := auxIntToInt64(mem_2_0.AuxInt)
17697 p3 := mem_2_0.Args[0]
17698 d2 := mem_2.Args[1]
17699 mem_2_2 := mem_2.Args[2]
17700 if mem_2_2.Op != OpZero || auxIntToInt64(mem_2_2.AuxInt) != n {
17701 break
17702 }
17703 t4 := auxToType(mem_2_2.Aux)
17704 p4 := mem_2_2.Args[0]
17705 if !(isSamePtr(p1, p2) && isSamePtr(p2, p3) && isSamePtr(p3, p4) && t2.Alignment() <= t1.Alignment() && t3.Alignment() <= t1.Alignment() && t4.Alignment() <= t1.Alignment() && registerizable(b, t2) && registerizable(b, t3) && n >= o2+t2.Size() && n >= o3+t3.Size()) {
17706 break
17707 }
17708 v.reset(OpStore)
17709 v.Aux = typeToAux(t2)
17710 v0 := b.NewValue0(v.Pos, OpOffPtr, tt2)
17711 v0.AuxInt = int64ToAuxInt(o2)
17712 v0.AddArg(dst)
17713 v1 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
17714 v1.Aux = typeToAux(t3)
17715 v2 := b.NewValue0(v.Pos, OpOffPtr, tt3)
17716 v2.AuxInt = int64ToAuxInt(o3)
17717 v2.AddArg(dst)
17718 v3 := b.NewValue0(v.Pos, OpZero, types.TypeMem)
17719 v3.AuxInt = int64ToAuxInt(n)
17720 v3.Aux = typeToAux(t1)
17721 v3.AddArg2(dst, mem)
17722 v1.AddArg3(v2, d2, v3)
17723 v.AddArg3(v0, d1, v1)
17724 return true
17725 }
17726
17727
17728
17729 for {
17730 n := auxIntToInt64(v.AuxInt)
17731 t1 := auxToType(v.Aux)
17732 dst := v_0
17733 p1 := v_1
17734 mem := v_2
17735 if mem.Op != OpStore {
17736 break
17737 }
17738 t2 := auxToType(mem.Aux)
17739 _ = mem.Args[2]
17740 mem_0 := mem.Args[0]
17741 if mem_0.Op != OpOffPtr {
17742 break
17743 }
17744 tt2 := mem_0.Type
17745 o2 := auxIntToInt64(mem_0.AuxInt)
17746 p2 := mem_0.Args[0]
17747 d1 := mem.Args[1]
17748 mem_2 := mem.Args[2]
17749 if mem_2.Op != OpStore {
17750 break
17751 }
17752 t3 := auxToType(mem_2.Aux)
17753 _ = mem_2.Args[2]
17754 mem_2_0 := mem_2.Args[0]
17755 if mem_2_0.Op != OpOffPtr {
17756 break
17757 }
17758 tt3 := mem_2_0.Type
17759 o3 := auxIntToInt64(mem_2_0.AuxInt)
17760 p3 := mem_2_0.Args[0]
17761 d2 := mem_2.Args[1]
17762 mem_2_2 := mem_2.Args[2]
17763 if mem_2_2.Op != OpStore {
17764 break
17765 }
17766 t4 := auxToType(mem_2_2.Aux)
17767 _ = mem_2_2.Args[2]
17768 mem_2_2_0 := mem_2_2.Args[0]
17769 if mem_2_2_0.Op != OpOffPtr {
17770 break
17771 }
17772 tt4 := mem_2_2_0.Type
17773 o4 := auxIntToInt64(mem_2_2_0.AuxInt)
17774 p4 := mem_2_2_0.Args[0]
17775 d3 := mem_2_2.Args[1]
17776 mem_2_2_2 := mem_2_2.Args[2]
17777 if mem_2_2_2.Op != OpZero || auxIntToInt64(mem_2_2_2.AuxInt) != n {
17778 break
17779 }
17780 t5 := auxToType(mem_2_2_2.Aux)
17781 p5 := mem_2_2_2.Args[0]
17782 if !(isSamePtr(p1, p2) && isSamePtr(p2, p3) && isSamePtr(p3, p4) && isSamePtr(p4, p5) && t2.Alignment() <= t1.Alignment() && t3.Alignment() <= t1.Alignment() && t4.Alignment() <= t1.Alignment() && t5.Alignment() <= t1.Alignment() && registerizable(b, t2) && registerizable(b, t3) && registerizable(b, t4) && n >= o2+t2.Size() && n >= o3+t3.Size() && n >= o4+t4.Size()) {
17783 break
17784 }
17785 v.reset(OpStore)
17786 v.Aux = typeToAux(t2)
17787 v0 := b.NewValue0(v.Pos, OpOffPtr, tt2)
17788 v0.AuxInt = int64ToAuxInt(o2)
17789 v0.AddArg(dst)
17790 v1 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
17791 v1.Aux = typeToAux(t3)
17792 v2 := b.NewValue0(v.Pos, OpOffPtr, tt3)
17793 v2.AuxInt = int64ToAuxInt(o3)
17794 v2.AddArg(dst)
17795 v3 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
17796 v3.Aux = typeToAux(t4)
17797 v4 := b.NewValue0(v.Pos, OpOffPtr, tt4)
17798 v4.AuxInt = int64ToAuxInt(o4)
17799 v4.AddArg(dst)
17800 v5 := b.NewValue0(v.Pos, OpZero, types.TypeMem)
17801 v5.AuxInt = int64ToAuxInt(n)
17802 v5.Aux = typeToAux(t1)
17803 v5.AddArg2(dst, mem)
17804 v3.AddArg3(v4, d3, v5)
17805 v1.AddArg3(v2, d2, v3)
17806 v.AddArg3(v0, d1, v1)
17807 return true
17808 }
17809
17810
17811
17812 for {
17813 n := auxIntToInt64(v.AuxInt)
17814 t1 := auxToType(v.Aux)
17815 dst := v_0
17816 p1 := v_1
17817 mem := v_2
17818 if mem.Op != OpStore {
17819 break
17820 }
17821 t2 := auxToType(mem.Aux)
17822 _ = mem.Args[2]
17823 mem_0 := mem.Args[0]
17824 if mem_0.Op != OpOffPtr {
17825 break
17826 }
17827 tt2 := mem_0.Type
17828 o2 := auxIntToInt64(mem_0.AuxInt)
17829 p2 := mem_0.Args[0]
17830 d1 := mem.Args[1]
17831 mem_2 := mem.Args[2]
17832 if mem_2.Op != OpStore {
17833 break
17834 }
17835 t3 := auxToType(mem_2.Aux)
17836 _ = mem_2.Args[2]
17837 mem_2_0 := mem_2.Args[0]
17838 if mem_2_0.Op != OpOffPtr {
17839 break
17840 }
17841 tt3 := mem_2_0.Type
17842 o3 := auxIntToInt64(mem_2_0.AuxInt)
17843 p3 := mem_2_0.Args[0]
17844 d2 := mem_2.Args[1]
17845 mem_2_2 := mem_2.Args[2]
17846 if mem_2_2.Op != OpStore {
17847 break
17848 }
17849 t4 := auxToType(mem_2_2.Aux)
17850 _ = mem_2_2.Args[2]
17851 mem_2_2_0 := mem_2_2.Args[0]
17852 if mem_2_2_0.Op != OpOffPtr {
17853 break
17854 }
17855 tt4 := mem_2_2_0.Type
17856 o4 := auxIntToInt64(mem_2_2_0.AuxInt)
17857 p4 := mem_2_2_0.Args[0]
17858 d3 := mem_2_2.Args[1]
17859 mem_2_2_2 := mem_2_2.Args[2]
17860 if mem_2_2_2.Op != OpStore {
17861 break
17862 }
17863 t5 := auxToType(mem_2_2_2.Aux)
17864 _ = mem_2_2_2.Args[2]
17865 mem_2_2_2_0 := mem_2_2_2.Args[0]
17866 if mem_2_2_2_0.Op != OpOffPtr {
17867 break
17868 }
17869 tt5 := mem_2_2_2_0.Type
17870 o5 := auxIntToInt64(mem_2_2_2_0.AuxInt)
17871 p5 := mem_2_2_2_0.Args[0]
17872 d4 := mem_2_2_2.Args[1]
17873 mem_2_2_2_2 := mem_2_2_2.Args[2]
17874 if mem_2_2_2_2.Op != OpZero || auxIntToInt64(mem_2_2_2_2.AuxInt) != n {
17875 break
17876 }
17877 t6 := auxToType(mem_2_2_2_2.Aux)
17878 p6 := mem_2_2_2_2.Args[0]
17879 if !(isSamePtr(p1, p2) && isSamePtr(p2, p3) && isSamePtr(p3, p4) && isSamePtr(p4, p5) && isSamePtr(p5, p6) && t2.Alignment() <= t1.Alignment() && t3.Alignment() <= t1.Alignment() && t4.Alignment() <= t1.Alignment() && t5.Alignment() <= t1.Alignment() && t6.Alignment() <= t1.Alignment() && registerizable(b, t2) && registerizable(b, t3) && registerizable(b, t4) && registerizable(b, t5) && n >= o2+t2.Size() && n >= o3+t3.Size() && n >= o4+t4.Size() && n >= o5+t5.Size()) {
17880 break
17881 }
17882 v.reset(OpStore)
17883 v.Aux = typeToAux(t2)
17884 v0 := b.NewValue0(v.Pos, OpOffPtr, tt2)
17885 v0.AuxInt = int64ToAuxInt(o2)
17886 v0.AddArg(dst)
17887 v1 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
17888 v1.Aux = typeToAux(t3)
17889 v2 := b.NewValue0(v.Pos, OpOffPtr, tt3)
17890 v2.AuxInt = int64ToAuxInt(o3)
17891 v2.AddArg(dst)
17892 v3 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
17893 v3.Aux = typeToAux(t4)
17894 v4 := b.NewValue0(v.Pos, OpOffPtr, tt4)
17895 v4.AuxInt = int64ToAuxInt(o4)
17896 v4.AddArg(dst)
17897 v5 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
17898 v5.Aux = typeToAux(t5)
17899 v6 := b.NewValue0(v.Pos, OpOffPtr, tt5)
17900 v6.AuxInt = int64ToAuxInt(o5)
17901 v6.AddArg(dst)
17902 v7 := b.NewValue0(v.Pos, OpZero, types.TypeMem)
17903 v7.AuxInt = int64ToAuxInt(n)
17904 v7.Aux = typeToAux(t1)
17905 v7.AddArg2(dst, mem)
17906 v5.AddArg3(v6, d4, v7)
17907 v3.AddArg3(v4, d3, v5)
17908 v1.AddArg3(v2, d2, v3)
17909 v.AddArg3(v0, d1, v1)
17910 return true
17911 }
17912
17913
17914
17915 for {
17916 n := auxIntToInt64(v.AuxInt)
17917 t1 := auxToType(v.Aux)
17918 dst := v_0
17919 p1 := v_1
17920 mem := v_2
17921 if mem.Op != OpVarDef {
17922 break
17923 }
17924 mem_0 := mem.Args[0]
17925 if mem_0.Op != OpStore {
17926 break
17927 }
17928 t2 := auxToType(mem_0.Aux)
17929 _ = mem_0.Args[2]
17930 op2 := mem_0.Args[0]
17931 if op2.Op != OpOffPtr {
17932 break
17933 }
17934 tt2 := op2.Type
17935 o2 := auxIntToInt64(op2.AuxInt)
17936 p2 := op2.Args[0]
17937 d1 := mem_0.Args[1]
17938 mem_0_2 := mem_0.Args[2]
17939 if mem_0_2.Op != OpZero || auxIntToInt64(mem_0_2.AuxInt) != n {
17940 break
17941 }
17942 t3 := auxToType(mem_0_2.Aux)
17943 p3 := mem_0_2.Args[0]
17944 if !(isSamePtr(p1, p2) && isSamePtr(p2, p3) && t2.Alignment() <= t1.Alignment() && t3.Alignment() <= t1.Alignment() && registerizable(b, t2) && n >= o2+t2.Size()) {
17945 break
17946 }
17947 v.reset(OpStore)
17948 v.Aux = typeToAux(t2)
17949 v0 := b.NewValue0(v.Pos, OpOffPtr, tt2)
17950 v0.AuxInt = int64ToAuxInt(o2)
17951 v0.AddArg(dst)
17952 v1 := b.NewValue0(v.Pos, OpZero, types.TypeMem)
17953 v1.AuxInt = int64ToAuxInt(n)
17954 v1.Aux = typeToAux(t1)
17955 v1.AddArg2(dst, mem)
17956 v.AddArg3(v0, d1, v1)
17957 return true
17958 }
17959
17960
17961
17962 for {
17963 n := auxIntToInt64(v.AuxInt)
17964 t1 := auxToType(v.Aux)
17965 dst := v_0
17966 p1 := v_1
17967 mem := v_2
17968 if mem.Op != OpVarDef {
17969 break
17970 }
17971 mem_0 := mem.Args[0]
17972 if mem_0.Op != OpStore {
17973 break
17974 }
17975 t2 := auxToType(mem_0.Aux)
17976 _ = mem_0.Args[2]
17977 mem_0_0 := mem_0.Args[0]
17978 if mem_0_0.Op != OpOffPtr {
17979 break
17980 }
17981 tt2 := mem_0_0.Type
17982 o2 := auxIntToInt64(mem_0_0.AuxInt)
17983 p2 := mem_0_0.Args[0]
17984 d1 := mem_0.Args[1]
17985 mem_0_2 := mem_0.Args[2]
17986 if mem_0_2.Op != OpStore {
17987 break
17988 }
17989 t3 := auxToType(mem_0_2.Aux)
17990 _ = mem_0_2.Args[2]
17991 mem_0_2_0 := mem_0_2.Args[0]
17992 if mem_0_2_0.Op != OpOffPtr {
17993 break
17994 }
17995 tt3 := mem_0_2_0.Type
17996 o3 := auxIntToInt64(mem_0_2_0.AuxInt)
17997 p3 := mem_0_2_0.Args[0]
17998 d2 := mem_0_2.Args[1]
17999 mem_0_2_2 := mem_0_2.Args[2]
18000 if mem_0_2_2.Op != OpZero || auxIntToInt64(mem_0_2_2.AuxInt) != n {
18001 break
18002 }
18003 t4 := auxToType(mem_0_2_2.Aux)
18004 p4 := mem_0_2_2.Args[0]
18005 if !(isSamePtr(p1, p2) && isSamePtr(p2, p3) && isSamePtr(p3, p4) && t2.Alignment() <= t1.Alignment() && t3.Alignment() <= t1.Alignment() && t4.Alignment() <= t1.Alignment() && registerizable(b, t2) && registerizable(b, t3) && n >= o2+t2.Size() && n >= o3+t3.Size()) {
18006 break
18007 }
18008 v.reset(OpStore)
18009 v.Aux = typeToAux(t2)
18010 v0 := b.NewValue0(v.Pos, OpOffPtr, tt2)
18011 v0.AuxInt = int64ToAuxInt(o2)
18012 v0.AddArg(dst)
18013 v1 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
18014 v1.Aux = typeToAux(t3)
18015 v2 := b.NewValue0(v.Pos, OpOffPtr, tt3)
18016 v2.AuxInt = int64ToAuxInt(o3)
18017 v2.AddArg(dst)
18018 v3 := b.NewValue0(v.Pos, OpZero, types.TypeMem)
18019 v3.AuxInt = int64ToAuxInt(n)
18020 v3.Aux = typeToAux(t1)
18021 v3.AddArg2(dst, mem)
18022 v1.AddArg3(v2, d2, v3)
18023 v.AddArg3(v0, d1, v1)
18024 return true
18025 }
18026
18027
18028
18029 for {
18030 n := auxIntToInt64(v.AuxInt)
18031 t1 := auxToType(v.Aux)
18032 dst := v_0
18033 p1 := v_1
18034 mem := v_2
18035 if mem.Op != OpVarDef {
18036 break
18037 }
18038 mem_0 := mem.Args[0]
18039 if mem_0.Op != OpStore {
18040 break
18041 }
18042 t2 := auxToType(mem_0.Aux)
18043 _ = mem_0.Args[2]
18044 mem_0_0 := mem_0.Args[0]
18045 if mem_0_0.Op != OpOffPtr {
18046 break
18047 }
18048 tt2 := mem_0_0.Type
18049 o2 := auxIntToInt64(mem_0_0.AuxInt)
18050 p2 := mem_0_0.Args[0]
18051 d1 := mem_0.Args[1]
18052 mem_0_2 := mem_0.Args[2]
18053 if mem_0_2.Op != OpStore {
18054 break
18055 }
18056 t3 := auxToType(mem_0_2.Aux)
18057 _ = mem_0_2.Args[2]
18058 mem_0_2_0 := mem_0_2.Args[0]
18059 if mem_0_2_0.Op != OpOffPtr {
18060 break
18061 }
18062 tt3 := mem_0_2_0.Type
18063 o3 := auxIntToInt64(mem_0_2_0.AuxInt)
18064 p3 := mem_0_2_0.Args[0]
18065 d2 := mem_0_2.Args[1]
18066 mem_0_2_2 := mem_0_2.Args[2]
18067 if mem_0_2_2.Op != OpStore {
18068 break
18069 }
18070 t4 := auxToType(mem_0_2_2.Aux)
18071 _ = mem_0_2_2.Args[2]
18072 mem_0_2_2_0 := mem_0_2_2.Args[0]
18073 if mem_0_2_2_0.Op != OpOffPtr {
18074 break
18075 }
18076 tt4 := mem_0_2_2_0.Type
18077 o4 := auxIntToInt64(mem_0_2_2_0.AuxInt)
18078 p4 := mem_0_2_2_0.Args[0]
18079 d3 := mem_0_2_2.Args[1]
18080 mem_0_2_2_2 := mem_0_2_2.Args[2]
18081 if mem_0_2_2_2.Op != OpZero || auxIntToInt64(mem_0_2_2_2.AuxInt) != n {
18082 break
18083 }
18084 t5 := auxToType(mem_0_2_2_2.Aux)
18085 p5 := mem_0_2_2_2.Args[0]
18086 if !(isSamePtr(p1, p2) && isSamePtr(p2, p3) && isSamePtr(p3, p4) && isSamePtr(p4, p5) && t2.Alignment() <= t1.Alignment() && t3.Alignment() <= t1.Alignment() && t4.Alignment() <= t1.Alignment() && t5.Alignment() <= t1.Alignment() && registerizable(b, t2) && registerizable(b, t3) && registerizable(b, t4) && n >= o2+t2.Size() && n >= o3+t3.Size() && n >= o4+t4.Size()) {
18087 break
18088 }
18089 v.reset(OpStore)
18090 v.Aux = typeToAux(t2)
18091 v0 := b.NewValue0(v.Pos, OpOffPtr, tt2)
18092 v0.AuxInt = int64ToAuxInt(o2)
18093 v0.AddArg(dst)
18094 v1 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
18095 v1.Aux = typeToAux(t3)
18096 v2 := b.NewValue0(v.Pos, OpOffPtr, tt3)
18097 v2.AuxInt = int64ToAuxInt(o3)
18098 v2.AddArg(dst)
18099 v3 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
18100 v3.Aux = typeToAux(t4)
18101 v4 := b.NewValue0(v.Pos, OpOffPtr, tt4)
18102 v4.AuxInt = int64ToAuxInt(o4)
18103 v4.AddArg(dst)
18104 v5 := b.NewValue0(v.Pos, OpZero, types.TypeMem)
18105 v5.AuxInt = int64ToAuxInt(n)
18106 v5.Aux = typeToAux(t1)
18107 v5.AddArg2(dst, mem)
18108 v3.AddArg3(v4, d3, v5)
18109 v1.AddArg3(v2, d2, v3)
18110 v.AddArg3(v0, d1, v1)
18111 return true
18112 }
18113
18114
18115
18116 for {
18117 n := auxIntToInt64(v.AuxInt)
18118 t1 := auxToType(v.Aux)
18119 dst := v_0
18120 p1 := v_1
18121 mem := v_2
18122 if mem.Op != OpVarDef {
18123 break
18124 }
18125 mem_0 := mem.Args[0]
18126 if mem_0.Op != OpStore {
18127 break
18128 }
18129 t2 := auxToType(mem_0.Aux)
18130 _ = mem_0.Args[2]
18131 mem_0_0 := mem_0.Args[0]
18132 if mem_0_0.Op != OpOffPtr {
18133 break
18134 }
18135 tt2 := mem_0_0.Type
18136 o2 := auxIntToInt64(mem_0_0.AuxInt)
18137 p2 := mem_0_0.Args[0]
18138 d1 := mem_0.Args[1]
18139 mem_0_2 := mem_0.Args[2]
18140 if mem_0_2.Op != OpStore {
18141 break
18142 }
18143 t3 := auxToType(mem_0_2.Aux)
18144 _ = mem_0_2.Args[2]
18145 mem_0_2_0 := mem_0_2.Args[0]
18146 if mem_0_2_0.Op != OpOffPtr {
18147 break
18148 }
18149 tt3 := mem_0_2_0.Type
18150 o3 := auxIntToInt64(mem_0_2_0.AuxInt)
18151 p3 := mem_0_2_0.Args[0]
18152 d2 := mem_0_2.Args[1]
18153 mem_0_2_2 := mem_0_2.Args[2]
18154 if mem_0_2_2.Op != OpStore {
18155 break
18156 }
18157 t4 := auxToType(mem_0_2_2.Aux)
18158 _ = mem_0_2_2.Args[2]
18159 mem_0_2_2_0 := mem_0_2_2.Args[0]
18160 if mem_0_2_2_0.Op != OpOffPtr {
18161 break
18162 }
18163 tt4 := mem_0_2_2_0.Type
18164 o4 := auxIntToInt64(mem_0_2_2_0.AuxInt)
18165 p4 := mem_0_2_2_0.Args[0]
18166 d3 := mem_0_2_2.Args[1]
18167 mem_0_2_2_2 := mem_0_2_2.Args[2]
18168 if mem_0_2_2_2.Op != OpStore {
18169 break
18170 }
18171 t5 := auxToType(mem_0_2_2_2.Aux)
18172 _ = mem_0_2_2_2.Args[2]
18173 mem_0_2_2_2_0 := mem_0_2_2_2.Args[0]
18174 if mem_0_2_2_2_0.Op != OpOffPtr {
18175 break
18176 }
18177 tt5 := mem_0_2_2_2_0.Type
18178 o5 := auxIntToInt64(mem_0_2_2_2_0.AuxInt)
18179 p5 := mem_0_2_2_2_0.Args[0]
18180 d4 := mem_0_2_2_2.Args[1]
18181 mem_0_2_2_2_2 := mem_0_2_2_2.Args[2]
18182 if mem_0_2_2_2_2.Op != OpZero || auxIntToInt64(mem_0_2_2_2_2.AuxInt) != n {
18183 break
18184 }
18185 t6 := auxToType(mem_0_2_2_2_2.Aux)
18186 p6 := mem_0_2_2_2_2.Args[0]
18187 if !(isSamePtr(p1, p2) && isSamePtr(p2, p3) && isSamePtr(p3, p4) && isSamePtr(p4, p5) && isSamePtr(p5, p6) && t2.Alignment() <= t1.Alignment() && t3.Alignment() <= t1.Alignment() && t4.Alignment() <= t1.Alignment() && t5.Alignment() <= t1.Alignment() && t6.Alignment() <= t1.Alignment() && registerizable(b, t2) && registerizable(b, t3) && registerizable(b, t4) && registerizable(b, t5) && n >= o2+t2.Size() && n >= o3+t3.Size() && n >= o4+t4.Size() && n >= o5+t5.Size()) {
18188 break
18189 }
18190 v.reset(OpStore)
18191 v.Aux = typeToAux(t2)
18192 v0 := b.NewValue0(v.Pos, OpOffPtr, tt2)
18193 v0.AuxInt = int64ToAuxInt(o2)
18194 v0.AddArg(dst)
18195 v1 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
18196 v1.Aux = typeToAux(t3)
18197 v2 := b.NewValue0(v.Pos, OpOffPtr, tt3)
18198 v2.AuxInt = int64ToAuxInt(o3)
18199 v2.AddArg(dst)
18200 v3 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
18201 v3.Aux = typeToAux(t4)
18202 v4 := b.NewValue0(v.Pos, OpOffPtr, tt4)
18203 v4.AuxInt = int64ToAuxInt(o4)
18204 v4.AddArg(dst)
18205 v5 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
18206 v5.Aux = typeToAux(t5)
18207 v6 := b.NewValue0(v.Pos, OpOffPtr, tt5)
18208 v6.AuxInt = int64ToAuxInt(o5)
18209 v6.AddArg(dst)
18210 v7 := b.NewValue0(v.Pos, OpZero, types.TypeMem)
18211 v7.AuxInt = int64ToAuxInt(n)
18212 v7.Aux = typeToAux(t1)
18213 v7.AddArg2(dst, mem)
18214 v5.AddArg3(v6, d4, v7)
18215 v3.AddArg3(v4, d3, v5)
18216 v1.AddArg3(v2, d2, v3)
18217 v.AddArg3(v0, d1, v1)
18218 return true
18219 }
18220
18221
18222
18223 for {
18224 s := auxIntToInt64(v.AuxInt)
18225 t1 := auxToType(v.Aux)
18226 dst := v_0
18227 tmp1 := v_1
18228 midmem := v_2
18229 if midmem.Op != OpMove || auxIntToInt64(midmem.AuxInt) != s {
18230 break
18231 }
18232 t2 := auxToType(midmem.Aux)
18233 src := midmem.Args[1]
18234 tmp2 := midmem.Args[0]
18235 if !(t1.Compare(t2) == types.CMPeq && isSamePtr(tmp1, tmp2) && isStackPtr(src) && !isVolatile(src) && disjoint(src, s, tmp2, s) && (disjoint(src, s, dst, s) || isInlinableMemmove(dst, src, s, config))) {
18236 break
18237 }
18238 v.reset(OpMove)
18239 v.AuxInt = int64ToAuxInt(s)
18240 v.Aux = typeToAux(t1)
18241 v.AddArg3(dst, src, midmem)
18242 return true
18243 }
18244
18245
18246
18247 for {
18248 s := auxIntToInt64(v.AuxInt)
18249 t1 := auxToType(v.Aux)
18250 dst := v_0
18251 tmp1 := v_1
18252 midmem := v_2
18253 if midmem.Op != OpVarDef {
18254 break
18255 }
18256 midmem_0 := midmem.Args[0]
18257 if midmem_0.Op != OpMove || auxIntToInt64(midmem_0.AuxInt) != s {
18258 break
18259 }
18260 t2 := auxToType(midmem_0.Aux)
18261 src := midmem_0.Args[1]
18262 tmp2 := midmem_0.Args[0]
18263 if !(t1.Compare(t2) == types.CMPeq && isSamePtr(tmp1, tmp2) && isStackPtr(src) && !isVolatile(src) && disjoint(src, s, tmp2, s) && (disjoint(src, s, dst, s) || isInlinableMemmove(dst, src, s, config))) {
18264 break
18265 }
18266 v.reset(OpMove)
18267 v.AuxInt = int64ToAuxInt(s)
18268 v.Aux = typeToAux(t1)
18269 v.AddArg3(dst, src, midmem)
18270 return true
18271 }
18272
18273
18274
18275 for {
18276 dst := v_0
18277 src := v_1
18278 mem := v_2
18279 if !(isSamePtr(dst, src)) {
18280 break
18281 }
18282 v.copyOf(mem)
18283 return true
18284 }
18285 return false
18286 }
18287 func rewriteValuegeneric_OpMul16(v *Value) bool {
18288 v_1 := v.Args[1]
18289 v_0 := v.Args[0]
18290 b := v.Block
18291 typ := &b.Func.Config.Types
18292
18293
18294 for {
18295 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18296 if v_0.Op != OpConst16 {
18297 continue
18298 }
18299 c := auxIntToInt16(v_0.AuxInt)
18300 if v_1.Op != OpConst16 {
18301 continue
18302 }
18303 d := auxIntToInt16(v_1.AuxInt)
18304 v.reset(OpConst16)
18305 v.AuxInt = int16ToAuxInt(c * d)
18306 return true
18307 }
18308 break
18309 }
18310
18311
18312 for {
18313 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18314 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 1 {
18315 continue
18316 }
18317 x := v_1
18318 v.copyOf(x)
18319 return true
18320 }
18321 break
18322 }
18323
18324
18325 for {
18326 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18327 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != -1 {
18328 continue
18329 }
18330 x := v_1
18331 v.reset(OpNeg16)
18332 v.AddArg(x)
18333 return true
18334 }
18335 break
18336 }
18337
18338
18339
18340 for {
18341 t := v.Type
18342 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18343 n := v_0
18344 if v_1.Op != OpConst16 {
18345 continue
18346 }
18347 c := auxIntToInt16(v_1.AuxInt)
18348 if !(isPowerOfTwo(c)) {
18349 continue
18350 }
18351 v.reset(OpLsh16x64)
18352 v.Type = t
18353 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
18354 v0.AuxInt = int64ToAuxInt(log16(c))
18355 v.AddArg2(n, v0)
18356 return true
18357 }
18358 break
18359 }
18360
18361
18362
18363 for {
18364 t := v.Type
18365 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18366 n := v_0
18367 if v_1.Op != OpConst16 {
18368 continue
18369 }
18370 c := auxIntToInt16(v_1.AuxInt)
18371 if !(t.IsSigned() && isPowerOfTwo(-c)) {
18372 continue
18373 }
18374 v.reset(OpNeg16)
18375 v0 := b.NewValue0(v.Pos, OpLsh16x64, t)
18376 v1 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
18377 v1.AuxInt = int64ToAuxInt(log16(-c))
18378 v0.AddArg2(n, v1)
18379 v.AddArg(v0)
18380 return true
18381 }
18382 break
18383 }
18384
18385
18386 for {
18387 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18388 if v_0.Op != OpConst16 {
18389 continue
18390 }
18391 t := v_0.Type
18392 c := auxIntToInt16(v_0.AuxInt)
18393 if v_1.Op != OpAdd16 || v_1.Type != t {
18394 continue
18395 }
18396 _ = v_1.Args[1]
18397 v_1_0 := v_1.Args[0]
18398 v_1_1 := v_1.Args[1]
18399 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
18400 if v_1_0.Op != OpConst16 || v_1_0.Type != t {
18401 continue
18402 }
18403 d := auxIntToInt16(v_1_0.AuxInt)
18404 x := v_1_1
18405 v.reset(OpAdd16)
18406 v0 := b.NewValue0(v.Pos, OpConst16, t)
18407 v0.AuxInt = int16ToAuxInt(c * d)
18408 v1 := b.NewValue0(v.Pos, OpMul16, t)
18409 v2 := b.NewValue0(v.Pos, OpConst16, t)
18410 v2.AuxInt = int16ToAuxInt(c)
18411 v1.AddArg2(v2, x)
18412 v.AddArg2(v0, v1)
18413 return true
18414 }
18415 }
18416 break
18417 }
18418
18419
18420 for {
18421 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18422 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 {
18423 continue
18424 }
18425 v.reset(OpConst16)
18426 v.AuxInt = int16ToAuxInt(0)
18427 return true
18428 }
18429 break
18430 }
18431
18432
18433
18434 for {
18435 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18436 if v_0.Op != OpMul16 {
18437 continue
18438 }
18439 _ = v_0.Args[1]
18440 v_0_0 := v_0.Args[0]
18441 v_0_1 := v_0.Args[1]
18442 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
18443 i := v_0_0
18444 if i.Op != OpConst16 {
18445 continue
18446 }
18447 t := i.Type
18448 z := v_0_1
18449 x := v_1
18450 if !(z.Op != OpConst16 && x.Op != OpConst16) {
18451 continue
18452 }
18453 v.reset(OpMul16)
18454 v0 := b.NewValue0(v.Pos, OpMul16, t)
18455 v0.AddArg2(x, z)
18456 v.AddArg2(i, v0)
18457 return true
18458 }
18459 }
18460 break
18461 }
18462
18463
18464 for {
18465 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18466 if v_0.Op != OpConst16 {
18467 continue
18468 }
18469 t := v_0.Type
18470 c := auxIntToInt16(v_0.AuxInt)
18471 if v_1.Op != OpMul16 {
18472 continue
18473 }
18474 _ = v_1.Args[1]
18475 v_1_0 := v_1.Args[0]
18476 v_1_1 := v_1.Args[1]
18477 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
18478 if v_1_0.Op != OpConst16 || v_1_0.Type != t {
18479 continue
18480 }
18481 d := auxIntToInt16(v_1_0.AuxInt)
18482 x := v_1_1
18483 v.reset(OpMul16)
18484 v0 := b.NewValue0(v.Pos, OpConst16, t)
18485 v0.AuxInt = int16ToAuxInt(c * d)
18486 v.AddArg2(v0, x)
18487 return true
18488 }
18489 }
18490 break
18491 }
18492 return false
18493 }
18494 func rewriteValuegeneric_OpMul32(v *Value) bool {
18495 v_1 := v.Args[1]
18496 v_0 := v.Args[0]
18497 b := v.Block
18498 typ := &b.Func.Config.Types
18499
18500
18501 for {
18502 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18503 if v_0.Op != OpConst32 {
18504 continue
18505 }
18506 c := auxIntToInt32(v_0.AuxInt)
18507 if v_1.Op != OpConst32 {
18508 continue
18509 }
18510 d := auxIntToInt32(v_1.AuxInt)
18511 v.reset(OpConst32)
18512 v.AuxInt = int32ToAuxInt(c * d)
18513 return true
18514 }
18515 break
18516 }
18517
18518
18519 for {
18520 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18521 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 1 {
18522 continue
18523 }
18524 x := v_1
18525 v.copyOf(x)
18526 return true
18527 }
18528 break
18529 }
18530
18531
18532 for {
18533 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18534 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != -1 {
18535 continue
18536 }
18537 x := v_1
18538 v.reset(OpNeg32)
18539 v.AddArg(x)
18540 return true
18541 }
18542 break
18543 }
18544
18545
18546
18547 for {
18548 t := v.Type
18549 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18550 n := v_0
18551 if v_1.Op != OpConst32 {
18552 continue
18553 }
18554 c := auxIntToInt32(v_1.AuxInt)
18555 if !(isPowerOfTwo(c)) {
18556 continue
18557 }
18558 v.reset(OpLsh32x64)
18559 v.Type = t
18560 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
18561 v0.AuxInt = int64ToAuxInt(log32(c))
18562 v.AddArg2(n, v0)
18563 return true
18564 }
18565 break
18566 }
18567
18568
18569
18570 for {
18571 t := v.Type
18572 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18573 n := v_0
18574 if v_1.Op != OpConst32 {
18575 continue
18576 }
18577 c := auxIntToInt32(v_1.AuxInt)
18578 if !(t.IsSigned() && isPowerOfTwo(-c)) {
18579 continue
18580 }
18581 v.reset(OpNeg32)
18582 v0 := b.NewValue0(v.Pos, OpLsh32x64, t)
18583 v1 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
18584 v1.AuxInt = int64ToAuxInt(log32(-c))
18585 v0.AddArg2(n, v1)
18586 v.AddArg(v0)
18587 return true
18588 }
18589 break
18590 }
18591
18592
18593 for {
18594 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18595 if v_0.Op != OpConst32 {
18596 continue
18597 }
18598 t := v_0.Type
18599 c := auxIntToInt32(v_0.AuxInt)
18600 if v_1.Op != OpAdd32 || v_1.Type != t {
18601 continue
18602 }
18603 _ = v_1.Args[1]
18604 v_1_0 := v_1.Args[0]
18605 v_1_1 := v_1.Args[1]
18606 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
18607 if v_1_0.Op != OpConst32 || v_1_0.Type != t {
18608 continue
18609 }
18610 d := auxIntToInt32(v_1_0.AuxInt)
18611 x := v_1_1
18612 v.reset(OpAdd32)
18613 v0 := b.NewValue0(v.Pos, OpConst32, t)
18614 v0.AuxInt = int32ToAuxInt(c * d)
18615 v1 := b.NewValue0(v.Pos, OpMul32, t)
18616 v2 := b.NewValue0(v.Pos, OpConst32, t)
18617 v2.AuxInt = int32ToAuxInt(c)
18618 v1.AddArg2(v2, x)
18619 v.AddArg2(v0, v1)
18620 return true
18621 }
18622 }
18623 break
18624 }
18625
18626
18627 for {
18628 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18629 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
18630 continue
18631 }
18632 v.reset(OpConst32)
18633 v.AuxInt = int32ToAuxInt(0)
18634 return true
18635 }
18636 break
18637 }
18638
18639
18640
18641 for {
18642 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18643 if v_0.Op != OpMul32 {
18644 continue
18645 }
18646 _ = v_0.Args[1]
18647 v_0_0 := v_0.Args[0]
18648 v_0_1 := v_0.Args[1]
18649 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
18650 i := v_0_0
18651 if i.Op != OpConst32 {
18652 continue
18653 }
18654 t := i.Type
18655 z := v_0_1
18656 x := v_1
18657 if !(z.Op != OpConst32 && x.Op != OpConst32) {
18658 continue
18659 }
18660 v.reset(OpMul32)
18661 v0 := b.NewValue0(v.Pos, OpMul32, t)
18662 v0.AddArg2(x, z)
18663 v.AddArg2(i, v0)
18664 return true
18665 }
18666 }
18667 break
18668 }
18669
18670
18671 for {
18672 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18673 if v_0.Op != OpConst32 {
18674 continue
18675 }
18676 t := v_0.Type
18677 c := auxIntToInt32(v_0.AuxInt)
18678 if v_1.Op != OpMul32 {
18679 continue
18680 }
18681 _ = v_1.Args[1]
18682 v_1_0 := v_1.Args[0]
18683 v_1_1 := v_1.Args[1]
18684 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
18685 if v_1_0.Op != OpConst32 || v_1_0.Type != t {
18686 continue
18687 }
18688 d := auxIntToInt32(v_1_0.AuxInt)
18689 x := v_1_1
18690 v.reset(OpMul32)
18691 v0 := b.NewValue0(v.Pos, OpConst32, t)
18692 v0.AuxInt = int32ToAuxInt(c * d)
18693 v.AddArg2(v0, x)
18694 return true
18695 }
18696 }
18697 break
18698 }
18699 return false
18700 }
18701 func rewriteValuegeneric_OpMul32F(v *Value) bool {
18702 v_1 := v.Args[1]
18703 v_0 := v.Args[0]
18704
18705
18706
18707 for {
18708 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18709 if v_0.Op != OpConst32F {
18710 continue
18711 }
18712 c := auxIntToFloat32(v_0.AuxInt)
18713 if v_1.Op != OpConst32F {
18714 continue
18715 }
18716 d := auxIntToFloat32(v_1.AuxInt)
18717 if !(c*d == c*d) {
18718 continue
18719 }
18720 v.reset(OpConst32F)
18721 v.AuxInt = float32ToAuxInt(c * d)
18722 return true
18723 }
18724 break
18725 }
18726
18727
18728 for {
18729 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18730 x := v_0
18731 if v_1.Op != OpConst32F || auxIntToFloat32(v_1.AuxInt) != 1 {
18732 continue
18733 }
18734 v.copyOf(x)
18735 return true
18736 }
18737 break
18738 }
18739
18740
18741 for {
18742 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18743 x := v_0
18744 if v_1.Op != OpConst32F || auxIntToFloat32(v_1.AuxInt) != -1 {
18745 continue
18746 }
18747 v.reset(OpNeg32F)
18748 v.AddArg(x)
18749 return true
18750 }
18751 break
18752 }
18753
18754
18755 for {
18756 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18757 x := v_0
18758 if v_1.Op != OpConst32F || auxIntToFloat32(v_1.AuxInt) != 2 {
18759 continue
18760 }
18761 v.reset(OpAdd32F)
18762 v.AddArg2(x, x)
18763 return true
18764 }
18765 break
18766 }
18767 return false
18768 }
18769 func rewriteValuegeneric_OpMul32uover(v *Value) bool {
18770 v_1 := v.Args[1]
18771 v_0 := v.Args[0]
18772 b := v.Block
18773
18774
18775 for {
18776 t := v.Type
18777 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18778 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 1 {
18779 continue
18780 }
18781 x := v_1
18782 v.reset(OpMakeTuple)
18783 v0 := b.NewValue0(v.Pos, OpConstBool, t.FieldType(1))
18784 v0.AuxInt = boolToAuxInt(false)
18785 v.AddArg2(x, v0)
18786 return true
18787 }
18788 break
18789 }
18790
18791
18792 for {
18793 t := v.Type
18794 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18795 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
18796 continue
18797 }
18798 v.reset(OpMakeTuple)
18799 v0 := b.NewValue0(v.Pos, OpConst32, t.FieldType(0))
18800 v0.AuxInt = int32ToAuxInt(0)
18801 v1 := b.NewValue0(v.Pos, OpConstBool, t.FieldType(1))
18802 v1.AuxInt = boolToAuxInt(false)
18803 v.AddArg2(v0, v1)
18804 return true
18805 }
18806 break
18807 }
18808 return false
18809 }
18810 func rewriteValuegeneric_OpMul64(v *Value) bool {
18811 v_1 := v.Args[1]
18812 v_0 := v.Args[0]
18813 b := v.Block
18814 typ := &b.Func.Config.Types
18815
18816
18817 for {
18818 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18819 if v_0.Op != OpConst64 {
18820 continue
18821 }
18822 c := auxIntToInt64(v_0.AuxInt)
18823 if v_1.Op != OpConst64 {
18824 continue
18825 }
18826 d := auxIntToInt64(v_1.AuxInt)
18827 v.reset(OpConst64)
18828 v.AuxInt = int64ToAuxInt(c * d)
18829 return true
18830 }
18831 break
18832 }
18833
18834
18835 for {
18836 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18837 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 1 {
18838 continue
18839 }
18840 x := v_1
18841 v.copyOf(x)
18842 return true
18843 }
18844 break
18845 }
18846
18847
18848 for {
18849 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18850 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != -1 {
18851 continue
18852 }
18853 x := v_1
18854 v.reset(OpNeg64)
18855 v.AddArg(x)
18856 return true
18857 }
18858 break
18859 }
18860
18861
18862
18863 for {
18864 t := v.Type
18865 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18866 n := v_0
18867 if v_1.Op != OpConst64 {
18868 continue
18869 }
18870 c := auxIntToInt64(v_1.AuxInt)
18871 if !(isPowerOfTwo(c)) {
18872 continue
18873 }
18874 v.reset(OpLsh64x64)
18875 v.Type = t
18876 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
18877 v0.AuxInt = int64ToAuxInt(log64(c))
18878 v.AddArg2(n, v0)
18879 return true
18880 }
18881 break
18882 }
18883
18884
18885
18886 for {
18887 t := v.Type
18888 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18889 n := v_0
18890 if v_1.Op != OpConst64 {
18891 continue
18892 }
18893 c := auxIntToInt64(v_1.AuxInt)
18894 if !(t.IsSigned() && isPowerOfTwo(-c)) {
18895 continue
18896 }
18897 v.reset(OpNeg64)
18898 v0 := b.NewValue0(v.Pos, OpLsh64x64, t)
18899 v1 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
18900 v1.AuxInt = int64ToAuxInt(log64(-c))
18901 v0.AddArg2(n, v1)
18902 v.AddArg(v0)
18903 return true
18904 }
18905 break
18906 }
18907
18908
18909 for {
18910 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18911 if v_0.Op != OpConst64 {
18912 continue
18913 }
18914 t := v_0.Type
18915 c := auxIntToInt64(v_0.AuxInt)
18916 if v_1.Op != OpAdd64 || v_1.Type != t {
18917 continue
18918 }
18919 _ = v_1.Args[1]
18920 v_1_0 := v_1.Args[0]
18921 v_1_1 := v_1.Args[1]
18922 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
18923 if v_1_0.Op != OpConst64 || v_1_0.Type != t {
18924 continue
18925 }
18926 d := auxIntToInt64(v_1_0.AuxInt)
18927 x := v_1_1
18928 v.reset(OpAdd64)
18929 v0 := b.NewValue0(v.Pos, OpConst64, t)
18930 v0.AuxInt = int64ToAuxInt(c * d)
18931 v1 := b.NewValue0(v.Pos, OpMul64, t)
18932 v2 := b.NewValue0(v.Pos, OpConst64, t)
18933 v2.AuxInt = int64ToAuxInt(c)
18934 v1.AddArg2(v2, x)
18935 v.AddArg2(v0, v1)
18936 return true
18937 }
18938 }
18939 break
18940 }
18941
18942
18943 for {
18944 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18945 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
18946 continue
18947 }
18948 v.reset(OpConst64)
18949 v.AuxInt = int64ToAuxInt(0)
18950 return true
18951 }
18952 break
18953 }
18954
18955
18956
18957 for {
18958 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18959 if v_0.Op != OpMul64 {
18960 continue
18961 }
18962 _ = v_0.Args[1]
18963 v_0_0 := v_0.Args[0]
18964 v_0_1 := v_0.Args[1]
18965 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
18966 i := v_0_0
18967 if i.Op != OpConst64 {
18968 continue
18969 }
18970 t := i.Type
18971 z := v_0_1
18972 x := v_1
18973 if !(z.Op != OpConst64 && x.Op != OpConst64) {
18974 continue
18975 }
18976 v.reset(OpMul64)
18977 v0 := b.NewValue0(v.Pos, OpMul64, t)
18978 v0.AddArg2(x, z)
18979 v.AddArg2(i, v0)
18980 return true
18981 }
18982 }
18983 break
18984 }
18985
18986
18987 for {
18988 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18989 if v_0.Op != OpConst64 {
18990 continue
18991 }
18992 t := v_0.Type
18993 c := auxIntToInt64(v_0.AuxInt)
18994 if v_1.Op != OpMul64 {
18995 continue
18996 }
18997 _ = v_1.Args[1]
18998 v_1_0 := v_1.Args[0]
18999 v_1_1 := v_1.Args[1]
19000 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
19001 if v_1_0.Op != OpConst64 || v_1_0.Type != t {
19002 continue
19003 }
19004 d := auxIntToInt64(v_1_0.AuxInt)
19005 x := v_1_1
19006 v.reset(OpMul64)
19007 v0 := b.NewValue0(v.Pos, OpConst64, t)
19008 v0.AuxInt = int64ToAuxInt(c * d)
19009 v.AddArg2(v0, x)
19010 return true
19011 }
19012 }
19013 break
19014 }
19015 return false
19016 }
19017 func rewriteValuegeneric_OpMul64F(v *Value) bool {
19018 v_1 := v.Args[1]
19019 v_0 := v.Args[0]
19020
19021
19022
19023 for {
19024 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19025 if v_0.Op != OpConst64F {
19026 continue
19027 }
19028 c := auxIntToFloat64(v_0.AuxInt)
19029 if v_1.Op != OpConst64F {
19030 continue
19031 }
19032 d := auxIntToFloat64(v_1.AuxInt)
19033 if !(c*d == c*d) {
19034 continue
19035 }
19036 v.reset(OpConst64F)
19037 v.AuxInt = float64ToAuxInt(c * d)
19038 return true
19039 }
19040 break
19041 }
19042
19043
19044 for {
19045 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19046 x := v_0
19047 if v_1.Op != OpConst64F || auxIntToFloat64(v_1.AuxInt) != 1 {
19048 continue
19049 }
19050 v.copyOf(x)
19051 return true
19052 }
19053 break
19054 }
19055
19056
19057 for {
19058 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19059 x := v_0
19060 if v_1.Op != OpConst64F || auxIntToFloat64(v_1.AuxInt) != -1 {
19061 continue
19062 }
19063 v.reset(OpNeg64F)
19064 v.AddArg(x)
19065 return true
19066 }
19067 break
19068 }
19069
19070
19071 for {
19072 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19073 x := v_0
19074 if v_1.Op != OpConst64F || auxIntToFloat64(v_1.AuxInt) != 2 {
19075 continue
19076 }
19077 v.reset(OpAdd64F)
19078 v.AddArg2(x, x)
19079 return true
19080 }
19081 break
19082 }
19083 return false
19084 }
19085 func rewriteValuegeneric_OpMul64uover(v *Value) bool {
19086 v_1 := v.Args[1]
19087 v_0 := v.Args[0]
19088 b := v.Block
19089
19090
19091 for {
19092 t := v.Type
19093 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19094 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 1 {
19095 continue
19096 }
19097 x := v_1
19098 v.reset(OpMakeTuple)
19099 v0 := b.NewValue0(v.Pos, OpConstBool, t.FieldType(1))
19100 v0.AuxInt = boolToAuxInt(false)
19101 v.AddArg2(x, v0)
19102 return true
19103 }
19104 break
19105 }
19106
19107
19108 for {
19109 t := v.Type
19110 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19111 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
19112 continue
19113 }
19114 v.reset(OpMakeTuple)
19115 v0 := b.NewValue0(v.Pos, OpConst64, t.FieldType(0))
19116 v0.AuxInt = int64ToAuxInt(0)
19117 v1 := b.NewValue0(v.Pos, OpConstBool, t.FieldType(1))
19118 v1.AuxInt = boolToAuxInt(false)
19119 v.AddArg2(v0, v1)
19120 return true
19121 }
19122 break
19123 }
19124 return false
19125 }
19126 func rewriteValuegeneric_OpMul8(v *Value) bool {
19127 v_1 := v.Args[1]
19128 v_0 := v.Args[0]
19129 b := v.Block
19130 typ := &b.Func.Config.Types
19131
19132
19133 for {
19134 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19135 if v_0.Op != OpConst8 {
19136 continue
19137 }
19138 c := auxIntToInt8(v_0.AuxInt)
19139 if v_1.Op != OpConst8 {
19140 continue
19141 }
19142 d := auxIntToInt8(v_1.AuxInt)
19143 v.reset(OpConst8)
19144 v.AuxInt = int8ToAuxInt(c * d)
19145 return true
19146 }
19147 break
19148 }
19149
19150
19151 for {
19152 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19153 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 1 {
19154 continue
19155 }
19156 x := v_1
19157 v.copyOf(x)
19158 return true
19159 }
19160 break
19161 }
19162
19163
19164 for {
19165 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19166 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != -1 {
19167 continue
19168 }
19169 x := v_1
19170 v.reset(OpNeg8)
19171 v.AddArg(x)
19172 return true
19173 }
19174 break
19175 }
19176
19177
19178
19179 for {
19180 t := v.Type
19181 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19182 n := v_0
19183 if v_1.Op != OpConst8 {
19184 continue
19185 }
19186 c := auxIntToInt8(v_1.AuxInt)
19187 if !(isPowerOfTwo(c)) {
19188 continue
19189 }
19190 v.reset(OpLsh8x64)
19191 v.Type = t
19192 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
19193 v0.AuxInt = int64ToAuxInt(log8(c))
19194 v.AddArg2(n, v0)
19195 return true
19196 }
19197 break
19198 }
19199
19200
19201
19202 for {
19203 t := v.Type
19204 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19205 n := v_0
19206 if v_1.Op != OpConst8 {
19207 continue
19208 }
19209 c := auxIntToInt8(v_1.AuxInt)
19210 if !(t.IsSigned() && isPowerOfTwo(-c)) {
19211 continue
19212 }
19213 v.reset(OpNeg8)
19214 v0 := b.NewValue0(v.Pos, OpLsh8x64, t)
19215 v1 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
19216 v1.AuxInt = int64ToAuxInt(log8(-c))
19217 v0.AddArg2(n, v1)
19218 v.AddArg(v0)
19219 return true
19220 }
19221 break
19222 }
19223
19224
19225 for {
19226 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19227 if v_0.Op != OpConst8 {
19228 continue
19229 }
19230 t := v_0.Type
19231 c := auxIntToInt8(v_0.AuxInt)
19232 if v_1.Op != OpAdd8 || v_1.Type != t {
19233 continue
19234 }
19235 _ = v_1.Args[1]
19236 v_1_0 := v_1.Args[0]
19237 v_1_1 := v_1.Args[1]
19238 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
19239 if v_1_0.Op != OpConst8 || v_1_0.Type != t {
19240 continue
19241 }
19242 d := auxIntToInt8(v_1_0.AuxInt)
19243 x := v_1_1
19244 v.reset(OpAdd8)
19245 v0 := b.NewValue0(v.Pos, OpConst8, t)
19246 v0.AuxInt = int8ToAuxInt(c * d)
19247 v1 := b.NewValue0(v.Pos, OpMul8, t)
19248 v2 := b.NewValue0(v.Pos, OpConst8, t)
19249 v2.AuxInt = int8ToAuxInt(c)
19250 v1.AddArg2(v2, x)
19251 v.AddArg2(v0, v1)
19252 return true
19253 }
19254 }
19255 break
19256 }
19257
19258
19259 for {
19260 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19261 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 {
19262 continue
19263 }
19264 v.reset(OpConst8)
19265 v.AuxInt = int8ToAuxInt(0)
19266 return true
19267 }
19268 break
19269 }
19270
19271
19272
19273 for {
19274 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19275 if v_0.Op != OpMul8 {
19276 continue
19277 }
19278 _ = v_0.Args[1]
19279 v_0_0 := v_0.Args[0]
19280 v_0_1 := v_0.Args[1]
19281 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
19282 i := v_0_0
19283 if i.Op != OpConst8 {
19284 continue
19285 }
19286 t := i.Type
19287 z := v_0_1
19288 x := v_1
19289 if !(z.Op != OpConst8 && x.Op != OpConst8) {
19290 continue
19291 }
19292 v.reset(OpMul8)
19293 v0 := b.NewValue0(v.Pos, OpMul8, t)
19294 v0.AddArg2(x, z)
19295 v.AddArg2(i, v0)
19296 return true
19297 }
19298 }
19299 break
19300 }
19301
19302
19303 for {
19304 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19305 if v_0.Op != OpConst8 {
19306 continue
19307 }
19308 t := v_0.Type
19309 c := auxIntToInt8(v_0.AuxInt)
19310 if v_1.Op != OpMul8 {
19311 continue
19312 }
19313 _ = v_1.Args[1]
19314 v_1_0 := v_1.Args[0]
19315 v_1_1 := v_1.Args[1]
19316 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
19317 if v_1_0.Op != OpConst8 || v_1_0.Type != t {
19318 continue
19319 }
19320 d := auxIntToInt8(v_1_0.AuxInt)
19321 x := v_1_1
19322 v.reset(OpMul8)
19323 v0 := b.NewValue0(v.Pos, OpConst8, t)
19324 v0.AuxInt = int8ToAuxInt(c * d)
19325 v.AddArg2(v0, x)
19326 return true
19327 }
19328 }
19329 break
19330 }
19331 return false
19332 }
19333 func rewriteValuegeneric_OpNeg16(v *Value) bool {
19334 v_0 := v.Args[0]
19335 b := v.Block
19336
19337
19338 for {
19339 if v_0.Op != OpConst16 {
19340 break
19341 }
19342 c := auxIntToInt16(v_0.AuxInt)
19343 v.reset(OpConst16)
19344 v.AuxInt = int16ToAuxInt(-c)
19345 return true
19346 }
19347
19348
19349 for {
19350 if v_0.Op != OpSub16 {
19351 break
19352 }
19353 y := v_0.Args[1]
19354 x := v_0.Args[0]
19355 v.reset(OpSub16)
19356 v.AddArg2(y, x)
19357 return true
19358 }
19359
19360
19361 for {
19362 if v_0.Op != OpNeg16 {
19363 break
19364 }
19365 x := v_0.Args[0]
19366 v.copyOf(x)
19367 return true
19368 }
19369
19370
19371 for {
19372 t := v.Type
19373 if v_0.Op != OpCom16 {
19374 break
19375 }
19376 x := v_0.Args[0]
19377 v.reset(OpAdd16)
19378 v0 := b.NewValue0(v.Pos, OpConst16, t)
19379 v0.AuxInt = int16ToAuxInt(1)
19380 v.AddArg2(v0, x)
19381 return true
19382 }
19383 return false
19384 }
19385 func rewriteValuegeneric_OpNeg32(v *Value) bool {
19386 v_0 := v.Args[0]
19387 b := v.Block
19388
19389
19390 for {
19391 if v_0.Op != OpConst32 {
19392 break
19393 }
19394 c := auxIntToInt32(v_0.AuxInt)
19395 v.reset(OpConst32)
19396 v.AuxInt = int32ToAuxInt(-c)
19397 return true
19398 }
19399
19400
19401 for {
19402 if v_0.Op != OpSub32 {
19403 break
19404 }
19405 y := v_0.Args[1]
19406 x := v_0.Args[0]
19407 v.reset(OpSub32)
19408 v.AddArg2(y, x)
19409 return true
19410 }
19411
19412
19413 for {
19414 if v_0.Op != OpNeg32 {
19415 break
19416 }
19417 x := v_0.Args[0]
19418 v.copyOf(x)
19419 return true
19420 }
19421
19422
19423 for {
19424 t := v.Type
19425 if v_0.Op != OpCom32 {
19426 break
19427 }
19428 x := v_0.Args[0]
19429 v.reset(OpAdd32)
19430 v0 := b.NewValue0(v.Pos, OpConst32, t)
19431 v0.AuxInt = int32ToAuxInt(1)
19432 v.AddArg2(v0, x)
19433 return true
19434 }
19435 return false
19436 }
19437 func rewriteValuegeneric_OpNeg32F(v *Value) bool {
19438 v_0 := v.Args[0]
19439
19440
19441
19442 for {
19443 if v_0.Op != OpConst32F {
19444 break
19445 }
19446 c := auxIntToFloat32(v_0.AuxInt)
19447 if !(c != 0) {
19448 break
19449 }
19450 v.reset(OpConst32F)
19451 v.AuxInt = float32ToAuxInt(-c)
19452 return true
19453 }
19454 return false
19455 }
19456 func rewriteValuegeneric_OpNeg64(v *Value) bool {
19457 v_0 := v.Args[0]
19458 b := v.Block
19459
19460
19461 for {
19462 if v_0.Op != OpConst64 {
19463 break
19464 }
19465 c := auxIntToInt64(v_0.AuxInt)
19466 v.reset(OpConst64)
19467 v.AuxInt = int64ToAuxInt(-c)
19468 return true
19469 }
19470
19471
19472 for {
19473 if v_0.Op != OpSub64 {
19474 break
19475 }
19476 y := v_0.Args[1]
19477 x := v_0.Args[0]
19478 v.reset(OpSub64)
19479 v.AddArg2(y, x)
19480 return true
19481 }
19482
19483
19484 for {
19485 if v_0.Op != OpNeg64 {
19486 break
19487 }
19488 x := v_0.Args[0]
19489 v.copyOf(x)
19490 return true
19491 }
19492
19493
19494 for {
19495 t := v.Type
19496 if v_0.Op != OpCom64 {
19497 break
19498 }
19499 x := v_0.Args[0]
19500 v.reset(OpAdd64)
19501 v0 := b.NewValue0(v.Pos, OpConst64, t)
19502 v0.AuxInt = int64ToAuxInt(1)
19503 v.AddArg2(v0, x)
19504 return true
19505 }
19506 return false
19507 }
19508 func rewriteValuegeneric_OpNeg64F(v *Value) bool {
19509 v_0 := v.Args[0]
19510
19511
19512
19513 for {
19514 if v_0.Op != OpConst64F {
19515 break
19516 }
19517 c := auxIntToFloat64(v_0.AuxInt)
19518 if !(c != 0) {
19519 break
19520 }
19521 v.reset(OpConst64F)
19522 v.AuxInt = float64ToAuxInt(-c)
19523 return true
19524 }
19525 return false
19526 }
19527 func rewriteValuegeneric_OpNeg8(v *Value) bool {
19528 v_0 := v.Args[0]
19529 b := v.Block
19530
19531
19532 for {
19533 if v_0.Op != OpConst8 {
19534 break
19535 }
19536 c := auxIntToInt8(v_0.AuxInt)
19537 v.reset(OpConst8)
19538 v.AuxInt = int8ToAuxInt(-c)
19539 return true
19540 }
19541
19542
19543 for {
19544 if v_0.Op != OpSub8 {
19545 break
19546 }
19547 y := v_0.Args[1]
19548 x := v_0.Args[0]
19549 v.reset(OpSub8)
19550 v.AddArg2(y, x)
19551 return true
19552 }
19553
19554
19555 for {
19556 if v_0.Op != OpNeg8 {
19557 break
19558 }
19559 x := v_0.Args[0]
19560 v.copyOf(x)
19561 return true
19562 }
19563
19564
19565 for {
19566 t := v.Type
19567 if v_0.Op != OpCom8 {
19568 break
19569 }
19570 x := v_0.Args[0]
19571 v.reset(OpAdd8)
19572 v0 := b.NewValue0(v.Pos, OpConst8, t)
19573 v0.AuxInt = int8ToAuxInt(1)
19574 v.AddArg2(v0, x)
19575 return true
19576 }
19577 return false
19578 }
19579 func rewriteValuegeneric_OpNeq16(v *Value) bool {
19580 v_1 := v.Args[1]
19581 v_0 := v.Args[0]
19582 b := v.Block
19583 typ := &b.Func.Config.Types
19584
19585
19586 for {
19587 x := v_0
19588 if x != v_1 {
19589 break
19590 }
19591 v.reset(OpConstBool)
19592 v.AuxInt = boolToAuxInt(false)
19593 return true
19594 }
19595
19596
19597 for {
19598 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19599 if v_0.Op != OpConst16 {
19600 continue
19601 }
19602 t := v_0.Type
19603 c := auxIntToInt16(v_0.AuxInt)
19604 if v_1.Op != OpAdd16 {
19605 continue
19606 }
19607 _ = v_1.Args[1]
19608 v_1_0 := v_1.Args[0]
19609 v_1_1 := v_1.Args[1]
19610 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
19611 if v_1_0.Op != OpConst16 || v_1_0.Type != t {
19612 continue
19613 }
19614 d := auxIntToInt16(v_1_0.AuxInt)
19615 x := v_1_1
19616 v.reset(OpNeq16)
19617 v0 := b.NewValue0(v.Pos, OpConst16, t)
19618 v0.AuxInt = int16ToAuxInt(c - d)
19619 v.AddArg2(v0, x)
19620 return true
19621 }
19622 }
19623 break
19624 }
19625
19626
19627 for {
19628 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19629 if v_0.Op != OpConst16 {
19630 continue
19631 }
19632 c := auxIntToInt16(v_0.AuxInt)
19633 if v_1.Op != OpConst16 {
19634 continue
19635 }
19636 d := auxIntToInt16(v_1.AuxInt)
19637 v.reset(OpConstBool)
19638 v.AuxInt = boolToAuxInt(c != d)
19639 return true
19640 }
19641 break
19642 }
19643
19644
19645
19646 for {
19647 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19648 n := v_0
19649 if v_1.Op != OpLsh16x64 {
19650 continue
19651 }
19652 _ = v_1.Args[1]
19653 v_1_0 := v_1.Args[0]
19654 if v_1_0.Op != OpRsh16x64 {
19655 continue
19656 }
19657 _ = v_1_0.Args[1]
19658 v_1_0_0 := v_1_0.Args[0]
19659 if v_1_0_0.Op != OpAdd16 {
19660 continue
19661 }
19662 t := v_1_0_0.Type
19663 _ = v_1_0_0.Args[1]
19664 v_1_0_0_0 := v_1_0_0.Args[0]
19665 v_1_0_0_1 := v_1_0_0.Args[1]
19666 for _i1 := 0; _i1 <= 1; _i1, v_1_0_0_0, v_1_0_0_1 = _i1+1, v_1_0_0_1, v_1_0_0_0 {
19667 if n != v_1_0_0_0 || v_1_0_0_1.Op != OpRsh16Ux64 || v_1_0_0_1.Type != t {
19668 continue
19669 }
19670 _ = v_1_0_0_1.Args[1]
19671 v_1_0_0_1_0 := v_1_0_0_1.Args[0]
19672 if v_1_0_0_1_0.Op != OpRsh16x64 || v_1_0_0_1_0.Type != t {
19673 continue
19674 }
19675 _ = v_1_0_0_1_0.Args[1]
19676 if n != v_1_0_0_1_0.Args[0] {
19677 continue
19678 }
19679 v_1_0_0_1_0_1 := v_1_0_0_1_0.Args[1]
19680 if v_1_0_0_1_0_1.Op != OpConst64 || v_1_0_0_1_0_1.Type != typ.UInt64 || auxIntToInt64(v_1_0_0_1_0_1.AuxInt) != 15 {
19681 continue
19682 }
19683 v_1_0_0_1_1 := v_1_0_0_1.Args[1]
19684 if v_1_0_0_1_1.Op != OpConst64 || v_1_0_0_1_1.Type != typ.UInt64 {
19685 continue
19686 }
19687 kbar := auxIntToInt64(v_1_0_0_1_1.AuxInt)
19688 v_1_0_1 := v_1_0.Args[1]
19689 if v_1_0_1.Op != OpConst64 || v_1_0_1.Type != typ.UInt64 {
19690 continue
19691 }
19692 k := auxIntToInt64(v_1_0_1.AuxInt)
19693 v_1_1 := v_1.Args[1]
19694 if v_1_1.Op != OpConst64 || v_1_1.Type != typ.UInt64 || auxIntToInt64(v_1_1.AuxInt) != k || !(k > 0 && k < 15 && kbar == 16-k) {
19695 continue
19696 }
19697 v.reset(OpNeq16)
19698 v0 := b.NewValue0(v.Pos, OpAnd16, t)
19699 v1 := b.NewValue0(v.Pos, OpConst16, t)
19700 v1.AuxInt = int16ToAuxInt(1<<uint(k) - 1)
19701 v0.AddArg2(n, v1)
19702 v2 := b.NewValue0(v.Pos, OpConst16, t)
19703 v2.AuxInt = int16ToAuxInt(0)
19704 v.AddArg2(v0, v2)
19705 return true
19706 }
19707 }
19708 break
19709 }
19710
19711
19712
19713 for {
19714 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19715 s := v_0
19716 if s.Op != OpSub16 {
19717 continue
19718 }
19719 y := s.Args[1]
19720 x := s.Args[0]
19721 if v_1.Op != OpConst16 || auxIntToInt16(v_1.AuxInt) != 0 || !(s.Uses == 1) {
19722 continue
19723 }
19724 v.reset(OpNeq16)
19725 v.AddArg2(x, y)
19726 return true
19727 }
19728 break
19729 }
19730
19731
19732
19733 for {
19734 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19735 if v_0.Op != OpAnd16 {
19736 continue
19737 }
19738 t := v_0.Type
19739 _ = v_0.Args[1]
19740 v_0_0 := v_0.Args[0]
19741 v_0_1 := v_0.Args[1]
19742 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
19743 x := v_0_0
19744 if v_0_1.Op != OpConst16 || v_0_1.Type != t {
19745 continue
19746 }
19747 y := auxIntToInt16(v_0_1.AuxInt)
19748 if v_1.Op != OpConst16 || v_1.Type != t || auxIntToInt16(v_1.AuxInt) != y || !(oneBit16(y)) {
19749 continue
19750 }
19751 v.reset(OpEq16)
19752 v0 := b.NewValue0(v.Pos, OpAnd16, t)
19753 v1 := b.NewValue0(v.Pos, OpConst16, t)
19754 v1.AuxInt = int16ToAuxInt(y)
19755 v0.AddArg2(x, v1)
19756 v2 := b.NewValue0(v.Pos, OpConst16, t)
19757 v2.AuxInt = int16ToAuxInt(0)
19758 v.AddArg2(v0, v2)
19759 return true
19760 }
19761 }
19762 break
19763 }
19764 return false
19765 }
19766 func rewriteValuegeneric_OpNeq32(v *Value) bool {
19767 v_1 := v.Args[1]
19768 v_0 := v.Args[0]
19769 b := v.Block
19770 typ := &b.Func.Config.Types
19771
19772
19773 for {
19774 x := v_0
19775 if x != v_1 {
19776 break
19777 }
19778 v.reset(OpConstBool)
19779 v.AuxInt = boolToAuxInt(false)
19780 return true
19781 }
19782
19783
19784 for {
19785 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19786 if v_0.Op != OpConst32 {
19787 continue
19788 }
19789 t := v_0.Type
19790 c := auxIntToInt32(v_0.AuxInt)
19791 if v_1.Op != OpAdd32 {
19792 continue
19793 }
19794 _ = v_1.Args[1]
19795 v_1_0 := v_1.Args[0]
19796 v_1_1 := v_1.Args[1]
19797 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
19798 if v_1_0.Op != OpConst32 || v_1_0.Type != t {
19799 continue
19800 }
19801 d := auxIntToInt32(v_1_0.AuxInt)
19802 x := v_1_1
19803 v.reset(OpNeq32)
19804 v0 := b.NewValue0(v.Pos, OpConst32, t)
19805 v0.AuxInt = int32ToAuxInt(c - d)
19806 v.AddArg2(v0, x)
19807 return true
19808 }
19809 }
19810 break
19811 }
19812
19813
19814 for {
19815 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19816 if v_0.Op != OpConst32 {
19817 continue
19818 }
19819 c := auxIntToInt32(v_0.AuxInt)
19820 if v_1.Op != OpConst32 {
19821 continue
19822 }
19823 d := auxIntToInt32(v_1.AuxInt)
19824 v.reset(OpConstBool)
19825 v.AuxInt = boolToAuxInt(c != d)
19826 return true
19827 }
19828 break
19829 }
19830
19831
19832
19833 for {
19834 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19835 n := v_0
19836 if v_1.Op != OpLsh32x64 {
19837 continue
19838 }
19839 _ = v_1.Args[1]
19840 v_1_0 := v_1.Args[0]
19841 if v_1_0.Op != OpRsh32x64 {
19842 continue
19843 }
19844 _ = v_1_0.Args[1]
19845 v_1_0_0 := v_1_0.Args[0]
19846 if v_1_0_0.Op != OpAdd32 {
19847 continue
19848 }
19849 t := v_1_0_0.Type
19850 _ = v_1_0_0.Args[1]
19851 v_1_0_0_0 := v_1_0_0.Args[0]
19852 v_1_0_0_1 := v_1_0_0.Args[1]
19853 for _i1 := 0; _i1 <= 1; _i1, v_1_0_0_0, v_1_0_0_1 = _i1+1, v_1_0_0_1, v_1_0_0_0 {
19854 if n != v_1_0_0_0 || v_1_0_0_1.Op != OpRsh32Ux64 || v_1_0_0_1.Type != t {
19855 continue
19856 }
19857 _ = v_1_0_0_1.Args[1]
19858 v_1_0_0_1_0 := v_1_0_0_1.Args[0]
19859 if v_1_0_0_1_0.Op != OpRsh32x64 || v_1_0_0_1_0.Type != t {
19860 continue
19861 }
19862 _ = v_1_0_0_1_0.Args[1]
19863 if n != v_1_0_0_1_0.Args[0] {
19864 continue
19865 }
19866 v_1_0_0_1_0_1 := v_1_0_0_1_0.Args[1]
19867 if v_1_0_0_1_0_1.Op != OpConst64 || v_1_0_0_1_0_1.Type != typ.UInt64 || auxIntToInt64(v_1_0_0_1_0_1.AuxInt) != 31 {
19868 continue
19869 }
19870 v_1_0_0_1_1 := v_1_0_0_1.Args[1]
19871 if v_1_0_0_1_1.Op != OpConst64 || v_1_0_0_1_1.Type != typ.UInt64 {
19872 continue
19873 }
19874 kbar := auxIntToInt64(v_1_0_0_1_1.AuxInt)
19875 v_1_0_1 := v_1_0.Args[1]
19876 if v_1_0_1.Op != OpConst64 || v_1_0_1.Type != typ.UInt64 {
19877 continue
19878 }
19879 k := auxIntToInt64(v_1_0_1.AuxInt)
19880 v_1_1 := v_1.Args[1]
19881 if v_1_1.Op != OpConst64 || v_1_1.Type != typ.UInt64 || auxIntToInt64(v_1_1.AuxInt) != k || !(k > 0 && k < 31 && kbar == 32-k) {
19882 continue
19883 }
19884 v.reset(OpNeq32)
19885 v0 := b.NewValue0(v.Pos, OpAnd32, t)
19886 v1 := b.NewValue0(v.Pos, OpConst32, t)
19887 v1.AuxInt = int32ToAuxInt(1<<uint(k) - 1)
19888 v0.AddArg2(n, v1)
19889 v2 := b.NewValue0(v.Pos, OpConst32, t)
19890 v2.AuxInt = int32ToAuxInt(0)
19891 v.AddArg2(v0, v2)
19892 return true
19893 }
19894 }
19895 break
19896 }
19897
19898
19899
19900 for {
19901 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19902 s := v_0
19903 if s.Op != OpSub32 {
19904 continue
19905 }
19906 y := s.Args[1]
19907 x := s.Args[0]
19908 if v_1.Op != OpConst32 || auxIntToInt32(v_1.AuxInt) != 0 || !(s.Uses == 1) {
19909 continue
19910 }
19911 v.reset(OpNeq32)
19912 v.AddArg2(x, y)
19913 return true
19914 }
19915 break
19916 }
19917
19918
19919
19920 for {
19921 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19922 if v_0.Op != OpAnd32 {
19923 continue
19924 }
19925 t := v_0.Type
19926 _ = v_0.Args[1]
19927 v_0_0 := v_0.Args[0]
19928 v_0_1 := v_0.Args[1]
19929 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
19930 x := v_0_0
19931 if v_0_1.Op != OpConst32 || v_0_1.Type != t {
19932 continue
19933 }
19934 y := auxIntToInt32(v_0_1.AuxInt)
19935 if v_1.Op != OpConst32 || v_1.Type != t || auxIntToInt32(v_1.AuxInt) != y || !(oneBit32(y)) {
19936 continue
19937 }
19938 v.reset(OpEq32)
19939 v0 := b.NewValue0(v.Pos, OpAnd32, t)
19940 v1 := b.NewValue0(v.Pos, OpConst32, t)
19941 v1.AuxInt = int32ToAuxInt(y)
19942 v0.AddArg2(x, v1)
19943 v2 := b.NewValue0(v.Pos, OpConst32, t)
19944 v2.AuxInt = int32ToAuxInt(0)
19945 v.AddArg2(v0, v2)
19946 return true
19947 }
19948 }
19949 break
19950 }
19951 return false
19952 }
19953 func rewriteValuegeneric_OpNeq32F(v *Value) bool {
19954 v_1 := v.Args[1]
19955 v_0 := v.Args[0]
19956
19957
19958 for {
19959 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19960 if v_0.Op != OpConst32F {
19961 continue
19962 }
19963 c := auxIntToFloat32(v_0.AuxInt)
19964 if v_1.Op != OpConst32F {
19965 continue
19966 }
19967 d := auxIntToFloat32(v_1.AuxInt)
19968 v.reset(OpConstBool)
19969 v.AuxInt = boolToAuxInt(c != d)
19970 return true
19971 }
19972 break
19973 }
19974 return false
19975 }
19976 func rewriteValuegeneric_OpNeq64(v *Value) bool {
19977 v_1 := v.Args[1]
19978 v_0 := v.Args[0]
19979 b := v.Block
19980 typ := &b.Func.Config.Types
19981
19982
19983 for {
19984 x := v_0
19985 if x != v_1 {
19986 break
19987 }
19988 v.reset(OpConstBool)
19989 v.AuxInt = boolToAuxInt(false)
19990 return true
19991 }
19992
19993
19994 for {
19995 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19996 if v_0.Op != OpConst64 {
19997 continue
19998 }
19999 t := v_0.Type
20000 c := auxIntToInt64(v_0.AuxInt)
20001 if v_1.Op != OpAdd64 {
20002 continue
20003 }
20004 _ = v_1.Args[1]
20005 v_1_0 := v_1.Args[0]
20006 v_1_1 := v_1.Args[1]
20007 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
20008 if v_1_0.Op != OpConst64 || v_1_0.Type != t {
20009 continue
20010 }
20011 d := auxIntToInt64(v_1_0.AuxInt)
20012 x := v_1_1
20013 v.reset(OpNeq64)
20014 v0 := b.NewValue0(v.Pos, OpConst64, t)
20015 v0.AuxInt = int64ToAuxInt(c - d)
20016 v.AddArg2(v0, x)
20017 return true
20018 }
20019 }
20020 break
20021 }
20022
20023
20024 for {
20025 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20026 if v_0.Op != OpConst64 {
20027 continue
20028 }
20029 c := auxIntToInt64(v_0.AuxInt)
20030 if v_1.Op != OpConst64 {
20031 continue
20032 }
20033 d := auxIntToInt64(v_1.AuxInt)
20034 v.reset(OpConstBool)
20035 v.AuxInt = boolToAuxInt(c != d)
20036 return true
20037 }
20038 break
20039 }
20040
20041
20042
20043 for {
20044 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20045 n := v_0
20046 if v_1.Op != OpLsh64x64 {
20047 continue
20048 }
20049 _ = v_1.Args[1]
20050 v_1_0 := v_1.Args[0]
20051 if v_1_0.Op != OpRsh64x64 {
20052 continue
20053 }
20054 _ = v_1_0.Args[1]
20055 v_1_0_0 := v_1_0.Args[0]
20056 if v_1_0_0.Op != OpAdd64 {
20057 continue
20058 }
20059 t := v_1_0_0.Type
20060 _ = v_1_0_0.Args[1]
20061 v_1_0_0_0 := v_1_0_0.Args[0]
20062 v_1_0_0_1 := v_1_0_0.Args[1]
20063 for _i1 := 0; _i1 <= 1; _i1, v_1_0_0_0, v_1_0_0_1 = _i1+1, v_1_0_0_1, v_1_0_0_0 {
20064 if n != v_1_0_0_0 || v_1_0_0_1.Op != OpRsh64Ux64 || v_1_0_0_1.Type != t {
20065 continue
20066 }
20067 _ = v_1_0_0_1.Args[1]
20068 v_1_0_0_1_0 := v_1_0_0_1.Args[0]
20069 if v_1_0_0_1_0.Op != OpRsh64x64 || v_1_0_0_1_0.Type != t {
20070 continue
20071 }
20072 _ = v_1_0_0_1_0.Args[1]
20073 if n != v_1_0_0_1_0.Args[0] {
20074 continue
20075 }
20076 v_1_0_0_1_0_1 := v_1_0_0_1_0.Args[1]
20077 if v_1_0_0_1_0_1.Op != OpConst64 || v_1_0_0_1_0_1.Type != typ.UInt64 || auxIntToInt64(v_1_0_0_1_0_1.AuxInt) != 63 {
20078 continue
20079 }
20080 v_1_0_0_1_1 := v_1_0_0_1.Args[1]
20081 if v_1_0_0_1_1.Op != OpConst64 || v_1_0_0_1_1.Type != typ.UInt64 {
20082 continue
20083 }
20084 kbar := auxIntToInt64(v_1_0_0_1_1.AuxInt)
20085 v_1_0_1 := v_1_0.Args[1]
20086 if v_1_0_1.Op != OpConst64 || v_1_0_1.Type != typ.UInt64 {
20087 continue
20088 }
20089 k := auxIntToInt64(v_1_0_1.AuxInt)
20090 v_1_1 := v_1.Args[1]
20091 if v_1_1.Op != OpConst64 || v_1_1.Type != typ.UInt64 || auxIntToInt64(v_1_1.AuxInt) != k || !(k > 0 && k < 63 && kbar == 64-k) {
20092 continue
20093 }
20094 v.reset(OpNeq64)
20095 v0 := b.NewValue0(v.Pos, OpAnd64, t)
20096 v1 := b.NewValue0(v.Pos, OpConst64, t)
20097 v1.AuxInt = int64ToAuxInt(1<<uint(k) - 1)
20098 v0.AddArg2(n, v1)
20099 v2 := b.NewValue0(v.Pos, OpConst64, t)
20100 v2.AuxInt = int64ToAuxInt(0)
20101 v.AddArg2(v0, v2)
20102 return true
20103 }
20104 }
20105 break
20106 }
20107
20108
20109
20110 for {
20111 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20112 s := v_0
20113 if s.Op != OpSub64 {
20114 continue
20115 }
20116 y := s.Args[1]
20117 x := s.Args[0]
20118 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 0 || !(s.Uses == 1) {
20119 continue
20120 }
20121 v.reset(OpNeq64)
20122 v.AddArg2(x, y)
20123 return true
20124 }
20125 break
20126 }
20127
20128
20129
20130 for {
20131 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20132 if v_0.Op != OpAnd64 {
20133 continue
20134 }
20135 t := v_0.Type
20136 _ = v_0.Args[1]
20137 v_0_0 := v_0.Args[0]
20138 v_0_1 := v_0.Args[1]
20139 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
20140 x := v_0_0
20141 if v_0_1.Op != OpConst64 || v_0_1.Type != t {
20142 continue
20143 }
20144 y := auxIntToInt64(v_0_1.AuxInt)
20145 if v_1.Op != OpConst64 || v_1.Type != t || auxIntToInt64(v_1.AuxInt) != y || !(oneBit64(y)) {
20146 continue
20147 }
20148 v.reset(OpEq64)
20149 v0 := b.NewValue0(v.Pos, OpAnd64, t)
20150 v1 := b.NewValue0(v.Pos, OpConst64, t)
20151 v1.AuxInt = int64ToAuxInt(y)
20152 v0.AddArg2(x, v1)
20153 v2 := b.NewValue0(v.Pos, OpConst64, t)
20154 v2.AuxInt = int64ToAuxInt(0)
20155 v.AddArg2(v0, v2)
20156 return true
20157 }
20158 }
20159 break
20160 }
20161 return false
20162 }
20163 func rewriteValuegeneric_OpNeq64F(v *Value) bool {
20164 v_1 := v.Args[1]
20165 v_0 := v.Args[0]
20166
20167
20168 for {
20169 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20170 if v_0.Op != OpConst64F {
20171 continue
20172 }
20173 c := auxIntToFloat64(v_0.AuxInt)
20174 if v_1.Op != OpConst64F {
20175 continue
20176 }
20177 d := auxIntToFloat64(v_1.AuxInt)
20178 v.reset(OpConstBool)
20179 v.AuxInt = boolToAuxInt(c != d)
20180 return true
20181 }
20182 break
20183 }
20184 return false
20185 }
20186 func rewriteValuegeneric_OpNeq8(v *Value) bool {
20187 v_1 := v.Args[1]
20188 v_0 := v.Args[0]
20189 b := v.Block
20190 typ := &b.Func.Config.Types
20191
20192
20193 for {
20194 x := v_0
20195 if x != v_1 {
20196 break
20197 }
20198 v.reset(OpConstBool)
20199 v.AuxInt = boolToAuxInt(false)
20200 return true
20201 }
20202
20203
20204 for {
20205 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20206 if v_0.Op != OpConst8 {
20207 continue
20208 }
20209 t := v_0.Type
20210 c := auxIntToInt8(v_0.AuxInt)
20211 if v_1.Op != OpAdd8 {
20212 continue
20213 }
20214 _ = v_1.Args[1]
20215 v_1_0 := v_1.Args[0]
20216 v_1_1 := v_1.Args[1]
20217 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
20218 if v_1_0.Op != OpConst8 || v_1_0.Type != t {
20219 continue
20220 }
20221 d := auxIntToInt8(v_1_0.AuxInt)
20222 x := v_1_1
20223 v.reset(OpNeq8)
20224 v0 := b.NewValue0(v.Pos, OpConst8, t)
20225 v0.AuxInt = int8ToAuxInt(c - d)
20226 v.AddArg2(v0, x)
20227 return true
20228 }
20229 }
20230 break
20231 }
20232
20233
20234 for {
20235 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20236 if v_0.Op != OpConst8 {
20237 continue
20238 }
20239 c := auxIntToInt8(v_0.AuxInt)
20240 if v_1.Op != OpConst8 {
20241 continue
20242 }
20243 d := auxIntToInt8(v_1.AuxInt)
20244 v.reset(OpConstBool)
20245 v.AuxInt = boolToAuxInt(c != d)
20246 return true
20247 }
20248 break
20249 }
20250
20251
20252
20253 for {
20254 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20255 n := v_0
20256 if v_1.Op != OpLsh8x64 {
20257 continue
20258 }
20259 _ = v_1.Args[1]
20260 v_1_0 := v_1.Args[0]
20261 if v_1_0.Op != OpRsh8x64 {
20262 continue
20263 }
20264 _ = v_1_0.Args[1]
20265 v_1_0_0 := v_1_0.Args[0]
20266 if v_1_0_0.Op != OpAdd8 {
20267 continue
20268 }
20269 t := v_1_0_0.Type
20270 _ = v_1_0_0.Args[1]
20271 v_1_0_0_0 := v_1_0_0.Args[0]
20272 v_1_0_0_1 := v_1_0_0.Args[1]
20273 for _i1 := 0; _i1 <= 1; _i1, v_1_0_0_0, v_1_0_0_1 = _i1+1, v_1_0_0_1, v_1_0_0_0 {
20274 if n != v_1_0_0_0 || v_1_0_0_1.Op != OpRsh8Ux64 || v_1_0_0_1.Type != t {
20275 continue
20276 }
20277 _ = v_1_0_0_1.Args[1]
20278 v_1_0_0_1_0 := v_1_0_0_1.Args[0]
20279 if v_1_0_0_1_0.Op != OpRsh8x64 || v_1_0_0_1_0.Type != t {
20280 continue
20281 }
20282 _ = v_1_0_0_1_0.Args[1]
20283 if n != v_1_0_0_1_0.Args[0] {
20284 continue
20285 }
20286 v_1_0_0_1_0_1 := v_1_0_0_1_0.Args[1]
20287 if v_1_0_0_1_0_1.Op != OpConst64 || v_1_0_0_1_0_1.Type != typ.UInt64 || auxIntToInt64(v_1_0_0_1_0_1.AuxInt) != 7 {
20288 continue
20289 }
20290 v_1_0_0_1_1 := v_1_0_0_1.Args[1]
20291 if v_1_0_0_1_1.Op != OpConst64 || v_1_0_0_1_1.Type != typ.UInt64 {
20292 continue
20293 }
20294 kbar := auxIntToInt64(v_1_0_0_1_1.AuxInt)
20295 v_1_0_1 := v_1_0.Args[1]
20296 if v_1_0_1.Op != OpConst64 || v_1_0_1.Type != typ.UInt64 {
20297 continue
20298 }
20299 k := auxIntToInt64(v_1_0_1.AuxInt)
20300 v_1_1 := v_1.Args[1]
20301 if v_1_1.Op != OpConst64 || v_1_1.Type != typ.UInt64 || auxIntToInt64(v_1_1.AuxInt) != k || !(k > 0 && k < 7 && kbar == 8-k) {
20302 continue
20303 }
20304 v.reset(OpNeq8)
20305 v0 := b.NewValue0(v.Pos, OpAnd8, t)
20306 v1 := b.NewValue0(v.Pos, OpConst8, t)
20307 v1.AuxInt = int8ToAuxInt(1<<uint(k) - 1)
20308 v0.AddArg2(n, v1)
20309 v2 := b.NewValue0(v.Pos, OpConst8, t)
20310 v2.AuxInt = int8ToAuxInt(0)
20311 v.AddArg2(v0, v2)
20312 return true
20313 }
20314 }
20315 break
20316 }
20317
20318
20319
20320 for {
20321 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20322 s := v_0
20323 if s.Op != OpSub8 {
20324 continue
20325 }
20326 y := s.Args[1]
20327 x := s.Args[0]
20328 if v_1.Op != OpConst8 || auxIntToInt8(v_1.AuxInt) != 0 || !(s.Uses == 1) {
20329 continue
20330 }
20331 v.reset(OpNeq8)
20332 v.AddArg2(x, y)
20333 return true
20334 }
20335 break
20336 }
20337
20338
20339
20340 for {
20341 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20342 if v_0.Op != OpAnd8 {
20343 continue
20344 }
20345 t := v_0.Type
20346 _ = v_0.Args[1]
20347 v_0_0 := v_0.Args[0]
20348 v_0_1 := v_0.Args[1]
20349 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
20350 x := v_0_0
20351 if v_0_1.Op != OpConst8 || v_0_1.Type != t {
20352 continue
20353 }
20354 y := auxIntToInt8(v_0_1.AuxInt)
20355 if v_1.Op != OpConst8 || v_1.Type != t || auxIntToInt8(v_1.AuxInt) != y || !(oneBit8(y)) {
20356 continue
20357 }
20358 v.reset(OpEq8)
20359 v0 := b.NewValue0(v.Pos, OpAnd8, t)
20360 v1 := b.NewValue0(v.Pos, OpConst8, t)
20361 v1.AuxInt = int8ToAuxInt(y)
20362 v0.AddArg2(x, v1)
20363 v2 := b.NewValue0(v.Pos, OpConst8, t)
20364 v2.AuxInt = int8ToAuxInt(0)
20365 v.AddArg2(v0, v2)
20366 return true
20367 }
20368 }
20369 break
20370 }
20371 return false
20372 }
20373 func rewriteValuegeneric_OpNeqB(v *Value) bool {
20374 v_1 := v.Args[1]
20375 v_0 := v.Args[0]
20376
20377
20378 for {
20379 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20380 if v_0.Op != OpConstBool {
20381 continue
20382 }
20383 c := auxIntToBool(v_0.AuxInt)
20384 if v_1.Op != OpConstBool {
20385 continue
20386 }
20387 d := auxIntToBool(v_1.AuxInt)
20388 v.reset(OpConstBool)
20389 v.AuxInt = boolToAuxInt(c != d)
20390 return true
20391 }
20392 break
20393 }
20394
20395
20396 for {
20397 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20398 if v_0.Op != OpConstBool || auxIntToBool(v_0.AuxInt) != false {
20399 continue
20400 }
20401 x := v_1
20402 v.copyOf(x)
20403 return true
20404 }
20405 break
20406 }
20407
20408
20409 for {
20410 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20411 if v_0.Op != OpConstBool || auxIntToBool(v_0.AuxInt) != true {
20412 continue
20413 }
20414 x := v_1
20415 v.reset(OpNot)
20416 v.AddArg(x)
20417 return true
20418 }
20419 break
20420 }
20421
20422
20423 for {
20424 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20425 if v_0.Op != OpNot {
20426 continue
20427 }
20428 x := v_0.Args[0]
20429 if v_1.Op != OpNot {
20430 continue
20431 }
20432 y := v_1.Args[0]
20433 v.reset(OpNeqB)
20434 v.AddArg2(x, y)
20435 return true
20436 }
20437 break
20438 }
20439 return false
20440 }
20441 func rewriteValuegeneric_OpNeqInter(v *Value) bool {
20442 v_1 := v.Args[1]
20443 v_0 := v.Args[0]
20444 b := v.Block
20445 typ := &b.Func.Config.Types
20446
20447
20448 for {
20449 x := v_0
20450 y := v_1
20451 v.reset(OpNeqPtr)
20452 v0 := b.NewValue0(v.Pos, OpITab, typ.Uintptr)
20453 v0.AddArg(x)
20454 v1 := b.NewValue0(v.Pos, OpITab, typ.Uintptr)
20455 v1.AddArg(y)
20456 v.AddArg2(v0, v1)
20457 return true
20458 }
20459 }
20460 func rewriteValuegeneric_OpNeqPtr(v *Value) bool {
20461 v_1 := v.Args[1]
20462 v_0 := v.Args[0]
20463
20464
20465 for {
20466 x := v_0
20467 if x != v_1 {
20468 break
20469 }
20470 v.reset(OpConstBool)
20471 v.AuxInt = boolToAuxInt(false)
20472 return true
20473 }
20474
20475
20476 for {
20477 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20478 if v_0.Op != OpAddr {
20479 continue
20480 }
20481 x := auxToSym(v_0.Aux)
20482 if v_1.Op != OpAddr {
20483 continue
20484 }
20485 y := auxToSym(v_1.Aux)
20486 v.reset(OpConstBool)
20487 v.AuxInt = boolToAuxInt(x != y)
20488 return true
20489 }
20490 break
20491 }
20492
20493
20494 for {
20495 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20496 if v_0.Op != OpAddr {
20497 continue
20498 }
20499 x := auxToSym(v_0.Aux)
20500 if v_1.Op != OpOffPtr {
20501 continue
20502 }
20503 o := auxIntToInt64(v_1.AuxInt)
20504 v_1_0 := v_1.Args[0]
20505 if v_1_0.Op != OpAddr {
20506 continue
20507 }
20508 y := auxToSym(v_1_0.Aux)
20509 v.reset(OpConstBool)
20510 v.AuxInt = boolToAuxInt(x != y || o != 0)
20511 return true
20512 }
20513 break
20514 }
20515
20516
20517 for {
20518 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20519 if v_0.Op != OpOffPtr {
20520 continue
20521 }
20522 o1 := auxIntToInt64(v_0.AuxInt)
20523 v_0_0 := v_0.Args[0]
20524 if v_0_0.Op != OpAddr {
20525 continue
20526 }
20527 x := auxToSym(v_0_0.Aux)
20528 if v_1.Op != OpOffPtr {
20529 continue
20530 }
20531 o2 := auxIntToInt64(v_1.AuxInt)
20532 v_1_0 := v_1.Args[0]
20533 if v_1_0.Op != OpAddr {
20534 continue
20535 }
20536 y := auxToSym(v_1_0.Aux)
20537 v.reset(OpConstBool)
20538 v.AuxInt = boolToAuxInt(x != y || o1 != o2)
20539 return true
20540 }
20541 break
20542 }
20543
20544
20545 for {
20546 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20547 if v_0.Op != OpLocalAddr {
20548 continue
20549 }
20550 x := auxToSym(v_0.Aux)
20551 if v_1.Op != OpLocalAddr {
20552 continue
20553 }
20554 y := auxToSym(v_1.Aux)
20555 v.reset(OpConstBool)
20556 v.AuxInt = boolToAuxInt(x != y)
20557 return true
20558 }
20559 break
20560 }
20561
20562
20563 for {
20564 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20565 if v_0.Op != OpLocalAddr {
20566 continue
20567 }
20568 x := auxToSym(v_0.Aux)
20569 if v_1.Op != OpOffPtr {
20570 continue
20571 }
20572 o := auxIntToInt64(v_1.AuxInt)
20573 v_1_0 := v_1.Args[0]
20574 if v_1_0.Op != OpLocalAddr {
20575 continue
20576 }
20577 y := auxToSym(v_1_0.Aux)
20578 v.reset(OpConstBool)
20579 v.AuxInt = boolToAuxInt(x != y || o != 0)
20580 return true
20581 }
20582 break
20583 }
20584
20585
20586 for {
20587 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20588 if v_0.Op != OpOffPtr {
20589 continue
20590 }
20591 o1 := auxIntToInt64(v_0.AuxInt)
20592 v_0_0 := v_0.Args[0]
20593 if v_0_0.Op != OpLocalAddr {
20594 continue
20595 }
20596 x := auxToSym(v_0_0.Aux)
20597 if v_1.Op != OpOffPtr {
20598 continue
20599 }
20600 o2 := auxIntToInt64(v_1.AuxInt)
20601 v_1_0 := v_1.Args[0]
20602 if v_1_0.Op != OpLocalAddr {
20603 continue
20604 }
20605 y := auxToSym(v_1_0.Aux)
20606 v.reset(OpConstBool)
20607 v.AuxInt = boolToAuxInt(x != y || o1 != o2)
20608 return true
20609 }
20610 break
20611 }
20612
20613
20614
20615 for {
20616 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20617 if v_0.Op != OpOffPtr {
20618 continue
20619 }
20620 o1 := auxIntToInt64(v_0.AuxInt)
20621 p1 := v_0.Args[0]
20622 p2 := v_1
20623 if !(isSamePtr(p1, p2)) {
20624 continue
20625 }
20626 v.reset(OpConstBool)
20627 v.AuxInt = boolToAuxInt(o1 != 0)
20628 return true
20629 }
20630 break
20631 }
20632
20633
20634
20635 for {
20636 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20637 if v_0.Op != OpOffPtr {
20638 continue
20639 }
20640 o1 := auxIntToInt64(v_0.AuxInt)
20641 p1 := v_0.Args[0]
20642 if v_1.Op != OpOffPtr {
20643 continue
20644 }
20645 o2 := auxIntToInt64(v_1.AuxInt)
20646 p2 := v_1.Args[0]
20647 if !(isSamePtr(p1, p2)) {
20648 continue
20649 }
20650 v.reset(OpConstBool)
20651 v.AuxInt = boolToAuxInt(o1 != o2)
20652 return true
20653 }
20654 break
20655 }
20656
20657
20658 for {
20659 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20660 if v_0.Op != OpConst32 {
20661 continue
20662 }
20663 c := auxIntToInt32(v_0.AuxInt)
20664 if v_1.Op != OpConst32 {
20665 continue
20666 }
20667 d := auxIntToInt32(v_1.AuxInt)
20668 v.reset(OpConstBool)
20669 v.AuxInt = boolToAuxInt(c != d)
20670 return true
20671 }
20672 break
20673 }
20674
20675
20676 for {
20677 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20678 if v_0.Op != OpConst64 {
20679 continue
20680 }
20681 c := auxIntToInt64(v_0.AuxInt)
20682 if v_1.Op != OpConst64 {
20683 continue
20684 }
20685 d := auxIntToInt64(v_1.AuxInt)
20686 v.reset(OpConstBool)
20687 v.AuxInt = boolToAuxInt(c != d)
20688 return true
20689 }
20690 break
20691 }
20692
20693
20694 for {
20695 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20696 if v_0.Op != OpConvert {
20697 continue
20698 }
20699 v_0_0 := v_0.Args[0]
20700 if v_0_0.Op != OpAddr {
20701 continue
20702 }
20703 x := auxToSym(v_0_0.Aux)
20704 if v_1.Op != OpAddr {
20705 continue
20706 }
20707 y := auxToSym(v_1.Aux)
20708 v.reset(OpConstBool)
20709 v.AuxInt = boolToAuxInt(x != y)
20710 return true
20711 }
20712 break
20713 }
20714
20715
20716 for {
20717 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20718 if v_0.Op != OpLocalAddr || v_1.Op != OpAddr {
20719 continue
20720 }
20721 v.reset(OpConstBool)
20722 v.AuxInt = boolToAuxInt(true)
20723 return true
20724 }
20725 break
20726 }
20727
20728
20729 for {
20730 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20731 if v_0.Op != OpOffPtr {
20732 continue
20733 }
20734 v_0_0 := v_0.Args[0]
20735 if v_0_0.Op != OpLocalAddr || v_1.Op != OpAddr {
20736 continue
20737 }
20738 v.reset(OpConstBool)
20739 v.AuxInt = boolToAuxInt(true)
20740 return true
20741 }
20742 break
20743 }
20744
20745
20746 for {
20747 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20748 if v_0.Op != OpLocalAddr || v_1.Op != OpOffPtr {
20749 continue
20750 }
20751 v_1_0 := v_1.Args[0]
20752 if v_1_0.Op != OpAddr {
20753 continue
20754 }
20755 v.reset(OpConstBool)
20756 v.AuxInt = boolToAuxInt(true)
20757 return true
20758 }
20759 break
20760 }
20761
20762
20763 for {
20764 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20765 if v_0.Op != OpOffPtr {
20766 continue
20767 }
20768 v_0_0 := v_0.Args[0]
20769 if v_0_0.Op != OpLocalAddr || v_1.Op != OpOffPtr {
20770 continue
20771 }
20772 v_1_0 := v_1.Args[0]
20773 if v_1_0.Op != OpAddr {
20774 continue
20775 }
20776 v.reset(OpConstBool)
20777 v.AuxInt = boolToAuxInt(true)
20778 return true
20779 }
20780 break
20781 }
20782
20783
20784
20785 for {
20786 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20787 if v_0.Op != OpAddPtr {
20788 continue
20789 }
20790 o1 := v_0.Args[1]
20791 p1 := v_0.Args[0]
20792 p2 := v_1
20793 if !(isSamePtr(p1, p2)) {
20794 continue
20795 }
20796 v.reset(OpIsNonNil)
20797 v.AddArg(o1)
20798 return true
20799 }
20800 break
20801 }
20802
20803
20804 for {
20805 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20806 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
20807 continue
20808 }
20809 p := v_1
20810 v.reset(OpIsNonNil)
20811 v.AddArg(p)
20812 return true
20813 }
20814 break
20815 }
20816
20817
20818 for {
20819 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20820 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
20821 continue
20822 }
20823 p := v_1
20824 v.reset(OpIsNonNil)
20825 v.AddArg(p)
20826 return true
20827 }
20828 break
20829 }
20830
20831
20832 for {
20833 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20834 if v_0.Op != OpConstNil {
20835 continue
20836 }
20837 p := v_1
20838 v.reset(OpIsNonNil)
20839 v.AddArg(p)
20840 return true
20841 }
20842 break
20843 }
20844 return false
20845 }
20846 func rewriteValuegeneric_OpNeqSlice(v *Value) bool {
20847 v_1 := v.Args[1]
20848 v_0 := v.Args[0]
20849 b := v.Block
20850 typ := &b.Func.Config.Types
20851
20852
20853 for {
20854 x := v_0
20855 y := v_1
20856 v.reset(OpNeqPtr)
20857 v0 := b.NewValue0(v.Pos, OpSlicePtr, typ.BytePtr)
20858 v0.AddArg(x)
20859 v1 := b.NewValue0(v.Pos, OpSlicePtr, typ.BytePtr)
20860 v1.AddArg(y)
20861 v.AddArg2(v0, v1)
20862 return true
20863 }
20864 }
20865 func rewriteValuegeneric_OpNilCheck(v *Value) bool {
20866 v_1 := v.Args[1]
20867 v_0 := v.Args[0]
20868 b := v.Block
20869 fe := b.Func.fe
20870
20871
20872 for {
20873 ptr := v_0
20874 if ptr.Op != OpGetG {
20875 break
20876 }
20877 mem := ptr.Args[0]
20878 if mem != v_1 {
20879 break
20880 }
20881 v.copyOf(ptr)
20882 return true
20883 }
20884
20885
20886
20887 for {
20888 ptr := v_0
20889 if ptr.Op != OpSelectN || auxIntToInt64(ptr.AuxInt) != 0 {
20890 break
20891 }
20892 call := ptr.Args[0]
20893 if call.Op != OpStaticLECall || len(call.Args) != 2 || !(isSameCall(call.Aux, "runtime.newobject") && warnRule(fe.Debug_checknil(), v, "removed nil check")) {
20894 break
20895 }
20896 v.copyOf(ptr)
20897 return true
20898 }
20899
20900
20901
20902 for {
20903 ptr := v_0
20904 if ptr.Op != OpOffPtr {
20905 break
20906 }
20907 ptr_0 := ptr.Args[0]
20908 if ptr_0.Op != OpSelectN || auxIntToInt64(ptr_0.AuxInt) != 0 {
20909 break
20910 }
20911 call := ptr_0.Args[0]
20912 if call.Op != OpStaticLECall || len(call.Args) != 2 || !(isSameCall(call.Aux, "runtime.newobject") && warnRule(fe.Debug_checknil(), v, "removed nil check")) {
20913 break
20914 }
20915 v.copyOf(ptr)
20916 return true
20917 }
20918
20919
20920 for {
20921 ptr := v_0
20922 if ptr.Op != OpAddr {
20923 break
20924 }
20925 ptr_0 := ptr.Args[0]
20926 if ptr_0.Op != OpSB {
20927 break
20928 }
20929 v.copyOf(ptr)
20930 return true
20931 }
20932
20933
20934 for {
20935 ptr := v_0
20936 if ptr.Op != OpConvert {
20937 break
20938 }
20939 ptr_0 := ptr.Args[0]
20940 if ptr_0.Op != OpAddr {
20941 break
20942 }
20943 ptr_0_0 := ptr_0.Args[0]
20944 if ptr_0_0.Op != OpSB {
20945 break
20946 }
20947 v.copyOf(ptr)
20948 return true
20949 }
20950
20951
20952
20953 for {
20954 ptr := v_0
20955 if ptr.Op != OpLocalAddr || !(warnRule(fe.Debug_checknil(), v, "removed nil check")) {
20956 break
20957 }
20958 v.copyOf(ptr)
20959 return true
20960 }
20961
20962
20963 for {
20964 ptr := v_0
20965 if ptr.Op != OpNilCheck {
20966 break
20967 }
20968 v.copyOf(ptr)
20969 return true
20970 }
20971 return false
20972 }
20973 func rewriteValuegeneric_OpNot(v *Value) bool {
20974 v_0 := v.Args[0]
20975
20976
20977 for {
20978 if v_0.Op != OpConstBool {
20979 break
20980 }
20981 c := auxIntToBool(v_0.AuxInt)
20982 v.reset(OpConstBool)
20983 v.AuxInt = boolToAuxInt(!c)
20984 return true
20985 }
20986
20987
20988 for {
20989 if v_0.Op != OpEq64 {
20990 break
20991 }
20992 y := v_0.Args[1]
20993 x := v_0.Args[0]
20994 v.reset(OpNeq64)
20995 v.AddArg2(x, y)
20996 return true
20997 }
20998
20999
21000 for {
21001 if v_0.Op != OpEq32 {
21002 break
21003 }
21004 y := v_0.Args[1]
21005 x := v_0.Args[0]
21006 v.reset(OpNeq32)
21007 v.AddArg2(x, y)
21008 return true
21009 }
21010
21011
21012 for {
21013 if v_0.Op != OpEq16 {
21014 break
21015 }
21016 y := v_0.Args[1]
21017 x := v_0.Args[0]
21018 v.reset(OpNeq16)
21019 v.AddArg2(x, y)
21020 return true
21021 }
21022
21023
21024 for {
21025 if v_0.Op != OpEq8 {
21026 break
21027 }
21028 y := v_0.Args[1]
21029 x := v_0.Args[0]
21030 v.reset(OpNeq8)
21031 v.AddArg2(x, y)
21032 return true
21033 }
21034
21035
21036 for {
21037 if v_0.Op != OpEqB {
21038 break
21039 }
21040 y := v_0.Args[1]
21041 x := v_0.Args[0]
21042 v.reset(OpNeqB)
21043 v.AddArg2(x, y)
21044 return true
21045 }
21046
21047
21048 for {
21049 if v_0.Op != OpEqPtr {
21050 break
21051 }
21052 y := v_0.Args[1]
21053 x := v_0.Args[0]
21054 v.reset(OpNeqPtr)
21055 v.AddArg2(x, y)
21056 return true
21057 }
21058
21059
21060 for {
21061 if v_0.Op != OpEq64F {
21062 break
21063 }
21064 y := v_0.Args[1]
21065 x := v_0.Args[0]
21066 v.reset(OpNeq64F)
21067 v.AddArg2(x, y)
21068 return true
21069 }
21070
21071
21072 for {
21073 if v_0.Op != OpEq32F {
21074 break
21075 }
21076 y := v_0.Args[1]
21077 x := v_0.Args[0]
21078 v.reset(OpNeq32F)
21079 v.AddArg2(x, y)
21080 return true
21081 }
21082
21083
21084 for {
21085 if v_0.Op != OpNeq64 {
21086 break
21087 }
21088 y := v_0.Args[1]
21089 x := v_0.Args[0]
21090 v.reset(OpEq64)
21091 v.AddArg2(x, y)
21092 return true
21093 }
21094
21095
21096 for {
21097 if v_0.Op != OpNeq32 {
21098 break
21099 }
21100 y := v_0.Args[1]
21101 x := v_0.Args[0]
21102 v.reset(OpEq32)
21103 v.AddArg2(x, y)
21104 return true
21105 }
21106
21107
21108 for {
21109 if v_0.Op != OpNeq16 {
21110 break
21111 }
21112 y := v_0.Args[1]
21113 x := v_0.Args[0]
21114 v.reset(OpEq16)
21115 v.AddArg2(x, y)
21116 return true
21117 }
21118
21119
21120 for {
21121 if v_0.Op != OpNeq8 {
21122 break
21123 }
21124 y := v_0.Args[1]
21125 x := v_0.Args[0]
21126 v.reset(OpEq8)
21127 v.AddArg2(x, y)
21128 return true
21129 }
21130
21131
21132 for {
21133 if v_0.Op != OpNeqB {
21134 break
21135 }
21136 y := v_0.Args[1]
21137 x := v_0.Args[0]
21138 v.reset(OpEqB)
21139 v.AddArg2(x, y)
21140 return true
21141 }
21142
21143
21144 for {
21145 if v_0.Op != OpNeqPtr {
21146 break
21147 }
21148 y := v_0.Args[1]
21149 x := v_0.Args[0]
21150 v.reset(OpEqPtr)
21151 v.AddArg2(x, y)
21152 return true
21153 }
21154
21155
21156 for {
21157 if v_0.Op != OpNeq64F {
21158 break
21159 }
21160 y := v_0.Args[1]
21161 x := v_0.Args[0]
21162 v.reset(OpEq64F)
21163 v.AddArg2(x, y)
21164 return true
21165 }
21166
21167
21168 for {
21169 if v_0.Op != OpNeq32F {
21170 break
21171 }
21172 y := v_0.Args[1]
21173 x := v_0.Args[0]
21174 v.reset(OpEq32F)
21175 v.AddArg2(x, y)
21176 return true
21177 }
21178
21179
21180 for {
21181 if v_0.Op != OpLess64 {
21182 break
21183 }
21184 y := v_0.Args[1]
21185 x := v_0.Args[0]
21186 v.reset(OpLeq64)
21187 v.AddArg2(y, x)
21188 return true
21189 }
21190
21191
21192 for {
21193 if v_0.Op != OpLess32 {
21194 break
21195 }
21196 y := v_0.Args[1]
21197 x := v_0.Args[0]
21198 v.reset(OpLeq32)
21199 v.AddArg2(y, x)
21200 return true
21201 }
21202
21203
21204 for {
21205 if v_0.Op != OpLess16 {
21206 break
21207 }
21208 y := v_0.Args[1]
21209 x := v_0.Args[0]
21210 v.reset(OpLeq16)
21211 v.AddArg2(y, x)
21212 return true
21213 }
21214
21215
21216 for {
21217 if v_0.Op != OpLess8 {
21218 break
21219 }
21220 y := v_0.Args[1]
21221 x := v_0.Args[0]
21222 v.reset(OpLeq8)
21223 v.AddArg2(y, x)
21224 return true
21225 }
21226
21227
21228 for {
21229 if v_0.Op != OpLess64U {
21230 break
21231 }
21232 y := v_0.Args[1]
21233 x := v_0.Args[0]
21234 v.reset(OpLeq64U)
21235 v.AddArg2(y, x)
21236 return true
21237 }
21238
21239
21240 for {
21241 if v_0.Op != OpLess32U {
21242 break
21243 }
21244 y := v_0.Args[1]
21245 x := v_0.Args[0]
21246 v.reset(OpLeq32U)
21247 v.AddArg2(y, x)
21248 return true
21249 }
21250
21251
21252 for {
21253 if v_0.Op != OpLess16U {
21254 break
21255 }
21256 y := v_0.Args[1]
21257 x := v_0.Args[0]
21258 v.reset(OpLeq16U)
21259 v.AddArg2(y, x)
21260 return true
21261 }
21262
21263
21264 for {
21265 if v_0.Op != OpLess8U {
21266 break
21267 }
21268 y := v_0.Args[1]
21269 x := v_0.Args[0]
21270 v.reset(OpLeq8U)
21271 v.AddArg2(y, x)
21272 return true
21273 }
21274
21275
21276 for {
21277 if v_0.Op != OpLeq64 {
21278 break
21279 }
21280 y := v_0.Args[1]
21281 x := v_0.Args[0]
21282 v.reset(OpLess64)
21283 v.AddArg2(y, x)
21284 return true
21285 }
21286
21287
21288 for {
21289 if v_0.Op != OpLeq32 {
21290 break
21291 }
21292 y := v_0.Args[1]
21293 x := v_0.Args[0]
21294 v.reset(OpLess32)
21295 v.AddArg2(y, x)
21296 return true
21297 }
21298
21299
21300 for {
21301 if v_0.Op != OpLeq16 {
21302 break
21303 }
21304 y := v_0.Args[1]
21305 x := v_0.Args[0]
21306 v.reset(OpLess16)
21307 v.AddArg2(y, x)
21308 return true
21309 }
21310
21311
21312 for {
21313 if v_0.Op != OpLeq8 {
21314 break
21315 }
21316 y := v_0.Args[1]
21317 x := v_0.Args[0]
21318 v.reset(OpLess8)
21319 v.AddArg2(y, x)
21320 return true
21321 }
21322
21323
21324 for {
21325 if v_0.Op != OpLeq64U {
21326 break
21327 }
21328 y := v_0.Args[1]
21329 x := v_0.Args[0]
21330 v.reset(OpLess64U)
21331 v.AddArg2(y, x)
21332 return true
21333 }
21334
21335
21336 for {
21337 if v_0.Op != OpLeq32U {
21338 break
21339 }
21340 y := v_0.Args[1]
21341 x := v_0.Args[0]
21342 v.reset(OpLess32U)
21343 v.AddArg2(y, x)
21344 return true
21345 }
21346
21347
21348 for {
21349 if v_0.Op != OpLeq16U {
21350 break
21351 }
21352 y := v_0.Args[1]
21353 x := v_0.Args[0]
21354 v.reset(OpLess16U)
21355 v.AddArg2(y, x)
21356 return true
21357 }
21358
21359
21360 for {
21361 if v_0.Op != OpLeq8U {
21362 break
21363 }
21364 y := v_0.Args[1]
21365 x := v_0.Args[0]
21366 v.reset(OpLess8U)
21367 v.AddArg2(y, x)
21368 return true
21369 }
21370 return false
21371 }
21372 func rewriteValuegeneric_OpOffPtr(v *Value) bool {
21373 v_0 := v.Args[0]
21374
21375
21376 for {
21377 x := auxIntToInt64(v.AuxInt)
21378 if v_0.Op != OpOffPtr {
21379 break
21380 }
21381 y := auxIntToInt64(v_0.AuxInt)
21382 p := v_0.Args[0]
21383 v.reset(OpOffPtr)
21384 v.AuxInt = int64ToAuxInt(x + y)
21385 v.AddArg(p)
21386 return true
21387 }
21388
21389
21390
21391 for {
21392 if auxIntToInt64(v.AuxInt) != 0 {
21393 break
21394 }
21395 p := v_0
21396 if !(v.Type.Compare(p.Type) == types.CMPeq) {
21397 break
21398 }
21399 v.copyOf(p)
21400 return true
21401 }
21402 return false
21403 }
21404 func rewriteValuegeneric_OpOr16(v *Value) bool {
21405 v_1 := v.Args[1]
21406 v_0 := v.Args[0]
21407 b := v.Block
21408 config := b.Func.Config
21409
21410
21411 for {
21412 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
21413 if v_0.Op != OpConst16 {
21414 continue
21415 }
21416 c := auxIntToInt16(v_0.AuxInt)
21417 if v_1.Op != OpConst16 {
21418 continue
21419 }
21420 d := auxIntToInt16(v_1.AuxInt)
21421 v.reset(OpConst16)
21422 v.AuxInt = int16ToAuxInt(c | d)
21423 return true
21424 }
21425 break
21426 }
21427
21428
21429 for {
21430 t := v.Type
21431 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
21432 if v_0.Op != OpCom16 {
21433 continue
21434 }
21435 x := v_0.Args[0]
21436 if v_1.Op != OpCom16 {
21437 continue
21438 }
21439 y := v_1.Args[0]
21440 v.reset(OpCom16)
21441 v0 := b.NewValue0(v.Pos, OpAnd16, t)
21442 v0.AddArg2(x, y)
21443 v.AddArg(v0)
21444 return true
21445 }
21446 break
21447 }
21448
21449
21450 for {
21451 x := v_0
21452 if x != v_1 {
21453 break
21454 }
21455 v.copyOf(x)
21456 return true
21457 }
21458
21459
21460 for {
21461 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
21462 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 {
21463 continue
21464 }
21465 x := v_1
21466 v.copyOf(x)
21467 return true
21468 }
21469 break
21470 }
21471
21472
21473 for {
21474 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
21475 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != -1 {
21476 continue
21477 }
21478 v.reset(OpConst16)
21479 v.AuxInt = int16ToAuxInt(-1)
21480 return true
21481 }
21482 break
21483 }
21484
21485
21486 for {
21487 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
21488 if v_0.Op != OpCom16 {
21489 continue
21490 }
21491 x := v_0.Args[0]
21492 if x != v_1 {
21493 continue
21494 }
21495 v.reset(OpConst16)
21496 v.AuxInt = int16ToAuxInt(-1)
21497 return true
21498 }
21499 break
21500 }
21501
21502
21503 for {
21504 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
21505 x := v_0
21506 if v_1.Op != OpOr16 {
21507 continue
21508 }
21509 _ = v_1.Args[1]
21510 v_1_0 := v_1.Args[0]
21511 v_1_1 := v_1.Args[1]
21512 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
21513 if x != v_1_0 {
21514 continue
21515 }
21516 y := v_1_1
21517 v.reset(OpOr16)
21518 v.AddArg2(x, y)
21519 return true
21520 }
21521 }
21522 break
21523 }
21524
21525
21526
21527 for {
21528 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
21529 if v_0.Op != OpAnd16 {
21530 continue
21531 }
21532 _ = v_0.Args[1]
21533 v_0_0 := v_0.Args[0]
21534 v_0_1 := v_0.Args[1]
21535 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
21536 x := v_0_0
21537 if v_0_1.Op != OpConst16 {
21538 continue
21539 }
21540 c2 := auxIntToInt16(v_0_1.AuxInt)
21541 if v_1.Op != OpConst16 {
21542 continue
21543 }
21544 t := v_1.Type
21545 c1 := auxIntToInt16(v_1.AuxInt)
21546 if !(^(c1 | c2) == 0) {
21547 continue
21548 }
21549 v.reset(OpOr16)
21550 v0 := b.NewValue0(v.Pos, OpConst16, t)
21551 v0.AuxInt = int16ToAuxInt(c1)
21552 v.AddArg2(v0, x)
21553 return true
21554 }
21555 }
21556 break
21557 }
21558
21559
21560
21561 for {
21562 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
21563 if v_0.Op != OpOr16 {
21564 continue
21565 }
21566 _ = v_0.Args[1]
21567 v_0_0 := v_0.Args[0]
21568 v_0_1 := v_0.Args[1]
21569 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
21570 i := v_0_0
21571 if i.Op != OpConst16 {
21572 continue
21573 }
21574 t := i.Type
21575 z := v_0_1
21576 x := v_1
21577 if !(z.Op != OpConst16 && x.Op != OpConst16) {
21578 continue
21579 }
21580 v.reset(OpOr16)
21581 v0 := b.NewValue0(v.Pos, OpOr16, t)
21582 v0.AddArg2(z, x)
21583 v.AddArg2(i, v0)
21584 return true
21585 }
21586 }
21587 break
21588 }
21589
21590
21591 for {
21592 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
21593 if v_0.Op != OpConst16 {
21594 continue
21595 }
21596 t := v_0.Type
21597 c := auxIntToInt16(v_0.AuxInt)
21598 if v_1.Op != OpOr16 {
21599 continue
21600 }
21601 _ = v_1.Args[1]
21602 v_1_0 := v_1.Args[0]
21603 v_1_1 := v_1.Args[1]
21604 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
21605 if v_1_0.Op != OpConst16 || v_1_0.Type != t {
21606 continue
21607 }
21608 d := auxIntToInt16(v_1_0.AuxInt)
21609 x := v_1_1
21610 v.reset(OpOr16)
21611 v0 := b.NewValue0(v.Pos, OpConst16, t)
21612 v0.AuxInt = int16ToAuxInt(c | d)
21613 v.AddArg2(v0, x)
21614 return true
21615 }
21616 }
21617 break
21618 }
21619
21620
21621
21622 for {
21623 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
21624 if v_0.Op != OpLsh16x64 {
21625 continue
21626 }
21627 _ = v_0.Args[1]
21628 x := v_0.Args[0]
21629 z := v_0.Args[1]
21630 if z.Op != OpConst64 {
21631 continue
21632 }
21633 c := auxIntToInt64(z.AuxInt)
21634 if v_1.Op != OpRsh16Ux64 {
21635 continue
21636 }
21637 _ = v_1.Args[1]
21638 if x != v_1.Args[0] {
21639 continue
21640 }
21641 v_1_1 := v_1.Args[1]
21642 if v_1_1.Op != OpConst64 {
21643 continue
21644 }
21645 d := auxIntToInt64(v_1_1.AuxInt)
21646 if !(c < 16 && d == 16-c && canRotate(config, 16)) {
21647 continue
21648 }
21649 v.reset(OpRotateLeft16)
21650 v.AddArg2(x, z)
21651 return true
21652 }
21653 break
21654 }
21655
21656
21657
21658 for {
21659 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
21660 left := v_0
21661 if left.Op != OpLsh16x64 {
21662 continue
21663 }
21664 y := left.Args[1]
21665 x := left.Args[0]
21666 right := v_1
21667 if right.Op != OpRsh16Ux64 {
21668 continue
21669 }
21670 _ = right.Args[1]
21671 if x != right.Args[0] {
21672 continue
21673 }
21674 right_1 := right.Args[1]
21675 if right_1.Op != OpSub64 {
21676 continue
21677 }
21678 _ = right_1.Args[1]
21679 right_1_0 := right_1.Args[0]
21680 if right_1_0.Op != OpConst64 || auxIntToInt64(right_1_0.AuxInt) != 16 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 16)) {
21681 continue
21682 }
21683 v.reset(OpRotateLeft16)
21684 v.AddArg2(x, y)
21685 return true
21686 }
21687 break
21688 }
21689
21690
21691
21692 for {
21693 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
21694 left := v_0
21695 if left.Op != OpLsh16x32 {
21696 continue
21697 }
21698 y := left.Args[1]
21699 x := left.Args[0]
21700 right := v_1
21701 if right.Op != OpRsh16Ux32 {
21702 continue
21703 }
21704 _ = right.Args[1]
21705 if x != right.Args[0] {
21706 continue
21707 }
21708 right_1 := right.Args[1]
21709 if right_1.Op != OpSub32 {
21710 continue
21711 }
21712 _ = right_1.Args[1]
21713 right_1_0 := right_1.Args[0]
21714 if right_1_0.Op != OpConst32 || auxIntToInt32(right_1_0.AuxInt) != 16 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 16)) {
21715 continue
21716 }
21717 v.reset(OpRotateLeft16)
21718 v.AddArg2(x, y)
21719 return true
21720 }
21721 break
21722 }
21723
21724
21725
21726 for {
21727 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
21728 left := v_0
21729 if left.Op != OpLsh16x16 {
21730 continue
21731 }
21732 y := left.Args[1]
21733 x := left.Args[0]
21734 right := v_1
21735 if right.Op != OpRsh16Ux16 {
21736 continue
21737 }
21738 _ = right.Args[1]
21739 if x != right.Args[0] {
21740 continue
21741 }
21742 right_1 := right.Args[1]
21743 if right_1.Op != OpSub16 {
21744 continue
21745 }
21746 _ = right_1.Args[1]
21747 right_1_0 := right_1.Args[0]
21748 if right_1_0.Op != OpConst16 || auxIntToInt16(right_1_0.AuxInt) != 16 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 16)) {
21749 continue
21750 }
21751 v.reset(OpRotateLeft16)
21752 v.AddArg2(x, y)
21753 return true
21754 }
21755 break
21756 }
21757
21758
21759
21760 for {
21761 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
21762 left := v_0
21763 if left.Op != OpLsh16x8 {
21764 continue
21765 }
21766 y := left.Args[1]
21767 x := left.Args[0]
21768 right := v_1
21769 if right.Op != OpRsh16Ux8 {
21770 continue
21771 }
21772 _ = right.Args[1]
21773 if x != right.Args[0] {
21774 continue
21775 }
21776 right_1 := right.Args[1]
21777 if right_1.Op != OpSub8 {
21778 continue
21779 }
21780 _ = right_1.Args[1]
21781 right_1_0 := right_1.Args[0]
21782 if right_1_0.Op != OpConst8 || auxIntToInt8(right_1_0.AuxInt) != 16 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 16)) {
21783 continue
21784 }
21785 v.reset(OpRotateLeft16)
21786 v.AddArg2(x, y)
21787 return true
21788 }
21789 break
21790 }
21791
21792
21793
21794 for {
21795 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
21796 right := v_0
21797 if right.Op != OpRsh16Ux64 {
21798 continue
21799 }
21800 y := right.Args[1]
21801 x := right.Args[0]
21802 left := v_1
21803 if left.Op != OpLsh16x64 {
21804 continue
21805 }
21806 _ = left.Args[1]
21807 if x != left.Args[0] {
21808 continue
21809 }
21810 z := left.Args[1]
21811 if z.Op != OpSub64 {
21812 continue
21813 }
21814 _ = z.Args[1]
21815 z_0 := z.Args[0]
21816 if z_0.Op != OpConst64 || auxIntToInt64(z_0.AuxInt) != 16 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 16)) {
21817 continue
21818 }
21819 v.reset(OpRotateLeft16)
21820 v.AddArg2(x, z)
21821 return true
21822 }
21823 break
21824 }
21825
21826
21827
21828 for {
21829 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
21830 right := v_0
21831 if right.Op != OpRsh16Ux32 {
21832 continue
21833 }
21834 y := right.Args[1]
21835 x := right.Args[0]
21836 left := v_1
21837 if left.Op != OpLsh16x32 {
21838 continue
21839 }
21840 _ = left.Args[1]
21841 if x != left.Args[0] {
21842 continue
21843 }
21844 z := left.Args[1]
21845 if z.Op != OpSub32 {
21846 continue
21847 }
21848 _ = z.Args[1]
21849 z_0 := z.Args[0]
21850 if z_0.Op != OpConst32 || auxIntToInt32(z_0.AuxInt) != 16 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 16)) {
21851 continue
21852 }
21853 v.reset(OpRotateLeft16)
21854 v.AddArg2(x, z)
21855 return true
21856 }
21857 break
21858 }
21859
21860
21861
21862 for {
21863 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
21864 right := v_0
21865 if right.Op != OpRsh16Ux16 {
21866 continue
21867 }
21868 y := right.Args[1]
21869 x := right.Args[0]
21870 left := v_1
21871 if left.Op != OpLsh16x16 {
21872 continue
21873 }
21874 _ = left.Args[1]
21875 if x != left.Args[0] {
21876 continue
21877 }
21878 z := left.Args[1]
21879 if z.Op != OpSub16 {
21880 continue
21881 }
21882 _ = z.Args[1]
21883 z_0 := z.Args[0]
21884 if z_0.Op != OpConst16 || auxIntToInt16(z_0.AuxInt) != 16 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 16)) {
21885 continue
21886 }
21887 v.reset(OpRotateLeft16)
21888 v.AddArg2(x, z)
21889 return true
21890 }
21891 break
21892 }
21893
21894
21895
21896 for {
21897 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
21898 right := v_0
21899 if right.Op != OpRsh16Ux8 {
21900 continue
21901 }
21902 y := right.Args[1]
21903 x := right.Args[0]
21904 left := v_1
21905 if left.Op != OpLsh16x8 {
21906 continue
21907 }
21908 _ = left.Args[1]
21909 if x != left.Args[0] {
21910 continue
21911 }
21912 z := left.Args[1]
21913 if z.Op != OpSub8 {
21914 continue
21915 }
21916 _ = z.Args[1]
21917 z_0 := z.Args[0]
21918 if z_0.Op != OpConst8 || auxIntToInt8(z_0.AuxInt) != 16 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 16)) {
21919 continue
21920 }
21921 v.reset(OpRotateLeft16)
21922 v.AddArg2(x, z)
21923 return true
21924 }
21925 break
21926 }
21927 return false
21928 }
21929 func rewriteValuegeneric_OpOr32(v *Value) bool {
21930 v_1 := v.Args[1]
21931 v_0 := v.Args[0]
21932 b := v.Block
21933 config := b.Func.Config
21934
21935
21936 for {
21937 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
21938 if v_0.Op != OpConst32 {
21939 continue
21940 }
21941 c := auxIntToInt32(v_0.AuxInt)
21942 if v_1.Op != OpConst32 {
21943 continue
21944 }
21945 d := auxIntToInt32(v_1.AuxInt)
21946 v.reset(OpConst32)
21947 v.AuxInt = int32ToAuxInt(c | d)
21948 return true
21949 }
21950 break
21951 }
21952
21953
21954 for {
21955 t := v.Type
21956 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
21957 if v_0.Op != OpCom32 {
21958 continue
21959 }
21960 x := v_0.Args[0]
21961 if v_1.Op != OpCom32 {
21962 continue
21963 }
21964 y := v_1.Args[0]
21965 v.reset(OpCom32)
21966 v0 := b.NewValue0(v.Pos, OpAnd32, t)
21967 v0.AddArg2(x, y)
21968 v.AddArg(v0)
21969 return true
21970 }
21971 break
21972 }
21973
21974
21975 for {
21976 x := v_0
21977 if x != v_1 {
21978 break
21979 }
21980 v.copyOf(x)
21981 return true
21982 }
21983
21984
21985 for {
21986 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
21987 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
21988 continue
21989 }
21990 x := v_1
21991 v.copyOf(x)
21992 return true
21993 }
21994 break
21995 }
21996
21997
21998 for {
21999 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22000 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != -1 {
22001 continue
22002 }
22003 v.reset(OpConst32)
22004 v.AuxInt = int32ToAuxInt(-1)
22005 return true
22006 }
22007 break
22008 }
22009
22010
22011 for {
22012 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22013 if v_0.Op != OpCom32 {
22014 continue
22015 }
22016 x := v_0.Args[0]
22017 if x != v_1 {
22018 continue
22019 }
22020 v.reset(OpConst32)
22021 v.AuxInt = int32ToAuxInt(-1)
22022 return true
22023 }
22024 break
22025 }
22026
22027
22028 for {
22029 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22030 x := v_0
22031 if v_1.Op != OpOr32 {
22032 continue
22033 }
22034 _ = v_1.Args[1]
22035 v_1_0 := v_1.Args[0]
22036 v_1_1 := v_1.Args[1]
22037 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
22038 if x != v_1_0 {
22039 continue
22040 }
22041 y := v_1_1
22042 v.reset(OpOr32)
22043 v.AddArg2(x, y)
22044 return true
22045 }
22046 }
22047 break
22048 }
22049
22050
22051
22052 for {
22053 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22054 if v_0.Op != OpAnd32 {
22055 continue
22056 }
22057 _ = v_0.Args[1]
22058 v_0_0 := v_0.Args[0]
22059 v_0_1 := v_0.Args[1]
22060 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
22061 x := v_0_0
22062 if v_0_1.Op != OpConst32 {
22063 continue
22064 }
22065 c2 := auxIntToInt32(v_0_1.AuxInt)
22066 if v_1.Op != OpConst32 {
22067 continue
22068 }
22069 t := v_1.Type
22070 c1 := auxIntToInt32(v_1.AuxInt)
22071 if !(^(c1 | c2) == 0) {
22072 continue
22073 }
22074 v.reset(OpOr32)
22075 v0 := b.NewValue0(v.Pos, OpConst32, t)
22076 v0.AuxInt = int32ToAuxInt(c1)
22077 v.AddArg2(v0, x)
22078 return true
22079 }
22080 }
22081 break
22082 }
22083
22084
22085
22086 for {
22087 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22088 if v_0.Op != OpOr32 {
22089 continue
22090 }
22091 _ = v_0.Args[1]
22092 v_0_0 := v_0.Args[0]
22093 v_0_1 := v_0.Args[1]
22094 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
22095 i := v_0_0
22096 if i.Op != OpConst32 {
22097 continue
22098 }
22099 t := i.Type
22100 z := v_0_1
22101 x := v_1
22102 if !(z.Op != OpConst32 && x.Op != OpConst32) {
22103 continue
22104 }
22105 v.reset(OpOr32)
22106 v0 := b.NewValue0(v.Pos, OpOr32, t)
22107 v0.AddArg2(z, x)
22108 v.AddArg2(i, v0)
22109 return true
22110 }
22111 }
22112 break
22113 }
22114
22115
22116 for {
22117 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22118 if v_0.Op != OpConst32 {
22119 continue
22120 }
22121 t := v_0.Type
22122 c := auxIntToInt32(v_0.AuxInt)
22123 if v_1.Op != OpOr32 {
22124 continue
22125 }
22126 _ = v_1.Args[1]
22127 v_1_0 := v_1.Args[0]
22128 v_1_1 := v_1.Args[1]
22129 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
22130 if v_1_0.Op != OpConst32 || v_1_0.Type != t {
22131 continue
22132 }
22133 d := auxIntToInt32(v_1_0.AuxInt)
22134 x := v_1_1
22135 v.reset(OpOr32)
22136 v0 := b.NewValue0(v.Pos, OpConst32, t)
22137 v0.AuxInt = int32ToAuxInt(c | d)
22138 v.AddArg2(v0, x)
22139 return true
22140 }
22141 }
22142 break
22143 }
22144
22145
22146
22147 for {
22148 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22149 if v_0.Op != OpLsh32x64 {
22150 continue
22151 }
22152 _ = v_0.Args[1]
22153 x := v_0.Args[0]
22154 z := v_0.Args[1]
22155 if z.Op != OpConst64 {
22156 continue
22157 }
22158 c := auxIntToInt64(z.AuxInt)
22159 if v_1.Op != OpRsh32Ux64 {
22160 continue
22161 }
22162 _ = v_1.Args[1]
22163 if x != v_1.Args[0] {
22164 continue
22165 }
22166 v_1_1 := v_1.Args[1]
22167 if v_1_1.Op != OpConst64 {
22168 continue
22169 }
22170 d := auxIntToInt64(v_1_1.AuxInt)
22171 if !(c < 32 && d == 32-c && canRotate(config, 32)) {
22172 continue
22173 }
22174 v.reset(OpRotateLeft32)
22175 v.AddArg2(x, z)
22176 return true
22177 }
22178 break
22179 }
22180
22181
22182
22183 for {
22184 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22185 left := v_0
22186 if left.Op != OpLsh32x64 {
22187 continue
22188 }
22189 y := left.Args[1]
22190 x := left.Args[0]
22191 right := v_1
22192 if right.Op != OpRsh32Ux64 {
22193 continue
22194 }
22195 _ = right.Args[1]
22196 if x != right.Args[0] {
22197 continue
22198 }
22199 right_1 := right.Args[1]
22200 if right_1.Op != OpSub64 {
22201 continue
22202 }
22203 _ = right_1.Args[1]
22204 right_1_0 := right_1.Args[0]
22205 if right_1_0.Op != OpConst64 || auxIntToInt64(right_1_0.AuxInt) != 32 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 32)) {
22206 continue
22207 }
22208 v.reset(OpRotateLeft32)
22209 v.AddArg2(x, y)
22210 return true
22211 }
22212 break
22213 }
22214
22215
22216
22217 for {
22218 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22219 left := v_0
22220 if left.Op != OpLsh32x32 {
22221 continue
22222 }
22223 y := left.Args[1]
22224 x := left.Args[0]
22225 right := v_1
22226 if right.Op != OpRsh32Ux32 {
22227 continue
22228 }
22229 _ = right.Args[1]
22230 if x != right.Args[0] {
22231 continue
22232 }
22233 right_1 := right.Args[1]
22234 if right_1.Op != OpSub32 {
22235 continue
22236 }
22237 _ = right_1.Args[1]
22238 right_1_0 := right_1.Args[0]
22239 if right_1_0.Op != OpConst32 || auxIntToInt32(right_1_0.AuxInt) != 32 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 32)) {
22240 continue
22241 }
22242 v.reset(OpRotateLeft32)
22243 v.AddArg2(x, y)
22244 return true
22245 }
22246 break
22247 }
22248
22249
22250
22251 for {
22252 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22253 left := v_0
22254 if left.Op != OpLsh32x16 {
22255 continue
22256 }
22257 y := left.Args[1]
22258 x := left.Args[0]
22259 right := v_1
22260 if right.Op != OpRsh32Ux16 {
22261 continue
22262 }
22263 _ = right.Args[1]
22264 if x != right.Args[0] {
22265 continue
22266 }
22267 right_1 := right.Args[1]
22268 if right_1.Op != OpSub16 {
22269 continue
22270 }
22271 _ = right_1.Args[1]
22272 right_1_0 := right_1.Args[0]
22273 if right_1_0.Op != OpConst16 || auxIntToInt16(right_1_0.AuxInt) != 32 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 32)) {
22274 continue
22275 }
22276 v.reset(OpRotateLeft32)
22277 v.AddArg2(x, y)
22278 return true
22279 }
22280 break
22281 }
22282
22283
22284
22285 for {
22286 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22287 left := v_0
22288 if left.Op != OpLsh32x8 {
22289 continue
22290 }
22291 y := left.Args[1]
22292 x := left.Args[0]
22293 right := v_1
22294 if right.Op != OpRsh32Ux8 {
22295 continue
22296 }
22297 _ = right.Args[1]
22298 if x != right.Args[0] {
22299 continue
22300 }
22301 right_1 := right.Args[1]
22302 if right_1.Op != OpSub8 {
22303 continue
22304 }
22305 _ = right_1.Args[1]
22306 right_1_0 := right_1.Args[0]
22307 if right_1_0.Op != OpConst8 || auxIntToInt8(right_1_0.AuxInt) != 32 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 32)) {
22308 continue
22309 }
22310 v.reset(OpRotateLeft32)
22311 v.AddArg2(x, y)
22312 return true
22313 }
22314 break
22315 }
22316
22317
22318
22319 for {
22320 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22321 right := v_0
22322 if right.Op != OpRsh32Ux64 {
22323 continue
22324 }
22325 y := right.Args[1]
22326 x := right.Args[0]
22327 left := v_1
22328 if left.Op != OpLsh32x64 {
22329 continue
22330 }
22331 _ = left.Args[1]
22332 if x != left.Args[0] {
22333 continue
22334 }
22335 z := left.Args[1]
22336 if z.Op != OpSub64 {
22337 continue
22338 }
22339 _ = z.Args[1]
22340 z_0 := z.Args[0]
22341 if z_0.Op != OpConst64 || auxIntToInt64(z_0.AuxInt) != 32 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 32)) {
22342 continue
22343 }
22344 v.reset(OpRotateLeft32)
22345 v.AddArg2(x, z)
22346 return true
22347 }
22348 break
22349 }
22350
22351
22352
22353 for {
22354 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22355 right := v_0
22356 if right.Op != OpRsh32Ux32 {
22357 continue
22358 }
22359 y := right.Args[1]
22360 x := right.Args[0]
22361 left := v_1
22362 if left.Op != OpLsh32x32 {
22363 continue
22364 }
22365 _ = left.Args[1]
22366 if x != left.Args[0] {
22367 continue
22368 }
22369 z := left.Args[1]
22370 if z.Op != OpSub32 {
22371 continue
22372 }
22373 _ = z.Args[1]
22374 z_0 := z.Args[0]
22375 if z_0.Op != OpConst32 || auxIntToInt32(z_0.AuxInt) != 32 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 32)) {
22376 continue
22377 }
22378 v.reset(OpRotateLeft32)
22379 v.AddArg2(x, z)
22380 return true
22381 }
22382 break
22383 }
22384
22385
22386
22387 for {
22388 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22389 right := v_0
22390 if right.Op != OpRsh32Ux16 {
22391 continue
22392 }
22393 y := right.Args[1]
22394 x := right.Args[0]
22395 left := v_1
22396 if left.Op != OpLsh32x16 {
22397 continue
22398 }
22399 _ = left.Args[1]
22400 if x != left.Args[0] {
22401 continue
22402 }
22403 z := left.Args[1]
22404 if z.Op != OpSub16 {
22405 continue
22406 }
22407 _ = z.Args[1]
22408 z_0 := z.Args[0]
22409 if z_0.Op != OpConst16 || auxIntToInt16(z_0.AuxInt) != 32 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 32)) {
22410 continue
22411 }
22412 v.reset(OpRotateLeft32)
22413 v.AddArg2(x, z)
22414 return true
22415 }
22416 break
22417 }
22418
22419
22420
22421 for {
22422 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22423 right := v_0
22424 if right.Op != OpRsh32Ux8 {
22425 continue
22426 }
22427 y := right.Args[1]
22428 x := right.Args[0]
22429 left := v_1
22430 if left.Op != OpLsh32x8 {
22431 continue
22432 }
22433 _ = left.Args[1]
22434 if x != left.Args[0] {
22435 continue
22436 }
22437 z := left.Args[1]
22438 if z.Op != OpSub8 {
22439 continue
22440 }
22441 _ = z.Args[1]
22442 z_0 := z.Args[0]
22443 if z_0.Op != OpConst8 || auxIntToInt8(z_0.AuxInt) != 32 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 32)) {
22444 continue
22445 }
22446 v.reset(OpRotateLeft32)
22447 v.AddArg2(x, z)
22448 return true
22449 }
22450 break
22451 }
22452 return false
22453 }
22454 func rewriteValuegeneric_OpOr64(v *Value) bool {
22455 v_1 := v.Args[1]
22456 v_0 := v.Args[0]
22457 b := v.Block
22458 config := b.Func.Config
22459
22460
22461 for {
22462 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22463 if v_0.Op != OpConst64 {
22464 continue
22465 }
22466 c := auxIntToInt64(v_0.AuxInt)
22467 if v_1.Op != OpConst64 {
22468 continue
22469 }
22470 d := auxIntToInt64(v_1.AuxInt)
22471 v.reset(OpConst64)
22472 v.AuxInt = int64ToAuxInt(c | d)
22473 return true
22474 }
22475 break
22476 }
22477
22478
22479 for {
22480 t := v.Type
22481 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22482 if v_0.Op != OpCom64 {
22483 continue
22484 }
22485 x := v_0.Args[0]
22486 if v_1.Op != OpCom64 {
22487 continue
22488 }
22489 y := v_1.Args[0]
22490 v.reset(OpCom64)
22491 v0 := b.NewValue0(v.Pos, OpAnd64, t)
22492 v0.AddArg2(x, y)
22493 v.AddArg(v0)
22494 return true
22495 }
22496 break
22497 }
22498
22499
22500 for {
22501 x := v_0
22502 if x != v_1 {
22503 break
22504 }
22505 v.copyOf(x)
22506 return true
22507 }
22508
22509
22510 for {
22511 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22512 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
22513 continue
22514 }
22515 x := v_1
22516 v.copyOf(x)
22517 return true
22518 }
22519 break
22520 }
22521
22522
22523 for {
22524 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22525 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != -1 {
22526 continue
22527 }
22528 v.reset(OpConst64)
22529 v.AuxInt = int64ToAuxInt(-1)
22530 return true
22531 }
22532 break
22533 }
22534
22535
22536 for {
22537 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22538 if v_0.Op != OpCom64 {
22539 continue
22540 }
22541 x := v_0.Args[0]
22542 if x != v_1 {
22543 continue
22544 }
22545 v.reset(OpConst64)
22546 v.AuxInt = int64ToAuxInt(-1)
22547 return true
22548 }
22549 break
22550 }
22551
22552
22553 for {
22554 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22555 x := v_0
22556 if v_1.Op != OpOr64 {
22557 continue
22558 }
22559 _ = v_1.Args[1]
22560 v_1_0 := v_1.Args[0]
22561 v_1_1 := v_1.Args[1]
22562 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
22563 if x != v_1_0 {
22564 continue
22565 }
22566 y := v_1_1
22567 v.reset(OpOr64)
22568 v.AddArg2(x, y)
22569 return true
22570 }
22571 }
22572 break
22573 }
22574
22575
22576
22577 for {
22578 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22579 if v_0.Op != OpAnd64 {
22580 continue
22581 }
22582 _ = v_0.Args[1]
22583 v_0_0 := v_0.Args[0]
22584 v_0_1 := v_0.Args[1]
22585 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
22586 x := v_0_0
22587 if v_0_1.Op != OpConst64 {
22588 continue
22589 }
22590 c2 := auxIntToInt64(v_0_1.AuxInt)
22591 if v_1.Op != OpConst64 {
22592 continue
22593 }
22594 t := v_1.Type
22595 c1 := auxIntToInt64(v_1.AuxInt)
22596 if !(^(c1 | c2) == 0) {
22597 continue
22598 }
22599 v.reset(OpOr64)
22600 v0 := b.NewValue0(v.Pos, OpConst64, t)
22601 v0.AuxInt = int64ToAuxInt(c1)
22602 v.AddArg2(v0, x)
22603 return true
22604 }
22605 }
22606 break
22607 }
22608
22609
22610
22611 for {
22612 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22613 if v_0.Op != OpOr64 {
22614 continue
22615 }
22616 _ = v_0.Args[1]
22617 v_0_0 := v_0.Args[0]
22618 v_0_1 := v_0.Args[1]
22619 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
22620 i := v_0_0
22621 if i.Op != OpConst64 {
22622 continue
22623 }
22624 t := i.Type
22625 z := v_0_1
22626 x := v_1
22627 if !(z.Op != OpConst64 && x.Op != OpConst64) {
22628 continue
22629 }
22630 v.reset(OpOr64)
22631 v0 := b.NewValue0(v.Pos, OpOr64, t)
22632 v0.AddArg2(z, x)
22633 v.AddArg2(i, v0)
22634 return true
22635 }
22636 }
22637 break
22638 }
22639
22640
22641 for {
22642 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22643 if v_0.Op != OpConst64 {
22644 continue
22645 }
22646 t := v_0.Type
22647 c := auxIntToInt64(v_0.AuxInt)
22648 if v_1.Op != OpOr64 {
22649 continue
22650 }
22651 _ = v_1.Args[1]
22652 v_1_0 := v_1.Args[0]
22653 v_1_1 := v_1.Args[1]
22654 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
22655 if v_1_0.Op != OpConst64 || v_1_0.Type != t {
22656 continue
22657 }
22658 d := auxIntToInt64(v_1_0.AuxInt)
22659 x := v_1_1
22660 v.reset(OpOr64)
22661 v0 := b.NewValue0(v.Pos, OpConst64, t)
22662 v0.AuxInt = int64ToAuxInt(c | d)
22663 v.AddArg2(v0, x)
22664 return true
22665 }
22666 }
22667 break
22668 }
22669
22670
22671
22672 for {
22673 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22674 if v_0.Op != OpLsh64x64 {
22675 continue
22676 }
22677 _ = v_0.Args[1]
22678 x := v_0.Args[0]
22679 z := v_0.Args[1]
22680 if z.Op != OpConst64 {
22681 continue
22682 }
22683 c := auxIntToInt64(z.AuxInt)
22684 if v_1.Op != OpRsh64Ux64 {
22685 continue
22686 }
22687 _ = v_1.Args[1]
22688 if x != v_1.Args[0] {
22689 continue
22690 }
22691 v_1_1 := v_1.Args[1]
22692 if v_1_1.Op != OpConst64 {
22693 continue
22694 }
22695 d := auxIntToInt64(v_1_1.AuxInt)
22696 if !(c < 64 && d == 64-c && canRotate(config, 64)) {
22697 continue
22698 }
22699 v.reset(OpRotateLeft64)
22700 v.AddArg2(x, z)
22701 return true
22702 }
22703 break
22704 }
22705
22706
22707
22708 for {
22709 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22710 left := v_0
22711 if left.Op != OpLsh64x64 {
22712 continue
22713 }
22714 y := left.Args[1]
22715 x := left.Args[0]
22716 right := v_1
22717 if right.Op != OpRsh64Ux64 {
22718 continue
22719 }
22720 _ = right.Args[1]
22721 if x != right.Args[0] {
22722 continue
22723 }
22724 right_1 := right.Args[1]
22725 if right_1.Op != OpSub64 {
22726 continue
22727 }
22728 _ = right_1.Args[1]
22729 right_1_0 := right_1.Args[0]
22730 if right_1_0.Op != OpConst64 || auxIntToInt64(right_1_0.AuxInt) != 64 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 64)) {
22731 continue
22732 }
22733 v.reset(OpRotateLeft64)
22734 v.AddArg2(x, y)
22735 return true
22736 }
22737 break
22738 }
22739
22740
22741
22742 for {
22743 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22744 left := v_0
22745 if left.Op != OpLsh64x32 {
22746 continue
22747 }
22748 y := left.Args[1]
22749 x := left.Args[0]
22750 right := v_1
22751 if right.Op != OpRsh64Ux32 {
22752 continue
22753 }
22754 _ = right.Args[1]
22755 if x != right.Args[0] {
22756 continue
22757 }
22758 right_1 := right.Args[1]
22759 if right_1.Op != OpSub32 {
22760 continue
22761 }
22762 _ = right_1.Args[1]
22763 right_1_0 := right_1.Args[0]
22764 if right_1_0.Op != OpConst32 || auxIntToInt32(right_1_0.AuxInt) != 64 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 64)) {
22765 continue
22766 }
22767 v.reset(OpRotateLeft64)
22768 v.AddArg2(x, y)
22769 return true
22770 }
22771 break
22772 }
22773
22774
22775
22776 for {
22777 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22778 left := v_0
22779 if left.Op != OpLsh64x16 {
22780 continue
22781 }
22782 y := left.Args[1]
22783 x := left.Args[0]
22784 right := v_1
22785 if right.Op != OpRsh64Ux16 {
22786 continue
22787 }
22788 _ = right.Args[1]
22789 if x != right.Args[0] {
22790 continue
22791 }
22792 right_1 := right.Args[1]
22793 if right_1.Op != OpSub16 {
22794 continue
22795 }
22796 _ = right_1.Args[1]
22797 right_1_0 := right_1.Args[0]
22798 if right_1_0.Op != OpConst16 || auxIntToInt16(right_1_0.AuxInt) != 64 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 64)) {
22799 continue
22800 }
22801 v.reset(OpRotateLeft64)
22802 v.AddArg2(x, y)
22803 return true
22804 }
22805 break
22806 }
22807
22808
22809
22810 for {
22811 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22812 left := v_0
22813 if left.Op != OpLsh64x8 {
22814 continue
22815 }
22816 y := left.Args[1]
22817 x := left.Args[0]
22818 right := v_1
22819 if right.Op != OpRsh64Ux8 {
22820 continue
22821 }
22822 _ = right.Args[1]
22823 if x != right.Args[0] {
22824 continue
22825 }
22826 right_1 := right.Args[1]
22827 if right_1.Op != OpSub8 {
22828 continue
22829 }
22830 _ = right_1.Args[1]
22831 right_1_0 := right_1.Args[0]
22832 if right_1_0.Op != OpConst8 || auxIntToInt8(right_1_0.AuxInt) != 64 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 64)) {
22833 continue
22834 }
22835 v.reset(OpRotateLeft64)
22836 v.AddArg2(x, y)
22837 return true
22838 }
22839 break
22840 }
22841
22842
22843
22844 for {
22845 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22846 right := v_0
22847 if right.Op != OpRsh64Ux64 {
22848 continue
22849 }
22850 y := right.Args[1]
22851 x := right.Args[0]
22852 left := v_1
22853 if left.Op != OpLsh64x64 {
22854 continue
22855 }
22856 _ = left.Args[1]
22857 if x != left.Args[0] {
22858 continue
22859 }
22860 z := left.Args[1]
22861 if z.Op != OpSub64 {
22862 continue
22863 }
22864 _ = z.Args[1]
22865 z_0 := z.Args[0]
22866 if z_0.Op != OpConst64 || auxIntToInt64(z_0.AuxInt) != 64 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 64)) {
22867 continue
22868 }
22869 v.reset(OpRotateLeft64)
22870 v.AddArg2(x, z)
22871 return true
22872 }
22873 break
22874 }
22875
22876
22877
22878 for {
22879 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22880 right := v_0
22881 if right.Op != OpRsh64Ux32 {
22882 continue
22883 }
22884 y := right.Args[1]
22885 x := right.Args[0]
22886 left := v_1
22887 if left.Op != OpLsh64x32 {
22888 continue
22889 }
22890 _ = left.Args[1]
22891 if x != left.Args[0] {
22892 continue
22893 }
22894 z := left.Args[1]
22895 if z.Op != OpSub32 {
22896 continue
22897 }
22898 _ = z.Args[1]
22899 z_0 := z.Args[0]
22900 if z_0.Op != OpConst32 || auxIntToInt32(z_0.AuxInt) != 64 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 64)) {
22901 continue
22902 }
22903 v.reset(OpRotateLeft64)
22904 v.AddArg2(x, z)
22905 return true
22906 }
22907 break
22908 }
22909
22910
22911
22912 for {
22913 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22914 right := v_0
22915 if right.Op != OpRsh64Ux16 {
22916 continue
22917 }
22918 y := right.Args[1]
22919 x := right.Args[0]
22920 left := v_1
22921 if left.Op != OpLsh64x16 {
22922 continue
22923 }
22924 _ = left.Args[1]
22925 if x != left.Args[0] {
22926 continue
22927 }
22928 z := left.Args[1]
22929 if z.Op != OpSub16 {
22930 continue
22931 }
22932 _ = z.Args[1]
22933 z_0 := z.Args[0]
22934 if z_0.Op != OpConst16 || auxIntToInt16(z_0.AuxInt) != 64 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 64)) {
22935 continue
22936 }
22937 v.reset(OpRotateLeft64)
22938 v.AddArg2(x, z)
22939 return true
22940 }
22941 break
22942 }
22943
22944
22945
22946 for {
22947 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22948 right := v_0
22949 if right.Op != OpRsh64Ux8 {
22950 continue
22951 }
22952 y := right.Args[1]
22953 x := right.Args[0]
22954 left := v_1
22955 if left.Op != OpLsh64x8 {
22956 continue
22957 }
22958 _ = left.Args[1]
22959 if x != left.Args[0] {
22960 continue
22961 }
22962 z := left.Args[1]
22963 if z.Op != OpSub8 {
22964 continue
22965 }
22966 _ = z.Args[1]
22967 z_0 := z.Args[0]
22968 if z_0.Op != OpConst8 || auxIntToInt8(z_0.AuxInt) != 64 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 64)) {
22969 continue
22970 }
22971 v.reset(OpRotateLeft64)
22972 v.AddArg2(x, z)
22973 return true
22974 }
22975 break
22976 }
22977 return false
22978 }
22979 func rewriteValuegeneric_OpOr8(v *Value) bool {
22980 v_1 := v.Args[1]
22981 v_0 := v.Args[0]
22982 b := v.Block
22983 config := b.Func.Config
22984
22985
22986 for {
22987 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22988 if v_0.Op != OpConst8 {
22989 continue
22990 }
22991 c := auxIntToInt8(v_0.AuxInt)
22992 if v_1.Op != OpConst8 {
22993 continue
22994 }
22995 d := auxIntToInt8(v_1.AuxInt)
22996 v.reset(OpConst8)
22997 v.AuxInt = int8ToAuxInt(c | d)
22998 return true
22999 }
23000 break
23001 }
23002
23003
23004 for {
23005 t := v.Type
23006 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23007 if v_0.Op != OpCom8 {
23008 continue
23009 }
23010 x := v_0.Args[0]
23011 if v_1.Op != OpCom8 {
23012 continue
23013 }
23014 y := v_1.Args[0]
23015 v.reset(OpCom8)
23016 v0 := b.NewValue0(v.Pos, OpAnd8, t)
23017 v0.AddArg2(x, y)
23018 v.AddArg(v0)
23019 return true
23020 }
23021 break
23022 }
23023
23024
23025 for {
23026 x := v_0
23027 if x != v_1 {
23028 break
23029 }
23030 v.copyOf(x)
23031 return true
23032 }
23033
23034
23035 for {
23036 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23037 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 {
23038 continue
23039 }
23040 x := v_1
23041 v.copyOf(x)
23042 return true
23043 }
23044 break
23045 }
23046
23047
23048 for {
23049 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23050 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != -1 {
23051 continue
23052 }
23053 v.reset(OpConst8)
23054 v.AuxInt = int8ToAuxInt(-1)
23055 return true
23056 }
23057 break
23058 }
23059
23060
23061 for {
23062 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23063 if v_0.Op != OpCom8 {
23064 continue
23065 }
23066 x := v_0.Args[0]
23067 if x != v_1 {
23068 continue
23069 }
23070 v.reset(OpConst8)
23071 v.AuxInt = int8ToAuxInt(-1)
23072 return true
23073 }
23074 break
23075 }
23076
23077
23078 for {
23079 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23080 x := v_0
23081 if v_1.Op != OpOr8 {
23082 continue
23083 }
23084 _ = v_1.Args[1]
23085 v_1_0 := v_1.Args[0]
23086 v_1_1 := v_1.Args[1]
23087 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
23088 if x != v_1_0 {
23089 continue
23090 }
23091 y := v_1_1
23092 v.reset(OpOr8)
23093 v.AddArg2(x, y)
23094 return true
23095 }
23096 }
23097 break
23098 }
23099
23100
23101
23102 for {
23103 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23104 if v_0.Op != OpAnd8 {
23105 continue
23106 }
23107 _ = v_0.Args[1]
23108 v_0_0 := v_0.Args[0]
23109 v_0_1 := v_0.Args[1]
23110 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
23111 x := v_0_0
23112 if v_0_1.Op != OpConst8 {
23113 continue
23114 }
23115 c2 := auxIntToInt8(v_0_1.AuxInt)
23116 if v_1.Op != OpConst8 {
23117 continue
23118 }
23119 t := v_1.Type
23120 c1 := auxIntToInt8(v_1.AuxInt)
23121 if !(^(c1 | c2) == 0) {
23122 continue
23123 }
23124 v.reset(OpOr8)
23125 v0 := b.NewValue0(v.Pos, OpConst8, t)
23126 v0.AuxInt = int8ToAuxInt(c1)
23127 v.AddArg2(v0, x)
23128 return true
23129 }
23130 }
23131 break
23132 }
23133
23134
23135
23136 for {
23137 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23138 if v_0.Op != OpOr8 {
23139 continue
23140 }
23141 _ = v_0.Args[1]
23142 v_0_0 := v_0.Args[0]
23143 v_0_1 := v_0.Args[1]
23144 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
23145 i := v_0_0
23146 if i.Op != OpConst8 {
23147 continue
23148 }
23149 t := i.Type
23150 z := v_0_1
23151 x := v_1
23152 if !(z.Op != OpConst8 && x.Op != OpConst8) {
23153 continue
23154 }
23155 v.reset(OpOr8)
23156 v0 := b.NewValue0(v.Pos, OpOr8, t)
23157 v0.AddArg2(z, x)
23158 v.AddArg2(i, v0)
23159 return true
23160 }
23161 }
23162 break
23163 }
23164
23165
23166 for {
23167 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23168 if v_0.Op != OpConst8 {
23169 continue
23170 }
23171 t := v_0.Type
23172 c := auxIntToInt8(v_0.AuxInt)
23173 if v_1.Op != OpOr8 {
23174 continue
23175 }
23176 _ = v_1.Args[1]
23177 v_1_0 := v_1.Args[0]
23178 v_1_1 := v_1.Args[1]
23179 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
23180 if v_1_0.Op != OpConst8 || v_1_0.Type != t {
23181 continue
23182 }
23183 d := auxIntToInt8(v_1_0.AuxInt)
23184 x := v_1_1
23185 v.reset(OpOr8)
23186 v0 := b.NewValue0(v.Pos, OpConst8, t)
23187 v0.AuxInt = int8ToAuxInt(c | d)
23188 v.AddArg2(v0, x)
23189 return true
23190 }
23191 }
23192 break
23193 }
23194
23195
23196
23197 for {
23198 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23199 if v_0.Op != OpLsh8x64 {
23200 continue
23201 }
23202 _ = v_0.Args[1]
23203 x := v_0.Args[0]
23204 z := v_0.Args[1]
23205 if z.Op != OpConst64 {
23206 continue
23207 }
23208 c := auxIntToInt64(z.AuxInt)
23209 if v_1.Op != OpRsh8Ux64 {
23210 continue
23211 }
23212 _ = v_1.Args[1]
23213 if x != v_1.Args[0] {
23214 continue
23215 }
23216 v_1_1 := v_1.Args[1]
23217 if v_1_1.Op != OpConst64 {
23218 continue
23219 }
23220 d := auxIntToInt64(v_1_1.AuxInt)
23221 if !(c < 8 && d == 8-c && canRotate(config, 8)) {
23222 continue
23223 }
23224 v.reset(OpRotateLeft8)
23225 v.AddArg2(x, z)
23226 return true
23227 }
23228 break
23229 }
23230
23231
23232
23233 for {
23234 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23235 left := v_0
23236 if left.Op != OpLsh8x64 {
23237 continue
23238 }
23239 y := left.Args[1]
23240 x := left.Args[0]
23241 right := v_1
23242 if right.Op != OpRsh8Ux64 {
23243 continue
23244 }
23245 _ = right.Args[1]
23246 if x != right.Args[0] {
23247 continue
23248 }
23249 right_1 := right.Args[1]
23250 if right_1.Op != OpSub64 {
23251 continue
23252 }
23253 _ = right_1.Args[1]
23254 right_1_0 := right_1.Args[0]
23255 if right_1_0.Op != OpConst64 || auxIntToInt64(right_1_0.AuxInt) != 8 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 8)) {
23256 continue
23257 }
23258 v.reset(OpRotateLeft8)
23259 v.AddArg2(x, y)
23260 return true
23261 }
23262 break
23263 }
23264
23265
23266
23267 for {
23268 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23269 left := v_0
23270 if left.Op != OpLsh8x32 {
23271 continue
23272 }
23273 y := left.Args[1]
23274 x := left.Args[0]
23275 right := v_1
23276 if right.Op != OpRsh8Ux32 {
23277 continue
23278 }
23279 _ = right.Args[1]
23280 if x != right.Args[0] {
23281 continue
23282 }
23283 right_1 := right.Args[1]
23284 if right_1.Op != OpSub32 {
23285 continue
23286 }
23287 _ = right_1.Args[1]
23288 right_1_0 := right_1.Args[0]
23289 if right_1_0.Op != OpConst32 || auxIntToInt32(right_1_0.AuxInt) != 8 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 8)) {
23290 continue
23291 }
23292 v.reset(OpRotateLeft8)
23293 v.AddArg2(x, y)
23294 return true
23295 }
23296 break
23297 }
23298
23299
23300
23301 for {
23302 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23303 left := v_0
23304 if left.Op != OpLsh8x16 {
23305 continue
23306 }
23307 y := left.Args[1]
23308 x := left.Args[0]
23309 right := v_1
23310 if right.Op != OpRsh8Ux16 {
23311 continue
23312 }
23313 _ = right.Args[1]
23314 if x != right.Args[0] {
23315 continue
23316 }
23317 right_1 := right.Args[1]
23318 if right_1.Op != OpSub16 {
23319 continue
23320 }
23321 _ = right_1.Args[1]
23322 right_1_0 := right_1.Args[0]
23323 if right_1_0.Op != OpConst16 || auxIntToInt16(right_1_0.AuxInt) != 8 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 8)) {
23324 continue
23325 }
23326 v.reset(OpRotateLeft8)
23327 v.AddArg2(x, y)
23328 return true
23329 }
23330 break
23331 }
23332
23333
23334
23335 for {
23336 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23337 left := v_0
23338 if left.Op != OpLsh8x8 {
23339 continue
23340 }
23341 y := left.Args[1]
23342 x := left.Args[0]
23343 right := v_1
23344 if right.Op != OpRsh8Ux8 {
23345 continue
23346 }
23347 _ = right.Args[1]
23348 if x != right.Args[0] {
23349 continue
23350 }
23351 right_1 := right.Args[1]
23352 if right_1.Op != OpSub8 {
23353 continue
23354 }
23355 _ = right_1.Args[1]
23356 right_1_0 := right_1.Args[0]
23357 if right_1_0.Op != OpConst8 || auxIntToInt8(right_1_0.AuxInt) != 8 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 8)) {
23358 continue
23359 }
23360 v.reset(OpRotateLeft8)
23361 v.AddArg2(x, y)
23362 return true
23363 }
23364 break
23365 }
23366
23367
23368
23369 for {
23370 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23371 right := v_0
23372 if right.Op != OpRsh8Ux64 {
23373 continue
23374 }
23375 y := right.Args[1]
23376 x := right.Args[0]
23377 left := v_1
23378 if left.Op != OpLsh8x64 {
23379 continue
23380 }
23381 _ = left.Args[1]
23382 if x != left.Args[0] {
23383 continue
23384 }
23385 z := left.Args[1]
23386 if z.Op != OpSub64 {
23387 continue
23388 }
23389 _ = z.Args[1]
23390 z_0 := z.Args[0]
23391 if z_0.Op != OpConst64 || auxIntToInt64(z_0.AuxInt) != 8 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 8)) {
23392 continue
23393 }
23394 v.reset(OpRotateLeft8)
23395 v.AddArg2(x, z)
23396 return true
23397 }
23398 break
23399 }
23400
23401
23402
23403 for {
23404 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23405 right := v_0
23406 if right.Op != OpRsh8Ux32 {
23407 continue
23408 }
23409 y := right.Args[1]
23410 x := right.Args[0]
23411 left := v_1
23412 if left.Op != OpLsh8x32 {
23413 continue
23414 }
23415 _ = left.Args[1]
23416 if x != left.Args[0] {
23417 continue
23418 }
23419 z := left.Args[1]
23420 if z.Op != OpSub32 {
23421 continue
23422 }
23423 _ = z.Args[1]
23424 z_0 := z.Args[0]
23425 if z_0.Op != OpConst32 || auxIntToInt32(z_0.AuxInt) != 8 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 8)) {
23426 continue
23427 }
23428 v.reset(OpRotateLeft8)
23429 v.AddArg2(x, z)
23430 return true
23431 }
23432 break
23433 }
23434
23435
23436
23437 for {
23438 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23439 right := v_0
23440 if right.Op != OpRsh8Ux16 {
23441 continue
23442 }
23443 y := right.Args[1]
23444 x := right.Args[0]
23445 left := v_1
23446 if left.Op != OpLsh8x16 {
23447 continue
23448 }
23449 _ = left.Args[1]
23450 if x != left.Args[0] {
23451 continue
23452 }
23453 z := left.Args[1]
23454 if z.Op != OpSub16 {
23455 continue
23456 }
23457 _ = z.Args[1]
23458 z_0 := z.Args[0]
23459 if z_0.Op != OpConst16 || auxIntToInt16(z_0.AuxInt) != 8 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 8)) {
23460 continue
23461 }
23462 v.reset(OpRotateLeft8)
23463 v.AddArg2(x, z)
23464 return true
23465 }
23466 break
23467 }
23468
23469
23470
23471 for {
23472 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23473 right := v_0
23474 if right.Op != OpRsh8Ux8 {
23475 continue
23476 }
23477 y := right.Args[1]
23478 x := right.Args[0]
23479 left := v_1
23480 if left.Op != OpLsh8x8 {
23481 continue
23482 }
23483 _ = left.Args[1]
23484 if x != left.Args[0] {
23485 continue
23486 }
23487 z := left.Args[1]
23488 if z.Op != OpSub8 {
23489 continue
23490 }
23491 _ = z.Args[1]
23492 z_0 := z.Args[0]
23493 if z_0.Op != OpConst8 || auxIntToInt8(z_0.AuxInt) != 8 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 8)) {
23494 continue
23495 }
23496 v.reset(OpRotateLeft8)
23497 v.AddArg2(x, z)
23498 return true
23499 }
23500 break
23501 }
23502 return false
23503 }
23504 func rewriteValuegeneric_OpOrB(v *Value) bool {
23505 v_1 := v.Args[1]
23506 v_0 := v.Args[0]
23507 b := v.Block
23508
23509
23510
23511 for {
23512 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23513 if v_0.Op != OpLess64 {
23514 continue
23515 }
23516 x := v_0.Args[1]
23517 v_0_0 := v_0.Args[0]
23518 if v_0_0.Op != OpConst64 {
23519 continue
23520 }
23521 c := auxIntToInt64(v_0_0.AuxInt)
23522 if v_1.Op != OpLess64 {
23523 continue
23524 }
23525 _ = v_1.Args[1]
23526 if x != v_1.Args[0] {
23527 continue
23528 }
23529 v_1_1 := v_1.Args[1]
23530 if v_1_1.Op != OpConst64 {
23531 continue
23532 }
23533 d := auxIntToInt64(v_1_1.AuxInt)
23534 if !(c >= d) {
23535 continue
23536 }
23537 v.reset(OpLess64U)
23538 v0 := b.NewValue0(v.Pos, OpConst64, x.Type)
23539 v0.AuxInt = int64ToAuxInt(c - d)
23540 v1 := b.NewValue0(v.Pos, OpSub64, x.Type)
23541 v2 := b.NewValue0(v.Pos, OpConst64, x.Type)
23542 v2.AuxInt = int64ToAuxInt(d)
23543 v1.AddArg2(x, v2)
23544 v.AddArg2(v0, v1)
23545 return true
23546 }
23547 break
23548 }
23549
23550
23551
23552 for {
23553 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23554 if v_0.Op != OpLeq64 {
23555 continue
23556 }
23557 x := v_0.Args[1]
23558 v_0_0 := v_0.Args[0]
23559 if v_0_0.Op != OpConst64 {
23560 continue
23561 }
23562 c := auxIntToInt64(v_0_0.AuxInt)
23563 if v_1.Op != OpLess64 {
23564 continue
23565 }
23566 _ = v_1.Args[1]
23567 if x != v_1.Args[0] {
23568 continue
23569 }
23570 v_1_1 := v_1.Args[1]
23571 if v_1_1.Op != OpConst64 {
23572 continue
23573 }
23574 d := auxIntToInt64(v_1_1.AuxInt)
23575 if !(c >= d) {
23576 continue
23577 }
23578 v.reset(OpLeq64U)
23579 v0 := b.NewValue0(v.Pos, OpConst64, x.Type)
23580 v0.AuxInt = int64ToAuxInt(c - d)
23581 v1 := b.NewValue0(v.Pos, OpSub64, x.Type)
23582 v2 := b.NewValue0(v.Pos, OpConst64, x.Type)
23583 v2.AuxInt = int64ToAuxInt(d)
23584 v1.AddArg2(x, v2)
23585 v.AddArg2(v0, v1)
23586 return true
23587 }
23588 break
23589 }
23590
23591
23592
23593 for {
23594 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23595 if v_0.Op != OpLess32 {
23596 continue
23597 }
23598 x := v_0.Args[1]
23599 v_0_0 := v_0.Args[0]
23600 if v_0_0.Op != OpConst32 {
23601 continue
23602 }
23603 c := auxIntToInt32(v_0_0.AuxInt)
23604 if v_1.Op != OpLess32 {
23605 continue
23606 }
23607 _ = v_1.Args[1]
23608 if x != v_1.Args[0] {
23609 continue
23610 }
23611 v_1_1 := v_1.Args[1]
23612 if v_1_1.Op != OpConst32 {
23613 continue
23614 }
23615 d := auxIntToInt32(v_1_1.AuxInt)
23616 if !(c >= d) {
23617 continue
23618 }
23619 v.reset(OpLess32U)
23620 v0 := b.NewValue0(v.Pos, OpConst32, x.Type)
23621 v0.AuxInt = int32ToAuxInt(c - d)
23622 v1 := b.NewValue0(v.Pos, OpSub32, x.Type)
23623 v2 := b.NewValue0(v.Pos, OpConst32, x.Type)
23624 v2.AuxInt = int32ToAuxInt(d)
23625 v1.AddArg2(x, v2)
23626 v.AddArg2(v0, v1)
23627 return true
23628 }
23629 break
23630 }
23631
23632
23633
23634 for {
23635 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23636 if v_0.Op != OpLeq32 {
23637 continue
23638 }
23639 x := v_0.Args[1]
23640 v_0_0 := v_0.Args[0]
23641 if v_0_0.Op != OpConst32 {
23642 continue
23643 }
23644 c := auxIntToInt32(v_0_0.AuxInt)
23645 if v_1.Op != OpLess32 {
23646 continue
23647 }
23648 _ = v_1.Args[1]
23649 if x != v_1.Args[0] {
23650 continue
23651 }
23652 v_1_1 := v_1.Args[1]
23653 if v_1_1.Op != OpConst32 {
23654 continue
23655 }
23656 d := auxIntToInt32(v_1_1.AuxInt)
23657 if !(c >= d) {
23658 continue
23659 }
23660 v.reset(OpLeq32U)
23661 v0 := b.NewValue0(v.Pos, OpConst32, x.Type)
23662 v0.AuxInt = int32ToAuxInt(c - d)
23663 v1 := b.NewValue0(v.Pos, OpSub32, x.Type)
23664 v2 := b.NewValue0(v.Pos, OpConst32, x.Type)
23665 v2.AuxInt = int32ToAuxInt(d)
23666 v1.AddArg2(x, v2)
23667 v.AddArg2(v0, v1)
23668 return true
23669 }
23670 break
23671 }
23672
23673
23674
23675 for {
23676 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23677 if v_0.Op != OpLess16 {
23678 continue
23679 }
23680 x := v_0.Args[1]
23681 v_0_0 := v_0.Args[0]
23682 if v_0_0.Op != OpConst16 {
23683 continue
23684 }
23685 c := auxIntToInt16(v_0_0.AuxInt)
23686 if v_1.Op != OpLess16 {
23687 continue
23688 }
23689 _ = v_1.Args[1]
23690 if x != v_1.Args[0] {
23691 continue
23692 }
23693 v_1_1 := v_1.Args[1]
23694 if v_1_1.Op != OpConst16 {
23695 continue
23696 }
23697 d := auxIntToInt16(v_1_1.AuxInt)
23698 if !(c >= d) {
23699 continue
23700 }
23701 v.reset(OpLess16U)
23702 v0 := b.NewValue0(v.Pos, OpConst16, x.Type)
23703 v0.AuxInt = int16ToAuxInt(c - d)
23704 v1 := b.NewValue0(v.Pos, OpSub16, x.Type)
23705 v2 := b.NewValue0(v.Pos, OpConst16, x.Type)
23706 v2.AuxInt = int16ToAuxInt(d)
23707 v1.AddArg2(x, v2)
23708 v.AddArg2(v0, v1)
23709 return true
23710 }
23711 break
23712 }
23713
23714
23715
23716 for {
23717 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23718 if v_0.Op != OpLeq16 {
23719 continue
23720 }
23721 x := v_0.Args[1]
23722 v_0_0 := v_0.Args[0]
23723 if v_0_0.Op != OpConst16 {
23724 continue
23725 }
23726 c := auxIntToInt16(v_0_0.AuxInt)
23727 if v_1.Op != OpLess16 {
23728 continue
23729 }
23730 _ = v_1.Args[1]
23731 if x != v_1.Args[0] {
23732 continue
23733 }
23734 v_1_1 := v_1.Args[1]
23735 if v_1_1.Op != OpConst16 {
23736 continue
23737 }
23738 d := auxIntToInt16(v_1_1.AuxInt)
23739 if !(c >= d) {
23740 continue
23741 }
23742 v.reset(OpLeq16U)
23743 v0 := b.NewValue0(v.Pos, OpConst16, x.Type)
23744 v0.AuxInt = int16ToAuxInt(c - d)
23745 v1 := b.NewValue0(v.Pos, OpSub16, x.Type)
23746 v2 := b.NewValue0(v.Pos, OpConst16, x.Type)
23747 v2.AuxInt = int16ToAuxInt(d)
23748 v1.AddArg2(x, v2)
23749 v.AddArg2(v0, v1)
23750 return true
23751 }
23752 break
23753 }
23754
23755
23756
23757 for {
23758 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23759 if v_0.Op != OpLess8 {
23760 continue
23761 }
23762 x := v_0.Args[1]
23763 v_0_0 := v_0.Args[0]
23764 if v_0_0.Op != OpConst8 {
23765 continue
23766 }
23767 c := auxIntToInt8(v_0_0.AuxInt)
23768 if v_1.Op != OpLess8 {
23769 continue
23770 }
23771 _ = v_1.Args[1]
23772 if x != v_1.Args[0] {
23773 continue
23774 }
23775 v_1_1 := v_1.Args[1]
23776 if v_1_1.Op != OpConst8 {
23777 continue
23778 }
23779 d := auxIntToInt8(v_1_1.AuxInt)
23780 if !(c >= d) {
23781 continue
23782 }
23783 v.reset(OpLess8U)
23784 v0 := b.NewValue0(v.Pos, OpConst8, x.Type)
23785 v0.AuxInt = int8ToAuxInt(c - d)
23786 v1 := b.NewValue0(v.Pos, OpSub8, x.Type)
23787 v2 := b.NewValue0(v.Pos, OpConst8, x.Type)
23788 v2.AuxInt = int8ToAuxInt(d)
23789 v1.AddArg2(x, v2)
23790 v.AddArg2(v0, v1)
23791 return true
23792 }
23793 break
23794 }
23795
23796
23797
23798 for {
23799 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23800 if v_0.Op != OpLeq8 {
23801 continue
23802 }
23803 x := v_0.Args[1]
23804 v_0_0 := v_0.Args[0]
23805 if v_0_0.Op != OpConst8 {
23806 continue
23807 }
23808 c := auxIntToInt8(v_0_0.AuxInt)
23809 if v_1.Op != OpLess8 {
23810 continue
23811 }
23812 _ = v_1.Args[1]
23813 if x != v_1.Args[0] {
23814 continue
23815 }
23816 v_1_1 := v_1.Args[1]
23817 if v_1_1.Op != OpConst8 {
23818 continue
23819 }
23820 d := auxIntToInt8(v_1_1.AuxInt)
23821 if !(c >= d) {
23822 continue
23823 }
23824 v.reset(OpLeq8U)
23825 v0 := b.NewValue0(v.Pos, OpConst8, x.Type)
23826 v0.AuxInt = int8ToAuxInt(c - d)
23827 v1 := b.NewValue0(v.Pos, OpSub8, x.Type)
23828 v2 := b.NewValue0(v.Pos, OpConst8, x.Type)
23829 v2.AuxInt = int8ToAuxInt(d)
23830 v1.AddArg2(x, v2)
23831 v.AddArg2(v0, v1)
23832 return true
23833 }
23834 break
23835 }
23836
23837
23838
23839 for {
23840 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23841 if v_0.Op != OpLess64 {
23842 continue
23843 }
23844 x := v_0.Args[1]
23845 v_0_0 := v_0.Args[0]
23846 if v_0_0.Op != OpConst64 {
23847 continue
23848 }
23849 c := auxIntToInt64(v_0_0.AuxInt)
23850 if v_1.Op != OpLeq64 {
23851 continue
23852 }
23853 _ = v_1.Args[1]
23854 if x != v_1.Args[0] {
23855 continue
23856 }
23857 v_1_1 := v_1.Args[1]
23858 if v_1_1.Op != OpConst64 {
23859 continue
23860 }
23861 d := auxIntToInt64(v_1_1.AuxInt)
23862 if !(c >= d+1 && d+1 > d) {
23863 continue
23864 }
23865 v.reset(OpLess64U)
23866 v0 := b.NewValue0(v.Pos, OpConst64, x.Type)
23867 v0.AuxInt = int64ToAuxInt(c - d - 1)
23868 v1 := b.NewValue0(v.Pos, OpSub64, x.Type)
23869 v2 := b.NewValue0(v.Pos, OpConst64, x.Type)
23870 v2.AuxInt = int64ToAuxInt(d + 1)
23871 v1.AddArg2(x, v2)
23872 v.AddArg2(v0, v1)
23873 return true
23874 }
23875 break
23876 }
23877
23878
23879
23880 for {
23881 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23882 if v_0.Op != OpLeq64 {
23883 continue
23884 }
23885 x := v_0.Args[1]
23886 v_0_0 := v_0.Args[0]
23887 if v_0_0.Op != OpConst64 {
23888 continue
23889 }
23890 c := auxIntToInt64(v_0_0.AuxInt)
23891 if v_1.Op != OpLeq64 {
23892 continue
23893 }
23894 _ = v_1.Args[1]
23895 if x != v_1.Args[0] {
23896 continue
23897 }
23898 v_1_1 := v_1.Args[1]
23899 if v_1_1.Op != OpConst64 {
23900 continue
23901 }
23902 d := auxIntToInt64(v_1_1.AuxInt)
23903 if !(c >= d+1 && d+1 > d) {
23904 continue
23905 }
23906 v.reset(OpLeq64U)
23907 v0 := b.NewValue0(v.Pos, OpConst64, x.Type)
23908 v0.AuxInt = int64ToAuxInt(c - d - 1)
23909 v1 := b.NewValue0(v.Pos, OpSub64, x.Type)
23910 v2 := b.NewValue0(v.Pos, OpConst64, x.Type)
23911 v2.AuxInt = int64ToAuxInt(d + 1)
23912 v1.AddArg2(x, v2)
23913 v.AddArg2(v0, v1)
23914 return true
23915 }
23916 break
23917 }
23918
23919
23920
23921 for {
23922 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23923 if v_0.Op != OpLess32 {
23924 continue
23925 }
23926 x := v_0.Args[1]
23927 v_0_0 := v_0.Args[0]
23928 if v_0_0.Op != OpConst32 {
23929 continue
23930 }
23931 c := auxIntToInt32(v_0_0.AuxInt)
23932 if v_1.Op != OpLeq32 {
23933 continue
23934 }
23935 _ = v_1.Args[1]
23936 if x != v_1.Args[0] {
23937 continue
23938 }
23939 v_1_1 := v_1.Args[1]
23940 if v_1_1.Op != OpConst32 {
23941 continue
23942 }
23943 d := auxIntToInt32(v_1_1.AuxInt)
23944 if !(c >= d+1 && d+1 > d) {
23945 continue
23946 }
23947 v.reset(OpLess32U)
23948 v0 := b.NewValue0(v.Pos, OpConst32, x.Type)
23949 v0.AuxInt = int32ToAuxInt(c - d - 1)
23950 v1 := b.NewValue0(v.Pos, OpSub32, x.Type)
23951 v2 := b.NewValue0(v.Pos, OpConst32, x.Type)
23952 v2.AuxInt = int32ToAuxInt(d + 1)
23953 v1.AddArg2(x, v2)
23954 v.AddArg2(v0, v1)
23955 return true
23956 }
23957 break
23958 }
23959
23960
23961
23962 for {
23963 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23964 if v_0.Op != OpLeq32 {
23965 continue
23966 }
23967 x := v_0.Args[1]
23968 v_0_0 := v_0.Args[0]
23969 if v_0_0.Op != OpConst32 {
23970 continue
23971 }
23972 c := auxIntToInt32(v_0_0.AuxInt)
23973 if v_1.Op != OpLeq32 {
23974 continue
23975 }
23976 _ = v_1.Args[1]
23977 if x != v_1.Args[0] {
23978 continue
23979 }
23980 v_1_1 := v_1.Args[1]
23981 if v_1_1.Op != OpConst32 {
23982 continue
23983 }
23984 d := auxIntToInt32(v_1_1.AuxInt)
23985 if !(c >= d+1 && d+1 > d) {
23986 continue
23987 }
23988 v.reset(OpLeq32U)
23989 v0 := b.NewValue0(v.Pos, OpConst32, x.Type)
23990 v0.AuxInt = int32ToAuxInt(c - d - 1)
23991 v1 := b.NewValue0(v.Pos, OpSub32, x.Type)
23992 v2 := b.NewValue0(v.Pos, OpConst32, x.Type)
23993 v2.AuxInt = int32ToAuxInt(d + 1)
23994 v1.AddArg2(x, v2)
23995 v.AddArg2(v0, v1)
23996 return true
23997 }
23998 break
23999 }
24000
24001
24002
24003 for {
24004 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
24005 if v_0.Op != OpLess16 {
24006 continue
24007 }
24008 x := v_0.Args[1]
24009 v_0_0 := v_0.Args[0]
24010 if v_0_0.Op != OpConst16 {
24011 continue
24012 }
24013 c := auxIntToInt16(v_0_0.AuxInt)
24014 if v_1.Op != OpLeq16 {
24015 continue
24016 }
24017 _ = v_1.Args[1]
24018 if x != v_1.Args[0] {
24019 continue
24020 }
24021 v_1_1 := v_1.Args[1]
24022 if v_1_1.Op != OpConst16 {
24023 continue
24024 }
24025 d := auxIntToInt16(v_1_1.AuxInt)
24026 if !(c >= d+1 && d+1 > d) {
24027 continue
24028 }
24029 v.reset(OpLess16U)
24030 v0 := b.NewValue0(v.Pos, OpConst16, x.Type)
24031 v0.AuxInt = int16ToAuxInt(c - d - 1)
24032 v1 := b.NewValue0(v.Pos, OpSub16, x.Type)
24033 v2 := b.NewValue0(v.Pos, OpConst16, x.Type)
24034 v2.AuxInt = int16ToAuxInt(d + 1)
24035 v1.AddArg2(x, v2)
24036 v.AddArg2(v0, v1)
24037 return true
24038 }
24039 break
24040 }
24041
24042
24043
24044 for {
24045 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
24046 if v_0.Op != OpLeq16 {
24047 continue
24048 }
24049 x := v_0.Args[1]
24050 v_0_0 := v_0.Args[0]
24051 if v_0_0.Op != OpConst16 {
24052 continue
24053 }
24054 c := auxIntToInt16(v_0_0.AuxInt)
24055 if v_1.Op != OpLeq16 {
24056 continue
24057 }
24058 _ = v_1.Args[1]
24059 if x != v_1.Args[0] {
24060 continue
24061 }
24062 v_1_1 := v_1.Args[1]
24063 if v_1_1.Op != OpConst16 {
24064 continue
24065 }
24066 d := auxIntToInt16(v_1_1.AuxInt)
24067 if !(c >= d+1 && d+1 > d) {
24068 continue
24069 }
24070 v.reset(OpLeq16U)
24071 v0 := b.NewValue0(v.Pos, OpConst16, x.Type)
24072 v0.AuxInt = int16ToAuxInt(c - d - 1)
24073 v1 := b.NewValue0(v.Pos, OpSub16, x.Type)
24074 v2 := b.NewValue0(v.Pos, OpConst16, x.Type)
24075 v2.AuxInt = int16ToAuxInt(d + 1)
24076 v1.AddArg2(x, v2)
24077 v.AddArg2(v0, v1)
24078 return true
24079 }
24080 break
24081 }
24082
24083
24084
24085 for {
24086 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
24087 if v_0.Op != OpLess8 {
24088 continue
24089 }
24090 x := v_0.Args[1]
24091 v_0_0 := v_0.Args[0]
24092 if v_0_0.Op != OpConst8 {
24093 continue
24094 }
24095 c := auxIntToInt8(v_0_0.AuxInt)
24096 if v_1.Op != OpLeq8 {
24097 continue
24098 }
24099 _ = v_1.Args[1]
24100 if x != v_1.Args[0] {
24101 continue
24102 }
24103 v_1_1 := v_1.Args[1]
24104 if v_1_1.Op != OpConst8 {
24105 continue
24106 }
24107 d := auxIntToInt8(v_1_1.AuxInt)
24108 if !(c >= d+1 && d+1 > d) {
24109 continue
24110 }
24111 v.reset(OpLess8U)
24112 v0 := b.NewValue0(v.Pos, OpConst8, x.Type)
24113 v0.AuxInt = int8ToAuxInt(c - d - 1)
24114 v1 := b.NewValue0(v.Pos, OpSub8, x.Type)
24115 v2 := b.NewValue0(v.Pos, OpConst8, x.Type)
24116 v2.AuxInt = int8ToAuxInt(d + 1)
24117 v1.AddArg2(x, v2)
24118 v.AddArg2(v0, v1)
24119 return true
24120 }
24121 break
24122 }
24123
24124
24125
24126 for {
24127 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
24128 if v_0.Op != OpLeq8 {
24129 continue
24130 }
24131 x := v_0.Args[1]
24132 v_0_0 := v_0.Args[0]
24133 if v_0_0.Op != OpConst8 {
24134 continue
24135 }
24136 c := auxIntToInt8(v_0_0.AuxInt)
24137 if v_1.Op != OpLeq8 {
24138 continue
24139 }
24140 _ = v_1.Args[1]
24141 if x != v_1.Args[0] {
24142 continue
24143 }
24144 v_1_1 := v_1.Args[1]
24145 if v_1_1.Op != OpConst8 {
24146 continue
24147 }
24148 d := auxIntToInt8(v_1_1.AuxInt)
24149 if !(c >= d+1 && d+1 > d) {
24150 continue
24151 }
24152 v.reset(OpLeq8U)
24153 v0 := b.NewValue0(v.Pos, OpConst8, x.Type)
24154 v0.AuxInt = int8ToAuxInt(c - d - 1)
24155 v1 := b.NewValue0(v.Pos, OpSub8, x.Type)
24156 v2 := b.NewValue0(v.Pos, OpConst8, x.Type)
24157 v2.AuxInt = int8ToAuxInt(d + 1)
24158 v1.AddArg2(x, v2)
24159 v.AddArg2(v0, v1)
24160 return true
24161 }
24162 break
24163 }
24164
24165
24166
24167 for {
24168 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
24169 if v_0.Op != OpLess64U {
24170 continue
24171 }
24172 x := v_0.Args[1]
24173 v_0_0 := v_0.Args[0]
24174 if v_0_0.Op != OpConst64 {
24175 continue
24176 }
24177 c := auxIntToInt64(v_0_0.AuxInt)
24178 if v_1.Op != OpLess64U {
24179 continue
24180 }
24181 _ = v_1.Args[1]
24182 if x != v_1.Args[0] {
24183 continue
24184 }
24185 v_1_1 := v_1.Args[1]
24186 if v_1_1.Op != OpConst64 {
24187 continue
24188 }
24189 d := auxIntToInt64(v_1_1.AuxInt)
24190 if !(uint64(c) >= uint64(d)) {
24191 continue
24192 }
24193 v.reset(OpLess64U)
24194 v0 := b.NewValue0(v.Pos, OpConst64, x.Type)
24195 v0.AuxInt = int64ToAuxInt(c - d)
24196 v1 := b.NewValue0(v.Pos, OpSub64, x.Type)
24197 v2 := b.NewValue0(v.Pos, OpConst64, x.Type)
24198 v2.AuxInt = int64ToAuxInt(d)
24199 v1.AddArg2(x, v2)
24200 v.AddArg2(v0, v1)
24201 return true
24202 }
24203 break
24204 }
24205
24206
24207
24208 for {
24209 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
24210 if v_0.Op != OpLeq64U {
24211 continue
24212 }
24213 x := v_0.Args[1]
24214 v_0_0 := v_0.Args[0]
24215 if v_0_0.Op != OpConst64 {
24216 continue
24217 }
24218 c := auxIntToInt64(v_0_0.AuxInt)
24219 if v_1.Op != OpLess64U {
24220 continue
24221 }
24222 _ = v_1.Args[1]
24223 if x != v_1.Args[0] {
24224 continue
24225 }
24226 v_1_1 := v_1.Args[1]
24227 if v_1_1.Op != OpConst64 {
24228 continue
24229 }
24230 d := auxIntToInt64(v_1_1.AuxInt)
24231 if !(uint64(c) >= uint64(d)) {
24232 continue
24233 }
24234 v.reset(OpLeq64U)
24235 v0 := b.NewValue0(v.Pos, OpConst64, x.Type)
24236 v0.AuxInt = int64ToAuxInt(c - d)
24237 v1 := b.NewValue0(v.Pos, OpSub64, x.Type)
24238 v2 := b.NewValue0(v.Pos, OpConst64, x.Type)
24239 v2.AuxInt = int64ToAuxInt(d)
24240 v1.AddArg2(x, v2)
24241 v.AddArg2(v0, v1)
24242 return true
24243 }
24244 break
24245 }
24246
24247
24248
24249 for {
24250 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
24251 if v_0.Op != OpLess32U {
24252 continue
24253 }
24254 x := v_0.Args[1]
24255 v_0_0 := v_0.Args[0]
24256 if v_0_0.Op != OpConst32 {
24257 continue
24258 }
24259 c := auxIntToInt32(v_0_0.AuxInt)
24260 if v_1.Op != OpLess32U {
24261 continue
24262 }
24263 _ = v_1.Args[1]
24264 if x != v_1.Args[0] {
24265 continue
24266 }
24267 v_1_1 := v_1.Args[1]
24268 if v_1_1.Op != OpConst32 {
24269 continue
24270 }
24271 d := auxIntToInt32(v_1_1.AuxInt)
24272 if !(uint32(c) >= uint32(d)) {
24273 continue
24274 }
24275 v.reset(OpLess32U)
24276 v0 := b.NewValue0(v.Pos, OpConst32, x.Type)
24277 v0.AuxInt = int32ToAuxInt(c - d)
24278 v1 := b.NewValue0(v.Pos, OpSub32, x.Type)
24279 v2 := b.NewValue0(v.Pos, OpConst32, x.Type)
24280 v2.AuxInt = int32ToAuxInt(d)
24281 v1.AddArg2(x, v2)
24282 v.AddArg2(v0, v1)
24283 return true
24284 }
24285 break
24286 }
24287
24288
24289
24290 for {
24291 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
24292 if v_0.Op != OpLeq32U {
24293 continue
24294 }
24295 x := v_0.Args[1]
24296 v_0_0 := v_0.Args[0]
24297 if v_0_0.Op != OpConst32 {
24298 continue
24299 }
24300 c := auxIntToInt32(v_0_0.AuxInt)
24301 if v_1.Op != OpLess32U {
24302 continue
24303 }
24304 _ = v_1.Args[1]
24305 if x != v_1.Args[0] {
24306 continue
24307 }
24308 v_1_1 := v_1.Args[1]
24309 if v_1_1.Op != OpConst32 {
24310 continue
24311 }
24312 d := auxIntToInt32(v_1_1.AuxInt)
24313 if !(uint32(c) >= uint32(d)) {
24314 continue
24315 }
24316 v.reset(OpLeq32U)
24317 v0 := b.NewValue0(v.Pos, OpConst32, x.Type)
24318 v0.AuxInt = int32ToAuxInt(c - d)
24319 v1 := b.NewValue0(v.Pos, OpSub32, x.Type)
24320 v2 := b.NewValue0(v.Pos, OpConst32, x.Type)
24321 v2.AuxInt = int32ToAuxInt(d)
24322 v1.AddArg2(x, v2)
24323 v.AddArg2(v0, v1)
24324 return true
24325 }
24326 break
24327 }
24328
24329
24330
24331 for {
24332 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
24333 if v_0.Op != OpLess16U {
24334 continue
24335 }
24336 x := v_0.Args[1]
24337 v_0_0 := v_0.Args[0]
24338 if v_0_0.Op != OpConst16 {
24339 continue
24340 }
24341 c := auxIntToInt16(v_0_0.AuxInt)
24342 if v_1.Op != OpLess16U {
24343 continue
24344 }
24345 _ = v_1.Args[1]
24346 if x != v_1.Args[0] {
24347 continue
24348 }
24349 v_1_1 := v_1.Args[1]
24350 if v_1_1.Op != OpConst16 {
24351 continue
24352 }
24353 d := auxIntToInt16(v_1_1.AuxInt)
24354 if !(uint16(c) >= uint16(d)) {
24355 continue
24356 }
24357 v.reset(OpLess16U)
24358 v0 := b.NewValue0(v.Pos, OpConst16, x.Type)
24359 v0.AuxInt = int16ToAuxInt(c - d)
24360 v1 := b.NewValue0(v.Pos, OpSub16, x.Type)
24361 v2 := b.NewValue0(v.Pos, OpConst16, x.Type)
24362 v2.AuxInt = int16ToAuxInt(d)
24363 v1.AddArg2(x, v2)
24364 v.AddArg2(v0, v1)
24365 return true
24366 }
24367 break
24368 }
24369
24370
24371
24372 for {
24373 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
24374 if v_0.Op != OpLeq16U {
24375 continue
24376 }
24377 x := v_0.Args[1]
24378 v_0_0 := v_0.Args[0]
24379 if v_0_0.Op != OpConst16 {
24380 continue
24381 }
24382 c := auxIntToInt16(v_0_0.AuxInt)
24383 if v_1.Op != OpLess16U {
24384 continue
24385 }
24386 _ = v_1.Args[1]
24387 if x != v_1.Args[0] {
24388 continue
24389 }
24390 v_1_1 := v_1.Args[1]
24391 if v_1_1.Op != OpConst16 {
24392 continue
24393 }
24394 d := auxIntToInt16(v_1_1.AuxInt)
24395 if !(uint16(c) >= uint16(d)) {
24396 continue
24397 }
24398 v.reset(OpLeq16U)
24399 v0 := b.NewValue0(v.Pos, OpConst16, x.Type)
24400 v0.AuxInt = int16ToAuxInt(c - d)
24401 v1 := b.NewValue0(v.Pos, OpSub16, x.Type)
24402 v2 := b.NewValue0(v.Pos, OpConst16, x.Type)
24403 v2.AuxInt = int16ToAuxInt(d)
24404 v1.AddArg2(x, v2)
24405 v.AddArg2(v0, v1)
24406 return true
24407 }
24408 break
24409 }
24410
24411
24412
24413 for {
24414 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
24415 if v_0.Op != OpLess8U {
24416 continue
24417 }
24418 x := v_0.Args[1]
24419 v_0_0 := v_0.Args[0]
24420 if v_0_0.Op != OpConst8 {
24421 continue
24422 }
24423 c := auxIntToInt8(v_0_0.AuxInt)
24424 if v_1.Op != OpLess8U {
24425 continue
24426 }
24427 _ = v_1.Args[1]
24428 if x != v_1.Args[0] {
24429 continue
24430 }
24431 v_1_1 := v_1.Args[1]
24432 if v_1_1.Op != OpConst8 {
24433 continue
24434 }
24435 d := auxIntToInt8(v_1_1.AuxInt)
24436 if !(uint8(c) >= uint8(d)) {
24437 continue
24438 }
24439 v.reset(OpLess8U)
24440 v0 := b.NewValue0(v.Pos, OpConst8, x.Type)
24441 v0.AuxInt = int8ToAuxInt(c - d)
24442 v1 := b.NewValue0(v.Pos, OpSub8, x.Type)
24443 v2 := b.NewValue0(v.Pos, OpConst8, x.Type)
24444 v2.AuxInt = int8ToAuxInt(d)
24445 v1.AddArg2(x, v2)
24446 v.AddArg2(v0, v1)
24447 return true
24448 }
24449 break
24450 }
24451
24452
24453
24454 for {
24455 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
24456 if v_0.Op != OpLeq8U {
24457 continue
24458 }
24459 x := v_0.Args[1]
24460 v_0_0 := v_0.Args[0]
24461 if v_0_0.Op != OpConst8 {
24462 continue
24463 }
24464 c := auxIntToInt8(v_0_0.AuxInt)
24465 if v_1.Op != OpLess8U {
24466 continue
24467 }
24468 _ = v_1.Args[1]
24469 if x != v_1.Args[0] {
24470 continue
24471 }
24472 v_1_1 := v_1.Args[1]
24473 if v_1_1.Op != OpConst8 {
24474 continue
24475 }
24476 d := auxIntToInt8(v_1_1.AuxInt)
24477 if !(uint8(c) >= uint8(d)) {
24478 continue
24479 }
24480 v.reset(OpLeq8U)
24481 v0 := b.NewValue0(v.Pos, OpConst8, x.Type)
24482 v0.AuxInt = int8ToAuxInt(c - d)
24483 v1 := b.NewValue0(v.Pos, OpSub8, x.Type)
24484 v2 := b.NewValue0(v.Pos, OpConst8, x.Type)
24485 v2.AuxInt = int8ToAuxInt(d)
24486 v1.AddArg2(x, v2)
24487 v.AddArg2(v0, v1)
24488 return true
24489 }
24490 break
24491 }
24492
24493
24494
24495 for {
24496 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
24497 if v_0.Op != OpLess64U {
24498 continue
24499 }
24500 x := v_0.Args[1]
24501 v_0_0 := v_0.Args[0]
24502 if v_0_0.Op != OpConst64 {
24503 continue
24504 }
24505 c := auxIntToInt64(v_0_0.AuxInt)
24506 if v_1.Op != OpLeq64U {
24507 continue
24508 }
24509 _ = v_1.Args[1]
24510 if x != v_1.Args[0] {
24511 continue
24512 }
24513 v_1_1 := v_1.Args[1]
24514 if v_1_1.Op != OpConst64 {
24515 continue
24516 }
24517 d := auxIntToInt64(v_1_1.AuxInt)
24518 if !(uint64(c) >= uint64(d+1) && uint64(d+1) > uint64(d)) {
24519 continue
24520 }
24521 v.reset(OpLess64U)
24522 v0 := b.NewValue0(v.Pos, OpConst64, x.Type)
24523 v0.AuxInt = int64ToAuxInt(c - d - 1)
24524 v1 := b.NewValue0(v.Pos, OpSub64, x.Type)
24525 v2 := b.NewValue0(v.Pos, OpConst64, x.Type)
24526 v2.AuxInt = int64ToAuxInt(d + 1)
24527 v1.AddArg2(x, v2)
24528 v.AddArg2(v0, v1)
24529 return true
24530 }
24531 break
24532 }
24533
24534
24535
24536 for {
24537 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
24538 if v_0.Op != OpLeq64U {
24539 continue
24540 }
24541 x := v_0.Args[1]
24542 v_0_0 := v_0.Args[0]
24543 if v_0_0.Op != OpConst64 {
24544 continue
24545 }
24546 c := auxIntToInt64(v_0_0.AuxInt)
24547 if v_1.Op != OpLeq64U {
24548 continue
24549 }
24550 _ = v_1.Args[1]
24551 if x != v_1.Args[0] {
24552 continue
24553 }
24554 v_1_1 := v_1.Args[1]
24555 if v_1_1.Op != OpConst64 {
24556 continue
24557 }
24558 d := auxIntToInt64(v_1_1.AuxInt)
24559 if !(uint64(c) >= uint64(d+1) && uint64(d+1) > uint64(d)) {
24560 continue
24561 }
24562 v.reset(OpLeq64U)
24563 v0 := b.NewValue0(v.Pos, OpConst64, x.Type)
24564 v0.AuxInt = int64ToAuxInt(c - d - 1)
24565 v1 := b.NewValue0(v.Pos, OpSub64, x.Type)
24566 v2 := b.NewValue0(v.Pos, OpConst64, x.Type)
24567 v2.AuxInt = int64ToAuxInt(d + 1)
24568 v1.AddArg2(x, v2)
24569 v.AddArg2(v0, v1)
24570 return true
24571 }
24572 break
24573 }
24574
24575
24576
24577 for {
24578 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
24579 if v_0.Op != OpLess32U {
24580 continue
24581 }
24582 x := v_0.Args[1]
24583 v_0_0 := v_0.Args[0]
24584 if v_0_0.Op != OpConst32 {
24585 continue
24586 }
24587 c := auxIntToInt32(v_0_0.AuxInt)
24588 if v_1.Op != OpLeq32U {
24589 continue
24590 }
24591 _ = v_1.Args[1]
24592 if x != v_1.Args[0] {
24593 continue
24594 }
24595 v_1_1 := v_1.Args[1]
24596 if v_1_1.Op != OpConst32 {
24597 continue
24598 }
24599 d := auxIntToInt32(v_1_1.AuxInt)
24600 if !(uint32(c) >= uint32(d+1) && uint32(d+1) > uint32(d)) {
24601 continue
24602 }
24603 v.reset(OpLess32U)
24604 v0 := b.NewValue0(v.Pos, OpConst32, x.Type)
24605 v0.AuxInt = int32ToAuxInt(c - d - 1)
24606 v1 := b.NewValue0(v.Pos, OpSub32, x.Type)
24607 v2 := b.NewValue0(v.Pos, OpConst32, x.Type)
24608 v2.AuxInt = int32ToAuxInt(d + 1)
24609 v1.AddArg2(x, v2)
24610 v.AddArg2(v0, v1)
24611 return true
24612 }
24613 break
24614 }
24615
24616
24617
24618 for {
24619 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
24620 if v_0.Op != OpLeq32U {
24621 continue
24622 }
24623 x := v_0.Args[1]
24624 v_0_0 := v_0.Args[0]
24625 if v_0_0.Op != OpConst32 {
24626 continue
24627 }
24628 c := auxIntToInt32(v_0_0.AuxInt)
24629 if v_1.Op != OpLeq32U {
24630 continue
24631 }
24632 _ = v_1.Args[1]
24633 if x != v_1.Args[0] {
24634 continue
24635 }
24636 v_1_1 := v_1.Args[1]
24637 if v_1_1.Op != OpConst32 {
24638 continue
24639 }
24640 d := auxIntToInt32(v_1_1.AuxInt)
24641 if !(uint32(c) >= uint32(d+1) && uint32(d+1) > uint32(d)) {
24642 continue
24643 }
24644 v.reset(OpLeq32U)
24645 v0 := b.NewValue0(v.Pos, OpConst32, x.Type)
24646 v0.AuxInt = int32ToAuxInt(c - d - 1)
24647 v1 := b.NewValue0(v.Pos, OpSub32, x.Type)
24648 v2 := b.NewValue0(v.Pos, OpConst32, x.Type)
24649 v2.AuxInt = int32ToAuxInt(d + 1)
24650 v1.AddArg2(x, v2)
24651 v.AddArg2(v0, v1)
24652 return true
24653 }
24654 break
24655 }
24656
24657
24658
24659 for {
24660 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
24661 if v_0.Op != OpLess16U {
24662 continue
24663 }
24664 x := v_0.Args[1]
24665 v_0_0 := v_0.Args[0]
24666 if v_0_0.Op != OpConst16 {
24667 continue
24668 }
24669 c := auxIntToInt16(v_0_0.AuxInt)
24670 if v_1.Op != OpLeq16U {
24671 continue
24672 }
24673 _ = v_1.Args[1]
24674 if x != v_1.Args[0] {
24675 continue
24676 }
24677 v_1_1 := v_1.Args[1]
24678 if v_1_1.Op != OpConst16 {
24679 continue
24680 }
24681 d := auxIntToInt16(v_1_1.AuxInt)
24682 if !(uint16(c) >= uint16(d+1) && uint16(d+1) > uint16(d)) {
24683 continue
24684 }
24685 v.reset(OpLess16U)
24686 v0 := b.NewValue0(v.Pos, OpConst16, x.Type)
24687 v0.AuxInt = int16ToAuxInt(c - d - 1)
24688 v1 := b.NewValue0(v.Pos, OpSub16, x.Type)
24689 v2 := b.NewValue0(v.Pos, OpConst16, x.Type)
24690 v2.AuxInt = int16ToAuxInt(d + 1)
24691 v1.AddArg2(x, v2)
24692 v.AddArg2(v0, v1)
24693 return true
24694 }
24695 break
24696 }
24697
24698
24699
24700 for {
24701 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
24702 if v_0.Op != OpLeq16U {
24703 continue
24704 }
24705 x := v_0.Args[1]
24706 v_0_0 := v_0.Args[0]
24707 if v_0_0.Op != OpConst16 {
24708 continue
24709 }
24710 c := auxIntToInt16(v_0_0.AuxInt)
24711 if v_1.Op != OpLeq16U {
24712 continue
24713 }
24714 _ = v_1.Args[1]
24715 if x != v_1.Args[0] {
24716 continue
24717 }
24718 v_1_1 := v_1.Args[1]
24719 if v_1_1.Op != OpConst16 {
24720 continue
24721 }
24722 d := auxIntToInt16(v_1_1.AuxInt)
24723 if !(uint16(c) >= uint16(d+1) && uint16(d+1) > uint16(d)) {
24724 continue
24725 }
24726 v.reset(OpLeq16U)
24727 v0 := b.NewValue0(v.Pos, OpConst16, x.Type)
24728 v0.AuxInt = int16ToAuxInt(c - d - 1)
24729 v1 := b.NewValue0(v.Pos, OpSub16, x.Type)
24730 v2 := b.NewValue0(v.Pos, OpConst16, x.Type)
24731 v2.AuxInt = int16ToAuxInt(d + 1)
24732 v1.AddArg2(x, v2)
24733 v.AddArg2(v0, v1)
24734 return true
24735 }
24736 break
24737 }
24738
24739
24740
24741 for {
24742 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
24743 if v_0.Op != OpLess8U {
24744 continue
24745 }
24746 x := v_0.Args[1]
24747 v_0_0 := v_0.Args[0]
24748 if v_0_0.Op != OpConst8 {
24749 continue
24750 }
24751 c := auxIntToInt8(v_0_0.AuxInt)
24752 if v_1.Op != OpLeq8U {
24753 continue
24754 }
24755 _ = v_1.Args[1]
24756 if x != v_1.Args[0] {
24757 continue
24758 }
24759 v_1_1 := v_1.Args[1]
24760 if v_1_1.Op != OpConst8 {
24761 continue
24762 }
24763 d := auxIntToInt8(v_1_1.AuxInt)
24764 if !(uint8(c) >= uint8(d+1) && uint8(d+1) > uint8(d)) {
24765 continue
24766 }
24767 v.reset(OpLess8U)
24768 v0 := b.NewValue0(v.Pos, OpConst8, x.Type)
24769 v0.AuxInt = int8ToAuxInt(c - d - 1)
24770 v1 := b.NewValue0(v.Pos, OpSub8, x.Type)
24771 v2 := b.NewValue0(v.Pos, OpConst8, x.Type)
24772 v2.AuxInt = int8ToAuxInt(d + 1)
24773 v1.AddArg2(x, v2)
24774 v.AddArg2(v0, v1)
24775 return true
24776 }
24777 break
24778 }
24779
24780
24781
24782 for {
24783 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
24784 if v_0.Op != OpLeq8U {
24785 continue
24786 }
24787 x := v_0.Args[1]
24788 v_0_0 := v_0.Args[0]
24789 if v_0_0.Op != OpConst8 {
24790 continue
24791 }
24792 c := auxIntToInt8(v_0_0.AuxInt)
24793 if v_1.Op != OpLeq8U {
24794 continue
24795 }
24796 _ = v_1.Args[1]
24797 if x != v_1.Args[0] {
24798 continue
24799 }
24800 v_1_1 := v_1.Args[1]
24801 if v_1_1.Op != OpConst8 {
24802 continue
24803 }
24804 d := auxIntToInt8(v_1_1.AuxInt)
24805 if !(uint8(c) >= uint8(d+1) && uint8(d+1) > uint8(d)) {
24806 continue
24807 }
24808 v.reset(OpLeq8U)
24809 v0 := b.NewValue0(v.Pos, OpConst8, x.Type)
24810 v0.AuxInt = int8ToAuxInt(c - d - 1)
24811 v1 := b.NewValue0(v.Pos, OpSub8, x.Type)
24812 v2 := b.NewValue0(v.Pos, OpConst8, x.Type)
24813 v2.AuxInt = int8ToAuxInt(d + 1)
24814 v1.AddArg2(x, v2)
24815 v.AddArg2(v0, v1)
24816 return true
24817 }
24818 break
24819 }
24820 return false
24821 }
24822 func rewriteValuegeneric_OpPhi(v *Value) bool {
24823 b := v.Block
24824
24825
24826 for {
24827 if len(v.Args) != 2 {
24828 break
24829 }
24830 _ = v.Args[1]
24831 v_0 := v.Args[0]
24832 if v_0.Op != OpConst8 {
24833 break
24834 }
24835 c := auxIntToInt8(v_0.AuxInt)
24836 v_1 := v.Args[1]
24837 if v_1.Op != OpConst8 || auxIntToInt8(v_1.AuxInt) != c {
24838 break
24839 }
24840 v.reset(OpConst8)
24841 v.AuxInt = int8ToAuxInt(c)
24842 return true
24843 }
24844
24845
24846 for {
24847 if len(v.Args) != 2 {
24848 break
24849 }
24850 _ = v.Args[1]
24851 v_0 := v.Args[0]
24852 if v_0.Op != OpConst16 {
24853 break
24854 }
24855 c := auxIntToInt16(v_0.AuxInt)
24856 v_1 := v.Args[1]
24857 if v_1.Op != OpConst16 || auxIntToInt16(v_1.AuxInt) != c {
24858 break
24859 }
24860 v.reset(OpConst16)
24861 v.AuxInt = int16ToAuxInt(c)
24862 return true
24863 }
24864
24865
24866 for {
24867 if len(v.Args) != 2 {
24868 break
24869 }
24870 _ = v.Args[1]
24871 v_0 := v.Args[0]
24872 if v_0.Op != OpConst32 {
24873 break
24874 }
24875 c := auxIntToInt32(v_0.AuxInt)
24876 v_1 := v.Args[1]
24877 if v_1.Op != OpConst32 || auxIntToInt32(v_1.AuxInt) != c {
24878 break
24879 }
24880 v.reset(OpConst32)
24881 v.AuxInt = int32ToAuxInt(c)
24882 return true
24883 }
24884
24885
24886 for {
24887 if len(v.Args) != 2 {
24888 break
24889 }
24890 _ = v.Args[1]
24891 v_0 := v.Args[0]
24892 if v_0.Op != OpConst64 {
24893 break
24894 }
24895 c := auxIntToInt64(v_0.AuxInt)
24896 v_1 := v.Args[1]
24897 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != c {
24898 break
24899 }
24900 v.reset(OpConst64)
24901 v.AuxInt = int64ToAuxInt(c)
24902 return true
24903 }
24904
24905
24906
24907 for {
24908 if len(v.Args) != 2 {
24909 break
24910 }
24911 t := v.Type
24912 _ = v.Args[1]
24913 nx := v.Args[0]
24914 if nx.Op != OpNot {
24915 break
24916 }
24917 x := nx.Args[0]
24918 ny := v.Args[1]
24919 if ny.Op != OpNot {
24920 break
24921 }
24922 y := ny.Args[0]
24923 if !(nx.Uses == 1 && ny.Uses == 1) {
24924 break
24925 }
24926 v.reset(OpNot)
24927 v0 := b.NewValue0(v.Pos, OpPhi, t)
24928 v0.AddArg2(x, y)
24929 v.AddArg(v0)
24930 return true
24931 }
24932 return false
24933 }
24934 func rewriteValuegeneric_OpPopCount16(v *Value) bool {
24935 v_0 := v.Args[0]
24936 b := v.Block
24937 config := b.Func.Config
24938
24939
24940
24941 for {
24942 if v_0.Op != OpConst16 {
24943 break
24944 }
24945 c := auxIntToInt16(v_0.AuxInt)
24946 if !(config.PtrSize == 8) {
24947 break
24948 }
24949 v.reset(OpConst64)
24950 v.AuxInt = int64ToAuxInt(int64(bits.OnesCount16(uint16(c))))
24951 return true
24952 }
24953
24954
24955
24956 for {
24957 if v_0.Op != OpConst16 {
24958 break
24959 }
24960 c := auxIntToInt16(v_0.AuxInt)
24961 if !(config.PtrSize == 4) {
24962 break
24963 }
24964 v.reset(OpConst32)
24965 v.AuxInt = int32ToAuxInt(int32(bits.OnesCount16(uint16(c))))
24966 return true
24967 }
24968 return false
24969 }
24970 func rewriteValuegeneric_OpPopCount32(v *Value) bool {
24971 v_0 := v.Args[0]
24972 b := v.Block
24973 config := b.Func.Config
24974
24975
24976
24977 for {
24978 if v_0.Op != OpConst32 {
24979 break
24980 }
24981 c := auxIntToInt32(v_0.AuxInt)
24982 if !(config.PtrSize == 8) {
24983 break
24984 }
24985 v.reset(OpConst64)
24986 v.AuxInt = int64ToAuxInt(int64(bits.OnesCount32(uint32(c))))
24987 return true
24988 }
24989
24990
24991
24992 for {
24993 if v_0.Op != OpConst32 {
24994 break
24995 }
24996 c := auxIntToInt32(v_0.AuxInt)
24997 if !(config.PtrSize == 4) {
24998 break
24999 }
25000 v.reset(OpConst32)
25001 v.AuxInt = int32ToAuxInt(int32(bits.OnesCount32(uint32(c))))
25002 return true
25003 }
25004 return false
25005 }
25006 func rewriteValuegeneric_OpPopCount64(v *Value) bool {
25007 v_0 := v.Args[0]
25008 b := v.Block
25009 config := b.Func.Config
25010
25011
25012
25013 for {
25014 if v_0.Op != OpConst64 {
25015 break
25016 }
25017 c := auxIntToInt64(v_0.AuxInt)
25018 if !(config.PtrSize == 8) {
25019 break
25020 }
25021 v.reset(OpConst64)
25022 v.AuxInt = int64ToAuxInt(int64(bits.OnesCount64(uint64(c))))
25023 return true
25024 }
25025
25026
25027
25028 for {
25029 if v_0.Op != OpConst64 {
25030 break
25031 }
25032 c := auxIntToInt64(v_0.AuxInt)
25033 if !(config.PtrSize == 4) {
25034 break
25035 }
25036 v.reset(OpConst32)
25037 v.AuxInt = int32ToAuxInt(int32(bits.OnesCount64(uint64(c))))
25038 return true
25039 }
25040 return false
25041 }
25042 func rewriteValuegeneric_OpPopCount8(v *Value) bool {
25043 v_0 := v.Args[0]
25044 b := v.Block
25045 config := b.Func.Config
25046
25047
25048
25049 for {
25050 if v_0.Op != OpConst8 {
25051 break
25052 }
25053 c := auxIntToInt8(v_0.AuxInt)
25054 if !(config.PtrSize == 8) {
25055 break
25056 }
25057 v.reset(OpConst64)
25058 v.AuxInt = int64ToAuxInt(int64(bits.OnesCount8(uint8(c))))
25059 return true
25060 }
25061
25062
25063
25064 for {
25065 if v_0.Op != OpConst8 {
25066 break
25067 }
25068 c := auxIntToInt8(v_0.AuxInt)
25069 if !(config.PtrSize == 4) {
25070 break
25071 }
25072 v.reset(OpConst32)
25073 v.AuxInt = int32ToAuxInt(int32(bits.OnesCount8(uint8(c))))
25074 return true
25075 }
25076 return false
25077 }
25078 func rewriteValuegeneric_OpPtrIndex(v *Value) bool {
25079 v_1 := v.Args[1]
25080 v_0 := v.Args[0]
25081 b := v.Block
25082 config := b.Func.Config
25083 typ := &b.Func.Config.Types
25084
25085
25086
25087 for {
25088 t := v.Type
25089 ptr := v_0
25090 idx := v_1
25091 if !(config.PtrSize == 4 && is32Bit(t.Elem().Size())) {
25092 break
25093 }
25094 v.reset(OpAddPtr)
25095 v0 := b.NewValue0(v.Pos, OpMul32, typ.Int)
25096 v1 := b.NewValue0(v.Pos, OpConst32, typ.Int)
25097 v1.AuxInt = int32ToAuxInt(int32(t.Elem().Size()))
25098 v0.AddArg2(idx, v1)
25099 v.AddArg2(ptr, v0)
25100 return true
25101 }
25102
25103
25104
25105 for {
25106 t := v.Type
25107 ptr := v_0
25108 idx := v_1
25109 if !(config.PtrSize == 8) {
25110 break
25111 }
25112 v.reset(OpAddPtr)
25113 v0 := b.NewValue0(v.Pos, OpMul64, typ.Int)
25114 v1 := b.NewValue0(v.Pos, OpConst64, typ.Int)
25115 v1.AuxInt = int64ToAuxInt(t.Elem().Size())
25116 v0.AddArg2(idx, v1)
25117 v.AddArg2(ptr, v0)
25118 return true
25119 }
25120 return false
25121 }
25122 func rewriteValuegeneric_OpRotateLeft16(v *Value) bool {
25123 v_1 := v.Args[1]
25124 v_0 := v.Args[0]
25125 b := v.Block
25126 config := b.Func.Config
25127
25128
25129
25130 for {
25131 x := v_0
25132 if v_1.Op != OpConst16 {
25133 break
25134 }
25135 c := auxIntToInt16(v_1.AuxInt)
25136 if !(c%16 == 0) {
25137 break
25138 }
25139 v.copyOf(x)
25140 return true
25141 }
25142
25143
25144
25145 for {
25146 x := v_0
25147 if v_1.Op != OpAnd64 {
25148 break
25149 }
25150 _ = v_1.Args[1]
25151 v_1_0 := v_1.Args[0]
25152 v_1_1 := v_1.Args[1]
25153 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
25154 y := v_1_0
25155 if v_1_1.Op != OpConst64 {
25156 continue
25157 }
25158 c := auxIntToInt64(v_1_1.AuxInt)
25159 if !(c&15 == 15) {
25160 continue
25161 }
25162 v.reset(OpRotateLeft16)
25163 v.AddArg2(x, y)
25164 return true
25165 }
25166 break
25167 }
25168
25169
25170
25171 for {
25172 x := v_0
25173 if v_1.Op != OpAnd32 {
25174 break
25175 }
25176 _ = v_1.Args[1]
25177 v_1_0 := v_1.Args[0]
25178 v_1_1 := v_1.Args[1]
25179 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
25180 y := v_1_0
25181 if v_1_1.Op != OpConst32 {
25182 continue
25183 }
25184 c := auxIntToInt32(v_1_1.AuxInt)
25185 if !(c&15 == 15) {
25186 continue
25187 }
25188 v.reset(OpRotateLeft16)
25189 v.AddArg2(x, y)
25190 return true
25191 }
25192 break
25193 }
25194
25195
25196
25197 for {
25198 x := v_0
25199 if v_1.Op != OpAnd16 {
25200 break
25201 }
25202 _ = v_1.Args[1]
25203 v_1_0 := v_1.Args[0]
25204 v_1_1 := v_1.Args[1]
25205 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
25206 y := v_1_0
25207 if v_1_1.Op != OpConst16 {
25208 continue
25209 }
25210 c := auxIntToInt16(v_1_1.AuxInt)
25211 if !(c&15 == 15) {
25212 continue
25213 }
25214 v.reset(OpRotateLeft16)
25215 v.AddArg2(x, y)
25216 return true
25217 }
25218 break
25219 }
25220
25221
25222
25223 for {
25224 x := v_0
25225 if v_1.Op != OpAnd8 {
25226 break
25227 }
25228 _ = v_1.Args[1]
25229 v_1_0 := v_1.Args[0]
25230 v_1_1 := v_1.Args[1]
25231 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
25232 y := v_1_0
25233 if v_1_1.Op != OpConst8 {
25234 continue
25235 }
25236 c := auxIntToInt8(v_1_1.AuxInt)
25237 if !(c&15 == 15) {
25238 continue
25239 }
25240 v.reset(OpRotateLeft16)
25241 v.AddArg2(x, y)
25242 return true
25243 }
25244 break
25245 }
25246
25247
25248
25249 for {
25250 x := v_0
25251 if v_1.Op != OpNeg64 {
25252 break
25253 }
25254 v_1_0 := v_1.Args[0]
25255 if v_1_0.Op != OpAnd64 {
25256 break
25257 }
25258 _ = v_1_0.Args[1]
25259 v_1_0_0 := v_1_0.Args[0]
25260 v_1_0_1 := v_1_0.Args[1]
25261 for _i0 := 0; _i0 <= 1; _i0, v_1_0_0, v_1_0_1 = _i0+1, v_1_0_1, v_1_0_0 {
25262 y := v_1_0_0
25263 if v_1_0_1.Op != OpConst64 {
25264 continue
25265 }
25266 c := auxIntToInt64(v_1_0_1.AuxInt)
25267 if !(c&15 == 15) {
25268 continue
25269 }
25270 v.reset(OpRotateLeft16)
25271 v0 := b.NewValue0(v.Pos, OpNeg64, y.Type)
25272 v0.AddArg(y)
25273 v.AddArg2(x, v0)
25274 return true
25275 }
25276 break
25277 }
25278
25279
25280
25281 for {
25282 x := v_0
25283 if v_1.Op != OpNeg32 {
25284 break
25285 }
25286 v_1_0 := v_1.Args[0]
25287 if v_1_0.Op != OpAnd32 {
25288 break
25289 }
25290 _ = v_1_0.Args[1]
25291 v_1_0_0 := v_1_0.Args[0]
25292 v_1_0_1 := v_1_0.Args[1]
25293 for _i0 := 0; _i0 <= 1; _i0, v_1_0_0, v_1_0_1 = _i0+1, v_1_0_1, v_1_0_0 {
25294 y := v_1_0_0
25295 if v_1_0_1.Op != OpConst32 {
25296 continue
25297 }
25298 c := auxIntToInt32(v_1_0_1.AuxInt)
25299 if !(c&15 == 15) {
25300 continue
25301 }
25302 v.reset(OpRotateLeft16)
25303 v0 := b.NewValue0(v.Pos, OpNeg32, y.Type)
25304 v0.AddArg(y)
25305 v.AddArg2(x, v0)
25306 return true
25307 }
25308 break
25309 }
25310
25311
25312
25313 for {
25314 x := v_0
25315 if v_1.Op != OpNeg16 {
25316 break
25317 }
25318 v_1_0 := v_1.Args[0]
25319 if v_1_0.Op != OpAnd16 {
25320 break
25321 }
25322 _ = v_1_0.Args[1]
25323 v_1_0_0 := v_1_0.Args[0]
25324 v_1_0_1 := v_1_0.Args[1]
25325 for _i0 := 0; _i0 <= 1; _i0, v_1_0_0, v_1_0_1 = _i0+1, v_1_0_1, v_1_0_0 {
25326 y := v_1_0_0
25327 if v_1_0_1.Op != OpConst16 {
25328 continue
25329 }
25330 c := auxIntToInt16(v_1_0_1.AuxInt)
25331 if !(c&15 == 15) {
25332 continue
25333 }
25334 v.reset(OpRotateLeft16)
25335 v0 := b.NewValue0(v.Pos, OpNeg16, y.Type)
25336 v0.AddArg(y)
25337 v.AddArg2(x, v0)
25338 return true
25339 }
25340 break
25341 }
25342
25343
25344
25345 for {
25346 x := v_0
25347 if v_1.Op != OpNeg8 {
25348 break
25349 }
25350 v_1_0 := v_1.Args[0]
25351 if v_1_0.Op != OpAnd8 {
25352 break
25353 }
25354 _ = v_1_0.Args[1]
25355 v_1_0_0 := v_1_0.Args[0]
25356 v_1_0_1 := v_1_0.Args[1]
25357 for _i0 := 0; _i0 <= 1; _i0, v_1_0_0, v_1_0_1 = _i0+1, v_1_0_1, v_1_0_0 {
25358 y := v_1_0_0
25359 if v_1_0_1.Op != OpConst8 {
25360 continue
25361 }
25362 c := auxIntToInt8(v_1_0_1.AuxInt)
25363 if !(c&15 == 15) {
25364 continue
25365 }
25366 v.reset(OpRotateLeft16)
25367 v0 := b.NewValue0(v.Pos, OpNeg8, y.Type)
25368 v0.AddArg(y)
25369 v.AddArg2(x, v0)
25370 return true
25371 }
25372 break
25373 }
25374
25375
25376
25377 for {
25378 x := v_0
25379 if v_1.Op != OpAdd64 {
25380 break
25381 }
25382 _ = v_1.Args[1]
25383 v_1_0 := v_1.Args[0]
25384 v_1_1 := v_1.Args[1]
25385 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
25386 y := v_1_0
25387 if v_1_1.Op != OpConst64 {
25388 continue
25389 }
25390 c := auxIntToInt64(v_1_1.AuxInt)
25391 if !(c&15 == 0) {
25392 continue
25393 }
25394 v.reset(OpRotateLeft16)
25395 v.AddArg2(x, y)
25396 return true
25397 }
25398 break
25399 }
25400
25401
25402
25403 for {
25404 x := v_0
25405 if v_1.Op != OpAdd32 {
25406 break
25407 }
25408 _ = v_1.Args[1]
25409 v_1_0 := v_1.Args[0]
25410 v_1_1 := v_1.Args[1]
25411 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
25412 y := v_1_0
25413 if v_1_1.Op != OpConst32 {
25414 continue
25415 }
25416 c := auxIntToInt32(v_1_1.AuxInt)
25417 if !(c&15 == 0) {
25418 continue
25419 }
25420 v.reset(OpRotateLeft16)
25421 v.AddArg2(x, y)
25422 return true
25423 }
25424 break
25425 }
25426
25427
25428
25429 for {
25430 x := v_0
25431 if v_1.Op != OpAdd16 {
25432 break
25433 }
25434 _ = v_1.Args[1]
25435 v_1_0 := v_1.Args[0]
25436 v_1_1 := v_1.Args[1]
25437 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
25438 y := v_1_0
25439 if v_1_1.Op != OpConst16 {
25440 continue
25441 }
25442 c := auxIntToInt16(v_1_1.AuxInt)
25443 if !(c&15 == 0) {
25444 continue
25445 }
25446 v.reset(OpRotateLeft16)
25447 v.AddArg2(x, y)
25448 return true
25449 }
25450 break
25451 }
25452
25453
25454
25455 for {
25456 x := v_0
25457 if v_1.Op != OpAdd8 {
25458 break
25459 }
25460 _ = v_1.Args[1]
25461 v_1_0 := v_1.Args[0]
25462 v_1_1 := v_1.Args[1]
25463 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
25464 y := v_1_0
25465 if v_1_1.Op != OpConst8 {
25466 continue
25467 }
25468 c := auxIntToInt8(v_1_1.AuxInt)
25469 if !(c&15 == 0) {
25470 continue
25471 }
25472 v.reset(OpRotateLeft16)
25473 v.AddArg2(x, y)
25474 return true
25475 }
25476 break
25477 }
25478
25479
25480
25481 for {
25482 x := v_0
25483 if v_1.Op != OpSub64 {
25484 break
25485 }
25486 y := v_1.Args[1]
25487 v_1_0 := v_1.Args[0]
25488 if v_1_0.Op != OpConst64 {
25489 break
25490 }
25491 c := auxIntToInt64(v_1_0.AuxInt)
25492 if !(c&15 == 0) {
25493 break
25494 }
25495 v.reset(OpRotateLeft16)
25496 v0 := b.NewValue0(v.Pos, OpNeg64, y.Type)
25497 v0.AddArg(y)
25498 v.AddArg2(x, v0)
25499 return true
25500 }
25501
25502
25503
25504 for {
25505 x := v_0
25506 if v_1.Op != OpSub32 {
25507 break
25508 }
25509 y := v_1.Args[1]
25510 v_1_0 := v_1.Args[0]
25511 if v_1_0.Op != OpConst32 {
25512 break
25513 }
25514 c := auxIntToInt32(v_1_0.AuxInt)
25515 if !(c&15 == 0) {
25516 break
25517 }
25518 v.reset(OpRotateLeft16)
25519 v0 := b.NewValue0(v.Pos, OpNeg32, y.Type)
25520 v0.AddArg(y)
25521 v.AddArg2(x, v0)
25522 return true
25523 }
25524
25525
25526
25527 for {
25528 x := v_0
25529 if v_1.Op != OpSub16 {
25530 break
25531 }
25532 y := v_1.Args[1]
25533 v_1_0 := v_1.Args[0]
25534 if v_1_0.Op != OpConst16 {
25535 break
25536 }
25537 c := auxIntToInt16(v_1_0.AuxInt)
25538 if !(c&15 == 0) {
25539 break
25540 }
25541 v.reset(OpRotateLeft16)
25542 v0 := b.NewValue0(v.Pos, OpNeg16, y.Type)
25543 v0.AddArg(y)
25544 v.AddArg2(x, v0)
25545 return true
25546 }
25547
25548
25549
25550 for {
25551 x := v_0
25552 if v_1.Op != OpSub8 {
25553 break
25554 }
25555 y := v_1.Args[1]
25556 v_1_0 := v_1.Args[0]
25557 if v_1_0.Op != OpConst8 {
25558 break
25559 }
25560 c := auxIntToInt8(v_1_0.AuxInt)
25561 if !(c&15 == 0) {
25562 break
25563 }
25564 v.reset(OpRotateLeft16)
25565 v0 := b.NewValue0(v.Pos, OpNeg8, y.Type)
25566 v0.AddArg(y)
25567 v.AddArg2(x, v0)
25568 return true
25569 }
25570
25571
25572
25573 for {
25574 x := v_0
25575 if v_1.Op != OpConst64 {
25576 break
25577 }
25578 t := v_1.Type
25579 c := auxIntToInt64(v_1.AuxInt)
25580 if !(config.PtrSize == 4) {
25581 break
25582 }
25583 v.reset(OpRotateLeft16)
25584 v0 := b.NewValue0(v.Pos, OpConst32, t)
25585 v0.AuxInt = int32ToAuxInt(int32(c))
25586 v.AddArg2(x, v0)
25587 return true
25588 }
25589
25590
25591
25592 for {
25593 if v_0.Op != OpRotateLeft16 {
25594 break
25595 }
25596 c := v_0.Args[1]
25597 x := v_0.Args[0]
25598 d := v_1
25599 if !(c.Type.Size() == 8 && d.Type.Size() == 8) {
25600 break
25601 }
25602 v.reset(OpRotateLeft16)
25603 v0 := b.NewValue0(v.Pos, OpAdd64, c.Type)
25604 v0.AddArg2(c, d)
25605 v.AddArg2(x, v0)
25606 return true
25607 }
25608
25609
25610
25611 for {
25612 if v_0.Op != OpRotateLeft16 {
25613 break
25614 }
25615 c := v_0.Args[1]
25616 x := v_0.Args[0]
25617 d := v_1
25618 if !(c.Type.Size() == 4 && d.Type.Size() == 4) {
25619 break
25620 }
25621 v.reset(OpRotateLeft16)
25622 v0 := b.NewValue0(v.Pos, OpAdd32, c.Type)
25623 v0.AddArg2(c, d)
25624 v.AddArg2(x, v0)
25625 return true
25626 }
25627
25628
25629
25630 for {
25631 if v_0.Op != OpRotateLeft16 {
25632 break
25633 }
25634 c := v_0.Args[1]
25635 x := v_0.Args[0]
25636 d := v_1
25637 if !(c.Type.Size() == 2 && d.Type.Size() == 2) {
25638 break
25639 }
25640 v.reset(OpRotateLeft16)
25641 v0 := b.NewValue0(v.Pos, OpAdd16, c.Type)
25642 v0.AddArg2(c, d)
25643 v.AddArg2(x, v0)
25644 return true
25645 }
25646
25647
25648
25649 for {
25650 if v_0.Op != OpRotateLeft16 {
25651 break
25652 }
25653 c := v_0.Args[1]
25654 x := v_0.Args[0]
25655 d := v_1
25656 if !(c.Type.Size() == 1 && d.Type.Size() == 1) {
25657 break
25658 }
25659 v.reset(OpRotateLeft16)
25660 v0 := b.NewValue0(v.Pos, OpAdd8, c.Type)
25661 v0.AddArg2(c, d)
25662 v.AddArg2(x, v0)
25663 return true
25664 }
25665 return false
25666 }
25667 func rewriteValuegeneric_OpRotateLeft32(v *Value) bool {
25668 v_1 := v.Args[1]
25669 v_0 := v.Args[0]
25670 b := v.Block
25671 config := b.Func.Config
25672
25673
25674
25675 for {
25676 x := v_0
25677 if v_1.Op != OpConst32 {
25678 break
25679 }
25680 c := auxIntToInt32(v_1.AuxInt)
25681 if !(c%32 == 0) {
25682 break
25683 }
25684 v.copyOf(x)
25685 return true
25686 }
25687
25688
25689
25690 for {
25691 x := v_0
25692 if v_1.Op != OpAnd64 {
25693 break
25694 }
25695 _ = v_1.Args[1]
25696 v_1_0 := v_1.Args[0]
25697 v_1_1 := v_1.Args[1]
25698 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
25699 y := v_1_0
25700 if v_1_1.Op != OpConst64 {
25701 continue
25702 }
25703 c := auxIntToInt64(v_1_1.AuxInt)
25704 if !(c&31 == 31) {
25705 continue
25706 }
25707 v.reset(OpRotateLeft32)
25708 v.AddArg2(x, y)
25709 return true
25710 }
25711 break
25712 }
25713
25714
25715
25716 for {
25717 x := v_0
25718 if v_1.Op != OpAnd32 {
25719 break
25720 }
25721 _ = v_1.Args[1]
25722 v_1_0 := v_1.Args[0]
25723 v_1_1 := v_1.Args[1]
25724 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
25725 y := v_1_0
25726 if v_1_1.Op != OpConst32 {
25727 continue
25728 }
25729 c := auxIntToInt32(v_1_1.AuxInt)
25730 if !(c&31 == 31) {
25731 continue
25732 }
25733 v.reset(OpRotateLeft32)
25734 v.AddArg2(x, y)
25735 return true
25736 }
25737 break
25738 }
25739
25740
25741
25742 for {
25743 x := v_0
25744 if v_1.Op != OpAnd16 {
25745 break
25746 }
25747 _ = v_1.Args[1]
25748 v_1_0 := v_1.Args[0]
25749 v_1_1 := v_1.Args[1]
25750 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
25751 y := v_1_0
25752 if v_1_1.Op != OpConst16 {
25753 continue
25754 }
25755 c := auxIntToInt16(v_1_1.AuxInt)
25756 if !(c&31 == 31) {
25757 continue
25758 }
25759 v.reset(OpRotateLeft32)
25760 v.AddArg2(x, y)
25761 return true
25762 }
25763 break
25764 }
25765
25766
25767
25768 for {
25769 x := v_0
25770 if v_1.Op != OpAnd8 {
25771 break
25772 }
25773 _ = v_1.Args[1]
25774 v_1_0 := v_1.Args[0]
25775 v_1_1 := v_1.Args[1]
25776 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
25777 y := v_1_0
25778 if v_1_1.Op != OpConst8 {
25779 continue
25780 }
25781 c := auxIntToInt8(v_1_1.AuxInt)
25782 if !(c&31 == 31) {
25783 continue
25784 }
25785 v.reset(OpRotateLeft32)
25786 v.AddArg2(x, y)
25787 return true
25788 }
25789 break
25790 }
25791
25792
25793
25794 for {
25795 x := v_0
25796 if v_1.Op != OpNeg64 {
25797 break
25798 }
25799 v_1_0 := v_1.Args[0]
25800 if v_1_0.Op != OpAnd64 {
25801 break
25802 }
25803 _ = v_1_0.Args[1]
25804 v_1_0_0 := v_1_0.Args[0]
25805 v_1_0_1 := v_1_0.Args[1]
25806 for _i0 := 0; _i0 <= 1; _i0, v_1_0_0, v_1_0_1 = _i0+1, v_1_0_1, v_1_0_0 {
25807 y := v_1_0_0
25808 if v_1_0_1.Op != OpConst64 {
25809 continue
25810 }
25811 c := auxIntToInt64(v_1_0_1.AuxInt)
25812 if !(c&31 == 31) {
25813 continue
25814 }
25815 v.reset(OpRotateLeft32)
25816 v0 := b.NewValue0(v.Pos, OpNeg64, y.Type)
25817 v0.AddArg(y)
25818 v.AddArg2(x, v0)
25819 return true
25820 }
25821 break
25822 }
25823
25824
25825
25826 for {
25827 x := v_0
25828 if v_1.Op != OpNeg32 {
25829 break
25830 }
25831 v_1_0 := v_1.Args[0]
25832 if v_1_0.Op != OpAnd32 {
25833 break
25834 }
25835 _ = v_1_0.Args[1]
25836 v_1_0_0 := v_1_0.Args[0]
25837 v_1_0_1 := v_1_0.Args[1]
25838 for _i0 := 0; _i0 <= 1; _i0, v_1_0_0, v_1_0_1 = _i0+1, v_1_0_1, v_1_0_0 {
25839 y := v_1_0_0
25840 if v_1_0_1.Op != OpConst32 {
25841 continue
25842 }
25843 c := auxIntToInt32(v_1_0_1.AuxInt)
25844 if !(c&31 == 31) {
25845 continue
25846 }
25847 v.reset(OpRotateLeft32)
25848 v0 := b.NewValue0(v.Pos, OpNeg32, y.Type)
25849 v0.AddArg(y)
25850 v.AddArg2(x, v0)
25851 return true
25852 }
25853 break
25854 }
25855
25856
25857
25858 for {
25859 x := v_0
25860 if v_1.Op != OpNeg16 {
25861 break
25862 }
25863 v_1_0 := v_1.Args[0]
25864 if v_1_0.Op != OpAnd16 {
25865 break
25866 }
25867 _ = v_1_0.Args[1]
25868 v_1_0_0 := v_1_0.Args[0]
25869 v_1_0_1 := v_1_0.Args[1]
25870 for _i0 := 0; _i0 <= 1; _i0, v_1_0_0, v_1_0_1 = _i0+1, v_1_0_1, v_1_0_0 {
25871 y := v_1_0_0
25872 if v_1_0_1.Op != OpConst16 {
25873 continue
25874 }
25875 c := auxIntToInt16(v_1_0_1.AuxInt)
25876 if !(c&31 == 31) {
25877 continue
25878 }
25879 v.reset(OpRotateLeft32)
25880 v0 := b.NewValue0(v.Pos, OpNeg16, y.Type)
25881 v0.AddArg(y)
25882 v.AddArg2(x, v0)
25883 return true
25884 }
25885 break
25886 }
25887
25888
25889
25890 for {
25891 x := v_0
25892 if v_1.Op != OpNeg8 {
25893 break
25894 }
25895 v_1_0 := v_1.Args[0]
25896 if v_1_0.Op != OpAnd8 {
25897 break
25898 }
25899 _ = v_1_0.Args[1]
25900 v_1_0_0 := v_1_0.Args[0]
25901 v_1_0_1 := v_1_0.Args[1]
25902 for _i0 := 0; _i0 <= 1; _i0, v_1_0_0, v_1_0_1 = _i0+1, v_1_0_1, v_1_0_0 {
25903 y := v_1_0_0
25904 if v_1_0_1.Op != OpConst8 {
25905 continue
25906 }
25907 c := auxIntToInt8(v_1_0_1.AuxInt)
25908 if !(c&31 == 31) {
25909 continue
25910 }
25911 v.reset(OpRotateLeft32)
25912 v0 := b.NewValue0(v.Pos, OpNeg8, y.Type)
25913 v0.AddArg(y)
25914 v.AddArg2(x, v0)
25915 return true
25916 }
25917 break
25918 }
25919
25920
25921
25922 for {
25923 x := v_0
25924 if v_1.Op != OpAdd64 {
25925 break
25926 }
25927 _ = v_1.Args[1]
25928 v_1_0 := v_1.Args[0]
25929 v_1_1 := v_1.Args[1]
25930 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
25931 y := v_1_0
25932 if v_1_1.Op != OpConst64 {
25933 continue
25934 }
25935 c := auxIntToInt64(v_1_1.AuxInt)
25936 if !(c&31 == 0) {
25937 continue
25938 }
25939 v.reset(OpRotateLeft32)
25940 v.AddArg2(x, y)
25941 return true
25942 }
25943 break
25944 }
25945
25946
25947
25948 for {
25949 x := v_0
25950 if v_1.Op != OpAdd32 {
25951 break
25952 }
25953 _ = v_1.Args[1]
25954 v_1_0 := v_1.Args[0]
25955 v_1_1 := v_1.Args[1]
25956 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
25957 y := v_1_0
25958 if v_1_1.Op != OpConst32 {
25959 continue
25960 }
25961 c := auxIntToInt32(v_1_1.AuxInt)
25962 if !(c&31 == 0) {
25963 continue
25964 }
25965 v.reset(OpRotateLeft32)
25966 v.AddArg2(x, y)
25967 return true
25968 }
25969 break
25970 }
25971
25972
25973
25974 for {
25975 x := v_0
25976 if v_1.Op != OpAdd16 {
25977 break
25978 }
25979 _ = v_1.Args[1]
25980 v_1_0 := v_1.Args[0]
25981 v_1_1 := v_1.Args[1]
25982 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
25983 y := v_1_0
25984 if v_1_1.Op != OpConst16 {
25985 continue
25986 }
25987 c := auxIntToInt16(v_1_1.AuxInt)
25988 if !(c&31 == 0) {
25989 continue
25990 }
25991 v.reset(OpRotateLeft32)
25992 v.AddArg2(x, y)
25993 return true
25994 }
25995 break
25996 }
25997
25998
25999
26000 for {
26001 x := v_0
26002 if v_1.Op != OpAdd8 {
26003 break
26004 }
26005 _ = v_1.Args[1]
26006 v_1_0 := v_1.Args[0]
26007 v_1_1 := v_1.Args[1]
26008 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
26009 y := v_1_0
26010 if v_1_1.Op != OpConst8 {
26011 continue
26012 }
26013 c := auxIntToInt8(v_1_1.AuxInt)
26014 if !(c&31 == 0) {
26015 continue
26016 }
26017 v.reset(OpRotateLeft32)
26018 v.AddArg2(x, y)
26019 return true
26020 }
26021 break
26022 }
26023
26024
26025
26026 for {
26027 x := v_0
26028 if v_1.Op != OpSub64 {
26029 break
26030 }
26031 y := v_1.Args[1]
26032 v_1_0 := v_1.Args[0]
26033 if v_1_0.Op != OpConst64 {
26034 break
26035 }
26036 c := auxIntToInt64(v_1_0.AuxInt)
26037 if !(c&31 == 0) {
26038 break
26039 }
26040 v.reset(OpRotateLeft32)
26041 v0 := b.NewValue0(v.Pos, OpNeg64, y.Type)
26042 v0.AddArg(y)
26043 v.AddArg2(x, v0)
26044 return true
26045 }
26046
26047
26048
26049 for {
26050 x := v_0
26051 if v_1.Op != OpSub32 {
26052 break
26053 }
26054 y := v_1.Args[1]
26055 v_1_0 := v_1.Args[0]
26056 if v_1_0.Op != OpConst32 {
26057 break
26058 }
26059 c := auxIntToInt32(v_1_0.AuxInt)
26060 if !(c&31 == 0) {
26061 break
26062 }
26063 v.reset(OpRotateLeft32)
26064 v0 := b.NewValue0(v.Pos, OpNeg32, y.Type)
26065 v0.AddArg(y)
26066 v.AddArg2(x, v0)
26067 return true
26068 }
26069
26070
26071
26072 for {
26073 x := v_0
26074 if v_1.Op != OpSub16 {
26075 break
26076 }
26077 y := v_1.Args[1]
26078 v_1_0 := v_1.Args[0]
26079 if v_1_0.Op != OpConst16 {
26080 break
26081 }
26082 c := auxIntToInt16(v_1_0.AuxInt)
26083 if !(c&31 == 0) {
26084 break
26085 }
26086 v.reset(OpRotateLeft32)
26087 v0 := b.NewValue0(v.Pos, OpNeg16, y.Type)
26088 v0.AddArg(y)
26089 v.AddArg2(x, v0)
26090 return true
26091 }
26092
26093
26094
26095 for {
26096 x := v_0
26097 if v_1.Op != OpSub8 {
26098 break
26099 }
26100 y := v_1.Args[1]
26101 v_1_0 := v_1.Args[0]
26102 if v_1_0.Op != OpConst8 {
26103 break
26104 }
26105 c := auxIntToInt8(v_1_0.AuxInt)
26106 if !(c&31 == 0) {
26107 break
26108 }
26109 v.reset(OpRotateLeft32)
26110 v0 := b.NewValue0(v.Pos, OpNeg8, y.Type)
26111 v0.AddArg(y)
26112 v.AddArg2(x, v0)
26113 return true
26114 }
26115
26116
26117
26118 for {
26119 x := v_0
26120 if v_1.Op != OpConst64 {
26121 break
26122 }
26123 t := v_1.Type
26124 c := auxIntToInt64(v_1.AuxInt)
26125 if !(config.PtrSize == 4) {
26126 break
26127 }
26128 v.reset(OpRotateLeft32)
26129 v0 := b.NewValue0(v.Pos, OpConst32, t)
26130 v0.AuxInt = int32ToAuxInt(int32(c))
26131 v.AddArg2(x, v0)
26132 return true
26133 }
26134
26135
26136
26137 for {
26138 if v_0.Op != OpRotateLeft32 {
26139 break
26140 }
26141 c := v_0.Args[1]
26142 x := v_0.Args[0]
26143 d := v_1
26144 if !(c.Type.Size() == 8 && d.Type.Size() == 8) {
26145 break
26146 }
26147 v.reset(OpRotateLeft32)
26148 v0 := b.NewValue0(v.Pos, OpAdd64, c.Type)
26149 v0.AddArg2(c, d)
26150 v.AddArg2(x, v0)
26151 return true
26152 }
26153
26154
26155
26156 for {
26157 if v_0.Op != OpRotateLeft32 {
26158 break
26159 }
26160 c := v_0.Args[1]
26161 x := v_0.Args[0]
26162 d := v_1
26163 if !(c.Type.Size() == 4 && d.Type.Size() == 4) {
26164 break
26165 }
26166 v.reset(OpRotateLeft32)
26167 v0 := b.NewValue0(v.Pos, OpAdd32, c.Type)
26168 v0.AddArg2(c, d)
26169 v.AddArg2(x, v0)
26170 return true
26171 }
26172
26173
26174
26175 for {
26176 if v_0.Op != OpRotateLeft32 {
26177 break
26178 }
26179 c := v_0.Args[1]
26180 x := v_0.Args[0]
26181 d := v_1
26182 if !(c.Type.Size() == 2 && d.Type.Size() == 2) {
26183 break
26184 }
26185 v.reset(OpRotateLeft32)
26186 v0 := b.NewValue0(v.Pos, OpAdd16, c.Type)
26187 v0.AddArg2(c, d)
26188 v.AddArg2(x, v0)
26189 return true
26190 }
26191
26192
26193
26194 for {
26195 if v_0.Op != OpRotateLeft32 {
26196 break
26197 }
26198 c := v_0.Args[1]
26199 x := v_0.Args[0]
26200 d := v_1
26201 if !(c.Type.Size() == 1 && d.Type.Size() == 1) {
26202 break
26203 }
26204 v.reset(OpRotateLeft32)
26205 v0 := b.NewValue0(v.Pos, OpAdd8, c.Type)
26206 v0.AddArg2(c, d)
26207 v.AddArg2(x, v0)
26208 return true
26209 }
26210 return false
26211 }
26212 func rewriteValuegeneric_OpRotateLeft64(v *Value) bool {
26213 v_1 := v.Args[1]
26214 v_0 := v.Args[0]
26215 b := v.Block
26216 config := b.Func.Config
26217
26218
26219
26220 for {
26221 x := v_0
26222 if v_1.Op != OpConst64 {
26223 break
26224 }
26225 c := auxIntToInt64(v_1.AuxInt)
26226 if !(c%64 == 0) {
26227 break
26228 }
26229 v.copyOf(x)
26230 return true
26231 }
26232
26233
26234
26235 for {
26236 x := v_0
26237 if v_1.Op != OpAnd64 {
26238 break
26239 }
26240 _ = v_1.Args[1]
26241 v_1_0 := v_1.Args[0]
26242 v_1_1 := v_1.Args[1]
26243 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
26244 y := v_1_0
26245 if v_1_1.Op != OpConst64 {
26246 continue
26247 }
26248 c := auxIntToInt64(v_1_1.AuxInt)
26249 if !(c&63 == 63) {
26250 continue
26251 }
26252 v.reset(OpRotateLeft64)
26253 v.AddArg2(x, y)
26254 return true
26255 }
26256 break
26257 }
26258
26259
26260
26261 for {
26262 x := v_0
26263 if v_1.Op != OpAnd32 {
26264 break
26265 }
26266 _ = v_1.Args[1]
26267 v_1_0 := v_1.Args[0]
26268 v_1_1 := v_1.Args[1]
26269 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
26270 y := v_1_0
26271 if v_1_1.Op != OpConst32 {
26272 continue
26273 }
26274 c := auxIntToInt32(v_1_1.AuxInt)
26275 if !(c&63 == 63) {
26276 continue
26277 }
26278 v.reset(OpRotateLeft64)
26279 v.AddArg2(x, y)
26280 return true
26281 }
26282 break
26283 }
26284
26285
26286
26287 for {
26288 x := v_0
26289 if v_1.Op != OpAnd16 {
26290 break
26291 }
26292 _ = v_1.Args[1]
26293 v_1_0 := v_1.Args[0]
26294 v_1_1 := v_1.Args[1]
26295 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
26296 y := v_1_0
26297 if v_1_1.Op != OpConst16 {
26298 continue
26299 }
26300 c := auxIntToInt16(v_1_1.AuxInt)
26301 if !(c&63 == 63) {
26302 continue
26303 }
26304 v.reset(OpRotateLeft64)
26305 v.AddArg2(x, y)
26306 return true
26307 }
26308 break
26309 }
26310
26311
26312
26313 for {
26314 x := v_0
26315 if v_1.Op != OpAnd8 {
26316 break
26317 }
26318 _ = v_1.Args[1]
26319 v_1_0 := v_1.Args[0]
26320 v_1_1 := v_1.Args[1]
26321 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
26322 y := v_1_0
26323 if v_1_1.Op != OpConst8 {
26324 continue
26325 }
26326 c := auxIntToInt8(v_1_1.AuxInt)
26327 if !(c&63 == 63) {
26328 continue
26329 }
26330 v.reset(OpRotateLeft64)
26331 v.AddArg2(x, y)
26332 return true
26333 }
26334 break
26335 }
26336
26337
26338
26339 for {
26340 x := v_0
26341 if v_1.Op != OpNeg64 {
26342 break
26343 }
26344 v_1_0 := v_1.Args[0]
26345 if v_1_0.Op != OpAnd64 {
26346 break
26347 }
26348 _ = v_1_0.Args[1]
26349 v_1_0_0 := v_1_0.Args[0]
26350 v_1_0_1 := v_1_0.Args[1]
26351 for _i0 := 0; _i0 <= 1; _i0, v_1_0_0, v_1_0_1 = _i0+1, v_1_0_1, v_1_0_0 {
26352 y := v_1_0_0
26353 if v_1_0_1.Op != OpConst64 {
26354 continue
26355 }
26356 c := auxIntToInt64(v_1_0_1.AuxInt)
26357 if !(c&63 == 63) {
26358 continue
26359 }
26360 v.reset(OpRotateLeft64)
26361 v0 := b.NewValue0(v.Pos, OpNeg64, y.Type)
26362 v0.AddArg(y)
26363 v.AddArg2(x, v0)
26364 return true
26365 }
26366 break
26367 }
26368
26369
26370
26371 for {
26372 x := v_0
26373 if v_1.Op != OpNeg32 {
26374 break
26375 }
26376 v_1_0 := v_1.Args[0]
26377 if v_1_0.Op != OpAnd32 {
26378 break
26379 }
26380 _ = v_1_0.Args[1]
26381 v_1_0_0 := v_1_0.Args[0]
26382 v_1_0_1 := v_1_0.Args[1]
26383 for _i0 := 0; _i0 <= 1; _i0, v_1_0_0, v_1_0_1 = _i0+1, v_1_0_1, v_1_0_0 {
26384 y := v_1_0_0
26385 if v_1_0_1.Op != OpConst32 {
26386 continue
26387 }
26388 c := auxIntToInt32(v_1_0_1.AuxInt)
26389 if !(c&63 == 63) {
26390 continue
26391 }
26392 v.reset(OpRotateLeft64)
26393 v0 := b.NewValue0(v.Pos, OpNeg32, y.Type)
26394 v0.AddArg(y)
26395 v.AddArg2(x, v0)
26396 return true
26397 }
26398 break
26399 }
26400
26401
26402
26403 for {
26404 x := v_0
26405 if v_1.Op != OpNeg16 {
26406 break
26407 }
26408 v_1_0 := v_1.Args[0]
26409 if v_1_0.Op != OpAnd16 {
26410 break
26411 }
26412 _ = v_1_0.Args[1]
26413 v_1_0_0 := v_1_0.Args[0]
26414 v_1_0_1 := v_1_0.Args[1]
26415 for _i0 := 0; _i0 <= 1; _i0, v_1_0_0, v_1_0_1 = _i0+1, v_1_0_1, v_1_0_0 {
26416 y := v_1_0_0
26417 if v_1_0_1.Op != OpConst16 {
26418 continue
26419 }
26420 c := auxIntToInt16(v_1_0_1.AuxInt)
26421 if !(c&63 == 63) {
26422 continue
26423 }
26424 v.reset(OpRotateLeft64)
26425 v0 := b.NewValue0(v.Pos, OpNeg16, y.Type)
26426 v0.AddArg(y)
26427 v.AddArg2(x, v0)
26428 return true
26429 }
26430 break
26431 }
26432
26433
26434
26435 for {
26436 x := v_0
26437 if v_1.Op != OpNeg8 {
26438 break
26439 }
26440 v_1_0 := v_1.Args[0]
26441 if v_1_0.Op != OpAnd8 {
26442 break
26443 }
26444 _ = v_1_0.Args[1]
26445 v_1_0_0 := v_1_0.Args[0]
26446 v_1_0_1 := v_1_0.Args[1]
26447 for _i0 := 0; _i0 <= 1; _i0, v_1_0_0, v_1_0_1 = _i0+1, v_1_0_1, v_1_0_0 {
26448 y := v_1_0_0
26449 if v_1_0_1.Op != OpConst8 {
26450 continue
26451 }
26452 c := auxIntToInt8(v_1_0_1.AuxInt)
26453 if !(c&63 == 63) {
26454 continue
26455 }
26456 v.reset(OpRotateLeft64)
26457 v0 := b.NewValue0(v.Pos, OpNeg8, y.Type)
26458 v0.AddArg(y)
26459 v.AddArg2(x, v0)
26460 return true
26461 }
26462 break
26463 }
26464
26465
26466
26467 for {
26468 x := v_0
26469 if v_1.Op != OpAdd64 {
26470 break
26471 }
26472 _ = v_1.Args[1]
26473 v_1_0 := v_1.Args[0]
26474 v_1_1 := v_1.Args[1]
26475 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
26476 y := v_1_0
26477 if v_1_1.Op != OpConst64 {
26478 continue
26479 }
26480 c := auxIntToInt64(v_1_1.AuxInt)
26481 if !(c&63 == 0) {
26482 continue
26483 }
26484 v.reset(OpRotateLeft64)
26485 v.AddArg2(x, y)
26486 return true
26487 }
26488 break
26489 }
26490
26491
26492
26493 for {
26494 x := v_0
26495 if v_1.Op != OpAdd32 {
26496 break
26497 }
26498 _ = v_1.Args[1]
26499 v_1_0 := v_1.Args[0]
26500 v_1_1 := v_1.Args[1]
26501 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
26502 y := v_1_0
26503 if v_1_1.Op != OpConst32 {
26504 continue
26505 }
26506 c := auxIntToInt32(v_1_1.AuxInt)
26507 if !(c&63 == 0) {
26508 continue
26509 }
26510 v.reset(OpRotateLeft64)
26511 v.AddArg2(x, y)
26512 return true
26513 }
26514 break
26515 }
26516
26517
26518
26519 for {
26520 x := v_0
26521 if v_1.Op != OpAdd16 {
26522 break
26523 }
26524 _ = v_1.Args[1]
26525 v_1_0 := v_1.Args[0]
26526 v_1_1 := v_1.Args[1]
26527 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
26528 y := v_1_0
26529 if v_1_1.Op != OpConst16 {
26530 continue
26531 }
26532 c := auxIntToInt16(v_1_1.AuxInt)
26533 if !(c&63 == 0) {
26534 continue
26535 }
26536 v.reset(OpRotateLeft64)
26537 v.AddArg2(x, y)
26538 return true
26539 }
26540 break
26541 }
26542
26543
26544
26545 for {
26546 x := v_0
26547 if v_1.Op != OpAdd8 {
26548 break
26549 }
26550 _ = v_1.Args[1]
26551 v_1_0 := v_1.Args[0]
26552 v_1_1 := v_1.Args[1]
26553 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
26554 y := v_1_0
26555 if v_1_1.Op != OpConst8 {
26556 continue
26557 }
26558 c := auxIntToInt8(v_1_1.AuxInt)
26559 if !(c&63 == 0) {
26560 continue
26561 }
26562 v.reset(OpRotateLeft64)
26563 v.AddArg2(x, y)
26564 return true
26565 }
26566 break
26567 }
26568
26569
26570
26571 for {
26572 x := v_0
26573 if v_1.Op != OpSub64 {
26574 break
26575 }
26576 y := v_1.Args[1]
26577 v_1_0 := v_1.Args[0]
26578 if v_1_0.Op != OpConst64 {
26579 break
26580 }
26581 c := auxIntToInt64(v_1_0.AuxInt)
26582 if !(c&63 == 0) {
26583 break
26584 }
26585 v.reset(OpRotateLeft64)
26586 v0 := b.NewValue0(v.Pos, OpNeg64, y.Type)
26587 v0.AddArg(y)
26588 v.AddArg2(x, v0)
26589 return true
26590 }
26591
26592
26593
26594 for {
26595 x := v_0
26596 if v_1.Op != OpSub32 {
26597 break
26598 }
26599 y := v_1.Args[1]
26600 v_1_0 := v_1.Args[0]
26601 if v_1_0.Op != OpConst32 {
26602 break
26603 }
26604 c := auxIntToInt32(v_1_0.AuxInt)
26605 if !(c&63 == 0) {
26606 break
26607 }
26608 v.reset(OpRotateLeft64)
26609 v0 := b.NewValue0(v.Pos, OpNeg32, y.Type)
26610 v0.AddArg(y)
26611 v.AddArg2(x, v0)
26612 return true
26613 }
26614
26615
26616
26617 for {
26618 x := v_0
26619 if v_1.Op != OpSub16 {
26620 break
26621 }
26622 y := v_1.Args[1]
26623 v_1_0 := v_1.Args[0]
26624 if v_1_0.Op != OpConst16 {
26625 break
26626 }
26627 c := auxIntToInt16(v_1_0.AuxInt)
26628 if !(c&63 == 0) {
26629 break
26630 }
26631 v.reset(OpRotateLeft64)
26632 v0 := b.NewValue0(v.Pos, OpNeg16, y.Type)
26633 v0.AddArg(y)
26634 v.AddArg2(x, v0)
26635 return true
26636 }
26637
26638
26639
26640 for {
26641 x := v_0
26642 if v_1.Op != OpSub8 {
26643 break
26644 }
26645 y := v_1.Args[1]
26646 v_1_0 := v_1.Args[0]
26647 if v_1_0.Op != OpConst8 {
26648 break
26649 }
26650 c := auxIntToInt8(v_1_0.AuxInt)
26651 if !(c&63 == 0) {
26652 break
26653 }
26654 v.reset(OpRotateLeft64)
26655 v0 := b.NewValue0(v.Pos, OpNeg8, y.Type)
26656 v0.AddArg(y)
26657 v.AddArg2(x, v0)
26658 return true
26659 }
26660
26661
26662
26663 for {
26664 x := v_0
26665 if v_1.Op != OpConst64 {
26666 break
26667 }
26668 t := v_1.Type
26669 c := auxIntToInt64(v_1.AuxInt)
26670 if !(config.PtrSize == 4) {
26671 break
26672 }
26673 v.reset(OpRotateLeft64)
26674 v0 := b.NewValue0(v.Pos, OpConst32, t)
26675 v0.AuxInt = int32ToAuxInt(int32(c))
26676 v.AddArg2(x, v0)
26677 return true
26678 }
26679
26680
26681
26682 for {
26683 if v_0.Op != OpRotateLeft64 {
26684 break
26685 }
26686 c := v_0.Args[1]
26687 x := v_0.Args[0]
26688 d := v_1
26689 if !(c.Type.Size() == 8 && d.Type.Size() == 8) {
26690 break
26691 }
26692 v.reset(OpRotateLeft64)
26693 v0 := b.NewValue0(v.Pos, OpAdd64, c.Type)
26694 v0.AddArg2(c, d)
26695 v.AddArg2(x, v0)
26696 return true
26697 }
26698
26699
26700
26701 for {
26702 if v_0.Op != OpRotateLeft64 {
26703 break
26704 }
26705 c := v_0.Args[1]
26706 x := v_0.Args[0]
26707 d := v_1
26708 if !(c.Type.Size() == 4 && d.Type.Size() == 4) {
26709 break
26710 }
26711 v.reset(OpRotateLeft64)
26712 v0 := b.NewValue0(v.Pos, OpAdd32, c.Type)
26713 v0.AddArg2(c, d)
26714 v.AddArg2(x, v0)
26715 return true
26716 }
26717
26718
26719
26720 for {
26721 if v_0.Op != OpRotateLeft64 {
26722 break
26723 }
26724 c := v_0.Args[1]
26725 x := v_0.Args[0]
26726 d := v_1
26727 if !(c.Type.Size() == 2 && d.Type.Size() == 2) {
26728 break
26729 }
26730 v.reset(OpRotateLeft64)
26731 v0 := b.NewValue0(v.Pos, OpAdd16, c.Type)
26732 v0.AddArg2(c, d)
26733 v.AddArg2(x, v0)
26734 return true
26735 }
26736
26737
26738
26739 for {
26740 if v_0.Op != OpRotateLeft64 {
26741 break
26742 }
26743 c := v_0.Args[1]
26744 x := v_0.Args[0]
26745 d := v_1
26746 if !(c.Type.Size() == 1 && d.Type.Size() == 1) {
26747 break
26748 }
26749 v.reset(OpRotateLeft64)
26750 v0 := b.NewValue0(v.Pos, OpAdd8, c.Type)
26751 v0.AddArg2(c, d)
26752 v.AddArg2(x, v0)
26753 return true
26754 }
26755 return false
26756 }
26757 func rewriteValuegeneric_OpRotateLeft8(v *Value) bool {
26758 v_1 := v.Args[1]
26759 v_0 := v.Args[0]
26760 b := v.Block
26761 config := b.Func.Config
26762
26763
26764
26765 for {
26766 x := v_0
26767 if v_1.Op != OpConst8 {
26768 break
26769 }
26770 c := auxIntToInt8(v_1.AuxInt)
26771 if !(c%8 == 0) {
26772 break
26773 }
26774 v.copyOf(x)
26775 return true
26776 }
26777
26778
26779
26780 for {
26781 x := v_0
26782 if v_1.Op != OpAnd64 {
26783 break
26784 }
26785 _ = v_1.Args[1]
26786 v_1_0 := v_1.Args[0]
26787 v_1_1 := v_1.Args[1]
26788 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
26789 y := v_1_0
26790 if v_1_1.Op != OpConst64 {
26791 continue
26792 }
26793 c := auxIntToInt64(v_1_1.AuxInt)
26794 if !(c&7 == 7) {
26795 continue
26796 }
26797 v.reset(OpRotateLeft8)
26798 v.AddArg2(x, y)
26799 return true
26800 }
26801 break
26802 }
26803
26804
26805
26806 for {
26807 x := v_0
26808 if v_1.Op != OpAnd32 {
26809 break
26810 }
26811 _ = v_1.Args[1]
26812 v_1_0 := v_1.Args[0]
26813 v_1_1 := v_1.Args[1]
26814 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
26815 y := v_1_0
26816 if v_1_1.Op != OpConst32 {
26817 continue
26818 }
26819 c := auxIntToInt32(v_1_1.AuxInt)
26820 if !(c&7 == 7) {
26821 continue
26822 }
26823 v.reset(OpRotateLeft8)
26824 v.AddArg2(x, y)
26825 return true
26826 }
26827 break
26828 }
26829
26830
26831
26832 for {
26833 x := v_0
26834 if v_1.Op != OpAnd16 {
26835 break
26836 }
26837 _ = v_1.Args[1]
26838 v_1_0 := v_1.Args[0]
26839 v_1_1 := v_1.Args[1]
26840 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
26841 y := v_1_0
26842 if v_1_1.Op != OpConst16 {
26843 continue
26844 }
26845 c := auxIntToInt16(v_1_1.AuxInt)
26846 if !(c&7 == 7) {
26847 continue
26848 }
26849 v.reset(OpRotateLeft8)
26850 v.AddArg2(x, y)
26851 return true
26852 }
26853 break
26854 }
26855
26856
26857
26858 for {
26859 x := v_0
26860 if v_1.Op != OpAnd8 {
26861 break
26862 }
26863 _ = v_1.Args[1]
26864 v_1_0 := v_1.Args[0]
26865 v_1_1 := v_1.Args[1]
26866 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
26867 y := v_1_0
26868 if v_1_1.Op != OpConst8 {
26869 continue
26870 }
26871 c := auxIntToInt8(v_1_1.AuxInt)
26872 if !(c&7 == 7) {
26873 continue
26874 }
26875 v.reset(OpRotateLeft8)
26876 v.AddArg2(x, y)
26877 return true
26878 }
26879 break
26880 }
26881
26882
26883
26884 for {
26885 x := v_0
26886 if v_1.Op != OpNeg64 {
26887 break
26888 }
26889 v_1_0 := v_1.Args[0]
26890 if v_1_0.Op != OpAnd64 {
26891 break
26892 }
26893 _ = v_1_0.Args[1]
26894 v_1_0_0 := v_1_0.Args[0]
26895 v_1_0_1 := v_1_0.Args[1]
26896 for _i0 := 0; _i0 <= 1; _i0, v_1_0_0, v_1_0_1 = _i0+1, v_1_0_1, v_1_0_0 {
26897 y := v_1_0_0
26898 if v_1_0_1.Op != OpConst64 {
26899 continue
26900 }
26901 c := auxIntToInt64(v_1_0_1.AuxInt)
26902 if !(c&7 == 7) {
26903 continue
26904 }
26905 v.reset(OpRotateLeft8)
26906 v0 := b.NewValue0(v.Pos, OpNeg64, y.Type)
26907 v0.AddArg(y)
26908 v.AddArg2(x, v0)
26909 return true
26910 }
26911 break
26912 }
26913
26914
26915
26916 for {
26917 x := v_0
26918 if v_1.Op != OpNeg32 {
26919 break
26920 }
26921 v_1_0 := v_1.Args[0]
26922 if v_1_0.Op != OpAnd32 {
26923 break
26924 }
26925 _ = v_1_0.Args[1]
26926 v_1_0_0 := v_1_0.Args[0]
26927 v_1_0_1 := v_1_0.Args[1]
26928 for _i0 := 0; _i0 <= 1; _i0, v_1_0_0, v_1_0_1 = _i0+1, v_1_0_1, v_1_0_0 {
26929 y := v_1_0_0
26930 if v_1_0_1.Op != OpConst32 {
26931 continue
26932 }
26933 c := auxIntToInt32(v_1_0_1.AuxInt)
26934 if !(c&7 == 7) {
26935 continue
26936 }
26937 v.reset(OpRotateLeft8)
26938 v0 := b.NewValue0(v.Pos, OpNeg32, y.Type)
26939 v0.AddArg(y)
26940 v.AddArg2(x, v0)
26941 return true
26942 }
26943 break
26944 }
26945
26946
26947
26948 for {
26949 x := v_0
26950 if v_1.Op != OpNeg16 {
26951 break
26952 }
26953 v_1_0 := v_1.Args[0]
26954 if v_1_0.Op != OpAnd16 {
26955 break
26956 }
26957 _ = v_1_0.Args[1]
26958 v_1_0_0 := v_1_0.Args[0]
26959 v_1_0_1 := v_1_0.Args[1]
26960 for _i0 := 0; _i0 <= 1; _i0, v_1_0_0, v_1_0_1 = _i0+1, v_1_0_1, v_1_0_0 {
26961 y := v_1_0_0
26962 if v_1_0_1.Op != OpConst16 {
26963 continue
26964 }
26965 c := auxIntToInt16(v_1_0_1.AuxInt)
26966 if !(c&7 == 7) {
26967 continue
26968 }
26969 v.reset(OpRotateLeft8)
26970 v0 := b.NewValue0(v.Pos, OpNeg16, y.Type)
26971 v0.AddArg(y)
26972 v.AddArg2(x, v0)
26973 return true
26974 }
26975 break
26976 }
26977
26978
26979
26980 for {
26981 x := v_0
26982 if v_1.Op != OpNeg8 {
26983 break
26984 }
26985 v_1_0 := v_1.Args[0]
26986 if v_1_0.Op != OpAnd8 {
26987 break
26988 }
26989 _ = v_1_0.Args[1]
26990 v_1_0_0 := v_1_0.Args[0]
26991 v_1_0_1 := v_1_0.Args[1]
26992 for _i0 := 0; _i0 <= 1; _i0, v_1_0_0, v_1_0_1 = _i0+1, v_1_0_1, v_1_0_0 {
26993 y := v_1_0_0
26994 if v_1_0_1.Op != OpConst8 {
26995 continue
26996 }
26997 c := auxIntToInt8(v_1_0_1.AuxInt)
26998 if !(c&7 == 7) {
26999 continue
27000 }
27001 v.reset(OpRotateLeft8)
27002 v0 := b.NewValue0(v.Pos, OpNeg8, y.Type)
27003 v0.AddArg(y)
27004 v.AddArg2(x, v0)
27005 return true
27006 }
27007 break
27008 }
27009
27010
27011
27012 for {
27013 x := v_0
27014 if v_1.Op != OpAdd64 {
27015 break
27016 }
27017 _ = v_1.Args[1]
27018 v_1_0 := v_1.Args[0]
27019 v_1_1 := v_1.Args[1]
27020 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
27021 y := v_1_0
27022 if v_1_1.Op != OpConst64 {
27023 continue
27024 }
27025 c := auxIntToInt64(v_1_1.AuxInt)
27026 if !(c&7 == 0) {
27027 continue
27028 }
27029 v.reset(OpRotateLeft8)
27030 v.AddArg2(x, y)
27031 return true
27032 }
27033 break
27034 }
27035
27036
27037
27038 for {
27039 x := v_0
27040 if v_1.Op != OpAdd32 {
27041 break
27042 }
27043 _ = v_1.Args[1]
27044 v_1_0 := v_1.Args[0]
27045 v_1_1 := v_1.Args[1]
27046 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
27047 y := v_1_0
27048 if v_1_1.Op != OpConst32 {
27049 continue
27050 }
27051 c := auxIntToInt32(v_1_1.AuxInt)
27052 if !(c&7 == 0) {
27053 continue
27054 }
27055 v.reset(OpRotateLeft8)
27056 v.AddArg2(x, y)
27057 return true
27058 }
27059 break
27060 }
27061
27062
27063
27064 for {
27065 x := v_0
27066 if v_1.Op != OpAdd16 {
27067 break
27068 }
27069 _ = v_1.Args[1]
27070 v_1_0 := v_1.Args[0]
27071 v_1_1 := v_1.Args[1]
27072 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
27073 y := v_1_0
27074 if v_1_1.Op != OpConst16 {
27075 continue
27076 }
27077 c := auxIntToInt16(v_1_1.AuxInt)
27078 if !(c&7 == 0) {
27079 continue
27080 }
27081 v.reset(OpRotateLeft8)
27082 v.AddArg2(x, y)
27083 return true
27084 }
27085 break
27086 }
27087
27088
27089
27090 for {
27091 x := v_0
27092 if v_1.Op != OpAdd8 {
27093 break
27094 }
27095 _ = v_1.Args[1]
27096 v_1_0 := v_1.Args[0]
27097 v_1_1 := v_1.Args[1]
27098 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
27099 y := v_1_0
27100 if v_1_1.Op != OpConst8 {
27101 continue
27102 }
27103 c := auxIntToInt8(v_1_1.AuxInt)
27104 if !(c&7 == 0) {
27105 continue
27106 }
27107 v.reset(OpRotateLeft8)
27108 v.AddArg2(x, y)
27109 return true
27110 }
27111 break
27112 }
27113
27114
27115
27116 for {
27117 x := v_0
27118 if v_1.Op != OpSub64 {
27119 break
27120 }
27121 y := v_1.Args[1]
27122 v_1_0 := v_1.Args[0]
27123 if v_1_0.Op != OpConst64 {
27124 break
27125 }
27126 c := auxIntToInt64(v_1_0.AuxInt)
27127 if !(c&7 == 0) {
27128 break
27129 }
27130 v.reset(OpRotateLeft8)
27131 v0 := b.NewValue0(v.Pos, OpNeg64, y.Type)
27132 v0.AddArg(y)
27133 v.AddArg2(x, v0)
27134 return true
27135 }
27136
27137
27138
27139 for {
27140 x := v_0
27141 if v_1.Op != OpSub32 {
27142 break
27143 }
27144 y := v_1.Args[1]
27145 v_1_0 := v_1.Args[0]
27146 if v_1_0.Op != OpConst32 {
27147 break
27148 }
27149 c := auxIntToInt32(v_1_0.AuxInt)
27150 if !(c&7 == 0) {
27151 break
27152 }
27153 v.reset(OpRotateLeft8)
27154 v0 := b.NewValue0(v.Pos, OpNeg32, y.Type)
27155 v0.AddArg(y)
27156 v.AddArg2(x, v0)
27157 return true
27158 }
27159
27160
27161
27162 for {
27163 x := v_0
27164 if v_1.Op != OpSub16 {
27165 break
27166 }
27167 y := v_1.Args[1]
27168 v_1_0 := v_1.Args[0]
27169 if v_1_0.Op != OpConst16 {
27170 break
27171 }
27172 c := auxIntToInt16(v_1_0.AuxInt)
27173 if !(c&7 == 0) {
27174 break
27175 }
27176 v.reset(OpRotateLeft8)
27177 v0 := b.NewValue0(v.Pos, OpNeg16, y.Type)
27178 v0.AddArg(y)
27179 v.AddArg2(x, v0)
27180 return true
27181 }
27182
27183
27184
27185 for {
27186 x := v_0
27187 if v_1.Op != OpSub8 {
27188 break
27189 }
27190 y := v_1.Args[1]
27191 v_1_0 := v_1.Args[0]
27192 if v_1_0.Op != OpConst8 {
27193 break
27194 }
27195 c := auxIntToInt8(v_1_0.AuxInt)
27196 if !(c&7 == 0) {
27197 break
27198 }
27199 v.reset(OpRotateLeft8)
27200 v0 := b.NewValue0(v.Pos, OpNeg8, y.Type)
27201 v0.AddArg(y)
27202 v.AddArg2(x, v0)
27203 return true
27204 }
27205
27206
27207
27208 for {
27209 x := v_0
27210 if v_1.Op != OpConst64 {
27211 break
27212 }
27213 t := v_1.Type
27214 c := auxIntToInt64(v_1.AuxInt)
27215 if !(config.PtrSize == 4) {
27216 break
27217 }
27218 v.reset(OpRotateLeft8)
27219 v0 := b.NewValue0(v.Pos, OpConst32, t)
27220 v0.AuxInt = int32ToAuxInt(int32(c))
27221 v.AddArg2(x, v0)
27222 return true
27223 }
27224
27225
27226
27227 for {
27228 if v_0.Op != OpRotateLeft8 {
27229 break
27230 }
27231 c := v_0.Args[1]
27232 x := v_0.Args[0]
27233 d := v_1
27234 if !(c.Type.Size() == 8 && d.Type.Size() == 8) {
27235 break
27236 }
27237 v.reset(OpRotateLeft8)
27238 v0 := b.NewValue0(v.Pos, OpAdd64, c.Type)
27239 v0.AddArg2(c, d)
27240 v.AddArg2(x, v0)
27241 return true
27242 }
27243
27244
27245
27246 for {
27247 if v_0.Op != OpRotateLeft8 {
27248 break
27249 }
27250 c := v_0.Args[1]
27251 x := v_0.Args[0]
27252 d := v_1
27253 if !(c.Type.Size() == 4 && d.Type.Size() == 4) {
27254 break
27255 }
27256 v.reset(OpRotateLeft8)
27257 v0 := b.NewValue0(v.Pos, OpAdd32, c.Type)
27258 v0.AddArg2(c, d)
27259 v.AddArg2(x, v0)
27260 return true
27261 }
27262
27263
27264
27265 for {
27266 if v_0.Op != OpRotateLeft8 {
27267 break
27268 }
27269 c := v_0.Args[1]
27270 x := v_0.Args[0]
27271 d := v_1
27272 if !(c.Type.Size() == 2 && d.Type.Size() == 2) {
27273 break
27274 }
27275 v.reset(OpRotateLeft8)
27276 v0 := b.NewValue0(v.Pos, OpAdd16, c.Type)
27277 v0.AddArg2(c, d)
27278 v.AddArg2(x, v0)
27279 return true
27280 }
27281
27282
27283
27284 for {
27285 if v_0.Op != OpRotateLeft8 {
27286 break
27287 }
27288 c := v_0.Args[1]
27289 x := v_0.Args[0]
27290 d := v_1
27291 if !(c.Type.Size() == 1 && d.Type.Size() == 1) {
27292 break
27293 }
27294 v.reset(OpRotateLeft8)
27295 v0 := b.NewValue0(v.Pos, OpAdd8, c.Type)
27296 v0.AddArg2(c, d)
27297 v.AddArg2(x, v0)
27298 return true
27299 }
27300 return false
27301 }
27302 func rewriteValuegeneric_OpRound32F(v *Value) bool {
27303 v_0 := v.Args[0]
27304
27305
27306 for {
27307 x := v_0
27308 if x.Op != OpConst32F {
27309 break
27310 }
27311 v.copyOf(x)
27312 return true
27313 }
27314 return false
27315 }
27316 func rewriteValuegeneric_OpRound64F(v *Value) bool {
27317 v_0 := v.Args[0]
27318
27319
27320 for {
27321 x := v_0
27322 if x.Op != OpConst64F {
27323 break
27324 }
27325 v.copyOf(x)
27326 return true
27327 }
27328 return false
27329 }
27330 func rewriteValuegeneric_OpRoundToEven(v *Value) bool {
27331 v_0 := v.Args[0]
27332
27333
27334 for {
27335 if v_0.Op != OpConst64F {
27336 break
27337 }
27338 c := auxIntToFloat64(v_0.AuxInt)
27339 v.reset(OpConst64F)
27340 v.AuxInt = float64ToAuxInt(math.RoundToEven(c))
27341 return true
27342 }
27343 return false
27344 }
27345 func rewriteValuegeneric_OpRsh16Ux16(v *Value) bool {
27346 v_1 := v.Args[1]
27347 v_0 := v.Args[0]
27348 b := v.Block
27349
27350
27351 for {
27352 t := v.Type
27353 x := v_0
27354 if v_1.Op != OpConst16 {
27355 break
27356 }
27357 c := auxIntToInt16(v_1.AuxInt)
27358 v.reset(OpRsh16Ux64)
27359 v0 := b.NewValue0(v.Pos, OpConst64, t)
27360 v0.AuxInt = int64ToAuxInt(int64(uint16(c)))
27361 v.AddArg2(x, v0)
27362 return true
27363 }
27364
27365
27366 for {
27367 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 {
27368 break
27369 }
27370 v.reset(OpConst16)
27371 v.AuxInt = int16ToAuxInt(0)
27372 return true
27373 }
27374 return false
27375 }
27376 func rewriteValuegeneric_OpRsh16Ux32(v *Value) bool {
27377 v_1 := v.Args[1]
27378 v_0 := v.Args[0]
27379 b := v.Block
27380
27381
27382 for {
27383 t := v.Type
27384 x := v_0
27385 if v_1.Op != OpConst32 {
27386 break
27387 }
27388 c := auxIntToInt32(v_1.AuxInt)
27389 v.reset(OpRsh16Ux64)
27390 v0 := b.NewValue0(v.Pos, OpConst64, t)
27391 v0.AuxInt = int64ToAuxInt(int64(uint32(c)))
27392 v.AddArg2(x, v0)
27393 return true
27394 }
27395
27396
27397 for {
27398 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 {
27399 break
27400 }
27401 v.reset(OpConst16)
27402 v.AuxInt = int16ToAuxInt(0)
27403 return true
27404 }
27405 return false
27406 }
27407 func rewriteValuegeneric_OpRsh16Ux64(v *Value) bool {
27408 v_1 := v.Args[1]
27409 v_0 := v.Args[0]
27410 b := v.Block
27411 typ := &b.Func.Config.Types
27412
27413
27414 for {
27415 if v_0.Op != OpConst16 {
27416 break
27417 }
27418 c := auxIntToInt16(v_0.AuxInt)
27419 if v_1.Op != OpConst64 {
27420 break
27421 }
27422 d := auxIntToInt64(v_1.AuxInt)
27423 v.reset(OpConst16)
27424 v.AuxInt = int16ToAuxInt(int16(uint16(c) >> uint64(d)))
27425 return true
27426 }
27427
27428
27429 for {
27430 x := v_0
27431 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 0 {
27432 break
27433 }
27434 v.copyOf(x)
27435 return true
27436 }
27437
27438
27439 for {
27440 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 {
27441 break
27442 }
27443 v.reset(OpConst16)
27444 v.AuxInt = int16ToAuxInt(0)
27445 return true
27446 }
27447
27448
27449
27450 for {
27451 if v_1.Op != OpConst64 {
27452 break
27453 }
27454 c := auxIntToInt64(v_1.AuxInt)
27455 if !(uint64(c) >= 16) {
27456 break
27457 }
27458 v.reset(OpConst16)
27459 v.AuxInt = int16ToAuxInt(0)
27460 return true
27461 }
27462
27463
27464
27465 for {
27466 t := v.Type
27467 if v_0.Op != OpRsh16Ux64 {
27468 break
27469 }
27470 _ = v_0.Args[1]
27471 x := v_0.Args[0]
27472 v_0_1 := v_0.Args[1]
27473 if v_0_1.Op != OpConst64 {
27474 break
27475 }
27476 c := auxIntToInt64(v_0_1.AuxInt)
27477 if v_1.Op != OpConst64 {
27478 break
27479 }
27480 d := auxIntToInt64(v_1.AuxInt)
27481 if !(!uaddOvf(c, d)) {
27482 break
27483 }
27484 v.reset(OpRsh16Ux64)
27485 v0 := b.NewValue0(v.Pos, OpConst64, t)
27486 v0.AuxInt = int64ToAuxInt(c + d)
27487 v.AddArg2(x, v0)
27488 return true
27489 }
27490
27491
27492 for {
27493 if v_0.Op != OpRsh16x64 {
27494 break
27495 }
27496 x := v_0.Args[0]
27497 if v_1.Op != OpConst64 {
27498 break
27499 }
27500 t := v_1.Type
27501 if auxIntToInt64(v_1.AuxInt) != 15 {
27502 break
27503 }
27504 v.reset(OpRsh16Ux64)
27505 v0 := b.NewValue0(v.Pos, OpConst64, t)
27506 v0.AuxInt = int64ToAuxInt(15)
27507 v.AddArg2(x, v0)
27508 return true
27509 }
27510
27511
27512
27513 for {
27514 i := v_0
27515 if i.Op != OpLsh16x64 {
27516 break
27517 }
27518 _ = i.Args[1]
27519 x := i.Args[0]
27520 i_1 := i.Args[1]
27521 if i_1.Op != OpConst64 {
27522 break
27523 }
27524 c := auxIntToInt64(i_1.AuxInt)
27525 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != c || !(c >= 0 && c < 16 && i.Uses == 1) {
27526 break
27527 }
27528 v.reset(OpAnd16)
27529 v0 := b.NewValue0(v.Pos, OpConst16, v.Type)
27530 v0.AuxInt = int16ToAuxInt(int16(^uint16(0) >> c))
27531 v.AddArg2(x, v0)
27532 return true
27533 }
27534
27535
27536
27537 for {
27538 if v_0.Op != OpLsh16x64 {
27539 break
27540 }
27541 _ = v_0.Args[1]
27542 v_0_0 := v_0.Args[0]
27543 if v_0_0.Op != OpRsh16Ux64 {
27544 break
27545 }
27546 _ = v_0_0.Args[1]
27547 x := v_0_0.Args[0]
27548 v_0_0_1 := v_0_0.Args[1]
27549 if v_0_0_1.Op != OpConst64 {
27550 break
27551 }
27552 c1 := auxIntToInt64(v_0_0_1.AuxInt)
27553 v_0_1 := v_0.Args[1]
27554 if v_0_1.Op != OpConst64 {
27555 break
27556 }
27557 c2 := auxIntToInt64(v_0_1.AuxInt)
27558 if v_1.Op != OpConst64 {
27559 break
27560 }
27561 c3 := auxIntToInt64(v_1.AuxInt)
27562 if !(uint64(c1) >= uint64(c2) && uint64(c3) >= uint64(c2) && !uaddOvf(c1-c2, c3)) {
27563 break
27564 }
27565 v.reset(OpRsh16Ux64)
27566 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
27567 v0.AuxInt = int64ToAuxInt(c1 - c2 + c3)
27568 v.AddArg2(x, v0)
27569 return true
27570 }
27571
27572
27573 for {
27574 if v_0.Op != OpLsh16x64 {
27575 break
27576 }
27577 _ = v_0.Args[1]
27578 x := v_0.Args[0]
27579 v_0_1 := v_0.Args[1]
27580 if v_0_1.Op != OpConst64 || auxIntToInt64(v_0_1.AuxInt) != 8 || v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 8 {
27581 break
27582 }
27583 v.reset(OpZeroExt8to16)
27584 v0 := b.NewValue0(v.Pos, OpTrunc16to8, typ.UInt8)
27585 v0.AddArg(x)
27586 v.AddArg(v0)
27587 return true
27588 }
27589 return false
27590 }
27591 func rewriteValuegeneric_OpRsh16Ux8(v *Value) bool {
27592 v_1 := v.Args[1]
27593 v_0 := v.Args[0]
27594 b := v.Block
27595
27596
27597 for {
27598 t := v.Type
27599 x := v_0
27600 if v_1.Op != OpConst8 {
27601 break
27602 }
27603 c := auxIntToInt8(v_1.AuxInt)
27604 v.reset(OpRsh16Ux64)
27605 v0 := b.NewValue0(v.Pos, OpConst64, t)
27606 v0.AuxInt = int64ToAuxInt(int64(uint8(c)))
27607 v.AddArg2(x, v0)
27608 return true
27609 }
27610
27611
27612 for {
27613 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 {
27614 break
27615 }
27616 v.reset(OpConst16)
27617 v.AuxInt = int16ToAuxInt(0)
27618 return true
27619 }
27620 return false
27621 }
27622 func rewriteValuegeneric_OpRsh16x16(v *Value) bool {
27623 v_1 := v.Args[1]
27624 v_0 := v.Args[0]
27625 b := v.Block
27626
27627
27628 for {
27629 t := v.Type
27630 x := v_0
27631 if v_1.Op != OpConst16 {
27632 break
27633 }
27634 c := auxIntToInt16(v_1.AuxInt)
27635 v.reset(OpRsh16x64)
27636 v0 := b.NewValue0(v.Pos, OpConst64, t)
27637 v0.AuxInt = int64ToAuxInt(int64(uint16(c)))
27638 v.AddArg2(x, v0)
27639 return true
27640 }
27641
27642
27643 for {
27644 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 {
27645 break
27646 }
27647 v.reset(OpConst16)
27648 v.AuxInt = int16ToAuxInt(0)
27649 return true
27650 }
27651 return false
27652 }
27653 func rewriteValuegeneric_OpRsh16x32(v *Value) bool {
27654 v_1 := v.Args[1]
27655 v_0 := v.Args[0]
27656 b := v.Block
27657
27658
27659 for {
27660 t := v.Type
27661 x := v_0
27662 if v_1.Op != OpConst32 {
27663 break
27664 }
27665 c := auxIntToInt32(v_1.AuxInt)
27666 v.reset(OpRsh16x64)
27667 v0 := b.NewValue0(v.Pos, OpConst64, t)
27668 v0.AuxInt = int64ToAuxInt(int64(uint32(c)))
27669 v.AddArg2(x, v0)
27670 return true
27671 }
27672
27673
27674 for {
27675 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 {
27676 break
27677 }
27678 v.reset(OpConst16)
27679 v.AuxInt = int16ToAuxInt(0)
27680 return true
27681 }
27682 return false
27683 }
27684 func rewriteValuegeneric_OpRsh16x64(v *Value) bool {
27685 v_1 := v.Args[1]
27686 v_0 := v.Args[0]
27687 b := v.Block
27688 typ := &b.Func.Config.Types
27689
27690
27691 for {
27692 if v_0.Op != OpConst16 {
27693 break
27694 }
27695 c := auxIntToInt16(v_0.AuxInt)
27696 if v_1.Op != OpConst64 {
27697 break
27698 }
27699 d := auxIntToInt64(v_1.AuxInt)
27700 v.reset(OpConst16)
27701 v.AuxInt = int16ToAuxInt(c >> uint64(d))
27702 return true
27703 }
27704
27705
27706 for {
27707 x := v_0
27708 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 0 {
27709 break
27710 }
27711 v.copyOf(x)
27712 return true
27713 }
27714
27715
27716 for {
27717 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 {
27718 break
27719 }
27720 v.reset(OpConst16)
27721 v.AuxInt = int16ToAuxInt(0)
27722 return true
27723 }
27724
27725
27726
27727 for {
27728 t := v.Type
27729 if v_0.Op != OpRsh16x64 {
27730 break
27731 }
27732 _ = v_0.Args[1]
27733 x := v_0.Args[0]
27734 v_0_1 := v_0.Args[1]
27735 if v_0_1.Op != OpConst64 {
27736 break
27737 }
27738 c := auxIntToInt64(v_0_1.AuxInt)
27739 if v_1.Op != OpConst64 {
27740 break
27741 }
27742 d := auxIntToInt64(v_1.AuxInt)
27743 if !(!uaddOvf(c, d)) {
27744 break
27745 }
27746 v.reset(OpRsh16x64)
27747 v0 := b.NewValue0(v.Pos, OpConst64, t)
27748 v0.AuxInt = int64ToAuxInt(c + d)
27749 v.AddArg2(x, v0)
27750 return true
27751 }
27752
27753
27754 for {
27755 if v_0.Op != OpLsh16x64 {
27756 break
27757 }
27758 _ = v_0.Args[1]
27759 x := v_0.Args[0]
27760 v_0_1 := v_0.Args[1]
27761 if v_0_1.Op != OpConst64 || auxIntToInt64(v_0_1.AuxInt) != 8 || v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 8 {
27762 break
27763 }
27764 v.reset(OpSignExt8to16)
27765 v0 := b.NewValue0(v.Pos, OpTrunc16to8, typ.Int8)
27766 v0.AddArg(x)
27767 v.AddArg(v0)
27768 return true
27769 }
27770 return false
27771 }
27772 func rewriteValuegeneric_OpRsh16x8(v *Value) bool {
27773 v_1 := v.Args[1]
27774 v_0 := v.Args[0]
27775 b := v.Block
27776
27777
27778 for {
27779 t := v.Type
27780 x := v_0
27781 if v_1.Op != OpConst8 {
27782 break
27783 }
27784 c := auxIntToInt8(v_1.AuxInt)
27785 v.reset(OpRsh16x64)
27786 v0 := b.NewValue0(v.Pos, OpConst64, t)
27787 v0.AuxInt = int64ToAuxInt(int64(uint8(c)))
27788 v.AddArg2(x, v0)
27789 return true
27790 }
27791
27792
27793 for {
27794 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 {
27795 break
27796 }
27797 v.reset(OpConst16)
27798 v.AuxInt = int16ToAuxInt(0)
27799 return true
27800 }
27801 return false
27802 }
27803 func rewriteValuegeneric_OpRsh32Ux16(v *Value) bool {
27804 v_1 := v.Args[1]
27805 v_0 := v.Args[0]
27806 b := v.Block
27807
27808
27809 for {
27810 t := v.Type
27811 x := v_0
27812 if v_1.Op != OpConst16 {
27813 break
27814 }
27815 c := auxIntToInt16(v_1.AuxInt)
27816 v.reset(OpRsh32Ux64)
27817 v0 := b.NewValue0(v.Pos, OpConst64, t)
27818 v0.AuxInt = int64ToAuxInt(int64(uint16(c)))
27819 v.AddArg2(x, v0)
27820 return true
27821 }
27822
27823
27824 for {
27825 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
27826 break
27827 }
27828 v.reset(OpConst32)
27829 v.AuxInt = int32ToAuxInt(0)
27830 return true
27831 }
27832 return false
27833 }
27834 func rewriteValuegeneric_OpRsh32Ux32(v *Value) bool {
27835 v_1 := v.Args[1]
27836 v_0 := v.Args[0]
27837 b := v.Block
27838
27839
27840 for {
27841 t := v.Type
27842 x := v_0
27843 if v_1.Op != OpConst32 {
27844 break
27845 }
27846 c := auxIntToInt32(v_1.AuxInt)
27847 v.reset(OpRsh32Ux64)
27848 v0 := b.NewValue0(v.Pos, OpConst64, t)
27849 v0.AuxInt = int64ToAuxInt(int64(uint32(c)))
27850 v.AddArg2(x, v0)
27851 return true
27852 }
27853
27854
27855 for {
27856 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
27857 break
27858 }
27859 v.reset(OpConst32)
27860 v.AuxInt = int32ToAuxInt(0)
27861 return true
27862 }
27863 return false
27864 }
27865 func rewriteValuegeneric_OpRsh32Ux64(v *Value) bool {
27866 v_1 := v.Args[1]
27867 v_0 := v.Args[0]
27868 b := v.Block
27869 typ := &b.Func.Config.Types
27870
27871
27872 for {
27873 if v_0.Op != OpConst32 {
27874 break
27875 }
27876 c := auxIntToInt32(v_0.AuxInt)
27877 if v_1.Op != OpConst64 {
27878 break
27879 }
27880 d := auxIntToInt64(v_1.AuxInt)
27881 v.reset(OpConst32)
27882 v.AuxInt = int32ToAuxInt(int32(uint32(c) >> uint64(d)))
27883 return true
27884 }
27885
27886
27887 for {
27888 x := v_0
27889 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 0 {
27890 break
27891 }
27892 v.copyOf(x)
27893 return true
27894 }
27895
27896
27897 for {
27898 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
27899 break
27900 }
27901 v.reset(OpConst32)
27902 v.AuxInt = int32ToAuxInt(0)
27903 return true
27904 }
27905
27906
27907
27908 for {
27909 if v_1.Op != OpConst64 {
27910 break
27911 }
27912 c := auxIntToInt64(v_1.AuxInt)
27913 if !(uint64(c) >= 32) {
27914 break
27915 }
27916 v.reset(OpConst32)
27917 v.AuxInt = int32ToAuxInt(0)
27918 return true
27919 }
27920
27921
27922
27923 for {
27924 t := v.Type
27925 if v_0.Op != OpRsh32Ux64 {
27926 break
27927 }
27928 _ = v_0.Args[1]
27929 x := v_0.Args[0]
27930 v_0_1 := v_0.Args[1]
27931 if v_0_1.Op != OpConst64 {
27932 break
27933 }
27934 c := auxIntToInt64(v_0_1.AuxInt)
27935 if v_1.Op != OpConst64 {
27936 break
27937 }
27938 d := auxIntToInt64(v_1.AuxInt)
27939 if !(!uaddOvf(c, d)) {
27940 break
27941 }
27942 v.reset(OpRsh32Ux64)
27943 v0 := b.NewValue0(v.Pos, OpConst64, t)
27944 v0.AuxInt = int64ToAuxInt(c + d)
27945 v.AddArg2(x, v0)
27946 return true
27947 }
27948
27949
27950 for {
27951 if v_0.Op != OpRsh32x64 {
27952 break
27953 }
27954 x := v_0.Args[0]
27955 if v_1.Op != OpConst64 {
27956 break
27957 }
27958 t := v_1.Type
27959 if auxIntToInt64(v_1.AuxInt) != 31 {
27960 break
27961 }
27962 v.reset(OpRsh32Ux64)
27963 v0 := b.NewValue0(v.Pos, OpConst64, t)
27964 v0.AuxInt = int64ToAuxInt(31)
27965 v.AddArg2(x, v0)
27966 return true
27967 }
27968
27969
27970
27971 for {
27972 i := v_0
27973 if i.Op != OpLsh32x64 {
27974 break
27975 }
27976 _ = i.Args[1]
27977 x := i.Args[0]
27978 i_1 := i.Args[1]
27979 if i_1.Op != OpConst64 {
27980 break
27981 }
27982 c := auxIntToInt64(i_1.AuxInt)
27983 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != c || !(c >= 0 && c < 32 && i.Uses == 1) {
27984 break
27985 }
27986 v.reset(OpAnd32)
27987 v0 := b.NewValue0(v.Pos, OpConst32, v.Type)
27988 v0.AuxInt = int32ToAuxInt(int32(^uint32(0) >> c))
27989 v.AddArg2(x, v0)
27990 return true
27991 }
27992
27993
27994
27995 for {
27996 if v_0.Op != OpLsh32x64 {
27997 break
27998 }
27999 _ = v_0.Args[1]
28000 v_0_0 := v_0.Args[0]
28001 if v_0_0.Op != OpRsh32Ux64 {
28002 break
28003 }
28004 _ = v_0_0.Args[1]
28005 x := v_0_0.Args[0]
28006 v_0_0_1 := v_0_0.Args[1]
28007 if v_0_0_1.Op != OpConst64 {
28008 break
28009 }
28010 c1 := auxIntToInt64(v_0_0_1.AuxInt)
28011 v_0_1 := v_0.Args[1]
28012 if v_0_1.Op != OpConst64 {
28013 break
28014 }
28015 c2 := auxIntToInt64(v_0_1.AuxInt)
28016 if v_1.Op != OpConst64 {
28017 break
28018 }
28019 c3 := auxIntToInt64(v_1.AuxInt)
28020 if !(uint64(c1) >= uint64(c2) && uint64(c3) >= uint64(c2) && !uaddOvf(c1-c2, c3)) {
28021 break
28022 }
28023 v.reset(OpRsh32Ux64)
28024 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
28025 v0.AuxInt = int64ToAuxInt(c1 - c2 + c3)
28026 v.AddArg2(x, v0)
28027 return true
28028 }
28029
28030
28031 for {
28032 if v_0.Op != OpLsh32x64 {
28033 break
28034 }
28035 _ = v_0.Args[1]
28036 x := v_0.Args[0]
28037 v_0_1 := v_0.Args[1]
28038 if v_0_1.Op != OpConst64 || auxIntToInt64(v_0_1.AuxInt) != 24 || v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 24 {
28039 break
28040 }
28041 v.reset(OpZeroExt8to32)
28042 v0 := b.NewValue0(v.Pos, OpTrunc32to8, typ.UInt8)
28043 v0.AddArg(x)
28044 v.AddArg(v0)
28045 return true
28046 }
28047
28048
28049 for {
28050 if v_0.Op != OpLsh32x64 {
28051 break
28052 }
28053 _ = v_0.Args[1]
28054 x := v_0.Args[0]
28055 v_0_1 := v_0.Args[1]
28056 if v_0_1.Op != OpConst64 || auxIntToInt64(v_0_1.AuxInt) != 16 || v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 16 {
28057 break
28058 }
28059 v.reset(OpZeroExt16to32)
28060 v0 := b.NewValue0(v.Pos, OpTrunc32to16, typ.UInt16)
28061 v0.AddArg(x)
28062 v.AddArg(v0)
28063 return true
28064 }
28065 return false
28066 }
28067 func rewriteValuegeneric_OpRsh32Ux8(v *Value) bool {
28068 v_1 := v.Args[1]
28069 v_0 := v.Args[0]
28070 b := v.Block
28071
28072
28073 for {
28074 t := v.Type
28075 x := v_0
28076 if v_1.Op != OpConst8 {
28077 break
28078 }
28079 c := auxIntToInt8(v_1.AuxInt)
28080 v.reset(OpRsh32Ux64)
28081 v0 := b.NewValue0(v.Pos, OpConst64, t)
28082 v0.AuxInt = int64ToAuxInt(int64(uint8(c)))
28083 v.AddArg2(x, v0)
28084 return true
28085 }
28086
28087
28088 for {
28089 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
28090 break
28091 }
28092 v.reset(OpConst32)
28093 v.AuxInt = int32ToAuxInt(0)
28094 return true
28095 }
28096 return false
28097 }
28098 func rewriteValuegeneric_OpRsh32x16(v *Value) bool {
28099 v_1 := v.Args[1]
28100 v_0 := v.Args[0]
28101 b := v.Block
28102
28103
28104 for {
28105 t := v.Type
28106 x := v_0
28107 if v_1.Op != OpConst16 {
28108 break
28109 }
28110 c := auxIntToInt16(v_1.AuxInt)
28111 v.reset(OpRsh32x64)
28112 v0 := b.NewValue0(v.Pos, OpConst64, t)
28113 v0.AuxInt = int64ToAuxInt(int64(uint16(c)))
28114 v.AddArg2(x, v0)
28115 return true
28116 }
28117
28118
28119 for {
28120 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
28121 break
28122 }
28123 v.reset(OpConst32)
28124 v.AuxInt = int32ToAuxInt(0)
28125 return true
28126 }
28127 return false
28128 }
28129 func rewriteValuegeneric_OpRsh32x32(v *Value) bool {
28130 v_1 := v.Args[1]
28131 v_0 := v.Args[0]
28132 b := v.Block
28133
28134
28135 for {
28136 t := v.Type
28137 x := v_0
28138 if v_1.Op != OpConst32 {
28139 break
28140 }
28141 c := auxIntToInt32(v_1.AuxInt)
28142 v.reset(OpRsh32x64)
28143 v0 := b.NewValue0(v.Pos, OpConst64, t)
28144 v0.AuxInt = int64ToAuxInt(int64(uint32(c)))
28145 v.AddArg2(x, v0)
28146 return true
28147 }
28148
28149
28150 for {
28151 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
28152 break
28153 }
28154 v.reset(OpConst32)
28155 v.AuxInt = int32ToAuxInt(0)
28156 return true
28157 }
28158 return false
28159 }
28160 func rewriteValuegeneric_OpRsh32x64(v *Value) bool {
28161 v_1 := v.Args[1]
28162 v_0 := v.Args[0]
28163 b := v.Block
28164 typ := &b.Func.Config.Types
28165
28166
28167 for {
28168 if v_0.Op != OpConst32 {
28169 break
28170 }
28171 c := auxIntToInt32(v_0.AuxInt)
28172 if v_1.Op != OpConst64 {
28173 break
28174 }
28175 d := auxIntToInt64(v_1.AuxInt)
28176 v.reset(OpConst32)
28177 v.AuxInt = int32ToAuxInt(c >> uint64(d))
28178 return true
28179 }
28180
28181
28182 for {
28183 x := v_0
28184 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 0 {
28185 break
28186 }
28187 v.copyOf(x)
28188 return true
28189 }
28190
28191
28192 for {
28193 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
28194 break
28195 }
28196 v.reset(OpConst32)
28197 v.AuxInt = int32ToAuxInt(0)
28198 return true
28199 }
28200
28201
28202
28203 for {
28204 t := v.Type
28205 if v_0.Op != OpRsh32x64 {
28206 break
28207 }
28208 _ = v_0.Args[1]
28209 x := v_0.Args[0]
28210 v_0_1 := v_0.Args[1]
28211 if v_0_1.Op != OpConst64 {
28212 break
28213 }
28214 c := auxIntToInt64(v_0_1.AuxInt)
28215 if v_1.Op != OpConst64 {
28216 break
28217 }
28218 d := auxIntToInt64(v_1.AuxInt)
28219 if !(!uaddOvf(c, d)) {
28220 break
28221 }
28222 v.reset(OpRsh32x64)
28223 v0 := b.NewValue0(v.Pos, OpConst64, t)
28224 v0.AuxInt = int64ToAuxInt(c + d)
28225 v.AddArg2(x, v0)
28226 return true
28227 }
28228
28229
28230 for {
28231 if v_0.Op != OpLsh32x64 {
28232 break
28233 }
28234 _ = v_0.Args[1]
28235 x := v_0.Args[0]
28236 v_0_1 := v_0.Args[1]
28237 if v_0_1.Op != OpConst64 || auxIntToInt64(v_0_1.AuxInt) != 24 || v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 24 {
28238 break
28239 }
28240 v.reset(OpSignExt8to32)
28241 v0 := b.NewValue0(v.Pos, OpTrunc32to8, typ.Int8)
28242 v0.AddArg(x)
28243 v.AddArg(v0)
28244 return true
28245 }
28246
28247
28248 for {
28249 if v_0.Op != OpLsh32x64 {
28250 break
28251 }
28252 _ = v_0.Args[1]
28253 x := v_0.Args[0]
28254 v_0_1 := v_0.Args[1]
28255 if v_0_1.Op != OpConst64 || auxIntToInt64(v_0_1.AuxInt) != 16 || v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 16 {
28256 break
28257 }
28258 v.reset(OpSignExt16to32)
28259 v0 := b.NewValue0(v.Pos, OpTrunc32to16, typ.Int16)
28260 v0.AddArg(x)
28261 v.AddArg(v0)
28262 return true
28263 }
28264 return false
28265 }
28266 func rewriteValuegeneric_OpRsh32x8(v *Value) bool {
28267 v_1 := v.Args[1]
28268 v_0 := v.Args[0]
28269 b := v.Block
28270
28271
28272 for {
28273 t := v.Type
28274 x := v_0
28275 if v_1.Op != OpConst8 {
28276 break
28277 }
28278 c := auxIntToInt8(v_1.AuxInt)
28279 v.reset(OpRsh32x64)
28280 v0 := b.NewValue0(v.Pos, OpConst64, t)
28281 v0.AuxInt = int64ToAuxInt(int64(uint8(c)))
28282 v.AddArg2(x, v0)
28283 return true
28284 }
28285
28286
28287 for {
28288 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
28289 break
28290 }
28291 v.reset(OpConst32)
28292 v.AuxInt = int32ToAuxInt(0)
28293 return true
28294 }
28295 return false
28296 }
28297 func rewriteValuegeneric_OpRsh64Ux16(v *Value) bool {
28298 v_1 := v.Args[1]
28299 v_0 := v.Args[0]
28300 b := v.Block
28301
28302
28303 for {
28304 t := v.Type
28305 x := v_0
28306 if v_1.Op != OpConst16 {
28307 break
28308 }
28309 c := auxIntToInt16(v_1.AuxInt)
28310 v.reset(OpRsh64Ux64)
28311 v0 := b.NewValue0(v.Pos, OpConst64, t)
28312 v0.AuxInt = int64ToAuxInt(int64(uint16(c)))
28313 v.AddArg2(x, v0)
28314 return true
28315 }
28316
28317
28318 for {
28319 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
28320 break
28321 }
28322 v.reset(OpConst64)
28323 v.AuxInt = int64ToAuxInt(0)
28324 return true
28325 }
28326 return false
28327 }
28328 func rewriteValuegeneric_OpRsh64Ux32(v *Value) bool {
28329 v_1 := v.Args[1]
28330 v_0 := v.Args[0]
28331 b := v.Block
28332
28333
28334 for {
28335 t := v.Type
28336 x := v_0
28337 if v_1.Op != OpConst32 {
28338 break
28339 }
28340 c := auxIntToInt32(v_1.AuxInt)
28341 v.reset(OpRsh64Ux64)
28342 v0 := b.NewValue0(v.Pos, OpConst64, t)
28343 v0.AuxInt = int64ToAuxInt(int64(uint32(c)))
28344 v.AddArg2(x, v0)
28345 return true
28346 }
28347
28348
28349 for {
28350 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
28351 break
28352 }
28353 v.reset(OpConst64)
28354 v.AuxInt = int64ToAuxInt(0)
28355 return true
28356 }
28357 return false
28358 }
28359 func rewriteValuegeneric_OpRsh64Ux64(v *Value) bool {
28360 v_1 := v.Args[1]
28361 v_0 := v.Args[0]
28362 b := v.Block
28363 typ := &b.Func.Config.Types
28364
28365
28366 for {
28367 if v_0.Op != OpConst64 {
28368 break
28369 }
28370 c := auxIntToInt64(v_0.AuxInt)
28371 if v_1.Op != OpConst64 {
28372 break
28373 }
28374 d := auxIntToInt64(v_1.AuxInt)
28375 v.reset(OpConst64)
28376 v.AuxInt = int64ToAuxInt(int64(uint64(c) >> uint64(d)))
28377 return true
28378 }
28379
28380
28381 for {
28382 x := v_0
28383 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 0 {
28384 break
28385 }
28386 v.copyOf(x)
28387 return true
28388 }
28389
28390
28391 for {
28392 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
28393 break
28394 }
28395 v.reset(OpConst64)
28396 v.AuxInt = int64ToAuxInt(0)
28397 return true
28398 }
28399
28400
28401
28402 for {
28403 if v_1.Op != OpConst64 {
28404 break
28405 }
28406 c := auxIntToInt64(v_1.AuxInt)
28407 if !(uint64(c) >= 64) {
28408 break
28409 }
28410 v.reset(OpConst64)
28411 v.AuxInt = int64ToAuxInt(0)
28412 return true
28413 }
28414
28415
28416
28417 for {
28418 t := v.Type
28419 if v_0.Op != OpRsh64Ux64 {
28420 break
28421 }
28422 _ = v_0.Args[1]
28423 x := v_0.Args[0]
28424 v_0_1 := v_0.Args[1]
28425 if v_0_1.Op != OpConst64 {
28426 break
28427 }
28428 c := auxIntToInt64(v_0_1.AuxInt)
28429 if v_1.Op != OpConst64 {
28430 break
28431 }
28432 d := auxIntToInt64(v_1.AuxInt)
28433 if !(!uaddOvf(c, d)) {
28434 break
28435 }
28436 v.reset(OpRsh64Ux64)
28437 v0 := b.NewValue0(v.Pos, OpConst64, t)
28438 v0.AuxInt = int64ToAuxInt(c + d)
28439 v.AddArg2(x, v0)
28440 return true
28441 }
28442
28443
28444 for {
28445 if v_0.Op != OpRsh64x64 {
28446 break
28447 }
28448 x := v_0.Args[0]
28449 if v_1.Op != OpConst64 {
28450 break
28451 }
28452 t := v_1.Type
28453 if auxIntToInt64(v_1.AuxInt) != 63 {
28454 break
28455 }
28456 v.reset(OpRsh64Ux64)
28457 v0 := b.NewValue0(v.Pos, OpConst64, t)
28458 v0.AuxInt = int64ToAuxInt(63)
28459 v.AddArg2(x, v0)
28460 return true
28461 }
28462
28463
28464
28465 for {
28466 i := v_0
28467 if i.Op != OpLsh64x64 {
28468 break
28469 }
28470 _ = i.Args[1]
28471 x := i.Args[0]
28472 i_1 := i.Args[1]
28473 if i_1.Op != OpConst64 {
28474 break
28475 }
28476 c := auxIntToInt64(i_1.AuxInt)
28477 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != c || !(c >= 0 && c < 64 && i.Uses == 1) {
28478 break
28479 }
28480 v.reset(OpAnd64)
28481 v0 := b.NewValue0(v.Pos, OpConst64, v.Type)
28482 v0.AuxInt = int64ToAuxInt(int64(^uint64(0) >> c))
28483 v.AddArg2(x, v0)
28484 return true
28485 }
28486
28487
28488
28489 for {
28490 if v_0.Op != OpLsh64x64 {
28491 break
28492 }
28493 _ = v_0.Args[1]
28494 v_0_0 := v_0.Args[0]
28495 if v_0_0.Op != OpRsh64Ux64 {
28496 break
28497 }
28498 _ = v_0_0.Args[1]
28499 x := v_0_0.Args[0]
28500 v_0_0_1 := v_0_0.Args[1]
28501 if v_0_0_1.Op != OpConst64 {
28502 break
28503 }
28504 c1 := auxIntToInt64(v_0_0_1.AuxInt)
28505 v_0_1 := v_0.Args[1]
28506 if v_0_1.Op != OpConst64 {
28507 break
28508 }
28509 c2 := auxIntToInt64(v_0_1.AuxInt)
28510 if v_1.Op != OpConst64 {
28511 break
28512 }
28513 c3 := auxIntToInt64(v_1.AuxInt)
28514 if !(uint64(c1) >= uint64(c2) && uint64(c3) >= uint64(c2) && !uaddOvf(c1-c2, c3)) {
28515 break
28516 }
28517 v.reset(OpRsh64Ux64)
28518 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
28519 v0.AuxInt = int64ToAuxInt(c1 - c2 + c3)
28520 v.AddArg2(x, v0)
28521 return true
28522 }
28523
28524
28525 for {
28526 if v_0.Op != OpLsh64x64 {
28527 break
28528 }
28529 _ = v_0.Args[1]
28530 x := v_0.Args[0]
28531 v_0_1 := v_0.Args[1]
28532 if v_0_1.Op != OpConst64 || auxIntToInt64(v_0_1.AuxInt) != 56 || v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 56 {
28533 break
28534 }
28535 v.reset(OpZeroExt8to64)
28536 v0 := b.NewValue0(v.Pos, OpTrunc64to8, typ.UInt8)
28537 v0.AddArg(x)
28538 v.AddArg(v0)
28539 return true
28540 }
28541
28542
28543 for {
28544 if v_0.Op != OpLsh64x64 {
28545 break
28546 }
28547 _ = v_0.Args[1]
28548 x := v_0.Args[0]
28549 v_0_1 := v_0.Args[1]
28550 if v_0_1.Op != OpConst64 || auxIntToInt64(v_0_1.AuxInt) != 48 || v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 48 {
28551 break
28552 }
28553 v.reset(OpZeroExt16to64)
28554 v0 := b.NewValue0(v.Pos, OpTrunc64to16, typ.UInt16)
28555 v0.AddArg(x)
28556 v.AddArg(v0)
28557 return true
28558 }
28559
28560
28561 for {
28562 if v_0.Op != OpLsh64x64 {
28563 break
28564 }
28565 _ = v_0.Args[1]
28566 x := v_0.Args[0]
28567 v_0_1 := v_0.Args[1]
28568 if v_0_1.Op != OpConst64 || auxIntToInt64(v_0_1.AuxInt) != 32 || v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 32 {
28569 break
28570 }
28571 v.reset(OpZeroExt32to64)
28572 v0 := b.NewValue0(v.Pos, OpTrunc64to32, typ.UInt32)
28573 v0.AddArg(x)
28574 v.AddArg(v0)
28575 return true
28576 }
28577 return false
28578 }
28579 func rewriteValuegeneric_OpRsh64Ux8(v *Value) bool {
28580 v_1 := v.Args[1]
28581 v_0 := v.Args[0]
28582 b := v.Block
28583
28584
28585 for {
28586 t := v.Type
28587 x := v_0
28588 if v_1.Op != OpConst8 {
28589 break
28590 }
28591 c := auxIntToInt8(v_1.AuxInt)
28592 v.reset(OpRsh64Ux64)
28593 v0 := b.NewValue0(v.Pos, OpConst64, t)
28594 v0.AuxInt = int64ToAuxInt(int64(uint8(c)))
28595 v.AddArg2(x, v0)
28596 return true
28597 }
28598
28599
28600 for {
28601 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
28602 break
28603 }
28604 v.reset(OpConst64)
28605 v.AuxInt = int64ToAuxInt(0)
28606 return true
28607 }
28608 return false
28609 }
28610 func rewriteValuegeneric_OpRsh64x16(v *Value) bool {
28611 v_1 := v.Args[1]
28612 v_0 := v.Args[0]
28613 b := v.Block
28614
28615
28616 for {
28617 t := v.Type
28618 x := v_0
28619 if v_1.Op != OpConst16 {
28620 break
28621 }
28622 c := auxIntToInt16(v_1.AuxInt)
28623 v.reset(OpRsh64x64)
28624 v0 := b.NewValue0(v.Pos, OpConst64, t)
28625 v0.AuxInt = int64ToAuxInt(int64(uint16(c)))
28626 v.AddArg2(x, v0)
28627 return true
28628 }
28629
28630
28631 for {
28632 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
28633 break
28634 }
28635 v.reset(OpConst64)
28636 v.AuxInt = int64ToAuxInt(0)
28637 return true
28638 }
28639 return false
28640 }
28641 func rewriteValuegeneric_OpRsh64x32(v *Value) bool {
28642 v_1 := v.Args[1]
28643 v_0 := v.Args[0]
28644 b := v.Block
28645
28646
28647 for {
28648 t := v.Type
28649 x := v_0
28650 if v_1.Op != OpConst32 {
28651 break
28652 }
28653 c := auxIntToInt32(v_1.AuxInt)
28654 v.reset(OpRsh64x64)
28655 v0 := b.NewValue0(v.Pos, OpConst64, t)
28656 v0.AuxInt = int64ToAuxInt(int64(uint32(c)))
28657 v.AddArg2(x, v0)
28658 return true
28659 }
28660
28661
28662 for {
28663 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
28664 break
28665 }
28666 v.reset(OpConst64)
28667 v.AuxInt = int64ToAuxInt(0)
28668 return true
28669 }
28670 return false
28671 }
28672 func rewriteValuegeneric_OpRsh64x64(v *Value) bool {
28673 v_1 := v.Args[1]
28674 v_0 := v.Args[0]
28675 b := v.Block
28676 typ := &b.Func.Config.Types
28677
28678
28679 for {
28680 if v_0.Op != OpConst64 {
28681 break
28682 }
28683 c := auxIntToInt64(v_0.AuxInt)
28684 if v_1.Op != OpConst64 {
28685 break
28686 }
28687 d := auxIntToInt64(v_1.AuxInt)
28688 v.reset(OpConst64)
28689 v.AuxInt = int64ToAuxInt(c >> uint64(d))
28690 return true
28691 }
28692
28693
28694 for {
28695 x := v_0
28696 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 0 {
28697 break
28698 }
28699 v.copyOf(x)
28700 return true
28701 }
28702
28703
28704 for {
28705 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
28706 break
28707 }
28708 v.reset(OpConst64)
28709 v.AuxInt = int64ToAuxInt(0)
28710 return true
28711 }
28712
28713
28714
28715 for {
28716 t := v.Type
28717 if v_0.Op != OpRsh64x64 {
28718 break
28719 }
28720 _ = v_0.Args[1]
28721 x := v_0.Args[0]
28722 v_0_1 := v_0.Args[1]
28723 if v_0_1.Op != OpConst64 {
28724 break
28725 }
28726 c := auxIntToInt64(v_0_1.AuxInt)
28727 if v_1.Op != OpConst64 {
28728 break
28729 }
28730 d := auxIntToInt64(v_1.AuxInt)
28731 if !(!uaddOvf(c, d)) {
28732 break
28733 }
28734 v.reset(OpRsh64x64)
28735 v0 := b.NewValue0(v.Pos, OpConst64, t)
28736 v0.AuxInt = int64ToAuxInt(c + d)
28737 v.AddArg2(x, v0)
28738 return true
28739 }
28740
28741
28742 for {
28743 if v_0.Op != OpLsh64x64 {
28744 break
28745 }
28746 _ = v_0.Args[1]
28747 x := v_0.Args[0]
28748 v_0_1 := v_0.Args[1]
28749 if v_0_1.Op != OpConst64 || auxIntToInt64(v_0_1.AuxInt) != 56 || v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 56 {
28750 break
28751 }
28752 v.reset(OpSignExt8to64)
28753 v0 := b.NewValue0(v.Pos, OpTrunc64to8, typ.Int8)
28754 v0.AddArg(x)
28755 v.AddArg(v0)
28756 return true
28757 }
28758
28759
28760 for {
28761 if v_0.Op != OpLsh64x64 {
28762 break
28763 }
28764 _ = v_0.Args[1]
28765 x := v_0.Args[0]
28766 v_0_1 := v_0.Args[1]
28767 if v_0_1.Op != OpConst64 || auxIntToInt64(v_0_1.AuxInt) != 48 || v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 48 {
28768 break
28769 }
28770 v.reset(OpSignExt16to64)
28771 v0 := b.NewValue0(v.Pos, OpTrunc64to16, typ.Int16)
28772 v0.AddArg(x)
28773 v.AddArg(v0)
28774 return true
28775 }
28776
28777
28778 for {
28779 if v_0.Op != OpLsh64x64 {
28780 break
28781 }
28782 _ = v_0.Args[1]
28783 x := v_0.Args[0]
28784 v_0_1 := v_0.Args[1]
28785 if v_0_1.Op != OpConst64 || auxIntToInt64(v_0_1.AuxInt) != 32 || v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 32 {
28786 break
28787 }
28788 v.reset(OpSignExt32to64)
28789 v0 := b.NewValue0(v.Pos, OpTrunc64to32, typ.Int32)
28790 v0.AddArg(x)
28791 v.AddArg(v0)
28792 return true
28793 }
28794 return false
28795 }
28796 func rewriteValuegeneric_OpRsh64x8(v *Value) bool {
28797 v_1 := v.Args[1]
28798 v_0 := v.Args[0]
28799 b := v.Block
28800
28801
28802 for {
28803 t := v.Type
28804 x := v_0
28805 if v_1.Op != OpConst8 {
28806 break
28807 }
28808 c := auxIntToInt8(v_1.AuxInt)
28809 v.reset(OpRsh64x64)
28810 v0 := b.NewValue0(v.Pos, OpConst64, t)
28811 v0.AuxInt = int64ToAuxInt(int64(uint8(c)))
28812 v.AddArg2(x, v0)
28813 return true
28814 }
28815
28816
28817 for {
28818 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
28819 break
28820 }
28821 v.reset(OpConst64)
28822 v.AuxInt = int64ToAuxInt(0)
28823 return true
28824 }
28825 return false
28826 }
28827 func rewriteValuegeneric_OpRsh8Ux16(v *Value) bool {
28828 v_1 := v.Args[1]
28829 v_0 := v.Args[0]
28830 b := v.Block
28831
28832
28833 for {
28834 t := v.Type
28835 x := v_0
28836 if v_1.Op != OpConst16 {
28837 break
28838 }
28839 c := auxIntToInt16(v_1.AuxInt)
28840 v.reset(OpRsh8Ux64)
28841 v0 := b.NewValue0(v.Pos, OpConst64, t)
28842 v0.AuxInt = int64ToAuxInt(int64(uint16(c)))
28843 v.AddArg2(x, v0)
28844 return true
28845 }
28846
28847
28848 for {
28849 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 {
28850 break
28851 }
28852 v.reset(OpConst8)
28853 v.AuxInt = int8ToAuxInt(0)
28854 return true
28855 }
28856 return false
28857 }
28858 func rewriteValuegeneric_OpRsh8Ux32(v *Value) bool {
28859 v_1 := v.Args[1]
28860 v_0 := v.Args[0]
28861 b := v.Block
28862
28863
28864 for {
28865 t := v.Type
28866 x := v_0
28867 if v_1.Op != OpConst32 {
28868 break
28869 }
28870 c := auxIntToInt32(v_1.AuxInt)
28871 v.reset(OpRsh8Ux64)
28872 v0 := b.NewValue0(v.Pos, OpConst64, t)
28873 v0.AuxInt = int64ToAuxInt(int64(uint32(c)))
28874 v.AddArg2(x, v0)
28875 return true
28876 }
28877
28878
28879 for {
28880 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 {
28881 break
28882 }
28883 v.reset(OpConst8)
28884 v.AuxInt = int8ToAuxInt(0)
28885 return true
28886 }
28887 return false
28888 }
28889 func rewriteValuegeneric_OpRsh8Ux64(v *Value) bool {
28890 v_1 := v.Args[1]
28891 v_0 := v.Args[0]
28892 b := v.Block
28893 typ := &b.Func.Config.Types
28894
28895
28896 for {
28897 if v_0.Op != OpConst8 {
28898 break
28899 }
28900 c := auxIntToInt8(v_0.AuxInt)
28901 if v_1.Op != OpConst64 {
28902 break
28903 }
28904 d := auxIntToInt64(v_1.AuxInt)
28905 v.reset(OpConst8)
28906 v.AuxInt = int8ToAuxInt(int8(uint8(c) >> uint64(d)))
28907 return true
28908 }
28909
28910
28911 for {
28912 x := v_0
28913 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 0 {
28914 break
28915 }
28916 v.copyOf(x)
28917 return true
28918 }
28919
28920
28921 for {
28922 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 {
28923 break
28924 }
28925 v.reset(OpConst8)
28926 v.AuxInt = int8ToAuxInt(0)
28927 return true
28928 }
28929
28930
28931
28932 for {
28933 if v_1.Op != OpConst64 {
28934 break
28935 }
28936 c := auxIntToInt64(v_1.AuxInt)
28937 if !(uint64(c) >= 8) {
28938 break
28939 }
28940 v.reset(OpConst8)
28941 v.AuxInt = int8ToAuxInt(0)
28942 return true
28943 }
28944
28945
28946
28947 for {
28948 t := v.Type
28949 if v_0.Op != OpRsh8Ux64 {
28950 break
28951 }
28952 _ = v_0.Args[1]
28953 x := v_0.Args[0]
28954 v_0_1 := v_0.Args[1]
28955 if v_0_1.Op != OpConst64 {
28956 break
28957 }
28958 c := auxIntToInt64(v_0_1.AuxInt)
28959 if v_1.Op != OpConst64 {
28960 break
28961 }
28962 d := auxIntToInt64(v_1.AuxInt)
28963 if !(!uaddOvf(c, d)) {
28964 break
28965 }
28966 v.reset(OpRsh8Ux64)
28967 v0 := b.NewValue0(v.Pos, OpConst64, t)
28968 v0.AuxInt = int64ToAuxInt(c + d)
28969 v.AddArg2(x, v0)
28970 return true
28971 }
28972
28973
28974 for {
28975 if v_0.Op != OpRsh8x64 {
28976 break
28977 }
28978 x := v_0.Args[0]
28979 if v_1.Op != OpConst64 {
28980 break
28981 }
28982 t := v_1.Type
28983 if auxIntToInt64(v_1.AuxInt) != 7 {
28984 break
28985 }
28986 v.reset(OpRsh8Ux64)
28987 v0 := b.NewValue0(v.Pos, OpConst64, t)
28988 v0.AuxInt = int64ToAuxInt(7)
28989 v.AddArg2(x, v0)
28990 return true
28991 }
28992
28993
28994
28995 for {
28996 i := v_0
28997 if i.Op != OpLsh8x64 {
28998 break
28999 }
29000 _ = i.Args[1]
29001 x := i.Args[0]
29002 i_1 := i.Args[1]
29003 if i_1.Op != OpConst64 {
29004 break
29005 }
29006 c := auxIntToInt64(i_1.AuxInt)
29007 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != c || !(c >= 0 && c < 8 && i.Uses == 1) {
29008 break
29009 }
29010 v.reset(OpAnd8)
29011 v0 := b.NewValue0(v.Pos, OpConst8, v.Type)
29012 v0.AuxInt = int8ToAuxInt(int8(^uint8(0) >> c))
29013 v.AddArg2(x, v0)
29014 return true
29015 }
29016
29017
29018
29019 for {
29020 if v_0.Op != OpLsh8x64 {
29021 break
29022 }
29023 _ = v_0.Args[1]
29024 v_0_0 := v_0.Args[0]
29025 if v_0_0.Op != OpRsh8Ux64 {
29026 break
29027 }
29028 _ = v_0_0.Args[1]
29029 x := v_0_0.Args[0]
29030 v_0_0_1 := v_0_0.Args[1]
29031 if v_0_0_1.Op != OpConst64 {
29032 break
29033 }
29034 c1 := auxIntToInt64(v_0_0_1.AuxInt)
29035 v_0_1 := v_0.Args[1]
29036 if v_0_1.Op != OpConst64 {
29037 break
29038 }
29039 c2 := auxIntToInt64(v_0_1.AuxInt)
29040 if v_1.Op != OpConst64 {
29041 break
29042 }
29043 c3 := auxIntToInt64(v_1.AuxInt)
29044 if !(uint64(c1) >= uint64(c2) && uint64(c3) >= uint64(c2) && !uaddOvf(c1-c2, c3)) {
29045 break
29046 }
29047 v.reset(OpRsh8Ux64)
29048 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
29049 v0.AuxInt = int64ToAuxInt(c1 - c2 + c3)
29050 v.AddArg2(x, v0)
29051 return true
29052 }
29053 return false
29054 }
29055 func rewriteValuegeneric_OpRsh8Ux8(v *Value) bool {
29056 v_1 := v.Args[1]
29057 v_0 := v.Args[0]
29058 b := v.Block
29059
29060
29061 for {
29062 t := v.Type
29063 x := v_0
29064 if v_1.Op != OpConst8 {
29065 break
29066 }
29067 c := auxIntToInt8(v_1.AuxInt)
29068 v.reset(OpRsh8Ux64)
29069 v0 := b.NewValue0(v.Pos, OpConst64, t)
29070 v0.AuxInt = int64ToAuxInt(int64(uint8(c)))
29071 v.AddArg2(x, v0)
29072 return true
29073 }
29074
29075
29076 for {
29077 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 {
29078 break
29079 }
29080 v.reset(OpConst8)
29081 v.AuxInt = int8ToAuxInt(0)
29082 return true
29083 }
29084 return false
29085 }
29086 func rewriteValuegeneric_OpRsh8x16(v *Value) bool {
29087 v_1 := v.Args[1]
29088 v_0 := v.Args[0]
29089 b := v.Block
29090
29091
29092 for {
29093 t := v.Type
29094 x := v_0
29095 if v_1.Op != OpConst16 {
29096 break
29097 }
29098 c := auxIntToInt16(v_1.AuxInt)
29099 v.reset(OpRsh8x64)
29100 v0 := b.NewValue0(v.Pos, OpConst64, t)
29101 v0.AuxInt = int64ToAuxInt(int64(uint16(c)))
29102 v.AddArg2(x, v0)
29103 return true
29104 }
29105
29106
29107 for {
29108 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 {
29109 break
29110 }
29111 v.reset(OpConst8)
29112 v.AuxInt = int8ToAuxInt(0)
29113 return true
29114 }
29115 return false
29116 }
29117 func rewriteValuegeneric_OpRsh8x32(v *Value) bool {
29118 v_1 := v.Args[1]
29119 v_0 := v.Args[0]
29120 b := v.Block
29121
29122
29123 for {
29124 t := v.Type
29125 x := v_0
29126 if v_1.Op != OpConst32 {
29127 break
29128 }
29129 c := auxIntToInt32(v_1.AuxInt)
29130 v.reset(OpRsh8x64)
29131 v0 := b.NewValue0(v.Pos, OpConst64, t)
29132 v0.AuxInt = int64ToAuxInt(int64(uint32(c)))
29133 v.AddArg2(x, v0)
29134 return true
29135 }
29136
29137
29138 for {
29139 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 {
29140 break
29141 }
29142 v.reset(OpConst8)
29143 v.AuxInt = int8ToAuxInt(0)
29144 return true
29145 }
29146 return false
29147 }
29148 func rewriteValuegeneric_OpRsh8x64(v *Value) bool {
29149 v_1 := v.Args[1]
29150 v_0 := v.Args[0]
29151 b := v.Block
29152
29153
29154 for {
29155 if v_0.Op != OpConst8 {
29156 break
29157 }
29158 c := auxIntToInt8(v_0.AuxInt)
29159 if v_1.Op != OpConst64 {
29160 break
29161 }
29162 d := auxIntToInt64(v_1.AuxInt)
29163 v.reset(OpConst8)
29164 v.AuxInt = int8ToAuxInt(c >> uint64(d))
29165 return true
29166 }
29167
29168
29169 for {
29170 x := v_0
29171 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 0 {
29172 break
29173 }
29174 v.copyOf(x)
29175 return true
29176 }
29177
29178
29179 for {
29180 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 {
29181 break
29182 }
29183 v.reset(OpConst8)
29184 v.AuxInt = int8ToAuxInt(0)
29185 return true
29186 }
29187
29188
29189
29190 for {
29191 t := v.Type
29192 if v_0.Op != OpRsh8x64 {
29193 break
29194 }
29195 _ = v_0.Args[1]
29196 x := v_0.Args[0]
29197 v_0_1 := v_0.Args[1]
29198 if v_0_1.Op != OpConst64 {
29199 break
29200 }
29201 c := auxIntToInt64(v_0_1.AuxInt)
29202 if v_1.Op != OpConst64 {
29203 break
29204 }
29205 d := auxIntToInt64(v_1.AuxInt)
29206 if !(!uaddOvf(c, d)) {
29207 break
29208 }
29209 v.reset(OpRsh8x64)
29210 v0 := b.NewValue0(v.Pos, OpConst64, t)
29211 v0.AuxInt = int64ToAuxInt(c + d)
29212 v.AddArg2(x, v0)
29213 return true
29214 }
29215 return false
29216 }
29217 func rewriteValuegeneric_OpRsh8x8(v *Value) bool {
29218 v_1 := v.Args[1]
29219 v_0 := v.Args[0]
29220 b := v.Block
29221
29222
29223 for {
29224 t := v.Type
29225 x := v_0
29226 if v_1.Op != OpConst8 {
29227 break
29228 }
29229 c := auxIntToInt8(v_1.AuxInt)
29230 v.reset(OpRsh8x64)
29231 v0 := b.NewValue0(v.Pos, OpConst64, t)
29232 v0.AuxInt = int64ToAuxInt(int64(uint8(c)))
29233 v.AddArg2(x, v0)
29234 return true
29235 }
29236
29237
29238 for {
29239 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 {
29240 break
29241 }
29242 v.reset(OpConst8)
29243 v.AuxInt = int8ToAuxInt(0)
29244 return true
29245 }
29246 return false
29247 }
29248 func rewriteValuegeneric_OpSelect0(v *Value) bool {
29249 v_0 := v.Args[0]
29250
29251
29252 for {
29253 if v_0.Op != OpMakeTuple {
29254 break
29255 }
29256 x := v_0.Args[0]
29257 v.copyOf(x)
29258 return true
29259 }
29260 return false
29261 }
29262 func rewriteValuegeneric_OpSelect1(v *Value) bool {
29263 v_0 := v.Args[0]
29264
29265
29266 for {
29267 if v_0.Op != OpMakeTuple {
29268 break
29269 }
29270 y := v_0.Args[1]
29271 v.copyOf(y)
29272 return true
29273 }
29274 return false
29275 }
29276 func rewriteValuegeneric_OpSelectN(v *Value) bool {
29277 v_0 := v.Args[0]
29278 b := v.Block
29279 config := b.Func.Config
29280 typ := &b.Func.Config.Types
29281
29282
29283 for {
29284 if auxIntToInt64(v.AuxInt) != 0 || v_0.Op != OpMakeResult || len(v_0.Args) < 1 {
29285 break
29286 }
29287 x := v_0.Args[0]
29288 v.copyOf(x)
29289 return true
29290 }
29291
29292
29293 for {
29294 if auxIntToInt64(v.AuxInt) != 1 || v_0.Op != OpMakeResult || len(v_0.Args) < 2 {
29295 break
29296 }
29297 y := v_0.Args[1]
29298 v.copyOf(y)
29299 return true
29300 }
29301
29302
29303 for {
29304 if auxIntToInt64(v.AuxInt) != 2 || v_0.Op != OpMakeResult || len(v_0.Args) < 3 {
29305 break
29306 }
29307 z := v_0.Args[2]
29308 v.copyOf(z)
29309 return true
29310 }
29311
29312
29313
29314 for {
29315 if auxIntToInt64(v.AuxInt) != 0 {
29316 break
29317 }
29318 call := v_0
29319 if call.Op != OpStaticCall || len(call.Args) != 3 {
29320 break
29321 }
29322 sym := auxToCall(call.Aux)
29323 mem := call.Args[2]
29324 sptr := call.Args[0]
29325 call_1 := call.Args[1]
29326 if call_1.Op != OpConst64 {
29327 break
29328 }
29329 c := auxIntToInt64(call_1.AuxInt)
29330 if !(isInlinableMemclr(config, int64(c)) && isSameCall(sym, "runtime.memclrNoHeapPointers") && call.Uses == 1 && clobber(call)) {
29331 break
29332 }
29333 v.reset(OpZero)
29334 v.AuxInt = int64ToAuxInt(int64(c))
29335 v.Aux = typeToAux(types.Types[types.TUINT8])
29336 v.AddArg2(sptr, mem)
29337 return true
29338 }
29339
29340
29341
29342 for {
29343 if auxIntToInt64(v.AuxInt) != 0 {
29344 break
29345 }
29346 call := v_0
29347 if call.Op != OpStaticCall || len(call.Args) != 3 {
29348 break
29349 }
29350 sym := auxToCall(call.Aux)
29351 mem := call.Args[2]
29352 sptr := call.Args[0]
29353 call_1 := call.Args[1]
29354 if call_1.Op != OpConst32 {
29355 break
29356 }
29357 c := auxIntToInt32(call_1.AuxInt)
29358 if !(isInlinableMemclr(config, int64(c)) && isSameCall(sym, "runtime.memclrNoHeapPointers") && call.Uses == 1 && clobber(call)) {
29359 break
29360 }
29361 v.reset(OpZero)
29362 v.AuxInt = int64ToAuxInt(int64(c))
29363 v.Aux = typeToAux(types.Types[types.TUINT8])
29364 v.AddArg2(sptr, mem)
29365 return true
29366 }
29367
29368
29369
29370 for {
29371 if auxIntToInt64(v.AuxInt) != 0 {
29372 break
29373 }
29374 call := v_0
29375 if call.Op != OpStaticCall || len(call.Args) != 1 {
29376 break
29377 }
29378 sym := auxToCall(call.Aux)
29379 s1 := call.Args[0]
29380 if s1.Op != OpStore {
29381 break
29382 }
29383 _ = s1.Args[2]
29384 s1_1 := s1.Args[1]
29385 if s1_1.Op != OpConst64 {
29386 break
29387 }
29388 sz := auxIntToInt64(s1_1.AuxInt)
29389 s2 := s1.Args[2]
29390 if s2.Op != OpStore {
29391 break
29392 }
29393 _ = s2.Args[2]
29394 src := s2.Args[1]
29395 s3 := s2.Args[2]
29396 if s3.Op != OpStore {
29397 break
29398 }
29399 mem := s3.Args[2]
29400 dst := s3.Args[1]
29401 if !(sz >= 0 && isSameCall(sym, "runtime.memmove") && s1.Uses == 1 && s2.Uses == 1 && s3.Uses == 1 && isInlinableMemmove(dst, src, int64(sz), config) && clobber(s1, s2, s3, call)) {
29402 break
29403 }
29404 v.reset(OpMove)
29405 v.AuxInt = int64ToAuxInt(int64(sz))
29406 v.Aux = typeToAux(types.Types[types.TUINT8])
29407 v.AddArg3(dst, src, mem)
29408 return true
29409 }
29410
29411
29412
29413 for {
29414 if auxIntToInt64(v.AuxInt) != 0 {
29415 break
29416 }
29417 call := v_0
29418 if call.Op != OpStaticCall || len(call.Args) != 1 {
29419 break
29420 }
29421 sym := auxToCall(call.Aux)
29422 s1 := call.Args[0]
29423 if s1.Op != OpStore {
29424 break
29425 }
29426 _ = s1.Args[2]
29427 s1_1 := s1.Args[1]
29428 if s1_1.Op != OpConst32 {
29429 break
29430 }
29431 sz := auxIntToInt32(s1_1.AuxInt)
29432 s2 := s1.Args[2]
29433 if s2.Op != OpStore {
29434 break
29435 }
29436 _ = s2.Args[2]
29437 src := s2.Args[1]
29438 s3 := s2.Args[2]
29439 if s3.Op != OpStore {
29440 break
29441 }
29442 mem := s3.Args[2]
29443 dst := s3.Args[1]
29444 if !(sz >= 0 && isSameCall(sym, "runtime.memmove") && s1.Uses == 1 && s2.Uses == 1 && s3.Uses == 1 && isInlinableMemmove(dst, src, int64(sz), config) && clobber(s1, s2, s3, call)) {
29445 break
29446 }
29447 v.reset(OpMove)
29448 v.AuxInt = int64ToAuxInt(int64(sz))
29449 v.Aux = typeToAux(types.Types[types.TUINT8])
29450 v.AddArg3(dst, src, mem)
29451 return true
29452 }
29453
29454
29455
29456 for {
29457 if auxIntToInt64(v.AuxInt) != 0 {
29458 break
29459 }
29460 call := v_0
29461 if call.Op != OpStaticCall || len(call.Args) != 4 {
29462 break
29463 }
29464 sym := auxToCall(call.Aux)
29465 mem := call.Args[3]
29466 dst := call.Args[0]
29467 src := call.Args[1]
29468 call_2 := call.Args[2]
29469 if call_2.Op != OpConst64 {
29470 break
29471 }
29472 sz := auxIntToInt64(call_2.AuxInt)
29473 if !(sz >= 0 && call.Uses == 1 && isSameCall(sym, "runtime.memmove") && isInlinableMemmove(dst, src, int64(sz), config) && clobber(call)) {
29474 break
29475 }
29476 v.reset(OpMove)
29477 v.AuxInt = int64ToAuxInt(int64(sz))
29478 v.Aux = typeToAux(types.Types[types.TUINT8])
29479 v.AddArg3(dst, src, mem)
29480 return true
29481 }
29482
29483
29484
29485 for {
29486 if auxIntToInt64(v.AuxInt) != 0 {
29487 break
29488 }
29489 call := v_0
29490 if call.Op != OpStaticCall || len(call.Args) != 4 {
29491 break
29492 }
29493 sym := auxToCall(call.Aux)
29494 mem := call.Args[3]
29495 dst := call.Args[0]
29496 src := call.Args[1]
29497 call_2 := call.Args[2]
29498 if call_2.Op != OpConst32 {
29499 break
29500 }
29501 sz := auxIntToInt32(call_2.AuxInt)
29502 if !(sz >= 0 && call.Uses == 1 && isSameCall(sym, "runtime.memmove") && isInlinableMemmove(dst, src, int64(sz), config) && clobber(call)) {
29503 break
29504 }
29505 v.reset(OpMove)
29506 v.AuxInt = int64ToAuxInt(int64(sz))
29507 v.Aux = typeToAux(types.Types[types.TUINT8])
29508 v.AddArg3(dst, src, mem)
29509 return true
29510 }
29511
29512
29513
29514 for {
29515 if auxIntToInt64(v.AuxInt) != 0 {
29516 break
29517 }
29518 call := v_0
29519 if call.Op != OpStaticLECall || len(call.Args) != 4 {
29520 break
29521 }
29522 sym := auxToCall(call.Aux)
29523 mem := call.Args[3]
29524 dst := call.Args[0]
29525 src := call.Args[1]
29526 call_2 := call.Args[2]
29527 if call_2.Op != OpConst64 {
29528 break
29529 }
29530 sz := auxIntToInt64(call_2.AuxInt)
29531 if !(sz >= 0 && call.Uses == 1 && isSameCall(sym, "runtime.memmove") && isInlinableMemmove(dst, src, int64(sz), config) && clobber(call)) {
29532 break
29533 }
29534 v.reset(OpMove)
29535 v.AuxInt = int64ToAuxInt(int64(sz))
29536 v.Aux = typeToAux(types.Types[types.TUINT8])
29537 v.AddArg3(dst, src, mem)
29538 return true
29539 }
29540
29541
29542
29543 for {
29544 if auxIntToInt64(v.AuxInt) != 0 {
29545 break
29546 }
29547 call := v_0
29548 if call.Op != OpStaticLECall || len(call.Args) != 4 {
29549 break
29550 }
29551 sym := auxToCall(call.Aux)
29552 mem := call.Args[3]
29553 dst := call.Args[0]
29554 src := call.Args[1]
29555 call_2 := call.Args[2]
29556 if call_2.Op != OpConst32 {
29557 break
29558 }
29559 sz := auxIntToInt32(call_2.AuxInt)
29560 if !(sz >= 0 && call.Uses == 1 && isSameCall(sym, "runtime.memmove") && isInlinableMemmove(dst, src, int64(sz), config) && clobber(call)) {
29561 break
29562 }
29563 v.reset(OpMove)
29564 v.AuxInt = int64ToAuxInt(int64(sz))
29565 v.Aux = typeToAux(types.Types[types.TUINT8])
29566 v.AddArg3(dst, src, mem)
29567 return true
29568 }
29569
29570
29571
29572 for {
29573 if auxIntToInt64(v.AuxInt) != 0 {
29574 break
29575 }
29576 call := v_0
29577 if call.Op != OpStaticLECall || len(call.Args) != 2 {
29578 break
29579 }
29580 sym := auxToCall(call.Aux)
29581 x := call.Args[1]
29582 if !(needRaceCleanup(sym, call) && clobber(call)) {
29583 break
29584 }
29585 v.copyOf(x)
29586 return true
29587 }
29588
29589
29590
29591 for {
29592 if auxIntToInt64(v.AuxInt) != 0 {
29593 break
29594 }
29595 call := v_0
29596 if call.Op != OpStaticLECall || len(call.Args) != 1 {
29597 break
29598 }
29599 sym := auxToCall(call.Aux)
29600 x := call.Args[0]
29601 if !(needRaceCleanup(sym, call) && clobber(call)) {
29602 break
29603 }
29604 v.copyOf(x)
29605 return true
29606 }
29607
29608
29609
29610 for {
29611 if auxIntToInt64(v.AuxInt) != 1 || v_0.Op != OpStaticCall || len(v_0.Args) != 6 {
29612 break
29613 }
29614 sym := auxToCall(v_0.Aux)
29615 _ = v_0.Args[1]
29616 newLen := v_0.Args[1]
29617 if newLen.Op != OpConst64 || !(v.Type.IsInteger() && isSameCall(sym, "runtime.growslice")) {
29618 break
29619 }
29620 v.copyOf(newLen)
29621 return true
29622 }
29623
29624
29625
29626 for {
29627 if auxIntToInt64(v.AuxInt) != 1 || v_0.Op != OpStaticCall || len(v_0.Args) != 6 {
29628 break
29629 }
29630 sym := auxToCall(v_0.Aux)
29631 _ = v_0.Args[1]
29632 newLen := v_0.Args[1]
29633 if newLen.Op != OpConst32 || !(v.Type.IsInteger() && isSameCall(sym, "runtime.growslice")) {
29634 break
29635 }
29636 v.copyOf(newLen)
29637 return true
29638 }
29639
29640
29641
29642 for {
29643 if auxIntToInt64(v.AuxInt) != 0 || v_0.Op != OpStaticLECall || len(v_0.Args) != 3 {
29644 break
29645 }
29646 f := auxToCall(v_0.Aux)
29647 _ = v_0.Args[2]
29648 x := v_0.Args[0]
29649 y := v_0.Args[1]
29650 v_0_2 := v_0.Args[2]
29651 if v_0_2.Op != OpSelectN || auxIntToInt64(v_0_2.AuxInt) != 1 {
29652 break
29653 }
29654 c := v_0_2.Args[0]
29655 if c.Op != OpStaticLECall || len(c.Args) != 3 {
29656 break
29657 }
29658 g := auxToCall(c.Aux)
29659 if x != c.Args[0] || y != c.Args[1] || !(isSameCall(f, "runtime.cmpstring") && isSameCall(g, "runtime.cmpstring")) {
29660 break
29661 }
29662 b = c.Block
29663 v0 := b.NewValue0(v.Pos, OpSelectN, typ.Int)
29664 v.copyOf(v0)
29665 v0.AuxInt = int64ToAuxInt(0)
29666 v0.AddArg(c)
29667 return true
29668 }
29669
29670
29671
29672 for {
29673 if auxIntToInt64(v.AuxInt) != 1 {
29674 break
29675 }
29676 c := v_0
29677 if c.Op != OpStaticLECall || len(c.Args) != 3 {
29678 break
29679 }
29680 f := auxToCall(c.Aux)
29681 mem := c.Args[2]
29682 if !(c.Uses == 1 && isSameCall(f, "runtime.cmpstring") && clobber(c)) {
29683 break
29684 }
29685 v.copyOf(mem)
29686 return true
29687 }
29688 return false
29689 }
29690 func rewriteValuegeneric_OpSignExt16to32(v *Value) bool {
29691 v_0 := v.Args[0]
29692
29693
29694 for {
29695 if v_0.Op != OpConst16 {
29696 break
29697 }
29698 c := auxIntToInt16(v_0.AuxInt)
29699 v.reset(OpConst32)
29700 v.AuxInt = int32ToAuxInt(int32(c))
29701 return true
29702 }
29703
29704
29705
29706 for {
29707 if v_0.Op != OpTrunc32to16 {
29708 break
29709 }
29710 x := v_0.Args[0]
29711 if x.Op != OpRsh32x64 {
29712 break
29713 }
29714 _ = x.Args[1]
29715 x_1 := x.Args[1]
29716 if x_1.Op != OpConst64 {
29717 break
29718 }
29719 s := auxIntToInt64(x_1.AuxInt)
29720 if !(s >= 16) {
29721 break
29722 }
29723 v.copyOf(x)
29724 return true
29725 }
29726 return false
29727 }
29728 func rewriteValuegeneric_OpSignExt16to64(v *Value) bool {
29729 v_0 := v.Args[0]
29730
29731
29732 for {
29733 if v_0.Op != OpConst16 {
29734 break
29735 }
29736 c := auxIntToInt16(v_0.AuxInt)
29737 v.reset(OpConst64)
29738 v.AuxInt = int64ToAuxInt(int64(c))
29739 return true
29740 }
29741
29742
29743
29744 for {
29745 if v_0.Op != OpTrunc64to16 {
29746 break
29747 }
29748 x := v_0.Args[0]
29749 if x.Op != OpRsh64x64 {
29750 break
29751 }
29752 _ = x.Args[1]
29753 x_1 := x.Args[1]
29754 if x_1.Op != OpConst64 {
29755 break
29756 }
29757 s := auxIntToInt64(x_1.AuxInt)
29758 if !(s >= 48) {
29759 break
29760 }
29761 v.copyOf(x)
29762 return true
29763 }
29764 return false
29765 }
29766 func rewriteValuegeneric_OpSignExt32to64(v *Value) bool {
29767 v_0 := v.Args[0]
29768
29769
29770 for {
29771 if v_0.Op != OpConst32 {
29772 break
29773 }
29774 c := auxIntToInt32(v_0.AuxInt)
29775 v.reset(OpConst64)
29776 v.AuxInt = int64ToAuxInt(int64(c))
29777 return true
29778 }
29779
29780
29781
29782 for {
29783 if v_0.Op != OpTrunc64to32 {
29784 break
29785 }
29786 x := v_0.Args[0]
29787 if x.Op != OpRsh64x64 {
29788 break
29789 }
29790 _ = x.Args[1]
29791 x_1 := x.Args[1]
29792 if x_1.Op != OpConst64 {
29793 break
29794 }
29795 s := auxIntToInt64(x_1.AuxInt)
29796 if !(s >= 32) {
29797 break
29798 }
29799 v.copyOf(x)
29800 return true
29801 }
29802 return false
29803 }
29804 func rewriteValuegeneric_OpSignExt8to16(v *Value) bool {
29805 v_0 := v.Args[0]
29806
29807
29808 for {
29809 if v_0.Op != OpConst8 {
29810 break
29811 }
29812 c := auxIntToInt8(v_0.AuxInt)
29813 v.reset(OpConst16)
29814 v.AuxInt = int16ToAuxInt(int16(c))
29815 return true
29816 }
29817
29818
29819
29820 for {
29821 if v_0.Op != OpTrunc16to8 {
29822 break
29823 }
29824 x := v_0.Args[0]
29825 if x.Op != OpRsh16x64 {
29826 break
29827 }
29828 _ = x.Args[1]
29829 x_1 := x.Args[1]
29830 if x_1.Op != OpConst64 {
29831 break
29832 }
29833 s := auxIntToInt64(x_1.AuxInt)
29834 if !(s >= 8) {
29835 break
29836 }
29837 v.copyOf(x)
29838 return true
29839 }
29840 return false
29841 }
29842 func rewriteValuegeneric_OpSignExt8to32(v *Value) bool {
29843 v_0 := v.Args[0]
29844
29845
29846 for {
29847 if v_0.Op != OpConst8 {
29848 break
29849 }
29850 c := auxIntToInt8(v_0.AuxInt)
29851 v.reset(OpConst32)
29852 v.AuxInt = int32ToAuxInt(int32(c))
29853 return true
29854 }
29855
29856
29857
29858 for {
29859 if v_0.Op != OpTrunc32to8 {
29860 break
29861 }
29862 x := v_0.Args[0]
29863 if x.Op != OpRsh32x64 {
29864 break
29865 }
29866 _ = x.Args[1]
29867 x_1 := x.Args[1]
29868 if x_1.Op != OpConst64 {
29869 break
29870 }
29871 s := auxIntToInt64(x_1.AuxInt)
29872 if !(s >= 24) {
29873 break
29874 }
29875 v.copyOf(x)
29876 return true
29877 }
29878 return false
29879 }
29880 func rewriteValuegeneric_OpSignExt8to64(v *Value) bool {
29881 v_0 := v.Args[0]
29882
29883
29884 for {
29885 if v_0.Op != OpConst8 {
29886 break
29887 }
29888 c := auxIntToInt8(v_0.AuxInt)
29889 v.reset(OpConst64)
29890 v.AuxInt = int64ToAuxInt(int64(c))
29891 return true
29892 }
29893
29894
29895
29896 for {
29897 if v_0.Op != OpTrunc64to8 {
29898 break
29899 }
29900 x := v_0.Args[0]
29901 if x.Op != OpRsh64x64 {
29902 break
29903 }
29904 _ = x.Args[1]
29905 x_1 := x.Args[1]
29906 if x_1.Op != OpConst64 {
29907 break
29908 }
29909 s := auxIntToInt64(x_1.AuxInt)
29910 if !(s >= 56) {
29911 break
29912 }
29913 v.copyOf(x)
29914 return true
29915 }
29916 return false
29917 }
29918 func rewriteValuegeneric_OpSliceCap(v *Value) bool {
29919 v_0 := v.Args[0]
29920
29921
29922 for {
29923 if v_0.Op != OpSliceMake {
29924 break
29925 }
29926 _ = v_0.Args[2]
29927 v_0_2 := v_0.Args[2]
29928 if v_0_2.Op != OpConst64 {
29929 break
29930 }
29931 t := v_0_2.Type
29932 c := auxIntToInt64(v_0_2.AuxInt)
29933 v.reset(OpConst64)
29934 v.Type = t
29935 v.AuxInt = int64ToAuxInt(c)
29936 return true
29937 }
29938
29939
29940 for {
29941 if v_0.Op != OpSliceMake {
29942 break
29943 }
29944 _ = v_0.Args[2]
29945 v_0_2 := v_0.Args[2]
29946 if v_0_2.Op != OpConst32 {
29947 break
29948 }
29949 t := v_0_2.Type
29950 c := auxIntToInt32(v_0_2.AuxInt)
29951 v.reset(OpConst32)
29952 v.Type = t
29953 v.AuxInt = int32ToAuxInt(c)
29954 return true
29955 }
29956
29957
29958 for {
29959 if v_0.Op != OpSliceMake {
29960 break
29961 }
29962 _ = v_0.Args[2]
29963 v_0_2 := v_0.Args[2]
29964 if v_0_2.Op != OpSliceCap {
29965 break
29966 }
29967 x := v_0_2.Args[0]
29968 v.reset(OpSliceCap)
29969 v.AddArg(x)
29970 return true
29971 }
29972
29973
29974 for {
29975 if v_0.Op != OpSliceMake {
29976 break
29977 }
29978 _ = v_0.Args[2]
29979 v_0_2 := v_0.Args[2]
29980 if v_0_2.Op != OpSliceLen {
29981 break
29982 }
29983 x := v_0_2.Args[0]
29984 v.reset(OpSliceLen)
29985 v.AddArg(x)
29986 return true
29987 }
29988 return false
29989 }
29990 func rewriteValuegeneric_OpSliceLen(v *Value) bool {
29991 v_0 := v.Args[0]
29992
29993
29994 for {
29995 if v_0.Op != OpSliceMake {
29996 break
29997 }
29998 _ = v_0.Args[1]
29999 v_0_1 := v_0.Args[1]
30000 if v_0_1.Op != OpConst64 {
30001 break
30002 }
30003 t := v_0_1.Type
30004 c := auxIntToInt64(v_0_1.AuxInt)
30005 v.reset(OpConst64)
30006 v.Type = t
30007 v.AuxInt = int64ToAuxInt(c)
30008 return true
30009 }
30010
30011
30012 for {
30013 if v_0.Op != OpSliceMake {
30014 break
30015 }
30016 _ = v_0.Args[1]
30017 v_0_1 := v_0.Args[1]
30018 if v_0_1.Op != OpConst32 {
30019 break
30020 }
30021 t := v_0_1.Type
30022 c := auxIntToInt32(v_0_1.AuxInt)
30023 v.reset(OpConst32)
30024 v.Type = t
30025 v.AuxInt = int32ToAuxInt(c)
30026 return true
30027 }
30028
30029
30030 for {
30031 if v_0.Op != OpSliceMake {
30032 break
30033 }
30034 _ = v_0.Args[1]
30035 v_0_1 := v_0.Args[1]
30036 if v_0_1.Op != OpSliceLen {
30037 break
30038 }
30039 x := v_0_1.Args[0]
30040 v.reset(OpSliceLen)
30041 v.AddArg(x)
30042 return true
30043 }
30044
30045
30046
30047 for {
30048 if v_0.Op != OpSelectN || auxIntToInt64(v_0.AuxInt) != 0 {
30049 break
30050 }
30051 v_0_0 := v_0.Args[0]
30052 if v_0_0.Op != OpStaticLECall || len(v_0_0.Args) != 6 {
30053 break
30054 }
30055 sym := auxToCall(v_0_0.Aux)
30056 _ = v_0_0.Args[1]
30057 newLen := v_0_0.Args[1]
30058 if newLen.Op != OpConst64 || !(isSameCall(sym, "runtime.growslice")) {
30059 break
30060 }
30061 v.copyOf(newLen)
30062 return true
30063 }
30064
30065
30066
30067 for {
30068 if v_0.Op != OpSelectN || auxIntToInt64(v_0.AuxInt) != 0 {
30069 break
30070 }
30071 v_0_0 := v_0.Args[0]
30072 if v_0_0.Op != OpStaticLECall || len(v_0_0.Args) != 6 {
30073 break
30074 }
30075 sym := auxToCall(v_0_0.Aux)
30076 _ = v_0_0.Args[1]
30077 newLen := v_0_0.Args[1]
30078 if newLen.Op != OpConst32 || !(isSameCall(sym, "runtime.growslice")) {
30079 break
30080 }
30081 v.copyOf(newLen)
30082 return true
30083 }
30084 return false
30085 }
30086 func rewriteValuegeneric_OpSlicePtr(v *Value) bool {
30087 v_0 := v.Args[0]
30088
30089
30090 for {
30091 if v_0.Op != OpSliceMake {
30092 break
30093 }
30094 v_0_0 := v_0.Args[0]
30095 if v_0_0.Op != OpSlicePtr {
30096 break
30097 }
30098 x := v_0_0.Args[0]
30099 v.reset(OpSlicePtr)
30100 v.AddArg(x)
30101 return true
30102 }
30103 return false
30104 }
30105 func rewriteValuegeneric_OpSlicemask(v *Value) bool {
30106 v_0 := v.Args[0]
30107
30108
30109
30110 for {
30111 if v_0.Op != OpConst32 {
30112 break
30113 }
30114 x := auxIntToInt32(v_0.AuxInt)
30115 if !(x > 0) {
30116 break
30117 }
30118 v.reset(OpConst32)
30119 v.AuxInt = int32ToAuxInt(-1)
30120 return true
30121 }
30122
30123
30124 for {
30125 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
30126 break
30127 }
30128 v.reset(OpConst32)
30129 v.AuxInt = int32ToAuxInt(0)
30130 return true
30131 }
30132
30133
30134
30135 for {
30136 if v_0.Op != OpConst64 {
30137 break
30138 }
30139 x := auxIntToInt64(v_0.AuxInt)
30140 if !(x > 0) {
30141 break
30142 }
30143 v.reset(OpConst64)
30144 v.AuxInt = int64ToAuxInt(-1)
30145 return true
30146 }
30147
30148
30149 for {
30150 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
30151 break
30152 }
30153 v.reset(OpConst64)
30154 v.AuxInt = int64ToAuxInt(0)
30155 return true
30156 }
30157 return false
30158 }
30159 func rewriteValuegeneric_OpSqrt(v *Value) bool {
30160 v_0 := v.Args[0]
30161
30162
30163
30164 for {
30165 if v_0.Op != OpConst64F {
30166 break
30167 }
30168 c := auxIntToFloat64(v_0.AuxInt)
30169 if !(!math.IsNaN(math.Sqrt(c))) {
30170 break
30171 }
30172 v.reset(OpConst64F)
30173 v.AuxInt = float64ToAuxInt(math.Sqrt(c))
30174 return true
30175 }
30176 return false
30177 }
30178 func rewriteValuegeneric_OpStaticCall(v *Value) bool {
30179 b := v.Block
30180 typ := &b.Func.Config.Types
30181
30182
30183
30184 for {
30185 if len(v.Args) != 4 {
30186 break
30187 }
30188 callAux := auxToCall(v.Aux)
30189 mem := v.Args[3]
30190 p := v.Args[0]
30191 q := v.Args[1]
30192 if !(isSameCall(callAux, "runtime.memequal") && isSamePtr(p, q)) {
30193 break
30194 }
30195 v.reset(OpMakeResult)
30196 v0 := b.NewValue0(v.Pos, OpConstBool, typ.Bool)
30197 v0.AuxInt = boolToAuxInt(true)
30198 v.AddArg2(v0, mem)
30199 return true
30200 }
30201 return false
30202 }
30203 func rewriteValuegeneric_OpStaticLECall(v *Value) bool {
30204 b := v.Block
30205 config := b.Func.Config
30206 typ := &b.Func.Config.Types
30207
30208
30209
30210 for {
30211 if len(v.Args) != 4 {
30212 break
30213 }
30214 callAux := auxToCall(v.Aux)
30215 mem := v.Args[3]
30216 sptr := v.Args[0]
30217 v_1 := v.Args[1]
30218 if v_1.Op != OpAddr {
30219 break
30220 }
30221 scon := auxToSym(v_1.Aux)
30222 v_1_0 := v_1.Args[0]
30223 if v_1_0.Op != OpSB {
30224 break
30225 }
30226 v_2 := v.Args[2]
30227 if v_2.Op != OpConst64 || auxIntToInt64(v_2.AuxInt) != 1 || !(isSameCall(callAux, "runtime.memequal") && symIsRO(scon)) {
30228 break
30229 }
30230 v.reset(OpMakeResult)
30231 v0 := b.NewValue0(v.Pos, OpEq8, typ.Bool)
30232 v1 := b.NewValue0(v.Pos, OpLoad, typ.Int8)
30233 v1.AddArg2(sptr, mem)
30234 v2 := b.NewValue0(v.Pos, OpConst8, typ.Int8)
30235 v2.AuxInt = int8ToAuxInt(int8(read8(scon, 0)))
30236 v0.AddArg2(v1, v2)
30237 v.AddArg2(v0, mem)
30238 return true
30239 }
30240
30241
30242
30243 for {
30244 if len(v.Args) != 4 {
30245 break
30246 }
30247 callAux := auxToCall(v.Aux)
30248 mem := v.Args[3]
30249 v_0 := v.Args[0]
30250 if v_0.Op != OpAddr {
30251 break
30252 }
30253 scon := auxToSym(v_0.Aux)
30254 v_0_0 := v_0.Args[0]
30255 if v_0_0.Op != OpSB {
30256 break
30257 }
30258 sptr := v.Args[1]
30259 v_2 := v.Args[2]
30260 if v_2.Op != OpConst64 || auxIntToInt64(v_2.AuxInt) != 1 || !(isSameCall(callAux, "runtime.memequal") && symIsRO(scon)) {
30261 break
30262 }
30263 v.reset(OpMakeResult)
30264 v0 := b.NewValue0(v.Pos, OpEq8, typ.Bool)
30265 v1 := b.NewValue0(v.Pos, OpLoad, typ.Int8)
30266 v1.AddArg2(sptr, mem)
30267 v2 := b.NewValue0(v.Pos, OpConst8, typ.Int8)
30268 v2.AuxInt = int8ToAuxInt(int8(read8(scon, 0)))
30269 v0.AddArg2(v1, v2)
30270 v.AddArg2(v0, mem)
30271 return true
30272 }
30273
30274
30275
30276 for {
30277 if len(v.Args) != 4 {
30278 break
30279 }
30280 callAux := auxToCall(v.Aux)
30281 mem := v.Args[3]
30282 sptr := v.Args[0]
30283 v_1 := v.Args[1]
30284 if v_1.Op != OpAddr {
30285 break
30286 }
30287 scon := auxToSym(v_1.Aux)
30288 v_1_0 := v_1.Args[0]
30289 if v_1_0.Op != OpSB {
30290 break
30291 }
30292 v_2 := v.Args[2]
30293 if v_2.Op != OpConst64 || auxIntToInt64(v_2.AuxInt) != 2 || !(isSameCall(callAux, "runtime.memequal") && symIsRO(scon) && canLoadUnaligned(config)) {
30294 break
30295 }
30296 v.reset(OpMakeResult)
30297 v0 := b.NewValue0(v.Pos, OpEq16, typ.Bool)
30298 v1 := b.NewValue0(v.Pos, OpLoad, typ.Int16)
30299 v1.AddArg2(sptr, mem)
30300 v2 := b.NewValue0(v.Pos, OpConst16, typ.Int16)
30301 v2.AuxInt = int16ToAuxInt(int16(read16(scon, 0, config.ctxt.Arch.ByteOrder)))
30302 v0.AddArg2(v1, v2)
30303 v.AddArg2(v0, mem)
30304 return true
30305 }
30306
30307
30308
30309 for {
30310 if len(v.Args) != 4 {
30311 break
30312 }
30313 callAux := auxToCall(v.Aux)
30314 mem := v.Args[3]
30315 v_0 := v.Args[0]
30316 if v_0.Op != OpAddr {
30317 break
30318 }
30319 scon := auxToSym(v_0.Aux)
30320 v_0_0 := v_0.Args[0]
30321 if v_0_0.Op != OpSB {
30322 break
30323 }
30324 sptr := v.Args[1]
30325 v_2 := v.Args[2]
30326 if v_2.Op != OpConst64 || auxIntToInt64(v_2.AuxInt) != 2 || !(isSameCall(callAux, "runtime.memequal") && symIsRO(scon) && canLoadUnaligned(config)) {
30327 break
30328 }
30329 v.reset(OpMakeResult)
30330 v0 := b.NewValue0(v.Pos, OpEq16, typ.Bool)
30331 v1 := b.NewValue0(v.Pos, OpLoad, typ.Int16)
30332 v1.AddArg2(sptr, mem)
30333 v2 := b.NewValue0(v.Pos, OpConst16, typ.Int16)
30334 v2.AuxInt = int16ToAuxInt(int16(read16(scon, 0, config.ctxt.Arch.ByteOrder)))
30335 v0.AddArg2(v1, v2)
30336 v.AddArg2(v0, mem)
30337 return true
30338 }
30339
30340
30341
30342 for {
30343 if len(v.Args) != 4 {
30344 break
30345 }
30346 callAux := auxToCall(v.Aux)
30347 mem := v.Args[3]
30348 sptr := v.Args[0]
30349 v_1 := v.Args[1]
30350 if v_1.Op != OpAddr {
30351 break
30352 }
30353 scon := auxToSym(v_1.Aux)
30354 v_1_0 := v_1.Args[0]
30355 if v_1_0.Op != OpSB {
30356 break
30357 }
30358 v_2 := v.Args[2]
30359 if v_2.Op != OpConst64 || auxIntToInt64(v_2.AuxInt) != 4 || !(isSameCall(callAux, "runtime.memequal") && symIsRO(scon) && canLoadUnaligned(config)) {
30360 break
30361 }
30362 v.reset(OpMakeResult)
30363 v0 := b.NewValue0(v.Pos, OpEq32, typ.Bool)
30364 v1 := b.NewValue0(v.Pos, OpLoad, typ.Int32)
30365 v1.AddArg2(sptr, mem)
30366 v2 := b.NewValue0(v.Pos, OpConst32, typ.Int32)
30367 v2.AuxInt = int32ToAuxInt(int32(read32(scon, 0, config.ctxt.Arch.ByteOrder)))
30368 v0.AddArg2(v1, v2)
30369 v.AddArg2(v0, mem)
30370 return true
30371 }
30372
30373
30374
30375 for {
30376 if len(v.Args) != 4 {
30377 break
30378 }
30379 callAux := auxToCall(v.Aux)
30380 mem := v.Args[3]
30381 v_0 := v.Args[0]
30382 if v_0.Op != OpAddr {
30383 break
30384 }
30385 scon := auxToSym(v_0.Aux)
30386 v_0_0 := v_0.Args[0]
30387 if v_0_0.Op != OpSB {
30388 break
30389 }
30390 sptr := v.Args[1]
30391 v_2 := v.Args[2]
30392 if v_2.Op != OpConst64 || auxIntToInt64(v_2.AuxInt) != 4 || !(isSameCall(callAux, "runtime.memequal") && symIsRO(scon) && canLoadUnaligned(config)) {
30393 break
30394 }
30395 v.reset(OpMakeResult)
30396 v0 := b.NewValue0(v.Pos, OpEq32, typ.Bool)
30397 v1 := b.NewValue0(v.Pos, OpLoad, typ.Int32)
30398 v1.AddArg2(sptr, mem)
30399 v2 := b.NewValue0(v.Pos, OpConst32, typ.Int32)
30400 v2.AuxInt = int32ToAuxInt(int32(read32(scon, 0, config.ctxt.Arch.ByteOrder)))
30401 v0.AddArg2(v1, v2)
30402 v.AddArg2(v0, mem)
30403 return true
30404 }
30405
30406
30407
30408 for {
30409 if len(v.Args) != 4 {
30410 break
30411 }
30412 callAux := auxToCall(v.Aux)
30413 mem := v.Args[3]
30414 sptr := v.Args[0]
30415 v_1 := v.Args[1]
30416 if v_1.Op != OpAddr {
30417 break
30418 }
30419 scon := auxToSym(v_1.Aux)
30420 v_1_0 := v_1.Args[0]
30421 if v_1_0.Op != OpSB {
30422 break
30423 }
30424 v_2 := v.Args[2]
30425 if v_2.Op != OpConst64 || auxIntToInt64(v_2.AuxInt) != 8 || !(isSameCall(callAux, "runtime.memequal") && symIsRO(scon) && canLoadUnaligned(config) && config.PtrSize == 8) {
30426 break
30427 }
30428 v.reset(OpMakeResult)
30429 v0 := b.NewValue0(v.Pos, OpEq64, typ.Bool)
30430 v1 := b.NewValue0(v.Pos, OpLoad, typ.Int64)
30431 v1.AddArg2(sptr, mem)
30432 v2 := b.NewValue0(v.Pos, OpConst64, typ.Int64)
30433 v2.AuxInt = int64ToAuxInt(int64(read64(scon, 0, config.ctxt.Arch.ByteOrder)))
30434 v0.AddArg2(v1, v2)
30435 v.AddArg2(v0, mem)
30436 return true
30437 }
30438
30439
30440
30441 for {
30442 if len(v.Args) != 4 {
30443 break
30444 }
30445 callAux := auxToCall(v.Aux)
30446 mem := v.Args[3]
30447 v_0 := v.Args[0]
30448 if v_0.Op != OpAddr {
30449 break
30450 }
30451 scon := auxToSym(v_0.Aux)
30452 v_0_0 := v_0.Args[0]
30453 if v_0_0.Op != OpSB {
30454 break
30455 }
30456 sptr := v.Args[1]
30457 v_2 := v.Args[2]
30458 if v_2.Op != OpConst64 || auxIntToInt64(v_2.AuxInt) != 8 || !(isSameCall(callAux, "runtime.memequal") && symIsRO(scon) && canLoadUnaligned(config) && config.PtrSize == 8) {
30459 break
30460 }
30461 v.reset(OpMakeResult)
30462 v0 := b.NewValue0(v.Pos, OpEq64, typ.Bool)
30463 v1 := b.NewValue0(v.Pos, OpLoad, typ.Int64)
30464 v1.AddArg2(sptr, mem)
30465 v2 := b.NewValue0(v.Pos, OpConst64, typ.Int64)
30466 v2.AuxInt = int64ToAuxInt(int64(read64(scon, 0, config.ctxt.Arch.ByteOrder)))
30467 v0.AddArg2(v1, v2)
30468 v.AddArg2(v0, mem)
30469 return true
30470 }
30471
30472
30473
30474 for {
30475 if len(v.Args) != 4 {
30476 break
30477 }
30478 callAux := auxToCall(v.Aux)
30479 mem := v.Args[3]
30480 v_2 := v.Args[2]
30481 if v_2.Op != OpConst64 || auxIntToInt64(v_2.AuxInt) != 0 || !(isSameCall(callAux, "runtime.memequal")) {
30482 break
30483 }
30484 v.reset(OpMakeResult)
30485 v0 := b.NewValue0(v.Pos, OpConstBool, typ.Bool)
30486 v0.AuxInt = boolToAuxInt(true)
30487 v.AddArg2(v0, mem)
30488 return true
30489 }
30490
30491
30492
30493 for {
30494 if len(v.Args) != 4 {
30495 break
30496 }
30497 callAux := auxToCall(v.Aux)
30498 mem := v.Args[3]
30499 p := v.Args[0]
30500 q := v.Args[1]
30501 if !(isSameCall(callAux, "runtime.memequal") && isSamePtr(p, q)) {
30502 break
30503 }
30504 v.reset(OpMakeResult)
30505 v0 := b.NewValue0(v.Pos, OpConstBool, typ.Bool)
30506 v0.AuxInt = boolToAuxInt(true)
30507 v.AddArg2(v0, mem)
30508 return true
30509 }
30510
30511
30512
30513 for {
30514 if len(v.Args) != 4 {
30515 break
30516 }
30517 callAux := auxToCall(v.Aux)
30518 mem := v.Args[3]
30519 v_1 := v.Args[1]
30520 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 0 {
30521 break
30522 }
30523 v_2 := v.Args[2]
30524 if v_2.Op != OpConst64 || auxIntToInt64(v_2.AuxInt) != 0 || !(isSameCall(callAux, "runtime.makeslice")) {
30525 break
30526 }
30527 v.reset(OpMakeResult)
30528 v0 := b.NewValue0(v.Pos, OpAddr, v.Type.FieldType(0))
30529 v0.Aux = symToAux(ir.Syms.Zerobase)
30530 v1 := b.NewValue0(v.Pos, OpSB, typ.Uintptr)
30531 v0.AddArg(v1)
30532 v.AddArg2(v0, mem)
30533 return true
30534 }
30535
30536
30537
30538 for {
30539 if len(v.Args) != 4 {
30540 break
30541 }
30542 callAux := auxToCall(v.Aux)
30543 mem := v.Args[3]
30544 v_1 := v.Args[1]
30545 if v_1.Op != OpConst32 || auxIntToInt32(v_1.AuxInt) != 0 {
30546 break
30547 }
30548 v_2 := v.Args[2]
30549 if v_2.Op != OpConst32 || auxIntToInt32(v_2.AuxInt) != 0 || !(isSameCall(callAux, "runtime.makeslice")) {
30550 break
30551 }
30552 v.reset(OpMakeResult)
30553 v0 := b.NewValue0(v.Pos, OpAddr, v.Type.FieldType(0))
30554 v0.Aux = symToAux(ir.Syms.Zerobase)
30555 v1 := b.NewValue0(v.Pos, OpSB, typ.Uintptr)
30556 v0.AddArg(v1)
30557 v.AddArg2(v0, mem)
30558 return true
30559 }
30560
30561
30562
30563 for {
30564 if len(v.Args) != 4 {
30565 break
30566 }
30567 f := auxToCall(v.Aux)
30568 mem := v.Args[3]
30569 typ_ := v.Args[0]
30570 x := v.Args[1]
30571 y := v.Args[2]
30572 if !(isSameCall(f, "runtime.efaceeq") && isDirectType(typ_) && clobber(v)) {
30573 break
30574 }
30575 v.reset(OpMakeResult)
30576 v0 := b.NewValue0(v.Pos, OpEqPtr, typ.Bool)
30577 v0.AddArg2(x, y)
30578 v.AddArg2(v0, mem)
30579 return true
30580 }
30581
30582
30583
30584 for {
30585 if len(v.Args) != 4 {
30586 break
30587 }
30588 f := auxToCall(v.Aux)
30589 mem := v.Args[3]
30590 itab := v.Args[0]
30591 x := v.Args[1]
30592 y := v.Args[2]
30593 if !(isSameCall(f, "runtime.ifaceeq") && isDirectIface(itab) && clobber(v)) {
30594 break
30595 }
30596 v.reset(OpMakeResult)
30597 v0 := b.NewValue0(v.Pos, OpEqPtr, typ.Bool)
30598 v0.AddArg2(x, y)
30599 v.AddArg2(v0, mem)
30600 return true
30601 }
30602
30603
30604
30605 for {
30606 if len(v.Args) != 4 {
30607 break
30608 }
30609 argsize := auxIntToInt32(v.AuxInt)
30610 f := auxToCall(v.Aux)
30611 _ = v.Args[3]
30612 typ_ := v.Args[0]
30613 map_ := v.Args[1]
30614 key := v.Args[2]
30615 if key.Op != OpSelectN || auxIntToInt64(key.AuxInt) != 0 {
30616 break
30617 }
30618 sbts := key.Args[0]
30619 if sbts.Op != OpStaticLECall || len(sbts.Args) != 4 {
30620 break
30621 }
30622 g := auxToCall(sbts.Aux)
30623 mem := sbts.Args[3]
30624 ptr := sbts.Args[1]
30625 len := sbts.Args[2]
30626 m := v.Args[3]
30627 if m.Op != OpSelectN || auxIntToInt64(m.AuxInt) != 1 || sbts != m.Args[0] || !((isSameCall(f, "runtime.mapaccess1_faststr") || isSameCall(f, "runtime.mapaccess2_faststr") || isSameCall(f, "runtime.mapdelete_faststr")) && isSameCall(g, "runtime.slicebytetostring") && key.Uses == 1 && sbts.Uses == 2 && resetCopy(m, mem) && clobber(sbts) && clobber(key)) {
30628 break
30629 }
30630 v.reset(OpStaticLECall)
30631 v.AuxInt = int32ToAuxInt(argsize)
30632 v.Aux = callToAux(f)
30633 v0 := b.NewValue0(v.Pos, OpStringMake, typ.String)
30634 v0.AddArg2(ptr, len)
30635 v.AddArg4(typ_, map_, v0, mem)
30636 return true
30637 }
30638 return false
30639 }
30640 func rewriteValuegeneric_OpStore(v *Value) bool {
30641 v_2 := v.Args[2]
30642 v_1 := v.Args[1]
30643 v_0 := v.Args[0]
30644 b := v.Block
30645
30646
30647
30648 for {
30649 t1 := auxToType(v.Aux)
30650 p1 := v_0
30651 if v_1.Op != OpLoad {
30652 break
30653 }
30654 t2 := v_1.Type
30655 mem := v_1.Args[1]
30656 p2 := v_1.Args[0]
30657 if mem != v_2 || !(isSamePtr(p1, p2) && t2.Size() == t1.Size()) {
30658 break
30659 }
30660 v.copyOf(mem)
30661 return true
30662 }
30663
30664
30665
30666 for {
30667 t1 := auxToType(v.Aux)
30668 p1 := v_0
30669 if v_1.Op != OpLoad {
30670 break
30671 }
30672 t2 := v_1.Type
30673 oldmem := v_1.Args[1]
30674 p2 := v_1.Args[0]
30675 mem := v_2
30676 if mem.Op != OpStore {
30677 break
30678 }
30679 t3 := auxToType(mem.Aux)
30680 _ = mem.Args[2]
30681 p3 := mem.Args[0]
30682 if oldmem != mem.Args[2] || !(isSamePtr(p1, p2) && t2.Size() == t1.Size() && disjoint(p1, t1.Size(), p3, t3.Size())) {
30683 break
30684 }
30685 v.copyOf(mem)
30686 return true
30687 }
30688
30689
30690
30691 for {
30692 t1 := auxToType(v.Aux)
30693 p1 := v_0
30694 if v_1.Op != OpLoad {
30695 break
30696 }
30697 t2 := v_1.Type
30698 oldmem := v_1.Args[1]
30699 p2 := v_1.Args[0]
30700 mem := v_2
30701 if mem.Op != OpStore {
30702 break
30703 }
30704 t3 := auxToType(mem.Aux)
30705 _ = mem.Args[2]
30706 p3 := mem.Args[0]
30707 mem_2 := mem.Args[2]
30708 if mem_2.Op != OpStore {
30709 break
30710 }
30711 t4 := auxToType(mem_2.Aux)
30712 _ = mem_2.Args[2]
30713 p4 := mem_2.Args[0]
30714 if oldmem != mem_2.Args[2] || !(isSamePtr(p1, p2) && t2.Size() == t1.Size() && disjoint(p1, t1.Size(), p3, t3.Size()) && disjoint(p1, t1.Size(), p4, t4.Size())) {
30715 break
30716 }
30717 v.copyOf(mem)
30718 return true
30719 }
30720
30721
30722
30723 for {
30724 t1 := auxToType(v.Aux)
30725 p1 := v_0
30726 if v_1.Op != OpLoad {
30727 break
30728 }
30729 t2 := v_1.Type
30730 oldmem := v_1.Args[1]
30731 p2 := v_1.Args[0]
30732 mem := v_2
30733 if mem.Op != OpStore {
30734 break
30735 }
30736 t3 := auxToType(mem.Aux)
30737 _ = mem.Args[2]
30738 p3 := mem.Args[0]
30739 mem_2 := mem.Args[2]
30740 if mem_2.Op != OpStore {
30741 break
30742 }
30743 t4 := auxToType(mem_2.Aux)
30744 _ = mem_2.Args[2]
30745 p4 := mem_2.Args[0]
30746 mem_2_2 := mem_2.Args[2]
30747 if mem_2_2.Op != OpStore {
30748 break
30749 }
30750 t5 := auxToType(mem_2_2.Aux)
30751 _ = mem_2_2.Args[2]
30752 p5 := mem_2_2.Args[0]
30753 if oldmem != mem_2_2.Args[2] || !(isSamePtr(p1, p2) && t2.Size() == t1.Size() && disjoint(p1, t1.Size(), p3, t3.Size()) && disjoint(p1, t1.Size(), p4, t4.Size()) && disjoint(p1, t1.Size(), p5, t5.Size())) {
30754 break
30755 }
30756 v.copyOf(mem)
30757 return true
30758 }
30759
30760
30761
30762 for {
30763 t := auxToType(v.Aux)
30764 if v_0.Op != OpOffPtr {
30765 break
30766 }
30767 o := auxIntToInt64(v_0.AuxInt)
30768 p1 := v_0.Args[0]
30769 x := v_1
30770 mem := v_2
30771 if mem.Op != OpZero {
30772 break
30773 }
30774 n := auxIntToInt64(mem.AuxInt)
30775 p2 := mem.Args[0]
30776 if !(isConstZero(x) && o >= 0 && t.Size()+o <= n && isSamePtr(p1, p2)) {
30777 break
30778 }
30779 v.copyOf(mem)
30780 return true
30781 }
30782
30783
30784
30785 for {
30786 t1 := auxToType(v.Aux)
30787 op := v_0
30788 if op.Op != OpOffPtr {
30789 break
30790 }
30791 o1 := auxIntToInt64(op.AuxInt)
30792 p1 := op.Args[0]
30793 x := v_1
30794 mem := v_2
30795 if mem.Op != OpStore {
30796 break
30797 }
30798 t2 := auxToType(mem.Aux)
30799 _ = mem.Args[2]
30800 p2 := mem.Args[0]
30801 mem_2 := mem.Args[2]
30802 if mem_2.Op != OpZero {
30803 break
30804 }
30805 n := auxIntToInt64(mem_2.AuxInt)
30806 p3 := mem_2.Args[0]
30807 if !(isConstZero(x) && o1 >= 0 && t1.Size()+o1 <= n && isSamePtr(p1, p3) && disjoint(op, t1.Size(), p2, t2.Size())) {
30808 break
30809 }
30810 v.copyOf(mem)
30811 return true
30812 }
30813
30814
30815
30816 for {
30817 t1 := auxToType(v.Aux)
30818 op := v_0
30819 if op.Op != OpOffPtr {
30820 break
30821 }
30822 o1 := auxIntToInt64(op.AuxInt)
30823 p1 := op.Args[0]
30824 x := v_1
30825 mem := v_2
30826 if mem.Op != OpStore {
30827 break
30828 }
30829 t2 := auxToType(mem.Aux)
30830 _ = mem.Args[2]
30831 p2 := mem.Args[0]
30832 mem_2 := mem.Args[2]
30833 if mem_2.Op != OpStore {
30834 break
30835 }
30836 t3 := auxToType(mem_2.Aux)
30837 _ = mem_2.Args[2]
30838 p3 := mem_2.Args[0]
30839 mem_2_2 := mem_2.Args[2]
30840 if mem_2_2.Op != OpZero {
30841 break
30842 }
30843 n := auxIntToInt64(mem_2_2.AuxInt)
30844 p4 := mem_2_2.Args[0]
30845 if !(isConstZero(x) && o1 >= 0 && t1.Size()+o1 <= n && isSamePtr(p1, p4) && disjoint(op, t1.Size(), p2, t2.Size()) && disjoint(op, t1.Size(), p3, t3.Size())) {
30846 break
30847 }
30848 v.copyOf(mem)
30849 return true
30850 }
30851
30852
30853
30854 for {
30855 t1 := auxToType(v.Aux)
30856 op := v_0
30857 if op.Op != OpOffPtr {
30858 break
30859 }
30860 o1 := auxIntToInt64(op.AuxInt)
30861 p1 := op.Args[0]
30862 x := v_1
30863 mem := v_2
30864 if mem.Op != OpStore {
30865 break
30866 }
30867 t2 := auxToType(mem.Aux)
30868 _ = mem.Args[2]
30869 p2 := mem.Args[0]
30870 mem_2 := mem.Args[2]
30871 if mem_2.Op != OpStore {
30872 break
30873 }
30874 t3 := auxToType(mem_2.Aux)
30875 _ = mem_2.Args[2]
30876 p3 := mem_2.Args[0]
30877 mem_2_2 := mem_2.Args[2]
30878 if mem_2_2.Op != OpStore {
30879 break
30880 }
30881 t4 := auxToType(mem_2_2.Aux)
30882 _ = mem_2_2.Args[2]
30883 p4 := mem_2_2.Args[0]
30884 mem_2_2_2 := mem_2_2.Args[2]
30885 if mem_2_2_2.Op != OpZero {
30886 break
30887 }
30888 n := auxIntToInt64(mem_2_2_2.AuxInt)
30889 p5 := mem_2_2_2.Args[0]
30890 if !(isConstZero(x) && o1 >= 0 && t1.Size()+o1 <= n && isSamePtr(p1, p5) && disjoint(op, t1.Size(), p2, t2.Size()) && disjoint(op, t1.Size(), p3, t3.Size()) && disjoint(op, t1.Size(), p4, t4.Size())) {
30891 break
30892 }
30893 v.copyOf(mem)
30894 return true
30895 }
30896
30897
30898 for {
30899 if v_1.Op != OpStructMake {
30900 break
30901 }
30902 v.copyOf(rewriteStructStore(v))
30903 return true
30904 }
30905
30906
30907
30908 for {
30909 t := auxToType(v.Aux)
30910 dst := v_0
30911 if v_1.Op != OpLoad {
30912 break
30913 }
30914 mem := v_1.Args[1]
30915 src := v_1.Args[0]
30916 if mem != v_2 || !(!CanSSA(t)) {
30917 break
30918 }
30919 v.reset(OpMove)
30920 v.AuxInt = int64ToAuxInt(t.Size())
30921 v.Aux = typeToAux(t)
30922 v.AddArg3(dst, src, mem)
30923 return true
30924 }
30925
30926
30927
30928 for {
30929 t := auxToType(v.Aux)
30930 dst := v_0
30931 if v_1.Op != OpLoad {
30932 break
30933 }
30934 mem := v_1.Args[1]
30935 src := v_1.Args[0]
30936 if v_2.Op != OpVarDef {
30937 break
30938 }
30939 x := auxToSym(v_2.Aux)
30940 if mem != v_2.Args[0] || !(!CanSSA(t)) {
30941 break
30942 }
30943 v.reset(OpMove)
30944 v.AuxInt = int64ToAuxInt(t.Size())
30945 v.Aux = typeToAux(t)
30946 v0 := b.NewValue0(v.Pos, OpVarDef, types.TypeMem)
30947 v0.Aux = symToAux(x)
30948 v0.AddArg(mem)
30949 v.AddArg3(dst, src, v0)
30950 return true
30951 }
30952
30953
30954 for {
30955 if v_1.Op != OpArrayMake0 {
30956 break
30957 }
30958 mem := v_2
30959 v.copyOf(mem)
30960 return true
30961 }
30962
30963
30964 for {
30965 dst := v_0
30966 if v_1.Op != OpArrayMake1 {
30967 break
30968 }
30969 e := v_1.Args[0]
30970 mem := v_2
30971 v.reset(OpStore)
30972 v.Aux = typeToAux(e.Type)
30973 v.AddArg3(dst, e, mem)
30974 return true
30975 }
30976
30977
30978
30979 for {
30980 if v_0.Op != OpSelectN || auxIntToInt64(v_0.AuxInt) != 0 {
30981 break
30982 }
30983 call := v_0.Args[0]
30984 if call.Op != OpStaticLECall || len(call.Args) != 2 {
30985 break
30986 }
30987 x := v_1
30988 mem := v_2
30989 if mem.Op != OpSelectN || auxIntToInt64(mem.AuxInt) != 1 || call != mem.Args[0] || !(isConstZero(x) && isSameCall(call.Aux, "runtime.newobject")) {
30990 break
30991 }
30992 v.copyOf(mem)
30993 return true
30994 }
30995
30996
30997
30998 for {
30999 if v_0.Op != OpOffPtr {
31000 break
31001 }
31002 v_0_0 := v_0.Args[0]
31003 if v_0_0.Op != OpSelectN || auxIntToInt64(v_0_0.AuxInt) != 0 {
31004 break
31005 }
31006 call := v_0_0.Args[0]
31007 if call.Op != OpStaticLECall || len(call.Args) != 2 {
31008 break
31009 }
31010 x := v_1
31011 mem := v_2
31012 if mem.Op != OpSelectN || auxIntToInt64(mem.AuxInt) != 1 || call != mem.Args[0] || !(isConstZero(x) && isSameCall(call.Aux, "runtime.newobject")) {
31013 break
31014 }
31015 v.copyOf(mem)
31016 return true
31017 }
31018
31019
31020
31021 for {
31022 t1 := auxToType(v.Aux)
31023 op1 := v_0
31024 if op1.Op != OpOffPtr {
31025 break
31026 }
31027 o1 := auxIntToInt64(op1.AuxInt)
31028 p1 := op1.Args[0]
31029 d1 := v_1
31030 m2 := v_2
31031 if m2.Op != OpStore {
31032 break
31033 }
31034 t2 := auxToType(m2.Aux)
31035 _ = m2.Args[2]
31036 op2 := m2.Args[0]
31037 if op2.Op != OpOffPtr || auxIntToInt64(op2.AuxInt) != 0 {
31038 break
31039 }
31040 p2 := op2.Args[0]
31041 d2 := m2.Args[1]
31042 m3 := m2.Args[2]
31043 if m3.Op != OpMove {
31044 break
31045 }
31046 n := auxIntToInt64(m3.AuxInt)
31047 mem := m3.Args[2]
31048 p3 := m3.Args[0]
31049 if !(m2.Uses == 1 && m3.Uses == 1 && o1 == t2.Size() && n == t2.Size()+t1.Size() && isSamePtr(p1, p2) && isSamePtr(p2, p3) && clobber(m2, m3)) {
31050 break
31051 }
31052 v.reset(OpStore)
31053 v.Aux = typeToAux(t1)
31054 v0 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
31055 v0.Aux = typeToAux(t2)
31056 v0.AddArg3(op2, d2, mem)
31057 v.AddArg3(op1, d1, v0)
31058 return true
31059 }
31060
31061
31062
31063 for {
31064 t1 := auxToType(v.Aux)
31065 op1 := v_0
31066 if op1.Op != OpOffPtr {
31067 break
31068 }
31069 o1 := auxIntToInt64(op1.AuxInt)
31070 p1 := op1.Args[0]
31071 d1 := v_1
31072 m2 := v_2
31073 if m2.Op != OpStore {
31074 break
31075 }
31076 t2 := auxToType(m2.Aux)
31077 _ = m2.Args[2]
31078 op2 := m2.Args[0]
31079 if op2.Op != OpOffPtr {
31080 break
31081 }
31082 o2 := auxIntToInt64(op2.AuxInt)
31083 p2 := op2.Args[0]
31084 d2 := m2.Args[1]
31085 m3 := m2.Args[2]
31086 if m3.Op != OpStore {
31087 break
31088 }
31089 t3 := auxToType(m3.Aux)
31090 _ = m3.Args[2]
31091 op3 := m3.Args[0]
31092 if op3.Op != OpOffPtr || auxIntToInt64(op3.AuxInt) != 0 {
31093 break
31094 }
31095 p3 := op3.Args[0]
31096 d3 := m3.Args[1]
31097 m4 := m3.Args[2]
31098 if m4.Op != OpMove {
31099 break
31100 }
31101 n := auxIntToInt64(m4.AuxInt)
31102 mem := m4.Args[2]
31103 p4 := m4.Args[0]
31104 if !(m2.Uses == 1 && m3.Uses == 1 && m4.Uses == 1 && o2 == t3.Size() && o1-o2 == t2.Size() && n == t3.Size()+t2.Size()+t1.Size() && isSamePtr(p1, p2) && isSamePtr(p2, p3) && isSamePtr(p3, p4) && clobber(m2, m3, m4)) {
31105 break
31106 }
31107 v.reset(OpStore)
31108 v.Aux = typeToAux(t1)
31109 v0 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
31110 v0.Aux = typeToAux(t2)
31111 v1 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
31112 v1.Aux = typeToAux(t3)
31113 v1.AddArg3(op3, d3, mem)
31114 v0.AddArg3(op2, d2, v1)
31115 v.AddArg3(op1, d1, v0)
31116 return true
31117 }
31118
31119
31120
31121 for {
31122 t1 := auxToType(v.Aux)
31123 op1 := v_0
31124 if op1.Op != OpOffPtr {
31125 break
31126 }
31127 o1 := auxIntToInt64(op1.AuxInt)
31128 p1 := op1.Args[0]
31129 d1 := v_1
31130 m2 := v_2
31131 if m2.Op != OpStore {
31132 break
31133 }
31134 t2 := auxToType(m2.Aux)
31135 _ = m2.Args[2]
31136 op2 := m2.Args[0]
31137 if op2.Op != OpOffPtr {
31138 break
31139 }
31140 o2 := auxIntToInt64(op2.AuxInt)
31141 p2 := op2.Args[0]
31142 d2 := m2.Args[1]
31143 m3 := m2.Args[2]
31144 if m3.Op != OpStore {
31145 break
31146 }
31147 t3 := auxToType(m3.Aux)
31148 _ = m3.Args[2]
31149 op3 := m3.Args[0]
31150 if op3.Op != OpOffPtr {
31151 break
31152 }
31153 o3 := auxIntToInt64(op3.AuxInt)
31154 p3 := op3.Args[0]
31155 d3 := m3.Args[1]
31156 m4 := m3.Args[2]
31157 if m4.Op != OpStore {
31158 break
31159 }
31160 t4 := auxToType(m4.Aux)
31161 _ = m4.Args[2]
31162 op4 := m4.Args[0]
31163 if op4.Op != OpOffPtr || auxIntToInt64(op4.AuxInt) != 0 {
31164 break
31165 }
31166 p4 := op4.Args[0]
31167 d4 := m4.Args[1]
31168 m5 := m4.Args[2]
31169 if m5.Op != OpMove {
31170 break
31171 }
31172 n := auxIntToInt64(m5.AuxInt)
31173 mem := m5.Args[2]
31174 p5 := m5.Args[0]
31175 if !(m2.Uses == 1 && m3.Uses == 1 && m4.Uses == 1 && m5.Uses == 1 && o3 == t4.Size() && o2-o3 == t3.Size() && o1-o2 == t2.Size() && n == t4.Size()+t3.Size()+t2.Size()+t1.Size() && isSamePtr(p1, p2) && isSamePtr(p2, p3) && isSamePtr(p3, p4) && isSamePtr(p4, p5) && clobber(m2, m3, m4, m5)) {
31176 break
31177 }
31178 v.reset(OpStore)
31179 v.Aux = typeToAux(t1)
31180 v0 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
31181 v0.Aux = typeToAux(t2)
31182 v1 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
31183 v1.Aux = typeToAux(t3)
31184 v2 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
31185 v2.Aux = typeToAux(t4)
31186 v2.AddArg3(op4, d4, mem)
31187 v1.AddArg3(op3, d3, v2)
31188 v0.AddArg3(op2, d2, v1)
31189 v.AddArg3(op1, d1, v0)
31190 return true
31191 }
31192
31193
31194
31195 for {
31196 t1 := auxToType(v.Aux)
31197 op1 := v_0
31198 if op1.Op != OpOffPtr {
31199 break
31200 }
31201 o1 := auxIntToInt64(op1.AuxInt)
31202 p1 := op1.Args[0]
31203 d1 := v_1
31204 m2 := v_2
31205 if m2.Op != OpStore {
31206 break
31207 }
31208 t2 := auxToType(m2.Aux)
31209 _ = m2.Args[2]
31210 op2 := m2.Args[0]
31211 if op2.Op != OpOffPtr || auxIntToInt64(op2.AuxInt) != 0 {
31212 break
31213 }
31214 p2 := op2.Args[0]
31215 d2 := m2.Args[1]
31216 m3 := m2.Args[2]
31217 if m3.Op != OpZero {
31218 break
31219 }
31220 n := auxIntToInt64(m3.AuxInt)
31221 mem := m3.Args[1]
31222 p3 := m3.Args[0]
31223 if !(m2.Uses == 1 && m3.Uses == 1 && o1 == t2.Size() && n == t2.Size()+t1.Size() && isSamePtr(p1, p2) && isSamePtr(p2, p3) && clobber(m2, m3)) {
31224 break
31225 }
31226 v.reset(OpStore)
31227 v.Aux = typeToAux(t1)
31228 v0 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
31229 v0.Aux = typeToAux(t2)
31230 v0.AddArg3(op2, d2, mem)
31231 v.AddArg3(op1, d1, v0)
31232 return true
31233 }
31234
31235
31236
31237 for {
31238 t1 := auxToType(v.Aux)
31239 op1 := v_0
31240 if op1.Op != OpOffPtr {
31241 break
31242 }
31243 o1 := auxIntToInt64(op1.AuxInt)
31244 p1 := op1.Args[0]
31245 d1 := v_1
31246 m2 := v_2
31247 if m2.Op != OpStore {
31248 break
31249 }
31250 t2 := auxToType(m2.Aux)
31251 _ = m2.Args[2]
31252 op2 := m2.Args[0]
31253 if op2.Op != OpOffPtr {
31254 break
31255 }
31256 o2 := auxIntToInt64(op2.AuxInt)
31257 p2 := op2.Args[0]
31258 d2 := m2.Args[1]
31259 m3 := m2.Args[2]
31260 if m3.Op != OpStore {
31261 break
31262 }
31263 t3 := auxToType(m3.Aux)
31264 _ = m3.Args[2]
31265 op3 := m3.Args[0]
31266 if op3.Op != OpOffPtr || auxIntToInt64(op3.AuxInt) != 0 {
31267 break
31268 }
31269 p3 := op3.Args[0]
31270 d3 := m3.Args[1]
31271 m4 := m3.Args[2]
31272 if m4.Op != OpZero {
31273 break
31274 }
31275 n := auxIntToInt64(m4.AuxInt)
31276 mem := m4.Args[1]
31277 p4 := m4.Args[0]
31278 if !(m2.Uses == 1 && m3.Uses == 1 && m4.Uses == 1 && o2 == t3.Size() && o1-o2 == t2.Size() && n == t3.Size()+t2.Size()+t1.Size() && isSamePtr(p1, p2) && isSamePtr(p2, p3) && isSamePtr(p3, p4) && clobber(m2, m3, m4)) {
31279 break
31280 }
31281 v.reset(OpStore)
31282 v.Aux = typeToAux(t1)
31283 v0 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
31284 v0.Aux = typeToAux(t2)
31285 v1 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
31286 v1.Aux = typeToAux(t3)
31287 v1.AddArg3(op3, d3, mem)
31288 v0.AddArg3(op2, d2, v1)
31289 v.AddArg3(op1, d1, v0)
31290 return true
31291 }
31292
31293
31294
31295 for {
31296 t1 := auxToType(v.Aux)
31297 op1 := v_0
31298 if op1.Op != OpOffPtr {
31299 break
31300 }
31301 o1 := auxIntToInt64(op1.AuxInt)
31302 p1 := op1.Args[0]
31303 d1 := v_1
31304 m2 := v_2
31305 if m2.Op != OpStore {
31306 break
31307 }
31308 t2 := auxToType(m2.Aux)
31309 _ = m2.Args[2]
31310 op2 := m2.Args[0]
31311 if op2.Op != OpOffPtr {
31312 break
31313 }
31314 o2 := auxIntToInt64(op2.AuxInt)
31315 p2 := op2.Args[0]
31316 d2 := m2.Args[1]
31317 m3 := m2.Args[2]
31318 if m3.Op != OpStore {
31319 break
31320 }
31321 t3 := auxToType(m3.Aux)
31322 _ = m3.Args[2]
31323 op3 := m3.Args[0]
31324 if op3.Op != OpOffPtr {
31325 break
31326 }
31327 o3 := auxIntToInt64(op3.AuxInt)
31328 p3 := op3.Args[0]
31329 d3 := m3.Args[1]
31330 m4 := m3.Args[2]
31331 if m4.Op != OpStore {
31332 break
31333 }
31334 t4 := auxToType(m4.Aux)
31335 _ = m4.Args[2]
31336 op4 := m4.Args[0]
31337 if op4.Op != OpOffPtr || auxIntToInt64(op4.AuxInt) != 0 {
31338 break
31339 }
31340 p4 := op4.Args[0]
31341 d4 := m4.Args[1]
31342 m5 := m4.Args[2]
31343 if m5.Op != OpZero {
31344 break
31345 }
31346 n := auxIntToInt64(m5.AuxInt)
31347 mem := m5.Args[1]
31348 p5 := m5.Args[0]
31349 if !(m2.Uses == 1 && m3.Uses == 1 && m4.Uses == 1 && m5.Uses == 1 && o3 == t4.Size() && o2-o3 == t3.Size() && o1-o2 == t2.Size() && n == t4.Size()+t3.Size()+t2.Size()+t1.Size() && isSamePtr(p1, p2) && isSamePtr(p2, p3) && isSamePtr(p3, p4) && isSamePtr(p4, p5) && clobber(m2, m3, m4, m5)) {
31350 break
31351 }
31352 v.reset(OpStore)
31353 v.Aux = typeToAux(t1)
31354 v0 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
31355 v0.Aux = typeToAux(t2)
31356 v1 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
31357 v1.Aux = typeToAux(t3)
31358 v2 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
31359 v2.Aux = typeToAux(t4)
31360 v2.AddArg3(op4, d4, mem)
31361 v1.AddArg3(op3, d3, v2)
31362 v0.AddArg3(op2, d2, v1)
31363 v.AddArg3(op1, d1, v0)
31364 return true
31365 }
31366 return false
31367 }
31368 func rewriteValuegeneric_OpStringLen(v *Value) bool {
31369 v_0 := v.Args[0]
31370
31371
31372 for {
31373 if v_0.Op != OpStringMake {
31374 break
31375 }
31376 _ = v_0.Args[1]
31377 v_0_1 := v_0.Args[1]
31378 if v_0_1.Op != OpConst64 {
31379 break
31380 }
31381 t := v_0_1.Type
31382 c := auxIntToInt64(v_0_1.AuxInt)
31383 v.reset(OpConst64)
31384 v.Type = t
31385 v.AuxInt = int64ToAuxInt(c)
31386 return true
31387 }
31388 return false
31389 }
31390 func rewriteValuegeneric_OpStringPtr(v *Value) bool {
31391 v_0 := v.Args[0]
31392
31393
31394 for {
31395 if v_0.Op != OpStringMake {
31396 break
31397 }
31398 v_0_0 := v_0.Args[0]
31399 if v_0_0.Op != OpAddr {
31400 break
31401 }
31402 t := v_0_0.Type
31403 s := auxToSym(v_0_0.Aux)
31404 base := v_0_0.Args[0]
31405 v.reset(OpAddr)
31406 v.Type = t
31407 v.Aux = symToAux(s)
31408 v.AddArg(base)
31409 return true
31410 }
31411 return false
31412 }
31413 func rewriteValuegeneric_OpStructSelect(v *Value) bool {
31414 v_0 := v.Args[0]
31415 b := v.Block
31416
31417
31418 for {
31419 i := auxIntToInt64(v.AuxInt)
31420 x := v_0
31421 if x.Op != OpStructMake {
31422 break
31423 }
31424 v.copyOf(x.Args[i])
31425 return true
31426 }
31427
31428
31429
31430 for {
31431 i := auxIntToInt64(v.AuxInt)
31432 x := v_0
31433 if x.Op != OpLoad {
31434 break
31435 }
31436 t := x.Type
31437 mem := x.Args[1]
31438 ptr := x.Args[0]
31439 if !(!CanSSA(t)) {
31440 break
31441 }
31442 b = x.Block
31443 v0 := b.NewValue0(v.Pos, OpLoad, v.Type)
31444 v.copyOf(v0)
31445 v1 := b.NewValue0(v.Pos, OpOffPtr, v.Type.PtrTo())
31446 v1.AuxInt = int64ToAuxInt(t.FieldOff(int(i)))
31447 v1.AddArg(ptr)
31448 v0.AddArg2(v1, mem)
31449 return true
31450 }
31451
31452
31453 for {
31454 if auxIntToInt64(v.AuxInt) != 0 || v_0.Op != OpIData {
31455 break
31456 }
31457 x := v_0.Args[0]
31458 v.reset(OpIData)
31459 v.AddArg(x)
31460 return true
31461 }
31462 return false
31463 }
31464 func rewriteValuegeneric_OpSub16(v *Value) bool {
31465 v_1 := v.Args[1]
31466 v_0 := v.Args[0]
31467 b := v.Block
31468
31469
31470 for {
31471 if v_0.Op != OpConst16 {
31472 break
31473 }
31474 c := auxIntToInt16(v_0.AuxInt)
31475 if v_1.Op != OpConst16 {
31476 break
31477 }
31478 d := auxIntToInt16(v_1.AuxInt)
31479 v.reset(OpConst16)
31480 v.AuxInt = int16ToAuxInt(c - d)
31481 return true
31482 }
31483
31484
31485
31486 for {
31487 x := v_0
31488 if v_1.Op != OpConst16 {
31489 break
31490 }
31491 t := v_1.Type
31492 c := auxIntToInt16(v_1.AuxInt)
31493 if !(x.Op != OpConst16) {
31494 break
31495 }
31496 v.reset(OpAdd16)
31497 v0 := b.NewValue0(v.Pos, OpConst16, t)
31498 v0.AuxInt = int16ToAuxInt(-c)
31499 v.AddArg2(v0, x)
31500 return true
31501 }
31502
31503
31504 for {
31505 t := v.Type
31506 if v_0.Op != OpMul16 {
31507 break
31508 }
31509 _ = v_0.Args[1]
31510 v_0_0 := v_0.Args[0]
31511 v_0_1 := v_0.Args[1]
31512 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
31513 x := v_0_0
31514 y := v_0_1
31515 if v_1.Op != OpMul16 {
31516 continue
31517 }
31518 _ = v_1.Args[1]
31519 v_1_0 := v_1.Args[0]
31520 v_1_1 := v_1.Args[1]
31521 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
31522 if x != v_1_0 {
31523 continue
31524 }
31525 z := v_1_1
31526 v.reset(OpMul16)
31527 v0 := b.NewValue0(v.Pos, OpSub16, t)
31528 v0.AddArg2(y, z)
31529 v.AddArg2(x, v0)
31530 return true
31531 }
31532 }
31533 break
31534 }
31535
31536
31537 for {
31538 x := v_0
31539 if x != v_1 {
31540 break
31541 }
31542 v.reset(OpConst16)
31543 v.AuxInt = int16ToAuxInt(0)
31544 return true
31545 }
31546
31547
31548 for {
31549 if v_0.Op != OpNeg16 {
31550 break
31551 }
31552 x := v_0.Args[0]
31553 if v_1.Op != OpCom16 || x != v_1.Args[0] {
31554 break
31555 }
31556 v.reset(OpConst16)
31557 v.AuxInt = int16ToAuxInt(1)
31558 return true
31559 }
31560
31561
31562 for {
31563 if v_0.Op != OpCom16 {
31564 break
31565 }
31566 x := v_0.Args[0]
31567 if v_1.Op != OpNeg16 || x != v_1.Args[0] {
31568 break
31569 }
31570 v.reset(OpConst16)
31571 v.AuxInt = int16ToAuxInt(-1)
31572 return true
31573 }
31574
31575
31576 for {
31577 if v_0.Op != OpAdd16 {
31578 break
31579 }
31580 _ = v_0.Args[1]
31581 v_0_0 := v_0.Args[0]
31582 v_0_1 := v_0.Args[1]
31583 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
31584 t := v_0_0
31585 x := v_0_1
31586 if v_1.Op != OpAdd16 {
31587 continue
31588 }
31589 _ = v_1.Args[1]
31590 v_1_0 := v_1.Args[0]
31591 v_1_1 := v_1.Args[1]
31592 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
31593 if t != v_1_0 {
31594 continue
31595 }
31596 y := v_1_1
31597 v.reset(OpSub16)
31598 v.AddArg2(x, y)
31599 return true
31600 }
31601 }
31602 break
31603 }
31604
31605
31606 for {
31607 if v_0.Op != OpAdd16 {
31608 break
31609 }
31610 _ = v_0.Args[1]
31611 v_0_0 := v_0.Args[0]
31612 v_0_1 := v_0.Args[1]
31613 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
31614 x := v_0_0
31615 y := v_0_1
31616 if x != v_1 {
31617 continue
31618 }
31619 v.copyOf(y)
31620 return true
31621 }
31622 break
31623 }
31624
31625
31626 for {
31627 if v_0.Op != OpAdd16 {
31628 break
31629 }
31630 _ = v_0.Args[1]
31631 v_0_0 := v_0.Args[0]
31632 v_0_1 := v_0.Args[1]
31633 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
31634 x := v_0_0
31635 y := v_0_1
31636 if y != v_1 {
31637 continue
31638 }
31639 v.copyOf(x)
31640 return true
31641 }
31642 break
31643 }
31644
31645
31646 for {
31647 if v_0.Op != OpSub16 {
31648 break
31649 }
31650 y := v_0.Args[1]
31651 x := v_0.Args[0]
31652 if x != v_1 {
31653 break
31654 }
31655 v.reset(OpNeg16)
31656 v.AddArg(y)
31657 return true
31658 }
31659
31660
31661 for {
31662 x := v_0
31663 if v_1.Op != OpAdd16 {
31664 break
31665 }
31666 _ = v_1.Args[1]
31667 v_1_0 := v_1.Args[0]
31668 v_1_1 := v_1.Args[1]
31669 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
31670 if x != v_1_0 {
31671 continue
31672 }
31673 y := v_1_1
31674 v.reset(OpNeg16)
31675 v.AddArg(y)
31676 return true
31677 }
31678 break
31679 }
31680
31681
31682
31683 for {
31684 x := v_0
31685 if v_1.Op != OpSub16 {
31686 break
31687 }
31688 z := v_1.Args[1]
31689 i := v_1.Args[0]
31690 if i.Op != OpConst16 {
31691 break
31692 }
31693 t := i.Type
31694 if !(z.Op != OpConst16 && x.Op != OpConst16) {
31695 break
31696 }
31697 v.reset(OpSub16)
31698 v0 := b.NewValue0(v.Pos, OpAdd16, t)
31699 v0.AddArg2(x, z)
31700 v.AddArg2(v0, i)
31701 return true
31702 }
31703
31704
31705
31706 for {
31707 x := v_0
31708 if v_1.Op != OpAdd16 {
31709 break
31710 }
31711 _ = v_1.Args[1]
31712 v_1_0 := v_1.Args[0]
31713 v_1_1 := v_1.Args[1]
31714 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
31715 z := v_1_0
31716 i := v_1_1
31717 if i.Op != OpConst16 {
31718 continue
31719 }
31720 t := i.Type
31721 if !(z.Op != OpConst16 && x.Op != OpConst16) {
31722 continue
31723 }
31724 v.reset(OpSub16)
31725 v0 := b.NewValue0(v.Pos, OpSub16, t)
31726 v0.AddArg2(x, z)
31727 v.AddArg2(v0, i)
31728 return true
31729 }
31730 break
31731 }
31732
31733
31734
31735 for {
31736 if v_0.Op != OpSub16 {
31737 break
31738 }
31739 z := v_0.Args[1]
31740 i := v_0.Args[0]
31741 if i.Op != OpConst16 {
31742 break
31743 }
31744 t := i.Type
31745 x := v_1
31746 if !(z.Op != OpConst16 && x.Op != OpConst16) {
31747 break
31748 }
31749 v.reset(OpSub16)
31750 v0 := b.NewValue0(v.Pos, OpAdd16, t)
31751 v0.AddArg2(z, x)
31752 v.AddArg2(i, v0)
31753 return true
31754 }
31755
31756
31757
31758 for {
31759 if v_0.Op != OpAdd16 {
31760 break
31761 }
31762 _ = v_0.Args[1]
31763 v_0_0 := v_0.Args[0]
31764 v_0_1 := v_0.Args[1]
31765 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
31766 z := v_0_0
31767 i := v_0_1
31768 if i.Op != OpConst16 {
31769 continue
31770 }
31771 t := i.Type
31772 x := v_1
31773 if !(z.Op != OpConst16 && x.Op != OpConst16) {
31774 continue
31775 }
31776 v.reset(OpAdd16)
31777 v0 := b.NewValue0(v.Pos, OpSub16, t)
31778 v0.AddArg2(z, x)
31779 v.AddArg2(i, v0)
31780 return true
31781 }
31782 break
31783 }
31784
31785
31786 for {
31787 if v_0.Op != OpConst16 {
31788 break
31789 }
31790 t := v_0.Type
31791 c := auxIntToInt16(v_0.AuxInt)
31792 if v_1.Op != OpSub16 {
31793 break
31794 }
31795 x := v_1.Args[1]
31796 v_1_0 := v_1.Args[0]
31797 if v_1_0.Op != OpConst16 || v_1_0.Type != t {
31798 break
31799 }
31800 d := auxIntToInt16(v_1_0.AuxInt)
31801 v.reset(OpAdd16)
31802 v0 := b.NewValue0(v.Pos, OpConst16, t)
31803 v0.AuxInt = int16ToAuxInt(c - d)
31804 v.AddArg2(v0, x)
31805 return true
31806 }
31807
31808
31809 for {
31810 if v_0.Op != OpConst16 {
31811 break
31812 }
31813 t := v_0.Type
31814 c := auxIntToInt16(v_0.AuxInt)
31815 if v_1.Op != OpAdd16 {
31816 break
31817 }
31818 _ = v_1.Args[1]
31819 v_1_0 := v_1.Args[0]
31820 v_1_1 := v_1.Args[1]
31821 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
31822 if v_1_0.Op != OpConst16 || v_1_0.Type != t {
31823 continue
31824 }
31825 d := auxIntToInt16(v_1_0.AuxInt)
31826 x := v_1_1
31827 v.reset(OpSub16)
31828 v0 := b.NewValue0(v.Pos, OpConst16, t)
31829 v0.AuxInt = int16ToAuxInt(c - d)
31830 v.AddArg2(v0, x)
31831 return true
31832 }
31833 break
31834 }
31835 return false
31836 }
31837 func rewriteValuegeneric_OpSub32(v *Value) bool {
31838 v_1 := v.Args[1]
31839 v_0 := v.Args[0]
31840 b := v.Block
31841
31842
31843 for {
31844 if v_0.Op != OpConst32 {
31845 break
31846 }
31847 c := auxIntToInt32(v_0.AuxInt)
31848 if v_1.Op != OpConst32 {
31849 break
31850 }
31851 d := auxIntToInt32(v_1.AuxInt)
31852 v.reset(OpConst32)
31853 v.AuxInt = int32ToAuxInt(c - d)
31854 return true
31855 }
31856
31857
31858
31859 for {
31860 x := v_0
31861 if v_1.Op != OpConst32 {
31862 break
31863 }
31864 t := v_1.Type
31865 c := auxIntToInt32(v_1.AuxInt)
31866 if !(x.Op != OpConst32) {
31867 break
31868 }
31869 v.reset(OpAdd32)
31870 v0 := b.NewValue0(v.Pos, OpConst32, t)
31871 v0.AuxInt = int32ToAuxInt(-c)
31872 v.AddArg2(v0, x)
31873 return true
31874 }
31875
31876
31877 for {
31878 t := v.Type
31879 if v_0.Op != OpMul32 {
31880 break
31881 }
31882 _ = v_0.Args[1]
31883 v_0_0 := v_0.Args[0]
31884 v_0_1 := v_0.Args[1]
31885 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
31886 x := v_0_0
31887 y := v_0_1
31888 if v_1.Op != OpMul32 {
31889 continue
31890 }
31891 _ = v_1.Args[1]
31892 v_1_0 := v_1.Args[0]
31893 v_1_1 := v_1.Args[1]
31894 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
31895 if x != v_1_0 {
31896 continue
31897 }
31898 z := v_1_1
31899 v.reset(OpMul32)
31900 v0 := b.NewValue0(v.Pos, OpSub32, t)
31901 v0.AddArg2(y, z)
31902 v.AddArg2(x, v0)
31903 return true
31904 }
31905 }
31906 break
31907 }
31908
31909
31910 for {
31911 x := v_0
31912 if x != v_1 {
31913 break
31914 }
31915 v.reset(OpConst32)
31916 v.AuxInt = int32ToAuxInt(0)
31917 return true
31918 }
31919
31920
31921 for {
31922 if v_0.Op != OpNeg32 {
31923 break
31924 }
31925 x := v_0.Args[0]
31926 if v_1.Op != OpCom32 || x != v_1.Args[0] {
31927 break
31928 }
31929 v.reset(OpConst32)
31930 v.AuxInt = int32ToAuxInt(1)
31931 return true
31932 }
31933
31934
31935 for {
31936 if v_0.Op != OpCom32 {
31937 break
31938 }
31939 x := v_0.Args[0]
31940 if v_1.Op != OpNeg32 || x != v_1.Args[0] {
31941 break
31942 }
31943 v.reset(OpConst32)
31944 v.AuxInt = int32ToAuxInt(-1)
31945 return true
31946 }
31947
31948
31949 for {
31950 if v_0.Op != OpAdd32 {
31951 break
31952 }
31953 _ = v_0.Args[1]
31954 v_0_0 := v_0.Args[0]
31955 v_0_1 := v_0.Args[1]
31956 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
31957 t := v_0_0
31958 x := v_0_1
31959 if v_1.Op != OpAdd32 {
31960 continue
31961 }
31962 _ = v_1.Args[1]
31963 v_1_0 := v_1.Args[0]
31964 v_1_1 := v_1.Args[1]
31965 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
31966 if t != v_1_0 {
31967 continue
31968 }
31969 y := v_1_1
31970 v.reset(OpSub32)
31971 v.AddArg2(x, y)
31972 return true
31973 }
31974 }
31975 break
31976 }
31977
31978
31979 for {
31980 if v_0.Op != OpAdd32 {
31981 break
31982 }
31983 _ = v_0.Args[1]
31984 v_0_0 := v_0.Args[0]
31985 v_0_1 := v_0.Args[1]
31986 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
31987 x := v_0_0
31988 y := v_0_1
31989 if x != v_1 {
31990 continue
31991 }
31992 v.copyOf(y)
31993 return true
31994 }
31995 break
31996 }
31997
31998
31999 for {
32000 if v_0.Op != OpAdd32 {
32001 break
32002 }
32003 _ = v_0.Args[1]
32004 v_0_0 := v_0.Args[0]
32005 v_0_1 := v_0.Args[1]
32006 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
32007 x := v_0_0
32008 y := v_0_1
32009 if y != v_1 {
32010 continue
32011 }
32012 v.copyOf(x)
32013 return true
32014 }
32015 break
32016 }
32017
32018
32019 for {
32020 if v_0.Op != OpSub32 {
32021 break
32022 }
32023 y := v_0.Args[1]
32024 x := v_0.Args[0]
32025 if x != v_1 {
32026 break
32027 }
32028 v.reset(OpNeg32)
32029 v.AddArg(y)
32030 return true
32031 }
32032
32033
32034 for {
32035 x := v_0
32036 if v_1.Op != OpAdd32 {
32037 break
32038 }
32039 _ = v_1.Args[1]
32040 v_1_0 := v_1.Args[0]
32041 v_1_1 := v_1.Args[1]
32042 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
32043 if x != v_1_0 {
32044 continue
32045 }
32046 y := v_1_1
32047 v.reset(OpNeg32)
32048 v.AddArg(y)
32049 return true
32050 }
32051 break
32052 }
32053
32054
32055
32056 for {
32057 x := v_0
32058 if v_1.Op != OpSub32 {
32059 break
32060 }
32061 z := v_1.Args[1]
32062 i := v_1.Args[0]
32063 if i.Op != OpConst32 {
32064 break
32065 }
32066 t := i.Type
32067 if !(z.Op != OpConst32 && x.Op != OpConst32) {
32068 break
32069 }
32070 v.reset(OpSub32)
32071 v0 := b.NewValue0(v.Pos, OpAdd32, t)
32072 v0.AddArg2(x, z)
32073 v.AddArg2(v0, i)
32074 return true
32075 }
32076
32077
32078
32079 for {
32080 x := v_0
32081 if v_1.Op != OpAdd32 {
32082 break
32083 }
32084 _ = v_1.Args[1]
32085 v_1_0 := v_1.Args[0]
32086 v_1_1 := v_1.Args[1]
32087 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
32088 z := v_1_0
32089 i := v_1_1
32090 if i.Op != OpConst32 {
32091 continue
32092 }
32093 t := i.Type
32094 if !(z.Op != OpConst32 && x.Op != OpConst32) {
32095 continue
32096 }
32097 v.reset(OpSub32)
32098 v0 := b.NewValue0(v.Pos, OpSub32, t)
32099 v0.AddArg2(x, z)
32100 v.AddArg2(v0, i)
32101 return true
32102 }
32103 break
32104 }
32105
32106
32107
32108 for {
32109 if v_0.Op != OpSub32 {
32110 break
32111 }
32112 z := v_0.Args[1]
32113 i := v_0.Args[0]
32114 if i.Op != OpConst32 {
32115 break
32116 }
32117 t := i.Type
32118 x := v_1
32119 if !(z.Op != OpConst32 && x.Op != OpConst32) {
32120 break
32121 }
32122 v.reset(OpSub32)
32123 v0 := b.NewValue0(v.Pos, OpAdd32, t)
32124 v0.AddArg2(z, x)
32125 v.AddArg2(i, v0)
32126 return true
32127 }
32128
32129
32130
32131 for {
32132 if v_0.Op != OpAdd32 {
32133 break
32134 }
32135 _ = v_0.Args[1]
32136 v_0_0 := v_0.Args[0]
32137 v_0_1 := v_0.Args[1]
32138 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
32139 z := v_0_0
32140 i := v_0_1
32141 if i.Op != OpConst32 {
32142 continue
32143 }
32144 t := i.Type
32145 x := v_1
32146 if !(z.Op != OpConst32 && x.Op != OpConst32) {
32147 continue
32148 }
32149 v.reset(OpAdd32)
32150 v0 := b.NewValue0(v.Pos, OpSub32, t)
32151 v0.AddArg2(z, x)
32152 v.AddArg2(i, v0)
32153 return true
32154 }
32155 break
32156 }
32157
32158
32159 for {
32160 if v_0.Op != OpConst32 {
32161 break
32162 }
32163 t := v_0.Type
32164 c := auxIntToInt32(v_0.AuxInt)
32165 if v_1.Op != OpSub32 {
32166 break
32167 }
32168 x := v_1.Args[1]
32169 v_1_0 := v_1.Args[0]
32170 if v_1_0.Op != OpConst32 || v_1_0.Type != t {
32171 break
32172 }
32173 d := auxIntToInt32(v_1_0.AuxInt)
32174 v.reset(OpAdd32)
32175 v0 := b.NewValue0(v.Pos, OpConst32, t)
32176 v0.AuxInt = int32ToAuxInt(c - d)
32177 v.AddArg2(v0, x)
32178 return true
32179 }
32180
32181
32182 for {
32183 if v_0.Op != OpConst32 {
32184 break
32185 }
32186 t := v_0.Type
32187 c := auxIntToInt32(v_0.AuxInt)
32188 if v_1.Op != OpAdd32 {
32189 break
32190 }
32191 _ = v_1.Args[1]
32192 v_1_0 := v_1.Args[0]
32193 v_1_1 := v_1.Args[1]
32194 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
32195 if v_1_0.Op != OpConst32 || v_1_0.Type != t {
32196 continue
32197 }
32198 d := auxIntToInt32(v_1_0.AuxInt)
32199 x := v_1_1
32200 v.reset(OpSub32)
32201 v0 := b.NewValue0(v.Pos, OpConst32, t)
32202 v0.AuxInt = int32ToAuxInt(c - d)
32203 v.AddArg2(v0, x)
32204 return true
32205 }
32206 break
32207 }
32208 return false
32209 }
32210 func rewriteValuegeneric_OpSub32F(v *Value) bool {
32211 v_1 := v.Args[1]
32212 v_0 := v.Args[0]
32213
32214
32215
32216 for {
32217 if v_0.Op != OpConst32F {
32218 break
32219 }
32220 c := auxIntToFloat32(v_0.AuxInt)
32221 if v_1.Op != OpConst32F {
32222 break
32223 }
32224 d := auxIntToFloat32(v_1.AuxInt)
32225 if !(c-d == c-d) {
32226 break
32227 }
32228 v.reset(OpConst32F)
32229 v.AuxInt = float32ToAuxInt(c - d)
32230 return true
32231 }
32232 return false
32233 }
32234 func rewriteValuegeneric_OpSub64(v *Value) bool {
32235 v_1 := v.Args[1]
32236 v_0 := v.Args[0]
32237 b := v.Block
32238
32239
32240 for {
32241 if v_0.Op != OpConst64 {
32242 break
32243 }
32244 c := auxIntToInt64(v_0.AuxInt)
32245 if v_1.Op != OpConst64 {
32246 break
32247 }
32248 d := auxIntToInt64(v_1.AuxInt)
32249 v.reset(OpConst64)
32250 v.AuxInt = int64ToAuxInt(c - d)
32251 return true
32252 }
32253
32254
32255
32256 for {
32257 x := v_0
32258 if v_1.Op != OpConst64 {
32259 break
32260 }
32261 t := v_1.Type
32262 c := auxIntToInt64(v_1.AuxInt)
32263 if !(x.Op != OpConst64) {
32264 break
32265 }
32266 v.reset(OpAdd64)
32267 v0 := b.NewValue0(v.Pos, OpConst64, t)
32268 v0.AuxInt = int64ToAuxInt(-c)
32269 v.AddArg2(v0, x)
32270 return true
32271 }
32272
32273
32274 for {
32275 t := v.Type
32276 if v_0.Op != OpMul64 {
32277 break
32278 }
32279 _ = v_0.Args[1]
32280 v_0_0 := v_0.Args[0]
32281 v_0_1 := v_0.Args[1]
32282 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
32283 x := v_0_0
32284 y := v_0_1
32285 if v_1.Op != OpMul64 {
32286 continue
32287 }
32288 _ = v_1.Args[1]
32289 v_1_0 := v_1.Args[0]
32290 v_1_1 := v_1.Args[1]
32291 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
32292 if x != v_1_0 {
32293 continue
32294 }
32295 z := v_1_1
32296 v.reset(OpMul64)
32297 v0 := b.NewValue0(v.Pos, OpSub64, t)
32298 v0.AddArg2(y, z)
32299 v.AddArg2(x, v0)
32300 return true
32301 }
32302 }
32303 break
32304 }
32305
32306
32307 for {
32308 x := v_0
32309 if x != v_1 {
32310 break
32311 }
32312 v.reset(OpConst64)
32313 v.AuxInt = int64ToAuxInt(0)
32314 return true
32315 }
32316
32317
32318 for {
32319 if v_0.Op != OpNeg64 {
32320 break
32321 }
32322 x := v_0.Args[0]
32323 if v_1.Op != OpCom64 || x != v_1.Args[0] {
32324 break
32325 }
32326 v.reset(OpConst64)
32327 v.AuxInt = int64ToAuxInt(1)
32328 return true
32329 }
32330
32331
32332 for {
32333 if v_0.Op != OpCom64 {
32334 break
32335 }
32336 x := v_0.Args[0]
32337 if v_1.Op != OpNeg64 || x != v_1.Args[0] {
32338 break
32339 }
32340 v.reset(OpConst64)
32341 v.AuxInt = int64ToAuxInt(-1)
32342 return true
32343 }
32344
32345
32346 for {
32347 if v_0.Op != OpAdd64 {
32348 break
32349 }
32350 _ = v_0.Args[1]
32351 v_0_0 := v_0.Args[0]
32352 v_0_1 := v_0.Args[1]
32353 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
32354 t := v_0_0
32355 x := v_0_1
32356 if v_1.Op != OpAdd64 {
32357 continue
32358 }
32359 _ = v_1.Args[1]
32360 v_1_0 := v_1.Args[0]
32361 v_1_1 := v_1.Args[1]
32362 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
32363 if t != v_1_0 {
32364 continue
32365 }
32366 y := v_1_1
32367 v.reset(OpSub64)
32368 v.AddArg2(x, y)
32369 return true
32370 }
32371 }
32372 break
32373 }
32374
32375
32376 for {
32377 if v_0.Op != OpAdd64 {
32378 break
32379 }
32380 _ = v_0.Args[1]
32381 v_0_0 := v_0.Args[0]
32382 v_0_1 := v_0.Args[1]
32383 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
32384 x := v_0_0
32385 y := v_0_1
32386 if x != v_1 {
32387 continue
32388 }
32389 v.copyOf(y)
32390 return true
32391 }
32392 break
32393 }
32394
32395
32396 for {
32397 if v_0.Op != OpAdd64 {
32398 break
32399 }
32400 _ = v_0.Args[1]
32401 v_0_0 := v_0.Args[0]
32402 v_0_1 := v_0.Args[1]
32403 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
32404 x := v_0_0
32405 y := v_0_1
32406 if y != v_1 {
32407 continue
32408 }
32409 v.copyOf(x)
32410 return true
32411 }
32412 break
32413 }
32414
32415
32416 for {
32417 if v_0.Op != OpSub64 {
32418 break
32419 }
32420 y := v_0.Args[1]
32421 x := v_0.Args[0]
32422 if x != v_1 {
32423 break
32424 }
32425 v.reset(OpNeg64)
32426 v.AddArg(y)
32427 return true
32428 }
32429
32430
32431 for {
32432 x := v_0
32433 if v_1.Op != OpAdd64 {
32434 break
32435 }
32436 _ = v_1.Args[1]
32437 v_1_0 := v_1.Args[0]
32438 v_1_1 := v_1.Args[1]
32439 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
32440 if x != v_1_0 {
32441 continue
32442 }
32443 y := v_1_1
32444 v.reset(OpNeg64)
32445 v.AddArg(y)
32446 return true
32447 }
32448 break
32449 }
32450
32451
32452
32453 for {
32454 x := v_0
32455 if v_1.Op != OpSub64 {
32456 break
32457 }
32458 z := v_1.Args[1]
32459 i := v_1.Args[0]
32460 if i.Op != OpConst64 {
32461 break
32462 }
32463 t := i.Type
32464 if !(z.Op != OpConst64 && x.Op != OpConst64) {
32465 break
32466 }
32467 v.reset(OpSub64)
32468 v0 := b.NewValue0(v.Pos, OpAdd64, t)
32469 v0.AddArg2(x, z)
32470 v.AddArg2(v0, i)
32471 return true
32472 }
32473
32474
32475
32476 for {
32477 x := v_0
32478 if v_1.Op != OpAdd64 {
32479 break
32480 }
32481 _ = v_1.Args[1]
32482 v_1_0 := v_1.Args[0]
32483 v_1_1 := v_1.Args[1]
32484 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
32485 z := v_1_0
32486 i := v_1_1
32487 if i.Op != OpConst64 {
32488 continue
32489 }
32490 t := i.Type
32491 if !(z.Op != OpConst64 && x.Op != OpConst64) {
32492 continue
32493 }
32494 v.reset(OpSub64)
32495 v0 := b.NewValue0(v.Pos, OpSub64, t)
32496 v0.AddArg2(x, z)
32497 v.AddArg2(v0, i)
32498 return true
32499 }
32500 break
32501 }
32502
32503
32504
32505 for {
32506 if v_0.Op != OpSub64 {
32507 break
32508 }
32509 z := v_0.Args[1]
32510 i := v_0.Args[0]
32511 if i.Op != OpConst64 {
32512 break
32513 }
32514 t := i.Type
32515 x := v_1
32516 if !(z.Op != OpConst64 && x.Op != OpConst64) {
32517 break
32518 }
32519 v.reset(OpSub64)
32520 v0 := b.NewValue0(v.Pos, OpAdd64, t)
32521 v0.AddArg2(z, x)
32522 v.AddArg2(i, v0)
32523 return true
32524 }
32525
32526
32527
32528 for {
32529 if v_0.Op != OpAdd64 {
32530 break
32531 }
32532 _ = v_0.Args[1]
32533 v_0_0 := v_0.Args[0]
32534 v_0_1 := v_0.Args[1]
32535 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
32536 z := v_0_0
32537 i := v_0_1
32538 if i.Op != OpConst64 {
32539 continue
32540 }
32541 t := i.Type
32542 x := v_1
32543 if !(z.Op != OpConst64 && x.Op != OpConst64) {
32544 continue
32545 }
32546 v.reset(OpAdd64)
32547 v0 := b.NewValue0(v.Pos, OpSub64, t)
32548 v0.AddArg2(z, x)
32549 v.AddArg2(i, v0)
32550 return true
32551 }
32552 break
32553 }
32554
32555
32556 for {
32557 if v_0.Op != OpConst64 {
32558 break
32559 }
32560 t := v_0.Type
32561 c := auxIntToInt64(v_0.AuxInt)
32562 if v_1.Op != OpSub64 {
32563 break
32564 }
32565 x := v_1.Args[1]
32566 v_1_0 := v_1.Args[0]
32567 if v_1_0.Op != OpConst64 || v_1_0.Type != t {
32568 break
32569 }
32570 d := auxIntToInt64(v_1_0.AuxInt)
32571 v.reset(OpAdd64)
32572 v0 := b.NewValue0(v.Pos, OpConst64, t)
32573 v0.AuxInt = int64ToAuxInt(c - d)
32574 v.AddArg2(v0, x)
32575 return true
32576 }
32577
32578
32579 for {
32580 if v_0.Op != OpConst64 {
32581 break
32582 }
32583 t := v_0.Type
32584 c := auxIntToInt64(v_0.AuxInt)
32585 if v_1.Op != OpAdd64 {
32586 break
32587 }
32588 _ = v_1.Args[1]
32589 v_1_0 := v_1.Args[0]
32590 v_1_1 := v_1.Args[1]
32591 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
32592 if v_1_0.Op != OpConst64 || v_1_0.Type != t {
32593 continue
32594 }
32595 d := auxIntToInt64(v_1_0.AuxInt)
32596 x := v_1_1
32597 v.reset(OpSub64)
32598 v0 := b.NewValue0(v.Pos, OpConst64, t)
32599 v0.AuxInt = int64ToAuxInt(c - d)
32600 v.AddArg2(v0, x)
32601 return true
32602 }
32603 break
32604 }
32605 return false
32606 }
32607 func rewriteValuegeneric_OpSub64F(v *Value) bool {
32608 v_1 := v.Args[1]
32609 v_0 := v.Args[0]
32610
32611
32612
32613 for {
32614 if v_0.Op != OpConst64F {
32615 break
32616 }
32617 c := auxIntToFloat64(v_0.AuxInt)
32618 if v_1.Op != OpConst64F {
32619 break
32620 }
32621 d := auxIntToFloat64(v_1.AuxInt)
32622 if !(c-d == c-d) {
32623 break
32624 }
32625 v.reset(OpConst64F)
32626 v.AuxInt = float64ToAuxInt(c - d)
32627 return true
32628 }
32629 return false
32630 }
32631 func rewriteValuegeneric_OpSub8(v *Value) bool {
32632 v_1 := v.Args[1]
32633 v_0 := v.Args[0]
32634 b := v.Block
32635
32636
32637 for {
32638 if v_0.Op != OpConst8 {
32639 break
32640 }
32641 c := auxIntToInt8(v_0.AuxInt)
32642 if v_1.Op != OpConst8 {
32643 break
32644 }
32645 d := auxIntToInt8(v_1.AuxInt)
32646 v.reset(OpConst8)
32647 v.AuxInt = int8ToAuxInt(c - d)
32648 return true
32649 }
32650
32651
32652
32653 for {
32654 x := v_0
32655 if v_1.Op != OpConst8 {
32656 break
32657 }
32658 t := v_1.Type
32659 c := auxIntToInt8(v_1.AuxInt)
32660 if !(x.Op != OpConst8) {
32661 break
32662 }
32663 v.reset(OpAdd8)
32664 v0 := b.NewValue0(v.Pos, OpConst8, t)
32665 v0.AuxInt = int8ToAuxInt(-c)
32666 v.AddArg2(v0, x)
32667 return true
32668 }
32669
32670
32671 for {
32672 t := v.Type
32673 if v_0.Op != OpMul8 {
32674 break
32675 }
32676 _ = v_0.Args[1]
32677 v_0_0 := v_0.Args[0]
32678 v_0_1 := v_0.Args[1]
32679 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
32680 x := v_0_0
32681 y := v_0_1
32682 if v_1.Op != OpMul8 {
32683 continue
32684 }
32685 _ = v_1.Args[1]
32686 v_1_0 := v_1.Args[0]
32687 v_1_1 := v_1.Args[1]
32688 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
32689 if x != v_1_0 {
32690 continue
32691 }
32692 z := v_1_1
32693 v.reset(OpMul8)
32694 v0 := b.NewValue0(v.Pos, OpSub8, t)
32695 v0.AddArg2(y, z)
32696 v.AddArg2(x, v0)
32697 return true
32698 }
32699 }
32700 break
32701 }
32702
32703
32704 for {
32705 x := v_0
32706 if x != v_1 {
32707 break
32708 }
32709 v.reset(OpConst8)
32710 v.AuxInt = int8ToAuxInt(0)
32711 return true
32712 }
32713
32714
32715 for {
32716 if v_0.Op != OpNeg8 {
32717 break
32718 }
32719 x := v_0.Args[0]
32720 if v_1.Op != OpCom8 || x != v_1.Args[0] {
32721 break
32722 }
32723 v.reset(OpConst8)
32724 v.AuxInt = int8ToAuxInt(1)
32725 return true
32726 }
32727
32728
32729 for {
32730 if v_0.Op != OpCom8 {
32731 break
32732 }
32733 x := v_0.Args[0]
32734 if v_1.Op != OpNeg8 || x != v_1.Args[0] {
32735 break
32736 }
32737 v.reset(OpConst8)
32738 v.AuxInt = int8ToAuxInt(-1)
32739 return true
32740 }
32741
32742
32743 for {
32744 if v_0.Op != OpAdd8 {
32745 break
32746 }
32747 _ = v_0.Args[1]
32748 v_0_0 := v_0.Args[0]
32749 v_0_1 := v_0.Args[1]
32750 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
32751 t := v_0_0
32752 x := v_0_1
32753 if v_1.Op != OpAdd8 {
32754 continue
32755 }
32756 _ = v_1.Args[1]
32757 v_1_0 := v_1.Args[0]
32758 v_1_1 := v_1.Args[1]
32759 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
32760 if t != v_1_0 {
32761 continue
32762 }
32763 y := v_1_1
32764 v.reset(OpSub8)
32765 v.AddArg2(x, y)
32766 return true
32767 }
32768 }
32769 break
32770 }
32771
32772
32773 for {
32774 if v_0.Op != OpAdd8 {
32775 break
32776 }
32777 _ = v_0.Args[1]
32778 v_0_0 := v_0.Args[0]
32779 v_0_1 := v_0.Args[1]
32780 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
32781 x := v_0_0
32782 y := v_0_1
32783 if x != v_1 {
32784 continue
32785 }
32786 v.copyOf(y)
32787 return true
32788 }
32789 break
32790 }
32791
32792
32793 for {
32794 if v_0.Op != OpAdd8 {
32795 break
32796 }
32797 _ = v_0.Args[1]
32798 v_0_0 := v_0.Args[0]
32799 v_0_1 := v_0.Args[1]
32800 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
32801 x := v_0_0
32802 y := v_0_1
32803 if y != v_1 {
32804 continue
32805 }
32806 v.copyOf(x)
32807 return true
32808 }
32809 break
32810 }
32811
32812
32813 for {
32814 if v_0.Op != OpSub8 {
32815 break
32816 }
32817 y := v_0.Args[1]
32818 x := v_0.Args[0]
32819 if x != v_1 {
32820 break
32821 }
32822 v.reset(OpNeg8)
32823 v.AddArg(y)
32824 return true
32825 }
32826
32827
32828 for {
32829 x := v_0
32830 if v_1.Op != OpAdd8 {
32831 break
32832 }
32833 _ = v_1.Args[1]
32834 v_1_0 := v_1.Args[0]
32835 v_1_1 := v_1.Args[1]
32836 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
32837 if x != v_1_0 {
32838 continue
32839 }
32840 y := v_1_1
32841 v.reset(OpNeg8)
32842 v.AddArg(y)
32843 return true
32844 }
32845 break
32846 }
32847
32848
32849
32850 for {
32851 x := v_0
32852 if v_1.Op != OpSub8 {
32853 break
32854 }
32855 z := v_1.Args[1]
32856 i := v_1.Args[0]
32857 if i.Op != OpConst8 {
32858 break
32859 }
32860 t := i.Type
32861 if !(z.Op != OpConst8 && x.Op != OpConst8) {
32862 break
32863 }
32864 v.reset(OpSub8)
32865 v0 := b.NewValue0(v.Pos, OpAdd8, t)
32866 v0.AddArg2(x, z)
32867 v.AddArg2(v0, i)
32868 return true
32869 }
32870
32871
32872
32873 for {
32874 x := v_0
32875 if v_1.Op != OpAdd8 {
32876 break
32877 }
32878 _ = v_1.Args[1]
32879 v_1_0 := v_1.Args[0]
32880 v_1_1 := v_1.Args[1]
32881 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
32882 z := v_1_0
32883 i := v_1_1
32884 if i.Op != OpConst8 {
32885 continue
32886 }
32887 t := i.Type
32888 if !(z.Op != OpConst8 && x.Op != OpConst8) {
32889 continue
32890 }
32891 v.reset(OpSub8)
32892 v0 := b.NewValue0(v.Pos, OpSub8, t)
32893 v0.AddArg2(x, z)
32894 v.AddArg2(v0, i)
32895 return true
32896 }
32897 break
32898 }
32899
32900
32901
32902 for {
32903 if v_0.Op != OpSub8 {
32904 break
32905 }
32906 z := v_0.Args[1]
32907 i := v_0.Args[0]
32908 if i.Op != OpConst8 {
32909 break
32910 }
32911 t := i.Type
32912 x := v_1
32913 if !(z.Op != OpConst8 && x.Op != OpConst8) {
32914 break
32915 }
32916 v.reset(OpSub8)
32917 v0 := b.NewValue0(v.Pos, OpAdd8, t)
32918 v0.AddArg2(z, x)
32919 v.AddArg2(i, v0)
32920 return true
32921 }
32922
32923
32924
32925 for {
32926 if v_0.Op != OpAdd8 {
32927 break
32928 }
32929 _ = v_0.Args[1]
32930 v_0_0 := v_0.Args[0]
32931 v_0_1 := v_0.Args[1]
32932 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
32933 z := v_0_0
32934 i := v_0_1
32935 if i.Op != OpConst8 {
32936 continue
32937 }
32938 t := i.Type
32939 x := v_1
32940 if !(z.Op != OpConst8 && x.Op != OpConst8) {
32941 continue
32942 }
32943 v.reset(OpAdd8)
32944 v0 := b.NewValue0(v.Pos, OpSub8, t)
32945 v0.AddArg2(z, x)
32946 v.AddArg2(i, v0)
32947 return true
32948 }
32949 break
32950 }
32951
32952
32953 for {
32954 if v_0.Op != OpConst8 {
32955 break
32956 }
32957 t := v_0.Type
32958 c := auxIntToInt8(v_0.AuxInt)
32959 if v_1.Op != OpSub8 {
32960 break
32961 }
32962 x := v_1.Args[1]
32963 v_1_0 := v_1.Args[0]
32964 if v_1_0.Op != OpConst8 || v_1_0.Type != t {
32965 break
32966 }
32967 d := auxIntToInt8(v_1_0.AuxInt)
32968 v.reset(OpAdd8)
32969 v0 := b.NewValue0(v.Pos, OpConst8, t)
32970 v0.AuxInt = int8ToAuxInt(c - d)
32971 v.AddArg2(v0, x)
32972 return true
32973 }
32974
32975
32976 for {
32977 if v_0.Op != OpConst8 {
32978 break
32979 }
32980 t := v_0.Type
32981 c := auxIntToInt8(v_0.AuxInt)
32982 if v_1.Op != OpAdd8 {
32983 break
32984 }
32985 _ = v_1.Args[1]
32986 v_1_0 := v_1.Args[0]
32987 v_1_1 := v_1.Args[1]
32988 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
32989 if v_1_0.Op != OpConst8 || v_1_0.Type != t {
32990 continue
32991 }
32992 d := auxIntToInt8(v_1_0.AuxInt)
32993 x := v_1_1
32994 v.reset(OpSub8)
32995 v0 := b.NewValue0(v.Pos, OpConst8, t)
32996 v0.AuxInt = int8ToAuxInt(c - d)
32997 v.AddArg2(v0, x)
32998 return true
32999 }
33000 break
33001 }
33002 return false
33003 }
33004 func rewriteValuegeneric_OpTrunc(v *Value) bool {
33005 v_0 := v.Args[0]
33006
33007
33008 for {
33009 if v_0.Op != OpConst64F {
33010 break
33011 }
33012 c := auxIntToFloat64(v_0.AuxInt)
33013 v.reset(OpConst64F)
33014 v.AuxInt = float64ToAuxInt(math.Trunc(c))
33015 return true
33016 }
33017 return false
33018 }
33019 func rewriteValuegeneric_OpTrunc16to8(v *Value) bool {
33020 v_0 := v.Args[0]
33021
33022
33023 for {
33024 if v_0.Op != OpConst16 {
33025 break
33026 }
33027 c := auxIntToInt16(v_0.AuxInt)
33028 v.reset(OpConst8)
33029 v.AuxInt = int8ToAuxInt(int8(c))
33030 return true
33031 }
33032
33033
33034 for {
33035 if v_0.Op != OpZeroExt8to16 {
33036 break
33037 }
33038 x := v_0.Args[0]
33039 v.copyOf(x)
33040 return true
33041 }
33042
33043
33044 for {
33045 if v_0.Op != OpSignExt8to16 {
33046 break
33047 }
33048 x := v_0.Args[0]
33049 v.copyOf(x)
33050 return true
33051 }
33052
33053
33054
33055 for {
33056 if v_0.Op != OpAnd16 {
33057 break
33058 }
33059 _ = v_0.Args[1]
33060 v_0_0 := v_0.Args[0]
33061 v_0_1 := v_0.Args[1]
33062 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
33063 if v_0_0.Op != OpConst16 {
33064 continue
33065 }
33066 y := auxIntToInt16(v_0_0.AuxInt)
33067 x := v_0_1
33068 if !(y&0xFF == 0xFF) {
33069 continue
33070 }
33071 v.reset(OpTrunc16to8)
33072 v.AddArg(x)
33073 return true
33074 }
33075 break
33076 }
33077 return false
33078 }
33079 func rewriteValuegeneric_OpTrunc32to16(v *Value) bool {
33080 v_0 := v.Args[0]
33081
33082
33083 for {
33084 if v_0.Op != OpConst32 {
33085 break
33086 }
33087 c := auxIntToInt32(v_0.AuxInt)
33088 v.reset(OpConst16)
33089 v.AuxInt = int16ToAuxInt(int16(c))
33090 return true
33091 }
33092
33093
33094 for {
33095 if v_0.Op != OpZeroExt8to32 {
33096 break
33097 }
33098 x := v_0.Args[0]
33099 v.reset(OpZeroExt8to16)
33100 v.AddArg(x)
33101 return true
33102 }
33103
33104
33105 for {
33106 if v_0.Op != OpZeroExt16to32 {
33107 break
33108 }
33109 x := v_0.Args[0]
33110 v.copyOf(x)
33111 return true
33112 }
33113
33114
33115 for {
33116 if v_0.Op != OpSignExt8to32 {
33117 break
33118 }
33119 x := v_0.Args[0]
33120 v.reset(OpSignExt8to16)
33121 v.AddArg(x)
33122 return true
33123 }
33124
33125
33126 for {
33127 if v_0.Op != OpSignExt16to32 {
33128 break
33129 }
33130 x := v_0.Args[0]
33131 v.copyOf(x)
33132 return true
33133 }
33134
33135
33136
33137 for {
33138 if v_0.Op != OpAnd32 {
33139 break
33140 }
33141 _ = v_0.Args[1]
33142 v_0_0 := v_0.Args[0]
33143 v_0_1 := v_0.Args[1]
33144 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
33145 if v_0_0.Op != OpConst32 {
33146 continue
33147 }
33148 y := auxIntToInt32(v_0_0.AuxInt)
33149 x := v_0_1
33150 if !(y&0xFFFF == 0xFFFF) {
33151 continue
33152 }
33153 v.reset(OpTrunc32to16)
33154 v.AddArg(x)
33155 return true
33156 }
33157 break
33158 }
33159 return false
33160 }
33161 func rewriteValuegeneric_OpTrunc32to8(v *Value) bool {
33162 v_0 := v.Args[0]
33163
33164
33165 for {
33166 if v_0.Op != OpConst32 {
33167 break
33168 }
33169 c := auxIntToInt32(v_0.AuxInt)
33170 v.reset(OpConst8)
33171 v.AuxInt = int8ToAuxInt(int8(c))
33172 return true
33173 }
33174
33175
33176 for {
33177 if v_0.Op != OpZeroExt8to32 {
33178 break
33179 }
33180 x := v_0.Args[0]
33181 v.copyOf(x)
33182 return true
33183 }
33184
33185
33186 for {
33187 if v_0.Op != OpSignExt8to32 {
33188 break
33189 }
33190 x := v_0.Args[0]
33191 v.copyOf(x)
33192 return true
33193 }
33194
33195
33196
33197 for {
33198 if v_0.Op != OpAnd32 {
33199 break
33200 }
33201 _ = v_0.Args[1]
33202 v_0_0 := v_0.Args[0]
33203 v_0_1 := v_0.Args[1]
33204 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
33205 if v_0_0.Op != OpConst32 {
33206 continue
33207 }
33208 y := auxIntToInt32(v_0_0.AuxInt)
33209 x := v_0_1
33210 if !(y&0xFF == 0xFF) {
33211 continue
33212 }
33213 v.reset(OpTrunc32to8)
33214 v.AddArg(x)
33215 return true
33216 }
33217 break
33218 }
33219 return false
33220 }
33221 func rewriteValuegeneric_OpTrunc64to16(v *Value) bool {
33222 v_0 := v.Args[0]
33223
33224
33225 for {
33226 if v_0.Op != OpConst64 {
33227 break
33228 }
33229 c := auxIntToInt64(v_0.AuxInt)
33230 v.reset(OpConst16)
33231 v.AuxInt = int16ToAuxInt(int16(c))
33232 return true
33233 }
33234
33235
33236 for {
33237 if v_0.Op != OpZeroExt8to64 {
33238 break
33239 }
33240 x := v_0.Args[0]
33241 v.reset(OpZeroExt8to16)
33242 v.AddArg(x)
33243 return true
33244 }
33245
33246
33247 for {
33248 if v_0.Op != OpZeroExt16to64 {
33249 break
33250 }
33251 x := v_0.Args[0]
33252 v.copyOf(x)
33253 return true
33254 }
33255
33256
33257 for {
33258 if v_0.Op != OpSignExt8to64 {
33259 break
33260 }
33261 x := v_0.Args[0]
33262 v.reset(OpSignExt8to16)
33263 v.AddArg(x)
33264 return true
33265 }
33266
33267
33268 for {
33269 if v_0.Op != OpSignExt16to64 {
33270 break
33271 }
33272 x := v_0.Args[0]
33273 v.copyOf(x)
33274 return true
33275 }
33276
33277
33278
33279 for {
33280 if v_0.Op != OpAnd64 {
33281 break
33282 }
33283 _ = v_0.Args[1]
33284 v_0_0 := v_0.Args[0]
33285 v_0_1 := v_0.Args[1]
33286 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
33287 if v_0_0.Op != OpConst64 {
33288 continue
33289 }
33290 y := auxIntToInt64(v_0_0.AuxInt)
33291 x := v_0_1
33292 if !(y&0xFFFF == 0xFFFF) {
33293 continue
33294 }
33295 v.reset(OpTrunc64to16)
33296 v.AddArg(x)
33297 return true
33298 }
33299 break
33300 }
33301 return false
33302 }
33303 func rewriteValuegeneric_OpTrunc64to32(v *Value) bool {
33304 v_0 := v.Args[0]
33305
33306
33307 for {
33308 if v_0.Op != OpConst64 {
33309 break
33310 }
33311 c := auxIntToInt64(v_0.AuxInt)
33312 v.reset(OpConst32)
33313 v.AuxInt = int32ToAuxInt(int32(c))
33314 return true
33315 }
33316
33317
33318 for {
33319 if v_0.Op != OpZeroExt8to64 {
33320 break
33321 }
33322 x := v_0.Args[0]
33323 v.reset(OpZeroExt8to32)
33324 v.AddArg(x)
33325 return true
33326 }
33327
33328
33329 for {
33330 if v_0.Op != OpZeroExt16to64 {
33331 break
33332 }
33333 x := v_0.Args[0]
33334 v.reset(OpZeroExt16to32)
33335 v.AddArg(x)
33336 return true
33337 }
33338
33339
33340 for {
33341 if v_0.Op != OpZeroExt32to64 {
33342 break
33343 }
33344 x := v_0.Args[0]
33345 v.copyOf(x)
33346 return true
33347 }
33348
33349
33350 for {
33351 if v_0.Op != OpSignExt8to64 {
33352 break
33353 }
33354 x := v_0.Args[0]
33355 v.reset(OpSignExt8to32)
33356 v.AddArg(x)
33357 return true
33358 }
33359
33360
33361 for {
33362 if v_0.Op != OpSignExt16to64 {
33363 break
33364 }
33365 x := v_0.Args[0]
33366 v.reset(OpSignExt16to32)
33367 v.AddArg(x)
33368 return true
33369 }
33370
33371
33372 for {
33373 if v_0.Op != OpSignExt32to64 {
33374 break
33375 }
33376 x := v_0.Args[0]
33377 v.copyOf(x)
33378 return true
33379 }
33380
33381
33382
33383 for {
33384 if v_0.Op != OpAnd64 {
33385 break
33386 }
33387 _ = v_0.Args[1]
33388 v_0_0 := v_0.Args[0]
33389 v_0_1 := v_0.Args[1]
33390 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
33391 if v_0_0.Op != OpConst64 {
33392 continue
33393 }
33394 y := auxIntToInt64(v_0_0.AuxInt)
33395 x := v_0_1
33396 if !(y&0xFFFFFFFF == 0xFFFFFFFF) {
33397 continue
33398 }
33399 v.reset(OpTrunc64to32)
33400 v.AddArg(x)
33401 return true
33402 }
33403 break
33404 }
33405 return false
33406 }
33407 func rewriteValuegeneric_OpTrunc64to8(v *Value) bool {
33408 v_0 := v.Args[0]
33409
33410
33411 for {
33412 if v_0.Op != OpConst64 {
33413 break
33414 }
33415 c := auxIntToInt64(v_0.AuxInt)
33416 v.reset(OpConst8)
33417 v.AuxInt = int8ToAuxInt(int8(c))
33418 return true
33419 }
33420
33421
33422 for {
33423 if v_0.Op != OpZeroExt8to64 {
33424 break
33425 }
33426 x := v_0.Args[0]
33427 v.copyOf(x)
33428 return true
33429 }
33430
33431
33432 for {
33433 if v_0.Op != OpSignExt8to64 {
33434 break
33435 }
33436 x := v_0.Args[0]
33437 v.copyOf(x)
33438 return true
33439 }
33440
33441
33442
33443 for {
33444 if v_0.Op != OpAnd64 {
33445 break
33446 }
33447 _ = v_0.Args[1]
33448 v_0_0 := v_0.Args[0]
33449 v_0_1 := v_0.Args[1]
33450 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
33451 if v_0_0.Op != OpConst64 {
33452 continue
33453 }
33454 y := auxIntToInt64(v_0_0.AuxInt)
33455 x := v_0_1
33456 if !(y&0xFF == 0xFF) {
33457 continue
33458 }
33459 v.reset(OpTrunc64to8)
33460 v.AddArg(x)
33461 return true
33462 }
33463 break
33464 }
33465 return false
33466 }
33467 func rewriteValuegeneric_OpXor16(v *Value) bool {
33468 v_1 := v.Args[1]
33469 v_0 := v.Args[0]
33470 b := v.Block
33471 config := b.Func.Config
33472
33473
33474 for {
33475 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
33476 if v_0.Op != OpConst16 {
33477 continue
33478 }
33479 c := auxIntToInt16(v_0.AuxInt)
33480 if v_1.Op != OpConst16 {
33481 continue
33482 }
33483 d := auxIntToInt16(v_1.AuxInt)
33484 v.reset(OpConst16)
33485 v.AuxInt = int16ToAuxInt(c ^ d)
33486 return true
33487 }
33488 break
33489 }
33490
33491
33492 for {
33493 x := v_0
33494 if x != v_1 {
33495 break
33496 }
33497 v.reset(OpConst16)
33498 v.AuxInt = int16ToAuxInt(0)
33499 return true
33500 }
33501
33502
33503 for {
33504 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
33505 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 {
33506 continue
33507 }
33508 x := v_1
33509 v.copyOf(x)
33510 return true
33511 }
33512 break
33513 }
33514
33515
33516 for {
33517 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
33518 if v_0.Op != OpCom16 {
33519 continue
33520 }
33521 x := v_0.Args[0]
33522 if x != v_1 {
33523 continue
33524 }
33525 v.reset(OpConst16)
33526 v.AuxInt = int16ToAuxInt(-1)
33527 return true
33528 }
33529 break
33530 }
33531
33532
33533 for {
33534 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
33535 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != -1 {
33536 continue
33537 }
33538 x := v_1
33539 v.reset(OpCom16)
33540 v.AddArg(x)
33541 return true
33542 }
33543 break
33544 }
33545
33546
33547 for {
33548 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
33549 x := v_0
33550 if v_1.Op != OpXor16 {
33551 continue
33552 }
33553 _ = v_1.Args[1]
33554 v_1_0 := v_1.Args[0]
33555 v_1_1 := v_1.Args[1]
33556 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
33557 if x != v_1_0 {
33558 continue
33559 }
33560 y := v_1_1
33561 v.copyOf(y)
33562 return true
33563 }
33564 }
33565 break
33566 }
33567
33568
33569
33570 for {
33571 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
33572 if v_0.Op != OpXor16 {
33573 continue
33574 }
33575 _ = v_0.Args[1]
33576 v_0_0 := v_0.Args[0]
33577 v_0_1 := v_0.Args[1]
33578 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
33579 i := v_0_0
33580 if i.Op != OpConst16 {
33581 continue
33582 }
33583 t := i.Type
33584 z := v_0_1
33585 x := v_1
33586 if !(z.Op != OpConst16 && x.Op != OpConst16) {
33587 continue
33588 }
33589 v.reset(OpXor16)
33590 v0 := b.NewValue0(v.Pos, OpXor16, t)
33591 v0.AddArg2(z, x)
33592 v.AddArg2(i, v0)
33593 return true
33594 }
33595 }
33596 break
33597 }
33598
33599
33600 for {
33601 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
33602 if v_0.Op != OpConst16 {
33603 continue
33604 }
33605 t := v_0.Type
33606 c := auxIntToInt16(v_0.AuxInt)
33607 if v_1.Op != OpXor16 {
33608 continue
33609 }
33610 _ = v_1.Args[1]
33611 v_1_0 := v_1.Args[0]
33612 v_1_1 := v_1.Args[1]
33613 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
33614 if v_1_0.Op != OpConst16 || v_1_0.Type != t {
33615 continue
33616 }
33617 d := auxIntToInt16(v_1_0.AuxInt)
33618 x := v_1_1
33619 v.reset(OpXor16)
33620 v0 := b.NewValue0(v.Pos, OpConst16, t)
33621 v0.AuxInt = int16ToAuxInt(c ^ d)
33622 v.AddArg2(v0, x)
33623 return true
33624 }
33625 }
33626 break
33627 }
33628
33629
33630
33631 for {
33632 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
33633 if v_0.Op != OpLsh16x64 {
33634 continue
33635 }
33636 _ = v_0.Args[1]
33637 x := v_0.Args[0]
33638 z := v_0.Args[1]
33639 if z.Op != OpConst64 {
33640 continue
33641 }
33642 c := auxIntToInt64(z.AuxInt)
33643 if v_1.Op != OpRsh16Ux64 {
33644 continue
33645 }
33646 _ = v_1.Args[1]
33647 if x != v_1.Args[0] {
33648 continue
33649 }
33650 v_1_1 := v_1.Args[1]
33651 if v_1_1.Op != OpConst64 {
33652 continue
33653 }
33654 d := auxIntToInt64(v_1_1.AuxInt)
33655 if !(c < 16 && d == 16-c && canRotate(config, 16)) {
33656 continue
33657 }
33658 v.reset(OpRotateLeft16)
33659 v.AddArg2(x, z)
33660 return true
33661 }
33662 break
33663 }
33664
33665
33666
33667 for {
33668 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
33669 left := v_0
33670 if left.Op != OpLsh16x64 {
33671 continue
33672 }
33673 y := left.Args[1]
33674 x := left.Args[0]
33675 right := v_1
33676 if right.Op != OpRsh16Ux64 {
33677 continue
33678 }
33679 _ = right.Args[1]
33680 if x != right.Args[0] {
33681 continue
33682 }
33683 right_1 := right.Args[1]
33684 if right_1.Op != OpSub64 {
33685 continue
33686 }
33687 _ = right_1.Args[1]
33688 right_1_0 := right_1.Args[0]
33689 if right_1_0.Op != OpConst64 || auxIntToInt64(right_1_0.AuxInt) != 16 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 16)) {
33690 continue
33691 }
33692 v.reset(OpRotateLeft16)
33693 v.AddArg2(x, y)
33694 return true
33695 }
33696 break
33697 }
33698
33699
33700
33701 for {
33702 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
33703 left := v_0
33704 if left.Op != OpLsh16x32 {
33705 continue
33706 }
33707 y := left.Args[1]
33708 x := left.Args[0]
33709 right := v_1
33710 if right.Op != OpRsh16Ux32 {
33711 continue
33712 }
33713 _ = right.Args[1]
33714 if x != right.Args[0] {
33715 continue
33716 }
33717 right_1 := right.Args[1]
33718 if right_1.Op != OpSub32 {
33719 continue
33720 }
33721 _ = right_1.Args[1]
33722 right_1_0 := right_1.Args[0]
33723 if right_1_0.Op != OpConst32 || auxIntToInt32(right_1_0.AuxInt) != 16 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 16)) {
33724 continue
33725 }
33726 v.reset(OpRotateLeft16)
33727 v.AddArg2(x, y)
33728 return true
33729 }
33730 break
33731 }
33732
33733
33734
33735 for {
33736 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
33737 left := v_0
33738 if left.Op != OpLsh16x16 {
33739 continue
33740 }
33741 y := left.Args[1]
33742 x := left.Args[0]
33743 right := v_1
33744 if right.Op != OpRsh16Ux16 {
33745 continue
33746 }
33747 _ = right.Args[1]
33748 if x != right.Args[0] {
33749 continue
33750 }
33751 right_1 := right.Args[1]
33752 if right_1.Op != OpSub16 {
33753 continue
33754 }
33755 _ = right_1.Args[1]
33756 right_1_0 := right_1.Args[0]
33757 if right_1_0.Op != OpConst16 || auxIntToInt16(right_1_0.AuxInt) != 16 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 16)) {
33758 continue
33759 }
33760 v.reset(OpRotateLeft16)
33761 v.AddArg2(x, y)
33762 return true
33763 }
33764 break
33765 }
33766
33767
33768
33769 for {
33770 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
33771 left := v_0
33772 if left.Op != OpLsh16x8 {
33773 continue
33774 }
33775 y := left.Args[1]
33776 x := left.Args[0]
33777 right := v_1
33778 if right.Op != OpRsh16Ux8 {
33779 continue
33780 }
33781 _ = right.Args[1]
33782 if x != right.Args[0] {
33783 continue
33784 }
33785 right_1 := right.Args[1]
33786 if right_1.Op != OpSub8 {
33787 continue
33788 }
33789 _ = right_1.Args[1]
33790 right_1_0 := right_1.Args[0]
33791 if right_1_0.Op != OpConst8 || auxIntToInt8(right_1_0.AuxInt) != 16 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 16)) {
33792 continue
33793 }
33794 v.reset(OpRotateLeft16)
33795 v.AddArg2(x, y)
33796 return true
33797 }
33798 break
33799 }
33800
33801
33802
33803 for {
33804 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
33805 right := v_0
33806 if right.Op != OpRsh16Ux64 {
33807 continue
33808 }
33809 y := right.Args[1]
33810 x := right.Args[0]
33811 left := v_1
33812 if left.Op != OpLsh16x64 {
33813 continue
33814 }
33815 _ = left.Args[1]
33816 if x != left.Args[0] {
33817 continue
33818 }
33819 z := left.Args[1]
33820 if z.Op != OpSub64 {
33821 continue
33822 }
33823 _ = z.Args[1]
33824 z_0 := z.Args[0]
33825 if z_0.Op != OpConst64 || auxIntToInt64(z_0.AuxInt) != 16 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 16)) {
33826 continue
33827 }
33828 v.reset(OpRotateLeft16)
33829 v.AddArg2(x, z)
33830 return true
33831 }
33832 break
33833 }
33834
33835
33836
33837 for {
33838 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
33839 right := v_0
33840 if right.Op != OpRsh16Ux32 {
33841 continue
33842 }
33843 y := right.Args[1]
33844 x := right.Args[0]
33845 left := v_1
33846 if left.Op != OpLsh16x32 {
33847 continue
33848 }
33849 _ = left.Args[1]
33850 if x != left.Args[0] {
33851 continue
33852 }
33853 z := left.Args[1]
33854 if z.Op != OpSub32 {
33855 continue
33856 }
33857 _ = z.Args[1]
33858 z_0 := z.Args[0]
33859 if z_0.Op != OpConst32 || auxIntToInt32(z_0.AuxInt) != 16 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 16)) {
33860 continue
33861 }
33862 v.reset(OpRotateLeft16)
33863 v.AddArg2(x, z)
33864 return true
33865 }
33866 break
33867 }
33868
33869
33870
33871 for {
33872 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
33873 right := v_0
33874 if right.Op != OpRsh16Ux16 {
33875 continue
33876 }
33877 y := right.Args[1]
33878 x := right.Args[0]
33879 left := v_1
33880 if left.Op != OpLsh16x16 {
33881 continue
33882 }
33883 _ = left.Args[1]
33884 if x != left.Args[0] {
33885 continue
33886 }
33887 z := left.Args[1]
33888 if z.Op != OpSub16 {
33889 continue
33890 }
33891 _ = z.Args[1]
33892 z_0 := z.Args[0]
33893 if z_0.Op != OpConst16 || auxIntToInt16(z_0.AuxInt) != 16 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 16)) {
33894 continue
33895 }
33896 v.reset(OpRotateLeft16)
33897 v.AddArg2(x, z)
33898 return true
33899 }
33900 break
33901 }
33902
33903
33904
33905 for {
33906 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
33907 right := v_0
33908 if right.Op != OpRsh16Ux8 {
33909 continue
33910 }
33911 y := right.Args[1]
33912 x := right.Args[0]
33913 left := v_1
33914 if left.Op != OpLsh16x8 {
33915 continue
33916 }
33917 _ = left.Args[1]
33918 if x != left.Args[0] {
33919 continue
33920 }
33921 z := left.Args[1]
33922 if z.Op != OpSub8 {
33923 continue
33924 }
33925 _ = z.Args[1]
33926 z_0 := z.Args[0]
33927 if z_0.Op != OpConst8 || auxIntToInt8(z_0.AuxInt) != 16 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 16)) {
33928 continue
33929 }
33930 v.reset(OpRotateLeft16)
33931 v.AddArg2(x, z)
33932 return true
33933 }
33934 break
33935 }
33936 return false
33937 }
33938 func rewriteValuegeneric_OpXor32(v *Value) bool {
33939 v_1 := v.Args[1]
33940 v_0 := v.Args[0]
33941 b := v.Block
33942 config := b.Func.Config
33943
33944
33945 for {
33946 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
33947 if v_0.Op != OpConst32 {
33948 continue
33949 }
33950 c := auxIntToInt32(v_0.AuxInt)
33951 if v_1.Op != OpConst32 {
33952 continue
33953 }
33954 d := auxIntToInt32(v_1.AuxInt)
33955 v.reset(OpConst32)
33956 v.AuxInt = int32ToAuxInt(c ^ d)
33957 return true
33958 }
33959 break
33960 }
33961
33962
33963 for {
33964 x := v_0
33965 if x != v_1 {
33966 break
33967 }
33968 v.reset(OpConst32)
33969 v.AuxInt = int32ToAuxInt(0)
33970 return true
33971 }
33972
33973
33974 for {
33975 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
33976 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
33977 continue
33978 }
33979 x := v_1
33980 v.copyOf(x)
33981 return true
33982 }
33983 break
33984 }
33985
33986
33987 for {
33988 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
33989 if v_0.Op != OpCom32 {
33990 continue
33991 }
33992 x := v_0.Args[0]
33993 if x != v_1 {
33994 continue
33995 }
33996 v.reset(OpConst32)
33997 v.AuxInt = int32ToAuxInt(-1)
33998 return true
33999 }
34000 break
34001 }
34002
34003
34004 for {
34005 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34006 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != -1 {
34007 continue
34008 }
34009 x := v_1
34010 v.reset(OpCom32)
34011 v.AddArg(x)
34012 return true
34013 }
34014 break
34015 }
34016
34017
34018 for {
34019 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34020 x := v_0
34021 if v_1.Op != OpXor32 {
34022 continue
34023 }
34024 _ = v_1.Args[1]
34025 v_1_0 := v_1.Args[0]
34026 v_1_1 := v_1.Args[1]
34027 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
34028 if x != v_1_0 {
34029 continue
34030 }
34031 y := v_1_1
34032 v.copyOf(y)
34033 return true
34034 }
34035 }
34036 break
34037 }
34038
34039
34040
34041 for {
34042 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34043 if v_0.Op != OpXor32 {
34044 continue
34045 }
34046 _ = v_0.Args[1]
34047 v_0_0 := v_0.Args[0]
34048 v_0_1 := v_0.Args[1]
34049 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
34050 i := v_0_0
34051 if i.Op != OpConst32 {
34052 continue
34053 }
34054 t := i.Type
34055 z := v_0_1
34056 x := v_1
34057 if !(z.Op != OpConst32 && x.Op != OpConst32) {
34058 continue
34059 }
34060 v.reset(OpXor32)
34061 v0 := b.NewValue0(v.Pos, OpXor32, t)
34062 v0.AddArg2(z, x)
34063 v.AddArg2(i, v0)
34064 return true
34065 }
34066 }
34067 break
34068 }
34069
34070
34071 for {
34072 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34073 if v_0.Op != OpConst32 {
34074 continue
34075 }
34076 t := v_0.Type
34077 c := auxIntToInt32(v_0.AuxInt)
34078 if v_1.Op != OpXor32 {
34079 continue
34080 }
34081 _ = v_1.Args[1]
34082 v_1_0 := v_1.Args[0]
34083 v_1_1 := v_1.Args[1]
34084 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
34085 if v_1_0.Op != OpConst32 || v_1_0.Type != t {
34086 continue
34087 }
34088 d := auxIntToInt32(v_1_0.AuxInt)
34089 x := v_1_1
34090 v.reset(OpXor32)
34091 v0 := b.NewValue0(v.Pos, OpConst32, t)
34092 v0.AuxInt = int32ToAuxInt(c ^ d)
34093 v.AddArg2(v0, x)
34094 return true
34095 }
34096 }
34097 break
34098 }
34099
34100
34101
34102 for {
34103 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34104 if v_0.Op != OpLsh32x64 {
34105 continue
34106 }
34107 _ = v_0.Args[1]
34108 x := v_0.Args[0]
34109 z := v_0.Args[1]
34110 if z.Op != OpConst64 {
34111 continue
34112 }
34113 c := auxIntToInt64(z.AuxInt)
34114 if v_1.Op != OpRsh32Ux64 {
34115 continue
34116 }
34117 _ = v_1.Args[1]
34118 if x != v_1.Args[0] {
34119 continue
34120 }
34121 v_1_1 := v_1.Args[1]
34122 if v_1_1.Op != OpConst64 {
34123 continue
34124 }
34125 d := auxIntToInt64(v_1_1.AuxInt)
34126 if !(c < 32 && d == 32-c && canRotate(config, 32)) {
34127 continue
34128 }
34129 v.reset(OpRotateLeft32)
34130 v.AddArg2(x, z)
34131 return true
34132 }
34133 break
34134 }
34135
34136
34137
34138 for {
34139 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34140 left := v_0
34141 if left.Op != OpLsh32x64 {
34142 continue
34143 }
34144 y := left.Args[1]
34145 x := left.Args[0]
34146 right := v_1
34147 if right.Op != OpRsh32Ux64 {
34148 continue
34149 }
34150 _ = right.Args[1]
34151 if x != right.Args[0] {
34152 continue
34153 }
34154 right_1 := right.Args[1]
34155 if right_1.Op != OpSub64 {
34156 continue
34157 }
34158 _ = right_1.Args[1]
34159 right_1_0 := right_1.Args[0]
34160 if right_1_0.Op != OpConst64 || auxIntToInt64(right_1_0.AuxInt) != 32 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 32)) {
34161 continue
34162 }
34163 v.reset(OpRotateLeft32)
34164 v.AddArg2(x, y)
34165 return true
34166 }
34167 break
34168 }
34169
34170
34171
34172 for {
34173 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34174 left := v_0
34175 if left.Op != OpLsh32x32 {
34176 continue
34177 }
34178 y := left.Args[1]
34179 x := left.Args[0]
34180 right := v_1
34181 if right.Op != OpRsh32Ux32 {
34182 continue
34183 }
34184 _ = right.Args[1]
34185 if x != right.Args[0] {
34186 continue
34187 }
34188 right_1 := right.Args[1]
34189 if right_1.Op != OpSub32 {
34190 continue
34191 }
34192 _ = right_1.Args[1]
34193 right_1_0 := right_1.Args[0]
34194 if right_1_0.Op != OpConst32 || auxIntToInt32(right_1_0.AuxInt) != 32 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 32)) {
34195 continue
34196 }
34197 v.reset(OpRotateLeft32)
34198 v.AddArg2(x, y)
34199 return true
34200 }
34201 break
34202 }
34203
34204
34205
34206 for {
34207 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34208 left := v_0
34209 if left.Op != OpLsh32x16 {
34210 continue
34211 }
34212 y := left.Args[1]
34213 x := left.Args[0]
34214 right := v_1
34215 if right.Op != OpRsh32Ux16 {
34216 continue
34217 }
34218 _ = right.Args[1]
34219 if x != right.Args[0] {
34220 continue
34221 }
34222 right_1 := right.Args[1]
34223 if right_1.Op != OpSub16 {
34224 continue
34225 }
34226 _ = right_1.Args[1]
34227 right_1_0 := right_1.Args[0]
34228 if right_1_0.Op != OpConst16 || auxIntToInt16(right_1_0.AuxInt) != 32 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 32)) {
34229 continue
34230 }
34231 v.reset(OpRotateLeft32)
34232 v.AddArg2(x, y)
34233 return true
34234 }
34235 break
34236 }
34237
34238
34239
34240 for {
34241 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34242 left := v_0
34243 if left.Op != OpLsh32x8 {
34244 continue
34245 }
34246 y := left.Args[1]
34247 x := left.Args[0]
34248 right := v_1
34249 if right.Op != OpRsh32Ux8 {
34250 continue
34251 }
34252 _ = right.Args[1]
34253 if x != right.Args[0] {
34254 continue
34255 }
34256 right_1 := right.Args[1]
34257 if right_1.Op != OpSub8 {
34258 continue
34259 }
34260 _ = right_1.Args[1]
34261 right_1_0 := right_1.Args[0]
34262 if right_1_0.Op != OpConst8 || auxIntToInt8(right_1_0.AuxInt) != 32 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 32)) {
34263 continue
34264 }
34265 v.reset(OpRotateLeft32)
34266 v.AddArg2(x, y)
34267 return true
34268 }
34269 break
34270 }
34271
34272
34273
34274 for {
34275 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34276 right := v_0
34277 if right.Op != OpRsh32Ux64 {
34278 continue
34279 }
34280 y := right.Args[1]
34281 x := right.Args[0]
34282 left := v_1
34283 if left.Op != OpLsh32x64 {
34284 continue
34285 }
34286 _ = left.Args[1]
34287 if x != left.Args[0] {
34288 continue
34289 }
34290 z := left.Args[1]
34291 if z.Op != OpSub64 {
34292 continue
34293 }
34294 _ = z.Args[1]
34295 z_0 := z.Args[0]
34296 if z_0.Op != OpConst64 || auxIntToInt64(z_0.AuxInt) != 32 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 32)) {
34297 continue
34298 }
34299 v.reset(OpRotateLeft32)
34300 v.AddArg2(x, z)
34301 return true
34302 }
34303 break
34304 }
34305
34306
34307
34308 for {
34309 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34310 right := v_0
34311 if right.Op != OpRsh32Ux32 {
34312 continue
34313 }
34314 y := right.Args[1]
34315 x := right.Args[0]
34316 left := v_1
34317 if left.Op != OpLsh32x32 {
34318 continue
34319 }
34320 _ = left.Args[1]
34321 if x != left.Args[0] {
34322 continue
34323 }
34324 z := left.Args[1]
34325 if z.Op != OpSub32 {
34326 continue
34327 }
34328 _ = z.Args[1]
34329 z_0 := z.Args[0]
34330 if z_0.Op != OpConst32 || auxIntToInt32(z_0.AuxInt) != 32 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 32)) {
34331 continue
34332 }
34333 v.reset(OpRotateLeft32)
34334 v.AddArg2(x, z)
34335 return true
34336 }
34337 break
34338 }
34339
34340
34341
34342 for {
34343 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34344 right := v_0
34345 if right.Op != OpRsh32Ux16 {
34346 continue
34347 }
34348 y := right.Args[1]
34349 x := right.Args[0]
34350 left := v_1
34351 if left.Op != OpLsh32x16 {
34352 continue
34353 }
34354 _ = left.Args[1]
34355 if x != left.Args[0] {
34356 continue
34357 }
34358 z := left.Args[1]
34359 if z.Op != OpSub16 {
34360 continue
34361 }
34362 _ = z.Args[1]
34363 z_0 := z.Args[0]
34364 if z_0.Op != OpConst16 || auxIntToInt16(z_0.AuxInt) != 32 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 32)) {
34365 continue
34366 }
34367 v.reset(OpRotateLeft32)
34368 v.AddArg2(x, z)
34369 return true
34370 }
34371 break
34372 }
34373
34374
34375
34376 for {
34377 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34378 right := v_0
34379 if right.Op != OpRsh32Ux8 {
34380 continue
34381 }
34382 y := right.Args[1]
34383 x := right.Args[0]
34384 left := v_1
34385 if left.Op != OpLsh32x8 {
34386 continue
34387 }
34388 _ = left.Args[1]
34389 if x != left.Args[0] {
34390 continue
34391 }
34392 z := left.Args[1]
34393 if z.Op != OpSub8 {
34394 continue
34395 }
34396 _ = z.Args[1]
34397 z_0 := z.Args[0]
34398 if z_0.Op != OpConst8 || auxIntToInt8(z_0.AuxInt) != 32 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 32)) {
34399 continue
34400 }
34401 v.reset(OpRotateLeft32)
34402 v.AddArg2(x, z)
34403 return true
34404 }
34405 break
34406 }
34407 return false
34408 }
34409 func rewriteValuegeneric_OpXor64(v *Value) bool {
34410 v_1 := v.Args[1]
34411 v_0 := v.Args[0]
34412 b := v.Block
34413 config := b.Func.Config
34414
34415
34416 for {
34417 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34418 if v_0.Op != OpConst64 {
34419 continue
34420 }
34421 c := auxIntToInt64(v_0.AuxInt)
34422 if v_1.Op != OpConst64 {
34423 continue
34424 }
34425 d := auxIntToInt64(v_1.AuxInt)
34426 v.reset(OpConst64)
34427 v.AuxInt = int64ToAuxInt(c ^ d)
34428 return true
34429 }
34430 break
34431 }
34432
34433
34434 for {
34435 x := v_0
34436 if x != v_1 {
34437 break
34438 }
34439 v.reset(OpConst64)
34440 v.AuxInt = int64ToAuxInt(0)
34441 return true
34442 }
34443
34444
34445 for {
34446 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34447 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
34448 continue
34449 }
34450 x := v_1
34451 v.copyOf(x)
34452 return true
34453 }
34454 break
34455 }
34456
34457
34458 for {
34459 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34460 if v_0.Op != OpCom64 {
34461 continue
34462 }
34463 x := v_0.Args[0]
34464 if x != v_1 {
34465 continue
34466 }
34467 v.reset(OpConst64)
34468 v.AuxInt = int64ToAuxInt(-1)
34469 return true
34470 }
34471 break
34472 }
34473
34474
34475 for {
34476 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34477 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != -1 {
34478 continue
34479 }
34480 x := v_1
34481 v.reset(OpCom64)
34482 v.AddArg(x)
34483 return true
34484 }
34485 break
34486 }
34487
34488
34489 for {
34490 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34491 x := v_0
34492 if v_1.Op != OpXor64 {
34493 continue
34494 }
34495 _ = v_1.Args[1]
34496 v_1_0 := v_1.Args[0]
34497 v_1_1 := v_1.Args[1]
34498 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
34499 if x != v_1_0 {
34500 continue
34501 }
34502 y := v_1_1
34503 v.copyOf(y)
34504 return true
34505 }
34506 }
34507 break
34508 }
34509
34510
34511
34512 for {
34513 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34514 if v_0.Op != OpXor64 {
34515 continue
34516 }
34517 _ = v_0.Args[1]
34518 v_0_0 := v_0.Args[0]
34519 v_0_1 := v_0.Args[1]
34520 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
34521 i := v_0_0
34522 if i.Op != OpConst64 {
34523 continue
34524 }
34525 t := i.Type
34526 z := v_0_1
34527 x := v_1
34528 if !(z.Op != OpConst64 && x.Op != OpConst64) {
34529 continue
34530 }
34531 v.reset(OpXor64)
34532 v0 := b.NewValue0(v.Pos, OpXor64, t)
34533 v0.AddArg2(z, x)
34534 v.AddArg2(i, v0)
34535 return true
34536 }
34537 }
34538 break
34539 }
34540
34541
34542 for {
34543 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34544 if v_0.Op != OpConst64 {
34545 continue
34546 }
34547 t := v_0.Type
34548 c := auxIntToInt64(v_0.AuxInt)
34549 if v_1.Op != OpXor64 {
34550 continue
34551 }
34552 _ = v_1.Args[1]
34553 v_1_0 := v_1.Args[0]
34554 v_1_1 := v_1.Args[1]
34555 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
34556 if v_1_0.Op != OpConst64 || v_1_0.Type != t {
34557 continue
34558 }
34559 d := auxIntToInt64(v_1_0.AuxInt)
34560 x := v_1_1
34561 v.reset(OpXor64)
34562 v0 := b.NewValue0(v.Pos, OpConst64, t)
34563 v0.AuxInt = int64ToAuxInt(c ^ d)
34564 v.AddArg2(v0, x)
34565 return true
34566 }
34567 }
34568 break
34569 }
34570
34571
34572
34573 for {
34574 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34575 if v_0.Op != OpLsh64x64 {
34576 continue
34577 }
34578 _ = v_0.Args[1]
34579 x := v_0.Args[0]
34580 z := v_0.Args[1]
34581 if z.Op != OpConst64 {
34582 continue
34583 }
34584 c := auxIntToInt64(z.AuxInt)
34585 if v_1.Op != OpRsh64Ux64 {
34586 continue
34587 }
34588 _ = v_1.Args[1]
34589 if x != v_1.Args[0] {
34590 continue
34591 }
34592 v_1_1 := v_1.Args[1]
34593 if v_1_1.Op != OpConst64 {
34594 continue
34595 }
34596 d := auxIntToInt64(v_1_1.AuxInt)
34597 if !(c < 64 && d == 64-c && canRotate(config, 64)) {
34598 continue
34599 }
34600 v.reset(OpRotateLeft64)
34601 v.AddArg2(x, z)
34602 return true
34603 }
34604 break
34605 }
34606
34607
34608
34609 for {
34610 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34611 left := v_0
34612 if left.Op != OpLsh64x64 {
34613 continue
34614 }
34615 y := left.Args[1]
34616 x := left.Args[0]
34617 right := v_1
34618 if right.Op != OpRsh64Ux64 {
34619 continue
34620 }
34621 _ = right.Args[1]
34622 if x != right.Args[0] {
34623 continue
34624 }
34625 right_1 := right.Args[1]
34626 if right_1.Op != OpSub64 {
34627 continue
34628 }
34629 _ = right_1.Args[1]
34630 right_1_0 := right_1.Args[0]
34631 if right_1_0.Op != OpConst64 || auxIntToInt64(right_1_0.AuxInt) != 64 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 64)) {
34632 continue
34633 }
34634 v.reset(OpRotateLeft64)
34635 v.AddArg2(x, y)
34636 return true
34637 }
34638 break
34639 }
34640
34641
34642
34643 for {
34644 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34645 left := v_0
34646 if left.Op != OpLsh64x32 {
34647 continue
34648 }
34649 y := left.Args[1]
34650 x := left.Args[0]
34651 right := v_1
34652 if right.Op != OpRsh64Ux32 {
34653 continue
34654 }
34655 _ = right.Args[1]
34656 if x != right.Args[0] {
34657 continue
34658 }
34659 right_1 := right.Args[1]
34660 if right_1.Op != OpSub32 {
34661 continue
34662 }
34663 _ = right_1.Args[1]
34664 right_1_0 := right_1.Args[0]
34665 if right_1_0.Op != OpConst32 || auxIntToInt32(right_1_0.AuxInt) != 64 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 64)) {
34666 continue
34667 }
34668 v.reset(OpRotateLeft64)
34669 v.AddArg2(x, y)
34670 return true
34671 }
34672 break
34673 }
34674
34675
34676
34677 for {
34678 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34679 left := v_0
34680 if left.Op != OpLsh64x16 {
34681 continue
34682 }
34683 y := left.Args[1]
34684 x := left.Args[0]
34685 right := v_1
34686 if right.Op != OpRsh64Ux16 {
34687 continue
34688 }
34689 _ = right.Args[1]
34690 if x != right.Args[0] {
34691 continue
34692 }
34693 right_1 := right.Args[1]
34694 if right_1.Op != OpSub16 {
34695 continue
34696 }
34697 _ = right_1.Args[1]
34698 right_1_0 := right_1.Args[0]
34699 if right_1_0.Op != OpConst16 || auxIntToInt16(right_1_0.AuxInt) != 64 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 64)) {
34700 continue
34701 }
34702 v.reset(OpRotateLeft64)
34703 v.AddArg2(x, y)
34704 return true
34705 }
34706 break
34707 }
34708
34709
34710
34711 for {
34712 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34713 left := v_0
34714 if left.Op != OpLsh64x8 {
34715 continue
34716 }
34717 y := left.Args[1]
34718 x := left.Args[0]
34719 right := v_1
34720 if right.Op != OpRsh64Ux8 {
34721 continue
34722 }
34723 _ = right.Args[1]
34724 if x != right.Args[0] {
34725 continue
34726 }
34727 right_1 := right.Args[1]
34728 if right_1.Op != OpSub8 {
34729 continue
34730 }
34731 _ = right_1.Args[1]
34732 right_1_0 := right_1.Args[0]
34733 if right_1_0.Op != OpConst8 || auxIntToInt8(right_1_0.AuxInt) != 64 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 64)) {
34734 continue
34735 }
34736 v.reset(OpRotateLeft64)
34737 v.AddArg2(x, y)
34738 return true
34739 }
34740 break
34741 }
34742
34743
34744
34745 for {
34746 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34747 right := v_0
34748 if right.Op != OpRsh64Ux64 {
34749 continue
34750 }
34751 y := right.Args[1]
34752 x := right.Args[0]
34753 left := v_1
34754 if left.Op != OpLsh64x64 {
34755 continue
34756 }
34757 _ = left.Args[1]
34758 if x != left.Args[0] {
34759 continue
34760 }
34761 z := left.Args[1]
34762 if z.Op != OpSub64 {
34763 continue
34764 }
34765 _ = z.Args[1]
34766 z_0 := z.Args[0]
34767 if z_0.Op != OpConst64 || auxIntToInt64(z_0.AuxInt) != 64 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 64)) {
34768 continue
34769 }
34770 v.reset(OpRotateLeft64)
34771 v.AddArg2(x, z)
34772 return true
34773 }
34774 break
34775 }
34776
34777
34778
34779 for {
34780 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34781 right := v_0
34782 if right.Op != OpRsh64Ux32 {
34783 continue
34784 }
34785 y := right.Args[1]
34786 x := right.Args[0]
34787 left := v_1
34788 if left.Op != OpLsh64x32 {
34789 continue
34790 }
34791 _ = left.Args[1]
34792 if x != left.Args[0] {
34793 continue
34794 }
34795 z := left.Args[1]
34796 if z.Op != OpSub32 {
34797 continue
34798 }
34799 _ = z.Args[1]
34800 z_0 := z.Args[0]
34801 if z_0.Op != OpConst32 || auxIntToInt32(z_0.AuxInt) != 64 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 64)) {
34802 continue
34803 }
34804 v.reset(OpRotateLeft64)
34805 v.AddArg2(x, z)
34806 return true
34807 }
34808 break
34809 }
34810
34811
34812
34813 for {
34814 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34815 right := v_0
34816 if right.Op != OpRsh64Ux16 {
34817 continue
34818 }
34819 y := right.Args[1]
34820 x := right.Args[0]
34821 left := v_1
34822 if left.Op != OpLsh64x16 {
34823 continue
34824 }
34825 _ = left.Args[1]
34826 if x != left.Args[0] {
34827 continue
34828 }
34829 z := left.Args[1]
34830 if z.Op != OpSub16 {
34831 continue
34832 }
34833 _ = z.Args[1]
34834 z_0 := z.Args[0]
34835 if z_0.Op != OpConst16 || auxIntToInt16(z_0.AuxInt) != 64 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 64)) {
34836 continue
34837 }
34838 v.reset(OpRotateLeft64)
34839 v.AddArg2(x, z)
34840 return true
34841 }
34842 break
34843 }
34844
34845
34846
34847 for {
34848 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34849 right := v_0
34850 if right.Op != OpRsh64Ux8 {
34851 continue
34852 }
34853 y := right.Args[1]
34854 x := right.Args[0]
34855 left := v_1
34856 if left.Op != OpLsh64x8 {
34857 continue
34858 }
34859 _ = left.Args[1]
34860 if x != left.Args[0] {
34861 continue
34862 }
34863 z := left.Args[1]
34864 if z.Op != OpSub8 {
34865 continue
34866 }
34867 _ = z.Args[1]
34868 z_0 := z.Args[0]
34869 if z_0.Op != OpConst8 || auxIntToInt8(z_0.AuxInt) != 64 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 64)) {
34870 continue
34871 }
34872 v.reset(OpRotateLeft64)
34873 v.AddArg2(x, z)
34874 return true
34875 }
34876 break
34877 }
34878 return false
34879 }
34880 func rewriteValuegeneric_OpXor8(v *Value) bool {
34881 v_1 := v.Args[1]
34882 v_0 := v.Args[0]
34883 b := v.Block
34884 config := b.Func.Config
34885
34886
34887 for {
34888 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34889 if v_0.Op != OpConst8 {
34890 continue
34891 }
34892 c := auxIntToInt8(v_0.AuxInt)
34893 if v_1.Op != OpConst8 {
34894 continue
34895 }
34896 d := auxIntToInt8(v_1.AuxInt)
34897 v.reset(OpConst8)
34898 v.AuxInt = int8ToAuxInt(c ^ d)
34899 return true
34900 }
34901 break
34902 }
34903
34904
34905 for {
34906 x := v_0
34907 if x != v_1 {
34908 break
34909 }
34910 v.reset(OpConst8)
34911 v.AuxInt = int8ToAuxInt(0)
34912 return true
34913 }
34914
34915
34916 for {
34917 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34918 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 {
34919 continue
34920 }
34921 x := v_1
34922 v.copyOf(x)
34923 return true
34924 }
34925 break
34926 }
34927
34928
34929 for {
34930 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34931 if v_0.Op != OpCom8 {
34932 continue
34933 }
34934 x := v_0.Args[0]
34935 if x != v_1 {
34936 continue
34937 }
34938 v.reset(OpConst8)
34939 v.AuxInt = int8ToAuxInt(-1)
34940 return true
34941 }
34942 break
34943 }
34944
34945
34946 for {
34947 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34948 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != -1 {
34949 continue
34950 }
34951 x := v_1
34952 v.reset(OpCom8)
34953 v.AddArg(x)
34954 return true
34955 }
34956 break
34957 }
34958
34959
34960 for {
34961 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34962 x := v_0
34963 if v_1.Op != OpXor8 {
34964 continue
34965 }
34966 _ = v_1.Args[1]
34967 v_1_0 := v_1.Args[0]
34968 v_1_1 := v_1.Args[1]
34969 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
34970 if x != v_1_0 {
34971 continue
34972 }
34973 y := v_1_1
34974 v.copyOf(y)
34975 return true
34976 }
34977 }
34978 break
34979 }
34980
34981
34982
34983 for {
34984 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34985 if v_0.Op != OpXor8 {
34986 continue
34987 }
34988 _ = v_0.Args[1]
34989 v_0_0 := v_0.Args[0]
34990 v_0_1 := v_0.Args[1]
34991 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
34992 i := v_0_0
34993 if i.Op != OpConst8 {
34994 continue
34995 }
34996 t := i.Type
34997 z := v_0_1
34998 x := v_1
34999 if !(z.Op != OpConst8 && x.Op != OpConst8) {
35000 continue
35001 }
35002 v.reset(OpXor8)
35003 v0 := b.NewValue0(v.Pos, OpXor8, t)
35004 v0.AddArg2(z, x)
35005 v.AddArg2(i, v0)
35006 return true
35007 }
35008 }
35009 break
35010 }
35011
35012
35013 for {
35014 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
35015 if v_0.Op != OpConst8 {
35016 continue
35017 }
35018 t := v_0.Type
35019 c := auxIntToInt8(v_0.AuxInt)
35020 if v_1.Op != OpXor8 {
35021 continue
35022 }
35023 _ = v_1.Args[1]
35024 v_1_0 := v_1.Args[0]
35025 v_1_1 := v_1.Args[1]
35026 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
35027 if v_1_0.Op != OpConst8 || v_1_0.Type != t {
35028 continue
35029 }
35030 d := auxIntToInt8(v_1_0.AuxInt)
35031 x := v_1_1
35032 v.reset(OpXor8)
35033 v0 := b.NewValue0(v.Pos, OpConst8, t)
35034 v0.AuxInt = int8ToAuxInt(c ^ d)
35035 v.AddArg2(v0, x)
35036 return true
35037 }
35038 }
35039 break
35040 }
35041
35042
35043
35044 for {
35045 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
35046 if v_0.Op != OpLsh8x64 {
35047 continue
35048 }
35049 _ = v_0.Args[1]
35050 x := v_0.Args[0]
35051 z := v_0.Args[1]
35052 if z.Op != OpConst64 {
35053 continue
35054 }
35055 c := auxIntToInt64(z.AuxInt)
35056 if v_1.Op != OpRsh8Ux64 {
35057 continue
35058 }
35059 _ = v_1.Args[1]
35060 if x != v_1.Args[0] {
35061 continue
35062 }
35063 v_1_1 := v_1.Args[1]
35064 if v_1_1.Op != OpConst64 {
35065 continue
35066 }
35067 d := auxIntToInt64(v_1_1.AuxInt)
35068 if !(c < 8 && d == 8-c && canRotate(config, 8)) {
35069 continue
35070 }
35071 v.reset(OpRotateLeft8)
35072 v.AddArg2(x, z)
35073 return true
35074 }
35075 break
35076 }
35077
35078
35079
35080 for {
35081 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
35082 left := v_0
35083 if left.Op != OpLsh8x64 {
35084 continue
35085 }
35086 y := left.Args[1]
35087 x := left.Args[0]
35088 right := v_1
35089 if right.Op != OpRsh8Ux64 {
35090 continue
35091 }
35092 _ = right.Args[1]
35093 if x != right.Args[0] {
35094 continue
35095 }
35096 right_1 := right.Args[1]
35097 if right_1.Op != OpSub64 {
35098 continue
35099 }
35100 _ = right_1.Args[1]
35101 right_1_0 := right_1.Args[0]
35102 if right_1_0.Op != OpConst64 || auxIntToInt64(right_1_0.AuxInt) != 8 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 8)) {
35103 continue
35104 }
35105 v.reset(OpRotateLeft8)
35106 v.AddArg2(x, y)
35107 return true
35108 }
35109 break
35110 }
35111
35112
35113
35114 for {
35115 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
35116 left := v_0
35117 if left.Op != OpLsh8x32 {
35118 continue
35119 }
35120 y := left.Args[1]
35121 x := left.Args[0]
35122 right := v_1
35123 if right.Op != OpRsh8Ux32 {
35124 continue
35125 }
35126 _ = right.Args[1]
35127 if x != right.Args[0] {
35128 continue
35129 }
35130 right_1 := right.Args[1]
35131 if right_1.Op != OpSub32 {
35132 continue
35133 }
35134 _ = right_1.Args[1]
35135 right_1_0 := right_1.Args[0]
35136 if right_1_0.Op != OpConst32 || auxIntToInt32(right_1_0.AuxInt) != 8 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 8)) {
35137 continue
35138 }
35139 v.reset(OpRotateLeft8)
35140 v.AddArg2(x, y)
35141 return true
35142 }
35143 break
35144 }
35145
35146
35147
35148 for {
35149 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
35150 left := v_0
35151 if left.Op != OpLsh8x16 {
35152 continue
35153 }
35154 y := left.Args[1]
35155 x := left.Args[0]
35156 right := v_1
35157 if right.Op != OpRsh8Ux16 {
35158 continue
35159 }
35160 _ = right.Args[1]
35161 if x != right.Args[0] {
35162 continue
35163 }
35164 right_1 := right.Args[1]
35165 if right_1.Op != OpSub16 {
35166 continue
35167 }
35168 _ = right_1.Args[1]
35169 right_1_0 := right_1.Args[0]
35170 if right_1_0.Op != OpConst16 || auxIntToInt16(right_1_0.AuxInt) != 8 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 8)) {
35171 continue
35172 }
35173 v.reset(OpRotateLeft8)
35174 v.AddArg2(x, y)
35175 return true
35176 }
35177 break
35178 }
35179
35180
35181
35182 for {
35183 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
35184 left := v_0
35185 if left.Op != OpLsh8x8 {
35186 continue
35187 }
35188 y := left.Args[1]
35189 x := left.Args[0]
35190 right := v_1
35191 if right.Op != OpRsh8Ux8 {
35192 continue
35193 }
35194 _ = right.Args[1]
35195 if x != right.Args[0] {
35196 continue
35197 }
35198 right_1 := right.Args[1]
35199 if right_1.Op != OpSub8 {
35200 continue
35201 }
35202 _ = right_1.Args[1]
35203 right_1_0 := right_1.Args[0]
35204 if right_1_0.Op != OpConst8 || auxIntToInt8(right_1_0.AuxInt) != 8 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 8)) {
35205 continue
35206 }
35207 v.reset(OpRotateLeft8)
35208 v.AddArg2(x, y)
35209 return true
35210 }
35211 break
35212 }
35213
35214
35215
35216 for {
35217 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
35218 right := v_0
35219 if right.Op != OpRsh8Ux64 {
35220 continue
35221 }
35222 y := right.Args[1]
35223 x := right.Args[0]
35224 left := v_1
35225 if left.Op != OpLsh8x64 {
35226 continue
35227 }
35228 _ = left.Args[1]
35229 if x != left.Args[0] {
35230 continue
35231 }
35232 z := left.Args[1]
35233 if z.Op != OpSub64 {
35234 continue
35235 }
35236 _ = z.Args[1]
35237 z_0 := z.Args[0]
35238 if z_0.Op != OpConst64 || auxIntToInt64(z_0.AuxInt) != 8 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 8)) {
35239 continue
35240 }
35241 v.reset(OpRotateLeft8)
35242 v.AddArg2(x, z)
35243 return true
35244 }
35245 break
35246 }
35247
35248
35249
35250 for {
35251 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
35252 right := v_0
35253 if right.Op != OpRsh8Ux32 {
35254 continue
35255 }
35256 y := right.Args[1]
35257 x := right.Args[0]
35258 left := v_1
35259 if left.Op != OpLsh8x32 {
35260 continue
35261 }
35262 _ = left.Args[1]
35263 if x != left.Args[0] {
35264 continue
35265 }
35266 z := left.Args[1]
35267 if z.Op != OpSub32 {
35268 continue
35269 }
35270 _ = z.Args[1]
35271 z_0 := z.Args[0]
35272 if z_0.Op != OpConst32 || auxIntToInt32(z_0.AuxInt) != 8 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 8)) {
35273 continue
35274 }
35275 v.reset(OpRotateLeft8)
35276 v.AddArg2(x, z)
35277 return true
35278 }
35279 break
35280 }
35281
35282
35283
35284 for {
35285 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
35286 right := v_0
35287 if right.Op != OpRsh8Ux16 {
35288 continue
35289 }
35290 y := right.Args[1]
35291 x := right.Args[0]
35292 left := v_1
35293 if left.Op != OpLsh8x16 {
35294 continue
35295 }
35296 _ = left.Args[1]
35297 if x != left.Args[0] {
35298 continue
35299 }
35300 z := left.Args[1]
35301 if z.Op != OpSub16 {
35302 continue
35303 }
35304 _ = z.Args[1]
35305 z_0 := z.Args[0]
35306 if z_0.Op != OpConst16 || auxIntToInt16(z_0.AuxInt) != 8 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 8)) {
35307 continue
35308 }
35309 v.reset(OpRotateLeft8)
35310 v.AddArg2(x, z)
35311 return true
35312 }
35313 break
35314 }
35315
35316
35317
35318 for {
35319 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
35320 right := v_0
35321 if right.Op != OpRsh8Ux8 {
35322 continue
35323 }
35324 y := right.Args[1]
35325 x := right.Args[0]
35326 left := v_1
35327 if left.Op != OpLsh8x8 {
35328 continue
35329 }
35330 _ = left.Args[1]
35331 if x != left.Args[0] {
35332 continue
35333 }
35334 z := left.Args[1]
35335 if z.Op != OpSub8 {
35336 continue
35337 }
35338 _ = z.Args[1]
35339 z_0 := z.Args[0]
35340 if z_0.Op != OpConst8 || auxIntToInt8(z_0.AuxInt) != 8 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 8)) {
35341 continue
35342 }
35343 v.reset(OpRotateLeft8)
35344 v.AddArg2(x, z)
35345 return true
35346 }
35347 break
35348 }
35349 return false
35350 }
35351 func rewriteValuegeneric_OpZero(v *Value) bool {
35352 v_1 := v.Args[1]
35353 v_0 := v.Args[0]
35354 b := v.Block
35355
35356
35357
35358 for {
35359 if v_0.Op != OpSelectN || auxIntToInt64(v_0.AuxInt) != 0 {
35360 break
35361 }
35362 call := v_0.Args[0]
35363 if call.Op != OpStaticLECall || len(call.Args) != 2 {
35364 break
35365 }
35366 mem := v_1
35367 if mem.Op != OpSelectN || auxIntToInt64(mem.AuxInt) != 1 || call != mem.Args[0] || !(isSameCall(call.Aux, "runtime.newobject")) {
35368 break
35369 }
35370 v.copyOf(mem)
35371 return true
35372 }
35373
35374
35375
35376 for {
35377 n := auxIntToInt64(v.AuxInt)
35378 t1 := auxToType(v.Aux)
35379 p1 := v_0
35380 store := v_1
35381 if store.Op != OpStore {
35382 break
35383 }
35384 t2 := auxToType(store.Aux)
35385 mem := store.Args[2]
35386 store_0 := store.Args[0]
35387 if store_0.Op != OpOffPtr {
35388 break
35389 }
35390 o2 := auxIntToInt64(store_0.AuxInt)
35391 p2 := store_0.Args[0]
35392 if !(isSamePtr(p1, p2) && store.Uses == 1 && n >= o2+t2.Size() && clobber(store)) {
35393 break
35394 }
35395 v.reset(OpZero)
35396 v.AuxInt = int64ToAuxInt(n)
35397 v.Aux = typeToAux(t1)
35398 v.AddArg2(p1, mem)
35399 return true
35400 }
35401
35402
35403
35404 for {
35405 n := auxIntToInt64(v.AuxInt)
35406 t := auxToType(v.Aux)
35407 dst1 := v_0
35408 move := v_1
35409 if move.Op != OpMove || auxIntToInt64(move.AuxInt) != n || auxToType(move.Aux) != t {
35410 break
35411 }
35412 mem := move.Args[2]
35413 dst2 := move.Args[0]
35414 if !(move.Uses == 1 && isSamePtr(dst1, dst2) && clobber(move)) {
35415 break
35416 }
35417 v.reset(OpZero)
35418 v.AuxInt = int64ToAuxInt(n)
35419 v.Aux = typeToAux(t)
35420 v.AddArg2(dst1, mem)
35421 return true
35422 }
35423
35424
35425
35426 for {
35427 n := auxIntToInt64(v.AuxInt)
35428 t := auxToType(v.Aux)
35429 dst1 := v_0
35430 vardef := v_1
35431 if vardef.Op != OpVarDef {
35432 break
35433 }
35434 x := auxToSym(vardef.Aux)
35435 move := vardef.Args[0]
35436 if move.Op != OpMove || auxIntToInt64(move.AuxInt) != n || auxToType(move.Aux) != t {
35437 break
35438 }
35439 mem := move.Args[2]
35440 dst2 := move.Args[0]
35441 if !(move.Uses == 1 && vardef.Uses == 1 && isSamePtr(dst1, dst2) && clobber(move, vardef)) {
35442 break
35443 }
35444 v.reset(OpZero)
35445 v.AuxInt = int64ToAuxInt(n)
35446 v.Aux = typeToAux(t)
35447 v0 := b.NewValue0(v.Pos, OpVarDef, types.TypeMem)
35448 v0.Aux = symToAux(x)
35449 v0.AddArg(mem)
35450 v.AddArg2(dst1, v0)
35451 return true
35452 }
35453
35454
35455
35456 for {
35457 s := auxIntToInt64(v.AuxInt)
35458 t := auxToType(v.Aux)
35459 dst1 := v_0
35460 zero := v_1
35461 if zero.Op != OpZero || auxIntToInt64(zero.AuxInt) != s || auxToType(zero.Aux) != t {
35462 break
35463 }
35464 dst2 := zero.Args[0]
35465 if !(isSamePtr(dst1, dst2)) {
35466 break
35467 }
35468 v.copyOf(zero)
35469 return true
35470 }
35471
35472
35473
35474 for {
35475 s := auxIntToInt64(v.AuxInt)
35476 t := auxToType(v.Aux)
35477 dst1 := v_0
35478 vardef := v_1
35479 if vardef.Op != OpVarDef {
35480 break
35481 }
35482 vardef_0 := vardef.Args[0]
35483 if vardef_0.Op != OpZero || auxIntToInt64(vardef_0.AuxInt) != s || auxToType(vardef_0.Aux) != t {
35484 break
35485 }
35486 dst2 := vardef_0.Args[0]
35487 if !(isSamePtr(dst1, dst2)) {
35488 break
35489 }
35490 v.copyOf(vardef)
35491 return true
35492 }
35493 return false
35494 }
35495 func rewriteValuegeneric_OpZeroExt16to32(v *Value) bool {
35496 v_0 := v.Args[0]
35497
35498
35499 for {
35500 if v_0.Op != OpConst16 {
35501 break
35502 }
35503 c := auxIntToInt16(v_0.AuxInt)
35504 v.reset(OpConst32)
35505 v.AuxInt = int32ToAuxInt(int32(uint16(c)))
35506 return true
35507 }
35508
35509
35510
35511 for {
35512 if v_0.Op != OpTrunc32to16 {
35513 break
35514 }
35515 x := v_0.Args[0]
35516 if x.Op != OpRsh32Ux64 {
35517 break
35518 }
35519 _ = x.Args[1]
35520 x_1 := x.Args[1]
35521 if x_1.Op != OpConst64 {
35522 break
35523 }
35524 s := auxIntToInt64(x_1.AuxInt)
35525 if !(s >= 16) {
35526 break
35527 }
35528 v.copyOf(x)
35529 return true
35530 }
35531 return false
35532 }
35533 func rewriteValuegeneric_OpZeroExt16to64(v *Value) bool {
35534 v_0 := v.Args[0]
35535
35536
35537 for {
35538 if v_0.Op != OpConst16 {
35539 break
35540 }
35541 c := auxIntToInt16(v_0.AuxInt)
35542 v.reset(OpConst64)
35543 v.AuxInt = int64ToAuxInt(int64(uint16(c)))
35544 return true
35545 }
35546
35547
35548
35549 for {
35550 if v_0.Op != OpTrunc64to16 {
35551 break
35552 }
35553 x := v_0.Args[0]
35554 if x.Op != OpRsh64Ux64 {
35555 break
35556 }
35557 _ = x.Args[1]
35558 x_1 := x.Args[1]
35559 if x_1.Op != OpConst64 {
35560 break
35561 }
35562 s := auxIntToInt64(x_1.AuxInt)
35563 if !(s >= 48) {
35564 break
35565 }
35566 v.copyOf(x)
35567 return true
35568 }
35569 return false
35570 }
35571 func rewriteValuegeneric_OpZeroExt32to64(v *Value) bool {
35572 v_0 := v.Args[0]
35573
35574
35575 for {
35576 if v_0.Op != OpConst32 {
35577 break
35578 }
35579 c := auxIntToInt32(v_0.AuxInt)
35580 v.reset(OpConst64)
35581 v.AuxInt = int64ToAuxInt(int64(uint32(c)))
35582 return true
35583 }
35584
35585
35586
35587 for {
35588 if v_0.Op != OpTrunc64to32 {
35589 break
35590 }
35591 x := v_0.Args[0]
35592 if x.Op != OpRsh64Ux64 {
35593 break
35594 }
35595 _ = x.Args[1]
35596 x_1 := x.Args[1]
35597 if x_1.Op != OpConst64 {
35598 break
35599 }
35600 s := auxIntToInt64(x_1.AuxInt)
35601 if !(s >= 32) {
35602 break
35603 }
35604 v.copyOf(x)
35605 return true
35606 }
35607 return false
35608 }
35609 func rewriteValuegeneric_OpZeroExt8to16(v *Value) bool {
35610 v_0 := v.Args[0]
35611
35612
35613 for {
35614 if v_0.Op != OpConst8 {
35615 break
35616 }
35617 c := auxIntToInt8(v_0.AuxInt)
35618 v.reset(OpConst16)
35619 v.AuxInt = int16ToAuxInt(int16(uint8(c)))
35620 return true
35621 }
35622
35623
35624
35625 for {
35626 if v_0.Op != OpTrunc16to8 {
35627 break
35628 }
35629 x := v_0.Args[0]
35630 if x.Op != OpRsh16Ux64 {
35631 break
35632 }
35633 _ = x.Args[1]
35634 x_1 := x.Args[1]
35635 if x_1.Op != OpConst64 {
35636 break
35637 }
35638 s := auxIntToInt64(x_1.AuxInt)
35639 if !(s >= 8) {
35640 break
35641 }
35642 v.copyOf(x)
35643 return true
35644 }
35645 return false
35646 }
35647 func rewriteValuegeneric_OpZeroExt8to32(v *Value) bool {
35648 v_0 := v.Args[0]
35649
35650
35651 for {
35652 if v_0.Op != OpConst8 {
35653 break
35654 }
35655 c := auxIntToInt8(v_0.AuxInt)
35656 v.reset(OpConst32)
35657 v.AuxInt = int32ToAuxInt(int32(uint8(c)))
35658 return true
35659 }
35660
35661
35662
35663 for {
35664 if v_0.Op != OpTrunc32to8 {
35665 break
35666 }
35667 x := v_0.Args[0]
35668 if x.Op != OpRsh32Ux64 {
35669 break
35670 }
35671 _ = x.Args[1]
35672 x_1 := x.Args[1]
35673 if x_1.Op != OpConst64 {
35674 break
35675 }
35676 s := auxIntToInt64(x_1.AuxInt)
35677 if !(s >= 24) {
35678 break
35679 }
35680 v.copyOf(x)
35681 return true
35682 }
35683 return false
35684 }
35685 func rewriteValuegeneric_OpZeroExt8to64(v *Value) bool {
35686 v_0 := v.Args[0]
35687
35688
35689 for {
35690 if v_0.Op != OpConst8 {
35691 break
35692 }
35693 c := auxIntToInt8(v_0.AuxInt)
35694 v.reset(OpConst64)
35695 v.AuxInt = int64ToAuxInt(int64(uint8(c)))
35696 return true
35697 }
35698
35699
35700
35701 for {
35702 if v_0.Op != OpTrunc64to8 {
35703 break
35704 }
35705 x := v_0.Args[0]
35706 if x.Op != OpRsh64Ux64 {
35707 break
35708 }
35709 _ = x.Args[1]
35710 x_1 := x.Args[1]
35711 if x_1.Op != OpConst64 {
35712 break
35713 }
35714 s := auxIntToInt64(x_1.AuxInt)
35715 if !(s >= 56) {
35716 break
35717 }
35718 v.copyOf(x)
35719 return true
35720 }
35721 return false
35722 }
35723 func rewriteBlockgeneric(b *Block) bool {
35724 switch b.Kind {
35725 case BlockIf:
35726
35727
35728 for b.Controls[0].Op == OpNot {
35729 v_0 := b.Controls[0]
35730 cond := v_0.Args[0]
35731 b.resetWithControl(BlockIf, cond)
35732 b.swapSuccessors()
35733 return true
35734 }
35735
35736
35737
35738 for b.Controls[0].Op == OpConstBool {
35739 v_0 := b.Controls[0]
35740 c := auxIntToBool(v_0.AuxInt)
35741 if !(c) {
35742 break
35743 }
35744 b.Reset(BlockFirst)
35745 return true
35746 }
35747
35748
35749
35750 for b.Controls[0].Op == OpConstBool {
35751 v_0 := b.Controls[0]
35752 c := auxIntToBool(v_0.AuxInt)
35753 if !(!c) {
35754 break
35755 }
35756 b.Reset(BlockFirst)
35757 b.swapSuccessors()
35758 return true
35759 }
35760 }
35761 return false
35762 }
35763
View as plain text