1
2
3
4 package ssa
5
6 import "math"
7 import "cmd/compile/internal/types"
8
9 func rewriteValuegeneric(v *Value) bool {
10 switch v.Op {
11 case OpAdd16:
12 return rewriteValuegeneric_OpAdd16(v)
13 case OpAdd32:
14 return rewriteValuegeneric_OpAdd32(v)
15 case OpAdd32F:
16 return rewriteValuegeneric_OpAdd32F(v)
17 case OpAdd64:
18 return rewriteValuegeneric_OpAdd64(v)
19 case OpAdd64F:
20 return rewriteValuegeneric_OpAdd64F(v)
21 case OpAdd8:
22 return rewriteValuegeneric_OpAdd8(v)
23 case OpAddPtr:
24 return rewriteValuegeneric_OpAddPtr(v)
25 case OpAnd16:
26 return rewriteValuegeneric_OpAnd16(v)
27 case OpAnd32:
28 return rewriteValuegeneric_OpAnd32(v)
29 case OpAnd64:
30 return rewriteValuegeneric_OpAnd64(v)
31 case OpAnd8:
32 return rewriteValuegeneric_OpAnd8(v)
33 case OpAndB:
34 return rewriteValuegeneric_OpAndB(v)
35 case OpArraySelect:
36 return rewriteValuegeneric_OpArraySelect(v)
37 case OpCom16:
38 return rewriteValuegeneric_OpCom16(v)
39 case OpCom32:
40 return rewriteValuegeneric_OpCom32(v)
41 case OpCom64:
42 return rewriteValuegeneric_OpCom64(v)
43 case OpCom8:
44 return rewriteValuegeneric_OpCom8(v)
45 case OpConstInterface:
46 return rewriteValuegeneric_OpConstInterface(v)
47 case OpConstSlice:
48 return rewriteValuegeneric_OpConstSlice(v)
49 case OpConstString:
50 return rewriteValuegeneric_OpConstString(v)
51 case OpConvert:
52 return rewriteValuegeneric_OpConvert(v)
53 case OpCtz16:
54 return rewriteValuegeneric_OpCtz16(v)
55 case OpCtz32:
56 return rewriteValuegeneric_OpCtz32(v)
57 case OpCtz64:
58 return rewriteValuegeneric_OpCtz64(v)
59 case OpCtz8:
60 return rewriteValuegeneric_OpCtz8(v)
61 case OpCvt32Fto32:
62 return rewriteValuegeneric_OpCvt32Fto32(v)
63 case OpCvt32Fto64:
64 return rewriteValuegeneric_OpCvt32Fto64(v)
65 case OpCvt32Fto64F:
66 return rewriteValuegeneric_OpCvt32Fto64F(v)
67 case OpCvt32to32F:
68 return rewriteValuegeneric_OpCvt32to32F(v)
69 case OpCvt32to64F:
70 return rewriteValuegeneric_OpCvt32to64F(v)
71 case OpCvt64Fto32:
72 return rewriteValuegeneric_OpCvt64Fto32(v)
73 case OpCvt64Fto32F:
74 return rewriteValuegeneric_OpCvt64Fto32F(v)
75 case OpCvt64Fto64:
76 return rewriteValuegeneric_OpCvt64Fto64(v)
77 case OpCvt64to32F:
78 return rewriteValuegeneric_OpCvt64to32F(v)
79 case OpCvt64to64F:
80 return rewriteValuegeneric_OpCvt64to64F(v)
81 case OpCvtBoolToUint8:
82 return rewriteValuegeneric_OpCvtBoolToUint8(v)
83 case OpDiv16:
84 return rewriteValuegeneric_OpDiv16(v)
85 case OpDiv16u:
86 return rewriteValuegeneric_OpDiv16u(v)
87 case OpDiv32:
88 return rewriteValuegeneric_OpDiv32(v)
89 case OpDiv32F:
90 return rewriteValuegeneric_OpDiv32F(v)
91 case OpDiv32u:
92 return rewriteValuegeneric_OpDiv32u(v)
93 case OpDiv64:
94 return rewriteValuegeneric_OpDiv64(v)
95 case OpDiv64F:
96 return rewriteValuegeneric_OpDiv64F(v)
97 case OpDiv64u:
98 return rewriteValuegeneric_OpDiv64u(v)
99 case OpDiv8:
100 return rewriteValuegeneric_OpDiv8(v)
101 case OpDiv8u:
102 return rewriteValuegeneric_OpDiv8u(v)
103 case OpEq16:
104 return rewriteValuegeneric_OpEq16(v)
105 case OpEq32:
106 return rewriteValuegeneric_OpEq32(v)
107 case OpEq32F:
108 return rewriteValuegeneric_OpEq32F(v)
109 case OpEq64:
110 return rewriteValuegeneric_OpEq64(v)
111 case OpEq64F:
112 return rewriteValuegeneric_OpEq64F(v)
113 case OpEq8:
114 return rewriteValuegeneric_OpEq8(v)
115 case OpEqB:
116 return rewriteValuegeneric_OpEqB(v)
117 case OpEqInter:
118 return rewriteValuegeneric_OpEqInter(v)
119 case OpEqPtr:
120 return rewriteValuegeneric_OpEqPtr(v)
121 case OpEqSlice:
122 return rewriteValuegeneric_OpEqSlice(v)
123 case OpIMake:
124 return rewriteValuegeneric_OpIMake(v)
125 case OpInterLECall:
126 return rewriteValuegeneric_OpInterLECall(v)
127 case OpIsInBounds:
128 return rewriteValuegeneric_OpIsInBounds(v)
129 case OpIsNonNil:
130 return rewriteValuegeneric_OpIsNonNil(v)
131 case OpIsSliceInBounds:
132 return rewriteValuegeneric_OpIsSliceInBounds(v)
133 case OpLeq16:
134 return rewriteValuegeneric_OpLeq16(v)
135 case OpLeq16U:
136 return rewriteValuegeneric_OpLeq16U(v)
137 case OpLeq32:
138 return rewriteValuegeneric_OpLeq32(v)
139 case OpLeq32F:
140 return rewriteValuegeneric_OpLeq32F(v)
141 case OpLeq32U:
142 return rewriteValuegeneric_OpLeq32U(v)
143 case OpLeq64:
144 return rewriteValuegeneric_OpLeq64(v)
145 case OpLeq64F:
146 return rewriteValuegeneric_OpLeq64F(v)
147 case OpLeq64U:
148 return rewriteValuegeneric_OpLeq64U(v)
149 case OpLeq8:
150 return rewriteValuegeneric_OpLeq8(v)
151 case OpLeq8U:
152 return rewriteValuegeneric_OpLeq8U(v)
153 case OpLess16:
154 return rewriteValuegeneric_OpLess16(v)
155 case OpLess16U:
156 return rewriteValuegeneric_OpLess16U(v)
157 case OpLess32:
158 return rewriteValuegeneric_OpLess32(v)
159 case OpLess32F:
160 return rewriteValuegeneric_OpLess32F(v)
161 case OpLess32U:
162 return rewriteValuegeneric_OpLess32U(v)
163 case OpLess64:
164 return rewriteValuegeneric_OpLess64(v)
165 case OpLess64F:
166 return rewriteValuegeneric_OpLess64F(v)
167 case OpLess64U:
168 return rewriteValuegeneric_OpLess64U(v)
169 case OpLess8:
170 return rewriteValuegeneric_OpLess8(v)
171 case OpLess8U:
172 return rewriteValuegeneric_OpLess8U(v)
173 case OpLoad:
174 return rewriteValuegeneric_OpLoad(v)
175 case OpLsh16x16:
176 return rewriteValuegeneric_OpLsh16x16(v)
177 case OpLsh16x32:
178 return rewriteValuegeneric_OpLsh16x32(v)
179 case OpLsh16x64:
180 return rewriteValuegeneric_OpLsh16x64(v)
181 case OpLsh16x8:
182 return rewriteValuegeneric_OpLsh16x8(v)
183 case OpLsh32x16:
184 return rewriteValuegeneric_OpLsh32x16(v)
185 case OpLsh32x32:
186 return rewriteValuegeneric_OpLsh32x32(v)
187 case OpLsh32x64:
188 return rewriteValuegeneric_OpLsh32x64(v)
189 case OpLsh32x8:
190 return rewriteValuegeneric_OpLsh32x8(v)
191 case OpLsh64x16:
192 return rewriteValuegeneric_OpLsh64x16(v)
193 case OpLsh64x32:
194 return rewriteValuegeneric_OpLsh64x32(v)
195 case OpLsh64x64:
196 return rewriteValuegeneric_OpLsh64x64(v)
197 case OpLsh64x8:
198 return rewriteValuegeneric_OpLsh64x8(v)
199 case OpLsh8x16:
200 return rewriteValuegeneric_OpLsh8x16(v)
201 case OpLsh8x32:
202 return rewriteValuegeneric_OpLsh8x32(v)
203 case OpLsh8x64:
204 return rewriteValuegeneric_OpLsh8x64(v)
205 case OpLsh8x8:
206 return rewriteValuegeneric_OpLsh8x8(v)
207 case OpMod16:
208 return rewriteValuegeneric_OpMod16(v)
209 case OpMod16u:
210 return rewriteValuegeneric_OpMod16u(v)
211 case OpMod32:
212 return rewriteValuegeneric_OpMod32(v)
213 case OpMod32u:
214 return rewriteValuegeneric_OpMod32u(v)
215 case OpMod64:
216 return rewriteValuegeneric_OpMod64(v)
217 case OpMod64u:
218 return rewriteValuegeneric_OpMod64u(v)
219 case OpMod8:
220 return rewriteValuegeneric_OpMod8(v)
221 case OpMod8u:
222 return rewriteValuegeneric_OpMod8u(v)
223 case OpMove:
224 return rewriteValuegeneric_OpMove(v)
225 case OpMul16:
226 return rewriteValuegeneric_OpMul16(v)
227 case OpMul32:
228 return rewriteValuegeneric_OpMul32(v)
229 case OpMul32F:
230 return rewriteValuegeneric_OpMul32F(v)
231 case OpMul64:
232 return rewriteValuegeneric_OpMul64(v)
233 case OpMul64F:
234 return rewriteValuegeneric_OpMul64F(v)
235 case OpMul8:
236 return rewriteValuegeneric_OpMul8(v)
237 case OpNeg16:
238 return rewriteValuegeneric_OpNeg16(v)
239 case OpNeg32:
240 return rewriteValuegeneric_OpNeg32(v)
241 case OpNeg32F:
242 return rewriteValuegeneric_OpNeg32F(v)
243 case OpNeg64:
244 return rewriteValuegeneric_OpNeg64(v)
245 case OpNeg64F:
246 return rewriteValuegeneric_OpNeg64F(v)
247 case OpNeg8:
248 return rewriteValuegeneric_OpNeg8(v)
249 case OpNeq16:
250 return rewriteValuegeneric_OpNeq16(v)
251 case OpNeq32:
252 return rewriteValuegeneric_OpNeq32(v)
253 case OpNeq32F:
254 return rewriteValuegeneric_OpNeq32F(v)
255 case OpNeq64:
256 return rewriteValuegeneric_OpNeq64(v)
257 case OpNeq64F:
258 return rewriteValuegeneric_OpNeq64F(v)
259 case OpNeq8:
260 return rewriteValuegeneric_OpNeq8(v)
261 case OpNeqB:
262 return rewriteValuegeneric_OpNeqB(v)
263 case OpNeqInter:
264 return rewriteValuegeneric_OpNeqInter(v)
265 case OpNeqPtr:
266 return rewriteValuegeneric_OpNeqPtr(v)
267 case OpNeqSlice:
268 return rewriteValuegeneric_OpNeqSlice(v)
269 case OpNilCheck:
270 return rewriteValuegeneric_OpNilCheck(v)
271 case OpNot:
272 return rewriteValuegeneric_OpNot(v)
273 case OpOffPtr:
274 return rewriteValuegeneric_OpOffPtr(v)
275 case OpOr16:
276 return rewriteValuegeneric_OpOr16(v)
277 case OpOr32:
278 return rewriteValuegeneric_OpOr32(v)
279 case OpOr64:
280 return rewriteValuegeneric_OpOr64(v)
281 case OpOr8:
282 return rewriteValuegeneric_OpOr8(v)
283 case OpOrB:
284 return rewriteValuegeneric_OpOrB(v)
285 case OpPhi:
286 return rewriteValuegeneric_OpPhi(v)
287 case OpPtrIndex:
288 return rewriteValuegeneric_OpPtrIndex(v)
289 case OpRotateLeft16:
290 return rewriteValuegeneric_OpRotateLeft16(v)
291 case OpRotateLeft32:
292 return rewriteValuegeneric_OpRotateLeft32(v)
293 case OpRotateLeft64:
294 return rewriteValuegeneric_OpRotateLeft64(v)
295 case OpRotateLeft8:
296 return rewriteValuegeneric_OpRotateLeft8(v)
297 case OpRound32F:
298 return rewriteValuegeneric_OpRound32F(v)
299 case OpRound64F:
300 return rewriteValuegeneric_OpRound64F(v)
301 case OpRsh16Ux16:
302 return rewriteValuegeneric_OpRsh16Ux16(v)
303 case OpRsh16Ux32:
304 return rewriteValuegeneric_OpRsh16Ux32(v)
305 case OpRsh16Ux64:
306 return rewriteValuegeneric_OpRsh16Ux64(v)
307 case OpRsh16Ux8:
308 return rewriteValuegeneric_OpRsh16Ux8(v)
309 case OpRsh16x16:
310 return rewriteValuegeneric_OpRsh16x16(v)
311 case OpRsh16x32:
312 return rewriteValuegeneric_OpRsh16x32(v)
313 case OpRsh16x64:
314 return rewriteValuegeneric_OpRsh16x64(v)
315 case OpRsh16x8:
316 return rewriteValuegeneric_OpRsh16x8(v)
317 case OpRsh32Ux16:
318 return rewriteValuegeneric_OpRsh32Ux16(v)
319 case OpRsh32Ux32:
320 return rewriteValuegeneric_OpRsh32Ux32(v)
321 case OpRsh32Ux64:
322 return rewriteValuegeneric_OpRsh32Ux64(v)
323 case OpRsh32Ux8:
324 return rewriteValuegeneric_OpRsh32Ux8(v)
325 case OpRsh32x16:
326 return rewriteValuegeneric_OpRsh32x16(v)
327 case OpRsh32x32:
328 return rewriteValuegeneric_OpRsh32x32(v)
329 case OpRsh32x64:
330 return rewriteValuegeneric_OpRsh32x64(v)
331 case OpRsh32x8:
332 return rewriteValuegeneric_OpRsh32x8(v)
333 case OpRsh64Ux16:
334 return rewriteValuegeneric_OpRsh64Ux16(v)
335 case OpRsh64Ux32:
336 return rewriteValuegeneric_OpRsh64Ux32(v)
337 case OpRsh64Ux64:
338 return rewriteValuegeneric_OpRsh64Ux64(v)
339 case OpRsh64Ux8:
340 return rewriteValuegeneric_OpRsh64Ux8(v)
341 case OpRsh64x16:
342 return rewriteValuegeneric_OpRsh64x16(v)
343 case OpRsh64x32:
344 return rewriteValuegeneric_OpRsh64x32(v)
345 case OpRsh64x64:
346 return rewriteValuegeneric_OpRsh64x64(v)
347 case OpRsh64x8:
348 return rewriteValuegeneric_OpRsh64x8(v)
349 case OpRsh8Ux16:
350 return rewriteValuegeneric_OpRsh8Ux16(v)
351 case OpRsh8Ux32:
352 return rewriteValuegeneric_OpRsh8Ux32(v)
353 case OpRsh8Ux64:
354 return rewriteValuegeneric_OpRsh8Ux64(v)
355 case OpRsh8Ux8:
356 return rewriteValuegeneric_OpRsh8Ux8(v)
357 case OpRsh8x16:
358 return rewriteValuegeneric_OpRsh8x16(v)
359 case OpRsh8x32:
360 return rewriteValuegeneric_OpRsh8x32(v)
361 case OpRsh8x64:
362 return rewriteValuegeneric_OpRsh8x64(v)
363 case OpRsh8x8:
364 return rewriteValuegeneric_OpRsh8x8(v)
365 case OpSelect0:
366 return rewriteValuegeneric_OpSelect0(v)
367 case OpSelect1:
368 return rewriteValuegeneric_OpSelect1(v)
369 case OpSelectN:
370 return rewriteValuegeneric_OpSelectN(v)
371 case OpSignExt16to32:
372 return rewriteValuegeneric_OpSignExt16to32(v)
373 case OpSignExt16to64:
374 return rewriteValuegeneric_OpSignExt16to64(v)
375 case OpSignExt32to64:
376 return rewriteValuegeneric_OpSignExt32to64(v)
377 case OpSignExt8to16:
378 return rewriteValuegeneric_OpSignExt8to16(v)
379 case OpSignExt8to32:
380 return rewriteValuegeneric_OpSignExt8to32(v)
381 case OpSignExt8to64:
382 return rewriteValuegeneric_OpSignExt8to64(v)
383 case OpSliceCap:
384 return rewriteValuegeneric_OpSliceCap(v)
385 case OpSliceLen:
386 return rewriteValuegeneric_OpSliceLen(v)
387 case OpSlicePtr:
388 return rewriteValuegeneric_OpSlicePtr(v)
389 case OpSlicemask:
390 return rewriteValuegeneric_OpSlicemask(v)
391 case OpSqrt:
392 return rewriteValuegeneric_OpSqrt(v)
393 case OpStaticLECall:
394 return rewriteValuegeneric_OpStaticLECall(v)
395 case OpStore:
396 return rewriteValuegeneric_OpStore(v)
397 case OpStringLen:
398 return rewriteValuegeneric_OpStringLen(v)
399 case OpStringPtr:
400 return rewriteValuegeneric_OpStringPtr(v)
401 case OpStructSelect:
402 return rewriteValuegeneric_OpStructSelect(v)
403 case OpSub16:
404 return rewriteValuegeneric_OpSub16(v)
405 case OpSub32:
406 return rewriteValuegeneric_OpSub32(v)
407 case OpSub32F:
408 return rewriteValuegeneric_OpSub32F(v)
409 case OpSub64:
410 return rewriteValuegeneric_OpSub64(v)
411 case OpSub64F:
412 return rewriteValuegeneric_OpSub64F(v)
413 case OpSub8:
414 return rewriteValuegeneric_OpSub8(v)
415 case OpTrunc16to8:
416 return rewriteValuegeneric_OpTrunc16to8(v)
417 case OpTrunc32to16:
418 return rewriteValuegeneric_OpTrunc32to16(v)
419 case OpTrunc32to8:
420 return rewriteValuegeneric_OpTrunc32to8(v)
421 case OpTrunc64to16:
422 return rewriteValuegeneric_OpTrunc64to16(v)
423 case OpTrunc64to32:
424 return rewriteValuegeneric_OpTrunc64to32(v)
425 case OpTrunc64to8:
426 return rewriteValuegeneric_OpTrunc64to8(v)
427 case OpXor16:
428 return rewriteValuegeneric_OpXor16(v)
429 case OpXor32:
430 return rewriteValuegeneric_OpXor32(v)
431 case OpXor64:
432 return rewriteValuegeneric_OpXor64(v)
433 case OpXor8:
434 return rewriteValuegeneric_OpXor8(v)
435 case OpZero:
436 return rewriteValuegeneric_OpZero(v)
437 case OpZeroExt16to32:
438 return rewriteValuegeneric_OpZeroExt16to32(v)
439 case OpZeroExt16to64:
440 return rewriteValuegeneric_OpZeroExt16to64(v)
441 case OpZeroExt32to64:
442 return rewriteValuegeneric_OpZeroExt32to64(v)
443 case OpZeroExt8to16:
444 return rewriteValuegeneric_OpZeroExt8to16(v)
445 case OpZeroExt8to32:
446 return rewriteValuegeneric_OpZeroExt8to32(v)
447 case OpZeroExt8to64:
448 return rewriteValuegeneric_OpZeroExt8to64(v)
449 }
450 return false
451 }
452 func rewriteValuegeneric_OpAdd16(v *Value) bool {
453 v_1 := v.Args[1]
454 v_0 := v.Args[0]
455 b := v.Block
456
457
458 for {
459 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
460 if v_0.Op != OpConst16 {
461 continue
462 }
463 c := auxIntToInt16(v_0.AuxInt)
464 if v_1.Op != OpConst16 {
465 continue
466 }
467 d := auxIntToInt16(v_1.AuxInt)
468 v.reset(OpConst16)
469 v.AuxInt = int16ToAuxInt(c + d)
470 return true
471 }
472 break
473 }
474
475
476 for {
477 t := v.Type
478 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
479 if v_0.Op != OpMul16 {
480 continue
481 }
482 _ = v_0.Args[1]
483 v_0_0 := v_0.Args[0]
484 v_0_1 := v_0.Args[1]
485 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
486 x := v_0_0
487 y := v_0_1
488 if v_1.Op != OpMul16 {
489 continue
490 }
491 _ = v_1.Args[1]
492 v_1_0 := v_1.Args[0]
493 v_1_1 := v_1.Args[1]
494 for _i2 := 0; _i2 <= 1; _i2, v_1_0, v_1_1 = _i2+1, v_1_1, v_1_0 {
495 if x != v_1_0 {
496 continue
497 }
498 z := v_1_1
499 v.reset(OpMul16)
500 v0 := b.NewValue0(v.Pos, OpAdd16, t)
501 v0.AddArg2(y, z)
502 v.AddArg2(x, v0)
503 return true
504 }
505 }
506 }
507 break
508 }
509
510
511 for {
512 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
513 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 {
514 continue
515 }
516 x := v_1
517 v.copyOf(x)
518 return true
519 }
520 break
521 }
522
523
524 for {
525 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
526 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 1 || v_1.Op != OpCom16 {
527 continue
528 }
529 x := v_1.Args[0]
530 v.reset(OpNeg16)
531 v.AddArg(x)
532 return true
533 }
534 break
535 }
536
537
538 for {
539 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
540 x := v_0
541 if v_1.Op != OpSub16 {
542 continue
543 }
544 _ = v_1.Args[1]
545 y := v_1.Args[0]
546 if x != v_1.Args[1] {
547 continue
548 }
549 v.copyOf(y)
550 return true
551 }
552 break
553 }
554
555
556 for {
557 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
558 x := v_0
559 if v_1.Op != OpAdd16 {
560 continue
561 }
562 _ = v_1.Args[1]
563 v_1_0 := v_1.Args[0]
564 v_1_1 := v_1.Args[1]
565 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
566 y := v_1_0
567 if v_1_1.Op != OpSub16 {
568 continue
569 }
570 _ = v_1_1.Args[1]
571 z := v_1_1.Args[0]
572 if x != v_1_1.Args[1] {
573 continue
574 }
575 v.reset(OpAdd16)
576 v.AddArg2(y, z)
577 return true
578 }
579 }
580 break
581 }
582
583
584
585 for {
586 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
587 if v_0.Op != OpAdd16 {
588 continue
589 }
590 _ = v_0.Args[1]
591 v_0_0 := v_0.Args[0]
592 v_0_1 := v_0.Args[1]
593 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
594 i := v_0_0
595 if i.Op != OpConst16 {
596 continue
597 }
598 t := i.Type
599 z := v_0_1
600 x := v_1
601 if !(z.Op != OpConst16 && x.Op != OpConst16) {
602 continue
603 }
604 v.reset(OpAdd16)
605 v0 := b.NewValue0(v.Pos, OpAdd16, t)
606 v0.AddArg2(z, x)
607 v.AddArg2(i, v0)
608 return true
609 }
610 }
611 break
612 }
613
614
615
616 for {
617 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
618 if v_0.Op != OpSub16 {
619 continue
620 }
621 z := v_0.Args[1]
622 i := v_0.Args[0]
623 if i.Op != OpConst16 {
624 continue
625 }
626 t := i.Type
627 x := v_1
628 if !(z.Op != OpConst16 && x.Op != OpConst16) {
629 continue
630 }
631 v.reset(OpAdd16)
632 v0 := b.NewValue0(v.Pos, OpSub16, t)
633 v0.AddArg2(x, z)
634 v.AddArg2(i, v0)
635 return true
636 }
637 break
638 }
639
640
641 for {
642 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
643 if v_0.Op != OpConst16 {
644 continue
645 }
646 t := v_0.Type
647 c := auxIntToInt16(v_0.AuxInt)
648 if v_1.Op != OpAdd16 {
649 continue
650 }
651 _ = v_1.Args[1]
652 v_1_0 := v_1.Args[0]
653 v_1_1 := v_1.Args[1]
654 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
655 if v_1_0.Op != OpConst16 || v_1_0.Type != t {
656 continue
657 }
658 d := auxIntToInt16(v_1_0.AuxInt)
659 x := v_1_1
660 v.reset(OpAdd16)
661 v0 := b.NewValue0(v.Pos, OpConst16, t)
662 v0.AuxInt = int16ToAuxInt(c + d)
663 v.AddArg2(v0, x)
664 return true
665 }
666 }
667 break
668 }
669
670
671 for {
672 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
673 if v_0.Op != OpConst16 {
674 continue
675 }
676 t := v_0.Type
677 c := auxIntToInt16(v_0.AuxInt)
678 if v_1.Op != OpSub16 {
679 continue
680 }
681 x := v_1.Args[1]
682 v_1_0 := v_1.Args[0]
683 if v_1_0.Op != OpConst16 || v_1_0.Type != t {
684 continue
685 }
686 d := auxIntToInt16(v_1_0.AuxInt)
687 v.reset(OpSub16)
688 v0 := b.NewValue0(v.Pos, OpConst16, t)
689 v0.AuxInt = int16ToAuxInt(c + d)
690 v.AddArg2(v0, x)
691 return true
692 }
693 break
694 }
695 return false
696 }
697 func rewriteValuegeneric_OpAdd32(v *Value) bool {
698 v_1 := v.Args[1]
699 v_0 := v.Args[0]
700 b := v.Block
701
702
703 for {
704 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
705 if v_0.Op != OpConst32 {
706 continue
707 }
708 c := auxIntToInt32(v_0.AuxInt)
709 if v_1.Op != OpConst32 {
710 continue
711 }
712 d := auxIntToInt32(v_1.AuxInt)
713 v.reset(OpConst32)
714 v.AuxInt = int32ToAuxInt(c + d)
715 return true
716 }
717 break
718 }
719
720
721 for {
722 t := v.Type
723 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
724 if v_0.Op != OpMul32 {
725 continue
726 }
727 _ = v_0.Args[1]
728 v_0_0 := v_0.Args[0]
729 v_0_1 := v_0.Args[1]
730 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
731 x := v_0_0
732 y := v_0_1
733 if v_1.Op != OpMul32 {
734 continue
735 }
736 _ = v_1.Args[1]
737 v_1_0 := v_1.Args[0]
738 v_1_1 := v_1.Args[1]
739 for _i2 := 0; _i2 <= 1; _i2, v_1_0, v_1_1 = _i2+1, v_1_1, v_1_0 {
740 if x != v_1_0 {
741 continue
742 }
743 z := v_1_1
744 v.reset(OpMul32)
745 v0 := b.NewValue0(v.Pos, OpAdd32, t)
746 v0.AddArg2(y, z)
747 v.AddArg2(x, v0)
748 return true
749 }
750 }
751 }
752 break
753 }
754
755
756 for {
757 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
758 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
759 continue
760 }
761 x := v_1
762 v.copyOf(x)
763 return true
764 }
765 break
766 }
767
768
769 for {
770 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
771 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 1 || v_1.Op != OpCom32 {
772 continue
773 }
774 x := v_1.Args[0]
775 v.reset(OpNeg32)
776 v.AddArg(x)
777 return true
778 }
779 break
780 }
781
782
783 for {
784 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
785 x := v_0
786 if v_1.Op != OpSub32 {
787 continue
788 }
789 _ = v_1.Args[1]
790 y := v_1.Args[0]
791 if x != v_1.Args[1] {
792 continue
793 }
794 v.copyOf(y)
795 return true
796 }
797 break
798 }
799
800
801 for {
802 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
803 x := v_0
804 if v_1.Op != OpAdd32 {
805 continue
806 }
807 _ = v_1.Args[1]
808 v_1_0 := v_1.Args[0]
809 v_1_1 := v_1.Args[1]
810 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
811 y := v_1_0
812 if v_1_1.Op != OpSub32 {
813 continue
814 }
815 _ = v_1_1.Args[1]
816 z := v_1_1.Args[0]
817 if x != v_1_1.Args[1] {
818 continue
819 }
820 v.reset(OpAdd32)
821 v.AddArg2(y, z)
822 return true
823 }
824 }
825 break
826 }
827
828
829
830 for {
831 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
832 if v_0.Op != OpAdd32 {
833 continue
834 }
835 _ = v_0.Args[1]
836 v_0_0 := v_0.Args[0]
837 v_0_1 := v_0.Args[1]
838 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
839 i := v_0_0
840 if i.Op != OpConst32 {
841 continue
842 }
843 t := i.Type
844 z := v_0_1
845 x := v_1
846 if !(z.Op != OpConst32 && x.Op != OpConst32) {
847 continue
848 }
849 v.reset(OpAdd32)
850 v0 := b.NewValue0(v.Pos, OpAdd32, t)
851 v0.AddArg2(z, x)
852 v.AddArg2(i, v0)
853 return true
854 }
855 }
856 break
857 }
858
859
860
861 for {
862 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
863 if v_0.Op != OpSub32 {
864 continue
865 }
866 z := v_0.Args[1]
867 i := v_0.Args[0]
868 if i.Op != OpConst32 {
869 continue
870 }
871 t := i.Type
872 x := v_1
873 if !(z.Op != OpConst32 && x.Op != OpConst32) {
874 continue
875 }
876 v.reset(OpAdd32)
877 v0 := b.NewValue0(v.Pos, OpSub32, t)
878 v0.AddArg2(x, z)
879 v.AddArg2(i, v0)
880 return true
881 }
882 break
883 }
884
885
886 for {
887 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
888 if v_0.Op != OpConst32 {
889 continue
890 }
891 t := v_0.Type
892 c := auxIntToInt32(v_0.AuxInt)
893 if v_1.Op != OpAdd32 {
894 continue
895 }
896 _ = v_1.Args[1]
897 v_1_0 := v_1.Args[0]
898 v_1_1 := v_1.Args[1]
899 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
900 if v_1_0.Op != OpConst32 || v_1_0.Type != t {
901 continue
902 }
903 d := auxIntToInt32(v_1_0.AuxInt)
904 x := v_1_1
905 v.reset(OpAdd32)
906 v0 := b.NewValue0(v.Pos, OpConst32, t)
907 v0.AuxInt = int32ToAuxInt(c + d)
908 v.AddArg2(v0, x)
909 return true
910 }
911 }
912 break
913 }
914
915
916 for {
917 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
918 if v_0.Op != OpConst32 {
919 continue
920 }
921 t := v_0.Type
922 c := auxIntToInt32(v_0.AuxInt)
923 if v_1.Op != OpSub32 {
924 continue
925 }
926 x := v_1.Args[1]
927 v_1_0 := v_1.Args[0]
928 if v_1_0.Op != OpConst32 || v_1_0.Type != t {
929 continue
930 }
931 d := auxIntToInt32(v_1_0.AuxInt)
932 v.reset(OpSub32)
933 v0 := b.NewValue0(v.Pos, OpConst32, t)
934 v0.AuxInt = int32ToAuxInt(c + d)
935 v.AddArg2(v0, x)
936 return true
937 }
938 break
939 }
940 return false
941 }
942 func rewriteValuegeneric_OpAdd32F(v *Value) bool {
943 v_1 := v.Args[1]
944 v_0 := v.Args[0]
945
946
947
948 for {
949 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
950 if v_0.Op != OpConst32F {
951 continue
952 }
953 c := auxIntToFloat32(v_0.AuxInt)
954 if v_1.Op != OpConst32F {
955 continue
956 }
957 d := auxIntToFloat32(v_1.AuxInt)
958 if !(c+d == c+d) {
959 continue
960 }
961 v.reset(OpConst32F)
962 v.AuxInt = float32ToAuxInt(c + d)
963 return true
964 }
965 break
966 }
967 return false
968 }
969 func rewriteValuegeneric_OpAdd64(v *Value) bool {
970 v_1 := v.Args[1]
971 v_0 := v.Args[0]
972 b := v.Block
973
974
975 for {
976 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
977 if v_0.Op != OpConst64 {
978 continue
979 }
980 c := auxIntToInt64(v_0.AuxInt)
981 if v_1.Op != OpConst64 {
982 continue
983 }
984 d := auxIntToInt64(v_1.AuxInt)
985 v.reset(OpConst64)
986 v.AuxInt = int64ToAuxInt(c + d)
987 return true
988 }
989 break
990 }
991
992
993 for {
994 t := v.Type
995 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
996 if v_0.Op != OpMul64 {
997 continue
998 }
999 _ = v_0.Args[1]
1000 v_0_0 := v_0.Args[0]
1001 v_0_1 := v_0.Args[1]
1002 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
1003 x := v_0_0
1004 y := v_0_1
1005 if v_1.Op != OpMul64 {
1006 continue
1007 }
1008 _ = v_1.Args[1]
1009 v_1_0 := v_1.Args[0]
1010 v_1_1 := v_1.Args[1]
1011 for _i2 := 0; _i2 <= 1; _i2, v_1_0, v_1_1 = _i2+1, v_1_1, v_1_0 {
1012 if x != v_1_0 {
1013 continue
1014 }
1015 z := v_1_1
1016 v.reset(OpMul64)
1017 v0 := b.NewValue0(v.Pos, OpAdd64, t)
1018 v0.AddArg2(y, z)
1019 v.AddArg2(x, v0)
1020 return true
1021 }
1022 }
1023 }
1024 break
1025 }
1026
1027
1028 for {
1029 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1030 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
1031 continue
1032 }
1033 x := v_1
1034 v.copyOf(x)
1035 return true
1036 }
1037 break
1038 }
1039
1040
1041 for {
1042 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1043 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 1 || v_1.Op != OpCom64 {
1044 continue
1045 }
1046 x := v_1.Args[0]
1047 v.reset(OpNeg64)
1048 v.AddArg(x)
1049 return true
1050 }
1051 break
1052 }
1053
1054
1055 for {
1056 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1057 x := v_0
1058 if v_1.Op != OpSub64 {
1059 continue
1060 }
1061 _ = v_1.Args[1]
1062 y := v_1.Args[0]
1063 if x != v_1.Args[1] {
1064 continue
1065 }
1066 v.copyOf(y)
1067 return true
1068 }
1069 break
1070 }
1071
1072
1073 for {
1074 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1075 x := v_0
1076 if v_1.Op != OpAdd64 {
1077 continue
1078 }
1079 _ = v_1.Args[1]
1080 v_1_0 := v_1.Args[0]
1081 v_1_1 := v_1.Args[1]
1082 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
1083 y := v_1_0
1084 if v_1_1.Op != OpSub64 {
1085 continue
1086 }
1087 _ = v_1_1.Args[1]
1088 z := v_1_1.Args[0]
1089 if x != v_1_1.Args[1] {
1090 continue
1091 }
1092 v.reset(OpAdd64)
1093 v.AddArg2(y, z)
1094 return true
1095 }
1096 }
1097 break
1098 }
1099
1100
1101
1102 for {
1103 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1104 if v_0.Op != OpAdd64 {
1105 continue
1106 }
1107 _ = v_0.Args[1]
1108 v_0_0 := v_0.Args[0]
1109 v_0_1 := v_0.Args[1]
1110 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
1111 i := v_0_0
1112 if i.Op != OpConst64 {
1113 continue
1114 }
1115 t := i.Type
1116 z := v_0_1
1117 x := v_1
1118 if !(z.Op != OpConst64 && x.Op != OpConst64) {
1119 continue
1120 }
1121 v.reset(OpAdd64)
1122 v0 := b.NewValue0(v.Pos, OpAdd64, t)
1123 v0.AddArg2(z, x)
1124 v.AddArg2(i, v0)
1125 return true
1126 }
1127 }
1128 break
1129 }
1130
1131
1132
1133 for {
1134 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1135 if v_0.Op != OpSub64 {
1136 continue
1137 }
1138 z := v_0.Args[1]
1139 i := v_0.Args[0]
1140 if i.Op != OpConst64 {
1141 continue
1142 }
1143 t := i.Type
1144 x := v_1
1145 if !(z.Op != OpConst64 && x.Op != OpConst64) {
1146 continue
1147 }
1148 v.reset(OpAdd64)
1149 v0 := b.NewValue0(v.Pos, OpSub64, t)
1150 v0.AddArg2(x, z)
1151 v.AddArg2(i, v0)
1152 return true
1153 }
1154 break
1155 }
1156
1157
1158 for {
1159 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1160 if v_0.Op != OpConst64 {
1161 continue
1162 }
1163 t := v_0.Type
1164 c := auxIntToInt64(v_0.AuxInt)
1165 if v_1.Op != OpAdd64 {
1166 continue
1167 }
1168 _ = v_1.Args[1]
1169 v_1_0 := v_1.Args[0]
1170 v_1_1 := v_1.Args[1]
1171 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
1172 if v_1_0.Op != OpConst64 || v_1_0.Type != t {
1173 continue
1174 }
1175 d := auxIntToInt64(v_1_0.AuxInt)
1176 x := v_1_1
1177 v.reset(OpAdd64)
1178 v0 := b.NewValue0(v.Pos, OpConst64, t)
1179 v0.AuxInt = int64ToAuxInt(c + d)
1180 v.AddArg2(v0, x)
1181 return true
1182 }
1183 }
1184 break
1185 }
1186
1187
1188 for {
1189 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1190 if v_0.Op != OpConst64 {
1191 continue
1192 }
1193 t := v_0.Type
1194 c := auxIntToInt64(v_0.AuxInt)
1195 if v_1.Op != OpSub64 {
1196 continue
1197 }
1198 x := v_1.Args[1]
1199 v_1_0 := v_1.Args[0]
1200 if v_1_0.Op != OpConst64 || v_1_0.Type != t {
1201 continue
1202 }
1203 d := auxIntToInt64(v_1_0.AuxInt)
1204 v.reset(OpSub64)
1205 v0 := b.NewValue0(v.Pos, OpConst64, t)
1206 v0.AuxInt = int64ToAuxInt(c + d)
1207 v.AddArg2(v0, x)
1208 return true
1209 }
1210 break
1211 }
1212 return false
1213 }
1214 func rewriteValuegeneric_OpAdd64F(v *Value) bool {
1215 v_1 := v.Args[1]
1216 v_0 := v.Args[0]
1217
1218
1219
1220 for {
1221 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1222 if v_0.Op != OpConst64F {
1223 continue
1224 }
1225 c := auxIntToFloat64(v_0.AuxInt)
1226 if v_1.Op != OpConst64F {
1227 continue
1228 }
1229 d := auxIntToFloat64(v_1.AuxInt)
1230 if !(c+d == c+d) {
1231 continue
1232 }
1233 v.reset(OpConst64F)
1234 v.AuxInt = float64ToAuxInt(c + d)
1235 return true
1236 }
1237 break
1238 }
1239 return false
1240 }
1241 func rewriteValuegeneric_OpAdd8(v *Value) bool {
1242 v_1 := v.Args[1]
1243 v_0 := v.Args[0]
1244 b := v.Block
1245
1246
1247 for {
1248 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1249 if v_0.Op != OpConst8 {
1250 continue
1251 }
1252 c := auxIntToInt8(v_0.AuxInt)
1253 if v_1.Op != OpConst8 {
1254 continue
1255 }
1256 d := auxIntToInt8(v_1.AuxInt)
1257 v.reset(OpConst8)
1258 v.AuxInt = int8ToAuxInt(c + d)
1259 return true
1260 }
1261 break
1262 }
1263
1264
1265 for {
1266 t := v.Type
1267 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1268 if v_0.Op != OpMul8 {
1269 continue
1270 }
1271 _ = v_0.Args[1]
1272 v_0_0 := v_0.Args[0]
1273 v_0_1 := v_0.Args[1]
1274 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
1275 x := v_0_0
1276 y := v_0_1
1277 if v_1.Op != OpMul8 {
1278 continue
1279 }
1280 _ = v_1.Args[1]
1281 v_1_0 := v_1.Args[0]
1282 v_1_1 := v_1.Args[1]
1283 for _i2 := 0; _i2 <= 1; _i2, v_1_0, v_1_1 = _i2+1, v_1_1, v_1_0 {
1284 if x != v_1_0 {
1285 continue
1286 }
1287 z := v_1_1
1288 v.reset(OpMul8)
1289 v0 := b.NewValue0(v.Pos, OpAdd8, t)
1290 v0.AddArg2(y, z)
1291 v.AddArg2(x, v0)
1292 return true
1293 }
1294 }
1295 }
1296 break
1297 }
1298
1299
1300 for {
1301 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1302 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 {
1303 continue
1304 }
1305 x := v_1
1306 v.copyOf(x)
1307 return true
1308 }
1309 break
1310 }
1311
1312
1313 for {
1314 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1315 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 1 || v_1.Op != OpCom8 {
1316 continue
1317 }
1318 x := v_1.Args[0]
1319 v.reset(OpNeg8)
1320 v.AddArg(x)
1321 return true
1322 }
1323 break
1324 }
1325
1326
1327 for {
1328 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1329 x := v_0
1330 if v_1.Op != OpSub8 {
1331 continue
1332 }
1333 _ = v_1.Args[1]
1334 y := v_1.Args[0]
1335 if x != v_1.Args[1] {
1336 continue
1337 }
1338 v.copyOf(y)
1339 return true
1340 }
1341 break
1342 }
1343
1344
1345 for {
1346 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1347 x := v_0
1348 if v_1.Op != OpAdd8 {
1349 continue
1350 }
1351 _ = v_1.Args[1]
1352 v_1_0 := v_1.Args[0]
1353 v_1_1 := v_1.Args[1]
1354 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
1355 y := v_1_0
1356 if v_1_1.Op != OpSub8 {
1357 continue
1358 }
1359 _ = v_1_1.Args[1]
1360 z := v_1_1.Args[0]
1361 if x != v_1_1.Args[1] {
1362 continue
1363 }
1364 v.reset(OpAdd8)
1365 v.AddArg2(y, z)
1366 return true
1367 }
1368 }
1369 break
1370 }
1371
1372
1373
1374 for {
1375 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1376 if v_0.Op != OpAdd8 {
1377 continue
1378 }
1379 _ = v_0.Args[1]
1380 v_0_0 := v_0.Args[0]
1381 v_0_1 := v_0.Args[1]
1382 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
1383 i := v_0_0
1384 if i.Op != OpConst8 {
1385 continue
1386 }
1387 t := i.Type
1388 z := v_0_1
1389 x := v_1
1390 if !(z.Op != OpConst8 && x.Op != OpConst8) {
1391 continue
1392 }
1393 v.reset(OpAdd8)
1394 v0 := b.NewValue0(v.Pos, OpAdd8, t)
1395 v0.AddArg2(z, x)
1396 v.AddArg2(i, v0)
1397 return true
1398 }
1399 }
1400 break
1401 }
1402
1403
1404
1405 for {
1406 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1407 if v_0.Op != OpSub8 {
1408 continue
1409 }
1410 z := v_0.Args[1]
1411 i := v_0.Args[0]
1412 if i.Op != OpConst8 {
1413 continue
1414 }
1415 t := i.Type
1416 x := v_1
1417 if !(z.Op != OpConst8 && x.Op != OpConst8) {
1418 continue
1419 }
1420 v.reset(OpAdd8)
1421 v0 := b.NewValue0(v.Pos, OpSub8, t)
1422 v0.AddArg2(x, z)
1423 v.AddArg2(i, v0)
1424 return true
1425 }
1426 break
1427 }
1428
1429
1430 for {
1431 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1432 if v_0.Op != OpConst8 {
1433 continue
1434 }
1435 t := v_0.Type
1436 c := auxIntToInt8(v_0.AuxInt)
1437 if v_1.Op != OpAdd8 {
1438 continue
1439 }
1440 _ = v_1.Args[1]
1441 v_1_0 := v_1.Args[0]
1442 v_1_1 := v_1.Args[1]
1443 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
1444 if v_1_0.Op != OpConst8 || v_1_0.Type != t {
1445 continue
1446 }
1447 d := auxIntToInt8(v_1_0.AuxInt)
1448 x := v_1_1
1449 v.reset(OpAdd8)
1450 v0 := b.NewValue0(v.Pos, OpConst8, t)
1451 v0.AuxInt = int8ToAuxInt(c + d)
1452 v.AddArg2(v0, x)
1453 return true
1454 }
1455 }
1456 break
1457 }
1458
1459
1460 for {
1461 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1462 if v_0.Op != OpConst8 {
1463 continue
1464 }
1465 t := v_0.Type
1466 c := auxIntToInt8(v_0.AuxInt)
1467 if v_1.Op != OpSub8 {
1468 continue
1469 }
1470 x := v_1.Args[1]
1471 v_1_0 := v_1.Args[0]
1472 if v_1_0.Op != OpConst8 || v_1_0.Type != t {
1473 continue
1474 }
1475 d := auxIntToInt8(v_1_0.AuxInt)
1476 v.reset(OpSub8)
1477 v0 := b.NewValue0(v.Pos, OpConst8, t)
1478 v0.AuxInt = int8ToAuxInt(c + d)
1479 v.AddArg2(v0, x)
1480 return true
1481 }
1482 break
1483 }
1484 return false
1485 }
1486 func rewriteValuegeneric_OpAddPtr(v *Value) bool {
1487 v_1 := v.Args[1]
1488 v_0 := v.Args[0]
1489
1490
1491 for {
1492 t := v.Type
1493 x := v_0
1494 if v_1.Op != OpConst64 {
1495 break
1496 }
1497 c := auxIntToInt64(v_1.AuxInt)
1498 v.reset(OpOffPtr)
1499 v.Type = t
1500 v.AuxInt = int64ToAuxInt(c)
1501 v.AddArg(x)
1502 return true
1503 }
1504
1505
1506 for {
1507 t := v.Type
1508 x := v_0
1509 if v_1.Op != OpConst32 {
1510 break
1511 }
1512 c := auxIntToInt32(v_1.AuxInt)
1513 v.reset(OpOffPtr)
1514 v.Type = t
1515 v.AuxInt = int64ToAuxInt(int64(c))
1516 v.AddArg(x)
1517 return true
1518 }
1519 return false
1520 }
1521 func rewriteValuegeneric_OpAnd16(v *Value) bool {
1522 v_1 := v.Args[1]
1523 v_0 := v.Args[0]
1524 b := v.Block
1525
1526
1527 for {
1528 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1529 if v_0.Op != OpConst16 {
1530 continue
1531 }
1532 c := auxIntToInt16(v_0.AuxInt)
1533 if v_1.Op != OpConst16 {
1534 continue
1535 }
1536 d := auxIntToInt16(v_1.AuxInt)
1537 v.reset(OpConst16)
1538 v.AuxInt = int16ToAuxInt(c & d)
1539 return true
1540 }
1541 break
1542 }
1543
1544
1545
1546 for {
1547 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1548 if v_0.Op != OpConst16 {
1549 continue
1550 }
1551 m := auxIntToInt16(v_0.AuxInt)
1552 if v_1.Op != OpRsh16Ux64 {
1553 continue
1554 }
1555 _ = v_1.Args[1]
1556 v_1_1 := v_1.Args[1]
1557 if v_1_1.Op != OpConst64 {
1558 continue
1559 }
1560 c := auxIntToInt64(v_1_1.AuxInt)
1561 if !(c >= int64(16-ntz16(m))) {
1562 continue
1563 }
1564 v.reset(OpConst16)
1565 v.AuxInt = int16ToAuxInt(0)
1566 return true
1567 }
1568 break
1569 }
1570
1571
1572
1573 for {
1574 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1575 if v_0.Op != OpConst16 {
1576 continue
1577 }
1578 m := auxIntToInt16(v_0.AuxInt)
1579 if v_1.Op != OpLsh16x64 {
1580 continue
1581 }
1582 _ = v_1.Args[1]
1583 v_1_1 := v_1.Args[1]
1584 if v_1_1.Op != OpConst64 {
1585 continue
1586 }
1587 c := auxIntToInt64(v_1_1.AuxInt)
1588 if !(c >= int64(16-nlz16(m))) {
1589 continue
1590 }
1591 v.reset(OpConst16)
1592 v.AuxInt = int16ToAuxInt(0)
1593 return true
1594 }
1595 break
1596 }
1597
1598
1599 for {
1600 x := v_0
1601 if x != v_1 {
1602 break
1603 }
1604 v.copyOf(x)
1605 return true
1606 }
1607
1608
1609 for {
1610 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1611 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != -1 {
1612 continue
1613 }
1614 x := v_1
1615 v.copyOf(x)
1616 return true
1617 }
1618 break
1619 }
1620
1621
1622 for {
1623 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1624 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 {
1625 continue
1626 }
1627 v.reset(OpConst16)
1628 v.AuxInt = int16ToAuxInt(0)
1629 return true
1630 }
1631 break
1632 }
1633
1634
1635 for {
1636 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1637 x := v_0
1638 if v_1.Op != OpAnd16 {
1639 continue
1640 }
1641 _ = v_1.Args[1]
1642 v_1_0 := v_1.Args[0]
1643 v_1_1 := v_1.Args[1]
1644 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
1645 if x != v_1_0 {
1646 continue
1647 }
1648 y := v_1_1
1649 v.reset(OpAnd16)
1650 v.AddArg2(x, y)
1651 return true
1652 }
1653 }
1654 break
1655 }
1656
1657
1658
1659 for {
1660 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1661 if v_0.Op != OpAnd16 {
1662 continue
1663 }
1664 _ = v_0.Args[1]
1665 v_0_0 := v_0.Args[0]
1666 v_0_1 := v_0.Args[1]
1667 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
1668 i := v_0_0
1669 if i.Op != OpConst16 {
1670 continue
1671 }
1672 t := i.Type
1673 z := v_0_1
1674 x := v_1
1675 if !(z.Op != OpConst16 && x.Op != OpConst16) {
1676 continue
1677 }
1678 v.reset(OpAnd16)
1679 v0 := b.NewValue0(v.Pos, OpAnd16, t)
1680 v0.AddArg2(z, x)
1681 v.AddArg2(i, v0)
1682 return true
1683 }
1684 }
1685 break
1686 }
1687
1688
1689 for {
1690 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1691 if v_0.Op != OpConst16 {
1692 continue
1693 }
1694 t := v_0.Type
1695 c := auxIntToInt16(v_0.AuxInt)
1696 if v_1.Op != OpAnd16 {
1697 continue
1698 }
1699 _ = v_1.Args[1]
1700 v_1_0 := v_1.Args[0]
1701 v_1_1 := v_1.Args[1]
1702 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
1703 if v_1_0.Op != OpConst16 || v_1_0.Type != t {
1704 continue
1705 }
1706 d := auxIntToInt16(v_1_0.AuxInt)
1707 x := v_1_1
1708 v.reset(OpAnd16)
1709 v0 := b.NewValue0(v.Pos, OpConst16, t)
1710 v0.AuxInt = int16ToAuxInt(c & d)
1711 v.AddArg2(v0, x)
1712 return true
1713 }
1714 }
1715 break
1716 }
1717 return false
1718 }
1719 func rewriteValuegeneric_OpAnd32(v *Value) bool {
1720 v_1 := v.Args[1]
1721 v_0 := v.Args[0]
1722 b := v.Block
1723
1724
1725 for {
1726 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1727 if v_0.Op != OpConst32 {
1728 continue
1729 }
1730 c := auxIntToInt32(v_0.AuxInt)
1731 if v_1.Op != OpConst32 {
1732 continue
1733 }
1734 d := auxIntToInt32(v_1.AuxInt)
1735 v.reset(OpConst32)
1736 v.AuxInt = int32ToAuxInt(c & d)
1737 return true
1738 }
1739 break
1740 }
1741
1742
1743
1744 for {
1745 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1746 if v_0.Op != OpConst32 {
1747 continue
1748 }
1749 m := auxIntToInt32(v_0.AuxInt)
1750 if v_1.Op != OpRsh32Ux64 {
1751 continue
1752 }
1753 _ = v_1.Args[1]
1754 v_1_1 := v_1.Args[1]
1755 if v_1_1.Op != OpConst64 {
1756 continue
1757 }
1758 c := auxIntToInt64(v_1_1.AuxInt)
1759 if !(c >= int64(32-ntz32(m))) {
1760 continue
1761 }
1762 v.reset(OpConst32)
1763 v.AuxInt = int32ToAuxInt(0)
1764 return true
1765 }
1766 break
1767 }
1768
1769
1770
1771 for {
1772 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1773 if v_0.Op != OpConst32 {
1774 continue
1775 }
1776 m := auxIntToInt32(v_0.AuxInt)
1777 if v_1.Op != OpLsh32x64 {
1778 continue
1779 }
1780 _ = v_1.Args[1]
1781 v_1_1 := v_1.Args[1]
1782 if v_1_1.Op != OpConst64 {
1783 continue
1784 }
1785 c := auxIntToInt64(v_1_1.AuxInt)
1786 if !(c >= int64(32-nlz32(m))) {
1787 continue
1788 }
1789 v.reset(OpConst32)
1790 v.AuxInt = int32ToAuxInt(0)
1791 return true
1792 }
1793 break
1794 }
1795
1796
1797 for {
1798 x := v_0
1799 if x != v_1 {
1800 break
1801 }
1802 v.copyOf(x)
1803 return true
1804 }
1805
1806
1807 for {
1808 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1809 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != -1 {
1810 continue
1811 }
1812 x := v_1
1813 v.copyOf(x)
1814 return true
1815 }
1816 break
1817 }
1818
1819
1820 for {
1821 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1822 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
1823 continue
1824 }
1825 v.reset(OpConst32)
1826 v.AuxInt = int32ToAuxInt(0)
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 x := v_0
1836 if v_1.Op != OpAnd32 {
1837 continue
1838 }
1839 _ = v_1.Args[1]
1840 v_1_0 := v_1.Args[0]
1841 v_1_1 := v_1.Args[1]
1842 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
1843 if x != v_1_0 {
1844 continue
1845 }
1846 y := v_1_1
1847 v.reset(OpAnd32)
1848 v.AddArg2(x, y)
1849 return true
1850 }
1851 }
1852 break
1853 }
1854
1855
1856
1857 for {
1858 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1859 if v_0.Op != OpAnd32 {
1860 continue
1861 }
1862 _ = v_0.Args[1]
1863 v_0_0 := v_0.Args[0]
1864 v_0_1 := v_0.Args[1]
1865 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
1866 i := v_0_0
1867 if i.Op != OpConst32 {
1868 continue
1869 }
1870 t := i.Type
1871 z := v_0_1
1872 x := v_1
1873 if !(z.Op != OpConst32 && x.Op != OpConst32) {
1874 continue
1875 }
1876 v.reset(OpAnd32)
1877 v0 := b.NewValue0(v.Pos, OpAnd32, t)
1878 v0.AddArg2(z, x)
1879 v.AddArg2(i, v0)
1880 return true
1881 }
1882 }
1883 break
1884 }
1885
1886
1887 for {
1888 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1889 if v_0.Op != OpConst32 {
1890 continue
1891 }
1892 t := v_0.Type
1893 c := auxIntToInt32(v_0.AuxInt)
1894 if v_1.Op != OpAnd32 {
1895 continue
1896 }
1897 _ = v_1.Args[1]
1898 v_1_0 := v_1.Args[0]
1899 v_1_1 := v_1.Args[1]
1900 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
1901 if v_1_0.Op != OpConst32 || v_1_0.Type != t {
1902 continue
1903 }
1904 d := auxIntToInt32(v_1_0.AuxInt)
1905 x := v_1_1
1906 v.reset(OpAnd32)
1907 v0 := b.NewValue0(v.Pos, OpConst32, t)
1908 v0.AuxInt = int32ToAuxInt(c & d)
1909 v.AddArg2(v0, x)
1910 return true
1911 }
1912 }
1913 break
1914 }
1915 return false
1916 }
1917 func rewriteValuegeneric_OpAnd64(v *Value) bool {
1918 v_1 := v.Args[1]
1919 v_0 := v.Args[0]
1920 b := v.Block
1921
1922
1923 for {
1924 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1925 if v_0.Op != OpConst64 {
1926 continue
1927 }
1928 c := auxIntToInt64(v_0.AuxInt)
1929 if v_1.Op != OpConst64 {
1930 continue
1931 }
1932 d := auxIntToInt64(v_1.AuxInt)
1933 v.reset(OpConst64)
1934 v.AuxInt = int64ToAuxInt(c & d)
1935 return true
1936 }
1937 break
1938 }
1939
1940
1941
1942 for {
1943 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1944 if v_0.Op != OpConst64 {
1945 continue
1946 }
1947 m := auxIntToInt64(v_0.AuxInt)
1948 if v_1.Op != OpRsh64Ux64 {
1949 continue
1950 }
1951 _ = v_1.Args[1]
1952 v_1_1 := v_1.Args[1]
1953 if v_1_1.Op != OpConst64 {
1954 continue
1955 }
1956 c := auxIntToInt64(v_1_1.AuxInt)
1957 if !(c >= int64(64-ntz64(m))) {
1958 continue
1959 }
1960 v.reset(OpConst64)
1961 v.AuxInt = int64ToAuxInt(0)
1962 return true
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 != OpConst64 {
1972 continue
1973 }
1974 m := auxIntToInt64(v_0.AuxInt)
1975 if v_1.Op != OpLsh64x64 {
1976 continue
1977 }
1978 _ = v_1.Args[1]
1979 v_1_1 := v_1.Args[1]
1980 if v_1_1.Op != OpConst64 {
1981 continue
1982 }
1983 c := auxIntToInt64(v_1_1.AuxInt)
1984 if !(c >= int64(64-nlz64(m))) {
1985 continue
1986 }
1987 v.reset(OpConst64)
1988 v.AuxInt = int64ToAuxInt(0)
1989 return true
1990 }
1991 break
1992 }
1993
1994
1995 for {
1996 x := v_0
1997 if x != v_1 {
1998 break
1999 }
2000 v.copyOf(x)
2001 return true
2002 }
2003
2004
2005 for {
2006 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2007 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != -1 {
2008 continue
2009 }
2010 x := v_1
2011 v.copyOf(x)
2012 return true
2013 }
2014 break
2015 }
2016
2017
2018 for {
2019 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2020 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
2021 continue
2022 }
2023 v.reset(OpConst64)
2024 v.AuxInt = int64ToAuxInt(0)
2025 return true
2026 }
2027 break
2028 }
2029
2030
2031 for {
2032 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2033 x := v_0
2034 if v_1.Op != OpAnd64 {
2035 continue
2036 }
2037 _ = v_1.Args[1]
2038 v_1_0 := v_1.Args[0]
2039 v_1_1 := v_1.Args[1]
2040 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
2041 if x != v_1_0 {
2042 continue
2043 }
2044 y := v_1_1
2045 v.reset(OpAnd64)
2046 v.AddArg2(x, y)
2047 return true
2048 }
2049 }
2050 break
2051 }
2052
2053
2054
2055 for {
2056 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2057 if v_0.Op != OpAnd64 {
2058 continue
2059 }
2060 _ = v_0.Args[1]
2061 v_0_0 := v_0.Args[0]
2062 v_0_1 := v_0.Args[1]
2063 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
2064 i := v_0_0
2065 if i.Op != OpConst64 {
2066 continue
2067 }
2068 t := i.Type
2069 z := v_0_1
2070 x := v_1
2071 if !(z.Op != OpConst64 && x.Op != OpConst64) {
2072 continue
2073 }
2074 v.reset(OpAnd64)
2075 v0 := b.NewValue0(v.Pos, OpAnd64, t)
2076 v0.AddArg2(z, x)
2077 v.AddArg2(i, v0)
2078 return true
2079 }
2080 }
2081 break
2082 }
2083
2084
2085 for {
2086 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2087 if v_0.Op != OpConst64 {
2088 continue
2089 }
2090 t := v_0.Type
2091 c := auxIntToInt64(v_0.AuxInt)
2092 if v_1.Op != OpAnd64 {
2093 continue
2094 }
2095 _ = v_1.Args[1]
2096 v_1_0 := v_1.Args[0]
2097 v_1_1 := v_1.Args[1]
2098 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
2099 if v_1_0.Op != OpConst64 || v_1_0.Type != t {
2100 continue
2101 }
2102 d := auxIntToInt64(v_1_0.AuxInt)
2103 x := v_1_1
2104 v.reset(OpAnd64)
2105 v0 := b.NewValue0(v.Pos, OpConst64, t)
2106 v0.AuxInt = int64ToAuxInt(c & d)
2107 v.AddArg2(v0, x)
2108 return true
2109 }
2110 }
2111 break
2112 }
2113 return false
2114 }
2115 func rewriteValuegeneric_OpAnd8(v *Value) bool {
2116 v_1 := v.Args[1]
2117 v_0 := v.Args[0]
2118 b := v.Block
2119
2120
2121 for {
2122 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2123 if v_0.Op != OpConst8 {
2124 continue
2125 }
2126 c := auxIntToInt8(v_0.AuxInt)
2127 if v_1.Op != OpConst8 {
2128 continue
2129 }
2130 d := auxIntToInt8(v_1.AuxInt)
2131 v.reset(OpConst8)
2132 v.AuxInt = int8ToAuxInt(c & d)
2133 return true
2134 }
2135 break
2136 }
2137
2138
2139
2140 for {
2141 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2142 if v_0.Op != OpConst8 {
2143 continue
2144 }
2145 m := auxIntToInt8(v_0.AuxInt)
2146 if v_1.Op != OpRsh8Ux64 {
2147 continue
2148 }
2149 _ = v_1.Args[1]
2150 v_1_1 := v_1.Args[1]
2151 if v_1_1.Op != OpConst64 {
2152 continue
2153 }
2154 c := auxIntToInt64(v_1_1.AuxInt)
2155 if !(c >= int64(8-ntz8(m))) {
2156 continue
2157 }
2158 v.reset(OpConst8)
2159 v.AuxInt = int8ToAuxInt(0)
2160 return true
2161 }
2162 break
2163 }
2164
2165
2166
2167 for {
2168 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2169 if v_0.Op != OpConst8 {
2170 continue
2171 }
2172 m := auxIntToInt8(v_0.AuxInt)
2173 if v_1.Op != OpLsh8x64 {
2174 continue
2175 }
2176 _ = v_1.Args[1]
2177 v_1_1 := v_1.Args[1]
2178 if v_1_1.Op != OpConst64 {
2179 continue
2180 }
2181 c := auxIntToInt64(v_1_1.AuxInt)
2182 if !(c >= int64(8-nlz8(m))) {
2183 continue
2184 }
2185 v.reset(OpConst8)
2186 v.AuxInt = int8ToAuxInt(0)
2187 return true
2188 }
2189 break
2190 }
2191
2192
2193 for {
2194 x := v_0
2195 if x != v_1 {
2196 break
2197 }
2198 v.copyOf(x)
2199 return true
2200 }
2201
2202
2203 for {
2204 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2205 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != -1 {
2206 continue
2207 }
2208 x := v_1
2209 v.copyOf(x)
2210 return true
2211 }
2212 break
2213 }
2214
2215
2216 for {
2217 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2218 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 {
2219 continue
2220 }
2221 v.reset(OpConst8)
2222 v.AuxInt = int8ToAuxInt(0)
2223 return true
2224 }
2225 break
2226 }
2227
2228
2229 for {
2230 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2231 x := v_0
2232 if v_1.Op != OpAnd8 {
2233 continue
2234 }
2235 _ = v_1.Args[1]
2236 v_1_0 := v_1.Args[0]
2237 v_1_1 := v_1.Args[1]
2238 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
2239 if x != v_1_0 {
2240 continue
2241 }
2242 y := v_1_1
2243 v.reset(OpAnd8)
2244 v.AddArg2(x, y)
2245 return true
2246 }
2247 }
2248 break
2249 }
2250
2251
2252
2253 for {
2254 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2255 if v_0.Op != OpAnd8 {
2256 continue
2257 }
2258 _ = v_0.Args[1]
2259 v_0_0 := v_0.Args[0]
2260 v_0_1 := v_0.Args[1]
2261 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
2262 i := v_0_0
2263 if i.Op != OpConst8 {
2264 continue
2265 }
2266 t := i.Type
2267 z := v_0_1
2268 x := v_1
2269 if !(z.Op != OpConst8 && x.Op != OpConst8) {
2270 continue
2271 }
2272 v.reset(OpAnd8)
2273 v0 := b.NewValue0(v.Pos, OpAnd8, t)
2274 v0.AddArg2(z, x)
2275 v.AddArg2(i, v0)
2276 return true
2277 }
2278 }
2279 break
2280 }
2281
2282
2283 for {
2284 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2285 if v_0.Op != OpConst8 {
2286 continue
2287 }
2288 t := v_0.Type
2289 c := auxIntToInt8(v_0.AuxInt)
2290 if v_1.Op != OpAnd8 {
2291 continue
2292 }
2293 _ = v_1.Args[1]
2294 v_1_0 := v_1.Args[0]
2295 v_1_1 := v_1.Args[1]
2296 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
2297 if v_1_0.Op != OpConst8 || v_1_0.Type != t {
2298 continue
2299 }
2300 d := auxIntToInt8(v_1_0.AuxInt)
2301 x := v_1_1
2302 v.reset(OpAnd8)
2303 v0 := b.NewValue0(v.Pos, OpConst8, t)
2304 v0.AuxInt = int8ToAuxInt(c & d)
2305 v.AddArg2(v0, x)
2306 return true
2307 }
2308 }
2309 break
2310 }
2311 return false
2312 }
2313 func rewriteValuegeneric_OpAndB(v *Value) bool {
2314 v_1 := v.Args[1]
2315 v_0 := v.Args[0]
2316 b := v.Block
2317
2318
2319
2320 for {
2321 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2322 if v_0.Op != OpLeq64 {
2323 continue
2324 }
2325 x := v_0.Args[1]
2326 v_0_0 := v_0.Args[0]
2327 if v_0_0.Op != OpConst64 {
2328 continue
2329 }
2330 c := auxIntToInt64(v_0_0.AuxInt)
2331 if v_1.Op != OpLess64 {
2332 continue
2333 }
2334 _ = v_1.Args[1]
2335 if x != v_1.Args[0] {
2336 continue
2337 }
2338 v_1_1 := v_1.Args[1]
2339 if v_1_1.Op != OpConst64 {
2340 continue
2341 }
2342 d := auxIntToInt64(v_1_1.AuxInt)
2343 if !(d >= c) {
2344 continue
2345 }
2346 v.reset(OpLess64U)
2347 v0 := b.NewValue0(v.Pos, OpSub64, x.Type)
2348 v1 := b.NewValue0(v.Pos, OpConst64, x.Type)
2349 v1.AuxInt = int64ToAuxInt(c)
2350 v0.AddArg2(x, v1)
2351 v2 := b.NewValue0(v.Pos, OpConst64, x.Type)
2352 v2.AuxInt = int64ToAuxInt(d - c)
2353 v.AddArg2(v0, v2)
2354 return true
2355 }
2356 break
2357 }
2358
2359
2360
2361 for {
2362 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2363 if v_0.Op != OpLeq64 {
2364 continue
2365 }
2366 x := v_0.Args[1]
2367 v_0_0 := v_0.Args[0]
2368 if v_0_0.Op != OpConst64 {
2369 continue
2370 }
2371 c := auxIntToInt64(v_0_0.AuxInt)
2372 if v_1.Op != OpLeq64 {
2373 continue
2374 }
2375 _ = v_1.Args[1]
2376 if x != v_1.Args[0] {
2377 continue
2378 }
2379 v_1_1 := v_1.Args[1]
2380 if v_1_1.Op != OpConst64 {
2381 continue
2382 }
2383 d := auxIntToInt64(v_1_1.AuxInt)
2384 if !(d >= c) {
2385 continue
2386 }
2387 v.reset(OpLeq64U)
2388 v0 := b.NewValue0(v.Pos, OpSub64, x.Type)
2389 v1 := b.NewValue0(v.Pos, OpConst64, x.Type)
2390 v1.AuxInt = int64ToAuxInt(c)
2391 v0.AddArg2(x, v1)
2392 v2 := b.NewValue0(v.Pos, OpConst64, x.Type)
2393 v2.AuxInt = int64ToAuxInt(d - c)
2394 v.AddArg2(v0, v2)
2395 return true
2396 }
2397 break
2398 }
2399
2400
2401
2402 for {
2403 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2404 if v_0.Op != OpLeq32 {
2405 continue
2406 }
2407 x := v_0.Args[1]
2408 v_0_0 := v_0.Args[0]
2409 if v_0_0.Op != OpConst32 {
2410 continue
2411 }
2412 c := auxIntToInt32(v_0_0.AuxInt)
2413 if v_1.Op != OpLess32 {
2414 continue
2415 }
2416 _ = v_1.Args[1]
2417 if x != v_1.Args[0] {
2418 continue
2419 }
2420 v_1_1 := v_1.Args[1]
2421 if v_1_1.Op != OpConst32 {
2422 continue
2423 }
2424 d := auxIntToInt32(v_1_1.AuxInt)
2425 if !(d >= c) {
2426 continue
2427 }
2428 v.reset(OpLess32U)
2429 v0 := b.NewValue0(v.Pos, OpSub32, x.Type)
2430 v1 := b.NewValue0(v.Pos, OpConst32, x.Type)
2431 v1.AuxInt = int32ToAuxInt(c)
2432 v0.AddArg2(x, v1)
2433 v2 := b.NewValue0(v.Pos, OpConst32, x.Type)
2434 v2.AuxInt = int32ToAuxInt(d - c)
2435 v.AddArg2(v0, v2)
2436 return true
2437 }
2438 break
2439 }
2440
2441
2442
2443 for {
2444 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2445 if v_0.Op != OpLeq32 {
2446 continue
2447 }
2448 x := v_0.Args[1]
2449 v_0_0 := v_0.Args[0]
2450 if v_0_0.Op != OpConst32 {
2451 continue
2452 }
2453 c := auxIntToInt32(v_0_0.AuxInt)
2454 if v_1.Op != OpLeq32 {
2455 continue
2456 }
2457 _ = v_1.Args[1]
2458 if x != v_1.Args[0] {
2459 continue
2460 }
2461 v_1_1 := v_1.Args[1]
2462 if v_1_1.Op != OpConst32 {
2463 continue
2464 }
2465 d := auxIntToInt32(v_1_1.AuxInt)
2466 if !(d >= c) {
2467 continue
2468 }
2469 v.reset(OpLeq32U)
2470 v0 := b.NewValue0(v.Pos, OpSub32, x.Type)
2471 v1 := b.NewValue0(v.Pos, OpConst32, x.Type)
2472 v1.AuxInt = int32ToAuxInt(c)
2473 v0.AddArg2(x, v1)
2474 v2 := b.NewValue0(v.Pos, OpConst32, x.Type)
2475 v2.AuxInt = int32ToAuxInt(d - c)
2476 v.AddArg2(v0, v2)
2477 return true
2478 }
2479 break
2480 }
2481
2482
2483
2484 for {
2485 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2486 if v_0.Op != OpLeq16 {
2487 continue
2488 }
2489 x := v_0.Args[1]
2490 v_0_0 := v_0.Args[0]
2491 if v_0_0.Op != OpConst16 {
2492 continue
2493 }
2494 c := auxIntToInt16(v_0_0.AuxInt)
2495 if v_1.Op != OpLess16 {
2496 continue
2497 }
2498 _ = v_1.Args[1]
2499 if x != v_1.Args[0] {
2500 continue
2501 }
2502 v_1_1 := v_1.Args[1]
2503 if v_1_1.Op != OpConst16 {
2504 continue
2505 }
2506 d := auxIntToInt16(v_1_1.AuxInt)
2507 if !(d >= c) {
2508 continue
2509 }
2510 v.reset(OpLess16U)
2511 v0 := b.NewValue0(v.Pos, OpSub16, x.Type)
2512 v1 := b.NewValue0(v.Pos, OpConst16, x.Type)
2513 v1.AuxInt = int16ToAuxInt(c)
2514 v0.AddArg2(x, v1)
2515 v2 := b.NewValue0(v.Pos, OpConst16, x.Type)
2516 v2.AuxInt = int16ToAuxInt(d - c)
2517 v.AddArg2(v0, v2)
2518 return true
2519 }
2520 break
2521 }
2522
2523
2524
2525 for {
2526 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2527 if v_0.Op != OpLeq16 {
2528 continue
2529 }
2530 x := v_0.Args[1]
2531 v_0_0 := v_0.Args[0]
2532 if v_0_0.Op != OpConst16 {
2533 continue
2534 }
2535 c := auxIntToInt16(v_0_0.AuxInt)
2536 if v_1.Op != OpLeq16 {
2537 continue
2538 }
2539 _ = v_1.Args[1]
2540 if x != v_1.Args[0] {
2541 continue
2542 }
2543 v_1_1 := v_1.Args[1]
2544 if v_1_1.Op != OpConst16 {
2545 continue
2546 }
2547 d := auxIntToInt16(v_1_1.AuxInt)
2548 if !(d >= c) {
2549 continue
2550 }
2551 v.reset(OpLeq16U)
2552 v0 := b.NewValue0(v.Pos, OpSub16, x.Type)
2553 v1 := b.NewValue0(v.Pos, OpConst16, x.Type)
2554 v1.AuxInt = int16ToAuxInt(c)
2555 v0.AddArg2(x, v1)
2556 v2 := b.NewValue0(v.Pos, OpConst16, x.Type)
2557 v2.AuxInt = int16ToAuxInt(d - c)
2558 v.AddArg2(v0, v2)
2559 return true
2560 }
2561 break
2562 }
2563
2564
2565
2566 for {
2567 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2568 if v_0.Op != OpLeq8 {
2569 continue
2570 }
2571 x := v_0.Args[1]
2572 v_0_0 := v_0.Args[0]
2573 if v_0_0.Op != OpConst8 {
2574 continue
2575 }
2576 c := auxIntToInt8(v_0_0.AuxInt)
2577 if v_1.Op != OpLess8 {
2578 continue
2579 }
2580 _ = v_1.Args[1]
2581 if x != v_1.Args[0] {
2582 continue
2583 }
2584 v_1_1 := v_1.Args[1]
2585 if v_1_1.Op != OpConst8 {
2586 continue
2587 }
2588 d := auxIntToInt8(v_1_1.AuxInt)
2589 if !(d >= c) {
2590 continue
2591 }
2592 v.reset(OpLess8U)
2593 v0 := b.NewValue0(v.Pos, OpSub8, x.Type)
2594 v1 := b.NewValue0(v.Pos, OpConst8, x.Type)
2595 v1.AuxInt = int8ToAuxInt(c)
2596 v0.AddArg2(x, v1)
2597 v2 := b.NewValue0(v.Pos, OpConst8, x.Type)
2598 v2.AuxInt = int8ToAuxInt(d - c)
2599 v.AddArg2(v0, v2)
2600 return true
2601 }
2602 break
2603 }
2604
2605
2606
2607 for {
2608 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2609 if v_0.Op != OpLeq8 {
2610 continue
2611 }
2612 x := v_0.Args[1]
2613 v_0_0 := v_0.Args[0]
2614 if v_0_0.Op != OpConst8 {
2615 continue
2616 }
2617 c := auxIntToInt8(v_0_0.AuxInt)
2618 if v_1.Op != OpLeq8 {
2619 continue
2620 }
2621 _ = v_1.Args[1]
2622 if x != v_1.Args[0] {
2623 continue
2624 }
2625 v_1_1 := v_1.Args[1]
2626 if v_1_1.Op != OpConst8 {
2627 continue
2628 }
2629 d := auxIntToInt8(v_1_1.AuxInt)
2630 if !(d >= c) {
2631 continue
2632 }
2633 v.reset(OpLeq8U)
2634 v0 := b.NewValue0(v.Pos, OpSub8, x.Type)
2635 v1 := b.NewValue0(v.Pos, OpConst8, x.Type)
2636 v1.AuxInt = int8ToAuxInt(c)
2637 v0.AddArg2(x, v1)
2638 v2 := b.NewValue0(v.Pos, OpConst8, x.Type)
2639 v2.AuxInt = int8ToAuxInt(d - c)
2640 v.AddArg2(v0, v2)
2641 return true
2642 }
2643 break
2644 }
2645
2646
2647
2648 for {
2649 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2650 if v_0.Op != OpLess64 {
2651 continue
2652 }
2653 x := v_0.Args[1]
2654 v_0_0 := v_0.Args[0]
2655 if v_0_0.Op != OpConst64 {
2656 continue
2657 }
2658 c := auxIntToInt64(v_0_0.AuxInt)
2659 if v_1.Op != OpLess64 {
2660 continue
2661 }
2662 _ = v_1.Args[1]
2663 if x != v_1.Args[0] {
2664 continue
2665 }
2666 v_1_1 := v_1.Args[1]
2667 if v_1_1.Op != OpConst64 {
2668 continue
2669 }
2670 d := auxIntToInt64(v_1_1.AuxInt)
2671 if !(d >= c+1 && c+1 > c) {
2672 continue
2673 }
2674 v.reset(OpLess64U)
2675 v0 := b.NewValue0(v.Pos, OpSub64, x.Type)
2676 v1 := b.NewValue0(v.Pos, OpConst64, x.Type)
2677 v1.AuxInt = int64ToAuxInt(c + 1)
2678 v0.AddArg2(x, v1)
2679 v2 := b.NewValue0(v.Pos, OpConst64, x.Type)
2680 v2.AuxInt = int64ToAuxInt(d - c - 1)
2681 v.AddArg2(v0, v2)
2682 return true
2683 }
2684 break
2685 }
2686
2687
2688
2689 for {
2690 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2691 if v_0.Op != OpLess64 {
2692 continue
2693 }
2694 x := v_0.Args[1]
2695 v_0_0 := v_0.Args[0]
2696 if v_0_0.Op != OpConst64 {
2697 continue
2698 }
2699 c := auxIntToInt64(v_0_0.AuxInt)
2700 if v_1.Op != OpLeq64 {
2701 continue
2702 }
2703 _ = v_1.Args[1]
2704 if x != v_1.Args[0] {
2705 continue
2706 }
2707 v_1_1 := v_1.Args[1]
2708 if v_1_1.Op != OpConst64 {
2709 continue
2710 }
2711 d := auxIntToInt64(v_1_1.AuxInt)
2712 if !(d >= c+1 && c+1 > c) {
2713 continue
2714 }
2715 v.reset(OpLeq64U)
2716 v0 := b.NewValue0(v.Pos, OpSub64, x.Type)
2717 v1 := b.NewValue0(v.Pos, OpConst64, x.Type)
2718 v1.AuxInt = int64ToAuxInt(c + 1)
2719 v0.AddArg2(x, v1)
2720 v2 := b.NewValue0(v.Pos, OpConst64, x.Type)
2721 v2.AuxInt = int64ToAuxInt(d - c - 1)
2722 v.AddArg2(v0, v2)
2723 return true
2724 }
2725 break
2726 }
2727
2728
2729
2730 for {
2731 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2732 if v_0.Op != OpLess32 {
2733 continue
2734 }
2735 x := v_0.Args[1]
2736 v_0_0 := v_0.Args[0]
2737 if v_0_0.Op != OpConst32 {
2738 continue
2739 }
2740 c := auxIntToInt32(v_0_0.AuxInt)
2741 if v_1.Op != OpLess32 {
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 != OpConst32 {
2750 continue
2751 }
2752 d := auxIntToInt32(v_1_1.AuxInt)
2753 if !(d >= c+1 && c+1 > c) {
2754 continue
2755 }
2756 v.reset(OpLess32U)
2757 v0 := b.NewValue0(v.Pos, OpSub32, x.Type)
2758 v1 := b.NewValue0(v.Pos, OpConst32, x.Type)
2759 v1.AuxInt = int32ToAuxInt(c + 1)
2760 v0.AddArg2(x, v1)
2761 v2 := b.NewValue0(v.Pos, OpConst32, x.Type)
2762 v2.AuxInt = int32ToAuxInt(d - c - 1)
2763 v.AddArg2(v0, v2)
2764 return true
2765 }
2766 break
2767 }
2768
2769
2770
2771 for {
2772 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2773 if v_0.Op != OpLess32 {
2774 continue
2775 }
2776 x := v_0.Args[1]
2777 v_0_0 := v_0.Args[0]
2778 if v_0_0.Op != OpConst32 {
2779 continue
2780 }
2781 c := auxIntToInt32(v_0_0.AuxInt)
2782 if v_1.Op != OpLeq32 {
2783 continue
2784 }
2785 _ = v_1.Args[1]
2786 if x != v_1.Args[0] {
2787 continue
2788 }
2789 v_1_1 := v_1.Args[1]
2790 if v_1_1.Op != OpConst32 {
2791 continue
2792 }
2793 d := auxIntToInt32(v_1_1.AuxInt)
2794 if !(d >= c+1 && c+1 > c) {
2795 continue
2796 }
2797 v.reset(OpLeq32U)
2798 v0 := b.NewValue0(v.Pos, OpSub32, x.Type)
2799 v1 := b.NewValue0(v.Pos, OpConst32, x.Type)
2800 v1.AuxInt = int32ToAuxInt(c + 1)
2801 v0.AddArg2(x, v1)
2802 v2 := b.NewValue0(v.Pos, OpConst32, x.Type)
2803 v2.AuxInt = int32ToAuxInt(d - c - 1)
2804 v.AddArg2(v0, v2)
2805 return true
2806 }
2807 break
2808 }
2809
2810
2811
2812 for {
2813 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2814 if v_0.Op != OpLess16 {
2815 continue
2816 }
2817 x := v_0.Args[1]
2818 v_0_0 := v_0.Args[0]
2819 if v_0_0.Op != OpConst16 {
2820 continue
2821 }
2822 c := auxIntToInt16(v_0_0.AuxInt)
2823 if v_1.Op != OpLess16 {
2824 continue
2825 }
2826 _ = v_1.Args[1]
2827 if x != v_1.Args[0] {
2828 continue
2829 }
2830 v_1_1 := v_1.Args[1]
2831 if v_1_1.Op != OpConst16 {
2832 continue
2833 }
2834 d := auxIntToInt16(v_1_1.AuxInt)
2835 if !(d >= c+1 && c+1 > c) {
2836 continue
2837 }
2838 v.reset(OpLess16U)
2839 v0 := b.NewValue0(v.Pos, OpSub16, x.Type)
2840 v1 := b.NewValue0(v.Pos, OpConst16, x.Type)
2841 v1.AuxInt = int16ToAuxInt(c + 1)
2842 v0.AddArg2(x, v1)
2843 v2 := b.NewValue0(v.Pos, OpConst16, x.Type)
2844 v2.AuxInt = int16ToAuxInt(d - c - 1)
2845 v.AddArg2(v0, v2)
2846 return true
2847 }
2848 break
2849 }
2850
2851
2852
2853 for {
2854 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2855 if v_0.Op != OpLess16 {
2856 continue
2857 }
2858 x := v_0.Args[1]
2859 v_0_0 := v_0.Args[0]
2860 if v_0_0.Op != OpConst16 {
2861 continue
2862 }
2863 c := auxIntToInt16(v_0_0.AuxInt)
2864 if v_1.Op != OpLeq16 {
2865 continue
2866 }
2867 _ = v_1.Args[1]
2868 if x != v_1.Args[0] {
2869 continue
2870 }
2871 v_1_1 := v_1.Args[1]
2872 if v_1_1.Op != OpConst16 {
2873 continue
2874 }
2875 d := auxIntToInt16(v_1_1.AuxInt)
2876 if !(d >= c+1 && c+1 > c) {
2877 continue
2878 }
2879 v.reset(OpLeq16U)
2880 v0 := b.NewValue0(v.Pos, OpSub16, x.Type)
2881 v1 := b.NewValue0(v.Pos, OpConst16, x.Type)
2882 v1.AuxInt = int16ToAuxInt(c + 1)
2883 v0.AddArg2(x, v1)
2884 v2 := b.NewValue0(v.Pos, OpConst16, x.Type)
2885 v2.AuxInt = int16ToAuxInt(d - c - 1)
2886 v.AddArg2(v0, v2)
2887 return true
2888 }
2889 break
2890 }
2891
2892
2893
2894 for {
2895 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2896 if v_0.Op != OpLess8 {
2897 continue
2898 }
2899 x := v_0.Args[1]
2900 v_0_0 := v_0.Args[0]
2901 if v_0_0.Op != OpConst8 {
2902 continue
2903 }
2904 c := auxIntToInt8(v_0_0.AuxInt)
2905 if v_1.Op != OpLess8 {
2906 continue
2907 }
2908 _ = v_1.Args[1]
2909 if x != v_1.Args[0] {
2910 continue
2911 }
2912 v_1_1 := v_1.Args[1]
2913 if v_1_1.Op != OpConst8 {
2914 continue
2915 }
2916 d := auxIntToInt8(v_1_1.AuxInt)
2917 if !(d >= c+1 && c+1 > c) {
2918 continue
2919 }
2920 v.reset(OpLess8U)
2921 v0 := b.NewValue0(v.Pos, OpSub8, x.Type)
2922 v1 := b.NewValue0(v.Pos, OpConst8, x.Type)
2923 v1.AuxInt = int8ToAuxInt(c + 1)
2924 v0.AddArg2(x, v1)
2925 v2 := b.NewValue0(v.Pos, OpConst8, x.Type)
2926 v2.AuxInt = int8ToAuxInt(d - c - 1)
2927 v.AddArg2(v0, v2)
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 if v_0.Op != OpLess8 {
2938 continue
2939 }
2940 x := v_0.Args[1]
2941 v_0_0 := v_0.Args[0]
2942 if v_0_0.Op != OpConst8 {
2943 continue
2944 }
2945 c := auxIntToInt8(v_0_0.AuxInt)
2946 if v_1.Op != OpLeq8 {
2947 continue
2948 }
2949 _ = v_1.Args[1]
2950 if x != v_1.Args[0] {
2951 continue
2952 }
2953 v_1_1 := v_1.Args[1]
2954 if v_1_1.Op != OpConst8 {
2955 continue
2956 }
2957 d := auxIntToInt8(v_1_1.AuxInt)
2958 if !(d >= c+1 && c+1 > c) {
2959 continue
2960 }
2961 v.reset(OpLeq8U)
2962 v0 := b.NewValue0(v.Pos, OpSub8, x.Type)
2963 v1 := b.NewValue0(v.Pos, OpConst8, x.Type)
2964 v1.AuxInt = int8ToAuxInt(c + 1)
2965 v0.AddArg2(x, v1)
2966 v2 := b.NewValue0(v.Pos, OpConst8, x.Type)
2967 v2.AuxInt = int8ToAuxInt(d - c - 1)
2968 v.AddArg2(v0, v2)
2969 return true
2970 }
2971 break
2972 }
2973
2974
2975
2976 for {
2977 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2978 if v_0.Op != OpLeq64U {
2979 continue
2980 }
2981 x := v_0.Args[1]
2982 v_0_0 := v_0.Args[0]
2983 if v_0_0.Op != OpConst64 {
2984 continue
2985 }
2986 c := auxIntToInt64(v_0_0.AuxInt)
2987 if v_1.Op != OpLess64U {
2988 continue
2989 }
2990 _ = v_1.Args[1]
2991 if x != v_1.Args[0] {
2992 continue
2993 }
2994 v_1_1 := v_1.Args[1]
2995 if v_1_1.Op != OpConst64 {
2996 continue
2997 }
2998 d := auxIntToInt64(v_1_1.AuxInt)
2999 if !(uint64(d) >= uint64(c)) {
3000 continue
3001 }
3002 v.reset(OpLess64U)
3003 v0 := b.NewValue0(v.Pos, OpSub64, x.Type)
3004 v1 := b.NewValue0(v.Pos, OpConst64, x.Type)
3005 v1.AuxInt = int64ToAuxInt(c)
3006 v0.AddArg2(x, v1)
3007 v2 := b.NewValue0(v.Pos, OpConst64, x.Type)
3008 v2.AuxInt = int64ToAuxInt(d - c)
3009 v.AddArg2(v0, v2)
3010 return true
3011 }
3012 break
3013 }
3014
3015
3016
3017 for {
3018 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3019 if v_0.Op != OpLeq64U {
3020 continue
3021 }
3022 x := v_0.Args[1]
3023 v_0_0 := v_0.Args[0]
3024 if v_0_0.Op != OpConst64 {
3025 continue
3026 }
3027 c := auxIntToInt64(v_0_0.AuxInt)
3028 if v_1.Op != OpLeq64U {
3029 continue
3030 }
3031 _ = v_1.Args[1]
3032 if x != v_1.Args[0] {
3033 continue
3034 }
3035 v_1_1 := v_1.Args[1]
3036 if v_1_1.Op != OpConst64 {
3037 continue
3038 }
3039 d := auxIntToInt64(v_1_1.AuxInt)
3040 if !(uint64(d) >= uint64(c)) {
3041 continue
3042 }
3043 v.reset(OpLeq64U)
3044 v0 := b.NewValue0(v.Pos, OpSub64, x.Type)
3045 v1 := b.NewValue0(v.Pos, OpConst64, x.Type)
3046 v1.AuxInt = int64ToAuxInt(c)
3047 v0.AddArg2(x, v1)
3048 v2 := b.NewValue0(v.Pos, OpConst64, x.Type)
3049 v2.AuxInt = int64ToAuxInt(d - c)
3050 v.AddArg2(v0, v2)
3051 return true
3052 }
3053 break
3054 }
3055
3056
3057
3058 for {
3059 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3060 if v_0.Op != OpLeq32U {
3061 continue
3062 }
3063 x := v_0.Args[1]
3064 v_0_0 := v_0.Args[0]
3065 if v_0_0.Op != OpConst32 {
3066 continue
3067 }
3068 c := auxIntToInt32(v_0_0.AuxInt)
3069 if v_1.Op != OpLess32U {
3070 continue
3071 }
3072 _ = v_1.Args[1]
3073 if x != v_1.Args[0] {
3074 continue
3075 }
3076 v_1_1 := v_1.Args[1]
3077 if v_1_1.Op != OpConst32 {
3078 continue
3079 }
3080 d := auxIntToInt32(v_1_1.AuxInt)
3081 if !(uint32(d) >= uint32(c)) {
3082 continue
3083 }
3084 v.reset(OpLess32U)
3085 v0 := b.NewValue0(v.Pos, OpSub32, x.Type)
3086 v1 := b.NewValue0(v.Pos, OpConst32, x.Type)
3087 v1.AuxInt = int32ToAuxInt(c)
3088 v0.AddArg2(x, v1)
3089 v2 := b.NewValue0(v.Pos, OpConst32, x.Type)
3090 v2.AuxInt = int32ToAuxInt(d - c)
3091 v.AddArg2(v0, v2)
3092 return true
3093 }
3094 break
3095 }
3096
3097
3098
3099 for {
3100 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3101 if v_0.Op != OpLeq32U {
3102 continue
3103 }
3104 x := v_0.Args[1]
3105 v_0_0 := v_0.Args[0]
3106 if v_0_0.Op != OpConst32 {
3107 continue
3108 }
3109 c := auxIntToInt32(v_0_0.AuxInt)
3110 if v_1.Op != OpLeq32U {
3111 continue
3112 }
3113 _ = v_1.Args[1]
3114 if x != v_1.Args[0] {
3115 continue
3116 }
3117 v_1_1 := v_1.Args[1]
3118 if v_1_1.Op != OpConst32 {
3119 continue
3120 }
3121 d := auxIntToInt32(v_1_1.AuxInt)
3122 if !(uint32(d) >= uint32(c)) {
3123 continue
3124 }
3125 v.reset(OpLeq32U)
3126 v0 := b.NewValue0(v.Pos, OpSub32, x.Type)
3127 v1 := b.NewValue0(v.Pos, OpConst32, x.Type)
3128 v1.AuxInt = int32ToAuxInt(c)
3129 v0.AddArg2(x, v1)
3130 v2 := b.NewValue0(v.Pos, OpConst32, x.Type)
3131 v2.AuxInt = int32ToAuxInt(d - c)
3132 v.AddArg2(v0, v2)
3133 return true
3134 }
3135 break
3136 }
3137
3138
3139
3140 for {
3141 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3142 if v_0.Op != OpLeq16U {
3143 continue
3144 }
3145 x := v_0.Args[1]
3146 v_0_0 := v_0.Args[0]
3147 if v_0_0.Op != OpConst16 {
3148 continue
3149 }
3150 c := auxIntToInt16(v_0_0.AuxInt)
3151 if v_1.Op != OpLess16U {
3152 continue
3153 }
3154 _ = v_1.Args[1]
3155 if x != v_1.Args[0] {
3156 continue
3157 }
3158 v_1_1 := v_1.Args[1]
3159 if v_1_1.Op != OpConst16 {
3160 continue
3161 }
3162 d := auxIntToInt16(v_1_1.AuxInt)
3163 if !(uint16(d) >= uint16(c)) {
3164 continue
3165 }
3166 v.reset(OpLess16U)
3167 v0 := b.NewValue0(v.Pos, OpSub16, x.Type)
3168 v1 := b.NewValue0(v.Pos, OpConst16, x.Type)
3169 v1.AuxInt = int16ToAuxInt(c)
3170 v0.AddArg2(x, v1)
3171 v2 := b.NewValue0(v.Pos, OpConst16, x.Type)
3172 v2.AuxInt = int16ToAuxInt(d - c)
3173 v.AddArg2(v0, v2)
3174 return true
3175 }
3176 break
3177 }
3178
3179
3180
3181 for {
3182 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3183 if v_0.Op != OpLeq16U {
3184 continue
3185 }
3186 x := v_0.Args[1]
3187 v_0_0 := v_0.Args[0]
3188 if v_0_0.Op != OpConst16 {
3189 continue
3190 }
3191 c := auxIntToInt16(v_0_0.AuxInt)
3192 if v_1.Op != OpLeq16U {
3193 continue
3194 }
3195 _ = v_1.Args[1]
3196 if x != v_1.Args[0] {
3197 continue
3198 }
3199 v_1_1 := v_1.Args[1]
3200 if v_1_1.Op != OpConst16 {
3201 continue
3202 }
3203 d := auxIntToInt16(v_1_1.AuxInt)
3204 if !(uint16(d) >= uint16(c)) {
3205 continue
3206 }
3207 v.reset(OpLeq16U)
3208 v0 := b.NewValue0(v.Pos, OpSub16, x.Type)
3209 v1 := b.NewValue0(v.Pos, OpConst16, x.Type)
3210 v1.AuxInt = int16ToAuxInt(c)
3211 v0.AddArg2(x, v1)
3212 v2 := b.NewValue0(v.Pos, OpConst16, x.Type)
3213 v2.AuxInt = int16ToAuxInt(d - c)
3214 v.AddArg2(v0, v2)
3215 return true
3216 }
3217 break
3218 }
3219
3220
3221
3222 for {
3223 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3224 if v_0.Op != OpLeq8U {
3225 continue
3226 }
3227 x := v_0.Args[1]
3228 v_0_0 := v_0.Args[0]
3229 if v_0_0.Op != OpConst8 {
3230 continue
3231 }
3232 c := auxIntToInt8(v_0_0.AuxInt)
3233 if v_1.Op != OpLess8U {
3234 continue
3235 }
3236 _ = v_1.Args[1]
3237 if x != v_1.Args[0] {
3238 continue
3239 }
3240 v_1_1 := v_1.Args[1]
3241 if v_1_1.Op != OpConst8 {
3242 continue
3243 }
3244 d := auxIntToInt8(v_1_1.AuxInt)
3245 if !(uint8(d) >= uint8(c)) {
3246 continue
3247 }
3248 v.reset(OpLess8U)
3249 v0 := b.NewValue0(v.Pos, OpSub8, x.Type)
3250 v1 := b.NewValue0(v.Pos, OpConst8, x.Type)
3251 v1.AuxInt = int8ToAuxInt(c)
3252 v0.AddArg2(x, v1)
3253 v2 := b.NewValue0(v.Pos, OpConst8, x.Type)
3254 v2.AuxInt = int8ToAuxInt(d - c)
3255 v.AddArg2(v0, v2)
3256 return true
3257 }
3258 break
3259 }
3260
3261
3262
3263 for {
3264 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3265 if v_0.Op != OpLeq8U {
3266 continue
3267 }
3268 x := v_0.Args[1]
3269 v_0_0 := v_0.Args[0]
3270 if v_0_0.Op != OpConst8 {
3271 continue
3272 }
3273 c := auxIntToInt8(v_0_0.AuxInt)
3274 if v_1.Op != OpLeq8U {
3275 continue
3276 }
3277 _ = v_1.Args[1]
3278 if x != v_1.Args[0] {
3279 continue
3280 }
3281 v_1_1 := v_1.Args[1]
3282 if v_1_1.Op != OpConst8 {
3283 continue
3284 }
3285 d := auxIntToInt8(v_1_1.AuxInt)
3286 if !(uint8(d) >= uint8(c)) {
3287 continue
3288 }
3289 v.reset(OpLeq8U)
3290 v0 := b.NewValue0(v.Pos, OpSub8, x.Type)
3291 v1 := b.NewValue0(v.Pos, OpConst8, x.Type)
3292 v1.AuxInt = int8ToAuxInt(c)
3293 v0.AddArg2(x, v1)
3294 v2 := b.NewValue0(v.Pos, OpConst8, x.Type)
3295 v2.AuxInt = int8ToAuxInt(d - c)
3296 v.AddArg2(v0, v2)
3297 return true
3298 }
3299 break
3300 }
3301
3302
3303
3304 for {
3305 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3306 if v_0.Op != OpLess64U {
3307 continue
3308 }
3309 x := v_0.Args[1]
3310 v_0_0 := v_0.Args[0]
3311 if v_0_0.Op != OpConst64 {
3312 continue
3313 }
3314 c := auxIntToInt64(v_0_0.AuxInt)
3315 if v_1.Op != OpLess64U {
3316 continue
3317 }
3318 _ = v_1.Args[1]
3319 if x != v_1.Args[0] {
3320 continue
3321 }
3322 v_1_1 := v_1.Args[1]
3323 if v_1_1.Op != OpConst64 {
3324 continue
3325 }
3326 d := auxIntToInt64(v_1_1.AuxInt)
3327 if !(uint64(d) >= uint64(c+1) && uint64(c+1) > uint64(c)) {
3328 continue
3329 }
3330 v.reset(OpLess64U)
3331 v0 := b.NewValue0(v.Pos, OpSub64, x.Type)
3332 v1 := b.NewValue0(v.Pos, OpConst64, x.Type)
3333 v1.AuxInt = int64ToAuxInt(c + 1)
3334 v0.AddArg2(x, v1)
3335 v2 := b.NewValue0(v.Pos, OpConst64, x.Type)
3336 v2.AuxInt = int64ToAuxInt(d - c - 1)
3337 v.AddArg2(v0, v2)
3338 return true
3339 }
3340 break
3341 }
3342
3343
3344
3345 for {
3346 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3347 if v_0.Op != OpLess64U {
3348 continue
3349 }
3350 x := v_0.Args[1]
3351 v_0_0 := v_0.Args[0]
3352 if v_0_0.Op != OpConst64 {
3353 continue
3354 }
3355 c := auxIntToInt64(v_0_0.AuxInt)
3356 if v_1.Op != OpLeq64U {
3357 continue
3358 }
3359 _ = v_1.Args[1]
3360 if x != v_1.Args[0] {
3361 continue
3362 }
3363 v_1_1 := v_1.Args[1]
3364 if v_1_1.Op != OpConst64 {
3365 continue
3366 }
3367 d := auxIntToInt64(v_1_1.AuxInt)
3368 if !(uint64(d) >= uint64(c+1) && uint64(c+1) > uint64(c)) {
3369 continue
3370 }
3371 v.reset(OpLeq64U)
3372 v0 := b.NewValue0(v.Pos, OpSub64, x.Type)
3373 v1 := b.NewValue0(v.Pos, OpConst64, x.Type)
3374 v1.AuxInt = int64ToAuxInt(c + 1)
3375 v0.AddArg2(x, v1)
3376 v2 := b.NewValue0(v.Pos, OpConst64, x.Type)
3377 v2.AuxInt = int64ToAuxInt(d - c - 1)
3378 v.AddArg2(v0, v2)
3379 return true
3380 }
3381 break
3382 }
3383
3384
3385
3386 for {
3387 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3388 if v_0.Op != OpLess32U {
3389 continue
3390 }
3391 x := v_0.Args[1]
3392 v_0_0 := v_0.Args[0]
3393 if v_0_0.Op != OpConst32 {
3394 continue
3395 }
3396 c := auxIntToInt32(v_0_0.AuxInt)
3397 if v_1.Op != OpLess32U {
3398 continue
3399 }
3400 _ = v_1.Args[1]
3401 if x != v_1.Args[0] {
3402 continue
3403 }
3404 v_1_1 := v_1.Args[1]
3405 if v_1_1.Op != OpConst32 {
3406 continue
3407 }
3408 d := auxIntToInt32(v_1_1.AuxInt)
3409 if !(uint32(d) >= uint32(c+1) && uint32(c+1) > uint32(c)) {
3410 continue
3411 }
3412 v.reset(OpLess32U)
3413 v0 := b.NewValue0(v.Pos, OpSub32, x.Type)
3414 v1 := b.NewValue0(v.Pos, OpConst32, x.Type)
3415 v1.AuxInt = int32ToAuxInt(c + 1)
3416 v0.AddArg2(x, v1)
3417 v2 := b.NewValue0(v.Pos, OpConst32, x.Type)
3418 v2.AuxInt = int32ToAuxInt(d - c - 1)
3419 v.AddArg2(v0, v2)
3420 return true
3421 }
3422 break
3423 }
3424
3425
3426
3427 for {
3428 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3429 if v_0.Op != OpLess32U {
3430 continue
3431 }
3432 x := v_0.Args[1]
3433 v_0_0 := v_0.Args[0]
3434 if v_0_0.Op != OpConst32 {
3435 continue
3436 }
3437 c := auxIntToInt32(v_0_0.AuxInt)
3438 if v_1.Op != OpLeq32U {
3439 continue
3440 }
3441 _ = v_1.Args[1]
3442 if x != v_1.Args[0] {
3443 continue
3444 }
3445 v_1_1 := v_1.Args[1]
3446 if v_1_1.Op != OpConst32 {
3447 continue
3448 }
3449 d := auxIntToInt32(v_1_1.AuxInt)
3450 if !(uint32(d) >= uint32(c+1) && uint32(c+1) > uint32(c)) {
3451 continue
3452 }
3453 v.reset(OpLeq32U)
3454 v0 := b.NewValue0(v.Pos, OpSub32, x.Type)
3455 v1 := b.NewValue0(v.Pos, OpConst32, x.Type)
3456 v1.AuxInt = int32ToAuxInt(c + 1)
3457 v0.AddArg2(x, v1)
3458 v2 := b.NewValue0(v.Pos, OpConst32, x.Type)
3459 v2.AuxInt = int32ToAuxInt(d - c - 1)
3460 v.AddArg2(v0, v2)
3461 return true
3462 }
3463 break
3464 }
3465
3466
3467
3468 for {
3469 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3470 if v_0.Op != OpLess16U {
3471 continue
3472 }
3473 x := v_0.Args[1]
3474 v_0_0 := v_0.Args[0]
3475 if v_0_0.Op != OpConst16 {
3476 continue
3477 }
3478 c := auxIntToInt16(v_0_0.AuxInt)
3479 if v_1.Op != OpLess16U {
3480 continue
3481 }
3482 _ = v_1.Args[1]
3483 if x != v_1.Args[0] {
3484 continue
3485 }
3486 v_1_1 := v_1.Args[1]
3487 if v_1_1.Op != OpConst16 {
3488 continue
3489 }
3490 d := auxIntToInt16(v_1_1.AuxInt)
3491 if !(uint16(d) >= uint16(c+1) && uint16(c+1) > uint16(c)) {
3492 continue
3493 }
3494 v.reset(OpLess16U)
3495 v0 := b.NewValue0(v.Pos, OpSub16, x.Type)
3496 v1 := b.NewValue0(v.Pos, OpConst16, x.Type)
3497 v1.AuxInt = int16ToAuxInt(c + 1)
3498 v0.AddArg2(x, v1)
3499 v2 := b.NewValue0(v.Pos, OpConst16, x.Type)
3500 v2.AuxInt = int16ToAuxInt(d - c - 1)
3501 v.AddArg2(v0, v2)
3502 return true
3503 }
3504 break
3505 }
3506
3507
3508
3509 for {
3510 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3511 if v_0.Op != OpLess16U {
3512 continue
3513 }
3514 x := v_0.Args[1]
3515 v_0_0 := v_0.Args[0]
3516 if v_0_0.Op != OpConst16 {
3517 continue
3518 }
3519 c := auxIntToInt16(v_0_0.AuxInt)
3520 if v_1.Op != OpLeq16U {
3521 continue
3522 }
3523 _ = v_1.Args[1]
3524 if x != v_1.Args[0] {
3525 continue
3526 }
3527 v_1_1 := v_1.Args[1]
3528 if v_1_1.Op != OpConst16 {
3529 continue
3530 }
3531 d := auxIntToInt16(v_1_1.AuxInt)
3532 if !(uint16(d) >= uint16(c+1) && uint16(c+1) > uint16(c)) {
3533 continue
3534 }
3535 v.reset(OpLeq16U)
3536 v0 := b.NewValue0(v.Pos, OpSub16, x.Type)
3537 v1 := b.NewValue0(v.Pos, OpConst16, x.Type)
3538 v1.AuxInt = int16ToAuxInt(c + 1)
3539 v0.AddArg2(x, v1)
3540 v2 := b.NewValue0(v.Pos, OpConst16, x.Type)
3541 v2.AuxInt = int16ToAuxInt(d - c - 1)
3542 v.AddArg2(v0, v2)
3543 return true
3544 }
3545 break
3546 }
3547
3548
3549
3550 for {
3551 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3552 if v_0.Op != OpLess8U {
3553 continue
3554 }
3555 x := v_0.Args[1]
3556 v_0_0 := v_0.Args[0]
3557 if v_0_0.Op != OpConst8 {
3558 continue
3559 }
3560 c := auxIntToInt8(v_0_0.AuxInt)
3561 if v_1.Op != OpLess8U {
3562 continue
3563 }
3564 _ = v_1.Args[1]
3565 if x != v_1.Args[0] {
3566 continue
3567 }
3568 v_1_1 := v_1.Args[1]
3569 if v_1_1.Op != OpConst8 {
3570 continue
3571 }
3572 d := auxIntToInt8(v_1_1.AuxInt)
3573 if !(uint8(d) >= uint8(c+1) && uint8(c+1) > uint8(c)) {
3574 continue
3575 }
3576 v.reset(OpLess8U)
3577 v0 := b.NewValue0(v.Pos, OpSub8, x.Type)
3578 v1 := b.NewValue0(v.Pos, OpConst8, x.Type)
3579 v1.AuxInt = int8ToAuxInt(c + 1)
3580 v0.AddArg2(x, v1)
3581 v2 := b.NewValue0(v.Pos, OpConst8, x.Type)
3582 v2.AuxInt = int8ToAuxInt(d - c - 1)
3583 v.AddArg2(v0, v2)
3584 return true
3585 }
3586 break
3587 }
3588
3589
3590
3591 for {
3592 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3593 if v_0.Op != OpLess8U {
3594 continue
3595 }
3596 x := v_0.Args[1]
3597 v_0_0 := v_0.Args[0]
3598 if v_0_0.Op != OpConst8 {
3599 continue
3600 }
3601 c := auxIntToInt8(v_0_0.AuxInt)
3602 if v_1.Op != OpLeq8U {
3603 continue
3604 }
3605 _ = v_1.Args[1]
3606 if x != v_1.Args[0] {
3607 continue
3608 }
3609 v_1_1 := v_1.Args[1]
3610 if v_1_1.Op != OpConst8 {
3611 continue
3612 }
3613 d := auxIntToInt8(v_1_1.AuxInt)
3614 if !(uint8(d) >= uint8(c+1) && uint8(c+1) > uint8(c)) {
3615 continue
3616 }
3617 v.reset(OpLeq8U)
3618 v0 := b.NewValue0(v.Pos, OpSub8, x.Type)
3619 v1 := b.NewValue0(v.Pos, OpConst8, x.Type)
3620 v1.AuxInt = int8ToAuxInt(c + 1)
3621 v0.AddArg2(x, v1)
3622 v2 := b.NewValue0(v.Pos, OpConst8, x.Type)
3623 v2.AuxInt = int8ToAuxInt(d - c - 1)
3624 v.AddArg2(v0, v2)
3625 return true
3626 }
3627 break
3628 }
3629 return false
3630 }
3631 func rewriteValuegeneric_OpArraySelect(v *Value) bool {
3632 v_0 := v.Args[0]
3633
3634
3635 for {
3636 if v_0.Op != OpArrayMake1 {
3637 break
3638 }
3639 x := v_0.Args[0]
3640 v.copyOf(x)
3641 return true
3642 }
3643
3644
3645 for {
3646 if auxIntToInt64(v.AuxInt) != 0 || v_0.Op != OpIData {
3647 break
3648 }
3649 x := v_0.Args[0]
3650 v.reset(OpIData)
3651 v.AddArg(x)
3652 return true
3653 }
3654 return false
3655 }
3656 func rewriteValuegeneric_OpCom16(v *Value) bool {
3657 v_0 := v.Args[0]
3658
3659
3660 for {
3661 if v_0.Op != OpCom16 {
3662 break
3663 }
3664 x := v_0.Args[0]
3665 v.copyOf(x)
3666 return true
3667 }
3668
3669
3670 for {
3671 if v_0.Op != OpConst16 {
3672 break
3673 }
3674 c := auxIntToInt16(v_0.AuxInt)
3675 v.reset(OpConst16)
3676 v.AuxInt = int16ToAuxInt(^c)
3677 return true
3678 }
3679
3680
3681 for {
3682 if v_0.Op != OpAdd16 {
3683 break
3684 }
3685 _ = v_0.Args[1]
3686 v_0_0 := v_0.Args[0]
3687 v_0_1 := v_0.Args[1]
3688 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
3689 if v_0_0.Op != OpConst16 || auxIntToInt16(v_0_0.AuxInt) != -1 {
3690 continue
3691 }
3692 x := v_0_1
3693 v.reset(OpNeg16)
3694 v.AddArg(x)
3695 return true
3696 }
3697 break
3698 }
3699 return false
3700 }
3701 func rewriteValuegeneric_OpCom32(v *Value) bool {
3702 v_0 := v.Args[0]
3703
3704
3705 for {
3706 if v_0.Op != OpCom32 {
3707 break
3708 }
3709 x := v_0.Args[0]
3710 v.copyOf(x)
3711 return true
3712 }
3713
3714
3715 for {
3716 if v_0.Op != OpConst32 {
3717 break
3718 }
3719 c := auxIntToInt32(v_0.AuxInt)
3720 v.reset(OpConst32)
3721 v.AuxInt = int32ToAuxInt(^c)
3722 return true
3723 }
3724
3725
3726 for {
3727 if v_0.Op != OpAdd32 {
3728 break
3729 }
3730 _ = v_0.Args[1]
3731 v_0_0 := v_0.Args[0]
3732 v_0_1 := v_0.Args[1]
3733 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
3734 if v_0_0.Op != OpConst32 || auxIntToInt32(v_0_0.AuxInt) != -1 {
3735 continue
3736 }
3737 x := v_0_1
3738 v.reset(OpNeg32)
3739 v.AddArg(x)
3740 return true
3741 }
3742 break
3743 }
3744 return false
3745 }
3746 func rewriteValuegeneric_OpCom64(v *Value) bool {
3747 v_0 := v.Args[0]
3748
3749
3750 for {
3751 if v_0.Op != OpCom64 {
3752 break
3753 }
3754 x := v_0.Args[0]
3755 v.copyOf(x)
3756 return true
3757 }
3758
3759
3760 for {
3761 if v_0.Op != OpConst64 {
3762 break
3763 }
3764 c := auxIntToInt64(v_0.AuxInt)
3765 v.reset(OpConst64)
3766 v.AuxInt = int64ToAuxInt(^c)
3767 return true
3768 }
3769
3770
3771 for {
3772 if v_0.Op != OpAdd64 {
3773 break
3774 }
3775 _ = v_0.Args[1]
3776 v_0_0 := v_0.Args[0]
3777 v_0_1 := v_0.Args[1]
3778 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
3779 if v_0_0.Op != OpConst64 || auxIntToInt64(v_0_0.AuxInt) != -1 {
3780 continue
3781 }
3782 x := v_0_1
3783 v.reset(OpNeg64)
3784 v.AddArg(x)
3785 return true
3786 }
3787 break
3788 }
3789 return false
3790 }
3791 func rewriteValuegeneric_OpCom8(v *Value) bool {
3792 v_0 := v.Args[0]
3793
3794
3795 for {
3796 if v_0.Op != OpCom8 {
3797 break
3798 }
3799 x := v_0.Args[0]
3800 v.copyOf(x)
3801 return true
3802 }
3803
3804
3805 for {
3806 if v_0.Op != OpConst8 {
3807 break
3808 }
3809 c := auxIntToInt8(v_0.AuxInt)
3810 v.reset(OpConst8)
3811 v.AuxInt = int8ToAuxInt(^c)
3812 return true
3813 }
3814
3815
3816 for {
3817 if v_0.Op != OpAdd8 {
3818 break
3819 }
3820 _ = v_0.Args[1]
3821 v_0_0 := v_0.Args[0]
3822 v_0_1 := v_0.Args[1]
3823 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
3824 if v_0_0.Op != OpConst8 || auxIntToInt8(v_0_0.AuxInt) != -1 {
3825 continue
3826 }
3827 x := v_0_1
3828 v.reset(OpNeg8)
3829 v.AddArg(x)
3830 return true
3831 }
3832 break
3833 }
3834 return false
3835 }
3836 func rewriteValuegeneric_OpConstInterface(v *Value) bool {
3837 b := v.Block
3838 typ := &b.Func.Config.Types
3839
3840
3841 for {
3842 v.reset(OpIMake)
3843 v0 := b.NewValue0(v.Pos, OpConstNil, typ.Uintptr)
3844 v1 := b.NewValue0(v.Pos, OpConstNil, typ.BytePtr)
3845 v.AddArg2(v0, v1)
3846 return true
3847 }
3848 }
3849 func rewriteValuegeneric_OpConstSlice(v *Value) bool {
3850 b := v.Block
3851 config := b.Func.Config
3852 typ := &b.Func.Config.Types
3853
3854
3855
3856 for {
3857 if !(config.PtrSize == 4) {
3858 break
3859 }
3860 v.reset(OpSliceMake)
3861 v0 := b.NewValue0(v.Pos, OpConstNil, v.Type.Elem().PtrTo())
3862 v1 := b.NewValue0(v.Pos, OpConst32, typ.Int)
3863 v1.AuxInt = int32ToAuxInt(0)
3864 v.AddArg3(v0, v1, v1)
3865 return true
3866 }
3867
3868
3869
3870 for {
3871 if !(config.PtrSize == 8) {
3872 break
3873 }
3874 v.reset(OpSliceMake)
3875 v0 := b.NewValue0(v.Pos, OpConstNil, v.Type.Elem().PtrTo())
3876 v1 := b.NewValue0(v.Pos, OpConst64, typ.Int)
3877 v1.AuxInt = int64ToAuxInt(0)
3878 v.AddArg3(v0, v1, v1)
3879 return true
3880 }
3881 return false
3882 }
3883 func rewriteValuegeneric_OpConstString(v *Value) bool {
3884 b := v.Block
3885 config := b.Func.Config
3886 fe := b.Func.fe
3887 typ := &b.Func.Config.Types
3888
3889
3890
3891 for {
3892 str := auxToString(v.Aux)
3893 if !(config.PtrSize == 4 && str == "") {
3894 break
3895 }
3896 v.reset(OpStringMake)
3897 v0 := b.NewValue0(v.Pos, OpConstNil, typ.BytePtr)
3898 v1 := b.NewValue0(v.Pos, OpConst32, typ.Int)
3899 v1.AuxInt = int32ToAuxInt(0)
3900 v.AddArg2(v0, v1)
3901 return true
3902 }
3903
3904
3905
3906 for {
3907 str := auxToString(v.Aux)
3908 if !(config.PtrSize == 8 && str == "") {
3909 break
3910 }
3911 v.reset(OpStringMake)
3912 v0 := b.NewValue0(v.Pos, OpConstNil, typ.BytePtr)
3913 v1 := b.NewValue0(v.Pos, OpConst64, typ.Int)
3914 v1.AuxInt = int64ToAuxInt(0)
3915 v.AddArg2(v0, v1)
3916 return true
3917 }
3918
3919
3920
3921 for {
3922 str := auxToString(v.Aux)
3923 if !(config.PtrSize == 4 && str != "") {
3924 break
3925 }
3926 v.reset(OpStringMake)
3927 v0 := b.NewValue0(v.Pos, OpAddr, typ.BytePtr)
3928 v0.Aux = symToAux(fe.StringData(str))
3929 v1 := b.NewValue0(v.Pos, OpSB, typ.Uintptr)
3930 v0.AddArg(v1)
3931 v2 := b.NewValue0(v.Pos, OpConst32, typ.Int)
3932 v2.AuxInt = int32ToAuxInt(int32(len(str)))
3933 v.AddArg2(v0, v2)
3934 return true
3935 }
3936
3937
3938
3939 for {
3940 str := auxToString(v.Aux)
3941 if !(config.PtrSize == 8 && str != "") {
3942 break
3943 }
3944 v.reset(OpStringMake)
3945 v0 := b.NewValue0(v.Pos, OpAddr, typ.BytePtr)
3946 v0.Aux = symToAux(fe.StringData(str))
3947 v1 := b.NewValue0(v.Pos, OpSB, typ.Uintptr)
3948 v0.AddArg(v1)
3949 v2 := b.NewValue0(v.Pos, OpConst64, typ.Int)
3950 v2.AuxInt = int64ToAuxInt(int64(len(str)))
3951 v.AddArg2(v0, v2)
3952 return true
3953 }
3954 return false
3955 }
3956 func rewriteValuegeneric_OpConvert(v *Value) bool {
3957 v_1 := v.Args[1]
3958 v_0 := v.Args[0]
3959
3960
3961 for {
3962 if v_0.Op != OpAdd64 {
3963 break
3964 }
3965 _ = v_0.Args[1]
3966 v_0_0 := v_0.Args[0]
3967 v_0_1 := v_0.Args[1]
3968 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
3969 if v_0_0.Op != OpConvert {
3970 continue
3971 }
3972 mem := v_0_0.Args[1]
3973 ptr := v_0_0.Args[0]
3974 off := v_0_1
3975 if mem != v_1 {
3976 continue
3977 }
3978 v.reset(OpAddPtr)
3979 v.AddArg2(ptr, off)
3980 return true
3981 }
3982 break
3983 }
3984
3985
3986 for {
3987 if v_0.Op != OpAdd32 {
3988 break
3989 }
3990 _ = v_0.Args[1]
3991 v_0_0 := v_0.Args[0]
3992 v_0_1 := v_0.Args[1]
3993 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
3994 if v_0_0.Op != OpConvert {
3995 continue
3996 }
3997 mem := v_0_0.Args[1]
3998 ptr := v_0_0.Args[0]
3999 off := v_0_1
4000 if mem != v_1 {
4001 continue
4002 }
4003 v.reset(OpAddPtr)
4004 v.AddArg2(ptr, off)
4005 return true
4006 }
4007 break
4008 }
4009
4010
4011 for {
4012 if v_0.Op != OpConvert {
4013 break
4014 }
4015 mem := v_0.Args[1]
4016 ptr := v_0.Args[0]
4017 if mem != v_1 {
4018 break
4019 }
4020 v.copyOf(ptr)
4021 return true
4022 }
4023 return false
4024 }
4025 func rewriteValuegeneric_OpCtz16(v *Value) bool {
4026 v_0 := v.Args[0]
4027 b := v.Block
4028 config := b.Func.Config
4029
4030
4031
4032 for {
4033 if v_0.Op != OpConst16 {
4034 break
4035 }
4036 c := auxIntToInt16(v_0.AuxInt)
4037 if !(config.PtrSize == 4) {
4038 break
4039 }
4040 v.reset(OpConst32)
4041 v.AuxInt = int32ToAuxInt(int32(ntz16(c)))
4042 return true
4043 }
4044
4045
4046
4047 for {
4048 if v_0.Op != OpConst16 {
4049 break
4050 }
4051 c := auxIntToInt16(v_0.AuxInt)
4052 if !(config.PtrSize == 8) {
4053 break
4054 }
4055 v.reset(OpConst64)
4056 v.AuxInt = int64ToAuxInt(int64(ntz16(c)))
4057 return true
4058 }
4059 return false
4060 }
4061 func rewriteValuegeneric_OpCtz32(v *Value) bool {
4062 v_0 := v.Args[0]
4063 b := v.Block
4064 config := b.Func.Config
4065
4066
4067
4068 for {
4069 if v_0.Op != OpConst32 {
4070 break
4071 }
4072 c := auxIntToInt32(v_0.AuxInt)
4073 if !(config.PtrSize == 4) {
4074 break
4075 }
4076 v.reset(OpConst32)
4077 v.AuxInt = int32ToAuxInt(int32(ntz32(c)))
4078 return true
4079 }
4080
4081
4082
4083 for {
4084 if v_0.Op != OpConst32 {
4085 break
4086 }
4087 c := auxIntToInt32(v_0.AuxInt)
4088 if !(config.PtrSize == 8) {
4089 break
4090 }
4091 v.reset(OpConst64)
4092 v.AuxInt = int64ToAuxInt(int64(ntz32(c)))
4093 return true
4094 }
4095 return false
4096 }
4097 func rewriteValuegeneric_OpCtz64(v *Value) bool {
4098 v_0 := v.Args[0]
4099 b := v.Block
4100 config := b.Func.Config
4101
4102
4103
4104 for {
4105 if v_0.Op != OpConst64 {
4106 break
4107 }
4108 c := auxIntToInt64(v_0.AuxInt)
4109 if !(config.PtrSize == 4) {
4110 break
4111 }
4112 v.reset(OpConst32)
4113 v.AuxInt = int32ToAuxInt(int32(ntz64(c)))
4114 return true
4115 }
4116
4117
4118
4119 for {
4120 if v_0.Op != OpConst64 {
4121 break
4122 }
4123 c := auxIntToInt64(v_0.AuxInt)
4124 if !(config.PtrSize == 8) {
4125 break
4126 }
4127 v.reset(OpConst64)
4128 v.AuxInt = int64ToAuxInt(int64(ntz64(c)))
4129 return true
4130 }
4131 return false
4132 }
4133 func rewriteValuegeneric_OpCtz8(v *Value) bool {
4134 v_0 := v.Args[0]
4135 b := v.Block
4136 config := b.Func.Config
4137
4138
4139
4140 for {
4141 if v_0.Op != OpConst8 {
4142 break
4143 }
4144 c := auxIntToInt8(v_0.AuxInt)
4145 if !(config.PtrSize == 4) {
4146 break
4147 }
4148 v.reset(OpConst32)
4149 v.AuxInt = int32ToAuxInt(int32(ntz8(c)))
4150 return true
4151 }
4152
4153
4154
4155 for {
4156 if v_0.Op != OpConst8 {
4157 break
4158 }
4159 c := auxIntToInt8(v_0.AuxInt)
4160 if !(config.PtrSize == 8) {
4161 break
4162 }
4163 v.reset(OpConst64)
4164 v.AuxInt = int64ToAuxInt(int64(ntz8(c)))
4165 return true
4166 }
4167 return false
4168 }
4169 func rewriteValuegeneric_OpCvt32Fto32(v *Value) bool {
4170 v_0 := v.Args[0]
4171
4172
4173 for {
4174 if v_0.Op != OpConst32F {
4175 break
4176 }
4177 c := auxIntToFloat32(v_0.AuxInt)
4178 v.reset(OpConst32)
4179 v.AuxInt = int32ToAuxInt(int32(c))
4180 return true
4181 }
4182 return false
4183 }
4184 func rewriteValuegeneric_OpCvt32Fto64(v *Value) bool {
4185 v_0 := v.Args[0]
4186
4187
4188 for {
4189 if v_0.Op != OpConst32F {
4190 break
4191 }
4192 c := auxIntToFloat32(v_0.AuxInt)
4193 v.reset(OpConst64)
4194 v.AuxInt = int64ToAuxInt(int64(c))
4195 return true
4196 }
4197 return false
4198 }
4199 func rewriteValuegeneric_OpCvt32Fto64F(v *Value) bool {
4200 v_0 := v.Args[0]
4201
4202
4203 for {
4204 if v_0.Op != OpConst32F {
4205 break
4206 }
4207 c := auxIntToFloat32(v_0.AuxInt)
4208 v.reset(OpConst64F)
4209 v.AuxInt = float64ToAuxInt(float64(c))
4210 return true
4211 }
4212 return false
4213 }
4214 func rewriteValuegeneric_OpCvt32to32F(v *Value) bool {
4215 v_0 := v.Args[0]
4216
4217
4218 for {
4219 if v_0.Op != OpConst32 {
4220 break
4221 }
4222 c := auxIntToInt32(v_0.AuxInt)
4223 v.reset(OpConst32F)
4224 v.AuxInt = float32ToAuxInt(float32(c))
4225 return true
4226 }
4227 return false
4228 }
4229 func rewriteValuegeneric_OpCvt32to64F(v *Value) bool {
4230 v_0 := v.Args[0]
4231
4232
4233 for {
4234 if v_0.Op != OpConst32 {
4235 break
4236 }
4237 c := auxIntToInt32(v_0.AuxInt)
4238 v.reset(OpConst64F)
4239 v.AuxInt = float64ToAuxInt(float64(c))
4240 return true
4241 }
4242 return false
4243 }
4244 func rewriteValuegeneric_OpCvt64Fto32(v *Value) bool {
4245 v_0 := v.Args[0]
4246
4247
4248 for {
4249 if v_0.Op != OpConst64F {
4250 break
4251 }
4252 c := auxIntToFloat64(v_0.AuxInt)
4253 v.reset(OpConst32)
4254 v.AuxInt = int32ToAuxInt(int32(c))
4255 return true
4256 }
4257 return false
4258 }
4259 func rewriteValuegeneric_OpCvt64Fto32F(v *Value) bool {
4260 v_0 := v.Args[0]
4261
4262
4263 for {
4264 if v_0.Op != OpConst64F {
4265 break
4266 }
4267 c := auxIntToFloat64(v_0.AuxInt)
4268 v.reset(OpConst32F)
4269 v.AuxInt = float32ToAuxInt(float32(c))
4270 return true
4271 }
4272
4273
4274
4275 for {
4276 sqrt0 := v_0
4277 if sqrt0.Op != OpSqrt {
4278 break
4279 }
4280 sqrt0_0 := sqrt0.Args[0]
4281 if sqrt0_0.Op != OpCvt32Fto64F {
4282 break
4283 }
4284 x := sqrt0_0.Args[0]
4285 if !(sqrt0.Uses == 1) {
4286 break
4287 }
4288 v.reset(OpSqrt32)
4289 v.AddArg(x)
4290 return true
4291 }
4292 return false
4293 }
4294 func rewriteValuegeneric_OpCvt64Fto64(v *Value) bool {
4295 v_0 := v.Args[0]
4296
4297
4298 for {
4299 if v_0.Op != OpConst64F {
4300 break
4301 }
4302 c := auxIntToFloat64(v_0.AuxInt)
4303 v.reset(OpConst64)
4304 v.AuxInt = int64ToAuxInt(int64(c))
4305 return true
4306 }
4307 return false
4308 }
4309 func rewriteValuegeneric_OpCvt64to32F(v *Value) bool {
4310 v_0 := v.Args[0]
4311
4312
4313 for {
4314 if v_0.Op != OpConst64 {
4315 break
4316 }
4317 c := auxIntToInt64(v_0.AuxInt)
4318 v.reset(OpConst32F)
4319 v.AuxInt = float32ToAuxInt(float32(c))
4320 return true
4321 }
4322 return false
4323 }
4324 func rewriteValuegeneric_OpCvt64to64F(v *Value) bool {
4325 v_0 := v.Args[0]
4326
4327
4328 for {
4329 if v_0.Op != OpConst64 {
4330 break
4331 }
4332 c := auxIntToInt64(v_0.AuxInt)
4333 v.reset(OpConst64F)
4334 v.AuxInt = float64ToAuxInt(float64(c))
4335 return true
4336 }
4337 return false
4338 }
4339 func rewriteValuegeneric_OpCvtBoolToUint8(v *Value) bool {
4340 v_0 := v.Args[0]
4341
4342
4343 for {
4344 if v_0.Op != OpConstBool || auxIntToBool(v_0.AuxInt) != false {
4345 break
4346 }
4347 v.reset(OpConst8)
4348 v.AuxInt = int8ToAuxInt(0)
4349 return true
4350 }
4351
4352
4353 for {
4354 if v_0.Op != OpConstBool || auxIntToBool(v_0.AuxInt) != true {
4355 break
4356 }
4357 v.reset(OpConst8)
4358 v.AuxInt = int8ToAuxInt(1)
4359 return true
4360 }
4361 return false
4362 }
4363 func rewriteValuegeneric_OpDiv16(v *Value) bool {
4364 v_1 := v.Args[1]
4365 v_0 := v.Args[0]
4366 b := v.Block
4367 typ := &b.Func.Config.Types
4368
4369
4370
4371 for {
4372 if v_0.Op != OpConst16 {
4373 break
4374 }
4375 c := auxIntToInt16(v_0.AuxInt)
4376 if v_1.Op != OpConst16 {
4377 break
4378 }
4379 d := auxIntToInt16(v_1.AuxInt)
4380 if !(d != 0) {
4381 break
4382 }
4383 v.reset(OpConst16)
4384 v.AuxInt = int16ToAuxInt(c / d)
4385 return true
4386 }
4387
4388
4389
4390 for {
4391 n := v_0
4392 if v_1.Op != OpConst16 {
4393 break
4394 }
4395 c := auxIntToInt16(v_1.AuxInt)
4396 if !(isNonNegative(n) && isPowerOfTwo16(c)) {
4397 break
4398 }
4399 v.reset(OpRsh16Ux64)
4400 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
4401 v0.AuxInt = int64ToAuxInt(log16(c))
4402 v.AddArg2(n, v0)
4403 return true
4404 }
4405
4406
4407
4408 for {
4409 t := v.Type
4410 n := v_0
4411 if v_1.Op != OpConst16 {
4412 break
4413 }
4414 c := auxIntToInt16(v_1.AuxInt)
4415 if !(c < 0 && c != -1<<15) {
4416 break
4417 }
4418 v.reset(OpNeg16)
4419 v0 := b.NewValue0(v.Pos, OpDiv16, t)
4420 v1 := b.NewValue0(v.Pos, OpConst16, t)
4421 v1.AuxInt = int16ToAuxInt(-c)
4422 v0.AddArg2(n, v1)
4423 v.AddArg(v0)
4424 return true
4425 }
4426
4427
4428 for {
4429 t := v.Type
4430 x := v_0
4431 if v_1.Op != OpConst16 || auxIntToInt16(v_1.AuxInt) != -1<<15 {
4432 break
4433 }
4434 v.reset(OpRsh16Ux64)
4435 v0 := b.NewValue0(v.Pos, OpAnd16, t)
4436 v1 := b.NewValue0(v.Pos, OpNeg16, t)
4437 v1.AddArg(x)
4438 v0.AddArg2(x, v1)
4439 v2 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
4440 v2.AuxInt = int64ToAuxInt(15)
4441 v.AddArg2(v0, v2)
4442 return true
4443 }
4444
4445
4446
4447 for {
4448 t := v.Type
4449 n := v_0
4450 if v_1.Op != OpConst16 {
4451 break
4452 }
4453 c := auxIntToInt16(v_1.AuxInt)
4454 if !(isPowerOfTwo16(c)) {
4455 break
4456 }
4457 v.reset(OpRsh16x64)
4458 v0 := b.NewValue0(v.Pos, OpAdd16, t)
4459 v1 := b.NewValue0(v.Pos, OpRsh16Ux64, t)
4460 v2 := b.NewValue0(v.Pos, OpRsh16x64, t)
4461 v3 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
4462 v3.AuxInt = int64ToAuxInt(15)
4463 v2.AddArg2(n, v3)
4464 v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
4465 v4.AuxInt = int64ToAuxInt(int64(16 - log16(c)))
4466 v1.AddArg2(v2, v4)
4467 v0.AddArg2(n, v1)
4468 v5 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
4469 v5.AuxInt = int64ToAuxInt(int64(log16(c)))
4470 v.AddArg2(v0, v5)
4471 return true
4472 }
4473
4474
4475
4476 for {
4477 t := v.Type
4478 x := v_0
4479 if v_1.Op != OpConst16 {
4480 break
4481 }
4482 c := auxIntToInt16(v_1.AuxInt)
4483 if !(smagicOK16(c)) {
4484 break
4485 }
4486 v.reset(OpSub16)
4487 v.Type = t
4488 v0 := b.NewValue0(v.Pos, OpRsh32x64, t)
4489 v1 := b.NewValue0(v.Pos, OpMul32, typ.UInt32)
4490 v2 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
4491 v2.AuxInt = int32ToAuxInt(int32(smagic16(c).m))
4492 v3 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
4493 v3.AddArg(x)
4494 v1.AddArg2(v2, v3)
4495 v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
4496 v4.AuxInt = int64ToAuxInt(16 + smagic16(c).s)
4497 v0.AddArg2(v1, v4)
4498 v5 := b.NewValue0(v.Pos, OpRsh32x64, t)
4499 v6 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
4500 v6.AuxInt = int64ToAuxInt(31)
4501 v5.AddArg2(v3, v6)
4502 v.AddArg2(v0, v5)
4503 return true
4504 }
4505 return false
4506 }
4507 func rewriteValuegeneric_OpDiv16u(v *Value) bool {
4508 v_1 := v.Args[1]
4509 v_0 := v.Args[0]
4510 b := v.Block
4511 config := b.Func.Config
4512 typ := &b.Func.Config.Types
4513
4514
4515
4516 for {
4517 if v_0.Op != OpConst16 {
4518 break
4519 }
4520 c := auxIntToInt16(v_0.AuxInt)
4521 if v_1.Op != OpConst16 {
4522 break
4523 }
4524 d := auxIntToInt16(v_1.AuxInt)
4525 if !(d != 0) {
4526 break
4527 }
4528 v.reset(OpConst16)
4529 v.AuxInt = int16ToAuxInt(int16(uint16(c) / uint16(d)))
4530 return true
4531 }
4532
4533
4534
4535 for {
4536 n := v_0
4537 if v_1.Op != OpConst16 {
4538 break
4539 }
4540 c := auxIntToInt16(v_1.AuxInt)
4541 if !(isPowerOfTwo16(c)) {
4542 break
4543 }
4544 v.reset(OpRsh16Ux64)
4545 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
4546 v0.AuxInt = int64ToAuxInt(log16(c))
4547 v.AddArg2(n, v0)
4548 return true
4549 }
4550
4551
4552
4553 for {
4554 x := v_0
4555 if v_1.Op != OpConst16 {
4556 break
4557 }
4558 c := auxIntToInt16(v_1.AuxInt)
4559 if !(umagicOK16(c) && config.RegSize == 8) {
4560 break
4561 }
4562 v.reset(OpTrunc64to16)
4563 v0 := b.NewValue0(v.Pos, OpRsh64Ux64, typ.UInt64)
4564 v1 := b.NewValue0(v.Pos, OpMul64, typ.UInt64)
4565 v2 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
4566 v2.AuxInt = int64ToAuxInt(int64(1<<16 + umagic16(c).m))
4567 v3 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
4568 v3.AddArg(x)
4569 v1.AddArg2(v2, v3)
4570 v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
4571 v4.AuxInt = int64ToAuxInt(16 + umagic16(c).s)
4572 v0.AddArg2(v1, v4)
4573 v.AddArg(v0)
4574 return true
4575 }
4576
4577
4578
4579 for {
4580 x := v_0
4581 if v_1.Op != OpConst16 {
4582 break
4583 }
4584 c := auxIntToInt16(v_1.AuxInt)
4585 if !(umagicOK16(c) && config.RegSize == 4 && umagic16(c).m&1 == 0) {
4586 break
4587 }
4588 v.reset(OpTrunc32to16)
4589 v0 := b.NewValue0(v.Pos, OpRsh32Ux64, typ.UInt32)
4590 v1 := b.NewValue0(v.Pos, OpMul32, typ.UInt32)
4591 v2 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
4592 v2.AuxInt = int32ToAuxInt(int32(1<<15 + umagic16(c).m/2))
4593 v3 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
4594 v3.AddArg(x)
4595 v1.AddArg2(v2, v3)
4596 v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
4597 v4.AuxInt = int64ToAuxInt(16 + umagic16(c).s - 1)
4598 v0.AddArg2(v1, v4)
4599 v.AddArg(v0)
4600 return true
4601 }
4602
4603
4604
4605 for {
4606 x := v_0
4607 if v_1.Op != OpConst16 {
4608 break
4609 }
4610 c := auxIntToInt16(v_1.AuxInt)
4611 if !(umagicOK16(c) && config.RegSize == 4 && c&1 == 0) {
4612 break
4613 }
4614 v.reset(OpTrunc32to16)
4615 v0 := b.NewValue0(v.Pos, OpRsh32Ux64, typ.UInt32)
4616 v1 := b.NewValue0(v.Pos, OpMul32, typ.UInt32)
4617 v2 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
4618 v2.AuxInt = int32ToAuxInt(int32(1<<15 + (umagic16(c).m+1)/2))
4619 v3 := b.NewValue0(v.Pos, OpRsh32Ux64, typ.UInt32)
4620 v4 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
4621 v4.AddArg(x)
4622 v5 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
4623 v5.AuxInt = int64ToAuxInt(1)
4624 v3.AddArg2(v4, v5)
4625 v1.AddArg2(v2, v3)
4626 v6 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
4627 v6.AuxInt = int64ToAuxInt(16 + umagic16(c).s - 2)
4628 v0.AddArg2(v1, v6)
4629 v.AddArg(v0)
4630 return true
4631 }
4632
4633
4634
4635 for {
4636 x := v_0
4637 if v_1.Op != OpConst16 {
4638 break
4639 }
4640 c := auxIntToInt16(v_1.AuxInt)
4641 if !(umagicOK16(c) && config.RegSize == 4 && config.useAvg) {
4642 break
4643 }
4644 v.reset(OpTrunc32to16)
4645 v0 := b.NewValue0(v.Pos, OpRsh32Ux64, typ.UInt32)
4646 v1 := b.NewValue0(v.Pos, OpAvg32u, typ.UInt32)
4647 v2 := b.NewValue0(v.Pos, OpLsh32x64, typ.UInt32)
4648 v3 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
4649 v3.AddArg(x)
4650 v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
4651 v4.AuxInt = int64ToAuxInt(16)
4652 v2.AddArg2(v3, v4)
4653 v5 := b.NewValue0(v.Pos, OpMul32, typ.UInt32)
4654 v6 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
4655 v6.AuxInt = int32ToAuxInt(int32(umagic16(c).m))
4656 v5.AddArg2(v6, v3)
4657 v1.AddArg2(v2, v5)
4658 v7 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
4659 v7.AuxInt = int64ToAuxInt(16 + umagic16(c).s - 1)
4660 v0.AddArg2(v1, v7)
4661 v.AddArg(v0)
4662 return true
4663 }
4664 return false
4665 }
4666 func rewriteValuegeneric_OpDiv32(v *Value) bool {
4667 v_1 := v.Args[1]
4668 v_0 := v.Args[0]
4669 b := v.Block
4670 config := b.Func.Config
4671 typ := &b.Func.Config.Types
4672
4673
4674
4675 for {
4676 if v_0.Op != OpConst32 {
4677 break
4678 }
4679 c := auxIntToInt32(v_0.AuxInt)
4680 if v_1.Op != OpConst32 {
4681 break
4682 }
4683 d := auxIntToInt32(v_1.AuxInt)
4684 if !(d != 0) {
4685 break
4686 }
4687 v.reset(OpConst32)
4688 v.AuxInt = int32ToAuxInt(c / d)
4689 return true
4690 }
4691
4692
4693
4694 for {
4695 n := v_0
4696 if v_1.Op != OpConst32 {
4697 break
4698 }
4699 c := auxIntToInt32(v_1.AuxInt)
4700 if !(isNonNegative(n) && isPowerOfTwo32(c)) {
4701 break
4702 }
4703 v.reset(OpRsh32Ux64)
4704 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
4705 v0.AuxInt = int64ToAuxInt(log32(c))
4706 v.AddArg2(n, v0)
4707 return true
4708 }
4709
4710
4711
4712 for {
4713 t := v.Type
4714 n := v_0
4715 if v_1.Op != OpConst32 {
4716 break
4717 }
4718 c := auxIntToInt32(v_1.AuxInt)
4719 if !(c < 0 && c != -1<<31) {
4720 break
4721 }
4722 v.reset(OpNeg32)
4723 v0 := b.NewValue0(v.Pos, OpDiv32, t)
4724 v1 := b.NewValue0(v.Pos, OpConst32, t)
4725 v1.AuxInt = int32ToAuxInt(-c)
4726 v0.AddArg2(n, v1)
4727 v.AddArg(v0)
4728 return true
4729 }
4730
4731
4732 for {
4733 t := v.Type
4734 x := v_0
4735 if v_1.Op != OpConst32 || auxIntToInt32(v_1.AuxInt) != -1<<31 {
4736 break
4737 }
4738 v.reset(OpRsh32Ux64)
4739 v0 := b.NewValue0(v.Pos, OpAnd32, t)
4740 v1 := b.NewValue0(v.Pos, OpNeg32, t)
4741 v1.AddArg(x)
4742 v0.AddArg2(x, v1)
4743 v2 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
4744 v2.AuxInt = int64ToAuxInt(31)
4745 v.AddArg2(v0, v2)
4746 return true
4747 }
4748
4749
4750
4751 for {
4752 t := v.Type
4753 n := v_0
4754 if v_1.Op != OpConst32 {
4755 break
4756 }
4757 c := auxIntToInt32(v_1.AuxInt)
4758 if !(isPowerOfTwo32(c)) {
4759 break
4760 }
4761 v.reset(OpRsh32x64)
4762 v0 := b.NewValue0(v.Pos, OpAdd32, t)
4763 v1 := b.NewValue0(v.Pos, OpRsh32Ux64, t)
4764 v2 := b.NewValue0(v.Pos, OpRsh32x64, t)
4765 v3 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
4766 v3.AuxInt = int64ToAuxInt(31)
4767 v2.AddArg2(n, v3)
4768 v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
4769 v4.AuxInt = int64ToAuxInt(int64(32 - log32(c)))
4770 v1.AddArg2(v2, v4)
4771 v0.AddArg2(n, v1)
4772 v5 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
4773 v5.AuxInt = int64ToAuxInt(int64(log32(c)))
4774 v.AddArg2(v0, v5)
4775 return true
4776 }
4777
4778
4779
4780 for {
4781 t := v.Type
4782 x := v_0
4783 if v_1.Op != OpConst32 {
4784 break
4785 }
4786 c := auxIntToInt32(v_1.AuxInt)
4787 if !(smagicOK32(c) && config.RegSize == 8) {
4788 break
4789 }
4790 v.reset(OpSub32)
4791 v.Type = t
4792 v0 := b.NewValue0(v.Pos, OpRsh64x64, t)
4793 v1 := b.NewValue0(v.Pos, OpMul64, typ.UInt64)
4794 v2 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
4795 v2.AuxInt = int64ToAuxInt(int64(smagic32(c).m))
4796 v3 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
4797 v3.AddArg(x)
4798 v1.AddArg2(v2, v3)
4799 v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
4800 v4.AuxInt = int64ToAuxInt(32 + smagic32(c).s)
4801 v0.AddArg2(v1, v4)
4802 v5 := b.NewValue0(v.Pos, OpRsh64x64, t)
4803 v6 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
4804 v6.AuxInt = int64ToAuxInt(63)
4805 v5.AddArg2(v3, v6)
4806 v.AddArg2(v0, v5)
4807 return true
4808 }
4809
4810
4811
4812 for {
4813 t := v.Type
4814 x := v_0
4815 if v_1.Op != OpConst32 {
4816 break
4817 }
4818 c := auxIntToInt32(v_1.AuxInt)
4819 if !(smagicOK32(c) && config.RegSize == 4 && smagic32(c).m&1 == 0 && config.useHmul) {
4820 break
4821 }
4822 v.reset(OpSub32)
4823 v.Type = t
4824 v0 := b.NewValue0(v.Pos, OpRsh32x64, t)
4825 v1 := b.NewValue0(v.Pos, OpHmul32, t)
4826 v2 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
4827 v2.AuxInt = int32ToAuxInt(int32(smagic32(c).m / 2))
4828 v1.AddArg2(v2, x)
4829 v3 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
4830 v3.AuxInt = int64ToAuxInt(smagic32(c).s - 1)
4831 v0.AddArg2(v1, v3)
4832 v4 := b.NewValue0(v.Pos, OpRsh32x64, t)
4833 v5 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
4834 v5.AuxInt = int64ToAuxInt(31)
4835 v4.AddArg2(x, v5)
4836 v.AddArg2(v0, v4)
4837 return true
4838 }
4839
4840
4841
4842 for {
4843 t := v.Type
4844 x := v_0
4845 if v_1.Op != OpConst32 {
4846 break
4847 }
4848 c := auxIntToInt32(v_1.AuxInt)
4849 if !(smagicOK32(c) && config.RegSize == 4 && smagic32(c).m&1 != 0 && config.useHmul) {
4850 break
4851 }
4852 v.reset(OpSub32)
4853 v.Type = t
4854 v0 := b.NewValue0(v.Pos, OpRsh32x64, t)
4855 v1 := b.NewValue0(v.Pos, OpAdd32, t)
4856 v2 := b.NewValue0(v.Pos, OpHmul32, t)
4857 v3 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
4858 v3.AuxInt = int32ToAuxInt(int32(smagic32(c).m))
4859 v2.AddArg2(v3, x)
4860 v1.AddArg2(v2, x)
4861 v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
4862 v4.AuxInt = int64ToAuxInt(smagic32(c).s)
4863 v0.AddArg2(v1, v4)
4864 v5 := b.NewValue0(v.Pos, OpRsh32x64, t)
4865 v6 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
4866 v6.AuxInt = int64ToAuxInt(31)
4867 v5.AddArg2(x, v6)
4868 v.AddArg2(v0, v5)
4869 return true
4870 }
4871 return false
4872 }
4873 func rewriteValuegeneric_OpDiv32F(v *Value) bool {
4874 v_1 := v.Args[1]
4875 v_0 := v.Args[0]
4876 b := v.Block
4877
4878
4879
4880 for {
4881 if v_0.Op != OpConst32F {
4882 break
4883 }
4884 c := auxIntToFloat32(v_0.AuxInt)
4885 if v_1.Op != OpConst32F {
4886 break
4887 }
4888 d := auxIntToFloat32(v_1.AuxInt)
4889 if !(c/d == c/d) {
4890 break
4891 }
4892 v.reset(OpConst32F)
4893 v.AuxInt = float32ToAuxInt(c / d)
4894 return true
4895 }
4896
4897
4898
4899 for {
4900 x := v_0
4901 if v_1.Op != OpConst32F {
4902 break
4903 }
4904 t := v_1.Type
4905 c := auxIntToFloat32(v_1.AuxInt)
4906 if !(reciprocalExact32(c)) {
4907 break
4908 }
4909 v.reset(OpMul32F)
4910 v0 := b.NewValue0(v.Pos, OpConst32F, t)
4911 v0.AuxInt = float32ToAuxInt(1 / c)
4912 v.AddArg2(x, v0)
4913 return true
4914 }
4915 return false
4916 }
4917 func rewriteValuegeneric_OpDiv32u(v *Value) bool {
4918 v_1 := v.Args[1]
4919 v_0 := v.Args[0]
4920 b := v.Block
4921 config := b.Func.Config
4922 typ := &b.Func.Config.Types
4923
4924
4925
4926 for {
4927 if v_0.Op != OpConst32 {
4928 break
4929 }
4930 c := auxIntToInt32(v_0.AuxInt)
4931 if v_1.Op != OpConst32 {
4932 break
4933 }
4934 d := auxIntToInt32(v_1.AuxInt)
4935 if !(d != 0) {
4936 break
4937 }
4938 v.reset(OpConst32)
4939 v.AuxInt = int32ToAuxInt(int32(uint32(c) / uint32(d)))
4940 return true
4941 }
4942
4943
4944
4945 for {
4946 n := v_0
4947 if v_1.Op != OpConst32 {
4948 break
4949 }
4950 c := auxIntToInt32(v_1.AuxInt)
4951 if !(isPowerOfTwo32(c)) {
4952 break
4953 }
4954 v.reset(OpRsh32Ux64)
4955 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
4956 v0.AuxInt = int64ToAuxInt(log32(c))
4957 v.AddArg2(n, v0)
4958 return true
4959 }
4960
4961
4962
4963 for {
4964 x := v_0
4965 if v_1.Op != OpConst32 {
4966 break
4967 }
4968 c := auxIntToInt32(v_1.AuxInt)
4969 if !(umagicOK32(c) && config.RegSize == 4 && umagic32(c).m&1 == 0 && config.useHmul) {
4970 break
4971 }
4972 v.reset(OpRsh32Ux64)
4973 v.Type = typ.UInt32
4974 v0 := b.NewValue0(v.Pos, OpHmul32u, typ.UInt32)
4975 v1 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
4976 v1.AuxInt = int32ToAuxInt(int32(1<<31 + umagic32(c).m/2))
4977 v0.AddArg2(v1, x)
4978 v2 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
4979 v2.AuxInt = int64ToAuxInt(umagic32(c).s - 1)
4980 v.AddArg2(v0, v2)
4981 return true
4982 }
4983
4984
4985
4986 for {
4987 x := v_0
4988 if v_1.Op != OpConst32 {
4989 break
4990 }
4991 c := auxIntToInt32(v_1.AuxInt)
4992 if !(umagicOK32(c) && config.RegSize == 4 && c&1 == 0 && config.useHmul) {
4993 break
4994 }
4995 v.reset(OpRsh32Ux64)
4996 v.Type = typ.UInt32
4997 v0 := b.NewValue0(v.Pos, OpHmul32u, typ.UInt32)
4998 v1 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
4999 v1.AuxInt = int32ToAuxInt(int32(1<<31 + (umagic32(c).m+1)/2))
5000 v2 := b.NewValue0(v.Pos, OpRsh32Ux64, typ.UInt32)
5001 v3 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
5002 v3.AuxInt = int64ToAuxInt(1)
5003 v2.AddArg2(x, v3)
5004 v0.AddArg2(v1, v2)
5005 v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
5006 v4.AuxInt = int64ToAuxInt(umagic32(c).s - 2)
5007 v.AddArg2(v0, v4)
5008 return true
5009 }
5010
5011
5012
5013 for {
5014 x := v_0
5015 if v_1.Op != OpConst32 {
5016 break
5017 }
5018 c := auxIntToInt32(v_1.AuxInt)
5019 if !(umagicOK32(c) && config.RegSize == 4 && config.useAvg && config.useHmul) {
5020 break
5021 }
5022 v.reset(OpRsh32Ux64)
5023 v.Type = typ.UInt32
5024 v0 := b.NewValue0(v.Pos, OpAvg32u, typ.UInt32)
5025 v1 := b.NewValue0(v.Pos, OpHmul32u, typ.UInt32)
5026 v2 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
5027 v2.AuxInt = int32ToAuxInt(int32(umagic32(c).m))
5028 v1.AddArg2(v2, x)
5029 v0.AddArg2(x, v1)
5030 v3 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
5031 v3.AuxInt = int64ToAuxInt(umagic32(c).s - 1)
5032 v.AddArg2(v0, v3)
5033 return true
5034 }
5035
5036
5037
5038 for {
5039 x := v_0
5040 if v_1.Op != OpConst32 {
5041 break
5042 }
5043 c := auxIntToInt32(v_1.AuxInt)
5044 if !(umagicOK32(c) && config.RegSize == 8 && umagic32(c).m&1 == 0) {
5045 break
5046 }
5047 v.reset(OpTrunc64to32)
5048 v0 := b.NewValue0(v.Pos, OpRsh64Ux64, typ.UInt64)
5049 v1 := b.NewValue0(v.Pos, OpMul64, typ.UInt64)
5050 v2 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
5051 v2.AuxInt = int64ToAuxInt(int64(1<<31 + umagic32(c).m/2))
5052 v3 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
5053 v3.AddArg(x)
5054 v1.AddArg2(v2, v3)
5055 v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
5056 v4.AuxInt = int64ToAuxInt(32 + umagic32(c).s - 1)
5057 v0.AddArg2(v1, v4)
5058 v.AddArg(v0)
5059 return true
5060 }
5061
5062
5063
5064 for {
5065 x := v_0
5066 if v_1.Op != OpConst32 {
5067 break
5068 }
5069 c := auxIntToInt32(v_1.AuxInt)
5070 if !(umagicOK32(c) && config.RegSize == 8 && c&1 == 0) {
5071 break
5072 }
5073 v.reset(OpTrunc64to32)
5074 v0 := b.NewValue0(v.Pos, OpRsh64Ux64, typ.UInt64)
5075 v1 := b.NewValue0(v.Pos, OpMul64, typ.UInt64)
5076 v2 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
5077 v2.AuxInt = int64ToAuxInt(int64(1<<31 + (umagic32(c).m+1)/2))
5078 v3 := b.NewValue0(v.Pos, OpRsh64Ux64, typ.UInt64)
5079 v4 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
5080 v4.AddArg(x)
5081 v5 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
5082 v5.AuxInt = int64ToAuxInt(1)
5083 v3.AddArg2(v4, v5)
5084 v1.AddArg2(v2, v3)
5085 v6 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
5086 v6.AuxInt = int64ToAuxInt(32 + umagic32(c).s - 2)
5087 v0.AddArg2(v1, v6)
5088 v.AddArg(v0)
5089 return true
5090 }
5091
5092
5093
5094 for {
5095 x := v_0
5096 if v_1.Op != OpConst32 {
5097 break
5098 }
5099 c := auxIntToInt32(v_1.AuxInt)
5100 if !(umagicOK32(c) && config.RegSize == 8 && config.useAvg) {
5101 break
5102 }
5103 v.reset(OpTrunc64to32)
5104 v0 := b.NewValue0(v.Pos, OpRsh64Ux64, typ.UInt64)
5105 v1 := b.NewValue0(v.Pos, OpAvg64u, typ.UInt64)
5106 v2 := b.NewValue0(v.Pos, OpLsh64x64, typ.UInt64)
5107 v3 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
5108 v3.AddArg(x)
5109 v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
5110 v4.AuxInt = int64ToAuxInt(32)
5111 v2.AddArg2(v3, v4)
5112 v5 := b.NewValue0(v.Pos, OpMul64, typ.UInt64)
5113 v6 := b.NewValue0(v.Pos, OpConst64, typ.UInt32)
5114 v6.AuxInt = int64ToAuxInt(int64(umagic32(c).m))
5115 v5.AddArg2(v6, v3)
5116 v1.AddArg2(v2, v5)
5117 v7 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
5118 v7.AuxInt = int64ToAuxInt(32 + umagic32(c).s - 1)
5119 v0.AddArg2(v1, v7)
5120 v.AddArg(v0)
5121 return true
5122 }
5123 return false
5124 }
5125 func rewriteValuegeneric_OpDiv64(v *Value) bool {
5126 v_1 := v.Args[1]
5127 v_0 := v.Args[0]
5128 b := v.Block
5129 config := b.Func.Config
5130 typ := &b.Func.Config.Types
5131
5132
5133
5134 for {
5135 if v_0.Op != OpConst64 {
5136 break
5137 }
5138 c := auxIntToInt64(v_0.AuxInt)
5139 if v_1.Op != OpConst64 {
5140 break
5141 }
5142 d := auxIntToInt64(v_1.AuxInt)
5143 if !(d != 0) {
5144 break
5145 }
5146 v.reset(OpConst64)
5147 v.AuxInt = int64ToAuxInt(c / d)
5148 return true
5149 }
5150
5151
5152
5153 for {
5154 n := v_0
5155 if v_1.Op != OpConst64 {
5156 break
5157 }
5158 c := auxIntToInt64(v_1.AuxInt)
5159 if !(isNonNegative(n) && isPowerOfTwo64(c)) {
5160 break
5161 }
5162 v.reset(OpRsh64Ux64)
5163 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
5164 v0.AuxInt = int64ToAuxInt(log64(c))
5165 v.AddArg2(n, v0)
5166 return true
5167 }
5168
5169
5170
5171 for {
5172 n := v_0
5173 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != -1<<63 || !(isNonNegative(n)) {
5174 break
5175 }
5176 v.reset(OpConst64)
5177 v.AuxInt = int64ToAuxInt(0)
5178 return true
5179 }
5180
5181
5182
5183 for {
5184 t := v.Type
5185 n := v_0
5186 if v_1.Op != OpConst64 {
5187 break
5188 }
5189 c := auxIntToInt64(v_1.AuxInt)
5190 if !(c < 0 && c != -1<<63) {
5191 break
5192 }
5193 v.reset(OpNeg64)
5194 v0 := b.NewValue0(v.Pos, OpDiv64, t)
5195 v1 := b.NewValue0(v.Pos, OpConst64, t)
5196 v1.AuxInt = int64ToAuxInt(-c)
5197 v0.AddArg2(n, v1)
5198 v.AddArg(v0)
5199 return true
5200 }
5201
5202
5203 for {
5204 t := v.Type
5205 x := v_0
5206 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != -1<<63 {
5207 break
5208 }
5209 v.reset(OpRsh64Ux64)
5210 v0 := b.NewValue0(v.Pos, OpAnd64, t)
5211 v1 := b.NewValue0(v.Pos, OpNeg64, t)
5212 v1.AddArg(x)
5213 v0.AddArg2(x, v1)
5214 v2 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
5215 v2.AuxInt = int64ToAuxInt(63)
5216 v.AddArg2(v0, v2)
5217 return true
5218 }
5219
5220
5221
5222 for {
5223 t := v.Type
5224 n := v_0
5225 if v_1.Op != OpConst64 {
5226 break
5227 }
5228 c := auxIntToInt64(v_1.AuxInt)
5229 if !(isPowerOfTwo64(c)) {
5230 break
5231 }
5232 v.reset(OpRsh64x64)
5233 v0 := b.NewValue0(v.Pos, OpAdd64, t)
5234 v1 := b.NewValue0(v.Pos, OpRsh64Ux64, t)
5235 v2 := b.NewValue0(v.Pos, OpRsh64x64, t)
5236 v3 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
5237 v3.AuxInt = int64ToAuxInt(63)
5238 v2.AddArg2(n, v3)
5239 v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
5240 v4.AuxInt = int64ToAuxInt(int64(64 - log64(c)))
5241 v1.AddArg2(v2, v4)
5242 v0.AddArg2(n, v1)
5243 v5 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
5244 v5.AuxInt = int64ToAuxInt(int64(log64(c)))
5245 v.AddArg2(v0, v5)
5246 return true
5247 }
5248
5249
5250
5251 for {
5252 t := v.Type
5253 x := v_0
5254 if v_1.Op != OpConst64 {
5255 break
5256 }
5257 c := auxIntToInt64(v_1.AuxInt)
5258 if !(smagicOK64(c) && smagic64(c).m&1 == 0 && config.useHmul) {
5259 break
5260 }
5261 v.reset(OpSub64)
5262 v.Type = t
5263 v0 := b.NewValue0(v.Pos, OpRsh64x64, t)
5264 v1 := b.NewValue0(v.Pos, OpHmul64, t)
5265 v2 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
5266 v2.AuxInt = int64ToAuxInt(int64(smagic64(c).m / 2))
5267 v1.AddArg2(v2, x)
5268 v3 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
5269 v3.AuxInt = int64ToAuxInt(smagic64(c).s - 1)
5270 v0.AddArg2(v1, v3)
5271 v4 := b.NewValue0(v.Pos, OpRsh64x64, t)
5272 v5 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
5273 v5.AuxInt = int64ToAuxInt(63)
5274 v4.AddArg2(x, v5)
5275 v.AddArg2(v0, v4)
5276 return true
5277 }
5278
5279
5280
5281 for {
5282 t := v.Type
5283 x := v_0
5284 if v_1.Op != OpConst64 {
5285 break
5286 }
5287 c := auxIntToInt64(v_1.AuxInt)
5288 if !(smagicOK64(c) && smagic64(c).m&1 != 0 && config.useHmul) {
5289 break
5290 }
5291 v.reset(OpSub64)
5292 v.Type = t
5293 v0 := b.NewValue0(v.Pos, OpRsh64x64, t)
5294 v1 := b.NewValue0(v.Pos, OpAdd64, t)
5295 v2 := b.NewValue0(v.Pos, OpHmul64, t)
5296 v3 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
5297 v3.AuxInt = int64ToAuxInt(int64(smagic64(c).m))
5298 v2.AddArg2(v3, x)
5299 v1.AddArg2(v2, x)
5300 v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
5301 v4.AuxInt = int64ToAuxInt(smagic64(c).s)
5302 v0.AddArg2(v1, v4)
5303 v5 := b.NewValue0(v.Pos, OpRsh64x64, t)
5304 v6 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
5305 v6.AuxInt = int64ToAuxInt(63)
5306 v5.AddArg2(x, v6)
5307 v.AddArg2(v0, v5)
5308 return true
5309 }
5310 return false
5311 }
5312 func rewriteValuegeneric_OpDiv64F(v *Value) bool {
5313 v_1 := v.Args[1]
5314 v_0 := v.Args[0]
5315 b := v.Block
5316
5317
5318
5319 for {
5320 if v_0.Op != OpConst64F {
5321 break
5322 }
5323 c := auxIntToFloat64(v_0.AuxInt)
5324 if v_1.Op != OpConst64F {
5325 break
5326 }
5327 d := auxIntToFloat64(v_1.AuxInt)
5328 if !(c/d == c/d) {
5329 break
5330 }
5331 v.reset(OpConst64F)
5332 v.AuxInt = float64ToAuxInt(c / d)
5333 return true
5334 }
5335
5336
5337
5338 for {
5339 x := v_0
5340 if v_1.Op != OpConst64F {
5341 break
5342 }
5343 t := v_1.Type
5344 c := auxIntToFloat64(v_1.AuxInt)
5345 if !(reciprocalExact64(c)) {
5346 break
5347 }
5348 v.reset(OpMul64F)
5349 v0 := b.NewValue0(v.Pos, OpConst64F, t)
5350 v0.AuxInt = float64ToAuxInt(1 / c)
5351 v.AddArg2(x, v0)
5352 return true
5353 }
5354 return false
5355 }
5356 func rewriteValuegeneric_OpDiv64u(v *Value) bool {
5357 v_1 := v.Args[1]
5358 v_0 := v.Args[0]
5359 b := v.Block
5360 config := b.Func.Config
5361 typ := &b.Func.Config.Types
5362
5363
5364
5365 for {
5366 if v_0.Op != OpConst64 {
5367 break
5368 }
5369 c := auxIntToInt64(v_0.AuxInt)
5370 if v_1.Op != OpConst64 {
5371 break
5372 }
5373 d := auxIntToInt64(v_1.AuxInt)
5374 if !(d != 0) {
5375 break
5376 }
5377 v.reset(OpConst64)
5378 v.AuxInt = int64ToAuxInt(int64(uint64(c) / uint64(d)))
5379 return true
5380 }
5381
5382
5383
5384 for {
5385 n := v_0
5386 if v_1.Op != OpConst64 {
5387 break
5388 }
5389 c := auxIntToInt64(v_1.AuxInt)
5390 if !(isPowerOfTwo64(c)) {
5391 break
5392 }
5393 v.reset(OpRsh64Ux64)
5394 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
5395 v0.AuxInt = int64ToAuxInt(log64(c))
5396 v.AddArg2(n, v0)
5397 return true
5398 }
5399
5400
5401 for {
5402 n := v_0
5403 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != -1<<63 {
5404 break
5405 }
5406 v.reset(OpRsh64Ux64)
5407 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
5408 v0.AuxInt = int64ToAuxInt(63)
5409 v.AddArg2(n, v0)
5410 return true
5411 }
5412
5413
5414
5415 for {
5416 x := v_0
5417 if v_1.Op != OpConst64 {
5418 break
5419 }
5420 c := auxIntToInt64(v_1.AuxInt)
5421 if !(c > 0 && c <= 0xFFFF && umagicOK32(int32(c)) && config.RegSize == 4 && config.useHmul) {
5422 break
5423 }
5424 v.reset(OpAdd64)
5425 v0 := b.NewValue0(v.Pos, OpAdd64, typ.UInt64)
5426 v1 := b.NewValue0(v.Pos, OpAdd64, typ.UInt64)
5427 v2 := b.NewValue0(v.Pos, OpLsh64x64, typ.UInt64)
5428 v3 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
5429 v4 := b.NewValue0(v.Pos, OpDiv32u, typ.UInt32)
5430 v5 := b.NewValue0(v.Pos, OpTrunc64to32, typ.UInt32)
5431 v6 := b.NewValue0(v.Pos, OpRsh64Ux64, typ.UInt64)
5432 v7 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
5433 v7.AuxInt = int64ToAuxInt(32)
5434 v6.AddArg2(x, v7)
5435 v5.AddArg(v6)
5436 v8 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
5437 v8.AuxInt = int32ToAuxInt(int32(c))
5438 v4.AddArg2(v5, v8)
5439 v3.AddArg(v4)
5440 v2.AddArg2(v3, v7)
5441 v9 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
5442 v10 := b.NewValue0(v.Pos, OpDiv32u, typ.UInt32)
5443 v11 := b.NewValue0(v.Pos, OpTrunc64to32, typ.UInt32)
5444 v11.AddArg(x)
5445 v10.AddArg2(v11, v8)
5446 v9.AddArg(v10)
5447 v1.AddArg2(v2, v9)
5448 v12 := b.NewValue0(v.Pos, OpMul64, typ.UInt64)
5449 v13 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
5450 v14 := b.NewValue0(v.Pos, OpMod32u, typ.UInt32)
5451 v14.AddArg2(v5, v8)
5452 v13.AddArg(v14)
5453 v15 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
5454 v15.AuxInt = int64ToAuxInt(int64((1 << 32) / c))
5455 v12.AddArg2(v13, v15)
5456 v0.AddArg2(v1, v12)
5457 v16 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
5458 v17 := b.NewValue0(v.Pos, OpDiv32u, typ.UInt32)
5459 v18 := b.NewValue0(v.Pos, OpAdd32, typ.UInt32)
5460 v19 := b.NewValue0(v.Pos, OpMod32u, typ.UInt32)
5461 v19.AddArg2(v11, v8)
5462 v20 := b.NewValue0(v.Pos, OpMul32, typ.UInt32)
5463 v21 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
5464 v21.AuxInt = int32ToAuxInt(int32((1 << 32) % c))
5465 v20.AddArg2(v14, v21)
5466 v18.AddArg2(v19, v20)
5467 v17.AddArg2(v18, v8)
5468 v16.AddArg(v17)
5469 v.AddArg2(v0, v16)
5470 return true
5471 }
5472
5473
5474
5475 for {
5476 x := v_0
5477 if v_1.Op != OpConst64 {
5478 break
5479 }
5480 c := auxIntToInt64(v_1.AuxInt)
5481 if !(umagicOK64(c) && config.RegSize == 8 && umagic64(c).m&1 == 0 && config.useHmul) {
5482 break
5483 }
5484 v.reset(OpRsh64Ux64)
5485 v.Type = typ.UInt64
5486 v0 := b.NewValue0(v.Pos, OpHmul64u, typ.UInt64)
5487 v1 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
5488 v1.AuxInt = int64ToAuxInt(int64(1<<63 + umagic64(c).m/2))
5489 v0.AddArg2(v1, x)
5490 v2 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
5491 v2.AuxInt = int64ToAuxInt(umagic64(c).s - 1)
5492 v.AddArg2(v0, v2)
5493 return true
5494 }
5495
5496
5497
5498 for {
5499 x := v_0
5500 if v_1.Op != OpConst64 {
5501 break
5502 }
5503 c := auxIntToInt64(v_1.AuxInt)
5504 if !(umagicOK64(c) && config.RegSize == 8 && c&1 == 0 && config.useHmul) {
5505 break
5506 }
5507 v.reset(OpRsh64Ux64)
5508 v.Type = typ.UInt64
5509 v0 := b.NewValue0(v.Pos, OpHmul64u, typ.UInt64)
5510 v1 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
5511 v1.AuxInt = int64ToAuxInt(int64(1<<63 + (umagic64(c).m+1)/2))
5512 v2 := b.NewValue0(v.Pos, OpRsh64Ux64, typ.UInt64)
5513 v3 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
5514 v3.AuxInt = int64ToAuxInt(1)
5515 v2.AddArg2(x, v3)
5516 v0.AddArg2(v1, v2)
5517 v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
5518 v4.AuxInt = int64ToAuxInt(umagic64(c).s - 2)
5519 v.AddArg2(v0, v4)
5520 return true
5521 }
5522
5523
5524
5525 for {
5526 x := v_0
5527 if v_1.Op != OpConst64 {
5528 break
5529 }
5530 c := auxIntToInt64(v_1.AuxInt)
5531 if !(umagicOK64(c) && config.RegSize == 8 && config.useAvg && config.useHmul) {
5532 break
5533 }
5534 v.reset(OpRsh64Ux64)
5535 v.Type = typ.UInt64
5536 v0 := b.NewValue0(v.Pos, OpAvg64u, typ.UInt64)
5537 v1 := b.NewValue0(v.Pos, OpHmul64u, typ.UInt64)
5538 v2 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
5539 v2.AuxInt = int64ToAuxInt(int64(umagic64(c).m))
5540 v1.AddArg2(v2, x)
5541 v0.AddArg2(x, v1)
5542 v3 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
5543 v3.AuxInt = int64ToAuxInt(umagic64(c).s - 1)
5544 v.AddArg2(v0, v3)
5545 return true
5546 }
5547 return false
5548 }
5549 func rewriteValuegeneric_OpDiv8(v *Value) bool {
5550 v_1 := v.Args[1]
5551 v_0 := v.Args[0]
5552 b := v.Block
5553 typ := &b.Func.Config.Types
5554
5555
5556
5557 for {
5558 if v_0.Op != OpConst8 {
5559 break
5560 }
5561 c := auxIntToInt8(v_0.AuxInt)
5562 if v_1.Op != OpConst8 {
5563 break
5564 }
5565 d := auxIntToInt8(v_1.AuxInt)
5566 if !(d != 0) {
5567 break
5568 }
5569 v.reset(OpConst8)
5570 v.AuxInt = int8ToAuxInt(c / d)
5571 return true
5572 }
5573
5574
5575
5576 for {
5577 n := v_0
5578 if v_1.Op != OpConst8 {
5579 break
5580 }
5581 c := auxIntToInt8(v_1.AuxInt)
5582 if !(isNonNegative(n) && isPowerOfTwo8(c)) {
5583 break
5584 }
5585 v.reset(OpRsh8Ux64)
5586 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
5587 v0.AuxInt = int64ToAuxInt(log8(c))
5588 v.AddArg2(n, v0)
5589 return true
5590 }
5591
5592
5593
5594 for {
5595 t := v.Type
5596 n := v_0
5597 if v_1.Op != OpConst8 {
5598 break
5599 }
5600 c := auxIntToInt8(v_1.AuxInt)
5601 if !(c < 0 && c != -1<<7) {
5602 break
5603 }
5604 v.reset(OpNeg8)
5605 v0 := b.NewValue0(v.Pos, OpDiv8, t)
5606 v1 := b.NewValue0(v.Pos, OpConst8, t)
5607 v1.AuxInt = int8ToAuxInt(-c)
5608 v0.AddArg2(n, v1)
5609 v.AddArg(v0)
5610 return true
5611 }
5612
5613
5614 for {
5615 t := v.Type
5616 x := v_0
5617 if v_1.Op != OpConst8 || auxIntToInt8(v_1.AuxInt) != -1<<7 {
5618 break
5619 }
5620 v.reset(OpRsh8Ux64)
5621 v0 := b.NewValue0(v.Pos, OpAnd8, t)
5622 v1 := b.NewValue0(v.Pos, OpNeg8, t)
5623 v1.AddArg(x)
5624 v0.AddArg2(x, v1)
5625 v2 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
5626 v2.AuxInt = int64ToAuxInt(7)
5627 v.AddArg2(v0, v2)
5628 return true
5629 }
5630
5631
5632
5633 for {
5634 t := v.Type
5635 n := v_0
5636 if v_1.Op != OpConst8 {
5637 break
5638 }
5639 c := auxIntToInt8(v_1.AuxInt)
5640 if !(isPowerOfTwo8(c)) {
5641 break
5642 }
5643 v.reset(OpRsh8x64)
5644 v0 := b.NewValue0(v.Pos, OpAdd8, t)
5645 v1 := b.NewValue0(v.Pos, OpRsh8Ux64, t)
5646 v2 := b.NewValue0(v.Pos, OpRsh8x64, t)
5647 v3 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
5648 v3.AuxInt = int64ToAuxInt(7)
5649 v2.AddArg2(n, v3)
5650 v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
5651 v4.AuxInt = int64ToAuxInt(int64(8 - log8(c)))
5652 v1.AddArg2(v2, v4)
5653 v0.AddArg2(n, v1)
5654 v5 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
5655 v5.AuxInt = int64ToAuxInt(int64(log8(c)))
5656 v.AddArg2(v0, v5)
5657 return true
5658 }
5659
5660
5661
5662 for {
5663 t := v.Type
5664 x := v_0
5665 if v_1.Op != OpConst8 {
5666 break
5667 }
5668 c := auxIntToInt8(v_1.AuxInt)
5669 if !(smagicOK8(c)) {
5670 break
5671 }
5672 v.reset(OpSub8)
5673 v.Type = t
5674 v0 := b.NewValue0(v.Pos, OpRsh32x64, t)
5675 v1 := b.NewValue0(v.Pos, OpMul32, typ.UInt32)
5676 v2 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
5677 v2.AuxInt = int32ToAuxInt(int32(smagic8(c).m))
5678 v3 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
5679 v3.AddArg(x)
5680 v1.AddArg2(v2, v3)
5681 v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
5682 v4.AuxInt = int64ToAuxInt(8 + smagic8(c).s)
5683 v0.AddArg2(v1, v4)
5684 v5 := b.NewValue0(v.Pos, OpRsh32x64, t)
5685 v6 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
5686 v6.AuxInt = int64ToAuxInt(31)
5687 v5.AddArg2(v3, v6)
5688 v.AddArg2(v0, v5)
5689 return true
5690 }
5691 return false
5692 }
5693 func rewriteValuegeneric_OpDiv8u(v *Value) bool {
5694 v_1 := v.Args[1]
5695 v_0 := v.Args[0]
5696 b := v.Block
5697 typ := &b.Func.Config.Types
5698
5699
5700
5701 for {
5702 if v_0.Op != OpConst8 {
5703 break
5704 }
5705 c := auxIntToInt8(v_0.AuxInt)
5706 if v_1.Op != OpConst8 {
5707 break
5708 }
5709 d := auxIntToInt8(v_1.AuxInt)
5710 if !(d != 0) {
5711 break
5712 }
5713 v.reset(OpConst8)
5714 v.AuxInt = int8ToAuxInt(int8(uint8(c) / uint8(d)))
5715 return true
5716 }
5717
5718
5719
5720 for {
5721 n := v_0
5722 if v_1.Op != OpConst8 {
5723 break
5724 }
5725 c := auxIntToInt8(v_1.AuxInt)
5726 if !(isPowerOfTwo8(c)) {
5727 break
5728 }
5729 v.reset(OpRsh8Ux64)
5730 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
5731 v0.AuxInt = int64ToAuxInt(log8(c))
5732 v.AddArg2(n, v0)
5733 return true
5734 }
5735
5736
5737
5738 for {
5739 x := v_0
5740 if v_1.Op != OpConst8 {
5741 break
5742 }
5743 c := auxIntToInt8(v_1.AuxInt)
5744 if !(umagicOK8(c)) {
5745 break
5746 }
5747 v.reset(OpTrunc32to8)
5748 v0 := b.NewValue0(v.Pos, OpRsh32Ux64, typ.UInt32)
5749 v1 := b.NewValue0(v.Pos, OpMul32, typ.UInt32)
5750 v2 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
5751 v2.AuxInt = int32ToAuxInt(int32(1<<8 + umagic8(c).m))
5752 v3 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
5753 v3.AddArg(x)
5754 v1.AddArg2(v2, v3)
5755 v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
5756 v4.AuxInt = int64ToAuxInt(8 + umagic8(c).s)
5757 v0.AddArg2(v1, v4)
5758 v.AddArg(v0)
5759 return true
5760 }
5761 return false
5762 }
5763 func rewriteValuegeneric_OpEq16(v *Value) bool {
5764 v_1 := v.Args[1]
5765 v_0 := v.Args[0]
5766 b := v.Block
5767 config := b.Func.Config
5768 typ := &b.Func.Config.Types
5769
5770
5771 for {
5772 x := v_0
5773 if x != v_1 {
5774 break
5775 }
5776 v.reset(OpConstBool)
5777 v.AuxInt = boolToAuxInt(true)
5778 return true
5779 }
5780
5781
5782 for {
5783 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
5784 if v_0.Op != OpConst16 {
5785 continue
5786 }
5787 t := v_0.Type
5788 c := auxIntToInt16(v_0.AuxInt)
5789 if v_1.Op != OpAdd16 {
5790 continue
5791 }
5792 _ = v_1.Args[1]
5793 v_1_0 := v_1.Args[0]
5794 v_1_1 := v_1.Args[1]
5795 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
5796 if v_1_0.Op != OpConst16 || v_1_0.Type != t {
5797 continue
5798 }
5799 d := auxIntToInt16(v_1_0.AuxInt)
5800 x := v_1_1
5801 v.reset(OpEq16)
5802 v0 := b.NewValue0(v.Pos, OpConst16, t)
5803 v0.AuxInt = int16ToAuxInt(c - d)
5804 v.AddArg2(v0, x)
5805 return true
5806 }
5807 }
5808 break
5809 }
5810
5811
5812 for {
5813 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
5814 if v_0.Op != OpConst16 {
5815 continue
5816 }
5817 c := auxIntToInt16(v_0.AuxInt)
5818 if v_1.Op != OpConst16 {
5819 continue
5820 }
5821 d := auxIntToInt16(v_1.AuxInt)
5822 v.reset(OpConstBool)
5823 v.AuxInt = boolToAuxInt(c == d)
5824 return true
5825 }
5826 break
5827 }
5828
5829
5830
5831 for {
5832 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
5833 if v_0.Op != OpMod16u {
5834 continue
5835 }
5836 _ = v_0.Args[1]
5837 x := v_0.Args[0]
5838 v_0_1 := v_0.Args[1]
5839 if v_0_1.Op != OpConst16 {
5840 continue
5841 }
5842 c := auxIntToInt16(v_0_1.AuxInt)
5843 if v_1.Op != OpConst16 || auxIntToInt16(v_1.AuxInt) != 0 || !(x.Op != OpConst16 && udivisibleOK16(c) && !hasSmallRotate(config)) {
5844 continue
5845 }
5846 v.reset(OpEq32)
5847 v0 := b.NewValue0(v.Pos, OpMod32u, typ.UInt32)
5848 v1 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
5849 v1.AddArg(x)
5850 v2 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
5851 v2.AuxInt = int32ToAuxInt(int32(uint16(c)))
5852 v0.AddArg2(v1, v2)
5853 v3 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
5854 v3.AuxInt = int32ToAuxInt(0)
5855 v.AddArg2(v0, v3)
5856 return true
5857 }
5858 break
5859 }
5860
5861
5862
5863 for {
5864 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
5865 if v_0.Op != OpMod16 {
5866 continue
5867 }
5868 _ = v_0.Args[1]
5869 x := v_0.Args[0]
5870 v_0_1 := v_0.Args[1]
5871 if v_0_1.Op != OpConst16 {
5872 continue
5873 }
5874 c := auxIntToInt16(v_0_1.AuxInt)
5875 if v_1.Op != OpConst16 || auxIntToInt16(v_1.AuxInt) != 0 || !(x.Op != OpConst16 && sdivisibleOK16(c) && !hasSmallRotate(config)) {
5876 continue
5877 }
5878 v.reset(OpEq32)
5879 v0 := b.NewValue0(v.Pos, OpMod32, typ.Int32)
5880 v1 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
5881 v1.AddArg(x)
5882 v2 := b.NewValue0(v.Pos, OpConst32, typ.Int32)
5883 v2.AuxInt = int32ToAuxInt(int32(c))
5884 v0.AddArg2(v1, v2)
5885 v3 := b.NewValue0(v.Pos, OpConst32, typ.Int32)
5886 v3.AuxInt = int32ToAuxInt(0)
5887 v.AddArg2(v0, v3)
5888 return true
5889 }
5890 break
5891 }
5892
5893
5894
5895 for {
5896 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
5897 x := v_0
5898 if v_1.Op != OpMul16 {
5899 continue
5900 }
5901 _ = v_1.Args[1]
5902 v_1_0 := v_1.Args[0]
5903 v_1_1 := v_1.Args[1]
5904 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
5905 if v_1_0.Op != OpConst16 {
5906 continue
5907 }
5908 c := auxIntToInt16(v_1_0.AuxInt)
5909 if v_1_1.Op != OpTrunc64to16 {
5910 continue
5911 }
5912 v_1_1_0 := v_1_1.Args[0]
5913 if v_1_1_0.Op != OpRsh64Ux64 {
5914 continue
5915 }
5916 _ = v_1_1_0.Args[1]
5917 mul := v_1_1_0.Args[0]
5918 if mul.Op != OpMul64 {
5919 continue
5920 }
5921 _ = mul.Args[1]
5922 mul_0 := mul.Args[0]
5923 mul_1 := mul.Args[1]
5924 for _i2 := 0; _i2 <= 1; _i2, mul_0, mul_1 = _i2+1, mul_1, mul_0 {
5925 if mul_0.Op != OpConst64 {
5926 continue
5927 }
5928 m := auxIntToInt64(mul_0.AuxInt)
5929 if mul_1.Op != OpZeroExt16to64 || x != mul_1.Args[0] {
5930 continue
5931 }
5932 v_1_1_0_1 := v_1_1_0.Args[1]
5933 if v_1_1_0_1.Op != OpConst64 {
5934 continue
5935 }
5936 s := auxIntToInt64(v_1_1_0_1.AuxInt)
5937 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)) {
5938 continue
5939 }
5940 v.reset(OpLeq16U)
5941 v0 := b.NewValue0(v.Pos, OpRotateLeft16, typ.UInt16)
5942 v1 := b.NewValue0(v.Pos, OpMul16, typ.UInt16)
5943 v2 := b.NewValue0(v.Pos, OpConst16, typ.UInt16)
5944 v2.AuxInt = int16ToAuxInt(int16(udivisible16(c).m))
5945 v1.AddArg2(v2, x)
5946 v3 := b.NewValue0(v.Pos, OpConst16, typ.UInt16)
5947 v3.AuxInt = int16ToAuxInt(int16(16 - udivisible16(c).k))
5948 v0.AddArg2(v1, v3)
5949 v4 := b.NewValue0(v.Pos, OpConst16, typ.UInt16)
5950 v4.AuxInt = int16ToAuxInt(int16(udivisible16(c).max))
5951 v.AddArg2(v0, v4)
5952 return true
5953 }
5954 }
5955 }
5956 break
5957 }
5958
5959
5960
5961 for {
5962 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
5963 x := v_0
5964 if v_1.Op != OpMul16 {
5965 continue
5966 }
5967 _ = v_1.Args[1]
5968 v_1_0 := v_1.Args[0]
5969 v_1_1 := v_1.Args[1]
5970 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
5971 if v_1_0.Op != OpConst16 {
5972 continue
5973 }
5974 c := auxIntToInt16(v_1_0.AuxInt)
5975 if v_1_1.Op != OpTrunc32to16 {
5976 continue
5977 }
5978 v_1_1_0 := v_1_1.Args[0]
5979 if v_1_1_0.Op != OpRsh32Ux64 {
5980 continue
5981 }
5982 _ = v_1_1_0.Args[1]
5983 mul := v_1_1_0.Args[0]
5984 if mul.Op != OpMul32 {
5985 continue
5986 }
5987 _ = mul.Args[1]
5988 mul_0 := mul.Args[0]
5989 mul_1 := mul.Args[1]
5990 for _i2 := 0; _i2 <= 1; _i2, mul_0, mul_1 = _i2+1, mul_1, mul_0 {
5991 if mul_0.Op != OpConst32 {
5992 continue
5993 }
5994 m := auxIntToInt32(mul_0.AuxInt)
5995 if mul_1.Op != OpZeroExt16to32 || x != mul_1.Args[0] {
5996 continue
5997 }
5998 v_1_1_0_1 := v_1_1_0.Args[1]
5999 if v_1_1_0_1.Op != OpConst64 {
6000 continue
6001 }
6002 s := auxIntToInt64(v_1_1_0_1.AuxInt)
6003 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)) {
6004 continue
6005 }
6006 v.reset(OpLeq16U)
6007 v0 := b.NewValue0(v.Pos, OpRotateLeft16, typ.UInt16)
6008 v1 := b.NewValue0(v.Pos, OpMul16, typ.UInt16)
6009 v2 := b.NewValue0(v.Pos, OpConst16, typ.UInt16)
6010 v2.AuxInt = int16ToAuxInt(int16(udivisible16(c).m))
6011 v1.AddArg2(v2, x)
6012 v3 := b.NewValue0(v.Pos, OpConst16, typ.UInt16)
6013 v3.AuxInt = int16ToAuxInt(int16(16 - udivisible16(c).k))
6014 v0.AddArg2(v1, v3)
6015 v4 := b.NewValue0(v.Pos, OpConst16, typ.UInt16)
6016 v4.AuxInt = int16ToAuxInt(int16(udivisible16(c).max))
6017 v.AddArg2(v0, v4)
6018 return true
6019 }
6020 }
6021 }
6022 break
6023 }
6024
6025
6026
6027 for {
6028 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
6029 x := v_0
6030 if v_1.Op != OpMul16 {
6031 continue
6032 }
6033 _ = v_1.Args[1]
6034 v_1_0 := v_1.Args[0]
6035 v_1_1 := v_1.Args[1]
6036 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
6037 if v_1_0.Op != OpConst16 {
6038 continue
6039 }
6040 c := auxIntToInt16(v_1_0.AuxInt)
6041 if v_1_1.Op != OpTrunc32to16 {
6042 continue
6043 }
6044 v_1_1_0 := v_1_1.Args[0]
6045 if v_1_1_0.Op != OpRsh32Ux64 {
6046 continue
6047 }
6048 _ = v_1_1_0.Args[1]
6049 mul := v_1_1_0.Args[0]
6050 if mul.Op != OpMul32 {
6051 continue
6052 }
6053 _ = mul.Args[1]
6054 mul_0 := mul.Args[0]
6055 mul_1 := mul.Args[1]
6056 for _i2 := 0; _i2 <= 1; _i2, mul_0, mul_1 = _i2+1, mul_1, mul_0 {
6057 if mul_0.Op != OpConst32 {
6058 continue
6059 }
6060 m := auxIntToInt32(mul_0.AuxInt)
6061 if mul_1.Op != OpRsh32Ux64 {
6062 continue
6063 }
6064 _ = mul_1.Args[1]
6065 mul_1_0 := mul_1.Args[0]
6066 if mul_1_0.Op != OpZeroExt16to32 || x != mul_1_0.Args[0] {
6067 continue
6068 }
6069 mul_1_1 := mul_1.Args[1]
6070 if mul_1_1.Op != OpConst64 || auxIntToInt64(mul_1_1.AuxInt) != 1 {
6071 continue
6072 }
6073 v_1_1_0_1 := v_1_1_0.Args[1]
6074 if v_1_1_0_1.Op != OpConst64 {
6075 continue
6076 }
6077 s := auxIntToInt64(v_1_1_0_1.AuxInt)
6078 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)) {
6079 continue
6080 }
6081 v.reset(OpLeq16U)
6082 v0 := b.NewValue0(v.Pos, OpRotateLeft16, typ.UInt16)
6083 v1 := b.NewValue0(v.Pos, OpMul16, typ.UInt16)
6084 v2 := b.NewValue0(v.Pos, OpConst16, typ.UInt16)
6085 v2.AuxInt = int16ToAuxInt(int16(udivisible16(c).m))
6086 v1.AddArg2(v2, x)
6087 v3 := b.NewValue0(v.Pos, OpConst16, typ.UInt16)
6088 v3.AuxInt = int16ToAuxInt(int16(16 - udivisible16(c).k))
6089 v0.AddArg2(v1, v3)
6090 v4 := b.NewValue0(v.Pos, OpConst16, typ.UInt16)
6091 v4.AuxInt = int16ToAuxInt(int16(udivisible16(c).max))
6092 v.AddArg2(v0, v4)
6093 return true
6094 }
6095 }
6096 }
6097 break
6098 }
6099
6100
6101
6102 for {
6103 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
6104 x := v_0
6105 if v_1.Op != OpMul16 {
6106 continue
6107 }
6108 _ = v_1.Args[1]
6109 v_1_0 := v_1.Args[0]
6110 v_1_1 := v_1.Args[1]
6111 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
6112 if v_1_0.Op != OpConst16 {
6113 continue
6114 }
6115 c := auxIntToInt16(v_1_0.AuxInt)
6116 if v_1_1.Op != OpTrunc32to16 {
6117 continue
6118 }
6119 v_1_1_0 := v_1_1.Args[0]
6120 if v_1_1_0.Op != OpRsh32Ux64 {
6121 continue
6122 }
6123 _ = v_1_1_0.Args[1]
6124 v_1_1_0_0 := v_1_1_0.Args[0]
6125 if v_1_1_0_0.Op != OpAvg32u {
6126 continue
6127 }
6128 _ = v_1_1_0_0.Args[1]
6129 v_1_1_0_0_0 := v_1_1_0_0.Args[0]
6130 if v_1_1_0_0_0.Op != OpLsh32x64 {
6131 continue
6132 }
6133 _ = v_1_1_0_0_0.Args[1]
6134 v_1_1_0_0_0_0 := v_1_1_0_0_0.Args[0]
6135 if v_1_1_0_0_0_0.Op != OpZeroExt16to32 || x != v_1_1_0_0_0_0.Args[0] {
6136 continue
6137 }
6138 v_1_1_0_0_0_1 := v_1_1_0_0_0.Args[1]
6139 if v_1_1_0_0_0_1.Op != OpConst64 || auxIntToInt64(v_1_1_0_0_0_1.AuxInt) != 16 {
6140 continue
6141 }
6142 mul := v_1_1_0_0.Args[1]
6143 if mul.Op != OpMul32 {
6144 continue
6145 }
6146 _ = mul.Args[1]
6147 mul_0 := mul.Args[0]
6148 mul_1 := mul.Args[1]
6149 for _i2 := 0; _i2 <= 1; _i2, mul_0, mul_1 = _i2+1, mul_1, mul_0 {
6150 if mul_0.Op != OpConst32 {
6151 continue
6152 }
6153 m := auxIntToInt32(mul_0.AuxInt)
6154 if mul_1.Op != OpZeroExt16to32 || x != mul_1.Args[0] {
6155 continue
6156 }
6157 v_1_1_0_1 := v_1_1_0.Args[1]
6158 if v_1_1_0_1.Op != OpConst64 {
6159 continue
6160 }
6161 s := auxIntToInt64(v_1_1_0_1.AuxInt)
6162 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)) {
6163 continue
6164 }
6165 v.reset(OpLeq16U)
6166 v0 := b.NewValue0(v.Pos, OpRotateLeft16, typ.UInt16)
6167 v1 := b.NewValue0(v.Pos, OpMul16, typ.UInt16)
6168 v2 := b.NewValue0(v.Pos, OpConst16, typ.UInt16)
6169 v2.AuxInt = int16ToAuxInt(int16(udivisible16(c).m))
6170 v1.AddArg2(v2, x)
6171 v3 := b.NewValue0(v.Pos, OpConst16, typ.UInt16)
6172 v3.AuxInt = int16ToAuxInt(int16(16 - udivisible16(c).k))
6173 v0.AddArg2(v1, v3)
6174 v4 := b.NewValue0(v.Pos, OpConst16, typ.UInt16)
6175 v4.AuxInt = int16ToAuxInt(int16(udivisible16(c).max))
6176 v.AddArg2(v0, v4)
6177 return true
6178 }
6179 }
6180 }
6181 break
6182 }
6183
6184
6185
6186 for {
6187 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
6188 x := v_0
6189 if v_1.Op != OpMul16 {
6190 continue
6191 }
6192 _ = v_1.Args[1]
6193 v_1_0 := v_1.Args[0]
6194 v_1_1 := v_1.Args[1]
6195 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
6196 if v_1_0.Op != OpConst16 {
6197 continue
6198 }
6199 c := auxIntToInt16(v_1_0.AuxInt)
6200 if v_1_1.Op != OpSub16 {
6201 continue
6202 }
6203 _ = v_1_1.Args[1]
6204 v_1_1_0 := v_1_1.Args[0]
6205 if v_1_1_0.Op != OpRsh32x64 {
6206 continue
6207 }
6208 _ = v_1_1_0.Args[1]
6209 mul := v_1_1_0.Args[0]
6210 if mul.Op != OpMul32 {
6211 continue
6212 }
6213 _ = mul.Args[1]
6214 mul_0 := mul.Args[0]
6215 mul_1 := mul.Args[1]
6216 for _i2 := 0; _i2 <= 1; _i2, mul_0, mul_1 = _i2+1, mul_1, mul_0 {
6217 if mul_0.Op != OpConst32 {
6218 continue
6219 }
6220 m := auxIntToInt32(mul_0.AuxInt)
6221 if mul_1.Op != OpSignExt16to32 || x != mul_1.Args[0] {
6222 continue
6223 }
6224 v_1_1_0_1 := v_1_1_0.Args[1]
6225 if v_1_1_0_1.Op != OpConst64 {
6226 continue
6227 }
6228 s := auxIntToInt64(v_1_1_0_1.AuxInt)
6229 v_1_1_1 := v_1_1.Args[1]
6230 if v_1_1_1.Op != OpRsh32x64 {
6231 continue
6232 }
6233 _ = v_1_1_1.Args[1]
6234 v_1_1_1_0 := v_1_1_1.Args[0]
6235 if v_1_1_1_0.Op != OpSignExt16to32 || x != v_1_1_1_0.Args[0] {
6236 continue
6237 }
6238 v_1_1_1_1 := v_1_1_1.Args[1]
6239 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)) {
6240 continue
6241 }
6242 v.reset(OpLeq16U)
6243 v0 := b.NewValue0(v.Pos, OpRotateLeft16, typ.UInt16)
6244 v1 := b.NewValue0(v.Pos, OpAdd16, typ.UInt16)
6245 v2 := b.NewValue0(v.Pos, OpMul16, typ.UInt16)
6246 v3 := b.NewValue0(v.Pos, OpConst16, typ.UInt16)
6247 v3.AuxInt = int16ToAuxInt(int16(sdivisible16(c).m))
6248 v2.AddArg2(v3, x)
6249 v4 := b.NewValue0(v.Pos, OpConst16, typ.UInt16)
6250 v4.AuxInt = int16ToAuxInt(int16(sdivisible16(c).a))
6251 v1.AddArg2(v2, v4)
6252 v5 := b.NewValue0(v.Pos, OpConst16, typ.UInt16)
6253 v5.AuxInt = int16ToAuxInt(int16(16 - sdivisible16(c).k))
6254 v0.AddArg2(v1, v5)
6255 v6 := b.NewValue0(v.Pos, OpConst16, typ.UInt16)
6256 v6.AuxInt = int16ToAuxInt(int16(sdivisible16(c).max))
6257 v.AddArg2(v0, v6)
6258 return true
6259 }
6260 }
6261 }
6262 break
6263 }
6264
6265
6266
6267 for {
6268 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
6269 n := v_0
6270 if v_1.Op != OpLsh16x64 {
6271 continue
6272 }
6273 _ = v_1.Args[1]
6274 v_1_0 := v_1.Args[0]
6275 if v_1_0.Op != OpRsh16x64 {
6276 continue
6277 }
6278 _ = v_1_0.Args[1]
6279 v_1_0_0 := v_1_0.Args[0]
6280 if v_1_0_0.Op != OpAdd16 {
6281 continue
6282 }
6283 t := v_1_0_0.Type
6284 _ = v_1_0_0.Args[1]
6285 v_1_0_0_0 := v_1_0_0.Args[0]
6286 v_1_0_0_1 := v_1_0_0.Args[1]
6287 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 {
6288 if n != v_1_0_0_0 || v_1_0_0_1.Op != OpRsh16Ux64 || v_1_0_0_1.Type != t {
6289 continue
6290 }
6291 _ = v_1_0_0_1.Args[1]
6292 v_1_0_0_1_0 := v_1_0_0_1.Args[0]
6293 if v_1_0_0_1_0.Op != OpRsh16x64 || v_1_0_0_1_0.Type != t {
6294 continue
6295 }
6296 _ = v_1_0_0_1_0.Args[1]
6297 if n != v_1_0_0_1_0.Args[0] {
6298 continue
6299 }
6300 v_1_0_0_1_0_1 := v_1_0_0_1_0.Args[1]
6301 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 {
6302 continue
6303 }
6304 v_1_0_0_1_1 := v_1_0_0_1.Args[1]
6305 if v_1_0_0_1_1.Op != OpConst64 || v_1_0_0_1_1.Type != typ.UInt64 {
6306 continue
6307 }
6308 kbar := auxIntToInt64(v_1_0_0_1_1.AuxInt)
6309 v_1_0_1 := v_1_0.Args[1]
6310 if v_1_0_1.Op != OpConst64 || v_1_0_1.Type != typ.UInt64 {
6311 continue
6312 }
6313 k := auxIntToInt64(v_1_0_1.AuxInt)
6314 v_1_1 := v_1.Args[1]
6315 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) {
6316 continue
6317 }
6318 v.reset(OpEq16)
6319 v0 := b.NewValue0(v.Pos, OpAnd16, t)
6320 v1 := b.NewValue0(v.Pos, OpConst16, t)
6321 v1.AuxInt = int16ToAuxInt(1<<uint(k) - 1)
6322 v0.AddArg2(n, v1)
6323 v2 := b.NewValue0(v.Pos, OpConst16, t)
6324 v2.AuxInt = int16ToAuxInt(0)
6325 v.AddArg2(v0, v2)
6326 return true
6327 }
6328 }
6329 break
6330 }
6331
6332
6333
6334 for {
6335 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
6336 s := v_0
6337 if s.Op != OpSub16 {
6338 continue
6339 }
6340 y := s.Args[1]
6341 x := s.Args[0]
6342 if v_1.Op != OpConst16 || auxIntToInt16(v_1.AuxInt) != 0 || !(s.Uses == 1) {
6343 continue
6344 }
6345 v.reset(OpEq16)
6346 v.AddArg2(x, y)
6347 return true
6348 }
6349 break
6350 }
6351
6352
6353
6354 for {
6355 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
6356 if v_0.Op != OpAnd16 {
6357 continue
6358 }
6359 t := v_0.Type
6360 _ = v_0.Args[1]
6361 v_0_0 := v_0.Args[0]
6362 v_0_1 := v_0.Args[1]
6363 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
6364 x := v_0_0
6365 if v_0_1.Op != OpConst16 || v_0_1.Type != t {
6366 continue
6367 }
6368 y := auxIntToInt16(v_0_1.AuxInt)
6369 if v_1.Op != OpConst16 || v_1.Type != t || auxIntToInt16(v_1.AuxInt) != y || !(oneBit16(y)) {
6370 continue
6371 }
6372 v.reset(OpNeq16)
6373 v0 := b.NewValue0(v.Pos, OpAnd16, t)
6374 v1 := b.NewValue0(v.Pos, OpConst16, t)
6375 v1.AuxInt = int16ToAuxInt(y)
6376 v0.AddArg2(x, v1)
6377 v2 := b.NewValue0(v.Pos, OpConst16, t)
6378 v2.AuxInt = int16ToAuxInt(0)
6379 v.AddArg2(v0, v2)
6380 return true
6381 }
6382 }
6383 break
6384 }
6385 return false
6386 }
6387 func rewriteValuegeneric_OpEq32(v *Value) bool {
6388 v_1 := v.Args[1]
6389 v_0 := v.Args[0]
6390 b := v.Block
6391 typ := &b.Func.Config.Types
6392
6393
6394 for {
6395 x := v_0
6396 if x != v_1 {
6397 break
6398 }
6399 v.reset(OpConstBool)
6400 v.AuxInt = boolToAuxInt(true)
6401 return true
6402 }
6403
6404
6405 for {
6406 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
6407 if v_0.Op != OpConst32 {
6408 continue
6409 }
6410 t := v_0.Type
6411 c := auxIntToInt32(v_0.AuxInt)
6412 if v_1.Op != OpAdd32 {
6413 continue
6414 }
6415 _ = v_1.Args[1]
6416 v_1_0 := v_1.Args[0]
6417 v_1_1 := v_1.Args[1]
6418 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
6419 if v_1_0.Op != OpConst32 || v_1_0.Type != t {
6420 continue
6421 }
6422 d := auxIntToInt32(v_1_0.AuxInt)
6423 x := v_1_1
6424 v.reset(OpEq32)
6425 v0 := b.NewValue0(v.Pos, OpConst32, t)
6426 v0.AuxInt = int32ToAuxInt(c - d)
6427 v.AddArg2(v0, x)
6428 return true
6429 }
6430 }
6431 break
6432 }
6433
6434
6435 for {
6436 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
6437 if v_0.Op != OpConst32 {
6438 continue
6439 }
6440 c := auxIntToInt32(v_0.AuxInt)
6441 if v_1.Op != OpConst32 {
6442 continue
6443 }
6444 d := auxIntToInt32(v_1.AuxInt)
6445 v.reset(OpConstBool)
6446 v.AuxInt = boolToAuxInt(c == d)
6447 return true
6448 }
6449 break
6450 }
6451
6452
6453
6454 for {
6455 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
6456 x := v_0
6457 if v_1.Op != OpMul32 {
6458 continue
6459 }
6460 _ = v_1.Args[1]
6461 v_1_0 := v_1.Args[0]
6462 v_1_1 := v_1.Args[1]
6463 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
6464 if v_1_0.Op != OpConst32 {
6465 continue
6466 }
6467 c := auxIntToInt32(v_1_0.AuxInt)
6468 if v_1_1.Op != OpRsh32Ux64 {
6469 continue
6470 }
6471 _ = v_1_1.Args[1]
6472 mul := v_1_1.Args[0]
6473 if mul.Op != OpHmul32u {
6474 continue
6475 }
6476 _ = mul.Args[1]
6477 mul_0 := mul.Args[0]
6478 mul_1 := mul.Args[1]
6479 for _i2 := 0; _i2 <= 1; _i2, mul_0, mul_1 = _i2+1, mul_1, mul_0 {
6480 if mul_0.Op != OpConst32 {
6481 continue
6482 }
6483 m := auxIntToInt32(mul_0.AuxInt)
6484 if x != mul_1 {
6485 continue
6486 }
6487 v_1_1_1 := v_1_1.Args[1]
6488 if v_1_1_1.Op != OpConst64 {
6489 continue
6490 }
6491 s := auxIntToInt64(v_1_1_1.AuxInt)
6492 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)) {
6493 continue
6494 }
6495 v.reset(OpLeq32U)
6496 v0 := b.NewValue0(v.Pos, OpRotateLeft32, typ.UInt32)
6497 v1 := b.NewValue0(v.Pos, OpMul32, typ.UInt32)
6498 v2 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
6499 v2.AuxInt = int32ToAuxInt(int32(udivisible32(c).m))
6500 v1.AddArg2(v2, x)
6501 v3 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
6502 v3.AuxInt = int32ToAuxInt(int32(32 - udivisible32(c).k))
6503 v0.AddArg2(v1, v3)
6504 v4 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
6505 v4.AuxInt = int32ToAuxInt(int32(udivisible32(c).max))
6506 v.AddArg2(v0, v4)
6507 return true
6508 }
6509 }
6510 }
6511 break
6512 }
6513
6514
6515
6516 for {
6517 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
6518 x := v_0
6519 if v_1.Op != OpMul32 {
6520 continue
6521 }
6522 _ = v_1.Args[1]
6523 v_1_0 := v_1.Args[0]
6524 v_1_1 := v_1.Args[1]
6525 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
6526 if v_1_0.Op != OpConst32 {
6527 continue
6528 }
6529 c := auxIntToInt32(v_1_0.AuxInt)
6530 if v_1_1.Op != OpRsh32Ux64 {
6531 continue
6532 }
6533 _ = v_1_1.Args[1]
6534 mul := v_1_1.Args[0]
6535 if mul.Op != OpHmul32u {
6536 continue
6537 }
6538 _ = mul.Args[1]
6539 mul_0 := mul.Args[0]
6540 mul_1 := mul.Args[1]
6541 for _i2 := 0; _i2 <= 1; _i2, mul_0, mul_1 = _i2+1, mul_1, mul_0 {
6542 if mul_0.Op != OpConst32 || mul_0.Type != typ.UInt32 {
6543 continue
6544 }
6545 m := auxIntToInt32(mul_0.AuxInt)
6546 if mul_1.Op != OpRsh32Ux64 {
6547 continue
6548 }
6549 _ = mul_1.Args[1]
6550 if x != mul_1.Args[0] {
6551 continue
6552 }
6553 mul_1_1 := mul_1.Args[1]
6554 if mul_1_1.Op != OpConst64 || auxIntToInt64(mul_1_1.AuxInt) != 1 {
6555 continue
6556 }
6557 v_1_1_1 := v_1_1.Args[1]
6558 if v_1_1_1.Op != OpConst64 {
6559 continue
6560 }
6561 s := auxIntToInt64(v_1_1_1.AuxInt)
6562 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)) {
6563 continue
6564 }
6565 v.reset(OpLeq32U)
6566 v0 := b.NewValue0(v.Pos, OpRotateLeft32, typ.UInt32)
6567 v1 := b.NewValue0(v.Pos, OpMul32, typ.UInt32)
6568 v2 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
6569 v2.AuxInt = int32ToAuxInt(int32(udivisible32(c).m))
6570 v1.AddArg2(v2, x)
6571 v3 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
6572 v3.AuxInt = int32ToAuxInt(int32(32 - udivisible32(c).k))
6573 v0.AddArg2(v1, v3)
6574 v4 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
6575 v4.AuxInt = int32ToAuxInt(int32(udivisible32(c).max))
6576 v.AddArg2(v0, v4)
6577 return true
6578 }
6579 }
6580 }
6581 break
6582 }
6583
6584
6585
6586 for {
6587 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
6588 x := v_0
6589 if v_1.Op != OpMul32 {
6590 continue
6591 }
6592 _ = v_1.Args[1]
6593 v_1_0 := v_1.Args[0]
6594 v_1_1 := v_1.Args[1]
6595 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
6596 if v_1_0.Op != OpConst32 {
6597 continue
6598 }
6599 c := auxIntToInt32(v_1_0.AuxInt)
6600 if v_1_1.Op != OpRsh32Ux64 {
6601 continue
6602 }
6603 _ = v_1_1.Args[1]
6604 v_1_1_0 := v_1_1.Args[0]
6605 if v_1_1_0.Op != OpAvg32u {
6606 continue
6607 }
6608 _ = v_1_1_0.Args[1]
6609 if x != v_1_1_0.Args[0] {
6610 continue
6611 }
6612 mul := v_1_1_0.Args[1]
6613 if mul.Op != OpHmul32u {
6614 continue
6615 }
6616 _ = mul.Args[1]
6617 mul_0 := mul.Args[0]
6618 mul_1 := mul.Args[1]
6619 for _i2 := 0; _i2 <= 1; _i2, mul_0, mul_1 = _i2+1, mul_1, mul_0 {
6620 if mul_0.Op != OpConst32 {
6621 continue
6622 }
6623 m := auxIntToInt32(mul_0.AuxInt)
6624 if x != mul_1 {
6625 continue
6626 }
6627 v_1_1_1 := v_1_1.Args[1]
6628 if v_1_1_1.Op != OpConst64 {
6629 continue
6630 }
6631 s := auxIntToInt64(v_1_1_1.AuxInt)
6632 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)) {
6633 continue
6634 }
6635 v.reset(OpLeq32U)
6636 v0 := b.NewValue0(v.Pos, OpRotateLeft32, typ.UInt32)
6637 v1 := b.NewValue0(v.Pos, OpMul32, typ.UInt32)
6638 v2 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
6639 v2.AuxInt = int32ToAuxInt(int32(udivisible32(c).m))
6640 v1.AddArg2(v2, x)
6641 v3 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
6642 v3.AuxInt = int32ToAuxInt(int32(32 - udivisible32(c).k))
6643 v0.AddArg2(v1, v3)
6644 v4 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
6645 v4.AuxInt = int32ToAuxInt(int32(udivisible32(c).max))
6646 v.AddArg2(v0, v4)
6647 return true
6648 }
6649 }
6650 }
6651 break
6652 }
6653
6654
6655
6656 for {
6657 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
6658 x := v_0
6659 if v_1.Op != OpMul32 {
6660 continue
6661 }
6662 _ = v_1.Args[1]
6663 v_1_0 := v_1.Args[0]
6664 v_1_1 := v_1.Args[1]
6665 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
6666 if v_1_0.Op != OpConst32 {
6667 continue
6668 }
6669 c := auxIntToInt32(v_1_0.AuxInt)
6670 if v_1_1.Op != OpTrunc64to32 {
6671 continue
6672 }
6673 v_1_1_0 := v_1_1.Args[0]
6674 if v_1_1_0.Op != OpRsh64Ux64 {
6675 continue
6676 }
6677 _ = v_1_1_0.Args[1]
6678 mul := v_1_1_0.Args[0]
6679 if mul.Op != OpMul64 {
6680 continue
6681 }
6682 _ = mul.Args[1]
6683 mul_0 := mul.Args[0]
6684 mul_1 := mul.Args[1]
6685 for _i2 := 0; _i2 <= 1; _i2, mul_0, mul_1 = _i2+1, mul_1, mul_0 {
6686 if mul_0.Op != OpConst64 {
6687 continue
6688 }
6689 m := auxIntToInt64(mul_0.AuxInt)
6690 if mul_1.Op != OpZeroExt32to64 || x != mul_1.Args[0] {
6691 continue
6692 }
6693 v_1_1_0_1 := v_1_1_0.Args[1]
6694 if v_1_1_0_1.Op != OpConst64 {
6695 continue
6696 }
6697 s := auxIntToInt64(v_1_1_0_1.AuxInt)
6698 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)) {
6699 continue
6700 }
6701 v.reset(OpLeq32U)
6702 v0 := b.NewValue0(v.Pos, OpRotateLeft32, typ.UInt32)
6703 v1 := b.NewValue0(v.Pos, OpMul32, typ.UInt32)
6704 v2 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
6705 v2.AuxInt = int32ToAuxInt(int32(udivisible32(c).m))
6706 v1.AddArg2(v2, x)
6707 v3 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
6708 v3.AuxInt = int32ToAuxInt(int32(32 - udivisible32(c).k))
6709 v0.AddArg2(v1, v3)
6710 v4 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
6711 v4.AuxInt = int32ToAuxInt(int32(udivisible32(c).max))
6712 v.AddArg2(v0, v4)
6713 return true
6714 }
6715 }
6716 }
6717 break
6718 }
6719
6720
6721
6722 for {
6723 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
6724 x := v_0
6725 if v_1.Op != OpMul32 {
6726 continue
6727 }
6728 _ = v_1.Args[1]
6729 v_1_0 := v_1.Args[0]
6730 v_1_1 := v_1.Args[1]
6731 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
6732 if v_1_0.Op != OpConst32 {
6733 continue
6734 }
6735 c := auxIntToInt32(v_1_0.AuxInt)
6736 if v_1_1.Op != OpTrunc64to32 {
6737 continue
6738 }
6739 v_1_1_0 := v_1_1.Args[0]
6740 if v_1_1_0.Op != OpRsh64Ux64 {
6741 continue
6742 }
6743 _ = v_1_1_0.Args[1]
6744 mul := v_1_1_0.Args[0]
6745 if mul.Op != OpMul64 {
6746 continue
6747 }
6748 _ = mul.Args[1]
6749 mul_0 := mul.Args[0]
6750 mul_1 := mul.Args[1]
6751 for _i2 := 0; _i2 <= 1; _i2, mul_0, mul_1 = _i2+1, mul_1, mul_0 {
6752 if mul_0.Op != OpConst64 {
6753 continue
6754 }
6755 m := auxIntToInt64(mul_0.AuxInt)
6756 if mul_1.Op != OpRsh64Ux64 {
6757 continue
6758 }
6759 _ = mul_1.Args[1]
6760 mul_1_0 := mul_1.Args[0]
6761 if mul_1_0.Op != OpZeroExt32to64 || x != mul_1_0.Args[0] {
6762 continue
6763 }
6764 mul_1_1 := mul_1.Args[1]
6765 if mul_1_1.Op != OpConst64 || auxIntToInt64(mul_1_1.AuxInt) != 1 {
6766 continue
6767 }
6768 v_1_1_0_1 := v_1_1_0.Args[1]
6769 if v_1_1_0_1.Op != OpConst64 {
6770 continue
6771 }
6772 s := auxIntToInt64(v_1_1_0_1.AuxInt)
6773 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)) {
6774 continue
6775 }
6776 v.reset(OpLeq32U)
6777 v0 := b.NewValue0(v.Pos, OpRotateLeft32, typ.UInt32)
6778 v1 := b.NewValue0(v.Pos, OpMul32, typ.UInt32)
6779 v2 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
6780 v2.AuxInt = int32ToAuxInt(int32(udivisible32(c).m))
6781 v1.AddArg2(v2, x)
6782 v3 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
6783 v3.AuxInt = int32ToAuxInt(int32(32 - udivisible32(c).k))
6784 v0.AddArg2(v1, v3)
6785 v4 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
6786 v4.AuxInt = int32ToAuxInt(int32(udivisible32(c).max))
6787 v.AddArg2(v0, v4)
6788 return true
6789 }
6790 }
6791 }
6792 break
6793 }
6794
6795
6796
6797 for {
6798 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
6799 x := v_0
6800 if v_1.Op != OpMul32 {
6801 continue
6802 }
6803 _ = v_1.Args[1]
6804 v_1_0 := v_1.Args[0]
6805 v_1_1 := v_1.Args[1]
6806 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
6807 if v_1_0.Op != OpConst32 {
6808 continue
6809 }
6810 c := auxIntToInt32(v_1_0.AuxInt)
6811 if v_1_1.Op != OpTrunc64to32 {
6812 continue
6813 }
6814 v_1_1_0 := v_1_1.Args[0]
6815 if v_1_1_0.Op != OpRsh64Ux64 {
6816 continue
6817 }
6818 _ = v_1_1_0.Args[1]
6819 v_1_1_0_0 := v_1_1_0.Args[0]
6820 if v_1_1_0_0.Op != OpAvg64u {
6821 continue
6822 }
6823 _ = v_1_1_0_0.Args[1]
6824 v_1_1_0_0_0 := v_1_1_0_0.Args[0]
6825 if v_1_1_0_0_0.Op != OpLsh64x64 {
6826 continue
6827 }
6828 _ = v_1_1_0_0_0.Args[1]
6829 v_1_1_0_0_0_0 := v_1_1_0_0_0.Args[0]
6830 if v_1_1_0_0_0_0.Op != OpZeroExt32to64 || x != v_1_1_0_0_0_0.Args[0] {
6831 continue
6832 }
6833 v_1_1_0_0_0_1 := v_1_1_0_0_0.Args[1]
6834 if v_1_1_0_0_0_1.Op != OpConst64 || auxIntToInt64(v_1_1_0_0_0_1.AuxInt) != 32 {
6835 continue
6836 }
6837 mul := v_1_1_0_0.Args[1]
6838 if mul.Op != OpMul64 {
6839 continue
6840 }
6841 _ = mul.Args[1]
6842 mul_0 := mul.Args[0]
6843 mul_1 := mul.Args[1]
6844 for _i2 := 0; _i2 <= 1; _i2, mul_0, mul_1 = _i2+1, mul_1, mul_0 {
6845 if mul_0.Op != OpConst64 {
6846 continue
6847 }
6848 m := auxIntToInt64(mul_0.AuxInt)
6849 if mul_1.Op != OpZeroExt32to64 || x != mul_1.Args[0] {
6850 continue
6851 }
6852 v_1_1_0_1 := v_1_1_0.Args[1]
6853 if v_1_1_0_1.Op != OpConst64 {
6854 continue
6855 }
6856 s := auxIntToInt64(v_1_1_0_1.AuxInt)
6857 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)) {
6858 continue
6859 }
6860 v.reset(OpLeq32U)
6861 v0 := b.NewValue0(v.Pos, OpRotateLeft32, typ.UInt32)
6862 v1 := b.NewValue0(v.Pos, OpMul32, typ.UInt32)
6863 v2 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
6864 v2.AuxInt = int32ToAuxInt(int32(udivisible32(c).m))
6865 v1.AddArg2(v2, x)
6866 v3 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
6867 v3.AuxInt = int32ToAuxInt(int32(32 - udivisible32(c).k))
6868 v0.AddArg2(v1, v3)
6869 v4 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
6870 v4.AuxInt = int32ToAuxInt(int32(udivisible32(c).max))
6871 v.AddArg2(v0, v4)
6872 return true
6873 }
6874 }
6875 }
6876 break
6877 }
6878
6879
6880
6881 for {
6882 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
6883 x := v_0
6884 if v_1.Op != OpMul32 {
6885 continue
6886 }
6887 _ = v_1.Args[1]
6888 v_1_0 := v_1.Args[0]
6889 v_1_1 := v_1.Args[1]
6890 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
6891 if v_1_0.Op != OpConst32 {
6892 continue
6893 }
6894 c := auxIntToInt32(v_1_0.AuxInt)
6895 if v_1_1.Op != OpSub32 {
6896 continue
6897 }
6898 _ = v_1_1.Args[1]
6899 v_1_1_0 := v_1_1.Args[0]
6900 if v_1_1_0.Op != OpRsh64x64 {
6901 continue
6902 }
6903 _ = v_1_1_0.Args[1]
6904 mul := v_1_1_0.Args[0]
6905 if mul.Op != OpMul64 {
6906 continue
6907 }
6908 _ = mul.Args[1]
6909 mul_0 := mul.Args[0]
6910 mul_1 := mul.Args[1]
6911 for _i2 := 0; _i2 <= 1; _i2, mul_0, mul_1 = _i2+1, mul_1, mul_0 {
6912 if mul_0.Op != OpConst64 {
6913 continue
6914 }
6915 m := auxIntToInt64(mul_0.AuxInt)
6916 if mul_1.Op != OpSignExt32to64 || x != mul_1.Args[0] {
6917 continue
6918 }
6919 v_1_1_0_1 := v_1_1_0.Args[1]
6920 if v_1_1_0_1.Op != OpConst64 {
6921 continue
6922 }
6923 s := auxIntToInt64(v_1_1_0_1.AuxInt)
6924 v_1_1_1 := v_1_1.Args[1]
6925 if v_1_1_1.Op != OpRsh64x64 {
6926 continue
6927 }
6928 _ = v_1_1_1.Args[1]
6929 v_1_1_1_0 := v_1_1_1.Args[0]
6930 if v_1_1_1_0.Op != OpSignExt32to64 || x != v_1_1_1_0.Args[0] {
6931 continue
6932 }
6933 v_1_1_1_1 := v_1_1_1.Args[1]
6934 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)) {
6935 continue
6936 }
6937 v.reset(OpLeq32U)
6938 v0 := b.NewValue0(v.Pos, OpRotateLeft32, typ.UInt32)
6939 v1 := b.NewValue0(v.Pos, OpAdd32, typ.UInt32)
6940 v2 := b.NewValue0(v.Pos, OpMul32, typ.UInt32)
6941 v3 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
6942 v3.AuxInt = int32ToAuxInt(int32(sdivisible32(c).m))
6943 v2.AddArg2(v3, x)
6944 v4 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
6945 v4.AuxInt = int32ToAuxInt(int32(sdivisible32(c).a))
6946 v1.AddArg2(v2, v4)
6947 v5 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
6948 v5.AuxInt = int32ToAuxInt(int32(32 - sdivisible32(c).k))
6949 v0.AddArg2(v1, v5)
6950 v6 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
6951 v6.AuxInt = int32ToAuxInt(int32(sdivisible32(c).max))
6952 v.AddArg2(v0, v6)
6953 return true
6954 }
6955 }
6956 }
6957 break
6958 }
6959
6960
6961
6962 for {
6963 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
6964 x := v_0
6965 if v_1.Op != OpMul32 {
6966 continue
6967 }
6968 _ = v_1.Args[1]
6969 v_1_0 := v_1.Args[0]
6970 v_1_1 := v_1.Args[1]
6971 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
6972 if v_1_0.Op != OpConst32 {
6973 continue
6974 }
6975 c := auxIntToInt32(v_1_0.AuxInt)
6976 if v_1_1.Op != OpSub32 {
6977 continue
6978 }
6979 _ = v_1_1.Args[1]
6980 v_1_1_0 := v_1_1.Args[0]
6981 if v_1_1_0.Op != OpRsh32x64 {
6982 continue
6983 }
6984 _ = v_1_1_0.Args[1]
6985 mul := v_1_1_0.Args[0]
6986 if mul.Op != OpHmul32 {
6987 continue
6988 }
6989 _ = mul.Args[1]
6990 mul_0 := mul.Args[0]
6991 mul_1 := mul.Args[1]
6992 for _i2 := 0; _i2 <= 1; _i2, mul_0, mul_1 = _i2+1, mul_1, mul_0 {
6993 if mul_0.Op != OpConst32 {
6994 continue
6995 }
6996 m := auxIntToInt32(mul_0.AuxInt)
6997 if x != mul_1 {
6998 continue
6999 }
7000 v_1_1_0_1 := v_1_1_0.Args[1]
7001 if v_1_1_0_1.Op != OpConst64 {
7002 continue
7003 }
7004 s := auxIntToInt64(v_1_1_0_1.AuxInt)
7005 v_1_1_1 := v_1_1.Args[1]
7006 if v_1_1_1.Op != OpRsh32x64 {
7007 continue
7008 }
7009 _ = v_1_1_1.Args[1]
7010 if x != v_1_1_1.Args[0] {
7011 continue
7012 }
7013 v_1_1_1_1 := v_1_1_1.Args[1]
7014 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)) {
7015 continue
7016 }
7017 v.reset(OpLeq32U)
7018 v0 := b.NewValue0(v.Pos, OpRotateLeft32, typ.UInt32)
7019 v1 := b.NewValue0(v.Pos, OpAdd32, typ.UInt32)
7020 v2 := b.NewValue0(v.Pos, OpMul32, typ.UInt32)
7021 v3 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
7022 v3.AuxInt = int32ToAuxInt(int32(sdivisible32(c).m))
7023 v2.AddArg2(v3, x)
7024 v4 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
7025 v4.AuxInt = int32ToAuxInt(int32(sdivisible32(c).a))
7026 v1.AddArg2(v2, v4)
7027 v5 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
7028 v5.AuxInt = int32ToAuxInt(int32(32 - sdivisible32(c).k))
7029 v0.AddArg2(v1, v5)
7030 v6 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
7031 v6.AuxInt = int32ToAuxInt(int32(sdivisible32(c).max))
7032 v.AddArg2(v0, v6)
7033 return true
7034 }
7035 }
7036 }
7037 break
7038 }
7039
7040
7041
7042 for {
7043 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
7044 x := v_0
7045 if v_1.Op != OpMul32 {
7046 continue
7047 }
7048 _ = v_1.Args[1]
7049 v_1_0 := v_1.Args[0]
7050 v_1_1 := v_1.Args[1]
7051 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
7052 if v_1_0.Op != OpConst32 {
7053 continue
7054 }
7055 c := auxIntToInt32(v_1_0.AuxInt)
7056 if v_1_1.Op != OpSub32 {
7057 continue
7058 }
7059 _ = v_1_1.Args[1]
7060 v_1_1_0 := v_1_1.Args[0]
7061 if v_1_1_0.Op != OpRsh32x64 {
7062 continue
7063 }
7064 _ = v_1_1_0.Args[1]
7065 v_1_1_0_0 := v_1_1_0.Args[0]
7066 if v_1_1_0_0.Op != OpAdd32 {
7067 continue
7068 }
7069 _ = v_1_1_0_0.Args[1]
7070 v_1_1_0_0_0 := v_1_1_0_0.Args[0]
7071 v_1_1_0_0_1 := v_1_1_0_0.Args[1]
7072 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 {
7073 mul := v_1_1_0_0_0
7074 if mul.Op != OpHmul32 {
7075 continue
7076 }
7077 _ = mul.Args[1]
7078 mul_0 := mul.Args[0]
7079 mul_1 := mul.Args[1]
7080 for _i3 := 0; _i3 <= 1; _i3, mul_0, mul_1 = _i3+1, mul_1, mul_0 {
7081 if mul_0.Op != OpConst32 {
7082 continue
7083 }
7084 m := auxIntToInt32(mul_0.AuxInt)
7085 if x != mul_1 || x != v_1_1_0_0_1 {
7086 continue
7087 }
7088 v_1_1_0_1 := v_1_1_0.Args[1]
7089 if v_1_1_0_1.Op != OpConst64 {
7090 continue
7091 }
7092 s := auxIntToInt64(v_1_1_0_1.AuxInt)
7093 v_1_1_1 := v_1_1.Args[1]
7094 if v_1_1_1.Op != OpRsh32x64 {
7095 continue
7096 }
7097 _ = v_1_1_1.Args[1]
7098 if x != v_1_1_1.Args[0] {
7099 continue
7100 }
7101 v_1_1_1_1 := v_1_1_1.Args[1]
7102 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)) {
7103 continue
7104 }
7105 v.reset(OpLeq32U)
7106 v0 := b.NewValue0(v.Pos, OpRotateLeft32, typ.UInt32)
7107 v1 := b.NewValue0(v.Pos, OpAdd32, typ.UInt32)
7108 v2 := b.NewValue0(v.Pos, OpMul32, typ.UInt32)
7109 v3 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
7110 v3.AuxInt = int32ToAuxInt(int32(sdivisible32(c).m))
7111 v2.AddArg2(v3, x)
7112 v4 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
7113 v4.AuxInt = int32ToAuxInt(int32(sdivisible32(c).a))
7114 v1.AddArg2(v2, v4)
7115 v5 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
7116 v5.AuxInt = int32ToAuxInt(int32(32 - sdivisible32(c).k))
7117 v0.AddArg2(v1, v5)
7118 v6 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
7119 v6.AuxInt = int32ToAuxInt(int32(sdivisible32(c).max))
7120 v.AddArg2(v0, v6)
7121 return true
7122 }
7123 }
7124 }
7125 }
7126 break
7127 }
7128
7129
7130
7131 for {
7132 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
7133 n := v_0
7134 if v_1.Op != OpLsh32x64 {
7135 continue
7136 }
7137 _ = v_1.Args[1]
7138 v_1_0 := v_1.Args[0]
7139 if v_1_0.Op != OpRsh32x64 {
7140 continue
7141 }
7142 _ = v_1_0.Args[1]
7143 v_1_0_0 := v_1_0.Args[0]
7144 if v_1_0_0.Op != OpAdd32 {
7145 continue
7146 }
7147 t := v_1_0_0.Type
7148 _ = v_1_0_0.Args[1]
7149 v_1_0_0_0 := v_1_0_0.Args[0]
7150 v_1_0_0_1 := v_1_0_0.Args[1]
7151 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 {
7152 if n != v_1_0_0_0 || v_1_0_0_1.Op != OpRsh32Ux64 || v_1_0_0_1.Type != t {
7153 continue
7154 }
7155 _ = v_1_0_0_1.Args[1]
7156 v_1_0_0_1_0 := v_1_0_0_1.Args[0]
7157 if v_1_0_0_1_0.Op != OpRsh32x64 || v_1_0_0_1_0.Type != t {
7158 continue
7159 }
7160 _ = v_1_0_0_1_0.Args[1]
7161 if n != v_1_0_0_1_0.Args[0] {
7162 continue
7163 }
7164 v_1_0_0_1_0_1 := v_1_0_0_1_0.Args[1]
7165 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 {
7166 continue
7167 }
7168 v_1_0_0_1_1 := v_1_0_0_1.Args[1]
7169 if v_1_0_0_1_1.Op != OpConst64 || v_1_0_0_1_1.Type != typ.UInt64 {
7170 continue
7171 }
7172 kbar := auxIntToInt64(v_1_0_0_1_1.AuxInt)
7173 v_1_0_1 := v_1_0.Args[1]
7174 if v_1_0_1.Op != OpConst64 || v_1_0_1.Type != typ.UInt64 {
7175 continue
7176 }
7177 k := auxIntToInt64(v_1_0_1.AuxInt)
7178 v_1_1 := v_1.Args[1]
7179 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) {
7180 continue
7181 }
7182 v.reset(OpEq32)
7183 v0 := b.NewValue0(v.Pos, OpAnd32, t)
7184 v1 := b.NewValue0(v.Pos, OpConst32, t)
7185 v1.AuxInt = int32ToAuxInt(1<<uint(k) - 1)
7186 v0.AddArg2(n, v1)
7187 v2 := b.NewValue0(v.Pos, OpConst32, t)
7188 v2.AuxInt = int32ToAuxInt(0)
7189 v.AddArg2(v0, v2)
7190 return true
7191 }
7192 }
7193 break
7194 }
7195
7196
7197
7198 for {
7199 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
7200 s := v_0
7201 if s.Op != OpSub32 {
7202 continue
7203 }
7204 y := s.Args[1]
7205 x := s.Args[0]
7206 if v_1.Op != OpConst32 || auxIntToInt32(v_1.AuxInt) != 0 || !(s.Uses == 1) {
7207 continue
7208 }
7209 v.reset(OpEq32)
7210 v.AddArg2(x, y)
7211 return true
7212 }
7213 break
7214 }
7215
7216
7217
7218 for {
7219 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
7220 if v_0.Op != OpAnd32 {
7221 continue
7222 }
7223 t := v_0.Type
7224 _ = v_0.Args[1]
7225 v_0_0 := v_0.Args[0]
7226 v_0_1 := v_0.Args[1]
7227 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
7228 x := v_0_0
7229 if v_0_1.Op != OpConst32 || v_0_1.Type != t {
7230 continue
7231 }
7232 y := auxIntToInt32(v_0_1.AuxInt)
7233 if v_1.Op != OpConst32 || v_1.Type != t || auxIntToInt32(v_1.AuxInt) != y || !(oneBit32(y)) {
7234 continue
7235 }
7236 v.reset(OpNeq32)
7237 v0 := b.NewValue0(v.Pos, OpAnd32, t)
7238 v1 := b.NewValue0(v.Pos, OpConst32, t)
7239 v1.AuxInt = int32ToAuxInt(y)
7240 v0.AddArg2(x, v1)
7241 v2 := b.NewValue0(v.Pos, OpConst32, t)
7242 v2.AuxInt = int32ToAuxInt(0)
7243 v.AddArg2(v0, v2)
7244 return true
7245 }
7246 }
7247 break
7248 }
7249 return false
7250 }
7251 func rewriteValuegeneric_OpEq32F(v *Value) bool {
7252 v_1 := v.Args[1]
7253 v_0 := v.Args[0]
7254
7255
7256 for {
7257 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
7258 if v_0.Op != OpConst32F {
7259 continue
7260 }
7261 c := auxIntToFloat32(v_0.AuxInt)
7262 if v_1.Op != OpConst32F {
7263 continue
7264 }
7265 d := auxIntToFloat32(v_1.AuxInt)
7266 v.reset(OpConstBool)
7267 v.AuxInt = boolToAuxInt(c == d)
7268 return true
7269 }
7270 break
7271 }
7272 return false
7273 }
7274 func rewriteValuegeneric_OpEq64(v *Value) bool {
7275 v_1 := v.Args[1]
7276 v_0 := v.Args[0]
7277 b := v.Block
7278 typ := &b.Func.Config.Types
7279
7280
7281 for {
7282 x := v_0
7283 if x != v_1 {
7284 break
7285 }
7286 v.reset(OpConstBool)
7287 v.AuxInt = boolToAuxInt(true)
7288 return true
7289 }
7290
7291
7292 for {
7293 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
7294 if v_0.Op != OpConst64 {
7295 continue
7296 }
7297 t := v_0.Type
7298 c := auxIntToInt64(v_0.AuxInt)
7299 if v_1.Op != OpAdd64 {
7300 continue
7301 }
7302 _ = v_1.Args[1]
7303 v_1_0 := v_1.Args[0]
7304 v_1_1 := v_1.Args[1]
7305 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
7306 if v_1_0.Op != OpConst64 || v_1_0.Type != t {
7307 continue
7308 }
7309 d := auxIntToInt64(v_1_0.AuxInt)
7310 x := v_1_1
7311 v.reset(OpEq64)
7312 v0 := b.NewValue0(v.Pos, OpConst64, t)
7313 v0.AuxInt = int64ToAuxInt(c - d)
7314 v.AddArg2(v0, x)
7315 return true
7316 }
7317 }
7318 break
7319 }
7320
7321
7322 for {
7323 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
7324 if v_0.Op != OpConst64 {
7325 continue
7326 }
7327 c := auxIntToInt64(v_0.AuxInt)
7328 if v_1.Op != OpConst64 {
7329 continue
7330 }
7331 d := auxIntToInt64(v_1.AuxInt)
7332 v.reset(OpConstBool)
7333 v.AuxInt = boolToAuxInt(c == d)
7334 return true
7335 }
7336 break
7337 }
7338
7339
7340
7341 for {
7342 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
7343 x := v_0
7344 if v_1.Op != OpMul64 {
7345 continue
7346 }
7347 _ = v_1.Args[1]
7348 v_1_0 := v_1.Args[0]
7349 v_1_1 := v_1.Args[1]
7350 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
7351 if v_1_0.Op != OpConst64 {
7352 continue
7353 }
7354 c := auxIntToInt64(v_1_0.AuxInt)
7355 if v_1_1.Op != OpRsh64Ux64 {
7356 continue
7357 }
7358 _ = v_1_1.Args[1]
7359 mul := v_1_1.Args[0]
7360 if mul.Op != OpHmul64u {
7361 continue
7362 }
7363 _ = mul.Args[1]
7364 mul_0 := mul.Args[0]
7365 mul_1 := mul.Args[1]
7366 for _i2 := 0; _i2 <= 1; _i2, mul_0, mul_1 = _i2+1, mul_1, mul_0 {
7367 if mul_0.Op != OpConst64 {
7368 continue
7369 }
7370 m := auxIntToInt64(mul_0.AuxInt)
7371 if x != mul_1 {
7372 continue
7373 }
7374 v_1_1_1 := v_1_1.Args[1]
7375 if v_1_1_1.Op != OpConst64 {
7376 continue
7377 }
7378 s := auxIntToInt64(v_1_1_1.AuxInt)
7379 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)) {
7380 continue
7381 }
7382 v.reset(OpLeq64U)
7383 v0 := b.NewValue0(v.Pos, OpRotateLeft64, typ.UInt64)
7384 v1 := b.NewValue0(v.Pos, OpMul64, typ.UInt64)
7385 v2 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7386 v2.AuxInt = int64ToAuxInt(int64(udivisible64(c).m))
7387 v1.AddArg2(v2, x)
7388 v3 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7389 v3.AuxInt = int64ToAuxInt(64 - udivisible64(c).k)
7390 v0.AddArg2(v1, v3)
7391 v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7392 v4.AuxInt = int64ToAuxInt(int64(udivisible64(c).max))
7393 v.AddArg2(v0, v4)
7394 return true
7395 }
7396 }
7397 }
7398 break
7399 }
7400
7401
7402
7403 for {
7404 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
7405 x := v_0
7406 if v_1.Op != OpMul64 {
7407 continue
7408 }
7409 _ = v_1.Args[1]
7410 v_1_0 := v_1.Args[0]
7411 v_1_1 := v_1.Args[1]
7412 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
7413 if v_1_0.Op != OpConst64 {
7414 continue
7415 }
7416 c := auxIntToInt64(v_1_0.AuxInt)
7417 if v_1_1.Op != OpRsh64Ux64 {
7418 continue
7419 }
7420 _ = v_1_1.Args[1]
7421 mul := v_1_1.Args[0]
7422 if mul.Op != OpHmul64u {
7423 continue
7424 }
7425 _ = mul.Args[1]
7426 mul_0 := mul.Args[0]
7427 mul_1 := mul.Args[1]
7428 for _i2 := 0; _i2 <= 1; _i2, mul_0, mul_1 = _i2+1, mul_1, mul_0 {
7429 if mul_0.Op != OpConst64 {
7430 continue
7431 }
7432 m := auxIntToInt64(mul_0.AuxInt)
7433 if mul_1.Op != OpRsh64Ux64 {
7434 continue
7435 }
7436 _ = mul_1.Args[1]
7437 if x != mul_1.Args[0] {
7438 continue
7439 }
7440 mul_1_1 := mul_1.Args[1]
7441 if mul_1_1.Op != OpConst64 || auxIntToInt64(mul_1_1.AuxInt) != 1 {
7442 continue
7443 }
7444 v_1_1_1 := v_1_1.Args[1]
7445 if v_1_1_1.Op != OpConst64 {
7446 continue
7447 }
7448 s := auxIntToInt64(v_1_1_1.AuxInt)
7449 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)) {
7450 continue
7451 }
7452 v.reset(OpLeq64U)
7453 v0 := b.NewValue0(v.Pos, OpRotateLeft64, typ.UInt64)
7454 v1 := b.NewValue0(v.Pos, OpMul64, typ.UInt64)
7455 v2 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7456 v2.AuxInt = int64ToAuxInt(int64(udivisible64(c).m))
7457 v1.AddArg2(v2, x)
7458 v3 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7459 v3.AuxInt = int64ToAuxInt(64 - udivisible64(c).k)
7460 v0.AddArg2(v1, v3)
7461 v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7462 v4.AuxInt = int64ToAuxInt(int64(udivisible64(c).max))
7463 v.AddArg2(v0, v4)
7464 return true
7465 }
7466 }
7467 }
7468 break
7469 }
7470
7471
7472
7473 for {
7474 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
7475 x := v_0
7476 if v_1.Op != OpMul64 {
7477 continue
7478 }
7479 _ = v_1.Args[1]
7480 v_1_0 := v_1.Args[0]
7481 v_1_1 := v_1.Args[1]
7482 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
7483 if v_1_0.Op != OpConst64 {
7484 continue
7485 }
7486 c := auxIntToInt64(v_1_0.AuxInt)
7487 if v_1_1.Op != OpRsh64Ux64 {
7488 continue
7489 }
7490 _ = v_1_1.Args[1]
7491 v_1_1_0 := v_1_1.Args[0]
7492 if v_1_1_0.Op != OpAvg64u {
7493 continue
7494 }
7495 _ = v_1_1_0.Args[1]
7496 if x != v_1_1_0.Args[0] {
7497 continue
7498 }
7499 mul := v_1_1_0.Args[1]
7500 if mul.Op != OpHmul64u {
7501 continue
7502 }
7503 _ = mul.Args[1]
7504 mul_0 := mul.Args[0]
7505 mul_1 := mul.Args[1]
7506 for _i2 := 0; _i2 <= 1; _i2, mul_0, mul_1 = _i2+1, mul_1, mul_0 {
7507 if mul_0.Op != OpConst64 {
7508 continue
7509 }
7510 m := auxIntToInt64(mul_0.AuxInt)
7511 if x != mul_1 {
7512 continue
7513 }
7514 v_1_1_1 := v_1_1.Args[1]
7515 if v_1_1_1.Op != OpConst64 {
7516 continue
7517 }
7518 s := auxIntToInt64(v_1_1_1.AuxInt)
7519 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)) {
7520 continue
7521 }
7522 v.reset(OpLeq64U)
7523 v0 := b.NewValue0(v.Pos, OpRotateLeft64, typ.UInt64)
7524 v1 := b.NewValue0(v.Pos, OpMul64, typ.UInt64)
7525 v2 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7526 v2.AuxInt = int64ToAuxInt(int64(udivisible64(c).m))
7527 v1.AddArg2(v2, x)
7528 v3 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7529 v3.AuxInt = int64ToAuxInt(64 - udivisible64(c).k)
7530 v0.AddArg2(v1, v3)
7531 v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7532 v4.AuxInt = int64ToAuxInt(int64(udivisible64(c).max))
7533 v.AddArg2(v0, v4)
7534 return true
7535 }
7536 }
7537 }
7538 break
7539 }
7540
7541
7542
7543 for {
7544 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
7545 x := v_0
7546 if v_1.Op != OpMul64 {
7547 continue
7548 }
7549 _ = v_1.Args[1]
7550 v_1_0 := v_1.Args[0]
7551 v_1_1 := v_1.Args[1]
7552 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
7553 if v_1_0.Op != OpConst64 {
7554 continue
7555 }
7556 c := auxIntToInt64(v_1_0.AuxInt)
7557 if v_1_1.Op != OpSub64 {
7558 continue
7559 }
7560 _ = v_1_1.Args[1]
7561 v_1_1_0 := v_1_1.Args[0]
7562 if v_1_1_0.Op != OpRsh64x64 {
7563 continue
7564 }
7565 _ = v_1_1_0.Args[1]
7566 mul := v_1_1_0.Args[0]
7567 if mul.Op != OpHmul64 {
7568 continue
7569 }
7570 _ = mul.Args[1]
7571 mul_0 := mul.Args[0]
7572 mul_1 := mul.Args[1]
7573 for _i2 := 0; _i2 <= 1; _i2, mul_0, mul_1 = _i2+1, mul_1, mul_0 {
7574 if mul_0.Op != OpConst64 {
7575 continue
7576 }
7577 m := auxIntToInt64(mul_0.AuxInt)
7578 if x != mul_1 {
7579 continue
7580 }
7581 v_1_1_0_1 := v_1_1_0.Args[1]
7582 if v_1_1_0_1.Op != OpConst64 {
7583 continue
7584 }
7585 s := auxIntToInt64(v_1_1_0_1.AuxInt)
7586 v_1_1_1 := v_1_1.Args[1]
7587 if v_1_1_1.Op != OpRsh64x64 {
7588 continue
7589 }
7590 _ = v_1_1_1.Args[1]
7591 if x != v_1_1_1.Args[0] {
7592 continue
7593 }
7594 v_1_1_1_1 := v_1_1_1.Args[1]
7595 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)) {
7596 continue
7597 }
7598 v.reset(OpLeq64U)
7599 v0 := b.NewValue0(v.Pos, OpRotateLeft64, typ.UInt64)
7600 v1 := b.NewValue0(v.Pos, OpAdd64, typ.UInt64)
7601 v2 := b.NewValue0(v.Pos, OpMul64, typ.UInt64)
7602 v3 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7603 v3.AuxInt = int64ToAuxInt(int64(sdivisible64(c).m))
7604 v2.AddArg2(v3, x)
7605 v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7606 v4.AuxInt = int64ToAuxInt(int64(sdivisible64(c).a))
7607 v1.AddArg2(v2, v4)
7608 v5 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7609 v5.AuxInt = int64ToAuxInt(64 - sdivisible64(c).k)
7610 v0.AddArg2(v1, v5)
7611 v6 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7612 v6.AuxInt = int64ToAuxInt(int64(sdivisible64(c).max))
7613 v.AddArg2(v0, v6)
7614 return true
7615 }
7616 }
7617 }
7618 break
7619 }
7620
7621
7622
7623 for {
7624 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
7625 x := v_0
7626 if v_1.Op != OpMul64 {
7627 continue
7628 }
7629 _ = v_1.Args[1]
7630 v_1_0 := v_1.Args[0]
7631 v_1_1 := v_1.Args[1]
7632 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
7633 if v_1_0.Op != OpConst64 {
7634 continue
7635 }
7636 c := auxIntToInt64(v_1_0.AuxInt)
7637 if v_1_1.Op != OpSub64 {
7638 continue
7639 }
7640 _ = v_1_1.Args[1]
7641 v_1_1_0 := v_1_1.Args[0]
7642 if v_1_1_0.Op != OpRsh64x64 {
7643 continue
7644 }
7645 _ = v_1_1_0.Args[1]
7646 v_1_1_0_0 := v_1_1_0.Args[0]
7647 if v_1_1_0_0.Op != OpAdd64 {
7648 continue
7649 }
7650 _ = v_1_1_0_0.Args[1]
7651 v_1_1_0_0_0 := v_1_1_0_0.Args[0]
7652 v_1_1_0_0_1 := v_1_1_0_0.Args[1]
7653 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 {
7654 mul := v_1_1_0_0_0
7655 if mul.Op != OpHmul64 {
7656 continue
7657 }
7658 _ = mul.Args[1]
7659 mul_0 := mul.Args[0]
7660 mul_1 := mul.Args[1]
7661 for _i3 := 0; _i3 <= 1; _i3, mul_0, mul_1 = _i3+1, mul_1, mul_0 {
7662 if mul_0.Op != OpConst64 {
7663 continue
7664 }
7665 m := auxIntToInt64(mul_0.AuxInt)
7666 if x != mul_1 || x != v_1_1_0_0_1 {
7667 continue
7668 }
7669 v_1_1_0_1 := v_1_1_0.Args[1]
7670 if v_1_1_0_1.Op != OpConst64 {
7671 continue
7672 }
7673 s := auxIntToInt64(v_1_1_0_1.AuxInt)
7674 v_1_1_1 := v_1_1.Args[1]
7675 if v_1_1_1.Op != OpRsh64x64 {
7676 continue
7677 }
7678 _ = v_1_1_1.Args[1]
7679 if x != v_1_1_1.Args[0] {
7680 continue
7681 }
7682 v_1_1_1_1 := v_1_1_1.Args[1]
7683 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)) {
7684 continue
7685 }
7686 v.reset(OpLeq64U)
7687 v0 := b.NewValue0(v.Pos, OpRotateLeft64, typ.UInt64)
7688 v1 := b.NewValue0(v.Pos, OpAdd64, typ.UInt64)
7689 v2 := b.NewValue0(v.Pos, OpMul64, typ.UInt64)
7690 v3 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7691 v3.AuxInt = int64ToAuxInt(int64(sdivisible64(c).m))
7692 v2.AddArg2(v3, x)
7693 v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7694 v4.AuxInt = int64ToAuxInt(int64(sdivisible64(c).a))
7695 v1.AddArg2(v2, v4)
7696 v5 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7697 v5.AuxInt = int64ToAuxInt(64 - sdivisible64(c).k)
7698 v0.AddArg2(v1, v5)
7699 v6 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7700 v6.AuxInt = int64ToAuxInt(int64(sdivisible64(c).max))
7701 v.AddArg2(v0, v6)
7702 return true
7703 }
7704 }
7705 }
7706 }
7707 break
7708 }
7709
7710
7711
7712 for {
7713 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
7714 n := v_0
7715 if v_1.Op != OpLsh64x64 {
7716 continue
7717 }
7718 _ = v_1.Args[1]
7719 v_1_0 := v_1.Args[0]
7720 if v_1_0.Op != OpRsh64x64 {
7721 continue
7722 }
7723 _ = v_1_0.Args[1]
7724 v_1_0_0 := v_1_0.Args[0]
7725 if v_1_0_0.Op != OpAdd64 {
7726 continue
7727 }
7728 t := v_1_0_0.Type
7729 _ = v_1_0_0.Args[1]
7730 v_1_0_0_0 := v_1_0_0.Args[0]
7731 v_1_0_0_1 := v_1_0_0.Args[1]
7732 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 {
7733 if n != v_1_0_0_0 || v_1_0_0_1.Op != OpRsh64Ux64 || v_1_0_0_1.Type != t {
7734 continue
7735 }
7736 _ = v_1_0_0_1.Args[1]
7737 v_1_0_0_1_0 := v_1_0_0_1.Args[0]
7738 if v_1_0_0_1_0.Op != OpRsh64x64 || v_1_0_0_1_0.Type != t {
7739 continue
7740 }
7741 _ = v_1_0_0_1_0.Args[1]
7742 if n != v_1_0_0_1_0.Args[0] {
7743 continue
7744 }
7745 v_1_0_0_1_0_1 := v_1_0_0_1_0.Args[1]
7746 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 {
7747 continue
7748 }
7749 v_1_0_0_1_1 := v_1_0_0_1.Args[1]
7750 if v_1_0_0_1_1.Op != OpConst64 || v_1_0_0_1_1.Type != typ.UInt64 {
7751 continue
7752 }
7753 kbar := auxIntToInt64(v_1_0_0_1_1.AuxInt)
7754 v_1_0_1 := v_1_0.Args[1]
7755 if v_1_0_1.Op != OpConst64 || v_1_0_1.Type != typ.UInt64 {
7756 continue
7757 }
7758 k := auxIntToInt64(v_1_0_1.AuxInt)
7759 v_1_1 := v_1.Args[1]
7760 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) {
7761 continue
7762 }
7763 v.reset(OpEq64)
7764 v0 := b.NewValue0(v.Pos, OpAnd64, t)
7765 v1 := b.NewValue0(v.Pos, OpConst64, t)
7766 v1.AuxInt = int64ToAuxInt(1<<uint(k) - 1)
7767 v0.AddArg2(n, v1)
7768 v2 := b.NewValue0(v.Pos, OpConst64, t)
7769 v2.AuxInt = int64ToAuxInt(0)
7770 v.AddArg2(v0, v2)
7771 return true
7772 }
7773 }
7774 break
7775 }
7776
7777
7778
7779 for {
7780 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
7781 s := v_0
7782 if s.Op != OpSub64 {
7783 continue
7784 }
7785 y := s.Args[1]
7786 x := s.Args[0]
7787 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 0 || !(s.Uses == 1) {
7788 continue
7789 }
7790 v.reset(OpEq64)
7791 v.AddArg2(x, y)
7792 return true
7793 }
7794 break
7795 }
7796
7797
7798
7799 for {
7800 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
7801 if v_0.Op != OpAnd64 {
7802 continue
7803 }
7804 t := v_0.Type
7805 _ = v_0.Args[1]
7806 v_0_0 := v_0.Args[0]
7807 v_0_1 := v_0.Args[1]
7808 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
7809 x := v_0_0
7810 if v_0_1.Op != OpConst64 || v_0_1.Type != t {
7811 continue
7812 }
7813 y := auxIntToInt64(v_0_1.AuxInt)
7814 if v_1.Op != OpConst64 || v_1.Type != t || auxIntToInt64(v_1.AuxInt) != y || !(oneBit64(y)) {
7815 continue
7816 }
7817 v.reset(OpNeq64)
7818 v0 := b.NewValue0(v.Pos, OpAnd64, t)
7819 v1 := b.NewValue0(v.Pos, OpConst64, t)
7820 v1.AuxInt = int64ToAuxInt(y)
7821 v0.AddArg2(x, v1)
7822 v2 := b.NewValue0(v.Pos, OpConst64, t)
7823 v2.AuxInt = int64ToAuxInt(0)
7824 v.AddArg2(v0, v2)
7825 return true
7826 }
7827 }
7828 break
7829 }
7830 return false
7831 }
7832 func rewriteValuegeneric_OpEq64F(v *Value) bool {
7833 v_1 := v.Args[1]
7834 v_0 := v.Args[0]
7835
7836
7837 for {
7838 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
7839 if v_0.Op != OpConst64F {
7840 continue
7841 }
7842 c := auxIntToFloat64(v_0.AuxInt)
7843 if v_1.Op != OpConst64F {
7844 continue
7845 }
7846 d := auxIntToFloat64(v_1.AuxInt)
7847 v.reset(OpConstBool)
7848 v.AuxInt = boolToAuxInt(c == d)
7849 return true
7850 }
7851 break
7852 }
7853 return false
7854 }
7855 func rewriteValuegeneric_OpEq8(v *Value) bool {
7856 v_1 := v.Args[1]
7857 v_0 := v.Args[0]
7858 b := v.Block
7859 config := b.Func.Config
7860 typ := &b.Func.Config.Types
7861
7862
7863 for {
7864 x := v_0
7865 if x != v_1 {
7866 break
7867 }
7868 v.reset(OpConstBool)
7869 v.AuxInt = boolToAuxInt(true)
7870 return true
7871 }
7872
7873
7874 for {
7875 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
7876 if v_0.Op != OpConst8 {
7877 continue
7878 }
7879 t := v_0.Type
7880 c := auxIntToInt8(v_0.AuxInt)
7881 if v_1.Op != OpAdd8 {
7882 continue
7883 }
7884 _ = v_1.Args[1]
7885 v_1_0 := v_1.Args[0]
7886 v_1_1 := v_1.Args[1]
7887 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
7888 if v_1_0.Op != OpConst8 || v_1_0.Type != t {
7889 continue
7890 }
7891 d := auxIntToInt8(v_1_0.AuxInt)
7892 x := v_1_1
7893 v.reset(OpEq8)
7894 v0 := b.NewValue0(v.Pos, OpConst8, t)
7895 v0.AuxInt = int8ToAuxInt(c - d)
7896 v.AddArg2(v0, x)
7897 return true
7898 }
7899 }
7900 break
7901 }
7902
7903
7904 for {
7905 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
7906 if v_0.Op != OpConst8 {
7907 continue
7908 }
7909 c := auxIntToInt8(v_0.AuxInt)
7910 if v_1.Op != OpConst8 {
7911 continue
7912 }
7913 d := auxIntToInt8(v_1.AuxInt)
7914 v.reset(OpConstBool)
7915 v.AuxInt = boolToAuxInt(c == d)
7916 return true
7917 }
7918 break
7919 }
7920
7921
7922
7923 for {
7924 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
7925 if v_0.Op != OpMod8u {
7926 continue
7927 }
7928 _ = v_0.Args[1]
7929 x := v_0.Args[0]
7930 v_0_1 := v_0.Args[1]
7931 if v_0_1.Op != OpConst8 {
7932 continue
7933 }
7934 c := auxIntToInt8(v_0_1.AuxInt)
7935 if v_1.Op != OpConst8 || auxIntToInt8(v_1.AuxInt) != 0 || !(x.Op != OpConst8 && udivisibleOK8(c) && !hasSmallRotate(config)) {
7936 continue
7937 }
7938 v.reset(OpEq32)
7939 v0 := b.NewValue0(v.Pos, OpMod32u, typ.UInt32)
7940 v1 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
7941 v1.AddArg(x)
7942 v2 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
7943 v2.AuxInt = int32ToAuxInt(int32(uint8(c)))
7944 v0.AddArg2(v1, v2)
7945 v3 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
7946 v3.AuxInt = int32ToAuxInt(0)
7947 v.AddArg2(v0, v3)
7948 return true
7949 }
7950 break
7951 }
7952
7953
7954
7955 for {
7956 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
7957 if v_0.Op != OpMod8 {
7958 continue
7959 }
7960 _ = v_0.Args[1]
7961 x := v_0.Args[0]
7962 v_0_1 := v_0.Args[1]
7963 if v_0_1.Op != OpConst8 {
7964 continue
7965 }
7966 c := auxIntToInt8(v_0_1.AuxInt)
7967 if v_1.Op != OpConst8 || auxIntToInt8(v_1.AuxInt) != 0 || !(x.Op != OpConst8 && sdivisibleOK8(c) && !hasSmallRotate(config)) {
7968 continue
7969 }
7970 v.reset(OpEq32)
7971 v0 := b.NewValue0(v.Pos, OpMod32, typ.Int32)
7972 v1 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
7973 v1.AddArg(x)
7974 v2 := b.NewValue0(v.Pos, OpConst32, typ.Int32)
7975 v2.AuxInt = int32ToAuxInt(int32(c))
7976 v0.AddArg2(v1, v2)
7977 v3 := b.NewValue0(v.Pos, OpConst32, typ.Int32)
7978 v3.AuxInt = int32ToAuxInt(0)
7979 v.AddArg2(v0, v3)
7980 return true
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 != OpMul8 {
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 != OpConst8 {
7998 continue
7999 }
8000 c := auxIntToInt8(v_1_0.AuxInt)
8001 if v_1_1.Op != OpTrunc32to8 {
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 != OpZeroExt8to32 || x != mul_1.Args[0] {
8022 continue
8023 }
8024 v_1_1_0_1 := v_1_1_0.Args[1]
8025 if v_1_1_0_1.Op != OpConst64 {
8026 continue
8027 }
8028 s := auxIntToInt64(v_1_1_0_1.AuxInt)
8029 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)) {
8030 continue
8031 }
8032 v.reset(OpLeq8U)
8033 v0 := b.NewValue0(v.Pos, OpRotateLeft8, typ.UInt8)
8034 v1 := b.NewValue0(v.Pos, OpMul8, typ.UInt8)
8035 v2 := b.NewValue0(v.Pos, OpConst8, typ.UInt8)
8036 v2.AuxInt = int8ToAuxInt(int8(udivisible8(c).m))
8037 v1.AddArg2(v2, x)
8038 v3 := b.NewValue0(v.Pos, OpConst8, typ.UInt8)
8039 v3.AuxInt = int8ToAuxInt(int8(8 - udivisible8(c).k))
8040 v0.AddArg2(v1, v3)
8041 v4 := b.NewValue0(v.Pos, OpConst8, typ.UInt8)
8042 v4.AuxInt = int8ToAuxInt(int8(udivisible8(c).max))
8043 v.AddArg2(v0, v4)
8044 return true
8045 }
8046 }
8047 }
8048 break
8049 }
8050
8051
8052
8053 for {
8054 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
8055 x := v_0
8056 if v_1.Op != OpMul8 {
8057 continue
8058 }
8059 _ = v_1.Args[1]
8060 v_1_0 := v_1.Args[0]
8061 v_1_1 := v_1.Args[1]
8062 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
8063 if v_1_0.Op != OpConst8 {
8064 continue
8065 }
8066 c := auxIntToInt8(v_1_0.AuxInt)
8067 if v_1_1.Op != OpSub8 {
8068 continue
8069 }
8070 _ = v_1_1.Args[1]
8071 v_1_1_0 := v_1_1.Args[0]
8072 if v_1_1_0.Op != OpRsh32x64 {
8073 continue
8074 }
8075 _ = v_1_1_0.Args[1]
8076 mul := v_1_1_0.Args[0]
8077 if mul.Op != OpMul32 {
8078 continue
8079 }
8080 _ = mul.Args[1]
8081 mul_0 := mul.Args[0]
8082 mul_1 := mul.Args[1]
8083 for _i2 := 0; _i2 <= 1; _i2, mul_0, mul_1 = _i2+1, mul_1, mul_0 {
8084 if mul_0.Op != OpConst32 {
8085 continue
8086 }
8087 m := auxIntToInt32(mul_0.AuxInt)
8088 if mul_1.Op != OpSignExt8to32 || x != mul_1.Args[0] {
8089 continue
8090 }
8091 v_1_1_0_1 := v_1_1_0.Args[1]
8092 if v_1_1_0_1.Op != OpConst64 {
8093 continue
8094 }
8095 s := auxIntToInt64(v_1_1_0_1.AuxInt)
8096 v_1_1_1 := v_1_1.Args[1]
8097 if v_1_1_1.Op != OpRsh32x64 {
8098 continue
8099 }
8100 _ = v_1_1_1.Args[1]
8101 v_1_1_1_0 := v_1_1_1.Args[0]
8102 if v_1_1_1_0.Op != OpSignExt8to32 || x != v_1_1_1_0.Args[0] {
8103 continue
8104 }
8105 v_1_1_1_1 := v_1_1_1.Args[1]
8106 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)) {
8107 continue
8108 }
8109 v.reset(OpLeq8U)
8110 v0 := b.NewValue0(v.Pos, OpRotateLeft8, typ.UInt8)
8111 v1 := b.NewValue0(v.Pos, OpAdd8, typ.UInt8)
8112 v2 := b.NewValue0(v.Pos, OpMul8, typ.UInt8)
8113 v3 := b.NewValue0(v.Pos, OpConst8, typ.UInt8)
8114 v3.AuxInt = int8ToAuxInt(int8(sdivisible8(c).m))
8115 v2.AddArg2(v3, x)
8116 v4 := b.NewValue0(v.Pos, OpConst8, typ.UInt8)
8117 v4.AuxInt = int8ToAuxInt(int8(sdivisible8(c).a))
8118 v1.AddArg2(v2, v4)
8119 v5 := b.NewValue0(v.Pos, OpConst8, typ.UInt8)
8120 v5.AuxInt = int8ToAuxInt(int8(8 - sdivisible8(c).k))
8121 v0.AddArg2(v1, v5)
8122 v6 := b.NewValue0(v.Pos, OpConst8, typ.UInt8)
8123 v6.AuxInt = int8ToAuxInt(int8(sdivisible8(c).max))
8124 v.AddArg2(v0, v6)
8125 return true
8126 }
8127 }
8128 }
8129 break
8130 }
8131
8132
8133
8134 for {
8135 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
8136 n := v_0
8137 if v_1.Op != OpLsh8x64 {
8138 continue
8139 }
8140 _ = v_1.Args[1]
8141 v_1_0 := v_1.Args[0]
8142 if v_1_0.Op != OpRsh8x64 {
8143 continue
8144 }
8145 _ = v_1_0.Args[1]
8146 v_1_0_0 := v_1_0.Args[0]
8147 if v_1_0_0.Op != OpAdd8 {
8148 continue
8149 }
8150 t := v_1_0_0.Type
8151 _ = v_1_0_0.Args[1]
8152 v_1_0_0_0 := v_1_0_0.Args[0]
8153 v_1_0_0_1 := v_1_0_0.Args[1]
8154 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 {
8155 if n != v_1_0_0_0 || v_1_0_0_1.Op != OpRsh8Ux64 || v_1_0_0_1.Type != t {
8156 continue
8157 }
8158 _ = v_1_0_0_1.Args[1]
8159 v_1_0_0_1_0 := v_1_0_0_1.Args[0]
8160 if v_1_0_0_1_0.Op != OpRsh8x64 || v_1_0_0_1_0.Type != t {
8161 continue
8162 }
8163 _ = v_1_0_0_1_0.Args[1]
8164 if n != v_1_0_0_1_0.Args[0] {
8165 continue
8166 }
8167 v_1_0_0_1_0_1 := v_1_0_0_1_0.Args[1]
8168 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 {
8169 continue
8170 }
8171 v_1_0_0_1_1 := v_1_0_0_1.Args[1]
8172 if v_1_0_0_1_1.Op != OpConst64 || v_1_0_0_1_1.Type != typ.UInt64 {
8173 continue
8174 }
8175 kbar := auxIntToInt64(v_1_0_0_1_1.AuxInt)
8176 v_1_0_1 := v_1_0.Args[1]
8177 if v_1_0_1.Op != OpConst64 || v_1_0_1.Type != typ.UInt64 {
8178 continue
8179 }
8180 k := auxIntToInt64(v_1_0_1.AuxInt)
8181 v_1_1 := v_1.Args[1]
8182 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) {
8183 continue
8184 }
8185 v.reset(OpEq8)
8186 v0 := b.NewValue0(v.Pos, OpAnd8, t)
8187 v1 := b.NewValue0(v.Pos, OpConst8, t)
8188 v1.AuxInt = int8ToAuxInt(1<<uint(k) - 1)
8189 v0.AddArg2(n, v1)
8190 v2 := b.NewValue0(v.Pos, OpConst8, t)
8191 v2.AuxInt = int8ToAuxInt(0)
8192 v.AddArg2(v0, v2)
8193 return true
8194 }
8195 }
8196 break
8197 }
8198
8199
8200
8201 for {
8202 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
8203 s := v_0
8204 if s.Op != OpSub8 {
8205 continue
8206 }
8207 y := s.Args[1]
8208 x := s.Args[0]
8209 if v_1.Op != OpConst8 || auxIntToInt8(v_1.AuxInt) != 0 || !(s.Uses == 1) {
8210 continue
8211 }
8212 v.reset(OpEq8)
8213 v.AddArg2(x, y)
8214 return true
8215 }
8216 break
8217 }
8218
8219
8220
8221 for {
8222 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
8223 if v_0.Op != OpAnd8 {
8224 continue
8225 }
8226 t := v_0.Type
8227 _ = v_0.Args[1]
8228 v_0_0 := v_0.Args[0]
8229 v_0_1 := v_0.Args[1]
8230 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
8231 x := v_0_0
8232 if v_0_1.Op != OpConst8 || v_0_1.Type != t {
8233 continue
8234 }
8235 y := auxIntToInt8(v_0_1.AuxInt)
8236 if v_1.Op != OpConst8 || v_1.Type != t || auxIntToInt8(v_1.AuxInt) != y || !(oneBit8(y)) {
8237 continue
8238 }
8239 v.reset(OpNeq8)
8240 v0 := b.NewValue0(v.Pos, OpAnd8, t)
8241 v1 := b.NewValue0(v.Pos, OpConst8, t)
8242 v1.AuxInt = int8ToAuxInt(y)
8243 v0.AddArg2(x, v1)
8244 v2 := b.NewValue0(v.Pos, OpConst8, t)
8245 v2.AuxInt = int8ToAuxInt(0)
8246 v.AddArg2(v0, v2)
8247 return true
8248 }
8249 }
8250 break
8251 }
8252 return false
8253 }
8254 func rewriteValuegeneric_OpEqB(v *Value) bool {
8255 v_1 := v.Args[1]
8256 v_0 := v.Args[0]
8257
8258
8259 for {
8260 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
8261 if v_0.Op != OpConstBool {
8262 continue
8263 }
8264 c := auxIntToBool(v_0.AuxInt)
8265 if v_1.Op != OpConstBool {
8266 continue
8267 }
8268 d := auxIntToBool(v_1.AuxInt)
8269 v.reset(OpConstBool)
8270 v.AuxInt = boolToAuxInt(c == d)
8271 return true
8272 }
8273 break
8274 }
8275
8276
8277 for {
8278 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
8279 if v_0.Op != OpConstBool || auxIntToBool(v_0.AuxInt) != false {
8280 continue
8281 }
8282 x := v_1
8283 v.reset(OpNot)
8284 v.AddArg(x)
8285 return true
8286 }
8287 break
8288 }
8289
8290
8291 for {
8292 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
8293 if v_0.Op != OpConstBool || auxIntToBool(v_0.AuxInt) != true {
8294 continue
8295 }
8296 x := v_1
8297 v.copyOf(x)
8298 return true
8299 }
8300 break
8301 }
8302 return false
8303 }
8304 func rewriteValuegeneric_OpEqInter(v *Value) bool {
8305 v_1 := v.Args[1]
8306 v_0 := v.Args[0]
8307 b := v.Block
8308 typ := &b.Func.Config.Types
8309
8310
8311 for {
8312 x := v_0
8313 y := v_1
8314 v.reset(OpEqPtr)
8315 v0 := b.NewValue0(v.Pos, OpITab, typ.Uintptr)
8316 v0.AddArg(x)
8317 v1 := b.NewValue0(v.Pos, OpITab, typ.Uintptr)
8318 v1.AddArg(y)
8319 v.AddArg2(v0, v1)
8320 return true
8321 }
8322 }
8323 func rewriteValuegeneric_OpEqPtr(v *Value) bool {
8324 v_1 := v.Args[1]
8325 v_0 := v.Args[0]
8326 b := v.Block
8327 typ := &b.Func.Config.Types
8328
8329
8330 for {
8331 x := v_0
8332 if x != v_1 {
8333 break
8334 }
8335 v.reset(OpConstBool)
8336 v.AuxInt = boolToAuxInt(true)
8337 return true
8338 }
8339
8340
8341 for {
8342 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
8343 if v_0.Op != OpAddr {
8344 continue
8345 }
8346 x := auxToSym(v_0.Aux)
8347 if v_1.Op != OpAddr {
8348 continue
8349 }
8350 y := auxToSym(v_1.Aux)
8351 v.reset(OpConstBool)
8352 v.AuxInt = boolToAuxInt(x == y)
8353 return true
8354 }
8355 break
8356 }
8357
8358
8359 for {
8360 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
8361 if v_0.Op != OpAddr {
8362 continue
8363 }
8364 x := auxToSym(v_0.Aux)
8365 if v_1.Op != OpOffPtr {
8366 continue
8367 }
8368 o := auxIntToInt64(v_1.AuxInt)
8369 v_1_0 := v_1.Args[0]
8370 if v_1_0.Op != OpAddr {
8371 continue
8372 }
8373 y := auxToSym(v_1_0.Aux)
8374 v.reset(OpConstBool)
8375 v.AuxInt = boolToAuxInt(x == y && o == 0)
8376 return true
8377 }
8378 break
8379 }
8380
8381
8382 for {
8383 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
8384 if v_0.Op != OpOffPtr {
8385 continue
8386 }
8387 o1 := auxIntToInt64(v_0.AuxInt)
8388 v_0_0 := v_0.Args[0]
8389 if v_0_0.Op != OpAddr {
8390 continue
8391 }
8392 x := auxToSym(v_0_0.Aux)
8393 if v_1.Op != OpOffPtr {
8394 continue
8395 }
8396 o2 := auxIntToInt64(v_1.AuxInt)
8397 v_1_0 := v_1.Args[0]
8398 if v_1_0.Op != OpAddr {
8399 continue
8400 }
8401 y := auxToSym(v_1_0.Aux)
8402 v.reset(OpConstBool)
8403 v.AuxInt = boolToAuxInt(x == y && o1 == o2)
8404 return true
8405 }
8406 break
8407 }
8408
8409
8410 for {
8411 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
8412 if v_0.Op != OpLocalAddr {
8413 continue
8414 }
8415 x := auxToSym(v_0.Aux)
8416 if v_1.Op != OpLocalAddr {
8417 continue
8418 }
8419 y := auxToSym(v_1.Aux)
8420 v.reset(OpConstBool)
8421 v.AuxInt = boolToAuxInt(x == y)
8422 return true
8423 }
8424 break
8425 }
8426
8427
8428 for {
8429 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
8430 if v_0.Op != OpLocalAddr {
8431 continue
8432 }
8433 x := auxToSym(v_0.Aux)
8434 if v_1.Op != OpOffPtr {
8435 continue
8436 }
8437 o := auxIntToInt64(v_1.AuxInt)
8438 v_1_0 := v_1.Args[0]
8439 if v_1_0.Op != OpLocalAddr {
8440 continue
8441 }
8442 y := auxToSym(v_1_0.Aux)
8443 v.reset(OpConstBool)
8444 v.AuxInt = boolToAuxInt(x == y && o == 0)
8445 return true
8446 }
8447 break
8448 }
8449
8450
8451 for {
8452 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
8453 if v_0.Op != OpOffPtr {
8454 continue
8455 }
8456 o1 := auxIntToInt64(v_0.AuxInt)
8457 v_0_0 := v_0.Args[0]
8458 if v_0_0.Op != OpLocalAddr {
8459 continue
8460 }
8461 x := auxToSym(v_0_0.Aux)
8462 if v_1.Op != OpOffPtr {
8463 continue
8464 }
8465 o2 := auxIntToInt64(v_1.AuxInt)
8466 v_1_0 := v_1.Args[0]
8467 if v_1_0.Op != OpLocalAddr {
8468 continue
8469 }
8470 y := auxToSym(v_1_0.Aux)
8471 v.reset(OpConstBool)
8472 v.AuxInt = boolToAuxInt(x == y && o1 == o2)
8473 return true
8474 }
8475 break
8476 }
8477
8478
8479
8480 for {
8481 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
8482 if v_0.Op != OpOffPtr {
8483 continue
8484 }
8485 o1 := auxIntToInt64(v_0.AuxInt)
8486 p1 := v_0.Args[0]
8487 p2 := v_1
8488 if !(isSamePtr(p1, p2)) {
8489 continue
8490 }
8491 v.reset(OpConstBool)
8492 v.AuxInt = boolToAuxInt(o1 == 0)
8493 return true
8494 }
8495 break
8496 }
8497
8498
8499
8500 for {
8501 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
8502 if v_0.Op != OpOffPtr {
8503 continue
8504 }
8505 o1 := auxIntToInt64(v_0.AuxInt)
8506 p1 := v_0.Args[0]
8507 if v_1.Op != OpOffPtr {
8508 continue
8509 }
8510 o2 := auxIntToInt64(v_1.AuxInt)
8511 p2 := v_1.Args[0]
8512 if !(isSamePtr(p1, p2)) {
8513 continue
8514 }
8515 v.reset(OpConstBool)
8516 v.AuxInt = boolToAuxInt(o1 == o2)
8517 return true
8518 }
8519 break
8520 }
8521
8522
8523 for {
8524 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
8525 if v_0.Op != OpConst32 {
8526 continue
8527 }
8528 c := auxIntToInt32(v_0.AuxInt)
8529 if v_1.Op != OpConst32 {
8530 continue
8531 }
8532 d := auxIntToInt32(v_1.AuxInt)
8533 v.reset(OpConstBool)
8534 v.AuxInt = boolToAuxInt(c == d)
8535 return true
8536 }
8537 break
8538 }
8539
8540
8541 for {
8542 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
8543 if v_0.Op != OpConst64 {
8544 continue
8545 }
8546 c := auxIntToInt64(v_0.AuxInt)
8547 if v_1.Op != OpConst64 {
8548 continue
8549 }
8550 d := auxIntToInt64(v_1.AuxInt)
8551 v.reset(OpConstBool)
8552 v.AuxInt = boolToAuxInt(c == d)
8553 return true
8554 }
8555 break
8556 }
8557
8558
8559 for {
8560 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
8561 if v_0.Op != OpLocalAddr || v_1.Op != OpAddr {
8562 continue
8563 }
8564 v.reset(OpConstBool)
8565 v.AuxInt = boolToAuxInt(false)
8566 return true
8567 }
8568 break
8569 }
8570
8571
8572 for {
8573 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
8574 if v_0.Op != OpOffPtr {
8575 continue
8576 }
8577 v_0_0 := v_0.Args[0]
8578 if v_0_0.Op != OpLocalAddr || v_1.Op != OpAddr {
8579 continue
8580 }
8581 v.reset(OpConstBool)
8582 v.AuxInt = boolToAuxInt(false)
8583 return true
8584 }
8585 break
8586 }
8587
8588
8589 for {
8590 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
8591 if v_0.Op != OpLocalAddr || v_1.Op != OpOffPtr {
8592 continue
8593 }
8594 v_1_0 := v_1.Args[0]
8595 if v_1_0.Op != OpAddr {
8596 continue
8597 }
8598 v.reset(OpConstBool)
8599 v.AuxInt = boolToAuxInt(false)
8600 return true
8601 }
8602 break
8603 }
8604
8605
8606 for {
8607 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
8608 if v_0.Op != OpOffPtr {
8609 continue
8610 }
8611 v_0_0 := v_0.Args[0]
8612 if v_0_0.Op != OpLocalAddr || v_1.Op != OpOffPtr {
8613 continue
8614 }
8615 v_1_0 := v_1.Args[0]
8616 if v_1_0.Op != OpAddr {
8617 continue
8618 }
8619 v.reset(OpConstBool)
8620 v.AuxInt = boolToAuxInt(false)
8621 return true
8622 }
8623 break
8624 }
8625
8626
8627
8628 for {
8629 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
8630 if v_0.Op != OpAddPtr {
8631 continue
8632 }
8633 o1 := v_0.Args[1]
8634 p1 := v_0.Args[0]
8635 p2 := v_1
8636 if !(isSamePtr(p1, p2)) {
8637 continue
8638 }
8639 v.reset(OpNot)
8640 v0 := b.NewValue0(v.Pos, OpIsNonNil, typ.Bool)
8641 v0.AddArg(o1)
8642 v.AddArg(v0)
8643 return true
8644 }
8645 break
8646 }
8647
8648
8649 for {
8650 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
8651 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
8652 continue
8653 }
8654 p := v_1
8655 v.reset(OpNot)
8656 v0 := b.NewValue0(v.Pos, OpIsNonNil, typ.Bool)
8657 v0.AddArg(p)
8658 v.AddArg(v0)
8659 return true
8660 }
8661 break
8662 }
8663
8664
8665 for {
8666 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
8667 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
8668 continue
8669 }
8670 p := v_1
8671 v.reset(OpNot)
8672 v0 := b.NewValue0(v.Pos, OpIsNonNil, typ.Bool)
8673 v0.AddArg(p)
8674 v.AddArg(v0)
8675 return true
8676 }
8677 break
8678 }
8679
8680
8681 for {
8682 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
8683 if v_0.Op != OpConstNil {
8684 continue
8685 }
8686 p := v_1
8687 v.reset(OpNot)
8688 v0 := b.NewValue0(v.Pos, OpIsNonNil, typ.Bool)
8689 v0.AddArg(p)
8690 v.AddArg(v0)
8691 return true
8692 }
8693 break
8694 }
8695 return false
8696 }
8697 func rewriteValuegeneric_OpEqSlice(v *Value) bool {
8698 v_1 := v.Args[1]
8699 v_0 := v.Args[0]
8700 b := v.Block
8701 typ := &b.Func.Config.Types
8702
8703
8704 for {
8705 x := v_0
8706 y := v_1
8707 v.reset(OpEqPtr)
8708 v0 := b.NewValue0(v.Pos, OpSlicePtr, typ.BytePtr)
8709 v0.AddArg(x)
8710 v1 := b.NewValue0(v.Pos, OpSlicePtr, typ.BytePtr)
8711 v1.AddArg(y)
8712 v.AddArg2(v0, v1)
8713 return true
8714 }
8715 }
8716 func rewriteValuegeneric_OpIMake(v *Value) bool {
8717 v_1 := v.Args[1]
8718 v_0 := v.Args[0]
8719
8720
8721 for {
8722 _typ := v_0
8723 if v_1.Op != OpStructMake1 {
8724 break
8725 }
8726 val := v_1.Args[0]
8727 v.reset(OpIMake)
8728 v.AddArg2(_typ, val)
8729 return true
8730 }
8731
8732
8733 for {
8734 _typ := v_0
8735 if v_1.Op != OpArrayMake1 {
8736 break
8737 }
8738 val := v_1.Args[0]
8739 v.reset(OpIMake)
8740 v.AddArg2(_typ, val)
8741 return true
8742 }
8743 return false
8744 }
8745 func rewriteValuegeneric_OpInterLECall(v *Value) bool {
8746
8747
8748
8749 for {
8750 if len(v.Args) < 1 {
8751 break
8752 }
8753 auxCall := auxToCall(v.Aux)
8754 v_0 := v.Args[0]
8755 if v_0.Op != OpLoad {
8756 break
8757 }
8758 v_0_0 := v_0.Args[0]
8759 if v_0_0.Op != OpOffPtr {
8760 break
8761 }
8762 off := auxIntToInt64(v_0_0.AuxInt)
8763 v_0_0_0 := v_0_0.Args[0]
8764 if v_0_0_0.Op != OpITab {
8765 break
8766 }
8767 v_0_0_0_0 := v_0_0_0.Args[0]
8768 if v_0_0_0_0.Op != OpIMake {
8769 break
8770 }
8771 v_0_0_0_0_0 := v_0_0_0_0.Args[0]
8772 if v_0_0_0_0_0.Op != OpAddr {
8773 break
8774 }
8775 itab := auxToSym(v_0_0_0_0_0.Aux)
8776 v_0_0_0_0_0_0 := v_0_0_0_0_0.Args[0]
8777 if v_0_0_0_0_0_0.Op != OpSB || !(devirtLESym(v, auxCall, itab, off) != nil) {
8778 break
8779 }
8780 v.copyOf(devirtLECall(v, devirtLESym(v, auxCall, itab, off)))
8781 return true
8782 }
8783 return false
8784 }
8785 func rewriteValuegeneric_OpIsInBounds(v *Value) bool {
8786 v_1 := v.Args[1]
8787 v_0 := v.Args[0]
8788
8789
8790
8791 for {
8792 if v_0.Op != OpZeroExt8to32 || v_1.Op != OpConst32 {
8793 break
8794 }
8795 c := auxIntToInt32(v_1.AuxInt)
8796 if !((1 << 8) <= c) {
8797 break
8798 }
8799 v.reset(OpConstBool)
8800 v.AuxInt = boolToAuxInt(true)
8801 return true
8802 }
8803
8804
8805
8806 for {
8807 if v_0.Op != OpZeroExt8to64 || v_1.Op != OpConst64 {
8808 break
8809 }
8810 c := auxIntToInt64(v_1.AuxInt)
8811 if !((1 << 8) <= c) {
8812 break
8813 }
8814 v.reset(OpConstBool)
8815 v.AuxInt = boolToAuxInt(true)
8816 return true
8817 }
8818
8819
8820
8821 for {
8822 if v_0.Op != OpZeroExt16to32 || v_1.Op != OpConst32 {
8823 break
8824 }
8825 c := auxIntToInt32(v_1.AuxInt)
8826 if !((1 << 16) <= c) {
8827 break
8828 }
8829 v.reset(OpConstBool)
8830 v.AuxInt = boolToAuxInt(true)
8831 return true
8832 }
8833
8834
8835
8836 for {
8837 if v_0.Op != OpZeroExt16to64 || v_1.Op != OpConst64 {
8838 break
8839 }
8840 c := auxIntToInt64(v_1.AuxInt)
8841 if !((1 << 16) <= c) {
8842 break
8843 }
8844 v.reset(OpConstBool)
8845 v.AuxInt = boolToAuxInt(true)
8846 return true
8847 }
8848
8849
8850 for {
8851 x := v_0
8852 if x != v_1 {
8853 break
8854 }
8855 v.reset(OpConstBool)
8856 v.AuxInt = boolToAuxInt(false)
8857 return true
8858 }
8859
8860
8861
8862 for {
8863 if v_0.Op != OpAnd8 {
8864 break
8865 }
8866 v_0_0 := v_0.Args[0]
8867 v_0_1 := v_0.Args[1]
8868 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
8869 if v_0_0.Op != OpConst8 {
8870 continue
8871 }
8872 c := auxIntToInt8(v_0_0.AuxInt)
8873 if v_1.Op != OpConst8 {
8874 continue
8875 }
8876 d := auxIntToInt8(v_1.AuxInt)
8877 if !(0 <= c && c < d) {
8878 continue
8879 }
8880 v.reset(OpConstBool)
8881 v.AuxInt = boolToAuxInt(true)
8882 return true
8883 }
8884 break
8885 }
8886
8887
8888
8889 for {
8890 if v_0.Op != OpZeroExt8to16 {
8891 break
8892 }
8893 v_0_0 := v_0.Args[0]
8894 if v_0_0.Op != OpAnd8 {
8895 break
8896 }
8897 v_0_0_0 := v_0_0.Args[0]
8898 v_0_0_1 := v_0_0.Args[1]
8899 for _i0 := 0; _i0 <= 1; _i0, v_0_0_0, v_0_0_1 = _i0+1, v_0_0_1, v_0_0_0 {
8900 if v_0_0_0.Op != OpConst8 {
8901 continue
8902 }
8903 c := auxIntToInt8(v_0_0_0.AuxInt)
8904 if v_1.Op != OpConst16 {
8905 continue
8906 }
8907 d := auxIntToInt16(v_1.AuxInt)
8908 if !(0 <= c && int16(c) < d) {
8909 continue
8910 }
8911 v.reset(OpConstBool)
8912 v.AuxInt = boolToAuxInt(true)
8913 return true
8914 }
8915 break
8916 }
8917
8918
8919
8920 for {
8921 if v_0.Op != OpZeroExt8to32 {
8922 break
8923 }
8924 v_0_0 := v_0.Args[0]
8925 if v_0_0.Op != OpAnd8 {
8926 break
8927 }
8928 v_0_0_0 := v_0_0.Args[0]
8929 v_0_0_1 := v_0_0.Args[1]
8930 for _i0 := 0; _i0 <= 1; _i0, v_0_0_0, v_0_0_1 = _i0+1, v_0_0_1, v_0_0_0 {
8931 if v_0_0_0.Op != OpConst8 {
8932 continue
8933 }
8934 c := auxIntToInt8(v_0_0_0.AuxInt)
8935 if v_1.Op != OpConst32 {
8936 continue
8937 }
8938 d := auxIntToInt32(v_1.AuxInt)
8939 if !(0 <= c && int32(c) < d) {
8940 continue
8941 }
8942 v.reset(OpConstBool)
8943 v.AuxInt = boolToAuxInt(true)
8944 return true
8945 }
8946 break
8947 }
8948
8949
8950
8951 for {
8952 if v_0.Op != OpZeroExt8to64 {
8953 break
8954 }
8955 v_0_0 := v_0.Args[0]
8956 if v_0_0.Op != OpAnd8 {
8957 break
8958 }
8959 v_0_0_0 := v_0_0.Args[0]
8960 v_0_0_1 := v_0_0.Args[1]
8961 for _i0 := 0; _i0 <= 1; _i0, v_0_0_0, v_0_0_1 = _i0+1, v_0_0_1, v_0_0_0 {
8962 if v_0_0_0.Op != OpConst8 {
8963 continue
8964 }
8965 c := auxIntToInt8(v_0_0_0.AuxInt)
8966 if v_1.Op != OpConst64 {
8967 continue
8968 }
8969 d := auxIntToInt64(v_1.AuxInt)
8970 if !(0 <= c && int64(c) < d) {
8971 continue
8972 }
8973 v.reset(OpConstBool)
8974 v.AuxInt = boolToAuxInt(true)
8975 return true
8976 }
8977 break
8978 }
8979
8980
8981
8982 for {
8983 if v_0.Op != OpAnd16 {
8984 break
8985 }
8986 v_0_0 := v_0.Args[0]
8987 v_0_1 := v_0.Args[1]
8988 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
8989 if v_0_0.Op != OpConst16 {
8990 continue
8991 }
8992 c := auxIntToInt16(v_0_0.AuxInt)
8993 if v_1.Op != OpConst16 {
8994 continue
8995 }
8996 d := auxIntToInt16(v_1.AuxInt)
8997 if !(0 <= c && c < d) {
8998 continue
8999 }
9000 v.reset(OpConstBool)
9001 v.AuxInt = boolToAuxInt(true)
9002 return true
9003 }
9004 break
9005 }
9006
9007
9008
9009 for {
9010 if v_0.Op != OpZeroExt16to32 {
9011 break
9012 }
9013 v_0_0 := v_0.Args[0]
9014 if v_0_0.Op != OpAnd16 {
9015 break
9016 }
9017 v_0_0_0 := v_0_0.Args[0]
9018 v_0_0_1 := v_0_0.Args[1]
9019 for _i0 := 0; _i0 <= 1; _i0, v_0_0_0, v_0_0_1 = _i0+1, v_0_0_1, v_0_0_0 {
9020 if v_0_0_0.Op != OpConst16 {
9021 continue
9022 }
9023 c := auxIntToInt16(v_0_0_0.AuxInt)
9024 if v_1.Op != OpConst32 {
9025 continue
9026 }
9027 d := auxIntToInt32(v_1.AuxInt)
9028 if !(0 <= c && int32(c) < d) {
9029 continue
9030 }
9031 v.reset(OpConstBool)
9032 v.AuxInt = boolToAuxInt(true)
9033 return true
9034 }
9035 break
9036 }
9037
9038
9039
9040 for {
9041 if v_0.Op != OpZeroExt16to64 {
9042 break
9043 }
9044 v_0_0 := v_0.Args[0]
9045 if v_0_0.Op != OpAnd16 {
9046 break
9047 }
9048 v_0_0_0 := v_0_0.Args[0]
9049 v_0_0_1 := v_0_0.Args[1]
9050 for _i0 := 0; _i0 <= 1; _i0, v_0_0_0, v_0_0_1 = _i0+1, v_0_0_1, v_0_0_0 {
9051 if v_0_0_0.Op != OpConst16 {
9052 continue
9053 }
9054 c := auxIntToInt16(v_0_0_0.AuxInt)
9055 if v_1.Op != OpConst64 {
9056 continue
9057 }
9058 d := auxIntToInt64(v_1.AuxInt)
9059 if !(0 <= c && int64(c) < d) {
9060 continue
9061 }
9062 v.reset(OpConstBool)
9063 v.AuxInt = boolToAuxInt(true)
9064 return true
9065 }
9066 break
9067 }
9068
9069
9070
9071 for {
9072 if v_0.Op != OpAnd32 {
9073 break
9074 }
9075 v_0_0 := v_0.Args[0]
9076 v_0_1 := v_0.Args[1]
9077 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
9078 if v_0_0.Op != OpConst32 {
9079 continue
9080 }
9081 c := auxIntToInt32(v_0_0.AuxInt)
9082 if v_1.Op != OpConst32 {
9083 continue
9084 }
9085 d := auxIntToInt32(v_1.AuxInt)
9086 if !(0 <= c && c < d) {
9087 continue
9088 }
9089 v.reset(OpConstBool)
9090 v.AuxInt = boolToAuxInt(true)
9091 return true
9092 }
9093 break
9094 }
9095
9096
9097
9098 for {
9099 if v_0.Op != OpZeroExt32to64 {
9100 break
9101 }
9102 v_0_0 := v_0.Args[0]
9103 if v_0_0.Op != OpAnd32 {
9104 break
9105 }
9106 v_0_0_0 := v_0_0.Args[0]
9107 v_0_0_1 := v_0_0.Args[1]
9108 for _i0 := 0; _i0 <= 1; _i0, v_0_0_0, v_0_0_1 = _i0+1, v_0_0_1, v_0_0_0 {
9109 if v_0_0_0.Op != OpConst32 {
9110 continue
9111 }
9112 c := auxIntToInt32(v_0_0_0.AuxInt)
9113 if v_1.Op != OpConst64 {
9114 continue
9115 }
9116 d := auxIntToInt64(v_1.AuxInt)
9117 if !(0 <= c && int64(c) < d) {
9118 continue
9119 }
9120 v.reset(OpConstBool)
9121 v.AuxInt = boolToAuxInt(true)
9122 return true
9123 }
9124 break
9125 }
9126
9127
9128
9129 for {
9130 if v_0.Op != OpAnd64 {
9131 break
9132 }
9133 v_0_0 := v_0.Args[0]
9134 v_0_1 := v_0.Args[1]
9135 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
9136 if v_0_0.Op != OpConst64 {
9137 continue
9138 }
9139 c := auxIntToInt64(v_0_0.AuxInt)
9140 if v_1.Op != OpConst64 {
9141 continue
9142 }
9143 d := auxIntToInt64(v_1.AuxInt)
9144 if !(0 <= c && c < d) {
9145 continue
9146 }
9147 v.reset(OpConstBool)
9148 v.AuxInt = boolToAuxInt(true)
9149 return true
9150 }
9151 break
9152 }
9153
9154
9155 for {
9156 if v_0.Op != OpConst32 {
9157 break
9158 }
9159 c := auxIntToInt32(v_0.AuxInt)
9160 if v_1.Op != OpConst32 {
9161 break
9162 }
9163 d := auxIntToInt32(v_1.AuxInt)
9164 v.reset(OpConstBool)
9165 v.AuxInt = boolToAuxInt(0 <= c && c < d)
9166 return true
9167 }
9168
9169
9170 for {
9171 if v_0.Op != OpConst64 {
9172 break
9173 }
9174 c := auxIntToInt64(v_0.AuxInt)
9175 if v_1.Op != OpConst64 {
9176 break
9177 }
9178 d := auxIntToInt64(v_1.AuxInt)
9179 v.reset(OpConstBool)
9180 v.AuxInt = boolToAuxInt(0 <= c && c < d)
9181 return true
9182 }
9183
9184
9185 for {
9186 if v_0.Op != OpMod32u {
9187 break
9188 }
9189 y := v_0.Args[1]
9190 if y != v_1 {
9191 break
9192 }
9193 v.reset(OpConstBool)
9194 v.AuxInt = boolToAuxInt(true)
9195 return true
9196 }
9197
9198
9199 for {
9200 if v_0.Op != OpMod64u {
9201 break
9202 }
9203 y := v_0.Args[1]
9204 if y != v_1 {
9205 break
9206 }
9207 v.reset(OpConstBool)
9208 v.AuxInt = boolToAuxInt(true)
9209 return true
9210 }
9211
9212
9213
9214 for {
9215 if v_0.Op != OpZeroExt8to64 {
9216 break
9217 }
9218 v_0_0 := v_0.Args[0]
9219 if v_0_0.Op != OpRsh8Ux64 {
9220 break
9221 }
9222 _ = v_0_0.Args[1]
9223 v_0_0_1 := v_0_0.Args[1]
9224 if v_0_0_1.Op != OpConst64 {
9225 break
9226 }
9227 c := auxIntToInt64(v_0_0_1.AuxInt)
9228 if v_1.Op != OpConst64 {
9229 break
9230 }
9231 d := auxIntToInt64(v_1.AuxInt)
9232 if !(0 < c && c < 8 && 1<<uint(8-c)-1 < d) {
9233 break
9234 }
9235 v.reset(OpConstBool)
9236 v.AuxInt = boolToAuxInt(true)
9237 return true
9238 }
9239
9240
9241
9242 for {
9243 if v_0.Op != OpZeroExt8to32 {
9244 break
9245 }
9246 v_0_0 := v_0.Args[0]
9247 if v_0_0.Op != OpRsh8Ux64 {
9248 break
9249 }
9250 _ = v_0_0.Args[1]
9251 v_0_0_1 := v_0_0.Args[1]
9252 if v_0_0_1.Op != OpConst64 {
9253 break
9254 }
9255 c := auxIntToInt64(v_0_0_1.AuxInt)
9256 if v_1.Op != OpConst32 {
9257 break
9258 }
9259 d := auxIntToInt32(v_1.AuxInt)
9260 if !(0 < c && c < 8 && 1<<uint(8-c)-1 < d) {
9261 break
9262 }
9263 v.reset(OpConstBool)
9264 v.AuxInt = boolToAuxInt(true)
9265 return true
9266 }
9267
9268
9269
9270 for {
9271 if v_0.Op != OpZeroExt8to16 {
9272 break
9273 }
9274 v_0_0 := v_0.Args[0]
9275 if v_0_0.Op != OpRsh8Ux64 {
9276 break
9277 }
9278 _ = v_0_0.Args[1]
9279 v_0_0_1 := v_0_0.Args[1]
9280 if v_0_0_1.Op != OpConst64 {
9281 break
9282 }
9283 c := auxIntToInt64(v_0_0_1.AuxInt)
9284 if v_1.Op != OpConst16 {
9285 break
9286 }
9287 d := auxIntToInt16(v_1.AuxInt)
9288 if !(0 < c && c < 8 && 1<<uint(8-c)-1 < d) {
9289 break
9290 }
9291 v.reset(OpConstBool)
9292 v.AuxInt = boolToAuxInt(true)
9293 return true
9294 }
9295
9296
9297
9298 for {
9299 if v_0.Op != OpRsh8Ux64 {
9300 break
9301 }
9302 _ = v_0.Args[1]
9303 v_0_1 := v_0.Args[1]
9304 if v_0_1.Op != OpConst64 {
9305 break
9306 }
9307 c := auxIntToInt64(v_0_1.AuxInt)
9308 if v_1.Op != OpConst64 {
9309 break
9310 }
9311 d := auxIntToInt64(v_1.AuxInt)
9312 if !(0 < c && c < 8 && 1<<uint(8-c)-1 < d) {
9313 break
9314 }
9315 v.reset(OpConstBool)
9316 v.AuxInt = boolToAuxInt(true)
9317 return true
9318 }
9319
9320
9321
9322 for {
9323 if v_0.Op != OpZeroExt16to64 {
9324 break
9325 }
9326 v_0_0 := v_0.Args[0]
9327 if v_0_0.Op != OpRsh16Ux64 {
9328 break
9329 }
9330 _ = v_0_0.Args[1]
9331 v_0_0_1 := v_0_0.Args[1]
9332 if v_0_0_1.Op != OpConst64 {
9333 break
9334 }
9335 c := auxIntToInt64(v_0_0_1.AuxInt)
9336 if v_1.Op != OpConst64 {
9337 break
9338 }
9339 d := auxIntToInt64(v_1.AuxInt)
9340 if !(0 < c && c < 16 && 1<<uint(16-c)-1 < d) {
9341 break
9342 }
9343 v.reset(OpConstBool)
9344 v.AuxInt = boolToAuxInt(true)
9345 return true
9346 }
9347
9348
9349
9350 for {
9351 if v_0.Op != OpZeroExt16to32 {
9352 break
9353 }
9354 v_0_0 := v_0.Args[0]
9355 if v_0_0.Op != OpRsh16Ux64 {
9356 break
9357 }
9358 _ = v_0_0.Args[1]
9359 v_0_0_1 := v_0_0.Args[1]
9360 if v_0_0_1.Op != OpConst64 {
9361 break
9362 }
9363 c := auxIntToInt64(v_0_0_1.AuxInt)
9364 if v_1.Op != OpConst64 {
9365 break
9366 }
9367 d := auxIntToInt64(v_1.AuxInt)
9368 if !(0 < c && c < 16 && 1<<uint(16-c)-1 < d) {
9369 break
9370 }
9371 v.reset(OpConstBool)
9372 v.AuxInt = boolToAuxInt(true)
9373 return true
9374 }
9375
9376
9377
9378 for {
9379 if v_0.Op != OpRsh16Ux64 {
9380 break
9381 }
9382 _ = v_0.Args[1]
9383 v_0_1 := v_0.Args[1]
9384 if v_0_1.Op != OpConst64 {
9385 break
9386 }
9387 c := auxIntToInt64(v_0_1.AuxInt)
9388 if v_1.Op != OpConst64 {
9389 break
9390 }
9391 d := auxIntToInt64(v_1.AuxInt)
9392 if !(0 < c && c < 16 && 1<<uint(16-c)-1 < d) {
9393 break
9394 }
9395 v.reset(OpConstBool)
9396 v.AuxInt = boolToAuxInt(true)
9397 return true
9398 }
9399
9400
9401
9402 for {
9403 if v_0.Op != OpZeroExt32to64 {
9404 break
9405 }
9406 v_0_0 := v_0.Args[0]
9407 if v_0_0.Op != OpRsh32Ux64 {
9408 break
9409 }
9410 _ = v_0_0.Args[1]
9411 v_0_0_1 := v_0_0.Args[1]
9412 if v_0_0_1.Op != OpConst64 {
9413 break
9414 }
9415 c := auxIntToInt64(v_0_0_1.AuxInt)
9416 if v_1.Op != OpConst64 {
9417 break
9418 }
9419 d := auxIntToInt64(v_1.AuxInt)
9420 if !(0 < c && c < 32 && 1<<uint(32-c)-1 < d) {
9421 break
9422 }
9423 v.reset(OpConstBool)
9424 v.AuxInt = boolToAuxInt(true)
9425 return true
9426 }
9427
9428
9429
9430 for {
9431 if v_0.Op != OpRsh32Ux64 {
9432 break
9433 }
9434 _ = v_0.Args[1]
9435 v_0_1 := v_0.Args[1]
9436 if v_0_1.Op != OpConst64 {
9437 break
9438 }
9439 c := auxIntToInt64(v_0_1.AuxInt)
9440 if v_1.Op != OpConst64 {
9441 break
9442 }
9443 d := auxIntToInt64(v_1.AuxInt)
9444 if !(0 < c && c < 32 && 1<<uint(32-c)-1 < d) {
9445 break
9446 }
9447 v.reset(OpConstBool)
9448 v.AuxInt = boolToAuxInt(true)
9449 return true
9450 }
9451
9452
9453
9454 for {
9455 if v_0.Op != OpRsh64Ux64 {
9456 break
9457 }
9458 _ = v_0.Args[1]
9459 v_0_1 := v_0.Args[1]
9460 if v_0_1.Op != OpConst64 {
9461 break
9462 }
9463 c := auxIntToInt64(v_0_1.AuxInt)
9464 if v_1.Op != OpConst64 {
9465 break
9466 }
9467 d := auxIntToInt64(v_1.AuxInt)
9468 if !(0 < c && c < 64 && 1<<uint(64-c)-1 < d) {
9469 break
9470 }
9471 v.reset(OpConstBool)
9472 v.AuxInt = boolToAuxInt(true)
9473 return true
9474 }
9475 return false
9476 }
9477 func rewriteValuegeneric_OpIsNonNil(v *Value) bool {
9478 v_0 := v.Args[0]
9479
9480
9481 for {
9482 if v_0.Op != OpConstNil {
9483 break
9484 }
9485 v.reset(OpConstBool)
9486 v.AuxInt = boolToAuxInt(false)
9487 return true
9488 }
9489
9490
9491 for {
9492 if v_0.Op != OpConst32 {
9493 break
9494 }
9495 c := auxIntToInt32(v_0.AuxInt)
9496 v.reset(OpConstBool)
9497 v.AuxInt = boolToAuxInt(c != 0)
9498 return true
9499 }
9500
9501
9502 for {
9503 if v_0.Op != OpConst64 {
9504 break
9505 }
9506 c := auxIntToInt64(v_0.AuxInt)
9507 v.reset(OpConstBool)
9508 v.AuxInt = boolToAuxInt(c != 0)
9509 return true
9510 }
9511
9512
9513 for {
9514 if v_0.Op != OpAddr {
9515 break
9516 }
9517 v.reset(OpConstBool)
9518 v.AuxInt = boolToAuxInt(true)
9519 return true
9520 }
9521
9522
9523 for {
9524 if v_0.Op != OpLocalAddr {
9525 break
9526 }
9527 v.reset(OpConstBool)
9528 v.AuxInt = boolToAuxInt(true)
9529 return true
9530 }
9531 return false
9532 }
9533 func rewriteValuegeneric_OpIsSliceInBounds(v *Value) bool {
9534 v_1 := v.Args[1]
9535 v_0 := v.Args[0]
9536
9537
9538 for {
9539 x := v_0
9540 if x != v_1 {
9541 break
9542 }
9543 v.reset(OpConstBool)
9544 v.AuxInt = boolToAuxInt(true)
9545 return true
9546 }
9547
9548
9549
9550 for {
9551 if v_0.Op != OpAnd32 {
9552 break
9553 }
9554 v_0_0 := v_0.Args[0]
9555 v_0_1 := v_0.Args[1]
9556 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
9557 if v_0_0.Op != OpConst32 {
9558 continue
9559 }
9560 c := auxIntToInt32(v_0_0.AuxInt)
9561 if v_1.Op != OpConst32 {
9562 continue
9563 }
9564 d := auxIntToInt32(v_1.AuxInt)
9565 if !(0 <= c && c <= d) {
9566 continue
9567 }
9568 v.reset(OpConstBool)
9569 v.AuxInt = boolToAuxInt(true)
9570 return true
9571 }
9572 break
9573 }
9574
9575
9576
9577 for {
9578 if v_0.Op != OpAnd64 {
9579 break
9580 }
9581 v_0_0 := v_0.Args[0]
9582 v_0_1 := v_0.Args[1]
9583 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
9584 if v_0_0.Op != OpConst64 {
9585 continue
9586 }
9587 c := auxIntToInt64(v_0_0.AuxInt)
9588 if v_1.Op != OpConst64 {
9589 continue
9590 }
9591 d := auxIntToInt64(v_1.AuxInt)
9592 if !(0 <= c && c <= d) {
9593 continue
9594 }
9595 v.reset(OpConstBool)
9596 v.AuxInt = boolToAuxInt(true)
9597 return true
9598 }
9599 break
9600 }
9601
9602
9603 for {
9604 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
9605 break
9606 }
9607 v.reset(OpConstBool)
9608 v.AuxInt = boolToAuxInt(true)
9609 return true
9610 }
9611
9612
9613 for {
9614 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
9615 break
9616 }
9617 v.reset(OpConstBool)
9618 v.AuxInt = boolToAuxInt(true)
9619 return true
9620 }
9621
9622
9623 for {
9624 if v_0.Op != OpConst32 {
9625 break
9626 }
9627 c := auxIntToInt32(v_0.AuxInt)
9628 if v_1.Op != OpConst32 {
9629 break
9630 }
9631 d := auxIntToInt32(v_1.AuxInt)
9632 v.reset(OpConstBool)
9633 v.AuxInt = boolToAuxInt(0 <= c && c <= d)
9634 return true
9635 }
9636
9637
9638 for {
9639 if v_0.Op != OpConst64 {
9640 break
9641 }
9642 c := auxIntToInt64(v_0.AuxInt)
9643 if v_1.Op != OpConst64 {
9644 break
9645 }
9646 d := auxIntToInt64(v_1.AuxInt)
9647 v.reset(OpConstBool)
9648 v.AuxInt = boolToAuxInt(0 <= c && c <= d)
9649 return true
9650 }
9651
9652
9653 for {
9654 if v_0.Op != OpSliceLen {
9655 break
9656 }
9657 x := v_0.Args[0]
9658 if v_1.Op != OpSliceCap || x != v_1.Args[0] {
9659 break
9660 }
9661 v.reset(OpConstBool)
9662 v.AuxInt = boolToAuxInt(true)
9663 return true
9664 }
9665 return false
9666 }
9667 func rewriteValuegeneric_OpLeq16(v *Value) bool {
9668 v_1 := v.Args[1]
9669 v_0 := v.Args[0]
9670
9671
9672 for {
9673 if v_0.Op != OpConst16 {
9674 break
9675 }
9676 c := auxIntToInt16(v_0.AuxInt)
9677 if v_1.Op != OpConst16 {
9678 break
9679 }
9680 d := auxIntToInt16(v_1.AuxInt)
9681 v.reset(OpConstBool)
9682 v.AuxInt = boolToAuxInt(c <= d)
9683 return true
9684 }
9685
9686
9687
9688 for {
9689 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 || v_1.Op != OpAnd16 {
9690 break
9691 }
9692 _ = v_1.Args[1]
9693 v_1_0 := v_1.Args[0]
9694 v_1_1 := v_1.Args[1]
9695 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
9696 if v_1_1.Op != OpConst16 {
9697 continue
9698 }
9699 c := auxIntToInt16(v_1_1.AuxInt)
9700 if !(c >= 0) {
9701 continue
9702 }
9703 v.reset(OpConstBool)
9704 v.AuxInt = boolToAuxInt(true)
9705 return true
9706 }
9707 break
9708 }
9709
9710
9711
9712 for {
9713 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 || v_1.Op != OpRsh16Ux64 {
9714 break
9715 }
9716 _ = v_1.Args[1]
9717 v_1_1 := v_1.Args[1]
9718 if v_1_1.Op != OpConst64 {
9719 break
9720 }
9721 c := auxIntToInt64(v_1_1.AuxInt)
9722 if !(c > 0) {
9723 break
9724 }
9725 v.reset(OpConstBool)
9726 v.AuxInt = boolToAuxInt(true)
9727 return true
9728 }
9729 return false
9730 }
9731 func rewriteValuegeneric_OpLeq16U(v *Value) bool {
9732 v_1 := v.Args[1]
9733 v_0 := v.Args[0]
9734
9735
9736 for {
9737 if v_0.Op != OpConst16 {
9738 break
9739 }
9740 c := auxIntToInt16(v_0.AuxInt)
9741 if v_1.Op != OpConst16 {
9742 break
9743 }
9744 d := auxIntToInt16(v_1.AuxInt)
9745 v.reset(OpConstBool)
9746 v.AuxInt = boolToAuxInt(uint16(c) <= uint16(d))
9747 return true
9748 }
9749
9750
9751 for {
9752 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 {
9753 break
9754 }
9755 v.reset(OpConstBool)
9756 v.AuxInt = boolToAuxInt(true)
9757 return true
9758 }
9759 return false
9760 }
9761 func rewriteValuegeneric_OpLeq32(v *Value) bool {
9762 v_1 := v.Args[1]
9763 v_0 := v.Args[0]
9764
9765
9766 for {
9767 if v_0.Op != OpConst32 {
9768 break
9769 }
9770 c := auxIntToInt32(v_0.AuxInt)
9771 if v_1.Op != OpConst32 {
9772 break
9773 }
9774 d := auxIntToInt32(v_1.AuxInt)
9775 v.reset(OpConstBool)
9776 v.AuxInt = boolToAuxInt(c <= d)
9777 return true
9778 }
9779
9780
9781
9782 for {
9783 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 || v_1.Op != OpAnd32 {
9784 break
9785 }
9786 _ = v_1.Args[1]
9787 v_1_0 := v_1.Args[0]
9788 v_1_1 := v_1.Args[1]
9789 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
9790 if v_1_1.Op != OpConst32 {
9791 continue
9792 }
9793 c := auxIntToInt32(v_1_1.AuxInt)
9794 if !(c >= 0) {
9795 continue
9796 }
9797 v.reset(OpConstBool)
9798 v.AuxInt = boolToAuxInt(true)
9799 return true
9800 }
9801 break
9802 }
9803
9804
9805
9806 for {
9807 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 || v_1.Op != OpRsh32Ux64 {
9808 break
9809 }
9810 _ = v_1.Args[1]
9811 v_1_1 := v_1.Args[1]
9812 if v_1_1.Op != OpConst64 {
9813 break
9814 }
9815 c := auxIntToInt64(v_1_1.AuxInt)
9816 if !(c > 0) {
9817 break
9818 }
9819 v.reset(OpConstBool)
9820 v.AuxInt = boolToAuxInt(true)
9821 return true
9822 }
9823 return false
9824 }
9825 func rewriteValuegeneric_OpLeq32F(v *Value) bool {
9826 v_1 := v.Args[1]
9827 v_0 := v.Args[0]
9828
9829
9830 for {
9831 if v_0.Op != OpConst32F {
9832 break
9833 }
9834 c := auxIntToFloat32(v_0.AuxInt)
9835 if v_1.Op != OpConst32F {
9836 break
9837 }
9838 d := auxIntToFloat32(v_1.AuxInt)
9839 v.reset(OpConstBool)
9840 v.AuxInt = boolToAuxInt(c <= d)
9841 return true
9842 }
9843 return false
9844 }
9845 func rewriteValuegeneric_OpLeq32U(v *Value) bool {
9846 v_1 := v.Args[1]
9847 v_0 := v.Args[0]
9848
9849
9850 for {
9851 if v_0.Op != OpConst32 {
9852 break
9853 }
9854 c := auxIntToInt32(v_0.AuxInt)
9855 if v_1.Op != OpConst32 {
9856 break
9857 }
9858 d := auxIntToInt32(v_1.AuxInt)
9859 v.reset(OpConstBool)
9860 v.AuxInt = boolToAuxInt(uint32(c) <= uint32(d))
9861 return true
9862 }
9863
9864
9865 for {
9866 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
9867 break
9868 }
9869 v.reset(OpConstBool)
9870 v.AuxInt = boolToAuxInt(true)
9871 return true
9872 }
9873 return false
9874 }
9875 func rewriteValuegeneric_OpLeq64(v *Value) bool {
9876 v_1 := v.Args[1]
9877 v_0 := v.Args[0]
9878
9879
9880 for {
9881 if v_0.Op != OpConst64 {
9882 break
9883 }
9884 c := auxIntToInt64(v_0.AuxInt)
9885 if v_1.Op != OpConst64 {
9886 break
9887 }
9888 d := auxIntToInt64(v_1.AuxInt)
9889 v.reset(OpConstBool)
9890 v.AuxInt = boolToAuxInt(c <= d)
9891 return true
9892 }
9893
9894
9895
9896 for {
9897 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 || v_1.Op != OpAnd64 {
9898 break
9899 }
9900 _ = v_1.Args[1]
9901 v_1_0 := v_1.Args[0]
9902 v_1_1 := v_1.Args[1]
9903 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
9904 if v_1_1.Op != OpConst64 {
9905 continue
9906 }
9907 c := auxIntToInt64(v_1_1.AuxInt)
9908 if !(c >= 0) {
9909 continue
9910 }
9911 v.reset(OpConstBool)
9912 v.AuxInt = boolToAuxInt(true)
9913 return true
9914 }
9915 break
9916 }
9917
9918
9919
9920 for {
9921 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 || v_1.Op != OpRsh64Ux64 {
9922 break
9923 }
9924 _ = v_1.Args[1]
9925 v_1_1 := v_1.Args[1]
9926 if v_1_1.Op != OpConst64 {
9927 break
9928 }
9929 c := auxIntToInt64(v_1_1.AuxInt)
9930 if !(c > 0) {
9931 break
9932 }
9933 v.reset(OpConstBool)
9934 v.AuxInt = boolToAuxInt(true)
9935 return true
9936 }
9937 return false
9938 }
9939 func rewriteValuegeneric_OpLeq64F(v *Value) bool {
9940 v_1 := v.Args[1]
9941 v_0 := v.Args[0]
9942
9943
9944 for {
9945 if v_0.Op != OpConst64F {
9946 break
9947 }
9948 c := auxIntToFloat64(v_0.AuxInt)
9949 if v_1.Op != OpConst64F {
9950 break
9951 }
9952 d := auxIntToFloat64(v_1.AuxInt)
9953 v.reset(OpConstBool)
9954 v.AuxInt = boolToAuxInt(c <= d)
9955 return true
9956 }
9957 return false
9958 }
9959 func rewriteValuegeneric_OpLeq64U(v *Value) bool {
9960 v_1 := v.Args[1]
9961 v_0 := v.Args[0]
9962
9963
9964 for {
9965 if v_0.Op != OpConst64 {
9966 break
9967 }
9968 c := auxIntToInt64(v_0.AuxInt)
9969 if v_1.Op != OpConst64 {
9970 break
9971 }
9972 d := auxIntToInt64(v_1.AuxInt)
9973 v.reset(OpConstBool)
9974 v.AuxInt = boolToAuxInt(uint64(c) <= uint64(d))
9975 return true
9976 }
9977
9978
9979 for {
9980 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
9981 break
9982 }
9983 v.reset(OpConstBool)
9984 v.AuxInt = boolToAuxInt(true)
9985 return true
9986 }
9987 return false
9988 }
9989 func rewriteValuegeneric_OpLeq8(v *Value) bool {
9990 v_1 := v.Args[1]
9991 v_0 := v.Args[0]
9992
9993
9994 for {
9995 if v_0.Op != OpConst8 {
9996 break
9997 }
9998 c := auxIntToInt8(v_0.AuxInt)
9999 if v_1.Op != OpConst8 {
10000 break
10001 }
10002 d := auxIntToInt8(v_1.AuxInt)
10003 v.reset(OpConstBool)
10004 v.AuxInt = boolToAuxInt(c <= d)
10005 return true
10006 }
10007
10008
10009
10010 for {
10011 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 || v_1.Op != OpAnd8 {
10012 break
10013 }
10014 _ = v_1.Args[1]
10015 v_1_0 := v_1.Args[0]
10016 v_1_1 := v_1.Args[1]
10017 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
10018 if v_1_1.Op != OpConst8 {
10019 continue
10020 }
10021 c := auxIntToInt8(v_1_1.AuxInt)
10022 if !(c >= 0) {
10023 continue
10024 }
10025 v.reset(OpConstBool)
10026 v.AuxInt = boolToAuxInt(true)
10027 return true
10028 }
10029 break
10030 }
10031
10032
10033
10034 for {
10035 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 || v_1.Op != OpRsh8Ux64 {
10036 break
10037 }
10038 _ = v_1.Args[1]
10039 v_1_1 := v_1.Args[1]
10040 if v_1_1.Op != OpConst64 {
10041 break
10042 }
10043 c := auxIntToInt64(v_1_1.AuxInt)
10044 if !(c > 0) {
10045 break
10046 }
10047 v.reset(OpConstBool)
10048 v.AuxInt = boolToAuxInt(true)
10049 return true
10050 }
10051 return false
10052 }
10053 func rewriteValuegeneric_OpLeq8U(v *Value) bool {
10054 v_1 := v.Args[1]
10055 v_0 := v.Args[0]
10056
10057
10058 for {
10059 if v_0.Op != OpConst8 {
10060 break
10061 }
10062 c := auxIntToInt8(v_0.AuxInt)
10063 if v_1.Op != OpConst8 {
10064 break
10065 }
10066 d := auxIntToInt8(v_1.AuxInt)
10067 v.reset(OpConstBool)
10068 v.AuxInt = boolToAuxInt(uint8(c) <= uint8(d))
10069 return true
10070 }
10071
10072
10073 for {
10074 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 {
10075 break
10076 }
10077 v.reset(OpConstBool)
10078 v.AuxInt = boolToAuxInt(true)
10079 return true
10080 }
10081 return false
10082 }
10083 func rewriteValuegeneric_OpLess16(v *Value) bool {
10084 v_1 := v.Args[1]
10085 v_0 := v.Args[0]
10086 b := v.Block
10087
10088
10089 for {
10090 if v_0.Op != OpConst16 {
10091 break
10092 }
10093 c := auxIntToInt16(v_0.AuxInt)
10094 if v_1.Op != OpConst16 {
10095 break
10096 }
10097 d := auxIntToInt16(v_1.AuxInt)
10098 v.reset(OpConstBool)
10099 v.AuxInt = boolToAuxInt(c < d)
10100 return true
10101 }
10102
10103
10104
10105 for {
10106 if v_0.Op != OpConst16 {
10107 break
10108 }
10109 t := v_0.Type
10110 if auxIntToInt16(v_0.AuxInt) != 0 {
10111 break
10112 }
10113 x := v_1
10114 if !(isNonNegative(x)) {
10115 break
10116 }
10117 v.reset(OpNeq16)
10118 v0 := b.NewValue0(v.Pos, OpConst16, t)
10119 v0.AuxInt = int16ToAuxInt(0)
10120 v.AddArg2(v0, x)
10121 return true
10122 }
10123
10124
10125
10126 for {
10127 x := v_0
10128 if v_1.Op != OpConst16 {
10129 break
10130 }
10131 t := v_1.Type
10132 if auxIntToInt16(v_1.AuxInt) != 1 || !(isNonNegative(x)) {
10133 break
10134 }
10135 v.reset(OpEq16)
10136 v0 := b.NewValue0(v.Pos, OpConst16, t)
10137 v0.AuxInt = int16ToAuxInt(0)
10138 v.AddArg2(v0, x)
10139 return true
10140 }
10141 return false
10142 }
10143 func rewriteValuegeneric_OpLess16U(v *Value) bool {
10144 v_1 := v.Args[1]
10145 v_0 := v.Args[0]
10146
10147
10148 for {
10149 if v_0.Op != OpConst16 {
10150 break
10151 }
10152 c := auxIntToInt16(v_0.AuxInt)
10153 if v_1.Op != OpConst16 {
10154 break
10155 }
10156 d := auxIntToInt16(v_1.AuxInt)
10157 v.reset(OpConstBool)
10158 v.AuxInt = boolToAuxInt(uint16(c) < uint16(d))
10159 return true
10160 }
10161
10162
10163 for {
10164 if v_1.Op != OpConst16 || auxIntToInt16(v_1.AuxInt) != 0 {
10165 break
10166 }
10167 v.reset(OpConstBool)
10168 v.AuxInt = boolToAuxInt(false)
10169 return true
10170 }
10171 return false
10172 }
10173 func rewriteValuegeneric_OpLess32(v *Value) bool {
10174 v_1 := v.Args[1]
10175 v_0 := v.Args[0]
10176 b := v.Block
10177
10178
10179 for {
10180 if v_0.Op != OpConst32 {
10181 break
10182 }
10183 c := auxIntToInt32(v_0.AuxInt)
10184 if v_1.Op != OpConst32 {
10185 break
10186 }
10187 d := auxIntToInt32(v_1.AuxInt)
10188 v.reset(OpConstBool)
10189 v.AuxInt = boolToAuxInt(c < d)
10190 return true
10191 }
10192
10193
10194
10195 for {
10196 if v_0.Op != OpConst32 {
10197 break
10198 }
10199 t := v_0.Type
10200 if auxIntToInt32(v_0.AuxInt) != 0 {
10201 break
10202 }
10203 x := v_1
10204 if !(isNonNegative(x)) {
10205 break
10206 }
10207 v.reset(OpNeq32)
10208 v0 := b.NewValue0(v.Pos, OpConst32, t)
10209 v0.AuxInt = int32ToAuxInt(0)
10210 v.AddArg2(v0, x)
10211 return true
10212 }
10213
10214
10215
10216 for {
10217 x := v_0
10218 if v_1.Op != OpConst32 {
10219 break
10220 }
10221 t := v_1.Type
10222 if auxIntToInt32(v_1.AuxInt) != 1 || !(isNonNegative(x)) {
10223 break
10224 }
10225 v.reset(OpEq32)
10226 v0 := b.NewValue0(v.Pos, OpConst32, t)
10227 v0.AuxInt = int32ToAuxInt(0)
10228 v.AddArg2(v0, x)
10229 return true
10230 }
10231 return false
10232 }
10233 func rewriteValuegeneric_OpLess32F(v *Value) bool {
10234 v_1 := v.Args[1]
10235 v_0 := v.Args[0]
10236
10237
10238 for {
10239 if v_0.Op != OpConst32F {
10240 break
10241 }
10242 c := auxIntToFloat32(v_0.AuxInt)
10243 if v_1.Op != OpConst32F {
10244 break
10245 }
10246 d := auxIntToFloat32(v_1.AuxInt)
10247 v.reset(OpConstBool)
10248 v.AuxInt = boolToAuxInt(c < d)
10249 return true
10250 }
10251 return false
10252 }
10253 func rewriteValuegeneric_OpLess32U(v *Value) bool {
10254 v_1 := v.Args[1]
10255 v_0 := v.Args[0]
10256
10257
10258 for {
10259 if v_0.Op != OpConst32 {
10260 break
10261 }
10262 c := auxIntToInt32(v_0.AuxInt)
10263 if v_1.Op != OpConst32 {
10264 break
10265 }
10266 d := auxIntToInt32(v_1.AuxInt)
10267 v.reset(OpConstBool)
10268 v.AuxInt = boolToAuxInt(uint32(c) < uint32(d))
10269 return true
10270 }
10271
10272
10273 for {
10274 if v_1.Op != OpConst32 || auxIntToInt32(v_1.AuxInt) != 0 {
10275 break
10276 }
10277 v.reset(OpConstBool)
10278 v.AuxInt = boolToAuxInt(false)
10279 return true
10280 }
10281 return false
10282 }
10283 func rewriteValuegeneric_OpLess64(v *Value) bool {
10284 v_1 := v.Args[1]
10285 v_0 := v.Args[0]
10286 b := v.Block
10287
10288
10289 for {
10290 if v_0.Op != OpConst64 {
10291 break
10292 }
10293 c := auxIntToInt64(v_0.AuxInt)
10294 if v_1.Op != OpConst64 {
10295 break
10296 }
10297 d := auxIntToInt64(v_1.AuxInt)
10298 v.reset(OpConstBool)
10299 v.AuxInt = boolToAuxInt(c < d)
10300 return true
10301 }
10302
10303
10304
10305 for {
10306 if v_0.Op != OpConst64 {
10307 break
10308 }
10309 t := v_0.Type
10310 if auxIntToInt64(v_0.AuxInt) != 0 {
10311 break
10312 }
10313 x := v_1
10314 if !(isNonNegative(x)) {
10315 break
10316 }
10317 v.reset(OpNeq64)
10318 v0 := b.NewValue0(v.Pos, OpConst64, t)
10319 v0.AuxInt = int64ToAuxInt(0)
10320 v.AddArg2(v0, x)
10321 return true
10322 }
10323
10324
10325
10326 for {
10327 x := v_0
10328 if v_1.Op != OpConst64 {
10329 break
10330 }
10331 t := v_1.Type
10332 if auxIntToInt64(v_1.AuxInt) != 1 || !(isNonNegative(x)) {
10333 break
10334 }
10335 v.reset(OpEq64)
10336 v0 := b.NewValue0(v.Pos, OpConst64, t)
10337 v0.AuxInt = int64ToAuxInt(0)
10338 v.AddArg2(v0, x)
10339 return true
10340 }
10341 return false
10342 }
10343 func rewriteValuegeneric_OpLess64F(v *Value) bool {
10344 v_1 := v.Args[1]
10345 v_0 := v.Args[0]
10346
10347
10348 for {
10349 if v_0.Op != OpConst64F {
10350 break
10351 }
10352 c := auxIntToFloat64(v_0.AuxInt)
10353 if v_1.Op != OpConst64F {
10354 break
10355 }
10356 d := auxIntToFloat64(v_1.AuxInt)
10357 v.reset(OpConstBool)
10358 v.AuxInt = boolToAuxInt(c < d)
10359 return true
10360 }
10361 return false
10362 }
10363 func rewriteValuegeneric_OpLess64U(v *Value) bool {
10364 v_1 := v.Args[1]
10365 v_0 := v.Args[0]
10366
10367
10368 for {
10369 if v_0.Op != OpConst64 {
10370 break
10371 }
10372 c := auxIntToInt64(v_0.AuxInt)
10373 if v_1.Op != OpConst64 {
10374 break
10375 }
10376 d := auxIntToInt64(v_1.AuxInt)
10377 v.reset(OpConstBool)
10378 v.AuxInt = boolToAuxInt(uint64(c) < uint64(d))
10379 return true
10380 }
10381
10382
10383 for {
10384 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 0 {
10385 break
10386 }
10387 v.reset(OpConstBool)
10388 v.AuxInt = boolToAuxInt(false)
10389 return true
10390 }
10391 return false
10392 }
10393 func rewriteValuegeneric_OpLess8(v *Value) bool {
10394 v_1 := v.Args[1]
10395 v_0 := v.Args[0]
10396 b := v.Block
10397
10398
10399 for {
10400 if v_0.Op != OpConst8 {
10401 break
10402 }
10403 c := auxIntToInt8(v_0.AuxInt)
10404 if v_1.Op != OpConst8 {
10405 break
10406 }
10407 d := auxIntToInt8(v_1.AuxInt)
10408 v.reset(OpConstBool)
10409 v.AuxInt = boolToAuxInt(c < d)
10410 return true
10411 }
10412
10413
10414
10415 for {
10416 if v_0.Op != OpConst8 {
10417 break
10418 }
10419 t := v_0.Type
10420 if auxIntToInt8(v_0.AuxInt) != 0 {
10421 break
10422 }
10423 x := v_1
10424 if !(isNonNegative(x)) {
10425 break
10426 }
10427 v.reset(OpNeq8)
10428 v0 := b.NewValue0(v.Pos, OpConst8, t)
10429 v0.AuxInt = int8ToAuxInt(0)
10430 v.AddArg2(v0, x)
10431 return true
10432 }
10433
10434
10435
10436 for {
10437 x := v_0
10438 if v_1.Op != OpConst8 {
10439 break
10440 }
10441 t := v_1.Type
10442 if auxIntToInt8(v_1.AuxInt) != 1 || !(isNonNegative(x)) {
10443 break
10444 }
10445 v.reset(OpEq8)
10446 v0 := b.NewValue0(v.Pos, OpConst8, t)
10447 v0.AuxInt = int8ToAuxInt(0)
10448 v.AddArg2(v0, x)
10449 return true
10450 }
10451 return false
10452 }
10453 func rewriteValuegeneric_OpLess8U(v *Value) bool {
10454 v_1 := v.Args[1]
10455 v_0 := v.Args[0]
10456
10457
10458 for {
10459 if v_0.Op != OpConst8 {
10460 break
10461 }
10462 c := auxIntToInt8(v_0.AuxInt)
10463 if v_1.Op != OpConst8 {
10464 break
10465 }
10466 d := auxIntToInt8(v_1.AuxInt)
10467 v.reset(OpConstBool)
10468 v.AuxInt = boolToAuxInt(uint8(c) < uint8(d))
10469 return true
10470 }
10471
10472
10473 for {
10474 if v_1.Op != OpConst8 || auxIntToInt8(v_1.AuxInt) != 0 {
10475 break
10476 }
10477 v.reset(OpConstBool)
10478 v.AuxInt = boolToAuxInt(false)
10479 return true
10480 }
10481 return false
10482 }
10483 func rewriteValuegeneric_OpLoad(v *Value) bool {
10484 v_1 := v.Args[1]
10485 v_0 := v.Args[0]
10486 b := v.Block
10487 fe := b.Func.fe
10488
10489
10490
10491 for {
10492 t1 := v.Type
10493 p1 := v_0
10494 if v_1.Op != OpStore {
10495 break
10496 }
10497 t2 := auxToType(v_1.Aux)
10498 x := v_1.Args[1]
10499 p2 := v_1.Args[0]
10500 if !(isSamePtr(p1, p2) && t1.Compare(x.Type) == types.CMPeq && t1.Size() == t2.Size()) {
10501 break
10502 }
10503 v.copyOf(x)
10504 return true
10505 }
10506
10507
10508
10509 for {
10510 t1 := v.Type
10511 p1 := v_0
10512 if v_1.Op != OpStore {
10513 break
10514 }
10515 t2 := auxToType(v_1.Aux)
10516 _ = v_1.Args[2]
10517 p2 := v_1.Args[0]
10518 v_1_2 := v_1.Args[2]
10519 if v_1_2.Op != OpStore {
10520 break
10521 }
10522 t3 := auxToType(v_1_2.Aux)
10523 x := v_1_2.Args[1]
10524 p3 := v_1_2.Args[0]
10525 if !(isSamePtr(p1, p3) && t1.Compare(x.Type) == types.CMPeq && t1.Size() == t2.Size() && disjoint(p3, t3.Size(), p2, t2.Size())) {
10526 break
10527 }
10528 v.copyOf(x)
10529 return true
10530 }
10531
10532
10533
10534 for {
10535 t1 := v.Type
10536 p1 := v_0
10537 if v_1.Op != OpStore {
10538 break
10539 }
10540 t2 := auxToType(v_1.Aux)
10541 _ = v_1.Args[2]
10542 p2 := v_1.Args[0]
10543 v_1_2 := v_1.Args[2]
10544 if v_1_2.Op != OpStore {
10545 break
10546 }
10547 t3 := auxToType(v_1_2.Aux)
10548 _ = v_1_2.Args[2]
10549 p3 := v_1_2.Args[0]
10550 v_1_2_2 := v_1_2.Args[2]
10551 if v_1_2_2.Op != OpStore {
10552 break
10553 }
10554 t4 := auxToType(v_1_2_2.Aux)
10555 x := v_1_2_2.Args[1]
10556 p4 := v_1_2_2.Args[0]
10557 if !(isSamePtr(p1, p4) && t1.Compare(x.Type) == types.CMPeq && t1.Size() == t2.Size() && disjoint(p4, t4.Size(), p2, t2.Size()) && disjoint(p4, t4.Size(), p3, t3.Size())) {
10558 break
10559 }
10560 v.copyOf(x)
10561 return true
10562 }
10563
10564
10565
10566 for {
10567 t1 := v.Type
10568 p1 := v_0
10569 if v_1.Op != OpStore {
10570 break
10571 }
10572 t2 := auxToType(v_1.Aux)
10573 _ = v_1.Args[2]
10574 p2 := v_1.Args[0]
10575 v_1_2 := v_1.Args[2]
10576 if v_1_2.Op != OpStore {
10577 break
10578 }
10579 t3 := auxToType(v_1_2.Aux)
10580 _ = v_1_2.Args[2]
10581 p3 := v_1_2.Args[0]
10582 v_1_2_2 := v_1_2.Args[2]
10583 if v_1_2_2.Op != OpStore {
10584 break
10585 }
10586 t4 := auxToType(v_1_2_2.Aux)
10587 _ = v_1_2_2.Args[2]
10588 p4 := v_1_2_2.Args[0]
10589 v_1_2_2_2 := v_1_2_2.Args[2]
10590 if v_1_2_2_2.Op != OpStore {
10591 break
10592 }
10593 t5 := auxToType(v_1_2_2_2.Aux)
10594 x := v_1_2_2_2.Args[1]
10595 p5 := v_1_2_2_2.Args[0]
10596 if !(isSamePtr(p1, p5) && t1.Compare(x.Type) == types.CMPeq && t1.Size() == t2.Size() && disjoint(p5, t5.Size(), p2, t2.Size()) && disjoint(p5, t5.Size(), p3, t3.Size()) && disjoint(p5, t5.Size(), p4, t4.Size())) {
10597 break
10598 }
10599 v.copyOf(x)
10600 return true
10601 }
10602
10603
10604
10605 for {
10606 t1 := v.Type
10607 p1 := v_0
10608 if v_1.Op != OpStore {
10609 break
10610 }
10611 t2 := auxToType(v_1.Aux)
10612 _ = v_1.Args[1]
10613 p2 := v_1.Args[0]
10614 v_1_1 := v_1.Args[1]
10615 if v_1_1.Op != OpConst64 {
10616 break
10617 }
10618 x := auxIntToInt64(v_1_1.AuxInt)
10619 if !(isSamePtr(p1, p2) && sizeof(t2) == 8 && is64BitFloat(t1) && !math.IsNaN(math.Float64frombits(uint64(x)))) {
10620 break
10621 }
10622 v.reset(OpConst64F)
10623 v.AuxInt = float64ToAuxInt(math.Float64frombits(uint64(x)))
10624 return true
10625 }
10626
10627
10628
10629 for {
10630 t1 := v.Type
10631 p1 := v_0
10632 if v_1.Op != OpStore {
10633 break
10634 }
10635 t2 := auxToType(v_1.Aux)
10636 _ = v_1.Args[1]
10637 p2 := v_1.Args[0]
10638 v_1_1 := v_1.Args[1]
10639 if v_1_1.Op != OpConst32 {
10640 break
10641 }
10642 x := auxIntToInt32(v_1_1.AuxInt)
10643 if !(isSamePtr(p1, p2) && sizeof(t2) == 4 && is32BitFloat(t1) && !math.IsNaN(float64(math.Float32frombits(uint32(x))))) {
10644 break
10645 }
10646 v.reset(OpConst32F)
10647 v.AuxInt = float32ToAuxInt(math.Float32frombits(uint32(x)))
10648 return true
10649 }
10650
10651
10652
10653 for {
10654 t1 := v.Type
10655 p1 := v_0
10656 if v_1.Op != OpStore {
10657 break
10658 }
10659 t2 := auxToType(v_1.Aux)
10660 _ = v_1.Args[1]
10661 p2 := v_1.Args[0]
10662 v_1_1 := v_1.Args[1]
10663 if v_1_1.Op != OpConst64F {
10664 break
10665 }
10666 x := auxIntToFloat64(v_1_1.AuxInt)
10667 if !(isSamePtr(p1, p2) && sizeof(t2) == 8 && is64BitInt(t1)) {
10668 break
10669 }
10670 v.reset(OpConst64)
10671 v.AuxInt = int64ToAuxInt(int64(math.Float64bits(x)))
10672 return true
10673 }
10674
10675
10676
10677 for {
10678 t1 := v.Type
10679 p1 := v_0
10680 if v_1.Op != OpStore {
10681 break
10682 }
10683 t2 := auxToType(v_1.Aux)
10684 _ = v_1.Args[1]
10685 p2 := v_1.Args[0]
10686 v_1_1 := v_1.Args[1]
10687 if v_1_1.Op != OpConst32F {
10688 break
10689 }
10690 x := auxIntToFloat32(v_1_1.AuxInt)
10691 if !(isSamePtr(p1, p2) && sizeof(t2) == 4 && is32BitInt(t1)) {
10692 break
10693 }
10694 v.reset(OpConst32)
10695 v.AuxInt = int32ToAuxInt(int32(math.Float32bits(x)))
10696 return true
10697 }
10698
10699
10700
10701 for {
10702 t1 := v.Type
10703 op := v_0
10704 if op.Op != OpOffPtr {
10705 break
10706 }
10707 o1 := auxIntToInt64(op.AuxInt)
10708 p1 := op.Args[0]
10709 if v_1.Op != OpStore {
10710 break
10711 }
10712 t2 := auxToType(v_1.Aux)
10713 _ = v_1.Args[2]
10714 p2 := v_1.Args[0]
10715 mem := v_1.Args[2]
10716 if mem.Op != OpZero {
10717 break
10718 }
10719 n := auxIntToInt64(mem.AuxInt)
10720 p3 := mem.Args[0]
10721 if !(o1 >= 0 && o1+t1.Size() <= n && isSamePtr(p1, p3) && fe.CanSSA(t1) && disjoint(op, t1.Size(), p2, t2.Size())) {
10722 break
10723 }
10724 b = mem.Block
10725 v0 := b.NewValue0(v.Pos, OpLoad, t1)
10726 v.copyOf(v0)
10727 v1 := b.NewValue0(v.Pos, OpOffPtr, op.Type)
10728 v1.AuxInt = int64ToAuxInt(o1)
10729 v1.AddArg(p3)
10730 v0.AddArg2(v1, mem)
10731 return true
10732 }
10733
10734
10735
10736 for {
10737 t1 := v.Type
10738 op := v_0
10739 if op.Op != OpOffPtr {
10740 break
10741 }
10742 o1 := auxIntToInt64(op.AuxInt)
10743 p1 := op.Args[0]
10744 if v_1.Op != OpStore {
10745 break
10746 }
10747 t2 := auxToType(v_1.Aux)
10748 _ = v_1.Args[2]
10749 p2 := v_1.Args[0]
10750 v_1_2 := v_1.Args[2]
10751 if v_1_2.Op != OpStore {
10752 break
10753 }
10754 t3 := auxToType(v_1_2.Aux)
10755 _ = v_1_2.Args[2]
10756 p3 := v_1_2.Args[0]
10757 mem := v_1_2.Args[2]
10758 if mem.Op != OpZero {
10759 break
10760 }
10761 n := auxIntToInt64(mem.AuxInt)
10762 p4 := mem.Args[0]
10763 if !(o1 >= 0 && o1+t1.Size() <= n && isSamePtr(p1, p4) && fe.CanSSA(t1) && disjoint(op, t1.Size(), p2, t2.Size()) && disjoint(op, t1.Size(), p3, t3.Size())) {
10764 break
10765 }
10766 b = mem.Block
10767 v0 := b.NewValue0(v.Pos, OpLoad, t1)
10768 v.copyOf(v0)
10769 v1 := b.NewValue0(v.Pos, OpOffPtr, op.Type)
10770 v1.AuxInt = int64ToAuxInt(o1)
10771 v1.AddArg(p4)
10772 v0.AddArg2(v1, mem)
10773 return true
10774 }
10775
10776
10777
10778 for {
10779 t1 := v.Type
10780 op := v_0
10781 if op.Op != OpOffPtr {
10782 break
10783 }
10784 o1 := auxIntToInt64(op.AuxInt)
10785 p1 := op.Args[0]
10786 if v_1.Op != OpStore {
10787 break
10788 }
10789 t2 := auxToType(v_1.Aux)
10790 _ = v_1.Args[2]
10791 p2 := v_1.Args[0]
10792 v_1_2 := v_1.Args[2]
10793 if v_1_2.Op != OpStore {
10794 break
10795 }
10796 t3 := auxToType(v_1_2.Aux)
10797 _ = v_1_2.Args[2]
10798 p3 := v_1_2.Args[0]
10799 v_1_2_2 := v_1_2.Args[2]
10800 if v_1_2_2.Op != OpStore {
10801 break
10802 }
10803 t4 := auxToType(v_1_2_2.Aux)
10804 _ = v_1_2_2.Args[2]
10805 p4 := v_1_2_2.Args[0]
10806 mem := v_1_2_2.Args[2]
10807 if mem.Op != OpZero {
10808 break
10809 }
10810 n := auxIntToInt64(mem.AuxInt)
10811 p5 := mem.Args[0]
10812 if !(o1 >= 0 && o1+t1.Size() <= n && isSamePtr(p1, p5) && fe.CanSSA(t1) && disjoint(op, t1.Size(), p2, t2.Size()) && disjoint(op, t1.Size(), p3, t3.Size()) && disjoint(op, t1.Size(), p4, t4.Size())) {
10813 break
10814 }
10815 b = mem.Block
10816 v0 := b.NewValue0(v.Pos, OpLoad, t1)
10817 v.copyOf(v0)
10818 v1 := b.NewValue0(v.Pos, OpOffPtr, op.Type)
10819 v1.AuxInt = int64ToAuxInt(o1)
10820 v1.AddArg(p5)
10821 v0.AddArg2(v1, mem)
10822 return true
10823 }
10824
10825
10826
10827 for {
10828 t1 := v.Type
10829 op := v_0
10830 if op.Op != OpOffPtr {
10831 break
10832 }
10833 o1 := auxIntToInt64(op.AuxInt)
10834 p1 := op.Args[0]
10835 if v_1.Op != OpStore {
10836 break
10837 }
10838 t2 := auxToType(v_1.Aux)
10839 _ = v_1.Args[2]
10840 p2 := v_1.Args[0]
10841 v_1_2 := v_1.Args[2]
10842 if v_1_2.Op != OpStore {
10843 break
10844 }
10845 t3 := auxToType(v_1_2.Aux)
10846 _ = v_1_2.Args[2]
10847 p3 := v_1_2.Args[0]
10848 v_1_2_2 := v_1_2.Args[2]
10849 if v_1_2_2.Op != OpStore {
10850 break
10851 }
10852 t4 := auxToType(v_1_2_2.Aux)
10853 _ = v_1_2_2.Args[2]
10854 p4 := v_1_2_2.Args[0]
10855 v_1_2_2_2 := v_1_2_2.Args[2]
10856 if v_1_2_2_2.Op != OpStore {
10857 break
10858 }
10859 t5 := auxToType(v_1_2_2_2.Aux)
10860 _ = v_1_2_2_2.Args[2]
10861 p5 := v_1_2_2_2.Args[0]
10862 mem := v_1_2_2_2.Args[2]
10863 if mem.Op != OpZero {
10864 break
10865 }
10866 n := auxIntToInt64(mem.AuxInt)
10867 p6 := mem.Args[0]
10868 if !(o1 >= 0 && o1+t1.Size() <= n && isSamePtr(p1, p6) && fe.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())) {
10869 break
10870 }
10871 b = mem.Block
10872 v0 := b.NewValue0(v.Pos, OpLoad, t1)
10873 v.copyOf(v0)
10874 v1 := b.NewValue0(v.Pos, OpOffPtr, op.Type)
10875 v1.AuxInt = int64ToAuxInt(o1)
10876 v1.AddArg(p6)
10877 v0.AddArg2(v1, mem)
10878 return true
10879 }
10880
10881
10882
10883 for {
10884 t1 := v.Type
10885 if v_0.Op != OpOffPtr {
10886 break
10887 }
10888 o := auxIntToInt64(v_0.AuxInt)
10889 p1 := v_0.Args[0]
10890 if v_1.Op != OpZero {
10891 break
10892 }
10893 n := auxIntToInt64(v_1.AuxInt)
10894 p2 := v_1.Args[0]
10895 if !(t1.IsBoolean() && isSamePtr(p1, p2) && n >= o+1) {
10896 break
10897 }
10898 v.reset(OpConstBool)
10899 v.AuxInt = boolToAuxInt(false)
10900 return true
10901 }
10902
10903
10904
10905 for {
10906 t1 := v.Type
10907 if v_0.Op != OpOffPtr {
10908 break
10909 }
10910 o := auxIntToInt64(v_0.AuxInt)
10911 p1 := v_0.Args[0]
10912 if v_1.Op != OpZero {
10913 break
10914 }
10915 n := auxIntToInt64(v_1.AuxInt)
10916 p2 := v_1.Args[0]
10917 if !(is8BitInt(t1) && isSamePtr(p1, p2) && n >= o+1) {
10918 break
10919 }
10920 v.reset(OpConst8)
10921 v.AuxInt = int8ToAuxInt(0)
10922 return true
10923 }
10924
10925
10926
10927 for {
10928 t1 := v.Type
10929 if v_0.Op != OpOffPtr {
10930 break
10931 }
10932 o := auxIntToInt64(v_0.AuxInt)
10933 p1 := v_0.Args[0]
10934 if v_1.Op != OpZero {
10935 break
10936 }
10937 n := auxIntToInt64(v_1.AuxInt)
10938 p2 := v_1.Args[0]
10939 if !(is16BitInt(t1) && isSamePtr(p1, p2) && n >= o+2) {
10940 break
10941 }
10942 v.reset(OpConst16)
10943 v.AuxInt = int16ToAuxInt(0)
10944 return true
10945 }
10946
10947
10948
10949 for {
10950 t1 := v.Type
10951 if v_0.Op != OpOffPtr {
10952 break
10953 }
10954 o := auxIntToInt64(v_0.AuxInt)
10955 p1 := v_0.Args[0]
10956 if v_1.Op != OpZero {
10957 break
10958 }
10959 n := auxIntToInt64(v_1.AuxInt)
10960 p2 := v_1.Args[0]
10961 if !(is32BitInt(t1) && isSamePtr(p1, p2) && n >= o+4) {
10962 break
10963 }
10964 v.reset(OpConst32)
10965 v.AuxInt = int32ToAuxInt(0)
10966 return true
10967 }
10968
10969
10970
10971 for {
10972 t1 := v.Type
10973 if v_0.Op != OpOffPtr {
10974 break
10975 }
10976 o := auxIntToInt64(v_0.AuxInt)
10977 p1 := v_0.Args[0]
10978 if v_1.Op != OpZero {
10979 break
10980 }
10981 n := auxIntToInt64(v_1.AuxInt)
10982 p2 := v_1.Args[0]
10983 if !(is64BitInt(t1) && isSamePtr(p1, p2) && n >= o+8) {
10984 break
10985 }
10986 v.reset(OpConst64)
10987 v.AuxInt = int64ToAuxInt(0)
10988 return true
10989 }
10990
10991
10992
10993 for {
10994 t1 := v.Type
10995 if v_0.Op != OpOffPtr {
10996 break
10997 }
10998 o := auxIntToInt64(v_0.AuxInt)
10999 p1 := v_0.Args[0]
11000 if v_1.Op != OpZero {
11001 break
11002 }
11003 n := auxIntToInt64(v_1.AuxInt)
11004 p2 := v_1.Args[0]
11005 if !(is32BitFloat(t1) && isSamePtr(p1, p2) && n >= o+4) {
11006 break
11007 }
11008 v.reset(OpConst32F)
11009 v.AuxInt = float32ToAuxInt(0)
11010 return true
11011 }
11012
11013
11014
11015 for {
11016 t1 := v.Type
11017 if v_0.Op != OpOffPtr {
11018 break
11019 }
11020 o := auxIntToInt64(v_0.AuxInt)
11021 p1 := v_0.Args[0]
11022 if v_1.Op != OpZero {
11023 break
11024 }
11025 n := auxIntToInt64(v_1.AuxInt)
11026 p2 := v_1.Args[0]
11027 if !(is64BitFloat(t1) && isSamePtr(p1, p2) && n >= o+8) {
11028 break
11029 }
11030 v.reset(OpConst64F)
11031 v.AuxInt = float64ToAuxInt(0)
11032 return true
11033 }
11034
11035
11036
11037 for {
11038 t := v.Type
11039 if !(t.IsStruct() && t.NumFields() == 0 && fe.CanSSA(t)) {
11040 break
11041 }
11042 v.reset(OpStructMake0)
11043 return true
11044 }
11045
11046
11047
11048 for {
11049 t := v.Type
11050 ptr := v_0
11051 mem := v_1
11052 if !(t.IsStruct() && t.NumFields() == 1 && fe.CanSSA(t)) {
11053 break
11054 }
11055 v.reset(OpStructMake1)
11056 v0 := b.NewValue0(v.Pos, OpLoad, t.FieldType(0))
11057 v1 := b.NewValue0(v.Pos, OpOffPtr, t.FieldType(0).PtrTo())
11058 v1.AuxInt = int64ToAuxInt(0)
11059 v1.AddArg(ptr)
11060 v0.AddArg2(v1, mem)
11061 v.AddArg(v0)
11062 return true
11063 }
11064
11065
11066
11067 for {
11068 t := v.Type
11069 ptr := v_0
11070 mem := v_1
11071 if !(t.IsStruct() && t.NumFields() == 2 && fe.CanSSA(t)) {
11072 break
11073 }
11074 v.reset(OpStructMake2)
11075 v0 := b.NewValue0(v.Pos, OpLoad, t.FieldType(0))
11076 v1 := b.NewValue0(v.Pos, OpOffPtr, t.FieldType(0).PtrTo())
11077 v1.AuxInt = int64ToAuxInt(0)
11078 v1.AddArg(ptr)
11079 v0.AddArg2(v1, mem)
11080 v2 := b.NewValue0(v.Pos, OpLoad, t.FieldType(1))
11081 v3 := b.NewValue0(v.Pos, OpOffPtr, t.FieldType(1).PtrTo())
11082 v3.AuxInt = int64ToAuxInt(t.FieldOff(1))
11083 v3.AddArg(ptr)
11084 v2.AddArg2(v3, mem)
11085 v.AddArg2(v0, v2)
11086 return true
11087 }
11088
11089
11090
11091 for {
11092 t := v.Type
11093 ptr := v_0
11094 mem := v_1
11095 if !(t.IsStruct() && t.NumFields() == 3 && fe.CanSSA(t)) {
11096 break
11097 }
11098 v.reset(OpStructMake3)
11099 v0 := b.NewValue0(v.Pos, OpLoad, t.FieldType(0))
11100 v1 := b.NewValue0(v.Pos, OpOffPtr, t.FieldType(0).PtrTo())
11101 v1.AuxInt = int64ToAuxInt(0)
11102 v1.AddArg(ptr)
11103 v0.AddArg2(v1, mem)
11104 v2 := b.NewValue0(v.Pos, OpLoad, t.FieldType(1))
11105 v3 := b.NewValue0(v.Pos, OpOffPtr, t.FieldType(1).PtrTo())
11106 v3.AuxInt = int64ToAuxInt(t.FieldOff(1))
11107 v3.AddArg(ptr)
11108 v2.AddArg2(v3, mem)
11109 v4 := b.NewValue0(v.Pos, OpLoad, t.FieldType(2))
11110 v5 := b.NewValue0(v.Pos, OpOffPtr, t.FieldType(2).PtrTo())
11111 v5.AuxInt = int64ToAuxInt(t.FieldOff(2))
11112 v5.AddArg(ptr)
11113 v4.AddArg2(v5, mem)
11114 v.AddArg3(v0, v2, v4)
11115 return true
11116 }
11117
11118
11119
11120 for {
11121 t := v.Type
11122 ptr := v_0
11123 mem := v_1
11124 if !(t.IsStruct() && t.NumFields() == 4 && fe.CanSSA(t)) {
11125 break
11126 }
11127 v.reset(OpStructMake4)
11128 v0 := b.NewValue0(v.Pos, OpLoad, t.FieldType(0))
11129 v1 := b.NewValue0(v.Pos, OpOffPtr, t.FieldType(0).PtrTo())
11130 v1.AuxInt = int64ToAuxInt(0)
11131 v1.AddArg(ptr)
11132 v0.AddArg2(v1, mem)
11133 v2 := b.NewValue0(v.Pos, OpLoad, t.FieldType(1))
11134 v3 := b.NewValue0(v.Pos, OpOffPtr, t.FieldType(1).PtrTo())
11135 v3.AuxInt = int64ToAuxInt(t.FieldOff(1))
11136 v3.AddArg(ptr)
11137 v2.AddArg2(v3, mem)
11138 v4 := b.NewValue0(v.Pos, OpLoad, t.FieldType(2))
11139 v5 := b.NewValue0(v.Pos, OpOffPtr, t.FieldType(2).PtrTo())
11140 v5.AuxInt = int64ToAuxInt(t.FieldOff(2))
11141 v5.AddArg(ptr)
11142 v4.AddArg2(v5, mem)
11143 v6 := b.NewValue0(v.Pos, OpLoad, t.FieldType(3))
11144 v7 := b.NewValue0(v.Pos, OpOffPtr, t.FieldType(3).PtrTo())
11145 v7.AuxInt = int64ToAuxInt(t.FieldOff(3))
11146 v7.AddArg(ptr)
11147 v6.AddArg2(v7, mem)
11148 v.AddArg4(v0, v2, v4, v6)
11149 return true
11150 }
11151
11152
11153
11154 for {
11155 t := v.Type
11156 if !(t.IsArray() && t.NumElem() == 0) {
11157 break
11158 }
11159 v.reset(OpArrayMake0)
11160 return true
11161 }
11162
11163
11164
11165 for {
11166 t := v.Type
11167 ptr := v_0
11168 mem := v_1
11169 if !(t.IsArray() && t.NumElem() == 1 && fe.CanSSA(t)) {
11170 break
11171 }
11172 v.reset(OpArrayMake1)
11173 v0 := b.NewValue0(v.Pos, OpLoad, t.Elem())
11174 v0.AddArg2(ptr, mem)
11175 v.AddArg(v0)
11176 return true
11177 }
11178 return false
11179 }
11180 func rewriteValuegeneric_OpLsh16x16(v *Value) bool {
11181 v_1 := v.Args[1]
11182 v_0 := v.Args[0]
11183 b := v.Block
11184
11185
11186 for {
11187 t := v.Type
11188 x := v_0
11189 if v_1.Op != OpConst16 {
11190 break
11191 }
11192 c := auxIntToInt16(v_1.AuxInt)
11193 v.reset(OpLsh16x64)
11194 v0 := b.NewValue0(v.Pos, OpConst64, t)
11195 v0.AuxInt = int64ToAuxInt(int64(uint16(c)))
11196 v.AddArg2(x, v0)
11197 return true
11198 }
11199
11200
11201 for {
11202 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 {
11203 break
11204 }
11205 v.reset(OpConst16)
11206 v.AuxInt = int16ToAuxInt(0)
11207 return true
11208 }
11209 return false
11210 }
11211 func rewriteValuegeneric_OpLsh16x32(v *Value) bool {
11212 v_1 := v.Args[1]
11213 v_0 := v.Args[0]
11214 b := v.Block
11215
11216
11217 for {
11218 t := v.Type
11219 x := v_0
11220 if v_1.Op != OpConst32 {
11221 break
11222 }
11223 c := auxIntToInt32(v_1.AuxInt)
11224 v.reset(OpLsh16x64)
11225 v0 := b.NewValue0(v.Pos, OpConst64, t)
11226 v0.AuxInt = int64ToAuxInt(int64(uint32(c)))
11227 v.AddArg2(x, v0)
11228 return true
11229 }
11230
11231
11232 for {
11233 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 {
11234 break
11235 }
11236 v.reset(OpConst16)
11237 v.AuxInt = int16ToAuxInt(0)
11238 return true
11239 }
11240 return false
11241 }
11242 func rewriteValuegeneric_OpLsh16x64(v *Value) bool {
11243 v_1 := v.Args[1]
11244 v_0 := v.Args[0]
11245 b := v.Block
11246 typ := &b.Func.Config.Types
11247
11248
11249 for {
11250 if v_0.Op != OpConst16 {
11251 break
11252 }
11253 c := auxIntToInt16(v_0.AuxInt)
11254 if v_1.Op != OpConst64 {
11255 break
11256 }
11257 d := auxIntToInt64(v_1.AuxInt)
11258 v.reset(OpConst16)
11259 v.AuxInt = int16ToAuxInt(c << uint64(d))
11260 return true
11261 }
11262
11263
11264 for {
11265 x := v_0
11266 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 0 {
11267 break
11268 }
11269 v.copyOf(x)
11270 return true
11271 }
11272
11273
11274 for {
11275 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 {
11276 break
11277 }
11278 v.reset(OpConst16)
11279 v.AuxInt = int16ToAuxInt(0)
11280 return true
11281 }
11282
11283
11284
11285 for {
11286 if v_1.Op != OpConst64 {
11287 break
11288 }
11289 c := auxIntToInt64(v_1.AuxInt)
11290 if !(uint64(c) >= 16) {
11291 break
11292 }
11293 v.reset(OpConst16)
11294 v.AuxInt = int16ToAuxInt(0)
11295 return true
11296 }
11297
11298
11299
11300 for {
11301 t := v.Type
11302 if v_0.Op != OpLsh16x64 {
11303 break
11304 }
11305 _ = v_0.Args[1]
11306 x := v_0.Args[0]
11307 v_0_1 := v_0.Args[1]
11308 if v_0_1.Op != OpConst64 {
11309 break
11310 }
11311 c := auxIntToInt64(v_0_1.AuxInt)
11312 if v_1.Op != OpConst64 {
11313 break
11314 }
11315 d := auxIntToInt64(v_1.AuxInt)
11316 if !(!uaddOvf(c, d)) {
11317 break
11318 }
11319 v.reset(OpLsh16x64)
11320 v0 := b.NewValue0(v.Pos, OpConst64, t)
11321 v0.AuxInt = int64ToAuxInt(c + d)
11322 v.AddArg2(x, v0)
11323 return true
11324 }
11325
11326
11327
11328 for {
11329 if v_0.Op != OpRsh16Ux64 {
11330 break
11331 }
11332 _ = v_0.Args[1]
11333 v_0_0 := v_0.Args[0]
11334 if v_0_0.Op != OpLsh16x64 {
11335 break
11336 }
11337 _ = v_0_0.Args[1]
11338 x := v_0_0.Args[0]
11339 v_0_0_1 := v_0_0.Args[1]
11340 if v_0_0_1.Op != OpConst64 {
11341 break
11342 }
11343 c1 := auxIntToInt64(v_0_0_1.AuxInt)
11344 v_0_1 := v_0.Args[1]
11345 if v_0_1.Op != OpConst64 {
11346 break
11347 }
11348 c2 := auxIntToInt64(v_0_1.AuxInt)
11349 if v_1.Op != OpConst64 {
11350 break
11351 }
11352 c3 := auxIntToInt64(v_1.AuxInt)
11353 if !(uint64(c1) >= uint64(c2) && uint64(c3) >= uint64(c2) && !uaddOvf(c1-c2, c3)) {
11354 break
11355 }
11356 v.reset(OpLsh16x64)
11357 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
11358 v0.AuxInt = int64ToAuxInt(c1 - c2 + c3)
11359 v.AddArg2(x, v0)
11360 return true
11361 }
11362 return false
11363 }
11364 func rewriteValuegeneric_OpLsh16x8(v *Value) bool {
11365 v_1 := v.Args[1]
11366 v_0 := v.Args[0]
11367 b := v.Block
11368
11369
11370 for {
11371 t := v.Type
11372 x := v_0
11373 if v_1.Op != OpConst8 {
11374 break
11375 }
11376 c := auxIntToInt8(v_1.AuxInt)
11377 v.reset(OpLsh16x64)
11378 v0 := b.NewValue0(v.Pos, OpConst64, t)
11379 v0.AuxInt = int64ToAuxInt(int64(uint8(c)))
11380 v.AddArg2(x, v0)
11381 return true
11382 }
11383
11384
11385 for {
11386 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 {
11387 break
11388 }
11389 v.reset(OpConst16)
11390 v.AuxInt = int16ToAuxInt(0)
11391 return true
11392 }
11393 return false
11394 }
11395 func rewriteValuegeneric_OpLsh32x16(v *Value) bool {
11396 v_1 := v.Args[1]
11397 v_0 := v.Args[0]
11398 b := v.Block
11399
11400
11401 for {
11402 t := v.Type
11403 x := v_0
11404 if v_1.Op != OpConst16 {
11405 break
11406 }
11407 c := auxIntToInt16(v_1.AuxInt)
11408 v.reset(OpLsh32x64)
11409 v0 := b.NewValue0(v.Pos, OpConst64, t)
11410 v0.AuxInt = int64ToAuxInt(int64(uint16(c)))
11411 v.AddArg2(x, v0)
11412 return true
11413 }
11414
11415
11416 for {
11417 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
11418 break
11419 }
11420 v.reset(OpConst32)
11421 v.AuxInt = int32ToAuxInt(0)
11422 return true
11423 }
11424 return false
11425 }
11426 func rewriteValuegeneric_OpLsh32x32(v *Value) bool {
11427 v_1 := v.Args[1]
11428 v_0 := v.Args[0]
11429 b := v.Block
11430
11431
11432 for {
11433 t := v.Type
11434 x := v_0
11435 if v_1.Op != OpConst32 {
11436 break
11437 }
11438 c := auxIntToInt32(v_1.AuxInt)
11439 v.reset(OpLsh32x64)
11440 v0 := b.NewValue0(v.Pos, OpConst64, t)
11441 v0.AuxInt = int64ToAuxInt(int64(uint32(c)))
11442 v.AddArg2(x, v0)
11443 return true
11444 }
11445
11446
11447 for {
11448 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
11449 break
11450 }
11451 v.reset(OpConst32)
11452 v.AuxInt = int32ToAuxInt(0)
11453 return true
11454 }
11455 return false
11456 }
11457 func rewriteValuegeneric_OpLsh32x64(v *Value) bool {
11458 v_1 := v.Args[1]
11459 v_0 := v.Args[0]
11460 b := v.Block
11461 typ := &b.Func.Config.Types
11462
11463
11464 for {
11465 if v_0.Op != OpConst32 {
11466 break
11467 }
11468 c := auxIntToInt32(v_0.AuxInt)
11469 if v_1.Op != OpConst64 {
11470 break
11471 }
11472 d := auxIntToInt64(v_1.AuxInt)
11473 v.reset(OpConst32)
11474 v.AuxInt = int32ToAuxInt(c << uint64(d))
11475 return true
11476 }
11477
11478
11479 for {
11480 x := v_0
11481 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 0 {
11482 break
11483 }
11484 v.copyOf(x)
11485 return true
11486 }
11487
11488
11489 for {
11490 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
11491 break
11492 }
11493 v.reset(OpConst32)
11494 v.AuxInt = int32ToAuxInt(0)
11495 return true
11496 }
11497
11498
11499
11500 for {
11501 if v_1.Op != OpConst64 {
11502 break
11503 }
11504 c := auxIntToInt64(v_1.AuxInt)
11505 if !(uint64(c) >= 32) {
11506 break
11507 }
11508 v.reset(OpConst32)
11509 v.AuxInt = int32ToAuxInt(0)
11510 return true
11511 }
11512
11513
11514
11515 for {
11516 t := v.Type
11517 if v_0.Op != OpLsh32x64 {
11518 break
11519 }
11520 _ = v_0.Args[1]
11521 x := v_0.Args[0]
11522 v_0_1 := v_0.Args[1]
11523 if v_0_1.Op != OpConst64 {
11524 break
11525 }
11526 c := auxIntToInt64(v_0_1.AuxInt)
11527 if v_1.Op != OpConst64 {
11528 break
11529 }
11530 d := auxIntToInt64(v_1.AuxInt)
11531 if !(!uaddOvf(c, d)) {
11532 break
11533 }
11534 v.reset(OpLsh32x64)
11535 v0 := b.NewValue0(v.Pos, OpConst64, t)
11536 v0.AuxInt = int64ToAuxInt(c + d)
11537 v.AddArg2(x, v0)
11538 return true
11539 }
11540
11541
11542
11543 for {
11544 if v_0.Op != OpRsh32Ux64 {
11545 break
11546 }
11547 _ = v_0.Args[1]
11548 v_0_0 := v_0.Args[0]
11549 if v_0_0.Op != OpLsh32x64 {
11550 break
11551 }
11552 _ = v_0_0.Args[1]
11553 x := v_0_0.Args[0]
11554 v_0_0_1 := v_0_0.Args[1]
11555 if v_0_0_1.Op != OpConst64 {
11556 break
11557 }
11558 c1 := auxIntToInt64(v_0_0_1.AuxInt)
11559 v_0_1 := v_0.Args[1]
11560 if v_0_1.Op != OpConst64 {
11561 break
11562 }
11563 c2 := auxIntToInt64(v_0_1.AuxInt)
11564 if v_1.Op != OpConst64 {
11565 break
11566 }
11567 c3 := auxIntToInt64(v_1.AuxInt)
11568 if !(uint64(c1) >= uint64(c2) && uint64(c3) >= uint64(c2) && !uaddOvf(c1-c2, c3)) {
11569 break
11570 }
11571 v.reset(OpLsh32x64)
11572 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
11573 v0.AuxInt = int64ToAuxInt(c1 - c2 + c3)
11574 v.AddArg2(x, v0)
11575 return true
11576 }
11577 return false
11578 }
11579 func rewriteValuegeneric_OpLsh32x8(v *Value) bool {
11580 v_1 := v.Args[1]
11581 v_0 := v.Args[0]
11582 b := v.Block
11583
11584
11585 for {
11586 t := v.Type
11587 x := v_0
11588 if v_1.Op != OpConst8 {
11589 break
11590 }
11591 c := auxIntToInt8(v_1.AuxInt)
11592 v.reset(OpLsh32x64)
11593 v0 := b.NewValue0(v.Pos, OpConst64, t)
11594 v0.AuxInt = int64ToAuxInt(int64(uint8(c)))
11595 v.AddArg2(x, v0)
11596 return true
11597 }
11598
11599
11600 for {
11601 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
11602 break
11603 }
11604 v.reset(OpConst32)
11605 v.AuxInt = int32ToAuxInt(0)
11606 return true
11607 }
11608 return false
11609 }
11610 func rewriteValuegeneric_OpLsh64x16(v *Value) bool {
11611 v_1 := v.Args[1]
11612 v_0 := v.Args[0]
11613 b := v.Block
11614
11615
11616 for {
11617 t := v.Type
11618 x := v_0
11619 if v_1.Op != OpConst16 {
11620 break
11621 }
11622 c := auxIntToInt16(v_1.AuxInt)
11623 v.reset(OpLsh64x64)
11624 v0 := b.NewValue0(v.Pos, OpConst64, t)
11625 v0.AuxInt = int64ToAuxInt(int64(uint16(c)))
11626 v.AddArg2(x, v0)
11627 return true
11628 }
11629
11630
11631 for {
11632 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
11633 break
11634 }
11635 v.reset(OpConst64)
11636 v.AuxInt = int64ToAuxInt(0)
11637 return true
11638 }
11639 return false
11640 }
11641 func rewriteValuegeneric_OpLsh64x32(v *Value) bool {
11642 v_1 := v.Args[1]
11643 v_0 := v.Args[0]
11644 b := v.Block
11645
11646
11647 for {
11648 t := v.Type
11649 x := v_0
11650 if v_1.Op != OpConst32 {
11651 break
11652 }
11653 c := auxIntToInt32(v_1.AuxInt)
11654 v.reset(OpLsh64x64)
11655 v0 := b.NewValue0(v.Pos, OpConst64, t)
11656 v0.AuxInt = int64ToAuxInt(int64(uint32(c)))
11657 v.AddArg2(x, v0)
11658 return true
11659 }
11660
11661
11662 for {
11663 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
11664 break
11665 }
11666 v.reset(OpConst64)
11667 v.AuxInt = int64ToAuxInt(0)
11668 return true
11669 }
11670 return false
11671 }
11672 func rewriteValuegeneric_OpLsh64x64(v *Value) bool {
11673 v_1 := v.Args[1]
11674 v_0 := v.Args[0]
11675 b := v.Block
11676 typ := &b.Func.Config.Types
11677
11678
11679 for {
11680 if v_0.Op != OpConst64 {
11681 break
11682 }
11683 c := auxIntToInt64(v_0.AuxInt)
11684 if v_1.Op != OpConst64 {
11685 break
11686 }
11687 d := auxIntToInt64(v_1.AuxInt)
11688 v.reset(OpConst64)
11689 v.AuxInt = int64ToAuxInt(c << uint64(d))
11690 return true
11691 }
11692
11693
11694 for {
11695 x := v_0
11696 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 0 {
11697 break
11698 }
11699 v.copyOf(x)
11700 return true
11701 }
11702
11703
11704 for {
11705 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
11706 break
11707 }
11708 v.reset(OpConst64)
11709 v.AuxInt = int64ToAuxInt(0)
11710 return true
11711 }
11712
11713
11714
11715 for {
11716 if v_1.Op != OpConst64 {
11717 break
11718 }
11719 c := auxIntToInt64(v_1.AuxInt)
11720 if !(uint64(c) >= 64) {
11721 break
11722 }
11723 v.reset(OpConst64)
11724 v.AuxInt = int64ToAuxInt(0)
11725 return true
11726 }
11727
11728
11729
11730 for {
11731 t := v.Type
11732 if v_0.Op != OpLsh64x64 {
11733 break
11734 }
11735 _ = v_0.Args[1]
11736 x := v_0.Args[0]
11737 v_0_1 := v_0.Args[1]
11738 if v_0_1.Op != OpConst64 {
11739 break
11740 }
11741 c := auxIntToInt64(v_0_1.AuxInt)
11742 if v_1.Op != OpConst64 {
11743 break
11744 }
11745 d := auxIntToInt64(v_1.AuxInt)
11746 if !(!uaddOvf(c, d)) {
11747 break
11748 }
11749 v.reset(OpLsh64x64)
11750 v0 := b.NewValue0(v.Pos, OpConst64, t)
11751 v0.AuxInt = int64ToAuxInt(c + d)
11752 v.AddArg2(x, v0)
11753 return true
11754 }
11755
11756
11757
11758 for {
11759 if v_0.Op != OpRsh64Ux64 {
11760 break
11761 }
11762 _ = v_0.Args[1]
11763 v_0_0 := v_0.Args[0]
11764 if v_0_0.Op != OpLsh64x64 {
11765 break
11766 }
11767 _ = v_0_0.Args[1]
11768 x := v_0_0.Args[0]
11769 v_0_0_1 := v_0_0.Args[1]
11770 if v_0_0_1.Op != OpConst64 {
11771 break
11772 }
11773 c1 := auxIntToInt64(v_0_0_1.AuxInt)
11774 v_0_1 := v_0.Args[1]
11775 if v_0_1.Op != OpConst64 {
11776 break
11777 }
11778 c2 := auxIntToInt64(v_0_1.AuxInt)
11779 if v_1.Op != OpConst64 {
11780 break
11781 }
11782 c3 := auxIntToInt64(v_1.AuxInt)
11783 if !(uint64(c1) >= uint64(c2) && uint64(c3) >= uint64(c2) && !uaddOvf(c1-c2, c3)) {
11784 break
11785 }
11786 v.reset(OpLsh64x64)
11787 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
11788 v0.AuxInt = int64ToAuxInt(c1 - c2 + c3)
11789 v.AddArg2(x, v0)
11790 return true
11791 }
11792 return false
11793 }
11794 func rewriteValuegeneric_OpLsh64x8(v *Value) bool {
11795 v_1 := v.Args[1]
11796 v_0 := v.Args[0]
11797 b := v.Block
11798
11799
11800 for {
11801 t := v.Type
11802 x := v_0
11803 if v_1.Op != OpConst8 {
11804 break
11805 }
11806 c := auxIntToInt8(v_1.AuxInt)
11807 v.reset(OpLsh64x64)
11808 v0 := b.NewValue0(v.Pos, OpConst64, t)
11809 v0.AuxInt = int64ToAuxInt(int64(uint8(c)))
11810 v.AddArg2(x, v0)
11811 return true
11812 }
11813
11814
11815 for {
11816 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
11817 break
11818 }
11819 v.reset(OpConst64)
11820 v.AuxInt = int64ToAuxInt(0)
11821 return true
11822 }
11823 return false
11824 }
11825 func rewriteValuegeneric_OpLsh8x16(v *Value) bool {
11826 v_1 := v.Args[1]
11827 v_0 := v.Args[0]
11828 b := v.Block
11829
11830
11831 for {
11832 t := v.Type
11833 x := v_0
11834 if v_1.Op != OpConst16 {
11835 break
11836 }
11837 c := auxIntToInt16(v_1.AuxInt)
11838 v.reset(OpLsh8x64)
11839 v0 := b.NewValue0(v.Pos, OpConst64, t)
11840 v0.AuxInt = int64ToAuxInt(int64(uint16(c)))
11841 v.AddArg2(x, v0)
11842 return true
11843 }
11844
11845
11846 for {
11847 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 {
11848 break
11849 }
11850 v.reset(OpConst8)
11851 v.AuxInt = int8ToAuxInt(0)
11852 return true
11853 }
11854 return false
11855 }
11856 func rewriteValuegeneric_OpLsh8x32(v *Value) bool {
11857 v_1 := v.Args[1]
11858 v_0 := v.Args[0]
11859 b := v.Block
11860
11861
11862 for {
11863 t := v.Type
11864 x := v_0
11865 if v_1.Op != OpConst32 {
11866 break
11867 }
11868 c := auxIntToInt32(v_1.AuxInt)
11869 v.reset(OpLsh8x64)
11870 v0 := b.NewValue0(v.Pos, OpConst64, t)
11871 v0.AuxInt = int64ToAuxInt(int64(uint32(c)))
11872 v.AddArg2(x, v0)
11873 return true
11874 }
11875
11876
11877 for {
11878 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 {
11879 break
11880 }
11881 v.reset(OpConst8)
11882 v.AuxInt = int8ToAuxInt(0)
11883 return true
11884 }
11885 return false
11886 }
11887 func rewriteValuegeneric_OpLsh8x64(v *Value) bool {
11888 v_1 := v.Args[1]
11889 v_0 := v.Args[0]
11890 b := v.Block
11891 typ := &b.Func.Config.Types
11892
11893
11894 for {
11895 if v_0.Op != OpConst8 {
11896 break
11897 }
11898 c := auxIntToInt8(v_0.AuxInt)
11899 if v_1.Op != OpConst64 {
11900 break
11901 }
11902 d := auxIntToInt64(v_1.AuxInt)
11903 v.reset(OpConst8)
11904 v.AuxInt = int8ToAuxInt(c << uint64(d))
11905 return true
11906 }
11907
11908
11909 for {
11910 x := v_0
11911 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 0 {
11912 break
11913 }
11914 v.copyOf(x)
11915 return true
11916 }
11917
11918
11919 for {
11920 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 {
11921 break
11922 }
11923 v.reset(OpConst8)
11924 v.AuxInt = int8ToAuxInt(0)
11925 return true
11926 }
11927
11928
11929
11930 for {
11931 if v_1.Op != OpConst64 {
11932 break
11933 }
11934 c := auxIntToInt64(v_1.AuxInt)
11935 if !(uint64(c) >= 8) {
11936 break
11937 }
11938 v.reset(OpConst8)
11939 v.AuxInt = int8ToAuxInt(0)
11940 return true
11941 }
11942
11943
11944
11945 for {
11946 t := v.Type
11947 if v_0.Op != OpLsh8x64 {
11948 break
11949 }
11950 _ = v_0.Args[1]
11951 x := v_0.Args[0]
11952 v_0_1 := v_0.Args[1]
11953 if v_0_1.Op != OpConst64 {
11954 break
11955 }
11956 c := auxIntToInt64(v_0_1.AuxInt)
11957 if v_1.Op != OpConst64 {
11958 break
11959 }
11960 d := auxIntToInt64(v_1.AuxInt)
11961 if !(!uaddOvf(c, d)) {
11962 break
11963 }
11964 v.reset(OpLsh8x64)
11965 v0 := b.NewValue0(v.Pos, OpConst64, t)
11966 v0.AuxInt = int64ToAuxInt(c + d)
11967 v.AddArg2(x, v0)
11968 return true
11969 }
11970
11971
11972
11973 for {
11974 if v_0.Op != OpRsh8Ux64 {
11975 break
11976 }
11977 _ = v_0.Args[1]
11978 v_0_0 := v_0.Args[0]
11979 if v_0_0.Op != OpLsh8x64 {
11980 break
11981 }
11982 _ = v_0_0.Args[1]
11983 x := v_0_0.Args[0]
11984 v_0_0_1 := v_0_0.Args[1]
11985 if v_0_0_1.Op != OpConst64 {
11986 break
11987 }
11988 c1 := auxIntToInt64(v_0_0_1.AuxInt)
11989 v_0_1 := v_0.Args[1]
11990 if v_0_1.Op != OpConst64 {
11991 break
11992 }
11993 c2 := auxIntToInt64(v_0_1.AuxInt)
11994 if v_1.Op != OpConst64 {
11995 break
11996 }
11997 c3 := auxIntToInt64(v_1.AuxInt)
11998 if !(uint64(c1) >= uint64(c2) && uint64(c3) >= uint64(c2) && !uaddOvf(c1-c2, c3)) {
11999 break
12000 }
12001 v.reset(OpLsh8x64)
12002 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
12003 v0.AuxInt = int64ToAuxInt(c1 - c2 + c3)
12004 v.AddArg2(x, v0)
12005 return true
12006 }
12007 return false
12008 }
12009 func rewriteValuegeneric_OpLsh8x8(v *Value) bool {
12010 v_1 := v.Args[1]
12011 v_0 := v.Args[0]
12012 b := v.Block
12013
12014
12015 for {
12016 t := v.Type
12017 x := v_0
12018 if v_1.Op != OpConst8 {
12019 break
12020 }
12021 c := auxIntToInt8(v_1.AuxInt)
12022 v.reset(OpLsh8x64)
12023 v0 := b.NewValue0(v.Pos, OpConst64, t)
12024 v0.AuxInt = int64ToAuxInt(int64(uint8(c)))
12025 v.AddArg2(x, v0)
12026 return true
12027 }
12028
12029
12030 for {
12031 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 {
12032 break
12033 }
12034 v.reset(OpConst8)
12035 v.AuxInt = int8ToAuxInt(0)
12036 return true
12037 }
12038 return false
12039 }
12040 func rewriteValuegeneric_OpMod16(v *Value) bool {
12041 v_1 := v.Args[1]
12042 v_0 := v.Args[0]
12043 b := v.Block
12044
12045
12046
12047 for {
12048 if v_0.Op != OpConst16 {
12049 break
12050 }
12051 c := auxIntToInt16(v_0.AuxInt)
12052 if v_1.Op != OpConst16 {
12053 break
12054 }
12055 d := auxIntToInt16(v_1.AuxInt)
12056 if !(d != 0) {
12057 break
12058 }
12059 v.reset(OpConst16)
12060 v.AuxInt = int16ToAuxInt(c % d)
12061 return true
12062 }
12063
12064
12065
12066 for {
12067 t := v.Type
12068 n := v_0
12069 if v_1.Op != OpConst16 {
12070 break
12071 }
12072 c := auxIntToInt16(v_1.AuxInt)
12073 if !(isNonNegative(n) && isPowerOfTwo16(c)) {
12074 break
12075 }
12076 v.reset(OpAnd16)
12077 v0 := b.NewValue0(v.Pos, OpConst16, t)
12078 v0.AuxInt = int16ToAuxInt(c - 1)
12079 v.AddArg2(n, v0)
12080 return true
12081 }
12082
12083
12084
12085 for {
12086 t := v.Type
12087 n := v_0
12088 if v_1.Op != OpConst16 {
12089 break
12090 }
12091 c := auxIntToInt16(v_1.AuxInt)
12092 if !(c < 0 && c != -1<<15) {
12093 break
12094 }
12095 v.reset(OpMod16)
12096 v.Type = t
12097 v0 := b.NewValue0(v.Pos, OpConst16, t)
12098 v0.AuxInt = int16ToAuxInt(-c)
12099 v.AddArg2(n, v0)
12100 return true
12101 }
12102
12103
12104
12105 for {
12106 t := v.Type
12107 x := v_0
12108 if v_1.Op != OpConst16 {
12109 break
12110 }
12111 c := auxIntToInt16(v_1.AuxInt)
12112 if !(x.Op != OpConst16 && (c > 0 || c == -1<<15)) {
12113 break
12114 }
12115 v.reset(OpSub16)
12116 v0 := b.NewValue0(v.Pos, OpMul16, t)
12117 v1 := b.NewValue0(v.Pos, OpDiv16, t)
12118 v2 := b.NewValue0(v.Pos, OpConst16, t)
12119 v2.AuxInt = int16ToAuxInt(c)
12120 v1.AddArg2(x, v2)
12121 v0.AddArg2(v1, v2)
12122 v.AddArg2(x, v0)
12123 return true
12124 }
12125 return false
12126 }
12127 func rewriteValuegeneric_OpMod16u(v *Value) bool {
12128 v_1 := v.Args[1]
12129 v_0 := v.Args[0]
12130 b := v.Block
12131
12132
12133
12134 for {
12135 if v_0.Op != OpConst16 {
12136 break
12137 }
12138 c := auxIntToInt16(v_0.AuxInt)
12139 if v_1.Op != OpConst16 {
12140 break
12141 }
12142 d := auxIntToInt16(v_1.AuxInt)
12143 if !(d != 0) {
12144 break
12145 }
12146 v.reset(OpConst16)
12147 v.AuxInt = int16ToAuxInt(int16(uint16(c) % uint16(d)))
12148 return true
12149 }
12150
12151
12152
12153 for {
12154 t := v.Type
12155 n := v_0
12156 if v_1.Op != OpConst16 {
12157 break
12158 }
12159 c := auxIntToInt16(v_1.AuxInt)
12160 if !(isPowerOfTwo16(c)) {
12161 break
12162 }
12163 v.reset(OpAnd16)
12164 v0 := b.NewValue0(v.Pos, OpConst16, t)
12165 v0.AuxInt = int16ToAuxInt(c - 1)
12166 v.AddArg2(n, v0)
12167 return true
12168 }
12169
12170
12171
12172 for {
12173 t := v.Type
12174 x := v_0
12175 if v_1.Op != OpConst16 {
12176 break
12177 }
12178 c := auxIntToInt16(v_1.AuxInt)
12179 if !(x.Op != OpConst16 && c > 0 && umagicOK16(c)) {
12180 break
12181 }
12182 v.reset(OpSub16)
12183 v0 := b.NewValue0(v.Pos, OpMul16, t)
12184 v1 := b.NewValue0(v.Pos, OpDiv16u, t)
12185 v2 := b.NewValue0(v.Pos, OpConst16, t)
12186 v2.AuxInt = int16ToAuxInt(c)
12187 v1.AddArg2(x, v2)
12188 v0.AddArg2(v1, v2)
12189 v.AddArg2(x, v0)
12190 return true
12191 }
12192 return false
12193 }
12194 func rewriteValuegeneric_OpMod32(v *Value) bool {
12195 v_1 := v.Args[1]
12196 v_0 := v.Args[0]
12197 b := v.Block
12198
12199
12200
12201 for {
12202 if v_0.Op != OpConst32 {
12203 break
12204 }
12205 c := auxIntToInt32(v_0.AuxInt)
12206 if v_1.Op != OpConst32 {
12207 break
12208 }
12209 d := auxIntToInt32(v_1.AuxInt)
12210 if !(d != 0) {
12211 break
12212 }
12213 v.reset(OpConst32)
12214 v.AuxInt = int32ToAuxInt(c % d)
12215 return true
12216 }
12217
12218
12219
12220 for {
12221 t := v.Type
12222 n := v_0
12223 if v_1.Op != OpConst32 {
12224 break
12225 }
12226 c := auxIntToInt32(v_1.AuxInt)
12227 if !(isNonNegative(n) && isPowerOfTwo32(c)) {
12228 break
12229 }
12230 v.reset(OpAnd32)
12231 v0 := b.NewValue0(v.Pos, OpConst32, t)
12232 v0.AuxInt = int32ToAuxInt(c - 1)
12233 v.AddArg2(n, v0)
12234 return true
12235 }
12236
12237
12238
12239 for {
12240 t := v.Type
12241 n := v_0
12242 if v_1.Op != OpConst32 {
12243 break
12244 }
12245 c := auxIntToInt32(v_1.AuxInt)
12246 if !(c < 0 && c != -1<<31) {
12247 break
12248 }
12249 v.reset(OpMod32)
12250 v.Type = t
12251 v0 := b.NewValue0(v.Pos, OpConst32, t)
12252 v0.AuxInt = int32ToAuxInt(-c)
12253 v.AddArg2(n, v0)
12254 return true
12255 }
12256
12257
12258
12259 for {
12260 t := v.Type
12261 x := v_0
12262 if v_1.Op != OpConst32 {
12263 break
12264 }
12265 c := auxIntToInt32(v_1.AuxInt)
12266 if !(x.Op != OpConst32 && (c > 0 || c == -1<<31)) {
12267 break
12268 }
12269 v.reset(OpSub32)
12270 v0 := b.NewValue0(v.Pos, OpMul32, t)
12271 v1 := b.NewValue0(v.Pos, OpDiv32, t)
12272 v2 := b.NewValue0(v.Pos, OpConst32, t)
12273 v2.AuxInt = int32ToAuxInt(c)
12274 v1.AddArg2(x, v2)
12275 v0.AddArg2(v1, v2)
12276 v.AddArg2(x, v0)
12277 return true
12278 }
12279 return false
12280 }
12281 func rewriteValuegeneric_OpMod32u(v *Value) bool {
12282 v_1 := v.Args[1]
12283 v_0 := v.Args[0]
12284 b := v.Block
12285
12286
12287
12288 for {
12289 if v_0.Op != OpConst32 {
12290 break
12291 }
12292 c := auxIntToInt32(v_0.AuxInt)
12293 if v_1.Op != OpConst32 {
12294 break
12295 }
12296 d := auxIntToInt32(v_1.AuxInt)
12297 if !(d != 0) {
12298 break
12299 }
12300 v.reset(OpConst32)
12301 v.AuxInt = int32ToAuxInt(int32(uint32(c) % uint32(d)))
12302 return true
12303 }
12304
12305
12306
12307 for {
12308 t := v.Type
12309 n := v_0
12310 if v_1.Op != OpConst32 {
12311 break
12312 }
12313 c := auxIntToInt32(v_1.AuxInt)
12314 if !(isPowerOfTwo32(c)) {
12315 break
12316 }
12317 v.reset(OpAnd32)
12318 v0 := b.NewValue0(v.Pos, OpConst32, t)
12319 v0.AuxInt = int32ToAuxInt(c - 1)
12320 v.AddArg2(n, v0)
12321 return true
12322 }
12323
12324
12325
12326 for {
12327 t := v.Type
12328 x := v_0
12329 if v_1.Op != OpConst32 {
12330 break
12331 }
12332 c := auxIntToInt32(v_1.AuxInt)
12333 if !(x.Op != OpConst32 && c > 0 && umagicOK32(c)) {
12334 break
12335 }
12336 v.reset(OpSub32)
12337 v0 := b.NewValue0(v.Pos, OpMul32, t)
12338 v1 := b.NewValue0(v.Pos, OpDiv32u, t)
12339 v2 := b.NewValue0(v.Pos, OpConst32, t)
12340 v2.AuxInt = int32ToAuxInt(c)
12341 v1.AddArg2(x, v2)
12342 v0.AddArg2(v1, v2)
12343 v.AddArg2(x, v0)
12344 return true
12345 }
12346 return false
12347 }
12348 func rewriteValuegeneric_OpMod64(v *Value) bool {
12349 v_1 := v.Args[1]
12350 v_0 := v.Args[0]
12351 b := v.Block
12352
12353
12354
12355 for {
12356 if v_0.Op != OpConst64 {
12357 break
12358 }
12359 c := auxIntToInt64(v_0.AuxInt)
12360 if v_1.Op != OpConst64 {
12361 break
12362 }
12363 d := auxIntToInt64(v_1.AuxInt)
12364 if !(d != 0) {
12365 break
12366 }
12367 v.reset(OpConst64)
12368 v.AuxInt = int64ToAuxInt(c % d)
12369 return true
12370 }
12371
12372
12373
12374 for {
12375 t := v.Type
12376 n := v_0
12377 if v_1.Op != OpConst64 {
12378 break
12379 }
12380 c := auxIntToInt64(v_1.AuxInt)
12381 if !(isNonNegative(n) && isPowerOfTwo64(c)) {
12382 break
12383 }
12384 v.reset(OpAnd64)
12385 v0 := b.NewValue0(v.Pos, OpConst64, t)
12386 v0.AuxInt = int64ToAuxInt(c - 1)
12387 v.AddArg2(n, v0)
12388 return true
12389 }
12390
12391
12392
12393 for {
12394 n := v_0
12395 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != -1<<63 || !(isNonNegative(n)) {
12396 break
12397 }
12398 v.copyOf(n)
12399 return true
12400 }
12401
12402
12403
12404 for {
12405 t := v.Type
12406 n := v_0
12407 if v_1.Op != OpConst64 {
12408 break
12409 }
12410 c := auxIntToInt64(v_1.AuxInt)
12411 if !(c < 0 && c != -1<<63) {
12412 break
12413 }
12414 v.reset(OpMod64)
12415 v.Type = t
12416 v0 := b.NewValue0(v.Pos, OpConst64, t)
12417 v0.AuxInt = int64ToAuxInt(-c)
12418 v.AddArg2(n, v0)
12419 return true
12420 }
12421
12422
12423
12424 for {
12425 t := v.Type
12426 x := v_0
12427 if v_1.Op != OpConst64 {
12428 break
12429 }
12430 c := auxIntToInt64(v_1.AuxInt)
12431 if !(x.Op != OpConst64 && (c > 0 || c == -1<<63)) {
12432 break
12433 }
12434 v.reset(OpSub64)
12435 v0 := b.NewValue0(v.Pos, OpMul64, t)
12436 v1 := b.NewValue0(v.Pos, OpDiv64, t)
12437 v2 := b.NewValue0(v.Pos, OpConst64, t)
12438 v2.AuxInt = int64ToAuxInt(c)
12439 v1.AddArg2(x, v2)
12440 v0.AddArg2(v1, v2)
12441 v.AddArg2(x, v0)
12442 return true
12443 }
12444 return false
12445 }
12446 func rewriteValuegeneric_OpMod64u(v *Value) bool {
12447 v_1 := v.Args[1]
12448 v_0 := v.Args[0]
12449 b := v.Block
12450
12451
12452
12453 for {
12454 if v_0.Op != OpConst64 {
12455 break
12456 }
12457 c := auxIntToInt64(v_0.AuxInt)
12458 if v_1.Op != OpConst64 {
12459 break
12460 }
12461 d := auxIntToInt64(v_1.AuxInt)
12462 if !(d != 0) {
12463 break
12464 }
12465 v.reset(OpConst64)
12466 v.AuxInt = int64ToAuxInt(int64(uint64(c) % uint64(d)))
12467 return true
12468 }
12469
12470
12471
12472 for {
12473 t := v.Type
12474 n := v_0
12475 if v_1.Op != OpConst64 {
12476 break
12477 }
12478 c := auxIntToInt64(v_1.AuxInt)
12479 if !(isPowerOfTwo64(c)) {
12480 break
12481 }
12482 v.reset(OpAnd64)
12483 v0 := b.NewValue0(v.Pos, OpConst64, t)
12484 v0.AuxInt = int64ToAuxInt(c - 1)
12485 v.AddArg2(n, v0)
12486 return true
12487 }
12488
12489
12490 for {
12491 t := v.Type
12492 n := v_0
12493 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != -1<<63 {
12494 break
12495 }
12496 v.reset(OpAnd64)
12497 v0 := b.NewValue0(v.Pos, OpConst64, t)
12498 v0.AuxInt = int64ToAuxInt(1<<63 - 1)
12499 v.AddArg2(n, v0)
12500 return true
12501 }
12502
12503
12504
12505 for {
12506 t := v.Type
12507 x := v_0
12508 if v_1.Op != OpConst64 {
12509 break
12510 }
12511 c := auxIntToInt64(v_1.AuxInt)
12512 if !(x.Op != OpConst64 && c > 0 && umagicOK64(c)) {
12513 break
12514 }
12515 v.reset(OpSub64)
12516 v0 := b.NewValue0(v.Pos, OpMul64, t)
12517 v1 := b.NewValue0(v.Pos, OpDiv64u, t)
12518 v2 := b.NewValue0(v.Pos, OpConst64, t)
12519 v2.AuxInt = int64ToAuxInt(c)
12520 v1.AddArg2(x, v2)
12521 v0.AddArg2(v1, v2)
12522 v.AddArg2(x, v0)
12523 return true
12524 }
12525 return false
12526 }
12527 func rewriteValuegeneric_OpMod8(v *Value) bool {
12528 v_1 := v.Args[1]
12529 v_0 := v.Args[0]
12530 b := v.Block
12531
12532
12533
12534 for {
12535 if v_0.Op != OpConst8 {
12536 break
12537 }
12538 c := auxIntToInt8(v_0.AuxInt)
12539 if v_1.Op != OpConst8 {
12540 break
12541 }
12542 d := auxIntToInt8(v_1.AuxInt)
12543 if !(d != 0) {
12544 break
12545 }
12546 v.reset(OpConst8)
12547 v.AuxInt = int8ToAuxInt(c % d)
12548 return true
12549 }
12550
12551
12552
12553 for {
12554 t := v.Type
12555 n := v_0
12556 if v_1.Op != OpConst8 {
12557 break
12558 }
12559 c := auxIntToInt8(v_1.AuxInt)
12560 if !(isNonNegative(n) && isPowerOfTwo8(c)) {
12561 break
12562 }
12563 v.reset(OpAnd8)
12564 v0 := b.NewValue0(v.Pos, OpConst8, t)
12565 v0.AuxInt = int8ToAuxInt(c - 1)
12566 v.AddArg2(n, v0)
12567 return true
12568 }
12569
12570
12571
12572 for {
12573 t := v.Type
12574 n := v_0
12575 if v_1.Op != OpConst8 {
12576 break
12577 }
12578 c := auxIntToInt8(v_1.AuxInt)
12579 if !(c < 0 && c != -1<<7) {
12580 break
12581 }
12582 v.reset(OpMod8)
12583 v.Type = t
12584 v0 := b.NewValue0(v.Pos, OpConst8, t)
12585 v0.AuxInt = int8ToAuxInt(-c)
12586 v.AddArg2(n, v0)
12587 return true
12588 }
12589
12590
12591
12592 for {
12593 t := v.Type
12594 x := v_0
12595 if v_1.Op != OpConst8 {
12596 break
12597 }
12598 c := auxIntToInt8(v_1.AuxInt)
12599 if !(x.Op != OpConst8 && (c > 0 || c == -1<<7)) {
12600 break
12601 }
12602 v.reset(OpSub8)
12603 v0 := b.NewValue0(v.Pos, OpMul8, t)
12604 v1 := b.NewValue0(v.Pos, OpDiv8, t)
12605 v2 := b.NewValue0(v.Pos, OpConst8, t)
12606 v2.AuxInt = int8ToAuxInt(c)
12607 v1.AddArg2(x, v2)
12608 v0.AddArg2(v1, v2)
12609 v.AddArg2(x, v0)
12610 return true
12611 }
12612 return false
12613 }
12614 func rewriteValuegeneric_OpMod8u(v *Value) bool {
12615 v_1 := v.Args[1]
12616 v_0 := v.Args[0]
12617 b := v.Block
12618
12619
12620
12621 for {
12622 if v_0.Op != OpConst8 {
12623 break
12624 }
12625 c := auxIntToInt8(v_0.AuxInt)
12626 if v_1.Op != OpConst8 {
12627 break
12628 }
12629 d := auxIntToInt8(v_1.AuxInt)
12630 if !(d != 0) {
12631 break
12632 }
12633 v.reset(OpConst8)
12634 v.AuxInt = int8ToAuxInt(int8(uint8(c) % uint8(d)))
12635 return true
12636 }
12637
12638
12639
12640 for {
12641 t := v.Type
12642 n := v_0
12643 if v_1.Op != OpConst8 {
12644 break
12645 }
12646 c := auxIntToInt8(v_1.AuxInt)
12647 if !(isPowerOfTwo8(c)) {
12648 break
12649 }
12650 v.reset(OpAnd8)
12651 v0 := b.NewValue0(v.Pos, OpConst8, t)
12652 v0.AuxInt = int8ToAuxInt(c - 1)
12653 v.AddArg2(n, v0)
12654 return true
12655 }
12656
12657
12658
12659 for {
12660 t := v.Type
12661 x := v_0
12662 if v_1.Op != OpConst8 {
12663 break
12664 }
12665 c := auxIntToInt8(v_1.AuxInt)
12666 if !(x.Op != OpConst8 && c > 0 && umagicOK8(c)) {
12667 break
12668 }
12669 v.reset(OpSub8)
12670 v0 := b.NewValue0(v.Pos, OpMul8, t)
12671 v1 := b.NewValue0(v.Pos, OpDiv8u, t)
12672 v2 := b.NewValue0(v.Pos, OpConst8, t)
12673 v2.AuxInt = int8ToAuxInt(c)
12674 v1.AddArg2(x, v2)
12675 v0.AddArg2(v1, v2)
12676 v.AddArg2(x, v0)
12677 return true
12678 }
12679 return false
12680 }
12681 func rewriteValuegeneric_OpMove(v *Value) bool {
12682 v_2 := v.Args[2]
12683 v_1 := v.Args[1]
12684 v_0 := v.Args[0]
12685 b := v.Block
12686 config := b.Func.Config
12687
12688
12689
12690 for {
12691 n := auxIntToInt64(v.AuxInt)
12692 t := auxToType(v.Aux)
12693 dst1 := v_0
12694 src := v_1
12695 mem := v_2
12696 if mem.Op != OpZero || auxIntToInt64(mem.AuxInt) != n || auxToType(mem.Aux) != t {
12697 break
12698 }
12699 dst2 := mem.Args[0]
12700 if !(isSamePtr(src, dst2)) {
12701 break
12702 }
12703 v.reset(OpZero)
12704 v.AuxInt = int64ToAuxInt(n)
12705 v.Aux = typeToAux(t)
12706 v.AddArg2(dst1, mem)
12707 return true
12708 }
12709
12710
12711
12712 for {
12713 n := auxIntToInt64(v.AuxInt)
12714 t := auxToType(v.Aux)
12715 dst1 := v_0
12716 src := v_1
12717 mem := v_2
12718 if mem.Op != OpVarDef {
12719 break
12720 }
12721 mem_0 := mem.Args[0]
12722 if mem_0.Op != OpZero || auxIntToInt64(mem_0.AuxInt) != n || auxToType(mem_0.Aux) != t {
12723 break
12724 }
12725 dst0 := mem_0.Args[0]
12726 if !(isSamePtr(src, dst0)) {
12727 break
12728 }
12729 v.reset(OpZero)
12730 v.AuxInt = int64ToAuxInt(n)
12731 v.Aux = typeToAux(t)
12732 v.AddArg2(dst1, mem)
12733 return true
12734 }
12735
12736
12737
12738 for {
12739 n := auxIntToInt64(v.AuxInt)
12740 t := auxToType(v.Aux)
12741 dst := v_0
12742 if v_1.Op != OpAddr {
12743 break
12744 }
12745 sym := auxToSym(v_1.Aux)
12746 v_1_0 := v_1.Args[0]
12747 if v_1_0.Op != OpSB {
12748 break
12749 }
12750 mem := v_2
12751 if !(symIsROZero(sym)) {
12752 break
12753 }
12754 v.reset(OpZero)
12755 v.AuxInt = int64ToAuxInt(n)
12756 v.Aux = typeToAux(t)
12757 v.AddArg2(dst, mem)
12758 return true
12759 }
12760
12761
12762
12763 for {
12764 n := auxIntToInt64(v.AuxInt)
12765 t1 := auxToType(v.Aux)
12766 dst1 := v_0
12767 src1 := v_1
12768 store := v_2
12769 if store.Op != OpStore {
12770 break
12771 }
12772 t2 := auxToType(store.Aux)
12773 mem := store.Args[2]
12774 op := store.Args[0]
12775 if op.Op != OpOffPtr {
12776 break
12777 }
12778 o2 := auxIntToInt64(op.AuxInt)
12779 dst2 := op.Args[0]
12780 if !(isSamePtr(dst1, dst2) && store.Uses == 1 && n >= o2+t2.Size() && disjoint(src1, n, op, t2.Size()) && clobber(store)) {
12781 break
12782 }
12783 v.reset(OpMove)
12784 v.AuxInt = int64ToAuxInt(n)
12785 v.Aux = typeToAux(t1)
12786 v.AddArg3(dst1, src1, mem)
12787 return true
12788 }
12789
12790
12791
12792 for {
12793 n := auxIntToInt64(v.AuxInt)
12794 t := auxToType(v.Aux)
12795 dst1 := v_0
12796 src1 := v_1
12797 move := v_2
12798 if move.Op != OpMove || auxIntToInt64(move.AuxInt) != n || auxToType(move.Aux) != t {
12799 break
12800 }
12801 mem := move.Args[2]
12802 dst2 := move.Args[0]
12803 if !(move.Uses == 1 && isSamePtr(dst1, dst2) && disjoint(src1, n, dst2, n) && clobber(move)) {
12804 break
12805 }
12806 v.reset(OpMove)
12807 v.AuxInt = int64ToAuxInt(n)
12808 v.Aux = typeToAux(t)
12809 v.AddArg3(dst1, src1, mem)
12810 return true
12811 }
12812
12813
12814
12815 for {
12816 n := auxIntToInt64(v.AuxInt)
12817 t := auxToType(v.Aux)
12818 dst1 := v_0
12819 src1 := v_1
12820 vardef := v_2
12821 if vardef.Op != OpVarDef {
12822 break
12823 }
12824 x := auxToSym(vardef.Aux)
12825 move := vardef.Args[0]
12826 if move.Op != OpMove || auxIntToInt64(move.AuxInt) != n || auxToType(move.Aux) != t {
12827 break
12828 }
12829 mem := move.Args[2]
12830 dst2 := move.Args[0]
12831 if !(move.Uses == 1 && vardef.Uses == 1 && isSamePtr(dst1, dst2) && disjoint(src1, n, dst2, n) && clobber(move, vardef)) {
12832 break
12833 }
12834 v.reset(OpMove)
12835 v.AuxInt = int64ToAuxInt(n)
12836 v.Aux = typeToAux(t)
12837 v0 := b.NewValue0(v.Pos, OpVarDef, types.TypeMem)
12838 v0.Aux = symToAux(x)
12839 v0.AddArg(mem)
12840 v.AddArg3(dst1, src1, v0)
12841 return true
12842 }
12843
12844
12845
12846 for {
12847 n := auxIntToInt64(v.AuxInt)
12848 t := auxToType(v.Aux)
12849 dst1 := v_0
12850 src1 := v_1
12851 zero := v_2
12852 if zero.Op != OpZero || auxIntToInt64(zero.AuxInt) != n || auxToType(zero.Aux) != t {
12853 break
12854 }
12855 mem := zero.Args[1]
12856 dst2 := zero.Args[0]
12857 if !(zero.Uses == 1 && isSamePtr(dst1, dst2) && disjoint(src1, n, dst2, n) && clobber(zero)) {
12858 break
12859 }
12860 v.reset(OpMove)
12861 v.AuxInt = int64ToAuxInt(n)
12862 v.Aux = typeToAux(t)
12863 v.AddArg3(dst1, src1, mem)
12864 return true
12865 }
12866
12867
12868
12869 for {
12870 n := auxIntToInt64(v.AuxInt)
12871 t := auxToType(v.Aux)
12872 dst1 := v_0
12873 src1 := v_1
12874 vardef := v_2
12875 if vardef.Op != OpVarDef {
12876 break
12877 }
12878 x := auxToSym(vardef.Aux)
12879 zero := vardef.Args[0]
12880 if zero.Op != OpZero || auxIntToInt64(zero.AuxInt) != n || auxToType(zero.Aux) != t {
12881 break
12882 }
12883 mem := zero.Args[1]
12884 dst2 := zero.Args[0]
12885 if !(zero.Uses == 1 && vardef.Uses == 1 && isSamePtr(dst1, dst2) && disjoint(src1, n, dst2, n) && clobber(zero, vardef)) {
12886 break
12887 }
12888 v.reset(OpMove)
12889 v.AuxInt = int64ToAuxInt(n)
12890 v.Aux = typeToAux(t)
12891 v0 := b.NewValue0(v.Pos, OpVarDef, types.TypeMem)
12892 v0.Aux = symToAux(x)
12893 v0.AddArg(mem)
12894 v.AddArg3(dst1, src1, v0)
12895 return true
12896 }
12897
12898
12899
12900 for {
12901 n := auxIntToInt64(v.AuxInt)
12902 t1 := auxToType(v.Aux)
12903 dst := v_0
12904 p1 := v_1
12905 mem := v_2
12906 if mem.Op != OpStore {
12907 break
12908 }
12909 t2 := auxToType(mem.Aux)
12910 _ = mem.Args[2]
12911 op2 := mem.Args[0]
12912 if op2.Op != OpOffPtr {
12913 break
12914 }
12915 tt2 := op2.Type
12916 o2 := auxIntToInt64(op2.AuxInt)
12917 p2 := op2.Args[0]
12918 d1 := mem.Args[1]
12919 mem_2 := mem.Args[2]
12920 if mem_2.Op != OpStore {
12921 break
12922 }
12923 t3 := auxToType(mem_2.Aux)
12924 d2 := mem_2.Args[1]
12925 op3 := mem_2.Args[0]
12926 if op3.Op != OpOffPtr {
12927 break
12928 }
12929 tt3 := op3.Type
12930 if auxIntToInt64(op3.AuxInt) != 0 {
12931 break
12932 }
12933 p3 := op3.Args[0]
12934 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()) {
12935 break
12936 }
12937 v.reset(OpStore)
12938 v.Aux = typeToAux(t2)
12939 v0 := b.NewValue0(v.Pos, OpOffPtr, tt2)
12940 v0.AuxInt = int64ToAuxInt(o2)
12941 v0.AddArg(dst)
12942 v1 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
12943 v1.Aux = typeToAux(t3)
12944 v2 := b.NewValue0(v.Pos, OpOffPtr, tt3)
12945 v2.AuxInt = int64ToAuxInt(0)
12946 v2.AddArg(dst)
12947 v1.AddArg3(v2, d2, mem)
12948 v.AddArg3(v0, d1, v1)
12949 return true
12950 }
12951
12952
12953
12954 for {
12955 n := auxIntToInt64(v.AuxInt)
12956 t1 := auxToType(v.Aux)
12957 dst := v_0
12958 p1 := v_1
12959 mem := v_2
12960 if mem.Op != OpStore {
12961 break
12962 }
12963 t2 := auxToType(mem.Aux)
12964 _ = mem.Args[2]
12965 op2 := mem.Args[0]
12966 if op2.Op != OpOffPtr {
12967 break
12968 }
12969 tt2 := op2.Type
12970 o2 := auxIntToInt64(op2.AuxInt)
12971 p2 := op2.Args[0]
12972 d1 := mem.Args[1]
12973 mem_2 := mem.Args[2]
12974 if mem_2.Op != OpStore {
12975 break
12976 }
12977 t3 := auxToType(mem_2.Aux)
12978 _ = mem_2.Args[2]
12979 op3 := mem_2.Args[0]
12980 if op3.Op != OpOffPtr {
12981 break
12982 }
12983 tt3 := op3.Type
12984 o3 := auxIntToInt64(op3.AuxInt)
12985 p3 := op3.Args[0]
12986 d2 := mem_2.Args[1]
12987 mem_2_2 := mem_2.Args[2]
12988 if mem_2_2.Op != OpStore {
12989 break
12990 }
12991 t4 := auxToType(mem_2_2.Aux)
12992 d3 := mem_2_2.Args[1]
12993 op4 := mem_2_2.Args[0]
12994 if op4.Op != OpOffPtr {
12995 break
12996 }
12997 tt4 := op4.Type
12998 if auxIntToInt64(op4.AuxInt) != 0 {
12999 break
13000 }
13001 p4 := op4.Args[0]
13002 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()) {
13003 break
13004 }
13005 v.reset(OpStore)
13006 v.Aux = typeToAux(t2)
13007 v0 := b.NewValue0(v.Pos, OpOffPtr, tt2)
13008 v0.AuxInt = int64ToAuxInt(o2)
13009 v0.AddArg(dst)
13010 v1 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
13011 v1.Aux = typeToAux(t3)
13012 v2 := b.NewValue0(v.Pos, OpOffPtr, tt3)
13013 v2.AuxInt = int64ToAuxInt(o3)
13014 v2.AddArg(dst)
13015 v3 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
13016 v3.Aux = typeToAux(t4)
13017 v4 := b.NewValue0(v.Pos, OpOffPtr, tt4)
13018 v4.AuxInt = int64ToAuxInt(0)
13019 v4.AddArg(dst)
13020 v3.AddArg3(v4, d3, mem)
13021 v1.AddArg3(v2, d2, v3)
13022 v.AddArg3(v0, d1, v1)
13023 return true
13024 }
13025
13026
13027
13028 for {
13029 n := auxIntToInt64(v.AuxInt)
13030 t1 := auxToType(v.Aux)
13031 dst := v_0
13032 p1 := v_1
13033 mem := v_2
13034 if mem.Op != OpStore {
13035 break
13036 }
13037 t2 := auxToType(mem.Aux)
13038 _ = mem.Args[2]
13039 op2 := mem.Args[0]
13040 if op2.Op != OpOffPtr {
13041 break
13042 }
13043 tt2 := op2.Type
13044 o2 := auxIntToInt64(op2.AuxInt)
13045 p2 := op2.Args[0]
13046 d1 := mem.Args[1]
13047 mem_2 := mem.Args[2]
13048 if mem_2.Op != OpStore {
13049 break
13050 }
13051 t3 := auxToType(mem_2.Aux)
13052 _ = mem_2.Args[2]
13053 op3 := mem_2.Args[0]
13054 if op3.Op != OpOffPtr {
13055 break
13056 }
13057 tt3 := op3.Type
13058 o3 := auxIntToInt64(op3.AuxInt)
13059 p3 := op3.Args[0]
13060 d2 := mem_2.Args[1]
13061 mem_2_2 := mem_2.Args[2]
13062 if mem_2_2.Op != OpStore {
13063 break
13064 }
13065 t4 := auxToType(mem_2_2.Aux)
13066 _ = mem_2_2.Args[2]
13067 op4 := mem_2_2.Args[0]
13068 if op4.Op != OpOffPtr {
13069 break
13070 }
13071 tt4 := op4.Type
13072 o4 := auxIntToInt64(op4.AuxInt)
13073 p4 := op4.Args[0]
13074 d3 := mem_2_2.Args[1]
13075 mem_2_2_2 := mem_2_2.Args[2]
13076 if mem_2_2_2.Op != OpStore {
13077 break
13078 }
13079 t5 := auxToType(mem_2_2_2.Aux)
13080 d4 := mem_2_2_2.Args[1]
13081 op5 := mem_2_2_2.Args[0]
13082 if op5.Op != OpOffPtr {
13083 break
13084 }
13085 tt5 := op5.Type
13086 if auxIntToInt64(op5.AuxInt) != 0 {
13087 break
13088 }
13089 p5 := op5.Args[0]
13090 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()) {
13091 break
13092 }
13093 v.reset(OpStore)
13094 v.Aux = typeToAux(t2)
13095 v0 := b.NewValue0(v.Pos, OpOffPtr, tt2)
13096 v0.AuxInt = int64ToAuxInt(o2)
13097 v0.AddArg(dst)
13098 v1 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
13099 v1.Aux = typeToAux(t3)
13100 v2 := b.NewValue0(v.Pos, OpOffPtr, tt3)
13101 v2.AuxInt = int64ToAuxInt(o3)
13102 v2.AddArg(dst)
13103 v3 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
13104 v3.Aux = typeToAux(t4)
13105 v4 := b.NewValue0(v.Pos, OpOffPtr, tt4)
13106 v4.AuxInt = int64ToAuxInt(o4)
13107 v4.AddArg(dst)
13108 v5 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
13109 v5.Aux = typeToAux(t5)
13110 v6 := b.NewValue0(v.Pos, OpOffPtr, tt5)
13111 v6.AuxInt = int64ToAuxInt(0)
13112 v6.AddArg(dst)
13113 v5.AddArg3(v6, d4, mem)
13114 v3.AddArg3(v4, d3, v5)
13115 v1.AddArg3(v2, d2, v3)
13116 v.AddArg3(v0, d1, v1)
13117 return true
13118 }
13119
13120
13121
13122 for {
13123 n := auxIntToInt64(v.AuxInt)
13124 t1 := auxToType(v.Aux)
13125 dst := v_0
13126 p1 := v_1
13127 mem := v_2
13128 if mem.Op != OpVarDef {
13129 break
13130 }
13131 mem_0 := mem.Args[0]
13132 if mem_0.Op != OpStore {
13133 break
13134 }
13135 t2 := auxToType(mem_0.Aux)
13136 _ = mem_0.Args[2]
13137 op2 := mem_0.Args[0]
13138 if op2.Op != OpOffPtr {
13139 break
13140 }
13141 tt2 := op2.Type
13142 o2 := auxIntToInt64(op2.AuxInt)
13143 p2 := op2.Args[0]
13144 d1 := mem_0.Args[1]
13145 mem_0_2 := mem_0.Args[2]
13146 if mem_0_2.Op != OpStore {
13147 break
13148 }
13149 t3 := auxToType(mem_0_2.Aux)
13150 d2 := mem_0_2.Args[1]
13151 op3 := mem_0_2.Args[0]
13152 if op3.Op != OpOffPtr {
13153 break
13154 }
13155 tt3 := op3.Type
13156 if auxIntToInt64(op3.AuxInt) != 0 {
13157 break
13158 }
13159 p3 := op3.Args[0]
13160 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()) {
13161 break
13162 }
13163 v.reset(OpStore)
13164 v.Aux = typeToAux(t2)
13165 v0 := b.NewValue0(v.Pos, OpOffPtr, tt2)
13166 v0.AuxInt = int64ToAuxInt(o2)
13167 v0.AddArg(dst)
13168 v1 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
13169 v1.Aux = typeToAux(t3)
13170 v2 := b.NewValue0(v.Pos, OpOffPtr, tt3)
13171 v2.AuxInt = int64ToAuxInt(0)
13172 v2.AddArg(dst)
13173 v1.AddArg3(v2, d2, mem)
13174 v.AddArg3(v0, d1, v1)
13175 return true
13176 }
13177
13178
13179
13180 for {
13181 n := auxIntToInt64(v.AuxInt)
13182 t1 := auxToType(v.Aux)
13183 dst := v_0
13184 p1 := v_1
13185 mem := v_2
13186 if mem.Op != OpVarDef {
13187 break
13188 }
13189 mem_0 := mem.Args[0]
13190 if mem_0.Op != OpStore {
13191 break
13192 }
13193 t2 := auxToType(mem_0.Aux)
13194 _ = mem_0.Args[2]
13195 op2 := mem_0.Args[0]
13196 if op2.Op != OpOffPtr {
13197 break
13198 }
13199 tt2 := op2.Type
13200 o2 := auxIntToInt64(op2.AuxInt)
13201 p2 := op2.Args[0]
13202 d1 := mem_0.Args[1]
13203 mem_0_2 := mem_0.Args[2]
13204 if mem_0_2.Op != OpStore {
13205 break
13206 }
13207 t3 := auxToType(mem_0_2.Aux)
13208 _ = mem_0_2.Args[2]
13209 op3 := mem_0_2.Args[0]
13210 if op3.Op != OpOffPtr {
13211 break
13212 }
13213 tt3 := op3.Type
13214 o3 := auxIntToInt64(op3.AuxInt)
13215 p3 := op3.Args[0]
13216 d2 := mem_0_2.Args[1]
13217 mem_0_2_2 := mem_0_2.Args[2]
13218 if mem_0_2_2.Op != OpStore {
13219 break
13220 }
13221 t4 := auxToType(mem_0_2_2.Aux)
13222 d3 := mem_0_2_2.Args[1]
13223 op4 := mem_0_2_2.Args[0]
13224 if op4.Op != OpOffPtr {
13225 break
13226 }
13227 tt4 := op4.Type
13228 if auxIntToInt64(op4.AuxInt) != 0 {
13229 break
13230 }
13231 p4 := op4.Args[0]
13232 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()) {
13233 break
13234 }
13235 v.reset(OpStore)
13236 v.Aux = typeToAux(t2)
13237 v0 := b.NewValue0(v.Pos, OpOffPtr, tt2)
13238 v0.AuxInt = int64ToAuxInt(o2)
13239 v0.AddArg(dst)
13240 v1 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
13241 v1.Aux = typeToAux(t3)
13242 v2 := b.NewValue0(v.Pos, OpOffPtr, tt3)
13243 v2.AuxInt = int64ToAuxInt(o3)
13244 v2.AddArg(dst)
13245 v3 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
13246 v3.Aux = typeToAux(t4)
13247 v4 := b.NewValue0(v.Pos, OpOffPtr, tt4)
13248 v4.AuxInt = int64ToAuxInt(0)
13249 v4.AddArg(dst)
13250 v3.AddArg3(v4, d3, mem)
13251 v1.AddArg3(v2, d2, v3)
13252 v.AddArg3(v0, d1, v1)
13253 return true
13254 }
13255
13256
13257
13258 for {
13259 n := auxIntToInt64(v.AuxInt)
13260 t1 := auxToType(v.Aux)
13261 dst := v_0
13262 p1 := v_1
13263 mem := v_2
13264 if mem.Op != OpVarDef {
13265 break
13266 }
13267 mem_0 := mem.Args[0]
13268 if mem_0.Op != OpStore {
13269 break
13270 }
13271 t2 := auxToType(mem_0.Aux)
13272 _ = mem_0.Args[2]
13273 op2 := mem_0.Args[0]
13274 if op2.Op != OpOffPtr {
13275 break
13276 }
13277 tt2 := op2.Type
13278 o2 := auxIntToInt64(op2.AuxInt)
13279 p2 := op2.Args[0]
13280 d1 := mem_0.Args[1]
13281 mem_0_2 := mem_0.Args[2]
13282 if mem_0_2.Op != OpStore {
13283 break
13284 }
13285 t3 := auxToType(mem_0_2.Aux)
13286 _ = mem_0_2.Args[2]
13287 op3 := mem_0_2.Args[0]
13288 if op3.Op != OpOffPtr {
13289 break
13290 }
13291 tt3 := op3.Type
13292 o3 := auxIntToInt64(op3.AuxInt)
13293 p3 := op3.Args[0]
13294 d2 := mem_0_2.Args[1]
13295 mem_0_2_2 := mem_0_2.Args[2]
13296 if mem_0_2_2.Op != OpStore {
13297 break
13298 }
13299 t4 := auxToType(mem_0_2_2.Aux)
13300 _ = mem_0_2_2.Args[2]
13301 op4 := mem_0_2_2.Args[0]
13302 if op4.Op != OpOffPtr {
13303 break
13304 }
13305 tt4 := op4.Type
13306 o4 := auxIntToInt64(op4.AuxInt)
13307 p4 := op4.Args[0]
13308 d3 := mem_0_2_2.Args[1]
13309 mem_0_2_2_2 := mem_0_2_2.Args[2]
13310 if mem_0_2_2_2.Op != OpStore {
13311 break
13312 }
13313 t5 := auxToType(mem_0_2_2_2.Aux)
13314 d4 := mem_0_2_2_2.Args[1]
13315 op5 := mem_0_2_2_2.Args[0]
13316 if op5.Op != OpOffPtr {
13317 break
13318 }
13319 tt5 := op5.Type
13320 if auxIntToInt64(op5.AuxInt) != 0 {
13321 break
13322 }
13323 p5 := op5.Args[0]
13324 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()) {
13325 break
13326 }
13327 v.reset(OpStore)
13328 v.Aux = typeToAux(t2)
13329 v0 := b.NewValue0(v.Pos, OpOffPtr, tt2)
13330 v0.AuxInt = int64ToAuxInt(o2)
13331 v0.AddArg(dst)
13332 v1 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
13333 v1.Aux = typeToAux(t3)
13334 v2 := b.NewValue0(v.Pos, OpOffPtr, tt3)
13335 v2.AuxInt = int64ToAuxInt(o3)
13336 v2.AddArg(dst)
13337 v3 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
13338 v3.Aux = typeToAux(t4)
13339 v4 := b.NewValue0(v.Pos, OpOffPtr, tt4)
13340 v4.AuxInt = int64ToAuxInt(o4)
13341 v4.AddArg(dst)
13342 v5 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
13343 v5.Aux = typeToAux(t5)
13344 v6 := b.NewValue0(v.Pos, OpOffPtr, tt5)
13345 v6.AuxInt = int64ToAuxInt(0)
13346 v6.AddArg(dst)
13347 v5.AddArg3(v6, d4, mem)
13348 v3.AddArg3(v4, d3, v5)
13349 v1.AddArg3(v2, d2, v3)
13350 v.AddArg3(v0, d1, v1)
13351 return true
13352 }
13353
13354
13355
13356 for {
13357 n := auxIntToInt64(v.AuxInt)
13358 t1 := auxToType(v.Aux)
13359 dst := v_0
13360 p1 := v_1
13361 mem := v_2
13362 if mem.Op != OpStore {
13363 break
13364 }
13365 t2 := auxToType(mem.Aux)
13366 _ = mem.Args[2]
13367 op2 := mem.Args[0]
13368 if op2.Op != OpOffPtr {
13369 break
13370 }
13371 tt2 := op2.Type
13372 o2 := auxIntToInt64(op2.AuxInt)
13373 p2 := op2.Args[0]
13374 d1 := mem.Args[1]
13375 mem_2 := mem.Args[2]
13376 if mem_2.Op != OpZero || auxIntToInt64(mem_2.AuxInt) != n {
13377 break
13378 }
13379 t3 := auxToType(mem_2.Aux)
13380 p3 := mem_2.Args[0]
13381 if !(isSamePtr(p1, p2) && isSamePtr(p2, p3) && t2.Alignment() <= t1.Alignment() && t3.Alignment() <= t1.Alignment() && registerizable(b, t2) && n >= o2+t2.Size()) {
13382 break
13383 }
13384 v.reset(OpStore)
13385 v.Aux = typeToAux(t2)
13386 v0 := b.NewValue0(v.Pos, OpOffPtr, tt2)
13387 v0.AuxInt = int64ToAuxInt(o2)
13388 v0.AddArg(dst)
13389 v1 := b.NewValue0(v.Pos, OpZero, types.TypeMem)
13390 v1.AuxInt = int64ToAuxInt(n)
13391 v1.Aux = typeToAux(t1)
13392 v1.AddArg2(dst, mem)
13393 v.AddArg3(v0, d1, v1)
13394 return true
13395 }
13396
13397
13398
13399 for {
13400 n := auxIntToInt64(v.AuxInt)
13401 t1 := auxToType(v.Aux)
13402 dst := v_0
13403 p1 := v_1
13404 mem := v_2
13405 if mem.Op != OpStore {
13406 break
13407 }
13408 t2 := auxToType(mem.Aux)
13409 _ = mem.Args[2]
13410 mem_0 := mem.Args[0]
13411 if mem_0.Op != OpOffPtr {
13412 break
13413 }
13414 tt2 := mem_0.Type
13415 o2 := auxIntToInt64(mem_0.AuxInt)
13416 p2 := mem_0.Args[0]
13417 d1 := mem.Args[1]
13418 mem_2 := mem.Args[2]
13419 if mem_2.Op != OpStore {
13420 break
13421 }
13422 t3 := auxToType(mem_2.Aux)
13423 _ = mem_2.Args[2]
13424 mem_2_0 := mem_2.Args[0]
13425 if mem_2_0.Op != OpOffPtr {
13426 break
13427 }
13428 tt3 := mem_2_0.Type
13429 o3 := auxIntToInt64(mem_2_0.AuxInt)
13430 p3 := mem_2_0.Args[0]
13431 d2 := mem_2.Args[1]
13432 mem_2_2 := mem_2.Args[2]
13433 if mem_2_2.Op != OpZero || auxIntToInt64(mem_2_2.AuxInt) != n {
13434 break
13435 }
13436 t4 := auxToType(mem_2_2.Aux)
13437 p4 := mem_2_2.Args[0]
13438 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()) {
13439 break
13440 }
13441 v.reset(OpStore)
13442 v.Aux = typeToAux(t2)
13443 v0 := b.NewValue0(v.Pos, OpOffPtr, tt2)
13444 v0.AuxInt = int64ToAuxInt(o2)
13445 v0.AddArg(dst)
13446 v1 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
13447 v1.Aux = typeToAux(t3)
13448 v2 := b.NewValue0(v.Pos, OpOffPtr, tt3)
13449 v2.AuxInt = int64ToAuxInt(o3)
13450 v2.AddArg(dst)
13451 v3 := b.NewValue0(v.Pos, OpZero, types.TypeMem)
13452 v3.AuxInt = int64ToAuxInt(n)
13453 v3.Aux = typeToAux(t1)
13454 v3.AddArg2(dst, mem)
13455 v1.AddArg3(v2, d2, v3)
13456 v.AddArg3(v0, d1, v1)
13457 return true
13458 }
13459
13460
13461
13462 for {
13463 n := auxIntToInt64(v.AuxInt)
13464 t1 := auxToType(v.Aux)
13465 dst := v_0
13466 p1 := v_1
13467 mem := v_2
13468 if mem.Op != OpStore {
13469 break
13470 }
13471 t2 := auxToType(mem.Aux)
13472 _ = mem.Args[2]
13473 mem_0 := mem.Args[0]
13474 if mem_0.Op != OpOffPtr {
13475 break
13476 }
13477 tt2 := mem_0.Type
13478 o2 := auxIntToInt64(mem_0.AuxInt)
13479 p2 := mem_0.Args[0]
13480 d1 := mem.Args[1]
13481 mem_2 := mem.Args[2]
13482 if mem_2.Op != OpStore {
13483 break
13484 }
13485 t3 := auxToType(mem_2.Aux)
13486 _ = mem_2.Args[2]
13487 mem_2_0 := mem_2.Args[0]
13488 if mem_2_0.Op != OpOffPtr {
13489 break
13490 }
13491 tt3 := mem_2_0.Type
13492 o3 := auxIntToInt64(mem_2_0.AuxInt)
13493 p3 := mem_2_0.Args[0]
13494 d2 := mem_2.Args[1]
13495 mem_2_2 := mem_2.Args[2]
13496 if mem_2_2.Op != OpStore {
13497 break
13498 }
13499 t4 := auxToType(mem_2_2.Aux)
13500 _ = mem_2_2.Args[2]
13501 mem_2_2_0 := mem_2_2.Args[0]
13502 if mem_2_2_0.Op != OpOffPtr {
13503 break
13504 }
13505 tt4 := mem_2_2_0.Type
13506 o4 := auxIntToInt64(mem_2_2_0.AuxInt)
13507 p4 := mem_2_2_0.Args[0]
13508 d3 := mem_2_2.Args[1]
13509 mem_2_2_2 := mem_2_2.Args[2]
13510 if mem_2_2_2.Op != OpZero || auxIntToInt64(mem_2_2_2.AuxInt) != n {
13511 break
13512 }
13513 t5 := auxToType(mem_2_2_2.Aux)
13514 p5 := mem_2_2_2.Args[0]
13515 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()) {
13516 break
13517 }
13518 v.reset(OpStore)
13519 v.Aux = typeToAux(t2)
13520 v0 := b.NewValue0(v.Pos, OpOffPtr, tt2)
13521 v0.AuxInt = int64ToAuxInt(o2)
13522 v0.AddArg(dst)
13523 v1 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
13524 v1.Aux = typeToAux(t3)
13525 v2 := b.NewValue0(v.Pos, OpOffPtr, tt3)
13526 v2.AuxInt = int64ToAuxInt(o3)
13527 v2.AddArg(dst)
13528 v3 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
13529 v3.Aux = typeToAux(t4)
13530 v4 := b.NewValue0(v.Pos, OpOffPtr, tt4)
13531 v4.AuxInt = int64ToAuxInt(o4)
13532 v4.AddArg(dst)
13533 v5 := b.NewValue0(v.Pos, OpZero, types.TypeMem)
13534 v5.AuxInt = int64ToAuxInt(n)
13535 v5.Aux = typeToAux(t1)
13536 v5.AddArg2(dst, mem)
13537 v3.AddArg3(v4, d3, v5)
13538 v1.AddArg3(v2, d2, v3)
13539 v.AddArg3(v0, d1, v1)
13540 return true
13541 }
13542
13543
13544
13545 for {
13546 n := auxIntToInt64(v.AuxInt)
13547 t1 := auxToType(v.Aux)
13548 dst := v_0
13549 p1 := v_1
13550 mem := v_2
13551 if mem.Op != OpStore {
13552 break
13553 }
13554 t2 := auxToType(mem.Aux)
13555 _ = mem.Args[2]
13556 mem_0 := mem.Args[0]
13557 if mem_0.Op != OpOffPtr {
13558 break
13559 }
13560 tt2 := mem_0.Type
13561 o2 := auxIntToInt64(mem_0.AuxInt)
13562 p2 := mem_0.Args[0]
13563 d1 := mem.Args[1]
13564 mem_2 := mem.Args[2]
13565 if mem_2.Op != OpStore {
13566 break
13567 }
13568 t3 := auxToType(mem_2.Aux)
13569 _ = mem_2.Args[2]
13570 mem_2_0 := mem_2.Args[0]
13571 if mem_2_0.Op != OpOffPtr {
13572 break
13573 }
13574 tt3 := mem_2_0.Type
13575 o3 := auxIntToInt64(mem_2_0.AuxInt)
13576 p3 := mem_2_0.Args[0]
13577 d2 := mem_2.Args[1]
13578 mem_2_2 := mem_2.Args[2]
13579 if mem_2_2.Op != OpStore {
13580 break
13581 }
13582 t4 := auxToType(mem_2_2.Aux)
13583 _ = mem_2_2.Args[2]
13584 mem_2_2_0 := mem_2_2.Args[0]
13585 if mem_2_2_0.Op != OpOffPtr {
13586 break
13587 }
13588 tt4 := mem_2_2_0.Type
13589 o4 := auxIntToInt64(mem_2_2_0.AuxInt)
13590 p4 := mem_2_2_0.Args[0]
13591 d3 := mem_2_2.Args[1]
13592 mem_2_2_2 := mem_2_2.Args[2]
13593 if mem_2_2_2.Op != OpStore {
13594 break
13595 }
13596 t5 := auxToType(mem_2_2_2.Aux)
13597 _ = mem_2_2_2.Args[2]
13598 mem_2_2_2_0 := mem_2_2_2.Args[0]
13599 if mem_2_2_2_0.Op != OpOffPtr {
13600 break
13601 }
13602 tt5 := mem_2_2_2_0.Type
13603 o5 := auxIntToInt64(mem_2_2_2_0.AuxInt)
13604 p5 := mem_2_2_2_0.Args[0]
13605 d4 := mem_2_2_2.Args[1]
13606 mem_2_2_2_2 := mem_2_2_2.Args[2]
13607 if mem_2_2_2_2.Op != OpZero || auxIntToInt64(mem_2_2_2_2.AuxInt) != n {
13608 break
13609 }
13610 t6 := auxToType(mem_2_2_2_2.Aux)
13611 p6 := mem_2_2_2_2.Args[0]
13612 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()) {
13613 break
13614 }
13615 v.reset(OpStore)
13616 v.Aux = typeToAux(t2)
13617 v0 := b.NewValue0(v.Pos, OpOffPtr, tt2)
13618 v0.AuxInt = int64ToAuxInt(o2)
13619 v0.AddArg(dst)
13620 v1 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
13621 v1.Aux = typeToAux(t3)
13622 v2 := b.NewValue0(v.Pos, OpOffPtr, tt3)
13623 v2.AuxInt = int64ToAuxInt(o3)
13624 v2.AddArg(dst)
13625 v3 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
13626 v3.Aux = typeToAux(t4)
13627 v4 := b.NewValue0(v.Pos, OpOffPtr, tt4)
13628 v4.AuxInt = int64ToAuxInt(o4)
13629 v4.AddArg(dst)
13630 v5 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
13631 v5.Aux = typeToAux(t5)
13632 v6 := b.NewValue0(v.Pos, OpOffPtr, tt5)
13633 v6.AuxInt = int64ToAuxInt(o5)
13634 v6.AddArg(dst)
13635 v7 := b.NewValue0(v.Pos, OpZero, types.TypeMem)
13636 v7.AuxInt = int64ToAuxInt(n)
13637 v7.Aux = typeToAux(t1)
13638 v7.AddArg2(dst, mem)
13639 v5.AddArg3(v6, d4, v7)
13640 v3.AddArg3(v4, d3, v5)
13641 v1.AddArg3(v2, d2, v3)
13642 v.AddArg3(v0, d1, v1)
13643 return true
13644 }
13645
13646
13647
13648 for {
13649 n := auxIntToInt64(v.AuxInt)
13650 t1 := auxToType(v.Aux)
13651 dst := v_0
13652 p1 := v_1
13653 mem := v_2
13654 if mem.Op != OpVarDef {
13655 break
13656 }
13657 mem_0 := mem.Args[0]
13658 if mem_0.Op != OpStore {
13659 break
13660 }
13661 t2 := auxToType(mem_0.Aux)
13662 _ = mem_0.Args[2]
13663 op2 := mem_0.Args[0]
13664 if op2.Op != OpOffPtr {
13665 break
13666 }
13667 tt2 := op2.Type
13668 o2 := auxIntToInt64(op2.AuxInt)
13669 p2 := op2.Args[0]
13670 d1 := mem_0.Args[1]
13671 mem_0_2 := mem_0.Args[2]
13672 if mem_0_2.Op != OpZero || auxIntToInt64(mem_0_2.AuxInt) != n {
13673 break
13674 }
13675 t3 := auxToType(mem_0_2.Aux)
13676 p3 := mem_0_2.Args[0]
13677 if !(isSamePtr(p1, p2) && isSamePtr(p2, p3) && t2.Alignment() <= t1.Alignment() && t3.Alignment() <= t1.Alignment() && registerizable(b, t2) && n >= o2+t2.Size()) {
13678 break
13679 }
13680 v.reset(OpStore)
13681 v.Aux = typeToAux(t2)
13682 v0 := b.NewValue0(v.Pos, OpOffPtr, tt2)
13683 v0.AuxInt = int64ToAuxInt(o2)
13684 v0.AddArg(dst)
13685 v1 := b.NewValue0(v.Pos, OpZero, types.TypeMem)
13686 v1.AuxInt = int64ToAuxInt(n)
13687 v1.Aux = typeToAux(t1)
13688 v1.AddArg2(dst, mem)
13689 v.AddArg3(v0, d1, v1)
13690 return true
13691 }
13692
13693
13694
13695 for {
13696 n := auxIntToInt64(v.AuxInt)
13697 t1 := auxToType(v.Aux)
13698 dst := v_0
13699 p1 := v_1
13700 mem := v_2
13701 if mem.Op != OpVarDef {
13702 break
13703 }
13704 mem_0 := mem.Args[0]
13705 if mem_0.Op != OpStore {
13706 break
13707 }
13708 t2 := auxToType(mem_0.Aux)
13709 _ = mem_0.Args[2]
13710 mem_0_0 := mem_0.Args[0]
13711 if mem_0_0.Op != OpOffPtr {
13712 break
13713 }
13714 tt2 := mem_0_0.Type
13715 o2 := auxIntToInt64(mem_0_0.AuxInt)
13716 p2 := mem_0_0.Args[0]
13717 d1 := mem_0.Args[1]
13718 mem_0_2 := mem_0.Args[2]
13719 if mem_0_2.Op != OpStore {
13720 break
13721 }
13722 t3 := auxToType(mem_0_2.Aux)
13723 _ = mem_0_2.Args[2]
13724 mem_0_2_0 := mem_0_2.Args[0]
13725 if mem_0_2_0.Op != OpOffPtr {
13726 break
13727 }
13728 tt3 := mem_0_2_0.Type
13729 o3 := auxIntToInt64(mem_0_2_0.AuxInt)
13730 p3 := mem_0_2_0.Args[0]
13731 d2 := mem_0_2.Args[1]
13732 mem_0_2_2 := mem_0_2.Args[2]
13733 if mem_0_2_2.Op != OpZero || auxIntToInt64(mem_0_2_2.AuxInt) != n {
13734 break
13735 }
13736 t4 := auxToType(mem_0_2_2.Aux)
13737 p4 := mem_0_2_2.Args[0]
13738 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()) {
13739 break
13740 }
13741 v.reset(OpStore)
13742 v.Aux = typeToAux(t2)
13743 v0 := b.NewValue0(v.Pos, OpOffPtr, tt2)
13744 v0.AuxInt = int64ToAuxInt(o2)
13745 v0.AddArg(dst)
13746 v1 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
13747 v1.Aux = typeToAux(t3)
13748 v2 := b.NewValue0(v.Pos, OpOffPtr, tt3)
13749 v2.AuxInt = int64ToAuxInt(o3)
13750 v2.AddArg(dst)
13751 v3 := b.NewValue0(v.Pos, OpZero, types.TypeMem)
13752 v3.AuxInt = int64ToAuxInt(n)
13753 v3.Aux = typeToAux(t1)
13754 v3.AddArg2(dst, mem)
13755 v1.AddArg3(v2, d2, v3)
13756 v.AddArg3(v0, d1, v1)
13757 return true
13758 }
13759
13760
13761
13762 for {
13763 n := auxIntToInt64(v.AuxInt)
13764 t1 := auxToType(v.Aux)
13765 dst := v_0
13766 p1 := v_1
13767 mem := v_2
13768 if mem.Op != OpVarDef {
13769 break
13770 }
13771 mem_0 := mem.Args[0]
13772 if mem_0.Op != OpStore {
13773 break
13774 }
13775 t2 := auxToType(mem_0.Aux)
13776 _ = mem_0.Args[2]
13777 mem_0_0 := mem_0.Args[0]
13778 if mem_0_0.Op != OpOffPtr {
13779 break
13780 }
13781 tt2 := mem_0_0.Type
13782 o2 := auxIntToInt64(mem_0_0.AuxInt)
13783 p2 := mem_0_0.Args[0]
13784 d1 := mem_0.Args[1]
13785 mem_0_2 := mem_0.Args[2]
13786 if mem_0_2.Op != OpStore {
13787 break
13788 }
13789 t3 := auxToType(mem_0_2.Aux)
13790 _ = mem_0_2.Args[2]
13791 mem_0_2_0 := mem_0_2.Args[0]
13792 if mem_0_2_0.Op != OpOffPtr {
13793 break
13794 }
13795 tt3 := mem_0_2_0.Type
13796 o3 := auxIntToInt64(mem_0_2_0.AuxInt)
13797 p3 := mem_0_2_0.Args[0]
13798 d2 := mem_0_2.Args[1]
13799 mem_0_2_2 := mem_0_2.Args[2]
13800 if mem_0_2_2.Op != OpStore {
13801 break
13802 }
13803 t4 := auxToType(mem_0_2_2.Aux)
13804 _ = mem_0_2_2.Args[2]
13805 mem_0_2_2_0 := mem_0_2_2.Args[0]
13806 if mem_0_2_2_0.Op != OpOffPtr {
13807 break
13808 }
13809 tt4 := mem_0_2_2_0.Type
13810 o4 := auxIntToInt64(mem_0_2_2_0.AuxInt)
13811 p4 := mem_0_2_2_0.Args[0]
13812 d3 := mem_0_2_2.Args[1]
13813 mem_0_2_2_2 := mem_0_2_2.Args[2]
13814 if mem_0_2_2_2.Op != OpZero || auxIntToInt64(mem_0_2_2_2.AuxInt) != n {
13815 break
13816 }
13817 t5 := auxToType(mem_0_2_2_2.Aux)
13818 p5 := mem_0_2_2_2.Args[0]
13819 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()) {
13820 break
13821 }
13822 v.reset(OpStore)
13823 v.Aux = typeToAux(t2)
13824 v0 := b.NewValue0(v.Pos, OpOffPtr, tt2)
13825 v0.AuxInt = int64ToAuxInt(o2)
13826 v0.AddArg(dst)
13827 v1 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
13828 v1.Aux = typeToAux(t3)
13829 v2 := b.NewValue0(v.Pos, OpOffPtr, tt3)
13830 v2.AuxInt = int64ToAuxInt(o3)
13831 v2.AddArg(dst)
13832 v3 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
13833 v3.Aux = typeToAux(t4)
13834 v4 := b.NewValue0(v.Pos, OpOffPtr, tt4)
13835 v4.AuxInt = int64ToAuxInt(o4)
13836 v4.AddArg(dst)
13837 v5 := b.NewValue0(v.Pos, OpZero, types.TypeMem)
13838 v5.AuxInt = int64ToAuxInt(n)
13839 v5.Aux = typeToAux(t1)
13840 v5.AddArg2(dst, mem)
13841 v3.AddArg3(v4, d3, v5)
13842 v1.AddArg3(v2, d2, v3)
13843 v.AddArg3(v0, d1, v1)
13844 return true
13845 }
13846
13847
13848
13849 for {
13850 n := auxIntToInt64(v.AuxInt)
13851 t1 := auxToType(v.Aux)
13852 dst := v_0
13853 p1 := v_1
13854 mem := v_2
13855 if mem.Op != OpVarDef {
13856 break
13857 }
13858 mem_0 := mem.Args[0]
13859 if mem_0.Op != OpStore {
13860 break
13861 }
13862 t2 := auxToType(mem_0.Aux)
13863 _ = mem_0.Args[2]
13864 mem_0_0 := mem_0.Args[0]
13865 if mem_0_0.Op != OpOffPtr {
13866 break
13867 }
13868 tt2 := mem_0_0.Type
13869 o2 := auxIntToInt64(mem_0_0.AuxInt)
13870 p2 := mem_0_0.Args[0]
13871 d1 := mem_0.Args[1]
13872 mem_0_2 := mem_0.Args[2]
13873 if mem_0_2.Op != OpStore {
13874 break
13875 }
13876 t3 := auxToType(mem_0_2.Aux)
13877 _ = mem_0_2.Args[2]
13878 mem_0_2_0 := mem_0_2.Args[0]
13879 if mem_0_2_0.Op != OpOffPtr {
13880 break
13881 }
13882 tt3 := mem_0_2_0.Type
13883 o3 := auxIntToInt64(mem_0_2_0.AuxInt)
13884 p3 := mem_0_2_0.Args[0]
13885 d2 := mem_0_2.Args[1]
13886 mem_0_2_2 := mem_0_2.Args[2]
13887 if mem_0_2_2.Op != OpStore {
13888 break
13889 }
13890 t4 := auxToType(mem_0_2_2.Aux)
13891 _ = mem_0_2_2.Args[2]
13892 mem_0_2_2_0 := mem_0_2_2.Args[0]
13893 if mem_0_2_2_0.Op != OpOffPtr {
13894 break
13895 }
13896 tt4 := mem_0_2_2_0.Type
13897 o4 := auxIntToInt64(mem_0_2_2_0.AuxInt)
13898 p4 := mem_0_2_2_0.Args[0]
13899 d3 := mem_0_2_2.Args[1]
13900 mem_0_2_2_2 := mem_0_2_2.Args[2]
13901 if mem_0_2_2_2.Op != OpStore {
13902 break
13903 }
13904 t5 := auxToType(mem_0_2_2_2.Aux)
13905 _ = mem_0_2_2_2.Args[2]
13906 mem_0_2_2_2_0 := mem_0_2_2_2.Args[0]
13907 if mem_0_2_2_2_0.Op != OpOffPtr {
13908 break
13909 }
13910 tt5 := mem_0_2_2_2_0.Type
13911 o5 := auxIntToInt64(mem_0_2_2_2_0.AuxInt)
13912 p5 := mem_0_2_2_2_0.Args[0]
13913 d4 := mem_0_2_2_2.Args[1]
13914 mem_0_2_2_2_2 := mem_0_2_2_2.Args[2]
13915 if mem_0_2_2_2_2.Op != OpZero || auxIntToInt64(mem_0_2_2_2_2.AuxInt) != n {
13916 break
13917 }
13918 t6 := auxToType(mem_0_2_2_2_2.Aux)
13919 p6 := mem_0_2_2_2_2.Args[0]
13920 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()) {
13921 break
13922 }
13923 v.reset(OpStore)
13924 v.Aux = typeToAux(t2)
13925 v0 := b.NewValue0(v.Pos, OpOffPtr, tt2)
13926 v0.AuxInt = int64ToAuxInt(o2)
13927 v0.AddArg(dst)
13928 v1 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
13929 v1.Aux = typeToAux(t3)
13930 v2 := b.NewValue0(v.Pos, OpOffPtr, tt3)
13931 v2.AuxInt = int64ToAuxInt(o3)
13932 v2.AddArg(dst)
13933 v3 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
13934 v3.Aux = typeToAux(t4)
13935 v4 := b.NewValue0(v.Pos, OpOffPtr, tt4)
13936 v4.AuxInt = int64ToAuxInt(o4)
13937 v4.AddArg(dst)
13938 v5 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
13939 v5.Aux = typeToAux(t5)
13940 v6 := b.NewValue0(v.Pos, OpOffPtr, tt5)
13941 v6.AuxInt = int64ToAuxInt(o5)
13942 v6.AddArg(dst)
13943 v7 := b.NewValue0(v.Pos, OpZero, types.TypeMem)
13944 v7.AuxInt = int64ToAuxInt(n)
13945 v7.Aux = typeToAux(t1)
13946 v7.AddArg2(dst, mem)
13947 v5.AddArg3(v6, d4, v7)
13948 v3.AddArg3(v4, d3, v5)
13949 v1.AddArg3(v2, d2, v3)
13950 v.AddArg3(v0, d1, v1)
13951 return true
13952 }
13953
13954
13955
13956 for {
13957 s := auxIntToInt64(v.AuxInt)
13958 t1 := auxToType(v.Aux)
13959 dst := v_0
13960 tmp1 := v_1
13961 midmem := v_2
13962 if midmem.Op != OpMove || auxIntToInt64(midmem.AuxInt) != s {
13963 break
13964 }
13965 t2 := auxToType(midmem.Aux)
13966 src := midmem.Args[1]
13967 tmp2 := midmem.Args[0]
13968 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))) {
13969 break
13970 }
13971 v.reset(OpMove)
13972 v.AuxInt = int64ToAuxInt(s)
13973 v.Aux = typeToAux(t1)
13974 v.AddArg3(dst, src, midmem)
13975 return true
13976 }
13977
13978
13979
13980 for {
13981 s := auxIntToInt64(v.AuxInt)
13982 t1 := auxToType(v.Aux)
13983 dst := v_0
13984 tmp1 := v_1
13985 midmem := v_2
13986 if midmem.Op != OpVarDef {
13987 break
13988 }
13989 midmem_0 := midmem.Args[0]
13990 if midmem_0.Op != OpMove || auxIntToInt64(midmem_0.AuxInt) != s {
13991 break
13992 }
13993 t2 := auxToType(midmem_0.Aux)
13994 src := midmem_0.Args[1]
13995 tmp2 := midmem_0.Args[0]
13996 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))) {
13997 break
13998 }
13999 v.reset(OpMove)
14000 v.AuxInt = int64ToAuxInt(s)
14001 v.Aux = typeToAux(t1)
14002 v.AddArg3(dst, src, midmem)
14003 return true
14004 }
14005
14006
14007
14008 for {
14009 dst := v_0
14010 src := v_1
14011 mem := v_2
14012 if !(isSamePtr(dst, src)) {
14013 break
14014 }
14015 v.copyOf(mem)
14016 return true
14017 }
14018 return false
14019 }
14020 func rewriteValuegeneric_OpMul16(v *Value) bool {
14021 v_1 := v.Args[1]
14022 v_0 := v.Args[0]
14023 b := v.Block
14024 typ := &b.Func.Config.Types
14025
14026
14027 for {
14028 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
14029 if v_0.Op != OpConst16 {
14030 continue
14031 }
14032 c := auxIntToInt16(v_0.AuxInt)
14033 if v_1.Op != OpConst16 {
14034 continue
14035 }
14036 d := auxIntToInt16(v_1.AuxInt)
14037 v.reset(OpConst16)
14038 v.AuxInt = int16ToAuxInt(c * d)
14039 return true
14040 }
14041 break
14042 }
14043
14044
14045 for {
14046 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
14047 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 1 {
14048 continue
14049 }
14050 x := v_1
14051 v.copyOf(x)
14052 return true
14053 }
14054 break
14055 }
14056
14057
14058 for {
14059 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
14060 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != -1 {
14061 continue
14062 }
14063 x := v_1
14064 v.reset(OpNeg16)
14065 v.AddArg(x)
14066 return true
14067 }
14068 break
14069 }
14070
14071
14072
14073 for {
14074 t := v.Type
14075 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
14076 n := v_0
14077 if v_1.Op != OpConst16 {
14078 continue
14079 }
14080 c := auxIntToInt16(v_1.AuxInt)
14081 if !(isPowerOfTwo16(c)) {
14082 continue
14083 }
14084 v.reset(OpLsh16x64)
14085 v.Type = t
14086 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
14087 v0.AuxInt = int64ToAuxInt(log16(c))
14088 v.AddArg2(n, v0)
14089 return true
14090 }
14091 break
14092 }
14093
14094
14095
14096 for {
14097 t := v.Type
14098 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
14099 n := v_0
14100 if v_1.Op != OpConst16 {
14101 continue
14102 }
14103 c := auxIntToInt16(v_1.AuxInt)
14104 if !(t.IsSigned() && isPowerOfTwo16(-c)) {
14105 continue
14106 }
14107 v.reset(OpNeg16)
14108 v0 := b.NewValue0(v.Pos, OpLsh16x64, t)
14109 v1 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
14110 v1.AuxInt = int64ToAuxInt(log16(-c))
14111 v0.AddArg2(n, v1)
14112 v.AddArg(v0)
14113 return true
14114 }
14115 break
14116 }
14117
14118
14119 for {
14120 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
14121 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 {
14122 continue
14123 }
14124 v.reset(OpConst16)
14125 v.AuxInt = int16ToAuxInt(0)
14126 return true
14127 }
14128 break
14129 }
14130
14131
14132
14133 for {
14134 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
14135 if v_0.Op != OpMul16 {
14136 continue
14137 }
14138 _ = v_0.Args[1]
14139 v_0_0 := v_0.Args[0]
14140 v_0_1 := v_0.Args[1]
14141 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
14142 i := v_0_0
14143 if i.Op != OpConst16 {
14144 continue
14145 }
14146 t := i.Type
14147 z := v_0_1
14148 x := v_1
14149 if !(z.Op != OpConst16 && x.Op != OpConst16) {
14150 continue
14151 }
14152 v.reset(OpMul16)
14153 v0 := b.NewValue0(v.Pos, OpMul16, t)
14154 v0.AddArg2(x, z)
14155 v.AddArg2(i, v0)
14156 return true
14157 }
14158 }
14159 break
14160 }
14161
14162
14163 for {
14164 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
14165 if v_0.Op != OpConst16 {
14166 continue
14167 }
14168 t := v_0.Type
14169 c := auxIntToInt16(v_0.AuxInt)
14170 if v_1.Op != OpMul16 {
14171 continue
14172 }
14173 _ = v_1.Args[1]
14174 v_1_0 := v_1.Args[0]
14175 v_1_1 := v_1.Args[1]
14176 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
14177 if v_1_0.Op != OpConst16 || v_1_0.Type != t {
14178 continue
14179 }
14180 d := auxIntToInt16(v_1_0.AuxInt)
14181 x := v_1_1
14182 v.reset(OpMul16)
14183 v0 := b.NewValue0(v.Pos, OpConst16, t)
14184 v0.AuxInt = int16ToAuxInt(c * d)
14185 v.AddArg2(v0, x)
14186 return true
14187 }
14188 }
14189 break
14190 }
14191 return false
14192 }
14193 func rewriteValuegeneric_OpMul32(v *Value) bool {
14194 v_1 := v.Args[1]
14195 v_0 := v.Args[0]
14196 b := v.Block
14197 typ := &b.Func.Config.Types
14198
14199
14200 for {
14201 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
14202 if v_0.Op != OpConst32 {
14203 continue
14204 }
14205 c := auxIntToInt32(v_0.AuxInt)
14206 if v_1.Op != OpConst32 {
14207 continue
14208 }
14209 d := auxIntToInt32(v_1.AuxInt)
14210 v.reset(OpConst32)
14211 v.AuxInt = int32ToAuxInt(c * d)
14212 return true
14213 }
14214 break
14215 }
14216
14217
14218 for {
14219 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
14220 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 1 {
14221 continue
14222 }
14223 x := v_1
14224 v.copyOf(x)
14225 return true
14226 }
14227 break
14228 }
14229
14230
14231 for {
14232 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
14233 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != -1 {
14234 continue
14235 }
14236 x := v_1
14237 v.reset(OpNeg32)
14238 v.AddArg(x)
14239 return true
14240 }
14241 break
14242 }
14243
14244
14245
14246 for {
14247 t := v.Type
14248 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
14249 n := v_0
14250 if v_1.Op != OpConst32 {
14251 continue
14252 }
14253 c := auxIntToInt32(v_1.AuxInt)
14254 if !(isPowerOfTwo32(c)) {
14255 continue
14256 }
14257 v.reset(OpLsh32x64)
14258 v.Type = t
14259 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
14260 v0.AuxInt = int64ToAuxInt(log32(c))
14261 v.AddArg2(n, v0)
14262 return true
14263 }
14264 break
14265 }
14266
14267
14268
14269 for {
14270 t := v.Type
14271 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
14272 n := v_0
14273 if v_1.Op != OpConst32 {
14274 continue
14275 }
14276 c := auxIntToInt32(v_1.AuxInt)
14277 if !(t.IsSigned() && isPowerOfTwo32(-c)) {
14278 continue
14279 }
14280 v.reset(OpNeg32)
14281 v0 := b.NewValue0(v.Pos, OpLsh32x64, t)
14282 v1 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
14283 v1.AuxInt = int64ToAuxInt(log32(-c))
14284 v0.AddArg2(n, v1)
14285 v.AddArg(v0)
14286 return true
14287 }
14288 break
14289 }
14290
14291
14292 for {
14293 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
14294 if v_0.Op != OpConst32 {
14295 continue
14296 }
14297 t := v_0.Type
14298 c := auxIntToInt32(v_0.AuxInt)
14299 if v_1.Op != OpAdd32 || v_1.Type != t {
14300 continue
14301 }
14302 _ = v_1.Args[1]
14303 v_1_0 := v_1.Args[0]
14304 v_1_1 := v_1.Args[1]
14305 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
14306 if v_1_0.Op != OpConst32 || v_1_0.Type != t {
14307 continue
14308 }
14309 d := auxIntToInt32(v_1_0.AuxInt)
14310 x := v_1_1
14311 v.reset(OpAdd32)
14312 v0 := b.NewValue0(v.Pos, OpConst32, t)
14313 v0.AuxInt = int32ToAuxInt(c * d)
14314 v1 := b.NewValue0(v.Pos, OpMul32, t)
14315 v2 := b.NewValue0(v.Pos, OpConst32, t)
14316 v2.AuxInt = int32ToAuxInt(c)
14317 v1.AddArg2(v2, x)
14318 v.AddArg2(v0, v1)
14319 return true
14320 }
14321 }
14322 break
14323 }
14324
14325
14326 for {
14327 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
14328 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
14329 continue
14330 }
14331 v.reset(OpConst32)
14332 v.AuxInt = int32ToAuxInt(0)
14333 return true
14334 }
14335 break
14336 }
14337
14338
14339
14340 for {
14341 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
14342 if v_0.Op != OpMul32 {
14343 continue
14344 }
14345 _ = v_0.Args[1]
14346 v_0_0 := v_0.Args[0]
14347 v_0_1 := v_0.Args[1]
14348 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
14349 i := v_0_0
14350 if i.Op != OpConst32 {
14351 continue
14352 }
14353 t := i.Type
14354 z := v_0_1
14355 x := v_1
14356 if !(z.Op != OpConst32 && x.Op != OpConst32) {
14357 continue
14358 }
14359 v.reset(OpMul32)
14360 v0 := b.NewValue0(v.Pos, OpMul32, t)
14361 v0.AddArg2(x, z)
14362 v.AddArg2(i, v0)
14363 return true
14364 }
14365 }
14366 break
14367 }
14368
14369
14370 for {
14371 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
14372 if v_0.Op != OpConst32 {
14373 continue
14374 }
14375 t := v_0.Type
14376 c := auxIntToInt32(v_0.AuxInt)
14377 if v_1.Op != OpMul32 {
14378 continue
14379 }
14380 _ = v_1.Args[1]
14381 v_1_0 := v_1.Args[0]
14382 v_1_1 := v_1.Args[1]
14383 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
14384 if v_1_0.Op != OpConst32 || v_1_0.Type != t {
14385 continue
14386 }
14387 d := auxIntToInt32(v_1_0.AuxInt)
14388 x := v_1_1
14389 v.reset(OpMul32)
14390 v0 := b.NewValue0(v.Pos, OpConst32, t)
14391 v0.AuxInt = int32ToAuxInt(c * d)
14392 v.AddArg2(v0, x)
14393 return true
14394 }
14395 }
14396 break
14397 }
14398 return false
14399 }
14400 func rewriteValuegeneric_OpMul32F(v *Value) bool {
14401 v_1 := v.Args[1]
14402 v_0 := v.Args[0]
14403
14404
14405
14406 for {
14407 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
14408 if v_0.Op != OpConst32F {
14409 continue
14410 }
14411 c := auxIntToFloat32(v_0.AuxInt)
14412 if v_1.Op != OpConst32F {
14413 continue
14414 }
14415 d := auxIntToFloat32(v_1.AuxInt)
14416 if !(c*d == c*d) {
14417 continue
14418 }
14419 v.reset(OpConst32F)
14420 v.AuxInt = float32ToAuxInt(c * d)
14421 return true
14422 }
14423 break
14424 }
14425
14426
14427 for {
14428 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
14429 x := v_0
14430 if v_1.Op != OpConst32F || auxIntToFloat32(v_1.AuxInt) != 1 {
14431 continue
14432 }
14433 v.copyOf(x)
14434 return true
14435 }
14436 break
14437 }
14438
14439
14440 for {
14441 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
14442 x := v_0
14443 if v_1.Op != OpConst32F || auxIntToFloat32(v_1.AuxInt) != -1 {
14444 continue
14445 }
14446 v.reset(OpNeg32F)
14447 v.AddArg(x)
14448 return true
14449 }
14450 break
14451 }
14452
14453
14454 for {
14455 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
14456 x := v_0
14457 if v_1.Op != OpConst32F || auxIntToFloat32(v_1.AuxInt) != 2 {
14458 continue
14459 }
14460 v.reset(OpAdd32F)
14461 v.AddArg2(x, x)
14462 return true
14463 }
14464 break
14465 }
14466 return false
14467 }
14468 func rewriteValuegeneric_OpMul64(v *Value) bool {
14469 v_1 := v.Args[1]
14470 v_0 := v.Args[0]
14471 b := v.Block
14472 typ := &b.Func.Config.Types
14473
14474
14475 for {
14476 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
14477 if v_0.Op != OpConst64 {
14478 continue
14479 }
14480 c := auxIntToInt64(v_0.AuxInt)
14481 if v_1.Op != OpConst64 {
14482 continue
14483 }
14484 d := auxIntToInt64(v_1.AuxInt)
14485 v.reset(OpConst64)
14486 v.AuxInt = int64ToAuxInt(c * d)
14487 return true
14488 }
14489 break
14490 }
14491
14492
14493 for {
14494 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
14495 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 1 {
14496 continue
14497 }
14498 x := v_1
14499 v.copyOf(x)
14500 return true
14501 }
14502 break
14503 }
14504
14505
14506 for {
14507 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
14508 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != -1 {
14509 continue
14510 }
14511 x := v_1
14512 v.reset(OpNeg64)
14513 v.AddArg(x)
14514 return true
14515 }
14516 break
14517 }
14518
14519
14520
14521 for {
14522 t := v.Type
14523 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
14524 n := v_0
14525 if v_1.Op != OpConst64 {
14526 continue
14527 }
14528 c := auxIntToInt64(v_1.AuxInt)
14529 if !(isPowerOfTwo64(c)) {
14530 continue
14531 }
14532 v.reset(OpLsh64x64)
14533 v.Type = t
14534 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
14535 v0.AuxInt = int64ToAuxInt(log64(c))
14536 v.AddArg2(n, v0)
14537 return true
14538 }
14539 break
14540 }
14541
14542
14543
14544 for {
14545 t := v.Type
14546 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
14547 n := v_0
14548 if v_1.Op != OpConst64 {
14549 continue
14550 }
14551 c := auxIntToInt64(v_1.AuxInt)
14552 if !(t.IsSigned() && isPowerOfTwo64(-c)) {
14553 continue
14554 }
14555 v.reset(OpNeg64)
14556 v0 := b.NewValue0(v.Pos, OpLsh64x64, t)
14557 v1 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
14558 v1.AuxInt = int64ToAuxInt(log64(-c))
14559 v0.AddArg2(n, v1)
14560 v.AddArg(v0)
14561 return true
14562 }
14563 break
14564 }
14565
14566
14567 for {
14568 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
14569 if v_0.Op != OpConst64 {
14570 continue
14571 }
14572 t := v_0.Type
14573 c := auxIntToInt64(v_0.AuxInt)
14574 if v_1.Op != OpAdd64 || v_1.Type != t {
14575 continue
14576 }
14577 _ = v_1.Args[1]
14578 v_1_0 := v_1.Args[0]
14579 v_1_1 := v_1.Args[1]
14580 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
14581 if v_1_0.Op != OpConst64 || v_1_0.Type != t {
14582 continue
14583 }
14584 d := auxIntToInt64(v_1_0.AuxInt)
14585 x := v_1_1
14586 v.reset(OpAdd64)
14587 v0 := b.NewValue0(v.Pos, OpConst64, t)
14588 v0.AuxInt = int64ToAuxInt(c * d)
14589 v1 := b.NewValue0(v.Pos, OpMul64, t)
14590 v2 := b.NewValue0(v.Pos, OpConst64, t)
14591 v2.AuxInt = int64ToAuxInt(c)
14592 v1.AddArg2(v2, x)
14593 v.AddArg2(v0, v1)
14594 return true
14595 }
14596 }
14597 break
14598 }
14599
14600
14601 for {
14602 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
14603 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
14604 continue
14605 }
14606 v.reset(OpConst64)
14607 v.AuxInt = int64ToAuxInt(0)
14608 return true
14609 }
14610 break
14611 }
14612
14613
14614
14615 for {
14616 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
14617 if v_0.Op != OpMul64 {
14618 continue
14619 }
14620 _ = v_0.Args[1]
14621 v_0_0 := v_0.Args[0]
14622 v_0_1 := v_0.Args[1]
14623 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
14624 i := v_0_0
14625 if i.Op != OpConst64 {
14626 continue
14627 }
14628 t := i.Type
14629 z := v_0_1
14630 x := v_1
14631 if !(z.Op != OpConst64 && x.Op != OpConst64) {
14632 continue
14633 }
14634 v.reset(OpMul64)
14635 v0 := b.NewValue0(v.Pos, OpMul64, t)
14636 v0.AddArg2(x, z)
14637 v.AddArg2(i, v0)
14638 return true
14639 }
14640 }
14641 break
14642 }
14643
14644
14645 for {
14646 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
14647 if v_0.Op != OpConst64 {
14648 continue
14649 }
14650 t := v_0.Type
14651 c := auxIntToInt64(v_0.AuxInt)
14652 if v_1.Op != OpMul64 {
14653 continue
14654 }
14655 _ = v_1.Args[1]
14656 v_1_0 := v_1.Args[0]
14657 v_1_1 := v_1.Args[1]
14658 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
14659 if v_1_0.Op != OpConst64 || v_1_0.Type != t {
14660 continue
14661 }
14662 d := auxIntToInt64(v_1_0.AuxInt)
14663 x := v_1_1
14664 v.reset(OpMul64)
14665 v0 := b.NewValue0(v.Pos, OpConst64, t)
14666 v0.AuxInt = int64ToAuxInt(c * d)
14667 v.AddArg2(v0, x)
14668 return true
14669 }
14670 }
14671 break
14672 }
14673 return false
14674 }
14675 func rewriteValuegeneric_OpMul64F(v *Value) bool {
14676 v_1 := v.Args[1]
14677 v_0 := v.Args[0]
14678
14679
14680
14681 for {
14682 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
14683 if v_0.Op != OpConst64F {
14684 continue
14685 }
14686 c := auxIntToFloat64(v_0.AuxInt)
14687 if v_1.Op != OpConst64F {
14688 continue
14689 }
14690 d := auxIntToFloat64(v_1.AuxInt)
14691 if !(c*d == c*d) {
14692 continue
14693 }
14694 v.reset(OpConst64F)
14695 v.AuxInt = float64ToAuxInt(c * d)
14696 return true
14697 }
14698 break
14699 }
14700
14701
14702 for {
14703 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
14704 x := v_0
14705 if v_1.Op != OpConst64F || auxIntToFloat64(v_1.AuxInt) != 1 {
14706 continue
14707 }
14708 v.copyOf(x)
14709 return true
14710 }
14711 break
14712 }
14713
14714
14715 for {
14716 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
14717 x := v_0
14718 if v_1.Op != OpConst64F || auxIntToFloat64(v_1.AuxInt) != -1 {
14719 continue
14720 }
14721 v.reset(OpNeg64F)
14722 v.AddArg(x)
14723 return true
14724 }
14725 break
14726 }
14727
14728
14729 for {
14730 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
14731 x := v_0
14732 if v_1.Op != OpConst64F || auxIntToFloat64(v_1.AuxInt) != 2 {
14733 continue
14734 }
14735 v.reset(OpAdd64F)
14736 v.AddArg2(x, x)
14737 return true
14738 }
14739 break
14740 }
14741 return false
14742 }
14743 func rewriteValuegeneric_OpMul8(v *Value) bool {
14744 v_1 := v.Args[1]
14745 v_0 := v.Args[0]
14746 b := v.Block
14747 typ := &b.Func.Config.Types
14748
14749
14750 for {
14751 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
14752 if v_0.Op != OpConst8 {
14753 continue
14754 }
14755 c := auxIntToInt8(v_0.AuxInt)
14756 if v_1.Op != OpConst8 {
14757 continue
14758 }
14759 d := auxIntToInt8(v_1.AuxInt)
14760 v.reset(OpConst8)
14761 v.AuxInt = int8ToAuxInt(c * d)
14762 return true
14763 }
14764 break
14765 }
14766
14767
14768 for {
14769 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
14770 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 1 {
14771 continue
14772 }
14773 x := v_1
14774 v.copyOf(x)
14775 return true
14776 }
14777 break
14778 }
14779
14780
14781 for {
14782 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
14783 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != -1 {
14784 continue
14785 }
14786 x := v_1
14787 v.reset(OpNeg8)
14788 v.AddArg(x)
14789 return true
14790 }
14791 break
14792 }
14793
14794
14795
14796 for {
14797 t := v.Type
14798 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
14799 n := v_0
14800 if v_1.Op != OpConst8 {
14801 continue
14802 }
14803 c := auxIntToInt8(v_1.AuxInt)
14804 if !(isPowerOfTwo8(c)) {
14805 continue
14806 }
14807 v.reset(OpLsh8x64)
14808 v.Type = t
14809 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
14810 v0.AuxInt = int64ToAuxInt(log8(c))
14811 v.AddArg2(n, v0)
14812 return true
14813 }
14814 break
14815 }
14816
14817
14818
14819 for {
14820 t := v.Type
14821 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
14822 n := v_0
14823 if v_1.Op != OpConst8 {
14824 continue
14825 }
14826 c := auxIntToInt8(v_1.AuxInt)
14827 if !(t.IsSigned() && isPowerOfTwo8(-c)) {
14828 continue
14829 }
14830 v.reset(OpNeg8)
14831 v0 := b.NewValue0(v.Pos, OpLsh8x64, t)
14832 v1 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
14833 v1.AuxInt = int64ToAuxInt(log8(-c))
14834 v0.AddArg2(n, v1)
14835 v.AddArg(v0)
14836 return true
14837 }
14838 break
14839 }
14840
14841
14842 for {
14843 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
14844 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 {
14845 continue
14846 }
14847 v.reset(OpConst8)
14848 v.AuxInt = int8ToAuxInt(0)
14849 return true
14850 }
14851 break
14852 }
14853
14854
14855
14856 for {
14857 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
14858 if v_0.Op != OpMul8 {
14859 continue
14860 }
14861 _ = v_0.Args[1]
14862 v_0_0 := v_0.Args[0]
14863 v_0_1 := v_0.Args[1]
14864 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
14865 i := v_0_0
14866 if i.Op != OpConst8 {
14867 continue
14868 }
14869 t := i.Type
14870 z := v_0_1
14871 x := v_1
14872 if !(z.Op != OpConst8 && x.Op != OpConst8) {
14873 continue
14874 }
14875 v.reset(OpMul8)
14876 v0 := b.NewValue0(v.Pos, OpMul8, t)
14877 v0.AddArg2(x, z)
14878 v.AddArg2(i, v0)
14879 return true
14880 }
14881 }
14882 break
14883 }
14884
14885
14886 for {
14887 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
14888 if v_0.Op != OpConst8 {
14889 continue
14890 }
14891 t := v_0.Type
14892 c := auxIntToInt8(v_0.AuxInt)
14893 if v_1.Op != OpMul8 {
14894 continue
14895 }
14896 _ = v_1.Args[1]
14897 v_1_0 := v_1.Args[0]
14898 v_1_1 := v_1.Args[1]
14899 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
14900 if v_1_0.Op != OpConst8 || v_1_0.Type != t {
14901 continue
14902 }
14903 d := auxIntToInt8(v_1_0.AuxInt)
14904 x := v_1_1
14905 v.reset(OpMul8)
14906 v0 := b.NewValue0(v.Pos, OpConst8, t)
14907 v0.AuxInt = int8ToAuxInt(c * d)
14908 v.AddArg2(v0, x)
14909 return true
14910 }
14911 }
14912 break
14913 }
14914 return false
14915 }
14916 func rewriteValuegeneric_OpNeg16(v *Value) bool {
14917 v_0 := v.Args[0]
14918 b := v.Block
14919
14920
14921 for {
14922 if v_0.Op != OpConst16 {
14923 break
14924 }
14925 c := auxIntToInt16(v_0.AuxInt)
14926 v.reset(OpConst16)
14927 v.AuxInt = int16ToAuxInt(-c)
14928 return true
14929 }
14930
14931
14932 for {
14933 if v_0.Op != OpSub16 {
14934 break
14935 }
14936 y := v_0.Args[1]
14937 x := v_0.Args[0]
14938 v.reset(OpSub16)
14939 v.AddArg2(y, x)
14940 return true
14941 }
14942
14943
14944 for {
14945 if v_0.Op != OpNeg16 {
14946 break
14947 }
14948 x := v_0.Args[0]
14949 v.copyOf(x)
14950 return true
14951 }
14952
14953
14954 for {
14955 t := v.Type
14956 if v_0.Op != OpCom16 {
14957 break
14958 }
14959 x := v_0.Args[0]
14960 v.reset(OpAdd16)
14961 v0 := b.NewValue0(v.Pos, OpConst16, t)
14962 v0.AuxInt = int16ToAuxInt(1)
14963 v.AddArg2(v0, x)
14964 return true
14965 }
14966 return false
14967 }
14968 func rewriteValuegeneric_OpNeg32(v *Value) bool {
14969 v_0 := v.Args[0]
14970 b := v.Block
14971
14972
14973 for {
14974 if v_0.Op != OpConst32 {
14975 break
14976 }
14977 c := auxIntToInt32(v_0.AuxInt)
14978 v.reset(OpConst32)
14979 v.AuxInt = int32ToAuxInt(-c)
14980 return true
14981 }
14982
14983
14984 for {
14985 if v_0.Op != OpSub32 {
14986 break
14987 }
14988 y := v_0.Args[1]
14989 x := v_0.Args[0]
14990 v.reset(OpSub32)
14991 v.AddArg2(y, x)
14992 return true
14993 }
14994
14995
14996 for {
14997 if v_0.Op != OpNeg32 {
14998 break
14999 }
15000 x := v_0.Args[0]
15001 v.copyOf(x)
15002 return true
15003 }
15004
15005
15006 for {
15007 t := v.Type
15008 if v_0.Op != OpCom32 {
15009 break
15010 }
15011 x := v_0.Args[0]
15012 v.reset(OpAdd32)
15013 v0 := b.NewValue0(v.Pos, OpConst32, t)
15014 v0.AuxInt = int32ToAuxInt(1)
15015 v.AddArg2(v0, x)
15016 return true
15017 }
15018 return false
15019 }
15020 func rewriteValuegeneric_OpNeg32F(v *Value) bool {
15021 v_0 := v.Args[0]
15022
15023
15024
15025 for {
15026 if v_0.Op != OpConst32F {
15027 break
15028 }
15029 c := auxIntToFloat32(v_0.AuxInt)
15030 if !(c != 0) {
15031 break
15032 }
15033 v.reset(OpConst32F)
15034 v.AuxInt = float32ToAuxInt(-c)
15035 return true
15036 }
15037 return false
15038 }
15039 func rewriteValuegeneric_OpNeg64(v *Value) bool {
15040 v_0 := v.Args[0]
15041 b := v.Block
15042
15043
15044 for {
15045 if v_0.Op != OpConst64 {
15046 break
15047 }
15048 c := auxIntToInt64(v_0.AuxInt)
15049 v.reset(OpConst64)
15050 v.AuxInt = int64ToAuxInt(-c)
15051 return true
15052 }
15053
15054
15055 for {
15056 if v_0.Op != OpSub64 {
15057 break
15058 }
15059 y := v_0.Args[1]
15060 x := v_0.Args[0]
15061 v.reset(OpSub64)
15062 v.AddArg2(y, x)
15063 return true
15064 }
15065
15066
15067 for {
15068 if v_0.Op != OpNeg64 {
15069 break
15070 }
15071 x := v_0.Args[0]
15072 v.copyOf(x)
15073 return true
15074 }
15075
15076
15077 for {
15078 t := v.Type
15079 if v_0.Op != OpCom64 {
15080 break
15081 }
15082 x := v_0.Args[0]
15083 v.reset(OpAdd64)
15084 v0 := b.NewValue0(v.Pos, OpConst64, t)
15085 v0.AuxInt = int64ToAuxInt(1)
15086 v.AddArg2(v0, x)
15087 return true
15088 }
15089 return false
15090 }
15091 func rewriteValuegeneric_OpNeg64F(v *Value) bool {
15092 v_0 := v.Args[0]
15093
15094
15095
15096 for {
15097 if v_0.Op != OpConst64F {
15098 break
15099 }
15100 c := auxIntToFloat64(v_0.AuxInt)
15101 if !(c != 0) {
15102 break
15103 }
15104 v.reset(OpConst64F)
15105 v.AuxInt = float64ToAuxInt(-c)
15106 return true
15107 }
15108 return false
15109 }
15110 func rewriteValuegeneric_OpNeg8(v *Value) bool {
15111 v_0 := v.Args[0]
15112 b := v.Block
15113
15114
15115 for {
15116 if v_0.Op != OpConst8 {
15117 break
15118 }
15119 c := auxIntToInt8(v_0.AuxInt)
15120 v.reset(OpConst8)
15121 v.AuxInt = int8ToAuxInt(-c)
15122 return true
15123 }
15124
15125
15126 for {
15127 if v_0.Op != OpSub8 {
15128 break
15129 }
15130 y := v_0.Args[1]
15131 x := v_0.Args[0]
15132 v.reset(OpSub8)
15133 v.AddArg2(y, x)
15134 return true
15135 }
15136
15137
15138 for {
15139 if v_0.Op != OpNeg8 {
15140 break
15141 }
15142 x := v_0.Args[0]
15143 v.copyOf(x)
15144 return true
15145 }
15146
15147
15148 for {
15149 t := v.Type
15150 if v_0.Op != OpCom8 {
15151 break
15152 }
15153 x := v_0.Args[0]
15154 v.reset(OpAdd8)
15155 v0 := b.NewValue0(v.Pos, OpConst8, t)
15156 v0.AuxInt = int8ToAuxInt(1)
15157 v.AddArg2(v0, x)
15158 return true
15159 }
15160 return false
15161 }
15162 func rewriteValuegeneric_OpNeq16(v *Value) bool {
15163 v_1 := v.Args[1]
15164 v_0 := v.Args[0]
15165 b := v.Block
15166 typ := &b.Func.Config.Types
15167
15168
15169 for {
15170 x := v_0
15171 if x != v_1 {
15172 break
15173 }
15174 v.reset(OpConstBool)
15175 v.AuxInt = boolToAuxInt(false)
15176 return true
15177 }
15178
15179
15180 for {
15181 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
15182 if v_0.Op != OpConst16 {
15183 continue
15184 }
15185 t := v_0.Type
15186 c := auxIntToInt16(v_0.AuxInt)
15187 if v_1.Op != OpAdd16 {
15188 continue
15189 }
15190 _ = v_1.Args[1]
15191 v_1_0 := v_1.Args[0]
15192 v_1_1 := v_1.Args[1]
15193 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
15194 if v_1_0.Op != OpConst16 || v_1_0.Type != t {
15195 continue
15196 }
15197 d := auxIntToInt16(v_1_0.AuxInt)
15198 x := v_1_1
15199 v.reset(OpNeq16)
15200 v0 := b.NewValue0(v.Pos, OpConst16, t)
15201 v0.AuxInt = int16ToAuxInt(c - d)
15202 v.AddArg2(v0, x)
15203 return true
15204 }
15205 }
15206 break
15207 }
15208
15209
15210 for {
15211 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
15212 if v_0.Op != OpConst16 {
15213 continue
15214 }
15215 c := auxIntToInt16(v_0.AuxInt)
15216 if v_1.Op != OpConst16 {
15217 continue
15218 }
15219 d := auxIntToInt16(v_1.AuxInt)
15220 v.reset(OpConstBool)
15221 v.AuxInt = boolToAuxInt(c != d)
15222 return true
15223 }
15224 break
15225 }
15226
15227
15228
15229 for {
15230 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
15231 n := v_0
15232 if v_1.Op != OpLsh16x64 {
15233 continue
15234 }
15235 _ = v_1.Args[1]
15236 v_1_0 := v_1.Args[0]
15237 if v_1_0.Op != OpRsh16x64 {
15238 continue
15239 }
15240 _ = v_1_0.Args[1]
15241 v_1_0_0 := v_1_0.Args[0]
15242 if v_1_0_0.Op != OpAdd16 {
15243 continue
15244 }
15245 t := v_1_0_0.Type
15246 _ = v_1_0_0.Args[1]
15247 v_1_0_0_0 := v_1_0_0.Args[0]
15248 v_1_0_0_1 := v_1_0_0.Args[1]
15249 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 {
15250 if n != v_1_0_0_0 || v_1_0_0_1.Op != OpRsh16Ux64 || v_1_0_0_1.Type != t {
15251 continue
15252 }
15253 _ = v_1_0_0_1.Args[1]
15254 v_1_0_0_1_0 := v_1_0_0_1.Args[0]
15255 if v_1_0_0_1_0.Op != OpRsh16x64 || v_1_0_0_1_0.Type != t {
15256 continue
15257 }
15258 _ = v_1_0_0_1_0.Args[1]
15259 if n != v_1_0_0_1_0.Args[0] {
15260 continue
15261 }
15262 v_1_0_0_1_0_1 := v_1_0_0_1_0.Args[1]
15263 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 {
15264 continue
15265 }
15266 v_1_0_0_1_1 := v_1_0_0_1.Args[1]
15267 if v_1_0_0_1_1.Op != OpConst64 || v_1_0_0_1_1.Type != typ.UInt64 {
15268 continue
15269 }
15270 kbar := auxIntToInt64(v_1_0_0_1_1.AuxInt)
15271 v_1_0_1 := v_1_0.Args[1]
15272 if v_1_0_1.Op != OpConst64 || v_1_0_1.Type != typ.UInt64 {
15273 continue
15274 }
15275 k := auxIntToInt64(v_1_0_1.AuxInt)
15276 v_1_1 := v_1.Args[1]
15277 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) {
15278 continue
15279 }
15280 v.reset(OpNeq16)
15281 v0 := b.NewValue0(v.Pos, OpAnd16, t)
15282 v1 := b.NewValue0(v.Pos, OpConst16, t)
15283 v1.AuxInt = int16ToAuxInt(1<<uint(k) - 1)
15284 v0.AddArg2(n, v1)
15285 v2 := b.NewValue0(v.Pos, OpConst16, t)
15286 v2.AuxInt = int16ToAuxInt(0)
15287 v.AddArg2(v0, v2)
15288 return true
15289 }
15290 }
15291 break
15292 }
15293
15294
15295
15296 for {
15297 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
15298 s := v_0
15299 if s.Op != OpSub16 {
15300 continue
15301 }
15302 y := s.Args[1]
15303 x := s.Args[0]
15304 if v_1.Op != OpConst16 || auxIntToInt16(v_1.AuxInt) != 0 || !(s.Uses == 1) {
15305 continue
15306 }
15307 v.reset(OpNeq16)
15308 v.AddArg2(x, y)
15309 return true
15310 }
15311 break
15312 }
15313
15314
15315
15316 for {
15317 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
15318 if v_0.Op != OpAnd16 {
15319 continue
15320 }
15321 t := v_0.Type
15322 _ = v_0.Args[1]
15323 v_0_0 := v_0.Args[0]
15324 v_0_1 := v_0.Args[1]
15325 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
15326 x := v_0_0
15327 if v_0_1.Op != OpConst16 || v_0_1.Type != t {
15328 continue
15329 }
15330 y := auxIntToInt16(v_0_1.AuxInt)
15331 if v_1.Op != OpConst16 || v_1.Type != t || auxIntToInt16(v_1.AuxInt) != y || !(oneBit16(y)) {
15332 continue
15333 }
15334 v.reset(OpEq16)
15335 v0 := b.NewValue0(v.Pos, OpAnd16, t)
15336 v1 := b.NewValue0(v.Pos, OpConst16, t)
15337 v1.AuxInt = int16ToAuxInt(y)
15338 v0.AddArg2(x, v1)
15339 v2 := b.NewValue0(v.Pos, OpConst16, t)
15340 v2.AuxInt = int16ToAuxInt(0)
15341 v.AddArg2(v0, v2)
15342 return true
15343 }
15344 }
15345 break
15346 }
15347 return false
15348 }
15349 func rewriteValuegeneric_OpNeq32(v *Value) bool {
15350 v_1 := v.Args[1]
15351 v_0 := v.Args[0]
15352 b := v.Block
15353 typ := &b.Func.Config.Types
15354
15355
15356 for {
15357 x := v_0
15358 if x != v_1 {
15359 break
15360 }
15361 v.reset(OpConstBool)
15362 v.AuxInt = boolToAuxInt(false)
15363 return true
15364 }
15365
15366
15367 for {
15368 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
15369 if v_0.Op != OpConst32 {
15370 continue
15371 }
15372 t := v_0.Type
15373 c := auxIntToInt32(v_0.AuxInt)
15374 if v_1.Op != OpAdd32 {
15375 continue
15376 }
15377 _ = v_1.Args[1]
15378 v_1_0 := v_1.Args[0]
15379 v_1_1 := v_1.Args[1]
15380 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
15381 if v_1_0.Op != OpConst32 || v_1_0.Type != t {
15382 continue
15383 }
15384 d := auxIntToInt32(v_1_0.AuxInt)
15385 x := v_1_1
15386 v.reset(OpNeq32)
15387 v0 := b.NewValue0(v.Pos, OpConst32, t)
15388 v0.AuxInt = int32ToAuxInt(c - d)
15389 v.AddArg2(v0, x)
15390 return true
15391 }
15392 }
15393 break
15394 }
15395
15396
15397 for {
15398 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
15399 if v_0.Op != OpConst32 {
15400 continue
15401 }
15402 c := auxIntToInt32(v_0.AuxInt)
15403 if v_1.Op != OpConst32 {
15404 continue
15405 }
15406 d := auxIntToInt32(v_1.AuxInt)
15407 v.reset(OpConstBool)
15408 v.AuxInt = boolToAuxInt(c != d)
15409 return true
15410 }
15411 break
15412 }
15413
15414
15415
15416 for {
15417 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
15418 n := v_0
15419 if v_1.Op != OpLsh32x64 {
15420 continue
15421 }
15422 _ = v_1.Args[1]
15423 v_1_0 := v_1.Args[0]
15424 if v_1_0.Op != OpRsh32x64 {
15425 continue
15426 }
15427 _ = v_1_0.Args[1]
15428 v_1_0_0 := v_1_0.Args[0]
15429 if v_1_0_0.Op != OpAdd32 {
15430 continue
15431 }
15432 t := v_1_0_0.Type
15433 _ = v_1_0_0.Args[1]
15434 v_1_0_0_0 := v_1_0_0.Args[0]
15435 v_1_0_0_1 := v_1_0_0.Args[1]
15436 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 {
15437 if n != v_1_0_0_0 || v_1_0_0_1.Op != OpRsh32Ux64 || v_1_0_0_1.Type != t {
15438 continue
15439 }
15440 _ = v_1_0_0_1.Args[1]
15441 v_1_0_0_1_0 := v_1_0_0_1.Args[0]
15442 if v_1_0_0_1_0.Op != OpRsh32x64 || v_1_0_0_1_0.Type != t {
15443 continue
15444 }
15445 _ = v_1_0_0_1_0.Args[1]
15446 if n != v_1_0_0_1_0.Args[0] {
15447 continue
15448 }
15449 v_1_0_0_1_0_1 := v_1_0_0_1_0.Args[1]
15450 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 {
15451 continue
15452 }
15453 v_1_0_0_1_1 := v_1_0_0_1.Args[1]
15454 if v_1_0_0_1_1.Op != OpConst64 || v_1_0_0_1_1.Type != typ.UInt64 {
15455 continue
15456 }
15457 kbar := auxIntToInt64(v_1_0_0_1_1.AuxInt)
15458 v_1_0_1 := v_1_0.Args[1]
15459 if v_1_0_1.Op != OpConst64 || v_1_0_1.Type != typ.UInt64 {
15460 continue
15461 }
15462 k := auxIntToInt64(v_1_0_1.AuxInt)
15463 v_1_1 := v_1.Args[1]
15464 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) {
15465 continue
15466 }
15467 v.reset(OpNeq32)
15468 v0 := b.NewValue0(v.Pos, OpAnd32, t)
15469 v1 := b.NewValue0(v.Pos, OpConst32, t)
15470 v1.AuxInt = int32ToAuxInt(1<<uint(k) - 1)
15471 v0.AddArg2(n, v1)
15472 v2 := b.NewValue0(v.Pos, OpConst32, t)
15473 v2.AuxInt = int32ToAuxInt(0)
15474 v.AddArg2(v0, v2)
15475 return true
15476 }
15477 }
15478 break
15479 }
15480
15481
15482
15483 for {
15484 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
15485 s := v_0
15486 if s.Op != OpSub32 {
15487 continue
15488 }
15489 y := s.Args[1]
15490 x := s.Args[0]
15491 if v_1.Op != OpConst32 || auxIntToInt32(v_1.AuxInt) != 0 || !(s.Uses == 1) {
15492 continue
15493 }
15494 v.reset(OpNeq32)
15495 v.AddArg2(x, y)
15496 return true
15497 }
15498 break
15499 }
15500
15501
15502
15503 for {
15504 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
15505 if v_0.Op != OpAnd32 {
15506 continue
15507 }
15508 t := v_0.Type
15509 _ = v_0.Args[1]
15510 v_0_0 := v_0.Args[0]
15511 v_0_1 := v_0.Args[1]
15512 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
15513 x := v_0_0
15514 if v_0_1.Op != OpConst32 || v_0_1.Type != t {
15515 continue
15516 }
15517 y := auxIntToInt32(v_0_1.AuxInt)
15518 if v_1.Op != OpConst32 || v_1.Type != t || auxIntToInt32(v_1.AuxInt) != y || !(oneBit32(y)) {
15519 continue
15520 }
15521 v.reset(OpEq32)
15522 v0 := b.NewValue0(v.Pos, OpAnd32, t)
15523 v1 := b.NewValue0(v.Pos, OpConst32, t)
15524 v1.AuxInt = int32ToAuxInt(y)
15525 v0.AddArg2(x, v1)
15526 v2 := b.NewValue0(v.Pos, OpConst32, t)
15527 v2.AuxInt = int32ToAuxInt(0)
15528 v.AddArg2(v0, v2)
15529 return true
15530 }
15531 }
15532 break
15533 }
15534 return false
15535 }
15536 func rewriteValuegeneric_OpNeq32F(v *Value) bool {
15537 v_1 := v.Args[1]
15538 v_0 := v.Args[0]
15539
15540
15541 for {
15542 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
15543 if v_0.Op != OpConst32F {
15544 continue
15545 }
15546 c := auxIntToFloat32(v_0.AuxInt)
15547 if v_1.Op != OpConst32F {
15548 continue
15549 }
15550 d := auxIntToFloat32(v_1.AuxInt)
15551 v.reset(OpConstBool)
15552 v.AuxInt = boolToAuxInt(c != d)
15553 return true
15554 }
15555 break
15556 }
15557 return false
15558 }
15559 func rewriteValuegeneric_OpNeq64(v *Value) bool {
15560 v_1 := v.Args[1]
15561 v_0 := v.Args[0]
15562 b := v.Block
15563 typ := &b.Func.Config.Types
15564
15565
15566 for {
15567 x := v_0
15568 if x != v_1 {
15569 break
15570 }
15571 v.reset(OpConstBool)
15572 v.AuxInt = boolToAuxInt(false)
15573 return true
15574 }
15575
15576
15577 for {
15578 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
15579 if v_0.Op != OpConst64 {
15580 continue
15581 }
15582 t := v_0.Type
15583 c := auxIntToInt64(v_0.AuxInt)
15584 if v_1.Op != OpAdd64 {
15585 continue
15586 }
15587 _ = v_1.Args[1]
15588 v_1_0 := v_1.Args[0]
15589 v_1_1 := v_1.Args[1]
15590 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
15591 if v_1_0.Op != OpConst64 || v_1_0.Type != t {
15592 continue
15593 }
15594 d := auxIntToInt64(v_1_0.AuxInt)
15595 x := v_1_1
15596 v.reset(OpNeq64)
15597 v0 := b.NewValue0(v.Pos, OpConst64, t)
15598 v0.AuxInt = int64ToAuxInt(c - d)
15599 v.AddArg2(v0, x)
15600 return true
15601 }
15602 }
15603 break
15604 }
15605
15606
15607 for {
15608 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
15609 if v_0.Op != OpConst64 {
15610 continue
15611 }
15612 c := auxIntToInt64(v_0.AuxInt)
15613 if v_1.Op != OpConst64 {
15614 continue
15615 }
15616 d := auxIntToInt64(v_1.AuxInt)
15617 v.reset(OpConstBool)
15618 v.AuxInt = boolToAuxInt(c != d)
15619 return true
15620 }
15621 break
15622 }
15623
15624
15625
15626 for {
15627 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
15628 n := v_0
15629 if v_1.Op != OpLsh64x64 {
15630 continue
15631 }
15632 _ = v_1.Args[1]
15633 v_1_0 := v_1.Args[0]
15634 if v_1_0.Op != OpRsh64x64 {
15635 continue
15636 }
15637 _ = v_1_0.Args[1]
15638 v_1_0_0 := v_1_0.Args[0]
15639 if v_1_0_0.Op != OpAdd64 {
15640 continue
15641 }
15642 t := v_1_0_0.Type
15643 _ = v_1_0_0.Args[1]
15644 v_1_0_0_0 := v_1_0_0.Args[0]
15645 v_1_0_0_1 := v_1_0_0.Args[1]
15646 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 {
15647 if n != v_1_0_0_0 || v_1_0_0_1.Op != OpRsh64Ux64 || v_1_0_0_1.Type != t {
15648 continue
15649 }
15650 _ = v_1_0_0_1.Args[1]
15651 v_1_0_0_1_0 := v_1_0_0_1.Args[0]
15652 if v_1_0_0_1_0.Op != OpRsh64x64 || v_1_0_0_1_0.Type != t {
15653 continue
15654 }
15655 _ = v_1_0_0_1_0.Args[1]
15656 if n != v_1_0_0_1_0.Args[0] {
15657 continue
15658 }
15659 v_1_0_0_1_0_1 := v_1_0_0_1_0.Args[1]
15660 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 {
15661 continue
15662 }
15663 v_1_0_0_1_1 := v_1_0_0_1.Args[1]
15664 if v_1_0_0_1_1.Op != OpConst64 || v_1_0_0_1_1.Type != typ.UInt64 {
15665 continue
15666 }
15667 kbar := auxIntToInt64(v_1_0_0_1_1.AuxInt)
15668 v_1_0_1 := v_1_0.Args[1]
15669 if v_1_0_1.Op != OpConst64 || v_1_0_1.Type != typ.UInt64 {
15670 continue
15671 }
15672 k := auxIntToInt64(v_1_0_1.AuxInt)
15673 v_1_1 := v_1.Args[1]
15674 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) {
15675 continue
15676 }
15677 v.reset(OpNeq64)
15678 v0 := b.NewValue0(v.Pos, OpAnd64, t)
15679 v1 := b.NewValue0(v.Pos, OpConst64, t)
15680 v1.AuxInt = int64ToAuxInt(1<<uint(k) - 1)
15681 v0.AddArg2(n, v1)
15682 v2 := b.NewValue0(v.Pos, OpConst64, t)
15683 v2.AuxInt = int64ToAuxInt(0)
15684 v.AddArg2(v0, v2)
15685 return true
15686 }
15687 }
15688 break
15689 }
15690
15691
15692
15693 for {
15694 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
15695 s := v_0
15696 if s.Op != OpSub64 {
15697 continue
15698 }
15699 y := s.Args[1]
15700 x := s.Args[0]
15701 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 0 || !(s.Uses == 1) {
15702 continue
15703 }
15704 v.reset(OpNeq64)
15705 v.AddArg2(x, y)
15706 return true
15707 }
15708 break
15709 }
15710
15711
15712
15713 for {
15714 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
15715 if v_0.Op != OpAnd64 {
15716 continue
15717 }
15718 t := v_0.Type
15719 _ = v_0.Args[1]
15720 v_0_0 := v_0.Args[0]
15721 v_0_1 := v_0.Args[1]
15722 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
15723 x := v_0_0
15724 if v_0_1.Op != OpConst64 || v_0_1.Type != t {
15725 continue
15726 }
15727 y := auxIntToInt64(v_0_1.AuxInt)
15728 if v_1.Op != OpConst64 || v_1.Type != t || auxIntToInt64(v_1.AuxInt) != y || !(oneBit64(y)) {
15729 continue
15730 }
15731 v.reset(OpEq64)
15732 v0 := b.NewValue0(v.Pos, OpAnd64, t)
15733 v1 := b.NewValue0(v.Pos, OpConst64, t)
15734 v1.AuxInt = int64ToAuxInt(y)
15735 v0.AddArg2(x, v1)
15736 v2 := b.NewValue0(v.Pos, OpConst64, t)
15737 v2.AuxInt = int64ToAuxInt(0)
15738 v.AddArg2(v0, v2)
15739 return true
15740 }
15741 }
15742 break
15743 }
15744 return false
15745 }
15746 func rewriteValuegeneric_OpNeq64F(v *Value) bool {
15747 v_1 := v.Args[1]
15748 v_0 := v.Args[0]
15749
15750
15751 for {
15752 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
15753 if v_0.Op != OpConst64F {
15754 continue
15755 }
15756 c := auxIntToFloat64(v_0.AuxInt)
15757 if v_1.Op != OpConst64F {
15758 continue
15759 }
15760 d := auxIntToFloat64(v_1.AuxInt)
15761 v.reset(OpConstBool)
15762 v.AuxInt = boolToAuxInt(c != d)
15763 return true
15764 }
15765 break
15766 }
15767 return false
15768 }
15769 func rewriteValuegeneric_OpNeq8(v *Value) bool {
15770 v_1 := v.Args[1]
15771 v_0 := v.Args[0]
15772 b := v.Block
15773 typ := &b.Func.Config.Types
15774
15775
15776 for {
15777 x := v_0
15778 if x != v_1 {
15779 break
15780 }
15781 v.reset(OpConstBool)
15782 v.AuxInt = boolToAuxInt(false)
15783 return true
15784 }
15785
15786
15787 for {
15788 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
15789 if v_0.Op != OpConst8 {
15790 continue
15791 }
15792 t := v_0.Type
15793 c := auxIntToInt8(v_0.AuxInt)
15794 if v_1.Op != OpAdd8 {
15795 continue
15796 }
15797 _ = v_1.Args[1]
15798 v_1_0 := v_1.Args[0]
15799 v_1_1 := v_1.Args[1]
15800 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
15801 if v_1_0.Op != OpConst8 || v_1_0.Type != t {
15802 continue
15803 }
15804 d := auxIntToInt8(v_1_0.AuxInt)
15805 x := v_1_1
15806 v.reset(OpNeq8)
15807 v0 := b.NewValue0(v.Pos, OpConst8, t)
15808 v0.AuxInt = int8ToAuxInt(c - d)
15809 v.AddArg2(v0, x)
15810 return true
15811 }
15812 }
15813 break
15814 }
15815
15816
15817 for {
15818 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
15819 if v_0.Op != OpConst8 {
15820 continue
15821 }
15822 c := auxIntToInt8(v_0.AuxInt)
15823 if v_1.Op != OpConst8 {
15824 continue
15825 }
15826 d := auxIntToInt8(v_1.AuxInt)
15827 v.reset(OpConstBool)
15828 v.AuxInt = boolToAuxInt(c != d)
15829 return true
15830 }
15831 break
15832 }
15833
15834
15835
15836 for {
15837 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
15838 n := v_0
15839 if v_1.Op != OpLsh8x64 {
15840 continue
15841 }
15842 _ = v_1.Args[1]
15843 v_1_0 := v_1.Args[0]
15844 if v_1_0.Op != OpRsh8x64 {
15845 continue
15846 }
15847 _ = v_1_0.Args[1]
15848 v_1_0_0 := v_1_0.Args[0]
15849 if v_1_0_0.Op != OpAdd8 {
15850 continue
15851 }
15852 t := v_1_0_0.Type
15853 _ = v_1_0_0.Args[1]
15854 v_1_0_0_0 := v_1_0_0.Args[0]
15855 v_1_0_0_1 := v_1_0_0.Args[1]
15856 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 {
15857 if n != v_1_0_0_0 || v_1_0_0_1.Op != OpRsh8Ux64 || v_1_0_0_1.Type != t {
15858 continue
15859 }
15860 _ = v_1_0_0_1.Args[1]
15861 v_1_0_0_1_0 := v_1_0_0_1.Args[0]
15862 if v_1_0_0_1_0.Op != OpRsh8x64 || v_1_0_0_1_0.Type != t {
15863 continue
15864 }
15865 _ = v_1_0_0_1_0.Args[1]
15866 if n != v_1_0_0_1_0.Args[0] {
15867 continue
15868 }
15869 v_1_0_0_1_0_1 := v_1_0_0_1_0.Args[1]
15870 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 {
15871 continue
15872 }
15873 v_1_0_0_1_1 := v_1_0_0_1.Args[1]
15874 if v_1_0_0_1_1.Op != OpConst64 || v_1_0_0_1_1.Type != typ.UInt64 {
15875 continue
15876 }
15877 kbar := auxIntToInt64(v_1_0_0_1_1.AuxInt)
15878 v_1_0_1 := v_1_0.Args[1]
15879 if v_1_0_1.Op != OpConst64 || v_1_0_1.Type != typ.UInt64 {
15880 continue
15881 }
15882 k := auxIntToInt64(v_1_0_1.AuxInt)
15883 v_1_1 := v_1.Args[1]
15884 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) {
15885 continue
15886 }
15887 v.reset(OpNeq8)
15888 v0 := b.NewValue0(v.Pos, OpAnd8, t)
15889 v1 := b.NewValue0(v.Pos, OpConst8, t)
15890 v1.AuxInt = int8ToAuxInt(1<<uint(k) - 1)
15891 v0.AddArg2(n, v1)
15892 v2 := b.NewValue0(v.Pos, OpConst8, t)
15893 v2.AuxInt = int8ToAuxInt(0)
15894 v.AddArg2(v0, v2)
15895 return true
15896 }
15897 }
15898 break
15899 }
15900
15901
15902
15903 for {
15904 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
15905 s := v_0
15906 if s.Op != OpSub8 {
15907 continue
15908 }
15909 y := s.Args[1]
15910 x := s.Args[0]
15911 if v_1.Op != OpConst8 || auxIntToInt8(v_1.AuxInt) != 0 || !(s.Uses == 1) {
15912 continue
15913 }
15914 v.reset(OpNeq8)
15915 v.AddArg2(x, y)
15916 return true
15917 }
15918 break
15919 }
15920
15921
15922
15923 for {
15924 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
15925 if v_0.Op != OpAnd8 {
15926 continue
15927 }
15928 t := v_0.Type
15929 _ = v_0.Args[1]
15930 v_0_0 := v_0.Args[0]
15931 v_0_1 := v_0.Args[1]
15932 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
15933 x := v_0_0
15934 if v_0_1.Op != OpConst8 || v_0_1.Type != t {
15935 continue
15936 }
15937 y := auxIntToInt8(v_0_1.AuxInt)
15938 if v_1.Op != OpConst8 || v_1.Type != t || auxIntToInt8(v_1.AuxInt) != y || !(oneBit8(y)) {
15939 continue
15940 }
15941 v.reset(OpEq8)
15942 v0 := b.NewValue0(v.Pos, OpAnd8, t)
15943 v1 := b.NewValue0(v.Pos, OpConst8, t)
15944 v1.AuxInt = int8ToAuxInt(y)
15945 v0.AddArg2(x, v1)
15946 v2 := b.NewValue0(v.Pos, OpConst8, t)
15947 v2.AuxInt = int8ToAuxInt(0)
15948 v.AddArg2(v0, v2)
15949 return true
15950 }
15951 }
15952 break
15953 }
15954 return false
15955 }
15956 func rewriteValuegeneric_OpNeqB(v *Value) bool {
15957 v_1 := v.Args[1]
15958 v_0 := v.Args[0]
15959
15960
15961 for {
15962 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
15963 if v_0.Op != OpConstBool {
15964 continue
15965 }
15966 c := auxIntToBool(v_0.AuxInt)
15967 if v_1.Op != OpConstBool {
15968 continue
15969 }
15970 d := auxIntToBool(v_1.AuxInt)
15971 v.reset(OpConstBool)
15972 v.AuxInt = boolToAuxInt(c != d)
15973 return true
15974 }
15975 break
15976 }
15977
15978
15979 for {
15980 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
15981 if v_0.Op != OpConstBool || auxIntToBool(v_0.AuxInt) != false {
15982 continue
15983 }
15984 x := v_1
15985 v.copyOf(x)
15986 return true
15987 }
15988 break
15989 }
15990
15991
15992 for {
15993 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
15994 if v_0.Op != OpConstBool || auxIntToBool(v_0.AuxInt) != true {
15995 continue
15996 }
15997 x := v_1
15998 v.reset(OpNot)
15999 v.AddArg(x)
16000 return true
16001 }
16002 break
16003 }
16004
16005
16006 for {
16007 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
16008 if v_0.Op != OpNot {
16009 continue
16010 }
16011 x := v_0.Args[0]
16012 if v_1.Op != OpNot {
16013 continue
16014 }
16015 y := v_1.Args[0]
16016 v.reset(OpNeqB)
16017 v.AddArg2(x, y)
16018 return true
16019 }
16020 break
16021 }
16022 return false
16023 }
16024 func rewriteValuegeneric_OpNeqInter(v *Value) bool {
16025 v_1 := v.Args[1]
16026 v_0 := v.Args[0]
16027 b := v.Block
16028 typ := &b.Func.Config.Types
16029
16030
16031 for {
16032 x := v_0
16033 y := v_1
16034 v.reset(OpNeqPtr)
16035 v0 := b.NewValue0(v.Pos, OpITab, typ.Uintptr)
16036 v0.AddArg(x)
16037 v1 := b.NewValue0(v.Pos, OpITab, typ.Uintptr)
16038 v1.AddArg(y)
16039 v.AddArg2(v0, v1)
16040 return true
16041 }
16042 }
16043 func rewriteValuegeneric_OpNeqPtr(v *Value) bool {
16044 v_1 := v.Args[1]
16045 v_0 := v.Args[0]
16046
16047
16048 for {
16049 x := v_0
16050 if x != v_1 {
16051 break
16052 }
16053 v.reset(OpConstBool)
16054 v.AuxInt = boolToAuxInt(false)
16055 return true
16056 }
16057
16058
16059 for {
16060 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
16061 if v_0.Op != OpAddr {
16062 continue
16063 }
16064 x := auxToSym(v_0.Aux)
16065 if v_1.Op != OpAddr {
16066 continue
16067 }
16068 y := auxToSym(v_1.Aux)
16069 v.reset(OpConstBool)
16070 v.AuxInt = boolToAuxInt(x != y)
16071 return true
16072 }
16073 break
16074 }
16075
16076
16077 for {
16078 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
16079 if v_0.Op != OpAddr {
16080 continue
16081 }
16082 x := auxToSym(v_0.Aux)
16083 if v_1.Op != OpOffPtr {
16084 continue
16085 }
16086 o := auxIntToInt64(v_1.AuxInt)
16087 v_1_0 := v_1.Args[0]
16088 if v_1_0.Op != OpAddr {
16089 continue
16090 }
16091 y := auxToSym(v_1_0.Aux)
16092 v.reset(OpConstBool)
16093 v.AuxInt = boolToAuxInt(x != y || o != 0)
16094 return true
16095 }
16096 break
16097 }
16098
16099
16100 for {
16101 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
16102 if v_0.Op != OpOffPtr {
16103 continue
16104 }
16105 o1 := auxIntToInt64(v_0.AuxInt)
16106 v_0_0 := v_0.Args[0]
16107 if v_0_0.Op != OpAddr {
16108 continue
16109 }
16110 x := auxToSym(v_0_0.Aux)
16111 if v_1.Op != OpOffPtr {
16112 continue
16113 }
16114 o2 := auxIntToInt64(v_1.AuxInt)
16115 v_1_0 := v_1.Args[0]
16116 if v_1_0.Op != OpAddr {
16117 continue
16118 }
16119 y := auxToSym(v_1_0.Aux)
16120 v.reset(OpConstBool)
16121 v.AuxInt = boolToAuxInt(x != y || o1 != o2)
16122 return true
16123 }
16124 break
16125 }
16126
16127
16128 for {
16129 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
16130 if v_0.Op != OpLocalAddr {
16131 continue
16132 }
16133 x := auxToSym(v_0.Aux)
16134 if v_1.Op != OpLocalAddr {
16135 continue
16136 }
16137 y := auxToSym(v_1.Aux)
16138 v.reset(OpConstBool)
16139 v.AuxInt = boolToAuxInt(x != y)
16140 return true
16141 }
16142 break
16143 }
16144
16145
16146 for {
16147 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
16148 if v_0.Op != OpLocalAddr {
16149 continue
16150 }
16151 x := auxToSym(v_0.Aux)
16152 if v_1.Op != OpOffPtr {
16153 continue
16154 }
16155 o := auxIntToInt64(v_1.AuxInt)
16156 v_1_0 := v_1.Args[0]
16157 if v_1_0.Op != OpLocalAddr {
16158 continue
16159 }
16160 y := auxToSym(v_1_0.Aux)
16161 v.reset(OpConstBool)
16162 v.AuxInt = boolToAuxInt(x != y || o != 0)
16163 return true
16164 }
16165 break
16166 }
16167
16168
16169 for {
16170 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
16171 if v_0.Op != OpOffPtr {
16172 continue
16173 }
16174 o1 := auxIntToInt64(v_0.AuxInt)
16175 v_0_0 := v_0.Args[0]
16176 if v_0_0.Op != OpLocalAddr {
16177 continue
16178 }
16179 x := auxToSym(v_0_0.Aux)
16180 if v_1.Op != OpOffPtr {
16181 continue
16182 }
16183 o2 := auxIntToInt64(v_1.AuxInt)
16184 v_1_0 := v_1.Args[0]
16185 if v_1_0.Op != OpLocalAddr {
16186 continue
16187 }
16188 y := auxToSym(v_1_0.Aux)
16189 v.reset(OpConstBool)
16190 v.AuxInt = boolToAuxInt(x != y || o1 != o2)
16191 return true
16192 }
16193 break
16194 }
16195
16196
16197
16198 for {
16199 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
16200 if v_0.Op != OpOffPtr {
16201 continue
16202 }
16203 o1 := auxIntToInt64(v_0.AuxInt)
16204 p1 := v_0.Args[0]
16205 p2 := v_1
16206 if !(isSamePtr(p1, p2)) {
16207 continue
16208 }
16209 v.reset(OpConstBool)
16210 v.AuxInt = boolToAuxInt(o1 != 0)
16211 return true
16212 }
16213 break
16214 }
16215
16216
16217
16218 for {
16219 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
16220 if v_0.Op != OpOffPtr {
16221 continue
16222 }
16223 o1 := auxIntToInt64(v_0.AuxInt)
16224 p1 := v_0.Args[0]
16225 if v_1.Op != OpOffPtr {
16226 continue
16227 }
16228 o2 := auxIntToInt64(v_1.AuxInt)
16229 p2 := v_1.Args[0]
16230 if !(isSamePtr(p1, p2)) {
16231 continue
16232 }
16233 v.reset(OpConstBool)
16234 v.AuxInt = boolToAuxInt(o1 != o2)
16235 return true
16236 }
16237 break
16238 }
16239
16240
16241 for {
16242 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
16243 if v_0.Op != OpConst32 {
16244 continue
16245 }
16246 c := auxIntToInt32(v_0.AuxInt)
16247 if v_1.Op != OpConst32 {
16248 continue
16249 }
16250 d := auxIntToInt32(v_1.AuxInt)
16251 v.reset(OpConstBool)
16252 v.AuxInt = boolToAuxInt(c != d)
16253 return true
16254 }
16255 break
16256 }
16257
16258
16259 for {
16260 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
16261 if v_0.Op != OpConst64 {
16262 continue
16263 }
16264 c := auxIntToInt64(v_0.AuxInt)
16265 if v_1.Op != OpConst64 {
16266 continue
16267 }
16268 d := auxIntToInt64(v_1.AuxInt)
16269 v.reset(OpConstBool)
16270 v.AuxInt = boolToAuxInt(c != d)
16271 return true
16272 }
16273 break
16274 }
16275
16276
16277 for {
16278 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
16279 if v_0.Op != OpLocalAddr || v_1.Op != OpAddr {
16280 continue
16281 }
16282 v.reset(OpConstBool)
16283 v.AuxInt = boolToAuxInt(true)
16284 return true
16285 }
16286 break
16287 }
16288
16289
16290 for {
16291 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
16292 if v_0.Op != OpOffPtr {
16293 continue
16294 }
16295 v_0_0 := v_0.Args[0]
16296 if v_0_0.Op != OpLocalAddr || v_1.Op != OpAddr {
16297 continue
16298 }
16299 v.reset(OpConstBool)
16300 v.AuxInt = boolToAuxInt(true)
16301 return true
16302 }
16303 break
16304 }
16305
16306
16307 for {
16308 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
16309 if v_0.Op != OpLocalAddr || v_1.Op != OpOffPtr {
16310 continue
16311 }
16312 v_1_0 := v_1.Args[0]
16313 if v_1_0.Op != OpAddr {
16314 continue
16315 }
16316 v.reset(OpConstBool)
16317 v.AuxInt = boolToAuxInt(true)
16318 return true
16319 }
16320 break
16321 }
16322
16323
16324 for {
16325 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
16326 if v_0.Op != OpOffPtr {
16327 continue
16328 }
16329 v_0_0 := v_0.Args[0]
16330 if v_0_0.Op != OpLocalAddr || v_1.Op != OpOffPtr {
16331 continue
16332 }
16333 v_1_0 := v_1.Args[0]
16334 if v_1_0.Op != OpAddr {
16335 continue
16336 }
16337 v.reset(OpConstBool)
16338 v.AuxInt = boolToAuxInt(true)
16339 return true
16340 }
16341 break
16342 }
16343
16344
16345
16346 for {
16347 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
16348 if v_0.Op != OpAddPtr {
16349 continue
16350 }
16351 o1 := v_0.Args[1]
16352 p1 := v_0.Args[0]
16353 p2 := v_1
16354 if !(isSamePtr(p1, p2)) {
16355 continue
16356 }
16357 v.reset(OpIsNonNil)
16358 v.AddArg(o1)
16359 return true
16360 }
16361 break
16362 }
16363
16364
16365 for {
16366 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
16367 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
16368 continue
16369 }
16370 p := v_1
16371 v.reset(OpIsNonNil)
16372 v.AddArg(p)
16373 return true
16374 }
16375 break
16376 }
16377
16378
16379 for {
16380 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
16381 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
16382 continue
16383 }
16384 p := v_1
16385 v.reset(OpIsNonNil)
16386 v.AddArg(p)
16387 return true
16388 }
16389 break
16390 }
16391
16392
16393 for {
16394 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
16395 if v_0.Op != OpConstNil {
16396 continue
16397 }
16398 p := v_1
16399 v.reset(OpIsNonNil)
16400 v.AddArg(p)
16401 return true
16402 }
16403 break
16404 }
16405 return false
16406 }
16407 func rewriteValuegeneric_OpNeqSlice(v *Value) bool {
16408 v_1 := v.Args[1]
16409 v_0 := v.Args[0]
16410 b := v.Block
16411 typ := &b.Func.Config.Types
16412
16413
16414 for {
16415 x := v_0
16416 y := v_1
16417 v.reset(OpNeqPtr)
16418 v0 := b.NewValue0(v.Pos, OpSlicePtr, typ.BytePtr)
16419 v0.AddArg(x)
16420 v1 := b.NewValue0(v.Pos, OpSlicePtr, typ.BytePtr)
16421 v1.AddArg(y)
16422 v.AddArg2(v0, v1)
16423 return true
16424 }
16425 }
16426 func rewriteValuegeneric_OpNilCheck(v *Value) bool {
16427 v_1 := v.Args[1]
16428 v_0 := v.Args[0]
16429 b := v.Block
16430 fe := b.Func.fe
16431
16432
16433 for {
16434 if v_0.Op != OpGetG {
16435 break
16436 }
16437 mem := v_0.Args[0]
16438 if mem != v_1 {
16439 break
16440 }
16441 v.copyOf(mem)
16442 return true
16443 }
16444
16445
16446
16447 for {
16448 if v_0.Op != OpSelectN || auxIntToInt64(v_0.AuxInt) != 0 {
16449 break
16450 }
16451 call := v_0.Args[0]
16452 if call.Op != OpStaticLECall || len(call.Args) != 2 || !(isSameCall(call.Aux, "runtime.newobject") && warnRule(fe.Debug_checknil(), v, "removed nil check")) {
16453 break
16454 }
16455 v.reset(OpInvalid)
16456 return true
16457 }
16458
16459
16460
16461 for {
16462 if v_0.Op != OpOffPtr {
16463 break
16464 }
16465 v_0_0 := v_0.Args[0]
16466 if v_0_0.Op != OpSelectN || auxIntToInt64(v_0_0.AuxInt) != 0 {
16467 break
16468 }
16469 call := v_0_0.Args[0]
16470 if call.Op != OpStaticLECall || len(call.Args) != 2 || !(isSameCall(call.Aux, "runtime.newobject") && warnRule(fe.Debug_checknil(), v, "removed nil check")) {
16471 break
16472 }
16473 v.reset(OpInvalid)
16474 return true
16475 }
16476 return false
16477 }
16478 func rewriteValuegeneric_OpNot(v *Value) bool {
16479 v_0 := v.Args[0]
16480
16481
16482 for {
16483 if v_0.Op != OpConstBool {
16484 break
16485 }
16486 c := auxIntToBool(v_0.AuxInt)
16487 v.reset(OpConstBool)
16488 v.AuxInt = boolToAuxInt(!c)
16489 return true
16490 }
16491
16492
16493 for {
16494 if v_0.Op != OpEq64 {
16495 break
16496 }
16497 y := v_0.Args[1]
16498 x := v_0.Args[0]
16499 v.reset(OpNeq64)
16500 v.AddArg2(x, y)
16501 return true
16502 }
16503
16504
16505 for {
16506 if v_0.Op != OpEq32 {
16507 break
16508 }
16509 y := v_0.Args[1]
16510 x := v_0.Args[0]
16511 v.reset(OpNeq32)
16512 v.AddArg2(x, y)
16513 return true
16514 }
16515
16516
16517 for {
16518 if v_0.Op != OpEq16 {
16519 break
16520 }
16521 y := v_0.Args[1]
16522 x := v_0.Args[0]
16523 v.reset(OpNeq16)
16524 v.AddArg2(x, y)
16525 return true
16526 }
16527
16528
16529 for {
16530 if v_0.Op != OpEq8 {
16531 break
16532 }
16533 y := v_0.Args[1]
16534 x := v_0.Args[0]
16535 v.reset(OpNeq8)
16536 v.AddArg2(x, y)
16537 return true
16538 }
16539
16540
16541 for {
16542 if v_0.Op != OpEqB {
16543 break
16544 }
16545 y := v_0.Args[1]
16546 x := v_0.Args[0]
16547 v.reset(OpNeqB)
16548 v.AddArg2(x, y)
16549 return true
16550 }
16551
16552
16553 for {
16554 if v_0.Op != OpEqPtr {
16555 break
16556 }
16557 y := v_0.Args[1]
16558 x := v_0.Args[0]
16559 v.reset(OpNeqPtr)
16560 v.AddArg2(x, y)
16561 return true
16562 }
16563
16564
16565 for {
16566 if v_0.Op != OpEq64F {
16567 break
16568 }
16569 y := v_0.Args[1]
16570 x := v_0.Args[0]
16571 v.reset(OpNeq64F)
16572 v.AddArg2(x, y)
16573 return true
16574 }
16575
16576
16577 for {
16578 if v_0.Op != OpEq32F {
16579 break
16580 }
16581 y := v_0.Args[1]
16582 x := v_0.Args[0]
16583 v.reset(OpNeq32F)
16584 v.AddArg2(x, y)
16585 return true
16586 }
16587
16588
16589 for {
16590 if v_0.Op != OpNeq64 {
16591 break
16592 }
16593 y := v_0.Args[1]
16594 x := v_0.Args[0]
16595 v.reset(OpEq64)
16596 v.AddArg2(x, y)
16597 return true
16598 }
16599
16600
16601 for {
16602 if v_0.Op != OpNeq32 {
16603 break
16604 }
16605 y := v_0.Args[1]
16606 x := v_0.Args[0]
16607 v.reset(OpEq32)
16608 v.AddArg2(x, y)
16609 return true
16610 }
16611
16612
16613 for {
16614 if v_0.Op != OpNeq16 {
16615 break
16616 }
16617 y := v_0.Args[1]
16618 x := v_0.Args[0]
16619 v.reset(OpEq16)
16620 v.AddArg2(x, y)
16621 return true
16622 }
16623
16624
16625 for {
16626 if v_0.Op != OpNeq8 {
16627 break
16628 }
16629 y := v_0.Args[1]
16630 x := v_0.Args[0]
16631 v.reset(OpEq8)
16632 v.AddArg2(x, y)
16633 return true
16634 }
16635
16636
16637 for {
16638 if v_0.Op != OpNeqB {
16639 break
16640 }
16641 y := v_0.Args[1]
16642 x := v_0.Args[0]
16643 v.reset(OpEqB)
16644 v.AddArg2(x, y)
16645 return true
16646 }
16647
16648
16649 for {
16650 if v_0.Op != OpNeqPtr {
16651 break
16652 }
16653 y := v_0.Args[1]
16654 x := v_0.Args[0]
16655 v.reset(OpEqPtr)
16656 v.AddArg2(x, y)
16657 return true
16658 }
16659
16660
16661 for {
16662 if v_0.Op != OpNeq64F {
16663 break
16664 }
16665 y := v_0.Args[1]
16666 x := v_0.Args[0]
16667 v.reset(OpEq64F)
16668 v.AddArg2(x, y)
16669 return true
16670 }
16671
16672
16673 for {
16674 if v_0.Op != OpNeq32F {
16675 break
16676 }
16677 y := v_0.Args[1]
16678 x := v_0.Args[0]
16679 v.reset(OpEq32F)
16680 v.AddArg2(x, y)
16681 return true
16682 }
16683
16684
16685 for {
16686 if v_0.Op != OpLess64 {
16687 break
16688 }
16689 y := v_0.Args[1]
16690 x := v_0.Args[0]
16691 v.reset(OpLeq64)
16692 v.AddArg2(y, x)
16693 return true
16694 }
16695
16696
16697 for {
16698 if v_0.Op != OpLess32 {
16699 break
16700 }
16701 y := v_0.Args[1]
16702 x := v_0.Args[0]
16703 v.reset(OpLeq32)
16704 v.AddArg2(y, x)
16705 return true
16706 }
16707
16708
16709 for {
16710 if v_0.Op != OpLess16 {
16711 break
16712 }
16713 y := v_0.Args[1]
16714 x := v_0.Args[0]
16715 v.reset(OpLeq16)
16716 v.AddArg2(y, x)
16717 return true
16718 }
16719
16720
16721 for {
16722 if v_0.Op != OpLess8 {
16723 break
16724 }
16725 y := v_0.Args[1]
16726 x := v_0.Args[0]
16727 v.reset(OpLeq8)
16728 v.AddArg2(y, x)
16729 return true
16730 }
16731
16732
16733 for {
16734 if v_0.Op != OpLess64U {
16735 break
16736 }
16737 y := v_0.Args[1]
16738 x := v_0.Args[0]
16739 v.reset(OpLeq64U)
16740 v.AddArg2(y, x)
16741 return true
16742 }
16743
16744
16745 for {
16746 if v_0.Op != OpLess32U {
16747 break
16748 }
16749 y := v_0.Args[1]
16750 x := v_0.Args[0]
16751 v.reset(OpLeq32U)
16752 v.AddArg2(y, x)
16753 return true
16754 }
16755
16756
16757 for {
16758 if v_0.Op != OpLess16U {
16759 break
16760 }
16761 y := v_0.Args[1]
16762 x := v_0.Args[0]
16763 v.reset(OpLeq16U)
16764 v.AddArg2(y, x)
16765 return true
16766 }
16767
16768
16769 for {
16770 if v_0.Op != OpLess8U {
16771 break
16772 }
16773 y := v_0.Args[1]
16774 x := v_0.Args[0]
16775 v.reset(OpLeq8U)
16776 v.AddArg2(y, x)
16777 return true
16778 }
16779
16780
16781 for {
16782 if v_0.Op != OpLeq64 {
16783 break
16784 }
16785 y := v_0.Args[1]
16786 x := v_0.Args[0]
16787 v.reset(OpLess64)
16788 v.AddArg2(y, x)
16789 return true
16790 }
16791
16792
16793 for {
16794 if v_0.Op != OpLeq32 {
16795 break
16796 }
16797 y := v_0.Args[1]
16798 x := v_0.Args[0]
16799 v.reset(OpLess32)
16800 v.AddArg2(y, x)
16801 return true
16802 }
16803
16804
16805 for {
16806 if v_0.Op != OpLeq16 {
16807 break
16808 }
16809 y := v_0.Args[1]
16810 x := v_0.Args[0]
16811 v.reset(OpLess16)
16812 v.AddArg2(y, x)
16813 return true
16814 }
16815
16816
16817 for {
16818 if v_0.Op != OpLeq8 {
16819 break
16820 }
16821 y := v_0.Args[1]
16822 x := v_0.Args[0]
16823 v.reset(OpLess8)
16824 v.AddArg2(y, x)
16825 return true
16826 }
16827
16828
16829 for {
16830 if v_0.Op != OpLeq64U {
16831 break
16832 }
16833 y := v_0.Args[1]
16834 x := v_0.Args[0]
16835 v.reset(OpLess64U)
16836 v.AddArg2(y, x)
16837 return true
16838 }
16839
16840
16841 for {
16842 if v_0.Op != OpLeq32U {
16843 break
16844 }
16845 y := v_0.Args[1]
16846 x := v_0.Args[0]
16847 v.reset(OpLess32U)
16848 v.AddArg2(y, x)
16849 return true
16850 }
16851
16852
16853 for {
16854 if v_0.Op != OpLeq16U {
16855 break
16856 }
16857 y := v_0.Args[1]
16858 x := v_0.Args[0]
16859 v.reset(OpLess16U)
16860 v.AddArg2(y, x)
16861 return true
16862 }
16863
16864
16865 for {
16866 if v_0.Op != OpLeq8U {
16867 break
16868 }
16869 y := v_0.Args[1]
16870 x := v_0.Args[0]
16871 v.reset(OpLess8U)
16872 v.AddArg2(y, x)
16873 return true
16874 }
16875 return false
16876 }
16877 func rewriteValuegeneric_OpOffPtr(v *Value) bool {
16878 v_0 := v.Args[0]
16879
16880
16881 for {
16882 x := auxIntToInt64(v.AuxInt)
16883 if v_0.Op != OpOffPtr {
16884 break
16885 }
16886 y := auxIntToInt64(v_0.AuxInt)
16887 p := v_0.Args[0]
16888 v.reset(OpOffPtr)
16889 v.AuxInt = int64ToAuxInt(x + y)
16890 v.AddArg(p)
16891 return true
16892 }
16893
16894
16895
16896 for {
16897 if auxIntToInt64(v.AuxInt) != 0 {
16898 break
16899 }
16900 p := v_0
16901 if !(v.Type.Compare(p.Type) == types.CMPeq) {
16902 break
16903 }
16904 v.copyOf(p)
16905 return true
16906 }
16907 return false
16908 }
16909 func rewriteValuegeneric_OpOr16(v *Value) bool {
16910 v_1 := v.Args[1]
16911 v_0 := v.Args[0]
16912 b := v.Block
16913
16914
16915 for {
16916 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
16917 if v_0.Op != OpConst16 {
16918 continue
16919 }
16920 c := auxIntToInt16(v_0.AuxInt)
16921 if v_1.Op != OpConst16 {
16922 continue
16923 }
16924 d := auxIntToInt16(v_1.AuxInt)
16925 v.reset(OpConst16)
16926 v.AuxInt = int16ToAuxInt(c | d)
16927 return true
16928 }
16929 break
16930 }
16931
16932
16933 for {
16934 x := v_0
16935 if x != v_1 {
16936 break
16937 }
16938 v.copyOf(x)
16939 return true
16940 }
16941
16942
16943 for {
16944 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
16945 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 {
16946 continue
16947 }
16948 x := v_1
16949 v.copyOf(x)
16950 return true
16951 }
16952 break
16953 }
16954
16955
16956 for {
16957 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
16958 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != -1 {
16959 continue
16960 }
16961 v.reset(OpConst16)
16962 v.AuxInt = int16ToAuxInt(-1)
16963 return true
16964 }
16965 break
16966 }
16967
16968
16969 for {
16970 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
16971 x := v_0
16972 if v_1.Op != OpOr16 {
16973 continue
16974 }
16975 _ = v_1.Args[1]
16976 v_1_0 := v_1.Args[0]
16977 v_1_1 := v_1.Args[1]
16978 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
16979 if x != v_1_0 {
16980 continue
16981 }
16982 y := v_1_1
16983 v.reset(OpOr16)
16984 v.AddArg2(x, y)
16985 return true
16986 }
16987 }
16988 break
16989 }
16990
16991
16992
16993 for {
16994 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
16995 if v_0.Op != OpAnd16 {
16996 continue
16997 }
16998 _ = v_0.Args[1]
16999 v_0_0 := v_0.Args[0]
17000 v_0_1 := v_0.Args[1]
17001 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
17002 x := v_0_0
17003 if v_0_1.Op != OpConst16 {
17004 continue
17005 }
17006 c2 := auxIntToInt16(v_0_1.AuxInt)
17007 if v_1.Op != OpConst16 {
17008 continue
17009 }
17010 t := v_1.Type
17011 c1 := auxIntToInt16(v_1.AuxInt)
17012 if !(^(c1 | c2) == 0) {
17013 continue
17014 }
17015 v.reset(OpOr16)
17016 v0 := b.NewValue0(v.Pos, OpConst16, t)
17017 v0.AuxInt = int16ToAuxInt(c1)
17018 v.AddArg2(v0, x)
17019 return true
17020 }
17021 }
17022 break
17023 }
17024
17025
17026
17027 for {
17028 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
17029 if v_0.Op != OpOr16 {
17030 continue
17031 }
17032 _ = v_0.Args[1]
17033 v_0_0 := v_0.Args[0]
17034 v_0_1 := v_0.Args[1]
17035 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
17036 i := v_0_0
17037 if i.Op != OpConst16 {
17038 continue
17039 }
17040 t := i.Type
17041 z := v_0_1
17042 x := v_1
17043 if !(z.Op != OpConst16 && x.Op != OpConst16) {
17044 continue
17045 }
17046 v.reset(OpOr16)
17047 v0 := b.NewValue0(v.Pos, OpOr16, t)
17048 v0.AddArg2(z, x)
17049 v.AddArg2(i, v0)
17050 return true
17051 }
17052 }
17053 break
17054 }
17055
17056
17057 for {
17058 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
17059 if v_0.Op != OpConst16 {
17060 continue
17061 }
17062 t := v_0.Type
17063 c := auxIntToInt16(v_0.AuxInt)
17064 if v_1.Op != OpOr16 {
17065 continue
17066 }
17067 _ = v_1.Args[1]
17068 v_1_0 := v_1.Args[0]
17069 v_1_1 := v_1.Args[1]
17070 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
17071 if v_1_0.Op != OpConst16 || v_1_0.Type != t {
17072 continue
17073 }
17074 d := auxIntToInt16(v_1_0.AuxInt)
17075 x := v_1_1
17076 v.reset(OpOr16)
17077 v0 := b.NewValue0(v.Pos, OpConst16, t)
17078 v0.AuxInt = int16ToAuxInt(c | d)
17079 v.AddArg2(v0, x)
17080 return true
17081 }
17082 }
17083 break
17084 }
17085 return false
17086 }
17087 func rewriteValuegeneric_OpOr32(v *Value) bool {
17088 v_1 := v.Args[1]
17089 v_0 := v.Args[0]
17090 b := v.Block
17091
17092
17093 for {
17094 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
17095 if v_0.Op != OpConst32 {
17096 continue
17097 }
17098 c := auxIntToInt32(v_0.AuxInt)
17099 if v_1.Op != OpConst32 {
17100 continue
17101 }
17102 d := auxIntToInt32(v_1.AuxInt)
17103 v.reset(OpConst32)
17104 v.AuxInt = int32ToAuxInt(c | d)
17105 return true
17106 }
17107 break
17108 }
17109
17110
17111 for {
17112 x := v_0
17113 if x != v_1 {
17114 break
17115 }
17116 v.copyOf(x)
17117 return true
17118 }
17119
17120
17121 for {
17122 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
17123 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
17124 continue
17125 }
17126 x := v_1
17127 v.copyOf(x)
17128 return true
17129 }
17130 break
17131 }
17132
17133
17134 for {
17135 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
17136 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != -1 {
17137 continue
17138 }
17139 v.reset(OpConst32)
17140 v.AuxInt = int32ToAuxInt(-1)
17141 return true
17142 }
17143 break
17144 }
17145
17146
17147 for {
17148 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
17149 x := v_0
17150 if v_1.Op != OpOr32 {
17151 continue
17152 }
17153 _ = v_1.Args[1]
17154 v_1_0 := v_1.Args[0]
17155 v_1_1 := v_1.Args[1]
17156 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
17157 if x != v_1_0 {
17158 continue
17159 }
17160 y := v_1_1
17161 v.reset(OpOr32)
17162 v.AddArg2(x, y)
17163 return true
17164 }
17165 }
17166 break
17167 }
17168
17169
17170
17171 for {
17172 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
17173 if v_0.Op != OpAnd32 {
17174 continue
17175 }
17176 _ = v_0.Args[1]
17177 v_0_0 := v_0.Args[0]
17178 v_0_1 := v_0.Args[1]
17179 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
17180 x := v_0_0
17181 if v_0_1.Op != OpConst32 {
17182 continue
17183 }
17184 c2 := auxIntToInt32(v_0_1.AuxInt)
17185 if v_1.Op != OpConst32 {
17186 continue
17187 }
17188 t := v_1.Type
17189 c1 := auxIntToInt32(v_1.AuxInt)
17190 if !(^(c1 | c2) == 0) {
17191 continue
17192 }
17193 v.reset(OpOr32)
17194 v0 := b.NewValue0(v.Pos, OpConst32, t)
17195 v0.AuxInt = int32ToAuxInt(c1)
17196 v.AddArg2(v0, x)
17197 return true
17198 }
17199 }
17200 break
17201 }
17202
17203
17204
17205 for {
17206 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
17207 if v_0.Op != OpOr32 {
17208 continue
17209 }
17210 _ = v_0.Args[1]
17211 v_0_0 := v_0.Args[0]
17212 v_0_1 := v_0.Args[1]
17213 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
17214 i := v_0_0
17215 if i.Op != OpConst32 {
17216 continue
17217 }
17218 t := i.Type
17219 z := v_0_1
17220 x := v_1
17221 if !(z.Op != OpConst32 && x.Op != OpConst32) {
17222 continue
17223 }
17224 v.reset(OpOr32)
17225 v0 := b.NewValue0(v.Pos, OpOr32, t)
17226 v0.AddArg2(z, x)
17227 v.AddArg2(i, v0)
17228 return true
17229 }
17230 }
17231 break
17232 }
17233
17234
17235 for {
17236 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
17237 if v_0.Op != OpConst32 {
17238 continue
17239 }
17240 t := v_0.Type
17241 c := auxIntToInt32(v_0.AuxInt)
17242 if v_1.Op != OpOr32 {
17243 continue
17244 }
17245 _ = v_1.Args[1]
17246 v_1_0 := v_1.Args[0]
17247 v_1_1 := v_1.Args[1]
17248 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
17249 if v_1_0.Op != OpConst32 || v_1_0.Type != t {
17250 continue
17251 }
17252 d := auxIntToInt32(v_1_0.AuxInt)
17253 x := v_1_1
17254 v.reset(OpOr32)
17255 v0 := b.NewValue0(v.Pos, OpConst32, t)
17256 v0.AuxInt = int32ToAuxInt(c | d)
17257 v.AddArg2(v0, x)
17258 return true
17259 }
17260 }
17261 break
17262 }
17263 return false
17264 }
17265 func rewriteValuegeneric_OpOr64(v *Value) bool {
17266 v_1 := v.Args[1]
17267 v_0 := v.Args[0]
17268 b := v.Block
17269
17270
17271 for {
17272 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
17273 if v_0.Op != OpConst64 {
17274 continue
17275 }
17276 c := auxIntToInt64(v_0.AuxInt)
17277 if v_1.Op != OpConst64 {
17278 continue
17279 }
17280 d := auxIntToInt64(v_1.AuxInt)
17281 v.reset(OpConst64)
17282 v.AuxInt = int64ToAuxInt(c | d)
17283 return true
17284 }
17285 break
17286 }
17287
17288
17289 for {
17290 x := v_0
17291 if x != v_1 {
17292 break
17293 }
17294 v.copyOf(x)
17295 return true
17296 }
17297
17298
17299 for {
17300 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
17301 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
17302 continue
17303 }
17304 x := v_1
17305 v.copyOf(x)
17306 return true
17307 }
17308 break
17309 }
17310
17311
17312 for {
17313 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
17314 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != -1 {
17315 continue
17316 }
17317 v.reset(OpConst64)
17318 v.AuxInt = int64ToAuxInt(-1)
17319 return true
17320 }
17321 break
17322 }
17323
17324
17325 for {
17326 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
17327 x := v_0
17328 if v_1.Op != OpOr64 {
17329 continue
17330 }
17331 _ = v_1.Args[1]
17332 v_1_0 := v_1.Args[0]
17333 v_1_1 := v_1.Args[1]
17334 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
17335 if x != v_1_0 {
17336 continue
17337 }
17338 y := v_1_1
17339 v.reset(OpOr64)
17340 v.AddArg2(x, y)
17341 return true
17342 }
17343 }
17344 break
17345 }
17346
17347
17348
17349 for {
17350 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
17351 if v_0.Op != OpAnd64 {
17352 continue
17353 }
17354 _ = v_0.Args[1]
17355 v_0_0 := v_0.Args[0]
17356 v_0_1 := v_0.Args[1]
17357 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
17358 x := v_0_0
17359 if v_0_1.Op != OpConst64 {
17360 continue
17361 }
17362 c2 := auxIntToInt64(v_0_1.AuxInt)
17363 if v_1.Op != OpConst64 {
17364 continue
17365 }
17366 t := v_1.Type
17367 c1 := auxIntToInt64(v_1.AuxInt)
17368 if !(^(c1 | c2) == 0) {
17369 continue
17370 }
17371 v.reset(OpOr64)
17372 v0 := b.NewValue0(v.Pos, OpConst64, t)
17373 v0.AuxInt = int64ToAuxInt(c1)
17374 v.AddArg2(v0, x)
17375 return true
17376 }
17377 }
17378 break
17379 }
17380
17381
17382
17383 for {
17384 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
17385 if v_0.Op != OpOr64 {
17386 continue
17387 }
17388 _ = v_0.Args[1]
17389 v_0_0 := v_0.Args[0]
17390 v_0_1 := v_0.Args[1]
17391 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
17392 i := v_0_0
17393 if i.Op != OpConst64 {
17394 continue
17395 }
17396 t := i.Type
17397 z := v_0_1
17398 x := v_1
17399 if !(z.Op != OpConst64 && x.Op != OpConst64) {
17400 continue
17401 }
17402 v.reset(OpOr64)
17403 v0 := b.NewValue0(v.Pos, OpOr64, t)
17404 v0.AddArg2(z, x)
17405 v.AddArg2(i, v0)
17406 return true
17407 }
17408 }
17409 break
17410 }
17411
17412
17413 for {
17414 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
17415 if v_0.Op != OpConst64 {
17416 continue
17417 }
17418 t := v_0.Type
17419 c := auxIntToInt64(v_0.AuxInt)
17420 if v_1.Op != OpOr64 {
17421 continue
17422 }
17423 _ = v_1.Args[1]
17424 v_1_0 := v_1.Args[0]
17425 v_1_1 := v_1.Args[1]
17426 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
17427 if v_1_0.Op != OpConst64 || v_1_0.Type != t {
17428 continue
17429 }
17430 d := auxIntToInt64(v_1_0.AuxInt)
17431 x := v_1_1
17432 v.reset(OpOr64)
17433 v0 := b.NewValue0(v.Pos, OpConst64, t)
17434 v0.AuxInt = int64ToAuxInt(c | d)
17435 v.AddArg2(v0, x)
17436 return true
17437 }
17438 }
17439 break
17440 }
17441 return false
17442 }
17443 func rewriteValuegeneric_OpOr8(v *Value) bool {
17444 v_1 := v.Args[1]
17445 v_0 := v.Args[0]
17446 b := v.Block
17447
17448
17449 for {
17450 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
17451 if v_0.Op != OpConst8 {
17452 continue
17453 }
17454 c := auxIntToInt8(v_0.AuxInt)
17455 if v_1.Op != OpConst8 {
17456 continue
17457 }
17458 d := auxIntToInt8(v_1.AuxInt)
17459 v.reset(OpConst8)
17460 v.AuxInt = int8ToAuxInt(c | d)
17461 return true
17462 }
17463 break
17464 }
17465
17466
17467 for {
17468 x := v_0
17469 if x != v_1 {
17470 break
17471 }
17472 v.copyOf(x)
17473 return true
17474 }
17475
17476
17477 for {
17478 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
17479 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 {
17480 continue
17481 }
17482 x := v_1
17483 v.copyOf(x)
17484 return true
17485 }
17486 break
17487 }
17488
17489
17490 for {
17491 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
17492 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != -1 {
17493 continue
17494 }
17495 v.reset(OpConst8)
17496 v.AuxInt = int8ToAuxInt(-1)
17497 return true
17498 }
17499 break
17500 }
17501
17502
17503 for {
17504 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
17505 x := v_0
17506 if v_1.Op != OpOr8 {
17507 continue
17508 }
17509 _ = v_1.Args[1]
17510 v_1_0 := v_1.Args[0]
17511 v_1_1 := v_1.Args[1]
17512 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
17513 if x != v_1_0 {
17514 continue
17515 }
17516 y := v_1_1
17517 v.reset(OpOr8)
17518 v.AddArg2(x, y)
17519 return true
17520 }
17521 }
17522 break
17523 }
17524
17525
17526
17527 for {
17528 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
17529 if v_0.Op != OpAnd8 {
17530 continue
17531 }
17532 _ = v_0.Args[1]
17533 v_0_0 := v_0.Args[0]
17534 v_0_1 := v_0.Args[1]
17535 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
17536 x := v_0_0
17537 if v_0_1.Op != OpConst8 {
17538 continue
17539 }
17540 c2 := auxIntToInt8(v_0_1.AuxInt)
17541 if v_1.Op != OpConst8 {
17542 continue
17543 }
17544 t := v_1.Type
17545 c1 := auxIntToInt8(v_1.AuxInt)
17546 if !(^(c1 | c2) == 0) {
17547 continue
17548 }
17549 v.reset(OpOr8)
17550 v0 := b.NewValue0(v.Pos, OpConst8, t)
17551 v0.AuxInt = int8ToAuxInt(c1)
17552 v.AddArg2(v0, x)
17553 return true
17554 }
17555 }
17556 break
17557 }
17558
17559
17560
17561 for {
17562 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
17563 if v_0.Op != OpOr8 {
17564 continue
17565 }
17566 _ = v_0.Args[1]
17567 v_0_0 := v_0.Args[0]
17568 v_0_1 := v_0.Args[1]
17569 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
17570 i := v_0_0
17571 if i.Op != OpConst8 {
17572 continue
17573 }
17574 t := i.Type
17575 z := v_0_1
17576 x := v_1
17577 if !(z.Op != OpConst8 && x.Op != OpConst8) {
17578 continue
17579 }
17580 v.reset(OpOr8)
17581 v0 := b.NewValue0(v.Pos, OpOr8, t)
17582 v0.AddArg2(z, x)
17583 v.AddArg2(i, v0)
17584 return true
17585 }
17586 }
17587 break
17588 }
17589
17590
17591 for {
17592 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
17593 if v_0.Op != OpConst8 {
17594 continue
17595 }
17596 t := v_0.Type
17597 c := auxIntToInt8(v_0.AuxInt)
17598 if v_1.Op != OpOr8 {
17599 continue
17600 }
17601 _ = v_1.Args[1]
17602 v_1_0 := v_1.Args[0]
17603 v_1_1 := v_1.Args[1]
17604 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
17605 if v_1_0.Op != OpConst8 || v_1_0.Type != t {
17606 continue
17607 }
17608 d := auxIntToInt8(v_1_0.AuxInt)
17609 x := v_1_1
17610 v.reset(OpOr8)
17611 v0 := b.NewValue0(v.Pos, OpConst8, t)
17612 v0.AuxInt = int8ToAuxInt(c | d)
17613 v.AddArg2(v0, x)
17614 return true
17615 }
17616 }
17617 break
17618 }
17619 return false
17620 }
17621 func rewriteValuegeneric_OpOrB(v *Value) bool {
17622 v_1 := v.Args[1]
17623 v_0 := v.Args[0]
17624 b := v.Block
17625
17626
17627
17628 for {
17629 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
17630 if v_0.Op != OpLess64 {
17631 continue
17632 }
17633 x := v_0.Args[1]
17634 v_0_0 := v_0.Args[0]
17635 if v_0_0.Op != OpConst64 {
17636 continue
17637 }
17638 c := auxIntToInt64(v_0_0.AuxInt)
17639 if v_1.Op != OpLess64 {
17640 continue
17641 }
17642 _ = v_1.Args[1]
17643 if x != v_1.Args[0] {
17644 continue
17645 }
17646 v_1_1 := v_1.Args[1]
17647 if v_1_1.Op != OpConst64 {
17648 continue
17649 }
17650 d := auxIntToInt64(v_1_1.AuxInt)
17651 if !(c >= d) {
17652 continue
17653 }
17654 v.reset(OpLess64U)
17655 v0 := b.NewValue0(v.Pos, OpConst64, x.Type)
17656 v0.AuxInt = int64ToAuxInt(c - d)
17657 v1 := b.NewValue0(v.Pos, OpSub64, x.Type)
17658 v2 := b.NewValue0(v.Pos, OpConst64, x.Type)
17659 v2.AuxInt = int64ToAuxInt(d)
17660 v1.AddArg2(x, v2)
17661 v.AddArg2(v0, v1)
17662 return true
17663 }
17664 break
17665 }
17666
17667
17668
17669 for {
17670 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
17671 if v_0.Op != OpLeq64 {
17672 continue
17673 }
17674 x := v_0.Args[1]
17675 v_0_0 := v_0.Args[0]
17676 if v_0_0.Op != OpConst64 {
17677 continue
17678 }
17679 c := auxIntToInt64(v_0_0.AuxInt)
17680 if v_1.Op != OpLess64 {
17681 continue
17682 }
17683 _ = v_1.Args[1]
17684 if x != v_1.Args[0] {
17685 continue
17686 }
17687 v_1_1 := v_1.Args[1]
17688 if v_1_1.Op != OpConst64 {
17689 continue
17690 }
17691 d := auxIntToInt64(v_1_1.AuxInt)
17692 if !(c >= d) {
17693 continue
17694 }
17695 v.reset(OpLeq64U)
17696 v0 := b.NewValue0(v.Pos, OpConst64, x.Type)
17697 v0.AuxInt = int64ToAuxInt(c - d)
17698 v1 := b.NewValue0(v.Pos, OpSub64, x.Type)
17699 v2 := b.NewValue0(v.Pos, OpConst64, x.Type)
17700 v2.AuxInt = int64ToAuxInt(d)
17701 v1.AddArg2(x, v2)
17702 v.AddArg2(v0, v1)
17703 return true
17704 }
17705 break
17706 }
17707
17708
17709
17710 for {
17711 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
17712 if v_0.Op != OpLess32 {
17713 continue
17714 }
17715 x := v_0.Args[1]
17716 v_0_0 := v_0.Args[0]
17717 if v_0_0.Op != OpConst32 {
17718 continue
17719 }
17720 c := auxIntToInt32(v_0_0.AuxInt)
17721 if v_1.Op != OpLess32 {
17722 continue
17723 }
17724 _ = v_1.Args[1]
17725 if x != v_1.Args[0] {
17726 continue
17727 }
17728 v_1_1 := v_1.Args[1]
17729 if v_1_1.Op != OpConst32 {
17730 continue
17731 }
17732 d := auxIntToInt32(v_1_1.AuxInt)
17733 if !(c >= d) {
17734 continue
17735 }
17736 v.reset(OpLess32U)
17737 v0 := b.NewValue0(v.Pos, OpConst32, x.Type)
17738 v0.AuxInt = int32ToAuxInt(c - d)
17739 v1 := b.NewValue0(v.Pos, OpSub32, x.Type)
17740 v2 := b.NewValue0(v.Pos, OpConst32, x.Type)
17741 v2.AuxInt = int32ToAuxInt(d)
17742 v1.AddArg2(x, v2)
17743 v.AddArg2(v0, v1)
17744 return true
17745 }
17746 break
17747 }
17748
17749
17750
17751 for {
17752 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
17753 if v_0.Op != OpLeq32 {
17754 continue
17755 }
17756 x := v_0.Args[1]
17757 v_0_0 := v_0.Args[0]
17758 if v_0_0.Op != OpConst32 {
17759 continue
17760 }
17761 c := auxIntToInt32(v_0_0.AuxInt)
17762 if v_1.Op != OpLess32 {
17763 continue
17764 }
17765 _ = v_1.Args[1]
17766 if x != v_1.Args[0] {
17767 continue
17768 }
17769 v_1_1 := v_1.Args[1]
17770 if v_1_1.Op != OpConst32 {
17771 continue
17772 }
17773 d := auxIntToInt32(v_1_1.AuxInt)
17774 if !(c >= d) {
17775 continue
17776 }
17777 v.reset(OpLeq32U)
17778 v0 := b.NewValue0(v.Pos, OpConst32, x.Type)
17779 v0.AuxInt = int32ToAuxInt(c - d)
17780 v1 := b.NewValue0(v.Pos, OpSub32, x.Type)
17781 v2 := b.NewValue0(v.Pos, OpConst32, x.Type)
17782 v2.AuxInt = int32ToAuxInt(d)
17783 v1.AddArg2(x, v2)
17784 v.AddArg2(v0, v1)
17785 return true
17786 }
17787 break
17788 }
17789
17790
17791
17792 for {
17793 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
17794 if v_0.Op != OpLess16 {
17795 continue
17796 }
17797 x := v_0.Args[1]
17798 v_0_0 := v_0.Args[0]
17799 if v_0_0.Op != OpConst16 {
17800 continue
17801 }
17802 c := auxIntToInt16(v_0_0.AuxInt)
17803 if v_1.Op != OpLess16 {
17804 continue
17805 }
17806 _ = v_1.Args[1]
17807 if x != v_1.Args[0] {
17808 continue
17809 }
17810 v_1_1 := v_1.Args[1]
17811 if v_1_1.Op != OpConst16 {
17812 continue
17813 }
17814 d := auxIntToInt16(v_1_1.AuxInt)
17815 if !(c >= d) {
17816 continue
17817 }
17818 v.reset(OpLess16U)
17819 v0 := b.NewValue0(v.Pos, OpConst16, x.Type)
17820 v0.AuxInt = int16ToAuxInt(c - d)
17821 v1 := b.NewValue0(v.Pos, OpSub16, x.Type)
17822 v2 := b.NewValue0(v.Pos, OpConst16, x.Type)
17823 v2.AuxInt = int16ToAuxInt(d)
17824 v1.AddArg2(x, v2)
17825 v.AddArg2(v0, v1)
17826 return true
17827 }
17828 break
17829 }
17830
17831
17832
17833 for {
17834 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
17835 if v_0.Op != OpLeq16 {
17836 continue
17837 }
17838 x := v_0.Args[1]
17839 v_0_0 := v_0.Args[0]
17840 if v_0_0.Op != OpConst16 {
17841 continue
17842 }
17843 c := auxIntToInt16(v_0_0.AuxInt)
17844 if v_1.Op != OpLess16 {
17845 continue
17846 }
17847 _ = v_1.Args[1]
17848 if x != v_1.Args[0] {
17849 continue
17850 }
17851 v_1_1 := v_1.Args[1]
17852 if v_1_1.Op != OpConst16 {
17853 continue
17854 }
17855 d := auxIntToInt16(v_1_1.AuxInt)
17856 if !(c >= d) {
17857 continue
17858 }
17859 v.reset(OpLeq16U)
17860 v0 := b.NewValue0(v.Pos, OpConst16, x.Type)
17861 v0.AuxInt = int16ToAuxInt(c - d)
17862 v1 := b.NewValue0(v.Pos, OpSub16, x.Type)
17863 v2 := b.NewValue0(v.Pos, OpConst16, x.Type)
17864 v2.AuxInt = int16ToAuxInt(d)
17865 v1.AddArg2(x, v2)
17866 v.AddArg2(v0, v1)
17867 return true
17868 }
17869 break
17870 }
17871
17872
17873
17874 for {
17875 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
17876 if v_0.Op != OpLess8 {
17877 continue
17878 }
17879 x := v_0.Args[1]
17880 v_0_0 := v_0.Args[0]
17881 if v_0_0.Op != OpConst8 {
17882 continue
17883 }
17884 c := auxIntToInt8(v_0_0.AuxInt)
17885 if v_1.Op != OpLess8 {
17886 continue
17887 }
17888 _ = v_1.Args[1]
17889 if x != v_1.Args[0] {
17890 continue
17891 }
17892 v_1_1 := v_1.Args[1]
17893 if v_1_1.Op != OpConst8 {
17894 continue
17895 }
17896 d := auxIntToInt8(v_1_1.AuxInt)
17897 if !(c >= d) {
17898 continue
17899 }
17900 v.reset(OpLess8U)
17901 v0 := b.NewValue0(v.Pos, OpConst8, x.Type)
17902 v0.AuxInt = int8ToAuxInt(c - d)
17903 v1 := b.NewValue0(v.Pos, OpSub8, x.Type)
17904 v2 := b.NewValue0(v.Pos, OpConst8, x.Type)
17905 v2.AuxInt = int8ToAuxInt(d)
17906 v1.AddArg2(x, v2)
17907 v.AddArg2(v0, v1)
17908 return true
17909 }
17910 break
17911 }
17912
17913
17914
17915 for {
17916 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
17917 if v_0.Op != OpLeq8 {
17918 continue
17919 }
17920 x := v_0.Args[1]
17921 v_0_0 := v_0.Args[0]
17922 if v_0_0.Op != OpConst8 {
17923 continue
17924 }
17925 c := auxIntToInt8(v_0_0.AuxInt)
17926 if v_1.Op != OpLess8 {
17927 continue
17928 }
17929 _ = v_1.Args[1]
17930 if x != v_1.Args[0] {
17931 continue
17932 }
17933 v_1_1 := v_1.Args[1]
17934 if v_1_1.Op != OpConst8 {
17935 continue
17936 }
17937 d := auxIntToInt8(v_1_1.AuxInt)
17938 if !(c >= d) {
17939 continue
17940 }
17941 v.reset(OpLeq8U)
17942 v0 := b.NewValue0(v.Pos, OpConst8, x.Type)
17943 v0.AuxInt = int8ToAuxInt(c - d)
17944 v1 := b.NewValue0(v.Pos, OpSub8, x.Type)
17945 v2 := b.NewValue0(v.Pos, OpConst8, x.Type)
17946 v2.AuxInt = int8ToAuxInt(d)
17947 v1.AddArg2(x, v2)
17948 v.AddArg2(v0, v1)
17949 return true
17950 }
17951 break
17952 }
17953
17954
17955
17956 for {
17957 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
17958 if v_0.Op != OpLess64 {
17959 continue
17960 }
17961 x := v_0.Args[1]
17962 v_0_0 := v_0.Args[0]
17963 if v_0_0.Op != OpConst64 {
17964 continue
17965 }
17966 c := auxIntToInt64(v_0_0.AuxInt)
17967 if v_1.Op != OpLeq64 {
17968 continue
17969 }
17970 _ = v_1.Args[1]
17971 if x != v_1.Args[0] {
17972 continue
17973 }
17974 v_1_1 := v_1.Args[1]
17975 if v_1_1.Op != OpConst64 {
17976 continue
17977 }
17978 d := auxIntToInt64(v_1_1.AuxInt)
17979 if !(c >= d+1 && d+1 > d) {
17980 continue
17981 }
17982 v.reset(OpLess64U)
17983 v0 := b.NewValue0(v.Pos, OpConst64, x.Type)
17984 v0.AuxInt = int64ToAuxInt(c - d - 1)
17985 v1 := b.NewValue0(v.Pos, OpSub64, x.Type)
17986 v2 := b.NewValue0(v.Pos, OpConst64, x.Type)
17987 v2.AuxInt = int64ToAuxInt(d + 1)
17988 v1.AddArg2(x, v2)
17989 v.AddArg2(v0, v1)
17990 return true
17991 }
17992 break
17993 }
17994
17995
17996
17997 for {
17998 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
17999 if v_0.Op != OpLeq64 {
18000 continue
18001 }
18002 x := v_0.Args[1]
18003 v_0_0 := v_0.Args[0]
18004 if v_0_0.Op != OpConst64 {
18005 continue
18006 }
18007 c := auxIntToInt64(v_0_0.AuxInt)
18008 if v_1.Op != OpLeq64 {
18009 continue
18010 }
18011 _ = v_1.Args[1]
18012 if x != v_1.Args[0] {
18013 continue
18014 }
18015 v_1_1 := v_1.Args[1]
18016 if v_1_1.Op != OpConst64 {
18017 continue
18018 }
18019 d := auxIntToInt64(v_1_1.AuxInt)
18020 if !(c >= d+1 && d+1 > d) {
18021 continue
18022 }
18023 v.reset(OpLeq64U)
18024 v0 := b.NewValue0(v.Pos, OpConst64, x.Type)
18025 v0.AuxInt = int64ToAuxInt(c - d - 1)
18026 v1 := b.NewValue0(v.Pos, OpSub64, x.Type)
18027 v2 := b.NewValue0(v.Pos, OpConst64, x.Type)
18028 v2.AuxInt = int64ToAuxInt(d + 1)
18029 v1.AddArg2(x, v2)
18030 v.AddArg2(v0, v1)
18031 return true
18032 }
18033 break
18034 }
18035
18036
18037
18038 for {
18039 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18040 if v_0.Op != OpLess32 {
18041 continue
18042 }
18043 x := v_0.Args[1]
18044 v_0_0 := v_0.Args[0]
18045 if v_0_0.Op != OpConst32 {
18046 continue
18047 }
18048 c := auxIntToInt32(v_0_0.AuxInt)
18049 if v_1.Op != OpLeq32 {
18050 continue
18051 }
18052 _ = v_1.Args[1]
18053 if x != v_1.Args[0] {
18054 continue
18055 }
18056 v_1_1 := v_1.Args[1]
18057 if v_1_1.Op != OpConst32 {
18058 continue
18059 }
18060 d := auxIntToInt32(v_1_1.AuxInt)
18061 if !(c >= d+1 && d+1 > d) {
18062 continue
18063 }
18064 v.reset(OpLess32U)
18065 v0 := b.NewValue0(v.Pos, OpConst32, x.Type)
18066 v0.AuxInt = int32ToAuxInt(c - d - 1)
18067 v1 := b.NewValue0(v.Pos, OpSub32, x.Type)
18068 v2 := b.NewValue0(v.Pos, OpConst32, x.Type)
18069 v2.AuxInt = int32ToAuxInt(d + 1)
18070 v1.AddArg2(x, v2)
18071 v.AddArg2(v0, v1)
18072 return true
18073 }
18074 break
18075 }
18076
18077
18078
18079 for {
18080 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18081 if v_0.Op != OpLeq32 {
18082 continue
18083 }
18084 x := v_0.Args[1]
18085 v_0_0 := v_0.Args[0]
18086 if v_0_0.Op != OpConst32 {
18087 continue
18088 }
18089 c := auxIntToInt32(v_0_0.AuxInt)
18090 if v_1.Op != OpLeq32 {
18091 continue
18092 }
18093 _ = v_1.Args[1]
18094 if x != v_1.Args[0] {
18095 continue
18096 }
18097 v_1_1 := v_1.Args[1]
18098 if v_1_1.Op != OpConst32 {
18099 continue
18100 }
18101 d := auxIntToInt32(v_1_1.AuxInt)
18102 if !(c >= d+1 && d+1 > d) {
18103 continue
18104 }
18105 v.reset(OpLeq32U)
18106 v0 := b.NewValue0(v.Pos, OpConst32, x.Type)
18107 v0.AuxInt = int32ToAuxInt(c - d - 1)
18108 v1 := b.NewValue0(v.Pos, OpSub32, x.Type)
18109 v2 := b.NewValue0(v.Pos, OpConst32, x.Type)
18110 v2.AuxInt = int32ToAuxInt(d + 1)
18111 v1.AddArg2(x, v2)
18112 v.AddArg2(v0, v1)
18113 return true
18114 }
18115 break
18116 }
18117
18118
18119
18120 for {
18121 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18122 if v_0.Op != OpLess16 {
18123 continue
18124 }
18125 x := v_0.Args[1]
18126 v_0_0 := v_0.Args[0]
18127 if v_0_0.Op != OpConst16 {
18128 continue
18129 }
18130 c := auxIntToInt16(v_0_0.AuxInt)
18131 if v_1.Op != OpLeq16 {
18132 continue
18133 }
18134 _ = v_1.Args[1]
18135 if x != v_1.Args[0] {
18136 continue
18137 }
18138 v_1_1 := v_1.Args[1]
18139 if v_1_1.Op != OpConst16 {
18140 continue
18141 }
18142 d := auxIntToInt16(v_1_1.AuxInt)
18143 if !(c >= d+1 && d+1 > d) {
18144 continue
18145 }
18146 v.reset(OpLess16U)
18147 v0 := b.NewValue0(v.Pos, OpConst16, x.Type)
18148 v0.AuxInt = int16ToAuxInt(c - d - 1)
18149 v1 := b.NewValue0(v.Pos, OpSub16, x.Type)
18150 v2 := b.NewValue0(v.Pos, OpConst16, x.Type)
18151 v2.AuxInt = int16ToAuxInt(d + 1)
18152 v1.AddArg2(x, v2)
18153 v.AddArg2(v0, v1)
18154 return true
18155 }
18156 break
18157 }
18158
18159
18160
18161 for {
18162 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18163 if v_0.Op != OpLeq16 {
18164 continue
18165 }
18166 x := v_0.Args[1]
18167 v_0_0 := v_0.Args[0]
18168 if v_0_0.Op != OpConst16 {
18169 continue
18170 }
18171 c := auxIntToInt16(v_0_0.AuxInt)
18172 if v_1.Op != OpLeq16 {
18173 continue
18174 }
18175 _ = v_1.Args[1]
18176 if x != v_1.Args[0] {
18177 continue
18178 }
18179 v_1_1 := v_1.Args[1]
18180 if v_1_1.Op != OpConst16 {
18181 continue
18182 }
18183 d := auxIntToInt16(v_1_1.AuxInt)
18184 if !(c >= d+1 && d+1 > d) {
18185 continue
18186 }
18187 v.reset(OpLeq16U)
18188 v0 := b.NewValue0(v.Pos, OpConst16, x.Type)
18189 v0.AuxInt = int16ToAuxInt(c - d - 1)
18190 v1 := b.NewValue0(v.Pos, OpSub16, x.Type)
18191 v2 := b.NewValue0(v.Pos, OpConst16, x.Type)
18192 v2.AuxInt = int16ToAuxInt(d + 1)
18193 v1.AddArg2(x, v2)
18194 v.AddArg2(v0, v1)
18195 return true
18196 }
18197 break
18198 }
18199
18200
18201
18202 for {
18203 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18204 if v_0.Op != OpLess8 {
18205 continue
18206 }
18207 x := v_0.Args[1]
18208 v_0_0 := v_0.Args[0]
18209 if v_0_0.Op != OpConst8 {
18210 continue
18211 }
18212 c := auxIntToInt8(v_0_0.AuxInt)
18213 if v_1.Op != OpLeq8 {
18214 continue
18215 }
18216 _ = v_1.Args[1]
18217 if x != v_1.Args[0] {
18218 continue
18219 }
18220 v_1_1 := v_1.Args[1]
18221 if v_1_1.Op != OpConst8 {
18222 continue
18223 }
18224 d := auxIntToInt8(v_1_1.AuxInt)
18225 if !(c >= d+1 && d+1 > d) {
18226 continue
18227 }
18228 v.reset(OpLess8U)
18229 v0 := b.NewValue0(v.Pos, OpConst8, x.Type)
18230 v0.AuxInt = int8ToAuxInt(c - d - 1)
18231 v1 := b.NewValue0(v.Pos, OpSub8, x.Type)
18232 v2 := b.NewValue0(v.Pos, OpConst8, x.Type)
18233 v2.AuxInt = int8ToAuxInt(d + 1)
18234 v1.AddArg2(x, v2)
18235 v.AddArg2(v0, v1)
18236 return true
18237 }
18238 break
18239 }
18240
18241
18242
18243 for {
18244 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18245 if v_0.Op != OpLeq8 {
18246 continue
18247 }
18248 x := v_0.Args[1]
18249 v_0_0 := v_0.Args[0]
18250 if v_0_0.Op != OpConst8 {
18251 continue
18252 }
18253 c := auxIntToInt8(v_0_0.AuxInt)
18254 if v_1.Op != OpLeq8 {
18255 continue
18256 }
18257 _ = v_1.Args[1]
18258 if x != v_1.Args[0] {
18259 continue
18260 }
18261 v_1_1 := v_1.Args[1]
18262 if v_1_1.Op != OpConst8 {
18263 continue
18264 }
18265 d := auxIntToInt8(v_1_1.AuxInt)
18266 if !(c >= d+1 && d+1 > d) {
18267 continue
18268 }
18269 v.reset(OpLeq8U)
18270 v0 := b.NewValue0(v.Pos, OpConst8, x.Type)
18271 v0.AuxInt = int8ToAuxInt(c - d - 1)
18272 v1 := b.NewValue0(v.Pos, OpSub8, x.Type)
18273 v2 := b.NewValue0(v.Pos, OpConst8, x.Type)
18274 v2.AuxInt = int8ToAuxInt(d + 1)
18275 v1.AddArg2(x, v2)
18276 v.AddArg2(v0, v1)
18277 return true
18278 }
18279 break
18280 }
18281
18282
18283
18284 for {
18285 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18286 if v_0.Op != OpLess64U {
18287 continue
18288 }
18289 x := v_0.Args[1]
18290 v_0_0 := v_0.Args[0]
18291 if v_0_0.Op != OpConst64 {
18292 continue
18293 }
18294 c := auxIntToInt64(v_0_0.AuxInt)
18295 if v_1.Op != OpLess64U {
18296 continue
18297 }
18298 _ = v_1.Args[1]
18299 if x != v_1.Args[0] {
18300 continue
18301 }
18302 v_1_1 := v_1.Args[1]
18303 if v_1_1.Op != OpConst64 {
18304 continue
18305 }
18306 d := auxIntToInt64(v_1_1.AuxInt)
18307 if !(uint64(c) >= uint64(d)) {
18308 continue
18309 }
18310 v.reset(OpLess64U)
18311 v0 := b.NewValue0(v.Pos, OpConst64, x.Type)
18312 v0.AuxInt = int64ToAuxInt(c - d)
18313 v1 := b.NewValue0(v.Pos, OpSub64, x.Type)
18314 v2 := b.NewValue0(v.Pos, OpConst64, x.Type)
18315 v2.AuxInt = int64ToAuxInt(d)
18316 v1.AddArg2(x, v2)
18317 v.AddArg2(v0, v1)
18318 return true
18319 }
18320 break
18321 }
18322
18323
18324
18325 for {
18326 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18327 if v_0.Op != OpLeq64U {
18328 continue
18329 }
18330 x := v_0.Args[1]
18331 v_0_0 := v_0.Args[0]
18332 if v_0_0.Op != OpConst64 {
18333 continue
18334 }
18335 c := auxIntToInt64(v_0_0.AuxInt)
18336 if v_1.Op != OpLess64U {
18337 continue
18338 }
18339 _ = v_1.Args[1]
18340 if x != v_1.Args[0] {
18341 continue
18342 }
18343 v_1_1 := v_1.Args[1]
18344 if v_1_1.Op != OpConst64 {
18345 continue
18346 }
18347 d := auxIntToInt64(v_1_1.AuxInt)
18348 if !(uint64(c) >= uint64(d)) {
18349 continue
18350 }
18351 v.reset(OpLeq64U)
18352 v0 := b.NewValue0(v.Pos, OpConst64, x.Type)
18353 v0.AuxInt = int64ToAuxInt(c - d)
18354 v1 := b.NewValue0(v.Pos, OpSub64, x.Type)
18355 v2 := b.NewValue0(v.Pos, OpConst64, x.Type)
18356 v2.AuxInt = int64ToAuxInt(d)
18357 v1.AddArg2(x, v2)
18358 v.AddArg2(v0, v1)
18359 return true
18360 }
18361 break
18362 }
18363
18364
18365
18366 for {
18367 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18368 if v_0.Op != OpLess32U {
18369 continue
18370 }
18371 x := v_0.Args[1]
18372 v_0_0 := v_0.Args[0]
18373 if v_0_0.Op != OpConst32 {
18374 continue
18375 }
18376 c := auxIntToInt32(v_0_0.AuxInt)
18377 if v_1.Op != OpLess32U {
18378 continue
18379 }
18380 _ = v_1.Args[1]
18381 if x != v_1.Args[0] {
18382 continue
18383 }
18384 v_1_1 := v_1.Args[1]
18385 if v_1_1.Op != OpConst32 {
18386 continue
18387 }
18388 d := auxIntToInt32(v_1_1.AuxInt)
18389 if !(uint32(c) >= uint32(d)) {
18390 continue
18391 }
18392 v.reset(OpLess32U)
18393 v0 := b.NewValue0(v.Pos, OpConst32, x.Type)
18394 v0.AuxInt = int32ToAuxInt(c - d)
18395 v1 := b.NewValue0(v.Pos, OpSub32, x.Type)
18396 v2 := b.NewValue0(v.Pos, OpConst32, x.Type)
18397 v2.AuxInt = int32ToAuxInt(d)
18398 v1.AddArg2(x, v2)
18399 v.AddArg2(v0, v1)
18400 return true
18401 }
18402 break
18403 }
18404
18405
18406
18407 for {
18408 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18409 if v_0.Op != OpLeq32U {
18410 continue
18411 }
18412 x := v_0.Args[1]
18413 v_0_0 := v_0.Args[0]
18414 if v_0_0.Op != OpConst32 {
18415 continue
18416 }
18417 c := auxIntToInt32(v_0_0.AuxInt)
18418 if v_1.Op != OpLess32U {
18419 continue
18420 }
18421 _ = v_1.Args[1]
18422 if x != v_1.Args[0] {
18423 continue
18424 }
18425 v_1_1 := v_1.Args[1]
18426 if v_1_1.Op != OpConst32 {
18427 continue
18428 }
18429 d := auxIntToInt32(v_1_1.AuxInt)
18430 if !(uint32(c) >= uint32(d)) {
18431 continue
18432 }
18433 v.reset(OpLeq32U)
18434 v0 := b.NewValue0(v.Pos, OpConst32, x.Type)
18435 v0.AuxInt = int32ToAuxInt(c - d)
18436 v1 := b.NewValue0(v.Pos, OpSub32, x.Type)
18437 v2 := b.NewValue0(v.Pos, OpConst32, x.Type)
18438 v2.AuxInt = int32ToAuxInt(d)
18439 v1.AddArg2(x, v2)
18440 v.AddArg2(v0, v1)
18441 return true
18442 }
18443 break
18444 }
18445
18446
18447
18448 for {
18449 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18450 if v_0.Op != OpLess16U {
18451 continue
18452 }
18453 x := v_0.Args[1]
18454 v_0_0 := v_0.Args[0]
18455 if v_0_0.Op != OpConst16 {
18456 continue
18457 }
18458 c := auxIntToInt16(v_0_0.AuxInt)
18459 if v_1.Op != OpLess16U {
18460 continue
18461 }
18462 _ = v_1.Args[1]
18463 if x != v_1.Args[0] {
18464 continue
18465 }
18466 v_1_1 := v_1.Args[1]
18467 if v_1_1.Op != OpConst16 {
18468 continue
18469 }
18470 d := auxIntToInt16(v_1_1.AuxInt)
18471 if !(uint16(c) >= uint16(d)) {
18472 continue
18473 }
18474 v.reset(OpLess16U)
18475 v0 := b.NewValue0(v.Pos, OpConst16, x.Type)
18476 v0.AuxInt = int16ToAuxInt(c - d)
18477 v1 := b.NewValue0(v.Pos, OpSub16, x.Type)
18478 v2 := b.NewValue0(v.Pos, OpConst16, x.Type)
18479 v2.AuxInt = int16ToAuxInt(d)
18480 v1.AddArg2(x, v2)
18481 v.AddArg2(v0, v1)
18482 return true
18483 }
18484 break
18485 }
18486
18487
18488
18489 for {
18490 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18491 if v_0.Op != OpLeq16U {
18492 continue
18493 }
18494 x := v_0.Args[1]
18495 v_0_0 := v_0.Args[0]
18496 if v_0_0.Op != OpConst16 {
18497 continue
18498 }
18499 c := auxIntToInt16(v_0_0.AuxInt)
18500 if v_1.Op != OpLess16U {
18501 continue
18502 }
18503 _ = v_1.Args[1]
18504 if x != v_1.Args[0] {
18505 continue
18506 }
18507 v_1_1 := v_1.Args[1]
18508 if v_1_1.Op != OpConst16 {
18509 continue
18510 }
18511 d := auxIntToInt16(v_1_1.AuxInt)
18512 if !(uint16(c) >= uint16(d)) {
18513 continue
18514 }
18515 v.reset(OpLeq16U)
18516 v0 := b.NewValue0(v.Pos, OpConst16, x.Type)
18517 v0.AuxInt = int16ToAuxInt(c - d)
18518 v1 := b.NewValue0(v.Pos, OpSub16, x.Type)
18519 v2 := b.NewValue0(v.Pos, OpConst16, x.Type)
18520 v2.AuxInt = int16ToAuxInt(d)
18521 v1.AddArg2(x, v2)
18522 v.AddArg2(v0, v1)
18523 return true
18524 }
18525 break
18526 }
18527
18528
18529
18530 for {
18531 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18532 if v_0.Op != OpLess8U {
18533 continue
18534 }
18535 x := v_0.Args[1]
18536 v_0_0 := v_0.Args[0]
18537 if v_0_0.Op != OpConst8 {
18538 continue
18539 }
18540 c := auxIntToInt8(v_0_0.AuxInt)
18541 if v_1.Op != OpLess8U {
18542 continue
18543 }
18544 _ = v_1.Args[1]
18545 if x != v_1.Args[0] {
18546 continue
18547 }
18548 v_1_1 := v_1.Args[1]
18549 if v_1_1.Op != OpConst8 {
18550 continue
18551 }
18552 d := auxIntToInt8(v_1_1.AuxInt)
18553 if !(uint8(c) >= uint8(d)) {
18554 continue
18555 }
18556 v.reset(OpLess8U)
18557 v0 := b.NewValue0(v.Pos, OpConst8, x.Type)
18558 v0.AuxInt = int8ToAuxInt(c - d)
18559 v1 := b.NewValue0(v.Pos, OpSub8, x.Type)
18560 v2 := b.NewValue0(v.Pos, OpConst8, x.Type)
18561 v2.AuxInt = int8ToAuxInt(d)
18562 v1.AddArg2(x, v2)
18563 v.AddArg2(v0, v1)
18564 return true
18565 }
18566 break
18567 }
18568
18569
18570
18571 for {
18572 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18573 if v_0.Op != OpLeq8U {
18574 continue
18575 }
18576 x := v_0.Args[1]
18577 v_0_0 := v_0.Args[0]
18578 if v_0_0.Op != OpConst8 {
18579 continue
18580 }
18581 c := auxIntToInt8(v_0_0.AuxInt)
18582 if v_1.Op != OpLess8U {
18583 continue
18584 }
18585 _ = v_1.Args[1]
18586 if x != v_1.Args[0] {
18587 continue
18588 }
18589 v_1_1 := v_1.Args[1]
18590 if v_1_1.Op != OpConst8 {
18591 continue
18592 }
18593 d := auxIntToInt8(v_1_1.AuxInt)
18594 if !(uint8(c) >= uint8(d)) {
18595 continue
18596 }
18597 v.reset(OpLeq8U)
18598 v0 := b.NewValue0(v.Pos, OpConst8, x.Type)
18599 v0.AuxInt = int8ToAuxInt(c - d)
18600 v1 := b.NewValue0(v.Pos, OpSub8, x.Type)
18601 v2 := b.NewValue0(v.Pos, OpConst8, x.Type)
18602 v2.AuxInt = int8ToAuxInt(d)
18603 v1.AddArg2(x, v2)
18604 v.AddArg2(v0, v1)
18605 return true
18606 }
18607 break
18608 }
18609
18610
18611
18612 for {
18613 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18614 if v_0.Op != OpLess64U {
18615 continue
18616 }
18617 x := v_0.Args[1]
18618 v_0_0 := v_0.Args[0]
18619 if v_0_0.Op != OpConst64 {
18620 continue
18621 }
18622 c := auxIntToInt64(v_0_0.AuxInt)
18623 if v_1.Op != OpLeq64U {
18624 continue
18625 }
18626 _ = v_1.Args[1]
18627 if x != v_1.Args[0] {
18628 continue
18629 }
18630 v_1_1 := v_1.Args[1]
18631 if v_1_1.Op != OpConst64 {
18632 continue
18633 }
18634 d := auxIntToInt64(v_1_1.AuxInt)
18635 if !(uint64(c) >= uint64(d+1) && uint64(d+1) > uint64(d)) {
18636 continue
18637 }
18638 v.reset(OpLess64U)
18639 v0 := b.NewValue0(v.Pos, OpConst64, x.Type)
18640 v0.AuxInt = int64ToAuxInt(c - d - 1)
18641 v1 := b.NewValue0(v.Pos, OpSub64, x.Type)
18642 v2 := b.NewValue0(v.Pos, OpConst64, x.Type)
18643 v2.AuxInt = int64ToAuxInt(d + 1)
18644 v1.AddArg2(x, v2)
18645 v.AddArg2(v0, v1)
18646 return true
18647 }
18648 break
18649 }
18650
18651
18652
18653 for {
18654 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18655 if v_0.Op != OpLeq64U {
18656 continue
18657 }
18658 x := v_0.Args[1]
18659 v_0_0 := v_0.Args[0]
18660 if v_0_0.Op != OpConst64 {
18661 continue
18662 }
18663 c := auxIntToInt64(v_0_0.AuxInt)
18664 if v_1.Op != OpLeq64U {
18665 continue
18666 }
18667 _ = v_1.Args[1]
18668 if x != v_1.Args[0] {
18669 continue
18670 }
18671 v_1_1 := v_1.Args[1]
18672 if v_1_1.Op != OpConst64 {
18673 continue
18674 }
18675 d := auxIntToInt64(v_1_1.AuxInt)
18676 if !(uint64(c) >= uint64(d+1) && uint64(d+1) > uint64(d)) {
18677 continue
18678 }
18679 v.reset(OpLeq64U)
18680 v0 := b.NewValue0(v.Pos, OpConst64, x.Type)
18681 v0.AuxInt = int64ToAuxInt(c - d - 1)
18682 v1 := b.NewValue0(v.Pos, OpSub64, x.Type)
18683 v2 := b.NewValue0(v.Pos, OpConst64, x.Type)
18684 v2.AuxInt = int64ToAuxInt(d + 1)
18685 v1.AddArg2(x, v2)
18686 v.AddArg2(v0, v1)
18687 return true
18688 }
18689 break
18690 }
18691
18692
18693
18694 for {
18695 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18696 if v_0.Op != OpLess32U {
18697 continue
18698 }
18699 x := v_0.Args[1]
18700 v_0_0 := v_0.Args[0]
18701 if v_0_0.Op != OpConst32 {
18702 continue
18703 }
18704 c := auxIntToInt32(v_0_0.AuxInt)
18705 if v_1.Op != OpLeq32U {
18706 continue
18707 }
18708 _ = v_1.Args[1]
18709 if x != v_1.Args[0] {
18710 continue
18711 }
18712 v_1_1 := v_1.Args[1]
18713 if v_1_1.Op != OpConst32 {
18714 continue
18715 }
18716 d := auxIntToInt32(v_1_1.AuxInt)
18717 if !(uint32(c) >= uint32(d+1) && uint32(d+1) > uint32(d)) {
18718 continue
18719 }
18720 v.reset(OpLess32U)
18721 v0 := b.NewValue0(v.Pos, OpConst32, x.Type)
18722 v0.AuxInt = int32ToAuxInt(c - d - 1)
18723 v1 := b.NewValue0(v.Pos, OpSub32, x.Type)
18724 v2 := b.NewValue0(v.Pos, OpConst32, x.Type)
18725 v2.AuxInt = int32ToAuxInt(d + 1)
18726 v1.AddArg2(x, v2)
18727 v.AddArg2(v0, v1)
18728 return true
18729 }
18730 break
18731 }
18732
18733
18734
18735 for {
18736 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18737 if v_0.Op != OpLeq32U {
18738 continue
18739 }
18740 x := v_0.Args[1]
18741 v_0_0 := v_0.Args[0]
18742 if v_0_0.Op != OpConst32 {
18743 continue
18744 }
18745 c := auxIntToInt32(v_0_0.AuxInt)
18746 if v_1.Op != OpLeq32U {
18747 continue
18748 }
18749 _ = v_1.Args[1]
18750 if x != v_1.Args[0] {
18751 continue
18752 }
18753 v_1_1 := v_1.Args[1]
18754 if v_1_1.Op != OpConst32 {
18755 continue
18756 }
18757 d := auxIntToInt32(v_1_1.AuxInt)
18758 if !(uint32(c) >= uint32(d+1) && uint32(d+1) > uint32(d)) {
18759 continue
18760 }
18761 v.reset(OpLeq32U)
18762 v0 := b.NewValue0(v.Pos, OpConst32, x.Type)
18763 v0.AuxInt = int32ToAuxInt(c - d - 1)
18764 v1 := b.NewValue0(v.Pos, OpSub32, x.Type)
18765 v2 := b.NewValue0(v.Pos, OpConst32, x.Type)
18766 v2.AuxInt = int32ToAuxInt(d + 1)
18767 v1.AddArg2(x, v2)
18768 v.AddArg2(v0, v1)
18769 return true
18770 }
18771 break
18772 }
18773
18774
18775
18776 for {
18777 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18778 if v_0.Op != OpLess16U {
18779 continue
18780 }
18781 x := v_0.Args[1]
18782 v_0_0 := v_0.Args[0]
18783 if v_0_0.Op != OpConst16 {
18784 continue
18785 }
18786 c := auxIntToInt16(v_0_0.AuxInt)
18787 if v_1.Op != OpLeq16U {
18788 continue
18789 }
18790 _ = v_1.Args[1]
18791 if x != v_1.Args[0] {
18792 continue
18793 }
18794 v_1_1 := v_1.Args[1]
18795 if v_1_1.Op != OpConst16 {
18796 continue
18797 }
18798 d := auxIntToInt16(v_1_1.AuxInt)
18799 if !(uint16(c) >= uint16(d+1) && uint16(d+1) > uint16(d)) {
18800 continue
18801 }
18802 v.reset(OpLess16U)
18803 v0 := b.NewValue0(v.Pos, OpConst16, x.Type)
18804 v0.AuxInt = int16ToAuxInt(c - d - 1)
18805 v1 := b.NewValue0(v.Pos, OpSub16, x.Type)
18806 v2 := b.NewValue0(v.Pos, OpConst16, x.Type)
18807 v2.AuxInt = int16ToAuxInt(d + 1)
18808 v1.AddArg2(x, v2)
18809 v.AddArg2(v0, v1)
18810 return true
18811 }
18812 break
18813 }
18814
18815
18816
18817 for {
18818 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18819 if v_0.Op != OpLeq16U {
18820 continue
18821 }
18822 x := v_0.Args[1]
18823 v_0_0 := v_0.Args[0]
18824 if v_0_0.Op != OpConst16 {
18825 continue
18826 }
18827 c := auxIntToInt16(v_0_0.AuxInt)
18828 if v_1.Op != OpLeq16U {
18829 continue
18830 }
18831 _ = v_1.Args[1]
18832 if x != v_1.Args[0] {
18833 continue
18834 }
18835 v_1_1 := v_1.Args[1]
18836 if v_1_1.Op != OpConst16 {
18837 continue
18838 }
18839 d := auxIntToInt16(v_1_1.AuxInt)
18840 if !(uint16(c) >= uint16(d+1) && uint16(d+1) > uint16(d)) {
18841 continue
18842 }
18843 v.reset(OpLeq16U)
18844 v0 := b.NewValue0(v.Pos, OpConst16, x.Type)
18845 v0.AuxInt = int16ToAuxInt(c - d - 1)
18846 v1 := b.NewValue0(v.Pos, OpSub16, x.Type)
18847 v2 := b.NewValue0(v.Pos, OpConst16, x.Type)
18848 v2.AuxInt = int16ToAuxInt(d + 1)
18849 v1.AddArg2(x, v2)
18850 v.AddArg2(v0, v1)
18851 return true
18852 }
18853 break
18854 }
18855
18856
18857
18858 for {
18859 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18860 if v_0.Op != OpLess8U {
18861 continue
18862 }
18863 x := v_0.Args[1]
18864 v_0_0 := v_0.Args[0]
18865 if v_0_0.Op != OpConst8 {
18866 continue
18867 }
18868 c := auxIntToInt8(v_0_0.AuxInt)
18869 if v_1.Op != OpLeq8U {
18870 continue
18871 }
18872 _ = v_1.Args[1]
18873 if x != v_1.Args[0] {
18874 continue
18875 }
18876 v_1_1 := v_1.Args[1]
18877 if v_1_1.Op != OpConst8 {
18878 continue
18879 }
18880 d := auxIntToInt8(v_1_1.AuxInt)
18881 if !(uint8(c) >= uint8(d+1) && uint8(d+1) > uint8(d)) {
18882 continue
18883 }
18884 v.reset(OpLess8U)
18885 v0 := b.NewValue0(v.Pos, OpConst8, x.Type)
18886 v0.AuxInt = int8ToAuxInt(c - d - 1)
18887 v1 := b.NewValue0(v.Pos, OpSub8, x.Type)
18888 v2 := b.NewValue0(v.Pos, OpConst8, x.Type)
18889 v2.AuxInt = int8ToAuxInt(d + 1)
18890 v1.AddArg2(x, v2)
18891 v.AddArg2(v0, v1)
18892 return true
18893 }
18894 break
18895 }
18896
18897
18898
18899 for {
18900 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18901 if v_0.Op != OpLeq8U {
18902 continue
18903 }
18904 x := v_0.Args[1]
18905 v_0_0 := v_0.Args[0]
18906 if v_0_0.Op != OpConst8 {
18907 continue
18908 }
18909 c := auxIntToInt8(v_0_0.AuxInt)
18910 if v_1.Op != OpLeq8U {
18911 continue
18912 }
18913 _ = v_1.Args[1]
18914 if x != v_1.Args[0] {
18915 continue
18916 }
18917 v_1_1 := v_1.Args[1]
18918 if v_1_1.Op != OpConst8 {
18919 continue
18920 }
18921 d := auxIntToInt8(v_1_1.AuxInt)
18922 if !(uint8(c) >= uint8(d+1) && uint8(d+1) > uint8(d)) {
18923 continue
18924 }
18925 v.reset(OpLeq8U)
18926 v0 := b.NewValue0(v.Pos, OpConst8, x.Type)
18927 v0.AuxInt = int8ToAuxInt(c - d - 1)
18928 v1 := b.NewValue0(v.Pos, OpSub8, x.Type)
18929 v2 := b.NewValue0(v.Pos, OpConst8, x.Type)
18930 v2.AuxInt = int8ToAuxInt(d + 1)
18931 v1.AddArg2(x, v2)
18932 v.AddArg2(v0, v1)
18933 return true
18934 }
18935 break
18936 }
18937 return false
18938 }
18939 func rewriteValuegeneric_OpPhi(v *Value) bool {
18940
18941
18942 for {
18943 if len(v.Args) != 2 {
18944 break
18945 }
18946 _ = v.Args[1]
18947 v_0 := v.Args[0]
18948 if v_0.Op != OpConst8 {
18949 break
18950 }
18951 c := auxIntToInt8(v_0.AuxInt)
18952 v_1 := v.Args[1]
18953 if v_1.Op != OpConst8 || auxIntToInt8(v_1.AuxInt) != c {
18954 break
18955 }
18956 v.reset(OpConst8)
18957 v.AuxInt = int8ToAuxInt(c)
18958 return true
18959 }
18960
18961
18962 for {
18963 if len(v.Args) != 2 {
18964 break
18965 }
18966 _ = v.Args[1]
18967 v_0 := v.Args[0]
18968 if v_0.Op != OpConst16 {
18969 break
18970 }
18971 c := auxIntToInt16(v_0.AuxInt)
18972 v_1 := v.Args[1]
18973 if v_1.Op != OpConst16 || auxIntToInt16(v_1.AuxInt) != c {
18974 break
18975 }
18976 v.reset(OpConst16)
18977 v.AuxInt = int16ToAuxInt(c)
18978 return true
18979 }
18980
18981
18982 for {
18983 if len(v.Args) != 2 {
18984 break
18985 }
18986 _ = v.Args[1]
18987 v_0 := v.Args[0]
18988 if v_0.Op != OpConst32 {
18989 break
18990 }
18991 c := auxIntToInt32(v_0.AuxInt)
18992 v_1 := v.Args[1]
18993 if v_1.Op != OpConst32 || auxIntToInt32(v_1.AuxInt) != c {
18994 break
18995 }
18996 v.reset(OpConst32)
18997 v.AuxInt = int32ToAuxInt(c)
18998 return true
18999 }
19000
19001
19002 for {
19003 if len(v.Args) != 2 {
19004 break
19005 }
19006 _ = v.Args[1]
19007 v_0 := v.Args[0]
19008 if v_0.Op != OpConst64 {
19009 break
19010 }
19011 c := auxIntToInt64(v_0.AuxInt)
19012 v_1 := v.Args[1]
19013 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != c {
19014 break
19015 }
19016 v.reset(OpConst64)
19017 v.AuxInt = int64ToAuxInt(c)
19018 return true
19019 }
19020 return false
19021 }
19022 func rewriteValuegeneric_OpPtrIndex(v *Value) bool {
19023 v_1 := v.Args[1]
19024 v_0 := v.Args[0]
19025 b := v.Block
19026 config := b.Func.Config
19027 typ := &b.Func.Config.Types
19028
19029
19030
19031 for {
19032 t := v.Type
19033 ptr := v_0
19034 idx := v_1
19035 if !(config.PtrSize == 4 && is32Bit(t.Elem().Size())) {
19036 break
19037 }
19038 v.reset(OpAddPtr)
19039 v0 := b.NewValue0(v.Pos, OpMul32, typ.Int)
19040 v1 := b.NewValue0(v.Pos, OpConst32, typ.Int)
19041 v1.AuxInt = int32ToAuxInt(int32(t.Elem().Size()))
19042 v0.AddArg2(idx, v1)
19043 v.AddArg2(ptr, v0)
19044 return true
19045 }
19046
19047
19048
19049 for {
19050 t := v.Type
19051 ptr := v_0
19052 idx := v_1
19053 if !(config.PtrSize == 8) {
19054 break
19055 }
19056 v.reset(OpAddPtr)
19057 v0 := b.NewValue0(v.Pos, OpMul64, typ.Int)
19058 v1 := b.NewValue0(v.Pos, OpConst64, typ.Int)
19059 v1.AuxInt = int64ToAuxInt(t.Elem().Size())
19060 v0.AddArg2(idx, v1)
19061 v.AddArg2(ptr, v0)
19062 return true
19063 }
19064 return false
19065 }
19066 func rewriteValuegeneric_OpRotateLeft16(v *Value) bool {
19067 v_1 := v.Args[1]
19068 v_0 := v.Args[0]
19069
19070
19071
19072 for {
19073 x := v_0
19074 if v_1.Op != OpConst16 {
19075 break
19076 }
19077 c := auxIntToInt16(v_1.AuxInt)
19078 if !(c%16 == 0) {
19079 break
19080 }
19081 v.copyOf(x)
19082 return true
19083 }
19084 return false
19085 }
19086 func rewriteValuegeneric_OpRotateLeft32(v *Value) bool {
19087 v_1 := v.Args[1]
19088 v_0 := v.Args[0]
19089
19090
19091
19092 for {
19093 x := v_0
19094 if v_1.Op != OpConst32 {
19095 break
19096 }
19097 c := auxIntToInt32(v_1.AuxInt)
19098 if !(c%32 == 0) {
19099 break
19100 }
19101 v.copyOf(x)
19102 return true
19103 }
19104 return false
19105 }
19106 func rewriteValuegeneric_OpRotateLeft64(v *Value) bool {
19107 v_1 := v.Args[1]
19108 v_0 := v.Args[0]
19109
19110
19111
19112 for {
19113 x := v_0
19114 if v_1.Op != OpConst64 {
19115 break
19116 }
19117 c := auxIntToInt64(v_1.AuxInt)
19118 if !(c%64 == 0) {
19119 break
19120 }
19121 v.copyOf(x)
19122 return true
19123 }
19124 return false
19125 }
19126 func rewriteValuegeneric_OpRotateLeft8(v *Value) bool {
19127 v_1 := v.Args[1]
19128 v_0 := v.Args[0]
19129
19130
19131
19132 for {
19133 x := v_0
19134 if v_1.Op != OpConst8 {
19135 break
19136 }
19137 c := auxIntToInt8(v_1.AuxInt)
19138 if !(c%8 == 0) {
19139 break
19140 }
19141 v.copyOf(x)
19142 return true
19143 }
19144 return false
19145 }
19146 func rewriteValuegeneric_OpRound32F(v *Value) bool {
19147 v_0 := v.Args[0]
19148
19149
19150 for {
19151 x := v_0
19152 if x.Op != OpConst32F {
19153 break
19154 }
19155 v.copyOf(x)
19156 return true
19157 }
19158 return false
19159 }
19160 func rewriteValuegeneric_OpRound64F(v *Value) bool {
19161 v_0 := v.Args[0]
19162
19163
19164 for {
19165 x := v_0
19166 if x.Op != OpConst64F {
19167 break
19168 }
19169 v.copyOf(x)
19170 return true
19171 }
19172 return false
19173 }
19174 func rewriteValuegeneric_OpRsh16Ux16(v *Value) bool {
19175 v_1 := v.Args[1]
19176 v_0 := v.Args[0]
19177 b := v.Block
19178
19179
19180 for {
19181 t := v.Type
19182 x := v_0
19183 if v_1.Op != OpConst16 {
19184 break
19185 }
19186 c := auxIntToInt16(v_1.AuxInt)
19187 v.reset(OpRsh16Ux64)
19188 v0 := b.NewValue0(v.Pos, OpConst64, t)
19189 v0.AuxInt = int64ToAuxInt(int64(uint16(c)))
19190 v.AddArg2(x, v0)
19191 return true
19192 }
19193
19194
19195 for {
19196 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 {
19197 break
19198 }
19199 v.reset(OpConst16)
19200 v.AuxInt = int16ToAuxInt(0)
19201 return true
19202 }
19203 return false
19204 }
19205 func rewriteValuegeneric_OpRsh16Ux32(v *Value) bool {
19206 v_1 := v.Args[1]
19207 v_0 := v.Args[0]
19208 b := v.Block
19209
19210
19211 for {
19212 t := v.Type
19213 x := v_0
19214 if v_1.Op != OpConst32 {
19215 break
19216 }
19217 c := auxIntToInt32(v_1.AuxInt)
19218 v.reset(OpRsh16Ux64)
19219 v0 := b.NewValue0(v.Pos, OpConst64, t)
19220 v0.AuxInt = int64ToAuxInt(int64(uint32(c)))
19221 v.AddArg2(x, v0)
19222 return true
19223 }
19224
19225
19226 for {
19227 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 {
19228 break
19229 }
19230 v.reset(OpConst16)
19231 v.AuxInt = int16ToAuxInt(0)
19232 return true
19233 }
19234 return false
19235 }
19236 func rewriteValuegeneric_OpRsh16Ux64(v *Value) bool {
19237 v_1 := v.Args[1]
19238 v_0 := v.Args[0]
19239 b := v.Block
19240 typ := &b.Func.Config.Types
19241
19242
19243 for {
19244 if v_0.Op != OpConst16 {
19245 break
19246 }
19247 c := auxIntToInt16(v_0.AuxInt)
19248 if v_1.Op != OpConst64 {
19249 break
19250 }
19251 d := auxIntToInt64(v_1.AuxInt)
19252 v.reset(OpConst16)
19253 v.AuxInt = int16ToAuxInt(int16(uint16(c) >> uint64(d)))
19254 return true
19255 }
19256
19257
19258 for {
19259 x := v_0
19260 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 0 {
19261 break
19262 }
19263 v.copyOf(x)
19264 return true
19265 }
19266
19267
19268 for {
19269 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 {
19270 break
19271 }
19272 v.reset(OpConst16)
19273 v.AuxInt = int16ToAuxInt(0)
19274 return true
19275 }
19276
19277
19278
19279 for {
19280 if v_1.Op != OpConst64 {
19281 break
19282 }
19283 c := auxIntToInt64(v_1.AuxInt)
19284 if !(uint64(c) >= 16) {
19285 break
19286 }
19287 v.reset(OpConst16)
19288 v.AuxInt = int16ToAuxInt(0)
19289 return true
19290 }
19291
19292
19293
19294 for {
19295 t := v.Type
19296 if v_0.Op != OpRsh16Ux64 {
19297 break
19298 }
19299 _ = v_0.Args[1]
19300 x := v_0.Args[0]
19301 v_0_1 := v_0.Args[1]
19302 if v_0_1.Op != OpConst64 {
19303 break
19304 }
19305 c := auxIntToInt64(v_0_1.AuxInt)
19306 if v_1.Op != OpConst64 {
19307 break
19308 }
19309 d := auxIntToInt64(v_1.AuxInt)
19310 if !(!uaddOvf(c, d)) {
19311 break
19312 }
19313 v.reset(OpRsh16Ux64)
19314 v0 := b.NewValue0(v.Pos, OpConst64, t)
19315 v0.AuxInt = int64ToAuxInt(c + d)
19316 v.AddArg2(x, v0)
19317 return true
19318 }
19319
19320
19321 for {
19322 if v_0.Op != OpRsh16x64 {
19323 break
19324 }
19325 x := v_0.Args[0]
19326 if v_1.Op != OpConst64 {
19327 break
19328 }
19329 t := v_1.Type
19330 if auxIntToInt64(v_1.AuxInt) != 15 {
19331 break
19332 }
19333 v.reset(OpRsh16Ux64)
19334 v0 := b.NewValue0(v.Pos, OpConst64, t)
19335 v0.AuxInt = int64ToAuxInt(15)
19336 v.AddArg2(x, v0)
19337 return true
19338 }
19339
19340
19341
19342 for {
19343 if v_0.Op != OpLsh16x64 {
19344 break
19345 }
19346 _ = v_0.Args[1]
19347 v_0_0 := v_0.Args[0]
19348 if v_0_0.Op != OpRsh16Ux64 {
19349 break
19350 }
19351 _ = v_0_0.Args[1]
19352 x := v_0_0.Args[0]
19353 v_0_0_1 := v_0_0.Args[1]
19354 if v_0_0_1.Op != OpConst64 {
19355 break
19356 }
19357 c1 := auxIntToInt64(v_0_0_1.AuxInt)
19358 v_0_1 := v_0.Args[1]
19359 if v_0_1.Op != OpConst64 {
19360 break
19361 }
19362 c2 := auxIntToInt64(v_0_1.AuxInt)
19363 if v_1.Op != OpConst64 {
19364 break
19365 }
19366 c3 := auxIntToInt64(v_1.AuxInt)
19367 if !(uint64(c1) >= uint64(c2) && uint64(c3) >= uint64(c2) && !uaddOvf(c1-c2, c3)) {
19368 break
19369 }
19370 v.reset(OpRsh16Ux64)
19371 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
19372 v0.AuxInt = int64ToAuxInt(c1 - c2 + c3)
19373 v.AddArg2(x, v0)
19374 return true
19375 }
19376
19377
19378 for {
19379 if v_0.Op != OpLsh16x64 {
19380 break
19381 }
19382 _ = v_0.Args[1]
19383 x := v_0.Args[0]
19384 v_0_1 := v_0.Args[1]
19385 if v_0_1.Op != OpConst64 || auxIntToInt64(v_0_1.AuxInt) != 8 || v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 8 {
19386 break
19387 }
19388 v.reset(OpZeroExt8to16)
19389 v0 := b.NewValue0(v.Pos, OpTrunc16to8, typ.UInt8)
19390 v0.AddArg(x)
19391 v.AddArg(v0)
19392 return true
19393 }
19394 return false
19395 }
19396 func rewriteValuegeneric_OpRsh16Ux8(v *Value) bool {
19397 v_1 := v.Args[1]
19398 v_0 := v.Args[0]
19399 b := v.Block
19400
19401
19402 for {
19403 t := v.Type
19404 x := v_0
19405 if v_1.Op != OpConst8 {
19406 break
19407 }
19408 c := auxIntToInt8(v_1.AuxInt)
19409 v.reset(OpRsh16Ux64)
19410 v0 := b.NewValue0(v.Pos, OpConst64, t)
19411 v0.AuxInt = int64ToAuxInt(int64(uint8(c)))
19412 v.AddArg2(x, v0)
19413 return true
19414 }
19415
19416
19417 for {
19418 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 {
19419 break
19420 }
19421 v.reset(OpConst16)
19422 v.AuxInt = int16ToAuxInt(0)
19423 return true
19424 }
19425 return false
19426 }
19427 func rewriteValuegeneric_OpRsh16x16(v *Value) bool {
19428 v_1 := v.Args[1]
19429 v_0 := v.Args[0]
19430 b := v.Block
19431
19432
19433 for {
19434 t := v.Type
19435 x := v_0
19436 if v_1.Op != OpConst16 {
19437 break
19438 }
19439 c := auxIntToInt16(v_1.AuxInt)
19440 v.reset(OpRsh16x64)
19441 v0 := b.NewValue0(v.Pos, OpConst64, t)
19442 v0.AuxInt = int64ToAuxInt(int64(uint16(c)))
19443 v.AddArg2(x, v0)
19444 return true
19445 }
19446
19447
19448 for {
19449 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 {
19450 break
19451 }
19452 v.reset(OpConst16)
19453 v.AuxInt = int16ToAuxInt(0)
19454 return true
19455 }
19456 return false
19457 }
19458 func rewriteValuegeneric_OpRsh16x32(v *Value) bool {
19459 v_1 := v.Args[1]
19460 v_0 := v.Args[0]
19461 b := v.Block
19462
19463
19464 for {
19465 t := v.Type
19466 x := v_0
19467 if v_1.Op != OpConst32 {
19468 break
19469 }
19470 c := auxIntToInt32(v_1.AuxInt)
19471 v.reset(OpRsh16x64)
19472 v0 := b.NewValue0(v.Pos, OpConst64, t)
19473 v0.AuxInt = int64ToAuxInt(int64(uint32(c)))
19474 v.AddArg2(x, v0)
19475 return true
19476 }
19477
19478
19479 for {
19480 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 {
19481 break
19482 }
19483 v.reset(OpConst16)
19484 v.AuxInt = int16ToAuxInt(0)
19485 return true
19486 }
19487 return false
19488 }
19489 func rewriteValuegeneric_OpRsh16x64(v *Value) bool {
19490 v_1 := v.Args[1]
19491 v_0 := v.Args[0]
19492 b := v.Block
19493 typ := &b.Func.Config.Types
19494
19495
19496 for {
19497 if v_0.Op != OpConst16 {
19498 break
19499 }
19500 c := auxIntToInt16(v_0.AuxInt)
19501 if v_1.Op != OpConst64 {
19502 break
19503 }
19504 d := auxIntToInt64(v_1.AuxInt)
19505 v.reset(OpConst16)
19506 v.AuxInt = int16ToAuxInt(c >> uint64(d))
19507 return true
19508 }
19509
19510
19511 for {
19512 x := v_0
19513 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 0 {
19514 break
19515 }
19516 v.copyOf(x)
19517 return true
19518 }
19519
19520
19521 for {
19522 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 {
19523 break
19524 }
19525 v.reset(OpConst16)
19526 v.AuxInt = int16ToAuxInt(0)
19527 return true
19528 }
19529
19530
19531
19532 for {
19533 t := v.Type
19534 if v_0.Op != OpRsh16x64 {
19535 break
19536 }
19537 _ = v_0.Args[1]
19538 x := v_0.Args[0]
19539 v_0_1 := v_0.Args[1]
19540 if v_0_1.Op != OpConst64 {
19541 break
19542 }
19543 c := auxIntToInt64(v_0_1.AuxInt)
19544 if v_1.Op != OpConst64 {
19545 break
19546 }
19547 d := auxIntToInt64(v_1.AuxInt)
19548 if !(!uaddOvf(c, d)) {
19549 break
19550 }
19551 v.reset(OpRsh16x64)
19552 v0 := b.NewValue0(v.Pos, OpConst64, t)
19553 v0.AuxInt = int64ToAuxInt(c + d)
19554 v.AddArg2(x, v0)
19555 return true
19556 }
19557
19558
19559 for {
19560 if v_0.Op != OpLsh16x64 {
19561 break
19562 }
19563 _ = v_0.Args[1]
19564 x := v_0.Args[0]
19565 v_0_1 := v_0.Args[1]
19566 if v_0_1.Op != OpConst64 || auxIntToInt64(v_0_1.AuxInt) != 8 || v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 8 {
19567 break
19568 }
19569 v.reset(OpSignExt8to16)
19570 v0 := b.NewValue0(v.Pos, OpTrunc16to8, typ.Int8)
19571 v0.AddArg(x)
19572 v.AddArg(v0)
19573 return true
19574 }
19575 return false
19576 }
19577 func rewriteValuegeneric_OpRsh16x8(v *Value) bool {
19578 v_1 := v.Args[1]
19579 v_0 := v.Args[0]
19580 b := v.Block
19581
19582
19583 for {
19584 t := v.Type
19585 x := v_0
19586 if v_1.Op != OpConst8 {
19587 break
19588 }
19589 c := auxIntToInt8(v_1.AuxInt)
19590 v.reset(OpRsh16x64)
19591 v0 := b.NewValue0(v.Pos, OpConst64, t)
19592 v0.AuxInt = int64ToAuxInt(int64(uint8(c)))
19593 v.AddArg2(x, v0)
19594 return true
19595 }
19596
19597
19598 for {
19599 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 {
19600 break
19601 }
19602 v.reset(OpConst16)
19603 v.AuxInt = int16ToAuxInt(0)
19604 return true
19605 }
19606 return false
19607 }
19608 func rewriteValuegeneric_OpRsh32Ux16(v *Value) bool {
19609 v_1 := v.Args[1]
19610 v_0 := v.Args[0]
19611 b := v.Block
19612
19613
19614 for {
19615 t := v.Type
19616 x := v_0
19617 if v_1.Op != OpConst16 {
19618 break
19619 }
19620 c := auxIntToInt16(v_1.AuxInt)
19621 v.reset(OpRsh32Ux64)
19622 v0 := b.NewValue0(v.Pos, OpConst64, t)
19623 v0.AuxInt = int64ToAuxInt(int64(uint16(c)))
19624 v.AddArg2(x, v0)
19625 return true
19626 }
19627
19628
19629 for {
19630 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
19631 break
19632 }
19633 v.reset(OpConst32)
19634 v.AuxInt = int32ToAuxInt(0)
19635 return true
19636 }
19637 return false
19638 }
19639 func rewriteValuegeneric_OpRsh32Ux32(v *Value) bool {
19640 v_1 := v.Args[1]
19641 v_0 := v.Args[0]
19642 b := v.Block
19643
19644
19645 for {
19646 t := v.Type
19647 x := v_0
19648 if v_1.Op != OpConst32 {
19649 break
19650 }
19651 c := auxIntToInt32(v_1.AuxInt)
19652 v.reset(OpRsh32Ux64)
19653 v0 := b.NewValue0(v.Pos, OpConst64, t)
19654 v0.AuxInt = int64ToAuxInt(int64(uint32(c)))
19655 v.AddArg2(x, v0)
19656 return true
19657 }
19658
19659
19660 for {
19661 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
19662 break
19663 }
19664 v.reset(OpConst32)
19665 v.AuxInt = int32ToAuxInt(0)
19666 return true
19667 }
19668 return false
19669 }
19670 func rewriteValuegeneric_OpRsh32Ux64(v *Value) bool {
19671 v_1 := v.Args[1]
19672 v_0 := v.Args[0]
19673 b := v.Block
19674 typ := &b.Func.Config.Types
19675
19676
19677 for {
19678 if v_0.Op != OpConst32 {
19679 break
19680 }
19681 c := auxIntToInt32(v_0.AuxInt)
19682 if v_1.Op != OpConst64 {
19683 break
19684 }
19685 d := auxIntToInt64(v_1.AuxInt)
19686 v.reset(OpConst32)
19687 v.AuxInt = int32ToAuxInt(int32(uint32(c) >> uint64(d)))
19688 return true
19689 }
19690
19691
19692 for {
19693 x := v_0
19694 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 0 {
19695 break
19696 }
19697 v.copyOf(x)
19698 return true
19699 }
19700
19701
19702 for {
19703 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
19704 break
19705 }
19706 v.reset(OpConst32)
19707 v.AuxInt = int32ToAuxInt(0)
19708 return true
19709 }
19710
19711
19712
19713 for {
19714 if v_1.Op != OpConst64 {
19715 break
19716 }
19717 c := auxIntToInt64(v_1.AuxInt)
19718 if !(uint64(c) >= 32) {
19719 break
19720 }
19721 v.reset(OpConst32)
19722 v.AuxInt = int32ToAuxInt(0)
19723 return true
19724 }
19725
19726
19727
19728 for {
19729 t := v.Type
19730 if v_0.Op != OpRsh32Ux64 {
19731 break
19732 }
19733 _ = v_0.Args[1]
19734 x := v_0.Args[0]
19735 v_0_1 := v_0.Args[1]
19736 if v_0_1.Op != OpConst64 {
19737 break
19738 }
19739 c := auxIntToInt64(v_0_1.AuxInt)
19740 if v_1.Op != OpConst64 {
19741 break
19742 }
19743 d := auxIntToInt64(v_1.AuxInt)
19744 if !(!uaddOvf(c, d)) {
19745 break
19746 }
19747 v.reset(OpRsh32Ux64)
19748 v0 := b.NewValue0(v.Pos, OpConst64, t)
19749 v0.AuxInt = int64ToAuxInt(c + d)
19750 v.AddArg2(x, v0)
19751 return true
19752 }
19753
19754
19755 for {
19756 if v_0.Op != OpRsh32x64 {
19757 break
19758 }
19759 x := v_0.Args[0]
19760 if v_1.Op != OpConst64 {
19761 break
19762 }
19763 t := v_1.Type
19764 if auxIntToInt64(v_1.AuxInt) != 31 {
19765 break
19766 }
19767 v.reset(OpRsh32Ux64)
19768 v0 := b.NewValue0(v.Pos, OpConst64, t)
19769 v0.AuxInt = int64ToAuxInt(31)
19770 v.AddArg2(x, v0)
19771 return true
19772 }
19773
19774
19775
19776 for {
19777 if v_0.Op != OpLsh32x64 {
19778 break
19779 }
19780 _ = v_0.Args[1]
19781 v_0_0 := v_0.Args[0]
19782 if v_0_0.Op != OpRsh32Ux64 {
19783 break
19784 }
19785 _ = v_0_0.Args[1]
19786 x := v_0_0.Args[0]
19787 v_0_0_1 := v_0_0.Args[1]
19788 if v_0_0_1.Op != OpConst64 {
19789 break
19790 }
19791 c1 := auxIntToInt64(v_0_0_1.AuxInt)
19792 v_0_1 := v_0.Args[1]
19793 if v_0_1.Op != OpConst64 {
19794 break
19795 }
19796 c2 := auxIntToInt64(v_0_1.AuxInt)
19797 if v_1.Op != OpConst64 {
19798 break
19799 }
19800 c3 := auxIntToInt64(v_1.AuxInt)
19801 if !(uint64(c1) >= uint64(c2) && uint64(c3) >= uint64(c2) && !uaddOvf(c1-c2, c3)) {
19802 break
19803 }
19804 v.reset(OpRsh32Ux64)
19805 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
19806 v0.AuxInt = int64ToAuxInt(c1 - c2 + c3)
19807 v.AddArg2(x, v0)
19808 return true
19809 }
19810
19811
19812 for {
19813 if v_0.Op != OpLsh32x64 {
19814 break
19815 }
19816 _ = v_0.Args[1]
19817 x := v_0.Args[0]
19818 v_0_1 := v_0.Args[1]
19819 if v_0_1.Op != OpConst64 || auxIntToInt64(v_0_1.AuxInt) != 24 || v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 24 {
19820 break
19821 }
19822 v.reset(OpZeroExt8to32)
19823 v0 := b.NewValue0(v.Pos, OpTrunc32to8, typ.UInt8)
19824 v0.AddArg(x)
19825 v.AddArg(v0)
19826 return true
19827 }
19828
19829
19830 for {
19831 if v_0.Op != OpLsh32x64 {
19832 break
19833 }
19834 _ = v_0.Args[1]
19835 x := v_0.Args[0]
19836 v_0_1 := v_0.Args[1]
19837 if v_0_1.Op != OpConst64 || auxIntToInt64(v_0_1.AuxInt) != 16 || v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 16 {
19838 break
19839 }
19840 v.reset(OpZeroExt16to32)
19841 v0 := b.NewValue0(v.Pos, OpTrunc32to16, typ.UInt16)
19842 v0.AddArg(x)
19843 v.AddArg(v0)
19844 return true
19845 }
19846 return false
19847 }
19848 func rewriteValuegeneric_OpRsh32Ux8(v *Value) bool {
19849 v_1 := v.Args[1]
19850 v_0 := v.Args[0]
19851 b := v.Block
19852
19853
19854 for {
19855 t := v.Type
19856 x := v_0
19857 if v_1.Op != OpConst8 {
19858 break
19859 }
19860 c := auxIntToInt8(v_1.AuxInt)
19861 v.reset(OpRsh32Ux64)
19862 v0 := b.NewValue0(v.Pos, OpConst64, t)
19863 v0.AuxInt = int64ToAuxInt(int64(uint8(c)))
19864 v.AddArg2(x, v0)
19865 return true
19866 }
19867
19868
19869 for {
19870 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
19871 break
19872 }
19873 v.reset(OpConst32)
19874 v.AuxInt = int32ToAuxInt(0)
19875 return true
19876 }
19877 return false
19878 }
19879 func rewriteValuegeneric_OpRsh32x16(v *Value) bool {
19880 v_1 := v.Args[1]
19881 v_0 := v.Args[0]
19882 b := v.Block
19883
19884
19885 for {
19886 t := v.Type
19887 x := v_0
19888 if v_1.Op != OpConst16 {
19889 break
19890 }
19891 c := auxIntToInt16(v_1.AuxInt)
19892 v.reset(OpRsh32x64)
19893 v0 := b.NewValue0(v.Pos, OpConst64, t)
19894 v0.AuxInt = int64ToAuxInt(int64(uint16(c)))
19895 v.AddArg2(x, v0)
19896 return true
19897 }
19898
19899
19900 for {
19901 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
19902 break
19903 }
19904 v.reset(OpConst32)
19905 v.AuxInt = int32ToAuxInt(0)
19906 return true
19907 }
19908 return false
19909 }
19910 func rewriteValuegeneric_OpRsh32x32(v *Value) bool {
19911 v_1 := v.Args[1]
19912 v_0 := v.Args[0]
19913 b := v.Block
19914
19915
19916 for {
19917 t := v.Type
19918 x := v_0
19919 if v_1.Op != OpConst32 {
19920 break
19921 }
19922 c := auxIntToInt32(v_1.AuxInt)
19923 v.reset(OpRsh32x64)
19924 v0 := b.NewValue0(v.Pos, OpConst64, t)
19925 v0.AuxInt = int64ToAuxInt(int64(uint32(c)))
19926 v.AddArg2(x, v0)
19927 return true
19928 }
19929
19930
19931 for {
19932 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
19933 break
19934 }
19935 v.reset(OpConst32)
19936 v.AuxInt = int32ToAuxInt(0)
19937 return true
19938 }
19939 return false
19940 }
19941 func rewriteValuegeneric_OpRsh32x64(v *Value) bool {
19942 v_1 := v.Args[1]
19943 v_0 := v.Args[0]
19944 b := v.Block
19945 typ := &b.Func.Config.Types
19946
19947
19948 for {
19949 if v_0.Op != OpConst32 {
19950 break
19951 }
19952 c := auxIntToInt32(v_0.AuxInt)
19953 if v_1.Op != OpConst64 {
19954 break
19955 }
19956 d := auxIntToInt64(v_1.AuxInt)
19957 v.reset(OpConst32)
19958 v.AuxInt = int32ToAuxInt(c >> uint64(d))
19959 return true
19960 }
19961
19962
19963 for {
19964 x := v_0
19965 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 0 {
19966 break
19967 }
19968 v.copyOf(x)
19969 return true
19970 }
19971
19972
19973 for {
19974 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
19975 break
19976 }
19977 v.reset(OpConst32)
19978 v.AuxInt = int32ToAuxInt(0)
19979 return true
19980 }
19981
19982
19983
19984 for {
19985 t := v.Type
19986 if v_0.Op != OpRsh32x64 {
19987 break
19988 }
19989 _ = v_0.Args[1]
19990 x := v_0.Args[0]
19991 v_0_1 := v_0.Args[1]
19992 if v_0_1.Op != OpConst64 {
19993 break
19994 }
19995 c := auxIntToInt64(v_0_1.AuxInt)
19996 if v_1.Op != OpConst64 {
19997 break
19998 }
19999 d := auxIntToInt64(v_1.AuxInt)
20000 if !(!uaddOvf(c, d)) {
20001 break
20002 }
20003 v.reset(OpRsh32x64)
20004 v0 := b.NewValue0(v.Pos, OpConst64, t)
20005 v0.AuxInt = int64ToAuxInt(c + d)
20006 v.AddArg2(x, v0)
20007 return true
20008 }
20009
20010
20011 for {
20012 if v_0.Op != OpLsh32x64 {
20013 break
20014 }
20015 _ = v_0.Args[1]
20016 x := v_0.Args[0]
20017 v_0_1 := v_0.Args[1]
20018 if v_0_1.Op != OpConst64 || auxIntToInt64(v_0_1.AuxInt) != 24 || v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 24 {
20019 break
20020 }
20021 v.reset(OpSignExt8to32)
20022 v0 := b.NewValue0(v.Pos, OpTrunc32to8, typ.Int8)
20023 v0.AddArg(x)
20024 v.AddArg(v0)
20025 return true
20026 }
20027
20028
20029 for {
20030 if v_0.Op != OpLsh32x64 {
20031 break
20032 }
20033 _ = v_0.Args[1]
20034 x := v_0.Args[0]
20035 v_0_1 := v_0.Args[1]
20036 if v_0_1.Op != OpConst64 || auxIntToInt64(v_0_1.AuxInt) != 16 || v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 16 {
20037 break
20038 }
20039 v.reset(OpSignExt16to32)
20040 v0 := b.NewValue0(v.Pos, OpTrunc32to16, typ.Int16)
20041 v0.AddArg(x)
20042 v.AddArg(v0)
20043 return true
20044 }
20045 return false
20046 }
20047 func rewriteValuegeneric_OpRsh32x8(v *Value) bool {
20048 v_1 := v.Args[1]
20049 v_0 := v.Args[0]
20050 b := v.Block
20051
20052
20053 for {
20054 t := v.Type
20055 x := v_0
20056 if v_1.Op != OpConst8 {
20057 break
20058 }
20059 c := auxIntToInt8(v_1.AuxInt)
20060 v.reset(OpRsh32x64)
20061 v0 := b.NewValue0(v.Pos, OpConst64, t)
20062 v0.AuxInt = int64ToAuxInt(int64(uint8(c)))
20063 v.AddArg2(x, v0)
20064 return true
20065 }
20066
20067
20068 for {
20069 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
20070 break
20071 }
20072 v.reset(OpConst32)
20073 v.AuxInt = int32ToAuxInt(0)
20074 return true
20075 }
20076 return false
20077 }
20078 func rewriteValuegeneric_OpRsh64Ux16(v *Value) bool {
20079 v_1 := v.Args[1]
20080 v_0 := v.Args[0]
20081 b := v.Block
20082
20083
20084 for {
20085 t := v.Type
20086 x := v_0
20087 if v_1.Op != OpConst16 {
20088 break
20089 }
20090 c := auxIntToInt16(v_1.AuxInt)
20091 v.reset(OpRsh64Ux64)
20092 v0 := b.NewValue0(v.Pos, OpConst64, t)
20093 v0.AuxInt = int64ToAuxInt(int64(uint16(c)))
20094 v.AddArg2(x, v0)
20095 return true
20096 }
20097
20098
20099 for {
20100 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
20101 break
20102 }
20103 v.reset(OpConst64)
20104 v.AuxInt = int64ToAuxInt(0)
20105 return true
20106 }
20107 return false
20108 }
20109 func rewriteValuegeneric_OpRsh64Ux32(v *Value) bool {
20110 v_1 := v.Args[1]
20111 v_0 := v.Args[0]
20112 b := v.Block
20113
20114
20115 for {
20116 t := v.Type
20117 x := v_0
20118 if v_1.Op != OpConst32 {
20119 break
20120 }
20121 c := auxIntToInt32(v_1.AuxInt)
20122 v.reset(OpRsh64Ux64)
20123 v0 := b.NewValue0(v.Pos, OpConst64, t)
20124 v0.AuxInt = int64ToAuxInt(int64(uint32(c)))
20125 v.AddArg2(x, v0)
20126 return true
20127 }
20128
20129
20130 for {
20131 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
20132 break
20133 }
20134 v.reset(OpConst64)
20135 v.AuxInt = int64ToAuxInt(0)
20136 return true
20137 }
20138 return false
20139 }
20140 func rewriteValuegeneric_OpRsh64Ux64(v *Value) bool {
20141 v_1 := v.Args[1]
20142 v_0 := v.Args[0]
20143 b := v.Block
20144 typ := &b.Func.Config.Types
20145
20146
20147 for {
20148 if v_0.Op != OpConst64 {
20149 break
20150 }
20151 c := auxIntToInt64(v_0.AuxInt)
20152 if v_1.Op != OpConst64 {
20153 break
20154 }
20155 d := auxIntToInt64(v_1.AuxInt)
20156 v.reset(OpConst64)
20157 v.AuxInt = int64ToAuxInt(int64(uint64(c) >> uint64(d)))
20158 return true
20159 }
20160
20161
20162 for {
20163 x := v_0
20164 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 0 {
20165 break
20166 }
20167 v.copyOf(x)
20168 return true
20169 }
20170
20171
20172 for {
20173 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
20174 break
20175 }
20176 v.reset(OpConst64)
20177 v.AuxInt = int64ToAuxInt(0)
20178 return true
20179 }
20180
20181
20182
20183 for {
20184 if v_1.Op != OpConst64 {
20185 break
20186 }
20187 c := auxIntToInt64(v_1.AuxInt)
20188 if !(uint64(c) >= 64) {
20189 break
20190 }
20191 v.reset(OpConst64)
20192 v.AuxInt = int64ToAuxInt(0)
20193 return true
20194 }
20195
20196
20197
20198 for {
20199 t := v.Type
20200 if v_0.Op != OpRsh64Ux64 {
20201 break
20202 }
20203 _ = v_0.Args[1]
20204 x := v_0.Args[0]
20205 v_0_1 := v_0.Args[1]
20206 if v_0_1.Op != OpConst64 {
20207 break
20208 }
20209 c := auxIntToInt64(v_0_1.AuxInt)
20210 if v_1.Op != OpConst64 {
20211 break
20212 }
20213 d := auxIntToInt64(v_1.AuxInt)
20214 if !(!uaddOvf(c, d)) {
20215 break
20216 }
20217 v.reset(OpRsh64Ux64)
20218 v0 := b.NewValue0(v.Pos, OpConst64, t)
20219 v0.AuxInt = int64ToAuxInt(c + d)
20220 v.AddArg2(x, v0)
20221 return true
20222 }
20223
20224
20225 for {
20226 if v_0.Op != OpRsh64x64 {
20227 break
20228 }
20229 x := v_0.Args[0]
20230 if v_1.Op != OpConst64 {
20231 break
20232 }
20233 t := v_1.Type
20234 if auxIntToInt64(v_1.AuxInt) != 63 {
20235 break
20236 }
20237 v.reset(OpRsh64Ux64)
20238 v0 := b.NewValue0(v.Pos, OpConst64, t)
20239 v0.AuxInt = int64ToAuxInt(63)
20240 v.AddArg2(x, v0)
20241 return true
20242 }
20243
20244
20245
20246 for {
20247 if v_0.Op != OpLsh64x64 {
20248 break
20249 }
20250 _ = v_0.Args[1]
20251 v_0_0 := v_0.Args[0]
20252 if v_0_0.Op != OpRsh64Ux64 {
20253 break
20254 }
20255 _ = v_0_0.Args[1]
20256 x := v_0_0.Args[0]
20257 v_0_0_1 := v_0_0.Args[1]
20258 if v_0_0_1.Op != OpConst64 {
20259 break
20260 }
20261 c1 := auxIntToInt64(v_0_0_1.AuxInt)
20262 v_0_1 := v_0.Args[1]
20263 if v_0_1.Op != OpConst64 {
20264 break
20265 }
20266 c2 := auxIntToInt64(v_0_1.AuxInt)
20267 if v_1.Op != OpConst64 {
20268 break
20269 }
20270 c3 := auxIntToInt64(v_1.AuxInt)
20271 if !(uint64(c1) >= uint64(c2) && uint64(c3) >= uint64(c2) && !uaddOvf(c1-c2, c3)) {
20272 break
20273 }
20274 v.reset(OpRsh64Ux64)
20275 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
20276 v0.AuxInt = int64ToAuxInt(c1 - c2 + c3)
20277 v.AddArg2(x, v0)
20278 return true
20279 }
20280
20281
20282 for {
20283 if v_0.Op != OpLsh64x64 {
20284 break
20285 }
20286 _ = v_0.Args[1]
20287 x := v_0.Args[0]
20288 v_0_1 := v_0.Args[1]
20289 if v_0_1.Op != OpConst64 || auxIntToInt64(v_0_1.AuxInt) != 56 || v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 56 {
20290 break
20291 }
20292 v.reset(OpZeroExt8to64)
20293 v0 := b.NewValue0(v.Pos, OpTrunc64to8, typ.UInt8)
20294 v0.AddArg(x)
20295 v.AddArg(v0)
20296 return true
20297 }
20298
20299
20300 for {
20301 if v_0.Op != OpLsh64x64 {
20302 break
20303 }
20304 _ = v_0.Args[1]
20305 x := v_0.Args[0]
20306 v_0_1 := v_0.Args[1]
20307 if v_0_1.Op != OpConst64 || auxIntToInt64(v_0_1.AuxInt) != 48 || v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 48 {
20308 break
20309 }
20310 v.reset(OpZeroExt16to64)
20311 v0 := b.NewValue0(v.Pos, OpTrunc64to16, typ.UInt16)
20312 v0.AddArg(x)
20313 v.AddArg(v0)
20314 return true
20315 }
20316
20317
20318 for {
20319 if v_0.Op != OpLsh64x64 {
20320 break
20321 }
20322 _ = v_0.Args[1]
20323 x := v_0.Args[0]
20324 v_0_1 := v_0.Args[1]
20325 if v_0_1.Op != OpConst64 || auxIntToInt64(v_0_1.AuxInt) != 32 || v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 32 {
20326 break
20327 }
20328 v.reset(OpZeroExt32to64)
20329 v0 := b.NewValue0(v.Pos, OpTrunc64to32, typ.UInt32)
20330 v0.AddArg(x)
20331 v.AddArg(v0)
20332 return true
20333 }
20334 return false
20335 }
20336 func rewriteValuegeneric_OpRsh64Ux8(v *Value) bool {
20337 v_1 := v.Args[1]
20338 v_0 := v.Args[0]
20339 b := v.Block
20340
20341
20342 for {
20343 t := v.Type
20344 x := v_0
20345 if v_1.Op != OpConst8 {
20346 break
20347 }
20348 c := auxIntToInt8(v_1.AuxInt)
20349 v.reset(OpRsh64Ux64)
20350 v0 := b.NewValue0(v.Pos, OpConst64, t)
20351 v0.AuxInt = int64ToAuxInt(int64(uint8(c)))
20352 v.AddArg2(x, v0)
20353 return true
20354 }
20355
20356
20357 for {
20358 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
20359 break
20360 }
20361 v.reset(OpConst64)
20362 v.AuxInt = int64ToAuxInt(0)
20363 return true
20364 }
20365 return false
20366 }
20367 func rewriteValuegeneric_OpRsh64x16(v *Value) bool {
20368 v_1 := v.Args[1]
20369 v_0 := v.Args[0]
20370 b := v.Block
20371
20372
20373 for {
20374 t := v.Type
20375 x := v_0
20376 if v_1.Op != OpConst16 {
20377 break
20378 }
20379 c := auxIntToInt16(v_1.AuxInt)
20380 v.reset(OpRsh64x64)
20381 v0 := b.NewValue0(v.Pos, OpConst64, t)
20382 v0.AuxInt = int64ToAuxInt(int64(uint16(c)))
20383 v.AddArg2(x, v0)
20384 return true
20385 }
20386
20387
20388 for {
20389 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
20390 break
20391 }
20392 v.reset(OpConst64)
20393 v.AuxInt = int64ToAuxInt(0)
20394 return true
20395 }
20396 return false
20397 }
20398 func rewriteValuegeneric_OpRsh64x32(v *Value) bool {
20399 v_1 := v.Args[1]
20400 v_0 := v.Args[0]
20401 b := v.Block
20402
20403
20404 for {
20405 t := v.Type
20406 x := v_0
20407 if v_1.Op != OpConst32 {
20408 break
20409 }
20410 c := auxIntToInt32(v_1.AuxInt)
20411 v.reset(OpRsh64x64)
20412 v0 := b.NewValue0(v.Pos, OpConst64, t)
20413 v0.AuxInt = int64ToAuxInt(int64(uint32(c)))
20414 v.AddArg2(x, v0)
20415 return true
20416 }
20417
20418
20419 for {
20420 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
20421 break
20422 }
20423 v.reset(OpConst64)
20424 v.AuxInt = int64ToAuxInt(0)
20425 return true
20426 }
20427 return false
20428 }
20429 func rewriteValuegeneric_OpRsh64x64(v *Value) bool {
20430 v_1 := v.Args[1]
20431 v_0 := v.Args[0]
20432 b := v.Block
20433 typ := &b.Func.Config.Types
20434
20435
20436 for {
20437 if v_0.Op != OpConst64 {
20438 break
20439 }
20440 c := auxIntToInt64(v_0.AuxInt)
20441 if v_1.Op != OpConst64 {
20442 break
20443 }
20444 d := auxIntToInt64(v_1.AuxInt)
20445 v.reset(OpConst64)
20446 v.AuxInt = int64ToAuxInt(c >> uint64(d))
20447 return true
20448 }
20449
20450
20451 for {
20452 x := v_0
20453 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 0 {
20454 break
20455 }
20456 v.copyOf(x)
20457 return true
20458 }
20459
20460
20461 for {
20462 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
20463 break
20464 }
20465 v.reset(OpConst64)
20466 v.AuxInt = int64ToAuxInt(0)
20467 return true
20468 }
20469
20470
20471
20472 for {
20473 t := v.Type
20474 if v_0.Op != OpRsh64x64 {
20475 break
20476 }
20477 _ = v_0.Args[1]
20478 x := v_0.Args[0]
20479 v_0_1 := v_0.Args[1]
20480 if v_0_1.Op != OpConst64 {
20481 break
20482 }
20483 c := auxIntToInt64(v_0_1.AuxInt)
20484 if v_1.Op != OpConst64 {
20485 break
20486 }
20487 d := auxIntToInt64(v_1.AuxInt)
20488 if !(!uaddOvf(c, d)) {
20489 break
20490 }
20491 v.reset(OpRsh64x64)
20492 v0 := b.NewValue0(v.Pos, OpConst64, t)
20493 v0.AuxInt = int64ToAuxInt(c + d)
20494 v.AddArg2(x, v0)
20495 return true
20496 }
20497
20498
20499 for {
20500 if v_0.Op != OpLsh64x64 {
20501 break
20502 }
20503 _ = v_0.Args[1]
20504 x := v_0.Args[0]
20505 v_0_1 := v_0.Args[1]
20506 if v_0_1.Op != OpConst64 || auxIntToInt64(v_0_1.AuxInt) != 56 || v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 56 {
20507 break
20508 }
20509 v.reset(OpSignExt8to64)
20510 v0 := b.NewValue0(v.Pos, OpTrunc64to8, typ.Int8)
20511 v0.AddArg(x)
20512 v.AddArg(v0)
20513 return true
20514 }
20515
20516
20517 for {
20518 if v_0.Op != OpLsh64x64 {
20519 break
20520 }
20521 _ = v_0.Args[1]
20522 x := v_0.Args[0]
20523 v_0_1 := v_0.Args[1]
20524 if v_0_1.Op != OpConst64 || auxIntToInt64(v_0_1.AuxInt) != 48 || v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 48 {
20525 break
20526 }
20527 v.reset(OpSignExt16to64)
20528 v0 := b.NewValue0(v.Pos, OpTrunc64to16, typ.Int16)
20529 v0.AddArg(x)
20530 v.AddArg(v0)
20531 return true
20532 }
20533
20534
20535 for {
20536 if v_0.Op != OpLsh64x64 {
20537 break
20538 }
20539 _ = v_0.Args[1]
20540 x := v_0.Args[0]
20541 v_0_1 := v_0.Args[1]
20542 if v_0_1.Op != OpConst64 || auxIntToInt64(v_0_1.AuxInt) != 32 || v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 32 {
20543 break
20544 }
20545 v.reset(OpSignExt32to64)
20546 v0 := b.NewValue0(v.Pos, OpTrunc64to32, typ.Int32)
20547 v0.AddArg(x)
20548 v.AddArg(v0)
20549 return true
20550 }
20551 return false
20552 }
20553 func rewriteValuegeneric_OpRsh64x8(v *Value) bool {
20554 v_1 := v.Args[1]
20555 v_0 := v.Args[0]
20556 b := v.Block
20557
20558
20559 for {
20560 t := v.Type
20561 x := v_0
20562 if v_1.Op != OpConst8 {
20563 break
20564 }
20565 c := auxIntToInt8(v_1.AuxInt)
20566 v.reset(OpRsh64x64)
20567 v0 := b.NewValue0(v.Pos, OpConst64, t)
20568 v0.AuxInt = int64ToAuxInt(int64(uint8(c)))
20569 v.AddArg2(x, v0)
20570 return true
20571 }
20572
20573
20574 for {
20575 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
20576 break
20577 }
20578 v.reset(OpConst64)
20579 v.AuxInt = int64ToAuxInt(0)
20580 return true
20581 }
20582 return false
20583 }
20584 func rewriteValuegeneric_OpRsh8Ux16(v *Value) bool {
20585 v_1 := v.Args[1]
20586 v_0 := v.Args[0]
20587 b := v.Block
20588
20589
20590 for {
20591 t := v.Type
20592 x := v_0
20593 if v_1.Op != OpConst16 {
20594 break
20595 }
20596 c := auxIntToInt16(v_1.AuxInt)
20597 v.reset(OpRsh8Ux64)
20598 v0 := b.NewValue0(v.Pos, OpConst64, t)
20599 v0.AuxInt = int64ToAuxInt(int64(uint16(c)))
20600 v.AddArg2(x, v0)
20601 return true
20602 }
20603
20604
20605 for {
20606 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 {
20607 break
20608 }
20609 v.reset(OpConst8)
20610 v.AuxInt = int8ToAuxInt(0)
20611 return true
20612 }
20613 return false
20614 }
20615 func rewriteValuegeneric_OpRsh8Ux32(v *Value) bool {
20616 v_1 := v.Args[1]
20617 v_0 := v.Args[0]
20618 b := v.Block
20619
20620
20621 for {
20622 t := v.Type
20623 x := v_0
20624 if v_1.Op != OpConst32 {
20625 break
20626 }
20627 c := auxIntToInt32(v_1.AuxInt)
20628 v.reset(OpRsh8Ux64)
20629 v0 := b.NewValue0(v.Pos, OpConst64, t)
20630 v0.AuxInt = int64ToAuxInt(int64(uint32(c)))
20631 v.AddArg2(x, v0)
20632 return true
20633 }
20634
20635
20636 for {
20637 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 {
20638 break
20639 }
20640 v.reset(OpConst8)
20641 v.AuxInt = int8ToAuxInt(0)
20642 return true
20643 }
20644 return false
20645 }
20646 func rewriteValuegeneric_OpRsh8Ux64(v *Value) bool {
20647 v_1 := v.Args[1]
20648 v_0 := v.Args[0]
20649 b := v.Block
20650 typ := &b.Func.Config.Types
20651
20652
20653 for {
20654 if v_0.Op != OpConst8 {
20655 break
20656 }
20657 c := auxIntToInt8(v_0.AuxInt)
20658 if v_1.Op != OpConst64 {
20659 break
20660 }
20661 d := auxIntToInt64(v_1.AuxInt)
20662 v.reset(OpConst8)
20663 v.AuxInt = int8ToAuxInt(int8(uint8(c) >> uint64(d)))
20664 return true
20665 }
20666
20667
20668 for {
20669 x := v_0
20670 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 0 {
20671 break
20672 }
20673 v.copyOf(x)
20674 return true
20675 }
20676
20677
20678 for {
20679 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 {
20680 break
20681 }
20682 v.reset(OpConst8)
20683 v.AuxInt = int8ToAuxInt(0)
20684 return true
20685 }
20686
20687
20688
20689 for {
20690 if v_1.Op != OpConst64 {
20691 break
20692 }
20693 c := auxIntToInt64(v_1.AuxInt)
20694 if !(uint64(c) >= 8) {
20695 break
20696 }
20697 v.reset(OpConst8)
20698 v.AuxInt = int8ToAuxInt(0)
20699 return true
20700 }
20701
20702
20703
20704 for {
20705 t := v.Type
20706 if v_0.Op != OpRsh8Ux64 {
20707 break
20708 }
20709 _ = v_0.Args[1]
20710 x := v_0.Args[0]
20711 v_0_1 := v_0.Args[1]
20712 if v_0_1.Op != OpConst64 {
20713 break
20714 }
20715 c := auxIntToInt64(v_0_1.AuxInt)
20716 if v_1.Op != OpConst64 {
20717 break
20718 }
20719 d := auxIntToInt64(v_1.AuxInt)
20720 if !(!uaddOvf(c, d)) {
20721 break
20722 }
20723 v.reset(OpRsh8Ux64)
20724 v0 := b.NewValue0(v.Pos, OpConst64, t)
20725 v0.AuxInt = int64ToAuxInt(c + d)
20726 v.AddArg2(x, v0)
20727 return true
20728 }
20729
20730
20731 for {
20732 if v_0.Op != OpRsh8x64 {
20733 break
20734 }
20735 x := v_0.Args[0]
20736 if v_1.Op != OpConst64 {
20737 break
20738 }
20739 t := v_1.Type
20740 if auxIntToInt64(v_1.AuxInt) != 7 {
20741 break
20742 }
20743 v.reset(OpRsh8Ux64)
20744 v0 := b.NewValue0(v.Pos, OpConst64, t)
20745 v0.AuxInt = int64ToAuxInt(7)
20746 v.AddArg2(x, v0)
20747 return true
20748 }
20749
20750
20751
20752 for {
20753 if v_0.Op != OpLsh8x64 {
20754 break
20755 }
20756 _ = v_0.Args[1]
20757 v_0_0 := v_0.Args[0]
20758 if v_0_0.Op != OpRsh8Ux64 {
20759 break
20760 }
20761 _ = v_0_0.Args[1]
20762 x := v_0_0.Args[0]
20763 v_0_0_1 := v_0_0.Args[1]
20764 if v_0_0_1.Op != OpConst64 {
20765 break
20766 }
20767 c1 := auxIntToInt64(v_0_0_1.AuxInt)
20768 v_0_1 := v_0.Args[1]
20769 if v_0_1.Op != OpConst64 {
20770 break
20771 }
20772 c2 := auxIntToInt64(v_0_1.AuxInt)
20773 if v_1.Op != OpConst64 {
20774 break
20775 }
20776 c3 := auxIntToInt64(v_1.AuxInt)
20777 if !(uint64(c1) >= uint64(c2) && uint64(c3) >= uint64(c2) && !uaddOvf(c1-c2, c3)) {
20778 break
20779 }
20780 v.reset(OpRsh8Ux64)
20781 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
20782 v0.AuxInt = int64ToAuxInt(c1 - c2 + c3)
20783 v.AddArg2(x, v0)
20784 return true
20785 }
20786 return false
20787 }
20788 func rewriteValuegeneric_OpRsh8Ux8(v *Value) bool {
20789 v_1 := v.Args[1]
20790 v_0 := v.Args[0]
20791 b := v.Block
20792
20793
20794 for {
20795 t := v.Type
20796 x := v_0
20797 if v_1.Op != OpConst8 {
20798 break
20799 }
20800 c := auxIntToInt8(v_1.AuxInt)
20801 v.reset(OpRsh8Ux64)
20802 v0 := b.NewValue0(v.Pos, OpConst64, t)
20803 v0.AuxInt = int64ToAuxInt(int64(uint8(c)))
20804 v.AddArg2(x, v0)
20805 return true
20806 }
20807
20808
20809 for {
20810 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 {
20811 break
20812 }
20813 v.reset(OpConst8)
20814 v.AuxInt = int8ToAuxInt(0)
20815 return true
20816 }
20817 return false
20818 }
20819 func rewriteValuegeneric_OpRsh8x16(v *Value) bool {
20820 v_1 := v.Args[1]
20821 v_0 := v.Args[0]
20822 b := v.Block
20823
20824
20825 for {
20826 t := v.Type
20827 x := v_0
20828 if v_1.Op != OpConst16 {
20829 break
20830 }
20831 c := auxIntToInt16(v_1.AuxInt)
20832 v.reset(OpRsh8x64)
20833 v0 := b.NewValue0(v.Pos, OpConst64, t)
20834 v0.AuxInt = int64ToAuxInt(int64(uint16(c)))
20835 v.AddArg2(x, v0)
20836 return true
20837 }
20838
20839
20840 for {
20841 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 {
20842 break
20843 }
20844 v.reset(OpConst8)
20845 v.AuxInt = int8ToAuxInt(0)
20846 return true
20847 }
20848 return false
20849 }
20850 func rewriteValuegeneric_OpRsh8x32(v *Value) bool {
20851 v_1 := v.Args[1]
20852 v_0 := v.Args[0]
20853 b := v.Block
20854
20855
20856 for {
20857 t := v.Type
20858 x := v_0
20859 if v_1.Op != OpConst32 {
20860 break
20861 }
20862 c := auxIntToInt32(v_1.AuxInt)
20863 v.reset(OpRsh8x64)
20864 v0 := b.NewValue0(v.Pos, OpConst64, t)
20865 v0.AuxInt = int64ToAuxInt(int64(uint32(c)))
20866 v.AddArg2(x, v0)
20867 return true
20868 }
20869
20870
20871 for {
20872 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 {
20873 break
20874 }
20875 v.reset(OpConst8)
20876 v.AuxInt = int8ToAuxInt(0)
20877 return true
20878 }
20879 return false
20880 }
20881 func rewriteValuegeneric_OpRsh8x64(v *Value) bool {
20882 v_1 := v.Args[1]
20883 v_0 := v.Args[0]
20884 b := v.Block
20885
20886
20887 for {
20888 if v_0.Op != OpConst8 {
20889 break
20890 }
20891 c := auxIntToInt8(v_0.AuxInt)
20892 if v_1.Op != OpConst64 {
20893 break
20894 }
20895 d := auxIntToInt64(v_1.AuxInt)
20896 v.reset(OpConst8)
20897 v.AuxInt = int8ToAuxInt(c >> uint64(d))
20898 return true
20899 }
20900
20901
20902 for {
20903 x := v_0
20904 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 0 {
20905 break
20906 }
20907 v.copyOf(x)
20908 return true
20909 }
20910
20911
20912 for {
20913 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 {
20914 break
20915 }
20916 v.reset(OpConst8)
20917 v.AuxInt = int8ToAuxInt(0)
20918 return true
20919 }
20920
20921
20922
20923 for {
20924 t := v.Type
20925 if v_0.Op != OpRsh8x64 {
20926 break
20927 }
20928 _ = v_0.Args[1]
20929 x := v_0.Args[0]
20930 v_0_1 := v_0.Args[1]
20931 if v_0_1.Op != OpConst64 {
20932 break
20933 }
20934 c := auxIntToInt64(v_0_1.AuxInt)
20935 if v_1.Op != OpConst64 {
20936 break
20937 }
20938 d := auxIntToInt64(v_1.AuxInt)
20939 if !(!uaddOvf(c, d)) {
20940 break
20941 }
20942 v.reset(OpRsh8x64)
20943 v0 := b.NewValue0(v.Pos, OpConst64, t)
20944 v0.AuxInt = int64ToAuxInt(c + d)
20945 v.AddArg2(x, v0)
20946 return true
20947 }
20948 return false
20949 }
20950 func rewriteValuegeneric_OpRsh8x8(v *Value) bool {
20951 v_1 := v.Args[1]
20952 v_0 := v.Args[0]
20953 b := v.Block
20954
20955
20956 for {
20957 t := v.Type
20958 x := v_0
20959 if v_1.Op != OpConst8 {
20960 break
20961 }
20962 c := auxIntToInt8(v_1.AuxInt)
20963 v.reset(OpRsh8x64)
20964 v0 := b.NewValue0(v.Pos, OpConst64, t)
20965 v0.AuxInt = int64ToAuxInt(int64(uint8(c)))
20966 v.AddArg2(x, v0)
20967 return true
20968 }
20969
20970
20971 for {
20972 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 {
20973 break
20974 }
20975 v.reset(OpConst8)
20976 v.AuxInt = int8ToAuxInt(0)
20977 return true
20978 }
20979 return false
20980 }
20981 func rewriteValuegeneric_OpSelect0(v *Value) bool {
20982 v_0 := v.Args[0]
20983
20984
20985 for {
20986 if v_0.Op != OpDiv128u {
20987 break
20988 }
20989 y := v_0.Args[2]
20990 v_0_0 := v_0.Args[0]
20991 if v_0_0.Op != OpConst64 || auxIntToInt64(v_0_0.AuxInt) != 0 {
20992 break
20993 }
20994 lo := v_0.Args[1]
20995 v.reset(OpDiv64u)
20996 v.AddArg2(lo, y)
20997 return true
20998 }
20999 return false
21000 }
21001 func rewriteValuegeneric_OpSelect1(v *Value) bool {
21002 v_0 := v.Args[0]
21003
21004
21005 for {
21006 if v_0.Op != OpDiv128u {
21007 break
21008 }
21009 y := v_0.Args[2]
21010 v_0_0 := v_0.Args[0]
21011 if v_0_0.Op != OpConst64 || auxIntToInt64(v_0_0.AuxInt) != 0 {
21012 break
21013 }
21014 lo := v_0.Args[1]
21015 v.reset(OpMod64u)
21016 v.AddArg2(lo, y)
21017 return true
21018 }
21019 return false
21020 }
21021 func rewriteValuegeneric_OpSelectN(v *Value) bool {
21022 v_0 := v.Args[0]
21023 b := v.Block
21024 config := b.Func.Config
21025
21026
21027 for {
21028 if auxIntToInt64(v.AuxInt) != 0 || v_0.Op != OpMakeResult || len(v_0.Args) < 1 {
21029 break
21030 }
21031 x := v_0.Args[0]
21032 v.copyOf(x)
21033 return true
21034 }
21035
21036
21037 for {
21038 if auxIntToInt64(v.AuxInt) != 1 || v_0.Op != OpMakeResult || len(v_0.Args) < 2 {
21039 break
21040 }
21041 y := v_0.Args[1]
21042 v.copyOf(y)
21043 return true
21044 }
21045
21046
21047 for {
21048 if auxIntToInt64(v.AuxInt) != 2 || v_0.Op != OpMakeResult || len(v_0.Args) < 3 {
21049 break
21050 }
21051 z := v_0.Args[2]
21052 v.copyOf(z)
21053 return true
21054 }
21055
21056
21057
21058 for {
21059 if auxIntToInt64(v.AuxInt) != 0 {
21060 break
21061 }
21062 call := v_0
21063 if call.Op != OpStaticCall || len(call.Args) != 1 {
21064 break
21065 }
21066 sym := auxToCall(call.Aux)
21067 s1 := call.Args[0]
21068 if s1.Op != OpStore {
21069 break
21070 }
21071 _ = s1.Args[2]
21072 s1_1 := s1.Args[1]
21073 if s1_1.Op != OpConst64 {
21074 break
21075 }
21076 sz := auxIntToInt64(s1_1.AuxInt)
21077 s2 := s1.Args[2]
21078 if s2.Op != OpStore {
21079 break
21080 }
21081 _ = s2.Args[2]
21082 src := s2.Args[1]
21083 s3 := s2.Args[2]
21084 if s3.Op != OpStore {
21085 break
21086 }
21087 t := auxToType(s3.Aux)
21088 mem := s3.Args[2]
21089 dst := s3.Args[1]
21090 if !(sz >= 0 && isSameCall(sym, "runtime.memmove") && t.IsPtr() && s1.Uses == 1 && s2.Uses == 1 && s3.Uses == 1 && isInlinableMemmove(dst, src, int64(sz), config) && clobber(s1, s2, s3, call)) {
21091 break
21092 }
21093 v.reset(OpMove)
21094 v.AuxInt = int64ToAuxInt(int64(sz))
21095 v.Aux = typeToAux(t.Elem())
21096 v.AddArg3(dst, src, mem)
21097 return true
21098 }
21099
21100
21101
21102 for {
21103 if auxIntToInt64(v.AuxInt) != 0 {
21104 break
21105 }
21106 call := v_0
21107 if call.Op != OpStaticCall || len(call.Args) != 1 {
21108 break
21109 }
21110 sym := auxToCall(call.Aux)
21111 s1 := call.Args[0]
21112 if s1.Op != OpStore {
21113 break
21114 }
21115 _ = s1.Args[2]
21116 s1_1 := s1.Args[1]
21117 if s1_1.Op != OpConst32 {
21118 break
21119 }
21120 sz := auxIntToInt32(s1_1.AuxInt)
21121 s2 := s1.Args[2]
21122 if s2.Op != OpStore {
21123 break
21124 }
21125 _ = s2.Args[2]
21126 src := s2.Args[1]
21127 s3 := s2.Args[2]
21128 if s3.Op != OpStore {
21129 break
21130 }
21131 t := auxToType(s3.Aux)
21132 mem := s3.Args[2]
21133 dst := s3.Args[1]
21134 if !(sz >= 0 && isSameCall(sym, "runtime.memmove") && t.IsPtr() && s1.Uses == 1 && s2.Uses == 1 && s3.Uses == 1 && isInlinableMemmove(dst, src, int64(sz), config) && clobber(s1, s2, s3, call)) {
21135 break
21136 }
21137 v.reset(OpMove)
21138 v.AuxInt = int64ToAuxInt(int64(sz))
21139 v.Aux = typeToAux(t.Elem())
21140 v.AddArg3(dst, src, mem)
21141 return true
21142 }
21143
21144
21145
21146 for {
21147 if auxIntToInt64(v.AuxInt) != 0 {
21148 break
21149 }
21150 call := v_0
21151 if call.Op != OpStaticCall || len(call.Args) != 4 {
21152 break
21153 }
21154 sym := auxToCall(call.Aux)
21155 mem := call.Args[3]
21156 dst := call.Args[0]
21157 src := call.Args[1]
21158 call_2 := call.Args[2]
21159 if call_2.Op != OpConst64 {
21160 break
21161 }
21162 sz := auxIntToInt64(call_2.AuxInt)
21163 if !(sz >= 0 && call.Uses == 1 && isSameCall(sym, "runtime.memmove") && dst.Type.IsPtr() && isInlinableMemmove(dst, src, int64(sz), config) && clobber(call)) {
21164 break
21165 }
21166 v.reset(OpMove)
21167 v.AuxInt = int64ToAuxInt(int64(sz))
21168 v.Aux = typeToAux(dst.Type.Elem())
21169 v.AddArg3(dst, src, mem)
21170 return true
21171 }
21172
21173
21174
21175 for {
21176 if auxIntToInt64(v.AuxInt) != 0 {
21177 break
21178 }
21179 call := v_0
21180 if call.Op != OpStaticCall || len(call.Args) != 4 {
21181 break
21182 }
21183 sym := auxToCall(call.Aux)
21184 mem := call.Args[3]
21185 dst := call.Args[0]
21186 src := call.Args[1]
21187 call_2 := call.Args[2]
21188 if call_2.Op != OpConst32 {
21189 break
21190 }
21191 sz := auxIntToInt32(call_2.AuxInt)
21192 if !(sz >= 0 && call.Uses == 1 && isSameCall(sym, "runtime.memmove") && dst.Type.IsPtr() && isInlinableMemmove(dst, src, int64(sz), config) && clobber(call)) {
21193 break
21194 }
21195 v.reset(OpMove)
21196 v.AuxInt = int64ToAuxInt(int64(sz))
21197 v.Aux = typeToAux(dst.Type.Elem())
21198 v.AddArg3(dst, src, mem)
21199 return true
21200 }
21201
21202
21203
21204 for {
21205 if auxIntToInt64(v.AuxInt) != 0 {
21206 break
21207 }
21208 call := v_0
21209 if call.Op != OpStaticLECall || len(call.Args) != 4 {
21210 break
21211 }
21212 sym := auxToCall(call.Aux)
21213 mem := call.Args[3]
21214 dst := call.Args[0]
21215 src := call.Args[1]
21216 call_2 := call.Args[2]
21217 if call_2.Op != OpConst64 {
21218 break
21219 }
21220 sz := auxIntToInt64(call_2.AuxInt)
21221 if !(sz >= 0 && call.Uses == 1 && isSameCall(sym, "runtime.memmove") && dst.Type.IsPtr() && isInlinableMemmove(dst, src, int64(sz), config) && clobber(call)) {
21222 break
21223 }
21224 v.reset(OpMove)
21225 v.AuxInt = int64ToAuxInt(int64(sz))
21226 v.Aux = typeToAux(dst.Type.Elem())
21227 v.AddArg3(dst, src, mem)
21228 return true
21229 }
21230
21231
21232
21233 for {
21234 if auxIntToInt64(v.AuxInt) != 0 {
21235 break
21236 }
21237 call := v_0
21238 if call.Op != OpStaticLECall || len(call.Args) != 4 {
21239 break
21240 }
21241 sym := auxToCall(call.Aux)
21242 mem := call.Args[3]
21243 dst := call.Args[0]
21244 src := call.Args[1]
21245 call_2 := call.Args[2]
21246 if call_2.Op != OpConst32 {
21247 break
21248 }
21249 sz := auxIntToInt32(call_2.AuxInt)
21250 if !(sz >= 0 && call.Uses == 1 && isSameCall(sym, "runtime.memmove") && dst.Type.IsPtr() && isInlinableMemmove(dst, src, int64(sz), config) && clobber(call)) {
21251 break
21252 }
21253 v.reset(OpMove)
21254 v.AuxInt = int64ToAuxInt(int64(sz))
21255 v.Aux = typeToAux(dst.Type.Elem())
21256 v.AddArg3(dst, src, mem)
21257 return true
21258 }
21259
21260
21261
21262 for {
21263 if auxIntToInt64(v.AuxInt) != 0 {
21264 break
21265 }
21266 call := v_0
21267 if call.Op != OpStaticLECall || len(call.Args) != 2 {
21268 break
21269 }
21270 sym := auxToCall(call.Aux)
21271 x := call.Args[1]
21272 if !(needRaceCleanup(sym, call) && clobber(call)) {
21273 break
21274 }
21275 v.copyOf(x)
21276 return true
21277 }
21278
21279
21280
21281 for {
21282 if auxIntToInt64(v.AuxInt) != 0 {
21283 break
21284 }
21285 call := v_0
21286 if call.Op != OpStaticLECall || len(call.Args) != 1 {
21287 break
21288 }
21289 sym := auxToCall(call.Aux)
21290 x := call.Args[0]
21291 if !(needRaceCleanup(sym, call) && clobber(call)) {
21292 break
21293 }
21294 v.copyOf(x)
21295 return true
21296 }
21297 return false
21298 }
21299 func rewriteValuegeneric_OpSignExt16to32(v *Value) bool {
21300 v_0 := v.Args[0]
21301
21302
21303 for {
21304 if v_0.Op != OpConst16 {
21305 break
21306 }
21307 c := auxIntToInt16(v_0.AuxInt)
21308 v.reset(OpConst32)
21309 v.AuxInt = int32ToAuxInt(int32(c))
21310 return true
21311 }
21312
21313
21314
21315 for {
21316 if v_0.Op != OpTrunc32to16 {
21317 break
21318 }
21319 x := v_0.Args[0]
21320 if x.Op != OpRsh32x64 {
21321 break
21322 }
21323 _ = x.Args[1]
21324 x_1 := x.Args[1]
21325 if x_1.Op != OpConst64 {
21326 break
21327 }
21328 s := auxIntToInt64(x_1.AuxInt)
21329 if !(s >= 16) {
21330 break
21331 }
21332 v.copyOf(x)
21333 return true
21334 }
21335 return false
21336 }
21337 func rewriteValuegeneric_OpSignExt16to64(v *Value) bool {
21338 v_0 := v.Args[0]
21339
21340
21341 for {
21342 if v_0.Op != OpConst16 {
21343 break
21344 }
21345 c := auxIntToInt16(v_0.AuxInt)
21346 v.reset(OpConst64)
21347 v.AuxInt = int64ToAuxInt(int64(c))
21348 return true
21349 }
21350
21351
21352
21353 for {
21354 if v_0.Op != OpTrunc64to16 {
21355 break
21356 }
21357 x := v_0.Args[0]
21358 if x.Op != OpRsh64x64 {
21359 break
21360 }
21361 _ = x.Args[1]
21362 x_1 := x.Args[1]
21363 if x_1.Op != OpConst64 {
21364 break
21365 }
21366 s := auxIntToInt64(x_1.AuxInt)
21367 if !(s >= 48) {
21368 break
21369 }
21370 v.copyOf(x)
21371 return true
21372 }
21373 return false
21374 }
21375 func rewriteValuegeneric_OpSignExt32to64(v *Value) bool {
21376 v_0 := v.Args[0]
21377
21378
21379 for {
21380 if v_0.Op != OpConst32 {
21381 break
21382 }
21383 c := auxIntToInt32(v_0.AuxInt)
21384 v.reset(OpConst64)
21385 v.AuxInt = int64ToAuxInt(int64(c))
21386 return true
21387 }
21388
21389
21390
21391 for {
21392 if v_0.Op != OpTrunc64to32 {
21393 break
21394 }
21395 x := v_0.Args[0]
21396 if x.Op != OpRsh64x64 {
21397 break
21398 }
21399 _ = x.Args[1]
21400 x_1 := x.Args[1]
21401 if x_1.Op != OpConst64 {
21402 break
21403 }
21404 s := auxIntToInt64(x_1.AuxInt)
21405 if !(s >= 32) {
21406 break
21407 }
21408 v.copyOf(x)
21409 return true
21410 }
21411 return false
21412 }
21413 func rewriteValuegeneric_OpSignExt8to16(v *Value) bool {
21414 v_0 := v.Args[0]
21415
21416
21417 for {
21418 if v_0.Op != OpConst8 {
21419 break
21420 }
21421 c := auxIntToInt8(v_0.AuxInt)
21422 v.reset(OpConst16)
21423 v.AuxInt = int16ToAuxInt(int16(c))
21424 return true
21425 }
21426
21427
21428
21429 for {
21430 if v_0.Op != OpTrunc16to8 {
21431 break
21432 }
21433 x := v_0.Args[0]
21434 if x.Op != OpRsh16x64 {
21435 break
21436 }
21437 _ = x.Args[1]
21438 x_1 := x.Args[1]
21439 if x_1.Op != OpConst64 {
21440 break
21441 }
21442 s := auxIntToInt64(x_1.AuxInt)
21443 if !(s >= 8) {
21444 break
21445 }
21446 v.copyOf(x)
21447 return true
21448 }
21449 return false
21450 }
21451 func rewriteValuegeneric_OpSignExt8to32(v *Value) bool {
21452 v_0 := v.Args[0]
21453
21454
21455 for {
21456 if v_0.Op != OpConst8 {
21457 break
21458 }
21459 c := auxIntToInt8(v_0.AuxInt)
21460 v.reset(OpConst32)
21461 v.AuxInt = int32ToAuxInt(int32(c))
21462 return true
21463 }
21464
21465
21466
21467 for {
21468 if v_0.Op != OpTrunc32to8 {
21469 break
21470 }
21471 x := v_0.Args[0]
21472 if x.Op != OpRsh32x64 {
21473 break
21474 }
21475 _ = x.Args[1]
21476 x_1 := x.Args[1]
21477 if x_1.Op != OpConst64 {
21478 break
21479 }
21480 s := auxIntToInt64(x_1.AuxInt)
21481 if !(s >= 24) {
21482 break
21483 }
21484 v.copyOf(x)
21485 return true
21486 }
21487 return false
21488 }
21489 func rewriteValuegeneric_OpSignExt8to64(v *Value) bool {
21490 v_0 := v.Args[0]
21491
21492
21493 for {
21494 if v_0.Op != OpConst8 {
21495 break
21496 }
21497 c := auxIntToInt8(v_0.AuxInt)
21498 v.reset(OpConst64)
21499 v.AuxInt = int64ToAuxInt(int64(c))
21500 return true
21501 }
21502
21503
21504
21505 for {
21506 if v_0.Op != OpTrunc64to8 {
21507 break
21508 }
21509 x := v_0.Args[0]
21510 if x.Op != OpRsh64x64 {
21511 break
21512 }
21513 _ = x.Args[1]
21514 x_1 := x.Args[1]
21515 if x_1.Op != OpConst64 {
21516 break
21517 }
21518 s := auxIntToInt64(x_1.AuxInt)
21519 if !(s >= 56) {
21520 break
21521 }
21522 v.copyOf(x)
21523 return true
21524 }
21525 return false
21526 }
21527 func rewriteValuegeneric_OpSliceCap(v *Value) bool {
21528 v_0 := v.Args[0]
21529
21530
21531 for {
21532 if v_0.Op != OpSliceMake {
21533 break
21534 }
21535 _ = v_0.Args[2]
21536 v_0_2 := v_0.Args[2]
21537 if v_0_2.Op != OpConst64 {
21538 break
21539 }
21540 t := v_0_2.Type
21541 c := auxIntToInt64(v_0_2.AuxInt)
21542 v.reset(OpConst64)
21543 v.Type = t
21544 v.AuxInt = int64ToAuxInt(c)
21545 return true
21546 }
21547
21548
21549 for {
21550 if v_0.Op != OpSliceMake {
21551 break
21552 }
21553 _ = v_0.Args[2]
21554 v_0_2 := v_0.Args[2]
21555 if v_0_2.Op != OpConst32 {
21556 break
21557 }
21558 t := v_0_2.Type
21559 c := auxIntToInt32(v_0_2.AuxInt)
21560 v.reset(OpConst32)
21561 v.Type = t
21562 v.AuxInt = int32ToAuxInt(c)
21563 return true
21564 }
21565
21566
21567 for {
21568 if v_0.Op != OpSliceMake {
21569 break
21570 }
21571 _ = v_0.Args[2]
21572 v_0_2 := v_0.Args[2]
21573 if v_0_2.Op != OpSliceCap {
21574 break
21575 }
21576 x := v_0_2.Args[0]
21577 v.reset(OpSliceCap)
21578 v.AddArg(x)
21579 return true
21580 }
21581
21582
21583 for {
21584 if v_0.Op != OpSliceMake {
21585 break
21586 }
21587 _ = v_0.Args[2]
21588 v_0_2 := v_0.Args[2]
21589 if v_0_2.Op != OpSliceLen {
21590 break
21591 }
21592 x := v_0_2.Args[0]
21593 v.reset(OpSliceLen)
21594 v.AddArg(x)
21595 return true
21596 }
21597 return false
21598 }
21599 func rewriteValuegeneric_OpSliceLen(v *Value) bool {
21600 v_0 := v.Args[0]
21601
21602
21603 for {
21604 if v_0.Op != OpSliceMake {
21605 break
21606 }
21607 _ = v_0.Args[1]
21608 v_0_1 := v_0.Args[1]
21609 if v_0_1.Op != OpConst64 {
21610 break
21611 }
21612 t := v_0_1.Type
21613 c := auxIntToInt64(v_0_1.AuxInt)
21614 v.reset(OpConst64)
21615 v.Type = t
21616 v.AuxInt = int64ToAuxInt(c)
21617 return true
21618 }
21619
21620
21621 for {
21622 if v_0.Op != OpSliceMake {
21623 break
21624 }
21625 _ = v_0.Args[1]
21626 v_0_1 := v_0.Args[1]
21627 if v_0_1.Op != OpConst32 {
21628 break
21629 }
21630 t := v_0_1.Type
21631 c := auxIntToInt32(v_0_1.AuxInt)
21632 v.reset(OpConst32)
21633 v.Type = t
21634 v.AuxInt = int32ToAuxInt(c)
21635 return true
21636 }
21637
21638
21639 for {
21640 if v_0.Op != OpSliceMake {
21641 break
21642 }
21643 _ = v_0.Args[1]
21644 v_0_1 := v_0.Args[1]
21645 if v_0_1.Op != OpSliceLen {
21646 break
21647 }
21648 x := v_0_1.Args[0]
21649 v.reset(OpSliceLen)
21650 v.AddArg(x)
21651 return true
21652 }
21653 return false
21654 }
21655 func rewriteValuegeneric_OpSlicePtr(v *Value) bool {
21656 v_0 := v.Args[0]
21657
21658
21659 for {
21660 if v_0.Op != OpSliceMake {
21661 break
21662 }
21663 v_0_0 := v_0.Args[0]
21664 if v_0_0.Op != OpSlicePtr {
21665 break
21666 }
21667 x := v_0_0.Args[0]
21668 v.reset(OpSlicePtr)
21669 v.AddArg(x)
21670 return true
21671 }
21672 return false
21673 }
21674 func rewriteValuegeneric_OpSlicemask(v *Value) bool {
21675 v_0 := v.Args[0]
21676
21677
21678
21679 for {
21680 if v_0.Op != OpConst32 {
21681 break
21682 }
21683 x := auxIntToInt32(v_0.AuxInt)
21684 if !(x > 0) {
21685 break
21686 }
21687 v.reset(OpConst32)
21688 v.AuxInt = int32ToAuxInt(-1)
21689 return true
21690 }
21691
21692
21693 for {
21694 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
21695 break
21696 }
21697 v.reset(OpConst32)
21698 v.AuxInt = int32ToAuxInt(0)
21699 return true
21700 }
21701
21702
21703
21704 for {
21705 if v_0.Op != OpConst64 {
21706 break
21707 }
21708 x := auxIntToInt64(v_0.AuxInt)
21709 if !(x > 0) {
21710 break
21711 }
21712 v.reset(OpConst64)
21713 v.AuxInt = int64ToAuxInt(-1)
21714 return true
21715 }
21716
21717
21718 for {
21719 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
21720 break
21721 }
21722 v.reset(OpConst64)
21723 v.AuxInt = int64ToAuxInt(0)
21724 return true
21725 }
21726 return false
21727 }
21728 func rewriteValuegeneric_OpSqrt(v *Value) bool {
21729 v_0 := v.Args[0]
21730
21731
21732
21733 for {
21734 if v_0.Op != OpConst64F {
21735 break
21736 }
21737 c := auxIntToFloat64(v_0.AuxInt)
21738 if !(!math.IsNaN(math.Sqrt(c))) {
21739 break
21740 }
21741 v.reset(OpConst64F)
21742 v.AuxInt = float64ToAuxInt(math.Sqrt(c))
21743 return true
21744 }
21745 return false
21746 }
21747 func rewriteValuegeneric_OpStaticLECall(v *Value) bool {
21748 b := v.Block
21749 config := b.Func.Config
21750 typ := &b.Func.Config.Types
21751
21752
21753
21754 for {
21755 if len(v.Args) != 4 {
21756 break
21757 }
21758 callAux := auxToCall(v.Aux)
21759 mem := v.Args[3]
21760 sptr := v.Args[0]
21761 v_1 := v.Args[1]
21762 if v_1.Op != OpAddr {
21763 break
21764 }
21765 scon := auxToSym(v_1.Aux)
21766 v_1_0 := v_1.Args[0]
21767 if v_1_0.Op != OpSB {
21768 break
21769 }
21770 v_2 := v.Args[2]
21771 if v_2.Op != OpConst64 || auxIntToInt64(v_2.AuxInt) != 1 || !(isSameCall(callAux, "runtime.memequal") && symIsRO(scon)) {
21772 break
21773 }
21774 v.reset(OpMakeResult)
21775 v0 := b.NewValue0(v.Pos, OpEq8, typ.Bool)
21776 v1 := b.NewValue0(v.Pos, OpLoad, typ.Int8)
21777 v1.AddArg2(sptr, mem)
21778 v2 := b.NewValue0(v.Pos, OpConst8, typ.Int8)
21779 v2.AuxInt = int8ToAuxInt(int8(read8(scon, 0)))
21780 v0.AddArg2(v1, v2)
21781 v.AddArg2(v0, mem)
21782 return true
21783 }
21784
21785
21786
21787 for {
21788 if len(v.Args) != 4 {
21789 break
21790 }
21791 callAux := auxToCall(v.Aux)
21792 mem := v.Args[3]
21793 sptr := v.Args[0]
21794 v_1 := v.Args[1]
21795 if v_1.Op != OpAddr {
21796 break
21797 }
21798 scon := auxToSym(v_1.Aux)
21799 v_1_0 := v_1.Args[0]
21800 if v_1_0.Op != OpSB {
21801 break
21802 }
21803 v_2 := v.Args[2]
21804 if v_2.Op != OpConst64 || auxIntToInt64(v_2.AuxInt) != 2 || !(isSameCall(callAux, "runtime.memequal") && symIsRO(scon) && canLoadUnaligned(config)) {
21805 break
21806 }
21807 v.reset(OpMakeResult)
21808 v0 := b.NewValue0(v.Pos, OpEq16, typ.Bool)
21809 v1 := b.NewValue0(v.Pos, OpLoad, typ.Int16)
21810 v1.AddArg2(sptr, mem)
21811 v2 := b.NewValue0(v.Pos, OpConst16, typ.Int16)
21812 v2.AuxInt = int16ToAuxInt(int16(read16(scon, 0, config.ctxt.Arch.ByteOrder)))
21813 v0.AddArg2(v1, v2)
21814 v.AddArg2(v0, mem)
21815 return true
21816 }
21817
21818
21819
21820 for {
21821 if len(v.Args) != 4 {
21822 break
21823 }
21824 callAux := auxToCall(v.Aux)
21825 mem := v.Args[3]
21826 sptr := v.Args[0]
21827 v_1 := v.Args[1]
21828 if v_1.Op != OpAddr {
21829 break
21830 }
21831 scon := auxToSym(v_1.Aux)
21832 v_1_0 := v_1.Args[0]
21833 if v_1_0.Op != OpSB {
21834 break
21835 }
21836 v_2 := v.Args[2]
21837 if v_2.Op != OpConst64 || auxIntToInt64(v_2.AuxInt) != 4 || !(isSameCall(callAux, "runtime.memequal") && symIsRO(scon) && canLoadUnaligned(config)) {
21838 break
21839 }
21840 v.reset(OpMakeResult)
21841 v0 := b.NewValue0(v.Pos, OpEq32, typ.Bool)
21842 v1 := b.NewValue0(v.Pos, OpLoad, typ.Int32)
21843 v1.AddArg2(sptr, mem)
21844 v2 := b.NewValue0(v.Pos, OpConst32, typ.Int32)
21845 v2.AuxInt = int32ToAuxInt(int32(read32(scon, 0, config.ctxt.Arch.ByteOrder)))
21846 v0.AddArg2(v1, v2)
21847 v.AddArg2(v0, mem)
21848 return true
21849 }
21850
21851
21852
21853 for {
21854 if len(v.Args) != 4 {
21855 break
21856 }
21857 callAux := auxToCall(v.Aux)
21858 mem := v.Args[3]
21859 sptr := v.Args[0]
21860 v_1 := v.Args[1]
21861 if v_1.Op != OpAddr {
21862 break
21863 }
21864 scon := auxToSym(v_1.Aux)
21865 v_1_0 := v_1.Args[0]
21866 if v_1_0.Op != OpSB {
21867 break
21868 }
21869 v_2 := v.Args[2]
21870 if v_2.Op != OpConst64 || auxIntToInt64(v_2.AuxInt) != 8 || !(isSameCall(callAux, "runtime.memequal") && symIsRO(scon) && canLoadUnaligned(config) && config.PtrSize == 8) {
21871 break
21872 }
21873 v.reset(OpMakeResult)
21874 v0 := b.NewValue0(v.Pos, OpEq64, typ.Bool)
21875 v1 := b.NewValue0(v.Pos, OpLoad, typ.Int64)
21876 v1.AddArg2(sptr, mem)
21877 v2 := b.NewValue0(v.Pos, OpConst64, typ.Int64)
21878 v2.AuxInt = int64ToAuxInt(int64(read64(scon, 0, config.ctxt.Arch.ByteOrder)))
21879 v0.AddArg2(v1, v2)
21880 v.AddArg2(v0, mem)
21881 return true
21882 }
21883 return false
21884 }
21885 func rewriteValuegeneric_OpStore(v *Value) bool {
21886 v_2 := v.Args[2]
21887 v_1 := v.Args[1]
21888 v_0 := v.Args[0]
21889 b := v.Block
21890 fe := b.Func.fe
21891
21892
21893
21894 for {
21895 t1 := auxToType(v.Aux)
21896 p1 := v_0
21897 if v_1.Op != OpLoad {
21898 break
21899 }
21900 t2 := v_1.Type
21901 mem := v_1.Args[1]
21902 p2 := v_1.Args[0]
21903 if mem != v_2 || !(isSamePtr(p1, p2) && t2.Size() == t1.Size()) {
21904 break
21905 }
21906 v.copyOf(mem)
21907 return true
21908 }
21909
21910
21911
21912 for {
21913 t1 := auxToType(v.Aux)
21914 p1 := v_0
21915 if v_1.Op != OpLoad {
21916 break
21917 }
21918 t2 := v_1.Type
21919 oldmem := v_1.Args[1]
21920 p2 := v_1.Args[0]
21921 mem := v_2
21922 if mem.Op != OpStore {
21923 break
21924 }
21925 t3 := auxToType(mem.Aux)
21926 _ = mem.Args[2]
21927 p3 := mem.Args[0]
21928 if oldmem != mem.Args[2] || !(isSamePtr(p1, p2) && t2.Size() == t1.Size() && disjoint(p1, t1.Size(), p3, t3.Size())) {
21929 break
21930 }
21931 v.copyOf(mem)
21932 return true
21933 }
21934
21935
21936
21937 for {
21938 t1 := auxToType(v.Aux)
21939 p1 := v_0
21940 if v_1.Op != OpLoad {
21941 break
21942 }
21943 t2 := v_1.Type
21944 oldmem := v_1.Args[1]
21945 p2 := v_1.Args[0]
21946 mem := v_2
21947 if mem.Op != OpStore {
21948 break
21949 }
21950 t3 := auxToType(mem.Aux)
21951 _ = mem.Args[2]
21952 p3 := mem.Args[0]
21953 mem_2 := mem.Args[2]
21954 if mem_2.Op != OpStore {
21955 break
21956 }
21957 t4 := auxToType(mem_2.Aux)
21958 _ = mem_2.Args[2]
21959 p4 := mem_2.Args[0]
21960 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())) {
21961 break
21962 }
21963 v.copyOf(mem)
21964 return true
21965 }
21966
21967
21968
21969 for {
21970 t1 := auxToType(v.Aux)
21971 p1 := v_0
21972 if v_1.Op != OpLoad {
21973 break
21974 }
21975 t2 := v_1.Type
21976 oldmem := v_1.Args[1]
21977 p2 := v_1.Args[0]
21978 mem := v_2
21979 if mem.Op != OpStore {
21980 break
21981 }
21982 t3 := auxToType(mem.Aux)
21983 _ = mem.Args[2]
21984 p3 := mem.Args[0]
21985 mem_2 := mem.Args[2]
21986 if mem_2.Op != OpStore {
21987 break
21988 }
21989 t4 := auxToType(mem_2.Aux)
21990 _ = mem_2.Args[2]
21991 p4 := mem_2.Args[0]
21992 mem_2_2 := mem_2.Args[2]
21993 if mem_2_2.Op != OpStore {
21994 break
21995 }
21996 t5 := auxToType(mem_2_2.Aux)
21997 _ = mem_2_2.Args[2]
21998 p5 := mem_2_2.Args[0]
21999 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())) {
22000 break
22001 }
22002 v.copyOf(mem)
22003 return true
22004 }
22005
22006
22007
22008 for {
22009 t := auxToType(v.Aux)
22010 if v_0.Op != OpOffPtr {
22011 break
22012 }
22013 o := auxIntToInt64(v_0.AuxInt)
22014 p1 := v_0.Args[0]
22015 x := v_1
22016 mem := v_2
22017 if mem.Op != OpZero {
22018 break
22019 }
22020 n := auxIntToInt64(mem.AuxInt)
22021 p2 := mem.Args[0]
22022 if !(isConstZero(x) && o >= 0 && t.Size()+o <= n && isSamePtr(p1, p2)) {
22023 break
22024 }
22025 v.copyOf(mem)
22026 return true
22027 }
22028
22029
22030
22031 for {
22032 t1 := auxToType(v.Aux)
22033 op := v_0
22034 if op.Op != OpOffPtr {
22035 break
22036 }
22037 o1 := auxIntToInt64(op.AuxInt)
22038 p1 := op.Args[0]
22039 x := v_1
22040 mem := v_2
22041 if mem.Op != OpStore {
22042 break
22043 }
22044 t2 := auxToType(mem.Aux)
22045 _ = mem.Args[2]
22046 p2 := mem.Args[0]
22047 mem_2 := mem.Args[2]
22048 if mem_2.Op != OpZero {
22049 break
22050 }
22051 n := auxIntToInt64(mem_2.AuxInt)
22052 p3 := mem_2.Args[0]
22053 if !(isConstZero(x) && o1 >= 0 && t1.Size()+o1 <= n && isSamePtr(p1, p3) && disjoint(op, t1.Size(), p2, t2.Size())) {
22054 break
22055 }
22056 v.copyOf(mem)
22057 return true
22058 }
22059
22060
22061
22062 for {
22063 t1 := auxToType(v.Aux)
22064 op := v_0
22065 if op.Op != OpOffPtr {
22066 break
22067 }
22068 o1 := auxIntToInt64(op.AuxInt)
22069 p1 := op.Args[0]
22070 x := v_1
22071 mem := v_2
22072 if mem.Op != OpStore {
22073 break
22074 }
22075 t2 := auxToType(mem.Aux)
22076 _ = mem.Args[2]
22077 p2 := mem.Args[0]
22078 mem_2 := mem.Args[2]
22079 if mem_2.Op != OpStore {
22080 break
22081 }
22082 t3 := auxToType(mem_2.Aux)
22083 _ = mem_2.Args[2]
22084 p3 := mem_2.Args[0]
22085 mem_2_2 := mem_2.Args[2]
22086 if mem_2_2.Op != OpZero {
22087 break
22088 }
22089 n := auxIntToInt64(mem_2_2.AuxInt)
22090 p4 := mem_2_2.Args[0]
22091 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())) {
22092 break
22093 }
22094 v.copyOf(mem)
22095 return true
22096 }
22097
22098
22099
22100 for {
22101 t1 := auxToType(v.Aux)
22102 op := v_0
22103 if op.Op != OpOffPtr {
22104 break
22105 }
22106 o1 := auxIntToInt64(op.AuxInt)
22107 p1 := op.Args[0]
22108 x := v_1
22109 mem := v_2
22110 if mem.Op != OpStore {
22111 break
22112 }
22113 t2 := auxToType(mem.Aux)
22114 _ = mem.Args[2]
22115 p2 := mem.Args[0]
22116 mem_2 := mem.Args[2]
22117 if mem_2.Op != OpStore {
22118 break
22119 }
22120 t3 := auxToType(mem_2.Aux)
22121 _ = mem_2.Args[2]
22122 p3 := mem_2.Args[0]
22123 mem_2_2 := mem_2.Args[2]
22124 if mem_2_2.Op != OpStore {
22125 break
22126 }
22127 t4 := auxToType(mem_2_2.Aux)
22128 _ = mem_2_2.Args[2]
22129 p4 := mem_2_2.Args[0]
22130 mem_2_2_2 := mem_2_2.Args[2]
22131 if mem_2_2_2.Op != OpZero {
22132 break
22133 }
22134 n := auxIntToInt64(mem_2_2_2.AuxInt)
22135 p5 := mem_2_2_2.Args[0]
22136 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())) {
22137 break
22138 }
22139 v.copyOf(mem)
22140 return true
22141 }
22142
22143
22144 for {
22145 if v_1.Op != OpStructMake0 {
22146 break
22147 }
22148 mem := v_2
22149 v.copyOf(mem)
22150 return true
22151 }
22152
22153
22154 for {
22155 dst := v_0
22156 if v_1.Op != OpStructMake1 {
22157 break
22158 }
22159 t := v_1.Type
22160 f0 := v_1.Args[0]
22161 mem := v_2
22162 v.reset(OpStore)
22163 v.Aux = typeToAux(t.FieldType(0))
22164 v0 := b.NewValue0(v.Pos, OpOffPtr, t.FieldType(0).PtrTo())
22165 v0.AuxInt = int64ToAuxInt(0)
22166 v0.AddArg(dst)
22167 v.AddArg3(v0, f0, mem)
22168 return true
22169 }
22170
22171
22172 for {
22173 dst := v_0
22174 if v_1.Op != OpStructMake2 {
22175 break
22176 }
22177 t := v_1.Type
22178 f1 := v_1.Args[1]
22179 f0 := v_1.Args[0]
22180 mem := v_2
22181 v.reset(OpStore)
22182 v.Aux = typeToAux(t.FieldType(1))
22183 v0 := b.NewValue0(v.Pos, OpOffPtr, t.FieldType(1).PtrTo())
22184 v0.AuxInt = int64ToAuxInt(t.FieldOff(1))
22185 v0.AddArg(dst)
22186 v1 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
22187 v1.Aux = typeToAux(t.FieldType(0))
22188 v2 := b.NewValue0(v.Pos, OpOffPtr, t.FieldType(0).PtrTo())
22189 v2.AuxInt = int64ToAuxInt(0)
22190 v2.AddArg(dst)
22191 v1.AddArg3(v2, f0, mem)
22192 v.AddArg3(v0, f1, v1)
22193 return true
22194 }
22195
22196
22197 for {
22198 dst := v_0
22199 if v_1.Op != OpStructMake3 {
22200 break
22201 }
22202 t := v_1.Type
22203 f2 := v_1.Args[2]
22204 f0 := v_1.Args[0]
22205 f1 := v_1.Args[1]
22206 mem := v_2
22207 v.reset(OpStore)
22208 v.Aux = typeToAux(t.FieldType(2))
22209 v0 := b.NewValue0(v.Pos, OpOffPtr, t.FieldType(2).PtrTo())
22210 v0.AuxInt = int64ToAuxInt(t.FieldOff(2))
22211 v0.AddArg(dst)
22212 v1 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
22213 v1.Aux = typeToAux(t.FieldType(1))
22214 v2 := b.NewValue0(v.Pos, OpOffPtr, t.FieldType(1).PtrTo())
22215 v2.AuxInt = int64ToAuxInt(t.FieldOff(1))
22216 v2.AddArg(dst)
22217 v3 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
22218 v3.Aux = typeToAux(t.FieldType(0))
22219 v4 := b.NewValue0(v.Pos, OpOffPtr, t.FieldType(0).PtrTo())
22220 v4.AuxInt = int64ToAuxInt(0)
22221 v4.AddArg(dst)
22222 v3.AddArg3(v4, f0, mem)
22223 v1.AddArg3(v2, f1, v3)
22224 v.AddArg3(v0, f2, v1)
22225 return true
22226 }
22227
22228
22229 for {
22230 dst := v_0
22231 if v_1.Op != OpStructMake4 {
22232 break
22233 }
22234 t := v_1.Type
22235 f3 := v_1.Args[3]
22236 f0 := v_1.Args[0]
22237 f1 := v_1.Args[1]
22238 f2 := v_1.Args[2]
22239 mem := v_2
22240 v.reset(OpStore)
22241 v.Aux = typeToAux(t.FieldType(3))
22242 v0 := b.NewValue0(v.Pos, OpOffPtr, t.FieldType(3).PtrTo())
22243 v0.AuxInt = int64ToAuxInt(t.FieldOff(3))
22244 v0.AddArg(dst)
22245 v1 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
22246 v1.Aux = typeToAux(t.FieldType(2))
22247 v2 := b.NewValue0(v.Pos, OpOffPtr, t.FieldType(2).PtrTo())
22248 v2.AuxInt = int64ToAuxInt(t.FieldOff(2))
22249 v2.AddArg(dst)
22250 v3 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
22251 v3.Aux = typeToAux(t.FieldType(1))
22252 v4 := b.NewValue0(v.Pos, OpOffPtr, t.FieldType(1).PtrTo())
22253 v4.AuxInt = int64ToAuxInt(t.FieldOff(1))
22254 v4.AddArg(dst)
22255 v5 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
22256 v5.Aux = typeToAux(t.FieldType(0))
22257 v6 := b.NewValue0(v.Pos, OpOffPtr, t.FieldType(0).PtrTo())
22258 v6.AuxInt = int64ToAuxInt(0)
22259 v6.AddArg(dst)
22260 v5.AddArg3(v6, f0, mem)
22261 v3.AddArg3(v4, f1, v5)
22262 v1.AddArg3(v2, f2, v3)
22263 v.AddArg3(v0, f3, v1)
22264 return true
22265 }
22266
22267
22268
22269 for {
22270 t := auxToType(v.Aux)
22271 dst := v_0
22272 if v_1.Op != OpLoad {
22273 break
22274 }
22275 mem := v_1.Args[1]
22276 src := v_1.Args[0]
22277 if mem != v_2 || !(!fe.CanSSA(t)) {
22278 break
22279 }
22280 v.reset(OpMove)
22281 v.AuxInt = int64ToAuxInt(t.Size())
22282 v.Aux = typeToAux(t)
22283 v.AddArg3(dst, src, mem)
22284 return true
22285 }
22286
22287
22288
22289 for {
22290 t := auxToType(v.Aux)
22291 dst := v_0
22292 if v_1.Op != OpLoad {
22293 break
22294 }
22295 mem := v_1.Args[1]
22296 src := v_1.Args[0]
22297 if v_2.Op != OpVarDef {
22298 break
22299 }
22300 x := auxToSym(v_2.Aux)
22301 if mem != v_2.Args[0] || !(!fe.CanSSA(t)) {
22302 break
22303 }
22304 v.reset(OpMove)
22305 v.AuxInt = int64ToAuxInt(t.Size())
22306 v.Aux = typeToAux(t)
22307 v0 := b.NewValue0(v.Pos, OpVarDef, types.TypeMem)
22308 v0.Aux = symToAux(x)
22309 v0.AddArg(mem)
22310 v.AddArg3(dst, src, v0)
22311 return true
22312 }
22313
22314
22315 for {
22316 if v_1.Op != OpArrayMake0 {
22317 break
22318 }
22319 mem := v_2
22320 v.copyOf(mem)
22321 return true
22322 }
22323
22324
22325 for {
22326 dst := v_0
22327 if v_1.Op != OpArrayMake1 {
22328 break
22329 }
22330 e := v_1.Args[0]
22331 mem := v_2
22332 v.reset(OpStore)
22333 v.Aux = typeToAux(e.Type)
22334 v.AddArg3(dst, e, mem)
22335 return true
22336 }
22337
22338
22339
22340 for {
22341 if v_0.Op != OpSelectN || auxIntToInt64(v_0.AuxInt) != 0 {
22342 break
22343 }
22344 call := v_0.Args[0]
22345 if call.Op != OpStaticLECall || len(call.Args) != 2 {
22346 break
22347 }
22348 x := v_1
22349 mem := v_2
22350 if mem.Op != OpSelectN || auxIntToInt64(mem.AuxInt) != 1 || call != mem.Args[0] || !(isConstZero(x) && isSameCall(call.Aux, "runtime.newobject")) {
22351 break
22352 }
22353 v.copyOf(mem)
22354 return true
22355 }
22356
22357
22358
22359 for {
22360 if v_0.Op != OpOffPtr {
22361 break
22362 }
22363 v_0_0 := v_0.Args[0]
22364 if v_0_0.Op != OpSelectN || auxIntToInt64(v_0_0.AuxInt) != 0 {
22365 break
22366 }
22367 call := v_0_0.Args[0]
22368 if call.Op != OpStaticLECall || len(call.Args) != 2 {
22369 break
22370 }
22371 x := v_1
22372 mem := v_2
22373 if mem.Op != OpSelectN || auxIntToInt64(mem.AuxInt) != 1 || call != mem.Args[0] || !(isConstZero(x) && isSameCall(call.Aux, "runtime.newobject")) {
22374 break
22375 }
22376 v.copyOf(mem)
22377 return true
22378 }
22379
22380
22381
22382 for {
22383 t1 := auxToType(v.Aux)
22384 op1 := v_0
22385 if op1.Op != OpOffPtr {
22386 break
22387 }
22388 o1 := auxIntToInt64(op1.AuxInt)
22389 p1 := op1.Args[0]
22390 d1 := v_1
22391 m2 := v_2
22392 if m2.Op != OpStore {
22393 break
22394 }
22395 t2 := auxToType(m2.Aux)
22396 _ = m2.Args[2]
22397 op2 := m2.Args[0]
22398 if op2.Op != OpOffPtr || auxIntToInt64(op2.AuxInt) != 0 {
22399 break
22400 }
22401 p2 := op2.Args[0]
22402 d2 := m2.Args[1]
22403 m3 := m2.Args[2]
22404 if m3.Op != OpMove {
22405 break
22406 }
22407 n := auxIntToInt64(m3.AuxInt)
22408 mem := m3.Args[2]
22409 p3 := m3.Args[0]
22410 if !(m2.Uses == 1 && m3.Uses == 1 && o1 == t2.Size() && n == t2.Size()+t1.Size() && isSamePtr(p1, p2) && isSamePtr(p2, p3) && clobber(m2, m3)) {
22411 break
22412 }
22413 v.reset(OpStore)
22414 v.Aux = typeToAux(t1)
22415 v0 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
22416 v0.Aux = typeToAux(t2)
22417 v0.AddArg3(op2, d2, mem)
22418 v.AddArg3(op1, d1, v0)
22419 return true
22420 }
22421
22422
22423
22424 for {
22425 t1 := auxToType(v.Aux)
22426 op1 := v_0
22427 if op1.Op != OpOffPtr {
22428 break
22429 }
22430 o1 := auxIntToInt64(op1.AuxInt)
22431 p1 := op1.Args[0]
22432 d1 := v_1
22433 m2 := v_2
22434 if m2.Op != OpStore {
22435 break
22436 }
22437 t2 := auxToType(m2.Aux)
22438 _ = m2.Args[2]
22439 op2 := m2.Args[0]
22440 if op2.Op != OpOffPtr {
22441 break
22442 }
22443 o2 := auxIntToInt64(op2.AuxInt)
22444 p2 := op2.Args[0]
22445 d2 := m2.Args[1]
22446 m3 := m2.Args[2]
22447 if m3.Op != OpStore {
22448 break
22449 }
22450 t3 := auxToType(m3.Aux)
22451 _ = m3.Args[2]
22452 op3 := m3.Args[0]
22453 if op3.Op != OpOffPtr || auxIntToInt64(op3.AuxInt) != 0 {
22454 break
22455 }
22456 p3 := op3.Args[0]
22457 d3 := m3.Args[1]
22458 m4 := m3.Args[2]
22459 if m4.Op != OpMove {
22460 break
22461 }
22462 n := auxIntToInt64(m4.AuxInt)
22463 mem := m4.Args[2]
22464 p4 := m4.Args[0]
22465 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)) {
22466 break
22467 }
22468 v.reset(OpStore)
22469 v.Aux = typeToAux(t1)
22470 v0 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
22471 v0.Aux = typeToAux(t2)
22472 v1 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
22473 v1.Aux = typeToAux(t3)
22474 v1.AddArg3(op3, d3, mem)
22475 v0.AddArg3(op2, d2, v1)
22476 v.AddArg3(op1, d1, v0)
22477 return true
22478 }
22479
22480
22481
22482 for {
22483 t1 := auxToType(v.Aux)
22484 op1 := v_0
22485 if op1.Op != OpOffPtr {
22486 break
22487 }
22488 o1 := auxIntToInt64(op1.AuxInt)
22489 p1 := op1.Args[0]
22490 d1 := v_1
22491 m2 := v_2
22492 if m2.Op != OpStore {
22493 break
22494 }
22495 t2 := auxToType(m2.Aux)
22496 _ = m2.Args[2]
22497 op2 := m2.Args[0]
22498 if op2.Op != OpOffPtr {
22499 break
22500 }
22501 o2 := auxIntToInt64(op2.AuxInt)
22502 p2 := op2.Args[0]
22503 d2 := m2.Args[1]
22504 m3 := m2.Args[2]
22505 if m3.Op != OpStore {
22506 break
22507 }
22508 t3 := auxToType(m3.Aux)
22509 _ = m3.Args[2]
22510 op3 := m3.Args[0]
22511 if op3.Op != OpOffPtr {
22512 break
22513 }
22514 o3 := auxIntToInt64(op3.AuxInt)
22515 p3 := op3.Args[0]
22516 d3 := m3.Args[1]
22517 m4 := m3.Args[2]
22518 if m4.Op != OpStore {
22519 break
22520 }
22521 t4 := auxToType(m4.Aux)
22522 _ = m4.Args[2]
22523 op4 := m4.Args[0]
22524 if op4.Op != OpOffPtr || auxIntToInt64(op4.AuxInt) != 0 {
22525 break
22526 }
22527 p4 := op4.Args[0]
22528 d4 := m4.Args[1]
22529 m5 := m4.Args[2]
22530 if m5.Op != OpMove {
22531 break
22532 }
22533 n := auxIntToInt64(m5.AuxInt)
22534 mem := m5.Args[2]
22535 p5 := m5.Args[0]
22536 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)) {
22537 break
22538 }
22539 v.reset(OpStore)
22540 v.Aux = typeToAux(t1)
22541 v0 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
22542 v0.Aux = typeToAux(t2)
22543 v1 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
22544 v1.Aux = typeToAux(t3)
22545 v2 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
22546 v2.Aux = typeToAux(t4)
22547 v2.AddArg3(op4, d4, mem)
22548 v1.AddArg3(op3, d3, v2)
22549 v0.AddArg3(op2, d2, v1)
22550 v.AddArg3(op1, d1, v0)
22551 return true
22552 }
22553
22554
22555
22556 for {
22557 t1 := auxToType(v.Aux)
22558 op1 := v_0
22559 if op1.Op != OpOffPtr {
22560 break
22561 }
22562 o1 := auxIntToInt64(op1.AuxInt)
22563 p1 := op1.Args[0]
22564 d1 := v_1
22565 m2 := v_2
22566 if m2.Op != OpStore {
22567 break
22568 }
22569 t2 := auxToType(m2.Aux)
22570 _ = m2.Args[2]
22571 op2 := m2.Args[0]
22572 if op2.Op != OpOffPtr || auxIntToInt64(op2.AuxInt) != 0 {
22573 break
22574 }
22575 p2 := op2.Args[0]
22576 d2 := m2.Args[1]
22577 m3 := m2.Args[2]
22578 if m3.Op != OpZero {
22579 break
22580 }
22581 n := auxIntToInt64(m3.AuxInt)
22582 mem := m3.Args[1]
22583 p3 := m3.Args[0]
22584 if !(m2.Uses == 1 && m3.Uses == 1 && o1 == t2.Size() && n == t2.Size()+t1.Size() && isSamePtr(p1, p2) && isSamePtr(p2, p3) && clobber(m2, m3)) {
22585 break
22586 }
22587 v.reset(OpStore)
22588 v.Aux = typeToAux(t1)
22589 v0 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
22590 v0.Aux = typeToAux(t2)
22591 v0.AddArg3(op2, d2, mem)
22592 v.AddArg3(op1, d1, v0)
22593 return true
22594 }
22595
22596
22597
22598 for {
22599 t1 := auxToType(v.Aux)
22600 op1 := v_0
22601 if op1.Op != OpOffPtr {
22602 break
22603 }
22604 o1 := auxIntToInt64(op1.AuxInt)
22605 p1 := op1.Args[0]
22606 d1 := v_1
22607 m2 := v_2
22608 if m2.Op != OpStore {
22609 break
22610 }
22611 t2 := auxToType(m2.Aux)
22612 _ = m2.Args[2]
22613 op2 := m2.Args[0]
22614 if op2.Op != OpOffPtr {
22615 break
22616 }
22617 o2 := auxIntToInt64(op2.AuxInt)
22618 p2 := op2.Args[0]
22619 d2 := m2.Args[1]
22620 m3 := m2.Args[2]
22621 if m3.Op != OpStore {
22622 break
22623 }
22624 t3 := auxToType(m3.Aux)
22625 _ = m3.Args[2]
22626 op3 := m3.Args[0]
22627 if op3.Op != OpOffPtr || auxIntToInt64(op3.AuxInt) != 0 {
22628 break
22629 }
22630 p3 := op3.Args[0]
22631 d3 := m3.Args[1]
22632 m4 := m3.Args[2]
22633 if m4.Op != OpZero {
22634 break
22635 }
22636 n := auxIntToInt64(m4.AuxInt)
22637 mem := m4.Args[1]
22638 p4 := m4.Args[0]
22639 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)) {
22640 break
22641 }
22642 v.reset(OpStore)
22643 v.Aux = typeToAux(t1)
22644 v0 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
22645 v0.Aux = typeToAux(t2)
22646 v1 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
22647 v1.Aux = typeToAux(t3)
22648 v1.AddArg3(op3, d3, mem)
22649 v0.AddArg3(op2, d2, v1)
22650 v.AddArg3(op1, d1, v0)
22651 return true
22652 }
22653
22654
22655
22656 for {
22657 t1 := auxToType(v.Aux)
22658 op1 := v_0
22659 if op1.Op != OpOffPtr {
22660 break
22661 }
22662 o1 := auxIntToInt64(op1.AuxInt)
22663 p1 := op1.Args[0]
22664 d1 := v_1
22665 m2 := v_2
22666 if m2.Op != OpStore {
22667 break
22668 }
22669 t2 := auxToType(m2.Aux)
22670 _ = m2.Args[2]
22671 op2 := m2.Args[0]
22672 if op2.Op != OpOffPtr {
22673 break
22674 }
22675 o2 := auxIntToInt64(op2.AuxInt)
22676 p2 := op2.Args[0]
22677 d2 := m2.Args[1]
22678 m3 := m2.Args[2]
22679 if m3.Op != OpStore {
22680 break
22681 }
22682 t3 := auxToType(m3.Aux)
22683 _ = m3.Args[2]
22684 op3 := m3.Args[0]
22685 if op3.Op != OpOffPtr {
22686 break
22687 }
22688 o3 := auxIntToInt64(op3.AuxInt)
22689 p3 := op3.Args[0]
22690 d3 := m3.Args[1]
22691 m4 := m3.Args[2]
22692 if m4.Op != OpStore {
22693 break
22694 }
22695 t4 := auxToType(m4.Aux)
22696 _ = m4.Args[2]
22697 op4 := m4.Args[0]
22698 if op4.Op != OpOffPtr || auxIntToInt64(op4.AuxInt) != 0 {
22699 break
22700 }
22701 p4 := op4.Args[0]
22702 d4 := m4.Args[1]
22703 m5 := m4.Args[2]
22704 if m5.Op != OpZero {
22705 break
22706 }
22707 n := auxIntToInt64(m5.AuxInt)
22708 mem := m5.Args[1]
22709 p5 := m5.Args[0]
22710 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)) {
22711 break
22712 }
22713 v.reset(OpStore)
22714 v.Aux = typeToAux(t1)
22715 v0 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
22716 v0.Aux = typeToAux(t2)
22717 v1 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
22718 v1.Aux = typeToAux(t3)
22719 v2 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
22720 v2.Aux = typeToAux(t4)
22721 v2.AddArg3(op4, d4, mem)
22722 v1.AddArg3(op3, d3, v2)
22723 v0.AddArg3(op2, d2, v1)
22724 v.AddArg3(op1, d1, v0)
22725 return true
22726 }
22727 return false
22728 }
22729 func rewriteValuegeneric_OpStringLen(v *Value) bool {
22730 v_0 := v.Args[0]
22731
22732
22733 for {
22734 if v_0.Op != OpStringMake {
22735 break
22736 }
22737 _ = v_0.Args[1]
22738 v_0_1 := v_0.Args[1]
22739 if v_0_1.Op != OpConst64 {
22740 break
22741 }
22742 t := v_0_1.Type
22743 c := auxIntToInt64(v_0_1.AuxInt)
22744 v.reset(OpConst64)
22745 v.Type = t
22746 v.AuxInt = int64ToAuxInt(c)
22747 return true
22748 }
22749 return false
22750 }
22751 func rewriteValuegeneric_OpStringPtr(v *Value) bool {
22752 v_0 := v.Args[0]
22753
22754
22755 for {
22756 if v_0.Op != OpStringMake {
22757 break
22758 }
22759 v_0_0 := v_0.Args[0]
22760 if v_0_0.Op != OpAddr {
22761 break
22762 }
22763 t := v_0_0.Type
22764 s := auxToSym(v_0_0.Aux)
22765 base := v_0_0.Args[0]
22766 v.reset(OpAddr)
22767 v.Type = t
22768 v.Aux = symToAux(s)
22769 v.AddArg(base)
22770 return true
22771 }
22772 return false
22773 }
22774 func rewriteValuegeneric_OpStructSelect(v *Value) bool {
22775 v_0 := v.Args[0]
22776 b := v.Block
22777 fe := b.Func.fe
22778
22779
22780 for {
22781 if v_0.Op != OpStructMake1 {
22782 break
22783 }
22784 x := v_0.Args[0]
22785 v.copyOf(x)
22786 return true
22787 }
22788
22789
22790 for {
22791 if auxIntToInt64(v.AuxInt) != 0 || v_0.Op != OpStructMake2 {
22792 break
22793 }
22794 x := v_0.Args[0]
22795 v.copyOf(x)
22796 return true
22797 }
22798
22799
22800 for {
22801 if auxIntToInt64(v.AuxInt) != 1 || v_0.Op != OpStructMake2 {
22802 break
22803 }
22804 x := v_0.Args[1]
22805 v.copyOf(x)
22806 return true
22807 }
22808
22809
22810 for {
22811 if auxIntToInt64(v.AuxInt) != 0 || v_0.Op != OpStructMake3 {
22812 break
22813 }
22814 x := v_0.Args[0]
22815 v.copyOf(x)
22816 return true
22817 }
22818
22819
22820 for {
22821 if auxIntToInt64(v.AuxInt) != 1 || v_0.Op != OpStructMake3 {
22822 break
22823 }
22824 x := v_0.Args[1]
22825 v.copyOf(x)
22826 return true
22827 }
22828
22829
22830 for {
22831 if auxIntToInt64(v.AuxInt) != 2 || v_0.Op != OpStructMake3 {
22832 break
22833 }
22834 x := v_0.Args[2]
22835 v.copyOf(x)
22836 return true
22837 }
22838
22839
22840 for {
22841 if auxIntToInt64(v.AuxInt) != 0 || v_0.Op != OpStructMake4 {
22842 break
22843 }
22844 x := v_0.Args[0]
22845 v.copyOf(x)
22846 return true
22847 }
22848
22849
22850 for {
22851 if auxIntToInt64(v.AuxInt) != 1 || v_0.Op != OpStructMake4 {
22852 break
22853 }
22854 x := v_0.Args[1]
22855 v.copyOf(x)
22856 return true
22857 }
22858
22859
22860 for {
22861 if auxIntToInt64(v.AuxInt) != 2 || v_0.Op != OpStructMake4 {
22862 break
22863 }
22864 x := v_0.Args[2]
22865 v.copyOf(x)
22866 return true
22867 }
22868
22869
22870 for {
22871 if auxIntToInt64(v.AuxInt) != 3 || v_0.Op != OpStructMake4 {
22872 break
22873 }
22874 x := v_0.Args[3]
22875 v.copyOf(x)
22876 return true
22877 }
22878
22879
22880
22881 for {
22882 i := auxIntToInt64(v.AuxInt)
22883 x := v_0
22884 if x.Op != OpLoad {
22885 break
22886 }
22887 t := x.Type
22888 mem := x.Args[1]
22889 ptr := x.Args[0]
22890 if !(!fe.CanSSA(t)) {
22891 break
22892 }
22893 b = x.Block
22894 v0 := b.NewValue0(v.Pos, OpLoad, v.Type)
22895 v.copyOf(v0)
22896 v1 := b.NewValue0(v.Pos, OpOffPtr, v.Type.PtrTo())
22897 v1.AuxInt = int64ToAuxInt(t.FieldOff(int(i)))
22898 v1.AddArg(ptr)
22899 v0.AddArg2(v1, mem)
22900 return true
22901 }
22902
22903
22904 for {
22905 if auxIntToInt64(v.AuxInt) != 0 || v_0.Op != OpIData {
22906 break
22907 }
22908 x := v_0.Args[0]
22909 v.reset(OpIData)
22910 v.AddArg(x)
22911 return true
22912 }
22913 return false
22914 }
22915 func rewriteValuegeneric_OpSub16(v *Value) bool {
22916 v_1 := v.Args[1]
22917 v_0 := v.Args[0]
22918 b := v.Block
22919
22920
22921 for {
22922 if v_0.Op != OpConst16 {
22923 break
22924 }
22925 c := auxIntToInt16(v_0.AuxInt)
22926 if v_1.Op != OpConst16 {
22927 break
22928 }
22929 d := auxIntToInt16(v_1.AuxInt)
22930 v.reset(OpConst16)
22931 v.AuxInt = int16ToAuxInt(c - d)
22932 return true
22933 }
22934
22935
22936
22937 for {
22938 x := v_0
22939 if v_1.Op != OpConst16 {
22940 break
22941 }
22942 t := v_1.Type
22943 c := auxIntToInt16(v_1.AuxInt)
22944 if !(x.Op != OpConst16) {
22945 break
22946 }
22947 v.reset(OpAdd16)
22948 v0 := b.NewValue0(v.Pos, OpConst16, t)
22949 v0.AuxInt = int16ToAuxInt(-c)
22950 v.AddArg2(v0, x)
22951 return true
22952 }
22953
22954
22955 for {
22956 t := v.Type
22957 if v_0.Op != OpMul16 {
22958 break
22959 }
22960 _ = v_0.Args[1]
22961 v_0_0 := v_0.Args[0]
22962 v_0_1 := v_0.Args[1]
22963 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
22964 x := v_0_0
22965 y := v_0_1
22966 if v_1.Op != OpMul16 {
22967 continue
22968 }
22969 _ = v_1.Args[1]
22970 v_1_0 := v_1.Args[0]
22971 v_1_1 := v_1.Args[1]
22972 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
22973 if x != v_1_0 {
22974 continue
22975 }
22976 z := v_1_1
22977 v.reset(OpMul16)
22978 v0 := b.NewValue0(v.Pos, OpSub16, t)
22979 v0.AddArg2(y, z)
22980 v.AddArg2(x, v0)
22981 return true
22982 }
22983 }
22984 break
22985 }
22986
22987
22988 for {
22989 x := v_0
22990 if x != v_1 {
22991 break
22992 }
22993 v.reset(OpConst16)
22994 v.AuxInt = int16ToAuxInt(0)
22995 return true
22996 }
22997
22998
22999 for {
23000 if v_0.Op != OpAdd16 {
23001 break
23002 }
23003 _ = v_0.Args[1]
23004 v_0_0 := v_0.Args[0]
23005 v_0_1 := v_0.Args[1]
23006 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
23007 x := v_0_0
23008 y := v_0_1
23009 if x != v_1 {
23010 continue
23011 }
23012 v.copyOf(y)
23013 return true
23014 }
23015 break
23016 }
23017
23018
23019 for {
23020 if v_0.Op != OpAdd16 {
23021 break
23022 }
23023 _ = v_0.Args[1]
23024 v_0_0 := v_0.Args[0]
23025 v_0_1 := v_0.Args[1]
23026 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
23027 x := v_0_0
23028 y := v_0_1
23029 if y != v_1 {
23030 continue
23031 }
23032 v.copyOf(x)
23033 return true
23034 }
23035 break
23036 }
23037
23038
23039 for {
23040 if v_0.Op != OpSub16 {
23041 break
23042 }
23043 y := v_0.Args[1]
23044 x := v_0.Args[0]
23045 if x != v_1 {
23046 break
23047 }
23048 v.reset(OpNeg16)
23049 v.AddArg(y)
23050 return true
23051 }
23052
23053
23054 for {
23055 x := v_0
23056 if v_1.Op != OpAdd16 {
23057 break
23058 }
23059 _ = v_1.Args[1]
23060 v_1_0 := v_1.Args[0]
23061 v_1_1 := v_1.Args[1]
23062 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
23063 if x != v_1_0 {
23064 continue
23065 }
23066 y := v_1_1
23067 v.reset(OpNeg16)
23068 v.AddArg(y)
23069 return true
23070 }
23071 break
23072 }
23073
23074
23075
23076 for {
23077 x := v_0
23078 if v_1.Op != OpSub16 {
23079 break
23080 }
23081 z := v_1.Args[1]
23082 i := v_1.Args[0]
23083 if i.Op != OpConst16 {
23084 break
23085 }
23086 t := i.Type
23087 if !(z.Op != OpConst16 && x.Op != OpConst16) {
23088 break
23089 }
23090 v.reset(OpSub16)
23091 v0 := b.NewValue0(v.Pos, OpAdd16, t)
23092 v0.AddArg2(x, z)
23093 v.AddArg2(v0, i)
23094 return true
23095 }
23096
23097
23098
23099 for {
23100 x := v_0
23101 if v_1.Op != OpAdd16 {
23102 break
23103 }
23104 _ = v_1.Args[1]
23105 v_1_0 := v_1.Args[0]
23106 v_1_1 := v_1.Args[1]
23107 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
23108 z := v_1_0
23109 i := v_1_1
23110 if i.Op != OpConst16 {
23111 continue
23112 }
23113 t := i.Type
23114 if !(z.Op != OpConst16 && x.Op != OpConst16) {
23115 continue
23116 }
23117 v.reset(OpSub16)
23118 v0 := b.NewValue0(v.Pos, OpSub16, t)
23119 v0.AddArg2(x, z)
23120 v.AddArg2(v0, i)
23121 return true
23122 }
23123 break
23124 }
23125
23126
23127
23128 for {
23129 if v_0.Op != OpSub16 {
23130 break
23131 }
23132 z := v_0.Args[1]
23133 i := v_0.Args[0]
23134 if i.Op != OpConst16 {
23135 break
23136 }
23137 t := i.Type
23138 x := v_1
23139 if !(z.Op != OpConst16 && x.Op != OpConst16) {
23140 break
23141 }
23142 v.reset(OpSub16)
23143 v0 := b.NewValue0(v.Pos, OpAdd16, t)
23144 v0.AddArg2(z, x)
23145 v.AddArg2(i, v0)
23146 return true
23147 }
23148
23149
23150
23151 for {
23152 if v_0.Op != OpAdd16 {
23153 break
23154 }
23155 _ = v_0.Args[1]
23156 v_0_0 := v_0.Args[0]
23157 v_0_1 := v_0.Args[1]
23158 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
23159 z := v_0_0
23160 i := v_0_1
23161 if i.Op != OpConst16 {
23162 continue
23163 }
23164 t := i.Type
23165 x := v_1
23166 if !(z.Op != OpConst16 && x.Op != OpConst16) {
23167 continue
23168 }
23169 v.reset(OpAdd16)
23170 v0 := b.NewValue0(v.Pos, OpSub16, t)
23171 v0.AddArg2(z, x)
23172 v.AddArg2(i, v0)
23173 return true
23174 }
23175 break
23176 }
23177
23178
23179 for {
23180 if v_0.Op != OpConst16 {
23181 break
23182 }
23183 t := v_0.Type
23184 c := auxIntToInt16(v_0.AuxInt)
23185 if v_1.Op != OpSub16 {
23186 break
23187 }
23188 x := v_1.Args[1]
23189 v_1_0 := v_1.Args[0]
23190 if v_1_0.Op != OpConst16 || v_1_0.Type != t {
23191 break
23192 }
23193 d := auxIntToInt16(v_1_0.AuxInt)
23194 v.reset(OpAdd16)
23195 v0 := b.NewValue0(v.Pos, OpConst16, t)
23196 v0.AuxInt = int16ToAuxInt(c - d)
23197 v.AddArg2(v0, x)
23198 return true
23199 }
23200
23201
23202 for {
23203 if v_0.Op != OpConst16 {
23204 break
23205 }
23206 t := v_0.Type
23207 c := auxIntToInt16(v_0.AuxInt)
23208 if v_1.Op != OpAdd16 {
23209 break
23210 }
23211 _ = v_1.Args[1]
23212 v_1_0 := v_1.Args[0]
23213 v_1_1 := v_1.Args[1]
23214 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
23215 if v_1_0.Op != OpConst16 || v_1_0.Type != t {
23216 continue
23217 }
23218 d := auxIntToInt16(v_1_0.AuxInt)
23219 x := v_1_1
23220 v.reset(OpSub16)
23221 v0 := b.NewValue0(v.Pos, OpConst16, t)
23222 v0.AuxInt = int16ToAuxInt(c - d)
23223 v.AddArg2(v0, x)
23224 return true
23225 }
23226 break
23227 }
23228 return false
23229 }
23230 func rewriteValuegeneric_OpSub32(v *Value) bool {
23231 v_1 := v.Args[1]
23232 v_0 := v.Args[0]
23233 b := v.Block
23234
23235
23236 for {
23237 if v_0.Op != OpConst32 {
23238 break
23239 }
23240 c := auxIntToInt32(v_0.AuxInt)
23241 if v_1.Op != OpConst32 {
23242 break
23243 }
23244 d := auxIntToInt32(v_1.AuxInt)
23245 v.reset(OpConst32)
23246 v.AuxInt = int32ToAuxInt(c - d)
23247 return true
23248 }
23249
23250
23251
23252 for {
23253 x := v_0
23254 if v_1.Op != OpConst32 {
23255 break
23256 }
23257 t := v_1.Type
23258 c := auxIntToInt32(v_1.AuxInt)
23259 if !(x.Op != OpConst32) {
23260 break
23261 }
23262 v.reset(OpAdd32)
23263 v0 := b.NewValue0(v.Pos, OpConst32, t)
23264 v0.AuxInt = int32ToAuxInt(-c)
23265 v.AddArg2(v0, x)
23266 return true
23267 }
23268
23269
23270 for {
23271 t := v.Type
23272 if v_0.Op != OpMul32 {
23273 break
23274 }
23275 _ = v_0.Args[1]
23276 v_0_0 := v_0.Args[0]
23277 v_0_1 := v_0.Args[1]
23278 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
23279 x := v_0_0
23280 y := v_0_1
23281 if v_1.Op != OpMul32 {
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 x != v_1_0 {
23289 continue
23290 }
23291 z := v_1_1
23292 v.reset(OpMul32)
23293 v0 := b.NewValue0(v.Pos, OpSub32, t)
23294 v0.AddArg2(y, z)
23295 v.AddArg2(x, v0)
23296 return true
23297 }
23298 }
23299 break
23300 }
23301
23302
23303 for {
23304 x := v_0
23305 if x != v_1 {
23306 break
23307 }
23308 v.reset(OpConst32)
23309 v.AuxInt = int32ToAuxInt(0)
23310 return true
23311 }
23312
23313
23314 for {
23315 if v_0.Op != OpAdd32 {
23316 break
23317 }
23318 _ = v_0.Args[1]
23319 v_0_0 := v_0.Args[0]
23320 v_0_1 := v_0.Args[1]
23321 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
23322 x := v_0_0
23323 y := v_0_1
23324 if x != v_1 {
23325 continue
23326 }
23327 v.copyOf(y)
23328 return true
23329 }
23330 break
23331 }
23332
23333
23334 for {
23335 if v_0.Op != OpAdd32 {
23336 break
23337 }
23338 _ = v_0.Args[1]
23339 v_0_0 := v_0.Args[0]
23340 v_0_1 := v_0.Args[1]
23341 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
23342 x := v_0_0
23343 y := v_0_1
23344 if y != v_1 {
23345 continue
23346 }
23347 v.copyOf(x)
23348 return true
23349 }
23350 break
23351 }
23352
23353
23354 for {
23355 if v_0.Op != OpSub32 {
23356 break
23357 }
23358 y := v_0.Args[1]
23359 x := v_0.Args[0]
23360 if x != v_1 {
23361 break
23362 }
23363 v.reset(OpNeg32)
23364 v.AddArg(y)
23365 return true
23366 }
23367
23368
23369 for {
23370 x := v_0
23371 if v_1.Op != OpAdd32 {
23372 break
23373 }
23374 _ = v_1.Args[1]
23375 v_1_0 := v_1.Args[0]
23376 v_1_1 := v_1.Args[1]
23377 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
23378 if x != v_1_0 {
23379 continue
23380 }
23381 y := v_1_1
23382 v.reset(OpNeg32)
23383 v.AddArg(y)
23384 return true
23385 }
23386 break
23387 }
23388
23389
23390
23391 for {
23392 x := v_0
23393 if v_1.Op != OpSub32 {
23394 break
23395 }
23396 z := v_1.Args[1]
23397 i := v_1.Args[0]
23398 if i.Op != OpConst32 {
23399 break
23400 }
23401 t := i.Type
23402 if !(z.Op != OpConst32 && x.Op != OpConst32) {
23403 break
23404 }
23405 v.reset(OpSub32)
23406 v0 := b.NewValue0(v.Pos, OpAdd32, t)
23407 v0.AddArg2(x, z)
23408 v.AddArg2(v0, i)
23409 return true
23410 }
23411
23412
23413
23414 for {
23415 x := v_0
23416 if v_1.Op != OpAdd32 {
23417 break
23418 }
23419 _ = v_1.Args[1]
23420 v_1_0 := v_1.Args[0]
23421 v_1_1 := v_1.Args[1]
23422 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
23423 z := v_1_0
23424 i := v_1_1
23425 if i.Op != OpConst32 {
23426 continue
23427 }
23428 t := i.Type
23429 if !(z.Op != OpConst32 && x.Op != OpConst32) {
23430 continue
23431 }
23432 v.reset(OpSub32)
23433 v0 := b.NewValue0(v.Pos, OpSub32, t)
23434 v0.AddArg2(x, z)
23435 v.AddArg2(v0, i)
23436 return true
23437 }
23438 break
23439 }
23440
23441
23442
23443 for {
23444 if v_0.Op != OpSub32 {
23445 break
23446 }
23447 z := v_0.Args[1]
23448 i := v_0.Args[0]
23449 if i.Op != OpConst32 {
23450 break
23451 }
23452 t := i.Type
23453 x := v_1
23454 if !(z.Op != OpConst32 && x.Op != OpConst32) {
23455 break
23456 }
23457 v.reset(OpSub32)
23458 v0 := b.NewValue0(v.Pos, OpAdd32, t)
23459 v0.AddArg2(z, x)
23460 v.AddArg2(i, v0)
23461 return true
23462 }
23463
23464
23465
23466 for {
23467 if v_0.Op != OpAdd32 {
23468 break
23469 }
23470 _ = v_0.Args[1]
23471 v_0_0 := v_0.Args[0]
23472 v_0_1 := v_0.Args[1]
23473 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
23474 z := v_0_0
23475 i := v_0_1
23476 if i.Op != OpConst32 {
23477 continue
23478 }
23479 t := i.Type
23480 x := v_1
23481 if !(z.Op != OpConst32 && x.Op != OpConst32) {
23482 continue
23483 }
23484 v.reset(OpAdd32)
23485 v0 := b.NewValue0(v.Pos, OpSub32, t)
23486 v0.AddArg2(z, x)
23487 v.AddArg2(i, v0)
23488 return true
23489 }
23490 break
23491 }
23492
23493
23494 for {
23495 if v_0.Op != OpConst32 {
23496 break
23497 }
23498 t := v_0.Type
23499 c := auxIntToInt32(v_0.AuxInt)
23500 if v_1.Op != OpSub32 {
23501 break
23502 }
23503 x := v_1.Args[1]
23504 v_1_0 := v_1.Args[0]
23505 if v_1_0.Op != OpConst32 || v_1_0.Type != t {
23506 break
23507 }
23508 d := auxIntToInt32(v_1_0.AuxInt)
23509 v.reset(OpAdd32)
23510 v0 := b.NewValue0(v.Pos, OpConst32, t)
23511 v0.AuxInt = int32ToAuxInt(c - d)
23512 v.AddArg2(v0, x)
23513 return true
23514 }
23515
23516
23517 for {
23518 if v_0.Op != OpConst32 {
23519 break
23520 }
23521 t := v_0.Type
23522 c := auxIntToInt32(v_0.AuxInt)
23523 if v_1.Op != OpAdd32 {
23524 break
23525 }
23526 _ = v_1.Args[1]
23527 v_1_0 := v_1.Args[0]
23528 v_1_1 := v_1.Args[1]
23529 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
23530 if v_1_0.Op != OpConst32 || v_1_0.Type != t {
23531 continue
23532 }
23533 d := auxIntToInt32(v_1_0.AuxInt)
23534 x := v_1_1
23535 v.reset(OpSub32)
23536 v0 := b.NewValue0(v.Pos, OpConst32, t)
23537 v0.AuxInt = int32ToAuxInt(c - d)
23538 v.AddArg2(v0, x)
23539 return true
23540 }
23541 break
23542 }
23543 return false
23544 }
23545 func rewriteValuegeneric_OpSub32F(v *Value) bool {
23546 v_1 := v.Args[1]
23547 v_0 := v.Args[0]
23548
23549
23550
23551 for {
23552 if v_0.Op != OpConst32F {
23553 break
23554 }
23555 c := auxIntToFloat32(v_0.AuxInt)
23556 if v_1.Op != OpConst32F {
23557 break
23558 }
23559 d := auxIntToFloat32(v_1.AuxInt)
23560 if !(c-d == c-d) {
23561 break
23562 }
23563 v.reset(OpConst32F)
23564 v.AuxInt = float32ToAuxInt(c - d)
23565 return true
23566 }
23567 return false
23568 }
23569 func rewriteValuegeneric_OpSub64(v *Value) bool {
23570 v_1 := v.Args[1]
23571 v_0 := v.Args[0]
23572 b := v.Block
23573
23574
23575 for {
23576 if v_0.Op != OpConst64 {
23577 break
23578 }
23579 c := auxIntToInt64(v_0.AuxInt)
23580 if v_1.Op != OpConst64 {
23581 break
23582 }
23583 d := auxIntToInt64(v_1.AuxInt)
23584 v.reset(OpConst64)
23585 v.AuxInt = int64ToAuxInt(c - d)
23586 return true
23587 }
23588
23589
23590
23591 for {
23592 x := v_0
23593 if v_1.Op != OpConst64 {
23594 break
23595 }
23596 t := v_1.Type
23597 c := auxIntToInt64(v_1.AuxInt)
23598 if !(x.Op != OpConst64) {
23599 break
23600 }
23601 v.reset(OpAdd64)
23602 v0 := b.NewValue0(v.Pos, OpConst64, t)
23603 v0.AuxInt = int64ToAuxInt(-c)
23604 v.AddArg2(v0, x)
23605 return true
23606 }
23607
23608
23609 for {
23610 t := v.Type
23611 if v_0.Op != OpMul64 {
23612 break
23613 }
23614 _ = v_0.Args[1]
23615 v_0_0 := v_0.Args[0]
23616 v_0_1 := v_0.Args[1]
23617 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
23618 x := v_0_0
23619 y := v_0_1
23620 if v_1.Op != OpMul64 {
23621 continue
23622 }
23623 _ = v_1.Args[1]
23624 v_1_0 := v_1.Args[0]
23625 v_1_1 := v_1.Args[1]
23626 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
23627 if x != v_1_0 {
23628 continue
23629 }
23630 z := v_1_1
23631 v.reset(OpMul64)
23632 v0 := b.NewValue0(v.Pos, OpSub64, t)
23633 v0.AddArg2(y, z)
23634 v.AddArg2(x, v0)
23635 return true
23636 }
23637 }
23638 break
23639 }
23640
23641
23642 for {
23643 x := v_0
23644 if x != v_1 {
23645 break
23646 }
23647 v.reset(OpConst64)
23648 v.AuxInt = int64ToAuxInt(0)
23649 return true
23650 }
23651
23652
23653 for {
23654 if v_0.Op != OpAdd64 {
23655 break
23656 }
23657 _ = v_0.Args[1]
23658 v_0_0 := v_0.Args[0]
23659 v_0_1 := v_0.Args[1]
23660 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
23661 x := v_0_0
23662 y := v_0_1
23663 if x != v_1 {
23664 continue
23665 }
23666 v.copyOf(y)
23667 return true
23668 }
23669 break
23670 }
23671
23672
23673 for {
23674 if v_0.Op != OpAdd64 {
23675 break
23676 }
23677 _ = v_0.Args[1]
23678 v_0_0 := v_0.Args[0]
23679 v_0_1 := v_0.Args[1]
23680 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
23681 x := v_0_0
23682 y := v_0_1
23683 if y != v_1 {
23684 continue
23685 }
23686 v.copyOf(x)
23687 return true
23688 }
23689 break
23690 }
23691
23692
23693 for {
23694 if v_0.Op != OpSub64 {
23695 break
23696 }
23697 y := v_0.Args[1]
23698 x := v_0.Args[0]
23699 if x != v_1 {
23700 break
23701 }
23702 v.reset(OpNeg64)
23703 v.AddArg(y)
23704 return true
23705 }
23706
23707
23708 for {
23709 x := v_0
23710 if v_1.Op != OpAdd64 {
23711 break
23712 }
23713 _ = v_1.Args[1]
23714 v_1_0 := v_1.Args[0]
23715 v_1_1 := v_1.Args[1]
23716 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
23717 if x != v_1_0 {
23718 continue
23719 }
23720 y := v_1_1
23721 v.reset(OpNeg64)
23722 v.AddArg(y)
23723 return true
23724 }
23725 break
23726 }
23727
23728
23729
23730 for {
23731 x := v_0
23732 if v_1.Op != OpSub64 {
23733 break
23734 }
23735 z := v_1.Args[1]
23736 i := v_1.Args[0]
23737 if i.Op != OpConst64 {
23738 break
23739 }
23740 t := i.Type
23741 if !(z.Op != OpConst64 && x.Op != OpConst64) {
23742 break
23743 }
23744 v.reset(OpSub64)
23745 v0 := b.NewValue0(v.Pos, OpAdd64, t)
23746 v0.AddArg2(x, z)
23747 v.AddArg2(v0, i)
23748 return true
23749 }
23750
23751
23752
23753 for {
23754 x := v_0
23755 if v_1.Op != OpAdd64 {
23756 break
23757 }
23758 _ = v_1.Args[1]
23759 v_1_0 := v_1.Args[0]
23760 v_1_1 := v_1.Args[1]
23761 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
23762 z := v_1_0
23763 i := v_1_1
23764 if i.Op != OpConst64 {
23765 continue
23766 }
23767 t := i.Type
23768 if !(z.Op != OpConst64 && x.Op != OpConst64) {
23769 continue
23770 }
23771 v.reset(OpSub64)
23772 v0 := b.NewValue0(v.Pos, OpSub64, t)
23773 v0.AddArg2(x, z)
23774 v.AddArg2(v0, i)
23775 return true
23776 }
23777 break
23778 }
23779
23780
23781
23782 for {
23783 if v_0.Op != OpSub64 {
23784 break
23785 }
23786 z := v_0.Args[1]
23787 i := v_0.Args[0]
23788 if i.Op != OpConst64 {
23789 break
23790 }
23791 t := i.Type
23792 x := v_1
23793 if !(z.Op != OpConst64 && x.Op != OpConst64) {
23794 break
23795 }
23796 v.reset(OpSub64)
23797 v0 := b.NewValue0(v.Pos, OpAdd64, t)
23798 v0.AddArg2(z, x)
23799 v.AddArg2(i, v0)
23800 return true
23801 }
23802
23803
23804
23805 for {
23806 if v_0.Op != OpAdd64 {
23807 break
23808 }
23809 _ = v_0.Args[1]
23810 v_0_0 := v_0.Args[0]
23811 v_0_1 := v_0.Args[1]
23812 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
23813 z := v_0_0
23814 i := v_0_1
23815 if i.Op != OpConst64 {
23816 continue
23817 }
23818 t := i.Type
23819 x := v_1
23820 if !(z.Op != OpConst64 && x.Op != OpConst64) {
23821 continue
23822 }
23823 v.reset(OpAdd64)
23824 v0 := b.NewValue0(v.Pos, OpSub64, t)
23825 v0.AddArg2(z, x)
23826 v.AddArg2(i, v0)
23827 return true
23828 }
23829 break
23830 }
23831
23832
23833 for {
23834 if v_0.Op != OpConst64 {
23835 break
23836 }
23837 t := v_0.Type
23838 c := auxIntToInt64(v_0.AuxInt)
23839 if v_1.Op != OpSub64 {
23840 break
23841 }
23842 x := v_1.Args[1]
23843 v_1_0 := v_1.Args[0]
23844 if v_1_0.Op != OpConst64 || v_1_0.Type != t {
23845 break
23846 }
23847 d := auxIntToInt64(v_1_0.AuxInt)
23848 v.reset(OpAdd64)
23849 v0 := b.NewValue0(v.Pos, OpConst64, t)
23850 v0.AuxInt = int64ToAuxInt(c - d)
23851 v.AddArg2(v0, x)
23852 return true
23853 }
23854
23855
23856 for {
23857 if v_0.Op != OpConst64 {
23858 break
23859 }
23860 t := v_0.Type
23861 c := auxIntToInt64(v_0.AuxInt)
23862 if v_1.Op != OpAdd64 {
23863 break
23864 }
23865 _ = v_1.Args[1]
23866 v_1_0 := v_1.Args[0]
23867 v_1_1 := v_1.Args[1]
23868 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
23869 if v_1_0.Op != OpConst64 || v_1_0.Type != t {
23870 continue
23871 }
23872 d := auxIntToInt64(v_1_0.AuxInt)
23873 x := v_1_1
23874 v.reset(OpSub64)
23875 v0 := b.NewValue0(v.Pos, OpConst64, t)
23876 v0.AuxInt = int64ToAuxInt(c - d)
23877 v.AddArg2(v0, x)
23878 return true
23879 }
23880 break
23881 }
23882 return false
23883 }
23884 func rewriteValuegeneric_OpSub64F(v *Value) bool {
23885 v_1 := v.Args[1]
23886 v_0 := v.Args[0]
23887
23888
23889
23890 for {
23891 if v_0.Op != OpConst64F {
23892 break
23893 }
23894 c := auxIntToFloat64(v_0.AuxInt)
23895 if v_1.Op != OpConst64F {
23896 break
23897 }
23898 d := auxIntToFloat64(v_1.AuxInt)
23899 if !(c-d == c-d) {
23900 break
23901 }
23902 v.reset(OpConst64F)
23903 v.AuxInt = float64ToAuxInt(c - d)
23904 return true
23905 }
23906 return false
23907 }
23908 func rewriteValuegeneric_OpSub8(v *Value) bool {
23909 v_1 := v.Args[1]
23910 v_0 := v.Args[0]
23911 b := v.Block
23912
23913
23914 for {
23915 if v_0.Op != OpConst8 {
23916 break
23917 }
23918 c := auxIntToInt8(v_0.AuxInt)
23919 if v_1.Op != OpConst8 {
23920 break
23921 }
23922 d := auxIntToInt8(v_1.AuxInt)
23923 v.reset(OpConst8)
23924 v.AuxInt = int8ToAuxInt(c - d)
23925 return true
23926 }
23927
23928
23929
23930 for {
23931 x := v_0
23932 if v_1.Op != OpConst8 {
23933 break
23934 }
23935 t := v_1.Type
23936 c := auxIntToInt8(v_1.AuxInt)
23937 if !(x.Op != OpConst8) {
23938 break
23939 }
23940 v.reset(OpAdd8)
23941 v0 := b.NewValue0(v.Pos, OpConst8, t)
23942 v0.AuxInt = int8ToAuxInt(-c)
23943 v.AddArg2(v0, x)
23944 return true
23945 }
23946
23947
23948 for {
23949 t := v.Type
23950 if v_0.Op != OpMul8 {
23951 break
23952 }
23953 _ = v_0.Args[1]
23954 v_0_0 := v_0.Args[0]
23955 v_0_1 := v_0.Args[1]
23956 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
23957 x := v_0_0
23958 y := v_0_1
23959 if v_1.Op != OpMul8 {
23960 continue
23961 }
23962 _ = v_1.Args[1]
23963 v_1_0 := v_1.Args[0]
23964 v_1_1 := v_1.Args[1]
23965 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
23966 if x != v_1_0 {
23967 continue
23968 }
23969 z := v_1_1
23970 v.reset(OpMul8)
23971 v0 := b.NewValue0(v.Pos, OpSub8, t)
23972 v0.AddArg2(y, z)
23973 v.AddArg2(x, v0)
23974 return true
23975 }
23976 }
23977 break
23978 }
23979
23980
23981 for {
23982 x := v_0
23983 if x != v_1 {
23984 break
23985 }
23986 v.reset(OpConst8)
23987 v.AuxInt = int8ToAuxInt(0)
23988 return true
23989 }
23990
23991
23992 for {
23993 if v_0.Op != OpAdd8 {
23994 break
23995 }
23996 _ = v_0.Args[1]
23997 v_0_0 := v_0.Args[0]
23998 v_0_1 := v_0.Args[1]
23999 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
24000 x := v_0_0
24001 y := v_0_1
24002 if x != v_1 {
24003 continue
24004 }
24005 v.copyOf(y)
24006 return true
24007 }
24008 break
24009 }
24010
24011
24012 for {
24013 if v_0.Op != OpAdd8 {
24014 break
24015 }
24016 _ = v_0.Args[1]
24017 v_0_0 := v_0.Args[0]
24018 v_0_1 := v_0.Args[1]
24019 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
24020 x := v_0_0
24021 y := v_0_1
24022 if y != v_1 {
24023 continue
24024 }
24025 v.copyOf(x)
24026 return true
24027 }
24028 break
24029 }
24030
24031
24032 for {
24033 if v_0.Op != OpSub8 {
24034 break
24035 }
24036 y := v_0.Args[1]
24037 x := v_0.Args[0]
24038 if x != v_1 {
24039 break
24040 }
24041 v.reset(OpNeg8)
24042 v.AddArg(y)
24043 return true
24044 }
24045
24046
24047 for {
24048 x := v_0
24049 if v_1.Op != OpAdd8 {
24050 break
24051 }
24052 _ = v_1.Args[1]
24053 v_1_0 := v_1.Args[0]
24054 v_1_1 := v_1.Args[1]
24055 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
24056 if x != v_1_0 {
24057 continue
24058 }
24059 y := v_1_1
24060 v.reset(OpNeg8)
24061 v.AddArg(y)
24062 return true
24063 }
24064 break
24065 }
24066
24067
24068
24069 for {
24070 x := v_0
24071 if v_1.Op != OpSub8 {
24072 break
24073 }
24074 z := v_1.Args[1]
24075 i := v_1.Args[0]
24076 if i.Op != OpConst8 {
24077 break
24078 }
24079 t := i.Type
24080 if !(z.Op != OpConst8 && x.Op != OpConst8) {
24081 break
24082 }
24083 v.reset(OpSub8)
24084 v0 := b.NewValue0(v.Pos, OpAdd8, t)
24085 v0.AddArg2(x, z)
24086 v.AddArg2(v0, i)
24087 return true
24088 }
24089
24090
24091
24092 for {
24093 x := v_0
24094 if v_1.Op != OpAdd8 {
24095 break
24096 }
24097 _ = v_1.Args[1]
24098 v_1_0 := v_1.Args[0]
24099 v_1_1 := v_1.Args[1]
24100 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
24101 z := v_1_0
24102 i := v_1_1
24103 if i.Op != OpConst8 {
24104 continue
24105 }
24106 t := i.Type
24107 if !(z.Op != OpConst8 && x.Op != OpConst8) {
24108 continue
24109 }
24110 v.reset(OpSub8)
24111 v0 := b.NewValue0(v.Pos, OpSub8, t)
24112 v0.AddArg2(x, z)
24113 v.AddArg2(v0, i)
24114 return true
24115 }
24116 break
24117 }
24118
24119
24120
24121 for {
24122 if v_0.Op != OpSub8 {
24123 break
24124 }
24125 z := v_0.Args[1]
24126 i := v_0.Args[0]
24127 if i.Op != OpConst8 {
24128 break
24129 }
24130 t := i.Type
24131 x := v_1
24132 if !(z.Op != OpConst8 && x.Op != OpConst8) {
24133 break
24134 }
24135 v.reset(OpSub8)
24136 v0 := b.NewValue0(v.Pos, OpAdd8, t)
24137 v0.AddArg2(z, x)
24138 v.AddArg2(i, v0)
24139 return true
24140 }
24141
24142
24143
24144 for {
24145 if v_0.Op != OpAdd8 {
24146 break
24147 }
24148 _ = v_0.Args[1]
24149 v_0_0 := v_0.Args[0]
24150 v_0_1 := v_0.Args[1]
24151 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
24152 z := v_0_0
24153 i := v_0_1
24154 if i.Op != OpConst8 {
24155 continue
24156 }
24157 t := i.Type
24158 x := v_1
24159 if !(z.Op != OpConst8 && x.Op != OpConst8) {
24160 continue
24161 }
24162 v.reset(OpAdd8)
24163 v0 := b.NewValue0(v.Pos, OpSub8, t)
24164 v0.AddArg2(z, x)
24165 v.AddArg2(i, v0)
24166 return true
24167 }
24168 break
24169 }
24170
24171
24172 for {
24173 if v_0.Op != OpConst8 {
24174 break
24175 }
24176 t := v_0.Type
24177 c := auxIntToInt8(v_0.AuxInt)
24178 if v_1.Op != OpSub8 {
24179 break
24180 }
24181 x := v_1.Args[1]
24182 v_1_0 := v_1.Args[0]
24183 if v_1_0.Op != OpConst8 || v_1_0.Type != t {
24184 break
24185 }
24186 d := auxIntToInt8(v_1_0.AuxInt)
24187 v.reset(OpAdd8)
24188 v0 := b.NewValue0(v.Pos, OpConst8, t)
24189 v0.AuxInt = int8ToAuxInt(c - d)
24190 v.AddArg2(v0, x)
24191 return true
24192 }
24193
24194
24195 for {
24196 if v_0.Op != OpConst8 {
24197 break
24198 }
24199 t := v_0.Type
24200 c := auxIntToInt8(v_0.AuxInt)
24201 if v_1.Op != OpAdd8 {
24202 break
24203 }
24204 _ = v_1.Args[1]
24205 v_1_0 := v_1.Args[0]
24206 v_1_1 := v_1.Args[1]
24207 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
24208 if v_1_0.Op != OpConst8 || v_1_0.Type != t {
24209 continue
24210 }
24211 d := auxIntToInt8(v_1_0.AuxInt)
24212 x := v_1_1
24213 v.reset(OpSub8)
24214 v0 := b.NewValue0(v.Pos, OpConst8, t)
24215 v0.AuxInt = int8ToAuxInt(c - d)
24216 v.AddArg2(v0, x)
24217 return true
24218 }
24219 break
24220 }
24221 return false
24222 }
24223 func rewriteValuegeneric_OpTrunc16to8(v *Value) bool {
24224 v_0 := v.Args[0]
24225
24226
24227 for {
24228 if v_0.Op != OpConst16 {
24229 break
24230 }
24231 c := auxIntToInt16(v_0.AuxInt)
24232 v.reset(OpConst8)
24233 v.AuxInt = int8ToAuxInt(int8(c))
24234 return true
24235 }
24236
24237
24238 for {
24239 if v_0.Op != OpZeroExt8to16 {
24240 break
24241 }
24242 x := v_0.Args[0]
24243 v.copyOf(x)
24244 return true
24245 }
24246
24247
24248 for {
24249 if v_0.Op != OpSignExt8to16 {
24250 break
24251 }
24252 x := v_0.Args[0]
24253 v.copyOf(x)
24254 return true
24255 }
24256
24257
24258
24259 for {
24260 if v_0.Op != OpAnd16 {
24261 break
24262 }
24263 _ = v_0.Args[1]
24264 v_0_0 := v_0.Args[0]
24265 v_0_1 := v_0.Args[1]
24266 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
24267 if v_0_0.Op != OpConst16 {
24268 continue
24269 }
24270 y := auxIntToInt16(v_0_0.AuxInt)
24271 x := v_0_1
24272 if !(y&0xFF == 0xFF) {
24273 continue
24274 }
24275 v.reset(OpTrunc16to8)
24276 v.AddArg(x)
24277 return true
24278 }
24279 break
24280 }
24281 return false
24282 }
24283 func rewriteValuegeneric_OpTrunc32to16(v *Value) bool {
24284 v_0 := v.Args[0]
24285
24286
24287 for {
24288 if v_0.Op != OpConst32 {
24289 break
24290 }
24291 c := auxIntToInt32(v_0.AuxInt)
24292 v.reset(OpConst16)
24293 v.AuxInt = int16ToAuxInt(int16(c))
24294 return true
24295 }
24296
24297
24298 for {
24299 if v_0.Op != OpZeroExt8to32 {
24300 break
24301 }
24302 x := v_0.Args[0]
24303 v.reset(OpZeroExt8to16)
24304 v.AddArg(x)
24305 return true
24306 }
24307
24308
24309 for {
24310 if v_0.Op != OpZeroExt16to32 {
24311 break
24312 }
24313 x := v_0.Args[0]
24314 v.copyOf(x)
24315 return true
24316 }
24317
24318
24319 for {
24320 if v_0.Op != OpSignExt8to32 {
24321 break
24322 }
24323 x := v_0.Args[0]
24324 v.reset(OpSignExt8to16)
24325 v.AddArg(x)
24326 return true
24327 }
24328
24329
24330 for {
24331 if v_0.Op != OpSignExt16to32 {
24332 break
24333 }
24334 x := v_0.Args[0]
24335 v.copyOf(x)
24336 return true
24337 }
24338
24339
24340
24341 for {
24342 if v_0.Op != OpAnd32 {
24343 break
24344 }
24345 _ = v_0.Args[1]
24346 v_0_0 := v_0.Args[0]
24347 v_0_1 := v_0.Args[1]
24348 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
24349 if v_0_0.Op != OpConst32 {
24350 continue
24351 }
24352 y := auxIntToInt32(v_0_0.AuxInt)
24353 x := v_0_1
24354 if !(y&0xFFFF == 0xFFFF) {
24355 continue
24356 }
24357 v.reset(OpTrunc32to16)
24358 v.AddArg(x)
24359 return true
24360 }
24361 break
24362 }
24363 return false
24364 }
24365 func rewriteValuegeneric_OpTrunc32to8(v *Value) bool {
24366 v_0 := v.Args[0]
24367
24368
24369 for {
24370 if v_0.Op != OpConst32 {
24371 break
24372 }
24373 c := auxIntToInt32(v_0.AuxInt)
24374 v.reset(OpConst8)
24375 v.AuxInt = int8ToAuxInt(int8(c))
24376 return true
24377 }
24378
24379
24380 for {
24381 if v_0.Op != OpZeroExt8to32 {
24382 break
24383 }
24384 x := v_0.Args[0]
24385 v.copyOf(x)
24386 return true
24387 }
24388
24389
24390 for {
24391 if v_0.Op != OpSignExt8to32 {
24392 break
24393 }
24394 x := v_0.Args[0]
24395 v.copyOf(x)
24396 return true
24397 }
24398
24399
24400
24401 for {
24402 if v_0.Op != OpAnd32 {
24403 break
24404 }
24405 _ = v_0.Args[1]
24406 v_0_0 := v_0.Args[0]
24407 v_0_1 := v_0.Args[1]
24408 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
24409 if v_0_0.Op != OpConst32 {
24410 continue
24411 }
24412 y := auxIntToInt32(v_0_0.AuxInt)
24413 x := v_0_1
24414 if !(y&0xFF == 0xFF) {
24415 continue
24416 }
24417 v.reset(OpTrunc32to8)
24418 v.AddArg(x)
24419 return true
24420 }
24421 break
24422 }
24423 return false
24424 }
24425 func rewriteValuegeneric_OpTrunc64to16(v *Value) bool {
24426 v_0 := v.Args[0]
24427
24428
24429 for {
24430 if v_0.Op != OpConst64 {
24431 break
24432 }
24433 c := auxIntToInt64(v_0.AuxInt)
24434 v.reset(OpConst16)
24435 v.AuxInt = int16ToAuxInt(int16(c))
24436 return true
24437 }
24438
24439
24440 for {
24441 if v_0.Op != OpZeroExt8to64 {
24442 break
24443 }
24444 x := v_0.Args[0]
24445 v.reset(OpZeroExt8to16)
24446 v.AddArg(x)
24447 return true
24448 }
24449
24450
24451 for {
24452 if v_0.Op != OpZeroExt16to64 {
24453 break
24454 }
24455 x := v_0.Args[0]
24456 v.copyOf(x)
24457 return true
24458 }
24459
24460
24461 for {
24462 if v_0.Op != OpSignExt8to64 {
24463 break
24464 }
24465 x := v_0.Args[0]
24466 v.reset(OpSignExt8to16)
24467 v.AddArg(x)
24468 return true
24469 }
24470
24471
24472 for {
24473 if v_0.Op != OpSignExt16to64 {
24474 break
24475 }
24476 x := v_0.Args[0]
24477 v.copyOf(x)
24478 return true
24479 }
24480
24481
24482
24483 for {
24484 if v_0.Op != OpAnd64 {
24485 break
24486 }
24487 _ = v_0.Args[1]
24488 v_0_0 := v_0.Args[0]
24489 v_0_1 := v_0.Args[1]
24490 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
24491 if v_0_0.Op != OpConst64 {
24492 continue
24493 }
24494 y := auxIntToInt64(v_0_0.AuxInt)
24495 x := v_0_1
24496 if !(y&0xFFFF == 0xFFFF) {
24497 continue
24498 }
24499 v.reset(OpTrunc64to16)
24500 v.AddArg(x)
24501 return true
24502 }
24503 break
24504 }
24505 return false
24506 }
24507 func rewriteValuegeneric_OpTrunc64to32(v *Value) bool {
24508 v_0 := v.Args[0]
24509
24510
24511 for {
24512 if v_0.Op != OpConst64 {
24513 break
24514 }
24515 c := auxIntToInt64(v_0.AuxInt)
24516 v.reset(OpConst32)
24517 v.AuxInt = int32ToAuxInt(int32(c))
24518 return true
24519 }
24520
24521
24522 for {
24523 if v_0.Op != OpZeroExt8to64 {
24524 break
24525 }
24526 x := v_0.Args[0]
24527 v.reset(OpZeroExt8to32)
24528 v.AddArg(x)
24529 return true
24530 }
24531
24532
24533 for {
24534 if v_0.Op != OpZeroExt16to64 {
24535 break
24536 }
24537 x := v_0.Args[0]
24538 v.reset(OpZeroExt16to32)
24539 v.AddArg(x)
24540 return true
24541 }
24542
24543
24544 for {
24545 if v_0.Op != OpZeroExt32to64 {
24546 break
24547 }
24548 x := v_0.Args[0]
24549 v.copyOf(x)
24550 return true
24551 }
24552
24553
24554 for {
24555 if v_0.Op != OpSignExt8to64 {
24556 break
24557 }
24558 x := v_0.Args[0]
24559 v.reset(OpSignExt8to32)
24560 v.AddArg(x)
24561 return true
24562 }
24563
24564
24565 for {
24566 if v_0.Op != OpSignExt16to64 {
24567 break
24568 }
24569 x := v_0.Args[0]
24570 v.reset(OpSignExt16to32)
24571 v.AddArg(x)
24572 return true
24573 }
24574
24575
24576 for {
24577 if v_0.Op != OpSignExt32to64 {
24578 break
24579 }
24580 x := v_0.Args[0]
24581 v.copyOf(x)
24582 return true
24583 }
24584
24585
24586
24587 for {
24588 if v_0.Op != OpAnd64 {
24589 break
24590 }
24591 _ = v_0.Args[1]
24592 v_0_0 := v_0.Args[0]
24593 v_0_1 := v_0.Args[1]
24594 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
24595 if v_0_0.Op != OpConst64 {
24596 continue
24597 }
24598 y := auxIntToInt64(v_0_0.AuxInt)
24599 x := v_0_1
24600 if !(y&0xFFFFFFFF == 0xFFFFFFFF) {
24601 continue
24602 }
24603 v.reset(OpTrunc64to32)
24604 v.AddArg(x)
24605 return true
24606 }
24607 break
24608 }
24609 return false
24610 }
24611 func rewriteValuegeneric_OpTrunc64to8(v *Value) bool {
24612 v_0 := v.Args[0]
24613
24614
24615 for {
24616 if v_0.Op != OpConst64 {
24617 break
24618 }
24619 c := auxIntToInt64(v_0.AuxInt)
24620 v.reset(OpConst8)
24621 v.AuxInt = int8ToAuxInt(int8(c))
24622 return true
24623 }
24624
24625
24626 for {
24627 if v_0.Op != OpZeroExt8to64 {
24628 break
24629 }
24630 x := v_0.Args[0]
24631 v.copyOf(x)
24632 return true
24633 }
24634
24635
24636 for {
24637 if v_0.Op != OpSignExt8to64 {
24638 break
24639 }
24640 x := v_0.Args[0]
24641 v.copyOf(x)
24642 return true
24643 }
24644
24645
24646
24647 for {
24648 if v_0.Op != OpAnd64 {
24649 break
24650 }
24651 _ = v_0.Args[1]
24652 v_0_0 := v_0.Args[0]
24653 v_0_1 := v_0.Args[1]
24654 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
24655 if v_0_0.Op != OpConst64 {
24656 continue
24657 }
24658 y := auxIntToInt64(v_0_0.AuxInt)
24659 x := v_0_1
24660 if !(y&0xFF == 0xFF) {
24661 continue
24662 }
24663 v.reset(OpTrunc64to8)
24664 v.AddArg(x)
24665 return true
24666 }
24667 break
24668 }
24669 return false
24670 }
24671 func rewriteValuegeneric_OpXor16(v *Value) bool {
24672 v_1 := v.Args[1]
24673 v_0 := v.Args[0]
24674 b := v.Block
24675
24676
24677 for {
24678 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
24679 if v_0.Op != OpConst16 {
24680 continue
24681 }
24682 c := auxIntToInt16(v_0.AuxInt)
24683 if v_1.Op != OpConst16 {
24684 continue
24685 }
24686 d := auxIntToInt16(v_1.AuxInt)
24687 v.reset(OpConst16)
24688 v.AuxInt = int16ToAuxInt(c ^ d)
24689 return true
24690 }
24691 break
24692 }
24693
24694
24695 for {
24696 x := v_0
24697 if x != v_1 {
24698 break
24699 }
24700 v.reset(OpConst16)
24701 v.AuxInt = int16ToAuxInt(0)
24702 return true
24703 }
24704
24705
24706 for {
24707 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
24708 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 {
24709 continue
24710 }
24711 x := v_1
24712 v.copyOf(x)
24713 return true
24714 }
24715 break
24716 }
24717
24718
24719 for {
24720 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
24721 x := v_0
24722 if v_1.Op != OpXor16 {
24723 continue
24724 }
24725 _ = v_1.Args[1]
24726 v_1_0 := v_1.Args[0]
24727 v_1_1 := v_1.Args[1]
24728 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
24729 if x != v_1_0 {
24730 continue
24731 }
24732 y := v_1_1
24733 v.copyOf(y)
24734 return true
24735 }
24736 }
24737 break
24738 }
24739
24740
24741
24742 for {
24743 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
24744 if v_0.Op != OpXor16 {
24745 continue
24746 }
24747 _ = v_0.Args[1]
24748 v_0_0 := v_0.Args[0]
24749 v_0_1 := v_0.Args[1]
24750 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
24751 i := v_0_0
24752 if i.Op != OpConst16 {
24753 continue
24754 }
24755 t := i.Type
24756 z := v_0_1
24757 x := v_1
24758 if !(z.Op != OpConst16 && x.Op != OpConst16) {
24759 continue
24760 }
24761 v.reset(OpXor16)
24762 v0 := b.NewValue0(v.Pos, OpXor16, t)
24763 v0.AddArg2(z, x)
24764 v.AddArg2(i, v0)
24765 return true
24766 }
24767 }
24768 break
24769 }
24770
24771
24772 for {
24773 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
24774 if v_0.Op != OpConst16 {
24775 continue
24776 }
24777 t := v_0.Type
24778 c := auxIntToInt16(v_0.AuxInt)
24779 if v_1.Op != OpXor16 {
24780 continue
24781 }
24782 _ = v_1.Args[1]
24783 v_1_0 := v_1.Args[0]
24784 v_1_1 := v_1.Args[1]
24785 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
24786 if v_1_0.Op != OpConst16 || v_1_0.Type != t {
24787 continue
24788 }
24789 d := auxIntToInt16(v_1_0.AuxInt)
24790 x := v_1_1
24791 v.reset(OpXor16)
24792 v0 := b.NewValue0(v.Pos, OpConst16, t)
24793 v0.AuxInt = int16ToAuxInt(c ^ d)
24794 v.AddArg2(v0, x)
24795 return true
24796 }
24797 }
24798 break
24799 }
24800 return false
24801 }
24802 func rewriteValuegeneric_OpXor32(v *Value) bool {
24803 v_1 := v.Args[1]
24804 v_0 := v.Args[0]
24805 b := v.Block
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 != OpConst32 {
24811 continue
24812 }
24813 c := auxIntToInt32(v_0.AuxInt)
24814 if v_1.Op != OpConst32 {
24815 continue
24816 }
24817 d := auxIntToInt32(v_1.AuxInt)
24818 v.reset(OpConst32)
24819 v.AuxInt = int32ToAuxInt(c ^ d)
24820 return true
24821 }
24822 break
24823 }
24824
24825
24826 for {
24827 x := v_0
24828 if x != v_1 {
24829 break
24830 }
24831 v.reset(OpConst32)
24832 v.AuxInt = int32ToAuxInt(0)
24833 return true
24834 }
24835
24836
24837 for {
24838 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
24839 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
24840 continue
24841 }
24842 x := v_1
24843 v.copyOf(x)
24844 return true
24845 }
24846 break
24847 }
24848
24849
24850 for {
24851 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
24852 x := v_0
24853 if v_1.Op != OpXor32 {
24854 continue
24855 }
24856 _ = v_1.Args[1]
24857 v_1_0 := v_1.Args[0]
24858 v_1_1 := v_1.Args[1]
24859 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
24860 if x != v_1_0 {
24861 continue
24862 }
24863 y := v_1_1
24864 v.copyOf(y)
24865 return true
24866 }
24867 }
24868 break
24869 }
24870
24871
24872
24873 for {
24874 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
24875 if v_0.Op != OpXor32 {
24876 continue
24877 }
24878 _ = v_0.Args[1]
24879 v_0_0 := v_0.Args[0]
24880 v_0_1 := v_0.Args[1]
24881 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
24882 i := v_0_0
24883 if i.Op != OpConst32 {
24884 continue
24885 }
24886 t := i.Type
24887 z := v_0_1
24888 x := v_1
24889 if !(z.Op != OpConst32 && x.Op != OpConst32) {
24890 continue
24891 }
24892 v.reset(OpXor32)
24893 v0 := b.NewValue0(v.Pos, OpXor32, t)
24894 v0.AddArg2(z, x)
24895 v.AddArg2(i, v0)
24896 return true
24897 }
24898 }
24899 break
24900 }
24901
24902
24903 for {
24904 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
24905 if v_0.Op != OpConst32 {
24906 continue
24907 }
24908 t := v_0.Type
24909 c := auxIntToInt32(v_0.AuxInt)
24910 if v_1.Op != OpXor32 {
24911 continue
24912 }
24913 _ = v_1.Args[1]
24914 v_1_0 := v_1.Args[0]
24915 v_1_1 := v_1.Args[1]
24916 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
24917 if v_1_0.Op != OpConst32 || v_1_0.Type != t {
24918 continue
24919 }
24920 d := auxIntToInt32(v_1_0.AuxInt)
24921 x := v_1_1
24922 v.reset(OpXor32)
24923 v0 := b.NewValue0(v.Pos, OpConst32, t)
24924 v0.AuxInt = int32ToAuxInt(c ^ d)
24925 v.AddArg2(v0, x)
24926 return true
24927 }
24928 }
24929 break
24930 }
24931 return false
24932 }
24933 func rewriteValuegeneric_OpXor64(v *Value) bool {
24934 v_1 := v.Args[1]
24935 v_0 := v.Args[0]
24936 b := v.Block
24937
24938
24939 for {
24940 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
24941 if v_0.Op != OpConst64 {
24942 continue
24943 }
24944 c := auxIntToInt64(v_0.AuxInt)
24945 if v_1.Op != OpConst64 {
24946 continue
24947 }
24948 d := auxIntToInt64(v_1.AuxInt)
24949 v.reset(OpConst64)
24950 v.AuxInt = int64ToAuxInt(c ^ d)
24951 return true
24952 }
24953 break
24954 }
24955
24956
24957 for {
24958 x := v_0
24959 if x != v_1 {
24960 break
24961 }
24962 v.reset(OpConst64)
24963 v.AuxInt = int64ToAuxInt(0)
24964 return true
24965 }
24966
24967
24968 for {
24969 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
24970 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
24971 continue
24972 }
24973 x := v_1
24974 v.copyOf(x)
24975 return true
24976 }
24977 break
24978 }
24979
24980
24981 for {
24982 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
24983 x := v_0
24984 if v_1.Op != OpXor64 {
24985 continue
24986 }
24987 _ = v_1.Args[1]
24988 v_1_0 := v_1.Args[0]
24989 v_1_1 := v_1.Args[1]
24990 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
24991 if x != v_1_0 {
24992 continue
24993 }
24994 y := v_1_1
24995 v.copyOf(y)
24996 return true
24997 }
24998 }
24999 break
25000 }
25001
25002
25003
25004 for {
25005 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
25006 if v_0.Op != OpXor64 {
25007 continue
25008 }
25009 _ = v_0.Args[1]
25010 v_0_0 := v_0.Args[0]
25011 v_0_1 := v_0.Args[1]
25012 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
25013 i := v_0_0
25014 if i.Op != OpConst64 {
25015 continue
25016 }
25017 t := i.Type
25018 z := v_0_1
25019 x := v_1
25020 if !(z.Op != OpConst64 && x.Op != OpConst64) {
25021 continue
25022 }
25023 v.reset(OpXor64)
25024 v0 := b.NewValue0(v.Pos, OpXor64, t)
25025 v0.AddArg2(z, x)
25026 v.AddArg2(i, v0)
25027 return true
25028 }
25029 }
25030 break
25031 }
25032
25033
25034 for {
25035 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
25036 if v_0.Op != OpConst64 {
25037 continue
25038 }
25039 t := v_0.Type
25040 c := auxIntToInt64(v_0.AuxInt)
25041 if v_1.Op != OpXor64 {
25042 continue
25043 }
25044 _ = v_1.Args[1]
25045 v_1_0 := v_1.Args[0]
25046 v_1_1 := v_1.Args[1]
25047 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
25048 if v_1_0.Op != OpConst64 || v_1_0.Type != t {
25049 continue
25050 }
25051 d := auxIntToInt64(v_1_0.AuxInt)
25052 x := v_1_1
25053 v.reset(OpXor64)
25054 v0 := b.NewValue0(v.Pos, OpConst64, t)
25055 v0.AuxInt = int64ToAuxInt(c ^ d)
25056 v.AddArg2(v0, x)
25057 return true
25058 }
25059 }
25060 break
25061 }
25062 return false
25063 }
25064 func rewriteValuegeneric_OpXor8(v *Value) bool {
25065 v_1 := v.Args[1]
25066 v_0 := v.Args[0]
25067 b := v.Block
25068
25069
25070 for {
25071 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
25072 if v_0.Op != OpConst8 {
25073 continue
25074 }
25075 c := auxIntToInt8(v_0.AuxInt)
25076 if v_1.Op != OpConst8 {
25077 continue
25078 }
25079 d := auxIntToInt8(v_1.AuxInt)
25080 v.reset(OpConst8)
25081 v.AuxInt = int8ToAuxInt(c ^ d)
25082 return true
25083 }
25084 break
25085 }
25086
25087
25088 for {
25089 x := v_0
25090 if x != v_1 {
25091 break
25092 }
25093 v.reset(OpConst8)
25094 v.AuxInt = int8ToAuxInt(0)
25095 return true
25096 }
25097
25098
25099 for {
25100 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
25101 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 {
25102 continue
25103 }
25104 x := v_1
25105 v.copyOf(x)
25106 return true
25107 }
25108 break
25109 }
25110
25111
25112 for {
25113 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
25114 x := v_0
25115 if v_1.Op != OpXor8 {
25116 continue
25117 }
25118 _ = v_1.Args[1]
25119 v_1_0 := v_1.Args[0]
25120 v_1_1 := v_1.Args[1]
25121 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
25122 if x != v_1_0 {
25123 continue
25124 }
25125 y := v_1_1
25126 v.copyOf(y)
25127 return true
25128 }
25129 }
25130 break
25131 }
25132
25133
25134
25135 for {
25136 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
25137 if v_0.Op != OpXor8 {
25138 continue
25139 }
25140 _ = v_0.Args[1]
25141 v_0_0 := v_0.Args[0]
25142 v_0_1 := v_0.Args[1]
25143 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
25144 i := v_0_0
25145 if i.Op != OpConst8 {
25146 continue
25147 }
25148 t := i.Type
25149 z := v_0_1
25150 x := v_1
25151 if !(z.Op != OpConst8 && x.Op != OpConst8) {
25152 continue
25153 }
25154 v.reset(OpXor8)
25155 v0 := b.NewValue0(v.Pos, OpXor8, t)
25156 v0.AddArg2(z, x)
25157 v.AddArg2(i, v0)
25158 return true
25159 }
25160 }
25161 break
25162 }
25163
25164
25165 for {
25166 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
25167 if v_0.Op != OpConst8 {
25168 continue
25169 }
25170 t := v_0.Type
25171 c := auxIntToInt8(v_0.AuxInt)
25172 if v_1.Op != OpXor8 {
25173 continue
25174 }
25175 _ = v_1.Args[1]
25176 v_1_0 := v_1.Args[0]
25177 v_1_1 := v_1.Args[1]
25178 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
25179 if v_1_0.Op != OpConst8 || v_1_0.Type != t {
25180 continue
25181 }
25182 d := auxIntToInt8(v_1_0.AuxInt)
25183 x := v_1_1
25184 v.reset(OpXor8)
25185 v0 := b.NewValue0(v.Pos, OpConst8, t)
25186 v0.AuxInt = int8ToAuxInt(c ^ d)
25187 v.AddArg2(v0, x)
25188 return true
25189 }
25190 }
25191 break
25192 }
25193 return false
25194 }
25195 func rewriteValuegeneric_OpZero(v *Value) bool {
25196 v_1 := v.Args[1]
25197 v_0 := v.Args[0]
25198 b := v.Block
25199
25200
25201
25202 for {
25203 if v_0.Op != OpSelectN || auxIntToInt64(v_0.AuxInt) != 0 {
25204 break
25205 }
25206 call := v_0.Args[0]
25207 if call.Op != OpStaticLECall || len(call.Args) != 2 {
25208 break
25209 }
25210 mem := v_1
25211 if mem.Op != OpSelectN || auxIntToInt64(mem.AuxInt) != 1 || call != mem.Args[0] || !(isSameCall(call.Aux, "runtime.newobject")) {
25212 break
25213 }
25214 v.copyOf(mem)
25215 return true
25216 }
25217
25218
25219
25220 for {
25221 n := auxIntToInt64(v.AuxInt)
25222 t1 := auxToType(v.Aux)
25223 p1 := v_0
25224 store := v_1
25225 if store.Op != OpStore {
25226 break
25227 }
25228 t2 := auxToType(store.Aux)
25229 mem := store.Args[2]
25230 store_0 := store.Args[0]
25231 if store_0.Op != OpOffPtr {
25232 break
25233 }
25234 o2 := auxIntToInt64(store_0.AuxInt)
25235 p2 := store_0.Args[0]
25236 if !(isSamePtr(p1, p2) && store.Uses == 1 && n >= o2+t2.Size() && clobber(store)) {
25237 break
25238 }
25239 v.reset(OpZero)
25240 v.AuxInt = int64ToAuxInt(n)
25241 v.Aux = typeToAux(t1)
25242 v.AddArg2(p1, mem)
25243 return true
25244 }
25245
25246
25247
25248 for {
25249 n := auxIntToInt64(v.AuxInt)
25250 t := auxToType(v.Aux)
25251 dst1 := v_0
25252 move := v_1
25253 if move.Op != OpMove || auxIntToInt64(move.AuxInt) != n || auxToType(move.Aux) != t {
25254 break
25255 }
25256 mem := move.Args[2]
25257 dst2 := move.Args[0]
25258 if !(move.Uses == 1 && isSamePtr(dst1, dst2) && clobber(move)) {
25259 break
25260 }
25261 v.reset(OpZero)
25262 v.AuxInt = int64ToAuxInt(n)
25263 v.Aux = typeToAux(t)
25264 v.AddArg2(dst1, mem)
25265 return true
25266 }
25267
25268
25269
25270 for {
25271 n := auxIntToInt64(v.AuxInt)
25272 t := auxToType(v.Aux)
25273 dst1 := v_0
25274 vardef := v_1
25275 if vardef.Op != OpVarDef {
25276 break
25277 }
25278 x := auxToSym(vardef.Aux)
25279 move := vardef.Args[0]
25280 if move.Op != OpMove || auxIntToInt64(move.AuxInt) != n || auxToType(move.Aux) != t {
25281 break
25282 }
25283 mem := move.Args[2]
25284 dst2 := move.Args[0]
25285 if !(move.Uses == 1 && vardef.Uses == 1 && isSamePtr(dst1, dst2) && clobber(move, vardef)) {
25286 break
25287 }
25288 v.reset(OpZero)
25289 v.AuxInt = int64ToAuxInt(n)
25290 v.Aux = typeToAux(t)
25291 v0 := b.NewValue0(v.Pos, OpVarDef, types.TypeMem)
25292 v0.Aux = symToAux(x)
25293 v0.AddArg(mem)
25294 v.AddArg2(dst1, v0)
25295 return true
25296 }
25297
25298
25299
25300 for {
25301 s := auxIntToInt64(v.AuxInt)
25302 t := auxToType(v.Aux)
25303 dst1 := v_0
25304 zero := v_1
25305 if zero.Op != OpZero || auxIntToInt64(zero.AuxInt) != s || auxToType(zero.Aux) != t {
25306 break
25307 }
25308 dst2 := zero.Args[0]
25309 if !(isSamePtr(dst1, dst2)) {
25310 break
25311 }
25312 v.copyOf(zero)
25313 return true
25314 }
25315
25316
25317
25318 for {
25319 s := auxIntToInt64(v.AuxInt)
25320 t := auxToType(v.Aux)
25321 dst1 := v_0
25322 vardef := v_1
25323 if vardef.Op != OpVarDef {
25324 break
25325 }
25326 vardef_0 := vardef.Args[0]
25327 if vardef_0.Op != OpZero || auxIntToInt64(vardef_0.AuxInt) != s || auxToType(vardef_0.Aux) != t {
25328 break
25329 }
25330 dst2 := vardef_0.Args[0]
25331 if !(isSamePtr(dst1, dst2)) {
25332 break
25333 }
25334 v.copyOf(vardef)
25335 return true
25336 }
25337 return false
25338 }
25339 func rewriteValuegeneric_OpZeroExt16to32(v *Value) bool {
25340 v_0 := v.Args[0]
25341
25342
25343 for {
25344 if v_0.Op != OpConst16 {
25345 break
25346 }
25347 c := auxIntToInt16(v_0.AuxInt)
25348 v.reset(OpConst32)
25349 v.AuxInt = int32ToAuxInt(int32(uint16(c)))
25350 return true
25351 }
25352
25353
25354
25355 for {
25356 if v_0.Op != OpTrunc32to16 {
25357 break
25358 }
25359 x := v_0.Args[0]
25360 if x.Op != OpRsh32Ux64 {
25361 break
25362 }
25363 _ = x.Args[1]
25364 x_1 := x.Args[1]
25365 if x_1.Op != OpConst64 {
25366 break
25367 }
25368 s := auxIntToInt64(x_1.AuxInt)
25369 if !(s >= 16) {
25370 break
25371 }
25372 v.copyOf(x)
25373 return true
25374 }
25375 return false
25376 }
25377 func rewriteValuegeneric_OpZeroExt16to64(v *Value) bool {
25378 v_0 := v.Args[0]
25379
25380
25381 for {
25382 if v_0.Op != OpConst16 {
25383 break
25384 }
25385 c := auxIntToInt16(v_0.AuxInt)
25386 v.reset(OpConst64)
25387 v.AuxInt = int64ToAuxInt(int64(uint16(c)))
25388 return true
25389 }
25390
25391
25392
25393 for {
25394 if v_0.Op != OpTrunc64to16 {
25395 break
25396 }
25397 x := v_0.Args[0]
25398 if x.Op != OpRsh64Ux64 {
25399 break
25400 }
25401 _ = x.Args[1]
25402 x_1 := x.Args[1]
25403 if x_1.Op != OpConst64 {
25404 break
25405 }
25406 s := auxIntToInt64(x_1.AuxInt)
25407 if !(s >= 48) {
25408 break
25409 }
25410 v.copyOf(x)
25411 return true
25412 }
25413 return false
25414 }
25415 func rewriteValuegeneric_OpZeroExt32to64(v *Value) bool {
25416 v_0 := v.Args[0]
25417
25418
25419 for {
25420 if v_0.Op != OpConst32 {
25421 break
25422 }
25423 c := auxIntToInt32(v_0.AuxInt)
25424 v.reset(OpConst64)
25425 v.AuxInt = int64ToAuxInt(int64(uint32(c)))
25426 return true
25427 }
25428
25429
25430
25431 for {
25432 if v_0.Op != OpTrunc64to32 {
25433 break
25434 }
25435 x := v_0.Args[0]
25436 if x.Op != OpRsh64Ux64 {
25437 break
25438 }
25439 _ = x.Args[1]
25440 x_1 := x.Args[1]
25441 if x_1.Op != OpConst64 {
25442 break
25443 }
25444 s := auxIntToInt64(x_1.AuxInt)
25445 if !(s >= 32) {
25446 break
25447 }
25448 v.copyOf(x)
25449 return true
25450 }
25451 return false
25452 }
25453 func rewriteValuegeneric_OpZeroExt8to16(v *Value) bool {
25454 v_0 := v.Args[0]
25455
25456
25457 for {
25458 if v_0.Op != OpConst8 {
25459 break
25460 }
25461 c := auxIntToInt8(v_0.AuxInt)
25462 v.reset(OpConst16)
25463 v.AuxInt = int16ToAuxInt(int16(uint8(c)))
25464 return true
25465 }
25466
25467
25468
25469 for {
25470 if v_0.Op != OpTrunc16to8 {
25471 break
25472 }
25473 x := v_0.Args[0]
25474 if x.Op != OpRsh16Ux64 {
25475 break
25476 }
25477 _ = x.Args[1]
25478 x_1 := x.Args[1]
25479 if x_1.Op != OpConst64 {
25480 break
25481 }
25482 s := auxIntToInt64(x_1.AuxInt)
25483 if !(s >= 8) {
25484 break
25485 }
25486 v.copyOf(x)
25487 return true
25488 }
25489 return false
25490 }
25491 func rewriteValuegeneric_OpZeroExt8to32(v *Value) bool {
25492 v_0 := v.Args[0]
25493
25494
25495 for {
25496 if v_0.Op != OpConst8 {
25497 break
25498 }
25499 c := auxIntToInt8(v_0.AuxInt)
25500 v.reset(OpConst32)
25501 v.AuxInt = int32ToAuxInt(int32(uint8(c)))
25502 return true
25503 }
25504
25505
25506
25507 for {
25508 if v_0.Op != OpTrunc32to8 {
25509 break
25510 }
25511 x := v_0.Args[0]
25512 if x.Op != OpRsh32Ux64 {
25513 break
25514 }
25515 _ = x.Args[1]
25516 x_1 := x.Args[1]
25517 if x_1.Op != OpConst64 {
25518 break
25519 }
25520 s := auxIntToInt64(x_1.AuxInt)
25521 if !(s >= 24) {
25522 break
25523 }
25524 v.copyOf(x)
25525 return true
25526 }
25527 return false
25528 }
25529 func rewriteValuegeneric_OpZeroExt8to64(v *Value) bool {
25530 v_0 := v.Args[0]
25531
25532
25533 for {
25534 if v_0.Op != OpConst8 {
25535 break
25536 }
25537 c := auxIntToInt8(v_0.AuxInt)
25538 v.reset(OpConst64)
25539 v.AuxInt = int64ToAuxInt(int64(uint8(c)))
25540 return true
25541 }
25542
25543
25544
25545 for {
25546 if v_0.Op != OpTrunc64to8 {
25547 break
25548 }
25549 x := v_0.Args[0]
25550 if x.Op != OpRsh64Ux64 {
25551 break
25552 }
25553 _ = x.Args[1]
25554 x_1 := x.Args[1]
25555 if x_1.Op != OpConst64 {
25556 break
25557 }
25558 s := auxIntToInt64(x_1.AuxInt)
25559 if !(s >= 56) {
25560 break
25561 }
25562 v.copyOf(x)
25563 return true
25564 }
25565 return false
25566 }
25567 func rewriteBlockgeneric(b *Block) bool {
25568 switch b.Kind {
25569 case BlockIf:
25570
25571
25572 for b.Controls[0].Op == OpNot {
25573 v_0 := b.Controls[0]
25574 cond := v_0.Args[0]
25575 b.resetWithControl(BlockIf, cond)
25576 b.swapSuccessors()
25577 return true
25578 }
25579
25580
25581
25582 for b.Controls[0].Op == OpConstBool {
25583 v_0 := b.Controls[0]
25584 c := auxIntToBool(v_0.AuxInt)
25585 if !(c) {
25586 break
25587 }
25588 b.Reset(BlockFirst)
25589 return true
25590 }
25591
25592
25593
25594 for b.Controls[0].Op == OpConstBool {
25595 v_0 := b.Controls[0]
25596 c := auxIntToBool(v_0.AuxInt)
25597 if !(!c) {
25598 break
25599 }
25600 b.Reset(BlockFirst)
25601 b.swapSuccessors()
25602 return true
25603 }
25604 }
25605 return false
25606 }
25607
View as plain text