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 OpMul32uhilo:
250 return rewriteValuegeneric_OpMul32uhilo(v)
251 case OpMul32uover:
252 return rewriteValuegeneric_OpMul32uover(v)
253 case OpMul64:
254 return rewriteValuegeneric_OpMul64(v)
255 case OpMul64F:
256 return rewriteValuegeneric_OpMul64F(v)
257 case OpMul64uhilo:
258 return rewriteValuegeneric_OpMul64uhilo(v)
259 case OpMul64uover:
260 return rewriteValuegeneric_OpMul64uover(v)
261 case OpMul8:
262 return rewriteValuegeneric_OpMul8(v)
263 case OpNeg16:
264 return rewriteValuegeneric_OpNeg16(v)
265 case OpNeg32:
266 return rewriteValuegeneric_OpNeg32(v)
267 case OpNeg32F:
268 return rewriteValuegeneric_OpNeg32F(v)
269 case OpNeg64:
270 return rewriteValuegeneric_OpNeg64(v)
271 case OpNeg64F:
272 return rewriteValuegeneric_OpNeg64F(v)
273 case OpNeg8:
274 return rewriteValuegeneric_OpNeg8(v)
275 case OpNeq16:
276 return rewriteValuegeneric_OpNeq16(v)
277 case OpNeq32:
278 return rewriteValuegeneric_OpNeq32(v)
279 case OpNeq32F:
280 return rewriteValuegeneric_OpNeq32F(v)
281 case OpNeq64:
282 return rewriteValuegeneric_OpNeq64(v)
283 case OpNeq64F:
284 return rewriteValuegeneric_OpNeq64F(v)
285 case OpNeq8:
286 return rewriteValuegeneric_OpNeq8(v)
287 case OpNeqB:
288 return rewriteValuegeneric_OpNeqB(v)
289 case OpNeqInter:
290 return rewriteValuegeneric_OpNeqInter(v)
291 case OpNeqPtr:
292 return rewriteValuegeneric_OpNeqPtr(v)
293 case OpNeqSlice:
294 return rewriteValuegeneric_OpNeqSlice(v)
295 case OpNilCheck:
296 return rewriteValuegeneric_OpNilCheck(v)
297 case OpNot:
298 return rewriteValuegeneric_OpNot(v)
299 case OpOffPtr:
300 return rewriteValuegeneric_OpOffPtr(v)
301 case OpOr16:
302 return rewriteValuegeneric_OpOr16(v)
303 case OpOr32:
304 return rewriteValuegeneric_OpOr32(v)
305 case OpOr64:
306 return rewriteValuegeneric_OpOr64(v)
307 case OpOr8:
308 return rewriteValuegeneric_OpOr8(v)
309 case OpOrB:
310 return rewriteValuegeneric_OpOrB(v)
311 case OpPhi:
312 return rewriteValuegeneric_OpPhi(v)
313 case OpPopCount16:
314 return rewriteValuegeneric_OpPopCount16(v)
315 case OpPopCount32:
316 return rewriteValuegeneric_OpPopCount32(v)
317 case OpPopCount64:
318 return rewriteValuegeneric_OpPopCount64(v)
319 case OpPopCount8:
320 return rewriteValuegeneric_OpPopCount8(v)
321 case OpPtrIndex:
322 return rewriteValuegeneric_OpPtrIndex(v)
323 case OpRotateLeft16:
324 return rewriteValuegeneric_OpRotateLeft16(v)
325 case OpRotateLeft32:
326 return rewriteValuegeneric_OpRotateLeft32(v)
327 case OpRotateLeft64:
328 return rewriteValuegeneric_OpRotateLeft64(v)
329 case OpRotateLeft8:
330 return rewriteValuegeneric_OpRotateLeft8(v)
331 case OpRound32F:
332 return rewriteValuegeneric_OpRound32F(v)
333 case OpRound64F:
334 return rewriteValuegeneric_OpRound64F(v)
335 case OpRoundToEven:
336 return rewriteValuegeneric_OpRoundToEven(v)
337 case OpRsh16Ux16:
338 return rewriteValuegeneric_OpRsh16Ux16(v)
339 case OpRsh16Ux32:
340 return rewriteValuegeneric_OpRsh16Ux32(v)
341 case OpRsh16Ux64:
342 return rewriteValuegeneric_OpRsh16Ux64(v)
343 case OpRsh16Ux8:
344 return rewriteValuegeneric_OpRsh16Ux8(v)
345 case OpRsh16x16:
346 return rewriteValuegeneric_OpRsh16x16(v)
347 case OpRsh16x32:
348 return rewriteValuegeneric_OpRsh16x32(v)
349 case OpRsh16x64:
350 return rewriteValuegeneric_OpRsh16x64(v)
351 case OpRsh16x8:
352 return rewriteValuegeneric_OpRsh16x8(v)
353 case OpRsh32Ux16:
354 return rewriteValuegeneric_OpRsh32Ux16(v)
355 case OpRsh32Ux32:
356 return rewriteValuegeneric_OpRsh32Ux32(v)
357 case OpRsh32Ux64:
358 return rewriteValuegeneric_OpRsh32Ux64(v)
359 case OpRsh32Ux8:
360 return rewriteValuegeneric_OpRsh32Ux8(v)
361 case OpRsh32x16:
362 return rewriteValuegeneric_OpRsh32x16(v)
363 case OpRsh32x32:
364 return rewriteValuegeneric_OpRsh32x32(v)
365 case OpRsh32x64:
366 return rewriteValuegeneric_OpRsh32x64(v)
367 case OpRsh32x8:
368 return rewriteValuegeneric_OpRsh32x8(v)
369 case OpRsh64Ux16:
370 return rewriteValuegeneric_OpRsh64Ux16(v)
371 case OpRsh64Ux32:
372 return rewriteValuegeneric_OpRsh64Ux32(v)
373 case OpRsh64Ux64:
374 return rewriteValuegeneric_OpRsh64Ux64(v)
375 case OpRsh64Ux8:
376 return rewriteValuegeneric_OpRsh64Ux8(v)
377 case OpRsh64x16:
378 return rewriteValuegeneric_OpRsh64x16(v)
379 case OpRsh64x32:
380 return rewriteValuegeneric_OpRsh64x32(v)
381 case OpRsh64x64:
382 return rewriteValuegeneric_OpRsh64x64(v)
383 case OpRsh64x8:
384 return rewriteValuegeneric_OpRsh64x8(v)
385 case OpRsh8Ux16:
386 return rewriteValuegeneric_OpRsh8Ux16(v)
387 case OpRsh8Ux32:
388 return rewriteValuegeneric_OpRsh8Ux32(v)
389 case OpRsh8Ux64:
390 return rewriteValuegeneric_OpRsh8Ux64(v)
391 case OpRsh8Ux8:
392 return rewriteValuegeneric_OpRsh8Ux8(v)
393 case OpRsh8x16:
394 return rewriteValuegeneric_OpRsh8x16(v)
395 case OpRsh8x32:
396 return rewriteValuegeneric_OpRsh8x32(v)
397 case OpRsh8x64:
398 return rewriteValuegeneric_OpRsh8x64(v)
399 case OpRsh8x8:
400 return rewriteValuegeneric_OpRsh8x8(v)
401 case OpSelect0:
402 return rewriteValuegeneric_OpSelect0(v)
403 case OpSelect1:
404 return rewriteValuegeneric_OpSelect1(v)
405 case OpSelectN:
406 return rewriteValuegeneric_OpSelectN(v)
407 case OpSignExt16to32:
408 return rewriteValuegeneric_OpSignExt16to32(v)
409 case OpSignExt16to64:
410 return rewriteValuegeneric_OpSignExt16to64(v)
411 case OpSignExt32to64:
412 return rewriteValuegeneric_OpSignExt32to64(v)
413 case OpSignExt8to16:
414 return rewriteValuegeneric_OpSignExt8to16(v)
415 case OpSignExt8to32:
416 return rewriteValuegeneric_OpSignExt8to32(v)
417 case OpSignExt8to64:
418 return rewriteValuegeneric_OpSignExt8to64(v)
419 case OpSliceCap:
420 return rewriteValuegeneric_OpSliceCap(v)
421 case OpSliceLen:
422 return rewriteValuegeneric_OpSliceLen(v)
423 case OpSlicePtr:
424 return rewriteValuegeneric_OpSlicePtr(v)
425 case OpSlicemask:
426 return rewriteValuegeneric_OpSlicemask(v)
427 case OpSqrt:
428 return rewriteValuegeneric_OpSqrt(v)
429 case OpStaticCall:
430 return rewriteValuegeneric_OpStaticCall(v)
431 case OpStaticLECall:
432 return rewriteValuegeneric_OpStaticLECall(v)
433 case OpStore:
434 return rewriteValuegeneric_OpStore(v)
435 case OpStringLen:
436 return rewriteValuegeneric_OpStringLen(v)
437 case OpStringPtr:
438 return rewriteValuegeneric_OpStringPtr(v)
439 case OpStructSelect:
440 return rewriteValuegeneric_OpStructSelect(v)
441 case OpSub16:
442 return rewriteValuegeneric_OpSub16(v)
443 case OpSub32:
444 return rewriteValuegeneric_OpSub32(v)
445 case OpSub32F:
446 return rewriteValuegeneric_OpSub32F(v)
447 case OpSub64:
448 return rewriteValuegeneric_OpSub64(v)
449 case OpSub64F:
450 return rewriteValuegeneric_OpSub64F(v)
451 case OpSub8:
452 return rewriteValuegeneric_OpSub8(v)
453 case OpTrunc:
454 return rewriteValuegeneric_OpTrunc(v)
455 case OpTrunc16to8:
456 return rewriteValuegeneric_OpTrunc16to8(v)
457 case OpTrunc32to16:
458 return rewriteValuegeneric_OpTrunc32to16(v)
459 case OpTrunc32to8:
460 return rewriteValuegeneric_OpTrunc32to8(v)
461 case OpTrunc64to16:
462 return rewriteValuegeneric_OpTrunc64to16(v)
463 case OpTrunc64to32:
464 return rewriteValuegeneric_OpTrunc64to32(v)
465 case OpTrunc64to8:
466 return rewriteValuegeneric_OpTrunc64to8(v)
467 case OpXor16:
468 return rewriteValuegeneric_OpXor16(v)
469 case OpXor32:
470 return rewriteValuegeneric_OpXor32(v)
471 case OpXor64:
472 return rewriteValuegeneric_OpXor64(v)
473 case OpXor8:
474 return rewriteValuegeneric_OpXor8(v)
475 case OpZero:
476 return rewriteValuegeneric_OpZero(v)
477 case OpZeroExt16to32:
478 return rewriteValuegeneric_OpZeroExt16to32(v)
479 case OpZeroExt16to64:
480 return rewriteValuegeneric_OpZeroExt16to64(v)
481 case OpZeroExt32to64:
482 return rewriteValuegeneric_OpZeroExt32to64(v)
483 case OpZeroExt8to16:
484 return rewriteValuegeneric_OpZeroExt8to16(v)
485 case OpZeroExt8to32:
486 return rewriteValuegeneric_OpZeroExt8to32(v)
487 case OpZeroExt8to64:
488 return rewriteValuegeneric_OpZeroExt8to64(v)
489 }
490 return false
491 }
492 func rewriteValuegeneric_OpAdd16(v *Value) bool {
493 v_1 := v.Args[1]
494 v_0 := v.Args[0]
495 b := v.Block
496 config := b.Func.Config
497
498
499 for {
500 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
501 if v_0.Op != OpConst16 {
502 continue
503 }
504 c := auxIntToInt16(v_0.AuxInt)
505 if v_1.Op != OpConst16 {
506 continue
507 }
508 d := auxIntToInt16(v_1.AuxInt)
509 v.reset(OpConst16)
510 v.AuxInt = int16ToAuxInt(c + d)
511 return true
512 }
513 break
514 }
515
516
517 for {
518 t := v.Type
519 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
520 if v_0.Op != OpMul16 {
521 continue
522 }
523 _ = v_0.Args[1]
524 v_0_0 := v_0.Args[0]
525 v_0_1 := v_0.Args[1]
526 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
527 x := v_0_0
528 y := v_0_1
529 if v_1.Op != OpMul16 {
530 continue
531 }
532 _ = v_1.Args[1]
533 v_1_0 := v_1.Args[0]
534 v_1_1 := v_1.Args[1]
535 for _i2 := 0; _i2 <= 1; _i2, v_1_0, v_1_1 = _i2+1, v_1_1, v_1_0 {
536 if x != v_1_0 {
537 continue
538 }
539 z := v_1_1
540 v.reset(OpMul16)
541 v0 := b.NewValue0(v.Pos, OpAdd16, t)
542 v0.AddArg2(y, z)
543 v.AddArg2(x, v0)
544 return true
545 }
546 }
547 }
548 break
549 }
550
551
552 for {
553 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
554 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 {
555 continue
556 }
557 x := v_1
558 v.copyOf(x)
559 return true
560 }
561 break
562 }
563
564
565 for {
566 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
567 x := v_0
568 if v_1.Op != OpNeg16 {
569 continue
570 }
571 y := v_1.Args[0]
572 v.reset(OpSub16)
573 v.AddArg2(x, y)
574 return true
575 }
576 break
577 }
578
579
580 for {
581 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
582 if v_0.Op != OpCom16 {
583 continue
584 }
585 x := v_0.Args[0]
586 if x != v_1 {
587 continue
588 }
589 v.reset(OpConst16)
590 v.AuxInt = int16ToAuxInt(-1)
591 return true
592 }
593 break
594 }
595
596
597 for {
598 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
599 if v_0.Op != OpSub16 {
600 continue
601 }
602 t := v_0.Args[1]
603 x := v_0.Args[0]
604 if v_1.Op != OpAdd16 {
605 continue
606 }
607 _ = v_1.Args[1]
608 v_1_0 := v_1.Args[0]
609 v_1_1 := v_1.Args[1]
610 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
611 if t != v_1_0 {
612 continue
613 }
614 y := v_1_1
615 v.reset(OpAdd16)
616 v.AddArg2(x, y)
617 return true
618 }
619 }
620 break
621 }
622
623
624 for {
625 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
626 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 1 || v_1.Op != OpCom16 {
627 continue
628 }
629 x := v_1.Args[0]
630 v.reset(OpNeg16)
631 v.AddArg(x)
632 return true
633 }
634 break
635 }
636
637
638 for {
639 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
640 x := v_0
641 if v_1.Op != OpSub16 {
642 continue
643 }
644 _ = v_1.Args[1]
645 y := v_1.Args[0]
646 if x != v_1.Args[1] {
647 continue
648 }
649 v.copyOf(y)
650 return true
651 }
652 break
653 }
654
655
656 for {
657 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
658 x := v_0
659 if v_1.Op != OpAdd16 {
660 continue
661 }
662 _ = v_1.Args[1]
663 v_1_0 := v_1.Args[0]
664 v_1_1 := v_1.Args[1]
665 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
666 y := v_1_0
667 if v_1_1.Op != OpSub16 {
668 continue
669 }
670 _ = v_1_1.Args[1]
671 z := v_1_1.Args[0]
672 if x != v_1_1.Args[1] {
673 continue
674 }
675 v.reset(OpAdd16)
676 v.AddArg2(y, z)
677 return true
678 }
679 }
680 break
681 }
682
683
684
685 for {
686 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
687 if v_0.Op != OpAdd16 {
688 continue
689 }
690 _ = v_0.Args[1]
691 v_0_0 := v_0.Args[0]
692 v_0_1 := v_0.Args[1]
693 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
694 i := v_0_0
695 if i.Op != OpConst16 {
696 continue
697 }
698 t := i.Type
699 z := v_0_1
700 x := v_1
701 if !(z.Op != OpConst16 && x.Op != OpConst16) {
702 continue
703 }
704 v.reset(OpAdd16)
705 v0 := b.NewValue0(v.Pos, OpAdd16, t)
706 v0.AddArg2(z, x)
707 v.AddArg2(i, v0)
708 return true
709 }
710 }
711 break
712 }
713
714
715
716 for {
717 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
718 if v_0.Op != OpSub16 {
719 continue
720 }
721 z := v_0.Args[1]
722 i := v_0.Args[0]
723 if i.Op != OpConst16 {
724 continue
725 }
726 t := i.Type
727 x := v_1
728 if !(z.Op != OpConst16 && x.Op != OpConst16) {
729 continue
730 }
731 v.reset(OpAdd16)
732 v0 := b.NewValue0(v.Pos, OpSub16, t)
733 v0.AddArg2(x, z)
734 v.AddArg2(i, v0)
735 return true
736 }
737 break
738 }
739
740
741 for {
742 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
743 if v_0.Op != OpConst16 {
744 continue
745 }
746 t := v_0.Type
747 c := auxIntToInt16(v_0.AuxInt)
748 if v_1.Op != OpAdd16 {
749 continue
750 }
751 _ = v_1.Args[1]
752 v_1_0 := v_1.Args[0]
753 v_1_1 := v_1.Args[1]
754 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
755 if v_1_0.Op != OpConst16 || v_1_0.Type != t {
756 continue
757 }
758 d := auxIntToInt16(v_1_0.AuxInt)
759 x := v_1_1
760 v.reset(OpAdd16)
761 v0 := b.NewValue0(v.Pos, OpConst16, t)
762 v0.AuxInt = int16ToAuxInt(c + d)
763 v.AddArg2(v0, x)
764 return true
765 }
766 }
767 break
768 }
769
770
771 for {
772 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
773 if v_0.Op != OpConst16 {
774 continue
775 }
776 t := v_0.Type
777 c := auxIntToInt16(v_0.AuxInt)
778 if v_1.Op != OpSub16 {
779 continue
780 }
781 x := v_1.Args[1]
782 v_1_0 := v_1.Args[0]
783 if v_1_0.Op != OpConst16 || v_1_0.Type != t {
784 continue
785 }
786 d := auxIntToInt16(v_1_0.AuxInt)
787 v.reset(OpSub16)
788 v0 := b.NewValue0(v.Pos, OpConst16, t)
789 v0.AuxInt = int16ToAuxInt(c + d)
790 v.AddArg2(v0, x)
791 return true
792 }
793 break
794 }
795
796
797
798 for {
799 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
800 if v_0.Op != OpLsh16x64 {
801 continue
802 }
803 _ = v_0.Args[1]
804 x := v_0.Args[0]
805 z := v_0.Args[1]
806 if z.Op != OpConst64 {
807 continue
808 }
809 c := auxIntToInt64(z.AuxInt)
810 if v_1.Op != OpRsh16Ux64 {
811 continue
812 }
813 _ = v_1.Args[1]
814 if x != v_1.Args[0] {
815 continue
816 }
817 v_1_1 := v_1.Args[1]
818 if v_1_1.Op != OpConst64 {
819 continue
820 }
821 d := auxIntToInt64(v_1_1.AuxInt)
822 if !(c < 16 && d == 16-c && canRotate(config, 16)) {
823 continue
824 }
825 v.reset(OpRotateLeft16)
826 v.AddArg2(x, z)
827 return true
828 }
829 break
830 }
831
832
833
834 for {
835 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
836 left := v_0
837 if left.Op != OpLsh16x64 {
838 continue
839 }
840 y := left.Args[1]
841 x := left.Args[0]
842 right := v_1
843 if right.Op != OpRsh16Ux64 {
844 continue
845 }
846 _ = right.Args[1]
847 if x != right.Args[0] {
848 continue
849 }
850 right_1 := right.Args[1]
851 if right_1.Op != OpSub64 {
852 continue
853 }
854 _ = right_1.Args[1]
855 right_1_0 := right_1.Args[0]
856 if right_1_0.Op != OpConst64 || auxIntToInt64(right_1_0.AuxInt) != 16 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 16)) {
857 continue
858 }
859 v.reset(OpRotateLeft16)
860 v.AddArg2(x, y)
861 return true
862 }
863 break
864 }
865
866
867
868 for {
869 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
870 left := v_0
871 if left.Op != OpLsh16x32 {
872 continue
873 }
874 y := left.Args[1]
875 x := left.Args[0]
876 right := v_1
877 if right.Op != OpRsh16Ux32 {
878 continue
879 }
880 _ = right.Args[1]
881 if x != right.Args[0] {
882 continue
883 }
884 right_1 := right.Args[1]
885 if right_1.Op != OpSub32 {
886 continue
887 }
888 _ = right_1.Args[1]
889 right_1_0 := right_1.Args[0]
890 if right_1_0.Op != OpConst32 || auxIntToInt32(right_1_0.AuxInt) != 16 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 16)) {
891 continue
892 }
893 v.reset(OpRotateLeft16)
894 v.AddArg2(x, y)
895 return true
896 }
897 break
898 }
899
900
901
902 for {
903 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
904 left := v_0
905 if left.Op != OpLsh16x16 {
906 continue
907 }
908 y := left.Args[1]
909 x := left.Args[0]
910 right := v_1
911 if right.Op != OpRsh16Ux16 {
912 continue
913 }
914 _ = right.Args[1]
915 if x != right.Args[0] {
916 continue
917 }
918 right_1 := right.Args[1]
919 if right_1.Op != OpSub16 {
920 continue
921 }
922 _ = right_1.Args[1]
923 right_1_0 := right_1.Args[0]
924 if right_1_0.Op != OpConst16 || auxIntToInt16(right_1_0.AuxInt) != 16 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 16)) {
925 continue
926 }
927 v.reset(OpRotateLeft16)
928 v.AddArg2(x, y)
929 return true
930 }
931 break
932 }
933
934
935
936 for {
937 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
938 left := v_0
939 if left.Op != OpLsh16x8 {
940 continue
941 }
942 y := left.Args[1]
943 x := left.Args[0]
944 right := v_1
945 if right.Op != OpRsh16Ux8 {
946 continue
947 }
948 _ = right.Args[1]
949 if x != right.Args[0] {
950 continue
951 }
952 right_1 := right.Args[1]
953 if right_1.Op != OpSub8 {
954 continue
955 }
956 _ = right_1.Args[1]
957 right_1_0 := right_1.Args[0]
958 if right_1_0.Op != OpConst8 || auxIntToInt8(right_1_0.AuxInt) != 16 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 16)) {
959 continue
960 }
961 v.reset(OpRotateLeft16)
962 v.AddArg2(x, y)
963 return true
964 }
965 break
966 }
967
968
969
970 for {
971 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
972 right := v_0
973 if right.Op != OpRsh16Ux64 {
974 continue
975 }
976 y := right.Args[1]
977 x := right.Args[0]
978 left := v_1
979 if left.Op != OpLsh16x64 {
980 continue
981 }
982 _ = left.Args[1]
983 if x != left.Args[0] {
984 continue
985 }
986 z := left.Args[1]
987 if z.Op != OpSub64 {
988 continue
989 }
990 _ = z.Args[1]
991 z_0 := z.Args[0]
992 if z_0.Op != OpConst64 || auxIntToInt64(z_0.AuxInt) != 16 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 16)) {
993 continue
994 }
995 v.reset(OpRotateLeft16)
996 v.AddArg2(x, z)
997 return true
998 }
999 break
1000 }
1001
1002
1003
1004 for {
1005 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1006 right := v_0
1007 if right.Op != OpRsh16Ux32 {
1008 continue
1009 }
1010 y := right.Args[1]
1011 x := right.Args[0]
1012 left := v_1
1013 if left.Op != OpLsh16x32 {
1014 continue
1015 }
1016 _ = left.Args[1]
1017 if x != left.Args[0] {
1018 continue
1019 }
1020 z := left.Args[1]
1021 if z.Op != OpSub32 {
1022 continue
1023 }
1024 _ = z.Args[1]
1025 z_0 := z.Args[0]
1026 if z_0.Op != OpConst32 || auxIntToInt32(z_0.AuxInt) != 16 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 16)) {
1027 continue
1028 }
1029 v.reset(OpRotateLeft16)
1030 v.AddArg2(x, z)
1031 return true
1032 }
1033 break
1034 }
1035
1036
1037
1038 for {
1039 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1040 right := v_0
1041 if right.Op != OpRsh16Ux16 {
1042 continue
1043 }
1044 y := right.Args[1]
1045 x := right.Args[0]
1046 left := v_1
1047 if left.Op != OpLsh16x16 {
1048 continue
1049 }
1050 _ = left.Args[1]
1051 if x != left.Args[0] {
1052 continue
1053 }
1054 z := left.Args[1]
1055 if z.Op != OpSub16 {
1056 continue
1057 }
1058 _ = z.Args[1]
1059 z_0 := z.Args[0]
1060 if z_0.Op != OpConst16 || auxIntToInt16(z_0.AuxInt) != 16 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 16)) {
1061 continue
1062 }
1063 v.reset(OpRotateLeft16)
1064 v.AddArg2(x, z)
1065 return true
1066 }
1067 break
1068 }
1069
1070
1071
1072 for {
1073 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1074 right := v_0
1075 if right.Op != OpRsh16Ux8 {
1076 continue
1077 }
1078 y := right.Args[1]
1079 x := right.Args[0]
1080 left := v_1
1081 if left.Op != OpLsh16x8 {
1082 continue
1083 }
1084 _ = left.Args[1]
1085 if x != left.Args[0] {
1086 continue
1087 }
1088 z := left.Args[1]
1089 if z.Op != OpSub8 {
1090 continue
1091 }
1092 _ = z.Args[1]
1093 z_0 := z.Args[0]
1094 if z_0.Op != OpConst8 || auxIntToInt8(z_0.AuxInt) != 16 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 16)) {
1095 continue
1096 }
1097 v.reset(OpRotateLeft16)
1098 v.AddArg2(x, z)
1099 return true
1100 }
1101 break
1102 }
1103 return false
1104 }
1105 func rewriteValuegeneric_OpAdd32(v *Value) bool {
1106 v_1 := v.Args[1]
1107 v_0 := v.Args[0]
1108 b := v.Block
1109 config := b.Func.Config
1110
1111
1112 for {
1113 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1114 if v_0.Op != OpConst32 {
1115 continue
1116 }
1117 c := auxIntToInt32(v_0.AuxInt)
1118 if v_1.Op != OpConst32 {
1119 continue
1120 }
1121 d := auxIntToInt32(v_1.AuxInt)
1122 v.reset(OpConst32)
1123 v.AuxInt = int32ToAuxInt(c + d)
1124 return true
1125 }
1126 break
1127 }
1128
1129
1130 for {
1131 t := v.Type
1132 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1133 if v_0.Op != OpMul32 {
1134 continue
1135 }
1136 _ = v_0.Args[1]
1137 v_0_0 := v_0.Args[0]
1138 v_0_1 := v_0.Args[1]
1139 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
1140 x := v_0_0
1141 y := v_0_1
1142 if v_1.Op != OpMul32 {
1143 continue
1144 }
1145 _ = v_1.Args[1]
1146 v_1_0 := v_1.Args[0]
1147 v_1_1 := v_1.Args[1]
1148 for _i2 := 0; _i2 <= 1; _i2, v_1_0, v_1_1 = _i2+1, v_1_1, v_1_0 {
1149 if x != v_1_0 {
1150 continue
1151 }
1152 z := v_1_1
1153 v.reset(OpMul32)
1154 v0 := b.NewValue0(v.Pos, OpAdd32, t)
1155 v0.AddArg2(y, z)
1156 v.AddArg2(x, v0)
1157 return true
1158 }
1159 }
1160 }
1161 break
1162 }
1163
1164
1165 for {
1166 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1167 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
1168 continue
1169 }
1170 x := v_1
1171 v.copyOf(x)
1172 return true
1173 }
1174 break
1175 }
1176
1177
1178 for {
1179 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1180 x := v_0
1181 if v_1.Op != OpNeg32 {
1182 continue
1183 }
1184 y := v_1.Args[0]
1185 v.reset(OpSub32)
1186 v.AddArg2(x, y)
1187 return true
1188 }
1189 break
1190 }
1191
1192
1193 for {
1194 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1195 if v_0.Op != OpCom32 {
1196 continue
1197 }
1198 x := v_0.Args[0]
1199 if x != v_1 {
1200 continue
1201 }
1202 v.reset(OpConst32)
1203 v.AuxInt = int32ToAuxInt(-1)
1204 return true
1205 }
1206 break
1207 }
1208
1209
1210 for {
1211 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1212 if v_0.Op != OpSub32 {
1213 continue
1214 }
1215 t := v_0.Args[1]
1216 x := v_0.Args[0]
1217 if v_1.Op != OpAdd32 {
1218 continue
1219 }
1220 _ = v_1.Args[1]
1221 v_1_0 := v_1.Args[0]
1222 v_1_1 := v_1.Args[1]
1223 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
1224 if t != v_1_0 {
1225 continue
1226 }
1227 y := v_1_1
1228 v.reset(OpAdd32)
1229 v.AddArg2(x, y)
1230 return true
1231 }
1232 }
1233 break
1234 }
1235
1236
1237 for {
1238 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1239 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 1 || v_1.Op != OpCom32 {
1240 continue
1241 }
1242 x := v_1.Args[0]
1243 v.reset(OpNeg32)
1244 v.AddArg(x)
1245 return true
1246 }
1247 break
1248 }
1249
1250
1251 for {
1252 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1253 x := v_0
1254 if v_1.Op != OpSub32 {
1255 continue
1256 }
1257 _ = v_1.Args[1]
1258 y := v_1.Args[0]
1259 if x != v_1.Args[1] {
1260 continue
1261 }
1262 v.copyOf(y)
1263 return true
1264 }
1265 break
1266 }
1267
1268
1269 for {
1270 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1271 x := v_0
1272 if v_1.Op != OpAdd32 {
1273 continue
1274 }
1275 _ = v_1.Args[1]
1276 v_1_0 := v_1.Args[0]
1277 v_1_1 := v_1.Args[1]
1278 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
1279 y := v_1_0
1280 if v_1_1.Op != OpSub32 {
1281 continue
1282 }
1283 _ = v_1_1.Args[1]
1284 z := v_1_1.Args[0]
1285 if x != v_1_1.Args[1] {
1286 continue
1287 }
1288 v.reset(OpAdd32)
1289 v.AddArg2(y, z)
1290 return true
1291 }
1292 }
1293 break
1294 }
1295
1296
1297
1298 for {
1299 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1300 if v_0.Op != OpAdd32 {
1301 continue
1302 }
1303 _ = v_0.Args[1]
1304 v_0_0 := v_0.Args[0]
1305 v_0_1 := v_0.Args[1]
1306 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
1307 i := v_0_0
1308 if i.Op != OpConst32 {
1309 continue
1310 }
1311 t := i.Type
1312 z := v_0_1
1313 x := v_1
1314 if !(z.Op != OpConst32 && x.Op != OpConst32) {
1315 continue
1316 }
1317 v.reset(OpAdd32)
1318 v0 := b.NewValue0(v.Pos, OpAdd32, t)
1319 v0.AddArg2(z, x)
1320 v.AddArg2(i, v0)
1321 return true
1322 }
1323 }
1324 break
1325 }
1326
1327
1328
1329 for {
1330 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1331 if v_0.Op != OpSub32 {
1332 continue
1333 }
1334 z := v_0.Args[1]
1335 i := v_0.Args[0]
1336 if i.Op != OpConst32 {
1337 continue
1338 }
1339 t := i.Type
1340 x := v_1
1341 if !(z.Op != OpConst32 && x.Op != OpConst32) {
1342 continue
1343 }
1344 v.reset(OpAdd32)
1345 v0 := b.NewValue0(v.Pos, OpSub32, t)
1346 v0.AddArg2(x, z)
1347 v.AddArg2(i, v0)
1348 return true
1349 }
1350 break
1351 }
1352
1353
1354 for {
1355 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1356 if v_0.Op != OpConst32 {
1357 continue
1358 }
1359 t := v_0.Type
1360 c := auxIntToInt32(v_0.AuxInt)
1361 if v_1.Op != OpAdd32 {
1362 continue
1363 }
1364 _ = v_1.Args[1]
1365 v_1_0 := v_1.Args[0]
1366 v_1_1 := v_1.Args[1]
1367 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
1368 if v_1_0.Op != OpConst32 || v_1_0.Type != t {
1369 continue
1370 }
1371 d := auxIntToInt32(v_1_0.AuxInt)
1372 x := v_1_1
1373 v.reset(OpAdd32)
1374 v0 := b.NewValue0(v.Pos, OpConst32, t)
1375 v0.AuxInt = int32ToAuxInt(c + d)
1376 v.AddArg2(v0, x)
1377 return true
1378 }
1379 }
1380 break
1381 }
1382
1383
1384 for {
1385 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1386 if v_0.Op != OpConst32 {
1387 continue
1388 }
1389 t := v_0.Type
1390 c := auxIntToInt32(v_0.AuxInt)
1391 if v_1.Op != OpSub32 {
1392 continue
1393 }
1394 x := v_1.Args[1]
1395 v_1_0 := v_1.Args[0]
1396 if v_1_0.Op != OpConst32 || v_1_0.Type != t {
1397 continue
1398 }
1399 d := auxIntToInt32(v_1_0.AuxInt)
1400 v.reset(OpSub32)
1401 v0 := b.NewValue0(v.Pos, OpConst32, t)
1402 v0.AuxInt = int32ToAuxInt(c + d)
1403 v.AddArg2(v0, x)
1404 return true
1405 }
1406 break
1407 }
1408
1409
1410
1411 for {
1412 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1413 if v_0.Op != OpLsh32x64 {
1414 continue
1415 }
1416 _ = v_0.Args[1]
1417 x := v_0.Args[0]
1418 z := v_0.Args[1]
1419 if z.Op != OpConst64 {
1420 continue
1421 }
1422 c := auxIntToInt64(z.AuxInt)
1423 if v_1.Op != OpRsh32Ux64 {
1424 continue
1425 }
1426 _ = v_1.Args[1]
1427 if x != v_1.Args[0] {
1428 continue
1429 }
1430 v_1_1 := v_1.Args[1]
1431 if v_1_1.Op != OpConst64 {
1432 continue
1433 }
1434 d := auxIntToInt64(v_1_1.AuxInt)
1435 if !(c < 32 && d == 32-c && canRotate(config, 32)) {
1436 continue
1437 }
1438 v.reset(OpRotateLeft32)
1439 v.AddArg2(x, z)
1440 return true
1441 }
1442 break
1443 }
1444
1445
1446
1447 for {
1448 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1449 left := v_0
1450 if left.Op != OpLsh32x64 {
1451 continue
1452 }
1453 y := left.Args[1]
1454 x := left.Args[0]
1455 right := v_1
1456 if right.Op != OpRsh32Ux64 {
1457 continue
1458 }
1459 _ = right.Args[1]
1460 if x != right.Args[0] {
1461 continue
1462 }
1463 right_1 := right.Args[1]
1464 if right_1.Op != OpSub64 {
1465 continue
1466 }
1467 _ = right_1.Args[1]
1468 right_1_0 := right_1.Args[0]
1469 if right_1_0.Op != OpConst64 || auxIntToInt64(right_1_0.AuxInt) != 32 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 32)) {
1470 continue
1471 }
1472 v.reset(OpRotateLeft32)
1473 v.AddArg2(x, y)
1474 return true
1475 }
1476 break
1477 }
1478
1479
1480
1481 for {
1482 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1483 left := v_0
1484 if left.Op != OpLsh32x32 {
1485 continue
1486 }
1487 y := left.Args[1]
1488 x := left.Args[0]
1489 right := v_1
1490 if right.Op != OpRsh32Ux32 {
1491 continue
1492 }
1493 _ = right.Args[1]
1494 if x != right.Args[0] {
1495 continue
1496 }
1497 right_1 := right.Args[1]
1498 if right_1.Op != OpSub32 {
1499 continue
1500 }
1501 _ = right_1.Args[1]
1502 right_1_0 := right_1.Args[0]
1503 if right_1_0.Op != OpConst32 || auxIntToInt32(right_1_0.AuxInt) != 32 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 32)) {
1504 continue
1505 }
1506 v.reset(OpRotateLeft32)
1507 v.AddArg2(x, y)
1508 return true
1509 }
1510 break
1511 }
1512
1513
1514
1515 for {
1516 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1517 left := v_0
1518 if left.Op != OpLsh32x16 {
1519 continue
1520 }
1521 y := left.Args[1]
1522 x := left.Args[0]
1523 right := v_1
1524 if right.Op != OpRsh32Ux16 {
1525 continue
1526 }
1527 _ = right.Args[1]
1528 if x != right.Args[0] {
1529 continue
1530 }
1531 right_1 := right.Args[1]
1532 if right_1.Op != OpSub16 {
1533 continue
1534 }
1535 _ = right_1.Args[1]
1536 right_1_0 := right_1.Args[0]
1537 if right_1_0.Op != OpConst16 || auxIntToInt16(right_1_0.AuxInt) != 32 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 32)) {
1538 continue
1539 }
1540 v.reset(OpRotateLeft32)
1541 v.AddArg2(x, y)
1542 return true
1543 }
1544 break
1545 }
1546
1547
1548
1549 for {
1550 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1551 left := v_0
1552 if left.Op != OpLsh32x8 {
1553 continue
1554 }
1555 y := left.Args[1]
1556 x := left.Args[0]
1557 right := v_1
1558 if right.Op != OpRsh32Ux8 {
1559 continue
1560 }
1561 _ = right.Args[1]
1562 if x != right.Args[0] {
1563 continue
1564 }
1565 right_1 := right.Args[1]
1566 if right_1.Op != OpSub8 {
1567 continue
1568 }
1569 _ = right_1.Args[1]
1570 right_1_0 := right_1.Args[0]
1571 if right_1_0.Op != OpConst8 || auxIntToInt8(right_1_0.AuxInt) != 32 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 32)) {
1572 continue
1573 }
1574 v.reset(OpRotateLeft32)
1575 v.AddArg2(x, y)
1576 return true
1577 }
1578 break
1579 }
1580
1581
1582
1583 for {
1584 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1585 right := v_0
1586 if right.Op != OpRsh32Ux64 {
1587 continue
1588 }
1589 y := right.Args[1]
1590 x := right.Args[0]
1591 left := v_1
1592 if left.Op != OpLsh32x64 {
1593 continue
1594 }
1595 _ = left.Args[1]
1596 if x != left.Args[0] {
1597 continue
1598 }
1599 z := left.Args[1]
1600 if z.Op != OpSub64 {
1601 continue
1602 }
1603 _ = z.Args[1]
1604 z_0 := z.Args[0]
1605 if z_0.Op != OpConst64 || auxIntToInt64(z_0.AuxInt) != 32 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 32)) {
1606 continue
1607 }
1608 v.reset(OpRotateLeft32)
1609 v.AddArg2(x, z)
1610 return true
1611 }
1612 break
1613 }
1614
1615
1616
1617 for {
1618 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1619 right := v_0
1620 if right.Op != OpRsh32Ux32 {
1621 continue
1622 }
1623 y := right.Args[1]
1624 x := right.Args[0]
1625 left := v_1
1626 if left.Op != OpLsh32x32 {
1627 continue
1628 }
1629 _ = left.Args[1]
1630 if x != left.Args[0] {
1631 continue
1632 }
1633 z := left.Args[1]
1634 if z.Op != OpSub32 {
1635 continue
1636 }
1637 _ = z.Args[1]
1638 z_0 := z.Args[0]
1639 if z_0.Op != OpConst32 || auxIntToInt32(z_0.AuxInt) != 32 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 32)) {
1640 continue
1641 }
1642 v.reset(OpRotateLeft32)
1643 v.AddArg2(x, z)
1644 return true
1645 }
1646 break
1647 }
1648
1649
1650
1651 for {
1652 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1653 right := v_0
1654 if right.Op != OpRsh32Ux16 {
1655 continue
1656 }
1657 y := right.Args[1]
1658 x := right.Args[0]
1659 left := v_1
1660 if left.Op != OpLsh32x16 {
1661 continue
1662 }
1663 _ = left.Args[1]
1664 if x != left.Args[0] {
1665 continue
1666 }
1667 z := left.Args[1]
1668 if z.Op != OpSub16 {
1669 continue
1670 }
1671 _ = z.Args[1]
1672 z_0 := z.Args[0]
1673 if z_0.Op != OpConst16 || auxIntToInt16(z_0.AuxInt) != 32 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 32)) {
1674 continue
1675 }
1676 v.reset(OpRotateLeft32)
1677 v.AddArg2(x, z)
1678 return true
1679 }
1680 break
1681 }
1682
1683
1684
1685 for {
1686 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1687 right := v_0
1688 if right.Op != OpRsh32Ux8 {
1689 continue
1690 }
1691 y := right.Args[1]
1692 x := right.Args[0]
1693 left := v_1
1694 if left.Op != OpLsh32x8 {
1695 continue
1696 }
1697 _ = left.Args[1]
1698 if x != left.Args[0] {
1699 continue
1700 }
1701 z := left.Args[1]
1702 if z.Op != OpSub8 {
1703 continue
1704 }
1705 _ = z.Args[1]
1706 z_0 := z.Args[0]
1707 if z_0.Op != OpConst8 || auxIntToInt8(z_0.AuxInt) != 32 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 32)) {
1708 continue
1709 }
1710 v.reset(OpRotateLeft32)
1711 v.AddArg2(x, z)
1712 return true
1713 }
1714 break
1715 }
1716 return false
1717 }
1718 func rewriteValuegeneric_OpAdd32F(v *Value) bool {
1719 v_1 := v.Args[1]
1720 v_0 := v.Args[0]
1721
1722
1723
1724 for {
1725 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1726 if v_0.Op != OpConst32F {
1727 continue
1728 }
1729 c := auxIntToFloat32(v_0.AuxInt)
1730 if v_1.Op != OpConst32F {
1731 continue
1732 }
1733 d := auxIntToFloat32(v_1.AuxInt)
1734 if !(c+d == c+d) {
1735 continue
1736 }
1737 v.reset(OpConst32F)
1738 v.AuxInt = float32ToAuxInt(c + d)
1739 return true
1740 }
1741 break
1742 }
1743 return false
1744 }
1745 func rewriteValuegeneric_OpAdd64(v *Value) bool {
1746 v_1 := v.Args[1]
1747 v_0 := v.Args[0]
1748 b := v.Block
1749 config := b.Func.Config
1750
1751
1752 for {
1753 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1754 if v_0.Op != OpConst64 {
1755 continue
1756 }
1757 c := auxIntToInt64(v_0.AuxInt)
1758 if v_1.Op != OpConst64 {
1759 continue
1760 }
1761 d := auxIntToInt64(v_1.AuxInt)
1762 v.reset(OpConst64)
1763 v.AuxInt = int64ToAuxInt(c + d)
1764 return true
1765 }
1766 break
1767 }
1768
1769
1770 for {
1771 t := v.Type
1772 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1773 if v_0.Op != OpMul64 {
1774 continue
1775 }
1776 _ = v_0.Args[1]
1777 v_0_0 := v_0.Args[0]
1778 v_0_1 := v_0.Args[1]
1779 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
1780 x := v_0_0
1781 y := v_0_1
1782 if v_1.Op != OpMul64 {
1783 continue
1784 }
1785 _ = v_1.Args[1]
1786 v_1_0 := v_1.Args[0]
1787 v_1_1 := v_1.Args[1]
1788 for _i2 := 0; _i2 <= 1; _i2, v_1_0, v_1_1 = _i2+1, v_1_1, v_1_0 {
1789 if x != v_1_0 {
1790 continue
1791 }
1792 z := v_1_1
1793 v.reset(OpMul64)
1794 v0 := b.NewValue0(v.Pos, OpAdd64, t)
1795 v0.AddArg2(y, z)
1796 v.AddArg2(x, v0)
1797 return true
1798 }
1799 }
1800 }
1801 break
1802 }
1803
1804
1805 for {
1806 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1807 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
1808 continue
1809 }
1810 x := v_1
1811 v.copyOf(x)
1812 return true
1813 }
1814 break
1815 }
1816
1817
1818 for {
1819 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1820 x := v_0
1821 if v_1.Op != OpNeg64 {
1822 continue
1823 }
1824 y := v_1.Args[0]
1825 v.reset(OpSub64)
1826 v.AddArg2(x, y)
1827 return true
1828 }
1829 break
1830 }
1831
1832
1833 for {
1834 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1835 if v_0.Op != OpCom64 {
1836 continue
1837 }
1838 x := v_0.Args[0]
1839 if x != v_1 {
1840 continue
1841 }
1842 v.reset(OpConst64)
1843 v.AuxInt = int64ToAuxInt(-1)
1844 return true
1845 }
1846 break
1847 }
1848
1849
1850 for {
1851 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1852 if v_0.Op != OpSub64 {
1853 continue
1854 }
1855 t := v_0.Args[1]
1856 x := v_0.Args[0]
1857 if v_1.Op != OpAdd64 {
1858 continue
1859 }
1860 _ = v_1.Args[1]
1861 v_1_0 := v_1.Args[0]
1862 v_1_1 := v_1.Args[1]
1863 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
1864 if t != v_1_0 {
1865 continue
1866 }
1867 y := v_1_1
1868 v.reset(OpAdd64)
1869 v.AddArg2(x, y)
1870 return true
1871 }
1872 }
1873 break
1874 }
1875
1876
1877 for {
1878 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1879 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 1 || v_1.Op != OpCom64 {
1880 continue
1881 }
1882 x := v_1.Args[0]
1883 v.reset(OpNeg64)
1884 v.AddArg(x)
1885 return true
1886 }
1887 break
1888 }
1889
1890
1891 for {
1892 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1893 x := v_0
1894 if v_1.Op != OpSub64 {
1895 continue
1896 }
1897 _ = v_1.Args[1]
1898 y := v_1.Args[0]
1899 if x != v_1.Args[1] {
1900 continue
1901 }
1902 v.copyOf(y)
1903 return true
1904 }
1905 break
1906 }
1907
1908
1909 for {
1910 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1911 x := v_0
1912 if v_1.Op != OpAdd64 {
1913 continue
1914 }
1915 _ = v_1.Args[1]
1916 v_1_0 := v_1.Args[0]
1917 v_1_1 := v_1.Args[1]
1918 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
1919 y := v_1_0
1920 if v_1_1.Op != OpSub64 {
1921 continue
1922 }
1923 _ = v_1_1.Args[1]
1924 z := v_1_1.Args[0]
1925 if x != v_1_1.Args[1] {
1926 continue
1927 }
1928 v.reset(OpAdd64)
1929 v.AddArg2(y, z)
1930 return true
1931 }
1932 }
1933 break
1934 }
1935
1936
1937
1938 for {
1939 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1940 if v_0.Op != OpAdd64 {
1941 continue
1942 }
1943 _ = v_0.Args[1]
1944 v_0_0 := v_0.Args[0]
1945 v_0_1 := v_0.Args[1]
1946 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
1947 i := v_0_0
1948 if i.Op != OpConst64 {
1949 continue
1950 }
1951 t := i.Type
1952 z := v_0_1
1953 x := v_1
1954 if !(z.Op != OpConst64 && x.Op != OpConst64) {
1955 continue
1956 }
1957 v.reset(OpAdd64)
1958 v0 := b.NewValue0(v.Pos, OpAdd64, t)
1959 v0.AddArg2(z, x)
1960 v.AddArg2(i, v0)
1961 return true
1962 }
1963 }
1964 break
1965 }
1966
1967
1968
1969 for {
1970 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1971 if v_0.Op != OpSub64 {
1972 continue
1973 }
1974 z := v_0.Args[1]
1975 i := v_0.Args[0]
1976 if i.Op != OpConst64 {
1977 continue
1978 }
1979 t := i.Type
1980 x := v_1
1981 if !(z.Op != OpConst64 && x.Op != OpConst64) {
1982 continue
1983 }
1984 v.reset(OpAdd64)
1985 v0 := b.NewValue0(v.Pos, OpSub64, t)
1986 v0.AddArg2(x, z)
1987 v.AddArg2(i, v0)
1988 return true
1989 }
1990 break
1991 }
1992
1993
1994 for {
1995 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1996 if v_0.Op != OpConst64 {
1997 continue
1998 }
1999 t := v_0.Type
2000 c := auxIntToInt64(v_0.AuxInt)
2001 if v_1.Op != OpAdd64 {
2002 continue
2003 }
2004 _ = v_1.Args[1]
2005 v_1_0 := v_1.Args[0]
2006 v_1_1 := v_1.Args[1]
2007 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
2008 if v_1_0.Op != OpConst64 || v_1_0.Type != t {
2009 continue
2010 }
2011 d := auxIntToInt64(v_1_0.AuxInt)
2012 x := v_1_1
2013 v.reset(OpAdd64)
2014 v0 := b.NewValue0(v.Pos, OpConst64, t)
2015 v0.AuxInt = int64ToAuxInt(c + d)
2016 v.AddArg2(v0, x)
2017 return true
2018 }
2019 }
2020 break
2021 }
2022
2023
2024 for {
2025 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2026 if v_0.Op != OpConst64 {
2027 continue
2028 }
2029 t := v_0.Type
2030 c := auxIntToInt64(v_0.AuxInt)
2031 if v_1.Op != OpSub64 {
2032 continue
2033 }
2034 x := v_1.Args[1]
2035 v_1_0 := v_1.Args[0]
2036 if v_1_0.Op != OpConst64 || v_1_0.Type != t {
2037 continue
2038 }
2039 d := auxIntToInt64(v_1_0.AuxInt)
2040 v.reset(OpSub64)
2041 v0 := b.NewValue0(v.Pos, OpConst64, t)
2042 v0.AuxInt = int64ToAuxInt(c + d)
2043 v.AddArg2(v0, x)
2044 return true
2045 }
2046 break
2047 }
2048
2049
2050
2051 for {
2052 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2053 if v_0.Op != OpLsh64x64 {
2054 continue
2055 }
2056 _ = v_0.Args[1]
2057 x := v_0.Args[0]
2058 z := v_0.Args[1]
2059 if z.Op != OpConst64 {
2060 continue
2061 }
2062 c := auxIntToInt64(z.AuxInt)
2063 if v_1.Op != OpRsh64Ux64 {
2064 continue
2065 }
2066 _ = v_1.Args[1]
2067 if x != v_1.Args[0] {
2068 continue
2069 }
2070 v_1_1 := v_1.Args[1]
2071 if v_1_1.Op != OpConst64 {
2072 continue
2073 }
2074 d := auxIntToInt64(v_1_1.AuxInt)
2075 if !(c < 64 && d == 64-c && canRotate(config, 64)) {
2076 continue
2077 }
2078 v.reset(OpRotateLeft64)
2079 v.AddArg2(x, z)
2080 return true
2081 }
2082 break
2083 }
2084
2085
2086
2087 for {
2088 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2089 left := v_0
2090 if left.Op != OpLsh64x64 {
2091 continue
2092 }
2093 y := left.Args[1]
2094 x := left.Args[0]
2095 right := v_1
2096 if right.Op != OpRsh64Ux64 {
2097 continue
2098 }
2099 _ = right.Args[1]
2100 if x != right.Args[0] {
2101 continue
2102 }
2103 right_1 := right.Args[1]
2104 if right_1.Op != OpSub64 {
2105 continue
2106 }
2107 _ = right_1.Args[1]
2108 right_1_0 := right_1.Args[0]
2109 if right_1_0.Op != OpConst64 || auxIntToInt64(right_1_0.AuxInt) != 64 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 64)) {
2110 continue
2111 }
2112 v.reset(OpRotateLeft64)
2113 v.AddArg2(x, y)
2114 return true
2115 }
2116 break
2117 }
2118
2119
2120
2121 for {
2122 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2123 left := v_0
2124 if left.Op != OpLsh64x32 {
2125 continue
2126 }
2127 y := left.Args[1]
2128 x := left.Args[0]
2129 right := v_1
2130 if right.Op != OpRsh64Ux32 {
2131 continue
2132 }
2133 _ = right.Args[1]
2134 if x != right.Args[0] {
2135 continue
2136 }
2137 right_1 := right.Args[1]
2138 if right_1.Op != OpSub32 {
2139 continue
2140 }
2141 _ = right_1.Args[1]
2142 right_1_0 := right_1.Args[0]
2143 if right_1_0.Op != OpConst32 || auxIntToInt32(right_1_0.AuxInt) != 64 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 64)) {
2144 continue
2145 }
2146 v.reset(OpRotateLeft64)
2147 v.AddArg2(x, y)
2148 return true
2149 }
2150 break
2151 }
2152
2153
2154
2155 for {
2156 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2157 left := v_0
2158 if left.Op != OpLsh64x16 {
2159 continue
2160 }
2161 y := left.Args[1]
2162 x := left.Args[0]
2163 right := v_1
2164 if right.Op != OpRsh64Ux16 {
2165 continue
2166 }
2167 _ = right.Args[1]
2168 if x != right.Args[0] {
2169 continue
2170 }
2171 right_1 := right.Args[1]
2172 if right_1.Op != OpSub16 {
2173 continue
2174 }
2175 _ = right_1.Args[1]
2176 right_1_0 := right_1.Args[0]
2177 if right_1_0.Op != OpConst16 || auxIntToInt16(right_1_0.AuxInt) != 64 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 64)) {
2178 continue
2179 }
2180 v.reset(OpRotateLeft64)
2181 v.AddArg2(x, y)
2182 return true
2183 }
2184 break
2185 }
2186
2187
2188
2189 for {
2190 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2191 left := v_0
2192 if left.Op != OpLsh64x8 {
2193 continue
2194 }
2195 y := left.Args[1]
2196 x := left.Args[0]
2197 right := v_1
2198 if right.Op != OpRsh64Ux8 {
2199 continue
2200 }
2201 _ = right.Args[1]
2202 if x != right.Args[0] {
2203 continue
2204 }
2205 right_1 := right.Args[1]
2206 if right_1.Op != OpSub8 {
2207 continue
2208 }
2209 _ = right_1.Args[1]
2210 right_1_0 := right_1.Args[0]
2211 if right_1_0.Op != OpConst8 || auxIntToInt8(right_1_0.AuxInt) != 64 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 64)) {
2212 continue
2213 }
2214 v.reset(OpRotateLeft64)
2215 v.AddArg2(x, y)
2216 return true
2217 }
2218 break
2219 }
2220
2221
2222
2223 for {
2224 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2225 right := v_0
2226 if right.Op != OpRsh64Ux64 {
2227 continue
2228 }
2229 y := right.Args[1]
2230 x := right.Args[0]
2231 left := v_1
2232 if left.Op != OpLsh64x64 {
2233 continue
2234 }
2235 _ = left.Args[1]
2236 if x != left.Args[0] {
2237 continue
2238 }
2239 z := left.Args[1]
2240 if z.Op != OpSub64 {
2241 continue
2242 }
2243 _ = z.Args[1]
2244 z_0 := z.Args[0]
2245 if z_0.Op != OpConst64 || auxIntToInt64(z_0.AuxInt) != 64 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 64)) {
2246 continue
2247 }
2248 v.reset(OpRotateLeft64)
2249 v.AddArg2(x, z)
2250 return true
2251 }
2252 break
2253 }
2254
2255
2256
2257 for {
2258 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2259 right := v_0
2260 if right.Op != OpRsh64Ux32 {
2261 continue
2262 }
2263 y := right.Args[1]
2264 x := right.Args[0]
2265 left := v_1
2266 if left.Op != OpLsh64x32 {
2267 continue
2268 }
2269 _ = left.Args[1]
2270 if x != left.Args[0] {
2271 continue
2272 }
2273 z := left.Args[1]
2274 if z.Op != OpSub32 {
2275 continue
2276 }
2277 _ = z.Args[1]
2278 z_0 := z.Args[0]
2279 if z_0.Op != OpConst32 || auxIntToInt32(z_0.AuxInt) != 64 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 64)) {
2280 continue
2281 }
2282 v.reset(OpRotateLeft64)
2283 v.AddArg2(x, z)
2284 return true
2285 }
2286 break
2287 }
2288
2289
2290
2291 for {
2292 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2293 right := v_0
2294 if right.Op != OpRsh64Ux16 {
2295 continue
2296 }
2297 y := right.Args[1]
2298 x := right.Args[0]
2299 left := v_1
2300 if left.Op != OpLsh64x16 {
2301 continue
2302 }
2303 _ = left.Args[1]
2304 if x != left.Args[0] {
2305 continue
2306 }
2307 z := left.Args[1]
2308 if z.Op != OpSub16 {
2309 continue
2310 }
2311 _ = z.Args[1]
2312 z_0 := z.Args[0]
2313 if z_0.Op != OpConst16 || auxIntToInt16(z_0.AuxInt) != 64 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 64)) {
2314 continue
2315 }
2316 v.reset(OpRotateLeft64)
2317 v.AddArg2(x, z)
2318 return true
2319 }
2320 break
2321 }
2322
2323
2324
2325 for {
2326 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2327 right := v_0
2328 if right.Op != OpRsh64Ux8 {
2329 continue
2330 }
2331 y := right.Args[1]
2332 x := right.Args[0]
2333 left := v_1
2334 if left.Op != OpLsh64x8 {
2335 continue
2336 }
2337 _ = left.Args[1]
2338 if x != left.Args[0] {
2339 continue
2340 }
2341 z := left.Args[1]
2342 if z.Op != OpSub8 {
2343 continue
2344 }
2345 _ = z.Args[1]
2346 z_0 := z.Args[0]
2347 if z_0.Op != OpConst8 || auxIntToInt8(z_0.AuxInt) != 64 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 64)) {
2348 continue
2349 }
2350 v.reset(OpRotateLeft64)
2351 v.AddArg2(x, z)
2352 return true
2353 }
2354 break
2355 }
2356 return false
2357 }
2358 func rewriteValuegeneric_OpAdd64F(v *Value) bool {
2359 v_1 := v.Args[1]
2360 v_0 := v.Args[0]
2361
2362
2363
2364 for {
2365 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2366 if v_0.Op != OpConst64F {
2367 continue
2368 }
2369 c := auxIntToFloat64(v_0.AuxInt)
2370 if v_1.Op != OpConst64F {
2371 continue
2372 }
2373 d := auxIntToFloat64(v_1.AuxInt)
2374 if !(c+d == c+d) {
2375 continue
2376 }
2377 v.reset(OpConst64F)
2378 v.AuxInt = float64ToAuxInt(c + d)
2379 return true
2380 }
2381 break
2382 }
2383 return false
2384 }
2385 func rewriteValuegeneric_OpAdd64carry(v *Value) bool {
2386 v_2 := v.Args[2]
2387 v_1 := v.Args[1]
2388 v_0 := v.Args[0]
2389 b := v.Block
2390
2391
2392
2393 for {
2394 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2395 if v_0.Op != OpConst64 {
2396 continue
2397 }
2398 t := v_0.Type
2399 x := auxIntToInt64(v_0.AuxInt)
2400 if v_1.Op != OpConst64 {
2401 continue
2402 }
2403 y := auxIntToInt64(v_1.AuxInt)
2404 if v_2.Op != OpConst64 {
2405 continue
2406 }
2407 c := auxIntToInt64(v_2.AuxInt)
2408 if !(c >= 0 && c <= 1) {
2409 continue
2410 }
2411 v.reset(OpMakeTuple)
2412 v0 := b.NewValue0(v.Pos, OpConst64, t)
2413 v0.AuxInt = int64ToAuxInt(bitsAdd64(x, y, c).sum)
2414 v1 := b.NewValue0(v.Pos, OpConst64, t)
2415 v1.AuxInt = int64ToAuxInt(bitsAdd64(x, y, c).carry)
2416 v.AddArg2(v0, v1)
2417 return true
2418 }
2419 break
2420 }
2421 return false
2422 }
2423 func rewriteValuegeneric_OpAdd8(v *Value) bool {
2424 v_1 := v.Args[1]
2425 v_0 := v.Args[0]
2426 b := v.Block
2427 config := b.Func.Config
2428
2429
2430 for {
2431 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2432 if v_0.Op != OpConst8 {
2433 continue
2434 }
2435 c := auxIntToInt8(v_0.AuxInt)
2436 if v_1.Op != OpConst8 {
2437 continue
2438 }
2439 d := auxIntToInt8(v_1.AuxInt)
2440 v.reset(OpConst8)
2441 v.AuxInt = int8ToAuxInt(c + d)
2442 return true
2443 }
2444 break
2445 }
2446
2447
2448 for {
2449 t := v.Type
2450 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2451 if v_0.Op != OpMul8 {
2452 continue
2453 }
2454 _ = v_0.Args[1]
2455 v_0_0 := v_0.Args[0]
2456 v_0_1 := v_0.Args[1]
2457 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
2458 x := v_0_0
2459 y := v_0_1
2460 if v_1.Op != OpMul8 {
2461 continue
2462 }
2463 _ = v_1.Args[1]
2464 v_1_0 := v_1.Args[0]
2465 v_1_1 := v_1.Args[1]
2466 for _i2 := 0; _i2 <= 1; _i2, v_1_0, v_1_1 = _i2+1, v_1_1, v_1_0 {
2467 if x != v_1_0 {
2468 continue
2469 }
2470 z := v_1_1
2471 v.reset(OpMul8)
2472 v0 := b.NewValue0(v.Pos, OpAdd8, t)
2473 v0.AddArg2(y, z)
2474 v.AddArg2(x, v0)
2475 return true
2476 }
2477 }
2478 }
2479 break
2480 }
2481
2482
2483 for {
2484 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2485 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 {
2486 continue
2487 }
2488 x := v_1
2489 v.copyOf(x)
2490 return true
2491 }
2492 break
2493 }
2494
2495
2496 for {
2497 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2498 x := v_0
2499 if v_1.Op != OpNeg8 {
2500 continue
2501 }
2502 y := v_1.Args[0]
2503 v.reset(OpSub8)
2504 v.AddArg2(x, y)
2505 return true
2506 }
2507 break
2508 }
2509
2510
2511 for {
2512 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2513 if v_0.Op != OpCom8 {
2514 continue
2515 }
2516 x := v_0.Args[0]
2517 if x != v_1 {
2518 continue
2519 }
2520 v.reset(OpConst8)
2521 v.AuxInt = int8ToAuxInt(-1)
2522 return true
2523 }
2524 break
2525 }
2526
2527
2528 for {
2529 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2530 if v_0.Op != OpSub8 {
2531 continue
2532 }
2533 t := v_0.Args[1]
2534 x := v_0.Args[0]
2535 if v_1.Op != OpAdd8 {
2536 continue
2537 }
2538 _ = v_1.Args[1]
2539 v_1_0 := v_1.Args[0]
2540 v_1_1 := v_1.Args[1]
2541 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
2542 if t != v_1_0 {
2543 continue
2544 }
2545 y := v_1_1
2546 v.reset(OpAdd8)
2547 v.AddArg2(x, y)
2548 return true
2549 }
2550 }
2551 break
2552 }
2553
2554
2555 for {
2556 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2557 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 1 || v_1.Op != OpCom8 {
2558 continue
2559 }
2560 x := v_1.Args[0]
2561 v.reset(OpNeg8)
2562 v.AddArg(x)
2563 return true
2564 }
2565 break
2566 }
2567
2568
2569 for {
2570 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2571 x := v_0
2572 if v_1.Op != OpSub8 {
2573 continue
2574 }
2575 _ = v_1.Args[1]
2576 y := v_1.Args[0]
2577 if x != v_1.Args[1] {
2578 continue
2579 }
2580 v.copyOf(y)
2581 return true
2582 }
2583 break
2584 }
2585
2586
2587 for {
2588 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2589 x := v_0
2590 if v_1.Op != OpAdd8 {
2591 continue
2592 }
2593 _ = v_1.Args[1]
2594 v_1_0 := v_1.Args[0]
2595 v_1_1 := v_1.Args[1]
2596 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
2597 y := v_1_0
2598 if v_1_1.Op != OpSub8 {
2599 continue
2600 }
2601 _ = v_1_1.Args[1]
2602 z := v_1_1.Args[0]
2603 if x != v_1_1.Args[1] {
2604 continue
2605 }
2606 v.reset(OpAdd8)
2607 v.AddArg2(y, z)
2608 return true
2609 }
2610 }
2611 break
2612 }
2613
2614
2615
2616 for {
2617 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2618 if v_0.Op != OpAdd8 {
2619 continue
2620 }
2621 _ = v_0.Args[1]
2622 v_0_0 := v_0.Args[0]
2623 v_0_1 := v_0.Args[1]
2624 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
2625 i := v_0_0
2626 if i.Op != OpConst8 {
2627 continue
2628 }
2629 t := i.Type
2630 z := v_0_1
2631 x := v_1
2632 if !(z.Op != OpConst8 && x.Op != OpConst8) {
2633 continue
2634 }
2635 v.reset(OpAdd8)
2636 v0 := b.NewValue0(v.Pos, OpAdd8, t)
2637 v0.AddArg2(z, x)
2638 v.AddArg2(i, v0)
2639 return true
2640 }
2641 }
2642 break
2643 }
2644
2645
2646
2647 for {
2648 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2649 if v_0.Op != OpSub8 {
2650 continue
2651 }
2652 z := v_0.Args[1]
2653 i := v_0.Args[0]
2654 if i.Op != OpConst8 {
2655 continue
2656 }
2657 t := i.Type
2658 x := v_1
2659 if !(z.Op != OpConst8 && x.Op != OpConst8) {
2660 continue
2661 }
2662 v.reset(OpAdd8)
2663 v0 := b.NewValue0(v.Pos, OpSub8, t)
2664 v0.AddArg2(x, z)
2665 v.AddArg2(i, v0)
2666 return true
2667 }
2668 break
2669 }
2670
2671
2672 for {
2673 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2674 if v_0.Op != OpConst8 {
2675 continue
2676 }
2677 t := v_0.Type
2678 c := auxIntToInt8(v_0.AuxInt)
2679 if v_1.Op != OpAdd8 {
2680 continue
2681 }
2682 _ = v_1.Args[1]
2683 v_1_0 := v_1.Args[0]
2684 v_1_1 := v_1.Args[1]
2685 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
2686 if v_1_0.Op != OpConst8 || v_1_0.Type != t {
2687 continue
2688 }
2689 d := auxIntToInt8(v_1_0.AuxInt)
2690 x := v_1_1
2691 v.reset(OpAdd8)
2692 v0 := b.NewValue0(v.Pos, OpConst8, t)
2693 v0.AuxInt = int8ToAuxInt(c + d)
2694 v.AddArg2(v0, x)
2695 return true
2696 }
2697 }
2698 break
2699 }
2700
2701
2702 for {
2703 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2704 if v_0.Op != OpConst8 {
2705 continue
2706 }
2707 t := v_0.Type
2708 c := auxIntToInt8(v_0.AuxInt)
2709 if v_1.Op != OpSub8 {
2710 continue
2711 }
2712 x := v_1.Args[1]
2713 v_1_0 := v_1.Args[0]
2714 if v_1_0.Op != OpConst8 || v_1_0.Type != t {
2715 continue
2716 }
2717 d := auxIntToInt8(v_1_0.AuxInt)
2718 v.reset(OpSub8)
2719 v0 := b.NewValue0(v.Pos, OpConst8, t)
2720 v0.AuxInt = int8ToAuxInt(c + d)
2721 v.AddArg2(v0, x)
2722 return true
2723 }
2724 break
2725 }
2726
2727
2728
2729 for {
2730 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2731 if v_0.Op != OpLsh8x64 {
2732 continue
2733 }
2734 _ = v_0.Args[1]
2735 x := v_0.Args[0]
2736 z := v_0.Args[1]
2737 if z.Op != OpConst64 {
2738 continue
2739 }
2740 c := auxIntToInt64(z.AuxInt)
2741 if v_1.Op != OpRsh8Ux64 {
2742 continue
2743 }
2744 _ = v_1.Args[1]
2745 if x != v_1.Args[0] {
2746 continue
2747 }
2748 v_1_1 := v_1.Args[1]
2749 if v_1_1.Op != OpConst64 {
2750 continue
2751 }
2752 d := auxIntToInt64(v_1_1.AuxInt)
2753 if !(c < 8 && d == 8-c && canRotate(config, 8)) {
2754 continue
2755 }
2756 v.reset(OpRotateLeft8)
2757 v.AddArg2(x, z)
2758 return true
2759 }
2760 break
2761 }
2762
2763
2764
2765 for {
2766 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2767 left := v_0
2768 if left.Op != OpLsh8x64 {
2769 continue
2770 }
2771 y := left.Args[1]
2772 x := left.Args[0]
2773 right := v_1
2774 if right.Op != OpRsh8Ux64 {
2775 continue
2776 }
2777 _ = right.Args[1]
2778 if x != right.Args[0] {
2779 continue
2780 }
2781 right_1 := right.Args[1]
2782 if right_1.Op != OpSub64 {
2783 continue
2784 }
2785 _ = right_1.Args[1]
2786 right_1_0 := right_1.Args[0]
2787 if right_1_0.Op != OpConst64 || auxIntToInt64(right_1_0.AuxInt) != 8 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 8)) {
2788 continue
2789 }
2790 v.reset(OpRotateLeft8)
2791 v.AddArg2(x, y)
2792 return true
2793 }
2794 break
2795 }
2796
2797
2798
2799 for {
2800 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2801 left := v_0
2802 if left.Op != OpLsh8x32 {
2803 continue
2804 }
2805 y := left.Args[1]
2806 x := left.Args[0]
2807 right := v_1
2808 if right.Op != OpRsh8Ux32 {
2809 continue
2810 }
2811 _ = right.Args[1]
2812 if x != right.Args[0] {
2813 continue
2814 }
2815 right_1 := right.Args[1]
2816 if right_1.Op != OpSub32 {
2817 continue
2818 }
2819 _ = right_1.Args[1]
2820 right_1_0 := right_1.Args[0]
2821 if right_1_0.Op != OpConst32 || auxIntToInt32(right_1_0.AuxInt) != 8 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 8)) {
2822 continue
2823 }
2824 v.reset(OpRotateLeft8)
2825 v.AddArg2(x, y)
2826 return true
2827 }
2828 break
2829 }
2830
2831
2832
2833 for {
2834 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2835 left := v_0
2836 if left.Op != OpLsh8x16 {
2837 continue
2838 }
2839 y := left.Args[1]
2840 x := left.Args[0]
2841 right := v_1
2842 if right.Op != OpRsh8Ux16 {
2843 continue
2844 }
2845 _ = right.Args[1]
2846 if x != right.Args[0] {
2847 continue
2848 }
2849 right_1 := right.Args[1]
2850 if right_1.Op != OpSub16 {
2851 continue
2852 }
2853 _ = right_1.Args[1]
2854 right_1_0 := right_1.Args[0]
2855 if right_1_0.Op != OpConst16 || auxIntToInt16(right_1_0.AuxInt) != 8 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 8)) {
2856 continue
2857 }
2858 v.reset(OpRotateLeft8)
2859 v.AddArg2(x, y)
2860 return true
2861 }
2862 break
2863 }
2864
2865
2866
2867 for {
2868 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2869 left := v_0
2870 if left.Op != OpLsh8x8 {
2871 continue
2872 }
2873 y := left.Args[1]
2874 x := left.Args[0]
2875 right := v_1
2876 if right.Op != OpRsh8Ux8 {
2877 continue
2878 }
2879 _ = right.Args[1]
2880 if x != right.Args[0] {
2881 continue
2882 }
2883 right_1 := right.Args[1]
2884 if right_1.Op != OpSub8 {
2885 continue
2886 }
2887 _ = right_1.Args[1]
2888 right_1_0 := right_1.Args[0]
2889 if right_1_0.Op != OpConst8 || auxIntToInt8(right_1_0.AuxInt) != 8 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 8)) {
2890 continue
2891 }
2892 v.reset(OpRotateLeft8)
2893 v.AddArg2(x, y)
2894 return true
2895 }
2896 break
2897 }
2898
2899
2900
2901 for {
2902 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2903 right := v_0
2904 if right.Op != OpRsh8Ux64 {
2905 continue
2906 }
2907 y := right.Args[1]
2908 x := right.Args[0]
2909 left := v_1
2910 if left.Op != OpLsh8x64 {
2911 continue
2912 }
2913 _ = left.Args[1]
2914 if x != left.Args[0] {
2915 continue
2916 }
2917 z := left.Args[1]
2918 if z.Op != OpSub64 {
2919 continue
2920 }
2921 _ = z.Args[1]
2922 z_0 := z.Args[0]
2923 if z_0.Op != OpConst64 || auxIntToInt64(z_0.AuxInt) != 8 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 8)) {
2924 continue
2925 }
2926 v.reset(OpRotateLeft8)
2927 v.AddArg2(x, z)
2928 return true
2929 }
2930 break
2931 }
2932
2933
2934
2935 for {
2936 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2937 right := v_0
2938 if right.Op != OpRsh8Ux32 {
2939 continue
2940 }
2941 y := right.Args[1]
2942 x := right.Args[0]
2943 left := v_1
2944 if left.Op != OpLsh8x32 {
2945 continue
2946 }
2947 _ = left.Args[1]
2948 if x != left.Args[0] {
2949 continue
2950 }
2951 z := left.Args[1]
2952 if z.Op != OpSub32 {
2953 continue
2954 }
2955 _ = z.Args[1]
2956 z_0 := z.Args[0]
2957 if z_0.Op != OpConst32 || auxIntToInt32(z_0.AuxInt) != 8 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 8)) {
2958 continue
2959 }
2960 v.reset(OpRotateLeft8)
2961 v.AddArg2(x, z)
2962 return true
2963 }
2964 break
2965 }
2966
2967
2968
2969 for {
2970 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2971 right := v_0
2972 if right.Op != OpRsh8Ux16 {
2973 continue
2974 }
2975 y := right.Args[1]
2976 x := right.Args[0]
2977 left := v_1
2978 if left.Op != OpLsh8x16 {
2979 continue
2980 }
2981 _ = left.Args[1]
2982 if x != left.Args[0] {
2983 continue
2984 }
2985 z := left.Args[1]
2986 if z.Op != OpSub16 {
2987 continue
2988 }
2989 _ = z.Args[1]
2990 z_0 := z.Args[0]
2991 if z_0.Op != OpConst16 || auxIntToInt16(z_0.AuxInt) != 8 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 8)) {
2992 continue
2993 }
2994 v.reset(OpRotateLeft8)
2995 v.AddArg2(x, z)
2996 return true
2997 }
2998 break
2999 }
3000
3001
3002
3003 for {
3004 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3005 right := v_0
3006 if right.Op != OpRsh8Ux8 {
3007 continue
3008 }
3009 y := right.Args[1]
3010 x := right.Args[0]
3011 left := v_1
3012 if left.Op != OpLsh8x8 {
3013 continue
3014 }
3015 _ = left.Args[1]
3016 if x != left.Args[0] {
3017 continue
3018 }
3019 z := left.Args[1]
3020 if z.Op != OpSub8 {
3021 continue
3022 }
3023 _ = z.Args[1]
3024 z_0 := z.Args[0]
3025 if z_0.Op != OpConst8 || auxIntToInt8(z_0.AuxInt) != 8 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 8)) {
3026 continue
3027 }
3028 v.reset(OpRotateLeft8)
3029 v.AddArg2(x, z)
3030 return true
3031 }
3032 break
3033 }
3034 return false
3035 }
3036 func rewriteValuegeneric_OpAddPtr(v *Value) bool {
3037 v_1 := v.Args[1]
3038 v_0 := v.Args[0]
3039
3040
3041 for {
3042 t := v.Type
3043 x := v_0
3044 if v_1.Op != OpConst64 {
3045 break
3046 }
3047 c := auxIntToInt64(v_1.AuxInt)
3048 v.reset(OpOffPtr)
3049 v.Type = t
3050 v.AuxInt = int64ToAuxInt(c)
3051 v.AddArg(x)
3052 return true
3053 }
3054
3055
3056 for {
3057 t := v.Type
3058 x := v_0
3059 if v_1.Op != OpConst32 {
3060 break
3061 }
3062 c := auxIntToInt32(v_1.AuxInt)
3063 v.reset(OpOffPtr)
3064 v.Type = t
3065 v.AuxInt = int64ToAuxInt(int64(c))
3066 v.AddArg(x)
3067 return true
3068 }
3069 return false
3070 }
3071 func rewriteValuegeneric_OpAnd16(v *Value) bool {
3072 v_1 := v.Args[1]
3073 v_0 := v.Args[0]
3074 b := v.Block
3075
3076
3077 for {
3078 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3079 if v_0.Op != OpConst16 {
3080 continue
3081 }
3082 c := auxIntToInt16(v_0.AuxInt)
3083 if v_1.Op != OpConst16 {
3084 continue
3085 }
3086 d := auxIntToInt16(v_1.AuxInt)
3087 v.reset(OpConst16)
3088 v.AuxInt = int16ToAuxInt(c & d)
3089 return true
3090 }
3091 break
3092 }
3093
3094
3095 for {
3096 t := v.Type
3097 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3098 if v_0.Op != OpCom16 {
3099 continue
3100 }
3101 x := v_0.Args[0]
3102 if v_1.Op != OpCom16 {
3103 continue
3104 }
3105 y := v_1.Args[0]
3106 v.reset(OpCom16)
3107 v0 := b.NewValue0(v.Pos, OpOr16, t)
3108 v0.AddArg2(x, y)
3109 v.AddArg(v0)
3110 return true
3111 }
3112 break
3113 }
3114
3115
3116
3117 for {
3118 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3119 if v_0.Op != OpConst16 {
3120 continue
3121 }
3122 m := auxIntToInt16(v_0.AuxInt)
3123 if v_1.Op != OpRsh16Ux64 {
3124 continue
3125 }
3126 _ = v_1.Args[1]
3127 v_1_1 := v_1.Args[1]
3128 if v_1_1.Op != OpConst64 {
3129 continue
3130 }
3131 c := auxIntToInt64(v_1_1.AuxInt)
3132 if !(c >= int64(16-ntz16(m))) {
3133 continue
3134 }
3135 v.reset(OpConst16)
3136 v.AuxInt = int16ToAuxInt(0)
3137 return true
3138 }
3139 break
3140 }
3141
3142
3143
3144 for {
3145 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3146 if v_0.Op != OpConst16 {
3147 continue
3148 }
3149 m := auxIntToInt16(v_0.AuxInt)
3150 if v_1.Op != OpLsh16x64 {
3151 continue
3152 }
3153 _ = v_1.Args[1]
3154 v_1_1 := v_1.Args[1]
3155 if v_1_1.Op != OpConst64 {
3156 continue
3157 }
3158 c := auxIntToInt64(v_1_1.AuxInt)
3159 if !(c >= int64(16-nlz16(m))) {
3160 continue
3161 }
3162 v.reset(OpConst16)
3163 v.AuxInt = int16ToAuxInt(0)
3164 return true
3165 }
3166 break
3167 }
3168
3169
3170 for {
3171 x := v_0
3172 if x != v_1 {
3173 break
3174 }
3175 v.copyOf(x)
3176 return true
3177 }
3178
3179
3180 for {
3181 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3182 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != -1 {
3183 continue
3184 }
3185 x := v_1
3186 v.copyOf(x)
3187 return true
3188 }
3189 break
3190 }
3191
3192
3193 for {
3194 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3195 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 {
3196 continue
3197 }
3198 v.reset(OpConst16)
3199 v.AuxInt = int16ToAuxInt(0)
3200 return true
3201 }
3202 break
3203 }
3204
3205
3206 for {
3207 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3208 if v_0.Op != OpCom16 {
3209 continue
3210 }
3211 x := v_0.Args[0]
3212 if x != v_1 {
3213 continue
3214 }
3215 v.reset(OpConst16)
3216 v.AuxInt = int16ToAuxInt(0)
3217 return true
3218 }
3219 break
3220 }
3221
3222
3223 for {
3224 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3225 x := v_0
3226 if v_1.Op != OpAnd16 {
3227 continue
3228 }
3229 _ = v_1.Args[1]
3230 v_1_0 := v_1.Args[0]
3231 v_1_1 := v_1.Args[1]
3232 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
3233 if x != v_1_0 {
3234 continue
3235 }
3236 y := v_1_1
3237 v.reset(OpAnd16)
3238 v.AddArg2(x, y)
3239 return true
3240 }
3241 }
3242 break
3243 }
3244
3245
3246
3247 for {
3248 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3249 if v_0.Op != OpAnd16 {
3250 continue
3251 }
3252 _ = v_0.Args[1]
3253 v_0_0 := v_0.Args[0]
3254 v_0_1 := v_0.Args[1]
3255 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
3256 i := v_0_0
3257 if i.Op != OpConst16 {
3258 continue
3259 }
3260 t := i.Type
3261 z := v_0_1
3262 x := v_1
3263 if !(z.Op != OpConst16 && x.Op != OpConst16) {
3264 continue
3265 }
3266 v.reset(OpAnd16)
3267 v0 := b.NewValue0(v.Pos, OpAnd16, t)
3268 v0.AddArg2(z, x)
3269 v.AddArg2(i, v0)
3270 return true
3271 }
3272 }
3273 break
3274 }
3275
3276
3277 for {
3278 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3279 if v_0.Op != OpConst16 {
3280 continue
3281 }
3282 t := v_0.Type
3283 c := auxIntToInt16(v_0.AuxInt)
3284 if v_1.Op != OpAnd16 {
3285 continue
3286 }
3287 _ = v_1.Args[1]
3288 v_1_0 := v_1.Args[0]
3289 v_1_1 := v_1.Args[1]
3290 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
3291 if v_1_0.Op != OpConst16 || v_1_0.Type != t {
3292 continue
3293 }
3294 d := auxIntToInt16(v_1_0.AuxInt)
3295 x := v_1_1
3296 v.reset(OpAnd16)
3297 v0 := b.NewValue0(v.Pos, OpConst16, t)
3298 v0.AuxInt = int16ToAuxInt(c & d)
3299 v.AddArg2(v0, x)
3300 return true
3301 }
3302 }
3303 break
3304 }
3305 return false
3306 }
3307 func rewriteValuegeneric_OpAnd32(v *Value) bool {
3308 v_1 := v.Args[1]
3309 v_0 := v.Args[0]
3310 b := v.Block
3311
3312
3313 for {
3314 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3315 if v_0.Op != OpConst32 {
3316 continue
3317 }
3318 c := auxIntToInt32(v_0.AuxInt)
3319 if v_1.Op != OpConst32 {
3320 continue
3321 }
3322 d := auxIntToInt32(v_1.AuxInt)
3323 v.reset(OpConst32)
3324 v.AuxInt = int32ToAuxInt(c & d)
3325 return true
3326 }
3327 break
3328 }
3329
3330
3331 for {
3332 t := v.Type
3333 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3334 if v_0.Op != OpCom32 {
3335 continue
3336 }
3337 x := v_0.Args[0]
3338 if v_1.Op != OpCom32 {
3339 continue
3340 }
3341 y := v_1.Args[0]
3342 v.reset(OpCom32)
3343 v0 := b.NewValue0(v.Pos, OpOr32, t)
3344 v0.AddArg2(x, y)
3345 v.AddArg(v0)
3346 return true
3347 }
3348 break
3349 }
3350
3351
3352
3353 for {
3354 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3355 if v_0.Op != OpConst32 {
3356 continue
3357 }
3358 m := auxIntToInt32(v_0.AuxInt)
3359 if v_1.Op != OpRsh32Ux64 {
3360 continue
3361 }
3362 _ = v_1.Args[1]
3363 v_1_1 := v_1.Args[1]
3364 if v_1_1.Op != OpConst64 {
3365 continue
3366 }
3367 c := auxIntToInt64(v_1_1.AuxInt)
3368 if !(c >= int64(32-ntz32(m))) {
3369 continue
3370 }
3371 v.reset(OpConst32)
3372 v.AuxInt = int32ToAuxInt(0)
3373 return true
3374 }
3375 break
3376 }
3377
3378
3379
3380 for {
3381 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3382 if v_0.Op != OpConst32 {
3383 continue
3384 }
3385 m := auxIntToInt32(v_0.AuxInt)
3386 if v_1.Op != OpLsh32x64 {
3387 continue
3388 }
3389 _ = v_1.Args[1]
3390 v_1_1 := v_1.Args[1]
3391 if v_1_1.Op != OpConst64 {
3392 continue
3393 }
3394 c := auxIntToInt64(v_1_1.AuxInt)
3395 if !(c >= int64(32-nlz32(m))) {
3396 continue
3397 }
3398 v.reset(OpConst32)
3399 v.AuxInt = int32ToAuxInt(0)
3400 return true
3401 }
3402 break
3403 }
3404
3405
3406 for {
3407 x := v_0
3408 if x != v_1 {
3409 break
3410 }
3411 v.copyOf(x)
3412 return true
3413 }
3414
3415
3416 for {
3417 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3418 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != -1 {
3419 continue
3420 }
3421 x := v_1
3422 v.copyOf(x)
3423 return true
3424 }
3425 break
3426 }
3427
3428
3429 for {
3430 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3431 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
3432 continue
3433 }
3434 v.reset(OpConst32)
3435 v.AuxInt = int32ToAuxInt(0)
3436 return true
3437 }
3438 break
3439 }
3440
3441
3442 for {
3443 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3444 if v_0.Op != OpCom32 {
3445 continue
3446 }
3447 x := v_0.Args[0]
3448 if x != v_1 {
3449 continue
3450 }
3451 v.reset(OpConst32)
3452 v.AuxInt = int32ToAuxInt(0)
3453 return true
3454 }
3455 break
3456 }
3457
3458
3459 for {
3460 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3461 x := v_0
3462 if v_1.Op != OpAnd32 {
3463 continue
3464 }
3465 _ = v_1.Args[1]
3466 v_1_0 := v_1.Args[0]
3467 v_1_1 := v_1.Args[1]
3468 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
3469 if x != v_1_0 {
3470 continue
3471 }
3472 y := v_1_1
3473 v.reset(OpAnd32)
3474 v.AddArg2(x, y)
3475 return true
3476 }
3477 }
3478 break
3479 }
3480
3481
3482
3483 for {
3484 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3485 if v_0.Op != OpAnd32 {
3486 continue
3487 }
3488 _ = v_0.Args[1]
3489 v_0_0 := v_0.Args[0]
3490 v_0_1 := v_0.Args[1]
3491 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
3492 i := v_0_0
3493 if i.Op != OpConst32 {
3494 continue
3495 }
3496 t := i.Type
3497 z := v_0_1
3498 x := v_1
3499 if !(z.Op != OpConst32 && x.Op != OpConst32) {
3500 continue
3501 }
3502 v.reset(OpAnd32)
3503 v0 := b.NewValue0(v.Pos, OpAnd32, t)
3504 v0.AddArg2(z, x)
3505 v.AddArg2(i, v0)
3506 return true
3507 }
3508 }
3509 break
3510 }
3511
3512
3513 for {
3514 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3515 if v_0.Op != OpConst32 {
3516 continue
3517 }
3518 t := v_0.Type
3519 c := auxIntToInt32(v_0.AuxInt)
3520 if v_1.Op != OpAnd32 {
3521 continue
3522 }
3523 _ = v_1.Args[1]
3524 v_1_0 := v_1.Args[0]
3525 v_1_1 := v_1.Args[1]
3526 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
3527 if v_1_0.Op != OpConst32 || v_1_0.Type != t {
3528 continue
3529 }
3530 d := auxIntToInt32(v_1_0.AuxInt)
3531 x := v_1_1
3532 v.reset(OpAnd32)
3533 v0 := b.NewValue0(v.Pos, OpConst32, t)
3534 v0.AuxInt = int32ToAuxInt(c & d)
3535 v.AddArg2(v0, x)
3536 return true
3537 }
3538 }
3539 break
3540 }
3541 return false
3542 }
3543 func rewriteValuegeneric_OpAnd64(v *Value) bool {
3544 v_1 := v.Args[1]
3545 v_0 := v.Args[0]
3546 b := v.Block
3547
3548
3549 for {
3550 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3551 if v_0.Op != OpConst64 {
3552 continue
3553 }
3554 c := auxIntToInt64(v_0.AuxInt)
3555 if v_1.Op != OpConst64 {
3556 continue
3557 }
3558 d := auxIntToInt64(v_1.AuxInt)
3559 v.reset(OpConst64)
3560 v.AuxInt = int64ToAuxInt(c & d)
3561 return true
3562 }
3563 break
3564 }
3565
3566
3567 for {
3568 t := v.Type
3569 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3570 if v_0.Op != OpCom64 {
3571 continue
3572 }
3573 x := v_0.Args[0]
3574 if v_1.Op != OpCom64 {
3575 continue
3576 }
3577 y := v_1.Args[0]
3578 v.reset(OpCom64)
3579 v0 := b.NewValue0(v.Pos, OpOr64, t)
3580 v0.AddArg2(x, y)
3581 v.AddArg(v0)
3582 return true
3583 }
3584 break
3585 }
3586
3587
3588
3589 for {
3590 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3591 if v_0.Op != OpConst64 {
3592 continue
3593 }
3594 m := auxIntToInt64(v_0.AuxInt)
3595 if v_1.Op != OpRsh64Ux64 {
3596 continue
3597 }
3598 _ = v_1.Args[1]
3599 v_1_1 := v_1.Args[1]
3600 if v_1_1.Op != OpConst64 {
3601 continue
3602 }
3603 c := auxIntToInt64(v_1_1.AuxInt)
3604 if !(c >= int64(64-ntz64(m))) {
3605 continue
3606 }
3607 v.reset(OpConst64)
3608 v.AuxInt = int64ToAuxInt(0)
3609 return true
3610 }
3611 break
3612 }
3613
3614
3615
3616 for {
3617 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3618 if v_0.Op != OpConst64 {
3619 continue
3620 }
3621 m := auxIntToInt64(v_0.AuxInt)
3622 if v_1.Op != OpLsh64x64 {
3623 continue
3624 }
3625 _ = v_1.Args[1]
3626 v_1_1 := v_1.Args[1]
3627 if v_1_1.Op != OpConst64 {
3628 continue
3629 }
3630 c := auxIntToInt64(v_1_1.AuxInt)
3631 if !(c >= int64(64-nlz64(m))) {
3632 continue
3633 }
3634 v.reset(OpConst64)
3635 v.AuxInt = int64ToAuxInt(0)
3636 return true
3637 }
3638 break
3639 }
3640
3641
3642 for {
3643 x := v_0
3644 if x != v_1 {
3645 break
3646 }
3647 v.copyOf(x)
3648 return true
3649 }
3650
3651
3652 for {
3653 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3654 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != -1 {
3655 continue
3656 }
3657 x := v_1
3658 v.copyOf(x)
3659 return true
3660 }
3661 break
3662 }
3663
3664
3665 for {
3666 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3667 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
3668 continue
3669 }
3670 v.reset(OpConst64)
3671 v.AuxInt = int64ToAuxInt(0)
3672 return true
3673 }
3674 break
3675 }
3676
3677
3678 for {
3679 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3680 if v_0.Op != OpCom64 {
3681 continue
3682 }
3683 x := v_0.Args[0]
3684 if x != v_1 {
3685 continue
3686 }
3687 v.reset(OpConst64)
3688 v.AuxInt = int64ToAuxInt(0)
3689 return true
3690 }
3691 break
3692 }
3693
3694
3695 for {
3696 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3697 x := v_0
3698 if v_1.Op != OpAnd64 {
3699 continue
3700 }
3701 _ = v_1.Args[1]
3702 v_1_0 := v_1.Args[0]
3703 v_1_1 := v_1.Args[1]
3704 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
3705 if x != v_1_0 {
3706 continue
3707 }
3708 y := v_1_1
3709 v.reset(OpAnd64)
3710 v.AddArg2(x, y)
3711 return true
3712 }
3713 }
3714 break
3715 }
3716
3717
3718
3719 for {
3720 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3721 if v_0.Op != OpAnd64 {
3722 continue
3723 }
3724 _ = v_0.Args[1]
3725 v_0_0 := v_0.Args[0]
3726 v_0_1 := v_0.Args[1]
3727 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
3728 i := v_0_0
3729 if i.Op != OpConst64 {
3730 continue
3731 }
3732 t := i.Type
3733 z := v_0_1
3734 x := v_1
3735 if !(z.Op != OpConst64 && x.Op != OpConst64) {
3736 continue
3737 }
3738 v.reset(OpAnd64)
3739 v0 := b.NewValue0(v.Pos, OpAnd64, t)
3740 v0.AddArg2(z, x)
3741 v.AddArg2(i, v0)
3742 return true
3743 }
3744 }
3745 break
3746 }
3747
3748
3749 for {
3750 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3751 if v_0.Op != OpConst64 {
3752 continue
3753 }
3754 t := v_0.Type
3755 c := auxIntToInt64(v_0.AuxInt)
3756 if v_1.Op != OpAnd64 {
3757 continue
3758 }
3759 _ = v_1.Args[1]
3760 v_1_0 := v_1.Args[0]
3761 v_1_1 := v_1.Args[1]
3762 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
3763 if v_1_0.Op != OpConst64 || v_1_0.Type != t {
3764 continue
3765 }
3766 d := auxIntToInt64(v_1_0.AuxInt)
3767 x := v_1_1
3768 v.reset(OpAnd64)
3769 v0 := b.NewValue0(v.Pos, OpConst64, t)
3770 v0.AuxInt = int64ToAuxInt(c & d)
3771 v.AddArg2(v0, x)
3772 return true
3773 }
3774 }
3775 break
3776 }
3777 return false
3778 }
3779 func rewriteValuegeneric_OpAnd8(v *Value) bool {
3780 v_1 := v.Args[1]
3781 v_0 := v.Args[0]
3782 b := v.Block
3783
3784
3785 for {
3786 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3787 if v_0.Op != OpConst8 {
3788 continue
3789 }
3790 c := auxIntToInt8(v_0.AuxInt)
3791 if v_1.Op != OpConst8 {
3792 continue
3793 }
3794 d := auxIntToInt8(v_1.AuxInt)
3795 v.reset(OpConst8)
3796 v.AuxInt = int8ToAuxInt(c & d)
3797 return true
3798 }
3799 break
3800 }
3801
3802
3803 for {
3804 t := v.Type
3805 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3806 if v_0.Op != OpCom8 {
3807 continue
3808 }
3809 x := v_0.Args[0]
3810 if v_1.Op != OpCom8 {
3811 continue
3812 }
3813 y := v_1.Args[0]
3814 v.reset(OpCom8)
3815 v0 := b.NewValue0(v.Pos, OpOr8, t)
3816 v0.AddArg2(x, y)
3817 v.AddArg(v0)
3818 return true
3819 }
3820 break
3821 }
3822
3823
3824
3825 for {
3826 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3827 if v_0.Op != OpConst8 {
3828 continue
3829 }
3830 m := auxIntToInt8(v_0.AuxInt)
3831 if v_1.Op != OpRsh8Ux64 {
3832 continue
3833 }
3834 _ = v_1.Args[1]
3835 v_1_1 := v_1.Args[1]
3836 if v_1_1.Op != OpConst64 {
3837 continue
3838 }
3839 c := auxIntToInt64(v_1_1.AuxInt)
3840 if !(c >= int64(8-ntz8(m))) {
3841 continue
3842 }
3843 v.reset(OpConst8)
3844 v.AuxInt = int8ToAuxInt(0)
3845 return true
3846 }
3847 break
3848 }
3849
3850
3851
3852 for {
3853 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3854 if v_0.Op != OpConst8 {
3855 continue
3856 }
3857 m := auxIntToInt8(v_0.AuxInt)
3858 if v_1.Op != OpLsh8x64 {
3859 continue
3860 }
3861 _ = v_1.Args[1]
3862 v_1_1 := v_1.Args[1]
3863 if v_1_1.Op != OpConst64 {
3864 continue
3865 }
3866 c := auxIntToInt64(v_1_1.AuxInt)
3867 if !(c >= int64(8-nlz8(m))) {
3868 continue
3869 }
3870 v.reset(OpConst8)
3871 v.AuxInt = int8ToAuxInt(0)
3872 return true
3873 }
3874 break
3875 }
3876
3877
3878 for {
3879 x := v_0
3880 if x != v_1 {
3881 break
3882 }
3883 v.copyOf(x)
3884 return true
3885 }
3886
3887
3888 for {
3889 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3890 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != -1 {
3891 continue
3892 }
3893 x := v_1
3894 v.copyOf(x)
3895 return true
3896 }
3897 break
3898 }
3899
3900
3901 for {
3902 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3903 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 {
3904 continue
3905 }
3906 v.reset(OpConst8)
3907 v.AuxInt = int8ToAuxInt(0)
3908 return true
3909 }
3910 break
3911 }
3912
3913
3914 for {
3915 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3916 if v_0.Op != OpCom8 {
3917 continue
3918 }
3919 x := v_0.Args[0]
3920 if x != v_1 {
3921 continue
3922 }
3923 v.reset(OpConst8)
3924 v.AuxInt = int8ToAuxInt(0)
3925 return true
3926 }
3927 break
3928 }
3929
3930
3931 for {
3932 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3933 x := v_0
3934 if v_1.Op != OpAnd8 {
3935 continue
3936 }
3937 _ = v_1.Args[1]
3938 v_1_0 := v_1.Args[0]
3939 v_1_1 := v_1.Args[1]
3940 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
3941 if x != v_1_0 {
3942 continue
3943 }
3944 y := v_1_1
3945 v.reset(OpAnd8)
3946 v.AddArg2(x, y)
3947 return true
3948 }
3949 }
3950 break
3951 }
3952
3953
3954
3955 for {
3956 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3957 if v_0.Op != OpAnd8 {
3958 continue
3959 }
3960 _ = v_0.Args[1]
3961 v_0_0 := v_0.Args[0]
3962 v_0_1 := v_0.Args[1]
3963 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
3964 i := v_0_0
3965 if i.Op != OpConst8 {
3966 continue
3967 }
3968 t := i.Type
3969 z := v_0_1
3970 x := v_1
3971 if !(z.Op != OpConst8 && x.Op != OpConst8) {
3972 continue
3973 }
3974 v.reset(OpAnd8)
3975 v0 := b.NewValue0(v.Pos, OpAnd8, t)
3976 v0.AddArg2(z, x)
3977 v.AddArg2(i, v0)
3978 return true
3979 }
3980 }
3981 break
3982 }
3983
3984
3985 for {
3986 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3987 if v_0.Op != OpConst8 {
3988 continue
3989 }
3990 t := v_0.Type
3991 c := auxIntToInt8(v_0.AuxInt)
3992 if v_1.Op != OpAnd8 {
3993 continue
3994 }
3995 _ = v_1.Args[1]
3996 v_1_0 := v_1.Args[0]
3997 v_1_1 := v_1.Args[1]
3998 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
3999 if v_1_0.Op != OpConst8 || v_1_0.Type != t {
4000 continue
4001 }
4002 d := auxIntToInt8(v_1_0.AuxInt)
4003 x := v_1_1
4004 v.reset(OpAnd8)
4005 v0 := b.NewValue0(v.Pos, OpConst8, t)
4006 v0.AuxInt = int8ToAuxInt(c & d)
4007 v.AddArg2(v0, x)
4008 return true
4009 }
4010 }
4011 break
4012 }
4013 return false
4014 }
4015 func rewriteValuegeneric_OpAndB(v *Value) bool {
4016 v_1 := v.Args[1]
4017 v_0 := v.Args[0]
4018 b := v.Block
4019
4020
4021
4022 for {
4023 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
4024 if v_0.Op != OpLeq64 {
4025 continue
4026 }
4027 x := v_0.Args[1]
4028 v_0_0 := v_0.Args[0]
4029 if v_0_0.Op != OpConst64 {
4030 continue
4031 }
4032 c := auxIntToInt64(v_0_0.AuxInt)
4033 if v_1.Op != OpLess64 {
4034 continue
4035 }
4036 _ = v_1.Args[1]
4037 if x != v_1.Args[0] {
4038 continue
4039 }
4040 v_1_1 := v_1.Args[1]
4041 if v_1_1.Op != OpConst64 {
4042 continue
4043 }
4044 d := auxIntToInt64(v_1_1.AuxInt)
4045 if !(d >= c) {
4046 continue
4047 }
4048 v.reset(OpLess64U)
4049 v0 := b.NewValue0(v.Pos, OpSub64, x.Type)
4050 v1 := b.NewValue0(v.Pos, OpConst64, x.Type)
4051 v1.AuxInt = int64ToAuxInt(c)
4052 v0.AddArg2(x, v1)
4053 v2 := b.NewValue0(v.Pos, OpConst64, x.Type)
4054 v2.AuxInt = int64ToAuxInt(d - c)
4055 v.AddArg2(v0, v2)
4056 return true
4057 }
4058 break
4059 }
4060
4061
4062
4063 for {
4064 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
4065 if v_0.Op != OpLeq64 {
4066 continue
4067 }
4068 x := v_0.Args[1]
4069 v_0_0 := v_0.Args[0]
4070 if v_0_0.Op != OpConst64 {
4071 continue
4072 }
4073 c := auxIntToInt64(v_0_0.AuxInt)
4074 if v_1.Op != OpLeq64 {
4075 continue
4076 }
4077 _ = v_1.Args[1]
4078 if x != v_1.Args[0] {
4079 continue
4080 }
4081 v_1_1 := v_1.Args[1]
4082 if v_1_1.Op != OpConst64 {
4083 continue
4084 }
4085 d := auxIntToInt64(v_1_1.AuxInt)
4086 if !(d >= c) {
4087 continue
4088 }
4089 v.reset(OpLeq64U)
4090 v0 := b.NewValue0(v.Pos, OpSub64, x.Type)
4091 v1 := b.NewValue0(v.Pos, OpConst64, x.Type)
4092 v1.AuxInt = int64ToAuxInt(c)
4093 v0.AddArg2(x, v1)
4094 v2 := b.NewValue0(v.Pos, OpConst64, x.Type)
4095 v2.AuxInt = int64ToAuxInt(d - c)
4096 v.AddArg2(v0, v2)
4097 return true
4098 }
4099 break
4100 }
4101
4102
4103
4104 for {
4105 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
4106 if v_0.Op != OpLeq32 {
4107 continue
4108 }
4109 x := v_0.Args[1]
4110 v_0_0 := v_0.Args[0]
4111 if v_0_0.Op != OpConst32 {
4112 continue
4113 }
4114 c := auxIntToInt32(v_0_0.AuxInt)
4115 if v_1.Op != OpLess32 {
4116 continue
4117 }
4118 _ = v_1.Args[1]
4119 if x != v_1.Args[0] {
4120 continue
4121 }
4122 v_1_1 := v_1.Args[1]
4123 if v_1_1.Op != OpConst32 {
4124 continue
4125 }
4126 d := auxIntToInt32(v_1_1.AuxInt)
4127 if !(d >= c) {
4128 continue
4129 }
4130 v.reset(OpLess32U)
4131 v0 := b.NewValue0(v.Pos, OpSub32, x.Type)
4132 v1 := b.NewValue0(v.Pos, OpConst32, x.Type)
4133 v1.AuxInt = int32ToAuxInt(c)
4134 v0.AddArg2(x, v1)
4135 v2 := b.NewValue0(v.Pos, OpConst32, x.Type)
4136 v2.AuxInt = int32ToAuxInt(d - c)
4137 v.AddArg2(v0, v2)
4138 return true
4139 }
4140 break
4141 }
4142
4143
4144
4145 for {
4146 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
4147 if v_0.Op != OpLeq32 {
4148 continue
4149 }
4150 x := v_0.Args[1]
4151 v_0_0 := v_0.Args[0]
4152 if v_0_0.Op != OpConst32 {
4153 continue
4154 }
4155 c := auxIntToInt32(v_0_0.AuxInt)
4156 if v_1.Op != OpLeq32 {
4157 continue
4158 }
4159 _ = v_1.Args[1]
4160 if x != v_1.Args[0] {
4161 continue
4162 }
4163 v_1_1 := v_1.Args[1]
4164 if v_1_1.Op != OpConst32 {
4165 continue
4166 }
4167 d := auxIntToInt32(v_1_1.AuxInt)
4168 if !(d >= c) {
4169 continue
4170 }
4171 v.reset(OpLeq32U)
4172 v0 := b.NewValue0(v.Pos, OpSub32, x.Type)
4173 v1 := b.NewValue0(v.Pos, OpConst32, x.Type)
4174 v1.AuxInt = int32ToAuxInt(c)
4175 v0.AddArg2(x, v1)
4176 v2 := b.NewValue0(v.Pos, OpConst32, x.Type)
4177 v2.AuxInt = int32ToAuxInt(d - c)
4178 v.AddArg2(v0, v2)
4179 return true
4180 }
4181 break
4182 }
4183
4184
4185
4186 for {
4187 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
4188 if v_0.Op != OpLeq16 {
4189 continue
4190 }
4191 x := v_0.Args[1]
4192 v_0_0 := v_0.Args[0]
4193 if v_0_0.Op != OpConst16 {
4194 continue
4195 }
4196 c := auxIntToInt16(v_0_0.AuxInt)
4197 if v_1.Op != OpLess16 {
4198 continue
4199 }
4200 _ = v_1.Args[1]
4201 if x != v_1.Args[0] {
4202 continue
4203 }
4204 v_1_1 := v_1.Args[1]
4205 if v_1_1.Op != OpConst16 {
4206 continue
4207 }
4208 d := auxIntToInt16(v_1_1.AuxInt)
4209 if !(d >= c) {
4210 continue
4211 }
4212 v.reset(OpLess16U)
4213 v0 := b.NewValue0(v.Pos, OpSub16, x.Type)
4214 v1 := b.NewValue0(v.Pos, OpConst16, x.Type)
4215 v1.AuxInt = int16ToAuxInt(c)
4216 v0.AddArg2(x, v1)
4217 v2 := b.NewValue0(v.Pos, OpConst16, x.Type)
4218 v2.AuxInt = int16ToAuxInt(d - c)
4219 v.AddArg2(v0, v2)
4220 return true
4221 }
4222 break
4223 }
4224
4225
4226
4227 for {
4228 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
4229 if v_0.Op != OpLeq16 {
4230 continue
4231 }
4232 x := v_0.Args[1]
4233 v_0_0 := v_0.Args[0]
4234 if v_0_0.Op != OpConst16 {
4235 continue
4236 }
4237 c := auxIntToInt16(v_0_0.AuxInt)
4238 if v_1.Op != OpLeq16 {
4239 continue
4240 }
4241 _ = v_1.Args[1]
4242 if x != v_1.Args[0] {
4243 continue
4244 }
4245 v_1_1 := v_1.Args[1]
4246 if v_1_1.Op != OpConst16 {
4247 continue
4248 }
4249 d := auxIntToInt16(v_1_1.AuxInt)
4250 if !(d >= c) {
4251 continue
4252 }
4253 v.reset(OpLeq16U)
4254 v0 := b.NewValue0(v.Pos, OpSub16, x.Type)
4255 v1 := b.NewValue0(v.Pos, OpConst16, x.Type)
4256 v1.AuxInt = int16ToAuxInt(c)
4257 v0.AddArg2(x, v1)
4258 v2 := b.NewValue0(v.Pos, OpConst16, x.Type)
4259 v2.AuxInt = int16ToAuxInt(d - c)
4260 v.AddArg2(v0, v2)
4261 return true
4262 }
4263 break
4264 }
4265
4266
4267
4268 for {
4269 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
4270 if v_0.Op != OpLeq8 {
4271 continue
4272 }
4273 x := v_0.Args[1]
4274 v_0_0 := v_0.Args[0]
4275 if v_0_0.Op != OpConst8 {
4276 continue
4277 }
4278 c := auxIntToInt8(v_0_0.AuxInt)
4279 if v_1.Op != OpLess8 {
4280 continue
4281 }
4282 _ = v_1.Args[1]
4283 if x != v_1.Args[0] {
4284 continue
4285 }
4286 v_1_1 := v_1.Args[1]
4287 if v_1_1.Op != OpConst8 {
4288 continue
4289 }
4290 d := auxIntToInt8(v_1_1.AuxInt)
4291 if !(d >= c) {
4292 continue
4293 }
4294 v.reset(OpLess8U)
4295 v0 := b.NewValue0(v.Pos, OpSub8, x.Type)
4296 v1 := b.NewValue0(v.Pos, OpConst8, x.Type)
4297 v1.AuxInt = int8ToAuxInt(c)
4298 v0.AddArg2(x, v1)
4299 v2 := b.NewValue0(v.Pos, OpConst8, x.Type)
4300 v2.AuxInt = int8ToAuxInt(d - c)
4301 v.AddArg2(v0, v2)
4302 return true
4303 }
4304 break
4305 }
4306
4307
4308
4309 for {
4310 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
4311 if v_0.Op != OpLeq8 {
4312 continue
4313 }
4314 x := v_0.Args[1]
4315 v_0_0 := v_0.Args[0]
4316 if v_0_0.Op != OpConst8 {
4317 continue
4318 }
4319 c := auxIntToInt8(v_0_0.AuxInt)
4320 if v_1.Op != OpLeq8 {
4321 continue
4322 }
4323 _ = v_1.Args[1]
4324 if x != v_1.Args[0] {
4325 continue
4326 }
4327 v_1_1 := v_1.Args[1]
4328 if v_1_1.Op != OpConst8 {
4329 continue
4330 }
4331 d := auxIntToInt8(v_1_1.AuxInt)
4332 if !(d >= c) {
4333 continue
4334 }
4335 v.reset(OpLeq8U)
4336 v0 := b.NewValue0(v.Pos, OpSub8, x.Type)
4337 v1 := b.NewValue0(v.Pos, OpConst8, x.Type)
4338 v1.AuxInt = int8ToAuxInt(c)
4339 v0.AddArg2(x, v1)
4340 v2 := b.NewValue0(v.Pos, OpConst8, x.Type)
4341 v2.AuxInt = int8ToAuxInt(d - c)
4342 v.AddArg2(v0, v2)
4343 return true
4344 }
4345 break
4346 }
4347
4348
4349
4350 for {
4351 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
4352 if v_0.Op != OpLess64 {
4353 continue
4354 }
4355 x := v_0.Args[1]
4356 v_0_0 := v_0.Args[0]
4357 if v_0_0.Op != OpConst64 {
4358 continue
4359 }
4360 c := auxIntToInt64(v_0_0.AuxInt)
4361 if v_1.Op != OpLess64 {
4362 continue
4363 }
4364 _ = v_1.Args[1]
4365 if x != v_1.Args[0] {
4366 continue
4367 }
4368 v_1_1 := v_1.Args[1]
4369 if v_1_1.Op != OpConst64 {
4370 continue
4371 }
4372 d := auxIntToInt64(v_1_1.AuxInt)
4373 if !(d >= c+1 && c+1 > c) {
4374 continue
4375 }
4376 v.reset(OpLess64U)
4377 v0 := b.NewValue0(v.Pos, OpSub64, x.Type)
4378 v1 := b.NewValue0(v.Pos, OpConst64, x.Type)
4379 v1.AuxInt = int64ToAuxInt(c + 1)
4380 v0.AddArg2(x, v1)
4381 v2 := b.NewValue0(v.Pos, OpConst64, x.Type)
4382 v2.AuxInt = int64ToAuxInt(d - c - 1)
4383 v.AddArg2(v0, v2)
4384 return true
4385 }
4386 break
4387 }
4388
4389
4390
4391 for {
4392 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
4393 if v_0.Op != OpLess64 {
4394 continue
4395 }
4396 x := v_0.Args[1]
4397 v_0_0 := v_0.Args[0]
4398 if v_0_0.Op != OpConst64 {
4399 continue
4400 }
4401 c := auxIntToInt64(v_0_0.AuxInt)
4402 if v_1.Op != OpLeq64 {
4403 continue
4404 }
4405 _ = v_1.Args[1]
4406 if x != v_1.Args[0] {
4407 continue
4408 }
4409 v_1_1 := v_1.Args[1]
4410 if v_1_1.Op != OpConst64 {
4411 continue
4412 }
4413 d := auxIntToInt64(v_1_1.AuxInt)
4414 if !(d >= c+1 && c+1 > c) {
4415 continue
4416 }
4417 v.reset(OpLeq64U)
4418 v0 := b.NewValue0(v.Pos, OpSub64, x.Type)
4419 v1 := b.NewValue0(v.Pos, OpConst64, x.Type)
4420 v1.AuxInt = int64ToAuxInt(c + 1)
4421 v0.AddArg2(x, v1)
4422 v2 := b.NewValue0(v.Pos, OpConst64, x.Type)
4423 v2.AuxInt = int64ToAuxInt(d - c - 1)
4424 v.AddArg2(v0, v2)
4425 return true
4426 }
4427 break
4428 }
4429
4430
4431
4432 for {
4433 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
4434 if v_0.Op != OpLess32 {
4435 continue
4436 }
4437 x := v_0.Args[1]
4438 v_0_0 := v_0.Args[0]
4439 if v_0_0.Op != OpConst32 {
4440 continue
4441 }
4442 c := auxIntToInt32(v_0_0.AuxInt)
4443 if v_1.Op != OpLess32 {
4444 continue
4445 }
4446 _ = v_1.Args[1]
4447 if x != v_1.Args[0] {
4448 continue
4449 }
4450 v_1_1 := v_1.Args[1]
4451 if v_1_1.Op != OpConst32 {
4452 continue
4453 }
4454 d := auxIntToInt32(v_1_1.AuxInt)
4455 if !(d >= c+1 && c+1 > c) {
4456 continue
4457 }
4458 v.reset(OpLess32U)
4459 v0 := b.NewValue0(v.Pos, OpSub32, x.Type)
4460 v1 := b.NewValue0(v.Pos, OpConst32, x.Type)
4461 v1.AuxInt = int32ToAuxInt(c + 1)
4462 v0.AddArg2(x, v1)
4463 v2 := b.NewValue0(v.Pos, OpConst32, x.Type)
4464 v2.AuxInt = int32ToAuxInt(d - c - 1)
4465 v.AddArg2(v0, v2)
4466 return true
4467 }
4468 break
4469 }
4470
4471
4472
4473 for {
4474 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
4475 if v_0.Op != OpLess32 {
4476 continue
4477 }
4478 x := v_0.Args[1]
4479 v_0_0 := v_0.Args[0]
4480 if v_0_0.Op != OpConst32 {
4481 continue
4482 }
4483 c := auxIntToInt32(v_0_0.AuxInt)
4484 if v_1.Op != OpLeq32 {
4485 continue
4486 }
4487 _ = v_1.Args[1]
4488 if x != v_1.Args[0] {
4489 continue
4490 }
4491 v_1_1 := v_1.Args[1]
4492 if v_1_1.Op != OpConst32 {
4493 continue
4494 }
4495 d := auxIntToInt32(v_1_1.AuxInt)
4496 if !(d >= c+1 && c+1 > c) {
4497 continue
4498 }
4499 v.reset(OpLeq32U)
4500 v0 := b.NewValue0(v.Pos, OpSub32, x.Type)
4501 v1 := b.NewValue0(v.Pos, OpConst32, x.Type)
4502 v1.AuxInt = int32ToAuxInt(c + 1)
4503 v0.AddArg2(x, v1)
4504 v2 := b.NewValue0(v.Pos, OpConst32, x.Type)
4505 v2.AuxInt = int32ToAuxInt(d - c - 1)
4506 v.AddArg2(v0, v2)
4507 return true
4508 }
4509 break
4510 }
4511
4512
4513
4514 for {
4515 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
4516 if v_0.Op != OpLess16 {
4517 continue
4518 }
4519 x := v_0.Args[1]
4520 v_0_0 := v_0.Args[0]
4521 if v_0_0.Op != OpConst16 {
4522 continue
4523 }
4524 c := auxIntToInt16(v_0_0.AuxInt)
4525 if v_1.Op != OpLess16 {
4526 continue
4527 }
4528 _ = v_1.Args[1]
4529 if x != v_1.Args[0] {
4530 continue
4531 }
4532 v_1_1 := v_1.Args[1]
4533 if v_1_1.Op != OpConst16 {
4534 continue
4535 }
4536 d := auxIntToInt16(v_1_1.AuxInt)
4537 if !(d >= c+1 && c+1 > c) {
4538 continue
4539 }
4540 v.reset(OpLess16U)
4541 v0 := b.NewValue0(v.Pos, OpSub16, x.Type)
4542 v1 := b.NewValue0(v.Pos, OpConst16, x.Type)
4543 v1.AuxInt = int16ToAuxInt(c + 1)
4544 v0.AddArg2(x, v1)
4545 v2 := b.NewValue0(v.Pos, OpConst16, x.Type)
4546 v2.AuxInt = int16ToAuxInt(d - c - 1)
4547 v.AddArg2(v0, v2)
4548 return true
4549 }
4550 break
4551 }
4552
4553
4554
4555 for {
4556 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
4557 if v_0.Op != OpLess16 {
4558 continue
4559 }
4560 x := v_0.Args[1]
4561 v_0_0 := v_0.Args[0]
4562 if v_0_0.Op != OpConst16 {
4563 continue
4564 }
4565 c := auxIntToInt16(v_0_0.AuxInt)
4566 if v_1.Op != OpLeq16 {
4567 continue
4568 }
4569 _ = v_1.Args[1]
4570 if x != v_1.Args[0] {
4571 continue
4572 }
4573 v_1_1 := v_1.Args[1]
4574 if v_1_1.Op != OpConst16 {
4575 continue
4576 }
4577 d := auxIntToInt16(v_1_1.AuxInt)
4578 if !(d >= c+1 && c+1 > c) {
4579 continue
4580 }
4581 v.reset(OpLeq16U)
4582 v0 := b.NewValue0(v.Pos, OpSub16, x.Type)
4583 v1 := b.NewValue0(v.Pos, OpConst16, x.Type)
4584 v1.AuxInt = int16ToAuxInt(c + 1)
4585 v0.AddArg2(x, v1)
4586 v2 := b.NewValue0(v.Pos, OpConst16, x.Type)
4587 v2.AuxInt = int16ToAuxInt(d - c - 1)
4588 v.AddArg2(v0, v2)
4589 return true
4590 }
4591 break
4592 }
4593
4594
4595
4596 for {
4597 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
4598 if v_0.Op != OpLess8 {
4599 continue
4600 }
4601 x := v_0.Args[1]
4602 v_0_0 := v_0.Args[0]
4603 if v_0_0.Op != OpConst8 {
4604 continue
4605 }
4606 c := auxIntToInt8(v_0_0.AuxInt)
4607 if v_1.Op != OpLess8 {
4608 continue
4609 }
4610 _ = v_1.Args[1]
4611 if x != v_1.Args[0] {
4612 continue
4613 }
4614 v_1_1 := v_1.Args[1]
4615 if v_1_1.Op != OpConst8 {
4616 continue
4617 }
4618 d := auxIntToInt8(v_1_1.AuxInt)
4619 if !(d >= c+1 && c+1 > c) {
4620 continue
4621 }
4622 v.reset(OpLess8U)
4623 v0 := b.NewValue0(v.Pos, OpSub8, x.Type)
4624 v1 := b.NewValue0(v.Pos, OpConst8, x.Type)
4625 v1.AuxInt = int8ToAuxInt(c + 1)
4626 v0.AddArg2(x, v1)
4627 v2 := b.NewValue0(v.Pos, OpConst8, x.Type)
4628 v2.AuxInt = int8ToAuxInt(d - c - 1)
4629 v.AddArg2(v0, v2)
4630 return true
4631 }
4632 break
4633 }
4634
4635
4636
4637 for {
4638 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
4639 if v_0.Op != OpLess8 {
4640 continue
4641 }
4642 x := v_0.Args[1]
4643 v_0_0 := v_0.Args[0]
4644 if v_0_0.Op != OpConst8 {
4645 continue
4646 }
4647 c := auxIntToInt8(v_0_0.AuxInt)
4648 if v_1.Op != OpLeq8 {
4649 continue
4650 }
4651 _ = v_1.Args[1]
4652 if x != v_1.Args[0] {
4653 continue
4654 }
4655 v_1_1 := v_1.Args[1]
4656 if v_1_1.Op != OpConst8 {
4657 continue
4658 }
4659 d := auxIntToInt8(v_1_1.AuxInt)
4660 if !(d >= c+1 && c+1 > c) {
4661 continue
4662 }
4663 v.reset(OpLeq8U)
4664 v0 := b.NewValue0(v.Pos, OpSub8, x.Type)
4665 v1 := b.NewValue0(v.Pos, OpConst8, x.Type)
4666 v1.AuxInt = int8ToAuxInt(c + 1)
4667 v0.AddArg2(x, v1)
4668 v2 := b.NewValue0(v.Pos, OpConst8, x.Type)
4669 v2.AuxInt = int8ToAuxInt(d - c - 1)
4670 v.AddArg2(v0, v2)
4671 return true
4672 }
4673 break
4674 }
4675
4676
4677
4678 for {
4679 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
4680 if v_0.Op != OpLeq64U {
4681 continue
4682 }
4683 x := v_0.Args[1]
4684 v_0_0 := v_0.Args[0]
4685 if v_0_0.Op != OpConst64 {
4686 continue
4687 }
4688 c := auxIntToInt64(v_0_0.AuxInt)
4689 if v_1.Op != OpLess64U {
4690 continue
4691 }
4692 _ = v_1.Args[1]
4693 if x != v_1.Args[0] {
4694 continue
4695 }
4696 v_1_1 := v_1.Args[1]
4697 if v_1_1.Op != OpConst64 {
4698 continue
4699 }
4700 d := auxIntToInt64(v_1_1.AuxInt)
4701 if !(uint64(d) >= uint64(c)) {
4702 continue
4703 }
4704 v.reset(OpLess64U)
4705 v0 := b.NewValue0(v.Pos, OpSub64, x.Type)
4706 v1 := b.NewValue0(v.Pos, OpConst64, x.Type)
4707 v1.AuxInt = int64ToAuxInt(c)
4708 v0.AddArg2(x, v1)
4709 v2 := b.NewValue0(v.Pos, OpConst64, x.Type)
4710 v2.AuxInt = int64ToAuxInt(d - c)
4711 v.AddArg2(v0, v2)
4712 return true
4713 }
4714 break
4715 }
4716
4717
4718
4719 for {
4720 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
4721 if v_0.Op != OpLeq64U {
4722 continue
4723 }
4724 x := v_0.Args[1]
4725 v_0_0 := v_0.Args[0]
4726 if v_0_0.Op != OpConst64 {
4727 continue
4728 }
4729 c := auxIntToInt64(v_0_0.AuxInt)
4730 if v_1.Op != OpLeq64U {
4731 continue
4732 }
4733 _ = v_1.Args[1]
4734 if x != v_1.Args[0] {
4735 continue
4736 }
4737 v_1_1 := v_1.Args[1]
4738 if v_1_1.Op != OpConst64 {
4739 continue
4740 }
4741 d := auxIntToInt64(v_1_1.AuxInt)
4742 if !(uint64(d) >= uint64(c)) {
4743 continue
4744 }
4745 v.reset(OpLeq64U)
4746 v0 := b.NewValue0(v.Pos, OpSub64, x.Type)
4747 v1 := b.NewValue0(v.Pos, OpConst64, x.Type)
4748 v1.AuxInt = int64ToAuxInt(c)
4749 v0.AddArg2(x, v1)
4750 v2 := b.NewValue0(v.Pos, OpConst64, x.Type)
4751 v2.AuxInt = int64ToAuxInt(d - c)
4752 v.AddArg2(v0, v2)
4753 return true
4754 }
4755 break
4756 }
4757
4758
4759
4760 for {
4761 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
4762 if v_0.Op != OpLeq32U {
4763 continue
4764 }
4765 x := v_0.Args[1]
4766 v_0_0 := v_0.Args[0]
4767 if v_0_0.Op != OpConst32 {
4768 continue
4769 }
4770 c := auxIntToInt32(v_0_0.AuxInt)
4771 if v_1.Op != OpLess32U {
4772 continue
4773 }
4774 _ = v_1.Args[1]
4775 if x != v_1.Args[0] {
4776 continue
4777 }
4778 v_1_1 := v_1.Args[1]
4779 if v_1_1.Op != OpConst32 {
4780 continue
4781 }
4782 d := auxIntToInt32(v_1_1.AuxInt)
4783 if !(uint32(d) >= uint32(c)) {
4784 continue
4785 }
4786 v.reset(OpLess32U)
4787 v0 := b.NewValue0(v.Pos, OpSub32, x.Type)
4788 v1 := b.NewValue0(v.Pos, OpConst32, x.Type)
4789 v1.AuxInt = int32ToAuxInt(c)
4790 v0.AddArg2(x, v1)
4791 v2 := b.NewValue0(v.Pos, OpConst32, x.Type)
4792 v2.AuxInt = int32ToAuxInt(d - c)
4793 v.AddArg2(v0, v2)
4794 return true
4795 }
4796 break
4797 }
4798
4799
4800
4801 for {
4802 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
4803 if v_0.Op != OpLeq32U {
4804 continue
4805 }
4806 x := v_0.Args[1]
4807 v_0_0 := v_0.Args[0]
4808 if v_0_0.Op != OpConst32 {
4809 continue
4810 }
4811 c := auxIntToInt32(v_0_0.AuxInt)
4812 if v_1.Op != OpLeq32U {
4813 continue
4814 }
4815 _ = v_1.Args[1]
4816 if x != v_1.Args[0] {
4817 continue
4818 }
4819 v_1_1 := v_1.Args[1]
4820 if v_1_1.Op != OpConst32 {
4821 continue
4822 }
4823 d := auxIntToInt32(v_1_1.AuxInt)
4824 if !(uint32(d) >= uint32(c)) {
4825 continue
4826 }
4827 v.reset(OpLeq32U)
4828 v0 := b.NewValue0(v.Pos, OpSub32, x.Type)
4829 v1 := b.NewValue0(v.Pos, OpConst32, x.Type)
4830 v1.AuxInt = int32ToAuxInt(c)
4831 v0.AddArg2(x, v1)
4832 v2 := b.NewValue0(v.Pos, OpConst32, x.Type)
4833 v2.AuxInt = int32ToAuxInt(d - c)
4834 v.AddArg2(v0, v2)
4835 return true
4836 }
4837 break
4838 }
4839
4840
4841
4842 for {
4843 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
4844 if v_0.Op != OpLeq16U {
4845 continue
4846 }
4847 x := v_0.Args[1]
4848 v_0_0 := v_0.Args[0]
4849 if v_0_0.Op != OpConst16 {
4850 continue
4851 }
4852 c := auxIntToInt16(v_0_0.AuxInt)
4853 if v_1.Op != OpLess16U {
4854 continue
4855 }
4856 _ = v_1.Args[1]
4857 if x != v_1.Args[0] {
4858 continue
4859 }
4860 v_1_1 := v_1.Args[1]
4861 if v_1_1.Op != OpConst16 {
4862 continue
4863 }
4864 d := auxIntToInt16(v_1_1.AuxInt)
4865 if !(uint16(d) >= uint16(c)) {
4866 continue
4867 }
4868 v.reset(OpLess16U)
4869 v0 := b.NewValue0(v.Pos, OpSub16, x.Type)
4870 v1 := b.NewValue0(v.Pos, OpConst16, x.Type)
4871 v1.AuxInt = int16ToAuxInt(c)
4872 v0.AddArg2(x, v1)
4873 v2 := b.NewValue0(v.Pos, OpConst16, x.Type)
4874 v2.AuxInt = int16ToAuxInt(d - c)
4875 v.AddArg2(v0, v2)
4876 return true
4877 }
4878 break
4879 }
4880
4881
4882
4883 for {
4884 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
4885 if v_0.Op != OpLeq16U {
4886 continue
4887 }
4888 x := v_0.Args[1]
4889 v_0_0 := v_0.Args[0]
4890 if v_0_0.Op != OpConst16 {
4891 continue
4892 }
4893 c := auxIntToInt16(v_0_0.AuxInt)
4894 if v_1.Op != OpLeq16U {
4895 continue
4896 }
4897 _ = v_1.Args[1]
4898 if x != v_1.Args[0] {
4899 continue
4900 }
4901 v_1_1 := v_1.Args[1]
4902 if v_1_1.Op != OpConst16 {
4903 continue
4904 }
4905 d := auxIntToInt16(v_1_1.AuxInt)
4906 if !(uint16(d) >= uint16(c)) {
4907 continue
4908 }
4909 v.reset(OpLeq16U)
4910 v0 := b.NewValue0(v.Pos, OpSub16, x.Type)
4911 v1 := b.NewValue0(v.Pos, OpConst16, x.Type)
4912 v1.AuxInt = int16ToAuxInt(c)
4913 v0.AddArg2(x, v1)
4914 v2 := b.NewValue0(v.Pos, OpConst16, x.Type)
4915 v2.AuxInt = int16ToAuxInt(d - c)
4916 v.AddArg2(v0, v2)
4917 return true
4918 }
4919 break
4920 }
4921
4922
4923
4924 for {
4925 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
4926 if v_0.Op != OpLeq8U {
4927 continue
4928 }
4929 x := v_0.Args[1]
4930 v_0_0 := v_0.Args[0]
4931 if v_0_0.Op != OpConst8 {
4932 continue
4933 }
4934 c := auxIntToInt8(v_0_0.AuxInt)
4935 if v_1.Op != OpLess8U {
4936 continue
4937 }
4938 _ = v_1.Args[1]
4939 if x != v_1.Args[0] {
4940 continue
4941 }
4942 v_1_1 := v_1.Args[1]
4943 if v_1_1.Op != OpConst8 {
4944 continue
4945 }
4946 d := auxIntToInt8(v_1_1.AuxInt)
4947 if !(uint8(d) >= uint8(c)) {
4948 continue
4949 }
4950 v.reset(OpLess8U)
4951 v0 := b.NewValue0(v.Pos, OpSub8, x.Type)
4952 v1 := b.NewValue0(v.Pos, OpConst8, x.Type)
4953 v1.AuxInt = int8ToAuxInt(c)
4954 v0.AddArg2(x, v1)
4955 v2 := b.NewValue0(v.Pos, OpConst8, x.Type)
4956 v2.AuxInt = int8ToAuxInt(d - c)
4957 v.AddArg2(v0, v2)
4958 return true
4959 }
4960 break
4961 }
4962
4963
4964
4965 for {
4966 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
4967 if v_0.Op != OpLeq8U {
4968 continue
4969 }
4970 x := v_0.Args[1]
4971 v_0_0 := v_0.Args[0]
4972 if v_0_0.Op != OpConst8 {
4973 continue
4974 }
4975 c := auxIntToInt8(v_0_0.AuxInt)
4976 if v_1.Op != OpLeq8U {
4977 continue
4978 }
4979 _ = v_1.Args[1]
4980 if x != v_1.Args[0] {
4981 continue
4982 }
4983 v_1_1 := v_1.Args[1]
4984 if v_1_1.Op != OpConst8 {
4985 continue
4986 }
4987 d := auxIntToInt8(v_1_1.AuxInt)
4988 if !(uint8(d) >= uint8(c)) {
4989 continue
4990 }
4991 v.reset(OpLeq8U)
4992 v0 := b.NewValue0(v.Pos, OpSub8, x.Type)
4993 v1 := b.NewValue0(v.Pos, OpConst8, x.Type)
4994 v1.AuxInt = int8ToAuxInt(c)
4995 v0.AddArg2(x, v1)
4996 v2 := b.NewValue0(v.Pos, OpConst8, x.Type)
4997 v2.AuxInt = int8ToAuxInt(d - c)
4998 v.AddArg2(v0, v2)
4999 return true
5000 }
5001 break
5002 }
5003
5004
5005
5006 for {
5007 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
5008 if v_0.Op != OpLess64U {
5009 continue
5010 }
5011 x := v_0.Args[1]
5012 v_0_0 := v_0.Args[0]
5013 if v_0_0.Op != OpConst64 {
5014 continue
5015 }
5016 c := auxIntToInt64(v_0_0.AuxInt)
5017 if v_1.Op != OpLess64U {
5018 continue
5019 }
5020 _ = v_1.Args[1]
5021 if x != v_1.Args[0] {
5022 continue
5023 }
5024 v_1_1 := v_1.Args[1]
5025 if v_1_1.Op != OpConst64 {
5026 continue
5027 }
5028 d := auxIntToInt64(v_1_1.AuxInt)
5029 if !(uint64(d) >= uint64(c+1) && uint64(c+1) > uint64(c)) {
5030 continue
5031 }
5032 v.reset(OpLess64U)
5033 v0 := b.NewValue0(v.Pos, OpSub64, x.Type)
5034 v1 := b.NewValue0(v.Pos, OpConst64, x.Type)
5035 v1.AuxInt = int64ToAuxInt(c + 1)
5036 v0.AddArg2(x, v1)
5037 v2 := b.NewValue0(v.Pos, OpConst64, x.Type)
5038 v2.AuxInt = int64ToAuxInt(d - c - 1)
5039 v.AddArg2(v0, v2)
5040 return true
5041 }
5042 break
5043 }
5044
5045
5046
5047 for {
5048 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
5049 if v_0.Op != OpLess64U {
5050 continue
5051 }
5052 x := v_0.Args[1]
5053 v_0_0 := v_0.Args[0]
5054 if v_0_0.Op != OpConst64 {
5055 continue
5056 }
5057 c := auxIntToInt64(v_0_0.AuxInt)
5058 if v_1.Op != OpLeq64U {
5059 continue
5060 }
5061 _ = v_1.Args[1]
5062 if x != v_1.Args[0] {
5063 continue
5064 }
5065 v_1_1 := v_1.Args[1]
5066 if v_1_1.Op != OpConst64 {
5067 continue
5068 }
5069 d := auxIntToInt64(v_1_1.AuxInt)
5070 if !(uint64(d) >= uint64(c+1) && uint64(c+1) > uint64(c)) {
5071 continue
5072 }
5073 v.reset(OpLeq64U)
5074 v0 := b.NewValue0(v.Pos, OpSub64, x.Type)
5075 v1 := b.NewValue0(v.Pos, OpConst64, x.Type)
5076 v1.AuxInt = int64ToAuxInt(c + 1)
5077 v0.AddArg2(x, v1)
5078 v2 := b.NewValue0(v.Pos, OpConst64, x.Type)
5079 v2.AuxInt = int64ToAuxInt(d - c - 1)
5080 v.AddArg2(v0, v2)
5081 return true
5082 }
5083 break
5084 }
5085
5086
5087
5088 for {
5089 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
5090 if v_0.Op != OpLess32U {
5091 continue
5092 }
5093 x := v_0.Args[1]
5094 v_0_0 := v_0.Args[0]
5095 if v_0_0.Op != OpConst32 {
5096 continue
5097 }
5098 c := auxIntToInt32(v_0_0.AuxInt)
5099 if v_1.Op != OpLess32U {
5100 continue
5101 }
5102 _ = v_1.Args[1]
5103 if x != v_1.Args[0] {
5104 continue
5105 }
5106 v_1_1 := v_1.Args[1]
5107 if v_1_1.Op != OpConst32 {
5108 continue
5109 }
5110 d := auxIntToInt32(v_1_1.AuxInt)
5111 if !(uint32(d) >= uint32(c+1) && uint32(c+1) > uint32(c)) {
5112 continue
5113 }
5114 v.reset(OpLess32U)
5115 v0 := b.NewValue0(v.Pos, OpSub32, x.Type)
5116 v1 := b.NewValue0(v.Pos, OpConst32, x.Type)
5117 v1.AuxInt = int32ToAuxInt(c + 1)
5118 v0.AddArg2(x, v1)
5119 v2 := b.NewValue0(v.Pos, OpConst32, x.Type)
5120 v2.AuxInt = int32ToAuxInt(d - c - 1)
5121 v.AddArg2(v0, v2)
5122 return true
5123 }
5124 break
5125 }
5126
5127
5128
5129 for {
5130 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
5131 if v_0.Op != OpLess32U {
5132 continue
5133 }
5134 x := v_0.Args[1]
5135 v_0_0 := v_0.Args[0]
5136 if v_0_0.Op != OpConst32 {
5137 continue
5138 }
5139 c := auxIntToInt32(v_0_0.AuxInt)
5140 if v_1.Op != OpLeq32U {
5141 continue
5142 }
5143 _ = v_1.Args[1]
5144 if x != v_1.Args[0] {
5145 continue
5146 }
5147 v_1_1 := v_1.Args[1]
5148 if v_1_1.Op != OpConst32 {
5149 continue
5150 }
5151 d := auxIntToInt32(v_1_1.AuxInt)
5152 if !(uint32(d) >= uint32(c+1) && uint32(c+1) > uint32(c)) {
5153 continue
5154 }
5155 v.reset(OpLeq32U)
5156 v0 := b.NewValue0(v.Pos, OpSub32, x.Type)
5157 v1 := b.NewValue0(v.Pos, OpConst32, x.Type)
5158 v1.AuxInt = int32ToAuxInt(c + 1)
5159 v0.AddArg2(x, v1)
5160 v2 := b.NewValue0(v.Pos, OpConst32, x.Type)
5161 v2.AuxInt = int32ToAuxInt(d - c - 1)
5162 v.AddArg2(v0, v2)
5163 return true
5164 }
5165 break
5166 }
5167
5168
5169
5170 for {
5171 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
5172 if v_0.Op != OpLess16U {
5173 continue
5174 }
5175 x := v_0.Args[1]
5176 v_0_0 := v_0.Args[0]
5177 if v_0_0.Op != OpConst16 {
5178 continue
5179 }
5180 c := auxIntToInt16(v_0_0.AuxInt)
5181 if v_1.Op != OpLess16U {
5182 continue
5183 }
5184 _ = v_1.Args[1]
5185 if x != v_1.Args[0] {
5186 continue
5187 }
5188 v_1_1 := v_1.Args[1]
5189 if v_1_1.Op != OpConst16 {
5190 continue
5191 }
5192 d := auxIntToInt16(v_1_1.AuxInt)
5193 if !(uint16(d) >= uint16(c+1) && uint16(c+1) > uint16(c)) {
5194 continue
5195 }
5196 v.reset(OpLess16U)
5197 v0 := b.NewValue0(v.Pos, OpSub16, x.Type)
5198 v1 := b.NewValue0(v.Pos, OpConst16, x.Type)
5199 v1.AuxInt = int16ToAuxInt(c + 1)
5200 v0.AddArg2(x, v1)
5201 v2 := b.NewValue0(v.Pos, OpConst16, x.Type)
5202 v2.AuxInt = int16ToAuxInt(d - c - 1)
5203 v.AddArg2(v0, v2)
5204 return true
5205 }
5206 break
5207 }
5208
5209
5210
5211 for {
5212 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
5213 if v_0.Op != OpLess16U {
5214 continue
5215 }
5216 x := v_0.Args[1]
5217 v_0_0 := v_0.Args[0]
5218 if v_0_0.Op != OpConst16 {
5219 continue
5220 }
5221 c := auxIntToInt16(v_0_0.AuxInt)
5222 if v_1.Op != OpLeq16U {
5223 continue
5224 }
5225 _ = v_1.Args[1]
5226 if x != v_1.Args[0] {
5227 continue
5228 }
5229 v_1_1 := v_1.Args[1]
5230 if v_1_1.Op != OpConst16 {
5231 continue
5232 }
5233 d := auxIntToInt16(v_1_1.AuxInt)
5234 if !(uint16(d) >= uint16(c+1) && uint16(c+1) > uint16(c)) {
5235 continue
5236 }
5237 v.reset(OpLeq16U)
5238 v0 := b.NewValue0(v.Pos, OpSub16, x.Type)
5239 v1 := b.NewValue0(v.Pos, OpConst16, x.Type)
5240 v1.AuxInt = int16ToAuxInt(c + 1)
5241 v0.AddArg2(x, v1)
5242 v2 := b.NewValue0(v.Pos, OpConst16, x.Type)
5243 v2.AuxInt = int16ToAuxInt(d - c - 1)
5244 v.AddArg2(v0, v2)
5245 return true
5246 }
5247 break
5248 }
5249
5250
5251
5252 for {
5253 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
5254 if v_0.Op != OpLess8U {
5255 continue
5256 }
5257 x := v_0.Args[1]
5258 v_0_0 := v_0.Args[0]
5259 if v_0_0.Op != OpConst8 {
5260 continue
5261 }
5262 c := auxIntToInt8(v_0_0.AuxInt)
5263 if v_1.Op != OpLess8U {
5264 continue
5265 }
5266 _ = v_1.Args[1]
5267 if x != v_1.Args[0] {
5268 continue
5269 }
5270 v_1_1 := v_1.Args[1]
5271 if v_1_1.Op != OpConst8 {
5272 continue
5273 }
5274 d := auxIntToInt8(v_1_1.AuxInt)
5275 if !(uint8(d) >= uint8(c+1) && uint8(c+1) > uint8(c)) {
5276 continue
5277 }
5278 v.reset(OpLess8U)
5279 v0 := b.NewValue0(v.Pos, OpSub8, x.Type)
5280 v1 := b.NewValue0(v.Pos, OpConst8, x.Type)
5281 v1.AuxInt = int8ToAuxInt(c + 1)
5282 v0.AddArg2(x, v1)
5283 v2 := b.NewValue0(v.Pos, OpConst8, x.Type)
5284 v2.AuxInt = int8ToAuxInt(d - c - 1)
5285 v.AddArg2(v0, v2)
5286 return true
5287 }
5288 break
5289 }
5290
5291
5292
5293 for {
5294 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
5295 if v_0.Op != OpLess8U {
5296 continue
5297 }
5298 x := v_0.Args[1]
5299 v_0_0 := v_0.Args[0]
5300 if v_0_0.Op != OpConst8 {
5301 continue
5302 }
5303 c := auxIntToInt8(v_0_0.AuxInt)
5304 if v_1.Op != OpLeq8U {
5305 continue
5306 }
5307 _ = v_1.Args[1]
5308 if x != v_1.Args[0] {
5309 continue
5310 }
5311 v_1_1 := v_1.Args[1]
5312 if v_1_1.Op != OpConst8 {
5313 continue
5314 }
5315 d := auxIntToInt8(v_1_1.AuxInt)
5316 if !(uint8(d) >= uint8(c+1) && uint8(c+1) > uint8(c)) {
5317 continue
5318 }
5319 v.reset(OpLeq8U)
5320 v0 := b.NewValue0(v.Pos, OpSub8, x.Type)
5321 v1 := b.NewValue0(v.Pos, OpConst8, x.Type)
5322 v1.AuxInt = int8ToAuxInt(c + 1)
5323 v0.AddArg2(x, v1)
5324 v2 := b.NewValue0(v.Pos, OpConst8, x.Type)
5325 v2.AuxInt = int8ToAuxInt(d - c - 1)
5326 v.AddArg2(v0, v2)
5327 return true
5328 }
5329 break
5330 }
5331 return false
5332 }
5333 func rewriteValuegeneric_OpArraySelect(v *Value) bool {
5334 v_0 := v.Args[0]
5335
5336
5337 for {
5338 if v_0.Op != OpArrayMake1 {
5339 break
5340 }
5341 x := v_0.Args[0]
5342 v.copyOf(x)
5343 return true
5344 }
5345
5346
5347 for {
5348 if auxIntToInt64(v.AuxInt) != 0 || v_0.Op != OpIData {
5349 break
5350 }
5351 x := v_0.Args[0]
5352 v.reset(OpIData)
5353 v.AddArg(x)
5354 return true
5355 }
5356 return false
5357 }
5358 func rewriteValuegeneric_OpBitLen16(v *Value) bool {
5359 v_0 := v.Args[0]
5360 b := v.Block
5361 config := b.Func.Config
5362
5363
5364
5365 for {
5366 if v_0.Op != OpConst16 {
5367 break
5368 }
5369 c := auxIntToInt16(v_0.AuxInt)
5370 if !(config.PtrSize == 8) {
5371 break
5372 }
5373 v.reset(OpConst64)
5374 v.AuxInt = int64ToAuxInt(int64(bits.Len16(uint16(c))))
5375 return true
5376 }
5377
5378
5379
5380 for {
5381 if v_0.Op != OpConst16 {
5382 break
5383 }
5384 c := auxIntToInt16(v_0.AuxInt)
5385 if !(config.PtrSize == 4) {
5386 break
5387 }
5388 v.reset(OpConst32)
5389 v.AuxInt = int32ToAuxInt(int32(bits.Len16(uint16(c))))
5390 return true
5391 }
5392 return false
5393 }
5394 func rewriteValuegeneric_OpBitLen32(v *Value) bool {
5395 v_0 := v.Args[0]
5396 b := v.Block
5397 config := b.Func.Config
5398
5399
5400
5401 for {
5402 if v_0.Op != OpConst32 {
5403 break
5404 }
5405 c := auxIntToInt32(v_0.AuxInt)
5406 if !(config.PtrSize == 8) {
5407 break
5408 }
5409 v.reset(OpConst64)
5410 v.AuxInt = int64ToAuxInt(int64(bits.Len32(uint32(c))))
5411 return true
5412 }
5413
5414
5415
5416 for {
5417 if v_0.Op != OpConst32 {
5418 break
5419 }
5420 c := auxIntToInt32(v_0.AuxInt)
5421 if !(config.PtrSize == 4) {
5422 break
5423 }
5424 v.reset(OpConst32)
5425 v.AuxInt = int32ToAuxInt(int32(bits.Len32(uint32(c))))
5426 return true
5427 }
5428 return false
5429 }
5430 func rewriteValuegeneric_OpBitLen64(v *Value) bool {
5431 v_0 := v.Args[0]
5432 b := v.Block
5433 config := b.Func.Config
5434
5435
5436
5437 for {
5438 if v_0.Op != OpConst64 {
5439 break
5440 }
5441 c := auxIntToInt64(v_0.AuxInt)
5442 if !(config.PtrSize == 8) {
5443 break
5444 }
5445 v.reset(OpConst64)
5446 v.AuxInt = int64ToAuxInt(int64(bits.Len64(uint64(c))))
5447 return true
5448 }
5449
5450
5451
5452 for {
5453 if v_0.Op != OpConst64 {
5454 break
5455 }
5456 c := auxIntToInt64(v_0.AuxInt)
5457 if !(config.PtrSize == 4) {
5458 break
5459 }
5460 v.reset(OpConst32)
5461 v.AuxInt = int32ToAuxInt(int32(bits.Len64(uint64(c))))
5462 return true
5463 }
5464 return false
5465 }
5466 func rewriteValuegeneric_OpBitLen8(v *Value) bool {
5467 v_0 := v.Args[0]
5468 b := v.Block
5469 config := b.Func.Config
5470
5471
5472
5473 for {
5474 if v_0.Op != OpConst8 {
5475 break
5476 }
5477 c := auxIntToInt8(v_0.AuxInt)
5478 if !(config.PtrSize == 8) {
5479 break
5480 }
5481 v.reset(OpConst64)
5482 v.AuxInt = int64ToAuxInt(int64(bits.Len8(uint8(c))))
5483 return true
5484 }
5485
5486
5487
5488 for {
5489 if v_0.Op != OpConst8 {
5490 break
5491 }
5492 c := auxIntToInt8(v_0.AuxInt)
5493 if !(config.PtrSize == 4) {
5494 break
5495 }
5496 v.reset(OpConst32)
5497 v.AuxInt = int32ToAuxInt(int32(bits.Len8(uint8(c))))
5498 return true
5499 }
5500 return false
5501 }
5502 func rewriteValuegeneric_OpCeil(v *Value) bool {
5503 v_0 := v.Args[0]
5504
5505
5506 for {
5507 if v_0.Op != OpConst64F {
5508 break
5509 }
5510 c := auxIntToFloat64(v_0.AuxInt)
5511 v.reset(OpConst64F)
5512 v.AuxInt = float64ToAuxInt(math.Ceil(c))
5513 return true
5514 }
5515 return false
5516 }
5517 func rewriteValuegeneric_OpCom16(v *Value) bool {
5518 v_0 := v.Args[0]
5519
5520
5521 for {
5522 if v_0.Op != OpCom16 {
5523 break
5524 }
5525 x := v_0.Args[0]
5526 v.copyOf(x)
5527 return true
5528 }
5529
5530
5531 for {
5532 if v_0.Op != OpConst16 {
5533 break
5534 }
5535 c := auxIntToInt16(v_0.AuxInt)
5536 v.reset(OpConst16)
5537 v.AuxInt = int16ToAuxInt(^c)
5538 return true
5539 }
5540
5541
5542 for {
5543 if v_0.Op != OpAdd16 {
5544 break
5545 }
5546 _ = v_0.Args[1]
5547 v_0_0 := v_0.Args[0]
5548 v_0_1 := v_0.Args[1]
5549 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
5550 if v_0_0.Op != OpConst16 || auxIntToInt16(v_0_0.AuxInt) != -1 {
5551 continue
5552 }
5553 x := v_0_1
5554 v.reset(OpNeg16)
5555 v.AddArg(x)
5556 return true
5557 }
5558 break
5559 }
5560 return false
5561 }
5562 func rewriteValuegeneric_OpCom32(v *Value) bool {
5563 v_0 := v.Args[0]
5564
5565
5566 for {
5567 if v_0.Op != OpCom32 {
5568 break
5569 }
5570 x := v_0.Args[0]
5571 v.copyOf(x)
5572 return true
5573 }
5574
5575
5576 for {
5577 if v_0.Op != OpConst32 {
5578 break
5579 }
5580 c := auxIntToInt32(v_0.AuxInt)
5581 v.reset(OpConst32)
5582 v.AuxInt = int32ToAuxInt(^c)
5583 return true
5584 }
5585
5586
5587 for {
5588 if v_0.Op != OpAdd32 {
5589 break
5590 }
5591 _ = v_0.Args[1]
5592 v_0_0 := v_0.Args[0]
5593 v_0_1 := v_0.Args[1]
5594 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
5595 if v_0_0.Op != OpConst32 || auxIntToInt32(v_0_0.AuxInt) != -1 {
5596 continue
5597 }
5598 x := v_0_1
5599 v.reset(OpNeg32)
5600 v.AddArg(x)
5601 return true
5602 }
5603 break
5604 }
5605 return false
5606 }
5607 func rewriteValuegeneric_OpCom64(v *Value) bool {
5608 v_0 := v.Args[0]
5609
5610
5611 for {
5612 if v_0.Op != OpCom64 {
5613 break
5614 }
5615 x := v_0.Args[0]
5616 v.copyOf(x)
5617 return true
5618 }
5619
5620
5621 for {
5622 if v_0.Op != OpConst64 {
5623 break
5624 }
5625 c := auxIntToInt64(v_0.AuxInt)
5626 v.reset(OpConst64)
5627 v.AuxInt = int64ToAuxInt(^c)
5628 return true
5629 }
5630
5631
5632 for {
5633 if v_0.Op != OpAdd64 {
5634 break
5635 }
5636 _ = v_0.Args[1]
5637 v_0_0 := v_0.Args[0]
5638 v_0_1 := v_0.Args[1]
5639 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
5640 if v_0_0.Op != OpConst64 || auxIntToInt64(v_0_0.AuxInt) != -1 {
5641 continue
5642 }
5643 x := v_0_1
5644 v.reset(OpNeg64)
5645 v.AddArg(x)
5646 return true
5647 }
5648 break
5649 }
5650 return false
5651 }
5652 func rewriteValuegeneric_OpCom8(v *Value) bool {
5653 v_0 := v.Args[0]
5654
5655
5656 for {
5657 if v_0.Op != OpCom8 {
5658 break
5659 }
5660 x := v_0.Args[0]
5661 v.copyOf(x)
5662 return true
5663 }
5664
5665
5666 for {
5667 if v_0.Op != OpConst8 {
5668 break
5669 }
5670 c := auxIntToInt8(v_0.AuxInt)
5671 v.reset(OpConst8)
5672 v.AuxInt = int8ToAuxInt(^c)
5673 return true
5674 }
5675
5676
5677 for {
5678 if v_0.Op != OpAdd8 {
5679 break
5680 }
5681 _ = v_0.Args[1]
5682 v_0_0 := v_0.Args[0]
5683 v_0_1 := v_0.Args[1]
5684 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
5685 if v_0_0.Op != OpConst8 || auxIntToInt8(v_0_0.AuxInt) != -1 {
5686 continue
5687 }
5688 x := v_0_1
5689 v.reset(OpNeg8)
5690 v.AddArg(x)
5691 return true
5692 }
5693 break
5694 }
5695 return false
5696 }
5697 func rewriteValuegeneric_OpConstInterface(v *Value) bool {
5698 b := v.Block
5699 typ := &b.Func.Config.Types
5700
5701
5702 for {
5703 v.reset(OpIMake)
5704 v0 := b.NewValue0(v.Pos, OpConstNil, typ.Uintptr)
5705 v1 := b.NewValue0(v.Pos, OpConstNil, typ.BytePtr)
5706 v.AddArg2(v0, v1)
5707 return true
5708 }
5709 }
5710 func rewriteValuegeneric_OpConstSlice(v *Value) bool {
5711 b := v.Block
5712 config := b.Func.Config
5713 typ := &b.Func.Config.Types
5714
5715
5716
5717 for {
5718 if !(config.PtrSize == 4) {
5719 break
5720 }
5721 v.reset(OpSliceMake)
5722 v0 := b.NewValue0(v.Pos, OpConstNil, v.Type.Elem().PtrTo())
5723 v1 := b.NewValue0(v.Pos, OpConst32, typ.Int)
5724 v1.AuxInt = int32ToAuxInt(0)
5725 v.AddArg3(v0, v1, v1)
5726 return true
5727 }
5728
5729
5730
5731 for {
5732 if !(config.PtrSize == 8) {
5733 break
5734 }
5735 v.reset(OpSliceMake)
5736 v0 := b.NewValue0(v.Pos, OpConstNil, v.Type.Elem().PtrTo())
5737 v1 := b.NewValue0(v.Pos, OpConst64, typ.Int)
5738 v1.AuxInt = int64ToAuxInt(0)
5739 v.AddArg3(v0, v1, v1)
5740 return true
5741 }
5742 return false
5743 }
5744 func rewriteValuegeneric_OpConstString(v *Value) bool {
5745 b := v.Block
5746 config := b.Func.Config
5747 fe := b.Func.fe
5748 typ := &b.Func.Config.Types
5749
5750
5751
5752 for {
5753 str := auxToString(v.Aux)
5754 if !(config.PtrSize == 4 && str == "") {
5755 break
5756 }
5757 v.reset(OpStringMake)
5758 v0 := b.NewValue0(v.Pos, OpConstNil, typ.BytePtr)
5759 v1 := b.NewValue0(v.Pos, OpConst32, typ.Int)
5760 v1.AuxInt = int32ToAuxInt(0)
5761 v.AddArg2(v0, v1)
5762 return true
5763 }
5764
5765
5766
5767 for {
5768 str := auxToString(v.Aux)
5769 if !(config.PtrSize == 8 && str == "") {
5770 break
5771 }
5772 v.reset(OpStringMake)
5773 v0 := b.NewValue0(v.Pos, OpConstNil, typ.BytePtr)
5774 v1 := b.NewValue0(v.Pos, OpConst64, typ.Int)
5775 v1.AuxInt = int64ToAuxInt(0)
5776 v.AddArg2(v0, v1)
5777 return true
5778 }
5779
5780
5781
5782 for {
5783 str := auxToString(v.Aux)
5784 if !(config.PtrSize == 4 && str != "") {
5785 break
5786 }
5787 v.reset(OpStringMake)
5788 v0 := b.NewValue0(v.Pos, OpAddr, typ.BytePtr)
5789 v0.Aux = symToAux(fe.StringData(str))
5790 v1 := b.NewValue0(v.Pos, OpSB, typ.Uintptr)
5791 v0.AddArg(v1)
5792 v2 := b.NewValue0(v.Pos, OpConst32, typ.Int)
5793 v2.AuxInt = int32ToAuxInt(int32(len(str)))
5794 v.AddArg2(v0, v2)
5795 return true
5796 }
5797
5798
5799
5800 for {
5801 str := auxToString(v.Aux)
5802 if !(config.PtrSize == 8 && str != "") {
5803 break
5804 }
5805 v.reset(OpStringMake)
5806 v0 := b.NewValue0(v.Pos, OpAddr, typ.BytePtr)
5807 v0.Aux = symToAux(fe.StringData(str))
5808 v1 := b.NewValue0(v.Pos, OpSB, typ.Uintptr)
5809 v0.AddArg(v1)
5810 v2 := b.NewValue0(v.Pos, OpConst64, typ.Int)
5811 v2.AuxInt = int64ToAuxInt(int64(len(str)))
5812 v.AddArg2(v0, v2)
5813 return true
5814 }
5815 return false
5816 }
5817 func rewriteValuegeneric_OpConvert(v *Value) bool {
5818 v_1 := v.Args[1]
5819 v_0 := v.Args[0]
5820 b := v.Block
5821
5822
5823 for {
5824 if v_0.Op != OpAdd64 {
5825 break
5826 }
5827 _ = v_0.Args[1]
5828 v_0_0 := v_0.Args[0]
5829 v_0_1 := v_0.Args[1]
5830 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
5831 if v_0_0.Op != OpConvert {
5832 continue
5833 }
5834 mem := v_0_0.Args[1]
5835 ptr := v_0_0.Args[0]
5836 off := v_0_1
5837 if mem != v_1 {
5838 continue
5839 }
5840 v.reset(OpAddPtr)
5841 v.AddArg2(ptr, off)
5842 return true
5843 }
5844 break
5845 }
5846
5847
5848 for {
5849 if v_0.Op != OpAdd32 {
5850 break
5851 }
5852 _ = v_0.Args[1]
5853 v_0_0 := v_0.Args[0]
5854 v_0_1 := v_0.Args[1]
5855 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
5856 if v_0_0.Op != OpConvert {
5857 continue
5858 }
5859 mem := v_0_0.Args[1]
5860 ptr := v_0_0.Args[0]
5861 off := v_0_1
5862 if mem != v_1 {
5863 continue
5864 }
5865 v.reset(OpAddPtr)
5866 v.AddArg2(ptr, off)
5867 return true
5868 }
5869 break
5870 }
5871
5872
5873 for {
5874 if v_0.Op != OpConvert {
5875 break
5876 }
5877 mem := v_0.Args[1]
5878 ptr := v_0.Args[0]
5879 if mem != v_1 {
5880 break
5881 }
5882 v.copyOf(ptr)
5883 return true
5884 }
5885
5886
5887 for {
5888 a := v_0
5889 if a.Op != OpAdd64 {
5890 break
5891 }
5892 _ = a.Args[1]
5893 a_0 := a.Args[0]
5894 a_1 := a.Args[1]
5895 for _i0 := 0; _i0 <= 1; _i0, a_0, a_1 = _i0+1, a_1, a_0 {
5896 if a_0.Op != OpAdd64 {
5897 continue
5898 }
5899 _ = a_0.Args[1]
5900 a_0_0 := a_0.Args[0]
5901 a_0_1 := a_0.Args[1]
5902 for _i1 := 0; _i1 <= 1; _i1, a_0_0, a_0_1 = _i1+1, a_0_1, a_0_0 {
5903 if a_0_0.Op != OpConvert {
5904 continue
5905 }
5906 mem := a_0_0.Args[1]
5907 ptr := a_0_0.Args[0]
5908 off1 := a_0_1
5909 off2 := a_1
5910 if mem != v_1 {
5911 continue
5912 }
5913 v.reset(OpAddPtr)
5914 v0 := b.NewValue0(v.Pos, OpAdd64, a.Type)
5915 v0.AddArg2(off1, off2)
5916 v.AddArg2(ptr, v0)
5917 return true
5918 }
5919 }
5920 break
5921 }
5922
5923
5924 for {
5925 a := v_0
5926 if a.Op != OpAdd32 {
5927 break
5928 }
5929 _ = a.Args[1]
5930 a_0 := a.Args[0]
5931 a_1 := a.Args[1]
5932 for _i0 := 0; _i0 <= 1; _i0, a_0, a_1 = _i0+1, a_1, a_0 {
5933 if a_0.Op != OpAdd32 {
5934 continue
5935 }
5936 _ = a_0.Args[1]
5937 a_0_0 := a_0.Args[0]
5938 a_0_1 := a_0.Args[1]
5939 for _i1 := 0; _i1 <= 1; _i1, a_0_0, a_0_1 = _i1+1, a_0_1, a_0_0 {
5940 if a_0_0.Op != OpConvert {
5941 continue
5942 }
5943 mem := a_0_0.Args[1]
5944 ptr := a_0_0.Args[0]
5945 off1 := a_0_1
5946 off2 := a_1
5947 if mem != v_1 {
5948 continue
5949 }
5950 v.reset(OpAddPtr)
5951 v0 := b.NewValue0(v.Pos, OpAdd32, a.Type)
5952 v0.AddArg2(off1, off2)
5953 v.AddArg2(ptr, v0)
5954 return true
5955 }
5956 }
5957 break
5958 }
5959 return false
5960 }
5961 func rewriteValuegeneric_OpCtz16(v *Value) bool {
5962 v_0 := v.Args[0]
5963 b := v.Block
5964 config := b.Func.Config
5965
5966
5967
5968 for {
5969 if v_0.Op != OpConst16 {
5970 break
5971 }
5972 c := auxIntToInt16(v_0.AuxInt)
5973 if !(config.PtrSize == 4) {
5974 break
5975 }
5976 v.reset(OpConst32)
5977 v.AuxInt = int32ToAuxInt(int32(ntz16(c)))
5978 return true
5979 }
5980
5981
5982
5983 for {
5984 if v_0.Op != OpConst16 {
5985 break
5986 }
5987 c := auxIntToInt16(v_0.AuxInt)
5988 if !(config.PtrSize == 8) {
5989 break
5990 }
5991 v.reset(OpConst64)
5992 v.AuxInt = int64ToAuxInt(int64(ntz16(c)))
5993 return true
5994 }
5995 return false
5996 }
5997 func rewriteValuegeneric_OpCtz32(v *Value) bool {
5998 v_0 := v.Args[0]
5999 b := v.Block
6000 config := b.Func.Config
6001
6002
6003
6004 for {
6005 if v_0.Op != OpConst32 {
6006 break
6007 }
6008 c := auxIntToInt32(v_0.AuxInt)
6009 if !(config.PtrSize == 4) {
6010 break
6011 }
6012 v.reset(OpConst32)
6013 v.AuxInt = int32ToAuxInt(int32(ntz32(c)))
6014 return true
6015 }
6016
6017
6018
6019 for {
6020 if v_0.Op != OpConst32 {
6021 break
6022 }
6023 c := auxIntToInt32(v_0.AuxInt)
6024 if !(config.PtrSize == 8) {
6025 break
6026 }
6027 v.reset(OpConst64)
6028 v.AuxInt = int64ToAuxInt(int64(ntz32(c)))
6029 return true
6030 }
6031 return false
6032 }
6033 func rewriteValuegeneric_OpCtz64(v *Value) bool {
6034 v_0 := v.Args[0]
6035 b := v.Block
6036 config := b.Func.Config
6037
6038
6039
6040 for {
6041 if v_0.Op != OpConst64 {
6042 break
6043 }
6044 c := auxIntToInt64(v_0.AuxInt)
6045 if !(config.PtrSize == 4) {
6046 break
6047 }
6048 v.reset(OpConst32)
6049 v.AuxInt = int32ToAuxInt(int32(ntz64(c)))
6050 return true
6051 }
6052
6053
6054
6055 for {
6056 if v_0.Op != OpConst64 {
6057 break
6058 }
6059 c := auxIntToInt64(v_0.AuxInt)
6060 if !(config.PtrSize == 8) {
6061 break
6062 }
6063 v.reset(OpConst64)
6064 v.AuxInt = int64ToAuxInt(int64(ntz64(c)))
6065 return true
6066 }
6067 return false
6068 }
6069 func rewriteValuegeneric_OpCtz8(v *Value) bool {
6070 v_0 := v.Args[0]
6071 b := v.Block
6072 config := b.Func.Config
6073
6074
6075
6076 for {
6077 if v_0.Op != OpConst8 {
6078 break
6079 }
6080 c := auxIntToInt8(v_0.AuxInt)
6081 if !(config.PtrSize == 4) {
6082 break
6083 }
6084 v.reset(OpConst32)
6085 v.AuxInt = int32ToAuxInt(int32(ntz8(c)))
6086 return true
6087 }
6088
6089
6090
6091 for {
6092 if v_0.Op != OpConst8 {
6093 break
6094 }
6095 c := auxIntToInt8(v_0.AuxInt)
6096 if !(config.PtrSize == 8) {
6097 break
6098 }
6099 v.reset(OpConst64)
6100 v.AuxInt = int64ToAuxInt(int64(ntz8(c)))
6101 return true
6102 }
6103 return false
6104 }
6105 func rewriteValuegeneric_OpCvt32Fto32(v *Value) bool {
6106 v_0 := v.Args[0]
6107
6108
6109 for {
6110 if v_0.Op != OpConst32F {
6111 break
6112 }
6113 c := auxIntToFloat32(v_0.AuxInt)
6114 v.reset(OpConst32)
6115 v.AuxInt = int32ToAuxInt(int32(c))
6116 return true
6117 }
6118 return false
6119 }
6120 func rewriteValuegeneric_OpCvt32Fto64(v *Value) bool {
6121 v_0 := v.Args[0]
6122
6123
6124 for {
6125 if v_0.Op != OpConst32F {
6126 break
6127 }
6128 c := auxIntToFloat32(v_0.AuxInt)
6129 v.reset(OpConst64)
6130 v.AuxInt = int64ToAuxInt(int64(c))
6131 return true
6132 }
6133 return false
6134 }
6135 func rewriteValuegeneric_OpCvt32Fto64F(v *Value) bool {
6136 v_0 := v.Args[0]
6137
6138
6139 for {
6140 if v_0.Op != OpConst32F {
6141 break
6142 }
6143 c := auxIntToFloat32(v_0.AuxInt)
6144 v.reset(OpConst64F)
6145 v.AuxInt = float64ToAuxInt(float64(c))
6146 return true
6147 }
6148 return false
6149 }
6150 func rewriteValuegeneric_OpCvt32to32F(v *Value) bool {
6151 v_0 := v.Args[0]
6152
6153
6154 for {
6155 if v_0.Op != OpConst32 {
6156 break
6157 }
6158 c := auxIntToInt32(v_0.AuxInt)
6159 v.reset(OpConst32F)
6160 v.AuxInt = float32ToAuxInt(float32(c))
6161 return true
6162 }
6163 return false
6164 }
6165 func rewriteValuegeneric_OpCvt32to64F(v *Value) bool {
6166 v_0 := v.Args[0]
6167
6168
6169 for {
6170 if v_0.Op != OpConst32 {
6171 break
6172 }
6173 c := auxIntToInt32(v_0.AuxInt)
6174 v.reset(OpConst64F)
6175 v.AuxInt = float64ToAuxInt(float64(c))
6176 return true
6177 }
6178 return false
6179 }
6180 func rewriteValuegeneric_OpCvt64Fto32(v *Value) bool {
6181 v_0 := v.Args[0]
6182
6183
6184 for {
6185 if v_0.Op != OpConst64F {
6186 break
6187 }
6188 c := auxIntToFloat64(v_0.AuxInt)
6189 v.reset(OpConst32)
6190 v.AuxInt = int32ToAuxInt(int32(c))
6191 return true
6192 }
6193 return false
6194 }
6195 func rewriteValuegeneric_OpCvt64Fto32F(v *Value) bool {
6196 v_0 := v.Args[0]
6197
6198
6199 for {
6200 if v_0.Op != OpConst64F {
6201 break
6202 }
6203 c := auxIntToFloat64(v_0.AuxInt)
6204 v.reset(OpConst32F)
6205 v.AuxInt = float32ToAuxInt(float32(c))
6206 return true
6207 }
6208
6209
6210
6211 for {
6212 sqrt0 := v_0
6213 if sqrt0.Op != OpSqrt {
6214 break
6215 }
6216 sqrt0_0 := sqrt0.Args[0]
6217 if sqrt0_0.Op != OpCvt32Fto64F {
6218 break
6219 }
6220 x := sqrt0_0.Args[0]
6221 if !(sqrt0.Uses == 1) {
6222 break
6223 }
6224 v.reset(OpSqrt32)
6225 v.AddArg(x)
6226 return true
6227 }
6228 return false
6229 }
6230 func rewriteValuegeneric_OpCvt64Fto64(v *Value) bool {
6231 v_0 := v.Args[0]
6232
6233
6234 for {
6235 if v_0.Op != OpConst64F {
6236 break
6237 }
6238 c := auxIntToFloat64(v_0.AuxInt)
6239 v.reset(OpConst64)
6240 v.AuxInt = int64ToAuxInt(int64(c))
6241 return true
6242 }
6243 return false
6244 }
6245 func rewriteValuegeneric_OpCvt64to32F(v *Value) bool {
6246 v_0 := v.Args[0]
6247
6248
6249 for {
6250 if v_0.Op != OpConst64 {
6251 break
6252 }
6253 c := auxIntToInt64(v_0.AuxInt)
6254 v.reset(OpConst32F)
6255 v.AuxInt = float32ToAuxInt(float32(c))
6256 return true
6257 }
6258 return false
6259 }
6260 func rewriteValuegeneric_OpCvt64to64F(v *Value) bool {
6261 v_0 := v.Args[0]
6262
6263
6264 for {
6265 if v_0.Op != OpConst64 {
6266 break
6267 }
6268 c := auxIntToInt64(v_0.AuxInt)
6269 v.reset(OpConst64F)
6270 v.AuxInt = float64ToAuxInt(float64(c))
6271 return true
6272 }
6273 return false
6274 }
6275 func rewriteValuegeneric_OpCvtBoolToUint8(v *Value) bool {
6276 v_0 := v.Args[0]
6277
6278
6279 for {
6280 if v_0.Op != OpConstBool || auxIntToBool(v_0.AuxInt) != false {
6281 break
6282 }
6283 v.reset(OpConst8)
6284 v.AuxInt = int8ToAuxInt(0)
6285 return true
6286 }
6287
6288
6289 for {
6290 if v_0.Op != OpConstBool || auxIntToBool(v_0.AuxInt) != true {
6291 break
6292 }
6293 v.reset(OpConst8)
6294 v.AuxInt = int8ToAuxInt(1)
6295 return true
6296 }
6297 return false
6298 }
6299 func rewriteValuegeneric_OpDiv128u(v *Value) bool {
6300 v_2 := v.Args[2]
6301 v_1 := v.Args[1]
6302 v_0 := v.Args[0]
6303 b := v.Block
6304
6305
6306 for {
6307 t := v.Type
6308 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
6309 break
6310 }
6311 lo := v_1
6312 y := v_2
6313 v.reset(OpMakeTuple)
6314 v0 := b.NewValue0(v.Pos, OpDiv64u, t.FieldType(0))
6315 v0.AddArg2(lo, y)
6316 v1 := b.NewValue0(v.Pos, OpMod64u, t.FieldType(1))
6317 v1.AddArg2(lo, y)
6318 v.AddArg2(v0, v1)
6319 return true
6320 }
6321 return false
6322 }
6323 func rewriteValuegeneric_OpDiv16(v *Value) bool {
6324 v_1 := v.Args[1]
6325 v_0 := v.Args[0]
6326 b := v.Block
6327 typ := &b.Func.Config.Types
6328
6329
6330
6331 for {
6332 if v_0.Op != OpConst16 {
6333 break
6334 }
6335 c := auxIntToInt16(v_0.AuxInt)
6336 if v_1.Op != OpConst16 {
6337 break
6338 }
6339 d := auxIntToInt16(v_1.AuxInt)
6340 if !(d != 0) {
6341 break
6342 }
6343 v.reset(OpConst16)
6344 v.AuxInt = int16ToAuxInt(c / d)
6345 return true
6346 }
6347
6348
6349
6350 for {
6351 n := v_0
6352 if v_1.Op != OpConst16 {
6353 break
6354 }
6355 c := auxIntToInt16(v_1.AuxInt)
6356 if !(isNonNegative(n) && isPowerOfTwo(c)) {
6357 break
6358 }
6359 v.reset(OpRsh16Ux64)
6360 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
6361 v0.AuxInt = int64ToAuxInt(log16(c))
6362 v.AddArg2(n, v0)
6363 return true
6364 }
6365
6366
6367
6368 for {
6369 t := v.Type
6370 n := v_0
6371 if v_1.Op != OpConst16 {
6372 break
6373 }
6374 c := auxIntToInt16(v_1.AuxInt)
6375 if !(c < 0 && c != -1<<15) {
6376 break
6377 }
6378 v.reset(OpNeg16)
6379 v0 := b.NewValue0(v.Pos, OpDiv16, t)
6380 v1 := b.NewValue0(v.Pos, OpConst16, t)
6381 v1.AuxInt = int16ToAuxInt(-c)
6382 v0.AddArg2(n, v1)
6383 v.AddArg(v0)
6384 return true
6385 }
6386
6387
6388 for {
6389 t := v.Type
6390 x := v_0
6391 if v_1.Op != OpConst16 || auxIntToInt16(v_1.AuxInt) != -1<<15 {
6392 break
6393 }
6394 v.reset(OpRsh16Ux64)
6395 v0 := b.NewValue0(v.Pos, OpAnd16, t)
6396 v1 := b.NewValue0(v.Pos, OpNeg16, t)
6397 v1.AddArg(x)
6398 v0.AddArg2(x, v1)
6399 v2 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
6400 v2.AuxInt = int64ToAuxInt(15)
6401 v.AddArg2(v0, v2)
6402 return true
6403 }
6404
6405
6406
6407 for {
6408 t := v.Type
6409 n := v_0
6410 if v_1.Op != OpConst16 {
6411 break
6412 }
6413 c := auxIntToInt16(v_1.AuxInt)
6414 if !(isPowerOfTwo(c)) {
6415 break
6416 }
6417 v.reset(OpRsh16x64)
6418 v0 := b.NewValue0(v.Pos, OpAdd16, t)
6419 v1 := b.NewValue0(v.Pos, OpRsh16Ux64, t)
6420 v2 := b.NewValue0(v.Pos, OpRsh16x64, t)
6421 v3 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
6422 v3.AuxInt = int64ToAuxInt(15)
6423 v2.AddArg2(n, v3)
6424 v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
6425 v4.AuxInt = int64ToAuxInt(int64(16 - log16(c)))
6426 v1.AddArg2(v2, v4)
6427 v0.AddArg2(n, v1)
6428 v5 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
6429 v5.AuxInt = int64ToAuxInt(int64(log16(c)))
6430 v.AddArg2(v0, v5)
6431 return true
6432 }
6433
6434
6435
6436 for {
6437 t := v.Type
6438 x := v_0
6439 if v_1.Op != OpConst16 {
6440 break
6441 }
6442 c := auxIntToInt16(v_1.AuxInt)
6443 if !(smagicOK16(c)) {
6444 break
6445 }
6446 v.reset(OpSub16)
6447 v.Type = t
6448 v0 := b.NewValue0(v.Pos, OpRsh32x64, t)
6449 v1 := b.NewValue0(v.Pos, OpMul32, typ.UInt32)
6450 v2 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
6451 v2.AuxInt = int32ToAuxInt(int32(smagic16(c).m))
6452 v3 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
6453 v3.AddArg(x)
6454 v1.AddArg2(v2, v3)
6455 v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
6456 v4.AuxInt = int64ToAuxInt(16 + smagic16(c).s)
6457 v0.AddArg2(v1, v4)
6458 v5 := b.NewValue0(v.Pos, OpRsh32x64, t)
6459 v6 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
6460 v6.AuxInt = int64ToAuxInt(31)
6461 v5.AddArg2(v3, v6)
6462 v.AddArg2(v0, v5)
6463 return true
6464 }
6465 return false
6466 }
6467 func rewriteValuegeneric_OpDiv16u(v *Value) bool {
6468 v_1 := v.Args[1]
6469 v_0 := v.Args[0]
6470 b := v.Block
6471 config := b.Func.Config
6472 typ := &b.Func.Config.Types
6473
6474
6475
6476 for {
6477 if v_0.Op != OpConst16 {
6478 break
6479 }
6480 c := auxIntToInt16(v_0.AuxInt)
6481 if v_1.Op != OpConst16 {
6482 break
6483 }
6484 d := auxIntToInt16(v_1.AuxInt)
6485 if !(d != 0) {
6486 break
6487 }
6488 v.reset(OpConst16)
6489 v.AuxInt = int16ToAuxInt(int16(uint16(c) / uint16(d)))
6490 return true
6491 }
6492
6493
6494
6495 for {
6496 n := v_0
6497 if v_1.Op != OpConst16 {
6498 break
6499 }
6500 c := auxIntToInt16(v_1.AuxInt)
6501 if !(isPowerOfTwo(c)) {
6502 break
6503 }
6504 v.reset(OpRsh16Ux64)
6505 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
6506 v0.AuxInt = int64ToAuxInt(log16(c))
6507 v.AddArg2(n, v0)
6508 return true
6509 }
6510
6511
6512
6513 for {
6514 x := v_0
6515 if v_1.Op != OpConst16 {
6516 break
6517 }
6518 c := auxIntToInt16(v_1.AuxInt)
6519 if !(umagicOK16(c) && config.RegSize == 8) {
6520 break
6521 }
6522 v.reset(OpTrunc64to16)
6523 v0 := b.NewValue0(v.Pos, OpRsh64Ux64, typ.UInt64)
6524 v1 := b.NewValue0(v.Pos, OpMul64, typ.UInt64)
6525 v2 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
6526 v2.AuxInt = int64ToAuxInt(int64(1<<16 + umagic16(c).m))
6527 v3 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
6528 v3.AddArg(x)
6529 v1.AddArg2(v2, v3)
6530 v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
6531 v4.AuxInt = int64ToAuxInt(16 + umagic16(c).s)
6532 v0.AddArg2(v1, v4)
6533 v.AddArg(v0)
6534 return true
6535 }
6536
6537
6538
6539 for {
6540 x := v_0
6541 if v_1.Op != OpConst16 {
6542 break
6543 }
6544 c := auxIntToInt16(v_1.AuxInt)
6545 if !(umagicOK16(c) && config.RegSize == 4 && umagic16(c).m&1 == 0) {
6546 break
6547 }
6548 v.reset(OpTrunc32to16)
6549 v0 := b.NewValue0(v.Pos, OpRsh32Ux64, typ.UInt32)
6550 v1 := b.NewValue0(v.Pos, OpMul32, typ.UInt32)
6551 v2 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
6552 v2.AuxInt = int32ToAuxInt(int32(1<<15 + umagic16(c).m/2))
6553 v3 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
6554 v3.AddArg(x)
6555 v1.AddArg2(v2, v3)
6556 v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
6557 v4.AuxInt = int64ToAuxInt(16 + umagic16(c).s - 1)
6558 v0.AddArg2(v1, v4)
6559 v.AddArg(v0)
6560 return true
6561 }
6562
6563
6564
6565 for {
6566 x := v_0
6567 if v_1.Op != OpConst16 {
6568 break
6569 }
6570 c := auxIntToInt16(v_1.AuxInt)
6571 if !(umagicOK16(c) && config.RegSize == 4 && c&1 == 0) {
6572 break
6573 }
6574 v.reset(OpTrunc32to16)
6575 v0 := b.NewValue0(v.Pos, OpRsh32Ux64, typ.UInt32)
6576 v1 := b.NewValue0(v.Pos, OpMul32, typ.UInt32)
6577 v2 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
6578 v2.AuxInt = int32ToAuxInt(int32(1<<15 + (umagic16(c).m+1)/2))
6579 v3 := b.NewValue0(v.Pos, OpRsh32Ux64, typ.UInt32)
6580 v4 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
6581 v4.AddArg(x)
6582 v5 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
6583 v5.AuxInt = int64ToAuxInt(1)
6584 v3.AddArg2(v4, v5)
6585 v1.AddArg2(v2, v3)
6586 v6 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
6587 v6.AuxInt = int64ToAuxInt(16 + umagic16(c).s - 2)
6588 v0.AddArg2(v1, v6)
6589 v.AddArg(v0)
6590 return true
6591 }
6592
6593
6594
6595 for {
6596 x := v_0
6597 if v_1.Op != OpConst16 {
6598 break
6599 }
6600 c := auxIntToInt16(v_1.AuxInt)
6601 if !(umagicOK16(c) && config.RegSize == 4 && config.useAvg) {
6602 break
6603 }
6604 v.reset(OpTrunc32to16)
6605 v0 := b.NewValue0(v.Pos, OpRsh32Ux64, typ.UInt32)
6606 v1 := b.NewValue0(v.Pos, OpAvg32u, typ.UInt32)
6607 v2 := b.NewValue0(v.Pos, OpLsh32x64, typ.UInt32)
6608 v3 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
6609 v3.AddArg(x)
6610 v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
6611 v4.AuxInt = int64ToAuxInt(16)
6612 v2.AddArg2(v3, v4)
6613 v5 := b.NewValue0(v.Pos, OpMul32, typ.UInt32)
6614 v6 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
6615 v6.AuxInt = int32ToAuxInt(int32(umagic16(c).m))
6616 v5.AddArg2(v6, v3)
6617 v1.AddArg2(v2, v5)
6618 v7 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
6619 v7.AuxInt = int64ToAuxInt(16 + umagic16(c).s - 1)
6620 v0.AddArg2(v1, v7)
6621 v.AddArg(v0)
6622 return true
6623 }
6624 return false
6625 }
6626 func rewriteValuegeneric_OpDiv32(v *Value) bool {
6627 v_1 := v.Args[1]
6628 v_0 := v.Args[0]
6629 b := v.Block
6630 config := b.Func.Config
6631 typ := &b.Func.Config.Types
6632
6633
6634
6635 for {
6636 if v_0.Op != OpConst32 {
6637 break
6638 }
6639 c := auxIntToInt32(v_0.AuxInt)
6640 if v_1.Op != OpConst32 {
6641 break
6642 }
6643 d := auxIntToInt32(v_1.AuxInt)
6644 if !(d != 0) {
6645 break
6646 }
6647 v.reset(OpConst32)
6648 v.AuxInt = int32ToAuxInt(c / d)
6649 return true
6650 }
6651
6652
6653
6654 for {
6655 n := v_0
6656 if v_1.Op != OpConst32 {
6657 break
6658 }
6659 c := auxIntToInt32(v_1.AuxInt)
6660 if !(isNonNegative(n) && isPowerOfTwo(c)) {
6661 break
6662 }
6663 v.reset(OpRsh32Ux64)
6664 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
6665 v0.AuxInt = int64ToAuxInt(log32(c))
6666 v.AddArg2(n, v0)
6667 return true
6668 }
6669
6670
6671
6672 for {
6673 t := v.Type
6674 n := v_0
6675 if v_1.Op != OpConst32 {
6676 break
6677 }
6678 c := auxIntToInt32(v_1.AuxInt)
6679 if !(c < 0 && c != -1<<31) {
6680 break
6681 }
6682 v.reset(OpNeg32)
6683 v0 := b.NewValue0(v.Pos, OpDiv32, t)
6684 v1 := b.NewValue0(v.Pos, OpConst32, t)
6685 v1.AuxInt = int32ToAuxInt(-c)
6686 v0.AddArg2(n, v1)
6687 v.AddArg(v0)
6688 return true
6689 }
6690
6691
6692 for {
6693 t := v.Type
6694 x := v_0
6695 if v_1.Op != OpConst32 || auxIntToInt32(v_1.AuxInt) != -1<<31 {
6696 break
6697 }
6698 v.reset(OpRsh32Ux64)
6699 v0 := b.NewValue0(v.Pos, OpAnd32, t)
6700 v1 := b.NewValue0(v.Pos, OpNeg32, t)
6701 v1.AddArg(x)
6702 v0.AddArg2(x, v1)
6703 v2 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
6704 v2.AuxInt = int64ToAuxInt(31)
6705 v.AddArg2(v0, v2)
6706 return true
6707 }
6708
6709
6710
6711 for {
6712 t := v.Type
6713 n := v_0
6714 if v_1.Op != OpConst32 {
6715 break
6716 }
6717 c := auxIntToInt32(v_1.AuxInt)
6718 if !(isPowerOfTwo(c)) {
6719 break
6720 }
6721 v.reset(OpRsh32x64)
6722 v0 := b.NewValue0(v.Pos, OpAdd32, t)
6723 v1 := b.NewValue0(v.Pos, OpRsh32Ux64, t)
6724 v2 := b.NewValue0(v.Pos, OpRsh32x64, t)
6725 v3 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
6726 v3.AuxInt = int64ToAuxInt(31)
6727 v2.AddArg2(n, v3)
6728 v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
6729 v4.AuxInt = int64ToAuxInt(int64(32 - log32(c)))
6730 v1.AddArg2(v2, v4)
6731 v0.AddArg2(n, v1)
6732 v5 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
6733 v5.AuxInt = int64ToAuxInt(int64(log32(c)))
6734 v.AddArg2(v0, v5)
6735 return true
6736 }
6737
6738
6739
6740 for {
6741 t := v.Type
6742 x := v_0
6743 if v_1.Op != OpConst32 {
6744 break
6745 }
6746 c := auxIntToInt32(v_1.AuxInt)
6747 if !(smagicOK32(c) && config.RegSize == 8) {
6748 break
6749 }
6750 v.reset(OpSub32)
6751 v.Type = t
6752 v0 := b.NewValue0(v.Pos, OpRsh64x64, t)
6753 v1 := b.NewValue0(v.Pos, OpMul64, typ.UInt64)
6754 v2 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
6755 v2.AuxInt = int64ToAuxInt(int64(smagic32(c).m))
6756 v3 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
6757 v3.AddArg(x)
6758 v1.AddArg2(v2, v3)
6759 v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
6760 v4.AuxInt = int64ToAuxInt(32 + smagic32(c).s)
6761 v0.AddArg2(v1, v4)
6762 v5 := b.NewValue0(v.Pos, OpRsh64x64, t)
6763 v6 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
6764 v6.AuxInt = int64ToAuxInt(63)
6765 v5.AddArg2(v3, v6)
6766 v.AddArg2(v0, v5)
6767 return true
6768 }
6769
6770
6771
6772 for {
6773 t := v.Type
6774 x := v_0
6775 if v_1.Op != OpConst32 {
6776 break
6777 }
6778 c := auxIntToInt32(v_1.AuxInt)
6779 if !(smagicOK32(c) && config.RegSize == 4 && smagic32(c).m&1 == 0 && config.useHmul) {
6780 break
6781 }
6782 v.reset(OpSub32)
6783 v.Type = t
6784 v0 := b.NewValue0(v.Pos, OpRsh32x64, t)
6785 v1 := b.NewValue0(v.Pos, OpHmul32, t)
6786 v2 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
6787 v2.AuxInt = int32ToAuxInt(int32(smagic32(c).m / 2))
6788 v1.AddArg2(v2, x)
6789 v3 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
6790 v3.AuxInt = int64ToAuxInt(smagic32(c).s - 1)
6791 v0.AddArg2(v1, v3)
6792 v4 := b.NewValue0(v.Pos, OpRsh32x64, t)
6793 v5 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
6794 v5.AuxInt = int64ToAuxInt(31)
6795 v4.AddArg2(x, v5)
6796 v.AddArg2(v0, v4)
6797 return true
6798 }
6799
6800
6801
6802 for {
6803 t := v.Type
6804 x := v_0
6805 if v_1.Op != OpConst32 {
6806 break
6807 }
6808 c := auxIntToInt32(v_1.AuxInt)
6809 if !(smagicOK32(c) && config.RegSize == 4 && smagic32(c).m&1 != 0 && config.useHmul) {
6810 break
6811 }
6812 v.reset(OpSub32)
6813 v.Type = t
6814 v0 := b.NewValue0(v.Pos, OpRsh32x64, t)
6815 v1 := b.NewValue0(v.Pos, OpAdd32, t)
6816 v2 := b.NewValue0(v.Pos, OpHmul32, t)
6817 v3 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
6818 v3.AuxInt = int32ToAuxInt(int32(smagic32(c).m))
6819 v2.AddArg2(v3, x)
6820 v1.AddArg2(v2, x)
6821 v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
6822 v4.AuxInt = int64ToAuxInt(smagic32(c).s)
6823 v0.AddArg2(v1, v4)
6824 v5 := b.NewValue0(v.Pos, OpRsh32x64, t)
6825 v6 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
6826 v6.AuxInt = int64ToAuxInt(31)
6827 v5.AddArg2(x, v6)
6828 v.AddArg2(v0, v5)
6829 return true
6830 }
6831 return false
6832 }
6833 func rewriteValuegeneric_OpDiv32F(v *Value) bool {
6834 v_1 := v.Args[1]
6835 v_0 := v.Args[0]
6836 b := v.Block
6837
6838
6839
6840 for {
6841 if v_0.Op != OpConst32F {
6842 break
6843 }
6844 c := auxIntToFloat32(v_0.AuxInt)
6845 if v_1.Op != OpConst32F {
6846 break
6847 }
6848 d := auxIntToFloat32(v_1.AuxInt)
6849 if !(c/d == c/d) {
6850 break
6851 }
6852 v.reset(OpConst32F)
6853 v.AuxInt = float32ToAuxInt(c / d)
6854 return true
6855 }
6856
6857
6858
6859 for {
6860 x := v_0
6861 if v_1.Op != OpConst32F {
6862 break
6863 }
6864 t := v_1.Type
6865 c := auxIntToFloat32(v_1.AuxInt)
6866 if !(reciprocalExact32(c)) {
6867 break
6868 }
6869 v.reset(OpMul32F)
6870 v0 := b.NewValue0(v.Pos, OpConst32F, t)
6871 v0.AuxInt = float32ToAuxInt(1 / c)
6872 v.AddArg2(x, v0)
6873 return true
6874 }
6875 return false
6876 }
6877 func rewriteValuegeneric_OpDiv32u(v *Value) bool {
6878 v_1 := v.Args[1]
6879 v_0 := v.Args[0]
6880 b := v.Block
6881 config := b.Func.Config
6882 typ := &b.Func.Config.Types
6883
6884
6885
6886 for {
6887 if v_0.Op != OpConst32 {
6888 break
6889 }
6890 c := auxIntToInt32(v_0.AuxInt)
6891 if v_1.Op != OpConst32 {
6892 break
6893 }
6894 d := auxIntToInt32(v_1.AuxInt)
6895 if !(d != 0) {
6896 break
6897 }
6898 v.reset(OpConst32)
6899 v.AuxInt = int32ToAuxInt(int32(uint32(c) / uint32(d)))
6900 return true
6901 }
6902
6903
6904
6905 for {
6906 n := v_0
6907 if v_1.Op != OpConst32 {
6908 break
6909 }
6910 c := auxIntToInt32(v_1.AuxInt)
6911 if !(isPowerOfTwo(c)) {
6912 break
6913 }
6914 v.reset(OpRsh32Ux64)
6915 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
6916 v0.AuxInt = int64ToAuxInt(log32(c))
6917 v.AddArg2(n, v0)
6918 return true
6919 }
6920
6921
6922
6923 for {
6924 x := v_0
6925 if v_1.Op != OpConst32 {
6926 break
6927 }
6928 c := auxIntToInt32(v_1.AuxInt)
6929 if !(umagicOK32(c) && config.RegSize == 4 && umagic32(c).m&1 == 0 && config.useHmul) {
6930 break
6931 }
6932 v.reset(OpRsh32Ux64)
6933 v.Type = typ.UInt32
6934 v0 := b.NewValue0(v.Pos, OpHmul32u, typ.UInt32)
6935 v1 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
6936 v1.AuxInt = int32ToAuxInt(int32(1<<31 + umagic32(c).m/2))
6937 v0.AddArg2(v1, x)
6938 v2 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
6939 v2.AuxInt = int64ToAuxInt(umagic32(c).s - 1)
6940 v.AddArg2(v0, v2)
6941 return true
6942 }
6943
6944
6945
6946 for {
6947 x := v_0
6948 if v_1.Op != OpConst32 {
6949 break
6950 }
6951 c := auxIntToInt32(v_1.AuxInt)
6952 if !(umagicOK32(c) && config.RegSize == 4 && c&1 == 0 && config.useHmul) {
6953 break
6954 }
6955 v.reset(OpRsh32Ux64)
6956 v.Type = typ.UInt32
6957 v0 := b.NewValue0(v.Pos, OpHmul32u, typ.UInt32)
6958 v1 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
6959 v1.AuxInt = int32ToAuxInt(int32(1<<31 + (umagic32(c).m+1)/2))
6960 v2 := b.NewValue0(v.Pos, OpRsh32Ux64, typ.UInt32)
6961 v3 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
6962 v3.AuxInt = int64ToAuxInt(1)
6963 v2.AddArg2(x, v3)
6964 v0.AddArg2(v1, v2)
6965 v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
6966 v4.AuxInt = int64ToAuxInt(umagic32(c).s - 2)
6967 v.AddArg2(v0, v4)
6968 return true
6969 }
6970
6971
6972
6973 for {
6974 x := v_0
6975 if v_1.Op != OpConst32 {
6976 break
6977 }
6978 c := auxIntToInt32(v_1.AuxInt)
6979 if !(umagicOK32(c) && config.RegSize == 4 && config.useAvg && config.useHmul) {
6980 break
6981 }
6982 v.reset(OpRsh32Ux64)
6983 v.Type = typ.UInt32
6984 v0 := b.NewValue0(v.Pos, OpAvg32u, typ.UInt32)
6985 v1 := b.NewValue0(v.Pos, OpHmul32u, typ.UInt32)
6986 v2 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
6987 v2.AuxInt = int32ToAuxInt(int32(umagic32(c).m))
6988 v1.AddArg2(v2, x)
6989 v0.AddArg2(x, v1)
6990 v3 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
6991 v3.AuxInt = int64ToAuxInt(umagic32(c).s - 1)
6992 v.AddArg2(v0, v3)
6993 return true
6994 }
6995
6996
6997
6998 for {
6999 x := v_0
7000 if v_1.Op != OpConst32 {
7001 break
7002 }
7003 c := auxIntToInt32(v_1.AuxInt)
7004 if !(umagicOK32(c) && config.RegSize == 8 && umagic32(c).m&1 == 0) {
7005 break
7006 }
7007 v.reset(OpTrunc64to32)
7008 v0 := b.NewValue0(v.Pos, OpRsh64Ux64, typ.UInt64)
7009 v1 := b.NewValue0(v.Pos, OpMul64, typ.UInt64)
7010 v2 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7011 v2.AuxInt = int64ToAuxInt(int64(1<<31 + umagic32(c).m/2))
7012 v3 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
7013 v3.AddArg(x)
7014 v1.AddArg2(v2, v3)
7015 v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7016 v4.AuxInt = int64ToAuxInt(32 + umagic32(c).s - 1)
7017 v0.AddArg2(v1, v4)
7018 v.AddArg(v0)
7019 return true
7020 }
7021
7022
7023
7024 for {
7025 x := v_0
7026 if v_1.Op != OpConst32 {
7027 break
7028 }
7029 c := auxIntToInt32(v_1.AuxInt)
7030 if !(umagicOK32(c) && config.RegSize == 8 && c&1 == 0) {
7031 break
7032 }
7033 v.reset(OpTrunc64to32)
7034 v0 := b.NewValue0(v.Pos, OpRsh64Ux64, typ.UInt64)
7035 v1 := b.NewValue0(v.Pos, OpMul64, typ.UInt64)
7036 v2 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7037 v2.AuxInt = int64ToAuxInt(int64(1<<31 + (umagic32(c).m+1)/2))
7038 v3 := b.NewValue0(v.Pos, OpRsh64Ux64, typ.UInt64)
7039 v4 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
7040 v4.AddArg(x)
7041 v5 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7042 v5.AuxInt = int64ToAuxInt(1)
7043 v3.AddArg2(v4, v5)
7044 v1.AddArg2(v2, v3)
7045 v6 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7046 v6.AuxInt = int64ToAuxInt(32 + umagic32(c).s - 2)
7047 v0.AddArg2(v1, v6)
7048 v.AddArg(v0)
7049 return true
7050 }
7051
7052
7053
7054 for {
7055 x := v_0
7056 if v_1.Op != OpConst32 {
7057 break
7058 }
7059 c := auxIntToInt32(v_1.AuxInt)
7060 if !(umagicOK32(c) && config.RegSize == 8 && config.useAvg) {
7061 break
7062 }
7063 v.reset(OpTrunc64to32)
7064 v0 := b.NewValue0(v.Pos, OpRsh64Ux64, typ.UInt64)
7065 v1 := b.NewValue0(v.Pos, OpAvg64u, typ.UInt64)
7066 v2 := b.NewValue0(v.Pos, OpLsh64x64, typ.UInt64)
7067 v3 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
7068 v3.AddArg(x)
7069 v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7070 v4.AuxInt = int64ToAuxInt(32)
7071 v2.AddArg2(v3, v4)
7072 v5 := b.NewValue0(v.Pos, OpMul64, typ.UInt64)
7073 v6 := b.NewValue0(v.Pos, OpConst64, typ.UInt32)
7074 v6.AuxInt = int64ToAuxInt(int64(umagic32(c).m))
7075 v5.AddArg2(v6, v3)
7076 v1.AddArg2(v2, v5)
7077 v7 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7078 v7.AuxInt = int64ToAuxInt(32 + umagic32(c).s - 1)
7079 v0.AddArg2(v1, v7)
7080 v.AddArg(v0)
7081 return true
7082 }
7083 return false
7084 }
7085 func rewriteValuegeneric_OpDiv64(v *Value) bool {
7086 v_1 := v.Args[1]
7087 v_0 := v.Args[0]
7088 b := v.Block
7089 config := b.Func.Config
7090 typ := &b.Func.Config.Types
7091
7092
7093
7094 for {
7095 if v_0.Op != OpConst64 {
7096 break
7097 }
7098 c := auxIntToInt64(v_0.AuxInt)
7099 if v_1.Op != OpConst64 {
7100 break
7101 }
7102 d := auxIntToInt64(v_1.AuxInt)
7103 if !(d != 0) {
7104 break
7105 }
7106 v.reset(OpConst64)
7107 v.AuxInt = int64ToAuxInt(c / d)
7108 return true
7109 }
7110
7111
7112
7113 for {
7114 n := v_0
7115 if v_1.Op != OpConst64 {
7116 break
7117 }
7118 c := auxIntToInt64(v_1.AuxInt)
7119 if !(isNonNegative(n) && isPowerOfTwo(c)) {
7120 break
7121 }
7122 v.reset(OpRsh64Ux64)
7123 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7124 v0.AuxInt = int64ToAuxInt(log64(c))
7125 v.AddArg2(n, v0)
7126 return true
7127 }
7128
7129
7130
7131 for {
7132 n := v_0
7133 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != -1<<63 || !(isNonNegative(n)) {
7134 break
7135 }
7136 v.reset(OpConst64)
7137 v.AuxInt = int64ToAuxInt(0)
7138 return true
7139 }
7140
7141
7142
7143 for {
7144 t := v.Type
7145 n := v_0
7146 if v_1.Op != OpConst64 {
7147 break
7148 }
7149 c := auxIntToInt64(v_1.AuxInt)
7150 if !(c < 0 && c != -1<<63) {
7151 break
7152 }
7153 v.reset(OpNeg64)
7154 v0 := b.NewValue0(v.Pos, OpDiv64, t)
7155 v1 := b.NewValue0(v.Pos, OpConst64, t)
7156 v1.AuxInt = int64ToAuxInt(-c)
7157 v0.AddArg2(n, v1)
7158 v.AddArg(v0)
7159 return true
7160 }
7161
7162
7163 for {
7164 t := v.Type
7165 x := v_0
7166 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != -1<<63 {
7167 break
7168 }
7169 v.reset(OpRsh64Ux64)
7170 v0 := b.NewValue0(v.Pos, OpAnd64, t)
7171 v1 := b.NewValue0(v.Pos, OpNeg64, t)
7172 v1.AddArg(x)
7173 v0.AddArg2(x, v1)
7174 v2 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7175 v2.AuxInt = int64ToAuxInt(63)
7176 v.AddArg2(v0, v2)
7177 return true
7178 }
7179
7180
7181
7182 for {
7183 t := v.Type
7184 n := v_0
7185 if v_1.Op != OpConst64 {
7186 break
7187 }
7188 c := auxIntToInt64(v_1.AuxInt)
7189 if !(isPowerOfTwo(c)) {
7190 break
7191 }
7192 v.reset(OpRsh64x64)
7193 v0 := b.NewValue0(v.Pos, OpAdd64, t)
7194 v1 := b.NewValue0(v.Pos, OpRsh64Ux64, t)
7195 v2 := b.NewValue0(v.Pos, OpRsh64x64, t)
7196 v3 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7197 v3.AuxInt = int64ToAuxInt(63)
7198 v2.AddArg2(n, v3)
7199 v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7200 v4.AuxInt = int64ToAuxInt(int64(64 - log64(c)))
7201 v1.AddArg2(v2, v4)
7202 v0.AddArg2(n, v1)
7203 v5 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7204 v5.AuxInt = int64ToAuxInt(int64(log64(c)))
7205 v.AddArg2(v0, v5)
7206 return true
7207 }
7208
7209
7210
7211 for {
7212 t := v.Type
7213 x := v_0
7214 if v_1.Op != OpConst64 {
7215 break
7216 }
7217 c := auxIntToInt64(v_1.AuxInt)
7218 if !(smagicOK64(c) && smagic64(c).m&1 == 0 && config.useHmul) {
7219 break
7220 }
7221 v.reset(OpSub64)
7222 v.Type = t
7223 v0 := b.NewValue0(v.Pos, OpRsh64x64, t)
7224 v1 := b.NewValue0(v.Pos, OpHmul64, t)
7225 v2 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7226 v2.AuxInt = int64ToAuxInt(int64(smagic64(c).m / 2))
7227 v1.AddArg2(v2, x)
7228 v3 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7229 v3.AuxInt = int64ToAuxInt(smagic64(c).s - 1)
7230 v0.AddArg2(v1, v3)
7231 v4 := b.NewValue0(v.Pos, OpRsh64x64, t)
7232 v5 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7233 v5.AuxInt = int64ToAuxInt(63)
7234 v4.AddArg2(x, v5)
7235 v.AddArg2(v0, v4)
7236 return true
7237 }
7238
7239
7240
7241 for {
7242 t := v.Type
7243 x := v_0
7244 if v_1.Op != OpConst64 {
7245 break
7246 }
7247 c := auxIntToInt64(v_1.AuxInt)
7248 if !(smagicOK64(c) && smagic64(c).m&1 != 0 && config.useHmul) {
7249 break
7250 }
7251 v.reset(OpSub64)
7252 v.Type = t
7253 v0 := b.NewValue0(v.Pos, OpRsh64x64, t)
7254 v1 := b.NewValue0(v.Pos, OpAdd64, t)
7255 v2 := b.NewValue0(v.Pos, OpHmul64, t)
7256 v3 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7257 v3.AuxInt = int64ToAuxInt(int64(smagic64(c).m))
7258 v2.AddArg2(v3, x)
7259 v1.AddArg2(v2, x)
7260 v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7261 v4.AuxInt = int64ToAuxInt(smagic64(c).s)
7262 v0.AddArg2(v1, v4)
7263 v5 := b.NewValue0(v.Pos, OpRsh64x64, t)
7264 v6 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7265 v6.AuxInt = int64ToAuxInt(63)
7266 v5.AddArg2(x, v6)
7267 v.AddArg2(v0, v5)
7268 return true
7269 }
7270 return false
7271 }
7272 func rewriteValuegeneric_OpDiv64F(v *Value) bool {
7273 v_1 := v.Args[1]
7274 v_0 := v.Args[0]
7275 b := v.Block
7276
7277
7278
7279 for {
7280 if v_0.Op != OpConst64F {
7281 break
7282 }
7283 c := auxIntToFloat64(v_0.AuxInt)
7284 if v_1.Op != OpConst64F {
7285 break
7286 }
7287 d := auxIntToFloat64(v_1.AuxInt)
7288 if !(c/d == c/d) {
7289 break
7290 }
7291 v.reset(OpConst64F)
7292 v.AuxInt = float64ToAuxInt(c / d)
7293 return true
7294 }
7295
7296
7297
7298 for {
7299 x := v_0
7300 if v_1.Op != OpConst64F {
7301 break
7302 }
7303 t := v_1.Type
7304 c := auxIntToFloat64(v_1.AuxInt)
7305 if !(reciprocalExact64(c)) {
7306 break
7307 }
7308 v.reset(OpMul64F)
7309 v0 := b.NewValue0(v.Pos, OpConst64F, t)
7310 v0.AuxInt = float64ToAuxInt(1 / c)
7311 v.AddArg2(x, v0)
7312 return true
7313 }
7314 return false
7315 }
7316 func rewriteValuegeneric_OpDiv64u(v *Value) bool {
7317 v_1 := v.Args[1]
7318 v_0 := v.Args[0]
7319 b := v.Block
7320 config := b.Func.Config
7321 typ := &b.Func.Config.Types
7322
7323
7324
7325 for {
7326 if v_0.Op != OpConst64 {
7327 break
7328 }
7329 c := auxIntToInt64(v_0.AuxInt)
7330 if v_1.Op != OpConst64 {
7331 break
7332 }
7333 d := auxIntToInt64(v_1.AuxInt)
7334 if !(d != 0) {
7335 break
7336 }
7337 v.reset(OpConst64)
7338 v.AuxInt = int64ToAuxInt(int64(uint64(c) / uint64(d)))
7339 return true
7340 }
7341
7342
7343
7344 for {
7345 n := v_0
7346 if v_1.Op != OpConst64 {
7347 break
7348 }
7349 c := auxIntToInt64(v_1.AuxInt)
7350 if !(isPowerOfTwo(c)) {
7351 break
7352 }
7353 v.reset(OpRsh64Ux64)
7354 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7355 v0.AuxInt = int64ToAuxInt(log64(c))
7356 v.AddArg2(n, v0)
7357 return true
7358 }
7359
7360
7361 for {
7362 n := v_0
7363 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != -1<<63 {
7364 break
7365 }
7366 v.reset(OpRsh64Ux64)
7367 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7368 v0.AuxInt = int64ToAuxInt(63)
7369 v.AddArg2(n, v0)
7370 return true
7371 }
7372
7373
7374
7375 for {
7376 x := v_0
7377 if v_1.Op != OpConst64 {
7378 break
7379 }
7380 c := auxIntToInt64(v_1.AuxInt)
7381 if !(c > 0 && c <= 0xFFFF && umagicOK32(int32(c)) && config.RegSize == 4 && config.useHmul) {
7382 break
7383 }
7384 v.reset(OpAdd64)
7385 v0 := b.NewValue0(v.Pos, OpAdd64, typ.UInt64)
7386 v1 := b.NewValue0(v.Pos, OpAdd64, typ.UInt64)
7387 v2 := b.NewValue0(v.Pos, OpLsh64x64, typ.UInt64)
7388 v3 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
7389 v4 := b.NewValue0(v.Pos, OpDiv32u, typ.UInt32)
7390 v5 := b.NewValue0(v.Pos, OpTrunc64to32, typ.UInt32)
7391 v6 := b.NewValue0(v.Pos, OpRsh64Ux64, typ.UInt64)
7392 v7 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7393 v7.AuxInt = int64ToAuxInt(32)
7394 v6.AddArg2(x, v7)
7395 v5.AddArg(v6)
7396 v8 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
7397 v8.AuxInt = int32ToAuxInt(int32(c))
7398 v4.AddArg2(v5, v8)
7399 v3.AddArg(v4)
7400 v2.AddArg2(v3, v7)
7401 v9 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
7402 v10 := b.NewValue0(v.Pos, OpDiv32u, typ.UInt32)
7403 v11 := b.NewValue0(v.Pos, OpTrunc64to32, typ.UInt32)
7404 v11.AddArg(x)
7405 v10.AddArg2(v11, v8)
7406 v9.AddArg(v10)
7407 v1.AddArg2(v2, v9)
7408 v12 := b.NewValue0(v.Pos, OpMul64, typ.UInt64)
7409 v13 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
7410 v14 := b.NewValue0(v.Pos, OpMod32u, typ.UInt32)
7411 v14.AddArg2(v5, v8)
7412 v13.AddArg(v14)
7413 v15 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7414 v15.AuxInt = int64ToAuxInt(int64((1 << 32) / c))
7415 v12.AddArg2(v13, v15)
7416 v0.AddArg2(v1, v12)
7417 v16 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
7418 v17 := b.NewValue0(v.Pos, OpDiv32u, typ.UInt32)
7419 v18 := b.NewValue0(v.Pos, OpAdd32, typ.UInt32)
7420 v19 := b.NewValue0(v.Pos, OpMod32u, typ.UInt32)
7421 v19.AddArg2(v11, v8)
7422 v20 := b.NewValue0(v.Pos, OpMul32, typ.UInt32)
7423 v21 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
7424 v21.AuxInt = int32ToAuxInt(int32((1 << 32) % c))
7425 v20.AddArg2(v14, v21)
7426 v18.AddArg2(v19, v20)
7427 v17.AddArg2(v18, v8)
7428 v16.AddArg(v17)
7429 v.AddArg2(v0, v16)
7430 return true
7431 }
7432
7433
7434
7435 for {
7436 x := v_0
7437 if v_1.Op != OpConst64 {
7438 break
7439 }
7440 c := auxIntToInt64(v_1.AuxInt)
7441 if !(umagicOK64(c) && config.RegSize == 8 && umagic64(c).m&1 == 0 && config.useHmul) {
7442 break
7443 }
7444 v.reset(OpRsh64Ux64)
7445 v.Type = typ.UInt64
7446 v0 := b.NewValue0(v.Pos, OpHmul64u, typ.UInt64)
7447 v1 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7448 v1.AuxInt = int64ToAuxInt(int64(1<<63 + umagic64(c).m/2))
7449 v0.AddArg2(v1, x)
7450 v2 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7451 v2.AuxInt = int64ToAuxInt(umagic64(c).s - 1)
7452 v.AddArg2(v0, v2)
7453 return true
7454 }
7455
7456
7457
7458 for {
7459 x := v_0
7460 if v_1.Op != OpConst64 {
7461 break
7462 }
7463 c := auxIntToInt64(v_1.AuxInt)
7464 if !(umagicOK64(c) && config.RegSize == 8 && c&1 == 0 && config.useHmul) {
7465 break
7466 }
7467 v.reset(OpRsh64Ux64)
7468 v.Type = typ.UInt64
7469 v0 := b.NewValue0(v.Pos, OpHmul64u, typ.UInt64)
7470 v1 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7471 v1.AuxInt = int64ToAuxInt(int64(1<<63 + (umagic64(c).m+1)/2))
7472 v2 := b.NewValue0(v.Pos, OpRsh64Ux64, typ.UInt64)
7473 v3 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7474 v3.AuxInt = int64ToAuxInt(1)
7475 v2.AddArg2(x, v3)
7476 v0.AddArg2(v1, v2)
7477 v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7478 v4.AuxInt = int64ToAuxInt(umagic64(c).s - 2)
7479 v.AddArg2(v0, v4)
7480 return true
7481 }
7482
7483
7484
7485 for {
7486 x := v_0
7487 if v_1.Op != OpConst64 {
7488 break
7489 }
7490 c := auxIntToInt64(v_1.AuxInt)
7491 if !(umagicOK64(c) && config.RegSize == 8 && config.useAvg && config.useHmul) {
7492 break
7493 }
7494 v.reset(OpRsh64Ux64)
7495 v.Type = typ.UInt64
7496 v0 := b.NewValue0(v.Pos, OpAvg64u, typ.UInt64)
7497 v1 := b.NewValue0(v.Pos, OpHmul64u, typ.UInt64)
7498 v2 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7499 v2.AuxInt = int64ToAuxInt(int64(umagic64(c).m))
7500 v1.AddArg2(v2, x)
7501 v0.AddArg2(x, v1)
7502 v3 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7503 v3.AuxInt = int64ToAuxInt(umagic64(c).s - 1)
7504 v.AddArg2(v0, v3)
7505 return true
7506 }
7507 return false
7508 }
7509 func rewriteValuegeneric_OpDiv8(v *Value) bool {
7510 v_1 := v.Args[1]
7511 v_0 := v.Args[0]
7512 b := v.Block
7513 typ := &b.Func.Config.Types
7514
7515
7516
7517 for {
7518 if v_0.Op != OpConst8 {
7519 break
7520 }
7521 c := auxIntToInt8(v_0.AuxInt)
7522 if v_1.Op != OpConst8 {
7523 break
7524 }
7525 d := auxIntToInt8(v_1.AuxInt)
7526 if !(d != 0) {
7527 break
7528 }
7529 v.reset(OpConst8)
7530 v.AuxInt = int8ToAuxInt(c / d)
7531 return true
7532 }
7533
7534
7535
7536 for {
7537 n := v_0
7538 if v_1.Op != OpConst8 {
7539 break
7540 }
7541 c := auxIntToInt8(v_1.AuxInt)
7542 if !(isNonNegative(n) && isPowerOfTwo(c)) {
7543 break
7544 }
7545 v.reset(OpRsh8Ux64)
7546 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7547 v0.AuxInt = int64ToAuxInt(log8(c))
7548 v.AddArg2(n, v0)
7549 return true
7550 }
7551
7552
7553
7554 for {
7555 t := v.Type
7556 n := v_0
7557 if v_1.Op != OpConst8 {
7558 break
7559 }
7560 c := auxIntToInt8(v_1.AuxInt)
7561 if !(c < 0 && c != -1<<7) {
7562 break
7563 }
7564 v.reset(OpNeg8)
7565 v0 := b.NewValue0(v.Pos, OpDiv8, t)
7566 v1 := b.NewValue0(v.Pos, OpConst8, t)
7567 v1.AuxInt = int8ToAuxInt(-c)
7568 v0.AddArg2(n, v1)
7569 v.AddArg(v0)
7570 return true
7571 }
7572
7573
7574 for {
7575 t := v.Type
7576 x := v_0
7577 if v_1.Op != OpConst8 || auxIntToInt8(v_1.AuxInt) != -1<<7 {
7578 break
7579 }
7580 v.reset(OpRsh8Ux64)
7581 v0 := b.NewValue0(v.Pos, OpAnd8, t)
7582 v1 := b.NewValue0(v.Pos, OpNeg8, t)
7583 v1.AddArg(x)
7584 v0.AddArg2(x, v1)
7585 v2 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7586 v2.AuxInt = int64ToAuxInt(7)
7587 v.AddArg2(v0, v2)
7588 return true
7589 }
7590
7591
7592
7593 for {
7594 t := v.Type
7595 n := v_0
7596 if v_1.Op != OpConst8 {
7597 break
7598 }
7599 c := auxIntToInt8(v_1.AuxInt)
7600 if !(isPowerOfTwo(c)) {
7601 break
7602 }
7603 v.reset(OpRsh8x64)
7604 v0 := b.NewValue0(v.Pos, OpAdd8, t)
7605 v1 := b.NewValue0(v.Pos, OpRsh8Ux64, t)
7606 v2 := b.NewValue0(v.Pos, OpRsh8x64, t)
7607 v3 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7608 v3.AuxInt = int64ToAuxInt(7)
7609 v2.AddArg2(n, v3)
7610 v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7611 v4.AuxInt = int64ToAuxInt(int64(8 - log8(c)))
7612 v1.AddArg2(v2, v4)
7613 v0.AddArg2(n, v1)
7614 v5 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7615 v5.AuxInt = int64ToAuxInt(int64(log8(c)))
7616 v.AddArg2(v0, v5)
7617 return true
7618 }
7619
7620
7621
7622 for {
7623 t := v.Type
7624 x := v_0
7625 if v_1.Op != OpConst8 {
7626 break
7627 }
7628 c := auxIntToInt8(v_1.AuxInt)
7629 if !(smagicOK8(c)) {
7630 break
7631 }
7632 v.reset(OpSub8)
7633 v.Type = t
7634 v0 := b.NewValue0(v.Pos, OpRsh32x64, t)
7635 v1 := b.NewValue0(v.Pos, OpMul32, typ.UInt32)
7636 v2 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
7637 v2.AuxInt = int32ToAuxInt(int32(smagic8(c).m))
7638 v3 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
7639 v3.AddArg(x)
7640 v1.AddArg2(v2, v3)
7641 v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7642 v4.AuxInt = int64ToAuxInt(8 + smagic8(c).s)
7643 v0.AddArg2(v1, v4)
7644 v5 := b.NewValue0(v.Pos, OpRsh32x64, t)
7645 v6 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7646 v6.AuxInt = int64ToAuxInt(31)
7647 v5.AddArg2(v3, v6)
7648 v.AddArg2(v0, v5)
7649 return true
7650 }
7651 return false
7652 }
7653 func rewriteValuegeneric_OpDiv8u(v *Value) bool {
7654 v_1 := v.Args[1]
7655 v_0 := v.Args[0]
7656 b := v.Block
7657 typ := &b.Func.Config.Types
7658
7659
7660
7661 for {
7662 if v_0.Op != OpConst8 {
7663 break
7664 }
7665 c := auxIntToInt8(v_0.AuxInt)
7666 if v_1.Op != OpConst8 {
7667 break
7668 }
7669 d := auxIntToInt8(v_1.AuxInt)
7670 if !(d != 0) {
7671 break
7672 }
7673 v.reset(OpConst8)
7674 v.AuxInt = int8ToAuxInt(int8(uint8(c) / uint8(d)))
7675 return true
7676 }
7677
7678
7679
7680 for {
7681 n := v_0
7682 if v_1.Op != OpConst8 {
7683 break
7684 }
7685 c := auxIntToInt8(v_1.AuxInt)
7686 if !(isPowerOfTwo(c)) {
7687 break
7688 }
7689 v.reset(OpRsh8Ux64)
7690 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7691 v0.AuxInt = int64ToAuxInt(log8(c))
7692 v.AddArg2(n, v0)
7693 return true
7694 }
7695
7696
7697
7698 for {
7699 x := v_0
7700 if v_1.Op != OpConst8 {
7701 break
7702 }
7703 c := auxIntToInt8(v_1.AuxInt)
7704 if !(umagicOK8(c)) {
7705 break
7706 }
7707 v.reset(OpTrunc32to8)
7708 v0 := b.NewValue0(v.Pos, OpRsh32Ux64, typ.UInt32)
7709 v1 := b.NewValue0(v.Pos, OpMul32, typ.UInt32)
7710 v2 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
7711 v2.AuxInt = int32ToAuxInt(int32(1<<8 + umagic8(c).m))
7712 v3 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
7713 v3.AddArg(x)
7714 v1.AddArg2(v2, v3)
7715 v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7716 v4.AuxInt = int64ToAuxInt(8 + umagic8(c).s)
7717 v0.AddArg2(v1, v4)
7718 v.AddArg(v0)
7719 return true
7720 }
7721 return false
7722 }
7723 func rewriteValuegeneric_OpEq16(v *Value) bool {
7724 v_1 := v.Args[1]
7725 v_0 := v.Args[0]
7726 b := v.Block
7727 config := b.Func.Config
7728 typ := &b.Func.Config.Types
7729
7730
7731 for {
7732 x := v_0
7733 if x != v_1 {
7734 break
7735 }
7736 v.reset(OpConstBool)
7737 v.AuxInt = boolToAuxInt(true)
7738 return true
7739 }
7740
7741
7742 for {
7743 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
7744 if v_0.Op != OpConst16 {
7745 continue
7746 }
7747 t := v_0.Type
7748 c := auxIntToInt16(v_0.AuxInt)
7749 if v_1.Op != OpAdd16 {
7750 continue
7751 }
7752 _ = v_1.Args[1]
7753 v_1_0 := v_1.Args[0]
7754 v_1_1 := v_1.Args[1]
7755 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
7756 if v_1_0.Op != OpConst16 || v_1_0.Type != t {
7757 continue
7758 }
7759 d := auxIntToInt16(v_1_0.AuxInt)
7760 x := v_1_1
7761 v.reset(OpEq16)
7762 v0 := b.NewValue0(v.Pos, OpConst16, t)
7763 v0.AuxInt = int16ToAuxInt(c - d)
7764 v.AddArg2(v0, x)
7765 return true
7766 }
7767 }
7768 break
7769 }
7770
7771
7772 for {
7773 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
7774 if v_0.Op != OpConst16 {
7775 continue
7776 }
7777 c := auxIntToInt16(v_0.AuxInt)
7778 if v_1.Op != OpConst16 {
7779 continue
7780 }
7781 d := auxIntToInt16(v_1.AuxInt)
7782 v.reset(OpConstBool)
7783 v.AuxInt = boolToAuxInt(c == d)
7784 return true
7785 }
7786 break
7787 }
7788
7789
7790
7791 for {
7792 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
7793 if v_0.Op != OpMod16u {
7794 continue
7795 }
7796 _ = v_0.Args[1]
7797 x := v_0.Args[0]
7798 v_0_1 := v_0.Args[1]
7799 if v_0_1.Op != OpConst16 {
7800 continue
7801 }
7802 c := auxIntToInt16(v_0_1.AuxInt)
7803 if v_1.Op != OpConst16 || auxIntToInt16(v_1.AuxInt) != 0 || !(x.Op != OpConst16 && udivisibleOK16(c) && !hasSmallRotate(config)) {
7804 continue
7805 }
7806 v.reset(OpEq32)
7807 v0 := b.NewValue0(v.Pos, OpMod32u, typ.UInt32)
7808 v1 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
7809 v1.AddArg(x)
7810 v2 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
7811 v2.AuxInt = int32ToAuxInt(int32(uint16(c)))
7812 v0.AddArg2(v1, v2)
7813 v3 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
7814 v3.AuxInt = int32ToAuxInt(0)
7815 v.AddArg2(v0, v3)
7816 return true
7817 }
7818 break
7819 }
7820
7821
7822
7823 for {
7824 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
7825 if v_0.Op != OpMod16 {
7826 continue
7827 }
7828 _ = v_0.Args[1]
7829 x := v_0.Args[0]
7830 v_0_1 := v_0.Args[1]
7831 if v_0_1.Op != OpConst16 {
7832 continue
7833 }
7834 c := auxIntToInt16(v_0_1.AuxInt)
7835 if v_1.Op != OpConst16 || auxIntToInt16(v_1.AuxInt) != 0 || !(x.Op != OpConst16 && sdivisibleOK16(c) && !hasSmallRotate(config)) {
7836 continue
7837 }
7838 v.reset(OpEq32)
7839 v0 := b.NewValue0(v.Pos, OpMod32, typ.Int32)
7840 v1 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
7841 v1.AddArg(x)
7842 v2 := b.NewValue0(v.Pos, OpConst32, typ.Int32)
7843 v2.AuxInt = int32ToAuxInt(int32(c))
7844 v0.AddArg2(v1, v2)
7845 v3 := b.NewValue0(v.Pos, OpConst32, typ.Int32)
7846 v3.AuxInt = int32ToAuxInt(0)
7847 v.AddArg2(v0, v3)
7848 return true
7849 }
7850 break
7851 }
7852
7853
7854
7855 for {
7856 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
7857 x := v_0
7858 if v_1.Op != OpMul16 {
7859 continue
7860 }
7861 _ = v_1.Args[1]
7862 v_1_0 := v_1.Args[0]
7863 v_1_1 := v_1.Args[1]
7864 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
7865 if v_1_0.Op != OpConst16 {
7866 continue
7867 }
7868 c := auxIntToInt16(v_1_0.AuxInt)
7869 if v_1_1.Op != OpTrunc64to16 {
7870 continue
7871 }
7872 v_1_1_0 := v_1_1.Args[0]
7873 if v_1_1_0.Op != OpRsh64Ux64 {
7874 continue
7875 }
7876 _ = v_1_1_0.Args[1]
7877 mul := v_1_1_0.Args[0]
7878 if mul.Op != OpMul64 {
7879 continue
7880 }
7881 _ = mul.Args[1]
7882 mul_0 := mul.Args[0]
7883 mul_1 := mul.Args[1]
7884 for _i2 := 0; _i2 <= 1; _i2, mul_0, mul_1 = _i2+1, mul_1, mul_0 {
7885 if mul_0.Op != OpConst64 {
7886 continue
7887 }
7888 m := auxIntToInt64(mul_0.AuxInt)
7889 if mul_1.Op != OpZeroExt16to64 || x != mul_1.Args[0] {
7890 continue
7891 }
7892 v_1_1_0_1 := v_1_1_0.Args[1]
7893 if v_1_1_0_1.Op != OpConst64 {
7894 continue
7895 }
7896 s := auxIntToInt64(v_1_1_0_1.AuxInt)
7897 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)) {
7898 continue
7899 }
7900 v.reset(OpLeq16U)
7901 v0 := b.NewValue0(v.Pos, OpRotateLeft16, typ.UInt16)
7902 v1 := b.NewValue0(v.Pos, OpMul16, typ.UInt16)
7903 v2 := b.NewValue0(v.Pos, OpConst16, typ.UInt16)
7904 v2.AuxInt = int16ToAuxInt(int16(udivisible16(c).m))
7905 v1.AddArg2(v2, x)
7906 v3 := b.NewValue0(v.Pos, OpConst16, typ.UInt16)
7907 v3.AuxInt = int16ToAuxInt(int16(16 - udivisible16(c).k))
7908 v0.AddArg2(v1, v3)
7909 v4 := b.NewValue0(v.Pos, OpConst16, typ.UInt16)
7910 v4.AuxInt = int16ToAuxInt(int16(udivisible16(c).max))
7911 v.AddArg2(v0, v4)
7912 return true
7913 }
7914 }
7915 }
7916 break
7917 }
7918
7919
7920
7921 for {
7922 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
7923 x := v_0
7924 if v_1.Op != OpMul16 {
7925 continue
7926 }
7927 _ = v_1.Args[1]
7928 v_1_0 := v_1.Args[0]
7929 v_1_1 := v_1.Args[1]
7930 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
7931 if v_1_0.Op != OpConst16 {
7932 continue
7933 }
7934 c := auxIntToInt16(v_1_0.AuxInt)
7935 if v_1_1.Op != OpTrunc32to16 {
7936 continue
7937 }
7938 v_1_1_0 := v_1_1.Args[0]
7939 if v_1_1_0.Op != OpRsh32Ux64 {
7940 continue
7941 }
7942 _ = v_1_1_0.Args[1]
7943 mul := v_1_1_0.Args[0]
7944 if mul.Op != OpMul32 {
7945 continue
7946 }
7947 _ = mul.Args[1]
7948 mul_0 := mul.Args[0]
7949 mul_1 := mul.Args[1]
7950 for _i2 := 0; _i2 <= 1; _i2, mul_0, mul_1 = _i2+1, mul_1, mul_0 {
7951 if mul_0.Op != OpConst32 {
7952 continue
7953 }
7954 m := auxIntToInt32(mul_0.AuxInt)
7955 if mul_1.Op != OpZeroExt16to32 || x != mul_1.Args[0] {
7956 continue
7957 }
7958 v_1_1_0_1 := v_1_1_0.Args[1]
7959 if v_1_1_0_1.Op != OpConst64 {
7960 continue
7961 }
7962 s := auxIntToInt64(v_1_1_0_1.AuxInt)
7963 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)) {
7964 continue
7965 }
7966 v.reset(OpLeq16U)
7967 v0 := b.NewValue0(v.Pos, OpRotateLeft16, typ.UInt16)
7968 v1 := b.NewValue0(v.Pos, OpMul16, typ.UInt16)
7969 v2 := b.NewValue0(v.Pos, OpConst16, typ.UInt16)
7970 v2.AuxInt = int16ToAuxInt(int16(udivisible16(c).m))
7971 v1.AddArg2(v2, x)
7972 v3 := b.NewValue0(v.Pos, OpConst16, typ.UInt16)
7973 v3.AuxInt = int16ToAuxInt(int16(16 - udivisible16(c).k))
7974 v0.AddArg2(v1, v3)
7975 v4 := b.NewValue0(v.Pos, OpConst16, typ.UInt16)
7976 v4.AuxInt = int16ToAuxInt(int16(udivisible16(c).max))
7977 v.AddArg2(v0, v4)
7978 return true
7979 }
7980 }
7981 }
7982 break
7983 }
7984
7985
7986
7987 for {
7988 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
7989 x := v_0
7990 if v_1.Op != OpMul16 {
7991 continue
7992 }
7993 _ = v_1.Args[1]
7994 v_1_0 := v_1.Args[0]
7995 v_1_1 := v_1.Args[1]
7996 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
7997 if v_1_0.Op != OpConst16 {
7998 continue
7999 }
8000 c := auxIntToInt16(v_1_0.AuxInt)
8001 if v_1_1.Op != OpTrunc32to16 {
8002 continue
8003 }
8004 v_1_1_0 := v_1_1.Args[0]
8005 if v_1_1_0.Op != OpRsh32Ux64 {
8006 continue
8007 }
8008 _ = v_1_1_0.Args[1]
8009 mul := v_1_1_0.Args[0]
8010 if mul.Op != OpMul32 {
8011 continue
8012 }
8013 _ = mul.Args[1]
8014 mul_0 := mul.Args[0]
8015 mul_1 := mul.Args[1]
8016 for _i2 := 0; _i2 <= 1; _i2, mul_0, mul_1 = _i2+1, mul_1, mul_0 {
8017 if mul_0.Op != OpConst32 {
8018 continue
8019 }
8020 m := auxIntToInt32(mul_0.AuxInt)
8021 if mul_1.Op != OpRsh32Ux64 {
8022 continue
8023 }
8024 _ = mul_1.Args[1]
8025 mul_1_0 := mul_1.Args[0]
8026 if mul_1_0.Op != OpZeroExt16to32 || x != mul_1_0.Args[0] {
8027 continue
8028 }
8029 mul_1_1 := mul_1.Args[1]
8030 if mul_1_1.Op != OpConst64 || auxIntToInt64(mul_1_1.AuxInt) != 1 {
8031 continue
8032 }
8033 v_1_1_0_1 := v_1_1_0.Args[1]
8034 if v_1_1_0_1.Op != OpConst64 {
8035 continue
8036 }
8037 s := auxIntToInt64(v_1_1_0_1.AuxInt)
8038 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)) {
8039 continue
8040 }
8041 v.reset(OpLeq16U)
8042 v0 := b.NewValue0(v.Pos, OpRotateLeft16, typ.UInt16)
8043 v1 := b.NewValue0(v.Pos, OpMul16, typ.UInt16)
8044 v2 := b.NewValue0(v.Pos, OpConst16, typ.UInt16)
8045 v2.AuxInt = int16ToAuxInt(int16(udivisible16(c).m))
8046 v1.AddArg2(v2, x)
8047 v3 := b.NewValue0(v.Pos, OpConst16, typ.UInt16)
8048 v3.AuxInt = int16ToAuxInt(int16(16 - udivisible16(c).k))
8049 v0.AddArg2(v1, v3)
8050 v4 := b.NewValue0(v.Pos, OpConst16, typ.UInt16)
8051 v4.AuxInt = int16ToAuxInt(int16(udivisible16(c).max))
8052 v.AddArg2(v0, v4)
8053 return true
8054 }
8055 }
8056 }
8057 break
8058 }
8059
8060
8061
8062 for {
8063 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
8064 x := v_0
8065 if v_1.Op != OpMul16 {
8066 continue
8067 }
8068 _ = v_1.Args[1]
8069 v_1_0 := v_1.Args[0]
8070 v_1_1 := v_1.Args[1]
8071 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
8072 if v_1_0.Op != OpConst16 {
8073 continue
8074 }
8075 c := auxIntToInt16(v_1_0.AuxInt)
8076 if v_1_1.Op != OpTrunc32to16 {
8077 continue
8078 }
8079 v_1_1_0 := v_1_1.Args[0]
8080 if v_1_1_0.Op != OpRsh32Ux64 {
8081 continue
8082 }
8083 _ = v_1_1_0.Args[1]
8084 v_1_1_0_0 := v_1_1_0.Args[0]
8085 if v_1_1_0_0.Op != OpAvg32u {
8086 continue
8087 }
8088 _ = v_1_1_0_0.Args[1]
8089 v_1_1_0_0_0 := v_1_1_0_0.Args[0]
8090 if v_1_1_0_0_0.Op != OpLsh32x64 {
8091 continue
8092 }
8093 _ = v_1_1_0_0_0.Args[1]
8094 v_1_1_0_0_0_0 := v_1_1_0_0_0.Args[0]
8095 if v_1_1_0_0_0_0.Op != OpZeroExt16to32 || x != v_1_1_0_0_0_0.Args[0] {
8096 continue
8097 }
8098 v_1_1_0_0_0_1 := v_1_1_0_0_0.Args[1]
8099 if v_1_1_0_0_0_1.Op != OpConst64 || auxIntToInt64(v_1_1_0_0_0_1.AuxInt) != 16 {
8100 continue
8101 }
8102 mul := v_1_1_0_0.Args[1]
8103 if mul.Op != OpMul32 {
8104 continue
8105 }
8106 _ = mul.Args[1]
8107 mul_0 := mul.Args[0]
8108 mul_1 := mul.Args[1]
8109 for _i2 := 0; _i2 <= 1; _i2, mul_0, mul_1 = _i2+1, mul_1, mul_0 {
8110 if mul_0.Op != OpConst32 {
8111 continue
8112 }
8113 m := auxIntToInt32(mul_0.AuxInt)
8114 if mul_1.Op != OpZeroExt16to32 || x != mul_1.Args[0] {
8115 continue
8116 }
8117 v_1_1_0_1 := v_1_1_0.Args[1]
8118 if v_1_1_0_1.Op != OpConst64 {
8119 continue
8120 }
8121 s := auxIntToInt64(v_1_1_0_1.AuxInt)
8122 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)) {
8123 continue
8124 }
8125 v.reset(OpLeq16U)
8126 v0 := b.NewValue0(v.Pos, OpRotateLeft16, typ.UInt16)
8127 v1 := b.NewValue0(v.Pos, OpMul16, typ.UInt16)
8128 v2 := b.NewValue0(v.Pos, OpConst16, typ.UInt16)
8129 v2.AuxInt = int16ToAuxInt(int16(udivisible16(c).m))
8130 v1.AddArg2(v2, x)
8131 v3 := b.NewValue0(v.Pos, OpConst16, typ.UInt16)
8132 v3.AuxInt = int16ToAuxInt(int16(16 - udivisible16(c).k))
8133 v0.AddArg2(v1, v3)
8134 v4 := b.NewValue0(v.Pos, OpConst16, typ.UInt16)
8135 v4.AuxInt = int16ToAuxInt(int16(udivisible16(c).max))
8136 v.AddArg2(v0, v4)
8137 return true
8138 }
8139 }
8140 }
8141 break
8142 }
8143
8144
8145
8146 for {
8147 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
8148 x := v_0
8149 if v_1.Op != OpMul16 {
8150 continue
8151 }
8152 _ = v_1.Args[1]
8153 v_1_0 := v_1.Args[0]
8154 v_1_1 := v_1.Args[1]
8155 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
8156 if v_1_0.Op != OpConst16 {
8157 continue
8158 }
8159 c := auxIntToInt16(v_1_0.AuxInt)
8160 if v_1_1.Op != OpSub16 {
8161 continue
8162 }
8163 _ = v_1_1.Args[1]
8164 v_1_1_0 := v_1_1.Args[0]
8165 if v_1_1_0.Op != OpRsh32x64 {
8166 continue
8167 }
8168 _ = v_1_1_0.Args[1]
8169 mul := v_1_1_0.Args[0]
8170 if mul.Op != OpMul32 {
8171 continue
8172 }
8173 _ = mul.Args[1]
8174 mul_0 := mul.Args[0]
8175 mul_1 := mul.Args[1]
8176 for _i2 := 0; _i2 <= 1; _i2, mul_0, mul_1 = _i2+1, mul_1, mul_0 {
8177 if mul_0.Op != OpConst32 {
8178 continue
8179 }
8180 m := auxIntToInt32(mul_0.AuxInt)
8181 if mul_1.Op != OpSignExt16to32 || x != mul_1.Args[0] {
8182 continue
8183 }
8184 v_1_1_0_1 := v_1_1_0.Args[1]
8185 if v_1_1_0_1.Op != OpConst64 {
8186 continue
8187 }
8188 s := auxIntToInt64(v_1_1_0_1.AuxInt)
8189 v_1_1_1 := v_1_1.Args[1]
8190 if v_1_1_1.Op != OpRsh32x64 {
8191 continue
8192 }
8193 _ = v_1_1_1.Args[1]
8194 v_1_1_1_0 := v_1_1_1.Args[0]
8195 if v_1_1_1_0.Op != OpSignExt16to32 || x != v_1_1_1_0.Args[0] {
8196 continue
8197 }
8198 v_1_1_1_1 := v_1_1_1.Args[1]
8199 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)) {
8200 continue
8201 }
8202 v.reset(OpLeq16U)
8203 v0 := b.NewValue0(v.Pos, OpRotateLeft16, typ.UInt16)
8204 v1 := b.NewValue0(v.Pos, OpAdd16, typ.UInt16)
8205 v2 := b.NewValue0(v.Pos, OpMul16, typ.UInt16)
8206 v3 := b.NewValue0(v.Pos, OpConst16, typ.UInt16)
8207 v3.AuxInt = int16ToAuxInt(int16(sdivisible16(c).m))
8208 v2.AddArg2(v3, x)
8209 v4 := b.NewValue0(v.Pos, OpConst16, typ.UInt16)
8210 v4.AuxInt = int16ToAuxInt(int16(sdivisible16(c).a))
8211 v1.AddArg2(v2, v4)
8212 v5 := b.NewValue0(v.Pos, OpConst16, typ.UInt16)
8213 v5.AuxInt = int16ToAuxInt(int16(16 - sdivisible16(c).k))
8214 v0.AddArg2(v1, v5)
8215 v6 := b.NewValue0(v.Pos, OpConst16, typ.UInt16)
8216 v6.AuxInt = int16ToAuxInt(int16(sdivisible16(c).max))
8217 v.AddArg2(v0, v6)
8218 return true
8219 }
8220 }
8221 }
8222 break
8223 }
8224
8225
8226
8227 for {
8228 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
8229 n := v_0
8230 if v_1.Op != OpLsh16x64 {
8231 continue
8232 }
8233 _ = v_1.Args[1]
8234 v_1_0 := v_1.Args[0]
8235 if v_1_0.Op != OpRsh16x64 {
8236 continue
8237 }
8238 _ = v_1_0.Args[1]
8239 v_1_0_0 := v_1_0.Args[0]
8240 if v_1_0_0.Op != OpAdd16 {
8241 continue
8242 }
8243 t := v_1_0_0.Type
8244 _ = v_1_0_0.Args[1]
8245 v_1_0_0_0 := v_1_0_0.Args[0]
8246 v_1_0_0_1 := v_1_0_0.Args[1]
8247 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 {
8248 if n != v_1_0_0_0 || v_1_0_0_1.Op != OpRsh16Ux64 || v_1_0_0_1.Type != t {
8249 continue
8250 }
8251 _ = v_1_0_0_1.Args[1]
8252 v_1_0_0_1_0 := v_1_0_0_1.Args[0]
8253 if v_1_0_0_1_0.Op != OpRsh16x64 || v_1_0_0_1_0.Type != t {
8254 continue
8255 }
8256 _ = v_1_0_0_1_0.Args[1]
8257 if n != v_1_0_0_1_0.Args[0] {
8258 continue
8259 }
8260 v_1_0_0_1_0_1 := v_1_0_0_1_0.Args[1]
8261 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 {
8262 continue
8263 }
8264 v_1_0_0_1_1 := v_1_0_0_1.Args[1]
8265 if v_1_0_0_1_1.Op != OpConst64 || v_1_0_0_1_1.Type != typ.UInt64 {
8266 continue
8267 }
8268 kbar := auxIntToInt64(v_1_0_0_1_1.AuxInt)
8269 v_1_0_1 := v_1_0.Args[1]
8270 if v_1_0_1.Op != OpConst64 || v_1_0_1.Type != typ.UInt64 {
8271 continue
8272 }
8273 k := auxIntToInt64(v_1_0_1.AuxInt)
8274 v_1_1 := v_1.Args[1]
8275 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) {
8276 continue
8277 }
8278 v.reset(OpEq16)
8279 v0 := b.NewValue0(v.Pos, OpAnd16, t)
8280 v1 := b.NewValue0(v.Pos, OpConst16, t)
8281 v1.AuxInt = int16ToAuxInt(1<<uint(k) - 1)
8282 v0.AddArg2(n, v1)
8283 v2 := b.NewValue0(v.Pos, OpConst16, t)
8284 v2.AuxInt = int16ToAuxInt(0)
8285 v.AddArg2(v0, v2)
8286 return true
8287 }
8288 }
8289 break
8290 }
8291
8292
8293
8294 for {
8295 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
8296 s := v_0
8297 if s.Op != OpSub16 {
8298 continue
8299 }
8300 y := s.Args[1]
8301 x := s.Args[0]
8302 if v_1.Op != OpConst16 || auxIntToInt16(v_1.AuxInt) != 0 || !(s.Uses == 1) {
8303 continue
8304 }
8305 v.reset(OpEq16)
8306 v.AddArg2(x, y)
8307 return true
8308 }
8309 break
8310 }
8311
8312
8313
8314 for {
8315 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
8316 if v_0.Op != OpAnd16 {
8317 continue
8318 }
8319 t := v_0.Type
8320 _ = v_0.Args[1]
8321 v_0_0 := v_0.Args[0]
8322 v_0_1 := v_0.Args[1]
8323 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
8324 x := v_0_0
8325 if v_0_1.Op != OpConst16 || v_0_1.Type != t {
8326 continue
8327 }
8328 y := auxIntToInt16(v_0_1.AuxInt)
8329 if v_1.Op != OpConst16 || v_1.Type != t || auxIntToInt16(v_1.AuxInt) != y || !(oneBit16(y)) {
8330 continue
8331 }
8332 v.reset(OpNeq16)
8333 v0 := b.NewValue0(v.Pos, OpAnd16, t)
8334 v1 := b.NewValue0(v.Pos, OpConst16, t)
8335 v1.AuxInt = int16ToAuxInt(y)
8336 v0.AddArg2(x, v1)
8337 v2 := b.NewValue0(v.Pos, OpConst16, t)
8338 v2.AuxInt = int16ToAuxInt(0)
8339 v.AddArg2(v0, v2)
8340 return true
8341 }
8342 }
8343 break
8344 }
8345 return false
8346 }
8347 func rewriteValuegeneric_OpEq32(v *Value) bool {
8348 v_1 := v.Args[1]
8349 v_0 := v.Args[0]
8350 b := v.Block
8351 typ := &b.Func.Config.Types
8352
8353
8354 for {
8355 x := v_0
8356 if x != v_1 {
8357 break
8358 }
8359 v.reset(OpConstBool)
8360 v.AuxInt = boolToAuxInt(true)
8361 return true
8362 }
8363
8364
8365 for {
8366 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
8367 if v_0.Op != OpConst32 {
8368 continue
8369 }
8370 t := v_0.Type
8371 c := auxIntToInt32(v_0.AuxInt)
8372 if v_1.Op != OpAdd32 {
8373 continue
8374 }
8375 _ = v_1.Args[1]
8376 v_1_0 := v_1.Args[0]
8377 v_1_1 := v_1.Args[1]
8378 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
8379 if v_1_0.Op != OpConst32 || v_1_0.Type != t {
8380 continue
8381 }
8382 d := auxIntToInt32(v_1_0.AuxInt)
8383 x := v_1_1
8384 v.reset(OpEq32)
8385 v0 := b.NewValue0(v.Pos, OpConst32, t)
8386 v0.AuxInt = int32ToAuxInt(c - d)
8387 v.AddArg2(v0, x)
8388 return true
8389 }
8390 }
8391 break
8392 }
8393
8394
8395 for {
8396 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
8397 if v_0.Op != OpConst32 {
8398 continue
8399 }
8400 c := auxIntToInt32(v_0.AuxInt)
8401 if v_1.Op != OpConst32 {
8402 continue
8403 }
8404 d := auxIntToInt32(v_1.AuxInt)
8405 v.reset(OpConstBool)
8406 v.AuxInt = boolToAuxInt(c == d)
8407 return true
8408 }
8409 break
8410 }
8411
8412
8413
8414 for {
8415 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
8416 x := v_0
8417 if v_1.Op != OpMul32 {
8418 continue
8419 }
8420 _ = v_1.Args[1]
8421 v_1_0 := v_1.Args[0]
8422 v_1_1 := v_1.Args[1]
8423 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
8424 if v_1_0.Op != OpConst32 {
8425 continue
8426 }
8427 c := auxIntToInt32(v_1_0.AuxInt)
8428 if v_1_1.Op != OpRsh32Ux64 {
8429 continue
8430 }
8431 _ = v_1_1.Args[1]
8432 mul := v_1_1.Args[0]
8433 if mul.Op != OpHmul32u {
8434 continue
8435 }
8436 _ = mul.Args[1]
8437 mul_0 := mul.Args[0]
8438 mul_1 := mul.Args[1]
8439 for _i2 := 0; _i2 <= 1; _i2, mul_0, mul_1 = _i2+1, mul_1, mul_0 {
8440 if mul_0.Op != OpConst32 {
8441 continue
8442 }
8443 m := auxIntToInt32(mul_0.AuxInt)
8444 if x != mul_1 {
8445 continue
8446 }
8447 v_1_1_1 := v_1_1.Args[1]
8448 if v_1_1_1.Op != OpConst64 {
8449 continue
8450 }
8451 s := auxIntToInt64(v_1_1_1.AuxInt)
8452 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)) {
8453 continue
8454 }
8455 v.reset(OpLeq32U)
8456 v0 := b.NewValue0(v.Pos, OpRotateLeft32, typ.UInt32)
8457 v1 := b.NewValue0(v.Pos, OpMul32, typ.UInt32)
8458 v2 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
8459 v2.AuxInt = int32ToAuxInt(int32(udivisible32(c).m))
8460 v1.AddArg2(v2, x)
8461 v3 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
8462 v3.AuxInt = int32ToAuxInt(int32(32 - udivisible32(c).k))
8463 v0.AddArg2(v1, v3)
8464 v4 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
8465 v4.AuxInt = int32ToAuxInt(int32(udivisible32(c).max))
8466 v.AddArg2(v0, v4)
8467 return true
8468 }
8469 }
8470 }
8471 break
8472 }
8473
8474
8475
8476 for {
8477 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
8478 x := v_0
8479 if v_1.Op != OpMul32 {
8480 continue
8481 }
8482 _ = v_1.Args[1]
8483 v_1_0 := v_1.Args[0]
8484 v_1_1 := v_1.Args[1]
8485 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
8486 if v_1_0.Op != OpConst32 {
8487 continue
8488 }
8489 c := auxIntToInt32(v_1_0.AuxInt)
8490 if v_1_1.Op != OpRsh32Ux64 {
8491 continue
8492 }
8493 _ = v_1_1.Args[1]
8494 mul := v_1_1.Args[0]
8495 if mul.Op != OpHmul32u {
8496 continue
8497 }
8498 _ = mul.Args[1]
8499 mul_0 := mul.Args[0]
8500 mul_1 := mul.Args[1]
8501 for _i2 := 0; _i2 <= 1; _i2, mul_0, mul_1 = _i2+1, mul_1, mul_0 {
8502 if mul_0.Op != OpConst32 || mul_0.Type != typ.UInt32 {
8503 continue
8504 }
8505 m := auxIntToInt32(mul_0.AuxInt)
8506 if mul_1.Op != OpRsh32Ux64 {
8507 continue
8508 }
8509 _ = mul_1.Args[1]
8510 if x != mul_1.Args[0] {
8511 continue
8512 }
8513 mul_1_1 := mul_1.Args[1]
8514 if mul_1_1.Op != OpConst64 || auxIntToInt64(mul_1_1.AuxInt) != 1 {
8515 continue
8516 }
8517 v_1_1_1 := v_1_1.Args[1]
8518 if v_1_1_1.Op != OpConst64 {
8519 continue
8520 }
8521 s := auxIntToInt64(v_1_1_1.AuxInt)
8522 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)) {
8523 continue
8524 }
8525 v.reset(OpLeq32U)
8526 v0 := b.NewValue0(v.Pos, OpRotateLeft32, typ.UInt32)
8527 v1 := b.NewValue0(v.Pos, OpMul32, typ.UInt32)
8528 v2 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
8529 v2.AuxInt = int32ToAuxInt(int32(udivisible32(c).m))
8530 v1.AddArg2(v2, x)
8531 v3 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
8532 v3.AuxInt = int32ToAuxInt(int32(32 - udivisible32(c).k))
8533 v0.AddArg2(v1, v3)
8534 v4 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
8535 v4.AuxInt = int32ToAuxInt(int32(udivisible32(c).max))
8536 v.AddArg2(v0, v4)
8537 return true
8538 }
8539 }
8540 }
8541 break
8542 }
8543
8544
8545
8546 for {
8547 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
8548 x := v_0
8549 if v_1.Op != OpMul32 {
8550 continue
8551 }
8552 _ = v_1.Args[1]
8553 v_1_0 := v_1.Args[0]
8554 v_1_1 := v_1.Args[1]
8555 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
8556 if v_1_0.Op != OpConst32 {
8557 continue
8558 }
8559 c := auxIntToInt32(v_1_0.AuxInt)
8560 if v_1_1.Op != OpRsh32Ux64 {
8561 continue
8562 }
8563 _ = v_1_1.Args[1]
8564 v_1_1_0 := v_1_1.Args[0]
8565 if v_1_1_0.Op != OpAvg32u {
8566 continue
8567 }
8568 _ = v_1_1_0.Args[1]
8569 if x != v_1_1_0.Args[0] {
8570 continue
8571 }
8572 mul := v_1_1_0.Args[1]
8573 if mul.Op != OpHmul32u {
8574 continue
8575 }
8576 _ = mul.Args[1]
8577 mul_0 := mul.Args[0]
8578 mul_1 := mul.Args[1]
8579 for _i2 := 0; _i2 <= 1; _i2, mul_0, mul_1 = _i2+1, mul_1, mul_0 {
8580 if mul_0.Op != OpConst32 {
8581 continue
8582 }
8583 m := auxIntToInt32(mul_0.AuxInt)
8584 if x != mul_1 {
8585 continue
8586 }
8587 v_1_1_1 := v_1_1.Args[1]
8588 if v_1_1_1.Op != OpConst64 {
8589 continue
8590 }
8591 s := auxIntToInt64(v_1_1_1.AuxInt)
8592 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)) {
8593 continue
8594 }
8595 v.reset(OpLeq32U)
8596 v0 := b.NewValue0(v.Pos, OpRotateLeft32, typ.UInt32)
8597 v1 := b.NewValue0(v.Pos, OpMul32, typ.UInt32)
8598 v2 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
8599 v2.AuxInt = int32ToAuxInt(int32(udivisible32(c).m))
8600 v1.AddArg2(v2, x)
8601 v3 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
8602 v3.AuxInt = int32ToAuxInt(int32(32 - udivisible32(c).k))
8603 v0.AddArg2(v1, v3)
8604 v4 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
8605 v4.AuxInt = int32ToAuxInt(int32(udivisible32(c).max))
8606 v.AddArg2(v0, v4)
8607 return true
8608 }
8609 }
8610 }
8611 break
8612 }
8613
8614
8615
8616 for {
8617 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
8618 x := v_0
8619 if v_1.Op != OpMul32 {
8620 continue
8621 }
8622 _ = v_1.Args[1]
8623 v_1_0 := v_1.Args[0]
8624 v_1_1 := v_1.Args[1]
8625 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
8626 if v_1_0.Op != OpConst32 {
8627 continue
8628 }
8629 c := auxIntToInt32(v_1_0.AuxInt)
8630 if v_1_1.Op != OpTrunc64to32 {
8631 continue
8632 }
8633 v_1_1_0 := v_1_1.Args[0]
8634 if v_1_1_0.Op != OpRsh64Ux64 {
8635 continue
8636 }
8637 _ = v_1_1_0.Args[1]
8638 mul := v_1_1_0.Args[0]
8639 if mul.Op != OpMul64 {
8640 continue
8641 }
8642 _ = mul.Args[1]
8643 mul_0 := mul.Args[0]
8644 mul_1 := mul.Args[1]
8645 for _i2 := 0; _i2 <= 1; _i2, mul_0, mul_1 = _i2+1, mul_1, mul_0 {
8646 if mul_0.Op != OpConst64 {
8647 continue
8648 }
8649 m := auxIntToInt64(mul_0.AuxInt)
8650 if mul_1.Op != OpZeroExt32to64 || x != mul_1.Args[0] {
8651 continue
8652 }
8653 v_1_1_0_1 := v_1_1_0.Args[1]
8654 if v_1_1_0_1.Op != OpConst64 {
8655 continue
8656 }
8657 s := auxIntToInt64(v_1_1_0_1.AuxInt)
8658 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)) {
8659 continue
8660 }
8661 v.reset(OpLeq32U)
8662 v0 := b.NewValue0(v.Pos, OpRotateLeft32, typ.UInt32)
8663 v1 := b.NewValue0(v.Pos, OpMul32, typ.UInt32)
8664 v2 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
8665 v2.AuxInt = int32ToAuxInt(int32(udivisible32(c).m))
8666 v1.AddArg2(v2, x)
8667 v3 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
8668 v3.AuxInt = int32ToAuxInt(int32(32 - udivisible32(c).k))
8669 v0.AddArg2(v1, v3)
8670 v4 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
8671 v4.AuxInt = int32ToAuxInt(int32(udivisible32(c).max))
8672 v.AddArg2(v0, v4)
8673 return true
8674 }
8675 }
8676 }
8677 break
8678 }
8679
8680
8681
8682 for {
8683 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
8684 x := v_0
8685 if v_1.Op != OpMul32 {
8686 continue
8687 }
8688 _ = v_1.Args[1]
8689 v_1_0 := v_1.Args[0]
8690 v_1_1 := v_1.Args[1]
8691 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
8692 if v_1_0.Op != OpConst32 {
8693 continue
8694 }
8695 c := auxIntToInt32(v_1_0.AuxInt)
8696 if v_1_1.Op != OpTrunc64to32 {
8697 continue
8698 }
8699 v_1_1_0 := v_1_1.Args[0]
8700 if v_1_1_0.Op != OpRsh64Ux64 {
8701 continue
8702 }
8703 _ = v_1_1_0.Args[1]
8704 mul := v_1_1_0.Args[0]
8705 if mul.Op != OpMul64 {
8706 continue
8707 }
8708 _ = mul.Args[1]
8709 mul_0 := mul.Args[0]
8710 mul_1 := mul.Args[1]
8711 for _i2 := 0; _i2 <= 1; _i2, mul_0, mul_1 = _i2+1, mul_1, mul_0 {
8712 if mul_0.Op != OpConst64 {
8713 continue
8714 }
8715 m := auxIntToInt64(mul_0.AuxInt)
8716 if mul_1.Op != OpRsh64Ux64 {
8717 continue
8718 }
8719 _ = mul_1.Args[1]
8720 mul_1_0 := mul_1.Args[0]
8721 if mul_1_0.Op != OpZeroExt32to64 || x != mul_1_0.Args[0] {
8722 continue
8723 }
8724 mul_1_1 := mul_1.Args[1]
8725 if mul_1_1.Op != OpConst64 || auxIntToInt64(mul_1_1.AuxInt) != 1 {
8726 continue
8727 }
8728 v_1_1_0_1 := v_1_1_0.Args[1]
8729 if v_1_1_0_1.Op != OpConst64 {
8730 continue
8731 }
8732 s := auxIntToInt64(v_1_1_0_1.AuxInt)
8733 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)) {
8734 continue
8735 }
8736 v.reset(OpLeq32U)
8737 v0 := b.NewValue0(v.Pos, OpRotateLeft32, typ.UInt32)
8738 v1 := b.NewValue0(v.Pos, OpMul32, typ.UInt32)
8739 v2 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
8740 v2.AuxInt = int32ToAuxInt(int32(udivisible32(c).m))
8741 v1.AddArg2(v2, x)
8742 v3 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
8743 v3.AuxInt = int32ToAuxInt(int32(32 - udivisible32(c).k))
8744 v0.AddArg2(v1, v3)
8745 v4 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
8746 v4.AuxInt = int32ToAuxInt(int32(udivisible32(c).max))
8747 v.AddArg2(v0, v4)
8748 return true
8749 }
8750 }
8751 }
8752 break
8753 }
8754
8755
8756
8757 for {
8758 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
8759 x := v_0
8760 if v_1.Op != OpMul32 {
8761 continue
8762 }
8763 _ = v_1.Args[1]
8764 v_1_0 := v_1.Args[0]
8765 v_1_1 := v_1.Args[1]
8766 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
8767 if v_1_0.Op != OpConst32 {
8768 continue
8769 }
8770 c := auxIntToInt32(v_1_0.AuxInt)
8771 if v_1_1.Op != OpTrunc64to32 {
8772 continue
8773 }
8774 v_1_1_0 := v_1_1.Args[0]
8775 if v_1_1_0.Op != OpRsh64Ux64 {
8776 continue
8777 }
8778 _ = v_1_1_0.Args[1]
8779 v_1_1_0_0 := v_1_1_0.Args[0]
8780 if v_1_1_0_0.Op != OpAvg64u {
8781 continue
8782 }
8783 _ = v_1_1_0_0.Args[1]
8784 v_1_1_0_0_0 := v_1_1_0_0.Args[0]
8785 if v_1_1_0_0_0.Op != OpLsh64x64 {
8786 continue
8787 }
8788 _ = v_1_1_0_0_0.Args[1]
8789 v_1_1_0_0_0_0 := v_1_1_0_0_0.Args[0]
8790 if v_1_1_0_0_0_0.Op != OpZeroExt32to64 || x != v_1_1_0_0_0_0.Args[0] {
8791 continue
8792 }
8793 v_1_1_0_0_0_1 := v_1_1_0_0_0.Args[1]
8794 if v_1_1_0_0_0_1.Op != OpConst64 || auxIntToInt64(v_1_1_0_0_0_1.AuxInt) != 32 {
8795 continue
8796 }
8797 mul := v_1_1_0_0.Args[1]
8798 if mul.Op != OpMul64 {
8799 continue
8800 }
8801 _ = mul.Args[1]
8802 mul_0 := mul.Args[0]
8803 mul_1 := mul.Args[1]
8804 for _i2 := 0; _i2 <= 1; _i2, mul_0, mul_1 = _i2+1, mul_1, mul_0 {
8805 if mul_0.Op != OpConst64 {
8806 continue
8807 }
8808 m := auxIntToInt64(mul_0.AuxInt)
8809 if mul_1.Op != OpZeroExt32to64 || x != mul_1.Args[0] {
8810 continue
8811 }
8812 v_1_1_0_1 := v_1_1_0.Args[1]
8813 if v_1_1_0_1.Op != OpConst64 {
8814 continue
8815 }
8816 s := auxIntToInt64(v_1_1_0_1.AuxInt)
8817 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)) {
8818 continue
8819 }
8820 v.reset(OpLeq32U)
8821 v0 := b.NewValue0(v.Pos, OpRotateLeft32, typ.UInt32)
8822 v1 := b.NewValue0(v.Pos, OpMul32, typ.UInt32)
8823 v2 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
8824 v2.AuxInt = int32ToAuxInt(int32(udivisible32(c).m))
8825 v1.AddArg2(v2, x)
8826 v3 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
8827 v3.AuxInt = int32ToAuxInt(int32(32 - udivisible32(c).k))
8828 v0.AddArg2(v1, v3)
8829 v4 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
8830 v4.AuxInt = int32ToAuxInt(int32(udivisible32(c).max))
8831 v.AddArg2(v0, v4)
8832 return true
8833 }
8834 }
8835 }
8836 break
8837 }
8838
8839
8840
8841 for {
8842 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
8843 x := v_0
8844 if v_1.Op != OpMul32 {
8845 continue
8846 }
8847 _ = v_1.Args[1]
8848 v_1_0 := v_1.Args[0]
8849 v_1_1 := v_1.Args[1]
8850 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
8851 if v_1_0.Op != OpConst32 {
8852 continue
8853 }
8854 c := auxIntToInt32(v_1_0.AuxInt)
8855 if v_1_1.Op != OpSub32 {
8856 continue
8857 }
8858 _ = v_1_1.Args[1]
8859 v_1_1_0 := v_1_1.Args[0]
8860 if v_1_1_0.Op != OpRsh64x64 {
8861 continue
8862 }
8863 _ = v_1_1_0.Args[1]
8864 mul := v_1_1_0.Args[0]
8865 if mul.Op != OpMul64 {
8866 continue
8867 }
8868 _ = mul.Args[1]
8869 mul_0 := mul.Args[0]
8870 mul_1 := mul.Args[1]
8871 for _i2 := 0; _i2 <= 1; _i2, mul_0, mul_1 = _i2+1, mul_1, mul_0 {
8872 if mul_0.Op != OpConst64 {
8873 continue
8874 }
8875 m := auxIntToInt64(mul_0.AuxInt)
8876 if mul_1.Op != OpSignExt32to64 || x != mul_1.Args[0] {
8877 continue
8878 }
8879 v_1_1_0_1 := v_1_1_0.Args[1]
8880 if v_1_1_0_1.Op != OpConst64 {
8881 continue
8882 }
8883 s := auxIntToInt64(v_1_1_0_1.AuxInt)
8884 v_1_1_1 := v_1_1.Args[1]
8885 if v_1_1_1.Op != OpRsh64x64 {
8886 continue
8887 }
8888 _ = v_1_1_1.Args[1]
8889 v_1_1_1_0 := v_1_1_1.Args[0]
8890 if v_1_1_1_0.Op != OpSignExt32to64 || x != v_1_1_1_0.Args[0] {
8891 continue
8892 }
8893 v_1_1_1_1 := v_1_1_1.Args[1]
8894 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)) {
8895 continue
8896 }
8897 v.reset(OpLeq32U)
8898 v0 := b.NewValue0(v.Pos, OpRotateLeft32, typ.UInt32)
8899 v1 := b.NewValue0(v.Pos, OpAdd32, typ.UInt32)
8900 v2 := b.NewValue0(v.Pos, OpMul32, typ.UInt32)
8901 v3 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
8902 v3.AuxInt = int32ToAuxInt(int32(sdivisible32(c).m))
8903 v2.AddArg2(v3, x)
8904 v4 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
8905 v4.AuxInt = int32ToAuxInt(int32(sdivisible32(c).a))
8906 v1.AddArg2(v2, v4)
8907 v5 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
8908 v5.AuxInt = int32ToAuxInt(int32(32 - sdivisible32(c).k))
8909 v0.AddArg2(v1, v5)
8910 v6 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
8911 v6.AuxInt = int32ToAuxInt(int32(sdivisible32(c).max))
8912 v.AddArg2(v0, v6)
8913 return true
8914 }
8915 }
8916 }
8917 break
8918 }
8919
8920
8921
8922 for {
8923 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
8924 x := v_0
8925 if v_1.Op != OpMul32 {
8926 continue
8927 }
8928 _ = v_1.Args[1]
8929 v_1_0 := v_1.Args[0]
8930 v_1_1 := v_1.Args[1]
8931 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
8932 if v_1_0.Op != OpConst32 {
8933 continue
8934 }
8935 c := auxIntToInt32(v_1_0.AuxInt)
8936 if v_1_1.Op != OpSub32 {
8937 continue
8938 }
8939 _ = v_1_1.Args[1]
8940 v_1_1_0 := v_1_1.Args[0]
8941 if v_1_1_0.Op != OpRsh32x64 {
8942 continue
8943 }
8944 _ = v_1_1_0.Args[1]
8945 mul := v_1_1_0.Args[0]
8946 if mul.Op != OpHmul32 {
8947 continue
8948 }
8949 _ = mul.Args[1]
8950 mul_0 := mul.Args[0]
8951 mul_1 := mul.Args[1]
8952 for _i2 := 0; _i2 <= 1; _i2, mul_0, mul_1 = _i2+1, mul_1, mul_0 {
8953 if mul_0.Op != OpConst32 {
8954 continue
8955 }
8956 m := auxIntToInt32(mul_0.AuxInt)
8957 if x != mul_1 {
8958 continue
8959 }
8960 v_1_1_0_1 := v_1_1_0.Args[1]
8961 if v_1_1_0_1.Op != OpConst64 {
8962 continue
8963 }
8964 s := auxIntToInt64(v_1_1_0_1.AuxInt)
8965 v_1_1_1 := v_1_1.Args[1]
8966 if v_1_1_1.Op != OpRsh32x64 {
8967 continue
8968 }
8969 _ = v_1_1_1.Args[1]
8970 if x != v_1_1_1.Args[0] {
8971 continue
8972 }
8973 v_1_1_1_1 := v_1_1_1.Args[1]
8974 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)) {
8975 continue
8976 }
8977 v.reset(OpLeq32U)
8978 v0 := b.NewValue0(v.Pos, OpRotateLeft32, typ.UInt32)
8979 v1 := b.NewValue0(v.Pos, OpAdd32, typ.UInt32)
8980 v2 := b.NewValue0(v.Pos, OpMul32, typ.UInt32)
8981 v3 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
8982 v3.AuxInt = int32ToAuxInt(int32(sdivisible32(c).m))
8983 v2.AddArg2(v3, x)
8984 v4 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
8985 v4.AuxInt = int32ToAuxInt(int32(sdivisible32(c).a))
8986 v1.AddArg2(v2, v4)
8987 v5 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
8988 v5.AuxInt = int32ToAuxInt(int32(32 - sdivisible32(c).k))
8989 v0.AddArg2(v1, v5)
8990 v6 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
8991 v6.AuxInt = int32ToAuxInt(int32(sdivisible32(c).max))
8992 v.AddArg2(v0, v6)
8993 return true
8994 }
8995 }
8996 }
8997 break
8998 }
8999
9000
9001
9002 for {
9003 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
9004 x := v_0
9005 if v_1.Op != OpMul32 {
9006 continue
9007 }
9008 _ = v_1.Args[1]
9009 v_1_0 := v_1.Args[0]
9010 v_1_1 := v_1.Args[1]
9011 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
9012 if v_1_0.Op != OpConst32 {
9013 continue
9014 }
9015 c := auxIntToInt32(v_1_0.AuxInt)
9016 if v_1_1.Op != OpSub32 {
9017 continue
9018 }
9019 _ = v_1_1.Args[1]
9020 v_1_1_0 := v_1_1.Args[0]
9021 if v_1_1_0.Op != OpRsh32x64 {
9022 continue
9023 }
9024 _ = v_1_1_0.Args[1]
9025 v_1_1_0_0 := v_1_1_0.Args[0]
9026 if v_1_1_0_0.Op != OpAdd32 {
9027 continue
9028 }
9029 _ = v_1_1_0_0.Args[1]
9030 v_1_1_0_0_0 := v_1_1_0_0.Args[0]
9031 v_1_1_0_0_1 := v_1_1_0_0.Args[1]
9032 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 {
9033 mul := v_1_1_0_0_0
9034 if mul.Op != OpHmul32 {
9035 continue
9036 }
9037 _ = mul.Args[1]
9038 mul_0 := mul.Args[0]
9039 mul_1 := mul.Args[1]
9040 for _i3 := 0; _i3 <= 1; _i3, mul_0, mul_1 = _i3+1, mul_1, mul_0 {
9041 if mul_0.Op != OpConst32 {
9042 continue
9043 }
9044 m := auxIntToInt32(mul_0.AuxInt)
9045 if x != mul_1 || x != v_1_1_0_0_1 {
9046 continue
9047 }
9048 v_1_1_0_1 := v_1_1_0.Args[1]
9049 if v_1_1_0_1.Op != OpConst64 {
9050 continue
9051 }
9052 s := auxIntToInt64(v_1_1_0_1.AuxInt)
9053 v_1_1_1 := v_1_1.Args[1]
9054 if v_1_1_1.Op != OpRsh32x64 {
9055 continue
9056 }
9057 _ = v_1_1_1.Args[1]
9058 if x != v_1_1_1.Args[0] {
9059 continue
9060 }
9061 v_1_1_1_1 := v_1_1_1.Args[1]
9062 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)) {
9063 continue
9064 }
9065 v.reset(OpLeq32U)
9066 v0 := b.NewValue0(v.Pos, OpRotateLeft32, typ.UInt32)
9067 v1 := b.NewValue0(v.Pos, OpAdd32, typ.UInt32)
9068 v2 := b.NewValue0(v.Pos, OpMul32, typ.UInt32)
9069 v3 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
9070 v3.AuxInt = int32ToAuxInt(int32(sdivisible32(c).m))
9071 v2.AddArg2(v3, x)
9072 v4 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
9073 v4.AuxInt = int32ToAuxInt(int32(sdivisible32(c).a))
9074 v1.AddArg2(v2, v4)
9075 v5 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
9076 v5.AuxInt = int32ToAuxInt(int32(32 - sdivisible32(c).k))
9077 v0.AddArg2(v1, v5)
9078 v6 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
9079 v6.AuxInt = int32ToAuxInt(int32(sdivisible32(c).max))
9080 v.AddArg2(v0, v6)
9081 return true
9082 }
9083 }
9084 }
9085 }
9086 break
9087 }
9088
9089
9090
9091 for {
9092 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
9093 n := v_0
9094 if v_1.Op != OpLsh32x64 {
9095 continue
9096 }
9097 _ = v_1.Args[1]
9098 v_1_0 := v_1.Args[0]
9099 if v_1_0.Op != OpRsh32x64 {
9100 continue
9101 }
9102 _ = v_1_0.Args[1]
9103 v_1_0_0 := v_1_0.Args[0]
9104 if v_1_0_0.Op != OpAdd32 {
9105 continue
9106 }
9107 t := v_1_0_0.Type
9108 _ = v_1_0_0.Args[1]
9109 v_1_0_0_0 := v_1_0_0.Args[0]
9110 v_1_0_0_1 := v_1_0_0.Args[1]
9111 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 {
9112 if n != v_1_0_0_0 || v_1_0_0_1.Op != OpRsh32Ux64 || v_1_0_0_1.Type != t {
9113 continue
9114 }
9115 _ = v_1_0_0_1.Args[1]
9116 v_1_0_0_1_0 := v_1_0_0_1.Args[0]
9117 if v_1_0_0_1_0.Op != OpRsh32x64 || v_1_0_0_1_0.Type != t {
9118 continue
9119 }
9120 _ = v_1_0_0_1_0.Args[1]
9121 if n != v_1_0_0_1_0.Args[0] {
9122 continue
9123 }
9124 v_1_0_0_1_0_1 := v_1_0_0_1_0.Args[1]
9125 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 {
9126 continue
9127 }
9128 v_1_0_0_1_1 := v_1_0_0_1.Args[1]
9129 if v_1_0_0_1_1.Op != OpConst64 || v_1_0_0_1_1.Type != typ.UInt64 {
9130 continue
9131 }
9132 kbar := auxIntToInt64(v_1_0_0_1_1.AuxInt)
9133 v_1_0_1 := v_1_0.Args[1]
9134 if v_1_0_1.Op != OpConst64 || v_1_0_1.Type != typ.UInt64 {
9135 continue
9136 }
9137 k := auxIntToInt64(v_1_0_1.AuxInt)
9138 v_1_1 := v_1.Args[1]
9139 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) {
9140 continue
9141 }
9142 v.reset(OpEq32)
9143 v0 := b.NewValue0(v.Pos, OpAnd32, t)
9144 v1 := b.NewValue0(v.Pos, OpConst32, t)
9145 v1.AuxInt = int32ToAuxInt(1<<uint(k) - 1)
9146 v0.AddArg2(n, v1)
9147 v2 := b.NewValue0(v.Pos, OpConst32, t)
9148 v2.AuxInt = int32ToAuxInt(0)
9149 v.AddArg2(v0, v2)
9150 return true
9151 }
9152 }
9153 break
9154 }
9155
9156
9157
9158 for {
9159 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
9160 s := v_0
9161 if s.Op != OpSub32 {
9162 continue
9163 }
9164 y := s.Args[1]
9165 x := s.Args[0]
9166 if v_1.Op != OpConst32 || auxIntToInt32(v_1.AuxInt) != 0 || !(s.Uses == 1) {
9167 continue
9168 }
9169 v.reset(OpEq32)
9170 v.AddArg2(x, y)
9171 return true
9172 }
9173 break
9174 }
9175
9176
9177
9178 for {
9179 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
9180 if v_0.Op != OpAnd32 {
9181 continue
9182 }
9183 t := v_0.Type
9184 _ = v_0.Args[1]
9185 v_0_0 := v_0.Args[0]
9186 v_0_1 := v_0.Args[1]
9187 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
9188 x := v_0_0
9189 if v_0_1.Op != OpConst32 || v_0_1.Type != t {
9190 continue
9191 }
9192 y := auxIntToInt32(v_0_1.AuxInt)
9193 if v_1.Op != OpConst32 || v_1.Type != t || auxIntToInt32(v_1.AuxInt) != y || !(oneBit32(y)) {
9194 continue
9195 }
9196 v.reset(OpNeq32)
9197 v0 := b.NewValue0(v.Pos, OpAnd32, t)
9198 v1 := b.NewValue0(v.Pos, OpConst32, t)
9199 v1.AuxInt = int32ToAuxInt(y)
9200 v0.AddArg2(x, v1)
9201 v2 := b.NewValue0(v.Pos, OpConst32, t)
9202 v2.AuxInt = int32ToAuxInt(0)
9203 v.AddArg2(v0, v2)
9204 return true
9205 }
9206 }
9207 break
9208 }
9209 return false
9210 }
9211 func rewriteValuegeneric_OpEq32F(v *Value) bool {
9212 v_1 := v.Args[1]
9213 v_0 := v.Args[0]
9214
9215
9216 for {
9217 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
9218 if v_0.Op != OpConst32F {
9219 continue
9220 }
9221 c := auxIntToFloat32(v_0.AuxInt)
9222 if v_1.Op != OpConst32F {
9223 continue
9224 }
9225 d := auxIntToFloat32(v_1.AuxInt)
9226 v.reset(OpConstBool)
9227 v.AuxInt = boolToAuxInt(c == d)
9228 return true
9229 }
9230 break
9231 }
9232 return false
9233 }
9234 func rewriteValuegeneric_OpEq64(v *Value) bool {
9235 v_1 := v.Args[1]
9236 v_0 := v.Args[0]
9237 b := v.Block
9238 typ := &b.Func.Config.Types
9239
9240
9241 for {
9242 x := v_0
9243 if x != v_1 {
9244 break
9245 }
9246 v.reset(OpConstBool)
9247 v.AuxInt = boolToAuxInt(true)
9248 return true
9249 }
9250
9251
9252 for {
9253 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
9254 if v_0.Op != OpConst64 {
9255 continue
9256 }
9257 t := v_0.Type
9258 c := auxIntToInt64(v_0.AuxInt)
9259 if v_1.Op != OpAdd64 {
9260 continue
9261 }
9262 _ = v_1.Args[1]
9263 v_1_0 := v_1.Args[0]
9264 v_1_1 := v_1.Args[1]
9265 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
9266 if v_1_0.Op != OpConst64 || v_1_0.Type != t {
9267 continue
9268 }
9269 d := auxIntToInt64(v_1_0.AuxInt)
9270 x := v_1_1
9271 v.reset(OpEq64)
9272 v0 := b.NewValue0(v.Pos, OpConst64, t)
9273 v0.AuxInt = int64ToAuxInt(c - d)
9274 v.AddArg2(v0, x)
9275 return true
9276 }
9277 }
9278 break
9279 }
9280
9281
9282 for {
9283 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
9284 if v_0.Op != OpConst64 {
9285 continue
9286 }
9287 c := auxIntToInt64(v_0.AuxInt)
9288 if v_1.Op != OpConst64 {
9289 continue
9290 }
9291 d := auxIntToInt64(v_1.AuxInt)
9292 v.reset(OpConstBool)
9293 v.AuxInt = boolToAuxInt(c == d)
9294 return true
9295 }
9296 break
9297 }
9298
9299
9300
9301 for {
9302 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
9303 x := v_0
9304 if v_1.Op != OpMul64 {
9305 continue
9306 }
9307 _ = v_1.Args[1]
9308 v_1_0 := v_1.Args[0]
9309 v_1_1 := v_1.Args[1]
9310 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
9311 if v_1_0.Op != OpConst64 {
9312 continue
9313 }
9314 c := auxIntToInt64(v_1_0.AuxInt)
9315 if v_1_1.Op != OpRsh64Ux64 {
9316 continue
9317 }
9318 _ = v_1_1.Args[1]
9319 mul := v_1_1.Args[0]
9320 if mul.Op != OpHmul64u {
9321 continue
9322 }
9323 _ = mul.Args[1]
9324 mul_0 := mul.Args[0]
9325 mul_1 := mul.Args[1]
9326 for _i2 := 0; _i2 <= 1; _i2, mul_0, mul_1 = _i2+1, mul_1, mul_0 {
9327 if mul_0.Op != OpConst64 {
9328 continue
9329 }
9330 m := auxIntToInt64(mul_0.AuxInt)
9331 if x != mul_1 {
9332 continue
9333 }
9334 v_1_1_1 := v_1_1.Args[1]
9335 if v_1_1_1.Op != OpConst64 {
9336 continue
9337 }
9338 s := auxIntToInt64(v_1_1_1.AuxInt)
9339 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)) {
9340 continue
9341 }
9342 v.reset(OpLeq64U)
9343 v0 := b.NewValue0(v.Pos, OpRotateLeft64, typ.UInt64)
9344 v1 := b.NewValue0(v.Pos, OpMul64, typ.UInt64)
9345 v2 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
9346 v2.AuxInt = int64ToAuxInt(int64(udivisible64(c).m))
9347 v1.AddArg2(v2, x)
9348 v3 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
9349 v3.AuxInt = int64ToAuxInt(64 - udivisible64(c).k)
9350 v0.AddArg2(v1, v3)
9351 v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
9352 v4.AuxInt = int64ToAuxInt(int64(udivisible64(c).max))
9353 v.AddArg2(v0, v4)
9354 return true
9355 }
9356 }
9357 }
9358 break
9359 }
9360
9361
9362
9363 for {
9364 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
9365 x := v_0
9366 if v_1.Op != OpMul64 {
9367 continue
9368 }
9369 _ = v_1.Args[1]
9370 v_1_0 := v_1.Args[0]
9371 v_1_1 := v_1.Args[1]
9372 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
9373 if v_1_0.Op != OpConst64 {
9374 continue
9375 }
9376 c := auxIntToInt64(v_1_0.AuxInt)
9377 if v_1_1.Op != OpRsh64Ux64 {
9378 continue
9379 }
9380 _ = v_1_1.Args[1]
9381 mul := v_1_1.Args[0]
9382 if mul.Op != OpHmul64u {
9383 continue
9384 }
9385 _ = mul.Args[1]
9386 mul_0 := mul.Args[0]
9387 mul_1 := mul.Args[1]
9388 for _i2 := 0; _i2 <= 1; _i2, mul_0, mul_1 = _i2+1, mul_1, mul_0 {
9389 if mul_0.Op != OpConst64 {
9390 continue
9391 }
9392 m := auxIntToInt64(mul_0.AuxInt)
9393 if mul_1.Op != OpRsh64Ux64 {
9394 continue
9395 }
9396 _ = mul_1.Args[1]
9397 if x != mul_1.Args[0] {
9398 continue
9399 }
9400 mul_1_1 := mul_1.Args[1]
9401 if mul_1_1.Op != OpConst64 || auxIntToInt64(mul_1_1.AuxInt) != 1 {
9402 continue
9403 }
9404 v_1_1_1 := v_1_1.Args[1]
9405 if v_1_1_1.Op != OpConst64 {
9406 continue
9407 }
9408 s := auxIntToInt64(v_1_1_1.AuxInt)
9409 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)) {
9410 continue
9411 }
9412 v.reset(OpLeq64U)
9413 v0 := b.NewValue0(v.Pos, OpRotateLeft64, typ.UInt64)
9414 v1 := b.NewValue0(v.Pos, OpMul64, typ.UInt64)
9415 v2 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
9416 v2.AuxInt = int64ToAuxInt(int64(udivisible64(c).m))
9417 v1.AddArg2(v2, x)
9418 v3 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
9419 v3.AuxInt = int64ToAuxInt(64 - udivisible64(c).k)
9420 v0.AddArg2(v1, v3)
9421 v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
9422 v4.AuxInt = int64ToAuxInt(int64(udivisible64(c).max))
9423 v.AddArg2(v0, v4)
9424 return true
9425 }
9426 }
9427 }
9428 break
9429 }
9430
9431
9432
9433 for {
9434 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
9435 x := v_0
9436 if v_1.Op != OpMul64 {
9437 continue
9438 }
9439 _ = v_1.Args[1]
9440 v_1_0 := v_1.Args[0]
9441 v_1_1 := v_1.Args[1]
9442 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
9443 if v_1_0.Op != OpConst64 {
9444 continue
9445 }
9446 c := auxIntToInt64(v_1_0.AuxInt)
9447 if v_1_1.Op != OpRsh64Ux64 {
9448 continue
9449 }
9450 _ = v_1_1.Args[1]
9451 v_1_1_0 := v_1_1.Args[0]
9452 if v_1_1_0.Op != OpAvg64u {
9453 continue
9454 }
9455 _ = v_1_1_0.Args[1]
9456 if x != v_1_1_0.Args[0] {
9457 continue
9458 }
9459 mul := v_1_1_0.Args[1]
9460 if mul.Op != OpHmul64u {
9461 continue
9462 }
9463 _ = mul.Args[1]
9464 mul_0 := mul.Args[0]
9465 mul_1 := mul.Args[1]
9466 for _i2 := 0; _i2 <= 1; _i2, mul_0, mul_1 = _i2+1, mul_1, mul_0 {
9467 if mul_0.Op != OpConst64 {
9468 continue
9469 }
9470 m := auxIntToInt64(mul_0.AuxInt)
9471 if x != mul_1 {
9472 continue
9473 }
9474 v_1_1_1 := v_1_1.Args[1]
9475 if v_1_1_1.Op != OpConst64 {
9476 continue
9477 }
9478 s := auxIntToInt64(v_1_1_1.AuxInt)
9479 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)) {
9480 continue
9481 }
9482 v.reset(OpLeq64U)
9483 v0 := b.NewValue0(v.Pos, OpRotateLeft64, typ.UInt64)
9484 v1 := b.NewValue0(v.Pos, OpMul64, typ.UInt64)
9485 v2 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
9486 v2.AuxInt = int64ToAuxInt(int64(udivisible64(c).m))
9487 v1.AddArg2(v2, x)
9488 v3 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
9489 v3.AuxInt = int64ToAuxInt(64 - udivisible64(c).k)
9490 v0.AddArg2(v1, v3)
9491 v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
9492 v4.AuxInt = int64ToAuxInt(int64(udivisible64(c).max))
9493 v.AddArg2(v0, v4)
9494 return true
9495 }
9496 }
9497 }
9498 break
9499 }
9500
9501
9502
9503 for {
9504 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
9505 x := v_0
9506 if v_1.Op != OpMul64 {
9507 continue
9508 }
9509 _ = v_1.Args[1]
9510 v_1_0 := v_1.Args[0]
9511 v_1_1 := v_1.Args[1]
9512 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
9513 if v_1_0.Op != OpConst64 {
9514 continue
9515 }
9516 c := auxIntToInt64(v_1_0.AuxInt)
9517 if v_1_1.Op != OpSub64 {
9518 continue
9519 }
9520 _ = v_1_1.Args[1]
9521 v_1_1_0 := v_1_1.Args[0]
9522 if v_1_1_0.Op != OpRsh64x64 {
9523 continue
9524 }
9525 _ = v_1_1_0.Args[1]
9526 mul := v_1_1_0.Args[0]
9527 if mul.Op != OpHmul64 {
9528 continue
9529 }
9530 _ = mul.Args[1]
9531 mul_0 := mul.Args[0]
9532 mul_1 := mul.Args[1]
9533 for _i2 := 0; _i2 <= 1; _i2, mul_0, mul_1 = _i2+1, mul_1, mul_0 {
9534 if mul_0.Op != OpConst64 {
9535 continue
9536 }
9537 m := auxIntToInt64(mul_0.AuxInt)
9538 if x != mul_1 {
9539 continue
9540 }
9541 v_1_1_0_1 := v_1_1_0.Args[1]
9542 if v_1_1_0_1.Op != OpConst64 {
9543 continue
9544 }
9545 s := auxIntToInt64(v_1_1_0_1.AuxInt)
9546 v_1_1_1 := v_1_1.Args[1]
9547 if v_1_1_1.Op != OpRsh64x64 {
9548 continue
9549 }
9550 _ = v_1_1_1.Args[1]
9551 if x != v_1_1_1.Args[0] {
9552 continue
9553 }
9554 v_1_1_1_1 := v_1_1_1.Args[1]
9555 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)) {
9556 continue
9557 }
9558 v.reset(OpLeq64U)
9559 v0 := b.NewValue0(v.Pos, OpRotateLeft64, typ.UInt64)
9560 v1 := b.NewValue0(v.Pos, OpAdd64, typ.UInt64)
9561 v2 := b.NewValue0(v.Pos, OpMul64, typ.UInt64)
9562 v3 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
9563 v3.AuxInt = int64ToAuxInt(int64(sdivisible64(c).m))
9564 v2.AddArg2(v3, x)
9565 v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
9566 v4.AuxInt = int64ToAuxInt(int64(sdivisible64(c).a))
9567 v1.AddArg2(v2, v4)
9568 v5 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
9569 v5.AuxInt = int64ToAuxInt(64 - sdivisible64(c).k)
9570 v0.AddArg2(v1, v5)
9571 v6 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
9572 v6.AuxInt = int64ToAuxInt(int64(sdivisible64(c).max))
9573 v.AddArg2(v0, v6)
9574 return true
9575 }
9576 }
9577 }
9578 break
9579 }
9580
9581
9582
9583 for {
9584 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
9585 x := v_0
9586 if v_1.Op != OpMul64 {
9587 continue
9588 }
9589 _ = v_1.Args[1]
9590 v_1_0 := v_1.Args[0]
9591 v_1_1 := v_1.Args[1]
9592 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
9593 if v_1_0.Op != OpConst64 {
9594 continue
9595 }
9596 c := auxIntToInt64(v_1_0.AuxInt)
9597 if v_1_1.Op != OpSub64 {
9598 continue
9599 }
9600 _ = v_1_1.Args[1]
9601 v_1_1_0 := v_1_1.Args[0]
9602 if v_1_1_0.Op != OpRsh64x64 {
9603 continue
9604 }
9605 _ = v_1_1_0.Args[1]
9606 v_1_1_0_0 := v_1_1_0.Args[0]
9607 if v_1_1_0_0.Op != OpAdd64 {
9608 continue
9609 }
9610 _ = v_1_1_0_0.Args[1]
9611 v_1_1_0_0_0 := v_1_1_0_0.Args[0]
9612 v_1_1_0_0_1 := v_1_1_0_0.Args[1]
9613 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 {
9614 mul := v_1_1_0_0_0
9615 if mul.Op != OpHmul64 {
9616 continue
9617 }
9618 _ = mul.Args[1]
9619 mul_0 := mul.Args[0]
9620 mul_1 := mul.Args[1]
9621 for _i3 := 0; _i3 <= 1; _i3, mul_0, mul_1 = _i3+1, mul_1, mul_0 {
9622 if mul_0.Op != OpConst64 {
9623 continue
9624 }
9625 m := auxIntToInt64(mul_0.AuxInt)
9626 if x != mul_1 || x != v_1_1_0_0_1 {
9627 continue
9628 }
9629 v_1_1_0_1 := v_1_1_0.Args[1]
9630 if v_1_1_0_1.Op != OpConst64 {
9631 continue
9632 }
9633 s := auxIntToInt64(v_1_1_0_1.AuxInt)
9634 v_1_1_1 := v_1_1.Args[1]
9635 if v_1_1_1.Op != OpRsh64x64 {
9636 continue
9637 }
9638 _ = v_1_1_1.Args[1]
9639 if x != v_1_1_1.Args[0] {
9640 continue
9641 }
9642 v_1_1_1_1 := v_1_1_1.Args[1]
9643 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)) {
9644 continue
9645 }
9646 v.reset(OpLeq64U)
9647 v0 := b.NewValue0(v.Pos, OpRotateLeft64, typ.UInt64)
9648 v1 := b.NewValue0(v.Pos, OpAdd64, typ.UInt64)
9649 v2 := b.NewValue0(v.Pos, OpMul64, typ.UInt64)
9650 v3 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
9651 v3.AuxInt = int64ToAuxInt(int64(sdivisible64(c).m))
9652 v2.AddArg2(v3, x)
9653 v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
9654 v4.AuxInt = int64ToAuxInt(int64(sdivisible64(c).a))
9655 v1.AddArg2(v2, v4)
9656 v5 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
9657 v5.AuxInt = int64ToAuxInt(64 - sdivisible64(c).k)
9658 v0.AddArg2(v1, v5)
9659 v6 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
9660 v6.AuxInt = int64ToAuxInt(int64(sdivisible64(c).max))
9661 v.AddArg2(v0, v6)
9662 return true
9663 }
9664 }
9665 }
9666 }
9667 break
9668 }
9669
9670
9671
9672 for {
9673 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
9674 n := v_0
9675 if v_1.Op != OpLsh64x64 {
9676 continue
9677 }
9678 _ = v_1.Args[1]
9679 v_1_0 := v_1.Args[0]
9680 if v_1_0.Op != OpRsh64x64 {
9681 continue
9682 }
9683 _ = v_1_0.Args[1]
9684 v_1_0_0 := v_1_0.Args[0]
9685 if v_1_0_0.Op != OpAdd64 {
9686 continue
9687 }
9688 t := v_1_0_0.Type
9689 _ = v_1_0_0.Args[1]
9690 v_1_0_0_0 := v_1_0_0.Args[0]
9691 v_1_0_0_1 := v_1_0_0.Args[1]
9692 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 {
9693 if n != v_1_0_0_0 || v_1_0_0_1.Op != OpRsh64Ux64 || v_1_0_0_1.Type != t {
9694 continue
9695 }
9696 _ = v_1_0_0_1.Args[1]
9697 v_1_0_0_1_0 := v_1_0_0_1.Args[0]
9698 if v_1_0_0_1_0.Op != OpRsh64x64 || v_1_0_0_1_0.Type != t {
9699 continue
9700 }
9701 _ = v_1_0_0_1_0.Args[1]
9702 if n != v_1_0_0_1_0.Args[0] {
9703 continue
9704 }
9705 v_1_0_0_1_0_1 := v_1_0_0_1_0.Args[1]
9706 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 {
9707 continue
9708 }
9709 v_1_0_0_1_1 := v_1_0_0_1.Args[1]
9710 if v_1_0_0_1_1.Op != OpConst64 || v_1_0_0_1_1.Type != typ.UInt64 {
9711 continue
9712 }
9713 kbar := auxIntToInt64(v_1_0_0_1_1.AuxInt)
9714 v_1_0_1 := v_1_0.Args[1]
9715 if v_1_0_1.Op != OpConst64 || v_1_0_1.Type != typ.UInt64 {
9716 continue
9717 }
9718 k := auxIntToInt64(v_1_0_1.AuxInt)
9719 v_1_1 := v_1.Args[1]
9720 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) {
9721 continue
9722 }
9723 v.reset(OpEq64)
9724 v0 := b.NewValue0(v.Pos, OpAnd64, t)
9725 v1 := b.NewValue0(v.Pos, OpConst64, t)
9726 v1.AuxInt = int64ToAuxInt(1<<uint(k) - 1)
9727 v0.AddArg2(n, v1)
9728 v2 := b.NewValue0(v.Pos, OpConst64, t)
9729 v2.AuxInt = int64ToAuxInt(0)
9730 v.AddArg2(v0, v2)
9731 return true
9732 }
9733 }
9734 break
9735 }
9736
9737
9738
9739 for {
9740 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
9741 s := v_0
9742 if s.Op != OpSub64 {
9743 continue
9744 }
9745 y := s.Args[1]
9746 x := s.Args[0]
9747 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 0 || !(s.Uses == 1) {
9748 continue
9749 }
9750 v.reset(OpEq64)
9751 v.AddArg2(x, y)
9752 return true
9753 }
9754 break
9755 }
9756
9757
9758
9759 for {
9760 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
9761 if v_0.Op != OpAnd64 {
9762 continue
9763 }
9764 t := v_0.Type
9765 _ = v_0.Args[1]
9766 v_0_0 := v_0.Args[0]
9767 v_0_1 := v_0.Args[1]
9768 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
9769 x := v_0_0
9770 if v_0_1.Op != OpConst64 || v_0_1.Type != t {
9771 continue
9772 }
9773 y := auxIntToInt64(v_0_1.AuxInt)
9774 if v_1.Op != OpConst64 || v_1.Type != t || auxIntToInt64(v_1.AuxInt) != y || !(oneBit64(y)) {
9775 continue
9776 }
9777 v.reset(OpNeq64)
9778 v0 := b.NewValue0(v.Pos, OpAnd64, t)
9779 v1 := b.NewValue0(v.Pos, OpConst64, t)
9780 v1.AuxInt = int64ToAuxInt(y)
9781 v0.AddArg2(x, v1)
9782 v2 := b.NewValue0(v.Pos, OpConst64, t)
9783 v2.AuxInt = int64ToAuxInt(0)
9784 v.AddArg2(v0, v2)
9785 return true
9786 }
9787 }
9788 break
9789 }
9790 return false
9791 }
9792 func rewriteValuegeneric_OpEq64F(v *Value) bool {
9793 v_1 := v.Args[1]
9794 v_0 := v.Args[0]
9795
9796
9797 for {
9798 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
9799 if v_0.Op != OpConst64F {
9800 continue
9801 }
9802 c := auxIntToFloat64(v_0.AuxInt)
9803 if v_1.Op != OpConst64F {
9804 continue
9805 }
9806 d := auxIntToFloat64(v_1.AuxInt)
9807 v.reset(OpConstBool)
9808 v.AuxInt = boolToAuxInt(c == d)
9809 return true
9810 }
9811 break
9812 }
9813 return false
9814 }
9815 func rewriteValuegeneric_OpEq8(v *Value) bool {
9816 v_1 := v.Args[1]
9817 v_0 := v.Args[0]
9818 b := v.Block
9819 config := b.Func.Config
9820 typ := &b.Func.Config.Types
9821
9822
9823 for {
9824 x := v_0
9825 if x != v_1 {
9826 break
9827 }
9828 v.reset(OpConstBool)
9829 v.AuxInt = boolToAuxInt(true)
9830 return true
9831 }
9832
9833
9834 for {
9835 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
9836 if v_0.Op != OpConst8 {
9837 continue
9838 }
9839 t := v_0.Type
9840 c := auxIntToInt8(v_0.AuxInt)
9841 if v_1.Op != OpAdd8 {
9842 continue
9843 }
9844 _ = v_1.Args[1]
9845 v_1_0 := v_1.Args[0]
9846 v_1_1 := v_1.Args[1]
9847 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
9848 if v_1_0.Op != OpConst8 || v_1_0.Type != t {
9849 continue
9850 }
9851 d := auxIntToInt8(v_1_0.AuxInt)
9852 x := v_1_1
9853 v.reset(OpEq8)
9854 v0 := b.NewValue0(v.Pos, OpConst8, t)
9855 v0.AuxInt = int8ToAuxInt(c - d)
9856 v.AddArg2(v0, x)
9857 return true
9858 }
9859 }
9860 break
9861 }
9862
9863
9864 for {
9865 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
9866 if v_0.Op != OpConst8 {
9867 continue
9868 }
9869 c := auxIntToInt8(v_0.AuxInt)
9870 if v_1.Op != OpConst8 {
9871 continue
9872 }
9873 d := auxIntToInt8(v_1.AuxInt)
9874 v.reset(OpConstBool)
9875 v.AuxInt = boolToAuxInt(c == d)
9876 return true
9877 }
9878 break
9879 }
9880
9881
9882
9883 for {
9884 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
9885 if v_0.Op != OpMod8u {
9886 continue
9887 }
9888 _ = v_0.Args[1]
9889 x := v_0.Args[0]
9890 v_0_1 := v_0.Args[1]
9891 if v_0_1.Op != OpConst8 {
9892 continue
9893 }
9894 c := auxIntToInt8(v_0_1.AuxInt)
9895 if v_1.Op != OpConst8 || auxIntToInt8(v_1.AuxInt) != 0 || !(x.Op != OpConst8 && udivisibleOK8(c) && !hasSmallRotate(config)) {
9896 continue
9897 }
9898 v.reset(OpEq32)
9899 v0 := b.NewValue0(v.Pos, OpMod32u, typ.UInt32)
9900 v1 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
9901 v1.AddArg(x)
9902 v2 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
9903 v2.AuxInt = int32ToAuxInt(int32(uint8(c)))
9904 v0.AddArg2(v1, v2)
9905 v3 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
9906 v3.AuxInt = int32ToAuxInt(0)
9907 v.AddArg2(v0, v3)
9908 return true
9909 }
9910 break
9911 }
9912
9913
9914
9915 for {
9916 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
9917 if v_0.Op != OpMod8 {
9918 continue
9919 }
9920 _ = v_0.Args[1]
9921 x := v_0.Args[0]
9922 v_0_1 := v_0.Args[1]
9923 if v_0_1.Op != OpConst8 {
9924 continue
9925 }
9926 c := auxIntToInt8(v_0_1.AuxInt)
9927 if v_1.Op != OpConst8 || auxIntToInt8(v_1.AuxInt) != 0 || !(x.Op != OpConst8 && sdivisibleOK8(c) && !hasSmallRotate(config)) {
9928 continue
9929 }
9930 v.reset(OpEq32)
9931 v0 := b.NewValue0(v.Pos, OpMod32, typ.Int32)
9932 v1 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
9933 v1.AddArg(x)
9934 v2 := b.NewValue0(v.Pos, OpConst32, typ.Int32)
9935 v2.AuxInt = int32ToAuxInt(int32(c))
9936 v0.AddArg2(v1, v2)
9937 v3 := b.NewValue0(v.Pos, OpConst32, typ.Int32)
9938 v3.AuxInt = int32ToAuxInt(0)
9939 v.AddArg2(v0, v3)
9940 return true
9941 }
9942 break
9943 }
9944
9945
9946
9947 for {
9948 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
9949 x := v_0
9950 if v_1.Op != OpMul8 {
9951 continue
9952 }
9953 _ = v_1.Args[1]
9954 v_1_0 := v_1.Args[0]
9955 v_1_1 := v_1.Args[1]
9956 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
9957 if v_1_0.Op != OpConst8 {
9958 continue
9959 }
9960 c := auxIntToInt8(v_1_0.AuxInt)
9961 if v_1_1.Op != OpTrunc32to8 {
9962 continue
9963 }
9964 v_1_1_0 := v_1_1.Args[0]
9965 if v_1_1_0.Op != OpRsh32Ux64 {
9966 continue
9967 }
9968 _ = v_1_1_0.Args[1]
9969 mul := v_1_1_0.Args[0]
9970 if mul.Op != OpMul32 {
9971 continue
9972 }
9973 _ = mul.Args[1]
9974 mul_0 := mul.Args[0]
9975 mul_1 := mul.Args[1]
9976 for _i2 := 0; _i2 <= 1; _i2, mul_0, mul_1 = _i2+1, mul_1, mul_0 {
9977 if mul_0.Op != OpConst32 {
9978 continue
9979 }
9980 m := auxIntToInt32(mul_0.AuxInt)
9981 if mul_1.Op != OpZeroExt8to32 || x != mul_1.Args[0] {
9982 continue
9983 }
9984 v_1_1_0_1 := v_1_1_0.Args[1]
9985 if v_1_1_0_1.Op != OpConst64 {
9986 continue
9987 }
9988 s := auxIntToInt64(v_1_1_0_1.AuxInt)
9989 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)) {
9990 continue
9991 }
9992 v.reset(OpLeq8U)
9993 v0 := b.NewValue0(v.Pos, OpRotateLeft8, typ.UInt8)
9994 v1 := b.NewValue0(v.Pos, OpMul8, typ.UInt8)
9995 v2 := b.NewValue0(v.Pos, OpConst8, typ.UInt8)
9996 v2.AuxInt = int8ToAuxInt(int8(udivisible8(c).m))
9997 v1.AddArg2(v2, x)
9998 v3 := b.NewValue0(v.Pos, OpConst8, typ.UInt8)
9999 v3.AuxInt = int8ToAuxInt(int8(8 - udivisible8(c).k))
10000 v0.AddArg2(v1, v3)
10001 v4 := b.NewValue0(v.Pos, OpConst8, typ.UInt8)
10002 v4.AuxInt = int8ToAuxInt(int8(udivisible8(c).max))
10003 v.AddArg2(v0, v4)
10004 return true
10005 }
10006 }
10007 }
10008 break
10009 }
10010
10011
10012
10013 for {
10014 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
10015 x := v_0
10016 if v_1.Op != OpMul8 {
10017 continue
10018 }
10019 _ = v_1.Args[1]
10020 v_1_0 := v_1.Args[0]
10021 v_1_1 := v_1.Args[1]
10022 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
10023 if v_1_0.Op != OpConst8 {
10024 continue
10025 }
10026 c := auxIntToInt8(v_1_0.AuxInt)
10027 if v_1_1.Op != OpSub8 {
10028 continue
10029 }
10030 _ = v_1_1.Args[1]
10031 v_1_1_0 := v_1_1.Args[0]
10032 if v_1_1_0.Op != OpRsh32x64 {
10033 continue
10034 }
10035 _ = v_1_1_0.Args[1]
10036 mul := v_1_1_0.Args[0]
10037 if mul.Op != OpMul32 {
10038 continue
10039 }
10040 _ = mul.Args[1]
10041 mul_0 := mul.Args[0]
10042 mul_1 := mul.Args[1]
10043 for _i2 := 0; _i2 <= 1; _i2, mul_0, mul_1 = _i2+1, mul_1, mul_0 {
10044 if mul_0.Op != OpConst32 {
10045 continue
10046 }
10047 m := auxIntToInt32(mul_0.AuxInt)
10048 if mul_1.Op != OpSignExt8to32 || x != mul_1.Args[0] {
10049 continue
10050 }
10051 v_1_1_0_1 := v_1_1_0.Args[1]
10052 if v_1_1_0_1.Op != OpConst64 {
10053 continue
10054 }
10055 s := auxIntToInt64(v_1_1_0_1.AuxInt)
10056 v_1_1_1 := v_1_1.Args[1]
10057 if v_1_1_1.Op != OpRsh32x64 {
10058 continue
10059 }
10060 _ = v_1_1_1.Args[1]
10061 v_1_1_1_0 := v_1_1_1.Args[0]
10062 if v_1_1_1_0.Op != OpSignExt8to32 || x != v_1_1_1_0.Args[0] {
10063 continue
10064 }
10065 v_1_1_1_1 := v_1_1_1.Args[1]
10066 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)) {
10067 continue
10068 }
10069 v.reset(OpLeq8U)
10070 v0 := b.NewValue0(v.Pos, OpRotateLeft8, typ.UInt8)
10071 v1 := b.NewValue0(v.Pos, OpAdd8, typ.UInt8)
10072 v2 := b.NewValue0(v.Pos, OpMul8, typ.UInt8)
10073 v3 := b.NewValue0(v.Pos, OpConst8, typ.UInt8)
10074 v3.AuxInt = int8ToAuxInt(int8(sdivisible8(c).m))
10075 v2.AddArg2(v3, x)
10076 v4 := b.NewValue0(v.Pos, OpConst8, typ.UInt8)
10077 v4.AuxInt = int8ToAuxInt(int8(sdivisible8(c).a))
10078 v1.AddArg2(v2, v4)
10079 v5 := b.NewValue0(v.Pos, OpConst8, typ.UInt8)
10080 v5.AuxInt = int8ToAuxInt(int8(8 - sdivisible8(c).k))
10081 v0.AddArg2(v1, v5)
10082 v6 := b.NewValue0(v.Pos, OpConst8, typ.UInt8)
10083 v6.AuxInt = int8ToAuxInt(int8(sdivisible8(c).max))
10084 v.AddArg2(v0, v6)
10085 return true
10086 }
10087 }
10088 }
10089 break
10090 }
10091
10092
10093
10094 for {
10095 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
10096 n := v_0
10097 if v_1.Op != OpLsh8x64 {
10098 continue
10099 }
10100 _ = v_1.Args[1]
10101 v_1_0 := v_1.Args[0]
10102 if v_1_0.Op != OpRsh8x64 {
10103 continue
10104 }
10105 _ = v_1_0.Args[1]
10106 v_1_0_0 := v_1_0.Args[0]
10107 if v_1_0_0.Op != OpAdd8 {
10108 continue
10109 }
10110 t := v_1_0_0.Type
10111 _ = v_1_0_0.Args[1]
10112 v_1_0_0_0 := v_1_0_0.Args[0]
10113 v_1_0_0_1 := v_1_0_0.Args[1]
10114 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 {
10115 if n != v_1_0_0_0 || v_1_0_0_1.Op != OpRsh8Ux64 || v_1_0_0_1.Type != t {
10116 continue
10117 }
10118 _ = v_1_0_0_1.Args[1]
10119 v_1_0_0_1_0 := v_1_0_0_1.Args[0]
10120 if v_1_0_0_1_0.Op != OpRsh8x64 || v_1_0_0_1_0.Type != t {
10121 continue
10122 }
10123 _ = v_1_0_0_1_0.Args[1]
10124 if n != v_1_0_0_1_0.Args[0] {
10125 continue
10126 }
10127 v_1_0_0_1_0_1 := v_1_0_0_1_0.Args[1]
10128 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 {
10129 continue
10130 }
10131 v_1_0_0_1_1 := v_1_0_0_1.Args[1]
10132 if v_1_0_0_1_1.Op != OpConst64 || v_1_0_0_1_1.Type != typ.UInt64 {
10133 continue
10134 }
10135 kbar := auxIntToInt64(v_1_0_0_1_1.AuxInt)
10136 v_1_0_1 := v_1_0.Args[1]
10137 if v_1_0_1.Op != OpConst64 || v_1_0_1.Type != typ.UInt64 {
10138 continue
10139 }
10140 k := auxIntToInt64(v_1_0_1.AuxInt)
10141 v_1_1 := v_1.Args[1]
10142 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) {
10143 continue
10144 }
10145 v.reset(OpEq8)
10146 v0 := b.NewValue0(v.Pos, OpAnd8, t)
10147 v1 := b.NewValue0(v.Pos, OpConst8, t)
10148 v1.AuxInt = int8ToAuxInt(1<<uint(k) - 1)
10149 v0.AddArg2(n, v1)
10150 v2 := b.NewValue0(v.Pos, OpConst8, t)
10151 v2.AuxInt = int8ToAuxInt(0)
10152 v.AddArg2(v0, v2)
10153 return true
10154 }
10155 }
10156 break
10157 }
10158
10159
10160
10161 for {
10162 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
10163 s := v_0
10164 if s.Op != OpSub8 {
10165 continue
10166 }
10167 y := s.Args[1]
10168 x := s.Args[0]
10169 if v_1.Op != OpConst8 || auxIntToInt8(v_1.AuxInt) != 0 || !(s.Uses == 1) {
10170 continue
10171 }
10172 v.reset(OpEq8)
10173 v.AddArg2(x, y)
10174 return true
10175 }
10176 break
10177 }
10178
10179
10180
10181 for {
10182 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
10183 if v_0.Op != OpAnd8 {
10184 continue
10185 }
10186 t := v_0.Type
10187 _ = v_0.Args[1]
10188 v_0_0 := v_0.Args[0]
10189 v_0_1 := v_0.Args[1]
10190 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
10191 x := v_0_0
10192 if v_0_1.Op != OpConst8 || v_0_1.Type != t {
10193 continue
10194 }
10195 y := auxIntToInt8(v_0_1.AuxInt)
10196 if v_1.Op != OpConst8 || v_1.Type != t || auxIntToInt8(v_1.AuxInt) != y || !(oneBit8(y)) {
10197 continue
10198 }
10199 v.reset(OpNeq8)
10200 v0 := b.NewValue0(v.Pos, OpAnd8, t)
10201 v1 := b.NewValue0(v.Pos, OpConst8, t)
10202 v1.AuxInt = int8ToAuxInt(y)
10203 v0.AddArg2(x, v1)
10204 v2 := b.NewValue0(v.Pos, OpConst8, t)
10205 v2.AuxInt = int8ToAuxInt(0)
10206 v.AddArg2(v0, v2)
10207 return true
10208 }
10209 }
10210 break
10211 }
10212 return false
10213 }
10214 func rewriteValuegeneric_OpEqB(v *Value) bool {
10215 v_1 := v.Args[1]
10216 v_0 := v.Args[0]
10217
10218
10219 for {
10220 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
10221 if v_0.Op != OpConstBool {
10222 continue
10223 }
10224 c := auxIntToBool(v_0.AuxInt)
10225 if v_1.Op != OpConstBool {
10226 continue
10227 }
10228 d := auxIntToBool(v_1.AuxInt)
10229 v.reset(OpConstBool)
10230 v.AuxInt = boolToAuxInt(c == d)
10231 return true
10232 }
10233 break
10234 }
10235
10236
10237 for {
10238 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
10239 if v_0.Op != OpConstBool || auxIntToBool(v_0.AuxInt) != false {
10240 continue
10241 }
10242 x := v_1
10243 v.reset(OpNot)
10244 v.AddArg(x)
10245 return true
10246 }
10247 break
10248 }
10249
10250
10251 for {
10252 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
10253 if v_0.Op != OpConstBool || auxIntToBool(v_0.AuxInt) != true {
10254 continue
10255 }
10256 x := v_1
10257 v.copyOf(x)
10258 return true
10259 }
10260 break
10261 }
10262 return false
10263 }
10264 func rewriteValuegeneric_OpEqInter(v *Value) bool {
10265 v_1 := v.Args[1]
10266 v_0 := v.Args[0]
10267 b := v.Block
10268 typ := &b.Func.Config.Types
10269
10270
10271 for {
10272 x := v_0
10273 y := v_1
10274 v.reset(OpEqPtr)
10275 v0 := b.NewValue0(v.Pos, OpITab, typ.Uintptr)
10276 v0.AddArg(x)
10277 v1 := b.NewValue0(v.Pos, OpITab, typ.Uintptr)
10278 v1.AddArg(y)
10279 v.AddArg2(v0, v1)
10280 return true
10281 }
10282 }
10283 func rewriteValuegeneric_OpEqPtr(v *Value) bool {
10284 v_1 := v.Args[1]
10285 v_0 := v.Args[0]
10286 b := v.Block
10287 typ := &b.Func.Config.Types
10288
10289
10290 for {
10291 x := v_0
10292 if x != v_1 {
10293 break
10294 }
10295 v.reset(OpConstBool)
10296 v.AuxInt = boolToAuxInt(true)
10297 return true
10298 }
10299
10300
10301 for {
10302 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
10303 if v_0.Op != OpAddr {
10304 continue
10305 }
10306 x := auxToSym(v_0.Aux)
10307 if v_1.Op != OpAddr {
10308 continue
10309 }
10310 y := auxToSym(v_1.Aux)
10311 v.reset(OpConstBool)
10312 v.AuxInt = boolToAuxInt(x == y)
10313 return true
10314 }
10315 break
10316 }
10317
10318
10319 for {
10320 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
10321 if v_0.Op != OpAddr {
10322 continue
10323 }
10324 x := auxToSym(v_0.Aux)
10325 if v_1.Op != OpOffPtr {
10326 continue
10327 }
10328 o := auxIntToInt64(v_1.AuxInt)
10329 v_1_0 := v_1.Args[0]
10330 if v_1_0.Op != OpAddr {
10331 continue
10332 }
10333 y := auxToSym(v_1_0.Aux)
10334 v.reset(OpConstBool)
10335 v.AuxInt = boolToAuxInt(x == y && o == 0)
10336 return true
10337 }
10338 break
10339 }
10340
10341
10342 for {
10343 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
10344 if v_0.Op != OpOffPtr {
10345 continue
10346 }
10347 o1 := auxIntToInt64(v_0.AuxInt)
10348 v_0_0 := v_0.Args[0]
10349 if v_0_0.Op != OpAddr {
10350 continue
10351 }
10352 x := auxToSym(v_0_0.Aux)
10353 if v_1.Op != OpOffPtr {
10354 continue
10355 }
10356 o2 := auxIntToInt64(v_1.AuxInt)
10357 v_1_0 := v_1.Args[0]
10358 if v_1_0.Op != OpAddr {
10359 continue
10360 }
10361 y := auxToSym(v_1_0.Aux)
10362 v.reset(OpConstBool)
10363 v.AuxInt = boolToAuxInt(x == y && o1 == o2)
10364 return true
10365 }
10366 break
10367 }
10368
10369
10370 for {
10371 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
10372 if v_0.Op != OpLocalAddr {
10373 continue
10374 }
10375 x := auxToSym(v_0.Aux)
10376 if v_1.Op != OpLocalAddr {
10377 continue
10378 }
10379 y := auxToSym(v_1.Aux)
10380 v.reset(OpConstBool)
10381 v.AuxInt = boolToAuxInt(x == y)
10382 return true
10383 }
10384 break
10385 }
10386
10387
10388 for {
10389 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
10390 if v_0.Op != OpLocalAddr {
10391 continue
10392 }
10393 x := auxToSym(v_0.Aux)
10394 if v_1.Op != OpOffPtr {
10395 continue
10396 }
10397 o := auxIntToInt64(v_1.AuxInt)
10398 v_1_0 := v_1.Args[0]
10399 if v_1_0.Op != OpLocalAddr {
10400 continue
10401 }
10402 y := auxToSym(v_1_0.Aux)
10403 v.reset(OpConstBool)
10404 v.AuxInt = boolToAuxInt(x == y && o == 0)
10405 return true
10406 }
10407 break
10408 }
10409
10410
10411 for {
10412 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
10413 if v_0.Op != OpOffPtr {
10414 continue
10415 }
10416 o1 := auxIntToInt64(v_0.AuxInt)
10417 v_0_0 := v_0.Args[0]
10418 if v_0_0.Op != OpLocalAddr {
10419 continue
10420 }
10421 x := auxToSym(v_0_0.Aux)
10422 if v_1.Op != OpOffPtr {
10423 continue
10424 }
10425 o2 := auxIntToInt64(v_1.AuxInt)
10426 v_1_0 := v_1.Args[0]
10427 if v_1_0.Op != OpLocalAddr {
10428 continue
10429 }
10430 y := auxToSym(v_1_0.Aux)
10431 v.reset(OpConstBool)
10432 v.AuxInt = boolToAuxInt(x == y && o1 == o2)
10433 return true
10434 }
10435 break
10436 }
10437
10438
10439
10440 for {
10441 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
10442 if v_0.Op != OpOffPtr {
10443 continue
10444 }
10445 o1 := auxIntToInt64(v_0.AuxInt)
10446 p1 := v_0.Args[0]
10447 p2 := v_1
10448 if !(isSamePtr(p1, p2)) {
10449 continue
10450 }
10451 v.reset(OpConstBool)
10452 v.AuxInt = boolToAuxInt(o1 == 0)
10453 return true
10454 }
10455 break
10456 }
10457
10458
10459
10460 for {
10461 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
10462 if v_0.Op != OpOffPtr {
10463 continue
10464 }
10465 o1 := auxIntToInt64(v_0.AuxInt)
10466 p1 := v_0.Args[0]
10467 if v_1.Op != OpOffPtr {
10468 continue
10469 }
10470 o2 := auxIntToInt64(v_1.AuxInt)
10471 p2 := v_1.Args[0]
10472 if !(isSamePtr(p1, p2)) {
10473 continue
10474 }
10475 v.reset(OpConstBool)
10476 v.AuxInt = boolToAuxInt(o1 == o2)
10477 return true
10478 }
10479 break
10480 }
10481
10482
10483 for {
10484 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
10485 if v_0.Op != OpConst32 {
10486 continue
10487 }
10488 c := auxIntToInt32(v_0.AuxInt)
10489 if v_1.Op != OpConst32 {
10490 continue
10491 }
10492 d := auxIntToInt32(v_1.AuxInt)
10493 v.reset(OpConstBool)
10494 v.AuxInt = boolToAuxInt(c == d)
10495 return true
10496 }
10497 break
10498 }
10499
10500
10501 for {
10502 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
10503 if v_0.Op != OpConst64 {
10504 continue
10505 }
10506 c := auxIntToInt64(v_0.AuxInt)
10507 if v_1.Op != OpConst64 {
10508 continue
10509 }
10510 d := auxIntToInt64(v_1.AuxInt)
10511 v.reset(OpConstBool)
10512 v.AuxInt = boolToAuxInt(c == d)
10513 return true
10514 }
10515 break
10516 }
10517
10518
10519 for {
10520 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
10521 if v_0.Op != OpConvert {
10522 continue
10523 }
10524 v_0_0 := v_0.Args[0]
10525 if v_0_0.Op != OpAddr {
10526 continue
10527 }
10528 x := auxToSym(v_0_0.Aux)
10529 if v_1.Op != OpAddr {
10530 continue
10531 }
10532 y := auxToSym(v_1.Aux)
10533 v.reset(OpConstBool)
10534 v.AuxInt = boolToAuxInt(x == y)
10535 return true
10536 }
10537 break
10538 }
10539
10540
10541 for {
10542 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
10543 if v_0.Op != OpLocalAddr || v_1.Op != OpAddr {
10544 continue
10545 }
10546 v.reset(OpConstBool)
10547 v.AuxInt = boolToAuxInt(false)
10548 return true
10549 }
10550 break
10551 }
10552
10553
10554 for {
10555 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
10556 if v_0.Op != OpOffPtr {
10557 continue
10558 }
10559 v_0_0 := v_0.Args[0]
10560 if v_0_0.Op != OpLocalAddr || v_1.Op != OpAddr {
10561 continue
10562 }
10563 v.reset(OpConstBool)
10564 v.AuxInt = boolToAuxInt(false)
10565 return true
10566 }
10567 break
10568 }
10569
10570
10571 for {
10572 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
10573 if v_0.Op != OpLocalAddr || v_1.Op != OpOffPtr {
10574 continue
10575 }
10576 v_1_0 := v_1.Args[0]
10577 if v_1_0.Op != OpAddr {
10578 continue
10579 }
10580 v.reset(OpConstBool)
10581 v.AuxInt = boolToAuxInt(false)
10582 return true
10583 }
10584 break
10585 }
10586
10587
10588 for {
10589 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
10590 if v_0.Op != OpOffPtr {
10591 continue
10592 }
10593 v_0_0 := v_0.Args[0]
10594 if v_0_0.Op != OpLocalAddr || v_1.Op != OpOffPtr {
10595 continue
10596 }
10597 v_1_0 := v_1.Args[0]
10598 if v_1_0.Op != OpAddr {
10599 continue
10600 }
10601 v.reset(OpConstBool)
10602 v.AuxInt = boolToAuxInt(false)
10603 return true
10604 }
10605 break
10606 }
10607
10608
10609
10610 for {
10611 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
10612 if v_0.Op != OpAddPtr {
10613 continue
10614 }
10615 o1 := v_0.Args[1]
10616 p1 := v_0.Args[0]
10617 p2 := v_1
10618 if !(isSamePtr(p1, p2)) {
10619 continue
10620 }
10621 v.reset(OpNot)
10622 v0 := b.NewValue0(v.Pos, OpIsNonNil, typ.Bool)
10623 v0.AddArg(o1)
10624 v.AddArg(v0)
10625 return true
10626 }
10627 break
10628 }
10629
10630
10631 for {
10632 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
10633 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
10634 continue
10635 }
10636 p := v_1
10637 v.reset(OpNot)
10638 v0 := b.NewValue0(v.Pos, OpIsNonNil, typ.Bool)
10639 v0.AddArg(p)
10640 v.AddArg(v0)
10641 return true
10642 }
10643 break
10644 }
10645
10646
10647 for {
10648 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
10649 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
10650 continue
10651 }
10652 p := v_1
10653 v.reset(OpNot)
10654 v0 := b.NewValue0(v.Pos, OpIsNonNil, typ.Bool)
10655 v0.AddArg(p)
10656 v.AddArg(v0)
10657 return true
10658 }
10659 break
10660 }
10661
10662
10663 for {
10664 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
10665 if v_0.Op != OpConstNil {
10666 continue
10667 }
10668 p := v_1
10669 v.reset(OpNot)
10670 v0 := b.NewValue0(v.Pos, OpIsNonNil, typ.Bool)
10671 v0.AddArg(p)
10672 v.AddArg(v0)
10673 return true
10674 }
10675 break
10676 }
10677 return false
10678 }
10679 func rewriteValuegeneric_OpEqSlice(v *Value) bool {
10680 v_1 := v.Args[1]
10681 v_0 := v.Args[0]
10682 b := v.Block
10683 typ := &b.Func.Config.Types
10684
10685
10686 for {
10687 x := v_0
10688 y := v_1
10689 v.reset(OpEqPtr)
10690 v0 := b.NewValue0(v.Pos, OpSlicePtr, typ.BytePtr)
10691 v0.AddArg(x)
10692 v1 := b.NewValue0(v.Pos, OpSlicePtr, typ.BytePtr)
10693 v1.AddArg(y)
10694 v.AddArg2(v0, v1)
10695 return true
10696 }
10697 }
10698 func rewriteValuegeneric_OpFloor(v *Value) bool {
10699 v_0 := v.Args[0]
10700
10701
10702 for {
10703 if v_0.Op != OpConst64F {
10704 break
10705 }
10706 c := auxIntToFloat64(v_0.AuxInt)
10707 v.reset(OpConst64F)
10708 v.AuxInt = float64ToAuxInt(math.Floor(c))
10709 return true
10710 }
10711 return false
10712 }
10713 func rewriteValuegeneric_OpIMake(v *Value) bool {
10714 v_1 := v.Args[1]
10715 v_0 := v.Args[0]
10716
10717
10718 for {
10719 _typ := v_0
10720 if v_1.Op != OpStructMake || len(v_1.Args) != 1 {
10721 break
10722 }
10723 val := v_1.Args[0]
10724 v.reset(OpIMake)
10725 v.AddArg2(_typ, val)
10726 return true
10727 }
10728
10729
10730 for {
10731 _typ := v_0
10732 if v_1.Op != OpArrayMake1 {
10733 break
10734 }
10735 val := v_1.Args[0]
10736 v.reset(OpIMake)
10737 v.AddArg2(_typ, val)
10738 return true
10739 }
10740 return false
10741 }
10742 func rewriteValuegeneric_OpInterLECall(v *Value) bool {
10743
10744
10745 for {
10746 if len(v.Args) < 1 {
10747 break
10748 }
10749 v_0 := v.Args[0]
10750 if v_0.Op != OpAddr {
10751 break
10752 }
10753 fn := auxToSym(v_0.Aux)
10754 v_0_0 := v_0.Args[0]
10755 if v_0_0.Op != OpSB {
10756 break
10757 }
10758 v.copyOf(devirtLECall(v, fn.(*obj.LSym)))
10759 return true
10760 }
10761 return false
10762 }
10763 func rewriteValuegeneric_OpIsInBounds(v *Value) bool {
10764 v_1 := v.Args[1]
10765 v_0 := v.Args[0]
10766
10767
10768
10769 for {
10770 if v_0.Op != OpZeroExt8to32 || v_1.Op != OpConst32 {
10771 break
10772 }
10773 c := auxIntToInt32(v_1.AuxInt)
10774 if !((1 << 8) <= c) {
10775 break
10776 }
10777 v.reset(OpConstBool)
10778 v.AuxInt = boolToAuxInt(true)
10779 return true
10780 }
10781
10782
10783
10784 for {
10785 if v_0.Op != OpZeroExt8to64 || v_1.Op != OpConst64 {
10786 break
10787 }
10788 c := auxIntToInt64(v_1.AuxInt)
10789 if !((1 << 8) <= c) {
10790 break
10791 }
10792 v.reset(OpConstBool)
10793 v.AuxInt = boolToAuxInt(true)
10794 return true
10795 }
10796
10797
10798
10799 for {
10800 if v_0.Op != OpZeroExt16to32 || v_1.Op != OpConst32 {
10801 break
10802 }
10803 c := auxIntToInt32(v_1.AuxInt)
10804 if !((1 << 16) <= c) {
10805 break
10806 }
10807 v.reset(OpConstBool)
10808 v.AuxInt = boolToAuxInt(true)
10809 return true
10810 }
10811
10812
10813
10814 for {
10815 if v_0.Op != OpZeroExt16to64 || v_1.Op != OpConst64 {
10816 break
10817 }
10818 c := auxIntToInt64(v_1.AuxInt)
10819 if !((1 << 16) <= c) {
10820 break
10821 }
10822 v.reset(OpConstBool)
10823 v.AuxInt = boolToAuxInt(true)
10824 return true
10825 }
10826
10827
10828 for {
10829 x := v_0
10830 if x != v_1 {
10831 break
10832 }
10833 v.reset(OpConstBool)
10834 v.AuxInt = boolToAuxInt(false)
10835 return true
10836 }
10837
10838
10839
10840 for {
10841 if v_0.Op != OpAnd8 {
10842 break
10843 }
10844 v_0_0 := v_0.Args[0]
10845 v_0_1 := v_0.Args[1]
10846 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
10847 if v_0_0.Op != OpConst8 {
10848 continue
10849 }
10850 c := auxIntToInt8(v_0_0.AuxInt)
10851 if v_1.Op != OpConst8 {
10852 continue
10853 }
10854 d := auxIntToInt8(v_1.AuxInt)
10855 if !(0 <= c && c < d) {
10856 continue
10857 }
10858 v.reset(OpConstBool)
10859 v.AuxInt = boolToAuxInt(true)
10860 return true
10861 }
10862 break
10863 }
10864
10865
10866
10867 for {
10868 if v_0.Op != OpZeroExt8to16 {
10869 break
10870 }
10871 v_0_0 := v_0.Args[0]
10872 if v_0_0.Op != OpAnd8 {
10873 break
10874 }
10875 v_0_0_0 := v_0_0.Args[0]
10876 v_0_0_1 := v_0_0.Args[1]
10877 for _i0 := 0; _i0 <= 1; _i0, v_0_0_0, v_0_0_1 = _i0+1, v_0_0_1, v_0_0_0 {
10878 if v_0_0_0.Op != OpConst8 {
10879 continue
10880 }
10881 c := auxIntToInt8(v_0_0_0.AuxInt)
10882 if v_1.Op != OpConst16 {
10883 continue
10884 }
10885 d := auxIntToInt16(v_1.AuxInt)
10886 if !(0 <= c && int16(c) < d) {
10887 continue
10888 }
10889 v.reset(OpConstBool)
10890 v.AuxInt = boolToAuxInt(true)
10891 return true
10892 }
10893 break
10894 }
10895
10896
10897
10898 for {
10899 if v_0.Op != OpZeroExt8to32 {
10900 break
10901 }
10902 v_0_0 := v_0.Args[0]
10903 if v_0_0.Op != OpAnd8 {
10904 break
10905 }
10906 v_0_0_0 := v_0_0.Args[0]
10907 v_0_0_1 := v_0_0.Args[1]
10908 for _i0 := 0; _i0 <= 1; _i0, v_0_0_0, v_0_0_1 = _i0+1, v_0_0_1, v_0_0_0 {
10909 if v_0_0_0.Op != OpConst8 {
10910 continue
10911 }
10912 c := auxIntToInt8(v_0_0_0.AuxInt)
10913 if v_1.Op != OpConst32 {
10914 continue
10915 }
10916 d := auxIntToInt32(v_1.AuxInt)
10917 if !(0 <= c && int32(c) < d) {
10918 continue
10919 }
10920 v.reset(OpConstBool)
10921 v.AuxInt = boolToAuxInt(true)
10922 return true
10923 }
10924 break
10925 }
10926
10927
10928
10929 for {
10930 if v_0.Op != OpZeroExt8to64 {
10931 break
10932 }
10933 v_0_0 := v_0.Args[0]
10934 if v_0_0.Op != OpAnd8 {
10935 break
10936 }
10937 v_0_0_0 := v_0_0.Args[0]
10938 v_0_0_1 := v_0_0.Args[1]
10939 for _i0 := 0; _i0 <= 1; _i0, v_0_0_0, v_0_0_1 = _i0+1, v_0_0_1, v_0_0_0 {
10940 if v_0_0_0.Op != OpConst8 {
10941 continue
10942 }
10943 c := auxIntToInt8(v_0_0_0.AuxInt)
10944 if v_1.Op != OpConst64 {
10945 continue
10946 }
10947 d := auxIntToInt64(v_1.AuxInt)
10948 if !(0 <= c && int64(c) < d) {
10949 continue
10950 }
10951 v.reset(OpConstBool)
10952 v.AuxInt = boolToAuxInt(true)
10953 return true
10954 }
10955 break
10956 }
10957
10958
10959
10960 for {
10961 if v_0.Op != OpAnd16 {
10962 break
10963 }
10964 v_0_0 := v_0.Args[0]
10965 v_0_1 := v_0.Args[1]
10966 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
10967 if v_0_0.Op != OpConst16 {
10968 continue
10969 }
10970 c := auxIntToInt16(v_0_0.AuxInt)
10971 if v_1.Op != OpConst16 {
10972 continue
10973 }
10974 d := auxIntToInt16(v_1.AuxInt)
10975 if !(0 <= c && c < d) {
10976 continue
10977 }
10978 v.reset(OpConstBool)
10979 v.AuxInt = boolToAuxInt(true)
10980 return true
10981 }
10982 break
10983 }
10984
10985
10986
10987 for {
10988 if v_0.Op != OpZeroExt16to32 {
10989 break
10990 }
10991 v_0_0 := v_0.Args[0]
10992 if v_0_0.Op != OpAnd16 {
10993 break
10994 }
10995 v_0_0_0 := v_0_0.Args[0]
10996 v_0_0_1 := v_0_0.Args[1]
10997 for _i0 := 0; _i0 <= 1; _i0, v_0_0_0, v_0_0_1 = _i0+1, v_0_0_1, v_0_0_0 {
10998 if v_0_0_0.Op != OpConst16 {
10999 continue
11000 }
11001 c := auxIntToInt16(v_0_0_0.AuxInt)
11002 if v_1.Op != OpConst32 {
11003 continue
11004 }
11005 d := auxIntToInt32(v_1.AuxInt)
11006 if !(0 <= c && int32(c) < d) {
11007 continue
11008 }
11009 v.reset(OpConstBool)
11010 v.AuxInt = boolToAuxInt(true)
11011 return true
11012 }
11013 break
11014 }
11015
11016
11017
11018 for {
11019 if v_0.Op != OpZeroExt16to64 {
11020 break
11021 }
11022 v_0_0 := v_0.Args[0]
11023 if v_0_0.Op != OpAnd16 {
11024 break
11025 }
11026 v_0_0_0 := v_0_0.Args[0]
11027 v_0_0_1 := v_0_0.Args[1]
11028 for _i0 := 0; _i0 <= 1; _i0, v_0_0_0, v_0_0_1 = _i0+1, v_0_0_1, v_0_0_0 {
11029 if v_0_0_0.Op != OpConst16 {
11030 continue
11031 }
11032 c := auxIntToInt16(v_0_0_0.AuxInt)
11033 if v_1.Op != OpConst64 {
11034 continue
11035 }
11036 d := auxIntToInt64(v_1.AuxInt)
11037 if !(0 <= c && int64(c) < d) {
11038 continue
11039 }
11040 v.reset(OpConstBool)
11041 v.AuxInt = boolToAuxInt(true)
11042 return true
11043 }
11044 break
11045 }
11046
11047
11048
11049 for {
11050 if v_0.Op != OpAnd32 {
11051 break
11052 }
11053 v_0_0 := v_0.Args[0]
11054 v_0_1 := v_0.Args[1]
11055 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
11056 if v_0_0.Op != OpConst32 {
11057 continue
11058 }
11059 c := auxIntToInt32(v_0_0.AuxInt)
11060 if v_1.Op != OpConst32 {
11061 continue
11062 }
11063 d := auxIntToInt32(v_1.AuxInt)
11064 if !(0 <= c && c < d) {
11065 continue
11066 }
11067 v.reset(OpConstBool)
11068 v.AuxInt = boolToAuxInt(true)
11069 return true
11070 }
11071 break
11072 }
11073
11074
11075
11076 for {
11077 if v_0.Op != OpZeroExt32to64 {
11078 break
11079 }
11080 v_0_0 := v_0.Args[0]
11081 if v_0_0.Op != OpAnd32 {
11082 break
11083 }
11084 v_0_0_0 := v_0_0.Args[0]
11085 v_0_0_1 := v_0_0.Args[1]
11086 for _i0 := 0; _i0 <= 1; _i0, v_0_0_0, v_0_0_1 = _i0+1, v_0_0_1, v_0_0_0 {
11087 if v_0_0_0.Op != OpConst32 {
11088 continue
11089 }
11090 c := auxIntToInt32(v_0_0_0.AuxInt)
11091 if v_1.Op != OpConst64 {
11092 continue
11093 }
11094 d := auxIntToInt64(v_1.AuxInt)
11095 if !(0 <= c && int64(c) < d) {
11096 continue
11097 }
11098 v.reset(OpConstBool)
11099 v.AuxInt = boolToAuxInt(true)
11100 return true
11101 }
11102 break
11103 }
11104
11105
11106
11107 for {
11108 if v_0.Op != OpAnd64 {
11109 break
11110 }
11111 v_0_0 := v_0.Args[0]
11112 v_0_1 := v_0.Args[1]
11113 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
11114 if v_0_0.Op != OpConst64 {
11115 continue
11116 }
11117 c := auxIntToInt64(v_0_0.AuxInt)
11118 if v_1.Op != OpConst64 {
11119 continue
11120 }
11121 d := auxIntToInt64(v_1.AuxInt)
11122 if !(0 <= c && c < d) {
11123 continue
11124 }
11125 v.reset(OpConstBool)
11126 v.AuxInt = boolToAuxInt(true)
11127 return true
11128 }
11129 break
11130 }
11131
11132
11133 for {
11134 if v_0.Op != OpConst32 {
11135 break
11136 }
11137 c := auxIntToInt32(v_0.AuxInt)
11138 if v_1.Op != OpConst32 {
11139 break
11140 }
11141 d := auxIntToInt32(v_1.AuxInt)
11142 v.reset(OpConstBool)
11143 v.AuxInt = boolToAuxInt(0 <= c && c < d)
11144 return true
11145 }
11146
11147
11148 for {
11149 if v_0.Op != OpConst64 {
11150 break
11151 }
11152 c := auxIntToInt64(v_0.AuxInt)
11153 if v_1.Op != OpConst64 {
11154 break
11155 }
11156 d := auxIntToInt64(v_1.AuxInt)
11157 v.reset(OpConstBool)
11158 v.AuxInt = boolToAuxInt(0 <= c && c < d)
11159 return true
11160 }
11161
11162
11163 for {
11164 if v_0.Op != OpMod32u {
11165 break
11166 }
11167 y := v_0.Args[1]
11168 if y != v_1 {
11169 break
11170 }
11171 v.reset(OpConstBool)
11172 v.AuxInt = boolToAuxInt(true)
11173 return true
11174 }
11175
11176
11177 for {
11178 if v_0.Op != OpMod64u {
11179 break
11180 }
11181 y := v_0.Args[1]
11182 if y != v_1 {
11183 break
11184 }
11185 v.reset(OpConstBool)
11186 v.AuxInt = boolToAuxInt(true)
11187 return true
11188 }
11189
11190
11191
11192 for {
11193 if v_0.Op != OpZeroExt8to64 {
11194 break
11195 }
11196 v_0_0 := v_0.Args[0]
11197 if v_0_0.Op != OpRsh8Ux64 {
11198 break
11199 }
11200 _ = v_0_0.Args[1]
11201 v_0_0_1 := v_0_0.Args[1]
11202 if v_0_0_1.Op != OpConst64 {
11203 break
11204 }
11205 c := auxIntToInt64(v_0_0_1.AuxInt)
11206 if v_1.Op != OpConst64 {
11207 break
11208 }
11209 d := auxIntToInt64(v_1.AuxInt)
11210 if !(0 < c && c < 8 && 1<<uint(8-c)-1 < d) {
11211 break
11212 }
11213 v.reset(OpConstBool)
11214 v.AuxInt = boolToAuxInt(true)
11215 return true
11216 }
11217
11218
11219
11220 for {
11221 if v_0.Op != OpZeroExt8to32 {
11222 break
11223 }
11224 v_0_0 := v_0.Args[0]
11225 if v_0_0.Op != OpRsh8Ux64 {
11226 break
11227 }
11228 _ = v_0_0.Args[1]
11229 v_0_0_1 := v_0_0.Args[1]
11230 if v_0_0_1.Op != OpConst64 {
11231 break
11232 }
11233 c := auxIntToInt64(v_0_0_1.AuxInt)
11234 if v_1.Op != OpConst32 {
11235 break
11236 }
11237 d := auxIntToInt32(v_1.AuxInt)
11238 if !(0 < c && c < 8 && 1<<uint(8-c)-1 < d) {
11239 break
11240 }
11241 v.reset(OpConstBool)
11242 v.AuxInt = boolToAuxInt(true)
11243 return true
11244 }
11245
11246
11247
11248 for {
11249 if v_0.Op != OpZeroExt8to16 {
11250 break
11251 }
11252 v_0_0 := v_0.Args[0]
11253 if v_0_0.Op != OpRsh8Ux64 {
11254 break
11255 }
11256 _ = v_0_0.Args[1]
11257 v_0_0_1 := v_0_0.Args[1]
11258 if v_0_0_1.Op != OpConst64 {
11259 break
11260 }
11261 c := auxIntToInt64(v_0_0_1.AuxInt)
11262 if v_1.Op != OpConst16 {
11263 break
11264 }
11265 d := auxIntToInt16(v_1.AuxInt)
11266 if !(0 < c && c < 8 && 1<<uint(8-c)-1 < d) {
11267 break
11268 }
11269 v.reset(OpConstBool)
11270 v.AuxInt = boolToAuxInt(true)
11271 return true
11272 }
11273
11274
11275
11276 for {
11277 if v_0.Op != OpRsh8Ux64 {
11278 break
11279 }
11280 _ = v_0.Args[1]
11281 v_0_1 := v_0.Args[1]
11282 if v_0_1.Op != OpConst64 {
11283 break
11284 }
11285 c := auxIntToInt64(v_0_1.AuxInt)
11286 if v_1.Op != OpConst64 {
11287 break
11288 }
11289 d := auxIntToInt64(v_1.AuxInt)
11290 if !(0 < c && c < 8 && 1<<uint(8-c)-1 < d) {
11291 break
11292 }
11293 v.reset(OpConstBool)
11294 v.AuxInt = boolToAuxInt(true)
11295 return true
11296 }
11297
11298
11299
11300 for {
11301 if v_0.Op != OpZeroExt16to64 {
11302 break
11303 }
11304 v_0_0 := v_0.Args[0]
11305 if v_0_0.Op != OpRsh16Ux64 {
11306 break
11307 }
11308 _ = v_0_0.Args[1]
11309 v_0_0_1 := v_0_0.Args[1]
11310 if v_0_0_1.Op != OpConst64 {
11311 break
11312 }
11313 c := auxIntToInt64(v_0_0_1.AuxInt)
11314 if v_1.Op != OpConst64 {
11315 break
11316 }
11317 d := auxIntToInt64(v_1.AuxInt)
11318 if !(0 < c && c < 16 && 1<<uint(16-c)-1 < d) {
11319 break
11320 }
11321 v.reset(OpConstBool)
11322 v.AuxInt = boolToAuxInt(true)
11323 return true
11324 }
11325
11326
11327
11328 for {
11329 if v_0.Op != OpZeroExt16to32 {
11330 break
11331 }
11332 v_0_0 := v_0.Args[0]
11333 if v_0_0.Op != OpRsh16Ux64 {
11334 break
11335 }
11336 _ = v_0_0.Args[1]
11337 v_0_0_1 := v_0_0.Args[1]
11338 if v_0_0_1.Op != OpConst64 {
11339 break
11340 }
11341 c := auxIntToInt64(v_0_0_1.AuxInt)
11342 if v_1.Op != OpConst64 {
11343 break
11344 }
11345 d := auxIntToInt64(v_1.AuxInt)
11346 if !(0 < c && c < 16 && 1<<uint(16-c)-1 < d) {
11347 break
11348 }
11349 v.reset(OpConstBool)
11350 v.AuxInt = boolToAuxInt(true)
11351 return true
11352 }
11353
11354
11355
11356 for {
11357 if v_0.Op != OpRsh16Ux64 {
11358 break
11359 }
11360 _ = v_0.Args[1]
11361 v_0_1 := v_0.Args[1]
11362 if v_0_1.Op != OpConst64 {
11363 break
11364 }
11365 c := auxIntToInt64(v_0_1.AuxInt)
11366 if v_1.Op != OpConst64 {
11367 break
11368 }
11369 d := auxIntToInt64(v_1.AuxInt)
11370 if !(0 < c && c < 16 && 1<<uint(16-c)-1 < d) {
11371 break
11372 }
11373 v.reset(OpConstBool)
11374 v.AuxInt = boolToAuxInt(true)
11375 return true
11376 }
11377
11378
11379
11380 for {
11381 if v_0.Op != OpZeroExt32to64 {
11382 break
11383 }
11384 v_0_0 := v_0.Args[0]
11385 if v_0_0.Op != OpRsh32Ux64 {
11386 break
11387 }
11388 _ = v_0_0.Args[1]
11389 v_0_0_1 := v_0_0.Args[1]
11390 if v_0_0_1.Op != OpConst64 {
11391 break
11392 }
11393 c := auxIntToInt64(v_0_0_1.AuxInt)
11394 if v_1.Op != OpConst64 {
11395 break
11396 }
11397 d := auxIntToInt64(v_1.AuxInt)
11398 if !(0 < c && c < 32 && 1<<uint(32-c)-1 < d) {
11399 break
11400 }
11401 v.reset(OpConstBool)
11402 v.AuxInt = boolToAuxInt(true)
11403 return true
11404 }
11405
11406
11407
11408 for {
11409 if v_0.Op != OpRsh32Ux64 {
11410 break
11411 }
11412 _ = v_0.Args[1]
11413 v_0_1 := v_0.Args[1]
11414 if v_0_1.Op != OpConst64 {
11415 break
11416 }
11417 c := auxIntToInt64(v_0_1.AuxInt)
11418 if v_1.Op != OpConst64 {
11419 break
11420 }
11421 d := auxIntToInt64(v_1.AuxInt)
11422 if !(0 < c && c < 32 && 1<<uint(32-c)-1 < d) {
11423 break
11424 }
11425 v.reset(OpConstBool)
11426 v.AuxInt = boolToAuxInt(true)
11427 return true
11428 }
11429
11430
11431
11432 for {
11433 if v_0.Op != OpRsh64Ux64 {
11434 break
11435 }
11436 _ = v_0.Args[1]
11437 v_0_1 := v_0.Args[1]
11438 if v_0_1.Op != OpConst64 {
11439 break
11440 }
11441 c := auxIntToInt64(v_0_1.AuxInt)
11442 if v_1.Op != OpConst64 {
11443 break
11444 }
11445 d := auxIntToInt64(v_1.AuxInt)
11446 if !(0 < c && c < 64 && 1<<uint(64-c)-1 < d) {
11447 break
11448 }
11449 v.reset(OpConstBool)
11450 v.AuxInt = boolToAuxInt(true)
11451 return true
11452 }
11453 return false
11454 }
11455 func rewriteValuegeneric_OpIsNonNil(v *Value) bool {
11456 v_0 := v.Args[0]
11457
11458
11459 for {
11460 if v_0.Op != OpConstNil {
11461 break
11462 }
11463 v.reset(OpConstBool)
11464 v.AuxInt = boolToAuxInt(false)
11465 return true
11466 }
11467
11468
11469 for {
11470 if v_0.Op != OpConst32 {
11471 break
11472 }
11473 c := auxIntToInt32(v_0.AuxInt)
11474 v.reset(OpConstBool)
11475 v.AuxInt = boolToAuxInt(c != 0)
11476 return true
11477 }
11478
11479
11480 for {
11481 if v_0.Op != OpConst64 {
11482 break
11483 }
11484 c := auxIntToInt64(v_0.AuxInt)
11485 v.reset(OpConstBool)
11486 v.AuxInt = boolToAuxInt(c != 0)
11487 return true
11488 }
11489
11490
11491 for {
11492 if v_0.Op != OpAddr {
11493 break
11494 }
11495 v.reset(OpConstBool)
11496 v.AuxInt = boolToAuxInt(true)
11497 return true
11498 }
11499
11500
11501 for {
11502 if v_0.Op != OpConvert {
11503 break
11504 }
11505 v_0_0 := v_0.Args[0]
11506 if v_0_0.Op != OpAddr {
11507 break
11508 }
11509 v.reset(OpConstBool)
11510 v.AuxInt = boolToAuxInt(true)
11511 return true
11512 }
11513
11514
11515 for {
11516 if v_0.Op != OpLocalAddr {
11517 break
11518 }
11519 v.reset(OpConstBool)
11520 v.AuxInt = boolToAuxInt(true)
11521 return true
11522 }
11523 return false
11524 }
11525 func rewriteValuegeneric_OpIsSliceInBounds(v *Value) bool {
11526 v_1 := v.Args[1]
11527 v_0 := v.Args[0]
11528
11529
11530 for {
11531 x := v_0
11532 if x != v_1 {
11533 break
11534 }
11535 v.reset(OpConstBool)
11536 v.AuxInt = boolToAuxInt(true)
11537 return true
11538 }
11539
11540
11541
11542 for {
11543 if v_0.Op != OpAnd32 {
11544 break
11545 }
11546 v_0_0 := v_0.Args[0]
11547 v_0_1 := v_0.Args[1]
11548 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
11549 if v_0_0.Op != OpConst32 {
11550 continue
11551 }
11552 c := auxIntToInt32(v_0_0.AuxInt)
11553 if v_1.Op != OpConst32 {
11554 continue
11555 }
11556 d := auxIntToInt32(v_1.AuxInt)
11557 if !(0 <= c && c <= d) {
11558 continue
11559 }
11560 v.reset(OpConstBool)
11561 v.AuxInt = boolToAuxInt(true)
11562 return true
11563 }
11564 break
11565 }
11566
11567
11568
11569 for {
11570 if v_0.Op != OpAnd64 {
11571 break
11572 }
11573 v_0_0 := v_0.Args[0]
11574 v_0_1 := v_0.Args[1]
11575 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
11576 if v_0_0.Op != OpConst64 {
11577 continue
11578 }
11579 c := auxIntToInt64(v_0_0.AuxInt)
11580 if v_1.Op != OpConst64 {
11581 continue
11582 }
11583 d := auxIntToInt64(v_1.AuxInt)
11584 if !(0 <= c && c <= d) {
11585 continue
11586 }
11587 v.reset(OpConstBool)
11588 v.AuxInt = boolToAuxInt(true)
11589 return true
11590 }
11591 break
11592 }
11593
11594
11595 for {
11596 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
11597 break
11598 }
11599 v.reset(OpConstBool)
11600 v.AuxInt = boolToAuxInt(true)
11601 return true
11602 }
11603
11604
11605 for {
11606 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
11607 break
11608 }
11609 v.reset(OpConstBool)
11610 v.AuxInt = boolToAuxInt(true)
11611 return true
11612 }
11613
11614
11615 for {
11616 if v_0.Op != OpConst32 {
11617 break
11618 }
11619 c := auxIntToInt32(v_0.AuxInt)
11620 if v_1.Op != OpConst32 {
11621 break
11622 }
11623 d := auxIntToInt32(v_1.AuxInt)
11624 v.reset(OpConstBool)
11625 v.AuxInt = boolToAuxInt(0 <= c && c <= d)
11626 return true
11627 }
11628
11629
11630 for {
11631 if v_0.Op != OpConst64 {
11632 break
11633 }
11634 c := auxIntToInt64(v_0.AuxInt)
11635 if v_1.Op != OpConst64 {
11636 break
11637 }
11638 d := auxIntToInt64(v_1.AuxInt)
11639 v.reset(OpConstBool)
11640 v.AuxInt = boolToAuxInt(0 <= c && c <= d)
11641 return true
11642 }
11643
11644
11645 for {
11646 if v_0.Op != OpSliceLen {
11647 break
11648 }
11649 x := v_0.Args[0]
11650 if v_1.Op != OpSliceCap || x != v_1.Args[0] {
11651 break
11652 }
11653 v.reset(OpConstBool)
11654 v.AuxInt = boolToAuxInt(true)
11655 return true
11656 }
11657 return false
11658 }
11659 func rewriteValuegeneric_OpLeq16(v *Value) bool {
11660 v_1 := v.Args[1]
11661 v_0 := v.Args[0]
11662 b := v.Block
11663
11664
11665 for {
11666 if v_0.Op != OpConst16 {
11667 break
11668 }
11669 c := auxIntToInt16(v_0.AuxInt)
11670 if v_1.Op != OpConst16 {
11671 break
11672 }
11673 d := auxIntToInt16(v_1.AuxInt)
11674 v.reset(OpConstBool)
11675 v.AuxInt = boolToAuxInt(c <= d)
11676 return true
11677 }
11678
11679
11680
11681 for {
11682 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 || v_1.Op != OpAnd16 {
11683 break
11684 }
11685 _ = v_1.Args[1]
11686 v_1_0 := v_1.Args[0]
11687 v_1_1 := v_1.Args[1]
11688 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
11689 if v_1_1.Op != OpConst16 {
11690 continue
11691 }
11692 c := auxIntToInt16(v_1_1.AuxInt)
11693 if !(c >= 0) {
11694 continue
11695 }
11696 v.reset(OpConstBool)
11697 v.AuxInt = boolToAuxInt(true)
11698 return true
11699 }
11700 break
11701 }
11702
11703
11704
11705 for {
11706 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 || v_1.Op != OpRsh16Ux64 {
11707 break
11708 }
11709 _ = v_1.Args[1]
11710 v_1_1 := v_1.Args[1]
11711 if v_1_1.Op != OpConst64 {
11712 break
11713 }
11714 c := auxIntToInt64(v_1_1.AuxInt)
11715 if !(c > 0) {
11716 break
11717 }
11718 v.reset(OpConstBool)
11719 v.AuxInt = boolToAuxInt(true)
11720 return true
11721 }
11722
11723
11724 for {
11725 x := v_0
11726 if v_1.Op != OpConst16 {
11727 break
11728 }
11729 t := v_1.Type
11730 if auxIntToInt16(v_1.AuxInt) != -1 {
11731 break
11732 }
11733 v.reset(OpLess16)
11734 v0 := b.NewValue0(v.Pos, OpConst16, t)
11735 v0.AuxInt = int16ToAuxInt(0)
11736 v.AddArg2(x, v0)
11737 return true
11738 }
11739
11740
11741 for {
11742 if v_0.Op != OpConst16 {
11743 break
11744 }
11745 t := v_0.Type
11746 if auxIntToInt16(v_0.AuxInt) != 1 {
11747 break
11748 }
11749 x := v_1
11750 v.reset(OpLess16)
11751 v0 := b.NewValue0(v.Pos, OpConst16, t)
11752 v0.AuxInt = int16ToAuxInt(0)
11753 v.AddArg2(v0, x)
11754 return true
11755 }
11756
11757
11758 for {
11759 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != math.MinInt16 {
11760 break
11761 }
11762 v.reset(OpConstBool)
11763 v.AuxInt = boolToAuxInt(true)
11764 return true
11765 }
11766
11767
11768 for {
11769 if v_1.Op != OpConst16 || auxIntToInt16(v_1.AuxInt) != math.MaxInt16 {
11770 break
11771 }
11772 v.reset(OpConstBool)
11773 v.AuxInt = boolToAuxInt(true)
11774 return true
11775 }
11776
11777
11778 for {
11779 x := v_0
11780 c := v_1
11781 if c.Op != OpConst16 || auxIntToInt16(c.AuxInt) != math.MinInt16 {
11782 break
11783 }
11784 v.reset(OpEq16)
11785 v.AddArg2(x, c)
11786 return true
11787 }
11788
11789
11790 for {
11791 c := v_0
11792 if c.Op != OpConst16 || auxIntToInt16(c.AuxInt) != math.MaxInt16 {
11793 break
11794 }
11795 x := v_1
11796 v.reset(OpEq16)
11797 v.AddArg2(x, c)
11798 return true
11799 }
11800 return false
11801 }
11802 func rewriteValuegeneric_OpLeq16U(v *Value) bool {
11803 v_1 := v.Args[1]
11804 v_0 := v.Args[0]
11805 b := v.Block
11806
11807
11808 for {
11809 if v_0.Op != OpConst16 {
11810 break
11811 }
11812 c := auxIntToInt16(v_0.AuxInt)
11813 if v_1.Op != OpConst16 {
11814 break
11815 }
11816 d := auxIntToInt16(v_1.AuxInt)
11817 v.reset(OpConstBool)
11818 v.AuxInt = boolToAuxInt(uint16(c) <= uint16(d))
11819 return true
11820 }
11821
11822
11823 for {
11824 if v_0.Op != OpConst16 {
11825 break
11826 }
11827 t := v_0.Type
11828 if auxIntToInt16(v_0.AuxInt) != 1 {
11829 break
11830 }
11831 x := v_1
11832 v.reset(OpNeq16)
11833 v0 := b.NewValue0(v.Pos, OpConst16, t)
11834 v0.AuxInt = int16ToAuxInt(0)
11835 v.AddArg2(v0, x)
11836 return true
11837 }
11838
11839
11840 for {
11841 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 {
11842 break
11843 }
11844 v.reset(OpConstBool)
11845 v.AuxInt = boolToAuxInt(true)
11846 return true
11847 }
11848
11849
11850 for {
11851 if v_1.Op != OpConst16 || auxIntToInt16(v_1.AuxInt) != -1 {
11852 break
11853 }
11854 v.reset(OpConstBool)
11855 v.AuxInt = boolToAuxInt(true)
11856 return true
11857 }
11858
11859
11860 for {
11861 x := v_0
11862 c := v_1
11863 if c.Op != OpConst16 || auxIntToInt16(c.AuxInt) != 0 {
11864 break
11865 }
11866 v.reset(OpEq16)
11867 v.AddArg2(x, c)
11868 return true
11869 }
11870
11871
11872 for {
11873 c := v_0
11874 if c.Op != OpConst16 || auxIntToInt16(c.AuxInt) != -1 {
11875 break
11876 }
11877 x := v_1
11878 v.reset(OpEq16)
11879 v.AddArg2(x, c)
11880 return true
11881 }
11882 return false
11883 }
11884 func rewriteValuegeneric_OpLeq32(v *Value) bool {
11885 v_1 := v.Args[1]
11886 v_0 := v.Args[0]
11887 b := v.Block
11888
11889
11890 for {
11891 if v_0.Op != OpConst32 {
11892 break
11893 }
11894 c := auxIntToInt32(v_0.AuxInt)
11895 if v_1.Op != OpConst32 {
11896 break
11897 }
11898 d := auxIntToInt32(v_1.AuxInt)
11899 v.reset(OpConstBool)
11900 v.AuxInt = boolToAuxInt(c <= d)
11901 return true
11902 }
11903
11904
11905
11906 for {
11907 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 || v_1.Op != OpAnd32 {
11908 break
11909 }
11910 _ = v_1.Args[1]
11911 v_1_0 := v_1.Args[0]
11912 v_1_1 := v_1.Args[1]
11913 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
11914 if v_1_1.Op != OpConst32 {
11915 continue
11916 }
11917 c := auxIntToInt32(v_1_1.AuxInt)
11918 if !(c >= 0) {
11919 continue
11920 }
11921 v.reset(OpConstBool)
11922 v.AuxInt = boolToAuxInt(true)
11923 return true
11924 }
11925 break
11926 }
11927
11928
11929
11930 for {
11931 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 || v_1.Op != OpRsh32Ux64 {
11932 break
11933 }
11934 _ = v_1.Args[1]
11935 v_1_1 := v_1.Args[1]
11936 if v_1_1.Op != OpConst64 {
11937 break
11938 }
11939 c := auxIntToInt64(v_1_1.AuxInt)
11940 if !(c > 0) {
11941 break
11942 }
11943 v.reset(OpConstBool)
11944 v.AuxInt = boolToAuxInt(true)
11945 return true
11946 }
11947
11948
11949 for {
11950 x := v_0
11951 if v_1.Op != OpConst32 {
11952 break
11953 }
11954 t := v_1.Type
11955 if auxIntToInt32(v_1.AuxInt) != -1 {
11956 break
11957 }
11958 v.reset(OpLess32)
11959 v0 := b.NewValue0(v.Pos, OpConst32, t)
11960 v0.AuxInt = int32ToAuxInt(0)
11961 v.AddArg2(x, v0)
11962 return true
11963 }
11964
11965
11966 for {
11967 if v_0.Op != OpConst32 {
11968 break
11969 }
11970 t := v_0.Type
11971 if auxIntToInt32(v_0.AuxInt) != 1 {
11972 break
11973 }
11974 x := v_1
11975 v.reset(OpLess32)
11976 v0 := b.NewValue0(v.Pos, OpConst32, t)
11977 v0.AuxInt = int32ToAuxInt(0)
11978 v.AddArg2(v0, x)
11979 return true
11980 }
11981
11982
11983 for {
11984 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != math.MinInt32 {
11985 break
11986 }
11987 v.reset(OpConstBool)
11988 v.AuxInt = boolToAuxInt(true)
11989 return true
11990 }
11991
11992
11993 for {
11994 if v_1.Op != OpConst32 || auxIntToInt32(v_1.AuxInt) != math.MaxInt32 {
11995 break
11996 }
11997 v.reset(OpConstBool)
11998 v.AuxInt = boolToAuxInt(true)
11999 return true
12000 }
12001
12002
12003 for {
12004 x := v_0
12005 c := v_1
12006 if c.Op != OpConst32 || auxIntToInt32(c.AuxInt) != math.MinInt32 {
12007 break
12008 }
12009 v.reset(OpEq32)
12010 v.AddArg2(x, c)
12011 return true
12012 }
12013
12014
12015 for {
12016 c := v_0
12017 if c.Op != OpConst32 || auxIntToInt32(c.AuxInt) != math.MaxInt32 {
12018 break
12019 }
12020 x := v_1
12021 v.reset(OpEq32)
12022 v.AddArg2(x, c)
12023 return true
12024 }
12025 return false
12026 }
12027 func rewriteValuegeneric_OpLeq32F(v *Value) bool {
12028 v_1 := v.Args[1]
12029 v_0 := v.Args[0]
12030
12031
12032 for {
12033 if v_0.Op != OpConst32F {
12034 break
12035 }
12036 c := auxIntToFloat32(v_0.AuxInt)
12037 if v_1.Op != OpConst32F {
12038 break
12039 }
12040 d := auxIntToFloat32(v_1.AuxInt)
12041 v.reset(OpConstBool)
12042 v.AuxInt = boolToAuxInt(c <= d)
12043 return true
12044 }
12045 return false
12046 }
12047 func rewriteValuegeneric_OpLeq32U(v *Value) bool {
12048 v_1 := v.Args[1]
12049 v_0 := v.Args[0]
12050 b := v.Block
12051
12052
12053 for {
12054 if v_0.Op != OpConst32 {
12055 break
12056 }
12057 c := auxIntToInt32(v_0.AuxInt)
12058 if v_1.Op != OpConst32 {
12059 break
12060 }
12061 d := auxIntToInt32(v_1.AuxInt)
12062 v.reset(OpConstBool)
12063 v.AuxInt = boolToAuxInt(uint32(c) <= uint32(d))
12064 return true
12065 }
12066
12067
12068 for {
12069 if v_0.Op != OpConst32 {
12070 break
12071 }
12072 t := v_0.Type
12073 if auxIntToInt32(v_0.AuxInt) != 1 {
12074 break
12075 }
12076 x := v_1
12077 v.reset(OpNeq32)
12078 v0 := b.NewValue0(v.Pos, OpConst32, t)
12079 v0.AuxInt = int32ToAuxInt(0)
12080 v.AddArg2(v0, x)
12081 return true
12082 }
12083
12084
12085 for {
12086 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
12087 break
12088 }
12089 v.reset(OpConstBool)
12090 v.AuxInt = boolToAuxInt(true)
12091 return true
12092 }
12093
12094
12095 for {
12096 if v_1.Op != OpConst32 || auxIntToInt32(v_1.AuxInt) != -1 {
12097 break
12098 }
12099 v.reset(OpConstBool)
12100 v.AuxInt = boolToAuxInt(true)
12101 return true
12102 }
12103
12104
12105 for {
12106 x := v_0
12107 c := v_1
12108 if c.Op != OpConst32 || auxIntToInt32(c.AuxInt) != 0 {
12109 break
12110 }
12111 v.reset(OpEq32)
12112 v.AddArg2(x, c)
12113 return true
12114 }
12115
12116
12117 for {
12118 c := v_0
12119 if c.Op != OpConst32 || auxIntToInt32(c.AuxInt) != -1 {
12120 break
12121 }
12122 x := v_1
12123 v.reset(OpEq32)
12124 v.AddArg2(x, c)
12125 return true
12126 }
12127 return false
12128 }
12129 func rewriteValuegeneric_OpLeq64(v *Value) bool {
12130 v_1 := v.Args[1]
12131 v_0 := v.Args[0]
12132 b := v.Block
12133
12134
12135 for {
12136 if v_0.Op != OpConst64 {
12137 break
12138 }
12139 c := auxIntToInt64(v_0.AuxInt)
12140 if v_1.Op != OpConst64 {
12141 break
12142 }
12143 d := auxIntToInt64(v_1.AuxInt)
12144 v.reset(OpConstBool)
12145 v.AuxInt = boolToAuxInt(c <= d)
12146 return true
12147 }
12148
12149
12150
12151 for {
12152 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 || v_1.Op != OpAnd64 {
12153 break
12154 }
12155 _ = v_1.Args[1]
12156 v_1_0 := v_1.Args[0]
12157 v_1_1 := v_1.Args[1]
12158 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
12159 if v_1_1.Op != OpConst64 {
12160 continue
12161 }
12162 c := auxIntToInt64(v_1_1.AuxInt)
12163 if !(c >= 0) {
12164 continue
12165 }
12166 v.reset(OpConstBool)
12167 v.AuxInt = boolToAuxInt(true)
12168 return true
12169 }
12170 break
12171 }
12172
12173
12174
12175 for {
12176 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 || v_1.Op != OpRsh64Ux64 {
12177 break
12178 }
12179 _ = v_1.Args[1]
12180 v_1_1 := v_1.Args[1]
12181 if v_1_1.Op != OpConst64 {
12182 break
12183 }
12184 c := auxIntToInt64(v_1_1.AuxInt)
12185 if !(c > 0) {
12186 break
12187 }
12188 v.reset(OpConstBool)
12189 v.AuxInt = boolToAuxInt(true)
12190 return true
12191 }
12192
12193
12194 for {
12195 x := v_0
12196 if v_1.Op != OpConst64 {
12197 break
12198 }
12199 t := v_1.Type
12200 if auxIntToInt64(v_1.AuxInt) != -1 {
12201 break
12202 }
12203 v.reset(OpLess64)
12204 v0 := b.NewValue0(v.Pos, OpConst64, t)
12205 v0.AuxInt = int64ToAuxInt(0)
12206 v.AddArg2(x, v0)
12207 return true
12208 }
12209
12210
12211 for {
12212 if v_0.Op != OpConst64 {
12213 break
12214 }
12215 t := v_0.Type
12216 if auxIntToInt64(v_0.AuxInt) != 1 {
12217 break
12218 }
12219 x := v_1
12220 v.reset(OpLess64)
12221 v0 := b.NewValue0(v.Pos, OpConst64, t)
12222 v0.AuxInt = int64ToAuxInt(0)
12223 v.AddArg2(v0, x)
12224 return true
12225 }
12226
12227
12228 for {
12229 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != math.MinInt64 {
12230 break
12231 }
12232 v.reset(OpConstBool)
12233 v.AuxInt = boolToAuxInt(true)
12234 return true
12235 }
12236
12237
12238 for {
12239 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != math.MaxInt64 {
12240 break
12241 }
12242 v.reset(OpConstBool)
12243 v.AuxInt = boolToAuxInt(true)
12244 return true
12245 }
12246
12247
12248 for {
12249 x := v_0
12250 c := v_1
12251 if c.Op != OpConst64 || auxIntToInt64(c.AuxInt) != math.MinInt64 {
12252 break
12253 }
12254 v.reset(OpEq64)
12255 v.AddArg2(x, c)
12256 return true
12257 }
12258
12259
12260 for {
12261 c := v_0
12262 if c.Op != OpConst64 || auxIntToInt64(c.AuxInt) != math.MaxInt64 {
12263 break
12264 }
12265 x := v_1
12266 v.reset(OpEq64)
12267 v.AddArg2(x, c)
12268 return true
12269 }
12270 return false
12271 }
12272 func rewriteValuegeneric_OpLeq64F(v *Value) bool {
12273 v_1 := v.Args[1]
12274 v_0 := v.Args[0]
12275
12276
12277 for {
12278 if v_0.Op != OpConst64F {
12279 break
12280 }
12281 c := auxIntToFloat64(v_0.AuxInt)
12282 if v_1.Op != OpConst64F {
12283 break
12284 }
12285 d := auxIntToFloat64(v_1.AuxInt)
12286 v.reset(OpConstBool)
12287 v.AuxInt = boolToAuxInt(c <= d)
12288 return true
12289 }
12290 return false
12291 }
12292 func rewriteValuegeneric_OpLeq64U(v *Value) bool {
12293 v_1 := v.Args[1]
12294 v_0 := v.Args[0]
12295 b := v.Block
12296
12297
12298 for {
12299 if v_0.Op != OpConst64 {
12300 break
12301 }
12302 c := auxIntToInt64(v_0.AuxInt)
12303 if v_1.Op != OpConst64 {
12304 break
12305 }
12306 d := auxIntToInt64(v_1.AuxInt)
12307 v.reset(OpConstBool)
12308 v.AuxInt = boolToAuxInt(uint64(c) <= uint64(d))
12309 return true
12310 }
12311
12312
12313 for {
12314 if v_0.Op != OpConst64 {
12315 break
12316 }
12317 t := v_0.Type
12318 if auxIntToInt64(v_0.AuxInt) != 1 {
12319 break
12320 }
12321 x := v_1
12322 v.reset(OpNeq64)
12323 v0 := b.NewValue0(v.Pos, OpConst64, t)
12324 v0.AuxInt = int64ToAuxInt(0)
12325 v.AddArg2(v0, x)
12326 return true
12327 }
12328
12329
12330 for {
12331 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
12332 break
12333 }
12334 v.reset(OpConstBool)
12335 v.AuxInt = boolToAuxInt(true)
12336 return true
12337 }
12338
12339
12340 for {
12341 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != -1 {
12342 break
12343 }
12344 v.reset(OpConstBool)
12345 v.AuxInt = boolToAuxInt(true)
12346 return true
12347 }
12348
12349
12350 for {
12351 x := v_0
12352 c := v_1
12353 if c.Op != OpConst64 || auxIntToInt64(c.AuxInt) != 0 {
12354 break
12355 }
12356 v.reset(OpEq64)
12357 v.AddArg2(x, c)
12358 return true
12359 }
12360
12361
12362 for {
12363 c := v_0
12364 if c.Op != OpConst64 || auxIntToInt64(c.AuxInt) != -1 {
12365 break
12366 }
12367 x := v_1
12368 v.reset(OpEq64)
12369 v.AddArg2(x, c)
12370 return true
12371 }
12372 return false
12373 }
12374 func rewriteValuegeneric_OpLeq8(v *Value) bool {
12375 v_1 := v.Args[1]
12376 v_0 := v.Args[0]
12377 b := v.Block
12378
12379
12380 for {
12381 if v_0.Op != OpConst8 {
12382 break
12383 }
12384 c := auxIntToInt8(v_0.AuxInt)
12385 if v_1.Op != OpConst8 {
12386 break
12387 }
12388 d := auxIntToInt8(v_1.AuxInt)
12389 v.reset(OpConstBool)
12390 v.AuxInt = boolToAuxInt(c <= d)
12391 return true
12392 }
12393
12394
12395
12396 for {
12397 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 || v_1.Op != OpAnd8 {
12398 break
12399 }
12400 _ = v_1.Args[1]
12401 v_1_0 := v_1.Args[0]
12402 v_1_1 := v_1.Args[1]
12403 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
12404 if v_1_1.Op != OpConst8 {
12405 continue
12406 }
12407 c := auxIntToInt8(v_1_1.AuxInt)
12408 if !(c >= 0) {
12409 continue
12410 }
12411 v.reset(OpConstBool)
12412 v.AuxInt = boolToAuxInt(true)
12413 return true
12414 }
12415 break
12416 }
12417
12418
12419
12420 for {
12421 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 || v_1.Op != OpRsh8Ux64 {
12422 break
12423 }
12424 _ = v_1.Args[1]
12425 v_1_1 := v_1.Args[1]
12426 if v_1_1.Op != OpConst64 {
12427 break
12428 }
12429 c := auxIntToInt64(v_1_1.AuxInt)
12430 if !(c > 0) {
12431 break
12432 }
12433 v.reset(OpConstBool)
12434 v.AuxInt = boolToAuxInt(true)
12435 return true
12436 }
12437
12438
12439 for {
12440 x := v_0
12441 if v_1.Op != OpConst8 {
12442 break
12443 }
12444 t := v_1.Type
12445 if auxIntToInt8(v_1.AuxInt) != -1 {
12446 break
12447 }
12448 v.reset(OpLess8)
12449 v0 := b.NewValue0(v.Pos, OpConst8, t)
12450 v0.AuxInt = int8ToAuxInt(0)
12451 v.AddArg2(x, v0)
12452 return true
12453 }
12454
12455
12456 for {
12457 if v_0.Op != OpConst8 {
12458 break
12459 }
12460 t := v_0.Type
12461 if auxIntToInt8(v_0.AuxInt) != 1 {
12462 break
12463 }
12464 x := v_1
12465 v.reset(OpLess8)
12466 v0 := b.NewValue0(v.Pos, OpConst8, t)
12467 v0.AuxInt = int8ToAuxInt(0)
12468 v.AddArg2(v0, x)
12469 return true
12470 }
12471
12472
12473 for {
12474 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != math.MinInt8 {
12475 break
12476 }
12477 v.reset(OpConstBool)
12478 v.AuxInt = boolToAuxInt(true)
12479 return true
12480 }
12481
12482
12483 for {
12484 if v_1.Op != OpConst8 || auxIntToInt8(v_1.AuxInt) != math.MaxInt8 {
12485 break
12486 }
12487 v.reset(OpConstBool)
12488 v.AuxInt = boolToAuxInt(true)
12489 return true
12490 }
12491
12492
12493 for {
12494 x := v_0
12495 c := v_1
12496 if c.Op != OpConst8 || auxIntToInt8(c.AuxInt) != math.MinInt8 {
12497 break
12498 }
12499 v.reset(OpEq8)
12500 v.AddArg2(x, c)
12501 return true
12502 }
12503
12504
12505 for {
12506 c := v_0
12507 if c.Op != OpConst8 || auxIntToInt8(c.AuxInt) != math.MaxInt8 {
12508 break
12509 }
12510 x := v_1
12511 v.reset(OpEq8)
12512 v.AddArg2(x, c)
12513 return true
12514 }
12515 return false
12516 }
12517 func rewriteValuegeneric_OpLeq8U(v *Value) bool {
12518 v_1 := v.Args[1]
12519 v_0 := v.Args[0]
12520 b := v.Block
12521
12522
12523 for {
12524 if v_0.Op != OpConst8 {
12525 break
12526 }
12527 c := auxIntToInt8(v_0.AuxInt)
12528 if v_1.Op != OpConst8 {
12529 break
12530 }
12531 d := auxIntToInt8(v_1.AuxInt)
12532 v.reset(OpConstBool)
12533 v.AuxInt = boolToAuxInt(uint8(c) <= uint8(d))
12534 return true
12535 }
12536
12537
12538 for {
12539 if v_0.Op != OpConst8 {
12540 break
12541 }
12542 t := v_0.Type
12543 if auxIntToInt8(v_0.AuxInt) != 1 {
12544 break
12545 }
12546 x := v_1
12547 v.reset(OpNeq8)
12548 v0 := b.NewValue0(v.Pos, OpConst8, t)
12549 v0.AuxInt = int8ToAuxInt(0)
12550 v.AddArg2(v0, x)
12551 return true
12552 }
12553
12554
12555 for {
12556 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 {
12557 break
12558 }
12559 v.reset(OpConstBool)
12560 v.AuxInt = boolToAuxInt(true)
12561 return true
12562 }
12563
12564
12565 for {
12566 if v_1.Op != OpConst8 || auxIntToInt8(v_1.AuxInt) != -1 {
12567 break
12568 }
12569 v.reset(OpConstBool)
12570 v.AuxInt = boolToAuxInt(true)
12571 return true
12572 }
12573
12574
12575 for {
12576 x := v_0
12577 c := v_1
12578 if c.Op != OpConst8 || auxIntToInt8(c.AuxInt) != 0 {
12579 break
12580 }
12581 v.reset(OpEq8)
12582 v.AddArg2(x, c)
12583 return true
12584 }
12585
12586
12587 for {
12588 c := v_0
12589 if c.Op != OpConst8 || auxIntToInt8(c.AuxInt) != -1 {
12590 break
12591 }
12592 x := v_1
12593 v.reset(OpEq8)
12594 v.AddArg2(x, c)
12595 return true
12596 }
12597 return false
12598 }
12599 func rewriteValuegeneric_OpLess16(v *Value) bool {
12600 v_1 := v.Args[1]
12601 v_0 := v.Args[0]
12602 b := v.Block
12603
12604
12605 for {
12606 if v_0.Op != OpConst16 {
12607 break
12608 }
12609 c := auxIntToInt16(v_0.AuxInt)
12610 if v_1.Op != OpConst16 {
12611 break
12612 }
12613 d := auxIntToInt16(v_1.AuxInt)
12614 v.reset(OpConstBool)
12615 v.AuxInt = boolToAuxInt(c < d)
12616 return true
12617 }
12618
12619
12620
12621 for {
12622 if v_0.Op != OpConst16 {
12623 break
12624 }
12625 t := v_0.Type
12626 if auxIntToInt16(v_0.AuxInt) != 0 {
12627 break
12628 }
12629 x := v_1
12630 if !(isNonNegative(x)) {
12631 break
12632 }
12633 v.reset(OpNeq16)
12634 v0 := b.NewValue0(v.Pos, OpConst16, t)
12635 v0.AuxInt = int16ToAuxInt(0)
12636 v.AddArg2(v0, x)
12637 return true
12638 }
12639
12640
12641
12642 for {
12643 x := v_0
12644 if v_1.Op != OpConst16 {
12645 break
12646 }
12647 t := v_1.Type
12648 if auxIntToInt16(v_1.AuxInt) != 1 || !(isNonNegative(x)) {
12649 break
12650 }
12651 v.reset(OpEq16)
12652 v0 := b.NewValue0(v.Pos, OpConst16, t)
12653 v0.AuxInt = int16ToAuxInt(0)
12654 v.AddArg2(v0, x)
12655 return true
12656 }
12657
12658
12659 for {
12660 x := v_0
12661 if v_1.Op != OpConst16 {
12662 break
12663 }
12664 t := v_1.Type
12665 if auxIntToInt16(v_1.AuxInt) != 1 {
12666 break
12667 }
12668 v.reset(OpLeq16)
12669 v0 := b.NewValue0(v.Pos, OpConst16, t)
12670 v0.AuxInt = int16ToAuxInt(0)
12671 v.AddArg2(x, v0)
12672 return true
12673 }
12674
12675
12676 for {
12677 if v_0.Op != OpConst16 {
12678 break
12679 }
12680 t := v_0.Type
12681 if auxIntToInt16(v_0.AuxInt) != -1 {
12682 break
12683 }
12684 x := v_1
12685 v.reset(OpLeq16)
12686 v0 := b.NewValue0(v.Pos, OpConst16, t)
12687 v0.AuxInt = int16ToAuxInt(0)
12688 v.AddArg2(v0, x)
12689 return true
12690 }
12691
12692
12693 for {
12694 if v_1.Op != OpConst16 || auxIntToInt16(v_1.AuxInt) != math.MinInt16 {
12695 break
12696 }
12697 v.reset(OpConstBool)
12698 v.AuxInt = boolToAuxInt(false)
12699 return true
12700 }
12701
12702
12703 for {
12704 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != math.MaxInt16 {
12705 break
12706 }
12707 v.reset(OpConstBool)
12708 v.AuxInt = boolToAuxInt(false)
12709 return true
12710 }
12711
12712
12713 for {
12714 x := v_0
12715 if v_1.Op != OpConst16 {
12716 break
12717 }
12718 t := v_1.Type
12719 if auxIntToInt16(v_1.AuxInt) != math.MinInt16+1 {
12720 break
12721 }
12722 v.reset(OpEq16)
12723 v0 := b.NewValue0(v.Pos, OpConst16, t)
12724 v0.AuxInt = int16ToAuxInt(math.MinInt16)
12725 v.AddArg2(x, v0)
12726 return true
12727 }
12728
12729
12730 for {
12731 if v_0.Op != OpConst16 {
12732 break
12733 }
12734 t := v_0.Type
12735 if auxIntToInt16(v_0.AuxInt) != math.MaxInt16-1 {
12736 break
12737 }
12738 x := v_1
12739 v.reset(OpEq16)
12740 v0 := b.NewValue0(v.Pos, OpConst16, t)
12741 v0.AuxInt = int16ToAuxInt(math.MaxInt16)
12742 v.AddArg2(x, v0)
12743 return true
12744 }
12745 return false
12746 }
12747 func rewriteValuegeneric_OpLess16U(v *Value) bool {
12748 v_1 := v.Args[1]
12749 v_0 := v.Args[0]
12750 b := v.Block
12751
12752
12753 for {
12754 if v_0.Op != OpConst16 {
12755 break
12756 }
12757 c := auxIntToInt16(v_0.AuxInt)
12758 if v_1.Op != OpConst16 {
12759 break
12760 }
12761 d := auxIntToInt16(v_1.AuxInt)
12762 v.reset(OpConstBool)
12763 v.AuxInt = boolToAuxInt(uint16(c) < uint16(d))
12764 return true
12765 }
12766
12767
12768 for {
12769 x := v_0
12770 if v_1.Op != OpConst16 {
12771 break
12772 }
12773 t := v_1.Type
12774 if auxIntToInt16(v_1.AuxInt) != 1 {
12775 break
12776 }
12777 v.reset(OpEq16)
12778 v0 := b.NewValue0(v.Pos, OpConst16, t)
12779 v0.AuxInt = int16ToAuxInt(0)
12780 v.AddArg2(v0, x)
12781 return true
12782 }
12783
12784
12785 for {
12786 if v_1.Op != OpConst16 || auxIntToInt16(v_1.AuxInt) != 0 {
12787 break
12788 }
12789 v.reset(OpConstBool)
12790 v.AuxInt = boolToAuxInt(false)
12791 return true
12792 }
12793
12794
12795 for {
12796 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != -1 {
12797 break
12798 }
12799 v.reset(OpConstBool)
12800 v.AuxInt = boolToAuxInt(false)
12801 return true
12802 }
12803
12804
12805 for {
12806 x := v_0
12807 if v_1.Op != OpConst16 {
12808 break
12809 }
12810 t := v_1.Type
12811 if auxIntToInt16(v_1.AuxInt) != 1 {
12812 break
12813 }
12814 v.reset(OpEq16)
12815 v0 := b.NewValue0(v.Pos, OpConst16, t)
12816 v0.AuxInt = int16ToAuxInt(0)
12817 v.AddArg2(x, v0)
12818 return true
12819 }
12820
12821
12822 for {
12823 if v_0.Op != OpConst16 {
12824 break
12825 }
12826 t := v_0.Type
12827 if auxIntToInt16(v_0.AuxInt) != -2 {
12828 break
12829 }
12830 x := v_1
12831 v.reset(OpEq16)
12832 v0 := b.NewValue0(v.Pos, OpConst16, t)
12833 v0.AuxInt = int16ToAuxInt(-1)
12834 v.AddArg2(x, v0)
12835 return true
12836 }
12837 return false
12838 }
12839 func rewriteValuegeneric_OpLess32(v *Value) bool {
12840 v_1 := v.Args[1]
12841 v_0 := v.Args[0]
12842 b := v.Block
12843
12844
12845 for {
12846 if v_0.Op != OpConst32 {
12847 break
12848 }
12849 c := auxIntToInt32(v_0.AuxInt)
12850 if v_1.Op != OpConst32 {
12851 break
12852 }
12853 d := auxIntToInt32(v_1.AuxInt)
12854 v.reset(OpConstBool)
12855 v.AuxInt = boolToAuxInt(c < d)
12856 return true
12857 }
12858
12859
12860
12861 for {
12862 if v_0.Op != OpConst32 {
12863 break
12864 }
12865 t := v_0.Type
12866 if auxIntToInt32(v_0.AuxInt) != 0 {
12867 break
12868 }
12869 x := v_1
12870 if !(isNonNegative(x)) {
12871 break
12872 }
12873 v.reset(OpNeq32)
12874 v0 := b.NewValue0(v.Pos, OpConst32, t)
12875 v0.AuxInt = int32ToAuxInt(0)
12876 v.AddArg2(v0, x)
12877 return true
12878 }
12879
12880
12881
12882 for {
12883 x := v_0
12884 if v_1.Op != OpConst32 {
12885 break
12886 }
12887 t := v_1.Type
12888 if auxIntToInt32(v_1.AuxInt) != 1 || !(isNonNegative(x)) {
12889 break
12890 }
12891 v.reset(OpEq32)
12892 v0 := b.NewValue0(v.Pos, OpConst32, t)
12893 v0.AuxInt = int32ToAuxInt(0)
12894 v.AddArg2(v0, x)
12895 return true
12896 }
12897
12898
12899 for {
12900 x := v_0
12901 if v_1.Op != OpConst32 {
12902 break
12903 }
12904 t := v_1.Type
12905 if auxIntToInt32(v_1.AuxInt) != 1 {
12906 break
12907 }
12908 v.reset(OpLeq32)
12909 v0 := b.NewValue0(v.Pos, OpConst32, t)
12910 v0.AuxInt = int32ToAuxInt(0)
12911 v.AddArg2(x, v0)
12912 return true
12913 }
12914
12915
12916 for {
12917 if v_0.Op != OpConst32 {
12918 break
12919 }
12920 t := v_0.Type
12921 if auxIntToInt32(v_0.AuxInt) != -1 {
12922 break
12923 }
12924 x := v_1
12925 v.reset(OpLeq32)
12926 v0 := b.NewValue0(v.Pos, OpConst32, t)
12927 v0.AuxInt = int32ToAuxInt(0)
12928 v.AddArg2(v0, x)
12929 return true
12930 }
12931
12932
12933 for {
12934 if v_1.Op != OpConst32 || auxIntToInt32(v_1.AuxInt) != math.MinInt32 {
12935 break
12936 }
12937 v.reset(OpConstBool)
12938 v.AuxInt = boolToAuxInt(false)
12939 return true
12940 }
12941
12942
12943 for {
12944 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != math.MaxInt32 {
12945 break
12946 }
12947 v.reset(OpConstBool)
12948 v.AuxInt = boolToAuxInt(false)
12949 return true
12950 }
12951
12952
12953 for {
12954 x := v_0
12955 if v_1.Op != OpConst32 {
12956 break
12957 }
12958 t := v_1.Type
12959 if auxIntToInt32(v_1.AuxInt) != math.MinInt32+1 {
12960 break
12961 }
12962 v.reset(OpEq32)
12963 v0 := b.NewValue0(v.Pos, OpConst32, t)
12964 v0.AuxInt = int32ToAuxInt(math.MinInt32)
12965 v.AddArg2(x, v0)
12966 return true
12967 }
12968
12969
12970 for {
12971 if v_0.Op != OpConst32 {
12972 break
12973 }
12974 t := v_0.Type
12975 if auxIntToInt32(v_0.AuxInt) != math.MaxInt32-1 {
12976 break
12977 }
12978 x := v_1
12979 v.reset(OpEq32)
12980 v0 := b.NewValue0(v.Pos, OpConst32, t)
12981 v0.AuxInt = int32ToAuxInt(math.MaxInt32)
12982 v.AddArg2(x, v0)
12983 return true
12984 }
12985 return false
12986 }
12987 func rewriteValuegeneric_OpLess32F(v *Value) bool {
12988 v_1 := v.Args[1]
12989 v_0 := v.Args[0]
12990
12991
12992 for {
12993 if v_0.Op != OpConst32F {
12994 break
12995 }
12996 c := auxIntToFloat32(v_0.AuxInt)
12997 if v_1.Op != OpConst32F {
12998 break
12999 }
13000 d := auxIntToFloat32(v_1.AuxInt)
13001 v.reset(OpConstBool)
13002 v.AuxInt = boolToAuxInt(c < d)
13003 return true
13004 }
13005 return false
13006 }
13007 func rewriteValuegeneric_OpLess32U(v *Value) bool {
13008 v_1 := v.Args[1]
13009 v_0 := v.Args[0]
13010 b := v.Block
13011
13012
13013 for {
13014 if v_0.Op != OpConst32 {
13015 break
13016 }
13017 c := auxIntToInt32(v_0.AuxInt)
13018 if v_1.Op != OpConst32 {
13019 break
13020 }
13021 d := auxIntToInt32(v_1.AuxInt)
13022 v.reset(OpConstBool)
13023 v.AuxInt = boolToAuxInt(uint32(c) < uint32(d))
13024 return true
13025 }
13026
13027
13028 for {
13029 x := v_0
13030 if v_1.Op != OpConst32 {
13031 break
13032 }
13033 t := v_1.Type
13034 if auxIntToInt32(v_1.AuxInt) != 1 {
13035 break
13036 }
13037 v.reset(OpEq32)
13038 v0 := b.NewValue0(v.Pos, OpConst32, t)
13039 v0.AuxInt = int32ToAuxInt(0)
13040 v.AddArg2(v0, x)
13041 return true
13042 }
13043
13044
13045 for {
13046 if v_1.Op != OpConst32 || auxIntToInt32(v_1.AuxInt) != 0 {
13047 break
13048 }
13049 v.reset(OpConstBool)
13050 v.AuxInt = boolToAuxInt(false)
13051 return true
13052 }
13053
13054
13055 for {
13056 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != -1 {
13057 break
13058 }
13059 v.reset(OpConstBool)
13060 v.AuxInt = boolToAuxInt(false)
13061 return true
13062 }
13063
13064
13065 for {
13066 x := v_0
13067 if v_1.Op != OpConst32 {
13068 break
13069 }
13070 t := v_1.Type
13071 if auxIntToInt32(v_1.AuxInt) != 1 {
13072 break
13073 }
13074 v.reset(OpEq32)
13075 v0 := b.NewValue0(v.Pos, OpConst32, t)
13076 v0.AuxInt = int32ToAuxInt(0)
13077 v.AddArg2(x, v0)
13078 return true
13079 }
13080
13081
13082 for {
13083 if v_0.Op != OpConst32 {
13084 break
13085 }
13086 t := v_0.Type
13087 if auxIntToInt32(v_0.AuxInt) != -2 {
13088 break
13089 }
13090 x := v_1
13091 v.reset(OpEq32)
13092 v0 := b.NewValue0(v.Pos, OpConst32, t)
13093 v0.AuxInt = int32ToAuxInt(-1)
13094 v.AddArg2(x, v0)
13095 return true
13096 }
13097 return false
13098 }
13099 func rewriteValuegeneric_OpLess64(v *Value) bool {
13100 v_1 := v.Args[1]
13101 v_0 := v.Args[0]
13102 b := v.Block
13103
13104
13105 for {
13106 if v_0.Op != OpConst64 {
13107 break
13108 }
13109 c := auxIntToInt64(v_0.AuxInt)
13110 if v_1.Op != OpConst64 {
13111 break
13112 }
13113 d := auxIntToInt64(v_1.AuxInt)
13114 v.reset(OpConstBool)
13115 v.AuxInt = boolToAuxInt(c < d)
13116 return true
13117 }
13118
13119
13120
13121 for {
13122 if v_0.Op != OpConst64 {
13123 break
13124 }
13125 t := v_0.Type
13126 if auxIntToInt64(v_0.AuxInt) != 0 {
13127 break
13128 }
13129 x := v_1
13130 if !(isNonNegative(x)) {
13131 break
13132 }
13133 v.reset(OpNeq64)
13134 v0 := b.NewValue0(v.Pos, OpConst64, t)
13135 v0.AuxInt = int64ToAuxInt(0)
13136 v.AddArg2(v0, x)
13137 return true
13138 }
13139
13140
13141
13142 for {
13143 x := v_0
13144 if v_1.Op != OpConst64 {
13145 break
13146 }
13147 t := v_1.Type
13148 if auxIntToInt64(v_1.AuxInt) != 1 || !(isNonNegative(x)) {
13149 break
13150 }
13151 v.reset(OpEq64)
13152 v0 := b.NewValue0(v.Pos, OpConst64, t)
13153 v0.AuxInt = int64ToAuxInt(0)
13154 v.AddArg2(v0, x)
13155 return true
13156 }
13157
13158
13159 for {
13160 x := v_0
13161 if v_1.Op != OpConst64 {
13162 break
13163 }
13164 t := v_1.Type
13165 if auxIntToInt64(v_1.AuxInt) != 1 {
13166 break
13167 }
13168 v.reset(OpLeq64)
13169 v0 := b.NewValue0(v.Pos, OpConst64, t)
13170 v0.AuxInt = int64ToAuxInt(0)
13171 v.AddArg2(x, v0)
13172 return true
13173 }
13174
13175
13176 for {
13177 if v_0.Op != OpConst64 {
13178 break
13179 }
13180 t := v_0.Type
13181 if auxIntToInt64(v_0.AuxInt) != -1 {
13182 break
13183 }
13184 x := v_1
13185 v.reset(OpLeq64)
13186 v0 := b.NewValue0(v.Pos, OpConst64, t)
13187 v0.AuxInt = int64ToAuxInt(0)
13188 v.AddArg2(v0, x)
13189 return true
13190 }
13191
13192
13193 for {
13194 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != math.MinInt64 {
13195 break
13196 }
13197 v.reset(OpConstBool)
13198 v.AuxInt = boolToAuxInt(false)
13199 return true
13200 }
13201
13202
13203 for {
13204 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != math.MaxInt64 {
13205 break
13206 }
13207 v.reset(OpConstBool)
13208 v.AuxInt = boolToAuxInt(false)
13209 return true
13210 }
13211
13212
13213 for {
13214 x := v_0
13215 if v_1.Op != OpConst64 {
13216 break
13217 }
13218 t := v_1.Type
13219 if auxIntToInt64(v_1.AuxInt) != math.MinInt64+1 {
13220 break
13221 }
13222 v.reset(OpEq64)
13223 v0 := b.NewValue0(v.Pos, OpConst64, t)
13224 v0.AuxInt = int64ToAuxInt(math.MinInt64)
13225 v.AddArg2(x, v0)
13226 return true
13227 }
13228
13229
13230 for {
13231 if v_0.Op != OpConst64 {
13232 break
13233 }
13234 t := v_0.Type
13235 if auxIntToInt64(v_0.AuxInt) != math.MaxInt64-1 {
13236 break
13237 }
13238 x := v_1
13239 v.reset(OpEq64)
13240 v0 := b.NewValue0(v.Pos, OpConst64, t)
13241 v0.AuxInt = int64ToAuxInt(math.MaxInt64)
13242 v.AddArg2(x, v0)
13243 return true
13244 }
13245 return false
13246 }
13247 func rewriteValuegeneric_OpLess64F(v *Value) bool {
13248 v_1 := v.Args[1]
13249 v_0 := v.Args[0]
13250
13251
13252 for {
13253 if v_0.Op != OpConst64F {
13254 break
13255 }
13256 c := auxIntToFloat64(v_0.AuxInt)
13257 if v_1.Op != OpConst64F {
13258 break
13259 }
13260 d := auxIntToFloat64(v_1.AuxInt)
13261 v.reset(OpConstBool)
13262 v.AuxInt = boolToAuxInt(c < d)
13263 return true
13264 }
13265 return false
13266 }
13267 func rewriteValuegeneric_OpLess64U(v *Value) bool {
13268 v_1 := v.Args[1]
13269 v_0 := v.Args[0]
13270 b := v.Block
13271
13272
13273 for {
13274 if v_0.Op != OpConst64 {
13275 break
13276 }
13277 c := auxIntToInt64(v_0.AuxInt)
13278 if v_1.Op != OpConst64 {
13279 break
13280 }
13281 d := auxIntToInt64(v_1.AuxInt)
13282 v.reset(OpConstBool)
13283 v.AuxInt = boolToAuxInt(uint64(c) < uint64(d))
13284 return true
13285 }
13286
13287
13288 for {
13289 x := v_0
13290 if v_1.Op != OpConst64 {
13291 break
13292 }
13293 t := v_1.Type
13294 if auxIntToInt64(v_1.AuxInt) != 1 {
13295 break
13296 }
13297 v.reset(OpEq64)
13298 v0 := b.NewValue0(v.Pos, OpConst64, t)
13299 v0.AuxInt = int64ToAuxInt(0)
13300 v.AddArg2(v0, x)
13301 return true
13302 }
13303
13304
13305 for {
13306 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 0 {
13307 break
13308 }
13309 v.reset(OpConstBool)
13310 v.AuxInt = boolToAuxInt(false)
13311 return true
13312 }
13313
13314
13315 for {
13316 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != -1 {
13317 break
13318 }
13319 v.reset(OpConstBool)
13320 v.AuxInt = boolToAuxInt(false)
13321 return true
13322 }
13323
13324
13325 for {
13326 x := v_0
13327 if v_1.Op != OpConst64 {
13328 break
13329 }
13330 t := v_1.Type
13331 if auxIntToInt64(v_1.AuxInt) != 1 {
13332 break
13333 }
13334 v.reset(OpEq64)
13335 v0 := b.NewValue0(v.Pos, OpConst64, t)
13336 v0.AuxInt = int64ToAuxInt(0)
13337 v.AddArg2(x, v0)
13338 return true
13339 }
13340
13341
13342 for {
13343 if v_0.Op != OpConst64 {
13344 break
13345 }
13346 t := v_0.Type
13347 if auxIntToInt64(v_0.AuxInt) != -2 {
13348 break
13349 }
13350 x := v_1
13351 v.reset(OpEq64)
13352 v0 := b.NewValue0(v.Pos, OpConst64, t)
13353 v0.AuxInt = int64ToAuxInt(-1)
13354 v.AddArg2(x, v0)
13355 return true
13356 }
13357 return false
13358 }
13359 func rewriteValuegeneric_OpLess8(v *Value) bool {
13360 v_1 := v.Args[1]
13361 v_0 := v.Args[0]
13362 b := v.Block
13363
13364
13365 for {
13366 if v_0.Op != OpConst8 {
13367 break
13368 }
13369 c := auxIntToInt8(v_0.AuxInt)
13370 if v_1.Op != OpConst8 {
13371 break
13372 }
13373 d := auxIntToInt8(v_1.AuxInt)
13374 v.reset(OpConstBool)
13375 v.AuxInt = boolToAuxInt(c < d)
13376 return true
13377 }
13378
13379
13380
13381 for {
13382 if v_0.Op != OpConst8 {
13383 break
13384 }
13385 t := v_0.Type
13386 if auxIntToInt8(v_0.AuxInt) != 0 {
13387 break
13388 }
13389 x := v_1
13390 if !(isNonNegative(x)) {
13391 break
13392 }
13393 v.reset(OpNeq8)
13394 v0 := b.NewValue0(v.Pos, OpConst8, t)
13395 v0.AuxInt = int8ToAuxInt(0)
13396 v.AddArg2(v0, x)
13397 return true
13398 }
13399
13400
13401
13402 for {
13403 x := v_0
13404 if v_1.Op != OpConst8 {
13405 break
13406 }
13407 t := v_1.Type
13408 if auxIntToInt8(v_1.AuxInt) != 1 || !(isNonNegative(x)) {
13409 break
13410 }
13411 v.reset(OpEq8)
13412 v0 := b.NewValue0(v.Pos, OpConst8, t)
13413 v0.AuxInt = int8ToAuxInt(0)
13414 v.AddArg2(v0, x)
13415 return true
13416 }
13417
13418
13419 for {
13420 x := v_0
13421 if v_1.Op != OpConst8 {
13422 break
13423 }
13424 t := v_1.Type
13425 if auxIntToInt8(v_1.AuxInt) != 1 {
13426 break
13427 }
13428 v.reset(OpLeq8)
13429 v0 := b.NewValue0(v.Pos, OpConst8, t)
13430 v0.AuxInt = int8ToAuxInt(0)
13431 v.AddArg2(x, v0)
13432 return true
13433 }
13434
13435
13436 for {
13437 if v_0.Op != OpConst8 {
13438 break
13439 }
13440 t := v_0.Type
13441 if auxIntToInt8(v_0.AuxInt) != -1 {
13442 break
13443 }
13444 x := v_1
13445 v.reset(OpLeq8)
13446 v0 := b.NewValue0(v.Pos, OpConst8, t)
13447 v0.AuxInt = int8ToAuxInt(0)
13448 v.AddArg2(v0, x)
13449 return true
13450 }
13451
13452
13453 for {
13454 if v_1.Op != OpConst8 || auxIntToInt8(v_1.AuxInt) != math.MinInt8 {
13455 break
13456 }
13457 v.reset(OpConstBool)
13458 v.AuxInt = boolToAuxInt(false)
13459 return true
13460 }
13461
13462
13463 for {
13464 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != math.MaxInt8 {
13465 break
13466 }
13467 v.reset(OpConstBool)
13468 v.AuxInt = boolToAuxInt(false)
13469 return true
13470 }
13471
13472
13473 for {
13474 x := v_0
13475 if v_1.Op != OpConst8 {
13476 break
13477 }
13478 t := v_1.Type
13479 if auxIntToInt8(v_1.AuxInt) != math.MinInt8+1 {
13480 break
13481 }
13482 v.reset(OpEq8)
13483 v0 := b.NewValue0(v.Pos, OpConst8, t)
13484 v0.AuxInt = int8ToAuxInt(math.MinInt8)
13485 v.AddArg2(x, v0)
13486 return true
13487 }
13488
13489
13490 for {
13491 if v_0.Op != OpConst8 {
13492 break
13493 }
13494 t := v_0.Type
13495 if auxIntToInt8(v_0.AuxInt) != math.MaxInt8-1 {
13496 break
13497 }
13498 x := v_1
13499 v.reset(OpEq8)
13500 v0 := b.NewValue0(v.Pos, OpConst8, t)
13501 v0.AuxInt = int8ToAuxInt(math.MaxInt8)
13502 v.AddArg2(x, v0)
13503 return true
13504 }
13505 return false
13506 }
13507 func rewriteValuegeneric_OpLess8U(v *Value) bool {
13508 v_1 := v.Args[1]
13509 v_0 := v.Args[0]
13510 b := v.Block
13511
13512
13513 for {
13514 if v_0.Op != OpConst8 {
13515 break
13516 }
13517 c := auxIntToInt8(v_0.AuxInt)
13518 if v_1.Op != OpConst8 {
13519 break
13520 }
13521 d := auxIntToInt8(v_1.AuxInt)
13522 v.reset(OpConstBool)
13523 v.AuxInt = boolToAuxInt(uint8(c) < uint8(d))
13524 return true
13525 }
13526
13527
13528 for {
13529 x := v_0
13530 if v_1.Op != OpConst8 {
13531 break
13532 }
13533 t := v_1.Type
13534 if auxIntToInt8(v_1.AuxInt) != 1 {
13535 break
13536 }
13537 v.reset(OpEq8)
13538 v0 := b.NewValue0(v.Pos, OpConst8, t)
13539 v0.AuxInt = int8ToAuxInt(0)
13540 v.AddArg2(v0, x)
13541 return true
13542 }
13543
13544
13545 for {
13546 if v_1.Op != OpConst8 || auxIntToInt8(v_1.AuxInt) != 0 {
13547 break
13548 }
13549 v.reset(OpConstBool)
13550 v.AuxInt = boolToAuxInt(false)
13551 return true
13552 }
13553
13554
13555 for {
13556 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != -1 {
13557 break
13558 }
13559 v.reset(OpConstBool)
13560 v.AuxInt = boolToAuxInt(false)
13561 return true
13562 }
13563
13564
13565 for {
13566 x := v_0
13567 if v_1.Op != OpConst8 {
13568 break
13569 }
13570 t := v_1.Type
13571 if auxIntToInt8(v_1.AuxInt) != 1 {
13572 break
13573 }
13574 v.reset(OpEq8)
13575 v0 := b.NewValue0(v.Pos, OpConst8, t)
13576 v0.AuxInt = int8ToAuxInt(0)
13577 v.AddArg2(x, v0)
13578 return true
13579 }
13580
13581
13582 for {
13583 if v_0.Op != OpConst8 {
13584 break
13585 }
13586 t := v_0.Type
13587 if auxIntToInt8(v_0.AuxInt) != -2 {
13588 break
13589 }
13590 x := v_1
13591 v.reset(OpEq8)
13592 v0 := b.NewValue0(v.Pos, OpConst8, t)
13593 v0.AuxInt = int8ToAuxInt(-1)
13594 v.AddArg2(x, v0)
13595 return true
13596 }
13597 return false
13598 }
13599 func rewriteValuegeneric_OpLoad(v *Value) bool {
13600 v_1 := v.Args[1]
13601 v_0 := v.Args[0]
13602 b := v.Block
13603 config := b.Func.Config
13604 typ := &b.Func.Config.Types
13605
13606
13607
13608 for {
13609 t1 := v.Type
13610 p1 := v_0
13611 if v_1.Op != OpStore {
13612 break
13613 }
13614 t2 := auxToType(v_1.Aux)
13615 x := v_1.Args[1]
13616 p2 := v_1.Args[0]
13617 if !(isSamePtr(p1, p2) && copyCompatibleType(t1, x.Type) && t1.Size() == t2.Size()) {
13618 break
13619 }
13620 v.copyOf(x)
13621 return true
13622 }
13623
13624
13625
13626 for {
13627 t1 := v.Type
13628 p1 := v_0
13629 if v_1.Op != OpStore {
13630 break
13631 }
13632 t2 := auxToType(v_1.Aux)
13633 _ = v_1.Args[2]
13634 p2 := v_1.Args[0]
13635 v_1_2 := v_1.Args[2]
13636 if v_1_2.Op != OpStore {
13637 break
13638 }
13639 t3 := auxToType(v_1_2.Aux)
13640 x := v_1_2.Args[1]
13641 p3 := v_1_2.Args[0]
13642 if !(isSamePtr(p1, p3) && copyCompatibleType(t1, x.Type) && t1.Size() == t3.Size() && disjoint(p3, t3.Size(), p2, t2.Size())) {
13643 break
13644 }
13645 v.copyOf(x)
13646 return true
13647 }
13648
13649
13650
13651 for {
13652 t1 := v.Type
13653 p1 := v_0
13654 if v_1.Op != OpStore {
13655 break
13656 }
13657 t2 := auxToType(v_1.Aux)
13658 _ = v_1.Args[2]
13659 p2 := v_1.Args[0]
13660 v_1_2 := v_1.Args[2]
13661 if v_1_2.Op != OpStore {
13662 break
13663 }
13664 t3 := auxToType(v_1_2.Aux)
13665 _ = v_1_2.Args[2]
13666 p3 := v_1_2.Args[0]
13667 v_1_2_2 := v_1_2.Args[2]
13668 if v_1_2_2.Op != OpStore {
13669 break
13670 }
13671 t4 := auxToType(v_1_2_2.Aux)
13672 x := v_1_2_2.Args[1]
13673 p4 := v_1_2_2.Args[0]
13674 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())) {
13675 break
13676 }
13677 v.copyOf(x)
13678 return true
13679 }
13680
13681
13682
13683 for {
13684 t1 := v.Type
13685 p1 := v_0
13686 if v_1.Op != OpStore {
13687 break
13688 }
13689 t2 := auxToType(v_1.Aux)
13690 _ = v_1.Args[2]
13691 p2 := v_1.Args[0]
13692 v_1_2 := v_1.Args[2]
13693 if v_1_2.Op != OpStore {
13694 break
13695 }
13696 t3 := auxToType(v_1_2.Aux)
13697 _ = v_1_2.Args[2]
13698 p3 := v_1_2.Args[0]
13699 v_1_2_2 := v_1_2.Args[2]
13700 if v_1_2_2.Op != OpStore {
13701 break
13702 }
13703 t4 := auxToType(v_1_2_2.Aux)
13704 _ = v_1_2_2.Args[2]
13705 p4 := v_1_2_2.Args[0]
13706 v_1_2_2_2 := v_1_2_2.Args[2]
13707 if v_1_2_2_2.Op != OpStore {
13708 break
13709 }
13710 t5 := auxToType(v_1_2_2_2.Aux)
13711 x := v_1_2_2_2.Args[1]
13712 p5 := v_1_2_2_2.Args[0]
13713 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())) {
13714 break
13715 }
13716 v.copyOf(x)
13717 return true
13718 }
13719
13720
13721
13722 for {
13723 t1 := v.Type
13724 p1 := v_0
13725 if v_1.Op != OpStore {
13726 break
13727 }
13728 t2 := auxToType(v_1.Aux)
13729 _ = v_1.Args[1]
13730 p2 := v_1.Args[0]
13731 v_1_1 := v_1.Args[1]
13732 if v_1_1.Op != OpConst64 {
13733 break
13734 }
13735 x := auxIntToInt64(v_1_1.AuxInt)
13736 if !(isSamePtr(p1, p2) && t2.Size() == 8 && is64BitFloat(t1) && !math.IsNaN(math.Float64frombits(uint64(x)))) {
13737 break
13738 }
13739 v.reset(OpConst64F)
13740 v.AuxInt = float64ToAuxInt(math.Float64frombits(uint64(x)))
13741 return true
13742 }
13743
13744
13745
13746 for {
13747 t1 := v.Type
13748 p1 := v_0
13749 if v_1.Op != OpStore {
13750 break
13751 }
13752 t2 := auxToType(v_1.Aux)
13753 _ = v_1.Args[1]
13754 p2 := v_1.Args[0]
13755 v_1_1 := v_1.Args[1]
13756 if v_1_1.Op != OpConst32 {
13757 break
13758 }
13759 x := auxIntToInt32(v_1_1.AuxInt)
13760 if !(isSamePtr(p1, p2) && t2.Size() == 4 && is32BitFloat(t1) && !math.IsNaN(float64(math.Float32frombits(uint32(x))))) {
13761 break
13762 }
13763 v.reset(OpConst32F)
13764 v.AuxInt = float32ToAuxInt(math.Float32frombits(uint32(x)))
13765 return true
13766 }
13767
13768
13769
13770 for {
13771 t1 := v.Type
13772 p1 := v_0
13773 if v_1.Op != OpStore {
13774 break
13775 }
13776 t2 := auxToType(v_1.Aux)
13777 _ = v_1.Args[1]
13778 p2 := v_1.Args[0]
13779 v_1_1 := v_1.Args[1]
13780 if v_1_1.Op != OpConst64F {
13781 break
13782 }
13783 x := auxIntToFloat64(v_1_1.AuxInt)
13784 if !(isSamePtr(p1, p2) && t2.Size() == 8 && is64BitInt(t1)) {
13785 break
13786 }
13787 v.reset(OpConst64)
13788 v.AuxInt = int64ToAuxInt(int64(math.Float64bits(x)))
13789 return true
13790 }
13791
13792
13793
13794 for {
13795 t1 := v.Type
13796 p1 := v_0
13797 if v_1.Op != OpStore {
13798 break
13799 }
13800 t2 := auxToType(v_1.Aux)
13801 _ = v_1.Args[1]
13802 p2 := v_1.Args[0]
13803 v_1_1 := v_1.Args[1]
13804 if v_1_1.Op != OpConst32F {
13805 break
13806 }
13807 x := auxIntToFloat32(v_1_1.AuxInt)
13808 if !(isSamePtr(p1, p2) && t2.Size() == 4 && is32BitInt(t1)) {
13809 break
13810 }
13811 v.reset(OpConst32)
13812 v.AuxInt = int32ToAuxInt(int32(math.Float32bits(x)))
13813 return true
13814 }
13815
13816
13817
13818 for {
13819 t1 := v.Type
13820 op := v_0
13821 if op.Op != OpOffPtr {
13822 break
13823 }
13824 o1 := auxIntToInt64(op.AuxInt)
13825 p1 := op.Args[0]
13826 if v_1.Op != OpStore {
13827 break
13828 }
13829 t2 := auxToType(v_1.Aux)
13830 _ = v_1.Args[2]
13831 p2 := v_1.Args[0]
13832 mem := v_1.Args[2]
13833 if mem.Op != OpZero {
13834 break
13835 }
13836 n := auxIntToInt64(mem.AuxInt)
13837 p3 := mem.Args[0]
13838 if !(o1 >= 0 && o1+t1.Size() <= n && isSamePtr(p1, p3) && CanSSA(t1) && disjoint(op, t1.Size(), p2, t2.Size())) {
13839 break
13840 }
13841 b = mem.Block
13842 v0 := b.NewValue0(v.Pos, OpLoad, t1)
13843 v.copyOf(v0)
13844 v1 := b.NewValue0(v.Pos, OpOffPtr, op.Type)
13845 v1.AuxInt = int64ToAuxInt(o1)
13846 v1.AddArg(p3)
13847 v0.AddArg2(v1, mem)
13848 return true
13849 }
13850
13851
13852
13853 for {
13854 t1 := v.Type
13855 op := v_0
13856 if op.Op != OpOffPtr {
13857 break
13858 }
13859 o1 := auxIntToInt64(op.AuxInt)
13860 p1 := op.Args[0]
13861 if v_1.Op != OpStore {
13862 break
13863 }
13864 t2 := auxToType(v_1.Aux)
13865 _ = v_1.Args[2]
13866 p2 := v_1.Args[0]
13867 v_1_2 := v_1.Args[2]
13868 if v_1_2.Op != OpStore {
13869 break
13870 }
13871 t3 := auxToType(v_1_2.Aux)
13872 _ = v_1_2.Args[2]
13873 p3 := v_1_2.Args[0]
13874 mem := v_1_2.Args[2]
13875 if mem.Op != OpZero {
13876 break
13877 }
13878 n := auxIntToInt64(mem.AuxInt)
13879 p4 := mem.Args[0]
13880 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())) {
13881 break
13882 }
13883 b = mem.Block
13884 v0 := b.NewValue0(v.Pos, OpLoad, t1)
13885 v.copyOf(v0)
13886 v1 := b.NewValue0(v.Pos, OpOffPtr, op.Type)
13887 v1.AuxInt = int64ToAuxInt(o1)
13888 v1.AddArg(p4)
13889 v0.AddArg2(v1, mem)
13890 return true
13891 }
13892
13893
13894
13895 for {
13896 t1 := v.Type
13897 op := v_0
13898 if op.Op != OpOffPtr {
13899 break
13900 }
13901 o1 := auxIntToInt64(op.AuxInt)
13902 p1 := op.Args[0]
13903 if v_1.Op != OpStore {
13904 break
13905 }
13906 t2 := auxToType(v_1.Aux)
13907 _ = v_1.Args[2]
13908 p2 := v_1.Args[0]
13909 v_1_2 := v_1.Args[2]
13910 if v_1_2.Op != OpStore {
13911 break
13912 }
13913 t3 := auxToType(v_1_2.Aux)
13914 _ = v_1_2.Args[2]
13915 p3 := v_1_2.Args[0]
13916 v_1_2_2 := v_1_2.Args[2]
13917 if v_1_2_2.Op != OpStore {
13918 break
13919 }
13920 t4 := auxToType(v_1_2_2.Aux)
13921 _ = v_1_2_2.Args[2]
13922 p4 := v_1_2_2.Args[0]
13923 mem := v_1_2_2.Args[2]
13924 if mem.Op != OpZero {
13925 break
13926 }
13927 n := auxIntToInt64(mem.AuxInt)
13928 p5 := mem.Args[0]
13929 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())) {
13930 break
13931 }
13932 b = mem.Block
13933 v0 := b.NewValue0(v.Pos, OpLoad, t1)
13934 v.copyOf(v0)
13935 v1 := b.NewValue0(v.Pos, OpOffPtr, op.Type)
13936 v1.AuxInt = int64ToAuxInt(o1)
13937 v1.AddArg(p5)
13938 v0.AddArg2(v1, mem)
13939 return true
13940 }
13941
13942
13943
13944 for {
13945 t1 := v.Type
13946 op := v_0
13947 if op.Op != OpOffPtr {
13948 break
13949 }
13950 o1 := auxIntToInt64(op.AuxInt)
13951 p1 := op.Args[0]
13952 if v_1.Op != OpStore {
13953 break
13954 }
13955 t2 := auxToType(v_1.Aux)
13956 _ = v_1.Args[2]
13957 p2 := v_1.Args[0]
13958 v_1_2 := v_1.Args[2]
13959 if v_1_2.Op != OpStore {
13960 break
13961 }
13962 t3 := auxToType(v_1_2.Aux)
13963 _ = v_1_2.Args[2]
13964 p3 := v_1_2.Args[0]
13965 v_1_2_2 := v_1_2.Args[2]
13966 if v_1_2_2.Op != OpStore {
13967 break
13968 }
13969 t4 := auxToType(v_1_2_2.Aux)
13970 _ = v_1_2_2.Args[2]
13971 p4 := v_1_2_2.Args[0]
13972 v_1_2_2_2 := v_1_2_2.Args[2]
13973 if v_1_2_2_2.Op != OpStore {
13974 break
13975 }
13976 t5 := auxToType(v_1_2_2_2.Aux)
13977 _ = v_1_2_2_2.Args[2]
13978 p5 := v_1_2_2_2.Args[0]
13979 mem := v_1_2_2_2.Args[2]
13980 if mem.Op != OpZero {
13981 break
13982 }
13983 n := auxIntToInt64(mem.AuxInt)
13984 p6 := mem.Args[0]
13985 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())) {
13986 break
13987 }
13988 b = mem.Block
13989 v0 := b.NewValue0(v.Pos, OpLoad, t1)
13990 v.copyOf(v0)
13991 v1 := b.NewValue0(v.Pos, OpOffPtr, op.Type)
13992 v1.AuxInt = int64ToAuxInt(o1)
13993 v1.AddArg(p6)
13994 v0.AddArg2(v1, mem)
13995 return true
13996 }
13997
13998
13999
14000 for {
14001 t1 := v.Type
14002 if v_0.Op != OpOffPtr {
14003 break
14004 }
14005 o := auxIntToInt64(v_0.AuxInt)
14006 p1 := v_0.Args[0]
14007 if v_1.Op != OpZero {
14008 break
14009 }
14010 n := auxIntToInt64(v_1.AuxInt)
14011 p2 := v_1.Args[0]
14012 if !(t1.IsBoolean() && isSamePtr(p1, p2) && n >= o+1) {
14013 break
14014 }
14015 v.reset(OpConstBool)
14016 v.AuxInt = boolToAuxInt(false)
14017 return true
14018 }
14019
14020
14021
14022 for {
14023 t1 := v.Type
14024 if v_0.Op != OpOffPtr {
14025 break
14026 }
14027 o := auxIntToInt64(v_0.AuxInt)
14028 p1 := v_0.Args[0]
14029 if v_1.Op != OpZero {
14030 break
14031 }
14032 n := auxIntToInt64(v_1.AuxInt)
14033 p2 := v_1.Args[0]
14034 if !(is8BitInt(t1) && isSamePtr(p1, p2) && n >= o+1) {
14035 break
14036 }
14037 v.reset(OpConst8)
14038 v.AuxInt = int8ToAuxInt(0)
14039 return true
14040 }
14041
14042
14043
14044 for {
14045 t1 := v.Type
14046 if v_0.Op != OpOffPtr {
14047 break
14048 }
14049 o := auxIntToInt64(v_0.AuxInt)
14050 p1 := v_0.Args[0]
14051 if v_1.Op != OpZero {
14052 break
14053 }
14054 n := auxIntToInt64(v_1.AuxInt)
14055 p2 := v_1.Args[0]
14056 if !(is16BitInt(t1) && isSamePtr(p1, p2) && n >= o+2) {
14057 break
14058 }
14059 v.reset(OpConst16)
14060 v.AuxInt = int16ToAuxInt(0)
14061 return true
14062 }
14063
14064
14065
14066 for {
14067 t1 := v.Type
14068 if v_0.Op != OpOffPtr {
14069 break
14070 }
14071 o := auxIntToInt64(v_0.AuxInt)
14072 p1 := v_0.Args[0]
14073 if v_1.Op != OpZero {
14074 break
14075 }
14076 n := auxIntToInt64(v_1.AuxInt)
14077 p2 := v_1.Args[0]
14078 if !(is32BitInt(t1) && isSamePtr(p1, p2) && n >= o+4) {
14079 break
14080 }
14081 v.reset(OpConst32)
14082 v.AuxInt = int32ToAuxInt(0)
14083 return true
14084 }
14085
14086
14087
14088 for {
14089 t1 := v.Type
14090 if v_0.Op != OpOffPtr {
14091 break
14092 }
14093 o := auxIntToInt64(v_0.AuxInt)
14094 p1 := v_0.Args[0]
14095 if v_1.Op != OpZero {
14096 break
14097 }
14098 n := auxIntToInt64(v_1.AuxInt)
14099 p2 := v_1.Args[0]
14100 if !(is64BitInt(t1) && isSamePtr(p1, p2) && n >= o+8) {
14101 break
14102 }
14103 v.reset(OpConst64)
14104 v.AuxInt = int64ToAuxInt(0)
14105 return true
14106 }
14107
14108
14109
14110 for {
14111 t1 := v.Type
14112 if v_0.Op != OpOffPtr {
14113 break
14114 }
14115 o := auxIntToInt64(v_0.AuxInt)
14116 p1 := v_0.Args[0]
14117 if v_1.Op != OpZero {
14118 break
14119 }
14120 n := auxIntToInt64(v_1.AuxInt)
14121 p2 := v_1.Args[0]
14122 if !(is32BitFloat(t1) && isSamePtr(p1, p2) && n >= o+4) {
14123 break
14124 }
14125 v.reset(OpConst32F)
14126 v.AuxInt = float32ToAuxInt(0)
14127 return true
14128 }
14129
14130
14131
14132 for {
14133 t1 := v.Type
14134 if v_0.Op != OpOffPtr {
14135 break
14136 }
14137 o := auxIntToInt64(v_0.AuxInt)
14138 p1 := v_0.Args[0]
14139 if v_1.Op != OpZero {
14140 break
14141 }
14142 n := auxIntToInt64(v_1.AuxInt)
14143 p2 := v_1.Args[0]
14144 if !(is64BitFloat(t1) && isSamePtr(p1, p2) && n >= o+8) {
14145 break
14146 }
14147 v.reset(OpConst64F)
14148 v.AuxInt = float64ToAuxInt(0)
14149 return true
14150 }
14151
14152
14153
14154 for {
14155 t := v.Type
14156 if !(t.IsStruct() && CanSSA(t)) {
14157 break
14158 }
14159 v.copyOf(rewriteStructLoad(v))
14160 return true
14161 }
14162
14163
14164
14165 for {
14166 t := v.Type
14167 if !(t.IsArray() && t.NumElem() == 0) {
14168 break
14169 }
14170 v.reset(OpArrayMake0)
14171 return true
14172 }
14173
14174
14175
14176 for {
14177 t := v.Type
14178 ptr := v_0
14179 mem := v_1
14180 if !(t.IsArray() && t.NumElem() == 1 && CanSSA(t)) {
14181 break
14182 }
14183 v.reset(OpArrayMake1)
14184 v0 := b.NewValue0(v.Pos, OpLoad, t.Elem())
14185 v0.AddArg2(ptr, mem)
14186 v.AddArg(v0)
14187 return true
14188 }
14189
14190
14191
14192 for {
14193 if v.Type != typ.BytePtr || v_0.Op != OpOffPtr {
14194 break
14195 }
14196 off := auxIntToInt64(v_0.AuxInt)
14197 v_0_0 := v_0.Args[0]
14198 if v_0_0.Op != OpAddr {
14199 break
14200 }
14201 s := auxToSym(v_0_0.Aux)
14202 sb := v_0_0.Args[0]
14203 if !(isFixedSym(s, off)) {
14204 break
14205 }
14206 v.reset(OpAddr)
14207 v.Aux = symToAux(fixedSym(b.Func, s, off))
14208 v.AddArg(sb)
14209 return true
14210 }
14211
14212
14213
14214 for {
14215 if v.Type != typ.BytePtr || v_0.Op != OpOffPtr {
14216 break
14217 }
14218 off := auxIntToInt64(v_0.AuxInt)
14219 v_0_0 := v_0.Args[0]
14220 if v_0_0.Op != OpConvert {
14221 break
14222 }
14223 v_0_0_0 := v_0_0.Args[0]
14224 if v_0_0_0.Op != OpAddr {
14225 break
14226 }
14227 s := auxToSym(v_0_0_0.Aux)
14228 sb := v_0_0_0.Args[0]
14229 if !(isFixedSym(s, off)) {
14230 break
14231 }
14232 v.reset(OpAddr)
14233 v.Aux = symToAux(fixedSym(b.Func, s, off))
14234 v.AddArg(sb)
14235 return true
14236 }
14237
14238
14239
14240 for {
14241 if v.Type != typ.BytePtr || v_0.Op != OpOffPtr {
14242 break
14243 }
14244 off := auxIntToInt64(v_0.AuxInt)
14245 v_0_0 := v_0.Args[0]
14246 if v_0_0.Op != OpITab {
14247 break
14248 }
14249 v_0_0_0 := v_0_0.Args[0]
14250 if v_0_0_0.Op != OpIMake {
14251 break
14252 }
14253 v_0_0_0_0 := v_0_0_0.Args[0]
14254 if v_0_0_0_0.Op != OpAddr {
14255 break
14256 }
14257 s := auxToSym(v_0_0_0_0.Aux)
14258 sb := v_0_0_0_0.Args[0]
14259 if !(isFixedSym(s, off)) {
14260 break
14261 }
14262 v.reset(OpAddr)
14263 v.Aux = symToAux(fixedSym(b.Func, s, off))
14264 v.AddArg(sb)
14265 return true
14266 }
14267
14268
14269
14270 for {
14271 if v.Type != typ.BytePtr || v_0.Op != OpOffPtr {
14272 break
14273 }
14274 off := auxIntToInt64(v_0.AuxInt)
14275 v_0_0 := v_0.Args[0]
14276 if v_0_0.Op != OpITab {
14277 break
14278 }
14279 v_0_0_0 := v_0_0.Args[0]
14280 if v_0_0_0.Op != OpIMake {
14281 break
14282 }
14283 v_0_0_0_0 := v_0_0_0.Args[0]
14284 if v_0_0_0_0.Op != OpConvert {
14285 break
14286 }
14287 v_0_0_0_0_0 := v_0_0_0_0.Args[0]
14288 if v_0_0_0_0_0.Op != OpAddr {
14289 break
14290 }
14291 s := auxToSym(v_0_0_0_0_0.Aux)
14292 sb := v_0_0_0_0_0.Args[0]
14293 if !(isFixedSym(s, off)) {
14294 break
14295 }
14296 v.reset(OpAddr)
14297 v.Aux = symToAux(fixedSym(b.Func, s, off))
14298 v.AddArg(sb)
14299 return true
14300 }
14301
14302
14303
14304 for {
14305 if v.Type != typ.Uintptr || v_0.Op != OpOffPtr {
14306 break
14307 }
14308 off := auxIntToInt64(v_0.AuxInt)
14309 v_0_0 := v_0.Args[0]
14310 if v_0_0.Op != OpAddr {
14311 break
14312 }
14313 s := auxToSym(v_0_0.Aux)
14314 sb := v_0_0.Args[0]
14315 if !(isFixedSym(s, off)) {
14316 break
14317 }
14318 v.reset(OpAddr)
14319 v.Aux = symToAux(fixedSym(b.Func, s, off))
14320 v.AddArg(sb)
14321 return true
14322 }
14323
14324
14325
14326 for {
14327 if v.Type != typ.Uintptr || v_0.Op != OpOffPtr {
14328 break
14329 }
14330 off := auxIntToInt64(v_0.AuxInt)
14331 v_0_0 := v_0.Args[0]
14332 if v_0_0.Op != OpConvert {
14333 break
14334 }
14335 v_0_0_0 := v_0_0.Args[0]
14336 if v_0_0_0.Op != OpAddr {
14337 break
14338 }
14339 s := auxToSym(v_0_0_0.Aux)
14340 sb := v_0_0_0.Args[0]
14341 if !(isFixedSym(s, off)) {
14342 break
14343 }
14344 v.reset(OpAddr)
14345 v.Aux = symToAux(fixedSym(b.Func, s, off))
14346 v.AddArg(sb)
14347 return true
14348 }
14349
14350
14351
14352 for {
14353 if v.Type != typ.Uintptr || v_0.Op != OpOffPtr {
14354 break
14355 }
14356 off := auxIntToInt64(v_0.AuxInt)
14357 v_0_0 := v_0.Args[0]
14358 if v_0_0.Op != OpITab {
14359 break
14360 }
14361 v_0_0_0 := v_0_0.Args[0]
14362 if v_0_0_0.Op != OpIMake {
14363 break
14364 }
14365 v_0_0_0_0 := v_0_0_0.Args[0]
14366 if v_0_0_0_0.Op != OpAddr {
14367 break
14368 }
14369 s := auxToSym(v_0_0_0_0.Aux)
14370 sb := v_0_0_0_0.Args[0]
14371 if !(isFixedSym(s, off)) {
14372 break
14373 }
14374 v.reset(OpAddr)
14375 v.Aux = symToAux(fixedSym(b.Func, s, off))
14376 v.AddArg(sb)
14377 return true
14378 }
14379
14380
14381
14382 for {
14383 if v.Type != typ.Uintptr || v_0.Op != OpOffPtr {
14384 break
14385 }
14386 off := auxIntToInt64(v_0.AuxInt)
14387 v_0_0 := v_0.Args[0]
14388 if v_0_0.Op != OpITab {
14389 break
14390 }
14391 v_0_0_0 := v_0_0.Args[0]
14392 if v_0_0_0.Op != OpIMake {
14393 break
14394 }
14395 v_0_0_0_0 := v_0_0_0.Args[0]
14396 if v_0_0_0_0.Op != OpConvert {
14397 break
14398 }
14399 v_0_0_0_0_0 := v_0_0_0_0.Args[0]
14400 if v_0_0_0_0_0.Op != OpAddr {
14401 break
14402 }
14403 s := auxToSym(v_0_0_0_0_0.Aux)
14404 sb := v_0_0_0_0_0.Args[0]
14405 if !(isFixedSym(s, off)) {
14406 break
14407 }
14408 v.reset(OpAddr)
14409 v.Aux = symToAux(fixedSym(b.Func, s, off))
14410 v.AddArg(sb)
14411 return true
14412 }
14413
14414
14415
14416 for {
14417 t := v.Type
14418 if v_0.Op != OpOffPtr {
14419 break
14420 }
14421 off := auxIntToInt64(v_0.AuxInt)
14422 v_0_0 := v_0.Args[0]
14423 if v_0_0.Op != OpAddr {
14424 break
14425 }
14426 sym := auxToSym(v_0_0.Aux)
14427 if !(t.IsInteger() && t.Size() == 4 && isFixed32(config, sym, off)) {
14428 break
14429 }
14430 v.reset(OpConst32)
14431 v.AuxInt = int32ToAuxInt(fixed32(config, sym, off))
14432 return true
14433 }
14434
14435
14436
14437 for {
14438 t := v.Type
14439 if v_0.Op != OpOffPtr {
14440 break
14441 }
14442 off := auxIntToInt64(v_0.AuxInt)
14443 v_0_0 := v_0.Args[0]
14444 if v_0_0.Op != OpConvert {
14445 break
14446 }
14447 v_0_0_0 := v_0_0.Args[0]
14448 if v_0_0_0.Op != OpAddr {
14449 break
14450 }
14451 sym := auxToSym(v_0_0_0.Aux)
14452 if !(t.IsInteger() && t.Size() == 4 && isFixed32(config, sym, off)) {
14453 break
14454 }
14455 v.reset(OpConst32)
14456 v.AuxInt = int32ToAuxInt(fixed32(config, sym, off))
14457 return true
14458 }
14459
14460
14461
14462 for {
14463 t := v.Type
14464 if v_0.Op != OpOffPtr {
14465 break
14466 }
14467 off := auxIntToInt64(v_0.AuxInt)
14468 v_0_0 := v_0.Args[0]
14469 if v_0_0.Op != OpITab {
14470 break
14471 }
14472 v_0_0_0 := v_0_0.Args[0]
14473 if v_0_0_0.Op != OpIMake {
14474 break
14475 }
14476 v_0_0_0_0 := v_0_0_0.Args[0]
14477 if v_0_0_0_0.Op != OpAddr {
14478 break
14479 }
14480 sym := auxToSym(v_0_0_0_0.Aux)
14481 if !(t.IsInteger() && t.Size() == 4 && isFixed32(config, sym, off)) {
14482 break
14483 }
14484 v.reset(OpConst32)
14485 v.AuxInt = int32ToAuxInt(fixed32(config, sym, off))
14486 return true
14487 }
14488
14489
14490
14491 for {
14492 t := v.Type
14493 if v_0.Op != OpOffPtr {
14494 break
14495 }
14496 off := auxIntToInt64(v_0.AuxInt)
14497 v_0_0 := v_0.Args[0]
14498 if v_0_0.Op != OpITab {
14499 break
14500 }
14501 v_0_0_0 := v_0_0.Args[0]
14502 if v_0_0_0.Op != OpIMake {
14503 break
14504 }
14505 v_0_0_0_0 := v_0_0_0.Args[0]
14506 if v_0_0_0_0.Op != OpConvert {
14507 break
14508 }
14509 v_0_0_0_0_0 := v_0_0_0_0.Args[0]
14510 if v_0_0_0_0_0.Op != OpAddr {
14511 break
14512 }
14513 sym := auxToSym(v_0_0_0_0_0.Aux)
14514 if !(t.IsInteger() && t.Size() == 4 && isFixed32(config, sym, off)) {
14515 break
14516 }
14517 v.reset(OpConst32)
14518 v.AuxInt = int32ToAuxInt(fixed32(config, sym, off))
14519 return true
14520 }
14521 return false
14522 }
14523 func rewriteValuegeneric_OpLsh16x16(v *Value) bool {
14524 v_1 := v.Args[1]
14525 v_0 := v.Args[0]
14526 b := v.Block
14527
14528
14529 for {
14530 t := v.Type
14531 x := v_0
14532 if v_1.Op != OpConst16 {
14533 break
14534 }
14535 c := auxIntToInt16(v_1.AuxInt)
14536 v.reset(OpLsh16x64)
14537 v0 := b.NewValue0(v.Pos, OpConst64, t)
14538 v0.AuxInt = int64ToAuxInt(int64(uint16(c)))
14539 v.AddArg2(x, v0)
14540 return true
14541 }
14542
14543
14544 for {
14545 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 {
14546 break
14547 }
14548 v.reset(OpConst16)
14549 v.AuxInt = int16ToAuxInt(0)
14550 return true
14551 }
14552 return false
14553 }
14554 func rewriteValuegeneric_OpLsh16x32(v *Value) bool {
14555 v_1 := v.Args[1]
14556 v_0 := v.Args[0]
14557 b := v.Block
14558
14559
14560 for {
14561 t := v.Type
14562 x := v_0
14563 if v_1.Op != OpConst32 {
14564 break
14565 }
14566 c := auxIntToInt32(v_1.AuxInt)
14567 v.reset(OpLsh16x64)
14568 v0 := b.NewValue0(v.Pos, OpConst64, t)
14569 v0.AuxInt = int64ToAuxInt(int64(uint32(c)))
14570 v.AddArg2(x, v0)
14571 return true
14572 }
14573
14574
14575 for {
14576 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 {
14577 break
14578 }
14579 v.reset(OpConst16)
14580 v.AuxInt = int16ToAuxInt(0)
14581 return true
14582 }
14583 return false
14584 }
14585 func rewriteValuegeneric_OpLsh16x64(v *Value) bool {
14586 v_1 := v.Args[1]
14587 v_0 := v.Args[0]
14588 b := v.Block
14589 typ := &b.Func.Config.Types
14590
14591
14592 for {
14593 if v_0.Op != OpConst16 {
14594 break
14595 }
14596 c := auxIntToInt16(v_0.AuxInt)
14597 if v_1.Op != OpConst64 {
14598 break
14599 }
14600 d := auxIntToInt64(v_1.AuxInt)
14601 v.reset(OpConst16)
14602 v.AuxInt = int16ToAuxInt(c << uint64(d))
14603 return true
14604 }
14605
14606
14607 for {
14608 x := v_0
14609 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 0 {
14610 break
14611 }
14612 v.copyOf(x)
14613 return true
14614 }
14615
14616
14617 for {
14618 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 {
14619 break
14620 }
14621 v.reset(OpConst16)
14622 v.AuxInt = int16ToAuxInt(0)
14623 return true
14624 }
14625
14626
14627
14628 for {
14629 if v_1.Op != OpConst64 {
14630 break
14631 }
14632 c := auxIntToInt64(v_1.AuxInt)
14633 if !(uint64(c) >= 16) {
14634 break
14635 }
14636 v.reset(OpConst16)
14637 v.AuxInt = int16ToAuxInt(0)
14638 return true
14639 }
14640
14641
14642
14643 for {
14644 t := v.Type
14645 if v_0.Op != OpLsh16x64 {
14646 break
14647 }
14648 _ = v_0.Args[1]
14649 x := v_0.Args[0]
14650 v_0_1 := v_0.Args[1]
14651 if v_0_1.Op != OpConst64 {
14652 break
14653 }
14654 c := auxIntToInt64(v_0_1.AuxInt)
14655 if v_1.Op != OpConst64 {
14656 break
14657 }
14658 d := auxIntToInt64(v_1.AuxInt)
14659 if !(!uaddOvf(c, d)) {
14660 break
14661 }
14662 v.reset(OpLsh16x64)
14663 v0 := b.NewValue0(v.Pos, OpConst64, t)
14664 v0.AuxInt = int64ToAuxInt(c + d)
14665 v.AddArg2(x, v0)
14666 return true
14667 }
14668
14669
14670
14671 for {
14672 i := v_0
14673 if i.Op != OpRsh16x64 {
14674 break
14675 }
14676 _ = i.Args[1]
14677 x := i.Args[0]
14678 i_1 := i.Args[1]
14679 if i_1.Op != OpConst64 {
14680 break
14681 }
14682 c := auxIntToInt64(i_1.AuxInt)
14683 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != c || !(c >= 0 && c < 16 && i.Uses == 1) {
14684 break
14685 }
14686 v.reset(OpAnd16)
14687 v0 := b.NewValue0(v.Pos, OpConst16, v.Type)
14688 v0.AuxInt = int16ToAuxInt(int16(-1) << c)
14689 v.AddArg2(x, v0)
14690 return true
14691 }
14692
14693
14694
14695 for {
14696 i := v_0
14697 if i.Op != OpRsh16Ux64 {
14698 break
14699 }
14700 _ = i.Args[1]
14701 x := i.Args[0]
14702 i_1 := i.Args[1]
14703 if i_1.Op != OpConst64 {
14704 break
14705 }
14706 c := auxIntToInt64(i_1.AuxInt)
14707 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != c || !(c >= 0 && c < 16 && i.Uses == 1) {
14708 break
14709 }
14710 v.reset(OpAnd16)
14711 v0 := b.NewValue0(v.Pos, OpConst16, v.Type)
14712 v0.AuxInt = int16ToAuxInt(int16(-1) << c)
14713 v.AddArg2(x, v0)
14714 return true
14715 }
14716
14717
14718
14719 for {
14720 if v_0.Op != OpRsh16Ux64 {
14721 break
14722 }
14723 _ = v_0.Args[1]
14724 v_0_0 := v_0.Args[0]
14725 if v_0_0.Op != OpLsh16x64 {
14726 break
14727 }
14728 _ = v_0_0.Args[1]
14729 x := v_0_0.Args[0]
14730 v_0_0_1 := v_0_0.Args[1]
14731 if v_0_0_1.Op != OpConst64 {
14732 break
14733 }
14734 c1 := auxIntToInt64(v_0_0_1.AuxInt)
14735 v_0_1 := v_0.Args[1]
14736 if v_0_1.Op != OpConst64 {
14737 break
14738 }
14739 c2 := auxIntToInt64(v_0_1.AuxInt)
14740 if v_1.Op != OpConst64 {
14741 break
14742 }
14743 c3 := auxIntToInt64(v_1.AuxInt)
14744 if !(uint64(c1) >= uint64(c2) && uint64(c3) >= uint64(c2) && !uaddOvf(c1-c2, c3)) {
14745 break
14746 }
14747 v.reset(OpLsh16x64)
14748 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
14749 v0.AuxInt = int64ToAuxInt(c1 - c2 + c3)
14750 v.AddArg2(x, v0)
14751 return true
14752 }
14753
14754
14755
14756 for {
14757 if v_0.Op != OpAnd16 {
14758 break
14759 }
14760 _ = v_0.Args[1]
14761 v_0_0 := v_0.Args[0]
14762 v_0_1 := v_0.Args[1]
14763 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
14764 if v_0_0.Op != OpRsh16x64 {
14765 continue
14766 }
14767 t := v_0_0.Type
14768 _ = v_0_0.Args[1]
14769 x := v_0_0.Args[0]
14770 v_0_0_1 := v_0_0.Args[1]
14771 if v_0_0_1.Op != OpConst64 {
14772 continue
14773 }
14774 t2 := v_0_0_1.Type
14775 c := auxIntToInt64(v_0_0_1.AuxInt)
14776 if v_0_1.Op != OpConst16 {
14777 continue
14778 }
14779 d := auxIntToInt16(v_0_1.AuxInt)
14780 if v_1.Op != OpConst64 {
14781 continue
14782 }
14783 e := auxIntToInt64(v_1.AuxInt)
14784 if !(c >= e) {
14785 continue
14786 }
14787 v.reset(OpAnd16)
14788 v0 := b.NewValue0(v.Pos, OpRsh16x64, t)
14789 v1 := b.NewValue0(v.Pos, OpConst64, t2)
14790 v1.AuxInt = int64ToAuxInt(c - e)
14791 v0.AddArg2(x, v1)
14792 v2 := b.NewValue0(v.Pos, OpConst16, t)
14793 v2.AuxInt = int16ToAuxInt(d << e)
14794 v.AddArg2(v0, v2)
14795 return true
14796 }
14797 break
14798 }
14799
14800
14801
14802 for {
14803 if v_0.Op != OpAnd16 {
14804 break
14805 }
14806 _ = v_0.Args[1]
14807 v_0_0 := v_0.Args[0]
14808 v_0_1 := v_0.Args[1]
14809 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
14810 if v_0_0.Op != OpRsh16Ux64 {
14811 continue
14812 }
14813 t := v_0_0.Type
14814 _ = v_0_0.Args[1]
14815 x := v_0_0.Args[0]
14816 v_0_0_1 := v_0_0.Args[1]
14817 if v_0_0_1.Op != OpConst64 {
14818 continue
14819 }
14820 t2 := v_0_0_1.Type
14821 c := auxIntToInt64(v_0_0_1.AuxInt)
14822 if v_0_1.Op != OpConst16 {
14823 continue
14824 }
14825 d := auxIntToInt16(v_0_1.AuxInt)
14826 if v_1.Op != OpConst64 {
14827 continue
14828 }
14829 e := auxIntToInt64(v_1.AuxInt)
14830 if !(c >= e) {
14831 continue
14832 }
14833 v.reset(OpAnd16)
14834 v0 := b.NewValue0(v.Pos, OpRsh16Ux64, t)
14835 v1 := b.NewValue0(v.Pos, OpConst64, t2)
14836 v1.AuxInt = int64ToAuxInt(c - e)
14837 v0.AddArg2(x, v1)
14838 v2 := b.NewValue0(v.Pos, OpConst16, t)
14839 v2.AuxInt = int16ToAuxInt(d << e)
14840 v.AddArg2(v0, v2)
14841 return true
14842 }
14843 break
14844 }
14845
14846
14847
14848 for {
14849 if v_0.Op != OpAnd16 {
14850 break
14851 }
14852 _ = v_0.Args[1]
14853 v_0_0 := v_0.Args[0]
14854 v_0_1 := v_0.Args[1]
14855 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
14856 if v_0_0.Op != OpRsh16x64 {
14857 continue
14858 }
14859 t := v_0_0.Type
14860 _ = v_0_0.Args[1]
14861 x := v_0_0.Args[0]
14862 v_0_0_1 := v_0_0.Args[1]
14863 if v_0_0_1.Op != OpConst64 {
14864 continue
14865 }
14866 t2 := v_0_0_1.Type
14867 c := auxIntToInt64(v_0_0_1.AuxInt)
14868 if v_0_1.Op != OpConst16 {
14869 continue
14870 }
14871 d := auxIntToInt16(v_0_1.AuxInt)
14872 if v_1.Op != OpConst64 {
14873 continue
14874 }
14875 e := auxIntToInt64(v_1.AuxInt)
14876 if !(c < e) {
14877 continue
14878 }
14879 v.reset(OpAnd16)
14880 v0 := b.NewValue0(v.Pos, OpLsh16x64, t)
14881 v1 := b.NewValue0(v.Pos, OpConst64, t2)
14882 v1.AuxInt = int64ToAuxInt(e - c)
14883 v0.AddArg2(x, v1)
14884 v2 := b.NewValue0(v.Pos, OpConst16, t)
14885 v2.AuxInt = int16ToAuxInt(d << e)
14886 v.AddArg2(v0, v2)
14887 return true
14888 }
14889 break
14890 }
14891
14892
14893
14894 for {
14895 if v_0.Op != OpAnd16 {
14896 break
14897 }
14898 _ = v_0.Args[1]
14899 v_0_0 := v_0.Args[0]
14900 v_0_1 := v_0.Args[1]
14901 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
14902 if v_0_0.Op != OpRsh16Ux64 {
14903 continue
14904 }
14905 t := v_0_0.Type
14906 _ = v_0_0.Args[1]
14907 x := v_0_0.Args[0]
14908 v_0_0_1 := v_0_0.Args[1]
14909 if v_0_0_1.Op != OpConst64 {
14910 continue
14911 }
14912 t2 := v_0_0_1.Type
14913 c := auxIntToInt64(v_0_0_1.AuxInt)
14914 if v_0_1.Op != OpConst16 {
14915 continue
14916 }
14917 d := auxIntToInt16(v_0_1.AuxInt)
14918 if v_1.Op != OpConst64 {
14919 continue
14920 }
14921 e := auxIntToInt64(v_1.AuxInt)
14922 if !(c < e) {
14923 continue
14924 }
14925 v.reset(OpAnd16)
14926 v0 := b.NewValue0(v.Pos, OpLsh16x64, t)
14927 v1 := b.NewValue0(v.Pos, OpConst64, t2)
14928 v1.AuxInt = int64ToAuxInt(e - c)
14929 v0.AddArg2(x, v1)
14930 v2 := b.NewValue0(v.Pos, OpConst16, t)
14931 v2.AuxInt = int16ToAuxInt(d << e)
14932 v.AddArg2(v0, v2)
14933 return true
14934 }
14935 break
14936 }
14937 return false
14938 }
14939 func rewriteValuegeneric_OpLsh16x8(v *Value) bool {
14940 v_1 := v.Args[1]
14941 v_0 := v.Args[0]
14942 b := v.Block
14943
14944
14945 for {
14946 t := v.Type
14947 x := v_0
14948 if v_1.Op != OpConst8 {
14949 break
14950 }
14951 c := auxIntToInt8(v_1.AuxInt)
14952 v.reset(OpLsh16x64)
14953 v0 := b.NewValue0(v.Pos, OpConst64, t)
14954 v0.AuxInt = int64ToAuxInt(int64(uint8(c)))
14955 v.AddArg2(x, v0)
14956 return true
14957 }
14958
14959
14960 for {
14961 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 {
14962 break
14963 }
14964 v.reset(OpConst16)
14965 v.AuxInt = int16ToAuxInt(0)
14966 return true
14967 }
14968 return false
14969 }
14970 func rewriteValuegeneric_OpLsh32x16(v *Value) bool {
14971 v_1 := v.Args[1]
14972 v_0 := v.Args[0]
14973 b := v.Block
14974
14975
14976 for {
14977 t := v.Type
14978 x := v_0
14979 if v_1.Op != OpConst16 {
14980 break
14981 }
14982 c := auxIntToInt16(v_1.AuxInt)
14983 v.reset(OpLsh32x64)
14984 v0 := b.NewValue0(v.Pos, OpConst64, t)
14985 v0.AuxInt = int64ToAuxInt(int64(uint16(c)))
14986 v.AddArg2(x, v0)
14987 return true
14988 }
14989
14990
14991 for {
14992 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
14993 break
14994 }
14995 v.reset(OpConst32)
14996 v.AuxInt = int32ToAuxInt(0)
14997 return true
14998 }
14999 return false
15000 }
15001 func rewriteValuegeneric_OpLsh32x32(v *Value) bool {
15002 v_1 := v.Args[1]
15003 v_0 := v.Args[0]
15004 b := v.Block
15005
15006
15007 for {
15008 t := v.Type
15009 x := v_0
15010 if v_1.Op != OpConst32 {
15011 break
15012 }
15013 c := auxIntToInt32(v_1.AuxInt)
15014 v.reset(OpLsh32x64)
15015 v0 := b.NewValue0(v.Pos, OpConst64, t)
15016 v0.AuxInt = int64ToAuxInt(int64(uint32(c)))
15017 v.AddArg2(x, v0)
15018 return true
15019 }
15020
15021
15022 for {
15023 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
15024 break
15025 }
15026 v.reset(OpConst32)
15027 v.AuxInt = int32ToAuxInt(0)
15028 return true
15029 }
15030 return false
15031 }
15032 func rewriteValuegeneric_OpLsh32x64(v *Value) bool {
15033 v_1 := v.Args[1]
15034 v_0 := v.Args[0]
15035 b := v.Block
15036 typ := &b.Func.Config.Types
15037
15038
15039 for {
15040 if v_0.Op != OpConst32 {
15041 break
15042 }
15043 c := auxIntToInt32(v_0.AuxInt)
15044 if v_1.Op != OpConst64 {
15045 break
15046 }
15047 d := auxIntToInt64(v_1.AuxInt)
15048 v.reset(OpConst32)
15049 v.AuxInt = int32ToAuxInt(c << uint64(d))
15050 return true
15051 }
15052
15053
15054 for {
15055 x := v_0
15056 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 0 {
15057 break
15058 }
15059 v.copyOf(x)
15060 return true
15061 }
15062
15063
15064 for {
15065 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
15066 break
15067 }
15068 v.reset(OpConst32)
15069 v.AuxInt = int32ToAuxInt(0)
15070 return true
15071 }
15072
15073
15074
15075 for {
15076 if v_1.Op != OpConst64 {
15077 break
15078 }
15079 c := auxIntToInt64(v_1.AuxInt)
15080 if !(uint64(c) >= 32) {
15081 break
15082 }
15083 v.reset(OpConst32)
15084 v.AuxInt = int32ToAuxInt(0)
15085 return true
15086 }
15087
15088
15089
15090 for {
15091 t := v.Type
15092 if v_0.Op != OpLsh32x64 {
15093 break
15094 }
15095 _ = v_0.Args[1]
15096 x := v_0.Args[0]
15097 v_0_1 := v_0.Args[1]
15098 if v_0_1.Op != OpConst64 {
15099 break
15100 }
15101 c := auxIntToInt64(v_0_1.AuxInt)
15102 if v_1.Op != OpConst64 {
15103 break
15104 }
15105 d := auxIntToInt64(v_1.AuxInt)
15106 if !(!uaddOvf(c, d)) {
15107 break
15108 }
15109 v.reset(OpLsh32x64)
15110 v0 := b.NewValue0(v.Pos, OpConst64, t)
15111 v0.AuxInt = int64ToAuxInt(c + d)
15112 v.AddArg2(x, v0)
15113 return true
15114 }
15115
15116
15117
15118 for {
15119 i := v_0
15120 if i.Op != OpRsh32x64 {
15121 break
15122 }
15123 _ = i.Args[1]
15124 x := i.Args[0]
15125 i_1 := i.Args[1]
15126 if i_1.Op != OpConst64 {
15127 break
15128 }
15129 c := auxIntToInt64(i_1.AuxInt)
15130 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != c || !(c >= 0 && c < 32 && i.Uses == 1) {
15131 break
15132 }
15133 v.reset(OpAnd32)
15134 v0 := b.NewValue0(v.Pos, OpConst32, v.Type)
15135 v0.AuxInt = int32ToAuxInt(int32(-1) << c)
15136 v.AddArg2(x, v0)
15137 return true
15138 }
15139
15140
15141
15142 for {
15143 i := v_0
15144 if i.Op != OpRsh32Ux64 {
15145 break
15146 }
15147 _ = i.Args[1]
15148 x := i.Args[0]
15149 i_1 := i.Args[1]
15150 if i_1.Op != OpConst64 {
15151 break
15152 }
15153 c := auxIntToInt64(i_1.AuxInt)
15154 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != c || !(c >= 0 && c < 32 && i.Uses == 1) {
15155 break
15156 }
15157 v.reset(OpAnd32)
15158 v0 := b.NewValue0(v.Pos, OpConst32, v.Type)
15159 v0.AuxInt = int32ToAuxInt(int32(-1) << c)
15160 v.AddArg2(x, v0)
15161 return true
15162 }
15163
15164
15165
15166 for {
15167 if v_0.Op != OpRsh32Ux64 {
15168 break
15169 }
15170 _ = v_0.Args[1]
15171 v_0_0 := v_0.Args[0]
15172 if v_0_0.Op != OpLsh32x64 {
15173 break
15174 }
15175 _ = v_0_0.Args[1]
15176 x := v_0_0.Args[0]
15177 v_0_0_1 := v_0_0.Args[1]
15178 if v_0_0_1.Op != OpConst64 {
15179 break
15180 }
15181 c1 := auxIntToInt64(v_0_0_1.AuxInt)
15182 v_0_1 := v_0.Args[1]
15183 if v_0_1.Op != OpConst64 {
15184 break
15185 }
15186 c2 := auxIntToInt64(v_0_1.AuxInt)
15187 if v_1.Op != OpConst64 {
15188 break
15189 }
15190 c3 := auxIntToInt64(v_1.AuxInt)
15191 if !(uint64(c1) >= uint64(c2) && uint64(c3) >= uint64(c2) && !uaddOvf(c1-c2, c3)) {
15192 break
15193 }
15194 v.reset(OpLsh32x64)
15195 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
15196 v0.AuxInt = int64ToAuxInt(c1 - c2 + c3)
15197 v.AddArg2(x, v0)
15198 return true
15199 }
15200
15201
15202
15203 for {
15204 if v_0.Op != OpAnd32 {
15205 break
15206 }
15207 _ = v_0.Args[1]
15208 v_0_0 := v_0.Args[0]
15209 v_0_1 := v_0.Args[1]
15210 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
15211 if v_0_0.Op != OpRsh32x64 {
15212 continue
15213 }
15214 t := v_0_0.Type
15215 _ = v_0_0.Args[1]
15216 x := v_0_0.Args[0]
15217 v_0_0_1 := v_0_0.Args[1]
15218 if v_0_0_1.Op != OpConst64 {
15219 continue
15220 }
15221 t2 := v_0_0_1.Type
15222 c := auxIntToInt64(v_0_0_1.AuxInt)
15223 if v_0_1.Op != OpConst32 {
15224 continue
15225 }
15226 d := auxIntToInt32(v_0_1.AuxInt)
15227 if v_1.Op != OpConst64 {
15228 continue
15229 }
15230 e := auxIntToInt64(v_1.AuxInt)
15231 if !(c >= e) {
15232 continue
15233 }
15234 v.reset(OpAnd32)
15235 v0 := b.NewValue0(v.Pos, OpRsh32x64, t)
15236 v1 := b.NewValue0(v.Pos, OpConst64, t2)
15237 v1.AuxInt = int64ToAuxInt(c - e)
15238 v0.AddArg2(x, v1)
15239 v2 := b.NewValue0(v.Pos, OpConst32, t)
15240 v2.AuxInt = int32ToAuxInt(d << e)
15241 v.AddArg2(v0, v2)
15242 return true
15243 }
15244 break
15245 }
15246
15247
15248
15249 for {
15250 if v_0.Op != OpAnd32 {
15251 break
15252 }
15253 _ = v_0.Args[1]
15254 v_0_0 := v_0.Args[0]
15255 v_0_1 := v_0.Args[1]
15256 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
15257 if v_0_0.Op != OpRsh32Ux64 {
15258 continue
15259 }
15260 t := v_0_0.Type
15261 _ = v_0_0.Args[1]
15262 x := v_0_0.Args[0]
15263 v_0_0_1 := v_0_0.Args[1]
15264 if v_0_0_1.Op != OpConst64 {
15265 continue
15266 }
15267 t2 := v_0_0_1.Type
15268 c := auxIntToInt64(v_0_0_1.AuxInt)
15269 if v_0_1.Op != OpConst32 {
15270 continue
15271 }
15272 d := auxIntToInt32(v_0_1.AuxInt)
15273 if v_1.Op != OpConst64 {
15274 continue
15275 }
15276 e := auxIntToInt64(v_1.AuxInt)
15277 if !(c >= e) {
15278 continue
15279 }
15280 v.reset(OpAnd32)
15281 v0 := b.NewValue0(v.Pos, OpRsh32Ux64, t)
15282 v1 := b.NewValue0(v.Pos, OpConst64, t2)
15283 v1.AuxInt = int64ToAuxInt(c - e)
15284 v0.AddArg2(x, v1)
15285 v2 := b.NewValue0(v.Pos, OpConst32, t)
15286 v2.AuxInt = int32ToAuxInt(d << e)
15287 v.AddArg2(v0, v2)
15288 return true
15289 }
15290 break
15291 }
15292
15293
15294
15295 for {
15296 if v_0.Op != OpAnd32 {
15297 break
15298 }
15299 _ = v_0.Args[1]
15300 v_0_0 := v_0.Args[0]
15301 v_0_1 := v_0.Args[1]
15302 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
15303 if v_0_0.Op != OpRsh32x64 {
15304 continue
15305 }
15306 t := v_0_0.Type
15307 _ = v_0_0.Args[1]
15308 x := v_0_0.Args[0]
15309 v_0_0_1 := v_0_0.Args[1]
15310 if v_0_0_1.Op != OpConst64 {
15311 continue
15312 }
15313 t2 := v_0_0_1.Type
15314 c := auxIntToInt64(v_0_0_1.AuxInt)
15315 if v_0_1.Op != OpConst32 {
15316 continue
15317 }
15318 d := auxIntToInt32(v_0_1.AuxInt)
15319 if v_1.Op != OpConst64 {
15320 continue
15321 }
15322 e := auxIntToInt64(v_1.AuxInt)
15323 if !(c < e) {
15324 continue
15325 }
15326 v.reset(OpAnd32)
15327 v0 := b.NewValue0(v.Pos, OpLsh32x64, t)
15328 v1 := b.NewValue0(v.Pos, OpConst64, t2)
15329 v1.AuxInt = int64ToAuxInt(e - c)
15330 v0.AddArg2(x, v1)
15331 v2 := b.NewValue0(v.Pos, OpConst32, t)
15332 v2.AuxInt = int32ToAuxInt(d << e)
15333 v.AddArg2(v0, v2)
15334 return true
15335 }
15336 break
15337 }
15338
15339
15340
15341 for {
15342 if v_0.Op != OpAnd32 {
15343 break
15344 }
15345 _ = v_0.Args[1]
15346 v_0_0 := v_0.Args[0]
15347 v_0_1 := v_0.Args[1]
15348 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
15349 if v_0_0.Op != OpRsh32Ux64 {
15350 continue
15351 }
15352 t := v_0_0.Type
15353 _ = v_0_0.Args[1]
15354 x := v_0_0.Args[0]
15355 v_0_0_1 := v_0_0.Args[1]
15356 if v_0_0_1.Op != OpConst64 {
15357 continue
15358 }
15359 t2 := v_0_0_1.Type
15360 c := auxIntToInt64(v_0_0_1.AuxInt)
15361 if v_0_1.Op != OpConst32 {
15362 continue
15363 }
15364 d := auxIntToInt32(v_0_1.AuxInt)
15365 if v_1.Op != OpConst64 {
15366 continue
15367 }
15368 e := auxIntToInt64(v_1.AuxInt)
15369 if !(c < e) {
15370 continue
15371 }
15372 v.reset(OpAnd32)
15373 v0 := b.NewValue0(v.Pos, OpLsh32x64, t)
15374 v1 := b.NewValue0(v.Pos, OpConst64, t2)
15375 v1.AuxInt = int64ToAuxInt(e - c)
15376 v0.AddArg2(x, v1)
15377 v2 := b.NewValue0(v.Pos, OpConst32, t)
15378 v2.AuxInt = int32ToAuxInt(d << e)
15379 v.AddArg2(v0, v2)
15380 return true
15381 }
15382 break
15383 }
15384 return false
15385 }
15386 func rewriteValuegeneric_OpLsh32x8(v *Value) bool {
15387 v_1 := v.Args[1]
15388 v_0 := v.Args[0]
15389 b := v.Block
15390
15391
15392 for {
15393 t := v.Type
15394 x := v_0
15395 if v_1.Op != OpConst8 {
15396 break
15397 }
15398 c := auxIntToInt8(v_1.AuxInt)
15399 v.reset(OpLsh32x64)
15400 v0 := b.NewValue0(v.Pos, OpConst64, t)
15401 v0.AuxInt = int64ToAuxInt(int64(uint8(c)))
15402 v.AddArg2(x, v0)
15403 return true
15404 }
15405
15406
15407 for {
15408 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
15409 break
15410 }
15411 v.reset(OpConst32)
15412 v.AuxInt = int32ToAuxInt(0)
15413 return true
15414 }
15415 return false
15416 }
15417 func rewriteValuegeneric_OpLsh64x16(v *Value) bool {
15418 v_1 := v.Args[1]
15419 v_0 := v.Args[0]
15420 b := v.Block
15421
15422
15423 for {
15424 t := v.Type
15425 x := v_0
15426 if v_1.Op != OpConst16 {
15427 break
15428 }
15429 c := auxIntToInt16(v_1.AuxInt)
15430 v.reset(OpLsh64x64)
15431 v0 := b.NewValue0(v.Pos, OpConst64, t)
15432 v0.AuxInt = int64ToAuxInt(int64(uint16(c)))
15433 v.AddArg2(x, v0)
15434 return true
15435 }
15436
15437
15438 for {
15439 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
15440 break
15441 }
15442 v.reset(OpConst64)
15443 v.AuxInt = int64ToAuxInt(0)
15444 return true
15445 }
15446 return false
15447 }
15448 func rewriteValuegeneric_OpLsh64x32(v *Value) bool {
15449 v_1 := v.Args[1]
15450 v_0 := v.Args[0]
15451 b := v.Block
15452
15453
15454 for {
15455 t := v.Type
15456 x := v_0
15457 if v_1.Op != OpConst32 {
15458 break
15459 }
15460 c := auxIntToInt32(v_1.AuxInt)
15461 v.reset(OpLsh64x64)
15462 v0 := b.NewValue0(v.Pos, OpConst64, t)
15463 v0.AuxInt = int64ToAuxInt(int64(uint32(c)))
15464 v.AddArg2(x, v0)
15465 return true
15466 }
15467
15468
15469 for {
15470 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
15471 break
15472 }
15473 v.reset(OpConst64)
15474 v.AuxInt = int64ToAuxInt(0)
15475 return true
15476 }
15477 return false
15478 }
15479 func rewriteValuegeneric_OpLsh64x64(v *Value) bool {
15480 v_1 := v.Args[1]
15481 v_0 := v.Args[0]
15482 b := v.Block
15483 typ := &b.Func.Config.Types
15484
15485
15486 for {
15487 if v_0.Op != OpConst64 {
15488 break
15489 }
15490 c := auxIntToInt64(v_0.AuxInt)
15491 if v_1.Op != OpConst64 {
15492 break
15493 }
15494 d := auxIntToInt64(v_1.AuxInt)
15495 v.reset(OpConst64)
15496 v.AuxInt = int64ToAuxInt(c << uint64(d))
15497 return true
15498 }
15499
15500
15501 for {
15502 x := v_0
15503 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 0 {
15504 break
15505 }
15506 v.copyOf(x)
15507 return true
15508 }
15509
15510
15511 for {
15512 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
15513 break
15514 }
15515 v.reset(OpConst64)
15516 v.AuxInt = int64ToAuxInt(0)
15517 return true
15518 }
15519
15520
15521
15522 for {
15523 if v_1.Op != OpConst64 {
15524 break
15525 }
15526 c := auxIntToInt64(v_1.AuxInt)
15527 if !(uint64(c) >= 64) {
15528 break
15529 }
15530 v.reset(OpConst64)
15531 v.AuxInt = int64ToAuxInt(0)
15532 return true
15533 }
15534
15535
15536
15537 for {
15538 t := v.Type
15539 if v_0.Op != OpLsh64x64 {
15540 break
15541 }
15542 _ = v_0.Args[1]
15543 x := v_0.Args[0]
15544 v_0_1 := v_0.Args[1]
15545 if v_0_1.Op != OpConst64 {
15546 break
15547 }
15548 c := auxIntToInt64(v_0_1.AuxInt)
15549 if v_1.Op != OpConst64 {
15550 break
15551 }
15552 d := auxIntToInt64(v_1.AuxInt)
15553 if !(!uaddOvf(c, d)) {
15554 break
15555 }
15556 v.reset(OpLsh64x64)
15557 v0 := b.NewValue0(v.Pos, OpConst64, t)
15558 v0.AuxInt = int64ToAuxInt(c + d)
15559 v.AddArg2(x, v0)
15560 return true
15561 }
15562
15563
15564
15565 for {
15566 i := v_0
15567 if i.Op != OpRsh64x64 {
15568 break
15569 }
15570 _ = i.Args[1]
15571 x := i.Args[0]
15572 i_1 := i.Args[1]
15573 if i_1.Op != OpConst64 {
15574 break
15575 }
15576 c := auxIntToInt64(i_1.AuxInt)
15577 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != c || !(c >= 0 && c < 64 && i.Uses == 1) {
15578 break
15579 }
15580 v.reset(OpAnd64)
15581 v0 := b.NewValue0(v.Pos, OpConst64, v.Type)
15582 v0.AuxInt = int64ToAuxInt(int64(-1) << c)
15583 v.AddArg2(x, v0)
15584 return true
15585 }
15586
15587
15588
15589 for {
15590 i := v_0
15591 if i.Op != OpRsh64Ux64 {
15592 break
15593 }
15594 _ = i.Args[1]
15595 x := i.Args[0]
15596 i_1 := i.Args[1]
15597 if i_1.Op != OpConst64 {
15598 break
15599 }
15600 c := auxIntToInt64(i_1.AuxInt)
15601 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != c || !(c >= 0 && c < 64 && i.Uses == 1) {
15602 break
15603 }
15604 v.reset(OpAnd64)
15605 v0 := b.NewValue0(v.Pos, OpConst64, v.Type)
15606 v0.AuxInt = int64ToAuxInt(int64(-1) << c)
15607 v.AddArg2(x, v0)
15608 return true
15609 }
15610
15611
15612
15613 for {
15614 if v_0.Op != OpRsh64Ux64 {
15615 break
15616 }
15617 _ = v_0.Args[1]
15618 v_0_0 := v_0.Args[0]
15619 if v_0_0.Op != OpLsh64x64 {
15620 break
15621 }
15622 _ = v_0_0.Args[1]
15623 x := v_0_0.Args[0]
15624 v_0_0_1 := v_0_0.Args[1]
15625 if v_0_0_1.Op != OpConst64 {
15626 break
15627 }
15628 c1 := auxIntToInt64(v_0_0_1.AuxInt)
15629 v_0_1 := v_0.Args[1]
15630 if v_0_1.Op != OpConst64 {
15631 break
15632 }
15633 c2 := auxIntToInt64(v_0_1.AuxInt)
15634 if v_1.Op != OpConst64 {
15635 break
15636 }
15637 c3 := auxIntToInt64(v_1.AuxInt)
15638 if !(uint64(c1) >= uint64(c2) && uint64(c3) >= uint64(c2) && !uaddOvf(c1-c2, c3)) {
15639 break
15640 }
15641 v.reset(OpLsh64x64)
15642 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
15643 v0.AuxInt = int64ToAuxInt(c1 - c2 + c3)
15644 v.AddArg2(x, v0)
15645 return true
15646 }
15647
15648
15649
15650 for {
15651 if v_0.Op != OpAnd64 {
15652 break
15653 }
15654 _ = v_0.Args[1]
15655 v_0_0 := v_0.Args[0]
15656 v_0_1 := v_0.Args[1]
15657 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
15658 if v_0_0.Op != OpRsh64x64 {
15659 continue
15660 }
15661 t := v_0_0.Type
15662 _ = v_0_0.Args[1]
15663 x := v_0_0.Args[0]
15664 v_0_0_1 := v_0_0.Args[1]
15665 if v_0_0_1.Op != OpConst64 {
15666 continue
15667 }
15668 t2 := v_0_0_1.Type
15669 c := auxIntToInt64(v_0_0_1.AuxInt)
15670 if v_0_1.Op != OpConst64 {
15671 continue
15672 }
15673 d := auxIntToInt64(v_0_1.AuxInt)
15674 if v_1.Op != OpConst64 {
15675 continue
15676 }
15677 e := auxIntToInt64(v_1.AuxInt)
15678 if !(c >= e) {
15679 continue
15680 }
15681 v.reset(OpAnd64)
15682 v0 := b.NewValue0(v.Pos, OpRsh64x64, t)
15683 v1 := b.NewValue0(v.Pos, OpConst64, t2)
15684 v1.AuxInt = int64ToAuxInt(c - e)
15685 v0.AddArg2(x, v1)
15686 v2 := b.NewValue0(v.Pos, OpConst64, t)
15687 v2.AuxInt = int64ToAuxInt(d << e)
15688 v.AddArg2(v0, v2)
15689 return true
15690 }
15691 break
15692 }
15693
15694
15695
15696 for {
15697 if v_0.Op != OpAnd64 {
15698 break
15699 }
15700 _ = v_0.Args[1]
15701 v_0_0 := v_0.Args[0]
15702 v_0_1 := v_0.Args[1]
15703 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
15704 if v_0_0.Op != OpRsh64Ux64 {
15705 continue
15706 }
15707 t := v_0_0.Type
15708 _ = v_0_0.Args[1]
15709 x := v_0_0.Args[0]
15710 v_0_0_1 := v_0_0.Args[1]
15711 if v_0_0_1.Op != OpConst64 {
15712 continue
15713 }
15714 t2 := v_0_0_1.Type
15715 c := auxIntToInt64(v_0_0_1.AuxInt)
15716 if v_0_1.Op != OpConst64 {
15717 continue
15718 }
15719 d := auxIntToInt64(v_0_1.AuxInt)
15720 if v_1.Op != OpConst64 {
15721 continue
15722 }
15723 e := auxIntToInt64(v_1.AuxInt)
15724 if !(c >= e) {
15725 continue
15726 }
15727 v.reset(OpAnd64)
15728 v0 := b.NewValue0(v.Pos, OpRsh64Ux64, t)
15729 v1 := b.NewValue0(v.Pos, OpConst64, t2)
15730 v1.AuxInt = int64ToAuxInt(c - e)
15731 v0.AddArg2(x, v1)
15732 v2 := b.NewValue0(v.Pos, OpConst64, t)
15733 v2.AuxInt = int64ToAuxInt(d << e)
15734 v.AddArg2(v0, v2)
15735 return true
15736 }
15737 break
15738 }
15739
15740
15741
15742 for {
15743 if v_0.Op != OpAnd64 {
15744 break
15745 }
15746 _ = v_0.Args[1]
15747 v_0_0 := v_0.Args[0]
15748 v_0_1 := v_0.Args[1]
15749 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
15750 if v_0_0.Op != OpRsh64x64 {
15751 continue
15752 }
15753 t := v_0_0.Type
15754 _ = v_0_0.Args[1]
15755 x := v_0_0.Args[0]
15756 v_0_0_1 := v_0_0.Args[1]
15757 if v_0_0_1.Op != OpConst64 {
15758 continue
15759 }
15760 t2 := v_0_0_1.Type
15761 c := auxIntToInt64(v_0_0_1.AuxInt)
15762 if v_0_1.Op != OpConst64 {
15763 continue
15764 }
15765 d := auxIntToInt64(v_0_1.AuxInt)
15766 if v_1.Op != OpConst64 {
15767 continue
15768 }
15769 e := auxIntToInt64(v_1.AuxInt)
15770 if !(c < e) {
15771 continue
15772 }
15773 v.reset(OpAnd64)
15774 v0 := b.NewValue0(v.Pos, OpLsh64x64, t)
15775 v1 := b.NewValue0(v.Pos, OpConst64, t2)
15776 v1.AuxInt = int64ToAuxInt(e - c)
15777 v0.AddArg2(x, v1)
15778 v2 := b.NewValue0(v.Pos, OpConst64, t)
15779 v2.AuxInt = int64ToAuxInt(d << e)
15780 v.AddArg2(v0, v2)
15781 return true
15782 }
15783 break
15784 }
15785
15786
15787
15788 for {
15789 if v_0.Op != OpAnd64 {
15790 break
15791 }
15792 _ = v_0.Args[1]
15793 v_0_0 := v_0.Args[0]
15794 v_0_1 := v_0.Args[1]
15795 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
15796 if v_0_0.Op != OpRsh64Ux64 {
15797 continue
15798 }
15799 t := v_0_0.Type
15800 _ = v_0_0.Args[1]
15801 x := v_0_0.Args[0]
15802 v_0_0_1 := v_0_0.Args[1]
15803 if v_0_0_1.Op != OpConst64 {
15804 continue
15805 }
15806 t2 := v_0_0_1.Type
15807 c := auxIntToInt64(v_0_0_1.AuxInt)
15808 if v_0_1.Op != OpConst64 {
15809 continue
15810 }
15811 d := auxIntToInt64(v_0_1.AuxInt)
15812 if v_1.Op != OpConst64 {
15813 continue
15814 }
15815 e := auxIntToInt64(v_1.AuxInt)
15816 if !(c < e) {
15817 continue
15818 }
15819 v.reset(OpAnd64)
15820 v0 := b.NewValue0(v.Pos, OpLsh64x64, t)
15821 v1 := b.NewValue0(v.Pos, OpConst64, t2)
15822 v1.AuxInt = int64ToAuxInt(e - c)
15823 v0.AddArg2(x, v1)
15824 v2 := b.NewValue0(v.Pos, OpConst64, t)
15825 v2.AuxInt = int64ToAuxInt(d << e)
15826 v.AddArg2(v0, v2)
15827 return true
15828 }
15829 break
15830 }
15831 return false
15832 }
15833 func rewriteValuegeneric_OpLsh64x8(v *Value) bool {
15834 v_1 := v.Args[1]
15835 v_0 := v.Args[0]
15836 b := v.Block
15837
15838
15839 for {
15840 t := v.Type
15841 x := v_0
15842 if v_1.Op != OpConst8 {
15843 break
15844 }
15845 c := auxIntToInt8(v_1.AuxInt)
15846 v.reset(OpLsh64x64)
15847 v0 := b.NewValue0(v.Pos, OpConst64, t)
15848 v0.AuxInt = int64ToAuxInt(int64(uint8(c)))
15849 v.AddArg2(x, v0)
15850 return true
15851 }
15852
15853
15854 for {
15855 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
15856 break
15857 }
15858 v.reset(OpConst64)
15859 v.AuxInt = int64ToAuxInt(0)
15860 return true
15861 }
15862 return false
15863 }
15864 func rewriteValuegeneric_OpLsh8x16(v *Value) bool {
15865 v_1 := v.Args[1]
15866 v_0 := v.Args[0]
15867 b := v.Block
15868
15869
15870 for {
15871 t := v.Type
15872 x := v_0
15873 if v_1.Op != OpConst16 {
15874 break
15875 }
15876 c := auxIntToInt16(v_1.AuxInt)
15877 v.reset(OpLsh8x64)
15878 v0 := b.NewValue0(v.Pos, OpConst64, t)
15879 v0.AuxInt = int64ToAuxInt(int64(uint16(c)))
15880 v.AddArg2(x, v0)
15881 return true
15882 }
15883
15884
15885 for {
15886 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 {
15887 break
15888 }
15889 v.reset(OpConst8)
15890 v.AuxInt = int8ToAuxInt(0)
15891 return true
15892 }
15893 return false
15894 }
15895 func rewriteValuegeneric_OpLsh8x32(v *Value) bool {
15896 v_1 := v.Args[1]
15897 v_0 := v.Args[0]
15898 b := v.Block
15899
15900
15901 for {
15902 t := v.Type
15903 x := v_0
15904 if v_1.Op != OpConst32 {
15905 break
15906 }
15907 c := auxIntToInt32(v_1.AuxInt)
15908 v.reset(OpLsh8x64)
15909 v0 := b.NewValue0(v.Pos, OpConst64, t)
15910 v0.AuxInt = int64ToAuxInt(int64(uint32(c)))
15911 v.AddArg2(x, v0)
15912 return true
15913 }
15914
15915
15916 for {
15917 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 {
15918 break
15919 }
15920 v.reset(OpConst8)
15921 v.AuxInt = int8ToAuxInt(0)
15922 return true
15923 }
15924 return false
15925 }
15926 func rewriteValuegeneric_OpLsh8x64(v *Value) bool {
15927 v_1 := v.Args[1]
15928 v_0 := v.Args[0]
15929 b := v.Block
15930 typ := &b.Func.Config.Types
15931
15932
15933 for {
15934 if v_0.Op != OpConst8 {
15935 break
15936 }
15937 c := auxIntToInt8(v_0.AuxInt)
15938 if v_1.Op != OpConst64 {
15939 break
15940 }
15941 d := auxIntToInt64(v_1.AuxInt)
15942 v.reset(OpConst8)
15943 v.AuxInt = int8ToAuxInt(c << uint64(d))
15944 return true
15945 }
15946
15947
15948 for {
15949 x := v_0
15950 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 0 {
15951 break
15952 }
15953 v.copyOf(x)
15954 return true
15955 }
15956
15957
15958 for {
15959 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 {
15960 break
15961 }
15962 v.reset(OpConst8)
15963 v.AuxInt = int8ToAuxInt(0)
15964 return true
15965 }
15966
15967
15968
15969 for {
15970 if v_1.Op != OpConst64 {
15971 break
15972 }
15973 c := auxIntToInt64(v_1.AuxInt)
15974 if !(uint64(c) >= 8) {
15975 break
15976 }
15977 v.reset(OpConst8)
15978 v.AuxInt = int8ToAuxInt(0)
15979 return true
15980 }
15981
15982
15983
15984 for {
15985 t := v.Type
15986 if v_0.Op != OpLsh8x64 {
15987 break
15988 }
15989 _ = v_0.Args[1]
15990 x := v_0.Args[0]
15991 v_0_1 := v_0.Args[1]
15992 if v_0_1.Op != OpConst64 {
15993 break
15994 }
15995 c := auxIntToInt64(v_0_1.AuxInt)
15996 if v_1.Op != OpConst64 {
15997 break
15998 }
15999 d := auxIntToInt64(v_1.AuxInt)
16000 if !(!uaddOvf(c, d)) {
16001 break
16002 }
16003 v.reset(OpLsh8x64)
16004 v0 := b.NewValue0(v.Pos, OpConst64, t)
16005 v0.AuxInt = int64ToAuxInt(c + d)
16006 v.AddArg2(x, v0)
16007 return true
16008 }
16009
16010
16011
16012 for {
16013 i := v_0
16014 if i.Op != OpRsh8x64 {
16015 break
16016 }
16017 _ = i.Args[1]
16018 x := i.Args[0]
16019 i_1 := i.Args[1]
16020 if i_1.Op != OpConst64 {
16021 break
16022 }
16023 c := auxIntToInt64(i_1.AuxInt)
16024 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != c || !(c >= 0 && c < 8 && i.Uses == 1) {
16025 break
16026 }
16027 v.reset(OpAnd8)
16028 v0 := b.NewValue0(v.Pos, OpConst8, v.Type)
16029 v0.AuxInt = int8ToAuxInt(int8(-1) << c)
16030 v.AddArg2(x, v0)
16031 return true
16032 }
16033
16034
16035
16036 for {
16037 i := v_0
16038 if i.Op != OpRsh8Ux64 {
16039 break
16040 }
16041 _ = i.Args[1]
16042 x := i.Args[0]
16043 i_1 := i.Args[1]
16044 if i_1.Op != OpConst64 {
16045 break
16046 }
16047 c := auxIntToInt64(i_1.AuxInt)
16048 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != c || !(c >= 0 && c < 8 && i.Uses == 1) {
16049 break
16050 }
16051 v.reset(OpAnd8)
16052 v0 := b.NewValue0(v.Pos, OpConst8, v.Type)
16053 v0.AuxInt = int8ToAuxInt(int8(-1) << c)
16054 v.AddArg2(x, v0)
16055 return true
16056 }
16057
16058
16059
16060 for {
16061 if v_0.Op != OpRsh8Ux64 {
16062 break
16063 }
16064 _ = v_0.Args[1]
16065 v_0_0 := v_0.Args[0]
16066 if v_0_0.Op != OpLsh8x64 {
16067 break
16068 }
16069 _ = v_0_0.Args[1]
16070 x := v_0_0.Args[0]
16071 v_0_0_1 := v_0_0.Args[1]
16072 if v_0_0_1.Op != OpConst64 {
16073 break
16074 }
16075 c1 := auxIntToInt64(v_0_0_1.AuxInt)
16076 v_0_1 := v_0.Args[1]
16077 if v_0_1.Op != OpConst64 {
16078 break
16079 }
16080 c2 := auxIntToInt64(v_0_1.AuxInt)
16081 if v_1.Op != OpConst64 {
16082 break
16083 }
16084 c3 := auxIntToInt64(v_1.AuxInt)
16085 if !(uint64(c1) >= uint64(c2) && uint64(c3) >= uint64(c2) && !uaddOvf(c1-c2, c3)) {
16086 break
16087 }
16088 v.reset(OpLsh8x64)
16089 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
16090 v0.AuxInt = int64ToAuxInt(c1 - c2 + c3)
16091 v.AddArg2(x, v0)
16092 return true
16093 }
16094
16095
16096
16097 for {
16098 if v_0.Op != OpAnd8 {
16099 break
16100 }
16101 _ = v_0.Args[1]
16102 v_0_0 := v_0.Args[0]
16103 v_0_1 := v_0.Args[1]
16104 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
16105 if v_0_0.Op != OpRsh8x64 {
16106 continue
16107 }
16108 t := v_0_0.Type
16109 _ = v_0_0.Args[1]
16110 x := v_0_0.Args[0]
16111 v_0_0_1 := v_0_0.Args[1]
16112 if v_0_0_1.Op != OpConst64 {
16113 continue
16114 }
16115 t2 := v_0_0_1.Type
16116 c := auxIntToInt64(v_0_0_1.AuxInt)
16117 if v_0_1.Op != OpConst8 {
16118 continue
16119 }
16120 d := auxIntToInt8(v_0_1.AuxInt)
16121 if v_1.Op != OpConst64 {
16122 continue
16123 }
16124 e := auxIntToInt64(v_1.AuxInt)
16125 if !(c >= e) {
16126 continue
16127 }
16128 v.reset(OpAnd8)
16129 v0 := b.NewValue0(v.Pos, OpRsh8x64, t)
16130 v1 := b.NewValue0(v.Pos, OpConst64, t2)
16131 v1.AuxInt = int64ToAuxInt(c - e)
16132 v0.AddArg2(x, v1)
16133 v2 := b.NewValue0(v.Pos, OpConst8, t)
16134 v2.AuxInt = int8ToAuxInt(d << e)
16135 v.AddArg2(v0, v2)
16136 return true
16137 }
16138 break
16139 }
16140
16141
16142
16143 for {
16144 if v_0.Op != OpAnd8 {
16145 break
16146 }
16147 _ = v_0.Args[1]
16148 v_0_0 := v_0.Args[0]
16149 v_0_1 := v_0.Args[1]
16150 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
16151 if v_0_0.Op != OpRsh8Ux64 {
16152 continue
16153 }
16154 t := v_0_0.Type
16155 _ = v_0_0.Args[1]
16156 x := v_0_0.Args[0]
16157 v_0_0_1 := v_0_0.Args[1]
16158 if v_0_0_1.Op != OpConst64 {
16159 continue
16160 }
16161 t2 := v_0_0_1.Type
16162 c := auxIntToInt64(v_0_0_1.AuxInt)
16163 if v_0_1.Op != OpConst8 {
16164 continue
16165 }
16166 d := auxIntToInt8(v_0_1.AuxInt)
16167 if v_1.Op != OpConst64 {
16168 continue
16169 }
16170 e := auxIntToInt64(v_1.AuxInt)
16171 if !(c >= e) {
16172 continue
16173 }
16174 v.reset(OpAnd8)
16175 v0 := b.NewValue0(v.Pos, OpRsh8Ux64, t)
16176 v1 := b.NewValue0(v.Pos, OpConst64, t2)
16177 v1.AuxInt = int64ToAuxInt(c - e)
16178 v0.AddArg2(x, v1)
16179 v2 := b.NewValue0(v.Pos, OpConst8, t)
16180 v2.AuxInt = int8ToAuxInt(d << e)
16181 v.AddArg2(v0, v2)
16182 return true
16183 }
16184 break
16185 }
16186
16187
16188
16189 for {
16190 if v_0.Op != OpAnd8 {
16191 break
16192 }
16193 _ = v_0.Args[1]
16194 v_0_0 := v_0.Args[0]
16195 v_0_1 := v_0.Args[1]
16196 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
16197 if v_0_0.Op != OpRsh8x64 {
16198 continue
16199 }
16200 t := v_0_0.Type
16201 _ = v_0_0.Args[1]
16202 x := v_0_0.Args[0]
16203 v_0_0_1 := v_0_0.Args[1]
16204 if v_0_0_1.Op != OpConst64 {
16205 continue
16206 }
16207 t2 := v_0_0_1.Type
16208 c := auxIntToInt64(v_0_0_1.AuxInt)
16209 if v_0_1.Op != OpConst8 {
16210 continue
16211 }
16212 d := auxIntToInt8(v_0_1.AuxInt)
16213 if v_1.Op != OpConst64 {
16214 continue
16215 }
16216 e := auxIntToInt64(v_1.AuxInt)
16217 if !(c < e) {
16218 continue
16219 }
16220 v.reset(OpAnd8)
16221 v0 := b.NewValue0(v.Pos, OpLsh8x64, t)
16222 v1 := b.NewValue0(v.Pos, OpConst64, t2)
16223 v1.AuxInt = int64ToAuxInt(e - c)
16224 v0.AddArg2(x, v1)
16225 v2 := b.NewValue0(v.Pos, OpConst8, t)
16226 v2.AuxInt = int8ToAuxInt(d << e)
16227 v.AddArg2(v0, v2)
16228 return true
16229 }
16230 break
16231 }
16232
16233
16234
16235 for {
16236 if v_0.Op != OpAnd8 {
16237 break
16238 }
16239 _ = v_0.Args[1]
16240 v_0_0 := v_0.Args[0]
16241 v_0_1 := v_0.Args[1]
16242 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
16243 if v_0_0.Op != OpRsh8Ux64 {
16244 continue
16245 }
16246 t := v_0_0.Type
16247 _ = v_0_0.Args[1]
16248 x := v_0_0.Args[0]
16249 v_0_0_1 := v_0_0.Args[1]
16250 if v_0_0_1.Op != OpConst64 {
16251 continue
16252 }
16253 t2 := v_0_0_1.Type
16254 c := auxIntToInt64(v_0_0_1.AuxInt)
16255 if v_0_1.Op != OpConst8 {
16256 continue
16257 }
16258 d := auxIntToInt8(v_0_1.AuxInt)
16259 if v_1.Op != OpConst64 {
16260 continue
16261 }
16262 e := auxIntToInt64(v_1.AuxInt)
16263 if !(c < e) {
16264 continue
16265 }
16266 v.reset(OpAnd8)
16267 v0 := b.NewValue0(v.Pos, OpLsh8x64, t)
16268 v1 := b.NewValue0(v.Pos, OpConst64, t2)
16269 v1.AuxInt = int64ToAuxInt(e - c)
16270 v0.AddArg2(x, v1)
16271 v2 := b.NewValue0(v.Pos, OpConst8, t)
16272 v2.AuxInt = int8ToAuxInt(d << e)
16273 v.AddArg2(v0, v2)
16274 return true
16275 }
16276 break
16277 }
16278 return false
16279 }
16280 func rewriteValuegeneric_OpLsh8x8(v *Value) bool {
16281 v_1 := v.Args[1]
16282 v_0 := v.Args[0]
16283 b := v.Block
16284
16285
16286 for {
16287 t := v.Type
16288 x := v_0
16289 if v_1.Op != OpConst8 {
16290 break
16291 }
16292 c := auxIntToInt8(v_1.AuxInt)
16293 v.reset(OpLsh8x64)
16294 v0 := b.NewValue0(v.Pos, OpConst64, t)
16295 v0.AuxInt = int64ToAuxInt(int64(uint8(c)))
16296 v.AddArg2(x, v0)
16297 return true
16298 }
16299
16300
16301 for {
16302 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 {
16303 break
16304 }
16305 v.reset(OpConst8)
16306 v.AuxInt = int8ToAuxInt(0)
16307 return true
16308 }
16309 return false
16310 }
16311 func rewriteValuegeneric_OpMod16(v *Value) bool {
16312 v_1 := v.Args[1]
16313 v_0 := v.Args[0]
16314 b := v.Block
16315
16316
16317
16318 for {
16319 if v_0.Op != OpConst16 {
16320 break
16321 }
16322 c := auxIntToInt16(v_0.AuxInt)
16323 if v_1.Op != OpConst16 {
16324 break
16325 }
16326 d := auxIntToInt16(v_1.AuxInt)
16327 if !(d != 0) {
16328 break
16329 }
16330 v.reset(OpConst16)
16331 v.AuxInt = int16ToAuxInt(c % d)
16332 return true
16333 }
16334
16335
16336
16337 for {
16338 t := v.Type
16339 n := v_0
16340 if v_1.Op != OpConst16 {
16341 break
16342 }
16343 c := auxIntToInt16(v_1.AuxInt)
16344 if !(isNonNegative(n) && isPowerOfTwo(c)) {
16345 break
16346 }
16347 v.reset(OpAnd16)
16348 v0 := b.NewValue0(v.Pos, OpConst16, t)
16349 v0.AuxInt = int16ToAuxInt(c - 1)
16350 v.AddArg2(n, v0)
16351 return true
16352 }
16353
16354
16355
16356 for {
16357 t := v.Type
16358 n := v_0
16359 if v_1.Op != OpConst16 {
16360 break
16361 }
16362 c := auxIntToInt16(v_1.AuxInt)
16363 if !(c < 0 && c != -1<<15) {
16364 break
16365 }
16366 v.reset(OpMod16)
16367 v.Type = t
16368 v0 := b.NewValue0(v.Pos, OpConst16, t)
16369 v0.AuxInt = int16ToAuxInt(-c)
16370 v.AddArg2(n, v0)
16371 return true
16372 }
16373
16374
16375
16376 for {
16377 t := v.Type
16378 x := v_0
16379 if v_1.Op != OpConst16 {
16380 break
16381 }
16382 c := auxIntToInt16(v_1.AuxInt)
16383 if !(x.Op != OpConst16 && (c > 0 || c == -1<<15)) {
16384 break
16385 }
16386 v.reset(OpSub16)
16387 v0 := b.NewValue0(v.Pos, OpMul16, t)
16388 v1 := b.NewValue0(v.Pos, OpDiv16, t)
16389 v2 := b.NewValue0(v.Pos, OpConst16, t)
16390 v2.AuxInt = int16ToAuxInt(c)
16391 v1.AddArg2(x, v2)
16392 v0.AddArg2(v1, v2)
16393 v.AddArg2(x, v0)
16394 return true
16395 }
16396 return false
16397 }
16398 func rewriteValuegeneric_OpMod16u(v *Value) bool {
16399 v_1 := v.Args[1]
16400 v_0 := v.Args[0]
16401 b := v.Block
16402
16403
16404
16405 for {
16406 if v_0.Op != OpConst16 {
16407 break
16408 }
16409 c := auxIntToInt16(v_0.AuxInt)
16410 if v_1.Op != OpConst16 {
16411 break
16412 }
16413 d := auxIntToInt16(v_1.AuxInt)
16414 if !(d != 0) {
16415 break
16416 }
16417 v.reset(OpConst16)
16418 v.AuxInt = int16ToAuxInt(int16(uint16(c) % uint16(d)))
16419 return true
16420 }
16421
16422
16423
16424 for {
16425 t := v.Type
16426 n := v_0
16427 if v_1.Op != OpConst16 {
16428 break
16429 }
16430 c := auxIntToInt16(v_1.AuxInt)
16431 if !(isPowerOfTwo(c)) {
16432 break
16433 }
16434 v.reset(OpAnd16)
16435 v0 := b.NewValue0(v.Pos, OpConst16, t)
16436 v0.AuxInt = int16ToAuxInt(c - 1)
16437 v.AddArg2(n, v0)
16438 return true
16439 }
16440
16441
16442
16443 for {
16444 t := v.Type
16445 x := v_0
16446 if v_1.Op != OpConst16 {
16447 break
16448 }
16449 c := auxIntToInt16(v_1.AuxInt)
16450 if !(x.Op != OpConst16 && c > 0 && umagicOK16(c)) {
16451 break
16452 }
16453 v.reset(OpSub16)
16454 v0 := b.NewValue0(v.Pos, OpMul16, t)
16455 v1 := b.NewValue0(v.Pos, OpDiv16u, t)
16456 v2 := b.NewValue0(v.Pos, OpConst16, t)
16457 v2.AuxInt = int16ToAuxInt(c)
16458 v1.AddArg2(x, v2)
16459 v0.AddArg2(v1, v2)
16460 v.AddArg2(x, v0)
16461 return true
16462 }
16463 return false
16464 }
16465 func rewriteValuegeneric_OpMod32(v *Value) bool {
16466 v_1 := v.Args[1]
16467 v_0 := v.Args[0]
16468 b := v.Block
16469
16470
16471
16472 for {
16473 if v_0.Op != OpConst32 {
16474 break
16475 }
16476 c := auxIntToInt32(v_0.AuxInt)
16477 if v_1.Op != OpConst32 {
16478 break
16479 }
16480 d := auxIntToInt32(v_1.AuxInt)
16481 if !(d != 0) {
16482 break
16483 }
16484 v.reset(OpConst32)
16485 v.AuxInt = int32ToAuxInt(c % d)
16486 return true
16487 }
16488
16489
16490
16491 for {
16492 t := v.Type
16493 n := v_0
16494 if v_1.Op != OpConst32 {
16495 break
16496 }
16497 c := auxIntToInt32(v_1.AuxInt)
16498 if !(isNonNegative(n) && isPowerOfTwo(c)) {
16499 break
16500 }
16501 v.reset(OpAnd32)
16502 v0 := b.NewValue0(v.Pos, OpConst32, t)
16503 v0.AuxInt = int32ToAuxInt(c - 1)
16504 v.AddArg2(n, v0)
16505 return true
16506 }
16507
16508
16509
16510 for {
16511 t := v.Type
16512 n := v_0
16513 if v_1.Op != OpConst32 {
16514 break
16515 }
16516 c := auxIntToInt32(v_1.AuxInt)
16517 if !(c < 0 && c != -1<<31) {
16518 break
16519 }
16520 v.reset(OpMod32)
16521 v.Type = t
16522 v0 := b.NewValue0(v.Pos, OpConst32, t)
16523 v0.AuxInt = int32ToAuxInt(-c)
16524 v.AddArg2(n, v0)
16525 return true
16526 }
16527
16528
16529
16530 for {
16531 t := v.Type
16532 x := v_0
16533 if v_1.Op != OpConst32 {
16534 break
16535 }
16536 c := auxIntToInt32(v_1.AuxInt)
16537 if !(x.Op != OpConst32 && (c > 0 || c == -1<<31)) {
16538 break
16539 }
16540 v.reset(OpSub32)
16541 v0 := b.NewValue0(v.Pos, OpMul32, t)
16542 v1 := b.NewValue0(v.Pos, OpDiv32, t)
16543 v2 := b.NewValue0(v.Pos, OpConst32, t)
16544 v2.AuxInt = int32ToAuxInt(c)
16545 v1.AddArg2(x, v2)
16546 v0.AddArg2(v1, v2)
16547 v.AddArg2(x, v0)
16548 return true
16549 }
16550 return false
16551 }
16552 func rewriteValuegeneric_OpMod32u(v *Value) bool {
16553 v_1 := v.Args[1]
16554 v_0 := v.Args[0]
16555 b := v.Block
16556
16557
16558
16559 for {
16560 if v_0.Op != OpConst32 {
16561 break
16562 }
16563 c := auxIntToInt32(v_0.AuxInt)
16564 if v_1.Op != OpConst32 {
16565 break
16566 }
16567 d := auxIntToInt32(v_1.AuxInt)
16568 if !(d != 0) {
16569 break
16570 }
16571 v.reset(OpConst32)
16572 v.AuxInt = int32ToAuxInt(int32(uint32(c) % uint32(d)))
16573 return true
16574 }
16575
16576
16577
16578 for {
16579 t := v.Type
16580 n := v_0
16581 if v_1.Op != OpConst32 {
16582 break
16583 }
16584 c := auxIntToInt32(v_1.AuxInt)
16585 if !(isPowerOfTwo(c)) {
16586 break
16587 }
16588 v.reset(OpAnd32)
16589 v0 := b.NewValue0(v.Pos, OpConst32, t)
16590 v0.AuxInt = int32ToAuxInt(c - 1)
16591 v.AddArg2(n, v0)
16592 return true
16593 }
16594
16595
16596
16597 for {
16598 t := v.Type
16599 x := v_0
16600 if v_1.Op != OpConst32 {
16601 break
16602 }
16603 c := auxIntToInt32(v_1.AuxInt)
16604 if !(x.Op != OpConst32 && c > 0 && umagicOK32(c)) {
16605 break
16606 }
16607 v.reset(OpSub32)
16608 v0 := b.NewValue0(v.Pos, OpMul32, t)
16609 v1 := b.NewValue0(v.Pos, OpDiv32u, t)
16610 v2 := b.NewValue0(v.Pos, OpConst32, t)
16611 v2.AuxInt = int32ToAuxInt(c)
16612 v1.AddArg2(x, v2)
16613 v0.AddArg2(v1, v2)
16614 v.AddArg2(x, v0)
16615 return true
16616 }
16617 return false
16618 }
16619 func rewriteValuegeneric_OpMod64(v *Value) bool {
16620 v_1 := v.Args[1]
16621 v_0 := v.Args[0]
16622 b := v.Block
16623
16624
16625
16626 for {
16627 if v_0.Op != OpConst64 {
16628 break
16629 }
16630 c := auxIntToInt64(v_0.AuxInt)
16631 if v_1.Op != OpConst64 {
16632 break
16633 }
16634 d := auxIntToInt64(v_1.AuxInt)
16635 if !(d != 0) {
16636 break
16637 }
16638 v.reset(OpConst64)
16639 v.AuxInt = int64ToAuxInt(c % d)
16640 return true
16641 }
16642
16643
16644
16645 for {
16646 t := v.Type
16647 n := v_0
16648 if v_1.Op != OpConst64 {
16649 break
16650 }
16651 c := auxIntToInt64(v_1.AuxInt)
16652 if !(isNonNegative(n) && isPowerOfTwo(c)) {
16653 break
16654 }
16655 v.reset(OpAnd64)
16656 v0 := b.NewValue0(v.Pos, OpConst64, t)
16657 v0.AuxInt = int64ToAuxInt(c - 1)
16658 v.AddArg2(n, v0)
16659 return true
16660 }
16661
16662
16663
16664 for {
16665 n := v_0
16666 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != -1<<63 || !(isNonNegative(n)) {
16667 break
16668 }
16669 v.copyOf(n)
16670 return true
16671 }
16672
16673
16674
16675 for {
16676 t := v.Type
16677 n := v_0
16678 if v_1.Op != OpConst64 {
16679 break
16680 }
16681 c := auxIntToInt64(v_1.AuxInt)
16682 if !(c < 0 && c != -1<<63) {
16683 break
16684 }
16685 v.reset(OpMod64)
16686 v.Type = t
16687 v0 := b.NewValue0(v.Pos, OpConst64, t)
16688 v0.AuxInt = int64ToAuxInt(-c)
16689 v.AddArg2(n, v0)
16690 return true
16691 }
16692
16693
16694
16695 for {
16696 t := v.Type
16697 x := v_0
16698 if v_1.Op != OpConst64 {
16699 break
16700 }
16701 c := auxIntToInt64(v_1.AuxInt)
16702 if !(x.Op != OpConst64 && (c > 0 || c == -1<<63)) {
16703 break
16704 }
16705 v.reset(OpSub64)
16706 v0 := b.NewValue0(v.Pos, OpMul64, t)
16707 v1 := b.NewValue0(v.Pos, OpDiv64, t)
16708 v2 := b.NewValue0(v.Pos, OpConst64, t)
16709 v2.AuxInt = int64ToAuxInt(c)
16710 v1.AddArg2(x, v2)
16711 v0.AddArg2(v1, v2)
16712 v.AddArg2(x, v0)
16713 return true
16714 }
16715 return false
16716 }
16717 func rewriteValuegeneric_OpMod64u(v *Value) bool {
16718 v_1 := v.Args[1]
16719 v_0 := v.Args[0]
16720 b := v.Block
16721
16722
16723
16724 for {
16725 if v_0.Op != OpConst64 {
16726 break
16727 }
16728 c := auxIntToInt64(v_0.AuxInt)
16729 if v_1.Op != OpConst64 {
16730 break
16731 }
16732 d := auxIntToInt64(v_1.AuxInt)
16733 if !(d != 0) {
16734 break
16735 }
16736 v.reset(OpConst64)
16737 v.AuxInt = int64ToAuxInt(int64(uint64(c) % uint64(d)))
16738 return true
16739 }
16740
16741
16742
16743 for {
16744 t := v.Type
16745 n := v_0
16746 if v_1.Op != OpConst64 {
16747 break
16748 }
16749 c := auxIntToInt64(v_1.AuxInt)
16750 if !(isPowerOfTwo(c)) {
16751 break
16752 }
16753 v.reset(OpAnd64)
16754 v0 := b.NewValue0(v.Pos, OpConst64, t)
16755 v0.AuxInt = int64ToAuxInt(c - 1)
16756 v.AddArg2(n, v0)
16757 return true
16758 }
16759
16760
16761 for {
16762 t := v.Type
16763 n := v_0
16764 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != -1<<63 {
16765 break
16766 }
16767 v.reset(OpAnd64)
16768 v0 := b.NewValue0(v.Pos, OpConst64, t)
16769 v0.AuxInt = int64ToAuxInt(1<<63 - 1)
16770 v.AddArg2(n, v0)
16771 return true
16772 }
16773
16774
16775
16776 for {
16777 t := v.Type
16778 x := v_0
16779 if v_1.Op != OpConst64 {
16780 break
16781 }
16782 c := auxIntToInt64(v_1.AuxInt)
16783 if !(x.Op != OpConst64 && c > 0 && umagicOK64(c)) {
16784 break
16785 }
16786 v.reset(OpSub64)
16787 v0 := b.NewValue0(v.Pos, OpMul64, t)
16788 v1 := b.NewValue0(v.Pos, OpDiv64u, t)
16789 v2 := b.NewValue0(v.Pos, OpConst64, t)
16790 v2.AuxInt = int64ToAuxInt(c)
16791 v1.AddArg2(x, v2)
16792 v0.AddArg2(v1, v2)
16793 v.AddArg2(x, v0)
16794 return true
16795 }
16796 return false
16797 }
16798 func rewriteValuegeneric_OpMod8(v *Value) bool {
16799 v_1 := v.Args[1]
16800 v_0 := v.Args[0]
16801 b := v.Block
16802
16803
16804
16805 for {
16806 if v_0.Op != OpConst8 {
16807 break
16808 }
16809 c := auxIntToInt8(v_0.AuxInt)
16810 if v_1.Op != OpConst8 {
16811 break
16812 }
16813 d := auxIntToInt8(v_1.AuxInt)
16814 if !(d != 0) {
16815 break
16816 }
16817 v.reset(OpConst8)
16818 v.AuxInt = int8ToAuxInt(c % d)
16819 return true
16820 }
16821
16822
16823
16824 for {
16825 t := v.Type
16826 n := v_0
16827 if v_1.Op != OpConst8 {
16828 break
16829 }
16830 c := auxIntToInt8(v_1.AuxInt)
16831 if !(isNonNegative(n) && isPowerOfTwo(c)) {
16832 break
16833 }
16834 v.reset(OpAnd8)
16835 v0 := b.NewValue0(v.Pos, OpConst8, t)
16836 v0.AuxInt = int8ToAuxInt(c - 1)
16837 v.AddArg2(n, v0)
16838 return true
16839 }
16840
16841
16842
16843 for {
16844 t := v.Type
16845 n := v_0
16846 if v_1.Op != OpConst8 {
16847 break
16848 }
16849 c := auxIntToInt8(v_1.AuxInt)
16850 if !(c < 0 && c != -1<<7) {
16851 break
16852 }
16853 v.reset(OpMod8)
16854 v.Type = t
16855 v0 := b.NewValue0(v.Pos, OpConst8, t)
16856 v0.AuxInt = int8ToAuxInt(-c)
16857 v.AddArg2(n, v0)
16858 return true
16859 }
16860
16861
16862
16863 for {
16864 t := v.Type
16865 x := v_0
16866 if v_1.Op != OpConst8 {
16867 break
16868 }
16869 c := auxIntToInt8(v_1.AuxInt)
16870 if !(x.Op != OpConst8 && (c > 0 || c == -1<<7)) {
16871 break
16872 }
16873 v.reset(OpSub8)
16874 v0 := b.NewValue0(v.Pos, OpMul8, t)
16875 v1 := b.NewValue0(v.Pos, OpDiv8, t)
16876 v2 := b.NewValue0(v.Pos, OpConst8, t)
16877 v2.AuxInt = int8ToAuxInt(c)
16878 v1.AddArg2(x, v2)
16879 v0.AddArg2(v1, v2)
16880 v.AddArg2(x, v0)
16881 return true
16882 }
16883 return false
16884 }
16885 func rewriteValuegeneric_OpMod8u(v *Value) bool {
16886 v_1 := v.Args[1]
16887 v_0 := v.Args[0]
16888 b := v.Block
16889
16890
16891
16892 for {
16893 if v_0.Op != OpConst8 {
16894 break
16895 }
16896 c := auxIntToInt8(v_0.AuxInt)
16897 if v_1.Op != OpConst8 {
16898 break
16899 }
16900 d := auxIntToInt8(v_1.AuxInt)
16901 if !(d != 0) {
16902 break
16903 }
16904 v.reset(OpConst8)
16905 v.AuxInt = int8ToAuxInt(int8(uint8(c) % uint8(d)))
16906 return true
16907 }
16908
16909
16910
16911 for {
16912 t := v.Type
16913 n := v_0
16914 if v_1.Op != OpConst8 {
16915 break
16916 }
16917 c := auxIntToInt8(v_1.AuxInt)
16918 if !(isPowerOfTwo(c)) {
16919 break
16920 }
16921 v.reset(OpAnd8)
16922 v0 := b.NewValue0(v.Pos, OpConst8, t)
16923 v0.AuxInt = int8ToAuxInt(c - 1)
16924 v.AddArg2(n, v0)
16925 return true
16926 }
16927
16928
16929
16930 for {
16931 t := v.Type
16932 x := v_0
16933 if v_1.Op != OpConst8 {
16934 break
16935 }
16936 c := auxIntToInt8(v_1.AuxInt)
16937 if !(x.Op != OpConst8 && c > 0 && umagicOK8(c)) {
16938 break
16939 }
16940 v.reset(OpSub8)
16941 v0 := b.NewValue0(v.Pos, OpMul8, t)
16942 v1 := b.NewValue0(v.Pos, OpDiv8u, t)
16943 v2 := b.NewValue0(v.Pos, OpConst8, t)
16944 v2.AuxInt = int8ToAuxInt(c)
16945 v1.AddArg2(x, v2)
16946 v0.AddArg2(v1, v2)
16947 v.AddArg2(x, v0)
16948 return true
16949 }
16950 return false
16951 }
16952 func rewriteValuegeneric_OpMove(v *Value) bool {
16953 v_2 := v.Args[2]
16954 v_1 := v.Args[1]
16955 v_0 := v.Args[0]
16956 b := v.Block
16957 config := b.Func.Config
16958
16959
16960
16961 for {
16962 n := auxIntToInt64(v.AuxInt)
16963 t := auxToType(v.Aux)
16964 dst1 := v_0
16965 src := v_1
16966 mem := v_2
16967 if mem.Op != OpZero || auxIntToInt64(mem.AuxInt) != n || auxToType(mem.Aux) != t {
16968 break
16969 }
16970 dst2 := mem.Args[0]
16971 if !(isSamePtr(src, dst2)) {
16972 break
16973 }
16974 v.reset(OpZero)
16975 v.AuxInt = int64ToAuxInt(n)
16976 v.Aux = typeToAux(t)
16977 v.AddArg2(dst1, mem)
16978 return true
16979 }
16980
16981
16982
16983 for {
16984 n := auxIntToInt64(v.AuxInt)
16985 t := auxToType(v.Aux)
16986 dst1 := v_0
16987 src := v_1
16988 mem := v_2
16989 if mem.Op != OpVarDef {
16990 break
16991 }
16992 mem_0 := mem.Args[0]
16993 if mem_0.Op != OpZero || auxIntToInt64(mem_0.AuxInt) != n || auxToType(mem_0.Aux) != t {
16994 break
16995 }
16996 dst0 := mem_0.Args[0]
16997 if !(isSamePtr(src, dst0)) {
16998 break
16999 }
17000 v.reset(OpZero)
17001 v.AuxInt = int64ToAuxInt(n)
17002 v.Aux = typeToAux(t)
17003 v.AddArg2(dst1, mem)
17004 return true
17005 }
17006
17007
17008
17009 for {
17010 n := auxIntToInt64(v.AuxInt)
17011 t := auxToType(v.Aux)
17012 dst := v_0
17013 if v_1.Op != OpAddr {
17014 break
17015 }
17016 sym := auxToSym(v_1.Aux)
17017 v_1_0 := v_1.Args[0]
17018 if v_1_0.Op != OpSB {
17019 break
17020 }
17021 mem := v_2
17022 if !(symIsROZero(sym)) {
17023 break
17024 }
17025 v.reset(OpZero)
17026 v.AuxInt = int64ToAuxInt(n)
17027 v.Aux = typeToAux(t)
17028 v.AddArg2(dst, mem)
17029 return true
17030 }
17031
17032
17033
17034 for {
17035 n := auxIntToInt64(v.AuxInt)
17036 t1 := auxToType(v.Aux)
17037 dst1 := v_0
17038 src1 := v_1
17039 store := v_2
17040 if store.Op != OpStore {
17041 break
17042 }
17043 t2 := auxToType(store.Aux)
17044 mem := store.Args[2]
17045 op := store.Args[0]
17046 if op.Op != OpOffPtr {
17047 break
17048 }
17049 o2 := auxIntToInt64(op.AuxInt)
17050 dst2 := op.Args[0]
17051 if !(isSamePtr(dst1, dst2) && store.Uses == 1 && n >= o2+t2.Size() && disjoint(src1, n, op, t2.Size()) && clobber(store)) {
17052 break
17053 }
17054 v.reset(OpMove)
17055 v.AuxInt = int64ToAuxInt(n)
17056 v.Aux = typeToAux(t1)
17057 v.AddArg3(dst1, src1, mem)
17058 return true
17059 }
17060
17061
17062
17063 for {
17064 n := auxIntToInt64(v.AuxInt)
17065 t := auxToType(v.Aux)
17066 dst1 := v_0
17067 src1 := v_1
17068 move := v_2
17069 if move.Op != OpMove || auxIntToInt64(move.AuxInt) != n || auxToType(move.Aux) != t {
17070 break
17071 }
17072 mem := move.Args[2]
17073 dst2 := move.Args[0]
17074 if !(move.Uses == 1 && isSamePtr(dst1, dst2) && disjoint(src1, n, dst2, n) && clobber(move)) {
17075 break
17076 }
17077 v.reset(OpMove)
17078 v.AuxInt = int64ToAuxInt(n)
17079 v.Aux = typeToAux(t)
17080 v.AddArg3(dst1, src1, mem)
17081 return true
17082 }
17083
17084
17085
17086 for {
17087 n := auxIntToInt64(v.AuxInt)
17088 t := auxToType(v.Aux)
17089 dst1 := v_0
17090 src1 := v_1
17091 vardef := v_2
17092 if vardef.Op != OpVarDef {
17093 break
17094 }
17095 x := auxToSym(vardef.Aux)
17096 move := vardef.Args[0]
17097 if move.Op != OpMove || auxIntToInt64(move.AuxInt) != n || auxToType(move.Aux) != t {
17098 break
17099 }
17100 mem := move.Args[2]
17101 dst2 := move.Args[0]
17102 if !(move.Uses == 1 && vardef.Uses == 1 && isSamePtr(dst1, dst2) && disjoint(src1, n, dst2, n) && clobber(move, vardef)) {
17103 break
17104 }
17105 v.reset(OpMove)
17106 v.AuxInt = int64ToAuxInt(n)
17107 v.Aux = typeToAux(t)
17108 v0 := b.NewValue0(v.Pos, OpVarDef, types.TypeMem)
17109 v0.Aux = symToAux(x)
17110 v0.AddArg(mem)
17111 v.AddArg3(dst1, src1, v0)
17112 return true
17113 }
17114
17115
17116
17117 for {
17118 n := auxIntToInt64(v.AuxInt)
17119 t := auxToType(v.Aux)
17120 dst1 := v_0
17121 src1 := v_1
17122 zero := v_2
17123 if zero.Op != OpZero || auxIntToInt64(zero.AuxInt) != n || auxToType(zero.Aux) != t {
17124 break
17125 }
17126 mem := zero.Args[1]
17127 dst2 := zero.Args[0]
17128 if !(zero.Uses == 1 && isSamePtr(dst1, dst2) && disjoint(src1, n, dst2, n) && clobber(zero)) {
17129 break
17130 }
17131 v.reset(OpMove)
17132 v.AuxInt = int64ToAuxInt(n)
17133 v.Aux = typeToAux(t)
17134 v.AddArg3(dst1, src1, mem)
17135 return true
17136 }
17137
17138
17139
17140 for {
17141 n := auxIntToInt64(v.AuxInt)
17142 t := auxToType(v.Aux)
17143 dst1 := v_0
17144 src1 := v_1
17145 vardef := v_2
17146 if vardef.Op != OpVarDef {
17147 break
17148 }
17149 x := auxToSym(vardef.Aux)
17150 zero := vardef.Args[0]
17151 if zero.Op != OpZero || auxIntToInt64(zero.AuxInt) != n || auxToType(zero.Aux) != t {
17152 break
17153 }
17154 mem := zero.Args[1]
17155 dst2 := zero.Args[0]
17156 if !(zero.Uses == 1 && vardef.Uses == 1 && isSamePtr(dst1, dst2) && disjoint(src1, n, dst2, n) && clobber(zero, vardef)) {
17157 break
17158 }
17159 v.reset(OpMove)
17160 v.AuxInt = int64ToAuxInt(n)
17161 v.Aux = typeToAux(t)
17162 v0 := b.NewValue0(v.Pos, OpVarDef, types.TypeMem)
17163 v0.Aux = symToAux(x)
17164 v0.AddArg(mem)
17165 v.AddArg3(dst1, src1, v0)
17166 return true
17167 }
17168
17169
17170
17171 for {
17172 n := auxIntToInt64(v.AuxInt)
17173 t1 := auxToType(v.Aux)
17174 dst := v_0
17175 p1 := v_1
17176 mem := v_2
17177 if mem.Op != OpStore {
17178 break
17179 }
17180 t2 := auxToType(mem.Aux)
17181 _ = mem.Args[2]
17182 op2 := mem.Args[0]
17183 if op2.Op != OpOffPtr {
17184 break
17185 }
17186 tt2 := op2.Type
17187 o2 := auxIntToInt64(op2.AuxInt)
17188 p2 := op2.Args[0]
17189 d1 := mem.Args[1]
17190 mem_2 := mem.Args[2]
17191 if mem_2.Op != OpStore {
17192 break
17193 }
17194 t3 := auxToType(mem_2.Aux)
17195 d2 := mem_2.Args[1]
17196 op3 := mem_2.Args[0]
17197 if op3.Op != OpOffPtr {
17198 break
17199 }
17200 tt3 := op3.Type
17201 if auxIntToInt64(op3.AuxInt) != 0 {
17202 break
17203 }
17204 p3 := op3.Args[0]
17205 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()) {
17206 break
17207 }
17208 v.reset(OpStore)
17209 v.Aux = typeToAux(t2)
17210 v0 := b.NewValue0(v.Pos, OpOffPtr, tt2)
17211 v0.AuxInt = int64ToAuxInt(o2)
17212 v0.AddArg(dst)
17213 v1 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
17214 v1.Aux = typeToAux(t3)
17215 v2 := b.NewValue0(v.Pos, OpOffPtr, tt3)
17216 v2.AuxInt = int64ToAuxInt(0)
17217 v2.AddArg(dst)
17218 v1.AddArg3(v2, d2, mem)
17219 v.AddArg3(v0, d1, v1)
17220 return true
17221 }
17222
17223
17224
17225 for {
17226 n := auxIntToInt64(v.AuxInt)
17227 t1 := auxToType(v.Aux)
17228 dst := v_0
17229 p1 := v_1
17230 mem := v_2
17231 if mem.Op != OpStore {
17232 break
17233 }
17234 t2 := auxToType(mem.Aux)
17235 _ = mem.Args[2]
17236 op2 := mem.Args[0]
17237 if op2.Op != OpOffPtr {
17238 break
17239 }
17240 tt2 := op2.Type
17241 o2 := auxIntToInt64(op2.AuxInt)
17242 p2 := op2.Args[0]
17243 d1 := mem.Args[1]
17244 mem_2 := mem.Args[2]
17245 if mem_2.Op != OpStore {
17246 break
17247 }
17248 t3 := auxToType(mem_2.Aux)
17249 _ = mem_2.Args[2]
17250 op3 := mem_2.Args[0]
17251 if op3.Op != OpOffPtr {
17252 break
17253 }
17254 tt3 := op3.Type
17255 o3 := auxIntToInt64(op3.AuxInt)
17256 p3 := op3.Args[0]
17257 d2 := mem_2.Args[1]
17258 mem_2_2 := mem_2.Args[2]
17259 if mem_2_2.Op != OpStore {
17260 break
17261 }
17262 t4 := auxToType(mem_2_2.Aux)
17263 d3 := mem_2_2.Args[1]
17264 op4 := mem_2_2.Args[0]
17265 if op4.Op != OpOffPtr {
17266 break
17267 }
17268 tt4 := op4.Type
17269 if auxIntToInt64(op4.AuxInt) != 0 {
17270 break
17271 }
17272 p4 := op4.Args[0]
17273 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()) {
17274 break
17275 }
17276 v.reset(OpStore)
17277 v.Aux = typeToAux(t2)
17278 v0 := b.NewValue0(v.Pos, OpOffPtr, tt2)
17279 v0.AuxInt = int64ToAuxInt(o2)
17280 v0.AddArg(dst)
17281 v1 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
17282 v1.Aux = typeToAux(t3)
17283 v2 := b.NewValue0(v.Pos, OpOffPtr, tt3)
17284 v2.AuxInt = int64ToAuxInt(o3)
17285 v2.AddArg(dst)
17286 v3 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
17287 v3.Aux = typeToAux(t4)
17288 v4 := b.NewValue0(v.Pos, OpOffPtr, tt4)
17289 v4.AuxInt = int64ToAuxInt(0)
17290 v4.AddArg(dst)
17291 v3.AddArg3(v4, d3, mem)
17292 v1.AddArg3(v2, d2, v3)
17293 v.AddArg3(v0, d1, v1)
17294 return true
17295 }
17296
17297
17298
17299 for {
17300 n := auxIntToInt64(v.AuxInt)
17301 t1 := auxToType(v.Aux)
17302 dst := v_0
17303 p1 := v_1
17304 mem := v_2
17305 if mem.Op != OpStore {
17306 break
17307 }
17308 t2 := auxToType(mem.Aux)
17309 _ = mem.Args[2]
17310 op2 := mem.Args[0]
17311 if op2.Op != OpOffPtr {
17312 break
17313 }
17314 tt2 := op2.Type
17315 o2 := auxIntToInt64(op2.AuxInt)
17316 p2 := op2.Args[0]
17317 d1 := mem.Args[1]
17318 mem_2 := mem.Args[2]
17319 if mem_2.Op != OpStore {
17320 break
17321 }
17322 t3 := auxToType(mem_2.Aux)
17323 _ = mem_2.Args[2]
17324 op3 := mem_2.Args[0]
17325 if op3.Op != OpOffPtr {
17326 break
17327 }
17328 tt3 := op3.Type
17329 o3 := auxIntToInt64(op3.AuxInt)
17330 p3 := op3.Args[0]
17331 d2 := mem_2.Args[1]
17332 mem_2_2 := mem_2.Args[2]
17333 if mem_2_2.Op != OpStore {
17334 break
17335 }
17336 t4 := auxToType(mem_2_2.Aux)
17337 _ = mem_2_2.Args[2]
17338 op4 := mem_2_2.Args[0]
17339 if op4.Op != OpOffPtr {
17340 break
17341 }
17342 tt4 := op4.Type
17343 o4 := auxIntToInt64(op4.AuxInt)
17344 p4 := op4.Args[0]
17345 d3 := mem_2_2.Args[1]
17346 mem_2_2_2 := mem_2_2.Args[2]
17347 if mem_2_2_2.Op != OpStore {
17348 break
17349 }
17350 t5 := auxToType(mem_2_2_2.Aux)
17351 d4 := mem_2_2_2.Args[1]
17352 op5 := mem_2_2_2.Args[0]
17353 if op5.Op != OpOffPtr {
17354 break
17355 }
17356 tt5 := op5.Type
17357 if auxIntToInt64(op5.AuxInt) != 0 {
17358 break
17359 }
17360 p5 := op5.Args[0]
17361 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()) {
17362 break
17363 }
17364 v.reset(OpStore)
17365 v.Aux = typeToAux(t2)
17366 v0 := b.NewValue0(v.Pos, OpOffPtr, tt2)
17367 v0.AuxInt = int64ToAuxInt(o2)
17368 v0.AddArg(dst)
17369 v1 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
17370 v1.Aux = typeToAux(t3)
17371 v2 := b.NewValue0(v.Pos, OpOffPtr, tt3)
17372 v2.AuxInt = int64ToAuxInt(o3)
17373 v2.AddArg(dst)
17374 v3 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
17375 v3.Aux = typeToAux(t4)
17376 v4 := b.NewValue0(v.Pos, OpOffPtr, tt4)
17377 v4.AuxInt = int64ToAuxInt(o4)
17378 v4.AddArg(dst)
17379 v5 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
17380 v5.Aux = typeToAux(t5)
17381 v6 := b.NewValue0(v.Pos, OpOffPtr, tt5)
17382 v6.AuxInt = int64ToAuxInt(0)
17383 v6.AddArg(dst)
17384 v5.AddArg3(v6, d4, mem)
17385 v3.AddArg3(v4, d3, v5)
17386 v1.AddArg3(v2, d2, v3)
17387 v.AddArg3(v0, d1, v1)
17388 return true
17389 }
17390
17391
17392
17393 for {
17394 n := auxIntToInt64(v.AuxInt)
17395 t1 := auxToType(v.Aux)
17396 dst := v_0
17397 p1 := v_1
17398 mem := v_2
17399 if mem.Op != OpVarDef {
17400 break
17401 }
17402 mem_0 := mem.Args[0]
17403 if mem_0.Op != OpStore {
17404 break
17405 }
17406 t2 := auxToType(mem_0.Aux)
17407 _ = mem_0.Args[2]
17408 op2 := mem_0.Args[0]
17409 if op2.Op != OpOffPtr {
17410 break
17411 }
17412 tt2 := op2.Type
17413 o2 := auxIntToInt64(op2.AuxInt)
17414 p2 := op2.Args[0]
17415 d1 := mem_0.Args[1]
17416 mem_0_2 := mem_0.Args[2]
17417 if mem_0_2.Op != OpStore {
17418 break
17419 }
17420 t3 := auxToType(mem_0_2.Aux)
17421 d2 := mem_0_2.Args[1]
17422 op3 := mem_0_2.Args[0]
17423 if op3.Op != OpOffPtr {
17424 break
17425 }
17426 tt3 := op3.Type
17427 if auxIntToInt64(op3.AuxInt) != 0 {
17428 break
17429 }
17430 p3 := op3.Args[0]
17431 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()) {
17432 break
17433 }
17434 v.reset(OpStore)
17435 v.Aux = typeToAux(t2)
17436 v0 := b.NewValue0(v.Pos, OpOffPtr, tt2)
17437 v0.AuxInt = int64ToAuxInt(o2)
17438 v0.AddArg(dst)
17439 v1 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
17440 v1.Aux = typeToAux(t3)
17441 v2 := b.NewValue0(v.Pos, OpOffPtr, tt3)
17442 v2.AuxInt = int64ToAuxInt(0)
17443 v2.AddArg(dst)
17444 v1.AddArg3(v2, d2, mem)
17445 v.AddArg3(v0, d1, v1)
17446 return true
17447 }
17448
17449
17450
17451 for {
17452 n := auxIntToInt64(v.AuxInt)
17453 t1 := auxToType(v.Aux)
17454 dst := v_0
17455 p1 := v_1
17456 mem := v_2
17457 if mem.Op != OpVarDef {
17458 break
17459 }
17460 mem_0 := mem.Args[0]
17461 if mem_0.Op != OpStore {
17462 break
17463 }
17464 t2 := auxToType(mem_0.Aux)
17465 _ = mem_0.Args[2]
17466 op2 := mem_0.Args[0]
17467 if op2.Op != OpOffPtr {
17468 break
17469 }
17470 tt2 := op2.Type
17471 o2 := auxIntToInt64(op2.AuxInt)
17472 p2 := op2.Args[0]
17473 d1 := mem_0.Args[1]
17474 mem_0_2 := mem_0.Args[2]
17475 if mem_0_2.Op != OpStore {
17476 break
17477 }
17478 t3 := auxToType(mem_0_2.Aux)
17479 _ = mem_0_2.Args[2]
17480 op3 := mem_0_2.Args[0]
17481 if op3.Op != OpOffPtr {
17482 break
17483 }
17484 tt3 := op3.Type
17485 o3 := auxIntToInt64(op3.AuxInt)
17486 p3 := op3.Args[0]
17487 d2 := mem_0_2.Args[1]
17488 mem_0_2_2 := mem_0_2.Args[2]
17489 if mem_0_2_2.Op != OpStore {
17490 break
17491 }
17492 t4 := auxToType(mem_0_2_2.Aux)
17493 d3 := mem_0_2_2.Args[1]
17494 op4 := mem_0_2_2.Args[0]
17495 if op4.Op != OpOffPtr {
17496 break
17497 }
17498 tt4 := op4.Type
17499 if auxIntToInt64(op4.AuxInt) != 0 {
17500 break
17501 }
17502 p4 := op4.Args[0]
17503 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()) {
17504 break
17505 }
17506 v.reset(OpStore)
17507 v.Aux = typeToAux(t2)
17508 v0 := b.NewValue0(v.Pos, OpOffPtr, tt2)
17509 v0.AuxInt = int64ToAuxInt(o2)
17510 v0.AddArg(dst)
17511 v1 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
17512 v1.Aux = typeToAux(t3)
17513 v2 := b.NewValue0(v.Pos, OpOffPtr, tt3)
17514 v2.AuxInt = int64ToAuxInt(o3)
17515 v2.AddArg(dst)
17516 v3 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
17517 v3.Aux = typeToAux(t4)
17518 v4 := b.NewValue0(v.Pos, OpOffPtr, tt4)
17519 v4.AuxInt = int64ToAuxInt(0)
17520 v4.AddArg(dst)
17521 v3.AddArg3(v4, d3, mem)
17522 v1.AddArg3(v2, d2, v3)
17523 v.AddArg3(v0, d1, v1)
17524 return true
17525 }
17526
17527
17528
17529 for {
17530 n := auxIntToInt64(v.AuxInt)
17531 t1 := auxToType(v.Aux)
17532 dst := v_0
17533 p1 := v_1
17534 mem := v_2
17535 if mem.Op != OpVarDef {
17536 break
17537 }
17538 mem_0 := mem.Args[0]
17539 if mem_0.Op != OpStore {
17540 break
17541 }
17542 t2 := auxToType(mem_0.Aux)
17543 _ = mem_0.Args[2]
17544 op2 := mem_0.Args[0]
17545 if op2.Op != OpOffPtr {
17546 break
17547 }
17548 tt2 := op2.Type
17549 o2 := auxIntToInt64(op2.AuxInt)
17550 p2 := op2.Args[0]
17551 d1 := mem_0.Args[1]
17552 mem_0_2 := mem_0.Args[2]
17553 if mem_0_2.Op != OpStore {
17554 break
17555 }
17556 t3 := auxToType(mem_0_2.Aux)
17557 _ = mem_0_2.Args[2]
17558 op3 := mem_0_2.Args[0]
17559 if op3.Op != OpOffPtr {
17560 break
17561 }
17562 tt3 := op3.Type
17563 o3 := auxIntToInt64(op3.AuxInt)
17564 p3 := op3.Args[0]
17565 d2 := mem_0_2.Args[1]
17566 mem_0_2_2 := mem_0_2.Args[2]
17567 if mem_0_2_2.Op != OpStore {
17568 break
17569 }
17570 t4 := auxToType(mem_0_2_2.Aux)
17571 _ = mem_0_2_2.Args[2]
17572 op4 := mem_0_2_2.Args[0]
17573 if op4.Op != OpOffPtr {
17574 break
17575 }
17576 tt4 := op4.Type
17577 o4 := auxIntToInt64(op4.AuxInt)
17578 p4 := op4.Args[0]
17579 d3 := mem_0_2_2.Args[1]
17580 mem_0_2_2_2 := mem_0_2_2.Args[2]
17581 if mem_0_2_2_2.Op != OpStore {
17582 break
17583 }
17584 t5 := auxToType(mem_0_2_2_2.Aux)
17585 d4 := mem_0_2_2_2.Args[1]
17586 op5 := mem_0_2_2_2.Args[0]
17587 if op5.Op != OpOffPtr {
17588 break
17589 }
17590 tt5 := op5.Type
17591 if auxIntToInt64(op5.AuxInt) != 0 {
17592 break
17593 }
17594 p5 := op5.Args[0]
17595 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()) {
17596 break
17597 }
17598 v.reset(OpStore)
17599 v.Aux = typeToAux(t2)
17600 v0 := b.NewValue0(v.Pos, OpOffPtr, tt2)
17601 v0.AuxInt = int64ToAuxInt(o2)
17602 v0.AddArg(dst)
17603 v1 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
17604 v1.Aux = typeToAux(t3)
17605 v2 := b.NewValue0(v.Pos, OpOffPtr, tt3)
17606 v2.AuxInt = int64ToAuxInt(o3)
17607 v2.AddArg(dst)
17608 v3 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
17609 v3.Aux = typeToAux(t4)
17610 v4 := b.NewValue0(v.Pos, OpOffPtr, tt4)
17611 v4.AuxInt = int64ToAuxInt(o4)
17612 v4.AddArg(dst)
17613 v5 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
17614 v5.Aux = typeToAux(t5)
17615 v6 := b.NewValue0(v.Pos, OpOffPtr, tt5)
17616 v6.AuxInt = int64ToAuxInt(0)
17617 v6.AddArg(dst)
17618 v5.AddArg3(v6, d4, mem)
17619 v3.AddArg3(v4, d3, v5)
17620 v1.AddArg3(v2, d2, v3)
17621 v.AddArg3(v0, d1, v1)
17622 return true
17623 }
17624
17625
17626
17627 for {
17628 n := auxIntToInt64(v.AuxInt)
17629 t1 := auxToType(v.Aux)
17630 dst := v_0
17631 p1 := v_1
17632 mem := v_2
17633 if mem.Op != OpStore {
17634 break
17635 }
17636 t2 := auxToType(mem.Aux)
17637 _ = mem.Args[2]
17638 op2 := mem.Args[0]
17639 if op2.Op != OpOffPtr {
17640 break
17641 }
17642 tt2 := op2.Type
17643 o2 := auxIntToInt64(op2.AuxInt)
17644 p2 := op2.Args[0]
17645 d1 := mem.Args[1]
17646 mem_2 := mem.Args[2]
17647 if mem_2.Op != OpZero || auxIntToInt64(mem_2.AuxInt) != n {
17648 break
17649 }
17650 t3 := auxToType(mem_2.Aux)
17651 p3 := mem_2.Args[0]
17652 if !(isSamePtr(p1, p2) && isSamePtr(p2, p3) && t2.Alignment() <= t1.Alignment() && t3.Alignment() <= t1.Alignment() && registerizable(b, t2) && n >= o2+t2.Size()) {
17653 break
17654 }
17655 v.reset(OpStore)
17656 v.Aux = typeToAux(t2)
17657 v0 := b.NewValue0(v.Pos, OpOffPtr, tt2)
17658 v0.AuxInt = int64ToAuxInt(o2)
17659 v0.AddArg(dst)
17660 v1 := b.NewValue0(v.Pos, OpZero, types.TypeMem)
17661 v1.AuxInt = int64ToAuxInt(n)
17662 v1.Aux = typeToAux(t1)
17663 v1.AddArg2(dst, mem)
17664 v.AddArg3(v0, d1, v1)
17665 return true
17666 }
17667
17668
17669
17670 for {
17671 n := auxIntToInt64(v.AuxInt)
17672 t1 := auxToType(v.Aux)
17673 dst := v_0
17674 p1 := v_1
17675 mem := v_2
17676 if mem.Op != OpStore {
17677 break
17678 }
17679 t2 := auxToType(mem.Aux)
17680 _ = mem.Args[2]
17681 mem_0 := mem.Args[0]
17682 if mem_0.Op != OpOffPtr {
17683 break
17684 }
17685 tt2 := mem_0.Type
17686 o2 := auxIntToInt64(mem_0.AuxInt)
17687 p2 := mem_0.Args[0]
17688 d1 := mem.Args[1]
17689 mem_2 := mem.Args[2]
17690 if mem_2.Op != OpStore {
17691 break
17692 }
17693 t3 := auxToType(mem_2.Aux)
17694 _ = mem_2.Args[2]
17695 mem_2_0 := mem_2.Args[0]
17696 if mem_2_0.Op != OpOffPtr {
17697 break
17698 }
17699 tt3 := mem_2_0.Type
17700 o3 := auxIntToInt64(mem_2_0.AuxInt)
17701 p3 := mem_2_0.Args[0]
17702 d2 := mem_2.Args[1]
17703 mem_2_2 := mem_2.Args[2]
17704 if mem_2_2.Op != OpZero || auxIntToInt64(mem_2_2.AuxInt) != n {
17705 break
17706 }
17707 t4 := auxToType(mem_2_2.Aux)
17708 p4 := mem_2_2.Args[0]
17709 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()) {
17710 break
17711 }
17712 v.reset(OpStore)
17713 v.Aux = typeToAux(t2)
17714 v0 := b.NewValue0(v.Pos, OpOffPtr, tt2)
17715 v0.AuxInt = int64ToAuxInt(o2)
17716 v0.AddArg(dst)
17717 v1 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
17718 v1.Aux = typeToAux(t3)
17719 v2 := b.NewValue0(v.Pos, OpOffPtr, tt3)
17720 v2.AuxInt = int64ToAuxInt(o3)
17721 v2.AddArg(dst)
17722 v3 := b.NewValue0(v.Pos, OpZero, types.TypeMem)
17723 v3.AuxInt = int64ToAuxInt(n)
17724 v3.Aux = typeToAux(t1)
17725 v3.AddArg2(dst, mem)
17726 v1.AddArg3(v2, d2, v3)
17727 v.AddArg3(v0, d1, v1)
17728 return true
17729 }
17730
17731
17732
17733 for {
17734 n := auxIntToInt64(v.AuxInt)
17735 t1 := auxToType(v.Aux)
17736 dst := v_0
17737 p1 := v_1
17738 mem := v_2
17739 if mem.Op != OpStore {
17740 break
17741 }
17742 t2 := auxToType(mem.Aux)
17743 _ = mem.Args[2]
17744 mem_0 := mem.Args[0]
17745 if mem_0.Op != OpOffPtr {
17746 break
17747 }
17748 tt2 := mem_0.Type
17749 o2 := auxIntToInt64(mem_0.AuxInt)
17750 p2 := mem_0.Args[0]
17751 d1 := mem.Args[1]
17752 mem_2 := mem.Args[2]
17753 if mem_2.Op != OpStore {
17754 break
17755 }
17756 t3 := auxToType(mem_2.Aux)
17757 _ = mem_2.Args[2]
17758 mem_2_0 := mem_2.Args[0]
17759 if mem_2_0.Op != OpOffPtr {
17760 break
17761 }
17762 tt3 := mem_2_0.Type
17763 o3 := auxIntToInt64(mem_2_0.AuxInt)
17764 p3 := mem_2_0.Args[0]
17765 d2 := mem_2.Args[1]
17766 mem_2_2 := mem_2.Args[2]
17767 if mem_2_2.Op != OpStore {
17768 break
17769 }
17770 t4 := auxToType(mem_2_2.Aux)
17771 _ = mem_2_2.Args[2]
17772 mem_2_2_0 := mem_2_2.Args[0]
17773 if mem_2_2_0.Op != OpOffPtr {
17774 break
17775 }
17776 tt4 := mem_2_2_0.Type
17777 o4 := auxIntToInt64(mem_2_2_0.AuxInt)
17778 p4 := mem_2_2_0.Args[0]
17779 d3 := mem_2_2.Args[1]
17780 mem_2_2_2 := mem_2_2.Args[2]
17781 if mem_2_2_2.Op != OpZero || auxIntToInt64(mem_2_2_2.AuxInt) != n {
17782 break
17783 }
17784 t5 := auxToType(mem_2_2_2.Aux)
17785 p5 := mem_2_2_2.Args[0]
17786 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()) {
17787 break
17788 }
17789 v.reset(OpStore)
17790 v.Aux = typeToAux(t2)
17791 v0 := b.NewValue0(v.Pos, OpOffPtr, tt2)
17792 v0.AuxInt = int64ToAuxInt(o2)
17793 v0.AddArg(dst)
17794 v1 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
17795 v1.Aux = typeToAux(t3)
17796 v2 := b.NewValue0(v.Pos, OpOffPtr, tt3)
17797 v2.AuxInt = int64ToAuxInt(o3)
17798 v2.AddArg(dst)
17799 v3 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
17800 v3.Aux = typeToAux(t4)
17801 v4 := b.NewValue0(v.Pos, OpOffPtr, tt4)
17802 v4.AuxInt = int64ToAuxInt(o4)
17803 v4.AddArg(dst)
17804 v5 := b.NewValue0(v.Pos, OpZero, types.TypeMem)
17805 v5.AuxInt = int64ToAuxInt(n)
17806 v5.Aux = typeToAux(t1)
17807 v5.AddArg2(dst, mem)
17808 v3.AddArg3(v4, d3, v5)
17809 v1.AddArg3(v2, d2, v3)
17810 v.AddArg3(v0, d1, v1)
17811 return true
17812 }
17813
17814
17815
17816 for {
17817 n := auxIntToInt64(v.AuxInt)
17818 t1 := auxToType(v.Aux)
17819 dst := v_0
17820 p1 := v_1
17821 mem := v_2
17822 if mem.Op != OpStore {
17823 break
17824 }
17825 t2 := auxToType(mem.Aux)
17826 _ = mem.Args[2]
17827 mem_0 := mem.Args[0]
17828 if mem_0.Op != OpOffPtr {
17829 break
17830 }
17831 tt2 := mem_0.Type
17832 o2 := auxIntToInt64(mem_0.AuxInt)
17833 p2 := mem_0.Args[0]
17834 d1 := mem.Args[1]
17835 mem_2 := mem.Args[2]
17836 if mem_2.Op != OpStore {
17837 break
17838 }
17839 t3 := auxToType(mem_2.Aux)
17840 _ = mem_2.Args[2]
17841 mem_2_0 := mem_2.Args[0]
17842 if mem_2_0.Op != OpOffPtr {
17843 break
17844 }
17845 tt3 := mem_2_0.Type
17846 o3 := auxIntToInt64(mem_2_0.AuxInt)
17847 p3 := mem_2_0.Args[0]
17848 d2 := mem_2.Args[1]
17849 mem_2_2 := mem_2.Args[2]
17850 if mem_2_2.Op != OpStore {
17851 break
17852 }
17853 t4 := auxToType(mem_2_2.Aux)
17854 _ = mem_2_2.Args[2]
17855 mem_2_2_0 := mem_2_2.Args[0]
17856 if mem_2_2_0.Op != OpOffPtr {
17857 break
17858 }
17859 tt4 := mem_2_2_0.Type
17860 o4 := auxIntToInt64(mem_2_2_0.AuxInt)
17861 p4 := mem_2_2_0.Args[0]
17862 d3 := mem_2_2.Args[1]
17863 mem_2_2_2 := mem_2_2.Args[2]
17864 if mem_2_2_2.Op != OpStore {
17865 break
17866 }
17867 t5 := auxToType(mem_2_2_2.Aux)
17868 _ = mem_2_2_2.Args[2]
17869 mem_2_2_2_0 := mem_2_2_2.Args[0]
17870 if mem_2_2_2_0.Op != OpOffPtr {
17871 break
17872 }
17873 tt5 := mem_2_2_2_0.Type
17874 o5 := auxIntToInt64(mem_2_2_2_0.AuxInt)
17875 p5 := mem_2_2_2_0.Args[0]
17876 d4 := mem_2_2_2.Args[1]
17877 mem_2_2_2_2 := mem_2_2_2.Args[2]
17878 if mem_2_2_2_2.Op != OpZero || auxIntToInt64(mem_2_2_2_2.AuxInt) != n {
17879 break
17880 }
17881 t6 := auxToType(mem_2_2_2_2.Aux)
17882 p6 := mem_2_2_2_2.Args[0]
17883 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()) {
17884 break
17885 }
17886 v.reset(OpStore)
17887 v.Aux = typeToAux(t2)
17888 v0 := b.NewValue0(v.Pos, OpOffPtr, tt2)
17889 v0.AuxInt = int64ToAuxInt(o2)
17890 v0.AddArg(dst)
17891 v1 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
17892 v1.Aux = typeToAux(t3)
17893 v2 := b.NewValue0(v.Pos, OpOffPtr, tt3)
17894 v2.AuxInt = int64ToAuxInt(o3)
17895 v2.AddArg(dst)
17896 v3 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
17897 v3.Aux = typeToAux(t4)
17898 v4 := b.NewValue0(v.Pos, OpOffPtr, tt4)
17899 v4.AuxInt = int64ToAuxInt(o4)
17900 v4.AddArg(dst)
17901 v5 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
17902 v5.Aux = typeToAux(t5)
17903 v6 := b.NewValue0(v.Pos, OpOffPtr, tt5)
17904 v6.AuxInt = int64ToAuxInt(o5)
17905 v6.AddArg(dst)
17906 v7 := b.NewValue0(v.Pos, OpZero, types.TypeMem)
17907 v7.AuxInt = int64ToAuxInt(n)
17908 v7.Aux = typeToAux(t1)
17909 v7.AddArg2(dst, mem)
17910 v5.AddArg3(v6, d4, v7)
17911 v3.AddArg3(v4, d3, v5)
17912 v1.AddArg3(v2, d2, v3)
17913 v.AddArg3(v0, d1, v1)
17914 return true
17915 }
17916
17917
17918
17919 for {
17920 n := auxIntToInt64(v.AuxInt)
17921 t1 := auxToType(v.Aux)
17922 dst := v_0
17923 p1 := v_1
17924 mem := v_2
17925 if mem.Op != OpVarDef {
17926 break
17927 }
17928 mem_0 := mem.Args[0]
17929 if mem_0.Op != OpStore {
17930 break
17931 }
17932 t2 := auxToType(mem_0.Aux)
17933 _ = mem_0.Args[2]
17934 op2 := mem_0.Args[0]
17935 if op2.Op != OpOffPtr {
17936 break
17937 }
17938 tt2 := op2.Type
17939 o2 := auxIntToInt64(op2.AuxInt)
17940 p2 := op2.Args[0]
17941 d1 := mem_0.Args[1]
17942 mem_0_2 := mem_0.Args[2]
17943 if mem_0_2.Op != OpZero || auxIntToInt64(mem_0_2.AuxInt) != n {
17944 break
17945 }
17946 t3 := auxToType(mem_0_2.Aux)
17947 p3 := mem_0_2.Args[0]
17948 if !(isSamePtr(p1, p2) && isSamePtr(p2, p3) && t2.Alignment() <= t1.Alignment() && t3.Alignment() <= t1.Alignment() && registerizable(b, t2) && n >= o2+t2.Size()) {
17949 break
17950 }
17951 v.reset(OpStore)
17952 v.Aux = typeToAux(t2)
17953 v0 := b.NewValue0(v.Pos, OpOffPtr, tt2)
17954 v0.AuxInt = int64ToAuxInt(o2)
17955 v0.AddArg(dst)
17956 v1 := b.NewValue0(v.Pos, OpZero, types.TypeMem)
17957 v1.AuxInt = int64ToAuxInt(n)
17958 v1.Aux = typeToAux(t1)
17959 v1.AddArg2(dst, mem)
17960 v.AddArg3(v0, d1, v1)
17961 return true
17962 }
17963
17964
17965
17966 for {
17967 n := auxIntToInt64(v.AuxInt)
17968 t1 := auxToType(v.Aux)
17969 dst := v_0
17970 p1 := v_1
17971 mem := v_2
17972 if mem.Op != OpVarDef {
17973 break
17974 }
17975 mem_0 := mem.Args[0]
17976 if mem_0.Op != OpStore {
17977 break
17978 }
17979 t2 := auxToType(mem_0.Aux)
17980 _ = mem_0.Args[2]
17981 mem_0_0 := mem_0.Args[0]
17982 if mem_0_0.Op != OpOffPtr {
17983 break
17984 }
17985 tt2 := mem_0_0.Type
17986 o2 := auxIntToInt64(mem_0_0.AuxInt)
17987 p2 := mem_0_0.Args[0]
17988 d1 := mem_0.Args[1]
17989 mem_0_2 := mem_0.Args[2]
17990 if mem_0_2.Op != OpStore {
17991 break
17992 }
17993 t3 := auxToType(mem_0_2.Aux)
17994 _ = mem_0_2.Args[2]
17995 mem_0_2_0 := mem_0_2.Args[0]
17996 if mem_0_2_0.Op != OpOffPtr {
17997 break
17998 }
17999 tt3 := mem_0_2_0.Type
18000 o3 := auxIntToInt64(mem_0_2_0.AuxInt)
18001 p3 := mem_0_2_0.Args[0]
18002 d2 := mem_0_2.Args[1]
18003 mem_0_2_2 := mem_0_2.Args[2]
18004 if mem_0_2_2.Op != OpZero || auxIntToInt64(mem_0_2_2.AuxInt) != n {
18005 break
18006 }
18007 t4 := auxToType(mem_0_2_2.Aux)
18008 p4 := mem_0_2_2.Args[0]
18009 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()) {
18010 break
18011 }
18012 v.reset(OpStore)
18013 v.Aux = typeToAux(t2)
18014 v0 := b.NewValue0(v.Pos, OpOffPtr, tt2)
18015 v0.AuxInt = int64ToAuxInt(o2)
18016 v0.AddArg(dst)
18017 v1 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
18018 v1.Aux = typeToAux(t3)
18019 v2 := b.NewValue0(v.Pos, OpOffPtr, tt3)
18020 v2.AuxInt = int64ToAuxInt(o3)
18021 v2.AddArg(dst)
18022 v3 := b.NewValue0(v.Pos, OpZero, types.TypeMem)
18023 v3.AuxInt = int64ToAuxInt(n)
18024 v3.Aux = typeToAux(t1)
18025 v3.AddArg2(dst, mem)
18026 v1.AddArg3(v2, d2, v3)
18027 v.AddArg3(v0, d1, v1)
18028 return true
18029 }
18030
18031
18032
18033 for {
18034 n := auxIntToInt64(v.AuxInt)
18035 t1 := auxToType(v.Aux)
18036 dst := v_0
18037 p1 := v_1
18038 mem := v_2
18039 if mem.Op != OpVarDef {
18040 break
18041 }
18042 mem_0 := mem.Args[0]
18043 if mem_0.Op != OpStore {
18044 break
18045 }
18046 t2 := auxToType(mem_0.Aux)
18047 _ = mem_0.Args[2]
18048 mem_0_0 := mem_0.Args[0]
18049 if mem_0_0.Op != OpOffPtr {
18050 break
18051 }
18052 tt2 := mem_0_0.Type
18053 o2 := auxIntToInt64(mem_0_0.AuxInt)
18054 p2 := mem_0_0.Args[0]
18055 d1 := mem_0.Args[1]
18056 mem_0_2 := mem_0.Args[2]
18057 if mem_0_2.Op != OpStore {
18058 break
18059 }
18060 t3 := auxToType(mem_0_2.Aux)
18061 _ = mem_0_2.Args[2]
18062 mem_0_2_0 := mem_0_2.Args[0]
18063 if mem_0_2_0.Op != OpOffPtr {
18064 break
18065 }
18066 tt3 := mem_0_2_0.Type
18067 o3 := auxIntToInt64(mem_0_2_0.AuxInt)
18068 p3 := mem_0_2_0.Args[0]
18069 d2 := mem_0_2.Args[1]
18070 mem_0_2_2 := mem_0_2.Args[2]
18071 if mem_0_2_2.Op != OpStore {
18072 break
18073 }
18074 t4 := auxToType(mem_0_2_2.Aux)
18075 _ = mem_0_2_2.Args[2]
18076 mem_0_2_2_0 := mem_0_2_2.Args[0]
18077 if mem_0_2_2_0.Op != OpOffPtr {
18078 break
18079 }
18080 tt4 := mem_0_2_2_0.Type
18081 o4 := auxIntToInt64(mem_0_2_2_0.AuxInt)
18082 p4 := mem_0_2_2_0.Args[0]
18083 d3 := mem_0_2_2.Args[1]
18084 mem_0_2_2_2 := mem_0_2_2.Args[2]
18085 if mem_0_2_2_2.Op != OpZero || auxIntToInt64(mem_0_2_2_2.AuxInt) != n {
18086 break
18087 }
18088 t5 := auxToType(mem_0_2_2_2.Aux)
18089 p5 := mem_0_2_2_2.Args[0]
18090 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()) {
18091 break
18092 }
18093 v.reset(OpStore)
18094 v.Aux = typeToAux(t2)
18095 v0 := b.NewValue0(v.Pos, OpOffPtr, tt2)
18096 v0.AuxInt = int64ToAuxInt(o2)
18097 v0.AddArg(dst)
18098 v1 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
18099 v1.Aux = typeToAux(t3)
18100 v2 := b.NewValue0(v.Pos, OpOffPtr, tt3)
18101 v2.AuxInt = int64ToAuxInt(o3)
18102 v2.AddArg(dst)
18103 v3 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
18104 v3.Aux = typeToAux(t4)
18105 v4 := b.NewValue0(v.Pos, OpOffPtr, tt4)
18106 v4.AuxInt = int64ToAuxInt(o4)
18107 v4.AddArg(dst)
18108 v5 := b.NewValue0(v.Pos, OpZero, types.TypeMem)
18109 v5.AuxInt = int64ToAuxInt(n)
18110 v5.Aux = typeToAux(t1)
18111 v5.AddArg2(dst, mem)
18112 v3.AddArg3(v4, d3, v5)
18113 v1.AddArg3(v2, d2, v3)
18114 v.AddArg3(v0, d1, v1)
18115 return true
18116 }
18117
18118
18119
18120 for {
18121 n := auxIntToInt64(v.AuxInt)
18122 t1 := auxToType(v.Aux)
18123 dst := v_0
18124 p1 := v_1
18125 mem := v_2
18126 if mem.Op != OpVarDef {
18127 break
18128 }
18129 mem_0 := mem.Args[0]
18130 if mem_0.Op != OpStore {
18131 break
18132 }
18133 t2 := auxToType(mem_0.Aux)
18134 _ = mem_0.Args[2]
18135 mem_0_0 := mem_0.Args[0]
18136 if mem_0_0.Op != OpOffPtr {
18137 break
18138 }
18139 tt2 := mem_0_0.Type
18140 o2 := auxIntToInt64(mem_0_0.AuxInt)
18141 p2 := mem_0_0.Args[0]
18142 d1 := mem_0.Args[1]
18143 mem_0_2 := mem_0.Args[2]
18144 if mem_0_2.Op != OpStore {
18145 break
18146 }
18147 t3 := auxToType(mem_0_2.Aux)
18148 _ = mem_0_2.Args[2]
18149 mem_0_2_0 := mem_0_2.Args[0]
18150 if mem_0_2_0.Op != OpOffPtr {
18151 break
18152 }
18153 tt3 := mem_0_2_0.Type
18154 o3 := auxIntToInt64(mem_0_2_0.AuxInt)
18155 p3 := mem_0_2_0.Args[0]
18156 d2 := mem_0_2.Args[1]
18157 mem_0_2_2 := mem_0_2.Args[2]
18158 if mem_0_2_2.Op != OpStore {
18159 break
18160 }
18161 t4 := auxToType(mem_0_2_2.Aux)
18162 _ = mem_0_2_2.Args[2]
18163 mem_0_2_2_0 := mem_0_2_2.Args[0]
18164 if mem_0_2_2_0.Op != OpOffPtr {
18165 break
18166 }
18167 tt4 := mem_0_2_2_0.Type
18168 o4 := auxIntToInt64(mem_0_2_2_0.AuxInt)
18169 p4 := mem_0_2_2_0.Args[0]
18170 d3 := mem_0_2_2.Args[1]
18171 mem_0_2_2_2 := mem_0_2_2.Args[2]
18172 if mem_0_2_2_2.Op != OpStore {
18173 break
18174 }
18175 t5 := auxToType(mem_0_2_2_2.Aux)
18176 _ = mem_0_2_2_2.Args[2]
18177 mem_0_2_2_2_0 := mem_0_2_2_2.Args[0]
18178 if mem_0_2_2_2_0.Op != OpOffPtr {
18179 break
18180 }
18181 tt5 := mem_0_2_2_2_0.Type
18182 o5 := auxIntToInt64(mem_0_2_2_2_0.AuxInt)
18183 p5 := mem_0_2_2_2_0.Args[0]
18184 d4 := mem_0_2_2_2.Args[1]
18185 mem_0_2_2_2_2 := mem_0_2_2_2.Args[2]
18186 if mem_0_2_2_2_2.Op != OpZero || auxIntToInt64(mem_0_2_2_2_2.AuxInt) != n {
18187 break
18188 }
18189 t6 := auxToType(mem_0_2_2_2_2.Aux)
18190 p6 := mem_0_2_2_2_2.Args[0]
18191 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()) {
18192 break
18193 }
18194 v.reset(OpStore)
18195 v.Aux = typeToAux(t2)
18196 v0 := b.NewValue0(v.Pos, OpOffPtr, tt2)
18197 v0.AuxInt = int64ToAuxInt(o2)
18198 v0.AddArg(dst)
18199 v1 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
18200 v1.Aux = typeToAux(t3)
18201 v2 := b.NewValue0(v.Pos, OpOffPtr, tt3)
18202 v2.AuxInt = int64ToAuxInt(o3)
18203 v2.AddArg(dst)
18204 v3 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
18205 v3.Aux = typeToAux(t4)
18206 v4 := b.NewValue0(v.Pos, OpOffPtr, tt4)
18207 v4.AuxInt = int64ToAuxInt(o4)
18208 v4.AddArg(dst)
18209 v5 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
18210 v5.Aux = typeToAux(t5)
18211 v6 := b.NewValue0(v.Pos, OpOffPtr, tt5)
18212 v6.AuxInt = int64ToAuxInt(o5)
18213 v6.AddArg(dst)
18214 v7 := b.NewValue0(v.Pos, OpZero, types.TypeMem)
18215 v7.AuxInt = int64ToAuxInt(n)
18216 v7.Aux = typeToAux(t1)
18217 v7.AddArg2(dst, mem)
18218 v5.AddArg3(v6, d4, v7)
18219 v3.AddArg3(v4, d3, v5)
18220 v1.AddArg3(v2, d2, v3)
18221 v.AddArg3(v0, d1, v1)
18222 return true
18223 }
18224
18225
18226
18227 for {
18228 s := auxIntToInt64(v.AuxInt)
18229 t1 := auxToType(v.Aux)
18230 dst := v_0
18231 tmp1 := v_1
18232 midmem := v_2
18233 if midmem.Op != OpMove || auxIntToInt64(midmem.AuxInt) != s {
18234 break
18235 }
18236 t2 := auxToType(midmem.Aux)
18237 src := midmem.Args[1]
18238 tmp2 := midmem.Args[0]
18239 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))) {
18240 break
18241 }
18242 v.reset(OpMove)
18243 v.AuxInt = int64ToAuxInt(s)
18244 v.Aux = typeToAux(t1)
18245 v.AddArg3(dst, src, midmem)
18246 return true
18247 }
18248
18249
18250
18251 for {
18252 s := auxIntToInt64(v.AuxInt)
18253 t1 := auxToType(v.Aux)
18254 dst := v_0
18255 tmp1 := v_1
18256 midmem := v_2
18257 if midmem.Op != OpVarDef {
18258 break
18259 }
18260 midmem_0 := midmem.Args[0]
18261 if midmem_0.Op != OpMove || auxIntToInt64(midmem_0.AuxInt) != s {
18262 break
18263 }
18264 t2 := auxToType(midmem_0.Aux)
18265 src := midmem_0.Args[1]
18266 tmp2 := midmem_0.Args[0]
18267 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))) {
18268 break
18269 }
18270 v.reset(OpMove)
18271 v.AuxInt = int64ToAuxInt(s)
18272 v.Aux = typeToAux(t1)
18273 v.AddArg3(dst, src, midmem)
18274 return true
18275 }
18276
18277
18278
18279 for {
18280 dst := v_0
18281 src := v_1
18282 mem := v_2
18283 if !(isSamePtr(dst, src)) {
18284 break
18285 }
18286 v.copyOf(mem)
18287 return true
18288 }
18289 return false
18290 }
18291 func rewriteValuegeneric_OpMul16(v *Value) bool {
18292 v_1 := v.Args[1]
18293 v_0 := v.Args[0]
18294 b := v.Block
18295 typ := &b.Func.Config.Types
18296
18297
18298 for {
18299 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18300 if v_0.Op != OpConst16 {
18301 continue
18302 }
18303 c := auxIntToInt16(v_0.AuxInt)
18304 if v_1.Op != OpConst16 {
18305 continue
18306 }
18307 d := auxIntToInt16(v_1.AuxInt)
18308 v.reset(OpConst16)
18309 v.AuxInt = int16ToAuxInt(c * d)
18310 return true
18311 }
18312 break
18313 }
18314
18315
18316 for {
18317 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18318 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 1 {
18319 continue
18320 }
18321 x := v_1
18322 v.copyOf(x)
18323 return true
18324 }
18325 break
18326 }
18327
18328
18329 for {
18330 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18331 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != -1 {
18332 continue
18333 }
18334 x := v_1
18335 v.reset(OpNeg16)
18336 v.AddArg(x)
18337 return true
18338 }
18339 break
18340 }
18341
18342
18343
18344 for {
18345 t := v.Type
18346 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18347 n := v_0
18348 if v_1.Op != OpConst16 {
18349 continue
18350 }
18351 c := auxIntToInt16(v_1.AuxInt)
18352 if !(isPowerOfTwo(c)) {
18353 continue
18354 }
18355 v.reset(OpLsh16x64)
18356 v.Type = t
18357 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
18358 v0.AuxInt = int64ToAuxInt(log16(c))
18359 v.AddArg2(n, v0)
18360 return true
18361 }
18362 break
18363 }
18364
18365
18366
18367 for {
18368 t := v.Type
18369 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18370 n := v_0
18371 if v_1.Op != OpConst16 {
18372 continue
18373 }
18374 c := auxIntToInt16(v_1.AuxInt)
18375 if !(t.IsSigned() && isPowerOfTwo(-c)) {
18376 continue
18377 }
18378 v.reset(OpNeg16)
18379 v0 := b.NewValue0(v.Pos, OpLsh16x64, t)
18380 v1 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
18381 v1.AuxInt = int64ToAuxInt(log16(-c))
18382 v0.AddArg2(n, v1)
18383 v.AddArg(v0)
18384 return true
18385 }
18386 break
18387 }
18388
18389
18390 for {
18391 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18392 if v_0.Op != OpConst16 {
18393 continue
18394 }
18395 t := v_0.Type
18396 c := auxIntToInt16(v_0.AuxInt)
18397 if v_1.Op != OpAdd16 || v_1.Type != t {
18398 continue
18399 }
18400 _ = v_1.Args[1]
18401 v_1_0 := v_1.Args[0]
18402 v_1_1 := v_1.Args[1]
18403 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
18404 if v_1_0.Op != OpConst16 || v_1_0.Type != t {
18405 continue
18406 }
18407 d := auxIntToInt16(v_1_0.AuxInt)
18408 x := v_1_1
18409 v.reset(OpAdd16)
18410 v0 := b.NewValue0(v.Pos, OpConst16, t)
18411 v0.AuxInt = int16ToAuxInt(c * d)
18412 v1 := b.NewValue0(v.Pos, OpMul16, t)
18413 v2 := b.NewValue0(v.Pos, OpConst16, t)
18414 v2.AuxInt = int16ToAuxInt(c)
18415 v1.AddArg2(v2, x)
18416 v.AddArg2(v0, v1)
18417 return true
18418 }
18419 }
18420 break
18421 }
18422
18423
18424 for {
18425 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18426 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 {
18427 continue
18428 }
18429 v.reset(OpConst16)
18430 v.AuxInt = int16ToAuxInt(0)
18431 return true
18432 }
18433 break
18434 }
18435
18436
18437
18438 for {
18439 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18440 if v_0.Op != OpMul16 {
18441 continue
18442 }
18443 _ = v_0.Args[1]
18444 v_0_0 := v_0.Args[0]
18445 v_0_1 := v_0.Args[1]
18446 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
18447 i := v_0_0
18448 if i.Op != OpConst16 {
18449 continue
18450 }
18451 t := i.Type
18452 z := v_0_1
18453 x := v_1
18454 if !(z.Op != OpConst16 && x.Op != OpConst16) {
18455 continue
18456 }
18457 v.reset(OpMul16)
18458 v0 := b.NewValue0(v.Pos, OpMul16, t)
18459 v0.AddArg2(x, z)
18460 v.AddArg2(i, v0)
18461 return true
18462 }
18463 }
18464 break
18465 }
18466
18467
18468 for {
18469 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18470 if v_0.Op != OpConst16 {
18471 continue
18472 }
18473 t := v_0.Type
18474 c := auxIntToInt16(v_0.AuxInt)
18475 if v_1.Op != OpMul16 {
18476 continue
18477 }
18478 _ = v_1.Args[1]
18479 v_1_0 := v_1.Args[0]
18480 v_1_1 := v_1.Args[1]
18481 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
18482 if v_1_0.Op != OpConst16 || v_1_0.Type != t {
18483 continue
18484 }
18485 d := auxIntToInt16(v_1_0.AuxInt)
18486 x := v_1_1
18487 v.reset(OpMul16)
18488 v0 := b.NewValue0(v.Pos, OpConst16, t)
18489 v0.AuxInt = int16ToAuxInt(c * d)
18490 v.AddArg2(v0, x)
18491 return true
18492 }
18493 }
18494 break
18495 }
18496 return false
18497 }
18498 func rewriteValuegeneric_OpMul32(v *Value) bool {
18499 v_1 := v.Args[1]
18500 v_0 := v.Args[0]
18501 b := v.Block
18502 typ := &b.Func.Config.Types
18503
18504
18505 for {
18506 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18507 if v_0.Op != OpConst32 {
18508 continue
18509 }
18510 c := auxIntToInt32(v_0.AuxInt)
18511 if v_1.Op != OpConst32 {
18512 continue
18513 }
18514 d := auxIntToInt32(v_1.AuxInt)
18515 v.reset(OpConst32)
18516 v.AuxInt = int32ToAuxInt(c * d)
18517 return true
18518 }
18519 break
18520 }
18521
18522
18523 for {
18524 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18525 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 1 {
18526 continue
18527 }
18528 x := v_1
18529 v.copyOf(x)
18530 return true
18531 }
18532 break
18533 }
18534
18535
18536 for {
18537 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18538 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != -1 {
18539 continue
18540 }
18541 x := v_1
18542 v.reset(OpNeg32)
18543 v.AddArg(x)
18544 return true
18545 }
18546 break
18547 }
18548
18549
18550
18551 for {
18552 t := v.Type
18553 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18554 n := v_0
18555 if v_1.Op != OpConst32 {
18556 continue
18557 }
18558 c := auxIntToInt32(v_1.AuxInt)
18559 if !(isPowerOfTwo(c)) {
18560 continue
18561 }
18562 v.reset(OpLsh32x64)
18563 v.Type = t
18564 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
18565 v0.AuxInt = int64ToAuxInt(log32(c))
18566 v.AddArg2(n, v0)
18567 return true
18568 }
18569 break
18570 }
18571
18572
18573
18574 for {
18575 t := v.Type
18576 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18577 n := v_0
18578 if v_1.Op != OpConst32 {
18579 continue
18580 }
18581 c := auxIntToInt32(v_1.AuxInt)
18582 if !(t.IsSigned() && isPowerOfTwo(-c)) {
18583 continue
18584 }
18585 v.reset(OpNeg32)
18586 v0 := b.NewValue0(v.Pos, OpLsh32x64, t)
18587 v1 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
18588 v1.AuxInt = int64ToAuxInt(log32(-c))
18589 v0.AddArg2(n, v1)
18590 v.AddArg(v0)
18591 return true
18592 }
18593 break
18594 }
18595
18596
18597 for {
18598 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18599 if v_0.Op != OpConst32 {
18600 continue
18601 }
18602 t := v_0.Type
18603 c := auxIntToInt32(v_0.AuxInt)
18604 if v_1.Op != OpAdd32 || v_1.Type != t {
18605 continue
18606 }
18607 _ = v_1.Args[1]
18608 v_1_0 := v_1.Args[0]
18609 v_1_1 := v_1.Args[1]
18610 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
18611 if v_1_0.Op != OpConst32 || v_1_0.Type != t {
18612 continue
18613 }
18614 d := auxIntToInt32(v_1_0.AuxInt)
18615 x := v_1_1
18616 v.reset(OpAdd32)
18617 v0 := b.NewValue0(v.Pos, OpConst32, t)
18618 v0.AuxInt = int32ToAuxInt(c * d)
18619 v1 := b.NewValue0(v.Pos, OpMul32, t)
18620 v2 := b.NewValue0(v.Pos, OpConst32, t)
18621 v2.AuxInt = int32ToAuxInt(c)
18622 v1.AddArg2(v2, x)
18623 v.AddArg2(v0, v1)
18624 return true
18625 }
18626 }
18627 break
18628 }
18629
18630
18631 for {
18632 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18633 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
18634 continue
18635 }
18636 v.reset(OpConst32)
18637 v.AuxInt = int32ToAuxInt(0)
18638 return true
18639 }
18640 break
18641 }
18642
18643
18644
18645 for {
18646 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18647 if v_0.Op != OpMul32 {
18648 continue
18649 }
18650 _ = v_0.Args[1]
18651 v_0_0 := v_0.Args[0]
18652 v_0_1 := v_0.Args[1]
18653 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
18654 i := v_0_0
18655 if i.Op != OpConst32 {
18656 continue
18657 }
18658 t := i.Type
18659 z := v_0_1
18660 x := v_1
18661 if !(z.Op != OpConst32 && x.Op != OpConst32) {
18662 continue
18663 }
18664 v.reset(OpMul32)
18665 v0 := b.NewValue0(v.Pos, OpMul32, t)
18666 v0.AddArg2(x, z)
18667 v.AddArg2(i, v0)
18668 return true
18669 }
18670 }
18671 break
18672 }
18673
18674
18675 for {
18676 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18677 if v_0.Op != OpConst32 {
18678 continue
18679 }
18680 t := v_0.Type
18681 c := auxIntToInt32(v_0.AuxInt)
18682 if v_1.Op != OpMul32 {
18683 continue
18684 }
18685 _ = v_1.Args[1]
18686 v_1_0 := v_1.Args[0]
18687 v_1_1 := v_1.Args[1]
18688 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
18689 if v_1_0.Op != OpConst32 || v_1_0.Type != t {
18690 continue
18691 }
18692 d := auxIntToInt32(v_1_0.AuxInt)
18693 x := v_1_1
18694 v.reset(OpMul32)
18695 v0 := b.NewValue0(v.Pos, OpConst32, t)
18696 v0.AuxInt = int32ToAuxInt(c * d)
18697 v.AddArg2(v0, x)
18698 return true
18699 }
18700 }
18701 break
18702 }
18703 return false
18704 }
18705 func rewriteValuegeneric_OpMul32F(v *Value) bool {
18706 v_1 := v.Args[1]
18707 v_0 := v.Args[0]
18708
18709
18710
18711 for {
18712 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18713 if v_0.Op != OpConst32F {
18714 continue
18715 }
18716 c := auxIntToFloat32(v_0.AuxInt)
18717 if v_1.Op != OpConst32F {
18718 continue
18719 }
18720 d := auxIntToFloat32(v_1.AuxInt)
18721 if !(c*d == c*d) {
18722 continue
18723 }
18724 v.reset(OpConst32F)
18725 v.AuxInt = float32ToAuxInt(c * d)
18726 return true
18727 }
18728 break
18729 }
18730
18731
18732 for {
18733 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18734 x := v_0
18735 if v_1.Op != OpConst32F || auxIntToFloat32(v_1.AuxInt) != 1 {
18736 continue
18737 }
18738 v.copyOf(x)
18739 return true
18740 }
18741 break
18742 }
18743
18744
18745 for {
18746 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18747 x := v_0
18748 if v_1.Op != OpConst32F || auxIntToFloat32(v_1.AuxInt) != -1 {
18749 continue
18750 }
18751 v.reset(OpNeg32F)
18752 v.AddArg(x)
18753 return true
18754 }
18755 break
18756 }
18757
18758
18759 for {
18760 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18761 x := v_0
18762 if v_1.Op != OpConst32F || auxIntToFloat32(v_1.AuxInt) != 2 {
18763 continue
18764 }
18765 v.reset(OpAdd32F)
18766 v.AddArg2(x, x)
18767 return true
18768 }
18769 break
18770 }
18771 return false
18772 }
18773 func rewriteValuegeneric_OpMul32uhilo(v *Value) bool {
18774 v_1 := v.Args[1]
18775 v_0 := v.Args[0]
18776 b := v.Block
18777 typ := &b.Func.Config.Types
18778
18779
18780 for {
18781 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18782 if v_0.Op != OpConst32 {
18783 continue
18784 }
18785 c := auxIntToInt32(v_0.AuxInt)
18786 if v_1.Op != OpConst32 {
18787 continue
18788 }
18789 d := auxIntToInt32(v_1.AuxInt)
18790 v.reset(OpMakeTuple)
18791 v0 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
18792 v0.AuxInt = int32ToAuxInt(bitsMulU32(c, d).hi)
18793 v1 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
18794 v1.AuxInt = int32ToAuxInt(bitsMulU32(c, d).lo)
18795 v.AddArg2(v0, v1)
18796 return true
18797 }
18798 break
18799 }
18800 return false
18801 }
18802 func rewriteValuegeneric_OpMul32uover(v *Value) bool {
18803 v_1 := v.Args[1]
18804 v_0 := v.Args[0]
18805 b := v.Block
18806 typ := &b.Func.Config.Types
18807
18808
18809 for {
18810 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18811 if v_0.Op != OpConst32 {
18812 continue
18813 }
18814 c := auxIntToInt32(v_0.AuxInt)
18815 if v_1.Op != OpConst32 {
18816 continue
18817 }
18818 d := auxIntToInt32(v_1.AuxInt)
18819 v.reset(OpMakeTuple)
18820 v0 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
18821 v0.AuxInt = int32ToAuxInt(bitsMulU32(c, d).lo)
18822 v1 := b.NewValue0(v.Pos, OpConstBool, typ.Bool)
18823 v1.AuxInt = boolToAuxInt(bitsMulU32(c, d).hi != 0)
18824 v.AddArg2(v0, v1)
18825 return true
18826 }
18827 break
18828 }
18829
18830
18831 for {
18832 t := v.Type
18833 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18834 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 1 {
18835 continue
18836 }
18837 x := v_1
18838 v.reset(OpMakeTuple)
18839 v0 := b.NewValue0(v.Pos, OpConstBool, t.FieldType(1))
18840 v0.AuxInt = boolToAuxInt(false)
18841 v.AddArg2(x, v0)
18842 return true
18843 }
18844 break
18845 }
18846
18847
18848 for {
18849 t := v.Type
18850 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18851 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
18852 continue
18853 }
18854 v.reset(OpMakeTuple)
18855 v0 := b.NewValue0(v.Pos, OpConst32, t.FieldType(0))
18856 v0.AuxInt = int32ToAuxInt(0)
18857 v1 := b.NewValue0(v.Pos, OpConstBool, t.FieldType(1))
18858 v1.AuxInt = boolToAuxInt(false)
18859 v.AddArg2(v0, v1)
18860 return true
18861 }
18862 break
18863 }
18864 return false
18865 }
18866 func rewriteValuegeneric_OpMul64(v *Value) bool {
18867 v_1 := v.Args[1]
18868 v_0 := v.Args[0]
18869 b := v.Block
18870 typ := &b.Func.Config.Types
18871
18872
18873 for {
18874 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18875 if v_0.Op != OpConst64 {
18876 continue
18877 }
18878 c := auxIntToInt64(v_0.AuxInt)
18879 if v_1.Op != OpConst64 {
18880 continue
18881 }
18882 d := auxIntToInt64(v_1.AuxInt)
18883 v.reset(OpConst64)
18884 v.AuxInt = int64ToAuxInt(c * d)
18885 return true
18886 }
18887 break
18888 }
18889
18890
18891 for {
18892 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18893 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 1 {
18894 continue
18895 }
18896 x := v_1
18897 v.copyOf(x)
18898 return true
18899 }
18900 break
18901 }
18902
18903
18904 for {
18905 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18906 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != -1 {
18907 continue
18908 }
18909 x := v_1
18910 v.reset(OpNeg64)
18911 v.AddArg(x)
18912 return true
18913 }
18914 break
18915 }
18916
18917
18918
18919 for {
18920 t := v.Type
18921 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18922 n := v_0
18923 if v_1.Op != OpConst64 {
18924 continue
18925 }
18926 c := auxIntToInt64(v_1.AuxInt)
18927 if !(isPowerOfTwo(c)) {
18928 continue
18929 }
18930 v.reset(OpLsh64x64)
18931 v.Type = t
18932 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
18933 v0.AuxInt = int64ToAuxInt(log64(c))
18934 v.AddArg2(n, v0)
18935 return true
18936 }
18937 break
18938 }
18939
18940
18941
18942 for {
18943 t := v.Type
18944 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18945 n := v_0
18946 if v_1.Op != OpConst64 {
18947 continue
18948 }
18949 c := auxIntToInt64(v_1.AuxInt)
18950 if !(t.IsSigned() && isPowerOfTwo(-c)) {
18951 continue
18952 }
18953 v.reset(OpNeg64)
18954 v0 := b.NewValue0(v.Pos, OpLsh64x64, t)
18955 v1 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
18956 v1.AuxInt = int64ToAuxInt(log64(-c))
18957 v0.AddArg2(n, v1)
18958 v.AddArg(v0)
18959 return true
18960 }
18961 break
18962 }
18963
18964
18965 for {
18966 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18967 if v_0.Op != OpConst64 {
18968 continue
18969 }
18970 t := v_0.Type
18971 c := auxIntToInt64(v_0.AuxInt)
18972 if v_1.Op != OpAdd64 || v_1.Type != t {
18973 continue
18974 }
18975 _ = v_1.Args[1]
18976 v_1_0 := v_1.Args[0]
18977 v_1_1 := v_1.Args[1]
18978 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
18979 if v_1_0.Op != OpConst64 || v_1_0.Type != t {
18980 continue
18981 }
18982 d := auxIntToInt64(v_1_0.AuxInt)
18983 x := v_1_1
18984 v.reset(OpAdd64)
18985 v0 := b.NewValue0(v.Pos, OpConst64, t)
18986 v0.AuxInt = int64ToAuxInt(c * d)
18987 v1 := b.NewValue0(v.Pos, OpMul64, t)
18988 v2 := b.NewValue0(v.Pos, OpConst64, t)
18989 v2.AuxInt = int64ToAuxInt(c)
18990 v1.AddArg2(v2, x)
18991 v.AddArg2(v0, v1)
18992 return true
18993 }
18994 }
18995 break
18996 }
18997
18998
18999 for {
19000 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19001 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
19002 continue
19003 }
19004 v.reset(OpConst64)
19005 v.AuxInt = int64ToAuxInt(0)
19006 return true
19007 }
19008 break
19009 }
19010
19011
19012
19013 for {
19014 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19015 if v_0.Op != OpMul64 {
19016 continue
19017 }
19018 _ = v_0.Args[1]
19019 v_0_0 := v_0.Args[0]
19020 v_0_1 := v_0.Args[1]
19021 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
19022 i := v_0_0
19023 if i.Op != OpConst64 {
19024 continue
19025 }
19026 t := i.Type
19027 z := v_0_1
19028 x := v_1
19029 if !(z.Op != OpConst64 && x.Op != OpConst64) {
19030 continue
19031 }
19032 v.reset(OpMul64)
19033 v0 := b.NewValue0(v.Pos, OpMul64, t)
19034 v0.AddArg2(x, z)
19035 v.AddArg2(i, v0)
19036 return true
19037 }
19038 }
19039 break
19040 }
19041
19042
19043 for {
19044 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19045 if v_0.Op != OpConst64 {
19046 continue
19047 }
19048 t := v_0.Type
19049 c := auxIntToInt64(v_0.AuxInt)
19050 if v_1.Op != OpMul64 {
19051 continue
19052 }
19053 _ = v_1.Args[1]
19054 v_1_0 := v_1.Args[0]
19055 v_1_1 := v_1.Args[1]
19056 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
19057 if v_1_0.Op != OpConst64 || v_1_0.Type != t {
19058 continue
19059 }
19060 d := auxIntToInt64(v_1_0.AuxInt)
19061 x := v_1_1
19062 v.reset(OpMul64)
19063 v0 := b.NewValue0(v.Pos, OpConst64, t)
19064 v0.AuxInt = int64ToAuxInt(c * d)
19065 v.AddArg2(v0, x)
19066 return true
19067 }
19068 }
19069 break
19070 }
19071 return false
19072 }
19073 func rewriteValuegeneric_OpMul64F(v *Value) bool {
19074 v_1 := v.Args[1]
19075 v_0 := v.Args[0]
19076
19077
19078
19079 for {
19080 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19081 if v_0.Op != OpConst64F {
19082 continue
19083 }
19084 c := auxIntToFloat64(v_0.AuxInt)
19085 if v_1.Op != OpConst64F {
19086 continue
19087 }
19088 d := auxIntToFloat64(v_1.AuxInt)
19089 if !(c*d == c*d) {
19090 continue
19091 }
19092 v.reset(OpConst64F)
19093 v.AuxInt = float64ToAuxInt(c * d)
19094 return true
19095 }
19096 break
19097 }
19098
19099
19100 for {
19101 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19102 x := v_0
19103 if v_1.Op != OpConst64F || auxIntToFloat64(v_1.AuxInt) != 1 {
19104 continue
19105 }
19106 v.copyOf(x)
19107 return true
19108 }
19109 break
19110 }
19111
19112
19113 for {
19114 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19115 x := v_0
19116 if v_1.Op != OpConst64F || auxIntToFloat64(v_1.AuxInt) != -1 {
19117 continue
19118 }
19119 v.reset(OpNeg64F)
19120 v.AddArg(x)
19121 return true
19122 }
19123 break
19124 }
19125
19126
19127 for {
19128 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19129 x := v_0
19130 if v_1.Op != OpConst64F || auxIntToFloat64(v_1.AuxInt) != 2 {
19131 continue
19132 }
19133 v.reset(OpAdd64F)
19134 v.AddArg2(x, x)
19135 return true
19136 }
19137 break
19138 }
19139 return false
19140 }
19141 func rewriteValuegeneric_OpMul64uhilo(v *Value) bool {
19142 v_1 := v.Args[1]
19143 v_0 := v.Args[0]
19144 b := v.Block
19145 typ := &b.Func.Config.Types
19146
19147
19148 for {
19149 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19150 if v_0.Op != OpConst64 {
19151 continue
19152 }
19153 c := auxIntToInt64(v_0.AuxInt)
19154 if v_1.Op != OpConst64 {
19155 continue
19156 }
19157 d := auxIntToInt64(v_1.AuxInt)
19158 v.reset(OpMakeTuple)
19159 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
19160 v0.AuxInt = int64ToAuxInt(bitsMulU64(c, d).hi)
19161 v1 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
19162 v1.AuxInt = int64ToAuxInt(bitsMulU64(c, d).lo)
19163 v.AddArg2(v0, v1)
19164 return true
19165 }
19166 break
19167 }
19168 return false
19169 }
19170 func rewriteValuegeneric_OpMul64uover(v *Value) bool {
19171 v_1 := v.Args[1]
19172 v_0 := v.Args[0]
19173 b := v.Block
19174 typ := &b.Func.Config.Types
19175
19176
19177 for {
19178 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19179 if v_0.Op != OpConst64 {
19180 continue
19181 }
19182 c := auxIntToInt64(v_0.AuxInt)
19183 if v_1.Op != OpConst64 {
19184 continue
19185 }
19186 d := auxIntToInt64(v_1.AuxInt)
19187 v.reset(OpMakeTuple)
19188 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
19189 v0.AuxInt = int64ToAuxInt(bitsMulU64(c, d).lo)
19190 v1 := b.NewValue0(v.Pos, OpConstBool, typ.Bool)
19191 v1.AuxInt = boolToAuxInt(bitsMulU64(c, d).hi != 0)
19192 v.AddArg2(v0, v1)
19193 return true
19194 }
19195 break
19196 }
19197
19198
19199 for {
19200 t := v.Type
19201 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19202 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 1 {
19203 continue
19204 }
19205 x := v_1
19206 v.reset(OpMakeTuple)
19207 v0 := b.NewValue0(v.Pos, OpConstBool, t.FieldType(1))
19208 v0.AuxInt = boolToAuxInt(false)
19209 v.AddArg2(x, v0)
19210 return true
19211 }
19212 break
19213 }
19214
19215
19216 for {
19217 t := v.Type
19218 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19219 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
19220 continue
19221 }
19222 v.reset(OpMakeTuple)
19223 v0 := b.NewValue0(v.Pos, OpConst64, t.FieldType(0))
19224 v0.AuxInt = int64ToAuxInt(0)
19225 v1 := b.NewValue0(v.Pos, OpConstBool, t.FieldType(1))
19226 v1.AuxInt = boolToAuxInt(false)
19227 v.AddArg2(v0, v1)
19228 return true
19229 }
19230 break
19231 }
19232 return false
19233 }
19234 func rewriteValuegeneric_OpMul8(v *Value) bool {
19235 v_1 := v.Args[1]
19236 v_0 := v.Args[0]
19237 b := v.Block
19238 typ := &b.Func.Config.Types
19239
19240
19241 for {
19242 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19243 if v_0.Op != OpConst8 {
19244 continue
19245 }
19246 c := auxIntToInt8(v_0.AuxInt)
19247 if v_1.Op != OpConst8 {
19248 continue
19249 }
19250 d := auxIntToInt8(v_1.AuxInt)
19251 v.reset(OpConst8)
19252 v.AuxInt = int8ToAuxInt(c * d)
19253 return true
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) != 1 {
19262 continue
19263 }
19264 x := v_1
19265 v.copyOf(x)
19266 return true
19267 }
19268 break
19269 }
19270
19271
19272 for {
19273 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19274 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != -1 {
19275 continue
19276 }
19277 x := v_1
19278 v.reset(OpNeg8)
19279 v.AddArg(x)
19280 return true
19281 }
19282 break
19283 }
19284
19285
19286
19287 for {
19288 t := v.Type
19289 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19290 n := v_0
19291 if v_1.Op != OpConst8 {
19292 continue
19293 }
19294 c := auxIntToInt8(v_1.AuxInt)
19295 if !(isPowerOfTwo(c)) {
19296 continue
19297 }
19298 v.reset(OpLsh8x64)
19299 v.Type = t
19300 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
19301 v0.AuxInt = int64ToAuxInt(log8(c))
19302 v.AddArg2(n, v0)
19303 return true
19304 }
19305 break
19306 }
19307
19308
19309
19310 for {
19311 t := v.Type
19312 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19313 n := v_0
19314 if v_1.Op != OpConst8 {
19315 continue
19316 }
19317 c := auxIntToInt8(v_1.AuxInt)
19318 if !(t.IsSigned() && isPowerOfTwo(-c)) {
19319 continue
19320 }
19321 v.reset(OpNeg8)
19322 v0 := b.NewValue0(v.Pos, OpLsh8x64, t)
19323 v1 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
19324 v1.AuxInt = int64ToAuxInt(log8(-c))
19325 v0.AddArg2(n, v1)
19326 v.AddArg(v0)
19327 return true
19328 }
19329 break
19330 }
19331
19332
19333 for {
19334 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19335 if v_0.Op != OpConst8 {
19336 continue
19337 }
19338 t := v_0.Type
19339 c := auxIntToInt8(v_0.AuxInt)
19340 if v_1.Op != OpAdd8 || v_1.Type != t {
19341 continue
19342 }
19343 _ = v_1.Args[1]
19344 v_1_0 := v_1.Args[0]
19345 v_1_1 := v_1.Args[1]
19346 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
19347 if v_1_0.Op != OpConst8 || v_1_0.Type != t {
19348 continue
19349 }
19350 d := auxIntToInt8(v_1_0.AuxInt)
19351 x := v_1_1
19352 v.reset(OpAdd8)
19353 v0 := b.NewValue0(v.Pos, OpConst8, t)
19354 v0.AuxInt = int8ToAuxInt(c * d)
19355 v1 := b.NewValue0(v.Pos, OpMul8, t)
19356 v2 := b.NewValue0(v.Pos, OpConst8, t)
19357 v2.AuxInt = int8ToAuxInt(c)
19358 v1.AddArg2(v2, x)
19359 v.AddArg2(v0, v1)
19360 return true
19361 }
19362 }
19363 break
19364 }
19365
19366
19367 for {
19368 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19369 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 {
19370 continue
19371 }
19372 v.reset(OpConst8)
19373 v.AuxInt = int8ToAuxInt(0)
19374 return true
19375 }
19376 break
19377 }
19378
19379
19380
19381 for {
19382 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19383 if v_0.Op != OpMul8 {
19384 continue
19385 }
19386 _ = v_0.Args[1]
19387 v_0_0 := v_0.Args[0]
19388 v_0_1 := v_0.Args[1]
19389 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
19390 i := v_0_0
19391 if i.Op != OpConst8 {
19392 continue
19393 }
19394 t := i.Type
19395 z := v_0_1
19396 x := v_1
19397 if !(z.Op != OpConst8 && x.Op != OpConst8) {
19398 continue
19399 }
19400 v.reset(OpMul8)
19401 v0 := b.NewValue0(v.Pos, OpMul8, t)
19402 v0.AddArg2(x, z)
19403 v.AddArg2(i, v0)
19404 return true
19405 }
19406 }
19407 break
19408 }
19409
19410
19411 for {
19412 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19413 if v_0.Op != OpConst8 {
19414 continue
19415 }
19416 t := v_0.Type
19417 c := auxIntToInt8(v_0.AuxInt)
19418 if v_1.Op != OpMul8 {
19419 continue
19420 }
19421 _ = v_1.Args[1]
19422 v_1_0 := v_1.Args[0]
19423 v_1_1 := v_1.Args[1]
19424 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
19425 if v_1_0.Op != OpConst8 || v_1_0.Type != t {
19426 continue
19427 }
19428 d := auxIntToInt8(v_1_0.AuxInt)
19429 x := v_1_1
19430 v.reset(OpMul8)
19431 v0 := b.NewValue0(v.Pos, OpConst8, t)
19432 v0.AuxInt = int8ToAuxInt(c * d)
19433 v.AddArg2(v0, x)
19434 return true
19435 }
19436 }
19437 break
19438 }
19439 return false
19440 }
19441 func rewriteValuegeneric_OpNeg16(v *Value) bool {
19442 v_0 := v.Args[0]
19443 b := v.Block
19444
19445
19446 for {
19447 if v_0.Op != OpConst16 {
19448 break
19449 }
19450 c := auxIntToInt16(v_0.AuxInt)
19451 v.reset(OpConst16)
19452 v.AuxInt = int16ToAuxInt(-c)
19453 return true
19454 }
19455
19456
19457 for {
19458 if v_0.Op != OpSub16 {
19459 break
19460 }
19461 y := v_0.Args[1]
19462 x := v_0.Args[0]
19463 v.reset(OpSub16)
19464 v.AddArg2(y, x)
19465 return true
19466 }
19467
19468
19469 for {
19470 if v_0.Op != OpNeg16 {
19471 break
19472 }
19473 x := v_0.Args[0]
19474 v.copyOf(x)
19475 return true
19476 }
19477
19478
19479 for {
19480 t := v.Type
19481 if v_0.Op != OpCom16 {
19482 break
19483 }
19484 x := v_0.Args[0]
19485 v.reset(OpAdd16)
19486 v0 := b.NewValue0(v.Pos, OpConst16, t)
19487 v0.AuxInt = int16ToAuxInt(1)
19488 v.AddArg2(v0, x)
19489 return true
19490 }
19491 return false
19492 }
19493 func rewriteValuegeneric_OpNeg32(v *Value) bool {
19494 v_0 := v.Args[0]
19495 b := v.Block
19496
19497
19498 for {
19499 if v_0.Op != OpConst32 {
19500 break
19501 }
19502 c := auxIntToInt32(v_0.AuxInt)
19503 v.reset(OpConst32)
19504 v.AuxInt = int32ToAuxInt(-c)
19505 return true
19506 }
19507
19508
19509 for {
19510 if v_0.Op != OpSub32 {
19511 break
19512 }
19513 y := v_0.Args[1]
19514 x := v_0.Args[0]
19515 v.reset(OpSub32)
19516 v.AddArg2(y, x)
19517 return true
19518 }
19519
19520
19521 for {
19522 if v_0.Op != OpNeg32 {
19523 break
19524 }
19525 x := v_0.Args[0]
19526 v.copyOf(x)
19527 return true
19528 }
19529
19530
19531 for {
19532 t := v.Type
19533 if v_0.Op != OpCom32 {
19534 break
19535 }
19536 x := v_0.Args[0]
19537 v.reset(OpAdd32)
19538 v0 := b.NewValue0(v.Pos, OpConst32, t)
19539 v0.AuxInt = int32ToAuxInt(1)
19540 v.AddArg2(v0, x)
19541 return true
19542 }
19543 return false
19544 }
19545 func rewriteValuegeneric_OpNeg32F(v *Value) bool {
19546 v_0 := v.Args[0]
19547
19548
19549
19550 for {
19551 if v_0.Op != OpConst32F {
19552 break
19553 }
19554 c := auxIntToFloat32(v_0.AuxInt)
19555 if !(c != 0) {
19556 break
19557 }
19558 v.reset(OpConst32F)
19559 v.AuxInt = float32ToAuxInt(-c)
19560 return true
19561 }
19562 return false
19563 }
19564 func rewriteValuegeneric_OpNeg64(v *Value) bool {
19565 v_0 := v.Args[0]
19566 b := v.Block
19567
19568
19569 for {
19570 if v_0.Op != OpConst64 {
19571 break
19572 }
19573 c := auxIntToInt64(v_0.AuxInt)
19574 v.reset(OpConst64)
19575 v.AuxInt = int64ToAuxInt(-c)
19576 return true
19577 }
19578
19579
19580 for {
19581 if v_0.Op != OpSub64 {
19582 break
19583 }
19584 y := v_0.Args[1]
19585 x := v_0.Args[0]
19586 v.reset(OpSub64)
19587 v.AddArg2(y, x)
19588 return true
19589 }
19590
19591
19592 for {
19593 if v_0.Op != OpNeg64 {
19594 break
19595 }
19596 x := v_0.Args[0]
19597 v.copyOf(x)
19598 return true
19599 }
19600
19601
19602 for {
19603 t := v.Type
19604 if v_0.Op != OpCom64 {
19605 break
19606 }
19607 x := v_0.Args[0]
19608 v.reset(OpAdd64)
19609 v0 := b.NewValue0(v.Pos, OpConst64, t)
19610 v0.AuxInt = int64ToAuxInt(1)
19611 v.AddArg2(v0, x)
19612 return true
19613 }
19614 return false
19615 }
19616 func rewriteValuegeneric_OpNeg64F(v *Value) bool {
19617 v_0 := v.Args[0]
19618
19619
19620
19621 for {
19622 if v_0.Op != OpConst64F {
19623 break
19624 }
19625 c := auxIntToFloat64(v_0.AuxInt)
19626 if !(c != 0) {
19627 break
19628 }
19629 v.reset(OpConst64F)
19630 v.AuxInt = float64ToAuxInt(-c)
19631 return true
19632 }
19633 return false
19634 }
19635 func rewriteValuegeneric_OpNeg8(v *Value) bool {
19636 v_0 := v.Args[0]
19637 b := v.Block
19638
19639
19640 for {
19641 if v_0.Op != OpConst8 {
19642 break
19643 }
19644 c := auxIntToInt8(v_0.AuxInt)
19645 v.reset(OpConst8)
19646 v.AuxInt = int8ToAuxInt(-c)
19647 return true
19648 }
19649
19650
19651 for {
19652 if v_0.Op != OpSub8 {
19653 break
19654 }
19655 y := v_0.Args[1]
19656 x := v_0.Args[0]
19657 v.reset(OpSub8)
19658 v.AddArg2(y, x)
19659 return true
19660 }
19661
19662
19663 for {
19664 if v_0.Op != OpNeg8 {
19665 break
19666 }
19667 x := v_0.Args[0]
19668 v.copyOf(x)
19669 return true
19670 }
19671
19672
19673 for {
19674 t := v.Type
19675 if v_0.Op != OpCom8 {
19676 break
19677 }
19678 x := v_0.Args[0]
19679 v.reset(OpAdd8)
19680 v0 := b.NewValue0(v.Pos, OpConst8, t)
19681 v0.AuxInt = int8ToAuxInt(1)
19682 v.AddArg2(v0, x)
19683 return true
19684 }
19685 return false
19686 }
19687 func rewriteValuegeneric_OpNeq16(v *Value) bool {
19688 v_1 := v.Args[1]
19689 v_0 := v.Args[0]
19690 b := v.Block
19691 typ := &b.Func.Config.Types
19692
19693
19694 for {
19695 x := v_0
19696 if x != v_1 {
19697 break
19698 }
19699 v.reset(OpConstBool)
19700 v.AuxInt = boolToAuxInt(false)
19701 return true
19702 }
19703
19704
19705 for {
19706 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19707 if v_0.Op != OpConst16 {
19708 continue
19709 }
19710 t := v_0.Type
19711 c := auxIntToInt16(v_0.AuxInt)
19712 if v_1.Op != OpAdd16 {
19713 continue
19714 }
19715 _ = v_1.Args[1]
19716 v_1_0 := v_1.Args[0]
19717 v_1_1 := v_1.Args[1]
19718 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
19719 if v_1_0.Op != OpConst16 || v_1_0.Type != t {
19720 continue
19721 }
19722 d := auxIntToInt16(v_1_0.AuxInt)
19723 x := v_1_1
19724 v.reset(OpNeq16)
19725 v0 := b.NewValue0(v.Pos, OpConst16, t)
19726 v0.AuxInt = int16ToAuxInt(c - d)
19727 v.AddArg2(v0, x)
19728 return true
19729 }
19730 }
19731 break
19732 }
19733
19734
19735 for {
19736 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19737 if v_0.Op != OpConst16 {
19738 continue
19739 }
19740 c := auxIntToInt16(v_0.AuxInt)
19741 if v_1.Op != OpConst16 {
19742 continue
19743 }
19744 d := auxIntToInt16(v_1.AuxInt)
19745 v.reset(OpConstBool)
19746 v.AuxInt = boolToAuxInt(c != d)
19747 return true
19748 }
19749 break
19750 }
19751
19752
19753
19754 for {
19755 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19756 n := v_0
19757 if v_1.Op != OpLsh16x64 {
19758 continue
19759 }
19760 _ = v_1.Args[1]
19761 v_1_0 := v_1.Args[0]
19762 if v_1_0.Op != OpRsh16x64 {
19763 continue
19764 }
19765 _ = v_1_0.Args[1]
19766 v_1_0_0 := v_1_0.Args[0]
19767 if v_1_0_0.Op != OpAdd16 {
19768 continue
19769 }
19770 t := v_1_0_0.Type
19771 _ = v_1_0_0.Args[1]
19772 v_1_0_0_0 := v_1_0_0.Args[0]
19773 v_1_0_0_1 := v_1_0_0.Args[1]
19774 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 {
19775 if n != v_1_0_0_0 || v_1_0_0_1.Op != OpRsh16Ux64 || v_1_0_0_1.Type != t {
19776 continue
19777 }
19778 _ = v_1_0_0_1.Args[1]
19779 v_1_0_0_1_0 := v_1_0_0_1.Args[0]
19780 if v_1_0_0_1_0.Op != OpRsh16x64 || v_1_0_0_1_0.Type != t {
19781 continue
19782 }
19783 _ = v_1_0_0_1_0.Args[1]
19784 if n != v_1_0_0_1_0.Args[0] {
19785 continue
19786 }
19787 v_1_0_0_1_0_1 := v_1_0_0_1_0.Args[1]
19788 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 {
19789 continue
19790 }
19791 v_1_0_0_1_1 := v_1_0_0_1.Args[1]
19792 if v_1_0_0_1_1.Op != OpConst64 || v_1_0_0_1_1.Type != typ.UInt64 {
19793 continue
19794 }
19795 kbar := auxIntToInt64(v_1_0_0_1_1.AuxInt)
19796 v_1_0_1 := v_1_0.Args[1]
19797 if v_1_0_1.Op != OpConst64 || v_1_0_1.Type != typ.UInt64 {
19798 continue
19799 }
19800 k := auxIntToInt64(v_1_0_1.AuxInt)
19801 v_1_1 := v_1.Args[1]
19802 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) {
19803 continue
19804 }
19805 v.reset(OpNeq16)
19806 v0 := b.NewValue0(v.Pos, OpAnd16, t)
19807 v1 := b.NewValue0(v.Pos, OpConst16, t)
19808 v1.AuxInt = int16ToAuxInt(1<<uint(k) - 1)
19809 v0.AddArg2(n, v1)
19810 v2 := b.NewValue0(v.Pos, OpConst16, t)
19811 v2.AuxInt = int16ToAuxInt(0)
19812 v.AddArg2(v0, v2)
19813 return true
19814 }
19815 }
19816 break
19817 }
19818
19819
19820
19821 for {
19822 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19823 s := v_0
19824 if s.Op != OpSub16 {
19825 continue
19826 }
19827 y := s.Args[1]
19828 x := s.Args[0]
19829 if v_1.Op != OpConst16 || auxIntToInt16(v_1.AuxInt) != 0 || !(s.Uses == 1) {
19830 continue
19831 }
19832 v.reset(OpNeq16)
19833 v.AddArg2(x, y)
19834 return true
19835 }
19836 break
19837 }
19838
19839
19840
19841 for {
19842 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19843 if v_0.Op != OpAnd16 {
19844 continue
19845 }
19846 t := v_0.Type
19847 _ = v_0.Args[1]
19848 v_0_0 := v_0.Args[0]
19849 v_0_1 := v_0.Args[1]
19850 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
19851 x := v_0_0
19852 if v_0_1.Op != OpConst16 || v_0_1.Type != t {
19853 continue
19854 }
19855 y := auxIntToInt16(v_0_1.AuxInt)
19856 if v_1.Op != OpConst16 || v_1.Type != t || auxIntToInt16(v_1.AuxInt) != y || !(oneBit16(y)) {
19857 continue
19858 }
19859 v.reset(OpEq16)
19860 v0 := b.NewValue0(v.Pos, OpAnd16, t)
19861 v1 := b.NewValue0(v.Pos, OpConst16, t)
19862 v1.AuxInt = int16ToAuxInt(y)
19863 v0.AddArg2(x, v1)
19864 v2 := b.NewValue0(v.Pos, OpConst16, t)
19865 v2.AuxInt = int16ToAuxInt(0)
19866 v.AddArg2(v0, v2)
19867 return true
19868 }
19869 }
19870 break
19871 }
19872 return false
19873 }
19874 func rewriteValuegeneric_OpNeq32(v *Value) bool {
19875 v_1 := v.Args[1]
19876 v_0 := v.Args[0]
19877 b := v.Block
19878 typ := &b.Func.Config.Types
19879
19880
19881 for {
19882 x := v_0
19883 if x != v_1 {
19884 break
19885 }
19886 v.reset(OpConstBool)
19887 v.AuxInt = boolToAuxInt(false)
19888 return true
19889 }
19890
19891
19892 for {
19893 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19894 if v_0.Op != OpConst32 {
19895 continue
19896 }
19897 t := v_0.Type
19898 c := auxIntToInt32(v_0.AuxInt)
19899 if v_1.Op != OpAdd32 {
19900 continue
19901 }
19902 _ = v_1.Args[1]
19903 v_1_0 := v_1.Args[0]
19904 v_1_1 := v_1.Args[1]
19905 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
19906 if v_1_0.Op != OpConst32 || v_1_0.Type != t {
19907 continue
19908 }
19909 d := auxIntToInt32(v_1_0.AuxInt)
19910 x := v_1_1
19911 v.reset(OpNeq32)
19912 v0 := b.NewValue0(v.Pos, OpConst32, t)
19913 v0.AuxInt = int32ToAuxInt(c - d)
19914 v.AddArg2(v0, x)
19915 return true
19916 }
19917 }
19918 break
19919 }
19920
19921
19922 for {
19923 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19924 if v_0.Op != OpConst32 {
19925 continue
19926 }
19927 c := auxIntToInt32(v_0.AuxInt)
19928 if v_1.Op != OpConst32 {
19929 continue
19930 }
19931 d := auxIntToInt32(v_1.AuxInt)
19932 v.reset(OpConstBool)
19933 v.AuxInt = boolToAuxInt(c != d)
19934 return true
19935 }
19936 break
19937 }
19938
19939
19940
19941 for {
19942 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19943 n := v_0
19944 if v_1.Op != OpLsh32x64 {
19945 continue
19946 }
19947 _ = v_1.Args[1]
19948 v_1_0 := v_1.Args[0]
19949 if v_1_0.Op != OpRsh32x64 {
19950 continue
19951 }
19952 _ = v_1_0.Args[1]
19953 v_1_0_0 := v_1_0.Args[0]
19954 if v_1_0_0.Op != OpAdd32 {
19955 continue
19956 }
19957 t := v_1_0_0.Type
19958 _ = v_1_0_0.Args[1]
19959 v_1_0_0_0 := v_1_0_0.Args[0]
19960 v_1_0_0_1 := v_1_0_0.Args[1]
19961 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 {
19962 if n != v_1_0_0_0 || v_1_0_0_1.Op != OpRsh32Ux64 || v_1_0_0_1.Type != t {
19963 continue
19964 }
19965 _ = v_1_0_0_1.Args[1]
19966 v_1_0_0_1_0 := v_1_0_0_1.Args[0]
19967 if v_1_0_0_1_0.Op != OpRsh32x64 || v_1_0_0_1_0.Type != t {
19968 continue
19969 }
19970 _ = v_1_0_0_1_0.Args[1]
19971 if n != v_1_0_0_1_0.Args[0] {
19972 continue
19973 }
19974 v_1_0_0_1_0_1 := v_1_0_0_1_0.Args[1]
19975 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 {
19976 continue
19977 }
19978 v_1_0_0_1_1 := v_1_0_0_1.Args[1]
19979 if v_1_0_0_1_1.Op != OpConst64 || v_1_0_0_1_1.Type != typ.UInt64 {
19980 continue
19981 }
19982 kbar := auxIntToInt64(v_1_0_0_1_1.AuxInt)
19983 v_1_0_1 := v_1_0.Args[1]
19984 if v_1_0_1.Op != OpConst64 || v_1_0_1.Type != typ.UInt64 {
19985 continue
19986 }
19987 k := auxIntToInt64(v_1_0_1.AuxInt)
19988 v_1_1 := v_1.Args[1]
19989 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) {
19990 continue
19991 }
19992 v.reset(OpNeq32)
19993 v0 := b.NewValue0(v.Pos, OpAnd32, t)
19994 v1 := b.NewValue0(v.Pos, OpConst32, t)
19995 v1.AuxInt = int32ToAuxInt(1<<uint(k) - 1)
19996 v0.AddArg2(n, v1)
19997 v2 := b.NewValue0(v.Pos, OpConst32, t)
19998 v2.AuxInt = int32ToAuxInt(0)
19999 v.AddArg2(v0, v2)
20000 return true
20001 }
20002 }
20003 break
20004 }
20005
20006
20007
20008 for {
20009 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20010 s := v_0
20011 if s.Op != OpSub32 {
20012 continue
20013 }
20014 y := s.Args[1]
20015 x := s.Args[0]
20016 if v_1.Op != OpConst32 || auxIntToInt32(v_1.AuxInt) != 0 || !(s.Uses == 1) {
20017 continue
20018 }
20019 v.reset(OpNeq32)
20020 v.AddArg2(x, y)
20021 return true
20022 }
20023 break
20024 }
20025
20026
20027
20028 for {
20029 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20030 if v_0.Op != OpAnd32 {
20031 continue
20032 }
20033 t := v_0.Type
20034 _ = v_0.Args[1]
20035 v_0_0 := v_0.Args[0]
20036 v_0_1 := v_0.Args[1]
20037 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
20038 x := v_0_0
20039 if v_0_1.Op != OpConst32 || v_0_1.Type != t {
20040 continue
20041 }
20042 y := auxIntToInt32(v_0_1.AuxInt)
20043 if v_1.Op != OpConst32 || v_1.Type != t || auxIntToInt32(v_1.AuxInt) != y || !(oneBit32(y)) {
20044 continue
20045 }
20046 v.reset(OpEq32)
20047 v0 := b.NewValue0(v.Pos, OpAnd32, t)
20048 v1 := b.NewValue0(v.Pos, OpConst32, t)
20049 v1.AuxInt = int32ToAuxInt(y)
20050 v0.AddArg2(x, v1)
20051 v2 := b.NewValue0(v.Pos, OpConst32, t)
20052 v2.AuxInt = int32ToAuxInt(0)
20053 v.AddArg2(v0, v2)
20054 return true
20055 }
20056 }
20057 break
20058 }
20059 return false
20060 }
20061 func rewriteValuegeneric_OpNeq32F(v *Value) bool {
20062 v_1 := v.Args[1]
20063 v_0 := v.Args[0]
20064
20065
20066 for {
20067 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20068 if v_0.Op != OpConst32F {
20069 continue
20070 }
20071 c := auxIntToFloat32(v_0.AuxInt)
20072 if v_1.Op != OpConst32F {
20073 continue
20074 }
20075 d := auxIntToFloat32(v_1.AuxInt)
20076 v.reset(OpConstBool)
20077 v.AuxInt = boolToAuxInt(c != d)
20078 return true
20079 }
20080 break
20081 }
20082 return false
20083 }
20084 func rewriteValuegeneric_OpNeq64(v *Value) bool {
20085 v_1 := v.Args[1]
20086 v_0 := v.Args[0]
20087 b := v.Block
20088 typ := &b.Func.Config.Types
20089
20090
20091 for {
20092 x := v_0
20093 if x != v_1 {
20094 break
20095 }
20096 v.reset(OpConstBool)
20097 v.AuxInt = boolToAuxInt(false)
20098 return true
20099 }
20100
20101
20102 for {
20103 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20104 if v_0.Op != OpConst64 {
20105 continue
20106 }
20107 t := v_0.Type
20108 c := auxIntToInt64(v_0.AuxInt)
20109 if v_1.Op != OpAdd64 {
20110 continue
20111 }
20112 _ = v_1.Args[1]
20113 v_1_0 := v_1.Args[0]
20114 v_1_1 := v_1.Args[1]
20115 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
20116 if v_1_0.Op != OpConst64 || v_1_0.Type != t {
20117 continue
20118 }
20119 d := auxIntToInt64(v_1_0.AuxInt)
20120 x := v_1_1
20121 v.reset(OpNeq64)
20122 v0 := b.NewValue0(v.Pos, OpConst64, t)
20123 v0.AuxInt = int64ToAuxInt(c - d)
20124 v.AddArg2(v0, x)
20125 return true
20126 }
20127 }
20128 break
20129 }
20130
20131
20132 for {
20133 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20134 if v_0.Op != OpConst64 {
20135 continue
20136 }
20137 c := auxIntToInt64(v_0.AuxInt)
20138 if v_1.Op != OpConst64 {
20139 continue
20140 }
20141 d := auxIntToInt64(v_1.AuxInt)
20142 v.reset(OpConstBool)
20143 v.AuxInt = boolToAuxInt(c != d)
20144 return true
20145 }
20146 break
20147 }
20148
20149
20150
20151 for {
20152 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20153 n := v_0
20154 if v_1.Op != OpLsh64x64 {
20155 continue
20156 }
20157 _ = v_1.Args[1]
20158 v_1_0 := v_1.Args[0]
20159 if v_1_0.Op != OpRsh64x64 {
20160 continue
20161 }
20162 _ = v_1_0.Args[1]
20163 v_1_0_0 := v_1_0.Args[0]
20164 if v_1_0_0.Op != OpAdd64 {
20165 continue
20166 }
20167 t := v_1_0_0.Type
20168 _ = v_1_0_0.Args[1]
20169 v_1_0_0_0 := v_1_0_0.Args[0]
20170 v_1_0_0_1 := v_1_0_0.Args[1]
20171 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 {
20172 if n != v_1_0_0_0 || v_1_0_0_1.Op != OpRsh64Ux64 || v_1_0_0_1.Type != t {
20173 continue
20174 }
20175 _ = v_1_0_0_1.Args[1]
20176 v_1_0_0_1_0 := v_1_0_0_1.Args[0]
20177 if v_1_0_0_1_0.Op != OpRsh64x64 || v_1_0_0_1_0.Type != t {
20178 continue
20179 }
20180 _ = v_1_0_0_1_0.Args[1]
20181 if n != v_1_0_0_1_0.Args[0] {
20182 continue
20183 }
20184 v_1_0_0_1_0_1 := v_1_0_0_1_0.Args[1]
20185 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 {
20186 continue
20187 }
20188 v_1_0_0_1_1 := v_1_0_0_1.Args[1]
20189 if v_1_0_0_1_1.Op != OpConst64 || v_1_0_0_1_1.Type != typ.UInt64 {
20190 continue
20191 }
20192 kbar := auxIntToInt64(v_1_0_0_1_1.AuxInt)
20193 v_1_0_1 := v_1_0.Args[1]
20194 if v_1_0_1.Op != OpConst64 || v_1_0_1.Type != typ.UInt64 {
20195 continue
20196 }
20197 k := auxIntToInt64(v_1_0_1.AuxInt)
20198 v_1_1 := v_1.Args[1]
20199 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) {
20200 continue
20201 }
20202 v.reset(OpNeq64)
20203 v0 := b.NewValue0(v.Pos, OpAnd64, t)
20204 v1 := b.NewValue0(v.Pos, OpConst64, t)
20205 v1.AuxInt = int64ToAuxInt(1<<uint(k) - 1)
20206 v0.AddArg2(n, v1)
20207 v2 := b.NewValue0(v.Pos, OpConst64, t)
20208 v2.AuxInt = int64ToAuxInt(0)
20209 v.AddArg2(v0, v2)
20210 return true
20211 }
20212 }
20213 break
20214 }
20215
20216
20217
20218 for {
20219 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20220 s := v_0
20221 if s.Op != OpSub64 {
20222 continue
20223 }
20224 y := s.Args[1]
20225 x := s.Args[0]
20226 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 0 || !(s.Uses == 1) {
20227 continue
20228 }
20229 v.reset(OpNeq64)
20230 v.AddArg2(x, y)
20231 return true
20232 }
20233 break
20234 }
20235
20236
20237
20238 for {
20239 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20240 if v_0.Op != OpAnd64 {
20241 continue
20242 }
20243 t := v_0.Type
20244 _ = v_0.Args[1]
20245 v_0_0 := v_0.Args[0]
20246 v_0_1 := v_0.Args[1]
20247 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
20248 x := v_0_0
20249 if v_0_1.Op != OpConst64 || v_0_1.Type != t {
20250 continue
20251 }
20252 y := auxIntToInt64(v_0_1.AuxInt)
20253 if v_1.Op != OpConst64 || v_1.Type != t || auxIntToInt64(v_1.AuxInt) != y || !(oneBit64(y)) {
20254 continue
20255 }
20256 v.reset(OpEq64)
20257 v0 := b.NewValue0(v.Pos, OpAnd64, t)
20258 v1 := b.NewValue0(v.Pos, OpConst64, t)
20259 v1.AuxInt = int64ToAuxInt(y)
20260 v0.AddArg2(x, v1)
20261 v2 := b.NewValue0(v.Pos, OpConst64, t)
20262 v2.AuxInt = int64ToAuxInt(0)
20263 v.AddArg2(v0, v2)
20264 return true
20265 }
20266 }
20267 break
20268 }
20269 return false
20270 }
20271 func rewriteValuegeneric_OpNeq64F(v *Value) bool {
20272 v_1 := v.Args[1]
20273 v_0 := v.Args[0]
20274
20275
20276 for {
20277 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20278 if v_0.Op != OpConst64F {
20279 continue
20280 }
20281 c := auxIntToFloat64(v_0.AuxInt)
20282 if v_1.Op != OpConst64F {
20283 continue
20284 }
20285 d := auxIntToFloat64(v_1.AuxInt)
20286 v.reset(OpConstBool)
20287 v.AuxInt = boolToAuxInt(c != d)
20288 return true
20289 }
20290 break
20291 }
20292 return false
20293 }
20294 func rewriteValuegeneric_OpNeq8(v *Value) bool {
20295 v_1 := v.Args[1]
20296 v_0 := v.Args[0]
20297 b := v.Block
20298 typ := &b.Func.Config.Types
20299
20300
20301 for {
20302 x := v_0
20303 if x != v_1 {
20304 break
20305 }
20306 v.reset(OpConstBool)
20307 v.AuxInt = boolToAuxInt(false)
20308 return true
20309 }
20310
20311
20312 for {
20313 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20314 if v_0.Op != OpConst8 {
20315 continue
20316 }
20317 t := v_0.Type
20318 c := auxIntToInt8(v_0.AuxInt)
20319 if v_1.Op != OpAdd8 {
20320 continue
20321 }
20322 _ = v_1.Args[1]
20323 v_1_0 := v_1.Args[0]
20324 v_1_1 := v_1.Args[1]
20325 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
20326 if v_1_0.Op != OpConst8 || v_1_0.Type != t {
20327 continue
20328 }
20329 d := auxIntToInt8(v_1_0.AuxInt)
20330 x := v_1_1
20331 v.reset(OpNeq8)
20332 v0 := b.NewValue0(v.Pos, OpConst8, t)
20333 v0.AuxInt = int8ToAuxInt(c - d)
20334 v.AddArg2(v0, x)
20335 return true
20336 }
20337 }
20338 break
20339 }
20340
20341
20342 for {
20343 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20344 if v_0.Op != OpConst8 {
20345 continue
20346 }
20347 c := auxIntToInt8(v_0.AuxInt)
20348 if v_1.Op != OpConst8 {
20349 continue
20350 }
20351 d := auxIntToInt8(v_1.AuxInt)
20352 v.reset(OpConstBool)
20353 v.AuxInt = boolToAuxInt(c != d)
20354 return true
20355 }
20356 break
20357 }
20358
20359
20360
20361 for {
20362 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20363 n := v_0
20364 if v_1.Op != OpLsh8x64 {
20365 continue
20366 }
20367 _ = v_1.Args[1]
20368 v_1_0 := v_1.Args[0]
20369 if v_1_0.Op != OpRsh8x64 {
20370 continue
20371 }
20372 _ = v_1_0.Args[1]
20373 v_1_0_0 := v_1_0.Args[0]
20374 if v_1_0_0.Op != OpAdd8 {
20375 continue
20376 }
20377 t := v_1_0_0.Type
20378 _ = v_1_0_0.Args[1]
20379 v_1_0_0_0 := v_1_0_0.Args[0]
20380 v_1_0_0_1 := v_1_0_0.Args[1]
20381 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 {
20382 if n != v_1_0_0_0 || v_1_0_0_1.Op != OpRsh8Ux64 || v_1_0_0_1.Type != t {
20383 continue
20384 }
20385 _ = v_1_0_0_1.Args[1]
20386 v_1_0_0_1_0 := v_1_0_0_1.Args[0]
20387 if v_1_0_0_1_0.Op != OpRsh8x64 || v_1_0_0_1_0.Type != t {
20388 continue
20389 }
20390 _ = v_1_0_0_1_0.Args[1]
20391 if n != v_1_0_0_1_0.Args[0] {
20392 continue
20393 }
20394 v_1_0_0_1_0_1 := v_1_0_0_1_0.Args[1]
20395 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 {
20396 continue
20397 }
20398 v_1_0_0_1_1 := v_1_0_0_1.Args[1]
20399 if v_1_0_0_1_1.Op != OpConst64 || v_1_0_0_1_1.Type != typ.UInt64 {
20400 continue
20401 }
20402 kbar := auxIntToInt64(v_1_0_0_1_1.AuxInt)
20403 v_1_0_1 := v_1_0.Args[1]
20404 if v_1_0_1.Op != OpConst64 || v_1_0_1.Type != typ.UInt64 {
20405 continue
20406 }
20407 k := auxIntToInt64(v_1_0_1.AuxInt)
20408 v_1_1 := v_1.Args[1]
20409 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) {
20410 continue
20411 }
20412 v.reset(OpNeq8)
20413 v0 := b.NewValue0(v.Pos, OpAnd8, t)
20414 v1 := b.NewValue0(v.Pos, OpConst8, t)
20415 v1.AuxInt = int8ToAuxInt(1<<uint(k) - 1)
20416 v0.AddArg2(n, v1)
20417 v2 := b.NewValue0(v.Pos, OpConst8, t)
20418 v2.AuxInt = int8ToAuxInt(0)
20419 v.AddArg2(v0, v2)
20420 return true
20421 }
20422 }
20423 break
20424 }
20425
20426
20427
20428 for {
20429 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20430 s := v_0
20431 if s.Op != OpSub8 {
20432 continue
20433 }
20434 y := s.Args[1]
20435 x := s.Args[0]
20436 if v_1.Op != OpConst8 || auxIntToInt8(v_1.AuxInt) != 0 || !(s.Uses == 1) {
20437 continue
20438 }
20439 v.reset(OpNeq8)
20440 v.AddArg2(x, y)
20441 return true
20442 }
20443 break
20444 }
20445
20446
20447
20448 for {
20449 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20450 if v_0.Op != OpAnd8 {
20451 continue
20452 }
20453 t := v_0.Type
20454 _ = v_0.Args[1]
20455 v_0_0 := v_0.Args[0]
20456 v_0_1 := v_0.Args[1]
20457 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
20458 x := v_0_0
20459 if v_0_1.Op != OpConst8 || v_0_1.Type != t {
20460 continue
20461 }
20462 y := auxIntToInt8(v_0_1.AuxInt)
20463 if v_1.Op != OpConst8 || v_1.Type != t || auxIntToInt8(v_1.AuxInt) != y || !(oneBit8(y)) {
20464 continue
20465 }
20466 v.reset(OpEq8)
20467 v0 := b.NewValue0(v.Pos, OpAnd8, t)
20468 v1 := b.NewValue0(v.Pos, OpConst8, t)
20469 v1.AuxInt = int8ToAuxInt(y)
20470 v0.AddArg2(x, v1)
20471 v2 := b.NewValue0(v.Pos, OpConst8, t)
20472 v2.AuxInt = int8ToAuxInt(0)
20473 v.AddArg2(v0, v2)
20474 return true
20475 }
20476 }
20477 break
20478 }
20479 return false
20480 }
20481 func rewriteValuegeneric_OpNeqB(v *Value) bool {
20482 v_1 := v.Args[1]
20483 v_0 := v.Args[0]
20484
20485
20486 for {
20487 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20488 if v_0.Op != OpConstBool {
20489 continue
20490 }
20491 c := auxIntToBool(v_0.AuxInt)
20492 if v_1.Op != OpConstBool {
20493 continue
20494 }
20495 d := auxIntToBool(v_1.AuxInt)
20496 v.reset(OpConstBool)
20497 v.AuxInt = boolToAuxInt(c != d)
20498 return true
20499 }
20500 break
20501 }
20502
20503
20504 for {
20505 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20506 if v_0.Op != OpConstBool || auxIntToBool(v_0.AuxInt) != false {
20507 continue
20508 }
20509 x := v_1
20510 v.copyOf(x)
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 != OpConstBool || auxIntToBool(v_0.AuxInt) != true {
20520 continue
20521 }
20522 x := v_1
20523 v.reset(OpNot)
20524 v.AddArg(x)
20525 return true
20526 }
20527 break
20528 }
20529
20530
20531 for {
20532 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20533 if v_0.Op != OpNot {
20534 continue
20535 }
20536 x := v_0.Args[0]
20537 if v_1.Op != OpNot {
20538 continue
20539 }
20540 y := v_1.Args[0]
20541 v.reset(OpNeqB)
20542 v.AddArg2(x, y)
20543 return true
20544 }
20545 break
20546 }
20547 return false
20548 }
20549 func rewriteValuegeneric_OpNeqInter(v *Value) bool {
20550 v_1 := v.Args[1]
20551 v_0 := v.Args[0]
20552 b := v.Block
20553 typ := &b.Func.Config.Types
20554
20555
20556 for {
20557 x := v_0
20558 y := v_1
20559 v.reset(OpNeqPtr)
20560 v0 := b.NewValue0(v.Pos, OpITab, typ.Uintptr)
20561 v0.AddArg(x)
20562 v1 := b.NewValue0(v.Pos, OpITab, typ.Uintptr)
20563 v1.AddArg(y)
20564 v.AddArg2(v0, v1)
20565 return true
20566 }
20567 }
20568 func rewriteValuegeneric_OpNeqPtr(v *Value) bool {
20569 v_1 := v.Args[1]
20570 v_0 := v.Args[0]
20571
20572
20573 for {
20574 x := v_0
20575 if x != v_1 {
20576 break
20577 }
20578 v.reset(OpConstBool)
20579 v.AuxInt = boolToAuxInt(false)
20580 return true
20581 }
20582
20583
20584 for {
20585 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20586 if v_0.Op != OpAddr {
20587 continue
20588 }
20589 x := auxToSym(v_0.Aux)
20590 if v_1.Op != OpAddr {
20591 continue
20592 }
20593 y := auxToSym(v_1.Aux)
20594 v.reset(OpConstBool)
20595 v.AuxInt = boolToAuxInt(x != y)
20596 return true
20597 }
20598 break
20599 }
20600
20601
20602 for {
20603 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20604 if v_0.Op != OpAddr {
20605 continue
20606 }
20607 x := auxToSym(v_0.Aux)
20608 if v_1.Op != OpOffPtr {
20609 continue
20610 }
20611 o := auxIntToInt64(v_1.AuxInt)
20612 v_1_0 := v_1.Args[0]
20613 if v_1_0.Op != OpAddr {
20614 continue
20615 }
20616 y := auxToSym(v_1_0.Aux)
20617 v.reset(OpConstBool)
20618 v.AuxInt = boolToAuxInt(x != y || o != 0)
20619 return true
20620 }
20621 break
20622 }
20623
20624
20625 for {
20626 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20627 if v_0.Op != OpOffPtr {
20628 continue
20629 }
20630 o1 := auxIntToInt64(v_0.AuxInt)
20631 v_0_0 := v_0.Args[0]
20632 if v_0_0.Op != OpAddr {
20633 continue
20634 }
20635 x := auxToSym(v_0_0.Aux)
20636 if v_1.Op != OpOffPtr {
20637 continue
20638 }
20639 o2 := auxIntToInt64(v_1.AuxInt)
20640 v_1_0 := v_1.Args[0]
20641 if v_1_0.Op != OpAddr {
20642 continue
20643 }
20644 y := auxToSym(v_1_0.Aux)
20645 v.reset(OpConstBool)
20646 v.AuxInt = boolToAuxInt(x != y || o1 != o2)
20647 return true
20648 }
20649 break
20650 }
20651
20652
20653 for {
20654 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20655 if v_0.Op != OpLocalAddr {
20656 continue
20657 }
20658 x := auxToSym(v_0.Aux)
20659 if v_1.Op != OpLocalAddr {
20660 continue
20661 }
20662 y := auxToSym(v_1.Aux)
20663 v.reset(OpConstBool)
20664 v.AuxInt = boolToAuxInt(x != y)
20665 return true
20666 }
20667 break
20668 }
20669
20670
20671 for {
20672 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20673 if v_0.Op != OpLocalAddr {
20674 continue
20675 }
20676 x := auxToSym(v_0.Aux)
20677 if v_1.Op != OpOffPtr {
20678 continue
20679 }
20680 o := auxIntToInt64(v_1.AuxInt)
20681 v_1_0 := v_1.Args[0]
20682 if v_1_0.Op != OpLocalAddr {
20683 continue
20684 }
20685 y := auxToSym(v_1_0.Aux)
20686 v.reset(OpConstBool)
20687 v.AuxInt = boolToAuxInt(x != y || o != 0)
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 != OpOffPtr {
20697 continue
20698 }
20699 o1 := auxIntToInt64(v_0.AuxInt)
20700 v_0_0 := v_0.Args[0]
20701 if v_0_0.Op != OpLocalAddr {
20702 continue
20703 }
20704 x := auxToSym(v_0_0.Aux)
20705 if v_1.Op != OpOffPtr {
20706 continue
20707 }
20708 o2 := auxIntToInt64(v_1.AuxInt)
20709 v_1_0 := v_1.Args[0]
20710 if v_1_0.Op != OpLocalAddr {
20711 continue
20712 }
20713 y := auxToSym(v_1_0.Aux)
20714 v.reset(OpConstBool)
20715 v.AuxInt = boolToAuxInt(x != y || o1 != o2)
20716 return true
20717 }
20718 break
20719 }
20720
20721
20722
20723 for {
20724 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20725 if v_0.Op != OpOffPtr {
20726 continue
20727 }
20728 o1 := auxIntToInt64(v_0.AuxInt)
20729 p1 := v_0.Args[0]
20730 p2 := v_1
20731 if !(isSamePtr(p1, p2)) {
20732 continue
20733 }
20734 v.reset(OpConstBool)
20735 v.AuxInt = boolToAuxInt(o1 != 0)
20736 return true
20737 }
20738 break
20739 }
20740
20741
20742
20743 for {
20744 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20745 if v_0.Op != OpOffPtr {
20746 continue
20747 }
20748 o1 := auxIntToInt64(v_0.AuxInt)
20749 p1 := v_0.Args[0]
20750 if v_1.Op != OpOffPtr {
20751 continue
20752 }
20753 o2 := auxIntToInt64(v_1.AuxInt)
20754 p2 := v_1.Args[0]
20755 if !(isSamePtr(p1, p2)) {
20756 continue
20757 }
20758 v.reset(OpConstBool)
20759 v.AuxInt = boolToAuxInt(o1 != o2)
20760 return true
20761 }
20762 break
20763 }
20764
20765
20766 for {
20767 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20768 if v_0.Op != OpConst32 {
20769 continue
20770 }
20771 c := auxIntToInt32(v_0.AuxInt)
20772 if v_1.Op != OpConst32 {
20773 continue
20774 }
20775 d := auxIntToInt32(v_1.AuxInt)
20776 v.reset(OpConstBool)
20777 v.AuxInt = boolToAuxInt(c != d)
20778 return true
20779 }
20780 break
20781 }
20782
20783
20784 for {
20785 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20786 if v_0.Op != OpConst64 {
20787 continue
20788 }
20789 c := auxIntToInt64(v_0.AuxInt)
20790 if v_1.Op != OpConst64 {
20791 continue
20792 }
20793 d := auxIntToInt64(v_1.AuxInt)
20794 v.reset(OpConstBool)
20795 v.AuxInt = boolToAuxInt(c != d)
20796 return true
20797 }
20798 break
20799 }
20800
20801
20802 for {
20803 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20804 if v_0.Op != OpConvert {
20805 continue
20806 }
20807 v_0_0 := v_0.Args[0]
20808 if v_0_0.Op != OpAddr {
20809 continue
20810 }
20811 x := auxToSym(v_0_0.Aux)
20812 if v_1.Op != OpAddr {
20813 continue
20814 }
20815 y := auxToSym(v_1.Aux)
20816 v.reset(OpConstBool)
20817 v.AuxInt = boolToAuxInt(x != y)
20818 return true
20819 }
20820 break
20821 }
20822
20823
20824 for {
20825 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20826 if v_0.Op != OpLocalAddr || v_1.Op != OpAddr {
20827 continue
20828 }
20829 v.reset(OpConstBool)
20830 v.AuxInt = boolToAuxInt(true)
20831 return true
20832 }
20833 break
20834 }
20835
20836
20837 for {
20838 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20839 if v_0.Op != OpOffPtr {
20840 continue
20841 }
20842 v_0_0 := v_0.Args[0]
20843 if v_0_0.Op != OpLocalAddr || v_1.Op != OpAddr {
20844 continue
20845 }
20846 v.reset(OpConstBool)
20847 v.AuxInt = boolToAuxInt(true)
20848 return true
20849 }
20850 break
20851 }
20852
20853
20854 for {
20855 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20856 if v_0.Op != OpLocalAddr || v_1.Op != OpOffPtr {
20857 continue
20858 }
20859 v_1_0 := v_1.Args[0]
20860 if v_1_0.Op != OpAddr {
20861 continue
20862 }
20863 v.reset(OpConstBool)
20864 v.AuxInt = boolToAuxInt(true)
20865 return true
20866 }
20867 break
20868 }
20869
20870
20871 for {
20872 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20873 if v_0.Op != OpOffPtr {
20874 continue
20875 }
20876 v_0_0 := v_0.Args[0]
20877 if v_0_0.Op != OpLocalAddr || v_1.Op != OpOffPtr {
20878 continue
20879 }
20880 v_1_0 := v_1.Args[0]
20881 if v_1_0.Op != OpAddr {
20882 continue
20883 }
20884 v.reset(OpConstBool)
20885 v.AuxInt = boolToAuxInt(true)
20886 return true
20887 }
20888 break
20889 }
20890
20891
20892
20893 for {
20894 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20895 if v_0.Op != OpAddPtr {
20896 continue
20897 }
20898 o1 := v_0.Args[1]
20899 p1 := v_0.Args[0]
20900 p2 := v_1
20901 if !(isSamePtr(p1, p2)) {
20902 continue
20903 }
20904 v.reset(OpIsNonNil)
20905 v.AddArg(o1)
20906 return true
20907 }
20908 break
20909 }
20910
20911
20912 for {
20913 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20914 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
20915 continue
20916 }
20917 p := v_1
20918 v.reset(OpIsNonNil)
20919 v.AddArg(p)
20920 return true
20921 }
20922 break
20923 }
20924
20925
20926 for {
20927 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20928 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
20929 continue
20930 }
20931 p := v_1
20932 v.reset(OpIsNonNil)
20933 v.AddArg(p)
20934 return true
20935 }
20936 break
20937 }
20938
20939
20940 for {
20941 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20942 if v_0.Op != OpConstNil {
20943 continue
20944 }
20945 p := v_1
20946 v.reset(OpIsNonNil)
20947 v.AddArg(p)
20948 return true
20949 }
20950 break
20951 }
20952 return false
20953 }
20954 func rewriteValuegeneric_OpNeqSlice(v *Value) bool {
20955 v_1 := v.Args[1]
20956 v_0 := v.Args[0]
20957 b := v.Block
20958 typ := &b.Func.Config.Types
20959
20960
20961 for {
20962 x := v_0
20963 y := v_1
20964 v.reset(OpNeqPtr)
20965 v0 := b.NewValue0(v.Pos, OpSlicePtr, typ.BytePtr)
20966 v0.AddArg(x)
20967 v1 := b.NewValue0(v.Pos, OpSlicePtr, typ.BytePtr)
20968 v1.AddArg(y)
20969 v.AddArg2(v0, v1)
20970 return true
20971 }
20972 }
20973 func rewriteValuegeneric_OpNilCheck(v *Value) bool {
20974 v_1 := v.Args[1]
20975 v_0 := v.Args[0]
20976 b := v.Block
20977 fe := b.Func.fe
20978
20979
20980 for {
20981 ptr := v_0
20982 if ptr.Op != OpGetG {
20983 break
20984 }
20985 mem := ptr.Args[0]
20986 if mem != v_1 {
20987 break
20988 }
20989 v.copyOf(ptr)
20990 return true
20991 }
20992
20993
20994
20995 for {
20996 ptr := v_0
20997 if ptr.Op != OpSelectN || auxIntToInt64(ptr.AuxInt) != 0 {
20998 break
20999 }
21000 call := ptr.Args[0]
21001 if call.Op != OpStaticLECall || len(call.Args) != 2 || !(isSameCall(call.Aux, "runtime.newobject") && warnRule(fe.Debug_checknil(), v, "removed nil check")) {
21002 break
21003 }
21004 v.copyOf(ptr)
21005 return true
21006 }
21007
21008
21009
21010 for {
21011 ptr := v_0
21012 if ptr.Op != OpOffPtr {
21013 break
21014 }
21015 ptr_0 := ptr.Args[0]
21016 if ptr_0.Op != OpSelectN || auxIntToInt64(ptr_0.AuxInt) != 0 {
21017 break
21018 }
21019 call := ptr_0.Args[0]
21020 if call.Op != OpStaticLECall || len(call.Args) != 2 || !(isSameCall(call.Aux, "runtime.newobject") && warnRule(fe.Debug_checknil(), v, "removed nil check")) {
21021 break
21022 }
21023 v.copyOf(ptr)
21024 return true
21025 }
21026
21027
21028 for {
21029 ptr := v_0
21030 if ptr.Op != OpAddr {
21031 break
21032 }
21033 ptr_0 := ptr.Args[0]
21034 if ptr_0.Op != OpSB {
21035 break
21036 }
21037 v.copyOf(ptr)
21038 return true
21039 }
21040
21041
21042 for {
21043 ptr := v_0
21044 if ptr.Op != OpConvert {
21045 break
21046 }
21047 ptr_0 := ptr.Args[0]
21048 if ptr_0.Op != OpAddr {
21049 break
21050 }
21051 ptr_0_0 := ptr_0.Args[0]
21052 if ptr_0_0.Op != OpSB {
21053 break
21054 }
21055 v.copyOf(ptr)
21056 return true
21057 }
21058
21059
21060
21061 for {
21062 ptr := v_0
21063 if ptr.Op != OpLocalAddr || !(warnRule(fe.Debug_checknil(), v, "removed nil check")) {
21064 break
21065 }
21066 v.copyOf(ptr)
21067 return true
21068 }
21069
21070
21071 for {
21072 ptr := v_0
21073 if ptr.Op != OpNilCheck {
21074 break
21075 }
21076 v.copyOf(ptr)
21077 return true
21078 }
21079 return false
21080 }
21081 func rewriteValuegeneric_OpNot(v *Value) bool {
21082 v_0 := v.Args[0]
21083
21084
21085 for {
21086 if v_0.Op != OpConstBool {
21087 break
21088 }
21089 c := auxIntToBool(v_0.AuxInt)
21090 v.reset(OpConstBool)
21091 v.AuxInt = boolToAuxInt(!c)
21092 return true
21093 }
21094
21095
21096 for {
21097 if v_0.Op != OpEq64 {
21098 break
21099 }
21100 y := v_0.Args[1]
21101 x := v_0.Args[0]
21102 v.reset(OpNeq64)
21103 v.AddArg2(x, y)
21104 return true
21105 }
21106
21107
21108 for {
21109 if v_0.Op != OpEq32 {
21110 break
21111 }
21112 y := v_0.Args[1]
21113 x := v_0.Args[0]
21114 v.reset(OpNeq32)
21115 v.AddArg2(x, y)
21116 return true
21117 }
21118
21119
21120 for {
21121 if v_0.Op != OpEq16 {
21122 break
21123 }
21124 y := v_0.Args[1]
21125 x := v_0.Args[0]
21126 v.reset(OpNeq16)
21127 v.AddArg2(x, y)
21128 return true
21129 }
21130
21131
21132 for {
21133 if v_0.Op != OpEq8 {
21134 break
21135 }
21136 y := v_0.Args[1]
21137 x := v_0.Args[0]
21138 v.reset(OpNeq8)
21139 v.AddArg2(x, y)
21140 return true
21141 }
21142
21143
21144 for {
21145 if v_0.Op != OpEqB {
21146 break
21147 }
21148 y := v_0.Args[1]
21149 x := v_0.Args[0]
21150 v.reset(OpNeqB)
21151 v.AddArg2(x, y)
21152 return true
21153 }
21154
21155
21156 for {
21157 if v_0.Op != OpEqPtr {
21158 break
21159 }
21160 y := v_0.Args[1]
21161 x := v_0.Args[0]
21162 v.reset(OpNeqPtr)
21163 v.AddArg2(x, y)
21164 return true
21165 }
21166
21167
21168 for {
21169 if v_0.Op != OpEq64F {
21170 break
21171 }
21172 y := v_0.Args[1]
21173 x := v_0.Args[0]
21174 v.reset(OpNeq64F)
21175 v.AddArg2(x, y)
21176 return true
21177 }
21178
21179
21180 for {
21181 if v_0.Op != OpEq32F {
21182 break
21183 }
21184 y := v_0.Args[1]
21185 x := v_0.Args[0]
21186 v.reset(OpNeq32F)
21187 v.AddArg2(x, y)
21188 return true
21189 }
21190
21191
21192 for {
21193 if v_0.Op != OpNeq64 {
21194 break
21195 }
21196 y := v_0.Args[1]
21197 x := v_0.Args[0]
21198 v.reset(OpEq64)
21199 v.AddArg2(x, y)
21200 return true
21201 }
21202
21203
21204 for {
21205 if v_0.Op != OpNeq32 {
21206 break
21207 }
21208 y := v_0.Args[1]
21209 x := v_0.Args[0]
21210 v.reset(OpEq32)
21211 v.AddArg2(x, y)
21212 return true
21213 }
21214
21215
21216 for {
21217 if v_0.Op != OpNeq16 {
21218 break
21219 }
21220 y := v_0.Args[1]
21221 x := v_0.Args[0]
21222 v.reset(OpEq16)
21223 v.AddArg2(x, y)
21224 return true
21225 }
21226
21227
21228 for {
21229 if v_0.Op != OpNeq8 {
21230 break
21231 }
21232 y := v_0.Args[1]
21233 x := v_0.Args[0]
21234 v.reset(OpEq8)
21235 v.AddArg2(x, y)
21236 return true
21237 }
21238
21239
21240 for {
21241 if v_0.Op != OpNeqB {
21242 break
21243 }
21244 y := v_0.Args[1]
21245 x := v_0.Args[0]
21246 v.reset(OpEqB)
21247 v.AddArg2(x, y)
21248 return true
21249 }
21250
21251
21252 for {
21253 if v_0.Op != OpNeqPtr {
21254 break
21255 }
21256 y := v_0.Args[1]
21257 x := v_0.Args[0]
21258 v.reset(OpEqPtr)
21259 v.AddArg2(x, y)
21260 return true
21261 }
21262
21263
21264 for {
21265 if v_0.Op != OpNeq64F {
21266 break
21267 }
21268 y := v_0.Args[1]
21269 x := v_0.Args[0]
21270 v.reset(OpEq64F)
21271 v.AddArg2(x, y)
21272 return true
21273 }
21274
21275
21276 for {
21277 if v_0.Op != OpNeq32F {
21278 break
21279 }
21280 y := v_0.Args[1]
21281 x := v_0.Args[0]
21282 v.reset(OpEq32F)
21283 v.AddArg2(x, y)
21284 return true
21285 }
21286
21287
21288 for {
21289 if v_0.Op != OpLess64 {
21290 break
21291 }
21292 y := v_0.Args[1]
21293 x := v_0.Args[0]
21294 v.reset(OpLeq64)
21295 v.AddArg2(y, x)
21296 return true
21297 }
21298
21299
21300 for {
21301 if v_0.Op != OpLess32 {
21302 break
21303 }
21304 y := v_0.Args[1]
21305 x := v_0.Args[0]
21306 v.reset(OpLeq32)
21307 v.AddArg2(y, x)
21308 return true
21309 }
21310
21311
21312 for {
21313 if v_0.Op != OpLess16 {
21314 break
21315 }
21316 y := v_0.Args[1]
21317 x := v_0.Args[0]
21318 v.reset(OpLeq16)
21319 v.AddArg2(y, x)
21320 return true
21321 }
21322
21323
21324 for {
21325 if v_0.Op != OpLess8 {
21326 break
21327 }
21328 y := v_0.Args[1]
21329 x := v_0.Args[0]
21330 v.reset(OpLeq8)
21331 v.AddArg2(y, x)
21332 return true
21333 }
21334
21335
21336 for {
21337 if v_0.Op != OpLess64U {
21338 break
21339 }
21340 y := v_0.Args[1]
21341 x := v_0.Args[0]
21342 v.reset(OpLeq64U)
21343 v.AddArg2(y, x)
21344 return true
21345 }
21346
21347
21348 for {
21349 if v_0.Op != OpLess32U {
21350 break
21351 }
21352 y := v_0.Args[1]
21353 x := v_0.Args[0]
21354 v.reset(OpLeq32U)
21355 v.AddArg2(y, x)
21356 return true
21357 }
21358
21359
21360 for {
21361 if v_0.Op != OpLess16U {
21362 break
21363 }
21364 y := v_0.Args[1]
21365 x := v_0.Args[0]
21366 v.reset(OpLeq16U)
21367 v.AddArg2(y, x)
21368 return true
21369 }
21370
21371
21372 for {
21373 if v_0.Op != OpLess8U {
21374 break
21375 }
21376 y := v_0.Args[1]
21377 x := v_0.Args[0]
21378 v.reset(OpLeq8U)
21379 v.AddArg2(y, x)
21380 return true
21381 }
21382
21383
21384 for {
21385 if v_0.Op != OpLeq64 {
21386 break
21387 }
21388 y := v_0.Args[1]
21389 x := v_0.Args[0]
21390 v.reset(OpLess64)
21391 v.AddArg2(y, x)
21392 return true
21393 }
21394
21395
21396 for {
21397 if v_0.Op != OpLeq32 {
21398 break
21399 }
21400 y := v_0.Args[1]
21401 x := v_0.Args[0]
21402 v.reset(OpLess32)
21403 v.AddArg2(y, x)
21404 return true
21405 }
21406
21407
21408 for {
21409 if v_0.Op != OpLeq16 {
21410 break
21411 }
21412 y := v_0.Args[1]
21413 x := v_0.Args[0]
21414 v.reset(OpLess16)
21415 v.AddArg2(y, x)
21416 return true
21417 }
21418
21419
21420 for {
21421 if v_0.Op != OpLeq8 {
21422 break
21423 }
21424 y := v_0.Args[1]
21425 x := v_0.Args[0]
21426 v.reset(OpLess8)
21427 v.AddArg2(y, x)
21428 return true
21429 }
21430
21431
21432 for {
21433 if v_0.Op != OpLeq64U {
21434 break
21435 }
21436 y := v_0.Args[1]
21437 x := v_0.Args[0]
21438 v.reset(OpLess64U)
21439 v.AddArg2(y, x)
21440 return true
21441 }
21442
21443
21444 for {
21445 if v_0.Op != OpLeq32U {
21446 break
21447 }
21448 y := v_0.Args[1]
21449 x := v_0.Args[0]
21450 v.reset(OpLess32U)
21451 v.AddArg2(y, x)
21452 return true
21453 }
21454
21455
21456 for {
21457 if v_0.Op != OpLeq16U {
21458 break
21459 }
21460 y := v_0.Args[1]
21461 x := v_0.Args[0]
21462 v.reset(OpLess16U)
21463 v.AddArg2(y, x)
21464 return true
21465 }
21466
21467
21468 for {
21469 if v_0.Op != OpLeq8U {
21470 break
21471 }
21472 y := v_0.Args[1]
21473 x := v_0.Args[0]
21474 v.reset(OpLess8U)
21475 v.AddArg2(y, x)
21476 return true
21477 }
21478 return false
21479 }
21480 func rewriteValuegeneric_OpOffPtr(v *Value) bool {
21481 v_0 := v.Args[0]
21482
21483
21484 for {
21485 x := auxIntToInt64(v.AuxInt)
21486 if v_0.Op != OpOffPtr {
21487 break
21488 }
21489 y := auxIntToInt64(v_0.AuxInt)
21490 p := v_0.Args[0]
21491 v.reset(OpOffPtr)
21492 v.AuxInt = int64ToAuxInt(x + y)
21493 v.AddArg(p)
21494 return true
21495 }
21496
21497
21498
21499 for {
21500 if auxIntToInt64(v.AuxInt) != 0 {
21501 break
21502 }
21503 p := v_0
21504 if !(v.Type.Compare(p.Type) == types.CMPeq) {
21505 break
21506 }
21507 v.copyOf(p)
21508 return true
21509 }
21510 return false
21511 }
21512 func rewriteValuegeneric_OpOr16(v *Value) bool {
21513 v_1 := v.Args[1]
21514 v_0 := v.Args[0]
21515 b := v.Block
21516 config := b.Func.Config
21517
21518
21519 for {
21520 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
21521 if v_0.Op != OpConst16 {
21522 continue
21523 }
21524 c := auxIntToInt16(v_0.AuxInt)
21525 if v_1.Op != OpConst16 {
21526 continue
21527 }
21528 d := auxIntToInt16(v_1.AuxInt)
21529 v.reset(OpConst16)
21530 v.AuxInt = int16ToAuxInt(c | d)
21531 return true
21532 }
21533 break
21534 }
21535
21536
21537 for {
21538 t := v.Type
21539 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
21540 if v_0.Op != OpCom16 {
21541 continue
21542 }
21543 x := v_0.Args[0]
21544 if v_1.Op != OpCom16 {
21545 continue
21546 }
21547 y := v_1.Args[0]
21548 v.reset(OpCom16)
21549 v0 := b.NewValue0(v.Pos, OpAnd16, t)
21550 v0.AddArg2(x, y)
21551 v.AddArg(v0)
21552 return true
21553 }
21554 break
21555 }
21556
21557
21558 for {
21559 x := v_0
21560 if x != v_1 {
21561 break
21562 }
21563 v.copyOf(x)
21564 return true
21565 }
21566
21567
21568 for {
21569 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
21570 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 {
21571 continue
21572 }
21573 x := v_1
21574 v.copyOf(x)
21575 return true
21576 }
21577 break
21578 }
21579
21580
21581 for {
21582 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
21583 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != -1 {
21584 continue
21585 }
21586 v.reset(OpConst16)
21587 v.AuxInt = int16ToAuxInt(-1)
21588 return true
21589 }
21590 break
21591 }
21592
21593
21594 for {
21595 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
21596 if v_0.Op != OpCom16 {
21597 continue
21598 }
21599 x := v_0.Args[0]
21600 if x != v_1 {
21601 continue
21602 }
21603 v.reset(OpConst16)
21604 v.AuxInt = int16ToAuxInt(-1)
21605 return true
21606 }
21607 break
21608 }
21609
21610
21611 for {
21612 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
21613 x := v_0
21614 if v_1.Op != OpOr16 {
21615 continue
21616 }
21617 _ = v_1.Args[1]
21618 v_1_0 := v_1.Args[0]
21619 v_1_1 := v_1.Args[1]
21620 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
21621 if x != v_1_0 {
21622 continue
21623 }
21624 y := v_1_1
21625 v.reset(OpOr16)
21626 v.AddArg2(x, y)
21627 return true
21628 }
21629 }
21630 break
21631 }
21632
21633
21634
21635 for {
21636 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
21637 if v_0.Op != OpAnd16 {
21638 continue
21639 }
21640 _ = v_0.Args[1]
21641 v_0_0 := v_0.Args[0]
21642 v_0_1 := v_0.Args[1]
21643 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
21644 x := v_0_0
21645 if v_0_1.Op != OpConst16 {
21646 continue
21647 }
21648 c2 := auxIntToInt16(v_0_1.AuxInt)
21649 if v_1.Op != OpConst16 {
21650 continue
21651 }
21652 t := v_1.Type
21653 c1 := auxIntToInt16(v_1.AuxInt)
21654 if !(^(c1 | c2) == 0) {
21655 continue
21656 }
21657 v.reset(OpOr16)
21658 v0 := b.NewValue0(v.Pos, OpConst16, t)
21659 v0.AuxInt = int16ToAuxInt(c1)
21660 v.AddArg2(v0, x)
21661 return true
21662 }
21663 }
21664 break
21665 }
21666
21667
21668
21669 for {
21670 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
21671 if v_0.Op != OpOr16 {
21672 continue
21673 }
21674 _ = v_0.Args[1]
21675 v_0_0 := v_0.Args[0]
21676 v_0_1 := v_0.Args[1]
21677 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
21678 i := v_0_0
21679 if i.Op != OpConst16 {
21680 continue
21681 }
21682 t := i.Type
21683 z := v_0_1
21684 x := v_1
21685 if !(z.Op != OpConst16 && x.Op != OpConst16) {
21686 continue
21687 }
21688 v.reset(OpOr16)
21689 v0 := b.NewValue0(v.Pos, OpOr16, t)
21690 v0.AddArg2(z, x)
21691 v.AddArg2(i, v0)
21692 return true
21693 }
21694 }
21695 break
21696 }
21697
21698
21699 for {
21700 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
21701 if v_0.Op != OpConst16 {
21702 continue
21703 }
21704 t := v_0.Type
21705 c := auxIntToInt16(v_0.AuxInt)
21706 if v_1.Op != OpOr16 {
21707 continue
21708 }
21709 _ = v_1.Args[1]
21710 v_1_0 := v_1.Args[0]
21711 v_1_1 := v_1.Args[1]
21712 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
21713 if v_1_0.Op != OpConst16 || v_1_0.Type != t {
21714 continue
21715 }
21716 d := auxIntToInt16(v_1_0.AuxInt)
21717 x := v_1_1
21718 v.reset(OpOr16)
21719 v0 := b.NewValue0(v.Pos, OpConst16, t)
21720 v0.AuxInt = int16ToAuxInt(c | d)
21721 v.AddArg2(v0, x)
21722 return true
21723 }
21724 }
21725 break
21726 }
21727
21728
21729
21730 for {
21731 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
21732 if v_0.Op != OpLsh16x64 {
21733 continue
21734 }
21735 _ = v_0.Args[1]
21736 x := v_0.Args[0]
21737 z := v_0.Args[1]
21738 if z.Op != OpConst64 {
21739 continue
21740 }
21741 c := auxIntToInt64(z.AuxInt)
21742 if v_1.Op != OpRsh16Ux64 {
21743 continue
21744 }
21745 _ = v_1.Args[1]
21746 if x != v_1.Args[0] {
21747 continue
21748 }
21749 v_1_1 := v_1.Args[1]
21750 if v_1_1.Op != OpConst64 {
21751 continue
21752 }
21753 d := auxIntToInt64(v_1_1.AuxInt)
21754 if !(c < 16 && d == 16-c && canRotate(config, 16)) {
21755 continue
21756 }
21757 v.reset(OpRotateLeft16)
21758 v.AddArg2(x, z)
21759 return true
21760 }
21761 break
21762 }
21763
21764
21765
21766 for {
21767 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
21768 left := v_0
21769 if left.Op != OpLsh16x64 {
21770 continue
21771 }
21772 y := left.Args[1]
21773 x := left.Args[0]
21774 right := v_1
21775 if right.Op != OpRsh16Ux64 {
21776 continue
21777 }
21778 _ = right.Args[1]
21779 if x != right.Args[0] {
21780 continue
21781 }
21782 right_1 := right.Args[1]
21783 if right_1.Op != OpSub64 {
21784 continue
21785 }
21786 _ = right_1.Args[1]
21787 right_1_0 := right_1.Args[0]
21788 if right_1_0.Op != OpConst64 || auxIntToInt64(right_1_0.AuxInt) != 16 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 16)) {
21789 continue
21790 }
21791 v.reset(OpRotateLeft16)
21792 v.AddArg2(x, y)
21793 return true
21794 }
21795 break
21796 }
21797
21798
21799
21800 for {
21801 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
21802 left := v_0
21803 if left.Op != OpLsh16x32 {
21804 continue
21805 }
21806 y := left.Args[1]
21807 x := left.Args[0]
21808 right := v_1
21809 if right.Op != OpRsh16Ux32 {
21810 continue
21811 }
21812 _ = right.Args[1]
21813 if x != right.Args[0] {
21814 continue
21815 }
21816 right_1 := right.Args[1]
21817 if right_1.Op != OpSub32 {
21818 continue
21819 }
21820 _ = right_1.Args[1]
21821 right_1_0 := right_1.Args[0]
21822 if right_1_0.Op != OpConst32 || auxIntToInt32(right_1_0.AuxInt) != 16 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 16)) {
21823 continue
21824 }
21825 v.reset(OpRotateLeft16)
21826 v.AddArg2(x, y)
21827 return true
21828 }
21829 break
21830 }
21831
21832
21833
21834 for {
21835 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
21836 left := v_0
21837 if left.Op != OpLsh16x16 {
21838 continue
21839 }
21840 y := left.Args[1]
21841 x := left.Args[0]
21842 right := v_1
21843 if right.Op != OpRsh16Ux16 {
21844 continue
21845 }
21846 _ = right.Args[1]
21847 if x != right.Args[0] {
21848 continue
21849 }
21850 right_1 := right.Args[1]
21851 if right_1.Op != OpSub16 {
21852 continue
21853 }
21854 _ = right_1.Args[1]
21855 right_1_0 := right_1.Args[0]
21856 if right_1_0.Op != OpConst16 || auxIntToInt16(right_1_0.AuxInt) != 16 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 16)) {
21857 continue
21858 }
21859 v.reset(OpRotateLeft16)
21860 v.AddArg2(x, y)
21861 return true
21862 }
21863 break
21864 }
21865
21866
21867
21868 for {
21869 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
21870 left := v_0
21871 if left.Op != OpLsh16x8 {
21872 continue
21873 }
21874 y := left.Args[1]
21875 x := left.Args[0]
21876 right := v_1
21877 if right.Op != OpRsh16Ux8 {
21878 continue
21879 }
21880 _ = right.Args[1]
21881 if x != right.Args[0] {
21882 continue
21883 }
21884 right_1 := right.Args[1]
21885 if right_1.Op != OpSub8 {
21886 continue
21887 }
21888 _ = right_1.Args[1]
21889 right_1_0 := right_1.Args[0]
21890 if right_1_0.Op != OpConst8 || auxIntToInt8(right_1_0.AuxInt) != 16 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 16)) {
21891 continue
21892 }
21893 v.reset(OpRotateLeft16)
21894 v.AddArg2(x, y)
21895 return true
21896 }
21897 break
21898 }
21899
21900
21901
21902 for {
21903 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
21904 right := v_0
21905 if right.Op != OpRsh16Ux64 {
21906 continue
21907 }
21908 y := right.Args[1]
21909 x := right.Args[0]
21910 left := v_1
21911 if left.Op != OpLsh16x64 {
21912 continue
21913 }
21914 _ = left.Args[1]
21915 if x != left.Args[0] {
21916 continue
21917 }
21918 z := left.Args[1]
21919 if z.Op != OpSub64 {
21920 continue
21921 }
21922 _ = z.Args[1]
21923 z_0 := z.Args[0]
21924 if z_0.Op != OpConst64 || auxIntToInt64(z_0.AuxInt) != 16 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 16)) {
21925 continue
21926 }
21927 v.reset(OpRotateLeft16)
21928 v.AddArg2(x, z)
21929 return true
21930 }
21931 break
21932 }
21933
21934
21935
21936 for {
21937 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
21938 right := v_0
21939 if right.Op != OpRsh16Ux32 {
21940 continue
21941 }
21942 y := right.Args[1]
21943 x := right.Args[0]
21944 left := v_1
21945 if left.Op != OpLsh16x32 {
21946 continue
21947 }
21948 _ = left.Args[1]
21949 if x != left.Args[0] {
21950 continue
21951 }
21952 z := left.Args[1]
21953 if z.Op != OpSub32 {
21954 continue
21955 }
21956 _ = z.Args[1]
21957 z_0 := z.Args[0]
21958 if z_0.Op != OpConst32 || auxIntToInt32(z_0.AuxInt) != 16 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 16)) {
21959 continue
21960 }
21961 v.reset(OpRotateLeft16)
21962 v.AddArg2(x, z)
21963 return true
21964 }
21965 break
21966 }
21967
21968
21969
21970 for {
21971 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
21972 right := v_0
21973 if right.Op != OpRsh16Ux16 {
21974 continue
21975 }
21976 y := right.Args[1]
21977 x := right.Args[0]
21978 left := v_1
21979 if left.Op != OpLsh16x16 {
21980 continue
21981 }
21982 _ = left.Args[1]
21983 if x != left.Args[0] {
21984 continue
21985 }
21986 z := left.Args[1]
21987 if z.Op != OpSub16 {
21988 continue
21989 }
21990 _ = z.Args[1]
21991 z_0 := z.Args[0]
21992 if z_0.Op != OpConst16 || auxIntToInt16(z_0.AuxInt) != 16 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 16)) {
21993 continue
21994 }
21995 v.reset(OpRotateLeft16)
21996 v.AddArg2(x, z)
21997 return true
21998 }
21999 break
22000 }
22001
22002
22003
22004 for {
22005 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22006 right := v_0
22007 if right.Op != OpRsh16Ux8 {
22008 continue
22009 }
22010 y := right.Args[1]
22011 x := right.Args[0]
22012 left := v_1
22013 if left.Op != OpLsh16x8 {
22014 continue
22015 }
22016 _ = left.Args[1]
22017 if x != left.Args[0] {
22018 continue
22019 }
22020 z := left.Args[1]
22021 if z.Op != OpSub8 {
22022 continue
22023 }
22024 _ = z.Args[1]
22025 z_0 := z.Args[0]
22026 if z_0.Op != OpConst8 || auxIntToInt8(z_0.AuxInt) != 16 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 16)) {
22027 continue
22028 }
22029 v.reset(OpRotateLeft16)
22030 v.AddArg2(x, z)
22031 return true
22032 }
22033 break
22034 }
22035 return false
22036 }
22037 func rewriteValuegeneric_OpOr32(v *Value) bool {
22038 v_1 := v.Args[1]
22039 v_0 := v.Args[0]
22040 b := v.Block
22041 config := b.Func.Config
22042
22043
22044 for {
22045 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22046 if v_0.Op != OpConst32 {
22047 continue
22048 }
22049 c := auxIntToInt32(v_0.AuxInt)
22050 if v_1.Op != OpConst32 {
22051 continue
22052 }
22053 d := auxIntToInt32(v_1.AuxInt)
22054 v.reset(OpConst32)
22055 v.AuxInt = int32ToAuxInt(c | d)
22056 return true
22057 }
22058 break
22059 }
22060
22061
22062 for {
22063 t := v.Type
22064 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22065 if v_0.Op != OpCom32 {
22066 continue
22067 }
22068 x := v_0.Args[0]
22069 if v_1.Op != OpCom32 {
22070 continue
22071 }
22072 y := v_1.Args[0]
22073 v.reset(OpCom32)
22074 v0 := b.NewValue0(v.Pos, OpAnd32, t)
22075 v0.AddArg2(x, y)
22076 v.AddArg(v0)
22077 return true
22078 }
22079 break
22080 }
22081
22082
22083 for {
22084 x := v_0
22085 if x != v_1 {
22086 break
22087 }
22088 v.copyOf(x)
22089 return true
22090 }
22091
22092
22093 for {
22094 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22095 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
22096 continue
22097 }
22098 x := v_1
22099 v.copyOf(x)
22100 return true
22101 }
22102 break
22103 }
22104
22105
22106 for {
22107 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22108 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != -1 {
22109 continue
22110 }
22111 v.reset(OpConst32)
22112 v.AuxInt = int32ToAuxInt(-1)
22113 return true
22114 }
22115 break
22116 }
22117
22118
22119 for {
22120 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22121 if v_0.Op != OpCom32 {
22122 continue
22123 }
22124 x := v_0.Args[0]
22125 if x != v_1 {
22126 continue
22127 }
22128 v.reset(OpConst32)
22129 v.AuxInt = int32ToAuxInt(-1)
22130 return true
22131 }
22132 break
22133 }
22134
22135
22136 for {
22137 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22138 x := v_0
22139 if v_1.Op != OpOr32 {
22140 continue
22141 }
22142 _ = v_1.Args[1]
22143 v_1_0 := v_1.Args[0]
22144 v_1_1 := v_1.Args[1]
22145 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
22146 if x != v_1_0 {
22147 continue
22148 }
22149 y := v_1_1
22150 v.reset(OpOr32)
22151 v.AddArg2(x, y)
22152 return true
22153 }
22154 }
22155 break
22156 }
22157
22158
22159
22160 for {
22161 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22162 if v_0.Op != OpAnd32 {
22163 continue
22164 }
22165 _ = v_0.Args[1]
22166 v_0_0 := v_0.Args[0]
22167 v_0_1 := v_0.Args[1]
22168 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
22169 x := v_0_0
22170 if v_0_1.Op != OpConst32 {
22171 continue
22172 }
22173 c2 := auxIntToInt32(v_0_1.AuxInt)
22174 if v_1.Op != OpConst32 {
22175 continue
22176 }
22177 t := v_1.Type
22178 c1 := auxIntToInt32(v_1.AuxInt)
22179 if !(^(c1 | c2) == 0) {
22180 continue
22181 }
22182 v.reset(OpOr32)
22183 v0 := b.NewValue0(v.Pos, OpConst32, t)
22184 v0.AuxInt = int32ToAuxInt(c1)
22185 v.AddArg2(v0, x)
22186 return true
22187 }
22188 }
22189 break
22190 }
22191
22192
22193
22194 for {
22195 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22196 if v_0.Op != OpOr32 {
22197 continue
22198 }
22199 _ = v_0.Args[1]
22200 v_0_0 := v_0.Args[0]
22201 v_0_1 := v_0.Args[1]
22202 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
22203 i := v_0_0
22204 if i.Op != OpConst32 {
22205 continue
22206 }
22207 t := i.Type
22208 z := v_0_1
22209 x := v_1
22210 if !(z.Op != OpConst32 && x.Op != OpConst32) {
22211 continue
22212 }
22213 v.reset(OpOr32)
22214 v0 := b.NewValue0(v.Pos, OpOr32, t)
22215 v0.AddArg2(z, x)
22216 v.AddArg2(i, v0)
22217 return true
22218 }
22219 }
22220 break
22221 }
22222
22223
22224 for {
22225 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22226 if v_0.Op != OpConst32 {
22227 continue
22228 }
22229 t := v_0.Type
22230 c := auxIntToInt32(v_0.AuxInt)
22231 if v_1.Op != OpOr32 {
22232 continue
22233 }
22234 _ = v_1.Args[1]
22235 v_1_0 := v_1.Args[0]
22236 v_1_1 := v_1.Args[1]
22237 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
22238 if v_1_0.Op != OpConst32 || v_1_0.Type != t {
22239 continue
22240 }
22241 d := auxIntToInt32(v_1_0.AuxInt)
22242 x := v_1_1
22243 v.reset(OpOr32)
22244 v0 := b.NewValue0(v.Pos, OpConst32, t)
22245 v0.AuxInt = int32ToAuxInt(c | d)
22246 v.AddArg2(v0, x)
22247 return true
22248 }
22249 }
22250 break
22251 }
22252
22253
22254
22255 for {
22256 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22257 if v_0.Op != OpLsh32x64 {
22258 continue
22259 }
22260 _ = v_0.Args[1]
22261 x := v_0.Args[0]
22262 z := v_0.Args[1]
22263 if z.Op != OpConst64 {
22264 continue
22265 }
22266 c := auxIntToInt64(z.AuxInt)
22267 if v_1.Op != OpRsh32Ux64 {
22268 continue
22269 }
22270 _ = v_1.Args[1]
22271 if x != v_1.Args[0] {
22272 continue
22273 }
22274 v_1_1 := v_1.Args[1]
22275 if v_1_1.Op != OpConst64 {
22276 continue
22277 }
22278 d := auxIntToInt64(v_1_1.AuxInt)
22279 if !(c < 32 && d == 32-c && canRotate(config, 32)) {
22280 continue
22281 }
22282 v.reset(OpRotateLeft32)
22283 v.AddArg2(x, z)
22284 return true
22285 }
22286 break
22287 }
22288
22289
22290
22291 for {
22292 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22293 left := v_0
22294 if left.Op != OpLsh32x64 {
22295 continue
22296 }
22297 y := left.Args[1]
22298 x := left.Args[0]
22299 right := v_1
22300 if right.Op != OpRsh32Ux64 {
22301 continue
22302 }
22303 _ = right.Args[1]
22304 if x != right.Args[0] {
22305 continue
22306 }
22307 right_1 := right.Args[1]
22308 if right_1.Op != OpSub64 {
22309 continue
22310 }
22311 _ = right_1.Args[1]
22312 right_1_0 := right_1.Args[0]
22313 if right_1_0.Op != OpConst64 || auxIntToInt64(right_1_0.AuxInt) != 32 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 32)) {
22314 continue
22315 }
22316 v.reset(OpRotateLeft32)
22317 v.AddArg2(x, y)
22318 return true
22319 }
22320 break
22321 }
22322
22323
22324
22325 for {
22326 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22327 left := v_0
22328 if left.Op != OpLsh32x32 {
22329 continue
22330 }
22331 y := left.Args[1]
22332 x := left.Args[0]
22333 right := v_1
22334 if right.Op != OpRsh32Ux32 {
22335 continue
22336 }
22337 _ = right.Args[1]
22338 if x != right.Args[0] {
22339 continue
22340 }
22341 right_1 := right.Args[1]
22342 if right_1.Op != OpSub32 {
22343 continue
22344 }
22345 _ = right_1.Args[1]
22346 right_1_0 := right_1.Args[0]
22347 if right_1_0.Op != OpConst32 || auxIntToInt32(right_1_0.AuxInt) != 32 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 32)) {
22348 continue
22349 }
22350 v.reset(OpRotateLeft32)
22351 v.AddArg2(x, y)
22352 return true
22353 }
22354 break
22355 }
22356
22357
22358
22359 for {
22360 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22361 left := v_0
22362 if left.Op != OpLsh32x16 {
22363 continue
22364 }
22365 y := left.Args[1]
22366 x := left.Args[0]
22367 right := v_1
22368 if right.Op != OpRsh32Ux16 {
22369 continue
22370 }
22371 _ = right.Args[1]
22372 if x != right.Args[0] {
22373 continue
22374 }
22375 right_1 := right.Args[1]
22376 if right_1.Op != OpSub16 {
22377 continue
22378 }
22379 _ = right_1.Args[1]
22380 right_1_0 := right_1.Args[0]
22381 if right_1_0.Op != OpConst16 || auxIntToInt16(right_1_0.AuxInt) != 32 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 32)) {
22382 continue
22383 }
22384 v.reset(OpRotateLeft32)
22385 v.AddArg2(x, y)
22386 return true
22387 }
22388 break
22389 }
22390
22391
22392
22393 for {
22394 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22395 left := v_0
22396 if left.Op != OpLsh32x8 {
22397 continue
22398 }
22399 y := left.Args[1]
22400 x := left.Args[0]
22401 right := v_1
22402 if right.Op != OpRsh32Ux8 {
22403 continue
22404 }
22405 _ = right.Args[1]
22406 if x != right.Args[0] {
22407 continue
22408 }
22409 right_1 := right.Args[1]
22410 if right_1.Op != OpSub8 {
22411 continue
22412 }
22413 _ = right_1.Args[1]
22414 right_1_0 := right_1.Args[0]
22415 if right_1_0.Op != OpConst8 || auxIntToInt8(right_1_0.AuxInt) != 32 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 32)) {
22416 continue
22417 }
22418 v.reset(OpRotateLeft32)
22419 v.AddArg2(x, y)
22420 return true
22421 }
22422 break
22423 }
22424
22425
22426
22427 for {
22428 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22429 right := v_0
22430 if right.Op != OpRsh32Ux64 {
22431 continue
22432 }
22433 y := right.Args[1]
22434 x := right.Args[0]
22435 left := v_1
22436 if left.Op != OpLsh32x64 {
22437 continue
22438 }
22439 _ = left.Args[1]
22440 if x != left.Args[0] {
22441 continue
22442 }
22443 z := left.Args[1]
22444 if z.Op != OpSub64 {
22445 continue
22446 }
22447 _ = z.Args[1]
22448 z_0 := z.Args[0]
22449 if z_0.Op != OpConst64 || auxIntToInt64(z_0.AuxInt) != 32 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 32)) {
22450 continue
22451 }
22452 v.reset(OpRotateLeft32)
22453 v.AddArg2(x, z)
22454 return true
22455 }
22456 break
22457 }
22458
22459
22460
22461 for {
22462 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22463 right := v_0
22464 if right.Op != OpRsh32Ux32 {
22465 continue
22466 }
22467 y := right.Args[1]
22468 x := right.Args[0]
22469 left := v_1
22470 if left.Op != OpLsh32x32 {
22471 continue
22472 }
22473 _ = left.Args[1]
22474 if x != left.Args[0] {
22475 continue
22476 }
22477 z := left.Args[1]
22478 if z.Op != OpSub32 {
22479 continue
22480 }
22481 _ = z.Args[1]
22482 z_0 := z.Args[0]
22483 if z_0.Op != OpConst32 || auxIntToInt32(z_0.AuxInt) != 32 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 32)) {
22484 continue
22485 }
22486 v.reset(OpRotateLeft32)
22487 v.AddArg2(x, z)
22488 return true
22489 }
22490 break
22491 }
22492
22493
22494
22495 for {
22496 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22497 right := v_0
22498 if right.Op != OpRsh32Ux16 {
22499 continue
22500 }
22501 y := right.Args[1]
22502 x := right.Args[0]
22503 left := v_1
22504 if left.Op != OpLsh32x16 {
22505 continue
22506 }
22507 _ = left.Args[1]
22508 if x != left.Args[0] {
22509 continue
22510 }
22511 z := left.Args[1]
22512 if z.Op != OpSub16 {
22513 continue
22514 }
22515 _ = z.Args[1]
22516 z_0 := z.Args[0]
22517 if z_0.Op != OpConst16 || auxIntToInt16(z_0.AuxInt) != 32 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 32)) {
22518 continue
22519 }
22520 v.reset(OpRotateLeft32)
22521 v.AddArg2(x, z)
22522 return true
22523 }
22524 break
22525 }
22526
22527
22528
22529 for {
22530 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22531 right := v_0
22532 if right.Op != OpRsh32Ux8 {
22533 continue
22534 }
22535 y := right.Args[1]
22536 x := right.Args[0]
22537 left := v_1
22538 if left.Op != OpLsh32x8 {
22539 continue
22540 }
22541 _ = left.Args[1]
22542 if x != left.Args[0] {
22543 continue
22544 }
22545 z := left.Args[1]
22546 if z.Op != OpSub8 {
22547 continue
22548 }
22549 _ = z.Args[1]
22550 z_0 := z.Args[0]
22551 if z_0.Op != OpConst8 || auxIntToInt8(z_0.AuxInt) != 32 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 32)) {
22552 continue
22553 }
22554 v.reset(OpRotateLeft32)
22555 v.AddArg2(x, z)
22556 return true
22557 }
22558 break
22559 }
22560 return false
22561 }
22562 func rewriteValuegeneric_OpOr64(v *Value) bool {
22563 v_1 := v.Args[1]
22564 v_0 := v.Args[0]
22565 b := v.Block
22566 config := b.Func.Config
22567
22568
22569 for {
22570 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22571 if v_0.Op != OpConst64 {
22572 continue
22573 }
22574 c := auxIntToInt64(v_0.AuxInt)
22575 if v_1.Op != OpConst64 {
22576 continue
22577 }
22578 d := auxIntToInt64(v_1.AuxInt)
22579 v.reset(OpConst64)
22580 v.AuxInt = int64ToAuxInt(c | d)
22581 return true
22582 }
22583 break
22584 }
22585
22586
22587 for {
22588 t := v.Type
22589 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22590 if v_0.Op != OpCom64 {
22591 continue
22592 }
22593 x := v_0.Args[0]
22594 if v_1.Op != OpCom64 {
22595 continue
22596 }
22597 y := v_1.Args[0]
22598 v.reset(OpCom64)
22599 v0 := b.NewValue0(v.Pos, OpAnd64, t)
22600 v0.AddArg2(x, y)
22601 v.AddArg(v0)
22602 return true
22603 }
22604 break
22605 }
22606
22607
22608 for {
22609 x := v_0
22610 if x != v_1 {
22611 break
22612 }
22613 v.copyOf(x)
22614 return true
22615 }
22616
22617
22618 for {
22619 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22620 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
22621 continue
22622 }
22623 x := v_1
22624 v.copyOf(x)
22625 return true
22626 }
22627 break
22628 }
22629
22630
22631 for {
22632 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22633 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != -1 {
22634 continue
22635 }
22636 v.reset(OpConst64)
22637 v.AuxInt = int64ToAuxInt(-1)
22638 return true
22639 }
22640 break
22641 }
22642
22643
22644 for {
22645 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22646 if v_0.Op != OpCom64 {
22647 continue
22648 }
22649 x := v_0.Args[0]
22650 if x != v_1 {
22651 continue
22652 }
22653 v.reset(OpConst64)
22654 v.AuxInt = int64ToAuxInt(-1)
22655 return true
22656 }
22657 break
22658 }
22659
22660
22661 for {
22662 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22663 x := v_0
22664 if v_1.Op != OpOr64 {
22665 continue
22666 }
22667 _ = v_1.Args[1]
22668 v_1_0 := v_1.Args[0]
22669 v_1_1 := v_1.Args[1]
22670 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
22671 if x != v_1_0 {
22672 continue
22673 }
22674 y := v_1_1
22675 v.reset(OpOr64)
22676 v.AddArg2(x, y)
22677 return true
22678 }
22679 }
22680 break
22681 }
22682
22683
22684
22685 for {
22686 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22687 if v_0.Op != OpAnd64 {
22688 continue
22689 }
22690 _ = v_0.Args[1]
22691 v_0_0 := v_0.Args[0]
22692 v_0_1 := v_0.Args[1]
22693 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
22694 x := v_0_0
22695 if v_0_1.Op != OpConst64 {
22696 continue
22697 }
22698 c2 := auxIntToInt64(v_0_1.AuxInt)
22699 if v_1.Op != OpConst64 {
22700 continue
22701 }
22702 t := v_1.Type
22703 c1 := auxIntToInt64(v_1.AuxInt)
22704 if !(^(c1 | c2) == 0) {
22705 continue
22706 }
22707 v.reset(OpOr64)
22708 v0 := b.NewValue0(v.Pos, OpConst64, t)
22709 v0.AuxInt = int64ToAuxInt(c1)
22710 v.AddArg2(v0, x)
22711 return true
22712 }
22713 }
22714 break
22715 }
22716
22717
22718
22719 for {
22720 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22721 if v_0.Op != OpOr64 {
22722 continue
22723 }
22724 _ = v_0.Args[1]
22725 v_0_0 := v_0.Args[0]
22726 v_0_1 := v_0.Args[1]
22727 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
22728 i := v_0_0
22729 if i.Op != OpConst64 {
22730 continue
22731 }
22732 t := i.Type
22733 z := v_0_1
22734 x := v_1
22735 if !(z.Op != OpConst64 && x.Op != OpConst64) {
22736 continue
22737 }
22738 v.reset(OpOr64)
22739 v0 := b.NewValue0(v.Pos, OpOr64, t)
22740 v0.AddArg2(z, x)
22741 v.AddArg2(i, v0)
22742 return true
22743 }
22744 }
22745 break
22746 }
22747
22748
22749 for {
22750 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22751 if v_0.Op != OpConst64 {
22752 continue
22753 }
22754 t := v_0.Type
22755 c := auxIntToInt64(v_0.AuxInt)
22756 if v_1.Op != OpOr64 {
22757 continue
22758 }
22759 _ = v_1.Args[1]
22760 v_1_0 := v_1.Args[0]
22761 v_1_1 := v_1.Args[1]
22762 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
22763 if v_1_0.Op != OpConst64 || v_1_0.Type != t {
22764 continue
22765 }
22766 d := auxIntToInt64(v_1_0.AuxInt)
22767 x := v_1_1
22768 v.reset(OpOr64)
22769 v0 := b.NewValue0(v.Pos, OpConst64, t)
22770 v0.AuxInt = int64ToAuxInt(c | d)
22771 v.AddArg2(v0, x)
22772 return true
22773 }
22774 }
22775 break
22776 }
22777
22778
22779
22780 for {
22781 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22782 if v_0.Op != OpLsh64x64 {
22783 continue
22784 }
22785 _ = v_0.Args[1]
22786 x := v_0.Args[0]
22787 z := v_0.Args[1]
22788 if z.Op != OpConst64 {
22789 continue
22790 }
22791 c := auxIntToInt64(z.AuxInt)
22792 if v_1.Op != OpRsh64Ux64 {
22793 continue
22794 }
22795 _ = v_1.Args[1]
22796 if x != v_1.Args[0] {
22797 continue
22798 }
22799 v_1_1 := v_1.Args[1]
22800 if v_1_1.Op != OpConst64 {
22801 continue
22802 }
22803 d := auxIntToInt64(v_1_1.AuxInt)
22804 if !(c < 64 && d == 64-c && canRotate(config, 64)) {
22805 continue
22806 }
22807 v.reset(OpRotateLeft64)
22808 v.AddArg2(x, z)
22809 return true
22810 }
22811 break
22812 }
22813
22814
22815
22816 for {
22817 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22818 left := v_0
22819 if left.Op != OpLsh64x64 {
22820 continue
22821 }
22822 y := left.Args[1]
22823 x := left.Args[0]
22824 right := v_1
22825 if right.Op != OpRsh64Ux64 {
22826 continue
22827 }
22828 _ = right.Args[1]
22829 if x != right.Args[0] {
22830 continue
22831 }
22832 right_1 := right.Args[1]
22833 if right_1.Op != OpSub64 {
22834 continue
22835 }
22836 _ = right_1.Args[1]
22837 right_1_0 := right_1.Args[0]
22838 if right_1_0.Op != OpConst64 || auxIntToInt64(right_1_0.AuxInt) != 64 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 64)) {
22839 continue
22840 }
22841 v.reset(OpRotateLeft64)
22842 v.AddArg2(x, y)
22843 return true
22844 }
22845 break
22846 }
22847
22848
22849
22850 for {
22851 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22852 left := v_0
22853 if left.Op != OpLsh64x32 {
22854 continue
22855 }
22856 y := left.Args[1]
22857 x := left.Args[0]
22858 right := v_1
22859 if right.Op != OpRsh64Ux32 {
22860 continue
22861 }
22862 _ = right.Args[1]
22863 if x != right.Args[0] {
22864 continue
22865 }
22866 right_1 := right.Args[1]
22867 if right_1.Op != OpSub32 {
22868 continue
22869 }
22870 _ = right_1.Args[1]
22871 right_1_0 := right_1.Args[0]
22872 if right_1_0.Op != OpConst32 || auxIntToInt32(right_1_0.AuxInt) != 64 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 64)) {
22873 continue
22874 }
22875 v.reset(OpRotateLeft64)
22876 v.AddArg2(x, y)
22877 return true
22878 }
22879 break
22880 }
22881
22882
22883
22884 for {
22885 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22886 left := v_0
22887 if left.Op != OpLsh64x16 {
22888 continue
22889 }
22890 y := left.Args[1]
22891 x := left.Args[0]
22892 right := v_1
22893 if right.Op != OpRsh64Ux16 {
22894 continue
22895 }
22896 _ = right.Args[1]
22897 if x != right.Args[0] {
22898 continue
22899 }
22900 right_1 := right.Args[1]
22901 if right_1.Op != OpSub16 {
22902 continue
22903 }
22904 _ = right_1.Args[1]
22905 right_1_0 := right_1.Args[0]
22906 if right_1_0.Op != OpConst16 || auxIntToInt16(right_1_0.AuxInt) != 64 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 64)) {
22907 continue
22908 }
22909 v.reset(OpRotateLeft64)
22910 v.AddArg2(x, y)
22911 return true
22912 }
22913 break
22914 }
22915
22916
22917
22918 for {
22919 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22920 left := v_0
22921 if left.Op != OpLsh64x8 {
22922 continue
22923 }
22924 y := left.Args[1]
22925 x := left.Args[0]
22926 right := v_1
22927 if right.Op != OpRsh64Ux8 {
22928 continue
22929 }
22930 _ = right.Args[1]
22931 if x != right.Args[0] {
22932 continue
22933 }
22934 right_1 := right.Args[1]
22935 if right_1.Op != OpSub8 {
22936 continue
22937 }
22938 _ = right_1.Args[1]
22939 right_1_0 := right_1.Args[0]
22940 if right_1_0.Op != OpConst8 || auxIntToInt8(right_1_0.AuxInt) != 64 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 64)) {
22941 continue
22942 }
22943 v.reset(OpRotateLeft64)
22944 v.AddArg2(x, y)
22945 return true
22946 }
22947 break
22948 }
22949
22950
22951
22952 for {
22953 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22954 right := v_0
22955 if right.Op != OpRsh64Ux64 {
22956 continue
22957 }
22958 y := right.Args[1]
22959 x := right.Args[0]
22960 left := v_1
22961 if left.Op != OpLsh64x64 {
22962 continue
22963 }
22964 _ = left.Args[1]
22965 if x != left.Args[0] {
22966 continue
22967 }
22968 z := left.Args[1]
22969 if z.Op != OpSub64 {
22970 continue
22971 }
22972 _ = z.Args[1]
22973 z_0 := z.Args[0]
22974 if z_0.Op != OpConst64 || auxIntToInt64(z_0.AuxInt) != 64 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 64)) {
22975 continue
22976 }
22977 v.reset(OpRotateLeft64)
22978 v.AddArg2(x, z)
22979 return true
22980 }
22981 break
22982 }
22983
22984
22985
22986 for {
22987 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22988 right := v_0
22989 if right.Op != OpRsh64Ux32 {
22990 continue
22991 }
22992 y := right.Args[1]
22993 x := right.Args[0]
22994 left := v_1
22995 if left.Op != OpLsh64x32 {
22996 continue
22997 }
22998 _ = left.Args[1]
22999 if x != left.Args[0] {
23000 continue
23001 }
23002 z := left.Args[1]
23003 if z.Op != OpSub32 {
23004 continue
23005 }
23006 _ = z.Args[1]
23007 z_0 := z.Args[0]
23008 if z_0.Op != OpConst32 || auxIntToInt32(z_0.AuxInt) != 64 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 64)) {
23009 continue
23010 }
23011 v.reset(OpRotateLeft64)
23012 v.AddArg2(x, z)
23013 return true
23014 }
23015 break
23016 }
23017
23018
23019
23020 for {
23021 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23022 right := v_0
23023 if right.Op != OpRsh64Ux16 {
23024 continue
23025 }
23026 y := right.Args[1]
23027 x := right.Args[0]
23028 left := v_1
23029 if left.Op != OpLsh64x16 {
23030 continue
23031 }
23032 _ = left.Args[1]
23033 if x != left.Args[0] {
23034 continue
23035 }
23036 z := left.Args[1]
23037 if z.Op != OpSub16 {
23038 continue
23039 }
23040 _ = z.Args[1]
23041 z_0 := z.Args[0]
23042 if z_0.Op != OpConst16 || auxIntToInt16(z_0.AuxInt) != 64 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 64)) {
23043 continue
23044 }
23045 v.reset(OpRotateLeft64)
23046 v.AddArg2(x, z)
23047 return true
23048 }
23049 break
23050 }
23051
23052
23053
23054 for {
23055 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23056 right := v_0
23057 if right.Op != OpRsh64Ux8 {
23058 continue
23059 }
23060 y := right.Args[1]
23061 x := right.Args[0]
23062 left := v_1
23063 if left.Op != OpLsh64x8 {
23064 continue
23065 }
23066 _ = left.Args[1]
23067 if x != left.Args[0] {
23068 continue
23069 }
23070 z := left.Args[1]
23071 if z.Op != OpSub8 {
23072 continue
23073 }
23074 _ = z.Args[1]
23075 z_0 := z.Args[0]
23076 if z_0.Op != OpConst8 || auxIntToInt8(z_0.AuxInt) != 64 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 64)) {
23077 continue
23078 }
23079 v.reset(OpRotateLeft64)
23080 v.AddArg2(x, z)
23081 return true
23082 }
23083 break
23084 }
23085 return false
23086 }
23087 func rewriteValuegeneric_OpOr8(v *Value) bool {
23088 v_1 := v.Args[1]
23089 v_0 := v.Args[0]
23090 b := v.Block
23091 config := b.Func.Config
23092
23093
23094 for {
23095 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23096 if v_0.Op != OpConst8 {
23097 continue
23098 }
23099 c := auxIntToInt8(v_0.AuxInt)
23100 if v_1.Op != OpConst8 {
23101 continue
23102 }
23103 d := auxIntToInt8(v_1.AuxInt)
23104 v.reset(OpConst8)
23105 v.AuxInt = int8ToAuxInt(c | d)
23106 return true
23107 }
23108 break
23109 }
23110
23111
23112 for {
23113 t := v.Type
23114 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23115 if v_0.Op != OpCom8 {
23116 continue
23117 }
23118 x := v_0.Args[0]
23119 if v_1.Op != OpCom8 {
23120 continue
23121 }
23122 y := v_1.Args[0]
23123 v.reset(OpCom8)
23124 v0 := b.NewValue0(v.Pos, OpAnd8, t)
23125 v0.AddArg2(x, y)
23126 v.AddArg(v0)
23127 return true
23128 }
23129 break
23130 }
23131
23132
23133 for {
23134 x := v_0
23135 if x != v_1 {
23136 break
23137 }
23138 v.copyOf(x)
23139 return true
23140 }
23141
23142
23143 for {
23144 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23145 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 {
23146 continue
23147 }
23148 x := v_1
23149 v.copyOf(x)
23150 return true
23151 }
23152 break
23153 }
23154
23155
23156 for {
23157 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23158 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != -1 {
23159 continue
23160 }
23161 v.reset(OpConst8)
23162 v.AuxInt = int8ToAuxInt(-1)
23163 return true
23164 }
23165 break
23166 }
23167
23168
23169 for {
23170 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23171 if v_0.Op != OpCom8 {
23172 continue
23173 }
23174 x := v_0.Args[0]
23175 if x != v_1 {
23176 continue
23177 }
23178 v.reset(OpConst8)
23179 v.AuxInt = int8ToAuxInt(-1)
23180 return true
23181 }
23182 break
23183 }
23184
23185
23186 for {
23187 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23188 x := v_0
23189 if v_1.Op != OpOr8 {
23190 continue
23191 }
23192 _ = v_1.Args[1]
23193 v_1_0 := v_1.Args[0]
23194 v_1_1 := v_1.Args[1]
23195 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
23196 if x != v_1_0 {
23197 continue
23198 }
23199 y := v_1_1
23200 v.reset(OpOr8)
23201 v.AddArg2(x, y)
23202 return true
23203 }
23204 }
23205 break
23206 }
23207
23208
23209
23210 for {
23211 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23212 if v_0.Op != OpAnd8 {
23213 continue
23214 }
23215 _ = v_0.Args[1]
23216 v_0_0 := v_0.Args[0]
23217 v_0_1 := v_0.Args[1]
23218 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
23219 x := v_0_0
23220 if v_0_1.Op != OpConst8 {
23221 continue
23222 }
23223 c2 := auxIntToInt8(v_0_1.AuxInt)
23224 if v_1.Op != OpConst8 {
23225 continue
23226 }
23227 t := v_1.Type
23228 c1 := auxIntToInt8(v_1.AuxInt)
23229 if !(^(c1 | c2) == 0) {
23230 continue
23231 }
23232 v.reset(OpOr8)
23233 v0 := b.NewValue0(v.Pos, OpConst8, t)
23234 v0.AuxInt = int8ToAuxInt(c1)
23235 v.AddArg2(v0, x)
23236 return true
23237 }
23238 }
23239 break
23240 }
23241
23242
23243
23244 for {
23245 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23246 if v_0.Op != OpOr8 {
23247 continue
23248 }
23249 _ = v_0.Args[1]
23250 v_0_0 := v_0.Args[0]
23251 v_0_1 := v_0.Args[1]
23252 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
23253 i := v_0_0
23254 if i.Op != OpConst8 {
23255 continue
23256 }
23257 t := i.Type
23258 z := v_0_1
23259 x := v_1
23260 if !(z.Op != OpConst8 && x.Op != OpConst8) {
23261 continue
23262 }
23263 v.reset(OpOr8)
23264 v0 := b.NewValue0(v.Pos, OpOr8, t)
23265 v0.AddArg2(z, x)
23266 v.AddArg2(i, v0)
23267 return true
23268 }
23269 }
23270 break
23271 }
23272
23273
23274 for {
23275 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23276 if v_0.Op != OpConst8 {
23277 continue
23278 }
23279 t := v_0.Type
23280 c := auxIntToInt8(v_0.AuxInt)
23281 if v_1.Op != OpOr8 {
23282 continue
23283 }
23284 _ = v_1.Args[1]
23285 v_1_0 := v_1.Args[0]
23286 v_1_1 := v_1.Args[1]
23287 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
23288 if v_1_0.Op != OpConst8 || v_1_0.Type != t {
23289 continue
23290 }
23291 d := auxIntToInt8(v_1_0.AuxInt)
23292 x := v_1_1
23293 v.reset(OpOr8)
23294 v0 := b.NewValue0(v.Pos, OpConst8, t)
23295 v0.AuxInt = int8ToAuxInt(c | d)
23296 v.AddArg2(v0, x)
23297 return true
23298 }
23299 }
23300 break
23301 }
23302
23303
23304
23305 for {
23306 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23307 if v_0.Op != OpLsh8x64 {
23308 continue
23309 }
23310 _ = v_0.Args[1]
23311 x := v_0.Args[0]
23312 z := v_0.Args[1]
23313 if z.Op != OpConst64 {
23314 continue
23315 }
23316 c := auxIntToInt64(z.AuxInt)
23317 if v_1.Op != OpRsh8Ux64 {
23318 continue
23319 }
23320 _ = v_1.Args[1]
23321 if x != v_1.Args[0] {
23322 continue
23323 }
23324 v_1_1 := v_1.Args[1]
23325 if v_1_1.Op != OpConst64 {
23326 continue
23327 }
23328 d := auxIntToInt64(v_1_1.AuxInt)
23329 if !(c < 8 && d == 8-c && canRotate(config, 8)) {
23330 continue
23331 }
23332 v.reset(OpRotateLeft8)
23333 v.AddArg2(x, z)
23334 return true
23335 }
23336 break
23337 }
23338
23339
23340
23341 for {
23342 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23343 left := v_0
23344 if left.Op != OpLsh8x64 {
23345 continue
23346 }
23347 y := left.Args[1]
23348 x := left.Args[0]
23349 right := v_1
23350 if right.Op != OpRsh8Ux64 {
23351 continue
23352 }
23353 _ = right.Args[1]
23354 if x != right.Args[0] {
23355 continue
23356 }
23357 right_1 := right.Args[1]
23358 if right_1.Op != OpSub64 {
23359 continue
23360 }
23361 _ = right_1.Args[1]
23362 right_1_0 := right_1.Args[0]
23363 if right_1_0.Op != OpConst64 || auxIntToInt64(right_1_0.AuxInt) != 8 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 8)) {
23364 continue
23365 }
23366 v.reset(OpRotateLeft8)
23367 v.AddArg2(x, y)
23368 return true
23369 }
23370 break
23371 }
23372
23373
23374
23375 for {
23376 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23377 left := v_0
23378 if left.Op != OpLsh8x32 {
23379 continue
23380 }
23381 y := left.Args[1]
23382 x := left.Args[0]
23383 right := v_1
23384 if right.Op != OpRsh8Ux32 {
23385 continue
23386 }
23387 _ = right.Args[1]
23388 if x != right.Args[0] {
23389 continue
23390 }
23391 right_1 := right.Args[1]
23392 if right_1.Op != OpSub32 {
23393 continue
23394 }
23395 _ = right_1.Args[1]
23396 right_1_0 := right_1.Args[0]
23397 if right_1_0.Op != OpConst32 || auxIntToInt32(right_1_0.AuxInt) != 8 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 8)) {
23398 continue
23399 }
23400 v.reset(OpRotateLeft8)
23401 v.AddArg2(x, y)
23402 return true
23403 }
23404 break
23405 }
23406
23407
23408
23409 for {
23410 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23411 left := v_0
23412 if left.Op != OpLsh8x16 {
23413 continue
23414 }
23415 y := left.Args[1]
23416 x := left.Args[0]
23417 right := v_1
23418 if right.Op != OpRsh8Ux16 {
23419 continue
23420 }
23421 _ = right.Args[1]
23422 if x != right.Args[0] {
23423 continue
23424 }
23425 right_1 := right.Args[1]
23426 if right_1.Op != OpSub16 {
23427 continue
23428 }
23429 _ = right_1.Args[1]
23430 right_1_0 := right_1.Args[0]
23431 if right_1_0.Op != OpConst16 || auxIntToInt16(right_1_0.AuxInt) != 8 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 8)) {
23432 continue
23433 }
23434 v.reset(OpRotateLeft8)
23435 v.AddArg2(x, y)
23436 return true
23437 }
23438 break
23439 }
23440
23441
23442
23443 for {
23444 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23445 left := v_0
23446 if left.Op != OpLsh8x8 {
23447 continue
23448 }
23449 y := left.Args[1]
23450 x := left.Args[0]
23451 right := v_1
23452 if right.Op != OpRsh8Ux8 {
23453 continue
23454 }
23455 _ = right.Args[1]
23456 if x != right.Args[0] {
23457 continue
23458 }
23459 right_1 := right.Args[1]
23460 if right_1.Op != OpSub8 {
23461 continue
23462 }
23463 _ = right_1.Args[1]
23464 right_1_0 := right_1.Args[0]
23465 if right_1_0.Op != OpConst8 || auxIntToInt8(right_1_0.AuxInt) != 8 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 8)) {
23466 continue
23467 }
23468 v.reset(OpRotateLeft8)
23469 v.AddArg2(x, y)
23470 return true
23471 }
23472 break
23473 }
23474
23475
23476
23477 for {
23478 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23479 right := v_0
23480 if right.Op != OpRsh8Ux64 {
23481 continue
23482 }
23483 y := right.Args[1]
23484 x := right.Args[0]
23485 left := v_1
23486 if left.Op != OpLsh8x64 {
23487 continue
23488 }
23489 _ = left.Args[1]
23490 if x != left.Args[0] {
23491 continue
23492 }
23493 z := left.Args[1]
23494 if z.Op != OpSub64 {
23495 continue
23496 }
23497 _ = z.Args[1]
23498 z_0 := z.Args[0]
23499 if z_0.Op != OpConst64 || auxIntToInt64(z_0.AuxInt) != 8 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 8)) {
23500 continue
23501 }
23502 v.reset(OpRotateLeft8)
23503 v.AddArg2(x, z)
23504 return true
23505 }
23506 break
23507 }
23508
23509
23510
23511 for {
23512 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23513 right := v_0
23514 if right.Op != OpRsh8Ux32 {
23515 continue
23516 }
23517 y := right.Args[1]
23518 x := right.Args[0]
23519 left := v_1
23520 if left.Op != OpLsh8x32 {
23521 continue
23522 }
23523 _ = left.Args[1]
23524 if x != left.Args[0] {
23525 continue
23526 }
23527 z := left.Args[1]
23528 if z.Op != OpSub32 {
23529 continue
23530 }
23531 _ = z.Args[1]
23532 z_0 := z.Args[0]
23533 if z_0.Op != OpConst32 || auxIntToInt32(z_0.AuxInt) != 8 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 8)) {
23534 continue
23535 }
23536 v.reset(OpRotateLeft8)
23537 v.AddArg2(x, z)
23538 return true
23539 }
23540 break
23541 }
23542
23543
23544
23545 for {
23546 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23547 right := v_0
23548 if right.Op != OpRsh8Ux16 {
23549 continue
23550 }
23551 y := right.Args[1]
23552 x := right.Args[0]
23553 left := v_1
23554 if left.Op != OpLsh8x16 {
23555 continue
23556 }
23557 _ = left.Args[1]
23558 if x != left.Args[0] {
23559 continue
23560 }
23561 z := left.Args[1]
23562 if z.Op != OpSub16 {
23563 continue
23564 }
23565 _ = z.Args[1]
23566 z_0 := z.Args[0]
23567 if z_0.Op != OpConst16 || auxIntToInt16(z_0.AuxInt) != 8 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 8)) {
23568 continue
23569 }
23570 v.reset(OpRotateLeft8)
23571 v.AddArg2(x, z)
23572 return true
23573 }
23574 break
23575 }
23576
23577
23578
23579 for {
23580 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23581 right := v_0
23582 if right.Op != OpRsh8Ux8 {
23583 continue
23584 }
23585 y := right.Args[1]
23586 x := right.Args[0]
23587 left := v_1
23588 if left.Op != OpLsh8x8 {
23589 continue
23590 }
23591 _ = left.Args[1]
23592 if x != left.Args[0] {
23593 continue
23594 }
23595 z := left.Args[1]
23596 if z.Op != OpSub8 {
23597 continue
23598 }
23599 _ = z.Args[1]
23600 z_0 := z.Args[0]
23601 if z_0.Op != OpConst8 || auxIntToInt8(z_0.AuxInt) != 8 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 8)) {
23602 continue
23603 }
23604 v.reset(OpRotateLeft8)
23605 v.AddArg2(x, z)
23606 return true
23607 }
23608 break
23609 }
23610 return false
23611 }
23612 func rewriteValuegeneric_OpOrB(v *Value) bool {
23613 v_1 := v.Args[1]
23614 v_0 := v.Args[0]
23615 b := v.Block
23616
23617
23618
23619 for {
23620 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23621 if v_0.Op != OpLess64 {
23622 continue
23623 }
23624 x := v_0.Args[1]
23625 v_0_0 := v_0.Args[0]
23626 if v_0_0.Op != OpConst64 {
23627 continue
23628 }
23629 c := auxIntToInt64(v_0_0.AuxInt)
23630 if v_1.Op != OpLess64 {
23631 continue
23632 }
23633 _ = v_1.Args[1]
23634 if x != v_1.Args[0] {
23635 continue
23636 }
23637 v_1_1 := v_1.Args[1]
23638 if v_1_1.Op != OpConst64 {
23639 continue
23640 }
23641 d := auxIntToInt64(v_1_1.AuxInt)
23642 if !(c >= d) {
23643 continue
23644 }
23645 v.reset(OpLess64U)
23646 v0 := b.NewValue0(v.Pos, OpConst64, x.Type)
23647 v0.AuxInt = int64ToAuxInt(c - d)
23648 v1 := b.NewValue0(v.Pos, OpSub64, x.Type)
23649 v2 := b.NewValue0(v.Pos, OpConst64, x.Type)
23650 v2.AuxInt = int64ToAuxInt(d)
23651 v1.AddArg2(x, v2)
23652 v.AddArg2(v0, v1)
23653 return true
23654 }
23655 break
23656 }
23657
23658
23659
23660 for {
23661 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23662 if v_0.Op != OpLeq64 {
23663 continue
23664 }
23665 x := v_0.Args[1]
23666 v_0_0 := v_0.Args[0]
23667 if v_0_0.Op != OpConst64 {
23668 continue
23669 }
23670 c := auxIntToInt64(v_0_0.AuxInt)
23671 if v_1.Op != OpLess64 {
23672 continue
23673 }
23674 _ = v_1.Args[1]
23675 if x != v_1.Args[0] {
23676 continue
23677 }
23678 v_1_1 := v_1.Args[1]
23679 if v_1_1.Op != OpConst64 {
23680 continue
23681 }
23682 d := auxIntToInt64(v_1_1.AuxInt)
23683 if !(c >= d) {
23684 continue
23685 }
23686 v.reset(OpLeq64U)
23687 v0 := b.NewValue0(v.Pos, OpConst64, x.Type)
23688 v0.AuxInt = int64ToAuxInt(c - d)
23689 v1 := b.NewValue0(v.Pos, OpSub64, x.Type)
23690 v2 := b.NewValue0(v.Pos, OpConst64, x.Type)
23691 v2.AuxInt = int64ToAuxInt(d)
23692 v1.AddArg2(x, v2)
23693 v.AddArg2(v0, v1)
23694 return true
23695 }
23696 break
23697 }
23698
23699
23700
23701 for {
23702 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23703 if v_0.Op != OpLess32 {
23704 continue
23705 }
23706 x := v_0.Args[1]
23707 v_0_0 := v_0.Args[0]
23708 if v_0_0.Op != OpConst32 {
23709 continue
23710 }
23711 c := auxIntToInt32(v_0_0.AuxInt)
23712 if v_1.Op != OpLess32 {
23713 continue
23714 }
23715 _ = v_1.Args[1]
23716 if x != v_1.Args[0] {
23717 continue
23718 }
23719 v_1_1 := v_1.Args[1]
23720 if v_1_1.Op != OpConst32 {
23721 continue
23722 }
23723 d := auxIntToInt32(v_1_1.AuxInt)
23724 if !(c >= d) {
23725 continue
23726 }
23727 v.reset(OpLess32U)
23728 v0 := b.NewValue0(v.Pos, OpConst32, x.Type)
23729 v0.AuxInt = int32ToAuxInt(c - d)
23730 v1 := b.NewValue0(v.Pos, OpSub32, x.Type)
23731 v2 := b.NewValue0(v.Pos, OpConst32, x.Type)
23732 v2.AuxInt = int32ToAuxInt(d)
23733 v1.AddArg2(x, v2)
23734 v.AddArg2(v0, v1)
23735 return true
23736 }
23737 break
23738 }
23739
23740
23741
23742 for {
23743 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23744 if v_0.Op != OpLeq32 {
23745 continue
23746 }
23747 x := v_0.Args[1]
23748 v_0_0 := v_0.Args[0]
23749 if v_0_0.Op != OpConst32 {
23750 continue
23751 }
23752 c := auxIntToInt32(v_0_0.AuxInt)
23753 if v_1.Op != OpLess32 {
23754 continue
23755 }
23756 _ = v_1.Args[1]
23757 if x != v_1.Args[0] {
23758 continue
23759 }
23760 v_1_1 := v_1.Args[1]
23761 if v_1_1.Op != OpConst32 {
23762 continue
23763 }
23764 d := auxIntToInt32(v_1_1.AuxInt)
23765 if !(c >= d) {
23766 continue
23767 }
23768 v.reset(OpLeq32U)
23769 v0 := b.NewValue0(v.Pos, OpConst32, x.Type)
23770 v0.AuxInt = int32ToAuxInt(c - d)
23771 v1 := b.NewValue0(v.Pos, OpSub32, x.Type)
23772 v2 := b.NewValue0(v.Pos, OpConst32, x.Type)
23773 v2.AuxInt = int32ToAuxInt(d)
23774 v1.AddArg2(x, v2)
23775 v.AddArg2(v0, v1)
23776 return true
23777 }
23778 break
23779 }
23780
23781
23782
23783 for {
23784 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23785 if v_0.Op != OpLess16 {
23786 continue
23787 }
23788 x := v_0.Args[1]
23789 v_0_0 := v_0.Args[0]
23790 if v_0_0.Op != OpConst16 {
23791 continue
23792 }
23793 c := auxIntToInt16(v_0_0.AuxInt)
23794 if v_1.Op != OpLess16 {
23795 continue
23796 }
23797 _ = v_1.Args[1]
23798 if x != v_1.Args[0] {
23799 continue
23800 }
23801 v_1_1 := v_1.Args[1]
23802 if v_1_1.Op != OpConst16 {
23803 continue
23804 }
23805 d := auxIntToInt16(v_1_1.AuxInt)
23806 if !(c >= d) {
23807 continue
23808 }
23809 v.reset(OpLess16U)
23810 v0 := b.NewValue0(v.Pos, OpConst16, x.Type)
23811 v0.AuxInt = int16ToAuxInt(c - d)
23812 v1 := b.NewValue0(v.Pos, OpSub16, x.Type)
23813 v2 := b.NewValue0(v.Pos, OpConst16, x.Type)
23814 v2.AuxInt = int16ToAuxInt(d)
23815 v1.AddArg2(x, v2)
23816 v.AddArg2(v0, v1)
23817 return true
23818 }
23819 break
23820 }
23821
23822
23823
23824 for {
23825 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23826 if v_0.Op != OpLeq16 {
23827 continue
23828 }
23829 x := v_0.Args[1]
23830 v_0_0 := v_0.Args[0]
23831 if v_0_0.Op != OpConst16 {
23832 continue
23833 }
23834 c := auxIntToInt16(v_0_0.AuxInt)
23835 if v_1.Op != OpLess16 {
23836 continue
23837 }
23838 _ = v_1.Args[1]
23839 if x != v_1.Args[0] {
23840 continue
23841 }
23842 v_1_1 := v_1.Args[1]
23843 if v_1_1.Op != OpConst16 {
23844 continue
23845 }
23846 d := auxIntToInt16(v_1_1.AuxInt)
23847 if !(c >= d) {
23848 continue
23849 }
23850 v.reset(OpLeq16U)
23851 v0 := b.NewValue0(v.Pos, OpConst16, x.Type)
23852 v0.AuxInt = int16ToAuxInt(c - d)
23853 v1 := b.NewValue0(v.Pos, OpSub16, x.Type)
23854 v2 := b.NewValue0(v.Pos, OpConst16, x.Type)
23855 v2.AuxInt = int16ToAuxInt(d)
23856 v1.AddArg2(x, v2)
23857 v.AddArg2(v0, v1)
23858 return true
23859 }
23860 break
23861 }
23862
23863
23864
23865 for {
23866 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23867 if v_0.Op != OpLess8 {
23868 continue
23869 }
23870 x := v_0.Args[1]
23871 v_0_0 := v_0.Args[0]
23872 if v_0_0.Op != OpConst8 {
23873 continue
23874 }
23875 c := auxIntToInt8(v_0_0.AuxInt)
23876 if v_1.Op != OpLess8 {
23877 continue
23878 }
23879 _ = v_1.Args[1]
23880 if x != v_1.Args[0] {
23881 continue
23882 }
23883 v_1_1 := v_1.Args[1]
23884 if v_1_1.Op != OpConst8 {
23885 continue
23886 }
23887 d := auxIntToInt8(v_1_1.AuxInt)
23888 if !(c >= d) {
23889 continue
23890 }
23891 v.reset(OpLess8U)
23892 v0 := b.NewValue0(v.Pos, OpConst8, x.Type)
23893 v0.AuxInt = int8ToAuxInt(c - d)
23894 v1 := b.NewValue0(v.Pos, OpSub8, x.Type)
23895 v2 := b.NewValue0(v.Pos, OpConst8, x.Type)
23896 v2.AuxInt = int8ToAuxInt(d)
23897 v1.AddArg2(x, v2)
23898 v.AddArg2(v0, v1)
23899 return true
23900 }
23901 break
23902 }
23903
23904
23905
23906 for {
23907 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23908 if v_0.Op != OpLeq8 {
23909 continue
23910 }
23911 x := v_0.Args[1]
23912 v_0_0 := v_0.Args[0]
23913 if v_0_0.Op != OpConst8 {
23914 continue
23915 }
23916 c := auxIntToInt8(v_0_0.AuxInt)
23917 if v_1.Op != OpLess8 {
23918 continue
23919 }
23920 _ = v_1.Args[1]
23921 if x != v_1.Args[0] {
23922 continue
23923 }
23924 v_1_1 := v_1.Args[1]
23925 if v_1_1.Op != OpConst8 {
23926 continue
23927 }
23928 d := auxIntToInt8(v_1_1.AuxInt)
23929 if !(c >= d) {
23930 continue
23931 }
23932 v.reset(OpLeq8U)
23933 v0 := b.NewValue0(v.Pos, OpConst8, x.Type)
23934 v0.AuxInt = int8ToAuxInt(c - d)
23935 v1 := b.NewValue0(v.Pos, OpSub8, x.Type)
23936 v2 := b.NewValue0(v.Pos, OpConst8, x.Type)
23937 v2.AuxInt = int8ToAuxInt(d)
23938 v1.AddArg2(x, v2)
23939 v.AddArg2(v0, v1)
23940 return true
23941 }
23942 break
23943 }
23944
23945
23946
23947 for {
23948 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23949 if v_0.Op != OpLess64 {
23950 continue
23951 }
23952 x := v_0.Args[1]
23953 v_0_0 := v_0.Args[0]
23954 if v_0_0.Op != OpConst64 {
23955 continue
23956 }
23957 c := auxIntToInt64(v_0_0.AuxInt)
23958 if v_1.Op != OpLeq64 {
23959 continue
23960 }
23961 _ = v_1.Args[1]
23962 if x != v_1.Args[0] {
23963 continue
23964 }
23965 v_1_1 := v_1.Args[1]
23966 if v_1_1.Op != OpConst64 {
23967 continue
23968 }
23969 d := auxIntToInt64(v_1_1.AuxInt)
23970 if !(c >= d+1 && d+1 > d) {
23971 continue
23972 }
23973 v.reset(OpLess64U)
23974 v0 := b.NewValue0(v.Pos, OpConst64, x.Type)
23975 v0.AuxInt = int64ToAuxInt(c - d - 1)
23976 v1 := b.NewValue0(v.Pos, OpSub64, x.Type)
23977 v2 := b.NewValue0(v.Pos, OpConst64, x.Type)
23978 v2.AuxInt = int64ToAuxInt(d + 1)
23979 v1.AddArg2(x, v2)
23980 v.AddArg2(v0, v1)
23981 return true
23982 }
23983 break
23984 }
23985
23986
23987
23988 for {
23989 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23990 if v_0.Op != OpLeq64 {
23991 continue
23992 }
23993 x := v_0.Args[1]
23994 v_0_0 := v_0.Args[0]
23995 if v_0_0.Op != OpConst64 {
23996 continue
23997 }
23998 c := auxIntToInt64(v_0_0.AuxInt)
23999 if v_1.Op != OpLeq64 {
24000 continue
24001 }
24002 _ = v_1.Args[1]
24003 if x != v_1.Args[0] {
24004 continue
24005 }
24006 v_1_1 := v_1.Args[1]
24007 if v_1_1.Op != OpConst64 {
24008 continue
24009 }
24010 d := auxIntToInt64(v_1_1.AuxInt)
24011 if !(c >= d+1 && d+1 > d) {
24012 continue
24013 }
24014 v.reset(OpLeq64U)
24015 v0 := b.NewValue0(v.Pos, OpConst64, x.Type)
24016 v0.AuxInt = int64ToAuxInt(c - d - 1)
24017 v1 := b.NewValue0(v.Pos, OpSub64, x.Type)
24018 v2 := b.NewValue0(v.Pos, OpConst64, x.Type)
24019 v2.AuxInt = int64ToAuxInt(d + 1)
24020 v1.AddArg2(x, v2)
24021 v.AddArg2(v0, v1)
24022 return true
24023 }
24024 break
24025 }
24026
24027
24028
24029 for {
24030 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
24031 if v_0.Op != OpLess32 {
24032 continue
24033 }
24034 x := v_0.Args[1]
24035 v_0_0 := v_0.Args[0]
24036 if v_0_0.Op != OpConst32 {
24037 continue
24038 }
24039 c := auxIntToInt32(v_0_0.AuxInt)
24040 if v_1.Op != OpLeq32 {
24041 continue
24042 }
24043 _ = v_1.Args[1]
24044 if x != v_1.Args[0] {
24045 continue
24046 }
24047 v_1_1 := v_1.Args[1]
24048 if v_1_1.Op != OpConst32 {
24049 continue
24050 }
24051 d := auxIntToInt32(v_1_1.AuxInt)
24052 if !(c >= d+1 && d+1 > d) {
24053 continue
24054 }
24055 v.reset(OpLess32U)
24056 v0 := b.NewValue0(v.Pos, OpConst32, x.Type)
24057 v0.AuxInt = int32ToAuxInt(c - d - 1)
24058 v1 := b.NewValue0(v.Pos, OpSub32, x.Type)
24059 v2 := b.NewValue0(v.Pos, OpConst32, x.Type)
24060 v2.AuxInt = int32ToAuxInt(d + 1)
24061 v1.AddArg2(x, v2)
24062 v.AddArg2(v0, v1)
24063 return true
24064 }
24065 break
24066 }
24067
24068
24069
24070 for {
24071 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
24072 if v_0.Op != OpLeq32 {
24073 continue
24074 }
24075 x := v_0.Args[1]
24076 v_0_0 := v_0.Args[0]
24077 if v_0_0.Op != OpConst32 {
24078 continue
24079 }
24080 c := auxIntToInt32(v_0_0.AuxInt)
24081 if v_1.Op != OpLeq32 {
24082 continue
24083 }
24084 _ = v_1.Args[1]
24085 if x != v_1.Args[0] {
24086 continue
24087 }
24088 v_1_1 := v_1.Args[1]
24089 if v_1_1.Op != OpConst32 {
24090 continue
24091 }
24092 d := auxIntToInt32(v_1_1.AuxInt)
24093 if !(c >= d+1 && d+1 > d) {
24094 continue
24095 }
24096 v.reset(OpLeq32U)
24097 v0 := b.NewValue0(v.Pos, OpConst32, x.Type)
24098 v0.AuxInt = int32ToAuxInt(c - d - 1)
24099 v1 := b.NewValue0(v.Pos, OpSub32, x.Type)
24100 v2 := b.NewValue0(v.Pos, OpConst32, x.Type)
24101 v2.AuxInt = int32ToAuxInt(d + 1)
24102 v1.AddArg2(x, v2)
24103 v.AddArg2(v0, v1)
24104 return true
24105 }
24106 break
24107 }
24108
24109
24110
24111 for {
24112 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
24113 if v_0.Op != OpLess16 {
24114 continue
24115 }
24116 x := v_0.Args[1]
24117 v_0_0 := v_0.Args[0]
24118 if v_0_0.Op != OpConst16 {
24119 continue
24120 }
24121 c := auxIntToInt16(v_0_0.AuxInt)
24122 if v_1.Op != OpLeq16 {
24123 continue
24124 }
24125 _ = v_1.Args[1]
24126 if x != v_1.Args[0] {
24127 continue
24128 }
24129 v_1_1 := v_1.Args[1]
24130 if v_1_1.Op != OpConst16 {
24131 continue
24132 }
24133 d := auxIntToInt16(v_1_1.AuxInt)
24134 if !(c >= d+1 && d+1 > d) {
24135 continue
24136 }
24137 v.reset(OpLess16U)
24138 v0 := b.NewValue0(v.Pos, OpConst16, x.Type)
24139 v0.AuxInt = int16ToAuxInt(c - d - 1)
24140 v1 := b.NewValue0(v.Pos, OpSub16, x.Type)
24141 v2 := b.NewValue0(v.Pos, OpConst16, x.Type)
24142 v2.AuxInt = int16ToAuxInt(d + 1)
24143 v1.AddArg2(x, v2)
24144 v.AddArg2(v0, v1)
24145 return true
24146 }
24147 break
24148 }
24149
24150
24151
24152 for {
24153 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
24154 if v_0.Op != OpLeq16 {
24155 continue
24156 }
24157 x := v_0.Args[1]
24158 v_0_0 := v_0.Args[0]
24159 if v_0_0.Op != OpConst16 {
24160 continue
24161 }
24162 c := auxIntToInt16(v_0_0.AuxInt)
24163 if v_1.Op != OpLeq16 {
24164 continue
24165 }
24166 _ = v_1.Args[1]
24167 if x != v_1.Args[0] {
24168 continue
24169 }
24170 v_1_1 := v_1.Args[1]
24171 if v_1_1.Op != OpConst16 {
24172 continue
24173 }
24174 d := auxIntToInt16(v_1_1.AuxInt)
24175 if !(c >= d+1 && d+1 > d) {
24176 continue
24177 }
24178 v.reset(OpLeq16U)
24179 v0 := b.NewValue0(v.Pos, OpConst16, x.Type)
24180 v0.AuxInt = int16ToAuxInt(c - d - 1)
24181 v1 := b.NewValue0(v.Pos, OpSub16, x.Type)
24182 v2 := b.NewValue0(v.Pos, OpConst16, x.Type)
24183 v2.AuxInt = int16ToAuxInt(d + 1)
24184 v1.AddArg2(x, v2)
24185 v.AddArg2(v0, v1)
24186 return true
24187 }
24188 break
24189 }
24190
24191
24192
24193 for {
24194 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
24195 if v_0.Op != OpLess8 {
24196 continue
24197 }
24198 x := v_0.Args[1]
24199 v_0_0 := v_0.Args[0]
24200 if v_0_0.Op != OpConst8 {
24201 continue
24202 }
24203 c := auxIntToInt8(v_0_0.AuxInt)
24204 if v_1.Op != OpLeq8 {
24205 continue
24206 }
24207 _ = v_1.Args[1]
24208 if x != v_1.Args[0] {
24209 continue
24210 }
24211 v_1_1 := v_1.Args[1]
24212 if v_1_1.Op != OpConst8 {
24213 continue
24214 }
24215 d := auxIntToInt8(v_1_1.AuxInt)
24216 if !(c >= d+1 && d+1 > d) {
24217 continue
24218 }
24219 v.reset(OpLess8U)
24220 v0 := b.NewValue0(v.Pos, OpConst8, x.Type)
24221 v0.AuxInt = int8ToAuxInt(c - d - 1)
24222 v1 := b.NewValue0(v.Pos, OpSub8, x.Type)
24223 v2 := b.NewValue0(v.Pos, OpConst8, x.Type)
24224 v2.AuxInt = int8ToAuxInt(d + 1)
24225 v1.AddArg2(x, v2)
24226 v.AddArg2(v0, v1)
24227 return true
24228 }
24229 break
24230 }
24231
24232
24233
24234 for {
24235 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
24236 if v_0.Op != OpLeq8 {
24237 continue
24238 }
24239 x := v_0.Args[1]
24240 v_0_0 := v_0.Args[0]
24241 if v_0_0.Op != OpConst8 {
24242 continue
24243 }
24244 c := auxIntToInt8(v_0_0.AuxInt)
24245 if v_1.Op != OpLeq8 {
24246 continue
24247 }
24248 _ = v_1.Args[1]
24249 if x != v_1.Args[0] {
24250 continue
24251 }
24252 v_1_1 := v_1.Args[1]
24253 if v_1_1.Op != OpConst8 {
24254 continue
24255 }
24256 d := auxIntToInt8(v_1_1.AuxInt)
24257 if !(c >= d+1 && d+1 > d) {
24258 continue
24259 }
24260 v.reset(OpLeq8U)
24261 v0 := b.NewValue0(v.Pos, OpConst8, x.Type)
24262 v0.AuxInt = int8ToAuxInt(c - d - 1)
24263 v1 := b.NewValue0(v.Pos, OpSub8, x.Type)
24264 v2 := b.NewValue0(v.Pos, OpConst8, x.Type)
24265 v2.AuxInt = int8ToAuxInt(d + 1)
24266 v1.AddArg2(x, v2)
24267 v.AddArg2(v0, v1)
24268 return true
24269 }
24270 break
24271 }
24272
24273
24274
24275 for {
24276 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
24277 if v_0.Op != OpLess64U {
24278 continue
24279 }
24280 x := v_0.Args[1]
24281 v_0_0 := v_0.Args[0]
24282 if v_0_0.Op != OpConst64 {
24283 continue
24284 }
24285 c := auxIntToInt64(v_0_0.AuxInt)
24286 if v_1.Op != OpLess64U {
24287 continue
24288 }
24289 _ = v_1.Args[1]
24290 if x != v_1.Args[0] {
24291 continue
24292 }
24293 v_1_1 := v_1.Args[1]
24294 if v_1_1.Op != OpConst64 {
24295 continue
24296 }
24297 d := auxIntToInt64(v_1_1.AuxInt)
24298 if !(uint64(c) >= uint64(d)) {
24299 continue
24300 }
24301 v.reset(OpLess64U)
24302 v0 := b.NewValue0(v.Pos, OpConst64, x.Type)
24303 v0.AuxInt = int64ToAuxInt(c - d)
24304 v1 := b.NewValue0(v.Pos, OpSub64, x.Type)
24305 v2 := b.NewValue0(v.Pos, OpConst64, x.Type)
24306 v2.AuxInt = int64ToAuxInt(d)
24307 v1.AddArg2(x, v2)
24308 v.AddArg2(v0, v1)
24309 return true
24310 }
24311 break
24312 }
24313
24314
24315
24316 for {
24317 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
24318 if v_0.Op != OpLeq64U {
24319 continue
24320 }
24321 x := v_0.Args[1]
24322 v_0_0 := v_0.Args[0]
24323 if v_0_0.Op != OpConst64 {
24324 continue
24325 }
24326 c := auxIntToInt64(v_0_0.AuxInt)
24327 if v_1.Op != OpLess64U {
24328 continue
24329 }
24330 _ = v_1.Args[1]
24331 if x != v_1.Args[0] {
24332 continue
24333 }
24334 v_1_1 := v_1.Args[1]
24335 if v_1_1.Op != OpConst64 {
24336 continue
24337 }
24338 d := auxIntToInt64(v_1_1.AuxInt)
24339 if !(uint64(c) >= uint64(d)) {
24340 continue
24341 }
24342 v.reset(OpLeq64U)
24343 v0 := b.NewValue0(v.Pos, OpConst64, x.Type)
24344 v0.AuxInt = int64ToAuxInt(c - d)
24345 v1 := b.NewValue0(v.Pos, OpSub64, x.Type)
24346 v2 := b.NewValue0(v.Pos, OpConst64, x.Type)
24347 v2.AuxInt = int64ToAuxInt(d)
24348 v1.AddArg2(x, v2)
24349 v.AddArg2(v0, v1)
24350 return true
24351 }
24352 break
24353 }
24354
24355
24356
24357 for {
24358 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
24359 if v_0.Op != OpLess32U {
24360 continue
24361 }
24362 x := v_0.Args[1]
24363 v_0_0 := v_0.Args[0]
24364 if v_0_0.Op != OpConst32 {
24365 continue
24366 }
24367 c := auxIntToInt32(v_0_0.AuxInt)
24368 if v_1.Op != OpLess32U {
24369 continue
24370 }
24371 _ = v_1.Args[1]
24372 if x != v_1.Args[0] {
24373 continue
24374 }
24375 v_1_1 := v_1.Args[1]
24376 if v_1_1.Op != OpConst32 {
24377 continue
24378 }
24379 d := auxIntToInt32(v_1_1.AuxInt)
24380 if !(uint32(c) >= uint32(d)) {
24381 continue
24382 }
24383 v.reset(OpLess32U)
24384 v0 := b.NewValue0(v.Pos, OpConst32, x.Type)
24385 v0.AuxInt = int32ToAuxInt(c - d)
24386 v1 := b.NewValue0(v.Pos, OpSub32, x.Type)
24387 v2 := b.NewValue0(v.Pos, OpConst32, x.Type)
24388 v2.AuxInt = int32ToAuxInt(d)
24389 v1.AddArg2(x, v2)
24390 v.AddArg2(v0, v1)
24391 return true
24392 }
24393 break
24394 }
24395
24396
24397
24398 for {
24399 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
24400 if v_0.Op != OpLeq32U {
24401 continue
24402 }
24403 x := v_0.Args[1]
24404 v_0_0 := v_0.Args[0]
24405 if v_0_0.Op != OpConst32 {
24406 continue
24407 }
24408 c := auxIntToInt32(v_0_0.AuxInt)
24409 if v_1.Op != OpLess32U {
24410 continue
24411 }
24412 _ = v_1.Args[1]
24413 if x != v_1.Args[0] {
24414 continue
24415 }
24416 v_1_1 := v_1.Args[1]
24417 if v_1_1.Op != OpConst32 {
24418 continue
24419 }
24420 d := auxIntToInt32(v_1_1.AuxInt)
24421 if !(uint32(c) >= uint32(d)) {
24422 continue
24423 }
24424 v.reset(OpLeq32U)
24425 v0 := b.NewValue0(v.Pos, OpConst32, x.Type)
24426 v0.AuxInt = int32ToAuxInt(c - d)
24427 v1 := b.NewValue0(v.Pos, OpSub32, x.Type)
24428 v2 := b.NewValue0(v.Pos, OpConst32, x.Type)
24429 v2.AuxInt = int32ToAuxInt(d)
24430 v1.AddArg2(x, v2)
24431 v.AddArg2(v0, v1)
24432 return true
24433 }
24434 break
24435 }
24436
24437
24438
24439 for {
24440 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
24441 if v_0.Op != OpLess16U {
24442 continue
24443 }
24444 x := v_0.Args[1]
24445 v_0_0 := v_0.Args[0]
24446 if v_0_0.Op != OpConst16 {
24447 continue
24448 }
24449 c := auxIntToInt16(v_0_0.AuxInt)
24450 if v_1.Op != OpLess16U {
24451 continue
24452 }
24453 _ = v_1.Args[1]
24454 if x != v_1.Args[0] {
24455 continue
24456 }
24457 v_1_1 := v_1.Args[1]
24458 if v_1_1.Op != OpConst16 {
24459 continue
24460 }
24461 d := auxIntToInt16(v_1_1.AuxInt)
24462 if !(uint16(c) >= uint16(d)) {
24463 continue
24464 }
24465 v.reset(OpLess16U)
24466 v0 := b.NewValue0(v.Pos, OpConst16, x.Type)
24467 v0.AuxInt = int16ToAuxInt(c - d)
24468 v1 := b.NewValue0(v.Pos, OpSub16, x.Type)
24469 v2 := b.NewValue0(v.Pos, OpConst16, x.Type)
24470 v2.AuxInt = int16ToAuxInt(d)
24471 v1.AddArg2(x, v2)
24472 v.AddArg2(v0, v1)
24473 return true
24474 }
24475 break
24476 }
24477
24478
24479
24480 for {
24481 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
24482 if v_0.Op != OpLeq16U {
24483 continue
24484 }
24485 x := v_0.Args[1]
24486 v_0_0 := v_0.Args[0]
24487 if v_0_0.Op != OpConst16 {
24488 continue
24489 }
24490 c := auxIntToInt16(v_0_0.AuxInt)
24491 if v_1.Op != OpLess16U {
24492 continue
24493 }
24494 _ = v_1.Args[1]
24495 if x != v_1.Args[0] {
24496 continue
24497 }
24498 v_1_1 := v_1.Args[1]
24499 if v_1_1.Op != OpConst16 {
24500 continue
24501 }
24502 d := auxIntToInt16(v_1_1.AuxInt)
24503 if !(uint16(c) >= uint16(d)) {
24504 continue
24505 }
24506 v.reset(OpLeq16U)
24507 v0 := b.NewValue0(v.Pos, OpConst16, x.Type)
24508 v0.AuxInt = int16ToAuxInt(c - d)
24509 v1 := b.NewValue0(v.Pos, OpSub16, x.Type)
24510 v2 := b.NewValue0(v.Pos, OpConst16, x.Type)
24511 v2.AuxInt = int16ToAuxInt(d)
24512 v1.AddArg2(x, v2)
24513 v.AddArg2(v0, v1)
24514 return true
24515 }
24516 break
24517 }
24518
24519
24520
24521 for {
24522 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
24523 if v_0.Op != OpLess8U {
24524 continue
24525 }
24526 x := v_0.Args[1]
24527 v_0_0 := v_0.Args[0]
24528 if v_0_0.Op != OpConst8 {
24529 continue
24530 }
24531 c := auxIntToInt8(v_0_0.AuxInt)
24532 if v_1.Op != OpLess8U {
24533 continue
24534 }
24535 _ = v_1.Args[1]
24536 if x != v_1.Args[0] {
24537 continue
24538 }
24539 v_1_1 := v_1.Args[1]
24540 if v_1_1.Op != OpConst8 {
24541 continue
24542 }
24543 d := auxIntToInt8(v_1_1.AuxInt)
24544 if !(uint8(c) >= uint8(d)) {
24545 continue
24546 }
24547 v.reset(OpLess8U)
24548 v0 := b.NewValue0(v.Pos, OpConst8, x.Type)
24549 v0.AuxInt = int8ToAuxInt(c - d)
24550 v1 := b.NewValue0(v.Pos, OpSub8, x.Type)
24551 v2 := b.NewValue0(v.Pos, OpConst8, x.Type)
24552 v2.AuxInt = int8ToAuxInt(d)
24553 v1.AddArg2(x, v2)
24554 v.AddArg2(v0, v1)
24555 return true
24556 }
24557 break
24558 }
24559
24560
24561
24562 for {
24563 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
24564 if v_0.Op != OpLeq8U {
24565 continue
24566 }
24567 x := v_0.Args[1]
24568 v_0_0 := v_0.Args[0]
24569 if v_0_0.Op != OpConst8 {
24570 continue
24571 }
24572 c := auxIntToInt8(v_0_0.AuxInt)
24573 if v_1.Op != OpLess8U {
24574 continue
24575 }
24576 _ = v_1.Args[1]
24577 if x != v_1.Args[0] {
24578 continue
24579 }
24580 v_1_1 := v_1.Args[1]
24581 if v_1_1.Op != OpConst8 {
24582 continue
24583 }
24584 d := auxIntToInt8(v_1_1.AuxInt)
24585 if !(uint8(c) >= uint8(d)) {
24586 continue
24587 }
24588 v.reset(OpLeq8U)
24589 v0 := b.NewValue0(v.Pos, OpConst8, x.Type)
24590 v0.AuxInt = int8ToAuxInt(c - d)
24591 v1 := b.NewValue0(v.Pos, OpSub8, x.Type)
24592 v2 := b.NewValue0(v.Pos, OpConst8, x.Type)
24593 v2.AuxInt = int8ToAuxInt(d)
24594 v1.AddArg2(x, v2)
24595 v.AddArg2(v0, v1)
24596 return true
24597 }
24598 break
24599 }
24600
24601
24602
24603 for {
24604 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
24605 if v_0.Op != OpLess64U {
24606 continue
24607 }
24608 x := v_0.Args[1]
24609 v_0_0 := v_0.Args[0]
24610 if v_0_0.Op != OpConst64 {
24611 continue
24612 }
24613 c := auxIntToInt64(v_0_0.AuxInt)
24614 if v_1.Op != OpLeq64U {
24615 continue
24616 }
24617 _ = v_1.Args[1]
24618 if x != v_1.Args[0] {
24619 continue
24620 }
24621 v_1_1 := v_1.Args[1]
24622 if v_1_1.Op != OpConst64 {
24623 continue
24624 }
24625 d := auxIntToInt64(v_1_1.AuxInt)
24626 if !(uint64(c) >= uint64(d+1) && uint64(d+1) > uint64(d)) {
24627 continue
24628 }
24629 v.reset(OpLess64U)
24630 v0 := b.NewValue0(v.Pos, OpConst64, x.Type)
24631 v0.AuxInt = int64ToAuxInt(c - d - 1)
24632 v1 := b.NewValue0(v.Pos, OpSub64, x.Type)
24633 v2 := b.NewValue0(v.Pos, OpConst64, x.Type)
24634 v2.AuxInt = int64ToAuxInt(d + 1)
24635 v1.AddArg2(x, v2)
24636 v.AddArg2(v0, v1)
24637 return true
24638 }
24639 break
24640 }
24641
24642
24643
24644 for {
24645 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
24646 if v_0.Op != OpLeq64U {
24647 continue
24648 }
24649 x := v_0.Args[1]
24650 v_0_0 := v_0.Args[0]
24651 if v_0_0.Op != OpConst64 {
24652 continue
24653 }
24654 c := auxIntToInt64(v_0_0.AuxInt)
24655 if v_1.Op != OpLeq64U {
24656 continue
24657 }
24658 _ = v_1.Args[1]
24659 if x != v_1.Args[0] {
24660 continue
24661 }
24662 v_1_1 := v_1.Args[1]
24663 if v_1_1.Op != OpConst64 {
24664 continue
24665 }
24666 d := auxIntToInt64(v_1_1.AuxInt)
24667 if !(uint64(c) >= uint64(d+1) && uint64(d+1) > uint64(d)) {
24668 continue
24669 }
24670 v.reset(OpLeq64U)
24671 v0 := b.NewValue0(v.Pos, OpConst64, x.Type)
24672 v0.AuxInt = int64ToAuxInt(c - d - 1)
24673 v1 := b.NewValue0(v.Pos, OpSub64, x.Type)
24674 v2 := b.NewValue0(v.Pos, OpConst64, x.Type)
24675 v2.AuxInt = int64ToAuxInt(d + 1)
24676 v1.AddArg2(x, v2)
24677 v.AddArg2(v0, v1)
24678 return true
24679 }
24680 break
24681 }
24682
24683
24684
24685 for {
24686 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
24687 if v_0.Op != OpLess32U {
24688 continue
24689 }
24690 x := v_0.Args[1]
24691 v_0_0 := v_0.Args[0]
24692 if v_0_0.Op != OpConst32 {
24693 continue
24694 }
24695 c := auxIntToInt32(v_0_0.AuxInt)
24696 if v_1.Op != OpLeq32U {
24697 continue
24698 }
24699 _ = v_1.Args[1]
24700 if x != v_1.Args[0] {
24701 continue
24702 }
24703 v_1_1 := v_1.Args[1]
24704 if v_1_1.Op != OpConst32 {
24705 continue
24706 }
24707 d := auxIntToInt32(v_1_1.AuxInt)
24708 if !(uint32(c) >= uint32(d+1) && uint32(d+1) > uint32(d)) {
24709 continue
24710 }
24711 v.reset(OpLess32U)
24712 v0 := b.NewValue0(v.Pos, OpConst32, x.Type)
24713 v0.AuxInt = int32ToAuxInt(c - d - 1)
24714 v1 := b.NewValue0(v.Pos, OpSub32, x.Type)
24715 v2 := b.NewValue0(v.Pos, OpConst32, x.Type)
24716 v2.AuxInt = int32ToAuxInt(d + 1)
24717 v1.AddArg2(x, v2)
24718 v.AddArg2(v0, v1)
24719 return true
24720 }
24721 break
24722 }
24723
24724
24725
24726 for {
24727 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
24728 if v_0.Op != OpLeq32U {
24729 continue
24730 }
24731 x := v_0.Args[1]
24732 v_0_0 := v_0.Args[0]
24733 if v_0_0.Op != OpConst32 {
24734 continue
24735 }
24736 c := auxIntToInt32(v_0_0.AuxInt)
24737 if v_1.Op != OpLeq32U {
24738 continue
24739 }
24740 _ = v_1.Args[1]
24741 if x != v_1.Args[0] {
24742 continue
24743 }
24744 v_1_1 := v_1.Args[1]
24745 if v_1_1.Op != OpConst32 {
24746 continue
24747 }
24748 d := auxIntToInt32(v_1_1.AuxInt)
24749 if !(uint32(c) >= uint32(d+1) && uint32(d+1) > uint32(d)) {
24750 continue
24751 }
24752 v.reset(OpLeq32U)
24753 v0 := b.NewValue0(v.Pos, OpConst32, x.Type)
24754 v0.AuxInt = int32ToAuxInt(c - d - 1)
24755 v1 := b.NewValue0(v.Pos, OpSub32, x.Type)
24756 v2 := b.NewValue0(v.Pos, OpConst32, x.Type)
24757 v2.AuxInt = int32ToAuxInt(d + 1)
24758 v1.AddArg2(x, v2)
24759 v.AddArg2(v0, v1)
24760 return true
24761 }
24762 break
24763 }
24764
24765
24766
24767 for {
24768 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
24769 if v_0.Op != OpLess16U {
24770 continue
24771 }
24772 x := v_0.Args[1]
24773 v_0_0 := v_0.Args[0]
24774 if v_0_0.Op != OpConst16 {
24775 continue
24776 }
24777 c := auxIntToInt16(v_0_0.AuxInt)
24778 if v_1.Op != OpLeq16U {
24779 continue
24780 }
24781 _ = v_1.Args[1]
24782 if x != v_1.Args[0] {
24783 continue
24784 }
24785 v_1_1 := v_1.Args[1]
24786 if v_1_1.Op != OpConst16 {
24787 continue
24788 }
24789 d := auxIntToInt16(v_1_1.AuxInt)
24790 if !(uint16(c) >= uint16(d+1) && uint16(d+1) > uint16(d)) {
24791 continue
24792 }
24793 v.reset(OpLess16U)
24794 v0 := b.NewValue0(v.Pos, OpConst16, x.Type)
24795 v0.AuxInt = int16ToAuxInt(c - d - 1)
24796 v1 := b.NewValue0(v.Pos, OpSub16, x.Type)
24797 v2 := b.NewValue0(v.Pos, OpConst16, x.Type)
24798 v2.AuxInt = int16ToAuxInt(d + 1)
24799 v1.AddArg2(x, v2)
24800 v.AddArg2(v0, v1)
24801 return true
24802 }
24803 break
24804 }
24805
24806
24807
24808 for {
24809 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
24810 if v_0.Op != OpLeq16U {
24811 continue
24812 }
24813 x := v_0.Args[1]
24814 v_0_0 := v_0.Args[0]
24815 if v_0_0.Op != OpConst16 {
24816 continue
24817 }
24818 c := auxIntToInt16(v_0_0.AuxInt)
24819 if v_1.Op != OpLeq16U {
24820 continue
24821 }
24822 _ = v_1.Args[1]
24823 if x != v_1.Args[0] {
24824 continue
24825 }
24826 v_1_1 := v_1.Args[1]
24827 if v_1_1.Op != OpConst16 {
24828 continue
24829 }
24830 d := auxIntToInt16(v_1_1.AuxInt)
24831 if !(uint16(c) >= uint16(d+1) && uint16(d+1) > uint16(d)) {
24832 continue
24833 }
24834 v.reset(OpLeq16U)
24835 v0 := b.NewValue0(v.Pos, OpConst16, x.Type)
24836 v0.AuxInt = int16ToAuxInt(c - d - 1)
24837 v1 := b.NewValue0(v.Pos, OpSub16, x.Type)
24838 v2 := b.NewValue0(v.Pos, OpConst16, x.Type)
24839 v2.AuxInt = int16ToAuxInt(d + 1)
24840 v1.AddArg2(x, v2)
24841 v.AddArg2(v0, v1)
24842 return true
24843 }
24844 break
24845 }
24846
24847
24848
24849 for {
24850 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
24851 if v_0.Op != OpLess8U {
24852 continue
24853 }
24854 x := v_0.Args[1]
24855 v_0_0 := v_0.Args[0]
24856 if v_0_0.Op != OpConst8 {
24857 continue
24858 }
24859 c := auxIntToInt8(v_0_0.AuxInt)
24860 if v_1.Op != OpLeq8U {
24861 continue
24862 }
24863 _ = v_1.Args[1]
24864 if x != v_1.Args[0] {
24865 continue
24866 }
24867 v_1_1 := v_1.Args[1]
24868 if v_1_1.Op != OpConst8 {
24869 continue
24870 }
24871 d := auxIntToInt8(v_1_1.AuxInt)
24872 if !(uint8(c) >= uint8(d+1) && uint8(d+1) > uint8(d)) {
24873 continue
24874 }
24875 v.reset(OpLess8U)
24876 v0 := b.NewValue0(v.Pos, OpConst8, x.Type)
24877 v0.AuxInt = int8ToAuxInt(c - d - 1)
24878 v1 := b.NewValue0(v.Pos, OpSub8, x.Type)
24879 v2 := b.NewValue0(v.Pos, OpConst8, x.Type)
24880 v2.AuxInt = int8ToAuxInt(d + 1)
24881 v1.AddArg2(x, v2)
24882 v.AddArg2(v0, v1)
24883 return true
24884 }
24885 break
24886 }
24887
24888
24889
24890 for {
24891 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
24892 if v_0.Op != OpLeq8U {
24893 continue
24894 }
24895 x := v_0.Args[1]
24896 v_0_0 := v_0.Args[0]
24897 if v_0_0.Op != OpConst8 {
24898 continue
24899 }
24900 c := auxIntToInt8(v_0_0.AuxInt)
24901 if v_1.Op != OpLeq8U {
24902 continue
24903 }
24904 _ = v_1.Args[1]
24905 if x != v_1.Args[0] {
24906 continue
24907 }
24908 v_1_1 := v_1.Args[1]
24909 if v_1_1.Op != OpConst8 {
24910 continue
24911 }
24912 d := auxIntToInt8(v_1_1.AuxInt)
24913 if !(uint8(c) >= uint8(d+1) && uint8(d+1) > uint8(d)) {
24914 continue
24915 }
24916 v.reset(OpLeq8U)
24917 v0 := b.NewValue0(v.Pos, OpConst8, x.Type)
24918 v0.AuxInt = int8ToAuxInt(c - d - 1)
24919 v1 := b.NewValue0(v.Pos, OpSub8, x.Type)
24920 v2 := b.NewValue0(v.Pos, OpConst8, x.Type)
24921 v2.AuxInt = int8ToAuxInt(d + 1)
24922 v1.AddArg2(x, v2)
24923 v.AddArg2(v0, v1)
24924 return true
24925 }
24926 break
24927 }
24928 return false
24929 }
24930 func rewriteValuegeneric_OpPhi(v *Value) bool {
24931 b := v.Block
24932
24933
24934 for {
24935 if len(v.Args) != 2 {
24936 break
24937 }
24938 _ = v.Args[1]
24939 v_0 := v.Args[0]
24940 if v_0.Op != OpConst8 {
24941 break
24942 }
24943 c := auxIntToInt8(v_0.AuxInt)
24944 v_1 := v.Args[1]
24945 if v_1.Op != OpConst8 || auxIntToInt8(v_1.AuxInt) != c {
24946 break
24947 }
24948 v.reset(OpConst8)
24949 v.AuxInt = int8ToAuxInt(c)
24950 return true
24951 }
24952
24953
24954 for {
24955 if len(v.Args) != 2 {
24956 break
24957 }
24958 _ = v.Args[1]
24959 v_0 := v.Args[0]
24960 if v_0.Op != OpConst16 {
24961 break
24962 }
24963 c := auxIntToInt16(v_0.AuxInt)
24964 v_1 := v.Args[1]
24965 if v_1.Op != OpConst16 || auxIntToInt16(v_1.AuxInt) != c {
24966 break
24967 }
24968 v.reset(OpConst16)
24969 v.AuxInt = int16ToAuxInt(c)
24970 return true
24971 }
24972
24973
24974 for {
24975 if len(v.Args) != 2 {
24976 break
24977 }
24978 _ = v.Args[1]
24979 v_0 := v.Args[0]
24980 if v_0.Op != OpConst32 {
24981 break
24982 }
24983 c := auxIntToInt32(v_0.AuxInt)
24984 v_1 := v.Args[1]
24985 if v_1.Op != OpConst32 || auxIntToInt32(v_1.AuxInt) != c {
24986 break
24987 }
24988 v.reset(OpConst32)
24989 v.AuxInt = int32ToAuxInt(c)
24990 return true
24991 }
24992
24993
24994 for {
24995 if len(v.Args) != 2 {
24996 break
24997 }
24998 _ = v.Args[1]
24999 v_0 := v.Args[0]
25000 if v_0.Op != OpConst64 {
25001 break
25002 }
25003 c := auxIntToInt64(v_0.AuxInt)
25004 v_1 := v.Args[1]
25005 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != c {
25006 break
25007 }
25008 v.reset(OpConst64)
25009 v.AuxInt = int64ToAuxInt(c)
25010 return true
25011 }
25012
25013
25014
25015 for {
25016 if len(v.Args) != 2 {
25017 break
25018 }
25019 t := v.Type
25020 _ = v.Args[1]
25021 nx := v.Args[0]
25022 if nx.Op != OpNot {
25023 break
25024 }
25025 x := nx.Args[0]
25026 ny := v.Args[1]
25027 if ny.Op != OpNot {
25028 break
25029 }
25030 y := ny.Args[0]
25031 if !(nx.Uses == 1 && ny.Uses == 1) {
25032 break
25033 }
25034 v.reset(OpNot)
25035 v0 := b.NewValue0(v.Pos, OpPhi, t)
25036 v0.AddArg2(x, y)
25037 v.AddArg(v0)
25038 return true
25039 }
25040 return false
25041 }
25042 func rewriteValuegeneric_OpPopCount16(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 != OpConst16 {
25051 break
25052 }
25053 c := auxIntToInt16(v_0.AuxInt)
25054 if !(config.PtrSize == 8) {
25055 break
25056 }
25057 v.reset(OpConst64)
25058 v.AuxInt = int64ToAuxInt(int64(bits.OnesCount16(uint16(c))))
25059 return true
25060 }
25061
25062
25063
25064 for {
25065 if v_0.Op != OpConst16 {
25066 break
25067 }
25068 c := auxIntToInt16(v_0.AuxInt)
25069 if !(config.PtrSize == 4) {
25070 break
25071 }
25072 v.reset(OpConst32)
25073 v.AuxInt = int32ToAuxInt(int32(bits.OnesCount16(uint16(c))))
25074 return true
25075 }
25076 return false
25077 }
25078 func rewriteValuegeneric_OpPopCount32(v *Value) bool {
25079 v_0 := v.Args[0]
25080 b := v.Block
25081 config := b.Func.Config
25082
25083
25084
25085 for {
25086 if v_0.Op != OpConst32 {
25087 break
25088 }
25089 c := auxIntToInt32(v_0.AuxInt)
25090 if !(config.PtrSize == 8) {
25091 break
25092 }
25093 v.reset(OpConst64)
25094 v.AuxInt = int64ToAuxInt(int64(bits.OnesCount32(uint32(c))))
25095 return true
25096 }
25097
25098
25099
25100 for {
25101 if v_0.Op != OpConst32 {
25102 break
25103 }
25104 c := auxIntToInt32(v_0.AuxInt)
25105 if !(config.PtrSize == 4) {
25106 break
25107 }
25108 v.reset(OpConst32)
25109 v.AuxInt = int32ToAuxInt(int32(bits.OnesCount32(uint32(c))))
25110 return true
25111 }
25112 return false
25113 }
25114 func rewriteValuegeneric_OpPopCount64(v *Value) bool {
25115 v_0 := v.Args[0]
25116 b := v.Block
25117 config := b.Func.Config
25118
25119
25120
25121 for {
25122 if v_0.Op != OpConst64 {
25123 break
25124 }
25125 c := auxIntToInt64(v_0.AuxInt)
25126 if !(config.PtrSize == 8) {
25127 break
25128 }
25129 v.reset(OpConst64)
25130 v.AuxInt = int64ToAuxInt(int64(bits.OnesCount64(uint64(c))))
25131 return true
25132 }
25133
25134
25135
25136 for {
25137 if v_0.Op != OpConst64 {
25138 break
25139 }
25140 c := auxIntToInt64(v_0.AuxInt)
25141 if !(config.PtrSize == 4) {
25142 break
25143 }
25144 v.reset(OpConst32)
25145 v.AuxInt = int32ToAuxInt(int32(bits.OnesCount64(uint64(c))))
25146 return true
25147 }
25148 return false
25149 }
25150 func rewriteValuegeneric_OpPopCount8(v *Value) bool {
25151 v_0 := v.Args[0]
25152 b := v.Block
25153 config := b.Func.Config
25154
25155
25156
25157 for {
25158 if v_0.Op != OpConst8 {
25159 break
25160 }
25161 c := auxIntToInt8(v_0.AuxInt)
25162 if !(config.PtrSize == 8) {
25163 break
25164 }
25165 v.reset(OpConst64)
25166 v.AuxInt = int64ToAuxInt(int64(bits.OnesCount8(uint8(c))))
25167 return true
25168 }
25169
25170
25171
25172 for {
25173 if v_0.Op != OpConst8 {
25174 break
25175 }
25176 c := auxIntToInt8(v_0.AuxInt)
25177 if !(config.PtrSize == 4) {
25178 break
25179 }
25180 v.reset(OpConst32)
25181 v.AuxInt = int32ToAuxInt(int32(bits.OnesCount8(uint8(c))))
25182 return true
25183 }
25184 return false
25185 }
25186 func rewriteValuegeneric_OpPtrIndex(v *Value) bool {
25187 v_1 := v.Args[1]
25188 v_0 := v.Args[0]
25189 b := v.Block
25190 config := b.Func.Config
25191 typ := &b.Func.Config.Types
25192
25193
25194
25195 for {
25196 t := v.Type
25197 ptr := v_0
25198 idx := v_1
25199 if !(config.PtrSize == 4 && is32Bit(t.Elem().Size())) {
25200 break
25201 }
25202 v.reset(OpAddPtr)
25203 v0 := b.NewValue0(v.Pos, OpMul32, typ.Int)
25204 v1 := b.NewValue0(v.Pos, OpConst32, typ.Int)
25205 v1.AuxInt = int32ToAuxInt(int32(t.Elem().Size()))
25206 v0.AddArg2(idx, v1)
25207 v.AddArg2(ptr, v0)
25208 return true
25209 }
25210
25211
25212
25213 for {
25214 t := v.Type
25215 ptr := v_0
25216 idx := v_1
25217 if !(config.PtrSize == 8) {
25218 break
25219 }
25220 v.reset(OpAddPtr)
25221 v0 := b.NewValue0(v.Pos, OpMul64, typ.Int)
25222 v1 := b.NewValue0(v.Pos, OpConst64, typ.Int)
25223 v1.AuxInt = int64ToAuxInt(t.Elem().Size())
25224 v0.AddArg2(idx, v1)
25225 v.AddArg2(ptr, v0)
25226 return true
25227 }
25228 return false
25229 }
25230 func rewriteValuegeneric_OpRotateLeft16(v *Value) bool {
25231 v_1 := v.Args[1]
25232 v_0 := v.Args[0]
25233 b := v.Block
25234 config := b.Func.Config
25235
25236
25237
25238 for {
25239 x := v_0
25240 if v_1.Op != OpConst16 {
25241 break
25242 }
25243 c := auxIntToInt16(v_1.AuxInt)
25244 if !(c%16 == 0) {
25245 break
25246 }
25247 v.copyOf(x)
25248 return true
25249 }
25250
25251
25252
25253 for {
25254 x := v_0
25255 if v_1.Op != OpAnd64 {
25256 break
25257 }
25258 _ = v_1.Args[1]
25259 v_1_0 := v_1.Args[0]
25260 v_1_1 := v_1.Args[1]
25261 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
25262 y := v_1_0
25263 if v_1_1.Op != OpConst64 {
25264 continue
25265 }
25266 c := auxIntToInt64(v_1_1.AuxInt)
25267 if !(c&15 == 15) {
25268 continue
25269 }
25270 v.reset(OpRotateLeft16)
25271 v.AddArg2(x, y)
25272 return true
25273 }
25274 break
25275 }
25276
25277
25278
25279 for {
25280 x := v_0
25281 if v_1.Op != OpAnd32 {
25282 break
25283 }
25284 _ = v_1.Args[1]
25285 v_1_0 := v_1.Args[0]
25286 v_1_1 := v_1.Args[1]
25287 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
25288 y := v_1_0
25289 if v_1_1.Op != OpConst32 {
25290 continue
25291 }
25292 c := auxIntToInt32(v_1_1.AuxInt)
25293 if !(c&15 == 15) {
25294 continue
25295 }
25296 v.reset(OpRotateLeft16)
25297 v.AddArg2(x, y)
25298 return true
25299 }
25300 break
25301 }
25302
25303
25304
25305 for {
25306 x := v_0
25307 if v_1.Op != OpAnd16 {
25308 break
25309 }
25310 _ = v_1.Args[1]
25311 v_1_0 := v_1.Args[0]
25312 v_1_1 := v_1.Args[1]
25313 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
25314 y := v_1_0
25315 if v_1_1.Op != OpConst16 {
25316 continue
25317 }
25318 c := auxIntToInt16(v_1_1.AuxInt)
25319 if !(c&15 == 15) {
25320 continue
25321 }
25322 v.reset(OpRotateLeft16)
25323 v.AddArg2(x, y)
25324 return true
25325 }
25326 break
25327 }
25328
25329
25330
25331 for {
25332 x := v_0
25333 if v_1.Op != OpAnd8 {
25334 break
25335 }
25336 _ = v_1.Args[1]
25337 v_1_0 := v_1.Args[0]
25338 v_1_1 := v_1.Args[1]
25339 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
25340 y := v_1_0
25341 if v_1_1.Op != OpConst8 {
25342 continue
25343 }
25344 c := auxIntToInt8(v_1_1.AuxInt)
25345 if !(c&15 == 15) {
25346 continue
25347 }
25348 v.reset(OpRotateLeft16)
25349 v.AddArg2(x, y)
25350 return true
25351 }
25352 break
25353 }
25354
25355
25356
25357 for {
25358 x := v_0
25359 if v_1.Op != OpNeg64 {
25360 break
25361 }
25362 v_1_0 := v_1.Args[0]
25363 if v_1_0.Op != OpAnd64 {
25364 break
25365 }
25366 _ = v_1_0.Args[1]
25367 v_1_0_0 := v_1_0.Args[0]
25368 v_1_0_1 := v_1_0.Args[1]
25369 for _i0 := 0; _i0 <= 1; _i0, v_1_0_0, v_1_0_1 = _i0+1, v_1_0_1, v_1_0_0 {
25370 y := v_1_0_0
25371 if v_1_0_1.Op != OpConst64 {
25372 continue
25373 }
25374 c := auxIntToInt64(v_1_0_1.AuxInt)
25375 if !(c&15 == 15) {
25376 continue
25377 }
25378 v.reset(OpRotateLeft16)
25379 v0 := b.NewValue0(v.Pos, OpNeg64, y.Type)
25380 v0.AddArg(y)
25381 v.AddArg2(x, v0)
25382 return true
25383 }
25384 break
25385 }
25386
25387
25388
25389 for {
25390 x := v_0
25391 if v_1.Op != OpNeg32 {
25392 break
25393 }
25394 v_1_0 := v_1.Args[0]
25395 if v_1_0.Op != OpAnd32 {
25396 break
25397 }
25398 _ = v_1_0.Args[1]
25399 v_1_0_0 := v_1_0.Args[0]
25400 v_1_0_1 := v_1_0.Args[1]
25401 for _i0 := 0; _i0 <= 1; _i0, v_1_0_0, v_1_0_1 = _i0+1, v_1_0_1, v_1_0_0 {
25402 y := v_1_0_0
25403 if v_1_0_1.Op != OpConst32 {
25404 continue
25405 }
25406 c := auxIntToInt32(v_1_0_1.AuxInt)
25407 if !(c&15 == 15) {
25408 continue
25409 }
25410 v.reset(OpRotateLeft16)
25411 v0 := b.NewValue0(v.Pos, OpNeg32, y.Type)
25412 v0.AddArg(y)
25413 v.AddArg2(x, v0)
25414 return true
25415 }
25416 break
25417 }
25418
25419
25420
25421 for {
25422 x := v_0
25423 if v_1.Op != OpNeg16 {
25424 break
25425 }
25426 v_1_0 := v_1.Args[0]
25427 if v_1_0.Op != OpAnd16 {
25428 break
25429 }
25430 _ = v_1_0.Args[1]
25431 v_1_0_0 := v_1_0.Args[0]
25432 v_1_0_1 := v_1_0.Args[1]
25433 for _i0 := 0; _i0 <= 1; _i0, v_1_0_0, v_1_0_1 = _i0+1, v_1_0_1, v_1_0_0 {
25434 y := v_1_0_0
25435 if v_1_0_1.Op != OpConst16 {
25436 continue
25437 }
25438 c := auxIntToInt16(v_1_0_1.AuxInt)
25439 if !(c&15 == 15) {
25440 continue
25441 }
25442 v.reset(OpRotateLeft16)
25443 v0 := b.NewValue0(v.Pos, OpNeg16, y.Type)
25444 v0.AddArg(y)
25445 v.AddArg2(x, v0)
25446 return true
25447 }
25448 break
25449 }
25450
25451
25452
25453 for {
25454 x := v_0
25455 if v_1.Op != OpNeg8 {
25456 break
25457 }
25458 v_1_0 := v_1.Args[0]
25459 if v_1_0.Op != OpAnd8 {
25460 break
25461 }
25462 _ = v_1_0.Args[1]
25463 v_1_0_0 := v_1_0.Args[0]
25464 v_1_0_1 := v_1_0.Args[1]
25465 for _i0 := 0; _i0 <= 1; _i0, v_1_0_0, v_1_0_1 = _i0+1, v_1_0_1, v_1_0_0 {
25466 y := v_1_0_0
25467 if v_1_0_1.Op != OpConst8 {
25468 continue
25469 }
25470 c := auxIntToInt8(v_1_0_1.AuxInt)
25471 if !(c&15 == 15) {
25472 continue
25473 }
25474 v.reset(OpRotateLeft16)
25475 v0 := b.NewValue0(v.Pos, OpNeg8, y.Type)
25476 v0.AddArg(y)
25477 v.AddArg2(x, v0)
25478 return true
25479 }
25480 break
25481 }
25482
25483
25484
25485 for {
25486 x := v_0
25487 if v_1.Op != OpAdd64 {
25488 break
25489 }
25490 _ = v_1.Args[1]
25491 v_1_0 := v_1.Args[0]
25492 v_1_1 := v_1.Args[1]
25493 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
25494 y := v_1_0
25495 if v_1_1.Op != OpConst64 {
25496 continue
25497 }
25498 c := auxIntToInt64(v_1_1.AuxInt)
25499 if !(c&15 == 0) {
25500 continue
25501 }
25502 v.reset(OpRotateLeft16)
25503 v.AddArg2(x, y)
25504 return true
25505 }
25506 break
25507 }
25508
25509
25510
25511 for {
25512 x := v_0
25513 if v_1.Op != OpAdd32 {
25514 break
25515 }
25516 _ = v_1.Args[1]
25517 v_1_0 := v_1.Args[0]
25518 v_1_1 := v_1.Args[1]
25519 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
25520 y := v_1_0
25521 if v_1_1.Op != OpConst32 {
25522 continue
25523 }
25524 c := auxIntToInt32(v_1_1.AuxInt)
25525 if !(c&15 == 0) {
25526 continue
25527 }
25528 v.reset(OpRotateLeft16)
25529 v.AddArg2(x, y)
25530 return true
25531 }
25532 break
25533 }
25534
25535
25536
25537 for {
25538 x := v_0
25539 if v_1.Op != OpAdd16 {
25540 break
25541 }
25542 _ = v_1.Args[1]
25543 v_1_0 := v_1.Args[0]
25544 v_1_1 := v_1.Args[1]
25545 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
25546 y := v_1_0
25547 if v_1_1.Op != OpConst16 {
25548 continue
25549 }
25550 c := auxIntToInt16(v_1_1.AuxInt)
25551 if !(c&15 == 0) {
25552 continue
25553 }
25554 v.reset(OpRotateLeft16)
25555 v.AddArg2(x, y)
25556 return true
25557 }
25558 break
25559 }
25560
25561
25562
25563 for {
25564 x := v_0
25565 if v_1.Op != OpAdd8 {
25566 break
25567 }
25568 _ = v_1.Args[1]
25569 v_1_0 := v_1.Args[0]
25570 v_1_1 := v_1.Args[1]
25571 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
25572 y := v_1_0
25573 if v_1_1.Op != OpConst8 {
25574 continue
25575 }
25576 c := auxIntToInt8(v_1_1.AuxInt)
25577 if !(c&15 == 0) {
25578 continue
25579 }
25580 v.reset(OpRotateLeft16)
25581 v.AddArg2(x, y)
25582 return true
25583 }
25584 break
25585 }
25586
25587
25588
25589 for {
25590 x := v_0
25591 if v_1.Op != OpSub64 {
25592 break
25593 }
25594 y := v_1.Args[1]
25595 v_1_0 := v_1.Args[0]
25596 if v_1_0.Op != OpConst64 {
25597 break
25598 }
25599 c := auxIntToInt64(v_1_0.AuxInt)
25600 if !(c&15 == 0) {
25601 break
25602 }
25603 v.reset(OpRotateLeft16)
25604 v0 := b.NewValue0(v.Pos, OpNeg64, y.Type)
25605 v0.AddArg(y)
25606 v.AddArg2(x, v0)
25607 return true
25608 }
25609
25610
25611
25612 for {
25613 x := v_0
25614 if v_1.Op != OpSub32 {
25615 break
25616 }
25617 y := v_1.Args[1]
25618 v_1_0 := v_1.Args[0]
25619 if v_1_0.Op != OpConst32 {
25620 break
25621 }
25622 c := auxIntToInt32(v_1_0.AuxInt)
25623 if !(c&15 == 0) {
25624 break
25625 }
25626 v.reset(OpRotateLeft16)
25627 v0 := b.NewValue0(v.Pos, OpNeg32, y.Type)
25628 v0.AddArg(y)
25629 v.AddArg2(x, v0)
25630 return true
25631 }
25632
25633
25634
25635 for {
25636 x := v_0
25637 if v_1.Op != OpSub16 {
25638 break
25639 }
25640 y := v_1.Args[1]
25641 v_1_0 := v_1.Args[0]
25642 if v_1_0.Op != OpConst16 {
25643 break
25644 }
25645 c := auxIntToInt16(v_1_0.AuxInt)
25646 if !(c&15 == 0) {
25647 break
25648 }
25649 v.reset(OpRotateLeft16)
25650 v0 := b.NewValue0(v.Pos, OpNeg16, y.Type)
25651 v0.AddArg(y)
25652 v.AddArg2(x, v0)
25653 return true
25654 }
25655
25656
25657
25658 for {
25659 x := v_0
25660 if v_1.Op != OpSub8 {
25661 break
25662 }
25663 y := v_1.Args[1]
25664 v_1_0 := v_1.Args[0]
25665 if v_1_0.Op != OpConst8 {
25666 break
25667 }
25668 c := auxIntToInt8(v_1_0.AuxInt)
25669 if !(c&15 == 0) {
25670 break
25671 }
25672 v.reset(OpRotateLeft16)
25673 v0 := b.NewValue0(v.Pos, OpNeg8, y.Type)
25674 v0.AddArg(y)
25675 v.AddArg2(x, v0)
25676 return true
25677 }
25678
25679
25680
25681 for {
25682 x := v_0
25683 if v_1.Op != OpConst64 {
25684 break
25685 }
25686 t := v_1.Type
25687 c := auxIntToInt64(v_1.AuxInt)
25688 if !(config.PtrSize == 4) {
25689 break
25690 }
25691 v.reset(OpRotateLeft16)
25692 v0 := b.NewValue0(v.Pos, OpConst32, t)
25693 v0.AuxInt = int32ToAuxInt(int32(c))
25694 v.AddArg2(x, v0)
25695 return true
25696 }
25697
25698
25699
25700 for {
25701 if v_0.Op != OpRotateLeft16 {
25702 break
25703 }
25704 c := v_0.Args[1]
25705 x := v_0.Args[0]
25706 d := v_1
25707 if !(c.Type.Size() == 8 && d.Type.Size() == 8) {
25708 break
25709 }
25710 v.reset(OpRotateLeft16)
25711 v0 := b.NewValue0(v.Pos, OpAdd64, c.Type)
25712 v0.AddArg2(c, d)
25713 v.AddArg2(x, v0)
25714 return true
25715 }
25716
25717
25718
25719 for {
25720 if v_0.Op != OpRotateLeft16 {
25721 break
25722 }
25723 c := v_0.Args[1]
25724 x := v_0.Args[0]
25725 d := v_1
25726 if !(c.Type.Size() == 4 && d.Type.Size() == 4) {
25727 break
25728 }
25729 v.reset(OpRotateLeft16)
25730 v0 := b.NewValue0(v.Pos, OpAdd32, c.Type)
25731 v0.AddArg2(c, d)
25732 v.AddArg2(x, v0)
25733 return true
25734 }
25735
25736
25737
25738 for {
25739 if v_0.Op != OpRotateLeft16 {
25740 break
25741 }
25742 c := v_0.Args[1]
25743 x := v_0.Args[0]
25744 d := v_1
25745 if !(c.Type.Size() == 2 && d.Type.Size() == 2) {
25746 break
25747 }
25748 v.reset(OpRotateLeft16)
25749 v0 := b.NewValue0(v.Pos, OpAdd16, c.Type)
25750 v0.AddArg2(c, d)
25751 v.AddArg2(x, v0)
25752 return true
25753 }
25754
25755
25756
25757 for {
25758 if v_0.Op != OpRotateLeft16 {
25759 break
25760 }
25761 c := v_0.Args[1]
25762 x := v_0.Args[0]
25763 d := v_1
25764 if !(c.Type.Size() == 1 && d.Type.Size() == 1) {
25765 break
25766 }
25767 v.reset(OpRotateLeft16)
25768 v0 := b.NewValue0(v.Pos, OpAdd8, c.Type)
25769 v0.AddArg2(c, d)
25770 v.AddArg2(x, v0)
25771 return true
25772 }
25773 return false
25774 }
25775 func rewriteValuegeneric_OpRotateLeft32(v *Value) bool {
25776 v_1 := v.Args[1]
25777 v_0 := v.Args[0]
25778 b := v.Block
25779 config := b.Func.Config
25780
25781
25782
25783 for {
25784 x := v_0
25785 if v_1.Op != OpConst32 {
25786 break
25787 }
25788 c := auxIntToInt32(v_1.AuxInt)
25789 if !(c%32 == 0) {
25790 break
25791 }
25792 v.copyOf(x)
25793 return true
25794 }
25795
25796
25797
25798 for {
25799 x := v_0
25800 if v_1.Op != OpAnd64 {
25801 break
25802 }
25803 _ = v_1.Args[1]
25804 v_1_0 := v_1.Args[0]
25805 v_1_1 := v_1.Args[1]
25806 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
25807 y := v_1_0
25808 if v_1_1.Op != OpConst64 {
25809 continue
25810 }
25811 c := auxIntToInt64(v_1_1.AuxInt)
25812 if !(c&31 == 31) {
25813 continue
25814 }
25815 v.reset(OpRotateLeft32)
25816 v.AddArg2(x, y)
25817 return true
25818 }
25819 break
25820 }
25821
25822
25823
25824 for {
25825 x := v_0
25826 if v_1.Op != OpAnd32 {
25827 break
25828 }
25829 _ = v_1.Args[1]
25830 v_1_0 := v_1.Args[0]
25831 v_1_1 := v_1.Args[1]
25832 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
25833 y := v_1_0
25834 if v_1_1.Op != OpConst32 {
25835 continue
25836 }
25837 c := auxIntToInt32(v_1_1.AuxInt)
25838 if !(c&31 == 31) {
25839 continue
25840 }
25841 v.reset(OpRotateLeft32)
25842 v.AddArg2(x, y)
25843 return true
25844 }
25845 break
25846 }
25847
25848
25849
25850 for {
25851 x := v_0
25852 if v_1.Op != OpAnd16 {
25853 break
25854 }
25855 _ = v_1.Args[1]
25856 v_1_0 := v_1.Args[0]
25857 v_1_1 := v_1.Args[1]
25858 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
25859 y := v_1_0
25860 if v_1_1.Op != OpConst16 {
25861 continue
25862 }
25863 c := auxIntToInt16(v_1_1.AuxInt)
25864 if !(c&31 == 31) {
25865 continue
25866 }
25867 v.reset(OpRotateLeft32)
25868 v.AddArg2(x, y)
25869 return true
25870 }
25871 break
25872 }
25873
25874
25875
25876 for {
25877 x := v_0
25878 if v_1.Op != OpAnd8 {
25879 break
25880 }
25881 _ = v_1.Args[1]
25882 v_1_0 := v_1.Args[0]
25883 v_1_1 := v_1.Args[1]
25884 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
25885 y := v_1_0
25886 if v_1_1.Op != OpConst8 {
25887 continue
25888 }
25889 c := auxIntToInt8(v_1_1.AuxInt)
25890 if !(c&31 == 31) {
25891 continue
25892 }
25893 v.reset(OpRotateLeft32)
25894 v.AddArg2(x, y)
25895 return true
25896 }
25897 break
25898 }
25899
25900
25901
25902 for {
25903 x := v_0
25904 if v_1.Op != OpNeg64 {
25905 break
25906 }
25907 v_1_0 := v_1.Args[0]
25908 if v_1_0.Op != OpAnd64 {
25909 break
25910 }
25911 _ = v_1_0.Args[1]
25912 v_1_0_0 := v_1_0.Args[0]
25913 v_1_0_1 := v_1_0.Args[1]
25914 for _i0 := 0; _i0 <= 1; _i0, v_1_0_0, v_1_0_1 = _i0+1, v_1_0_1, v_1_0_0 {
25915 y := v_1_0_0
25916 if v_1_0_1.Op != OpConst64 {
25917 continue
25918 }
25919 c := auxIntToInt64(v_1_0_1.AuxInt)
25920 if !(c&31 == 31) {
25921 continue
25922 }
25923 v.reset(OpRotateLeft32)
25924 v0 := b.NewValue0(v.Pos, OpNeg64, y.Type)
25925 v0.AddArg(y)
25926 v.AddArg2(x, v0)
25927 return true
25928 }
25929 break
25930 }
25931
25932
25933
25934 for {
25935 x := v_0
25936 if v_1.Op != OpNeg32 {
25937 break
25938 }
25939 v_1_0 := v_1.Args[0]
25940 if v_1_0.Op != OpAnd32 {
25941 break
25942 }
25943 _ = v_1_0.Args[1]
25944 v_1_0_0 := v_1_0.Args[0]
25945 v_1_0_1 := v_1_0.Args[1]
25946 for _i0 := 0; _i0 <= 1; _i0, v_1_0_0, v_1_0_1 = _i0+1, v_1_0_1, v_1_0_0 {
25947 y := v_1_0_0
25948 if v_1_0_1.Op != OpConst32 {
25949 continue
25950 }
25951 c := auxIntToInt32(v_1_0_1.AuxInt)
25952 if !(c&31 == 31) {
25953 continue
25954 }
25955 v.reset(OpRotateLeft32)
25956 v0 := b.NewValue0(v.Pos, OpNeg32, y.Type)
25957 v0.AddArg(y)
25958 v.AddArg2(x, v0)
25959 return true
25960 }
25961 break
25962 }
25963
25964
25965
25966 for {
25967 x := v_0
25968 if v_1.Op != OpNeg16 {
25969 break
25970 }
25971 v_1_0 := v_1.Args[0]
25972 if v_1_0.Op != OpAnd16 {
25973 break
25974 }
25975 _ = v_1_0.Args[1]
25976 v_1_0_0 := v_1_0.Args[0]
25977 v_1_0_1 := v_1_0.Args[1]
25978 for _i0 := 0; _i0 <= 1; _i0, v_1_0_0, v_1_0_1 = _i0+1, v_1_0_1, v_1_0_0 {
25979 y := v_1_0_0
25980 if v_1_0_1.Op != OpConst16 {
25981 continue
25982 }
25983 c := auxIntToInt16(v_1_0_1.AuxInt)
25984 if !(c&31 == 31) {
25985 continue
25986 }
25987 v.reset(OpRotateLeft32)
25988 v0 := b.NewValue0(v.Pos, OpNeg16, y.Type)
25989 v0.AddArg(y)
25990 v.AddArg2(x, v0)
25991 return true
25992 }
25993 break
25994 }
25995
25996
25997
25998 for {
25999 x := v_0
26000 if v_1.Op != OpNeg8 {
26001 break
26002 }
26003 v_1_0 := v_1.Args[0]
26004 if v_1_0.Op != OpAnd8 {
26005 break
26006 }
26007 _ = v_1_0.Args[1]
26008 v_1_0_0 := v_1_0.Args[0]
26009 v_1_0_1 := v_1_0.Args[1]
26010 for _i0 := 0; _i0 <= 1; _i0, v_1_0_0, v_1_0_1 = _i0+1, v_1_0_1, v_1_0_0 {
26011 y := v_1_0_0
26012 if v_1_0_1.Op != OpConst8 {
26013 continue
26014 }
26015 c := auxIntToInt8(v_1_0_1.AuxInt)
26016 if !(c&31 == 31) {
26017 continue
26018 }
26019 v.reset(OpRotateLeft32)
26020 v0 := b.NewValue0(v.Pos, OpNeg8, y.Type)
26021 v0.AddArg(y)
26022 v.AddArg2(x, v0)
26023 return true
26024 }
26025 break
26026 }
26027
26028
26029
26030 for {
26031 x := v_0
26032 if v_1.Op != OpAdd64 {
26033 break
26034 }
26035 _ = v_1.Args[1]
26036 v_1_0 := v_1.Args[0]
26037 v_1_1 := v_1.Args[1]
26038 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
26039 y := v_1_0
26040 if v_1_1.Op != OpConst64 {
26041 continue
26042 }
26043 c := auxIntToInt64(v_1_1.AuxInt)
26044 if !(c&31 == 0) {
26045 continue
26046 }
26047 v.reset(OpRotateLeft32)
26048 v.AddArg2(x, y)
26049 return true
26050 }
26051 break
26052 }
26053
26054
26055
26056 for {
26057 x := v_0
26058 if v_1.Op != OpAdd32 {
26059 break
26060 }
26061 _ = v_1.Args[1]
26062 v_1_0 := v_1.Args[0]
26063 v_1_1 := v_1.Args[1]
26064 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
26065 y := v_1_0
26066 if v_1_1.Op != OpConst32 {
26067 continue
26068 }
26069 c := auxIntToInt32(v_1_1.AuxInt)
26070 if !(c&31 == 0) {
26071 continue
26072 }
26073 v.reset(OpRotateLeft32)
26074 v.AddArg2(x, y)
26075 return true
26076 }
26077 break
26078 }
26079
26080
26081
26082 for {
26083 x := v_0
26084 if v_1.Op != OpAdd16 {
26085 break
26086 }
26087 _ = v_1.Args[1]
26088 v_1_0 := v_1.Args[0]
26089 v_1_1 := v_1.Args[1]
26090 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
26091 y := v_1_0
26092 if v_1_1.Op != OpConst16 {
26093 continue
26094 }
26095 c := auxIntToInt16(v_1_1.AuxInt)
26096 if !(c&31 == 0) {
26097 continue
26098 }
26099 v.reset(OpRotateLeft32)
26100 v.AddArg2(x, y)
26101 return true
26102 }
26103 break
26104 }
26105
26106
26107
26108 for {
26109 x := v_0
26110 if v_1.Op != OpAdd8 {
26111 break
26112 }
26113 _ = v_1.Args[1]
26114 v_1_0 := v_1.Args[0]
26115 v_1_1 := v_1.Args[1]
26116 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
26117 y := v_1_0
26118 if v_1_1.Op != OpConst8 {
26119 continue
26120 }
26121 c := auxIntToInt8(v_1_1.AuxInt)
26122 if !(c&31 == 0) {
26123 continue
26124 }
26125 v.reset(OpRotateLeft32)
26126 v.AddArg2(x, y)
26127 return true
26128 }
26129 break
26130 }
26131
26132
26133
26134 for {
26135 x := v_0
26136 if v_1.Op != OpSub64 {
26137 break
26138 }
26139 y := v_1.Args[1]
26140 v_1_0 := v_1.Args[0]
26141 if v_1_0.Op != OpConst64 {
26142 break
26143 }
26144 c := auxIntToInt64(v_1_0.AuxInt)
26145 if !(c&31 == 0) {
26146 break
26147 }
26148 v.reset(OpRotateLeft32)
26149 v0 := b.NewValue0(v.Pos, OpNeg64, y.Type)
26150 v0.AddArg(y)
26151 v.AddArg2(x, v0)
26152 return true
26153 }
26154
26155
26156
26157 for {
26158 x := v_0
26159 if v_1.Op != OpSub32 {
26160 break
26161 }
26162 y := v_1.Args[1]
26163 v_1_0 := v_1.Args[0]
26164 if v_1_0.Op != OpConst32 {
26165 break
26166 }
26167 c := auxIntToInt32(v_1_0.AuxInt)
26168 if !(c&31 == 0) {
26169 break
26170 }
26171 v.reset(OpRotateLeft32)
26172 v0 := b.NewValue0(v.Pos, OpNeg32, y.Type)
26173 v0.AddArg(y)
26174 v.AddArg2(x, v0)
26175 return true
26176 }
26177
26178
26179
26180 for {
26181 x := v_0
26182 if v_1.Op != OpSub16 {
26183 break
26184 }
26185 y := v_1.Args[1]
26186 v_1_0 := v_1.Args[0]
26187 if v_1_0.Op != OpConst16 {
26188 break
26189 }
26190 c := auxIntToInt16(v_1_0.AuxInt)
26191 if !(c&31 == 0) {
26192 break
26193 }
26194 v.reset(OpRotateLeft32)
26195 v0 := b.NewValue0(v.Pos, OpNeg16, y.Type)
26196 v0.AddArg(y)
26197 v.AddArg2(x, v0)
26198 return true
26199 }
26200
26201
26202
26203 for {
26204 x := v_0
26205 if v_1.Op != OpSub8 {
26206 break
26207 }
26208 y := v_1.Args[1]
26209 v_1_0 := v_1.Args[0]
26210 if v_1_0.Op != OpConst8 {
26211 break
26212 }
26213 c := auxIntToInt8(v_1_0.AuxInt)
26214 if !(c&31 == 0) {
26215 break
26216 }
26217 v.reset(OpRotateLeft32)
26218 v0 := b.NewValue0(v.Pos, OpNeg8, y.Type)
26219 v0.AddArg(y)
26220 v.AddArg2(x, v0)
26221 return true
26222 }
26223
26224
26225
26226 for {
26227 x := v_0
26228 if v_1.Op != OpConst64 {
26229 break
26230 }
26231 t := v_1.Type
26232 c := auxIntToInt64(v_1.AuxInt)
26233 if !(config.PtrSize == 4) {
26234 break
26235 }
26236 v.reset(OpRotateLeft32)
26237 v0 := b.NewValue0(v.Pos, OpConst32, t)
26238 v0.AuxInt = int32ToAuxInt(int32(c))
26239 v.AddArg2(x, v0)
26240 return true
26241 }
26242
26243
26244
26245 for {
26246 if v_0.Op != OpRotateLeft32 {
26247 break
26248 }
26249 c := v_0.Args[1]
26250 x := v_0.Args[0]
26251 d := v_1
26252 if !(c.Type.Size() == 8 && d.Type.Size() == 8) {
26253 break
26254 }
26255 v.reset(OpRotateLeft32)
26256 v0 := b.NewValue0(v.Pos, OpAdd64, c.Type)
26257 v0.AddArg2(c, d)
26258 v.AddArg2(x, v0)
26259 return true
26260 }
26261
26262
26263
26264 for {
26265 if v_0.Op != OpRotateLeft32 {
26266 break
26267 }
26268 c := v_0.Args[1]
26269 x := v_0.Args[0]
26270 d := v_1
26271 if !(c.Type.Size() == 4 && d.Type.Size() == 4) {
26272 break
26273 }
26274 v.reset(OpRotateLeft32)
26275 v0 := b.NewValue0(v.Pos, OpAdd32, c.Type)
26276 v0.AddArg2(c, d)
26277 v.AddArg2(x, v0)
26278 return true
26279 }
26280
26281
26282
26283 for {
26284 if v_0.Op != OpRotateLeft32 {
26285 break
26286 }
26287 c := v_0.Args[1]
26288 x := v_0.Args[0]
26289 d := v_1
26290 if !(c.Type.Size() == 2 && d.Type.Size() == 2) {
26291 break
26292 }
26293 v.reset(OpRotateLeft32)
26294 v0 := b.NewValue0(v.Pos, OpAdd16, c.Type)
26295 v0.AddArg2(c, d)
26296 v.AddArg2(x, v0)
26297 return true
26298 }
26299
26300
26301
26302 for {
26303 if v_0.Op != OpRotateLeft32 {
26304 break
26305 }
26306 c := v_0.Args[1]
26307 x := v_0.Args[0]
26308 d := v_1
26309 if !(c.Type.Size() == 1 && d.Type.Size() == 1) {
26310 break
26311 }
26312 v.reset(OpRotateLeft32)
26313 v0 := b.NewValue0(v.Pos, OpAdd8, c.Type)
26314 v0.AddArg2(c, d)
26315 v.AddArg2(x, v0)
26316 return true
26317 }
26318 return false
26319 }
26320 func rewriteValuegeneric_OpRotateLeft64(v *Value) bool {
26321 v_1 := v.Args[1]
26322 v_0 := v.Args[0]
26323 b := v.Block
26324 config := b.Func.Config
26325
26326
26327
26328 for {
26329 x := v_0
26330 if v_1.Op != OpConst64 {
26331 break
26332 }
26333 c := auxIntToInt64(v_1.AuxInt)
26334 if !(c%64 == 0) {
26335 break
26336 }
26337 v.copyOf(x)
26338 return true
26339 }
26340
26341
26342
26343 for {
26344 x := v_0
26345 if v_1.Op != OpAnd64 {
26346 break
26347 }
26348 _ = v_1.Args[1]
26349 v_1_0 := v_1.Args[0]
26350 v_1_1 := v_1.Args[1]
26351 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
26352 y := v_1_0
26353 if v_1_1.Op != OpConst64 {
26354 continue
26355 }
26356 c := auxIntToInt64(v_1_1.AuxInt)
26357 if !(c&63 == 63) {
26358 continue
26359 }
26360 v.reset(OpRotateLeft64)
26361 v.AddArg2(x, y)
26362 return true
26363 }
26364 break
26365 }
26366
26367
26368
26369 for {
26370 x := v_0
26371 if v_1.Op != OpAnd32 {
26372 break
26373 }
26374 _ = v_1.Args[1]
26375 v_1_0 := v_1.Args[0]
26376 v_1_1 := v_1.Args[1]
26377 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
26378 y := v_1_0
26379 if v_1_1.Op != OpConst32 {
26380 continue
26381 }
26382 c := auxIntToInt32(v_1_1.AuxInt)
26383 if !(c&63 == 63) {
26384 continue
26385 }
26386 v.reset(OpRotateLeft64)
26387 v.AddArg2(x, y)
26388 return true
26389 }
26390 break
26391 }
26392
26393
26394
26395 for {
26396 x := v_0
26397 if v_1.Op != OpAnd16 {
26398 break
26399 }
26400 _ = v_1.Args[1]
26401 v_1_0 := v_1.Args[0]
26402 v_1_1 := v_1.Args[1]
26403 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
26404 y := v_1_0
26405 if v_1_1.Op != OpConst16 {
26406 continue
26407 }
26408 c := auxIntToInt16(v_1_1.AuxInt)
26409 if !(c&63 == 63) {
26410 continue
26411 }
26412 v.reset(OpRotateLeft64)
26413 v.AddArg2(x, y)
26414 return true
26415 }
26416 break
26417 }
26418
26419
26420
26421 for {
26422 x := v_0
26423 if v_1.Op != OpAnd8 {
26424 break
26425 }
26426 _ = v_1.Args[1]
26427 v_1_0 := v_1.Args[0]
26428 v_1_1 := v_1.Args[1]
26429 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
26430 y := v_1_0
26431 if v_1_1.Op != OpConst8 {
26432 continue
26433 }
26434 c := auxIntToInt8(v_1_1.AuxInt)
26435 if !(c&63 == 63) {
26436 continue
26437 }
26438 v.reset(OpRotateLeft64)
26439 v.AddArg2(x, y)
26440 return true
26441 }
26442 break
26443 }
26444
26445
26446
26447 for {
26448 x := v_0
26449 if v_1.Op != OpNeg64 {
26450 break
26451 }
26452 v_1_0 := v_1.Args[0]
26453 if v_1_0.Op != OpAnd64 {
26454 break
26455 }
26456 _ = v_1_0.Args[1]
26457 v_1_0_0 := v_1_0.Args[0]
26458 v_1_0_1 := v_1_0.Args[1]
26459 for _i0 := 0; _i0 <= 1; _i0, v_1_0_0, v_1_0_1 = _i0+1, v_1_0_1, v_1_0_0 {
26460 y := v_1_0_0
26461 if v_1_0_1.Op != OpConst64 {
26462 continue
26463 }
26464 c := auxIntToInt64(v_1_0_1.AuxInt)
26465 if !(c&63 == 63) {
26466 continue
26467 }
26468 v.reset(OpRotateLeft64)
26469 v0 := b.NewValue0(v.Pos, OpNeg64, y.Type)
26470 v0.AddArg(y)
26471 v.AddArg2(x, v0)
26472 return true
26473 }
26474 break
26475 }
26476
26477
26478
26479 for {
26480 x := v_0
26481 if v_1.Op != OpNeg32 {
26482 break
26483 }
26484 v_1_0 := v_1.Args[0]
26485 if v_1_0.Op != OpAnd32 {
26486 break
26487 }
26488 _ = v_1_0.Args[1]
26489 v_1_0_0 := v_1_0.Args[0]
26490 v_1_0_1 := v_1_0.Args[1]
26491 for _i0 := 0; _i0 <= 1; _i0, v_1_0_0, v_1_0_1 = _i0+1, v_1_0_1, v_1_0_0 {
26492 y := v_1_0_0
26493 if v_1_0_1.Op != OpConst32 {
26494 continue
26495 }
26496 c := auxIntToInt32(v_1_0_1.AuxInt)
26497 if !(c&63 == 63) {
26498 continue
26499 }
26500 v.reset(OpRotateLeft64)
26501 v0 := b.NewValue0(v.Pos, OpNeg32, y.Type)
26502 v0.AddArg(y)
26503 v.AddArg2(x, v0)
26504 return true
26505 }
26506 break
26507 }
26508
26509
26510
26511 for {
26512 x := v_0
26513 if v_1.Op != OpNeg16 {
26514 break
26515 }
26516 v_1_0 := v_1.Args[0]
26517 if v_1_0.Op != OpAnd16 {
26518 break
26519 }
26520 _ = v_1_0.Args[1]
26521 v_1_0_0 := v_1_0.Args[0]
26522 v_1_0_1 := v_1_0.Args[1]
26523 for _i0 := 0; _i0 <= 1; _i0, v_1_0_0, v_1_0_1 = _i0+1, v_1_0_1, v_1_0_0 {
26524 y := v_1_0_0
26525 if v_1_0_1.Op != OpConst16 {
26526 continue
26527 }
26528 c := auxIntToInt16(v_1_0_1.AuxInt)
26529 if !(c&63 == 63) {
26530 continue
26531 }
26532 v.reset(OpRotateLeft64)
26533 v0 := b.NewValue0(v.Pos, OpNeg16, y.Type)
26534 v0.AddArg(y)
26535 v.AddArg2(x, v0)
26536 return true
26537 }
26538 break
26539 }
26540
26541
26542
26543 for {
26544 x := v_0
26545 if v_1.Op != OpNeg8 {
26546 break
26547 }
26548 v_1_0 := v_1.Args[0]
26549 if v_1_0.Op != OpAnd8 {
26550 break
26551 }
26552 _ = v_1_0.Args[1]
26553 v_1_0_0 := v_1_0.Args[0]
26554 v_1_0_1 := v_1_0.Args[1]
26555 for _i0 := 0; _i0 <= 1; _i0, v_1_0_0, v_1_0_1 = _i0+1, v_1_0_1, v_1_0_0 {
26556 y := v_1_0_0
26557 if v_1_0_1.Op != OpConst8 {
26558 continue
26559 }
26560 c := auxIntToInt8(v_1_0_1.AuxInt)
26561 if !(c&63 == 63) {
26562 continue
26563 }
26564 v.reset(OpRotateLeft64)
26565 v0 := b.NewValue0(v.Pos, OpNeg8, y.Type)
26566 v0.AddArg(y)
26567 v.AddArg2(x, v0)
26568 return true
26569 }
26570 break
26571 }
26572
26573
26574
26575 for {
26576 x := v_0
26577 if v_1.Op != OpAdd64 {
26578 break
26579 }
26580 _ = v_1.Args[1]
26581 v_1_0 := v_1.Args[0]
26582 v_1_1 := v_1.Args[1]
26583 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
26584 y := v_1_0
26585 if v_1_1.Op != OpConst64 {
26586 continue
26587 }
26588 c := auxIntToInt64(v_1_1.AuxInt)
26589 if !(c&63 == 0) {
26590 continue
26591 }
26592 v.reset(OpRotateLeft64)
26593 v.AddArg2(x, y)
26594 return true
26595 }
26596 break
26597 }
26598
26599
26600
26601 for {
26602 x := v_0
26603 if v_1.Op != OpAdd32 {
26604 break
26605 }
26606 _ = v_1.Args[1]
26607 v_1_0 := v_1.Args[0]
26608 v_1_1 := v_1.Args[1]
26609 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
26610 y := v_1_0
26611 if v_1_1.Op != OpConst32 {
26612 continue
26613 }
26614 c := auxIntToInt32(v_1_1.AuxInt)
26615 if !(c&63 == 0) {
26616 continue
26617 }
26618 v.reset(OpRotateLeft64)
26619 v.AddArg2(x, y)
26620 return true
26621 }
26622 break
26623 }
26624
26625
26626
26627 for {
26628 x := v_0
26629 if v_1.Op != OpAdd16 {
26630 break
26631 }
26632 _ = v_1.Args[1]
26633 v_1_0 := v_1.Args[0]
26634 v_1_1 := v_1.Args[1]
26635 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
26636 y := v_1_0
26637 if v_1_1.Op != OpConst16 {
26638 continue
26639 }
26640 c := auxIntToInt16(v_1_1.AuxInt)
26641 if !(c&63 == 0) {
26642 continue
26643 }
26644 v.reset(OpRotateLeft64)
26645 v.AddArg2(x, y)
26646 return true
26647 }
26648 break
26649 }
26650
26651
26652
26653 for {
26654 x := v_0
26655 if v_1.Op != OpAdd8 {
26656 break
26657 }
26658 _ = v_1.Args[1]
26659 v_1_0 := v_1.Args[0]
26660 v_1_1 := v_1.Args[1]
26661 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
26662 y := v_1_0
26663 if v_1_1.Op != OpConst8 {
26664 continue
26665 }
26666 c := auxIntToInt8(v_1_1.AuxInt)
26667 if !(c&63 == 0) {
26668 continue
26669 }
26670 v.reset(OpRotateLeft64)
26671 v.AddArg2(x, y)
26672 return true
26673 }
26674 break
26675 }
26676
26677
26678
26679 for {
26680 x := v_0
26681 if v_1.Op != OpSub64 {
26682 break
26683 }
26684 y := v_1.Args[1]
26685 v_1_0 := v_1.Args[0]
26686 if v_1_0.Op != OpConst64 {
26687 break
26688 }
26689 c := auxIntToInt64(v_1_0.AuxInt)
26690 if !(c&63 == 0) {
26691 break
26692 }
26693 v.reset(OpRotateLeft64)
26694 v0 := b.NewValue0(v.Pos, OpNeg64, y.Type)
26695 v0.AddArg(y)
26696 v.AddArg2(x, v0)
26697 return true
26698 }
26699
26700
26701
26702 for {
26703 x := v_0
26704 if v_1.Op != OpSub32 {
26705 break
26706 }
26707 y := v_1.Args[1]
26708 v_1_0 := v_1.Args[0]
26709 if v_1_0.Op != OpConst32 {
26710 break
26711 }
26712 c := auxIntToInt32(v_1_0.AuxInt)
26713 if !(c&63 == 0) {
26714 break
26715 }
26716 v.reset(OpRotateLeft64)
26717 v0 := b.NewValue0(v.Pos, OpNeg32, y.Type)
26718 v0.AddArg(y)
26719 v.AddArg2(x, v0)
26720 return true
26721 }
26722
26723
26724
26725 for {
26726 x := v_0
26727 if v_1.Op != OpSub16 {
26728 break
26729 }
26730 y := v_1.Args[1]
26731 v_1_0 := v_1.Args[0]
26732 if v_1_0.Op != OpConst16 {
26733 break
26734 }
26735 c := auxIntToInt16(v_1_0.AuxInt)
26736 if !(c&63 == 0) {
26737 break
26738 }
26739 v.reset(OpRotateLeft64)
26740 v0 := b.NewValue0(v.Pos, OpNeg16, y.Type)
26741 v0.AddArg(y)
26742 v.AddArg2(x, v0)
26743 return true
26744 }
26745
26746
26747
26748 for {
26749 x := v_0
26750 if v_1.Op != OpSub8 {
26751 break
26752 }
26753 y := v_1.Args[1]
26754 v_1_0 := v_1.Args[0]
26755 if v_1_0.Op != OpConst8 {
26756 break
26757 }
26758 c := auxIntToInt8(v_1_0.AuxInt)
26759 if !(c&63 == 0) {
26760 break
26761 }
26762 v.reset(OpRotateLeft64)
26763 v0 := b.NewValue0(v.Pos, OpNeg8, y.Type)
26764 v0.AddArg(y)
26765 v.AddArg2(x, v0)
26766 return true
26767 }
26768
26769
26770
26771 for {
26772 x := v_0
26773 if v_1.Op != OpConst64 {
26774 break
26775 }
26776 t := v_1.Type
26777 c := auxIntToInt64(v_1.AuxInt)
26778 if !(config.PtrSize == 4) {
26779 break
26780 }
26781 v.reset(OpRotateLeft64)
26782 v0 := b.NewValue0(v.Pos, OpConst32, t)
26783 v0.AuxInt = int32ToAuxInt(int32(c))
26784 v.AddArg2(x, v0)
26785 return true
26786 }
26787
26788
26789
26790 for {
26791 if v_0.Op != OpRotateLeft64 {
26792 break
26793 }
26794 c := v_0.Args[1]
26795 x := v_0.Args[0]
26796 d := v_1
26797 if !(c.Type.Size() == 8 && d.Type.Size() == 8) {
26798 break
26799 }
26800 v.reset(OpRotateLeft64)
26801 v0 := b.NewValue0(v.Pos, OpAdd64, c.Type)
26802 v0.AddArg2(c, d)
26803 v.AddArg2(x, v0)
26804 return true
26805 }
26806
26807
26808
26809 for {
26810 if v_0.Op != OpRotateLeft64 {
26811 break
26812 }
26813 c := v_0.Args[1]
26814 x := v_0.Args[0]
26815 d := v_1
26816 if !(c.Type.Size() == 4 && d.Type.Size() == 4) {
26817 break
26818 }
26819 v.reset(OpRotateLeft64)
26820 v0 := b.NewValue0(v.Pos, OpAdd32, c.Type)
26821 v0.AddArg2(c, d)
26822 v.AddArg2(x, v0)
26823 return true
26824 }
26825
26826
26827
26828 for {
26829 if v_0.Op != OpRotateLeft64 {
26830 break
26831 }
26832 c := v_0.Args[1]
26833 x := v_0.Args[0]
26834 d := v_1
26835 if !(c.Type.Size() == 2 && d.Type.Size() == 2) {
26836 break
26837 }
26838 v.reset(OpRotateLeft64)
26839 v0 := b.NewValue0(v.Pos, OpAdd16, c.Type)
26840 v0.AddArg2(c, d)
26841 v.AddArg2(x, v0)
26842 return true
26843 }
26844
26845
26846
26847 for {
26848 if v_0.Op != OpRotateLeft64 {
26849 break
26850 }
26851 c := v_0.Args[1]
26852 x := v_0.Args[0]
26853 d := v_1
26854 if !(c.Type.Size() == 1 && d.Type.Size() == 1) {
26855 break
26856 }
26857 v.reset(OpRotateLeft64)
26858 v0 := b.NewValue0(v.Pos, OpAdd8, c.Type)
26859 v0.AddArg2(c, d)
26860 v.AddArg2(x, v0)
26861 return true
26862 }
26863 return false
26864 }
26865 func rewriteValuegeneric_OpRotateLeft8(v *Value) bool {
26866 v_1 := v.Args[1]
26867 v_0 := v.Args[0]
26868 b := v.Block
26869 config := b.Func.Config
26870
26871
26872
26873 for {
26874 x := v_0
26875 if v_1.Op != OpConst8 {
26876 break
26877 }
26878 c := auxIntToInt8(v_1.AuxInt)
26879 if !(c%8 == 0) {
26880 break
26881 }
26882 v.copyOf(x)
26883 return true
26884 }
26885
26886
26887
26888 for {
26889 x := v_0
26890 if v_1.Op != OpAnd64 {
26891 break
26892 }
26893 _ = v_1.Args[1]
26894 v_1_0 := v_1.Args[0]
26895 v_1_1 := v_1.Args[1]
26896 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
26897 y := v_1_0
26898 if v_1_1.Op != OpConst64 {
26899 continue
26900 }
26901 c := auxIntToInt64(v_1_1.AuxInt)
26902 if !(c&7 == 7) {
26903 continue
26904 }
26905 v.reset(OpRotateLeft8)
26906 v.AddArg2(x, y)
26907 return true
26908 }
26909 break
26910 }
26911
26912
26913
26914 for {
26915 x := v_0
26916 if v_1.Op != OpAnd32 {
26917 break
26918 }
26919 _ = v_1.Args[1]
26920 v_1_0 := v_1.Args[0]
26921 v_1_1 := v_1.Args[1]
26922 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
26923 y := v_1_0
26924 if v_1_1.Op != OpConst32 {
26925 continue
26926 }
26927 c := auxIntToInt32(v_1_1.AuxInt)
26928 if !(c&7 == 7) {
26929 continue
26930 }
26931 v.reset(OpRotateLeft8)
26932 v.AddArg2(x, y)
26933 return true
26934 }
26935 break
26936 }
26937
26938
26939
26940 for {
26941 x := v_0
26942 if v_1.Op != OpAnd16 {
26943 break
26944 }
26945 _ = v_1.Args[1]
26946 v_1_0 := v_1.Args[0]
26947 v_1_1 := v_1.Args[1]
26948 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
26949 y := v_1_0
26950 if v_1_1.Op != OpConst16 {
26951 continue
26952 }
26953 c := auxIntToInt16(v_1_1.AuxInt)
26954 if !(c&7 == 7) {
26955 continue
26956 }
26957 v.reset(OpRotateLeft8)
26958 v.AddArg2(x, y)
26959 return true
26960 }
26961 break
26962 }
26963
26964
26965
26966 for {
26967 x := v_0
26968 if v_1.Op != OpAnd8 {
26969 break
26970 }
26971 _ = v_1.Args[1]
26972 v_1_0 := v_1.Args[0]
26973 v_1_1 := v_1.Args[1]
26974 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
26975 y := v_1_0
26976 if v_1_1.Op != OpConst8 {
26977 continue
26978 }
26979 c := auxIntToInt8(v_1_1.AuxInt)
26980 if !(c&7 == 7) {
26981 continue
26982 }
26983 v.reset(OpRotateLeft8)
26984 v.AddArg2(x, y)
26985 return true
26986 }
26987 break
26988 }
26989
26990
26991
26992 for {
26993 x := v_0
26994 if v_1.Op != OpNeg64 {
26995 break
26996 }
26997 v_1_0 := v_1.Args[0]
26998 if v_1_0.Op != OpAnd64 {
26999 break
27000 }
27001 _ = v_1_0.Args[1]
27002 v_1_0_0 := v_1_0.Args[0]
27003 v_1_0_1 := v_1_0.Args[1]
27004 for _i0 := 0; _i0 <= 1; _i0, v_1_0_0, v_1_0_1 = _i0+1, v_1_0_1, v_1_0_0 {
27005 y := v_1_0_0
27006 if v_1_0_1.Op != OpConst64 {
27007 continue
27008 }
27009 c := auxIntToInt64(v_1_0_1.AuxInt)
27010 if !(c&7 == 7) {
27011 continue
27012 }
27013 v.reset(OpRotateLeft8)
27014 v0 := b.NewValue0(v.Pos, OpNeg64, y.Type)
27015 v0.AddArg(y)
27016 v.AddArg2(x, v0)
27017 return true
27018 }
27019 break
27020 }
27021
27022
27023
27024 for {
27025 x := v_0
27026 if v_1.Op != OpNeg32 {
27027 break
27028 }
27029 v_1_0 := v_1.Args[0]
27030 if v_1_0.Op != OpAnd32 {
27031 break
27032 }
27033 _ = v_1_0.Args[1]
27034 v_1_0_0 := v_1_0.Args[0]
27035 v_1_0_1 := v_1_0.Args[1]
27036 for _i0 := 0; _i0 <= 1; _i0, v_1_0_0, v_1_0_1 = _i0+1, v_1_0_1, v_1_0_0 {
27037 y := v_1_0_0
27038 if v_1_0_1.Op != OpConst32 {
27039 continue
27040 }
27041 c := auxIntToInt32(v_1_0_1.AuxInt)
27042 if !(c&7 == 7) {
27043 continue
27044 }
27045 v.reset(OpRotateLeft8)
27046 v0 := b.NewValue0(v.Pos, OpNeg32, y.Type)
27047 v0.AddArg(y)
27048 v.AddArg2(x, v0)
27049 return true
27050 }
27051 break
27052 }
27053
27054
27055
27056 for {
27057 x := v_0
27058 if v_1.Op != OpNeg16 {
27059 break
27060 }
27061 v_1_0 := v_1.Args[0]
27062 if v_1_0.Op != OpAnd16 {
27063 break
27064 }
27065 _ = v_1_0.Args[1]
27066 v_1_0_0 := v_1_0.Args[0]
27067 v_1_0_1 := v_1_0.Args[1]
27068 for _i0 := 0; _i0 <= 1; _i0, v_1_0_0, v_1_0_1 = _i0+1, v_1_0_1, v_1_0_0 {
27069 y := v_1_0_0
27070 if v_1_0_1.Op != OpConst16 {
27071 continue
27072 }
27073 c := auxIntToInt16(v_1_0_1.AuxInt)
27074 if !(c&7 == 7) {
27075 continue
27076 }
27077 v.reset(OpRotateLeft8)
27078 v0 := b.NewValue0(v.Pos, OpNeg16, y.Type)
27079 v0.AddArg(y)
27080 v.AddArg2(x, v0)
27081 return true
27082 }
27083 break
27084 }
27085
27086
27087
27088 for {
27089 x := v_0
27090 if v_1.Op != OpNeg8 {
27091 break
27092 }
27093 v_1_0 := v_1.Args[0]
27094 if v_1_0.Op != OpAnd8 {
27095 break
27096 }
27097 _ = v_1_0.Args[1]
27098 v_1_0_0 := v_1_0.Args[0]
27099 v_1_0_1 := v_1_0.Args[1]
27100 for _i0 := 0; _i0 <= 1; _i0, v_1_0_0, v_1_0_1 = _i0+1, v_1_0_1, v_1_0_0 {
27101 y := v_1_0_0
27102 if v_1_0_1.Op != OpConst8 {
27103 continue
27104 }
27105 c := auxIntToInt8(v_1_0_1.AuxInt)
27106 if !(c&7 == 7) {
27107 continue
27108 }
27109 v.reset(OpRotateLeft8)
27110 v0 := b.NewValue0(v.Pos, OpNeg8, y.Type)
27111 v0.AddArg(y)
27112 v.AddArg2(x, v0)
27113 return true
27114 }
27115 break
27116 }
27117
27118
27119
27120 for {
27121 x := v_0
27122 if v_1.Op != OpAdd64 {
27123 break
27124 }
27125 _ = v_1.Args[1]
27126 v_1_0 := v_1.Args[0]
27127 v_1_1 := v_1.Args[1]
27128 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
27129 y := v_1_0
27130 if v_1_1.Op != OpConst64 {
27131 continue
27132 }
27133 c := auxIntToInt64(v_1_1.AuxInt)
27134 if !(c&7 == 0) {
27135 continue
27136 }
27137 v.reset(OpRotateLeft8)
27138 v.AddArg2(x, y)
27139 return true
27140 }
27141 break
27142 }
27143
27144
27145
27146 for {
27147 x := v_0
27148 if v_1.Op != OpAdd32 {
27149 break
27150 }
27151 _ = v_1.Args[1]
27152 v_1_0 := v_1.Args[0]
27153 v_1_1 := v_1.Args[1]
27154 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
27155 y := v_1_0
27156 if v_1_1.Op != OpConst32 {
27157 continue
27158 }
27159 c := auxIntToInt32(v_1_1.AuxInt)
27160 if !(c&7 == 0) {
27161 continue
27162 }
27163 v.reset(OpRotateLeft8)
27164 v.AddArg2(x, y)
27165 return true
27166 }
27167 break
27168 }
27169
27170
27171
27172 for {
27173 x := v_0
27174 if v_1.Op != OpAdd16 {
27175 break
27176 }
27177 _ = v_1.Args[1]
27178 v_1_0 := v_1.Args[0]
27179 v_1_1 := v_1.Args[1]
27180 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
27181 y := v_1_0
27182 if v_1_1.Op != OpConst16 {
27183 continue
27184 }
27185 c := auxIntToInt16(v_1_1.AuxInt)
27186 if !(c&7 == 0) {
27187 continue
27188 }
27189 v.reset(OpRotateLeft8)
27190 v.AddArg2(x, y)
27191 return true
27192 }
27193 break
27194 }
27195
27196
27197
27198 for {
27199 x := v_0
27200 if v_1.Op != OpAdd8 {
27201 break
27202 }
27203 _ = v_1.Args[1]
27204 v_1_0 := v_1.Args[0]
27205 v_1_1 := v_1.Args[1]
27206 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
27207 y := v_1_0
27208 if v_1_1.Op != OpConst8 {
27209 continue
27210 }
27211 c := auxIntToInt8(v_1_1.AuxInt)
27212 if !(c&7 == 0) {
27213 continue
27214 }
27215 v.reset(OpRotateLeft8)
27216 v.AddArg2(x, y)
27217 return true
27218 }
27219 break
27220 }
27221
27222
27223
27224 for {
27225 x := v_0
27226 if v_1.Op != OpSub64 {
27227 break
27228 }
27229 y := v_1.Args[1]
27230 v_1_0 := v_1.Args[0]
27231 if v_1_0.Op != OpConst64 {
27232 break
27233 }
27234 c := auxIntToInt64(v_1_0.AuxInt)
27235 if !(c&7 == 0) {
27236 break
27237 }
27238 v.reset(OpRotateLeft8)
27239 v0 := b.NewValue0(v.Pos, OpNeg64, y.Type)
27240 v0.AddArg(y)
27241 v.AddArg2(x, v0)
27242 return true
27243 }
27244
27245
27246
27247 for {
27248 x := v_0
27249 if v_1.Op != OpSub32 {
27250 break
27251 }
27252 y := v_1.Args[1]
27253 v_1_0 := v_1.Args[0]
27254 if v_1_0.Op != OpConst32 {
27255 break
27256 }
27257 c := auxIntToInt32(v_1_0.AuxInt)
27258 if !(c&7 == 0) {
27259 break
27260 }
27261 v.reset(OpRotateLeft8)
27262 v0 := b.NewValue0(v.Pos, OpNeg32, y.Type)
27263 v0.AddArg(y)
27264 v.AddArg2(x, v0)
27265 return true
27266 }
27267
27268
27269
27270 for {
27271 x := v_0
27272 if v_1.Op != OpSub16 {
27273 break
27274 }
27275 y := v_1.Args[1]
27276 v_1_0 := v_1.Args[0]
27277 if v_1_0.Op != OpConst16 {
27278 break
27279 }
27280 c := auxIntToInt16(v_1_0.AuxInt)
27281 if !(c&7 == 0) {
27282 break
27283 }
27284 v.reset(OpRotateLeft8)
27285 v0 := b.NewValue0(v.Pos, OpNeg16, y.Type)
27286 v0.AddArg(y)
27287 v.AddArg2(x, v0)
27288 return true
27289 }
27290
27291
27292
27293 for {
27294 x := v_0
27295 if v_1.Op != OpSub8 {
27296 break
27297 }
27298 y := v_1.Args[1]
27299 v_1_0 := v_1.Args[0]
27300 if v_1_0.Op != OpConst8 {
27301 break
27302 }
27303 c := auxIntToInt8(v_1_0.AuxInt)
27304 if !(c&7 == 0) {
27305 break
27306 }
27307 v.reset(OpRotateLeft8)
27308 v0 := b.NewValue0(v.Pos, OpNeg8, y.Type)
27309 v0.AddArg(y)
27310 v.AddArg2(x, v0)
27311 return true
27312 }
27313
27314
27315
27316 for {
27317 x := v_0
27318 if v_1.Op != OpConst64 {
27319 break
27320 }
27321 t := v_1.Type
27322 c := auxIntToInt64(v_1.AuxInt)
27323 if !(config.PtrSize == 4) {
27324 break
27325 }
27326 v.reset(OpRotateLeft8)
27327 v0 := b.NewValue0(v.Pos, OpConst32, t)
27328 v0.AuxInt = int32ToAuxInt(int32(c))
27329 v.AddArg2(x, v0)
27330 return true
27331 }
27332
27333
27334
27335 for {
27336 if v_0.Op != OpRotateLeft8 {
27337 break
27338 }
27339 c := v_0.Args[1]
27340 x := v_0.Args[0]
27341 d := v_1
27342 if !(c.Type.Size() == 8 && d.Type.Size() == 8) {
27343 break
27344 }
27345 v.reset(OpRotateLeft8)
27346 v0 := b.NewValue0(v.Pos, OpAdd64, c.Type)
27347 v0.AddArg2(c, d)
27348 v.AddArg2(x, v0)
27349 return true
27350 }
27351
27352
27353
27354 for {
27355 if v_0.Op != OpRotateLeft8 {
27356 break
27357 }
27358 c := v_0.Args[1]
27359 x := v_0.Args[0]
27360 d := v_1
27361 if !(c.Type.Size() == 4 && d.Type.Size() == 4) {
27362 break
27363 }
27364 v.reset(OpRotateLeft8)
27365 v0 := b.NewValue0(v.Pos, OpAdd32, c.Type)
27366 v0.AddArg2(c, d)
27367 v.AddArg2(x, v0)
27368 return true
27369 }
27370
27371
27372
27373 for {
27374 if v_0.Op != OpRotateLeft8 {
27375 break
27376 }
27377 c := v_0.Args[1]
27378 x := v_0.Args[0]
27379 d := v_1
27380 if !(c.Type.Size() == 2 && d.Type.Size() == 2) {
27381 break
27382 }
27383 v.reset(OpRotateLeft8)
27384 v0 := b.NewValue0(v.Pos, OpAdd16, c.Type)
27385 v0.AddArg2(c, d)
27386 v.AddArg2(x, v0)
27387 return true
27388 }
27389
27390
27391
27392 for {
27393 if v_0.Op != OpRotateLeft8 {
27394 break
27395 }
27396 c := v_0.Args[1]
27397 x := v_0.Args[0]
27398 d := v_1
27399 if !(c.Type.Size() == 1 && d.Type.Size() == 1) {
27400 break
27401 }
27402 v.reset(OpRotateLeft8)
27403 v0 := b.NewValue0(v.Pos, OpAdd8, c.Type)
27404 v0.AddArg2(c, d)
27405 v.AddArg2(x, v0)
27406 return true
27407 }
27408 return false
27409 }
27410 func rewriteValuegeneric_OpRound32F(v *Value) bool {
27411 v_0 := v.Args[0]
27412
27413
27414 for {
27415 x := v_0
27416 if x.Op != OpConst32F {
27417 break
27418 }
27419 v.copyOf(x)
27420 return true
27421 }
27422 return false
27423 }
27424 func rewriteValuegeneric_OpRound64F(v *Value) bool {
27425 v_0 := v.Args[0]
27426
27427
27428 for {
27429 x := v_0
27430 if x.Op != OpConst64F {
27431 break
27432 }
27433 v.copyOf(x)
27434 return true
27435 }
27436 return false
27437 }
27438 func rewriteValuegeneric_OpRoundToEven(v *Value) bool {
27439 v_0 := v.Args[0]
27440
27441
27442 for {
27443 if v_0.Op != OpConst64F {
27444 break
27445 }
27446 c := auxIntToFloat64(v_0.AuxInt)
27447 v.reset(OpConst64F)
27448 v.AuxInt = float64ToAuxInt(math.RoundToEven(c))
27449 return true
27450 }
27451 return false
27452 }
27453 func rewriteValuegeneric_OpRsh16Ux16(v *Value) bool {
27454 v_1 := v.Args[1]
27455 v_0 := v.Args[0]
27456 b := v.Block
27457
27458
27459 for {
27460 t := v.Type
27461 x := v_0
27462 if v_1.Op != OpConst16 {
27463 break
27464 }
27465 c := auxIntToInt16(v_1.AuxInt)
27466 v.reset(OpRsh16Ux64)
27467 v0 := b.NewValue0(v.Pos, OpConst64, t)
27468 v0.AuxInt = int64ToAuxInt(int64(uint16(c)))
27469 v.AddArg2(x, v0)
27470 return true
27471 }
27472
27473
27474 for {
27475 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 {
27476 break
27477 }
27478 v.reset(OpConst16)
27479 v.AuxInt = int16ToAuxInt(0)
27480 return true
27481 }
27482 return false
27483 }
27484 func rewriteValuegeneric_OpRsh16Ux32(v *Value) bool {
27485 v_1 := v.Args[1]
27486 v_0 := v.Args[0]
27487 b := v.Block
27488
27489
27490 for {
27491 t := v.Type
27492 x := v_0
27493 if v_1.Op != OpConst32 {
27494 break
27495 }
27496 c := auxIntToInt32(v_1.AuxInt)
27497 v.reset(OpRsh16Ux64)
27498 v0 := b.NewValue0(v.Pos, OpConst64, t)
27499 v0.AuxInt = int64ToAuxInt(int64(uint32(c)))
27500 v.AddArg2(x, v0)
27501 return true
27502 }
27503
27504
27505 for {
27506 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 {
27507 break
27508 }
27509 v.reset(OpConst16)
27510 v.AuxInt = int16ToAuxInt(0)
27511 return true
27512 }
27513 return false
27514 }
27515 func rewriteValuegeneric_OpRsh16Ux64(v *Value) bool {
27516 v_1 := v.Args[1]
27517 v_0 := v.Args[0]
27518 b := v.Block
27519 typ := &b.Func.Config.Types
27520
27521
27522 for {
27523 if v_0.Op != OpConst16 {
27524 break
27525 }
27526 c := auxIntToInt16(v_0.AuxInt)
27527 if v_1.Op != OpConst64 {
27528 break
27529 }
27530 d := auxIntToInt64(v_1.AuxInt)
27531 v.reset(OpConst16)
27532 v.AuxInt = int16ToAuxInt(int16(uint16(c) >> uint64(d)))
27533 return true
27534 }
27535
27536
27537 for {
27538 x := v_0
27539 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 0 {
27540 break
27541 }
27542 v.copyOf(x)
27543 return true
27544 }
27545
27546
27547 for {
27548 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 {
27549 break
27550 }
27551 v.reset(OpConst16)
27552 v.AuxInt = int16ToAuxInt(0)
27553 return true
27554 }
27555
27556
27557
27558 for {
27559 if v_1.Op != OpConst64 {
27560 break
27561 }
27562 c := auxIntToInt64(v_1.AuxInt)
27563 if !(uint64(c) >= 16) {
27564 break
27565 }
27566 v.reset(OpConst16)
27567 v.AuxInt = int16ToAuxInt(0)
27568 return true
27569 }
27570
27571
27572
27573 for {
27574 t := v.Type
27575 if v_0.Op != OpRsh16Ux64 {
27576 break
27577 }
27578 _ = v_0.Args[1]
27579 x := v_0.Args[0]
27580 v_0_1 := v_0.Args[1]
27581 if v_0_1.Op != OpConst64 {
27582 break
27583 }
27584 c := auxIntToInt64(v_0_1.AuxInt)
27585 if v_1.Op != OpConst64 {
27586 break
27587 }
27588 d := auxIntToInt64(v_1.AuxInt)
27589 if !(!uaddOvf(c, d)) {
27590 break
27591 }
27592 v.reset(OpRsh16Ux64)
27593 v0 := b.NewValue0(v.Pos, OpConst64, t)
27594 v0.AuxInt = int64ToAuxInt(c + d)
27595 v.AddArg2(x, v0)
27596 return true
27597 }
27598
27599
27600 for {
27601 if v_0.Op != OpRsh16x64 {
27602 break
27603 }
27604 x := v_0.Args[0]
27605 if v_1.Op != OpConst64 {
27606 break
27607 }
27608 t := v_1.Type
27609 if auxIntToInt64(v_1.AuxInt) != 15 {
27610 break
27611 }
27612 v.reset(OpRsh16Ux64)
27613 v0 := b.NewValue0(v.Pos, OpConst64, t)
27614 v0.AuxInt = int64ToAuxInt(15)
27615 v.AddArg2(x, v0)
27616 return true
27617 }
27618
27619
27620
27621 for {
27622 i := v_0
27623 if i.Op != OpLsh16x64 {
27624 break
27625 }
27626 _ = i.Args[1]
27627 x := i.Args[0]
27628 i_1 := i.Args[1]
27629 if i_1.Op != OpConst64 {
27630 break
27631 }
27632 c := auxIntToInt64(i_1.AuxInt)
27633 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != c || !(c >= 0 && c < 16 && i.Uses == 1) {
27634 break
27635 }
27636 v.reset(OpAnd16)
27637 v0 := b.NewValue0(v.Pos, OpConst16, v.Type)
27638 v0.AuxInt = int16ToAuxInt(int16(^uint16(0) >> c))
27639 v.AddArg2(x, v0)
27640 return true
27641 }
27642
27643
27644
27645 for {
27646 if v_0.Op != OpLsh16x64 {
27647 break
27648 }
27649 _ = v_0.Args[1]
27650 v_0_0 := v_0.Args[0]
27651 if v_0_0.Op != OpRsh16Ux64 {
27652 break
27653 }
27654 _ = v_0_0.Args[1]
27655 x := v_0_0.Args[0]
27656 v_0_0_1 := v_0_0.Args[1]
27657 if v_0_0_1.Op != OpConst64 {
27658 break
27659 }
27660 c1 := auxIntToInt64(v_0_0_1.AuxInt)
27661 v_0_1 := v_0.Args[1]
27662 if v_0_1.Op != OpConst64 {
27663 break
27664 }
27665 c2 := auxIntToInt64(v_0_1.AuxInt)
27666 if v_1.Op != OpConst64 {
27667 break
27668 }
27669 c3 := auxIntToInt64(v_1.AuxInt)
27670 if !(uint64(c1) >= uint64(c2) && uint64(c3) >= uint64(c2) && !uaddOvf(c1-c2, c3)) {
27671 break
27672 }
27673 v.reset(OpRsh16Ux64)
27674 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
27675 v0.AuxInt = int64ToAuxInt(c1 - c2 + c3)
27676 v.AddArg2(x, v0)
27677 return true
27678 }
27679
27680
27681 for {
27682 if v_0.Op != OpLsh16x64 {
27683 break
27684 }
27685 _ = v_0.Args[1]
27686 x := v_0.Args[0]
27687 v_0_1 := v_0.Args[1]
27688 if v_0_1.Op != OpConst64 || auxIntToInt64(v_0_1.AuxInt) != 8 || v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 8 {
27689 break
27690 }
27691 v.reset(OpZeroExt8to16)
27692 v0 := b.NewValue0(v.Pos, OpTrunc16to8, typ.UInt8)
27693 v0.AddArg(x)
27694 v.AddArg(v0)
27695 return true
27696 }
27697 return false
27698 }
27699 func rewriteValuegeneric_OpRsh16Ux8(v *Value) bool {
27700 v_1 := v.Args[1]
27701 v_0 := v.Args[0]
27702 b := v.Block
27703
27704
27705 for {
27706 t := v.Type
27707 x := v_0
27708 if v_1.Op != OpConst8 {
27709 break
27710 }
27711 c := auxIntToInt8(v_1.AuxInt)
27712 v.reset(OpRsh16Ux64)
27713 v0 := b.NewValue0(v.Pos, OpConst64, t)
27714 v0.AuxInt = int64ToAuxInt(int64(uint8(c)))
27715 v.AddArg2(x, v0)
27716 return true
27717 }
27718
27719
27720 for {
27721 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 {
27722 break
27723 }
27724 v.reset(OpConst16)
27725 v.AuxInt = int16ToAuxInt(0)
27726 return true
27727 }
27728 return false
27729 }
27730 func rewriteValuegeneric_OpRsh16x16(v *Value) bool {
27731 v_1 := v.Args[1]
27732 v_0 := v.Args[0]
27733 b := v.Block
27734
27735
27736 for {
27737 t := v.Type
27738 x := v_0
27739 if v_1.Op != OpConst16 {
27740 break
27741 }
27742 c := auxIntToInt16(v_1.AuxInt)
27743 v.reset(OpRsh16x64)
27744 v0 := b.NewValue0(v.Pos, OpConst64, t)
27745 v0.AuxInt = int64ToAuxInt(int64(uint16(c)))
27746 v.AddArg2(x, v0)
27747 return true
27748 }
27749
27750
27751 for {
27752 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 {
27753 break
27754 }
27755 v.reset(OpConst16)
27756 v.AuxInt = int16ToAuxInt(0)
27757 return true
27758 }
27759 return false
27760 }
27761 func rewriteValuegeneric_OpRsh16x32(v *Value) bool {
27762 v_1 := v.Args[1]
27763 v_0 := v.Args[0]
27764 b := v.Block
27765
27766
27767 for {
27768 t := v.Type
27769 x := v_0
27770 if v_1.Op != OpConst32 {
27771 break
27772 }
27773 c := auxIntToInt32(v_1.AuxInt)
27774 v.reset(OpRsh16x64)
27775 v0 := b.NewValue0(v.Pos, OpConst64, t)
27776 v0.AuxInt = int64ToAuxInt(int64(uint32(c)))
27777 v.AddArg2(x, v0)
27778 return true
27779 }
27780
27781
27782 for {
27783 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 {
27784 break
27785 }
27786 v.reset(OpConst16)
27787 v.AuxInt = int16ToAuxInt(0)
27788 return true
27789 }
27790 return false
27791 }
27792 func rewriteValuegeneric_OpRsh16x64(v *Value) bool {
27793 v_1 := v.Args[1]
27794 v_0 := v.Args[0]
27795 b := v.Block
27796 typ := &b.Func.Config.Types
27797
27798
27799 for {
27800 if v_0.Op != OpConst16 {
27801 break
27802 }
27803 c := auxIntToInt16(v_0.AuxInt)
27804 if v_1.Op != OpConst64 {
27805 break
27806 }
27807 d := auxIntToInt64(v_1.AuxInt)
27808 v.reset(OpConst16)
27809 v.AuxInt = int16ToAuxInt(c >> uint64(d))
27810 return true
27811 }
27812
27813
27814 for {
27815 x := v_0
27816 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 0 {
27817 break
27818 }
27819 v.copyOf(x)
27820 return true
27821 }
27822
27823
27824 for {
27825 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 {
27826 break
27827 }
27828 v.reset(OpConst16)
27829 v.AuxInt = int16ToAuxInt(0)
27830 return true
27831 }
27832
27833
27834
27835 for {
27836 t := v.Type
27837 if v_0.Op != OpRsh16x64 {
27838 break
27839 }
27840 _ = v_0.Args[1]
27841 x := v_0.Args[0]
27842 v_0_1 := v_0.Args[1]
27843 if v_0_1.Op != OpConst64 {
27844 break
27845 }
27846 c := auxIntToInt64(v_0_1.AuxInt)
27847 if v_1.Op != OpConst64 {
27848 break
27849 }
27850 d := auxIntToInt64(v_1.AuxInt)
27851 if !(!uaddOvf(c, d)) {
27852 break
27853 }
27854 v.reset(OpRsh16x64)
27855 v0 := b.NewValue0(v.Pos, OpConst64, t)
27856 v0.AuxInt = int64ToAuxInt(c + d)
27857 v.AddArg2(x, v0)
27858 return true
27859 }
27860
27861
27862 for {
27863 if v_0.Op != OpLsh16x64 {
27864 break
27865 }
27866 _ = v_0.Args[1]
27867 x := v_0.Args[0]
27868 v_0_1 := v_0.Args[1]
27869 if v_0_1.Op != OpConst64 || auxIntToInt64(v_0_1.AuxInt) != 8 || v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 8 {
27870 break
27871 }
27872 v.reset(OpSignExt8to16)
27873 v0 := b.NewValue0(v.Pos, OpTrunc16to8, typ.Int8)
27874 v0.AddArg(x)
27875 v.AddArg(v0)
27876 return true
27877 }
27878 return false
27879 }
27880 func rewriteValuegeneric_OpRsh16x8(v *Value) bool {
27881 v_1 := v.Args[1]
27882 v_0 := v.Args[0]
27883 b := v.Block
27884
27885
27886 for {
27887 t := v.Type
27888 x := v_0
27889 if v_1.Op != OpConst8 {
27890 break
27891 }
27892 c := auxIntToInt8(v_1.AuxInt)
27893 v.reset(OpRsh16x64)
27894 v0 := b.NewValue0(v.Pos, OpConst64, t)
27895 v0.AuxInt = int64ToAuxInt(int64(uint8(c)))
27896 v.AddArg2(x, v0)
27897 return true
27898 }
27899
27900
27901 for {
27902 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 {
27903 break
27904 }
27905 v.reset(OpConst16)
27906 v.AuxInt = int16ToAuxInt(0)
27907 return true
27908 }
27909 return false
27910 }
27911 func rewriteValuegeneric_OpRsh32Ux16(v *Value) bool {
27912 v_1 := v.Args[1]
27913 v_0 := v.Args[0]
27914 b := v.Block
27915
27916
27917 for {
27918 t := v.Type
27919 x := v_0
27920 if v_1.Op != OpConst16 {
27921 break
27922 }
27923 c := auxIntToInt16(v_1.AuxInt)
27924 v.reset(OpRsh32Ux64)
27925 v0 := b.NewValue0(v.Pos, OpConst64, t)
27926 v0.AuxInt = int64ToAuxInt(int64(uint16(c)))
27927 v.AddArg2(x, v0)
27928 return true
27929 }
27930
27931
27932 for {
27933 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
27934 break
27935 }
27936 v.reset(OpConst32)
27937 v.AuxInt = int32ToAuxInt(0)
27938 return true
27939 }
27940 return false
27941 }
27942 func rewriteValuegeneric_OpRsh32Ux32(v *Value) bool {
27943 v_1 := v.Args[1]
27944 v_0 := v.Args[0]
27945 b := v.Block
27946
27947
27948 for {
27949 t := v.Type
27950 x := v_0
27951 if v_1.Op != OpConst32 {
27952 break
27953 }
27954 c := auxIntToInt32(v_1.AuxInt)
27955 v.reset(OpRsh32Ux64)
27956 v0 := b.NewValue0(v.Pos, OpConst64, t)
27957 v0.AuxInt = int64ToAuxInt(int64(uint32(c)))
27958 v.AddArg2(x, v0)
27959 return true
27960 }
27961
27962
27963 for {
27964 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
27965 break
27966 }
27967 v.reset(OpConst32)
27968 v.AuxInt = int32ToAuxInt(0)
27969 return true
27970 }
27971 return false
27972 }
27973 func rewriteValuegeneric_OpRsh32Ux64(v *Value) bool {
27974 v_1 := v.Args[1]
27975 v_0 := v.Args[0]
27976 b := v.Block
27977 typ := &b.Func.Config.Types
27978
27979
27980 for {
27981 if v_0.Op != OpConst32 {
27982 break
27983 }
27984 c := auxIntToInt32(v_0.AuxInt)
27985 if v_1.Op != OpConst64 {
27986 break
27987 }
27988 d := auxIntToInt64(v_1.AuxInt)
27989 v.reset(OpConst32)
27990 v.AuxInt = int32ToAuxInt(int32(uint32(c) >> uint64(d)))
27991 return true
27992 }
27993
27994
27995 for {
27996 x := v_0
27997 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 0 {
27998 break
27999 }
28000 v.copyOf(x)
28001 return true
28002 }
28003
28004
28005 for {
28006 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
28007 break
28008 }
28009 v.reset(OpConst32)
28010 v.AuxInt = int32ToAuxInt(0)
28011 return true
28012 }
28013
28014
28015
28016 for {
28017 if v_1.Op != OpConst64 {
28018 break
28019 }
28020 c := auxIntToInt64(v_1.AuxInt)
28021 if !(uint64(c) >= 32) {
28022 break
28023 }
28024 v.reset(OpConst32)
28025 v.AuxInt = int32ToAuxInt(0)
28026 return true
28027 }
28028
28029
28030
28031 for {
28032 t := v.Type
28033 if v_0.Op != OpRsh32Ux64 {
28034 break
28035 }
28036 _ = v_0.Args[1]
28037 x := v_0.Args[0]
28038 v_0_1 := v_0.Args[1]
28039 if v_0_1.Op != OpConst64 {
28040 break
28041 }
28042 c := auxIntToInt64(v_0_1.AuxInt)
28043 if v_1.Op != OpConst64 {
28044 break
28045 }
28046 d := auxIntToInt64(v_1.AuxInt)
28047 if !(!uaddOvf(c, d)) {
28048 break
28049 }
28050 v.reset(OpRsh32Ux64)
28051 v0 := b.NewValue0(v.Pos, OpConst64, t)
28052 v0.AuxInt = int64ToAuxInt(c + d)
28053 v.AddArg2(x, v0)
28054 return true
28055 }
28056
28057
28058 for {
28059 if v_0.Op != OpRsh32x64 {
28060 break
28061 }
28062 x := v_0.Args[0]
28063 if v_1.Op != OpConst64 {
28064 break
28065 }
28066 t := v_1.Type
28067 if auxIntToInt64(v_1.AuxInt) != 31 {
28068 break
28069 }
28070 v.reset(OpRsh32Ux64)
28071 v0 := b.NewValue0(v.Pos, OpConst64, t)
28072 v0.AuxInt = int64ToAuxInt(31)
28073 v.AddArg2(x, v0)
28074 return true
28075 }
28076
28077
28078
28079 for {
28080 i := v_0
28081 if i.Op != OpLsh32x64 {
28082 break
28083 }
28084 _ = i.Args[1]
28085 x := i.Args[0]
28086 i_1 := i.Args[1]
28087 if i_1.Op != OpConst64 {
28088 break
28089 }
28090 c := auxIntToInt64(i_1.AuxInt)
28091 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != c || !(c >= 0 && c < 32 && i.Uses == 1) {
28092 break
28093 }
28094 v.reset(OpAnd32)
28095 v0 := b.NewValue0(v.Pos, OpConst32, v.Type)
28096 v0.AuxInt = int32ToAuxInt(int32(^uint32(0) >> c))
28097 v.AddArg2(x, v0)
28098 return true
28099 }
28100
28101
28102
28103 for {
28104 if v_0.Op != OpLsh32x64 {
28105 break
28106 }
28107 _ = v_0.Args[1]
28108 v_0_0 := v_0.Args[0]
28109 if v_0_0.Op != OpRsh32Ux64 {
28110 break
28111 }
28112 _ = v_0_0.Args[1]
28113 x := v_0_0.Args[0]
28114 v_0_0_1 := v_0_0.Args[1]
28115 if v_0_0_1.Op != OpConst64 {
28116 break
28117 }
28118 c1 := auxIntToInt64(v_0_0_1.AuxInt)
28119 v_0_1 := v_0.Args[1]
28120 if v_0_1.Op != OpConst64 {
28121 break
28122 }
28123 c2 := auxIntToInt64(v_0_1.AuxInt)
28124 if v_1.Op != OpConst64 {
28125 break
28126 }
28127 c3 := auxIntToInt64(v_1.AuxInt)
28128 if !(uint64(c1) >= uint64(c2) && uint64(c3) >= uint64(c2) && !uaddOvf(c1-c2, c3)) {
28129 break
28130 }
28131 v.reset(OpRsh32Ux64)
28132 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
28133 v0.AuxInt = int64ToAuxInt(c1 - c2 + c3)
28134 v.AddArg2(x, v0)
28135 return true
28136 }
28137
28138
28139 for {
28140 if v_0.Op != OpLsh32x64 {
28141 break
28142 }
28143 _ = v_0.Args[1]
28144 x := v_0.Args[0]
28145 v_0_1 := v_0.Args[1]
28146 if v_0_1.Op != OpConst64 || auxIntToInt64(v_0_1.AuxInt) != 24 || v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 24 {
28147 break
28148 }
28149 v.reset(OpZeroExt8to32)
28150 v0 := b.NewValue0(v.Pos, OpTrunc32to8, typ.UInt8)
28151 v0.AddArg(x)
28152 v.AddArg(v0)
28153 return true
28154 }
28155
28156
28157 for {
28158 if v_0.Op != OpLsh32x64 {
28159 break
28160 }
28161 _ = v_0.Args[1]
28162 x := v_0.Args[0]
28163 v_0_1 := v_0.Args[1]
28164 if v_0_1.Op != OpConst64 || auxIntToInt64(v_0_1.AuxInt) != 16 || v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 16 {
28165 break
28166 }
28167 v.reset(OpZeroExt16to32)
28168 v0 := b.NewValue0(v.Pos, OpTrunc32to16, typ.UInt16)
28169 v0.AddArg(x)
28170 v.AddArg(v0)
28171 return true
28172 }
28173 return false
28174 }
28175 func rewriteValuegeneric_OpRsh32Ux8(v *Value) bool {
28176 v_1 := v.Args[1]
28177 v_0 := v.Args[0]
28178 b := v.Block
28179
28180
28181 for {
28182 t := v.Type
28183 x := v_0
28184 if v_1.Op != OpConst8 {
28185 break
28186 }
28187 c := auxIntToInt8(v_1.AuxInt)
28188 v.reset(OpRsh32Ux64)
28189 v0 := b.NewValue0(v.Pos, OpConst64, t)
28190 v0.AuxInt = int64ToAuxInt(int64(uint8(c)))
28191 v.AddArg2(x, v0)
28192 return true
28193 }
28194
28195
28196 for {
28197 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
28198 break
28199 }
28200 v.reset(OpConst32)
28201 v.AuxInt = int32ToAuxInt(0)
28202 return true
28203 }
28204 return false
28205 }
28206 func rewriteValuegeneric_OpRsh32x16(v *Value) bool {
28207 v_1 := v.Args[1]
28208 v_0 := v.Args[0]
28209 b := v.Block
28210
28211
28212 for {
28213 t := v.Type
28214 x := v_0
28215 if v_1.Op != OpConst16 {
28216 break
28217 }
28218 c := auxIntToInt16(v_1.AuxInt)
28219 v.reset(OpRsh32x64)
28220 v0 := b.NewValue0(v.Pos, OpConst64, t)
28221 v0.AuxInt = int64ToAuxInt(int64(uint16(c)))
28222 v.AddArg2(x, v0)
28223 return true
28224 }
28225
28226
28227 for {
28228 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
28229 break
28230 }
28231 v.reset(OpConst32)
28232 v.AuxInt = int32ToAuxInt(0)
28233 return true
28234 }
28235 return false
28236 }
28237 func rewriteValuegeneric_OpRsh32x32(v *Value) bool {
28238 v_1 := v.Args[1]
28239 v_0 := v.Args[0]
28240 b := v.Block
28241
28242
28243 for {
28244 t := v.Type
28245 x := v_0
28246 if v_1.Op != OpConst32 {
28247 break
28248 }
28249 c := auxIntToInt32(v_1.AuxInt)
28250 v.reset(OpRsh32x64)
28251 v0 := b.NewValue0(v.Pos, OpConst64, t)
28252 v0.AuxInt = int64ToAuxInt(int64(uint32(c)))
28253 v.AddArg2(x, v0)
28254 return true
28255 }
28256
28257
28258 for {
28259 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
28260 break
28261 }
28262 v.reset(OpConst32)
28263 v.AuxInt = int32ToAuxInt(0)
28264 return true
28265 }
28266 return false
28267 }
28268 func rewriteValuegeneric_OpRsh32x64(v *Value) bool {
28269 v_1 := v.Args[1]
28270 v_0 := v.Args[0]
28271 b := v.Block
28272 typ := &b.Func.Config.Types
28273
28274
28275 for {
28276 if v_0.Op != OpConst32 {
28277 break
28278 }
28279 c := auxIntToInt32(v_0.AuxInt)
28280 if v_1.Op != OpConst64 {
28281 break
28282 }
28283 d := auxIntToInt64(v_1.AuxInt)
28284 v.reset(OpConst32)
28285 v.AuxInt = int32ToAuxInt(c >> uint64(d))
28286 return true
28287 }
28288
28289
28290 for {
28291 x := v_0
28292 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 0 {
28293 break
28294 }
28295 v.copyOf(x)
28296 return true
28297 }
28298
28299
28300 for {
28301 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
28302 break
28303 }
28304 v.reset(OpConst32)
28305 v.AuxInt = int32ToAuxInt(0)
28306 return true
28307 }
28308
28309
28310
28311 for {
28312 t := v.Type
28313 if v_0.Op != OpRsh32x64 {
28314 break
28315 }
28316 _ = v_0.Args[1]
28317 x := v_0.Args[0]
28318 v_0_1 := v_0.Args[1]
28319 if v_0_1.Op != OpConst64 {
28320 break
28321 }
28322 c := auxIntToInt64(v_0_1.AuxInt)
28323 if v_1.Op != OpConst64 {
28324 break
28325 }
28326 d := auxIntToInt64(v_1.AuxInt)
28327 if !(!uaddOvf(c, d)) {
28328 break
28329 }
28330 v.reset(OpRsh32x64)
28331 v0 := b.NewValue0(v.Pos, OpConst64, t)
28332 v0.AuxInt = int64ToAuxInt(c + d)
28333 v.AddArg2(x, v0)
28334 return true
28335 }
28336
28337
28338 for {
28339 if v_0.Op != OpLsh32x64 {
28340 break
28341 }
28342 _ = v_0.Args[1]
28343 x := v_0.Args[0]
28344 v_0_1 := v_0.Args[1]
28345 if v_0_1.Op != OpConst64 || auxIntToInt64(v_0_1.AuxInt) != 24 || v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 24 {
28346 break
28347 }
28348 v.reset(OpSignExt8to32)
28349 v0 := b.NewValue0(v.Pos, OpTrunc32to8, typ.Int8)
28350 v0.AddArg(x)
28351 v.AddArg(v0)
28352 return true
28353 }
28354
28355
28356 for {
28357 if v_0.Op != OpLsh32x64 {
28358 break
28359 }
28360 _ = v_0.Args[1]
28361 x := v_0.Args[0]
28362 v_0_1 := v_0.Args[1]
28363 if v_0_1.Op != OpConst64 || auxIntToInt64(v_0_1.AuxInt) != 16 || v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 16 {
28364 break
28365 }
28366 v.reset(OpSignExt16to32)
28367 v0 := b.NewValue0(v.Pos, OpTrunc32to16, typ.Int16)
28368 v0.AddArg(x)
28369 v.AddArg(v0)
28370 return true
28371 }
28372 return false
28373 }
28374 func rewriteValuegeneric_OpRsh32x8(v *Value) bool {
28375 v_1 := v.Args[1]
28376 v_0 := v.Args[0]
28377 b := v.Block
28378
28379
28380 for {
28381 t := v.Type
28382 x := v_0
28383 if v_1.Op != OpConst8 {
28384 break
28385 }
28386 c := auxIntToInt8(v_1.AuxInt)
28387 v.reset(OpRsh32x64)
28388 v0 := b.NewValue0(v.Pos, OpConst64, t)
28389 v0.AuxInt = int64ToAuxInt(int64(uint8(c)))
28390 v.AddArg2(x, v0)
28391 return true
28392 }
28393
28394
28395 for {
28396 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
28397 break
28398 }
28399 v.reset(OpConst32)
28400 v.AuxInt = int32ToAuxInt(0)
28401 return true
28402 }
28403 return false
28404 }
28405 func rewriteValuegeneric_OpRsh64Ux16(v *Value) bool {
28406 v_1 := v.Args[1]
28407 v_0 := v.Args[0]
28408 b := v.Block
28409
28410
28411 for {
28412 t := v.Type
28413 x := v_0
28414 if v_1.Op != OpConst16 {
28415 break
28416 }
28417 c := auxIntToInt16(v_1.AuxInt)
28418 v.reset(OpRsh64Ux64)
28419 v0 := b.NewValue0(v.Pos, OpConst64, t)
28420 v0.AuxInt = int64ToAuxInt(int64(uint16(c)))
28421 v.AddArg2(x, v0)
28422 return true
28423 }
28424
28425
28426 for {
28427 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
28428 break
28429 }
28430 v.reset(OpConst64)
28431 v.AuxInt = int64ToAuxInt(0)
28432 return true
28433 }
28434 return false
28435 }
28436 func rewriteValuegeneric_OpRsh64Ux32(v *Value) bool {
28437 v_1 := v.Args[1]
28438 v_0 := v.Args[0]
28439 b := v.Block
28440
28441
28442 for {
28443 t := v.Type
28444 x := v_0
28445 if v_1.Op != OpConst32 {
28446 break
28447 }
28448 c := auxIntToInt32(v_1.AuxInt)
28449 v.reset(OpRsh64Ux64)
28450 v0 := b.NewValue0(v.Pos, OpConst64, t)
28451 v0.AuxInt = int64ToAuxInt(int64(uint32(c)))
28452 v.AddArg2(x, v0)
28453 return true
28454 }
28455
28456
28457 for {
28458 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
28459 break
28460 }
28461 v.reset(OpConst64)
28462 v.AuxInt = int64ToAuxInt(0)
28463 return true
28464 }
28465 return false
28466 }
28467 func rewriteValuegeneric_OpRsh64Ux64(v *Value) bool {
28468 v_1 := v.Args[1]
28469 v_0 := v.Args[0]
28470 b := v.Block
28471 typ := &b.Func.Config.Types
28472
28473
28474 for {
28475 if v_0.Op != OpConst64 {
28476 break
28477 }
28478 c := auxIntToInt64(v_0.AuxInt)
28479 if v_1.Op != OpConst64 {
28480 break
28481 }
28482 d := auxIntToInt64(v_1.AuxInt)
28483 v.reset(OpConst64)
28484 v.AuxInt = int64ToAuxInt(int64(uint64(c) >> uint64(d)))
28485 return true
28486 }
28487
28488
28489 for {
28490 x := v_0
28491 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 0 {
28492 break
28493 }
28494 v.copyOf(x)
28495 return true
28496 }
28497
28498
28499 for {
28500 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
28501 break
28502 }
28503 v.reset(OpConst64)
28504 v.AuxInt = int64ToAuxInt(0)
28505 return true
28506 }
28507
28508
28509
28510 for {
28511 if v_1.Op != OpConst64 {
28512 break
28513 }
28514 c := auxIntToInt64(v_1.AuxInt)
28515 if !(uint64(c) >= 64) {
28516 break
28517 }
28518 v.reset(OpConst64)
28519 v.AuxInt = int64ToAuxInt(0)
28520 return true
28521 }
28522
28523
28524
28525 for {
28526 t := v.Type
28527 if v_0.Op != OpRsh64Ux64 {
28528 break
28529 }
28530 _ = v_0.Args[1]
28531 x := v_0.Args[0]
28532 v_0_1 := v_0.Args[1]
28533 if v_0_1.Op != OpConst64 {
28534 break
28535 }
28536 c := auxIntToInt64(v_0_1.AuxInt)
28537 if v_1.Op != OpConst64 {
28538 break
28539 }
28540 d := auxIntToInt64(v_1.AuxInt)
28541 if !(!uaddOvf(c, d)) {
28542 break
28543 }
28544 v.reset(OpRsh64Ux64)
28545 v0 := b.NewValue0(v.Pos, OpConst64, t)
28546 v0.AuxInt = int64ToAuxInt(c + d)
28547 v.AddArg2(x, v0)
28548 return true
28549 }
28550
28551
28552 for {
28553 if v_0.Op != OpRsh64x64 {
28554 break
28555 }
28556 x := v_0.Args[0]
28557 if v_1.Op != OpConst64 {
28558 break
28559 }
28560 t := v_1.Type
28561 if auxIntToInt64(v_1.AuxInt) != 63 {
28562 break
28563 }
28564 v.reset(OpRsh64Ux64)
28565 v0 := b.NewValue0(v.Pos, OpConst64, t)
28566 v0.AuxInt = int64ToAuxInt(63)
28567 v.AddArg2(x, v0)
28568 return true
28569 }
28570
28571
28572
28573 for {
28574 i := v_0
28575 if i.Op != OpLsh64x64 {
28576 break
28577 }
28578 _ = i.Args[1]
28579 x := i.Args[0]
28580 i_1 := i.Args[1]
28581 if i_1.Op != OpConst64 {
28582 break
28583 }
28584 c := auxIntToInt64(i_1.AuxInt)
28585 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != c || !(c >= 0 && c < 64 && i.Uses == 1) {
28586 break
28587 }
28588 v.reset(OpAnd64)
28589 v0 := b.NewValue0(v.Pos, OpConst64, v.Type)
28590 v0.AuxInt = int64ToAuxInt(int64(^uint64(0) >> c))
28591 v.AddArg2(x, v0)
28592 return true
28593 }
28594
28595
28596
28597 for {
28598 if v_0.Op != OpLsh64x64 {
28599 break
28600 }
28601 _ = v_0.Args[1]
28602 v_0_0 := v_0.Args[0]
28603 if v_0_0.Op != OpRsh64Ux64 {
28604 break
28605 }
28606 _ = v_0_0.Args[1]
28607 x := v_0_0.Args[0]
28608 v_0_0_1 := v_0_0.Args[1]
28609 if v_0_0_1.Op != OpConst64 {
28610 break
28611 }
28612 c1 := auxIntToInt64(v_0_0_1.AuxInt)
28613 v_0_1 := v_0.Args[1]
28614 if v_0_1.Op != OpConst64 {
28615 break
28616 }
28617 c2 := auxIntToInt64(v_0_1.AuxInt)
28618 if v_1.Op != OpConst64 {
28619 break
28620 }
28621 c3 := auxIntToInt64(v_1.AuxInt)
28622 if !(uint64(c1) >= uint64(c2) && uint64(c3) >= uint64(c2) && !uaddOvf(c1-c2, c3)) {
28623 break
28624 }
28625 v.reset(OpRsh64Ux64)
28626 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
28627 v0.AuxInt = int64ToAuxInt(c1 - c2 + c3)
28628 v.AddArg2(x, v0)
28629 return true
28630 }
28631
28632
28633 for {
28634 if v_0.Op != OpLsh64x64 {
28635 break
28636 }
28637 _ = v_0.Args[1]
28638 x := v_0.Args[0]
28639 v_0_1 := v_0.Args[1]
28640 if v_0_1.Op != OpConst64 || auxIntToInt64(v_0_1.AuxInt) != 56 || v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 56 {
28641 break
28642 }
28643 v.reset(OpZeroExt8to64)
28644 v0 := b.NewValue0(v.Pos, OpTrunc64to8, typ.UInt8)
28645 v0.AddArg(x)
28646 v.AddArg(v0)
28647 return true
28648 }
28649
28650
28651 for {
28652 if v_0.Op != OpLsh64x64 {
28653 break
28654 }
28655 _ = v_0.Args[1]
28656 x := v_0.Args[0]
28657 v_0_1 := v_0.Args[1]
28658 if v_0_1.Op != OpConst64 || auxIntToInt64(v_0_1.AuxInt) != 48 || v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 48 {
28659 break
28660 }
28661 v.reset(OpZeroExt16to64)
28662 v0 := b.NewValue0(v.Pos, OpTrunc64to16, typ.UInt16)
28663 v0.AddArg(x)
28664 v.AddArg(v0)
28665 return true
28666 }
28667
28668
28669 for {
28670 if v_0.Op != OpLsh64x64 {
28671 break
28672 }
28673 _ = v_0.Args[1]
28674 x := v_0.Args[0]
28675 v_0_1 := v_0.Args[1]
28676 if v_0_1.Op != OpConst64 || auxIntToInt64(v_0_1.AuxInt) != 32 || v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 32 {
28677 break
28678 }
28679 v.reset(OpZeroExt32to64)
28680 v0 := b.NewValue0(v.Pos, OpTrunc64to32, typ.UInt32)
28681 v0.AddArg(x)
28682 v.AddArg(v0)
28683 return true
28684 }
28685 return false
28686 }
28687 func rewriteValuegeneric_OpRsh64Ux8(v *Value) bool {
28688 v_1 := v.Args[1]
28689 v_0 := v.Args[0]
28690 b := v.Block
28691
28692
28693 for {
28694 t := v.Type
28695 x := v_0
28696 if v_1.Op != OpConst8 {
28697 break
28698 }
28699 c := auxIntToInt8(v_1.AuxInt)
28700 v.reset(OpRsh64Ux64)
28701 v0 := b.NewValue0(v.Pos, OpConst64, t)
28702 v0.AuxInt = int64ToAuxInt(int64(uint8(c)))
28703 v.AddArg2(x, v0)
28704 return true
28705 }
28706
28707
28708 for {
28709 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
28710 break
28711 }
28712 v.reset(OpConst64)
28713 v.AuxInt = int64ToAuxInt(0)
28714 return true
28715 }
28716 return false
28717 }
28718 func rewriteValuegeneric_OpRsh64x16(v *Value) bool {
28719 v_1 := v.Args[1]
28720 v_0 := v.Args[0]
28721 b := v.Block
28722
28723
28724 for {
28725 t := v.Type
28726 x := v_0
28727 if v_1.Op != OpConst16 {
28728 break
28729 }
28730 c := auxIntToInt16(v_1.AuxInt)
28731 v.reset(OpRsh64x64)
28732 v0 := b.NewValue0(v.Pos, OpConst64, t)
28733 v0.AuxInt = int64ToAuxInt(int64(uint16(c)))
28734 v.AddArg2(x, v0)
28735 return true
28736 }
28737
28738
28739 for {
28740 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
28741 break
28742 }
28743 v.reset(OpConst64)
28744 v.AuxInt = int64ToAuxInt(0)
28745 return true
28746 }
28747 return false
28748 }
28749 func rewriteValuegeneric_OpRsh64x32(v *Value) bool {
28750 v_1 := v.Args[1]
28751 v_0 := v.Args[0]
28752 b := v.Block
28753
28754
28755 for {
28756 t := v.Type
28757 x := v_0
28758 if v_1.Op != OpConst32 {
28759 break
28760 }
28761 c := auxIntToInt32(v_1.AuxInt)
28762 v.reset(OpRsh64x64)
28763 v0 := b.NewValue0(v.Pos, OpConst64, t)
28764 v0.AuxInt = int64ToAuxInt(int64(uint32(c)))
28765 v.AddArg2(x, v0)
28766 return true
28767 }
28768
28769
28770 for {
28771 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
28772 break
28773 }
28774 v.reset(OpConst64)
28775 v.AuxInt = int64ToAuxInt(0)
28776 return true
28777 }
28778 return false
28779 }
28780 func rewriteValuegeneric_OpRsh64x64(v *Value) bool {
28781 v_1 := v.Args[1]
28782 v_0 := v.Args[0]
28783 b := v.Block
28784 typ := &b.Func.Config.Types
28785
28786
28787 for {
28788 if v_0.Op != OpConst64 {
28789 break
28790 }
28791 c := auxIntToInt64(v_0.AuxInt)
28792 if v_1.Op != OpConst64 {
28793 break
28794 }
28795 d := auxIntToInt64(v_1.AuxInt)
28796 v.reset(OpConst64)
28797 v.AuxInt = int64ToAuxInt(c >> uint64(d))
28798 return true
28799 }
28800
28801
28802 for {
28803 x := v_0
28804 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 0 {
28805 break
28806 }
28807 v.copyOf(x)
28808 return true
28809 }
28810
28811
28812 for {
28813 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
28814 break
28815 }
28816 v.reset(OpConst64)
28817 v.AuxInt = int64ToAuxInt(0)
28818 return true
28819 }
28820
28821
28822
28823 for {
28824 t := v.Type
28825 if v_0.Op != OpRsh64x64 {
28826 break
28827 }
28828 _ = v_0.Args[1]
28829 x := v_0.Args[0]
28830 v_0_1 := v_0.Args[1]
28831 if v_0_1.Op != OpConst64 {
28832 break
28833 }
28834 c := auxIntToInt64(v_0_1.AuxInt)
28835 if v_1.Op != OpConst64 {
28836 break
28837 }
28838 d := auxIntToInt64(v_1.AuxInt)
28839 if !(!uaddOvf(c, d)) {
28840 break
28841 }
28842 v.reset(OpRsh64x64)
28843 v0 := b.NewValue0(v.Pos, OpConst64, t)
28844 v0.AuxInt = int64ToAuxInt(c + d)
28845 v.AddArg2(x, v0)
28846 return true
28847 }
28848
28849
28850 for {
28851 if v_0.Op != OpLsh64x64 {
28852 break
28853 }
28854 _ = v_0.Args[1]
28855 x := v_0.Args[0]
28856 v_0_1 := v_0.Args[1]
28857 if v_0_1.Op != OpConst64 || auxIntToInt64(v_0_1.AuxInt) != 56 || v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 56 {
28858 break
28859 }
28860 v.reset(OpSignExt8to64)
28861 v0 := b.NewValue0(v.Pos, OpTrunc64to8, typ.Int8)
28862 v0.AddArg(x)
28863 v.AddArg(v0)
28864 return true
28865 }
28866
28867
28868 for {
28869 if v_0.Op != OpLsh64x64 {
28870 break
28871 }
28872 _ = v_0.Args[1]
28873 x := v_0.Args[0]
28874 v_0_1 := v_0.Args[1]
28875 if v_0_1.Op != OpConst64 || auxIntToInt64(v_0_1.AuxInt) != 48 || v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 48 {
28876 break
28877 }
28878 v.reset(OpSignExt16to64)
28879 v0 := b.NewValue0(v.Pos, OpTrunc64to16, typ.Int16)
28880 v0.AddArg(x)
28881 v.AddArg(v0)
28882 return true
28883 }
28884
28885
28886 for {
28887 if v_0.Op != OpLsh64x64 {
28888 break
28889 }
28890 _ = v_0.Args[1]
28891 x := v_0.Args[0]
28892 v_0_1 := v_0.Args[1]
28893 if v_0_1.Op != OpConst64 || auxIntToInt64(v_0_1.AuxInt) != 32 || v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 32 {
28894 break
28895 }
28896 v.reset(OpSignExt32to64)
28897 v0 := b.NewValue0(v.Pos, OpTrunc64to32, typ.Int32)
28898 v0.AddArg(x)
28899 v.AddArg(v0)
28900 return true
28901 }
28902 return false
28903 }
28904 func rewriteValuegeneric_OpRsh64x8(v *Value) bool {
28905 v_1 := v.Args[1]
28906 v_0 := v.Args[0]
28907 b := v.Block
28908
28909
28910 for {
28911 t := v.Type
28912 x := v_0
28913 if v_1.Op != OpConst8 {
28914 break
28915 }
28916 c := auxIntToInt8(v_1.AuxInt)
28917 v.reset(OpRsh64x64)
28918 v0 := b.NewValue0(v.Pos, OpConst64, t)
28919 v0.AuxInt = int64ToAuxInt(int64(uint8(c)))
28920 v.AddArg2(x, v0)
28921 return true
28922 }
28923
28924
28925 for {
28926 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
28927 break
28928 }
28929 v.reset(OpConst64)
28930 v.AuxInt = int64ToAuxInt(0)
28931 return true
28932 }
28933 return false
28934 }
28935 func rewriteValuegeneric_OpRsh8Ux16(v *Value) bool {
28936 v_1 := v.Args[1]
28937 v_0 := v.Args[0]
28938 b := v.Block
28939
28940
28941 for {
28942 t := v.Type
28943 x := v_0
28944 if v_1.Op != OpConst16 {
28945 break
28946 }
28947 c := auxIntToInt16(v_1.AuxInt)
28948 v.reset(OpRsh8Ux64)
28949 v0 := b.NewValue0(v.Pos, OpConst64, t)
28950 v0.AuxInt = int64ToAuxInt(int64(uint16(c)))
28951 v.AddArg2(x, v0)
28952 return true
28953 }
28954
28955
28956 for {
28957 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 {
28958 break
28959 }
28960 v.reset(OpConst8)
28961 v.AuxInt = int8ToAuxInt(0)
28962 return true
28963 }
28964 return false
28965 }
28966 func rewriteValuegeneric_OpRsh8Ux32(v *Value) bool {
28967 v_1 := v.Args[1]
28968 v_0 := v.Args[0]
28969 b := v.Block
28970
28971
28972 for {
28973 t := v.Type
28974 x := v_0
28975 if v_1.Op != OpConst32 {
28976 break
28977 }
28978 c := auxIntToInt32(v_1.AuxInt)
28979 v.reset(OpRsh8Ux64)
28980 v0 := b.NewValue0(v.Pos, OpConst64, t)
28981 v0.AuxInt = int64ToAuxInt(int64(uint32(c)))
28982 v.AddArg2(x, v0)
28983 return true
28984 }
28985
28986
28987 for {
28988 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 {
28989 break
28990 }
28991 v.reset(OpConst8)
28992 v.AuxInt = int8ToAuxInt(0)
28993 return true
28994 }
28995 return false
28996 }
28997 func rewriteValuegeneric_OpRsh8Ux64(v *Value) bool {
28998 v_1 := v.Args[1]
28999 v_0 := v.Args[0]
29000 b := v.Block
29001 typ := &b.Func.Config.Types
29002
29003
29004 for {
29005 if v_0.Op != OpConst8 {
29006 break
29007 }
29008 c := auxIntToInt8(v_0.AuxInt)
29009 if v_1.Op != OpConst64 {
29010 break
29011 }
29012 d := auxIntToInt64(v_1.AuxInt)
29013 v.reset(OpConst8)
29014 v.AuxInt = int8ToAuxInt(int8(uint8(c) >> uint64(d)))
29015 return true
29016 }
29017
29018
29019 for {
29020 x := v_0
29021 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 0 {
29022 break
29023 }
29024 v.copyOf(x)
29025 return true
29026 }
29027
29028
29029 for {
29030 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 {
29031 break
29032 }
29033 v.reset(OpConst8)
29034 v.AuxInt = int8ToAuxInt(0)
29035 return true
29036 }
29037
29038
29039
29040 for {
29041 if v_1.Op != OpConst64 {
29042 break
29043 }
29044 c := auxIntToInt64(v_1.AuxInt)
29045 if !(uint64(c) >= 8) {
29046 break
29047 }
29048 v.reset(OpConst8)
29049 v.AuxInt = int8ToAuxInt(0)
29050 return true
29051 }
29052
29053
29054
29055 for {
29056 t := v.Type
29057 if v_0.Op != OpRsh8Ux64 {
29058 break
29059 }
29060 _ = v_0.Args[1]
29061 x := v_0.Args[0]
29062 v_0_1 := v_0.Args[1]
29063 if v_0_1.Op != OpConst64 {
29064 break
29065 }
29066 c := auxIntToInt64(v_0_1.AuxInt)
29067 if v_1.Op != OpConst64 {
29068 break
29069 }
29070 d := auxIntToInt64(v_1.AuxInt)
29071 if !(!uaddOvf(c, d)) {
29072 break
29073 }
29074 v.reset(OpRsh8Ux64)
29075 v0 := b.NewValue0(v.Pos, OpConst64, t)
29076 v0.AuxInt = int64ToAuxInt(c + d)
29077 v.AddArg2(x, v0)
29078 return true
29079 }
29080
29081
29082 for {
29083 if v_0.Op != OpRsh8x64 {
29084 break
29085 }
29086 x := v_0.Args[0]
29087 if v_1.Op != OpConst64 {
29088 break
29089 }
29090 t := v_1.Type
29091 if auxIntToInt64(v_1.AuxInt) != 7 {
29092 break
29093 }
29094 v.reset(OpRsh8Ux64)
29095 v0 := b.NewValue0(v.Pos, OpConst64, t)
29096 v0.AuxInt = int64ToAuxInt(7)
29097 v.AddArg2(x, v0)
29098 return true
29099 }
29100
29101
29102
29103 for {
29104 i := v_0
29105 if i.Op != OpLsh8x64 {
29106 break
29107 }
29108 _ = i.Args[1]
29109 x := i.Args[0]
29110 i_1 := i.Args[1]
29111 if i_1.Op != OpConst64 {
29112 break
29113 }
29114 c := auxIntToInt64(i_1.AuxInt)
29115 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != c || !(c >= 0 && c < 8 && i.Uses == 1) {
29116 break
29117 }
29118 v.reset(OpAnd8)
29119 v0 := b.NewValue0(v.Pos, OpConst8, v.Type)
29120 v0.AuxInt = int8ToAuxInt(int8(^uint8(0) >> c))
29121 v.AddArg2(x, v0)
29122 return true
29123 }
29124
29125
29126
29127 for {
29128 if v_0.Op != OpLsh8x64 {
29129 break
29130 }
29131 _ = v_0.Args[1]
29132 v_0_0 := v_0.Args[0]
29133 if v_0_0.Op != OpRsh8Ux64 {
29134 break
29135 }
29136 _ = v_0_0.Args[1]
29137 x := v_0_0.Args[0]
29138 v_0_0_1 := v_0_0.Args[1]
29139 if v_0_0_1.Op != OpConst64 {
29140 break
29141 }
29142 c1 := auxIntToInt64(v_0_0_1.AuxInt)
29143 v_0_1 := v_0.Args[1]
29144 if v_0_1.Op != OpConst64 {
29145 break
29146 }
29147 c2 := auxIntToInt64(v_0_1.AuxInt)
29148 if v_1.Op != OpConst64 {
29149 break
29150 }
29151 c3 := auxIntToInt64(v_1.AuxInt)
29152 if !(uint64(c1) >= uint64(c2) && uint64(c3) >= uint64(c2) && !uaddOvf(c1-c2, c3)) {
29153 break
29154 }
29155 v.reset(OpRsh8Ux64)
29156 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
29157 v0.AuxInt = int64ToAuxInt(c1 - c2 + c3)
29158 v.AddArg2(x, v0)
29159 return true
29160 }
29161 return false
29162 }
29163 func rewriteValuegeneric_OpRsh8Ux8(v *Value) bool {
29164 v_1 := v.Args[1]
29165 v_0 := v.Args[0]
29166 b := v.Block
29167
29168
29169 for {
29170 t := v.Type
29171 x := v_0
29172 if v_1.Op != OpConst8 {
29173 break
29174 }
29175 c := auxIntToInt8(v_1.AuxInt)
29176 v.reset(OpRsh8Ux64)
29177 v0 := b.NewValue0(v.Pos, OpConst64, t)
29178 v0.AuxInt = int64ToAuxInt(int64(uint8(c)))
29179 v.AddArg2(x, v0)
29180 return true
29181 }
29182
29183
29184 for {
29185 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 {
29186 break
29187 }
29188 v.reset(OpConst8)
29189 v.AuxInt = int8ToAuxInt(0)
29190 return true
29191 }
29192 return false
29193 }
29194 func rewriteValuegeneric_OpRsh8x16(v *Value) bool {
29195 v_1 := v.Args[1]
29196 v_0 := v.Args[0]
29197 b := v.Block
29198
29199
29200 for {
29201 t := v.Type
29202 x := v_0
29203 if v_1.Op != OpConst16 {
29204 break
29205 }
29206 c := auxIntToInt16(v_1.AuxInt)
29207 v.reset(OpRsh8x64)
29208 v0 := b.NewValue0(v.Pos, OpConst64, t)
29209 v0.AuxInt = int64ToAuxInt(int64(uint16(c)))
29210 v.AddArg2(x, v0)
29211 return true
29212 }
29213
29214
29215 for {
29216 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 {
29217 break
29218 }
29219 v.reset(OpConst8)
29220 v.AuxInt = int8ToAuxInt(0)
29221 return true
29222 }
29223 return false
29224 }
29225 func rewriteValuegeneric_OpRsh8x32(v *Value) bool {
29226 v_1 := v.Args[1]
29227 v_0 := v.Args[0]
29228 b := v.Block
29229
29230
29231 for {
29232 t := v.Type
29233 x := v_0
29234 if v_1.Op != OpConst32 {
29235 break
29236 }
29237 c := auxIntToInt32(v_1.AuxInt)
29238 v.reset(OpRsh8x64)
29239 v0 := b.NewValue0(v.Pos, OpConst64, t)
29240 v0.AuxInt = int64ToAuxInt(int64(uint32(c)))
29241 v.AddArg2(x, v0)
29242 return true
29243 }
29244
29245
29246 for {
29247 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 {
29248 break
29249 }
29250 v.reset(OpConst8)
29251 v.AuxInt = int8ToAuxInt(0)
29252 return true
29253 }
29254 return false
29255 }
29256 func rewriteValuegeneric_OpRsh8x64(v *Value) bool {
29257 v_1 := v.Args[1]
29258 v_0 := v.Args[0]
29259 b := v.Block
29260
29261
29262 for {
29263 if v_0.Op != OpConst8 {
29264 break
29265 }
29266 c := auxIntToInt8(v_0.AuxInt)
29267 if v_1.Op != OpConst64 {
29268 break
29269 }
29270 d := auxIntToInt64(v_1.AuxInt)
29271 v.reset(OpConst8)
29272 v.AuxInt = int8ToAuxInt(c >> uint64(d))
29273 return true
29274 }
29275
29276
29277 for {
29278 x := v_0
29279 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 0 {
29280 break
29281 }
29282 v.copyOf(x)
29283 return true
29284 }
29285
29286
29287 for {
29288 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 {
29289 break
29290 }
29291 v.reset(OpConst8)
29292 v.AuxInt = int8ToAuxInt(0)
29293 return true
29294 }
29295
29296
29297
29298 for {
29299 t := v.Type
29300 if v_0.Op != OpRsh8x64 {
29301 break
29302 }
29303 _ = v_0.Args[1]
29304 x := v_0.Args[0]
29305 v_0_1 := v_0.Args[1]
29306 if v_0_1.Op != OpConst64 {
29307 break
29308 }
29309 c := auxIntToInt64(v_0_1.AuxInt)
29310 if v_1.Op != OpConst64 {
29311 break
29312 }
29313 d := auxIntToInt64(v_1.AuxInt)
29314 if !(!uaddOvf(c, d)) {
29315 break
29316 }
29317 v.reset(OpRsh8x64)
29318 v0 := b.NewValue0(v.Pos, OpConst64, t)
29319 v0.AuxInt = int64ToAuxInt(c + d)
29320 v.AddArg2(x, v0)
29321 return true
29322 }
29323 return false
29324 }
29325 func rewriteValuegeneric_OpRsh8x8(v *Value) bool {
29326 v_1 := v.Args[1]
29327 v_0 := v.Args[0]
29328 b := v.Block
29329
29330
29331 for {
29332 t := v.Type
29333 x := v_0
29334 if v_1.Op != OpConst8 {
29335 break
29336 }
29337 c := auxIntToInt8(v_1.AuxInt)
29338 v.reset(OpRsh8x64)
29339 v0 := b.NewValue0(v.Pos, OpConst64, t)
29340 v0.AuxInt = int64ToAuxInt(int64(uint8(c)))
29341 v.AddArg2(x, v0)
29342 return true
29343 }
29344
29345
29346 for {
29347 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 {
29348 break
29349 }
29350 v.reset(OpConst8)
29351 v.AuxInt = int8ToAuxInt(0)
29352 return true
29353 }
29354 return false
29355 }
29356 func rewriteValuegeneric_OpSelect0(v *Value) bool {
29357 v_0 := v.Args[0]
29358
29359
29360 for {
29361 if v_0.Op != OpMakeTuple {
29362 break
29363 }
29364 x := v_0.Args[0]
29365 v.copyOf(x)
29366 return true
29367 }
29368 return false
29369 }
29370 func rewriteValuegeneric_OpSelect1(v *Value) bool {
29371 v_0 := v.Args[0]
29372
29373
29374 for {
29375 if v_0.Op != OpMakeTuple {
29376 break
29377 }
29378 y := v_0.Args[1]
29379 v.copyOf(y)
29380 return true
29381 }
29382 return false
29383 }
29384 func rewriteValuegeneric_OpSelectN(v *Value) bool {
29385 v_0 := v.Args[0]
29386 b := v.Block
29387 config := b.Func.Config
29388 typ := &b.Func.Config.Types
29389
29390
29391 for {
29392 if auxIntToInt64(v.AuxInt) != 0 || v_0.Op != OpMakeResult || len(v_0.Args) < 1 {
29393 break
29394 }
29395 x := v_0.Args[0]
29396 v.copyOf(x)
29397 return true
29398 }
29399
29400
29401 for {
29402 if auxIntToInt64(v.AuxInt) != 1 || v_0.Op != OpMakeResult || len(v_0.Args) < 2 {
29403 break
29404 }
29405 y := v_0.Args[1]
29406 v.copyOf(y)
29407 return true
29408 }
29409
29410
29411 for {
29412 if auxIntToInt64(v.AuxInt) != 2 || v_0.Op != OpMakeResult || len(v_0.Args) < 3 {
29413 break
29414 }
29415 z := v_0.Args[2]
29416 v.copyOf(z)
29417 return true
29418 }
29419
29420
29421
29422 for {
29423 if auxIntToInt64(v.AuxInt) != 0 {
29424 break
29425 }
29426 call := v_0
29427 if call.Op != OpStaticCall || len(call.Args) != 3 {
29428 break
29429 }
29430 sym := auxToCall(call.Aux)
29431 mem := call.Args[2]
29432 sptr := call.Args[0]
29433 call_1 := call.Args[1]
29434 if call_1.Op != OpConst64 {
29435 break
29436 }
29437 c := auxIntToInt64(call_1.AuxInt)
29438 if !(isInlinableMemclr(config, int64(c)) && isSameCall(sym, "runtime.memclrNoHeapPointers") && call.Uses == 1 && clobber(call)) {
29439 break
29440 }
29441 v.reset(OpZero)
29442 v.AuxInt = int64ToAuxInt(int64(c))
29443 v.Aux = typeToAux(types.Types[types.TUINT8])
29444 v.AddArg2(sptr, mem)
29445 return true
29446 }
29447
29448
29449
29450 for {
29451 if auxIntToInt64(v.AuxInt) != 0 {
29452 break
29453 }
29454 call := v_0
29455 if call.Op != OpStaticCall || len(call.Args) != 3 {
29456 break
29457 }
29458 sym := auxToCall(call.Aux)
29459 mem := call.Args[2]
29460 sptr := call.Args[0]
29461 call_1 := call.Args[1]
29462 if call_1.Op != OpConst32 {
29463 break
29464 }
29465 c := auxIntToInt32(call_1.AuxInt)
29466 if !(isInlinableMemclr(config, int64(c)) && isSameCall(sym, "runtime.memclrNoHeapPointers") && call.Uses == 1 && clobber(call)) {
29467 break
29468 }
29469 v.reset(OpZero)
29470 v.AuxInt = int64ToAuxInt(int64(c))
29471 v.Aux = typeToAux(types.Types[types.TUINT8])
29472 v.AddArg2(sptr, mem)
29473 return true
29474 }
29475
29476
29477
29478 for {
29479 if auxIntToInt64(v.AuxInt) != 0 {
29480 break
29481 }
29482 call := v_0
29483 if call.Op != OpStaticCall || len(call.Args) != 1 {
29484 break
29485 }
29486 sym := auxToCall(call.Aux)
29487 s1 := call.Args[0]
29488 if s1.Op != OpStore {
29489 break
29490 }
29491 _ = s1.Args[2]
29492 s1_1 := s1.Args[1]
29493 if s1_1.Op != OpConst64 {
29494 break
29495 }
29496 sz := auxIntToInt64(s1_1.AuxInt)
29497 s2 := s1.Args[2]
29498 if s2.Op != OpStore {
29499 break
29500 }
29501 _ = s2.Args[2]
29502 src := s2.Args[1]
29503 s3 := s2.Args[2]
29504 if s3.Op != OpStore {
29505 break
29506 }
29507 mem := s3.Args[2]
29508 dst := s3.Args[1]
29509 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)) {
29510 break
29511 }
29512 v.reset(OpMove)
29513 v.AuxInt = int64ToAuxInt(int64(sz))
29514 v.Aux = typeToAux(types.Types[types.TUINT8])
29515 v.AddArg3(dst, src, mem)
29516 return true
29517 }
29518
29519
29520
29521 for {
29522 if auxIntToInt64(v.AuxInt) != 0 {
29523 break
29524 }
29525 call := v_0
29526 if call.Op != OpStaticCall || len(call.Args) != 1 {
29527 break
29528 }
29529 sym := auxToCall(call.Aux)
29530 s1 := call.Args[0]
29531 if s1.Op != OpStore {
29532 break
29533 }
29534 _ = s1.Args[2]
29535 s1_1 := s1.Args[1]
29536 if s1_1.Op != OpConst32 {
29537 break
29538 }
29539 sz := auxIntToInt32(s1_1.AuxInt)
29540 s2 := s1.Args[2]
29541 if s2.Op != OpStore {
29542 break
29543 }
29544 _ = s2.Args[2]
29545 src := s2.Args[1]
29546 s3 := s2.Args[2]
29547 if s3.Op != OpStore {
29548 break
29549 }
29550 mem := s3.Args[2]
29551 dst := s3.Args[1]
29552 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)) {
29553 break
29554 }
29555 v.reset(OpMove)
29556 v.AuxInt = int64ToAuxInt(int64(sz))
29557 v.Aux = typeToAux(types.Types[types.TUINT8])
29558 v.AddArg3(dst, src, mem)
29559 return true
29560 }
29561
29562
29563
29564 for {
29565 if auxIntToInt64(v.AuxInt) != 0 {
29566 break
29567 }
29568 call := v_0
29569 if call.Op != OpStaticCall || len(call.Args) != 4 {
29570 break
29571 }
29572 sym := auxToCall(call.Aux)
29573 mem := call.Args[3]
29574 dst := call.Args[0]
29575 src := call.Args[1]
29576 call_2 := call.Args[2]
29577 if call_2.Op != OpConst64 {
29578 break
29579 }
29580 sz := auxIntToInt64(call_2.AuxInt)
29581 if !(sz >= 0 && call.Uses == 1 && isSameCall(sym, "runtime.memmove") && isInlinableMemmove(dst, src, int64(sz), config) && clobber(call)) {
29582 break
29583 }
29584 v.reset(OpMove)
29585 v.AuxInt = int64ToAuxInt(int64(sz))
29586 v.Aux = typeToAux(types.Types[types.TUINT8])
29587 v.AddArg3(dst, src, mem)
29588 return true
29589 }
29590
29591
29592
29593 for {
29594 if auxIntToInt64(v.AuxInt) != 0 {
29595 break
29596 }
29597 call := v_0
29598 if call.Op != OpStaticCall || len(call.Args) != 4 {
29599 break
29600 }
29601 sym := auxToCall(call.Aux)
29602 mem := call.Args[3]
29603 dst := call.Args[0]
29604 src := call.Args[1]
29605 call_2 := call.Args[2]
29606 if call_2.Op != OpConst32 {
29607 break
29608 }
29609 sz := auxIntToInt32(call_2.AuxInt)
29610 if !(sz >= 0 && call.Uses == 1 && isSameCall(sym, "runtime.memmove") && isInlinableMemmove(dst, src, int64(sz), config) && clobber(call)) {
29611 break
29612 }
29613 v.reset(OpMove)
29614 v.AuxInt = int64ToAuxInt(int64(sz))
29615 v.Aux = typeToAux(types.Types[types.TUINT8])
29616 v.AddArg3(dst, src, mem)
29617 return true
29618 }
29619
29620
29621
29622 for {
29623 if auxIntToInt64(v.AuxInt) != 0 {
29624 break
29625 }
29626 call := v_0
29627 if call.Op != OpStaticLECall || len(call.Args) != 4 {
29628 break
29629 }
29630 sym := auxToCall(call.Aux)
29631 mem := call.Args[3]
29632 dst := call.Args[0]
29633 src := call.Args[1]
29634 call_2 := call.Args[2]
29635 if call_2.Op != OpConst64 {
29636 break
29637 }
29638 sz := auxIntToInt64(call_2.AuxInt)
29639 if !(sz >= 0 && call.Uses == 1 && isSameCall(sym, "runtime.memmove") && isInlinableMemmove(dst, src, int64(sz), config) && clobber(call)) {
29640 break
29641 }
29642 v.reset(OpMove)
29643 v.AuxInt = int64ToAuxInt(int64(sz))
29644 v.Aux = typeToAux(types.Types[types.TUINT8])
29645 v.AddArg3(dst, src, mem)
29646 return true
29647 }
29648
29649
29650
29651 for {
29652 if auxIntToInt64(v.AuxInt) != 0 {
29653 break
29654 }
29655 call := v_0
29656 if call.Op != OpStaticLECall || len(call.Args) != 4 {
29657 break
29658 }
29659 sym := auxToCall(call.Aux)
29660 mem := call.Args[3]
29661 dst := call.Args[0]
29662 src := call.Args[1]
29663 call_2 := call.Args[2]
29664 if call_2.Op != OpConst32 {
29665 break
29666 }
29667 sz := auxIntToInt32(call_2.AuxInt)
29668 if !(sz >= 0 && call.Uses == 1 && isSameCall(sym, "runtime.memmove") && isInlinableMemmove(dst, src, int64(sz), config) && clobber(call)) {
29669 break
29670 }
29671 v.reset(OpMove)
29672 v.AuxInt = int64ToAuxInt(int64(sz))
29673 v.Aux = typeToAux(types.Types[types.TUINT8])
29674 v.AddArg3(dst, src, mem)
29675 return true
29676 }
29677
29678
29679
29680 for {
29681 if auxIntToInt64(v.AuxInt) != 0 {
29682 break
29683 }
29684 call := v_0
29685 if call.Op != OpStaticLECall || len(call.Args) != 2 {
29686 break
29687 }
29688 sym := auxToCall(call.Aux)
29689 x := call.Args[1]
29690 if !(needRaceCleanup(sym, call) && clobber(call)) {
29691 break
29692 }
29693 v.copyOf(x)
29694 return true
29695 }
29696
29697
29698
29699 for {
29700 if auxIntToInt64(v.AuxInt) != 0 {
29701 break
29702 }
29703 call := v_0
29704 if call.Op != OpStaticLECall || len(call.Args) != 1 {
29705 break
29706 }
29707 sym := auxToCall(call.Aux)
29708 x := call.Args[0]
29709 if !(needRaceCleanup(sym, call) && clobber(call)) {
29710 break
29711 }
29712 v.copyOf(x)
29713 return true
29714 }
29715
29716
29717
29718 for {
29719 if auxIntToInt64(v.AuxInt) != 1 || v_0.Op != OpStaticCall || len(v_0.Args) != 6 {
29720 break
29721 }
29722 sym := auxToCall(v_0.Aux)
29723 _ = v_0.Args[1]
29724 newLen := v_0.Args[1]
29725 if newLen.Op != OpConst64 || !(v.Type.IsInteger() && isSameCall(sym, "runtime.growslice")) {
29726 break
29727 }
29728 v.copyOf(newLen)
29729 return true
29730 }
29731
29732
29733
29734 for {
29735 if auxIntToInt64(v.AuxInt) != 1 || v_0.Op != OpStaticCall || len(v_0.Args) != 6 {
29736 break
29737 }
29738 sym := auxToCall(v_0.Aux)
29739 _ = v_0.Args[1]
29740 newLen := v_0.Args[1]
29741 if newLen.Op != OpConst32 || !(v.Type.IsInteger() && isSameCall(sym, "runtime.growslice")) {
29742 break
29743 }
29744 v.copyOf(newLen)
29745 return true
29746 }
29747
29748
29749
29750 for {
29751 if auxIntToInt64(v.AuxInt) != 0 || v_0.Op != OpStaticLECall || len(v_0.Args) != 3 {
29752 break
29753 }
29754 f := auxToCall(v_0.Aux)
29755 _ = v_0.Args[2]
29756 x := v_0.Args[0]
29757 y := v_0.Args[1]
29758 v_0_2 := v_0.Args[2]
29759 if v_0_2.Op != OpSelectN || auxIntToInt64(v_0_2.AuxInt) != 1 {
29760 break
29761 }
29762 c := v_0_2.Args[0]
29763 if c.Op != OpStaticLECall || len(c.Args) != 3 {
29764 break
29765 }
29766 g := auxToCall(c.Aux)
29767 if x != c.Args[0] || y != c.Args[1] || !(isSameCall(f, "runtime.cmpstring") && isSameCall(g, "runtime.cmpstring")) {
29768 break
29769 }
29770 b = c.Block
29771 v0 := b.NewValue0(v.Pos, OpSelectN, typ.Int)
29772 v.copyOf(v0)
29773 v0.AuxInt = int64ToAuxInt(0)
29774 v0.AddArg(c)
29775 return true
29776 }
29777
29778
29779
29780 for {
29781 if auxIntToInt64(v.AuxInt) != 1 {
29782 break
29783 }
29784 c := v_0
29785 if c.Op != OpStaticLECall || len(c.Args) != 3 {
29786 break
29787 }
29788 f := auxToCall(c.Aux)
29789 mem := c.Args[2]
29790 if !(c.Uses == 1 && isSameCall(f, "runtime.cmpstring") && clobber(c)) {
29791 break
29792 }
29793 v.copyOf(mem)
29794 return true
29795 }
29796 return false
29797 }
29798 func rewriteValuegeneric_OpSignExt16to32(v *Value) bool {
29799 v_0 := v.Args[0]
29800
29801
29802 for {
29803 if v_0.Op != OpConst16 {
29804 break
29805 }
29806 c := auxIntToInt16(v_0.AuxInt)
29807 v.reset(OpConst32)
29808 v.AuxInt = int32ToAuxInt(int32(c))
29809 return true
29810 }
29811
29812
29813
29814 for {
29815 if v_0.Op != OpTrunc32to16 {
29816 break
29817 }
29818 x := v_0.Args[0]
29819 if x.Op != OpRsh32x64 {
29820 break
29821 }
29822 _ = x.Args[1]
29823 x_1 := x.Args[1]
29824 if x_1.Op != OpConst64 {
29825 break
29826 }
29827 s := auxIntToInt64(x_1.AuxInt)
29828 if !(s >= 16) {
29829 break
29830 }
29831 v.copyOf(x)
29832 return true
29833 }
29834 return false
29835 }
29836 func rewriteValuegeneric_OpSignExt16to64(v *Value) bool {
29837 v_0 := v.Args[0]
29838
29839
29840 for {
29841 if v_0.Op != OpConst16 {
29842 break
29843 }
29844 c := auxIntToInt16(v_0.AuxInt)
29845 v.reset(OpConst64)
29846 v.AuxInt = int64ToAuxInt(int64(c))
29847 return true
29848 }
29849
29850
29851
29852 for {
29853 if v_0.Op != OpTrunc64to16 {
29854 break
29855 }
29856 x := v_0.Args[0]
29857 if x.Op != OpRsh64x64 {
29858 break
29859 }
29860 _ = x.Args[1]
29861 x_1 := x.Args[1]
29862 if x_1.Op != OpConst64 {
29863 break
29864 }
29865 s := auxIntToInt64(x_1.AuxInt)
29866 if !(s >= 48) {
29867 break
29868 }
29869 v.copyOf(x)
29870 return true
29871 }
29872 return false
29873 }
29874 func rewriteValuegeneric_OpSignExt32to64(v *Value) bool {
29875 v_0 := v.Args[0]
29876
29877
29878 for {
29879 if v_0.Op != OpConst32 {
29880 break
29881 }
29882 c := auxIntToInt32(v_0.AuxInt)
29883 v.reset(OpConst64)
29884 v.AuxInt = int64ToAuxInt(int64(c))
29885 return true
29886 }
29887
29888
29889
29890 for {
29891 if v_0.Op != OpTrunc64to32 {
29892 break
29893 }
29894 x := v_0.Args[0]
29895 if x.Op != OpRsh64x64 {
29896 break
29897 }
29898 _ = x.Args[1]
29899 x_1 := x.Args[1]
29900 if x_1.Op != OpConst64 {
29901 break
29902 }
29903 s := auxIntToInt64(x_1.AuxInt)
29904 if !(s >= 32) {
29905 break
29906 }
29907 v.copyOf(x)
29908 return true
29909 }
29910 return false
29911 }
29912 func rewriteValuegeneric_OpSignExt8to16(v *Value) bool {
29913 v_0 := v.Args[0]
29914
29915
29916 for {
29917 if v_0.Op != OpConst8 {
29918 break
29919 }
29920 c := auxIntToInt8(v_0.AuxInt)
29921 v.reset(OpConst16)
29922 v.AuxInt = int16ToAuxInt(int16(c))
29923 return true
29924 }
29925
29926
29927
29928 for {
29929 if v_0.Op != OpTrunc16to8 {
29930 break
29931 }
29932 x := v_0.Args[0]
29933 if x.Op != OpRsh16x64 {
29934 break
29935 }
29936 _ = x.Args[1]
29937 x_1 := x.Args[1]
29938 if x_1.Op != OpConst64 {
29939 break
29940 }
29941 s := auxIntToInt64(x_1.AuxInt)
29942 if !(s >= 8) {
29943 break
29944 }
29945 v.copyOf(x)
29946 return true
29947 }
29948 return false
29949 }
29950 func rewriteValuegeneric_OpSignExt8to32(v *Value) bool {
29951 v_0 := v.Args[0]
29952
29953
29954 for {
29955 if v_0.Op != OpConst8 {
29956 break
29957 }
29958 c := auxIntToInt8(v_0.AuxInt)
29959 v.reset(OpConst32)
29960 v.AuxInt = int32ToAuxInt(int32(c))
29961 return true
29962 }
29963
29964
29965
29966 for {
29967 if v_0.Op != OpTrunc32to8 {
29968 break
29969 }
29970 x := v_0.Args[0]
29971 if x.Op != OpRsh32x64 {
29972 break
29973 }
29974 _ = x.Args[1]
29975 x_1 := x.Args[1]
29976 if x_1.Op != OpConst64 {
29977 break
29978 }
29979 s := auxIntToInt64(x_1.AuxInt)
29980 if !(s >= 24) {
29981 break
29982 }
29983 v.copyOf(x)
29984 return true
29985 }
29986 return false
29987 }
29988 func rewriteValuegeneric_OpSignExt8to64(v *Value) bool {
29989 v_0 := v.Args[0]
29990
29991
29992 for {
29993 if v_0.Op != OpConst8 {
29994 break
29995 }
29996 c := auxIntToInt8(v_0.AuxInt)
29997 v.reset(OpConst64)
29998 v.AuxInt = int64ToAuxInt(int64(c))
29999 return true
30000 }
30001
30002
30003
30004 for {
30005 if v_0.Op != OpTrunc64to8 {
30006 break
30007 }
30008 x := v_0.Args[0]
30009 if x.Op != OpRsh64x64 {
30010 break
30011 }
30012 _ = x.Args[1]
30013 x_1 := x.Args[1]
30014 if x_1.Op != OpConst64 {
30015 break
30016 }
30017 s := auxIntToInt64(x_1.AuxInt)
30018 if !(s >= 56) {
30019 break
30020 }
30021 v.copyOf(x)
30022 return true
30023 }
30024 return false
30025 }
30026 func rewriteValuegeneric_OpSliceCap(v *Value) bool {
30027 v_0 := v.Args[0]
30028
30029
30030 for {
30031 if v_0.Op != OpSliceMake {
30032 break
30033 }
30034 _ = v_0.Args[2]
30035 v_0_2 := v_0.Args[2]
30036 if v_0_2.Op != OpConst64 {
30037 break
30038 }
30039 t := v_0_2.Type
30040 c := auxIntToInt64(v_0_2.AuxInt)
30041 v.reset(OpConst64)
30042 v.Type = t
30043 v.AuxInt = int64ToAuxInt(c)
30044 return true
30045 }
30046
30047
30048 for {
30049 if v_0.Op != OpSliceMake {
30050 break
30051 }
30052 _ = v_0.Args[2]
30053 v_0_2 := v_0.Args[2]
30054 if v_0_2.Op != OpConst32 {
30055 break
30056 }
30057 t := v_0_2.Type
30058 c := auxIntToInt32(v_0_2.AuxInt)
30059 v.reset(OpConst32)
30060 v.Type = t
30061 v.AuxInt = int32ToAuxInt(c)
30062 return true
30063 }
30064
30065
30066 for {
30067 if v_0.Op != OpSliceMake {
30068 break
30069 }
30070 _ = v_0.Args[2]
30071 v_0_2 := v_0.Args[2]
30072 if v_0_2.Op != OpSliceCap {
30073 break
30074 }
30075 x := v_0_2.Args[0]
30076 v.reset(OpSliceCap)
30077 v.AddArg(x)
30078 return true
30079 }
30080
30081
30082 for {
30083 if v_0.Op != OpSliceMake {
30084 break
30085 }
30086 _ = v_0.Args[2]
30087 v_0_2 := v_0.Args[2]
30088 if v_0_2.Op != OpSliceLen {
30089 break
30090 }
30091 x := v_0_2.Args[0]
30092 v.reset(OpSliceLen)
30093 v.AddArg(x)
30094 return true
30095 }
30096 return false
30097 }
30098 func rewriteValuegeneric_OpSliceLen(v *Value) bool {
30099 v_0 := v.Args[0]
30100
30101
30102 for {
30103 if v_0.Op != OpSliceMake {
30104 break
30105 }
30106 _ = v_0.Args[1]
30107 v_0_1 := v_0.Args[1]
30108 if v_0_1.Op != OpConst64 {
30109 break
30110 }
30111 t := v_0_1.Type
30112 c := auxIntToInt64(v_0_1.AuxInt)
30113 v.reset(OpConst64)
30114 v.Type = t
30115 v.AuxInt = int64ToAuxInt(c)
30116 return true
30117 }
30118
30119
30120 for {
30121 if v_0.Op != OpSliceMake {
30122 break
30123 }
30124 _ = v_0.Args[1]
30125 v_0_1 := v_0.Args[1]
30126 if v_0_1.Op != OpConst32 {
30127 break
30128 }
30129 t := v_0_1.Type
30130 c := auxIntToInt32(v_0_1.AuxInt)
30131 v.reset(OpConst32)
30132 v.Type = t
30133 v.AuxInt = int32ToAuxInt(c)
30134 return true
30135 }
30136
30137
30138 for {
30139 if v_0.Op != OpSliceMake {
30140 break
30141 }
30142 _ = v_0.Args[1]
30143 v_0_1 := v_0.Args[1]
30144 if v_0_1.Op != OpSliceLen {
30145 break
30146 }
30147 x := v_0_1.Args[0]
30148 v.reset(OpSliceLen)
30149 v.AddArg(x)
30150 return true
30151 }
30152
30153
30154
30155 for {
30156 if v_0.Op != OpSelectN || auxIntToInt64(v_0.AuxInt) != 0 {
30157 break
30158 }
30159 v_0_0 := v_0.Args[0]
30160 if v_0_0.Op != OpStaticLECall || len(v_0_0.Args) != 6 {
30161 break
30162 }
30163 sym := auxToCall(v_0_0.Aux)
30164 _ = v_0_0.Args[1]
30165 newLen := v_0_0.Args[1]
30166 if newLen.Op != OpConst64 || !(isSameCall(sym, "runtime.growslice")) {
30167 break
30168 }
30169 v.copyOf(newLen)
30170 return true
30171 }
30172
30173
30174
30175 for {
30176 if v_0.Op != OpSelectN || auxIntToInt64(v_0.AuxInt) != 0 {
30177 break
30178 }
30179 v_0_0 := v_0.Args[0]
30180 if v_0_0.Op != OpStaticLECall || len(v_0_0.Args) != 6 {
30181 break
30182 }
30183 sym := auxToCall(v_0_0.Aux)
30184 _ = v_0_0.Args[1]
30185 newLen := v_0_0.Args[1]
30186 if newLen.Op != OpConst32 || !(isSameCall(sym, "runtime.growslice")) {
30187 break
30188 }
30189 v.copyOf(newLen)
30190 return true
30191 }
30192 return false
30193 }
30194 func rewriteValuegeneric_OpSlicePtr(v *Value) bool {
30195 v_0 := v.Args[0]
30196
30197
30198 for {
30199 if v_0.Op != OpSliceMake {
30200 break
30201 }
30202 v_0_0 := v_0.Args[0]
30203 if v_0_0.Op != OpSlicePtr {
30204 break
30205 }
30206 x := v_0_0.Args[0]
30207 v.reset(OpSlicePtr)
30208 v.AddArg(x)
30209 return true
30210 }
30211 return false
30212 }
30213 func rewriteValuegeneric_OpSlicemask(v *Value) bool {
30214 v_0 := v.Args[0]
30215
30216
30217
30218 for {
30219 if v_0.Op != OpConst32 {
30220 break
30221 }
30222 x := auxIntToInt32(v_0.AuxInt)
30223 if !(x > 0) {
30224 break
30225 }
30226 v.reset(OpConst32)
30227 v.AuxInt = int32ToAuxInt(-1)
30228 return true
30229 }
30230
30231
30232 for {
30233 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
30234 break
30235 }
30236 v.reset(OpConst32)
30237 v.AuxInt = int32ToAuxInt(0)
30238 return true
30239 }
30240
30241
30242
30243 for {
30244 if v_0.Op != OpConst64 {
30245 break
30246 }
30247 x := auxIntToInt64(v_0.AuxInt)
30248 if !(x > 0) {
30249 break
30250 }
30251 v.reset(OpConst64)
30252 v.AuxInt = int64ToAuxInt(-1)
30253 return true
30254 }
30255
30256
30257 for {
30258 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
30259 break
30260 }
30261 v.reset(OpConst64)
30262 v.AuxInt = int64ToAuxInt(0)
30263 return true
30264 }
30265 return false
30266 }
30267 func rewriteValuegeneric_OpSqrt(v *Value) bool {
30268 v_0 := v.Args[0]
30269
30270
30271
30272 for {
30273 if v_0.Op != OpConst64F {
30274 break
30275 }
30276 c := auxIntToFloat64(v_0.AuxInt)
30277 if !(!math.IsNaN(math.Sqrt(c))) {
30278 break
30279 }
30280 v.reset(OpConst64F)
30281 v.AuxInt = float64ToAuxInt(math.Sqrt(c))
30282 return true
30283 }
30284 return false
30285 }
30286 func rewriteValuegeneric_OpStaticCall(v *Value) bool {
30287 b := v.Block
30288 typ := &b.Func.Config.Types
30289
30290
30291
30292 for {
30293 if len(v.Args) != 4 {
30294 break
30295 }
30296 callAux := auxToCall(v.Aux)
30297 mem := v.Args[3]
30298 p := v.Args[0]
30299 q := v.Args[1]
30300 if !(isSameCall(callAux, "runtime.memequal") && isSamePtr(p, q)) {
30301 break
30302 }
30303 v.reset(OpMakeResult)
30304 v0 := b.NewValue0(v.Pos, OpConstBool, typ.Bool)
30305 v0.AuxInt = boolToAuxInt(true)
30306 v.AddArg2(v0, mem)
30307 return true
30308 }
30309 return false
30310 }
30311 func rewriteValuegeneric_OpStaticLECall(v *Value) bool {
30312 b := v.Block
30313 config := b.Func.Config
30314 typ := &b.Func.Config.Types
30315
30316
30317
30318 for {
30319 if len(v.Args) != 4 {
30320 break
30321 }
30322 callAux := auxToCall(v.Aux)
30323 mem := v.Args[3]
30324 sptr := v.Args[0]
30325 v_1 := v.Args[1]
30326 if v_1.Op != OpAddr {
30327 break
30328 }
30329 scon := auxToSym(v_1.Aux)
30330 v_1_0 := v_1.Args[0]
30331 if v_1_0.Op != OpSB {
30332 break
30333 }
30334 v_2 := v.Args[2]
30335 if v_2.Op != OpConst64 || auxIntToInt64(v_2.AuxInt) != 1 || !(isSameCall(callAux, "runtime.memequal") && symIsRO(scon)) {
30336 break
30337 }
30338 v.reset(OpMakeResult)
30339 v0 := b.NewValue0(v.Pos, OpEq8, typ.Bool)
30340 v1 := b.NewValue0(v.Pos, OpLoad, typ.Int8)
30341 v1.AddArg2(sptr, mem)
30342 v2 := b.NewValue0(v.Pos, OpConst8, typ.Int8)
30343 v2.AuxInt = int8ToAuxInt(int8(read8(scon, 0)))
30344 v0.AddArg2(v1, v2)
30345 v.AddArg2(v0, mem)
30346 return true
30347 }
30348
30349
30350
30351 for {
30352 if len(v.Args) != 4 {
30353 break
30354 }
30355 callAux := auxToCall(v.Aux)
30356 mem := v.Args[3]
30357 v_0 := v.Args[0]
30358 if v_0.Op != OpAddr {
30359 break
30360 }
30361 scon := auxToSym(v_0.Aux)
30362 v_0_0 := v_0.Args[0]
30363 if v_0_0.Op != OpSB {
30364 break
30365 }
30366 sptr := v.Args[1]
30367 v_2 := v.Args[2]
30368 if v_2.Op != OpConst64 || auxIntToInt64(v_2.AuxInt) != 1 || !(isSameCall(callAux, "runtime.memequal") && symIsRO(scon)) {
30369 break
30370 }
30371 v.reset(OpMakeResult)
30372 v0 := b.NewValue0(v.Pos, OpEq8, typ.Bool)
30373 v1 := b.NewValue0(v.Pos, OpLoad, typ.Int8)
30374 v1.AddArg2(sptr, mem)
30375 v2 := b.NewValue0(v.Pos, OpConst8, typ.Int8)
30376 v2.AuxInt = int8ToAuxInt(int8(read8(scon, 0)))
30377 v0.AddArg2(v1, v2)
30378 v.AddArg2(v0, mem)
30379 return true
30380 }
30381
30382
30383
30384 for {
30385 if len(v.Args) != 4 {
30386 break
30387 }
30388 callAux := auxToCall(v.Aux)
30389 mem := v.Args[3]
30390 sptr := v.Args[0]
30391 v_1 := v.Args[1]
30392 if v_1.Op != OpAddr {
30393 break
30394 }
30395 scon := auxToSym(v_1.Aux)
30396 v_1_0 := v_1.Args[0]
30397 if v_1_0.Op != OpSB {
30398 break
30399 }
30400 v_2 := v.Args[2]
30401 if v_2.Op != OpConst64 || auxIntToInt64(v_2.AuxInt) != 2 || !(isSameCall(callAux, "runtime.memequal") && symIsRO(scon) && canLoadUnaligned(config)) {
30402 break
30403 }
30404 v.reset(OpMakeResult)
30405 v0 := b.NewValue0(v.Pos, OpEq16, typ.Bool)
30406 v1 := b.NewValue0(v.Pos, OpLoad, typ.Int16)
30407 v1.AddArg2(sptr, mem)
30408 v2 := b.NewValue0(v.Pos, OpConst16, typ.Int16)
30409 v2.AuxInt = int16ToAuxInt(int16(read16(scon, 0, config.ctxt.Arch.ByteOrder)))
30410 v0.AddArg2(v1, v2)
30411 v.AddArg2(v0, mem)
30412 return true
30413 }
30414
30415
30416
30417 for {
30418 if len(v.Args) != 4 {
30419 break
30420 }
30421 callAux := auxToCall(v.Aux)
30422 mem := v.Args[3]
30423 v_0 := v.Args[0]
30424 if v_0.Op != OpAddr {
30425 break
30426 }
30427 scon := auxToSym(v_0.Aux)
30428 v_0_0 := v_0.Args[0]
30429 if v_0_0.Op != OpSB {
30430 break
30431 }
30432 sptr := v.Args[1]
30433 v_2 := v.Args[2]
30434 if v_2.Op != OpConst64 || auxIntToInt64(v_2.AuxInt) != 2 || !(isSameCall(callAux, "runtime.memequal") && symIsRO(scon) && canLoadUnaligned(config)) {
30435 break
30436 }
30437 v.reset(OpMakeResult)
30438 v0 := b.NewValue0(v.Pos, OpEq16, typ.Bool)
30439 v1 := b.NewValue0(v.Pos, OpLoad, typ.Int16)
30440 v1.AddArg2(sptr, mem)
30441 v2 := b.NewValue0(v.Pos, OpConst16, typ.Int16)
30442 v2.AuxInt = int16ToAuxInt(int16(read16(scon, 0, config.ctxt.Arch.ByteOrder)))
30443 v0.AddArg2(v1, v2)
30444 v.AddArg2(v0, mem)
30445 return true
30446 }
30447
30448
30449
30450 for {
30451 if len(v.Args) != 4 {
30452 break
30453 }
30454 callAux := auxToCall(v.Aux)
30455 mem := v.Args[3]
30456 sptr := v.Args[0]
30457 v_1 := v.Args[1]
30458 if v_1.Op != OpAddr {
30459 break
30460 }
30461 scon := auxToSym(v_1.Aux)
30462 v_1_0 := v_1.Args[0]
30463 if v_1_0.Op != OpSB {
30464 break
30465 }
30466 v_2 := v.Args[2]
30467 if v_2.Op != OpConst64 || auxIntToInt64(v_2.AuxInt) != 4 || !(isSameCall(callAux, "runtime.memequal") && symIsRO(scon) && canLoadUnaligned(config)) {
30468 break
30469 }
30470 v.reset(OpMakeResult)
30471 v0 := b.NewValue0(v.Pos, OpEq32, typ.Bool)
30472 v1 := b.NewValue0(v.Pos, OpLoad, typ.Int32)
30473 v1.AddArg2(sptr, mem)
30474 v2 := b.NewValue0(v.Pos, OpConst32, typ.Int32)
30475 v2.AuxInt = int32ToAuxInt(int32(read32(scon, 0, config.ctxt.Arch.ByteOrder)))
30476 v0.AddArg2(v1, v2)
30477 v.AddArg2(v0, mem)
30478 return true
30479 }
30480
30481
30482
30483 for {
30484 if len(v.Args) != 4 {
30485 break
30486 }
30487 callAux := auxToCall(v.Aux)
30488 mem := v.Args[3]
30489 v_0 := v.Args[0]
30490 if v_0.Op != OpAddr {
30491 break
30492 }
30493 scon := auxToSym(v_0.Aux)
30494 v_0_0 := v_0.Args[0]
30495 if v_0_0.Op != OpSB {
30496 break
30497 }
30498 sptr := v.Args[1]
30499 v_2 := v.Args[2]
30500 if v_2.Op != OpConst64 || auxIntToInt64(v_2.AuxInt) != 4 || !(isSameCall(callAux, "runtime.memequal") && symIsRO(scon) && canLoadUnaligned(config)) {
30501 break
30502 }
30503 v.reset(OpMakeResult)
30504 v0 := b.NewValue0(v.Pos, OpEq32, typ.Bool)
30505 v1 := b.NewValue0(v.Pos, OpLoad, typ.Int32)
30506 v1.AddArg2(sptr, mem)
30507 v2 := b.NewValue0(v.Pos, OpConst32, typ.Int32)
30508 v2.AuxInt = int32ToAuxInt(int32(read32(scon, 0, config.ctxt.Arch.ByteOrder)))
30509 v0.AddArg2(v1, v2)
30510 v.AddArg2(v0, mem)
30511 return true
30512 }
30513
30514
30515
30516 for {
30517 if len(v.Args) != 4 {
30518 break
30519 }
30520 callAux := auxToCall(v.Aux)
30521 mem := v.Args[3]
30522 sptr := v.Args[0]
30523 v_1 := v.Args[1]
30524 if v_1.Op != OpAddr {
30525 break
30526 }
30527 scon := auxToSym(v_1.Aux)
30528 v_1_0 := v_1.Args[0]
30529 if v_1_0.Op != OpSB {
30530 break
30531 }
30532 v_2 := v.Args[2]
30533 if v_2.Op != OpConst64 || auxIntToInt64(v_2.AuxInt) != 8 || !(isSameCall(callAux, "runtime.memequal") && symIsRO(scon) && canLoadUnaligned(config) && config.PtrSize == 8) {
30534 break
30535 }
30536 v.reset(OpMakeResult)
30537 v0 := b.NewValue0(v.Pos, OpEq64, typ.Bool)
30538 v1 := b.NewValue0(v.Pos, OpLoad, typ.Int64)
30539 v1.AddArg2(sptr, mem)
30540 v2 := b.NewValue0(v.Pos, OpConst64, typ.Int64)
30541 v2.AuxInt = int64ToAuxInt(int64(read64(scon, 0, config.ctxt.Arch.ByteOrder)))
30542 v0.AddArg2(v1, v2)
30543 v.AddArg2(v0, mem)
30544 return true
30545 }
30546
30547
30548
30549 for {
30550 if len(v.Args) != 4 {
30551 break
30552 }
30553 callAux := auxToCall(v.Aux)
30554 mem := v.Args[3]
30555 v_0 := v.Args[0]
30556 if v_0.Op != OpAddr {
30557 break
30558 }
30559 scon := auxToSym(v_0.Aux)
30560 v_0_0 := v_0.Args[0]
30561 if v_0_0.Op != OpSB {
30562 break
30563 }
30564 sptr := v.Args[1]
30565 v_2 := v.Args[2]
30566 if v_2.Op != OpConst64 || auxIntToInt64(v_2.AuxInt) != 8 || !(isSameCall(callAux, "runtime.memequal") && symIsRO(scon) && canLoadUnaligned(config) && config.PtrSize == 8) {
30567 break
30568 }
30569 v.reset(OpMakeResult)
30570 v0 := b.NewValue0(v.Pos, OpEq64, typ.Bool)
30571 v1 := b.NewValue0(v.Pos, OpLoad, typ.Int64)
30572 v1.AddArg2(sptr, mem)
30573 v2 := b.NewValue0(v.Pos, OpConst64, typ.Int64)
30574 v2.AuxInt = int64ToAuxInt(int64(read64(scon, 0, config.ctxt.Arch.ByteOrder)))
30575 v0.AddArg2(v1, v2)
30576 v.AddArg2(v0, mem)
30577 return true
30578 }
30579
30580
30581
30582 for {
30583 if len(v.Args) != 4 {
30584 break
30585 }
30586 callAux := auxToCall(v.Aux)
30587 mem := v.Args[3]
30588 v_2 := v.Args[2]
30589 if v_2.Op != OpConst64 || auxIntToInt64(v_2.AuxInt) != 0 || !(isSameCall(callAux, "runtime.memequal")) {
30590 break
30591 }
30592 v.reset(OpMakeResult)
30593 v0 := b.NewValue0(v.Pos, OpConstBool, typ.Bool)
30594 v0.AuxInt = boolToAuxInt(true)
30595 v.AddArg2(v0, mem)
30596 return true
30597 }
30598
30599
30600
30601 for {
30602 if len(v.Args) != 4 {
30603 break
30604 }
30605 callAux := auxToCall(v.Aux)
30606 mem := v.Args[3]
30607 p := v.Args[0]
30608 q := v.Args[1]
30609 if !(isSameCall(callAux, "runtime.memequal") && isSamePtr(p, q)) {
30610 break
30611 }
30612 v.reset(OpMakeResult)
30613 v0 := b.NewValue0(v.Pos, OpConstBool, typ.Bool)
30614 v0.AuxInt = boolToAuxInt(true)
30615 v.AddArg2(v0, mem)
30616 return true
30617 }
30618
30619
30620
30621 for {
30622 if len(v.Args) != 4 {
30623 break
30624 }
30625 callAux := auxToCall(v.Aux)
30626 mem := v.Args[3]
30627 v_1 := v.Args[1]
30628 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 0 {
30629 break
30630 }
30631 v_2 := v.Args[2]
30632 if v_2.Op != OpConst64 || auxIntToInt64(v_2.AuxInt) != 0 || !(isSameCall(callAux, "runtime.makeslice")) {
30633 break
30634 }
30635 v.reset(OpMakeResult)
30636 v0 := b.NewValue0(v.Pos, OpAddr, v.Type.FieldType(0))
30637 v0.Aux = symToAux(ir.Syms.Zerobase)
30638 v1 := b.NewValue0(v.Pos, OpSB, typ.Uintptr)
30639 v0.AddArg(v1)
30640 v.AddArg2(v0, mem)
30641 return true
30642 }
30643
30644
30645
30646 for {
30647 if len(v.Args) != 4 {
30648 break
30649 }
30650 callAux := auxToCall(v.Aux)
30651 mem := v.Args[3]
30652 v_1 := v.Args[1]
30653 if v_1.Op != OpConst32 || auxIntToInt32(v_1.AuxInt) != 0 {
30654 break
30655 }
30656 v_2 := v.Args[2]
30657 if v_2.Op != OpConst32 || auxIntToInt32(v_2.AuxInt) != 0 || !(isSameCall(callAux, "runtime.makeslice")) {
30658 break
30659 }
30660 v.reset(OpMakeResult)
30661 v0 := b.NewValue0(v.Pos, OpAddr, v.Type.FieldType(0))
30662 v0.Aux = symToAux(ir.Syms.Zerobase)
30663 v1 := b.NewValue0(v.Pos, OpSB, typ.Uintptr)
30664 v0.AddArg(v1)
30665 v.AddArg2(v0, mem)
30666 return true
30667 }
30668
30669
30670
30671 for {
30672 if len(v.Args) != 4 {
30673 break
30674 }
30675 f := auxToCall(v.Aux)
30676 mem := v.Args[3]
30677 typ_ := v.Args[0]
30678 x := v.Args[1]
30679 y := v.Args[2]
30680 if !(isSameCall(f, "runtime.efaceeq") && isDirectType(typ_) && clobber(v)) {
30681 break
30682 }
30683 v.reset(OpMakeResult)
30684 v0 := b.NewValue0(v.Pos, OpEqPtr, typ.Bool)
30685 v0.AddArg2(x, y)
30686 v.AddArg2(v0, mem)
30687 return true
30688 }
30689
30690
30691
30692 for {
30693 if len(v.Args) != 4 {
30694 break
30695 }
30696 f := auxToCall(v.Aux)
30697 mem := v.Args[3]
30698 itab := v.Args[0]
30699 x := v.Args[1]
30700 y := v.Args[2]
30701 if !(isSameCall(f, "runtime.ifaceeq") && isDirectIface(itab) && clobber(v)) {
30702 break
30703 }
30704 v.reset(OpMakeResult)
30705 v0 := b.NewValue0(v.Pos, OpEqPtr, typ.Bool)
30706 v0.AddArg2(x, y)
30707 v.AddArg2(v0, mem)
30708 return true
30709 }
30710
30711
30712
30713 for {
30714 if len(v.Args) != 4 {
30715 break
30716 }
30717 argsize := auxIntToInt32(v.AuxInt)
30718 f := auxToCall(v.Aux)
30719 _ = v.Args[3]
30720 typ_ := v.Args[0]
30721 map_ := v.Args[1]
30722 key := v.Args[2]
30723 if key.Op != OpSelectN || auxIntToInt64(key.AuxInt) != 0 {
30724 break
30725 }
30726 sbts := key.Args[0]
30727 if sbts.Op != OpStaticLECall || len(sbts.Args) != 4 {
30728 break
30729 }
30730 g := auxToCall(sbts.Aux)
30731 mem := sbts.Args[3]
30732 ptr := sbts.Args[1]
30733 len := sbts.Args[2]
30734 m := v.Args[3]
30735 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)) {
30736 break
30737 }
30738 v.reset(OpStaticLECall)
30739 v.AuxInt = int32ToAuxInt(argsize)
30740 v.Aux = callToAux(f)
30741 v0 := b.NewValue0(v.Pos, OpStringMake, typ.String)
30742 v0.AddArg2(ptr, len)
30743 v.AddArg4(typ_, map_, v0, mem)
30744 return true
30745 }
30746 return false
30747 }
30748 func rewriteValuegeneric_OpStore(v *Value) bool {
30749 v_2 := v.Args[2]
30750 v_1 := v.Args[1]
30751 v_0 := v.Args[0]
30752 b := v.Block
30753
30754
30755
30756 for {
30757 t1 := auxToType(v.Aux)
30758 p1 := v_0
30759 if v_1.Op != OpLoad {
30760 break
30761 }
30762 t2 := v_1.Type
30763 mem := v_1.Args[1]
30764 p2 := v_1.Args[0]
30765 if mem != v_2 || !(isSamePtr(p1, p2) && t2.Size() == t1.Size()) {
30766 break
30767 }
30768 v.copyOf(mem)
30769 return true
30770 }
30771
30772
30773
30774 for {
30775 t1 := auxToType(v.Aux)
30776 p1 := v_0
30777 if v_1.Op != OpLoad {
30778 break
30779 }
30780 t2 := v_1.Type
30781 oldmem := v_1.Args[1]
30782 p2 := v_1.Args[0]
30783 mem := v_2
30784 if mem.Op != OpStore {
30785 break
30786 }
30787 t3 := auxToType(mem.Aux)
30788 _ = mem.Args[2]
30789 p3 := mem.Args[0]
30790 if oldmem != mem.Args[2] || !(isSamePtr(p1, p2) && t2.Size() == t1.Size() && disjoint(p1, t1.Size(), p3, t3.Size())) {
30791 break
30792 }
30793 v.copyOf(mem)
30794 return true
30795 }
30796
30797
30798
30799 for {
30800 t1 := auxToType(v.Aux)
30801 p1 := v_0
30802 if v_1.Op != OpLoad {
30803 break
30804 }
30805 t2 := v_1.Type
30806 oldmem := v_1.Args[1]
30807 p2 := v_1.Args[0]
30808 mem := v_2
30809 if mem.Op != OpStore {
30810 break
30811 }
30812 t3 := auxToType(mem.Aux)
30813 _ = mem.Args[2]
30814 p3 := mem.Args[0]
30815 mem_2 := mem.Args[2]
30816 if mem_2.Op != OpStore {
30817 break
30818 }
30819 t4 := auxToType(mem_2.Aux)
30820 _ = mem_2.Args[2]
30821 p4 := mem_2.Args[0]
30822 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())) {
30823 break
30824 }
30825 v.copyOf(mem)
30826 return true
30827 }
30828
30829
30830
30831 for {
30832 t1 := auxToType(v.Aux)
30833 p1 := v_0
30834 if v_1.Op != OpLoad {
30835 break
30836 }
30837 t2 := v_1.Type
30838 oldmem := v_1.Args[1]
30839 p2 := v_1.Args[0]
30840 mem := v_2
30841 if mem.Op != OpStore {
30842 break
30843 }
30844 t3 := auxToType(mem.Aux)
30845 _ = mem.Args[2]
30846 p3 := mem.Args[0]
30847 mem_2 := mem.Args[2]
30848 if mem_2.Op != OpStore {
30849 break
30850 }
30851 t4 := auxToType(mem_2.Aux)
30852 _ = mem_2.Args[2]
30853 p4 := mem_2.Args[0]
30854 mem_2_2 := mem_2.Args[2]
30855 if mem_2_2.Op != OpStore {
30856 break
30857 }
30858 t5 := auxToType(mem_2_2.Aux)
30859 _ = mem_2_2.Args[2]
30860 p5 := mem_2_2.Args[0]
30861 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())) {
30862 break
30863 }
30864 v.copyOf(mem)
30865 return true
30866 }
30867
30868
30869
30870 for {
30871 t := auxToType(v.Aux)
30872 if v_0.Op != OpOffPtr {
30873 break
30874 }
30875 o := auxIntToInt64(v_0.AuxInt)
30876 p1 := v_0.Args[0]
30877 x := v_1
30878 mem := v_2
30879 if mem.Op != OpZero {
30880 break
30881 }
30882 n := auxIntToInt64(mem.AuxInt)
30883 p2 := mem.Args[0]
30884 if !(isConstZero(x) && o >= 0 && t.Size()+o <= n && isSamePtr(p1, p2)) {
30885 break
30886 }
30887 v.copyOf(mem)
30888 return true
30889 }
30890
30891
30892
30893 for {
30894 t1 := auxToType(v.Aux)
30895 op := v_0
30896 if op.Op != OpOffPtr {
30897 break
30898 }
30899 o1 := auxIntToInt64(op.AuxInt)
30900 p1 := op.Args[0]
30901 x := v_1
30902 mem := v_2
30903 if mem.Op != OpStore {
30904 break
30905 }
30906 t2 := auxToType(mem.Aux)
30907 _ = mem.Args[2]
30908 p2 := mem.Args[0]
30909 mem_2 := mem.Args[2]
30910 if mem_2.Op != OpZero {
30911 break
30912 }
30913 n := auxIntToInt64(mem_2.AuxInt)
30914 p3 := mem_2.Args[0]
30915 if !(isConstZero(x) && o1 >= 0 && t1.Size()+o1 <= n && isSamePtr(p1, p3) && disjoint(op, t1.Size(), p2, t2.Size())) {
30916 break
30917 }
30918 v.copyOf(mem)
30919 return true
30920 }
30921
30922
30923
30924 for {
30925 t1 := auxToType(v.Aux)
30926 op := v_0
30927 if op.Op != OpOffPtr {
30928 break
30929 }
30930 o1 := auxIntToInt64(op.AuxInt)
30931 p1 := op.Args[0]
30932 x := v_1
30933 mem := v_2
30934 if mem.Op != OpStore {
30935 break
30936 }
30937 t2 := auxToType(mem.Aux)
30938 _ = mem.Args[2]
30939 p2 := mem.Args[0]
30940 mem_2 := mem.Args[2]
30941 if mem_2.Op != OpStore {
30942 break
30943 }
30944 t3 := auxToType(mem_2.Aux)
30945 _ = mem_2.Args[2]
30946 p3 := mem_2.Args[0]
30947 mem_2_2 := mem_2.Args[2]
30948 if mem_2_2.Op != OpZero {
30949 break
30950 }
30951 n := auxIntToInt64(mem_2_2.AuxInt)
30952 p4 := mem_2_2.Args[0]
30953 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())) {
30954 break
30955 }
30956 v.copyOf(mem)
30957 return true
30958 }
30959
30960
30961
30962 for {
30963 t1 := auxToType(v.Aux)
30964 op := v_0
30965 if op.Op != OpOffPtr {
30966 break
30967 }
30968 o1 := auxIntToInt64(op.AuxInt)
30969 p1 := op.Args[0]
30970 x := v_1
30971 mem := v_2
30972 if mem.Op != OpStore {
30973 break
30974 }
30975 t2 := auxToType(mem.Aux)
30976 _ = mem.Args[2]
30977 p2 := mem.Args[0]
30978 mem_2 := mem.Args[2]
30979 if mem_2.Op != OpStore {
30980 break
30981 }
30982 t3 := auxToType(mem_2.Aux)
30983 _ = mem_2.Args[2]
30984 p3 := mem_2.Args[0]
30985 mem_2_2 := mem_2.Args[2]
30986 if mem_2_2.Op != OpStore {
30987 break
30988 }
30989 t4 := auxToType(mem_2_2.Aux)
30990 _ = mem_2_2.Args[2]
30991 p4 := mem_2_2.Args[0]
30992 mem_2_2_2 := mem_2_2.Args[2]
30993 if mem_2_2_2.Op != OpZero {
30994 break
30995 }
30996 n := auxIntToInt64(mem_2_2_2.AuxInt)
30997 p5 := mem_2_2_2.Args[0]
30998 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())) {
30999 break
31000 }
31001 v.copyOf(mem)
31002 return true
31003 }
31004
31005
31006 for {
31007 if v_1.Op != OpStructMake {
31008 break
31009 }
31010 v.copyOf(rewriteStructStore(v))
31011 return true
31012 }
31013
31014
31015
31016 for {
31017 t := auxToType(v.Aux)
31018 dst := v_0
31019 if v_1.Op != OpLoad {
31020 break
31021 }
31022 mem := v_1.Args[1]
31023 src := v_1.Args[0]
31024 if mem != v_2 || !(!CanSSA(t)) {
31025 break
31026 }
31027 v.reset(OpMove)
31028 v.AuxInt = int64ToAuxInt(t.Size())
31029 v.Aux = typeToAux(t)
31030 v.AddArg3(dst, src, mem)
31031 return true
31032 }
31033
31034
31035
31036 for {
31037 t := auxToType(v.Aux)
31038 dst := v_0
31039 if v_1.Op != OpLoad {
31040 break
31041 }
31042 mem := v_1.Args[1]
31043 src := v_1.Args[0]
31044 if v_2.Op != OpVarDef {
31045 break
31046 }
31047 x := auxToSym(v_2.Aux)
31048 if mem != v_2.Args[0] || !(!CanSSA(t)) {
31049 break
31050 }
31051 v.reset(OpMove)
31052 v.AuxInt = int64ToAuxInt(t.Size())
31053 v.Aux = typeToAux(t)
31054 v0 := b.NewValue0(v.Pos, OpVarDef, types.TypeMem)
31055 v0.Aux = symToAux(x)
31056 v0.AddArg(mem)
31057 v.AddArg3(dst, src, v0)
31058 return true
31059 }
31060
31061
31062 for {
31063 if v_1.Op != OpArrayMake0 {
31064 break
31065 }
31066 mem := v_2
31067 v.copyOf(mem)
31068 return true
31069 }
31070
31071
31072 for {
31073 dst := v_0
31074 if v_1.Op != OpArrayMake1 {
31075 break
31076 }
31077 e := v_1.Args[0]
31078 mem := v_2
31079 v.reset(OpStore)
31080 v.Aux = typeToAux(e.Type)
31081 v.AddArg3(dst, e, mem)
31082 return true
31083 }
31084
31085
31086
31087 for {
31088 if v_0.Op != OpSelectN || auxIntToInt64(v_0.AuxInt) != 0 {
31089 break
31090 }
31091 call := v_0.Args[0]
31092 if call.Op != OpStaticLECall || len(call.Args) != 2 {
31093 break
31094 }
31095 x := v_1
31096 mem := v_2
31097 if mem.Op != OpSelectN || auxIntToInt64(mem.AuxInt) != 1 || call != mem.Args[0] || !(isConstZero(x) && isSameCall(call.Aux, "runtime.newobject")) {
31098 break
31099 }
31100 v.copyOf(mem)
31101 return true
31102 }
31103
31104
31105
31106 for {
31107 if v_0.Op != OpOffPtr {
31108 break
31109 }
31110 v_0_0 := v_0.Args[0]
31111 if v_0_0.Op != OpSelectN || auxIntToInt64(v_0_0.AuxInt) != 0 {
31112 break
31113 }
31114 call := v_0_0.Args[0]
31115 if call.Op != OpStaticLECall || len(call.Args) != 2 {
31116 break
31117 }
31118 x := v_1
31119 mem := v_2
31120 if mem.Op != OpSelectN || auxIntToInt64(mem.AuxInt) != 1 || call != mem.Args[0] || !(isConstZero(x) && isSameCall(call.Aux, "runtime.newobject")) {
31121 break
31122 }
31123 v.copyOf(mem)
31124 return true
31125 }
31126
31127
31128
31129 for {
31130 t1 := auxToType(v.Aux)
31131 op1 := v_0
31132 if op1.Op != OpOffPtr {
31133 break
31134 }
31135 o1 := auxIntToInt64(op1.AuxInt)
31136 p1 := op1.Args[0]
31137 d1 := v_1
31138 m2 := v_2
31139 if m2.Op != OpStore {
31140 break
31141 }
31142 t2 := auxToType(m2.Aux)
31143 _ = m2.Args[2]
31144 op2 := m2.Args[0]
31145 if op2.Op != OpOffPtr || auxIntToInt64(op2.AuxInt) != 0 {
31146 break
31147 }
31148 p2 := op2.Args[0]
31149 d2 := m2.Args[1]
31150 m3 := m2.Args[2]
31151 if m3.Op != OpMove {
31152 break
31153 }
31154 n := auxIntToInt64(m3.AuxInt)
31155 mem := m3.Args[2]
31156 p3 := m3.Args[0]
31157 if !(m2.Uses == 1 && m3.Uses == 1 && o1 == t2.Size() && n == t2.Size()+t1.Size() && isSamePtr(p1, p2) && isSamePtr(p2, p3) && clobber(m2, m3)) {
31158 break
31159 }
31160 v.reset(OpStore)
31161 v.Aux = typeToAux(t1)
31162 v0 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
31163 v0.Aux = typeToAux(t2)
31164 v0.AddArg3(op2, d2, mem)
31165 v.AddArg3(op1, d1, v0)
31166 return true
31167 }
31168
31169
31170
31171 for {
31172 t1 := auxToType(v.Aux)
31173 op1 := v_0
31174 if op1.Op != OpOffPtr {
31175 break
31176 }
31177 o1 := auxIntToInt64(op1.AuxInt)
31178 p1 := op1.Args[0]
31179 d1 := v_1
31180 m2 := v_2
31181 if m2.Op != OpStore {
31182 break
31183 }
31184 t2 := auxToType(m2.Aux)
31185 _ = m2.Args[2]
31186 op2 := m2.Args[0]
31187 if op2.Op != OpOffPtr {
31188 break
31189 }
31190 o2 := auxIntToInt64(op2.AuxInt)
31191 p2 := op2.Args[0]
31192 d2 := m2.Args[1]
31193 m3 := m2.Args[2]
31194 if m3.Op != OpStore {
31195 break
31196 }
31197 t3 := auxToType(m3.Aux)
31198 _ = m3.Args[2]
31199 op3 := m3.Args[0]
31200 if op3.Op != OpOffPtr || auxIntToInt64(op3.AuxInt) != 0 {
31201 break
31202 }
31203 p3 := op3.Args[0]
31204 d3 := m3.Args[1]
31205 m4 := m3.Args[2]
31206 if m4.Op != OpMove {
31207 break
31208 }
31209 n := auxIntToInt64(m4.AuxInt)
31210 mem := m4.Args[2]
31211 p4 := m4.Args[0]
31212 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)) {
31213 break
31214 }
31215 v.reset(OpStore)
31216 v.Aux = typeToAux(t1)
31217 v0 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
31218 v0.Aux = typeToAux(t2)
31219 v1 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
31220 v1.Aux = typeToAux(t3)
31221 v1.AddArg3(op3, d3, mem)
31222 v0.AddArg3(op2, d2, v1)
31223 v.AddArg3(op1, d1, v0)
31224 return true
31225 }
31226
31227
31228
31229 for {
31230 t1 := auxToType(v.Aux)
31231 op1 := v_0
31232 if op1.Op != OpOffPtr {
31233 break
31234 }
31235 o1 := auxIntToInt64(op1.AuxInt)
31236 p1 := op1.Args[0]
31237 d1 := v_1
31238 m2 := v_2
31239 if m2.Op != OpStore {
31240 break
31241 }
31242 t2 := auxToType(m2.Aux)
31243 _ = m2.Args[2]
31244 op2 := m2.Args[0]
31245 if op2.Op != OpOffPtr {
31246 break
31247 }
31248 o2 := auxIntToInt64(op2.AuxInt)
31249 p2 := op2.Args[0]
31250 d2 := m2.Args[1]
31251 m3 := m2.Args[2]
31252 if m3.Op != OpStore {
31253 break
31254 }
31255 t3 := auxToType(m3.Aux)
31256 _ = m3.Args[2]
31257 op3 := m3.Args[0]
31258 if op3.Op != OpOffPtr {
31259 break
31260 }
31261 o3 := auxIntToInt64(op3.AuxInt)
31262 p3 := op3.Args[0]
31263 d3 := m3.Args[1]
31264 m4 := m3.Args[2]
31265 if m4.Op != OpStore {
31266 break
31267 }
31268 t4 := auxToType(m4.Aux)
31269 _ = m4.Args[2]
31270 op4 := m4.Args[0]
31271 if op4.Op != OpOffPtr || auxIntToInt64(op4.AuxInt) != 0 {
31272 break
31273 }
31274 p4 := op4.Args[0]
31275 d4 := m4.Args[1]
31276 m5 := m4.Args[2]
31277 if m5.Op != OpMove {
31278 break
31279 }
31280 n := auxIntToInt64(m5.AuxInt)
31281 mem := m5.Args[2]
31282 p5 := m5.Args[0]
31283 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)) {
31284 break
31285 }
31286 v.reset(OpStore)
31287 v.Aux = typeToAux(t1)
31288 v0 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
31289 v0.Aux = typeToAux(t2)
31290 v1 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
31291 v1.Aux = typeToAux(t3)
31292 v2 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
31293 v2.Aux = typeToAux(t4)
31294 v2.AddArg3(op4, d4, mem)
31295 v1.AddArg3(op3, d3, v2)
31296 v0.AddArg3(op2, d2, v1)
31297 v.AddArg3(op1, d1, v0)
31298 return true
31299 }
31300
31301
31302
31303 for {
31304 t1 := auxToType(v.Aux)
31305 op1 := v_0
31306 if op1.Op != OpOffPtr {
31307 break
31308 }
31309 o1 := auxIntToInt64(op1.AuxInt)
31310 p1 := op1.Args[0]
31311 d1 := v_1
31312 m2 := v_2
31313 if m2.Op != OpStore {
31314 break
31315 }
31316 t2 := auxToType(m2.Aux)
31317 _ = m2.Args[2]
31318 op2 := m2.Args[0]
31319 if op2.Op != OpOffPtr || auxIntToInt64(op2.AuxInt) != 0 {
31320 break
31321 }
31322 p2 := op2.Args[0]
31323 d2 := m2.Args[1]
31324 m3 := m2.Args[2]
31325 if m3.Op != OpZero {
31326 break
31327 }
31328 n := auxIntToInt64(m3.AuxInt)
31329 mem := m3.Args[1]
31330 p3 := m3.Args[0]
31331 if !(m2.Uses == 1 && m3.Uses == 1 && o1 == t2.Size() && n == t2.Size()+t1.Size() && isSamePtr(p1, p2) && isSamePtr(p2, p3) && clobber(m2, m3)) {
31332 break
31333 }
31334 v.reset(OpStore)
31335 v.Aux = typeToAux(t1)
31336 v0 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
31337 v0.Aux = typeToAux(t2)
31338 v0.AddArg3(op2, d2, mem)
31339 v.AddArg3(op1, d1, v0)
31340 return true
31341 }
31342
31343
31344
31345 for {
31346 t1 := auxToType(v.Aux)
31347 op1 := v_0
31348 if op1.Op != OpOffPtr {
31349 break
31350 }
31351 o1 := auxIntToInt64(op1.AuxInt)
31352 p1 := op1.Args[0]
31353 d1 := v_1
31354 m2 := v_2
31355 if m2.Op != OpStore {
31356 break
31357 }
31358 t2 := auxToType(m2.Aux)
31359 _ = m2.Args[2]
31360 op2 := m2.Args[0]
31361 if op2.Op != OpOffPtr {
31362 break
31363 }
31364 o2 := auxIntToInt64(op2.AuxInt)
31365 p2 := op2.Args[0]
31366 d2 := m2.Args[1]
31367 m3 := m2.Args[2]
31368 if m3.Op != OpStore {
31369 break
31370 }
31371 t3 := auxToType(m3.Aux)
31372 _ = m3.Args[2]
31373 op3 := m3.Args[0]
31374 if op3.Op != OpOffPtr || auxIntToInt64(op3.AuxInt) != 0 {
31375 break
31376 }
31377 p3 := op3.Args[0]
31378 d3 := m3.Args[1]
31379 m4 := m3.Args[2]
31380 if m4.Op != OpZero {
31381 break
31382 }
31383 n := auxIntToInt64(m4.AuxInt)
31384 mem := m4.Args[1]
31385 p4 := m4.Args[0]
31386 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)) {
31387 break
31388 }
31389 v.reset(OpStore)
31390 v.Aux = typeToAux(t1)
31391 v0 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
31392 v0.Aux = typeToAux(t2)
31393 v1 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
31394 v1.Aux = typeToAux(t3)
31395 v1.AddArg3(op3, d3, mem)
31396 v0.AddArg3(op2, d2, v1)
31397 v.AddArg3(op1, d1, v0)
31398 return true
31399 }
31400
31401
31402
31403 for {
31404 t1 := auxToType(v.Aux)
31405 op1 := v_0
31406 if op1.Op != OpOffPtr {
31407 break
31408 }
31409 o1 := auxIntToInt64(op1.AuxInt)
31410 p1 := op1.Args[0]
31411 d1 := v_1
31412 m2 := v_2
31413 if m2.Op != OpStore {
31414 break
31415 }
31416 t2 := auxToType(m2.Aux)
31417 _ = m2.Args[2]
31418 op2 := m2.Args[0]
31419 if op2.Op != OpOffPtr {
31420 break
31421 }
31422 o2 := auxIntToInt64(op2.AuxInt)
31423 p2 := op2.Args[0]
31424 d2 := m2.Args[1]
31425 m3 := m2.Args[2]
31426 if m3.Op != OpStore {
31427 break
31428 }
31429 t3 := auxToType(m3.Aux)
31430 _ = m3.Args[2]
31431 op3 := m3.Args[0]
31432 if op3.Op != OpOffPtr {
31433 break
31434 }
31435 o3 := auxIntToInt64(op3.AuxInt)
31436 p3 := op3.Args[0]
31437 d3 := m3.Args[1]
31438 m4 := m3.Args[2]
31439 if m4.Op != OpStore {
31440 break
31441 }
31442 t4 := auxToType(m4.Aux)
31443 _ = m4.Args[2]
31444 op4 := m4.Args[0]
31445 if op4.Op != OpOffPtr || auxIntToInt64(op4.AuxInt) != 0 {
31446 break
31447 }
31448 p4 := op4.Args[0]
31449 d4 := m4.Args[1]
31450 m5 := m4.Args[2]
31451 if m5.Op != OpZero {
31452 break
31453 }
31454 n := auxIntToInt64(m5.AuxInt)
31455 mem := m5.Args[1]
31456 p5 := m5.Args[0]
31457 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)) {
31458 break
31459 }
31460 v.reset(OpStore)
31461 v.Aux = typeToAux(t1)
31462 v0 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
31463 v0.Aux = typeToAux(t2)
31464 v1 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
31465 v1.Aux = typeToAux(t3)
31466 v2 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
31467 v2.Aux = typeToAux(t4)
31468 v2.AddArg3(op4, d4, mem)
31469 v1.AddArg3(op3, d3, v2)
31470 v0.AddArg3(op2, d2, v1)
31471 v.AddArg3(op1, d1, v0)
31472 return true
31473 }
31474 return false
31475 }
31476 func rewriteValuegeneric_OpStringLen(v *Value) bool {
31477 v_0 := v.Args[0]
31478
31479
31480 for {
31481 if v_0.Op != OpStringMake {
31482 break
31483 }
31484 _ = v_0.Args[1]
31485 v_0_1 := v_0.Args[1]
31486 if v_0_1.Op != OpConst64 {
31487 break
31488 }
31489 t := v_0_1.Type
31490 c := auxIntToInt64(v_0_1.AuxInt)
31491 v.reset(OpConst64)
31492 v.Type = t
31493 v.AuxInt = int64ToAuxInt(c)
31494 return true
31495 }
31496 return false
31497 }
31498 func rewriteValuegeneric_OpStringPtr(v *Value) bool {
31499 v_0 := v.Args[0]
31500
31501
31502 for {
31503 if v_0.Op != OpStringMake {
31504 break
31505 }
31506 v_0_0 := v_0.Args[0]
31507 if v_0_0.Op != OpAddr {
31508 break
31509 }
31510 t := v_0_0.Type
31511 s := auxToSym(v_0_0.Aux)
31512 base := v_0_0.Args[0]
31513 v.reset(OpAddr)
31514 v.Type = t
31515 v.Aux = symToAux(s)
31516 v.AddArg(base)
31517 return true
31518 }
31519 return false
31520 }
31521 func rewriteValuegeneric_OpStructSelect(v *Value) bool {
31522 v_0 := v.Args[0]
31523 b := v.Block
31524
31525
31526 for {
31527 i := auxIntToInt64(v.AuxInt)
31528 x := v_0
31529 if x.Op != OpStructMake {
31530 break
31531 }
31532 v.copyOf(x.Args[i])
31533 return true
31534 }
31535
31536
31537
31538 for {
31539 i := auxIntToInt64(v.AuxInt)
31540 x := v_0
31541 if x.Op != OpLoad {
31542 break
31543 }
31544 t := x.Type
31545 mem := x.Args[1]
31546 ptr := x.Args[0]
31547 if !(!CanSSA(t)) {
31548 break
31549 }
31550 b = x.Block
31551 v0 := b.NewValue0(v.Pos, OpLoad, v.Type)
31552 v.copyOf(v0)
31553 v1 := b.NewValue0(v.Pos, OpOffPtr, v.Type.PtrTo())
31554 v1.AuxInt = int64ToAuxInt(t.FieldOff(int(i)))
31555 v1.AddArg(ptr)
31556 v0.AddArg2(v1, mem)
31557 return true
31558 }
31559
31560
31561 for {
31562 if auxIntToInt64(v.AuxInt) != 0 || v_0.Op != OpIData {
31563 break
31564 }
31565 x := v_0.Args[0]
31566 v.reset(OpIData)
31567 v.AddArg(x)
31568 return true
31569 }
31570 return false
31571 }
31572 func rewriteValuegeneric_OpSub16(v *Value) bool {
31573 v_1 := v.Args[1]
31574 v_0 := v.Args[0]
31575 b := v.Block
31576
31577
31578 for {
31579 if v_0.Op != OpConst16 {
31580 break
31581 }
31582 c := auxIntToInt16(v_0.AuxInt)
31583 if v_1.Op != OpConst16 {
31584 break
31585 }
31586 d := auxIntToInt16(v_1.AuxInt)
31587 v.reset(OpConst16)
31588 v.AuxInt = int16ToAuxInt(c - d)
31589 return true
31590 }
31591
31592
31593
31594 for {
31595 x := v_0
31596 if v_1.Op != OpConst16 {
31597 break
31598 }
31599 t := v_1.Type
31600 c := auxIntToInt16(v_1.AuxInt)
31601 if !(x.Op != OpConst16) {
31602 break
31603 }
31604 v.reset(OpAdd16)
31605 v0 := b.NewValue0(v.Pos, OpConst16, t)
31606 v0.AuxInt = int16ToAuxInt(-c)
31607 v.AddArg2(v0, x)
31608 return true
31609 }
31610
31611
31612 for {
31613 t := v.Type
31614 if v_0.Op != OpMul16 {
31615 break
31616 }
31617 _ = v_0.Args[1]
31618 v_0_0 := v_0.Args[0]
31619 v_0_1 := v_0.Args[1]
31620 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
31621 x := v_0_0
31622 y := v_0_1
31623 if v_1.Op != OpMul16 {
31624 continue
31625 }
31626 _ = v_1.Args[1]
31627 v_1_0 := v_1.Args[0]
31628 v_1_1 := v_1.Args[1]
31629 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
31630 if x != v_1_0 {
31631 continue
31632 }
31633 z := v_1_1
31634 v.reset(OpMul16)
31635 v0 := b.NewValue0(v.Pos, OpSub16, t)
31636 v0.AddArg2(y, z)
31637 v.AddArg2(x, v0)
31638 return true
31639 }
31640 }
31641 break
31642 }
31643
31644
31645 for {
31646 x := v_0
31647 if x != v_1 {
31648 break
31649 }
31650 v.reset(OpConst16)
31651 v.AuxInt = int16ToAuxInt(0)
31652 return true
31653 }
31654
31655
31656 for {
31657 if v_0.Op != OpNeg16 {
31658 break
31659 }
31660 x := v_0.Args[0]
31661 if v_1.Op != OpCom16 || x != v_1.Args[0] {
31662 break
31663 }
31664 v.reset(OpConst16)
31665 v.AuxInt = int16ToAuxInt(1)
31666 return true
31667 }
31668
31669
31670 for {
31671 if v_0.Op != OpCom16 {
31672 break
31673 }
31674 x := v_0.Args[0]
31675 if v_1.Op != OpNeg16 || x != v_1.Args[0] {
31676 break
31677 }
31678 v.reset(OpConst16)
31679 v.AuxInt = int16ToAuxInt(-1)
31680 return true
31681 }
31682
31683
31684 for {
31685 if v_0.Op != OpAdd16 {
31686 break
31687 }
31688 _ = v_0.Args[1]
31689 v_0_0 := v_0.Args[0]
31690 v_0_1 := v_0.Args[1]
31691 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
31692 t := v_0_0
31693 x := v_0_1
31694 if v_1.Op != OpAdd16 {
31695 continue
31696 }
31697 _ = v_1.Args[1]
31698 v_1_0 := v_1.Args[0]
31699 v_1_1 := v_1.Args[1]
31700 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
31701 if t != v_1_0 {
31702 continue
31703 }
31704 y := v_1_1
31705 v.reset(OpSub16)
31706 v.AddArg2(x, y)
31707 return true
31708 }
31709 }
31710 break
31711 }
31712
31713
31714 for {
31715 if v_0.Op != OpAdd16 {
31716 break
31717 }
31718 _ = v_0.Args[1]
31719 v_0_0 := v_0.Args[0]
31720 v_0_1 := v_0.Args[1]
31721 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
31722 x := v_0_0
31723 y := v_0_1
31724 if x != v_1 {
31725 continue
31726 }
31727 v.copyOf(y)
31728 return true
31729 }
31730 break
31731 }
31732
31733
31734 for {
31735 if v_0.Op != OpAdd16 {
31736 break
31737 }
31738 _ = v_0.Args[1]
31739 v_0_0 := v_0.Args[0]
31740 v_0_1 := v_0.Args[1]
31741 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
31742 x := v_0_0
31743 y := v_0_1
31744 if y != v_1 {
31745 continue
31746 }
31747 v.copyOf(x)
31748 return true
31749 }
31750 break
31751 }
31752
31753
31754 for {
31755 if v_0.Op != OpSub16 {
31756 break
31757 }
31758 y := v_0.Args[1]
31759 x := v_0.Args[0]
31760 if x != v_1 {
31761 break
31762 }
31763 v.reset(OpNeg16)
31764 v.AddArg(y)
31765 return true
31766 }
31767
31768
31769 for {
31770 x := v_0
31771 if v_1.Op != OpAdd16 {
31772 break
31773 }
31774 _ = v_1.Args[1]
31775 v_1_0 := v_1.Args[0]
31776 v_1_1 := v_1.Args[1]
31777 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
31778 if x != v_1_0 {
31779 continue
31780 }
31781 y := v_1_1
31782 v.reset(OpNeg16)
31783 v.AddArg(y)
31784 return true
31785 }
31786 break
31787 }
31788
31789
31790
31791 for {
31792 x := v_0
31793 if v_1.Op != OpSub16 {
31794 break
31795 }
31796 z := v_1.Args[1]
31797 i := v_1.Args[0]
31798 if i.Op != OpConst16 {
31799 break
31800 }
31801 t := i.Type
31802 if !(z.Op != OpConst16 && x.Op != OpConst16) {
31803 break
31804 }
31805 v.reset(OpSub16)
31806 v0 := b.NewValue0(v.Pos, OpAdd16, t)
31807 v0.AddArg2(x, z)
31808 v.AddArg2(v0, i)
31809 return true
31810 }
31811
31812
31813
31814 for {
31815 x := v_0
31816 if v_1.Op != OpAdd16 {
31817 break
31818 }
31819 _ = v_1.Args[1]
31820 v_1_0 := v_1.Args[0]
31821 v_1_1 := v_1.Args[1]
31822 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
31823 z := v_1_0
31824 i := v_1_1
31825 if i.Op != OpConst16 {
31826 continue
31827 }
31828 t := i.Type
31829 if !(z.Op != OpConst16 && x.Op != OpConst16) {
31830 continue
31831 }
31832 v.reset(OpSub16)
31833 v0 := b.NewValue0(v.Pos, OpSub16, t)
31834 v0.AddArg2(x, z)
31835 v.AddArg2(v0, i)
31836 return true
31837 }
31838 break
31839 }
31840
31841
31842
31843 for {
31844 if v_0.Op != OpSub16 {
31845 break
31846 }
31847 z := v_0.Args[1]
31848 i := v_0.Args[0]
31849 if i.Op != OpConst16 {
31850 break
31851 }
31852 t := i.Type
31853 x := v_1
31854 if !(z.Op != OpConst16 && x.Op != OpConst16) {
31855 break
31856 }
31857 v.reset(OpSub16)
31858 v0 := b.NewValue0(v.Pos, OpAdd16, t)
31859 v0.AddArg2(z, x)
31860 v.AddArg2(i, v0)
31861 return true
31862 }
31863
31864
31865
31866 for {
31867 if v_0.Op != OpAdd16 {
31868 break
31869 }
31870 _ = v_0.Args[1]
31871 v_0_0 := v_0.Args[0]
31872 v_0_1 := v_0.Args[1]
31873 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
31874 z := v_0_0
31875 i := v_0_1
31876 if i.Op != OpConst16 {
31877 continue
31878 }
31879 t := i.Type
31880 x := v_1
31881 if !(z.Op != OpConst16 && x.Op != OpConst16) {
31882 continue
31883 }
31884 v.reset(OpAdd16)
31885 v0 := b.NewValue0(v.Pos, OpSub16, t)
31886 v0.AddArg2(z, x)
31887 v.AddArg2(i, v0)
31888 return true
31889 }
31890 break
31891 }
31892
31893
31894 for {
31895 if v_0.Op != OpConst16 {
31896 break
31897 }
31898 t := v_0.Type
31899 c := auxIntToInt16(v_0.AuxInt)
31900 if v_1.Op != OpSub16 {
31901 break
31902 }
31903 x := v_1.Args[1]
31904 v_1_0 := v_1.Args[0]
31905 if v_1_0.Op != OpConst16 || v_1_0.Type != t {
31906 break
31907 }
31908 d := auxIntToInt16(v_1_0.AuxInt)
31909 v.reset(OpAdd16)
31910 v0 := b.NewValue0(v.Pos, OpConst16, t)
31911 v0.AuxInt = int16ToAuxInt(c - d)
31912 v.AddArg2(v0, x)
31913 return true
31914 }
31915
31916
31917 for {
31918 if v_0.Op != OpConst16 {
31919 break
31920 }
31921 t := v_0.Type
31922 c := auxIntToInt16(v_0.AuxInt)
31923 if v_1.Op != OpAdd16 {
31924 break
31925 }
31926 _ = v_1.Args[1]
31927 v_1_0 := v_1.Args[0]
31928 v_1_1 := v_1.Args[1]
31929 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
31930 if v_1_0.Op != OpConst16 || v_1_0.Type != t {
31931 continue
31932 }
31933 d := auxIntToInt16(v_1_0.AuxInt)
31934 x := v_1_1
31935 v.reset(OpSub16)
31936 v0 := b.NewValue0(v.Pos, OpConst16, t)
31937 v0.AuxInt = int16ToAuxInt(c - d)
31938 v.AddArg2(v0, x)
31939 return true
31940 }
31941 break
31942 }
31943 return false
31944 }
31945 func rewriteValuegeneric_OpSub32(v *Value) bool {
31946 v_1 := v.Args[1]
31947 v_0 := v.Args[0]
31948 b := v.Block
31949
31950
31951 for {
31952 if v_0.Op != OpConst32 {
31953 break
31954 }
31955 c := auxIntToInt32(v_0.AuxInt)
31956 if v_1.Op != OpConst32 {
31957 break
31958 }
31959 d := auxIntToInt32(v_1.AuxInt)
31960 v.reset(OpConst32)
31961 v.AuxInt = int32ToAuxInt(c - d)
31962 return true
31963 }
31964
31965
31966
31967 for {
31968 x := v_0
31969 if v_1.Op != OpConst32 {
31970 break
31971 }
31972 t := v_1.Type
31973 c := auxIntToInt32(v_1.AuxInt)
31974 if !(x.Op != OpConst32) {
31975 break
31976 }
31977 v.reset(OpAdd32)
31978 v0 := b.NewValue0(v.Pos, OpConst32, t)
31979 v0.AuxInt = int32ToAuxInt(-c)
31980 v.AddArg2(v0, x)
31981 return true
31982 }
31983
31984
31985 for {
31986 t := v.Type
31987 if v_0.Op != OpMul32 {
31988 break
31989 }
31990 _ = v_0.Args[1]
31991 v_0_0 := v_0.Args[0]
31992 v_0_1 := v_0.Args[1]
31993 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
31994 x := v_0_0
31995 y := v_0_1
31996 if v_1.Op != OpMul32 {
31997 continue
31998 }
31999 _ = v_1.Args[1]
32000 v_1_0 := v_1.Args[0]
32001 v_1_1 := v_1.Args[1]
32002 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
32003 if x != v_1_0 {
32004 continue
32005 }
32006 z := v_1_1
32007 v.reset(OpMul32)
32008 v0 := b.NewValue0(v.Pos, OpSub32, t)
32009 v0.AddArg2(y, z)
32010 v.AddArg2(x, v0)
32011 return true
32012 }
32013 }
32014 break
32015 }
32016
32017
32018 for {
32019 x := v_0
32020 if x != v_1 {
32021 break
32022 }
32023 v.reset(OpConst32)
32024 v.AuxInt = int32ToAuxInt(0)
32025 return true
32026 }
32027
32028
32029 for {
32030 if v_0.Op != OpNeg32 {
32031 break
32032 }
32033 x := v_0.Args[0]
32034 if v_1.Op != OpCom32 || x != v_1.Args[0] {
32035 break
32036 }
32037 v.reset(OpConst32)
32038 v.AuxInt = int32ToAuxInt(1)
32039 return true
32040 }
32041
32042
32043 for {
32044 if v_0.Op != OpCom32 {
32045 break
32046 }
32047 x := v_0.Args[0]
32048 if v_1.Op != OpNeg32 || x != v_1.Args[0] {
32049 break
32050 }
32051 v.reset(OpConst32)
32052 v.AuxInt = int32ToAuxInt(-1)
32053 return true
32054 }
32055
32056
32057 for {
32058 if v_0.Op != OpAdd32 {
32059 break
32060 }
32061 _ = v_0.Args[1]
32062 v_0_0 := v_0.Args[0]
32063 v_0_1 := v_0.Args[1]
32064 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
32065 t := v_0_0
32066 x := v_0_1
32067 if v_1.Op != OpAdd32 {
32068 continue
32069 }
32070 _ = v_1.Args[1]
32071 v_1_0 := v_1.Args[0]
32072 v_1_1 := v_1.Args[1]
32073 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
32074 if t != v_1_0 {
32075 continue
32076 }
32077 y := v_1_1
32078 v.reset(OpSub32)
32079 v.AddArg2(x, y)
32080 return true
32081 }
32082 }
32083 break
32084 }
32085
32086
32087 for {
32088 if v_0.Op != OpAdd32 {
32089 break
32090 }
32091 _ = v_0.Args[1]
32092 v_0_0 := v_0.Args[0]
32093 v_0_1 := v_0.Args[1]
32094 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
32095 x := v_0_0
32096 y := v_0_1
32097 if x != v_1 {
32098 continue
32099 }
32100 v.copyOf(y)
32101 return true
32102 }
32103 break
32104 }
32105
32106
32107 for {
32108 if v_0.Op != OpAdd32 {
32109 break
32110 }
32111 _ = v_0.Args[1]
32112 v_0_0 := v_0.Args[0]
32113 v_0_1 := v_0.Args[1]
32114 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
32115 x := v_0_0
32116 y := v_0_1
32117 if y != v_1 {
32118 continue
32119 }
32120 v.copyOf(x)
32121 return true
32122 }
32123 break
32124 }
32125
32126
32127 for {
32128 if v_0.Op != OpSub32 {
32129 break
32130 }
32131 y := v_0.Args[1]
32132 x := v_0.Args[0]
32133 if x != v_1 {
32134 break
32135 }
32136 v.reset(OpNeg32)
32137 v.AddArg(y)
32138 return true
32139 }
32140
32141
32142 for {
32143 x := v_0
32144 if v_1.Op != OpAdd32 {
32145 break
32146 }
32147 _ = v_1.Args[1]
32148 v_1_0 := v_1.Args[0]
32149 v_1_1 := v_1.Args[1]
32150 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
32151 if x != v_1_0 {
32152 continue
32153 }
32154 y := v_1_1
32155 v.reset(OpNeg32)
32156 v.AddArg(y)
32157 return true
32158 }
32159 break
32160 }
32161
32162
32163
32164 for {
32165 x := v_0
32166 if v_1.Op != OpSub32 {
32167 break
32168 }
32169 z := v_1.Args[1]
32170 i := v_1.Args[0]
32171 if i.Op != OpConst32 {
32172 break
32173 }
32174 t := i.Type
32175 if !(z.Op != OpConst32 && x.Op != OpConst32) {
32176 break
32177 }
32178 v.reset(OpSub32)
32179 v0 := b.NewValue0(v.Pos, OpAdd32, t)
32180 v0.AddArg2(x, z)
32181 v.AddArg2(v0, i)
32182 return true
32183 }
32184
32185
32186
32187 for {
32188 x := v_0
32189 if v_1.Op != OpAdd32 {
32190 break
32191 }
32192 _ = v_1.Args[1]
32193 v_1_0 := v_1.Args[0]
32194 v_1_1 := v_1.Args[1]
32195 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
32196 z := v_1_0
32197 i := v_1_1
32198 if i.Op != OpConst32 {
32199 continue
32200 }
32201 t := i.Type
32202 if !(z.Op != OpConst32 && x.Op != OpConst32) {
32203 continue
32204 }
32205 v.reset(OpSub32)
32206 v0 := b.NewValue0(v.Pos, OpSub32, t)
32207 v0.AddArg2(x, z)
32208 v.AddArg2(v0, i)
32209 return true
32210 }
32211 break
32212 }
32213
32214
32215
32216 for {
32217 if v_0.Op != OpSub32 {
32218 break
32219 }
32220 z := v_0.Args[1]
32221 i := v_0.Args[0]
32222 if i.Op != OpConst32 {
32223 break
32224 }
32225 t := i.Type
32226 x := v_1
32227 if !(z.Op != OpConst32 && x.Op != OpConst32) {
32228 break
32229 }
32230 v.reset(OpSub32)
32231 v0 := b.NewValue0(v.Pos, OpAdd32, t)
32232 v0.AddArg2(z, x)
32233 v.AddArg2(i, v0)
32234 return true
32235 }
32236
32237
32238
32239 for {
32240 if v_0.Op != OpAdd32 {
32241 break
32242 }
32243 _ = v_0.Args[1]
32244 v_0_0 := v_0.Args[0]
32245 v_0_1 := v_0.Args[1]
32246 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
32247 z := v_0_0
32248 i := v_0_1
32249 if i.Op != OpConst32 {
32250 continue
32251 }
32252 t := i.Type
32253 x := v_1
32254 if !(z.Op != OpConst32 && x.Op != OpConst32) {
32255 continue
32256 }
32257 v.reset(OpAdd32)
32258 v0 := b.NewValue0(v.Pos, OpSub32, t)
32259 v0.AddArg2(z, x)
32260 v.AddArg2(i, v0)
32261 return true
32262 }
32263 break
32264 }
32265
32266
32267 for {
32268 if v_0.Op != OpConst32 {
32269 break
32270 }
32271 t := v_0.Type
32272 c := auxIntToInt32(v_0.AuxInt)
32273 if v_1.Op != OpSub32 {
32274 break
32275 }
32276 x := v_1.Args[1]
32277 v_1_0 := v_1.Args[0]
32278 if v_1_0.Op != OpConst32 || v_1_0.Type != t {
32279 break
32280 }
32281 d := auxIntToInt32(v_1_0.AuxInt)
32282 v.reset(OpAdd32)
32283 v0 := b.NewValue0(v.Pos, OpConst32, t)
32284 v0.AuxInt = int32ToAuxInt(c - d)
32285 v.AddArg2(v0, x)
32286 return true
32287 }
32288
32289
32290 for {
32291 if v_0.Op != OpConst32 {
32292 break
32293 }
32294 t := v_0.Type
32295 c := auxIntToInt32(v_0.AuxInt)
32296 if v_1.Op != OpAdd32 {
32297 break
32298 }
32299 _ = v_1.Args[1]
32300 v_1_0 := v_1.Args[0]
32301 v_1_1 := v_1.Args[1]
32302 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
32303 if v_1_0.Op != OpConst32 || v_1_0.Type != t {
32304 continue
32305 }
32306 d := auxIntToInt32(v_1_0.AuxInt)
32307 x := v_1_1
32308 v.reset(OpSub32)
32309 v0 := b.NewValue0(v.Pos, OpConst32, t)
32310 v0.AuxInt = int32ToAuxInt(c - d)
32311 v.AddArg2(v0, x)
32312 return true
32313 }
32314 break
32315 }
32316 return false
32317 }
32318 func rewriteValuegeneric_OpSub32F(v *Value) bool {
32319 v_1 := v.Args[1]
32320 v_0 := v.Args[0]
32321
32322
32323
32324 for {
32325 if v_0.Op != OpConst32F {
32326 break
32327 }
32328 c := auxIntToFloat32(v_0.AuxInt)
32329 if v_1.Op != OpConst32F {
32330 break
32331 }
32332 d := auxIntToFloat32(v_1.AuxInt)
32333 if !(c-d == c-d) {
32334 break
32335 }
32336 v.reset(OpConst32F)
32337 v.AuxInt = float32ToAuxInt(c - d)
32338 return true
32339 }
32340 return false
32341 }
32342 func rewriteValuegeneric_OpSub64(v *Value) bool {
32343 v_1 := v.Args[1]
32344 v_0 := v.Args[0]
32345 b := v.Block
32346
32347
32348 for {
32349 if v_0.Op != OpConst64 {
32350 break
32351 }
32352 c := auxIntToInt64(v_0.AuxInt)
32353 if v_1.Op != OpConst64 {
32354 break
32355 }
32356 d := auxIntToInt64(v_1.AuxInt)
32357 v.reset(OpConst64)
32358 v.AuxInt = int64ToAuxInt(c - d)
32359 return true
32360 }
32361
32362
32363
32364 for {
32365 x := v_0
32366 if v_1.Op != OpConst64 {
32367 break
32368 }
32369 t := v_1.Type
32370 c := auxIntToInt64(v_1.AuxInt)
32371 if !(x.Op != OpConst64) {
32372 break
32373 }
32374 v.reset(OpAdd64)
32375 v0 := b.NewValue0(v.Pos, OpConst64, t)
32376 v0.AuxInt = int64ToAuxInt(-c)
32377 v.AddArg2(v0, x)
32378 return true
32379 }
32380
32381
32382 for {
32383 t := v.Type
32384 if v_0.Op != OpMul64 {
32385 break
32386 }
32387 _ = v_0.Args[1]
32388 v_0_0 := v_0.Args[0]
32389 v_0_1 := v_0.Args[1]
32390 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
32391 x := v_0_0
32392 y := v_0_1
32393 if v_1.Op != OpMul64 {
32394 continue
32395 }
32396 _ = v_1.Args[1]
32397 v_1_0 := v_1.Args[0]
32398 v_1_1 := v_1.Args[1]
32399 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
32400 if x != v_1_0 {
32401 continue
32402 }
32403 z := v_1_1
32404 v.reset(OpMul64)
32405 v0 := b.NewValue0(v.Pos, OpSub64, t)
32406 v0.AddArg2(y, z)
32407 v.AddArg2(x, v0)
32408 return true
32409 }
32410 }
32411 break
32412 }
32413
32414
32415 for {
32416 x := v_0
32417 if x != v_1 {
32418 break
32419 }
32420 v.reset(OpConst64)
32421 v.AuxInt = int64ToAuxInt(0)
32422 return true
32423 }
32424
32425
32426 for {
32427 if v_0.Op != OpNeg64 {
32428 break
32429 }
32430 x := v_0.Args[0]
32431 if v_1.Op != OpCom64 || x != v_1.Args[0] {
32432 break
32433 }
32434 v.reset(OpConst64)
32435 v.AuxInt = int64ToAuxInt(1)
32436 return true
32437 }
32438
32439
32440 for {
32441 if v_0.Op != OpCom64 {
32442 break
32443 }
32444 x := v_0.Args[0]
32445 if v_1.Op != OpNeg64 || x != v_1.Args[0] {
32446 break
32447 }
32448 v.reset(OpConst64)
32449 v.AuxInt = int64ToAuxInt(-1)
32450 return true
32451 }
32452
32453
32454 for {
32455 if v_0.Op != OpAdd64 {
32456 break
32457 }
32458 _ = v_0.Args[1]
32459 v_0_0 := v_0.Args[0]
32460 v_0_1 := v_0.Args[1]
32461 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
32462 t := v_0_0
32463 x := v_0_1
32464 if v_1.Op != OpAdd64 {
32465 continue
32466 }
32467 _ = v_1.Args[1]
32468 v_1_0 := v_1.Args[0]
32469 v_1_1 := v_1.Args[1]
32470 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
32471 if t != v_1_0 {
32472 continue
32473 }
32474 y := v_1_1
32475 v.reset(OpSub64)
32476 v.AddArg2(x, y)
32477 return true
32478 }
32479 }
32480 break
32481 }
32482
32483
32484 for {
32485 if v_0.Op != OpAdd64 {
32486 break
32487 }
32488 _ = v_0.Args[1]
32489 v_0_0 := v_0.Args[0]
32490 v_0_1 := v_0.Args[1]
32491 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
32492 x := v_0_0
32493 y := v_0_1
32494 if x != v_1 {
32495 continue
32496 }
32497 v.copyOf(y)
32498 return true
32499 }
32500 break
32501 }
32502
32503
32504 for {
32505 if v_0.Op != OpAdd64 {
32506 break
32507 }
32508 _ = v_0.Args[1]
32509 v_0_0 := v_0.Args[0]
32510 v_0_1 := v_0.Args[1]
32511 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
32512 x := v_0_0
32513 y := v_0_1
32514 if y != v_1 {
32515 continue
32516 }
32517 v.copyOf(x)
32518 return true
32519 }
32520 break
32521 }
32522
32523
32524 for {
32525 if v_0.Op != OpSub64 {
32526 break
32527 }
32528 y := v_0.Args[1]
32529 x := v_0.Args[0]
32530 if x != v_1 {
32531 break
32532 }
32533 v.reset(OpNeg64)
32534 v.AddArg(y)
32535 return true
32536 }
32537
32538
32539 for {
32540 x := v_0
32541 if v_1.Op != OpAdd64 {
32542 break
32543 }
32544 _ = v_1.Args[1]
32545 v_1_0 := v_1.Args[0]
32546 v_1_1 := v_1.Args[1]
32547 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
32548 if x != v_1_0 {
32549 continue
32550 }
32551 y := v_1_1
32552 v.reset(OpNeg64)
32553 v.AddArg(y)
32554 return true
32555 }
32556 break
32557 }
32558
32559
32560
32561 for {
32562 x := v_0
32563 if v_1.Op != OpSub64 {
32564 break
32565 }
32566 z := v_1.Args[1]
32567 i := v_1.Args[0]
32568 if i.Op != OpConst64 {
32569 break
32570 }
32571 t := i.Type
32572 if !(z.Op != OpConst64 && x.Op != OpConst64) {
32573 break
32574 }
32575 v.reset(OpSub64)
32576 v0 := b.NewValue0(v.Pos, OpAdd64, t)
32577 v0.AddArg2(x, z)
32578 v.AddArg2(v0, i)
32579 return true
32580 }
32581
32582
32583
32584 for {
32585 x := v_0
32586 if v_1.Op != OpAdd64 {
32587 break
32588 }
32589 _ = v_1.Args[1]
32590 v_1_0 := v_1.Args[0]
32591 v_1_1 := v_1.Args[1]
32592 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
32593 z := v_1_0
32594 i := v_1_1
32595 if i.Op != OpConst64 {
32596 continue
32597 }
32598 t := i.Type
32599 if !(z.Op != OpConst64 && x.Op != OpConst64) {
32600 continue
32601 }
32602 v.reset(OpSub64)
32603 v0 := b.NewValue0(v.Pos, OpSub64, t)
32604 v0.AddArg2(x, z)
32605 v.AddArg2(v0, i)
32606 return true
32607 }
32608 break
32609 }
32610
32611
32612
32613 for {
32614 if v_0.Op != OpSub64 {
32615 break
32616 }
32617 z := v_0.Args[1]
32618 i := v_0.Args[0]
32619 if i.Op != OpConst64 {
32620 break
32621 }
32622 t := i.Type
32623 x := v_1
32624 if !(z.Op != OpConst64 && x.Op != OpConst64) {
32625 break
32626 }
32627 v.reset(OpSub64)
32628 v0 := b.NewValue0(v.Pos, OpAdd64, t)
32629 v0.AddArg2(z, x)
32630 v.AddArg2(i, v0)
32631 return true
32632 }
32633
32634
32635
32636 for {
32637 if v_0.Op != OpAdd64 {
32638 break
32639 }
32640 _ = v_0.Args[1]
32641 v_0_0 := v_0.Args[0]
32642 v_0_1 := v_0.Args[1]
32643 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
32644 z := v_0_0
32645 i := v_0_1
32646 if i.Op != OpConst64 {
32647 continue
32648 }
32649 t := i.Type
32650 x := v_1
32651 if !(z.Op != OpConst64 && x.Op != OpConst64) {
32652 continue
32653 }
32654 v.reset(OpAdd64)
32655 v0 := b.NewValue0(v.Pos, OpSub64, t)
32656 v0.AddArg2(z, x)
32657 v.AddArg2(i, v0)
32658 return true
32659 }
32660 break
32661 }
32662
32663
32664 for {
32665 if v_0.Op != OpConst64 {
32666 break
32667 }
32668 t := v_0.Type
32669 c := auxIntToInt64(v_0.AuxInt)
32670 if v_1.Op != OpSub64 {
32671 break
32672 }
32673 x := v_1.Args[1]
32674 v_1_0 := v_1.Args[0]
32675 if v_1_0.Op != OpConst64 || v_1_0.Type != t {
32676 break
32677 }
32678 d := auxIntToInt64(v_1_0.AuxInt)
32679 v.reset(OpAdd64)
32680 v0 := b.NewValue0(v.Pos, OpConst64, t)
32681 v0.AuxInt = int64ToAuxInt(c - d)
32682 v.AddArg2(v0, x)
32683 return true
32684 }
32685
32686
32687 for {
32688 if v_0.Op != OpConst64 {
32689 break
32690 }
32691 t := v_0.Type
32692 c := auxIntToInt64(v_0.AuxInt)
32693 if v_1.Op != OpAdd64 {
32694 break
32695 }
32696 _ = v_1.Args[1]
32697 v_1_0 := v_1.Args[0]
32698 v_1_1 := v_1.Args[1]
32699 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
32700 if v_1_0.Op != OpConst64 || v_1_0.Type != t {
32701 continue
32702 }
32703 d := auxIntToInt64(v_1_0.AuxInt)
32704 x := v_1_1
32705 v.reset(OpSub64)
32706 v0 := b.NewValue0(v.Pos, OpConst64, t)
32707 v0.AuxInt = int64ToAuxInt(c - d)
32708 v.AddArg2(v0, x)
32709 return true
32710 }
32711 break
32712 }
32713 return false
32714 }
32715 func rewriteValuegeneric_OpSub64F(v *Value) bool {
32716 v_1 := v.Args[1]
32717 v_0 := v.Args[0]
32718
32719
32720
32721 for {
32722 if v_0.Op != OpConst64F {
32723 break
32724 }
32725 c := auxIntToFloat64(v_0.AuxInt)
32726 if v_1.Op != OpConst64F {
32727 break
32728 }
32729 d := auxIntToFloat64(v_1.AuxInt)
32730 if !(c-d == c-d) {
32731 break
32732 }
32733 v.reset(OpConst64F)
32734 v.AuxInt = float64ToAuxInt(c - d)
32735 return true
32736 }
32737 return false
32738 }
32739 func rewriteValuegeneric_OpSub8(v *Value) bool {
32740 v_1 := v.Args[1]
32741 v_0 := v.Args[0]
32742 b := v.Block
32743
32744
32745 for {
32746 if v_0.Op != OpConst8 {
32747 break
32748 }
32749 c := auxIntToInt8(v_0.AuxInt)
32750 if v_1.Op != OpConst8 {
32751 break
32752 }
32753 d := auxIntToInt8(v_1.AuxInt)
32754 v.reset(OpConst8)
32755 v.AuxInt = int8ToAuxInt(c - d)
32756 return true
32757 }
32758
32759
32760
32761 for {
32762 x := v_0
32763 if v_1.Op != OpConst8 {
32764 break
32765 }
32766 t := v_1.Type
32767 c := auxIntToInt8(v_1.AuxInt)
32768 if !(x.Op != OpConst8) {
32769 break
32770 }
32771 v.reset(OpAdd8)
32772 v0 := b.NewValue0(v.Pos, OpConst8, t)
32773 v0.AuxInt = int8ToAuxInt(-c)
32774 v.AddArg2(v0, x)
32775 return true
32776 }
32777
32778
32779 for {
32780 t := v.Type
32781 if v_0.Op != OpMul8 {
32782 break
32783 }
32784 _ = v_0.Args[1]
32785 v_0_0 := v_0.Args[0]
32786 v_0_1 := v_0.Args[1]
32787 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
32788 x := v_0_0
32789 y := v_0_1
32790 if v_1.Op != OpMul8 {
32791 continue
32792 }
32793 _ = v_1.Args[1]
32794 v_1_0 := v_1.Args[0]
32795 v_1_1 := v_1.Args[1]
32796 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
32797 if x != v_1_0 {
32798 continue
32799 }
32800 z := v_1_1
32801 v.reset(OpMul8)
32802 v0 := b.NewValue0(v.Pos, OpSub8, t)
32803 v0.AddArg2(y, z)
32804 v.AddArg2(x, v0)
32805 return true
32806 }
32807 }
32808 break
32809 }
32810
32811
32812 for {
32813 x := v_0
32814 if x != v_1 {
32815 break
32816 }
32817 v.reset(OpConst8)
32818 v.AuxInt = int8ToAuxInt(0)
32819 return true
32820 }
32821
32822
32823 for {
32824 if v_0.Op != OpNeg8 {
32825 break
32826 }
32827 x := v_0.Args[0]
32828 if v_1.Op != OpCom8 || x != v_1.Args[0] {
32829 break
32830 }
32831 v.reset(OpConst8)
32832 v.AuxInt = int8ToAuxInt(1)
32833 return true
32834 }
32835
32836
32837 for {
32838 if v_0.Op != OpCom8 {
32839 break
32840 }
32841 x := v_0.Args[0]
32842 if v_1.Op != OpNeg8 || x != v_1.Args[0] {
32843 break
32844 }
32845 v.reset(OpConst8)
32846 v.AuxInt = int8ToAuxInt(-1)
32847 return true
32848 }
32849
32850
32851 for {
32852 if v_0.Op != OpAdd8 {
32853 break
32854 }
32855 _ = v_0.Args[1]
32856 v_0_0 := v_0.Args[0]
32857 v_0_1 := v_0.Args[1]
32858 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
32859 t := v_0_0
32860 x := v_0_1
32861 if v_1.Op != OpAdd8 {
32862 continue
32863 }
32864 _ = v_1.Args[1]
32865 v_1_0 := v_1.Args[0]
32866 v_1_1 := v_1.Args[1]
32867 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
32868 if t != v_1_0 {
32869 continue
32870 }
32871 y := v_1_1
32872 v.reset(OpSub8)
32873 v.AddArg2(x, y)
32874 return true
32875 }
32876 }
32877 break
32878 }
32879
32880
32881 for {
32882 if v_0.Op != OpAdd8 {
32883 break
32884 }
32885 _ = v_0.Args[1]
32886 v_0_0 := v_0.Args[0]
32887 v_0_1 := v_0.Args[1]
32888 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
32889 x := v_0_0
32890 y := v_0_1
32891 if x != v_1 {
32892 continue
32893 }
32894 v.copyOf(y)
32895 return true
32896 }
32897 break
32898 }
32899
32900
32901 for {
32902 if v_0.Op != OpAdd8 {
32903 break
32904 }
32905 _ = v_0.Args[1]
32906 v_0_0 := v_0.Args[0]
32907 v_0_1 := v_0.Args[1]
32908 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
32909 x := v_0_0
32910 y := v_0_1
32911 if y != v_1 {
32912 continue
32913 }
32914 v.copyOf(x)
32915 return true
32916 }
32917 break
32918 }
32919
32920
32921 for {
32922 if v_0.Op != OpSub8 {
32923 break
32924 }
32925 y := v_0.Args[1]
32926 x := v_0.Args[0]
32927 if x != v_1 {
32928 break
32929 }
32930 v.reset(OpNeg8)
32931 v.AddArg(y)
32932 return true
32933 }
32934
32935
32936 for {
32937 x := v_0
32938 if v_1.Op != OpAdd8 {
32939 break
32940 }
32941 _ = v_1.Args[1]
32942 v_1_0 := v_1.Args[0]
32943 v_1_1 := v_1.Args[1]
32944 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
32945 if x != v_1_0 {
32946 continue
32947 }
32948 y := v_1_1
32949 v.reset(OpNeg8)
32950 v.AddArg(y)
32951 return true
32952 }
32953 break
32954 }
32955
32956
32957
32958 for {
32959 x := v_0
32960 if v_1.Op != OpSub8 {
32961 break
32962 }
32963 z := v_1.Args[1]
32964 i := v_1.Args[0]
32965 if i.Op != OpConst8 {
32966 break
32967 }
32968 t := i.Type
32969 if !(z.Op != OpConst8 && x.Op != OpConst8) {
32970 break
32971 }
32972 v.reset(OpSub8)
32973 v0 := b.NewValue0(v.Pos, OpAdd8, t)
32974 v0.AddArg2(x, z)
32975 v.AddArg2(v0, i)
32976 return true
32977 }
32978
32979
32980
32981 for {
32982 x := v_0
32983 if v_1.Op != OpAdd8 {
32984 break
32985 }
32986 _ = v_1.Args[1]
32987 v_1_0 := v_1.Args[0]
32988 v_1_1 := v_1.Args[1]
32989 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
32990 z := v_1_0
32991 i := v_1_1
32992 if i.Op != OpConst8 {
32993 continue
32994 }
32995 t := i.Type
32996 if !(z.Op != OpConst8 && x.Op != OpConst8) {
32997 continue
32998 }
32999 v.reset(OpSub8)
33000 v0 := b.NewValue0(v.Pos, OpSub8, t)
33001 v0.AddArg2(x, z)
33002 v.AddArg2(v0, i)
33003 return true
33004 }
33005 break
33006 }
33007
33008
33009
33010 for {
33011 if v_0.Op != OpSub8 {
33012 break
33013 }
33014 z := v_0.Args[1]
33015 i := v_0.Args[0]
33016 if i.Op != OpConst8 {
33017 break
33018 }
33019 t := i.Type
33020 x := v_1
33021 if !(z.Op != OpConst8 && x.Op != OpConst8) {
33022 break
33023 }
33024 v.reset(OpSub8)
33025 v0 := b.NewValue0(v.Pos, OpAdd8, t)
33026 v0.AddArg2(z, x)
33027 v.AddArg2(i, v0)
33028 return true
33029 }
33030
33031
33032
33033 for {
33034 if v_0.Op != OpAdd8 {
33035 break
33036 }
33037 _ = v_0.Args[1]
33038 v_0_0 := v_0.Args[0]
33039 v_0_1 := v_0.Args[1]
33040 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
33041 z := v_0_0
33042 i := v_0_1
33043 if i.Op != OpConst8 {
33044 continue
33045 }
33046 t := i.Type
33047 x := v_1
33048 if !(z.Op != OpConst8 && x.Op != OpConst8) {
33049 continue
33050 }
33051 v.reset(OpAdd8)
33052 v0 := b.NewValue0(v.Pos, OpSub8, t)
33053 v0.AddArg2(z, x)
33054 v.AddArg2(i, v0)
33055 return true
33056 }
33057 break
33058 }
33059
33060
33061 for {
33062 if v_0.Op != OpConst8 {
33063 break
33064 }
33065 t := v_0.Type
33066 c := auxIntToInt8(v_0.AuxInt)
33067 if v_1.Op != OpSub8 {
33068 break
33069 }
33070 x := v_1.Args[1]
33071 v_1_0 := v_1.Args[0]
33072 if v_1_0.Op != OpConst8 || v_1_0.Type != t {
33073 break
33074 }
33075 d := auxIntToInt8(v_1_0.AuxInt)
33076 v.reset(OpAdd8)
33077 v0 := b.NewValue0(v.Pos, OpConst8, t)
33078 v0.AuxInt = int8ToAuxInt(c - d)
33079 v.AddArg2(v0, x)
33080 return true
33081 }
33082
33083
33084 for {
33085 if v_0.Op != OpConst8 {
33086 break
33087 }
33088 t := v_0.Type
33089 c := auxIntToInt8(v_0.AuxInt)
33090 if v_1.Op != OpAdd8 {
33091 break
33092 }
33093 _ = v_1.Args[1]
33094 v_1_0 := v_1.Args[0]
33095 v_1_1 := v_1.Args[1]
33096 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
33097 if v_1_0.Op != OpConst8 || v_1_0.Type != t {
33098 continue
33099 }
33100 d := auxIntToInt8(v_1_0.AuxInt)
33101 x := v_1_1
33102 v.reset(OpSub8)
33103 v0 := b.NewValue0(v.Pos, OpConst8, t)
33104 v0.AuxInt = int8ToAuxInt(c - d)
33105 v.AddArg2(v0, x)
33106 return true
33107 }
33108 break
33109 }
33110 return false
33111 }
33112 func rewriteValuegeneric_OpTrunc(v *Value) bool {
33113 v_0 := v.Args[0]
33114
33115
33116 for {
33117 if v_0.Op != OpConst64F {
33118 break
33119 }
33120 c := auxIntToFloat64(v_0.AuxInt)
33121 v.reset(OpConst64F)
33122 v.AuxInt = float64ToAuxInt(math.Trunc(c))
33123 return true
33124 }
33125 return false
33126 }
33127 func rewriteValuegeneric_OpTrunc16to8(v *Value) bool {
33128 v_0 := v.Args[0]
33129
33130
33131 for {
33132 if v_0.Op != OpConst16 {
33133 break
33134 }
33135 c := auxIntToInt16(v_0.AuxInt)
33136 v.reset(OpConst8)
33137 v.AuxInt = int8ToAuxInt(int8(c))
33138 return true
33139 }
33140
33141
33142 for {
33143 if v_0.Op != OpZeroExt8to16 {
33144 break
33145 }
33146 x := v_0.Args[0]
33147 v.copyOf(x)
33148 return true
33149 }
33150
33151
33152 for {
33153 if v_0.Op != OpSignExt8to16 {
33154 break
33155 }
33156 x := v_0.Args[0]
33157 v.copyOf(x)
33158 return true
33159 }
33160
33161
33162
33163 for {
33164 if v_0.Op != OpAnd16 {
33165 break
33166 }
33167 _ = v_0.Args[1]
33168 v_0_0 := v_0.Args[0]
33169 v_0_1 := v_0.Args[1]
33170 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
33171 if v_0_0.Op != OpConst16 {
33172 continue
33173 }
33174 y := auxIntToInt16(v_0_0.AuxInt)
33175 x := v_0_1
33176 if !(y&0xFF == 0xFF) {
33177 continue
33178 }
33179 v.reset(OpTrunc16to8)
33180 v.AddArg(x)
33181 return true
33182 }
33183 break
33184 }
33185 return false
33186 }
33187 func rewriteValuegeneric_OpTrunc32to16(v *Value) bool {
33188 v_0 := v.Args[0]
33189
33190
33191 for {
33192 if v_0.Op != OpConst32 {
33193 break
33194 }
33195 c := auxIntToInt32(v_0.AuxInt)
33196 v.reset(OpConst16)
33197 v.AuxInt = int16ToAuxInt(int16(c))
33198 return true
33199 }
33200
33201
33202 for {
33203 if v_0.Op != OpZeroExt8to32 {
33204 break
33205 }
33206 x := v_0.Args[0]
33207 v.reset(OpZeroExt8to16)
33208 v.AddArg(x)
33209 return true
33210 }
33211
33212
33213 for {
33214 if v_0.Op != OpZeroExt16to32 {
33215 break
33216 }
33217 x := v_0.Args[0]
33218 v.copyOf(x)
33219 return true
33220 }
33221
33222
33223 for {
33224 if v_0.Op != OpSignExt8to32 {
33225 break
33226 }
33227 x := v_0.Args[0]
33228 v.reset(OpSignExt8to16)
33229 v.AddArg(x)
33230 return true
33231 }
33232
33233
33234 for {
33235 if v_0.Op != OpSignExt16to32 {
33236 break
33237 }
33238 x := v_0.Args[0]
33239 v.copyOf(x)
33240 return true
33241 }
33242
33243
33244
33245 for {
33246 if v_0.Op != OpAnd32 {
33247 break
33248 }
33249 _ = v_0.Args[1]
33250 v_0_0 := v_0.Args[0]
33251 v_0_1 := v_0.Args[1]
33252 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
33253 if v_0_0.Op != OpConst32 {
33254 continue
33255 }
33256 y := auxIntToInt32(v_0_0.AuxInt)
33257 x := v_0_1
33258 if !(y&0xFFFF == 0xFFFF) {
33259 continue
33260 }
33261 v.reset(OpTrunc32to16)
33262 v.AddArg(x)
33263 return true
33264 }
33265 break
33266 }
33267 return false
33268 }
33269 func rewriteValuegeneric_OpTrunc32to8(v *Value) bool {
33270 v_0 := v.Args[0]
33271
33272
33273 for {
33274 if v_0.Op != OpConst32 {
33275 break
33276 }
33277 c := auxIntToInt32(v_0.AuxInt)
33278 v.reset(OpConst8)
33279 v.AuxInt = int8ToAuxInt(int8(c))
33280 return true
33281 }
33282
33283
33284 for {
33285 if v_0.Op != OpZeroExt8to32 {
33286 break
33287 }
33288 x := v_0.Args[0]
33289 v.copyOf(x)
33290 return true
33291 }
33292
33293
33294 for {
33295 if v_0.Op != OpSignExt8to32 {
33296 break
33297 }
33298 x := v_0.Args[0]
33299 v.copyOf(x)
33300 return true
33301 }
33302
33303
33304
33305 for {
33306 if v_0.Op != OpAnd32 {
33307 break
33308 }
33309 _ = v_0.Args[1]
33310 v_0_0 := v_0.Args[0]
33311 v_0_1 := v_0.Args[1]
33312 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
33313 if v_0_0.Op != OpConst32 {
33314 continue
33315 }
33316 y := auxIntToInt32(v_0_0.AuxInt)
33317 x := v_0_1
33318 if !(y&0xFF == 0xFF) {
33319 continue
33320 }
33321 v.reset(OpTrunc32to8)
33322 v.AddArg(x)
33323 return true
33324 }
33325 break
33326 }
33327 return false
33328 }
33329 func rewriteValuegeneric_OpTrunc64to16(v *Value) bool {
33330 v_0 := v.Args[0]
33331
33332
33333 for {
33334 if v_0.Op != OpConst64 {
33335 break
33336 }
33337 c := auxIntToInt64(v_0.AuxInt)
33338 v.reset(OpConst16)
33339 v.AuxInt = int16ToAuxInt(int16(c))
33340 return true
33341 }
33342
33343
33344 for {
33345 if v_0.Op != OpZeroExt8to64 {
33346 break
33347 }
33348 x := v_0.Args[0]
33349 v.reset(OpZeroExt8to16)
33350 v.AddArg(x)
33351 return true
33352 }
33353
33354
33355 for {
33356 if v_0.Op != OpZeroExt16to64 {
33357 break
33358 }
33359 x := v_0.Args[0]
33360 v.copyOf(x)
33361 return true
33362 }
33363
33364
33365 for {
33366 if v_0.Op != OpSignExt8to64 {
33367 break
33368 }
33369 x := v_0.Args[0]
33370 v.reset(OpSignExt8to16)
33371 v.AddArg(x)
33372 return true
33373 }
33374
33375
33376 for {
33377 if v_0.Op != OpSignExt16to64 {
33378 break
33379 }
33380 x := v_0.Args[0]
33381 v.copyOf(x)
33382 return true
33383 }
33384
33385
33386
33387 for {
33388 if v_0.Op != OpAnd64 {
33389 break
33390 }
33391 _ = v_0.Args[1]
33392 v_0_0 := v_0.Args[0]
33393 v_0_1 := v_0.Args[1]
33394 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
33395 if v_0_0.Op != OpConst64 {
33396 continue
33397 }
33398 y := auxIntToInt64(v_0_0.AuxInt)
33399 x := v_0_1
33400 if !(y&0xFFFF == 0xFFFF) {
33401 continue
33402 }
33403 v.reset(OpTrunc64to16)
33404 v.AddArg(x)
33405 return true
33406 }
33407 break
33408 }
33409 return false
33410 }
33411 func rewriteValuegeneric_OpTrunc64to32(v *Value) bool {
33412 v_0 := v.Args[0]
33413
33414
33415 for {
33416 if v_0.Op != OpConst64 {
33417 break
33418 }
33419 c := auxIntToInt64(v_0.AuxInt)
33420 v.reset(OpConst32)
33421 v.AuxInt = int32ToAuxInt(int32(c))
33422 return true
33423 }
33424
33425
33426 for {
33427 if v_0.Op != OpZeroExt8to64 {
33428 break
33429 }
33430 x := v_0.Args[0]
33431 v.reset(OpZeroExt8to32)
33432 v.AddArg(x)
33433 return true
33434 }
33435
33436
33437 for {
33438 if v_0.Op != OpZeroExt16to64 {
33439 break
33440 }
33441 x := v_0.Args[0]
33442 v.reset(OpZeroExt16to32)
33443 v.AddArg(x)
33444 return true
33445 }
33446
33447
33448 for {
33449 if v_0.Op != OpZeroExt32to64 {
33450 break
33451 }
33452 x := v_0.Args[0]
33453 v.copyOf(x)
33454 return true
33455 }
33456
33457
33458 for {
33459 if v_0.Op != OpSignExt8to64 {
33460 break
33461 }
33462 x := v_0.Args[0]
33463 v.reset(OpSignExt8to32)
33464 v.AddArg(x)
33465 return true
33466 }
33467
33468
33469 for {
33470 if v_0.Op != OpSignExt16to64 {
33471 break
33472 }
33473 x := v_0.Args[0]
33474 v.reset(OpSignExt16to32)
33475 v.AddArg(x)
33476 return true
33477 }
33478
33479
33480 for {
33481 if v_0.Op != OpSignExt32to64 {
33482 break
33483 }
33484 x := v_0.Args[0]
33485 v.copyOf(x)
33486 return true
33487 }
33488
33489
33490
33491 for {
33492 if v_0.Op != OpAnd64 {
33493 break
33494 }
33495 _ = v_0.Args[1]
33496 v_0_0 := v_0.Args[0]
33497 v_0_1 := v_0.Args[1]
33498 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
33499 if v_0_0.Op != OpConst64 {
33500 continue
33501 }
33502 y := auxIntToInt64(v_0_0.AuxInt)
33503 x := v_0_1
33504 if !(y&0xFFFFFFFF == 0xFFFFFFFF) {
33505 continue
33506 }
33507 v.reset(OpTrunc64to32)
33508 v.AddArg(x)
33509 return true
33510 }
33511 break
33512 }
33513 return false
33514 }
33515 func rewriteValuegeneric_OpTrunc64to8(v *Value) bool {
33516 v_0 := v.Args[0]
33517
33518
33519 for {
33520 if v_0.Op != OpConst64 {
33521 break
33522 }
33523 c := auxIntToInt64(v_0.AuxInt)
33524 v.reset(OpConst8)
33525 v.AuxInt = int8ToAuxInt(int8(c))
33526 return true
33527 }
33528
33529
33530 for {
33531 if v_0.Op != OpZeroExt8to64 {
33532 break
33533 }
33534 x := v_0.Args[0]
33535 v.copyOf(x)
33536 return true
33537 }
33538
33539
33540 for {
33541 if v_0.Op != OpSignExt8to64 {
33542 break
33543 }
33544 x := v_0.Args[0]
33545 v.copyOf(x)
33546 return true
33547 }
33548
33549
33550
33551 for {
33552 if v_0.Op != OpAnd64 {
33553 break
33554 }
33555 _ = v_0.Args[1]
33556 v_0_0 := v_0.Args[0]
33557 v_0_1 := v_0.Args[1]
33558 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
33559 if v_0_0.Op != OpConst64 {
33560 continue
33561 }
33562 y := auxIntToInt64(v_0_0.AuxInt)
33563 x := v_0_1
33564 if !(y&0xFF == 0xFF) {
33565 continue
33566 }
33567 v.reset(OpTrunc64to8)
33568 v.AddArg(x)
33569 return true
33570 }
33571 break
33572 }
33573 return false
33574 }
33575 func rewriteValuegeneric_OpXor16(v *Value) bool {
33576 v_1 := v.Args[1]
33577 v_0 := v.Args[0]
33578 b := v.Block
33579 config := b.Func.Config
33580
33581
33582 for {
33583 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
33584 if v_0.Op != OpConst16 {
33585 continue
33586 }
33587 c := auxIntToInt16(v_0.AuxInt)
33588 if v_1.Op != OpConst16 {
33589 continue
33590 }
33591 d := auxIntToInt16(v_1.AuxInt)
33592 v.reset(OpConst16)
33593 v.AuxInt = int16ToAuxInt(c ^ d)
33594 return true
33595 }
33596 break
33597 }
33598
33599
33600 for {
33601 x := v_0
33602 if x != v_1 {
33603 break
33604 }
33605 v.reset(OpConst16)
33606 v.AuxInt = int16ToAuxInt(0)
33607 return true
33608 }
33609
33610
33611 for {
33612 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
33613 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 {
33614 continue
33615 }
33616 x := v_1
33617 v.copyOf(x)
33618 return true
33619 }
33620 break
33621 }
33622
33623
33624 for {
33625 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
33626 if v_0.Op != OpCom16 {
33627 continue
33628 }
33629 x := v_0.Args[0]
33630 if x != v_1 {
33631 continue
33632 }
33633 v.reset(OpConst16)
33634 v.AuxInt = int16ToAuxInt(-1)
33635 return true
33636 }
33637 break
33638 }
33639
33640
33641 for {
33642 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
33643 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != -1 {
33644 continue
33645 }
33646 x := v_1
33647 v.reset(OpCom16)
33648 v.AddArg(x)
33649 return true
33650 }
33651 break
33652 }
33653
33654
33655 for {
33656 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
33657 x := v_0
33658 if v_1.Op != OpXor16 {
33659 continue
33660 }
33661 _ = v_1.Args[1]
33662 v_1_0 := v_1.Args[0]
33663 v_1_1 := v_1.Args[1]
33664 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
33665 if x != v_1_0 {
33666 continue
33667 }
33668 y := v_1_1
33669 v.copyOf(y)
33670 return true
33671 }
33672 }
33673 break
33674 }
33675
33676
33677
33678 for {
33679 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
33680 if v_0.Op != OpXor16 {
33681 continue
33682 }
33683 _ = v_0.Args[1]
33684 v_0_0 := v_0.Args[0]
33685 v_0_1 := v_0.Args[1]
33686 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
33687 i := v_0_0
33688 if i.Op != OpConst16 {
33689 continue
33690 }
33691 t := i.Type
33692 z := v_0_1
33693 x := v_1
33694 if !(z.Op != OpConst16 && x.Op != OpConst16) {
33695 continue
33696 }
33697 v.reset(OpXor16)
33698 v0 := b.NewValue0(v.Pos, OpXor16, t)
33699 v0.AddArg2(z, x)
33700 v.AddArg2(i, v0)
33701 return true
33702 }
33703 }
33704 break
33705 }
33706
33707
33708 for {
33709 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
33710 if v_0.Op != OpConst16 {
33711 continue
33712 }
33713 t := v_0.Type
33714 c := auxIntToInt16(v_0.AuxInt)
33715 if v_1.Op != OpXor16 {
33716 continue
33717 }
33718 _ = v_1.Args[1]
33719 v_1_0 := v_1.Args[0]
33720 v_1_1 := v_1.Args[1]
33721 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
33722 if v_1_0.Op != OpConst16 || v_1_0.Type != t {
33723 continue
33724 }
33725 d := auxIntToInt16(v_1_0.AuxInt)
33726 x := v_1_1
33727 v.reset(OpXor16)
33728 v0 := b.NewValue0(v.Pos, OpConst16, t)
33729 v0.AuxInt = int16ToAuxInt(c ^ d)
33730 v.AddArg2(v0, x)
33731 return true
33732 }
33733 }
33734 break
33735 }
33736
33737
33738
33739 for {
33740 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
33741 if v_0.Op != OpLsh16x64 {
33742 continue
33743 }
33744 _ = v_0.Args[1]
33745 x := v_0.Args[0]
33746 z := v_0.Args[1]
33747 if z.Op != OpConst64 {
33748 continue
33749 }
33750 c := auxIntToInt64(z.AuxInt)
33751 if v_1.Op != OpRsh16Ux64 {
33752 continue
33753 }
33754 _ = v_1.Args[1]
33755 if x != v_1.Args[0] {
33756 continue
33757 }
33758 v_1_1 := v_1.Args[1]
33759 if v_1_1.Op != OpConst64 {
33760 continue
33761 }
33762 d := auxIntToInt64(v_1_1.AuxInt)
33763 if !(c < 16 && d == 16-c && canRotate(config, 16)) {
33764 continue
33765 }
33766 v.reset(OpRotateLeft16)
33767 v.AddArg2(x, z)
33768 return true
33769 }
33770 break
33771 }
33772
33773
33774
33775 for {
33776 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
33777 left := v_0
33778 if left.Op != OpLsh16x64 {
33779 continue
33780 }
33781 y := left.Args[1]
33782 x := left.Args[0]
33783 right := v_1
33784 if right.Op != OpRsh16Ux64 {
33785 continue
33786 }
33787 _ = right.Args[1]
33788 if x != right.Args[0] {
33789 continue
33790 }
33791 right_1 := right.Args[1]
33792 if right_1.Op != OpSub64 {
33793 continue
33794 }
33795 _ = right_1.Args[1]
33796 right_1_0 := right_1.Args[0]
33797 if right_1_0.Op != OpConst64 || auxIntToInt64(right_1_0.AuxInt) != 16 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 16)) {
33798 continue
33799 }
33800 v.reset(OpRotateLeft16)
33801 v.AddArg2(x, y)
33802 return true
33803 }
33804 break
33805 }
33806
33807
33808
33809 for {
33810 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
33811 left := v_0
33812 if left.Op != OpLsh16x32 {
33813 continue
33814 }
33815 y := left.Args[1]
33816 x := left.Args[0]
33817 right := v_1
33818 if right.Op != OpRsh16Ux32 {
33819 continue
33820 }
33821 _ = right.Args[1]
33822 if x != right.Args[0] {
33823 continue
33824 }
33825 right_1 := right.Args[1]
33826 if right_1.Op != OpSub32 {
33827 continue
33828 }
33829 _ = right_1.Args[1]
33830 right_1_0 := right_1.Args[0]
33831 if right_1_0.Op != OpConst32 || auxIntToInt32(right_1_0.AuxInt) != 16 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 16)) {
33832 continue
33833 }
33834 v.reset(OpRotateLeft16)
33835 v.AddArg2(x, y)
33836 return true
33837 }
33838 break
33839 }
33840
33841
33842
33843 for {
33844 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
33845 left := v_0
33846 if left.Op != OpLsh16x16 {
33847 continue
33848 }
33849 y := left.Args[1]
33850 x := left.Args[0]
33851 right := v_1
33852 if right.Op != OpRsh16Ux16 {
33853 continue
33854 }
33855 _ = right.Args[1]
33856 if x != right.Args[0] {
33857 continue
33858 }
33859 right_1 := right.Args[1]
33860 if right_1.Op != OpSub16 {
33861 continue
33862 }
33863 _ = right_1.Args[1]
33864 right_1_0 := right_1.Args[0]
33865 if right_1_0.Op != OpConst16 || auxIntToInt16(right_1_0.AuxInt) != 16 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 16)) {
33866 continue
33867 }
33868 v.reset(OpRotateLeft16)
33869 v.AddArg2(x, y)
33870 return true
33871 }
33872 break
33873 }
33874
33875
33876
33877 for {
33878 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
33879 left := v_0
33880 if left.Op != OpLsh16x8 {
33881 continue
33882 }
33883 y := left.Args[1]
33884 x := left.Args[0]
33885 right := v_1
33886 if right.Op != OpRsh16Ux8 {
33887 continue
33888 }
33889 _ = right.Args[1]
33890 if x != right.Args[0] {
33891 continue
33892 }
33893 right_1 := right.Args[1]
33894 if right_1.Op != OpSub8 {
33895 continue
33896 }
33897 _ = right_1.Args[1]
33898 right_1_0 := right_1.Args[0]
33899 if right_1_0.Op != OpConst8 || auxIntToInt8(right_1_0.AuxInt) != 16 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 16)) {
33900 continue
33901 }
33902 v.reset(OpRotateLeft16)
33903 v.AddArg2(x, y)
33904 return true
33905 }
33906 break
33907 }
33908
33909
33910
33911 for {
33912 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
33913 right := v_0
33914 if right.Op != OpRsh16Ux64 {
33915 continue
33916 }
33917 y := right.Args[1]
33918 x := right.Args[0]
33919 left := v_1
33920 if left.Op != OpLsh16x64 {
33921 continue
33922 }
33923 _ = left.Args[1]
33924 if x != left.Args[0] {
33925 continue
33926 }
33927 z := left.Args[1]
33928 if z.Op != OpSub64 {
33929 continue
33930 }
33931 _ = z.Args[1]
33932 z_0 := z.Args[0]
33933 if z_0.Op != OpConst64 || auxIntToInt64(z_0.AuxInt) != 16 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 16)) {
33934 continue
33935 }
33936 v.reset(OpRotateLeft16)
33937 v.AddArg2(x, z)
33938 return true
33939 }
33940 break
33941 }
33942
33943
33944
33945 for {
33946 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
33947 right := v_0
33948 if right.Op != OpRsh16Ux32 {
33949 continue
33950 }
33951 y := right.Args[1]
33952 x := right.Args[0]
33953 left := v_1
33954 if left.Op != OpLsh16x32 {
33955 continue
33956 }
33957 _ = left.Args[1]
33958 if x != left.Args[0] {
33959 continue
33960 }
33961 z := left.Args[1]
33962 if z.Op != OpSub32 {
33963 continue
33964 }
33965 _ = z.Args[1]
33966 z_0 := z.Args[0]
33967 if z_0.Op != OpConst32 || auxIntToInt32(z_0.AuxInt) != 16 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 16)) {
33968 continue
33969 }
33970 v.reset(OpRotateLeft16)
33971 v.AddArg2(x, z)
33972 return true
33973 }
33974 break
33975 }
33976
33977
33978
33979 for {
33980 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
33981 right := v_0
33982 if right.Op != OpRsh16Ux16 {
33983 continue
33984 }
33985 y := right.Args[1]
33986 x := right.Args[0]
33987 left := v_1
33988 if left.Op != OpLsh16x16 {
33989 continue
33990 }
33991 _ = left.Args[1]
33992 if x != left.Args[0] {
33993 continue
33994 }
33995 z := left.Args[1]
33996 if z.Op != OpSub16 {
33997 continue
33998 }
33999 _ = z.Args[1]
34000 z_0 := z.Args[0]
34001 if z_0.Op != OpConst16 || auxIntToInt16(z_0.AuxInt) != 16 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 16)) {
34002 continue
34003 }
34004 v.reset(OpRotateLeft16)
34005 v.AddArg2(x, z)
34006 return true
34007 }
34008 break
34009 }
34010
34011
34012
34013 for {
34014 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34015 right := v_0
34016 if right.Op != OpRsh16Ux8 {
34017 continue
34018 }
34019 y := right.Args[1]
34020 x := right.Args[0]
34021 left := v_1
34022 if left.Op != OpLsh16x8 {
34023 continue
34024 }
34025 _ = left.Args[1]
34026 if x != left.Args[0] {
34027 continue
34028 }
34029 z := left.Args[1]
34030 if z.Op != OpSub8 {
34031 continue
34032 }
34033 _ = z.Args[1]
34034 z_0 := z.Args[0]
34035 if z_0.Op != OpConst8 || auxIntToInt8(z_0.AuxInt) != 16 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 16)) {
34036 continue
34037 }
34038 v.reset(OpRotateLeft16)
34039 v.AddArg2(x, z)
34040 return true
34041 }
34042 break
34043 }
34044 return false
34045 }
34046 func rewriteValuegeneric_OpXor32(v *Value) bool {
34047 v_1 := v.Args[1]
34048 v_0 := v.Args[0]
34049 b := v.Block
34050 config := b.Func.Config
34051
34052
34053 for {
34054 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34055 if v_0.Op != OpConst32 {
34056 continue
34057 }
34058 c := auxIntToInt32(v_0.AuxInt)
34059 if v_1.Op != OpConst32 {
34060 continue
34061 }
34062 d := auxIntToInt32(v_1.AuxInt)
34063 v.reset(OpConst32)
34064 v.AuxInt = int32ToAuxInt(c ^ d)
34065 return true
34066 }
34067 break
34068 }
34069
34070
34071 for {
34072 x := v_0
34073 if x != v_1 {
34074 break
34075 }
34076 v.reset(OpConst32)
34077 v.AuxInt = int32ToAuxInt(0)
34078 return true
34079 }
34080
34081
34082 for {
34083 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34084 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
34085 continue
34086 }
34087 x := v_1
34088 v.copyOf(x)
34089 return true
34090 }
34091 break
34092 }
34093
34094
34095 for {
34096 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34097 if v_0.Op != OpCom32 {
34098 continue
34099 }
34100 x := v_0.Args[0]
34101 if x != v_1 {
34102 continue
34103 }
34104 v.reset(OpConst32)
34105 v.AuxInt = int32ToAuxInt(-1)
34106 return true
34107 }
34108 break
34109 }
34110
34111
34112 for {
34113 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34114 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != -1 {
34115 continue
34116 }
34117 x := v_1
34118 v.reset(OpCom32)
34119 v.AddArg(x)
34120 return true
34121 }
34122 break
34123 }
34124
34125
34126 for {
34127 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34128 x := v_0
34129 if v_1.Op != OpXor32 {
34130 continue
34131 }
34132 _ = v_1.Args[1]
34133 v_1_0 := v_1.Args[0]
34134 v_1_1 := v_1.Args[1]
34135 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
34136 if x != v_1_0 {
34137 continue
34138 }
34139 y := v_1_1
34140 v.copyOf(y)
34141 return true
34142 }
34143 }
34144 break
34145 }
34146
34147
34148
34149 for {
34150 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34151 if v_0.Op != OpXor32 {
34152 continue
34153 }
34154 _ = v_0.Args[1]
34155 v_0_0 := v_0.Args[0]
34156 v_0_1 := v_0.Args[1]
34157 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
34158 i := v_0_0
34159 if i.Op != OpConst32 {
34160 continue
34161 }
34162 t := i.Type
34163 z := v_0_1
34164 x := v_1
34165 if !(z.Op != OpConst32 && x.Op != OpConst32) {
34166 continue
34167 }
34168 v.reset(OpXor32)
34169 v0 := b.NewValue0(v.Pos, OpXor32, t)
34170 v0.AddArg2(z, x)
34171 v.AddArg2(i, v0)
34172 return true
34173 }
34174 }
34175 break
34176 }
34177
34178
34179 for {
34180 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34181 if v_0.Op != OpConst32 {
34182 continue
34183 }
34184 t := v_0.Type
34185 c := auxIntToInt32(v_0.AuxInt)
34186 if v_1.Op != OpXor32 {
34187 continue
34188 }
34189 _ = v_1.Args[1]
34190 v_1_0 := v_1.Args[0]
34191 v_1_1 := v_1.Args[1]
34192 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
34193 if v_1_0.Op != OpConst32 || v_1_0.Type != t {
34194 continue
34195 }
34196 d := auxIntToInt32(v_1_0.AuxInt)
34197 x := v_1_1
34198 v.reset(OpXor32)
34199 v0 := b.NewValue0(v.Pos, OpConst32, t)
34200 v0.AuxInt = int32ToAuxInt(c ^ d)
34201 v.AddArg2(v0, x)
34202 return true
34203 }
34204 }
34205 break
34206 }
34207
34208
34209
34210 for {
34211 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34212 if v_0.Op != OpLsh32x64 {
34213 continue
34214 }
34215 _ = v_0.Args[1]
34216 x := v_0.Args[0]
34217 z := v_0.Args[1]
34218 if z.Op != OpConst64 {
34219 continue
34220 }
34221 c := auxIntToInt64(z.AuxInt)
34222 if v_1.Op != OpRsh32Ux64 {
34223 continue
34224 }
34225 _ = v_1.Args[1]
34226 if x != v_1.Args[0] {
34227 continue
34228 }
34229 v_1_1 := v_1.Args[1]
34230 if v_1_1.Op != OpConst64 {
34231 continue
34232 }
34233 d := auxIntToInt64(v_1_1.AuxInt)
34234 if !(c < 32 && d == 32-c && canRotate(config, 32)) {
34235 continue
34236 }
34237 v.reset(OpRotateLeft32)
34238 v.AddArg2(x, z)
34239 return true
34240 }
34241 break
34242 }
34243
34244
34245
34246 for {
34247 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34248 left := v_0
34249 if left.Op != OpLsh32x64 {
34250 continue
34251 }
34252 y := left.Args[1]
34253 x := left.Args[0]
34254 right := v_1
34255 if right.Op != OpRsh32Ux64 {
34256 continue
34257 }
34258 _ = right.Args[1]
34259 if x != right.Args[0] {
34260 continue
34261 }
34262 right_1 := right.Args[1]
34263 if right_1.Op != OpSub64 {
34264 continue
34265 }
34266 _ = right_1.Args[1]
34267 right_1_0 := right_1.Args[0]
34268 if right_1_0.Op != OpConst64 || auxIntToInt64(right_1_0.AuxInt) != 32 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 32)) {
34269 continue
34270 }
34271 v.reset(OpRotateLeft32)
34272 v.AddArg2(x, y)
34273 return true
34274 }
34275 break
34276 }
34277
34278
34279
34280 for {
34281 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34282 left := v_0
34283 if left.Op != OpLsh32x32 {
34284 continue
34285 }
34286 y := left.Args[1]
34287 x := left.Args[0]
34288 right := v_1
34289 if right.Op != OpRsh32Ux32 {
34290 continue
34291 }
34292 _ = right.Args[1]
34293 if x != right.Args[0] {
34294 continue
34295 }
34296 right_1 := right.Args[1]
34297 if right_1.Op != OpSub32 {
34298 continue
34299 }
34300 _ = right_1.Args[1]
34301 right_1_0 := right_1.Args[0]
34302 if right_1_0.Op != OpConst32 || auxIntToInt32(right_1_0.AuxInt) != 32 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 32)) {
34303 continue
34304 }
34305 v.reset(OpRotateLeft32)
34306 v.AddArg2(x, y)
34307 return true
34308 }
34309 break
34310 }
34311
34312
34313
34314 for {
34315 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34316 left := v_0
34317 if left.Op != OpLsh32x16 {
34318 continue
34319 }
34320 y := left.Args[1]
34321 x := left.Args[0]
34322 right := v_1
34323 if right.Op != OpRsh32Ux16 {
34324 continue
34325 }
34326 _ = right.Args[1]
34327 if x != right.Args[0] {
34328 continue
34329 }
34330 right_1 := right.Args[1]
34331 if right_1.Op != OpSub16 {
34332 continue
34333 }
34334 _ = right_1.Args[1]
34335 right_1_0 := right_1.Args[0]
34336 if right_1_0.Op != OpConst16 || auxIntToInt16(right_1_0.AuxInt) != 32 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 32)) {
34337 continue
34338 }
34339 v.reset(OpRotateLeft32)
34340 v.AddArg2(x, y)
34341 return true
34342 }
34343 break
34344 }
34345
34346
34347
34348 for {
34349 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34350 left := v_0
34351 if left.Op != OpLsh32x8 {
34352 continue
34353 }
34354 y := left.Args[1]
34355 x := left.Args[0]
34356 right := v_1
34357 if right.Op != OpRsh32Ux8 {
34358 continue
34359 }
34360 _ = right.Args[1]
34361 if x != right.Args[0] {
34362 continue
34363 }
34364 right_1 := right.Args[1]
34365 if right_1.Op != OpSub8 {
34366 continue
34367 }
34368 _ = right_1.Args[1]
34369 right_1_0 := right_1.Args[0]
34370 if right_1_0.Op != OpConst8 || auxIntToInt8(right_1_0.AuxInt) != 32 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 32)) {
34371 continue
34372 }
34373 v.reset(OpRotateLeft32)
34374 v.AddArg2(x, y)
34375 return true
34376 }
34377 break
34378 }
34379
34380
34381
34382 for {
34383 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34384 right := v_0
34385 if right.Op != OpRsh32Ux64 {
34386 continue
34387 }
34388 y := right.Args[1]
34389 x := right.Args[0]
34390 left := v_1
34391 if left.Op != OpLsh32x64 {
34392 continue
34393 }
34394 _ = left.Args[1]
34395 if x != left.Args[0] {
34396 continue
34397 }
34398 z := left.Args[1]
34399 if z.Op != OpSub64 {
34400 continue
34401 }
34402 _ = z.Args[1]
34403 z_0 := z.Args[0]
34404 if z_0.Op != OpConst64 || auxIntToInt64(z_0.AuxInt) != 32 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 32)) {
34405 continue
34406 }
34407 v.reset(OpRotateLeft32)
34408 v.AddArg2(x, z)
34409 return true
34410 }
34411 break
34412 }
34413
34414
34415
34416 for {
34417 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34418 right := v_0
34419 if right.Op != OpRsh32Ux32 {
34420 continue
34421 }
34422 y := right.Args[1]
34423 x := right.Args[0]
34424 left := v_1
34425 if left.Op != OpLsh32x32 {
34426 continue
34427 }
34428 _ = left.Args[1]
34429 if x != left.Args[0] {
34430 continue
34431 }
34432 z := left.Args[1]
34433 if z.Op != OpSub32 {
34434 continue
34435 }
34436 _ = z.Args[1]
34437 z_0 := z.Args[0]
34438 if z_0.Op != OpConst32 || auxIntToInt32(z_0.AuxInt) != 32 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 32)) {
34439 continue
34440 }
34441 v.reset(OpRotateLeft32)
34442 v.AddArg2(x, z)
34443 return true
34444 }
34445 break
34446 }
34447
34448
34449
34450 for {
34451 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34452 right := v_0
34453 if right.Op != OpRsh32Ux16 {
34454 continue
34455 }
34456 y := right.Args[1]
34457 x := right.Args[0]
34458 left := v_1
34459 if left.Op != OpLsh32x16 {
34460 continue
34461 }
34462 _ = left.Args[1]
34463 if x != left.Args[0] {
34464 continue
34465 }
34466 z := left.Args[1]
34467 if z.Op != OpSub16 {
34468 continue
34469 }
34470 _ = z.Args[1]
34471 z_0 := z.Args[0]
34472 if z_0.Op != OpConst16 || auxIntToInt16(z_0.AuxInt) != 32 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 32)) {
34473 continue
34474 }
34475 v.reset(OpRotateLeft32)
34476 v.AddArg2(x, z)
34477 return true
34478 }
34479 break
34480 }
34481
34482
34483
34484 for {
34485 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34486 right := v_0
34487 if right.Op != OpRsh32Ux8 {
34488 continue
34489 }
34490 y := right.Args[1]
34491 x := right.Args[0]
34492 left := v_1
34493 if left.Op != OpLsh32x8 {
34494 continue
34495 }
34496 _ = left.Args[1]
34497 if x != left.Args[0] {
34498 continue
34499 }
34500 z := left.Args[1]
34501 if z.Op != OpSub8 {
34502 continue
34503 }
34504 _ = z.Args[1]
34505 z_0 := z.Args[0]
34506 if z_0.Op != OpConst8 || auxIntToInt8(z_0.AuxInt) != 32 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 32)) {
34507 continue
34508 }
34509 v.reset(OpRotateLeft32)
34510 v.AddArg2(x, z)
34511 return true
34512 }
34513 break
34514 }
34515 return false
34516 }
34517 func rewriteValuegeneric_OpXor64(v *Value) bool {
34518 v_1 := v.Args[1]
34519 v_0 := v.Args[0]
34520 b := v.Block
34521 config := b.Func.Config
34522
34523
34524 for {
34525 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34526 if v_0.Op != OpConst64 {
34527 continue
34528 }
34529 c := auxIntToInt64(v_0.AuxInt)
34530 if v_1.Op != OpConst64 {
34531 continue
34532 }
34533 d := auxIntToInt64(v_1.AuxInt)
34534 v.reset(OpConst64)
34535 v.AuxInt = int64ToAuxInt(c ^ d)
34536 return true
34537 }
34538 break
34539 }
34540
34541
34542 for {
34543 x := v_0
34544 if x != v_1 {
34545 break
34546 }
34547 v.reset(OpConst64)
34548 v.AuxInt = int64ToAuxInt(0)
34549 return true
34550 }
34551
34552
34553 for {
34554 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34555 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
34556 continue
34557 }
34558 x := v_1
34559 v.copyOf(x)
34560 return true
34561 }
34562 break
34563 }
34564
34565
34566 for {
34567 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34568 if v_0.Op != OpCom64 {
34569 continue
34570 }
34571 x := v_0.Args[0]
34572 if x != v_1 {
34573 continue
34574 }
34575 v.reset(OpConst64)
34576 v.AuxInt = int64ToAuxInt(-1)
34577 return true
34578 }
34579 break
34580 }
34581
34582
34583 for {
34584 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34585 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != -1 {
34586 continue
34587 }
34588 x := v_1
34589 v.reset(OpCom64)
34590 v.AddArg(x)
34591 return true
34592 }
34593 break
34594 }
34595
34596
34597 for {
34598 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34599 x := v_0
34600 if v_1.Op != OpXor64 {
34601 continue
34602 }
34603 _ = v_1.Args[1]
34604 v_1_0 := v_1.Args[0]
34605 v_1_1 := v_1.Args[1]
34606 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
34607 if x != v_1_0 {
34608 continue
34609 }
34610 y := v_1_1
34611 v.copyOf(y)
34612 return true
34613 }
34614 }
34615 break
34616 }
34617
34618
34619
34620 for {
34621 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34622 if v_0.Op != OpXor64 {
34623 continue
34624 }
34625 _ = v_0.Args[1]
34626 v_0_0 := v_0.Args[0]
34627 v_0_1 := v_0.Args[1]
34628 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
34629 i := v_0_0
34630 if i.Op != OpConst64 {
34631 continue
34632 }
34633 t := i.Type
34634 z := v_0_1
34635 x := v_1
34636 if !(z.Op != OpConst64 && x.Op != OpConst64) {
34637 continue
34638 }
34639 v.reset(OpXor64)
34640 v0 := b.NewValue0(v.Pos, OpXor64, t)
34641 v0.AddArg2(z, x)
34642 v.AddArg2(i, v0)
34643 return true
34644 }
34645 }
34646 break
34647 }
34648
34649
34650 for {
34651 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34652 if v_0.Op != OpConst64 {
34653 continue
34654 }
34655 t := v_0.Type
34656 c := auxIntToInt64(v_0.AuxInt)
34657 if v_1.Op != OpXor64 {
34658 continue
34659 }
34660 _ = v_1.Args[1]
34661 v_1_0 := v_1.Args[0]
34662 v_1_1 := v_1.Args[1]
34663 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
34664 if v_1_0.Op != OpConst64 || v_1_0.Type != t {
34665 continue
34666 }
34667 d := auxIntToInt64(v_1_0.AuxInt)
34668 x := v_1_1
34669 v.reset(OpXor64)
34670 v0 := b.NewValue0(v.Pos, OpConst64, t)
34671 v0.AuxInt = int64ToAuxInt(c ^ d)
34672 v.AddArg2(v0, x)
34673 return true
34674 }
34675 }
34676 break
34677 }
34678
34679
34680
34681 for {
34682 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34683 if v_0.Op != OpLsh64x64 {
34684 continue
34685 }
34686 _ = v_0.Args[1]
34687 x := v_0.Args[0]
34688 z := v_0.Args[1]
34689 if z.Op != OpConst64 {
34690 continue
34691 }
34692 c := auxIntToInt64(z.AuxInt)
34693 if v_1.Op != OpRsh64Ux64 {
34694 continue
34695 }
34696 _ = v_1.Args[1]
34697 if x != v_1.Args[0] {
34698 continue
34699 }
34700 v_1_1 := v_1.Args[1]
34701 if v_1_1.Op != OpConst64 {
34702 continue
34703 }
34704 d := auxIntToInt64(v_1_1.AuxInt)
34705 if !(c < 64 && d == 64-c && canRotate(config, 64)) {
34706 continue
34707 }
34708 v.reset(OpRotateLeft64)
34709 v.AddArg2(x, z)
34710 return true
34711 }
34712 break
34713 }
34714
34715
34716
34717 for {
34718 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34719 left := v_0
34720 if left.Op != OpLsh64x64 {
34721 continue
34722 }
34723 y := left.Args[1]
34724 x := left.Args[0]
34725 right := v_1
34726 if right.Op != OpRsh64Ux64 {
34727 continue
34728 }
34729 _ = right.Args[1]
34730 if x != right.Args[0] {
34731 continue
34732 }
34733 right_1 := right.Args[1]
34734 if right_1.Op != OpSub64 {
34735 continue
34736 }
34737 _ = right_1.Args[1]
34738 right_1_0 := right_1.Args[0]
34739 if right_1_0.Op != OpConst64 || auxIntToInt64(right_1_0.AuxInt) != 64 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 64)) {
34740 continue
34741 }
34742 v.reset(OpRotateLeft64)
34743 v.AddArg2(x, y)
34744 return true
34745 }
34746 break
34747 }
34748
34749
34750
34751 for {
34752 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34753 left := v_0
34754 if left.Op != OpLsh64x32 {
34755 continue
34756 }
34757 y := left.Args[1]
34758 x := left.Args[0]
34759 right := v_1
34760 if right.Op != OpRsh64Ux32 {
34761 continue
34762 }
34763 _ = right.Args[1]
34764 if x != right.Args[0] {
34765 continue
34766 }
34767 right_1 := right.Args[1]
34768 if right_1.Op != OpSub32 {
34769 continue
34770 }
34771 _ = right_1.Args[1]
34772 right_1_0 := right_1.Args[0]
34773 if right_1_0.Op != OpConst32 || auxIntToInt32(right_1_0.AuxInt) != 64 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 64)) {
34774 continue
34775 }
34776 v.reset(OpRotateLeft64)
34777 v.AddArg2(x, y)
34778 return true
34779 }
34780 break
34781 }
34782
34783
34784
34785 for {
34786 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34787 left := v_0
34788 if left.Op != OpLsh64x16 {
34789 continue
34790 }
34791 y := left.Args[1]
34792 x := left.Args[0]
34793 right := v_1
34794 if right.Op != OpRsh64Ux16 {
34795 continue
34796 }
34797 _ = right.Args[1]
34798 if x != right.Args[0] {
34799 continue
34800 }
34801 right_1 := right.Args[1]
34802 if right_1.Op != OpSub16 {
34803 continue
34804 }
34805 _ = right_1.Args[1]
34806 right_1_0 := right_1.Args[0]
34807 if right_1_0.Op != OpConst16 || auxIntToInt16(right_1_0.AuxInt) != 64 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 64)) {
34808 continue
34809 }
34810 v.reset(OpRotateLeft64)
34811 v.AddArg2(x, y)
34812 return true
34813 }
34814 break
34815 }
34816
34817
34818
34819 for {
34820 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34821 left := v_0
34822 if left.Op != OpLsh64x8 {
34823 continue
34824 }
34825 y := left.Args[1]
34826 x := left.Args[0]
34827 right := v_1
34828 if right.Op != OpRsh64Ux8 {
34829 continue
34830 }
34831 _ = right.Args[1]
34832 if x != right.Args[0] {
34833 continue
34834 }
34835 right_1 := right.Args[1]
34836 if right_1.Op != OpSub8 {
34837 continue
34838 }
34839 _ = right_1.Args[1]
34840 right_1_0 := right_1.Args[0]
34841 if right_1_0.Op != OpConst8 || auxIntToInt8(right_1_0.AuxInt) != 64 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 64)) {
34842 continue
34843 }
34844 v.reset(OpRotateLeft64)
34845 v.AddArg2(x, y)
34846 return true
34847 }
34848 break
34849 }
34850
34851
34852
34853 for {
34854 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34855 right := v_0
34856 if right.Op != OpRsh64Ux64 {
34857 continue
34858 }
34859 y := right.Args[1]
34860 x := right.Args[0]
34861 left := v_1
34862 if left.Op != OpLsh64x64 {
34863 continue
34864 }
34865 _ = left.Args[1]
34866 if x != left.Args[0] {
34867 continue
34868 }
34869 z := left.Args[1]
34870 if z.Op != OpSub64 {
34871 continue
34872 }
34873 _ = z.Args[1]
34874 z_0 := z.Args[0]
34875 if z_0.Op != OpConst64 || auxIntToInt64(z_0.AuxInt) != 64 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 64)) {
34876 continue
34877 }
34878 v.reset(OpRotateLeft64)
34879 v.AddArg2(x, z)
34880 return true
34881 }
34882 break
34883 }
34884
34885
34886
34887 for {
34888 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34889 right := v_0
34890 if right.Op != OpRsh64Ux32 {
34891 continue
34892 }
34893 y := right.Args[1]
34894 x := right.Args[0]
34895 left := v_1
34896 if left.Op != OpLsh64x32 {
34897 continue
34898 }
34899 _ = left.Args[1]
34900 if x != left.Args[0] {
34901 continue
34902 }
34903 z := left.Args[1]
34904 if z.Op != OpSub32 {
34905 continue
34906 }
34907 _ = z.Args[1]
34908 z_0 := z.Args[0]
34909 if z_0.Op != OpConst32 || auxIntToInt32(z_0.AuxInt) != 64 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 64)) {
34910 continue
34911 }
34912 v.reset(OpRotateLeft64)
34913 v.AddArg2(x, z)
34914 return true
34915 }
34916 break
34917 }
34918
34919
34920
34921 for {
34922 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34923 right := v_0
34924 if right.Op != OpRsh64Ux16 {
34925 continue
34926 }
34927 y := right.Args[1]
34928 x := right.Args[0]
34929 left := v_1
34930 if left.Op != OpLsh64x16 {
34931 continue
34932 }
34933 _ = left.Args[1]
34934 if x != left.Args[0] {
34935 continue
34936 }
34937 z := left.Args[1]
34938 if z.Op != OpSub16 {
34939 continue
34940 }
34941 _ = z.Args[1]
34942 z_0 := z.Args[0]
34943 if z_0.Op != OpConst16 || auxIntToInt16(z_0.AuxInt) != 64 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 64)) {
34944 continue
34945 }
34946 v.reset(OpRotateLeft64)
34947 v.AddArg2(x, z)
34948 return true
34949 }
34950 break
34951 }
34952
34953
34954
34955 for {
34956 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34957 right := v_0
34958 if right.Op != OpRsh64Ux8 {
34959 continue
34960 }
34961 y := right.Args[1]
34962 x := right.Args[0]
34963 left := v_1
34964 if left.Op != OpLsh64x8 {
34965 continue
34966 }
34967 _ = left.Args[1]
34968 if x != left.Args[0] {
34969 continue
34970 }
34971 z := left.Args[1]
34972 if z.Op != OpSub8 {
34973 continue
34974 }
34975 _ = z.Args[1]
34976 z_0 := z.Args[0]
34977 if z_0.Op != OpConst8 || auxIntToInt8(z_0.AuxInt) != 64 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 64)) {
34978 continue
34979 }
34980 v.reset(OpRotateLeft64)
34981 v.AddArg2(x, z)
34982 return true
34983 }
34984 break
34985 }
34986 return false
34987 }
34988 func rewriteValuegeneric_OpXor8(v *Value) bool {
34989 v_1 := v.Args[1]
34990 v_0 := v.Args[0]
34991 b := v.Block
34992 config := b.Func.Config
34993
34994
34995 for {
34996 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34997 if v_0.Op != OpConst8 {
34998 continue
34999 }
35000 c := auxIntToInt8(v_0.AuxInt)
35001 if v_1.Op != OpConst8 {
35002 continue
35003 }
35004 d := auxIntToInt8(v_1.AuxInt)
35005 v.reset(OpConst8)
35006 v.AuxInt = int8ToAuxInt(c ^ d)
35007 return true
35008 }
35009 break
35010 }
35011
35012
35013 for {
35014 x := v_0
35015 if x != v_1 {
35016 break
35017 }
35018 v.reset(OpConst8)
35019 v.AuxInt = int8ToAuxInt(0)
35020 return true
35021 }
35022
35023
35024 for {
35025 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
35026 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 {
35027 continue
35028 }
35029 x := v_1
35030 v.copyOf(x)
35031 return true
35032 }
35033 break
35034 }
35035
35036
35037 for {
35038 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
35039 if v_0.Op != OpCom8 {
35040 continue
35041 }
35042 x := v_0.Args[0]
35043 if x != v_1 {
35044 continue
35045 }
35046 v.reset(OpConst8)
35047 v.AuxInt = int8ToAuxInt(-1)
35048 return true
35049 }
35050 break
35051 }
35052
35053
35054 for {
35055 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
35056 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != -1 {
35057 continue
35058 }
35059 x := v_1
35060 v.reset(OpCom8)
35061 v.AddArg(x)
35062 return true
35063 }
35064 break
35065 }
35066
35067
35068 for {
35069 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
35070 x := v_0
35071 if v_1.Op != OpXor8 {
35072 continue
35073 }
35074 _ = v_1.Args[1]
35075 v_1_0 := v_1.Args[0]
35076 v_1_1 := v_1.Args[1]
35077 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
35078 if x != v_1_0 {
35079 continue
35080 }
35081 y := v_1_1
35082 v.copyOf(y)
35083 return true
35084 }
35085 }
35086 break
35087 }
35088
35089
35090
35091 for {
35092 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
35093 if v_0.Op != OpXor8 {
35094 continue
35095 }
35096 _ = v_0.Args[1]
35097 v_0_0 := v_0.Args[0]
35098 v_0_1 := v_0.Args[1]
35099 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
35100 i := v_0_0
35101 if i.Op != OpConst8 {
35102 continue
35103 }
35104 t := i.Type
35105 z := v_0_1
35106 x := v_1
35107 if !(z.Op != OpConst8 && x.Op != OpConst8) {
35108 continue
35109 }
35110 v.reset(OpXor8)
35111 v0 := b.NewValue0(v.Pos, OpXor8, t)
35112 v0.AddArg2(z, x)
35113 v.AddArg2(i, v0)
35114 return true
35115 }
35116 }
35117 break
35118 }
35119
35120
35121 for {
35122 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
35123 if v_0.Op != OpConst8 {
35124 continue
35125 }
35126 t := v_0.Type
35127 c := auxIntToInt8(v_0.AuxInt)
35128 if v_1.Op != OpXor8 {
35129 continue
35130 }
35131 _ = v_1.Args[1]
35132 v_1_0 := v_1.Args[0]
35133 v_1_1 := v_1.Args[1]
35134 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
35135 if v_1_0.Op != OpConst8 || v_1_0.Type != t {
35136 continue
35137 }
35138 d := auxIntToInt8(v_1_0.AuxInt)
35139 x := v_1_1
35140 v.reset(OpXor8)
35141 v0 := b.NewValue0(v.Pos, OpConst8, t)
35142 v0.AuxInt = int8ToAuxInt(c ^ d)
35143 v.AddArg2(v0, x)
35144 return true
35145 }
35146 }
35147 break
35148 }
35149
35150
35151
35152 for {
35153 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
35154 if v_0.Op != OpLsh8x64 {
35155 continue
35156 }
35157 _ = v_0.Args[1]
35158 x := v_0.Args[0]
35159 z := v_0.Args[1]
35160 if z.Op != OpConst64 {
35161 continue
35162 }
35163 c := auxIntToInt64(z.AuxInt)
35164 if v_1.Op != OpRsh8Ux64 {
35165 continue
35166 }
35167 _ = v_1.Args[1]
35168 if x != v_1.Args[0] {
35169 continue
35170 }
35171 v_1_1 := v_1.Args[1]
35172 if v_1_1.Op != OpConst64 {
35173 continue
35174 }
35175 d := auxIntToInt64(v_1_1.AuxInt)
35176 if !(c < 8 && d == 8-c && canRotate(config, 8)) {
35177 continue
35178 }
35179 v.reset(OpRotateLeft8)
35180 v.AddArg2(x, z)
35181 return true
35182 }
35183 break
35184 }
35185
35186
35187
35188 for {
35189 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
35190 left := v_0
35191 if left.Op != OpLsh8x64 {
35192 continue
35193 }
35194 y := left.Args[1]
35195 x := left.Args[0]
35196 right := v_1
35197 if right.Op != OpRsh8Ux64 {
35198 continue
35199 }
35200 _ = right.Args[1]
35201 if x != right.Args[0] {
35202 continue
35203 }
35204 right_1 := right.Args[1]
35205 if right_1.Op != OpSub64 {
35206 continue
35207 }
35208 _ = right_1.Args[1]
35209 right_1_0 := right_1.Args[0]
35210 if right_1_0.Op != OpConst64 || auxIntToInt64(right_1_0.AuxInt) != 8 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 8)) {
35211 continue
35212 }
35213 v.reset(OpRotateLeft8)
35214 v.AddArg2(x, y)
35215 return true
35216 }
35217 break
35218 }
35219
35220
35221
35222 for {
35223 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
35224 left := v_0
35225 if left.Op != OpLsh8x32 {
35226 continue
35227 }
35228 y := left.Args[1]
35229 x := left.Args[0]
35230 right := v_1
35231 if right.Op != OpRsh8Ux32 {
35232 continue
35233 }
35234 _ = right.Args[1]
35235 if x != right.Args[0] {
35236 continue
35237 }
35238 right_1 := right.Args[1]
35239 if right_1.Op != OpSub32 {
35240 continue
35241 }
35242 _ = right_1.Args[1]
35243 right_1_0 := right_1.Args[0]
35244 if right_1_0.Op != OpConst32 || auxIntToInt32(right_1_0.AuxInt) != 8 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 8)) {
35245 continue
35246 }
35247 v.reset(OpRotateLeft8)
35248 v.AddArg2(x, y)
35249 return true
35250 }
35251 break
35252 }
35253
35254
35255
35256 for {
35257 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
35258 left := v_0
35259 if left.Op != OpLsh8x16 {
35260 continue
35261 }
35262 y := left.Args[1]
35263 x := left.Args[0]
35264 right := v_1
35265 if right.Op != OpRsh8Ux16 {
35266 continue
35267 }
35268 _ = right.Args[1]
35269 if x != right.Args[0] {
35270 continue
35271 }
35272 right_1 := right.Args[1]
35273 if right_1.Op != OpSub16 {
35274 continue
35275 }
35276 _ = right_1.Args[1]
35277 right_1_0 := right_1.Args[0]
35278 if right_1_0.Op != OpConst16 || auxIntToInt16(right_1_0.AuxInt) != 8 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 8)) {
35279 continue
35280 }
35281 v.reset(OpRotateLeft8)
35282 v.AddArg2(x, y)
35283 return true
35284 }
35285 break
35286 }
35287
35288
35289
35290 for {
35291 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
35292 left := v_0
35293 if left.Op != OpLsh8x8 {
35294 continue
35295 }
35296 y := left.Args[1]
35297 x := left.Args[0]
35298 right := v_1
35299 if right.Op != OpRsh8Ux8 {
35300 continue
35301 }
35302 _ = right.Args[1]
35303 if x != right.Args[0] {
35304 continue
35305 }
35306 right_1 := right.Args[1]
35307 if right_1.Op != OpSub8 {
35308 continue
35309 }
35310 _ = right_1.Args[1]
35311 right_1_0 := right_1.Args[0]
35312 if right_1_0.Op != OpConst8 || auxIntToInt8(right_1_0.AuxInt) != 8 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 8)) {
35313 continue
35314 }
35315 v.reset(OpRotateLeft8)
35316 v.AddArg2(x, y)
35317 return true
35318 }
35319 break
35320 }
35321
35322
35323
35324 for {
35325 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
35326 right := v_0
35327 if right.Op != OpRsh8Ux64 {
35328 continue
35329 }
35330 y := right.Args[1]
35331 x := right.Args[0]
35332 left := v_1
35333 if left.Op != OpLsh8x64 {
35334 continue
35335 }
35336 _ = left.Args[1]
35337 if x != left.Args[0] {
35338 continue
35339 }
35340 z := left.Args[1]
35341 if z.Op != OpSub64 {
35342 continue
35343 }
35344 _ = z.Args[1]
35345 z_0 := z.Args[0]
35346 if z_0.Op != OpConst64 || auxIntToInt64(z_0.AuxInt) != 8 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 8)) {
35347 continue
35348 }
35349 v.reset(OpRotateLeft8)
35350 v.AddArg2(x, z)
35351 return true
35352 }
35353 break
35354 }
35355
35356
35357
35358 for {
35359 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
35360 right := v_0
35361 if right.Op != OpRsh8Ux32 {
35362 continue
35363 }
35364 y := right.Args[1]
35365 x := right.Args[0]
35366 left := v_1
35367 if left.Op != OpLsh8x32 {
35368 continue
35369 }
35370 _ = left.Args[1]
35371 if x != left.Args[0] {
35372 continue
35373 }
35374 z := left.Args[1]
35375 if z.Op != OpSub32 {
35376 continue
35377 }
35378 _ = z.Args[1]
35379 z_0 := z.Args[0]
35380 if z_0.Op != OpConst32 || auxIntToInt32(z_0.AuxInt) != 8 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 8)) {
35381 continue
35382 }
35383 v.reset(OpRotateLeft8)
35384 v.AddArg2(x, z)
35385 return true
35386 }
35387 break
35388 }
35389
35390
35391
35392 for {
35393 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
35394 right := v_0
35395 if right.Op != OpRsh8Ux16 {
35396 continue
35397 }
35398 y := right.Args[1]
35399 x := right.Args[0]
35400 left := v_1
35401 if left.Op != OpLsh8x16 {
35402 continue
35403 }
35404 _ = left.Args[1]
35405 if x != left.Args[0] {
35406 continue
35407 }
35408 z := left.Args[1]
35409 if z.Op != OpSub16 {
35410 continue
35411 }
35412 _ = z.Args[1]
35413 z_0 := z.Args[0]
35414 if z_0.Op != OpConst16 || auxIntToInt16(z_0.AuxInt) != 8 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 8)) {
35415 continue
35416 }
35417 v.reset(OpRotateLeft8)
35418 v.AddArg2(x, z)
35419 return true
35420 }
35421 break
35422 }
35423
35424
35425
35426 for {
35427 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
35428 right := v_0
35429 if right.Op != OpRsh8Ux8 {
35430 continue
35431 }
35432 y := right.Args[1]
35433 x := right.Args[0]
35434 left := v_1
35435 if left.Op != OpLsh8x8 {
35436 continue
35437 }
35438 _ = left.Args[1]
35439 if x != left.Args[0] {
35440 continue
35441 }
35442 z := left.Args[1]
35443 if z.Op != OpSub8 {
35444 continue
35445 }
35446 _ = z.Args[1]
35447 z_0 := z.Args[0]
35448 if z_0.Op != OpConst8 || auxIntToInt8(z_0.AuxInt) != 8 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 8)) {
35449 continue
35450 }
35451 v.reset(OpRotateLeft8)
35452 v.AddArg2(x, z)
35453 return true
35454 }
35455 break
35456 }
35457 return false
35458 }
35459 func rewriteValuegeneric_OpZero(v *Value) bool {
35460 v_1 := v.Args[1]
35461 v_0 := v.Args[0]
35462 b := v.Block
35463
35464
35465
35466 for {
35467 if v_0.Op != OpSelectN || auxIntToInt64(v_0.AuxInt) != 0 {
35468 break
35469 }
35470 call := v_0.Args[0]
35471 if call.Op != OpStaticLECall || len(call.Args) != 2 {
35472 break
35473 }
35474 mem := v_1
35475 if mem.Op != OpSelectN || auxIntToInt64(mem.AuxInt) != 1 || call != mem.Args[0] || !(isSameCall(call.Aux, "runtime.newobject")) {
35476 break
35477 }
35478 v.copyOf(mem)
35479 return true
35480 }
35481
35482
35483
35484 for {
35485 n := auxIntToInt64(v.AuxInt)
35486 t1 := auxToType(v.Aux)
35487 p1 := v_0
35488 store := v_1
35489 if store.Op != OpStore {
35490 break
35491 }
35492 t2 := auxToType(store.Aux)
35493 mem := store.Args[2]
35494 store_0 := store.Args[0]
35495 if store_0.Op != OpOffPtr {
35496 break
35497 }
35498 o2 := auxIntToInt64(store_0.AuxInt)
35499 p2 := store_0.Args[0]
35500 if !(isSamePtr(p1, p2) && store.Uses == 1 && n >= o2+t2.Size() && clobber(store)) {
35501 break
35502 }
35503 v.reset(OpZero)
35504 v.AuxInt = int64ToAuxInt(n)
35505 v.Aux = typeToAux(t1)
35506 v.AddArg2(p1, mem)
35507 return true
35508 }
35509
35510
35511
35512 for {
35513 n := auxIntToInt64(v.AuxInt)
35514 t := auxToType(v.Aux)
35515 dst1 := v_0
35516 move := v_1
35517 if move.Op != OpMove || auxIntToInt64(move.AuxInt) != n || auxToType(move.Aux) != t {
35518 break
35519 }
35520 mem := move.Args[2]
35521 dst2 := move.Args[0]
35522 if !(move.Uses == 1 && isSamePtr(dst1, dst2) && clobber(move)) {
35523 break
35524 }
35525 v.reset(OpZero)
35526 v.AuxInt = int64ToAuxInt(n)
35527 v.Aux = typeToAux(t)
35528 v.AddArg2(dst1, mem)
35529 return true
35530 }
35531
35532
35533
35534 for {
35535 n := auxIntToInt64(v.AuxInt)
35536 t := auxToType(v.Aux)
35537 dst1 := v_0
35538 vardef := v_1
35539 if vardef.Op != OpVarDef {
35540 break
35541 }
35542 x := auxToSym(vardef.Aux)
35543 move := vardef.Args[0]
35544 if move.Op != OpMove || auxIntToInt64(move.AuxInt) != n || auxToType(move.Aux) != t {
35545 break
35546 }
35547 mem := move.Args[2]
35548 dst2 := move.Args[0]
35549 if !(move.Uses == 1 && vardef.Uses == 1 && isSamePtr(dst1, dst2) && clobber(move, vardef)) {
35550 break
35551 }
35552 v.reset(OpZero)
35553 v.AuxInt = int64ToAuxInt(n)
35554 v.Aux = typeToAux(t)
35555 v0 := b.NewValue0(v.Pos, OpVarDef, types.TypeMem)
35556 v0.Aux = symToAux(x)
35557 v0.AddArg(mem)
35558 v.AddArg2(dst1, v0)
35559 return true
35560 }
35561
35562
35563
35564 for {
35565 s := auxIntToInt64(v.AuxInt)
35566 t := auxToType(v.Aux)
35567 dst1 := v_0
35568 zero := v_1
35569 if zero.Op != OpZero || auxIntToInt64(zero.AuxInt) != s || auxToType(zero.Aux) != t {
35570 break
35571 }
35572 dst2 := zero.Args[0]
35573 if !(isSamePtr(dst1, dst2)) {
35574 break
35575 }
35576 v.copyOf(zero)
35577 return true
35578 }
35579
35580
35581
35582 for {
35583 s := auxIntToInt64(v.AuxInt)
35584 t := auxToType(v.Aux)
35585 dst1 := v_0
35586 vardef := v_1
35587 if vardef.Op != OpVarDef {
35588 break
35589 }
35590 vardef_0 := vardef.Args[0]
35591 if vardef_0.Op != OpZero || auxIntToInt64(vardef_0.AuxInt) != s || auxToType(vardef_0.Aux) != t {
35592 break
35593 }
35594 dst2 := vardef_0.Args[0]
35595 if !(isSamePtr(dst1, dst2)) {
35596 break
35597 }
35598 v.copyOf(vardef)
35599 return true
35600 }
35601 return false
35602 }
35603 func rewriteValuegeneric_OpZeroExt16to32(v *Value) bool {
35604 v_0 := v.Args[0]
35605
35606
35607 for {
35608 if v_0.Op != OpConst16 {
35609 break
35610 }
35611 c := auxIntToInt16(v_0.AuxInt)
35612 v.reset(OpConst32)
35613 v.AuxInt = int32ToAuxInt(int32(uint16(c)))
35614 return true
35615 }
35616
35617
35618
35619 for {
35620 if v_0.Op != OpTrunc32to16 {
35621 break
35622 }
35623 x := v_0.Args[0]
35624 if x.Op != OpRsh32Ux64 {
35625 break
35626 }
35627 _ = x.Args[1]
35628 x_1 := x.Args[1]
35629 if x_1.Op != OpConst64 {
35630 break
35631 }
35632 s := auxIntToInt64(x_1.AuxInt)
35633 if !(s >= 16) {
35634 break
35635 }
35636 v.copyOf(x)
35637 return true
35638 }
35639 return false
35640 }
35641 func rewriteValuegeneric_OpZeroExt16to64(v *Value) bool {
35642 v_0 := v.Args[0]
35643
35644
35645 for {
35646 if v_0.Op != OpConst16 {
35647 break
35648 }
35649 c := auxIntToInt16(v_0.AuxInt)
35650 v.reset(OpConst64)
35651 v.AuxInt = int64ToAuxInt(int64(uint16(c)))
35652 return true
35653 }
35654
35655
35656
35657 for {
35658 if v_0.Op != OpTrunc64to16 {
35659 break
35660 }
35661 x := v_0.Args[0]
35662 if x.Op != OpRsh64Ux64 {
35663 break
35664 }
35665 _ = x.Args[1]
35666 x_1 := x.Args[1]
35667 if x_1.Op != OpConst64 {
35668 break
35669 }
35670 s := auxIntToInt64(x_1.AuxInt)
35671 if !(s >= 48) {
35672 break
35673 }
35674 v.copyOf(x)
35675 return true
35676 }
35677 return false
35678 }
35679 func rewriteValuegeneric_OpZeroExt32to64(v *Value) bool {
35680 v_0 := v.Args[0]
35681
35682
35683 for {
35684 if v_0.Op != OpConst32 {
35685 break
35686 }
35687 c := auxIntToInt32(v_0.AuxInt)
35688 v.reset(OpConst64)
35689 v.AuxInt = int64ToAuxInt(int64(uint32(c)))
35690 return true
35691 }
35692
35693
35694
35695 for {
35696 if v_0.Op != OpTrunc64to32 {
35697 break
35698 }
35699 x := v_0.Args[0]
35700 if x.Op != OpRsh64Ux64 {
35701 break
35702 }
35703 _ = x.Args[1]
35704 x_1 := x.Args[1]
35705 if x_1.Op != OpConst64 {
35706 break
35707 }
35708 s := auxIntToInt64(x_1.AuxInt)
35709 if !(s >= 32) {
35710 break
35711 }
35712 v.copyOf(x)
35713 return true
35714 }
35715 return false
35716 }
35717 func rewriteValuegeneric_OpZeroExt8to16(v *Value) bool {
35718 v_0 := v.Args[0]
35719
35720
35721 for {
35722 if v_0.Op != OpConst8 {
35723 break
35724 }
35725 c := auxIntToInt8(v_0.AuxInt)
35726 v.reset(OpConst16)
35727 v.AuxInt = int16ToAuxInt(int16(uint8(c)))
35728 return true
35729 }
35730
35731
35732
35733 for {
35734 if v_0.Op != OpTrunc16to8 {
35735 break
35736 }
35737 x := v_0.Args[0]
35738 if x.Op != OpRsh16Ux64 {
35739 break
35740 }
35741 _ = x.Args[1]
35742 x_1 := x.Args[1]
35743 if x_1.Op != OpConst64 {
35744 break
35745 }
35746 s := auxIntToInt64(x_1.AuxInt)
35747 if !(s >= 8) {
35748 break
35749 }
35750 v.copyOf(x)
35751 return true
35752 }
35753 return false
35754 }
35755 func rewriteValuegeneric_OpZeroExt8to32(v *Value) bool {
35756 v_0 := v.Args[0]
35757
35758
35759 for {
35760 if v_0.Op != OpConst8 {
35761 break
35762 }
35763 c := auxIntToInt8(v_0.AuxInt)
35764 v.reset(OpConst32)
35765 v.AuxInt = int32ToAuxInt(int32(uint8(c)))
35766 return true
35767 }
35768
35769
35770
35771 for {
35772 if v_0.Op != OpTrunc32to8 {
35773 break
35774 }
35775 x := v_0.Args[0]
35776 if x.Op != OpRsh32Ux64 {
35777 break
35778 }
35779 _ = x.Args[1]
35780 x_1 := x.Args[1]
35781 if x_1.Op != OpConst64 {
35782 break
35783 }
35784 s := auxIntToInt64(x_1.AuxInt)
35785 if !(s >= 24) {
35786 break
35787 }
35788 v.copyOf(x)
35789 return true
35790 }
35791 return false
35792 }
35793 func rewriteValuegeneric_OpZeroExt8to64(v *Value) bool {
35794 v_0 := v.Args[0]
35795
35796
35797 for {
35798 if v_0.Op != OpConst8 {
35799 break
35800 }
35801 c := auxIntToInt8(v_0.AuxInt)
35802 v.reset(OpConst64)
35803 v.AuxInt = int64ToAuxInt(int64(uint8(c)))
35804 return true
35805 }
35806
35807
35808
35809 for {
35810 if v_0.Op != OpTrunc64to8 {
35811 break
35812 }
35813 x := v_0.Args[0]
35814 if x.Op != OpRsh64Ux64 {
35815 break
35816 }
35817 _ = x.Args[1]
35818 x_1 := x.Args[1]
35819 if x_1.Op != OpConst64 {
35820 break
35821 }
35822 s := auxIntToInt64(x_1.AuxInt)
35823 if !(s >= 56) {
35824 break
35825 }
35826 v.copyOf(x)
35827 return true
35828 }
35829 return false
35830 }
35831 func rewriteBlockgeneric(b *Block) bool {
35832 switch b.Kind {
35833 case BlockIf:
35834
35835
35836 for b.Controls[0].Op == OpNot {
35837 v_0 := b.Controls[0]
35838 cond := v_0.Args[0]
35839 b.resetWithControl(BlockIf, cond)
35840 b.swapSuccessors()
35841 return true
35842 }
35843
35844
35845
35846 for b.Controls[0].Op == OpConstBool {
35847 v_0 := b.Controls[0]
35848 c := auxIntToBool(v_0.AuxInt)
35849 if !(c) {
35850 break
35851 }
35852 b.Reset(BlockFirst)
35853 return true
35854 }
35855
35856
35857
35858 for b.Controls[0].Op == OpConstBool {
35859 v_0 := b.Controls[0]
35860 c := auxIntToBool(v_0.AuxInt)
35861 if !(!c) {
35862 break
35863 }
35864 b.Reset(BlockFirst)
35865 b.swapSuccessors()
35866 return true
35867 }
35868 }
35869 return false
35870 }
35871
View as plain text