1
2
3 package ssa
4
5 import "math"
6 import "cmd/internal/obj"
7 import "cmd/compile/internal/types"
8 import "cmd/compile/internal/ir"
9
10 func rewriteValuegeneric(v *Value) bool {
11 switch v.Op {
12 case OpAdd16:
13 return rewriteValuegeneric_OpAdd16(v)
14 case OpAdd32:
15 return rewriteValuegeneric_OpAdd32(v)
16 case OpAdd32F:
17 return rewriteValuegeneric_OpAdd32F(v)
18 case OpAdd64:
19 return rewriteValuegeneric_OpAdd64(v)
20 case OpAdd64F:
21 return rewriteValuegeneric_OpAdd64F(v)
22 case OpAdd8:
23 return rewriteValuegeneric_OpAdd8(v)
24 case OpAddPtr:
25 return rewriteValuegeneric_OpAddPtr(v)
26 case OpAnd16:
27 return rewriteValuegeneric_OpAnd16(v)
28 case OpAnd32:
29 return rewriteValuegeneric_OpAnd32(v)
30 case OpAnd64:
31 return rewriteValuegeneric_OpAnd64(v)
32 case OpAnd8:
33 return rewriteValuegeneric_OpAnd8(v)
34 case OpAndB:
35 return rewriteValuegeneric_OpAndB(v)
36 case OpArraySelect:
37 return rewriteValuegeneric_OpArraySelect(v)
38 case OpCeil:
39 return rewriteValuegeneric_OpCeil(v)
40 case OpCom16:
41 return rewriteValuegeneric_OpCom16(v)
42 case OpCom32:
43 return rewriteValuegeneric_OpCom32(v)
44 case OpCom64:
45 return rewriteValuegeneric_OpCom64(v)
46 case OpCom8:
47 return rewriteValuegeneric_OpCom8(v)
48 case OpConstInterface:
49 return rewriteValuegeneric_OpConstInterface(v)
50 case OpConstSlice:
51 return rewriteValuegeneric_OpConstSlice(v)
52 case OpConstString:
53 return rewriteValuegeneric_OpConstString(v)
54 case OpConvert:
55 return rewriteValuegeneric_OpConvert(v)
56 case OpCtz16:
57 return rewriteValuegeneric_OpCtz16(v)
58 case OpCtz32:
59 return rewriteValuegeneric_OpCtz32(v)
60 case OpCtz64:
61 return rewriteValuegeneric_OpCtz64(v)
62 case OpCtz8:
63 return rewriteValuegeneric_OpCtz8(v)
64 case OpCvt32Fto32:
65 return rewriteValuegeneric_OpCvt32Fto32(v)
66 case OpCvt32Fto64:
67 return rewriteValuegeneric_OpCvt32Fto64(v)
68 case OpCvt32Fto64F:
69 return rewriteValuegeneric_OpCvt32Fto64F(v)
70 case OpCvt32to32F:
71 return rewriteValuegeneric_OpCvt32to32F(v)
72 case OpCvt32to64F:
73 return rewriteValuegeneric_OpCvt32to64F(v)
74 case OpCvt64Fto32:
75 return rewriteValuegeneric_OpCvt64Fto32(v)
76 case OpCvt64Fto32F:
77 return rewriteValuegeneric_OpCvt64Fto32F(v)
78 case OpCvt64Fto64:
79 return rewriteValuegeneric_OpCvt64Fto64(v)
80 case OpCvt64to32F:
81 return rewriteValuegeneric_OpCvt64to32F(v)
82 case OpCvt64to64F:
83 return rewriteValuegeneric_OpCvt64to64F(v)
84 case OpCvtBoolToUint8:
85 return rewriteValuegeneric_OpCvtBoolToUint8(v)
86 case OpDiv16:
87 return rewriteValuegeneric_OpDiv16(v)
88 case OpDiv16u:
89 return rewriteValuegeneric_OpDiv16u(v)
90 case OpDiv32:
91 return rewriteValuegeneric_OpDiv32(v)
92 case OpDiv32F:
93 return rewriteValuegeneric_OpDiv32F(v)
94 case OpDiv32u:
95 return rewriteValuegeneric_OpDiv32u(v)
96 case OpDiv64:
97 return rewriteValuegeneric_OpDiv64(v)
98 case OpDiv64F:
99 return rewriteValuegeneric_OpDiv64F(v)
100 case OpDiv64u:
101 return rewriteValuegeneric_OpDiv64u(v)
102 case OpDiv8:
103 return rewriteValuegeneric_OpDiv8(v)
104 case OpDiv8u:
105 return rewriteValuegeneric_OpDiv8u(v)
106 case OpEq16:
107 return rewriteValuegeneric_OpEq16(v)
108 case OpEq32:
109 return rewriteValuegeneric_OpEq32(v)
110 case OpEq32F:
111 return rewriteValuegeneric_OpEq32F(v)
112 case OpEq64:
113 return rewriteValuegeneric_OpEq64(v)
114 case OpEq64F:
115 return rewriteValuegeneric_OpEq64F(v)
116 case OpEq8:
117 return rewriteValuegeneric_OpEq8(v)
118 case OpEqB:
119 return rewriteValuegeneric_OpEqB(v)
120 case OpEqInter:
121 return rewriteValuegeneric_OpEqInter(v)
122 case OpEqPtr:
123 return rewriteValuegeneric_OpEqPtr(v)
124 case OpEqSlice:
125 return rewriteValuegeneric_OpEqSlice(v)
126 case OpFloor:
127 return rewriteValuegeneric_OpFloor(v)
128 case OpIMake:
129 return rewriteValuegeneric_OpIMake(v)
130 case OpInterLECall:
131 return rewriteValuegeneric_OpInterLECall(v)
132 case OpIsInBounds:
133 return rewriteValuegeneric_OpIsInBounds(v)
134 case OpIsNonNil:
135 return rewriteValuegeneric_OpIsNonNil(v)
136 case OpIsSliceInBounds:
137 return rewriteValuegeneric_OpIsSliceInBounds(v)
138 case OpLeq16:
139 return rewriteValuegeneric_OpLeq16(v)
140 case OpLeq16U:
141 return rewriteValuegeneric_OpLeq16U(v)
142 case OpLeq32:
143 return rewriteValuegeneric_OpLeq32(v)
144 case OpLeq32F:
145 return rewriteValuegeneric_OpLeq32F(v)
146 case OpLeq32U:
147 return rewriteValuegeneric_OpLeq32U(v)
148 case OpLeq64:
149 return rewriteValuegeneric_OpLeq64(v)
150 case OpLeq64F:
151 return rewriteValuegeneric_OpLeq64F(v)
152 case OpLeq64U:
153 return rewriteValuegeneric_OpLeq64U(v)
154 case OpLeq8:
155 return rewriteValuegeneric_OpLeq8(v)
156 case OpLeq8U:
157 return rewriteValuegeneric_OpLeq8U(v)
158 case OpLess16:
159 return rewriteValuegeneric_OpLess16(v)
160 case OpLess16U:
161 return rewriteValuegeneric_OpLess16U(v)
162 case OpLess32:
163 return rewriteValuegeneric_OpLess32(v)
164 case OpLess32F:
165 return rewriteValuegeneric_OpLess32F(v)
166 case OpLess32U:
167 return rewriteValuegeneric_OpLess32U(v)
168 case OpLess64:
169 return rewriteValuegeneric_OpLess64(v)
170 case OpLess64F:
171 return rewriteValuegeneric_OpLess64F(v)
172 case OpLess64U:
173 return rewriteValuegeneric_OpLess64U(v)
174 case OpLess8:
175 return rewriteValuegeneric_OpLess8(v)
176 case OpLess8U:
177 return rewriteValuegeneric_OpLess8U(v)
178 case OpLoad:
179 return rewriteValuegeneric_OpLoad(v)
180 case OpLsh16x16:
181 return rewriteValuegeneric_OpLsh16x16(v)
182 case OpLsh16x32:
183 return rewriteValuegeneric_OpLsh16x32(v)
184 case OpLsh16x64:
185 return rewriteValuegeneric_OpLsh16x64(v)
186 case OpLsh16x8:
187 return rewriteValuegeneric_OpLsh16x8(v)
188 case OpLsh32x16:
189 return rewriteValuegeneric_OpLsh32x16(v)
190 case OpLsh32x32:
191 return rewriteValuegeneric_OpLsh32x32(v)
192 case OpLsh32x64:
193 return rewriteValuegeneric_OpLsh32x64(v)
194 case OpLsh32x8:
195 return rewriteValuegeneric_OpLsh32x8(v)
196 case OpLsh64x16:
197 return rewriteValuegeneric_OpLsh64x16(v)
198 case OpLsh64x32:
199 return rewriteValuegeneric_OpLsh64x32(v)
200 case OpLsh64x64:
201 return rewriteValuegeneric_OpLsh64x64(v)
202 case OpLsh64x8:
203 return rewriteValuegeneric_OpLsh64x8(v)
204 case OpLsh8x16:
205 return rewriteValuegeneric_OpLsh8x16(v)
206 case OpLsh8x32:
207 return rewriteValuegeneric_OpLsh8x32(v)
208 case OpLsh8x64:
209 return rewriteValuegeneric_OpLsh8x64(v)
210 case OpLsh8x8:
211 return rewriteValuegeneric_OpLsh8x8(v)
212 case OpMod16:
213 return rewriteValuegeneric_OpMod16(v)
214 case OpMod16u:
215 return rewriteValuegeneric_OpMod16u(v)
216 case OpMod32:
217 return rewriteValuegeneric_OpMod32(v)
218 case OpMod32u:
219 return rewriteValuegeneric_OpMod32u(v)
220 case OpMod64:
221 return rewriteValuegeneric_OpMod64(v)
222 case OpMod64u:
223 return rewriteValuegeneric_OpMod64u(v)
224 case OpMod8:
225 return rewriteValuegeneric_OpMod8(v)
226 case OpMod8u:
227 return rewriteValuegeneric_OpMod8u(v)
228 case OpMove:
229 return rewriteValuegeneric_OpMove(v)
230 case OpMul16:
231 return rewriteValuegeneric_OpMul16(v)
232 case OpMul32:
233 return rewriteValuegeneric_OpMul32(v)
234 case OpMul32F:
235 return rewriteValuegeneric_OpMul32F(v)
236 case OpMul64:
237 return rewriteValuegeneric_OpMul64(v)
238 case OpMul64F:
239 return rewriteValuegeneric_OpMul64F(v)
240 case OpMul8:
241 return rewriteValuegeneric_OpMul8(v)
242 case OpNeg16:
243 return rewriteValuegeneric_OpNeg16(v)
244 case OpNeg32:
245 return rewriteValuegeneric_OpNeg32(v)
246 case OpNeg32F:
247 return rewriteValuegeneric_OpNeg32F(v)
248 case OpNeg64:
249 return rewriteValuegeneric_OpNeg64(v)
250 case OpNeg64F:
251 return rewriteValuegeneric_OpNeg64F(v)
252 case OpNeg8:
253 return rewriteValuegeneric_OpNeg8(v)
254 case OpNeq16:
255 return rewriteValuegeneric_OpNeq16(v)
256 case OpNeq32:
257 return rewriteValuegeneric_OpNeq32(v)
258 case OpNeq32F:
259 return rewriteValuegeneric_OpNeq32F(v)
260 case OpNeq64:
261 return rewriteValuegeneric_OpNeq64(v)
262 case OpNeq64F:
263 return rewriteValuegeneric_OpNeq64F(v)
264 case OpNeq8:
265 return rewriteValuegeneric_OpNeq8(v)
266 case OpNeqB:
267 return rewriteValuegeneric_OpNeqB(v)
268 case OpNeqInter:
269 return rewriteValuegeneric_OpNeqInter(v)
270 case OpNeqPtr:
271 return rewriteValuegeneric_OpNeqPtr(v)
272 case OpNeqSlice:
273 return rewriteValuegeneric_OpNeqSlice(v)
274 case OpNilCheck:
275 return rewriteValuegeneric_OpNilCheck(v)
276 case OpNot:
277 return rewriteValuegeneric_OpNot(v)
278 case OpOffPtr:
279 return rewriteValuegeneric_OpOffPtr(v)
280 case OpOr16:
281 return rewriteValuegeneric_OpOr16(v)
282 case OpOr32:
283 return rewriteValuegeneric_OpOr32(v)
284 case OpOr64:
285 return rewriteValuegeneric_OpOr64(v)
286 case OpOr8:
287 return rewriteValuegeneric_OpOr8(v)
288 case OpOrB:
289 return rewriteValuegeneric_OpOrB(v)
290 case OpPhi:
291 return rewriteValuegeneric_OpPhi(v)
292 case OpPtrIndex:
293 return rewriteValuegeneric_OpPtrIndex(v)
294 case OpRotateLeft16:
295 return rewriteValuegeneric_OpRotateLeft16(v)
296 case OpRotateLeft32:
297 return rewriteValuegeneric_OpRotateLeft32(v)
298 case OpRotateLeft64:
299 return rewriteValuegeneric_OpRotateLeft64(v)
300 case OpRotateLeft8:
301 return rewriteValuegeneric_OpRotateLeft8(v)
302 case OpRound32F:
303 return rewriteValuegeneric_OpRound32F(v)
304 case OpRound64F:
305 return rewriteValuegeneric_OpRound64F(v)
306 case OpRoundToEven:
307 return rewriteValuegeneric_OpRoundToEven(v)
308 case OpRsh16Ux16:
309 return rewriteValuegeneric_OpRsh16Ux16(v)
310 case OpRsh16Ux32:
311 return rewriteValuegeneric_OpRsh16Ux32(v)
312 case OpRsh16Ux64:
313 return rewriteValuegeneric_OpRsh16Ux64(v)
314 case OpRsh16Ux8:
315 return rewriteValuegeneric_OpRsh16Ux8(v)
316 case OpRsh16x16:
317 return rewriteValuegeneric_OpRsh16x16(v)
318 case OpRsh16x32:
319 return rewriteValuegeneric_OpRsh16x32(v)
320 case OpRsh16x64:
321 return rewriteValuegeneric_OpRsh16x64(v)
322 case OpRsh16x8:
323 return rewriteValuegeneric_OpRsh16x8(v)
324 case OpRsh32Ux16:
325 return rewriteValuegeneric_OpRsh32Ux16(v)
326 case OpRsh32Ux32:
327 return rewriteValuegeneric_OpRsh32Ux32(v)
328 case OpRsh32Ux64:
329 return rewriteValuegeneric_OpRsh32Ux64(v)
330 case OpRsh32Ux8:
331 return rewriteValuegeneric_OpRsh32Ux8(v)
332 case OpRsh32x16:
333 return rewriteValuegeneric_OpRsh32x16(v)
334 case OpRsh32x32:
335 return rewriteValuegeneric_OpRsh32x32(v)
336 case OpRsh32x64:
337 return rewriteValuegeneric_OpRsh32x64(v)
338 case OpRsh32x8:
339 return rewriteValuegeneric_OpRsh32x8(v)
340 case OpRsh64Ux16:
341 return rewriteValuegeneric_OpRsh64Ux16(v)
342 case OpRsh64Ux32:
343 return rewriteValuegeneric_OpRsh64Ux32(v)
344 case OpRsh64Ux64:
345 return rewriteValuegeneric_OpRsh64Ux64(v)
346 case OpRsh64Ux8:
347 return rewriteValuegeneric_OpRsh64Ux8(v)
348 case OpRsh64x16:
349 return rewriteValuegeneric_OpRsh64x16(v)
350 case OpRsh64x32:
351 return rewriteValuegeneric_OpRsh64x32(v)
352 case OpRsh64x64:
353 return rewriteValuegeneric_OpRsh64x64(v)
354 case OpRsh64x8:
355 return rewriteValuegeneric_OpRsh64x8(v)
356 case OpRsh8Ux16:
357 return rewriteValuegeneric_OpRsh8Ux16(v)
358 case OpRsh8Ux32:
359 return rewriteValuegeneric_OpRsh8Ux32(v)
360 case OpRsh8Ux64:
361 return rewriteValuegeneric_OpRsh8Ux64(v)
362 case OpRsh8Ux8:
363 return rewriteValuegeneric_OpRsh8Ux8(v)
364 case OpRsh8x16:
365 return rewriteValuegeneric_OpRsh8x16(v)
366 case OpRsh8x32:
367 return rewriteValuegeneric_OpRsh8x32(v)
368 case OpRsh8x64:
369 return rewriteValuegeneric_OpRsh8x64(v)
370 case OpRsh8x8:
371 return rewriteValuegeneric_OpRsh8x8(v)
372 case OpSelect0:
373 return rewriteValuegeneric_OpSelect0(v)
374 case OpSelect1:
375 return rewriteValuegeneric_OpSelect1(v)
376 case OpSelectN:
377 return rewriteValuegeneric_OpSelectN(v)
378 case OpSignExt16to32:
379 return rewriteValuegeneric_OpSignExt16to32(v)
380 case OpSignExt16to64:
381 return rewriteValuegeneric_OpSignExt16to64(v)
382 case OpSignExt32to64:
383 return rewriteValuegeneric_OpSignExt32to64(v)
384 case OpSignExt8to16:
385 return rewriteValuegeneric_OpSignExt8to16(v)
386 case OpSignExt8to32:
387 return rewriteValuegeneric_OpSignExt8to32(v)
388 case OpSignExt8to64:
389 return rewriteValuegeneric_OpSignExt8to64(v)
390 case OpSliceCap:
391 return rewriteValuegeneric_OpSliceCap(v)
392 case OpSliceLen:
393 return rewriteValuegeneric_OpSliceLen(v)
394 case OpSlicePtr:
395 return rewriteValuegeneric_OpSlicePtr(v)
396 case OpSlicemask:
397 return rewriteValuegeneric_OpSlicemask(v)
398 case OpSqrt:
399 return rewriteValuegeneric_OpSqrt(v)
400 case OpStaticCall:
401 return rewriteValuegeneric_OpStaticCall(v)
402 case OpStaticLECall:
403 return rewriteValuegeneric_OpStaticLECall(v)
404 case OpStore:
405 return rewriteValuegeneric_OpStore(v)
406 case OpStringLen:
407 return rewriteValuegeneric_OpStringLen(v)
408 case OpStringPtr:
409 return rewriteValuegeneric_OpStringPtr(v)
410 case OpStructSelect:
411 return rewriteValuegeneric_OpStructSelect(v)
412 case OpSub16:
413 return rewriteValuegeneric_OpSub16(v)
414 case OpSub32:
415 return rewriteValuegeneric_OpSub32(v)
416 case OpSub32F:
417 return rewriteValuegeneric_OpSub32F(v)
418 case OpSub64:
419 return rewriteValuegeneric_OpSub64(v)
420 case OpSub64F:
421 return rewriteValuegeneric_OpSub64F(v)
422 case OpSub8:
423 return rewriteValuegeneric_OpSub8(v)
424 case OpTrunc:
425 return rewriteValuegeneric_OpTrunc(v)
426 case OpTrunc16to8:
427 return rewriteValuegeneric_OpTrunc16to8(v)
428 case OpTrunc32to16:
429 return rewriteValuegeneric_OpTrunc32to16(v)
430 case OpTrunc32to8:
431 return rewriteValuegeneric_OpTrunc32to8(v)
432 case OpTrunc64to16:
433 return rewriteValuegeneric_OpTrunc64to16(v)
434 case OpTrunc64to32:
435 return rewriteValuegeneric_OpTrunc64to32(v)
436 case OpTrunc64to8:
437 return rewriteValuegeneric_OpTrunc64to8(v)
438 case OpXor16:
439 return rewriteValuegeneric_OpXor16(v)
440 case OpXor32:
441 return rewriteValuegeneric_OpXor32(v)
442 case OpXor64:
443 return rewriteValuegeneric_OpXor64(v)
444 case OpXor8:
445 return rewriteValuegeneric_OpXor8(v)
446 case OpZero:
447 return rewriteValuegeneric_OpZero(v)
448 case OpZeroExt16to32:
449 return rewriteValuegeneric_OpZeroExt16to32(v)
450 case OpZeroExt16to64:
451 return rewriteValuegeneric_OpZeroExt16to64(v)
452 case OpZeroExt32to64:
453 return rewriteValuegeneric_OpZeroExt32to64(v)
454 case OpZeroExt8to16:
455 return rewriteValuegeneric_OpZeroExt8to16(v)
456 case OpZeroExt8to32:
457 return rewriteValuegeneric_OpZeroExt8to32(v)
458 case OpZeroExt8to64:
459 return rewriteValuegeneric_OpZeroExt8to64(v)
460 }
461 return false
462 }
463 func rewriteValuegeneric_OpAdd16(v *Value) bool {
464 v_1 := v.Args[1]
465 v_0 := v.Args[0]
466 b := v.Block
467 config := b.Func.Config
468
469
470 for {
471 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
472 if v_0.Op != OpConst16 {
473 continue
474 }
475 c := auxIntToInt16(v_0.AuxInt)
476 if v_1.Op != OpConst16 {
477 continue
478 }
479 d := auxIntToInt16(v_1.AuxInt)
480 v.reset(OpConst16)
481 v.AuxInt = int16ToAuxInt(c + d)
482 return true
483 }
484 break
485 }
486
487
488 for {
489 t := v.Type
490 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
491 if v_0.Op != OpMul16 {
492 continue
493 }
494 _ = v_0.Args[1]
495 v_0_0 := v_0.Args[0]
496 v_0_1 := v_0.Args[1]
497 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
498 x := v_0_0
499 y := v_0_1
500 if v_1.Op != OpMul16 {
501 continue
502 }
503 _ = v_1.Args[1]
504 v_1_0 := v_1.Args[0]
505 v_1_1 := v_1.Args[1]
506 for _i2 := 0; _i2 <= 1; _i2, v_1_0, v_1_1 = _i2+1, v_1_1, v_1_0 {
507 if x != v_1_0 {
508 continue
509 }
510 z := v_1_1
511 v.reset(OpMul16)
512 v0 := b.NewValue0(v.Pos, OpAdd16, t)
513 v0.AddArg2(y, z)
514 v.AddArg2(x, v0)
515 return true
516 }
517 }
518 }
519 break
520 }
521
522
523 for {
524 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
525 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 {
526 continue
527 }
528 x := v_1
529 v.copyOf(x)
530 return true
531 }
532 break
533 }
534
535
536 for {
537 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
538 x := v_0
539 if v_1.Op != OpNeg16 {
540 continue
541 }
542 y := v_1.Args[0]
543 v.reset(OpSub16)
544 v.AddArg2(x, y)
545 return true
546 }
547 break
548 }
549
550
551 for {
552 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
553 if v_0.Op != OpCom16 {
554 continue
555 }
556 x := v_0.Args[0]
557 if x != v_1 {
558 continue
559 }
560 v.reset(OpConst16)
561 v.AuxInt = int16ToAuxInt(-1)
562 return true
563 }
564 break
565 }
566
567
568 for {
569 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
570 if v_0.Op != OpSub16 {
571 continue
572 }
573 t := v_0.Args[1]
574 x := v_0.Args[0]
575 if v_1.Op != OpAdd16 {
576 continue
577 }
578 _ = v_1.Args[1]
579 v_1_0 := v_1.Args[0]
580 v_1_1 := v_1.Args[1]
581 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
582 if t != v_1_0 {
583 continue
584 }
585 y := v_1_1
586 v.reset(OpAdd16)
587 v.AddArg2(x, y)
588 return true
589 }
590 }
591 break
592 }
593
594
595 for {
596 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
597 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 1 || v_1.Op != OpCom16 {
598 continue
599 }
600 x := v_1.Args[0]
601 v.reset(OpNeg16)
602 v.AddArg(x)
603 return true
604 }
605 break
606 }
607
608
609 for {
610 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
611 x := v_0
612 if v_1.Op != OpSub16 {
613 continue
614 }
615 _ = v_1.Args[1]
616 y := v_1.Args[0]
617 if x != v_1.Args[1] {
618 continue
619 }
620 v.copyOf(y)
621 return true
622 }
623 break
624 }
625
626
627 for {
628 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
629 x := v_0
630 if v_1.Op != OpAdd16 {
631 continue
632 }
633 _ = v_1.Args[1]
634 v_1_0 := v_1.Args[0]
635 v_1_1 := v_1.Args[1]
636 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
637 y := v_1_0
638 if v_1_1.Op != OpSub16 {
639 continue
640 }
641 _ = v_1_1.Args[1]
642 z := v_1_1.Args[0]
643 if x != v_1_1.Args[1] {
644 continue
645 }
646 v.reset(OpAdd16)
647 v.AddArg2(y, z)
648 return true
649 }
650 }
651 break
652 }
653
654
655
656 for {
657 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
658 if v_0.Op != OpAdd16 {
659 continue
660 }
661 _ = v_0.Args[1]
662 v_0_0 := v_0.Args[0]
663 v_0_1 := v_0.Args[1]
664 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
665 i := v_0_0
666 if i.Op != OpConst16 {
667 continue
668 }
669 t := i.Type
670 z := v_0_1
671 x := v_1
672 if !(z.Op != OpConst16 && x.Op != OpConst16) {
673 continue
674 }
675 v.reset(OpAdd16)
676 v0 := b.NewValue0(v.Pos, OpAdd16, t)
677 v0.AddArg2(z, x)
678 v.AddArg2(i, v0)
679 return true
680 }
681 }
682 break
683 }
684
685
686
687 for {
688 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
689 if v_0.Op != OpSub16 {
690 continue
691 }
692 z := v_0.Args[1]
693 i := v_0.Args[0]
694 if i.Op != OpConst16 {
695 continue
696 }
697 t := i.Type
698 x := v_1
699 if !(z.Op != OpConst16 && x.Op != OpConst16) {
700 continue
701 }
702 v.reset(OpAdd16)
703 v0 := b.NewValue0(v.Pos, OpSub16, t)
704 v0.AddArg2(x, z)
705 v.AddArg2(i, v0)
706 return true
707 }
708 break
709 }
710
711
712 for {
713 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
714 if v_0.Op != OpConst16 {
715 continue
716 }
717 t := v_0.Type
718 c := auxIntToInt16(v_0.AuxInt)
719 if v_1.Op != OpAdd16 {
720 continue
721 }
722 _ = v_1.Args[1]
723 v_1_0 := v_1.Args[0]
724 v_1_1 := v_1.Args[1]
725 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
726 if v_1_0.Op != OpConst16 || v_1_0.Type != t {
727 continue
728 }
729 d := auxIntToInt16(v_1_0.AuxInt)
730 x := v_1_1
731 v.reset(OpAdd16)
732 v0 := b.NewValue0(v.Pos, OpConst16, t)
733 v0.AuxInt = int16ToAuxInt(c + d)
734 v.AddArg2(v0, x)
735 return true
736 }
737 }
738 break
739 }
740
741
742 for {
743 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
744 if v_0.Op != OpConst16 {
745 continue
746 }
747 t := v_0.Type
748 c := auxIntToInt16(v_0.AuxInt)
749 if v_1.Op != OpSub16 {
750 continue
751 }
752 x := v_1.Args[1]
753 v_1_0 := v_1.Args[0]
754 if v_1_0.Op != OpConst16 || v_1_0.Type != t {
755 continue
756 }
757 d := auxIntToInt16(v_1_0.AuxInt)
758 v.reset(OpSub16)
759 v0 := b.NewValue0(v.Pos, OpConst16, t)
760 v0.AuxInt = int16ToAuxInt(c + d)
761 v.AddArg2(v0, x)
762 return true
763 }
764 break
765 }
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 != OpLsh16x64 {
772 continue
773 }
774 _ = v_0.Args[1]
775 x := v_0.Args[0]
776 z := v_0.Args[1]
777 if z.Op != OpConst64 {
778 continue
779 }
780 c := auxIntToInt64(z.AuxInt)
781 if v_1.Op != OpRsh16Ux64 {
782 continue
783 }
784 _ = v_1.Args[1]
785 if x != v_1.Args[0] {
786 continue
787 }
788 v_1_1 := v_1.Args[1]
789 if v_1_1.Op != OpConst64 {
790 continue
791 }
792 d := auxIntToInt64(v_1_1.AuxInt)
793 if !(c < 16 && d == 16-c && canRotate(config, 16)) {
794 continue
795 }
796 v.reset(OpRotateLeft16)
797 v.AddArg2(x, z)
798 return true
799 }
800 break
801 }
802
803
804
805 for {
806 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
807 left := v_0
808 if left.Op != OpLsh16x64 {
809 continue
810 }
811 y := left.Args[1]
812 x := left.Args[0]
813 right := v_1
814 if right.Op != OpRsh16Ux64 {
815 continue
816 }
817 _ = right.Args[1]
818 if x != right.Args[0] {
819 continue
820 }
821 right_1 := right.Args[1]
822 if right_1.Op != OpSub64 {
823 continue
824 }
825 _ = right_1.Args[1]
826 right_1_0 := right_1.Args[0]
827 if right_1_0.Op != OpConst64 || auxIntToInt64(right_1_0.AuxInt) != 16 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 16)) {
828 continue
829 }
830 v.reset(OpRotateLeft16)
831 v.AddArg2(x, y)
832 return true
833 }
834 break
835 }
836
837
838
839 for {
840 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
841 left := v_0
842 if left.Op != OpLsh16x32 {
843 continue
844 }
845 y := left.Args[1]
846 x := left.Args[0]
847 right := v_1
848 if right.Op != OpRsh16Ux32 {
849 continue
850 }
851 _ = right.Args[1]
852 if x != right.Args[0] {
853 continue
854 }
855 right_1 := right.Args[1]
856 if right_1.Op != OpSub32 {
857 continue
858 }
859 _ = right_1.Args[1]
860 right_1_0 := right_1.Args[0]
861 if right_1_0.Op != OpConst32 || auxIntToInt32(right_1_0.AuxInt) != 16 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 16)) {
862 continue
863 }
864 v.reset(OpRotateLeft16)
865 v.AddArg2(x, y)
866 return true
867 }
868 break
869 }
870
871
872
873 for {
874 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
875 left := v_0
876 if left.Op != OpLsh16x16 {
877 continue
878 }
879 y := left.Args[1]
880 x := left.Args[0]
881 right := v_1
882 if right.Op != OpRsh16Ux16 {
883 continue
884 }
885 _ = right.Args[1]
886 if x != right.Args[0] {
887 continue
888 }
889 right_1 := right.Args[1]
890 if right_1.Op != OpSub16 {
891 continue
892 }
893 _ = right_1.Args[1]
894 right_1_0 := right_1.Args[0]
895 if right_1_0.Op != OpConst16 || auxIntToInt16(right_1_0.AuxInt) != 16 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 16)) {
896 continue
897 }
898 v.reset(OpRotateLeft16)
899 v.AddArg2(x, y)
900 return true
901 }
902 break
903 }
904
905
906
907 for {
908 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
909 left := v_0
910 if left.Op != OpLsh16x8 {
911 continue
912 }
913 y := left.Args[1]
914 x := left.Args[0]
915 right := v_1
916 if right.Op != OpRsh16Ux8 {
917 continue
918 }
919 _ = right.Args[1]
920 if x != right.Args[0] {
921 continue
922 }
923 right_1 := right.Args[1]
924 if right_1.Op != OpSub8 {
925 continue
926 }
927 _ = right_1.Args[1]
928 right_1_0 := right_1.Args[0]
929 if right_1_0.Op != OpConst8 || auxIntToInt8(right_1_0.AuxInt) != 16 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 16)) {
930 continue
931 }
932 v.reset(OpRotateLeft16)
933 v.AddArg2(x, y)
934 return true
935 }
936 break
937 }
938
939
940
941 for {
942 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
943 right := v_0
944 if right.Op != OpRsh16Ux64 {
945 continue
946 }
947 y := right.Args[1]
948 x := right.Args[0]
949 left := v_1
950 if left.Op != OpLsh16x64 {
951 continue
952 }
953 _ = left.Args[1]
954 if x != left.Args[0] {
955 continue
956 }
957 z := left.Args[1]
958 if z.Op != OpSub64 {
959 continue
960 }
961 _ = z.Args[1]
962 z_0 := z.Args[0]
963 if z_0.Op != OpConst64 || auxIntToInt64(z_0.AuxInt) != 16 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 16)) {
964 continue
965 }
966 v.reset(OpRotateLeft16)
967 v.AddArg2(x, z)
968 return true
969 }
970 break
971 }
972
973
974
975 for {
976 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
977 right := v_0
978 if right.Op != OpRsh16Ux32 {
979 continue
980 }
981 y := right.Args[1]
982 x := right.Args[0]
983 left := v_1
984 if left.Op != OpLsh16x32 {
985 continue
986 }
987 _ = left.Args[1]
988 if x != left.Args[0] {
989 continue
990 }
991 z := left.Args[1]
992 if z.Op != OpSub32 {
993 continue
994 }
995 _ = z.Args[1]
996 z_0 := z.Args[0]
997 if z_0.Op != OpConst32 || auxIntToInt32(z_0.AuxInt) != 16 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 16)) {
998 continue
999 }
1000 v.reset(OpRotateLeft16)
1001 v.AddArg2(x, z)
1002 return true
1003 }
1004 break
1005 }
1006
1007
1008
1009 for {
1010 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1011 right := v_0
1012 if right.Op != OpRsh16Ux16 {
1013 continue
1014 }
1015 y := right.Args[1]
1016 x := right.Args[0]
1017 left := v_1
1018 if left.Op != OpLsh16x16 {
1019 continue
1020 }
1021 _ = left.Args[1]
1022 if x != left.Args[0] {
1023 continue
1024 }
1025 z := left.Args[1]
1026 if z.Op != OpSub16 {
1027 continue
1028 }
1029 _ = z.Args[1]
1030 z_0 := z.Args[0]
1031 if z_0.Op != OpConst16 || auxIntToInt16(z_0.AuxInt) != 16 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 16)) {
1032 continue
1033 }
1034 v.reset(OpRotateLeft16)
1035 v.AddArg2(x, z)
1036 return true
1037 }
1038 break
1039 }
1040
1041
1042
1043 for {
1044 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1045 right := v_0
1046 if right.Op != OpRsh16Ux8 {
1047 continue
1048 }
1049 y := right.Args[1]
1050 x := right.Args[0]
1051 left := v_1
1052 if left.Op != OpLsh16x8 {
1053 continue
1054 }
1055 _ = left.Args[1]
1056 if x != left.Args[0] {
1057 continue
1058 }
1059 z := left.Args[1]
1060 if z.Op != OpSub8 {
1061 continue
1062 }
1063 _ = z.Args[1]
1064 z_0 := z.Args[0]
1065 if z_0.Op != OpConst8 || auxIntToInt8(z_0.AuxInt) != 16 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 16)) {
1066 continue
1067 }
1068 v.reset(OpRotateLeft16)
1069 v.AddArg2(x, z)
1070 return true
1071 }
1072 break
1073 }
1074 return false
1075 }
1076 func rewriteValuegeneric_OpAdd32(v *Value) bool {
1077 v_1 := v.Args[1]
1078 v_0 := v.Args[0]
1079 b := v.Block
1080 config := b.Func.Config
1081
1082
1083 for {
1084 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1085 if v_0.Op != OpConst32 {
1086 continue
1087 }
1088 c := auxIntToInt32(v_0.AuxInt)
1089 if v_1.Op != OpConst32 {
1090 continue
1091 }
1092 d := auxIntToInt32(v_1.AuxInt)
1093 v.reset(OpConst32)
1094 v.AuxInt = int32ToAuxInt(c + d)
1095 return true
1096 }
1097 break
1098 }
1099
1100
1101 for {
1102 t := v.Type
1103 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1104 if v_0.Op != OpMul32 {
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 x := v_0_0
1112 y := v_0_1
1113 if v_1.Op != OpMul32 {
1114 continue
1115 }
1116 _ = v_1.Args[1]
1117 v_1_0 := v_1.Args[0]
1118 v_1_1 := v_1.Args[1]
1119 for _i2 := 0; _i2 <= 1; _i2, v_1_0, v_1_1 = _i2+1, v_1_1, v_1_0 {
1120 if x != v_1_0 {
1121 continue
1122 }
1123 z := v_1_1
1124 v.reset(OpMul32)
1125 v0 := b.NewValue0(v.Pos, OpAdd32, t)
1126 v0.AddArg2(y, z)
1127 v.AddArg2(x, v0)
1128 return true
1129 }
1130 }
1131 }
1132 break
1133 }
1134
1135
1136 for {
1137 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1138 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
1139 continue
1140 }
1141 x := v_1
1142 v.copyOf(x)
1143 return true
1144 }
1145 break
1146 }
1147
1148
1149 for {
1150 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1151 x := v_0
1152 if v_1.Op != OpNeg32 {
1153 continue
1154 }
1155 y := v_1.Args[0]
1156 v.reset(OpSub32)
1157 v.AddArg2(x, y)
1158 return true
1159 }
1160 break
1161 }
1162
1163
1164 for {
1165 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1166 if v_0.Op != OpCom32 {
1167 continue
1168 }
1169 x := v_0.Args[0]
1170 if x != v_1 {
1171 continue
1172 }
1173 v.reset(OpConst32)
1174 v.AuxInt = int32ToAuxInt(-1)
1175 return true
1176 }
1177 break
1178 }
1179
1180
1181 for {
1182 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1183 if v_0.Op != OpSub32 {
1184 continue
1185 }
1186 t := v_0.Args[1]
1187 x := v_0.Args[0]
1188 if v_1.Op != OpAdd32 {
1189 continue
1190 }
1191 _ = v_1.Args[1]
1192 v_1_0 := v_1.Args[0]
1193 v_1_1 := v_1.Args[1]
1194 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
1195 if t != v_1_0 {
1196 continue
1197 }
1198 y := v_1_1
1199 v.reset(OpAdd32)
1200 v.AddArg2(x, y)
1201 return true
1202 }
1203 }
1204 break
1205 }
1206
1207
1208 for {
1209 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1210 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 1 || v_1.Op != OpCom32 {
1211 continue
1212 }
1213 x := v_1.Args[0]
1214 v.reset(OpNeg32)
1215 v.AddArg(x)
1216 return true
1217 }
1218 break
1219 }
1220
1221
1222 for {
1223 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1224 x := v_0
1225 if v_1.Op != OpSub32 {
1226 continue
1227 }
1228 _ = v_1.Args[1]
1229 y := v_1.Args[0]
1230 if x != v_1.Args[1] {
1231 continue
1232 }
1233 v.copyOf(y)
1234 return true
1235 }
1236 break
1237 }
1238
1239
1240 for {
1241 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1242 x := v_0
1243 if v_1.Op != OpAdd32 {
1244 continue
1245 }
1246 _ = v_1.Args[1]
1247 v_1_0 := v_1.Args[0]
1248 v_1_1 := v_1.Args[1]
1249 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
1250 y := v_1_0
1251 if v_1_1.Op != OpSub32 {
1252 continue
1253 }
1254 _ = v_1_1.Args[1]
1255 z := v_1_1.Args[0]
1256 if x != v_1_1.Args[1] {
1257 continue
1258 }
1259 v.reset(OpAdd32)
1260 v.AddArg2(y, z)
1261 return true
1262 }
1263 }
1264 break
1265 }
1266
1267
1268
1269 for {
1270 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1271 if v_0.Op != OpAdd32 {
1272 continue
1273 }
1274 _ = v_0.Args[1]
1275 v_0_0 := v_0.Args[0]
1276 v_0_1 := v_0.Args[1]
1277 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
1278 i := v_0_0
1279 if i.Op != OpConst32 {
1280 continue
1281 }
1282 t := i.Type
1283 z := v_0_1
1284 x := v_1
1285 if !(z.Op != OpConst32 && x.Op != OpConst32) {
1286 continue
1287 }
1288 v.reset(OpAdd32)
1289 v0 := b.NewValue0(v.Pos, OpAdd32, t)
1290 v0.AddArg2(z, x)
1291 v.AddArg2(i, v0)
1292 return true
1293 }
1294 }
1295 break
1296 }
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 != OpSub32 {
1303 continue
1304 }
1305 z := v_0.Args[1]
1306 i := v_0.Args[0]
1307 if i.Op != OpConst32 {
1308 continue
1309 }
1310 t := i.Type
1311 x := v_1
1312 if !(z.Op != OpConst32 && x.Op != OpConst32) {
1313 continue
1314 }
1315 v.reset(OpAdd32)
1316 v0 := b.NewValue0(v.Pos, OpSub32, t)
1317 v0.AddArg2(x, z)
1318 v.AddArg2(i, v0)
1319 return true
1320 }
1321 break
1322 }
1323
1324
1325 for {
1326 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1327 if v_0.Op != OpConst32 {
1328 continue
1329 }
1330 t := v_0.Type
1331 c := auxIntToInt32(v_0.AuxInt)
1332 if v_1.Op != OpAdd32 {
1333 continue
1334 }
1335 _ = v_1.Args[1]
1336 v_1_0 := v_1.Args[0]
1337 v_1_1 := v_1.Args[1]
1338 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
1339 if v_1_0.Op != OpConst32 || v_1_0.Type != t {
1340 continue
1341 }
1342 d := auxIntToInt32(v_1_0.AuxInt)
1343 x := v_1_1
1344 v.reset(OpAdd32)
1345 v0 := b.NewValue0(v.Pos, OpConst32, t)
1346 v0.AuxInt = int32ToAuxInt(c + d)
1347 v.AddArg2(v0, x)
1348 return true
1349 }
1350 }
1351 break
1352 }
1353
1354
1355 for {
1356 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1357 if v_0.Op != OpConst32 {
1358 continue
1359 }
1360 t := v_0.Type
1361 c := auxIntToInt32(v_0.AuxInt)
1362 if v_1.Op != OpSub32 {
1363 continue
1364 }
1365 x := v_1.Args[1]
1366 v_1_0 := v_1.Args[0]
1367 if v_1_0.Op != OpConst32 || v_1_0.Type != t {
1368 continue
1369 }
1370 d := auxIntToInt32(v_1_0.AuxInt)
1371 v.reset(OpSub32)
1372 v0 := b.NewValue0(v.Pos, OpConst32, t)
1373 v0.AuxInt = int32ToAuxInt(c + d)
1374 v.AddArg2(v0, x)
1375 return true
1376 }
1377 break
1378 }
1379
1380
1381
1382 for {
1383 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1384 if v_0.Op != OpLsh32x64 {
1385 continue
1386 }
1387 _ = v_0.Args[1]
1388 x := v_0.Args[0]
1389 z := v_0.Args[1]
1390 if z.Op != OpConst64 {
1391 continue
1392 }
1393 c := auxIntToInt64(z.AuxInt)
1394 if v_1.Op != OpRsh32Ux64 {
1395 continue
1396 }
1397 _ = v_1.Args[1]
1398 if x != v_1.Args[0] {
1399 continue
1400 }
1401 v_1_1 := v_1.Args[1]
1402 if v_1_1.Op != OpConst64 {
1403 continue
1404 }
1405 d := auxIntToInt64(v_1_1.AuxInt)
1406 if !(c < 32 && d == 32-c && canRotate(config, 32)) {
1407 continue
1408 }
1409 v.reset(OpRotateLeft32)
1410 v.AddArg2(x, z)
1411 return true
1412 }
1413 break
1414 }
1415
1416
1417
1418 for {
1419 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1420 left := v_0
1421 if left.Op != OpLsh32x64 {
1422 continue
1423 }
1424 y := left.Args[1]
1425 x := left.Args[0]
1426 right := v_1
1427 if right.Op != OpRsh32Ux64 {
1428 continue
1429 }
1430 _ = right.Args[1]
1431 if x != right.Args[0] {
1432 continue
1433 }
1434 right_1 := right.Args[1]
1435 if right_1.Op != OpSub64 {
1436 continue
1437 }
1438 _ = right_1.Args[1]
1439 right_1_0 := right_1.Args[0]
1440 if right_1_0.Op != OpConst64 || auxIntToInt64(right_1_0.AuxInt) != 32 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 32)) {
1441 continue
1442 }
1443 v.reset(OpRotateLeft32)
1444 v.AddArg2(x, y)
1445 return true
1446 }
1447 break
1448 }
1449
1450
1451
1452 for {
1453 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1454 left := v_0
1455 if left.Op != OpLsh32x32 {
1456 continue
1457 }
1458 y := left.Args[1]
1459 x := left.Args[0]
1460 right := v_1
1461 if right.Op != OpRsh32Ux32 {
1462 continue
1463 }
1464 _ = right.Args[1]
1465 if x != right.Args[0] {
1466 continue
1467 }
1468 right_1 := right.Args[1]
1469 if right_1.Op != OpSub32 {
1470 continue
1471 }
1472 _ = right_1.Args[1]
1473 right_1_0 := right_1.Args[0]
1474 if right_1_0.Op != OpConst32 || auxIntToInt32(right_1_0.AuxInt) != 32 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 32)) {
1475 continue
1476 }
1477 v.reset(OpRotateLeft32)
1478 v.AddArg2(x, y)
1479 return true
1480 }
1481 break
1482 }
1483
1484
1485
1486 for {
1487 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1488 left := v_0
1489 if left.Op != OpLsh32x16 {
1490 continue
1491 }
1492 y := left.Args[1]
1493 x := left.Args[0]
1494 right := v_1
1495 if right.Op != OpRsh32Ux16 {
1496 continue
1497 }
1498 _ = right.Args[1]
1499 if x != right.Args[0] {
1500 continue
1501 }
1502 right_1 := right.Args[1]
1503 if right_1.Op != OpSub16 {
1504 continue
1505 }
1506 _ = right_1.Args[1]
1507 right_1_0 := right_1.Args[0]
1508 if right_1_0.Op != OpConst16 || auxIntToInt16(right_1_0.AuxInt) != 32 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 32)) {
1509 continue
1510 }
1511 v.reset(OpRotateLeft32)
1512 v.AddArg2(x, y)
1513 return true
1514 }
1515 break
1516 }
1517
1518
1519
1520 for {
1521 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1522 left := v_0
1523 if left.Op != OpLsh32x8 {
1524 continue
1525 }
1526 y := left.Args[1]
1527 x := left.Args[0]
1528 right := v_1
1529 if right.Op != OpRsh32Ux8 {
1530 continue
1531 }
1532 _ = right.Args[1]
1533 if x != right.Args[0] {
1534 continue
1535 }
1536 right_1 := right.Args[1]
1537 if right_1.Op != OpSub8 {
1538 continue
1539 }
1540 _ = right_1.Args[1]
1541 right_1_0 := right_1.Args[0]
1542 if right_1_0.Op != OpConst8 || auxIntToInt8(right_1_0.AuxInt) != 32 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 32)) {
1543 continue
1544 }
1545 v.reset(OpRotateLeft32)
1546 v.AddArg2(x, y)
1547 return true
1548 }
1549 break
1550 }
1551
1552
1553
1554 for {
1555 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1556 right := v_0
1557 if right.Op != OpRsh32Ux64 {
1558 continue
1559 }
1560 y := right.Args[1]
1561 x := right.Args[0]
1562 left := v_1
1563 if left.Op != OpLsh32x64 {
1564 continue
1565 }
1566 _ = left.Args[1]
1567 if x != left.Args[0] {
1568 continue
1569 }
1570 z := left.Args[1]
1571 if z.Op != OpSub64 {
1572 continue
1573 }
1574 _ = z.Args[1]
1575 z_0 := z.Args[0]
1576 if z_0.Op != OpConst64 || auxIntToInt64(z_0.AuxInt) != 32 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 32)) {
1577 continue
1578 }
1579 v.reset(OpRotateLeft32)
1580 v.AddArg2(x, z)
1581 return true
1582 }
1583 break
1584 }
1585
1586
1587
1588 for {
1589 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1590 right := v_0
1591 if right.Op != OpRsh32Ux32 {
1592 continue
1593 }
1594 y := right.Args[1]
1595 x := right.Args[0]
1596 left := v_1
1597 if left.Op != OpLsh32x32 {
1598 continue
1599 }
1600 _ = left.Args[1]
1601 if x != left.Args[0] {
1602 continue
1603 }
1604 z := left.Args[1]
1605 if z.Op != OpSub32 {
1606 continue
1607 }
1608 _ = z.Args[1]
1609 z_0 := z.Args[0]
1610 if z_0.Op != OpConst32 || auxIntToInt32(z_0.AuxInt) != 32 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 32)) {
1611 continue
1612 }
1613 v.reset(OpRotateLeft32)
1614 v.AddArg2(x, z)
1615 return true
1616 }
1617 break
1618 }
1619
1620
1621
1622 for {
1623 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1624 right := v_0
1625 if right.Op != OpRsh32Ux16 {
1626 continue
1627 }
1628 y := right.Args[1]
1629 x := right.Args[0]
1630 left := v_1
1631 if left.Op != OpLsh32x16 {
1632 continue
1633 }
1634 _ = left.Args[1]
1635 if x != left.Args[0] {
1636 continue
1637 }
1638 z := left.Args[1]
1639 if z.Op != OpSub16 {
1640 continue
1641 }
1642 _ = z.Args[1]
1643 z_0 := z.Args[0]
1644 if z_0.Op != OpConst16 || auxIntToInt16(z_0.AuxInt) != 32 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 32)) {
1645 continue
1646 }
1647 v.reset(OpRotateLeft32)
1648 v.AddArg2(x, z)
1649 return true
1650 }
1651 break
1652 }
1653
1654
1655
1656 for {
1657 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1658 right := v_0
1659 if right.Op != OpRsh32Ux8 {
1660 continue
1661 }
1662 y := right.Args[1]
1663 x := right.Args[0]
1664 left := v_1
1665 if left.Op != OpLsh32x8 {
1666 continue
1667 }
1668 _ = left.Args[1]
1669 if x != left.Args[0] {
1670 continue
1671 }
1672 z := left.Args[1]
1673 if z.Op != OpSub8 {
1674 continue
1675 }
1676 _ = z.Args[1]
1677 z_0 := z.Args[0]
1678 if z_0.Op != OpConst8 || auxIntToInt8(z_0.AuxInt) != 32 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 32)) {
1679 continue
1680 }
1681 v.reset(OpRotateLeft32)
1682 v.AddArg2(x, z)
1683 return true
1684 }
1685 break
1686 }
1687 return false
1688 }
1689 func rewriteValuegeneric_OpAdd32F(v *Value) bool {
1690 v_1 := v.Args[1]
1691 v_0 := v.Args[0]
1692
1693
1694
1695 for {
1696 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1697 if v_0.Op != OpConst32F {
1698 continue
1699 }
1700 c := auxIntToFloat32(v_0.AuxInt)
1701 if v_1.Op != OpConst32F {
1702 continue
1703 }
1704 d := auxIntToFloat32(v_1.AuxInt)
1705 if !(c+d == c+d) {
1706 continue
1707 }
1708 v.reset(OpConst32F)
1709 v.AuxInt = float32ToAuxInt(c + d)
1710 return true
1711 }
1712 break
1713 }
1714 return false
1715 }
1716 func rewriteValuegeneric_OpAdd64(v *Value) bool {
1717 v_1 := v.Args[1]
1718 v_0 := v.Args[0]
1719 b := v.Block
1720 config := b.Func.Config
1721
1722
1723 for {
1724 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1725 if v_0.Op != OpConst64 {
1726 continue
1727 }
1728 c := auxIntToInt64(v_0.AuxInt)
1729 if v_1.Op != OpConst64 {
1730 continue
1731 }
1732 d := auxIntToInt64(v_1.AuxInt)
1733 v.reset(OpConst64)
1734 v.AuxInt = int64ToAuxInt(c + d)
1735 return true
1736 }
1737 break
1738 }
1739
1740
1741 for {
1742 t := v.Type
1743 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1744 if v_0.Op != OpMul64 {
1745 continue
1746 }
1747 _ = v_0.Args[1]
1748 v_0_0 := v_0.Args[0]
1749 v_0_1 := v_0.Args[1]
1750 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
1751 x := v_0_0
1752 y := v_0_1
1753 if v_1.Op != OpMul64 {
1754 continue
1755 }
1756 _ = v_1.Args[1]
1757 v_1_0 := v_1.Args[0]
1758 v_1_1 := v_1.Args[1]
1759 for _i2 := 0; _i2 <= 1; _i2, v_1_0, v_1_1 = _i2+1, v_1_1, v_1_0 {
1760 if x != v_1_0 {
1761 continue
1762 }
1763 z := v_1_1
1764 v.reset(OpMul64)
1765 v0 := b.NewValue0(v.Pos, OpAdd64, t)
1766 v0.AddArg2(y, z)
1767 v.AddArg2(x, v0)
1768 return true
1769 }
1770 }
1771 }
1772 break
1773 }
1774
1775
1776 for {
1777 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1778 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
1779 continue
1780 }
1781 x := v_1
1782 v.copyOf(x)
1783 return true
1784 }
1785 break
1786 }
1787
1788
1789 for {
1790 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1791 x := v_0
1792 if v_1.Op != OpNeg64 {
1793 continue
1794 }
1795 y := v_1.Args[0]
1796 v.reset(OpSub64)
1797 v.AddArg2(x, y)
1798 return true
1799 }
1800 break
1801 }
1802
1803
1804 for {
1805 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1806 if v_0.Op != OpCom64 {
1807 continue
1808 }
1809 x := v_0.Args[0]
1810 if x != v_1 {
1811 continue
1812 }
1813 v.reset(OpConst64)
1814 v.AuxInt = int64ToAuxInt(-1)
1815 return true
1816 }
1817 break
1818 }
1819
1820
1821 for {
1822 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1823 if v_0.Op != OpSub64 {
1824 continue
1825 }
1826 t := v_0.Args[1]
1827 x := v_0.Args[0]
1828 if v_1.Op != OpAdd64 {
1829 continue
1830 }
1831 _ = v_1.Args[1]
1832 v_1_0 := v_1.Args[0]
1833 v_1_1 := v_1.Args[1]
1834 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
1835 if t != v_1_0 {
1836 continue
1837 }
1838 y := v_1_1
1839 v.reset(OpAdd64)
1840 v.AddArg2(x, y)
1841 return true
1842 }
1843 }
1844 break
1845 }
1846
1847
1848 for {
1849 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1850 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 1 || v_1.Op != OpCom64 {
1851 continue
1852 }
1853 x := v_1.Args[0]
1854 v.reset(OpNeg64)
1855 v.AddArg(x)
1856 return true
1857 }
1858 break
1859 }
1860
1861
1862 for {
1863 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1864 x := v_0
1865 if v_1.Op != OpSub64 {
1866 continue
1867 }
1868 _ = v_1.Args[1]
1869 y := v_1.Args[0]
1870 if x != v_1.Args[1] {
1871 continue
1872 }
1873 v.copyOf(y)
1874 return true
1875 }
1876 break
1877 }
1878
1879
1880 for {
1881 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1882 x := v_0
1883 if v_1.Op != OpAdd64 {
1884 continue
1885 }
1886 _ = v_1.Args[1]
1887 v_1_0 := v_1.Args[0]
1888 v_1_1 := v_1.Args[1]
1889 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
1890 y := v_1_0
1891 if v_1_1.Op != OpSub64 {
1892 continue
1893 }
1894 _ = v_1_1.Args[1]
1895 z := v_1_1.Args[0]
1896 if x != v_1_1.Args[1] {
1897 continue
1898 }
1899 v.reset(OpAdd64)
1900 v.AddArg2(y, z)
1901 return true
1902 }
1903 }
1904 break
1905 }
1906
1907
1908
1909 for {
1910 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1911 if v_0.Op != OpAdd64 {
1912 continue
1913 }
1914 _ = v_0.Args[1]
1915 v_0_0 := v_0.Args[0]
1916 v_0_1 := v_0.Args[1]
1917 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
1918 i := v_0_0
1919 if i.Op != OpConst64 {
1920 continue
1921 }
1922 t := i.Type
1923 z := v_0_1
1924 x := v_1
1925 if !(z.Op != OpConst64 && x.Op != OpConst64) {
1926 continue
1927 }
1928 v.reset(OpAdd64)
1929 v0 := b.NewValue0(v.Pos, OpAdd64, t)
1930 v0.AddArg2(z, x)
1931 v.AddArg2(i, v0)
1932 return true
1933 }
1934 }
1935 break
1936 }
1937
1938
1939
1940 for {
1941 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1942 if v_0.Op != OpSub64 {
1943 continue
1944 }
1945 z := v_0.Args[1]
1946 i := v_0.Args[0]
1947 if i.Op != OpConst64 {
1948 continue
1949 }
1950 t := i.Type
1951 x := v_1
1952 if !(z.Op != OpConst64 && x.Op != OpConst64) {
1953 continue
1954 }
1955 v.reset(OpAdd64)
1956 v0 := b.NewValue0(v.Pos, OpSub64, t)
1957 v0.AddArg2(x, z)
1958 v.AddArg2(i, v0)
1959 return true
1960 }
1961 break
1962 }
1963
1964
1965 for {
1966 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1967 if v_0.Op != OpConst64 {
1968 continue
1969 }
1970 t := v_0.Type
1971 c := auxIntToInt64(v_0.AuxInt)
1972 if v_1.Op != OpAdd64 {
1973 continue
1974 }
1975 _ = v_1.Args[1]
1976 v_1_0 := v_1.Args[0]
1977 v_1_1 := v_1.Args[1]
1978 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
1979 if v_1_0.Op != OpConst64 || v_1_0.Type != t {
1980 continue
1981 }
1982 d := auxIntToInt64(v_1_0.AuxInt)
1983 x := v_1_1
1984 v.reset(OpAdd64)
1985 v0 := b.NewValue0(v.Pos, OpConst64, t)
1986 v0.AuxInt = int64ToAuxInt(c + d)
1987 v.AddArg2(v0, x)
1988 return true
1989 }
1990 }
1991 break
1992 }
1993
1994
1995 for {
1996 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1997 if v_0.Op != OpConst64 {
1998 continue
1999 }
2000 t := v_0.Type
2001 c := auxIntToInt64(v_0.AuxInt)
2002 if v_1.Op != OpSub64 {
2003 continue
2004 }
2005 x := v_1.Args[1]
2006 v_1_0 := v_1.Args[0]
2007 if v_1_0.Op != OpConst64 || v_1_0.Type != t {
2008 continue
2009 }
2010 d := auxIntToInt64(v_1_0.AuxInt)
2011 v.reset(OpSub64)
2012 v0 := b.NewValue0(v.Pos, OpConst64, t)
2013 v0.AuxInt = int64ToAuxInt(c + d)
2014 v.AddArg2(v0, x)
2015 return true
2016 }
2017 break
2018 }
2019
2020
2021
2022 for {
2023 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2024 if v_0.Op != OpLsh64x64 {
2025 continue
2026 }
2027 _ = v_0.Args[1]
2028 x := v_0.Args[0]
2029 z := v_0.Args[1]
2030 if z.Op != OpConst64 {
2031 continue
2032 }
2033 c := auxIntToInt64(z.AuxInt)
2034 if v_1.Op != OpRsh64Ux64 {
2035 continue
2036 }
2037 _ = v_1.Args[1]
2038 if x != v_1.Args[0] {
2039 continue
2040 }
2041 v_1_1 := v_1.Args[1]
2042 if v_1_1.Op != OpConst64 {
2043 continue
2044 }
2045 d := auxIntToInt64(v_1_1.AuxInt)
2046 if !(c < 64 && d == 64-c && canRotate(config, 64)) {
2047 continue
2048 }
2049 v.reset(OpRotateLeft64)
2050 v.AddArg2(x, z)
2051 return true
2052 }
2053 break
2054 }
2055
2056
2057
2058 for {
2059 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2060 left := v_0
2061 if left.Op != OpLsh64x64 {
2062 continue
2063 }
2064 y := left.Args[1]
2065 x := left.Args[0]
2066 right := v_1
2067 if right.Op != OpRsh64Ux64 {
2068 continue
2069 }
2070 _ = right.Args[1]
2071 if x != right.Args[0] {
2072 continue
2073 }
2074 right_1 := right.Args[1]
2075 if right_1.Op != OpSub64 {
2076 continue
2077 }
2078 _ = right_1.Args[1]
2079 right_1_0 := right_1.Args[0]
2080 if right_1_0.Op != OpConst64 || auxIntToInt64(right_1_0.AuxInt) != 64 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 64)) {
2081 continue
2082 }
2083 v.reset(OpRotateLeft64)
2084 v.AddArg2(x, y)
2085 return true
2086 }
2087 break
2088 }
2089
2090
2091
2092 for {
2093 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2094 left := v_0
2095 if left.Op != OpLsh64x32 {
2096 continue
2097 }
2098 y := left.Args[1]
2099 x := left.Args[0]
2100 right := v_1
2101 if right.Op != OpRsh64Ux32 {
2102 continue
2103 }
2104 _ = right.Args[1]
2105 if x != right.Args[0] {
2106 continue
2107 }
2108 right_1 := right.Args[1]
2109 if right_1.Op != OpSub32 {
2110 continue
2111 }
2112 _ = right_1.Args[1]
2113 right_1_0 := right_1.Args[0]
2114 if right_1_0.Op != OpConst32 || auxIntToInt32(right_1_0.AuxInt) != 64 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 64)) {
2115 continue
2116 }
2117 v.reset(OpRotateLeft64)
2118 v.AddArg2(x, y)
2119 return true
2120 }
2121 break
2122 }
2123
2124
2125
2126 for {
2127 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2128 left := v_0
2129 if left.Op != OpLsh64x16 {
2130 continue
2131 }
2132 y := left.Args[1]
2133 x := left.Args[0]
2134 right := v_1
2135 if right.Op != OpRsh64Ux16 {
2136 continue
2137 }
2138 _ = right.Args[1]
2139 if x != right.Args[0] {
2140 continue
2141 }
2142 right_1 := right.Args[1]
2143 if right_1.Op != OpSub16 {
2144 continue
2145 }
2146 _ = right_1.Args[1]
2147 right_1_0 := right_1.Args[0]
2148 if right_1_0.Op != OpConst16 || auxIntToInt16(right_1_0.AuxInt) != 64 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 64)) {
2149 continue
2150 }
2151 v.reset(OpRotateLeft64)
2152 v.AddArg2(x, y)
2153 return true
2154 }
2155 break
2156 }
2157
2158
2159
2160 for {
2161 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2162 left := v_0
2163 if left.Op != OpLsh64x8 {
2164 continue
2165 }
2166 y := left.Args[1]
2167 x := left.Args[0]
2168 right := v_1
2169 if right.Op != OpRsh64Ux8 {
2170 continue
2171 }
2172 _ = right.Args[1]
2173 if x != right.Args[0] {
2174 continue
2175 }
2176 right_1 := right.Args[1]
2177 if right_1.Op != OpSub8 {
2178 continue
2179 }
2180 _ = right_1.Args[1]
2181 right_1_0 := right_1.Args[0]
2182 if right_1_0.Op != OpConst8 || auxIntToInt8(right_1_0.AuxInt) != 64 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 64)) {
2183 continue
2184 }
2185 v.reset(OpRotateLeft64)
2186 v.AddArg2(x, y)
2187 return true
2188 }
2189 break
2190 }
2191
2192
2193
2194 for {
2195 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2196 right := v_0
2197 if right.Op != OpRsh64Ux64 {
2198 continue
2199 }
2200 y := right.Args[1]
2201 x := right.Args[0]
2202 left := v_1
2203 if left.Op != OpLsh64x64 {
2204 continue
2205 }
2206 _ = left.Args[1]
2207 if x != left.Args[0] {
2208 continue
2209 }
2210 z := left.Args[1]
2211 if z.Op != OpSub64 {
2212 continue
2213 }
2214 _ = z.Args[1]
2215 z_0 := z.Args[0]
2216 if z_0.Op != OpConst64 || auxIntToInt64(z_0.AuxInt) != 64 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 64)) {
2217 continue
2218 }
2219 v.reset(OpRotateLeft64)
2220 v.AddArg2(x, z)
2221 return true
2222 }
2223 break
2224 }
2225
2226
2227
2228 for {
2229 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2230 right := v_0
2231 if right.Op != OpRsh64Ux32 {
2232 continue
2233 }
2234 y := right.Args[1]
2235 x := right.Args[0]
2236 left := v_1
2237 if left.Op != OpLsh64x32 {
2238 continue
2239 }
2240 _ = left.Args[1]
2241 if x != left.Args[0] {
2242 continue
2243 }
2244 z := left.Args[1]
2245 if z.Op != OpSub32 {
2246 continue
2247 }
2248 _ = z.Args[1]
2249 z_0 := z.Args[0]
2250 if z_0.Op != OpConst32 || auxIntToInt32(z_0.AuxInt) != 64 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 64)) {
2251 continue
2252 }
2253 v.reset(OpRotateLeft64)
2254 v.AddArg2(x, z)
2255 return true
2256 }
2257 break
2258 }
2259
2260
2261
2262 for {
2263 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2264 right := v_0
2265 if right.Op != OpRsh64Ux16 {
2266 continue
2267 }
2268 y := right.Args[1]
2269 x := right.Args[0]
2270 left := v_1
2271 if left.Op != OpLsh64x16 {
2272 continue
2273 }
2274 _ = left.Args[1]
2275 if x != left.Args[0] {
2276 continue
2277 }
2278 z := left.Args[1]
2279 if z.Op != OpSub16 {
2280 continue
2281 }
2282 _ = z.Args[1]
2283 z_0 := z.Args[0]
2284 if z_0.Op != OpConst16 || auxIntToInt16(z_0.AuxInt) != 64 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 64)) {
2285 continue
2286 }
2287 v.reset(OpRotateLeft64)
2288 v.AddArg2(x, z)
2289 return true
2290 }
2291 break
2292 }
2293
2294
2295
2296 for {
2297 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2298 right := v_0
2299 if right.Op != OpRsh64Ux8 {
2300 continue
2301 }
2302 y := right.Args[1]
2303 x := right.Args[0]
2304 left := v_1
2305 if left.Op != OpLsh64x8 {
2306 continue
2307 }
2308 _ = left.Args[1]
2309 if x != left.Args[0] {
2310 continue
2311 }
2312 z := left.Args[1]
2313 if z.Op != OpSub8 {
2314 continue
2315 }
2316 _ = z.Args[1]
2317 z_0 := z.Args[0]
2318 if z_0.Op != OpConst8 || auxIntToInt8(z_0.AuxInt) != 64 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 64)) {
2319 continue
2320 }
2321 v.reset(OpRotateLeft64)
2322 v.AddArg2(x, z)
2323 return true
2324 }
2325 break
2326 }
2327 return false
2328 }
2329 func rewriteValuegeneric_OpAdd64F(v *Value) bool {
2330 v_1 := v.Args[1]
2331 v_0 := v.Args[0]
2332
2333
2334
2335 for {
2336 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2337 if v_0.Op != OpConst64F {
2338 continue
2339 }
2340 c := auxIntToFloat64(v_0.AuxInt)
2341 if v_1.Op != OpConst64F {
2342 continue
2343 }
2344 d := auxIntToFloat64(v_1.AuxInt)
2345 if !(c+d == c+d) {
2346 continue
2347 }
2348 v.reset(OpConst64F)
2349 v.AuxInt = float64ToAuxInt(c + d)
2350 return true
2351 }
2352 break
2353 }
2354 return false
2355 }
2356 func rewriteValuegeneric_OpAdd8(v *Value) bool {
2357 v_1 := v.Args[1]
2358 v_0 := v.Args[0]
2359 b := v.Block
2360 config := b.Func.Config
2361
2362
2363 for {
2364 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2365 if v_0.Op != OpConst8 {
2366 continue
2367 }
2368 c := auxIntToInt8(v_0.AuxInt)
2369 if v_1.Op != OpConst8 {
2370 continue
2371 }
2372 d := auxIntToInt8(v_1.AuxInt)
2373 v.reset(OpConst8)
2374 v.AuxInt = int8ToAuxInt(c + d)
2375 return true
2376 }
2377 break
2378 }
2379
2380
2381 for {
2382 t := v.Type
2383 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2384 if v_0.Op != OpMul8 {
2385 continue
2386 }
2387 _ = v_0.Args[1]
2388 v_0_0 := v_0.Args[0]
2389 v_0_1 := v_0.Args[1]
2390 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
2391 x := v_0_0
2392 y := v_0_1
2393 if v_1.Op != OpMul8 {
2394 continue
2395 }
2396 _ = v_1.Args[1]
2397 v_1_0 := v_1.Args[0]
2398 v_1_1 := v_1.Args[1]
2399 for _i2 := 0; _i2 <= 1; _i2, v_1_0, v_1_1 = _i2+1, v_1_1, v_1_0 {
2400 if x != v_1_0 {
2401 continue
2402 }
2403 z := v_1_1
2404 v.reset(OpMul8)
2405 v0 := b.NewValue0(v.Pos, OpAdd8, t)
2406 v0.AddArg2(y, z)
2407 v.AddArg2(x, v0)
2408 return true
2409 }
2410 }
2411 }
2412 break
2413 }
2414
2415
2416 for {
2417 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2418 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 {
2419 continue
2420 }
2421 x := v_1
2422 v.copyOf(x)
2423 return true
2424 }
2425 break
2426 }
2427
2428
2429 for {
2430 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2431 x := v_0
2432 if v_1.Op != OpNeg8 {
2433 continue
2434 }
2435 y := v_1.Args[0]
2436 v.reset(OpSub8)
2437 v.AddArg2(x, y)
2438 return true
2439 }
2440 break
2441 }
2442
2443
2444 for {
2445 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2446 if v_0.Op != OpCom8 {
2447 continue
2448 }
2449 x := v_0.Args[0]
2450 if x != v_1 {
2451 continue
2452 }
2453 v.reset(OpConst8)
2454 v.AuxInt = int8ToAuxInt(-1)
2455 return true
2456 }
2457 break
2458 }
2459
2460
2461 for {
2462 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2463 if v_0.Op != OpSub8 {
2464 continue
2465 }
2466 t := v_0.Args[1]
2467 x := v_0.Args[0]
2468 if v_1.Op != OpAdd8 {
2469 continue
2470 }
2471 _ = v_1.Args[1]
2472 v_1_0 := v_1.Args[0]
2473 v_1_1 := v_1.Args[1]
2474 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
2475 if t != v_1_0 {
2476 continue
2477 }
2478 y := v_1_1
2479 v.reset(OpAdd8)
2480 v.AddArg2(x, y)
2481 return true
2482 }
2483 }
2484 break
2485 }
2486
2487
2488 for {
2489 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2490 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 1 || v_1.Op != OpCom8 {
2491 continue
2492 }
2493 x := v_1.Args[0]
2494 v.reset(OpNeg8)
2495 v.AddArg(x)
2496 return true
2497 }
2498 break
2499 }
2500
2501
2502 for {
2503 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2504 x := v_0
2505 if v_1.Op != OpSub8 {
2506 continue
2507 }
2508 _ = v_1.Args[1]
2509 y := v_1.Args[0]
2510 if x != v_1.Args[1] {
2511 continue
2512 }
2513 v.copyOf(y)
2514 return true
2515 }
2516 break
2517 }
2518
2519
2520 for {
2521 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2522 x := v_0
2523 if v_1.Op != OpAdd8 {
2524 continue
2525 }
2526 _ = v_1.Args[1]
2527 v_1_0 := v_1.Args[0]
2528 v_1_1 := v_1.Args[1]
2529 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
2530 y := v_1_0
2531 if v_1_1.Op != OpSub8 {
2532 continue
2533 }
2534 _ = v_1_1.Args[1]
2535 z := v_1_1.Args[0]
2536 if x != v_1_1.Args[1] {
2537 continue
2538 }
2539 v.reset(OpAdd8)
2540 v.AddArg2(y, z)
2541 return true
2542 }
2543 }
2544 break
2545 }
2546
2547
2548
2549 for {
2550 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2551 if v_0.Op != OpAdd8 {
2552 continue
2553 }
2554 _ = v_0.Args[1]
2555 v_0_0 := v_0.Args[0]
2556 v_0_1 := v_0.Args[1]
2557 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
2558 i := v_0_0
2559 if i.Op != OpConst8 {
2560 continue
2561 }
2562 t := i.Type
2563 z := v_0_1
2564 x := v_1
2565 if !(z.Op != OpConst8 && x.Op != OpConst8) {
2566 continue
2567 }
2568 v.reset(OpAdd8)
2569 v0 := b.NewValue0(v.Pos, OpAdd8, t)
2570 v0.AddArg2(z, x)
2571 v.AddArg2(i, v0)
2572 return true
2573 }
2574 }
2575 break
2576 }
2577
2578
2579
2580 for {
2581 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2582 if v_0.Op != OpSub8 {
2583 continue
2584 }
2585 z := v_0.Args[1]
2586 i := v_0.Args[0]
2587 if i.Op != OpConst8 {
2588 continue
2589 }
2590 t := i.Type
2591 x := v_1
2592 if !(z.Op != OpConst8 && x.Op != OpConst8) {
2593 continue
2594 }
2595 v.reset(OpAdd8)
2596 v0 := b.NewValue0(v.Pos, OpSub8, t)
2597 v0.AddArg2(x, z)
2598 v.AddArg2(i, v0)
2599 return true
2600 }
2601 break
2602 }
2603
2604
2605 for {
2606 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2607 if v_0.Op != OpConst8 {
2608 continue
2609 }
2610 t := v_0.Type
2611 c := auxIntToInt8(v_0.AuxInt)
2612 if v_1.Op != OpAdd8 {
2613 continue
2614 }
2615 _ = v_1.Args[1]
2616 v_1_0 := v_1.Args[0]
2617 v_1_1 := v_1.Args[1]
2618 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
2619 if v_1_0.Op != OpConst8 || v_1_0.Type != t {
2620 continue
2621 }
2622 d := auxIntToInt8(v_1_0.AuxInt)
2623 x := v_1_1
2624 v.reset(OpAdd8)
2625 v0 := b.NewValue0(v.Pos, OpConst8, t)
2626 v0.AuxInt = int8ToAuxInt(c + d)
2627 v.AddArg2(v0, x)
2628 return true
2629 }
2630 }
2631 break
2632 }
2633
2634
2635 for {
2636 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2637 if v_0.Op != OpConst8 {
2638 continue
2639 }
2640 t := v_0.Type
2641 c := auxIntToInt8(v_0.AuxInt)
2642 if v_1.Op != OpSub8 {
2643 continue
2644 }
2645 x := v_1.Args[1]
2646 v_1_0 := v_1.Args[0]
2647 if v_1_0.Op != OpConst8 || v_1_0.Type != t {
2648 continue
2649 }
2650 d := auxIntToInt8(v_1_0.AuxInt)
2651 v.reset(OpSub8)
2652 v0 := b.NewValue0(v.Pos, OpConst8, t)
2653 v0.AuxInt = int8ToAuxInt(c + d)
2654 v.AddArg2(v0, x)
2655 return true
2656 }
2657 break
2658 }
2659
2660
2661
2662 for {
2663 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2664 if v_0.Op != OpLsh8x64 {
2665 continue
2666 }
2667 _ = v_0.Args[1]
2668 x := v_0.Args[0]
2669 z := v_0.Args[1]
2670 if z.Op != OpConst64 {
2671 continue
2672 }
2673 c := auxIntToInt64(z.AuxInt)
2674 if v_1.Op != OpRsh8Ux64 {
2675 continue
2676 }
2677 _ = v_1.Args[1]
2678 if x != v_1.Args[0] {
2679 continue
2680 }
2681 v_1_1 := v_1.Args[1]
2682 if v_1_1.Op != OpConst64 {
2683 continue
2684 }
2685 d := auxIntToInt64(v_1_1.AuxInt)
2686 if !(c < 8 && d == 8-c && canRotate(config, 8)) {
2687 continue
2688 }
2689 v.reset(OpRotateLeft8)
2690 v.AddArg2(x, z)
2691 return true
2692 }
2693 break
2694 }
2695
2696
2697
2698 for {
2699 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2700 left := v_0
2701 if left.Op != OpLsh8x64 {
2702 continue
2703 }
2704 y := left.Args[1]
2705 x := left.Args[0]
2706 right := v_1
2707 if right.Op != OpRsh8Ux64 {
2708 continue
2709 }
2710 _ = right.Args[1]
2711 if x != right.Args[0] {
2712 continue
2713 }
2714 right_1 := right.Args[1]
2715 if right_1.Op != OpSub64 {
2716 continue
2717 }
2718 _ = right_1.Args[1]
2719 right_1_0 := right_1.Args[0]
2720 if right_1_0.Op != OpConst64 || auxIntToInt64(right_1_0.AuxInt) != 8 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 8)) {
2721 continue
2722 }
2723 v.reset(OpRotateLeft8)
2724 v.AddArg2(x, y)
2725 return true
2726 }
2727 break
2728 }
2729
2730
2731
2732 for {
2733 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2734 left := v_0
2735 if left.Op != OpLsh8x32 {
2736 continue
2737 }
2738 y := left.Args[1]
2739 x := left.Args[0]
2740 right := v_1
2741 if right.Op != OpRsh8Ux32 {
2742 continue
2743 }
2744 _ = right.Args[1]
2745 if x != right.Args[0] {
2746 continue
2747 }
2748 right_1 := right.Args[1]
2749 if right_1.Op != OpSub32 {
2750 continue
2751 }
2752 _ = right_1.Args[1]
2753 right_1_0 := right_1.Args[0]
2754 if right_1_0.Op != OpConst32 || auxIntToInt32(right_1_0.AuxInt) != 8 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 8)) {
2755 continue
2756 }
2757 v.reset(OpRotateLeft8)
2758 v.AddArg2(x, y)
2759 return true
2760 }
2761 break
2762 }
2763
2764
2765
2766 for {
2767 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2768 left := v_0
2769 if left.Op != OpLsh8x16 {
2770 continue
2771 }
2772 y := left.Args[1]
2773 x := left.Args[0]
2774 right := v_1
2775 if right.Op != OpRsh8Ux16 {
2776 continue
2777 }
2778 _ = right.Args[1]
2779 if x != right.Args[0] {
2780 continue
2781 }
2782 right_1 := right.Args[1]
2783 if right_1.Op != OpSub16 {
2784 continue
2785 }
2786 _ = right_1.Args[1]
2787 right_1_0 := right_1.Args[0]
2788 if right_1_0.Op != OpConst16 || auxIntToInt16(right_1_0.AuxInt) != 8 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 8)) {
2789 continue
2790 }
2791 v.reset(OpRotateLeft8)
2792 v.AddArg2(x, y)
2793 return true
2794 }
2795 break
2796 }
2797
2798
2799
2800 for {
2801 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2802 left := v_0
2803 if left.Op != OpLsh8x8 {
2804 continue
2805 }
2806 y := left.Args[1]
2807 x := left.Args[0]
2808 right := v_1
2809 if right.Op != OpRsh8Ux8 {
2810 continue
2811 }
2812 _ = right.Args[1]
2813 if x != right.Args[0] {
2814 continue
2815 }
2816 right_1 := right.Args[1]
2817 if right_1.Op != OpSub8 {
2818 continue
2819 }
2820 _ = right_1.Args[1]
2821 right_1_0 := right_1.Args[0]
2822 if right_1_0.Op != OpConst8 || auxIntToInt8(right_1_0.AuxInt) != 8 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 8)) {
2823 continue
2824 }
2825 v.reset(OpRotateLeft8)
2826 v.AddArg2(x, y)
2827 return true
2828 }
2829 break
2830 }
2831
2832
2833
2834 for {
2835 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2836 right := v_0
2837 if right.Op != OpRsh8Ux64 {
2838 continue
2839 }
2840 y := right.Args[1]
2841 x := right.Args[0]
2842 left := v_1
2843 if left.Op != OpLsh8x64 {
2844 continue
2845 }
2846 _ = left.Args[1]
2847 if x != left.Args[0] {
2848 continue
2849 }
2850 z := left.Args[1]
2851 if z.Op != OpSub64 {
2852 continue
2853 }
2854 _ = z.Args[1]
2855 z_0 := z.Args[0]
2856 if z_0.Op != OpConst64 || auxIntToInt64(z_0.AuxInt) != 8 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 8)) {
2857 continue
2858 }
2859 v.reset(OpRotateLeft8)
2860 v.AddArg2(x, z)
2861 return true
2862 }
2863 break
2864 }
2865
2866
2867
2868 for {
2869 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2870 right := v_0
2871 if right.Op != OpRsh8Ux32 {
2872 continue
2873 }
2874 y := right.Args[1]
2875 x := right.Args[0]
2876 left := v_1
2877 if left.Op != OpLsh8x32 {
2878 continue
2879 }
2880 _ = left.Args[1]
2881 if x != left.Args[0] {
2882 continue
2883 }
2884 z := left.Args[1]
2885 if z.Op != OpSub32 {
2886 continue
2887 }
2888 _ = z.Args[1]
2889 z_0 := z.Args[0]
2890 if z_0.Op != OpConst32 || auxIntToInt32(z_0.AuxInt) != 8 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 8)) {
2891 continue
2892 }
2893 v.reset(OpRotateLeft8)
2894 v.AddArg2(x, z)
2895 return true
2896 }
2897 break
2898 }
2899
2900
2901
2902 for {
2903 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2904 right := v_0
2905 if right.Op != OpRsh8Ux16 {
2906 continue
2907 }
2908 y := right.Args[1]
2909 x := right.Args[0]
2910 left := v_1
2911 if left.Op != OpLsh8x16 {
2912 continue
2913 }
2914 _ = left.Args[1]
2915 if x != left.Args[0] {
2916 continue
2917 }
2918 z := left.Args[1]
2919 if z.Op != OpSub16 {
2920 continue
2921 }
2922 _ = z.Args[1]
2923 z_0 := z.Args[0]
2924 if z_0.Op != OpConst16 || auxIntToInt16(z_0.AuxInt) != 8 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 8)) {
2925 continue
2926 }
2927 v.reset(OpRotateLeft8)
2928 v.AddArg2(x, z)
2929 return true
2930 }
2931 break
2932 }
2933
2934
2935
2936 for {
2937 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2938 right := v_0
2939 if right.Op != OpRsh8Ux8 {
2940 continue
2941 }
2942 y := right.Args[1]
2943 x := right.Args[0]
2944 left := v_1
2945 if left.Op != OpLsh8x8 {
2946 continue
2947 }
2948 _ = left.Args[1]
2949 if x != left.Args[0] {
2950 continue
2951 }
2952 z := left.Args[1]
2953 if z.Op != OpSub8 {
2954 continue
2955 }
2956 _ = z.Args[1]
2957 z_0 := z.Args[0]
2958 if z_0.Op != OpConst8 || auxIntToInt8(z_0.AuxInt) != 8 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 8)) {
2959 continue
2960 }
2961 v.reset(OpRotateLeft8)
2962 v.AddArg2(x, z)
2963 return true
2964 }
2965 break
2966 }
2967 return false
2968 }
2969 func rewriteValuegeneric_OpAddPtr(v *Value) bool {
2970 v_1 := v.Args[1]
2971 v_0 := v.Args[0]
2972
2973
2974 for {
2975 t := v.Type
2976 x := v_0
2977 if v_1.Op != OpConst64 {
2978 break
2979 }
2980 c := auxIntToInt64(v_1.AuxInt)
2981 v.reset(OpOffPtr)
2982 v.Type = t
2983 v.AuxInt = int64ToAuxInt(c)
2984 v.AddArg(x)
2985 return true
2986 }
2987
2988
2989 for {
2990 t := v.Type
2991 x := v_0
2992 if v_1.Op != OpConst32 {
2993 break
2994 }
2995 c := auxIntToInt32(v_1.AuxInt)
2996 v.reset(OpOffPtr)
2997 v.Type = t
2998 v.AuxInt = int64ToAuxInt(int64(c))
2999 v.AddArg(x)
3000 return true
3001 }
3002 return false
3003 }
3004 func rewriteValuegeneric_OpAnd16(v *Value) bool {
3005 v_1 := v.Args[1]
3006 v_0 := v.Args[0]
3007 b := v.Block
3008
3009
3010 for {
3011 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3012 if v_0.Op != OpConst16 {
3013 continue
3014 }
3015 c := auxIntToInt16(v_0.AuxInt)
3016 if v_1.Op != OpConst16 {
3017 continue
3018 }
3019 d := auxIntToInt16(v_1.AuxInt)
3020 v.reset(OpConst16)
3021 v.AuxInt = int16ToAuxInt(c & d)
3022 return true
3023 }
3024 break
3025 }
3026
3027
3028 for {
3029 t := v.Type
3030 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3031 if v_0.Op != OpCom16 {
3032 continue
3033 }
3034 x := v_0.Args[0]
3035 if v_1.Op != OpCom16 {
3036 continue
3037 }
3038 y := v_1.Args[0]
3039 v.reset(OpCom16)
3040 v0 := b.NewValue0(v.Pos, OpOr16, t)
3041 v0.AddArg2(x, y)
3042 v.AddArg(v0)
3043 return true
3044 }
3045 break
3046 }
3047
3048
3049
3050 for {
3051 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3052 if v_0.Op != OpConst16 {
3053 continue
3054 }
3055 m := auxIntToInt16(v_0.AuxInt)
3056 if v_1.Op != OpRsh16Ux64 {
3057 continue
3058 }
3059 _ = v_1.Args[1]
3060 v_1_1 := v_1.Args[1]
3061 if v_1_1.Op != OpConst64 {
3062 continue
3063 }
3064 c := auxIntToInt64(v_1_1.AuxInt)
3065 if !(c >= int64(16-ntz16(m))) {
3066 continue
3067 }
3068 v.reset(OpConst16)
3069 v.AuxInt = int16ToAuxInt(0)
3070 return true
3071 }
3072 break
3073 }
3074
3075
3076
3077 for {
3078 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3079 if v_0.Op != OpConst16 {
3080 continue
3081 }
3082 m := auxIntToInt16(v_0.AuxInt)
3083 if v_1.Op != OpLsh16x64 {
3084 continue
3085 }
3086 _ = v_1.Args[1]
3087 v_1_1 := v_1.Args[1]
3088 if v_1_1.Op != OpConst64 {
3089 continue
3090 }
3091 c := auxIntToInt64(v_1_1.AuxInt)
3092 if !(c >= int64(16-nlz16(m))) {
3093 continue
3094 }
3095 v.reset(OpConst16)
3096 v.AuxInt = int16ToAuxInt(0)
3097 return true
3098 }
3099 break
3100 }
3101
3102
3103 for {
3104 x := v_0
3105 if x != v_1 {
3106 break
3107 }
3108 v.copyOf(x)
3109 return true
3110 }
3111
3112
3113 for {
3114 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3115 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != -1 {
3116 continue
3117 }
3118 x := v_1
3119 v.copyOf(x)
3120 return true
3121 }
3122 break
3123 }
3124
3125
3126 for {
3127 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3128 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 {
3129 continue
3130 }
3131 v.reset(OpConst16)
3132 v.AuxInt = int16ToAuxInt(0)
3133 return true
3134 }
3135 break
3136 }
3137
3138
3139 for {
3140 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3141 if v_0.Op != OpCom16 {
3142 continue
3143 }
3144 x := v_0.Args[0]
3145 if x != v_1 {
3146 continue
3147 }
3148 v.reset(OpConst16)
3149 v.AuxInt = int16ToAuxInt(0)
3150 return true
3151 }
3152 break
3153 }
3154
3155
3156 for {
3157 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3158 x := v_0
3159 if v_1.Op != OpAnd16 {
3160 continue
3161 }
3162 _ = v_1.Args[1]
3163 v_1_0 := v_1.Args[0]
3164 v_1_1 := v_1.Args[1]
3165 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
3166 if x != v_1_0 {
3167 continue
3168 }
3169 y := v_1_1
3170 v.reset(OpAnd16)
3171 v.AddArg2(x, y)
3172 return true
3173 }
3174 }
3175 break
3176 }
3177
3178
3179
3180 for {
3181 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3182 if v_0.Op != OpAnd16 {
3183 continue
3184 }
3185 _ = v_0.Args[1]
3186 v_0_0 := v_0.Args[0]
3187 v_0_1 := v_0.Args[1]
3188 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
3189 i := v_0_0
3190 if i.Op != OpConst16 {
3191 continue
3192 }
3193 t := i.Type
3194 z := v_0_1
3195 x := v_1
3196 if !(z.Op != OpConst16 && x.Op != OpConst16) {
3197 continue
3198 }
3199 v.reset(OpAnd16)
3200 v0 := b.NewValue0(v.Pos, OpAnd16, t)
3201 v0.AddArg2(z, x)
3202 v.AddArg2(i, v0)
3203 return true
3204 }
3205 }
3206 break
3207 }
3208
3209
3210 for {
3211 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3212 if v_0.Op != OpConst16 {
3213 continue
3214 }
3215 t := v_0.Type
3216 c := auxIntToInt16(v_0.AuxInt)
3217 if v_1.Op != OpAnd16 {
3218 continue
3219 }
3220 _ = v_1.Args[1]
3221 v_1_0 := v_1.Args[0]
3222 v_1_1 := v_1.Args[1]
3223 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
3224 if v_1_0.Op != OpConst16 || v_1_0.Type != t {
3225 continue
3226 }
3227 d := auxIntToInt16(v_1_0.AuxInt)
3228 x := v_1_1
3229 v.reset(OpAnd16)
3230 v0 := b.NewValue0(v.Pos, OpConst16, t)
3231 v0.AuxInt = int16ToAuxInt(c & d)
3232 v.AddArg2(v0, x)
3233 return true
3234 }
3235 }
3236 break
3237 }
3238 return false
3239 }
3240 func rewriteValuegeneric_OpAnd32(v *Value) bool {
3241 v_1 := v.Args[1]
3242 v_0 := v.Args[0]
3243 b := v.Block
3244
3245
3246 for {
3247 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3248 if v_0.Op != OpConst32 {
3249 continue
3250 }
3251 c := auxIntToInt32(v_0.AuxInt)
3252 if v_1.Op != OpConst32 {
3253 continue
3254 }
3255 d := auxIntToInt32(v_1.AuxInt)
3256 v.reset(OpConst32)
3257 v.AuxInt = int32ToAuxInt(c & d)
3258 return true
3259 }
3260 break
3261 }
3262
3263
3264 for {
3265 t := v.Type
3266 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3267 if v_0.Op != OpCom32 {
3268 continue
3269 }
3270 x := v_0.Args[0]
3271 if v_1.Op != OpCom32 {
3272 continue
3273 }
3274 y := v_1.Args[0]
3275 v.reset(OpCom32)
3276 v0 := b.NewValue0(v.Pos, OpOr32, t)
3277 v0.AddArg2(x, y)
3278 v.AddArg(v0)
3279 return true
3280 }
3281 break
3282 }
3283
3284
3285
3286 for {
3287 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3288 if v_0.Op != OpConst32 {
3289 continue
3290 }
3291 m := auxIntToInt32(v_0.AuxInt)
3292 if v_1.Op != OpRsh32Ux64 {
3293 continue
3294 }
3295 _ = v_1.Args[1]
3296 v_1_1 := v_1.Args[1]
3297 if v_1_1.Op != OpConst64 {
3298 continue
3299 }
3300 c := auxIntToInt64(v_1_1.AuxInt)
3301 if !(c >= int64(32-ntz32(m))) {
3302 continue
3303 }
3304 v.reset(OpConst32)
3305 v.AuxInt = int32ToAuxInt(0)
3306 return true
3307 }
3308 break
3309 }
3310
3311
3312
3313 for {
3314 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3315 if v_0.Op != OpConst32 {
3316 continue
3317 }
3318 m := auxIntToInt32(v_0.AuxInt)
3319 if v_1.Op != OpLsh32x64 {
3320 continue
3321 }
3322 _ = v_1.Args[1]
3323 v_1_1 := v_1.Args[1]
3324 if v_1_1.Op != OpConst64 {
3325 continue
3326 }
3327 c := auxIntToInt64(v_1_1.AuxInt)
3328 if !(c >= int64(32-nlz32(m))) {
3329 continue
3330 }
3331 v.reset(OpConst32)
3332 v.AuxInt = int32ToAuxInt(0)
3333 return true
3334 }
3335 break
3336 }
3337
3338
3339 for {
3340 x := v_0
3341 if x != v_1 {
3342 break
3343 }
3344 v.copyOf(x)
3345 return true
3346 }
3347
3348
3349 for {
3350 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3351 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != -1 {
3352 continue
3353 }
3354 x := v_1
3355 v.copyOf(x)
3356 return true
3357 }
3358 break
3359 }
3360
3361
3362 for {
3363 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3364 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
3365 continue
3366 }
3367 v.reset(OpConst32)
3368 v.AuxInt = int32ToAuxInt(0)
3369 return true
3370 }
3371 break
3372 }
3373
3374
3375 for {
3376 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3377 if v_0.Op != OpCom32 {
3378 continue
3379 }
3380 x := v_0.Args[0]
3381 if x != v_1 {
3382 continue
3383 }
3384 v.reset(OpConst32)
3385 v.AuxInt = int32ToAuxInt(0)
3386 return true
3387 }
3388 break
3389 }
3390
3391
3392 for {
3393 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3394 x := v_0
3395 if v_1.Op != OpAnd32 {
3396 continue
3397 }
3398 _ = v_1.Args[1]
3399 v_1_0 := v_1.Args[0]
3400 v_1_1 := v_1.Args[1]
3401 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
3402 if x != v_1_0 {
3403 continue
3404 }
3405 y := v_1_1
3406 v.reset(OpAnd32)
3407 v.AddArg2(x, y)
3408 return true
3409 }
3410 }
3411 break
3412 }
3413
3414
3415
3416 for {
3417 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3418 if v_0.Op != OpAnd32 {
3419 continue
3420 }
3421 _ = v_0.Args[1]
3422 v_0_0 := v_0.Args[0]
3423 v_0_1 := v_0.Args[1]
3424 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
3425 i := v_0_0
3426 if i.Op != OpConst32 {
3427 continue
3428 }
3429 t := i.Type
3430 z := v_0_1
3431 x := v_1
3432 if !(z.Op != OpConst32 && x.Op != OpConst32) {
3433 continue
3434 }
3435 v.reset(OpAnd32)
3436 v0 := b.NewValue0(v.Pos, OpAnd32, t)
3437 v0.AddArg2(z, x)
3438 v.AddArg2(i, v0)
3439 return true
3440 }
3441 }
3442 break
3443 }
3444
3445
3446 for {
3447 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3448 if v_0.Op != OpConst32 {
3449 continue
3450 }
3451 t := v_0.Type
3452 c := auxIntToInt32(v_0.AuxInt)
3453 if v_1.Op != OpAnd32 {
3454 continue
3455 }
3456 _ = v_1.Args[1]
3457 v_1_0 := v_1.Args[0]
3458 v_1_1 := v_1.Args[1]
3459 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
3460 if v_1_0.Op != OpConst32 || v_1_0.Type != t {
3461 continue
3462 }
3463 d := auxIntToInt32(v_1_0.AuxInt)
3464 x := v_1_1
3465 v.reset(OpAnd32)
3466 v0 := b.NewValue0(v.Pos, OpConst32, t)
3467 v0.AuxInt = int32ToAuxInt(c & d)
3468 v.AddArg2(v0, x)
3469 return true
3470 }
3471 }
3472 break
3473 }
3474 return false
3475 }
3476 func rewriteValuegeneric_OpAnd64(v *Value) bool {
3477 v_1 := v.Args[1]
3478 v_0 := v.Args[0]
3479 b := v.Block
3480
3481
3482 for {
3483 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3484 if v_0.Op != OpConst64 {
3485 continue
3486 }
3487 c := auxIntToInt64(v_0.AuxInt)
3488 if v_1.Op != OpConst64 {
3489 continue
3490 }
3491 d := auxIntToInt64(v_1.AuxInt)
3492 v.reset(OpConst64)
3493 v.AuxInt = int64ToAuxInt(c & d)
3494 return true
3495 }
3496 break
3497 }
3498
3499
3500 for {
3501 t := v.Type
3502 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3503 if v_0.Op != OpCom64 {
3504 continue
3505 }
3506 x := v_0.Args[0]
3507 if v_1.Op != OpCom64 {
3508 continue
3509 }
3510 y := v_1.Args[0]
3511 v.reset(OpCom64)
3512 v0 := b.NewValue0(v.Pos, OpOr64, t)
3513 v0.AddArg2(x, y)
3514 v.AddArg(v0)
3515 return true
3516 }
3517 break
3518 }
3519
3520
3521
3522 for {
3523 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3524 if v_0.Op != OpConst64 {
3525 continue
3526 }
3527 m := auxIntToInt64(v_0.AuxInt)
3528 if v_1.Op != OpRsh64Ux64 {
3529 continue
3530 }
3531 _ = v_1.Args[1]
3532 v_1_1 := v_1.Args[1]
3533 if v_1_1.Op != OpConst64 {
3534 continue
3535 }
3536 c := auxIntToInt64(v_1_1.AuxInt)
3537 if !(c >= int64(64-ntz64(m))) {
3538 continue
3539 }
3540 v.reset(OpConst64)
3541 v.AuxInt = int64ToAuxInt(0)
3542 return true
3543 }
3544 break
3545 }
3546
3547
3548
3549 for {
3550 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3551 if v_0.Op != OpConst64 {
3552 continue
3553 }
3554 m := auxIntToInt64(v_0.AuxInt)
3555 if v_1.Op != OpLsh64x64 {
3556 continue
3557 }
3558 _ = v_1.Args[1]
3559 v_1_1 := v_1.Args[1]
3560 if v_1_1.Op != OpConst64 {
3561 continue
3562 }
3563 c := auxIntToInt64(v_1_1.AuxInt)
3564 if !(c >= int64(64-nlz64(m))) {
3565 continue
3566 }
3567 v.reset(OpConst64)
3568 v.AuxInt = int64ToAuxInt(0)
3569 return true
3570 }
3571 break
3572 }
3573
3574
3575 for {
3576 x := v_0
3577 if x != v_1 {
3578 break
3579 }
3580 v.copyOf(x)
3581 return true
3582 }
3583
3584
3585 for {
3586 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3587 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != -1 {
3588 continue
3589 }
3590 x := v_1
3591 v.copyOf(x)
3592 return true
3593 }
3594 break
3595 }
3596
3597
3598 for {
3599 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3600 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
3601 continue
3602 }
3603 v.reset(OpConst64)
3604 v.AuxInt = int64ToAuxInt(0)
3605 return true
3606 }
3607 break
3608 }
3609
3610
3611 for {
3612 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3613 if v_0.Op != OpCom64 {
3614 continue
3615 }
3616 x := v_0.Args[0]
3617 if x != v_1 {
3618 continue
3619 }
3620 v.reset(OpConst64)
3621 v.AuxInt = int64ToAuxInt(0)
3622 return true
3623 }
3624 break
3625 }
3626
3627
3628 for {
3629 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3630 x := v_0
3631 if v_1.Op != OpAnd64 {
3632 continue
3633 }
3634 _ = v_1.Args[1]
3635 v_1_0 := v_1.Args[0]
3636 v_1_1 := v_1.Args[1]
3637 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
3638 if x != v_1_0 {
3639 continue
3640 }
3641 y := v_1_1
3642 v.reset(OpAnd64)
3643 v.AddArg2(x, y)
3644 return true
3645 }
3646 }
3647 break
3648 }
3649
3650
3651
3652 for {
3653 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3654 if v_0.Op != OpAnd64 {
3655 continue
3656 }
3657 _ = v_0.Args[1]
3658 v_0_0 := v_0.Args[0]
3659 v_0_1 := v_0.Args[1]
3660 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
3661 i := v_0_0
3662 if i.Op != OpConst64 {
3663 continue
3664 }
3665 t := i.Type
3666 z := v_0_1
3667 x := v_1
3668 if !(z.Op != OpConst64 && x.Op != OpConst64) {
3669 continue
3670 }
3671 v.reset(OpAnd64)
3672 v0 := b.NewValue0(v.Pos, OpAnd64, t)
3673 v0.AddArg2(z, x)
3674 v.AddArg2(i, v0)
3675 return true
3676 }
3677 }
3678 break
3679 }
3680
3681
3682 for {
3683 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3684 if v_0.Op != OpConst64 {
3685 continue
3686 }
3687 t := v_0.Type
3688 c := auxIntToInt64(v_0.AuxInt)
3689 if v_1.Op != OpAnd64 {
3690 continue
3691 }
3692 _ = v_1.Args[1]
3693 v_1_0 := v_1.Args[0]
3694 v_1_1 := v_1.Args[1]
3695 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
3696 if v_1_0.Op != OpConst64 || v_1_0.Type != t {
3697 continue
3698 }
3699 d := auxIntToInt64(v_1_0.AuxInt)
3700 x := v_1_1
3701 v.reset(OpAnd64)
3702 v0 := b.NewValue0(v.Pos, OpConst64, t)
3703 v0.AuxInt = int64ToAuxInt(c & d)
3704 v.AddArg2(v0, x)
3705 return true
3706 }
3707 }
3708 break
3709 }
3710 return false
3711 }
3712 func rewriteValuegeneric_OpAnd8(v *Value) bool {
3713 v_1 := v.Args[1]
3714 v_0 := v.Args[0]
3715 b := v.Block
3716
3717
3718 for {
3719 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3720 if v_0.Op != OpConst8 {
3721 continue
3722 }
3723 c := auxIntToInt8(v_0.AuxInt)
3724 if v_1.Op != OpConst8 {
3725 continue
3726 }
3727 d := auxIntToInt8(v_1.AuxInt)
3728 v.reset(OpConst8)
3729 v.AuxInt = int8ToAuxInt(c & d)
3730 return true
3731 }
3732 break
3733 }
3734
3735
3736 for {
3737 t := v.Type
3738 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3739 if v_0.Op != OpCom8 {
3740 continue
3741 }
3742 x := v_0.Args[0]
3743 if v_1.Op != OpCom8 {
3744 continue
3745 }
3746 y := v_1.Args[0]
3747 v.reset(OpCom8)
3748 v0 := b.NewValue0(v.Pos, OpOr8, t)
3749 v0.AddArg2(x, y)
3750 v.AddArg(v0)
3751 return true
3752 }
3753 break
3754 }
3755
3756
3757
3758 for {
3759 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3760 if v_0.Op != OpConst8 {
3761 continue
3762 }
3763 m := auxIntToInt8(v_0.AuxInt)
3764 if v_1.Op != OpRsh8Ux64 {
3765 continue
3766 }
3767 _ = v_1.Args[1]
3768 v_1_1 := v_1.Args[1]
3769 if v_1_1.Op != OpConst64 {
3770 continue
3771 }
3772 c := auxIntToInt64(v_1_1.AuxInt)
3773 if !(c >= int64(8-ntz8(m))) {
3774 continue
3775 }
3776 v.reset(OpConst8)
3777 v.AuxInt = int8ToAuxInt(0)
3778 return true
3779 }
3780 break
3781 }
3782
3783
3784
3785 for {
3786 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3787 if v_0.Op != OpConst8 {
3788 continue
3789 }
3790 m := auxIntToInt8(v_0.AuxInt)
3791 if v_1.Op != OpLsh8x64 {
3792 continue
3793 }
3794 _ = v_1.Args[1]
3795 v_1_1 := v_1.Args[1]
3796 if v_1_1.Op != OpConst64 {
3797 continue
3798 }
3799 c := auxIntToInt64(v_1_1.AuxInt)
3800 if !(c >= int64(8-nlz8(m))) {
3801 continue
3802 }
3803 v.reset(OpConst8)
3804 v.AuxInt = int8ToAuxInt(0)
3805 return true
3806 }
3807 break
3808 }
3809
3810
3811 for {
3812 x := v_0
3813 if x != v_1 {
3814 break
3815 }
3816 v.copyOf(x)
3817 return true
3818 }
3819
3820
3821 for {
3822 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3823 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != -1 {
3824 continue
3825 }
3826 x := v_1
3827 v.copyOf(x)
3828 return true
3829 }
3830 break
3831 }
3832
3833
3834 for {
3835 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3836 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 {
3837 continue
3838 }
3839 v.reset(OpConst8)
3840 v.AuxInt = int8ToAuxInt(0)
3841 return true
3842 }
3843 break
3844 }
3845
3846
3847 for {
3848 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3849 if v_0.Op != OpCom8 {
3850 continue
3851 }
3852 x := v_0.Args[0]
3853 if x != v_1 {
3854 continue
3855 }
3856 v.reset(OpConst8)
3857 v.AuxInt = int8ToAuxInt(0)
3858 return true
3859 }
3860 break
3861 }
3862
3863
3864 for {
3865 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3866 x := v_0
3867 if v_1.Op != OpAnd8 {
3868 continue
3869 }
3870 _ = v_1.Args[1]
3871 v_1_0 := v_1.Args[0]
3872 v_1_1 := v_1.Args[1]
3873 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
3874 if x != v_1_0 {
3875 continue
3876 }
3877 y := v_1_1
3878 v.reset(OpAnd8)
3879 v.AddArg2(x, y)
3880 return true
3881 }
3882 }
3883 break
3884 }
3885
3886
3887
3888 for {
3889 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3890 if v_0.Op != OpAnd8 {
3891 continue
3892 }
3893 _ = v_0.Args[1]
3894 v_0_0 := v_0.Args[0]
3895 v_0_1 := v_0.Args[1]
3896 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
3897 i := v_0_0
3898 if i.Op != OpConst8 {
3899 continue
3900 }
3901 t := i.Type
3902 z := v_0_1
3903 x := v_1
3904 if !(z.Op != OpConst8 && x.Op != OpConst8) {
3905 continue
3906 }
3907 v.reset(OpAnd8)
3908 v0 := b.NewValue0(v.Pos, OpAnd8, t)
3909 v0.AddArg2(z, x)
3910 v.AddArg2(i, v0)
3911 return true
3912 }
3913 }
3914 break
3915 }
3916
3917
3918 for {
3919 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3920 if v_0.Op != OpConst8 {
3921 continue
3922 }
3923 t := v_0.Type
3924 c := auxIntToInt8(v_0.AuxInt)
3925 if v_1.Op != OpAnd8 {
3926 continue
3927 }
3928 _ = v_1.Args[1]
3929 v_1_0 := v_1.Args[0]
3930 v_1_1 := v_1.Args[1]
3931 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
3932 if v_1_0.Op != OpConst8 || v_1_0.Type != t {
3933 continue
3934 }
3935 d := auxIntToInt8(v_1_0.AuxInt)
3936 x := v_1_1
3937 v.reset(OpAnd8)
3938 v0 := b.NewValue0(v.Pos, OpConst8, t)
3939 v0.AuxInt = int8ToAuxInt(c & d)
3940 v.AddArg2(v0, x)
3941 return true
3942 }
3943 }
3944 break
3945 }
3946 return false
3947 }
3948 func rewriteValuegeneric_OpAndB(v *Value) bool {
3949 v_1 := v.Args[1]
3950 v_0 := v.Args[0]
3951 b := v.Block
3952
3953
3954
3955 for {
3956 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3957 if v_0.Op != OpLeq64 {
3958 continue
3959 }
3960 x := v_0.Args[1]
3961 v_0_0 := v_0.Args[0]
3962 if v_0_0.Op != OpConst64 {
3963 continue
3964 }
3965 c := auxIntToInt64(v_0_0.AuxInt)
3966 if v_1.Op != OpLess64 {
3967 continue
3968 }
3969 _ = v_1.Args[1]
3970 if x != v_1.Args[0] {
3971 continue
3972 }
3973 v_1_1 := v_1.Args[1]
3974 if v_1_1.Op != OpConst64 {
3975 continue
3976 }
3977 d := auxIntToInt64(v_1_1.AuxInt)
3978 if !(d >= c) {
3979 continue
3980 }
3981 v.reset(OpLess64U)
3982 v0 := b.NewValue0(v.Pos, OpSub64, x.Type)
3983 v1 := b.NewValue0(v.Pos, OpConst64, x.Type)
3984 v1.AuxInt = int64ToAuxInt(c)
3985 v0.AddArg2(x, v1)
3986 v2 := b.NewValue0(v.Pos, OpConst64, x.Type)
3987 v2.AuxInt = int64ToAuxInt(d - c)
3988 v.AddArg2(v0, v2)
3989 return true
3990 }
3991 break
3992 }
3993
3994
3995
3996 for {
3997 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3998 if v_0.Op != OpLeq64 {
3999 continue
4000 }
4001 x := v_0.Args[1]
4002 v_0_0 := v_0.Args[0]
4003 if v_0_0.Op != OpConst64 {
4004 continue
4005 }
4006 c := auxIntToInt64(v_0_0.AuxInt)
4007 if v_1.Op != OpLeq64 {
4008 continue
4009 }
4010 _ = v_1.Args[1]
4011 if x != v_1.Args[0] {
4012 continue
4013 }
4014 v_1_1 := v_1.Args[1]
4015 if v_1_1.Op != OpConst64 {
4016 continue
4017 }
4018 d := auxIntToInt64(v_1_1.AuxInt)
4019 if !(d >= c) {
4020 continue
4021 }
4022 v.reset(OpLeq64U)
4023 v0 := b.NewValue0(v.Pos, OpSub64, x.Type)
4024 v1 := b.NewValue0(v.Pos, OpConst64, x.Type)
4025 v1.AuxInt = int64ToAuxInt(c)
4026 v0.AddArg2(x, v1)
4027 v2 := b.NewValue0(v.Pos, OpConst64, x.Type)
4028 v2.AuxInt = int64ToAuxInt(d - c)
4029 v.AddArg2(v0, v2)
4030 return true
4031 }
4032 break
4033 }
4034
4035
4036
4037 for {
4038 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
4039 if v_0.Op != OpLeq32 {
4040 continue
4041 }
4042 x := v_0.Args[1]
4043 v_0_0 := v_0.Args[0]
4044 if v_0_0.Op != OpConst32 {
4045 continue
4046 }
4047 c := auxIntToInt32(v_0_0.AuxInt)
4048 if v_1.Op != OpLess32 {
4049 continue
4050 }
4051 _ = v_1.Args[1]
4052 if x != v_1.Args[0] {
4053 continue
4054 }
4055 v_1_1 := v_1.Args[1]
4056 if v_1_1.Op != OpConst32 {
4057 continue
4058 }
4059 d := auxIntToInt32(v_1_1.AuxInt)
4060 if !(d >= c) {
4061 continue
4062 }
4063 v.reset(OpLess32U)
4064 v0 := b.NewValue0(v.Pos, OpSub32, x.Type)
4065 v1 := b.NewValue0(v.Pos, OpConst32, x.Type)
4066 v1.AuxInt = int32ToAuxInt(c)
4067 v0.AddArg2(x, v1)
4068 v2 := b.NewValue0(v.Pos, OpConst32, x.Type)
4069 v2.AuxInt = int32ToAuxInt(d - c)
4070 v.AddArg2(v0, v2)
4071 return true
4072 }
4073 break
4074 }
4075
4076
4077
4078 for {
4079 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
4080 if v_0.Op != OpLeq32 {
4081 continue
4082 }
4083 x := v_0.Args[1]
4084 v_0_0 := v_0.Args[0]
4085 if v_0_0.Op != OpConst32 {
4086 continue
4087 }
4088 c := auxIntToInt32(v_0_0.AuxInt)
4089 if v_1.Op != OpLeq32 {
4090 continue
4091 }
4092 _ = v_1.Args[1]
4093 if x != v_1.Args[0] {
4094 continue
4095 }
4096 v_1_1 := v_1.Args[1]
4097 if v_1_1.Op != OpConst32 {
4098 continue
4099 }
4100 d := auxIntToInt32(v_1_1.AuxInt)
4101 if !(d >= c) {
4102 continue
4103 }
4104 v.reset(OpLeq32U)
4105 v0 := b.NewValue0(v.Pos, OpSub32, x.Type)
4106 v1 := b.NewValue0(v.Pos, OpConst32, x.Type)
4107 v1.AuxInt = int32ToAuxInt(c)
4108 v0.AddArg2(x, v1)
4109 v2 := b.NewValue0(v.Pos, OpConst32, x.Type)
4110 v2.AuxInt = int32ToAuxInt(d - c)
4111 v.AddArg2(v0, v2)
4112 return true
4113 }
4114 break
4115 }
4116
4117
4118
4119 for {
4120 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
4121 if v_0.Op != OpLeq16 {
4122 continue
4123 }
4124 x := v_0.Args[1]
4125 v_0_0 := v_0.Args[0]
4126 if v_0_0.Op != OpConst16 {
4127 continue
4128 }
4129 c := auxIntToInt16(v_0_0.AuxInt)
4130 if v_1.Op != OpLess16 {
4131 continue
4132 }
4133 _ = v_1.Args[1]
4134 if x != v_1.Args[0] {
4135 continue
4136 }
4137 v_1_1 := v_1.Args[1]
4138 if v_1_1.Op != OpConst16 {
4139 continue
4140 }
4141 d := auxIntToInt16(v_1_1.AuxInt)
4142 if !(d >= c) {
4143 continue
4144 }
4145 v.reset(OpLess16U)
4146 v0 := b.NewValue0(v.Pos, OpSub16, x.Type)
4147 v1 := b.NewValue0(v.Pos, OpConst16, x.Type)
4148 v1.AuxInt = int16ToAuxInt(c)
4149 v0.AddArg2(x, v1)
4150 v2 := b.NewValue0(v.Pos, OpConst16, x.Type)
4151 v2.AuxInt = int16ToAuxInt(d - c)
4152 v.AddArg2(v0, v2)
4153 return true
4154 }
4155 break
4156 }
4157
4158
4159
4160 for {
4161 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
4162 if v_0.Op != OpLeq16 {
4163 continue
4164 }
4165 x := v_0.Args[1]
4166 v_0_0 := v_0.Args[0]
4167 if v_0_0.Op != OpConst16 {
4168 continue
4169 }
4170 c := auxIntToInt16(v_0_0.AuxInt)
4171 if v_1.Op != OpLeq16 {
4172 continue
4173 }
4174 _ = v_1.Args[1]
4175 if x != v_1.Args[0] {
4176 continue
4177 }
4178 v_1_1 := v_1.Args[1]
4179 if v_1_1.Op != OpConst16 {
4180 continue
4181 }
4182 d := auxIntToInt16(v_1_1.AuxInt)
4183 if !(d >= c) {
4184 continue
4185 }
4186 v.reset(OpLeq16U)
4187 v0 := b.NewValue0(v.Pos, OpSub16, x.Type)
4188 v1 := b.NewValue0(v.Pos, OpConst16, x.Type)
4189 v1.AuxInt = int16ToAuxInt(c)
4190 v0.AddArg2(x, v1)
4191 v2 := b.NewValue0(v.Pos, OpConst16, x.Type)
4192 v2.AuxInt = int16ToAuxInt(d - c)
4193 v.AddArg2(v0, v2)
4194 return true
4195 }
4196 break
4197 }
4198
4199
4200
4201 for {
4202 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
4203 if v_0.Op != OpLeq8 {
4204 continue
4205 }
4206 x := v_0.Args[1]
4207 v_0_0 := v_0.Args[0]
4208 if v_0_0.Op != OpConst8 {
4209 continue
4210 }
4211 c := auxIntToInt8(v_0_0.AuxInt)
4212 if v_1.Op != OpLess8 {
4213 continue
4214 }
4215 _ = v_1.Args[1]
4216 if x != v_1.Args[0] {
4217 continue
4218 }
4219 v_1_1 := v_1.Args[1]
4220 if v_1_1.Op != OpConst8 {
4221 continue
4222 }
4223 d := auxIntToInt8(v_1_1.AuxInt)
4224 if !(d >= c) {
4225 continue
4226 }
4227 v.reset(OpLess8U)
4228 v0 := b.NewValue0(v.Pos, OpSub8, x.Type)
4229 v1 := b.NewValue0(v.Pos, OpConst8, x.Type)
4230 v1.AuxInt = int8ToAuxInt(c)
4231 v0.AddArg2(x, v1)
4232 v2 := b.NewValue0(v.Pos, OpConst8, x.Type)
4233 v2.AuxInt = int8ToAuxInt(d - c)
4234 v.AddArg2(v0, v2)
4235 return true
4236 }
4237 break
4238 }
4239
4240
4241
4242 for {
4243 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
4244 if v_0.Op != OpLeq8 {
4245 continue
4246 }
4247 x := v_0.Args[1]
4248 v_0_0 := v_0.Args[0]
4249 if v_0_0.Op != OpConst8 {
4250 continue
4251 }
4252 c := auxIntToInt8(v_0_0.AuxInt)
4253 if v_1.Op != OpLeq8 {
4254 continue
4255 }
4256 _ = v_1.Args[1]
4257 if x != v_1.Args[0] {
4258 continue
4259 }
4260 v_1_1 := v_1.Args[1]
4261 if v_1_1.Op != OpConst8 {
4262 continue
4263 }
4264 d := auxIntToInt8(v_1_1.AuxInt)
4265 if !(d >= c) {
4266 continue
4267 }
4268 v.reset(OpLeq8U)
4269 v0 := b.NewValue0(v.Pos, OpSub8, x.Type)
4270 v1 := b.NewValue0(v.Pos, OpConst8, x.Type)
4271 v1.AuxInt = int8ToAuxInt(c)
4272 v0.AddArg2(x, v1)
4273 v2 := b.NewValue0(v.Pos, OpConst8, x.Type)
4274 v2.AuxInt = int8ToAuxInt(d - c)
4275 v.AddArg2(v0, v2)
4276 return true
4277 }
4278 break
4279 }
4280
4281
4282
4283 for {
4284 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
4285 if v_0.Op != OpLess64 {
4286 continue
4287 }
4288 x := v_0.Args[1]
4289 v_0_0 := v_0.Args[0]
4290 if v_0_0.Op != OpConst64 {
4291 continue
4292 }
4293 c := auxIntToInt64(v_0_0.AuxInt)
4294 if v_1.Op != OpLess64 {
4295 continue
4296 }
4297 _ = v_1.Args[1]
4298 if x != v_1.Args[0] {
4299 continue
4300 }
4301 v_1_1 := v_1.Args[1]
4302 if v_1_1.Op != OpConst64 {
4303 continue
4304 }
4305 d := auxIntToInt64(v_1_1.AuxInt)
4306 if !(d >= c+1 && c+1 > c) {
4307 continue
4308 }
4309 v.reset(OpLess64U)
4310 v0 := b.NewValue0(v.Pos, OpSub64, x.Type)
4311 v1 := b.NewValue0(v.Pos, OpConst64, x.Type)
4312 v1.AuxInt = int64ToAuxInt(c + 1)
4313 v0.AddArg2(x, v1)
4314 v2 := b.NewValue0(v.Pos, OpConst64, x.Type)
4315 v2.AuxInt = int64ToAuxInt(d - c - 1)
4316 v.AddArg2(v0, v2)
4317 return true
4318 }
4319 break
4320 }
4321
4322
4323
4324 for {
4325 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
4326 if v_0.Op != OpLess64 {
4327 continue
4328 }
4329 x := v_0.Args[1]
4330 v_0_0 := v_0.Args[0]
4331 if v_0_0.Op != OpConst64 {
4332 continue
4333 }
4334 c := auxIntToInt64(v_0_0.AuxInt)
4335 if v_1.Op != OpLeq64 {
4336 continue
4337 }
4338 _ = v_1.Args[1]
4339 if x != v_1.Args[0] {
4340 continue
4341 }
4342 v_1_1 := v_1.Args[1]
4343 if v_1_1.Op != OpConst64 {
4344 continue
4345 }
4346 d := auxIntToInt64(v_1_1.AuxInt)
4347 if !(d >= c+1 && c+1 > c) {
4348 continue
4349 }
4350 v.reset(OpLeq64U)
4351 v0 := b.NewValue0(v.Pos, OpSub64, x.Type)
4352 v1 := b.NewValue0(v.Pos, OpConst64, x.Type)
4353 v1.AuxInt = int64ToAuxInt(c + 1)
4354 v0.AddArg2(x, v1)
4355 v2 := b.NewValue0(v.Pos, OpConst64, x.Type)
4356 v2.AuxInt = int64ToAuxInt(d - c - 1)
4357 v.AddArg2(v0, v2)
4358 return true
4359 }
4360 break
4361 }
4362
4363
4364
4365 for {
4366 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
4367 if v_0.Op != OpLess32 {
4368 continue
4369 }
4370 x := v_0.Args[1]
4371 v_0_0 := v_0.Args[0]
4372 if v_0_0.Op != OpConst32 {
4373 continue
4374 }
4375 c := auxIntToInt32(v_0_0.AuxInt)
4376 if v_1.Op != OpLess32 {
4377 continue
4378 }
4379 _ = v_1.Args[1]
4380 if x != v_1.Args[0] {
4381 continue
4382 }
4383 v_1_1 := v_1.Args[1]
4384 if v_1_1.Op != OpConst32 {
4385 continue
4386 }
4387 d := auxIntToInt32(v_1_1.AuxInt)
4388 if !(d >= c+1 && c+1 > c) {
4389 continue
4390 }
4391 v.reset(OpLess32U)
4392 v0 := b.NewValue0(v.Pos, OpSub32, x.Type)
4393 v1 := b.NewValue0(v.Pos, OpConst32, x.Type)
4394 v1.AuxInt = int32ToAuxInt(c + 1)
4395 v0.AddArg2(x, v1)
4396 v2 := b.NewValue0(v.Pos, OpConst32, x.Type)
4397 v2.AuxInt = int32ToAuxInt(d - c - 1)
4398 v.AddArg2(v0, v2)
4399 return true
4400 }
4401 break
4402 }
4403
4404
4405
4406 for {
4407 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
4408 if v_0.Op != OpLess32 {
4409 continue
4410 }
4411 x := v_0.Args[1]
4412 v_0_0 := v_0.Args[0]
4413 if v_0_0.Op != OpConst32 {
4414 continue
4415 }
4416 c := auxIntToInt32(v_0_0.AuxInt)
4417 if v_1.Op != OpLeq32 {
4418 continue
4419 }
4420 _ = v_1.Args[1]
4421 if x != v_1.Args[0] {
4422 continue
4423 }
4424 v_1_1 := v_1.Args[1]
4425 if v_1_1.Op != OpConst32 {
4426 continue
4427 }
4428 d := auxIntToInt32(v_1_1.AuxInt)
4429 if !(d >= c+1 && c+1 > c) {
4430 continue
4431 }
4432 v.reset(OpLeq32U)
4433 v0 := b.NewValue0(v.Pos, OpSub32, x.Type)
4434 v1 := b.NewValue0(v.Pos, OpConst32, x.Type)
4435 v1.AuxInt = int32ToAuxInt(c + 1)
4436 v0.AddArg2(x, v1)
4437 v2 := b.NewValue0(v.Pos, OpConst32, x.Type)
4438 v2.AuxInt = int32ToAuxInt(d - c - 1)
4439 v.AddArg2(v0, v2)
4440 return true
4441 }
4442 break
4443 }
4444
4445
4446
4447 for {
4448 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
4449 if v_0.Op != OpLess16 {
4450 continue
4451 }
4452 x := v_0.Args[1]
4453 v_0_0 := v_0.Args[0]
4454 if v_0_0.Op != OpConst16 {
4455 continue
4456 }
4457 c := auxIntToInt16(v_0_0.AuxInt)
4458 if v_1.Op != OpLess16 {
4459 continue
4460 }
4461 _ = v_1.Args[1]
4462 if x != v_1.Args[0] {
4463 continue
4464 }
4465 v_1_1 := v_1.Args[1]
4466 if v_1_1.Op != OpConst16 {
4467 continue
4468 }
4469 d := auxIntToInt16(v_1_1.AuxInt)
4470 if !(d >= c+1 && c+1 > c) {
4471 continue
4472 }
4473 v.reset(OpLess16U)
4474 v0 := b.NewValue0(v.Pos, OpSub16, x.Type)
4475 v1 := b.NewValue0(v.Pos, OpConst16, x.Type)
4476 v1.AuxInt = int16ToAuxInt(c + 1)
4477 v0.AddArg2(x, v1)
4478 v2 := b.NewValue0(v.Pos, OpConst16, x.Type)
4479 v2.AuxInt = int16ToAuxInt(d - c - 1)
4480 v.AddArg2(v0, v2)
4481 return true
4482 }
4483 break
4484 }
4485
4486
4487
4488 for {
4489 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
4490 if v_0.Op != OpLess16 {
4491 continue
4492 }
4493 x := v_0.Args[1]
4494 v_0_0 := v_0.Args[0]
4495 if v_0_0.Op != OpConst16 {
4496 continue
4497 }
4498 c := auxIntToInt16(v_0_0.AuxInt)
4499 if v_1.Op != OpLeq16 {
4500 continue
4501 }
4502 _ = v_1.Args[1]
4503 if x != v_1.Args[0] {
4504 continue
4505 }
4506 v_1_1 := v_1.Args[1]
4507 if v_1_1.Op != OpConst16 {
4508 continue
4509 }
4510 d := auxIntToInt16(v_1_1.AuxInt)
4511 if !(d >= c+1 && c+1 > c) {
4512 continue
4513 }
4514 v.reset(OpLeq16U)
4515 v0 := b.NewValue0(v.Pos, OpSub16, x.Type)
4516 v1 := b.NewValue0(v.Pos, OpConst16, x.Type)
4517 v1.AuxInt = int16ToAuxInt(c + 1)
4518 v0.AddArg2(x, v1)
4519 v2 := b.NewValue0(v.Pos, OpConst16, x.Type)
4520 v2.AuxInt = int16ToAuxInt(d - c - 1)
4521 v.AddArg2(v0, v2)
4522 return true
4523 }
4524 break
4525 }
4526
4527
4528
4529 for {
4530 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
4531 if v_0.Op != OpLess8 {
4532 continue
4533 }
4534 x := v_0.Args[1]
4535 v_0_0 := v_0.Args[0]
4536 if v_0_0.Op != OpConst8 {
4537 continue
4538 }
4539 c := auxIntToInt8(v_0_0.AuxInt)
4540 if v_1.Op != OpLess8 {
4541 continue
4542 }
4543 _ = v_1.Args[1]
4544 if x != v_1.Args[0] {
4545 continue
4546 }
4547 v_1_1 := v_1.Args[1]
4548 if v_1_1.Op != OpConst8 {
4549 continue
4550 }
4551 d := auxIntToInt8(v_1_1.AuxInt)
4552 if !(d >= c+1 && c+1 > c) {
4553 continue
4554 }
4555 v.reset(OpLess8U)
4556 v0 := b.NewValue0(v.Pos, OpSub8, x.Type)
4557 v1 := b.NewValue0(v.Pos, OpConst8, x.Type)
4558 v1.AuxInt = int8ToAuxInt(c + 1)
4559 v0.AddArg2(x, v1)
4560 v2 := b.NewValue0(v.Pos, OpConst8, x.Type)
4561 v2.AuxInt = int8ToAuxInt(d - c - 1)
4562 v.AddArg2(v0, v2)
4563 return true
4564 }
4565 break
4566 }
4567
4568
4569
4570 for {
4571 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
4572 if v_0.Op != OpLess8 {
4573 continue
4574 }
4575 x := v_0.Args[1]
4576 v_0_0 := v_0.Args[0]
4577 if v_0_0.Op != OpConst8 {
4578 continue
4579 }
4580 c := auxIntToInt8(v_0_0.AuxInt)
4581 if v_1.Op != OpLeq8 {
4582 continue
4583 }
4584 _ = v_1.Args[1]
4585 if x != v_1.Args[0] {
4586 continue
4587 }
4588 v_1_1 := v_1.Args[1]
4589 if v_1_1.Op != OpConst8 {
4590 continue
4591 }
4592 d := auxIntToInt8(v_1_1.AuxInt)
4593 if !(d >= c+1 && c+1 > c) {
4594 continue
4595 }
4596 v.reset(OpLeq8U)
4597 v0 := b.NewValue0(v.Pos, OpSub8, x.Type)
4598 v1 := b.NewValue0(v.Pos, OpConst8, x.Type)
4599 v1.AuxInt = int8ToAuxInt(c + 1)
4600 v0.AddArg2(x, v1)
4601 v2 := b.NewValue0(v.Pos, OpConst8, x.Type)
4602 v2.AuxInt = int8ToAuxInt(d - c - 1)
4603 v.AddArg2(v0, v2)
4604 return true
4605 }
4606 break
4607 }
4608
4609
4610
4611 for {
4612 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
4613 if v_0.Op != OpLeq64U {
4614 continue
4615 }
4616 x := v_0.Args[1]
4617 v_0_0 := v_0.Args[0]
4618 if v_0_0.Op != OpConst64 {
4619 continue
4620 }
4621 c := auxIntToInt64(v_0_0.AuxInt)
4622 if v_1.Op != OpLess64U {
4623 continue
4624 }
4625 _ = v_1.Args[1]
4626 if x != v_1.Args[0] {
4627 continue
4628 }
4629 v_1_1 := v_1.Args[1]
4630 if v_1_1.Op != OpConst64 {
4631 continue
4632 }
4633 d := auxIntToInt64(v_1_1.AuxInt)
4634 if !(uint64(d) >= uint64(c)) {
4635 continue
4636 }
4637 v.reset(OpLess64U)
4638 v0 := b.NewValue0(v.Pos, OpSub64, x.Type)
4639 v1 := b.NewValue0(v.Pos, OpConst64, x.Type)
4640 v1.AuxInt = int64ToAuxInt(c)
4641 v0.AddArg2(x, v1)
4642 v2 := b.NewValue0(v.Pos, OpConst64, x.Type)
4643 v2.AuxInt = int64ToAuxInt(d - c)
4644 v.AddArg2(v0, v2)
4645 return true
4646 }
4647 break
4648 }
4649
4650
4651
4652 for {
4653 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
4654 if v_0.Op != OpLeq64U {
4655 continue
4656 }
4657 x := v_0.Args[1]
4658 v_0_0 := v_0.Args[0]
4659 if v_0_0.Op != OpConst64 {
4660 continue
4661 }
4662 c := auxIntToInt64(v_0_0.AuxInt)
4663 if v_1.Op != OpLeq64U {
4664 continue
4665 }
4666 _ = v_1.Args[1]
4667 if x != v_1.Args[0] {
4668 continue
4669 }
4670 v_1_1 := v_1.Args[1]
4671 if v_1_1.Op != OpConst64 {
4672 continue
4673 }
4674 d := auxIntToInt64(v_1_1.AuxInt)
4675 if !(uint64(d) >= uint64(c)) {
4676 continue
4677 }
4678 v.reset(OpLeq64U)
4679 v0 := b.NewValue0(v.Pos, OpSub64, x.Type)
4680 v1 := b.NewValue0(v.Pos, OpConst64, x.Type)
4681 v1.AuxInt = int64ToAuxInt(c)
4682 v0.AddArg2(x, v1)
4683 v2 := b.NewValue0(v.Pos, OpConst64, x.Type)
4684 v2.AuxInt = int64ToAuxInt(d - c)
4685 v.AddArg2(v0, v2)
4686 return true
4687 }
4688 break
4689 }
4690
4691
4692
4693 for {
4694 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
4695 if v_0.Op != OpLeq32U {
4696 continue
4697 }
4698 x := v_0.Args[1]
4699 v_0_0 := v_0.Args[0]
4700 if v_0_0.Op != OpConst32 {
4701 continue
4702 }
4703 c := auxIntToInt32(v_0_0.AuxInt)
4704 if v_1.Op != OpLess32U {
4705 continue
4706 }
4707 _ = v_1.Args[1]
4708 if x != v_1.Args[0] {
4709 continue
4710 }
4711 v_1_1 := v_1.Args[1]
4712 if v_1_1.Op != OpConst32 {
4713 continue
4714 }
4715 d := auxIntToInt32(v_1_1.AuxInt)
4716 if !(uint32(d) >= uint32(c)) {
4717 continue
4718 }
4719 v.reset(OpLess32U)
4720 v0 := b.NewValue0(v.Pos, OpSub32, x.Type)
4721 v1 := b.NewValue0(v.Pos, OpConst32, x.Type)
4722 v1.AuxInt = int32ToAuxInt(c)
4723 v0.AddArg2(x, v1)
4724 v2 := b.NewValue0(v.Pos, OpConst32, x.Type)
4725 v2.AuxInt = int32ToAuxInt(d - c)
4726 v.AddArg2(v0, v2)
4727 return true
4728 }
4729 break
4730 }
4731
4732
4733
4734 for {
4735 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
4736 if v_0.Op != OpLeq32U {
4737 continue
4738 }
4739 x := v_0.Args[1]
4740 v_0_0 := v_0.Args[0]
4741 if v_0_0.Op != OpConst32 {
4742 continue
4743 }
4744 c := auxIntToInt32(v_0_0.AuxInt)
4745 if v_1.Op != OpLeq32U {
4746 continue
4747 }
4748 _ = v_1.Args[1]
4749 if x != v_1.Args[0] {
4750 continue
4751 }
4752 v_1_1 := v_1.Args[1]
4753 if v_1_1.Op != OpConst32 {
4754 continue
4755 }
4756 d := auxIntToInt32(v_1_1.AuxInt)
4757 if !(uint32(d) >= uint32(c)) {
4758 continue
4759 }
4760 v.reset(OpLeq32U)
4761 v0 := b.NewValue0(v.Pos, OpSub32, x.Type)
4762 v1 := b.NewValue0(v.Pos, OpConst32, x.Type)
4763 v1.AuxInt = int32ToAuxInt(c)
4764 v0.AddArg2(x, v1)
4765 v2 := b.NewValue0(v.Pos, OpConst32, x.Type)
4766 v2.AuxInt = int32ToAuxInt(d - c)
4767 v.AddArg2(v0, v2)
4768 return true
4769 }
4770 break
4771 }
4772
4773
4774
4775 for {
4776 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
4777 if v_0.Op != OpLeq16U {
4778 continue
4779 }
4780 x := v_0.Args[1]
4781 v_0_0 := v_0.Args[0]
4782 if v_0_0.Op != OpConst16 {
4783 continue
4784 }
4785 c := auxIntToInt16(v_0_0.AuxInt)
4786 if v_1.Op != OpLess16U {
4787 continue
4788 }
4789 _ = v_1.Args[1]
4790 if x != v_1.Args[0] {
4791 continue
4792 }
4793 v_1_1 := v_1.Args[1]
4794 if v_1_1.Op != OpConst16 {
4795 continue
4796 }
4797 d := auxIntToInt16(v_1_1.AuxInt)
4798 if !(uint16(d) >= uint16(c)) {
4799 continue
4800 }
4801 v.reset(OpLess16U)
4802 v0 := b.NewValue0(v.Pos, OpSub16, x.Type)
4803 v1 := b.NewValue0(v.Pos, OpConst16, x.Type)
4804 v1.AuxInt = int16ToAuxInt(c)
4805 v0.AddArg2(x, v1)
4806 v2 := b.NewValue0(v.Pos, OpConst16, x.Type)
4807 v2.AuxInt = int16ToAuxInt(d - c)
4808 v.AddArg2(v0, v2)
4809 return true
4810 }
4811 break
4812 }
4813
4814
4815
4816 for {
4817 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
4818 if v_0.Op != OpLeq16U {
4819 continue
4820 }
4821 x := v_0.Args[1]
4822 v_0_0 := v_0.Args[0]
4823 if v_0_0.Op != OpConst16 {
4824 continue
4825 }
4826 c := auxIntToInt16(v_0_0.AuxInt)
4827 if v_1.Op != OpLeq16U {
4828 continue
4829 }
4830 _ = v_1.Args[1]
4831 if x != v_1.Args[0] {
4832 continue
4833 }
4834 v_1_1 := v_1.Args[1]
4835 if v_1_1.Op != OpConst16 {
4836 continue
4837 }
4838 d := auxIntToInt16(v_1_1.AuxInt)
4839 if !(uint16(d) >= uint16(c)) {
4840 continue
4841 }
4842 v.reset(OpLeq16U)
4843 v0 := b.NewValue0(v.Pos, OpSub16, x.Type)
4844 v1 := b.NewValue0(v.Pos, OpConst16, x.Type)
4845 v1.AuxInt = int16ToAuxInt(c)
4846 v0.AddArg2(x, v1)
4847 v2 := b.NewValue0(v.Pos, OpConst16, x.Type)
4848 v2.AuxInt = int16ToAuxInt(d - c)
4849 v.AddArg2(v0, v2)
4850 return true
4851 }
4852 break
4853 }
4854
4855
4856
4857 for {
4858 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
4859 if v_0.Op != OpLeq8U {
4860 continue
4861 }
4862 x := v_0.Args[1]
4863 v_0_0 := v_0.Args[0]
4864 if v_0_0.Op != OpConst8 {
4865 continue
4866 }
4867 c := auxIntToInt8(v_0_0.AuxInt)
4868 if v_1.Op != OpLess8U {
4869 continue
4870 }
4871 _ = v_1.Args[1]
4872 if x != v_1.Args[0] {
4873 continue
4874 }
4875 v_1_1 := v_1.Args[1]
4876 if v_1_1.Op != OpConst8 {
4877 continue
4878 }
4879 d := auxIntToInt8(v_1_1.AuxInt)
4880 if !(uint8(d) >= uint8(c)) {
4881 continue
4882 }
4883 v.reset(OpLess8U)
4884 v0 := b.NewValue0(v.Pos, OpSub8, x.Type)
4885 v1 := b.NewValue0(v.Pos, OpConst8, x.Type)
4886 v1.AuxInt = int8ToAuxInt(c)
4887 v0.AddArg2(x, v1)
4888 v2 := b.NewValue0(v.Pos, OpConst8, x.Type)
4889 v2.AuxInt = int8ToAuxInt(d - c)
4890 v.AddArg2(v0, v2)
4891 return true
4892 }
4893 break
4894 }
4895
4896
4897
4898 for {
4899 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
4900 if v_0.Op != OpLeq8U {
4901 continue
4902 }
4903 x := v_0.Args[1]
4904 v_0_0 := v_0.Args[0]
4905 if v_0_0.Op != OpConst8 {
4906 continue
4907 }
4908 c := auxIntToInt8(v_0_0.AuxInt)
4909 if v_1.Op != OpLeq8U {
4910 continue
4911 }
4912 _ = v_1.Args[1]
4913 if x != v_1.Args[0] {
4914 continue
4915 }
4916 v_1_1 := v_1.Args[1]
4917 if v_1_1.Op != OpConst8 {
4918 continue
4919 }
4920 d := auxIntToInt8(v_1_1.AuxInt)
4921 if !(uint8(d) >= uint8(c)) {
4922 continue
4923 }
4924 v.reset(OpLeq8U)
4925 v0 := b.NewValue0(v.Pos, OpSub8, x.Type)
4926 v1 := b.NewValue0(v.Pos, OpConst8, x.Type)
4927 v1.AuxInt = int8ToAuxInt(c)
4928 v0.AddArg2(x, v1)
4929 v2 := b.NewValue0(v.Pos, OpConst8, x.Type)
4930 v2.AuxInt = int8ToAuxInt(d - c)
4931 v.AddArg2(v0, v2)
4932 return true
4933 }
4934 break
4935 }
4936
4937
4938
4939 for {
4940 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
4941 if v_0.Op != OpLess64U {
4942 continue
4943 }
4944 x := v_0.Args[1]
4945 v_0_0 := v_0.Args[0]
4946 if v_0_0.Op != OpConst64 {
4947 continue
4948 }
4949 c := auxIntToInt64(v_0_0.AuxInt)
4950 if v_1.Op != OpLess64U {
4951 continue
4952 }
4953 _ = v_1.Args[1]
4954 if x != v_1.Args[0] {
4955 continue
4956 }
4957 v_1_1 := v_1.Args[1]
4958 if v_1_1.Op != OpConst64 {
4959 continue
4960 }
4961 d := auxIntToInt64(v_1_1.AuxInt)
4962 if !(uint64(d) >= uint64(c+1) && uint64(c+1) > uint64(c)) {
4963 continue
4964 }
4965 v.reset(OpLess64U)
4966 v0 := b.NewValue0(v.Pos, OpSub64, x.Type)
4967 v1 := b.NewValue0(v.Pos, OpConst64, x.Type)
4968 v1.AuxInt = int64ToAuxInt(c + 1)
4969 v0.AddArg2(x, v1)
4970 v2 := b.NewValue0(v.Pos, OpConst64, x.Type)
4971 v2.AuxInt = int64ToAuxInt(d - c - 1)
4972 v.AddArg2(v0, v2)
4973 return true
4974 }
4975 break
4976 }
4977
4978
4979
4980 for {
4981 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
4982 if v_0.Op != OpLess64U {
4983 continue
4984 }
4985 x := v_0.Args[1]
4986 v_0_0 := v_0.Args[0]
4987 if v_0_0.Op != OpConst64 {
4988 continue
4989 }
4990 c := auxIntToInt64(v_0_0.AuxInt)
4991 if v_1.Op != OpLeq64U {
4992 continue
4993 }
4994 _ = v_1.Args[1]
4995 if x != v_1.Args[0] {
4996 continue
4997 }
4998 v_1_1 := v_1.Args[1]
4999 if v_1_1.Op != OpConst64 {
5000 continue
5001 }
5002 d := auxIntToInt64(v_1_1.AuxInt)
5003 if !(uint64(d) >= uint64(c+1) && uint64(c+1) > uint64(c)) {
5004 continue
5005 }
5006 v.reset(OpLeq64U)
5007 v0 := b.NewValue0(v.Pos, OpSub64, x.Type)
5008 v1 := b.NewValue0(v.Pos, OpConst64, x.Type)
5009 v1.AuxInt = int64ToAuxInt(c + 1)
5010 v0.AddArg2(x, v1)
5011 v2 := b.NewValue0(v.Pos, OpConst64, x.Type)
5012 v2.AuxInt = int64ToAuxInt(d - c - 1)
5013 v.AddArg2(v0, v2)
5014 return true
5015 }
5016 break
5017 }
5018
5019
5020
5021 for {
5022 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
5023 if v_0.Op != OpLess32U {
5024 continue
5025 }
5026 x := v_0.Args[1]
5027 v_0_0 := v_0.Args[0]
5028 if v_0_0.Op != OpConst32 {
5029 continue
5030 }
5031 c := auxIntToInt32(v_0_0.AuxInt)
5032 if v_1.Op != OpLess32U {
5033 continue
5034 }
5035 _ = v_1.Args[1]
5036 if x != v_1.Args[0] {
5037 continue
5038 }
5039 v_1_1 := v_1.Args[1]
5040 if v_1_1.Op != OpConst32 {
5041 continue
5042 }
5043 d := auxIntToInt32(v_1_1.AuxInt)
5044 if !(uint32(d) >= uint32(c+1) && uint32(c+1) > uint32(c)) {
5045 continue
5046 }
5047 v.reset(OpLess32U)
5048 v0 := b.NewValue0(v.Pos, OpSub32, x.Type)
5049 v1 := b.NewValue0(v.Pos, OpConst32, x.Type)
5050 v1.AuxInt = int32ToAuxInt(c + 1)
5051 v0.AddArg2(x, v1)
5052 v2 := b.NewValue0(v.Pos, OpConst32, x.Type)
5053 v2.AuxInt = int32ToAuxInt(d - c - 1)
5054 v.AddArg2(v0, v2)
5055 return true
5056 }
5057 break
5058 }
5059
5060
5061
5062 for {
5063 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
5064 if v_0.Op != OpLess32U {
5065 continue
5066 }
5067 x := v_0.Args[1]
5068 v_0_0 := v_0.Args[0]
5069 if v_0_0.Op != OpConst32 {
5070 continue
5071 }
5072 c := auxIntToInt32(v_0_0.AuxInt)
5073 if v_1.Op != OpLeq32U {
5074 continue
5075 }
5076 _ = v_1.Args[1]
5077 if x != v_1.Args[0] {
5078 continue
5079 }
5080 v_1_1 := v_1.Args[1]
5081 if v_1_1.Op != OpConst32 {
5082 continue
5083 }
5084 d := auxIntToInt32(v_1_1.AuxInt)
5085 if !(uint32(d) >= uint32(c+1) && uint32(c+1) > uint32(c)) {
5086 continue
5087 }
5088 v.reset(OpLeq32U)
5089 v0 := b.NewValue0(v.Pos, OpSub32, x.Type)
5090 v1 := b.NewValue0(v.Pos, OpConst32, x.Type)
5091 v1.AuxInt = int32ToAuxInt(c + 1)
5092 v0.AddArg2(x, v1)
5093 v2 := b.NewValue0(v.Pos, OpConst32, x.Type)
5094 v2.AuxInt = int32ToAuxInt(d - c - 1)
5095 v.AddArg2(v0, v2)
5096 return true
5097 }
5098 break
5099 }
5100
5101
5102
5103 for {
5104 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
5105 if v_0.Op != OpLess16U {
5106 continue
5107 }
5108 x := v_0.Args[1]
5109 v_0_0 := v_0.Args[0]
5110 if v_0_0.Op != OpConst16 {
5111 continue
5112 }
5113 c := auxIntToInt16(v_0_0.AuxInt)
5114 if v_1.Op != OpLess16U {
5115 continue
5116 }
5117 _ = v_1.Args[1]
5118 if x != v_1.Args[0] {
5119 continue
5120 }
5121 v_1_1 := v_1.Args[1]
5122 if v_1_1.Op != OpConst16 {
5123 continue
5124 }
5125 d := auxIntToInt16(v_1_1.AuxInt)
5126 if !(uint16(d) >= uint16(c+1) && uint16(c+1) > uint16(c)) {
5127 continue
5128 }
5129 v.reset(OpLess16U)
5130 v0 := b.NewValue0(v.Pos, OpSub16, x.Type)
5131 v1 := b.NewValue0(v.Pos, OpConst16, x.Type)
5132 v1.AuxInt = int16ToAuxInt(c + 1)
5133 v0.AddArg2(x, v1)
5134 v2 := b.NewValue0(v.Pos, OpConst16, x.Type)
5135 v2.AuxInt = int16ToAuxInt(d - c - 1)
5136 v.AddArg2(v0, v2)
5137 return true
5138 }
5139 break
5140 }
5141
5142
5143
5144 for {
5145 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
5146 if v_0.Op != OpLess16U {
5147 continue
5148 }
5149 x := v_0.Args[1]
5150 v_0_0 := v_0.Args[0]
5151 if v_0_0.Op != OpConst16 {
5152 continue
5153 }
5154 c := auxIntToInt16(v_0_0.AuxInt)
5155 if v_1.Op != OpLeq16U {
5156 continue
5157 }
5158 _ = v_1.Args[1]
5159 if x != v_1.Args[0] {
5160 continue
5161 }
5162 v_1_1 := v_1.Args[1]
5163 if v_1_1.Op != OpConst16 {
5164 continue
5165 }
5166 d := auxIntToInt16(v_1_1.AuxInt)
5167 if !(uint16(d) >= uint16(c+1) && uint16(c+1) > uint16(c)) {
5168 continue
5169 }
5170 v.reset(OpLeq16U)
5171 v0 := b.NewValue0(v.Pos, OpSub16, x.Type)
5172 v1 := b.NewValue0(v.Pos, OpConst16, x.Type)
5173 v1.AuxInt = int16ToAuxInt(c + 1)
5174 v0.AddArg2(x, v1)
5175 v2 := b.NewValue0(v.Pos, OpConst16, x.Type)
5176 v2.AuxInt = int16ToAuxInt(d - c - 1)
5177 v.AddArg2(v0, v2)
5178 return true
5179 }
5180 break
5181 }
5182
5183
5184
5185 for {
5186 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
5187 if v_0.Op != OpLess8U {
5188 continue
5189 }
5190 x := v_0.Args[1]
5191 v_0_0 := v_0.Args[0]
5192 if v_0_0.Op != OpConst8 {
5193 continue
5194 }
5195 c := auxIntToInt8(v_0_0.AuxInt)
5196 if v_1.Op != OpLess8U {
5197 continue
5198 }
5199 _ = v_1.Args[1]
5200 if x != v_1.Args[0] {
5201 continue
5202 }
5203 v_1_1 := v_1.Args[1]
5204 if v_1_1.Op != OpConst8 {
5205 continue
5206 }
5207 d := auxIntToInt8(v_1_1.AuxInt)
5208 if !(uint8(d) >= uint8(c+1) && uint8(c+1) > uint8(c)) {
5209 continue
5210 }
5211 v.reset(OpLess8U)
5212 v0 := b.NewValue0(v.Pos, OpSub8, x.Type)
5213 v1 := b.NewValue0(v.Pos, OpConst8, x.Type)
5214 v1.AuxInt = int8ToAuxInt(c + 1)
5215 v0.AddArg2(x, v1)
5216 v2 := b.NewValue0(v.Pos, OpConst8, x.Type)
5217 v2.AuxInt = int8ToAuxInt(d - c - 1)
5218 v.AddArg2(v0, v2)
5219 return true
5220 }
5221 break
5222 }
5223
5224
5225
5226 for {
5227 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
5228 if v_0.Op != OpLess8U {
5229 continue
5230 }
5231 x := v_0.Args[1]
5232 v_0_0 := v_0.Args[0]
5233 if v_0_0.Op != OpConst8 {
5234 continue
5235 }
5236 c := auxIntToInt8(v_0_0.AuxInt)
5237 if v_1.Op != OpLeq8U {
5238 continue
5239 }
5240 _ = v_1.Args[1]
5241 if x != v_1.Args[0] {
5242 continue
5243 }
5244 v_1_1 := v_1.Args[1]
5245 if v_1_1.Op != OpConst8 {
5246 continue
5247 }
5248 d := auxIntToInt8(v_1_1.AuxInt)
5249 if !(uint8(d) >= uint8(c+1) && uint8(c+1) > uint8(c)) {
5250 continue
5251 }
5252 v.reset(OpLeq8U)
5253 v0 := b.NewValue0(v.Pos, OpSub8, x.Type)
5254 v1 := b.NewValue0(v.Pos, OpConst8, x.Type)
5255 v1.AuxInt = int8ToAuxInt(c + 1)
5256 v0.AddArg2(x, v1)
5257 v2 := b.NewValue0(v.Pos, OpConst8, x.Type)
5258 v2.AuxInt = int8ToAuxInt(d - c - 1)
5259 v.AddArg2(v0, v2)
5260 return true
5261 }
5262 break
5263 }
5264 return false
5265 }
5266 func rewriteValuegeneric_OpArraySelect(v *Value) bool {
5267 v_0 := v.Args[0]
5268
5269
5270 for {
5271 if v_0.Op != OpArrayMake1 {
5272 break
5273 }
5274 x := v_0.Args[0]
5275 v.copyOf(x)
5276 return true
5277 }
5278
5279
5280 for {
5281 if auxIntToInt64(v.AuxInt) != 0 || v_0.Op != OpIData {
5282 break
5283 }
5284 x := v_0.Args[0]
5285 v.reset(OpIData)
5286 v.AddArg(x)
5287 return true
5288 }
5289 return false
5290 }
5291 func rewriteValuegeneric_OpCeil(v *Value) bool {
5292 v_0 := v.Args[0]
5293
5294
5295 for {
5296 if v_0.Op != OpConst64F {
5297 break
5298 }
5299 c := auxIntToFloat64(v_0.AuxInt)
5300 v.reset(OpConst64F)
5301 v.AuxInt = float64ToAuxInt(math.Ceil(c))
5302 return true
5303 }
5304 return false
5305 }
5306 func rewriteValuegeneric_OpCom16(v *Value) bool {
5307 v_0 := v.Args[0]
5308
5309
5310 for {
5311 if v_0.Op != OpCom16 {
5312 break
5313 }
5314 x := v_0.Args[0]
5315 v.copyOf(x)
5316 return true
5317 }
5318
5319
5320 for {
5321 if v_0.Op != OpConst16 {
5322 break
5323 }
5324 c := auxIntToInt16(v_0.AuxInt)
5325 v.reset(OpConst16)
5326 v.AuxInt = int16ToAuxInt(^c)
5327 return true
5328 }
5329
5330
5331 for {
5332 if v_0.Op != OpAdd16 {
5333 break
5334 }
5335 _ = v_0.Args[1]
5336 v_0_0 := v_0.Args[0]
5337 v_0_1 := v_0.Args[1]
5338 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
5339 if v_0_0.Op != OpConst16 || auxIntToInt16(v_0_0.AuxInt) != -1 {
5340 continue
5341 }
5342 x := v_0_1
5343 v.reset(OpNeg16)
5344 v.AddArg(x)
5345 return true
5346 }
5347 break
5348 }
5349 return false
5350 }
5351 func rewriteValuegeneric_OpCom32(v *Value) bool {
5352 v_0 := v.Args[0]
5353
5354
5355 for {
5356 if v_0.Op != OpCom32 {
5357 break
5358 }
5359 x := v_0.Args[0]
5360 v.copyOf(x)
5361 return true
5362 }
5363
5364
5365 for {
5366 if v_0.Op != OpConst32 {
5367 break
5368 }
5369 c := auxIntToInt32(v_0.AuxInt)
5370 v.reset(OpConst32)
5371 v.AuxInt = int32ToAuxInt(^c)
5372 return true
5373 }
5374
5375
5376 for {
5377 if v_0.Op != OpAdd32 {
5378 break
5379 }
5380 _ = v_0.Args[1]
5381 v_0_0 := v_0.Args[0]
5382 v_0_1 := v_0.Args[1]
5383 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
5384 if v_0_0.Op != OpConst32 || auxIntToInt32(v_0_0.AuxInt) != -1 {
5385 continue
5386 }
5387 x := v_0_1
5388 v.reset(OpNeg32)
5389 v.AddArg(x)
5390 return true
5391 }
5392 break
5393 }
5394 return false
5395 }
5396 func rewriteValuegeneric_OpCom64(v *Value) bool {
5397 v_0 := v.Args[0]
5398
5399
5400 for {
5401 if v_0.Op != OpCom64 {
5402 break
5403 }
5404 x := v_0.Args[0]
5405 v.copyOf(x)
5406 return true
5407 }
5408
5409
5410 for {
5411 if v_0.Op != OpConst64 {
5412 break
5413 }
5414 c := auxIntToInt64(v_0.AuxInt)
5415 v.reset(OpConst64)
5416 v.AuxInt = int64ToAuxInt(^c)
5417 return true
5418 }
5419
5420
5421 for {
5422 if v_0.Op != OpAdd64 {
5423 break
5424 }
5425 _ = v_0.Args[1]
5426 v_0_0 := v_0.Args[0]
5427 v_0_1 := v_0.Args[1]
5428 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
5429 if v_0_0.Op != OpConst64 || auxIntToInt64(v_0_0.AuxInt) != -1 {
5430 continue
5431 }
5432 x := v_0_1
5433 v.reset(OpNeg64)
5434 v.AddArg(x)
5435 return true
5436 }
5437 break
5438 }
5439 return false
5440 }
5441 func rewriteValuegeneric_OpCom8(v *Value) bool {
5442 v_0 := v.Args[0]
5443
5444
5445 for {
5446 if v_0.Op != OpCom8 {
5447 break
5448 }
5449 x := v_0.Args[0]
5450 v.copyOf(x)
5451 return true
5452 }
5453
5454
5455 for {
5456 if v_0.Op != OpConst8 {
5457 break
5458 }
5459 c := auxIntToInt8(v_0.AuxInt)
5460 v.reset(OpConst8)
5461 v.AuxInt = int8ToAuxInt(^c)
5462 return true
5463 }
5464
5465
5466 for {
5467 if v_0.Op != OpAdd8 {
5468 break
5469 }
5470 _ = v_0.Args[1]
5471 v_0_0 := v_0.Args[0]
5472 v_0_1 := v_0.Args[1]
5473 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
5474 if v_0_0.Op != OpConst8 || auxIntToInt8(v_0_0.AuxInt) != -1 {
5475 continue
5476 }
5477 x := v_0_1
5478 v.reset(OpNeg8)
5479 v.AddArg(x)
5480 return true
5481 }
5482 break
5483 }
5484 return false
5485 }
5486 func rewriteValuegeneric_OpConstInterface(v *Value) bool {
5487 b := v.Block
5488 typ := &b.Func.Config.Types
5489
5490
5491 for {
5492 v.reset(OpIMake)
5493 v0 := b.NewValue0(v.Pos, OpConstNil, typ.Uintptr)
5494 v1 := b.NewValue0(v.Pos, OpConstNil, typ.BytePtr)
5495 v.AddArg2(v0, v1)
5496 return true
5497 }
5498 }
5499 func rewriteValuegeneric_OpConstSlice(v *Value) bool {
5500 b := v.Block
5501 config := b.Func.Config
5502 typ := &b.Func.Config.Types
5503
5504
5505
5506 for {
5507 if !(config.PtrSize == 4) {
5508 break
5509 }
5510 v.reset(OpSliceMake)
5511 v0 := b.NewValue0(v.Pos, OpConstNil, v.Type.Elem().PtrTo())
5512 v1 := b.NewValue0(v.Pos, OpConst32, typ.Int)
5513 v1.AuxInt = int32ToAuxInt(0)
5514 v.AddArg3(v0, v1, v1)
5515 return true
5516 }
5517
5518
5519
5520 for {
5521 if !(config.PtrSize == 8) {
5522 break
5523 }
5524 v.reset(OpSliceMake)
5525 v0 := b.NewValue0(v.Pos, OpConstNil, v.Type.Elem().PtrTo())
5526 v1 := b.NewValue0(v.Pos, OpConst64, typ.Int)
5527 v1.AuxInt = int64ToAuxInt(0)
5528 v.AddArg3(v0, v1, v1)
5529 return true
5530 }
5531 return false
5532 }
5533 func rewriteValuegeneric_OpConstString(v *Value) bool {
5534 b := v.Block
5535 config := b.Func.Config
5536 fe := b.Func.fe
5537 typ := &b.Func.Config.Types
5538
5539
5540
5541 for {
5542 str := auxToString(v.Aux)
5543 if !(config.PtrSize == 4 && str == "") {
5544 break
5545 }
5546 v.reset(OpStringMake)
5547 v0 := b.NewValue0(v.Pos, OpConstNil, typ.BytePtr)
5548 v1 := b.NewValue0(v.Pos, OpConst32, typ.Int)
5549 v1.AuxInt = int32ToAuxInt(0)
5550 v.AddArg2(v0, v1)
5551 return true
5552 }
5553
5554
5555
5556 for {
5557 str := auxToString(v.Aux)
5558 if !(config.PtrSize == 8 && str == "") {
5559 break
5560 }
5561 v.reset(OpStringMake)
5562 v0 := b.NewValue0(v.Pos, OpConstNil, typ.BytePtr)
5563 v1 := b.NewValue0(v.Pos, OpConst64, typ.Int)
5564 v1.AuxInt = int64ToAuxInt(0)
5565 v.AddArg2(v0, v1)
5566 return true
5567 }
5568
5569
5570
5571 for {
5572 str := auxToString(v.Aux)
5573 if !(config.PtrSize == 4 && str != "") {
5574 break
5575 }
5576 v.reset(OpStringMake)
5577 v0 := b.NewValue0(v.Pos, OpAddr, typ.BytePtr)
5578 v0.Aux = symToAux(fe.StringData(str))
5579 v1 := b.NewValue0(v.Pos, OpSB, typ.Uintptr)
5580 v0.AddArg(v1)
5581 v2 := b.NewValue0(v.Pos, OpConst32, typ.Int)
5582 v2.AuxInt = int32ToAuxInt(int32(len(str)))
5583 v.AddArg2(v0, v2)
5584 return true
5585 }
5586
5587
5588
5589 for {
5590 str := auxToString(v.Aux)
5591 if !(config.PtrSize == 8 && str != "") {
5592 break
5593 }
5594 v.reset(OpStringMake)
5595 v0 := b.NewValue0(v.Pos, OpAddr, typ.BytePtr)
5596 v0.Aux = symToAux(fe.StringData(str))
5597 v1 := b.NewValue0(v.Pos, OpSB, typ.Uintptr)
5598 v0.AddArg(v1)
5599 v2 := b.NewValue0(v.Pos, OpConst64, typ.Int)
5600 v2.AuxInt = int64ToAuxInt(int64(len(str)))
5601 v.AddArg2(v0, v2)
5602 return true
5603 }
5604 return false
5605 }
5606 func rewriteValuegeneric_OpConvert(v *Value) bool {
5607 v_1 := v.Args[1]
5608 v_0 := v.Args[0]
5609
5610
5611 for {
5612 if v_0.Op != OpAdd64 {
5613 break
5614 }
5615 _ = v_0.Args[1]
5616 v_0_0 := v_0.Args[0]
5617 v_0_1 := v_0.Args[1]
5618 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
5619 if v_0_0.Op != OpConvert {
5620 continue
5621 }
5622 mem := v_0_0.Args[1]
5623 ptr := v_0_0.Args[0]
5624 off := v_0_1
5625 if mem != v_1 {
5626 continue
5627 }
5628 v.reset(OpAddPtr)
5629 v.AddArg2(ptr, off)
5630 return true
5631 }
5632 break
5633 }
5634
5635
5636 for {
5637 if v_0.Op != OpAdd32 {
5638 break
5639 }
5640 _ = v_0.Args[1]
5641 v_0_0 := v_0.Args[0]
5642 v_0_1 := v_0.Args[1]
5643 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
5644 if v_0_0.Op != OpConvert {
5645 continue
5646 }
5647 mem := v_0_0.Args[1]
5648 ptr := v_0_0.Args[0]
5649 off := v_0_1
5650 if mem != v_1 {
5651 continue
5652 }
5653 v.reset(OpAddPtr)
5654 v.AddArg2(ptr, off)
5655 return true
5656 }
5657 break
5658 }
5659
5660
5661 for {
5662 if v_0.Op != OpConvert {
5663 break
5664 }
5665 mem := v_0.Args[1]
5666 ptr := v_0.Args[0]
5667 if mem != v_1 {
5668 break
5669 }
5670 v.copyOf(ptr)
5671 return true
5672 }
5673 return false
5674 }
5675 func rewriteValuegeneric_OpCtz16(v *Value) bool {
5676 v_0 := v.Args[0]
5677 b := v.Block
5678 config := b.Func.Config
5679
5680
5681
5682 for {
5683 if v_0.Op != OpConst16 {
5684 break
5685 }
5686 c := auxIntToInt16(v_0.AuxInt)
5687 if !(config.PtrSize == 4) {
5688 break
5689 }
5690 v.reset(OpConst32)
5691 v.AuxInt = int32ToAuxInt(int32(ntz16(c)))
5692 return true
5693 }
5694
5695
5696
5697 for {
5698 if v_0.Op != OpConst16 {
5699 break
5700 }
5701 c := auxIntToInt16(v_0.AuxInt)
5702 if !(config.PtrSize == 8) {
5703 break
5704 }
5705 v.reset(OpConst64)
5706 v.AuxInt = int64ToAuxInt(int64(ntz16(c)))
5707 return true
5708 }
5709 return false
5710 }
5711 func rewriteValuegeneric_OpCtz32(v *Value) bool {
5712 v_0 := v.Args[0]
5713 b := v.Block
5714 config := b.Func.Config
5715
5716
5717
5718 for {
5719 if v_0.Op != OpConst32 {
5720 break
5721 }
5722 c := auxIntToInt32(v_0.AuxInt)
5723 if !(config.PtrSize == 4) {
5724 break
5725 }
5726 v.reset(OpConst32)
5727 v.AuxInt = int32ToAuxInt(int32(ntz32(c)))
5728 return true
5729 }
5730
5731
5732
5733 for {
5734 if v_0.Op != OpConst32 {
5735 break
5736 }
5737 c := auxIntToInt32(v_0.AuxInt)
5738 if !(config.PtrSize == 8) {
5739 break
5740 }
5741 v.reset(OpConst64)
5742 v.AuxInt = int64ToAuxInt(int64(ntz32(c)))
5743 return true
5744 }
5745 return false
5746 }
5747 func rewriteValuegeneric_OpCtz64(v *Value) bool {
5748 v_0 := v.Args[0]
5749 b := v.Block
5750 config := b.Func.Config
5751
5752
5753
5754 for {
5755 if v_0.Op != OpConst64 {
5756 break
5757 }
5758 c := auxIntToInt64(v_0.AuxInt)
5759 if !(config.PtrSize == 4) {
5760 break
5761 }
5762 v.reset(OpConst32)
5763 v.AuxInt = int32ToAuxInt(int32(ntz64(c)))
5764 return true
5765 }
5766
5767
5768
5769 for {
5770 if v_0.Op != OpConst64 {
5771 break
5772 }
5773 c := auxIntToInt64(v_0.AuxInt)
5774 if !(config.PtrSize == 8) {
5775 break
5776 }
5777 v.reset(OpConst64)
5778 v.AuxInt = int64ToAuxInt(int64(ntz64(c)))
5779 return true
5780 }
5781 return false
5782 }
5783 func rewriteValuegeneric_OpCtz8(v *Value) bool {
5784 v_0 := v.Args[0]
5785 b := v.Block
5786 config := b.Func.Config
5787
5788
5789
5790 for {
5791 if v_0.Op != OpConst8 {
5792 break
5793 }
5794 c := auxIntToInt8(v_0.AuxInt)
5795 if !(config.PtrSize == 4) {
5796 break
5797 }
5798 v.reset(OpConst32)
5799 v.AuxInt = int32ToAuxInt(int32(ntz8(c)))
5800 return true
5801 }
5802
5803
5804
5805 for {
5806 if v_0.Op != OpConst8 {
5807 break
5808 }
5809 c := auxIntToInt8(v_0.AuxInt)
5810 if !(config.PtrSize == 8) {
5811 break
5812 }
5813 v.reset(OpConst64)
5814 v.AuxInt = int64ToAuxInt(int64(ntz8(c)))
5815 return true
5816 }
5817 return false
5818 }
5819 func rewriteValuegeneric_OpCvt32Fto32(v *Value) bool {
5820 v_0 := v.Args[0]
5821
5822
5823 for {
5824 if v_0.Op != OpConst32F {
5825 break
5826 }
5827 c := auxIntToFloat32(v_0.AuxInt)
5828 v.reset(OpConst32)
5829 v.AuxInt = int32ToAuxInt(int32(c))
5830 return true
5831 }
5832 return false
5833 }
5834 func rewriteValuegeneric_OpCvt32Fto64(v *Value) bool {
5835 v_0 := v.Args[0]
5836
5837
5838 for {
5839 if v_0.Op != OpConst32F {
5840 break
5841 }
5842 c := auxIntToFloat32(v_0.AuxInt)
5843 v.reset(OpConst64)
5844 v.AuxInt = int64ToAuxInt(int64(c))
5845 return true
5846 }
5847 return false
5848 }
5849 func rewriteValuegeneric_OpCvt32Fto64F(v *Value) bool {
5850 v_0 := v.Args[0]
5851
5852
5853 for {
5854 if v_0.Op != OpConst32F {
5855 break
5856 }
5857 c := auxIntToFloat32(v_0.AuxInt)
5858 v.reset(OpConst64F)
5859 v.AuxInt = float64ToAuxInt(float64(c))
5860 return true
5861 }
5862 return false
5863 }
5864 func rewriteValuegeneric_OpCvt32to32F(v *Value) bool {
5865 v_0 := v.Args[0]
5866
5867
5868 for {
5869 if v_0.Op != OpConst32 {
5870 break
5871 }
5872 c := auxIntToInt32(v_0.AuxInt)
5873 v.reset(OpConst32F)
5874 v.AuxInt = float32ToAuxInt(float32(c))
5875 return true
5876 }
5877 return false
5878 }
5879 func rewriteValuegeneric_OpCvt32to64F(v *Value) bool {
5880 v_0 := v.Args[0]
5881
5882
5883 for {
5884 if v_0.Op != OpConst32 {
5885 break
5886 }
5887 c := auxIntToInt32(v_0.AuxInt)
5888 v.reset(OpConst64F)
5889 v.AuxInt = float64ToAuxInt(float64(c))
5890 return true
5891 }
5892 return false
5893 }
5894 func rewriteValuegeneric_OpCvt64Fto32(v *Value) bool {
5895 v_0 := v.Args[0]
5896
5897
5898 for {
5899 if v_0.Op != OpConst64F {
5900 break
5901 }
5902 c := auxIntToFloat64(v_0.AuxInt)
5903 v.reset(OpConst32)
5904 v.AuxInt = int32ToAuxInt(int32(c))
5905 return true
5906 }
5907 return false
5908 }
5909 func rewriteValuegeneric_OpCvt64Fto32F(v *Value) bool {
5910 v_0 := v.Args[0]
5911
5912
5913 for {
5914 if v_0.Op != OpConst64F {
5915 break
5916 }
5917 c := auxIntToFloat64(v_0.AuxInt)
5918 v.reset(OpConst32F)
5919 v.AuxInt = float32ToAuxInt(float32(c))
5920 return true
5921 }
5922
5923
5924
5925 for {
5926 sqrt0 := v_0
5927 if sqrt0.Op != OpSqrt {
5928 break
5929 }
5930 sqrt0_0 := sqrt0.Args[0]
5931 if sqrt0_0.Op != OpCvt32Fto64F {
5932 break
5933 }
5934 x := sqrt0_0.Args[0]
5935 if !(sqrt0.Uses == 1) {
5936 break
5937 }
5938 v.reset(OpSqrt32)
5939 v.AddArg(x)
5940 return true
5941 }
5942 return false
5943 }
5944 func rewriteValuegeneric_OpCvt64Fto64(v *Value) bool {
5945 v_0 := v.Args[0]
5946
5947
5948 for {
5949 if v_0.Op != OpConst64F {
5950 break
5951 }
5952 c := auxIntToFloat64(v_0.AuxInt)
5953 v.reset(OpConst64)
5954 v.AuxInt = int64ToAuxInt(int64(c))
5955 return true
5956 }
5957 return false
5958 }
5959 func rewriteValuegeneric_OpCvt64to32F(v *Value) bool {
5960 v_0 := v.Args[0]
5961
5962
5963 for {
5964 if v_0.Op != OpConst64 {
5965 break
5966 }
5967 c := auxIntToInt64(v_0.AuxInt)
5968 v.reset(OpConst32F)
5969 v.AuxInt = float32ToAuxInt(float32(c))
5970 return true
5971 }
5972 return false
5973 }
5974 func rewriteValuegeneric_OpCvt64to64F(v *Value) bool {
5975 v_0 := v.Args[0]
5976
5977
5978 for {
5979 if v_0.Op != OpConst64 {
5980 break
5981 }
5982 c := auxIntToInt64(v_0.AuxInt)
5983 v.reset(OpConst64F)
5984 v.AuxInt = float64ToAuxInt(float64(c))
5985 return true
5986 }
5987 return false
5988 }
5989 func rewriteValuegeneric_OpCvtBoolToUint8(v *Value) bool {
5990 v_0 := v.Args[0]
5991
5992
5993 for {
5994 if v_0.Op != OpConstBool || auxIntToBool(v_0.AuxInt) != false {
5995 break
5996 }
5997 v.reset(OpConst8)
5998 v.AuxInt = int8ToAuxInt(0)
5999 return true
6000 }
6001
6002
6003 for {
6004 if v_0.Op != OpConstBool || auxIntToBool(v_0.AuxInt) != true {
6005 break
6006 }
6007 v.reset(OpConst8)
6008 v.AuxInt = int8ToAuxInt(1)
6009 return true
6010 }
6011 return false
6012 }
6013 func rewriteValuegeneric_OpDiv16(v *Value) bool {
6014 v_1 := v.Args[1]
6015 v_0 := v.Args[0]
6016 b := v.Block
6017 typ := &b.Func.Config.Types
6018
6019
6020
6021 for {
6022 if v_0.Op != OpConst16 {
6023 break
6024 }
6025 c := auxIntToInt16(v_0.AuxInt)
6026 if v_1.Op != OpConst16 {
6027 break
6028 }
6029 d := auxIntToInt16(v_1.AuxInt)
6030 if !(d != 0) {
6031 break
6032 }
6033 v.reset(OpConst16)
6034 v.AuxInt = int16ToAuxInt(c / d)
6035 return true
6036 }
6037
6038
6039
6040 for {
6041 n := v_0
6042 if v_1.Op != OpConst16 {
6043 break
6044 }
6045 c := auxIntToInt16(v_1.AuxInt)
6046 if !(isNonNegative(n) && isPowerOfTwo16(c)) {
6047 break
6048 }
6049 v.reset(OpRsh16Ux64)
6050 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
6051 v0.AuxInt = int64ToAuxInt(log16(c))
6052 v.AddArg2(n, v0)
6053 return true
6054 }
6055
6056
6057
6058 for {
6059 t := v.Type
6060 n := v_0
6061 if v_1.Op != OpConst16 {
6062 break
6063 }
6064 c := auxIntToInt16(v_1.AuxInt)
6065 if !(c < 0 && c != -1<<15) {
6066 break
6067 }
6068 v.reset(OpNeg16)
6069 v0 := b.NewValue0(v.Pos, OpDiv16, t)
6070 v1 := b.NewValue0(v.Pos, OpConst16, t)
6071 v1.AuxInt = int16ToAuxInt(-c)
6072 v0.AddArg2(n, v1)
6073 v.AddArg(v0)
6074 return true
6075 }
6076
6077
6078 for {
6079 t := v.Type
6080 x := v_0
6081 if v_1.Op != OpConst16 || auxIntToInt16(v_1.AuxInt) != -1<<15 {
6082 break
6083 }
6084 v.reset(OpRsh16Ux64)
6085 v0 := b.NewValue0(v.Pos, OpAnd16, t)
6086 v1 := b.NewValue0(v.Pos, OpNeg16, t)
6087 v1.AddArg(x)
6088 v0.AddArg2(x, v1)
6089 v2 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
6090 v2.AuxInt = int64ToAuxInt(15)
6091 v.AddArg2(v0, v2)
6092 return true
6093 }
6094
6095
6096
6097 for {
6098 t := v.Type
6099 n := v_0
6100 if v_1.Op != OpConst16 {
6101 break
6102 }
6103 c := auxIntToInt16(v_1.AuxInt)
6104 if !(isPowerOfTwo16(c)) {
6105 break
6106 }
6107 v.reset(OpRsh16x64)
6108 v0 := b.NewValue0(v.Pos, OpAdd16, t)
6109 v1 := b.NewValue0(v.Pos, OpRsh16Ux64, t)
6110 v2 := b.NewValue0(v.Pos, OpRsh16x64, t)
6111 v3 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
6112 v3.AuxInt = int64ToAuxInt(15)
6113 v2.AddArg2(n, v3)
6114 v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
6115 v4.AuxInt = int64ToAuxInt(int64(16 - log16(c)))
6116 v1.AddArg2(v2, v4)
6117 v0.AddArg2(n, v1)
6118 v5 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
6119 v5.AuxInt = int64ToAuxInt(int64(log16(c)))
6120 v.AddArg2(v0, v5)
6121 return true
6122 }
6123
6124
6125
6126 for {
6127 t := v.Type
6128 x := v_0
6129 if v_1.Op != OpConst16 {
6130 break
6131 }
6132 c := auxIntToInt16(v_1.AuxInt)
6133 if !(smagicOK16(c)) {
6134 break
6135 }
6136 v.reset(OpSub16)
6137 v.Type = t
6138 v0 := b.NewValue0(v.Pos, OpRsh32x64, t)
6139 v1 := b.NewValue0(v.Pos, OpMul32, typ.UInt32)
6140 v2 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
6141 v2.AuxInt = int32ToAuxInt(int32(smagic16(c).m))
6142 v3 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
6143 v3.AddArg(x)
6144 v1.AddArg2(v2, v3)
6145 v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
6146 v4.AuxInt = int64ToAuxInt(16 + smagic16(c).s)
6147 v0.AddArg2(v1, v4)
6148 v5 := b.NewValue0(v.Pos, OpRsh32x64, t)
6149 v6 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
6150 v6.AuxInt = int64ToAuxInt(31)
6151 v5.AddArg2(v3, v6)
6152 v.AddArg2(v0, v5)
6153 return true
6154 }
6155 return false
6156 }
6157 func rewriteValuegeneric_OpDiv16u(v *Value) bool {
6158 v_1 := v.Args[1]
6159 v_0 := v.Args[0]
6160 b := v.Block
6161 config := b.Func.Config
6162 typ := &b.Func.Config.Types
6163
6164
6165
6166 for {
6167 if v_0.Op != OpConst16 {
6168 break
6169 }
6170 c := auxIntToInt16(v_0.AuxInt)
6171 if v_1.Op != OpConst16 {
6172 break
6173 }
6174 d := auxIntToInt16(v_1.AuxInt)
6175 if !(d != 0) {
6176 break
6177 }
6178 v.reset(OpConst16)
6179 v.AuxInt = int16ToAuxInt(int16(uint16(c) / uint16(d)))
6180 return true
6181 }
6182
6183
6184
6185 for {
6186 n := v_0
6187 if v_1.Op != OpConst16 {
6188 break
6189 }
6190 c := auxIntToInt16(v_1.AuxInt)
6191 if !(isPowerOfTwo16(c)) {
6192 break
6193 }
6194 v.reset(OpRsh16Ux64)
6195 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
6196 v0.AuxInt = int64ToAuxInt(log16(c))
6197 v.AddArg2(n, v0)
6198 return true
6199 }
6200
6201
6202
6203 for {
6204 x := v_0
6205 if v_1.Op != OpConst16 {
6206 break
6207 }
6208 c := auxIntToInt16(v_1.AuxInt)
6209 if !(umagicOK16(c) && config.RegSize == 8) {
6210 break
6211 }
6212 v.reset(OpTrunc64to16)
6213 v0 := b.NewValue0(v.Pos, OpRsh64Ux64, typ.UInt64)
6214 v1 := b.NewValue0(v.Pos, OpMul64, typ.UInt64)
6215 v2 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
6216 v2.AuxInt = int64ToAuxInt(int64(1<<16 + umagic16(c).m))
6217 v3 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
6218 v3.AddArg(x)
6219 v1.AddArg2(v2, v3)
6220 v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
6221 v4.AuxInt = int64ToAuxInt(16 + umagic16(c).s)
6222 v0.AddArg2(v1, v4)
6223 v.AddArg(v0)
6224 return true
6225 }
6226
6227
6228
6229 for {
6230 x := v_0
6231 if v_1.Op != OpConst16 {
6232 break
6233 }
6234 c := auxIntToInt16(v_1.AuxInt)
6235 if !(umagicOK16(c) && config.RegSize == 4 && umagic16(c).m&1 == 0) {
6236 break
6237 }
6238 v.reset(OpTrunc32to16)
6239 v0 := b.NewValue0(v.Pos, OpRsh32Ux64, typ.UInt32)
6240 v1 := b.NewValue0(v.Pos, OpMul32, typ.UInt32)
6241 v2 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
6242 v2.AuxInt = int32ToAuxInt(int32(1<<15 + umagic16(c).m/2))
6243 v3 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
6244 v3.AddArg(x)
6245 v1.AddArg2(v2, v3)
6246 v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
6247 v4.AuxInt = int64ToAuxInt(16 + umagic16(c).s - 1)
6248 v0.AddArg2(v1, v4)
6249 v.AddArg(v0)
6250 return true
6251 }
6252
6253
6254
6255 for {
6256 x := v_0
6257 if v_1.Op != OpConst16 {
6258 break
6259 }
6260 c := auxIntToInt16(v_1.AuxInt)
6261 if !(umagicOK16(c) && config.RegSize == 4 && c&1 == 0) {
6262 break
6263 }
6264 v.reset(OpTrunc32to16)
6265 v0 := b.NewValue0(v.Pos, OpRsh32Ux64, typ.UInt32)
6266 v1 := b.NewValue0(v.Pos, OpMul32, typ.UInt32)
6267 v2 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
6268 v2.AuxInt = int32ToAuxInt(int32(1<<15 + (umagic16(c).m+1)/2))
6269 v3 := b.NewValue0(v.Pos, OpRsh32Ux64, typ.UInt32)
6270 v4 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
6271 v4.AddArg(x)
6272 v5 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
6273 v5.AuxInt = int64ToAuxInt(1)
6274 v3.AddArg2(v4, v5)
6275 v1.AddArg2(v2, v3)
6276 v6 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
6277 v6.AuxInt = int64ToAuxInt(16 + umagic16(c).s - 2)
6278 v0.AddArg2(v1, v6)
6279 v.AddArg(v0)
6280 return true
6281 }
6282
6283
6284
6285 for {
6286 x := v_0
6287 if v_1.Op != OpConst16 {
6288 break
6289 }
6290 c := auxIntToInt16(v_1.AuxInt)
6291 if !(umagicOK16(c) && config.RegSize == 4 && config.useAvg) {
6292 break
6293 }
6294 v.reset(OpTrunc32to16)
6295 v0 := b.NewValue0(v.Pos, OpRsh32Ux64, typ.UInt32)
6296 v1 := b.NewValue0(v.Pos, OpAvg32u, typ.UInt32)
6297 v2 := b.NewValue0(v.Pos, OpLsh32x64, typ.UInt32)
6298 v3 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
6299 v3.AddArg(x)
6300 v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
6301 v4.AuxInt = int64ToAuxInt(16)
6302 v2.AddArg2(v3, v4)
6303 v5 := b.NewValue0(v.Pos, OpMul32, typ.UInt32)
6304 v6 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
6305 v6.AuxInt = int32ToAuxInt(int32(umagic16(c).m))
6306 v5.AddArg2(v6, v3)
6307 v1.AddArg2(v2, v5)
6308 v7 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
6309 v7.AuxInt = int64ToAuxInt(16 + umagic16(c).s - 1)
6310 v0.AddArg2(v1, v7)
6311 v.AddArg(v0)
6312 return true
6313 }
6314 return false
6315 }
6316 func rewriteValuegeneric_OpDiv32(v *Value) bool {
6317 v_1 := v.Args[1]
6318 v_0 := v.Args[0]
6319 b := v.Block
6320 config := b.Func.Config
6321 typ := &b.Func.Config.Types
6322
6323
6324
6325 for {
6326 if v_0.Op != OpConst32 {
6327 break
6328 }
6329 c := auxIntToInt32(v_0.AuxInt)
6330 if v_1.Op != OpConst32 {
6331 break
6332 }
6333 d := auxIntToInt32(v_1.AuxInt)
6334 if !(d != 0) {
6335 break
6336 }
6337 v.reset(OpConst32)
6338 v.AuxInt = int32ToAuxInt(c / d)
6339 return true
6340 }
6341
6342
6343
6344 for {
6345 n := v_0
6346 if v_1.Op != OpConst32 {
6347 break
6348 }
6349 c := auxIntToInt32(v_1.AuxInt)
6350 if !(isNonNegative(n) && isPowerOfTwo32(c)) {
6351 break
6352 }
6353 v.reset(OpRsh32Ux64)
6354 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
6355 v0.AuxInt = int64ToAuxInt(log32(c))
6356 v.AddArg2(n, v0)
6357 return true
6358 }
6359
6360
6361
6362 for {
6363 t := v.Type
6364 n := v_0
6365 if v_1.Op != OpConst32 {
6366 break
6367 }
6368 c := auxIntToInt32(v_1.AuxInt)
6369 if !(c < 0 && c != -1<<31) {
6370 break
6371 }
6372 v.reset(OpNeg32)
6373 v0 := b.NewValue0(v.Pos, OpDiv32, t)
6374 v1 := b.NewValue0(v.Pos, OpConst32, t)
6375 v1.AuxInt = int32ToAuxInt(-c)
6376 v0.AddArg2(n, v1)
6377 v.AddArg(v0)
6378 return true
6379 }
6380
6381
6382 for {
6383 t := v.Type
6384 x := v_0
6385 if v_1.Op != OpConst32 || auxIntToInt32(v_1.AuxInt) != -1<<31 {
6386 break
6387 }
6388 v.reset(OpRsh32Ux64)
6389 v0 := b.NewValue0(v.Pos, OpAnd32, t)
6390 v1 := b.NewValue0(v.Pos, OpNeg32, t)
6391 v1.AddArg(x)
6392 v0.AddArg2(x, v1)
6393 v2 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
6394 v2.AuxInt = int64ToAuxInt(31)
6395 v.AddArg2(v0, v2)
6396 return true
6397 }
6398
6399
6400
6401 for {
6402 t := v.Type
6403 n := v_0
6404 if v_1.Op != OpConst32 {
6405 break
6406 }
6407 c := auxIntToInt32(v_1.AuxInt)
6408 if !(isPowerOfTwo32(c)) {
6409 break
6410 }
6411 v.reset(OpRsh32x64)
6412 v0 := b.NewValue0(v.Pos, OpAdd32, t)
6413 v1 := b.NewValue0(v.Pos, OpRsh32Ux64, t)
6414 v2 := b.NewValue0(v.Pos, OpRsh32x64, t)
6415 v3 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
6416 v3.AuxInt = int64ToAuxInt(31)
6417 v2.AddArg2(n, v3)
6418 v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
6419 v4.AuxInt = int64ToAuxInt(int64(32 - log32(c)))
6420 v1.AddArg2(v2, v4)
6421 v0.AddArg2(n, v1)
6422 v5 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
6423 v5.AuxInt = int64ToAuxInt(int64(log32(c)))
6424 v.AddArg2(v0, v5)
6425 return true
6426 }
6427
6428
6429
6430 for {
6431 t := v.Type
6432 x := v_0
6433 if v_1.Op != OpConst32 {
6434 break
6435 }
6436 c := auxIntToInt32(v_1.AuxInt)
6437 if !(smagicOK32(c) && config.RegSize == 8) {
6438 break
6439 }
6440 v.reset(OpSub32)
6441 v.Type = t
6442 v0 := b.NewValue0(v.Pos, OpRsh64x64, t)
6443 v1 := b.NewValue0(v.Pos, OpMul64, typ.UInt64)
6444 v2 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
6445 v2.AuxInt = int64ToAuxInt(int64(smagic32(c).m))
6446 v3 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
6447 v3.AddArg(x)
6448 v1.AddArg2(v2, v3)
6449 v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
6450 v4.AuxInt = int64ToAuxInt(32 + smagic32(c).s)
6451 v0.AddArg2(v1, v4)
6452 v5 := b.NewValue0(v.Pos, OpRsh64x64, t)
6453 v6 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
6454 v6.AuxInt = int64ToAuxInt(63)
6455 v5.AddArg2(v3, v6)
6456 v.AddArg2(v0, v5)
6457 return true
6458 }
6459
6460
6461
6462 for {
6463 t := v.Type
6464 x := v_0
6465 if v_1.Op != OpConst32 {
6466 break
6467 }
6468 c := auxIntToInt32(v_1.AuxInt)
6469 if !(smagicOK32(c) && config.RegSize == 4 && smagic32(c).m&1 == 0 && config.useHmul) {
6470 break
6471 }
6472 v.reset(OpSub32)
6473 v.Type = t
6474 v0 := b.NewValue0(v.Pos, OpRsh32x64, t)
6475 v1 := b.NewValue0(v.Pos, OpHmul32, t)
6476 v2 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
6477 v2.AuxInt = int32ToAuxInt(int32(smagic32(c).m / 2))
6478 v1.AddArg2(v2, x)
6479 v3 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
6480 v3.AuxInt = int64ToAuxInt(smagic32(c).s - 1)
6481 v0.AddArg2(v1, v3)
6482 v4 := b.NewValue0(v.Pos, OpRsh32x64, t)
6483 v5 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
6484 v5.AuxInt = int64ToAuxInt(31)
6485 v4.AddArg2(x, v5)
6486 v.AddArg2(v0, v4)
6487 return true
6488 }
6489
6490
6491
6492 for {
6493 t := v.Type
6494 x := v_0
6495 if v_1.Op != OpConst32 {
6496 break
6497 }
6498 c := auxIntToInt32(v_1.AuxInt)
6499 if !(smagicOK32(c) && config.RegSize == 4 && smagic32(c).m&1 != 0 && config.useHmul) {
6500 break
6501 }
6502 v.reset(OpSub32)
6503 v.Type = t
6504 v0 := b.NewValue0(v.Pos, OpRsh32x64, t)
6505 v1 := b.NewValue0(v.Pos, OpAdd32, t)
6506 v2 := b.NewValue0(v.Pos, OpHmul32, t)
6507 v3 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
6508 v3.AuxInt = int32ToAuxInt(int32(smagic32(c).m))
6509 v2.AddArg2(v3, x)
6510 v1.AddArg2(v2, x)
6511 v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
6512 v4.AuxInt = int64ToAuxInt(smagic32(c).s)
6513 v0.AddArg2(v1, v4)
6514 v5 := b.NewValue0(v.Pos, OpRsh32x64, t)
6515 v6 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
6516 v6.AuxInt = int64ToAuxInt(31)
6517 v5.AddArg2(x, v6)
6518 v.AddArg2(v0, v5)
6519 return true
6520 }
6521 return false
6522 }
6523 func rewriteValuegeneric_OpDiv32F(v *Value) bool {
6524 v_1 := v.Args[1]
6525 v_0 := v.Args[0]
6526 b := v.Block
6527
6528
6529
6530 for {
6531 if v_0.Op != OpConst32F {
6532 break
6533 }
6534 c := auxIntToFloat32(v_0.AuxInt)
6535 if v_1.Op != OpConst32F {
6536 break
6537 }
6538 d := auxIntToFloat32(v_1.AuxInt)
6539 if !(c/d == c/d) {
6540 break
6541 }
6542 v.reset(OpConst32F)
6543 v.AuxInt = float32ToAuxInt(c / d)
6544 return true
6545 }
6546
6547
6548
6549 for {
6550 x := v_0
6551 if v_1.Op != OpConst32F {
6552 break
6553 }
6554 t := v_1.Type
6555 c := auxIntToFloat32(v_1.AuxInt)
6556 if !(reciprocalExact32(c)) {
6557 break
6558 }
6559 v.reset(OpMul32F)
6560 v0 := b.NewValue0(v.Pos, OpConst32F, t)
6561 v0.AuxInt = float32ToAuxInt(1 / c)
6562 v.AddArg2(x, v0)
6563 return true
6564 }
6565 return false
6566 }
6567 func rewriteValuegeneric_OpDiv32u(v *Value) bool {
6568 v_1 := v.Args[1]
6569 v_0 := v.Args[0]
6570 b := v.Block
6571 config := b.Func.Config
6572 typ := &b.Func.Config.Types
6573
6574
6575
6576 for {
6577 if v_0.Op != OpConst32 {
6578 break
6579 }
6580 c := auxIntToInt32(v_0.AuxInt)
6581 if v_1.Op != OpConst32 {
6582 break
6583 }
6584 d := auxIntToInt32(v_1.AuxInt)
6585 if !(d != 0) {
6586 break
6587 }
6588 v.reset(OpConst32)
6589 v.AuxInt = int32ToAuxInt(int32(uint32(c) / uint32(d)))
6590 return true
6591 }
6592
6593
6594
6595 for {
6596 n := v_0
6597 if v_1.Op != OpConst32 {
6598 break
6599 }
6600 c := auxIntToInt32(v_1.AuxInt)
6601 if !(isPowerOfTwo32(c)) {
6602 break
6603 }
6604 v.reset(OpRsh32Ux64)
6605 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
6606 v0.AuxInt = int64ToAuxInt(log32(c))
6607 v.AddArg2(n, v0)
6608 return true
6609 }
6610
6611
6612
6613 for {
6614 x := v_0
6615 if v_1.Op != OpConst32 {
6616 break
6617 }
6618 c := auxIntToInt32(v_1.AuxInt)
6619 if !(umagicOK32(c) && config.RegSize == 4 && umagic32(c).m&1 == 0 && config.useHmul) {
6620 break
6621 }
6622 v.reset(OpRsh32Ux64)
6623 v.Type = typ.UInt32
6624 v0 := b.NewValue0(v.Pos, OpHmul32u, typ.UInt32)
6625 v1 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
6626 v1.AuxInt = int32ToAuxInt(int32(1<<31 + umagic32(c).m/2))
6627 v0.AddArg2(v1, x)
6628 v2 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
6629 v2.AuxInt = int64ToAuxInt(umagic32(c).s - 1)
6630 v.AddArg2(v0, v2)
6631 return true
6632 }
6633
6634
6635
6636 for {
6637 x := v_0
6638 if v_1.Op != OpConst32 {
6639 break
6640 }
6641 c := auxIntToInt32(v_1.AuxInt)
6642 if !(umagicOK32(c) && config.RegSize == 4 && c&1 == 0 && config.useHmul) {
6643 break
6644 }
6645 v.reset(OpRsh32Ux64)
6646 v.Type = typ.UInt32
6647 v0 := b.NewValue0(v.Pos, OpHmul32u, typ.UInt32)
6648 v1 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
6649 v1.AuxInt = int32ToAuxInt(int32(1<<31 + (umagic32(c).m+1)/2))
6650 v2 := b.NewValue0(v.Pos, OpRsh32Ux64, typ.UInt32)
6651 v3 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
6652 v3.AuxInt = int64ToAuxInt(1)
6653 v2.AddArg2(x, v3)
6654 v0.AddArg2(v1, v2)
6655 v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
6656 v4.AuxInt = int64ToAuxInt(umagic32(c).s - 2)
6657 v.AddArg2(v0, v4)
6658 return true
6659 }
6660
6661
6662
6663 for {
6664 x := v_0
6665 if v_1.Op != OpConst32 {
6666 break
6667 }
6668 c := auxIntToInt32(v_1.AuxInt)
6669 if !(umagicOK32(c) && config.RegSize == 4 && config.useAvg && config.useHmul) {
6670 break
6671 }
6672 v.reset(OpRsh32Ux64)
6673 v.Type = typ.UInt32
6674 v0 := b.NewValue0(v.Pos, OpAvg32u, typ.UInt32)
6675 v1 := b.NewValue0(v.Pos, OpHmul32u, typ.UInt32)
6676 v2 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
6677 v2.AuxInt = int32ToAuxInt(int32(umagic32(c).m))
6678 v1.AddArg2(v2, x)
6679 v0.AddArg2(x, v1)
6680 v3 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
6681 v3.AuxInt = int64ToAuxInt(umagic32(c).s - 1)
6682 v.AddArg2(v0, v3)
6683 return true
6684 }
6685
6686
6687
6688 for {
6689 x := v_0
6690 if v_1.Op != OpConst32 {
6691 break
6692 }
6693 c := auxIntToInt32(v_1.AuxInt)
6694 if !(umagicOK32(c) && config.RegSize == 8 && umagic32(c).m&1 == 0) {
6695 break
6696 }
6697 v.reset(OpTrunc64to32)
6698 v0 := b.NewValue0(v.Pos, OpRsh64Ux64, typ.UInt64)
6699 v1 := b.NewValue0(v.Pos, OpMul64, typ.UInt64)
6700 v2 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
6701 v2.AuxInt = int64ToAuxInt(int64(1<<31 + umagic32(c).m/2))
6702 v3 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
6703 v3.AddArg(x)
6704 v1.AddArg2(v2, v3)
6705 v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
6706 v4.AuxInt = int64ToAuxInt(32 + umagic32(c).s - 1)
6707 v0.AddArg2(v1, v4)
6708 v.AddArg(v0)
6709 return true
6710 }
6711
6712
6713
6714 for {
6715 x := v_0
6716 if v_1.Op != OpConst32 {
6717 break
6718 }
6719 c := auxIntToInt32(v_1.AuxInt)
6720 if !(umagicOK32(c) && config.RegSize == 8 && c&1 == 0) {
6721 break
6722 }
6723 v.reset(OpTrunc64to32)
6724 v0 := b.NewValue0(v.Pos, OpRsh64Ux64, typ.UInt64)
6725 v1 := b.NewValue0(v.Pos, OpMul64, typ.UInt64)
6726 v2 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
6727 v2.AuxInt = int64ToAuxInt(int64(1<<31 + (umagic32(c).m+1)/2))
6728 v3 := b.NewValue0(v.Pos, OpRsh64Ux64, typ.UInt64)
6729 v4 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
6730 v4.AddArg(x)
6731 v5 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
6732 v5.AuxInt = int64ToAuxInt(1)
6733 v3.AddArg2(v4, v5)
6734 v1.AddArg2(v2, v3)
6735 v6 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
6736 v6.AuxInt = int64ToAuxInt(32 + umagic32(c).s - 2)
6737 v0.AddArg2(v1, v6)
6738 v.AddArg(v0)
6739 return true
6740 }
6741
6742
6743
6744 for {
6745 x := v_0
6746 if v_1.Op != OpConst32 {
6747 break
6748 }
6749 c := auxIntToInt32(v_1.AuxInt)
6750 if !(umagicOK32(c) && config.RegSize == 8 && config.useAvg) {
6751 break
6752 }
6753 v.reset(OpTrunc64to32)
6754 v0 := b.NewValue0(v.Pos, OpRsh64Ux64, typ.UInt64)
6755 v1 := b.NewValue0(v.Pos, OpAvg64u, typ.UInt64)
6756 v2 := b.NewValue0(v.Pos, OpLsh64x64, typ.UInt64)
6757 v3 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
6758 v3.AddArg(x)
6759 v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
6760 v4.AuxInt = int64ToAuxInt(32)
6761 v2.AddArg2(v3, v4)
6762 v5 := b.NewValue0(v.Pos, OpMul64, typ.UInt64)
6763 v6 := b.NewValue0(v.Pos, OpConst64, typ.UInt32)
6764 v6.AuxInt = int64ToAuxInt(int64(umagic32(c).m))
6765 v5.AddArg2(v6, v3)
6766 v1.AddArg2(v2, v5)
6767 v7 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
6768 v7.AuxInt = int64ToAuxInt(32 + umagic32(c).s - 1)
6769 v0.AddArg2(v1, v7)
6770 v.AddArg(v0)
6771 return true
6772 }
6773 return false
6774 }
6775 func rewriteValuegeneric_OpDiv64(v *Value) bool {
6776 v_1 := v.Args[1]
6777 v_0 := v.Args[0]
6778 b := v.Block
6779 config := b.Func.Config
6780 typ := &b.Func.Config.Types
6781
6782
6783
6784 for {
6785 if v_0.Op != OpConst64 {
6786 break
6787 }
6788 c := auxIntToInt64(v_0.AuxInt)
6789 if v_1.Op != OpConst64 {
6790 break
6791 }
6792 d := auxIntToInt64(v_1.AuxInt)
6793 if !(d != 0) {
6794 break
6795 }
6796 v.reset(OpConst64)
6797 v.AuxInt = int64ToAuxInt(c / d)
6798 return true
6799 }
6800
6801
6802
6803 for {
6804 n := v_0
6805 if v_1.Op != OpConst64 {
6806 break
6807 }
6808 c := auxIntToInt64(v_1.AuxInt)
6809 if !(isNonNegative(n) && isPowerOfTwo64(c)) {
6810 break
6811 }
6812 v.reset(OpRsh64Ux64)
6813 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
6814 v0.AuxInt = int64ToAuxInt(log64(c))
6815 v.AddArg2(n, v0)
6816 return true
6817 }
6818
6819
6820
6821 for {
6822 n := v_0
6823 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != -1<<63 || !(isNonNegative(n)) {
6824 break
6825 }
6826 v.reset(OpConst64)
6827 v.AuxInt = int64ToAuxInt(0)
6828 return true
6829 }
6830
6831
6832
6833 for {
6834 t := v.Type
6835 n := v_0
6836 if v_1.Op != OpConst64 {
6837 break
6838 }
6839 c := auxIntToInt64(v_1.AuxInt)
6840 if !(c < 0 && c != -1<<63) {
6841 break
6842 }
6843 v.reset(OpNeg64)
6844 v0 := b.NewValue0(v.Pos, OpDiv64, t)
6845 v1 := b.NewValue0(v.Pos, OpConst64, t)
6846 v1.AuxInt = int64ToAuxInt(-c)
6847 v0.AddArg2(n, v1)
6848 v.AddArg(v0)
6849 return true
6850 }
6851
6852
6853 for {
6854 t := v.Type
6855 x := v_0
6856 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != -1<<63 {
6857 break
6858 }
6859 v.reset(OpRsh64Ux64)
6860 v0 := b.NewValue0(v.Pos, OpAnd64, t)
6861 v1 := b.NewValue0(v.Pos, OpNeg64, t)
6862 v1.AddArg(x)
6863 v0.AddArg2(x, v1)
6864 v2 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
6865 v2.AuxInt = int64ToAuxInt(63)
6866 v.AddArg2(v0, v2)
6867 return true
6868 }
6869
6870
6871
6872 for {
6873 t := v.Type
6874 n := v_0
6875 if v_1.Op != OpConst64 {
6876 break
6877 }
6878 c := auxIntToInt64(v_1.AuxInt)
6879 if !(isPowerOfTwo64(c)) {
6880 break
6881 }
6882 v.reset(OpRsh64x64)
6883 v0 := b.NewValue0(v.Pos, OpAdd64, t)
6884 v1 := b.NewValue0(v.Pos, OpRsh64Ux64, t)
6885 v2 := b.NewValue0(v.Pos, OpRsh64x64, t)
6886 v3 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
6887 v3.AuxInt = int64ToAuxInt(63)
6888 v2.AddArg2(n, v3)
6889 v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
6890 v4.AuxInt = int64ToAuxInt(int64(64 - log64(c)))
6891 v1.AddArg2(v2, v4)
6892 v0.AddArg2(n, v1)
6893 v5 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
6894 v5.AuxInt = int64ToAuxInt(int64(log64(c)))
6895 v.AddArg2(v0, v5)
6896 return true
6897 }
6898
6899
6900
6901 for {
6902 t := v.Type
6903 x := v_0
6904 if v_1.Op != OpConst64 {
6905 break
6906 }
6907 c := auxIntToInt64(v_1.AuxInt)
6908 if !(smagicOK64(c) && smagic64(c).m&1 == 0 && config.useHmul) {
6909 break
6910 }
6911 v.reset(OpSub64)
6912 v.Type = t
6913 v0 := b.NewValue0(v.Pos, OpRsh64x64, t)
6914 v1 := b.NewValue0(v.Pos, OpHmul64, t)
6915 v2 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
6916 v2.AuxInt = int64ToAuxInt(int64(smagic64(c).m / 2))
6917 v1.AddArg2(v2, x)
6918 v3 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
6919 v3.AuxInt = int64ToAuxInt(smagic64(c).s - 1)
6920 v0.AddArg2(v1, v3)
6921 v4 := b.NewValue0(v.Pos, OpRsh64x64, t)
6922 v5 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
6923 v5.AuxInt = int64ToAuxInt(63)
6924 v4.AddArg2(x, v5)
6925 v.AddArg2(v0, v4)
6926 return true
6927 }
6928
6929
6930
6931 for {
6932 t := v.Type
6933 x := v_0
6934 if v_1.Op != OpConst64 {
6935 break
6936 }
6937 c := auxIntToInt64(v_1.AuxInt)
6938 if !(smagicOK64(c) && smagic64(c).m&1 != 0 && config.useHmul) {
6939 break
6940 }
6941 v.reset(OpSub64)
6942 v.Type = t
6943 v0 := b.NewValue0(v.Pos, OpRsh64x64, t)
6944 v1 := b.NewValue0(v.Pos, OpAdd64, t)
6945 v2 := b.NewValue0(v.Pos, OpHmul64, t)
6946 v3 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
6947 v3.AuxInt = int64ToAuxInt(int64(smagic64(c).m))
6948 v2.AddArg2(v3, x)
6949 v1.AddArg2(v2, x)
6950 v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
6951 v4.AuxInt = int64ToAuxInt(smagic64(c).s)
6952 v0.AddArg2(v1, v4)
6953 v5 := b.NewValue0(v.Pos, OpRsh64x64, t)
6954 v6 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
6955 v6.AuxInt = int64ToAuxInt(63)
6956 v5.AddArg2(x, v6)
6957 v.AddArg2(v0, v5)
6958 return true
6959 }
6960 return false
6961 }
6962 func rewriteValuegeneric_OpDiv64F(v *Value) bool {
6963 v_1 := v.Args[1]
6964 v_0 := v.Args[0]
6965 b := v.Block
6966
6967
6968
6969 for {
6970 if v_0.Op != OpConst64F {
6971 break
6972 }
6973 c := auxIntToFloat64(v_0.AuxInt)
6974 if v_1.Op != OpConst64F {
6975 break
6976 }
6977 d := auxIntToFloat64(v_1.AuxInt)
6978 if !(c/d == c/d) {
6979 break
6980 }
6981 v.reset(OpConst64F)
6982 v.AuxInt = float64ToAuxInt(c / d)
6983 return true
6984 }
6985
6986
6987
6988 for {
6989 x := v_0
6990 if v_1.Op != OpConst64F {
6991 break
6992 }
6993 t := v_1.Type
6994 c := auxIntToFloat64(v_1.AuxInt)
6995 if !(reciprocalExact64(c)) {
6996 break
6997 }
6998 v.reset(OpMul64F)
6999 v0 := b.NewValue0(v.Pos, OpConst64F, t)
7000 v0.AuxInt = float64ToAuxInt(1 / c)
7001 v.AddArg2(x, v0)
7002 return true
7003 }
7004 return false
7005 }
7006 func rewriteValuegeneric_OpDiv64u(v *Value) bool {
7007 v_1 := v.Args[1]
7008 v_0 := v.Args[0]
7009 b := v.Block
7010 config := b.Func.Config
7011 typ := &b.Func.Config.Types
7012
7013
7014
7015 for {
7016 if v_0.Op != OpConst64 {
7017 break
7018 }
7019 c := auxIntToInt64(v_0.AuxInt)
7020 if v_1.Op != OpConst64 {
7021 break
7022 }
7023 d := auxIntToInt64(v_1.AuxInt)
7024 if !(d != 0) {
7025 break
7026 }
7027 v.reset(OpConst64)
7028 v.AuxInt = int64ToAuxInt(int64(uint64(c) / uint64(d)))
7029 return true
7030 }
7031
7032
7033
7034 for {
7035 n := v_0
7036 if v_1.Op != OpConst64 {
7037 break
7038 }
7039 c := auxIntToInt64(v_1.AuxInt)
7040 if !(isPowerOfTwo64(c)) {
7041 break
7042 }
7043 v.reset(OpRsh64Ux64)
7044 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7045 v0.AuxInt = int64ToAuxInt(log64(c))
7046 v.AddArg2(n, v0)
7047 return true
7048 }
7049
7050
7051 for {
7052 n := v_0
7053 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != -1<<63 {
7054 break
7055 }
7056 v.reset(OpRsh64Ux64)
7057 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7058 v0.AuxInt = int64ToAuxInt(63)
7059 v.AddArg2(n, v0)
7060 return true
7061 }
7062
7063
7064
7065 for {
7066 x := v_0
7067 if v_1.Op != OpConst64 {
7068 break
7069 }
7070 c := auxIntToInt64(v_1.AuxInt)
7071 if !(c > 0 && c <= 0xFFFF && umagicOK32(int32(c)) && config.RegSize == 4 && config.useHmul) {
7072 break
7073 }
7074 v.reset(OpAdd64)
7075 v0 := b.NewValue0(v.Pos, OpAdd64, typ.UInt64)
7076 v1 := b.NewValue0(v.Pos, OpAdd64, typ.UInt64)
7077 v2 := b.NewValue0(v.Pos, OpLsh64x64, typ.UInt64)
7078 v3 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
7079 v4 := b.NewValue0(v.Pos, OpDiv32u, typ.UInt32)
7080 v5 := b.NewValue0(v.Pos, OpTrunc64to32, typ.UInt32)
7081 v6 := b.NewValue0(v.Pos, OpRsh64Ux64, typ.UInt64)
7082 v7 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7083 v7.AuxInt = int64ToAuxInt(32)
7084 v6.AddArg2(x, v7)
7085 v5.AddArg(v6)
7086 v8 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
7087 v8.AuxInt = int32ToAuxInt(int32(c))
7088 v4.AddArg2(v5, v8)
7089 v3.AddArg(v4)
7090 v2.AddArg2(v3, v7)
7091 v9 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
7092 v10 := b.NewValue0(v.Pos, OpDiv32u, typ.UInt32)
7093 v11 := b.NewValue0(v.Pos, OpTrunc64to32, typ.UInt32)
7094 v11.AddArg(x)
7095 v10.AddArg2(v11, v8)
7096 v9.AddArg(v10)
7097 v1.AddArg2(v2, v9)
7098 v12 := b.NewValue0(v.Pos, OpMul64, typ.UInt64)
7099 v13 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
7100 v14 := b.NewValue0(v.Pos, OpMod32u, typ.UInt32)
7101 v14.AddArg2(v5, v8)
7102 v13.AddArg(v14)
7103 v15 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7104 v15.AuxInt = int64ToAuxInt(int64((1 << 32) / c))
7105 v12.AddArg2(v13, v15)
7106 v0.AddArg2(v1, v12)
7107 v16 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
7108 v17 := b.NewValue0(v.Pos, OpDiv32u, typ.UInt32)
7109 v18 := b.NewValue0(v.Pos, OpAdd32, typ.UInt32)
7110 v19 := b.NewValue0(v.Pos, OpMod32u, typ.UInt32)
7111 v19.AddArg2(v11, v8)
7112 v20 := b.NewValue0(v.Pos, OpMul32, typ.UInt32)
7113 v21 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
7114 v21.AuxInt = int32ToAuxInt(int32((1 << 32) % c))
7115 v20.AddArg2(v14, v21)
7116 v18.AddArg2(v19, v20)
7117 v17.AddArg2(v18, v8)
7118 v16.AddArg(v17)
7119 v.AddArg2(v0, v16)
7120 return true
7121 }
7122
7123
7124
7125 for {
7126 x := v_0
7127 if v_1.Op != OpConst64 {
7128 break
7129 }
7130 c := auxIntToInt64(v_1.AuxInt)
7131 if !(umagicOK64(c) && config.RegSize == 8 && umagic64(c).m&1 == 0 && config.useHmul) {
7132 break
7133 }
7134 v.reset(OpRsh64Ux64)
7135 v.Type = typ.UInt64
7136 v0 := b.NewValue0(v.Pos, OpHmul64u, typ.UInt64)
7137 v1 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7138 v1.AuxInt = int64ToAuxInt(int64(1<<63 + umagic64(c).m/2))
7139 v0.AddArg2(v1, x)
7140 v2 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7141 v2.AuxInt = int64ToAuxInt(umagic64(c).s - 1)
7142 v.AddArg2(v0, v2)
7143 return true
7144 }
7145
7146
7147
7148 for {
7149 x := v_0
7150 if v_1.Op != OpConst64 {
7151 break
7152 }
7153 c := auxIntToInt64(v_1.AuxInt)
7154 if !(umagicOK64(c) && config.RegSize == 8 && c&1 == 0 && config.useHmul) {
7155 break
7156 }
7157 v.reset(OpRsh64Ux64)
7158 v.Type = typ.UInt64
7159 v0 := b.NewValue0(v.Pos, OpHmul64u, typ.UInt64)
7160 v1 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7161 v1.AuxInt = int64ToAuxInt(int64(1<<63 + (umagic64(c).m+1)/2))
7162 v2 := b.NewValue0(v.Pos, OpRsh64Ux64, typ.UInt64)
7163 v3 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7164 v3.AuxInt = int64ToAuxInt(1)
7165 v2.AddArg2(x, v3)
7166 v0.AddArg2(v1, v2)
7167 v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7168 v4.AuxInt = int64ToAuxInt(umagic64(c).s - 2)
7169 v.AddArg2(v0, v4)
7170 return true
7171 }
7172
7173
7174
7175 for {
7176 x := v_0
7177 if v_1.Op != OpConst64 {
7178 break
7179 }
7180 c := auxIntToInt64(v_1.AuxInt)
7181 if !(umagicOK64(c) && config.RegSize == 8 && config.useAvg && config.useHmul) {
7182 break
7183 }
7184 v.reset(OpRsh64Ux64)
7185 v.Type = typ.UInt64
7186 v0 := b.NewValue0(v.Pos, OpAvg64u, typ.UInt64)
7187 v1 := b.NewValue0(v.Pos, OpHmul64u, typ.UInt64)
7188 v2 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7189 v2.AuxInt = int64ToAuxInt(int64(umagic64(c).m))
7190 v1.AddArg2(v2, x)
7191 v0.AddArg2(x, v1)
7192 v3 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7193 v3.AuxInt = int64ToAuxInt(umagic64(c).s - 1)
7194 v.AddArg2(v0, v3)
7195 return true
7196 }
7197 return false
7198 }
7199 func rewriteValuegeneric_OpDiv8(v *Value) bool {
7200 v_1 := v.Args[1]
7201 v_0 := v.Args[0]
7202 b := v.Block
7203 typ := &b.Func.Config.Types
7204
7205
7206
7207 for {
7208 if v_0.Op != OpConst8 {
7209 break
7210 }
7211 c := auxIntToInt8(v_0.AuxInt)
7212 if v_1.Op != OpConst8 {
7213 break
7214 }
7215 d := auxIntToInt8(v_1.AuxInt)
7216 if !(d != 0) {
7217 break
7218 }
7219 v.reset(OpConst8)
7220 v.AuxInt = int8ToAuxInt(c / d)
7221 return true
7222 }
7223
7224
7225
7226 for {
7227 n := v_0
7228 if v_1.Op != OpConst8 {
7229 break
7230 }
7231 c := auxIntToInt8(v_1.AuxInt)
7232 if !(isNonNegative(n) && isPowerOfTwo8(c)) {
7233 break
7234 }
7235 v.reset(OpRsh8Ux64)
7236 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7237 v0.AuxInt = int64ToAuxInt(log8(c))
7238 v.AddArg2(n, v0)
7239 return true
7240 }
7241
7242
7243
7244 for {
7245 t := v.Type
7246 n := v_0
7247 if v_1.Op != OpConst8 {
7248 break
7249 }
7250 c := auxIntToInt8(v_1.AuxInt)
7251 if !(c < 0 && c != -1<<7) {
7252 break
7253 }
7254 v.reset(OpNeg8)
7255 v0 := b.NewValue0(v.Pos, OpDiv8, t)
7256 v1 := b.NewValue0(v.Pos, OpConst8, t)
7257 v1.AuxInt = int8ToAuxInt(-c)
7258 v0.AddArg2(n, v1)
7259 v.AddArg(v0)
7260 return true
7261 }
7262
7263
7264 for {
7265 t := v.Type
7266 x := v_0
7267 if v_1.Op != OpConst8 || auxIntToInt8(v_1.AuxInt) != -1<<7 {
7268 break
7269 }
7270 v.reset(OpRsh8Ux64)
7271 v0 := b.NewValue0(v.Pos, OpAnd8, t)
7272 v1 := b.NewValue0(v.Pos, OpNeg8, t)
7273 v1.AddArg(x)
7274 v0.AddArg2(x, v1)
7275 v2 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7276 v2.AuxInt = int64ToAuxInt(7)
7277 v.AddArg2(v0, v2)
7278 return true
7279 }
7280
7281
7282
7283 for {
7284 t := v.Type
7285 n := v_0
7286 if v_1.Op != OpConst8 {
7287 break
7288 }
7289 c := auxIntToInt8(v_1.AuxInt)
7290 if !(isPowerOfTwo8(c)) {
7291 break
7292 }
7293 v.reset(OpRsh8x64)
7294 v0 := b.NewValue0(v.Pos, OpAdd8, t)
7295 v1 := b.NewValue0(v.Pos, OpRsh8Ux64, t)
7296 v2 := b.NewValue0(v.Pos, OpRsh8x64, t)
7297 v3 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7298 v3.AuxInt = int64ToAuxInt(7)
7299 v2.AddArg2(n, v3)
7300 v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7301 v4.AuxInt = int64ToAuxInt(int64(8 - log8(c)))
7302 v1.AddArg2(v2, v4)
7303 v0.AddArg2(n, v1)
7304 v5 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7305 v5.AuxInt = int64ToAuxInt(int64(log8(c)))
7306 v.AddArg2(v0, v5)
7307 return true
7308 }
7309
7310
7311
7312 for {
7313 t := v.Type
7314 x := v_0
7315 if v_1.Op != OpConst8 {
7316 break
7317 }
7318 c := auxIntToInt8(v_1.AuxInt)
7319 if !(smagicOK8(c)) {
7320 break
7321 }
7322 v.reset(OpSub8)
7323 v.Type = t
7324 v0 := b.NewValue0(v.Pos, OpRsh32x64, t)
7325 v1 := b.NewValue0(v.Pos, OpMul32, typ.UInt32)
7326 v2 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
7327 v2.AuxInt = int32ToAuxInt(int32(smagic8(c).m))
7328 v3 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
7329 v3.AddArg(x)
7330 v1.AddArg2(v2, v3)
7331 v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7332 v4.AuxInt = int64ToAuxInt(8 + smagic8(c).s)
7333 v0.AddArg2(v1, v4)
7334 v5 := b.NewValue0(v.Pos, OpRsh32x64, t)
7335 v6 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7336 v6.AuxInt = int64ToAuxInt(31)
7337 v5.AddArg2(v3, v6)
7338 v.AddArg2(v0, v5)
7339 return true
7340 }
7341 return false
7342 }
7343 func rewriteValuegeneric_OpDiv8u(v *Value) bool {
7344 v_1 := v.Args[1]
7345 v_0 := v.Args[0]
7346 b := v.Block
7347 typ := &b.Func.Config.Types
7348
7349
7350
7351 for {
7352 if v_0.Op != OpConst8 {
7353 break
7354 }
7355 c := auxIntToInt8(v_0.AuxInt)
7356 if v_1.Op != OpConst8 {
7357 break
7358 }
7359 d := auxIntToInt8(v_1.AuxInt)
7360 if !(d != 0) {
7361 break
7362 }
7363 v.reset(OpConst8)
7364 v.AuxInt = int8ToAuxInt(int8(uint8(c) / uint8(d)))
7365 return true
7366 }
7367
7368
7369
7370 for {
7371 n := v_0
7372 if v_1.Op != OpConst8 {
7373 break
7374 }
7375 c := auxIntToInt8(v_1.AuxInt)
7376 if !(isPowerOfTwo8(c)) {
7377 break
7378 }
7379 v.reset(OpRsh8Ux64)
7380 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7381 v0.AuxInt = int64ToAuxInt(log8(c))
7382 v.AddArg2(n, v0)
7383 return true
7384 }
7385
7386
7387
7388 for {
7389 x := v_0
7390 if v_1.Op != OpConst8 {
7391 break
7392 }
7393 c := auxIntToInt8(v_1.AuxInt)
7394 if !(umagicOK8(c)) {
7395 break
7396 }
7397 v.reset(OpTrunc32to8)
7398 v0 := b.NewValue0(v.Pos, OpRsh32Ux64, typ.UInt32)
7399 v1 := b.NewValue0(v.Pos, OpMul32, typ.UInt32)
7400 v2 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
7401 v2.AuxInt = int32ToAuxInt(int32(1<<8 + umagic8(c).m))
7402 v3 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
7403 v3.AddArg(x)
7404 v1.AddArg2(v2, v3)
7405 v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7406 v4.AuxInt = int64ToAuxInt(8 + umagic8(c).s)
7407 v0.AddArg2(v1, v4)
7408 v.AddArg(v0)
7409 return true
7410 }
7411 return false
7412 }
7413 func rewriteValuegeneric_OpEq16(v *Value) bool {
7414 v_1 := v.Args[1]
7415 v_0 := v.Args[0]
7416 b := v.Block
7417 config := b.Func.Config
7418 typ := &b.Func.Config.Types
7419
7420
7421 for {
7422 x := v_0
7423 if x != v_1 {
7424 break
7425 }
7426 v.reset(OpConstBool)
7427 v.AuxInt = boolToAuxInt(true)
7428 return true
7429 }
7430
7431
7432 for {
7433 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
7434 if v_0.Op != OpConst16 {
7435 continue
7436 }
7437 t := v_0.Type
7438 c := auxIntToInt16(v_0.AuxInt)
7439 if v_1.Op != OpAdd16 {
7440 continue
7441 }
7442 _ = v_1.Args[1]
7443 v_1_0 := v_1.Args[0]
7444 v_1_1 := v_1.Args[1]
7445 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
7446 if v_1_0.Op != OpConst16 || v_1_0.Type != t {
7447 continue
7448 }
7449 d := auxIntToInt16(v_1_0.AuxInt)
7450 x := v_1_1
7451 v.reset(OpEq16)
7452 v0 := b.NewValue0(v.Pos, OpConst16, t)
7453 v0.AuxInt = int16ToAuxInt(c - d)
7454 v.AddArg2(v0, x)
7455 return true
7456 }
7457 }
7458 break
7459 }
7460
7461
7462 for {
7463 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
7464 if v_0.Op != OpConst16 {
7465 continue
7466 }
7467 c := auxIntToInt16(v_0.AuxInt)
7468 if v_1.Op != OpConst16 {
7469 continue
7470 }
7471 d := auxIntToInt16(v_1.AuxInt)
7472 v.reset(OpConstBool)
7473 v.AuxInt = boolToAuxInt(c == d)
7474 return true
7475 }
7476 break
7477 }
7478
7479
7480
7481 for {
7482 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
7483 if v_0.Op != OpMod16u {
7484 continue
7485 }
7486 _ = v_0.Args[1]
7487 x := v_0.Args[0]
7488 v_0_1 := v_0.Args[1]
7489 if v_0_1.Op != OpConst16 {
7490 continue
7491 }
7492 c := auxIntToInt16(v_0_1.AuxInt)
7493 if v_1.Op != OpConst16 || auxIntToInt16(v_1.AuxInt) != 0 || !(x.Op != OpConst16 && udivisibleOK16(c) && !hasSmallRotate(config)) {
7494 continue
7495 }
7496 v.reset(OpEq32)
7497 v0 := b.NewValue0(v.Pos, OpMod32u, typ.UInt32)
7498 v1 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
7499 v1.AddArg(x)
7500 v2 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
7501 v2.AuxInt = int32ToAuxInt(int32(uint16(c)))
7502 v0.AddArg2(v1, v2)
7503 v3 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
7504 v3.AuxInt = int32ToAuxInt(0)
7505 v.AddArg2(v0, v3)
7506 return true
7507 }
7508 break
7509 }
7510
7511
7512
7513 for {
7514 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
7515 if v_0.Op != OpMod16 {
7516 continue
7517 }
7518 _ = v_0.Args[1]
7519 x := v_0.Args[0]
7520 v_0_1 := v_0.Args[1]
7521 if v_0_1.Op != OpConst16 {
7522 continue
7523 }
7524 c := auxIntToInt16(v_0_1.AuxInt)
7525 if v_1.Op != OpConst16 || auxIntToInt16(v_1.AuxInt) != 0 || !(x.Op != OpConst16 && sdivisibleOK16(c) && !hasSmallRotate(config)) {
7526 continue
7527 }
7528 v.reset(OpEq32)
7529 v0 := b.NewValue0(v.Pos, OpMod32, typ.Int32)
7530 v1 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
7531 v1.AddArg(x)
7532 v2 := b.NewValue0(v.Pos, OpConst32, typ.Int32)
7533 v2.AuxInt = int32ToAuxInt(int32(c))
7534 v0.AddArg2(v1, v2)
7535 v3 := b.NewValue0(v.Pos, OpConst32, typ.Int32)
7536 v3.AuxInt = int32ToAuxInt(0)
7537 v.AddArg2(v0, v3)
7538 return true
7539 }
7540 break
7541 }
7542
7543
7544
7545 for {
7546 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
7547 x := v_0
7548 if v_1.Op != OpMul16 {
7549 continue
7550 }
7551 _ = v_1.Args[1]
7552 v_1_0 := v_1.Args[0]
7553 v_1_1 := v_1.Args[1]
7554 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
7555 if v_1_0.Op != OpConst16 {
7556 continue
7557 }
7558 c := auxIntToInt16(v_1_0.AuxInt)
7559 if v_1_1.Op != OpTrunc64to16 {
7560 continue
7561 }
7562 v_1_1_0 := v_1_1.Args[0]
7563 if v_1_1_0.Op != OpRsh64Ux64 {
7564 continue
7565 }
7566 _ = v_1_1_0.Args[1]
7567 mul := v_1_1_0.Args[0]
7568 if mul.Op != OpMul64 {
7569 continue
7570 }
7571 _ = mul.Args[1]
7572 mul_0 := mul.Args[0]
7573 mul_1 := mul.Args[1]
7574 for _i2 := 0; _i2 <= 1; _i2, mul_0, mul_1 = _i2+1, mul_1, mul_0 {
7575 if mul_0.Op != OpConst64 {
7576 continue
7577 }
7578 m := auxIntToInt64(mul_0.AuxInt)
7579 if mul_1.Op != OpZeroExt16to64 || x != mul_1.Args[0] {
7580 continue
7581 }
7582 v_1_1_0_1 := v_1_1_0.Args[1]
7583 if v_1_1_0_1.Op != OpConst64 {
7584 continue
7585 }
7586 s := auxIntToInt64(v_1_1_0_1.AuxInt)
7587 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)) {
7588 continue
7589 }
7590 v.reset(OpLeq16U)
7591 v0 := b.NewValue0(v.Pos, OpRotateLeft16, typ.UInt16)
7592 v1 := b.NewValue0(v.Pos, OpMul16, typ.UInt16)
7593 v2 := b.NewValue0(v.Pos, OpConst16, typ.UInt16)
7594 v2.AuxInt = int16ToAuxInt(int16(udivisible16(c).m))
7595 v1.AddArg2(v2, x)
7596 v3 := b.NewValue0(v.Pos, OpConst16, typ.UInt16)
7597 v3.AuxInt = int16ToAuxInt(int16(16 - udivisible16(c).k))
7598 v0.AddArg2(v1, v3)
7599 v4 := b.NewValue0(v.Pos, OpConst16, typ.UInt16)
7600 v4.AuxInt = int16ToAuxInt(int16(udivisible16(c).max))
7601 v.AddArg2(v0, v4)
7602 return true
7603 }
7604 }
7605 }
7606 break
7607 }
7608
7609
7610
7611 for {
7612 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
7613 x := v_0
7614 if v_1.Op != OpMul16 {
7615 continue
7616 }
7617 _ = v_1.Args[1]
7618 v_1_0 := v_1.Args[0]
7619 v_1_1 := v_1.Args[1]
7620 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
7621 if v_1_0.Op != OpConst16 {
7622 continue
7623 }
7624 c := auxIntToInt16(v_1_0.AuxInt)
7625 if v_1_1.Op != OpTrunc32to16 {
7626 continue
7627 }
7628 v_1_1_0 := v_1_1.Args[0]
7629 if v_1_1_0.Op != OpRsh32Ux64 {
7630 continue
7631 }
7632 _ = v_1_1_0.Args[1]
7633 mul := v_1_1_0.Args[0]
7634 if mul.Op != OpMul32 {
7635 continue
7636 }
7637 _ = mul.Args[1]
7638 mul_0 := mul.Args[0]
7639 mul_1 := mul.Args[1]
7640 for _i2 := 0; _i2 <= 1; _i2, mul_0, mul_1 = _i2+1, mul_1, mul_0 {
7641 if mul_0.Op != OpConst32 {
7642 continue
7643 }
7644 m := auxIntToInt32(mul_0.AuxInt)
7645 if mul_1.Op != OpZeroExt16to32 || x != mul_1.Args[0] {
7646 continue
7647 }
7648 v_1_1_0_1 := v_1_1_0.Args[1]
7649 if v_1_1_0_1.Op != OpConst64 {
7650 continue
7651 }
7652 s := auxIntToInt64(v_1_1_0_1.AuxInt)
7653 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)) {
7654 continue
7655 }
7656 v.reset(OpLeq16U)
7657 v0 := b.NewValue0(v.Pos, OpRotateLeft16, typ.UInt16)
7658 v1 := b.NewValue0(v.Pos, OpMul16, typ.UInt16)
7659 v2 := b.NewValue0(v.Pos, OpConst16, typ.UInt16)
7660 v2.AuxInt = int16ToAuxInt(int16(udivisible16(c).m))
7661 v1.AddArg2(v2, x)
7662 v3 := b.NewValue0(v.Pos, OpConst16, typ.UInt16)
7663 v3.AuxInt = int16ToAuxInt(int16(16 - udivisible16(c).k))
7664 v0.AddArg2(v1, v3)
7665 v4 := b.NewValue0(v.Pos, OpConst16, typ.UInt16)
7666 v4.AuxInt = int16ToAuxInt(int16(udivisible16(c).max))
7667 v.AddArg2(v0, v4)
7668 return true
7669 }
7670 }
7671 }
7672 break
7673 }
7674
7675
7676
7677 for {
7678 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
7679 x := v_0
7680 if v_1.Op != OpMul16 {
7681 continue
7682 }
7683 _ = v_1.Args[1]
7684 v_1_0 := v_1.Args[0]
7685 v_1_1 := v_1.Args[1]
7686 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
7687 if v_1_0.Op != OpConst16 {
7688 continue
7689 }
7690 c := auxIntToInt16(v_1_0.AuxInt)
7691 if v_1_1.Op != OpTrunc32to16 {
7692 continue
7693 }
7694 v_1_1_0 := v_1_1.Args[0]
7695 if v_1_1_0.Op != OpRsh32Ux64 {
7696 continue
7697 }
7698 _ = v_1_1_0.Args[1]
7699 mul := v_1_1_0.Args[0]
7700 if mul.Op != OpMul32 {
7701 continue
7702 }
7703 _ = mul.Args[1]
7704 mul_0 := mul.Args[0]
7705 mul_1 := mul.Args[1]
7706 for _i2 := 0; _i2 <= 1; _i2, mul_0, mul_1 = _i2+1, mul_1, mul_0 {
7707 if mul_0.Op != OpConst32 {
7708 continue
7709 }
7710 m := auxIntToInt32(mul_0.AuxInt)
7711 if mul_1.Op != OpRsh32Ux64 {
7712 continue
7713 }
7714 _ = mul_1.Args[1]
7715 mul_1_0 := mul_1.Args[0]
7716 if mul_1_0.Op != OpZeroExt16to32 || x != mul_1_0.Args[0] {
7717 continue
7718 }
7719 mul_1_1 := mul_1.Args[1]
7720 if mul_1_1.Op != OpConst64 || auxIntToInt64(mul_1_1.AuxInt) != 1 {
7721 continue
7722 }
7723 v_1_1_0_1 := v_1_1_0.Args[1]
7724 if v_1_1_0_1.Op != OpConst64 {
7725 continue
7726 }
7727 s := auxIntToInt64(v_1_1_0_1.AuxInt)
7728 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)) {
7729 continue
7730 }
7731 v.reset(OpLeq16U)
7732 v0 := b.NewValue0(v.Pos, OpRotateLeft16, typ.UInt16)
7733 v1 := b.NewValue0(v.Pos, OpMul16, typ.UInt16)
7734 v2 := b.NewValue0(v.Pos, OpConst16, typ.UInt16)
7735 v2.AuxInt = int16ToAuxInt(int16(udivisible16(c).m))
7736 v1.AddArg2(v2, x)
7737 v3 := b.NewValue0(v.Pos, OpConst16, typ.UInt16)
7738 v3.AuxInt = int16ToAuxInt(int16(16 - udivisible16(c).k))
7739 v0.AddArg2(v1, v3)
7740 v4 := b.NewValue0(v.Pos, OpConst16, typ.UInt16)
7741 v4.AuxInt = int16ToAuxInt(int16(udivisible16(c).max))
7742 v.AddArg2(v0, v4)
7743 return true
7744 }
7745 }
7746 }
7747 break
7748 }
7749
7750
7751
7752 for {
7753 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
7754 x := v_0
7755 if v_1.Op != OpMul16 {
7756 continue
7757 }
7758 _ = v_1.Args[1]
7759 v_1_0 := v_1.Args[0]
7760 v_1_1 := v_1.Args[1]
7761 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
7762 if v_1_0.Op != OpConst16 {
7763 continue
7764 }
7765 c := auxIntToInt16(v_1_0.AuxInt)
7766 if v_1_1.Op != OpTrunc32to16 {
7767 continue
7768 }
7769 v_1_1_0 := v_1_1.Args[0]
7770 if v_1_1_0.Op != OpRsh32Ux64 {
7771 continue
7772 }
7773 _ = v_1_1_0.Args[1]
7774 v_1_1_0_0 := v_1_1_0.Args[0]
7775 if v_1_1_0_0.Op != OpAvg32u {
7776 continue
7777 }
7778 _ = v_1_1_0_0.Args[1]
7779 v_1_1_0_0_0 := v_1_1_0_0.Args[0]
7780 if v_1_1_0_0_0.Op != OpLsh32x64 {
7781 continue
7782 }
7783 _ = v_1_1_0_0_0.Args[1]
7784 v_1_1_0_0_0_0 := v_1_1_0_0_0.Args[0]
7785 if v_1_1_0_0_0_0.Op != OpZeroExt16to32 || x != v_1_1_0_0_0_0.Args[0] {
7786 continue
7787 }
7788 v_1_1_0_0_0_1 := v_1_1_0_0_0.Args[1]
7789 if v_1_1_0_0_0_1.Op != OpConst64 || auxIntToInt64(v_1_1_0_0_0_1.AuxInt) != 16 {
7790 continue
7791 }
7792 mul := v_1_1_0_0.Args[1]
7793 if mul.Op != OpMul32 {
7794 continue
7795 }
7796 _ = mul.Args[1]
7797 mul_0 := mul.Args[0]
7798 mul_1 := mul.Args[1]
7799 for _i2 := 0; _i2 <= 1; _i2, mul_0, mul_1 = _i2+1, mul_1, mul_0 {
7800 if mul_0.Op != OpConst32 {
7801 continue
7802 }
7803 m := auxIntToInt32(mul_0.AuxInt)
7804 if mul_1.Op != OpZeroExt16to32 || x != mul_1.Args[0] {
7805 continue
7806 }
7807 v_1_1_0_1 := v_1_1_0.Args[1]
7808 if v_1_1_0_1.Op != OpConst64 {
7809 continue
7810 }
7811 s := auxIntToInt64(v_1_1_0_1.AuxInt)
7812 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)) {
7813 continue
7814 }
7815 v.reset(OpLeq16U)
7816 v0 := b.NewValue0(v.Pos, OpRotateLeft16, typ.UInt16)
7817 v1 := b.NewValue0(v.Pos, OpMul16, typ.UInt16)
7818 v2 := b.NewValue0(v.Pos, OpConst16, typ.UInt16)
7819 v2.AuxInt = int16ToAuxInt(int16(udivisible16(c).m))
7820 v1.AddArg2(v2, x)
7821 v3 := b.NewValue0(v.Pos, OpConst16, typ.UInt16)
7822 v3.AuxInt = int16ToAuxInt(int16(16 - udivisible16(c).k))
7823 v0.AddArg2(v1, v3)
7824 v4 := b.NewValue0(v.Pos, OpConst16, typ.UInt16)
7825 v4.AuxInt = int16ToAuxInt(int16(udivisible16(c).max))
7826 v.AddArg2(v0, v4)
7827 return true
7828 }
7829 }
7830 }
7831 break
7832 }
7833
7834
7835
7836 for {
7837 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
7838 x := v_0
7839 if v_1.Op != OpMul16 {
7840 continue
7841 }
7842 _ = v_1.Args[1]
7843 v_1_0 := v_1.Args[0]
7844 v_1_1 := v_1.Args[1]
7845 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
7846 if v_1_0.Op != OpConst16 {
7847 continue
7848 }
7849 c := auxIntToInt16(v_1_0.AuxInt)
7850 if v_1_1.Op != OpSub16 {
7851 continue
7852 }
7853 _ = v_1_1.Args[1]
7854 v_1_1_0 := v_1_1.Args[0]
7855 if v_1_1_0.Op != OpRsh32x64 {
7856 continue
7857 }
7858 _ = v_1_1_0.Args[1]
7859 mul := v_1_1_0.Args[0]
7860 if mul.Op != OpMul32 {
7861 continue
7862 }
7863 _ = mul.Args[1]
7864 mul_0 := mul.Args[0]
7865 mul_1 := mul.Args[1]
7866 for _i2 := 0; _i2 <= 1; _i2, mul_0, mul_1 = _i2+1, mul_1, mul_0 {
7867 if mul_0.Op != OpConst32 {
7868 continue
7869 }
7870 m := auxIntToInt32(mul_0.AuxInt)
7871 if mul_1.Op != OpSignExt16to32 || x != mul_1.Args[0] {
7872 continue
7873 }
7874 v_1_1_0_1 := v_1_1_0.Args[1]
7875 if v_1_1_0_1.Op != OpConst64 {
7876 continue
7877 }
7878 s := auxIntToInt64(v_1_1_0_1.AuxInt)
7879 v_1_1_1 := v_1_1.Args[1]
7880 if v_1_1_1.Op != OpRsh32x64 {
7881 continue
7882 }
7883 _ = v_1_1_1.Args[1]
7884 v_1_1_1_0 := v_1_1_1.Args[0]
7885 if v_1_1_1_0.Op != OpSignExt16to32 || x != v_1_1_1_0.Args[0] {
7886 continue
7887 }
7888 v_1_1_1_1 := v_1_1_1.Args[1]
7889 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)) {
7890 continue
7891 }
7892 v.reset(OpLeq16U)
7893 v0 := b.NewValue0(v.Pos, OpRotateLeft16, typ.UInt16)
7894 v1 := b.NewValue0(v.Pos, OpAdd16, typ.UInt16)
7895 v2 := b.NewValue0(v.Pos, OpMul16, typ.UInt16)
7896 v3 := b.NewValue0(v.Pos, OpConst16, typ.UInt16)
7897 v3.AuxInt = int16ToAuxInt(int16(sdivisible16(c).m))
7898 v2.AddArg2(v3, x)
7899 v4 := b.NewValue0(v.Pos, OpConst16, typ.UInt16)
7900 v4.AuxInt = int16ToAuxInt(int16(sdivisible16(c).a))
7901 v1.AddArg2(v2, v4)
7902 v5 := b.NewValue0(v.Pos, OpConst16, typ.UInt16)
7903 v5.AuxInt = int16ToAuxInt(int16(16 - sdivisible16(c).k))
7904 v0.AddArg2(v1, v5)
7905 v6 := b.NewValue0(v.Pos, OpConst16, typ.UInt16)
7906 v6.AuxInt = int16ToAuxInt(int16(sdivisible16(c).max))
7907 v.AddArg2(v0, v6)
7908 return true
7909 }
7910 }
7911 }
7912 break
7913 }
7914
7915
7916
7917 for {
7918 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
7919 n := v_0
7920 if v_1.Op != OpLsh16x64 {
7921 continue
7922 }
7923 _ = v_1.Args[1]
7924 v_1_0 := v_1.Args[0]
7925 if v_1_0.Op != OpRsh16x64 {
7926 continue
7927 }
7928 _ = v_1_0.Args[1]
7929 v_1_0_0 := v_1_0.Args[0]
7930 if v_1_0_0.Op != OpAdd16 {
7931 continue
7932 }
7933 t := v_1_0_0.Type
7934 _ = v_1_0_0.Args[1]
7935 v_1_0_0_0 := v_1_0_0.Args[0]
7936 v_1_0_0_1 := v_1_0_0.Args[1]
7937 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 {
7938 if n != v_1_0_0_0 || v_1_0_0_1.Op != OpRsh16Ux64 || v_1_0_0_1.Type != t {
7939 continue
7940 }
7941 _ = v_1_0_0_1.Args[1]
7942 v_1_0_0_1_0 := v_1_0_0_1.Args[0]
7943 if v_1_0_0_1_0.Op != OpRsh16x64 || v_1_0_0_1_0.Type != t {
7944 continue
7945 }
7946 _ = v_1_0_0_1_0.Args[1]
7947 if n != v_1_0_0_1_0.Args[0] {
7948 continue
7949 }
7950 v_1_0_0_1_0_1 := v_1_0_0_1_0.Args[1]
7951 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 {
7952 continue
7953 }
7954 v_1_0_0_1_1 := v_1_0_0_1.Args[1]
7955 if v_1_0_0_1_1.Op != OpConst64 || v_1_0_0_1_1.Type != typ.UInt64 {
7956 continue
7957 }
7958 kbar := auxIntToInt64(v_1_0_0_1_1.AuxInt)
7959 v_1_0_1 := v_1_0.Args[1]
7960 if v_1_0_1.Op != OpConst64 || v_1_0_1.Type != typ.UInt64 {
7961 continue
7962 }
7963 k := auxIntToInt64(v_1_0_1.AuxInt)
7964 v_1_1 := v_1.Args[1]
7965 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) {
7966 continue
7967 }
7968 v.reset(OpEq16)
7969 v0 := b.NewValue0(v.Pos, OpAnd16, t)
7970 v1 := b.NewValue0(v.Pos, OpConst16, t)
7971 v1.AuxInt = int16ToAuxInt(1<<uint(k) - 1)
7972 v0.AddArg2(n, v1)
7973 v2 := b.NewValue0(v.Pos, OpConst16, t)
7974 v2.AuxInt = int16ToAuxInt(0)
7975 v.AddArg2(v0, v2)
7976 return true
7977 }
7978 }
7979 break
7980 }
7981
7982
7983
7984 for {
7985 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
7986 s := v_0
7987 if s.Op != OpSub16 {
7988 continue
7989 }
7990 y := s.Args[1]
7991 x := s.Args[0]
7992 if v_1.Op != OpConst16 || auxIntToInt16(v_1.AuxInt) != 0 || !(s.Uses == 1) {
7993 continue
7994 }
7995 v.reset(OpEq16)
7996 v.AddArg2(x, y)
7997 return true
7998 }
7999 break
8000 }
8001
8002
8003
8004 for {
8005 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
8006 if v_0.Op != OpAnd16 {
8007 continue
8008 }
8009 t := v_0.Type
8010 _ = v_0.Args[1]
8011 v_0_0 := v_0.Args[0]
8012 v_0_1 := v_0.Args[1]
8013 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
8014 x := v_0_0
8015 if v_0_1.Op != OpConst16 || v_0_1.Type != t {
8016 continue
8017 }
8018 y := auxIntToInt16(v_0_1.AuxInt)
8019 if v_1.Op != OpConst16 || v_1.Type != t || auxIntToInt16(v_1.AuxInt) != y || !(oneBit16(y)) {
8020 continue
8021 }
8022 v.reset(OpNeq16)
8023 v0 := b.NewValue0(v.Pos, OpAnd16, t)
8024 v1 := b.NewValue0(v.Pos, OpConst16, t)
8025 v1.AuxInt = int16ToAuxInt(y)
8026 v0.AddArg2(x, v1)
8027 v2 := b.NewValue0(v.Pos, OpConst16, t)
8028 v2.AuxInt = int16ToAuxInt(0)
8029 v.AddArg2(v0, v2)
8030 return true
8031 }
8032 }
8033 break
8034 }
8035 return false
8036 }
8037 func rewriteValuegeneric_OpEq32(v *Value) bool {
8038 v_1 := v.Args[1]
8039 v_0 := v.Args[0]
8040 b := v.Block
8041 typ := &b.Func.Config.Types
8042
8043
8044 for {
8045 x := v_0
8046 if x != v_1 {
8047 break
8048 }
8049 v.reset(OpConstBool)
8050 v.AuxInt = boolToAuxInt(true)
8051 return true
8052 }
8053
8054
8055 for {
8056 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
8057 if v_0.Op != OpConst32 {
8058 continue
8059 }
8060 t := v_0.Type
8061 c := auxIntToInt32(v_0.AuxInt)
8062 if v_1.Op != OpAdd32 {
8063 continue
8064 }
8065 _ = v_1.Args[1]
8066 v_1_0 := v_1.Args[0]
8067 v_1_1 := v_1.Args[1]
8068 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
8069 if v_1_0.Op != OpConst32 || v_1_0.Type != t {
8070 continue
8071 }
8072 d := auxIntToInt32(v_1_0.AuxInt)
8073 x := v_1_1
8074 v.reset(OpEq32)
8075 v0 := b.NewValue0(v.Pos, OpConst32, t)
8076 v0.AuxInt = int32ToAuxInt(c - d)
8077 v.AddArg2(v0, x)
8078 return true
8079 }
8080 }
8081 break
8082 }
8083
8084
8085 for {
8086 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
8087 if v_0.Op != OpConst32 {
8088 continue
8089 }
8090 c := auxIntToInt32(v_0.AuxInt)
8091 if v_1.Op != OpConst32 {
8092 continue
8093 }
8094 d := auxIntToInt32(v_1.AuxInt)
8095 v.reset(OpConstBool)
8096 v.AuxInt = boolToAuxInt(c == d)
8097 return true
8098 }
8099 break
8100 }
8101
8102
8103
8104 for {
8105 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
8106 x := v_0
8107 if v_1.Op != OpMul32 {
8108 continue
8109 }
8110 _ = v_1.Args[1]
8111 v_1_0 := v_1.Args[0]
8112 v_1_1 := v_1.Args[1]
8113 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
8114 if v_1_0.Op != OpConst32 {
8115 continue
8116 }
8117 c := auxIntToInt32(v_1_0.AuxInt)
8118 if v_1_1.Op != OpRsh32Ux64 {
8119 continue
8120 }
8121 _ = v_1_1.Args[1]
8122 mul := v_1_1.Args[0]
8123 if mul.Op != OpHmul32u {
8124 continue
8125 }
8126 _ = mul.Args[1]
8127 mul_0 := mul.Args[0]
8128 mul_1 := mul.Args[1]
8129 for _i2 := 0; _i2 <= 1; _i2, mul_0, mul_1 = _i2+1, mul_1, mul_0 {
8130 if mul_0.Op != OpConst32 {
8131 continue
8132 }
8133 m := auxIntToInt32(mul_0.AuxInt)
8134 if x != mul_1 {
8135 continue
8136 }
8137 v_1_1_1 := v_1_1.Args[1]
8138 if v_1_1_1.Op != OpConst64 {
8139 continue
8140 }
8141 s := auxIntToInt64(v_1_1_1.AuxInt)
8142 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)) {
8143 continue
8144 }
8145 v.reset(OpLeq32U)
8146 v0 := b.NewValue0(v.Pos, OpRotateLeft32, typ.UInt32)
8147 v1 := b.NewValue0(v.Pos, OpMul32, typ.UInt32)
8148 v2 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
8149 v2.AuxInt = int32ToAuxInt(int32(udivisible32(c).m))
8150 v1.AddArg2(v2, x)
8151 v3 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
8152 v3.AuxInt = int32ToAuxInt(int32(32 - udivisible32(c).k))
8153 v0.AddArg2(v1, v3)
8154 v4 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
8155 v4.AuxInt = int32ToAuxInt(int32(udivisible32(c).max))
8156 v.AddArg2(v0, v4)
8157 return true
8158 }
8159 }
8160 }
8161 break
8162 }
8163
8164
8165
8166 for {
8167 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
8168 x := v_0
8169 if v_1.Op != OpMul32 {
8170 continue
8171 }
8172 _ = v_1.Args[1]
8173 v_1_0 := v_1.Args[0]
8174 v_1_1 := v_1.Args[1]
8175 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
8176 if v_1_0.Op != OpConst32 {
8177 continue
8178 }
8179 c := auxIntToInt32(v_1_0.AuxInt)
8180 if v_1_1.Op != OpRsh32Ux64 {
8181 continue
8182 }
8183 _ = v_1_1.Args[1]
8184 mul := v_1_1.Args[0]
8185 if mul.Op != OpHmul32u {
8186 continue
8187 }
8188 _ = mul.Args[1]
8189 mul_0 := mul.Args[0]
8190 mul_1 := mul.Args[1]
8191 for _i2 := 0; _i2 <= 1; _i2, mul_0, mul_1 = _i2+1, mul_1, mul_0 {
8192 if mul_0.Op != OpConst32 || mul_0.Type != typ.UInt32 {
8193 continue
8194 }
8195 m := auxIntToInt32(mul_0.AuxInt)
8196 if mul_1.Op != OpRsh32Ux64 {
8197 continue
8198 }
8199 _ = mul_1.Args[1]
8200 if x != mul_1.Args[0] {
8201 continue
8202 }
8203 mul_1_1 := mul_1.Args[1]
8204 if mul_1_1.Op != OpConst64 || auxIntToInt64(mul_1_1.AuxInt) != 1 {
8205 continue
8206 }
8207 v_1_1_1 := v_1_1.Args[1]
8208 if v_1_1_1.Op != OpConst64 {
8209 continue
8210 }
8211 s := auxIntToInt64(v_1_1_1.AuxInt)
8212 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)) {
8213 continue
8214 }
8215 v.reset(OpLeq32U)
8216 v0 := b.NewValue0(v.Pos, OpRotateLeft32, typ.UInt32)
8217 v1 := b.NewValue0(v.Pos, OpMul32, typ.UInt32)
8218 v2 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
8219 v2.AuxInt = int32ToAuxInt(int32(udivisible32(c).m))
8220 v1.AddArg2(v2, x)
8221 v3 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
8222 v3.AuxInt = int32ToAuxInt(int32(32 - udivisible32(c).k))
8223 v0.AddArg2(v1, v3)
8224 v4 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
8225 v4.AuxInt = int32ToAuxInt(int32(udivisible32(c).max))
8226 v.AddArg2(v0, v4)
8227 return true
8228 }
8229 }
8230 }
8231 break
8232 }
8233
8234
8235
8236 for {
8237 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
8238 x := v_0
8239 if v_1.Op != OpMul32 {
8240 continue
8241 }
8242 _ = v_1.Args[1]
8243 v_1_0 := v_1.Args[0]
8244 v_1_1 := v_1.Args[1]
8245 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
8246 if v_1_0.Op != OpConst32 {
8247 continue
8248 }
8249 c := auxIntToInt32(v_1_0.AuxInt)
8250 if v_1_1.Op != OpRsh32Ux64 {
8251 continue
8252 }
8253 _ = v_1_1.Args[1]
8254 v_1_1_0 := v_1_1.Args[0]
8255 if v_1_1_0.Op != OpAvg32u {
8256 continue
8257 }
8258 _ = v_1_1_0.Args[1]
8259 if x != v_1_1_0.Args[0] {
8260 continue
8261 }
8262 mul := v_1_1_0.Args[1]
8263 if mul.Op != OpHmul32u {
8264 continue
8265 }
8266 _ = mul.Args[1]
8267 mul_0 := mul.Args[0]
8268 mul_1 := mul.Args[1]
8269 for _i2 := 0; _i2 <= 1; _i2, mul_0, mul_1 = _i2+1, mul_1, mul_0 {
8270 if mul_0.Op != OpConst32 {
8271 continue
8272 }
8273 m := auxIntToInt32(mul_0.AuxInt)
8274 if x != mul_1 {
8275 continue
8276 }
8277 v_1_1_1 := v_1_1.Args[1]
8278 if v_1_1_1.Op != OpConst64 {
8279 continue
8280 }
8281 s := auxIntToInt64(v_1_1_1.AuxInt)
8282 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)) {
8283 continue
8284 }
8285 v.reset(OpLeq32U)
8286 v0 := b.NewValue0(v.Pos, OpRotateLeft32, typ.UInt32)
8287 v1 := b.NewValue0(v.Pos, OpMul32, typ.UInt32)
8288 v2 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
8289 v2.AuxInt = int32ToAuxInt(int32(udivisible32(c).m))
8290 v1.AddArg2(v2, x)
8291 v3 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
8292 v3.AuxInt = int32ToAuxInt(int32(32 - udivisible32(c).k))
8293 v0.AddArg2(v1, v3)
8294 v4 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
8295 v4.AuxInt = int32ToAuxInt(int32(udivisible32(c).max))
8296 v.AddArg2(v0, v4)
8297 return true
8298 }
8299 }
8300 }
8301 break
8302 }
8303
8304
8305
8306 for {
8307 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
8308 x := v_0
8309 if v_1.Op != OpMul32 {
8310 continue
8311 }
8312 _ = v_1.Args[1]
8313 v_1_0 := v_1.Args[0]
8314 v_1_1 := v_1.Args[1]
8315 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
8316 if v_1_0.Op != OpConst32 {
8317 continue
8318 }
8319 c := auxIntToInt32(v_1_0.AuxInt)
8320 if v_1_1.Op != OpTrunc64to32 {
8321 continue
8322 }
8323 v_1_1_0 := v_1_1.Args[0]
8324 if v_1_1_0.Op != OpRsh64Ux64 {
8325 continue
8326 }
8327 _ = v_1_1_0.Args[1]
8328 mul := v_1_1_0.Args[0]
8329 if mul.Op != OpMul64 {
8330 continue
8331 }
8332 _ = mul.Args[1]
8333 mul_0 := mul.Args[0]
8334 mul_1 := mul.Args[1]
8335 for _i2 := 0; _i2 <= 1; _i2, mul_0, mul_1 = _i2+1, mul_1, mul_0 {
8336 if mul_0.Op != OpConst64 {
8337 continue
8338 }
8339 m := auxIntToInt64(mul_0.AuxInt)
8340 if mul_1.Op != OpZeroExt32to64 || x != mul_1.Args[0] {
8341 continue
8342 }
8343 v_1_1_0_1 := v_1_1_0.Args[1]
8344 if v_1_1_0_1.Op != OpConst64 {
8345 continue
8346 }
8347 s := auxIntToInt64(v_1_1_0_1.AuxInt)
8348 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)) {
8349 continue
8350 }
8351 v.reset(OpLeq32U)
8352 v0 := b.NewValue0(v.Pos, OpRotateLeft32, typ.UInt32)
8353 v1 := b.NewValue0(v.Pos, OpMul32, typ.UInt32)
8354 v2 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
8355 v2.AuxInt = int32ToAuxInt(int32(udivisible32(c).m))
8356 v1.AddArg2(v2, x)
8357 v3 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
8358 v3.AuxInt = int32ToAuxInt(int32(32 - udivisible32(c).k))
8359 v0.AddArg2(v1, v3)
8360 v4 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
8361 v4.AuxInt = int32ToAuxInt(int32(udivisible32(c).max))
8362 v.AddArg2(v0, v4)
8363 return true
8364 }
8365 }
8366 }
8367 break
8368 }
8369
8370
8371
8372 for {
8373 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
8374 x := v_0
8375 if v_1.Op != OpMul32 {
8376 continue
8377 }
8378 _ = v_1.Args[1]
8379 v_1_0 := v_1.Args[0]
8380 v_1_1 := v_1.Args[1]
8381 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
8382 if v_1_0.Op != OpConst32 {
8383 continue
8384 }
8385 c := auxIntToInt32(v_1_0.AuxInt)
8386 if v_1_1.Op != OpTrunc64to32 {
8387 continue
8388 }
8389 v_1_1_0 := v_1_1.Args[0]
8390 if v_1_1_0.Op != OpRsh64Ux64 {
8391 continue
8392 }
8393 _ = v_1_1_0.Args[1]
8394 mul := v_1_1_0.Args[0]
8395 if mul.Op != OpMul64 {
8396 continue
8397 }
8398 _ = mul.Args[1]
8399 mul_0 := mul.Args[0]
8400 mul_1 := mul.Args[1]
8401 for _i2 := 0; _i2 <= 1; _i2, mul_0, mul_1 = _i2+1, mul_1, mul_0 {
8402 if mul_0.Op != OpConst64 {
8403 continue
8404 }
8405 m := auxIntToInt64(mul_0.AuxInt)
8406 if mul_1.Op != OpRsh64Ux64 {
8407 continue
8408 }
8409 _ = mul_1.Args[1]
8410 mul_1_0 := mul_1.Args[0]
8411 if mul_1_0.Op != OpZeroExt32to64 || x != mul_1_0.Args[0] {
8412 continue
8413 }
8414 mul_1_1 := mul_1.Args[1]
8415 if mul_1_1.Op != OpConst64 || auxIntToInt64(mul_1_1.AuxInt) != 1 {
8416 continue
8417 }
8418 v_1_1_0_1 := v_1_1_0.Args[1]
8419 if v_1_1_0_1.Op != OpConst64 {
8420 continue
8421 }
8422 s := auxIntToInt64(v_1_1_0_1.AuxInt)
8423 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)) {
8424 continue
8425 }
8426 v.reset(OpLeq32U)
8427 v0 := b.NewValue0(v.Pos, OpRotateLeft32, typ.UInt32)
8428 v1 := b.NewValue0(v.Pos, OpMul32, typ.UInt32)
8429 v2 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
8430 v2.AuxInt = int32ToAuxInt(int32(udivisible32(c).m))
8431 v1.AddArg2(v2, x)
8432 v3 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
8433 v3.AuxInt = int32ToAuxInt(int32(32 - udivisible32(c).k))
8434 v0.AddArg2(v1, v3)
8435 v4 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
8436 v4.AuxInt = int32ToAuxInt(int32(udivisible32(c).max))
8437 v.AddArg2(v0, v4)
8438 return true
8439 }
8440 }
8441 }
8442 break
8443 }
8444
8445
8446
8447 for {
8448 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
8449 x := v_0
8450 if v_1.Op != OpMul32 {
8451 continue
8452 }
8453 _ = v_1.Args[1]
8454 v_1_0 := v_1.Args[0]
8455 v_1_1 := v_1.Args[1]
8456 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
8457 if v_1_0.Op != OpConst32 {
8458 continue
8459 }
8460 c := auxIntToInt32(v_1_0.AuxInt)
8461 if v_1_1.Op != OpTrunc64to32 {
8462 continue
8463 }
8464 v_1_1_0 := v_1_1.Args[0]
8465 if v_1_1_0.Op != OpRsh64Ux64 {
8466 continue
8467 }
8468 _ = v_1_1_0.Args[1]
8469 v_1_1_0_0 := v_1_1_0.Args[0]
8470 if v_1_1_0_0.Op != OpAvg64u {
8471 continue
8472 }
8473 _ = v_1_1_0_0.Args[1]
8474 v_1_1_0_0_0 := v_1_1_0_0.Args[0]
8475 if v_1_1_0_0_0.Op != OpLsh64x64 {
8476 continue
8477 }
8478 _ = v_1_1_0_0_0.Args[1]
8479 v_1_1_0_0_0_0 := v_1_1_0_0_0.Args[0]
8480 if v_1_1_0_0_0_0.Op != OpZeroExt32to64 || x != v_1_1_0_0_0_0.Args[0] {
8481 continue
8482 }
8483 v_1_1_0_0_0_1 := v_1_1_0_0_0.Args[1]
8484 if v_1_1_0_0_0_1.Op != OpConst64 || auxIntToInt64(v_1_1_0_0_0_1.AuxInt) != 32 {
8485 continue
8486 }
8487 mul := v_1_1_0_0.Args[1]
8488 if mul.Op != OpMul64 {
8489 continue
8490 }
8491 _ = mul.Args[1]
8492 mul_0 := mul.Args[0]
8493 mul_1 := mul.Args[1]
8494 for _i2 := 0; _i2 <= 1; _i2, mul_0, mul_1 = _i2+1, mul_1, mul_0 {
8495 if mul_0.Op != OpConst64 {
8496 continue
8497 }
8498 m := auxIntToInt64(mul_0.AuxInt)
8499 if mul_1.Op != OpZeroExt32to64 || x != mul_1.Args[0] {
8500 continue
8501 }
8502 v_1_1_0_1 := v_1_1_0.Args[1]
8503 if v_1_1_0_1.Op != OpConst64 {
8504 continue
8505 }
8506 s := auxIntToInt64(v_1_1_0_1.AuxInt)
8507 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)) {
8508 continue
8509 }
8510 v.reset(OpLeq32U)
8511 v0 := b.NewValue0(v.Pos, OpRotateLeft32, typ.UInt32)
8512 v1 := b.NewValue0(v.Pos, OpMul32, typ.UInt32)
8513 v2 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
8514 v2.AuxInt = int32ToAuxInt(int32(udivisible32(c).m))
8515 v1.AddArg2(v2, x)
8516 v3 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
8517 v3.AuxInt = int32ToAuxInt(int32(32 - udivisible32(c).k))
8518 v0.AddArg2(v1, v3)
8519 v4 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
8520 v4.AuxInt = int32ToAuxInt(int32(udivisible32(c).max))
8521 v.AddArg2(v0, v4)
8522 return true
8523 }
8524 }
8525 }
8526 break
8527 }
8528
8529
8530
8531 for {
8532 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
8533 x := v_0
8534 if v_1.Op != OpMul32 {
8535 continue
8536 }
8537 _ = v_1.Args[1]
8538 v_1_0 := v_1.Args[0]
8539 v_1_1 := v_1.Args[1]
8540 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
8541 if v_1_0.Op != OpConst32 {
8542 continue
8543 }
8544 c := auxIntToInt32(v_1_0.AuxInt)
8545 if v_1_1.Op != OpSub32 {
8546 continue
8547 }
8548 _ = v_1_1.Args[1]
8549 v_1_1_0 := v_1_1.Args[0]
8550 if v_1_1_0.Op != OpRsh64x64 {
8551 continue
8552 }
8553 _ = v_1_1_0.Args[1]
8554 mul := v_1_1_0.Args[0]
8555 if mul.Op != OpMul64 {
8556 continue
8557 }
8558 _ = mul.Args[1]
8559 mul_0 := mul.Args[0]
8560 mul_1 := mul.Args[1]
8561 for _i2 := 0; _i2 <= 1; _i2, mul_0, mul_1 = _i2+1, mul_1, mul_0 {
8562 if mul_0.Op != OpConst64 {
8563 continue
8564 }
8565 m := auxIntToInt64(mul_0.AuxInt)
8566 if mul_1.Op != OpSignExt32to64 || x != mul_1.Args[0] {
8567 continue
8568 }
8569 v_1_1_0_1 := v_1_1_0.Args[1]
8570 if v_1_1_0_1.Op != OpConst64 {
8571 continue
8572 }
8573 s := auxIntToInt64(v_1_1_0_1.AuxInt)
8574 v_1_1_1 := v_1_1.Args[1]
8575 if v_1_1_1.Op != OpRsh64x64 {
8576 continue
8577 }
8578 _ = v_1_1_1.Args[1]
8579 v_1_1_1_0 := v_1_1_1.Args[0]
8580 if v_1_1_1_0.Op != OpSignExt32to64 || x != v_1_1_1_0.Args[0] {
8581 continue
8582 }
8583 v_1_1_1_1 := v_1_1_1.Args[1]
8584 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)) {
8585 continue
8586 }
8587 v.reset(OpLeq32U)
8588 v0 := b.NewValue0(v.Pos, OpRotateLeft32, typ.UInt32)
8589 v1 := b.NewValue0(v.Pos, OpAdd32, typ.UInt32)
8590 v2 := b.NewValue0(v.Pos, OpMul32, typ.UInt32)
8591 v3 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
8592 v3.AuxInt = int32ToAuxInt(int32(sdivisible32(c).m))
8593 v2.AddArg2(v3, x)
8594 v4 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
8595 v4.AuxInt = int32ToAuxInt(int32(sdivisible32(c).a))
8596 v1.AddArg2(v2, v4)
8597 v5 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
8598 v5.AuxInt = int32ToAuxInt(int32(32 - sdivisible32(c).k))
8599 v0.AddArg2(v1, v5)
8600 v6 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
8601 v6.AuxInt = int32ToAuxInt(int32(sdivisible32(c).max))
8602 v.AddArg2(v0, v6)
8603 return true
8604 }
8605 }
8606 }
8607 break
8608 }
8609
8610
8611
8612 for {
8613 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
8614 x := v_0
8615 if v_1.Op != OpMul32 {
8616 continue
8617 }
8618 _ = v_1.Args[1]
8619 v_1_0 := v_1.Args[0]
8620 v_1_1 := v_1.Args[1]
8621 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
8622 if v_1_0.Op != OpConst32 {
8623 continue
8624 }
8625 c := auxIntToInt32(v_1_0.AuxInt)
8626 if v_1_1.Op != OpSub32 {
8627 continue
8628 }
8629 _ = v_1_1.Args[1]
8630 v_1_1_0 := v_1_1.Args[0]
8631 if v_1_1_0.Op != OpRsh32x64 {
8632 continue
8633 }
8634 _ = v_1_1_0.Args[1]
8635 mul := v_1_1_0.Args[0]
8636 if mul.Op != OpHmul32 {
8637 continue
8638 }
8639 _ = mul.Args[1]
8640 mul_0 := mul.Args[0]
8641 mul_1 := mul.Args[1]
8642 for _i2 := 0; _i2 <= 1; _i2, mul_0, mul_1 = _i2+1, mul_1, mul_0 {
8643 if mul_0.Op != OpConst32 {
8644 continue
8645 }
8646 m := auxIntToInt32(mul_0.AuxInt)
8647 if x != mul_1 {
8648 continue
8649 }
8650 v_1_1_0_1 := v_1_1_0.Args[1]
8651 if v_1_1_0_1.Op != OpConst64 {
8652 continue
8653 }
8654 s := auxIntToInt64(v_1_1_0_1.AuxInt)
8655 v_1_1_1 := v_1_1.Args[1]
8656 if v_1_1_1.Op != OpRsh32x64 {
8657 continue
8658 }
8659 _ = v_1_1_1.Args[1]
8660 if x != v_1_1_1.Args[0] {
8661 continue
8662 }
8663 v_1_1_1_1 := v_1_1_1.Args[1]
8664 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)) {
8665 continue
8666 }
8667 v.reset(OpLeq32U)
8668 v0 := b.NewValue0(v.Pos, OpRotateLeft32, typ.UInt32)
8669 v1 := b.NewValue0(v.Pos, OpAdd32, typ.UInt32)
8670 v2 := b.NewValue0(v.Pos, OpMul32, typ.UInt32)
8671 v3 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
8672 v3.AuxInt = int32ToAuxInt(int32(sdivisible32(c).m))
8673 v2.AddArg2(v3, x)
8674 v4 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
8675 v4.AuxInt = int32ToAuxInt(int32(sdivisible32(c).a))
8676 v1.AddArg2(v2, v4)
8677 v5 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
8678 v5.AuxInt = int32ToAuxInt(int32(32 - sdivisible32(c).k))
8679 v0.AddArg2(v1, v5)
8680 v6 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
8681 v6.AuxInt = int32ToAuxInt(int32(sdivisible32(c).max))
8682 v.AddArg2(v0, v6)
8683 return true
8684 }
8685 }
8686 }
8687 break
8688 }
8689
8690
8691
8692 for {
8693 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
8694 x := v_0
8695 if v_1.Op != OpMul32 {
8696 continue
8697 }
8698 _ = v_1.Args[1]
8699 v_1_0 := v_1.Args[0]
8700 v_1_1 := v_1.Args[1]
8701 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
8702 if v_1_0.Op != OpConst32 {
8703 continue
8704 }
8705 c := auxIntToInt32(v_1_0.AuxInt)
8706 if v_1_1.Op != OpSub32 {
8707 continue
8708 }
8709 _ = v_1_1.Args[1]
8710 v_1_1_0 := v_1_1.Args[0]
8711 if v_1_1_0.Op != OpRsh32x64 {
8712 continue
8713 }
8714 _ = v_1_1_0.Args[1]
8715 v_1_1_0_0 := v_1_1_0.Args[0]
8716 if v_1_1_0_0.Op != OpAdd32 {
8717 continue
8718 }
8719 _ = v_1_1_0_0.Args[1]
8720 v_1_1_0_0_0 := v_1_1_0_0.Args[0]
8721 v_1_1_0_0_1 := v_1_1_0_0.Args[1]
8722 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 {
8723 mul := v_1_1_0_0_0
8724 if mul.Op != OpHmul32 {
8725 continue
8726 }
8727 _ = mul.Args[1]
8728 mul_0 := mul.Args[0]
8729 mul_1 := mul.Args[1]
8730 for _i3 := 0; _i3 <= 1; _i3, mul_0, mul_1 = _i3+1, mul_1, mul_0 {
8731 if mul_0.Op != OpConst32 {
8732 continue
8733 }
8734 m := auxIntToInt32(mul_0.AuxInt)
8735 if x != mul_1 || x != v_1_1_0_0_1 {
8736 continue
8737 }
8738 v_1_1_0_1 := v_1_1_0.Args[1]
8739 if v_1_1_0_1.Op != OpConst64 {
8740 continue
8741 }
8742 s := auxIntToInt64(v_1_1_0_1.AuxInt)
8743 v_1_1_1 := v_1_1.Args[1]
8744 if v_1_1_1.Op != OpRsh32x64 {
8745 continue
8746 }
8747 _ = v_1_1_1.Args[1]
8748 if x != v_1_1_1.Args[0] {
8749 continue
8750 }
8751 v_1_1_1_1 := v_1_1_1.Args[1]
8752 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)) {
8753 continue
8754 }
8755 v.reset(OpLeq32U)
8756 v0 := b.NewValue0(v.Pos, OpRotateLeft32, typ.UInt32)
8757 v1 := b.NewValue0(v.Pos, OpAdd32, typ.UInt32)
8758 v2 := b.NewValue0(v.Pos, OpMul32, typ.UInt32)
8759 v3 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
8760 v3.AuxInt = int32ToAuxInt(int32(sdivisible32(c).m))
8761 v2.AddArg2(v3, x)
8762 v4 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
8763 v4.AuxInt = int32ToAuxInt(int32(sdivisible32(c).a))
8764 v1.AddArg2(v2, v4)
8765 v5 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
8766 v5.AuxInt = int32ToAuxInt(int32(32 - sdivisible32(c).k))
8767 v0.AddArg2(v1, v5)
8768 v6 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
8769 v6.AuxInt = int32ToAuxInt(int32(sdivisible32(c).max))
8770 v.AddArg2(v0, v6)
8771 return true
8772 }
8773 }
8774 }
8775 }
8776 break
8777 }
8778
8779
8780
8781 for {
8782 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
8783 n := v_0
8784 if v_1.Op != OpLsh32x64 {
8785 continue
8786 }
8787 _ = v_1.Args[1]
8788 v_1_0 := v_1.Args[0]
8789 if v_1_0.Op != OpRsh32x64 {
8790 continue
8791 }
8792 _ = v_1_0.Args[1]
8793 v_1_0_0 := v_1_0.Args[0]
8794 if v_1_0_0.Op != OpAdd32 {
8795 continue
8796 }
8797 t := v_1_0_0.Type
8798 _ = v_1_0_0.Args[1]
8799 v_1_0_0_0 := v_1_0_0.Args[0]
8800 v_1_0_0_1 := v_1_0_0.Args[1]
8801 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 {
8802 if n != v_1_0_0_0 || v_1_0_0_1.Op != OpRsh32Ux64 || v_1_0_0_1.Type != t {
8803 continue
8804 }
8805 _ = v_1_0_0_1.Args[1]
8806 v_1_0_0_1_0 := v_1_0_0_1.Args[0]
8807 if v_1_0_0_1_0.Op != OpRsh32x64 || v_1_0_0_1_0.Type != t {
8808 continue
8809 }
8810 _ = v_1_0_0_1_0.Args[1]
8811 if n != v_1_0_0_1_0.Args[0] {
8812 continue
8813 }
8814 v_1_0_0_1_0_1 := v_1_0_0_1_0.Args[1]
8815 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 {
8816 continue
8817 }
8818 v_1_0_0_1_1 := v_1_0_0_1.Args[1]
8819 if v_1_0_0_1_1.Op != OpConst64 || v_1_0_0_1_1.Type != typ.UInt64 {
8820 continue
8821 }
8822 kbar := auxIntToInt64(v_1_0_0_1_1.AuxInt)
8823 v_1_0_1 := v_1_0.Args[1]
8824 if v_1_0_1.Op != OpConst64 || v_1_0_1.Type != typ.UInt64 {
8825 continue
8826 }
8827 k := auxIntToInt64(v_1_0_1.AuxInt)
8828 v_1_1 := v_1.Args[1]
8829 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) {
8830 continue
8831 }
8832 v.reset(OpEq32)
8833 v0 := b.NewValue0(v.Pos, OpAnd32, t)
8834 v1 := b.NewValue0(v.Pos, OpConst32, t)
8835 v1.AuxInt = int32ToAuxInt(1<<uint(k) - 1)
8836 v0.AddArg2(n, v1)
8837 v2 := b.NewValue0(v.Pos, OpConst32, t)
8838 v2.AuxInt = int32ToAuxInt(0)
8839 v.AddArg2(v0, v2)
8840 return true
8841 }
8842 }
8843 break
8844 }
8845
8846
8847
8848 for {
8849 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
8850 s := v_0
8851 if s.Op != OpSub32 {
8852 continue
8853 }
8854 y := s.Args[1]
8855 x := s.Args[0]
8856 if v_1.Op != OpConst32 || auxIntToInt32(v_1.AuxInt) != 0 || !(s.Uses == 1) {
8857 continue
8858 }
8859 v.reset(OpEq32)
8860 v.AddArg2(x, y)
8861 return true
8862 }
8863 break
8864 }
8865
8866
8867
8868 for {
8869 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
8870 if v_0.Op != OpAnd32 {
8871 continue
8872 }
8873 t := v_0.Type
8874 _ = v_0.Args[1]
8875 v_0_0 := v_0.Args[0]
8876 v_0_1 := v_0.Args[1]
8877 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
8878 x := v_0_0
8879 if v_0_1.Op != OpConst32 || v_0_1.Type != t {
8880 continue
8881 }
8882 y := auxIntToInt32(v_0_1.AuxInt)
8883 if v_1.Op != OpConst32 || v_1.Type != t || auxIntToInt32(v_1.AuxInt) != y || !(oneBit32(y)) {
8884 continue
8885 }
8886 v.reset(OpNeq32)
8887 v0 := b.NewValue0(v.Pos, OpAnd32, t)
8888 v1 := b.NewValue0(v.Pos, OpConst32, t)
8889 v1.AuxInt = int32ToAuxInt(y)
8890 v0.AddArg2(x, v1)
8891 v2 := b.NewValue0(v.Pos, OpConst32, t)
8892 v2.AuxInt = int32ToAuxInt(0)
8893 v.AddArg2(v0, v2)
8894 return true
8895 }
8896 }
8897 break
8898 }
8899 return false
8900 }
8901 func rewriteValuegeneric_OpEq32F(v *Value) bool {
8902 v_1 := v.Args[1]
8903 v_0 := v.Args[0]
8904
8905
8906 for {
8907 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
8908 if v_0.Op != OpConst32F {
8909 continue
8910 }
8911 c := auxIntToFloat32(v_0.AuxInt)
8912 if v_1.Op != OpConst32F {
8913 continue
8914 }
8915 d := auxIntToFloat32(v_1.AuxInt)
8916 v.reset(OpConstBool)
8917 v.AuxInt = boolToAuxInt(c == d)
8918 return true
8919 }
8920 break
8921 }
8922 return false
8923 }
8924 func rewriteValuegeneric_OpEq64(v *Value) bool {
8925 v_1 := v.Args[1]
8926 v_0 := v.Args[0]
8927 b := v.Block
8928 typ := &b.Func.Config.Types
8929
8930
8931 for {
8932 x := v_0
8933 if x != v_1 {
8934 break
8935 }
8936 v.reset(OpConstBool)
8937 v.AuxInt = boolToAuxInt(true)
8938 return true
8939 }
8940
8941
8942 for {
8943 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
8944 if v_0.Op != OpConst64 {
8945 continue
8946 }
8947 t := v_0.Type
8948 c := auxIntToInt64(v_0.AuxInt)
8949 if v_1.Op != OpAdd64 {
8950 continue
8951 }
8952 _ = v_1.Args[1]
8953 v_1_0 := v_1.Args[0]
8954 v_1_1 := v_1.Args[1]
8955 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
8956 if v_1_0.Op != OpConst64 || v_1_0.Type != t {
8957 continue
8958 }
8959 d := auxIntToInt64(v_1_0.AuxInt)
8960 x := v_1_1
8961 v.reset(OpEq64)
8962 v0 := b.NewValue0(v.Pos, OpConst64, t)
8963 v0.AuxInt = int64ToAuxInt(c - d)
8964 v.AddArg2(v0, x)
8965 return true
8966 }
8967 }
8968 break
8969 }
8970
8971
8972 for {
8973 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
8974 if v_0.Op != OpConst64 {
8975 continue
8976 }
8977 c := auxIntToInt64(v_0.AuxInt)
8978 if v_1.Op != OpConst64 {
8979 continue
8980 }
8981 d := auxIntToInt64(v_1.AuxInt)
8982 v.reset(OpConstBool)
8983 v.AuxInt = boolToAuxInt(c == d)
8984 return true
8985 }
8986 break
8987 }
8988
8989
8990
8991 for {
8992 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
8993 x := v_0
8994 if v_1.Op != OpMul64 {
8995 continue
8996 }
8997 _ = v_1.Args[1]
8998 v_1_0 := v_1.Args[0]
8999 v_1_1 := v_1.Args[1]
9000 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
9001 if v_1_0.Op != OpConst64 {
9002 continue
9003 }
9004 c := auxIntToInt64(v_1_0.AuxInt)
9005 if v_1_1.Op != OpRsh64Ux64 {
9006 continue
9007 }
9008 _ = v_1_1.Args[1]
9009 mul := v_1_1.Args[0]
9010 if mul.Op != OpHmul64u {
9011 continue
9012 }
9013 _ = mul.Args[1]
9014 mul_0 := mul.Args[0]
9015 mul_1 := mul.Args[1]
9016 for _i2 := 0; _i2 <= 1; _i2, mul_0, mul_1 = _i2+1, mul_1, mul_0 {
9017 if mul_0.Op != OpConst64 {
9018 continue
9019 }
9020 m := auxIntToInt64(mul_0.AuxInt)
9021 if x != mul_1 {
9022 continue
9023 }
9024 v_1_1_1 := v_1_1.Args[1]
9025 if v_1_1_1.Op != OpConst64 {
9026 continue
9027 }
9028 s := auxIntToInt64(v_1_1_1.AuxInt)
9029 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)) {
9030 continue
9031 }
9032 v.reset(OpLeq64U)
9033 v0 := b.NewValue0(v.Pos, OpRotateLeft64, typ.UInt64)
9034 v1 := b.NewValue0(v.Pos, OpMul64, typ.UInt64)
9035 v2 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
9036 v2.AuxInt = int64ToAuxInt(int64(udivisible64(c).m))
9037 v1.AddArg2(v2, x)
9038 v3 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
9039 v3.AuxInt = int64ToAuxInt(64 - udivisible64(c).k)
9040 v0.AddArg2(v1, v3)
9041 v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
9042 v4.AuxInt = int64ToAuxInt(int64(udivisible64(c).max))
9043 v.AddArg2(v0, v4)
9044 return true
9045 }
9046 }
9047 }
9048 break
9049 }
9050
9051
9052
9053 for {
9054 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
9055 x := v_0
9056 if v_1.Op != OpMul64 {
9057 continue
9058 }
9059 _ = v_1.Args[1]
9060 v_1_0 := v_1.Args[0]
9061 v_1_1 := v_1.Args[1]
9062 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
9063 if v_1_0.Op != OpConst64 {
9064 continue
9065 }
9066 c := auxIntToInt64(v_1_0.AuxInt)
9067 if v_1_1.Op != OpRsh64Ux64 {
9068 continue
9069 }
9070 _ = v_1_1.Args[1]
9071 mul := v_1_1.Args[0]
9072 if mul.Op != OpHmul64u {
9073 continue
9074 }
9075 _ = mul.Args[1]
9076 mul_0 := mul.Args[0]
9077 mul_1 := mul.Args[1]
9078 for _i2 := 0; _i2 <= 1; _i2, mul_0, mul_1 = _i2+1, mul_1, mul_0 {
9079 if mul_0.Op != OpConst64 {
9080 continue
9081 }
9082 m := auxIntToInt64(mul_0.AuxInt)
9083 if mul_1.Op != OpRsh64Ux64 {
9084 continue
9085 }
9086 _ = mul_1.Args[1]
9087 if x != mul_1.Args[0] {
9088 continue
9089 }
9090 mul_1_1 := mul_1.Args[1]
9091 if mul_1_1.Op != OpConst64 || auxIntToInt64(mul_1_1.AuxInt) != 1 {
9092 continue
9093 }
9094 v_1_1_1 := v_1_1.Args[1]
9095 if v_1_1_1.Op != OpConst64 {
9096 continue
9097 }
9098 s := auxIntToInt64(v_1_1_1.AuxInt)
9099 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)) {
9100 continue
9101 }
9102 v.reset(OpLeq64U)
9103 v0 := b.NewValue0(v.Pos, OpRotateLeft64, typ.UInt64)
9104 v1 := b.NewValue0(v.Pos, OpMul64, typ.UInt64)
9105 v2 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
9106 v2.AuxInt = int64ToAuxInt(int64(udivisible64(c).m))
9107 v1.AddArg2(v2, x)
9108 v3 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
9109 v3.AuxInt = int64ToAuxInt(64 - udivisible64(c).k)
9110 v0.AddArg2(v1, v3)
9111 v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
9112 v4.AuxInt = int64ToAuxInt(int64(udivisible64(c).max))
9113 v.AddArg2(v0, v4)
9114 return true
9115 }
9116 }
9117 }
9118 break
9119 }
9120
9121
9122
9123 for {
9124 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
9125 x := v_0
9126 if v_1.Op != OpMul64 {
9127 continue
9128 }
9129 _ = v_1.Args[1]
9130 v_1_0 := v_1.Args[0]
9131 v_1_1 := v_1.Args[1]
9132 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
9133 if v_1_0.Op != OpConst64 {
9134 continue
9135 }
9136 c := auxIntToInt64(v_1_0.AuxInt)
9137 if v_1_1.Op != OpRsh64Ux64 {
9138 continue
9139 }
9140 _ = v_1_1.Args[1]
9141 v_1_1_0 := v_1_1.Args[0]
9142 if v_1_1_0.Op != OpAvg64u {
9143 continue
9144 }
9145 _ = v_1_1_0.Args[1]
9146 if x != v_1_1_0.Args[0] {
9147 continue
9148 }
9149 mul := v_1_1_0.Args[1]
9150 if mul.Op != OpHmul64u {
9151 continue
9152 }
9153 _ = mul.Args[1]
9154 mul_0 := mul.Args[0]
9155 mul_1 := mul.Args[1]
9156 for _i2 := 0; _i2 <= 1; _i2, mul_0, mul_1 = _i2+1, mul_1, mul_0 {
9157 if mul_0.Op != OpConst64 {
9158 continue
9159 }
9160 m := auxIntToInt64(mul_0.AuxInt)
9161 if x != mul_1 {
9162 continue
9163 }
9164 v_1_1_1 := v_1_1.Args[1]
9165 if v_1_1_1.Op != OpConst64 {
9166 continue
9167 }
9168 s := auxIntToInt64(v_1_1_1.AuxInt)
9169 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)) {
9170 continue
9171 }
9172 v.reset(OpLeq64U)
9173 v0 := b.NewValue0(v.Pos, OpRotateLeft64, typ.UInt64)
9174 v1 := b.NewValue0(v.Pos, OpMul64, typ.UInt64)
9175 v2 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
9176 v2.AuxInt = int64ToAuxInt(int64(udivisible64(c).m))
9177 v1.AddArg2(v2, x)
9178 v3 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
9179 v3.AuxInt = int64ToAuxInt(64 - udivisible64(c).k)
9180 v0.AddArg2(v1, v3)
9181 v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
9182 v4.AuxInt = int64ToAuxInt(int64(udivisible64(c).max))
9183 v.AddArg2(v0, v4)
9184 return true
9185 }
9186 }
9187 }
9188 break
9189 }
9190
9191
9192
9193 for {
9194 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
9195 x := v_0
9196 if v_1.Op != OpMul64 {
9197 continue
9198 }
9199 _ = v_1.Args[1]
9200 v_1_0 := v_1.Args[0]
9201 v_1_1 := v_1.Args[1]
9202 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
9203 if v_1_0.Op != OpConst64 {
9204 continue
9205 }
9206 c := auxIntToInt64(v_1_0.AuxInt)
9207 if v_1_1.Op != OpSub64 {
9208 continue
9209 }
9210 _ = v_1_1.Args[1]
9211 v_1_1_0 := v_1_1.Args[0]
9212 if v_1_1_0.Op != OpRsh64x64 {
9213 continue
9214 }
9215 _ = v_1_1_0.Args[1]
9216 mul := v_1_1_0.Args[0]
9217 if mul.Op != OpHmul64 {
9218 continue
9219 }
9220 _ = mul.Args[1]
9221 mul_0 := mul.Args[0]
9222 mul_1 := mul.Args[1]
9223 for _i2 := 0; _i2 <= 1; _i2, mul_0, mul_1 = _i2+1, mul_1, mul_0 {
9224 if mul_0.Op != OpConst64 {
9225 continue
9226 }
9227 m := auxIntToInt64(mul_0.AuxInt)
9228 if x != mul_1 {
9229 continue
9230 }
9231 v_1_1_0_1 := v_1_1_0.Args[1]
9232 if v_1_1_0_1.Op != OpConst64 {
9233 continue
9234 }
9235 s := auxIntToInt64(v_1_1_0_1.AuxInt)
9236 v_1_1_1 := v_1_1.Args[1]
9237 if v_1_1_1.Op != OpRsh64x64 {
9238 continue
9239 }
9240 _ = v_1_1_1.Args[1]
9241 if x != v_1_1_1.Args[0] {
9242 continue
9243 }
9244 v_1_1_1_1 := v_1_1_1.Args[1]
9245 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)) {
9246 continue
9247 }
9248 v.reset(OpLeq64U)
9249 v0 := b.NewValue0(v.Pos, OpRotateLeft64, typ.UInt64)
9250 v1 := b.NewValue0(v.Pos, OpAdd64, typ.UInt64)
9251 v2 := b.NewValue0(v.Pos, OpMul64, typ.UInt64)
9252 v3 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
9253 v3.AuxInt = int64ToAuxInt(int64(sdivisible64(c).m))
9254 v2.AddArg2(v3, x)
9255 v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
9256 v4.AuxInt = int64ToAuxInt(int64(sdivisible64(c).a))
9257 v1.AddArg2(v2, v4)
9258 v5 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
9259 v5.AuxInt = int64ToAuxInt(64 - sdivisible64(c).k)
9260 v0.AddArg2(v1, v5)
9261 v6 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
9262 v6.AuxInt = int64ToAuxInt(int64(sdivisible64(c).max))
9263 v.AddArg2(v0, v6)
9264 return true
9265 }
9266 }
9267 }
9268 break
9269 }
9270
9271
9272
9273 for {
9274 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
9275 x := v_0
9276 if v_1.Op != OpMul64 {
9277 continue
9278 }
9279 _ = v_1.Args[1]
9280 v_1_0 := v_1.Args[0]
9281 v_1_1 := v_1.Args[1]
9282 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
9283 if v_1_0.Op != OpConst64 {
9284 continue
9285 }
9286 c := auxIntToInt64(v_1_0.AuxInt)
9287 if v_1_1.Op != OpSub64 {
9288 continue
9289 }
9290 _ = v_1_1.Args[1]
9291 v_1_1_0 := v_1_1.Args[0]
9292 if v_1_1_0.Op != OpRsh64x64 {
9293 continue
9294 }
9295 _ = v_1_1_0.Args[1]
9296 v_1_1_0_0 := v_1_1_0.Args[0]
9297 if v_1_1_0_0.Op != OpAdd64 {
9298 continue
9299 }
9300 _ = v_1_1_0_0.Args[1]
9301 v_1_1_0_0_0 := v_1_1_0_0.Args[0]
9302 v_1_1_0_0_1 := v_1_1_0_0.Args[1]
9303 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 {
9304 mul := v_1_1_0_0_0
9305 if mul.Op != OpHmul64 {
9306 continue
9307 }
9308 _ = mul.Args[1]
9309 mul_0 := mul.Args[0]
9310 mul_1 := mul.Args[1]
9311 for _i3 := 0; _i3 <= 1; _i3, mul_0, mul_1 = _i3+1, mul_1, mul_0 {
9312 if mul_0.Op != OpConst64 {
9313 continue
9314 }
9315 m := auxIntToInt64(mul_0.AuxInt)
9316 if x != mul_1 || x != v_1_1_0_0_1 {
9317 continue
9318 }
9319 v_1_1_0_1 := v_1_1_0.Args[1]
9320 if v_1_1_0_1.Op != OpConst64 {
9321 continue
9322 }
9323 s := auxIntToInt64(v_1_1_0_1.AuxInt)
9324 v_1_1_1 := v_1_1.Args[1]
9325 if v_1_1_1.Op != OpRsh64x64 {
9326 continue
9327 }
9328 _ = v_1_1_1.Args[1]
9329 if x != v_1_1_1.Args[0] {
9330 continue
9331 }
9332 v_1_1_1_1 := v_1_1_1.Args[1]
9333 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)) {
9334 continue
9335 }
9336 v.reset(OpLeq64U)
9337 v0 := b.NewValue0(v.Pos, OpRotateLeft64, typ.UInt64)
9338 v1 := b.NewValue0(v.Pos, OpAdd64, typ.UInt64)
9339 v2 := b.NewValue0(v.Pos, OpMul64, typ.UInt64)
9340 v3 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
9341 v3.AuxInt = int64ToAuxInt(int64(sdivisible64(c).m))
9342 v2.AddArg2(v3, x)
9343 v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
9344 v4.AuxInt = int64ToAuxInt(int64(sdivisible64(c).a))
9345 v1.AddArg2(v2, v4)
9346 v5 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
9347 v5.AuxInt = int64ToAuxInt(64 - sdivisible64(c).k)
9348 v0.AddArg2(v1, v5)
9349 v6 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
9350 v6.AuxInt = int64ToAuxInt(int64(sdivisible64(c).max))
9351 v.AddArg2(v0, v6)
9352 return true
9353 }
9354 }
9355 }
9356 }
9357 break
9358 }
9359
9360
9361
9362 for {
9363 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
9364 n := v_0
9365 if v_1.Op != OpLsh64x64 {
9366 continue
9367 }
9368 _ = v_1.Args[1]
9369 v_1_0 := v_1.Args[0]
9370 if v_1_0.Op != OpRsh64x64 {
9371 continue
9372 }
9373 _ = v_1_0.Args[1]
9374 v_1_0_0 := v_1_0.Args[0]
9375 if v_1_0_0.Op != OpAdd64 {
9376 continue
9377 }
9378 t := v_1_0_0.Type
9379 _ = v_1_0_0.Args[1]
9380 v_1_0_0_0 := v_1_0_0.Args[0]
9381 v_1_0_0_1 := v_1_0_0.Args[1]
9382 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 {
9383 if n != v_1_0_0_0 || v_1_0_0_1.Op != OpRsh64Ux64 || v_1_0_0_1.Type != t {
9384 continue
9385 }
9386 _ = v_1_0_0_1.Args[1]
9387 v_1_0_0_1_0 := v_1_0_0_1.Args[0]
9388 if v_1_0_0_1_0.Op != OpRsh64x64 || v_1_0_0_1_0.Type != t {
9389 continue
9390 }
9391 _ = v_1_0_0_1_0.Args[1]
9392 if n != v_1_0_0_1_0.Args[0] {
9393 continue
9394 }
9395 v_1_0_0_1_0_1 := v_1_0_0_1_0.Args[1]
9396 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 {
9397 continue
9398 }
9399 v_1_0_0_1_1 := v_1_0_0_1.Args[1]
9400 if v_1_0_0_1_1.Op != OpConst64 || v_1_0_0_1_1.Type != typ.UInt64 {
9401 continue
9402 }
9403 kbar := auxIntToInt64(v_1_0_0_1_1.AuxInt)
9404 v_1_0_1 := v_1_0.Args[1]
9405 if v_1_0_1.Op != OpConst64 || v_1_0_1.Type != typ.UInt64 {
9406 continue
9407 }
9408 k := auxIntToInt64(v_1_0_1.AuxInt)
9409 v_1_1 := v_1.Args[1]
9410 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) {
9411 continue
9412 }
9413 v.reset(OpEq64)
9414 v0 := b.NewValue0(v.Pos, OpAnd64, t)
9415 v1 := b.NewValue0(v.Pos, OpConst64, t)
9416 v1.AuxInt = int64ToAuxInt(1<<uint(k) - 1)
9417 v0.AddArg2(n, v1)
9418 v2 := b.NewValue0(v.Pos, OpConst64, t)
9419 v2.AuxInt = int64ToAuxInt(0)
9420 v.AddArg2(v0, v2)
9421 return true
9422 }
9423 }
9424 break
9425 }
9426
9427
9428
9429 for {
9430 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
9431 s := v_0
9432 if s.Op != OpSub64 {
9433 continue
9434 }
9435 y := s.Args[1]
9436 x := s.Args[0]
9437 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 0 || !(s.Uses == 1) {
9438 continue
9439 }
9440 v.reset(OpEq64)
9441 v.AddArg2(x, y)
9442 return true
9443 }
9444 break
9445 }
9446
9447
9448
9449 for {
9450 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
9451 if v_0.Op != OpAnd64 {
9452 continue
9453 }
9454 t := v_0.Type
9455 _ = v_0.Args[1]
9456 v_0_0 := v_0.Args[0]
9457 v_0_1 := v_0.Args[1]
9458 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
9459 x := v_0_0
9460 if v_0_1.Op != OpConst64 || v_0_1.Type != t {
9461 continue
9462 }
9463 y := auxIntToInt64(v_0_1.AuxInt)
9464 if v_1.Op != OpConst64 || v_1.Type != t || auxIntToInt64(v_1.AuxInt) != y || !(oneBit64(y)) {
9465 continue
9466 }
9467 v.reset(OpNeq64)
9468 v0 := b.NewValue0(v.Pos, OpAnd64, t)
9469 v1 := b.NewValue0(v.Pos, OpConst64, t)
9470 v1.AuxInt = int64ToAuxInt(y)
9471 v0.AddArg2(x, v1)
9472 v2 := b.NewValue0(v.Pos, OpConst64, t)
9473 v2.AuxInt = int64ToAuxInt(0)
9474 v.AddArg2(v0, v2)
9475 return true
9476 }
9477 }
9478 break
9479 }
9480 return false
9481 }
9482 func rewriteValuegeneric_OpEq64F(v *Value) bool {
9483 v_1 := v.Args[1]
9484 v_0 := v.Args[0]
9485
9486
9487 for {
9488 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
9489 if v_0.Op != OpConst64F {
9490 continue
9491 }
9492 c := auxIntToFloat64(v_0.AuxInt)
9493 if v_1.Op != OpConst64F {
9494 continue
9495 }
9496 d := auxIntToFloat64(v_1.AuxInt)
9497 v.reset(OpConstBool)
9498 v.AuxInt = boolToAuxInt(c == d)
9499 return true
9500 }
9501 break
9502 }
9503 return false
9504 }
9505 func rewriteValuegeneric_OpEq8(v *Value) bool {
9506 v_1 := v.Args[1]
9507 v_0 := v.Args[0]
9508 b := v.Block
9509 config := b.Func.Config
9510 typ := &b.Func.Config.Types
9511
9512
9513 for {
9514 x := v_0
9515 if x != v_1 {
9516 break
9517 }
9518 v.reset(OpConstBool)
9519 v.AuxInt = boolToAuxInt(true)
9520 return true
9521 }
9522
9523
9524 for {
9525 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
9526 if v_0.Op != OpConst8 {
9527 continue
9528 }
9529 t := v_0.Type
9530 c := auxIntToInt8(v_0.AuxInt)
9531 if v_1.Op != OpAdd8 {
9532 continue
9533 }
9534 _ = v_1.Args[1]
9535 v_1_0 := v_1.Args[0]
9536 v_1_1 := v_1.Args[1]
9537 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
9538 if v_1_0.Op != OpConst8 || v_1_0.Type != t {
9539 continue
9540 }
9541 d := auxIntToInt8(v_1_0.AuxInt)
9542 x := v_1_1
9543 v.reset(OpEq8)
9544 v0 := b.NewValue0(v.Pos, OpConst8, t)
9545 v0.AuxInt = int8ToAuxInt(c - d)
9546 v.AddArg2(v0, x)
9547 return true
9548 }
9549 }
9550 break
9551 }
9552
9553
9554 for {
9555 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
9556 if v_0.Op != OpConst8 {
9557 continue
9558 }
9559 c := auxIntToInt8(v_0.AuxInt)
9560 if v_1.Op != OpConst8 {
9561 continue
9562 }
9563 d := auxIntToInt8(v_1.AuxInt)
9564 v.reset(OpConstBool)
9565 v.AuxInt = boolToAuxInt(c == d)
9566 return true
9567 }
9568 break
9569 }
9570
9571
9572
9573 for {
9574 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
9575 if v_0.Op != OpMod8u {
9576 continue
9577 }
9578 _ = v_0.Args[1]
9579 x := v_0.Args[0]
9580 v_0_1 := v_0.Args[1]
9581 if v_0_1.Op != OpConst8 {
9582 continue
9583 }
9584 c := auxIntToInt8(v_0_1.AuxInt)
9585 if v_1.Op != OpConst8 || auxIntToInt8(v_1.AuxInt) != 0 || !(x.Op != OpConst8 && udivisibleOK8(c) && !hasSmallRotate(config)) {
9586 continue
9587 }
9588 v.reset(OpEq32)
9589 v0 := b.NewValue0(v.Pos, OpMod32u, typ.UInt32)
9590 v1 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
9591 v1.AddArg(x)
9592 v2 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
9593 v2.AuxInt = int32ToAuxInt(int32(uint8(c)))
9594 v0.AddArg2(v1, v2)
9595 v3 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
9596 v3.AuxInt = int32ToAuxInt(0)
9597 v.AddArg2(v0, v3)
9598 return true
9599 }
9600 break
9601 }
9602
9603
9604
9605 for {
9606 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
9607 if v_0.Op != OpMod8 {
9608 continue
9609 }
9610 _ = v_0.Args[1]
9611 x := v_0.Args[0]
9612 v_0_1 := v_0.Args[1]
9613 if v_0_1.Op != OpConst8 {
9614 continue
9615 }
9616 c := auxIntToInt8(v_0_1.AuxInt)
9617 if v_1.Op != OpConst8 || auxIntToInt8(v_1.AuxInt) != 0 || !(x.Op != OpConst8 && sdivisibleOK8(c) && !hasSmallRotate(config)) {
9618 continue
9619 }
9620 v.reset(OpEq32)
9621 v0 := b.NewValue0(v.Pos, OpMod32, typ.Int32)
9622 v1 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
9623 v1.AddArg(x)
9624 v2 := b.NewValue0(v.Pos, OpConst32, typ.Int32)
9625 v2.AuxInt = int32ToAuxInt(int32(c))
9626 v0.AddArg2(v1, v2)
9627 v3 := b.NewValue0(v.Pos, OpConst32, typ.Int32)
9628 v3.AuxInt = int32ToAuxInt(0)
9629 v.AddArg2(v0, v3)
9630 return true
9631 }
9632 break
9633 }
9634
9635
9636
9637 for {
9638 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
9639 x := v_0
9640 if v_1.Op != OpMul8 {
9641 continue
9642 }
9643 _ = v_1.Args[1]
9644 v_1_0 := v_1.Args[0]
9645 v_1_1 := v_1.Args[1]
9646 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
9647 if v_1_0.Op != OpConst8 {
9648 continue
9649 }
9650 c := auxIntToInt8(v_1_0.AuxInt)
9651 if v_1_1.Op != OpTrunc32to8 {
9652 continue
9653 }
9654 v_1_1_0 := v_1_1.Args[0]
9655 if v_1_1_0.Op != OpRsh32Ux64 {
9656 continue
9657 }
9658 _ = v_1_1_0.Args[1]
9659 mul := v_1_1_0.Args[0]
9660 if mul.Op != OpMul32 {
9661 continue
9662 }
9663 _ = mul.Args[1]
9664 mul_0 := mul.Args[0]
9665 mul_1 := mul.Args[1]
9666 for _i2 := 0; _i2 <= 1; _i2, mul_0, mul_1 = _i2+1, mul_1, mul_0 {
9667 if mul_0.Op != OpConst32 {
9668 continue
9669 }
9670 m := auxIntToInt32(mul_0.AuxInt)
9671 if mul_1.Op != OpZeroExt8to32 || x != mul_1.Args[0] {
9672 continue
9673 }
9674 v_1_1_0_1 := v_1_1_0.Args[1]
9675 if v_1_1_0_1.Op != OpConst64 {
9676 continue
9677 }
9678 s := auxIntToInt64(v_1_1_0_1.AuxInt)
9679 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)) {
9680 continue
9681 }
9682 v.reset(OpLeq8U)
9683 v0 := b.NewValue0(v.Pos, OpRotateLeft8, typ.UInt8)
9684 v1 := b.NewValue0(v.Pos, OpMul8, typ.UInt8)
9685 v2 := b.NewValue0(v.Pos, OpConst8, typ.UInt8)
9686 v2.AuxInt = int8ToAuxInt(int8(udivisible8(c).m))
9687 v1.AddArg2(v2, x)
9688 v3 := b.NewValue0(v.Pos, OpConst8, typ.UInt8)
9689 v3.AuxInt = int8ToAuxInt(int8(8 - udivisible8(c).k))
9690 v0.AddArg2(v1, v3)
9691 v4 := b.NewValue0(v.Pos, OpConst8, typ.UInt8)
9692 v4.AuxInt = int8ToAuxInt(int8(udivisible8(c).max))
9693 v.AddArg2(v0, v4)
9694 return true
9695 }
9696 }
9697 }
9698 break
9699 }
9700
9701
9702
9703 for {
9704 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
9705 x := v_0
9706 if v_1.Op != OpMul8 {
9707 continue
9708 }
9709 _ = v_1.Args[1]
9710 v_1_0 := v_1.Args[0]
9711 v_1_1 := v_1.Args[1]
9712 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
9713 if v_1_0.Op != OpConst8 {
9714 continue
9715 }
9716 c := auxIntToInt8(v_1_0.AuxInt)
9717 if v_1_1.Op != OpSub8 {
9718 continue
9719 }
9720 _ = v_1_1.Args[1]
9721 v_1_1_0 := v_1_1.Args[0]
9722 if v_1_1_0.Op != OpRsh32x64 {
9723 continue
9724 }
9725 _ = v_1_1_0.Args[1]
9726 mul := v_1_1_0.Args[0]
9727 if mul.Op != OpMul32 {
9728 continue
9729 }
9730 _ = mul.Args[1]
9731 mul_0 := mul.Args[0]
9732 mul_1 := mul.Args[1]
9733 for _i2 := 0; _i2 <= 1; _i2, mul_0, mul_1 = _i2+1, mul_1, mul_0 {
9734 if mul_0.Op != OpConst32 {
9735 continue
9736 }
9737 m := auxIntToInt32(mul_0.AuxInt)
9738 if mul_1.Op != OpSignExt8to32 || x != mul_1.Args[0] {
9739 continue
9740 }
9741 v_1_1_0_1 := v_1_1_0.Args[1]
9742 if v_1_1_0_1.Op != OpConst64 {
9743 continue
9744 }
9745 s := auxIntToInt64(v_1_1_0_1.AuxInt)
9746 v_1_1_1 := v_1_1.Args[1]
9747 if v_1_1_1.Op != OpRsh32x64 {
9748 continue
9749 }
9750 _ = v_1_1_1.Args[1]
9751 v_1_1_1_0 := v_1_1_1.Args[0]
9752 if v_1_1_1_0.Op != OpSignExt8to32 || x != v_1_1_1_0.Args[0] {
9753 continue
9754 }
9755 v_1_1_1_1 := v_1_1_1.Args[1]
9756 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)) {
9757 continue
9758 }
9759 v.reset(OpLeq8U)
9760 v0 := b.NewValue0(v.Pos, OpRotateLeft8, typ.UInt8)
9761 v1 := b.NewValue0(v.Pos, OpAdd8, typ.UInt8)
9762 v2 := b.NewValue0(v.Pos, OpMul8, typ.UInt8)
9763 v3 := b.NewValue0(v.Pos, OpConst8, typ.UInt8)
9764 v3.AuxInt = int8ToAuxInt(int8(sdivisible8(c).m))
9765 v2.AddArg2(v3, x)
9766 v4 := b.NewValue0(v.Pos, OpConst8, typ.UInt8)
9767 v4.AuxInt = int8ToAuxInt(int8(sdivisible8(c).a))
9768 v1.AddArg2(v2, v4)
9769 v5 := b.NewValue0(v.Pos, OpConst8, typ.UInt8)
9770 v5.AuxInt = int8ToAuxInt(int8(8 - sdivisible8(c).k))
9771 v0.AddArg2(v1, v5)
9772 v6 := b.NewValue0(v.Pos, OpConst8, typ.UInt8)
9773 v6.AuxInt = int8ToAuxInt(int8(sdivisible8(c).max))
9774 v.AddArg2(v0, v6)
9775 return true
9776 }
9777 }
9778 }
9779 break
9780 }
9781
9782
9783
9784 for {
9785 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
9786 n := v_0
9787 if v_1.Op != OpLsh8x64 {
9788 continue
9789 }
9790 _ = v_1.Args[1]
9791 v_1_0 := v_1.Args[0]
9792 if v_1_0.Op != OpRsh8x64 {
9793 continue
9794 }
9795 _ = v_1_0.Args[1]
9796 v_1_0_0 := v_1_0.Args[0]
9797 if v_1_0_0.Op != OpAdd8 {
9798 continue
9799 }
9800 t := v_1_0_0.Type
9801 _ = v_1_0_0.Args[1]
9802 v_1_0_0_0 := v_1_0_0.Args[0]
9803 v_1_0_0_1 := v_1_0_0.Args[1]
9804 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 {
9805 if n != v_1_0_0_0 || v_1_0_0_1.Op != OpRsh8Ux64 || v_1_0_0_1.Type != t {
9806 continue
9807 }
9808 _ = v_1_0_0_1.Args[1]
9809 v_1_0_0_1_0 := v_1_0_0_1.Args[0]
9810 if v_1_0_0_1_0.Op != OpRsh8x64 || v_1_0_0_1_0.Type != t {
9811 continue
9812 }
9813 _ = v_1_0_0_1_0.Args[1]
9814 if n != v_1_0_0_1_0.Args[0] {
9815 continue
9816 }
9817 v_1_0_0_1_0_1 := v_1_0_0_1_0.Args[1]
9818 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 {
9819 continue
9820 }
9821 v_1_0_0_1_1 := v_1_0_0_1.Args[1]
9822 if v_1_0_0_1_1.Op != OpConst64 || v_1_0_0_1_1.Type != typ.UInt64 {
9823 continue
9824 }
9825 kbar := auxIntToInt64(v_1_0_0_1_1.AuxInt)
9826 v_1_0_1 := v_1_0.Args[1]
9827 if v_1_0_1.Op != OpConst64 || v_1_0_1.Type != typ.UInt64 {
9828 continue
9829 }
9830 k := auxIntToInt64(v_1_0_1.AuxInt)
9831 v_1_1 := v_1.Args[1]
9832 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) {
9833 continue
9834 }
9835 v.reset(OpEq8)
9836 v0 := b.NewValue0(v.Pos, OpAnd8, t)
9837 v1 := b.NewValue0(v.Pos, OpConst8, t)
9838 v1.AuxInt = int8ToAuxInt(1<<uint(k) - 1)
9839 v0.AddArg2(n, v1)
9840 v2 := b.NewValue0(v.Pos, OpConst8, t)
9841 v2.AuxInt = int8ToAuxInt(0)
9842 v.AddArg2(v0, v2)
9843 return true
9844 }
9845 }
9846 break
9847 }
9848
9849
9850
9851 for {
9852 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
9853 s := v_0
9854 if s.Op != OpSub8 {
9855 continue
9856 }
9857 y := s.Args[1]
9858 x := s.Args[0]
9859 if v_1.Op != OpConst8 || auxIntToInt8(v_1.AuxInt) != 0 || !(s.Uses == 1) {
9860 continue
9861 }
9862 v.reset(OpEq8)
9863 v.AddArg2(x, y)
9864 return true
9865 }
9866 break
9867 }
9868
9869
9870
9871 for {
9872 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
9873 if v_0.Op != OpAnd8 {
9874 continue
9875 }
9876 t := v_0.Type
9877 _ = v_0.Args[1]
9878 v_0_0 := v_0.Args[0]
9879 v_0_1 := v_0.Args[1]
9880 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
9881 x := v_0_0
9882 if v_0_1.Op != OpConst8 || v_0_1.Type != t {
9883 continue
9884 }
9885 y := auxIntToInt8(v_0_1.AuxInt)
9886 if v_1.Op != OpConst8 || v_1.Type != t || auxIntToInt8(v_1.AuxInt) != y || !(oneBit8(y)) {
9887 continue
9888 }
9889 v.reset(OpNeq8)
9890 v0 := b.NewValue0(v.Pos, OpAnd8, t)
9891 v1 := b.NewValue0(v.Pos, OpConst8, t)
9892 v1.AuxInt = int8ToAuxInt(y)
9893 v0.AddArg2(x, v1)
9894 v2 := b.NewValue0(v.Pos, OpConst8, t)
9895 v2.AuxInt = int8ToAuxInt(0)
9896 v.AddArg2(v0, v2)
9897 return true
9898 }
9899 }
9900 break
9901 }
9902 return false
9903 }
9904 func rewriteValuegeneric_OpEqB(v *Value) bool {
9905 v_1 := v.Args[1]
9906 v_0 := v.Args[0]
9907
9908
9909 for {
9910 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
9911 if v_0.Op != OpConstBool {
9912 continue
9913 }
9914 c := auxIntToBool(v_0.AuxInt)
9915 if v_1.Op != OpConstBool {
9916 continue
9917 }
9918 d := auxIntToBool(v_1.AuxInt)
9919 v.reset(OpConstBool)
9920 v.AuxInt = boolToAuxInt(c == d)
9921 return true
9922 }
9923 break
9924 }
9925
9926
9927 for {
9928 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
9929 if v_0.Op != OpConstBool || auxIntToBool(v_0.AuxInt) != false {
9930 continue
9931 }
9932 x := v_1
9933 v.reset(OpNot)
9934 v.AddArg(x)
9935 return true
9936 }
9937 break
9938 }
9939
9940
9941 for {
9942 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
9943 if v_0.Op != OpConstBool || auxIntToBool(v_0.AuxInt) != true {
9944 continue
9945 }
9946 x := v_1
9947 v.copyOf(x)
9948 return true
9949 }
9950 break
9951 }
9952 return false
9953 }
9954 func rewriteValuegeneric_OpEqInter(v *Value) bool {
9955 v_1 := v.Args[1]
9956 v_0 := v.Args[0]
9957 b := v.Block
9958 typ := &b.Func.Config.Types
9959
9960
9961 for {
9962 x := v_0
9963 y := v_1
9964 v.reset(OpEqPtr)
9965 v0 := b.NewValue0(v.Pos, OpITab, typ.Uintptr)
9966 v0.AddArg(x)
9967 v1 := b.NewValue0(v.Pos, OpITab, typ.Uintptr)
9968 v1.AddArg(y)
9969 v.AddArg2(v0, v1)
9970 return true
9971 }
9972 }
9973 func rewriteValuegeneric_OpEqPtr(v *Value) bool {
9974 v_1 := v.Args[1]
9975 v_0 := v.Args[0]
9976 b := v.Block
9977 typ := &b.Func.Config.Types
9978
9979
9980 for {
9981 x := v_0
9982 if x != v_1 {
9983 break
9984 }
9985 v.reset(OpConstBool)
9986 v.AuxInt = boolToAuxInt(true)
9987 return true
9988 }
9989
9990
9991 for {
9992 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
9993 if v_0.Op != OpAddr {
9994 continue
9995 }
9996 x := auxToSym(v_0.Aux)
9997 if v_1.Op != OpAddr {
9998 continue
9999 }
10000 y := auxToSym(v_1.Aux)
10001 v.reset(OpConstBool)
10002 v.AuxInt = boolToAuxInt(x == y)
10003 return true
10004 }
10005 break
10006 }
10007
10008
10009 for {
10010 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
10011 if v_0.Op != OpAddr {
10012 continue
10013 }
10014 x := auxToSym(v_0.Aux)
10015 if v_1.Op != OpOffPtr {
10016 continue
10017 }
10018 o := auxIntToInt64(v_1.AuxInt)
10019 v_1_0 := v_1.Args[0]
10020 if v_1_0.Op != OpAddr {
10021 continue
10022 }
10023 y := auxToSym(v_1_0.Aux)
10024 v.reset(OpConstBool)
10025 v.AuxInt = boolToAuxInt(x == y && o == 0)
10026 return true
10027 }
10028 break
10029 }
10030
10031
10032 for {
10033 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
10034 if v_0.Op != OpOffPtr {
10035 continue
10036 }
10037 o1 := auxIntToInt64(v_0.AuxInt)
10038 v_0_0 := v_0.Args[0]
10039 if v_0_0.Op != OpAddr {
10040 continue
10041 }
10042 x := auxToSym(v_0_0.Aux)
10043 if v_1.Op != OpOffPtr {
10044 continue
10045 }
10046 o2 := auxIntToInt64(v_1.AuxInt)
10047 v_1_0 := v_1.Args[0]
10048 if v_1_0.Op != OpAddr {
10049 continue
10050 }
10051 y := auxToSym(v_1_0.Aux)
10052 v.reset(OpConstBool)
10053 v.AuxInt = boolToAuxInt(x == y && o1 == o2)
10054 return true
10055 }
10056 break
10057 }
10058
10059
10060 for {
10061 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
10062 if v_0.Op != OpLocalAddr {
10063 continue
10064 }
10065 x := auxToSym(v_0.Aux)
10066 if v_1.Op != OpLocalAddr {
10067 continue
10068 }
10069 y := auxToSym(v_1.Aux)
10070 v.reset(OpConstBool)
10071 v.AuxInt = boolToAuxInt(x == y)
10072 return true
10073 }
10074 break
10075 }
10076
10077
10078 for {
10079 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
10080 if v_0.Op != OpLocalAddr {
10081 continue
10082 }
10083 x := auxToSym(v_0.Aux)
10084 if v_1.Op != OpOffPtr {
10085 continue
10086 }
10087 o := auxIntToInt64(v_1.AuxInt)
10088 v_1_0 := v_1.Args[0]
10089 if v_1_0.Op != OpLocalAddr {
10090 continue
10091 }
10092 y := auxToSym(v_1_0.Aux)
10093 v.reset(OpConstBool)
10094 v.AuxInt = boolToAuxInt(x == y && o == 0)
10095 return true
10096 }
10097 break
10098 }
10099
10100
10101 for {
10102 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
10103 if v_0.Op != OpOffPtr {
10104 continue
10105 }
10106 o1 := auxIntToInt64(v_0.AuxInt)
10107 v_0_0 := v_0.Args[0]
10108 if v_0_0.Op != OpLocalAddr {
10109 continue
10110 }
10111 x := auxToSym(v_0_0.Aux)
10112 if v_1.Op != OpOffPtr {
10113 continue
10114 }
10115 o2 := auxIntToInt64(v_1.AuxInt)
10116 v_1_0 := v_1.Args[0]
10117 if v_1_0.Op != OpLocalAddr {
10118 continue
10119 }
10120 y := auxToSym(v_1_0.Aux)
10121 v.reset(OpConstBool)
10122 v.AuxInt = boolToAuxInt(x == y && o1 == o2)
10123 return true
10124 }
10125 break
10126 }
10127
10128
10129
10130 for {
10131 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
10132 if v_0.Op != OpOffPtr {
10133 continue
10134 }
10135 o1 := auxIntToInt64(v_0.AuxInt)
10136 p1 := v_0.Args[0]
10137 p2 := v_1
10138 if !(isSamePtr(p1, p2)) {
10139 continue
10140 }
10141 v.reset(OpConstBool)
10142 v.AuxInt = boolToAuxInt(o1 == 0)
10143 return true
10144 }
10145 break
10146 }
10147
10148
10149
10150 for {
10151 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
10152 if v_0.Op != OpOffPtr {
10153 continue
10154 }
10155 o1 := auxIntToInt64(v_0.AuxInt)
10156 p1 := v_0.Args[0]
10157 if v_1.Op != OpOffPtr {
10158 continue
10159 }
10160 o2 := auxIntToInt64(v_1.AuxInt)
10161 p2 := v_1.Args[0]
10162 if !(isSamePtr(p1, p2)) {
10163 continue
10164 }
10165 v.reset(OpConstBool)
10166 v.AuxInt = boolToAuxInt(o1 == o2)
10167 return true
10168 }
10169 break
10170 }
10171
10172
10173 for {
10174 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
10175 if v_0.Op != OpConst32 {
10176 continue
10177 }
10178 c := auxIntToInt32(v_0.AuxInt)
10179 if v_1.Op != OpConst32 {
10180 continue
10181 }
10182 d := auxIntToInt32(v_1.AuxInt)
10183 v.reset(OpConstBool)
10184 v.AuxInt = boolToAuxInt(c == d)
10185 return true
10186 }
10187 break
10188 }
10189
10190
10191 for {
10192 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
10193 if v_0.Op != OpConst64 {
10194 continue
10195 }
10196 c := auxIntToInt64(v_0.AuxInt)
10197 if v_1.Op != OpConst64 {
10198 continue
10199 }
10200 d := auxIntToInt64(v_1.AuxInt)
10201 v.reset(OpConstBool)
10202 v.AuxInt = boolToAuxInt(c == d)
10203 return true
10204 }
10205 break
10206 }
10207
10208
10209 for {
10210 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
10211 if v_0.Op != OpConvert {
10212 continue
10213 }
10214 v_0_0 := v_0.Args[0]
10215 if v_0_0.Op != OpAddr {
10216 continue
10217 }
10218 x := auxToSym(v_0_0.Aux)
10219 if v_1.Op != OpAddr {
10220 continue
10221 }
10222 y := auxToSym(v_1.Aux)
10223 v.reset(OpConstBool)
10224 v.AuxInt = boolToAuxInt(x == y)
10225 return true
10226 }
10227 break
10228 }
10229
10230
10231 for {
10232 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
10233 if v_0.Op != OpLocalAddr || v_1.Op != OpAddr {
10234 continue
10235 }
10236 v.reset(OpConstBool)
10237 v.AuxInt = boolToAuxInt(false)
10238 return true
10239 }
10240 break
10241 }
10242
10243
10244 for {
10245 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
10246 if v_0.Op != OpOffPtr {
10247 continue
10248 }
10249 v_0_0 := v_0.Args[0]
10250 if v_0_0.Op != OpLocalAddr || v_1.Op != OpAddr {
10251 continue
10252 }
10253 v.reset(OpConstBool)
10254 v.AuxInt = boolToAuxInt(false)
10255 return true
10256 }
10257 break
10258 }
10259
10260
10261 for {
10262 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
10263 if v_0.Op != OpLocalAddr || v_1.Op != OpOffPtr {
10264 continue
10265 }
10266 v_1_0 := v_1.Args[0]
10267 if v_1_0.Op != OpAddr {
10268 continue
10269 }
10270 v.reset(OpConstBool)
10271 v.AuxInt = boolToAuxInt(false)
10272 return true
10273 }
10274 break
10275 }
10276
10277
10278 for {
10279 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
10280 if v_0.Op != OpOffPtr {
10281 continue
10282 }
10283 v_0_0 := v_0.Args[0]
10284 if v_0_0.Op != OpLocalAddr || v_1.Op != OpOffPtr {
10285 continue
10286 }
10287 v_1_0 := v_1.Args[0]
10288 if v_1_0.Op != OpAddr {
10289 continue
10290 }
10291 v.reset(OpConstBool)
10292 v.AuxInt = boolToAuxInt(false)
10293 return true
10294 }
10295 break
10296 }
10297
10298
10299
10300 for {
10301 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
10302 if v_0.Op != OpAddPtr {
10303 continue
10304 }
10305 o1 := v_0.Args[1]
10306 p1 := v_0.Args[0]
10307 p2 := v_1
10308 if !(isSamePtr(p1, p2)) {
10309 continue
10310 }
10311 v.reset(OpNot)
10312 v0 := b.NewValue0(v.Pos, OpIsNonNil, typ.Bool)
10313 v0.AddArg(o1)
10314 v.AddArg(v0)
10315 return true
10316 }
10317 break
10318 }
10319
10320
10321 for {
10322 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
10323 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
10324 continue
10325 }
10326 p := v_1
10327 v.reset(OpNot)
10328 v0 := b.NewValue0(v.Pos, OpIsNonNil, typ.Bool)
10329 v0.AddArg(p)
10330 v.AddArg(v0)
10331 return true
10332 }
10333 break
10334 }
10335
10336
10337 for {
10338 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
10339 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
10340 continue
10341 }
10342 p := v_1
10343 v.reset(OpNot)
10344 v0 := b.NewValue0(v.Pos, OpIsNonNil, typ.Bool)
10345 v0.AddArg(p)
10346 v.AddArg(v0)
10347 return true
10348 }
10349 break
10350 }
10351
10352
10353 for {
10354 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
10355 if v_0.Op != OpConstNil {
10356 continue
10357 }
10358 p := v_1
10359 v.reset(OpNot)
10360 v0 := b.NewValue0(v.Pos, OpIsNonNil, typ.Bool)
10361 v0.AddArg(p)
10362 v.AddArg(v0)
10363 return true
10364 }
10365 break
10366 }
10367 return false
10368 }
10369 func rewriteValuegeneric_OpEqSlice(v *Value) bool {
10370 v_1 := v.Args[1]
10371 v_0 := v.Args[0]
10372 b := v.Block
10373 typ := &b.Func.Config.Types
10374
10375
10376 for {
10377 x := v_0
10378 y := v_1
10379 v.reset(OpEqPtr)
10380 v0 := b.NewValue0(v.Pos, OpSlicePtr, typ.BytePtr)
10381 v0.AddArg(x)
10382 v1 := b.NewValue0(v.Pos, OpSlicePtr, typ.BytePtr)
10383 v1.AddArg(y)
10384 v.AddArg2(v0, v1)
10385 return true
10386 }
10387 }
10388 func rewriteValuegeneric_OpFloor(v *Value) bool {
10389 v_0 := v.Args[0]
10390
10391
10392 for {
10393 if v_0.Op != OpConst64F {
10394 break
10395 }
10396 c := auxIntToFloat64(v_0.AuxInt)
10397 v.reset(OpConst64F)
10398 v.AuxInt = float64ToAuxInt(math.Floor(c))
10399 return true
10400 }
10401 return false
10402 }
10403 func rewriteValuegeneric_OpIMake(v *Value) bool {
10404 v_1 := v.Args[1]
10405 v_0 := v.Args[0]
10406
10407
10408 for {
10409 _typ := v_0
10410 if v_1.Op != OpStructMake1 {
10411 break
10412 }
10413 val := v_1.Args[0]
10414 v.reset(OpIMake)
10415 v.AddArg2(_typ, val)
10416 return true
10417 }
10418
10419
10420 for {
10421 _typ := v_0
10422 if v_1.Op != OpArrayMake1 {
10423 break
10424 }
10425 val := v_1.Args[0]
10426 v.reset(OpIMake)
10427 v.AddArg2(_typ, val)
10428 return true
10429 }
10430 return false
10431 }
10432 func rewriteValuegeneric_OpInterLECall(v *Value) bool {
10433
10434
10435 for {
10436 if len(v.Args) < 1 {
10437 break
10438 }
10439 v_0 := v.Args[0]
10440 if v_0.Op != OpAddr {
10441 break
10442 }
10443 fn := auxToSym(v_0.Aux)
10444 v_0_0 := v_0.Args[0]
10445 if v_0_0.Op != OpSB {
10446 break
10447 }
10448 v.copyOf(devirtLECall(v, fn.(*obj.LSym)))
10449 return true
10450 }
10451 return false
10452 }
10453 func rewriteValuegeneric_OpIsInBounds(v *Value) bool {
10454 v_1 := v.Args[1]
10455 v_0 := v.Args[0]
10456
10457
10458
10459 for {
10460 if v_0.Op != OpZeroExt8to32 || v_1.Op != OpConst32 {
10461 break
10462 }
10463 c := auxIntToInt32(v_1.AuxInt)
10464 if !((1 << 8) <= c) {
10465 break
10466 }
10467 v.reset(OpConstBool)
10468 v.AuxInt = boolToAuxInt(true)
10469 return true
10470 }
10471
10472
10473
10474 for {
10475 if v_0.Op != OpZeroExt8to64 || v_1.Op != OpConst64 {
10476 break
10477 }
10478 c := auxIntToInt64(v_1.AuxInt)
10479 if !((1 << 8) <= c) {
10480 break
10481 }
10482 v.reset(OpConstBool)
10483 v.AuxInt = boolToAuxInt(true)
10484 return true
10485 }
10486
10487
10488
10489 for {
10490 if v_0.Op != OpZeroExt16to32 || v_1.Op != OpConst32 {
10491 break
10492 }
10493 c := auxIntToInt32(v_1.AuxInt)
10494 if !((1 << 16) <= c) {
10495 break
10496 }
10497 v.reset(OpConstBool)
10498 v.AuxInt = boolToAuxInt(true)
10499 return true
10500 }
10501
10502
10503
10504 for {
10505 if v_0.Op != OpZeroExt16to64 || v_1.Op != OpConst64 {
10506 break
10507 }
10508 c := auxIntToInt64(v_1.AuxInt)
10509 if !((1 << 16) <= c) {
10510 break
10511 }
10512 v.reset(OpConstBool)
10513 v.AuxInt = boolToAuxInt(true)
10514 return true
10515 }
10516
10517
10518 for {
10519 x := v_0
10520 if x != v_1 {
10521 break
10522 }
10523 v.reset(OpConstBool)
10524 v.AuxInt = boolToAuxInt(false)
10525 return true
10526 }
10527
10528
10529
10530 for {
10531 if v_0.Op != OpAnd8 {
10532 break
10533 }
10534 v_0_0 := v_0.Args[0]
10535 v_0_1 := v_0.Args[1]
10536 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
10537 if v_0_0.Op != OpConst8 {
10538 continue
10539 }
10540 c := auxIntToInt8(v_0_0.AuxInt)
10541 if v_1.Op != OpConst8 {
10542 continue
10543 }
10544 d := auxIntToInt8(v_1.AuxInt)
10545 if !(0 <= c && c < d) {
10546 continue
10547 }
10548 v.reset(OpConstBool)
10549 v.AuxInt = boolToAuxInt(true)
10550 return true
10551 }
10552 break
10553 }
10554
10555
10556
10557 for {
10558 if v_0.Op != OpZeroExt8to16 {
10559 break
10560 }
10561 v_0_0 := v_0.Args[0]
10562 if v_0_0.Op != OpAnd8 {
10563 break
10564 }
10565 v_0_0_0 := v_0_0.Args[0]
10566 v_0_0_1 := v_0_0.Args[1]
10567 for _i0 := 0; _i0 <= 1; _i0, v_0_0_0, v_0_0_1 = _i0+1, v_0_0_1, v_0_0_0 {
10568 if v_0_0_0.Op != OpConst8 {
10569 continue
10570 }
10571 c := auxIntToInt8(v_0_0_0.AuxInt)
10572 if v_1.Op != OpConst16 {
10573 continue
10574 }
10575 d := auxIntToInt16(v_1.AuxInt)
10576 if !(0 <= c && int16(c) < d) {
10577 continue
10578 }
10579 v.reset(OpConstBool)
10580 v.AuxInt = boolToAuxInt(true)
10581 return true
10582 }
10583 break
10584 }
10585
10586
10587
10588 for {
10589 if v_0.Op != OpZeroExt8to32 {
10590 break
10591 }
10592 v_0_0 := v_0.Args[0]
10593 if v_0_0.Op != OpAnd8 {
10594 break
10595 }
10596 v_0_0_0 := v_0_0.Args[0]
10597 v_0_0_1 := v_0_0.Args[1]
10598 for _i0 := 0; _i0 <= 1; _i0, v_0_0_0, v_0_0_1 = _i0+1, v_0_0_1, v_0_0_0 {
10599 if v_0_0_0.Op != OpConst8 {
10600 continue
10601 }
10602 c := auxIntToInt8(v_0_0_0.AuxInt)
10603 if v_1.Op != OpConst32 {
10604 continue
10605 }
10606 d := auxIntToInt32(v_1.AuxInt)
10607 if !(0 <= c && int32(c) < d) {
10608 continue
10609 }
10610 v.reset(OpConstBool)
10611 v.AuxInt = boolToAuxInt(true)
10612 return true
10613 }
10614 break
10615 }
10616
10617
10618
10619 for {
10620 if v_0.Op != OpZeroExt8to64 {
10621 break
10622 }
10623 v_0_0 := v_0.Args[0]
10624 if v_0_0.Op != OpAnd8 {
10625 break
10626 }
10627 v_0_0_0 := v_0_0.Args[0]
10628 v_0_0_1 := v_0_0.Args[1]
10629 for _i0 := 0; _i0 <= 1; _i0, v_0_0_0, v_0_0_1 = _i0+1, v_0_0_1, v_0_0_0 {
10630 if v_0_0_0.Op != OpConst8 {
10631 continue
10632 }
10633 c := auxIntToInt8(v_0_0_0.AuxInt)
10634 if v_1.Op != OpConst64 {
10635 continue
10636 }
10637 d := auxIntToInt64(v_1.AuxInt)
10638 if !(0 <= c && int64(c) < d) {
10639 continue
10640 }
10641 v.reset(OpConstBool)
10642 v.AuxInt = boolToAuxInt(true)
10643 return true
10644 }
10645 break
10646 }
10647
10648
10649
10650 for {
10651 if v_0.Op != OpAnd16 {
10652 break
10653 }
10654 v_0_0 := v_0.Args[0]
10655 v_0_1 := v_0.Args[1]
10656 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
10657 if v_0_0.Op != OpConst16 {
10658 continue
10659 }
10660 c := auxIntToInt16(v_0_0.AuxInt)
10661 if v_1.Op != OpConst16 {
10662 continue
10663 }
10664 d := auxIntToInt16(v_1.AuxInt)
10665 if !(0 <= c && c < d) {
10666 continue
10667 }
10668 v.reset(OpConstBool)
10669 v.AuxInt = boolToAuxInt(true)
10670 return true
10671 }
10672 break
10673 }
10674
10675
10676
10677 for {
10678 if v_0.Op != OpZeroExt16to32 {
10679 break
10680 }
10681 v_0_0 := v_0.Args[0]
10682 if v_0_0.Op != OpAnd16 {
10683 break
10684 }
10685 v_0_0_0 := v_0_0.Args[0]
10686 v_0_0_1 := v_0_0.Args[1]
10687 for _i0 := 0; _i0 <= 1; _i0, v_0_0_0, v_0_0_1 = _i0+1, v_0_0_1, v_0_0_0 {
10688 if v_0_0_0.Op != OpConst16 {
10689 continue
10690 }
10691 c := auxIntToInt16(v_0_0_0.AuxInt)
10692 if v_1.Op != OpConst32 {
10693 continue
10694 }
10695 d := auxIntToInt32(v_1.AuxInt)
10696 if !(0 <= c && int32(c) < d) {
10697 continue
10698 }
10699 v.reset(OpConstBool)
10700 v.AuxInt = boolToAuxInt(true)
10701 return true
10702 }
10703 break
10704 }
10705
10706
10707
10708 for {
10709 if v_0.Op != OpZeroExt16to64 {
10710 break
10711 }
10712 v_0_0 := v_0.Args[0]
10713 if v_0_0.Op != OpAnd16 {
10714 break
10715 }
10716 v_0_0_0 := v_0_0.Args[0]
10717 v_0_0_1 := v_0_0.Args[1]
10718 for _i0 := 0; _i0 <= 1; _i0, v_0_0_0, v_0_0_1 = _i0+1, v_0_0_1, v_0_0_0 {
10719 if v_0_0_0.Op != OpConst16 {
10720 continue
10721 }
10722 c := auxIntToInt16(v_0_0_0.AuxInt)
10723 if v_1.Op != OpConst64 {
10724 continue
10725 }
10726 d := auxIntToInt64(v_1.AuxInt)
10727 if !(0 <= c && int64(c) < d) {
10728 continue
10729 }
10730 v.reset(OpConstBool)
10731 v.AuxInt = boolToAuxInt(true)
10732 return true
10733 }
10734 break
10735 }
10736
10737
10738
10739 for {
10740 if v_0.Op != OpAnd32 {
10741 break
10742 }
10743 v_0_0 := v_0.Args[0]
10744 v_0_1 := v_0.Args[1]
10745 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
10746 if v_0_0.Op != OpConst32 {
10747 continue
10748 }
10749 c := auxIntToInt32(v_0_0.AuxInt)
10750 if v_1.Op != OpConst32 {
10751 continue
10752 }
10753 d := auxIntToInt32(v_1.AuxInt)
10754 if !(0 <= c && c < d) {
10755 continue
10756 }
10757 v.reset(OpConstBool)
10758 v.AuxInt = boolToAuxInt(true)
10759 return true
10760 }
10761 break
10762 }
10763
10764
10765
10766 for {
10767 if v_0.Op != OpZeroExt32to64 {
10768 break
10769 }
10770 v_0_0 := v_0.Args[0]
10771 if v_0_0.Op != OpAnd32 {
10772 break
10773 }
10774 v_0_0_0 := v_0_0.Args[0]
10775 v_0_0_1 := v_0_0.Args[1]
10776 for _i0 := 0; _i0 <= 1; _i0, v_0_0_0, v_0_0_1 = _i0+1, v_0_0_1, v_0_0_0 {
10777 if v_0_0_0.Op != OpConst32 {
10778 continue
10779 }
10780 c := auxIntToInt32(v_0_0_0.AuxInt)
10781 if v_1.Op != OpConst64 {
10782 continue
10783 }
10784 d := auxIntToInt64(v_1.AuxInt)
10785 if !(0 <= c && int64(c) < d) {
10786 continue
10787 }
10788 v.reset(OpConstBool)
10789 v.AuxInt = boolToAuxInt(true)
10790 return true
10791 }
10792 break
10793 }
10794
10795
10796
10797 for {
10798 if v_0.Op != OpAnd64 {
10799 break
10800 }
10801 v_0_0 := v_0.Args[0]
10802 v_0_1 := v_0.Args[1]
10803 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
10804 if v_0_0.Op != OpConst64 {
10805 continue
10806 }
10807 c := auxIntToInt64(v_0_0.AuxInt)
10808 if v_1.Op != OpConst64 {
10809 continue
10810 }
10811 d := auxIntToInt64(v_1.AuxInt)
10812 if !(0 <= c && c < d) {
10813 continue
10814 }
10815 v.reset(OpConstBool)
10816 v.AuxInt = boolToAuxInt(true)
10817 return true
10818 }
10819 break
10820 }
10821
10822
10823 for {
10824 if v_0.Op != OpConst32 {
10825 break
10826 }
10827 c := auxIntToInt32(v_0.AuxInt)
10828 if v_1.Op != OpConst32 {
10829 break
10830 }
10831 d := auxIntToInt32(v_1.AuxInt)
10832 v.reset(OpConstBool)
10833 v.AuxInt = boolToAuxInt(0 <= c && c < d)
10834 return true
10835 }
10836
10837
10838 for {
10839 if v_0.Op != OpConst64 {
10840 break
10841 }
10842 c := auxIntToInt64(v_0.AuxInt)
10843 if v_1.Op != OpConst64 {
10844 break
10845 }
10846 d := auxIntToInt64(v_1.AuxInt)
10847 v.reset(OpConstBool)
10848 v.AuxInt = boolToAuxInt(0 <= c && c < d)
10849 return true
10850 }
10851
10852
10853 for {
10854 if v_0.Op != OpMod32u {
10855 break
10856 }
10857 y := v_0.Args[1]
10858 if y != v_1 {
10859 break
10860 }
10861 v.reset(OpConstBool)
10862 v.AuxInt = boolToAuxInt(true)
10863 return true
10864 }
10865
10866
10867 for {
10868 if v_0.Op != OpMod64u {
10869 break
10870 }
10871 y := v_0.Args[1]
10872 if y != v_1 {
10873 break
10874 }
10875 v.reset(OpConstBool)
10876 v.AuxInt = boolToAuxInt(true)
10877 return true
10878 }
10879
10880
10881
10882 for {
10883 if v_0.Op != OpZeroExt8to64 {
10884 break
10885 }
10886 v_0_0 := v_0.Args[0]
10887 if v_0_0.Op != OpRsh8Ux64 {
10888 break
10889 }
10890 _ = v_0_0.Args[1]
10891 v_0_0_1 := v_0_0.Args[1]
10892 if v_0_0_1.Op != OpConst64 {
10893 break
10894 }
10895 c := auxIntToInt64(v_0_0_1.AuxInt)
10896 if v_1.Op != OpConst64 {
10897 break
10898 }
10899 d := auxIntToInt64(v_1.AuxInt)
10900 if !(0 < c && c < 8 && 1<<uint(8-c)-1 < d) {
10901 break
10902 }
10903 v.reset(OpConstBool)
10904 v.AuxInt = boolToAuxInt(true)
10905 return true
10906 }
10907
10908
10909
10910 for {
10911 if v_0.Op != OpZeroExt8to32 {
10912 break
10913 }
10914 v_0_0 := v_0.Args[0]
10915 if v_0_0.Op != OpRsh8Ux64 {
10916 break
10917 }
10918 _ = v_0_0.Args[1]
10919 v_0_0_1 := v_0_0.Args[1]
10920 if v_0_0_1.Op != OpConst64 {
10921 break
10922 }
10923 c := auxIntToInt64(v_0_0_1.AuxInt)
10924 if v_1.Op != OpConst32 {
10925 break
10926 }
10927 d := auxIntToInt32(v_1.AuxInt)
10928 if !(0 < c && c < 8 && 1<<uint(8-c)-1 < d) {
10929 break
10930 }
10931 v.reset(OpConstBool)
10932 v.AuxInt = boolToAuxInt(true)
10933 return true
10934 }
10935
10936
10937
10938 for {
10939 if v_0.Op != OpZeroExt8to16 {
10940 break
10941 }
10942 v_0_0 := v_0.Args[0]
10943 if v_0_0.Op != OpRsh8Ux64 {
10944 break
10945 }
10946 _ = v_0_0.Args[1]
10947 v_0_0_1 := v_0_0.Args[1]
10948 if v_0_0_1.Op != OpConst64 {
10949 break
10950 }
10951 c := auxIntToInt64(v_0_0_1.AuxInt)
10952 if v_1.Op != OpConst16 {
10953 break
10954 }
10955 d := auxIntToInt16(v_1.AuxInt)
10956 if !(0 < c && c < 8 && 1<<uint(8-c)-1 < d) {
10957 break
10958 }
10959 v.reset(OpConstBool)
10960 v.AuxInt = boolToAuxInt(true)
10961 return true
10962 }
10963
10964
10965
10966 for {
10967 if v_0.Op != OpRsh8Ux64 {
10968 break
10969 }
10970 _ = v_0.Args[1]
10971 v_0_1 := v_0.Args[1]
10972 if v_0_1.Op != OpConst64 {
10973 break
10974 }
10975 c := auxIntToInt64(v_0_1.AuxInt)
10976 if v_1.Op != OpConst64 {
10977 break
10978 }
10979 d := auxIntToInt64(v_1.AuxInt)
10980 if !(0 < c && c < 8 && 1<<uint(8-c)-1 < d) {
10981 break
10982 }
10983 v.reset(OpConstBool)
10984 v.AuxInt = boolToAuxInt(true)
10985 return true
10986 }
10987
10988
10989
10990 for {
10991 if v_0.Op != OpZeroExt16to64 {
10992 break
10993 }
10994 v_0_0 := v_0.Args[0]
10995 if v_0_0.Op != OpRsh16Ux64 {
10996 break
10997 }
10998 _ = v_0_0.Args[1]
10999 v_0_0_1 := v_0_0.Args[1]
11000 if v_0_0_1.Op != OpConst64 {
11001 break
11002 }
11003 c := auxIntToInt64(v_0_0_1.AuxInt)
11004 if v_1.Op != OpConst64 {
11005 break
11006 }
11007 d := auxIntToInt64(v_1.AuxInt)
11008 if !(0 < c && c < 16 && 1<<uint(16-c)-1 < d) {
11009 break
11010 }
11011 v.reset(OpConstBool)
11012 v.AuxInt = boolToAuxInt(true)
11013 return true
11014 }
11015
11016
11017
11018 for {
11019 if v_0.Op != OpZeroExt16to32 {
11020 break
11021 }
11022 v_0_0 := v_0.Args[0]
11023 if v_0_0.Op != OpRsh16Ux64 {
11024 break
11025 }
11026 _ = v_0_0.Args[1]
11027 v_0_0_1 := v_0_0.Args[1]
11028 if v_0_0_1.Op != OpConst64 {
11029 break
11030 }
11031 c := auxIntToInt64(v_0_0_1.AuxInt)
11032 if v_1.Op != OpConst64 {
11033 break
11034 }
11035 d := auxIntToInt64(v_1.AuxInt)
11036 if !(0 < c && c < 16 && 1<<uint(16-c)-1 < d) {
11037 break
11038 }
11039 v.reset(OpConstBool)
11040 v.AuxInt = boolToAuxInt(true)
11041 return true
11042 }
11043
11044
11045
11046 for {
11047 if v_0.Op != OpRsh16Ux64 {
11048 break
11049 }
11050 _ = v_0.Args[1]
11051 v_0_1 := v_0.Args[1]
11052 if v_0_1.Op != OpConst64 {
11053 break
11054 }
11055 c := auxIntToInt64(v_0_1.AuxInt)
11056 if v_1.Op != OpConst64 {
11057 break
11058 }
11059 d := auxIntToInt64(v_1.AuxInt)
11060 if !(0 < c && c < 16 && 1<<uint(16-c)-1 < d) {
11061 break
11062 }
11063 v.reset(OpConstBool)
11064 v.AuxInt = boolToAuxInt(true)
11065 return true
11066 }
11067
11068
11069
11070 for {
11071 if v_0.Op != OpZeroExt32to64 {
11072 break
11073 }
11074 v_0_0 := v_0.Args[0]
11075 if v_0_0.Op != OpRsh32Ux64 {
11076 break
11077 }
11078 _ = v_0_0.Args[1]
11079 v_0_0_1 := v_0_0.Args[1]
11080 if v_0_0_1.Op != OpConst64 {
11081 break
11082 }
11083 c := auxIntToInt64(v_0_0_1.AuxInt)
11084 if v_1.Op != OpConst64 {
11085 break
11086 }
11087 d := auxIntToInt64(v_1.AuxInt)
11088 if !(0 < c && c < 32 && 1<<uint(32-c)-1 < d) {
11089 break
11090 }
11091 v.reset(OpConstBool)
11092 v.AuxInt = boolToAuxInt(true)
11093 return true
11094 }
11095
11096
11097
11098 for {
11099 if v_0.Op != OpRsh32Ux64 {
11100 break
11101 }
11102 _ = v_0.Args[1]
11103 v_0_1 := v_0.Args[1]
11104 if v_0_1.Op != OpConst64 {
11105 break
11106 }
11107 c := auxIntToInt64(v_0_1.AuxInt)
11108 if v_1.Op != OpConst64 {
11109 break
11110 }
11111 d := auxIntToInt64(v_1.AuxInt)
11112 if !(0 < c && c < 32 && 1<<uint(32-c)-1 < d) {
11113 break
11114 }
11115 v.reset(OpConstBool)
11116 v.AuxInt = boolToAuxInt(true)
11117 return true
11118 }
11119
11120
11121
11122 for {
11123 if v_0.Op != OpRsh64Ux64 {
11124 break
11125 }
11126 _ = v_0.Args[1]
11127 v_0_1 := v_0.Args[1]
11128 if v_0_1.Op != OpConst64 {
11129 break
11130 }
11131 c := auxIntToInt64(v_0_1.AuxInt)
11132 if v_1.Op != OpConst64 {
11133 break
11134 }
11135 d := auxIntToInt64(v_1.AuxInt)
11136 if !(0 < c && c < 64 && 1<<uint(64-c)-1 < d) {
11137 break
11138 }
11139 v.reset(OpConstBool)
11140 v.AuxInt = boolToAuxInt(true)
11141 return true
11142 }
11143 return false
11144 }
11145 func rewriteValuegeneric_OpIsNonNil(v *Value) bool {
11146 v_0 := v.Args[0]
11147
11148
11149 for {
11150 if v_0.Op != OpConstNil {
11151 break
11152 }
11153 v.reset(OpConstBool)
11154 v.AuxInt = boolToAuxInt(false)
11155 return true
11156 }
11157
11158
11159 for {
11160 if v_0.Op != OpConst32 {
11161 break
11162 }
11163 c := auxIntToInt32(v_0.AuxInt)
11164 v.reset(OpConstBool)
11165 v.AuxInt = boolToAuxInt(c != 0)
11166 return true
11167 }
11168
11169
11170 for {
11171 if v_0.Op != OpConst64 {
11172 break
11173 }
11174 c := auxIntToInt64(v_0.AuxInt)
11175 v.reset(OpConstBool)
11176 v.AuxInt = boolToAuxInt(c != 0)
11177 return true
11178 }
11179
11180
11181 for {
11182 if v_0.Op != OpAddr {
11183 break
11184 }
11185 v.reset(OpConstBool)
11186 v.AuxInt = boolToAuxInt(true)
11187 return true
11188 }
11189
11190
11191 for {
11192 if v_0.Op != OpConvert {
11193 break
11194 }
11195 v_0_0 := v_0.Args[0]
11196 if v_0_0.Op != OpAddr {
11197 break
11198 }
11199 v.reset(OpConstBool)
11200 v.AuxInt = boolToAuxInt(true)
11201 return true
11202 }
11203
11204
11205 for {
11206 if v_0.Op != OpLocalAddr {
11207 break
11208 }
11209 v.reset(OpConstBool)
11210 v.AuxInt = boolToAuxInt(true)
11211 return true
11212 }
11213 return false
11214 }
11215 func rewriteValuegeneric_OpIsSliceInBounds(v *Value) bool {
11216 v_1 := v.Args[1]
11217 v_0 := v.Args[0]
11218
11219
11220 for {
11221 x := v_0
11222 if x != v_1 {
11223 break
11224 }
11225 v.reset(OpConstBool)
11226 v.AuxInt = boolToAuxInt(true)
11227 return true
11228 }
11229
11230
11231
11232 for {
11233 if v_0.Op != OpAnd32 {
11234 break
11235 }
11236 v_0_0 := v_0.Args[0]
11237 v_0_1 := v_0.Args[1]
11238 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
11239 if v_0_0.Op != OpConst32 {
11240 continue
11241 }
11242 c := auxIntToInt32(v_0_0.AuxInt)
11243 if v_1.Op != OpConst32 {
11244 continue
11245 }
11246 d := auxIntToInt32(v_1.AuxInt)
11247 if !(0 <= c && c <= d) {
11248 continue
11249 }
11250 v.reset(OpConstBool)
11251 v.AuxInt = boolToAuxInt(true)
11252 return true
11253 }
11254 break
11255 }
11256
11257
11258
11259 for {
11260 if v_0.Op != OpAnd64 {
11261 break
11262 }
11263 v_0_0 := v_0.Args[0]
11264 v_0_1 := v_0.Args[1]
11265 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
11266 if v_0_0.Op != OpConst64 {
11267 continue
11268 }
11269 c := auxIntToInt64(v_0_0.AuxInt)
11270 if v_1.Op != OpConst64 {
11271 continue
11272 }
11273 d := auxIntToInt64(v_1.AuxInt)
11274 if !(0 <= c && c <= d) {
11275 continue
11276 }
11277 v.reset(OpConstBool)
11278 v.AuxInt = boolToAuxInt(true)
11279 return true
11280 }
11281 break
11282 }
11283
11284
11285 for {
11286 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
11287 break
11288 }
11289 v.reset(OpConstBool)
11290 v.AuxInt = boolToAuxInt(true)
11291 return true
11292 }
11293
11294
11295 for {
11296 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
11297 break
11298 }
11299 v.reset(OpConstBool)
11300 v.AuxInt = boolToAuxInt(true)
11301 return true
11302 }
11303
11304
11305 for {
11306 if v_0.Op != OpConst32 {
11307 break
11308 }
11309 c := auxIntToInt32(v_0.AuxInt)
11310 if v_1.Op != OpConst32 {
11311 break
11312 }
11313 d := auxIntToInt32(v_1.AuxInt)
11314 v.reset(OpConstBool)
11315 v.AuxInt = boolToAuxInt(0 <= c && c <= d)
11316 return true
11317 }
11318
11319
11320 for {
11321 if v_0.Op != OpConst64 {
11322 break
11323 }
11324 c := auxIntToInt64(v_0.AuxInt)
11325 if v_1.Op != OpConst64 {
11326 break
11327 }
11328 d := auxIntToInt64(v_1.AuxInt)
11329 v.reset(OpConstBool)
11330 v.AuxInt = boolToAuxInt(0 <= c && c <= d)
11331 return true
11332 }
11333
11334
11335 for {
11336 if v_0.Op != OpSliceLen {
11337 break
11338 }
11339 x := v_0.Args[0]
11340 if v_1.Op != OpSliceCap || x != v_1.Args[0] {
11341 break
11342 }
11343 v.reset(OpConstBool)
11344 v.AuxInt = boolToAuxInt(true)
11345 return true
11346 }
11347 return false
11348 }
11349 func rewriteValuegeneric_OpLeq16(v *Value) bool {
11350 v_1 := v.Args[1]
11351 v_0 := v.Args[0]
11352 b := v.Block
11353
11354
11355 for {
11356 if v_0.Op != OpConst16 {
11357 break
11358 }
11359 c := auxIntToInt16(v_0.AuxInt)
11360 if v_1.Op != OpConst16 {
11361 break
11362 }
11363 d := auxIntToInt16(v_1.AuxInt)
11364 v.reset(OpConstBool)
11365 v.AuxInt = boolToAuxInt(c <= d)
11366 return true
11367 }
11368
11369
11370
11371 for {
11372 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 || v_1.Op != OpAnd16 {
11373 break
11374 }
11375 _ = v_1.Args[1]
11376 v_1_0 := v_1.Args[0]
11377 v_1_1 := v_1.Args[1]
11378 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
11379 if v_1_1.Op != OpConst16 {
11380 continue
11381 }
11382 c := auxIntToInt16(v_1_1.AuxInt)
11383 if !(c >= 0) {
11384 continue
11385 }
11386 v.reset(OpConstBool)
11387 v.AuxInt = boolToAuxInt(true)
11388 return true
11389 }
11390 break
11391 }
11392
11393
11394
11395 for {
11396 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 || v_1.Op != OpRsh16Ux64 {
11397 break
11398 }
11399 _ = v_1.Args[1]
11400 v_1_1 := v_1.Args[1]
11401 if v_1_1.Op != OpConst64 {
11402 break
11403 }
11404 c := auxIntToInt64(v_1_1.AuxInt)
11405 if !(c > 0) {
11406 break
11407 }
11408 v.reset(OpConstBool)
11409 v.AuxInt = boolToAuxInt(true)
11410 return true
11411 }
11412
11413
11414 for {
11415 x := v_0
11416 if v_1.Op != OpConst16 {
11417 break
11418 }
11419 t := v_1.Type
11420 if auxIntToInt16(v_1.AuxInt) != -1 {
11421 break
11422 }
11423 v.reset(OpLess16)
11424 v0 := b.NewValue0(v.Pos, OpConst16, t)
11425 v0.AuxInt = int16ToAuxInt(0)
11426 v.AddArg2(x, v0)
11427 return true
11428 }
11429
11430
11431 for {
11432 if v_0.Op != OpConst16 {
11433 break
11434 }
11435 t := v_0.Type
11436 if auxIntToInt16(v_0.AuxInt) != 1 {
11437 break
11438 }
11439 x := v_1
11440 v.reset(OpLess16)
11441 v0 := b.NewValue0(v.Pos, OpConst16, t)
11442 v0.AuxInt = int16ToAuxInt(0)
11443 v.AddArg2(v0, x)
11444 return true
11445 }
11446 return false
11447 }
11448 func rewriteValuegeneric_OpLeq16U(v *Value) bool {
11449 v_1 := v.Args[1]
11450 v_0 := v.Args[0]
11451 b := v.Block
11452
11453
11454 for {
11455 if v_0.Op != OpConst16 {
11456 break
11457 }
11458 c := auxIntToInt16(v_0.AuxInt)
11459 if v_1.Op != OpConst16 {
11460 break
11461 }
11462 d := auxIntToInt16(v_1.AuxInt)
11463 v.reset(OpConstBool)
11464 v.AuxInt = boolToAuxInt(uint16(c) <= uint16(d))
11465 return true
11466 }
11467
11468
11469 for {
11470 if v_0.Op != OpConst16 {
11471 break
11472 }
11473 t := v_0.Type
11474 if auxIntToInt16(v_0.AuxInt) != 1 {
11475 break
11476 }
11477 x := v_1
11478 v.reset(OpNeq16)
11479 v0 := b.NewValue0(v.Pos, OpConst16, t)
11480 v0.AuxInt = int16ToAuxInt(0)
11481 v.AddArg2(v0, x)
11482 return true
11483 }
11484
11485
11486 for {
11487 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 {
11488 break
11489 }
11490 v.reset(OpConstBool)
11491 v.AuxInt = boolToAuxInt(true)
11492 return true
11493 }
11494 return false
11495 }
11496 func rewriteValuegeneric_OpLeq32(v *Value) bool {
11497 v_1 := v.Args[1]
11498 v_0 := v.Args[0]
11499 b := v.Block
11500
11501
11502 for {
11503 if v_0.Op != OpConst32 {
11504 break
11505 }
11506 c := auxIntToInt32(v_0.AuxInt)
11507 if v_1.Op != OpConst32 {
11508 break
11509 }
11510 d := auxIntToInt32(v_1.AuxInt)
11511 v.reset(OpConstBool)
11512 v.AuxInt = boolToAuxInt(c <= d)
11513 return true
11514 }
11515
11516
11517
11518 for {
11519 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 || v_1.Op != OpAnd32 {
11520 break
11521 }
11522 _ = v_1.Args[1]
11523 v_1_0 := v_1.Args[0]
11524 v_1_1 := v_1.Args[1]
11525 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
11526 if v_1_1.Op != OpConst32 {
11527 continue
11528 }
11529 c := auxIntToInt32(v_1_1.AuxInt)
11530 if !(c >= 0) {
11531 continue
11532 }
11533 v.reset(OpConstBool)
11534 v.AuxInt = boolToAuxInt(true)
11535 return true
11536 }
11537 break
11538 }
11539
11540
11541
11542 for {
11543 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 || v_1.Op != OpRsh32Ux64 {
11544 break
11545 }
11546 _ = v_1.Args[1]
11547 v_1_1 := v_1.Args[1]
11548 if v_1_1.Op != OpConst64 {
11549 break
11550 }
11551 c := auxIntToInt64(v_1_1.AuxInt)
11552 if !(c > 0) {
11553 break
11554 }
11555 v.reset(OpConstBool)
11556 v.AuxInt = boolToAuxInt(true)
11557 return true
11558 }
11559
11560
11561 for {
11562 x := v_0
11563 if v_1.Op != OpConst32 {
11564 break
11565 }
11566 t := v_1.Type
11567 if auxIntToInt32(v_1.AuxInt) != -1 {
11568 break
11569 }
11570 v.reset(OpLess32)
11571 v0 := b.NewValue0(v.Pos, OpConst32, t)
11572 v0.AuxInt = int32ToAuxInt(0)
11573 v.AddArg2(x, v0)
11574 return true
11575 }
11576
11577
11578 for {
11579 if v_0.Op != OpConst32 {
11580 break
11581 }
11582 t := v_0.Type
11583 if auxIntToInt32(v_0.AuxInt) != 1 {
11584 break
11585 }
11586 x := v_1
11587 v.reset(OpLess32)
11588 v0 := b.NewValue0(v.Pos, OpConst32, t)
11589 v0.AuxInt = int32ToAuxInt(0)
11590 v.AddArg2(v0, x)
11591 return true
11592 }
11593 return false
11594 }
11595 func rewriteValuegeneric_OpLeq32F(v *Value) bool {
11596 v_1 := v.Args[1]
11597 v_0 := v.Args[0]
11598
11599
11600 for {
11601 if v_0.Op != OpConst32F {
11602 break
11603 }
11604 c := auxIntToFloat32(v_0.AuxInt)
11605 if v_1.Op != OpConst32F {
11606 break
11607 }
11608 d := auxIntToFloat32(v_1.AuxInt)
11609 v.reset(OpConstBool)
11610 v.AuxInt = boolToAuxInt(c <= d)
11611 return true
11612 }
11613 return false
11614 }
11615 func rewriteValuegeneric_OpLeq32U(v *Value) bool {
11616 v_1 := v.Args[1]
11617 v_0 := v.Args[0]
11618 b := v.Block
11619
11620
11621 for {
11622 if v_0.Op != OpConst32 {
11623 break
11624 }
11625 c := auxIntToInt32(v_0.AuxInt)
11626 if v_1.Op != OpConst32 {
11627 break
11628 }
11629 d := auxIntToInt32(v_1.AuxInt)
11630 v.reset(OpConstBool)
11631 v.AuxInt = boolToAuxInt(uint32(c) <= uint32(d))
11632 return true
11633 }
11634
11635
11636 for {
11637 if v_0.Op != OpConst32 {
11638 break
11639 }
11640 t := v_0.Type
11641 if auxIntToInt32(v_0.AuxInt) != 1 {
11642 break
11643 }
11644 x := v_1
11645 v.reset(OpNeq32)
11646 v0 := b.NewValue0(v.Pos, OpConst32, t)
11647 v0.AuxInt = int32ToAuxInt(0)
11648 v.AddArg2(v0, x)
11649 return true
11650 }
11651
11652
11653 for {
11654 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
11655 break
11656 }
11657 v.reset(OpConstBool)
11658 v.AuxInt = boolToAuxInt(true)
11659 return true
11660 }
11661 return false
11662 }
11663 func rewriteValuegeneric_OpLeq64(v *Value) bool {
11664 v_1 := v.Args[1]
11665 v_0 := v.Args[0]
11666 b := v.Block
11667
11668
11669 for {
11670 if v_0.Op != OpConst64 {
11671 break
11672 }
11673 c := auxIntToInt64(v_0.AuxInt)
11674 if v_1.Op != OpConst64 {
11675 break
11676 }
11677 d := auxIntToInt64(v_1.AuxInt)
11678 v.reset(OpConstBool)
11679 v.AuxInt = boolToAuxInt(c <= d)
11680 return true
11681 }
11682
11683
11684
11685 for {
11686 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 || v_1.Op != OpAnd64 {
11687 break
11688 }
11689 _ = v_1.Args[1]
11690 v_1_0 := v_1.Args[0]
11691 v_1_1 := v_1.Args[1]
11692 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
11693 if v_1_1.Op != OpConst64 {
11694 continue
11695 }
11696 c := auxIntToInt64(v_1_1.AuxInt)
11697 if !(c >= 0) {
11698 continue
11699 }
11700 v.reset(OpConstBool)
11701 v.AuxInt = boolToAuxInt(true)
11702 return true
11703 }
11704 break
11705 }
11706
11707
11708
11709 for {
11710 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 || v_1.Op != OpRsh64Ux64 {
11711 break
11712 }
11713 _ = v_1.Args[1]
11714 v_1_1 := v_1.Args[1]
11715 if v_1_1.Op != OpConst64 {
11716 break
11717 }
11718 c := auxIntToInt64(v_1_1.AuxInt)
11719 if !(c > 0) {
11720 break
11721 }
11722 v.reset(OpConstBool)
11723 v.AuxInt = boolToAuxInt(true)
11724 return true
11725 }
11726
11727
11728 for {
11729 x := v_0
11730 if v_1.Op != OpConst64 {
11731 break
11732 }
11733 t := v_1.Type
11734 if auxIntToInt64(v_1.AuxInt) != -1 {
11735 break
11736 }
11737 v.reset(OpLess64)
11738 v0 := b.NewValue0(v.Pos, OpConst64, t)
11739 v0.AuxInt = int64ToAuxInt(0)
11740 v.AddArg2(x, v0)
11741 return true
11742 }
11743
11744
11745 for {
11746 if v_0.Op != OpConst64 {
11747 break
11748 }
11749 t := v_0.Type
11750 if auxIntToInt64(v_0.AuxInt) != 1 {
11751 break
11752 }
11753 x := v_1
11754 v.reset(OpLess64)
11755 v0 := b.NewValue0(v.Pos, OpConst64, t)
11756 v0.AuxInt = int64ToAuxInt(0)
11757 v.AddArg2(v0, x)
11758 return true
11759 }
11760 return false
11761 }
11762 func rewriteValuegeneric_OpLeq64F(v *Value) bool {
11763 v_1 := v.Args[1]
11764 v_0 := v.Args[0]
11765
11766
11767 for {
11768 if v_0.Op != OpConst64F {
11769 break
11770 }
11771 c := auxIntToFloat64(v_0.AuxInt)
11772 if v_1.Op != OpConst64F {
11773 break
11774 }
11775 d := auxIntToFloat64(v_1.AuxInt)
11776 v.reset(OpConstBool)
11777 v.AuxInt = boolToAuxInt(c <= d)
11778 return true
11779 }
11780 return false
11781 }
11782 func rewriteValuegeneric_OpLeq64U(v *Value) bool {
11783 v_1 := v.Args[1]
11784 v_0 := v.Args[0]
11785 b := v.Block
11786
11787
11788 for {
11789 if v_0.Op != OpConst64 {
11790 break
11791 }
11792 c := auxIntToInt64(v_0.AuxInt)
11793 if v_1.Op != OpConst64 {
11794 break
11795 }
11796 d := auxIntToInt64(v_1.AuxInt)
11797 v.reset(OpConstBool)
11798 v.AuxInt = boolToAuxInt(uint64(c) <= uint64(d))
11799 return true
11800 }
11801
11802
11803 for {
11804 if v_0.Op != OpConst64 {
11805 break
11806 }
11807 t := v_0.Type
11808 if auxIntToInt64(v_0.AuxInt) != 1 {
11809 break
11810 }
11811 x := v_1
11812 v.reset(OpNeq64)
11813 v0 := b.NewValue0(v.Pos, OpConst64, t)
11814 v0.AuxInt = int64ToAuxInt(0)
11815 v.AddArg2(v0, x)
11816 return true
11817 }
11818
11819
11820 for {
11821 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
11822 break
11823 }
11824 v.reset(OpConstBool)
11825 v.AuxInt = boolToAuxInt(true)
11826 return true
11827 }
11828 return false
11829 }
11830 func rewriteValuegeneric_OpLeq8(v *Value) bool {
11831 v_1 := v.Args[1]
11832 v_0 := v.Args[0]
11833 b := v.Block
11834
11835
11836 for {
11837 if v_0.Op != OpConst8 {
11838 break
11839 }
11840 c := auxIntToInt8(v_0.AuxInt)
11841 if v_1.Op != OpConst8 {
11842 break
11843 }
11844 d := auxIntToInt8(v_1.AuxInt)
11845 v.reset(OpConstBool)
11846 v.AuxInt = boolToAuxInt(c <= d)
11847 return true
11848 }
11849
11850
11851
11852 for {
11853 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 || v_1.Op != OpAnd8 {
11854 break
11855 }
11856 _ = v_1.Args[1]
11857 v_1_0 := v_1.Args[0]
11858 v_1_1 := v_1.Args[1]
11859 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
11860 if v_1_1.Op != OpConst8 {
11861 continue
11862 }
11863 c := auxIntToInt8(v_1_1.AuxInt)
11864 if !(c >= 0) {
11865 continue
11866 }
11867 v.reset(OpConstBool)
11868 v.AuxInt = boolToAuxInt(true)
11869 return true
11870 }
11871 break
11872 }
11873
11874
11875
11876 for {
11877 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 || v_1.Op != OpRsh8Ux64 {
11878 break
11879 }
11880 _ = v_1.Args[1]
11881 v_1_1 := v_1.Args[1]
11882 if v_1_1.Op != OpConst64 {
11883 break
11884 }
11885 c := auxIntToInt64(v_1_1.AuxInt)
11886 if !(c > 0) {
11887 break
11888 }
11889 v.reset(OpConstBool)
11890 v.AuxInt = boolToAuxInt(true)
11891 return true
11892 }
11893
11894
11895 for {
11896 x := v_0
11897 if v_1.Op != OpConst8 {
11898 break
11899 }
11900 t := v_1.Type
11901 if auxIntToInt8(v_1.AuxInt) != -1 {
11902 break
11903 }
11904 v.reset(OpLess8)
11905 v0 := b.NewValue0(v.Pos, OpConst8, t)
11906 v0.AuxInt = int8ToAuxInt(0)
11907 v.AddArg2(x, v0)
11908 return true
11909 }
11910
11911
11912 for {
11913 if v_0.Op != OpConst8 {
11914 break
11915 }
11916 t := v_0.Type
11917 if auxIntToInt8(v_0.AuxInt) != 1 {
11918 break
11919 }
11920 x := v_1
11921 v.reset(OpLess8)
11922 v0 := b.NewValue0(v.Pos, OpConst8, t)
11923 v0.AuxInt = int8ToAuxInt(0)
11924 v.AddArg2(v0, x)
11925 return true
11926 }
11927 return false
11928 }
11929 func rewriteValuegeneric_OpLeq8U(v *Value) bool {
11930 v_1 := v.Args[1]
11931 v_0 := v.Args[0]
11932 b := v.Block
11933
11934
11935 for {
11936 if v_0.Op != OpConst8 {
11937 break
11938 }
11939 c := auxIntToInt8(v_0.AuxInt)
11940 if v_1.Op != OpConst8 {
11941 break
11942 }
11943 d := auxIntToInt8(v_1.AuxInt)
11944 v.reset(OpConstBool)
11945 v.AuxInt = boolToAuxInt(uint8(c) <= uint8(d))
11946 return true
11947 }
11948
11949
11950 for {
11951 if v_0.Op != OpConst8 {
11952 break
11953 }
11954 t := v_0.Type
11955 if auxIntToInt8(v_0.AuxInt) != 1 {
11956 break
11957 }
11958 x := v_1
11959 v.reset(OpNeq8)
11960 v0 := b.NewValue0(v.Pos, OpConst8, t)
11961 v0.AuxInt = int8ToAuxInt(0)
11962 v.AddArg2(v0, x)
11963 return true
11964 }
11965
11966
11967 for {
11968 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 {
11969 break
11970 }
11971 v.reset(OpConstBool)
11972 v.AuxInt = boolToAuxInt(true)
11973 return true
11974 }
11975 return false
11976 }
11977 func rewriteValuegeneric_OpLess16(v *Value) bool {
11978 v_1 := v.Args[1]
11979 v_0 := v.Args[0]
11980 b := v.Block
11981
11982
11983 for {
11984 if v_0.Op != OpConst16 {
11985 break
11986 }
11987 c := auxIntToInt16(v_0.AuxInt)
11988 if v_1.Op != OpConst16 {
11989 break
11990 }
11991 d := auxIntToInt16(v_1.AuxInt)
11992 v.reset(OpConstBool)
11993 v.AuxInt = boolToAuxInt(c < d)
11994 return true
11995 }
11996
11997
11998
11999 for {
12000 if v_0.Op != OpConst16 {
12001 break
12002 }
12003 t := v_0.Type
12004 if auxIntToInt16(v_0.AuxInt) != 0 {
12005 break
12006 }
12007 x := v_1
12008 if !(isNonNegative(x)) {
12009 break
12010 }
12011 v.reset(OpNeq16)
12012 v0 := b.NewValue0(v.Pos, OpConst16, t)
12013 v0.AuxInt = int16ToAuxInt(0)
12014 v.AddArg2(v0, x)
12015 return true
12016 }
12017
12018
12019
12020 for {
12021 x := v_0
12022 if v_1.Op != OpConst16 {
12023 break
12024 }
12025 t := v_1.Type
12026 if auxIntToInt16(v_1.AuxInt) != 1 || !(isNonNegative(x)) {
12027 break
12028 }
12029 v.reset(OpEq16)
12030 v0 := b.NewValue0(v.Pos, OpConst16, t)
12031 v0.AuxInt = int16ToAuxInt(0)
12032 v.AddArg2(v0, x)
12033 return true
12034 }
12035
12036
12037 for {
12038 x := v_0
12039 if v_1.Op != OpConst16 {
12040 break
12041 }
12042 t := v_1.Type
12043 if auxIntToInt16(v_1.AuxInt) != 1 {
12044 break
12045 }
12046 v.reset(OpLeq16)
12047 v0 := b.NewValue0(v.Pos, OpConst16, t)
12048 v0.AuxInt = int16ToAuxInt(0)
12049 v.AddArg2(x, v0)
12050 return true
12051 }
12052
12053
12054 for {
12055 if v_0.Op != OpConst16 {
12056 break
12057 }
12058 t := v_0.Type
12059 if auxIntToInt16(v_0.AuxInt) != -1 {
12060 break
12061 }
12062 x := v_1
12063 v.reset(OpLeq16)
12064 v0 := b.NewValue0(v.Pos, OpConst16, t)
12065 v0.AuxInt = int16ToAuxInt(0)
12066 v.AddArg2(v0, x)
12067 return true
12068 }
12069 return false
12070 }
12071 func rewriteValuegeneric_OpLess16U(v *Value) bool {
12072 v_1 := v.Args[1]
12073 v_0 := v.Args[0]
12074 b := v.Block
12075
12076
12077 for {
12078 if v_0.Op != OpConst16 {
12079 break
12080 }
12081 c := auxIntToInt16(v_0.AuxInt)
12082 if v_1.Op != OpConst16 {
12083 break
12084 }
12085 d := auxIntToInt16(v_1.AuxInt)
12086 v.reset(OpConstBool)
12087 v.AuxInt = boolToAuxInt(uint16(c) < uint16(d))
12088 return true
12089 }
12090
12091
12092 for {
12093 x := v_0
12094 if v_1.Op != OpConst16 {
12095 break
12096 }
12097 t := v_1.Type
12098 if auxIntToInt16(v_1.AuxInt) != 1 {
12099 break
12100 }
12101 v.reset(OpEq16)
12102 v0 := b.NewValue0(v.Pos, OpConst16, t)
12103 v0.AuxInt = int16ToAuxInt(0)
12104 v.AddArg2(v0, x)
12105 return true
12106 }
12107
12108
12109 for {
12110 if v_1.Op != OpConst16 || auxIntToInt16(v_1.AuxInt) != 0 {
12111 break
12112 }
12113 v.reset(OpConstBool)
12114 v.AuxInt = boolToAuxInt(false)
12115 return true
12116 }
12117 return false
12118 }
12119 func rewriteValuegeneric_OpLess32(v *Value) bool {
12120 v_1 := v.Args[1]
12121 v_0 := v.Args[0]
12122 b := v.Block
12123
12124
12125 for {
12126 if v_0.Op != OpConst32 {
12127 break
12128 }
12129 c := auxIntToInt32(v_0.AuxInt)
12130 if v_1.Op != OpConst32 {
12131 break
12132 }
12133 d := auxIntToInt32(v_1.AuxInt)
12134 v.reset(OpConstBool)
12135 v.AuxInt = boolToAuxInt(c < d)
12136 return true
12137 }
12138
12139
12140
12141 for {
12142 if v_0.Op != OpConst32 {
12143 break
12144 }
12145 t := v_0.Type
12146 if auxIntToInt32(v_0.AuxInt) != 0 {
12147 break
12148 }
12149 x := v_1
12150 if !(isNonNegative(x)) {
12151 break
12152 }
12153 v.reset(OpNeq32)
12154 v0 := b.NewValue0(v.Pos, OpConst32, t)
12155 v0.AuxInt = int32ToAuxInt(0)
12156 v.AddArg2(v0, x)
12157 return true
12158 }
12159
12160
12161
12162 for {
12163 x := v_0
12164 if v_1.Op != OpConst32 {
12165 break
12166 }
12167 t := v_1.Type
12168 if auxIntToInt32(v_1.AuxInt) != 1 || !(isNonNegative(x)) {
12169 break
12170 }
12171 v.reset(OpEq32)
12172 v0 := b.NewValue0(v.Pos, OpConst32, t)
12173 v0.AuxInt = int32ToAuxInt(0)
12174 v.AddArg2(v0, x)
12175 return true
12176 }
12177
12178
12179 for {
12180 x := v_0
12181 if v_1.Op != OpConst32 {
12182 break
12183 }
12184 t := v_1.Type
12185 if auxIntToInt32(v_1.AuxInt) != 1 {
12186 break
12187 }
12188 v.reset(OpLeq32)
12189 v0 := b.NewValue0(v.Pos, OpConst32, t)
12190 v0.AuxInt = int32ToAuxInt(0)
12191 v.AddArg2(x, v0)
12192 return true
12193 }
12194
12195
12196 for {
12197 if v_0.Op != OpConst32 {
12198 break
12199 }
12200 t := v_0.Type
12201 if auxIntToInt32(v_0.AuxInt) != -1 {
12202 break
12203 }
12204 x := v_1
12205 v.reset(OpLeq32)
12206 v0 := b.NewValue0(v.Pos, OpConst32, t)
12207 v0.AuxInt = int32ToAuxInt(0)
12208 v.AddArg2(v0, x)
12209 return true
12210 }
12211 return false
12212 }
12213 func rewriteValuegeneric_OpLess32F(v *Value) bool {
12214 v_1 := v.Args[1]
12215 v_0 := v.Args[0]
12216
12217
12218 for {
12219 if v_0.Op != OpConst32F {
12220 break
12221 }
12222 c := auxIntToFloat32(v_0.AuxInt)
12223 if v_1.Op != OpConst32F {
12224 break
12225 }
12226 d := auxIntToFloat32(v_1.AuxInt)
12227 v.reset(OpConstBool)
12228 v.AuxInt = boolToAuxInt(c < d)
12229 return true
12230 }
12231 return false
12232 }
12233 func rewriteValuegeneric_OpLess32U(v *Value) bool {
12234 v_1 := v.Args[1]
12235 v_0 := v.Args[0]
12236 b := v.Block
12237
12238
12239 for {
12240 if v_0.Op != OpConst32 {
12241 break
12242 }
12243 c := auxIntToInt32(v_0.AuxInt)
12244 if v_1.Op != OpConst32 {
12245 break
12246 }
12247 d := auxIntToInt32(v_1.AuxInt)
12248 v.reset(OpConstBool)
12249 v.AuxInt = boolToAuxInt(uint32(c) < uint32(d))
12250 return true
12251 }
12252
12253
12254 for {
12255 x := v_0
12256 if v_1.Op != OpConst32 {
12257 break
12258 }
12259 t := v_1.Type
12260 if auxIntToInt32(v_1.AuxInt) != 1 {
12261 break
12262 }
12263 v.reset(OpEq32)
12264 v0 := b.NewValue0(v.Pos, OpConst32, t)
12265 v0.AuxInt = int32ToAuxInt(0)
12266 v.AddArg2(v0, x)
12267 return true
12268 }
12269
12270
12271 for {
12272 if v_1.Op != OpConst32 || auxIntToInt32(v_1.AuxInt) != 0 {
12273 break
12274 }
12275 v.reset(OpConstBool)
12276 v.AuxInt = boolToAuxInt(false)
12277 return true
12278 }
12279 return false
12280 }
12281 func rewriteValuegeneric_OpLess64(v *Value) bool {
12282 v_1 := v.Args[1]
12283 v_0 := v.Args[0]
12284 b := v.Block
12285
12286
12287 for {
12288 if v_0.Op != OpConst64 {
12289 break
12290 }
12291 c := auxIntToInt64(v_0.AuxInt)
12292 if v_1.Op != OpConst64 {
12293 break
12294 }
12295 d := auxIntToInt64(v_1.AuxInt)
12296 v.reset(OpConstBool)
12297 v.AuxInt = boolToAuxInt(c < d)
12298 return true
12299 }
12300
12301
12302
12303 for {
12304 if v_0.Op != OpConst64 {
12305 break
12306 }
12307 t := v_0.Type
12308 if auxIntToInt64(v_0.AuxInt) != 0 {
12309 break
12310 }
12311 x := v_1
12312 if !(isNonNegative(x)) {
12313 break
12314 }
12315 v.reset(OpNeq64)
12316 v0 := b.NewValue0(v.Pos, OpConst64, t)
12317 v0.AuxInt = int64ToAuxInt(0)
12318 v.AddArg2(v0, x)
12319 return true
12320 }
12321
12322
12323
12324 for {
12325 x := v_0
12326 if v_1.Op != OpConst64 {
12327 break
12328 }
12329 t := v_1.Type
12330 if auxIntToInt64(v_1.AuxInt) != 1 || !(isNonNegative(x)) {
12331 break
12332 }
12333 v.reset(OpEq64)
12334 v0 := b.NewValue0(v.Pos, OpConst64, t)
12335 v0.AuxInt = int64ToAuxInt(0)
12336 v.AddArg2(v0, x)
12337 return true
12338 }
12339
12340
12341 for {
12342 x := v_0
12343 if v_1.Op != OpConst64 {
12344 break
12345 }
12346 t := v_1.Type
12347 if auxIntToInt64(v_1.AuxInt) != 1 {
12348 break
12349 }
12350 v.reset(OpLeq64)
12351 v0 := b.NewValue0(v.Pos, OpConst64, t)
12352 v0.AuxInt = int64ToAuxInt(0)
12353 v.AddArg2(x, v0)
12354 return true
12355 }
12356
12357
12358 for {
12359 if v_0.Op != OpConst64 {
12360 break
12361 }
12362 t := v_0.Type
12363 if auxIntToInt64(v_0.AuxInt) != -1 {
12364 break
12365 }
12366 x := v_1
12367 v.reset(OpLeq64)
12368 v0 := b.NewValue0(v.Pos, OpConst64, t)
12369 v0.AuxInt = int64ToAuxInt(0)
12370 v.AddArg2(v0, x)
12371 return true
12372 }
12373 return false
12374 }
12375 func rewriteValuegeneric_OpLess64F(v *Value) bool {
12376 v_1 := v.Args[1]
12377 v_0 := v.Args[0]
12378
12379
12380 for {
12381 if v_0.Op != OpConst64F {
12382 break
12383 }
12384 c := auxIntToFloat64(v_0.AuxInt)
12385 if v_1.Op != OpConst64F {
12386 break
12387 }
12388 d := auxIntToFloat64(v_1.AuxInt)
12389 v.reset(OpConstBool)
12390 v.AuxInt = boolToAuxInt(c < d)
12391 return true
12392 }
12393 return false
12394 }
12395 func rewriteValuegeneric_OpLess64U(v *Value) bool {
12396 v_1 := v.Args[1]
12397 v_0 := v.Args[0]
12398 b := v.Block
12399
12400
12401 for {
12402 if v_0.Op != OpConst64 {
12403 break
12404 }
12405 c := auxIntToInt64(v_0.AuxInt)
12406 if v_1.Op != OpConst64 {
12407 break
12408 }
12409 d := auxIntToInt64(v_1.AuxInt)
12410 v.reset(OpConstBool)
12411 v.AuxInt = boolToAuxInt(uint64(c) < uint64(d))
12412 return true
12413 }
12414
12415
12416 for {
12417 x := v_0
12418 if v_1.Op != OpConst64 {
12419 break
12420 }
12421 t := v_1.Type
12422 if auxIntToInt64(v_1.AuxInt) != 1 {
12423 break
12424 }
12425 v.reset(OpEq64)
12426 v0 := b.NewValue0(v.Pos, OpConst64, t)
12427 v0.AuxInt = int64ToAuxInt(0)
12428 v.AddArg2(v0, x)
12429 return true
12430 }
12431
12432
12433 for {
12434 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 0 {
12435 break
12436 }
12437 v.reset(OpConstBool)
12438 v.AuxInt = boolToAuxInt(false)
12439 return true
12440 }
12441 return false
12442 }
12443 func rewriteValuegeneric_OpLess8(v *Value) bool {
12444 v_1 := v.Args[1]
12445 v_0 := v.Args[0]
12446 b := v.Block
12447
12448
12449 for {
12450 if v_0.Op != OpConst8 {
12451 break
12452 }
12453 c := auxIntToInt8(v_0.AuxInt)
12454 if v_1.Op != OpConst8 {
12455 break
12456 }
12457 d := auxIntToInt8(v_1.AuxInt)
12458 v.reset(OpConstBool)
12459 v.AuxInt = boolToAuxInt(c < d)
12460 return true
12461 }
12462
12463
12464
12465 for {
12466 if v_0.Op != OpConst8 {
12467 break
12468 }
12469 t := v_0.Type
12470 if auxIntToInt8(v_0.AuxInt) != 0 {
12471 break
12472 }
12473 x := v_1
12474 if !(isNonNegative(x)) {
12475 break
12476 }
12477 v.reset(OpNeq8)
12478 v0 := b.NewValue0(v.Pos, OpConst8, t)
12479 v0.AuxInt = int8ToAuxInt(0)
12480 v.AddArg2(v0, x)
12481 return true
12482 }
12483
12484
12485
12486 for {
12487 x := v_0
12488 if v_1.Op != OpConst8 {
12489 break
12490 }
12491 t := v_1.Type
12492 if auxIntToInt8(v_1.AuxInt) != 1 || !(isNonNegative(x)) {
12493 break
12494 }
12495 v.reset(OpEq8)
12496 v0 := b.NewValue0(v.Pos, OpConst8, t)
12497 v0.AuxInt = int8ToAuxInt(0)
12498 v.AddArg2(v0, x)
12499 return true
12500 }
12501
12502
12503 for {
12504 x := v_0
12505 if v_1.Op != OpConst8 {
12506 break
12507 }
12508 t := v_1.Type
12509 if auxIntToInt8(v_1.AuxInt) != 1 {
12510 break
12511 }
12512 v.reset(OpLeq8)
12513 v0 := b.NewValue0(v.Pos, OpConst8, t)
12514 v0.AuxInt = int8ToAuxInt(0)
12515 v.AddArg2(x, v0)
12516 return true
12517 }
12518
12519
12520 for {
12521 if v_0.Op != OpConst8 {
12522 break
12523 }
12524 t := v_0.Type
12525 if auxIntToInt8(v_0.AuxInt) != -1 {
12526 break
12527 }
12528 x := v_1
12529 v.reset(OpLeq8)
12530 v0 := b.NewValue0(v.Pos, OpConst8, t)
12531 v0.AuxInt = int8ToAuxInt(0)
12532 v.AddArg2(v0, x)
12533 return true
12534 }
12535 return false
12536 }
12537 func rewriteValuegeneric_OpLess8U(v *Value) bool {
12538 v_1 := v.Args[1]
12539 v_0 := v.Args[0]
12540 b := v.Block
12541
12542
12543 for {
12544 if v_0.Op != OpConst8 {
12545 break
12546 }
12547 c := auxIntToInt8(v_0.AuxInt)
12548 if v_1.Op != OpConst8 {
12549 break
12550 }
12551 d := auxIntToInt8(v_1.AuxInt)
12552 v.reset(OpConstBool)
12553 v.AuxInt = boolToAuxInt(uint8(c) < uint8(d))
12554 return true
12555 }
12556
12557
12558 for {
12559 x := v_0
12560 if v_1.Op != OpConst8 {
12561 break
12562 }
12563 t := v_1.Type
12564 if auxIntToInt8(v_1.AuxInt) != 1 {
12565 break
12566 }
12567 v.reset(OpEq8)
12568 v0 := b.NewValue0(v.Pos, OpConst8, t)
12569 v0.AuxInt = int8ToAuxInt(0)
12570 v.AddArg2(v0, x)
12571 return true
12572 }
12573
12574
12575 for {
12576 if v_1.Op != OpConst8 || auxIntToInt8(v_1.AuxInt) != 0 {
12577 break
12578 }
12579 v.reset(OpConstBool)
12580 v.AuxInt = boolToAuxInt(false)
12581 return true
12582 }
12583 return false
12584 }
12585 func rewriteValuegeneric_OpLoad(v *Value) bool {
12586 v_1 := v.Args[1]
12587 v_0 := v.Args[0]
12588 b := v.Block
12589 config := b.Func.Config
12590
12591
12592
12593 for {
12594 t1 := v.Type
12595 p1 := v_0
12596 if v_1.Op != OpStore {
12597 break
12598 }
12599 t2 := auxToType(v_1.Aux)
12600 x := v_1.Args[1]
12601 p2 := v_1.Args[0]
12602 if !(isSamePtr(p1, p2) && t1.Compare(x.Type) == types.CMPeq && t1.Size() == t2.Size()) {
12603 break
12604 }
12605 v.copyOf(x)
12606 return true
12607 }
12608
12609
12610
12611 for {
12612 t1 := v.Type
12613 p1 := v_0
12614 if v_1.Op != OpStore {
12615 break
12616 }
12617 t2 := auxToType(v_1.Aux)
12618 _ = v_1.Args[2]
12619 p2 := v_1.Args[0]
12620 v_1_2 := v_1.Args[2]
12621 if v_1_2.Op != OpStore {
12622 break
12623 }
12624 t3 := auxToType(v_1_2.Aux)
12625 x := v_1_2.Args[1]
12626 p3 := v_1_2.Args[0]
12627 if !(isSamePtr(p1, p3) && t1.Compare(x.Type) == types.CMPeq && t1.Size() == t2.Size() && disjoint(p3, t3.Size(), p2, t2.Size())) {
12628 break
12629 }
12630 v.copyOf(x)
12631 return true
12632 }
12633
12634
12635
12636 for {
12637 t1 := v.Type
12638 p1 := v_0
12639 if v_1.Op != OpStore {
12640 break
12641 }
12642 t2 := auxToType(v_1.Aux)
12643 _ = v_1.Args[2]
12644 p2 := v_1.Args[0]
12645 v_1_2 := v_1.Args[2]
12646 if v_1_2.Op != OpStore {
12647 break
12648 }
12649 t3 := auxToType(v_1_2.Aux)
12650 _ = v_1_2.Args[2]
12651 p3 := v_1_2.Args[0]
12652 v_1_2_2 := v_1_2.Args[2]
12653 if v_1_2_2.Op != OpStore {
12654 break
12655 }
12656 t4 := auxToType(v_1_2_2.Aux)
12657 x := v_1_2_2.Args[1]
12658 p4 := v_1_2_2.Args[0]
12659 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())) {
12660 break
12661 }
12662 v.copyOf(x)
12663 return true
12664 }
12665
12666
12667
12668 for {
12669 t1 := v.Type
12670 p1 := v_0
12671 if v_1.Op != OpStore {
12672 break
12673 }
12674 t2 := auxToType(v_1.Aux)
12675 _ = v_1.Args[2]
12676 p2 := v_1.Args[0]
12677 v_1_2 := v_1.Args[2]
12678 if v_1_2.Op != OpStore {
12679 break
12680 }
12681 t3 := auxToType(v_1_2.Aux)
12682 _ = v_1_2.Args[2]
12683 p3 := v_1_2.Args[0]
12684 v_1_2_2 := v_1_2.Args[2]
12685 if v_1_2_2.Op != OpStore {
12686 break
12687 }
12688 t4 := auxToType(v_1_2_2.Aux)
12689 _ = v_1_2_2.Args[2]
12690 p4 := v_1_2_2.Args[0]
12691 v_1_2_2_2 := v_1_2_2.Args[2]
12692 if v_1_2_2_2.Op != OpStore {
12693 break
12694 }
12695 t5 := auxToType(v_1_2_2_2.Aux)
12696 x := v_1_2_2_2.Args[1]
12697 p5 := v_1_2_2_2.Args[0]
12698 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())) {
12699 break
12700 }
12701 v.copyOf(x)
12702 return true
12703 }
12704
12705
12706
12707 for {
12708 t1 := v.Type
12709 p1 := v_0
12710 if v_1.Op != OpStore {
12711 break
12712 }
12713 t2 := auxToType(v_1.Aux)
12714 _ = v_1.Args[1]
12715 p2 := v_1.Args[0]
12716 v_1_1 := v_1.Args[1]
12717 if v_1_1.Op != OpConst64 {
12718 break
12719 }
12720 x := auxIntToInt64(v_1_1.AuxInt)
12721 if !(isSamePtr(p1, p2) && sizeof(t2) == 8 && is64BitFloat(t1) && !math.IsNaN(math.Float64frombits(uint64(x)))) {
12722 break
12723 }
12724 v.reset(OpConst64F)
12725 v.AuxInt = float64ToAuxInt(math.Float64frombits(uint64(x)))
12726 return true
12727 }
12728
12729
12730
12731 for {
12732 t1 := v.Type
12733 p1 := v_0
12734 if v_1.Op != OpStore {
12735 break
12736 }
12737 t2 := auxToType(v_1.Aux)
12738 _ = v_1.Args[1]
12739 p2 := v_1.Args[0]
12740 v_1_1 := v_1.Args[1]
12741 if v_1_1.Op != OpConst32 {
12742 break
12743 }
12744 x := auxIntToInt32(v_1_1.AuxInt)
12745 if !(isSamePtr(p1, p2) && sizeof(t2) == 4 && is32BitFloat(t1) && !math.IsNaN(float64(math.Float32frombits(uint32(x))))) {
12746 break
12747 }
12748 v.reset(OpConst32F)
12749 v.AuxInt = float32ToAuxInt(math.Float32frombits(uint32(x)))
12750 return true
12751 }
12752
12753
12754
12755 for {
12756 t1 := v.Type
12757 p1 := v_0
12758 if v_1.Op != OpStore {
12759 break
12760 }
12761 t2 := auxToType(v_1.Aux)
12762 _ = v_1.Args[1]
12763 p2 := v_1.Args[0]
12764 v_1_1 := v_1.Args[1]
12765 if v_1_1.Op != OpConst64F {
12766 break
12767 }
12768 x := auxIntToFloat64(v_1_1.AuxInt)
12769 if !(isSamePtr(p1, p2) && sizeof(t2) == 8 && is64BitInt(t1)) {
12770 break
12771 }
12772 v.reset(OpConst64)
12773 v.AuxInt = int64ToAuxInt(int64(math.Float64bits(x)))
12774 return true
12775 }
12776
12777
12778
12779 for {
12780 t1 := v.Type
12781 p1 := v_0
12782 if v_1.Op != OpStore {
12783 break
12784 }
12785 t2 := auxToType(v_1.Aux)
12786 _ = v_1.Args[1]
12787 p2 := v_1.Args[0]
12788 v_1_1 := v_1.Args[1]
12789 if v_1_1.Op != OpConst32F {
12790 break
12791 }
12792 x := auxIntToFloat32(v_1_1.AuxInt)
12793 if !(isSamePtr(p1, p2) && sizeof(t2) == 4 && is32BitInt(t1)) {
12794 break
12795 }
12796 v.reset(OpConst32)
12797 v.AuxInt = int32ToAuxInt(int32(math.Float32bits(x)))
12798 return true
12799 }
12800
12801
12802
12803 for {
12804 t1 := v.Type
12805 op := v_0
12806 if op.Op != OpOffPtr {
12807 break
12808 }
12809 o1 := auxIntToInt64(op.AuxInt)
12810 p1 := op.Args[0]
12811 if v_1.Op != OpStore {
12812 break
12813 }
12814 t2 := auxToType(v_1.Aux)
12815 _ = v_1.Args[2]
12816 p2 := v_1.Args[0]
12817 mem := v_1.Args[2]
12818 if mem.Op != OpZero {
12819 break
12820 }
12821 n := auxIntToInt64(mem.AuxInt)
12822 p3 := mem.Args[0]
12823 if !(o1 >= 0 && o1+t1.Size() <= n && isSamePtr(p1, p3) && CanSSA(t1) && disjoint(op, t1.Size(), p2, t2.Size())) {
12824 break
12825 }
12826 b = mem.Block
12827 v0 := b.NewValue0(v.Pos, OpLoad, t1)
12828 v.copyOf(v0)
12829 v1 := b.NewValue0(v.Pos, OpOffPtr, op.Type)
12830 v1.AuxInt = int64ToAuxInt(o1)
12831 v1.AddArg(p3)
12832 v0.AddArg2(v1, mem)
12833 return true
12834 }
12835
12836
12837
12838 for {
12839 t1 := v.Type
12840 op := v_0
12841 if op.Op != OpOffPtr {
12842 break
12843 }
12844 o1 := auxIntToInt64(op.AuxInt)
12845 p1 := op.Args[0]
12846 if v_1.Op != OpStore {
12847 break
12848 }
12849 t2 := auxToType(v_1.Aux)
12850 _ = v_1.Args[2]
12851 p2 := v_1.Args[0]
12852 v_1_2 := v_1.Args[2]
12853 if v_1_2.Op != OpStore {
12854 break
12855 }
12856 t3 := auxToType(v_1_2.Aux)
12857 _ = v_1_2.Args[2]
12858 p3 := v_1_2.Args[0]
12859 mem := v_1_2.Args[2]
12860 if mem.Op != OpZero {
12861 break
12862 }
12863 n := auxIntToInt64(mem.AuxInt)
12864 p4 := mem.Args[0]
12865 if !(o1 >= 0 && o1+t1.Size() <= n && isSamePtr(p1, p4) && CanSSA(t1) && disjoint(op, t1.Size(), p2, t2.Size()) && disjoint(op, t1.Size(), p3, t3.Size())) {
12866 break
12867 }
12868 b = mem.Block
12869 v0 := b.NewValue0(v.Pos, OpLoad, t1)
12870 v.copyOf(v0)
12871 v1 := b.NewValue0(v.Pos, OpOffPtr, op.Type)
12872 v1.AuxInt = int64ToAuxInt(o1)
12873 v1.AddArg(p4)
12874 v0.AddArg2(v1, mem)
12875 return true
12876 }
12877
12878
12879
12880 for {
12881 t1 := v.Type
12882 op := v_0
12883 if op.Op != OpOffPtr {
12884 break
12885 }
12886 o1 := auxIntToInt64(op.AuxInt)
12887 p1 := op.Args[0]
12888 if v_1.Op != OpStore {
12889 break
12890 }
12891 t2 := auxToType(v_1.Aux)
12892 _ = v_1.Args[2]
12893 p2 := v_1.Args[0]
12894 v_1_2 := v_1.Args[2]
12895 if v_1_2.Op != OpStore {
12896 break
12897 }
12898 t3 := auxToType(v_1_2.Aux)
12899 _ = v_1_2.Args[2]
12900 p3 := v_1_2.Args[0]
12901 v_1_2_2 := v_1_2.Args[2]
12902 if v_1_2_2.Op != OpStore {
12903 break
12904 }
12905 t4 := auxToType(v_1_2_2.Aux)
12906 _ = v_1_2_2.Args[2]
12907 p4 := v_1_2_2.Args[0]
12908 mem := v_1_2_2.Args[2]
12909 if mem.Op != OpZero {
12910 break
12911 }
12912 n := auxIntToInt64(mem.AuxInt)
12913 p5 := mem.Args[0]
12914 if !(o1 >= 0 && o1+t1.Size() <= n && isSamePtr(p1, p5) && CanSSA(t1) && disjoint(op, t1.Size(), p2, t2.Size()) && disjoint(op, t1.Size(), p3, t3.Size()) && disjoint(op, t1.Size(), p4, t4.Size())) {
12915 break
12916 }
12917 b = mem.Block
12918 v0 := b.NewValue0(v.Pos, OpLoad, t1)
12919 v.copyOf(v0)
12920 v1 := b.NewValue0(v.Pos, OpOffPtr, op.Type)
12921 v1.AuxInt = int64ToAuxInt(o1)
12922 v1.AddArg(p5)
12923 v0.AddArg2(v1, mem)
12924 return true
12925 }
12926
12927
12928
12929 for {
12930 t1 := v.Type
12931 op := v_0
12932 if op.Op != OpOffPtr {
12933 break
12934 }
12935 o1 := auxIntToInt64(op.AuxInt)
12936 p1 := op.Args[0]
12937 if v_1.Op != OpStore {
12938 break
12939 }
12940 t2 := auxToType(v_1.Aux)
12941 _ = v_1.Args[2]
12942 p2 := v_1.Args[0]
12943 v_1_2 := v_1.Args[2]
12944 if v_1_2.Op != OpStore {
12945 break
12946 }
12947 t3 := auxToType(v_1_2.Aux)
12948 _ = v_1_2.Args[2]
12949 p3 := v_1_2.Args[0]
12950 v_1_2_2 := v_1_2.Args[2]
12951 if v_1_2_2.Op != OpStore {
12952 break
12953 }
12954 t4 := auxToType(v_1_2_2.Aux)
12955 _ = v_1_2_2.Args[2]
12956 p4 := v_1_2_2.Args[0]
12957 v_1_2_2_2 := v_1_2_2.Args[2]
12958 if v_1_2_2_2.Op != OpStore {
12959 break
12960 }
12961 t5 := auxToType(v_1_2_2_2.Aux)
12962 _ = v_1_2_2_2.Args[2]
12963 p5 := v_1_2_2_2.Args[0]
12964 mem := v_1_2_2_2.Args[2]
12965 if mem.Op != OpZero {
12966 break
12967 }
12968 n := auxIntToInt64(mem.AuxInt)
12969 p6 := mem.Args[0]
12970 if !(o1 >= 0 && o1+t1.Size() <= n && isSamePtr(p1, p6) && CanSSA(t1) && disjoint(op, t1.Size(), p2, t2.Size()) && disjoint(op, t1.Size(), p3, t3.Size()) && disjoint(op, t1.Size(), p4, t4.Size()) && disjoint(op, t1.Size(), p5, t5.Size())) {
12971 break
12972 }
12973 b = mem.Block
12974 v0 := b.NewValue0(v.Pos, OpLoad, t1)
12975 v.copyOf(v0)
12976 v1 := b.NewValue0(v.Pos, OpOffPtr, op.Type)
12977 v1.AuxInt = int64ToAuxInt(o1)
12978 v1.AddArg(p6)
12979 v0.AddArg2(v1, mem)
12980 return true
12981 }
12982
12983
12984
12985 for {
12986 t1 := v.Type
12987 if v_0.Op != OpOffPtr {
12988 break
12989 }
12990 o := auxIntToInt64(v_0.AuxInt)
12991 p1 := v_0.Args[0]
12992 if v_1.Op != OpZero {
12993 break
12994 }
12995 n := auxIntToInt64(v_1.AuxInt)
12996 p2 := v_1.Args[0]
12997 if !(t1.IsBoolean() && isSamePtr(p1, p2) && n >= o+1) {
12998 break
12999 }
13000 v.reset(OpConstBool)
13001 v.AuxInt = boolToAuxInt(false)
13002 return true
13003 }
13004
13005
13006
13007 for {
13008 t1 := v.Type
13009 if v_0.Op != OpOffPtr {
13010 break
13011 }
13012 o := auxIntToInt64(v_0.AuxInt)
13013 p1 := v_0.Args[0]
13014 if v_1.Op != OpZero {
13015 break
13016 }
13017 n := auxIntToInt64(v_1.AuxInt)
13018 p2 := v_1.Args[0]
13019 if !(is8BitInt(t1) && isSamePtr(p1, p2) && n >= o+1) {
13020 break
13021 }
13022 v.reset(OpConst8)
13023 v.AuxInt = int8ToAuxInt(0)
13024 return true
13025 }
13026
13027
13028
13029 for {
13030 t1 := v.Type
13031 if v_0.Op != OpOffPtr {
13032 break
13033 }
13034 o := auxIntToInt64(v_0.AuxInt)
13035 p1 := v_0.Args[0]
13036 if v_1.Op != OpZero {
13037 break
13038 }
13039 n := auxIntToInt64(v_1.AuxInt)
13040 p2 := v_1.Args[0]
13041 if !(is16BitInt(t1) && isSamePtr(p1, p2) && n >= o+2) {
13042 break
13043 }
13044 v.reset(OpConst16)
13045 v.AuxInt = int16ToAuxInt(0)
13046 return true
13047 }
13048
13049
13050
13051 for {
13052 t1 := v.Type
13053 if v_0.Op != OpOffPtr {
13054 break
13055 }
13056 o := auxIntToInt64(v_0.AuxInt)
13057 p1 := v_0.Args[0]
13058 if v_1.Op != OpZero {
13059 break
13060 }
13061 n := auxIntToInt64(v_1.AuxInt)
13062 p2 := v_1.Args[0]
13063 if !(is32BitInt(t1) && isSamePtr(p1, p2) && n >= o+4) {
13064 break
13065 }
13066 v.reset(OpConst32)
13067 v.AuxInt = int32ToAuxInt(0)
13068 return true
13069 }
13070
13071
13072
13073 for {
13074 t1 := v.Type
13075 if v_0.Op != OpOffPtr {
13076 break
13077 }
13078 o := auxIntToInt64(v_0.AuxInt)
13079 p1 := v_0.Args[0]
13080 if v_1.Op != OpZero {
13081 break
13082 }
13083 n := auxIntToInt64(v_1.AuxInt)
13084 p2 := v_1.Args[0]
13085 if !(is64BitInt(t1) && isSamePtr(p1, p2) && n >= o+8) {
13086 break
13087 }
13088 v.reset(OpConst64)
13089 v.AuxInt = int64ToAuxInt(0)
13090 return true
13091 }
13092
13093
13094
13095 for {
13096 t1 := v.Type
13097 if v_0.Op != OpOffPtr {
13098 break
13099 }
13100 o := auxIntToInt64(v_0.AuxInt)
13101 p1 := v_0.Args[0]
13102 if v_1.Op != OpZero {
13103 break
13104 }
13105 n := auxIntToInt64(v_1.AuxInt)
13106 p2 := v_1.Args[0]
13107 if !(is32BitFloat(t1) && isSamePtr(p1, p2) && n >= o+4) {
13108 break
13109 }
13110 v.reset(OpConst32F)
13111 v.AuxInt = float32ToAuxInt(0)
13112 return true
13113 }
13114
13115
13116
13117 for {
13118 t1 := v.Type
13119 if v_0.Op != OpOffPtr {
13120 break
13121 }
13122 o := auxIntToInt64(v_0.AuxInt)
13123 p1 := v_0.Args[0]
13124 if v_1.Op != OpZero {
13125 break
13126 }
13127 n := auxIntToInt64(v_1.AuxInt)
13128 p2 := v_1.Args[0]
13129 if !(is64BitFloat(t1) && isSamePtr(p1, p2) && n >= o+8) {
13130 break
13131 }
13132 v.reset(OpConst64F)
13133 v.AuxInt = float64ToAuxInt(0)
13134 return true
13135 }
13136
13137
13138
13139 for {
13140 t := v.Type
13141 if !(t.IsStruct() && t.NumFields() == 0 && CanSSA(t)) {
13142 break
13143 }
13144 v.reset(OpStructMake0)
13145 return true
13146 }
13147
13148
13149
13150 for {
13151 t := v.Type
13152 ptr := v_0
13153 mem := v_1
13154 if !(t.IsStruct() && t.NumFields() == 1 && CanSSA(t)) {
13155 break
13156 }
13157 v.reset(OpStructMake1)
13158 v0 := b.NewValue0(v.Pos, OpLoad, t.FieldType(0))
13159 v1 := b.NewValue0(v.Pos, OpOffPtr, t.FieldType(0).PtrTo())
13160 v1.AuxInt = int64ToAuxInt(0)
13161 v1.AddArg(ptr)
13162 v0.AddArg2(v1, mem)
13163 v.AddArg(v0)
13164 return true
13165 }
13166
13167
13168
13169 for {
13170 t := v.Type
13171 ptr := v_0
13172 mem := v_1
13173 if !(t.IsStruct() && t.NumFields() == 2 && CanSSA(t)) {
13174 break
13175 }
13176 v.reset(OpStructMake2)
13177 v0 := b.NewValue0(v.Pos, OpLoad, t.FieldType(0))
13178 v1 := b.NewValue0(v.Pos, OpOffPtr, t.FieldType(0).PtrTo())
13179 v1.AuxInt = int64ToAuxInt(0)
13180 v1.AddArg(ptr)
13181 v0.AddArg2(v1, mem)
13182 v2 := b.NewValue0(v.Pos, OpLoad, t.FieldType(1))
13183 v3 := b.NewValue0(v.Pos, OpOffPtr, t.FieldType(1).PtrTo())
13184 v3.AuxInt = int64ToAuxInt(t.FieldOff(1))
13185 v3.AddArg(ptr)
13186 v2.AddArg2(v3, mem)
13187 v.AddArg2(v0, v2)
13188 return true
13189 }
13190
13191
13192
13193 for {
13194 t := v.Type
13195 ptr := v_0
13196 mem := v_1
13197 if !(t.IsStruct() && t.NumFields() == 3 && CanSSA(t)) {
13198 break
13199 }
13200 v.reset(OpStructMake3)
13201 v0 := b.NewValue0(v.Pos, OpLoad, t.FieldType(0))
13202 v1 := b.NewValue0(v.Pos, OpOffPtr, t.FieldType(0).PtrTo())
13203 v1.AuxInt = int64ToAuxInt(0)
13204 v1.AddArg(ptr)
13205 v0.AddArg2(v1, mem)
13206 v2 := b.NewValue0(v.Pos, OpLoad, t.FieldType(1))
13207 v3 := b.NewValue0(v.Pos, OpOffPtr, t.FieldType(1).PtrTo())
13208 v3.AuxInt = int64ToAuxInt(t.FieldOff(1))
13209 v3.AddArg(ptr)
13210 v2.AddArg2(v3, mem)
13211 v4 := b.NewValue0(v.Pos, OpLoad, t.FieldType(2))
13212 v5 := b.NewValue0(v.Pos, OpOffPtr, t.FieldType(2).PtrTo())
13213 v5.AuxInt = int64ToAuxInt(t.FieldOff(2))
13214 v5.AddArg(ptr)
13215 v4.AddArg2(v5, mem)
13216 v.AddArg3(v0, v2, v4)
13217 return true
13218 }
13219
13220
13221
13222 for {
13223 t := v.Type
13224 ptr := v_0
13225 mem := v_1
13226 if !(t.IsStruct() && t.NumFields() == 4 && CanSSA(t)) {
13227 break
13228 }
13229 v.reset(OpStructMake4)
13230 v0 := b.NewValue0(v.Pos, OpLoad, t.FieldType(0))
13231 v1 := b.NewValue0(v.Pos, OpOffPtr, t.FieldType(0).PtrTo())
13232 v1.AuxInt = int64ToAuxInt(0)
13233 v1.AddArg(ptr)
13234 v0.AddArg2(v1, mem)
13235 v2 := b.NewValue0(v.Pos, OpLoad, t.FieldType(1))
13236 v3 := b.NewValue0(v.Pos, OpOffPtr, t.FieldType(1).PtrTo())
13237 v3.AuxInt = int64ToAuxInt(t.FieldOff(1))
13238 v3.AddArg(ptr)
13239 v2.AddArg2(v3, mem)
13240 v4 := b.NewValue0(v.Pos, OpLoad, t.FieldType(2))
13241 v5 := b.NewValue0(v.Pos, OpOffPtr, t.FieldType(2).PtrTo())
13242 v5.AuxInt = int64ToAuxInt(t.FieldOff(2))
13243 v5.AddArg(ptr)
13244 v4.AddArg2(v5, mem)
13245 v6 := b.NewValue0(v.Pos, OpLoad, t.FieldType(3))
13246 v7 := b.NewValue0(v.Pos, OpOffPtr, t.FieldType(3).PtrTo())
13247 v7.AuxInt = int64ToAuxInt(t.FieldOff(3))
13248 v7.AddArg(ptr)
13249 v6.AddArg2(v7, mem)
13250 v.AddArg4(v0, v2, v4, v6)
13251 return true
13252 }
13253
13254
13255
13256 for {
13257 t := v.Type
13258 if !(t.IsArray() && t.NumElem() == 0) {
13259 break
13260 }
13261 v.reset(OpArrayMake0)
13262 return true
13263 }
13264
13265
13266
13267 for {
13268 t := v.Type
13269 ptr := v_0
13270 mem := v_1
13271 if !(t.IsArray() && t.NumElem() == 1 && CanSSA(t)) {
13272 break
13273 }
13274 v.reset(OpArrayMake1)
13275 v0 := b.NewValue0(v.Pos, OpLoad, t.Elem())
13276 v0.AddArg2(ptr, mem)
13277 v.AddArg(v0)
13278 return true
13279 }
13280
13281
13282
13283 for {
13284 t := v.Type
13285 if v_0.Op != OpOffPtr {
13286 break
13287 }
13288 off := auxIntToInt64(v_0.AuxInt)
13289 v_0_0 := v_0.Args[0]
13290 if v_0_0.Op != OpAddr {
13291 break
13292 }
13293 s := auxToSym(v_0_0.Aux)
13294 sb := v_0_0.Args[0]
13295 if !(t.IsUintptr() && isFixedSym(s, off)) {
13296 break
13297 }
13298 v.reset(OpAddr)
13299 v.Aux = symToAux(fixedSym(b.Func, s, off))
13300 v.AddArg(sb)
13301 return true
13302 }
13303
13304
13305
13306 for {
13307 t := v.Type
13308 if v_0.Op != OpOffPtr {
13309 break
13310 }
13311 off := auxIntToInt64(v_0.AuxInt)
13312 v_0_0 := v_0.Args[0]
13313 if v_0_0.Op != OpConvert {
13314 break
13315 }
13316 v_0_0_0 := v_0_0.Args[0]
13317 if v_0_0_0.Op != OpAddr {
13318 break
13319 }
13320 s := auxToSym(v_0_0_0.Aux)
13321 sb := v_0_0_0.Args[0]
13322 if !(t.IsUintptr() && isFixedSym(s, off)) {
13323 break
13324 }
13325 v.reset(OpAddr)
13326 v.Aux = symToAux(fixedSym(b.Func, s, off))
13327 v.AddArg(sb)
13328 return true
13329 }
13330
13331
13332
13333 for {
13334 t := v.Type
13335 if v_0.Op != OpOffPtr {
13336 break
13337 }
13338 off := auxIntToInt64(v_0.AuxInt)
13339 v_0_0 := v_0.Args[0]
13340 if v_0_0.Op != OpITab {
13341 break
13342 }
13343 v_0_0_0 := v_0_0.Args[0]
13344 if v_0_0_0.Op != OpIMake {
13345 break
13346 }
13347 v_0_0_0_0 := v_0_0_0.Args[0]
13348 if v_0_0_0_0.Op != OpAddr {
13349 break
13350 }
13351 s := auxToSym(v_0_0_0_0.Aux)
13352 sb := v_0_0_0_0.Args[0]
13353 if !(t.IsUintptr() && isFixedSym(s, off)) {
13354 break
13355 }
13356 v.reset(OpAddr)
13357 v.Aux = symToAux(fixedSym(b.Func, s, off))
13358 v.AddArg(sb)
13359 return true
13360 }
13361
13362
13363
13364 for {
13365 t := v.Type
13366 if v_0.Op != OpOffPtr {
13367 break
13368 }
13369 off := auxIntToInt64(v_0.AuxInt)
13370 v_0_0 := v_0.Args[0]
13371 if v_0_0.Op != OpITab {
13372 break
13373 }
13374 v_0_0_0 := v_0_0.Args[0]
13375 if v_0_0_0.Op != OpIMake {
13376 break
13377 }
13378 v_0_0_0_0 := v_0_0_0.Args[0]
13379 if v_0_0_0_0.Op != OpConvert {
13380 break
13381 }
13382 v_0_0_0_0_0 := v_0_0_0_0.Args[0]
13383 if v_0_0_0_0_0.Op != OpAddr {
13384 break
13385 }
13386 s := auxToSym(v_0_0_0_0_0.Aux)
13387 sb := v_0_0_0_0_0.Args[0]
13388 if !(t.IsUintptr() && isFixedSym(s, off)) {
13389 break
13390 }
13391 v.reset(OpAddr)
13392 v.Aux = symToAux(fixedSym(b.Func, s, off))
13393 v.AddArg(sb)
13394 return true
13395 }
13396
13397
13398
13399 for {
13400 t := v.Type
13401 if v_0.Op != OpOffPtr {
13402 break
13403 }
13404 off := auxIntToInt64(v_0.AuxInt)
13405 v_0_0 := v_0.Args[0]
13406 if v_0_0.Op != OpAddr {
13407 break
13408 }
13409 sym := auxToSym(v_0_0.Aux)
13410 if !(t.IsInteger() && t.Size() == 4 && isFixed32(config, sym, off)) {
13411 break
13412 }
13413 v.reset(OpConst32)
13414 v.AuxInt = int32ToAuxInt(fixed32(config, sym, off))
13415 return true
13416 }
13417
13418
13419
13420 for {
13421 t := v.Type
13422 if v_0.Op != OpOffPtr {
13423 break
13424 }
13425 off := auxIntToInt64(v_0.AuxInt)
13426 v_0_0 := v_0.Args[0]
13427 if v_0_0.Op != OpConvert {
13428 break
13429 }
13430 v_0_0_0 := v_0_0.Args[0]
13431 if v_0_0_0.Op != OpAddr {
13432 break
13433 }
13434 sym := auxToSym(v_0_0_0.Aux)
13435 if !(t.IsInteger() && t.Size() == 4 && isFixed32(config, sym, off)) {
13436 break
13437 }
13438 v.reset(OpConst32)
13439 v.AuxInt = int32ToAuxInt(fixed32(config, sym, off))
13440 return true
13441 }
13442
13443
13444
13445 for {
13446 t := v.Type
13447 if v_0.Op != OpOffPtr {
13448 break
13449 }
13450 off := auxIntToInt64(v_0.AuxInt)
13451 v_0_0 := v_0.Args[0]
13452 if v_0_0.Op != OpITab {
13453 break
13454 }
13455 v_0_0_0 := v_0_0.Args[0]
13456 if v_0_0_0.Op != OpIMake {
13457 break
13458 }
13459 v_0_0_0_0 := v_0_0_0.Args[0]
13460 if v_0_0_0_0.Op != OpAddr {
13461 break
13462 }
13463 sym := auxToSym(v_0_0_0_0.Aux)
13464 if !(t.IsInteger() && t.Size() == 4 && isFixed32(config, sym, off)) {
13465 break
13466 }
13467 v.reset(OpConst32)
13468 v.AuxInt = int32ToAuxInt(fixed32(config, sym, off))
13469 return true
13470 }
13471
13472
13473
13474 for {
13475 t := v.Type
13476 if v_0.Op != OpOffPtr {
13477 break
13478 }
13479 off := auxIntToInt64(v_0.AuxInt)
13480 v_0_0 := v_0.Args[0]
13481 if v_0_0.Op != OpITab {
13482 break
13483 }
13484 v_0_0_0 := v_0_0.Args[0]
13485 if v_0_0_0.Op != OpIMake {
13486 break
13487 }
13488 v_0_0_0_0 := v_0_0_0.Args[0]
13489 if v_0_0_0_0.Op != OpConvert {
13490 break
13491 }
13492 v_0_0_0_0_0 := v_0_0_0_0.Args[0]
13493 if v_0_0_0_0_0.Op != OpAddr {
13494 break
13495 }
13496 sym := auxToSym(v_0_0_0_0_0.Aux)
13497 if !(t.IsInteger() && t.Size() == 4 && isFixed32(config, sym, off)) {
13498 break
13499 }
13500 v.reset(OpConst32)
13501 v.AuxInt = int32ToAuxInt(fixed32(config, sym, off))
13502 return true
13503 }
13504 return false
13505 }
13506 func rewriteValuegeneric_OpLsh16x16(v *Value) bool {
13507 v_1 := v.Args[1]
13508 v_0 := v.Args[0]
13509 b := v.Block
13510
13511
13512 for {
13513 t := v.Type
13514 x := v_0
13515 if v_1.Op != OpConst16 {
13516 break
13517 }
13518 c := auxIntToInt16(v_1.AuxInt)
13519 v.reset(OpLsh16x64)
13520 v0 := b.NewValue0(v.Pos, OpConst64, t)
13521 v0.AuxInt = int64ToAuxInt(int64(uint16(c)))
13522 v.AddArg2(x, v0)
13523 return true
13524 }
13525
13526
13527 for {
13528 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 {
13529 break
13530 }
13531 v.reset(OpConst16)
13532 v.AuxInt = int16ToAuxInt(0)
13533 return true
13534 }
13535 return false
13536 }
13537 func rewriteValuegeneric_OpLsh16x32(v *Value) bool {
13538 v_1 := v.Args[1]
13539 v_0 := v.Args[0]
13540 b := v.Block
13541
13542
13543 for {
13544 t := v.Type
13545 x := v_0
13546 if v_1.Op != OpConst32 {
13547 break
13548 }
13549 c := auxIntToInt32(v_1.AuxInt)
13550 v.reset(OpLsh16x64)
13551 v0 := b.NewValue0(v.Pos, OpConst64, t)
13552 v0.AuxInt = int64ToAuxInt(int64(uint32(c)))
13553 v.AddArg2(x, v0)
13554 return true
13555 }
13556
13557
13558 for {
13559 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 {
13560 break
13561 }
13562 v.reset(OpConst16)
13563 v.AuxInt = int16ToAuxInt(0)
13564 return true
13565 }
13566 return false
13567 }
13568 func rewriteValuegeneric_OpLsh16x64(v *Value) bool {
13569 v_1 := v.Args[1]
13570 v_0 := v.Args[0]
13571 b := v.Block
13572 typ := &b.Func.Config.Types
13573
13574
13575 for {
13576 if v_0.Op != OpConst16 {
13577 break
13578 }
13579 c := auxIntToInt16(v_0.AuxInt)
13580 if v_1.Op != OpConst64 {
13581 break
13582 }
13583 d := auxIntToInt64(v_1.AuxInt)
13584 v.reset(OpConst16)
13585 v.AuxInt = int16ToAuxInt(c << uint64(d))
13586 return true
13587 }
13588
13589
13590 for {
13591 x := v_0
13592 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 0 {
13593 break
13594 }
13595 v.copyOf(x)
13596 return true
13597 }
13598
13599
13600 for {
13601 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 {
13602 break
13603 }
13604 v.reset(OpConst16)
13605 v.AuxInt = int16ToAuxInt(0)
13606 return true
13607 }
13608
13609
13610
13611 for {
13612 if v_1.Op != OpConst64 {
13613 break
13614 }
13615 c := auxIntToInt64(v_1.AuxInt)
13616 if !(uint64(c) >= 16) {
13617 break
13618 }
13619 v.reset(OpConst16)
13620 v.AuxInt = int16ToAuxInt(0)
13621 return true
13622 }
13623
13624
13625
13626 for {
13627 t := v.Type
13628 if v_0.Op != OpLsh16x64 {
13629 break
13630 }
13631 _ = v_0.Args[1]
13632 x := v_0.Args[0]
13633 v_0_1 := v_0.Args[1]
13634 if v_0_1.Op != OpConst64 {
13635 break
13636 }
13637 c := auxIntToInt64(v_0_1.AuxInt)
13638 if v_1.Op != OpConst64 {
13639 break
13640 }
13641 d := auxIntToInt64(v_1.AuxInt)
13642 if !(!uaddOvf(c, d)) {
13643 break
13644 }
13645 v.reset(OpLsh16x64)
13646 v0 := b.NewValue0(v.Pos, OpConst64, t)
13647 v0.AuxInt = int64ToAuxInt(c + d)
13648 v.AddArg2(x, v0)
13649 return true
13650 }
13651
13652
13653
13654 for {
13655 i := v_0
13656 if i.Op != OpRsh16x64 {
13657 break
13658 }
13659 _ = i.Args[1]
13660 x := i.Args[0]
13661 i_1 := i.Args[1]
13662 if i_1.Op != OpConst64 {
13663 break
13664 }
13665 c := auxIntToInt64(i_1.AuxInt)
13666 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != c || !(c >= 0 && c < 16 && i.Uses == 1) {
13667 break
13668 }
13669 v.reset(OpAnd16)
13670 v0 := b.NewValue0(v.Pos, OpConst16, v.Type)
13671 v0.AuxInt = int16ToAuxInt(int16(-1) << c)
13672 v.AddArg2(x, v0)
13673 return true
13674 }
13675
13676
13677
13678 for {
13679 i := v_0
13680 if i.Op != OpRsh16Ux64 {
13681 break
13682 }
13683 _ = i.Args[1]
13684 x := i.Args[0]
13685 i_1 := i.Args[1]
13686 if i_1.Op != OpConst64 {
13687 break
13688 }
13689 c := auxIntToInt64(i_1.AuxInt)
13690 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != c || !(c >= 0 && c < 16 && i.Uses == 1) {
13691 break
13692 }
13693 v.reset(OpAnd16)
13694 v0 := b.NewValue0(v.Pos, OpConst16, v.Type)
13695 v0.AuxInt = int16ToAuxInt(int16(-1) << c)
13696 v.AddArg2(x, v0)
13697 return true
13698 }
13699
13700
13701
13702 for {
13703 if v_0.Op != OpRsh16Ux64 {
13704 break
13705 }
13706 _ = v_0.Args[1]
13707 v_0_0 := v_0.Args[0]
13708 if v_0_0.Op != OpLsh16x64 {
13709 break
13710 }
13711 _ = v_0_0.Args[1]
13712 x := v_0_0.Args[0]
13713 v_0_0_1 := v_0_0.Args[1]
13714 if v_0_0_1.Op != OpConst64 {
13715 break
13716 }
13717 c1 := auxIntToInt64(v_0_0_1.AuxInt)
13718 v_0_1 := v_0.Args[1]
13719 if v_0_1.Op != OpConst64 {
13720 break
13721 }
13722 c2 := auxIntToInt64(v_0_1.AuxInt)
13723 if v_1.Op != OpConst64 {
13724 break
13725 }
13726 c3 := auxIntToInt64(v_1.AuxInt)
13727 if !(uint64(c1) >= uint64(c2) && uint64(c3) >= uint64(c2) && !uaddOvf(c1-c2, c3)) {
13728 break
13729 }
13730 v.reset(OpLsh16x64)
13731 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
13732 v0.AuxInt = int64ToAuxInt(c1 - c2 + c3)
13733 v.AddArg2(x, v0)
13734 return true
13735 }
13736 return false
13737 }
13738 func rewriteValuegeneric_OpLsh16x8(v *Value) bool {
13739 v_1 := v.Args[1]
13740 v_0 := v.Args[0]
13741 b := v.Block
13742
13743
13744 for {
13745 t := v.Type
13746 x := v_0
13747 if v_1.Op != OpConst8 {
13748 break
13749 }
13750 c := auxIntToInt8(v_1.AuxInt)
13751 v.reset(OpLsh16x64)
13752 v0 := b.NewValue0(v.Pos, OpConst64, t)
13753 v0.AuxInt = int64ToAuxInt(int64(uint8(c)))
13754 v.AddArg2(x, v0)
13755 return true
13756 }
13757
13758
13759 for {
13760 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 {
13761 break
13762 }
13763 v.reset(OpConst16)
13764 v.AuxInt = int16ToAuxInt(0)
13765 return true
13766 }
13767 return false
13768 }
13769 func rewriteValuegeneric_OpLsh32x16(v *Value) bool {
13770 v_1 := v.Args[1]
13771 v_0 := v.Args[0]
13772 b := v.Block
13773
13774
13775 for {
13776 t := v.Type
13777 x := v_0
13778 if v_1.Op != OpConst16 {
13779 break
13780 }
13781 c := auxIntToInt16(v_1.AuxInt)
13782 v.reset(OpLsh32x64)
13783 v0 := b.NewValue0(v.Pos, OpConst64, t)
13784 v0.AuxInt = int64ToAuxInt(int64(uint16(c)))
13785 v.AddArg2(x, v0)
13786 return true
13787 }
13788
13789
13790 for {
13791 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
13792 break
13793 }
13794 v.reset(OpConst32)
13795 v.AuxInt = int32ToAuxInt(0)
13796 return true
13797 }
13798 return false
13799 }
13800 func rewriteValuegeneric_OpLsh32x32(v *Value) bool {
13801 v_1 := v.Args[1]
13802 v_0 := v.Args[0]
13803 b := v.Block
13804
13805
13806 for {
13807 t := v.Type
13808 x := v_0
13809 if v_1.Op != OpConst32 {
13810 break
13811 }
13812 c := auxIntToInt32(v_1.AuxInt)
13813 v.reset(OpLsh32x64)
13814 v0 := b.NewValue0(v.Pos, OpConst64, t)
13815 v0.AuxInt = int64ToAuxInt(int64(uint32(c)))
13816 v.AddArg2(x, v0)
13817 return true
13818 }
13819
13820
13821 for {
13822 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
13823 break
13824 }
13825 v.reset(OpConst32)
13826 v.AuxInt = int32ToAuxInt(0)
13827 return true
13828 }
13829 return false
13830 }
13831 func rewriteValuegeneric_OpLsh32x64(v *Value) bool {
13832 v_1 := v.Args[1]
13833 v_0 := v.Args[0]
13834 b := v.Block
13835 typ := &b.Func.Config.Types
13836
13837
13838 for {
13839 if v_0.Op != OpConst32 {
13840 break
13841 }
13842 c := auxIntToInt32(v_0.AuxInt)
13843 if v_1.Op != OpConst64 {
13844 break
13845 }
13846 d := auxIntToInt64(v_1.AuxInt)
13847 v.reset(OpConst32)
13848 v.AuxInt = int32ToAuxInt(c << uint64(d))
13849 return true
13850 }
13851
13852
13853 for {
13854 x := v_0
13855 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 0 {
13856 break
13857 }
13858 v.copyOf(x)
13859 return true
13860 }
13861
13862
13863 for {
13864 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
13865 break
13866 }
13867 v.reset(OpConst32)
13868 v.AuxInt = int32ToAuxInt(0)
13869 return true
13870 }
13871
13872
13873
13874 for {
13875 if v_1.Op != OpConst64 {
13876 break
13877 }
13878 c := auxIntToInt64(v_1.AuxInt)
13879 if !(uint64(c) >= 32) {
13880 break
13881 }
13882 v.reset(OpConst32)
13883 v.AuxInt = int32ToAuxInt(0)
13884 return true
13885 }
13886
13887
13888
13889 for {
13890 t := v.Type
13891 if v_0.Op != OpLsh32x64 {
13892 break
13893 }
13894 _ = v_0.Args[1]
13895 x := v_0.Args[0]
13896 v_0_1 := v_0.Args[1]
13897 if v_0_1.Op != OpConst64 {
13898 break
13899 }
13900 c := auxIntToInt64(v_0_1.AuxInt)
13901 if v_1.Op != OpConst64 {
13902 break
13903 }
13904 d := auxIntToInt64(v_1.AuxInt)
13905 if !(!uaddOvf(c, d)) {
13906 break
13907 }
13908 v.reset(OpLsh32x64)
13909 v0 := b.NewValue0(v.Pos, OpConst64, t)
13910 v0.AuxInt = int64ToAuxInt(c + d)
13911 v.AddArg2(x, v0)
13912 return true
13913 }
13914
13915
13916
13917 for {
13918 i := v_0
13919 if i.Op != OpRsh32x64 {
13920 break
13921 }
13922 _ = i.Args[1]
13923 x := i.Args[0]
13924 i_1 := i.Args[1]
13925 if i_1.Op != OpConst64 {
13926 break
13927 }
13928 c := auxIntToInt64(i_1.AuxInt)
13929 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != c || !(c >= 0 && c < 32 && i.Uses == 1) {
13930 break
13931 }
13932 v.reset(OpAnd32)
13933 v0 := b.NewValue0(v.Pos, OpConst32, v.Type)
13934 v0.AuxInt = int32ToAuxInt(int32(-1) << c)
13935 v.AddArg2(x, v0)
13936 return true
13937 }
13938
13939
13940
13941 for {
13942 i := v_0
13943 if i.Op != OpRsh32Ux64 {
13944 break
13945 }
13946 _ = i.Args[1]
13947 x := i.Args[0]
13948 i_1 := i.Args[1]
13949 if i_1.Op != OpConst64 {
13950 break
13951 }
13952 c := auxIntToInt64(i_1.AuxInt)
13953 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != c || !(c >= 0 && c < 32 && i.Uses == 1) {
13954 break
13955 }
13956 v.reset(OpAnd32)
13957 v0 := b.NewValue0(v.Pos, OpConst32, v.Type)
13958 v0.AuxInt = int32ToAuxInt(int32(-1) << c)
13959 v.AddArg2(x, v0)
13960 return true
13961 }
13962
13963
13964
13965 for {
13966 if v_0.Op != OpRsh32Ux64 {
13967 break
13968 }
13969 _ = v_0.Args[1]
13970 v_0_0 := v_0.Args[0]
13971 if v_0_0.Op != OpLsh32x64 {
13972 break
13973 }
13974 _ = v_0_0.Args[1]
13975 x := v_0_0.Args[0]
13976 v_0_0_1 := v_0_0.Args[1]
13977 if v_0_0_1.Op != OpConst64 {
13978 break
13979 }
13980 c1 := auxIntToInt64(v_0_0_1.AuxInt)
13981 v_0_1 := v_0.Args[1]
13982 if v_0_1.Op != OpConst64 {
13983 break
13984 }
13985 c2 := auxIntToInt64(v_0_1.AuxInt)
13986 if v_1.Op != OpConst64 {
13987 break
13988 }
13989 c3 := auxIntToInt64(v_1.AuxInt)
13990 if !(uint64(c1) >= uint64(c2) && uint64(c3) >= uint64(c2) && !uaddOvf(c1-c2, c3)) {
13991 break
13992 }
13993 v.reset(OpLsh32x64)
13994 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
13995 v0.AuxInt = int64ToAuxInt(c1 - c2 + c3)
13996 v.AddArg2(x, v0)
13997 return true
13998 }
13999 return false
14000 }
14001 func rewriteValuegeneric_OpLsh32x8(v *Value) bool {
14002 v_1 := v.Args[1]
14003 v_0 := v.Args[0]
14004 b := v.Block
14005
14006
14007 for {
14008 t := v.Type
14009 x := v_0
14010 if v_1.Op != OpConst8 {
14011 break
14012 }
14013 c := auxIntToInt8(v_1.AuxInt)
14014 v.reset(OpLsh32x64)
14015 v0 := b.NewValue0(v.Pos, OpConst64, t)
14016 v0.AuxInt = int64ToAuxInt(int64(uint8(c)))
14017 v.AddArg2(x, v0)
14018 return true
14019 }
14020
14021
14022 for {
14023 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
14024 break
14025 }
14026 v.reset(OpConst32)
14027 v.AuxInt = int32ToAuxInt(0)
14028 return true
14029 }
14030 return false
14031 }
14032 func rewriteValuegeneric_OpLsh64x16(v *Value) bool {
14033 v_1 := v.Args[1]
14034 v_0 := v.Args[0]
14035 b := v.Block
14036
14037
14038 for {
14039 t := v.Type
14040 x := v_0
14041 if v_1.Op != OpConst16 {
14042 break
14043 }
14044 c := auxIntToInt16(v_1.AuxInt)
14045 v.reset(OpLsh64x64)
14046 v0 := b.NewValue0(v.Pos, OpConst64, t)
14047 v0.AuxInt = int64ToAuxInt(int64(uint16(c)))
14048 v.AddArg2(x, v0)
14049 return true
14050 }
14051
14052
14053 for {
14054 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
14055 break
14056 }
14057 v.reset(OpConst64)
14058 v.AuxInt = int64ToAuxInt(0)
14059 return true
14060 }
14061 return false
14062 }
14063 func rewriteValuegeneric_OpLsh64x32(v *Value) bool {
14064 v_1 := v.Args[1]
14065 v_0 := v.Args[0]
14066 b := v.Block
14067
14068
14069 for {
14070 t := v.Type
14071 x := v_0
14072 if v_1.Op != OpConst32 {
14073 break
14074 }
14075 c := auxIntToInt32(v_1.AuxInt)
14076 v.reset(OpLsh64x64)
14077 v0 := b.NewValue0(v.Pos, OpConst64, t)
14078 v0.AuxInt = int64ToAuxInt(int64(uint32(c)))
14079 v.AddArg2(x, v0)
14080 return true
14081 }
14082
14083
14084 for {
14085 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
14086 break
14087 }
14088 v.reset(OpConst64)
14089 v.AuxInt = int64ToAuxInt(0)
14090 return true
14091 }
14092 return false
14093 }
14094 func rewriteValuegeneric_OpLsh64x64(v *Value) bool {
14095 v_1 := v.Args[1]
14096 v_0 := v.Args[0]
14097 b := v.Block
14098 typ := &b.Func.Config.Types
14099
14100
14101 for {
14102 if v_0.Op != OpConst64 {
14103 break
14104 }
14105 c := auxIntToInt64(v_0.AuxInt)
14106 if v_1.Op != OpConst64 {
14107 break
14108 }
14109 d := auxIntToInt64(v_1.AuxInt)
14110 v.reset(OpConst64)
14111 v.AuxInt = int64ToAuxInt(c << uint64(d))
14112 return true
14113 }
14114
14115
14116 for {
14117 x := v_0
14118 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 0 {
14119 break
14120 }
14121 v.copyOf(x)
14122 return true
14123 }
14124
14125
14126 for {
14127 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
14128 break
14129 }
14130 v.reset(OpConst64)
14131 v.AuxInt = int64ToAuxInt(0)
14132 return true
14133 }
14134
14135
14136
14137 for {
14138 if v_1.Op != OpConst64 {
14139 break
14140 }
14141 c := auxIntToInt64(v_1.AuxInt)
14142 if !(uint64(c) >= 64) {
14143 break
14144 }
14145 v.reset(OpConst64)
14146 v.AuxInt = int64ToAuxInt(0)
14147 return true
14148 }
14149
14150
14151
14152 for {
14153 t := v.Type
14154 if v_0.Op != OpLsh64x64 {
14155 break
14156 }
14157 _ = v_0.Args[1]
14158 x := v_0.Args[0]
14159 v_0_1 := v_0.Args[1]
14160 if v_0_1.Op != OpConst64 {
14161 break
14162 }
14163 c := auxIntToInt64(v_0_1.AuxInt)
14164 if v_1.Op != OpConst64 {
14165 break
14166 }
14167 d := auxIntToInt64(v_1.AuxInt)
14168 if !(!uaddOvf(c, d)) {
14169 break
14170 }
14171 v.reset(OpLsh64x64)
14172 v0 := b.NewValue0(v.Pos, OpConst64, t)
14173 v0.AuxInt = int64ToAuxInt(c + d)
14174 v.AddArg2(x, v0)
14175 return true
14176 }
14177
14178
14179
14180 for {
14181 i := v_0
14182 if i.Op != OpRsh64x64 {
14183 break
14184 }
14185 _ = i.Args[1]
14186 x := i.Args[0]
14187 i_1 := i.Args[1]
14188 if i_1.Op != OpConst64 {
14189 break
14190 }
14191 c := auxIntToInt64(i_1.AuxInt)
14192 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != c || !(c >= 0 && c < 64 && i.Uses == 1) {
14193 break
14194 }
14195 v.reset(OpAnd64)
14196 v0 := b.NewValue0(v.Pos, OpConst64, v.Type)
14197 v0.AuxInt = int64ToAuxInt(int64(-1) << c)
14198 v.AddArg2(x, v0)
14199 return true
14200 }
14201
14202
14203
14204 for {
14205 i := v_0
14206 if i.Op != OpRsh64Ux64 {
14207 break
14208 }
14209 _ = i.Args[1]
14210 x := i.Args[0]
14211 i_1 := i.Args[1]
14212 if i_1.Op != OpConst64 {
14213 break
14214 }
14215 c := auxIntToInt64(i_1.AuxInt)
14216 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != c || !(c >= 0 && c < 64 && i.Uses == 1) {
14217 break
14218 }
14219 v.reset(OpAnd64)
14220 v0 := b.NewValue0(v.Pos, OpConst64, v.Type)
14221 v0.AuxInt = int64ToAuxInt(int64(-1) << c)
14222 v.AddArg2(x, v0)
14223 return true
14224 }
14225
14226
14227
14228 for {
14229 if v_0.Op != OpRsh64Ux64 {
14230 break
14231 }
14232 _ = v_0.Args[1]
14233 v_0_0 := v_0.Args[0]
14234 if v_0_0.Op != OpLsh64x64 {
14235 break
14236 }
14237 _ = v_0_0.Args[1]
14238 x := v_0_0.Args[0]
14239 v_0_0_1 := v_0_0.Args[1]
14240 if v_0_0_1.Op != OpConst64 {
14241 break
14242 }
14243 c1 := auxIntToInt64(v_0_0_1.AuxInt)
14244 v_0_1 := v_0.Args[1]
14245 if v_0_1.Op != OpConst64 {
14246 break
14247 }
14248 c2 := auxIntToInt64(v_0_1.AuxInt)
14249 if v_1.Op != OpConst64 {
14250 break
14251 }
14252 c3 := auxIntToInt64(v_1.AuxInt)
14253 if !(uint64(c1) >= uint64(c2) && uint64(c3) >= uint64(c2) && !uaddOvf(c1-c2, c3)) {
14254 break
14255 }
14256 v.reset(OpLsh64x64)
14257 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
14258 v0.AuxInt = int64ToAuxInt(c1 - c2 + c3)
14259 v.AddArg2(x, v0)
14260 return true
14261 }
14262 return false
14263 }
14264 func rewriteValuegeneric_OpLsh64x8(v *Value) bool {
14265 v_1 := v.Args[1]
14266 v_0 := v.Args[0]
14267 b := v.Block
14268
14269
14270 for {
14271 t := v.Type
14272 x := v_0
14273 if v_1.Op != OpConst8 {
14274 break
14275 }
14276 c := auxIntToInt8(v_1.AuxInt)
14277 v.reset(OpLsh64x64)
14278 v0 := b.NewValue0(v.Pos, OpConst64, t)
14279 v0.AuxInt = int64ToAuxInt(int64(uint8(c)))
14280 v.AddArg2(x, v0)
14281 return true
14282 }
14283
14284
14285 for {
14286 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
14287 break
14288 }
14289 v.reset(OpConst64)
14290 v.AuxInt = int64ToAuxInt(0)
14291 return true
14292 }
14293 return false
14294 }
14295 func rewriteValuegeneric_OpLsh8x16(v *Value) bool {
14296 v_1 := v.Args[1]
14297 v_0 := v.Args[0]
14298 b := v.Block
14299
14300
14301 for {
14302 t := v.Type
14303 x := v_0
14304 if v_1.Op != OpConst16 {
14305 break
14306 }
14307 c := auxIntToInt16(v_1.AuxInt)
14308 v.reset(OpLsh8x64)
14309 v0 := b.NewValue0(v.Pos, OpConst64, t)
14310 v0.AuxInt = int64ToAuxInt(int64(uint16(c)))
14311 v.AddArg2(x, v0)
14312 return true
14313 }
14314
14315
14316 for {
14317 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 {
14318 break
14319 }
14320 v.reset(OpConst8)
14321 v.AuxInt = int8ToAuxInt(0)
14322 return true
14323 }
14324 return false
14325 }
14326 func rewriteValuegeneric_OpLsh8x32(v *Value) bool {
14327 v_1 := v.Args[1]
14328 v_0 := v.Args[0]
14329 b := v.Block
14330
14331
14332 for {
14333 t := v.Type
14334 x := v_0
14335 if v_1.Op != OpConst32 {
14336 break
14337 }
14338 c := auxIntToInt32(v_1.AuxInt)
14339 v.reset(OpLsh8x64)
14340 v0 := b.NewValue0(v.Pos, OpConst64, t)
14341 v0.AuxInt = int64ToAuxInt(int64(uint32(c)))
14342 v.AddArg2(x, v0)
14343 return true
14344 }
14345
14346
14347 for {
14348 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 {
14349 break
14350 }
14351 v.reset(OpConst8)
14352 v.AuxInt = int8ToAuxInt(0)
14353 return true
14354 }
14355 return false
14356 }
14357 func rewriteValuegeneric_OpLsh8x64(v *Value) bool {
14358 v_1 := v.Args[1]
14359 v_0 := v.Args[0]
14360 b := v.Block
14361 typ := &b.Func.Config.Types
14362
14363
14364 for {
14365 if v_0.Op != OpConst8 {
14366 break
14367 }
14368 c := auxIntToInt8(v_0.AuxInt)
14369 if v_1.Op != OpConst64 {
14370 break
14371 }
14372 d := auxIntToInt64(v_1.AuxInt)
14373 v.reset(OpConst8)
14374 v.AuxInt = int8ToAuxInt(c << uint64(d))
14375 return true
14376 }
14377
14378
14379 for {
14380 x := v_0
14381 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 0 {
14382 break
14383 }
14384 v.copyOf(x)
14385 return true
14386 }
14387
14388
14389 for {
14390 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 {
14391 break
14392 }
14393 v.reset(OpConst8)
14394 v.AuxInt = int8ToAuxInt(0)
14395 return true
14396 }
14397
14398
14399
14400 for {
14401 if v_1.Op != OpConst64 {
14402 break
14403 }
14404 c := auxIntToInt64(v_1.AuxInt)
14405 if !(uint64(c) >= 8) {
14406 break
14407 }
14408 v.reset(OpConst8)
14409 v.AuxInt = int8ToAuxInt(0)
14410 return true
14411 }
14412
14413
14414
14415 for {
14416 t := v.Type
14417 if v_0.Op != OpLsh8x64 {
14418 break
14419 }
14420 _ = v_0.Args[1]
14421 x := v_0.Args[0]
14422 v_0_1 := v_0.Args[1]
14423 if v_0_1.Op != OpConst64 {
14424 break
14425 }
14426 c := auxIntToInt64(v_0_1.AuxInt)
14427 if v_1.Op != OpConst64 {
14428 break
14429 }
14430 d := auxIntToInt64(v_1.AuxInt)
14431 if !(!uaddOvf(c, d)) {
14432 break
14433 }
14434 v.reset(OpLsh8x64)
14435 v0 := b.NewValue0(v.Pos, OpConst64, t)
14436 v0.AuxInt = int64ToAuxInt(c + d)
14437 v.AddArg2(x, v0)
14438 return true
14439 }
14440
14441
14442
14443 for {
14444 i := v_0
14445 if i.Op != OpRsh8x64 {
14446 break
14447 }
14448 _ = i.Args[1]
14449 x := i.Args[0]
14450 i_1 := i.Args[1]
14451 if i_1.Op != OpConst64 {
14452 break
14453 }
14454 c := auxIntToInt64(i_1.AuxInt)
14455 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != c || !(c >= 0 && c < 8 && i.Uses == 1) {
14456 break
14457 }
14458 v.reset(OpAnd8)
14459 v0 := b.NewValue0(v.Pos, OpConst8, v.Type)
14460 v0.AuxInt = int8ToAuxInt(int8(-1) << c)
14461 v.AddArg2(x, v0)
14462 return true
14463 }
14464
14465
14466
14467 for {
14468 i := v_0
14469 if i.Op != OpRsh8Ux64 {
14470 break
14471 }
14472 _ = i.Args[1]
14473 x := i.Args[0]
14474 i_1 := i.Args[1]
14475 if i_1.Op != OpConst64 {
14476 break
14477 }
14478 c := auxIntToInt64(i_1.AuxInt)
14479 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != c || !(c >= 0 && c < 8 && i.Uses == 1) {
14480 break
14481 }
14482 v.reset(OpAnd8)
14483 v0 := b.NewValue0(v.Pos, OpConst8, v.Type)
14484 v0.AuxInt = int8ToAuxInt(int8(-1) << c)
14485 v.AddArg2(x, v0)
14486 return true
14487 }
14488
14489
14490
14491 for {
14492 if v_0.Op != OpRsh8Ux64 {
14493 break
14494 }
14495 _ = v_0.Args[1]
14496 v_0_0 := v_0.Args[0]
14497 if v_0_0.Op != OpLsh8x64 {
14498 break
14499 }
14500 _ = v_0_0.Args[1]
14501 x := v_0_0.Args[0]
14502 v_0_0_1 := v_0_0.Args[1]
14503 if v_0_0_1.Op != OpConst64 {
14504 break
14505 }
14506 c1 := auxIntToInt64(v_0_0_1.AuxInt)
14507 v_0_1 := v_0.Args[1]
14508 if v_0_1.Op != OpConst64 {
14509 break
14510 }
14511 c2 := auxIntToInt64(v_0_1.AuxInt)
14512 if v_1.Op != OpConst64 {
14513 break
14514 }
14515 c3 := auxIntToInt64(v_1.AuxInt)
14516 if !(uint64(c1) >= uint64(c2) && uint64(c3) >= uint64(c2) && !uaddOvf(c1-c2, c3)) {
14517 break
14518 }
14519 v.reset(OpLsh8x64)
14520 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
14521 v0.AuxInt = int64ToAuxInt(c1 - c2 + c3)
14522 v.AddArg2(x, v0)
14523 return true
14524 }
14525 return false
14526 }
14527 func rewriteValuegeneric_OpLsh8x8(v *Value) bool {
14528 v_1 := v.Args[1]
14529 v_0 := v.Args[0]
14530 b := v.Block
14531
14532
14533 for {
14534 t := v.Type
14535 x := v_0
14536 if v_1.Op != OpConst8 {
14537 break
14538 }
14539 c := auxIntToInt8(v_1.AuxInt)
14540 v.reset(OpLsh8x64)
14541 v0 := b.NewValue0(v.Pos, OpConst64, t)
14542 v0.AuxInt = int64ToAuxInt(int64(uint8(c)))
14543 v.AddArg2(x, v0)
14544 return true
14545 }
14546
14547
14548 for {
14549 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 {
14550 break
14551 }
14552 v.reset(OpConst8)
14553 v.AuxInt = int8ToAuxInt(0)
14554 return true
14555 }
14556 return false
14557 }
14558 func rewriteValuegeneric_OpMod16(v *Value) bool {
14559 v_1 := v.Args[1]
14560 v_0 := v.Args[0]
14561 b := v.Block
14562
14563
14564
14565 for {
14566 if v_0.Op != OpConst16 {
14567 break
14568 }
14569 c := auxIntToInt16(v_0.AuxInt)
14570 if v_1.Op != OpConst16 {
14571 break
14572 }
14573 d := auxIntToInt16(v_1.AuxInt)
14574 if !(d != 0) {
14575 break
14576 }
14577 v.reset(OpConst16)
14578 v.AuxInt = int16ToAuxInt(c % d)
14579 return true
14580 }
14581
14582
14583
14584 for {
14585 t := v.Type
14586 n := v_0
14587 if v_1.Op != OpConst16 {
14588 break
14589 }
14590 c := auxIntToInt16(v_1.AuxInt)
14591 if !(isNonNegative(n) && isPowerOfTwo16(c)) {
14592 break
14593 }
14594 v.reset(OpAnd16)
14595 v0 := b.NewValue0(v.Pos, OpConst16, t)
14596 v0.AuxInt = int16ToAuxInt(c - 1)
14597 v.AddArg2(n, v0)
14598 return true
14599 }
14600
14601
14602
14603 for {
14604 t := v.Type
14605 n := v_0
14606 if v_1.Op != OpConst16 {
14607 break
14608 }
14609 c := auxIntToInt16(v_1.AuxInt)
14610 if !(c < 0 && c != -1<<15) {
14611 break
14612 }
14613 v.reset(OpMod16)
14614 v.Type = t
14615 v0 := b.NewValue0(v.Pos, OpConst16, t)
14616 v0.AuxInt = int16ToAuxInt(-c)
14617 v.AddArg2(n, v0)
14618 return true
14619 }
14620
14621
14622
14623 for {
14624 t := v.Type
14625 x := v_0
14626 if v_1.Op != OpConst16 {
14627 break
14628 }
14629 c := auxIntToInt16(v_1.AuxInt)
14630 if !(x.Op != OpConst16 && (c > 0 || c == -1<<15)) {
14631 break
14632 }
14633 v.reset(OpSub16)
14634 v0 := b.NewValue0(v.Pos, OpMul16, t)
14635 v1 := b.NewValue0(v.Pos, OpDiv16, t)
14636 v2 := b.NewValue0(v.Pos, OpConst16, t)
14637 v2.AuxInt = int16ToAuxInt(c)
14638 v1.AddArg2(x, v2)
14639 v0.AddArg2(v1, v2)
14640 v.AddArg2(x, v0)
14641 return true
14642 }
14643 return false
14644 }
14645 func rewriteValuegeneric_OpMod16u(v *Value) bool {
14646 v_1 := v.Args[1]
14647 v_0 := v.Args[0]
14648 b := v.Block
14649
14650
14651
14652 for {
14653 if v_0.Op != OpConst16 {
14654 break
14655 }
14656 c := auxIntToInt16(v_0.AuxInt)
14657 if v_1.Op != OpConst16 {
14658 break
14659 }
14660 d := auxIntToInt16(v_1.AuxInt)
14661 if !(d != 0) {
14662 break
14663 }
14664 v.reset(OpConst16)
14665 v.AuxInt = int16ToAuxInt(int16(uint16(c) % uint16(d)))
14666 return true
14667 }
14668
14669
14670
14671 for {
14672 t := v.Type
14673 n := v_0
14674 if v_1.Op != OpConst16 {
14675 break
14676 }
14677 c := auxIntToInt16(v_1.AuxInt)
14678 if !(isPowerOfTwo16(c)) {
14679 break
14680 }
14681 v.reset(OpAnd16)
14682 v0 := b.NewValue0(v.Pos, OpConst16, t)
14683 v0.AuxInt = int16ToAuxInt(c - 1)
14684 v.AddArg2(n, v0)
14685 return true
14686 }
14687
14688
14689
14690 for {
14691 t := v.Type
14692 x := v_0
14693 if v_1.Op != OpConst16 {
14694 break
14695 }
14696 c := auxIntToInt16(v_1.AuxInt)
14697 if !(x.Op != OpConst16 && c > 0 && umagicOK16(c)) {
14698 break
14699 }
14700 v.reset(OpSub16)
14701 v0 := b.NewValue0(v.Pos, OpMul16, t)
14702 v1 := b.NewValue0(v.Pos, OpDiv16u, t)
14703 v2 := b.NewValue0(v.Pos, OpConst16, t)
14704 v2.AuxInt = int16ToAuxInt(c)
14705 v1.AddArg2(x, v2)
14706 v0.AddArg2(v1, v2)
14707 v.AddArg2(x, v0)
14708 return true
14709 }
14710 return false
14711 }
14712 func rewriteValuegeneric_OpMod32(v *Value) bool {
14713 v_1 := v.Args[1]
14714 v_0 := v.Args[0]
14715 b := v.Block
14716
14717
14718
14719 for {
14720 if v_0.Op != OpConst32 {
14721 break
14722 }
14723 c := auxIntToInt32(v_0.AuxInt)
14724 if v_1.Op != OpConst32 {
14725 break
14726 }
14727 d := auxIntToInt32(v_1.AuxInt)
14728 if !(d != 0) {
14729 break
14730 }
14731 v.reset(OpConst32)
14732 v.AuxInt = int32ToAuxInt(c % d)
14733 return true
14734 }
14735
14736
14737
14738 for {
14739 t := v.Type
14740 n := v_0
14741 if v_1.Op != OpConst32 {
14742 break
14743 }
14744 c := auxIntToInt32(v_1.AuxInt)
14745 if !(isNonNegative(n) && isPowerOfTwo32(c)) {
14746 break
14747 }
14748 v.reset(OpAnd32)
14749 v0 := b.NewValue0(v.Pos, OpConst32, t)
14750 v0.AuxInt = int32ToAuxInt(c - 1)
14751 v.AddArg2(n, v0)
14752 return true
14753 }
14754
14755
14756
14757 for {
14758 t := v.Type
14759 n := v_0
14760 if v_1.Op != OpConst32 {
14761 break
14762 }
14763 c := auxIntToInt32(v_1.AuxInt)
14764 if !(c < 0 && c != -1<<31) {
14765 break
14766 }
14767 v.reset(OpMod32)
14768 v.Type = t
14769 v0 := b.NewValue0(v.Pos, OpConst32, t)
14770 v0.AuxInt = int32ToAuxInt(-c)
14771 v.AddArg2(n, v0)
14772 return true
14773 }
14774
14775
14776
14777 for {
14778 t := v.Type
14779 x := v_0
14780 if v_1.Op != OpConst32 {
14781 break
14782 }
14783 c := auxIntToInt32(v_1.AuxInt)
14784 if !(x.Op != OpConst32 && (c > 0 || c == -1<<31)) {
14785 break
14786 }
14787 v.reset(OpSub32)
14788 v0 := b.NewValue0(v.Pos, OpMul32, t)
14789 v1 := b.NewValue0(v.Pos, OpDiv32, t)
14790 v2 := b.NewValue0(v.Pos, OpConst32, t)
14791 v2.AuxInt = int32ToAuxInt(c)
14792 v1.AddArg2(x, v2)
14793 v0.AddArg2(v1, v2)
14794 v.AddArg2(x, v0)
14795 return true
14796 }
14797 return false
14798 }
14799 func rewriteValuegeneric_OpMod32u(v *Value) bool {
14800 v_1 := v.Args[1]
14801 v_0 := v.Args[0]
14802 b := v.Block
14803
14804
14805
14806 for {
14807 if v_0.Op != OpConst32 {
14808 break
14809 }
14810 c := auxIntToInt32(v_0.AuxInt)
14811 if v_1.Op != OpConst32 {
14812 break
14813 }
14814 d := auxIntToInt32(v_1.AuxInt)
14815 if !(d != 0) {
14816 break
14817 }
14818 v.reset(OpConst32)
14819 v.AuxInt = int32ToAuxInt(int32(uint32(c) % uint32(d)))
14820 return true
14821 }
14822
14823
14824
14825 for {
14826 t := v.Type
14827 n := v_0
14828 if v_1.Op != OpConst32 {
14829 break
14830 }
14831 c := auxIntToInt32(v_1.AuxInt)
14832 if !(isPowerOfTwo32(c)) {
14833 break
14834 }
14835 v.reset(OpAnd32)
14836 v0 := b.NewValue0(v.Pos, OpConst32, t)
14837 v0.AuxInt = int32ToAuxInt(c - 1)
14838 v.AddArg2(n, v0)
14839 return true
14840 }
14841
14842
14843
14844 for {
14845 t := v.Type
14846 x := v_0
14847 if v_1.Op != OpConst32 {
14848 break
14849 }
14850 c := auxIntToInt32(v_1.AuxInt)
14851 if !(x.Op != OpConst32 && c > 0 && umagicOK32(c)) {
14852 break
14853 }
14854 v.reset(OpSub32)
14855 v0 := b.NewValue0(v.Pos, OpMul32, t)
14856 v1 := b.NewValue0(v.Pos, OpDiv32u, t)
14857 v2 := b.NewValue0(v.Pos, OpConst32, t)
14858 v2.AuxInt = int32ToAuxInt(c)
14859 v1.AddArg2(x, v2)
14860 v0.AddArg2(v1, v2)
14861 v.AddArg2(x, v0)
14862 return true
14863 }
14864 return false
14865 }
14866 func rewriteValuegeneric_OpMod64(v *Value) bool {
14867 v_1 := v.Args[1]
14868 v_0 := v.Args[0]
14869 b := v.Block
14870
14871
14872
14873 for {
14874 if v_0.Op != OpConst64 {
14875 break
14876 }
14877 c := auxIntToInt64(v_0.AuxInt)
14878 if v_1.Op != OpConst64 {
14879 break
14880 }
14881 d := auxIntToInt64(v_1.AuxInt)
14882 if !(d != 0) {
14883 break
14884 }
14885 v.reset(OpConst64)
14886 v.AuxInt = int64ToAuxInt(c % d)
14887 return true
14888 }
14889
14890
14891
14892 for {
14893 t := v.Type
14894 n := v_0
14895 if v_1.Op != OpConst64 {
14896 break
14897 }
14898 c := auxIntToInt64(v_1.AuxInt)
14899 if !(isNonNegative(n) && isPowerOfTwo64(c)) {
14900 break
14901 }
14902 v.reset(OpAnd64)
14903 v0 := b.NewValue0(v.Pos, OpConst64, t)
14904 v0.AuxInt = int64ToAuxInt(c - 1)
14905 v.AddArg2(n, v0)
14906 return true
14907 }
14908
14909
14910
14911 for {
14912 n := v_0
14913 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != -1<<63 || !(isNonNegative(n)) {
14914 break
14915 }
14916 v.copyOf(n)
14917 return true
14918 }
14919
14920
14921
14922 for {
14923 t := v.Type
14924 n := v_0
14925 if v_1.Op != OpConst64 {
14926 break
14927 }
14928 c := auxIntToInt64(v_1.AuxInt)
14929 if !(c < 0 && c != -1<<63) {
14930 break
14931 }
14932 v.reset(OpMod64)
14933 v.Type = t
14934 v0 := b.NewValue0(v.Pos, OpConst64, t)
14935 v0.AuxInt = int64ToAuxInt(-c)
14936 v.AddArg2(n, v0)
14937 return true
14938 }
14939
14940
14941
14942 for {
14943 t := v.Type
14944 x := v_0
14945 if v_1.Op != OpConst64 {
14946 break
14947 }
14948 c := auxIntToInt64(v_1.AuxInt)
14949 if !(x.Op != OpConst64 && (c > 0 || c == -1<<63)) {
14950 break
14951 }
14952 v.reset(OpSub64)
14953 v0 := b.NewValue0(v.Pos, OpMul64, t)
14954 v1 := b.NewValue0(v.Pos, OpDiv64, t)
14955 v2 := b.NewValue0(v.Pos, OpConst64, t)
14956 v2.AuxInt = int64ToAuxInt(c)
14957 v1.AddArg2(x, v2)
14958 v0.AddArg2(v1, v2)
14959 v.AddArg2(x, v0)
14960 return true
14961 }
14962 return false
14963 }
14964 func rewriteValuegeneric_OpMod64u(v *Value) bool {
14965 v_1 := v.Args[1]
14966 v_0 := v.Args[0]
14967 b := v.Block
14968
14969
14970
14971 for {
14972 if v_0.Op != OpConst64 {
14973 break
14974 }
14975 c := auxIntToInt64(v_0.AuxInt)
14976 if v_1.Op != OpConst64 {
14977 break
14978 }
14979 d := auxIntToInt64(v_1.AuxInt)
14980 if !(d != 0) {
14981 break
14982 }
14983 v.reset(OpConst64)
14984 v.AuxInt = int64ToAuxInt(int64(uint64(c) % uint64(d)))
14985 return true
14986 }
14987
14988
14989
14990 for {
14991 t := v.Type
14992 n := v_0
14993 if v_1.Op != OpConst64 {
14994 break
14995 }
14996 c := auxIntToInt64(v_1.AuxInt)
14997 if !(isPowerOfTwo64(c)) {
14998 break
14999 }
15000 v.reset(OpAnd64)
15001 v0 := b.NewValue0(v.Pos, OpConst64, t)
15002 v0.AuxInt = int64ToAuxInt(c - 1)
15003 v.AddArg2(n, v0)
15004 return true
15005 }
15006
15007
15008 for {
15009 t := v.Type
15010 n := v_0
15011 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != -1<<63 {
15012 break
15013 }
15014 v.reset(OpAnd64)
15015 v0 := b.NewValue0(v.Pos, OpConst64, t)
15016 v0.AuxInt = int64ToAuxInt(1<<63 - 1)
15017 v.AddArg2(n, v0)
15018 return true
15019 }
15020
15021
15022
15023 for {
15024 t := v.Type
15025 x := v_0
15026 if v_1.Op != OpConst64 {
15027 break
15028 }
15029 c := auxIntToInt64(v_1.AuxInt)
15030 if !(x.Op != OpConst64 && c > 0 && umagicOK64(c)) {
15031 break
15032 }
15033 v.reset(OpSub64)
15034 v0 := b.NewValue0(v.Pos, OpMul64, t)
15035 v1 := b.NewValue0(v.Pos, OpDiv64u, t)
15036 v2 := b.NewValue0(v.Pos, OpConst64, t)
15037 v2.AuxInt = int64ToAuxInt(c)
15038 v1.AddArg2(x, v2)
15039 v0.AddArg2(v1, v2)
15040 v.AddArg2(x, v0)
15041 return true
15042 }
15043 return false
15044 }
15045 func rewriteValuegeneric_OpMod8(v *Value) bool {
15046 v_1 := v.Args[1]
15047 v_0 := v.Args[0]
15048 b := v.Block
15049
15050
15051
15052 for {
15053 if v_0.Op != OpConst8 {
15054 break
15055 }
15056 c := auxIntToInt8(v_0.AuxInt)
15057 if v_1.Op != OpConst8 {
15058 break
15059 }
15060 d := auxIntToInt8(v_1.AuxInt)
15061 if !(d != 0) {
15062 break
15063 }
15064 v.reset(OpConst8)
15065 v.AuxInt = int8ToAuxInt(c % d)
15066 return true
15067 }
15068
15069
15070
15071 for {
15072 t := v.Type
15073 n := v_0
15074 if v_1.Op != OpConst8 {
15075 break
15076 }
15077 c := auxIntToInt8(v_1.AuxInt)
15078 if !(isNonNegative(n) && isPowerOfTwo8(c)) {
15079 break
15080 }
15081 v.reset(OpAnd8)
15082 v0 := b.NewValue0(v.Pos, OpConst8, t)
15083 v0.AuxInt = int8ToAuxInt(c - 1)
15084 v.AddArg2(n, v0)
15085 return true
15086 }
15087
15088
15089
15090 for {
15091 t := v.Type
15092 n := v_0
15093 if v_1.Op != OpConst8 {
15094 break
15095 }
15096 c := auxIntToInt8(v_1.AuxInt)
15097 if !(c < 0 && c != -1<<7) {
15098 break
15099 }
15100 v.reset(OpMod8)
15101 v.Type = t
15102 v0 := b.NewValue0(v.Pos, OpConst8, t)
15103 v0.AuxInt = int8ToAuxInt(-c)
15104 v.AddArg2(n, v0)
15105 return true
15106 }
15107
15108
15109
15110 for {
15111 t := v.Type
15112 x := v_0
15113 if v_1.Op != OpConst8 {
15114 break
15115 }
15116 c := auxIntToInt8(v_1.AuxInt)
15117 if !(x.Op != OpConst8 && (c > 0 || c == -1<<7)) {
15118 break
15119 }
15120 v.reset(OpSub8)
15121 v0 := b.NewValue0(v.Pos, OpMul8, t)
15122 v1 := b.NewValue0(v.Pos, OpDiv8, t)
15123 v2 := b.NewValue0(v.Pos, OpConst8, t)
15124 v2.AuxInt = int8ToAuxInt(c)
15125 v1.AddArg2(x, v2)
15126 v0.AddArg2(v1, v2)
15127 v.AddArg2(x, v0)
15128 return true
15129 }
15130 return false
15131 }
15132 func rewriteValuegeneric_OpMod8u(v *Value) bool {
15133 v_1 := v.Args[1]
15134 v_0 := v.Args[0]
15135 b := v.Block
15136
15137
15138
15139 for {
15140 if v_0.Op != OpConst8 {
15141 break
15142 }
15143 c := auxIntToInt8(v_0.AuxInt)
15144 if v_1.Op != OpConst8 {
15145 break
15146 }
15147 d := auxIntToInt8(v_1.AuxInt)
15148 if !(d != 0) {
15149 break
15150 }
15151 v.reset(OpConst8)
15152 v.AuxInt = int8ToAuxInt(int8(uint8(c) % uint8(d)))
15153 return true
15154 }
15155
15156
15157
15158 for {
15159 t := v.Type
15160 n := v_0
15161 if v_1.Op != OpConst8 {
15162 break
15163 }
15164 c := auxIntToInt8(v_1.AuxInt)
15165 if !(isPowerOfTwo8(c)) {
15166 break
15167 }
15168 v.reset(OpAnd8)
15169 v0 := b.NewValue0(v.Pos, OpConst8, t)
15170 v0.AuxInt = int8ToAuxInt(c - 1)
15171 v.AddArg2(n, v0)
15172 return true
15173 }
15174
15175
15176
15177 for {
15178 t := v.Type
15179 x := v_0
15180 if v_1.Op != OpConst8 {
15181 break
15182 }
15183 c := auxIntToInt8(v_1.AuxInt)
15184 if !(x.Op != OpConst8 && c > 0 && umagicOK8(c)) {
15185 break
15186 }
15187 v.reset(OpSub8)
15188 v0 := b.NewValue0(v.Pos, OpMul8, t)
15189 v1 := b.NewValue0(v.Pos, OpDiv8u, t)
15190 v2 := b.NewValue0(v.Pos, OpConst8, t)
15191 v2.AuxInt = int8ToAuxInt(c)
15192 v1.AddArg2(x, v2)
15193 v0.AddArg2(v1, v2)
15194 v.AddArg2(x, v0)
15195 return true
15196 }
15197 return false
15198 }
15199 func rewriteValuegeneric_OpMove(v *Value) bool {
15200 v_2 := v.Args[2]
15201 v_1 := v.Args[1]
15202 v_0 := v.Args[0]
15203 b := v.Block
15204 config := b.Func.Config
15205
15206
15207
15208 for {
15209 n := auxIntToInt64(v.AuxInt)
15210 t := auxToType(v.Aux)
15211 dst1 := v_0
15212 src := v_1
15213 mem := v_2
15214 if mem.Op != OpZero || auxIntToInt64(mem.AuxInt) != n || auxToType(mem.Aux) != t {
15215 break
15216 }
15217 dst2 := mem.Args[0]
15218 if !(isSamePtr(src, dst2)) {
15219 break
15220 }
15221 v.reset(OpZero)
15222 v.AuxInt = int64ToAuxInt(n)
15223 v.Aux = typeToAux(t)
15224 v.AddArg2(dst1, mem)
15225 return true
15226 }
15227
15228
15229
15230 for {
15231 n := auxIntToInt64(v.AuxInt)
15232 t := auxToType(v.Aux)
15233 dst1 := v_0
15234 src := v_1
15235 mem := v_2
15236 if mem.Op != OpVarDef {
15237 break
15238 }
15239 mem_0 := mem.Args[0]
15240 if mem_0.Op != OpZero || auxIntToInt64(mem_0.AuxInt) != n || auxToType(mem_0.Aux) != t {
15241 break
15242 }
15243 dst0 := mem_0.Args[0]
15244 if !(isSamePtr(src, dst0)) {
15245 break
15246 }
15247 v.reset(OpZero)
15248 v.AuxInt = int64ToAuxInt(n)
15249 v.Aux = typeToAux(t)
15250 v.AddArg2(dst1, mem)
15251 return true
15252 }
15253
15254
15255
15256 for {
15257 n := auxIntToInt64(v.AuxInt)
15258 t := auxToType(v.Aux)
15259 dst := v_0
15260 if v_1.Op != OpAddr {
15261 break
15262 }
15263 sym := auxToSym(v_1.Aux)
15264 v_1_0 := v_1.Args[0]
15265 if v_1_0.Op != OpSB {
15266 break
15267 }
15268 mem := v_2
15269 if !(symIsROZero(sym)) {
15270 break
15271 }
15272 v.reset(OpZero)
15273 v.AuxInt = int64ToAuxInt(n)
15274 v.Aux = typeToAux(t)
15275 v.AddArg2(dst, mem)
15276 return true
15277 }
15278
15279
15280
15281 for {
15282 n := auxIntToInt64(v.AuxInt)
15283 t1 := auxToType(v.Aux)
15284 dst1 := v_0
15285 src1 := v_1
15286 store := v_2
15287 if store.Op != OpStore {
15288 break
15289 }
15290 t2 := auxToType(store.Aux)
15291 mem := store.Args[2]
15292 op := store.Args[0]
15293 if op.Op != OpOffPtr {
15294 break
15295 }
15296 o2 := auxIntToInt64(op.AuxInt)
15297 dst2 := op.Args[0]
15298 if !(isSamePtr(dst1, dst2) && store.Uses == 1 && n >= o2+t2.Size() && disjoint(src1, n, op, t2.Size()) && clobber(store)) {
15299 break
15300 }
15301 v.reset(OpMove)
15302 v.AuxInt = int64ToAuxInt(n)
15303 v.Aux = typeToAux(t1)
15304 v.AddArg3(dst1, src1, mem)
15305 return true
15306 }
15307
15308
15309
15310 for {
15311 n := auxIntToInt64(v.AuxInt)
15312 t := auxToType(v.Aux)
15313 dst1 := v_0
15314 src1 := v_1
15315 move := v_2
15316 if move.Op != OpMove || auxIntToInt64(move.AuxInt) != n || auxToType(move.Aux) != t {
15317 break
15318 }
15319 mem := move.Args[2]
15320 dst2 := move.Args[0]
15321 if !(move.Uses == 1 && isSamePtr(dst1, dst2) && disjoint(src1, n, dst2, n) && clobber(move)) {
15322 break
15323 }
15324 v.reset(OpMove)
15325 v.AuxInt = int64ToAuxInt(n)
15326 v.Aux = typeToAux(t)
15327 v.AddArg3(dst1, src1, mem)
15328 return true
15329 }
15330
15331
15332
15333 for {
15334 n := auxIntToInt64(v.AuxInt)
15335 t := auxToType(v.Aux)
15336 dst1 := v_0
15337 src1 := v_1
15338 vardef := v_2
15339 if vardef.Op != OpVarDef {
15340 break
15341 }
15342 x := auxToSym(vardef.Aux)
15343 move := vardef.Args[0]
15344 if move.Op != OpMove || auxIntToInt64(move.AuxInt) != n || auxToType(move.Aux) != t {
15345 break
15346 }
15347 mem := move.Args[2]
15348 dst2 := move.Args[0]
15349 if !(move.Uses == 1 && vardef.Uses == 1 && isSamePtr(dst1, dst2) && disjoint(src1, n, dst2, n) && clobber(move, vardef)) {
15350 break
15351 }
15352 v.reset(OpMove)
15353 v.AuxInt = int64ToAuxInt(n)
15354 v.Aux = typeToAux(t)
15355 v0 := b.NewValue0(v.Pos, OpVarDef, types.TypeMem)
15356 v0.Aux = symToAux(x)
15357 v0.AddArg(mem)
15358 v.AddArg3(dst1, src1, v0)
15359 return true
15360 }
15361
15362
15363
15364 for {
15365 n := auxIntToInt64(v.AuxInt)
15366 t := auxToType(v.Aux)
15367 dst1 := v_0
15368 src1 := v_1
15369 zero := v_2
15370 if zero.Op != OpZero || auxIntToInt64(zero.AuxInt) != n || auxToType(zero.Aux) != t {
15371 break
15372 }
15373 mem := zero.Args[1]
15374 dst2 := zero.Args[0]
15375 if !(zero.Uses == 1 && isSamePtr(dst1, dst2) && disjoint(src1, n, dst2, n) && clobber(zero)) {
15376 break
15377 }
15378 v.reset(OpMove)
15379 v.AuxInt = int64ToAuxInt(n)
15380 v.Aux = typeToAux(t)
15381 v.AddArg3(dst1, src1, mem)
15382 return true
15383 }
15384
15385
15386
15387 for {
15388 n := auxIntToInt64(v.AuxInt)
15389 t := auxToType(v.Aux)
15390 dst1 := v_0
15391 src1 := v_1
15392 vardef := v_2
15393 if vardef.Op != OpVarDef {
15394 break
15395 }
15396 x := auxToSym(vardef.Aux)
15397 zero := vardef.Args[0]
15398 if zero.Op != OpZero || auxIntToInt64(zero.AuxInt) != n || auxToType(zero.Aux) != t {
15399 break
15400 }
15401 mem := zero.Args[1]
15402 dst2 := zero.Args[0]
15403 if !(zero.Uses == 1 && vardef.Uses == 1 && isSamePtr(dst1, dst2) && disjoint(src1, n, dst2, n) && clobber(zero, vardef)) {
15404 break
15405 }
15406 v.reset(OpMove)
15407 v.AuxInt = int64ToAuxInt(n)
15408 v.Aux = typeToAux(t)
15409 v0 := b.NewValue0(v.Pos, OpVarDef, types.TypeMem)
15410 v0.Aux = symToAux(x)
15411 v0.AddArg(mem)
15412 v.AddArg3(dst1, src1, v0)
15413 return true
15414 }
15415
15416
15417
15418 for {
15419 n := auxIntToInt64(v.AuxInt)
15420 t1 := auxToType(v.Aux)
15421 dst := v_0
15422 p1 := v_1
15423 mem := v_2
15424 if mem.Op != OpStore {
15425 break
15426 }
15427 t2 := auxToType(mem.Aux)
15428 _ = mem.Args[2]
15429 op2 := mem.Args[0]
15430 if op2.Op != OpOffPtr {
15431 break
15432 }
15433 tt2 := op2.Type
15434 o2 := auxIntToInt64(op2.AuxInt)
15435 p2 := op2.Args[0]
15436 d1 := mem.Args[1]
15437 mem_2 := mem.Args[2]
15438 if mem_2.Op != OpStore {
15439 break
15440 }
15441 t3 := auxToType(mem_2.Aux)
15442 d2 := mem_2.Args[1]
15443 op3 := mem_2.Args[0]
15444 if op3.Op != OpOffPtr {
15445 break
15446 }
15447 tt3 := op3.Type
15448 if auxIntToInt64(op3.AuxInt) != 0 {
15449 break
15450 }
15451 p3 := op3.Args[0]
15452 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()) {
15453 break
15454 }
15455 v.reset(OpStore)
15456 v.Aux = typeToAux(t2)
15457 v0 := b.NewValue0(v.Pos, OpOffPtr, tt2)
15458 v0.AuxInt = int64ToAuxInt(o2)
15459 v0.AddArg(dst)
15460 v1 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
15461 v1.Aux = typeToAux(t3)
15462 v2 := b.NewValue0(v.Pos, OpOffPtr, tt3)
15463 v2.AuxInt = int64ToAuxInt(0)
15464 v2.AddArg(dst)
15465 v1.AddArg3(v2, d2, mem)
15466 v.AddArg3(v0, d1, v1)
15467 return true
15468 }
15469
15470
15471
15472 for {
15473 n := auxIntToInt64(v.AuxInt)
15474 t1 := auxToType(v.Aux)
15475 dst := v_0
15476 p1 := v_1
15477 mem := v_2
15478 if mem.Op != OpStore {
15479 break
15480 }
15481 t2 := auxToType(mem.Aux)
15482 _ = mem.Args[2]
15483 op2 := mem.Args[0]
15484 if op2.Op != OpOffPtr {
15485 break
15486 }
15487 tt2 := op2.Type
15488 o2 := auxIntToInt64(op2.AuxInt)
15489 p2 := op2.Args[0]
15490 d1 := mem.Args[1]
15491 mem_2 := mem.Args[2]
15492 if mem_2.Op != OpStore {
15493 break
15494 }
15495 t3 := auxToType(mem_2.Aux)
15496 _ = mem_2.Args[2]
15497 op3 := mem_2.Args[0]
15498 if op3.Op != OpOffPtr {
15499 break
15500 }
15501 tt3 := op3.Type
15502 o3 := auxIntToInt64(op3.AuxInt)
15503 p3 := op3.Args[0]
15504 d2 := mem_2.Args[1]
15505 mem_2_2 := mem_2.Args[2]
15506 if mem_2_2.Op != OpStore {
15507 break
15508 }
15509 t4 := auxToType(mem_2_2.Aux)
15510 d3 := mem_2_2.Args[1]
15511 op4 := mem_2_2.Args[0]
15512 if op4.Op != OpOffPtr {
15513 break
15514 }
15515 tt4 := op4.Type
15516 if auxIntToInt64(op4.AuxInt) != 0 {
15517 break
15518 }
15519 p4 := op4.Args[0]
15520 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()) {
15521 break
15522 }
15523 v.reset(OpStore)
15524 v.Aux = typeToAux(t2)
15525 v0 := b.NewValue0(v.Pos, OpOffPtr, tt2)
15526 v0.AuxInt = int64ToAuxInt(o2)
15527 v0.AddArg(dst)
15528 v1 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
15529 v1.Aux = typeToAux(t3)
15530 v2 := b.NewValue0(v.Pos, OpOffPtr, tt3)
15531 v2.AuxInt = int64ToAuxInt(o3)
15532 v2.AddArg(dst)
15533 v3 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
15534 v3.Aux = typeToAux(t4)
15535 v4 := b.NewValue0(v.Pos, OpOffPtr, tt4)
15536 v4.AuxInt = int64ToAuxInt(0)
15537 v4.AddArg(dst)
15538 v3.AddArg3(v4, d3, mem)
15539 v1.AddArg3(v2, d2, v3)
15540 v.AddArg3(v0, d1, v1)
15541 return true
15542 }
15543
15544
15545
15546 for {
15547 n := auxIntToInt64(v.AuxInt)
15548 t1 := auxToType(v.Aux)
15549 dst := v_0
15550 p1 := v_1
15551 mem := v_2
15552 if mem.Op != OpStore {
15553 break
15554 }
15555 t2 := auxToType(mem.Aux)
15556 _ = mem.Args[2]
15557 op2 := mem.Args[0]
15558 if op2.Op != OpOffPtr {
15559 break
15560 }
15561 tt2 := op2.Type
15562 o2 := auxIntToInt64(op2.AuxInt)
15563 p2 := op2.Args[0]
15564 d1 := mem.Args[1]
15565 mem_2 := mem.Args[2]
15566 if mem_2.Op != OpStore {
15567 break
15568 }
15569 t3 := auxToType(mem_2.Aux)
15570 _ = mem_2.Args[2]
15571 op3 := mem_2.Args[0]
15572 if op3.Op != OpOffPtr {
15573 break
15574 }
15575 tt3 := op3.Type
15576 o3 := auxIntToInt64(op3.AuxInt)
15577 p3 := op3.Args[0]
15578 d2 := mem_2.Args[1]
15579 mem_2_2 := mem_2.Args[2]
15580 if mem_2_2.Op != OpStore {
15581 break
15582 }
15583 t4 := auxToType(mem_2_2.Aux)
15584 _ = mem_2_2.Args[2]
15585 op4 := mem_2_2.Args[0]
15586 if op4.Op != OpOffPtr {
15587 break
15588 }
15589 tt4 := op4.Type
15590 o4 := auxIntToInt64(op4.AuxInt)
15591 p4 := op4.Args[0]
15592 d3 := mem_2_2.Args[1]
15593 mem_2_2_2 := mem_2_2.Args[2]
15594 if mem_2_2_2.Op != OpStore {
15595 break
15596 }
15597 t5 := auxToType(mem_2_2_2.Aux)
15598 d4 := mem_2_2_2.Args[1]
15599 op5 := mem_2_2_2.Args[0]
15600 if op5.Op != OpOffPtr {
15601 break
15602 }
15603 tt5 := op5.Type
15604 if auxIntToInt64(op5.AuxInt) != 0 {
15605 break
15606 }
15607 p5 := op5.Args[0]
15608 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()) {
15609 break
15610 }
15611 v.reset(OpStore)
15612 v.Aux = typeToAux(t2)
15613 v0 := b.NewValue0(v.Pos, OpOffPtr, tt2)
15614 v0.AuxInt = int64ToAuxInt(o2)
15615 v0.AddArg(dst)
15616 v1 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
15617 v1.Aux = typeToAux(t3)
15618 v2 := b.NewValue0(v.Pos, OpOffPtr, tt3)
15619 v2.AuxInt = int64ToAuxInt(o3)
15620 v2.AddArg(dst)
15621 v3 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
15622 v3.Aux = typeToAux(t4)
15623 v4 := b.NewValue0(v.Pos, OpOffPtr, tt4)
15624 v4.AuxInt = int64ToAuxInt(o4)
15625 v4.AddArg(dst)
15626 v5 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
15627 v5.Aux = typeToAux(t5)
15628 v6 := b.NewValue0(v.Pos, OpOffPtr, tt5)
15629 v6.AuxInt = int64ToAuxInt(0)
15630 v6.AddArg(dst)
15631 v5.AddArg3(v6, d4, mem)
15632 v3.AddArg3(v4, d3, v5)
15633 v1.AddArg3(v2, d2, v3)
15634 v.AddArg3(v0, d1, v1)
15635 return true
15636 }
15637
15638
15639
15640 for {
15641 n := auxIntToInt64(v.AuxInt)
15642 t1 := auxToType(v.Aux)
15643 dst := v_0
15644 p1 := v_1
15645 mem := v_2
15646 if mem.Op != OpVarDef {
15647 break
15648 }
15649 mem_0 := mem.Args[0]
15650 if mem_0.Op != OpStore {
15651 break
15652 }
15653 t2 := auxToType(mem_0.Aux)
15654 _ = mem_0.Args[2]
15655 op2 := mem_0.Args[0]
15656 if op2.Op != OpOffPtr {
15657 break
15658 }
15659 tt2 := op2.Type
15660 o2 := auxIntToInt64(op2.AuxInt)
15661 p2 := op2.Args[0]
15662 d1 := mem_0.Args[1]
15663 mem_0_2 := mem_0.Args[2]
15664 if mem_0_2.Op != OpStore {
15665 break
15666 }
15667 t3 := auxToType(mem_0_2.Aux)
15668 d2 := mem_0_2.Args[1]
15669 op3 := mem_0_2.Args[0]
15670 if op3.Op != OpOffPtr {
15671 break
15672 }
15673 tt3 := op3.Type
15674 if auxIntToInt64(op3.AuxInt) != 0 {
15675 break
15676 }
15677 p3 := op3.Args[0]
15678 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()) {
15679 break
15680 }
15681 v.reset(OpStore)
15682 v.Aux = typeToAux(t2)
15683 v0 := b.NewValue0(v.Pos, OpOffPtr, tt2)
15684 v0.AuxInt = int64ToAuxInt(o2)
15685 v0.AddArg(dst)
15686 v1 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
15687 v1.Aux = typeToAux(t3)
15688 v2 := b.NewValue0(v.Pos, OpOffPtr, tt3)
15689 v2.AuxInt = int64ToAuxInt(0)
15690 v2.AddArg(dst)
15691 v1.AddArg3(v2, d2, mem)
15692 v.AddArg3(v0, d1, v1)
15693 return true
15694 }
15695
15696
15697
15698 for {
15699 n := auxIntToInt64(v.AuxInt)
15700 t1 := auxToType(v.Aux)
15701 dst := v_0
15702 p1 := v_1
15703 mem := v_2
15704 if mem.Op != OpVarDef {
15705 break
15706 }
15707 mem_0 := mem.Args[0]
15708 if mem_0.Op != OpStore {
15709 break
15710 }
15711 t2 := auxToType(mem_0.Aux)
15712 _ = mem_0.Args[2]
15713 op2 := mem_0.Args[0]
15714 if op2.Op != OpOffPtr {
15715 break
15716 }
15717 tt2 := op2.Type
15718 o2 := auxIntToInt64(op2.AuxInt)
15719 p2 := op2.Args[0]
15720 d1 := mem_0.Args[1]
15721 mem_0_2 := mem_0.Args[2]
15722 if mem_0_2.Op != OpStore {
15723 break
15724 }
15725 t3 := auxToType(mem_0_2.Aux)
15726 _ = mem_0_2.Args[2]
15727 op3 := mem_0_2.Args[0]
15728 if op3.Op != OpOffPtr {
15729 break
15730 }
15731 tt3 := op3.Type
15732 o3 := auxIntToInt64(op3.AuxInt)
15733 p3 := op3.Args[0]
15734 d2 := mem_0_2.Args[1]
15735 mem_0_2_2 := mem_0_2.Args[2]
15736 if mem_0_2_2.Op != OpStore {
15737 break
15738 }
15739 t4 := auxToType(mem_0_2_2.Aux)
15740 d3 := mem_0_2_2.Args[1]
15741 op4 := mem_0_2_2.Args[0]
15742 if op4.Op != OpOffPtr {
15743 break
15744 }
15745 tt4 := op4.Type
15746 if auxIntToInt64(op4.AuxInt) != 0 {
15747 break
15748 }
15749 p4 := op4.Args[0]
15750 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()) {
15751 break
15752 }
15753 v.reset(OpStore)
15754 v.Aux = typeToAux(t2)
15755 v0 := b.NewValue0(v.Pos, OpOffPtr, tt2)
15756 v0.AuxInt = int64ToAuxInt(o2)
15757 v0.AddArg(dst)
15758 v1 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
15759 v1.Aux = typeToAux(t3)
15760 v2 := b.NewValue0(v.Pos, OpOffPtr, tt3)
15761 v2.AuxInt = int64ToAuxInt(o3)
15762 v2.AddArg(dst)
15763 v3 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
15764 v3.Aux = typeToAux(t4)
15765 v4 := b.NewValue0(v.Pos, OpOffPtr, tt4)
15766 v4.AuxInt = int64ToAuxInt(0)
15767 v4.AddArg(dst)
15768 v3.AddArg3(v4, d3, mem)
15769 v1.AddArg3(v2, d2, v3)
15770 v.AddArg3(v0, d1, v1)
15771 return true
15772 }
15773
15774
15775
15776 for {
15777 n := auxIntToInt64(v.AuxInt)
15778 t1 := auxToType(v.Aux)
15779 dst := v_0
15780 p1 := v_1
15781 mem := v_2
15782 if mem.Op != OpVarDef {
15783 break
15784 }
15785 mem_0 := mem.Args[0]
15786 if mem_0.Op != OpStore {
15787 break
15788 }
15789 t2 := auxToType(mem_0.Aux)
15790 _ = mem_0.Args[2]
15791 op2 := mem_0.Args[0]
15792 if op2.Op != OpOffPtr {
15793 break
15794 }
15795 tt2 := op2.Type
15796 o2 := auxIntToInt64(op2.AuxInt)
15797 p2 := op2.Args[0]
15798 d1 := mem_0.Args[1]
15799 mem_0_2 := mem_0.Args[2]
15800 if mem_0_2.Op != OpStore {
15801 break
15802 }
15803 t3 := auxToType(mem_0_2.Aux)
15804 _ = mem_0_2.Args[2]
15805 op3 := mem_0_2.Args[0]
15806 if op3.Op != OpOffPtr {
15807 break
15808 }
15809 tt3 := op3.Type
15810 o3 := auxIntToInt64(op3.AuxInt)
15811 p3 := op3.Args[0]
15812 d2 := mem_0_2.Args[1]
15813 mem_0_2_2 := mem_0_2.Args[2]
15814 if mem_0_2_2.Op != OpStore {
15815 break
15816 }
15817 t4 := auxToType(mem_0_2_2.Aux)
15818 _ = mem_0_2_2.Args[2]
15819 op4 := mem_0_2_2.Args[0]
15820 if op4.Op != OpOffPtr {
15821 break
15822 }
15823 tt4 := op4.Type
15824 o4 := auxIntToInt64(op4.AuxInt)
15825 p4 := op4.Args[0]
15826 d3 := mem_0_2_2.Args[1]
15827 mem_0_2_2_2 := mem_0_2_2.Args[2]
15828 if mem_0_2_2_2.Op != OpStore {
15829 break
15830 }
15831 t5 := auxToType(mem_0_2_2_2.Aux)
15832 d4 := mem_0_2_2_2.Args[1]
15833 op5 := mem_0_2_2_2.Args[0]
15834 if op5.Op != OpOffPtr {
15835 break
15836 }
15837 tt5 := op5.Type
15838 if auxIntToInt64(op5.AuxInt) != 0 {
15839 break
15840 }
15841 p5 := op5.Args[0]
15842 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()) {
15843 break
15844 }
15845 v.reset(OpStore)
15846 v.Aux = typeToAux(t2)
15847 v0 := b.NewValue0(v.Pos, OpOffPtr, tt2)
15848 v0.AuxInt = int64ToAuxInt(o2)
15849 v0.AddArg(dst)
15850 v1 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
15851 v1.Aux = typeToAux(t3)
15852 v2 := b.NewValue0(v.Pos, OpOffPtr, tt3)
15853 v2.AuxInt = int64ToAuxInt(o3)
15854 v2.AddArg(dst)
15855 v3 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
15856 v3.Aux = typeToAux(t4)
15857 v4 := b.NewValue0(v.Pos, OpOffPtr, tt4)
15858 v4.AuxInt = int64ToAuxInt(o4)
15859 v4.AddArg(dst)
15860 v5 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
15861 v5.Aux = typeToAux(t5)
15862 v6 := b.NewValue0(v.Pos, OpOffPtr, tt5)
15863 v6.AuxInt = int64ToAuxInt(0)
15864 v6.AddArg(dst)
15865 v5.AddArg3(v6, d4, mem)
15866 v3.AddArg3(v4, d3, v5)
15867 v1.AddArg3(v2, d2, v3)
15868 v.AddArg3(v0, d1, v1)
15869 return true
15870 }
15871
15872
15873
15874 for {
15875 n := auxIntToInt64(v.AuxInt)
15876 t1 := auxToType(v.Aux)
15877 dst := v_0
15878 p1 := v_1
15879 mem := v_2
15880 if mem.Op != OpStore {
15881 break
15882 }
15883 t2 := auxToType(mem.Aux)
15884 _ = mem.Args[2]
15885 op2 := mem.Args[0]
15886 if op2.Op != OpOffPtr {
15887 break
15888 }
15889 tt2 := op2.Type
15890 o2 := auxIntToInt64(op2.AuxInt)
15891 p2 := op2.Args[0]
15892 d1 := mem.Args[1]
15893 mem_2 := mem.Args[2]
15894 if mem_2.Op != OpZero || auxIntToInt64(mem_2.AuxInt) != n {
15895 break
15896 }
15897 t3 := auxToType(mem_2.Aux)
15898 p3 := mem_2.Args[0]
15899 if !(isSamePtr(p1, p2) && isSamePtr(p2, p3) && t2.Alignment() <= t1.Alignment() && t3.Alignment() <= t1.Alignment() && registerizable(b, t2) && n >= o2+t2.Size()) {
15900 break
15901 }
15902 v.reset(OpStore)
15903 v.Aux = typeToAux(t2)
15904 v0 := b.NewValue0(v.Pos, OpOffPtr, tt2)
15905 v0.AuxInt = int64ToAuxInt(o2)
15906 v0.AddArg(dst)
15907 v1 := b.NewValue0(v.Pos, OpZero, types.TypeMem)
15908 v1.AuxInt = int64ToAuxInt(n)
15909 v1.Aux = typeToAux(t1)
15910 v1.AddArg2(dst, mem)
15911 v.AddArg3(v0, d1, v1)
15912 return true
15913 }
15914
15915
15916
15917 for {
15918 n := auxIntToInt64(v.AuxInt)
15919 t1 := auxToType(v.Aux)
15920 dst := v_0
15921 p1 := v_1
15922 mem := v_2
15923 if mem.Op != OpStore {
15924 break
15925 }
15926 t2 := auxToType(mem.Aux)
15927 _ = mem.Args[2]
15928 mem_0 := mem.Args[0]
15929 if mem_0.Op != OpOffPtr {
15930 break
15931 }
15932 tt2 := mem_0.Type
15933 o2 := auxIntToInt64(mem_0.AuxInt)
15934 p2 := mem_0.Args[0]
15935 d1 := mem.Args[1]
15936 mem_2 := mem.Args[2]
15937 if mem_2.Op != OpStore {
15938 break
15939 }
15940 t3 := auxToType(mem_2.Aux)
15941 _ = mem_2.Args[2]
15942 mem_2_0 := mem_2.Args[0]
15943 if mem_2_0.Op != OpOffPtr {
15944 break
15945 }
15946 tt3 := mem_2_0.Type
15947 o3 := auxIntToInt64(mem_2_0.AuxInt)
15948 p3 := mem_2_0.Args[0]
15949 d2 := mem_2.Args[1]
15950 mem_2_2 := mem_2.Args[2]
15951 if mem_2_2.Op != OpZero || auxIntToInt64(mem_2_2.AuxInt) != n {
15952 break
15953 }
15954 t4 := auxToType(mem_2_2.Aux)
15955 p4 := mem_2_2.Args[0]
15956 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()) {
15957 break
15958 }
15959 v.reset(OpStore)
15960 v.Aux = typeToAux(t2)
15961 v0 := b.NewValue0(v.Pos, OpOffPtr, tt2)
15962 v0.AuxInt = int64ToAuxInt(o2)
15963 v0.AddArg(dst)
15964 v1 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
15965 v1.Aux = typeToAux(t3)
15966 v2 := b.NewValue0(v.Pos, OpOffPtr, tt3)
15967 v2.AuxInt = int64ToAuxInt(o3)
15968 v2.AddArg(dst)
15969 v3 := b.NewValue0(v.Pos, OpZero, types.TypeMem)
15970 v3.AuxInt = int64ToAuxInt(n)
15971 v3.Aux = typeToAux(t1)
15972 v3.AddArg2(dst, mem)
15973 v1.AddArg3(v2, d2, v3)
15974 v.AddArg3(v0, d1, v1)
15975 return true
15976 }
15977
15978
15979
15980 for {
15981 n := auxIntToInt64(v.AuxInt)
15982 t1 := auxToType(v.Aux)
15983 dst := v_0
15984 p1 := v_1
15985 mem := v_2
15986 if mem.Op != OpStore {
15987 break
15988 }
15989 t2 := auxToType(mem.Aux)
15990 _ = mem.Args[2]
15991 mem_0 := mem.Args[0]
15992 if mem_0.Op != OpOffPtr {
15993 break
15994 }
15995 tt2 := mem_0.Type
15996 o2 := auxIntToInt64(mem_0.AuxInt)
15997 p2 := mem_0.Args[0]
15998 d1 := mem.Args[1]
15999 mem_2 := mem.Args[2]
16000 if mem_2.Op != OpStore {
16001 break
16002 }
16003 t3 := auxToType(mem_2.Aux)
16004 _ = mem_2.Args[2]
16005 mem_2_0 := mem_2.Args[0]
16006 if mem_2_0.Op != OpOffPtr {
16007 break
16008 }
16009 tt3 := mem_2_0.Type
16010 o3 := auxIntToInt64(mem_2_0.AuxInt)
16011 p3 := mem_2_0.Args[0]
16012 d2 := mem_2.Args[1]
16013 mem_2_2 := mem_2.Args[2]
16014 if mem_2_2.Op != OpStore {
16015 break
16016 }
16017 t4 := auxToType(mem_2_2.Aux)
16018 _ = mem_2_2.Args[2]
16019 mem_2_2_0 := mem_2_2.Args[0]
16020 if mem_2_2_0.Op != OpOffPtr {
16021 break
16022 }
16023 tt4 := mem_2_2_0.Type
16024 o4 := auxIntToInt64(mem_2_2_0.AuxInt)
16025 p4 := mem_2_2_0.Args[0]
16026 d3 := mem_2_2.Args[1]
16027 mem_2_2_2 := mem_2_2.Args[2]
16028 if mem_2_2_2.Op != OpZero || auxIntToInt64(mem_2_2_2.AuxInt) != n {
16029 break
16030 }
16031 t5 := auxToType(mem_2_2_2.Aux)
16032 p5 := mem_2_2_2.Args[0]
16033 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()) {
16034 break
16035 }
16036 v.reset(OpStore)
16037 v.Aux = typeToAux(t2)
16038 v0 := b.NewValue0(v.Pos, OpOffPtr, tt2)
16039 v0.AuxInt = int64ToAuxInt(o2)
16040 v0.AddArg(dst)
16041 v1 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
16042 v1.Aux = typeToAux(t3)
16043 v2 := b.NewValue0(v.Pos, OpOffPtr, tt3)
16044 v2.AuxInt = int64ToAuxInt(o3)
16045 v2.AddArg(dst)
16046 v3 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
16047 v3.Aux = typeToAux(t4)
16048 v4 := b.NewValue0(v.Pos, OpOffPtr, tt4)
16049 v4.AuxInt = int64ToAuxInt(o4)
16050 v4.AddArg(dst)
16051 v5 := b.NewValue0(v.Pos, OpZero, types.TypeMem)
16052 v5.AuxInt = int64ToAuxInt(n)
16053 v5.Aux = typeToAux(t1)
16054 v5.AddArg2(dst, mem)
16055 v3.AddArg3(v4, d3, v5)
16056 v1.AddArg3(v2, d2, v3)
16057 v.AddArg3(v0, d1, v1)
16058 return true
16059 }
16060
16061
16062
16063 for {
16064 n := auxIntToInt64(v.AuxInt)
16065 t1 := auxToType(v.Aux)
16066 dst := v_0
16067 p1 := v_1
16068 mem := v_2
16069 if mem.Op != OpStore {
16070 break
16071 }
16072 t2 := auxToType(mem.Aux)
16073 _ = mem.Args[2]
16074 mem_0 := mem.Args[0]
16075 if mem_0.Op != OpOffPtr {
16076 break
16077 }
16078 tt2 := mem_0.Type
16079 o2 := auxIntToInt64(mem_0.AuxInt)
16080 p2 := mem_0.Args[0]
16081 d1 := mem.Args[1]
16082 mem_2 := mem.Args[2]
16083 if mem_2.Op != OpStore {
16084 break
16085 }
16086 t3 := auxToType(mem_2.Aux)
16087 _ = mem_2.Args[2]
16088 mem_2_0 := mem_2.Args[0]
16089 if mem_2_0.Op != OpOffPtr {
16090 break
16091 }
16092 tt3 := mem_2_0.Type
16093 o3 := auxIntToInt64(mem_2_0.AuxInt)
16094 p3 := mem_2_0.Args[0]
16095 d2 := mem_2.Args[1]
16096 mem_2_2 := mem_2.Args[2]
16097 if mem_2_2.Op != OpStore {
16098 break
16099 }
16100 t4 := auxToType(mem_2_2.Aux)
16101 _ = mem_2_2.Args[2]
16102 mem_2_2_0 := mem_2_2.Args[0]
16103 if mem_2_2_0.Op != OpOffPtr {
16104 break
16105 }
16106 tt4 := mem_2_2_0.Type
16107 o4 := auxIntToInt64(mem_2_2_0.AuxInt)
16108 p4 := mem_2_2_0.Args[0]
16109 d3 := mem_2_2.Args[1]
16110 mem_2_2_2 := mem_2_2.Args[2]
16111 if mem_2_2_2.Op != OpStore {
16112 break
16113 }
16114 t5 := auxToType(mem_2_2_2.Aux)
16115 _ = mem_2_2_2.Args[2]
16116 mem_2_2_2_0 := mem_2_2_2.Args[0]
16117 if mem_2_2_2_0.Op != OpOffPtr {
16118 break
16119 }
16120 tt5 := mem_2_2_2_0.Type
16121 o5 := auxIntToInt64(mem_2_2_2_0.AuxInt)
16122 p5 := mem_2_2_2_0.Args[0]
16123 d4 := mem_2_2_2.Args[1]
16124 mem_2_2_2_2 := mem_2_2_2.Args[2]
16125 if mem_2_2_2_2.Op != OpZero || auxIntToInt64(mem_2_2_2_2.AuxInt) != n {
16126 break
16127 }
16128 t6 := auxToType(mem_2_2_2_2.Aux)
16129 p6 := mem_2_2_2_2.Args[0]
16130 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()) {
16131 break
16132 }
16133 v.reset(OpStore)
16134 v.Aux = typeToAux(t2)
16135 v0 := b.NewValue0(v.Pos, OpOffPtr, tt2)
16136 v0.AuxInt = int64ToAuxInt(o2)
16137 v0.AddArg(dst)
16138 v1 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
16139 v1.Aux = typeToAux(t3)
16140 v2 := b.NewValue0(v.Pos, OpOffPtr, tt3)
16141 v2.AuxInt = int64ToAuxInt(o3)
16142 v2.AddArg(dst)
16143 v3 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
16144 v3.Aux = typeToAux(t4)
16145 v4 := b.NewValue0(v.Pos, OpOffPtr, tt4)
16146 v4.AuxInt = int64ToAuxInt(o4)
16147 v4.AddArg(dst)
16148 v5 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
16149 v5.Aux = typeToAux(t5)
16150 v6 := b.NewValue0(v.Pos, OpOffPtr, tt5)
16151 v6.AuxInt = int64ToAuxInt(o5)
16152 v6.AddArg(dst)
16153 v7 := b.NewValue0(v.Pos, OpZero, types.TypeMem)
16154 v7.AuxInt = int64ToAuxInt(n)
16155 v7.Aux = typeToAux(t1)
16156 v7.AddArg2(dst, mem)
16157 v5.AddArg3(v6, d4, v7)
16158 v3.AddArg3(v4, d3, v5)
16159 v1.AddArg3(v2, d2, v3)
16160 v.AddArg3(v0, d1, v1)
16161 return true
16162 }
16163
16164
16165
16166 for {
16167 n := auxIntToInt64(v.AuxInt)
16168 t1 := auxToType(v.Aux)
16169 dst := v_0
16170 p1 := v_1
16171 mem := v_2
16172 if mem.Op != OpVarDef {
16173 break
16174 }
16175 mem_0 := mem.Args[0]
16176 if mem_0.Op != OpStore {
16177 break
16178 }
16179 t2 := auxToType(mem_0.Aux)
16180 _ = mem_0.Args[2]
16181 op2 := mem_0.Args[0]
16182 if op2.Op != OpOffPtr {
16183 break
16184 }
16185 tt2 := op2.Type
16186 o2 := auxIntToInt64(op2.AuxInt)
16187 p2 := op2.Args[0]
16188 d1 := mem_0.Args[1]
16189 mem_0_2 := mem_0.Args[2]
16190 if mem_0_2.Op != OpZero || auxIntToInt64(mem_0_2.AuxInt) != n {
16191 break
16192 }
16193 t3 := auxToType(mem_0_2.Aux)
16194 p3 := mem_0_2.Args[0]
16195 if !(isSamePtr(p1, p2) && isSamePtr(p2, p3) && t2.Alignment() <= t1.Alignment() && t3.Alignment() <= t1.Alignment() && registerizable(b, t2) && n >= o2+t2.Size()) {
16196 break
16197 }
16198 v.reset(OpStore)
16199 v.Aux = typeToAux(t2)
16200 v0 := b.NewValue0(v.Pos, OpOffPtr, tt2)
16201 v0.AuxInt = int64ToAuxInt(o2)
16202 v0.AddArg(dst)
16203 v1 := b.NewValue0(v.Pos, OpZero, types.TypeMem)
16204 v1.AuxInt = int64ToAuxInt(n)
16205 v1.Aux = typeToAux(t1)
16206 v1.AddArg2(dst, mem)
16207 v.AddArg3(v0, d1, v1)
16208 return true
16209 }
16210
16211
16212
16213 for {
16214 n := auxIntToInt64(v.AuxInt)
16215 t1 := auxToType(v.Aux)
16216 dst := v_0
16217 p1 := v_1
16218 mem := v_2
16219 if mem.Op != OpVarDef {
16220 break
16221 }
16222 mem_0 := mem.Args[0]
16223 if mem_0.Op != OpStore {
16224 break
16225 }
16226 t2 := auxToType(mem_0.Aux)
16227 _ = mem_0.Args[2]
16228 mem_0_0 := mem_0.Args[0]
16229 if mem_0_0.Op != OpOffPtr {
16230 break
16231 }
16232 tt2 := mem_0_0.Type
16233 o2 := auxIntToInt64(mem_0_0.AuxInt)
16234 p2 := mem_0_0.Args[0]
16235 d1 := mem_0.Args[1]
16236 mem_0_2 := mem_0.Args[2]
16237 if mem_0_2.Op != OpStore {
16238 break
16239 }
16240 t3 := auxToType(mem_0_2.Aux)
16241 _ = mem_0_2.Args[2]
16242 mem_0_2_0 := mem_0_2.Args[0]
16243 if mem_0_2_0.Op != OpOffPtr {
16244 break
16245 }
16246 tt3 := mem_0_2_0.Type
16247 o3 := auxIntToInt64(mem_0_2_0.AuxInt)
16248 p3 := mem_0_2_0.Args[0]
16249 d2 := mem_0_2.Args[1]
16250 mem_0_2_2 := mem_0_2.Args[2]
16251 if mem_0_2_2.Op != OpZero || auxIntToInt64(mem_0_2_2.AuxInt) != n {
16252 break
16253 }
16254 t4 := auxToType(mem_0_2_2.Aux)
16255 p4 := mem_0_2_2.Args[0]
16256 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()) {
16257 break
16258 }
16259 v.reset(OpStore)
16260 v.Aux = typeToAux(t2)
16261 v0 := b.NewValue0(v.Pos, OpOffPtr, tt2)
16262 v0.AuxInt = int64ToAuxInt(o2)
16263 v0.AddArg(dst)
16264 v1 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
16265 v1.Aux = typeToAux(t3)
16266 v2 := b.NewValue0(v.Pos, OpOffPtr, tt3)
16267 v2.AuxInt = int64ToAuxInt(o3)
16268 v2.AddArg(dst)
16269 v3 := b.NewValue0(v.Pos, OpZero, types.TypeMem)
16270 v3.AuxInt = int64ToAuxInt(n)
16271 v3.Aux = typeToAux(t1)
16272 v3.AddArg2(dst, mem)
16273 v1.AddArg3(v2, d2, v3)
16274 v.AddArg3(v0, d1, v1)
16275 return true
16276 }
16277
16278
16279
16280 for {
16281 n := auxIntToInt64(v.AuxInt)
16282 t1 := auxToType(v.Aux)
16283 dst := v_0
16284 p1 := v_1
16285 mem := v_2
16286 if mem.Op != OpVarDef {
16287 break
16288 }
16289 mem_0 := mem.Args[0]
16290 if mem_0.Op != OpStore {
16291 break
16292 }
16293 t2 := auxToType(mem_0.Aux)
16294 _ = mem_0.Args[2]
16295 mem_0_0 := mem_0.Args[0]
16296 if mem_0_0.Op != OpOffPtr {
16297 break
16298 }
16299 tt2 := mem_0_0.Type
16300 o2 := auxIntToInt64(mem_0_0.AuxInt)
16301 p2 := mem_0_0.Args[0]
16302 d1 := mem_0.Args[1]
16303 mem_0_2 := mem_0.Args[2]
16304 if mem_0_2.Op != OpStore {
16305 break
16306 }
16307 t3 := auxToType(mem_0_2.Aux)
16308 _ = mem_0_2.Args[2]
16309 mem_0_2_0 := mem_0_2.Args[0]
16310 if mem_0_2_0.Op != OpOffPtr {
16311 break
16312 }
16313 tt3 := mem_0_2_0.Type
16314 o3 := auxIntToInt64(mem_0_2_0.AuxInt)
16315 p3 := mem_0_2_0.Args[0]
16316 d2 := mem_0_2.Args[1]
16317 mem_0_2_2 := mem_0_2.Args[2]
16318 if mem_0_2_2.Op != OpStore {
16319 break
16320 }
16321 t4 := auxToType(mem_0_2_2.Aux)
16322 _ = mem_0_2_2.Args[2]
16323 mem_0_2_2_0 := mem_0_2_2.Args[0]
16324 if mem_0_2_2_0.Op != OpOffPtr {
16325 break
16326 }
16327 tt4 := mem_0_2_2_0.Type
16328 o4 := auxIntToInt64(mem_0_2_2_0.AuxInt)
16329 p4 := mem_0_2_2_0.Args[0]
16330 d3 := mem_0_2_2.Args[1]
16331 mem_0_2_2_2 := mem_0_2_2.Args[2]
16332 if mem_0_2_2_2.Op != OpZero || auxIntToInt64(mem_0_2_2_2.AuxInt) != n {
16333 break
16334 }
16335 t5 := auxToType(mem_0_2_2_2.Aux)
16336 p5 := mem_0_2_2_2.Args[0]
16337 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()) {
16338 break
16339 }
16340 v.reset(OpStore)
16341 v.Aux = typeToAux(t2)
16342 v0 := b.NewValue0(v.Pos, OpOffPtr, tt2)
16343 v0.AuxInt = int64ToAuxInt(o2)
16344 v0.AddArg(dst)
16345 v1 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
16346 v1.Aux = typeToAux(t3)
16347 v2 := b.NewValue0(v.Pos, OpOffPtr, tt3)
16348 v2.AuxInt = int64ToAuxInt(o3)
16349 v2.AddArg(dst)
16350 v3 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
16351 v3.Aux = typeToAux(t4)
16352 v4 := b.NewValue0(v.Pos, OpOffPtr, tt4)
16353 v4.AuxInt = int64ToAuxInt(o4)
16354 v4.AddArg(dst)
16355 v5 := b.NewValue0(v.Pos, OpZero, types.TypeMem)
16356 v5.AuxInt = int64ToAuxInt(n)
16357 v5.Aux = typeToAux(t1)
16358 v5.AddArg2(dst, mem)
16359 v3.AddArg3(v4, d3, v5)
16360 v1.AddArg3(v2, d2, v3)
16361 v.AddArg3(v0, d1, v1)
16362 return true
16363 }
16364
16365
16366
16367 for {
16368 n := auxIntToInt64(v.AuxInt)
16369 t1 := auxToType(v.Aux)
16370 dst := v_0
16371 p1 := v_1
16372 mem := v_2
16373 if mem.Op != OpVarDef {
16374 break
16375 }
16376 mem_0 := mem.Args[0]
16377 if mem_0.Op != OpStore {
16378 break
16379 }
16380 t2 := auxToType(mem_0.Aux)
16381 _ = mem_0.Args[2]
16382 mem_0_0 := mem_0.Args[0]
16383 if mem_0_0.Op != OpOffPtr {
16384 break
16385 }
16386 tt2 := mem_0_0.Type
16387 o2 := auxIntToInt64(mem_0_0.AuxInt)
16388 p2 := mem_0_0.Args[0]
16389 d1 := mem_0.Args[1]
16390 mem_0_2 := mem_0.Args[2]
16391 if mem_0_2.Op != OpStore {
16392 break
16393 }
16394 t3 := auxToType(mem_0_2.Aux)
16395 _ = mem_0_2.Args[2]
16396 mem_0_2_0 := mem_0_2.Args[0]
16397 if mem_0_2_0.Op != OpOffPtr {
16398 break
16399 }
16400 tt3 := mem_0_2_0.Type
16401 o3 := auxIntToInt64(mem_0_2_0.AuxInt)
16402 p3 := mem_0_2_0.Args[0]
16403 d2 := mem_0_2.Args[1]
16404 mem_0_2_2 := mem_0_2.Args[2]
16405 if mem_0_2_2.Op != OpStore {
16406 break
16407 }
16408 t4 := auxToType(mem_0_2_2.Aux)
16409 _ = mem_0_2_2.Args[2]
16410 mem_0_2_2_0 := mem_0_2_2.Args[0]
16411 if mem_0_2_2_0.Op != OpOffPtr {
16412 break
16413 }
16414 tt4 := mem_0_2_2_0.Type
16415 o4 := auxIntToInt64(mem_0_2_2_0.AuxInt)
16416 p4 := mem_0_2_2_0.Args[0]
16417 d3 := mem_0_2_2.Args[1]
16418 mem_0_2_2_2 := mem_0_2_2.Args[2]
16419 if mem_0_2_2_2.Op != OpStore {
16420 break
16421 }
16422 t5 := auxToType(mem_0_2_2_2.Aux)
16423 _ = mem_0_2_2_2.Args[2]
16424 mem_0_2_2_2_0 := mem_0_2_2_2.Args[0]
16425 if mem_0_2_2_2_0.Op != OpOffPtr {
16426 break
16427 }
16428 tt5 := mem_0_2_2_2_0.Type
16429 o5 := auxIntToInt64(mem_0_2_2_2_0.AuxInt)
16430 p5 := mem_0_2_2_2_0.Args[0]
16431 d4 := mem_0_2_2_2.Args[1]
16432 mem_0_2_2_2_2 := mem_0_2_2_2.Args[2]
16433 if mem_0_2_2_2_2.Op != OpZero || auxIntToInt64(mem_0_2_2_2_2.AuxInt) != n {
16434 break
16435 }
16436 t6 := auxToType(mem_0_2_2_2_2.Aux)
16437 p6 := mem_0_2_2_2_2.Args[0]
16438 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()) {
16439 break
16440 }
16441 v.reset(OpStore)
16442 v.Aux = typeToAux(t2)
16443 v0 := b.NewValue0(v.Pos, OpOffPtr, tt2)
16444 v0.AuxInt = int64ToAuxInt(o2)
16445 v0.AddArg(dst)
16446 v1 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
16447 v1.Aux = typeToAux(t3)
16448 v2 := b.NewValue0(v.Pos, OpOffPtr, tt3)
16449 v2.AuxInt = int64ToAuxInt(o3)
16450 v2.AddArg(dst)
16451 v3 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
16452 v3.Aux = typeToAux(t4)
16453 v4 := b.NewValue0(v.Pos, OpOffPtr, tt4)
16454 v4.AuxInt = int64ToAuxInt(o4)
16455 v4.AddArg(dst)
16456 v5 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
16457 v5.Aux = typeToAux(t5)
16458 v6 := b.NewValue0(v.Pos, OpOffPtr, tt5)
16459 v6.AuxInt = int64ToAuxInt(o5)
16460 v6.AddArg(dst)
16461 v7 := b.NewValue0(v.Pos, OpZero, types.TypeMem)
16462 v7.AuxInt = int64ToAuxInt(n)
16463 v7.Aux = typeToAux(t1)
16464 v7.AddArg2(dst, mem)
16465 v5.AddArg3(v6, d4, v7)
16466 v3.AddArg3(v4, d3, v5)
16467 v1.AddArg3(v2, d2, v3)
16468 v.AddArg3(v0, d1, v1)
16469 return true
16470 }
16471
16472
16473
16474 for {
16475 s := auxIntToInt64(v.AuxInt)
16476 t1 := auxToType(v.Aux)
16477 dst := v_0
16478 tmp1 := v_1
16479 midmem := v_2
16480 if midmem.Op != OpMove || auxIntToInt64(midmem.AuxInt) != s {
16481 break
16482 }
16483 t2 := auxToType(midmem.Aux)
16484 src := midmem.Args[1]
16485 tmp2 := midmem.Args[0]
16486 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))) {
16487 break
16488 }
16489 v.reset(OpMove)
16490 v.AuxInt = int64ToAuxInt(s)
16491 v.Aux = typeToAux(t1)
16492 v.AddArg3(dst, src, midmem)
16493 return true
16494 }
16495
16496
16497
16498 for {
16499 s := auxIntToInt64(v.AuxInt)
16500 t1 := auxToType(v.Aux)
16501 dst := v_0
16502 tmp1 := v_1
16503 midmem := v_2
16504 if midmem.Op != OpVarDef {
16505 break
16506 }
16507 midmem_0 := midmem.Args[0]
16508 if midmem_0.Op != OpMove || auxIntToInt64(midmem_0.AuxInt) != s {
16509 break
16510 }
16511 t2 := auxToType(midmem_0.Aux)
16512 src := midmem_0.Args[1]
16513 tmp2 := midmem_0.Args[0]
16514 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))) {
16515 break
16516 }
16517 v.reset(OpMove)
16518 v.AuxInt = int64ToAuxInt(s)
16519 v.Aux = typeToAux(t1)
16520 v.AddArg3(dst, src, midmem)
16521 return true
16522 }
16523
16524
16525
16526 for {
16527 dst := v_0
16528 src := v_1
16529 mem := v_2
16530 if !(isSamePtr(dst, src)) {
16531 break
16532 }
16533 v.copyOf(mem)
16534 return true
16535 }
16536 return false
16537 }
16538 func rewriteValuegeneric_OpMul16(v *Value) bool {
16539 v_1 := v.Args[1]
16540 v_0 := v.Args[0]
16541 b := v.Block
16542 typ := &b.Func.Config.Types
16543
16544
16545 for {
16546 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
16547 if v_0.Op != OpConst16 {
16548 continue
16549 }
16550 c := auxIntToInt16(v_0.AuxInt)
16551 if v_1.Op != OpConst16 {
16552 continue
16553 }
16554 d := auxIntToInt16(v_1.AuxInt)
16555 v.reset(OpConst16)
16556 v.AuxInt = int16ToAuxInt(c * d)
16557 return true
16558 }
16559 break
16560 }
16561
16562
16563 for {
16564 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
16565 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 1 {
16566 continue
16567 }
16568 x := v_1
16569 v.copyOf(x)
16570 return true
16571 }
16572 break
16573 }
16574
16575
16576 for {
16577 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
16578 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != -1 {
16579 continue
16580 }
16581 x := v_1
16582 v.reset(OpNeg16)
16583 v.AddArg(x)
16584 return true
16585 }
16586 break
16587 }
16588
16589
16590
16591 for {
16592 t := v.Type
16593 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
16594 n := v_0
16595 if v_1.Op != OpConst16 {
16596 continue
16597 }
16598 c := auxIntToInt16(v_1.AuxInt)
16599 if !(isPowerOfTwo16(c)) {
16600 continue
16601 }
16602 v.reset(OpLsh16x64)
16603 v.Type = t
16604 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
16605 v0.AuxInt = int64ToAuxInt(log16(c))
16606 v.AddArg2(n, v0)
16607 return true
16608 }
16609 break
16610 }
16611
16612
16613
16614 for {
16615 t := v.Type
16616 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
16617 n := v_0
16618 if v_1.Op != OpConst16 {
16619 continue
16620 }
16621 c := auxIntToInt16(v_1.AuxInt)
16622 if !(t.IsSigned() && isPowerOfTwo16(-c)) {
16623 continue
16624 }
16625 v.reset(OpNeg16)
16626 v0 := b.NewValue0(v.Pos, OpLsh16x64, t)
16627 v1 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
16628 v1.AuxInt = int64ToAuxInt(log16(-c))
16629 v0.AddArg2(n, v1)
16630 v.AddArg(v0)
16631 return true
16632 }
16633 break
16634 }
16635
16636
16637 for {
16638 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
16639 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 {
16640 continue
16641 }
16642 v.reset(OpConst16)
16643 v.AuxInt = int16ToAuxInt(0)
16644 return true
16645 }
16646 break
16647 }
16648
16649
16650
16651 for {
16652 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
16653 if v_0.Op != OpMul16 {
16654 continue
16655 }
16656 _ = v_0.Args[1]
16657 v_0_0 := v_0.Args[0]
16658 v_0_1 := v_0.Args[1]
16659 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
16660 i := v_0_0
16661 if i.Op != OpConst16 {
16662 continue
16663 }
16664 t := i.Type
16665 z := v_0_1
16666 x := v_1
16667 if !(z.Op != OpConst16 && x.Op != OpConst16) {
16668 continue
16669 }
16670 v.reset(OpMul16)
16671 v0 := b.NewValue0(v.Pos, OpMul16, t)
16672 v0.AddArg2(x, z)
16673 v.AddArg2(i, v0)
16674 return true
16675 }
16676 }
16677 break
16678 }
16679
16680
16681 for {
16682 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
16683 if v_0.Op != OpConst16 {
16684 continue
16685 }
16686 t := v_0.Type
16687 c := auxIntToInt16(v_0.AuxInt)
16688 if v_1.Op != OpMul16 {
16689 continue
16690 }
16691 _ = v_1.Args[1]
16692 v_1_0 := v_1.Args[0]
16693 v_1_1 := v_1.Args[1]
16694 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
16695 if v_1_0.Op != OpConst16 || v_1_0.Type != t {
16696 continue
16697 }
16698 d := auxIntToInt16(v_1_0.AuxInt)
16699 x := v_1_1
16700 v.reset(OpMul16)
16701 v0 := b.NewValue0(v.Pos, OpConst16, t)
16702 v0.AuxInt = int16ToAuxInt(c * d)
16703 v.AddArg2(v0, x)
16704 return true
16705 }
16706 }
16707 break
16708 }
16709 return false
16710 }
16711 func rewriteValuegeneric_OpMul32(v *Value) bool {
16712 v_1 := v.Args[1]
16713 v_0 := v.Args[0]
16714 b := v.Block
16715 typ := &b.Func.Config.Types
16716
16717
16718 for {
16719 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
16720 if v_0.Op != OpConst32 {
16721 continue
16722 }
16723 c := auxIntToInt32(v_0.AuxInt)
16724 if v_1.Op != OpConst32 {
16725 continue
16726 }
16727 d := auxIntToInt32(v_1.AuxInt)
16728 v.reset(OpConst32)
16729 v.AuxInt = int32ToAuxInt(c * d)
16730 return true
16731 }
16732 break
16733 }
16734
16735
16736 for {
16737 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
16738 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 1 {
16739 continue
16740 }
16741 x := v_1
16742 v.copyOf(x)
16743 return true
16744 }
16745 break
16746 }
16747
16748
16749 for {
16750 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
16751 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != -1 {
16752 continue
16753 }
16754 x := v_1
16755 v.reset(OpNeg32)
16756 v.AddArg(x)
16757 return true
16758 }
16759 break
16760 }
16761
16762
16763
16764 for {
16765 t := v.Type
16766 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
16767 n := v_0
16768 if v_1.Op != OpConst32 {
16769 continue
16770 }
16771 c := auxIntToInt32(v_1.AuxInt)
16772 if !(isPowerOfTwo32(c)) {
16773 continue
16774 }
16775 v.reset(OpLsh32x64)
16776 v.Type = t
16777 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
16778 v0.AuxInt = int64ToAuxInt(log32(c))
16779 v.AddArg2(n, v0)
16780 return true
16781 }
16782 break
16783 }
16784
16785
16786
16787 for {
16788 t := v.Type
16789 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
16790 n := v_0
16791 if v_1.Op != OpConst32 {
16792 continue
16793 }
16794 c := auxIntToInt32(v_1.AuxInt)
16795 if !(t.IsSigned() && isPowerOfTwo32(-c)) {
16796 continue
16797 }
16798 v.reset(OpNeg32)
16799 v0 := b.NewValue0(v.Pos, OpLsh32x64, t)
16800 v1 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
16801 v1.AuxInt = int64ToAuxInt(log32(-c))
16802 v0.AddArg2(n, v1)
16803 v.AddArg(v0)
16804 return true
16805 }
16806 break
16807 }
16808
16809
16810 for {
16811 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
16812 if v_0.Op != OpConst32 {
16813 continue
16814 }
16815 t := v_0.Type
16816 c := auxIntToInt32(v_0.AuxInt)
16817 if v_1.Op != OpAdd32 || v_1.Type != t {
16818 continue
16819 }
16820 _ = v_1.Args[1]
16821 v_1_0 := v_1.Args[0]
16822 v_1_1 := v_1.Args[1]
16823 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
16824 if v_1_0.Op != OpConst32 || v_1_0.Type != t {
16825 continue
16826 }
16827 d := auxIntToInt32(v_1_0.AuxInt)
16828 x := v_1_1
16829 v.reset(OpAdd32)
16830 v0 := b.NewValue0(v.Pos, OpConst32, t)
16831 v0.AuxInt = int32ToAuxInt(c * d)
16832 v1 := b.NewValue0(v.Pos, OpMul32, t)
16833 v2 := b.NewValue0(v.Pos, OpConst32, t)
16834 v2.AuxInt = int32ToAuxInt(c)
16835 v1.AddArg2(v2, x)
16836 v.AddArg2(v0, v1)
16837 return true
16838 }
16839 }
16840 break
16841 }
16842
16843
16844 for {
16845 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
16846 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
16847 continue
16848 }
16849 v.reset(OpConst32)
16850 v.AuxInt = int32ToAuxInt(0)
16851 return true
16852 }
16853 break
16854 }
16855
16856
16857
16858 for {
16859 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
16860 if v_0.Op != OpMul32 {
16861 continue
16862 }
16863 _ = v_0.Args[1]
16864 v_0_0 := v_0.Args[0]
16865 v_0_1 := v_0.Args[1]
16866 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
16867 i := v_0_0
16868 if i.Op != OpConst32 {
16869 continue
16870 }
16871 t := i.Type
16872 z := v_0_1
16873 x := v_1
16874 if !(z.Op != OpConst32 && x.Op != OpConst32) {
16875 continue
16876 }
16877 v.reset(OpMul32)
16878 v0 := b.NewValue0(v.Pos, OpMul32, t)
16879 v0.AddArg2(x, z)
16880 v.AddArg2(i, v0)
16881 return true
16882 }
16883 }
16884 break
16885 }
16886
16887
16888 for {
16889 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
16890 if v_0.Op != OpConst32 {
16891 continue
16892 }
16893 t := v_0.Type
16894 c := auxIntToInt32(v_0.AuxInt)
16895 if v_1.Op != OpMul32 {
16896 continue
16897 }
16898 _ = v_1.Args[1]
16899 v_1_0 := v_1.Args[0]
16900 v_1_1 := v_1.Args[1]
16901 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
16902 if v_1_0.Op != OpConst32 || v_1_0.Type != t {
16903 continue
16904 }
16905 d := auxIntToInt32(v_1_0.AuxInt)
16906 x := v_1_1
16907 v.reset(OpMul32)
16908 v0 := b.NewValue0(v.Pos, OpConst32, t)
16909 v0.AuxInt = int32ToAuxInt(c * d)
16910 v.AddArg2(v0, x)
16911 return true
16912 }
16913 }
16914 break
16915 }
16916 return false
16917 }
16918 func rewriteValuegeneric_OpMul32F(v *Value) bool {
16919 v_1 := v.Args[1]
16920 v_0 := v.Args[0]
16921
16922
16923
16924 for {
16925 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
16926 if v_0.Op != OpConst32F {
16927 continue
16928 }
16929 c := auxIntToFloat32(v_0.AuxInt)
16930 if v_1.Op != OpConst32F {
16931 continue
16932 }
16933 d := auxIntToFloat32(v_1.AuxInt)
16934 if !(c*d == c*d) {
16935 continue
16936 }
16937 v.reset(OpConst32F)
16938 v.AuxInt = float32ToAuxInt(c * d)
16939 return true
16940 }
16941 break
16942 }
16943
16944
16945 for {
16946 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
16947 x := v_0
16948 if v_1.Op != OpConst32F || auxIntToFloat32(v_1.AuxInt) != 1 {
16949 continue
16950 }
16951 v.copyOf(x)
16952 return true
16953 }
16954 break
16955 }
16956
16957
16958 for {
16959 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
16960 x := v_0
16961 if v_1.Op != OpConst32F || auxIntToFloat32(v_1.AuxInt) != -1 {
16962 continue
16963 }
16964 v.reset(OpNeg32F)
16965 v.AddArg(x)
16966 return true
16967 }
16968 break
16969 }
16970
16971
16972 for {
16973 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
16974 x := v_0
16975 if v_1.Op != OpConst32F || auxIntToFloat32(v_1.AuxInt) != 2 {
16976 continue
16977 }
16978 v.reset(OpAdd32F)
16979 v.AddArg2(x, x)
16980 return true
16981 }
16982 break
16983 }
16984 return false
16985 }
16986 func rewriteValuegeneric_OpMul64(v *Value) bool {
16987 v_1 := v.Args[1]
16988 v_0 := v.Args[0]
16989 b := v.Block
16990 typ := &b.Func.Config.Types
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 != OpConst64 {
16996 continue
16997 }
16998 c := auxIntToInt64(v_0.AuxInt)
16999 if v_1.Op != OpConst64 {
17000 continue
17001 }
17002 d := auxIntToInt64(v_1.AuxInt)
17003 v.reset(OpConst64)
17004 v.AuxInt = int64ToAuxInt(c * d)
17005 return true
17006 }
17007 break
17008 }
17009
17010
17011 for {
17012 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
17013 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 1 {
17014 continue
17015 }
17016 x := v_1
17017 v.copyOf(x)
17018 return true
17019 }
17020 break
17021 }
17022
17023
17024 for {
17025 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
17026 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != -1 {
17027 continue
17028 }
17029 x := v_1
17030 v.reset(OpNeg64)
17031 v.AddArg(x)
17032 return true
17033 }
17034 break
17035 }
17036
17037
17038
17039 for {
17040 t := v.Type
17041 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
17042 n := v_0
17043 if v_1.Op != OpConst64 {
17044 continue
17045 }
17046 c := auxIntToInt64(v_1.AuxInt)
17047 if !(isPowerOfTwo64(c)) {
17048 continue
17049 }
17050 v.reset(OpLsh64x64)
17051 v.Type = t
17052 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
17053 v0.AuxInt = int64ToAuxInt(log64(c))
17054 v.AddArg2(n, v0)
17055 return true
17056 }
17057 break
17058 }
17059
17060
17061
17062 for {
17063 t := v.Type
17064 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
17065 n := v_0
17066 if v_1.Op != OpConst64 {
17067 continue
17068 }
17069 c := auxIntToInt64(v_1.AuxInt)
17070 if !(t.IsSigned() && isPowerOfTwo64(-c)) {
17071 continue
17072 }
17073 v.reset(OpNeg64)
17074 v0 := b.NewValue0(v.Pos, OpLsh64x64, t)
17075 v1 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
17076 v1.AuxInt = int64ToAuxInt(log64(-c))
17077 v0.AddArg2(n, v1)
17078 v.AddArg(v0)
17079 return true
17080 }
17081 break
17082 }
17083
17084
17085 for {
17086 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
17087 if v_0.Op != OpConst64 {
17088 continue
17089 }
17090 t := v_0.Type
17091 c := auxIntToInt64(v_0.AuxInt)
17092 if v_1.Op != OpAdd64 || v_1.Type != t {
17093 continue
17094 }
17095 _ = v_1.Args[1]
17096 v_1_0 := v_1.Args[0]
17097 v_1_1 := v_1.Args[1]
17098 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
17099 if v_1_0.Op != OpConst64 || v_1_0.Type != t {
17100 continue
17101 }
17102 d := auxIntToInt64(v_1_0.AuxInt)
17103 x := v_1_1
17104 v.reset(OpAdd64)
17105 v0 := b.NewValue0(v.Pos, OpConst64, t)
17106 v0.AuxInt = int64ToAuxInt(c * d)
17107 v1 := b.NewValue0(v.Pos, OpMul64, t)
17108 v2 := b.NewValue0(v.Pos, OpConst64, t)
17109 v2.AuxInt = int64ToAuxInt(c)
17110 v1.AddArg2(v2, x)
17111 v.AddArg2(v0, v1)
17112 return true
17113 }
17114 }
17115 break
17116 }
17117
17118
17119 for {
17120 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
17121 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
17122 continue
17123 }
17124 v.reset(OpConst64)
17125 v.AuxInt = int64ToAuxInt(0)
17126 return true
17127 }
17128 break
17129 }
17130
17131
17132
17133 for {
17134 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
17135 if v_0.Op != OpMul64 {
17136 continue
17137 }
17138 _ = v_0.Args[1]
17139 v_0_0 := v_0.Args[0]
17140 v_0_1 := v_0.Args[1]
17141 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
17142 i := v_0_0
17143 if i.Op != OpConst64 {
17144 continue
17145 }
17146 t := i.Type
17147 z := v_0_1
17148 x := v_1
17149 if !(z.Op != OpConst64 && x.Op != OpConst64) {
17150 continue
17151 }
17152 v.reset(OpMul64)
17153 v0 := b.NewValue0(v.Pos, OpMul64, t)
17154 v0.AddArg2(x, z)
17155 v.AddArg2(i, v0)
17156 return true
17157 }
17158 }
17159 break
17160 }
17161
17162
17163 for {
17164 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
17165 if v_0.Op != OpConst64 {
17166 continue
17167 }
17168 t := v_0.Type
17169 c := auxIntToInt64(v_0.AuxInt)
17170 if v_1.Op != OpMul64 {
17171 continue
17172 }
17173 _ = v_1.Args[1]
17174 v_1_0 := v_1.Args[0]
17175 v_1_1 := v_1.Args[1]
17176 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
17177 if v_1_0.Op != OpConst64 || v_1_0.Type != t {
17178 continue
17179 }
17180 d := auxIntToInt64(v_1_0.AuxInt)
17181 x := v_1_1
17182 v.reset(OpMul64)
17183 v0 := b.NewValue0(v.Pos, OpConst64, t)
17184 v0.AuxInt = int64ToAuxInt(c * d)
17185 v.AddArg2(v0, x)
17186 return true
17187 }
17188 }
17189 break
17190 }
17191 return false
17192 }
17193 func rewriteValuegeneric_OpMul64F(v *Value) bool {
17194 v_1 := v.Args[1]
17195 v_0 := v.Args[0]
17196
17197
17198
17199 for {
17200 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
17201 if v_0.Op != OpConst64F {
17202 continue
17203 }
17204 c := auxIntToFloat64(v_0.AuxInt)
17205 if v_1.Op != OpConst64F {
17206 continue
17207 }
17208 d := auxIntToFloat64(v_1.AuxInt)
17209 if !(c*d == c*d) {
17210 continue
17211 }
17212 v.reset(OpConst64F)
17213 v.AuxInt = float64ToAuxInt(c * d)
17214 return true
17215 }
17216 break
17217 }
17218
17219
17220 for {
17221 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
17222 x := v_0
17223 if v_1.Op != OpConst64F || auxIntToFloat64(v_1.AuxInt) != 1 {
17224 continue
17225 }
17226 v.copyOf(x)
17227 return true
17228 }
17229 break
17230 }
17231
17232
17233 for {
17234 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
17235 x := v_0
17236 if v_1.Op != OpConst64F || auxIntToFloat64(v_1.AuxInt) != -1 {
17237 continue
17238 }
17239 v.reset(OpNeg64F)
17240 v.AddArg(x)
17241 return true
17242 }
17243 break
17244 }
17245
17246
17247 for {
17248 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
17249 x := v_0
17250 if v_1.Op != OpConst64F || auxIntToFloat64(v_1.AuxInt) != 2 {
17251 continue
17252 }
17253 v.reset(OpAdd64F)
17254 v.AddArg2(x, x)
17255 return true
17256 }
17257 break
17258 }
17259 return false
17260 }
17261 func rewriteValuegeneric_OpMul8(v *Value) bool {
17262 v_1 := v.Args[1]
17263 v_0 := v.Args[0]
17264 b := v.Block
17265 typ := &b.Func.Config.Types
17266
17267
17268 for {
17269 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
17270 if v_0.Op != OpConst8 {
17271 continue
17272 }
17273 c := auxIntToInt8(v_0.AuxInt)
17274 if v_1.Op != OpConst8 {
17275 continue
17276 }
17277 d := auxIntToInt8(v_1.AuxInt)
17278 v.reset(OpConst8)
17279 v.AuxInt = int8ToAuxInt(c * d)
17280 return true
17281 }
17282 break
17283 }
17284
17285
17286 for {
17287 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
17288 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 1 {
17289 continue
17290 }
17291 x := v_1
17292 v.copyOf(x)
17293 return true
17294 }
17295 break
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 != OpConst8 || auxIntToInt8(v_0.AuxInt) != -1 {
17302 continue
17303 }
17304 x := v_1
17305 v.reset(OpNeg8)
17306 v.AddArg(x)
17307 return true
17308 }
17309 break
17310 }
17311
17312
17313
17314 for {
17315 t := v.Type
17316 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
17317 n := v_0
17318 if v_1.Op != OpConst8 {
17319 continue
17320 }
17321 c := auxIntToInt8(v_1.AuxInt)
17322 if !(isPowerOfTwo8(c)) {
17323 continue
17324 }
17325 v.reset(OpLsh8x64)
17326 v.Type = t
17327 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
17328 v0.AuxInt = int64ToAuxInt(log8(c))
17329 v.AddArg2(n, v0)
17330 return true
17331 }
17332 break
17333 }
17334
17335
17336
17337 for {
17338 t := v.Type
17339 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
17340 n := v_0
17341 if v_1.Op != OpConst8 {
17342 continue
17343 }
17344 c := auxIntToInt8(v_1.AuxInt)
17345 if !(t.IsSigned() && isPowerOfTwo8(-c)) {
17346 continue
17347 }
17348 v.reset(OpNeg8)
17349 v0 := b.NewValue0(v.Pos, OpLsh8x64, t)
17350 v1 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
17351 v1.AuxInt = int64ToAuxInt(log8(-c))
17352 v0.AddArg2(n, v1)
17353 v.AddArg(v0)
17354 return true
17355 }
17356 break
17357 }
17358
17359
17360 for {
17361 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
17362 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 {
17363 continue
17364 }
17365 v.reset(OpConst8)
17366 v.AuxInt = int8ToAuxInt(0)
17367 return true
17368 }
17369 break
17370 }
17371
17372
17373
17374 for {
17375 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
17376 if v_0.Op != OpMul8 {
17377 continue
17378 }
17379 _ = v_0.Args[1]
17380 v_0_0 := v_0.Args[0]
17381 v_0_1 := v_0.Args[1]
17382 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
17383 i := v_0_0
17384 if i.Op != OpConst8 {
17385 continue
17386 }
17387 t := i.Type
17388 z := v_0_1
17389 x := v_1
17390 if !(z.Op != OpConst8 && x.Op != OpConst8) {
17391 continue
17392 }
17393 v.reset(OpMul8)
17394 v0 := b.NewValue0(v.Pos, OpMul8, t)
17395 v0.AddArg2(x, z)
17396 v.AddArg2(i, v0)
17397 return true
17398 }
17399 }
17400 break
17401 }
17402
17403
17404 for {
17405 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
17406 if v_0.Op != OpConst8 {
17407 continue
17408 }
17409 t := v_0.Type
17410 c := auxIntToInt8(v_0.AuxInt)
17411 if v_1.Op != OpMul8 {
17412 continue
17413 }
17414 _ = v_1.Args[1]
17415 v_1_0 := v_1.Args[0]
17416 v_1_1 := v_1.Args[1]
17417 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
17418 if v_1_0.Op != OpConst8 || v_1_0.Type != t {
17419 continue
17420 }
17421 d := auxIntToInt8(v_1_0.AuxInt)
17422 x := v_1_1
17423 v.reset(OpMul8)
17424 v0 := b.NewValue0(v.Pos, OpConst8, t)
17425 v0.AuxInt = int8ToAuxInt(c * d)
17426 v.AddArg2(v0, x)
17427 return true
17428 }
17429 }
17430 break
17431 }
17432 return false
17433 }
17434 func rewriteValuegeneric_OpNeg16(v *Value) bool {
17435 v_0 := v.Args[0]
17436 b := v.Block
17437
17438
17439 for {
17440 if v_0.Op != OpConst16 {
17441 break
17442 }
17443 c := auxIntToInt16(v_0.AuxInt)
17444 v.reset(OpConst16)
17445 v.AuxInt = int16ToAuxInt(-c)
17446 return true
17447 }
17448
17449
17450 for {
17451 if v_0.Op != OpSub16 {
17452 break
17453 }
17454 y := v_0.Args[1]
17455 x := v_0.Args[0]
17456 v.reset(OpSub16)
17457 v.AddArg2(y, x)
17458 return true
17459 }
17460
17461
17462 for {
17463 if v_0.Op != OpNeg16 {
17464 break
17465 }
17466 x := v_0.Args[0]
17467 v.copyOf(x)
17468 return true
17469 }
17470
17471
17472 for {
17473 t := v.Type
17474 if v_0.Op != OpCom16 {
17475 break
17476 }
17477 x := v_0.Args[0]
17478 v.reset(OpAdd16)
17479 v0 := b.NewValue0(v.Pos, OpConst16, t)
17480 v0.AuxInt = int16ToAuxInt(1)
17481 v.AddArg2(v0, x)
17482 return true
17483 }
17484 return false
17485 }
17486 func rewriteValuegeneric_OpNeg32(v *Value) bool {
17487 v_0 := v.Args[0]
17488 b := v.Block
17489
17490
17491 for {
17492 if v_0.Op != OpConst32 {
17493 break
17494 }
17495 c := auxIntToInt32(v_0.AuxInt)
17496 v.reset(OpConst32)
17497 v.AuxInt = int32ToAuxInt(-c)
17498 return true
17499 }
17500
17501
17502 for {
17503 if v_0.Op != OpSub32 {
17504 break
17505 }
17506 y := v_0.Args[1]
17507 x := v_0.Args[0]
17508 v.reset(OpSub32)
17509 v.AddArg2(y, x)
17510 return true
17511 }
17512
17513
17514 for {
17515 if v_0.Op != OpNeg32 {
17516 break
17517 }
17518 x := v_0.Args[0]
17519 v.copyOf(x)
17520 return true
17521 }
17522
17523
17524 for {
17525 t := v.Type
17526 if v_0.Op != OpCom32 {
17527 break
17528 }
17529 x := v_0.Args[0]
17530 v.reset(OpAdd32)
17531 v0 := b.NewValue0(v.Pos, OpConst32, t)
17532 v0.AuxInt = int32ToAuxInt(1)
17533 v.AddArg2(v0, x)
17534 return true
17535 }
17536 return false
17537 }
17538 func rewriteValuegeneric_OpNeg32F(v *Value) bool {
17539 v_0 := v.Args[0]
17540
17541
17542
17543 for {
17544 if v_0.Op != OpConst32F {
17545 break
17546 }
17547 c := auxIntToFloat32(v_0.AuxInt)
17548 if !(c != 0) {
17549 break
17550 }
17551 v.reset(OpConst32F)
17552 v.AuxInt = float32ToAuxInt(-c)
17553 return true
17554 }
17555 return false
17556 }
17557 func rewriteValuegeneric_OpNeg64(v *Value) bool {
17558 v_0 := v.Args[0]
17559 b := v.Block
17560
17561
17562 for {
17563 if v_0.Op != OpConst64 {
17564 break
17565 }
17566 c := auxIntToInt64(v_0.AuxInt)
17567 v.reset(OpConst64)
17568 v.AuxInt = int64ToAuxInt(-c)
17569 return true
17570 }
17571
17572
17573 for {
17574 if v_0.Op != OpSub64 {
17575 break
17576 }
17577 y := v_0.Args[1]
17578 x := v_0.Args[0]
17579 v.reset(OpSub64)
17580 v.AddArg2(y, x)
17581 return true
17582 }
17583
17584
17585 for {
17586 if v_0.Op != OpNeg64 {
17587 break
17588 }
17589 x := v_0.Args[0]
17590 v.copyOf(x)
17591 return true
17592 }
17593
17594
17595 for {
17596 t := v.Type
17597 if v_0.Op != OpCom64 {
17598 break
17599 }
17600 x := v_0.Args[0]
17601 v.reset(OpAdd64)
17602 v0 := b.NewValue0(v.Pos, OpConst64, t)
17603 v0.AuxInt = int64ToAuxInt(1)
17604 v.AddArg2(v0, x)
17605 return true
17606 }
17607 return false
17608 }
17609 func rewriteValuegeneric_OpNeg64F(v *Value) bool {
17610 v_0 := v.Args[0]
17611
17612
17613
17614 for {
17615 if v_0.Op != OpConst64F {
17616 break
17617 }
17618 c := auxIntToFloat64(v_0.AuxInt)
17619 if !(c != 0) {
17620 break
17621 }
17622 v.reset(OpConst64F)
17623 v.AuxInt = float64ToAuxInt(-c)
17624 return true
17625 }
17626 return false
17627 }
17628 func rewriteValuegeneric_OpNeg8(v *Value) bool {
17629 v_0 := v.Args[0]
17630 b := v.Block
17631
17632
17633 for {
17634 if v_0.Op != OpConst8 {
17635 break
17636 }
17637 c := auxIntToInt8(v_0.AuxInt)
17638 v.reset(OpConst8)
17639 v.AuxInt = int8ToAuxInt(-c)
17640 return true
17641 }
17642
17643
17644 for {
17645 if v_0.Op != OpSub8 {
17646 break
17647 }
17648 y := v_0.Args[1]
17649 x := v_0.Args[0]
17650 v.reset(OpSub8)
17651 v.AddArg2(y, x)
17652 return true
17653 }
17654
17655
17656 for {
17657 if v_0.Op != OpNeg8 {
17658 break
17659 }
17660 x := v_0.Args[0]
17661 v.copyOf(x)
17662 return true
17663 }
17664
17665
17666 for {
17667 t := v.Type
17668 if v_0.Op != OpCom8 {
17669 break
17670 }
17671 x := v_0.Args[0]
17672 v.reset(OpAdd8)
17673 v0 := b.NewValue0(v.Pos, OpConst8, t)
17674 v0.AuxInt = int8ToAuxInt(1)
17675 v.AddArg2(v0, x)
17676 return true
17677 }
17678 return false
17679 }
17680 func rewriteValuegeneric_OpNeq16(v *Value) bool {
17681 v_1 := v.Args[1]
17682 v_0 := v.Args[0]
17683 b := v.Block
17684 typ := &b.Func.Config.Types
17685
17686
17687 for {
17688 x := v_0
17689 if x != v_1 {
17690 break
17691 }
17692 v.reset(OpConstBool)
17693 v.AuxInt = boolToAuxInt(false)
17694 return true
17695 }
17696
17697
17698 for {
17699 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
17700 if v_0.Op != OpConst16 {
17701 continue
17702 }
17703 t := v_0.Type
17704 c := auxIntToInt16(v_0.AuxInt)
17705 if v_1.Op != OpAdd16 {
17706 continue
17707 }
17708 _ = v_1.Args[1]
17709 v_1_0 := v_1.Args[0]
17710 v_1_1 := v_1.Args[1]
17711 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
17712 if v_1_0.Op != OpConst16 || v_1_0.Type != t {
17713 continue
17714 }
17715 d := auxIntToInt16(v_1_0.AuxInt)
17716 x := v_1_1
17717 v.reset(OpNeq16)
17718 v0 := b.NewValue0(v.Pos, OpConst16, t)
17719 v0.AuxInt = int16ToAuxInt(c - d)
17720 v.AddArg2(v0, x)
17721 return true
17722 }
17723 }
17724 break
17725 }
17726
17727
17728 for {
17729 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
17730 if v_0.Op != OpConst16 {
17731 continue
17732 }
17733 c := auxIntToInt16(v_0.AuxInt)
17734 if v_1.Op != OpConst16 {
17735 continue
17736 }
17737 d := auxIntToInt16(v_1.AuxInt)
17738 v.reset(OpConstBool)
17739 v.AuxInt = boolToAuxInt(c != d)
17740 return true
17741 }
17742 break
17743 }
17744
17745
17746
17747 for {
17748 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
17749 n := v_0
17750 if v_1.Op != OpLsh16x64 {
17751 continue
17752 }
17753 _ = v_1.Args[1]
17754 v_1_0 := v_1.Args[0]
17755 if v_1_0.Op != OpRsh16x64 {
17756 continue
17757 }
17758 _ = v_1_0.Args[1]
17759 v_1_0_0 := v_1_0.Args[0]
17760 if v_1_0_0.Op != OpAdd16 {
17761 continue
17762 }
17763 t := v_1_0_0.Type
17764 _ = v_1_0_0.Args[1]
17765 v_1_0_0_0 := v_1_0_0.Args[0]
17766 v_1_0_0_1 := v_1_0_0.Args[1]
17767 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 {
17768 if n != v_1_0_0_0 || v_1_0_0_1.Op != OpRsh16Ux64 || v_1_0_0_1.Type != t {
17769 continue
17770 }
17771 _ = v_1_0_0_1.Args[1]
17772 v_1_0_0_1_0 := v_1_0_0_1.Args[0]
17773 if v_1_0_0_1_0.Op != OpRsh16x64 || v_1_0_0_1_0.Type != t {
17774 continue
17775 }
17776 _ = v_1_0_0_1_0.Args[1]
17777 if n != v_1_0_0_1_0.Args[0] {
17778 continue
17779 }
17780 v_1_0_0_1_0_1 := v_1_0_0_1_0.Args[1]
17781 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 {
17782 continue
17783 }
17784 v_1_0_0_1_1 := v_1_0_0_1.Args[1]
17785 if v_1_0_0_1_1.Op != OpConst64 || v_1_0_0_1_1.Type != typ.UInt64 {
17786 continue
17787 }
17788 kbar := auxIntToInt64(v_1_0_0_1_1.AuxInt)
17789 v_1_0_1 := v_1_0.Args[1]
17790 if v_1_0_1.Op != OpConst64 || v_1_0_1.Type != typ.UInt64 {
17791 continue
17792 }
17793 k := auxIntToInt64(v_1_0_1.AuxInt)
17794 v_1_1 := v_1.Args[1]
17795 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) {
17796 continue
17797 }
17798 v.reset(OpNeq16)
17799 v0 := b.NewValue0(v.Pos, OpAnd16, t)
17800 v1 := b.NewValue0(v.Pos, OpConst16, t)
17801 v1.AuxInt = int16ToAuxInt(1<<uint(k) - 1)
17802 v0.AddArg2(n, v1)
17803 v2 := b.NewValue0(v.Pos, OpConst16, t)
17804 v2.AuxInt = int16ToAuxInt(0)
17805 v.AddArg2(v0, v2)
17806 return true
17807 }
17808 }
17809 break
17810 }
17811
17812
17813
17814 for {
17815 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
17816 s := v_0
17817 if s.Op != OpSub16 {
17818 continue
17819 }
17820 y := s.Args[1]
17821 x := s.Args[0]
17822 if v_1.Op != OpConst16 || auxIntToInt16(v_1.AuxInt) != 0 || !(s.Uses == 1) {
17823 continue
17824 }
17825 v.reset(OpNeq16)
17826 v.AddArg2(x, y)
17827 return true
17828 }
17829 break
17830 }
17831
17832
17833
17834 for {
17835 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
17836 if v_0.Op != OpAnd16 {
17837 continue
17838 }
17839 t := v_0.Type
17840 _ = v_0.Args[1]
17841 v_0_0 := v_0.Args[0]
17842 v_0_1 := v_0.Args[1]
17843 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
17844 x := v_0_0
17845 if v_0_1.Op != OpConst16 || v_0_1.Type != t {
17846 continue
17847 }
17848 y := auxIntToInt16(v_0_1.AuxInt)
17849 if v_1.Op != OpConst16 || v_1.Type != t || auxIntToInt16(v_1.AuxInt) != y || !(oneBit16(y)) {
17850 continue
17851 }
17852 v.reset(OpEq16)
17853 v0 := b.NewValue0(v.Pos, OpAnd16, t)
17854 v1 := b.NewValue0(v.Pos, OpConst16, t)
17855 v1.AuxInt = int16ToAuxInt(y)
17856 v0.AddArg2(x, v1)
17857 v2 := b.NewValue0(v.Pos, OpConst16, t)
17858 v2.AuxInt = int16ToAuxInt(0)
17859 v.AddArg2(v0, v2)
17860 return true
17861 }
17862 }
17863 break
17864 }
17865 return false
17866 }
17867 func rewriteValuegeneric_OpNeq32(v *Value) bool {
17868 v_1 := v.Args[1]
17869 v_0 := v.Args[0]
17870 b := v.Block
17871 typ := &b.Func.Config.Types
17872
17873
17874 for {
17875 x := v_0
17876 if x != v_1 {
17877 break
17878 }
17879 v.reset(OpConstBool)
17880 v.AuxInt = boolToAuxInt(false)
17881 return true
17882 }
17883
17884
17885 for {
17886 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
17887 if v_0.Op != OpConst32 {
17888 continue
17889 }
17890 t := v_0.Type
17891 c := auxIntToInt32(v_0.AuxInt)
17892 if v_1.Op != OpAdd32 {
17893 continue
17894 }
17895 _ = v_1.Args[1]
17896 v_1_0 := v_1.Args[0]
17897 v_1_1 := v_1.Args[1]
17898 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
17899 if v_1_0.Op != OpConst32 || v_1_0.Type != t {
17900 continue
17901 }
17902 d := auxIntToInt32(v_1_0.AuxInt)
17903 x := v_1_1
17904 v.reset(OpNeq32)
17905 v0 := b.NewValue0(v.Pos, OpConst32, t)
17906 v0.AuxInt = int32ToAuxInt(c - d)
17907 v.AddArg2(v0, x)
17908 return true
17909 }
17910 }
17911 break
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 != OpConst32 {
17918 continue
17919 }
17920 c := auxIntToInt32(v_0.AuxInt)
17921 if v_1.Op != OpConst32 {
17922 continue
17923 }
17924 d := auxIntToInt32(v_1.AuxInt)
17925 v.reset(OpConstBool)
17926 v.AuxInt = boolToAuxInt(c != d)
17927 return true
17928 }
17929 break
17930 }
17931
17932
17933
17934 for {
17935 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
17936 n := v_0
17937 if v_1.Op != OpLsh32x64 {
17938 continue
17939 }
17940 _ = v_1.Args[1]
17941 v_1_0 := v_1.Args[0]
17942 if v_1_0.Op != OpRsh32x64 {
17943 continue
17944 }
17945 _ = v_1_0.Args[1]
17946 v_1_0_0 := v_1_0.Args[0]
17947 if v_1_0_0.Op != OpAdd32 {
17948 continue
17949 }
17950 t := v_1_0_0.Type
17951 _ = v_1_0_0.Args[1]
17952 v_1_0_0_0 := v_1_0_0.Args[0]
17953 v_1_0_0_1 := v_1_0_0.Args[1]
17954 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 {
17955 if n != v_1_0_0_0 || v_1_0_0_1.Op != OpRsh32Ux64 || v_1_0_0_1.Type != t {
17956 continue
17957 }
17958 _ = v_1_0_0_1.Args[1]
17959 v_1_0_0_1_0 := v_1_0_0_1.Args[0]
17960 if v_1_0_0_1_0.Op != OpRsh32x64 || v_1_0_0_1_0.Type != t {
17961 continue
17962 }
17963 _ = v_1_0_0_1_0.Args[1]
17964 if n != v_1_0_0_1_0.Args[0] {
17965 continue
17966 }
17967 v_1_0_0_1_0_1 := v_1_0_0_1_0.Args[1]
17968 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 {
17969 continue
17970 }
17971 v_1_0_0_1_1 := v_1_0_0_1.Args[1]
17972 if v_1_0_0_1_1.Op != OpConst64 || v_1_0_0_1_1.Type != typ.UInt64 {
17973 continue
17974 }
17975 kbar := auxIntToInt64(v_1_0_0_1_1.AuxInt)
17976 v_1_0_1 := v_1_0.Args[1]
17977 if v_1_0_1.Op != OpConst64 || v_1_0_1.Type != typ.UInt64 {
17978 continue
17979 }
17980 k := auxIntToInt64(v_1_0_1.AuxInt)
17981 v_1_1 := v_1.Args[1]
17982 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) {
17983 continue
17984 }
17985 v.reset(OpNeq32)
17986 v0 := b.NewValue0(v.Pos, OpAnd32, t)
17987 v1 := b.NewValue0(v.Pos, OpConst32, t)
17988 v1.AuxInt = int32ToAuxInt(1<<uint(k) - 1)
17989 v0.AddArg2(n, v1)
17990 v2 := b.NewValue0(v.Pos, OpConst32, t)
17991 v2.AuxInt = int32ToAuxInt(0)
17992 v.AddArg2(v0, v2)
17993 return true
17994 }
17995 }
17996 break
17997 }
17998
17999
18000
18001 for {
18002 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18003 s := v_0
18004 if s.Op != OpSub32 {
18005 continue
18006 }
18007 y := s.Args[1]
18008 x := s.Args[0]
18009 if v_1.Op != OpConst32 || auxIntToInt32(v_1.AuxInt) != 0 || !(s.Uses == 1) {
18010 continue
18011 }
18012 v.reset(OpNeq32)
18013 v.AddArg2(x, y)
18014 return true
18015 }
18016 break
18017 }
18018
18019
18020
18021 for {
18022 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18023 if v_0.Op != OpAnd32 {
18024 continue
18025 }
18026 t := v_0.Type
18027 _ = v_0.Args[1]
18028 v_0_0 := v_0.Args[0]
18029 v_0_1 := v_0.Args[1]
18030 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
18031 x := v_0_0
18032 if v_0_1.Op != OpConst32 || v_0_1.Type != t {
18033 continue
18034 }
18035 y := auxIntToInt32(v_0_1.AuxInt)
18036 if v_1.Op != OpConst32 || v_1.Type != t || auxIntToInt32(v_1.AuxInt) != y || !(oneBit32(y)) {
18037 continue
18038 }
18039 v.reset(OpEq32)
18040 v0 := b.NewValue0(v.Pos, OpAnd32, t)
18041 v1 := b.NewValue0(v.Pos, OpConst32, t)
18042 v1.AuxInt = int32ToAuxInt(y)
18043 v0.AddArg2(x, v1)
18044 v2 := b.NewValue0(v.Pos, OpConst32, t)
18045 v2.AuxInt = int32ToAuxInt(0)
18046 v.AddArg2(v0, v2)
18047 return true
18048 }
18049 }
18050 break
18051 }
18052 return false
18053 }
18054 func rewriteValuegeneric_OpNeq32F(v *Value) bool {
18055 v_1 := v.Args[1]
18056 v_0 := v.Args[0]
18057
18058
18059 for {
18060 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18061 if v_0.Op != OpConst32F {
18062 continue
18063 }
18064 c := auxIntToFloat32(v_0.AuxInt)
18065 if v_1.Op != OpConst32F {
18066 continue
18067 }
18068 d := auxIntToFloat32(v_1.AuxInt)
18069 v.reset(OpConstBool)
18070 v.AuxInt = boolToAuxInt(c != d)
18071 return true
18072 }
18073 break
18074 }
18075 return false
18076 }
18077 func rewriteValuegeneric_OpNeq64(v *Value) bool {
18078 v_1 := v.Args[1]
18079 v_0 := v.Args[0]
18080 b := v.Block
18081 typ := &b.Func.Config.Types
18082
18083
18084 for {
18085 x := v_0
18086 if x != v_1 {
18087 break
18088 }
18089 v.reset(OpConstBool)
18090 v.AuxInt = boolToAuxInt(false)
18091 return true
18092 }
18093
18094
18095 for {
18096 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18097 if v_0.Op != OpConst64 {
18098 continue
18099 }
18100 t := v_0.Type
18101 c := auxIntToInt64(v_0.AuxInt)
18102 if v_1.Op != OpAdd64 {
18103 continue
18104 }
18105 _ = v_1.Args[1]
18106 v_1_0 := v_1.Args[0]
18107 v_1_1 := v_1.Args[1]
18108 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
18109 if v_1_0.Op != OpConst64 || v_1_0.Type != t {
18110 continue
18111 }
18112 d := auxIntToInt64(v_1_0.AuxInt)
18113 x := v_1_1
18114 v.reset(OpNeq64)
18115 v0 := b.NewValue0(v.Pos, OpConst64, t)
18116 v0.AuxInt = int64ToAuxInt(c - d)
18117 v.AddArg2(v0, x)
18118 return true
18119 }
18120 }
18121 break
18122 }
18123
18124
18125 for {
18126 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18127 if v_0.Op != OpConst64 {
18128 continue
18129 }
18130 c := auxIntToInt64(v_0.AuxInt)
18131 if v_1.Op != OpConst64 {
18132 continue
18133 }
18134 d := auxIntToInt64(v_1.AuxInt)
18135 v.reset(OpConstBool)
18136 v.AuxInt = boolToAuxInt(c != d)
18137 return true
18138 }
18139 break
18140 }
18141
18142
18143
18144 for {
18145 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18146 n := v_0
18147 if v_1.Op != OpLsh64x64 {
18148 continue
18149 }
18150 _ = v_1.Args[1]
18151 v_1_0 := v_1.Args[0]
18152 if v_1_0.Op != OpRsh64x64 {
18153 continue
18154 }
18155 _ = v_1_0.Args[1]
18156 v_1_0_0 := v_1_0.Args[0]
18157 if v_1_0_0.Op != OpAdd64 {
18158 continue
18159 }
18160 t := v_1_0_0.Type
18161 _ = v_1_0_0.Args[1]
18162 v_1_0_0_0 := v_1_0_0.Args[0]
18163 v_1_0_0_1 := v_1_0_0.Args[1]
18164 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 {
18165 if n != v_1_0_0_0 || v_1_0_0_1.Op != OpRsh64Ux64 || v_1_0_0_1.Type != t {
18166 continue
18167 }
18168 _ = v_1_0_0_1.Args[1]
18169 v_1_0_0_1_0 := v_1_0_0_1.Args[0]
18170 if v_1_0_0_1_0.Op != OpRsh64x64 || v_1_0_0_1_0.Type != t {
18171 continue
18172 }
18173 _ = v_1_0_0_1_0.Args[1]
18174 if n != v_1_0_0_1_0.Args[0] {
18175 continue
18176 }
18177 v_1_0_0_1_0_1 := v_1_0_0_1_0.Args[1]
18178 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 {
18179 continue
18180 }
18181 v_1_0_0_1_1 := v_1_0_0_1.Args[1]
18182 if v_1_0_0_1_1.Op != OpConst64 || v_1_0_0_1_1.Type != typ.UInt64 {
18183 continue
18184 }
18185 kbar := auxIntToInt64(v_1_0_0_1_1.AuxInt)
18186 v_1_0_1 := v_1_0.Args[1]
18187 if v_1_0_1.Op != OpConst64 || v_1_0_1.Type != typ.UInt64 {
18188 continue
18189 }
18190 k := auxIntToInt64(v_1_0_1.AuxInt)
18191 v_1_1 := v_1.Args[1]
18192 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) {
18193 continue
18194 }
18195 v.reset(OpNeq64)
18196 v0 := b.NewValue0(v.Pos, OpAnd64, t)
18197 v1 := b.NewValue0(v.Pos, OpConst64, t)
18198 v1.AuxInt = int64ToAuxInt(1<<uint(k) - 1)
18199 v0.AddArg2(n, v1)
18200 v2 := b.NewValue0(v.Pos, OpConst64, t)
18201 v2.AuxInt = int64ToAuxInt(0)
18202 v.AddArg2(v0, v2)
18203 return true
18204 }
18205 }
18206 break
18207 }
18208
18209
18210
18211 for {
18212 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18213 s := v_0
18214 if s.Op != OpSub64 {
18215 continue
18216 }
18217 y := s.Args[1]
18218 x := s.Args[0]
18219 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 0 || !(s.Uses == 1) {
18220 continue
18221 }
18222 v.reset(OpNeq64)
18223 v.AddArg2(x, y)
18224 return true
18225 }
18226 break
18227 }
18228
18229
18230
18231 for {
18232 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18233 if v_0.Op != OpAnd64 {
18234 continue
18235 }
18236 t := v_0.Type
18237 _ = v_0.Args[1]
18238 v_0_0 := v_0.Args[0]
18239 v_0_1 := v_0.Args[1]
18240 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
18241 x := v_0_0
18242 if v_0_1.Op != OpConst64 || v_0_1.Type != t {
18243 continue
18244 }
18245 y := auxIntToInt64(v_0_1.AuxInt)
18246 if v_1.Op != OpConst64 || v_1.Type != t || auxIntToInt64(v_1.AuxInt) != y || !(oneBit64(y)) {
18247 continue
18248 }
18249 v.reset(OpEq64)
18250 v0 := b.NewValue0(v.Pos, OpAnd64, t)
18251 v1 := b.NewValue0(v.Pos, OpConst64, t)
18252 v1.AuxInt = int64ToAuxInt(y)
18253 v0.AddArg2(x, v1)
18254 v2 := b.NewValue0(v.Pos, OpConst64, t)
18255 v2.AuxInt = int64ToAuxInt(0)
18256 v.AddArg2(v0, v2)
18257 return true
18258 }
18259 }
18260 break
18261 }
18262 return false
18263 }
18264 func rewriteValuegeneric_OpNeq64F(v *Value) bool {
18265 v_1 := v.Args[1]
18266 v_0 := v.Args[0]
18267
18268
18269 for {
18270 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18271 if v_0.Op != OpConst64F {
18272 continue
18273 }
18274 c := auxIntToFloat64(v_0.AuxInt)
18275 if v_1.Op != OpConst64F {
18276 continue
18277 }
18278 d := auxIntToFloat64(v_1.AuxInt)
18279 v.reset(OpConstBool)
18280 v.AuxInt = boolToAuxInt(c != d)
18281 return true
18282 }
18283 break
18284 }
18285 return false
18286 }
18287 func rewriteValuegeneric_OpNeq8(v *Value) bool {
18288 v_1 := v.Args[1]
18289 v_0 := v.Args[0]
18290 b := v.Block
18291 typ := &b.Func.Config.Types
18292
18293
18294 for {
18295 x := v_0
18296 if x != v_1 {
18297 break
18298 }
18299 v.reset(OpConstBool)
18300 v.AuxInt = boolToAuxInt(false)
18301 return true
18302 }
18303
18304
18305 for {
18306 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18307 if v_0.Op != OpConst8 {
18308 continue
18309 }
18310 t := v_0.Type
18311 c := auxIntToInt8(v_0.AuxInt)
18312 if v_1.Op != OpAdd8 {
18313 continue
18314 }
18315 _ = v_1.Args[1]
18316 v_1_0 := v_1.Args[0]
18317 v_1_1 := v_1.Args[1]
18318 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
18319 if v_1_0.Op != OpConst8 || v_1_0.Type != t {
18320 continue
18321 }
18322 d := auxIntToInt8(v_1_0.AuxInt)
18323 x := v_1_1
18324 v.reset(OpNeq8)
18325 v0 := b.NewValue0(v.Pos, OpConst8, t)
18326 v0.AuxInt = int8ToAuxInt(c - d)
18327 v.AddArg2(v0, x)
18328 return true
18329 }
18330 }
18331 break
18332 }
18333
18334
18335 for {
18336 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18337 if v_0.Op != OpConst8 {
18338 continue
18339 }
18340 c := auxIntToInt8(v_0.AuxInt)
18341 if v_1.Op != OpConst8 {
18342 continue
18343 }
18344 d := auxIntToInt8(v_1.AuxInt)
18345 v.reset(OpConstBool)
18346 v.AuxInt = boolToAuxInt(c != d)
18347 return true
18348 }
18349 break
18350 }
18351
18352
18353
18354 for {
18355 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18356 n := v_0
18357 if v_1.Op != OpLsh8x64 {
18358 continue
18359 }
18360 _ = v_1.Args[1]
18361 v_1_0 := v_1.Args[0]
18362 if v_1_0.Op != OpRsh8x64 {
18363 continue
18364 }
18365 _ = v_1_0.Args[1]
18366 v_1_0_0 := v_1_0.Args[0]
18367 if v_1_0_0.Op != OpAdd8 {
18368 continue
18369 }
18370 t := v_1_0_0.Type
18371 _ = v_1_0_0.Args[1]
18372 v_1_0_0_0 := v_1_0_0.Args[0]
18373 v_1_0_0_1 := v_1_0_0.Args[1]
18374 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 {
18375 if n != v_1_0_0_0 || v_1_0_0_1.Op != OpRsh8Ux64 || v_1_0_0_1.Type != t {
18376 continue
18377 }
18378 _ = v_1_0_0_1.Args[1]
18379 v_1_0_0_1_0 := v_1_0_0_1.Args[0]
18380 if v_1_0_0_1_0.Op != OpRsh8x64 || v_1_0_0_1_0.Type != t {
18381 continue
18382 }
18383 _ = v_1_0_0_1_0.Args[1]
18384 if n != v_1_0_0_1_0.Args[0] {
18385 continue
18386 }
18387 v_1_0_0_1_0_1 := v_1_0_0_1_0.Args[1]
18388 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 {
18389 continue
18390 }
18391 v_1_0_0_1_1 := v_1_0_0_1.Args[1]
18392 if v_1_0_0_1_1.Op != OpConst64 || v_1_0_0_1_1.Type != typ.UInt64 {
18393 continue
18394 }
18395 kbar := auxIntToInt64(v_1_0_0_1_1.AuxInt)
18396 v_1_0_1 := v_1_0.Args[1]
18397 if v_1_0_1.Op != OpConst64 || v_1_0_1.Type != typ.UInt64 {
18398 continue
18399 }
18400 k := auxIntToInt64(v_1_0_1.AuxInt)
18401 v_1_1 := v_1.Args[1]
18402 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) {
18403 continue
18404 }
18405 v.reset(OpNeq8)
18406 v0 := b.NewValue0(v.Pos, OpAnd8, t)
18407 v1 := b.NewValue0(v.Pos, OpConst8, t)
18408 v1.AuxInt = int8ToAuxInt(1<<uint(k) - 1)
18409 v0.AddArg2(n, v1)
18410 v2 := b.NewValue0(v.Pos, OpConst8, t)
18411 v2.AuxInt = int8ToAuxInt(0)
18412 v.AddArg2(v0, v2)
18413 return true
18414 }
18415 }
18416 break
18417 }
18418
18419
18420
18421 for {
18422 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18423 s := v_0
18424 if s.Op != OpSub8 {
18425 continue
18426 }
18427 y := s.Args[1]
18428 x := s.Args[0]
18429 if v_1.Op != OpConst8 || auxIntToInt8(v_1.AuxInt) != 0 || !(s.Uses == 1) {
18430 continue
18431 }
18432 v.reset(OpNeq8)
18433 v.AddArg2(x, y)
18434 return true
18435 }
18436 break
18437 }
18438
18439
18440
18441 for {
18442 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18443 if v_0.Op != OpAnd8 {
18444 continue
18445 }
18446 t := v_0.Type
18447 _ = v_0.Args[1]
18448 v_0_0 := v_0.Args[0]
18449 v_0_1 := v_0.Args[1]
18450 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
18451 x := v_0_0
18452 if v_0_1.Op != OpConst8 || v_0_1.Type != t {
18453 continue
18454 }
18455 y := auxIntToInt8(v_0_1.AuxInt)
18456 if v_1.Op != OpConst8 || v_1.Type != t || auxIntToInt8(v_1.AuxInt) != y || !(oneBit8(y)) {
18457 continue
18458 }
18459 v.reset(OpEq8)
18460 v0 := b.NewValue0(v.Pos, OpAnd8, t)
18461 v1 := b.NewValue0(v.Pos, OpConst8, t)
18462 v1.AuxInt = int8ToAuxInt(y)
18463 v0.AddArg2(x, v1)
18464 v2 := b.NewValue0(v.Pos, OpConst8, t)
18465 v2.AuxInt = int8ToAuxInt(0)
18466 v.AddArg2(v0, v2)
18467 return true
18468 }
18469 }
18470 break
18471 }
18472 return false
18473 }
18474 func rewriteValuegeneric_OpNeqB(v *Value) bool {
18475 v_1 := v.Args[1]
18476 v_0 := v.Args[0]
18477
18478
18479 for {
18480 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18481 if v_0.Op != OpConstBool {
18482 continue
18483 }
18484 c := auxIntToBool(v_0.AuxInt)
18485 if v_1.Op != OpConstBool {
18486 continue
18487 }
18488 d := auxIntToBool(v_1.AuxInt)
18489 v.reset(OpConstBool)
18490 v.AuxInt = boolToAuxInt(c != d)
18491 return true
18492 }
18493 break
18494 }
18495
18496
18497 for {
18498 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18499 if v_0.Op != OpConstBool || auxIntToBool(v_0.AuxInt) != false {
18500 continue
18501 }
18502 x := v_1
18503 v.copyOf(x)
18504 return true
18505 }
18506 break
18507 }
18508
18509
18510 for {
18511 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18512 if v_0.Op != OpConstBool || auxIntToBool(v_0.AuxInt) != true {
18513 continue
18514 }
18515 x := v_1
18516 v.reset(OpNot)
18517 v.AddArg(x)
18518 return true
18519 }
18520 break
18521 }
18522
18523
18524 for {
18525 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18526 if v_0.Op != OpNot {
18527 continue
18528 }
18529 x := v_0.Args[0]
18530 if v_1.Op != OpNot {
18531 continue
18532 }
18533 y := v_1.Args[0]
18534 v.reset(OpNeqB)
18535 v.AddArg2(x, y)
18536 return true
18537 }
18538 break
18539 }
18540 return false
18541 }
18542 func rewriteValuegeneric_OpNeqInter(v *Value) bool {
18543 v_1 := v.Args[1]
18544 v_0 := v.Args[0]
18545 b := v.Block
18546 typ := &b.Func.Config.Types
18547
18548
18549 for {
18550 x := v_0
18551 y := v_1
18552 v.reset(OpNeqPtr)
18553 v0 := b.NewValue0(v.Pos, OpITab, typ.Uintptr)
18554 v0.AddArg(x)
18555 v1 := b.NewValue0(v.Pos, OpITab, typ.Uintptr)
18556 v1.AddArg(y)
18557 v.AddArg2(v0, v1)
18558 return true
18559 }
18560 }
18561 func rewriteValuegeneric_OpNeqPtr(v *Value) bool {
18562 v_1 := v.Args[1]
18563 v_0 := v.Args[0]
18564
18565
18566 for {
18567 x := v_0
18568 if x != v_1 {
18569 break
18570 }
18571 v.reset(OpConstBool)
18572 v.AuxInt = boolToAuxInt(false)
18573 return true
18574 }
18575
18576
18577 for {
18578 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18579 if v_0.Op != OpAddr {
18580 continue
18581 }
18582 x := auxToSym(v_0.Aux)
18583 if v_1.Op != OpAddr {
18584 continue
18585 }
18586 y := auxToSym(v_1.Aux)
18587 v.reset(OpConstBool)
18588 v.AuxInt = boolToAuxInt(x != y)
18589 return true
18590 }
18591 break
18592 }
18593
18594
18595 for {
18596 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18597 if v_0.Op != OpAddr {
18598 continue
18599 }
18600 x := auxToSym(v_0.Aux)
18601 if v_1.Op != OpOffPtr {
18602 continue
18603 }
18604 o := auxIntToInt64(v_1.AuxInt)
18605 v_1_0 := v_1.Args[0]
18606 if v_1_0.Op != OpAddr {
18607 continue
18608 }
18609 y := auxToSym(v_1_0.Aux)
18610 v.reset(OpConstBool)
18611 v.AuxInt = boolToAuxInt(x != y || o != 0)
18612 return true
18613 }
18614 break
18615 }
18616
18617
18618 for {
18619 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18620 if v_0.Op != OpOffPtr {
18621 continue
18622 }
18623 o1 := auxIntToInt64(v_0.AuxInt)
18624 v_0_0 := v_0.Args[0]
18625 if v_0_0.Op != OpAddr {
18626 continue
18627 }
18628 x := auxToSym(v_0_0.Aux)
18629 if v_1.Op != OpOffPtr {
18630 continue
18631 }
18632 o2 := auxIntToInt64(v_1.AuxInt)
18633 v_1_0 := v_1.Args[0]
18634 if v_1_0.Op != OpAddr {
18635 continue
18636 }
18637 y := auxToSym(v_1_0.Aux)
18638 v.reset(OpConstBool)
18639 v.AuxInt = boolToAuxInt(x != y || o1 != o2)
18640 return true
18641 }
18642 break
18643 }
18644
18645
18646 for {
18647 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18648 if v_0.Op != OpLocalAddr {
18649 continue
18650 }
18651 x := auxToSym(v_0.Aux)
18652 if v_1.Op != OpLocalAddr {
18653 continue
18654 }
18655 y := auxToSym(v_1.Aux)
18656 v.reset(OpConstBool)
18657 v.AuxInt = boolToAuxInt(x != y)
18658 return true
18659 }
18660 break
18661 }
18662
18663
18664 for {
18665 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18666 if v_0.Op != OpLocalAddr {
18667 continue
18668 }
18669 x := auxToSym(v_0.Aux)
18670 if v_1.Op != OpOffPtr {
18671 continue
18672 }
18673 o := auxIntToInt64(v_1.AuxInt)
18674 v_1_0 := v_1.Args[0]
18675 if v_1_0.Op != OpLocalAddr {
18676 continue
18677 }
18678 y := auxToSym(v_1_0.Aux)
18679 v.reset(OpConstBool)
18680 v.AuxInt = boolToAuxInt(x != y || o != 0)
18681 return true
18682 }
18683 break
18684 }
18685
18686
18687 for {
18688 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18689 if v_0.Op != OpOffPtr {
18690 continue
18691 }
18692 o1 := auxIntToInt64(v_0.AuxInt)
18693 v_0_0 := v_0.Args[0]
18694 if v_0_0.Op != OpLocalAddr {
18695 continue
18696 }
18697 x := auxToSym(v_0_0.Aux)
18698 if v_1.Op != OpOffPtr {
18699 continue
18700 }
18701 o2 := auxIntToInt64(v_1.AuxInt)
18702 v_1_0 := v_1.Args[0]
18703 if v_1_0.Op != OpLocalAddr {
18704 continue
18705 }
18706 y := auxToSym(v_1_0.Aux)
18707 v.reset(OpConstBool)
18708 v.AuxInt = boolToAuxInt(x != y || o1 != o2)
18709 return true
18710 }
18711 break
18712 }
18713
18714
18715
18716 for {
18717 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18718 if v_0.Op != OpOffPtr {
18719 continue
18720 }
18721 o1 := auxIntToInt64(v_0.AuxInt)
18722 p1 := v_0.Args[0]
18723 p2 := v_1
18724 if !(isSamePtr(p1, p2)) {
18725 continue
18726 }
18727 v.reset(OpConstBool)
18728 v.AuxInt = boolToAuxInt(o1 != 0)
18729 return true
18730 }
18731 break
18732 }
18733
18734
18735
18736 for {
18737 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18738 if v_0.Op != OpOffPtr {
18739 continue
18740 }
18741 o1 := auxIntToInt64(v_0.AuxInt)
18742 p1 := v_0.Args[0]
18743 if v_1.Op != OpOffPtr {
18744 continue
18745 }
18746 o2 := auxIntToInt64(v_1.AuxInt)
18747 p2 := v_1.Args[0]
18748 if !(isSamePtr(p1, p2)) {
18749 continue
18750 }
18751 v.reset(OpConstBool)
18752 v.AuxInt = boolToAuxInt(o1 != o2)
18753 return true
18754 }
18755 break
18756 }
18757
18758
18759 for {
18760 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18761 if v_0.Op != OpConst32 {
18762 continue
18763 }
18764 c := auxIntToInt32(v_0.AuxInt)
18765 if v_1.Op != OpConst32 {
18766 continue
18767 }
18768 d := auxIntToInt32(v_1.AuxInt)
18769 v.reset(OpConstBool)
18770 v.AuxInt = boolToAuxInt(c != d)
18771 return true
18772 }
18773 break
18774 }
18775
18776
18777 for {
18778 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18779 if v_0.Op != OpConst64 {
18780 continue
18781 }
18782 c := auxIntToInt64(v_0.AuxInt)
18783 if v_1.Op != OpConst64 {
18784 continue
18785 }
18786 d := auxIntToInt64(v_1.AuxInt)
18787 v.reset(OpConstBool)
18788 v.AuxInt = boolToAuxInt(c != d)
18789 return true
18790 }
18791 break
18792 }
18793
18794
18795 for {
18796 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18797 if v_0.Op != OpConvert {
18798 continue
18799 }
18800 v_0_0 := v_0.Args[0]
18801 if v_0_0.Op != OpAddr {
18802 continue
18803 }
18804 x := auxToSym(v_0_0.Aux)
18805 if v_1.Op != OpAddr {
18806 continue
18807 }
18808 y := auxToSym(v_1.Aux)
18809 v.reset(OpConstBool)
18810 v.AuxInt = boolToAuxInt(x != y)
18811 return true
18812 }
18813 break
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 != OpLocalAddr || v_1.Op != OpAddr {
18820 continue
18821 }
18822 v.reset(OpConstBool)
18823 v.AuxInt = boolToAuxInt(true)
18824 return true
18825 }
18826 break
18827 }
18828
18829
18830 for {
18831 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18832 if v_0.Op != OpOffPtr {
18833 continue
18834 }
18835 v_0_0 := v_0.Args[0]
18836 if v_0_0.Op != OpLocalAddr || v_1.Op != OpAddr {
18837 continue
18838 }
18839 v.reset(OpConstBool)
18840 v.AuxInt = boolToAuxInt(true)
18841 return true
18842 }
18843 break
18844 }
18845
18846
18847 for {
18848 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18849 if v_0.Op != OpLocalAddr || v_1.Op != OpOffPtr {
18850 continue
18851 }
18852 v_1_0 := v_1.Args[0]
18853 if v_1_0.Op != OpAddr {
18854 continue
18855 }
18856 v.reset(OpConstBool)
18857 v.AuxInt = boolToAuxInt(true)
18858 return true
18859 }
18860 break
18861 }
18862
18863
18864 for {
18865 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18866 if v_0.Op != OpOffPtr {
18867 continue
18868 }
18869 v_0_0 := v_0.Args[0]
18870 if v_0_0.Op != OpLocalAddr || v_1.Op != OpOffPtr {
18871 continue
18872 }
18873 v_1_0 := v_1.Args[0]
18874 if v_1_0.Op != OpAddr {
18875 continue
18876 }
18877 v.reset(OpConstBool)
18878 v.AuxInt = boolToAuxInt(true)
18879 return true
18880 }
18881 break
18882 }
18883
18884
18885
18886 for {
18887 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18888 if v_0.Op != OpAddPtr {
18889 continue
18890 }
18891 o1 := v_0.Args[1]
18892 p1 := v_0.Args[0]
18893 p2 := v_1
18894 if !(isSamePtr(p1, p2)) {
18895 continue
18896 }
18897 v.reset(OpIsNonNil)
18898 v.AddArg(o1)
18899 return true
18900 }
18901 break
18902 }
18903
18904
18905 for {
18906 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18907 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
18908 continue
18909 }
18910 p := v_1
18911 v.reset(OpIsNonNil)
18912 v.AddArg(p)
18913 return true
18914 }
18915 break
18916 }
18917
18918
18919 for {
18920 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18921 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
18922 continue
18923 }
18924 p := v_1
18925 v.reset(OpIsNonNil)
18926 v.AddArg(p)
18927 return true
18928 }
18929 break
18930 }
18931
18932
18933 for {
18934 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18935 if v_0.Op != OpConstNil {
18936 continue
18937 }
18938 p := v_1
18939 v.reset(OpIsNonNil)
18940 v.AddArg(p)
18941 return true
18942 }
18943 break
18944 }
18945 return false
18946 }
18947 func rewriteValuegeneric_OpNeqSlice(v *Value) bool {
18948 v_1 := v.Args[1]
18949 v_0 := v.Args[0]
18950 b := v.Block
18951 typ := &b.Func.Config.Types
18952
18953
18954 for {
18955 x := v_0
18956 y := v_1
18957 v.reset(OpNeqPtr)
18958 v0 := b.NewValue0(v.Pos, OpSlicePtr, typ.BytePtr)
18959 v0.AddArg(x)
18960 v1 := b.NewValue0(v.Pos, OpSlicePtr, typ.BytePtr)
18961 v1.AddArg(y)
18962 v.AddArg2(v0, v1)
18963 return true
18964 }
18965 }
18966 func rewriteValuegeneric_OpNilCheck(v *Value) bool {
18967 v_1 := v.Args[1]
18968 v_0 := v.Args[0]
18969 b := v.Block
18970 fe := b.Func.fe
18971
18972
18973 for {
18974 ptr := v_0
18975 if ptr.Op != OpGetG {
18976 break
18977 }
18978 mem := ptr.Args[0]
18979 if mem != v_1 {
18980 break
18981 }
18982 v.copyOf(ptr)
18983 return true
18984 }
18985
18986
18987
18988 for {
18989 ptr := v_0
18990 if ptr.Op != OpSelectN || auxIntToInt64(ptr.AuxInt) != 0 {
18991 break
18992 }
18993 call := ptr.Args[0]
18994 if call.Op != OpStaticLECall || len(call.Args) != 2 || !(isSameCall(call.Aux, "runtime.newobject") && warnRule(fe.Debug_checknil(), v, "removed nil check")) {
18995 break
18996 }
18997 v.copyOf(ptr)
18998 return true
18999 }
19000
19001
19002
19003 for {
19004 ptr := v_0
19005 if ptr.Op != OpOffPtr {
19006 break
19007 }
19008 ptr_0 := ptr.Args[0]
19009 if ptr_0.Op != OpSelectN || auxIntToInt64(ptr_0.AuxInt) != 0 {
19010 break
19011 }
19012 call := ptr_0.Args[0]
19013 if call.Op != OpStaticLECall || len(call.Args) != 2 || !(isSameCall(call.Aux, "runtime.newobject") && warnRule(fe.Debug_checknil(), v, "removed nil check")) {
19014 break
19015 }
19016 v.copyOf(ptr)
19017 return true
19018 }
19019
19020
19021 for {
19022 ptr := v_0
19023 if ptr.Op != OpAddr {
19024 break
19025 }
19026 ptr_0 := ptr.Args[0]
19027 if ptr_0.Op != OpSB {
19028 break
19029 }
19030 v.copyOf(ptr)
19031 return true
19032 }
19033
19034
19035 for {
19036 ptr := v_0
19037 if ptr.Op != OpConvert {
19038 break
19039 }
19040 ptr_0 := ptr.Args[0]
19041 if ptr_0.Op != OpAddr {
19042 break
19043 }
19044 ptr_0_0 := ptr_0.Args[0]
19045 if ptr_0_0.Op != OpSB {
19046 break
19047 }
19048 v.copyOf(ptr)
19049 return true
19050 }
19051 return false
19052 }
19053 func rewriteValuegeneric_OpNot(v *Value) bool {
19054 v_0 := v.Args[0]
19055
19056
19057 for {
19058 if v_0.Op != OpConstBool {
19059 break
19060 }
19061 c := auxIntToBool(v_0.AuxInt)
19062 v.reset(OpConstBool)
19063 v.AuxInt = boolToAuxInt(!c)
19064 return true
19065 }
19066
19067
19068 for {
19069 if v_0.Op != OpEq64 {
19070 break
19071 }
19072 y := v_0.Args[1]
19073 x := v_0.Args[0]
19074 v.reset(OpNeq64)
19075 v.AddArg2(x, y)
19076 return true
19077 }
19078
19079
19080 for {
19081 if v_0.Op != OpEq32 {
19082 break
19083 }
19084 y := v_0.Args[1]
19085 x := v_0.Args[0]
19086 v.reset(OpNeq32)
19087 v.AddArg2(x, y)
19088 return true
19089 }
19090
19091
19092 for {
19093 if v_0.Op != OpEq16 {
19094 break
19095 }
19096 y := v_0.Args[1]
19097 x := v_0.Args[0]
19098 v.reset(OpNeq16)
19099 v.AddArg2(x, y)
19100 return true
19101 }
19102
19103
19104 for {
19105 if v_0.Op != OpEq8 {
19106 break
19107 }
19108 y := v_0.Args[1]
19109 x := v_0.Args[0]
19110 v.reset(OpNeq8)
19111 v.AddArg2(x, y)
19112 return true
19113 }
19114
19115
19116 for {
19117 if v_0.Op != OpEqB {
19118 break
19119 }
19120 y := v_0.Args[1]
19121 x := v_0.Args[0]
19122 v.reset(OpNeqB)
19123 v.AddArg2(x, y)
19124 return true
19125 }
19126
19127
19128 for {
19129 if v_0.Op != OpEqPtr {
19130 break
19131 }
19132 y := v_0.Args[1]
19133 x := v_0.Args[0]
19134 v.reset(OpNeqPtr)
19135 v.AddArg2(x, y)
19136 return true
19137 }
19138
19139
19140 for {
19141 if v_0.Op != OpEq64F {
19142 break
19143 }
19144 y := v_0.Args[1]
19145 x := v_0.Args[0]
19146 v.reset(OpNeq64F)
19147 v.AddArg2(x, y)
19148 return true
19149 }
19150
19151
19152 for {
19153 if v_0.Op != OpEq32F {
19154 break
19155 }
19156 y := v_0.Args[1]
19157 x := v_0.Args[0]
19158 v.reset(OpNeq32F)
19159 v.AddArg2(x, y)
19160 return true
19161 }
19162
19163
19164 for {
19165 if v_0.Op != OpNeq64 {
19166 break
19167 }
19168 y := v_0.Args[1]
19169 x := v_0.Args[0]
19170 v.reset(OpEq64)
19171 v.AddArg2(x, y)
19172 return true
19173 }
19174
19175
19176 for {
19177 if v_0.Op != OpNeq32 {
19178 break
19179 }
19180 y := v_0.Args[1]
19181 x := v_0.Args[0]
19182 v.reset(OpEq32)
19183 v.AddArg2(x, y)
19184 return true
19185 }
19186
19187
19188 for {
19189 if v_0.Op != OpNeq16 {
19190 break
19191 }
19192 y := v_0.Args[1]
19193 x := v_0.Args[0]
19194 v.reset(OpEq16)
19195 v.AddArg2(x, y)
19196 return true
19197 }
19198
19199
19200 for {
19201 if v_0.Op != OpNeq8 {
19202 break
19203 }
19204 y := v_0.Args[1]
19205 x := v_0.Args[0]
19206 v.reset(OpEq8)
19207 v.AddArg2(x, y)
19208 return true
19209 }
19210
19211
19212 for {
19213 if v_0.Op != OpNeqB {
19214 break
19215 }
19216 y := v_0.Args[1]
19217 x := v_0.Args[0]
19218 v.reset(OpEqB)
19219 v.AddArg2(x, y)
19220 return true
19221 }
19222
19223
19224 for {
19225 if v_0.Op != OpNeqPtr {
19226 break
19227 }
19228 y := v_0.Args[1]
19229 x := v_0.Args[0]
19230 v.reset(OpEqPtr)
19231 v.AddArg2(x, y)
19232 return true
19233 }
19234
19235
19236 for {
19237 if v_0.Op != OpNeq64F {
19238 break
19239 }
19240 y := v_0.Args[1]
19241 x := v_0.Args[0]
19242 v.reset(OpEq64F)
19243 v.AddArg2(x, y)
19244 return true
19245 }
19246
19247
19248 for {
19249 if v_0.Op != OpNeq32F {
19250 break
19251 }
19252 y := v_0.Args[1]
19253 x := v_0.Args[0]
19254 v.reset(OpEq32F)
19255 v.AddArg2(x, y)
19256 return true
19257 }
19258
19259
19260 for {
19261 if v_0.Op != OpLess64 {
19262 break
19263 }
19264 y := v_0.Args[1]
19265 x := v_0.Args[0]
19266 v.reset(OpLeq64)
19267 v.AddArg2(y, x)
19268 return true
19269 }
19270
19271
19272 for {
19273 if v_0.Op != OpLess32 {
19274 break
19275 }
19276 y := v_0.Args[1]
19277 x := v_0.Args[0]
19278 v.reset(OpLeq32)
19279 v.AddArg2(y, x)
19280 return true
19281 }
19282
19283
19284 for {
19285 if v_0.Op != OpLess16 {
19286 break
19287 }
19288 y := v_0.Args[1]
19289 x := v_0.Args[0]
19290 v.reset(OpLeq16)
19291 v.AddArg2(y, x)
19292 return true
19293 }
19294
19295
19296 for {
19297 if v_0.Op != OpLess8 {
19298 break
19299 }
19300 y := v_0.Args[1]
19301 x := v_0.Args[0]
19302 v.reset(OpLeq8)
19303 v.AddArg2(y, x)
19304 return true
19305 }
19306
19307
19308 for {
19309 if v_0.Op != OpLess64U {
19310 break
19311 }
19312 y := v_0.Args[1]
19313 x := v_0.Args[0]
19314 v.reset(OpLeq64U)
19315 v.AddArg2(y, x)
19316 return true
19317 }
19318
19319
19320 for {
19321 if v_0.Op != OpLess32U {
19322 break
19323 }
19324 y := v_0.Args[1]
19325 x := v_0.Args[0]
19326 v.reset(OpLeq32U)
19327 v.AddArg2(y, x)
19328 return true
19329 }
19330
19331
19332 for {
19333 if v_0.Op != OpLess16U {
19334 break
19335 }
19336 y := v_0.Args[1]
19337 x := v_0.Args[0]
19338 v.reset(OpLeq16U)
19339 v.AddArg2(y, x)
19340 return true
19341 }
19342
19343
19344 for {
19345 if v_0.Op != OpLess8U {
19346 break
19347 }
19348 y := v_0.Args[1]
19349 x := v_0.Args[0]
19350 v.reset(OpLeq8U)
19351 v.AddArg2(y, x)
19352 return true
19353 }
19354
19355
19356 for {
19357 if v_0.Op != OpLeq64 {
19358 break
19359 }
19360 y := v_0.Args[1]
19361 x := v_0.Args[0]
19362 v.reset(OpLess64)
19363 v.AddArg2(y, x)
19364 return true
19365 }
19366
19367
19368 for {
19369 if v_0.Op != OpLeq32 {
19370 break
19371 }
19372 y := v_0.Args[1]
19373 x := v_0.Args[0]
19374 v.reset(OpLess32)
19375 v.AddArg2(y, x)
19376 return true
19377 }
19378
19379
19380 for {
19381 if v_0.Op != OpLeq16 {
19382 break
19383 }
19384 y := v_0.Args[1]
19385 x := v_0.Args[0]
19386 v.reset(OpLess16)
19387 v.AddArg2(y, x)
19388 return true
19389 }
19390
19391
19392 for {
19393 if v_0.Op != OpLeq8 {
19394 break
19395 }
19396 y := v_0.Args[1]
19397 x := v_0.Args[0]
19398 v.reset(OpLess8)
19399 v.AddArg2(y, x)
19400 return true
19401 }
19402
19403
19404 for {
19405 if v_0.Op != OpLeq64U {
19406 break
19407 }
19408 y := v_0.Args[1]
19409 x := v_0.Args[0]
19410 v.reset(OpLess64U)
19411 v.AddArg2(y, x)
19412 return true
19413 }
19414
19415
19416 for {
19417 if v_0.Op != OpLeq32U {
19418 break
19419 }
19420 y := v_0.Args[1]
19421 x := v_0.Args[0]
19422 v.reset(OpLess32U)
19423 v.AddArg2(y, x)
19424 return true
19425 }
19426
19427
19428 for {
19429 if v_0.Op != OpLeq16U {
19430 break
19431 }
19432 y := v_0.Args[1]
19433 x := v_0.Args[0]
19434 v.reset(OpLess16U)
19435 v.AddArg2(y, x)
19436 return true
19437 }
19438
19439
19440 for {
19441 if v_0.Op != OpLeq8U {
19442 break
19443 }
19444 y := v_0.Args[1]
19445 x := v_0.Args[0]
19446 v.reset(OpLess8U)
19447 v.AddArg2(y, x)
19448 return true
19449 }
19450 return false
19451 }
19452 func rewriteValuegeneric_OpOffPtr(v *Value) bool {
19453 v_0 := v.Args[0]
19454
19455
19456 for {
19457 x := auxIntToInt64(v.AuxInt)
19458 if v_0.Op != OpOffPtr {
19459 break
19460 }
19461 y := auxIntToInt64(v_0.AuxInt)
19462 p := v_0.Args[0]
19463 v.reset(OpOffPtr)
19464 v.AuxInt = int64ToAuxInt(x + y)
19465 v.AddArg(p)
19466 return true
19467 }
19468
19469
19470
19471 for {
19472 if auxIntToInt64(v.AuxInt) != 0 {
19473 break
19474 }
19475 p := v_0
19476 if !(v.Type.Compare(p.Type) == types.CMPeq) {
19477 break
19478 }
19479 v.copyOf(p)
19480 return true
19481 }
19482 return false
19483 }
19484 func rewriteValuegeneric_OpOr16(v *Value) bool {
19485 v_1 := v.Args[1]
19486 v_0 := v.Args[0]
19487 b := v.Block
19488 config := b.Func.Config
19489
19490
19491 for {
19492 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19493 if v_0.Op != OpConst16 {
19494 continue
19495 }
19496 c := auxIntToInt16(v_0.AuxInt)
19497 if v_1.Op != OpConst16 {
19498 continue
19499 }
19500 d := auxIntToInt16(v_1.AuxInt)
19501 v.reset(OpConst16)
19502 v.AuxInt = int16ToAuxInt(c | d)
19503 return true
19504 }
19505 break
19506 }
19507
19508
19509 for {
19510 t := v.Type
19511 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19512 if v_0.Op != OpCom16 {
19513 continue
19514 }
19515 x := v_0.Args[0]
19516 if v_1.Op != OpCom16 {
19517 continue
19518 }
19519 y := v_1.Args[0]
19520 v.reset(OpCom16)
19521 v0 := b.NewValue0(v.Pos, OpAnd16, t)
19522 v0.AddArg2(x, y)
19523 v.AddArg(v0)
19524 return true
19525 }
19526 break
19527 }
19528
19529
19530 for {
19531 x := v_0
19532 if x != v_1 {
19533 break
19534 }
19535 v.copyOf(x)
19536 return true
19537 }
19538
19539
19540 for {
19541 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19542 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 {
19543 continue
19544 }
19545 x := v_1
19546 v.copyOf(x)
19547 return true
19548 }
19549 break
19550 }
19551
19552
19553 for {
19554 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19555 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != -1 {
19556 continue
19557 }
19558 v.reset(OpConst16)
19559 v.AuxInt = int16ToAuxInt(-1)
19560 return true
19561 }
19562 break
19563 }
19564
19565
19566 for {
19567 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19568 if v_0.Op != OpCom16 {
19569 continue
19570 }
19571 x := v_0.Args[0]
19572 if x != v_1 {
19573 continue
19574 }
19575 v.reset(OpConst16)
19576 v.AuxInt = int16ToAuxInt(-1)
19577 return true
19578 }
19579 break
19580 }
19581
19582
19583 for {
19584 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19585 x := v_0
19586 if v_1.Op != OpOr16 {
19587 continue
19588 }
19589 _ = v_1.Args[1]
19590 v_1_0 := v_1.Args[0]
19591 v_1_1 := v_1.Args[1]
19592 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
19593 if x != v_1_0 {
19594 continue
19595 }
19596 y := v_1_1
19597 v.reset(OpOr16)
19598 v.AddArg2(x, y)
19599 return true
19600 }
19601 }
19602 break
19603 }
19604
19605
19606
19607 for {
19608 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19609 if v_0.Op != OpAnd16 {
19610 continue
19611 }
19612 _ = v_0.Args[1]
19613 v_0_0 := v_0.Args[0]
19614 v_0_1 := v_0.Args[1]
19615 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
19616 x := v_0_0
19617 if v_0_1.Op != OpConst16 {
19618 continue
19619 }
19620 c2 := auxIntToInt16(v_0_1.AuxInt)
19621 if v_1.Op != OpConst16 {
19622 continue
19623 }
19624 t := v_1.Type
19625 c1 := auxIntToInt16(v_1.AuxInt)
19626 if !(^(c1 | c2) == 0) {
19627 continue
19628 }
19629 v.reset(OpOr16)
19630 v0 := b.NewValue0(v.Pos, OpConst16, t)
19631 v0.AuxInt = int16ToAuxInt(c1)
19632 v.AddArg2(v0, x)
19633 return true
19634 }
19635 }
19636 break
19637 }
19638
19639
19640
19641 for {
19642 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19643 if v_0.Op != OpOr16 {
19644 continue
19645 }
19646 _ = v_0.Args[1]
19647 v_0_0 := v_0.Args[0]
19648 v_0_1 := v_0.Args[1]
19649 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
19650 i := v_0_0
19651 if i.Op != OpConst16 {
19652 continue
19653 }
19654 t := i.Type
19655 z := v_0_1
19656 x := v_1
19657 if !(z.Op != OpConst16 && x.Op != OpConst16) {
19658 continue
19659 }
19660 v.reset(OpOr16)
19661 v0 := b.NewValue0(v.Pos, OpOr16, t)
19662 v0.AddArg2(z, x)
19663 v.AddArg2(i, v0)
19664 return true
19665 }
19666 }
19667 break
19668 }
19669
19670
19671 for {
19672 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19673 if v_0.Op != OpConst16 {
19674 continue
19675 }
19676 t := v_0.Type
19677 c := auxIntToInt16(v_0.AuxInt)
19678 if v_1.Op != OpOr16 {
19679 continue
19680 }
19681 _ = v_1.Args[1]
19682 v_1_0 := v_1.Args[0]
19683 v_1_1 := v_1.Args[1]
19684 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
19685 if v_1_0.Op != OpConst16 || v_1_0.Type != t {
19686 continue
19687 }
19688 d := auxIntToInt16(v_1_0.AuxInt)
19689 x := v_1_1
19690 v.reset(OpOr16)
19691 v0 := b.NewValue0(v.Pos, OpConst16, t)
19692 v0.AuxInt = int16ToAuxInt(c | d)
19693 v.AddArg2(v0, x)
19694 return true
19695 }
19696 }
19697 break
19698 }
19699
19700
19701
19702 for {
19703 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19704 if v_0.Op != OpLsh16x64 {
19705 continue
19706 }
19707 _ = v_0.Args[1]
19708 x := v_0.Args[0]
19709 z := v_0.Args[1]
19710 if z.Op != OpConst64 {
19711 continue
19712 }
19713 c := auxIntToInt64(z.AuxInt)
19714 if v_1.Op != OpRsh16Ux64 {
19715 continue
19716 }
19717 _ = v_1.Args[1]
19718 if x != v_1.Args[0] {
19719 continue
19720 }
19721 v_1_1 := v_1.Args[1]
19722 if v_1_1.Op != OpConst64 {
19723 continue
19724 }
19725 d := auxIntToInt64(v_1_1.AuxInt)
19726 if !(c < 16 && d == 16-c && canRotate(config, 16)) {
19727 continue
19728 }
19729 v.reset(OpRotateLeft16)
19730 v.AddArg2(x, z)
19731 return true
19732 }
19733 break
19734 }
19735
19736
19737
19738 for {
19739 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19740 left := v_0
19741 if left.Op != OpLsh16x64 {
19742 continue
19743 }
19744 y := left.Args[1]
19745 x := left.Args[0]
19746 right := v_1
19747 if right.Op != OpRsh16Ux64 {
19748 continue
19749 }
19750 _ = right.Args[1]
19751 if x != right.Args[0] {
19752 continue
19753 }
19754 right_1 := right.Args[1]
19755 if right_1.Op != OpSub64 {
19756 continue
19757 }
19758 _ = right_1.Args[1]
19759 right_1_0 := right_1.Args[0]
19760 if right_1_0.Op != OpConst64 || auxIntToInt64(right_1_0.AuxInt) != 16 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 16)) {
19761 continue
19762 }
19763 v.reset(OpRotateLeft16)
19764 v.AddArg2(x, y)
19765 return true
19766 }
19767 break
19768 }
19769
19770
19771
19772 for {
19773 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19774 left := v_0
19775 if left.Op != OpLsh16x32 {
19776 continue
19777 }
19778 y := left.Args[1]
19779 x := left.Args[0]
19780 right := v_1
19781 if right.Op != OpRsh16Ux32 {
19782 continue
19783 }
19784 _ = right.Args[1]
19785 if x != right.Args[0] {
19786 continue
19787 }
19788 right_1 := right.Args[1]
19789 if right_1.Op != OpSub32 {
19790 continue
19791 }
19792 _ = right_1.Args[1]
19793 right_1_0 := right_1.Args[0]
19794 if right_1_0.Op != OpConst32 || auxIntToInt32(right_1_0.AuxInt) != 16 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 16)) {
19795 continue
19796 }
19797 v.reset(OpRotateLeft16)
19798 v.AddArg2(x, y)
19799 return true
19800 }
19801 break
19802 }
19803
19804
19805
19806 for {
19807 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19808 left := v_0
19809 if left.Op != OpLsh16x16 {
19810 continue
19811 }
19812 y := left.Args[1]
19813 x := left.Args[0]
19814 right := v_1
19815 if right.Op != OpRsh16Ux16 {
19816 continue
19817 }
19818 _ = right.Args[1]
19819 if x != right.Args[0] {
19820 continue
19821 }
19822 right_1 := right.Args[1]
19823 if right_1.Op != OpSub16 {
19824 continue
19825 }
19826 _ = right_1.Args[1]
19827 right_1_0 := right_1.Args[0]
19828 if right_1_0.Op != OpConst16 || auxIntToInt16(right_1_0.AuxInt) != 16 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 16)) {
19829 continue
19830 }
19831 v.reset(OpRotateLeft16)
19832 v.AddArg2(x, y)
19833 return true
19834 }
19835 break
19836 }
19837
19838
19839
19840 for {
19841 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19842 left := v_0
19843 if left.Op != OpLsh16x8 {
19844 continue
19845 }
19846 y := left.Args[1]
19847 x := left.Args[0]
19848 right := v_1
19849 if right.Op != OpRsh16Ux8 {
19850 continue
19851 }
19852 _ = right.Args[1]
19853 if x != right.Args[0] {
19854 continue
19855 }
19856 right_1 := right.Args[1]
19857 if right_1.Op != OpSub8 {
19858 continue
19859 }
19860 _ = right_1.Args[1]
19861 right_1_0 := right_1.Args[0]
19862 if right_1_0.Op != OpConst8 || auxIntToInt8(right_1_0.AuxInt) != 16 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 16)) {
19863 continue
19864 }
19865 v.reset(OpRotateLeft16)
19866 v.AddArg2(x, y)
19867 return true
19868 }
19869 break
19870 }
19871
19872
19873
19874 for {
19875 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19876 right := v_0
19877 if right.Op != OpRsh16Ux64 {
19878 continue
19879 }
19880 y := right.Args[1]
19881 x := right.Args[0]
19882 left := v_1
19883 if left.Op != OpLsh16x64 {
19884 continue
19885 }
19886 _ = left.Args[1]
19887 if x != left.Args[0] {
19888 continue
19889 }
19890 z := left.Args[1]
19891 if z.Op != OpSub64 {
19892 continue
19893 }
19894 _ = z.Args[1]
19895 z_0 := z.Args[0]
19896 if z_0.Op != OpConst64 || auxIntToInt64(z_0.AuxInt) != 16 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 16)) {
19897 continue
19898 }
19899 v.reset(OpRotateLeft16)
19900 v.AddArg2(x, z)
19901 return true
19902 }
19903 break
19904 }
19905
19906
19907
19908 for {
19909 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19910 right := v_0
19911 if right.Op != OpRsh16Ux32 {
19912 continue
19913 }
19914 y := right.Args[1]
19915 x := right.Args[0]
19916 left := v_1
19917 if left.Op != OpLsh16x32 {
19918 continue
19919 }
19920 _ = left.Args[1]
19921 if x != left.Args[0] {
19922 continue
19923 }
19924 z := left.Args[1]
19925 if z.Op != OpSub32 {
19926 continue
19927 }
19928 _ = z.Args[1]
19929 z_0 := z.Args[0]
19930 if z_0.Op != OpConst32 || auxIntToInt32(z_0.AuxInt) != 16 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 16)) {
19931 continue
19932 }
19933 v.reset(OpRotateLeft16)
19934 v.AddArg2(x, z)
19935 return true
19936 }
19937 break
19938 }
19939
19940
19941
19942 for {
19943 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19944 right := v_0
19945 if right.Op != OpRsh16Ux16 {
19946 continue
19947 }
19948 y := right.Args[1]
19949 x := right.Args[0]
19950 left := v_1
19951 if left.Op != OpLsh16x16 {
19952 continue
19953 }
19954 _ = left.Args[1]
19955 if x != left.Args[0] {
19956 continue
19957 }
19958 z := left.Args[1]
19959 if z.Op != OpSub16 {
19960 continue
19961 }
19962 _ = z.Args[1]
19963 z_0 := z.Args[0]
19964 if z_0.Op != OpConst16 || auxIntToInt16(z_0.AuxInt) != 16 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 16)) {
19965 continue
19966 }
19967 v.reset(OpRotateLeft16)
19968 v.AddArg2(x, z)
19969 return true
19970 }
19971 break
19972 }
19973
19974
19975
19976 for {
19977 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19978 right := v_0
19979 if right.Op != OpRsh16Ux8 {
19980 continue
19981 }
19982 y := right.Args[1]
19983 x := right.Args[0]
19984 left := v_1
19985 if left.Op != OpLsh16x8 {
19986 continue
19987 }
19988 _ = left.Args[1]
19989 if x != left.Args[0] {
19990 continue
19991 }
19992 z := left.Args[1]
19993 if z.Op != OpSub8 {
19994 continue
19995 }
19996 _ = z.Args[1]
19997 z_0 := z.Args[0]
19998 if z_0.Op != OpConst8 || auxIntToInt8(z_0.AuxInt) != 16 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 16)) {
19999 continue
20000 }
20001 v.reset(OpRotateLeft16)
20002 v.AddArg2(x, z)
20003 return true
20004 }
20005 break
20006 }
20007 return false
20008 }
20009 func rewriteValuegeneric_OpOr32(v *Value) bool {
20010 v_1 := v.Args[1]
20011 v_0 := v.Args[0]
20012 b := v.Block
20013 config := b.Func.Config
20014
20015
20016 for {
20017 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20018 if v_0.Op != OpConst32 {
20019 continue
20020 }
20021 c := auxIntToInt32(v_0.AuxInt)
20022 if v_1.Op != OpConst32 {
20023 continue
20024 }
20025 d := auxIntToInt32(v_1.AuxInt)
20026 v.reset(OpConst32)
20027 v.AuxInt = int32ToAuxInt(c | d)
20028 return true
20029 }
20030 break
20031 }
20032
20033
20034 for {
20035 t := v.Type
20036 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20037 if v_0.Op != OpCom32 {
20038 continue
20039 }
20040 x := v_0.Args[0]
20041 if v_1.Op != OpCom32 {
20042 continue
20043 }
20044 y := v_1.Args[0]
20045 v.reset(OpCom32)
20046 v0 := b.NewValue0(v.Pos, OpAnd32, t)
20047 v0.AddArg2(x, y)
20048 v.AddArg(v0)
20049 return true
20050 }
20051 break
20052 }
20053
20054
20055 for {
20056 x := v_0
20057 if x != v_1 {
20058 break
20059 }
20060 v.copyOf(x)
20061 return true
20062 }
20063
20064
20065 for {
20066 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20067 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
20068 continue
20069 }
20070 x := v_1
20071 v.copyOf(x)
20072 return true
20073 }
20074 break
20075 }
20076
20077
20078 for {
20079 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20080 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != -1 {
20081 continue
20082 }
20083 v.reset(OpConst32)
20084 v.AuxInt = int32ToAuxInt(-1)
20085 return true
20086 }
20087 break
20088 }
20089
20090
20091 for {
20092 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20093 if v_0.Op != OpCom32 {
20094 continue
20095 }
20096 x := v_0.Args[0]
20097 if x != v_1 {
20098 continue
20099 }
20100 v.reset(OpConst32)
20101 v.AuxInt = int32ToAuxInt(-1)
20102 return true
20103 }
20104 break
20105 }
20106
20107
20108 for {
20109 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20110 x := v_0
20111 if v_1.Op != OpOr32 {
20112 continue
20113 }
20114 _ = v_1.Args[1]
20115 v_1_0 := v_1.Args[0]
20116 v_1_1 := v_1.Args[1]
20117 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
20118 if x != v_1_0 {
20119 continue
20120 }
20121 y := v_1_1
20122 v.reset(OpOr32)
20123 v.AddArg2(x, y)
20124 return true
20125 }
20126 }
20127 break
20128 }
20129
20130
20131
20132 for {
20133 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20134 if v_0.Op != OpAnd32 {
20135 continue
20136 }
20137 _ = v_0.Args[1]
20138 v_0_0 := v_0.Args[0]
20139 v_0_1 := v_0.Args[1]
20140 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
20141 x := v_0_0
20142 if v_0_1.Op != OpConst32 {
20143 continue
20144 }
20145 c2 := auxIntToInt32(v_0_1.AuxInt)
20146 if v_1.Op != OpConst32 {
20147 continue
20148 }
20149 t := v_1.Type
20150 c1 := auxIntToInt32(v_1.AuxInt)
20151 if !(^(c1 | c2) == 0) {
20152 continue
20153 }
20154 v.reset(OpOr32)
20155 v0 := b.NewValue0(v.Pos, OpConst32, t)
20156 v0.AuxInt = int32ToAuxInt(c1)
20157 v.AddArg2(v0, x)
20158 return true
20159 }
20160 }
20161 break
20162 }
20163
20164
20165
20166 for {
20167 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20168 if v_0.Op != OpOr32 {
20169 continue
20170 }
20171 _ = v_0.Args[1]
20172 v_0_0 := v_0.Args[0]
20173 v_0_1 := v_0.Args[1]
20174 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
20175 i := v_0_0
20176 if i.Op != OpConst32 {
20177 continue
20178 }
20179 t := i.Type
20180 z := v_0_1
20181 x := v_1
20182 if !(z.Op != OpConst32 && x.Op != OpConst32) {
20183 continue
20184 }
20185 v.reset(OpOr32)
20186 v0 := b.NewValue0(v.Pos, OpOr32, t)
20187 v0.AddArg2(z, x)
20188 v.AddArg2(i, v0)
20189 return true
20190 }
20191 }
20192 break
20193 }
20194
20195
20196 for {
20197 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20198 if v_0.Op != OpConst32 {
20199 continue
20200 }
20201 t := v_0.Type
20202 c := auxIntToInt32(v_0.AuxInt)
20203 if v_1.Op != OpOr32 {
20204 continue
20205 }
20206 _ = v_1.Args[1]
20207 v_1_0 := v_1.Args[0]
20208 v_1_1 := v_1.Args[1]
20209 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
20210 if v_1_0.Op != OpConst32 || v_1_0.Type != t {
20211 continue
20212 }
20213 d := auxIntToInt32(v_1_0.AuxInt)
20214 x := v_1_1
20215 v.reset(OpOr32)
20216 v0 := b.NewValue0(v.Pos, OpConst32, t)
20217 v0.AuxInt = int32ToAuxInt(c | d)
20218 v.AddArg2(v0, x)
20219 return true
20220 }
20221 }
20222 break
20223 }
20224
20225
20226
20227 for {
20228 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20229 if v_0.Op != OpLsh32x64 {
20230 continue
20231 }
20232 _ = v_0.Args[1]
20233 x := v_0.Args[0]
20234 z := v_0.Args[1]
20235 if z.Op != OpConst64 {
20236 continue
20237 }
20238 c := auxIntToInt64(z.AuxInt)
20239 if v_1.Op != OpRsh32Ux64 {
20240 continue
20241 }
20242 _ = v_1.Args[1]
20243 if x != v_1.Args[0] {
20244 continue
20245 }
20246 v_1_1 := v_1.Args[1]
20247 if v_1_1.Op != OpConst64 {
20248 continue
20249 }
20250 d := auxIntToInt64(v_1_1.AuxInt)
20251 if !(c < 32 && d == 32-c && canRotate(config, 32)) {
20252 continue
20253 }
20254 v.reset(OpRotateLeft32)
20255 v.AddArg2(x, z)
20256 return true
20257 }
20258 break
20259 }
20260
20261
20262
20263 for {
20264 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20265 left := v_0
20266 if left.Op != OpLsh32x64 {
20267 continue
20268 }
20269 y := left.Args[1]
20270 x := left.Args[0]
20271 right := v_1
20272 if right.Op != OpRsh32Ux64 {
20273 continue
20274 }
20275 _ = right.Args[1]
20276 if x != right.Args[0] {
20277 continue
20278 }
20279 right_1 := right.Args[1]
20280 if right_1.Op != OpSub64 {
20281 continue
20282 }
20283 _ = right_1.Args[1]
20284 right_1_0 := right_1.Args[0]
20285 if right_1_0.Op != OpConst64 || auxIntToInt64(right_1_0.AuxInt) != 32 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 32)) {
20286 continue
20287 }
20288 v.reset(OpRotateLeft32)
20289 v.AddArg2(x, y)
20290 return true
20291 }
20292 break
20293 }
20294
20295
20296
20297 for {
20298 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20299 left := v_0
20300 if left.Op != OpLsh32x32 {
20301 continue
20302 }
20303 y := left.Args[1]
20304 x := left.Args[0]
20305 right := v_1
20306 if right.Op != OpRsh32Ux32 {
20307 continue
20308 }
20309 _ = right.Args[1]
20310 if x != right.Args[0] {
20311 continue
20312 }
20313 right_1 := right.Args[1]
20314 if right_1.Op != OpSub32 {
20315 continue
20316 }
20317 _ = right_1.Args[1]
20318 right_1_0 := right_1.Args[0]
20319 if right_1_0.Op != OpConst32 || auxIntToInt32(right_1_0.AuxInt) != 32 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 32)) {
20320 continue
20321 }
20322 v.reset(OpRotateLeft32)
20323 v.AddArg2(x, y)
20324 return true
20325 }
20326 break
20327 }
20328
20329
20330
20331 for {
20332 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20333 left := v_0
20334 if left.Op != OpLsh32x16 {
20335 continue
20336 }
20337 y := left.Args[1]
20338 x := left.Args[0]
20339 right := v_1
20340 if right.Op != OpRsh32Ux16 {
20341 continue
20342 }
20343 _ = right.Args[1]
20344 if x != right.Args[0] {
20345 continue
20346 }
20347 right_1 := right.Args[1]
20348 if right_1.Op != OpSub16 {
20349 continue
20350 }
20351 _ = right_1.Args[1]
20352 right_1_0 := right_1.Args[0]
20353 if right_1_0.Op != OpConst16 || auxIntToInt16(right_1_0.AuxInt) != 32 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 32)) {
20354 continue
20355 }
20356 v.reset(OpRotateLeft32)
20357 v.AddArg2(x, y)
20358 return true
20359 }
20360 break
20361 }
20362
20363
20364
20365 for {
20366 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20367 left := v_0
20368 if left.Op != OpLsh32x8 {
20369 continue
20370 }
20371 y := left.Args[1]
20372 x := left.Args[0]
20373 right := v_1
20374 if right.Op != OpRsh32Ux8 {
20375 continue
20376 }
20377 _ = right.Args[1]
20378 if x != right.Args[0] {
20379 continue
20380 }
20381 right_1 := right.Args[1]
20382 if right_1.Op != OpSub8 {
20383 continue
20384 }
20385 _ = right_1.Args[1]
20386 right_1_0 := right_1.Args[0]
20387 if right_1_0.Op != OpConst8 || auxIntToInt8(right_1_0.AuxInt) != 32 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 32)) {
20388 continue
20389 }
20390 v.reset(OpRotateLeft32)
20391 v.AddArg2(x, y)
20392 return true
20393 }
20394 break
20395 }
20396
20397
20398
20399 for {
20400 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20401 right := v_0
20402 if right.Op != OpRsh32Ux64 {
20403 continue
20404 }
20405 y := right.Args[1]
20406 x := right.Args[0]
20407 left := v_1
20408 if left.Op != OpLsh32x64 {
20409 continue
20410 }
20411 _ = left.Args[1]
20412 if x != left.Args[0] {
20413 continue
20414 }
20415 z := left.Args[1]
20416 if z.Op != OpSub64 {
20417 continue
20418 }
20419 _ = z.Args[1]
20420 z_0 := z.Args[0]
20421 if z_0.Op != OpConst64 || auxIntToInt64(z_0.AuxInt) != 32 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 32)) {
20422 continue
20423 }
20424 v.reset(OpRotateLeft32)
20425 v.AddArg2(x, z)
20426 return true
20427 }
20428 break
20429 }
20430
20431
20432
20433 for {
20434 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20435 right := v_0
20436 if right.Op != OpRsh32Ux32 {
20437 continue
20438 }
20439 y := right.Args[1]
20440 x := right.Args[0]
20441 left := v_1
20442 if left.Op != OpLsh32x32 {
20443 continue
20444 }
20445 _ = left.Args[1]
20446 if x != left.Args[0] {
20447 continue
20448 }
20449 z := left.Args[1]
20450 if z.Op != OpSub32 {
20451 continue
20452 }
20453 _ = z.Args[1]
20454 z_0 := z.Args[0]
20455 if z_0.Op != OpConst32 || auxIntToInt32(z_0.AuxInt) != 32 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 32)) {
20456 continue
20457 }
20458 v.reset(OpRotateLeft32)
20459 v.AddArg2(x, z)
20460 return true
20461 }
20462 break
20463 }
20464
20465
20466
20467 for {
20468 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20469 right := v_0
20470 if right.Op != OpRsh32Ux16 {
20471 continue
20472 }
20473 y := right.Args[1]
20474 x := right.Args[0]
20475 left := v_1
20476 if left.Op != OpLsh32x16 {
20477 continue
20478 }
20479 _ = left.Args[1]
20480 if x != left.Args[0] {
20481 continue
20482 }
20483 z := left.Args[1]
20484 if z.Op != OpSub16 {
20485 continue
20486 }
20487 _ = z.Args[1]
20488 z_0 := z.Args[0]
20489 if z_0.Op != OpConst16 || auxIntToInt16(z_0.AuxInt) != 32 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 32)) {
20490 continue
20491 }
20492 v.reset(OpRotateLeft32)
20493 v.AddArg2(x, z)
20494 return true
20495 }
20496 break
20497 }
20498
20499
20500
20501 for {
20502 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20503 right := v_0
20504 if right.Op != OpRsh32Ux8 {
20505 continue
20506 }
20507 y := right.Args[1]
20508 x := right.Args[0]
20509 left := v_1
20510 if left.Op != OpLsh32x8 {
20511 continue
20512 }
20513 _ = left.Args[1]
20514 if x != left.Args[0] {
20515 continue
20516 }
20517 z := left.Args[1]
20518 if z.Op != OpSub8 {
20519 continue
20520 }
20521 _ = z.Args[1]
20522 z_0 := z.Args[0]
20523 if z_0.Op != OpConst8 || auxIntToInt8(z_0.AuxInt) != 32 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 32)) {
20524 continue
20525 }
20526 v.reset(OpRotateLeft32)
20527 v.AddArg2(x, z)
20528 return true
20529 }
20530 break
20531 }
20532 return false
20533 }
20534 func rewriteValuegeneric_OpOr64(v *Value) bool {
20535 v_1 := v.Args[1]
20536 v_0 := v.Args[0]
20537 b := v.Block
20538 config := b.Func.Config
20539
20540
20541 for {
20542 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20543 if v_0.Op != OpConst64 {
20544 continue
20545 }
20546 c := auxIntToInt64(v_0.AuxInt)
20547 if v_1.Op != OpConst64 {
20548 continue
20549 }
20550 d := auxIntToInt64(v_1.AuxInt)
20551 v.reset(OpConst64)
20552 v.AuxInt = int64ToAuxInt(c | d)
20553 return true
20554 }
20555 break
20556 }
20557
20558
20559 for {
20560 t := v.Type
20561 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20562 if v_0.Op != OpCom64 {
20563 continue
20564 }
20565 x := v_0.Args[0]
20566 if v_1.Op != OpCom64 {
20567 continue
20568 }
20569 y := v_1.Args[0]
20570 v.reset(OpCom64)
20571 v0 := b.NewValue0(v.Pos, OpAnd64, t)
20572 v0.AddArg2(x, y)
20573 v.AddArg(v0)
20574 return true
20575 }
20576 break
20577 }
20578
20579
20580 for {
20581 x := v_0
20582 if x != v_1 {
20583 break
20584 }
20585 v.copyOf(x)
20586 return true
20587 }
20588
20589
20590 for {
20591 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20592 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
20593 continue
20594 }
20595 x := v_1
20596 v.copyOf(x)
20597 return true
20598 }
20599 break
20600 }
20601
20602
20603 for {
20604 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20605 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != -1 {
20606 continue
20607 }
20608 v.reset(OpConst64)
20609 v.AuxInt = int64ToAuxInt(-1)
20610 return true
20611 }
20612 break
20613 }
20614
20615
20616 for {
20617 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20618 if v_0.Op != OpCom64 {
20619 continue
20620 }
20621 x := v_0.Args[0]
20622 if x != v_1 {
20623 continue
20624 }
20625 v.reset(OpConst64)
20626 v.AuxInt = int64ToAuxInt(-1)
20627 return true
20628 }
20629 break
20630 }
20631
20632
20633 for {
20634 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20635 x := v_0
20636 if v_1.Op != OpOr64 {
20637 continue
20638 }
20639 _ = v_1.Args[1]
20640 v_1_0 := v_1.Args[0]
20641 v_1_1 := v_1.Args[1]
20642 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
20643 if x != v_1_0 {
20644 continue
20645 }
20646 y := v_1_1
20647 v.reset(OpOr64)
20648 v.AddArg2(x, y)
20649 return true
20650 }
20651 }
20652 break
20653 }
20654
20655
20656
20657 for {
20658 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20659 if v_0.Op != OpAnd64 {
20660 continue
20661 }
20662 _ = v_0.Args[1]
20663 v_0_0 := v_0.Args[0]
20664 v_0_1 := v_0.Args[1]
20665 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
20666 x := v_0_0
20667 if v_0_1.Op != OpConst64 {
20668 continue
20669 }
20670 c2 := auxIntToInt64(v_0_1.AuxInt)
20671 if v_1.Op != OpConst64 {
20672 continue
20673 }
20674 t := v_1.Type
20675 c1 := auxIntToInt64(v_1.AuxInt)
20676 if !(^(c1 | c2) == 0) {
20677 continue
20678 }
20679 v.reset(OpOr64)
20680 v0 := b.NewValue0(v.Pos, OpConst64, t)
20681 v0.AuxInt = int64ToAuxInt(c1)
20682 v.AddArg2(v0, x)
20683 return true
20684 }
20685 }
20686 break
20687 }
20688
20689
20690
20691 for {
20692 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20693 if v_0.Op != OpOr64 {
20694 continue
20695 }
20696 _ = v_0.Args[1]
20697 v_0_0 := v_0.Args[0]
20698 v_0_1 := v_0.Args[1]
20699 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
20700 i := v_0_0
20701 if i.Op != OpConst64 {
20702 continue
20703 }
20704 t := i.Type
20705 z := v_0_1
20706 x := v_1
20707 if !(z.Op != OpConst64 && x.Op != OpConst64) {
20708 continue
20709 }
20710 v.reset(OpOr64)
20711 v0 := b.NewValue0(v.Pos, OpOr64, t)
20712 v0.AddArg2(z, x)
20713 v.AddArg2(i, v0)
20714 return true
20715 }
20716 }
20717 break
20718 }
20719
20720
20721 for {
20722 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20723 if v_0.Op != OpConst64 {
20724 continue
20725 }
20726 t := v_0.Type
20727 c := auxIntToInt64(v_0.AuxInt)
20728 if v_1.Op != OpOr64 {
20729 continue
20730 }
20731 _ = v_1.Args[1]
20732 v_1_0 := v_1.Args[0]
20733 v_1_1 := v_1.Args[1]
20734 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
20735 if v_1_0.Op != OpConst64 || v_1_0.Type != t {
20736 continue
20737 }
20738 d := auxIntToInt64(v_1_0.AuxInt)
20739 x := v_1_1
20740 v.reset(OpOr64)
20741 v0 := b.NewValue0(v.Pos, OpConst64, t)
20742 v0.AuxInt = int64ToAuxInt(c | d)
20743 v.AddArg2(v0, x)
20744 return true
20745 }
20746 }
20747 break
20748 }
20749
20750
20751
20752 for {
20753 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20754 if v_0.Op != OpLsh64x64 {
20755 continue
20756 }
20757 _ = v_0.Args[1]
20758 x := v_0.Args[0]
20759 z := v_0.Args[1]
20760 if z.Op != OpConst64 {
20761 continue
20762 }
20763 c := auxIntToInt64(z.AuxInt)
20764 if v_1.Op != OpRsh64Ux64 {
20765 continue
20766 }
20767 _ = v_1.Args[1]
20768 if x != v_1.Args[0] {
20769 continue
20770 }
20771 v_1_1 := v_1.Args[1]
20772 if v_1_1.Op != OpConst64 {
20773 continue
20774 }
20775 d := auxIntToInt64(v_1_1.AuxInt)
20776 if !(c < 64 && d == 64-c && canRotate(config, 64)) {
20777 continue
20778 }
20779 v.reset(OpRotateLeft64)
20780 v.AddArg2(x, z)
20781 return true
20782 }
20783 break
20784 }
20785
20786
20787
20788 for {
20789 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20790 left := v_0
20791 if left.Op != OpLsh64x64 {
20792 continue
20793 }
20794 y := left.Args[1]
20795 x := left.Args[0]
20796 right := v_1
20797 if right.Op != OpRsh64Ux64 {
20798 continue
20799 }
20800 _ = right.Args[1]
20801 if x != right.Args[0] {
20802 continue
20803 }
20804 right_1 := right.Args[1]
20805 if right_1.Op != OpSub64 {
20806 continue
20807 }
20808 _ = right_1.Args[1]
20809 right_1_0 := right_1.Args[0]
20810 if right_1_0.Op != OpConst64 || auxIntToInt64(right_1_0.AuxInt) != 64 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 64)) {
20811 continue
20812 }
20813 v.reset(OpRotateLeft64)
20814 v.AddArg2(x, y)
20815 return true
20816 }
20817 break
20818 }
20819
20820
20821
20822 for {
20823 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20824 left := v_0
20825 if left.Op != OpLsh64x32 {
20826 continue
20827 }
20828 y := left.Args[1]
20829 x := left.Args[0]
20830 right := v_1
20831 if right.Op != OpRsh64Ux32 {
20832 continue
20833 }
20834 _ = right.Args[1]
20835 if x != right.Args[0] {
20836 continue
20837 }
20838 right_1 := right.Args[1]
20839 if right_1.Op != OpSub32 {
20840 continue
20841 }
20842 _ = right_1.Args[1]
20843 right_1_0 := right_1.Args[0]
20844 if right_1_0.Op != OpConst32 || auxIntToInt32(right_1_0.AuxInt) != 64 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 64)) {
20845 continue
20846 }
20847 v.reset(OpRotateLeft64)
20848 v.AddArg2(x, y)
20849 return true
20850 }
20851 break
20852 }
20853
20854
20855
20856 for {
20857 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20858 left := v_0
20859 if left.Op != OpLsh64x16 {
20860 continue
20861 }
20862 y := left.Args[1]
20863 x := left.Args[0]
20864 right := v_1
20865 if right.Op != OpRsh64Ux16 {
20866 continue
20867 }
20868 _ = right.Args[1]
20869 if x != right.Args[0] {
20870 continue
20871 }
20872 right_1 := right.Args[1]
20873 if right_1.Op != OpSub16 {
20874 continue
20875 }
20876 _ = right_1.Args[1]
20877 right_1_0 := right_1.Args[0]
20878 if right_1_0.Op != OpConst16 || auxIntToInt16(right_1_0.AuxInt) != 64 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 64)) {
20879 continue
20880 }
20881 v.reset(OpRotateLeft64)
20882 v.AddArg2(x, y)
20883 return true
20884 }
20885 break
20886 }
20887
20888
20889
20890 for {
20891 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20892 left := v_0
20893 if left.Op != OpLsh64x8 {
20894 continue
20895 }
20896 y := left.Args[1]
20897 x := left.Args[0]
20898 right := v_1
20899 if right.Op != OpRsh64Ux8 {
20900 continue
20901 }
20902 _ = right.Args[1]
20903 if x != right.Args[0] {
20904 continue
20905 }
20906 right_1 := right.Args[1]
20907 if right_1.Op != OpSub8 {
20908 continue
20909 }
20910 _ = right_1.Args[1]
20911 right_1_0 := right_1.Args[0]
20912 if right_1_0.Op != OpConst8 || auxIntToInt8(right_1_0.AuxInt) != 64 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 64)) {
20913 continue
20914 }
20915 v.reset(OpRotateLeft64)
20916 v.AddArg2(x, y)
20917 return true
20918 }
20919 break
20920 }
20921
20922
20923
20924 for {
20925 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20926 right := v_0
20927 if right.Op != OpRsh64Ux64 {
20928 continue
20929 }
20930 y := right.Args[1]
20931 x := right.Args[0]
20932 left := v_1
20933 if left.Op != OpLsh64x64 {
20934 continue
20935 }
20936 _ = left.Args[1]
20937 if x != left.Args[0] {
20938 continue
20939 }
20940 z := left.Args[1]
20941 if z.Op != OpSub64 {
20942 continue
20943 }
20944 _ = z.Args[1]
20945 z_0 := z.Args[0]
20946 if z_0.Op != OpConst64 || auxIntToInt64(z_0.AuxInt) != 64 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 64)) {
20947 continue
20948 }
20949 v.reset(OpRotateLeft64)
20950 v.AddArg2(x, z)
20951 return true
20952 }
20953 break
20954 }
20955
20956
20957
20958 for {
20959 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20960 right := v_0
20961 if right.Op != OpRsh64Ux32 {
20962 continue
20963 }
20964 y := right.Args[1]
20965 x := right.Args[0]
20966 left := v_1
20967 if left.Op != OpLsh64x32 {
20968 continue
20969 }
20970 _ = left.Args[1]
20971 if x != left.Args[0] {
20972 continue
20973 }
20974 z := left.Args[1]
20975 if z.Op != OpSub32 {
20976 continue
20977 }
20978 _ = z.Args[1]
20979 z_0 := z.Args[0]
20980 if z_0.Op != OpConst32 || auxIntToInt32(z_0.AuxInt) != 64 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 64)) {
20981 continue
20982 }
20983 v.reset(OpRotateLeft64)
20984 v.AddArg2(x, z)
20985 return true
20986 }
20987 break
20988 }
20989
20990
20991
20992 for {
20993 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20994 right := v_0
20995 if right.Op != OpRsh64Ux16 {
20996 continue
20997 }
20998 y := right.Args[1]
20999 x := right.Args[0]
21000 left := v_1
21001 if left.Op != OpLsh64x16 {
21002 continue
21003 }
21004 _ = left.Args[1]
21005 if x != left.Args[0] {
21006 continue
21007 }
21008 z := left.Args[1]
21009 if z.Op != OpSub16 {
21010 continue
21011 }
21012 _ = z.Args[1]
21013 z_0 := z.Args[0]
21014 if z_0.Op != OpConst16 || auxIntToInt16(z_0.AuxInt) != 64 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 64)) {
21015 continue
21016 }
21017 v.reset(OpRotateLeft64)
21018 v.AddArg2(x, z)
21019 return true
21020 }
21021 break
21022 }
21023
21024
21025
21026 for {
21027 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
21028 right := v_0
21029 if right.Op != OpRsh64Ux8 {
21030 continue
21031 }
21032 y := right.Args[1]
21033 x := right.Args[0]
21034 left := v_1
21035 if left.Op != OpLsh64x8 {
21036 continue
21037 }
21038 _ = left.Args[1]
21039 if x != left.Args[0] {
21040 continue
21041 }
21042 z := left.Args[1]
21043 if z.Op != OpSub8 {
21044 continue
21045 }
21046 _ = z.Args[1]
21047 z_0 := z.Args[0]
21048 if z_0.Op != OpConst8 || auxIntToInt8(z_0.AuxInt) != 64 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 64)) {
21049 continue
21050 }
21051 v.reset(OpRotateLeft64)
21052 v.AddArg2(x, z)
21053 return true
21054 }
21055 break
21056 }
21057 return false
21058 }
21059 func rewriteValuegeneric_OpOr8(v *Value) bool {
21060 v_1 := v.Args[1]
21061 v_0 := v.Args[0]
21062 b := v.Block
21063 config := b.Func.Config
21064
21065
21066 for {
21067 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
21068 if v_0.Op != OpConst8 {
21069 continue
21070 }
21071 c := auxIntToInt8(v_0.AuxInt)
21072 if v_1.Op != OpConst8 {
21073 continue
21074 }
21075 d := auxIntToInt8(v_1.AuxInt)
21076 v.reset(OpConst8)
21077 v.AuxInt = int8ToAuxInt(c | d)
21078 return true
21079 }
21080 break
21081 }
21082
21083
21084 for {
21085 t := v.Type
21086 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
21087 if v_0.Op != OpCom8 {
21088 continue
21089 }
21090 x := v_0.Args[0]
21091 if v_1.Op != OpCom8 {
21092 continue
21093 }
21094 y := v_1.Args[0]
21095 v.reset(OpCom8)
21096 v0 := b.NewValue0(v.Pos, OpAnd8, t)
21097 v0.AddArg2(x, y)
21098 v.AddArg(v0)
21099 return true
21100 }
21101 break
21102 }
21103
21104
21105 for {
21106 x := v_0
21107 if x != v_1 {
21108 break
21109 }
21110 v.copyOf(x)
21111 return true
21112 }
21113
21114
21115 for {
21116 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
21117 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 {
21118 continue
21119 }
21120 x := v_1
21121 v.copyOf(x)
21122 return true
21123 }
21124 break
21125 }
21126
21127
21128 for {
21129 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
21130 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != -1 {
21131 continue
21132 }
21133 v.reset(OpConst8)
21134 v.AuxInt = int8ToAuxInt(-1)
21135 return true
21136 }
21137 break
21138 }
21139
21140
21141 for {
21142 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
21143 if v_0.Op != OpCom8 {
21144 continue
21145 }
21146 x := v_0.Args[0]
21147 if x != v_1 {
21148 continue
21149 }
21150 v.reset(OpConst8)
21151 v.AuxInt = int8ToAuxInt(-1)
21152 return true
21153 }
21154 break
21155 }
21156
21157
21158 for {
21159 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
21160 x := v_0
21161 if v_1.Op != OpOr8 {
21162 continue
21163 }
21164 _ = v_1.Args[1]
21165 v_1_0 := v_1.Args[0]
21166 v_1_1 := v_1.Args[1]
21167 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
21168 if x != v_1_0 {
21169 continue
21170 }
21171 y := v_1_1
21172 v.reset(OpOr8)
21173 v.AddArg2(x, y)
21174 return true
21175 }
21176 }
21177 break
21178 }
21179
21180
21181
21182 for {
21183 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
21184 if v_0.Op != OpAnd8 {
21185 continue
21186 }
21187 _ = v_0.Args[1]
21188 v_0_0 := v_0.Args[0]
21189 v_0_1 := v_0.Args[1]
21190 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
21191 x := v_0_0
21192 if v_0_1.Op != OpConst8 {
21193 continue
21194 }
21195 c2 := auxIntToInt8(v_0_1.AuxInt)
21196 if v_1.Op != OpConst8 {
21197 continue
21198 }
21199 t := v_1.Type
21200 c1 := auxIntToInt8(v_1.AuxInt)
21201 if !(^(c1 | c2) == 0) {
21202 continue
21203 }
21204 v.reset(OpOr8)
21205 v0 := b.NewValue0(v.Pos, OpConst8, t)
21206 v0.AuxInt = int8ToAuxInt(c1)
21207 v.AddArg2(v0, x)
21208 return true
21209 }
21210 }
21211 break
21212 }
21213
21214
21215
21216 for {
21217 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
21218 if v_0.Op != OpOr8 {
21219 continue
21220 }
21221 _ = v_0.Args[1]
21222 v_0_0 := v_0.Args[0]
21223 v_0_1 := v_0.Args[1]
21224 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
21225 i := v_0_0
21226 if i.Op != OpConst8 {
21227 continue
21228 }
21229 t := i.Type
21230 z := v_0_1
21231 x := v_1
21232 if !(z.Op != OpConst8 && x.Op != OpConst8) {
21233 continue
21234 }
21235 v.reset(OpOr8)
21236 v0 := b.NewValue0(v.Pos, OpOr8, t)
21237 v0.AddArg2(z, x)
21238 v.AddArg2(i, v0)
21239 return true
21240 }
21241 }
21242 break
21243 }
21244
21245
21246 for {
21247 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
21248 if v_0.Op != OpConst8 {
21249 continue
21250 }
21251 t := v_0.Type
21252 c := auxIntToInt8(v_0.AuxInt)
21253 if v_1.Op != OpOr8 {
21254 continue
21255 }
21256 _ = v_1.Args[1]
21257 v_1_0 := v_1.Args[0]
21258 v_1_1 := v_1.Args[1]
21259 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
21260 if v_1_0.Op != OpConst8 || v_1_0.Type != t {
21261 continue
21262 }
21263 d := auxIntToInt8(v_1_0.AuxInt)
21264 x := v_1_1
21265 v.reset(OpOr8)
21266 v0 := b.NewValue0(v.Pos, OpConst8, t)
21267 v0.AuxInt = int8ToAuxInt(c | d)
21268 v.AddArg2(v0, x)
21269 return true
21270 }
21271 }
21272 break
21273 }
21274
21275
21276
21277 for {
21278 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
21279 if v_0.Op != OpLsh8x64 {
21280 continue
21281 }
21282 _ = v_0.Args[1]
21283 x := v_0.Args[0]
21284 z := v_0.Args[1]
21285 if z.Op != OpConst64 {
21286 continue
21287 }
21288 c := auxIntToInt64(z.AuxInt)
21289 if v_1.Op != OpRsh8Ux64 {
21290 continue
21291 }
21292 _ = v_1.Args[1]
21293 if x != v_1.Args[0] {
21294 continue
21295 }
21296 v_1_1 := v_1.Args[1]
21297 if v_1_1.Op != OpConst64 {
21298 continue
21299 }
21300 d := auxIntToInt64(v_1_1.AuxInt)
21301 if !(c < 8 && d == 8-c && canRotate(config, 8)) {
21302 continue
21303 }
21304 v.reset(OpRotateLeft8)
21305 v.AddArg2(x, z)
21306 return true
21307 }
21308 break
21309 }
21310
21311
21312
21313 for {
21314 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
21315 left := v_0
21316 if left.Op != OpLsh8x64 {
21317 continue
21318 }
21319 y := left.Args[1]
21320 x := left.Args[0]
21321 right := v_1
21322 if right.Op != OpRsh8Ux64 {
21323 continue
21324 }
21325 _ = right.Args[1]
21326 if x != right.Args[0] {
21327 continue
21328 }
21329 right_1 := right.Args[1]
21330 if right_1.Op != OpSub64 {
21331 continue
21332 }
21333 _ = right_1.Args[1]
21334 right_1_0 := right_1.Args[0]
21335 if right_1_0.Op != OpConst64 || auxIntToInt64(right_1_0.AuxInt) != 8 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 8)) {
21336 continue
21337 }
21338 v.reset(OpRotateLeft8)
21339 v.AddArg2(x, y)
21340 return true
21341 }
21342 break
21343 }
21344
21345
21346
21347 for {
21348 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
21349 left := v_0
21350 if left.Op != OpLsh8x32 {
21351 continue
21352 }
21353 y := left.Args[1]
21354 x := left.Args[0]
21355 right := v_1
21356 if right.Op != OpRsh8Ux32 {
21357 continue
21358 }
21359 _ = right.Args[1]
21360 if x != right.Args[0] {
21361 continue
21362 }
21363 right_1 := right.Args[1]
21364 if right_1.Op != OpSub32 {
21365 continue
21366 }
21367 _ = right_1.Args[1]
21368 right_1_0 := right_1.Args[0]
21369 if right_1_0.Op != OpConst32 || auxIntToInt32(right_1_0.AuxInt) != 8 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 8)) {
21370 continue
21371 }
21372 v.reset(OpRotateLeft8)
21373 v.AddArg2(x, y)
21374 return true
21375 }
21376 break
21377 }
21378
21379
21380
21381 for {
21382 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
21383 left := v_0
21384 if left.Op != OpLsh8x16 {
21385 continue
21386 }
21387 y := left.Args[1]
21388 x := left.Args[0]
21389 right := v_1
21390 if right.Op != OpRsh8Ux16 {
21391 continue
21392 }
21393 _ = right.Args[1]
21394 if x != right.Args[0] {
21395 continue
21396 }
21397 right_1 := right.Args[1]
21398 if right_1.Op != OpSub16 {
21399 continue
21400 }
21401 _ = right_1.Args[1]
21402 right_1_0 := right_1.Args[0]
21403 if right_1_0.Op != OpConst16 || auxIntToInt16(right_1_0.AuxInt) != 8 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 8)) {
21404 continue
21405 }
21406 v.reset(OpRotateLeft8)
21407 v.AddArg2(x, y)
21408 return true
21409 }
21410 break
21411 }
21412
21413
21414
21415 for {
21416 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
21417 left := v_0
21418 if left.Op != OpLsh8x8 {
21419 continue
21420 }
21421 y := left.Args[1]
21422 x := left.Args[0]
21423 right := v_1
21424 if right.Op != OpRsh8Ux8 {
21425 continue
21426 }
21427 _ = right.Args[1]
21428 if x != right.Args[0] {
21429 continue
21430 }
21431 right_1 := right.Args[1]
21432 if right_1.Op != OpSub8 {
21433 continue
21434 }
21435 _ = right_1.Args[1]
21436 right_1_0 := right_1.Args[0]
21437 if right_1_0.Op != OpConst8 || auxIntToInt8(right_1_0.AuxInt) != 8 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 8)) {
21438 continue
21439 }
21440 v.reset(OpRotateLeft8)
21441 v.AddArg2(x, y)
21442 return true
21443 }
21444 break
21445 }
21446
21447
21448
21449 for {
21450 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
21451 right := v_0
21452 if right.Op != OpRsh8Ux64 {
21453 continue
21454 }
21455 y := right.Args[1]
21456 x := right.Args[0]
21457 left := v_1
21458 if left.Op != OpLsh8x64 {
21459 continue
21460 }
21461 _ = left.Args[1]
21462 if x != left.Args[0] {
21463 continue
21464 }
21465 z := left.Args[1]
21466 if z.Op != OpSub64 {
21467 continue
21468 }
21469 _ = z.Args[1]
21470 z_0 := z.Args[0]
21471 if z_0.Op != OpConst64 || auxIntToInt64(z_0.AuxInt) != 8 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 8)) {
21472 continue
21473 }
21474 v.reset(OpRotateLeft8)
21475 v.AddArg2(x, z)
21476 return true
21477 }
21478 break
21479 }
21480
21481
21482
21483 for {
21484 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
21485 right := v_0
21486 if right.Op != OpRsh8Ux32 {
21487 continue
21488 }
21489 y := right.Args[1]
21490 x := right.Args[0]
21491 left := v_1
21492 if left.Op != OpLsh8x32 {
21493 continue
21494 }
21495 _ = left.Args[1]
21496 if x != left.Args[0] {
21497 continue
21498 }
21499 z := left.Args[1]
21500 if z.Op != OpSub32 {
21501 continue
21502 }
21503 _ = z.Args[1]
21504 z_0 := z.Args[0]
21505 if z_0.Op != OpConst32 || auxIntToInt32(z_0.AuxInt) != 8 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 8)) {
21506 continue
21507 }
21508 v.reset(OpRotateLeft8)
21509 v.AddArg2(x, z)
21510 return true
21511 }
21512 break
21513 }
21514
21515
21516
21517 for {
21518 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
21519 right := v_0
21520 if right.Op != OpRsh8Ux16 {
21521 continue
21522 }
21523 y := right.Args[1]
21524 x := right.Args[0]
21525 left := v_1
21526 if left.Op != OpLsh8x16 {
21527 continue
21528 }
21529 _ = left.Args[1]
21530 if x != left.Args[0] {
21531 continue
21532 }
21533 z := left.Args[1]
21534 if z.Op != OpSub16 {
21535 continue
21536 }
21537 _ = z.Args[1]
21538 z_0 := z.Args[0]
21539 if z_0.Op != OpConst16 || auxIntToInt16(z_0.AuxInt) != 8 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 8)) {
21540 continue
21541 }
21542 v.reset(OpRotateLeft8)
21543 v.AddArg2(x, z)
21544 return true
21545 }
21546 break
21547 }
21548
21549
21550
21551 for {
21552 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
21553 right := v_0
21554 if right.Op != OpRsh8Ux8 {
21555 continue
21556 }
21557 y := right.Args[1]
21558 x := right.Args[0]
21559 left := v_1
21560 if left.Op != OpLsh8x8 {
21561 continue
21562 }
21563 _ = left.Args[1]
21564 if x != left.Args[0] {
21565 continue
21566 }
21567 z := left.Args[1]
21568 if z.Op != OpSub8 {
21569 continue
21570 }
21571 _ = z.Args[1]
21572 z_0 := z.Args[0]
21573 if z_0.Op != OpConst8 || auxIntToInt8(z_0.AuxInt) != 8 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 8)) {
21574 continue
21575 }
21576 v.reset(OpRotateLeft8)
21577 v.AddArg2(x, z)
21578 return true
21579 }
21580 break
21581 }
21582 return false
21583 }
21584 func rewriteValuegeneric_OpOrB(v *Value) bool {
21585 v_1 := v.Args[1]
21586 v_0 := v.Args[0]
21587 b := v.Block
21588
21589
21590
21591 for {
21592 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
21593 if v_0.Op != OpLess64 {
21594 continue
21595 }
21596 x := v_0.Args[1]
21597 v_0_0 := v_0.Args[0]
21598 if v_0_0.Op != OpConst64 {
21599 continue
21600 }
21601 c := auxIntToInt64(v_0_0.AuxInt)
21602 if v_1.Op != OpLess64 {
21603 continue
21604 }
21605 _ = v_1.Args[1]
21606 if x != v_1.Args[0] {
21607 continue
21608 }
21609 v_1_1 := v_1.Args[1]
21610 if v_1_1.Op != OpConst64 {
21611 continue
21612 }
21613 d := auxIntToInt64(v_1_1.AuxInt)
21614 if !(c >= d) {
21615 continue
21616 }
21617 v.reset(OpLess64U)
21618 v0 := b.NewValue0(v.Pos, OpConst64, x.Type)
21619 v0.AuxInt = int64ToAuxInt(c - d)
21620 v1 := b.NewValue0(v.Pos, OpSub64, x.Type)
21621 v2 := b.NewValue0(v.Pos, OpConst64, x.Type)
21622 v2.AuxInt = int64ToAuxInt(d)
21623 v1.AddArg2(x, v2)
21624 v.AddArg2(v0, v1)
21625 return true
21626 }
21627 break
21628 }
21629
21630
21631
21632 for {
21633 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
21634 if v_0.Op != OpLeq64 {
21635 continue
21636 }
21637 x := v_0.Args[1]
21638 v_0_0 := v_0.Args[0]
21639 if v_0_0.Op != OpConst64 {
21640 continue
21641 }
21642 c := auxIntToInt64(v_0_0.AuxInt)
21643 if v_1.Op != OpLess64 {
21644 continue
21645 }
21646 _ = v_1.Args[1]
21647 if x != v_1.Args[0] {
21648 continue
21649 }
21650 v_1_1 := v_1.Args[1]
21651 if v_1_1.Op != OpConst64 {
21652 continue
21653 }
21654 d := auxIntToInt64(v_1_1.AuxInt)
21655 if !(c >= d) {
21656 continue
21657 }
21658 v.reset(OpLeq64U)
21659 v0 := b.NewValue0(v.Pos, OpConst64, x.Type)
21660 v0.AuxInt = int64ToAuxInt(c - d)
21661 v1 := b.NewValue0(v.Pos, OpSub64, x.Type)
21662 v2 := b.NewValue0(v.Pos, OpConst64, x.Type)
21663 v2.AuxInt = int64ToAuxInt(d)
21664 v1.AddArg2(x, v2)
21665 v.AddArg2(v0, v1)
21666 return true
21667 }
21668 break
21669 }
21670
21671
21672
21673 for {
21674 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
21675 if v_0.Op != OpLess32 {
21676 continue
21677 }
21678 x := v_0.Args[1]
21679 v_0_0 := v_0.Args[0]
21680 if v_0_0.Op != OpConst32 {
21681 continue
21682 }
21683 c := auxIntToInt32(v_0_0.AuxInt)
21684 if v_1.Op != OpLess32 {
21685 continue
21686 }
21687 _ = v_1.Args[1]
21688 if x != v_1.Args[0] {
21689 continue
21690 }
21691 v_1_1 := v_1.Args[1]
21692 if v_1_1.Op != OpConst32 {
21693 continue
21694 }
21695 d := auxIntToInt32(v_1_1.AuxInt)
21696 if !(c >= d) {
21697 continue
21698 }
21699 v.reset(OpLess32U)
21700 v0 := b.NewValue0(v.Pos, OpConst32, x.Type)
21701 v0.AuxInt = int32ToAuxInt(c - d)
21702 v1 := b.NewValue0(v.Pos, OpSub32, x.Type)
21703 v2 := b.NewValue0(v.Pos, OpConst32, x.Type)
21704 v2.AuxInt = int32ToAuxInt(d)
21705 v1.AddArg2(x, v2)
21706 v.AddArg2(v0, v1)
21707 return true
21708 }
21709 break
21710 }
21711
21712
21713
21714 for {
21715 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
21716 if v_0.Op != OpLeq32 {
21717 continue
21718 }
21719 x := v_0.Args[1]
21720 v_0_0 := v_0.Args[0]
21721 if v_0_0.Op != OpConst32 {
21722 continue
21723 }
21724 c := auxIntToInt32(v_0_0.AuxInt)
21725 if v_1.Op != OpLess32 {
21726 continue
21727 }
21728 _ = v_1.Args[1]
21729 if x != v_1.Args[0] {
21730 continue
21731 }
21732 v_1_1 := v_1.Args[1]
21733 if v_1_1.Op != OpConst32 {
21734 continue
21735 }
21736 d := auxIntToInt32(v_1_1.AuxInt)
21737 if !(c >= d) {
21738 continue
21739 }
21740 v.reset(OpLeq32U)
21741 v0 := b.NewValue0(v.Pos, OpConst32, x.Type)
21742 v0.AuxInt = int32ToAuxInt(c - d)
21743 v1 := b.NewValue0(v.Pos, OpSub32, x.Type)
21744 v2 := b.NewValue0(v.Pos, OpConst32, x.Type)
21745 v2.AuxInt = int32ToAuxInt(d)
21746 v1.AddArg2(x, v2)
21747 v.AddArg2(v0, v1)
21748 return true
21749 }
21750 break
21751 }
21752
21753
21754
21755 for {
21756 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
21757 if v_0.Op != OpLess16 {
21758 continue
21759 }
21760 x := v_0.Args[1]
21761 v_0_0 := v_0.Args[0]
21762 if v_0_0.Op != OpConst16 {
21763 continue
21764 }
21765 c := auxIntToInt16(v_0_0.AuxInt)
21766 if v_1.Op != OpLess16 {
21767 continue
21768 }
21769 _ = v_1.Args[1]
21770 if x != v_1.Args[0] {
21771 continue
21772 }
21773 v_1_1 := v_1.Args[1]
21774 if v_1_1.Op != OpConst16 {
21775 continue
21776 }
21777 d := auxIntToInt16(v_1_1.AuxInt)
21778 if !(c >= d) {
21779 continue
21780 }
21781 v.reset(OpLess16U)
21782 v0 := b.NewValue0(v.Pos, OpConst16, x.Type)
21783 v0.AuxInt = int16ToAuxInt(c - d)
21784 v1 := b.NewValue0(v.Pos, OpSub16, x.Type)
21785 v2 := b.NewValue0(v.Pos, OpConst16, x.Type)
21786 v2.AuxInt = int16ToAuxInt(d)
21787 v1.AddArg2(x, v2)
21788 v.AddArg2(v0, v1)
21789 return true
21790 }
21791 break
21792 }
21793
21794
21795
21796 for {
21797 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
21798 if v_0.Op != OpLeq16 {
21799 continue
21800 }
21801 x := v_0.Args[1]
21802 v_0_0 := v_0.Args[0]
21803 if v_0_0.Op != OpConst16 {
21804 continue
21805 }
21806 c := auxIntToInt16(v_0_0.AuxInt)
21807 if v_1.Op != OpLess16 {
21808 continue
21809 }
21810 _ = v_1.Args[1]
21811 if x != v_1.Args[0] {
21812 continue
21813 }
21814 v_1_1 := v_1.Args[1]
21815 if v_1_1.Op != OpConst16 {
21816 continue
21817 }
21818 d := auxIntToInt16(v_1_1.AuxInt)
21819 if !(c >= d) {
21820 continue
21821 }
21822 v.reset(OpLeq16U)
21823 v0 := b.NewValue0(v.Pos, OpConst16, x.Type)
21824 v0.AuxInt = int16ToAuxInt(c - d)
21825 v1 := b.NewValue0(v.Pos, OpSub16, x.Type)
21826 v2 := b.NewValue0(v.Pos, OpConst16, x.Type)
21827 v2.AuxInt = int16ToAuxInt(d)
21828 v1.AddArg2(x, v2)
21829 v.AddArg2(v0, v1)
21830 return true
21831 }
21832 break
21833 }
21834
21835
21836
21837 for {
21838 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
21839 if v_0.Op != OpLess8 {
21840 continue
21841 }
21842 x := v_0.Args[1]
21843 v_0_0 := v_0.Args[0]
21844 if v_0_0.Op != OpConst8 {
21845 continue
21846 }
21847 c := auxIntToInt8(v_0_0.AuxInt)
21848 if v_1.Op != OpLess8 {
21849 continue
21850 }
21851 _ = v_1.Args[1]
21852 if x != v_1.Args[0] {
21853 continue
21854 }
21855 v_1_1 := v_1.Args[1]
21856 if v_1_1.Op != OpConst8 {
21857 continue
21858 }
21859 d := auxIntToInt8(v_1_1.AuxInt)
21860 if !(c >= d) {
21861 continue
21862 }
21863 v.reset(OpLess8U)
21864 v0 := b.NewValue0(v.Pos, OpConst8, x.Type)
21865 v0.AuxInt = int8ToAuxInt(c - d)
21866 v1 := b.NewValue0(v.Pos, OpSub8, x.Type)
21867 v2 := b.NewValue0(v.Pos, OpConst8, x.Type)
21868 v2.AuxInt = int8ToAuxInt(d)
21869 v1.AddArg2(x, v2)
21870 v.AddArg2(v0, v1)
21871 return true
21872 }
21873 break
21874 }
21875
21876
21877
21878 for {
21879 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
21880 if v_0.Op != OpLeq8 {
21881 continue
21882 }
21883 x := v_0.Args[1]
21884 v_0_0 := v_0.Args[0]
21885 if v_0_0.Op != OpConst8 {
21886 continue
21887 }
21888 c := auxIntToInt8(v_0_0.AuxInt)
21889 if v_1.Op != OpLess8 {
21890 continue
21891 }
21892 _ = v_1.Args[1]
21893 if x != v_1.Args[0] {
21894 continue
21895 }
21896 v_1_1 := v_1.Args[1]
21897 if v_1_1.Op != OpConst8 {
21898 continue
21899 }
21900 d := auxIntToInt8(v_1_1.AuxInt)
21901 if !(c >= d) {
21902 continue
21903 }
21904 v.reset(OpLeq8U)
21905 v0 := b.NewValue0(v.Pos, OpConst8, x.Type)
21906 v0.AuxInt = int8ToAuxInt(c - d)
21907 v1 := b.NewValue0(v.Pos, OpSub8, x.Type)
21908 v2 := b.NewValue0(v.Pos, OpConst8, x.Type)
21909 v2.AuxInt = int8ToAuxInt(d)
21910 v1.AddArg2(x, v2)
21911 v.AddArg2(v0, v1)
21912 return true
21913 }
21914 break
21915 }
21916
21917
21918
21919 for {
21920 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
21921 if v_0.Op != OpLess64 {
21922 continue
21923 }
21924 x := v_0.Args[1]
21925 v_0_0 := v_0.Args[0]
21926 if v_0_0.Op != OpConst64 {
21927 continue
21928 }
21929 c := auxIntToInt64(v_0_0.AuxInt)
21930 if v_1.Op != OpLeq64 {
21931 continue
21932 }
21933 _ = v_1.Args[1]
21934 if x != v_1.Args[0] {
21935 continue
21936 }
21937 v_1_1 := v_1.Args[1]
21938 if v_1_1.Op != OpConst64 {
21939 continue
21940 }
21941 d := auxIntToInt64(v_1_1.AuxInt)
21942 if !(c >= d+1 && d+1 > d) {
21943 continue
21944 }
21945 v.reset(OpLess64U)
21946 v0 := b.NewValue0(v.Pos, OpConst64, x.Type)
21947 v0.AuxInt = int64ToAuxInt(c - d - 1)
21948 v1 := b.NewValue0(v.Pos, OpSub64, x.Type)
21949 v2 := b.NewValue0(v.Pos, OpConst64, x.Type)
21950 v2.AuxInt = int64ToAuxInt(d + 1)
21951 v1.AddArg2(x, v2)
21952 v.AddArg2(v0, v1)
21953 return true
21954 }
21955 break
21956 }
21957
21958
21959
21960 for {
21961 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
21962 if v_0.Op != OpLeq64 {
21963 continue
21964 }
21965 x := v_0.Args[1]
21966 v_0_0 := v_0.Args[0]
21967 if v_0_0.Op != OpConst64 {
21968 continue
21969 }
21970 c := auxIntToInt64(v_0_0.AuxInt)
21971 if v_1.Op != OpLeq64 {
21972 continue
21973 }
21974 _ = v_1.Args[1]
21975 if x != v_1.Args[0] {
21976 continue
21977 }
21978 v_1_1 := v_1.Args[1]
21979 if v_1_1.Op != OpConst64 {
21980 continue
21981 }
21982 d := auxIntToInt64(v_1_1.AuxInt)
21983 if !(c >= d+1 && d+1 > d) {
21984 continue
21985 }
21986 v.reset(OpLeq64U)
21987 v0 := b.NewValue0(v.Pos, OpConst64, x.Type)
21988 v0.AuxInt = int64ToAuxInt(c - d - 1)
21989 v1 := b.NewValue0(v.Pos, OpSub64, x.Type)
21990 v2 := b.NewValue0(v.Pos, OpConst64, x.Type)
21991 v2.AuxInt = int64ToAuxInt(d + 1)
21992 v1.AddArg2(x, v2)
21993 v.AddArg2(v0, v1)
21994 return true
21995 }
21996 break
21997 }
21998
21999
22000
22001 for {
22002 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22003 if v_0.Op != OpLess32 {
22004 continue
22005 }
22006 x := v_0.Args[1]
22007 v_0_0 := v_0.Args[0]
22008 if v_0_0.Op != OpConst32 {
22009 continue
22010 }
22011 c := auxIntToInt32(v_0_0.AuxInt)
22012 if v_1.Op != OpLeq32 {
22013 continue
22014 }
22015 _ = v_1.Args[1]
22016 if x != v_1.Args[0] {
22017 continue
22018 }
22019 v_1_1 := v_1.Args[1]
22020 if v_1_1.Op != OpConst32 {
22021 continue
22022 }
22023 d := auxIntToInt32(v_1_1.AuxInt)
22024 if !(c >= d+1 && d+1 > d) {
22025 continue
22026 }
22027 v.reset(OpLess32U)
22028 v0 := b.NewValue0(v.Pos, OpConst32, x.Type)
22029 v0.AuxInt = int32ToAuxInt(c - d - 1)
22030 v1 := b.NewValue0(v.Pos, OpSub32, x.Type)
22031 v2 := b.NewValue0(v.Pos, OpConst32, x.Type)
22032 v2.AuxInt = int32ToAuxInt(d + 1)
22033 v1.AddArg2(x, v2)
22034 v.AddArg2(v0, v1)
22035 return true
22036 }
22037 break
22038 }
22039
22040
22041
22042 for {
22043 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22044 if v_0.Op != OpLeq32 {
22045 continue
22046 }
22047 x := v_0.Args[1]
22048 v_0_0 := v_0.Args[0]
22049 if v_0_0.Op != OpConst32 {
22050 continue
22051 }
22052 c := auxIntToInt32(v_0_0.AuxInt)
22053 if v_1.Op != OpLeq32 {
22054 continue
22055 }
22056 _ = v_1.Args[1]
22057 if x != v_1.Args[0] {
22058 continue
22059 }
22060 v_1_1 := v_1.Args[1]
22061 if v_1_1.Op != OpConst32 {
22062 continue
22063 }
22064 d := auxIntToInt32(v_1_1.AuxInt)
22065 if !(c >= d+1 && d+1 > d) {
22066 continue
22067 }
22068 v.reset(OpLeq32U)
22069 v0 := b.NewValue0(v.Pos, OpConst32, x.Type)
22070 v0.AuxInt = int32ToAuxInt(c - d - 1)
22071 v1 := b.NewValue0(v.Pos, OpSub32, x.Type)
22072 v2 := b.NewValue0(v.Pos, OpConst32, x.Type)
22073 v2.AuxInt = int32ToAuxInt(d + 1)
22074 v1.AddArg2(x, v2)
22075 v.AddArg2(v0, v1)
22076 return true
22077 }
22078 break
22079 }
22080
22081
22082
22083 for {
22084 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22085 if v_0.Op != OpLess16 {
22086 continue
22087 }
22088 x := v_0.Args[1]
22089 v_0_0 := v_0.Args[0]
22090 if v_0_0.Op != OpConst16 {
22091 continue
22092 }
22093 c := auxIntToInt16(v_0_0.AuxInt)
22094 if v_1.Op != OpLeq16 {
22095 continue
22096 }
22097 _ = v_1.Args[1]
22098 if x != v_1.Args[0] {
22099 continue
22100 }
22101 v_1_1 := v_1.Args[1]
22102 if v_1_1.Op != OpConst16 {
22103 continue
22104 }
22105 d := auxIntToInt16(v_1_1.AuxInt)
22106 if !(c >= d+1 && d+1 > d) {
22107 continue
22108 }
22109 v.reset(OpLess16U)
22110 v0 := b.NewValue0(v.Pos, OpConst16, x.Type)
22111 v0.AuxInt = int16ToAuxInt(c - d - 1)
22112 v1 := b.NewValue0(v.Pos, OpSub16, x.Type)
22113 v2 := b.NewValue0(v.Pos, OpConst16, x.Type)
22114 v2.AuxInt = int16ToAuxInt(d + 1)
22115 v1.AddArg2(x, v2)
22116 v.AddArg2(v0, v1)
22117 return true
22118 }
22119 break
22120 }
22121
22122
22123
22124 for {
22125 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22126 if v_0.Op != OpLeq16 {
22127 continue
22128 }
22129 x := v_0.Args[1]
22130 v_0_0 := v_0.Args[0]
22131 if v_0_0.Op != OpConst16 {
22132 continue
22133 }
22134 c := auxIntToInt16(v_0_0.AuxInt)
22135 if v_1.Op != OpLeq16 {
22136 continue
22137 }
22138 _ = v_1.Args[1]
22139 if x != v_1.Args[0] {
22140 continue
22141 }
22142 v_1_1 := v_1.Args[1]
22143 if v_1_1.Op != OpConst16 {
22144 continue
22145 }
22146 d := auxIntToInt16(v_1_1.AuxInt)
22147 if !(c >= d+1 && d+1 > d) {
22148 continue
22149 }
22150 v.reset(OpLeq16U)
22151 v0 := b.NewValue0(v.Pos, OpConst16, x.Type)
22152 v0.AuxInt = int16ToAuxInt(c - d - 1)
22153 v1 := b.NewValue0(v.Pos, OpSub16, x.Type)
22154 v2 := b.NewValue0(v.Pos, OpConst16, x.Type)
22155 v2.AuxInt = int16ToAuxInt(d + 1)
22156 v1.AddArg2(x, v2)
22157 v.AddArg2(v0, v1)
22158 return true
22159 }
22160 break
22161 }
22162
22163
22164
22165 for {
22166 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22167 if v_0.Op != OpLess8 {
22168 continue
22169 }
22170 x := v_0.Args[1]
22171 v_0_0 := v_0.Args[0]
22172 if v_0_0.Op != OpConst8 {
22173 continue
22174 }
22175 c := auxIntToInt8(v_0_0.AuxInt)
22176 if v_1.Op != OpLeq8 {
22177 continue
22178 }
22179 _ = v_1.Args[1]
22180 if x != v_1.Args[0] {
22181 continue
22182 }
22183 v_1_1 := v_1.Args[1]
22184 if v_1_1.Op != OpConst8 {
22185 continue
22186 }
22187 d := auxIntToInt8(v_1_1.AuxInt)
22188 if !(c >= d+1 && d+1 > d) {
22189 continue
22190 }
22191 v.reset(OpLess8U)
22192 v0 := b.NewValue0(v.Pos, OpConst8, x.Type)
22193 v0.AuxInt = int8ToAuxInt(c - d - 1)
22194 v1 := b.NewValue0(v.Pos, OpSub8, x.Type)
22195 v2 := b.NewValue0(v.Pos, OpConst8, x.Type)
22196 v2.AuxInt = int8ToAuxInt(d + 1)
22197 v1.AddArg2(x, v2)
22198 v.AddArg2(v0, v1)
22199 return true
22200 }
22201 break
22202 }
22203
22204
22205
22206 for {
22207 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22208 if v_0.Op != OpLeq8 {
22209 continue
22210 }
22211 x := v_0.Args[1]
22212 v_0_0 := v_0.Args[0]
22213 if v_0_0.Op != OpConst8 {
22214 continue
22215 }
22216 c := auxIntToInt8(v_0_0.AuxInt)
22217 if v_1.Op != OpLeq8 {
22218 continue
22219 }
22220 _ = v_1.Args[1]
22221 if x != v_1.Args[0] {
22222 continue
22223 }
22224 v_1_1 := v_1.Args[1]
22225 if v_1_1.Op != OpConst8 {
22226 continue
22227 }
22228 d := auxIntToInt8(v_1_1.AuxInt)
22229 if !(c >= d+1 && d+1 > d) {
22230 continue
22231 }
22232 v.reset(OpLeq8U)
22233 v0 := b.NewValue0(v.Pos, OpConst8, x.Type)
22234 v0.AuxInt = int8ToAuxInt(c - d - 1)
22235 v1 := b.NewValue0(v.Pos, OpSub8, x.Type)
22236 v2 := b.NewValue0(v.Pos, OpConst8, x.Type)
22237 v2.AuxInt = int8ToAuxInt(d + 1)
22238 v1.AddArg2(x, v2)
22239 v.AddArg2(v0, v1)
22240 return true
22241 }
22242 break
22243 }
22244
22245
22246
22247 for {
22248 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22249 if v_0.Op != OpLess64U {
22250 continue
22251 }
22252 x := v_0.Args[1]
22253 v_0_0 := v_0.Args[0]
22254 if v_0_0.Op != OpConst64 {
22255 continue
22256 }
22257 c := auxIntToInt64(v_0_0.AuxInt)
22258 if v_1.Op != OpLess64U {
22259 continue
22260 }
22261 _ = v_1.Args[1]
22262 if x != v_1.Args[0] {
22263 continue
22264 }
22265 v_1_1 := v_1.Args[1]
22266 if v_1_1.Op != OpConst64 {
22267 continue
22268 }
22269 d := auxIntToInt64(v_1_1.AuxInt)
22270 if !(uint64(c) >= uint64(d)) {
22271 continue
22272 }
22273 v.reset(OpLess64U)
22274 v0 := b.NewValue0(v.Pos, OpConst64, x.Type)
22275 v0.AuxInt = int64ToAuxInt(c - d)
22276 v1 := b.NewValue0(v.Pos, OpSub64, x.Type)
22277 v2 := b.NewValue0(v.Pos, OpConst64, x.Type)
22278 v2.AuxInt = int64ToAuxInt(d)
22279 v1.AddArg2(x, v2)
22280 v.AddArg2(v0, v1)
22281 return true
22282 }
22283 break
22284 }
22285
22286
22287
22288 for {
22289 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22290 if v_0.Op != OpLeq64U {
22291 continue
22292 }
22293 x := v_0.Args[1]
22294 v_0_0 := v_0.Args[0]
22295 if v_0_0.Op != OpConst64 {
22296 continue
22297 }
22298 c := auxIntToInt64(v_0_0.AuxInt)
22299 if v_1.Op != OpLess64U {
22300 continue
22301 }
22302 _ = v_1.Args[1]
22303 if x != v_1.Args[0] {
22304 continue
22305 }
22306 v_1_1 := v_1.Args[1]
22307 if v_1_1.Op != OpConst64 {
22308 continue
22309 }
22310 d := auxIntToInt64(v_1_1.AuxInt)
22311 if !(uint64(c) >= uint64(d)) {
22312 continue
22313 }
22314 v.reset(OpLeq64U)
22315 v0 := b.NewValue0(v.Pos, OpConst64, x.Type)
22316 v0.AuxInt = int64ToAuxInt(c - d)
22317 v1 := b.NewValue0(v.Pos, OpSub64, x.Type)
22318 v2 := b.NewValue0(v.Pos, OpConst64, x.Type)
22319 v2.AuxInt = int64ToAuxInt(d)
22320 v1.AddArg2(x, v2)
22321 v.AddArg2(v0, v1)
22322 return true
22323 }
22324 break
22325 }
22326
22327
22328
22329 for {
22330 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22331 if v_0.Op != OpLess32U {
22332 continue
22333 }
22334 x := v_0.Args[1]
22335 v_0_0 := v_0.Args[0]
22336 if v_0_0.Op != OpConst32 {
22337 continue
22338 }
22339 c := auxIntToInt32(v_0_0.AuxInt)
22340 if v_1.Op != OpLess32U {
22341 continue
22342 }
22343 _ = v_1.Args[1]
22344 if x != v_1.Args[0] {
22345 continue
22346 }
22347 v_1_1 := v_1.Args[1]
22348 if v_1_1.Op != OpConst32 {
22349 continue
22350 }
22351 d := auxIntToInt32(v_1_1.AuxInt)
22352 if !(uint32(c) >= uint32(d)) {
22353 continue
22354 }
22355 v.reset(OpLess32U)
22356 v0 := b.NewValue0(v.Pos, OpConst32, x.Type)
22357 v0.AuxInt = int32ToAuxInt(c - d)
22358 v1 := b.NewValue0(v.Pos, OpSub32, x.Type)
22359 v2 := b.NewValue0(v.Pos, OpConst32, x.Type)
22360 v2.AuxInt = int32ToAuxInt(d)
22361 v1.AddArg2(x, v2)
22362 v.AddArg2(v0, v1)
22363 return true
22364 }
22365 break
22366 }
22367
22368
22369
22370 for {
22371 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22372 if v_0.Op != OpLeq32U {
22373 continue
22374 }
22375 x := v_0.Args[1]
22376 v_0_0 := v_0.Args[0]
22377 if v_0_0.Op != OpConst32 {
22378 continue
22379 }
22380 c := auxIntToInt32(v_0_0.AuxInt)
22381 if v_1.Op != OpLess32U {
22382 continue
22383 }
22384 _ = v_1.Args[1]
22385 if x != v_1.Args[0] {
22386 continue
22387 }
22388 v_1_1 := v_1.Args[1]
22389 if v_1_1.Op != OpConst32 {
22390 continue
22391 }
22392 d := auxIntToInt32(v_1_1.AuxInt)
22393 if !(uint32(c) >= uint32(d)) {
22394 continue
22395 }
22396 v.reset(OpLeq32U)
22397 v0 := b.NewValue0(v.Pos, OpConst32, x.Type)
22398 v0.AuxInt = int32ToAuxInt(c - d)
22399 v1 := b.NewValue0(v.Pos, OpSub32, x.Type)
22400 v2 := b.NewValue0(v.Pos, OpConst32, x.Type)
22401 v2.AuxInt = int32ToAuxInt(d)
22402 v1.AddArg2(x, v2)
22403 v.AddArg2(v0, v1)
22404 return true
22405 }
22406 break
22407 }
22408
22409
22410
22411 for {
22412 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22413 if v_0.Op != OpLess16U {
22414 continue
22415 }
22416 x := v_0.Args[1]
22417 v_0_0 := v_0.Args[0]
22418 if v_0_0.Op != OpConst16 {
22419 continue
22420 }
22421 c := auxIntToInt16(v_0_0.AuxInt)
22422 if v_1.Op != OpLess16U {
22423 continue
22424 }
22425 _ = v_1.Args[1]
22426 if x != v_1.Args[0] {
22427 continue
22428 }
22429 v_1_1 := v_1.Args[1]
22430 if v_1_1.Op != OpConst16 {
22431 continue
22432 }
22433 d := auxIntToInt16(v_1_1.AuxInt)
22434 if !(uint16(c) >= uint16(d)) {
22435 continue
22436 }
22437 v.reset(OpLess16U)
22438 v0 := b.NewValue0(v.Pos, OpConst16, x.Type)
22439 v0.AuxInt = int16ToAuxInt(c - d)
22440 v1 := b.NewValue0(v.Pos, OpSub16, x.Type)
22441 v2 := b.NewValue0(v.Pos, OpConst16, x.Type)
22442 v2.AuxInt = int16ToAuxInt(d)
22443 v1.AddArg2(x, v2)
22444 v.AddArg2(v0, v1)
22445 return true
22446 }
22447 break
22448 }
22449
22450
22451
22452 for {
22453 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22454 if v_0.Op != OpLeq16U {
22455 continue
22456 }
22457 x := v_0.Args[1]
22458 v_0_0 := v_0.Args[0]
22459 if v_0_0.Op != OpConst16 {
22460 continue
22461 }
22462 c := auxIntToInt16(v_0_0.AuxInt)
22463 if v_1.Op != OpLess16U {
22464 continue
22465 }
22466 _ = v_1.Args[1]
22467 if x != v_1.Args[0] {
22468 continue
22469 }
22470 v_1_1 := v_1.Args[1]
22471 if v_1_1.Op != OpConst16 {
22472 continue
22473 }
22474 d := auxIntToInt16(v_1_1.AuxInt)
22475 if !(uint16(c) >= uint16(d)) {
22476 continue
22477 }
22478 v.reset(OpLeq16U)
22479 v0 := b.NewValue0(v.Pos, OpConst16, x.Type)
22480 v0.AuxInt = int16ToAuxInt(c - d)
22481 v1 := b.NewValue0(v.Pos, OpSub16, x.Type)
22482 v2 := b.NewValue0(v.Pos, OpConst16, x.Type)
22483 v2.AuxInt = int16ToAuxInt(d)
22484 v1.AddArg2(x, v2)
22485 v.AddArg2(v0, v1)
22486 return true
22487 }
22488 break
22489 }
22490
22491
22492
22493 for {
22494 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22495 if v_0.Op != OpLess8U {
22496 continue
22497 }
22498 x := v_0.Args[1]
22499 v_0_0 := v_0.Args[0]
22500 if v_0_0.Op != OpConst8 {
22501 continue
22502 }
22503 c := auxIntToInt8(v_0_0.AuxInt)
22504 if v_1.Op != OpLess8U {
22505 continue
22506 }
22507 _ = v_1.Args[1]
22508 if x != v_1.Args[0] {
22509 continue
22510 }
22511 v_1_1 := v_1.Args[1]
22512 if v_1_1.Op != OpConst8 {
22513 continue
22514 }
22515 d := auxIntToInt8(v_1_1.AuxInt)
22516 if !(uint8(c) >= uint8(d)) {
22517 continue
22518 }
22519 v.reset(OpLess8U)
22520 v0 := b.NewValue0(v.Pos, OpConst8, x.Type)
22521 v0.AuxInt = int8ToAuxInt(c - d)
22522 v1 := b.NewValue0(v.Pos, OpSub8, x.Type)
22523 v2 := b.NewValue0(v.Pos, OpConst8, x.Type)
22524 v2.AuxInt = int8ToAuxInt(d)
22525 v1.AddArg2(x, v2)
22526 v.AddArg2(v0, v1)
22527 return true
22528 }
22529 break
22530 }
22531
22532
22533
22534 for {
22535 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22536 if v_0.Op != OpLeq8U {
22537 continue
22538 }
22539 x := v_0.Args[1]
22540 v_0_0 := v_0.Args[0]
22541 if v_0_0.Op != OpConst8 {
22542 continue
22543 }
22544 c := auxIntToInt8(v_0_0.AuxInt)
22545 if v_1.Op != OpLess8U {
22546 continue
22547 }
22548 _ = v_1.Args[1]
22549 if x != v_1.Args[0] {
22550 continue
22551 }
22552 v_1_1 := v_1.Args[1]
22553 if v_1_1.Op != OpConst8 {
22554 continue
22555 }
22556 d := auxIntToInt8(v_1_1.AuxInt)
22557 if !(uint8(c) >= uint8(d)) {
22558 continue
22559 }
22560 v.reset(OpLeq8U)
22561 v0 := b.NewValue0(v.Pos, OpConst8, x.Type)
22562 v0.AuxInt = int8ToAuxInt(c - d)
22563 v1 := b.NewValue0(v.Pos, OpSub8, x.Type)
22564 v2 := b.NewValue0(v.Pos, OpConst8, x.Type)
22565 v2.AuxInt = int8ToAuxInt(d)
22566 v1.AddArg2(x, v2)
22567 v.AddArg2(v0, v1)
22568 return true
22569 }
22570 break
22571 }
22572
22573
22574
22575 for {
22576 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22577 if v_0.Op != OpLess64U {
22578 continue
22579 }
22580 x := v_0.Args[1]
22581 v_0_0 := v_0.Args[0]
22582 if v_0_0.Op != OpConst64 {
22583 continue
22584 }
22585 c := auxIntToInt64(v_0_0.AuxInt)
22586 if v_1.Op != OpLeq64U {
22587 continue
22588 }
22589 _ = v_1.Args[1]
22590 if x != v_1.Args[0] {
22591 continue
22592 }
22593 v_1_1 := v_1.Args[1]
22594 if v_1_1.Op != OpConst64 {
22595 continue
22596 }
22597 d := auxIntToInt64(v_1_1.AuxInt)
22598 if !(uint64(c) >= uint64(d+1) && uint64(d+1) > uint64(d)) {
22599 continue
22600 }
22601 v.reset(OpLess64U)
22602 v0 := b.NewValue0(v.Pos, OpConst64, x.Type)
22603 v0.AuxInt = int64ToAuxInt(c - d - 1)
22604 v1 := b.NewValue0(v.Pos, OpSub64, x.Type)
22605 v2 := b.NewValue0(v.Pos, OpConst64, x.Type)
22606 v2.AuxInt = int64ToAuxInt(d + 1)
22607 v1.AddArg2(x, v2)
22608 v.AddArg2(v0, v1)
22609 return true
22610 }
22611 break
22612 }
22613
22614
22615
22616 for {
22617 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22618 if v_0.Op != OpLeq64U {
22619 continue
22620 }
22621 x := v_0.Args[1]
22622 v_0_0 := v_0.Args[0]
22623 if v_0_0.Op != OpConst64 {
22624 continue
22625 }
22626 c := auxIntToInt64(v_0_0.AuxInt)
22627 if v_1.Op != OpLeq64U {
22628 continue
22629 }
22630 _ = v_1.Args[1]
22631 if x != v_1.Args[0] {
22632 continue
22633 }
22634 v_1_1 := v_1.Args[1]
22635 if v_1_1.Op != OpConst64 {
22636 continue
22637 }
22638 d := auxIntToInt64(v_1_1.AuxInt)
22639 if !(uint64(c) >= uint64(d+1) && uint64(d+1) > uint64(d)) {
22640 continue
22641 }
22642 v.reset(OpLeq64U)
22643 v0 := b.NewValue0(v.Pos, OpConst64, x.Type)
22644 v0.AuxInt = int64ToAuxInt(c - d - 1)
22645 v1 := b.NewValue0(v.Pos, OpSub64, x.Type)
22646 v2 := b.NewValue0(v.Pos, OpConst64, x.Type)
22647 v2.AuxInt = int64ToAuxInt(d + 1)
22648 v1.AddArg2(x, v2)
22649 v.AddArg2(v0, v1)
22650 return true
22651 }
22652 break
22653 }
22654
22655
22656
22657 for {
22658 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22659 if v_0.Op != OpLess32U {
22660 continue
22661 }
22662 x := v_0.Args[1]
22663 v_0_0 := v_0.Args[0]
22664 if v_0_0.Op != OpConst32 {
22665 continue
22666 }
22667 c := auxIntToInt32(v_0_0.AuxInt)
22668 if v_1.Op != OpLeq32U {
22669 continue
22670 }
22671 _ = v_1.Args[1]
22672 if x != v_1.Args[0] {
22673 continue
22674 }
22675 v_1_1 := v_1.Args[1]
22676 if v_1_1.Op != OpConst32 {
22677 continue
22678 }
22679 d := auxIntToInt32(v_1_1.AuxInt)
22680 if !(uint32(c) >= uint32(d+1) && uint32(d+1) > uint32(d)) {
22681 continue
22682 }
22683 v.reset(OpLess32U)
22684 v0 := b.NewValue0(v.Pos, OpConst32, x.Type)
22685 v0.AuxInt = int32ToAuxInt(c - d - 1)
22686 v1 := b.NewValue0(v.Pos, OpSub32, x.Type)
22687 v2 := b.NewValue0(v.Pos, OpConst32, x.Type)
22688 v2.AuxInt = int32ToAuxInt(d + 1)
22689 v1.AddArg2(x, v2)
22690 v.AddArg2(v0, v1)
22691 return true
22692 }
22693 break
22694 }
22695
22696
22697
22698 for {
22699 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22700 if v_0.Op != OpLeq32U {
22701 continue
22702 }
22703 x := v_0.Args[1]
22704 v_0_0 := v_0.Args[0]
22705 if v_0_0.Op != OpConst32 {
22706 continue
22707 }
22708 c := auxIntToInt32(v_0_0.AuxInt)
22709 if v_1.Op != OpLeq32U {
22710 continue
22711 }
22712 _ = v_1.Args[1]
22713 if x != v_1.Args[0] {
22714 continue
22715 }
22716 v_1_1 := v_1.Args[1]
22717 if v_1_1.Op != OpConst32 {
22718 continue
22719 }
22720 d := auxIntToInt32(v_1_1.AuxInt)
22721 if !(uint32(c) >= uint32(d+1) && uint32(d+1) > uint32(d)) {
22722 continue
22723 }
22724 v.reset(OpLeq32U)
22725 v0 := b.NewValue0(v.Pos, OpConst32, x.Type)
22726 v0.AuxInt = int32ToAuxInt(c - d - 1)
22727 v1 := b.NewValue0(v.Pos, OpSub32, x.Type)
22728 v2 := b.NewValue0(v.Pos, OpConst32, x.Type)
22729 v2.AuxInt = int32ToAuxInt(d + 1)
22730 v1.AddArg2(x, v2)
22731 v.AddArg2(v0, v1)
22732 return true
22733 }
22734 break
22735 }
22736
22737
22738
22739 for {
22740 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22741 if v_0.Op != OpLess16U {
22742 continue
22743 }
22744 x := v_0.Args[1]
22745 v_0_0 := v_0.Args[0]
22746 if v_0_0.Op != OpConst16 {
22747 continue
22748 }
22749 c := auxIntToInt16(v_0_0.AuxInt)
22750 if v_1.Op != OpLeq16U {
22751 continue
22752 }
22753 _ = v_1.Args[1]
22754 if x != v_1.Args[0] {
22755 continue
22756 }
22757 v_1_1 := v_1.Args[1]
22758 if v_1_1.Op != OpConst16 {
22759 continue
22760 }
22761 d := auxIntToInt16(v_1_1.AuxInt)
22762 if !(uint16(c) >= uint16(d+1) && uint16(d+1) > uint16(d)) {
22763 continue
22764 }
22765 v.reset(OpLess16U)
22766 v0 := b.NewValue0(v.Pos, OpConst16, x.Type)
22767 v0.AuxInt = int16ToAuxInt(c - d - 1)
22768 v1 := b.NewValue0(v.Pos, OpSub16, x.Type)
22769 v2 := b.NewValue0(v.Pos, OpConst16, x.Type)
22770 v2.AuxInt = int16ToAuxInt(d + 1)
22771 v1.AddArg2(x, v2)
22772 v.AddArg2(v0, v1)
22773 return true
22774 }
22775 break
22776 }
22777
22778
22779
22780 for {
22781 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22782 if v_0.Op != OpLeq16U {
22783 continue
22784 }
22785 x := v_0.Args[1]
22786 v_0_0 := v_0.Args[0]
22787 if v_0_0.Op != OpConst16 {
22788 continue
22789 }
22790 c := auxIntToInt16(v_0_0.AuxInt)
22791 if v_1.Op != OpLeq16U {
22792 continue
22793 }
22794 _ = v_1.Args[1]
22795 if x != v_1.Args[0] {
22796 continue
22797 }
22798 v_1_1 := v_1.Args[1]
22799 if v_1_1.Op != OpConst16 {
22800 continue
22801 }
22802 d := auxIntToInt16(v_1_1.AuxInt)
22803 if !(uint16(c) >= uint16(d+1) && uint16(d+1) > uint16(d)) {
22804 continue
22805 }
22806 v.reset(OpLeq16U)
22807 v0 := b.NewValue0(v.Pos, OpConst16, x.Type)
22808 v0.AuxInt = int16ToAuxInt(c - d - 1)
22809 v1 := b.NewValue0(v.Pos, OpSub16, x.Type)
22810 v2 := b.NewValue0(v.Pos, OpConst16, x.Type)
22811 v2.AuxInt = int16ToAuxInt(d + 1)
22812 v1.AddArg2(x, v2)
22813 v.AddArg2(v0, v1)
22814 return true
22815 }
22816 break
22817 }
22818
22819
22820
22821 for {
22822 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22823 if v_0.Op != OpLess8U {
22824 continue
22825 }
22826 x := v_0.Args[1]
22827 v_0_0 := v_0.Args[0]
22828 if v_0_0.Op != OpConst8 {
22829 continue
22830 }
22831 c := auxIntToInt8(v_0_0.AuxInt)
22832 if v_1.Op != OpLeq8U {
22833 continue
22834 }
22835 _ = v_1.Args[1]
22836 if x != v_1.Args[0] {
22837 continue
22838 }
22839 v_1_1 := v_1.Args[1]
22840 if v_1_1.Op != OpConst8 {
22841 continue
22842 }
22843 d := auxIntToInt8(v_1_1.AuxInt)
22844 if !(uint8(c) >= uint8(d+1) && uint8(d+1) > uint8(d)) {
22845 continue
22846 }
22847 v.reset(OpLess8U)
22848 v0 := b.NewValue0(v.Pos, OpConst8, x.Type)
22849 v0.AuxInt = int8ToAuxInt(c - d - 1)
22850 v1 := b.NewValue0(v.Pos, OpSub8, x.Type)
22851 v2 := b.NewValue0(v.Pos, OpConst8, x.Type)
22852 v2.AuxInt = int8ToAuxInt(d + 1)
22853 v1.AddArg2(x, v2)
22854 v.AddArg2(v0, v1)
22855 return true
22856 }
22857 break
22858 }
22859
22860
22861
22862 for {
22863 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22864 if v_0.Op != OpLeq8U {
22865 continue
22866 }
22867 x := v_0.Args[1]
22868 v_0_0 := v_0.Args[0]
22869 if v_0_0.Op != OpConst8 {
22870 continue
22871 }
22872 c := auxIntToInt8(v_0_0.AuxInt)
22873 if v_1.Op != OpLeq8U {
22874 continue
22875 }
22876 _ = v_1.Args[1]
22877 if x != v_1.Args[0] {
22878 continue
22879 }
22880 v_1_1 := v_1.Args[1]
22881 if v_1_1.Op != OpConst8 {
22882 continue
22883 }
22884 d := auxIntToInt8(v_1_1.AuxInt)
22885 if !(uint8(c) >= uint8(d+1) && uint8(d+1) > uint8(d)) {
22886 continue
22887 }
22888 v.reset(OpLeq8U)
22889 v0 := b.NewValue0(v.Pos, OpConst8, x.Type)
22890 v0.AuxInt = int8ToAuxInt(c - d - 1)
22891 v1 := b.NewValue0(v.Pos, OpSub8, x.Type)
22892 v2 := b.NewValue0(v.Pos, OpConst8, x.Type)
22893 v2.AuxInt = int8ToAuxInt(d + 1)
22894 v1.AddArg2(x, v2)
22895 v.AddArg2(v0, v1)
22896 return true
22897 }
22898 break
22899 }
22900 return false
22901 }
22902 func rewriteValuegeneric_OpPhi(v *Value) bool {
22903 b := v.Block
22904
22905
22906 for {
22907 if len(v.Args) != 2 {
22908 break
22909 }
22910 _ = v.Args[1]
22911 v_0 := v.Args[0]
22912 if v_0.Op != OpConst8 {
22913 break
22914 }
22915 c := auxIntToInt8(v_0.AuxInt)
22916 v_1 := v.Args[1]
22917 if v_1.Op != OpConst8 || auxIntToInt8(v_1.AuxInt) != c {
22918 break
22919 }
22920 v.reset(OpConst8)
22921 v.AuxInt = int8ToAuxInt(c)
22922 return true
22923 }
22924
22925
22926 for {
22927 if len(v.Args) != 2 {
22928 break
22929 }
22930 _ = v.Args[1]
22931 v_0 := v.Args[0]
22932 if v_0.Op != OpConst16 {
22933 break
22934 }
22935 c := auxIntToInt16(v_0.AuxInt)
22936 v_1 := v.Args[1]
22937 if v_1.Op != OpConst16 || auxIntToInt16(v_1.AuxInt) != c {
22938 break
22939 }
22940 v.reset(OpConst16)
22941 v.AuxInt = int16ToAuxInt(c)
22942 return true
22943 }
22944
22945
22946 for {
22947 if len(v.Args) != 2 {
22948 break
22949 }
22950 _ = v.Args[1]
22951 v_0 := v.Args[0]
22952 if v_0.Op != OpConst32 {
22953 break
22954 }
22955 c := auxIntToInt32(v_0.AuxInt)
22956 v_1 := v.Args[1]
22957 if v_1.Op != OpConst32 || auxIntToInt32(v_1.AuxInt) != c {
22958 break
22959 }
22960 v.reset(OpConst32)
22961 v.AuxInt = int32ToAuxInt(c)
22962 return true
22963 }
22964
22965
22966 for {
22967 if len(v.Args) != 2 {
22968 break
22969 }
22970 _ = v.Args[1]
22971 v_0 := v.Args[0]
22972 if v_0.Op != OpConst64 {
22973 break
22974 }
22975 c := auxIntToInt64(v_0.AuxInt)
22976 v_1 := v.Args[1]
22977 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != c {
22978 break
22979 }
22980 v.reset(OpConst64)
22981 v.AuxInt = int64ToAuxInt(c)
22982 return true
22983 }
22984
22985
22986
22987 for {
22988 if len(v.Args) != 2 {
22989 break
22990 }
22991 t := v.Type
22992 _ = v.Args[1]
22993 nx := v.Args[0]
22994 if nx.Op != OpNot {
22995 break
22996 }
22997 x := nx.Args[0]
22998 ny := v.Args[1]
22999 if ny.Op != OpNot {
23000 break
23001 }
23002 y := ny.Args[0]
23003 if !(nx.Uses == 1 && ny.Uses == 1) {
23004 break
23005 }
23006 v.reset(OpNot)
23007 v0 := b.NewValue0(v.Pos, OpPhi, t)
23008 v0.AddArg2(x, y)
23009 v.AddArg(v0)
23010 return true
23011 }
23012 return false
23013 }
23014 func rewriteValuegeneric_OpPtrIndex(v *Value) bool {
23015 v_1 := v.Args[1]
23016 v_0 := v.Args[0]
23017 b := v.Block
23018 config := b.Func.Config
23019 typ := &b.Func.Config.Types
23020
23021
23022
23023 for {
23024 t := v.Type
23025 ptr := v_0
23026 idx := v_1
23027 if !(config.PtrSize == 4 && is32Bit(t.Elem().Size())) {
23028 break
23029 }
23030 v.reset(OpAddPtr)
23031 v0 := b.NewValue0(v.Pos, OpMul32, typ.Int)
23032 v1 := b.NewValue0(v.Pos, OpConst32, typ.Int)
23033 v1.AuxInt = int32ToAuxInt(int32(t.Elem().Size()))
23034 v0.AddArg2(idx, v1)
23035 v.AddArg2(ptr, v0)
23036 return true
23037 }
23038
23039
23040
23041 for {
23042 t := v.Type
23043 ptr := v_0
23044 idx := v_1
23045 if !(config.PtrSize == 8) {
23046 break
23047 }
23048 v.reset(OpAddPtr)
23049 v0 := b.NewValue0(v.Pos, OpMul64, typ.Int)
23050 v1 := b.NewValue0(v.Pos, OpConst64, typ.Int)
23051 v1.AuxInt = int64ToAuxInt(t.Elem().Size())
23052 v0.AddArg2(idx, v1)
23053 v.AddArg2(ptr, v0)
23054 return true
23055 }
23056 return false
23057 }
23058 func rewriteValuegeneric_OpRotateLeft16(v *Value) bool {
23059 v_1 := v.Args[1]
23060 v_0 := v.Args[0]
23061 b := v.Block
23062 config := b.Func.Config
23063
23064
23065
23066 for {
23067 x := v_0
23068 if v_1.Op != OpConst16 {
23069 break
23070 }
23071 c := auxIntToInt16(v_1.AuxInt)
23072 if !(c%16 == 0) {
23073 break
23074 }
23075 v.copyOf(x)
23076 return true
23077 }
23078
23079
23080
23081 for {
23082 x := v_0
23083 if v_1.Op != OpAnd64 {
23084 break
23085 }
23086 _ = v_1.Args[1]
23087 v_1_0 := v_1.Args[0]
23088 v_1_1 := v_1.Args[1]
23089 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
23090 y := v_1_0
23091 if v_1_1.Op != OpConst64 {
23092 continue
23093 }
23094 c := auxIntToInt64(v_1_1.AuxInt)
23095 if !(c&15 == 15) {
23096 continue
23097 }
23098 v.reset(OpRotateLeft16)
23099 v.AddArg2(x, y)
23100 return true
23101 }
23102 break
23103 }
23104
23105
23106
23107 for {
23108 x := v_0
23109 if v_1.Op != OpAnd32 {
23110 break
23111 }
23112 _ = v_1.Args[1]
23113 v_1_0 := v_1.Args[0]
23114 v_1_1 := v_1.Args[1]
23115 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
23116 y := v_1_0
23117 if v_1_1.Op != OpConst32 {
23118 continue
23119 }
23120 c := auxIntToInt32(v_1_1.AuxInt)
23121 if !(c&15 == 15) {
23122 continue
23123 }
23124 v.reset(OpRotateLeft16)
23125 v.AddArg2(x, y)
23126 return true
23127 }
23128 break
23129 }
23130
23131
23132
23133 for {
23134 x := v_0
23135 if v_1.Op != OpAnd16 {
23136 break
23137 }
23138 _ = v_1.Args[1]
23139 v_1_0 := v_1.Args[0]
23140 v_1_1 := v_1.Args[1]
23141 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
23142 y := v_1_0
23143 if v_1_1.Op != OpConst16 {
23144 continue
23145 }
23146 c := auxIntToInt16(v_1_1.AuxInt)
23147 if !(c&15 == 15) {
23148 continue
23149 }
23150 v.reset(OpRotateLeft16)
23151 v.AddArg2(x, y)
23152 return true
23153 }
23154 break
23155 }
23156
23157
23158
23159 for {
23160 x := v_0
23161 if v_1.Op != OpAnd8 {
23162 break
23163 }
23164 _ = v_1.Args[1]
23165 v_1_0 := v_1.Args[0]
23166 v_1_1 := v_1.Args[1]
23167 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
23168 y := v_1_0
23169 if v_1_1.Op != OpConst8 {
23170 continue
23171 }
23172 c := auxIntToInt8(v_1_1.AuxInt)
23173 if !(c&15 == 15) {
23174 continue
23175 }
23176 v.reset(OpRotateLeft16)
23177 v.AddArg2(x, y)
23178 return true
23179 }
23180 break
23181 }
23182
23183
23184
23185 for {
23186 x := v_0
23187 if v_1.Op != OpNeg64 {
23188 break
23189 }
23190 v_1_0 := v_1.Args[0]
23191 if v_1_0.Op != OpAnd64 {
23192 break
23193 }
23194 _ = v_1_0.Args[1]
23195 v_1_0_0 := v_1_0.Args[0]
23196 v_1_0_1 := v_1_0.Args[1]
23197 for _i0 := 0; _i0 <= 1; _i0, v_1_0_0, v_1_0_1 = _i0+1, v_1_0_1, v_1_0_0 {
23198 y := v_1_0_0
23199 if v_1_0_1.Op != OpConst64 {
23200 continue
23201 }
23202 c := auxIntToInt64(v_1_0_1.AuxInt)
23203 if !(c&15 == 15) {
23204 continue
23205 }
23206 v.reset(OpRotateLeft16)
23207 v0 := b.NewValue0(v.Pos, OpNeg64, y.Type)
23208 v0.AddArg(y)
23209 v.AddArg2(x, v0)
23210 return true
23211 }
23212 break
23213 }
23214
23215
23216
23217 for {
23218 x := v_0
23219 if v_1.Op != OpNeg32 {
23220 break
23221 }
23222 v_1_0 := v_1.Args[0]
23223 if v_1_0.Op != OpAnd32 {
23224 break
23225 }
23226 _ = v_1_0.Args[1]
23227 v_1_0_0 := v_1_0.Args[0]
23228 v_1_0_1 := v_1_0.Args[1]
23229 for _i0 := 0; _i0 <= 1; _i0, v_1_0_0, v_1_0_1 = _i0+1, v_1_0_1, v_1_0_0 {
23230 y := v_1_0_0
23231 if v_1_0_1.Op != OpConst32 {
23232 continue
23233 }
23234 c := auxIntToInt32(v_1_0_1.AuxInt)
23235 if !(c&15 == 15) {
23236 continue
23237 }
23238 v.reset(OpRotateLeft16)
23239 v0 := b.NewValue0(v.Pos, OpNeg32, y.Type)
23240 v0.AddArg(y)
23241 v.AddArg2(x, v0)
23242 return true
23243 }
23244 break
23245 }
23246
23247
23248
23249 for {
23250 x := v_0
23251 if v_1.Op != OpNeg16 {
23252 break
23253 }
23254 v_1_0 := v_1.Args[0]
23255 if v_1_0.Op != OpAnd16 {
23256 break
23257 }
23258 _ = v_1_0.Args[1]
23259 v_1_0_0 := v_1_0.Args[0]
23260 v_1_0_1 := v_1_0.Args[1]
23261 for _i0 := 0; _i0 <= 1; _i0, v_1_0_0, v_1_0_1 = _i0+1, v_1_0_1, v_1_0_0 {
23262 y := v_1_0_0
23263 if v_1_0_1.Op != OpConst16 {
23264 continue
23265 }
23266 c := auxIntToInt16(v_1_0_1.AuxInt)
23267 if !(c&15 == 15) {
23268 continue
23269 }
23270 v.reset(OpRotateLeft16)
23271 v0 := b.NewValue0(v.Pos, OpNeg16, y.Type)
23272 v0.AddArg(y)
23273 v.AddArg2(x, v0)
23274 return true
23275 }
23276 break
23277 }
23278
23279
23280
23281 for {
23282 x := v_0
23283 if v_1.Op != OpNeg8 {
23284 break
23285 }
23286 v_1_0 := v_1.Args[0]
23287 if v_1_0.Op != OpAnd8 {
23288 break
23289 }
23290 _ = v_1_0.Args[1]
23291 v_1_0_0 := v_1_0.Args[0]
23292 v_1_0_1 := v_1_0.Args[1]
23293 for _i0 := 0; _i0 <= 1; _i0, v_1_0_0, v_1_0_1 = _i0+1, v_1_0_1, v_1_0_0 {
23294 y := v_1_0_0
23295 if v_1_0_1.Op != OpConst8 {
23296 continue
23297 }
23298 c := auxIntToInt8(v_1_0_1.AuxInt)
23299 if !(c&15 == 15) {
23300 continue
23301 }
23302 v.reset(OpRotateLeft16)
23303 v0 := b.NewValue0(v.Pos, OpNeg8, y.Type)
23304 v0.AddArg(y)
23305 v.AddArg2(x, v0)
23306 return true
23307 }
23308 break
23309 }
23310
23311
23312
23313 for {
23314 x := v_0
23315 if v_1.Op != OpAdd64 {
23316 break
23317 }
23318 _ = v_1.Args[1]
23319 v_1_0 := v_1.Args[0]
23320 v_1_1 := v_1.Args[1]
23321 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
23322 y := v_1_0
23323 if v_1_1.Op != OpConst64 {
23324 continue
23325 }
23326 c := auxIntToInt64(v_1_1.AuxInt)
23327 if !(c&15 == 0) {
23328 continue
23329 }
23330 v.reset(OpRotateLeft16)
23331 v.AddArg2(x, y)
23332 return true
23333 }
23334 break
23335 }
23336
23337
23338
23339 for {
23340 x := v_0
23341 if v_1.Op != OpAdd32 {
23342 break
23343 }
23344 _ = v_1.Args[1]
23345 v_1_0 := v_1.Args[0]
23346 v_1_1 := v_1.Args[1]
23347 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
23348 y := v_1_0
23349 if v_1_1.Op != OpConst32 {
23350 continue
23351 }
23352 c := auxIntToInt32(v_1_1.AuxInt)
23353 if !(c&15 == 0) {
23354 continue
23355 }
23356 v.reset(OpRotateLeft16)
23357 v.AddArg2(x, y)
23358 return true
23359 }
23360 break
23361 }
23362
23363
23364
23365 for {
23366 x := v_0
23367 if v_1.Op != OpAdd16 {
23368 break
23369 }
23370 _ = v_1.Args[1]
23371 v_1_0 := v_1.Args[0]
23372 v_1_1 := v_1.Args[1]
23373 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
23374 y := v_1_0
23375 if v_1_1.Op != OpConst16 {
23376 continue
23377 }
23378 c := auxIntToInt16(v_1_1.AuxInt)
23379 if !(c&15 == 0) {
23380 continue
23381 }
23382 v.reset(OpRotateLeft16)
23383 v.AddArg2(x, y)
23384 return true
23385 }
23386 break
23387 }
23388
23389
23390
23391 for {
23392 x := v_0
23393 if v_1.Op != OpAdd8 {
23394 break
23395 }
23396 _ = v_1.Args[1]
23397 v_1_0 := v_1.Args[0]
23398 v_1_1 := v_1.Args[1]
23399 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
23400 y := v_1_0
23401 if v_1_1.Op != OpConst8 {
23402 continue
23403 }
23404 c := auxIntToInt8(v_1_1.AuxInt)
23405 if !(c&15 == 0) {
23406 continue
23407 }
23408 v.reset(OpRotateLeft16)
23409 v.AddArg2(x, y)
23410 return true
23411 }
23412 break
23413 }
23414
23415
23416
23417 for {
23418 x := v_0
23419 if v_1.Op != OpSub64 {
23420 break
23421 }
23422 y := v_1.Args[1]
23423 v_1_0 := v_1.Args[0]
23424 if v_1_0.Op != OpConst64 {
23425 break
23426 }
23427 c := auxIntToInt64(v_1_0.AuxInt)
23428 if !(c&15 == 0) {
23429 break
23430 }
23431 v.reset(OpRotateLeft16)
23432 v0 := b.NewValue0(v.Pos, OpNeg64, y.Type)
23433 v0.AddArg(y)
23434 v.AddArg2(x, v0)
23435 return true
23436 }
23437
23438
23439
23440 for {
23441 x := v_0
23442 if v_1.Op != OpSub32 {
23443 break
23444 }
23445 y := v_1.Args[1]
23446 v_1_0 := v_1.Args[0]
23447 if v_1_0.Op != OpConst32 {
23448 break
23449 }
23450 c := auxIntToInt32(v_1_0.AuxInt)
23451 if !(c&15 == 0) {
23452 break
23453 }
23454 v.reset(OpRotateLeft16)
23455 v0 := b.NewValue0(v.Pos, OpNeg32, y.Type)
23456 v0.AddArg(y)
23457 v.AddArg2(x, v0)
23458 return true
23459 }
23460
23461
23462
23463 for {
23464 x := v_0
23465 if v_1.Op != OpSub16 {
23466 break
23467 }
23468 y := v_1.Args[1]
23469 v_1_0 := v_1.Args[0]
23470 if v_1_0.Op != OpConst16 {
23471 break
23472 }
23473 c := auxIntToInt16(v_1_0.AuxInt)
23474 if !(c&15 == 0) {
23475 break
23476 }
23477 v.reset(OpRotateLeft16)
23478 v0 := b.NewValue0(v.Pos, OpNeg16, y.Type)
23479 v0.AddArg(y)
23480 v.AddArg2(x, v0)
23481 return true
23482 }
23483
23484
23485
23486 for {
23487 x := v_0
23488 if v_1.Op != OpSub8 {
23489 break
23490 }
23491 y := v_1.Args[1]
23492 v_1_0 := v_1.Args[0]
23493 if v_1_0.Op != OpConst8 {
23494 break
23495 }
23496 c := auxIntToInt8(v_1_0.AuxInt)
23497 if !(c&15 == 0) {
23498 break
23499 }
23500 v.reset(OpRotateLeft16)
23501 v0 := b.NewValue0(v.Pos, OpNeg8, y.Type)
23502 v0.AddArg(y)
23503 v.AddArg2(x, v0)
23504 return true
23505 }
23506
23507
23508
23509 for {
23510 x := v_0
23511 if v_1.Op != OpConst64 {
23512 break
23513 }
23514 t := v_1.Type
23515 c := auxIntToInt64(v_1.AuxInt)
23516 if !(config.PtrSize == 4) {
23517 break
23518 }
23519 v.reset(OpRotateLeft16)
23520 v0 := b.NewValue0(v.Pos, OpConst32, t)
23521 v0.AuxInt = int32ToAuxInt(int32(c))
23522 v.AddArg2(x, v0)
23523 return true
23524 }
23525
23526
23527
23528 for {
23529 if v_0.Op != OpRotateLeft16 {
23530 break
23531 }
23532 c := v_0.Args[1]
23533 x := v_0.Args[0]
23534 d := v_1
23535 if !(c.Type.Size() == 8 && d.Type.Size() == 8) {
23536 break
23537 }
23538 v.reset(OpRotateLeft16)
23539 v0 := b.NewValue0(v.Pos, OpAdd64, c.Type)
23540 v0.AddArg2(c, d)
23541 v.AddArg2(x, v0)
23542 return true
23543 }
23544
23545
23546
23547 for {
23548 if v_0.Op != OpRotateLeft16 {
23549 break
23550 }
23551 c := v_0.Args[1]
23552 x := v_0.Args[0]
23553 d := v_1
23554 if !(c.Type.Size() == 4 && d.Type.Size() == 4) {
23555 break
23556 }
23557 v.reset(OpRotateLeft16)
23558 v0 := b.NewValue0(v.Pos, OpAdd32, c.Type)
23559 v0.AddArg2(c, d)
23560 v.AddArg2(x, v0)
23561 return true
23562 }
23563
23564
23565
23566 for {
23567 if v_0.Op != OpRotateLeft16 {
23568 break
23569 }
23570 c := v_0.Args[1]
23571 x := v_0.Args[0]
23572 d := v_1
23573 if !(c.Type.Size() == 2 && d.Type.Size() == 2) {
23574 break
23575 }
23576 v.reset(OpRotateLeft16)
23577 v0 := b.NewValue0(v.Pos, OpAdd16, c.Type)
23578 v0.AddArg2(c, d)
23579 v.AddArg2(x, v0)
23580 return true
23581 }
23582
23583
23584
23585 for {
23586 if v_0.Op != OpRotateLeft16 {
23587 break
23588 }
23589 c := v_0.Args[1]
23590 x := v_0.Args[0]
23591 d := v_1
23592 if !(c.Type.Size() == 1 && d.Type.Size() == 1) {
23593 break
23594 }
23595 v.reset(OpRotateLeft16)
23596 v0 := b.NewValue0(v.Pos, OpAdd8, c.Type)
23597 v0.AddArg2(c, d)
23598 v.AddArg2(x, v0)
23599 return true
23600 }
23601 return false
23602 }
23603 func rewriteValuegeneric_OpRotateLeft32(v *Value) bool {
23604 v_1 := v.Args[1]
23605 v_0 := v.Args[0]
23606 b := v.Block
23607 config := b.Func.Config
23608
23609
23610
23611 for {
23612 x := v_0
23613 if v_1.Op != OpConst32 {
23614 break
23615 }
23616 c := auxIntToInt32(v_1.AuxInt)
23617 if !(c%32 == 0) {
23618 break
23619 }
23620 v.copyOf(x)
23621 return true
23622 }
23623
23624
23625
23626 for {
23627 x := v_0
23628 if v_1.Op != OpAnd64 {
23629 break
23630 }
23631 _ = v_1.Args[1]
23632 v_1_0 := v_1.Args[0]
23633 v_1_1 := v_1.Args[1]
23634 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
23635 y := v_1_0
23636 if v_1_1.Op != OpConst64 {
23637 continue
23638 }
23639 c := auxIntToInt64(v_1_1.AuxInt)
23640 if !(c&31 == 31) {
23641 continue
23642 }
23643 v.reset(OpRotateLeft32)
23644 v.AddArg2(x, y)
23645 return true
23646 }
23647 break
23648 }
23649
23650
23651
23652 for {
23653 x := v_0
23654 if v_1.Op != OpAnd32 {
23655 break
23656 }
23657 _ = v_1.Args[1]
23658 v_1_0 := v_1.Args[0]
23659 v_1_1 := v_1.Args[1]
23660 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
23661 y := v_1_0
23662 if v_1_1.Op != OpConst32 {
23663 continue
23664 }
23665 c := auxIntToInt32(v_1_1.AuxInt)
23666 if !(c&31 == 31) {
23667 continue
23668 }
23669 v.reset(OpRotateLeft32)
23670 v.AddArg2(x, y)
23671 return true
23672 }
23673 break
23674 }
23675
23676
23677
23678 for {
23679 x := v_0
23680 if v_1.Op != OpAnd16 {
23681 break
23682 }
23683 _ = v_1.Args[1]
23684 v_1_0 := v_1.Args[0]
23685 v_1_1 := v_1.Args[1]
23686 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
23687 y := v_1_0
23688 if v_1_1.Op != OpConst16 {
23689 continue
23690 }
23691 c := auxIntToInt16(v_1_1.AuxInt)
23692 if !(c&31 == 31) {
23693 continue
23694 }
23695 v.reset(OpRotateLeft32)
23696 v.AddArg2(x, y)
23697 return true
23698 }
23699 break
23700 }
23701
23702
23703
23704 for {
23705 x := v_0
23706 if v_1.Op != OpAnd8 {
23707 break
23708 }
23709 _ = v_1.Args[1]
23710 v_1_0 := v_1.Args[0]
23711 v_1_1 := v_1.Args[1]
23712 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
23713 y := v_1_0
23714 if v_1_1.Op != OpConst8 {
23715 continue
23716 }
23717 c := auxIntToInt8(v_1_1.AuxInt)
23718 if !(c&31 == 31) {
23719 continue
23720 }
23721 v.reset(OpRotateLeft32)
23722 v.AddArg2(x, y)
23723 return true
23724 }
23725 break
23726 }
23727
23728
23729
23730 for {
23731 x := v_0
23732 if v_1.Op != OpNeg64 {
23733 break
23734 }
23735 v_1_0 := v_1.Args[0]
23736 if v_1_0.Op != OpAnd64 {
23737 break
23738 }
23739 _ = v_1_0.Args[1]
23740 v_1_0_0 := v_1_0.Args[0]
23741 v_1_0_1 := v_1_0.Args[1]
23742 for _i0 := 0; _i0 <= 1; _i0, v_1_0_0, v_1_0_1 = _i0+1, v_1_0_1, v_1_0_0 {
23743 y := v_1_0_0
23744 if v_1_0_1.Op != OpConst64 {
23745 continue
23746 }
23747 c := auxIntToInt64(v_1_0_1.AuxInt)
23748 if !(c&31 == 31) {
23749 continue
23750 }
23751 v.reset(OpRotateLeft32)
23752 v0 := b.NewValue0(v.Pos, OpNeg64, y.Type)
23753 v0.AddArg(y)
23754 v.AddArg2(x, v0)
23755 return true
23756 }
23757 break
23758 }
23759
23760
23761
23762 for {
23763 x := v_0
23764 if v_1.Op != OpNeg32 {
23765 break
23766 }
23767 v_1_0 := v_1.Args[0]
23768 if v_1_0.Op != OpAnd32 {
23769 break
23770 }
23771 _ = v_1_0.Args[1]
23772 v_1_0_0 := v_1_0.Args[0]
23773 v_1_0_1 := v_1_0.Args[1]
23774 for _i0 := 0; _i0 <= 1; _i0, v_1_0_0, v_1_0_1 = _i0+1, v_1_0_1, v_1_0_0 {
23775 y := v_1_0_0
23776 if v_1_0_1.Op != OpConst32 {
23777 continue
23778 }
23779 c := auxIntToInt32(v_1_0_1.AuxInt)
23780 if !(c&31 == 31) {
23781 continue
23782 }
23783 v.reset(OpRotateLeft32)
23784 v0 := b.NewValue0(v.Pos, OpNeg32, y.Type)
23785 v0.AddArg(y)
23786 v.AddArg2(x, v0)
23787 return true
23788 }
23789 break
23790 }
23791
23792
23793
23794 for {
23795 x := v_0
23796 if v_1.Op != OpNeg16 {
23797 break
23798 }
23799 v_1_0 := v_1.Args[0]
23800 if v_1_0.Op != OpAnd16 {
23801 break
23802 }
23803 _ = v_1_0.Args[1]
23804 v_1_0_0 := v_1_0.Args[0]
23805 v_1_0_1 := v_1_0.Args[1]
23806 for _i0 := 0; _i0 <= 1; _i0, v_1_0_0, v_1_0_1 = _i0+1, v_1_0_1, v_1_0_0 {
23807 y := v_1_0_0
23808 if v_1_0_1.Op != OpConst16 {
23809 continue
23810 }
23811 c := auxIntToInt16(v_1_0_1.AuxInt)
23812 if !(c&31 == 31) {
23813 continue
23814 }
23815 v.reset(OpRotateLeft32)
23816 v0 := b.NewValue0(v.Pos, OpNeg16, y.Type)
23817 v0.AddArg(y)
23818 v.AddArg2(x, v0)
23819 return true
23820 }
23821 break
23822 }
23823
23824
23825
23826 for {
23827 x := v_0
23828 if v_1.Op != OpNeg8 {
23829 break
23830 }
23831 v_1_0 := v_1.Args[0]
23832 if v_1_0.Op != OpAnd8 {
23833 break
23834 }
23835 _ = v_1_0.Args[1]
23836 v_1_0_0 := v_1_0.Args[0]
23837 v_1_0_1 := v_1_0.Args[1]
23838 for _i0 := 0; _i0 <= 1; _i0, v_1_0_0, v_1_0_1 = _i0+1, v_1_0_1, v_1_0_0 {
23839 y := v_1_0_0
23840 if v_1_0_1.Op != OpConst8 {
23841 continue
23842 }
23843 c := auxIntToInt8(v_1_0_1.AuxInt)
23844 if !(c&31 == 31) {
23845 continue
23846 }
23847 v.reset(OpRotateLeft32)
23848 v0 := b.NewValue0(v.Pos, OpNeg8, y.Type)
23849 v0.AddArg(y)
23850 v.AddArg2(x, v0)
23851 return true
23852 }
23853 break
23854 }
23855
23856
23857
23858 for {
23859 x := v_0
23860 if v_1.Op != OpAdd64 {
23861 break
23862 }
23863 _ = v_1.Args[1]
23864 v_1_0 := v_1.Args[0]
23865 v_1_1 := v_1.Args[1]
23866 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
23867 y := v_1_0
23868 if v_1_1.Op != OpConst64 {
23869 continue
23870 }
23871 c := auxIntToInt64(v_1_1.AuxInt)
23872 if !(c&31 == 0) {
23873 continue
23874 }
23875 v.reset(OpRotateLeft32)
23876 v.AddArg2(x, y)
23877 return true
23878 }
23879 break
23880 }
23881
23882
23883
23884 for {
23885 x := v_0
23886 if v_1.Op != OpAdd32 {
23887 break
23888 }
23889 _ = v_1.Args[1]
23890 v_1_0 := v_1.Args[0]
23891 v_1_1 := v_1.Args[1]
23892 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
23893 y := v_1_0
23894 if v_1_1.Op != OpConst32 {
23895 continue
23896 }
23897 c := auxIntToInt32(v_1_1.AuxInt)
23898 if !(c&31 == 0) {
23899 continue
23900 }
23901 v.reset(OpRotateLeft32)
23902 v.AddArg2(x, y)
23903 return true
23904 }
23905 break
23906 }
23907
23908
23909
23910 for {
23911 x := v_0
23912 if v_1.Op != OpAdd16 {
23913 break
23914 }
23915 _ = v_1.Args[1]
23916 v_1_0 := v_1.Args[0]
23917 v_1_1 := v_1.Args[1]
23918 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
23919 y := v_1_0
23920 if v_1_1.Op != OpConst16 {
23921 continue
23922 }
23923 c := auxIntToInt16(v_1_1.AuxInt)
23924 if !(c&31 == 0) {
23925 continue
23926 }
23927 v.reset(OpRotateLeft32)
23928 v.AddArg2(x, y)
23929 return true
23930 }
23931 break
23932 }
23933
23934
23935
23936 for {
23937 x := v_0
23938 if v_1.Op != OpAdd8 {
23939 break
23940 }
23941 _ = v_1.Args[1]
23942 v_1_0 := v_1.Args[0]
23943 v_1_1 := v_1.Args[1]
23944 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
23945 y := v_1_0
23946 if v_1_1.Op != OpConst8 {
23947 continue
23948 }
23949 c := auxIntToInt8(v_1_1.AuxInt)
23950 if !(c&31 == 0) {
23951 continue
23952 }
23953 v.reset(OpRotateLeft32)
23954 v.AddArg2(x, y)
23955 return true
23956 }
23957 break
23958 }
23959
23960
23961
23962 for {
23963 x := v_0
23964 if v_1.Op != OpSub64 {
23965 break
23966 }
23967 y := v_1.Args[1]
23968 v_1_0 := v_1.Args[0]
23969 if v_1_0.Op != OpConst64 {
23970 break
23971 }
23972 c := auxIntToInt64(v_1_0.AuxInt)
23973 if !(c&31 == 0) {
23974 break
23975 }
23976 v.reset(OpRotateLeft32)
23977 v0 := b.NewValue0(v.Pos, OpNeg64, y.Type)
23978 v0.AddArg(y)
23979 v.AddArg2(x, v0)
23980 return true
23981 }
23982
23983
23984
23985 for {
23986 x := v_0
23987 if v_1.Op != OpSub32 {
23988 break
23989 }
23990 y := v_1.Args[1]
23991 v_1_0 := v_1.Args[0]
23992 if v_1_0.Op != OpConst32 {
23993 break
23994 }
23995 c := auxIntToInt32(v_1_0.AuxInt)
23996 if !(c&31 == 0) {
23997 break
23998 }
23999 v.reset(OpRotateLeft32)
24000 v0 := b.NewValue0(v.Pos, OpNeg32, y.Type)
24001 v0.AddArg(y)
24002 v.AddArg2(x, v0)
24003 return true
24004 }
24005
24006
24007
24008 for {
24009 x := v_0
24010 if v_1.Op != OpSub16 {
24011 break
24012 }
24013 y := v_1.Args[1]
24014 v_1_0 := v_1.Args[0]
24015 if v_1_0.Op != OpConst16 {
24016 break
24017 }
24018 c := auxIntToInt16(v_1_0.AuxInt)
24019 if !(c&31 == 0) {
24020 break
24021 }
24022 v.reset(OpRotateLeft32)
24023 v0 := b.NewValue0(v.Pos, OpNeg16, y.Type)
24024 v0.AddArg(y)
24025 v.AddArg2(x, v0)
24026 return true
24027 }
24028
24029
24030
24031 for {
24032 x := v_0
24033 if v_1.Op != OpSub8 {
24034 break
24035 }
24036 y := v_1.Args[1]
24037 v_1_0 := v_1.Args[0]
24038 if v_1_0.Op != OpConst8 {
24039 break
24040 }
24041 c := auxIntToInt8(v_1_0.AuxInt)
24042 if !(c&31 == 0) {
24043 break
24044 }
24045 v.reset(OpRotateLeft32)
24046 v0 := b.NewValue0(v.Pos, OpNeg8, y.Type)
24047 v0.AddArg(y)
24048 v.AddArg2(x, v0)
24049 return true
24050 }
24051
24052
24053
24054 for {
24055 x := v_0
24056 if v_1.Op != OpConst64 {
24057 break
24058 }
24059 t := v_1.Type
24060 c := auxIntToInt64(v_1.AuxInt)
24061 if !(config.PtrSize == 4) {
24062 break
24063 }
24064 v.reset(OpRotateLeft32)
24065 v0 := b.NewValue0(v.Pos, OpConst32, t)
24066 v0.AuxInt = int32ToAuxInt(int32(c))
24067 v.AddArg2(x, v0)
24068 return true
24069 }
24070
24071
24072
24073 for {
24074 if v_0.Op != OpRotateLeft32 {
24075 break
24076 }
24077 c := v_0.Args[1]
24078 x := v_0.Args[0]
24079 d := v_1
24080 if !(c.Type.Size() == 8 && d.Type.Size() == 8) {
24081 break
24082 }
24083 v.reset(OpRotateLeft32)
24084 v0 := b.NewValue0(v.Pos, OpAdd64, c.Type)
24085 v0.AddArg2(c, d)
24086 v.AddArg2(x, v0)
24087 return true
24088 }
24089
24090
24091
24092 for {
24093 if v_0.Op != OpRotateLeft32 {
24094 break
24095 }
24096 c := v_0.Args[1]
24097 x := v_0.Args[0]
24098 d := v_1
24099 if !(c.Type.Size() == 4 && d.Type.Size() == 4) {
24100 break
24101 }
24102 v.reset(OpRotateLeft32)
24103 v0 := b.NewValue0(v.Pos, OpAdd32, c.Type)
24104 v0.AddArg2(c, d)
24105 v.AddArg2(x, v0)
24106 return true
24107 }
24108
24109
24110
24111 for {
24112 if v_0.Op != OpRotateLeft32 {
24113 break
24114 }
24115 c := v_0.Args[1]
24116 x := v_0.Args[0]
24117 d := v_1
24118 if !(c.Type.Size() == 2 && d.Type.Size() == 2) {
24119 break
24120 }
24121 v.reset(OpRotateLeft32)
24122 v0 := b.NewValue0(v.Pos, OpAdd16, c.Type)
24123 v0.AddArg2(c, d)
24124 v.AddArg2(x, v0)
24125 return true
24126 }
24127
24128
24129
24130 for {
24131 if v_0.Op != OpRotateLeft32 {
24132 break
24133 }
24134 c := v_0.Args[1]
24135 x := v_0.Args[0]
24136 d := v_1
24137 if !(c.Type.Size() == 1 && d.Type.Size() == 1) {
24138 break
24139 }
24140 v.reset(OpRotateLeft32)
24141 v0 := b.NewValue0(v.Pos, OpAdd8, c.Type)
24142 v0.AddArg2(c, d)
24143 v.AddArg2(x, v0)
24144 return true
24145 }
24146 return false
24147 }
24148 func rewriteValuegeneric_OpRotateLeft64(v *Value) bool {
24149 v_1 := v.Args[1]
24150 v_0 := v.Args[0]
24151 b := v.Block
24152 config := b.Func.Config
24153
24154
24155
24156 for {
24157 x := v_0
24158 if v_1.Op != OpConst64 {
24159 break
24160 }
24161 c := auxIntToInt64(v_1.AuxInt)
24162 if !(c%64 == 0) {
24163 break
24164 }
24165 v.copyOf(x)
24166 return true
24167 }
24168
24169
24170
24171 for {
24172 x := v_0
24173 if v_1.Op != OpAnd64 {
24174 break
24175 }
24176 _ = v_1.Args[1]
24177 v_1_0 := v_1.Args[0]
24178 v_1_1 := v_1.Args[1]
24179 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
24180 y := v_1_0
24181 if v_1_1.Op != OpConst64 {
24182 continue
24183 }
24184 c := auxIntToInt64(v_1_1.AuxInt)
24185 if !(c&63 == 63) {
24186 continue
24187 }
24188 v.reset(OpRotateLeft64)
24189 v.AddArg2(x, y)
24190 return true
24191 }
24192 break
24193 }
24194
24195
24196
24197 for {
24198 x := v_0
24199 if v_1.Op != OpAnd32 {
24200 break
24201 }
24202 _ = v_1.Args[1]
24203 v_1_0 := v_1.Args[0]
24204 v_1_1 := v_1.Args[1]
24205 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
24206 y := v_1_0
24207 if v_1_1.Op != OpConst32 {
24208 continue
24209 }
24210 c := auxIntToInt32(v_1_1.AuxInt)
24211 if !(c&63 == 63) {
24212 continue
24213 }
24214 v.reset(OpRotateLeft64)
24215 v.AddArg2(x, y)
24216 return true
24217 }
24218 break
24219 }
24220
24221
24222
24223 for {
24224 x := v_0
24225 if v_1.Op != OpAnd16 {
24226 break
24227 }
24228 _ = v_1.Args[1]
24229 v_1_0 := v_1.Args[0]
24230 v_1_1 := v_1.Args[1]
24231 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
24232 y := v_1_0
24233 if v_1_1.Op != OpConst16 {
24234 continue
24235 }
24236 c := auxIntToInt16(v_1_1.AuxInt)
24237 if !(c&63 == 63) {
24238 continue
24239 }
24240 v.reset(OpRotateLeft64)
24241 v.AddArg2(x, y)
24242 return true
24243 }
24244 break
24245 }
24246
24247
24248
24249 for {
24250 x := v_0
24251 if v_1.Op != OpAnd8 {
24252 break
24253 }
24254 _ = v_1.Args[1]
24255 v_1_0 := v_1.Args[0]
24256 v_1_1 := v_1.Args[1]
24257 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
24258 y := v_1_0
24259 if v_1_1.Op != OpConst8 {
24260 continue
24261 }
24262 c := auxIntToInt8(v_1_1.AuxInt)
24263 if !(c&63 == 63) {
24264 continue
24265 }
24266 v.reset(OpRotateLeft64)
24267 v.AddArg2(x, y)
24268 return true
24269 }
24270 break
24271 }
24272
24273
24274
24275 for {
24276 x := v_0
24277 if v_1.Op != OpNeg64 {
24278 break
24279 }
24280 v_1_0 := v_1.Args[0]
24281 if v_1_0.Op != OpAnd64 {
24282 break
24283 }
24284 _ = v_1_0.Args[1]
24285 v_1_0_0 := v_1_0.Args[0]
24286 v_1_0_1 := v_1_0.Args[1]
24287 for _i0 := 0; _i0 <= 1; _i0, v_1_0_0, v_1_0_1 = _i0+1, v_1_0_1, v_1_0_0 {
24288 y := v_1_0_0
24289 if v_1_0_1.Op != OpConst64 {
24290 continue
24291 }
24292 c := auxIntToInt64(v_1_0_1.AuxInt)
24293 if !(c&63 == 63) {
24294 continue
24295 }
24296 v.reset(OpRotateLeft64)
24297 v0 := b.NewValue0(v.Pos, OpNeg64, y.Type)
24298 v0.AddArg(y)
24299 v.AddArg2(x, v0)
24300 return true
24301 }
24302 break
24303 }
24304
24305
24306
24307 for {
24308 x := v_0
24309 if v_1.Op != OpNeg32 {
24310 break
24311 }
24312 v_1_0 := v_1.Args[0]
24313 if v_1_0.Op != OpAnd32 {
24314 break
24315 }
24316 _ = v_1_0.Args[1]
24317 v_1_0_0 := v_1_0.Args[0]
24318 v_1_0_1 := v_1_0.Args[1]
24319 for _i0 := 0; _i0 <= 1; _i0, v_1_0_0, v_1_0_1 = _i0+1, v_1_0_1, v_1_0_0 {
24320 y := v_1_0_0
24321 if v_1_0_1.Op != OpConst32 {
24322 continue
24323 }
24324 c := auxIntToInt32(v_1_0_1.AuxInt)
24325 if !(c&63 == 63) {
24326 continue
24327 }
24328 v.reset(OpRotateLeft64)
24329 v0 := b.NewValue0(v.Pos, OpNeg32, y.Type)
24330 v0.AddArg(y)
24331 v.AddArg2(x, v0)
24332 return true
24333 }
24334 break
24335 }
24336
24337
24338
24339 for {
24340 x := v_0
24341 if v_1.Op != OpNeg16 {
24342 break
24343 }
24344 v_1_0 := v_1.Args[0]
24345 if v_1_0.Op != OpAnd16 {
24346 break
24347 }
24348 _ = v_1_0.Args[1]
24349 v_1_0_0 := v_1_0.Args[0]
24350 v_1_0_1 := v_1_0.Args[1]
24351 for _i0 := 0; _i0 <= 1; _i0, v_1_0_0, v_1_0_1 = _i0+1, v_1_0_1, v_1_0_0 {
24352 y := v_1_0_0
24353 if v_1_0_1.Op != OpConst16 {
24354 continue
24355 }
24356 c := auxIntToInt16(v_1_0_1.AuxInt)
24357 if !(c&63 == 63) {
24358 continue
24359 }
24360 v.reset(OpRotateLeft64)
24361 v0 := b.NewValue0(v.Pos, OpNeg16, y.Type)
24362 v0.AddArg(y)
24363 v.AddArg2(x, v0)
24364 return true
24365 }
24366 break
24367 }
24368
24369
24370
24371 for {
24372 x := v_0
24373 if v_1.Op != OpNeg8 {
24374 break
24375 }
24376 v_1_0 := v_1.Args[0]
24377 if v_1_0.Op != OpAnd8 {
24378 break
24379 }
24380 _ = v_1_0.Args[1]
24381 v_1_0_0 := v_1_0.Args[0]
24382 v_1_0_1 := v_1_0.Args[1]
24383 for _i0 := 0; _i0 <= 1; _i0, v_1_0_0, v_1_0_1 = _i0+1, v_1_0_1, v_1_0_0 {
24384 y := v_1_0_0
24385 if v_1_0_1.Op != OpConst8 {
24386 continue
24387 }
24388 c := auxIntToInt8(v_1_0_1.AuxInt)
24389 if !(c&63 == 63) {
24390 continue
24391 }
24392 v.reset(OpRotateLeft64)
24393 v0 := b.NewValue0(v.Pos, OpNeg8, y.Type)
24394 v0.AddArg(y)
24395 v.AddArg2(x, v0)
24396 return true
24397 }
24398 break
24399 }
24400
24401
24402
24403 for {
24404 x := v_0
24405 if v_1.Op != OpAdd64 {
24406 break
24407 }
24408 _ = v_1.Args[1]
24409 v_1_0 := v_1.Args[0]
24410 v_1_1 := v_1.Args[1]
24411 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
24412 y := v_1_0
24413 if v_1_1.Op != OpConst64 {
24414 continue
24415 }
24416 c := auxIntToInt64(v_1_1.AuxInt)
24417 if !(c&63 == 0) {
24418 continue
24419 }
24420 v.reset(OpRotateLeft64)
24421 v.AddArg2(x, y)
24422 return true
24423 }
24424 break
24425 }
24426
24427
24428
24429 for {
24430 x := v_0
24431 if v_1.Op != OpAdd32 {
24432 break
24433 }
24434 _ = v_1.Args[1]
24435 v_1_0 := v_1.Args[0]
24436 v_1_1 := v_1.Args[1]
24437 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
24438 y := v_1_0
24439 if v_1_1.Op != OpConst32 {
24440 continue
24441 }
24442 c := auxIntToInt32(v_1_1.AuxInt)
24443 if !(c&63 == 0) {
24444 continue
24445 }
24446 v.reset(OpRotateLeft64)
24447 v.AddArg2(x, y)
24448 return true
24449 }
24450 break
24451 }
24452
24453
24454
24455 for {
24456 x := v_0
24457 if v_1.Op != OpAdd16 {
24458 break
24459 }
24460 _ = v_1.Args[1]
24461 v_1_0 := v_1.Args[0]
24462 v_1_1 := v_1.Args[1]
24463 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
24464 y := v_1_0
24465 if v_1_1.Op != OpConst16 {
24466 continue
24467 }
24468 c := auxIntToInt16(v_1_1.AuxInt)
24469 if !(c&63 == 0) {
24470 continue
24471 }
24472 v.reset(OpRotateLeft64)
24473 v.AddArg2(x, y)
24474 return true
24475 }
24476 break
24477 }
24478
24479
24480
24481 for {
24482 x := v_0
24483 if v_1.Op != OpAdd8 {
24484 break
24485 }
24486 _ = v_1.Args[1]
24487 v_1_0 := v_1.Args[0]
24488 v_1_1 := v_1.Args[1]
24489 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
24490 y := v_1_0
24491 if v_1_1.Op != OpConst8 {
24492 continue
24493 }
24494 c := auxIntToInt8(v_1_1.AuxInt)
24495 if !(c&63 == 0) {
24496 continue
24497 }
24498 v.reset(OpRotateLeft64)
24499 v.AddArg2(x, y)
24500 return true
24501 }
24502 break
24503 }
24504
24505
24506
24507 for {
24508 x := v_0
24509 if v_1.Op != OpSub64 {
24510 break
24511 }
24512 y := v_1.Args[1]
24513 v_1_0 := v_1.Args[0]
24514 if v_1_0.Op != OpConst64 {
24515 break
24516 }
24517 c := auxIntToInt64(v_1_0.AuxInt)
24518 if !(c&63 == 0) {
24519 break
24520 }
24521 v.reset(OpRotateLeft64)
24522 v0 := b.NewValue0(v.Pos, OpNeg64, y.Type)
24523 v0.AddArg(y)
24524 v.AddArg2(x, v0)
24525 return true
24526 }
24527
24528
24529
24530 for {
24531 x := v_0
24532 if v_1.Op != OpSub32 {
24533 break
24534 }
24535 y := v_1.Args[1]
24536 v_1_0 := v_1.Args[0]
24537 if v_1_0.Op != OpConst32 {
24538 break
24539 }
24540 c := auxIntToInt32(v_1_0.AuxInt)
24541 if !(c&63 == 0) {
24542 break
24543 }
24544 v.reset(OpRotateLeft64)
24545 v0 := b.NewValue0(v.Pos, OpNeg32, y.Type)
24546 v0.AddArg(y)
24547 v.AddArg2(x, v0)
24548 return true
24549 }
24550
24551
24552
24553 for {
24554 x := v_0
24555 if v_1.Op != OpSub16 {
24556 break
24557 }
24558 y := v_1.Args[1]
24559 v_1_0 := v_1.Args[0]
24560 if v_1_0.Op != OpConst16 {
24561 break
24562 }
24563 c := auxIntToInt16(v_1_0.AuxInt)
24564 if !(c&63 == 0) {
24565 break
24566 }
24567 v.reset(OpRotateLeft64)
24568 v0 := b.NewValue0(v.Pos, OpNeg16, y.Type)
24569 v0.AddArg(y)
24570 v.AddArg2(x, v0)
24571 return true
24572 }
24573
24574
24575
24576 for {
24577 x := v_0
24578 if v_1.Op != OpSub8 {
24579 break
24580 }
24581 y := v_1.Args[1]
24582 v_1_0 := v_1.Args[0]
24583 if v_1_0.Op != OpConst8 {
24584 break
24585 }
24586 c := auxIntToInt8(v_1_0.AuxInt)
24587 if !(c&63 == 0) {
24588 break
24589 }
24590 v.reset(OpRotateLeft64)
24591 v0 := b.NewValue0(v.Pos, OpNeg8, y.Type)
24592 v0.AddArg(y)
24593 v.AddArg2(x, v0)
24594 return true
24595 }
24596
24597
24598
24599 for {
24600 x := v_0
24601 if v_1.Op != OpConst64 {
24602 break
24603 }
24604 t := v_1.Type
24605 c := auxIntToInt64(v_1.AuxInt)
24606 if !(config.PtrSize == 4) {
24607 break
24608 }
24609 v.reset(OpRotateLeft64)
24610 v0 := b.NewValue0(v.Pos, OpConst32, t)
24611 v0.AuxInt = int32ToAuxInt(int32(c))
24612 v.AddArg2(x, v0)
24613 return true
24614 }
24615
24616
24617
24618 for {
24619 if v_0.Op != OpRotateLeft64 {
24620 break
24621 }
24622 c := v_0.Args[1]
24623 x := v_0.Args[0]
24624 d := v_1
24625 if !(c.Type.Size() == 8 && d.Type.Size() == 8) {
24626 break
24627 }
24628 v.reset(OpRotateLeft64)
24629 v0 := b.NewValue0(v.Pos, OpAdd64, c.Type)
24630 v0.AddArg2(c, d)
24631 v.AddArg2(x, v0)
24632 return true
24633 }
24634
24635
24636
24637 for {
24638 if v_0.Op != OpRotateLeft64 {
24639 break
24640 }
24641 c := v_0.Args[1]
24642 x := v_0.Args[0]
24643 d := v_1
24644 if !(c.Type.Size() == 4 && d.Type.Size() == 4) {
24645 break
24646 }
24647 v.reset(OpRotateLeft64)
24648 v0 := b.NewValue0(v.Pos, OpAdd32, c.Type)
24649 v0.AddArg2(c, d)
24650 v.AddArg2(x, v0)
24651 return true
24652 }
24653
24654
24655
24656 for {
24657 if v_0.Op != OpRotateLeft64 {
24658 break
24659 }
24660 c := v_0.Args[1]
24661 x := v_0.Args[0]
24662 d := v_1
24663 if !(c.Type.Size() == 2 && d.Type.Size() == 2) {
24664 break
24665 }
24666 v.reset(OpRotateLeft64)
24667 v0 := b.NewValue0(v.Pos, OpAdd16, c.Type)
24668 v0.AddArg2(c, d)
24669 v.AddArg2(x, v0)
24670 return true
24671 }
24672
24673
24674
24675 for {
24676 if v_0.Op != OpRotateLeft64 {
24677 break
24678 }
24679 c := v_0.Args[1]
24680 x := v_0.Args[0]
24681 d := v_1
24682 if !(c.Type.Size() == 1 && d.Type.Size() == 1) {
24683 break
24684 }
24685 v.reset(OpRotateLeft64)
24686 v0 := b.NewValue0(v.Pos, OpAdd8, c.Type)
24687 v0.AddArg2(c, d)
24688 v.AddArg2(x, v0)
24689 return true
24690 }
24691 return false
24692 }
24693 func rewriteValuegeneric_OpRotateLeft8(v *Value) bool {
24694 v_1 := v.Args[1]
24695 v_0 := v.Args[0]
24696 b := v.Block
24697 config := b.Func.Config
24698
24699
24700
24701 for {
24702 x := v_0
24703 if v_1.Op != OpConst8 {
24704 break
24705 }
24706 c := auxIntToInt8(v_1.AuxInt)
24707 if !(c%8 == 0) {
24708 break
24709 }
24710 v.copyOf(x)
24711 return true
24712 }
24713
24714
24715
24716 for {
24717 x := v_0
24718 if v_1.Op != OpAnd64 {
24719 break
24720 }
24721 _ = v_1.Args[1]
24722 v_1_0 := v_1.Args[0]
24723 v_1_1 := v_1.Args[1]
24724 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
24725 y := v_1_0
24726 if v_1_1.Op != OpConst64 {
24727 continue
24728 }
24729 c := auxIntToInt64(v_1_1.AuxInt)
24730 if !(c&7 == 7) {
24731 continue
24732 }
24733 v.reset(OpRotateLeft8)
24734 v.AddArg2(x, y)
24735 return true
24736 }
24737 break
24738 }
24739
24740
24741
24742 for {
24743 x := v_0
24744 if v_1.Op != OpAnd32 {
24745 break
24746 }
24747 _ = v_1.Args[1]
24748 v_1_0 := v_1.Args[0]
24749 v_1_1 := v_1.Args[1]
24750 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
24751 y := v_1_0
24752 if v_1_1.Op != OpConst32 {
24753 continue
24754 }
24755 c := auxIntToInt32(v_1_1.AuxInt)
24756 if !(c&7 == 7) {
24757 continue
24758 }
24759 v.reset(OpRotateLeft8)
24760 v.AddArg2(x, y)
24761 return true
24762 }
24763 break
24764 }
24765
24766
24767
24768 for {
24769 x := v_0
24770 if v_1.Op != OpAnd16 {
24771 break
24772 }
24773 _ = v_1.Args[1]
24774 v_1_0 := v_1.Args[0]
24775 v_1_1 := v_1.Args[1]
24776 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
24777 y := v_1_0
24778 if v_1_1.Op != OpConst16 {
24779 continue
24780 }
24781 c := auxIntToInt16(v_1_1.AuxInt)
24782 if !(c&7 == 7) {
24783 continue
24784 }
24785 v.reset(OpRotateLeft8)
24786 v.AddArg2(x, y)
24787 return true
24788 }
24789 break
24790 }
24791
24792
24793
24794 for {
24795 x := v_0
24796 if v_1.Op != OpAnd8 {
24797 break
24798 }
24799 _ = v_1.Args[1]
24800 v_1_0 := v_1.Args[0]
24801 v_1_1 := v_1.Args[1]
24802 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
24803 y := v_1_0
24804 if v_1_1.Op != OpConst8 {
24805 continue
24806 }
24807 c := auxIntToInt8(v_1_1.AuxInt)
24808 if !(c&7 == 7) {
24809 continue
24810 }
24811 v.reset(OpRotateLeft8)
24812 v.AddArg2(x, y)
24813 return true
24814 }
24815 break
24816 }
24817
24818
24819
24820 for {
24821 x := v_0
24822 if v_1.Op != OpNeg64 {
24823 break
24824 }
24825 v_1_0 := v_1.Args[0]
24826 if v_1_0.Op != OpAnd64 {
24827 break
24828 }
24829 _ = v_1_0.Args[1]
24830 v_1_0_0 := v_1_0.Args[0]
24831 v_1_0_1 := v_1_0.Args[1]
24832 for _i0 := 0; _i0 <= 1; _i0, v_1_0_0, v_1_0_1 = _i0+1, v_1_0_1, v_1_0_0 {
24833 y := v_1_0_0
24834 if v_1_0_1.Op != OpConst64 {
24835 continue
24836 }
24837 c := auxIntToInt64(v_1_0_1.AuxInt)
24838 if !(c&7 == 7) {
24839 continue
24840 }
24841 v.reset(OpRotateLeft8)
24842 v0 := b.NewValue0(v.Pos, OpNeg64, y.Type)
24843 v0.AddArg(y)
24844 v.AddArg2(x, v0)
24845 return true
24846 }
24847 break
24848 }
24849
24850
24851
24852 for {
24853 x := v_0
24854 if v_1.Op != OpNeg32 {
24855 break
24856 }
24857 v_1_0 := v_1.Args[0]
24858 if v_1_0.Op != OpAnd32 {
24859 break
24860 }
24861 _ = v_1_0.Args[1]
24862 v_1_0_0 := v_1_0.Args[0]
24863 v_1_0_1 := v_1_0.Args[1]
24864 for _i0 := 0; _i0 <= 1; _i0, v_1_0_0, v_1_0_1 = _i0+1, v_1_0_1, v_1_0_0 {
24865 y := v_1_0_0
24866 if v_1_0_1.Op != OpConst32 {
24867 continue
24868 }
24869 c := auxIntToInt32(v_1_0_1.AuxInt)
24870 if !(c&7 == 7) {
24871 continue
24872 }
24873 v.reset(OpRotateLeft8)
24874 v0 := b.NewValue0(v.Pos, OpNeg32, y.Type)
24875 v0.AddArg(y)
24876 v.AddArg2(x, v0)
24877 return true
24878 }
24879 break
24880 }
24881
24882
24883
24884 for {
24885 x := v_0
24886 if v_1.Op != OpNeg16 {
24887 break
24888 }
24889 v_1_0 := v_1.Args[0]
24890 if v_1_0.Op != OpAnd16 {
24891 break
24892 }
24893 _ = v_1_0.Args[1]
24894 v_1_0_0 := v_1_0.Args[0]
24895 v_1_0_1 := v_1_0.Args[1]
24896 for _i0 := 0; _i0 <= 1; _i0, v_1_0_0, v_1_0_1 = _i0+1, v_1_0_1, v_1_0_0 {
24897 y := v_1_0_0
24898 if v_1_0_1.Op != OpConst16 {
24899 continue
24900 }
24901 c := auxIntToInt16(v_1_0_1.AuxInt)
24902 if !(c&7 == 7) {
24903 continue
24904 }
24905 v.reset(OpRotateLeft8)
24906 v0 := b.NewValue0(v.Pos, OpNeg16, y.Type)
24907 v0.AddArg(y)
24908 v.AddArg2(x, v0)
24909 return true
24910 }
24911 break
24912 }
24913
24914
24915
24916 for {
24917 x := v_0
24918 if v_1.Op != OpNeg8 {
24919 break
24920 }
24921 v_1_0 := v_1.Args[0]
24922 if v_1_0.Op != OpAnd8 {
24923 break
24924 }
24925 _ = v_1_0.Args[1]
24926 v_1_0_0 := v_1_0.Args[0]
24927 v_1_0_1 := v_1_0.Args[1]
24928 for _i0 := 0; _i0 <= 1; _i0, v_1_0_0, v_1_0_1 = _i0+1, v_1_0_1, v_1_0_0 {
24929 y := v_1_0_0
24930 if v_1_0_1.Op != OpConst8 {
24931 continue
24932 }
24933 c := auxIntToInt8(v_1_0_1.AuxInt)
24934 if !(c&7 == 7) {
24935 continue
24936 }
24937 v.reset(OpRotateLeft8)
24938 v0 := b.NewValue0(v.Pos, OpNeg8, y.Type)
24939 v0.AddArg(y)
24940 v.AddArg2(x, v0)
24941 return true
24942 }
24943 break
24944 }
24945
24946
24947
24948 for {
24949 x := v_0
24950 if v_1.Op != OpAdd64 {
24951 break
24952 }
24953 _ = v_1.Args[1]
24954 v_1_0 := v_1.Args[0]
24955 v_1_1 := v_1.Args[1]
24956 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
24957 y := v_1_0
24958 if v_1_1.Op != OpConst64 {
24959 continue
24960 }
24961 c := auxIntToInt64(v_1_1.AuxInt)
24962 if !(c&7 == 0) {
24963 continue
24964 }
24965 v.reset(OpRotateLeft8)
24966 v.AddArg2(x, y)
24967 return true
24968 }
24969 break
24970 }
24971
24972
24973
24974 for {
24975 x := v_0
24976 if v_1.Op != OpAdd32 {
24977 break
24978 }
24979 _ = v_1.Args[1]
24980 v_1_0 := v_1.Args[0]
24981 v_1_1 := v_1.Args[1]
24982 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
24983 y := v_1_0
24984 if v_1_1.Op != OpConst32 {
24985 continue
24986 }
24987 c := auxIntToInt32(v_1_1.AuxInt)
24988 if !(c&7 == 0) {
24989 continue
24990 }
24991 v.reset(OpRotateLeft8)
24992 v.AddArg2(x, y)
24993 return true
24994 }
24995 break
24996 }
24997
24998
24999
25000 for {
25001 x := v_0
25002 if v_1.Op != OpAdd16 {
25003 break
25004 }
25005 _ = v_1.Args[1]
25006 v_1_0 := v_1.Args[0]
25007 v_1_1 := v_1.Args[1]
25008 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
25009 y := v_1_0
25010 if v_1_1.Op != OpConst16 {
25011 continue
25012 }
25013 c := auxIntToInt16(v_1_1.AuxInt)
25014 if !(c&7 == 0) {
25015 continue
25016 }
25017 v.reset(OpRotateLeft8)
25018 v.AddArg2(x, y)
25019 return true
25020 }
25021 break
25022 }
25023
25024
25025
25026 for {
25027 x := v_0
25028 if v_1.Op != OpAdd8 {
25029 break
25030 }
25031 _ = v_1.Args[1]
25032 v_1_0 := v_1.Args[0]
25033 v_1_1 := v_1.Args[1]
25034 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
25035 y := v_1_0
25036 if v_1_1.Op != OpConst8 {
25037 continue
25038 }
25039 c := auxIntToInt8(v_1_1.AuxInt)
25040 if !(c&7 == 0) {
25041 continue
25042 }
25043 v.reset(OpRotateLeft8)
25044 v.AddArg2(x, y)
25045 return true
25046 }
25047 break
25048 }
25049
25050
25051
25052 for {
25053 x := v_0
25054 if v_1.Op != OpSub64 {
25055 break
25056 }
25057 y := v_1.Args[1]
25058 v_1_0 := v_1.Args[0]
25059 if v_1_0.Op != OpConst64 {
25060 break
25061 }
25062 c := auxIntToInt64(v_1_0.AuxInt)
25063 if !(c&7 == 0) {
25064 break
25065 }
25066 v.reset(OpRotateLeft8)
25067 v0 := b.NewValue0(v.Pos, OpNeg64, y.Type)
25068 v0.AddArg(y)
25069 v.AddArg2(x, v0)
25070 return true
25071 }
25072
25073
25074
25075 for {
25076 x := v_0
25077 if v_1.Op != OpSub32 {
25078 break
25079 }
25080 y := v_1.Args[1]
25081 v_1_0 := v_1.Args[0]
25082 if v_1_0.Op != OpConst32 {
25083 break
25084 }
25085 c := auxIntToInt32(v_1_0.AuxInt)
25086 if !(c&7 == 0) {
25087 break
25088 }
25089 v.reset(OpRotateLeft8)
25090 v0 := b.NewValue0(v.Pos, OpNeg32, y.Type)
25091 v0.AddArg(y)
25092 v.AddArg2(x, v0)
25093 return true
25094 }
25095
25096
25097
25098 for {
25099 x := v_0
25100 if v_1.Op != OpSub16 {
25101 break
25102 }
25103 y := v_1.Args[1]
25104 v_1_0 := v_1.Args[0]
25105 if v_1_0.Op != OpConst16 {
25106 break
25107 }
25108 c := auxIntToInt16(v_1_0.AuxInt)
25109 if !(c&7 == 0) {
25110 break
25111 }
25112 v.reset(OpRotateLeft8)
25113 v0 := b.NewValue0(v.Pos, OpNeg16, y.Type)
25114 v0.AddArg(y)
25115 v.AddArg2(x, v0)
25116 return true
25117 }
25118
25119
25120
25121 for {
25122 x := v_0
25123 if v_1.Op != OpSub8 {
25124 break
25125 }
25126 y := v_1.Args[1]
25127 v_1_0 := v_1.Args[0]
25128 if v_1_0.Op != OpConst8 {
25129 break
25130 }
25131 c := auxIntToInt8(v_1_0.AuxInt)
25132 if !(c&7 == 0) {
25133 break
25134 }
25135 v.reset(OpRotateLeft8)
25136 v0 := b.NewValue0(v.Pos, OpNeg8, y.Type)
25137 v0.AddArg(y)
25138 v.AddArg2(x, v0)
25139 return true
25140 }
25141
25142
25143
25144 for {
25145 x := v_0
25146 if v_1.Op != OpConst64 {
25147 break
25148 }
25149 t := v_1.Type
25150 c := auxIntToInt64(v_1.AuxInt)
25151 if !(config.PtrSize == 4) {
25152 break
25153 }
25154 v.reset(OpRotateLeft8)
25155 v0 := b.NewValue0(v.Pos, OpConst32, t)
25156 v0.AuxInt = int32ToAuxInt(int32(c))
25157 v.AddArg2(x, v0)
25158 return true
25159 }
25160
25161
25162
25163 for {
25164 if v_0.Op != OpRotateLeft8 {
25165 break
25166 }
25167 c := v_0.Args[1]
25168 x := v_0.Args[0]
25169 d := v_1
25170 if !(c.Type.Size() == 8 && d.Type.Size() == 8) {
25171 break
25172 }
25173 v.reset(OpRotateLeft8)
25174 v0 := b.NewValue0(v.Pos, OpAdd64, c.Type)
25175 v0.AddArg2(c, d)
25176 v.AddArg2(x, v0)
25177 return true
25178 }
25179
25180
25181
25182 for {
25183 if v_0.Op != OpRotateLeft8 {
25184 break
25185 }
25186 c := v_0.Args[1]
25187 x := v_0.Args[0]
25188 d := v_1
25189 if !(c.Type.Size() == 4 && d.Type.Size() == 4) {
25190 break
25191 }
25192 v.reset(OpRotateLeft8)
25193 v0 := b.NewValue0(v.Pos, OpAdd32, c.Type)
25194 v0.AddArg2(c, d)
25195 v.AddArg2(x, v0)
25196 return true
25197 }
25198
25199
25200
25201 for {
25202 if v_0.Op != OpRotateLeft8 {
25203 break
25204 }
25205 c := v_0.Args[1]
25206 x := v_0.Args[0]
25207 d := v_1
25208 if !(c.Type.Size() == 2 && d.Type.Size() == 2) {
25209 break
25210 }
25211 v.reset(OpRotateLeft8)
25212 v0 := b.NewValue0(v.Pos, OpAdd16, c.Type)
25213 v0.AddArg2(c, d)
25214 v.AddArg2(x, v0)
25215 return true
25216 }
25217
25218
25219
25220 for {
25221 if v_0.Op != OpRotateLeft8 {
25222 break
25223 }
25224 c := v_0.Args[1]
25225 x := v_0.Args[0]
25226 d := v_1
25227 if !(c.Type.Size() == 1 && d.Type.Size() == 1) {
25228 break
25229 }
25230 v.reset(OpRotateLeft8)
25231 v0 := b.NewValue0(v.Pos, OpAdd8, c.Type)
25232 v0.AddArg2(c, d)
25233 v.AddArg2(x, v0)
25234 return true
25235 }
25236 return false
25237 }
25238 func rewriteValuegeneric_OpRound32F(v *Value) bool {
25239 v_0 := v.Args[0]
25240
25241
25242 for {
25243 x := v_0
25244 if x.Op != OpConst32F {
25245 break
25246 }
25247 v.copyOf(x)
25248 return true
25249 }
25250 return false
25251 }
25252 func rewriteValuegeneric_OpRound64F(v *Value) bool {
25253 v_0 := v.Args[0]
25254
25255
25256 for {
25257 x := v_0
25258 if x.Op != OpConst64F {
25259 break
25260 }
25261 v.copyOf(x)
25262 return true
25263 }
25264 return false
25265 }
25266 func rewriteValuegeneric_OpRoundToEven(v *Value) bool {
25267 v_0 := v.Args[0]
25268
25269
25270 for {
25271 if v_0.Op != OpConst64F {
25272 break
25273 }
25274 c := auxIntToFloat64(v_0.AuxInt)
25275 v.reset(OpConst64F)
25276 v.AuxInt = float64ToAuxInt(math.RoundToEven(c))
25277 return true
25278 }
25279 return false
25280 }
25281 func rewriteValuegeneric_OpRsh16Ux16(v *Value) bool {
25282 v_1 := v.Args[1]
25283 v_0 := v.Args[0]
25284 b := v.Block
25285
25286
25287 for {
25288 t := v.Type
25289 x := v_0
25290 if v_1.Op != OpConst16 {
25291 break
25292 }
25293 c := auxIntToInt16(v_1.AuxInt)
25294 v.reset(OpRsh16Ux64)
25295 v0 := b.NewValue0(v.Pos, OpConst64, t)
25296 v0.AuxInt = int64ToAuxInt(int64(uint16(c)))
25297 v.AddArg2(x, v0)
25298 return true
25299 }
25300
25301
25302 for {
25303 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 {
25304 break
25305 }
25306 v.reset(OpConst16)
25307 v.AuxInt = int16ToAuxInt(0)
25308 return true
25309 }
25310 return false
25311 }
25312 func rewriteValuegeneric_OpRsh16Ux32(v *Value) bool {
25313 v_1 := v.Args[1]
25314 v_0 := v.Args[0]
25315 b := v.Block
25316
25317
25318 for {
25319 t := v.Type
25320 x := v_0
25321 if v_1.Op != OpConst32 {
25322 break
25323 }
25324 c := auxIntToInt32(v_1.AuxInt)
25325 v.reset(OpRsh16Ux64)
25326 v0 := b.NewValue0(v.Pos, OpConst64, t)
25327 v0.AuxInt = int64ToAuxInt(int64(uint32(c)))
25328 v.AddArg2(x, v0)
25329 return true
25330 }
25331
25332
25333 for {
25334 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 {
25335 break
25336 }
25337 v.reset(OpConst16)
25338 v.AuxInt = int16ToAuxInt(0)
25339 return true
25340 }
25341 return false
25342 }
25343 func rewriteValuegeneric_OpRsh16Ux64(v *Value) bool {
25344 v_1 := v.Args[1]
25345 v_0 := v.Args[0]
25346 b := v.Block
25347 typ := &b.Func.Config.Types
25348
25349
25350 for {
25351 if v_0.Op != OpConst16 {
25352 break
25353 }
25354 c := auxIntToInt16(v_0.AuxInt)
25355 if v_1.Op != OpConst64 {
25356 break
25357 }
25358 d := auxIntToInt64(v_1.AuxInt)
25359 v.reset(OpConst16)
25360 v.AuxInt = int16ToAuxInt(int16(uint16(c) >> uint64(d)))
25361 return true
25362 }
25363
25364
25365 for {
25366 x := v_0
25367 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 0 {
25368 break
25369 }
25370 v.copyOf(x)
25371 return true
25372 }
25373
25374
25375 for {
25376 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 {
25377 break
25378 }
25379 v.reset(OpConst16)
25380 v.AuxInt = int16ToAuxInt(0)
25381 return true
25382 }
25383
25384
25385
25386 for {
25387 if v_1.Op != OpConst64 {
25388 break
25389 }
25390 c := auxIntToInt64(v_1.AuxInt)
25391 if !(uint64(c) >= 16) {
25392 break
25393 }
25394 v.reset(OpConst16)
25395 v.AuxInt = int16ToAuxInt(0)
25396 return true
25397 }
25398
25399
25400
25401 for {
25402 t := v.Type
25403 if v_0.Op != OpRsh16Ux64 {
25404 break
25405 }
25406 _ = v_0.Args[1]
25407 x := v_0.Args[0]
25408 v_0_1 := v_0.Args[1]
25409 if v_0_1.Op != OpConst64 {
25410 break
25411 }
25412 c := auxIntToInt64(v_0_1.AuxInt)
25413 if v_1.Op != OpConst64 {
25414 break
25415 }
25416 d := auxIntToInt64(v_1.AuxInt)
25417 if !(!uaddOvf(c, d)) {
25418 break
25419 }
25420 v.reset(OpRsh16Ux64)
25421 v0 := b.NewValue0(v.Pos, OpConst64, t)
25422 v0.AuxInt = int64ToAuxInt(c + d)
25423 v.AddArg2(x, v0)
25424 return true
25425 }
25426
25427
25428 for {
25429 if v_0.Op != OpRsh16x64 {
25430 break
25431 }
25432 x := v_0.Args[0]
25433 if v_1.Op != OpConst64 {
25434 break
25435 }
25436 t := v_1.Type
25437 if auxIntToInt64(v_1.AuxInt) != 15 {
25438 break
25439 }
25440 v.reset(OpRsh16Ux64)
25441 v0 := b.NewValue0(v.Pos, OpConst64, t)
25442 v0.AuxInt = int64ToAuxInt(15)
25443 v.AddArg2(x, v0)
25444 return true
25445 }
25446
25447
25448
25449 for {
25450 i := v_0
25451 if i.Op != OpLsh16x64 {
25452 break
25453 }
25454 _ = i.Args[1]
25455 x := i.Args[0]
25456 i_1 := i.Args[1]
25457 if i_1.Op != OpConst64 {
25458 break
25459 }
25460 c := auxIntToInt64(i_1.AuxInt)
25461 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != c || !(c >= 0 && c < 16 && i.Uses == 1) {
25462 break
25463 }
25464 v.reset(OpAnd16)
25465 v0 := b.NewValue0(v.Pos, OpConst16, v.Type)
25466 v0.AuxInt = int16ToAuxInt(int16(^uint16(0) >> c))
25467 v.AddArg2(x, v0)
25468 return true
25469 }
25470
25471
25472
25473 for {
25474 if v_0.Op != OpLsh16x64 {
25475 break
25476 }
25477 _ = v_0.Args[1]
25478 v_0_0 := v_0.Args[0]
25479 if v_0_0.Op != OpRsh16Ux64 {
25480 break
25481 }
25482 _ = v_0_0.Args[1]
25483 x := v_0_0.Args[0]
25484 v_0_0_1 := v_0_0.Args[1]
25485 if v_0_0_1.Op != OpConst64 {
25486 break
25487 }
25488 c1 := auxIntToInt64(v_0_0_1.AuxInt)
25489 v_0_1 := v_0.Args[1]
25490 if v_0_1.Op != OpConst64 {
25491 break
25492 }
25493 c2 := auxIntToInt64(v_0_1.AuxInt)
25494 if v_1.Op != OpConst64 {
25495 break
25496 }
25497 c3 := auxIntToInt64(v_1.AuxInt)
25498 if !(uint64(c1) >= uint64(c2) && uint64(c3) >= uint64(c2) && !uaddOvf(c1-c2, c3)) {
25499 break
25500 }
25501 v.reset(OpRsh16Ux64)
25502 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
25503 v0.AuxInt = int64ToAuxInt(c1 - c2 + c3)
25504 v.AddArg2(x, v0)
25505 return true
25506 }
25507
25508
25509 for {
25510 if v_0.Op != OpLsh16x64 {
25511 break
25512 }
25513 _ = v_0.Args[1]
25514 x := v_0.Args[0]
25515 v_0_1 := v_0.Args[1]
25516 if v_0_1.Op != OpConst64 || auxIntToInt64(v_0_1.AuxInt) != 8 || v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 8 {
25517 break
25518 }
25519 v.reset(OpZeroExt8to16)
25520 v0 := b.NewValue0(v.Pos, OpTrunc16to8, typ.UInt8)
25521 v0.AddArg(x)
25522 v.AddArg(v0)
25523 return true
25524 }
25525 return false
25526 }
25527 func rewriteValuegeneric_OpRsh16Ux8(v *Value) bool {
25528 v_1 := v.Args[1]
25529 v_0 := v.Args[0]
25530 b := v.Block
25531
25532
25533 for {
25534 t := v.Type
25535 x := v_0
25536 if v_1.Op != OpConst8 {
25537 break
25538 }
25539 c := auxIntToInt8(v_1.AuxInt)
25540 v.reset(OpRsh16Ux64)
25541 v0 := b.NewValue0(v.Pos, OpConst64, t)
25542 v0.AuxInt = int64ToAuxInt(int64(uint8(c)))
25543 v.AddArg2(x, v0)
25544 return true
25545 }
25546
25547
25548 for {
25549 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 {
25550 break
25551 }
25552 v.reset(OpConst16)
25553 v.AuxInt = int16ToAuxInt(0)
25554 return true
25555 }
25556 return false
25557 }
25558 func rewriteValuegeneric_OpRsh16x16(v *Value) bool {
25559 v_1 := v.Args[1]
25560 v_0 := v.Args[0]
25561 b := v.Block
25562
25563
25564 for {
25565 t := v.Type
25566 x := v_0
25567 if v_1.Op != OpConst16 {
25568 break
25569 }
25570 c := auxIntToInt16(v_1.AuxInt)
25571 v.reset(OpRsh16x64)
25572 v0 := b.NewValue0(v.Pos, OpConst64, t)
25573 v0.AuxInt = int64ToAuxInt(int64(uint16(c)))
25574 v.AddArg2(x, v0)
25575 return true
25576 }
25577
25578
25579 for {
25580 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 {
25581 break
25582 }
25583 v.reset(OpConst16)
25584 v.AuxInt = int16ToAuxInt(0)
25585 return true
25586 }
25587 return false
25588 }
25589 func rewriteValuegeneric_OpRsh16x32(v *Value) bool {
25590 v_1 := v.Args[1]
25591 v_0 := v.Args[0]
25592 b := v.Block
25593
25594
25595 for {
25596 t := v.Type
25597 x := v_0
25598 if v_1.Op != OpConst32 {
25599 break
25600 }
25601 c := auxIntToInt32(v_1.AuxInt)
25602 v.reset(OpRsh16x64)
25603 v0 := b.NewValue0(v.Pos, OpConst64, t)
25604 v0.AuxInt = int64ToAuxInt(int64(uint32(c)))
25605 v.AddArg2(x, v0)
25606 return true
25607 }
25608
25609
25610 for {
25611 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 {
25612 break
25613 }
25614 v.reset(OpConst16)
25615 v.AuxInt = int16ToAuxInt(0)
25616 return true
25617 }
25618 return false
25619 }
25620 func rewriteValuegeneric_OpRsh16x64(v *Value) bool {
25621 v_1 := v.Args[1]
25622 v_0 := v.Args[0]
25623 b := v.Block
25624 typ := &b.Func.Config.Types
25625
25626
25627 for {
25628 if v_0.Op != OpConst16 {
25629 break
25630 }
25631 c := auxIntToInt16(v_0.AuxInt)
25632 if v_1.Op != OpConst64 {
25633 break
25634 }
25635 d := auxIntToInt64(v_1.AuxInt)
25636 v.reset(OpConst16)
25637 v.AuxInt = int16ToAuxInt(c >> uint64(d))
25638 return true
25639 }
25640
25641
25642 for {
25643 x := v_0
25644 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 0 {
25645 break
25646 }
25647 v.copyOf(x)
25648 return true
25649 }
25650
25651
25652 for {
25653 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 {
25654 break
25655 }
25656 v.reset(OpConst16)
25657 v.AuxInt = int16ToAuxInt(0)
25658 return true
25659 }
25660
25661
25662
25663 for {
25664 t := v.Type
25665 if v_0.Op != OpRsh16x64 {
25666 break
25667 }
25668 _ = v_0.Args[1]
25669 x := v_0.Args[0]
25670 v_0_1 := v_0.Args[1]
25671 if v_0_1.Op != OpConst64 {
25672 break
25673 }
25674 c := auxIntToInt64(v_0_1.AuxInt)
25675 if v_1.Op != OpConst64 {
25676 break
25677 }
25678 d := auxIntToInt64(v_1.AuxInt)
25679 if !(!uaddOvf(c, d)) {
25680 break
25681 }
25682 v.reset(OpRsh16x64)
25683 v0 := b.NewValue0(v.Pos, OpConst64, t)
25684 v0.AuxInt = int64ToAuxInt(c + d)
25685 v.AddArg2(x, v0)
25686 return true
25687 }
25688
25689
25690 for {
25691 if v_0.Op != OpLsh16x64 {
25692 break
25693 }
25694 _ = v_0.Args[1]
25695 x := v_0.Args[0]
25696 v_0_1 := v_0.Args[1]
25697 if v_0_1.Op != OpConst64 || auxIntToInt64(v_0_1.AuxInt) != 8 || v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 8 {
25698 break
25699 }
25700 v.reset(OpSignExt8to16)
25701 v0 := b.NewValue0(v.Pos, OpTrunc16to8, typ.Int8)
25702 v0.AddArg(x)
25703 v.AddArg(v0)
25704 return true
25705 }
25706 return false
25707 }
25708 func rewriteValuegeneric_OpRsh16x8(v *Value) bool {
25709 v_1 := v.Args[1]
25710 v_0 := v.Args[0]
25711 b := v.Block
25712
25713
25714 for {
25715 t := v.Type
25716 x := v_0
25717 if v_1.Op != OpConst8 {
25718 break
25719 }
25720 c := auxIntToInt8(v_1.AuxInt)
25721 v.reset(OpRsh16x64)
25722 v0 := b.NewValue0(v.Pos, OpConst64, t)
25723 v0.AuxInt = int64ToAuxInt(int64(uint8(c)))
25724 v.AddArg2(x, v0)
25725 return true
25726 }
25727
25728
25729 for {
25730 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 {
25731 break
25732 }
25733 v.reset(OpConst16)
25734 v.AuxInt = int16ToAuxInt(0)
25735 return true
25736 }
25737 return false
25738 }
25739 func rewriteValuegeneric_OpRsh32Ux16(v *Value) bool {
25740 v_1 := v.Args[1]
25741 v_0 := v.Args[0]
25742 b := v.Block
25743
25744
25745 for {
25746 t := v.Type
25747 x := v_0
25748 if v_1.Op != OpConst16 {
25749 break
25750 }
25751 c := auxIntToInt16(v_1.AuxInt)
25752 v.reset(OpRsh32Ux64)
25753 v0 := b.NewValue0(v.Pos, OpConst64, t)
25754 v0.AuxInt = int64ToAuxInt(int64(uint16(c)))
25755 v.AddArg2(x, v0)
25756 return true
25757 }
25758
25759
25760 for {
25761 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
25762 break
25763 }
25764 v.reset(OpConst32)
25765 v.AuxInt = int32ToAuxInt(0)
25766 return true
25767 }
25768 return false
25769 }
25770 func rewriteValuegeneric_OpRsh32Ux32(v *Value) bool {
25771 v_1 := v.Args[1]
25772 v_0 := v.Args[0]
25773 b := v.Block
25774
25775
25776 for {
25777 t := v.Type
25778 x := v_0
25779 if v_1.Op != OpConst32 {
25780 break
25781 }
25782 c := auxIntToInt32(v_1.AuxInt)
25783 v.reset(OpRsh32Ux64)
25784 v0 := b.NewValue0(v.Pos, OpConst64, t)
25785 v0.AuxInt = int64ToAuxInt(int64(uint32(c)))
25786 v.AddArg2(x, v0)
25787 return true
25788 }
25789
25790
25791 for {
25792 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
25793 break
25794 }
25795 v.reset(OpConst32)
25796 v.AuxInt = int32ToAuxInt(0)
25797 return true
25798 }
25799 return false
25800 }
25801 func rewriteValuegeneric_OpRsh32Ux64(v *Value) bool {
25802 v_1 := v.Args[1]
25803 v_0 := v.Args[0]
25804 b := v.Block
25805 typ := &b.Func.Config.Types
25806
25807
25808 for {
25809 if v_0.Op != OpConst32 {
25810 break
25811 }
25812 c := auxIntToInt32(v_0.AuxInt)
25813 if v_1.Op != OpConst64 {
25814 break
25815 }
25816 d := auxIntToInt64(v_1.AuxInt)
25817 v.reset(OpConst32)
25818 v.AuxInt = int32ToAuxInt(int32(uint32(c) >> uint64(d)))
25819 return true
25820 }
25821
25822
25823 for {
25824 x := v_0
25825 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 0 {
25826 break
25827 }
25828 v.copyOf(x)
25829 return true
25830 }
25831
25832
25833 for {
25834 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
25835 break
25836 }
25837 v.reset(OpConst32)
25838 v.AuxInt = int32ToAuxInt(0)
25839 return true
25840 }
25841
25842
25843
25844 for {
25845 if v_1.Op != OpConst64 {
25846 break
25847 }
25848 c := auxIntToInt64(v_1.AuxInt)
25849 if !(uint64(c) >= 32) {
25850 break
25851 }
25852 v.reset(OpConst32)
25853 v.AuxInt = int32ToAuxInt(0)
25854 return true
25855 }
25856
25857
25858
25859 for {
25860 t := v.Type
25861 if v_0.Op != OpRsh32Ux64 {
25862 break
25863 }
25864 _ = v_0.Args[1]
25865 x := v_0.Args[0]
25866 v_0_1 := v_0.Args[1]
25867 if v_0_1.Op != OpConst64 {
25868 break
25869 }
25870 c := auxIntToInt64(v_0_1.AuxInt)
25871 if v_1.Op != OpConst64 {
25872 break
25873 }
25874 d := auxIntToInt64(v_1.AuxInt)
25875 if !(!uaddOvf(c, d)) {
25876 break
25877 }
25878 v.reset(OpRsh32Ux64)
25879 v0 := b.NewValue0(v.Pos, OpConst64, t)
25880 v0.AuxInt = int64ToAuxInt(c + d)
25881 v.AddArg2(x, v0)
25882 return true
25883 }
25884
25885
25886 for {
25887 if v_0.Op != OpRsh32x64 {
25888 break
25889 }
25890 x := v_0.Args[0]
25891 if v_1.Op != OpConst64 {
25892 break
25893 }
25894 t := v_1.Type
25895 if auxIntToInt64(v_1.AuxInt) != 31 {
25896 break
25897 }
25898 v.reset(OpRsh32Ux64)
25899 v0 := b.NewValue0(v.Pos, OpConst64, t)
25900 v0.AuxInt = int64ToAuxInt(31)
25901 v.AddArg2(x, v0)
25902 return true
25903 }
25904
25905
25906
25907 for {
25908 i := v_0
25909 if i.Op != OpLsh32x64 {
25910 break
25911 }
25912 _ = i.Args[1]
25913 x := i.Args[0]
25914 i_1 := i.Args[1]
25915 if i_1.Op != OpConst64 {
25916 break
25917 }
25918 c := auxIntToInt64(i_1.AuxInt)
25919 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != c || !(c >= 0 && c < 32 && i.Uses == 1) {
25920 break
25921 }
25922 v.reset(OpAnd32)
25923 v0 := b.NewValue0(v.Pos, OpConst32, v.Type)
25924 v0.AuxInt = int32ToAuxInt(int32(^uint32(0) >> c))
25925 v.AddArg2(x, v0)
25926 return true
25927 }
25928
25929
25930
25931 for {
25932 if v_0.Op != OpLsh32x64 {
25933 break
25934 }
25935 _ = v_0.Args[1]
25936 v_0_0 := v_0.Args[0]
25937 if v_0_0.Op != OpRsh32Ux64 {
25938 break
25939 }
25940 _ = v_0_0.Args[1]
25941 x := v_0_0.Args[0]
25942 v_0_0_1 := v_0_0.Args[1]
25943 if v_0_0_1.Op != OpConst64 {
25944 break
25945 }
25946 c1 := auxIntToInt64(v_0_0_1.AuxInt)
25947 v_0_1 := v_0.Args[1]
25948 if v_0_1.Op != OpConst64 {
25949 break
25950 }
25951 c2 := auxIntToInt64(v_0_1.AuxInt)
25952 if v_1.Op != OpConst64 {
25953 break
25954 }
25955 c3 := auxIntToInt64(v_1.AuxInt)
25956 if !(uint64(c1) >= uint64(c2) && uint64(c3) >= uint64(c2) && !uaddOvf(c1-c2, c3)) {
25957 break
25958 }
25959 v.reset(OpRsh32Ux64)
25960 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
25961 v0.AuxInt = int64ToAuxInt(c1 - c2 + c3)
25962 v.AddArg2(x, v0)
25963 return true
25964 }
25965
25966
25967 for {
25968 if v_0.Op != OpLsh32x64 {
25969 break
25970 }
25971 _ = v_0.Args[1]
25972 x := v_0.Args[0]
25973 v_0_1 := v_0.Args[1]
25974 if v_0_1.Op != OpConst64 || auxIntToInt64(v_0_1.AuxInt) != 24 || v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 24 {
25975 break
25976 }
25977 v.reset(OpZeroExt8to32)
25978 v0 := b.NewValue0(v.Pos, OpTrunc32to8, typ.UInt8)
25979 v0.AddArg(x)
25980 v.AddArg(v0)
25981 return true
25982 }
25983
25984
25985 for {
25986 if v_0.Op != OpLsh32x64 {
25987 break
25988 }
25989 _ = v_0.Args[1]
25990 x := v_0.Args[0]
25991 v_0_1 := v_0.Args[1]
25992 if v_0_1.Op != OpConst64 || auxIntToInt64(v_0_1.AuxInt) != 16 || v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 16 {
25993 break
25994 }
25995 v.reset(OpZeroExt16to32)
25996 v0 := b.NewValue0(v.Pos, OpTrunc32to16, typ.UInt16)
25997 v0.AddArg(x)
25998 v.AddArg(v0)
25999 return true
26000 }
26001 return false
26002 }
26003 func rewriteValuegeneric_OpRsh32Ux8(v *Value) bool {
26004 v_1 := v.Args[1]
26005 v_0 := v.Args[0]
26006 b := v.Block
26007
26008
26009 for {
26010 t := v.Type
26011 x := v_0
26012 if v_1.Op != OpConst8 {
26013 break
26014 }
26015 c := auxIntToInt8(v_1.AuxInt)
26016 v.reset(OpRsh32Ux64)
26017 v0 := b.NewValue0(v.Pos, OpConst64, t)
26018 v0.AuxInt = int64ToAuxInt(int64(uint8(c)))
26019 v.AddArg2(x, v0)
26020 return true
26021 }
26022
26023
26024 for {
26025 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
26026 break
26027 }
26028 v.reset(OpConst32)
26029 v.AuxInt = int32ToAuxInt(0)
26030 return true
26031 }
26032 return false
26033 }
26034 func rewriteValuegeneric_OpRsh32x16(v *Value) bool {
26035 v_1 := v.Args[1]
26036 v_0 := v.Args[0]
26037 b := v.Block
26038
26039
26040 for {
26041 t := v.Type
26042 x := v_0
26043 if v_1.Op != OpConst16 {
26044 break
26045 }
26046 c := auxIntToInt16(v_1.AuxInt)
26047 v.reset(OpRsh32x64)
26048 v0 := b.NewValue0(v.Pos, OpConst64, t)
26049 v0.AuxInt = int64ToAuxInt(int64(uint16(c)))
26050 v.AddArg2(x, v0)
26051 return true
26052 }
26053
26054
26055 for {
26056 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
26057 break
26058 }
26059 v.reset(OpConst32)
26060 v.AuxInt = int32ToAuxInt(0)
26061 return true
26062 }
26063 return false
26064 }
26065 func rewriteValuegeneric_OpRsh32x32(v *Value) bool {
26066 v_1 := v.Args[1]
26067 v_0 := v.Args[0]
26068 b := v.Block
26069
26070
26071 for {
26072 t := v.Type
26073 x := v_0
26074 if v_1.Op != OpConst32 {
26075 break
26076 }
26077 c := auxIntToInt32(v_1.AuxInt)
26078 v.reset(OpRsh32x64)
26079 v0 := b.NewValue0(v.Pos, OpConst64, t)
26080 v0.AuxInt = int64ToAuxInt(int64(uint32(c)))
26081 v.AddArg2(x, v0)
26082 return true
26083 }
26084
26085
26086 for {
26087 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
26088 break
26089 }
26090 v.reset(OpConst32)
26091 v.AuxInt = int32ToAuxInt(0)
26092 return true
26093 }
26094 return false
26095 }
26096 func rewriteValuegeneric_OpRsh32x64(v *Value) bool {
26097 v_1 := v.Args[1]
26098 v_0 := v.Args[0]
26099 b := v.Block
26100 typ := &b.Func.Config.Types
26101
26102
26103 for {
26104 if v_0.Op != OpConst32 {
26105 break
26106 }
26107 c := auxIntToInt32(v_0.AuxInt)
26108 if v_1.Op != OpConst64 {
26109 break
26110 }
26111 d := auxIntToInt64(v_1.AuxInt)
26112 v.reset(OpConst32)
26113 v.AuxInt = int32ToAuxInt(c >> uint64(d))
26114 return true
26115 }
26116
26117
26118 for {
26119 x := v_0
26120 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 0 {
26121 break
26122 }
26123 v.copyOf(x)
26124 return true
26125 }
26126
26127
26128 for {
26129 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
26130 break
26131 }
26132 v.reset(OpConst32)
26133 v.AuxInt = int32ToAuxInt(0)
26134 return true
26135 }
26136
26137
26138
26139 for {
26140 t := v.Type
26141 if v_0.Op != OpRsh32x64 {
26142 break
26143 }
26144 _ = v_0.Args[1]
26145 x := v_0.Args[0]
26146 v_0_1 := v_0.Args[1]
26147 if v_0_1.Op != OpConst64 {
26148 break
26149 }
26150 c := auxIntToInt64(v_0_1.AuxInt)
26151 if v_1.Op != OpConst64 {
26152 break
26153 }
26154 d := auxIntToInt64(v_1.AuxInt)
26155 if !(!uaddOvf(c, d)) {
26156 break
26157 }
26158 v.reset(OpRsh32x64)
26159 v0 := b.NewValue0(v.Pos, OpConst64, t)
26160 v0.AuxInt = int64ToAuxInt(c + d)
26161 v.AddArg2(x, v0)
26162 return true
26163 }
26164
26165
26166 for {
26167 if v_0.Op != OpLsh32x64 {
26168 break
26169 }
26170 _ = v_0.Args[1]
26171 x := v_0.Args[0]
26172 v_0_1 := v_0.Args[1]
26173 if v_0_1.Op != OpConst64 || auxIntToInt64(v_0_1.AuxInt) != 24 || v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 24 {
26174 break
26175 }
26176 v.reset(OpSignExt8to32)
26177 v0 := b.NewValue0(v.Pos, OpTrunc32to8, typ.Int8)
26178 v0.AddArg(x)
26179 v.AddArg(v0)
26180 return true
26181 }
26182
26183
26184 for {
26185 if v_0.Op != OpLsh32x64 {
26186 break
26187 }
26188 _ = v_0.Args[1]
26189 x := v_0.Args[0]
26190 v_0_1 := v_0.Args[1]
26191 if v_0_1.Op != OpConst64 || auxIntToInt64(v_0_1.AuxInt) != 16 || v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 16 {
26192 break
26193 }
26194 v.reset(OpSignExt16to32)
26195 v0 := b.NewValue0(v.Pos, OpTrunc32to16, typ.Int16)
26196 v0.AddArg(x)
26197 v.AddArg(v0)
26198 return true
26199 }
26200 return false
26201 }
26202 func rewriteValuegeneric_OpRsh32x8(v *Value) bool {
26203 v_1 := v.Args[1]
26204 v_0 := v.Args[0]
26205 b := v.Block
26206
26207
26208 for {
26209 t := v.Type
26210 x := v_0
26211 if v_1.Op != OpConst8 {
26212 break
26213 }
26214 c := auxIntToInt8(v_1.AuxInt)
26215 v.reset(OpRsh32x64)
26216 v0 := b.NewValue0(v.Pos, OpConst64, t)
26217 v0.AuxInt = int64ToAuxInt(int64(uint8(c)))
26218 v.AddArg2(x, v0)
26219 return true
26220 }
26221
26222
26223 for {
26224 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
26225 break
26226 }
26227 v.reset(OpConst32)
26228 v.AuxInt = int32ToAuxInt(0)
26229 return true
26230 }
26231 return false
26232 }
26233 func rewriteValuegeneric_OpRsh64Ux16(v *Value) bool {
26234 v_1 := v.Args[1]
26235 v_0 := v.Args[0]
26236 b := v.Block
26237
26238
26239 for {
26240 t := v.Type
26241 x := v_0
26242 if v_1.Op != OpConst16 {
26243 break
26244 }
26245 c := auxIntToInt16(v_1.AuxInt)
26246 v.reset(OpRsh64Ux64)
26247 v0 := b.NewValue0(v.Pos, OpConst64, t)
26248 v0.AuxInt = int64ToAuxInt(int64(uint16(c)))
26249 v.AddArg2(x, v0)
26250 return true
26251 }
26252
26253
26254 for {
26255 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
26256 break
26257 }
26258 v.reset(OpConst64)
26259 v.AuxInt = int64ToAuxInt(0)
26260 return true
26261 }
26262 return false
26263 }
26264 func rewriteValuegeneric_OpRsh64Ux32(v *Value) bool {
26265 v_1 := v.Args[1]
26266 v_0 := v.Args[0]
26267 b := v.Block
26268
26269
26270 for {
26271 t := v.Type
26272 x := v_0
26273 if v_1.Op != OpConst32 {
26274 break
26275 }
26276 c := auxIntToInt32(v_1.AuxInt)
26277 v.reset(OpRsh64Ux64)
26278 v0 := b.NewValue0(v.Pos, OpConst64, t)
26279 v0.AuxInt = int64ToAuxInt(int64(uint32(c)))
26280 v.AddArg2(x, v0)
26281 return true
26282 }
26283
26284
26285 for {
26286 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
26287 break
26288 }
26289 v.reset(OpConst64)
26290 v.AuxInt = int64ToAuxInt(0)
26291 return true
26292 }
26293 return false
26294 }
26295 func rewriteValuegeneric_OpRsh64Ux64(v *Value) bool {
26296 v_1 := v.Args[1]
26297 v_0 := v.Args[0]
26298 b := v.Block
26299 typ := &b.Func.Config.Types
26300
26301
26302 for {
26303 if v_0.Op != OpConst64 {
26304 break
26305 }
26306 c := auxIntToInt64(v_0.AuxInt)
26307 if v_1.Op != OpConst64 {
26308 break
26309 }
26310 d := auxIntToInt64(v_1.AuxInt)
26311 v.reset(OpConst64)
26312 v.AuxInt = int64ToAuxInt(int64(uint64(c) >> uint64(d)))
26313 return true
26314 }
26315
26316
26317 for {
26318 x := v_0
26319 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 0 {
26320 break
26321 }
26322 v.copyOf(x)
26323 return true
26324 }
26325
26326
26327 for {
26328 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
26329 break
26330 }
26331 v.reset(OpConst64)
26332 v.AuxInt = int64ToAuxInt(0)
26333 return true
26334 }
26335
26336
26337
26338 for {
26339 if v_1.Op != OpConst64 {
26340 break
26341 }
26342 c := auxIntToInt64(v_1.AuxInt)
26343 if !(uint64(c) >= 64) {
26344 break
26345 }
26346 v.reset(OpConst64)
26347 v.AuxInt = int64ToAuxInt(0)
26348 return true
26349 }
26350
26351
26352
26353 for {
26354 t := v.Type
26355 if v_0.Op != OpRsh64Ux64 {
26356 break
26357 }
26358 _ = v_0.Args[1]
26359 x := v_0.Args[0]
26360 v_0_1 := v_0.Args[1]
26361 if v_0_1.Op != OpConst64 {
26362 break
26363 }
26364 c := auxIntToInt64(v_0_1.AuxInt)
26365 if v_1.Op != OpConst64 {
26366 break
26367 }
26368 d := auxIntToInt64(v_1.AuxInt)
26369 if !(!uaddOvf(c, d)) {
26370 break
26371 }
26372 v.reset(OpRsh64Ux64)
26373 v0 := b.NewValue0(v.Pos, OpConst64, t)
26374 v0.AuxInt = int64ToAuxInt(c + d)
26375 v.AddArg2(x, v0)
26376 return true
26377 }
26378
26379
26380 for {
26381 if v_0.Op != OpRsh64x64 {
26382 break
26383 }
26384 x := v_0.Args[0]
26385 if v_1.Op != OpConst64 {
26386 break
26387 }
26388 t := v_1.Type
26389 if auxIntToInt64(v_1.AuxInt) != 63 {
26390 break
26391 }
26392 v.reset(OpRsh64Ux64)
26393 v0 := b.NewValue0(v.Pos, OpConst64, t)
26394 v0.AuxInt = int64ToAuxInt(63)
26395 v.AddArg2(x, v0)
26396 return true
26397 }
26398
26399
26400
26401 for {
26402 i := v_0
26403 if i.Op != OpLsh64x64 {
26404 break
26405 }
26406 _ = i.Args[1]
26407 x := i.Args[0]
26408 i_1 := i.Args[1]
26409 if i_1.Op != OpConst64 {
26410 break
26411 }
26412 c := auxIntToInt64(i_1.AuxInt)
26413 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != c || !(c >= 0 && c < 64 && i.Uses == 1) {
26414 break
26415 }
26416 v.reset(OpAnd64)
26417 v0 := b.NewValue0(v.Pos, OpConst64, v.Type)
26418 v0.AuxInt = int64ToAuxInt(int64(^uint64(0) >> c))
26419 v.AddArg2(x, v0)
26420 return true
26421 }
26422
26423
26424
26425 for {
26426 if v_0.Op != OpLsh64x64 {
26427 break
26428 }
26429 _ = v_0.Args[1]
26430 v_0_0 := v_0.Args[0]
26431 if v_0_0.Op != OpRsh64Ux64 {
26432 break
26433 }
26434 _ = v_0_0.Args[1]
26435 x := v_0_0.Args[0]
26436 v_0_0_1 := v_0_0.Args[1]
26437 if v_0_0_1.Op != OpConst64 {
26438 break
26439 }
26440 c1 := auxIntToInt64(v_0_0_1.AuxInt)
26441 v_0_1 := v_0.Args[1]
26442 if v_0_1.Op != OpConst64 {
26443 break
26444 }
26445 c2 := auxIntToInt64(v_0_1.AuxInt)
26446 if v_1.Op != OpConst64 {
26447 break
26448 }
26449 c3 := auxIntToInt64(v_1.AuxInt)
26450 if !(uint64(c1) >= uint64(c2) && uint64(c3) >= uint64(c2) && !uaddOvf(c1-c2, c3)) {
26451 break
26452 }
26453 v.reset(OpRsh64Ux64)
26454 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
26455 v0.AuxInt = int64ToAuxInt(c1 - c2 + c3)
26456 v.AddArg2(x, v0)
26457 return true
26458 }
26459
26460
26461 for {
26462 if v_0.Op != OpLsh64x64 {
26463 break
26464 }
26465 _ = v_0.Args[1]
26466 x := v_0.Args[0]
26467 v_0_1 := v_0.Args[1]
26468 if v_0_1.Op != OpConst64 || auxIntToInt64(v_0_1.AuxInt) != 56 || v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 56 {
26469 break
26470 }
26471 v.reset(OpZeroExt8to64)
26472 v0 := b.NewValue0(v.Pos, OpTrunc64to8, typ.UInt8)
26473 v0.AddArg(x)
26474 v.AddArg(v0)
26475 return true
26476 }
26477
26478
26479 for {
26480 if v_0.Op != OpLsh64x64 {
26481 break
26482 }
26483 _ = v_0.Args[1]
26484 x := v_0.Args[0]
26485 v_0_1 := v_0.Args[1]
26486 if v_0_1.Op != OpConst64 || auxIntToInt64(v_0_1.AuxInt) != 48 || v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 48 {
26487 break
26488 }
26489 v.reset(OpZeroExt16to64)
26490 v0 := b.NewValue0(v.Pos, OpTrunc64to16, typ.UInt16)
26491 v0.AddArg(x)
26492 v.AddArg(v0)
26493 return true
26494 }
26495
26496
26497 for {
26498 if v_0.Op != OpLsh64x64 {
26499 break
26500 }
26501 _ = v_0.Args[1]
26502 x := v_0.Args[0]
26503 v_0_1 := v_0.Args[1]
26504 if v_0_1.Op != OpConst64 || auxIntToInt64(v_0_1.AuxInt) != 32 || v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 32 {
26505 break
26506 }
26507 v.reset(OpZeroExt32to64)
26508 v0 := b.NewValue0(v.Pos, OpTrunc64to32, typ.UInt32)
26509 v0.AddArg(x)
26510 v.AddArg(v0)
26511 return true
26512 }
26513 return false
26514 }
26515 func rewriteValuegeneric_OpRsh64Ux8(v *Value) bool {
26516 v_1 := v.Args[1]
26517 v_0 := v.Args[0]
26518 b := v.Block
26519
26520
26521 for {
26522 t := v.Type
26523 x := v_0
26524 if v_1.Op != OpConst8 {
26525 break
26526 }
26527 c := auxIntToInt8(v_1.AuxInt)
26528 v.reset(OpRsh64Ux64)
26529 v0 := b.NewValue0(v.Pos, OpConst64, t)
26530 v0.AuxInt = int64ToAuxInt(int64(uint8(c)))
26531 v.AddArg2(x, v0)
26532 return true
26533 }
26534
26535
26536 for {
26537 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
26538 break
26539 }
26540 v.reset(OpConst64)
26541 v.AuxInt = int64ToAuxInt(0)
26542 return true
26543 }
26544 return false
26545 }
26546 func rewriteValuegeneric_OpRsh64x16(v *Value) bool {
26547 v_1 := v.Args[1]
26548 v_0 := v.Args[0]
26549 b := v.Block
26550
26551
26552 for {
26553 t := v.Type
26554 x := v_0
26555 if v_1.Op != OpConst16 {
26556 break
26557 }
26558 c := auxIntToInt16(v_1.AuxInt)
26559 v.reset(OpRsh64x64)
26560 v0 := b.NewValue0(v.Pos, OpConst64, t)
26561 v0.AuxInt = int64ToAuxInt(int64(uint16(c)))
26562 v.AddArg2(x, v0)
26563 return true
26564 }
26565
26566
26567 for {
26568 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
26569 break
26570 }
26571 v.reset(OpConst64)
26572 v.AuxInt = int64ToAuxInt(0)
26573 return true
26574 }
26575 return false
26576 }
26577 func rewriteValuegeneric_OpRsh64x32(v *Value) bool {
26578 v_1 := v.Args[1]
26579 v_0 := v.Args[0]
26580 b := v.Block
26581
26582
26583 for {
26584 t := v.Type
26585 x := v_0
26586 if v_1.Op != OpConst32 {
26587 break
26588 }
26589 c := auxIntToInt32(v_1.AuxInt)
26590 v.reset(OpRsh64x64)
26591 v0 := b.NewValue0(v.Pos, OpConst64, t)
26592 v0.AuxInt = int64ToAuxInt(int64(uint32(c)))
26593 v.AddArg2(x, v0)
26594 return true
26595 }
26596
26597
26598 for {
26599 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
26600 break
26601 }
26602 v.reset(OpConst64)
26603 v.AuxInt = int64ToAuxInt(0)
26604 return true
26605 }
26606 return false
26607 }
26608 func rewriteValuegeneric_OpRsh64x64(v *Value) bool {
26609 v_1 := v.Args[1]
26610 v_0 := v.Args[0]
26611 b := v.Block
26612 typ := &b.Func.Config.Types
26613
26614
26615 for {
26616 if v_0.Op != OpConst64 {
26617 break
26618 }
26619 c := auxIntToInt64(v_0.AuxInt)
26620 if v_1.Op != OpConst64 {
26621 break
26622 }
26623 d := auxIntToInt64(v_1.AuxInt)
26624 v.reset(OpConst64)
26625 v.AuxInt = int64ToAuxInt(c >> uint64(d))
26626 return true
26627 }
26628
26629
26630 for {
26631 x := v_0
26632 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 0 {
26633 break
26634 }
26635 v.copyOf(x)
26636 return true
26637 }
26638
26639
26640 for {
26641 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
26642 break
26643 }
26644 v.reset(OpConst64)
26645 v.AuxInt = int64ToAuxInt(0)
26646 return true
26647 }
26648
26649
26650
26651 for {
26652 t := v.Type
26653 if v_0.Op != OpRsh64x64 {
26654 break
26655 }
26656 _ = v_0.Args[1]
26657 x := v_0.Args[0]
26658 v_0_1 := v_0.Args[1]
26659 if v_0_1.Op != OpConst64 {
26660 break
26661 }
26662 c := auxIntToInt64(v_0_1.AuxInt)
26663 if v_1.Op != OpConst64 {
26664 break
26665 }
26666 d := auxIntToInt64(v_1.AuxInt)
26667 if !(!uaddOvf(c, d)) {
26668 break
26669 }
26670 v.reset(OpRsh64x64)
26671 v0 := b.NewValue0(v.Pos, OpConst64, t)
26672 v0.AuxInt = int64ToAuxInt(c + d)
26673 v.AddArg2(x, v0)
26674 return true
26675 }
26676
26677
26678 for {
26679 if v_0.Op != OpLsh64x64 {
26680 break
26681 }
26682 _ = v_0.Args[1]
26683 x := v_0.Args[0]
26684 v_0_1 := v_0.Args[1]
26685 if v_0_1.Op != OpConst64 || auxIntToInt64(v_0_1.AuxInt) != 56 || v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 56 {
26686 break
26687 }
26688 v.reset(OpSignExt8to64)
26689 v0 := b.NewValue0(v.Pos, OpTrunc64to8, typ.Int8)
26690 v0.AddArg(x)
26691 v.AddArg(v0)
26692 return true
26693 }
26694
26695
26696 for {
26697 if v_0.Op != OpLsh64x64 {
26698 break
26699 }
26700 _ = v_0.Args[1]
26701 x := v_0.Args[0]
26702 v_0_1 := v_0.Args[1]
26703 if v_0_1.Op != OpConst64 || auxIntToInt64(v_0_1.AuxInt) != 48 || v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 48 {
26704 break
26705 }
26706 v.reset(OpSignExt16to64)
26707 v0 := b.NewValue0(v.Pos, OpTrunc64to16, typ.Int16)
26708 v0.AddArg(x)
26709 v.AddArg(v0)
26710 return true
26711 }
26712
26713
26714 for {
26715 if v_0.Op != OpLsh64x64 {
26716 break
26717 }
26718 _ = v_0.Args[1]
26719 x := v_0.Args[0]
26720 v_0_1 := v_0.Args[1]
26721 if v_0_1.Op != OpConst64 || auxIntToInt64(v_0_1.AuxInt) != 32 || v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 32 {
26722 break
26723 }
26724 v.reset(OpSignExt32to64)
26725 v0 := b.NewValue0(v.Pos, OpTrunc64to32, typ.Int32)
26726 v0.AddArg(x)
26727 v.AddArg(v0)
26728 return true
26729 }
26730 return false
26731 }
26732 func rewriteValuegeneric_OpRsh64x8(v *Value) bool {
26733 v_1 := v.Args[1]
26734 v_0 := v.Args[0]
26735 b := v.Block
26736
26737
26738 for {
26739 t := v.Type
26740 x := v_0
26741 if v_1.Op != OpConst8 {
26742 break
26743 }
26744 c := auxIntToInt8(v_1.AuxInt)
26745 v.reset(OpRsh64x64)
26746 v0 := b.NewValue0(v.Pos, OpConst64, t)
26747 v0.AuxInt = int64ToAuxInt(int64(uint8(c)))
26748 v.AddArg2(x, v0)
26749 return true
26750 }
26751
26752
26753 for {
26754 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
26755 break
26756 }
26757 v.reset(OpConst64)
26758 v.AuxInt = int64ToAuxInt(0)
26759 return true
26760 }
26761 return false
26762 }
26763 func rewriteValuegeneric_OpRsh8Ux16(v *Value) bool {
26764 v_1 := v.Args[1]
26765 v_0 := v.Args[0]
26766 b := v.Block
26767
26768
26769 for {
26770 t := v.Type
26771 x := v_0
26772 if v_1.Op != OpConst16 {
26773 break
26774 }
26775 c := auxIntToInt16(v_1.AuxInt)
26776 v.reset(OpRsh8Ux64)
26777 v0 := b.NewValue0(v.Pos, OpConst64, t)
26778 v0.AuxInt = int64ToAuxInt(int64(uint16(c)))
26779 v.AddArg2(x, v0)
26780 return true
26781 }
26782
26783
26784 for {
26785 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 {
26786 break
26787 }
26788 v.reset(OpConst8)
26789 v.AuxInt = int8ToAuxInt(0)
26790 return true
26791 }
26792 return false
26793 }
26794 func rewriteValuegeneric_OpRsh8Ux32(v *Value) bool {
26795 v_1 := v.Args[1]
26796 v_0 := v.Args[0]
26797 b := v.Block
26798
26799
26800 for {
26801 t := v.Type
26802 x := v_0
26803 if v_1.Op != OpConst32 {
26804 break
26805 }
26806 c := auxIntToInt32(v_1.AuxInt)
26807 v.reset(OpRsh8Ux64)
26808 v0 := b.NewValue0(v.Pos, OpConst64, t)
26809 v0.AuxInt = int64ToAuxInt(int64(uint32(c)))
26810 v.AddArg2(x, v0)
26811 return true
26812 }
26813
26814
26815 for {
26816 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 {
26817 break
26818 }
26819 v.reset(OpConst8)
26820 v.AuxInt = int8ToAuxInt(0)
26821 return true
26822 }
26823 return false
26824 }
26825 func rewriteValuegeneric_OpRsh8Ux64(v *Value) bool {
26826 v_1 := v.Args[1]
26827 v_0 := v.Args[0]
26828 b := v.Block
26829 typ := &b.Func.Config.Types
26830
26831
26832 for {
26833 if v_0.Op != OpConst8 {
26834 break
26835 }
26836 c := auxIntToInt8(v_0.AuxInt)
26837 if v_1.Op != OpConst64 {
26838 break
26839 }
26840 d := auxIntToInt64(v_1.AuxInt)
26841 v.reset(OpConst8)
26842 v.AuxInt = int8ToAuxInt(int8(uint8(c) >> uint64(d)))
26843 return true
26844 }
26845
26846
26847 for {
26848 x := v_0
26849 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 0 {
26850 break
26851 }
26852 v.copyOf(x)
26853 return true
26854 }
26855
26856
26857 for {
26858 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 {
26859 break
26860 }
26861 v.reset(OpConst8)
26862 v.AuxInt = int8ToAuxInt(0)
26863 return true
26864 }
26865
26866
26867
26868 for {
26869 if v_1.Op != OpConst64 {
26870 break
26871 }
26872 c := auxIntToInt64(v_1.AuxInt)
26873 if !(uint64(c) >= 8) {
26874 break
26875 }
26876 v.reset(OpConst8)
26877 v.AuxInt = int8ToAuxInt(0)
26878 return true
26879 }
26880
26881
26882
26883 for {
26884 t := v.Type
26885 if v_0.Op != OpRsh8Ux64 {
26886 break
26887 }
26888 _ = v_0.Args[1]
26889 x := v_0.Args[0]
26890 v_0_1 := v_0.Args[1]
26891 if v_0_1.Op != OpConst64 {
26892 break
26893 }
26894 c := auxIntToInt64(v_0_1.AuxInt)
26895 if v_1.Op != OpConst64 {
26896 break
26897 }
26898 d := auxIntToInt64(v_1.AuxInt)
26899 if !(!uaddOvf(c, d)) {
26900 break
26901 }
26902 v.reset(OpRsh8Ux64)
26903 v0 := b.NewValue0(v.Pos, OpConst64, t)
26904 v0.AuxInt = int64ToAuxInt(c + d)
26905 v.AddArg2(x, v0)
26906 return true
26907 }
26908
26909
26910 for {
26911 if v_0.Op != OpRsh8x64 {
26912 break
26913 }
26914 x := v_0.Args[0]
26915 if v_1.Op != OpConst64 {
26916 break
26917 }
26918 t := v_1.Type
26919 if auxIntToInt64(v_1.AuxInt) != 7 {
26920 break
26921 }
26922 v.reset(OpRsh8Ux64)
26923 v0 := b.NewValue0(v.Pos, OpConst64, t)
26924 v0.AuxInt = int64ToAuxInt(7)
26925 v.AddArg2(x, v0)
26926 return true
26927 }
26928
26929
26930
26931 for {
26932 i := v_0
26933 if i.Op != OpLsh8x64 {
26934 break
26935 }
26936 _ = i.Args[1]
26937 x := i.Args[0]
26938 i_1 := i.Args[1]
26939 if i_1.Op != OpConst64 {
26940 break
26941 }
26942 c := auxIntToInt64(i_1.AuxInt)
26943 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != c || !(c >= 0 && c < 8 && i.Uses == 1) {
26944 break
26945 }
26946 v.reset(OpAnd8)
26947 v0 := b.NewValue0(v.Pos, OpConst8, v.Type)
26948 v0.AuxInt = int8ToAuxInt(int8(^uint8(0) >> c))
26949 v.AddArg2(x, v0)
26950 return true
26951 }
26952
26953
26954
26955 for {
26956 if v_0.Op != OpLsh8x64 {
26957 break
26958 }
26959 _ = v_0.Args[1]
26960 v_0_0 := v_0.Args[0]
26961 if v_0_0.Op != OpRsh8Ux64 {
26962 break
26963 }
26964 _ = v_0_0.Args[1]
26965 x := v_0_0.Args[0]
26966 v_0_0_1 := v_0_0.Args[1]
26967 if v_0_0_1.Op != OpConst64 {
26968 break
26969 }
26970 c1 := auxIntToInt64(v_0_0_1.AuxInt)
26971 v_0_1 := v_0.Args[1]
26972 if v_0_1.Op != OpConst64 {
26973 break
26974 }
26975 c2 := auxIntToInt64(v_0_1.AuxInt)
26976 if v_1.Op != OpConst64 {
26977 break
26978 }
26979 c3 := auxIntToInt64(v_1.AuxInt)
26980 if !(uint64(c1) >= uint64(c2) && uint64(c3) >= uint64(c2) && !uaddOvf(c1-c2, c3)) {
26981 break
26982 }
26983 v.reset(OpRsh8Ux64)
26984 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
26985 v0.AuxInt = int64ToAuxInt(c1 - c2 + c3)
26986 v.AddArg2(x, v0)
26987 return true
26988 }
26989 return false
26990 }
26991 func rewriteValuegeneric_OpRsh8Ux8(v *Value) bool {
26992 v_1 := v.Args[1]
26993 v_0 := v.Args[0]
26994 b := v.Block
26995
26996
26997 for {
26998 t := v.Type
26999 x := v_0
27000 if v_1.Op != OpConst8 {
27001 break
27002 }
27003 c := auxIntToInt8(v_1.AuxInt)
27004 v.reset(OpRsh8Ux64)
27005 v0 := b.NewValue0(v.Pos, OpConst64, t)
27006 v0.AuxInt = int64ToAuxInt(int64(uint8(c)))
27007 v.AddArg2(x, v0)
27008 return true
27009 }
27010
27011
27012 for {
27013 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 {
27014 break
27015 }
27016 v.reset(OpConst8)
27017 v.AuxInt = int8ToAuxInt(0)
27018 return true
27019 }
27020 return false
27021 }
27022 func rewriteValuegeneric_OpRsh8x16(v *Value) bool {
27023 v_1 := v.Args[1]
27024 v_0 := v.Args[0]
27025 b := v.Block
27026
27027
27028 for {
27029 t := v.Type
27030 x := v_0
27031 if v_1.Op != OpConst16 {
27032 break
27033 }
27034 c := auxIntToInt16(v_1.AuxInt)
27035 v.reset(OpRsh8x64)
27036 v0 := b.NewValue0(v.Pos, OpConst64, t)
27037 v0.AuxInt = int64ToAuxInt(int64(uint16(c)))
27038 v.AddArg2(x, v0)
27039 return true
27040 }
27041
27042
27043 for {
27044 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 {
27045 break
27046 }
27047 v.reset(OpConst8)
27048 v.AuxInt = int8ToAuxInt(0)
27049 return true
27050 }
27051 return false
27052 }
27053 func rewriteValuegeneric_OpRsh8x32(v *Value) bool {
27054 v_1 := v.Args[1]
27055 v_0 := v.Args[0]
27056 b := v.Block
27057
27058
27059 for {
27060 t := v.Type
27061 x := v_0
27062 if v_1.Op != OpConst32 {
27063 break
27064 }
27065 c := auxIntToInt32(v_1.AuxInt)
27066 v.reset(OpRsh8x64)
27067 v0 := b.NewValue0(v.Pos, OpConst64, t)
27068 v0.AuxInt = int64ToAuxInt(int64(uint32(c)))
27069 v.AddArg2(x, v0)
27070 return true
27071 }
27072
27073
27074 for {
27075 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 {
27076 break
27077 }
27078 v.reset(OpConst8)
27079 v.AuxInt = int8ToAuxInt(0)
27080 return true
27081 }
27082 return false
27083 }
27084 func rewriteValuegeneric_OpRsh8x64(v *Value) bool {
27085 v_1 := v.Args[1]
27086 v_0 := v.Args[0]
27087 b := v.Block
27088
27089
27090 for {
27091 if v_0.Op != OpConst8 {
27092 break
27093 }
27094 c := auxIntToInt8(v_0.AuxInt)
27095 if v_1.Op != OpConst64 {
27096 break
27097 }
27098 d := auxIntToInt64(v_1.AuxInt)
27099 v.reset(OpConst8)
27100 v.AuxInt = int8ToAuxInt(c >> uint64(d))
27101 return true
27102 }
27103
27104
27105 for {
27106 x := v_0
27107 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 0 {
27108 break
27109 }
27110 v.copyOf(x)
27111 return true
27112 }
27113
27114
27115 for {
27116 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 {
27117 break
27118 }
27119 v.reset(OpConst8)
27120 v.AuxInt = int8ToAuxInt(0)
27121 return true
27122 }
27123
27124
27125
27126 for {
27127 t := v.Type
27128 if v_0.Op != OpRsh8x64 {
27129 break
27130 }
27131 _ = v_0.Args[1]
27132 x := v_0.Args[0]
27133 v_0_1 := v_0.Args[1]
27134 if v_0_1.Op != OpConst64 {
27135 break
27136 }
27137 c := auxIntToInt64(v_0_1.AuxInt)
27138 if v_1.Op != OpConst64 {
27139 break
27140 }
27141 d := auxIntToInt64(v_1.AuxInt)
27142 if !(!uaddOvf(c, d)) {
27143 break
27144 }
27145 v.reset(OpRsh8x64)
27146 v0 := b.NewValue0(v.Pos, OpConst64, t)
27147 v0.AuxInt = int64ToAuxInt(c + d)
27148 v.AddArg2(x, v0)
27149 return true
27150 }
27151 return false
27152 }
27153 func rewriteValuegeneric_OpRsh8x8(v *Value) bool {
27154 v_1 := v.Args[1]
27155 v_0 := v.Args[0]
27156 b := v.Block
27157
27158
27159 for {
27160 t := v.Type
27161 x := v_0
27162 if v_1.Op != OpConst8 {
27163 break
27164 }
27165 c := auxIntToInt8(v_1.AuxInt)
27166 v.reset(OpRsh8x64)
27167 v0 := b.NewValue0(v.Pos, OpConst64, t)
27168 v0.AuxInt = int64ToAuxInt(int64(uint8(c)))
27169 v.AddArg2(x, v0)
27170 return true
27171 }
27172
27173
27174 for {
27175 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 {
27176 break
27177 }
27178 v.reset(OpConst8)
27179 v.AuxInt = int8ToAuxInt(0)
27180 return true
27181 }
27182 return false
27183 }
27184 func rewriteValuegeneric_OpSelect0(v *Value) bool {
27185 v_0 := v.Args[0]
27186
27187
27188 for {
27189 if v_0.Op != OpDiv128u {
27190 break
27191 }
27192 y := v_0.Args[2]
27193 v_0_0 := v_0.Args[0]
27194 if v_0_0.Op != OpConst64 || auxIntToInt64(v_0_0.AuxInt) != 0 {
27195 break
27196 }
27197 lo := v_0.Args[1]
27198 v.reset(OpDiv64u)
27199 v.AddArg2(lo, y)
27200 return true
27201 }
27202
27203
27204 for {
27205 if v_0.Op != OpMul32uover {
27206 break
27207 }
27208 _ = v_0.Args[1]
27209 v_0_0 := v_0.Args[0]
27210 v_0_1 := v_0.Args[1]
27211 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
27212 if v_0_0.Op != OpConst32 || auxIntToInt32(v_0_0.AuxInt) != 1 {
27213 continue
27214 }
27215 x := v_0_1
27216 v.copyOf(x)
27217 return true
27218 }
27219 break
27220 }
27221
27222
27223 for {
27224 if v_0.Op != OpMul64uover {
27225 break
27226 }
27227 _ = v_0.Args[1]
27228 v_0_0 := v_0.Args[0]
27229 v_0_1 := v_0.Args[1]
27230 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
27231 if v_0_0.Op != OpConst64 || auxIntToInt64(v_0_0.AuxInt) != 1 {
27232 continue
27233 }
27234 x := v_0_1
27235 v.copyOf(x)
27236 return true
27237 }
27238 break
27239 }
27240
27241
27242 for {
27243 if v_0.Op != OpMul64uover {
27244 break
27245 }
27246 _ = v_0.Args[1]
27247 v_0_0 := v_0.Args[0]
27248 v_0_1 := v_0.Args[1]
27249 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
27250 if v_0_0.Op != OpConst64 || auxIntToInt64(v_0_0.AuxInt) != 0 {
27251 continue
27252 }
27253 v.reset(OpConst64)
27254 v.AuxInt = int64ToAuxInt(0)
27255 return true
27256 }
27257 break
27258 }
27259
27260
27261 for {
27262 if v_0.Op != OpMul32uover {
27263 break
27264 }
27265 _ = v_0.Args[1]
27266 v_0_0 := v_0.Args[0]
27267 v_0_1 := v_0.Args[1]
27268 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
27269 if v_0_0.Op != OpConst32 || auxIntToInt32(v_0_0.AuxInt) != 0 {
27270 continue
27271 }
27272 v.reset(OpConst32)
27273 v.AuxInt = int32ToAuxInt(0)
27274 return true
27275 }
27276 break
27277 }
27278 return false
27279 }
27280 func rewriteValuegeneric_OpSelect1(v *Value) bool {
27281 v_0 := v.Args[0]
27282
27283
27284 for {
27285 if v_0.Op != OpDiv128u {
27286 break
27287 }
27288 y := v_0.Args[2]
27289 v_0_0 := v_0.Args[0]
27290 if v_0_0.Op != OpConst64 || auxIntToInt64(v_0_0.AuxInt) != 0 {
27291 break
27292 }
27293 lo := v_0.Args[1]
27294 v.reset(OpMod64u)
27295 v.AddArg2(lo, y)
27296 return true
27297 }
27298
27299
27300 for {
27301 if v_0.Op != OpMul32uover {
27302 break
27303 }
27304 _ = v_0.Args[1]
27305 v_0_0 := v_0.Args[0]
27306 v_0_1 := v_0.Args[1]
27307 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
27308 if v_0_0.Op != OpConst32 || auxIntToInt32(v_0_0.AuxInt) != 1 {
27309 continue
27310 }
27311 v.reset(OpConstBool)
27312 v.AuxInt = boolToAuxInt(false)
27313 return true
27314 }
27315 break
27316 }
27317
27318
27319 for {
27320 if v_0.Op != OpMul64uover {
27321 break
27322 }
27323 _ = v_0.Args[1]
27324 v_0_0 := v_0.Args[0]
27325 v_0_1 := v_0.Args[1]
27326 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
27327 if v_0_0.Op != OpConst64 || auxIntToInt64(v_0_0.AuxInt) != 1 {
27328 continue
27329 }
27330 v.reset(OpConstBool)
27331 v.AuxInt = boolToAuxInt(false)
27332 return true
27333 }
27334 break
27335 }
27336
27337
27338 for {
27339 if v_0.Op != OpMul64uover {
27340 break
27341 }
27342 _ = v_0.Args[1]
27343 v_0_0 := v_0.Args[0]
27344 v_0_1 := v_0.Args[1]
27345 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
27346 if v_0_0.Op != OpConst64 || auxIntToInt64(v_0_0.AuxInt) != 0 {
27347 continue
27348 }
27349 v.reset(OpConstBool)
27350 v.AuxInt = boolToAuxInt(false)
27351 return true
27352 }
27353 break
27354 }
27355
27356
27357 for {
27358 if v_0.Op != OpMul32uover {
27359 break
27360 }
27361 _ = v_0.Args[1]
27362 v_0_0 := v_0.Args[0]
27363 v_0_1 := v_0.Args[1]
27364 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
27365 if v_0_0.Op != OpConst32 || auxIntToInt32(v_0_0.AuxInt) != 0 {
27366 continue
27367 }
27368 v.reset(OpConstBool)
27369 v.AuxInt = boolToAuxInt(false)
27370 return true
27371 }
27372 break
27373 }
27374 return false
27375 }
27376 func rewriteValuegeneric_OpSelectN(v *Value) bool {
27377 v_0 := v.Args[0]
27378 b := v.Block
27379 config := b.Func.Config
27380
27381
27382 for {
27383 if auxIntToInt64(v.AuxInt) != 0 || v_0.Op != OpMakeResult || len(v_0.Args) < 1 {
27384 break
27385 }
27386 x := v_0.Args[0]
27387 v.copyOf(x)
27388 return true
27389 }
27390
27391
27392 for {
27393 if auxIntToInt64(v.AuxInt) != 1 || v_0.Op != OpMakeResult || len(v_0.Args) < 2 {
27394 break
27395 }
27396 y := v_0.Args[1]
27397 v.copyOf(y)
27398 return true
27399 }
27400
27401
27402 for {
27403 if auxIntToInt64(v.AuxInt) != 2 || v_0.Op != OpMakeResult || len(v_0.Args) < 3 {
27404 break
27405 }
27406 z := v_0.Args[2]
27407 v.copyOf(z)
27408 return true
27409 }
27410
27411
27412
27413 for {
27414 if auxIntToInt64(v.AuxInt) != 0 {
27415 break
27416 }
27417 call := v_0
27418 if call.Op != OpStaticCall || len(call.Args) != 3 {
27419 break
27420 }
27421 sym := auxToCall(call.Aux)
27422 mem := call.Args[2]
27423 sptr := call.Args[0]
27424 call_1 := call.Args[1]
27425 if call_1.Op != OpConst64 {
27426 break
27427 }
27428 c := auxIntToInt64(call_1.AuxInt)
27429 if !(isInlinableMemclr(config, int64(c)) && isSameCall(sym, "runtime.memclrNoHeapPointers") && call.Uses == 1 && clobber(call)) {
27430 break
27431 }
27432 v.reset(OpZero)
27433 v.AuxInt = int64ToAuxInt(int64(c))
27434 v.Aux = typeToAux(types.Types[types.TUINT8])
27435 v.AddArg2(sptr, mem)
27436 return true
27437 }
27438
27439
27440
27441 for {
27442 if auxIntToInt64(v.AuxInt) != 0 {
27443 break
27444 }
27445 call := v_0
27446 if call.Op != OpStaticCall || len(call.Args) != 3 {
27447 break
27448 }
27449 sym := auxToCall(call.Aux)
27450 mem := call.Args[2]
27451 sptr := call.Args[0]
27452 call_1 := call.Args[1]
27453 if call_1.Op != OpConst32 {
27454 break
27455 }
27456 c := auxIntToInt32(call_1.AuxInt)
27457 if !(isInlinableMemclr(config, int64(c)) && isSameCall(sym, "runtime.memclrNoHeapPointers") && call.Uses == 1 && clobber(call)) {
27458 break
27459 }
27460 v.reset(OpZero)
27461 v.AuxInt = int64ToAuxInt(int64(c))
27462 v.Aux = typeToAux(types.Types[types.TUINT8])
27463 v.AddArg2(sptr, mem)
27464 return true
27465 }
27466
27467
27468
27469 for {
27470 if auxIntToInt64(v.AuxInt) != 0 {
27471 break
27472 }
27473 call := v_0
27474 if call.Op != OpStaticCall || len(call.Args) != 1 {
27475 break
27476 }
27477 sym := auxToCall(call.Aux)
27478 s1 := call.Args[0]
27479 if s1.Op != OpStore {
27480 break
27481 }
27482 _ = s1.Args[2]
27483 s1_1 := s1.Args[1]
27484 if s1_1.Op != OpConst64 {
27485 break
27486 }
27487 sz := auxIntToInt64(s1_1.AuxInt)
27488 s2 := s1.Args[2]
27489 if s2.Op != OpStore {
27490 break
27491 }
27492 _ = s2.Args[2]
27493 src := s2.Args[1]
27494 s3 := s2.Args[2]
27495 if s3.Op != OpStore {
27496 break
27497 }
27498 mem := s3.Args[2]
27499 dst := s3.Args[1]
27500 if !(sz >= 0 && isSameCall(sym, "runtime.memmove") && s1.Uses == 1 && s2.Uses == 1 && s3.Uses == 1 && isInlinableMemmove(dst, src, int64(sz), config) && clobber(s1, s2, s3, call)) {
27501 break
27502 }
27503 v.reset(OpMove)
27504 v.AuxInt = int64ToAuxInt(int64(sz))
27505 v.Aux = typeToAux(types.Types[types.TUINT8])
27506 v.AddArg3(dst, src, mem)
27507 return true
27508 }
27509
27510
27511
27512 for {
27513 if auxIntToInt64(v.AuxInt) != 0 {
27514 break
27515 }
27516 call := v_0
27517 if call.Op != OpStaticCall || len(call.Args) != 1 {
27518 break
27519 }
27520 sym := auxToCall(call.Aux)
27521 s1 := call.Args[0]
27522 if s1.Op != OpStore {
27523 break
27524 }
27525 _ = s1.Args[2]
27526 s1_1 := s1.Args[1]
27527 if s1_1.Op != OpConst32 {
27528 break
27529 }
27530 sz := auxIntToInt32(s1_1.AuxInt)
27531 s2 := s1.Args[2]
27532 if s2.Op != OpStore {
27533 break
27534 }
27535 _ = s2.Args[2]
27536 src := s2.Args[1]
27537 s3 := s2.Args[2]
27538 if s3.Op != OpStore {
27539 break
27540 }
27541 mem := s3.Args[2]
27542 dst := s3.Args[1]
27543 if !(sz >= 0 && isSameCall(sym, "runtime.memmove") && s1.Uses == 1 && s2.Uses == 1 && s3.Uses == 1 && isInlinableMemmove(dst, src, int64(sz), config) && clobber(s1, s2, s3, call)) {
27544 break
27545 }
27546 v.reset(OpMove)
27547 v.AuxInt = int64ToAuxInt(int64(sz))
27548 v.Aux = typeToAux(types.Types[types.TUINT8])
27549 v.AddArg3(dst, src, mem)
27550 return true
27551 }
27552
27553
27554
27555 for {
27556 if auxIntToInt64(v.AuxInt) != 0 {
27557 break
27558 }
27559 call := v_0
27560 if call.Op != OpStaticCall || len(call.Args) != 4 {
27561 break
27562 }
27563 sym := auxToCall(call.Aux)
27564 mem := call.Args[3]
27565 dst := call.Args[0]
27566 src := call.Args[1]
27567 call_2 := call.Args[2]
27568 if call_2.Op != OpConst64 {
27569 break
27570 }
27571 sz := auxIntToInt64(call_2.AuxInt)
27572 if !(sz >= 0 && call.Uses == 1 && isSameCall(sym, "runtime.memmove") && isInlinableMemmove(dst, src, int64(sz), config) && clobber(call)) {
27573 break
27574 }
27575 v.reset(OpMove)
27576 v.AuxInt = int64ToAuxInt(int64(sz))
27577 v.Aux = typeToAux(types.Types[types.TUINT8])
27578 v.AddArg3(dst, src, mem)
27579 return true
27580 }
27581
27582
27583
27584 for {
27585 if auxIntToInt64(v.AuxInt) != 0 {
27586 break
27587 }
27588 call := v_0
27589 if call.Op != OpStaticCall || len(call.Args) != 4 {
27590 break
27591 }
27592 sym := auxToCall(call.Aux)
27593 mem := call.Args[3]
27594 dst := call.Args[0]
27595 src := call.Args[1]
27596 call_2 := call.Args[2]
27597 if call_2.Op != OpConst32 {
27598 break
27599 }
27600 sz := auxIntToInt32(call_2.AuxInt)
27601 if !(sz >= 0 && call.Uses == 1 && isSameCall(sym, "runtime.memmove") && isInlinableMemmove(dst, src, int64(sz), config) && clobber(call)) {
27602 break
27603 }
27604 v.reset(OpMove)
27605 v.AuxInt = int64ToAuxInt(int64(sz))
27606 v.Aux = typeToAux(types.Types[types.TUINT8])
27607 v.AddArg3(dst, src, mem)
27608 return true
27609 }
27610
27611
27612
27613 for {
27614 if auxIntToInt64(v.AuxInt) != 0 {
27615 break
27616 }
27617 call := v_0
27618 if call.Op != OpStaticLECall || len(call.Args) != 4 {
27619 break
27620 }
27621 sym := auxToCall(call.Aux)
27622 mem := call.Args[3]
27623 dst := call.Args[0]
27624 src := call.Args[1]
27625 call_2 := call.Args[2]
27626 if call_2.Op != OpConst64 {
27627 break
27628 }
27629 sz := auxIntToInt64(call_2.AuxInt)
27630 if !(sz >= 0 && call.Uses == 1 && isSameCall(sym, "runtime.memmove") && isInlinableMemmove(dst, src, int64(sz), config) && clobber(call)) {
27631 break
27632 }
27633 v.reset(OpMove)
27634 v.AuxInt = int64ToAuxInt(int64(sz))
27635 v.Aux = typeToAux(types.Types[types.TUINT8])
27636 v.AddArg3(dst, src, mem)
27637 return true
27638 }
27639
27640
27641
27642 for {
27643 if auxIntToInt64(v.AuxInt) != 0 {
27644 break
27645 }
27646 call := v_0
27647 if call.Op != OpStaticLECall || len(call.Args) != 4 {
27648 break
27649 }
27650 sym := auxToCall(call.Aux)
27651 mem := call.Args[3]
27652 dst := call.Args[0]
27653 src := call.Args[1]
27654 call_2 := call.Args[2]
27655 if call_2.Op != OpConst32 {
27656 break
27657 }
27658 sz := auxIntToInt32(call_2.AuxInt)
27659 if !(sz >= 0 && call.Uses == 1 && isSameCall(sym, "runtime.memmove") && isInlinableMemmove(dst, src, int64(sz), config) && clobber(call)) {
27660 break
27661 }
27662 v.reset(OpMove)
27663 v.AuxInt = int64ToAuxInt(int64(sz))
27664 v.Aux = typeToAux(types.Types[types.TUINT8])
27665 v.AddArg3(dst, src, mem)
27666 return true
27667 }
27668
27669
27670
27671 for {
27672 if auxIntToInt64(v.AuxInt) != 0 {
27673 break
27674 }
27675 call := v_0
27676 if call.Op != OpStaticLECall || len(call.Args) != 2 {
27677 break
27678 }
27679 sym := auxToCall(call.Aux)
27680 x := call.Args[1]
27681 if !(needRaceCleanup(sym, call) && clobber(call)) {
27682 break
27683 }
27684 v.copyOf(x)
27685 return true
27686 }
27687
27688
27689
27690 for {
27691 if auxIntToInt64(v.AuxInt) != 0 {
27692 break
27693 }
27694 call := v_0
27695 if call.Op != OpStaticLECall || len(call.Args) != 1 {
27696 break
27697 }
27698 sym := auxToCall(call.Aux)
27699 x := call.Args[0]
27700 if !(needRaceCleanup(sym, call) && clobber(call)) {
27701 break
27702 }
27703 v.copyOf(x)
27704 return true
27705 }
27706
27707
27708
27709 for {
27710 if auxIntToInt64(v.AuxInt) != 1 || v_0.Op != OpStaticCall || len(v_0.Args) != 6 {
27711 break
27712 }
27713 sym := auxToCall(v_0.Aux)
27714 _ = v_0.Args[1]
27715 newLen := v_0.Args[1]
27716 if newLen.Op != OpConst64 || !(v.Type.IsInteger() && isSameCall(sym, "runtime.growslice")) {
27717 break
27718 }
27719 v.copyOf(newLen)
27720 return true
27721 }
27722
27723
27724
27725 for {
27726 if auxIntToInt64(v.AuxInt) != 1 || v_0.Op != OpStaticCall || len(v_0.Args) != 6 {
27727 break
27728 }
27729 sym := auxToCall(v_0.Aux)
27730 _ = v_0.Args[1]
27731 newLen := v_0.Args[1]
27732 if newLen.Op != OpConst32 || !(v.Type.IsInteger() && isSameCall(sym, "runtime.growslice")) {
27733 break
27734 }
27735 v.copyOf(newLen)
27736 return true
27737 }
27738 return false
27739 }
27740 func rewriteValuegeneric_OpSignExt16to32(v *Value) bool {
27741 v_0 := v.Args[0]
27742
27743
27744 for {
27745 if v_0.Op != OpConst16 {
27746 break
27747 }
27748 c := auxIntToInt16(v_0.AuxInt)
27749 v.reset(OpConst32)
27750 v.AuxInt = int32ToAuxInt(int32(c))
27751 return true
27752 }
27753
27754
27755
27756 for {
27757 if v_0.Op != OpTrunc32to16 {
27758 break
27759 }
27760 x := v_0.Args[0]
27761 if x.Op != OpRsh32x64 {
27762 break
27763 }
27764 _ = x.Args[1]
27765 x_1 := x.Args[1]
27766 if x_1.Op != OpConst64 {
27767 break
27768 }
27769 s := auxIntToInt64(x_1.AuxInt)
27770 if !(s >= 16) {
27771 break
27772 }
27773 v.copyOf(x)
27774 return true
27775 }
27776 return false
27777 }
27778 func rewriteValuegeneric_OpSignExt16to64(v *Value) bool {
27779 v_0 := v.Args[0]
27780
27781
27782 for {
27783 if v_0.Op != OpConst16 {
27784 break
27785 }
27786 c := auxIntToInt16(v_0.AuxInt)
27787 v.reset(OpConst64)
27788 v.AuxInt = int64ToAuxInt(int64(c))
27789 return true
27790 }
27791
27792
27793
27794 for {
27795 if v_0.Op != OpTrunc64to16 {
27796 break
27797 }
27798 x := v_0.Args[0]
27799 if x.Op != OpRsh64x64 {
27800 break
27801 }
27802 _ = x.Args[1]
27803 x_1 := x.Args[1]
27804 if x_1.Op != OpConst64 {
27805 break
27806 }
27807 s := auxIntToInt64(x_1.AuxInt)
27808 if !(s >= 48) {
27809 break
27810 }
27811 v.copyOf(x)
27812 return true
27813 }
27814 return false
27815 }
27816 func rewriteValuegeneric_OpSignExt32to64(v *Value) bool {
27817 v_0 := v.Args[0]
27818
27819
27820 for {
27821 if v_0.Op != OpConst32 {
27822 break
27823 }
27824 c := auxIntToInt32(v_0.AuxInt)
27825 v.reset(OpConst64)
27826 v.AuxInt = int64ToAuxInt(int64(c))
27827 return true
27828 }
27829
27830
27831
27832 for {
27833 if v_0.Op != OpTrunc64to32 {
27834 break
27835 }
27836 x := v_0.Args[0]
27837 if x.Op != OpRsh64x64 {
27838 break
27839 }
27840 _ = x.Args[1]
27841 x_1 := x.Args[1]
27842 if x_1.Op != OpConst64 {
27843 break
27844 }
27845 s := auxIntToInt64(x_1.AuxInt)
27846 if !(s >= 32) {
27847 break
27848 }
27849 v.copyOf(x)
27850 return true
27851 }
27852 return false
27853 }
27854 func rewriteValuegeneric_OpSignExt8to16(v *Value) bool {
27855 v_0 := v.Args[0]
27856
27857
27858 for {
27859 if v_0.Op != OpConst8 {
27860 break
27861 }
27862 c := auxIntToInt8(v_0.AuxInt)
27863 v.reset(OpConst16)
27864 v.AuxInt = int16ToAuxInt(int16(c))
27865 return true
27866 }
27867
27868
27869
27870 for {
27871 if v_0.Op != OpTrunc16to8 {
27872 break
27873 }
27874 x := v_0.Args[0]
27875 if x.Op != OpRsh16x64 {
27876 break
27877 }
27878 _ = x.Args[1]
27879 x_1 := x.Args[1]
27880 if x_1.Op != OpConst64 {
27881 break
27882 }
27883 s := auxIntToInt64(x_1.AuxInt)
27884 if !(s >= 8) {
27885 break
27886 }
27887 v.copyOf(x)
27888 return true
27889 }
27890 return false
27891 }
27892 func rewriteValuegeneric_OpSignExt8to32(v *Value) bool {
27893 v_0 := v.Args[0]
27894
27895
27896 for {
27897 if v_0.Op != OpConst8 {
27898 break
27899 }
27900 c := auxIntToInt8(v_0.AuxInt)
27901 v.reset(OpConst32)
27902 v.AuxInt = int32ToAuxInt(int32(c))
27903 return true
27904 }
27905
27906
27907
27908 for {
27909 if v_0.Op != OpTrunc32to8 {
27910 break
27911 }
27912 x := v_0.Args[0]
27913 if x.Op != OpRsh32x64 {
27914 break
27915 }
27916 _ = x.Args[1]
27917 x_1 := x.Args[1]
27918 if x_1.Op != OpConst64 {
27919 break
27920 }
27921 s := auxIntToInt64(x_1.AuxInt)
27922 if !(s >= 24) {
27923 break
27924 }
27925 v.copyOf(x)
27926 return true
27927 }
27928 return false
27929 }
27930 func rewriteValuegeneric_OpSignExt8to64(v *Value) bool {
27931 v_0 := v.Args[0]
27932
27933
27934 for {
27935 if v_0.Op != OpConst8 {
27936 break
27937 }
27938 c := auxIntToInt8(v_0.AuxInt)
27939 v.reset(OpConst64)
27940 v.AuxInt = int64ToAuxInt(int64(c))
27941 return true
27942 }
27943
27944
27945
27946 for {
27947 if v_0.Op != OpTrunc64to8 {
27948 break
27949 }
27950 x := v_0.Args[0]
27951 if x.Op != OpRsh64x64 {
27952 break
27953 }
27954 _ = x.Args[1]
27955 x_1 := x.Args[1]
27956 if x_1.Op != OpConst64 {
27957 break
27958 }
27959 s := auxIntToInt64(x_1.AuxInt)
27960 if !(s >= 56) {
27961 break
27962 }
27963 v.copyOf(x)
27964 return true
27965 }
27966 return false
27967 }
27968 func rewriteValuegeneric_OpSliceCap(v *Value) bool {
27969 v_0 := v.Args[0]
27970
27971
27972 for {
27973 if v_0.Op != OpSliceMake {
27974 break
27975 }
27976 _ = v_0.Args[2]
27977 v_0_2 := v_0.Args[2]
27978 if v_0_2.Op != OpConst64 {
27979 break
27980 }
27981 t := v_0_2.Type
27982 c := auxIntToInt64(v_0_2.AuxInt)
27983 v.reset(OpConst64)
27984 v.Type = t
27985 v.AuxInt = int64ToAuxInt(c)
27986 return true
27987 }
27988
27989
27990 for {
27991 if v_0.Op != OpSliceMake {
27992 break
27993 }
27994 _ = v_0.Args[2]
27995 v_0_2 := v_0.Args[2]
27996 if v_0_2.Op != OpConst32 {
27997 break
27998 }
27999 t := v_0_2.Type
28000 c := auxIntToInt32(v_0_2.AuxInt)
28001 v.reset(OpConst32)
28002 v.Type = t
28003 v.AuxInt = int32ToAuxInt(c)
28004 return true
28005 }
28006
28007
28008 for {
28009 if v_0.Op != OpSliceMake {
28010 break
28011 }
28012 _ = v_0.Args[2]
28013 v_0_2 := v_0.Args[2]
28014 if v_0_2.Op != OpSliceCap {
28015 break
28016 }
28017 x := v_0_2.Args[0]
28018 v.reset(OpSliceCap)
28019 v.AddArg(x)
28020 return true
28021 }
28022
28023
28024 for {
28025 if v_0.Op != OpSliceMake {
28026 break
28027 }
28028 _ = v_0.Args[2]
28029 v_0_2 := v_0.Args[2]
28030 if v_0_2.Op != OpSliceLen {
28031 break
28032 }
28033 x := v_0_2.Args[0]
28034 v.reset(OpSliceLen)
28035 v.AddArg(x)
28036 return true
28037 }
28038 return false
28039 }
28040 func rewriteValuegeneric_OpSliceLen(v *Value) bool {
28041 v_0 := v.Args[0]
28042
28043
28044 for {
28045 if v_0.Op != OpSliceMake {
28046 break
28047 }
28048 _ = v_0.Args[1]
28049 v_0_1 := v_0.Args[1]
28050 if v_0_1.Op != OpConst64 {
28051 break
28052 }
28053 t := v_0_1.Type
28054 c := auxIntToInt64(v_0_1.AuxInt)
28055 v.reset(OpConst64)
28056 v.Type = t
28057 v.AuxInt = int64ToAuxInt(c)
28058 return true
28059 }
28060
28061
28062 for {
28063 if v_0.Op != OpSliceMake {
28064 break
28065 }
28066 _ = v_0.Args[1]
28067 v_0_1 := v_0.Args[1]
28068 if v_0_1.Op != OpConst32 {
28069 break
28070 }
28071 t := v_0_1.Type
28072 c := auxIntToInt32(v_0_1.AuxInt)
28073 v.reset(OpConst32)
28074 v.Type = t
28075 v.AuxInt = int32ToAuxInt(c)
28076 return true
28077 }
28078
28079
28080 for {
28081 if v_0.Op != OpSliceMake {
28082 break
28083 }
28084 _ = v_0.Args[1]
28085 v_0_1 := v_0.Args[1]
28086 if v_0_1.Op != OpSliceLen {
28087 break
28088 }
28089 x := v_0_1.Args[0]
28090 v.reset(OpSliceLen)
28091 v.AddArg(x)
28092 return true
28093 }
28094
28095
28096
28097 for {
28098 if v_0.Op != OpSelectN || auxIntToInt64(v_0.AuxInt) != 0 {
28099 break
28100 }
28101 v_0_0 := v_0.Args[0]
28102 if v_0_0.Op != OpStaticLECall || len(v_0_0.Args) != 6 {
28103 break
28104 }
28105 sym := auxToCall(v_0_0.Aux)
28106 _ = v_0_0.Args[1]
28107 newLen := v_0_0.Args[1]
28108 if newLen.Op != OpConst64 || !(isSameCall(sym, "runtime.growslice")) {
28109 break
28110 }
28111 v.copyOf(newLen)
28112 return true
28113 }
28114
28115
28116
28117 for {
28118 if v_0.Op != OpSelectN || auxIntToInt64(v_0.AuxInt) != 0 {
28119 break
28120 }
28121 v_0_0 := v_0.Args[0]
28122 if v_0_0.Op != OpStaticLECall || len(v_0_0.Args) != 6 {
28123 break
28124 }
28125 sym := auxToCall(v_0_0.Aux)
28126 _ = v_0_0.Args[1]
28127 newLen := v_0_0.Args[1]
28128 if newLen.Op != OpConst32 || !(isSameCall(sym, "runtime.growslice")) {
28129 break
28130 }
28131 v.copyOf(newLen)
28132 return true
28133 }
28134 return false
28135 }
28136 func rewriteValuegeneric_OpSlicePtr(v *Value) bool {
28137 v_0 := v.Args[0]
28138
28139
28140 for {
28141 if v_0.Op != OpSliceMake {
28142 break
28143 }
28144 v_0_0 := v_0.Args[0]
28145 if v_0_0.Op != OpSlicePtr {
28146 break
28147 }
28148 x := v_0_0.Args[0]
28149 v.reset(OpSlicePtr)
28150 v.AddArg(x)
28151 return true
28152 }
28153 return false
28154 }
28155 func rewriteValuegeneric_OpSlicemask(v *Value) bool {
28156 v_0 := v.Args[0]
28157
28158
28159
28160 for {
28161 if v_0.Op != OpConst32 {
28162 break
28163 }
28164 x := auxIntToInt32(v_0.AuxInt)
28165 if !(x > 0) {
28166 break
28167 }
28168 v.reset(OpConst32)
28169 v.AuxInt = int32ToAuxInt(-1)
28170 return true
28171 }
28172
28173
28174 for {
28175 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
28176 break
28177 }
28178 v.reset(OpConst32)
28179 v.AuxInt = int32ToAuxInt(0)
28180 return true
28181 }
28182
28183
28184
28185 for {
28186 if v_0.Op != OpConst64 {
28187 break
28188 }
28189 x := auxIntToInt64(v_0.AuxInt)
28190 if !(x > 0) {
28191 break
28192 }
28193 v.reset(OpConst64)
28194 v.AuxInt = int64ToAuxInt(-1)
28195 return true
28196 }
28197
28198
28199 for {
28200 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
28201 break
28202 }
28203 v.reset(OpConst64)
28204 v.AuxInt = int64ToAuxInt(0)
28205 return true
28206 }
28207 return false
28208 }
28209 func rewriteValuegeneric_OpSqrt(v *Value) bool {
28210 v_0 := v.Args[0]
28211
28212
28213
28214 for {
28215 if v_0.Op != OpConst64F {
28216 break
28217 }
28218 c := auxIntToFloat64(v_0.AuxInt)
28219 if !(!math.IsNaN(math.Sqrt(c))) {
28220 break
28221 }
28222 v.reset(OpConst64F)
28223 v.AuxInt = float64ToAuxInt(math.Sqrt(c))
28224 return true
28225 }
28226 return false
28227 }
28228 func rewriteValuegeneric_OpStaticCall(v *Value) bool {
28229 b := v.Block
28230 typ := &b.Func.Config.Types
28231
28232
28233
28234 for {
28235 if len(v.Args) != 4 {
28236 break
28237 }
28238 callAux := auxToCall(v.Aux)
28239 mem := v.Args[3]
28240 p := v.Args[0]
28241 q := v.Args[1]
28242 if !(isSameCall(callAux, "runtime.memequal") && isSamePtr(p, q)) {
28243 break
28244 }
28245 v.reset(OpMakeResult)
28246 v0 := b.NewValue0(v.Pos, OpConstBool, typ.Bool)
28247 v0.AuxInt = boolToAuxInt(true)
28248 v.AddArg2(v0, mem)
28249 return true
28250 }
28251 return false
28252 }
28253 func rewriteValuegeneric_OpStaticLECall(v *Value) bool {
28254 b := v.Block
28255 config := b.Func.Config
28256 typ := &b.Func.Config.Types
28257
28258
28259
28260 for {
28261 if len(v.Args) != 4 {
28262 break
28263 }
28264 callAux := auxToCall(v.Aux)
28265 mem := v.Args[3]
28266 sptr := v.Args[0]
28267 v_1 := v.Args[1]
28268 if v_1.Op != OpAddr {
28269 break
28270 }
28271 scon := auxToSym(v_1.Aux)
28272 v_1_0 := v_1.Args[0]
28273 if v_1_0.Op != OpSB {
28274 break
28275 }
28276 v_2 := v.Args[2]
28277 if v_2.Op != OpConst64 || auxIntToInt64(v_2.AuxInt) != 1 || !(isSameCall(callAux, "runtime.memequal") && symIsRO(scon)) {
28278 break
28279 }
28280 v.reset(OpMakeResult)
28281 v0 := b.NewValue0(v.Pos, OpEq8, typ.Bool)
28282 v1 := b.NewValue0(v.Pos, OpLoad, typ.Int8)
28283 v1.AddArg2(sptr, mem)
28284 v2 := b.NewValue0(v.Pos, OpConst8, typ.Int8)
28285 v2.AuxInt = int8ToAuxInt(int8(read8(scon, 0)))
28286 v0.AddArg2(v1, v2)
28287 v.AddArg2(v0, mem)
28288 return true
28289 }
28290
28291
28292
28293 for {
28294 if len(v.Args) != 4 {
28295 break
28296 }
28297 callAux := auxToCall(v.Aux)
28298 mem := v.Args[3]
28299 v_0 := v.Args[0]
28300 if v_0.Op != OpAddr {
28301 break
28302 }
28303 scon := auxToSym(v_0.Aux)
28304 v_0_0 := v_0.Args[0]
28305 if v_0_0.Op != OpSB {
28306 break
28307 }
28308 sptr := v.Args[1]
28309 v_2 := v.Args[2]
28310 if v_2.Op != OpConst64 || auxIntToInt64(v_2.AuxInt) != 1 || !(isSameCall(callAux, "runtime.memequal") && symIsRO(scon)) {
28311 break
28312 }
28313 v.reset(OpMakeResult)
28314 v0 := b.NewValue0(v.Pos, OpEq8, typ.Bool)
28315 v1 := b.NewValue0(v.Pos, OpLoad, typ.Int8)
28316 v1.AddArg2(sptr, mem)
28317 v2 := b.NewValue0(v.Pos, OpConst8, typ.Int8)
28318 v2.AuxInt = int8ToAuxInt(int8(read8(scon, 0)))
28319 v0.AddArg2(v1, v2)
28320 v.AddArg2(v0, mem)
28321 return true
28322 }
28323
28324
28325
28326 for {
28327 if len(v.Args) != 4 {
28328 break
28329 }
28330 callAux := auxToCall(v.Aux)
28331 mem := v.Args[3]
28332 sptr := v.Args[0]
28333 v_1 := v.Args[1]
28334 if v_1.Op != OpAddr {
28335 break
28336 }
28337 scon := auxToSym(v_1.Aux)
28338 v_1_0 := v_1.Args[0]
28339 if v_1_0.Op != OpSB {
28340 break
28341 }
28342 v_2 := v.Args[2]
28343 if v_2.Op != OpConst64 || auxIntToInt64(v_2.AuxInt) != 2 || !(isSameCall(callAux, "runtime.memequal") && symIsRO(scon) && canLoadUnaligned(config)) {
28344 break
28345 }
28346 v.reset(OpMakeResult)
28347 v0 := b.NewValue0(v.Pos, OpEq16, typ.Bool)
28348 v1 := b.NewValue0(v.Pos, OpLoad, typ.Int16)
28349 v1.AddArg2(sptr, mem)
28350 v2 := b.NewValue0(v.Pos, OpConst16, typ.Int16)
28351 v2.AuxInt = int16ToAuxInt(int16(read16(scon, 0, config.ctxt.Arch.ByteOrder)))
28352 v0.AddArg2(v1, v2)
28353 v.AddArg2(v0, mem)
28354 return true
28355 }
28356
28357
28358
28359 for {
28360 if len(v.Args) != 4 {
28361 break
28362 }
28363 callAux := auxToCall(v.Aux)
28364 mem := v.Args[3]
28365 v_0 := v.Args[0]
28366 if v_0.Op != OpAddr {
28367 break
28368 }
28369 scon := auxToSym(v_0.Aux)
28370 v_0_0 := v_0.Args[0]
28371 if v_0_0.Op != OpSB {
28372 break
28373 }
28374 sptr := v.Args[1]
28375 v_2 := v.Args[2]
28376 if v_2.Op != OpConst64 || auxIntToInt64(v_2.AuxInt) != 2 || !(isSameCall(callAux, "runtime.memequal") && symIsRO(scon) && canLoadUnaligned(config)) {
28377 break
28378 }
28379 v.reset(OpMakeResult)
28380 v0 := b.NewValue0(v.Pos, OpEq16, typ.Bool)
28381 v1 := b.NewValue0(v.Pos, OpLoad, typ.Int16)
28382 v1.AddArg2(sptr, mem)
28383 v2 := b.NewValue0(v.Pos, OpConst16, typ.Int16)
28384 v2.AuxInt = int16ToAuxInt(int16(read16(scon, 0, config.ctxt.Arch.ByteOrder)))
28385 v0.AddArg2(v1, v2)
28386 v.AddArg2(v0, mem)
28387 return true
28388 }
28389
28390
28391
28392 for {
28393 if len(v.Args) != 4 {
28394 break
28395 }
28396 callAux := auxToCall(v.Aux)
28397 mem := v.Args[3]
28398 sptr := v.Args[0]
28399 v_1 := v.Args[1]
28400 if v_1.Op != OpAddr {
28401 break
28402 }
28403 scon := auxToSym(v_1.Aux)
28404 v_1_0 := v_1.Args[0]
28405 if v_1_0.Op != OpSB {
28406 break
28407 }
28408 v_2 := v.Args[2]
28409 if v_2.Op != OpConst64 || auxIntToInt64(v_2.AuxInt) != 4 || !(isSameCall(callAux, "runtime.memequal") && symIsRO(scon) && canLoadUnaligned(config)) {
28410 break
28411 }
28412 v.reset(OpMakeResult)
28413 v0 := b.NewValue0(v.Pos, OpEq32, typ.Bool)
28414 v1 := b.NewValue0(v.Pos, OpLoad, typ.Int32)
28415 v1.AddArg2(sptr, mem)
28416 v2 := b.NewValue0(v.Pos, OpConst32, typ.Int32)
28417 v2.AuxInt = int32ToAuxInt(int32(read32(scon, 0, config.ctxt.Arch.ByteOrder)))
28418 v0.AddArg2(v1, v2)
28419 v.AddArg2(v0, mem)
28420 return true
28421 }
28422
28423
28424
28425 for {
28426 if len(v.Args) != 4 {
28427 break
28428 }
28429 callAux := auxToCall(v.Aux)
28430 mem := v.Args[3]
28431 v_0 := v.Args[0]
28432 if v_0.Op != OpAddr {
28433 break
28434 }
28435 scon := auxToSym(v_0.Aux)
28436 v_0_0 := v_0.Args[0]
28437 if v_0_0.Op != OpSB {
28438 break
28439 }
28440 sptr := v.Args[1]
28441 v_2 := v.Args[2]
28442 if v_2.Op != OpConst64 || auxIntToInt64(v_2.AuxInt) != 4 || !(isSameCall(callAux, "runtime.memequal") && symIsRO(scon) && canLoadUnaligned(config)) {
28443 break
28444 }
28445 v.reset(OpMakeResult)
28446 v0 := b.NewValue0(v.Pos, OpEq32, typ.Bool)
28447 v1 := b.NewValue0(v.Pos, OpLoad, typ.Int32)
28448 v1.AddArg2(sptr, mem)
28449 v2 := b.NewValue0(v.Pos, OpConst32, typ.Int32)
28450 v2.AuxInt = int32ToAuxInt(int32(read32(scon, 0, config.ctxt.Arch.ByteOrder)))
28451 v0.AddArg2(v1, v2)
28452 v.AddArg2(v0, mem)
28453 return true
28454 }
28455
28456
28457
28458 for {
28459 if len(v.Args) != 4 {
28460 break
28461 }
28462 callAux := auxToCall(v.Aux)
28463 mem := v.Args[3]
28464 sptr := v.Args[0]
28465 v_1 := v.Args[1]
28466 if v_1.Op != OpAddr {
28467 break
28468 }
28469 scon := auxToSym(v_1.Aux)
28470 v_1_0 := v_1.Args[0]
28471 if v_1_0.Op != OpSB {
28472 break
28473 }
28474 v_2 := v.Args[2]
28475 if v_2.Op != OpConst64 || auxIntToInt64(v_2.AuxInt) != 8 || !(isSameCall(callAux, "runtime.memequal") && symIsRO(scon) && canLoadUnaligned(config) && config.PtrSize == 8) {
28476 break
28477 }
28478 v.reset(OpMakeResult)
28479 v0 := b.NewValue0(v.Pos, OpEq64, typ.Bool)
28480 v1 := b.NewValue0(v.Pos, OpLoad, typ.Int64)
28481 v1.AddArg2(sptr, mem)
28482 v2 := b.NewValue0(v.Pos, OpConst64, typ.Int64)
28483 v2.AuxInt = int64ToAuxInt(int64(read64(scon, 0, config.ctxt.Arch.ByteOrder)))
28484 v0.AddArg2(v1, v2)
28485 v.AddArg2(v0, mem)
28486 return true
28487 }
28488
28489
28490
28491 for {
28492 if len(v.Args) != 4 {
28493 break
28494 }
28495 callAux := auxToCall(v.Aux)
28496 mem := v.Args[3]
28497 v_0 := v.Args[0]
28498 if v_0.Op != OpAddr {
28499 break
28500 }
28501 scon := auxToSym(v_0.Aux)
28502 v_0_0 := v_0.Args[0]
28503 if v_0_0.Op != OpSB {
28504 break
28505 }
28506 sptr := v.Args[1]
28507 v_2 := v.Args[2]
28508 if v_2.Op != OpConst64 || auxIntToInt64(v_2.AuxInt) != 8 || !(isSameCall(callAux, "runtime.memequal") && symIsRO(scon) && canLoadUnaligned(config) && config.PtrSize == 8) {
28509 break
28510 }
28511 v.reset(OpMakeResult)
28512 v0 := b.NewValue0(v.Pos, OpEq64, typ.Bool)
28513 v1 := b.NewValue0(v.Pos, OpLoad, typ.Int64)
28514 v1.AddArg2(sptr, mem)
28515 v2 := b.NewValue0(v.Pos, OpConst64, typ.Int64)
28516 v2.AuxInt = int64ToAuxInt(int64(read64(scon, 0, config.ctxt.Arch.ByteOrder)))
28517 v0.AddArg2(v1, v2)
28518 v.AddArg2(v0, mem)
28519 return true
28520 }
28521
28522
28523
28524 for {
28525 if len(v.Args) != 4 {
28526 break
28527 }
28528 callAux := auxToCall(v.Aux)
28529 mem := v.Args[3]
28530 v_2 := v.Args[2]
28531 if v_2.Op != OpConst64 || auxIntToInt64(v_2.AuxInt) != 0 || !(isSameCall(callAux, "runtime.memequal")) {
28532 break
28533 }
28534 v.reset(OpMakeResult)
28535 v0 := b.NewValue0(v.Pos, OpConstBool, typ.Bool)
28536 v0.AuxInt = boolToAuxInt(true)
28537 v.AddArg2(v0, mem)
28538 return true
28539 }
28540
28541
28542
28543 for {
28544 if len(v.Args) != 4 {
28545 break
28546 }
28547 callAux := auxToCall(v.Aux)
28548 mem := v.Args[3]
28549 p := v.Args[0]
28550 q := v.Args[1]
28551 if !(isSameCall(callAux, "runtime.memequal") && isSamePtr(p, q)) {
28552 break
28553 }
28554 v.reset(OpMakeResult)
28555 v0 := b.NewValue0(v.Pos, OpConstBool, typ.Bool)
28556 v0.AuxInt = boolToAuxInt(true)
28557 v.AddArg2(v0, mem)
28558 return true
28559 }
28560
28561
28562
28563 for {
28564 if len(v.Args) != 4 {
28565 break
28566 }
28567 callAux := auxToCall(v.Aux)
28568 mem := v.Args[3]
28569 v_1 := v.Args[1]
28570 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 0 {
28571 break
28572 }
28573 v_2 := v.Args[2]
28574 if v_2.Op != OpConst64 || auxIntToInt64(v_2.AuxInt) != 0 || !(isSameCall(callAux, "runtime.makeslice")) {
28575 break
28576 }
28577 v.reset(OpMakeResult)
28578 v0 := b.NewValue0(v.Pos, OpAddr, v.Type.FieldType(0))
28579 v0.Aux = symToAux(ir.Syms.Zerobase)
28580 v1 := b.NewValue0(v.Pos, OpSB, typ.Uintptr)
28581 v0.AddArg(v1)
28582 v.AddArg2(v0, mem)
28583 return true
28584 }
28585
28586
28587
28588 for {
28589 if len(v.Args) != 4 {
28590 break
28591 }
28592 callAux := auxToCall(v.Aux)
28593 mem := v.Args[3]
28594 v_1 := v.Args[1]
28595 if v_1.Op != OpConst32 || auxIntToInt32(v_1.AuxInt) != 0 {
28596 break
28597 }
28598 v_2 := v.Args[2]
28599 if v_2.Op != OpConst32 || auxIntToInt32(v_2.AuxInt) != 0 || !(isSameCall(callAux, "runtime.makeslice")) {
28600 break
28601 }
28602 v.reset(OpMakeResult)
28603 v0 := b.NewValue0(v.Pos, OpAddr, v.Type.FieldType(0))
28604 v0.Aux = symToAux(ir.Syms.Zerobase)
28605 v1 := b.NewValue0(v.Pos, OpSB, typ.Uintptr)
28606 v0.AddArg(v1)
28607 v.AddArg2(v0, mem)
28608 return true
28609 }
28610 return false
28611 }
28612 func rewriteValuegeneric_OpStore(v *Value) bool {
28613 v_2 := v.Args[2]
28614 v_1 := v.Args[1]
28615 v_0 := v.Args[0]
28616 b := v.Block
28617
28618
28619
28620 for {
28621 t1 := auxToType(v.Aux)
28622 p1 := v_0
28623 if v_1.Op != OpLoad {
28624 break
28625 }
28626 t2 := v_1.Type
28627 mem := v_1.Args[1]
28628 p2 := v_1.Args[0]
28629 if mem != v_2 || !(isSamePtr(p1, p2) && t2.Size() == t1.Size()) {
28630 break
28631 }
28632 v.copyOf(mem)
28633 return true
28634 }
28635
28636
28637
28638 for {
28639 t1 := auxToType(v.Aux)
28640 p1 := v_0
28641 if v_1.Op != OpLoad {
28642 break
28643 }
28644 t2 := v_1.Type
28645 oldmem := v_1.Args[1]
28646 p2 := v_1.Args[0]
28647 mem := v_2
28648 if mem.Op != OpStore {
28649 break
28650 }
28651 t3 := auxToType(mem.Aux)
28652 _ = mem.Args[2]
28653 p3 := mem.Args[0]
28654 if oldmem != mem.Args[2] || !(isSamePtr(p1, p2) && t2.Size() == t1.Size() && disjoint(p1, t1.Size(), p3, t3.Size())) {
28655 break
28656 }
28657 v.copyOf(mem)
28658 return true
28659 }
28660
28661
28662
28663 for {
28664 t1 := auxToType(v.Aux)
28665 p1 := v_0
28666 if v_1.Op != OpLoad {
28667 break
28668 }
28669 t2 := v_1.Type
28670 oldmem := v_1.Args[1]
28671 p2 := v_1.Args[0]
28672 mem := v_2
28673 if mem.Op != OpStore {
28674 break
28675 }
28676 t3 := auxToType(mem.Aux)
28677 _ = mem.Args[2]
28678 p3 := mem.Args[0]
28679 mem_2 := mem.Args[2]
28680 if mem_2.Op != OpStore {
28681 break
28682 }
28683 t4 := auxToType(mem_2.Aux)
28684 _ = mem_2.Args[2]
28685 p4 := mem_2.Args[0]
28686 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())) {
28687 break
28688 }
28689 v.copyOf(mem)
28690 return true
28691 }
28692
28693
28694
28695 for {
28696 t1 := auxToType(v.Aux)
28697 p1 := v_0
28698 if v_1.Op != OpLoad {
28699 break
28700 }
28701 t2 := v_1.Type
28702 oldmem := v_1.Args[1]
28703 p2 := v_1.Args[0]
28704 mem := v_2
28705 if mem.Op != OpStore {
28706 break
28707 }
28708 t3 := auxToType(mem.Aux)
28709 _ = mem.Args[2]
28710 p3 := mem.Args[0]
28711 mem_2 := mem.Args[2]
28712 if mem_2.Op != OpStore {
28713 break
28714 }
28715 t4 := auxToType(mem_2.Aux)
28716 _ = mem_2.Args[2]
28717 p4 := mem_2.Args[0]
28718 mem_2_2 := mem_2.Args[2]
28719 if mem_2_2.Op != OpStore {
28720 break
28721 }
28722 t5 := auxToType(mem_2_2.Aux)
28723 _ = mem_2_2.Args[2]
28724 p5 := mem_2_2.Args[0]
28725 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())) {
28726 break
28727 }
28728 v.copyOf(mem)
28729 return true
28730 }
28731
28732
28733
28734 for {
28735 t := auxToType(v.Aux)
28736 if v_0.Op != OpOffPtr {
28737 break
28738 }
28739 o := auxIntToInt64(v_0.AuxInt)
28740 p1 := v_0.Args[0]
28741 x := v_1
28742 mem := v_2
28743 if mem.Op != OpZero {
28744 break
28745 }
28746 n := auxIntToInt64(mem.AuxInt)
28747 p2 := mem.Args[0]
28748 if !(isConstZero(x) && o >= 0 && t.Size()+o <= n && isSamePtr(p1, p2)) {
28749 break
28750 }
28751 v.copyOf(mem)
28752 return true
28753 }
28754
28755
28756
28757 for {
28758 t1 := auxToType(v.Aux)
28759 op := v_0
28760 if op.Op != OpOffPtr {
28761 break
28762 }
28763 o1 := auxIntToInt64(op.AuxInt)
28764 p1 := op.Args[0]
28765 x := v_1
28766 mem := v_2
28767 if mem.Op != OpStore {
28768 break
28769 }
28770 t2 := auxToType(mem.Aux)
28771 _ = mem.Args[2]
28772 p2 := mem.Args[0]
28773 mem_2 := mem.Args[2]
28774 if mem_2.Op != OpZero {
28775 break
28776 }
28777 n := auxIntToInt64(mem_2.AuxInt)
28778 p3 := mem_2.Args[0]
28779 if !(isConstZero(x) && o1 >= 0 && t1.Size()+o1 <= n && isSamePtr(p1, p3) && disjoint(op, t1.Size(), p2, t2.Size())) {
28780 break
28781 }
28782 v.copyOf(mem)
28783 return true
28784 }
28785
28786
28787
28788 for {
28789 t1 := auxToType(v.Aux)
28790 op := v_0
28791 if op.Op != OpOffPtr {
28792 break
28793 }
28794 o1 := auxIntToInt64(op.AuxInt)
28795 p1 := op.Args[0]
28796 x := v_1
28797 mem := v_2
28798 if mem.Op != OpStore {
28799 break
28800 }
28801 t2 := auxToType(mem.Aux)
28802 _ = mem.Args[2]
28803 p2 := mem.Args[0]
28804 mem_2 := mem.Args[2]
28805 if mem_2.Op != OpStore {
28806 break
28807 }
28808 t3 := auxToType(mem_2.Aux)
28809 _ = mem_2.Args[2]
28810 p3 := mem_2.Args[0]
28811 mem_2_2 := mem_2.Args[2]
28812 if mem_2_2.Op != OpZero {
28813 break
28814 }
28815 n := auxIntToInt64(mem_2_2.AuxInt)
28816 p4 := mem_2_2.Args[0]
28817 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())) {
28818 break
28819 }
28820 v.copyOf(mem)
28821 return true
28822 }
28823
28824
28825
28826 for {
28827 t1 := auxToType(v.Aux)
28828 op := v_0
28829 if op.Op != OpOffPtr {
28830 break
28831 }
28832 o1 := auxIntToInt64(op.AuxInt)
28833 p1 := op.Args[0]
28834 x := v_1
28835 mem := v_2
28836 if mem.Op != OpStore {
28837 break
28838 }
28839 t2 := auxToType(mem.Aux)
28840 _ = mem.Args[2]
28841 p2 := mem.Args[0]
28842 mem_2 := mem.Args[2]
28843 if mem_2.Op != OpStore {
28844 break
28845 }
28846 t3 := auxToType(mem_2.Aux)
28847 _ = mem_2.Args[2]
28848 p3 := mem_2.Args[0]
28849 mem_2_2 := mem_2.Args[2]
28850 if mem_2_2.Op != OpStore {
28851 break
28852 }
28853 t4 := auxToType(mem_2_2.Aux)
28854 _ = mem_2_2.Args[2]
28855 p4 := mem_2_2.Args[0]
28856 mem_2_2_2 := mem_2_2.Args[2]
28857 if mem_2_2_2.Op != OpZero {
28858 break
28859 }
28860 n := auxIntToInt64(mem_2_2_2.AuxInt)
28861 p5 := mem_2_2_2.Args[0]
28862 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())) {
28863 break
28864 }
28865 v.copyOf(mem)
28866 return true
28867 }
28868
28869
28870 for {
28871 if v_1.Op != OpStructMake0 {
28872 break
28873 }
28874 mem := v_2
28875 v.copyOf(mem)
28876 return true
28877 }
28878
28879
28880 for {
28881 dst := v_0
28882 if v_1.Op != OpStructMake1 {
28883 break
28884 }
28885 t := v_1.Type
28886 f0 := v_1.Args[0]
28887 mem := v_2
28888 v.reset(OpStore)
28889 v.Aux = typeToAux(t.FieldType(0))
28890 v0 := b.NewValue0(v.Pos, OpOffPtr, t.FieldType(0).PtrTo())
28891 v0.AuxInt = int64ToAuxInt(0)
28892 v0.AddArg(dst)
28893 v.AddArg3(v0, f0, mem)
28894 return true
28895 }
28896
28897
28898 for {
28899 dst := v_0
28900 if v_1.Op != OpStructMake2 {
28901 break
28902 }
28903 t := v_1.Type
28904 f1 := v_1.Args[1]
28905 f0 := v_1.Args[0]
28906 mem := v_2
28907 v.reset(OpStore)
28908 v.Aux = typeToAux(t.FieldType(1))
28909 v0 := b.NewValue0(v.Pos, OpOffPtr, t.FieldType(1).PtrTo())
28910 v0.AuxInt = int64ToAuxInt(t.FieldOff(1))
28911 v0.AddArg(dst)
28912 v1 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
28913 v1.Aux = typeToAux(t.FieldType(0))
28914 v2 := b.NewValue0(v.Pos, OpOffPtr, t.FieldType(0).PtrTo())
28915 v2.AuxInt = int64ToAuxInt(0)
28916 v2.AddArg(dst)
28917 v1.AddArg3(v2, f0, mem)
28918 v.AddArg3(v0, f1, v1)
28919 return true
28920 }
28921
28922
28923 for {
28924 dst := v_0
28925 if v_1.Op != OpStructMake3 {
28926 break
28927 }
28928 t := v_1.Type
28929 f2 := v_1.Args[2]
28930 f0 := v_1.Args[0]
28931 f1 := v_1.Args[1]
28932 mem := v_2
28933 v.reset(OpStore)
28934 v.Aux = typeToAux(t.FieldType(2))
28935 v0 := b.NewValue0(v.Pos, OpOffPtr, t.FieldType(2).PtrTo())
28936 v0.AuxInt = int64ToAuxInt(t.FieldOff(2))
28937 v0.AddArg(dst)
28938 v1 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
28939 v1.Aux = typeToAux(t.FieldType(1))
28940 v2 := b.NewValue0(v.Pos, OpOffPtr, t.FieldType(1).PtrTo())
28941 v2.AuxInt = int64ToAuxInt(t.FieldOff(1))
28942 v2.AddArg(dst)
28943 v3 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
28944 v3.Aux = typeToAux(t.FieldType(0))
28945 v4 := b.NewValue0(v.Pos, OpOffPtr, t.FieldType(0).PtrTo())
28946 v4.AuxInt = int64ToAuxInt(0)
28947 v4.AddArg(dst)
28948 v3.AddArg3(v4, f0, mem)
28949 v1.AddArg3(v2, f1, v3)
28950 v.AddArg3(v0, f2, v1)
28951 return true
28952 }
28953
28954
28955 for {
28956 dst := v_0
28957 if v_1.Op != OpStructMake4 {
28958 break
28959 }
28960 t := v_1.Type
28961 f3 := v_1.Args[3]
28962 f0 := v_1.Args[0]
28963 f1 := v_1.Args[1]
28964 f2 := v_1.Args[2]
28965 mem := v_2
28966 v.reset(OpStore)
28967 v.Aux = typeToAux(t.FieldType(3))
28968 v0 := b.NewValue0(v.Pos, OpOffPtr, t.FieldType(3).PtrTo())
28969 v0.AuxInt = int64ToAuxInt(t.FieldOff(3))
28970 v0.AddArg(dst)
28971 v1 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
28972 v1.Aux = typeToAux(t.FieldType(2))
28973 v2 := b.NewValue0(v.Pos, OpOffPtr, t.FieldType(2).PtrTo())
28974 v2.AuxInt = int64ToAuxInt(t.FieldOff(2))
28975 v2.AddArg(dst)
28976 v3 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
28977 v3.Aux = typeToAux(t.FieldType(1))
28978 v4 := b.NewValue0(v.Pos, OpOffPtr, t.FieldType(1).PtrTo())
28979 v4.AuxInt = int64ToAuxInt(t.FieldOff(1))
28980 v4.AddArg(dst)
28981 v5 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
28982 v5.Aux = typeToAux(t.FieldType(0))
28983 v6 := b.NewValue0(v.Pos, OpOffPtr, t.FieldType(0).PtrTo())
28984 v6.AuxInt = int64ToAuxInt(0)
28985 v6.AddArg(dst)
28986 v5.AddArg3(v6, f0, mem)
28987 v3.AddArg3(v4, f1, v5)
28988 v1.AddArg3(v2, f2, v3)
28989 v.AddArg3(v0, f3, v1)
28990 return true
28991 }
28992
28993
28994
28995 for {
28996 t := auxToType(v.Aux)
28997 dst := v_0
28998 if v_1.Op != OpLoad {
28999 break
29000 }
29001 mem := v_1.Args[1]
29002 src := v_1.Args[0]
29003 if mem != v_2 || !(!CanSSA(t)) {
29004 break
29005 }
29006 v.reset(OpMove)
29007 v.AuxInt = int64ToAuxInt(t.Size())
29008 v.Aux = typeToAux(t)
29009 v.AddArg3(dst, src, mem)
29010 return true
29011 }
29012
29013
29014
29015 for {
29016 t := auxToType(v.Aux)
29017 dst := v_0
29018 if v_1.Op != OpLoad {
29019 break
29020 }
29021 mem := v_1.Args[1]
29022 src := v_1.Args[0]
29023 if v_2.Op != OpVarDef {
29024 break
29025 }
29026 x := auxToSym(v_2.Aux)
29027 if mem != v_2.Args[0] || !(!CanSSA(t)) {
29028 break
29029 }
29030 v.reset(OpMove)
29031 v.AuxInt = int64ToAuxInt(t.Size())
29032 v.Aux = typeToAux(t)
29033 v0 := b.NewValue0(v.Pos, OpVarDef, types.TypeMem)
29034 v0.Aux = symToAux(x)
29035 v0.AddArg(mem)
29036 v.AddArg3(dst, src, v0)
29037 return true
29038 }
29039
29040
29041 for {
29042 if v_1.Op != OpArrayMake0 {
29043 break
29044 }
29045 mem := v_2
29046 v.copyOf(mem)
29047 return true
29048 }
29049
29050
29051 for {
29052 dst := v_0
29053 if v_1.Op != OpArrayMake1 {
29054 break
29055 }
29056 e := v_1.Args[0]
29057 mem := v_2
29058 v.reset(OpStore)
29059 v.Aux = typeToAux(e.Type)
29060 v.AddArg3(dst, e, mem)
29061 return true
29062 }
29063
29064
29065
29066 for {
29067 if v_0.Op != OpSelectN || auxIntToInt64(v_0.AuxInt) != 0 {
29068 break
29069 }
29070 call := v_0.Args[0]
29071 if call.Op != OpStaticLECall || len(call.Args) != 2 {
29072 break
29073 }
29074 x := v_1
29075 mem := v_2
29076 if mem.Op != OpSelectN || auxIntToInt64(mem.AuxInt) != 1 || call != mem.Args[0] || !(isConstZero(x) && isSameCall(call.Aux, "runtime.newobject")) {
29077 break
29078 }
29079 v.copyOf(mem)
29080 return true
29081 }
29082
29083
29084
29085 for {
29086 if v_0.Op != OpOffPtr {
29087 break
29088 }
29089 v_0_0 := v_0.Args[0]
29090 if v_0_0.Op != OpSelectN || auxIntToInt64(v_0_0.AuxInt) != 0 {
29091 break
29092 }
29093 call := v_0_0.Args[0]
29094 if call.Op != OpStaticLECall || len(call.Args) != 2 {
29095 break
29096 }
29097 x := v_1
29098 mem := v_2
29099 if mem.Op != OpSelectN || auxIntToInt64(mem.AuxInt) != 1 || call != mem.Args[0] || !(isConstZero(x) && isSameCall(call.Aux, "runtime.newobject")) {
29100 break
29101 }
29102 v.copyOf(mem)
29103 return true
29104 }
29105
29106
29107
29108 for {
29109 t1 := auxToType(v.Aux)
29110 op1 := v_0
29111 if op1.Op != OpOffPtr {
29112 break
29113 }
29114 o1 := auxIntToInt64(op1.AuxInt)
29115 p1 := op1.Args[0]
29116 d1 := v_1
29117 m2 := v_2
29118 if m2.Op != OpStore {
29119 break
29120 }
29121 t2 := auxToType(m2.Aux)
29122 _ = m2.Args[2]
29123 op2 := m2.Args[0]
29124 if op2.Op != OpOffPtr || auxIntToInt64(op2.AuxInt) != 0 {
29125 break
29126 }
29127 p2 := op2.Args[0]
29128 d2 := m2.Args[1]
29129 m3 := m2.Args[2]
29130 if m3.Op != OpMove {
29131 break
29132 }
29133 n := auxIntToInt64(m3.AuxInt)
29134 mem := m3.Args[2]
29135 p3 := m3.Args[0]
29136 if !(m2.Uses == 1 && m3.Uses == 1 && o1 == t2.Size() && n == t2.Size()+t1.Size() && isSamePtr(p1, p2) && isSamePtr(p2, p3) && clobber(m2, m3)) {
29137 break
29138 }
29139 v.reset(OpStore)
29140 v.Aux = typeToAux(t1)
29141 v0 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
29142 v0.Aux = typeToAux(t2)
29143 v0.AddArg3(op2, d2, mem)
29144 v.AddArg3(op1, d1, v0)
29145 return true
29146 }
29147
29148
29149
29150 for {
29151 t1 := auxToType(v.Aux)
29152 op1 := v_0
29153 if op1.Op != OpOffPtr {
29154 break
29155 }
29156 o1 := auxIntToInt64(op1.AuxInt)
29157 p1 := op1.Args[0]
29158 d1 := v_1
29159 m2 := v_2
29160 if m2.Op != OpStore {
29161 break
29162 }
29163 t2 := auxToType(m2.Aux)
29164 _ = m2.Args[2]
29165 op2 := m2.Args[0]
29166 if op2.Op != OpOffPtr {
29167 break
29168 }
29169 o2 := auxIntToInt64(op2.AuxInt)
29170 p2 := op2.Args[0]
29171 d2 := m2.Args[1]
29172 m3 := m2.Args[2]
29173 if m3.Op != OpStore {
29174 break
29175 }
29176 t3 := auxToType(m3.Aux)
29177 _ = m3.Args[2]
29178 op3 := m3.Args[0]
29179 if op3.Op != OpOffPtr || auxIntToInt64(op3.AuxInt) != 0 {
29180 break
29181 }
29182 p3 := op3.Args[0]
29183 d3 := m3.Args[1]
29184 m4 := m3.Args[2]
29185 if m4.Op != OpMove {
29186 break
29187 }
29188 n := auxIntToInt64(m4.AuxInt)
29189 mem := m4.Args[2]
29190 p4 := m4.Args[0]
29191 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)) {
29192 break
29193 }
29194 v.reset(OpStore)
29195 v.Aux = typeToAux(t1)
29196 v0 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
29197 v0.Aux = typeToAux(t2)
29198 v1 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
29199 v1.Aux = typeToAux(t3)
29200 v1.AddArg3(op3, d3, mem)
29201 v0.AddArg3(op2, d2, v1)
29202 v.AddArg3(op1, d1, v0)
29203 return true
29204 }
29205
29206
29207
29208 for {
29209 t1 := auxToType(v.Aux)
29210 op1 := v_0
29211 if op1.Op != OpOffPtr {
29212 break
29213 }
29214 o1 := auxIntToInt64(op1.AuxInt)
29215 p1 := op1.Args[0]
29216 d1 := v_1
29217 m2 := v_2
29218 if m2.Op != OpStore {
29219 break
29220 }
29221 t2 := auxToType(m2.Aux)
29222 _ = m2.Args[2]
29223 op2 := m2.Args[0]
29224 if op2.Op != OpOffPtr {
29225 break
29226 }
29227 o2 := auxIntToInt64(op2.AuxInt)
29228 p2 := op2.Args[0]
29229 d2 := m2.Args[1]
29230 m3 := m2.Args[2]
29231 if m3.Op != OpStore {
29232 break
29233 }
29234 t3 := auxToType(m3.Aux)
29235 _ = m3.Args[2]
29236 op3 := m3.Args[0]
29237 if op3.Op != OpOffPtr {
29238 break
29239 }
29240 o3 := auxIntToInt64(op3.AuxInt)
29241 p3 := op3.Args[0]
29242 d3 := m3.Args[1]
29243 m4 := m3.Args[2]
29244 if m4.Op != OpStore {
29245 break
29246 }
29247 t4 := auxToType(m4.Aux)
29248 _ = m4.Args[2]
29249 op4 := m4.Args[0]
29250 if op4.Op != OpOffPtr || auxIntToInt64(op4.AuxInt) != 0 {
29251 break
29252 }
29253 p4 := op4.Args[0]
29254 d4 := m4.Args[1]
29255 m5 := m4.Args[2]
29256 if m5.Op != OpMove {
29257 break
29258 }
29259 n := auxIntToInt64(m5.AuxInt)
29260 mem := m5.Args[2]
29261 p5 := m5.Args[0]
29262 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)) {
29263 break
29264 }
29265 v.reset(OpStore)
29266 v.Aux = typeToAux(t1)
29267 v0 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
29268 v0.Aux = typeToAux(t2)
29269 v1 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
29270 v1.Aux = typeToAux(t3)
29271 v2 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
29272 v2.Aux = typeToAux(t4)
29273 v2.AddArg3(op4, d4, mem)
29274 v1.AddArg3(op3, d3, v2)
29275 v0.AddArg3(op2, d2, v1)
29276 v.AddArg3(op1, d1, v0)
29277 return true
29278 }
29279
29280
29281
29282 for {
29283 t1 := auxToType(v.Aux)
29284 op1 := v_0
29285 if op1.Op != OpOffPtr {
29286 break
29287 }
29288 o1 := auxIntToInt64(op1.AuxInt)
29289 p1 := op1.Args[0]
29290 d1 := v_1
29291 m2 := v_2
29292 if m2.Op != OpStore {
29293 break
29294 }
29295 t2 := auxToType(m2.Aux)
29296 _ = m2.Args[2]
29297 op2 := m2.Args[0]
29298 if op2.Op != OpOffPtr || auxIntToInt64(op2.AuxInt) != 0 {
29299 break
29300 }
29301 p2 := op2.Args[0]
29302 d2 := m2.Args[1]
29303 m3 := m2.Args[2]
29304 if m3.Op != OpZero {
29305 break
29306 }
29307 n := auxIntToInt64(m3.AuxInt)
29308 mem := m3.Args[1]
29309 p3 := m3.Args[0]
29310 if !(m2.Uses == 1 && m3.Uses == 1 && o1 == t2.Size() && n == t2.Size()+t1.Size() && isSamePtr(p1, p2) && isSamePtr(p2, p3) && clobber(m2, m3)) {
29311 break
29312 }
29313 v.reset(OpStore)
29314 v.Aux = typeToAux(t1)
29315 v0 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
29316 v0.Aux = typeToAux(t2)
29317 v0.AddArg3(op2, d2, mem)
29318 v.AddArg3(op1, d1, v0)
29319 return true
29320 }
29321
29322
29323
29324 for {
29325 t1 := auxToType(v.Aux)
29326 op1 := v_0
29327 if op1.Op != OpOffPtr {
29328 break
29329 }
29330 o1 := auxIntToInt64(op1.AuxInt)
29331 p1 := op1.Args[0]
29332 d1 := v_1
29333 m2 := v_2
29334 if m2.Op != OpStore {
29335 break
29336 }
29337 t2 := auxToType(m2.Aux)
29338 _ = m2.Args[2]
29339 op2 := m2.Args[0]
29340 if op2.Op != OpOffPtr {
29341 break
29342 }
29343 o2 := auxIntToInt64(op2.AuxInt)
29344 p2 := op2.Args[0]
29345 d2 := m2.Args[1]
29346 m3 := m2.Args[2]
29347 if m3.Op != OpStore {
29348 break
29349 }
29350 t3 := auxToType(m3.Aux)
29351 _ = m3.Args[2]
29352 op3 := m3.Args[0]
29353 if op3.Op != OpOffPtr || auxIntToInt64(op3.AuxInt) != 0 {
29354 break
29355 }
29356 p3 := op3.Args[0]
29357 d3 := m3.Args[1]
29358 m4 := m3.Args[2]
29359 if m4.Op != OpZero {
29360 break
29361 }
29362 n := auxIntToInt64(m4.AuxInt)
29363 mem := m4.Args[1]
29364 p4 := m4.Args[0]
29365 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)) {
29366 break
29367 }
29368 v.reset(OpStore)
29369 v.Aux = typeToAux(t1)
29370 v0 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
29371 v0.Aux = typeToAux(t2)
29372 v1 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
29373 v1.Aux = typeToAux(t3)
29374 v1.AddArg3(op3, d3, mem)
29375 v0.AddArg3(op2, d2, v1)
29376 v.AddArg3(op1, d1, v0)
29377 return true
29378 }
29379
29380
29381
29382 for {
29383 t1 := auxToType(v.Aux)
29384 op1 := v_0
29385 if op1.Op != OpOffPtr {
29386 break
29387 }
29388 o1 := auxIntToInt64(op1.AuxInt)
29389 p1 := op1.Args[0]
29390 d1 := v_1
29391 m2 := v_2
29392 if m2.Op != OpStore {
29393 break
29394 }
29395 t2 := auxToType(m2.Aux)
29396 _ = m2.Args[2]
29397 op2 := m2.Args[0]
29398 if op2.Op != OpOffPtr {
29399 break
29400 }
29401 o2 := auxIntToInt64(op2.AuxInt)
29402 p2 := op2.Args[0]
29403 d2 := m2.Args[1]
29404 m3 := m2.Args[2]
29405 if m3.Op != OpStore {
29406 break
29407 }
29408 t3 := auxToType(m3.Aux)
29409 _ = m3.Args[2]
29410 op3 := m3.Args[0]
29411 if op3.Op != OpOffPtr {
29412 break
29413 }
29414 o3 := auxIntToInt64(op3.AuxInt)
29415 p3 := op3.Args[0]
29416 d3 := m3.Args[1]
29417 m4 := m3.Args[2]
29418 if m4.Op != OpStore {
29419 break
29420 }
29421 t4 := auxToType(m4.Aux)
29422 _ = m4.Args[2]
29423 op4 := m4.Args[0]
29424 if op4.Op != OpOffPtr || auxIntToInt64(op4.AuxInt) != 0 {
29425 break
29426 }
29427 p4 := op4.Args[0]
29428 d4 := m4.Args[1]
29429 m5 := m4.Args[2]
29430 if m5.Op != OpZero {
29431 break
29432 }
29433 n := auxIntToInt64(m5.AuxInt)
29434 mem := m5.Args[1]
29435 p5 := m5.Args[0]
29436 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)) {
29437 break
29438 }
29439 v.reset(OpStore)
29440 v.Aux = typeToAux(t1)
29441 v0 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
29442 v0.Aux = typeToAux(t2)
29443 v1 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
29444 v1.Aux = typeToAux(t3)
29445 v2 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
29446 v2.Aux = typeToAux(t4)
29447 v2.AddArg3(op4, d4, mem)
29448 v1.AddArg3(op3, d3, v2)
29449 v0.AddArg3(op2, d2, v1)
29450 v.AddArg3(op1, d1, v0)
29451 return true
29452 }
29453 return false
29454 }
29455 func rewriteValuegeneric_OpStringLen(v *Value) bool {
29456 v_0 := v.Args[0]
29457
29458
29459 for {
29460 if v_0.Op != OpStringMake {
29461 break
29462 }
29463 _ = v_0.Args[1]
29464 v_0_1 := v_0.Args[1]
29465 if v_0_1.Op != OpConst64 {
29466 break
29467 }
29468 t := v_0_1.Type
29469 c := auxIntToInt64(v_0_1.AuxInt)
29470 v.reset(OpConst64)
29471 v.Type = t
29472 v.AuxInt = int64ToAuxInt(c)
29473 return true
29474 }
29475 return false
29476 }
29477 func rewriteValuegeneric_OpStringPtr(v *Value) bool {
29478 v_0 := v.Args[0]
29479
29480
29481 for {
29482 if v_0.Op != OpStringMake {
29483 break
29484 }
29485 v_0_0 := v_0.Args[0]
29486 if v_0_0.Op != OpAddr {
29487 break
29488 }
29489 t := v_0_0.Type
29490 s := auxToSym(v_0_0.Aux)
29491 base := v_0_0.Args[0]
29492 v.reset(OpAddr)
29493 v.Type = t
29494 v.Aux = symToAux(s)
29495 v.AddArg(base)
29496 return true
29497 }
29498 return false
29499 }
29500 func rewriteValuegeneric_OpStructSelect(v *Value) bool {
29501 v_0 := v.Args[0]
29502 b := v.Block
29503
29504
29505 for {
29506 if v_0.Op != OpStructMake1 {
29507 break
29508 }
29509 x := v_0.Args[0]
29510 v.copyOf(x)
29511 return true
29512 }
29513
29514
29515 for {
29516 if auxIntToInt64(v.AuxInt) != 0 || v_0.Op != OpStructMake2 {
29517 break
29518 }
29519 x := v_0.Args[0]
29520 v.copyOf(x)
29521 return true
29522 }
29523
29524
29525 for {
29526 if auxIntToInt64(v.AuxInt) != 1 || v_0.Op != OpStructMake2 {
29527 break
29528 }
29529 x := v_0.Args[1]
29530 v.copyOf(x)
29531 return true
29532 }
29533
29534
29535 for {
29536 if auxIntToInt64(v.AuxInt) != 0 || v_0.Op != OpStructMake3 {
29537 break
29538 }
29539 x := v_0.Args[0]
29540 v.copyOf(x)
29541 return true
29542 }
29543
29544
29545 for {
29546 if auxIntToInt64(v.AuxInt) != 1 || v_0.Op != OpStructMake3 {
29547 break
29548 }
29549 x := v_0.Args[1]
29550 v.copyOf(x)
29551 return true
29552 }
29553
29554
29555 for {
29556 if auxIntToInt64(v.AuxInt) != 2 || v_0.Op != OpStructMake3 {
29557 break
29558 }
29559 x := v_0.Args[2]
29560 v.copyOf(x)
29561 return true
29562 }
29563
29564
29565 for {
29566 if auxIntToInt64(v.AuxInt) != 0 || v_0.Op != OpStructMake4 {
29567 break
29568 }
29569 x := v_0.Args[0]
29570 v.copyOf(x)
29571 return true
29572 }
29573
29574
29575 for {
29576 if auxIntToInt64(v.AuxInt) != 1 || v_0.Op != OpStructMake4 {
29577 break
29578 }
29579 x := v_0.Args[1]
29580 v.copyOf(x)
29581 return true
29582 }
29583
29584
29585 for {
29586 if auxIntToInt64(v.AuxInt) != 2 || v_0.Op != OpStructMake4 {
29587 break
29588 }
29589 x := v_0.Args[2]
29590 v.copyOf(x)
29591 return true
29592 }
29593
29594
29595 for {
29596 if auxIntToInt64(v.AuxInt) != 3 || v_0.Op != OpStructMake4 {
29597 break
29598 }
29599 x := v_0.Args[3]
29600 v.copyOf(x)
29601 return true
29602 }
29603
29604
29605
29606 for {
29607 i := auxIntToInt64(v.AuxInt)
29608 x := v_0
29609 if x.Op != OpLoad {
29610 break
29611 }
29612 t := x.Type
29613 mem := x.Args[1]
29614 ptr := x.Args[0]
29615 if !(!CanSSA(t)) {
29616 break
29617 }
29618 b = x.Block
29619 v0 := b.NewValue0(v.Pos, OpLoad, v.Type)
29620 v.copyOf(v0)
29621 v1 := b.NewValue0(v.Pos, OpOffPtr, v.Type.PtrTo())
29622 v1.AuxInt = int64ToAuxInt(t.FieldOff(int(i)))
29623 v1.AddArg(ptr)
29624 v0.AddArg2(v1, mem)
29625 return true
29626 }
29627
29628
29629 for {
29630 if auxIntToInt64(v.AuxInt) != 0 || v_0.Op != OpIData {
29631 break
29632 }
29633 x := v_0.Args[0]
29634 v.reset(OpIData)
29635 v.AddArg(x)
29636 return true
29637 }
29638 return false
29639 }
29640 func rewriteValuegeneric_OpSub16(v *Value) bool {
29641 v_1 := v.Args[1]
29642 v_0 := v.Args[0]
29643 b := v.Block
29644
29645
29646 for {
29647 if v_0.Op != OpConst16 {
29648 break
29649 }
29650 c := auxIntToInt16(v_0.AuxInt)
29651 if v_1.Op != OpConst16 {
29652 break
29653 }
29654 d := auxIntToInt16(v_1.AuxInt)
29655 v.reset(OpConst16)
29656 v.AuxInt = int16ToAuxInt(c - d)
29657 return true
29658 }
29659
29660
29661
29662 for {
29663 x := v_0
29664 if v_1.Op != OpConst16 {
29665 break
29666 }
29667 t := v_1.Type
29668 c := auxIntToInt16(v_1.AuxInt)
29669 if !(x.Op != OpConst16) {
29670 break
29671 }
29672 v.reset(OpAdd16)
29673 v0 := b.NewValue0(v.Pos, OpConst16, t)
29674 v0.AuxInt = int16ToAuxInt(-c)
29675 v.AddArg2(v0, x)
29676 return true
29677 }
29678
29679
29680 for {
29681 t := v.Type
29682 if v_0.Op != OpMul16 {
29683 break
29684 }
29685 _ = v_0.Args[1]
29686 v_0_0 := v_0.Args[0]
29687 v_0_1 := v_0.Args[1]
29688 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
29689 x := v_0_0
29690 y := v_0_1
29691 if v_1.Op != OpMul16 {
29692 continue
29693 }
29694 _ = v_1.Args[1]
29695 v_1_0 := v_1.Args[0]
29696 v_1_1 := v_1.Args[1]
29697 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
29698 if x != v_1_0 {
29699 continue
29700 }
29701 z := v_1_1
29702 v.reset(OpMul16)
29703 v0 := b.NewValue0(v.Pos, OpSub16, t)
29704 v0.AddArg2(y, z)
29705 v.AddArg2(x, v0)
29706 return true
29707 }
29708 }
29709 break
29710 }
29711
29712
29713 for {
29714 x := v_0
29715 if x != v_1 {
29716 break
29717 }
29718 v.reset(OpConst16)
29719 v.AuxInt = int16ToAuxInt(0)
29720 return true
29721 }
29722
29723
29724 for {
29725 if v_0.Op != OpNeg16 {
29726 break
29727 }
29728 x := v_0.Args[0]
29729 if v_1.Op != OpCom16 || x != v_1.Args[0] {
29730 break
29731 }
29732 v.reset(OpConst16)
29733 v.AuxInt = int16ToAuxInt(1)
29734 return true
29735 }
29736
29737
29738 for {
29739 if v_0.Op != OpCom16 {
29740 break
29741 }
29742 x := v_0.Args[0]
29743 if v_1.Op != OpNeg16 || x != v_1.Args[0] {
29744 break
29745 }
29746 v.reset(OpConst16)
29747 v.AuxInt = int16ToAuxInt(-1)
29748 return true
29749 }
29750
29751
29752 for {
29753 if v_0.Op != OpAdd16 {
29754 break
29755 }
29756 _ = v_0.Args[1]
29757 v_0_0 := v_0.Args[0]
29758 v_0_1 := v_0.Args[1]
29759 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
29760 t := v_0_0
29761 x := v_0_1
29762 if v_1.Op != OpAdd16 {
29763 continue
29764 }
29765 _ = v_1.Args[1]
29766 v_1_0 := v_1.Args[0]
29767 v_1_1 := v_1.Args[1]
29768 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
29769 if t != v_1_0 {
29770 continue
29771 }
29772 y := v_1_1
29773 v.reset(OpSub16)
29774 v.AddArg2(x, y)
29775 return true
29776 }
29777 }
29778 break
29779 }
29780
29781
29782 for {
29783 if v_0.Op != OpAdd16 {
29784 break
29785 }
29786 _ = v_0.Args[1]
29787 v_0_0 := v_0.Args[0]
29788 v_0_1 := v_0.Args[1]
29789 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
29790 x := v_0_0
29791 y := v_0_1
29792 if x != v_1 {
29793 continue
29794 }
29795 v.copyOf(y)
29796 return true
29797 }
29798 break
29799 }
29800
29801
29802 for {
29803 if v_0.Op != OpAdd16 {
29804 break
29805 }
29806 _ = v_0.Args[1]
29807 v_0_0 := v_0.Args[0]
29808 v_0_1 := v_0.Args[1]
29809 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
29810 x := v_0_0
29811 y := v_0_1
29812 if y != v_1 {
29813 continue
29814 }
29815 v.copyOf(x)
29816 return true
29817 }
29818 break
29819 }
29820
29821
29822 for {
29823 if v_0.Op != OpSub16 {
29824 break
29825 }
29826 y := v_0.Args[1]
29827 x := v_0.Args[0]
29828 if x != v_1 {
29829 break
29830 }
29831 v.reset(OpNeg16)
29832 v.AddArg(y)
29833 return true
29834 }
29835
29836
29837 for {
29838 x := v_0
29839 if v_1.Op != OpAdd16 {
29840 break
29841 }
29842 _ = v_1.Args[1]
29843 v_1_0 := v_1.Args[0]
29844 v_1_1 := v_1.Args[1]
29845 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
29846 if x != v_1_0 {
29847 continue
29848 }
29849 y := v_1_1
29850 v.reset(OpNeg16)
29851 v.AddArg(y)
29852 return true
29853 }
29854 break
29855 }
29856
29857
29858
29859 for {
29860 x := v_0
29861 if v_1.Op != OpSub16 {
29862 break
29863 }
29864 z := v_1.Args[1]
29865 i := v_1.Args[0]
29866 if i.Op != OpConst16 {
29867 break
29868 }
29869 t := i.Type
29870 if !(z.Op != OpConst16 && x.Op != OpConst16) {
29871 break
29872 }
29873 v.reset(OpSub16)
29874 v0 := b.NewValue0(v.Pos, OpAdd16, t)
29875 v0.AddArg2(x, z)
29876 v.AddArg2(v0, i)
29877 return true
29878 }
29879
29880
29881
29882 for {
29883 x := v_0
29884 if v_1.Op != OpAdd16 {
29885 break
29886 }
29887 _ = v_1.Args[1]
29888 v_1_0 := v_1.Args[0]
29889 v_1_1 := v_1.Args[1]
29890 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
29891 z := v_1_0
29892 i := v_1_1
29893 if i.Op != OpConst16 {
29894 continue
29895 }
29896 t := i.Type
29897 if !(z.Op != OpConst16 && x.Op != OpConst16) {
29898 continue
29899 }
29900 v.reset(OpSub16)
29901 v0 := b.NewValue0(v.Pos, OpSub16, t)
29902 v0.AddArg2(x, z)
29903 v.AddArg2(v0, i)
29904 return true
29905 }
29906 break
29907 }
29908
29909
29910
29911 for {
29912 if v_0.Op != OpSub16 {
29913 break
29914 }
29915 z := v_0.Args[1]
29916 i := v_0.Args[0]
29917 if i.Op != OpConst16 {
29918 break
29919 }
29920 t := i.Type
29921 x := v_1
29922 if !(z.Op != OpConst16 && x.Op != OpConst16) {
29923 break
29924 }
29925 v.reset(OpSub16)
29926 v0 := b.NewValue0(v.Pos, OpAdd16, t)
29927 v0.AddArg2(z, x)
29928 v.AddArg2(i, v0)
29929 return true
29930 }
29931
29932
29933
29934 for {
29935 if v_0.Op != OpAdd16 {
29936 break
29937 }
29938 _ = v_0.Args[1]
29939 v_0_0 := v_0.Args[0]
29940 v_0_1 := v_0.Args[1]
29941 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
29942 z := v_0_0
29943 i := v_0_1
29944 if i.Op != OpConst16 {
29945 continue
29946 }
29947 t := i.Type
29948 x := v_1
29949 if !(z.Op != OpConst16 && x.Op != OpConst16) {
29950 continue
29951 }
29952 v.reset(OpAdd16)
29953 v0 := b.NewValue0(v.Pos, OpSub16, t)
29954 v0.AddArg2(z, x)
29955 v.AddArg2(i, v0)
29956 return true
29957 }
29958 break
29959 }
29960
29961
29962 for {
29963 if v_0.Op != OpConst16 {
29964 break
29965 }
29966 t := v_0.Type
29967 c := auxIntToInt16(v_0.AuxInt)
29968 if v_1.Op != OpSub16 {
29969 break
29970 }
29971 x := v_1.Args[1]
29972 v_1_0 := v_1.Args[0]
29973 if v_1_0.Op != OpConst16 || v_1_0.Type != t {
29974 break
29975 }
29976 d := auxIntToInt16(v_1_0.AuxInt)
29977 v.reset(OpAdd16)
29978 v0 := b.NewValue0(v.Pos, OpConst16, t)
29979 v0.AuxInt = int16ToAuxInt(c - d)
29980 v.AddArg2(v0, x)
29981 return true
29982 }
29983
29984
29985 for {
29986 if v_0.Op != OpConst16 {
29987 break
29988 }
29989 t := v_0.Type
29990 c := auxIntToInt16(v_0.AuxInt)
29991 if v_1.Op != OpAdd16 {
29992 break
29993 }
29994 _ = v_1.Args[1]
29995 v_1_0 := v_1.Args[0]
29996 v_1_1 := v_1.Args[1]
29997 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
29998 if v_1_0.Op != OpConst16 || v_1_0.Type != t {
29999 continue
30000 }
30001 d := auxIntToInt16(v_1_0.AuxInt)
30002 x := v_1_1
30003 v.reset(OpSub16)
30004 v0 := b.NewValue0(v.Pos, OpConst16, t)
30005 v0.AuxInt = int16ToAuxInt(c - d)
30006 v.AddArg2(v0, x)
30007 return true
30008 }
30009 break
30010 }
30011 return false
30012 }
30013 func rewriteValuegeneric_OpSub32(v *Value) bool {
30014 v_1 := v.Args[1]
30015 v_0 := v.Args[0]
30016 b := v.Block
30017
30018
30019 for {
30020 if v_0.Op != OpConst32 {
30021 break
30022 }
30023 c := auxIntToInt32(v_0.AuxInt)
30024 if v_1.Op != OpConst32 {
30025 break
30026 }
30027 d := auxIntToInt32(v_1.AuxInt)
30028 v.reset(OpConst32)
30029 v.AuxInt = int32ToAuxInt(c - d)
30030 return true
30031 }
30032
30033
30034
30035 for {
30036 x := v_0
30037 if v_1.Op != OpConst32 {
30038 break
30039 }
30040 t := v_1.Type
30041 c := auxIntToInt32(v_1.AuxInt)
30042 if !(x.Op != OpConst32) {
30043 break
30044 }
30045 v.reset(OpAdd32)
30046 v0 := b.NewValue0(v.Pos, OpConst32, t)
30047 v0.AuxInt = int32ToAuxInt(-c)
30048 v.AddArg2(v0, x)
30049 return true
30050 }
30051
30052
30053 for {
30054 t := v.Type
30055 if v_0.Op != OpMul32 {
30056 break
30057 }
30058 _ = v_0.Args[1]
30059 v_0_0 := v_0.Args[0]
30060 v_0_1 := v_0.Args[1]
30061 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
30062 x := v_0_0
30063 y := v_0_1
30064 if v_1.Op != OpMul32 {
30065 continue
30066 }
30067 _ = v_1.Args[1]
30068 v_1_0 := v_1.Args[0]
30069 v_1_1 := v_1.Args[1]
30070 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
30071 if x != v_1_0 {
30072 continue
30073 }
30074 z := v_1_1
30075 v.reset(OpMul32)
30076 v0 := b.NewValue0(v.Pos, OpSub32, t)
30077 v0.AddArg2(y, z)
30078 v.AddArg2(x, v0)
30079 return true
30080 }
30081 }
30082 break
30083 }
30084
30085
30086 for {
30087 x := v_0
30088 if x != v_1 {
30089 break
30090 }
30091 v.reset(OpConst32)
30092 v.AuxInt = int32ToAuxInt(0)
30093 return true
30094 }
30095
30096
30097 for {
30098 if v_0.Op != OpNeg32 {
30099 break
30100 }
30101 x := v_0.Args[0]
30102 if v_1.Op != OpCom32 || x != v_1.Args[0] {
30103 break
30104 }
30105 v.reset(OpConst32)
30106 v.AuxInt = int32ToAuxInt(1)
30107 return true
30108 }
30109
30110
30111 for {
30112 if v_0.Op != OpCom32 {
30113 break
30114 }
30115 x := v_0.Args[0]
30116 if v_1.Op != OpNeg32 || x != v_1.Args[0] {
30117 break
30118 }
30119 v.reset(OpConst32)
30120 v.AuxInt = int32ToAuxInt(-1)
30121 return true
30122 }
30123
30124
30125 for {
30126 if v_0.Op != OpAdd32 {
30127 break
30128 }
30129 _ = v_0.Args[1]
30130 v_0_0 := v_0.Args[0]
30131 v_0_1 := v_0.Args[1]
30132 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
30133 t := v_0_0
30134 x := v_0_1
30135 if v_1.Op != OpAdd32 {
30136 continue
30137 }
30138 _ = v_1.Args[1]
30139 v_1_0 := v_1.Args[0]
30140 v_1_1 := v_1.Args[1]
30141 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
30142 if t != v_1_0 {
30143 continue
30144 }
30145 y := v_1_1
30146 v.reset(OpSub32)
30147 v.AddArg2(x, y)
30148 return true
30149 }
30150 }
30151 break
30152 }
30153
30154
30155 for {
30156 if v_0.Op != OpAdd32 {
30157 break
30158 }
30159 _ = v_0.Args[1]
30160 v_0_0 := v_0.Args[0]
30161 v_0_1 := v_0.Args[1]
30162 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
30163 x := v_0_0
30164 y := v_0_1
30165 if x != v_1 {
30166 continue
30167 }
30168 v.copyOf(y)
30169 return true
30170 }
30171 break
30172 }
30173
30174
30175 for {
30176 if v_0.Op != OpAdd32 {
30177 break
30178 }
30179 _ = v_0.Args[1]
30180 v_0_0 := v_0.Args[0]
30181 v_0_1 := v_0.Args[1]
30182 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
30183 x := v_0_0
30184 y := v_0_1
30185 if y != v_1 {
30186 continue
30187 }
30188 v.copyOf(x)
30189 return true
30190 }
30191 break
30192 }
30193
30194
30195 for {
30196 if v_0.Op != OpSub32 {
30197 break
30198 }
30199 y := v_0.Args[1]
30200 x := v_0.Args[0]
30201 if x != v_1 {
30202 break
30203 }
30204 v.reset(OpNeg32)
30205 v.AddArg(y)
30206 return true
30207 }
30208
30209
30210 for {
30211 x := v_0
30212 if v_1.Op != OpAdd32 {
30213 break
30214 }
30215 _ = v_1.Args[1]
30216 v_1_0 := v_1.Args[0]
30217 v_1_1 := v_1.Args[1]
30218 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
30219 if x != v_1_0 {
30220 continue
30221 }
30222 y := v_1_1
30223 v.reset(OpNeg32)
30224 v.AddArg(y)
30225 return true
30226 }
30227 break
30228 }
30229
30230
30231
30232 for {
30233 x := v_0
30234 if v_1.Op != OpSub32 {
30235 break
30236 }
30237 z := v_1.Args[1]
30238 i := v_1.Args[0]
30239 if i.Op != OpConst32 {
30240 break
30241 }
30242 t := i.Type
30243 if !(z.Op != OpConst32 && x.Op != OpConst32) {
30244 break
30245 }
30246 v.reset(OpSub32)
30247 v0 := b.NewValue0(v.Pos, OpAdd32, t)
30248 v0.AddArg2(x, z)
30249 v.AddArg2(v0, i)
30250 return true
30251 }
30252
30253
30254
30255 for {
30256 x := v_0
30257 if v_1.Op != OpAdd32 {
30258 break
30259 }
30260 _ = v_1.Args[1]
30261 v_1_0 := v_1.Args[0]
30262 v_1_1 := v_1.Args[1]
30263 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
30264 z := v_1_0
30265 i := v_1_1
30266 if i.Op != OpConst32 {
30267 continue
30268 }
30269 t := i.Type
30270 if !(z.Op != OpConst32 && x.Op != OpConst32) {
30271 continue
30272 }
30273 v.reset(OpSub32)
30274 v0 := b.NewValue0(v.Pos, OpSub32, t)
30275 v0.AddArg2(x, z)
30276 v.AddArg2(v0, i)
30277 return true
30278 }
30279 break
30280 }
30281
30282
30283
30284 for {
30285 if v_0.Op != OpSub32 {
30286 break
30287 }
30288 z := v_0.Args[1]
30289 i := v_0.Args[0]
30290 if i.Op != OpConst32 {
30291 break
30292 }
30293 t := i.Type
30294 x := v_1
30295 if !(z.Op != OpConst32 && x.Op != OpConst32) {
30296 break
30297 }
30298 v.reset(OpSub32)
30299 v0 := b.NewValue0(v.Pos, OpAdd32, t)
30300 v0.AddArg2(z, x)
30301 v.AddArg2(i, v0)
30302 return true
30303 }
30304
30305
30306
30307 for {
30308 if v_0.Op != OpAdd32 {
30309 break
30310 }
30311 _ = v_0.Args[1]
30312 v_0_0 := v_0.Args[0]
30313 v_0_1 := v_0.Args[1]
30314 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
30315 z := v_0_0
30316 i := v_0_1
30317 if i.Op != OpConst32 {
30318 continue
30319 }
30320 t := i.Type
30321 x := v_1
30322 if !(z.Op != OpConst32 && x.Op != OpConst32) {
30323 continue
30324 }
30325 v.reset(OpAdd32)
30326 v0 := b.NewValue0(v.Pos, OpSub32, t)
30327 v0.AddArg2(z, x)
30328 v.AddArg2(i, v0)
30329 return true
30330 }
30331 break
30332 }
30333
30334
30335 for {
30336 if v_0.Op != OpConst32 {
30337 break
30338 }
30339 t := v_0.Type
30340 c := auxIntToInt32(v_0.AuxInt)
30341 if v_1.Op != OpSub32 {
30342 break
30343 }
30344 x := v_1.Args[1]
30345 v_1_0 := v_1.Args[0]
30346 if v_1_0.Op != OpConst32 || v_1_0.Type != t {
30347 break
30348 }
30349 d := auxIntToInt32(v_1_0.AuxInt)
30350 v.reset(OpAdd32)
30351 v0 := b.NewValue0(v.Pos, OpConst32, t)
30352 v0.AuxInt = int32ToAuxInt(c - d)
30353 v.AddArg2(v0, x)
30354 return true
30355 }
30356
30357
30358 for {
30359 if v_0.Op != OpConst32 {
30360 break
30361 }
30362 t := v_0.Type
30363 c := auxIntToInt32(v_0.AuxInt)
30364 if v_1.Op != OpAdd32 {
30365 break
30366 }
30367 _ = v_1.Args[1]
30368 v_1_0 := v_1.Args[0]
30369 v_1_1 := v_1.Args[1]
30370 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
30371 if v_1_0.Op != OpConst32 || v_1_0.Type != t {
30372 continue
30373 }
30374 d := auxIntToInt32(v_1_0.AuxInt)
30375 x := v_1_1
30376 v.reset(OpSub32)
30377 v0 := b.NewValue0(v.Pos, OpConst32, t)
30378 v0.AuxInt = int32ToAuxInt(c - d)
30379 v.AddArg2(v0, x)
30380 return true
30381 }
30382 break
30383 }
30384 return false
30385 }
30386 func rewriteValuegeneric_OpSub32F(v *Value) bool {
30387 v_1 := v.Args[1]
30388 v_0 := v.Args[0]
30389
30390
30391
30392 for {
30393 if v_0.Op != OpConst32F {
30394 break
30395 }
30396 c := auxIntToFloat32(v_0.AuxInt)
30397 if v_1.Op != OpConst32F {
30398 break
30399 }
30400 d := auxIntToFloat32(v_1.AuxInt)
30401 if !(c-d == c-d) {
30402 break
30403 }
30404 v.reset(OpConst32F)
30405 v.AuxInt = float32ToAuxInt(c - d)
30406 return true
30407 }
30408 return false
30409 }
30410 func rewriteValuegeneric_OpSub64(v *Value) bool {
30411 v_1 := v.Args[1]
30412 v_0 := v.Args[0]
30413 b := v.Block
30414
30415
30416 for {
30417 if v_0.Op != OpConst64 {
30418 break
30419 }
30420 c := auxIntToInt64(v_0.AuxInt)
30421 if v_1.Op != OpConst64 {
30422 break
30423 }
30424 d := auxIntToInt64(v_1.AuxInt)
30425 v.reset(OpConst64)
30426 v.AuxInt = int64ToAuxInt(c - d)
30427 return true
30428 }
30429
30430
30431
30432 for {
30433 x := v_0
30434 if v_1.Op != OpConst64 {
30435 break
30436 }
30437 t := v_1.Type
30438 c := auxIntToInt64(v_1.AuxInt)
30439 if !(x.Op != OpConst64) {
30440 break
30441 }
30442 v.reset(OpAdd64)
30443 v0 := b.NewValue0(v.Pos, OpConst64, t)
30444 v0.AuxInt = int64ToAuxInt(-c)
30445 v.AddArg2(v0, x)
30446 return true
30447 }
30448
30449
30450 for {
30451 t := v.Type
30452 if v_0.Op != OpMul64 {
30453 break
30454 }
30455 _ = v_0.Args[1]
30456 v_0_0 := v_0.Args[0]
30457 v_0_1 := v_0.Args[1]
30458 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
30459 x := v_0_0
30460 y := v_0_1
30461 if v_1.Op != OpMul64 {
30462 continue
30463 }
30464 _ = v_1.Args[1]
30465 v_1_0 := v_1.Args[0]
30466 v_1_1 := v_1.Args[1]
30467 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
30468 if x != v_1_0 {
30469 continue
30470 }
30471 z := v_1_1
30472 v.reset(OpMul64)
30473 v0 := b.NewValue0(v.Pos, OpSub64, t)
30474 v0.AddArg2(y, z)
30475 v.AddArg2(x, v0)
30476 return true
30477 }
30478 }
30479 break
30480 }
30481
30482
30483 for {
30484 x := v_0
30485 if x != v_1 {
30486 break
30487 }
30488 v.reset(OpConst64)
30489 v.AuxInt = int64ToAuxInt(0)
30490 return true
30491 }
30492
30493
30494 for {
30495 if v_0.Op != OpNeg64 {
30496 break
30497 }
30498 x := v_0.Args[0]
30499 if v_1.Op != OpCom64 || x != v_1.Args[0] {
30500 break
30501 }
30502 v.reset(OpConst64)
30503 v.AuxInt = int64ToAuxInt(1)
30504 return true
30505 }
30506
30507
30508 for {
30509 if v_0.Op != OpCom64 {
30510 break
30511 }
30512 x := v_0.Args[0]
30513 if v_1.Op != OpNeg64 || x != v_1.Args[0] {
30514 break
30515 }
30516 v.reset(OpConst64)
30517 v.AuxInt = int64ToAuxInt(-1)
30518 return true
30519 }
30520
30521
30522 for {
30523 if v_0.Op != OpAdd64 {
30524 break
30525 }
30526 _ = v_0.Args[1]
30527 v_0_0 := v_0.Args[0]
30528 v_0_1 := v_0.Args[1]
30529 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
30530 t := v_0_0
30531 x := v_0_1
30532 if v_1.Op != OpAdd64 {
30533 continue
30534 }
30535 _ = v_1.Args[1]
30536 v_1_0 := v_1.Args[0]
30537 v_1_1 := v_1.Args[1]
30538 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
30539 if t != v_1_0 {
30540 continue
30541 }
30542 y := v_1_1
30543 v.reset(OpSub64)
30544 v.AddArg2(x, y)
30545 return true
30546 }
30547 }
30548 break
30549 }
30550
30551
30552 for {
30553 if v_0.Op != OpAdd64 {
30554 break
30555 }
30556 _ = v_0.Args[1]
30557 v_0_0 := v_0.Args[0]
30558 v_0_1 := v_0.Args[1]
30559 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
30560 x := v_0_0
30561 y := v_0_1
30562 if x != v_1 {
30563 continue
30564 }
30565 v.copyOf(y)
30566 return true
30567 }
30568 break
30569 }
30570
30571
30572 for {
30573 if v_0.Op != OpAdd64 {
30574 break
30575 }
30576 _ = v_0.Args[1]
30577 v_0_0 := v_0.Args[0]
30578 v_0_1 := v_0.Args[1]
30579 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
30580 x := v_0_0
30581 y := v_0_1
30582 if y != v_1 {
30583 continue
30584 }
30585 v.copyOf(x)
30586 return true
30587 }
30588 break
30589 }
30590
30591
30592 for {
30593 if v_0.Op != OpSub64 {
30594 break
30595 }
30596 y := v_0.Args[1]
30597 x := v_0.Args[0]
30598 if x != v_1 {
30599 break
30600 }
30601 v.reset(OpNeg64)
30602 v.AddArg(y)
30603 return true
30604 }
30605
30606
30607 for {
30608 x := v_0
30609 if v_1.Op != OpAdd64 {
30610 break
30611 }
30612 _ = v_1.Args[1]
30613 v_1_0 := v_1.Args[0]
30614 v_1_1 := v_1.Args[1]
30615 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
30616 if x != v_1_0 {
30617 continue
30618 }
30619 y := v_1_1
30620 v.reset(OpNeg64)
30621 v.AddArg(y)
30622 return true
30623 }
30624 break
30625 }
30626
30627
30628
30629 for {
30630 x := v_0
30631 if v_1.Op != OpSub64 {
30632 break
30633 }
30634 z := v_1.Args[1]
30635 i := v_1.Args[0]
30636 if i.Op != OpConst64 {
30637 break
30638 }
30639 t := i.Type
30640 if !(z.Op != OpConst64 && x.Op != OpConst64) {
30641 break
30642 }
30643 v.reset(OpSub64)
30644 v0 := b.NewValue0(v.Pos, OpAdd64, t)
30645 v0.AddArg2(x, z)
30646 v.AddArg2(v0, i)
30647 return true
30648 }
30649
30650
30651
30652 for {
30653 x := v_0
30654 if v_1.Op != OpAdd64 {
30655 break
30656 }
30657 _ = v_1.Args[1]
30658 v_1_0 := v_1.Args[0]
30659 v_1_1 := v_1.Args[1]
30660 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
30661 z := v_1_0
30662 i := v_1_1
30663 if i.Op != OpConst64 {
30664 continue
30665 }
30666 t := i.Type
30667 if !(z.Op != OpConst64 && x.Op != OpConst64) {
30668 continue
30669 }
30670 v.reset(OpSub64)
30671 v0 := b.NewValue0(v.Pos, OpSub64, t)
30672 v0.AddArg2(x, z)
30673 v.AddArg2(v0, i)
30674 return true
30675 }
30676 break
30677 }
30678
30679
30680
30681 for {
30682 if v_0.Op != OpSub64 {
30683 break
30684 }
30685 z := v_0.Args[1]
30686 i := v_0.Args[0]
30687 if i.Op != OpConst64 {
30688 break
30689 }
30690 t := i.Type
30691 x := v_1
30692 if !(z.Op != OpConst64 && x.Op != OpConst64) {
30693 break
30694 }
30695 v.reset(OpSub64)
30696 v0 := b.NewValue0(v.Pos, OpAdd64, t)
30697 v0.AddArg2(z, x)
30698 v.AddArg2(i, v0)
30699 return true
30700 }
30701
30702
30703
30704 for {
30705 if v_0.Op != OpAdd64 {
30706 break
30707 }
30708 _ = v_0.Args[1]
30709 v_0_0 := v_0.Args[0]
30710 v_0_1 := v_0.Args[1]
30711 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
30712 z := v_0_0
30713 i := v_0_1
30714 if i.Op != OpConst64 {
30715 continue
30716 }
30717 t := i.Type
30718 x := v_1
30719 if !(z.Op != OpConst64 && x.Op != OpConst64) {
30720 continue
30721 }
30722 v.reset(OpAdd64)
30723 v0 := b.NewValue0(v.Pos, OpSub64, t)
30724 v0.AddArg2(z, x)
30725 v.AddArg2(i, v0)
30726 return true
30727 }
30728 break
30729 }
30730
30731
30732 for {
30733 if v_0.Op != OpConst64 {
30734 break
30735 }
30736 t := v_0.Type
30737 c := auxIntToInt64(v_0.AuxInt)
30738 if v_1.Op != OpSub64 {
30739 break
30740 }
30741 x := v_1.Args[1]
30742 v_1_0 := v_1.Args[0]
30743 if v_1_0.Op != OpConst64 || v_1_0.Type != t {
30744 break
30745 }
30746 d := auxIntToInt64(v_1_0.AuxInt)
30747 v.reset(OpAdd64)
30748 v0 := b.NewValue0(v.Pos, OpConst64, t)
30749 v0.AuxInt = int64ToAuxInt(c - d)
30750 v.AddArg2(v0, x)
30751 return true
30752 }
30753
30754
30755 for {
30756 if v_0.Op != OpConst64 {
30757 break
30758 }
30759 t := v_0.Type
30760 c := auxIntToInt64(v_0.AuxInt)
30761 if v_1.Op != OpAdd64 {
30762 break
30763 }
30764 _ = v_1.Args[1]
30765 v_1_0 := v_1.Args[0]
30766 v_1_1 := v_1.Args[1]
30767 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
30768 if v_1_0.Op != OpConst64 || v_1_0.Type != t {
30769 continue
30770 }
30771 d := auxIntToInt64(v_1_0.AuxInt)
30772 x := v_1_1
30773 v.reset(OpSub64)
30774 v0 := b.NewValue0(v.Pos, OpConst64, t)
30775 v0.AuxInt = int64ToAuxInt(c - d)
30776 v.AddArg2(v0, x)
30777 return true
30778 }
30779 break
30780 }
30781 return false
30782 }
30783 func rewriteValuegeneric_OpSub64F(v *Value) bool {
30784 v_1 := v.Args[1]
30785 v_0 := v.Args[0]
30786
30787
30788
30789 for {
30790 if v_0.Op != OpConst64F {
30791 break
30792 }
30793 c := auxIntToFloat64(v_0.AuxInt)
30794 if v_1.Op != OpConst64F {
30795 break
30796 }
30797 d := auxIntToFloat64(v_1.AuxInt)
30798 if !(c-d == c-d) {
30799 break
30800 }
30801 v.reset(OpConst64F)
30802 v.AuxInt = float64ToAuxInt(c - d)
30803 return true
30804 }
30805 return false
30806 }
30807 func rewriteValuegeneric_OpSub8(v *Value) bool {
30808 v_1 := v.Args[1]
30809 v_0 := v.Args[0]
30810 b := v.Block
30811
30812
30813 for {
30814 if v_0.Op != OpConst8 {
30815 break
30816 }
30817 c := auxIntToInt8(v_0.AuxInt)
30818 if v_1.Op != OpConst8 {
30819 break
30820 }
30821 d := auxIntToInt8(v_1.AuxInt)
30822 v.reset(OpConst8)
30823 v.AuxInt = int8ToAuxInt(c - d)
30824 return true
30825 }
30826
30827
30828
30829 for {
30830 x := v_0
30831 if v_1.Op != OpConst8 {
30832 break
30833 }
30834 t := v_1.Type
30835 c := auxIntToInt8(v_1.AuxInt)
30836 if !(x.Op != OpConst8) {
30837 break
30838 }
30839 v.reset(OpAdd8)
30840 v0 := b.NewValue0(v.Pos, OpConst8, t)
30841 v0.AuxInt = int8ToAuxInt(-c)
30842 v.AddArg2(v0, x)
30843 return true
30844 }
30845
30846
30847 for {
30848 t := v.Type
30849 if v_0.Op != OpMul8 {
30850 break
30851 }
30852 _ = v_0.Args[1]
30853 v_0_0 := v_0.Args[0]
30854 v_0_1 := v_0.Args[1]
30855 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
30856 x := v_0_0
30857 y := v_0_1
30858 if v_1.Op != OpMul8 {
30859 continue
30860 }
30861 _ = v_1.Args[1]
30862 v_1_0 := v_1.Args[0]
30863 v_1_1 := v_1.Args[1]
30864 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
30865 if x != v_1_0 {
30866 continue
30867 }
30868 z := v_1_1
30869 v.reset(OpMul8)
30870 v0 := b.NewValue0(v.Pos, OpSub8, t)
30871 v0.AddArg2(y, z)
30872 v.AddArg2(x, v0)
30873 return true
30874 }
30875 }
30876 break
30877 }
30878
30879
30880 for {
30881 x := v_0
30882 if x != v_1 {
30883 break
30884 }
30885 v.reset(OpConst8)
30886 v.AuxInt = int8ToAuxInt(0)
30887 return true
30888 }
30889
30890
30891 for {
30892 if v_0.Op != OpNeg8 {
30893 break
30894 }
30895 x := v_0.Args[0]
30896 if v_1.Op != OpCom8 || x != v_1.Args[0] {
30897 break
30898 }
30899 v.reset(OpConst8)
30900 v.AuxInt = int8ToAuxInt(1)
30901 return true
30902 }
30903
30904
30905 for {
30906 if v_0.Op != OpCom8 {
30907 break
30908 }
30909 x := v_0.Args[0]
30910 if v_1.Op != OpNeg8 || x != v_1.Args[0] {
30911 break
30912 }
30913 v.reset(OpConst8)
30914 v.AuxInt = int8ToAuxInt(-1)
30915 return true
30916 }
30917
30918
30919 for {
30920 if v_0.Op != OpAdd8 {
30921 break
30922 }
30923 _ = v_0.Args[1]
30924 v_0_0 := v_0.Args[0]
30925 v_0_1 := v_0.Args[1]
30926 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
30927 t := v_0_0
30928 x := v_0_1
30929 if v_1.Op != OpAdd8 {
30930 continue
30931 }
30932 _ = v_1.Args[1]
30933 v_1_0 := v_1.Args[0]
30934 v_1_1 := v_1.Args[1]
30935 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
30936 if t != v_1_0 {
30937 continue
30938 }
30939 y := v_1_1
30940 v.reset(OpSub8)
30941 v.AddArg2(x, y)
30942 return true
30943 }
30944 }
30945 break
30946 }
30947
30948
30949 for {
30950 if v_0.Op != OpAdd8 {
30951 break
30952 }
30953 _ = v_0.Args[1]
30954 v_0_0 := v_0.Args[0]
30955 v_0_1 := v_0.Args[1]
30956 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
30957 x := v_0_0
30958 y := v_0_1
30959 if x != v_1 {
30960 continue
30961 }
30962 v.copyOf(y)
30963 return true
30964 }
30965 break
30966 }
30967
30968
30969 for {
30970 if v_0.Op != OpAdd8 {
30971 break
30972 }
30973 _ = v_0.Args[1]
30974 v_0_0 := v_0.Args[0]
30975 v_0_1 := v_0.Args[1]
30976 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
30977 x := v_0_0
30978 y := v_0_1
30979 if y != v_1 {
30980 continue
30981 }
30982 v.copyOf(x)
30983 return true
30984 }
30985 break
30986 }
30987
30988
30989 for {
30990 if v_0.Op != OpSub8 {
30991 break
30992 }
30993 y := v_0.Args[1]
30994 x := v_0.Args[0]
30995 if x != v_1 {
30996 break
30997 }
30998 v.reset(OpNeg8)
30999 v.AddArg(y)
31000 return true
31001 }
31002
31003
31004 for {
31005 x := v_0
31006 if v_1.Op != OpAdd8 {
31007 break
31008 }
31009 _ = v_1.Args[1]
31010 v_1_0 := v_1.Args[0]
31011 v_1_1 := v_1.Args[1]
31012 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
31013 if x != v_1_0 {
31014 continue
31015 }
31016 y := v_1_1
31017 v.reset(OpNeg8)
31018 v.AddArg(y)
31019 return true
31020 }
31021 break
31022 }
31023
31024
31025
31026 for {
31027 x := v_0
31028 if v_1.Op != OpSub8 {
31029 break
31030 }
31031 z := v_1.Args[1]
31032 i := v_1.Args[0]
31033 if i.Op != OpConst8 {
31034 break
31035 }
31036 t := i.Type
31037 if !(z.Op != OpConst8 && x.Op != OpConst8) {
31038 break
31039 }
31040 v.reset(OpSub8)
31041 v0 := b.NewValue0(v.Pos, OpAdd8, t)
31042 v0.AddArg2(x, z)
31043 v.AddArg2(v0, i)
31044 return true
31045 }
31046
31047
31048
31049 for {
31050 x := v_0
31051 if v_1.Op != OpAdd8 {
31052 break
31053 }
31054 _ = v_1.Args[1]
31055 v_1_0 := v_1.Args[0]
31056 v_1_1 := v_1.Args[1]
31057 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
31058 z := v_1_0
31059 i := v_1_1
31060 if i.Op != OpConst8 {
31061 continue
31062 }
31063 t := i.Type
31064 if !(z.Op != OpConst8 && x.Op != OpConst8) {
31065 continue
31066 }
31067 v.reset(OpSub8)
31068 v0 := b.NewValue0(v.Pos, OpSub8, t)
31069 v0.AddArg2(x, z)
31070 v.AddArg2(v0, i)
31071 return true
31072 }
31073 break
31074 }
31075
31076
31077
31078 for {
31079 if v_0.Op != OpSub8 {
31080 break
31081 }
31082 z := v_0.Args[1]
31083 i := v_0.Args[0]
31084 if i.Op != OpConst8 {
31085 break
31086 }
31087 t := i.Type
31088 x := v_1
31089 if !(z.Op != OpConst8 && x.Op != OpConst8) {
31090 break
31091 }
31092 v.reset(OpSub8)
31093 v0 := b.NewValue0(v.Pos, OpAdd8, t)
31094 v0.AddArg2(z, x)
31095 v.AddArg2(i, v0)
31096 return true
31097 }
31098
31099
31100
31101 for {
31102 if v_0.Op != OpAdd8 {
31103 break
31104 }
31105 _ = v_0.Args[1]
31106 v_0_0 := v_0.Args[0]
31107 v_0_1 := v_0.Args[1]
31108 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
31109 z := v_0_0
31110 i := v_0_1
31111 if i.Op != OpConst8 {
31112 continue
31113 }
31114 t := i.Type
31115 x := v_1
31116 if !(z.Op != OpConst8 && x.Op != OpConst8) {
31117 continue
31118 }
31119 v.reset(OpAdd8)
31120 v0 := b.NewValue0(v.Pos, OpSub8, t)
31121 v0.AddArg2(z, x)
31122 v.AddArg2(i, v0)
31123 return true
31124 }
31125 break
31126 }
31127
31128
31129 for {
31130 if v_0.Op != OpConst8 {
31131 break
31132 }
31133 t := v_0.Type
31134 c := auxIntToInt8(v_0.AuxInt)
31135 if v_1.Op != OpSub8 {
31136 break
31137 }
31138 x := v_1.Args[1]
31139 v_1_0 := v_1.Args[0]
31140 if v_1_0.Op != OpConst8 || v_1_0.Type != t {
31141 break
31142 }
31143 d := auxIntToInt8(v_1_0.AuxInt)
31144 v.reset(OpAdd8)
31145 v0 := b.NewValue0(v.Pos, OpConst8, t)
31146 v0.AuxInt = int8ToAuxInt(c - d)
31147 v.AddArg2(v0, x)
31148 return true
31149 }
31150
31151
31152 for {
31153 if v_0.Op != OpConst8 {
31154 break
31155 }
31156 t := v_0.Type
31157 c := auxIntToInt8(v_0.AuxInt)
31158 if v_1.Op != OpAdd8 {
31159 break
31160 }
31161 _ = v_1.Args[1]
31162 v_1_0 := v_1.Args[0]
31163 v_1_1 := v_1.Args[1]
31164 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
31165 if v_1_0.Op != OpConst8 || v_1_0.Type != t {
31166 continue
31167 }
31168 d := auxIntToInt8(v_1_0.AuxInt)
31169 x := v_1_1
31170 v.reset(OpSub8)
31171 v0 := b.NewValue0(v.Pos, OpConst8, t)
31172 v0.AuxInt = int8ToAuxInt(c - d)
31173 v.AddArg2(v0, x)
31174 return true
31175 }
31176 break
31177 }
31178 return false
31179 }
31180 func rewriteValuegeneric_OpTrunc(v *Value) bool {
31181 v_0 := v.Args[0]
31182
31183
31184 for {
31185 if v_0.Op != OpConst64F {
31186 break
31187 }
31188 c := auxIntToFloat64(v_0.AuxInt)
31189 v.reset(OpConst64F)
31190 v.AuxInt = float64ToAuxInt(math.Trunc(c))
31191 return true
31192 }
31193 return false
31194 }
31195 func rewriteValuegeneric_OpTrunc16to8(v *Value) bool {
31196 v_0 := v.Args[0]
31197
31198
31199 for {
31200 if v_0.Op != OpConst16 {
31201 break
31202 }
31203 c := auxIntToInt16(v_0.AuxInt)
31204 v.reset(OpConst8)
31205 v.AuxInt = int8ToAuxInt(int8(c))
31206 return true
31207 }
31208
31209
31210 for {
31211 if v_0.Op != OpZeroExt8to16 {
31212 break
31213 }
31214 x := v_0.Args[0]
31215 v.copyOf(x)
31216 return true
31217 }
31218
31219
31220 for {
31221 if v_0.Op != OpSignExt8to16 {
31222 break
31223 }
31224 x := v_0.Args[0]
31225 v.copyOf(x)
31226 return true
31227 }
31228
31229
31230
31231 for {
31232 if v_0.Op != OpAnd16 {
31233 break
31234 }
31235 _ = v_0.Args[1]
31236 v_0_0 := v_0.Args[0]
31237 v_0_1 := v_0.Args[1]
31238 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
31239 if v_0_0.Op != OpConst16 {
31240 continue
31241 }
31242 y := auxIntToInt16(v_0_0.AuxInt)
31243 x := v_0_1
31244 if !(y&0xFF == 0xFF) {
31245 continue
31246 }
31247 v.reset(OpTrunc16to8)
31248 v.AddArg(x)
31249 return true
31250 }
31251 break
31252 }
31253 return false
31254 }
31255 func rewriteValuegeneric_OpTrunc32to16(v *Value) bool {
31256 v_0 := v.Args[0]
31257
31258
31259 for {
31260 if v_0.Op != OpConst32 {
31261 break
31262 }
31263 c := auxIntToInt32(v_0.AuxInt)
31264 v.reset(OpConst16)
31265 v.AuxInt = int16ToAuxInt(int16(c))
31266 return true
31267 }
31268
31269
31270 for {
31271 if v_0.Op != OpZeroExt8to32 {
31272 break
31273 }
31274 x := v_0.Args[0]
31275 v.reset(OpZeroExt8to16)
31276 v.AddArg(x)
31277 return true
31278 }
31279
31280
31281 for {
31282 if v_0.Op != OpZeroExt16to32 {
31283 break
31284 }
31285 x := v_0.Args[0]
31286 v.copyOf(x)
31287 return true
31288 }
31289
31290
31291 for {
31292 if v_0.Op != OpSignExt8to32 {
31293 break
31294 }
31295 x := v_0.Args[0]
31296 v.reset(OpSignExt8to16)
31297 v.AddArg(x)
31298 return true
31299 }
31300
31301
31302 for {
31303 if v_0.Op != OpSignExt16to32 {
31304 break
31305 }
31306 x := v_0.Args[0]
31307 v.copyOf(x)
31308 return true
31309 }
31310
31311
31312
31313 for {
31314 if v_0.Op != OpAnd32 {
31315 break
31316 }
31317 _ = v_0.Args[1]
31318 v_0_0 := v_0.Args[0]
31319 v_0_1 := v_0.Args[1]
31320 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
31321 if v_0_0.Op != OpConst32 {
31322 continue
31323 }
31324 y := auxIntToInt32(v_0_0.AuxInt)
31325 x := v_0_1
31326 if !(y&0xFFFF == 0xFFFF) {
31327 continue
31328 }
31329 v.reset(OpTrunc32to16)
31330 v.AddArg(x)
31331 return true
31332 }
31333 break
31334 }
31335 return false
31336 }
31337 func rewriteValuegeneric_OpTrunc32to8(v *Value) bool {
31338 v_0 := v.Args[0]
31339
31340
31341 for {
31342 if v_0.Op != OpConst32 {
31343 break
31344 }
31345 c := auxIntToInt32(v_0.AuxInt)
31346 v.reset(OpConst8)
31347 v.AuxInt = int8ToAuxInt(int8(c))
31348 return true
31349 }
31350
31351
31352 for {
31353 if v_0.Op != OpZeroExt8to32 {
31354 break
31355 }
31356 x := v_0.Args[0]
31357 v.copyOf(x)
31358 return true
31359 }
31360
31361
31362 for {
31363 if v_0.Op != OpSignExt8to32 {
31364 break
31365 }
31366 x := v_0.Args[0]
31367 v.copyOf(x)
31368 return true
31369 }
31370
31371
31372
31373 for {
31374 if v_0.Op != OpAnd32 {
31375 break
31376 }
31377 _ = v_0.Args[1]
31378 v_0_0 := v_0.Args[0]
31379 v_0_1 := v_0.Args[1]
31380 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
31381 if v_0_0.Op != OpConst32 {
31382 continue
31383 }
31384 y := auxIntToInt32(v_0_0.AuxInt)
31385 x := v_0_1
31386 if !(y&0xFF == 0xFF) {
31387 continue
31388 }
31389 v.reset(OpTrunc32to8)
31390 v.AddArg(x)
31391 return true
31392 }
31393 break
31394 }
31395 return false
31396 }
31397 func rewriteValuegeneric_OpTrunc64to16(v *Value) bool {
31398 v_0 := v.Args[0]
31399
31400
31401 for {
31402 if v_0.Op != OpConst64 {
31403 break
31404 }
31405 c := auxIntToInt64(v_0.AuxInt)
31406 v.reset(OpConst16)
31407 v.AuxInt = int16ToAuxInt(int16(c))
31408 return true
31409 }
31410
31411
31412 for {
31413 if v_0.Op != OpZeroExt8to64 {
31414 break
31415 }
31416 x := v_0.Args[0]
31417 v.reset(OpZeroExt8to16)
31418 v.AddArg(x)
31419 return true
31420 }
31421
31422
31423 for {
31424 if v_0.Op != OpZeroExt16to64 {
31425 break
31426 }
31427 x := v_0.Args[0]
31428 v.copyOf(x)
31429 return true
31430 }
31431
31432
31433 for {
31434 if v_0.Op != OpSignExt8to64 {
31435 break
31436 }
31437 x := v_0.Args[0]
31438 v.reset(OpSignExt8to16)
31439 v.AddArg(x)
31440 return true
31441 }
31442
31443
31444 for {
31445 if v_0.Op != OpSignExt16to64 {
31446 break
31447 }
31448 x := v_0.Args[0]
31449 v.copyOf(x)
31450 return true
31451 }
31452
31453
31454
31455 for {
31456 if v_0.Op != OpAnd64 {
31457 break
31458 }
31459 _ = v_0.Args[1]
31460 v_0_0 := v_0.Args[0]
31461 v_0_1 := v_0.Args[1]
31462 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
31463 if v_0_0.Op != OpConst64 {
31464 continue
31465 }
31466 y := auxIntToInt64(v_0_0.AuxInt)
31467 x := v_0_1
31468 if !(y&0xFFFF == 0xFFFF) {
31469 continue
31470 }
31471 v.reset(OpTrunc64to16)
31472 v.AddArg(x)
31473 return true
31474 }
31475 break
31476 }
31477 return false
31478 }
31479 func rewriteValuegeneric_OpTrunc64to32(v *Value) bool {
31480 v_0 := v.Args[0]
31481
31482
31483 for {
31484 if v_0.Op != OpConst64 {
31485 break
31486 }
31487 c := auxIntToInt64(v_0.AuxInt)
31488 v.reset(OpConst32)
31489 v.AuxInt = int32ToAuxInt(int32(c))
31490 return true
31491 }
31492
31493
31494 for {
31495 if v_0.Op != OpZeroExt8to64 {
31496 break
31497 }
31498 x := v_0.Args[0]
31499 v.reset(OpZeroExt8to32)
31500 v.AddArg(x)
31501 return true
31502 }
31503
31504
31505 for {
31506 if v_0.Op != OpZeroExt16to64 {
31507 break
31508 }
31509 x := v_0.Args[0]
31510 v.reset(OpZeroExt16to32)
31511 v.AddArg(x)
31512 return true
31513 }
31514
31515
31516 for {
31517 if v_0.Op != OpZeroExt32to64 {
31518 break
31519 }
31520 x := v_0.Args[0]
31521 v.copyOf(x)
31522 return true
31523 }
31524
31525
31526 for {
31527 if v_0.Op != OpSignExt8to64 {
31528 break
31529 }
31530 x := v_0.Args[0]
31531 v.reset(OpSignExt8to32)
31532 v.AddArg(x)
31533 return true
31534 }
31535
31536
31537 for {
31538 if v_0.Op != OpSignExt16to64 {
31539 break
31540 }
31541 x := v_0.Args[0]
31542 v.reset(OpSignExt16to32)
31543 v.AddArg(x)
31544 return true
31545 }
31546
31547
31548 for {
31549 if v_0.Op != OpSignExt32to64 {
31550 break
31551 }
31552 x := v_0.Args[0]
31553 v.copyOf(x)
31554 return true
31555 }
31556
31557
31558
31559 for {
31560 if v_0.Op != OpAnd64 {
31561 break
31562 }
31563 _ = v_0.Args[1]
31564 v_0_0 := v_0.Args[0]
31565 v_0_1 := v_0.Args[1]
31566 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
31567 if v_0_0.Op != OpConst64 {
31568 continue
31569 }
31570 y := auxIntToInt64(v_0_0.AuxInt)
31571 x := v_0_1
31572 if !(y&0xFFFFFFFF == 0xFFFFFFFF) {
31573 continue
31574 }
31575 v.reset(OpTrunc64to32)
31576 v.AddArg(x)
31577 return true
31578 }
31579 break
31580 }
31581 return false
31582 }
31583 func rewriteValuegeneric_OpTrunc64to8(v *Value) bool {
31584 v_0 := v.Args[0]
31585
31586
31587 for {
31588 if v_0.Op != OpConst64 {
31589 break
31590 }
31591 c := auxIntToInt64(v_0.AuxInt)
31592 v.reset(OpConst8)
31593 v.AuxInt = int8ToAuxInt(int8(c))
31594 return true
31595 }
31596
31597
31598 for {
31599 if v_0.Op != OpZeroExt8to64 {
31600 break
31601 }
31602 x := v_0.Args[0]
31603 v.copyOf(x)
31604 return true
31605 }
31606
31607
31608 for {
31609 if v_0.Op != OpSignExt8to64 {
31610 break
31611 }
31612 x := v_0.Args[0]
31613 v.copyOf(x)
31614 return true
31615 }
31616
31617
31618
31619 for {
31620 if v_0.Op != OpAnd64 {
31621 break
31622 }
31623 _ = v_0.Args[1]
31624 v_0_0 := v_0.Args[0]
31625 v_0_1 := v_0.Args[1]
31626 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
31627 if v_0_0.Op != OpConst64 {
31628 continue
31629 }
31630 y := auxIntToInt64(v_0_0.AuxInt)
31631 x := v_0_1
31632 if !(y&0xFF == 0xFF) {
31633 continue
31634 }
31635 v.reset(OpTrunc64to8)
31636 v.AddArg(x)
31637 return true
31638 }
31639 break
31640 }
31641 return false
31642 }
31643 func rewriteValuegeneric_OpXor16(v *Value) bool {
31644 v_1 := v.Args[1]
31645 v_0 := v.Args[0]
31646 b := v.Block
31647 config := b.Func.Config
31648
31649
31650 for {
31651 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
31652 if v_0.Op != OpConst16 {
31653 continue
31654 }
31655 c := auxIntToInt16(v_0.AuxInt)
31656 if v_1.Op != OpConst16 {
31657 continue
31658 }
31659 d := auxIntToInt16(v_1.AuxInt)
31660 v.reset(OpConst16)
31661 v.AuxInt = int16ToAuxInt(c ^ d)
31662 return true
31663 }
31664 break
31665 }
31666
31667
31668 for {
31669 x := v_0
31670 if x != v_1 {
31671 break
31672 }
31673 v.reset(OpConst16)
31674 v.AuxInt = int16ToAuxInt(0)
31675 return true
31676 }
31677
31678
31679 for {
31680 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
31681 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 {
31682 continue
31683 }
31684 x := v_1
31685 v.copyOf(x)
31686 return true
31687 }
31688 break
31689 }
31690
31691
31692 for {
31693 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
31694 if v_0.Op != OpCom16 {
31695 continue
31696 }
31697 x := v_0.Args[0]
31698 if x != v_1 {
31699 continue
31700 }
31701 v.reset(OpConst16)
31702 v.AuxInt = int16ToAuxInt(-1)
31703 return true
31704 }
31705 break
31706 }
31707
31708
31709 for {
31710 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
31711 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != -1 {
31712 continue
31713 }
31714 x := v_1
31715 v.reset(OpCom16)
31716 v.AddArg(x)
31717 return true
31718 }
31719 break
31720 }
31721
31722
31723 for {
31724 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
31725 x := v_0
31726 if v_1.Op != OpXor16 {
31727 continue
31728 }
31729 _ = v_1.Args[1]
31730 v_1_0 := v_1.Args[0]
31731 v_1_1 := v_1.Args[1]
31732 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
31733 if x != v_1_0 {
31734 continue
31735 }
31736 y := v_1_1
31737 v.copyOf(y)
31738 return true
31739 }
31740 }
31741 break
31742 }
31743
31744
31745
31746 for {
31747 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
31748 if v_0.Op != OpXor16 {
31749 continue
31750 }
31751 _ = v_0.Args[1]
31752 v_0_0 := v_0.Args[0]
31753 v_0_1 := v_0.Args[1]
31754 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
31755 i := v_0_0
31756 if i.Op != OpConst16 {
31757 continue
31758 }
31759 t := i.Type
31760 z := v_0_1
31761 x := v_1
31762 if !(z.Op != OpConst16 && x.Op != OpConst16) {
31763 continue
31764 }
31765 v.reset(OpXor16)
31766 v0 := b.NewValue0(v.Pos, OpXor16, t)
31767 v0.AddArg2(z, x)
31768 v.AddArg2(i, v0)
31769 return true
31770 }
31771 }
31772 break
31773 }
31774
31775
31776 for {
31777 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
31778 if v_0.Op != OpConst16 {
31779 continue
31780 }
31781 t := v_0.Type
31782 c := auxIntToInt16(v_0.AuxInt)
31783 if v_1.Op != OpXor16 {
31784 continue
31785 }
31786 _ = v_1.Args[1]
31787 v_1_0 := v_1.Args[0]
31788 v_1_1 := v_1.Args[1]
31789 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
31790 if v_1_0.Op != OpConst16 || v_1_0.Type != t {
31791 continue
31792 }
31793 d := auxIntToInt16(v_1_0.AuxInt)
31794 x := v_1_1
31795 v.reset(OpXor16)
31796 v0 := b.NewValue0(v.Pos, OpConst16, t)
31797 v0.AuxInt = int16ToAuxInt(c ^ d)
31798 v.AddArg2(v0, x)
31799 return true
31800 }
31801 }
31802 break
31803 }
31804
31805
31806
31807 for {
31808 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
31809 if v_0.Op != OpLsh16x64 {
31810 continue
31811 }
31812 _ = v_0.Args[1]
31813 x := v_0.Args[0]
31814 z := v_0.Args[1]
31815 if z.Op != OpConst64 {
31816 continue
31817 }
31818 c := auxIntToInt64(z.AuxInt)
31819 if v_1.Op != OpRsh16Ux64 {
31820 continue
31821 }
31822 _ = v_1.Args[1]
31823 if x != v_1.Args[0] {
31824 continue
31825 }
31826 v_1_1 := v_1.Args[1]
31827 if v_1_1.Op != OpConst64 {
31828 continue
31829 }
31830 d := auxIntToInt64(v_1_1.AuxInt)
31831 if !(c < 16 && d == 16-c && canRotate(config, 16)) {
31832 continue
31833 }
31834 v.reset(OpRotateLeft16)
31835 v.AddArg2(x, z)
31836 return true
31837 }
31838 break
31839 }
31840
31841
31842
31843 for {
31844 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
31845 left := v_0
31846 if left.Op != OpLsh16x64 {
31847 continue
31848 }
31849 y := left.Args[1]
31850 x := left.Args[0]
31851 right := v_1
31852 if right.Op != OpRsh16Ux64 {
31853 continue
31854 }
31855 _ = right.Args[1]
31856 if x != right.Args[0] {
31857 continue
31858 }
31859 right_1 := right.Args[1]
31860 if right_1.Op != OpSub64 {
31861 continue
31862 }
31863 _ = right_1.Args[1]
31864 right_1_0 := right_1.Args[0]
31865 if right_1_0.Op != OpConst64 || auxIntToInt64(right_1_0.AuxInt) != 16 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 16)) {
31866 continue
31867 }
31868 v.reset(OpRotateLeft16)
31869 v.AddArg2(x, y)
31870 return true
31871 }
31872 break
31873 }
31874
31875
31876
31877 for {
31878 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
31879 left := v_0
31880 if left.Op != OpLsh16x32 {
31881 continue
31882 }
31883 y := left.Args[1]
31884 x := left.Args[0]
31885 right := v_1
31886 if right.Op != OpRsh16Ux32 {
31887 continue
31888 }
31889 _ = right.Args[1]
31890 if x != right.Args[0] {
31891 continue
31892 }
31893 right_1 := right.Args[1]
31894 if right_1.Op != OpSub32 {
31895 continue
31896 }
31897 _ = right_1.Args[1]
31898 right_1_0 := right_1.Args[0]
31899 if right_1_0.Op != OpConst32 || auxIntToInt32(right_1_0.AuxInt) != 16 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 16)) {
31900 continue
31901 }
31902 v.reset(OpRotateLeft16)
31903 v.AddArg2(x, y)
31904 return true
31905 }
31906 break
31907 }
31908
31909
31910
31911 for {
31912 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
31913 left := v_0
31914 if left.Op != OpLsh16x16 {
31915 continue
31916 }
31917 y := left.Args[1]
31918 x := left.Args[0]
31919 right := v_1
31920 if right.Op != OpRsh16Ux16 {
31921 continue
31922 }
31923 _ = right.Args[1]
31924 if x != right.Args[0] {
31925 continue
31926 }
31927 right_1 := right.Args[1]
31928 if right_1.Op != OpSub16 {
31929 continue
31930 }
31931 _ = right_1.Args[1]
31932 right_1_0 := right_1.Args[0]
31933 if right_1_0.Op != OpConst16 || auxIntToInt16(right_1_0.AuxInt) != 16 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 16)) {
31934 continue
31935 }
31936 v.reset(OpRotateLeft16)
31937 v.AddArg2(x, y)
31938 return true
31939 }
31940 break
31941 }
31942
31943
31944
31945 for {
31946 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
31947 left := v_0
31948 if left.Op != OpLsh16x8 {
31949 continue
31950 }
31951 y := left.Args[1]
31952 x := left.Args[0]
31953 right := v_1
31954 if right.Op != OpRsh16Ux8 {
31955 continue
31956 }
31957 _ = right.Args[1]
31958 if x != right.Args[0] {
31959 continue
31960 }
31961 right_1 := right.Args[1]
31962 if right_1.Op != OpSub8 {
31963 continue
31964 }
31965 _ = right_1.Args[1]
31966 right_1_0 := right_1.Args[0]
31967 if right_1_0.Op != OpConst8 || auxIntToInt8(right_1_0.AuxInt) != 16 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 16)) {
31968 continue
31969 }
31970 v.reset(OpRotateLeft16)
31971 v.AddArg2(x, y)
31972 return true
31973 }
31974 break
31975 }
31976
31977
31978
31979 for {
31980 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
31981 right := v_0
31982 if right.Op != OpRsh16Ux64 {
31983 continue
31984 }
31985 y := right.Args[1]
31986 x := right.Args[0]
31987 left := v_1
31988 if left.Op != OpLsh16x64 {
31989 continue
31990 }
31991 _ = left.Args[1]
31992 if x != left.Args[0] {
31993 continue
31994 }
31995 z := left.Args[1]
31996 if z.Op != OpSub64 {
31997 continue
31998 }
31999 _ = z.Args[1]
32000 z_0 := z.Args[0]
32001 if z_0.Op != OpConst64 || auxIntToInt64(z_0.AuxInt) != 16 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 16)) {
32002 continue
32003 }
32004 v.reset(OpRotateLeft16)
32005 v.AddArg2(x, z)
32006 return true
32007 }
32008 break
32009 }
32010
32011
32012
32013 for {
32014 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
32015 right := v_0
32016 if right.Op != OpRsh16Ux32 {
32017 continue
32018 }
32019 y := right.Args[1]
32020 x := right.Args[0]
32021 left := v_1
32022 if left.Op != OpLsh16x32 {
32023 continue
32024 }
32025 _ = left.Args[1]
32026 if x != left.Args[0] {
32027 continue
32028 }
32029 z := left.Args[1]
32030 if z.Op != OpSub32 {
32031 continue
32032 }
32033 _ = z.Args[1]
32034 z_0 := z.Args[0]
32035 if z_0.Op != OpConst32 || auxIntToInt32(z_0.AuxInt) != 16 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 16)) {
32036 continue
32037 }
32038 v.reset(OpRotateLeft16)
32039 v.AddArg2(x, z)
32040 return true
32041 }
32042 break
32043 }
32044
32045
32046
32047 for {
32048 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
32049 right := v_0
32050 if right.Op != OpRsh16Ux16 {
32051 continue
32052 }
32053 y := right.Args[1]
32054 x := right.Args[0]
32055 left := v_1
32056 if left.Op != OpLsh16x16 {
32057 continue
32058 }
32059 _ = left.Args[1]
32060 if x != left.Args[0] {
32061 continue
32062 }
32063 z := left.Args[1]
32064 if z.Op != OpSub16 {
32065 continue
32066 }
32067 _ = z.Args[1]
32068 z_0 := z.Args[0]
32069 if z_0.Op != OpConst16 || auxIntToInt16(z_0.AuxInt) != 16 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 16)) {
32070 continue
32071 }
32072 v.reset(OpRotateLeft16)
32073 v.AddArg2(x, z)
32074 return true
32075 }
32076 break
32077 }
32078
32079
32080
32081 for {
32082 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
32083 right := v_0
32084 if right.Op != OpRsh16Ux8 {
32085 continue
32086 }
32087 y := right.Args[1]
32088 x := right.Args[0]
32089 left := v_1
32090 if left.Op != OpLsh16x8 {
32091 continue
32092 }
32093 _ = left.Args[1]
32094 if x != left.Args[0] {
32095 continue
32096 }
32097 z := left.Args[1]
32098 if z.Op != OpSub8 {
32099 continue
32100 }
32101 _ = z.Args[1]
32102 z_0 := z.Args[0]
32103 if z_0.Op != OpConst8 || auxIntToInt8(z_0.AuxInt) != 16 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 16)) {
32104 continue
32105 }
32106 v.reset(OpRotateLeft16)
32107 v.AddArg2(x, z)
32108 return true
32109 }
32110 break
32111 }
32112 return false
32113 }
32114 func rewriteValuegeneric_OpXor32(v *Value) bool {
32115 v_1 := v.Args[1]
32116 v_0 := v.Args[0]
32117 b := v.Block
32118 config := b.Func.Config
32119
32120
32121 for {
32122 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
32123 if v_0.Op != OpConst32 {
32124 continue
32125 }
32126 c := auxIntToInt32(v_0.AuxInt)
32127 if v_1.Op != OpConst32 {
32128 continue
32129 }
32130 d := auxIntToInt32(v_1.AuxInt)
32131 v.reset(OpConst32)
32132 v.AuxInt = int32ToAuxInt(c ^ d)
32133 return true
32134 }
32135 break
32136 }
32137
32138
32139 for {
32140 x := v_0
32141 if x != v_1 {
32142 break
32143 }
32144 v.reset(OpConst32)
32145 v.AuxInt = int32ToAuxInt(0)
32146 return true
32147 }
32148
32149
32150 for {
32151 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
32152 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
32153 continue
32154 }
32155 x := v_1
32156 v.copyOf(x)
32157 return true
32158 }
32159 break
32160 }
32161
32162
32163 for {
32164 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
32165 if v_0.Op != OpCom32 {
32166 continue
32167 }
32168 x := v_0.Args[0]
32169 if x != v_1 {
32170 continue
32171 }
32172 v.reset(OpConst32)
32173 v.AuxInt = int32ToAuxInt(-1)
32174 return true
32175 }
32176 break
32177 }
32178
32179
32180 for {
32181 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
32182 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != -1 {
32183 continue
32184 }
32185 x := v_1
32186 v.reset(OpCom32)
32187 v.AddArg(x)
32188 return true
32189 }
32190 break
32191 }
32192
32193
32194 for {
32195 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
32196 x := v_0
32197 if v_1.Op != OpXor32 {
32198 continue
32199 }
32200 _ = v_1.Args[1]
32201 v_1_0 := v_1.Args[0]
32202 v_1_1 := v_1.Args[1]
32203 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
32204 if x != v_1_0 {
32205 continue
32206 }
32207 y := v_1_1
32208 v.copyOf(y)
32209 return true
32210 }
32211 }
32212 break
32213 }
32214
32215
32216
32217 for {
32218 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
32219 if v_0.Op != OpXor32 {
32220 continue
32221 }
32222 _ = v_0.Args[1]
32223 v_0_0 := v_0.Args[0]
32224 v_0_1 := v_0.Args[1]
32225 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
32226 i := v_0_0
32227 if i.Op != OpConst32 {
32228 continue
32229 }
32230 t := i.Type
32231 z := v_0_1
32232 x := v_1
32233 if !(z.Op != OpConst32 && x.Op != OpConst32) {
32234 continue
32235 }
32236 v.reset(OpXor32)
32237 v0 := b.NewValue0(v.Pos, OpXor32, t)
32238 v0.AddArg2(z, x)
32239 v.AddArg2(i, v0)
32240 return true
32241 }
32242 }
32243 break
32244 }
32245
32246
32247 for {
32248 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
32249 if v_0.Op != OpConst32 {
32250 continue
32251 }
32252 t := v_0.Type
32253 c := auxIntToInt32(v_0.AuxInt)
32254 if v_1.Op != OpXor32 {
32255 continue
32256 }
32257 _ = v_1.Args[1]
32258 v_1_0 := v_1.Args[0]
32259 v_1_1 := v_1.Args[1]
32260 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
32261 if v_1_0.Op != OpConst32 || v_1_0.Type != t {
32262 continue
32263 }
32264 d := auxIntToInt32(v_1_0.AuxInt)
32265 x := v_1_1
32266 v.reset(OpXor32)
32267 v0 := b.NewValue0(v.Pos, OpConst32, t)
32268 v0.AuxInt = int32ToAuxInt(c ^ d)
32269 v.AddArg2(v0, x)
32270 return true
32271 }
32272 }
32273 break
32274 }
32275
32276
32277
32278 for {
32279 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
32280 if v_0.Op != OpLsh32x64 {
32281 continue
32282 }
32283 _ = v_0.Args[1]
32284 x := v_0.Args[0]
32285 z := v_0.Args[1]
32286 if z.Op != OpConst64 {
32287 continue
32288 }
32289 c := auxIntToInt64(z.AuxInt)
32290 if v_1.Op != OpRsh32Ux64 {
32291 continue
32292 }
32293 _ = v_1.Args[1]
32294 if x != v_1.Args[0] {
32295 continue
32296 }
32297 v_1_1 := v_1.Args[1]
32298 if v_1_1.Op != OpConst64 {
32299 continue
32300 }
32301 d := auxIntToInt64(v_1_1.AuxInt)
32302 if !(c < 32 && d == 32-c && canRotate(config, 32)) {
32303 continue
32304 }
32305 v.reset(OpRotateLeft32)
32306 v.AddArg2(x, z)
32307 return true
32308 }
32309 break
32310 }
32311
32312
32313
32314 for {
32315 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
32316 left := v_0
32317 if left.Op != OpLsh32x64 {
32318 continue
32319 }
32320 y := left.Args[1]
32321 x := left.Args[0]
32322 right := v_1
32323 if right.Op != OpRsh32Ux64 {
32324 continue
32325 }
32326 _ = right.Args[1]
32327 if x != right.Args[0] {
32328 continue
32329 }
32330 right_1 := right.Args[1]
32331 if right_1.Op != OpSub64 {
32332 continue
32333 }
32334 _ = right_1.Args[1]
32335 right_1_0 := right_1.Args[0]
32336 if right_1_0.Op != OpConst64 || auxIntToInt64(right_1_0.AuxInt) != 32 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 32)) {
32337 continue
32338 }
32339 v.reset(OpRotateLeft32)
32340 v.AddArg2(x, y)
32341 return true
32342 }
32343 break
32344 }
32345
32346
32347
32348 for {
32349 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
32350 left := v_0
32351 if left.Op != OpLsh32x32 {
32352 continue
32353 }
32354 y := left.Args[1]
32355 x := left.Args[0]
32356 right := v_1
32357 if right.Op != OpRsh32Ux32 {
32358 continue
32359 }
32360 _ = right.Args[1]
32361 if x != right.Args[0] {
32362 continue
32363 }
32364 right_1 := right.Args[1]
32365 if right_1.Op != OpSub32 {
32366 continue
32367 }
32368 _ = right_1.Args[1]
32369 right_1_0 := right_1.Args[0]
32370 if right_1_0.Op != OpConst32 || auxIntToInt32(right_1_0.AuxInt) != 32 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 32)) {
32371 continue
32372 }
32373 v.reset(OpRotateLeft32)
32374 v.AddArg2(x, y)
32375 return true
32376 }
32377 break
32378 }
32379
32380
32381
32382 for {
32383 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
32384 left := v_0
32385 if left.Op != OpLsh32x16 {
32386 continue
32387 }
32388 y := left.Args[1]
32389 x := left.Args[0]
32390 right := v_1
32391 if right.Op != OpRsh32Ux16 {
32392 continue
32393 }
32394 _ = right.Args[1]
32395 if x != right.Args[0] {
32396 continue
32397 }
32398 right_1 := right.Args[1]
32399 if right_1.Op != OpSub16 {
32400 continue
32401 }
32402 _ = right_1.Args[1]
32403 right_1_0 := right_1.Args[0]
32404 if right_1_0.Op != OpConst16 || auxIntToInt16(right_1_0.AuxInt) != 32 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 32)) {
32405 continue
32406 }
32407 v.reset(OpRotateLeft32)
32408 v.AddArg2(x, y)
32409 return true
32410 }
32411 break
32412 }
32413
32414
32415
32416 for {
32417 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
32418 left := v_0
32419 if left.Op != OpLsh32x8 {
32420 continue
32421 }
32422 y := left.Args[1]
32423 x := left.Args[0]
32424 right := v_1
32425 if right.Op != OpRsh32Ux8 {
32426 continue
32427 }
32428 _ = right.Args[1]
32429 if x != right.Args[0] {
32430 continue
32431 }
32432 right_1 := right.Args[1]
32433 if right_1.Op != OpSub8 {
32434 continue
32435 }
32436 _ = right_1.Args[1]
32437 right_1_0 := right_1.Args[0]
32438 if right_1_0.Op != OpConst8 || auxIntToInt8(right_1_0.AuxInt) != 32 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 32)) {
32439 continue
32440 }
32441 v.reset(OpRotateLeft32)
32442 v.AddArg2(x, y)
32443 return true
32444 }
32445 break
32446 }
32447
32448
32449
32450 for {
32451 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
32452 right := v_0
32453 if right.Op != OpRsh32Ux64 {
32454 continue
32455 }
32456 y := right.Args[1]
32457 x := right.Args[0]
32458 left := v_1
32459 if left.Op != OpLsh32x64 {
32460 continue
32461 }
32462 _ = left.Args[1]
32463 if x != left.Args[0] {
32464 continue
32465 }
32466 z := left.Args[1]
32467 if z.Op != OpSub64 {
32468 continue
32469 }
32470 _ = z.Args[1]
32471 z_0 := z.Args[0]
32472 if z_0.Op != OpConst64 || auxIntToInt64(z_0.AuxInt) != 32 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 32)) {
32473 continue
32474 }
32475 v.reset(OpRotateLeft32)
32476 v.AddArg2(x, z)
32477 return true
32478 }
32479 break
32480 }
32481
32482
32483
32484 for {
32485 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
32486 right := v_0
32487 if right.Op != OpRsh32Ux32 {
32488 continue
32489 }
32490 y := right.Args[1]
32491 x := right.Args[0]
32492 left := v_1
32493 if left.Op != OpLsh32x32 {
32494 continue
32495 }
32496 _ = left.Args[1]
32497 if x != left.Args[0] {
32498 continue
32499 }
32500 z := left.Args[1]
32501 if z.Op != OpSub32 {
32502 continue
32503 }
32504 _ = z.Args[1]
32505 z_0 := z.Args[0]
32506 if z_0.Op != OpConst32 || auxIntToInt32(z_0.AuxInt) != 32 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 32)) {
32507 continue
32508 }
32509 v.reset(OpRotateLeft32)
32510 v.AddArg2(x, z)
32511 return true
32512 }
32513 break
32514 }
32515
32516
32517
32518 for {
32519 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
32520 right := v_0
32521 if right.Op != OpRsh32Ux16 {
32522 continue
32523 }
32524 y := right.Args[1]
32525 x := right.Args[0]
32526 left := v_1
32527 if left.Op != OpLsh32x16 {
32528 continue
32529 }
32530 _ = left.Args[1]
32531 if x != left.Args[0] {
32532 continue
32533 }
32534 z := left.Args[1]
32535 if z.Op != OpSub16 {
32536 continue
32537 }
32538 _ = z.Args[1]
32539 z_0 := z.Args[0]
32540 if z_0.Op != OpConst16 || auxIntToInt16(z_0.AuxInt) != 32 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 32)) {
32541 continue
32542 }
32543 v.reset(OpRotateLeft32)
32544 v.AddArg2(x, z)
32545 return true
32546 }
32547 break
32548 }
32549
32550
32551
32552 for {
32553 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
32554 right := v_0
32555 if right.Op != OpRsh32Ux8 {
32556 continue
32557 }
32558 y := right.Args[1]
32559 x := right.Args[0]
32560 left := v_1
32561 if left.Op != OpLsh32x8 {
32562 continue
32563 }
32564 _ = left.Args[1]
32565 if x != left.Args[0] {
32566 continue
32567 }
32568 z := left.Args[1]
32569 if z.Op != OpSub8 {
32570 continue
32571 }
32572 _ = z.Args[1]
32573 z_0 := z.Args[0]
32574 if z_0.Op != OpConst8 || auxIntToInt8(z_0.AuxInt) != 32 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 32)) {
32575 continue
32576 }
32577 v.reset(OpRotateLeft32)
32578 v.AddArg2(x, z)
32579 return true
32580 }
32581 break
32582 }
32583 return false
32584 }
32585 func rewriteValuegeneric_OpXor64(v *Value) bool {
32586 v_1 := v.Args[1]
32587 v_0 := v.Args[0]
32588 b := v.Block
32589 config := b.Func.Config
32590
32591
32592 for {
32593 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
32594 if v_0.Op != OpConst64 {
32595 continue
32596 }
32597 c := auxIntToInt64(v_0.AuxInt)
32598 if v_1.Op != OpConst64 {
32599 continue
32600 }
32601 d := auxIntToInt64(v_1.AuxInt)
32602 v.reset(OpConst64)
32603 v.AuxInt = int64ToAuxInt(c ^ d)
32604 return true
32605 }
32606 break
32607 }
32608
32609
32610 for {
32611 x := v_0
32612 if x != v_1 {
32613 break
32614 }
32615 v.reset(OpConst64)
32616 v.AuxInt = int64ToAuxInt(0)
32617 return true
32618 }
32619
32620
32621 for {
32622 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
32623 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
32624 continue
32625 }
32626 x := v_1
32627 v.copyOf(x)
32628 return true
32629 }
32630 break
32631 }
32632
32633
32634 for {
32635 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
32636 if v_0.Op != OpCom64 {
32637 continue
32638 }
32639 x := v_0.Args[0]
32640 if x != v_1 {
32641 continue
32642 }
32643 v.reset(OpConst64)
32644 v.AuxInt = int64ToAuxInt(-1)
32645 return true
32646 }
32647 break
32648 }
32649
32650
32651 for {
32652 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
32653 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != -1 {
32654 continue
32655 }
32656 x := v_1
32657 v.reset(OpCom64)
32658 v.AddArg(x)
32659 return true
32660 }
32661 break
32662 }
32663
32664
32665 for {
32666 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
32667 x := v_0
32668 if v_1.Op != OpXor64 {
32669 continue
32670 }
32671 _ = v_1.Args[1]
32672 v_1_0 := v_1.Args[0]
32673 v_1_1 := v_1.Args[1]
32674 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
32675 if x != v_1_0 {
32676 continue
32677 }
32678 y := v_1_1
32679 v.copyOf(y)
32680 return true
32681 }
32682 }
32683 break
32684 }
32685
32686
32687
32688 for {
32689 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
32690 if v_0.Op != OpXor64 {
32691 continue
32692 }
32693 _ = v_0.Args[1]
32694 v_0_0 := v_0.Args[0]
32695 v_0_1 := v_0.Args[1]
32696 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
32697 i := v_0_0
32698 if i.Op != OpConst64 {
32699 continue
32700 }
32701 t := i.Type
32702 z := v_0_1
32703 x := v_1
32704 if !(z.Op != OpConst64 && x.Op != OpConst64) {
32705 continue
32706 }
32707 v.reset(OpXor64)
32708 v0 := b.NewValue0(v.Pos, OpXor64, t)
32709 v0.AddArg2(z, x)
32710 v.AddArg2(i, v0)
32711 return true
32712 }
32713 }
32714 break
32715 }
32716
32717
32718 for {
32719 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
32720 if v_0.Op != OpConst64 {
32721 continue
32722 }
32723 t := v_0.Type
32724 c := auxIntToInt64(v_0.AuxInt)
32725 if v_1.Op != OpXor64 {
32726 continue
32727 }
32728 _ = v_1.Args[1]
32729 v_1_0 := v_1.Args[0]
32730 v_1_1 := v_1.Args[1]
32731 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
32732 if v_1_0.Op != OpConst64 || v_1_0.Type != t {
32733 continue
32734 }
32735 d := auxIntToInt64(v_1_0.AuxInt)
32736 x := v_1_1
32737 v.reset(OpXor64)
32738 v0 := b.NewValue0(v.Pos, OpConst64, t)
32739 v0.AuxInt = int64ToAuxInt(c ^ d)
32740 v.AddArg2(v0, x)
32741 return true
32742 }
32743 }
32744 break
32745 }
32746
32747
32748
32749 for {
32750 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
32751 if v_0.Op != OpLsh64x64 {
32752 continue
32753 }
32754 _ = v_0.Args[1]
32755 x := v_0.Args[0]
32756 z := v_0.Args[1]
32757 if z.Op != OpConst64 {
32758 continue
32759 }
32760 c := auxIntToInt64(z.AuxInt)
32761 if v_1.Op != OpRsh64Ux64 {
32762 continue
32763 }
32764 _ = v_1.Args[1]
32765 if x != v_1.Args[0] {
32766 continue
32767 }
32768 v_1_1 := v_1.Args[1]
32769 if v_1_1.Op != OpConst64 {
32770 continue
32771 }
32772 d := auxIntToInt64(v_1_1.AuxInt)
32773 if !(c < 64 && d == 64-c && canRotate(config, 64)) {
32774 continue
32775 }
32776 v.reset(OpRotateLeft64)
32777 v.AddArg2(x, z)
32778 return true
32779 }
32780 break
32781 }
32782
32783
32784
32785 for {
32786 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
32787 left := v_0
32788 if left.Op != OpLsh64x64 {
32789 continue
32790 }
32791 y := left.Args[1]
32792 x := left.Args[0]
32793 right := v_1
32794 if right.Op != OpRsh64Ux64 {
32795 continue
32796 }
32797 _ = right.Args[1]
32798 if x != right.Args[0] {
32799 continue
32800 }
32801 right_1 := right.Args[1]
32802 if right_1.Op != OpSub64 {
32803 continue
32804 }
32805 _ = right_1.Args[1]
32806 right_1_0 := right_1.Args[0]
32807 if right_1_0.Op != OpConst64 || auxIntToInt64(right_1_0.AuxInt) != 64 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 64)) {
32808 continue
32809 }
32810 v.reset(OpRotateLeft64)
32811 v.AddArg2(x, y)
32812 return true
32813 }
32814 break
32815 }
32816
32817
32818
32819 for {
32820 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
32821 left := v_0
32822 if left.Op != OpLsh64x32 {
32823 continue
32824 }
32825 y := left.Args[1]
32826 x := left.Args[0]
32827 right := v_1
32828 if right.Op != OpRsh64Ux32 {
32829 continue
32830 }
32831 _ = right.Args[1]
32832 if x != right.Args[0] {
32833 continue
32834 }
32835 right_1 := right.Args[1]
32836 if right_1.Op != OpSub32 {
32837 continue
32838 }
32839 _ = right_1.Args[1]
32840 right_1_0 := right_1.Args[0]
32841 if right_1_0.Op != OpConst32 || auxIntToInt32(right_1_0.AuxInt) != 64 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 64)) {
32842 continue
32843 }
32844 v.reset(OpRotateLeft64)
32845 v.AddArg2(x, y)
32846 return true
32847 }
32848 break
32849 }
32850
32851
32852
32853 for {
32854 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
32855 left := v_0
32856 if left.Op != OpLsh64x16 {
32857 continue
32858 }
32859 y := left.Args[1]
32860 x := left.Args[0]
32861 right := v_1
32862 if right.Op != OpRsh64Ux16 {
32863 continue
32864 }
32865 _ = right.Args[1]
32866 if x != right.Args[0] {
32867 continue
32868 }
32869 right_1 := right.Args[1]
32870 if right_1.Op != OpSub16 {
32871 continue
32872 }
32873 _ = right_1.Args[1]
32874 right_1_0 := right_1.Args[0]
32875 if right_1_0.Op != OpConst16 || auxIntToInt16(right_1_0.AuxInt) != 64 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 64)) {
32876 continue
32877 }
32878 v.reset(OpRotateLeft64)
32879 v.AddArg2(x, y)
32880 return true
32881 }
32882 break
32883 }
32884
32885
32886
32887 for {
32888 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
32889 left := v_0
32890 if left.Op != OpLsh64x8 {
32891 continue
32892 }
32893 y := left.Args[1]
32894 x := left.Args[0]
32895 right := v_1
32896 if right.Op != OpRsh64Ux8 {
32897 continue
32898 }
32899 _ = right.Args[1]
32900 if x != right.Args[0] {
32901 continue
32902 }
32903 right_1 := right.Args[1]
32904 if right_1.Op != OpSub8 {
32905 continue
32906 }
32907 _ = right_1.Args[1]
32908 right_1_0 := right_1.Args[0]
32909 if right_1_0.Op != OpConst8 || auxIntToInt8(right_1_0.AuxInt) != 64 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 64)) {
32910 continue
32911 }
32912 v.reset(OpRotateLeft64)
32913 v.AddArg2(x, y)
32914 return true
32915 }
32916 break
32917 }
32918
32919
32920
32921 for {
32922 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
32923 right := v_0
32924 if right.Op != OpRsh64Ux64 {
32925 continue
32926 }
32927 y := right.Args[1]
32928 x := right.Args[0]
32929 left := v_1
32930 if left.Op != OpLsh64x64 {
32931 continue
32932 }
32933 _ = left.Args[1]
32934 if x != left.Args[0] {
32935 continue
32936 }
32937 z := left.Args[1]
32938 if z.Op != OpSub64 {
32939 continue
32940 }
32941 _ = z.Args[1]
32942 z_0 := z.Args[0]
32943 if z_0.Op != OpConst64 || auxIntToInt64(z_0.AuxInt) != 64 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 64)) {
32944 continue
32945 }
32946 v.reset(OpRotateLeft64)
32947 v.AddArg2(x, z)
32948 return true
32949 }
32950 break
32951 }
32952
32953
32954
32955 for {
32956 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
32957 right := v_0
32958 if right.Op != OpRsh64Ux32 {
32959 continue
32960 }
32961 y := right.Args[1]
32962 x := right.Args[0]
32963 left := v_1
32964 if left.Op != OpLsh64x32 {
32965 continue
32966 }
32967 _ = left.Args[1]
32968 if x != left.Args[0] {
32969 continue
32970 }
32971 z := left.Args[1]
32972 if z.Op != OpSub32 {
32973 continue
32974 }
32975 _ = z.Args[1]
32976 z_0 := z.Args[0]
32977 if z_0.Op != OpConst32 || auxIntToInt32(z_0.AuxInt) != 64 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 64)) {
32978 continue
32979 }
32980 v.reset(OpRotateLeft64)
32981 v.AddArg2(x, z)
32982 return true
32983 }
32984 break
32985 }
32986
32987
32988
32989 for {
32990 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
32991 right := v_0
32992 if right.Op != OpRsh64Ux16 {
32993 continue
32994 }
32995 y := right.Args[1]
32996 x := right.Args[0]
32997 left := v_1
32998 if left.Op != OpLsh64x16 {
32999 continue
33000 }
33001 _ = left.Args[1]
33002 if x != left.Args[0] {
33003 continue
33004 }
33005 z := left.Args[1]
33006 if z.Op != OpSub16 {
33007 continue
33008 }
33009 _ = z.Args[1]
33010 z_0 := z.Args[0]
33011 if z_0.Op != OpConst16 || auxIntToInt16(z_0.AuxInt) != 64 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 64)) {
33012 continue
33013 }
33014 v.reset(OpRotateLeft64)
33015 v.AddArg2(x, z)
33016 return true
33017 }
33018 break
33019 }
33020
33021
33022
33023 for {
33024 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
33025 right := v_0
33026 if right.Op != OpRsh64Ux8 {
33027 continue
33028 }
33029 y := right.Args[1]
33030 x := right.Args[0]
33031 left := v_1
33032 if left.Op != OpLsh64x8 {
33033 continue
33034 }
33035 _ = left.Args[1]
33036 if x != left.Args[0] {
33037 continue
33038 }
33039 z := left.Args[1]
33040 if z.Op != OpSub8 {
33041 continue
33042 }
33043 _ = z.Args[1]
33044 z_0 := z.Args[0]
33045 if z_0.Op != OpConst8 || auxIntToInt8(z_0.AuxInt) != 64 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 64)) {
33046 continue
33047 }
33048 v.reset(OpRotateLeft64)
33049 v.AddArg2(x, z)
33050 return true
33051 }
33052 break
33053 }
33054 return false
33055 }
33056 func rewriteValuegeneric_OpXor8(v *Value) bool {
33057 v_1 := v.Args[1]
33058 v_0 := v.Args[0]
33059 b := v.Block
33060 config := b.Func.Config
33061
33062
33063 for {
33064 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
33065 if v_0.Op != OpConst8 {
33066 continue
33067 }
33068 c := auxIntToInt8(v_0.AuxInt)
33069 if v_1.Op != OpConst8 {
33070 continue
33071 }
33072 d := auxIntToInt8(v_1.AuxInt)
33073 v.reset(OpConst8)
33074 v.AuxInt = int8ToAuxInt(c ^ d)
33075 return true
33076 }
33077 break
33078 }
33079
33080
33081 for {
33082 x := v_0
33083 if x != v_1 {
33084 break
33085 }
33086 v.reset(OpConst8)
33087 v.AuxInt = int8ToAuxInt(0)
33088 return true
33089 }
33090
33091
33092 for {
33093 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
33094 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 {
33095 continue
33096 }
33097 x := v_1
33098 v.copyOf(x)
33099 return true
33100 }
33101 break
33102 }
33103
33104
33105 for {
33106 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
33107 if v_0.Op != OpCom8 {
33108 continue
33109 }
33110 x := v_0.Args[0]
33111 if x != v_1 {
33112 continue
33113 }
33114 v.reset(OpConst8)
33115 v.AuxInt = int8ToAuxInt(-1)
33116 return true
33117 }
33118 break
33119 }
33120
33121
33122 for {
33123 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
33124 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != -1 {
33125 continue
33126 }
33127 x := v_1
33128 v.reset(OpCom8)
33129 v.AddArg(x)
33130 return true
33131 }
33132 break
33133 }
33134
33135
33136 for {
33137 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
33138 x := v_0
33139 if v_1.Op != OpXor8 {
33140 continue
33141 }
33142 _ = v_1.Args[1]
33143 v_1_0 := v_1.Args[0]
33144 v_1_1 := v_1.Args[1]
33145 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
33146 if x != v_1_0 {
33147 continue
33148 }
33149 y := v_1_1
33150 v.copyOf(y)
33151 return true
33152 }
33153 }
33154 break
33155 }
33156
33157
33158
33159 for {
33160 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
33161 if v_0.Op != OpXor8 {
33162 continue
33163 }
33164 _ = v_0.Args[1]
33165 v_0_0 := v_0.Args[0]
33166 v_0_1 := v_0.Args[1]
33167 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
33168 i := v_0_0
33169 if i.Op != OpConst8 {
33170 continue
33171 }
33172 t := i.Type
33173 z := v_0_1
33174 x := v_1
33175 if !(z.Op != OpConst8 && x.Op != OpConst8) {
33176 continue
33177 }
33178 v.reset(OpXor8)
33179 v0 := b.NewValue0(v.Pos, OpXor8, t)
33180 v0.AddArg2(z, x)
33181 v.AddArg2(i, v0)
33182 return true
33183 }
33184 }
33185 break
33186 }
33187
33188
33189 for {
33190 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
33191 if v_0.Op != OpConst8 {
33192 continue
33193 }
33194 t := v_0.Type
33195 c := auxIntToInt8(v_0.AuxInt)
33196 if v_1.Op != OpXor8 {
33197 continue
33198 }
33199 _ = v_1.Args[1]
33200 v_1_0 := v_1.Args[0]
33201 v_1_1 := v_1.Args[1]
33202 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
33203 if v_1_0.Op != OpConst8 || v_1_0.Type != t {
33204 continue
33205 }
33206 d := auxIntToInt8(v_1_0.AuxInt)
33207 x := v_1_1
33208 v.reset(OpXor8)
33209 v0 := b.NewValue0(v.Pos, OpConst8, t)
33210 v0.AuxInt = int8ToAuxInt(c ^ d)
33211 v.AddArg2(v0, x)
33212 return true
33213 }
33214 }
33215 break
33216 }
33217
33218
33219
33220 for {
33221 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
33222 if v_0.Op != OpLsh8x64 {
33223 continue
33224 }
33225 _ = v_0.Args[1]
33226 x := v_0.Args[0]
33227 z := v_0.Args[1]
33228 if z.Op != OpConst64 {
33229 continue
33230 }
33231 c := auxIntToInt64(z.AuxInt)
33232 if v_1.Op != OpRsh8Ux64 {
33233 continue
33234 }
33235 _ = v_1.Args[1]
33236 if x != v_1.Args[0] {
33237 continue
33238 }
33239 v_1_1 := v_1.Args[1]
33240 if v_1_1.Op != OpConst64 {
33241 continue
33242 }
33243 d := auxIntToInt64(v_1_1.AuxInt)
33244 if !(c < 8 && d == 8-c && canRotate(config, 8)) {
33245 continue
33246 }
33247 v.reset(OpRotateLeft8)
33248 v.AddArg2(x, z)
33249 return true
33250 }
33251 break
33252 }
33253
33254
33255
33256 for {
33257 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
33258 left := v_0
33259 if left.Op != OpLsh8x64 {
33260 continue
33261 }
33262 y := left.Args[1]
33263 x := left.Args[0]
33264 right := v_1
33265 if right.Op != OpRsh8Ux64 {
33266 continue
33267 }
33268 _ = right.Args[1]
33269 if x != right.Args[0] {
33270 continue
33271 }
33272 right_1 := right.Args[1]
33273 if right_1.Op != OpSub64 {
33274 continue
33275 }
33276 _ = right_1.Args[1]
33277 right_1_0 := right_1.Args[0]
33278 if right_1_0.Op != OpConst64 || auxIntToInt64(right_1_0.AuxInt) != 8 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 8)) {
33279 continue
33280 }
33281 v.reset(OpRotateLeft8)
33282 v.AddArg2(x, y)
33283 return true
33284 }
33285 break
33286 }
33287
33288
33289
33290 for {
33291 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
33292 left := v_0
33293 if left.Op != OpLsh8x32 {
33294 continue
33295 }
33296 y := left.Args[1]
33297 x := left.Args[0]
33298 right := v_1
33299 if right.Op != OpRsh8Ux32 {
33300 continue
33301 }
33302 _ = right.Args[1]
33303 if x != right.Args[0] {
33304 continue
33305 }
33306 right_1 := right.Args[1]
33307 if right_1.Op != OpSub32 {
33308 continue
33309 }
33310 _ = right_1.Args[1]
33311 right_1_0 := right_1.Args[0]
33312 if right_1_0.Op != OpConst32 || auxIntToInt32(right_1_0.AuxInt) != 8 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 8)) {
33313 continue
33314 }
33315 v.reset(OpRotateLeft8)
33316 v.AddArg2(x, y)
33317 return true
33318 }
33319 break
33320 }
33321
33322
33323
33324 for {
33325 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
33326 left := v_0
33327 if left.Op != OpLsh8x16 {
33328 continue
33329 }
33330 y := left.Args[1]
33331 x := left.Args[0]
33332 right := v_1
33333 if right.Op != OpRsh8Ux16 {
33334 continue
33335 }
33336 _ = right.Args[1]
33337 if x != right.Args[0] {
33338 continue
33339 }
33340 right_1 := right.Args[1]
33341 if right_1.Op != OpSub16 {
33342 continue
33343 }
33344 _ = right_1.Args[1]
33345 right_1_0 := right_1.Args[0]
33346 if right_1_0.Op != OpConst16 || auxIntToInt16(right_1_0.AuxInt) != 8 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 8)) {
33347 continue
33348 }
33349 v.reset(OpRotateLeft8)
33350 v.AddArg2(x, y)
33351 return true
33352 }
33353 break
33354 }
33355
33356
33357
33358 for {
33359 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
33360 left := v_0
33361 if left.Op != OpLsh8x8 {
33362 continue
33363 }
33364 y := left.Args[1]
33365 x := left.Args[0]
33366 right := v_1
33367 if right.Op != OpRsh8Ux8 {
33368 continue
33369 }
33370 _ = right.Args[1]
33371 if x != right.Args[0] {
33372 continue
33373 }
33374 right_1 := right.Args[1]
33375 if right_1.Op != OpSub8 {
33376 continue
33377 }
33378 _ = right_1.Args[1]
33379 right_1_0 := right_1.Args[0]
33380 if right_1_0.Op != OpConst8 || auxIntToInt8(right_1_0.AuxInt) != 8 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 8)) {
33381 continue
33382 }
33383 v.reset(OpRotateLeft8)
33384 v.AddArg2(x, y)
33385 return true
33386 }
33387 break
33388 }
33389
33390
33391
33392 for {
33393 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
33394 right := v_0
33395 if right.Op != OpRsh8Ux64 {
33396 continue
33397 }
33398 y := right.Args[1]
33399 x := right.Args[0]
33400 left := v_1
33401 if left.Op != OpLsh8x64 {
33402 continue
33403 }
33404 _ = left.Args[1]
33405 if x != left.Args[0] {
33406 continue
33407 }
33408 z := left.Args[1]
33409 if z.Op != OpSub64 {
33410 continue
33411 }
33412 _ = z.Args[1]
33413 z_0 := z.Args[0]
33414 if z_0.Op != OpConst64 || auxIntToInt64(z_0.AuxInt) != 8 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 8)) {
33415 continue
33416 }
33417 v.reset(OpRotateLeft8)
33418 v.AddArg2(x, z)
33419 return true
33420 }
33421 break
33422 }
33423
33424
33425
33426 for {
33427 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
33428 right := v_0
33429 if right.Op != OpRsh8Ux32 {
33430 continue
33431 }
33432 y := right.Args[1]
33433 x := right.Args[0]
33434 left := v_1
33435 if left.Op != OpLsh8x32 {
33436 continue
33437 }
33438 _ = left.Args[1]
33439 if x != left.Args[0] {
33440 continue
33441 }
33442 z := left.Args[1]
33443 if z.Op != OpSub32 {
33444 continue
33445 }
33446 _ = z.Args[1]
33447 z_0 := z.Args[0]
33448 if z_0.Op != OpConst32 || auxIntToInt32(z_0.AuxInt) != 8 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 8)) {
33449 continue
33450 }
33451 v.reset(OpRotateLeft8)
33452 v.AddArg2(x, z)
33453 return true
33454 }
33455 break
33456 }
33457
33458
33459
33460 for {
33461 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
33462 right := v_0
33463 if right.Op != OpRsh8Ux16 {
33464 continue
33465 }
33466 y := right.Args[1]
33467 x := right.Args[0]
33468 left := v_1
33469 if left.Op != OpLsh8x16 {
33470 continue
33471 }
33472 _ = left.Args[1]
33473 if x != left.Args[0] {
33474 continue
33475 }
33476 z := left.Args[1]
33477 if z.Op != OpSub16 {
33478 continue
33479 }
33480 _ = z.Args[1]
33481 z_0 := z.Args[0]
33482 if z_0.Op != OpConst16 || auxIntToInt16(z_0.AuxInt) != 8 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 8)) {
33483 continue
33484 }
33485 v.reset(OpRotateLeft8)
33486 v.AddArg2(x, z)
33487 return true
33488 }
33489 break
33490 }
33491
33492
33493
33494 for {
33495 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
33496 right := v_0
33497 if right.Op != OpRsh8Ux8 {
33498 continue
33499 }
33500 y := right.Args[1]
33501 x := right.Args[0]
33502 left := v_1
33503 if left.Op != OpLsh8x8 {
33504 continue
33505 }
33506 _ = left.Args[1]
33507 if x != left.Args[0] {
33508 continue
33509 }
33510 z := left.Args[1]
33511 if z.Op != OpSub8 {
33512 continue
33513 }
33514 _ = z.Args[1]
33515 z_0 := z.Args[0]
33516 if z_0.Op != OpConst8 || auxIntToInt8(z_0.AuxInt) != 8 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 8)) {
33517 continue
33518 }
33519 v.reset(OpRotateLeft8)
33520 v.AddArg2(x, z)
33521 return true
33522 }
33523 break
33524 }
33525 return false
33526 }
33527 func rewriteValuegeneric_OpZero(v *Value) bool {
33528 v_1 := v.Args[1]
33529 v_0 := v.Args[0]
33530 b := v.Block
33531
33532
33533
33534 for {
33535 if v_0.Op != OpSelectN || auxIntToInt64(v_0.AuxInt) != 0 {
33536 break
33537 }
33538 call := v_0.Args[0]
33539 if call.Op != OpStaticLECall || len(call.Args) != 2 {
33540 break
33541 }
33542 mem := v_1
33543 if mem.Op != OpSelectN || auxIntToInt64(mem.AuxInt) != 1 || call != mem.Args[0] || !(isSameCall(call.Aux, "runtime.newobject")) {
33544 break
33545 }
33546 v.copyOf(mem)
33547 return true
33548 }
33549
33550
33551
33552 for {
33553 n := auxIntToInt64(v.AuxInt)
33554 t1 := auxToType(v.Aux)
33555 p1 := v_0
33556 store := v_1
33557 if store.Op != OpStore {
33558 break
33559 }
33560 t2 := auxToType(store.Aux)
33561 mem := store.Args[2]
33562 store_0 := store.Args[0]
33563 if store_0.Op != OpOffPtr {
33564 break
33565 }
33566 o2 := auxIntToInt64(store_0.AuxInt)
33567 p2 := store_0.Args[0]
33568 if !(isSamePtr(p1, p2) && store.Uses == 1 && n >= o2+t2.Size() && clobber(store)) {
33569 break
33570 }
33571 v.reset(OpZero)
33572 v.AuxInt = int64ToAuxInt(n)
33573 v.Aux = typeToAux(t1)
33574 v.AddArg2(p1, mem)
33575 return true
33576 }
33577
33578
33579
33580 for {
33581 n := auxIntToInt64(v.AuxInt)
33582 t := auxToType(v.Aux)
33583 dst1 := v_0
33584 move := v_1
33585 if move.Op != OpMove || auxIntToInt64(move.AuxInt) != n || auxToType(move.Aux) != t {
33586 break
33587 }
33588 mem := move.Args[2]
33589 dst2 := move.Args[0]
33590 if !(move.Uses == 1 && isSamePtr(dst1, dst2) && clobber(move)) {
33591 break
33592 }
33593 v.reset(OpZero)
33594 v.AuxInt = int64ToAuxInt(n)
33595 v.Aux = typeToAux(t)
33596 v.AddArg2(dst1, mem)
33597 return true
33598 }
33599
33600
33601
33602 for {
33603 n := auxIntToInt64(v.AuxInt)
33604 t := auxToType(v.Aux)
33605 dst1 := v_0
33606 vardef := v_1
33607 if vardef.Op != OpVarDef {
33608 break
33609 }
33610 x := auxToSym(vardef.Aux)
33611 move := vardef.Args[0]
33612 if move.Op != OpMove || auxIntToInt64(move.AuxInt) != n || auxToType(move.Aux) != t {
33613 break
33614 }
33615 mem := move.Args[2]
33616 dst2 := move.Args[0]
33617 if !(move.Uses == 1 && vardef.Uses == 1 && isSamePtr(dst1, dst2) && clobber(move, vardef)) {
33618 break
33619 }
33620 v.reset(OpZero)
33621 v.AuxInt = int64ToAuxInt(n)
33622 v.Aux = typeToAux(t)
33623 v0 := b.NewValue0(v.Pos, OpVarDef, types.TypeMem)
33624 v0.Aux = symToAux(x)
33625 v0.AddArg(mem)
33626 v.AddArg2(dst1, v0)
33627 return true
33628 }
33629
33630
33631
33632 for {
33633 s := auxIntToInt64(v.AuxInt)
33634 t := auxToType(v.Aux)
33635 dst1 := v_0
33636 zero := v_1
33637 if zero.Op != OpZero || auxIntToInt64(zero.AuxInt) != s || auxToType(zero.Aux) != t {
33638 break
33639 }
33640 dst2 := zero.Args[0]
33641 if !(isSamePtr(dst1, dst2)) {
33642 break
33643 }
33644 v.copyOf(zero)
33645 return true
33646 }
33647
33648
33649
33650 for {
33651 s := auxIntToInt64(v.AuxInt)
33652 t := auxToType(v.Aux)
33653 dst1 := v_0
33654 vardef := v_1
33655 if vardef.Op != OpVarDef {
33656 break
33657 }
33658 vardef_0 := vardef.Args[0]
33659 if vardef_0.Op != OpZero || auxIntToInt64(vardef_0.AuxInt) != s || auxToType(vardef_0.Aux) != t {
33660 break
33661 }
33662 dst2 := vardef_0.Args[0]
33663 if !(isSamePtr(dst1, dst2)) {
33664 break
33665 }
33666 v.copyOf(vardef)
33667 return true
33668 }
33669 return false
33670 }
33671 func rewriteValuegeneric_OpZeroExt16to32(v *Value) bool {
33672 v_0 := v.Args[0]
33673
33674
33675 for {
33676 if v_0.Op != OpConst16 {
33677 break
33678 }
33679 c := auxIntToInt16(v_0.AuxInt)
33680 v.reset(OpConst32)
33681 v.AuxInt = int32ToAuxInt(int32(uint16(c)))
33682 return true
33683 }
33684
33685
33686
33687 for {
33688 if v_0.Op != OpTrunc32to16 {
33689 break
33690 }
33691 x := v_0.Args[0]
33692 if x.Op != OpRsh32Ux64 {
33693 break
33694 }
33695 _ = x.Args[1]
33696 x_1 := x.Args[1]
33697 if x_1.Op != OpConst64 {
33698 break
33699 }
33700 s := auxIntToInt64(x_1.AuxInt)
33701 if !(s >= 16) {
33702 break
33703 }
33704 v.copyOf(x)
33705 return true
33706 }
33707 return false
33708 }
33709 func rewriteValuegeneric_OpZeroExt16to64(v *Value) bool {
33710 v_0 := v.Args[0]
33711
33712
33713 for {
33714 if v_0.Op != OpConst16 {
33715 break
33716 }
33717 c := auxIntToInt16(v_0.AuxInt)
33718 v.reset(OpConst64)
33719 v.AuxInt = int64ToAuxInt(int64(uint16(c)))
33720 return true
33721 }
33722
33723
33724
33725 for {
33726 if v_0.Op != OpTrunc64to16 {
33727 break
33728 }
33729 x := v_0.Args[0]
33730 if x.Op != OpRsh64Ux64 {
33731 break
33732 }
33733 _ = x.Args[1]
33734 x_1 := x.Args[1]
33735 if x_1.Op != OpConst64 {
33736 break
33737 }
33738 s := auxIntToInt64(x_1.AuxInt)
33739 if !(s >= 48) {
33740 break
33741 }
33742 v.copyOf(x)
33743 return true
33744 }
33745 return false
33746 }
33747 func rewriteValuegeneric_OpZeroExt32to64(v *Value) bool {
33748 v_0 := v.Args[0]
33749
33750
33751 for {
33752 if v_0.Op != OpConst32 {
33753 break
33754 }
33755 c := auxIntToInt32(v_0.AuxInt)
33756 v.reset(OpConst64)
33757 v.AuxInt = int64ToAuxInt(int64(uint32(c)))
33758 return true
33759 }
33760
33761
33762
33763 for {
33764 if v_0.Op != OpTrunc64to32 {
33765 break
33766 }
33767 x := v_0.Args[0]
33768 if x.Op != OpRsh64Ux64 {
33769 break
33770 }
33771 _ = x.Args[1]
33772 x_1 := x.Args[1]
33773 if x_1.Op != OpConst64 {
33774 break
33775 }
33776 s := auxIntToInt64(x_1.AuxInt)
33777 if !(s >= 32) {
33778 break
33779 }
33780 v.copyOf(x)
33781 return true
33782 }
33783 return false
33784 }
33785 func rewriteValuegeneric_OpZeroExt8to16(v *Value) bool {
33786 v_0 := v.Args[0]
33787
33788
33789 for {
33790 if v_0.Op != OpConst8 {
33791 break
33792 }
33793 c := auxIntToInt8(v_0.AuxInt)
33794 v.reset(OpConst16)
33795 v.AuxInt = int16ToAuxInt(int16(uint8(c)))
33796 return true
33797 }
33798
33799
33800
33801 for {
33802 if v_0.Op != OpTrunc16to8 {
33803 break
33804 }
33805 x := v_0.Args[0]
33806 if x.Op != OpRsh16Ux64 {
33807 break
33808 }
33809 _ = x.Args[1]
33810 x_1 := x.Args[1]
33811 if x_1.Op != OpConst64 {
33812 break
33813 }
33814 s := auxIntToInt64(x_1.AuxInt)
33815 if !(s >= 8) {
33816 break
33817 }
33818 v.copyOf(x)
33819 return true
33820 }
33821 return false
33822 }
33823 func rewriteValuegeneric_OpZeroExt8to32(v *Value) bool {
33824 v_0 := v.Args[0]
33825
33826
33827 for {
33828 if v_0.Op != OpConst8 {
33829 break
33830 }
33831 c := auxIntToInt8(v_0.AuxInt)
33832 v.reset(OpConst32)
33833 v.AuxInt = int32ToAuxInt(int32(uint8(c)))
33834 return true
33835 }
33836
33837
33838
33839 for {
33840 if v_0.Op != OpTrunc32to8 {
33841 break
33842 }
33843 x := v_0.Args[0]
33844 if x.Op != OpRsh32Ux64 {
33845 break
33846 }
33847 _ = x.Args[1]
33848 x_1 := x.Args[1]
33849 if x_1.Op != OpConst64 {
33850 break
33851 }
33852 s := auxIntToInt64(x_1.AuxInt)
33853 if !(s >= 24) {
33854 break
33855 }
33856 v.copyOf(x)
33857 return true
33858 }
33859 return false
33860 }
33861 func rewriteValuegeneric_OpZeroExt8to64(v *Value) bool {
33862 v_0 := v.Args[0]
33863
33864
33865 for {
33866 if v_0.Op != OpConst8 {
33867 break
33868 }
33869 c := auxIntToInt8(v_0.AuxInt)
33870 v.reset(OpConst64)
33871 v.AuxInt = int64ToAuxInt(int64(uint8(c)))
33872 return true
33873 }
33874
33875
33876
33877 for {
33878 if v_0.Op != OpTrunc64to8 {
33879 break
33880 }
33881 x := v_0.Args[0]
33882 if x.Op != OpRsh64Ux64 {
33883 break
33884 }
33885 _ = x.Args[1]
33886 x_1 := x.Args[1]
33887 if x_1.Op != OpConst64 {
33888 break
33889 }
33890 s := auxIntToInt64(x_1.AuxInt)
33891 if !(s >= 56) {
33892 break
33893 }
33894 v.copyOf(x)
33895 return true
33896 }
33897 return false
33898 }
33899 func rewriteBlockgeneric(b *Block) bool {
33900 switch b.Kind {
33901 case BlockIf:
33902
33903
33904 for b.Controls[0].Op == OpNot {
33905 v_0 := b.Controls[0]
33906 cond := v_0.Args[0]
33907 b.resetWithControl(BlockIf, cond)
33908 b.swapSuccessors()
33909 return true
33910 }
33911
33912
33913
33914 for b.Controls[0].Op == OpConstBool {
33915 v_0 := b.Controls[0]
33916 c := auxIntToBool(v_0.AuxInt)
33917 if !(c) {
33918 break
33919 }
33920 b.Reset(BlockFirst)
33921 return true
33922 }
33923
33924
33925
33926 for b.Controls[0].Op == OpConstBool {
33927 v_0 := b.Controls[0]
33928 c := auxIntToBool(v_0.AuxInt)
33929 if !(!c) {
33930 break
33931 }
33932 b.Reset(BlockFirst)
33933 b.swapSuccessors()
33934 return true
33935 }
33936 }
33937 return false
33938 }
33939
View as plain text