1
2
3 package ssa
4
5 import "math"
6 import "math/bits"
7 import "cmd/internal/obj"
8 import "cmd/compile/internal/types"
9 import "cmd/compile/internal/ir"
10
11 func rewriteValuegeneric(v *Value) bool {
12 switch v.Op {
13 case OpAdd16:
14 return rewriteValuegeneric_OpAdd16(v)
15 case OpAdd32:
16 return rewriteValuegeneric_OpAdd32(v)
17 case OpAdd32F:
18 return rewriteValuegeneric_OpAdd32F(v)
19 case OpAdd64:
20 return rewriteValuegeneric_OpAdd64(v)
21 case OpAdd64F:
22 return rewriteValuegeneric_OpAdd64F(v)
23 case OpAdd64carry:
24 return rewriteValuegeneric_OpAdd64carry(v)
25 case OpAdd8:
26 return rewriteValuegeneric_OpAdd8(v)
27 case OpAddPtr:
28 return rewriteValuegeneric_OpAddPtr(v)
29 case OpAnd16:
30 return rewriteValuegeneric_OpAnd16(v)
31 case OpAnd32:
32 return rewriteValuegeneric_OpAnd32(v)
33 case OpAnd64:
34 return rewriteValuegeneric_OpAnd64(v)
35 case OpAnd8:
36 return rewriteValuegeneric_OpAnd8(v)
37 case OpAndB:
38 return rewriteValuegeneric_OpAndB(v)
39 case OpArraySelect:
40 return rewriteValuegeneric_OpArraySelect(v)
41 case OpBitLen16:
42 return rewriteValuegeneric_OpBitLen16(v)
43 case OpBitLen32:
44 return rewriteValuegeneric_OpBitLen32(v)
45 case OpBitLen64:
46 return rewriteValuegeneric_OpBitLen64(v)
47 case OpBitLen8:
48 return rewriteValuegeneric_OpBitLen8(v)
49 case OpCeil:
50 return rewriteValuegeneric_OpCeil(v)
51 case OpCom16:
52 return rewriteValuegeneric_OpCom16(v)
53 case OpCom32:
54 return rewriteValuegeneric_OpCom32(v)
55 case OpCom64:
56 return rewriteValuegeneric_OpCom64(v)
57 case OpCom8:
58 return rewriteValuegeneric_OpCom8(v)
59 case OpCondSelect:
60 return rewriteValuegeneric_OpCondSelect(v)
61 case OpConstInterface:
62 return rewriteValuegeneric_OpConstInterface(v)
63 case OpConstSlice:
64 return rewriteValuegeneric_OpConstSlice(v)
65 case OpConstString:
66 return rewriteValuegeneric_OpConstString(v)
67 case OpConvert:
68 return rewriteValuegeneric_OpConvert(v)
69 case OpCtz16:
70 return rewriteValuegeneric_OpCtz16(v)
71 case OpCtz32:
72 return rewriteValuegeneric_OpCtz32(v)
73 case OpCtz64:
74 return rewriteValuegeneric_OpCtz64(v)
75 case OpCtz8:
76 return rewriteValuegeneric_OpCtz8(v)
77 case OpCvt32Fto32:
78 return rewriteValuegeneric_OpCvt32Fto32(v)
79 case OpCvt32Fto64:
80 return rewriteValuegeneric_OpCvt32Fto64(v)
81 case OpCvt32Fto64F:
82 return rewriteValuegeneric_OpCvt32Fto64F(v)
83 case OpCvt32to32F:
84 return rewriteValuegeneric_OpCvt32to32F(v)
85 case OpCvt32to64F:
86 return rewriteValuegeneric_OpCvt32to64F(v)
87 case OpCvt64Fto32:
88 return rewriteValuegeneric_OpCvt64Fto32(v)
89 case OpCvt64Fto32F:
90 return rewriteValuegeneric_OpCvt64Fto32F(v)
91 case OpCvt64Fto64:
92 return rewriteValuegeneric_OpCvt64Fto64(v)
93 case OpCvt64to32F:
94 return rewriteValuegeneric_OpCvt64to32F(v)
95 case OpCvt64to64F:
96 return rewriteValuegeneric_OpCvt64to64F(v)
97 case OpCvtBoolToUint8:
98 return rewriteValuegeneric_OpCvtBoolToUint8(v)
99 case OpDiv128u:
100 return rewriteValuegeneric_OpDiv128u(v)
101 case OpDiv16:
102 return rewriteValuegeneric_OpDiv16(v)
103 case OpDiv16u:
104 return rewriteValuegeneric_OpDiv16u(v)
105 case OpDiv32:
106 return rewriteValuegeneric_OpDiv32(v)
107 case OpDiv32F:
108 return rewriteValuegeneric_OpDiv32F(v)
109 case OpDiv32u:
110 return rewriteValuegeneric_OpDiv32u(v)
111 case OpDiv64:
112 return rewriteValuegeneric_OpDiv64(v)
113 case OpDiv64F:
114 return rewriteValuegeneric_OpDiv64F(v)
115 case OpDiv64u:
116 return rewriteValuegeneric_OpDiv64u(v)
117 case OpDiv8:
118 return rewriteValuegeneric_OpDiv8(v)
119 case OpDiv8u:
120 return rewriteValuegeneric_OpDiv8u(v)
121 case OpEq16:
122 return rewriteValuegeneric_OpEq16(v)
123 case OpEq32:
124 return rewriteValuegeneric_OpEq32(v)
125 case OpEq32F:
126 return rewriteValuegeneric_OpEq32F(v)
127 case OpEq64:
128 return rewriteValuegeneric_OpEq64(v)
129 case OpEq64F:
130 return rewriteValuegeneric_OpEq64F(v)
131 case OpEq8:
132 return rewriteValuegeneric_OpEq8(v)
133 case OpEqB:
134 return rewriteValuegeneric_OpEqB(v)
135 case OpEqInter:
136 return rewriteValuegeneric_OpEqInter(v)
137 case OpEqPtr:
138 return rewriteValuegeneric_OpEqPtr(v)
139 case OpEqSlice:
140 return rewriteValuegeneric_OpEqSlice(v)
141 case OpFloor:
142 return rewriteValuegeneric_OpFloor(v)
143 case OpIMake:
144 return rewriteValuegeneric_OpIMake(v)
145 case OpInterLECall:
146 return rewriteValuegeneric_OpInterLECall(v)
147 case OpIsInBounds:
148 return rewriteValuegeneric_OpIsInBounds(v)
149 case OpIsNonNil:
150 return rewriteValuegeneric_OpIsNonNil(v)
151 case OpIsSliceInBounds:
152 return rewriteValuegeneric_OpIsSliceInBounds(v)
153 case OpLeq16:
154 return rewriteValuegeneric_OpLeq16(v)
155 case OpLeq16U:
156 return rewriteValuegeneric_OpLeq16U(v)
157 case OpLeq32:
158 return rewriteValuegeneric_OpLeq32(v)
159 case OpLeq32F:
160 return rewriteValuegeneric_OpLeq32F(v)
161 case OpLeq32U:
162 return rewriteValuegeneric_OpLeq32U(v)
163 case OpLeq64:
164 return rewriteValuegeneric_OpLeq64(v)
165 case OpLeq64F:
166 return rewriteValuegeneric_OpLeq64F(v)
167 case OpLeq64U:
168 return rewriteValuegeneric_OpLeq64U(v)
169 case OpLeq8:
170 return rewriteValuegeneric_OpLeq8(v)
171 case OpLeq8U:
172 return rewriteValuegeneric_OpLeq8U(v)
173 case OpLess16:
174 return rewriteValuegeneric_OpLess16(v)
175 case OpLess16U:
176 return rewriteValuegeneric_OpLess16U(v)
177 case OpLess32:
178 return rewriteValuegeneric_OpLess32(v)
179 case OpLess32F:
180 return rewriteValuegeneric_OpLess32F(v)
181 case OpLess32U:
182 return rewriteValuegeneric_OpLess32U(v)
183 case OpLess64:
184 return rewriteValuegeneric_OpLess64(v)
185 case OpLess64F:
186 return rewriteValuegeneric_OpLess64F(v)
187 case OpLess64U:
188 return rewriteValuegeneric_OpLess64U(v)
189 case OpLess8:
190 return rewriteValuegeneric_OpLess8(v)
191 case OpLess8U:
192 return rewriteValuegeneric_OpLess8U(v)
193 case OpLoad:
194 return rewriteValuegeneric_OpLoad(v)
195 case OpLsh16x16:
196 return rewriteValuegeneric_OpLsh16x16(v)
197 case OpLsh16x32:
198 return rewriteValuegeneric_OpLsh16x32(v)
199 case OpLsh16x64:
200 return rewriteValuegeneric_OpLsh16x64(v)
201 case OpLsh16x8:
202 return rewriteValuegeneric_OpLsh16x8(v)
203 case OpLsh32x16:
204 return rewriteValuegeneric_OpLsh32x16(v)
205 case OpLsh32x32:
206 return rewriteValuegeneric_OpLsh32x32(v)
207 case OpLsh32x64:
208 return rewriteValuegeneric_OpLsh32x64(v)
209 case OpLsh32x8:
210 return rewriteValuegeneric_OpLsh32x8(v)
211 case OpLsh64x16:
212 return rewriteValuegeneric_OpLsh64x16(v)
213 case OpLsh64x32:
214 return rewriteValuegeneric_OpLsh64x32(v)
215 case OpLsh64x64:
216 return rewriteValuegeneric_OpLsh64x64(v)
217 case OpLsh64x8:
218 return rewriteValuegeneric_OpLsh64x8(v)
219 case OpLsh8x16:
220 return rewriteValuegeneric_OpLsh8x16(v)
221 case OpLsh8x32:
222 return rewriteValuegeneric_OpLsh8x32(v)
223 case OpLsh8x64:
224 return rewriteValuegeneric_OpLsh8x64(v)
225 case OpLsh8x8:
226 return rewriteValuegeneric_OpLsh8x8(v)
227 case OpMod16:
228 return rewriteValuegeneric_OpMod16(v)
229 case OpMod16u:
230 return rewriteValuegeneric_OpMod16u(v)
231 case OpMod32:
232 return rewriteValuegeneric_OpMod32(v)
233 case OpMod32u:
234 return rewriteValuegeneric_OpMod32u(v)
235 case OpMod64:
236 return rewriteValuegeneric_OpMod64(v)
237 case OpMod64u:
238 return rewriteValuegeneric_OpMod64u(v)
239 case OpMod8:
240 return rewriteValuegeneric_OpMod8(v)
241 case OpMod8u:
242 return rewriteValuegeneric_OpMod8u(v)
243 case OpMove:
244 return rewriteValuegeneric_OpMove(v)
245 case OpMul16:
246 return rewriteValuegeneric_OpMul16(v)
247 case OpMul32:
248 return rewriteValuegeneric_OpMul32(v)
249 case OpMul32F:
250 return rewriteValuegeneric_OpMul32F(v)
251 case OpMul32uhilo:
252 return rewriteValuegeneric_OpMul32uhilo(v)
253 case OpMul32uover:
254 return rewriteValuegeneric_OpMul32uover(v)
255 case OpMul64:
256 return rewriteValuegeneric_OpMul64(v)
257 case OpMul64F:
258 return rewriteValuegeneric_OpMul64F(v)
259 case OpMul64uhilo:
260 return rewriteValuegeneric_OpMul64uhilo(v)
261 case OpMul64uover:
262 return rewriteValuegeneric_OpMul64uover(v)
263 case OpMul8:
264 return rewriteValuegeneric_OpMul8(v)
265 case OpNeg16:
266 return rewriteValuegeneric_OpNeg16(v)
267 case OpNeg32:
268 return rewriteValuegeneric_OpNeg32(v)
269 case OpNeg32F:
270 return rewriteValuegeneric_OpNeg32F(v)
271 case OpNeg64:
272 return rewriteValuegeneric_OpNeg64(v)
273 case OpNeg64F:
274 return rewriteValuegeneric_OpNeg64F(v)
275 case OpNeg8:
276 return rewriteValuegeneric_OpNeg8(v)
277 case OpNeq16:
278 return rewriteValuegeneric_OpNeq16(v)
279 case OpNeq32:
280 return rewriteValuegeneric_OpNeq32(v)
281 case OpNeq32F:
282 return rewriteValuegeneric_OpNeq32F(v)
283 case OpNeq64:
284 return rewriteValuegeneric_OpNeq64(v)
285 case OpNeq64F:
286 return rewriteValuegeneric_OpNeq64F(v)
287 case OpNeq8:
288 return rewriteValuegeneric_OpNeq8(v)
289 case OpNeqB:
290 return rewriteValuegeneric_OpNeqB(v)
291 case OpNeqInter:
292 return rewriteValuegeneric_OpNeqInter(v)
293 case OpNeqPtr:
294 return rewriteValuegeneric_OpNeqPtr(v)
295 case OpNeqSlice:
296 return rewriteValuegeneric_OpNeqSlice(v)
297 case OpNilCheck:
298 return rewriteValuegeneric_OpNilCheck(v)
299 case OpNot:
300 return rewriteValuegeneric_OpNot(v)
301 case OpOffPtr:
302 return rewriteValuegeneric_OpOffPtr(v)
303 case OpOr16:
304 return rewriteValuegeneric_OpOr16(v)
305 case OpOr32:
306 return rewriteValuegeneric_OpOr32(v)
307 case OpOr64:
308 return rewriteValuegeneric_OpOr64(v)
309 case OpOr8:
310 return rewriteValuegeneric_OpOr8(v)
311 case OpOrB:
312 return rewriteValuegeneric_OpOrB(v)
313 case OpPhi:
314 return rewriteValuegeneric_OpPhi(v)
315 case OpPopCount16:
316 return rewriteValuegeneric_OpPopCount16(v)
317 case OpPopCount32:
318 return rewriteValuegeneric_OpPopCount32(v)
319 case OpPopCount64:
320 return rewriteValuegeneric_OpPopCount64(v)
321 case OpPopCount8:
322 return rewriteValuegeneric_OpPopCount8(v)
323 case OpPtrIndex:
324 return rewriteValuegeneric_OpPtrIndex(v)
325 case OpRotateLeft16:
326 return rewriteValuegeneric_OpRotateLeft16(v)
327 case OpRotateLeft32:
328 return rewriteValuegeneric_OpRotateLeft32(v)
329 case OpRotateLeft64:
330 return rewriteValuegeneric_OpRotateLeft64(v)
331 case OpRotateLeft8:
332 return rewriteValuegeneric_OpRotateLeft8(v)
333 case OpRound32F:
334 return rewriteValuegeneric_OpRound32F(v)
335 case OpRound64F:
336 return rewriteValuegeneric_OpRound64F(v)
337 case OpRoundToEven:
338 return rewriteValuegeneric_OpRoundToEven(v)
339 case OpRsh16Ux16:
340 return rewriteValuegeneric_OpRsh16Ux16(v)
341 case OpRsh16Ux32:
342 return rewriteValuegeneric_OpRsh16Ux32(v)
343 case OpRsh16Ux64:
344 return rewriteValuegeneric_OpRsh16Ux64(v)
345 case OpRsh16Ux8:
346 return rewriteValuegeneric_OpRsh16Ux8(v)
347 case OpRsh16x16:
348 return rewriteValuegeneric_OpRsh16x16(v)
349 case OpRsh16x32:
350 return rewriteValuegeneric_OpRsh16x32(v)
351 case OpRsh16x64:
352 return rewriteValuegeneric_OpRsh16x64(v)
353 case OpRsh16x8:
354 return rewriteValuegeneric_OpRsh16x8(v)
355 case OpRsh32Ux16:
356 return rewriteValuegeneric_OpRsh32Ux16(v)
357 case OpRsh32Ux32:
358 return rewriteValuegeneric_OpRsh32Ux32(v)
359 case OpRsh32Ux64:
360 return rewriteValuegeneric_OpRsh32Ux64(v)
361 case OpRsh32Ux8:
362 return rewriteValuegeneric_OpRsh32Ux8(v)
363 case OpRsh32x16:
364 return rewriteValuegeneric_OpRsh32x16(v)
365 case OpRsh32x32:
366 return rewriteValuegeneric_OpRsh32x32(v)
367 case OpRsh32x64:
368 return rewriteValuegeneric_OpRsh32x64(v)
369 case OpRsh32x8:
370 return rewriteValuegeneric_OpRsh32x8(v)
371 case OpRsh64Ux16:
372 return rewriteValuegeneric_OpRsh64Ux16(v)
373 case OpRsh64Ux32:
374 return rewriteValuegeneric_OpRsh64Ux32(v)
375 case OpRsh64Ux64:
376 return rewriteValuegeneric_OpRsh64Ux64(v)
377 case OpRsh64Ux8:
378 return rewriteValuegeneric_OpRsh64Ux8(v)
379 case OpRsh64x16:
380 return rewriteValuegeneric_OpRsh64x16(v)
381 case OpRsh64x32:
382 return rewriteValuegeneric_OpRsh64x32(v)
383 case OpRsh64x64:
384 return rewriteValuegeneric_OpRsh64x64(v)
385 case OpRsh64x8:
386 return rewriteValuegeneric_OpRsh64x8(v)
387 case OpRsh8Ux16:
388 return rewriteValuegeneric_OpRsh8Ux16(v)
389 case OpRsh8Ux32:
390 return rewriteValuegeneric_OpRsh8Ux32(v)
391 case OpRsh8Ux64:
392 return rewriteValuegeneric_OpRsh8Ux64(v)
393 case OpRsh8Ux8:
394 return rewriteValuegeneric_OpRsh8Ux8(v)
395 case OpRsh8x16:
396 return rewriteValuegeneric_OpRsh8x16(v)
397 case OpRsh8x32:
398 return rewriteValuegeneric_OpRsh8x32(v)
399 case OpRsh8x64:
400 return rewriteValuegeneric_OpRsh8x64(v)
401 case OpRsh8x8:
402 return rewriteValuegeneric_OpRsh8x8(v)
403 case OpSelect0:
404 return rewriteValuegeneric_OpSelect0(v)
405 case OpSelect1:
406 return rewriteValuegeneric_OpSelect1(v)
407 case OpSelectN:
408 return rewriteValuegeneric_OpSelectN(v)
409 case OpSignExt16to32:
410 return rewriteValuegeneric_OpSignExt16to32(v)
411 case OpSignExt16to64:
412 return rewriteValuegeneric_OpSignExt16to64(v)
413 case OpSignExt32to64:
414 return rewriteValuegeneric_OpSignExt32to64(v)
415 case OpSignExt8to16:
416 return rewriteValuegeneric_OpSignExt8to16(v)
417 case OpSignExt8to32:
418 return rewriteValuegeneric_OpSignExt8to32(v)
419 case OpSignExt8to64:
420 return rewriteValuegeneric_OpSignExt8to64(v)
421 case OpSliceCap:
422 return rewriteValuegeneric_OpSliceCap(v)
423 case OpSliceLen:
424 return rewriteValuegeneric_OpSliceLen(v)
425 case OpSlicePtr:
426 return rewriteValuegeneric_OpSlicePtr(v)
427 case OpSlicemask:
428 return rewriteValuegeneric_OpSlicemask(v)
429 case OpSqrt:
430 return rewriteValuegeneric_OpSqrt(v)
431 case OpStaticCall:
432 return rewriteValuegeneric_OpStaticCall(v)
433 case OpStaticLECall:
434 return rewriteValuegeneric_OpStaticLECall(v)
435 case OpStore:
436 return rewriteValuegeneric_OpStore(v)
437 case OpStringLen:
438 return rewriteValuegeneric_OpStringLen(v)
439 case OpStringPtr:
440 return rewriteValuegeneric_OpStringPtr(v)
441 case OpStructSelect:
442 return rewriteValuegeneric_OpStructSelect(v)
443 case OpSub16:
444 return rewriteValuegeneric_OpSub16(v)
445 case OpSub32:
446 return rewriteValuegeneric_OpSub32(v)
447 case OpSub32F:
448 return rewriteValuegeneric_OpSub32F(v)
449 case OpSub64:
450 return rewriteValuegeneric_OpSub64(v)
451 case OpSub64F:
452 return rewriteValuegeneric_OpSub64F(v)
453 case OpSub8:
454 return rewriteValuegeneric_OpSub8(v)
455 case OpTrunc:
456 return rewriteValuegeneric_OpTrunc(v)
457 case OpTrunc16to8:
458 return rewriteValuegeneric_OpTrunc16to8(v)
459 case OpTrunc32to16:
460 return rewriteValuegeneric_OpTrunc32to16(v)
461 case OpTrunc32to8:
462 return rewriteValuegeneric_OpTrunc32to8(v)
463 case OpTrunc64to16:
464 return rewriteValuegeneric_OpTrunc64to16(v)
465 case OpTrunc64to32:
466 return rewriteValuegeneric_OpTrunc64to32(v)
467 case OpTrunc64to8:
468 return rewriteValuegeneric_OpTrunc64to8(v)
469 case OpXor16:
470 return rewriteValuegeneric_OpXor16(v)
471 case OpXor32:
472 return rewriteValuegeneric_OpXor32(v)
473 case OpXor64:
474 return rewriteValuegeneric_OpXor64(v)
475 case OpXor8:
476 return rewriteValuegeneric_OpXor8(v)
477 case OpZero:
478 return rewriteValuegeneric_OpZero(v)
479 case OpZeroExt16to32:
480 return rewriteValuegeneric_OpZeroExt16to32(v)
481 case OpZeroExt16to64:
482 return rewriteValuegeneric_OpZeroExt16to64(v)
483 case OpZeroExt32to64:
484 return rewriteValuegeneric_OpZeroExt32to64(v)
485 case OpZeroExt8to16:
486 return rewriteValuegeneric_OpZeroExt8to16(v)
487 case OpZeroExt8to32:
488 return rewriteValuegeneric_OpZeroExt8to32(v)
489 case OpZeroExt8to64:
490 return rewriteValuegeneric_OpZeroExt8to64(v)
491 }
492 return false
493 }
494 func rewriteValuegeneric_OpAdd16(v *Value) bool {
495 v_1 := v.Args[1]
496 v_0 := v.Args[0]
497 b := v.Block
498 config := b.Func.Config
499
500
501 for {
502 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
503 if v_0.Op != OpConst16 {
504 continue
505 }
506 c := auxIntToInt16(v_0.AuxInt)
507 if v_1.Op != OpConst16 {
508 continue
509 }
510 d := auxIntToInt16(v_1.AuxInt)
511 v.reset(OpConst16)
512 v.AuxInt = int16ToAuxInt(c + d)
513 return true
514 }
515 break
516 }
517
518
519 for {
520 t := v.Type
521 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
522 if v_0.Op != OpMul16 {
523 continue
524 }
525 _ = v_0.Args[1]
526 v_0_0 := v_0.Args[0]
527 v_0_1 := v_0.Args[1]
528 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
529 x := v_0_0
530 y := v_0_1
531 if v_1.Op != OpMul16 {
532 continue
533 }
534 _ = v_1.Args[1]
535 v_1_0 := v_1.Args[0]
536 v_1_1 := v_1.Args[1]
537 for _i2 := 0; _i2 <= 1; _i2, v_1_0, v_1_1 = _i2+1, v_1_1, v_1_0 {
538 if x != v_1_0 {
539 continue
540 }
541 z := v_1_1
542 v.reset(OpMul16)
543 v0 := b.NewValue0(v.Pos, OpAdd16, t)
544 v0.AddArg2(y, z)
545 v.AddArg2(x, v0)
546 return true
547 }
548 }
549 }
550 break
551 }
552
553
554 for {
555 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
556 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 {
557 continue
558 }
559 x := v_1
560 v.copyOf(x)
561 return true
562 }
563 break
564 }
565
566
567 for {
568 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
569 x := v_0
570 if v_1.Op != OpNeg16 {
571 continue
572 }
573 y := v_1.Args[0]
574 v.reset(OpSub16)
575 v.AddArg2(x, y)
576 return true
577 }
578 break
579 }
580
581
582 for {
583 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
584 if v_0.Op != OpCom16 {
585 continue
586 }
587 x := v_0.Args[0]
588 if x != v_1 {
589 continue
590 }
591 v.reset(OpConst16)
592 v.AuxInt = int16ToAuxInt(-1)
593 return true
594 }
595 break
596 }
597
598
599 for {
600 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
601 if v_0.Op != OpSub16 {
602 continue
603 }
604 t := v_0.Args[1]
605 x := v_0.Args[0]
606 if v_1.Op != OpAdd16 {
607 continue
608 }
609 _ = v_1.Args[1]
610 v_1_0 := v_1.Args[0]
611 v_1_1 := v_1.Args[1]
612 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
613 if t != v_1_0 {
614 continue
615 }
616 y := v_1_1
617 v.reset(OpAdd16)
618 v.AddArg2(x, y)
619 return true
620 }
621 }
622 break
623 }
624
625
626 for {
627 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
628 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 1 || v_1.Op != OpCom16 {
629 continue
630 }
631 x := v_1.Args[0]
632 v.reset(OpNeg16)
633 v.AddArg(x)
634 return true
635 }
636 break
637 }
638
639
640 for {
641 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
642 x := v_0
643 if v_1.Op != OpSub16 {
644 continue
645 }
646 _ = v_1.Args[1]
647 y := v_1.Args[0]
648 if x != v_1.Args[1] {
649 continue
650 }
651 v.copyOf(y)
652 return true
653 }
654 break
655 }
656
657
658 for {
659 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
660 x := v_0
661 if v_1.Op != OpAdd16 {
662 continue
663 }
664 _ = v_1.Args[1]
665 v_1_0 := v_1.Args[0]
666 v_1_1 := v_1.Args[1]
667 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
668 y := v_1_0
669 if v_1_1.Op != OpSub16 {
670 continue
671 }
672 _ = v_1_1.Args[1]
673 z := v_1_1.Args[0]
674 if x != v_1_1.Args[1] {
675 continue
676 }
677 v.reset(OpAdd16)
678 v.AddArg2(y, z)
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 != OpAdd16 {
690 continue
691 }
692 _ = v_0.Args[1]
693 v_0_0 := v_0.Args[0]
694 v_0_1 := v_0.Args[1]
695 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
696 i := v_0_0
697 if i.Op != OpConst16 {
698 continue
699 }
700 t := i.Type
701 z := v_0_1
702 x := v_1
703 if !(z.Op != OpConst16 && x.Op != OpConst16) {
704 continue
705 }
706 v.reset(OpAdd16)
707 v0 := b.NewValue0(v.Pos, OpAdd16, t)
708 v0.AddArg2(z, x)
709 v.AddArg2(i, v0)
710 return true
711 }
712 }
713 break
714 }
715
716
717
718 for {
719 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
720 if v_0.Op != OpSub16 {
721 continue
722 }
723 z := v_0.Args[1]
724 i := v_0.Args[0]
725 if i.Op != OpConst16 {
726 continue
727 }
728 t := i.Type
729 x := v_1
730 if !(z.Op != OpConst16 && x.Op != OpConst16) {
731 continue
732 }
733 v.reset(OpAdd16)
734 v0 := b.NewValue0(v.Pos, OpSub16, t)
735 v0.AddArg2(x, z)
736 v.AddArg2(i, v0)
737 return true
738 }
739 break
740 }
741
742
743 for {
744 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
745 if v_0.Op != OpConst16 {
746 continue
747 }
748 t := v_0.Type
749 c := auxIntToInt16(v_0.AuxInt)
750 if v_1.Op != OpAdd16 {
751 continue
752 }
753 _ = v_1.Args[1]
754 v_1_0 := v_1.Args[0]
755 v_1_1 := v_1.Args[1]
756 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
757 if v_1_0.Op != OpConst16 || v_1_0.Type != t {
758 continue
759 }
760 d := auxIntToInt16(v_1_0.AuxInt)
761 x := v_1_1
762 v.reset(OpAdd16)
763 v0 := b.NewValue0(v.Pos, OpConst16, t)
764 v0.AuxInt = int16ToAuxInt(c + d)
765 v.AddArg2(v0, x)
766 return true
767 }
768 }
769 break
770 }
771
772
773 for {
774 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
775 if v_0.Op != OpConst16 {
776 continue
777 }
778 t := v_0.Type
779 c := auxIntToInt16(v_0.AuxInt)
780 if v_1.Op != OpSub16 {
781 continue
782 }
783 x := v_1.Args[1]
784 v_1_0 := v_1.Args[0]
785 if v_1_0.Op != OpConst16 || v_1_0.Type != t {
786 continue
787 }
788 d := auxIntToInt16(v_1_0.AuxInt)
789 v.reset(OpSub16)
790 v0 := b.NewValue0(v.Pos, OpConst16, t)
791 v0.AuxInt = int16ToAuxInt(c + d)
792 v.AddArg2(v0, x)
793 return true
794 }
795 break
796 }
797
798
799
800 for {
801 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
802 if v_0.Op != OpLsh16x64 {
803 continue
804 }
805 _ = v_0.Args[1]
806 x := v_0.Args[0]
807 z := v_0.Args[1]
808 if z.Op != OpConst64 {
809 continue
810 }
811 c := auxIntToInt64(z.AuxInt)
812 if v_1.Op != OpRsh16Ux64 {
813 continue
814 }
815 _ = v_1.Args[1]
816 if x != v_1.Args[0] {
817 continue
818 }
819 v_1_1 := v_1.Args[1]
820 if v_1_1.Op != OpConst64 {
821 continue
822 }
823 d := auxIntToInt64(v_1_1.AuxInt)
824 if !(c < 16 && d == 16-c && canRotate(config, 16)) {
825 continue
826 }
827 v.reset(OpRotateLeft16)
828 v.AddArg2(x, z)
829 return true
830 }
831 break
832 }
833
834
835
836 for {
837 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
838 left := v_0
839 if left.Op != OpLsh16x64 {
840 continue
841 }
842 y := left.Args[1]
843 x := left.Args[0]
844 right := v_1
845 if right.Op != OpRsh16Ux64 {
846 continue
847 }
848 _ = right.Args[1]
849 if x != right.Args[0] {
850 continue
851 }
852 right_1 := right.Args[1]
853 if right_1.Op != OpSub64 {
854 continue
855 }
856 _ = right_1.Args[1]
857 right_1_0 := right_1.Args[0]
858 if right_1_0.Op != OpConst64 || auxIntToInt64(right_1_0.AuxInt) != 16 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 16)) {
859 continue
860 }
861 v.reset(OpRotateLeft16)
862 v.AddArg2(x, y)
863 return true
864 }
865 break
866 }
867
868
869
870 for {
871 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
872 left := v_0
873 if left.Op != OpLsh16x32 {
874 continue
875 }
876 y := left.Args[1]
877 x := left.Args[0]
878 right := v_1
879 if right.Op != OpRsh16Ux32 {
880 continue
881 }
882 _ = right.Args[1]
883 if x != right.Args[0] {
884 continue
885 }
886 right_1 := right.Args[1]
887 if right_1.Op != OpSub32 {
888 continue
889 }
890 _ = right_1.Args[1]
891 right_1_0 := right_1.Args[0]
892 if right_1_0.Op != OpConst32 || auxIntToInt32(right_1_0.AuxInt) != 16 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 16)) {
893 continue
894 }
895 v.reset(OpRotateLeft16)
896 v.AddArg2(x, y)
897 return true
898 }
899 break
900 }
901
902
903
904 for {
905 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
906 left := v_0
907 if left.Op != OpLsh16x16 {
908 continue
909 }
910 y := left.Args[1]
911 x := left.Args[0]
912 right := v_1
913 if right.Op != OpRsh16Ux16 {
914 continue
915 }
916 _ = right.Args[1]
917 if x != right.Args[0] {
918 continue
919 }
920 right_1 := right.Args[1]
921 if right_1.Op != OpSub16 {
922 continue
923 }
924 _ = right_1.Args[1]
925 right_1_0 := right_1.Args[0]
926 if right_1_0.Op != OpConst16 || auxIntToInt16(right_1_0.AuxInt) != 16 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 16)) {
927 continue
928 }
929 v.reset(OpRotateLeft16)
930 v.AddArg2(x, y)
931 return true
932 }
933 break
934 }
935
936
937
938 for {
939 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
940 left := v_0
941 if left.Op != OpLsh16x8 {
942 continue
943 }
944 y := left.Args[1]
945 x := left.Args[0]
946 right := v_1
947 if right.Op != OpRsh16Ux8 {
948 continue
949 }
950 _ = right.Args[1]
951 if x != right.Args[0] {
952 continue
953 }
954 right_1 := right.Args[1]
955 if right_1.Op != OpSub8 {
956 continue
957 }
958 _ = right_1.Args[1]
959 right_1_0 := right_1.Args[0]
960 if right_1_0.Op != OpConst8 || auxIntToInt8(right_1_0.AuxInt) != 16 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 16)) {
961 continue
962 }
963 v.reset(OpRotateLeft16)
964 v.AddArg2(x, y)
965 return true
966 }
967 break
968 }
969
970
971
972 for {
973 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
974 right := v_0
975 if right.Op != OpRsh16Ux64 {
976 continue
977 }
978 y := right.Args[1]
979 x := right.Args[0]
980 left := v_1
981 if left.Op != OpLsh16x64 {
982 continue
983 }
984 _ = left.Args[1]
985 if x != left.Args[0] {
986 continue
987 }
988 z := left.Args[1]
989 if z.Op != OpSub64 {
990 continue
991 }
992 _ = z.Args[1]
993 z_0 := z.Args[0]
994 if z_0.Op != OpConst64 || auxIntToInt64(z_0.AuxInt) != 16 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 16)) {
995 continue
996 }
997 v.reset(OpRotateLeft16)
998 v.AddArg2(x, z)
999 return true
1000 }
1001 break
1002 }
1003
1004
1005
1006 for {
1007 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1008 right := v_0
1009 if right.Op != OpRsh16Ux32 {
1010 continue
1011 }
1012 y := right.Args[1]
1013 x := right.Args[0]
1014 left := v_1
1015 if left.Op != OpLsh16x32 {
1016 continue
1017 }
1018 _ = left.Args[1]
1019 if x != left.Args[0] {
1020 continue
1021 }
1022 z := left.Args[1]
1023 if z.Op != OpSub32 {
1024 continue
1025 }
1026 _ = z.Args[1]
1027 z_0 := z.Args[0]
1028 if z_0.Op != OpConst32 || auxIntToInt32(z_0.AuxInt) != 16 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 16)) {
1029 continue
1030 }
1031 v.reset(OpRotateLeft16)
1032 v.AddArg2(x, z)
1033 return true
1034 }
1035 break
1036 }
1037
1038
1039
1040 for {
1041 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1042 right := v_0
1043 if right.Op != OpRsh16Ux16 {
1044 continue
1045 }
1046 y := right.Args[1]
1047 x := right.Args[0]
1048 left := v_1
1049 if left.Op != OpLsh16x16 {
1050 continue
1051 }
1052 _ = left.Args[1]
1053 if x != left.Args[0] {
1054 continue
1055 }
1056 z := left.Args[1]
1057 if z.Op != OpSub16 {
1058 continue
1059 }
1060 _ = z.Args[1]
1061 z_0 := z.Args[0]
1062 if z_0.Op != OpConst16 || auxIntToInt16(z_0.AuxInt) != 16 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 16)) {
1063 continue
1064 }
1065 v.reset(OpRotateLeft16)
1066 v.AddArg2(x, z)
1067 return true
1068 }
1069 break
1070 }
1071
1072
1073
1074 for {
1075 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1076 right := v_0
1077 if right.Op != OpRsh16Ux8 {
1078 continue
1079 }
1080 y := right.Args[1]
1081 x := right.Args[0]
1082 left := v_1
1083 if left.Op != OpLsh16x8 {
1084 continue
1085 }
1086 _ = left.Args[1]
1087 if x != left.Args[0] {
1088 continue
1089 }
1090 z := left.Args[1]
1091 if z.Op != OpSub8 {
1092 continue
1093 }
1094 _ = z.Args[1]
1095 z_0 := z.Args[0]
1096 if z_0.Op != OpConst8 || auxIntToInt8(z_0.AuxInt) != 16 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 16)) {
1097 continue
1098 }
1099 v.reset(OpRotateLeft16)
1100 v.AddArg2(x, z)
1101 return true
1102 }
1103 break
1104 }
1105 return false
1106 }
1107 func rewriteValuegeneric_OpAdd32(v *Value) bool {
1108 v_1 := v.Args[1]
1109 v_0 := v.Args[0]
1110 b := v.Block
1111 config := b.Func.Config
1112
1113
1114 for {
1115 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1116 if v_0.Op != OpConst32 {
1117 continue
1118 }
1119 c := auxIntToInt32(v_0.AuxInt)
1120 if v_1.Op != OpConst32 {
1121 continue
1122 }
1123 d := auxIntToInt32(v_1.AuxInt)
1124 v.reset(OpConst32)
1125 v.AuxInt = int32ToAuxInt(c + d)
1126 return true
1127 }
1128 break
1129 }
1130
1131
1132 for {
1133 t := v.Type
1134 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1135 if v_0.Op != OpMul32 {
1136 continue
1137 }
1138 _ = v_0.Args[1]
1139 v_0_0 := v_0.Args[0]
1140 v_0_1 := v_0.Args[1]
1141 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
1142 x := v_0_0
1143 y := v_0_1
1144 if v_1.Op != OpMul32 {
1145 continue
1146 }
1147 _ = v_1.Args[1]
1148 v_1_0 := v_1.Args[0]
1149 v_1_1 := v_1.Args[1]
1150 for _i2 := 0; _i2 <= 1; _i2, v_1_0, v_1_1 = _i2+1, v_1_1, v_1_0 {
1151 if x != v_1_0 {
1152 continue
1153 }
1154 z := v_1_1
1155 v.reset(OpMul32)
1156 v0 := b.NewValue0(v.Pos, OpAdd32, t)
1157 v0.AddArg2(y, z)
1158 v.AddArg2(x, v0)
1159 return true
1160 }
1161 }
1162 }
1163 break
1164 }
1165
1166
1167 for {
1168 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1169 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
1170 continue
1171 }
1172 x := v_1
1173 v.copyOf(x)
1174 return true
1175 }
1176 break
1177 }
1178
1179
1180 for {
1181 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1182 x := v_0
1183 if v_1.Op != OpNeg32 {
1184 continue
1185 }
1186 y := v_1.Args[0]
1187 v.reset(OpSub32)
1188 v.AddArg2(x, y)
1189 return true
1190 }
1191 break
1192 }
1193
1194
1195 for {
1196 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1197 if v_0.Op != OpCom32 {
1198 continue
1199 }
1200 x := v_0.Args[0]
1201 if x != v_1 {
1202 continue
1203 }
1204 v.reset(OpConst32)
1205 v.AuxInt = int32ToAuxInt(-1)
1206 return true
1207 }
1208 break
1209 }
1210
1211
1212 for {
1213 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1214 if v_0.Op != OpSub32 {
1215 continue
1216 }
1217 t := v_0.Args[1]
1218 x := v_0.Args[0]
1219 if v_1.Op != OpAdd32 {
1220 continue
1221 }
1222 _ = v_1.Args[1]
1223 v_1_0 := v_1.Args[0]
1224 v_1_1 := v_1.Args[1]
1225 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
1226 if t != v_1_0 {
1227 continue
1228 }
1229 y := v_1_1
1230 v.reset(OpAdd32)
1231 v.AddArg2(x, y)
1232 return true
1233 }
1234 }
1235 break
1236 }
1237
1238
1239 for {
1240 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1241 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 1 || v_1.Op != OpCom32 {
1242 continue
1243 }
1244 x := v_1.Args[0]
1245 v.reset(OpNeg32)
1246 v.AddArg(x)
1247 return true
1248 }
1249 break
1250 }
1251
1252
1253 for {
1254 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1255 x := v_0
1256 if v_1.Op != OpSub32 {
1257 continue
1258 }
1259 _ = v_1.Args[1]
1260 y := v_1.Args[0]
1261 if x != v_1.Args[1] {
1262 continue
1263 }
1264 v.copyOf(y)
1265 return true
1266 }
1267 break
1268 }
1269
1270
1271 for {
1272 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1273 x := v_0
1274 if v_1.Op != OpAdd32 {
1275 continue
1276 }
1277 _ = v_1.Args[1]
1278 v_1_0 := v_1.Args[0]
1279 v_1_1 := v_1.Args[1]
1280 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
1281 y := v_1_0
1282 if v_1_1.Op != OpSub32 {
1283 continue
1284 }
1285 _ = v_1_1.Args[1]
1286 z := v_1_1.Args[0]
1287 if x != v_1_1.Args[1] {
1288 continue
1289 }
1290 v.reset(OpAdd32)
1291 v.AddArg2(y, z)
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 != OpAdd32 {
1303 continue
1304 }
1305 _ = v_0.Args[1]
1306 v_0_0 := v_0.Args[0]
1307 v_0_1 := v_0.Args[1]
1308 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
1309 i := v_0_0
1310 if i.Op != OpConst32 {
1311 continue
1312 }
1313 t := i.Type
1314 z := v_0_1
1315 x := v_1
1316 if !(z.Op != OpConst32 && x.Op != OpConst32) {
1317 continue
1318 }
1319 v.reset(OpAdd32)
1320 v0 := b.NewValue0(v.Pos, OpAdd32, t)
1321 v0.AddArg2(z, x)
1322 v.AddArg2(i, v0)
1323 return true
1324 }
1325 }
1326 break
1327 }
1328
1329
1330
1331 for {
1332 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1333 if v_0.Op != OpSub32 {
1334 continue
1335 }
1336 z := v_0.Args[1]
1337 i := v_0.Args[0]
1338 if i.Op != OpConst32 {
1339 continue
1340 }
1341 t := i.Type
1342 x := v_1
1343 if !(z.Op != OpConst32 && x.Op != OpConst32) {
1344 continue
1345 }
1346 v.reset(OpAdd32)
1347 v0 := b.NewValue0(v.Pos, OpSub32, t)
1348 v0.AddArg2(x, z)
1349 v.AddArg2(i, v0)
1350 return true
1351 }
1352 break
1353 }
1354
1355
1356 for {
1357 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1358 if v_0.Op != OpConst32 {
1359 continue
1360 }
1361 t := v_0.Type
1362 c := auxIntToInt32(v_0.AuxInt)
1363 if v_1.Op != OpAdd32 {
1364 continue
1365 }
1366 _ = v_1.Args[1]
1367 v_1_0 := v_1.Args[0]
1368 v_1_1 := v_1.Args[1]
1369 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
1370 if v_1_0.Op != OpConst32 || v_1_0.Type != t {
1371 continue
1372 }
1373 d := auxIntToInt32(v_1_0.AuxInt)
1374 x := v_1_1
1375 v.reset(OpAdd32)
1376 v0 := b.NewValue0(v.Pos, OpConst32, t)
1377 v0.AuxInt = int32ToAuxInt(c + d)
1378 v.AddArg2(v0, x)
1379 return true
1380 }
1381 }
1382 break
1383 }
1384
1385
1386 for {
1387 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1388 if v_0.Op != OpConst32 {
1389 continue
1390 }
1391 t := v_0.Type
1392 c := auxIntToInt32(v_0.AuxInt)
1393 if v_1.Op != OpSub32 {
1394 continue
1395 }
1396 x := v_1.Args[1]
1397 v_1_0 := v_1.Args[0]
1398 if v_1_0.Op != OpConst32 || v_1_0.Type != t {
1399 continue
1400 }
1401 d := auxIntToInt32(v_1_0.AuxInt)
1402 v.reset(OpSub32)
1403 v0 := b.NewValue0(v.Pos, OpConst32, t)
1404 v0.AuxInt = int32ToAuxInt(c + d)
1405 v.AddArg2(v0, x)
1406 return true
1407 }
1408 break
1409 }
1410
1411
1412
1413 for {
1414 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1415 if v_0.Op != OpLsh32x64 {
1416 continue
1417 }
1418 _ = v_0.Args[1]
1419 x := v_0.Args[0]
1420 z := v_0.Args[1]
1421 if z.Op != OpConst64 {
1422 continue
1423 }
1424 c := auxIntToInt64(z.AuxInt)
1425 if v_1.Op != OpRsh32Ux64 {
1426 continue
1427 }
1428 _ = v_1.Args[1]
1429 if x != v_1.Args[0] {
1430 continue
1431 }
1432 v_1_1 := v_1.Args[1]
1433 if v_1_1.Op != OpConst64 {
1434 continue
1435 }
1436 d := auxIntToInt64(v_1_1.AuxInt)
1437 if !(c < 32 && d == 32-c && canRotate(config, 32)) {
1438 continue
1439 }
1440 v.reset(OpRotateLeft32)
1441 v.AddArg2(x, z)
1442 return true
1443 }
1444 break
1445 }
1446
1447
1448
1449 for {
1450 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1451 left := v_0
1452 if left.Op != OpLsh32x64 {
1453 continue
1454 }
1455 y := left.Args[1]
1456 x := left.Args[0]
1457 right := v_1
1458 if right.Op != OpRsh32Ux64 {
1459 continue
1460 }
1461 _ = right.Args[1]
1462 if x != right.Args[0] {
1463 continue
1464 }
1465 right_1 := right.Args[1]
1466 if right_1.Op != OpSub64 {
1467 continue
1468 }
1469 _ = right_1.Args[1]
1470 right_1_0 := right_1.Args[0]
1471 if right_1_0.Op != OpConst64 || auxIntToInt64(right_1_0.AuxInt) != 32 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 32)) {
1472 continue
1473 }
1474 v.reset(OpRotateLeft32)
1475 v.AddArg2(x, y)
1476 return true
1477 }
1478 break
1479 }
1480
1481
1482
1483 for {
1484 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1485 left := v_0
1486 if left.Op != OpLsh32x32 {
1487 continue
1488 }
1489 y := left.Args[1]
1490 x := left.Args[0]
1491 right := v_1
1492 if right.Op != OpRsh32Ux32 {
1493 continue
1494 }
1495 _ = right.Args[1]
1496 if x != right.Args[0] {
1497 continue
1498 }
1499 right_1 := right.Args[1]
1500 if right_1.Op != OpSub32 {
1501 continue
1502 }
1503 _ = right_1.Args[1]
1504 right_1_0 := right_1.Args[0]
1505 if right_1_0.Op != OpConst32 || auxIntToInt32(right_1_0.AuxInt) != 32 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 32)) {
1506 continue
1507 }
1508 v.reset(OpRotateLeft32)
1509 v.AddArg2(x, y)
1510 return true
1511 }
1512 break
1513 }
1514
1515
1516
1517 for {
1518 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1519 left := v_0
1520 if left.Op != OpLsh32x16 {
1521 continue
1522 }
1523 y := left.Args[1]
1524 x := left.Args[0]
1525 right := v_1
1526 if right.Op != OpRsh32Ux16 {
1527 continue
1528 }
1529 _ = right.Args[1]
1530 if x != right.Args[0] {
1531 continue
1532 }
1533 right_1 := right.Args[1]
1534 if right_1.Op != OpSub16 {
1535 continue
1536 }
1537 _ = right_1.Args[1]
1538 right_1_0 := right_1.Args[0]
1539 if right_1_0.Op != OpConst16 || auxIntToInt16(right_1_0.AuxInt) != 32 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 32)) {
1540 continue
1541 }
1542 v.reset(OpRotateLeft32)
1543 v.AddArg2(x, y)
1544 return true
1545 }
1546 break
1547 }
1548
1549
1550
1551 for {
1552 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1553 left := v_0
1554 if left.Op != OpLsh32x8 {
1555 continue
1556 }
1557 y := left.Args[1]
1558 x := left.Args[0]
1559 right := v_1
1560 if right.Op != OpRsh32Ux8 {
1561 continue
1562 }
1563 _ = right.Args[1]
1564 if x != right.Args[0] {
1565 continue
1566 }
1567 right_1 := right.Args[1]
1568 if right_1.Op != OpSub8 {
1569 continue
1570 }
1571 _ = right_1.Args[1]
1572 right_1_0 := right_1.Args[0]
1573 if right_1_0.Op != OpConst8 || auxIntToInt8(right_1_0.AuxInt) != 32 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 32)) {
1574 continue
1575 }
1576 v.reset(OpRotateLeft32)
1577 v.AddArg2(x, y)
1578 return true
1579 }
1580 break
1581 }
1582
1583
1584
1585 for {
1586 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1587 right := v_0
1588 if right.Op != OpRsh32Ux64 {
1589 continue
1590 }
1591 y := right.Args[1]
1592 x := right.Args[0]
1593 left := v_1
1594 if left.Op != OpLsh32x64 {
1595 continue
1596 }
1597 _ = left.Args[1]
1598 if x != left.Args[0] {
1599 continue
1600 }
1601 z := left.Args[1]
1602 if z.Op != OpSub64 {
1603 continue
1604 }
1605 _ = z.Args[1]
1606 z_0 := z.Args[0]
1607 if z_0.Op != OpConst64 || auxIntToInt64(z_0.AuxInt) != 32 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 32)) {
1608 continue
1609 }
1610 v.reset(OpRotateLeft32)
1611 v.AddArg2(x, z)
1612 return true
1613 }
1614 break
1615 }
1616
1617
1618
1619 for {
1620 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1621 right := v_0
1622 if right.Op != OpRsh32Ux32 {
1623 continue
1624 }
1625 y := right.Args[1]
1626 x := right.Args[0]
1627 left := v_1
1628 if left.Op != OpLsh32x32 {
1629 continue
1630 }
1631 _ = left.Args[1]
1632 if x != left.Args[0] {
1633 continue
1634 }
1635 z := left.Args[1]
1636 if z.Op != OpSub32 {
1637 continue
1638 }
1639 _ = z.Args[1]
1640 z_0 := z.Args[0]
1641 if z_0.Op != OpConst32 || auxIntToInt32(z_0.AuxInt) != 32 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 32)) {
1642 continue
1643 }
1644 v.reset(OpRotateLeft32)
1645 v.AddArg2(x, z)
1646 return true
1647 }
1648 break
1649 }
1650
1651
1652
1653 for {
1654 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1655 right := v_0
1656 if right.Op != OpRsh32Ux16 {
1657 continue
1658 }
1659 y := right.Args[1]
1660 x := right.Args[0]
1661 left := v_1
1662 if left.Op != OpLsh32x16 {
1663 continue
1664 }
1665 _ = left.Args[1]
1666 if x != left.Args[0] {
1667 continue
1668 }
1669 z := left.Args[1]
1670 if z.Op != OpSub16 {
1671 continue
1672 }
1673 _ = z.Args[1]
1674 z_0 := z.Args[0]
1675 if z_0.Op != OpConst16 || auxIntToInt16(z_0.AuxInt) != 32 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 32)) {
1676 continue
1677 }
1678 v.reset(OpRotateLeft32)
1679 v.AddArg2(x, z)
1680 return true
1681 }
1682 break
1683 }
1684
1685
1686
1687 for {
1688 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1689 right := v_0
1690 if right.Op != OpRsh32Ux8 {
1691 continue
1692 }
1693 y := right.Args[1]
1694 x := right.Args[0]
1695 left := v_1
1696 if left.Op != OpLsh32x8 {
1697 continue
1698 }
1699 _ = left.Args[1]
1700 if x != left.Args[0] {
1701 continue
1702 }
1703 z := left.Args[1]
1704 if z.Op != OpSub8 {
1705 continue
1706 }
1707 _ = z.Args[1]
1708 z_0 := z.Args[0]
1709 if z_0.Op != OpConst8 || auxIntToInt8(z_0.AuxInt) != 32 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 32)) {
1710 continue
1711 }
1712 v.reset(OpRotateLeft32)
1713 v.AddArg2(x, z)
1714 return true
1715 }
1716 break
1717 }
1718 return false
1719 }
1720 func rewriteValuegeneric_OpAdd32F(v *Value) bool {
1721 v_1 := v.Args[1]
1722 v_0 := v.Args[0]
1723
1724
1725
1726 for {
1727 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1728 if v_0.Op != OpConst32F {
1729 continue
1730 }
1731 c := auxIntToFloat32(v_0.AuxInt)
1732 if v_1.Op != OpConst32F {
1733 continue
1734 }
1735 d := auxIntToFloat32(v_1.AuxInt)
1736 if !(c+d == c+d) {
1737 continue
1738 }
1739 v.reset(OpConst32F)
1740 v.AuxInt = float32ToAuxInt(c + d)
1741 return true
1742 }
1743 break
1744 }
1745 return false
1746 }
1747 func rewriteValuegeneric_OpAdd64(v *Value) bool {
1748 v_1 := v.Args[1]
1749 v_0 := v.Args[0]
1750 b := v.Block
1751 config := b.Func.Config
1752
1753
1754 for {
1755 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1756 if v_0.Op != OpConst64 {
1757 continue
1758 }
1759 c := auxIntToInt64(v_0.AuxInt)
1760 if v_1.Op != OpConst64 {
1761 continue
1762 }
1763 d := auxIntToInt64(v_1.AuxInt)
1764 v.reset(OpConst64)
1765 v.AuxInt = int64ToAuxInt(c + d)
1766 return true
1767 }
1768 break
1769 }
1770
1771
1772 for {
1773 t := v.Type
1774 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1775 if v_0.Op != OpMul64 {
1776 continue
1777 }
1778 _ = v_0.Args[1]
1779 v_0_0 := v_0.Args[0]
1780 v_0_1 := v_0.Args[1]
1781 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
1782 x := v_0_0
1783 y := v_0_1
1784 if v_1.Op != OpMul64 {
1785 continue
1786 }
1787 _ = v_1.Args[1]
1788 v_1_0 := v_1.Args[0]
1789 v_1_1 := v_1.Args[1]
1790 for _i2 := 0; _i2 <= 1; _i2, v_1_0, v_1_1 = _i2+1, v_1_1, v_1_0 {
1791 if x != v_1_0 {
1792 continue
1793 }
1794 z := v_1_1
1795 v.reset(OpMul64)
1796 v0 := b.NewValue0(v.Pos, OpAdd64, t)
1797 v0.AddArg2(y, z)
1798 v.AddArg2(x, v0)
1799 return true
1800 }
1801 }
1802 }
1803 break
1804 }
1805
1806
1807 for {
1808 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1809 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
1810 continue
1811 }
1812 x := v_1
1813 v.copyOf(x)
1814 return true
1815 }
1816 break
1817 }
1818
1819
1820 for {
1821 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1822 x := v_0
1823 if v_1.Op != OpNeg64 {
1824 continue
1825 }
1826 y := v_1.Args[0]
1827 v.reset(OpSub64)
1828 v.AddArg2(x, y)
1829 return true
1830 }
1831 break
1832 }
1833
1834
1835 for {
1836 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1837 if v_0.Op != OpCom64 {
1838 continue
1839 }
1840 x := v_0.Args[0]
1841 if x != v_1 {
1842 continue
1843 }
1844 v.reset(OpConst64)
1845 v.AuxInt = int64ToAuxInt(-1)
1846 return true
1847 }
1848 break
1849 }
1850
1851
1852 for {
1853 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1854 if v_0.Op != OpSub64 {
1855 continue
1856 }
1857 t := v_0.Args[1]
1858 x := v_0.Args[0]
1859 if v_1.Op != OpAdd64 {
1860 continue
1861 }
1862 _ = v_1.Args[1]
1863 v_1_0 := v_1.Args[0]
1864 v_1_1 := v_1.Args[1]
1865 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
1866 if t != v_1_0 {
1867 continue
1868 }
1869 y := v_1_1
1870 v.reset(OpAdd64)
1871 v.AddArg2(x, y)
1872 return true
1873 }
1874 }
1875 break
1876 }
1877
1878
1879 for {
1880 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1881 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 1 || v_1.Op != OpCom64 {
1882 continue
1883 }
1884 x := v_1.Args[0]
1885 v.reset(OpNeg64)
1886 v.AddArg(x)
1887 return true
1888 }
1889 break
1890 }
1891
1892
1893 for {
1894 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1895 x := v_0
1896 if v_1.Op != OpSub64 {
1897 continue
1898 }
1899 _ = v_1.Args[1]
1900 y := v_1.Args[0]
1901 if x != v_1.Args[1] {
1902 continue
1903 }
1904 v.copyOf(y)
1905 return true
1906 }
1907 break
1908 }
1909
1910
1911 for {
1912 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1913 x := v_0
1914 if v_1.Op != OpAdd64 {
1915 continue
1916 }
1917 _ = v_1.Args[1]
1918 v_1_0 := v_1.Args[0]
1919 v_1_1 := v_1.Args[1]
1920 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
1921 y := v_1_0
1922 if v_1_1.Op != OpSub64 {
1923 continue
1924 }
1925 _ = v_1_1.Args[1]
1926 z := v_1_1.Args[0]
1927 if x != v_1_1.Args[1] {
1928 continue
1929 }
1930 v.reset(OpAdd64)
1931 v.AddArg2(y, z)
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 != OpAdd64 {
1943 continue
1944 }
1945 _ = v_0.Args[1]
1946 v_0_0 := v_0.Args[0]
1947 v_0_1 := v_0.Args[1]
1948 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
1949 i := v_0_0
1950 if i.Op != OpConst64 {
1951 continue
1952 }
1953 t := i.Type
1954 z := v_0_1
1955 x := v_1
1956 if !(z.Op != OpConst64 && x.Op != OpConst64) {
1957 continue
1958 }
1959 v.reset(OpAdd64)
1960 v0 := b.NewValue0(v.Pos, OpAdd64, t)
1961 v0.AddArg2(z, x)
1962 v.AddArg2(i, v0)
1963 return true
1964 }
1965 }
1966 break
1967 }
1968
1969
1970
1971 for {
1972 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1973 if v_0.Op != OpSub64 {
1974 continue
1975 }
1976 z := v_0.Args[1]
1977 i := v_0.Args[0]
1978 if i.Op != OpConst64 {
1979 continue
1980 }
1981 t := i.Type
1982 x := v_1
1983 if !(z.Op != OpConst64 && x.Op != OpConst64) {
1984 continue
1985 }
1986 v.reset(OpAdd64)
1987 v0 := b.NewValue0(v.Pos, OpSub64, t)
1988 v0.AddArg2(x, z)
1989 v.AddArg2(i, v0)
1990 return true
1991 }
1992 break
1993 }
1994
1995
1996 for {
1997 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1998 if v_0.Op != OpConst64 {
1999 continue
2000 }
2001 t := v_0.Type
2002 c := auxIntToInt64(v_0.AuxInt)
2003 if v_1.Op != OpAdd64 {
2004 continue
2005 }
2006 _ = v_1.Args[1]
2007 v_1_0 := v_1.Args[0]
2008 v_1_1 := v_1.Args[1]
2009 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
2010 if v_1_0.Op != OpConst64 || v_1_0.Type != t {
2011 continue
2012 }
2013 d := auxIntToInt64(v_1_0.AuxInt)
2014 x := v_1_1
2015 v.reset(OpAdd64)
2016 v0 := b.NewValue0(v.Pos, OpConst64, t)
2017 v0.AuxInt = int64ToAuxInt(c + d)
2018 v.AddArg2(v0, x)
2019 return true
2020 }
2021 }
2022 break
2023 }
2024
2025
2026 for {
2027 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2028 if v_0.Op != OpConst64 {
2029 continue
2030 }
2031 t := v_0.Type
2032 c := auxIntToInt64(v_0.AuxInt)
2033 if v_1.Op != OpSub64 {
2034 continue
2035 }
2036 x := v_1.Args[1]
2037 v_1_0 := v_1.Args[0]
2038 if v_1_0.Op != OpConst64 || v_1_0.Type != t {
2039 continue
2040 }
2041 d := auxIntToInt64(v_1_0.AuxInt)
2042 v.reset(OpSub64)
2043 v0 := b.NewValue0(v.Pos, OpConst64, t)
2044 v0.AuxInt = int64ToAuxInt(c + d)
2045 v.AddArg2(v0, x)
2046 return true
2047 }
2048 break
2049 }
2050
2051
2052
2053 for {
2054 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2055 if v_0.Op != OpLsh64x64 {
2056 continue
2057 }
2058 _ = v_0.Args[1]
2059 x := v_0.Args[0]
2060 z := v_0.Args[1]
2061 if z.Op != OpConst64 {
2062 continue
2063 }
2064 c := auxIntToInt64(z.AuxInt)
2065 if v_1.Op != OpRsh64Ux64 {
2066 continue
2067 }
2068 _ = v_1.Args[1]
2069 if x != v_1.Args[0] {
2070 continue
2071 }
2072 v_1_1 := v_1.Args[1]
2073 if v_1_1.Op != OpConst64 {
2074 continue
2075 }
2076 d := auxIntToInt64(v_1_1.AuxInt)
2077 if !(c < 64 && d == 64-c && canRotate(config, 64)) {
2078 continue
2079 }
2080 v.reset(OpRotateLeft64)
2081 v.AddArg2(x, z)
2082 return true
2083 }
2084 break
2085 }
2086
2087
2088
2089 for {
2090 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2091 left := v_0
2092 if left.Op != OpLsh64x64 {
2093 continue
2094 }
2095 y := left.Args[1]
2096 x := left.Args[0]
2097 right := v_1
2098 if right.Op != OpRsh64Ux64 {
2099 continue
2100 }
2101 _ = right.Args[1]
2102 if x != right.Args[0] {
2103 continue
2104 }
2105 right_1 := right.Args[1]
2106 if right_1.Op != OpSub64 {
2107 continue
2108 }
2109 _ = right_1.Args[1]
2110 right_1_0 := right_1.Args[0]
2111 if right_1_0.Op != OpConst64 || auxIntToInt64(right_1_0.AuxInt) != 64 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 64)) {
2112 continue
2113 }
2114 v.reset(OpRotateLeft64)
2115 v.AddArg2(x, y)
2116 return true
2117 }
2118 break
2119 }
2120
2121
2122
2123 for {
2124 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2125 left := v_0
2126 if left.Op != OpLsh64x32 {
2127 continue
2128 }
2129 y := left.Args[1]
2130 x := left.Args[0]
2131 right := v_1
2132 if right.Op != OpRsh64Ux32 {
2133 continue
2134 }
2135 _ = right.Args[1]
2136 if x != right.Args[0] {
2137 continue
2138 }
2139 right_1 := right.Args[1]
2140 if right_1.Op != OpSub32 {
2141 continue
2142 }
2143 _ = right_1.Args[1]
2144 right_1_0 := right_1.Args[0]
2145 if right_1_0.Op != OpConst32 || auxIntToInt32(right_1_0.AuxInt) != 64 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 64)) {
2146 continue
2147 }
2148 v.reset(OpRotateLeft64)
2149 v.AddArg2(x, y)
2150 return true
2151 }
2152 break
2153 }
2154
2155
2156
2157 for {
2158 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2159 left := v_0
2160 if left.Op != OpLsh64x16 {
2161 continue
2162 }
2163 y := left.Args[1]
2164 x := left.Args[0]
2165 right := v_1
2166 if right.Op != OpRsh64Ux16 {
2167 continue
2168 }
2169 _ = right.Args[1]
2170 if x != right.Args[0] {
2171 continue
2172 }
2173 right_1 := right.Args[1]
2174 if right_1.Op != OpSub16 {
2175 continue
2176 }
2177 _ = right_1.Args[1]
2178 right_1_0 := right_1.Args[0]
2179 if right_1_0.Op != OpConst16 || auxIntToInt16(right_1_0.AuxInt) != 64 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 64)) {
2180 continue
2181 }
2182 v.reset(OpRotateLeft64)
2183 v.AddArg2(x, y)
2184 return true
2185 }
2186 break
2187 }
2188
2189
2190
2191 for {
2192 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2193 left := v_0
2194 if left.Op != OpLsh64x8 {
2195 continue
2196 }
2197 y := left.Args[1]
2198 x := left.Args[0]
2199 right := v_1
2200 if right.Op != OpRsh64Ux8 {
2201 continue
2202 }
2203 _ = right.Args[1]
2204 if x != right.Args[0] {
2205 continue
2206 }
2207 right_1 := right.Args[1]
2208 if right_1.Op != OpSub8 {
2209 continue
2210 }
2211 _ = right_1.Args[1]
2212 right_1_0 := right_1.Args[0]
2213 if right_1_0.Op != OpConst8 || auxIntToInt8(right_1_0.AuxInt) != 64 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 64)) {
2214 continue
2215 }
2216 v.reset(OpRotateLeft64)
2217 v.AddArg2(x, y)
2218 return true
2219 }
2220 break
2221 }
2222
2223
2224
2225 for {
2226 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2227 right := v_0
2228 if right.Op != OpRsh64Ux64 {
2229 continue
2230 }
2231 y := right.Args[1]
2232 x := right.Args[0]
2233 left := v_1
2234 if left.Op != OpLsh64x64 {
2235 continue
2236 }
2237 _ = left.Args[1]
2238 if x != left.Args[0] {
2239 continue
2240 }
2241 z := left.Args[1]
2242 if z.Op != OpSub64 {
2243 continue
2244 }
2245 _ = z.Args[1]
2246 z_0 := z.Args[0]
2247 if z_0.Op != OpConst64 || auxIntToInt64(z_0.AuxInt) != 64 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 64)) {
2248 continue
2249 }
2250 v.reset(OpRotateLeft64)
2251 v.AddArg2(x, z)
2252 return true
2253 }
2254 break
2255 }
2256
2257
2258
2259 for {
2260 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2261 right := v_0
2262 if right.Op != OpRsh64Ux32 {
2263 continue
2264 }
2265 y := right.Args[1]
2266 x := right.Args[0]
2267 left := v_1
2268 if left.Op != OpLsh64x32 {
2269 continue
2270 }
2271 _ = left.Args[1]
2272 if x != left.Args[0] {
2273 continue
2274 }
2275 z := left.Args[1]
2276 if z.Op != OpSub32 {
2277 continue
2278 }
2279 _ = z.Args[1]
2280 z_0 := z.Args[0]
2281 if z_0.Op != OpConst32 || auxIntToInt32(z_0.AuxInt) != 64 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 64)) {
2282 continue
2283 }
2284 v.reset(OpRotateLeft64)
2285 v.AddArg2(x, z)
2286 return true
2287 }
2288 break
2289 }
2290
2291
2292
2293 for {
2294 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2295 right := v_0
2296 if right.Op != OpRsh64Ux16 {
2297 continue
2298 }
2299 y := right.Args[1]
2300 x := right.Args[0]
2301 left := v_1
2302 if left.Op != OpLsh64x16 {
2303 continue
2304 }
2305 _ = left.Args[1]
2306 if x != left.Args[0] {
2307 continue
2308 }
2309 z := left.Args[1]
2310 if z.Op != OpSub16 {
2311 continue
2312 }
2313 _ = z.Args[1]
2314 z_0 := z.Args[0]
2315 if z_0.Op != OpConst16 || auxIntToInt16(z_0.AuxInt) != 64 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 64)) {
2316 continue
2317 }
2318 v.reset(OpRotateLeft64)
2319 v.AddArg2(x, z)
2320 return true
2321 }
2322 break
2323 }
2324
2325
2326
2327 for {
2328 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2329 right := v_0
2330 if right.Op != OpRsh64Ux8 {
2331 continue
2332 }
2333 y := right.Args[1]
2334 x := right.Args[0]
2335 left := v_1
2336 if left.Op != OpLsh64x8 {
2337 continue
2338 }
2339 _ = left.Args[1]
2340 if x != left.Args[0] {
2341 continue
2342 }
2343 z := left.Args[1]
2344 if z.Op != OpSub8 {
2345 continue
2346 }
2347 _ = z.Args[1]
2348 z_0 := z.Args[0]
2349 if z_0.Op != OpConst8 || auxIntToInt8(z_0.AuxInt) != 64 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 64)) {
2350 continue
2351 }
2352 v.reset(OpRotateLeft64)
2353 v.AddArg2(x, z)
2354 return true
2355 }
2356 break
2357 }
2358 return false
2359 }
2360 func rewriteValuegeneric_OpAdd64F(v *Value) bool {
2361 v_1 := v.Args[1]
2362 v_0 := v.Args[0]
2363
2364
2365
2366 for {
2367 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2368 if v_0.Op != OpConst64F {
2369 continue
2370 }
2371 c := auxIntToFloat64(v_0.AuxInt)
2372 if v_1.Op != OpConst64F {
2373 continue
2374 }
2375 d := auxIntToFloat64(v_1.AuxInt)
2376 if !(c+d == c+d) {
2377 continue
2378 }
2379 v.reset(OpConst64F)
2380 v.AuxInt = float64ToAuxInt(c + d)
2381 return true
2382 }
2383 break
2384 }
2385 return false
2386 }
2387 func rewriteValuegeneric_OpAdd64carry(v *Value) bool {
2388 v_2 := v.Args[2]
2389 v_1 := v.Args[1]
2390 v_0 := v.Args[0]
2391 b := v.Block
2392
2393
2394
2395 for {
2396 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2397 if v_0.Op != OpConst64 {
2398 continue
2399 }
2400 t := v_0.Type
2401 x := auxIntToInt64(v_0.AuxInt)
2402 if v_1.Op != OpConst64 {
2403 continue
2404 }
2405 y := auxIntToInt64(v_1.AuxInt)
2406 if v_2.Op != OpConst64 {
2407 continue
2408 }
2409 c := auxIntToInt64(v_2.AuxInt)
2410 if !(c >= 0 && c <= 1) {
2411 continue
2412 }
2413 v.reset(OpMakeTuple)
2414 v0 := b.NewValue0(v.Pos, OpConst64, t)
2415 v0.AuxInt = int64ToAuxInt(bitsAdd64(x, y, c).sum)
2416 v1 := b.NewValue0(v.Pos, OpConst64, t)
2417 v1.AuxInt = int64ToAuxInt(bitsAdd64(x, y, c).carry)
2418 v.AddArg2(v0, v1)
2419 return true
2420 }
2421 break
2422 }
2423 return false
2424 }
2425 func rewriteValuegeneric_OpAdd8(v *Value) bool {
2426 v_1 := v.Args[1]
2427 v_0 := v.Args[0]
2428 b := v.Block
2429 config := b.Func.Config
2430
2431
2432 for {
2433 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2434 if v_0.Op != OpConst8 {
2435 continue
2436 }
2437 c := auxIntToInt8(v_0.AuxInt)
2438 if v_1.Op != OpConst8 {
2439 continue
2440 }
2441 d := auxIntToInt8(v_1.AuxInt)
2442 v.reset(OpConst8)
2443 v.AuxInt = int8ToAuxInt(c + d)
2444 return true
2445 }
2446 break
2447 }
2448
2449
2450 for {
2451 t := v.Type
2452 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2453 if v_0.Op != OpMul8 {
2454 continue
2455 }
2456 _ = v_0.Args[1]
2457 v_0_0 := v_0.Args[0]
2458 v_0_1 := v_0.Args[1]
2459 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
2460 x := v_0_0
2461 y := v_0_1
2462 if v_1.Op != OpMul8 {
2463 continue
2464 }
2465 _ = v_1.Args[1]
2466 v_1_0 := v_1.Args[0]
2467 v_1_1 := v_1.Args[1]
2468 for _i2 := 0; _i2 <= 1; _i2, v_1_0, v_1_1 = _i2+1, v_1_1, v_1_0 {
2469 if x != v_1_0 {
2470 continue
2471 }
2472 z := v_1_1
2473 v.reset(OpMul8)
2474 v0 := b.NewValue0(v.Pos, OpAdd8, t)
2475 v0.AddArg2(y, z)
2476 v.AddArg2(x, v0)
2477 return true
2478 }
2479 }
2480 }
2481 break
2482 }
2483
2484
2485 for {
2486 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2487 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 {
2488 continue
2489 }
2490 x := v_1
2491 v.copyOf(x)
2492 return true
2493 }
2494 break
2495 }
2496
2497
2498 for {
2499 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2500 x := v_0
2501 if v_1.Op != OpNeg8 {
2502 continue
2503 }
2504 y := v_1.Args[0]
2505 v.reset(OpSub8)
2506 v.AddArg2(x, y)
2507 return true
2508 }
2509 break
2510 }
2511
2512
2513 for {
2514 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2515 if v_0.Op != OpCom8 {
2516 continue
2517 }
2518 x := v_0.Args[0]
2519 if x != v_1 {
2520 continue
2521 }
2522 v.reset(OpConst8)
2523 v.AuxInt = int8ToAuxInt(-1)
2524 return true
2525 }
2526 break
2527 }
2528
2529
2530 for {
2531 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2532 if v_0.Op != OpSub8 {
2533 continue
2534 }
2535 t := v_0.Args[1]
2536 x := v_0.Args[0]
2537 if v_1.Op != OpAdd8 {
2538 continue
2539 }
2540 _ = v_1.Args[1]
2541 v_1_0 := v_1.Args[0]
2542 v_1_1 := v_1.Args[1]
2543 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
2544 if t != v_1_0 {
2545 continue
2546 }
2547 y := v_1_1
2548 v.reset(OpAdd8)
2549 v.AddArg2(x, y)
2550 return true
2551 }
2552 }
2553 break
2554 }
2555
2556
2557 for {
2558 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2559 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 1 || v_1.Op != OpCom8 {
2560 continue
2561 }
2562 x := v_1.Args[0]
2563 v.reset(OpNeg8)
2564 v.AddArg(x)
2565 return true
2566 }
2567 break
2568 }
2569
2570
2571 for {
2572 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2573 x := v_0
2574 if v_1.Op != OpSub8 {
2575 continue
2576 }
2577 _ = v_1.Args[1]
2578 y := v_1.Args[0]
2579 if x != v_1.Args[1] {
2580 continue
2581 }
2582 v.copyOf(y)
2583 return true
2584 }
2585 break
2586 }
2587
2588
2589 for {
2590 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2591 x := v_0
2592 if v_1.Op != OpAdd8 {
2593 continue
2594 }
2595 _ = v_1.Args[1]
2596 v_1_0 := v_1.Args[0]
2597 v_1_1 := v_1.Args[1]
2598 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
2599 y := v_1_0
2600 if v_1_1.Op != OpSub8 {
2601 continue
2602 }
2603 _ = v_1_1.Args[1]
2604 z := v_1_1.Args[0]
2605 if x != v_1_1.Args[1] {
2606 continue
2607 }
2608 v.reset(OpAdd8)
2609 v.AddArg2(y, z)
2610 return true
2611 }
2612 }
2613 break
2614 }
2615
2616
2617
2618 for {
2619 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2620 if v_0.Op != OpAdd8 {
2621 continue
2622 }
2623 _ = v_0.Args[1]
2624 v_0_0 := v_0.Args[0]
2625 v_0_1 := v_0.Args[1]
2626 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
2627 i := v_0_0
2628 if i.Op != OpConst8 {
2629 continue
2630 }
2631 t := i.Type
2632 z := v_0_1
2633 x := v_1
2634 if !(z.Op != OpConst8 && x.Op != OpConst8) {
2635 continue
2636 }
2637 v.reset(OpAdd8)
2638 v0 := b.NewValue0(v.Pos, OpAdd8, t)
2639 v0.AddArg2(z, x)
2640 v.AddArg2(i, v0)
2641 return true
2642 }
2643 }
2644 break
2645 }
2646
2647
2648
2649 for {
2650 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2651 if v_0.Op != OpSub8 {
2652 continue
2653 }
2654 z := v_0.Args[1]
2655 i := v_0.Args[0]
2656 if i.Op != OpConst8 {
2657 continue
2658 }
2659 t := i.Type
2660 x := v_1
2661 if !(z.Op != OpConst8 && x.Op != OpConst8) {
2662 continue
2663 }
2664 v.reset(OpAdd8)
2665 v0 := b.NewValue0(v.Pos, OpSub8, t)
2666 v0.AddArg2(x, z)
2667 v.AddArg2(i, v0)
2668 return true
2669 }
2670 break
2671 }
2672
2673
2674 for {
2675 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2676 if v_0.Op != OpConst8 {
2677 continue
2678 }
2679 t := v_0.Type
2680 c := auxIntToInt8(v_0.AuxInt)
2681 if v_1.Op != OpAdd8 {
2682 continue
2683 }
2684 _ = v_1.Args[1]
2685 v_1_0 := v_1.Args[0]
2686 v_1_1 := v_1.Args[1]
2687 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
2688 if v_1_0.Op != OpConst8 || v_1_0.Type != t {
2689 continue
2690 }
2691 d := auxIntToInt8(v_1_0.AuxInt)
2692 x := v_1_1
2693 v.reset(OpAdd8)
2694 v0 := b.NewValue0(v.Pos, OpConst8, t)
2695 v0.AuxInt = int8ToAuxInt(c + d)
2696 v.AddArg2(v0, x)
2697 return true
2698 }
2699 }
2700 break
2701 }
2702
2703
2704 for {
2705 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2706 if v_0.Op != OpConst8 {
2707 continue
2708 }
2709 t := v_0.Type
2710 c := auxIntToInt8(v_0.AuxInt)
2711 if v_1.Op != OpSub8 {
2712 continue
2713 }
2714 x := v_1.Args[1]
2715 v_1_0 := v_1.Args[0]
2716 if v_1_0.Op != OpConst8 || v_1_0.Type != t {
2717 continue
2718 }
2719 d := auxIntToInt8(v_1_0.AuxInt)
2720 v.reset(OpSub8)
2721 v0 := b.NewValue0(v.Pos, OpConst8, t)
2722 v0.AuxInt = int8ToAuxInt(c + d)
2723 v.AddArg2(v0, x)
2724 return true
2725 }
2726 break
2727 }
2728
2729
2730
2731 for {
2732 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2733 if v_0.Op != OpLsh8x64 {
2734 continue
2735 }
2736 _ = v_0.Args[1]
2737 x := v_0.Args[0]
2738 z := v_0.Args[1]
2739 if z.Op != OpConst64 {
2740 continue
2741 }
2742 c := auxIntToInt64(z.AuxInt)
2743 if v_1.Op != OpRsh8Ux64 {
2744 continue
2745 }
2746 _ = v_1.Args[1]
2747 if x != v_1.Args[0] {
2748 continue
2749 }
2750 v_1_1 := v_1.Args[1]
2751 if v_1_1.Op != OpConst64 {
2752 continue
2753 }
2754 d := auxIntToInt64(v_1_1.AuxInt)
2755 if !(c < 8 && d == 8-c && canRotate(config, 8)) {
2756 continue
2757 }
2758 v.reset(OpRotateLeft8)
2759 v.AddArg2(x, z)
2760 return true
2761 }
2762 break
2763 }
2764
2765
2766
2767 for {
2768 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2769 left := v_0
2770 if left.Op != OpLsh8x64 {
2771 continue
2772 }
2773 y := left.Args[1]
2774 x := left.Args[0]
2775 right := v_1
2776 if right.Op != OpRsh8Ux64 {
2777 continue
2778 }
2779 _ = right.Args[1]
2780 if x != right.Args[0] {
2781 continue
2782 }
2783 right_1 := right.Args[1]
2784 if right_1.Op != OpSub64 {
2785 continue
2786 }
2787 _ = right_1.Args[1]
2788 right_1_0 := right_1.Args[0]
2789 if right_1_0.Op != OpConst64 || auxIntToInt64(right_1_0.AuxInt) != 8 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 8)) {
2790 continue
2791 }
2792 v.reset(OpRotateLeft8)
2793 v.AddArg2(x, y)
2794 return true
2795 }
2796 break
2797 }
2798
2799
2800
2801 for {
2802 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2803 left := v_0
2804 if left.Op != OpLsh8x32 {
2805 continue
2806 }
2807 y := left.Args[1]
2808 x := left.Args[0]
2809 right := v_1
2810 if right.Op != OpRsh8Ux32 {
2811 continue
2812 }
2813 _ = right.Args[1]
2814 if x != right.Args[0] {
2815 continue
2816 }
2817 right_1 := right.Args[1]
2818 if right_1.Op != OpSub32 {
2819 continue
2820 }
2821 _ = right_1.Args[1]
2822 right_1_0 := right_1.Args[0]
2823 if right_1_0.Op != OpConst32 || auxIntToInt32(right_1_0.AuxInt) != 8 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 8)) {
2824 continue
2825 }
2826 v.reset(OpRotateLeft8)
2827 v.AddArg2(x, y)
2828 return true
2829 }
2830 break
2831 }
2832
2833
2834
2835 for {
2836 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2837 left := v_0
2838 if left.Op != OpLsh8x16 {
2839 continue
2840 }
2841 y := left.Args[1]
2842 x := left.Args[0]
2843 right := v_1
2844 if right.Op != OpRsh8Ux16 {
2845 continue
2846 }
2847 _ = right.Args[1]
2848 if x != right.Args[0] {
2849 continue
2850 }
2851 right_1 := right.Args[1]
2852 if right_1.Op != OpSub16 {
2853 continue
2854 }
2855 _ = right_1.Args[1]
2856 right_1_0 := right_1.Args[0]
2857 if right_1_0.Op != OpConst16 || auxIntToInt16(right_1_0.AuxInt) != 8 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 8)) {
2858 continue
2859 }
2860 v.reset(OpRotateLeft8)
2861 v.AddArg2(x, y)
2862 return true
2863 }
2864 break
2865 }
2866
2867
2868
2869 for {
2870 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2871 left := v_0
2872 if left.Op != OpLsh8x8 {
2873 continue
2874 }
2875 y := left.Args[1]
2876 x := left.Args[0]
2877 right := v_1
2878 if right.Op != OpRsh8Ux8 {
2879 continue
2880 }
2881 _ = right.Args[1]
2882 if x != right.Args[0] {
2883 continue
2884 }
2885 right_1 := right.Args[1]
2886 if right_1.Op != OpSub8 {
2887 continue
2888 }
2889 _ = right_1.Args[1]
2890 right_1_0 := right_1.Args[0]
2891 if right_1_0.Op != OpConst8 || auxIntToInt8(right_1_0.AuxInt) != 8 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 8)) {
2892 continue
2893 }
2894 v.reset(OpRotateLeft8)
2895 v.AddArg2(x, y)
2896 return true
2897 }
2898 break
2899 }
2900
2901
2902
2903 for {
2904 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2905 right := v_0
2906 if right.Op != OpRsh8Ux64 {
2907 continue
2908 }
2909 y := right.Args[1]
2910 x := right.Args[0]
2911 left := v_1
2912 if left.Op != OpLsh8x64 {
2913 continue
2914 }
2915 _ = left.Args[1]
2916 if x != left.Args[0] {
2917 continue
2918 }
2919 z := left.Args[1]
2920 if z.Op != OpSub64 {
2921 continue
2922 }
2923 _ = z.Args[1]
2924 z_0 := z.Args[0]
2925 if z_0.Op != OpConst64 || auxIntToInt64(z_0.AuxInt) != 8 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 8)) {
2926 continue
2927 }
2928 v.reset(OpRotateLeft8)
2929 v.AddArg2(x, z)
2930 return true
2931 }
2932 break
2933 }
2934
2935
2936
2937 for {
2938 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2939 right := v_0
2940 if right.Op != OpRsh8Ux32 {
2941 continue
2942 }
2943 y := right.Args[1]
2944 x := right.Args[0]
2945 left := v_1
2946 if left.Op != OpLsh8x32 {
2947 continue
2948 }
2949 _ = left.Args[1]
2950 if x != left.Args[0] {
2951 continue
2952 }
2953 z := left.Args[1]
2954 if z.Op != OpSub32 {
2955 continue
2956 }
2957 _ = z.Args[1]
2958 z_0 := z.Args[0]
2959 if z_0.Op != OpConst32 || auxIntToInt32(z_0.AuxInt) != 8 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 8)) {
2960 continue
2961 }
2962 v.reset(OpRotateLeft8)
2963 v.AddArg2(x, z)
2964 return true
2965 }
2966 break
2967 }
2968
2969
2970
2971 for {
2972 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2973 right := v_0
2974 if right.Op != OpRsh8Ux16 {
2975 continue
2976 }
2977 y := right.Args[1]
2978 x := right.Args[0]
2979 left := v_1
2980 if left.Op != OpLsh8x16 {
2981 continue
2982 }
2983 _ = left.Args[1]
2984 if x != left.Args[0] {
2985 continue
2986 }
2987 z := left.Args[1]
2988 if z.Op != OpSub16 {
2989 continue
2990 }
2991 _ = z.Args[1]
2992 z_0 := z.Args[0]
2993 if z_0.Op != OpConst16 || auxIntToInt16(z_0.AuxInt) != 8 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 8)) {
2994 continue
2995 }
2996 v.reset(OpRotateLeft8)
2997 v.AddArg2(x, z)
2998 return true
2999 }
3000 break
3001 }
3002
3003
3004
3005 for {
3006 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3007 right := v_0
3008 if right.Op != OpRsh8Ux8 {
3009 continue
3010 }
3011 y := right.Args[1]
3012 x := right.Args[0]
3013 left := v_1
3014 if left.Op != OpLsh8x8 {
3015 continue
3016 }
3017 _ = left.Args[1]
3018 if x != left.Args[0] {
3019 continue
3020 }
3021 z := left.Args[1]
3022 if z.Op != OpSub8 {
3023 continue
3024 }
3025 _ = z.Args[1]
3026 z_0 := z.Args[0]
3027 if z_0.Op != OpConst8 || auxIntToInt8(z_0.AuxInt) != 8 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 8)) {
3028 continue
3029 }
3030 v.reset(OpRotateLeft8)
3031 v.AddArg2(x, z)
3032 return true
3033 }
3034 break
3035 }
3036 return false
3037 }
3038 func rewriteValuegeneric_OpAddPtr(v *Value) bool {
3039 v_1 := v.Args[1]
3040 v_0 := v.Args[0]
3041
3042
3043 for {
3044 t := v.Type
3045 x := v_0
3046 if v_1.Op != OpConst64 {
3047 break
3048 }
3049 c := auxIntToInt64(v_1.AuxInt)
3050 v.reset(OpOffPtr)
3051 v.Type = t
3052 v.AuxInt = int64ToAuxInt(c)
3053 v.AddArg(x)
3054 return true
3055 }
3056
3057
3058 for {
3059 t := v.Type
3060 x := v_0
3061 if v_1.Op != OpConst32 {
3062 break
3063 }
3064 c := auxIntToInt32(v_1.AuxInt)
3065 v.reset(OpOffPtr)
3066 v.Type = t
3067 v.AuxInt = int64ToAuxInt(int64(c))
3068 v.AddArg(x)
3069 return true
3070 }
3071 return false
3072 }
3073 func rewriteValuegeneric_OpAnd16(v *Value) bool {
3074 v_1 := v.Args[1]
3075 v_0 := v.Args[0]
3076 b := v.Block
3077
3078
3079 for {
3080 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3081 if v_0.Op != OpConst16 {
3082 continue
3083 }
3084 c := auxIntToInt16(v_0.AuxInt)
3085 if v_1.Op != OpConst16 {
3086 continue
3087 }
3088 d := auxIntToInt16(v_1.AuxInt)
3089 v.reset(OpConst16)
3090 v.AuxInt = int16ToAuxInt(c & d)
3091 return true
3092 }
3093 break
3094 }
3095
3096
3097 for {
3098 t := v.Type
3099 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3100 if v_0.Op != OpCom16 {
3101 continue
3102 }
3103 x := v_0.Args[0]
3104 if v_1.Op != OpCom16 {
3105 continue
3106 }
3107 y := v_1.Args[0]
3108 v.reset(OpCom16)
3109 v0 := b.NewValue0(v.Pos, OpOr16, t)
3110 v0.AddArg2(x, y)
3111 v.AddArg(v0)
3112 return true
3113 }
3114 break
3115 }
3116
3117
3118
3119 for {
3120 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3121 if v_0.Op != OpConst16 {
3122 continue
3123 }
3124 m := auxIntToInt16(v_0.AuxInt)
3125 if v_1.Op != OpRsh16Ux64 {
3126 continue
3127 }
3128 _ = v_1.Args[1]
3129 v_1_1 := v_1.Args[1]
3130 if v_1_1.Op != OpConst64 {
3131 continue
3132 }
3133 c := auxIntToInt64(v_1_1.AuxInt)
3134 if !(c >= int64(16-ntz16(m))) {
3135 continue
3136 }
3137 v.reset(OpConst16)
3138 v.AuxInt = int16ToAuxInt(0)
3139 return true
3140 }
3141 break
3142 }
3143
3144
3145
3146 for {
3147 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3148 if v_0.Op != OpConst16 {
3149 continue
3150 }
3151 m := auxIntToInt16(v_0.AuxInt)
3152 if v_1.Op != OpLsh16x64 {
3153 continue
3154 }
3155 _ = v_1.Args[1]
3156 v_1_1 := v_1.Args[1]
3157 if v_1_1.Op != OpConst64 {
3158 continue
3159 }
3160 c := auxIntToInt64(v_1_1.AuxInt)
3161 if !(c >= int64(16-nlz16(m))) {
3162 continue
3163 }
3164 v.reset(OpConst16)
3165 v.AuxInt = int16ToAuxInt(0)
3166 return true
3167 }
3168 break
3169 }
3170
3171
3172 for {
3173 x := v_0
3174 if x != v_1 {
3175 break
3176 }
3177 v.copyOf(x)
3178 return true
3179 }
3180
3181
3182 for {
3183 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3184 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != -1 {
3185 continue
3186 }
3187 x := v_1
3188 v.copyOf(x)
3189 return true
3190 }
3191 break
3192 }
3193
3194
3195 for {
3196 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3197 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 {
3198 continue
3199 }
3200 v.reset(OpConst16)
3201 v.AuxInt = int16ToAuxInt(0)
3202 return true
3203 }
3204 break
3205 }
3206
3207
3208 for {
3209 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3210 if v_0.Op != OpCom16 {
3211 continue
3212 }
3213 x := v_0.Args[0]
3214 if x != v_1 {
3215 continue
3216 }
3217 v.reset(OpConst16)
3218 v.AuxInt = int16ToAuxInt(0)
3219 return true
3220 }
3221 break
3222 }
3223
3224
3225 for {
3226 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3227 x := v_0
3228 if v_1.Op != OpAnd16 {
3229 continue
3230 }
3231 _ = v_1.Args[1]
3232 v_1_0 := v_1.Args[0]
3233 v_1_1 := v_1.Args[1]
3234 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
3235 if x != v_1_0 {
3236 continue
3237 }
3238 y := v_1_1
3239 v.reset(OpAnd16)
3240 v.AddArg2(x, y)
3241 return true
3242 }
3243 }
3244 break
3245 }
3246
3247
3248
3249 for {
3250 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3251 if v_0.Op != OpAnd16 {
3252 continue
3253 }
3254 _ = v_0.Args[1]
3255 v_0_0 := v_0.Args[0]
3256 v_0_1 := v_0.Args[1]
3257 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
3258 i := v_0_0
3259 if i.Op != OpConst16 {
3260 continue
3261 }
3262 t := i.Type
3263 z := v_0_1
3264 x := v_1
3265 if !(z.Op != OpConst16 && x.Op != OpConst16) {
3266 continue
3267 }
3268 v.reset(OpAnd16)
3269 v0 := b.NewValue0(v.Pos, OpAnd16, t)
3270 v0.AddArg2(z, x)
3271 v.AddArg2(i, v0)
3272 return true
3273 }
3274 }
3275 break
3276 }
3277
3278
3279 for {
3280 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3281 if v_0.Op != OpConst16 {
3282 continue
3283 }
3284 t := v_0.Type
3285 c := auxIntToInt16(v_0.AuxInt)
3286 if v_1.Op != OpAnd16 {
3287 continue
3288 }
3289 _ = v_1.Args[1]
3290 v_1_0 := v_1.Args[0]
3291 v_1_1 := v_1.Args[1]
3292 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
3293 if v_1_0.Op != OpConst16 || v_1_0.Type != t {
3294 continue
3295 }
3296 d := auxIntToInt16(v_1_0.AuxInt)
3297 x := v_1_1
3298 v.reset(OpAnd16)
3299 v0 := b.NewValue0(v.Pos, OpConst16, t)
3300 v0.AuxInt = int16ToAuxInt(c & d)
3301 v.AddArg2(v0, x)
3302 return true
3303 }
3304 }
3305 break
3306 }
3307 return false
3308 }
3309 func rewriteValuegeneric_OpAnd32(v *Value) bool {
3310 v_1 := v.Args[1]
3311 v_0 := v.Args[0]
3312 b := v.Block
3313
3314
3315 for {
3316 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3317 if v_0.Op != OpConst32 {
3318 continue
3319 }
3320 c := auxIntToInt32(v_0.AuxInt)
3321 if v_1.Op != OpConst32 {
3322 continue
3323 }
3324 d := auxIntToInt32(v_1.AuxInt)
3325 v.reset(OpConst32)
3326 v.AuxInt = int32ToAuxInt(c & d)
3327 return true
3328 }
3329 break
3330 }
3331
3332
3333 for {
3334 t := v.Type
3335 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3336 if v_0.Op != OpCom32 {
3337 continue
3338 }
3339 x := v_0.Args[0]
3340 if v_1.Op != OpCom32 {
3341 continue
3342 }
3343 y := v_1.Args[0]
3344 v.reset(OpCom32)
3345 v0 := b.NewValue0(v.Pos, OpOr32, t)
3346 v0.AddArg2(x, y)
3347 v.AddArg(v0)
3348 return true
3349 }
3350 break
3351 }
3352
3353
3354
3355 for {
3356 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3357 if v_0.Op != OpConst32 {
3358 continue
3359 }
3360 m := auxIntToInt32(v_0.AuxInt)
3361 if v_1.Op != OpRsh32Ux64 {
3362 continue
3363 }
3364 _ = v_1.Args[1]
3365 v_1_1 := v_1.Args[1]
3366 if v_1_1.Op != OpConst64 {
3367 continue
3368 }
3369 c := auxIntToInt64(v_1_1.AuxInt)
3370 if !(c >= int64(32-ntz32(m))) {
3371 continue
3372 }
3373 v.reset(OpConst32)
3374 v.AuxInt = int32ToAuxInt(0)
3375 return true
3376 }
3377 break
3378 }
3379
3380
3381
3382 for {
3383 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3384 if v_0.Op != OpConst32 {
3385 continue
3386 }
3387 m := auxIntToInt32(v_0.AuxInt)
3388 if v_1.Op != OpLsh32x64 {
3389 continue
3390 }
3391 _ = v_1.Args[1]
3392 v_1_1 := v_1.Args[1]
3393 if v_1_1.Op != OpConst64 {
3394 continue
3395 }
3396 c := auxIntToInt64(v_1_1.AuxInt)
3397 if !(c >= int64(32-nlz32(m))) {
3398 continue
3399 }
3400 v.reset(OpConst32)
3401 v.AuxInt = int32ToAuxInt(0)
3402 return true
3403 }
3404 break
3405 }
3406
3407
3408 for {
3409 x := v_0
3410 if x != v_1 {
3411 break
3412 }
3413 v.copyOf(x)
3414 return true
3415 }
3416
3417
3418 for {
3419 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3420 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != -1 {
3421 continue
3422 }
3423 x := v_1
3424 v.copyOf(x)
3425 return true
3426 }
3427 break
3428 }
3429
3430
3431 for {
3432 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3433 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
3434 continue
3435 }
3436 v.reset(OpConst32)
3437 v.AuxInt = int32ToAuxInt(0)
3438 return true
3439 }
3440 break
3441 }
3442
3443
3444 for {
3445 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3446 if v_0.Op != OpCom32 {
3447 continue
3448 }
3449 x := v_0.Args[0]
3450 if x != v_1 {
3451 continue
3452 }
3453 v.reset(OpConst32)
3454 v.AuxInt = int32ToAuxInt(0)
3455 return true
3456 }
3457 break
3458 }
3459
3460
3461 for {
3462 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3463 x := v_0
3464 if v_1.Op != OpAnd32 {
3465 continue
3466 }
3467 _ = v_1.Args[1]
3468 v_1_0 := v_1.Args[0]
3469 v_1_1 := v_1.Args[1]
3470 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
3471 if x != v_1_0 {
3472 continue
3473 }
3474 y := v_1_1
3475 v.reset(OpAnd32)
3476 v.AddArg2(x, y)
3477 return true
3478 }
3479 }
3480 break
3481 }
3482
3483
3484
3485 for {
3486 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3487 if v_0.Op != OpAnd32 {
3488 continue
3489 }
3490 _ = v_0.Args[1]
3491 v_0_0 := v_0.Args[0]
3492 v_0_1 := v_0.Args[1]
3493 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
3494 i := v_0_0
3495 if i.Op != OpConst32 {
3496 continue
3497 }
3498 t := i.Type
3499 z := v_0_1
3500 x := v_1
3501 if !(z.Op != OpConst32 && x.Op != OpConst32) {
3502 continue
3503 }
3504 v.reset(OpAnd32)
3505 v0 := b.NewValue0(v.Pos, OpAnd32, t)
3506 v0.AddArg2(z, x)
3507 v.AddArg2(i, v0)
3508 return true
3509 }
3510 }
3511 break
3512 }
3513
3514
3515 for {
3516 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3517 if v_0.Op != OpConst32 {
3518 continue
3519 }
3520 t := v_0.Type
3521 c := auxIntToInt32(v_0.AuxInt)
3522 if v_1.Op != OpAnd32 {
3523 continue
3524 }
3525 _ = v_1.Args[1]
3526 v_1_0 := v_1.Args[0]
3527 v_1_1 := v_1.Args[1]
3528 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
3529 if v_1_0.Op != OpConst32 || v_1_0.Type != t {
3530 continue
3531 }
3532 d := auxIntToInt32(v_1_0.AuxInt)
3533 x := v_1_1
3534 v.reset(OpAnd32)
3535 v0 := b.NewValue0(v.Pos, OpConst32, t)
3536 v0.AuxInt = int32ToAuxInt(c & d)
3537 v.AddArg2(v0, x)
3538 return true
3539 }
3540 }
3541 break
3542 }
3543 return false
3544 }
3545 func rewriteValuegeneric_OpAnd64(v *Value) bool {
3546 v_1 := v.Args[1]
3547 v_0 := v.Args[0]
3548 b := v.Block
3549
3550
3551 for {
3552 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3553 if v_0.Op != OpConst64 {
3554 continue
3555 }
3556 c := auxIntToInt64(v_0.AuxInt)
3557 if v_1.Op != OpConst64 {
3558 continue
3559 }
3560 d := auxIntToInt64(v_1.AuxInt)
3561 v.reset(OpConst64)
3562 v.AuxInt = int64ToAuxInt(c & d)
3563 return true
3564 }
3565 break
3566 }
3567
3568
3569 for {
3570 t := v.Type
3571 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3572 if v_0.Op != OpCom64 {
3573 continue
3574 }
3575 x := v_0.Args[0]
3576 if v_1.Op != OpCom64 {
3577 continue
3578 }
3579 y := v_1.Args[0]
3580 v.reset(OpCom64)
3581 v0 := b.NewValue0(v.Pos, OpOr64, t)
3582 v0.AddArg2(x, y)
3583 v.AddArg(v0)
3584 return true
3585 }
3586 break
3587 }
3588
3589
3590
3591 for {
3592 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3593 if v_0.Op != OpConst64 {
3594 continue
3595 }
3596 m := auxIntToInt64(v_0.AuxInt)
3597 if v_1.Op != OpRsh64Ux64 {
3598 continue
3599 }
3600 _ = v_1.Args[1]
3601 v_1_1 := v_1.Args[1]
3602 if v_1_1.Op != OpConst64 {
3603 continue
3604 }
3605 c := auxIntToInt64(v_1_1.AuxInt)
3606 if !(c >= int64(64-ntz64(m))) {
3607 continue
3608 }
3609 v.reset(OpConst64)
3610 v.AuxInt = int64ToAuxInt(0)
3611 return true
3612 }
3613 break
3614 }
3615
3616
3617
3618 for {
3619 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3620 if v_0.Op != OpConst64 {
3621 continue
3622 }
3623 m := auxIntToInt64(v_0.AuxInt)
3624 if v_1.Op != OpLsh64x64 {
3625 continue
3626 }
3627 _ = v_1.Args[1]
3628 v_1_1 := v_1.Args[1]
3629 if v_1_1.Op != OpConst64 {
3630 continue
3631 }
3632 c := auxIntToInt64(v_1_1.AuxInt)
3633 if !(c >= int64(64-nlz64(m))) {
3634 continue
3635 }
3636 v.reset(OpConst64)
3637 v.AuxInt = int64ToAuxInt(0)
3638 return true
3639 }
3640 break
3641 }
3642
3643
3644 for {
3645 x := v_0
3646 if x != v_1 {
3647 break
3648 }
3649 v.copyOf(x)
3650 return true
3651 }
3652
3653
3654 for {
3655 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3656 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != -1 {
3657 continue
3658 }
3659 x := v_1
3660 v.copyOf(x)
3661 return true
3662 }
3663 break
3664 }
3665
3666
3667 for {
3668 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3669 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
3670 continue
3671 }
3672 v.reset(OpConst64)
3673 v.AuxInt = int64ToAuxInt(0)
3674 return true
3675 }
3676 break
3677 }
3678
3679
3680 for {
3681 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3682 if v_0.Op != OpCom64 {
3683 continue
3684 }
3685 x := v_0.Args[0]
3686 if x != v_1 {
3687 continue
3688 }
3689 v.reset(OpConst64)
3690 v.AuxInt = int64ToAuxInt(0)
3691 return true
3692 }
3693 break
3694 }
3695
3696
3697 for {
3698 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3699 x := v_0
3700 if v_1.Op != OpAnd64 {
3701 continue
3702 }
3703 _ = v_1.Args[1]
3704 v_1_0 := v_1.Args[0]
3705 v_1_1 := v_1.Args[1]
3706 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
3707 if x != v_1_0 {
3708 continue
3709 }
3710 y := v_1_1
3711 v.reset(OpAnd64)
3712 v.AddArg2(x, y)
3713 return true
3714 }
3715 }
3716 break
3717 }
3718
3719
3720
3721 for {
3722 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3723 if v_0.Op != OpAnd64 {
3724 continue
3725 }
3726 _ = v_0.Args[1]
3727 v_0_0 := v_0.Args[0]
3728 v_0_1 := v_0.Args[1]
3729 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
3730 i := v_0_0
3731 if i.Op != OpConst64 {
3732 continue
3733 }
3734 t := i.Type
3735 z := v_0_1
3736 x := v_1
3737 if !(z.Op != OpConst64 && x.Op != OpConst64) {
3738 continue
3739 }
3740 v.reset(OpAnd64)
3741 v0 := b.NewValue0(v.Pos, OpAnd64, t)
3742 v0.AddArg2(z, x)
3743 v.AddArg2(i, v0)
3744 return true
3745 }
3746 }
3747 break
3748 }
3749
3750
3751 for {
3752 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3753 if v_0.Op != OpConst64 {
3754 continue
3755 }
3756 t := v_0.Type
3757 c := auxIntToInt64(v_0.AuxInt)
3758 if v_1.Op != OpAnd64 {
3759 continue
3760 }
3761 _ = v_1.Args[1]
3762 v_1_0 := v_1.Args[0]
3763 v_1_1 := v_1.Args[1]
3764 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
3765 if v_1_0.Op != OpConst64 || v_1_0.Type != t {
3766 continue
3767 }
3768 d := auxIntToInt64(v_1_0.AuxInt)
3769 x := v_1_1
3770 v.reset(OpAnd64)
3771 v0 := b.NewValue0(v.Pos, OpConst64, t)
3772 v0.AuxInt = int64ToAuxInt(c & d)
3773 v.AddArg2(v0, x)
3774 return true
3775 }
3776 }
3777 break
3778 }
3779 return false
3780 }
3781 func rewriteValuegeneric_OpAnd8(v *Value) bool {
3782 v_1 := v.Args[1]
3783 v_0 := v.Args[0]
3784 b := v.Block
3785
3786
3787 for {
3788 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3789 if v_0.Op != OpConst8 {
3790 continue
3791 }
3792 c := auxIntToInt8(v_0.AuxInt)
3793 if v_1.Op != OpConst8 {
3794 continue
3795 }
3796 d := auxIntToInt8(v_1.AuxInt)
3797 v.reset(OpConst8)
3798 v.AuxInt = int8ToAuxInt(c & d)
3799 return true
3800 }
3801 break
3802 }
3803
3804
3805 for {
3806 t := v.Type
3807 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3808 if v_0.Op != OpCom8 {
3809 continue
3810 }
3811 x := v_0.Args[0]
3812 if v_1.Op != OpCom8 {
3813 continue
3814 }
3815 y := v_1.Args[0]
3816 v.reset(OpCom8)
3817 v0 := b.NewValue0(v.Pos, OpOr8, t)
3818 v0.AddArg2(x, y)
3819 v.AddArg(v0)
3820 return true
3821 }
3822 break
3823 }
3824
3825
3826
3827 for {
3828 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3829 if v_0.Op != OpConst8 {
3830 continue
3831 }
3832 m := auxIntToInt8(v_0.AuxInt)
3833 if v_1.Op != OpRsh8Ux64 {
3834 continue
3835 }
3836 _ = v_1.Args[1]
3837 v_1_1 := v_1.Args[1]
3838 if v_1_1.Op != OpConst64 {
3839 continue
3840 }
3841 c := auxIntToInt64(v_1_1.AuxInt)
3842 if !(c >= int64(8-ntz8(m))) {
3843 continue
3844 }
3845 v.reset(OpConst8)
3846 v.AuxInt = int8ToAuxInt(0)
3847 return true
3848 }
3849 break
3850 }
3851
3852
3853
3854 for {
3855 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3856 if v_0.Op != OpConst8 {
3857 continue
3858 }
3859 m := auxIntToInt8(v_0.AuxInt)
3860 if v_1.Op != OpLsh8x64 {
3861 continue
3862 }
3863 _ = v_1.Args[1]
3864 v_1_1 := v_1.Args[1]
3865 if v_1_1.Op != OpConst64 {
3866 continue
3867 }
3868 c := auxIntToInt64(v_1_1.AuxInt)
3869 if !(c >= int64(8-nlz8(m))) {
3870 continue
3871 }
3872 v.reset(OpConst8)
3873 v.AuxInt = int8ToAuxInt(0)
3874 return true
3875 }
3876 break
3877 }
3878
3879
3880 for {
3881 x := v_0
3882 if x != v_1 {
3883 break
3884 }
3885 v.copyOf(x)
3886 return true
3887 }
3888
3889
3890 for {
3891 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3892 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != -1 {
3893 continue
3894 }
3895 x := v_1
3896 v.copyOf(x)
3897 return true
3898 }
3899 break
3900 }
3901
3902
3903 for {
3904 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3905 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 {
3906 continue
3907 }
3908 v.reset(OpConst8)
3909 v.AuxInt = int8ToAuxInt(0)
3910 return true
3911 }
3912 break
3913 }
3914
3915
3916 for {
3917 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3918 if v_0.Op != OpCom8 {
3919 continue
3920 }
3921 x := v_0.Args[0]
3922 if x != v_1 {
3923 continue
3924 }
3925 v.reset(OpConst8)
3926 v.AuxInt = int8ToAuxInt(0)
3927 return true
3928 }
3929 break
3930 }
3931
3932
3933 for {
3934 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3935 x := v_0
3936 if v_1.Op != OpAnd8 {
3937 continue
3938 }
3939 _ = v_1.Args[1]
3940 v_1_0 := v_1.Args[0]
3941 v_1_1 := v_1.Args[1]
3942 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
3943 if x != v_1_0 {
3944 continue
3945 }
3946 y := v_1_1
3947 v.reset(OpAnd8)
3948 v.AddArg2(x, y)
3949 return true
3950 }
3951 }
3952 break
3953 }
3954
3955
3956
3957 for {
3958 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3959 if v_0.Op != OpAnd8 {
3960 continue
3961 }
3962 _ = v_0.Args[1]
3963 v_0_0 := v_0.Args[0]
3964 v_0_1 := v_0.Args[1]
3965 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
3966 i := v_0_0
3967 if i.Op != OpConst8 {
3968 continue
3969 }
3970 t := i.Type
3971 z := v_0_1
3972 x := v_1
3973 if !(z.Op != OpConst8 && x.Op != OpConst8) {
3974 continue
3975 }
3976 v.reset(OpAnd8)
3977 v0 := b.NewValue0(v.Pos, OpAnd8, t)
3978 v0.AddArg2(z, x)
3979 v.AddArg2(i, v0)
3980 return true
3981 }
3982 }
3983 break
3984 }
3985
3986
3987 for {
3988 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
3989 if v_0.Op != OpConst8 {
3990 continue
3991 }
3992 t := v_0.Type
3993 c := auxIntToInt8(v_0.AuxInt)
3994 if v_1.Op != OpAnd8 {
3995 continue
3996 }
3997 _ = v_1.Args[1]
3998 v_1_0 := v_1.Args[0]
3999 v_1_1 := v_1.Args[1]
4000 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
4001 if v_1_0.Op != OpConst8 || v_1_0.Type != t {
4002 continue
4003 }
4004 d := auxIntToInt8(v_1_0.AuxInt)
4005 x := v_1_1
4006 v.reset(OpAnd8)
4007 v0 := b.NewValue0(v.Pos, OpConst8, t)
4008 v0.AuxInt = int8ToAuxInt(c & d)
4009 v.AddArg2(v0, x)
4010 return true
4011 }
4012 }
4013 break
4014 }
4015 return false
4016 }
4017 func rewriteValuegeneric_OpAndB(v *Value) bool {
4018 v_1 := v.Args[1]
4019 v_0 := v.Args[0]
4020 b := v.Block
4021
4022
4023
4024 for {
4025 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
4026 if v_0.Op != OpLeq64 {
4027 continue
4028 }
4029 x := v_0.Args[1]
4030 v_0_0 := v_0.Args[0]
4031 if v_0_0.Op != OpConst64 {
4032 continue
4033 }
4034 c := auxIntToInt64(v_0_0.AuxInt)
4035 if v_1.Op != OpLess64 {
4036 continue
4037 }
4038 _ = v_1.Args[1]
4039 if x != v_1.Args[0] {
4040 continue
4041 }
4042 v_1_1 := v_1.Args[1]
4043 if v_1_1.Op != OpConst64 {
4044 continue
4045 }
4046 d := auxIntToInt64(v_1_1.AuxInt)
4047 if !(d >= c) {
4048 continue
4049 }
4050 v.reset(OpLess64U)
4051 v0 := b.NewValue0(v.Pos, OpSub64, x.Type)
4052 v1 := b.NewValue0(v.Pos, OpConst64, x.Type)
4053 v1.AuxInt = int64ToAuxInt(c)
4054 v0.AddArg2(x, v1)
4055 v2 := b.NewValue0(v.Pos, OpConst64, x.Type)
4056 v2.AuxInt = int64ToAuxInt(d - c)
4057 v.AddArg2(v0, v2)
4058 return true
4059 }
4060 break
4061 }
4062
4063
4064
4065 for {
4066 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
4067 if v_0.Op != OpLeq64 {
4068 continue
4069 }
4070 x := v_0.Args[1]
4071 v_0_0 := v_0.Args[0]
4072 if v_0_0.Op != OpConst64 {
4073 continue
4074 }
4075 c := auxIntToInt64(v_0_0.AuxInt)
4076 if v_1.Op != OpLeq64 {
4077 continue
4078 }
4079 _ = v_1.Args[1]
4080 if x != v_1.Args[0] {
4081 continue
4082 }
4083 v_1_1 := v_1.Args[1]
4084 if v_1_1.Op != OpConst64 {
4085 continue
4086 }
4087 d := auxIntToInt64(v_1_1.AuxInt)
4088 if !(d >= c) {
4089 continue
4090 }
4091 v.reset(OpLeq64U)
4092 v0 := b.NewValue0(v.Pos, OpSub64, x.Type)
4093 v1 := b.NewValue0(v.Pos, OpConst64, x.Type)
4094 v1.AuxInt = int64ToAuxInt(c)
4095 v0.AddArg2(x, v1)
4096 v2 := b.NewValue0(v.Pos, OpConst64, x.Type)
4097 v2.AuxInt = int64ToAuxInt(d - c)
4098 v.AddArg2(v0, v2)
4099 return true
4100 }
4101 break
4102 }
4103
4104
4105
4106 for {
4107 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
4108 if v_0.Op != OpLeq32 {
4109 continue
4110 }
4111 x := v_0.Args[1]
4112 v_0_0 := v_0.Args[0]
4113 if v_0_0.Op != OpConst32 {
4114 continue
4115 }
4116 c := auxIntToInt32(v_0_0.AuxInt)
4117 if v_1.Op != OpLess32 {
4118 continue
4119 }
4120 _ = v_1.Args[1]
4121 if x != v_1.Args[0] {
4122 continue
4123 }
4124 v_1_1 := v_1.Args[1]
4125 if v_1_1.Op != OpConst32 {
4126 continue
4127 }
4128 d := auxIntToInt32(v_1_1.AuxInt)
4129 if !(d >= c) {
4130 continue
4131 }
4132 v.reset(OpLess32U)
4133 v0 := b.NewValue0(v.Pos, OpSub32, x.Type)
4134 v1 := b.NewValue0(v.Pos, OpConst32, x.Type)
4135 v1.AuxInt = int32ToAuxInt(c)
4136 v0.AddArg2(x, v1)
4137 v2 := b.NewValue0(v.Pos, OpConst32, x.Type)
4138 v2.AuxInt = int32ToAuxInt(d - c)
4139 v.AddArg2(v0, v2)
4140 return true
4141 }
4142 break
4143 }
4144
4145
4146
4147 for {
4148 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
4149 if v_0.Op != OpLeq32 {
4150 continue
4151 }
4152 x := v_0.Args[1]
4153 v_0_0 := v_0.Args[0]
4154 if v_0_0.Op != OpConst32 {
4155 continue
4156 }
4157 c := auxIntToInt32(v_0_0.AuxInt)
4158 if v_1.Op != OpLeq32 {
4159 continue
4160 }
4161 _ = v_1.Args[1]
4162 if x != v_1.Args[0] {
4163 continue
4164 }
4165 v_1_1 := v_1.Args[1]
4166 if v_1_1.Op != OpConst32 {
4167 continue
4168 }
4169 d := auxIntToInt32(v_1_1.AuxInt)
4170 if !(d >= c) {
4171 continue
4172 }
4173 v.reset(OpLeq32U)
4174 v0 := b.NewValue0(v.Pos, OpSub32, x.Type)
4175 v1 := b.NewValue0(v.Pos, OpConst32, x.Type)
4176 v1.AuxInt = int32ToAuxInt(c)
4177 v0.AddArg2(x, v1)
4178 v2 := b.NewValue0(v.Pos, OpConst32, x.Type)
4179 v2.AuxInt = int32ToAuxInt(d - c)
4180 v.AddArg2(v0, v2)
4181 return true
4182 }
4183 break
4184 }
4185
4186
4187
4188 for {
4189 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
4190 if v_0.Op != OpLeq16 {
4191 continue
4192 }
4193 x := v_0.Args[1]
4194 v_0_0 := v_0.Args[0]
4195 if v_0_0.Op != OpConst16 {
4196 continue
4197 }
4198 c := auxIntToInt16(v_0_0.AuxInt)
4199 if v_1.Op != OpLess16 {
4200 continue
4201 }
4202 _ = v_1.Args[1]
4203 if x != v_1.Args[0] {
4204 continue
4205 }
4206 v_1_1 := v_1.Args[1]
4207 if v_1_1.Op != OpConst16 {
4208 continue
4209 }
4210 d := auxIntToInt16(v_1_1.AuxInt)
4211 if !(d >= c) {
4212 continue
4213 }
4214 v.reset(OpLess16U)
4215 v0 := b.NewValue0(v.Pos, OpSub16, x.Type)
4216 v1 := b.NewValue0(v.Pos, OpConst16, x.Type)
4217 v1.AuxInt = int16ToAuxInt(c)
4218 v0.AddArg2(x, v1)
4219 v2 := b.NewValue0(v.Pos, OpConst16, x.Type)
4220 v2.AuxInt = int16ToAuxInt(d - c)
4221 v.AddArg2(v0, v2)
4222 return true
4223 }
4224 break
4225 }
4226
4227
4228
4229 for {
4230 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
4231 if v_0.Op != OpLeq16 {
4232 continue
4233 }
4234 x := v_0.Args[1]
4235 v_0_0 := v_0.Args[0]
4236 if v_0_0.Op != OpConst16 {
4237 continue
4238 }
4239 c := auxIntToInt16(v_0_0.AuxInt)
4240 if v_1.Op != OpLeq16 {
4241 continue
4242 }
4243 _ = v_1.Args[1]
4244 if x != v_1.Args[0] {
4245 continue
4246 }
4247 v_1_1 := v_1.Args[1]
4248 if v_1_1.Op != OpConst16 {
4249 continue
4250 }
4251 d := auxIntToInt16(v_1_1.AuxInt)
4252 if !(d >= c) {
4253 continue
4254 }
4255 v.reset(OpLeq16U)
4256 v0 := b.NewValue0(v.Pos, OpSub16, x.Type)
4257 v1 := b.NewValue0(v.Pos, OpConst16, x.Type)
4258 v1.AuxInt = int16ToAuxInt(c)
4259 v0.AddArg2(x, v1)
4260 v2 := b.NewValue0(v.Pos, OpConst16, x.Type)
4261 v2.AuxInt = int16ToAuxInt(d - c)
4262 v.AddArg2(v0, v2)
4263 return true
4264 }
4265 break
4266 }
4267
4268
4269
4270 for {
4271 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
4272 if v_0.Op != OpLeq8 {
4273 continue
4274 }
4275 x := v_0.Args[1]
4276 v_0_0 := v_0.Args[0]
4277 if v_0_0.Op != OpConst8 {
4278 continue
4279 }
4280 c := auxIntToInt8(v_0_0.AuxInt)
4281 if v_1.Op != OpLess8 {
4282 continue
4283 }
4284 _ = v_1.Args[1]
4285 if x != v_1.Args[0] {
4286 continue
4287 }
4288 v_1_1 := v_1.Args[1]
4289 if v_1_1.Op != OpConst8 {
4290 continue
4291 }
4292 d := auxIntToInt8(v_1_1.AuxInt)
4293 if !(d >= c) {
4294 continue
4295 }
4296 v.reset(OpLess8U)
4297 v0 := b.NewValue0(v.Pos, OpSub8, x.Type)
4298 v1 := b.NewValue0(v.Pos, OpConst8, x.Type)
4299 v1.AuxInt = int8ToAuxInt(c)
4300 v0.AddArg2(x, v1)
4301 v2 := b.NewValue0(v.Pos, OpConst8, x.Type)
4302 v2.AuxInt = int8ToAuxInt(d - c)
4303 v.AddArg2(v0, v2)
4304 return true
4305 }
4306 break
4307 }
4308
4309
4310
4311 for {
4312 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
4313 if v_0.Op != OpLeq8 {
4314 continue
4315 }
4316 x := v_0.Args[1]
4317 v_0_0 := v_0.Args[0]
4318 if v_0_0.Op != OpConst8 {
4319 continue
4320 }
4321 c := auxIntToInt8(v_0_0.AuxInt)
4322 if v_1.Op != OpLeq8 {
4323 continue
4324 }
4325 _ = v_1.Args[1]
4326 if x != v_1.Args[0] {
4327 continue
4328 }
4329 v_1_1 := v_1.Args[1]
4330 if v_1_1.Op != OpConst8 {
4331 continue
4332 }
4333 d := auxIntToInt8(v_1_1.AuxInt)
4334 if !(d >= c) {
4335 continue
4336 }
4337 v.reset(OpLeq8U)
4338 v0 := b.NewValue0(v.Pos, OpSub8, x.Type)
4339 v1 := b.NewValue0(v.Pos, OpConst8, x.Type)
4340 v1.AuxInt = int8ToAuxInt(c)
4341 v0.AddArg2(x, v1)
4342 v2 := b.NewValue0(v.Pos, OpConst8, x.Type)
4343 v2.AuxInt = int8ToAuxInt(d - c)
4344 v.AddArg2(v0, v2)
4345 return true
4346 }
4347 break
4348 }
4349
4350
4351
4352 for {
4353 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
4354 if v_0.Op != OpLess64 {
4355 continue
4356 }
4357 x := v_0.Args[1]
4358 v_0_0 := v_0.Args[0]
4359 if v_0_0.Op != OpConst64 {
4360 continue
4361 }
4362 c := auxIntToInt64(v_0_0.AuxInt)
4363 if v_1.Op != OpLess64 {
4364 continue
4365 }
4366 _ = v_1.Args[1]
4367 if x != v_1.Args[0] {
4368 continue
4369 }
4370 v_1_1 := v_1.Args[1]
4371 if v_1_1.Op != OpConst64 {
4372 continue
4373 }
4374 d := auxIntToInt64(v_1_1.AuxInt)
4375 if !(d >= c+1 && c+1 > c) {
4376 continue
4377 }
4378 v.reset(OpLess64U)
4379 v0 := b.NewValue0(v.Pos, OpSub64, x.Type)
4380 v1 := b.NewValue0(v.Pos, OpConst64, x.Type)
4381 v1.AuxInt = int64ToAuxInt(c + 1)
4382 v0.AddArg2(x, v1)
4383 v2 := b.NewValue0(v.Pos, OpConst64, x.Type)
4384 v2.AuxInt = int64ToAuxInt(d - c - 1)
4385 v.AddArg2(v0, v2)
4386 return true
4387 }
4388 break
4389 }
4390
4391
4392
4393 for {
4394 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
4395 if v_0.Op != OpLess64 {
4396 continue
4397 }
4398 x := v_0.Args[1]
4399 v_0_0 := v_0.Args[0]
4400 if v_0_0.Op != OpConst64 {
4401 continue
4402 }
4403 c := auxIntToInt64(v_0_0.AuxInt)
4404 if v_1.Op != OpLeq64 {
4405 continue
4406 }
4407 _ = v_1.Args[1]
4408 if x != v_1.Args[0] {
4409 continue
4410 }
4411 v_1_1 := v_1.Args[1]
4412 if v_1_1.Op != OpConst64 {
4413 continue
4414 }
4415 d := auxIntToInt64(v_1_1.AuxInt)
4416 if !(d >= c+1 && c+1 > c) {
4417 continue
4418 }
4419 v.reset(OpLeq64U)
4420 v0 := b.NewValue0(v.Pos, OpSub64, x.Type)
4421 v1 := b.NewValue0(v.Pos, OpConst64, x.Type)
4422 v1.AuxInt = int64ToAuxInt(c + 1)
4423 v0.AddArg2(x, v1)
4424 v2 := b.NewValue0(v.Pos, OpConst64, x.Type)
4425 v2.AuxInt = int64ToAuxInt(d - c - 1)
4426 v.AddArg2(v0, v2)
4427 return true
4428 }
4429 break
4430 }
4431
4432
4433
4434 for {
4435 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
4436 if v_0.Op != OpLess32 {
4437 continue
4438 }
4439 x := v_0.Args[1]
4440 v_0_0 := v_0.Args[0]
4441 if v_0_0.Op != OpConst32 {
4442 continue
4443 }
4444 c := auxIntToInt32(v_0_0.AuxInt)
4445 if v_1.Op != OpLess32 {
4446 continue
4447 }
4448 _ = v_1.Args[1]
4449 if x != v_1.Args[0] {
4450 continue
4451 }
4452 v_1_1 := v_1.Args[1]
4453 if v_1_1.Op != OpConst32 {
4454 continue
4455 }
4456 d := auxIntToInt32(v_1_1.AuxInt)
4457 if !(d >= c+1 && c+1 > c) {
4458 continue
4459 }
4460 v.reset(OpLess32U)
4461 v0 := b.NewValue0(v.Pos, OpSub32, x.Type)
4462 v1 := b.NewValue0(v.Pos, OpConst32, x.Type)
4463 v1.AuxInt = int32ToAuxInt(c + 1)
4464 v0.AddArg2(x, v1)
4465 v2 := b.NewValue0(v.Pos, OpConst32, x.Type)
4466 v2.AuxInt = int32ToAuxInt(d - c - 1)
4467 v.AddArg2(v0, v2)
4468 return true
4469 }
4470 break
4471 }
4472
4473
4474
4475 for {
4476 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
4477 if v_0.Op != OpLess32 {
4478 continue
4479 }
4480 x := v_0.Args[1]
4481 v_0_0 := v_0.Args[0]
4482 if v_0_0.Op != OpConst32 {
4483 continue
4484 }
4485 c := auxIntToInt32(v_0_0.AuxInt)
4486 if v_1.Op != OpLeq32 {
4487 continue
4488 }
4489 _ = v_1.Args[1]
4490 if x != v_1.Args[0] {
4491 continue
4492 }
4493 v_1_1 := v_1.Args[1]
4494 if v_1_1.Op != OpConst32 {
4495 continue
4496 }
4497 d := auxIntToInt32(v_1_1.AuxInt)
4498 if !(d >= c+1 && c+1 > c) {
4499 continue
4500 }
4501 v.reset(OpLeq32U)
4502 v0 := b.NewValue0(v.Pos, OpSub32, x.Type)
4503 v1 := b.NewValue0(v.Pos, OpConst32, x.Type)
4504 v1.AuxInt = int32ToAuxInt(c + 1)
4505 v0.AddArg2(x, v1)
4506 v2 := b.NewValue0(v.Pos, OpConst32, x.Type)
4507 v2.AuxInt = int32ToAuxInt(d - c - 1)
4508 v.AddArg2(v0, v2)
4509 return true
4510 }
4511 break
4512 }
4513
4514
4515
4516 for {
4517 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
4518 if v_0.Op != OpLess16 {
4519 continue
4520 }
4521 x := v_0.Args[1]
4522 v_0_0 := v_0.Args[0]
4523 if v_0_0.Op != OpConst16 {
4524 continue
4525 }
4526 c := auxIntToInt16(v_0_0.AuxInt)
4527 if v_1.Op != OpLess16 {
4528 continue
4529 }
4530 _ = v_1.Args[1]
4531 if x != v_1.Args[0] {
4532 continue
4533 }
4534 v_1_1 := v_1.Args[1]
4535 if v_1_1.Op != OpConst16 {
4536 continue
4537 }
4538 d := auxIntToInt16(v_1_1.AuxInt)
4539 if !(d >= c+1 && c+1 > c) {
4540 continue
4541 }
4542 v.reset(OpLess16U)
4543 v0 := b.NewValue0(v.Pos, OpSub16, x.Type)
4544 v1 := b.NewValue0(v.Pos, OpConst16, x.Type)
4545 v1.AuxInt = int16ToAuxInt(c + 1)
4546 v0.AddArg2(x, v1)
4547 v2 := b.NewValue0(v.Pos, OpConst16, x.Type)
4548 v2.AuxInt = int16ToAuxInt(d - c - 1)
4549 v.AddArg2(v0, v2)
4550 return true
4551 }
4552 break
4553 }
4554
4555
4556
4557 for {
4558 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
4559 if v_0.Op != OpLess16 {
4560 continue
4561 }
4562 x := v_0.Args[1]
4563 v_0_0 := v_0.Args[0]
4564 if v_0_0.Op != OpConst16 {
4565 continue
4566 }
4567 c := auxIntToInt16(v_0_0.AuxInt)
4568 if v_1.Op != OpLeq16 {
4569 continue
4570 }
4571 _ = v_1.Args[1]
4572 if x != v_1.Args[0] {
4573 continue
4574 }
4575 v_1_1 := v_1.Args[1]
4576 if v_1_1.Op != OpConst16 {
4577 continue
4578 }
4579 d := auxIntToInt16(v_1_1.AuxInt)
4580 if !(d >= c+1 && c+1 > c) {
4581 continue
4582 }
4583 v.reset(OpLeq16U)
4584 v0 := b.NewValue0(v.Pos, OpSub16, x.Type)
4585 v1 := b.NewValue0(v.Pos, OpConst16, x.Type)
4586 v1.AuxInt = int16ToAuxInt(c + 1)
4587 v0.AddArg2(x, v1)
4588 v2 := b.NewValue0(v.Pos, OpConst16, x.Type)
4589 v2.AuxInt = int16ToAuxInt(d - c - 1)
4590 v.AddArg2(v0, v2)
4591 return true
4592 }
4593 break
4594 }
4595
4596
4597
4598 for {
4599 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
4600 if v_0.Op != OpLess8 {
4601 continue
4602 }
4603 x := v_0.Args[1]
4604 v_0_0 := v_0.Args[0]
4605 if v_0_0.Op != OpConst8 {
4606 continue
4607 }
4608 c := auxIntToInt8(v_0_0.AuxInt)
4609 if v_1.Op != OpLess8 {
4610 continue
4611 }
4612 _ = v_1.Args[1]
4613 if x != v_1.Args[0] {
4614 continue
4615 }
4616 v_1_1 := v_1.Args[1]
4617 if v_1_1.Op != OpConst8 {
4618 continue
4619 }
4620 d := auxIntToInt8(v_1_1.AuxInt)
4621 if !(d >= c+1 && c+1 > c) {
4622 continue
4623 }
4624 v.reset(OpLess8U)
4625 v0 := b.NewValue0(v.Pos, OpSub8, x.Type)
4626 v1 := b.NewValue0(v.Pos, OpConst8, x.Type)
4627 v1.AuxInt = int8ToAuxInt(c + 1)
4628 v0.AddArg2(x, v1)
4629 v2 := b.NewValue0(v.Pos, OpConst8, x.Type)
4630 v2.AuxInt = int8ToAuxInt(d - c - 1)
4631 v.AddArg2(v0, v2)
4632 return true
4633 }
4634 break
4635 }
4636
4637
4638
4639 for {
4640 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
4641 if v_0.Op != OpLess8 {
4642 continue
4643 }
4644 x := v_0.Args[1]
4645 v_0_0 := v_0.Args[0]
4646 if v_0_0.Op != OpConst8 {
4647 continue
4648 }
4649 c := auxIntToInt8(v_0_0.AuxInt)
4650 if v_1.Op != OpLeq8 {
4651 continue
4652 }
4653 _ = v_1.Args[1]
4654 if x != v_1.Args[0] {
4655 continue
4656 }
4657 v_1_1 := v_1.Args[1]
4658 if v_1_1.Op != OpConst8 {
4659 continue
4660 }
4661 d := auxIntToInt8(v_1_1.AuxInt)
4662 if !(d >= c+1 && c+1 > c) {
4663 continue
4664 }
4665 v.reset(OpLeq8U)
4666 v0 := b.NewValue0(v.Pos, OpSub8, x.Type)
4667 v1 := b.NewValue0(v.Pos, OpConst8, x.Type)
4668 v1.AuxInt = int8ToAuxInt(c + 1)
4669 v0.AddArg2(x, v1)
4670 v2 := b.NewValue0(v.Pos, OpConst8, x.Type)
4671 v2.AuxInt = int8ToAuxInt(d - c - 1)
4672 v.AddArg2(v0, v2)
4673 return true
4674 }
4675 break
4676 }
4677
4678
4679
4680 for {
4681 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
4682 if v_0.Op != OpLeq64U {
4683 continue
4684 }
4685 x := v_0.Args[1]
4686 v_0_0 := v_0.Args[0]
4687 if v_0_0.Op != OpConst64 {
4688 continue
4689 }
4690 c := auxIntToInt64(v_0_0.AuxInt)
4691 if v_1.Op != OpLess64U {
4692 continue
4693 }
4694 _ = v_1.Args[1]
4695 if x != v_1.Args[0] {
4696 continue
4697 }
4698 v_1_1 := v_1.Args[1]
4699 if v_1_1.Op != OpConst64 {
4700 continue
4701 }
4702 d := auxIntToInt64(v_1_1.AuxInt)
4703 if !(uint64(d) >= uint64(c)) {
4704 continue
4705 }
4706 v.reset(OpLess64U)
4707 v0 := b.NewValue0(v.Pos, OpSub64, x.Type)
4708 v1 := b.NewValue0(v.Pos, OpConst64, x.Type)
4709 v1.AuxInt = int64ToAuxInt(c)
4710 v0.AddArg2(x, v1)
4711 v2 := b.NewValue0(v.Pos, OpConst64, x.Type)
4712 v2.AuxInt = int64ToAuxInt(d - c)
4713 v.AddArg2(v0, v2)
4714 return true
4715 }
4716 break
4717 }
4718
4719
4720
4721 for {
4722 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
4723 if v_0.Op != OpLeq64U {
4724 continue
4725 }
4726 x := v_0.Args[1]
4727 v_0_0 := v_0.Args[0]
4728 if v_0_0.Op != OpConst64 {
4729 continue
4730 }
4731 c := auxIntToInt64(v_0_0.AuxInt)
4732 if v_1.Op != OpLeq64U {
4733 continue
4734 }
4735 _ = v_1.Args[1]
4736 if x != v_1.Args[0] {
4737 continue
4738 }
4739 v_1_1 := v_1.Args[1]
4740 if v_1_1.Op != OpConst64 {
4741 continue
4742 }
4743 d := auxIntToInt64(v_1_1.AuxInt)
4744 if !(uint64(d) >= uint64(c)) {
4745 continue
4746 }
4747 v.reset(OpLeq64U)
4748 v0 := b.NewValue0(v.Pos, OpSub64, x.Type)
4749 v1 := b.NewValue0(v.Pos, OpConst64, x.Type)
4750 v1.AuxInt = int64ToAuxInt(c)
4751 v0.AddArg2(x, v1)
4752 v2 := b.NewValue0(v.Pos, OpConst64, x.Type)
4753 v2.AuxInt = int64ToAuxInt(d - c)
4754 v.AddArg2(v0, v2)
4755 return true
4756 }
4757 break
4758 }
4759
4760
4761
4762 for {
4763 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
4764 if v_0.Op != OpLeq32U {
4765 continue
4766 }
4767 x := v_0.Args[1]
4768 v_0_0 := v_0.Args[0]
4769 if v_0_0.Op != OpConst32 {
4770 continue
4771 }
4772 c := auxIntToInt32(v_0_0.AuxInt)
4773 if v_1.Op != OpLess32U {
4774 continue
4775 }
4776 _ = v_1.Args[1]
4777 if x != v_1.Args[0] {
4778 continue
4779 }
4780 v_1_1 := v_1.Args[1]
4781 if v_1_1.Op != OpConst32 {
4782 continue
4783 }
4784 d := auxIntToInt32(v_1_1.AuxInt)
4785 if !(uint32(d) >= uint32(c)) {
4786 continue
4787 }
4788 v.reset(OpLess32U)
4789 v0 := b.NewValue0(v.Pos, OpSub32, x.Type)
4790 v1 := b.NewValue0(v.Pos, OpConst32, x.Type)
4791 v1.AuxInt = int32ToAuxInt(c)
4792 v0.AddArg2(x, v1)
4793 v2 := b.NewValue0(v.Pos, OpConst32, x.Type)
4794 v2.AuxInt = int32ToAuxInt(d - c)
4795 v.AddArg2(v0, v2)
4796 return true
4797 }
4798 break
4799 }
4800
4801
4802
4803 for {
4804 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
4805 if v_0.Op != OpLeq32U {
4806 continue
4807 }
4808 x := v_0.Args[1]
4809 v_0_0 := v_0.Args[0]
4810 if v_0_0.Op != OpConst32 {
4811 continue
4812 }
4813 c := auxIntToInt32(v_0_0.AuxInt)
4814 if v_1.Op != OpLeq32U {
4815 continue
4816 }
4817 _ = v_1.Args[1]
4818 if x != v_1.Args[0] {
4819 continue
4820 }
4821 v_1_1 := v_1.Args[1]
4822 if v_1_1.Op != OpConst32 {
4823 continue
4824 }
4825 d := auxIntToInt32(v_1_1.AuxInt)
4826 if !(uint32(d) >= uint32(c)) {
4827 continue
4828 }
4829 v.reset(OpLeq32U)
4830 v0 := b.NewValue0(v.Pos, OpSub32, x.Type)
4831 v1 := b.NewValue0(v.Pos, OpConst32, x.Type)
4832 v1.AuxInt = int32ToAuxInt(c)
4833 v0.AddArg2(x, v1)
4834 v2 := b.NewValue0(v.Pos, OpConst32, x.Type)
4835 v2.AuxInt = int32ToAuxInt(d - c)
4836 v.AddArg2(v0, v2)
4837 return true
4838 }
4839 break
4840 }
4841
4842
4843
4844 for {
4845 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
4846 if v_0.Op != OpLeq16U {
4847 continue
4848 }
4849 x := v_0.Args[1]
4850 v_0_0 := v_0.Args[0]
4851 if v_0_0.Op != OpConst16 {
4852 continue
4853 }
4854 c := auxIntToInt16(v_0_0.AuxInt)
4855 if v_1.Op != OpLess16U {
4856 continue
4857 }
4858 _ = v_1.Args[1]
4859 if x != v_1.Args[0] {
4860 continue
4861 }
4862 v_1_1 := v_1.Args[1]
4863 if v_1_1.Op != OpConst16 {
4864 continue
4865 }
4866 d := auxIntToInt16(v_1_1.AuxInt)
4867 if !(uint16(d) >= uint16(c)) {
4868 continue
4869 }
4870 v.reset(OpLess16U)
4871 v0 := b.NewValue0(v.Pos, OpSub16, x.Type)
4872 v1 := b.NewValue0(v.Pos, OpConst16, x.Type)
4873 v1.AuxInt = int16ToAuxInt(c)
4874 v0.AddArg2(x, v1)
4875 v2 := b.NewValue0(v.Pos, OpConst16, x.Type)
4876 v2.AuxInt = int16ToAuxInt(d - c)
4877 v.AddArg2(v0, v2)
4878 return true
4879 }
4880 break
4881 }
4882
4883
4884
4885 for {
4886 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
4887 if v_0.Op != OpLeq16U {
4888 continue
4889 }
4890 x := v_0.Args[1]
4891 v_0_0 := v_0.Args[0]
4892 if v_0_0.Op != OpConst16 {
4893 continue
4894 }
4895 c := auxIntToInt16(v_0_0.AuxInt)
4896 if v_1.Op != OpLeq16U {
4897 continue
4898 }
4899 _ = v_1.Args[1]
4900 if x != v_1.Args[0] {
4901 continue
4902 }
4903 v_1_1 := v_1.Args[1]
4904 if v_1_1.Op != OpConst16 {
4905 continue
4906 }
4907 d := auxIntToInt16(v_1_1.AuxInt)
4908 if !(uint16(d) >= uint16(c)) {
4909 continue
4910 }
4911 v.reset(OpLeq16U)
4912 v0 := b.NewValue0(v.Pos, OpSub16, x.Type)
4913 v1 := b.NewValue0(v.Pos, OpConst16, x.Type)
4914 v1.AuxInt = int16ToAuxInt(c)
4915 v0.AddArg2(x, v1)
4916 v2 := b.NewValue0(v.Pos, OpConst16, x.Type)
4917 v2.AuxInt = int16ToAuxInt(d - c)
4918 v.AddArg2(v0, v2)
4919 return true
4920 }
4921 break
4922 }
4923
4924
4925
4926 for {
4927 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
4928 if v_0.Op != OpLeq8U {
4929 continue
4930 }
4931 x := v_0.Args[1]
4932 v_0_0 := v_0.Args[0]
4933 if v_0_0.Op != OpConst8 {
4934 continue
4935 }
4936 c := auxIntToInt8(v_0_0.AuxInt)
4937 if v_1.Op != OpLess8U {
4938 continue
4939 }
4940 _ = v_1.Args[1]
4941 if x != v_1.Args[0] {
4942 continue
4943 }
4944 v_1_1 := v_1.Args[1]
4945 if v_1_1.Op != OpConst8 {
4946 continue
4947 }
4948 d := auxIntToInt8(v_1_1.AuxInt)
4949 if !(uint8(d) >= uint8(c)) {
4950 continue
4951 }
4952 v.reset(OpLess8U)
4953 v0 := b.NewValue0(v.Pos, OpSub8, x.Type)
4954 v1 := b.NewValue0(v.Pos, OpConst8, x.Type)
4955 v1.AuxInt = int8ToAuxInt(c)
4956 v0.AddArg2(x, v1)
4957 v2 := b.NewValue0(v.Pos, OpConst8, x.Type)
4958 v2.AuxInt = int8ToAuxInt(d - c)
4959 v.AddArg2(v0, v2)
4960 return true
4961 }
4962 break
4963 }
4964
4965
4966
4967 for {
4968 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
4969 if v_0.Op != OpLeq8U {
4970 continue
4971 }
4972 x := v_0.Args[1]
4973 v_0_0 := v_0.Args[0]
4974 if v_0_0.Op != OpConst8 {
4975 continue
4976 }
4977 c := auxIntToInt8(v_0_0.AuxInt)
4978 if v_1.Op != OpLeq8U {
4979 continue
4980 }
4981 _ = v_1.Args[1]
4982 if x != v_1.Args[0] {
4983 continue
4984 }
4985 v_1_1 := v_1.Args[1]
4986 if v_1_1.Op != OpConst8 {
4987 continue
4988 }
4989 d := auxIntToInt8(v_1_1.AuxInt)
4990 if !(uint8(d) >= uint8(c)) {
4991 continue
4992 }
4993 v.reset(OpLeq8U)
4994 v0 := b.NewValue0(v.Pos, OpSub8, x.Type)
4995 v1 := b.NewValue0(v.Pos, OpConst8, x.Type)
4996 v1.AuxInt = int8ToAuxInt(c)
4997 v0.AddArg2(x, v1)
4998 v2 := b.NewValue0(v.Pos, OpConst8, x.Type)
4999 v2.AuxInt = int8ToAuxInt(d - c)
5000 v.AddArg2(v0, v2)
5001 return true
5002 }
5003 break
5004 }
5005
5006
5007
5008 for {
5009 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
5010 if v_0.Op != OpLess64U {
5011 continue
5012 }
5013 x := v_0.Args[1]
5014 v_0_0 := v_0.Args[0]
5015 if v_0_0.Op != OpConst64 {
5016 continue
5017 }
5018 c := auxIntToInt64(v_0_0.AuxInt)
5019 if v_1.Op != OpLess64U {
5020 continue
5021 }
5022 _ = v_1.Args[1]
5023 if x != v_1.Args[0] {
5024 continue
5025 }
5026 v_1_1 := v_1.Args[1]
5027 if v_1_1.Op != OpConst64 {
5028 continue
5029 }
5030 d := auxIntToInt64(v_1_1.AuxInt)
5031 if !(uint64(d) >= uint64(c+1) && uint64(c+1) > uint64(c)) {
5032 continue
5033 }
5034 v.reset(OpLess64U)
5035 v0 := b.NewValue0(v.Pos, OpSub64, x.Type)
5036 v1 := b.NewValue0(v.Pos, OpConst64, x.Type)
5037 v1.AuxInt = int64ToAuxInt(c + 1)
5038 v0.AddArg2(x, v1)
5039 v2 := b.NewValue0(v.Pos, OpConst64, x.Type)
5040 v2.AuxInt = int64ToAuxInt(d - c - 1)
5041 v.AddArg2(v0, v2)
5042 return true
5043 }
5044 break
5045 }
5046
5047
5048
5049 for {
5050 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
5051 if v_0.Op != OpLess64U {
5052 continue
5053 }
5054 x := v_0.Args[1]
5055 v_0_0 := v_0.Args[0]
5056 if v_0_0.Op != OpConst64 {
5057 continue
5058 }
5059 c := auxIntToInt64(v_0_0.AuxInt)
5060 if v_1.Op != OpLeq64U {
5061 continue
5062 }
5063 _ = v_1.Args[1]
5064 if x != v_1.Args[0] {
5065 continue
5066 }
5067 v_1_1 := v_1.Args[1]
5068 if v_1_1.Op != OpConst64 {
5069 continue
5070 }
5071 d := auxIntToInt64(v_1_1.AuxInt)
5072 if !(uint64(d) >= uint64(c+1) && uint64(c+1) > uint64(c)) {
5073 continue
5074 }
5075 v.reset(OpLeq64U)
5076 v0 := b.NewValue0(v.Pos, OpSub64, x.Type)
5077 v1 := b.NewValue0(v.Pos, OpConst64, x.Type)
5078 v1.AuxInt = int64ToAuxInt(c + 1)
5079 v0.AddArg2(x, v1)
5080 v2 := b.NewValue0(v.Pos, OpConst64, x.Type)
5081 v2.AuxInt = int64ToAuxInt(d - c - 1)
5082 v.AddArg2(v0, v2)
5083 return true
5084 }
5085 break
5086 }
5087
5088
5089
5090 for {
5091 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
5092 if v_0.Op != OpLess32U {
5093 continue
5094 }
5095 x := v_0.Args[1]
5096 v_0_0 := v_0.Args[0]
5097 if v_0_0.Op != OpConst32 {
5098 continue
5099 }
5100 c := auxIntToInt32(v_0_0.AuxInt)
5101 if v_1.Op != OpLess32U {
5102 continue
5103 }
5104 _ = v_1.Args[1]
5105 if x != v_1.Args[0] {
5106 continue
5107 }
5108 v_1_1 := v_1.Args[1]
5109 if v_1_1.Op != OpConst32 {
5110 continue
5111 }
5112 d := auxIntToInt32(v_1_1.AuxInt)
5113 if !(uint32(d) >= uint32(c+1) && uint32(c+1) > uint32(c)) {
5114 continue
5115 }
5116 v.reset(OpLess32U)
5117 v0 := b.NewValue0(v.Pos, OpSub32, x.Type)
5118 v1 := b.NewValue0(v.Pos, OpConst32, x.Type)
5119 v1.AuxInt = int32ToAuxInt(c + 1)
5120 v0.AddArg2(x, v1)
5121 v2 := b.NewValue0(v.Pos, OpConst32, x.Type)
5122 v2.AuxInt = int32ToAuxInt(d - c - 1)
5123 v.AddArg2(v0, v2)
5124 return true
5125 }
5126 break
5127 }
5128
5129
5130
5131 for {
5132 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
5133 if v_0.Op != OpLess32U {
5134 continue
5135 }
5136 x := v_0.Args[1]
5137 v_0_0 := v_0.Args[0]
5138 if v_0_0.Op != OpConst32 {
5139 continue
5140 }
5141 c := auxIntToInt32(v_0_0.AuxInt)
5142 if v_1.Op != OpLeq32U {
5143 continue
5144 }
5145 _ = v_1.Args[1]
5146 if x != v_1.Args[0] {
5147 continue
5148 }
5149 v_1_1 := v_1.Args[1]
5150 if v_1_1.Op != OpConst32 {
5151 continue
5152 }
5153 d := auxIntToInt32(v_1_1.AuxInt)
5154 if !(uint32(d) >= uint32(c+1) && uint32(c+1) > uint32(c)) {
5155 continue
5156 }
5157 v.reset(OpLeq32U)
5158 v0 := b.NewValue0(v.Pos, OpSub32, x.Type)
5159 v1 := b.NewValue0(v.Pos, OpConst32, x.Type)
5160 v1.AuxInt = int32ToAuxInt(c + 1)
5161 v0.AddArg2(x, v1)
5162 v2 := b.NewValue0(v.Pos, OpConst32, x.Type)
5163 v2.AuxInt = int32ToAuxInt(d - c - 1)
5164 v.AddArg2(v0, v2)
5165 return true
5166 }
5167 break
5168 }
5169
5170
5171
5172 for {
5173 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
5174 if v_0.Op != OpLess16U {
5175 continue
5176 }
5177 x := v_0.Args[1]
5178 v_0_0 := v_0.Args[0]
5179 if v_0_0.Op != OpConst16 {
5180 continue
5181 }
5182 c := auxIntToInt16(v_0_0.AuxInt)
5183 if v_1.Op != OpLess16U {
5184 continue
5185 }
5186 _ = v_1.Args[1]
5187 if x != v_1.Args[0] {
5188 continue
5189 }
5190 v_1_1 := v_1.Args[1]
5191 if v_1_1.Op != OpConst16 {
5192 continue
5193 }
5194 d := auxIntToInt16(v_1_1.AuxInt)
5195 if !(uint16(d) >= uint16(c+1) && uint16(c+1) > uint16(c)) {
5196 continue
5197 }
5198 v.reset(OpLess16U)
5199 v0 := b.NewValue0(v.Pos, OpSub16, x.Type)
5200 v1 := b.NewValue0(v.Pos, OpConst16, x.Type)
5201 v1.AuxInt = int16ToAuxInt(c + 1)
5202 v0.AddArg2(x, v1)
5203 v2 := b.NewValue0(v.Pos, OpConst16, x.Type)
5204 v2.AuxInt = int16ToAuxInt(d - c - 1)
5205 v.AddArg2(v0, v2)
5206 return true
5207 }
5208 break
5209 }
5210
5211
5212
5213 for {
5214 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
5215 if v_0.Op != OpLess16U {
5216 continue
5217 }
5218 x := v_0.Args[1]
5219 v_0_0 := v_0.Args[0]
5220 if v_0_0.Op != OpConst16 {
5221 continue
5222 }
5223 c := auxIntToInt16(v_0_0.AuxInt)
5224 if v_1.Op != OpLeq16U {
5225 continue
5226 }
5227 _ = v_1.Args[1]
5228 if x != v_1.Args[0] {
5229 continue
5230 }
5231 v_1_1 := v_1.Args[1]
5232 if v_1_1.Op != OpConst16 {
5233 continue
5234 }
5235 d := auxIntToInt16(v_1_1.AuxInt)
5236 if !(uint16(d) >= uint16(c+1) && uint16(c+1) > uint16(c)) {
5237 continue
5238 }
5239 v.reset(OpLeq16U)
5240 v0 := b.NewValue0(v.Pos, OpSub16, x.Type)
5241 v1 := b.NewValue0(v.Pos, OpConst16, x.Type)
5242 v1.AuxInt = int16ToAuxInt(c + 1)
5243 v0.AddArg2(x, v1)
5244 v2 := b.NewValue0(v.Pos, OpConst16, x.Type)
5245 v2.AuxInt = int16ToAuxInt(d - c - 1)
5246 v.AddArg2(v0, v2)
5247 return true
5248 }
5249 break
5250 }
5251
5252
5253
5254 for {
5255 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
5256 if v_0.Op != OpLess8U {
5257 continue
5258 }
5259 x := v_0.Args[1]
5260 v_0_0 := v_0.Args[0]
5261 if v_0_0.Op != OpConst8 {
5262 continue
5263 }
5264 c := auxIntToInt8(v_0_0.AuxInt)
5265 if v_1.Op != OpLess8U {
5266 continue
5267 }
5268 _ = v_1.Args[1]
5269 if x != v_1.Args[0] {
5270 continue
5271 }
5272 v_1_1 := v_1.Args[1]
5273 if v_1_1.Op != OpConst8 {
5274 continue
5275 }
5276 d := auxIntToInt8(v_1_1.AuxInt)
5277 if !(uint8(d) >= uint8(c+1) && uint8(c+1) > uint8(c)) {
5278 continue
5279 }
5280 v.reset(OpLess8U)
5281 v0 := b.NewValue0(v.Pos, OpSub8, x.Type)
5282 v1 := b.NewValue0(v.Pos, OpConst8, x.Type)
5283 v1.AuxInt = int8ToAuxInt(c + 1)
5284 v0.AddArg2(x, v1)
5285 v2 := b.NewValue0(v.Pos, OpConst8, x.Type)
5286 v2.AuxInt = int8ToAuxInt(d - c - 1)
5287 v.AddArg2(v0, v2)
5288 return true
5289 }
5290 break
5291 }
5292
5293
5294
5295 for {
5296 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
5297 if v_0.Op != OpLess8U {
5298 continue
5299 }
5300 x := v_0.Args[1]
5301 v_0_0 := v_0.Args[0]
5302 if v_0_0.Op != OpConst8 {
5303 continue
5304 }
5305 c := auxIntToInt8(v_0_0.AuxInt)
5306 if v_1.Op != OpLeq8U {
5307 continue
5308 }
5309 _ = v_1.Args[1]
5310 if x != v_1.Args[0] {
5311 continue
5312 }
5313 v_1_1 := v_1.Args[1]
5314 if v_1_1.Op != OpConst8 {
5315 continue
5316 }
5317 d := auxIntToInt8(v_1_1.AuxInt)
5318 if !(uint8(d) >= uint8(c+1) && uint8(c+1) > uint8(c)) {
5319 continue
5320 }
5321 v.reset(OpLeq8U)
5322 v0 := b.NewValue0(v.Pos, OpSub8, x.Type)
5323 v1 := b.NewValue0(v.Pos, OpConst8, x.Type)
5324 v1.AuxInt = int8ToAuxInt(c + 1)
5325 v0.AddArg2(x, v1)
5326 v2 := b.NewValue0(v.Pos, OpConst8, x.Type)
5327 v2.AuxInt = int8ToAuxInt(d - c - 1)
5328 v.AddArg2(v0, v2)
5329 return true
5330 }
5331 break
5332 }
5333 return false
5334 }
5335 func rewriteValuegeneric_OpArraySelect(v *Value) bool {
5336 v_0 := v.Args[0]
5337
5338
5339 for {
5340 if v_0.Op != OpArrayMake1 {
5341 break
5342 }
5343 x := v_0.Args[0]
5344 v.copyOf(x)
5345 return true
5346 }
5347
5348
5349 for {
5350 if auxIntToInt64(v.AuxInt) != 0 || v_0.Op != OpIData {
5351 break
5352 }
5353 x := v_0.Args[0]
5354 v.reset(OpIData)
5355 v.AddArg(x)
5356 return true
5357 }
5358 return false
5359 }
5360 func rewriteValuegeneric_OpBitLen16(v *Value) bool {
5361 v_0 := v.Args[0]
5362 b := v.Block
5363 config := b.Func.Config
5364
5365
5366
5367 for {
5368 if v_0.Op != OpConst16 {
5369 break
5370 }
5371 c := auxIntToInt16(v_0.AuxInt)
5372 if !(config.PtrSize == 8) {
5373 break
5374 }
5375 v.reset(OpConst64)
5376 v.AuxInt = int64ToAuxInt(int64(bits.Len16(uint16(c))))
5377 return true
5378 }
5379
5380
5381
5382 for {
5383 if v_0.Op != OpConst16 {
5384 break
5385 }
5386 c := auxIntToInt16(v_0.AuxInt)
5387 if !(config.PtrSize == 4) {
5388 break
5389 }
5390 v.reset(OpConst32)
5391 v.AuxInt = int32ToAuxInt(int32(bits.Len16(uint16(c))))
5392 return true
5393 }
5394 return false
5395 }
5396 func rewriteValuegeneric_OpBitLen32(v *Value) bool {
5397 v_0 := v.Args[0]
5398 b := v.Block
5399 config := b.Func.Config
5400
5401
5402
5403 for {
5404 if v_0.Op != OpConst32 {
5405 break
5406 }
5407 c := auxIntToInt32(v_0.AuxInt)
5408 if !(config.PtrSize == 8) {
5409 break
5410 }
5411 v.reset(OpConst64)
5412 v.AuxInt = int64ToAuxInt(int64(bits.Len32(uint32(c))))
5413 return true
5414 }
5415
5416
5417
5418 for {
5419 if v_0.Op != OpConst32 {
5420 break
5421 }
5422 c := auxIntToInt32(v_0.AuxInt)
5423 if !(config.PtrSize == 4) {
5424 break
5425 }
5426 v.reset(OpConst32)
5427 v.AuxInt = int32ToAuxInt(int32(bits.Len32(uint32(c))))
5428 return true
5429 }
5430 return false
5431 }
5432 func rewriteValuegeneric_OpBitLen64(v *Value) bool {
5433 v_0 := v.Args[0]
5434 b := v.Block
5435 config := b.Func.Config
5436
5437
5438
5439 for {
5440 if v_0.Op != OpConst64 {
5441 break
5442 }
5443 c := auxIntToInt64(v_0.AuxInt)
5444 if !(config.PtrSize == 8) {
5445 break
5446 }
5447 v.reset(OpConst64)
5448 v.AuxInt = int64ToAuxInt(int64(bits.Len64(uint64(c))))
5449 return true
5450 }
5451
5452
5453
5454 for {
5455 if v_0.Op != OpConst64 {
5456 break
5457 }
5458 c := auxIntToInt64(v_0.AuxInt)
5459 if !(config.PtrSize == 4) {
5460 break
5461 }
5462 v.reset(OpConst32)
5463 v.AuxInt = int32ToAuxInt(int32(bits.Len64(uint64(c))))
5464 return true
5465 }
5466 return false
5467 }
5468 func rewriteValuegeneric_OpBitLen8(v *Value) bool {
5469 v_0 := v.Args[0]
5470 b := v.Block
5471 config := b.Func.Config
5472
5473
5474
5475 for {
5476 if v_0.Op != OpConst8 {
5477 break
5478 }
5479 c := auxIntToInt8(v_0.AuxInt)
5480 if !(config.PtrSize == 8) {
5481 break
5482 }
5483 v.reset(OpConst64)
5484 v.AuxInt = int64ToAuxInt(int64(bits.Len8(uint8(c))))
5485 return true
5486 }
5487
5488
5489
5490 for {
5491 if v_0.Op != OpConst8 {
5492 break
5493 }
5494 c := auxIntToInt8(v_0.AuxInt)
5495 if !(config.PtrSize == 4) {
5496 break
5497 }
5498 v.reset(OpConst32)
5499 v.AuxInt = int32ToAuxInt(int32(bits.Len8(uint8(c))))
5500 return true
5501 }
5502 return false
5503 }
5504 func rewriteValuegeneric_OpCeil(v *Value) bool {
5505 v_0 := v.Args[0]
5506
5507
5508 for {
5509 if v_0.Op != OpConst64F {
5510 break
5511 }
5512 c := auxIntToFloat64(v_0.AuxInt)
5513 v.reset(OpConst64F)
5514 v.AuxInt = float64ToAuxInt(math.Ceil(c))
5515 return true
5516 }
5517 return false
5518 }
5519 func rewriteValuegeneric_OpCom16(v *Value) bool {
5520 v_0 := v.Args[0]
5521
5522
5523 for {
5524 if v_0.Op != OpCom16 {
5525 break
5526 }
5527 x := v_0.Args[0]
5528 v.copyOf(x)
5529 return true
5530 }
5531
5532
5533 for {
5534 if v_0.Op != OpConst16 {
5535 break
5536 }
5537 c := auxIntToInt16(v_0.AuxInt)
5538 v.reset(OpConst16)
5539 v.AuxInt = int16ToAuxInt(^c)
5540 return true
5541 }
5542
5543
5544 for {
5545 if v_0.Op != OpAdd16 {
5546 break
5547 }
5548 _ = v_0.Args[1]
5549 v_0_0 := v_0.Args[0]
5550 v_0_1 := v_0.Args[1]
5551 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
5552 if v_0_0.Op != OpConst16 || auxIntToInt16(v_0_0.AuxInt) != -1 {
5553 continue
5554 }
5555 x := v_0_1
5556 v.reset(OpNeg16)
5557 v.AddArg(x)
5558 return true
5559 }
5560 break
5561 }
5562 return false
5563 }
5564 func rewriteValuegeneric_OpCom32(v *Value) bool {
5565 v_0 := v.Args[0]
5566
5567
5568 for {
5569 if v_0.Op != OpCom32 {
5570 break
5571 }
5572 x := v_0.Args[0]
5573 v.copyOf(x)
5574 return true
5575 }
5576
5577
5578 for {
5579 if v_0.Op != OpConst32 {
5580 break
5581 }
5582 c := auxIntToInt32(v_0.AuxInt)
5583 v.reset(OpConst32)
5584 v.AuxInt = int32ToAuxInt(^c)
5585 return true
5586 }
5587
5588
5589 for {
5590 if v_0.Op != OpAdd32 {
5591 break
5592 }
5593 _ = v_0.Args[1]
5594 v_0_0 := v_0.Args[0]
5595 v_0_1 := v_0.Args[1]
5596 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
5597 if v_0_0.Op != OpConst32 || auxIntToInt32(v_0_0.AuxInt) != -1 {
5598 continue
5599 }
5600 x := v_0_1
5601 v.reset(OpNeg32)
5602 v.AddArg(x)
5603 return true
5604 }
5605 break
5606 }
5607 return false
5608 }
5609 func rewriteValuegeneric_OpCom64(v *Value) bool {
5610 v_0 := v.Args[0]
5611
5612
5613 for {
5614 if v_0.Op != OpCom64 {
5615 break
5616 }
5617 x := v_0.Args[0]
5618 v.copyOf(x)
5619 return true
5620 }
5621
5622
5623 for {
5624 if v_0.Op != OpConst64 {
5625 break
5626 }
5627 c := auxIntToInt64(v_0.AuxInt)
5628 v.reset(OpConst64)
5629 v.AuxInt = int64ToAuxInt(^c)
5630 return true
5631 }
5632
5633
5634 for {
5635 if v_0.Op != OpAdd64 {
5636 break
5637 }
5638 _ = v_0.Args[1]
5639 v_0_0 := v_0.Args[0]
5640 v_0_1 := v_0.Args[1]
5641 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
5642 if v_0_0.Op != OpConst64 || auxIntToInt64(v_0_0.AuxInt) != -1 {
5643 continue
5644 }
5645 x := v_0_1
5646 v.reset(OpNeg64)
5647 v.AddArg(x)
5648 return true
5649 }
5650 break
5651 }
5652 return false
5653 }
5654 func rewriteValuegeneric_OpCom8(v *Value) bool {
5655 v_0 := v.Args[0]
5656
5657
5658 for {
5659 if v_0.Op != OpCom8 {
5660 break
5661 }
5662 x := v_0.Args[0]
5663 v.copyOf(x)
5664 return true
5665 }
5666
5667
5668 for {
5669 if v_0.Op != OpConst8 {
5670 break
5671 }
5672 c := auxIntToInt8(v_0.AuxInt)
5673 v.reset(OpConst8)
5674 v.AuxInt = int8ToAuxInt(^c)
5675 return true
5676 }
5677
5678
5679 for {
5680 if v_0.Op != OpAdd8 {
5681 break
5682 }
5683 _ = v_0.Args[1]
5684 v_0_0 := v_0.Args[0]
5685 v_0_1 := v_0.Args[1]
5686 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
5687 if v_0_0.Op != OpConst8 || auxIntToInt8(v_0_0.AuxInt) != -1 {
5688 continue
5689 }
5690 x := v_0_1
5691 v.reset(OpNeg8)
5692 v.AddArg(x)
5693 return true
5694 }
5695 break
5696 }
5697 return false
5698 }
5699 func rewriteValuegeneric_OpCondSelect(v *Value) bool {
5700 v_2 := v.Args[2]
5701 v_1 := v.Args[1]
5702 v_0 := v.Args[0]
5703 b := v.Block
5704 config := b.Func.Config
5705
5706
5707 for {
5708 x := v_0
5709 if v_2.Op != OpConstBool || auxIntToBool(v_2.AuxInt) != true {
5710 break
5711 }
5712 v.copyOf(x)
5713 return true
5714 }
5715
5716
5717 for {
5718 y := v_1
5719 if v_2.Op != OpConstBool || auxIntToBool(v_2.AuxInt) != false {
5720 break
5721 }
5722 v.copyOf(y)
5723 return true
5724 }
5725
5726
5727
5728 for {
5729 if v_0.Op != OpAdd8 {
5730 break
5731 }
5732 t := v_0.Type
5733 _ = v_0.Args[1]
5734 v_0_0 := v_0.Args[0]
5735 v_0_1 := v_0.Args[1]
5736 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
5737 x := v_0_0
5738 if v_0_1.Op != OpConst8 || auxIntToInt8(v_0_1.AuxInt) != 1 || x != v_1 {
5739 continue
5740 }
5741 bool := v_2
5742 if !(config.arch != "arm64") {
5743 continue
5744 }
5745 v.reset(OpAdd8)
5746 v0 := b.NewValue0(v.Pos, OpCvtBoolToUint8, t)
5747 v0.AddArg(bool)
5748 v.AddArg2(x, v0)
5749 return true
5750 }
5751 break
5752 }
5753
5754
5755
5756 for {
5757 if v_0.Op != OpAdd64 {
5758 break
5759 }
5760 t := v_0.Type
5761 _ = v_0.Args[1]
5762 v_0_0 := v_0.Args[0]
5763 v_0_1 := v_0.Args[1]
5764 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
5765 x := v_0_0
5766 if v_0_1.Op != OpConst64 || auxIntToInt64(v_0_1.AuxInt) != 1 || x != v_1 {
5767 continue
5768 }
5769 bool := v_2
5770 if !(config.arch != "arm64") {
5771 continue
5772 }
5773 v.reset(OpAdd64)
5774 v0 := b.NewValue0(v.Pos, OpZeroExt8to64, t)
5775 v1 := b.NewValue0(v.Pos, OpCvtBoolToUint8, types.Types[types.TUINT8])
5776 v1.AddArg(bool)
5777 v0.AddArg(v1)
5778 v.AddArg2(x, v0)
5779 return true
5780 }
5781 break
5782 }
5783
5784
5785
5786 for {
5787 if v_0.Op != OpAdd32 {
5788 break
5789 }
5790 t := v_0.Type
5791 _ = v_0.Args[1]
5792 v_0_0 := v_0.Args[0]
5793 v_0_1 := v_0.Args[1]
5794 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
5795 x := v_0_0
5796 if v_0_1.Op != OpConst32 || auxIntToInt32(v_0_1.AuxInt) != 1 || x != v_1 {
5797 continue
5798 }
5799 bool := v_2
5800 if !(config.arch != "arm64") {
5801 continue
5802 }
5803 v.reset(OpAdd32)
5804 v0 := b.NewValue0(v.Pos, OpZeroExt8to32, t)
5805 v1 := b.NewValue0(v.Pos, OpCvtBoolToUint8, types.Types[types.TUINT8])
5806 v1.AddArg(bool)
5807 v0.AddArg(v1)
5808 v.AddArg2(x, v0)
5809 return true
5810 }
5811 break
5812 }
5813
5814
5815
5816 for {
5817 if v_0.Op != OpAdd16 {
5818 break
5819 }
5820 t := v_0.Type
5821 _ = v_0.Args[1]
5822 v_0_0 := v_0.Args[0]
5823 v_0_1 := v_0.Args[1]
5824 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
5825 x := v_0_0
5826 if v_0_1.Op != OpConst16 || auxIntToInt16(v_0_1.AuxInt) != 1 || x != v_1 {
5827 continue
5828 }
5829 bool := v_2
5830 if !(config.arch != "arm64") {
5831 continue
5832 }
5833 v.reset(OpAdd16)
5834 v0 := b.NewValue0(v.Pos, OpZeroExt8to16, t)
5835 v1 := b.NewValue0(v.Pos, OpCvtBoolToUint8, types.Types[types.TUINT8])
5836 v1.AddArg(bool)
5837 v0.AddArg(v1)
5838 v.AddArg2(x, v0)
5839 return true
5840 }
5841 break
5842 }
5843
5844
5845 for {
5846 if v_0.Op != OpAdd8 {
5847 break
5848 }
5849 t := v_0.Type
5850 _ = v_0.Args[1]
5851 v_0_0 := v_0.Args[0]
5852 v_0_1 := v_0.Args[1]
5853 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
5854 x := v_0_0
5855 if v_0_1.Op != OpConst8 || auxIntToInt8(v_0_1.AuxInt) != -1 || x != v_1 {
5856 continue
5857 }
5858 bool := v_2
5859 v.reset(OpSub8)
5860 v0 := b.NewValue0(v.Pos, OpCvtBoolToUint8, t)
5861 v0.AddArg(bool)
5862 v.AddArg2(x, v0)
5863 return true
5864 }
5865 break
5866 }
5867
5868
5869 for {
5870 if v_0.Op != OpAdd64 {
5871 break
5872 }
5873 t := v_0.Type
5874 _ = v_0.Args[1]
5875 v_0_0 := v_0.Args[0]
5876 v_0_1 := v_0.Args[1]
5877 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
5878 x := v_0_0
5879 if v_0_1.Op != OpConst64 || auxIntToInt64(v_0_1.AuxInt) != -1 || x != v_1 {
5880 continue
5881 }
5882 bool := v_2
5883 v.reset(OpSub64)
5884 v0 := b.NewValue0(v.Pos, OpZeroExt8to64, t)
5885 v1 := b.NewValue0(v.Pos, OpCvtBoolToUint8, types.Types[types.TUINT8])
5886 v1.AddArg(bool)
5887 v0.AddArg(v1)
5888 v.AddArg2(x, v0)
5889 return true
5890 }
5891 break
5892 }
5893
5894
5895 for {
5896 if v_0.Op != OpAdd32 {
5897 break
5898 }
5899 t := v_0.Type
5900 _ = v_0.Args[1]
5901 v_0_0 := v_0.Args[0]
5902 v_0_1 := v_0.Args[1]
5903 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
5904 x := v_0_0
5905 if v_0_1.Op != OpConst32 || auxIntToInt32(v_0_1.AuxInt) != -1 || x != v_1 {
5906 continue
5907 }
5908 bool := v_2
5909 v.reset(OpSub32)
5910 v0 := b.NewValue0(v.Pos, OpZeroExt8to32, t)
5911 v1 := b.NewValue0(v.Pos, OpCvtBoolToUint8, types.Types[types.TUINT8])
5912 v1.AddArg(bool)
5913 v0.AddArg(v1)
5914 v.AddArg2(x, v0)
5915 return true
5916 }
5917 break
5918 }
5919
5920
5921 for {
5922 if v_0.Op != OpAdd16 {
5923 break
5924 }
5925 t := v_0.Type
5926 _ = v_0.Args[1]
5927 v_0_0 := v_0.Args[0]
5928 v_0_1 := v_0.Args[1]
5929 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
5930 x := v_0_0
5931 if v_0_1.Op != OpConst16 || auxIntToInt16(v_0_1.AuxInt) != -1 || x != v_1 {
5932 continue
5933 }
5934 bool := v_2
5935 v.reset(OpSub16)
5936 v0 := b.NewValue0(v.Pos, OpZeroExt8to16, t)
5937 v1 := b.NewValue0(v.Pos, OpCvtBoolToUint8, types.Types[types.TUINT8])
5938 v1.AddArg(bool)
5939 v0.AddArg(v1)
5940 v.AddArg2(x, v0)
5941 return true
5942 }
5943 break
5944 }
5945
5946
5947 for {
5948 if v_0.Op != OpLsh64x64 {
5949 break
5950 }
5951 _ = v_0.Args[1]
5952 x := v_0.Args[0]
5953 v_0_1 := v_0.Args[1]
5954 if v_0_1.Op != OpConst64 || auxIntToInt64(v_0_1.AuxInt) != 1 || x != v_1 {
5955 break
5956 }
5957 bool := v_2
5958 v.reset(OpLsh64x8)
5959 v.AuxInt = boolToAuxInt(true)
5960 v0 := b.NewValue0(v.Pos, OpCvtBoolToUint8, types.Types[types.TUINT8])
5961 v0.AddArg(bool)
5962 v.AddArg2(x, v0)
5963 return true
5964 }
5965
5966
5967 for {
5968 if v_0.Op != OpLsh32x64 {
5969 break
5970 }
5971 _ = v_0.Args[1]
5972 x := v_0.Args[0]
5973 v_0_1 := v_0.Args[1]
5974 if v_0_1.Op != OpConst64 || auxIntToInt64(v_0_1.AuxInt) != 1 || x != v_1 {
5975 break
5976 }
5977 bool := v_2
5978 v.reset(OpLsh32x8)
5979 v.AuxInt = boolToAuxInt(true)
5980 v0 := b.NewValue0(v.Pos, OpCvtBoolToUint8, types.Types[types.TUINT8])
5981 v0.AddArg(bool)
5982 v.AddArg2(x, v0)
5983 return true
5984 }
5985
5986
5987 for {
5988 if v_0.Op != OpLsh16x64 {
5989 break
5990 }
5991 _ = v_0.Args[1]
5992 x := v_0.Args[0]
5993 v_0_1 := v_0.Args[1]
5994 if v_0_1.Op != OpConst64 || auxIntToInt64(v_0_1.AuxInt) != 1 || x != v_1 {
5995 break
5996 }
5997 bool := v_2
5998 v.reset(OpLsh16x8)
5999 v.AuxInt = boolToAuxInt(true)
6000 v0 := b.NewValue0(v.Pos, OpCvtBoolToUint8, types.Types[types.TUINT8])
6001 v0.AddArg(bool)
6002 v.AddArg2(x, v0)
6003 return true
6004 }
6005
6006
6007 for {
6008 if v_0.Op != OpLsh8x64 {
6009 break
6010 }
6011 _ = v_0.Args[1]
6012 x := v_0.Args[0]
6013 v_0_1 := v_0.Args[1]
6014 if v_0_1.Op != OpConst64 || auxIntToInt64(v_0_1.AuxInt) != 1 || x != v_1 {
6015 break
6016 }
6017 bool := v_2
6018 v.reset(OpLsh8x8)
6019 v.AuxInt = boolToAuxInt(true)
6020 v0 := b.NewValue0(v.Pos, OpCvtBoolToUint8, types.Types[types.TUINT8])
6021 v0.AddArg(bool)
6022 v.AddArg2(x, v0)
6023 return true
6024 }
6025
6026
6027 for {
6028 if v_0.Op != OpRsh64x64 {
6029 break
6030 }
6031 _ = v_0.Args[1]
6032 x := v_0.Args[0]
6033 v_0_1 := v_0.Args[1]
6034 if v_0_1.Op != OpConst64 || auxIntToInt64(v_0_1.AuxInt) != 1 || x != v_1 {
6035 break
6036 }
6037 bool := v_2
6038 v.reset(OpRsh64x8)
6039 v.AuxInt = boolToAuxInt(true)
6040 v0 := b.NewValue0(v.Pos, OpCvtBoolToUint8, types.Types[types.TUINT8])
6041 v0.AddArg(bool)
6042 v.AddArg2(x, v0)
6043 return true
6044 }
6045
6046
6047 for {
6048 if v_0.Op != OpRsh32x64 {
6049 break
6050 }
6051 _ = v_0.Args[1]
6052 x := v_0.Args[0]
6053 v_0_1 := v_0.Args[1]
6054 if v_0_1.Op != OpConst64 || auxIntToInt64(v_0_1.AuxInt) != 1 || x != v_1 {
6055 break
6056 }
6057 bool := v_2
6058 v.reset(OpRsh32x8)
6059 v.AuxInt = boolToAuxInt(true)
6060 v0 := b.NewValue0(v.Pos, OpCvtBoolToUint8, types.Types[types.TUINT8])
6061 v0.AddArg(bool)
6062 v.AddArg2(x, v0)
6063 return true
6064 }
6065
6066
6067 for {
6068 if v_0.Op != OpRsh16x64 {
6069 break
6070 }
6071 _ = v_0.Args[1]
6072 x := v_0.Args[0]
6073 v_0_1 := v_0.Args[1]
6074 if v_0_1.Op != OpConst64 || auxIntToInt64(v_0_1.AuxInt) != 1 || x != v_1 {
6075 break
6076 }
6077 bool := v_2
6078 v.reset(OpRsh16x8)
6079 v.AuxInt = boolToAuxInt(true)
6080 v0 := b.NewValue0(v.Pos, OpCvtBoolToUint8, types.Types[types.TUINT8])
6081 v0.AddArg(bool)
6082 v.AddArg2(x, v0)
6083 return true
6084 }
6085
6086
6087 for {
6088 if v_0.Op != OpRsh8x64 {
6089 break
6090 }
6091 _ = v_0.Args[1]
6092 x := v_0.Args[0]
6093 v_0_1 := v_0.Args[1]
6094 if v_0_1.Op != OpConst64 || auxIntToInt64(v_0_1.AuxInt) != 1 || x != v_1 {
6095 break
6096 }
6097 bool := v_2
6098 v.reset(OpRsh8x8)
6099 v.AuxInt = boolToAuxInt(true)
6100 v0 := b.NewValue0(v.Pos, OpCvtBoolToUint8, types.Types[types.TUINT8])
6101 v0.AddArg(bool)
6102 v.AddArg2(x, v0)
6103 return true
6104 }
6105
6106
6107 for {
6108 if v_0.Op != OpRsh64Ux64 {
6109 break
6110 }
6111 _ = v_0.Args[1]
6112 x := v_0.Args[0]
6113 v_0_1 := v_0.Args[1]
6114 if v_0_1.Op != OpConst64 || auxIntToInt64(v_0_1.AuxInt) != 1 || x != v_1 {
6115 break
6116 }
6117 bool := v_2
6118 v.reset(OpRsh64Ux8)
6119 v.AuxInt = boolToAuxInt(true)
6120 v0 := b.NewValue0(v.Pos, OpCvtBoolToUint8, types.Types[types.TUINT8])
6121 v0.AddArg(bool)
6122 v.AddArg2(x, v0)
6123 return true
6124 }
6125
6126
6127 for {
6128 if v_0.Op != OpRsh32Ux64 {
6129 break
6130 }
6131 _ = v_0.Args[1]
6132 x := v_0.Args[0]
6133 v_0_1 := v_0.Args[1]
6134 if v_0_1.Op != OpConst64 || auxIntToInt64(v_0_1.AuxInt) != 1 || x != v_1 {
6135 break
6136 }
6137 bool := v_2
6138 v.reset(OpRsh32Ux8)
6139 v.AuxInt = boolToAuxInt(true)
6140 v0 := b.NewValue0(v.Pos, OpCvtBoolToUint8, types.Types[types.TUINT8])
6141 v0.AddArg(bool)
6142 v.AddArg2(x, v0)
6143 return true
6144 }
6145
6146
6147 for {
6148 if v_0.Op != OpRsh16Ux64 {
6149 break
6150 }
6151 _ = v_0.Args[1]
6152 x := v_0.Args[0]
6153 v_0_1 := v_0.Args[1]
6154 if v_0_1.Op != OpConst64 || auxIntToInt64(v_0_1.AuxInt) != 1 || x != v_1 {
6155 break
6156 }
6157 bool := v_2
6158 v.reset(OpRsh16Ux8)
6159 v.AuxInt = boolToAuxInt(true)
6160 v0 := b.NewValue0(v.Pos, OpCvtBoolToUint8, types.Types[types.TUINT8])
6161 v0.AddArg(bool)
6162 v.AddArg2(x, v0)
6163 return true
6164 }
6165
6166
6167 for {
6168 if v_0.Op != OpRsh8Ux64 {
6169 break
6170 }
6171 _ = v_0.Args[1]
6172 x := v_0.Args[0]
6173 v_0_1 := v_0.Args[1]
6174 if v_0_1.Op != OpConst64 || auxIntToInt64(v_0_1.AuxInt) != 1 || x != v_1 {
6175 break
6176 }
6177 bool := v_2
6178 v.reset(OpRsh8Ux8)
6179 v.AuxInt = boolToAuxInt(true)
6180 v0 := b.NewValue0(v.Pos, OpCvtBoolToUint8, types.Types[types.TUINT8])
6181 v0.AddArg(bool)
6182 v.AddArg2(x, v0)
6183 return true
6184 }
6185 return false
6186 }
6187 func rewriteValuegeneric_OpConstInterface(v *Value) bool {
6188 b := v.Block
6189 typ := &b.Func.Config.Types
6190
6191
6192 for {
6193 v.reset(OpIMake)
6194 v0 := b.NewValue0(v.Pos, OpConstNil, typ.Uintptr)
6195 v1 := b.NewValue0(v.Pos, OpConstNil, typ.BytePtr)
6196 v.AddArg2(v0, v1)
6197 return true
6198 }
6199 }
6200 func rewriteValuegeneric_OpConstSlice(v *Value) bool {
6201 b := v.Block
6202 config := b.Func.Config
6203 typ := &b.Func.Config.Types
6204
6205
6206
6207 for {
6208 if !(config.PtrSize == 4) {
6209 break
6210 }
6211 v.reset(OpSliceMake)
6212 v0 := b.NewValue0(v.Pos, OpConstNil, v.Type.Elem().PtrTo())
6213 v1 := b.NewValue0(v.Pos, OpConst32, typ.Int)
6214 v1.AuxInt = int32ToAuxInt(0)
6215 v.AddArg3(v0, v1, v1)
6216 return true
6217 }
6218
6219
6220
6221 for {
6222 if !(config.PtrSize == 8) {
6223 break
6224 }
6225 v.reset(OpSliceMake)
6226 v0 := b.NewValue0(v.Pos, OpConstNil, v.Type.Elem().PtrTo())
6227 v1 := b.NewValue0(v.Pos, OpConst64, typ.Int)
6228 v1.AuxInt = int64ToAuxInt(0)
6229 v.AddArg3(v0, v1, v1)
6230 return true
6231 }
6232 return false
6233 }
6234 func rewriteValuegeneric_OpConstString(v *Value) bool {
6235 b := v.Block
6236 config := b.Func.Config
6237 fe := b.Func.fe
6238 typ := &b.Func.Config.Types
6239
6240
6241
6242 for {
6243 str := auxToString(v.Aux)
6244 if !(config.PtrSize == 4 && str == "") {
6245 break
6246 }
6247 v.reset(OpStringMake)
6248 v0 := b.NewValue0(v.Pos, OpConstNil, typ.BytePtr)
6249 v1 := b.NewValue0(v.Pos, OpConst32, typ.Int)
6250 v1.AuxInt = int32ToAuxInt(0)
6251 v.AddArg2(v0, v1)
6252 return true
6253 }
6254
6255
6256
6257 for {
6258 str := auxToString(v.Aux)
6259 if !(config.PtrSize == 8 && str == "") {
6260 break
6261 }
6262 v.reset(OpStringMake)
6263 v0 := b.NewValue0(v.Pos, OpConstNil, typ.BytePtr)
6264 v1 := b.NewValue0(v.Pos, OpConst64, typ.Int)
6265 v1.AuxInt = int64ToAuxInt(0)
6266 v.AddArg2(v0, v1)
6267 return true
6268 }
6269
6270
6271
6272 for {
6273 str := auxToString(v.Aux)
6274 if !(config.PtrSize == 4 && str != "") {
6275 break
6276 }
6277 v.reset(OpStringMake)
6278 v0 := b.NewValue0(v.Pos, OpAddr, typ.BytePtr)
6279 v0.Aux = symToAux(fe.StringData(str))
6280 v1 := b.NewValue0(v.Pos, OpSB, typ.Uintptr)
6281 v0.AddArg(v1)
6282 v2 := b.NewValue0(v.Pos, OpConst32, typ.Int)
6283 v2.AuxInt = int32ToAuxInt(int32(len(str)))
6284 v.AddArg2(v0, v2)
6285 return true
6286 }
6287
6288
6289
6290 for {
6291 str := auxToString(v.Aux)
6292 if !(config.PtrSize == 8 && str != "") {
6293 break
6294 }
6295 v.reset(OpStringMake)
6296 v0 := b.NewValue0(v.Pos, OpAddr, typ.BytePtr)
6297 v0.Aux = symToAux(fe.StringData(str))
6298 v1 := b.NewValue0(v.Pos, OpSB, typ.Uintptr)
6299 v0.AddArg(v1)
6300 v2 := b.NewValue0(v.Pos, OpConst64, typ.Int)
6301 v2.AuxInt = int64ToAuxInt(int64(len(str)))
6302 v.AddArg2(v0, v2)
6303 return true
6304 }
6305 return false
6306 }
6307 func rewriteValuegeneric_OpConvert(v *Value) bool {
6308 v_1 := v.Args[1]
6309 v_0 := v.Args[0]
6310 b := v.Block
6311
6312
6313 for {
6314 if v_0.Op != OpAdd64 {
6315 break
6316 }
6317 _ = v_0.Args[1]
6318 v_0_0 := v_0.Args[0]
6319 v_0_1 := v_0.Args[1]
6320 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
6321 if v_0_0.Op != OpConvert {
6322 continue
6323 }
6324 mem := v_0_0.Args[1]
6325 ptr := v_0_0.Args[0]
6326 off := v_0_1
6327 if mem != v_1 {
6328 continue
6329 }
6330 v.reset(OpAddPtr)
6331 v.AddArg2(ptr, off)
6332 return true
6333 }
6334 break
6335 }
6336
6337
6338 for {
6339 if v_0.Op != OpAdd32 {
6340 break
6341 }
6342 _ = v_0.Args[1]
6343 v_0_0 := v_0.Args[0]
6344 v_0_1 := v_0.Args[1]
6345 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
6346 if v_0_0.Op != OpConvert {
6347 continue
6348 }
6349 mem := v_0_0.Args[1]
6350 ptr := v_0_0.Args[0]
6351 off := v_0_1
6352 if mem != v_1 {
6353 continue
6354 }
6355 v.reset(OpAddPtr)
6356 v.AddArg2(ptr, off)
6357 return true
6358 }
6359 break
6360 }
6361
6362
6363 for {
6364 if v_0.Op != OpConvert {
6365 break
6366 }
6367 mem := v_0.Args[1]
6368 ptr := v_0.Args[0]
6369 if mem != v_1 {
6370 break
6371 }
6372 v.copyOf(ptr)
6373 return true
6374 }
6375
6376
6377 for {
6378 a := v_0
6379 if a.Op != OpAdd64 {
6380 break
6381 }
6382 _ = a.Args[1]
6383 a_0 := a.Args[0]
6384 a_1 := a.Args[1]
6385 for _i0 := 0; _i0 <= 1; _i0, a_0, a_1 = _i0+1, a_1, a_0 {
6386 if a_0.Op != OpAdd64 {
6387 continue
6388 }
6389 _ = a_0.Args[1]
6390 a_0_0 := a_0.Args[0]
6391 a_0_1 := a_0.Args[1]
6392 for _i1 := 0; _i1 <= 1; _i1, a_0_0, a_0_1 = _i1+1, a_0_1, a_0_0 {
6393 if a_0_0.Op != OpConvert {
6394 continue
6395 }
6396 mem := a_0_0.Args[1]
6397 ptr := a_0_0.Args[0]
6398 off1 := a_0_1
6399 off2 := a_1
6400 if mem != v_1 {
6401 continue
6402 }
6403 v.reset(OpAddPtr)
6404 v0 := b.NewValue0(v.Pos, OpAdd64, a.Type)
6405 v0.AddArg2(off1, off2)
6406 v.AddArg2(ptr, v0)
6407 return true
6408 }
6409 }
6410 break
6411 }
6412
6413
6414 for {
6415 a := v_0
6416 if a.Op != OpAdd32 {
6417 break
6418 }
6419 _ = a.Args[1]
6420 a_0 := a.Args[0]
6421 a_1 := a.Args[1]
6422 for _i0 := 0; _i0 <= 1; _i0, a_0, a_1 = _i0+1, a_1, a_0 {
6423 if a_0.Op != OpAdd32 {
6424 continue
6425 }
6426 _ = a_0.Args[1]
6427 a_0_0 := a_0.Args[0]
6428 a_0_1 := a_0.Args[1]
6429 for _i1 := 0; _i1 <= 1; _i1, a_0_0, a_0_1 = _i1+1, a_0_1, a_0_0 {
6430 if a_0_0.Op != OpConvert {
6431 continue
6432 }
6433 mem := a_0_0.Args[1]
6434 ptr := a_0_0.Args[0]
6435 off1 := a_0_1
6436 off2 := a_1
6437 if mem != v_1 {
6438 continue
6439 }
6440 v.reset(OpAddPtr)
6441 v0 := b.NewValue0(v.Pos, OpAdd32, a.Type)
6442 v0.AddArg2(off1, off2)
6443 v.AddArg2(ptr, v0)
6444 return true
6445 }
6446 }
6447 break
6448 }
6449 return false
6450 }
6451 func rewriteValuegeneric_OpCtz16(v *Value) bool {
6452 v_0 := v.Args[0]
6453 b := v.Block
6454 config := b.Func.Config
6455
6456
6457
6458 for {
6459 if v_0.Op != OpConst16 {
6460 break
6461 }
6462 c := auxIntToInt16(v_0.AuxInt)
6463 if !(config.PtrSize == 4) {
6464 break
6465 }
6466 v.reset(OpConst32)
6467 v.AuxInt = int32ToAuxInt(int32(ntz16(c)))
6468 return true
6469 }
6470
6471
6472
6473 for {
6474 if v_0.Op != OpConst16 {
6475 break
6476 }
6477 c := auxIntToInt16(v_0.AuxInt)
6478 if !(config.PtrSize == 8) {
6479 break
6480 }
6481 v.reset(OpConst64)
6482 v.AuxInt = int64ToAuxInt(int64(ntz16(c)))
6483 return true
6484 }
6485 return false
6486 }
6487 func rewriteValuegeneric_OpCtz32(v *Value) bool {
6488 v_0 := v.Args[0]
6489 b := v.Block
6490 config := b.Func.Config
6491
6492
6493
6494 for {
6495 if v_0.Op != OpConst32 {
6496 break
6497 }
6498 c := auxIntToInt32(v_0.AuxInt)
6499 if !(config.PtrSize == 4) {
6500 break
6501 }
6502 v.reset(OpConst32)
6503 v.AuxInt = int32ToAuxInt(int32(ntz32(c)))
6504 return true
6505 }
6506
6507
6508
6509 for {
6510 if v_0.Op != OpConst32 {
6511 break
6512 }
6513 c := auxIntToInt32(v_0.AuxInt)
6514 if !(config.PtrSize == 8) {
6515 break
6516 }
6517 v.reset(OpConst64)
6518 v.AuxInt = int64ToAuxInt(int64(ntz32(c)))
6519 return true
6520 }
6521 return false
6522 }
6523 func rewriteValuegeneric_OpCtz64(v *Value) bool {
6524 v_0 := v.Args[0]
6525 b := v.Block
6526 config := b.Func.Config
6527
6528
6529
6530 for {
6531 if v_0.Op != OpConst64 {
6532 break
6533 }
6534 c := auxIntToInt64(v_0.AuxInt)
6535 if !(config.PtrSize == 4) {
6536 break
6537 }
6538 v.reset(OpConst32)
6539 v.AuxInt = int32ToAuxInt(int32(ntz64(c)))
6540 return true
6541 }
6542
6543
6544
6545 for {
6546 if v_0.Op != OpConst64 {
6547 break
6548 }
6549 c := auxIntToInt64(v_0.AuxInt)
6550 if !(config.PtrSize == 8) {
6551 break
6552 }
6553 v.reset(OpConst64)
6554 v.AuxInt = int64ToAuxInt(int64(ntz64(c)))
6555 return true
6556 }
6557 return false
6558 }
6559 func rewriteValuegeneric_OpCtz8(v *Value) bool {
6560 v_0 := v.Args[0]
6561 b := v.Block
6562 config := b.Func.Config
6563
6564
6565
6566 for {
6567 if v_0.Op != OpConst8 {
6568 break
6569 }
6570 c := auxIntToInt8(v_0.AuxInt)
6571 if !(config.PtrSize == 4) {
6572 break
6573 }
6574 v.reset(OpConst32)
6575 v.AuxInt = int32ToAuxInt(int32(ntz8(c)))
6576 return true
6577 }
6578
6579
6580
6581 for {
6582 if v_0.Op != OpConst8 {
6583 break
6584 }
6585 c := auxIntToInt8(v_0.AuxInt)
6586 if !(config.PtrSize == 8) {
6587 break
6588 }
6589 v.reset(OpConst64)
6590 v.AuxInt = int64ToAuxInt(int64(ntz8(c)))
6591 return true
6592 }
6593 return false
6594 }
6595 func rewriteValuegeneric_OpCvt32Fto32(v *Value) bool {
6596 v_0 := v.Args[0]
6597
6598
6599 for {
6600 if v_0.Op != OpConst32F {
6601 break
6602 }
6603 c := auxIntToFloat32(v_0.AuxInt)
6604 v.reset(OpConst32)
6605 v.AuxInt = int32ToAuxInt(int32(c))
6606 return true
6607 }
6608 return false
6609 }
6610 func rewriteValuegeneric_OpCvt32Fto64(v *Value) bool {
6611 v_0 := v.Args[0]
6612
6613
6614 for {
6615 if v_0.Op != OpConst32F {
6616 break
6617 }
6618 c := auxIntToFloat32(v_0.AuxInt)
6619 v.reset(OpConst64)
6620 v.AuxInt = int64ToAuxInt(int64(c))
6621 return true
6622 }
6623 return false
6624 }
6625 func rewriteValuegeneric_OpCvt32Fto64F(v *Value) bool {
6626 v_0 := v.Args[0]
6627
6628
6629 for {
6630 if v_0.Op != OpConst32F {
6631 break
6632 }
6633 c := auxIntToFloat32(v_0.AuxInt)
6634 v.reset(OpConst64F)
6635 v.AuxInt = float64ToAuxInt(float64(c))
6636 return true
6637 }
6638 return false
6639 }
6640 func rewriteValuegeneric_OpCvt32to32F(v *Value) bool {
6641 v_0 := v.Args[0]
6642
6643
6644 for {
6645 if v_0.Op != OpConst32 {
6646 break
6647 }
6648 c := auxIntToInt32(v_0.AuxInt)
6649 v.reset(OpConst32F)
6650 v.AuxInt = float32ToAuxInt(float32(c))
6651 return true
6652 }
6653 return false
6654 }
6655 func rewriteValuegeneric_OpCvt32to64F(v *Value) bool {
6656 v_0 := v.Args[0]
6657
6658
6659 for {
6660 if v_0.Op != OpConst32 {
6661 break
6662 }
6663 c := auxIntToInt32(v_0.AuxInt)
6664 v.reset(OpConst64F)
6665 v.AuxInt = float64ToAuxInt(float64(c))
6666 return true
6667 }
6668 return false
6669 }
6670 func rewriteValuegeneric_OpCvt64Fto32(v *Value) bool {
6671 v_0 := v.Args[0]
6672
6673
6674 for {
6675 if v_0.Op != OpConst64F {
6676 break
6677 }
6678 c := auxIntToFloat64(v_0.AuxInt)
6679 v.reset(OpConst32)
6680 v.AuxInt = int32ToAuxInt(int32(c))
6681 return true
6682 }
6683 return false
6684 }
6685 func rewriteValuegeneric_OpCvt64Fto32F(v *Value) bool {
6686 v_0 := v.Args[0]
6687
6688
6689 for {
6690 if v_0.Op != OpConst64F {
6691 break
6692 }
6693 c := auxIntToFloat64(v_0.AuxInt)
6694 v.reset(OpConst32F)
6695 v.AuxInt = float32ToAuxInt(float32(c))
6696 return true
6697 }
6698
6699
6700
6701 for {
6702 sqrt0 := v_0
6703 if sqrt0.Op != OpSqrt {
6704 break
6705 }
6706 sqrt0_0 := sqrt0.Args[0]
6707 if sqrt0_0.Op != OpCvt32Fto64F {
6708 break
6709 }
6710 x := sqrt0_0.Args[0]
6711 if !(sqrt0.Uses == 1) {
6712 break
6713 }
6714 v.reset(OpSqrt32)
6715 v.AddArg(x)
6716 return true
6717 }
6718 return false
6719 }
6720 func rewriteValuegeneric_OpCvt64Fto64(v *Value) bool {
6721 v_0 := v.Args[0]
6722
6723
6724 for {
6725 if v_0.Op != OpConst64F {
6726 break
6727 }
6728 c := auxIntToFloat64(v_0.AuxInt)
6729 v.reset(OpConst64)
6730 v.AuxInt = int64ToAuxInt(int64(c))
6731 return true
6732 }
6733 return false
6734 }
6735 func rewriteValuegeneric_OpCvt64to32F(v *Value) bool {
6736 v_0 := v.Args[0]
6737
6738
6739 for {
6740 if v_0.Op != OpConst64 {
6741 break
6742 }
6743 c := auxIntToInt64(v_0.AuxInt)
6744 v.reset(OpConst32F)
6745 v.AuxInt = float32ToAuxInt(float32(c))
6746 return true
6747 }
6748 return false
6749 }
6750 func rewriteValuegeneric_OpCvt64to64F(v *Value) bool {
6751 v_0 := v.Args[0]
6752
6753
6754 for {
6755 if v_0.Op != OpConst64 {
6756 break
6757 }
6758 c := auxIntToInt64(v_0.AuxInt)
6759 v.reset(OpConst64F)
6760 v.AuxInt = float64ToAuxInt(float64(c))
6761 return true
6762 }
6763 return false
6764 }
6765 func rewriteValuegeneric_OpCvtBoolToUint8(v *Value) bool {
6766 v_0 := v.Args[0]
6767
6768
6769 for {
6770 if v_0.Op != OpConstBool || auxIntToBool(v_0.AuxInt) != false {
6771 break
6772 }
6773 v.reset(OpConst8)
6774 v.AuxInt = int8ToAuxInt(0)
6775 return true
6776 }
6777
6778
6779 for {
6780 if v_0.Op != OpConstBool || auxIntToBool(v_0.AuxInt) != true {
6781 break
6782 }
6783 v.reset(OpConst8)
6784 v.AuxInt = int8ToAuxInt(1)
6785 return true
6786 }
6787 return false
6788 }
6789 func rewriteValuegeneric_OpDiv128u(v *Value) bool {
6790 v_2 := v.Args[2]
6791 v_1 := v.Args[1]
6792 v_0 := v.Args[0]
6793 b := v.Block
6794
6795
6796 for {
6797 t := v.Type
6798 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
6799 break
6800 }
6801 lo := v_1
6802 y := v_2
6803 v.reset(OpMakeTuple)
6804 v0 := b.NewValue0(v.Pos, OpDiv64u, t.FieldType(0))
6805 v0.AddArg2(lo, y)
6806 v1 := b.NewValue0(v.Pos, OpMod64u, t.FieldType(1))
6807 v1.AddArg2(lo, y)
6808 v.AddArg2(v0, v1)
6809 return true
6810 }
6811 return false
6812 }
6813 func rewriteValuegeneric_OpDiv16(v *Value) bool {
6814 v_1 := v.Args[1]
6815 v_0 := v.Args[0]
6816 b := v.Block
6817 typ := &b.Func.Config.Types
6818
6819
6820
6821 for {
6822 if v_0.Op != OpConst16 {
6823 break
6824 }
6825 c := auxIntToInt16(v_0.AuxInt)
6826 if v_1.Op != OpConst16 {
6827 break
6828 }
6829 d := auxIntToInt16(v_1.AuxInt)
6830 if !(d != 0) {
6831 break
6832 }
6833 v.reset(OpConst16)
6834 v.AuxInt = int16ToAuxInt(c / d)
6835 return true
6836 }
6837
6838
6839
6840 for {
6841 n := v_0
6842 if v_1.Op != OpConst16 {
6843 break
6844 }
6845 c := auxIntToInt16(v_1.AuxInt)
6846 if !(isNonNegative(n) && isPowerOfTwo(c)) {
6847 break
6848 }
6849 v.reset(OpRsh16Ux64)
6850 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
6851 v0.AuxInt = int64ToAuxInt(log16(c))
6852 v.AddArg2(n, v0)
6853 return true
6854 }
6855
6856
6857
6858 for {
6859 t := v.Type
6860 n := v_0
6861 if v_1.Op != OpConst16 {
6862 break
6863 }
6864 c := auxIntToInt16(v_1.AuxInt)
6865 if !(c < 0 && c != -1<<15) {
6866 break
6867 }
6868 v.reset(OpNeg16)
6869 v0 := b.NewValue0(v.Pos, OpDiv16, t)
6870 v1 := b.NewValue0(v.Pos, OpConst16, t)
6871 v1.AuxInt = int16ToAuxInt(-c)
6872 v0.AddArg2(n, v1)
6873 v.AddArg(v0)
6874 return true
6875 }
6876
6877
6878 for {
6879 t := v.Type
6880 x := v_0
6881 if v_1.Op != OpConst16 || auxIntToInt16(v_1.AuxInt) != -1<<15 {
6882 break
6883 }
6884 v.reset(OpRsh16Ux64)
6885 v0 := b.NewValue0(v.Pos, OpAnd16, t)
6886 v1 := b.NewValue0(v.Pos, OpNeg16, t)
6887 v1.AddArg(x)
6888 v0.AddArg2(x, v1)
6889 v2 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
6890 v2.AuxInt = int64ToAuxInt(15)
6891 v.AddArg2(v0, v2)
6892 return true
6893 }
6894
6895
6896
6897 for {
6898 t := v.Type
6899 n := v_0
6900 if v_1.Op != OpConst16 {
6901 break
6902 }
6903 c := auxIntToInt16(v_1.AuxInt)
6904 if !(isPowerOfTwo(c)) {
6905 break
6906 }
6907 v.reset(OpRsh16x64)
6908 v0 := b.NewValue0(v.Pos, OpAdd16, t)
6909 v1 := b.NewValue0(v.Pos, OpRsh16Ux64, t)
6910 v2 := b.NewValue0(v.Pos, OpRsh16x64, t)
6911 v3 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
6912 v3.AuxInt = int64ToAuxInt(15)
6913 v2.AddArg2(n, v3)
6914 v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
6915 v4.AuxInt = int64ToAuxInt(int64(16 - log16(c)))
6916 v1.AddArg2(v2, v4)
6917 v0.AddArg2(n, v1)
6918 v5 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
6919 v5.AuxInt = int64ToAuxInt(int64(log16(c)))
6920 v.AddArg2(v0, v5)
6921 return true
6922 }
6923
6924
6925
6926 for {
6927 t := v.Type
6928 x := v_0
6929 if v_1.Op != OpConst16 {
6930 break
6931 }
6932 c := auxIntToInt16(v_1.AuxInt)
6933 if !(smagicOK16(c)) {
6934 break
6935 }
6936 v.reset(OpSub16)
6937 v.Type = t
6938 v0 := b.NewValue0(v.Pos, OpRsh32x64, t)
6939 v1 := b.NewValue0(v.Pos, OpMul32, typ.UInt32)
6940 v2 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
6941 v2.AuxInt = int32ToAuxInt(int32(smagic16(c).m))
6942 v3 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
6943 v3.AddArg(x)
6944 v1.AddArg2(v2, v3)
6945 v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
6946 v4.AuxInt = int64ToAuxInt(16 + smagic16(c).s)
6947 v0.AddArg2(v1, v4)
6948 v5 := b.NewValue0(v.Pos, OpRsh32x64, t)
6949 v6 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
6950 v6.AuxInt = int64ToAuxInt(31)
6951 v5.AddArg2(v3, v6)
6952 v.AddArg2(v0, v5)
6953 return true
6954 }
6955 return false
6956 }
6957 func rewriteValuegeneric_OpDiv16u(v *Value) bool {
6958 v_1 := v.Args[1]
6959 v_0 := v.Args[0]
6960 b := v.Block
6961 config := b.Func.Config
6962 typ := &b.Func.Config.Types
6963
6964
6965
6966 for {
6967 if v_0.Op != OpConst16 {
6968 break
6969 }
6970 c := auxIntToInt16(v_0.AuxInt)
6971 if v_1.Op != OpConst16 {
6972 break
6973 }
6974 d := auxIntToInt16(v_1.AuxInt)
6975 if !(d != 0) {
6976 break
6977 }
6978 v.reset(OpConst16)
6979 v.AuxInt = int16ToAuxInt(int16(uint16(c) / uint16(d)))
6980 return true
6981 }
6982
6983
6984
6985 for {
6986 n := v_0
6987 if v_1.Op != OpConst16 {
6988 break
6989 }
6990 c := auxIntToInt16(v_1.AuxInt)
6991 if !(isPowerOfTwo(c)) {
6992 break
6993 }
6994 v.reset(OpRsh16Ux64)
6995 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
6996 v0.AuxInt = int64ToAuxInt(log16(c))
6997 v.AddArg2(n, v0)
6998 return true
6999 }
7000
7001
7002
7003 for {
7004 x := v_0
7005 if v_1.Op != OpConst16 {
7006 break
7007 }
7008 c := auxIntToInt16(v_1.AuxInt)
7009 if !(umagicOK16(c) && config.RegSize == 8) {
7010 break
7011 }
7012 v.reset(OpTrunc64to16)
7013 v0 := b.NewValue0(v.Pos, OpRsh64Ux64, typ.UInt64)
7014 v1 := b.NewValue0(v.Pos, OpMul64, typ.UInt64)
7015 v2 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7016 v2.AuxInt = int64ToAuxInt(int64(1<<16 + umagic16(c).m))
7017 v3 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
7018 v3.AddArg(x)
7019 v1.AddArg2(v2, v3)
7020 v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7021 v4.AuxInt = int64ToAuxInt(16 + umagic16(c).s)
7022 v0.AddArg2(v1, v4)
7023 v.AddArg(v0)
7024 return true
7025 }
7026
7027
7028
7029 for {
7030 x := v_0
7031 if v_1.Op != OpConst16 {
7032 break
7033 }
7034 c := auxIntToInt16(v_1.AuxInt)
7035 if !(umagicOK16(c) && config.RegSize == 4 && umagic16(c).m&1 == 0) {
7036 break
7037 }
7038 v.reset(OpTrunc32to16)
7039 v0 := b.NewValue0(v.Pos, OpRsh32Ux64, typ.UInt32)
7040 v1 := b.NewValue0(v.Pos, OpMul32, typ.UInt32)
7041 v2 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
7042 v2.AuxInt = int32ToAuxInt(int32(1<<15 + umagic16(c).m/2))
7043 v3 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
7044 v3.AddArg(x)
7045 v1.AddArg2(v2, v3)
7046 v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7047 v4.AuxInt = int64ToAuxInt(16 + umagic16(c).s - 1)
7048 v0.AddArg2(v1, v4)
7049 v.AddArg(v0)
7050 return true
7051 }
7052
7053
7054
7055 for {
7056 x := v_0
7057 if v_1.Op != OpConst16 {
7058 break
7059 }
7060 c := auxIntToInt16(v_1.AuxInt)
7061 if !(umagicOK16(c) && config.RegSize == 4 && c&1 == 0) {
7062 break
7063 }
7064 v.reset(OpTrunc32to16)
7065 v0 := b.NewValue0(v.Pos, OpRsh32Ux64, typ.UInt32)
7066 v1 := b.NewValue0(v.Pos, OpMul32, typ.UInt32)
7067 v2 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
7068 v2.AuxInt = int32ToAuxInt(int32(1<<15 + (umagic16(c).m+1)/2))
7069 v3 := b.NewValue0(v.Pos, OpRsh32Ux64, typ.UInt32)
7070 v4 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
7071 v4.AddArg(x)
7072 v5 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7073 v5.AuxInt = int64ToAuxInt(1)
7074 v3.AddArg2(v4, v5)
7075 v1.AddArg2(v2, v3)
7076 v6 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7077 v6.AuxInt = int64ToAuxInt(16 + umagic16(c).s - 2)
7078 v0.AddArg2(v1, v6)
7079 v.AddArg(v0)
7080 return true
7081 }
7082
7083
7084
7085 for {
7086 x := v_0
7087 if v_1.Op != OpConst16 {
7088 break
7089 }
7090 c := auxIntToInt16(v_1.AuxInt)
7091 if !(umagicOK16(c) && config.RegSize == 4 && config.useAvg) {
7092 break
7093 }
7094 v.reset(OpTrunc32to16)
7095 v0 := b.NewValue0(v.Pos, OpRsh32Ux64, typ.UInt32)
7096 v1 := b.NewValue0(v.Pos, OpAvg32u, typ.UInt32)
7097 v2 := b.NewValue0(v.Pos, OpLsh32x64, typ.UInt32)
7098 v3 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
7099 v3.AddArg(x)
7100 v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7101 v4.AuxInt = int64ToAuxInt(16)
7102 v2.AddArg2(v3, v4)
7103 v5 := b.NewValue0(v.Pos, OpMul32, typ.UInt32)
7104 v6 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
7105 v6.AuxInt = int32ToAuxInt(int32(umagic16(c).m))
7106 v5.AddArg2(v6, v3)
7107 v1.AddArg2(v2, v5)
7108 v7 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7109 v7.AuxInt = int64ToAuxInt(16 + umagic16(c).s - 1)
7110 v0.AddArg2(v1, v7)
7111 v.AddArg(v0)
7112 return true
7113 }
7114 return false
7115 }
7116 func rewriteValuegeneric_OpDiv32(v *Value) bool {
7117 v_1 := v.Args[1]
7118 v_0 := v.Args[0]
7119 b := v.Block
7120 config := b.Func.Config
7121 typ := &b.Func.Config.Types
7122
7123
7124
7125 for {
7126 if v_0.Op != OpConst32 {
7127 break
7128 }
7129 c := auxIntToInt32(v_0.AuxInt)
7130 if v_1.Op != OpConst32 {
7131 break
7132 }
7133 d := auxIntToInt32(v_1.AuxInt)
7134 if !(d != 0) {
7135 break
7136 }
7137 v.reset(OpConst32)
7138 v.AuxInt = int32ToAuxInt(c / d)
7139 return true
7140 }
7141
7142
7143
7144 for {
7145 n := v_0
7146 if v_1.Op != OpConst32 {
7147 break
7148 }
7149 c := auxIntToInt32(v_1.AuxInt)
7150 if !(isNonNegative(n) && isPowerOfTwo(c)) {
7151 break
7152 }
7153 v.reset(OpRsh32Ux64)
7154 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7155 v0.AuxInt = int64ToAuxInt(log32(c))
7156 v.AddArg2(n, v0)
7157 return true
7158 }
7159
7160
7161
7162 for {
7163 t := v.Type
7164 n := v_0
7165 if v_1.Op != OpConst32 {
7166 break
7167 }
7168 c := auxIntToInt32(v_1.AuxInt)
7169 if !(c < 0 && c != -1<<31) {
7170 break
7171 }
7172 v.reset(OpNeg32)
7173 v0 := b.NewValue0(v.Pos, OpDiv32, t)
7174 v1 := b.NewValue0(v.Pos, OpConst32, t)
7175 v1.AuxInt = int32ToAuxInt(-c)
7176 v0.AddArg2(n, v1)
7177 v.AddArg(v0)
7178 return true
7179 }
7180
7181
7182 for {
7183 t := v.Type
7184 x := v_0
7185 if v_1.Op != OpConst32 || auxIntToInt32(v_1.AuxInt) != -1<<31 {
7186 break
7187 }
7188 v.reset(OpRsh32Ux64)
7189 v0 := b.NewValue0(v.Pos, OpAnd32, t)
7190 v1 := b.NewValue0(v.Pos, OpNeg32, t)
7191 v1.AddArg(x)
7192 v0.AddArg2(x, v1)
7193 v2 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7194 v2.AuxInt = int64ToAuxInt(31)
7195 v.AddArg2(v0, v2)
7196 return true
7197 }
7198
7199
7200
7201 for {
7202 t := v.Type
7203 n := v_0
7204 if v_1.Op != OpConst32 {
7205 break
7206 }
7207 c := auxIntToInt32(v_1.AuxInt)
7208 if !(isPowerOfTwo(c)) {
7209 break
7210 }
7211 v.reset(OpRsh32x64)
7212 v0 := b.NewValue0(v.Pos, OpAdd32, t)
7213 v1 := b.NewValue0(v.Pos, OpRsh32Ux64, t)
7214 v2 := b.NewValue0(v.Pos, OpRsh32x64, t)
7215 v3 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7216 v3.AuxInt = int64ToAuxInt(31)
7217 v2.AddArg2(n, v3)
7218 v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7219 v4.AuxInt = int64ToAuxInt(int64(32 - log32(c)))
7220 v1.AddArg2(v2, v4)
7221 v0.AddArg2(n, v1)
7222 v5 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7223 v5.AuxInt = int64ToAuxInt(int64(log32(c)))
7224 v.AddArg2(v0, v5)
7225 return true
7226 }
7227
7228
7229
7230 for {
7231 t := v.Type
7232 x := v_0
7233 if v_1.Op != OpConst32 {
7234 break
7235 }
7236 c := auxIntToInt32(v_1.AuxInt)
7237 if !(smagicOK32(c) && config.RegSize == 8) {
7238 break
7239 }
7240 v.reset(OpSub32)
7241 v.Type = t
7242 v0 := b.NewValue0(v.Pos, OpRsh64x64, t)
7243 v1 := b.NewValue0(v.Pos, OpMul64, typ.UInt64)
7244 v2 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7245 v2.AuxInt = int64ToAuxInt(int64(smagic32(c).m))
7246 v3 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
7247 v3.AddArg(x)
7248 v1.AddArg2(v2, v3)
7249 v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7250 v4.AuxInt = int64ToAuxInt(32 + smagic32(c).s)
7251 v0.AddArg2(v1, v4)
7252 v5 := b.NewValue0(v.Pos, OpRsh64x64, t)
7253 v6 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7254 v6.AuxInt = int64ToAuxInt(63)
7255 v5.AddArg2(v3, v6)
7256 v.AddArg2(v0, v5)
7257 return true
7258 }
7259
7260
7261
7262 for {
7263 t := v.Type
7264 x := v_0
7265 if v_1.Op != OpConst32 {
7266 break
7267 }
7268 c := auxIntToInt32(v_1.AuxInt)
7269 if !(smagicOK32(c) && config.RegSize == 4 && smagic32(c).m&1 == 0 && config.useHmul) {
7270 break
7271 }
7272 v.reset(OpSub32)
7273 v.Type = t
7274 v0 := b.NewValue0(v.Pos, OpRsh32x64, t)
7275 v1 := b.NewValue0(v.Pos, OpHmul32, t)
7276 v2 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
7277 v2.AuxInt = int32ToAuxInt(int32(smagic32(c).m / 2))
7278 v1.AddArg2(v2, x)
7279 v3 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7280 v3.AuxInt = int64ToAuxInt(smagic32(c).s - 1)
7281 v0.AddArg2(v1, v3)
7282 v4 := b.NewValue0(v.Pos, OpRsh32x64, t)
7283 v5 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7284 v5.AuxInt = int64ToAuxInt(31)
7285 v4.AddArg2(x, v5)
7286 v.AddArg2(v0, v4)
7287 return true
7288 }
7289
7290
7291
7292 for {
7293 t := v.Type
7294 x := v_0
7295 if v_1.Op != OpConst32 {
7296 break
7297 }
7298 c := auxIntToInt32(v_1.AuxInt)
7299 if !(smagicOK32(c) && config.RegSize == 4 && smagic32(c).m&1 != 0 && config.useHmul) {
7300 break
7301 }
7302 v.reset(OpSub32)
7303 v.Type = t
7304 v0 := b.NewValue0(v.Pos, OpRsh32x64, t)
7305 v1 := b.NewValue0(v.Pos, OpAdd32, t)
7306 v2 := b.NewValue0(v.Pos, OpHmul32, t)
7307 v3 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
7308 v3.AuxInt = int32ToAuxInt(int32(smagic32(c).m))
7309 v2.AddArg2(v3, x)
7310 v1.AddArg2(v2, x)
7311 v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7312 v4.AuxInt = int64ToAuxInt(smagic32(c).s)
7313 v0.AddArg2(v1, v4)
7314 v5 := b.NewValue0(v.Pos, OpRsh32x64, t)
7315 v6 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7316 v6.AuxInt = int64ToAuxInt(31)
7317 v5.AddArg2(x, v6)
7318 v.AddArg2(v0, v5)
7319 return true
7320 }
7321 return false
7322 }
7323 func rewriteValuegeneric_OpDiv32F(v *Value) bool {
7324 v_1 := v.Args[1]
7325 v_0 := v.Args[0]
7326 b := v.Block
7327
7328
7329
7330 for {
7331 if v_0.Op != OpConst32F {
7332 break
7333 }
7334 c := auxIntToFloat32(v_0.AuxInt)
7335 if v_1.Op != OpConst32F {
7336 break
7337 }
7338 d := auxIntToFloat32(v_1.AuxInt)
7339 if !(c/d == c/d) {
7340 break
7341 }
7342 v.reset(OpConst32F)
7343 v.AuxInt = float32ToAuxInt(c / d)
7344 return true
7345 }
7346
7347
7348
7349 for {
7350 x := v_0
7351 if v_1.Op != OpConst32F {
7352 break
7353 }
7354 t := v_1.Type
7355 c := auxIntToFloat32(v_1.AuxInt)
7356 if !(reciprocalExact32(c)) {
7357 break
7358 }
7359 v.reset(OpMul32F)
7360 v0 := b.NewValue0(v.Pos, OpConst32F, t)
7361 v0.AuxInt = float32ToAuxInt(1 / c)
7362 v.AddArg2(x, v0)
7363 return true
7364 }
7365 return false
7366 }
7367 func rewriteValuegeneric_OpDiv32u(v *Value) bool {
7368 v_1 := v.Args[1]
7369 v_0 := v.Args[0]
7370 b := v.Block
7371 config := b.Func.Config
7372 typ := &b.Func.Config.Types
7373
7374
7375
7376 for {
7377 if v_0.Op != OpConst32 {
7378 break
7379 }
7380 c := auxIntToInt32(v_0.AuxInt)
7381 if v_1.Op != OpConst32 {
7382 break
7383 }
7384 d := auxIntToInt32(v_1.AuxInt)
7385 if !(d != 0) {
7386 break
7387 }
7388 v.reset(OpConst32)
7389 v.AuxInt = int32ToAuxInt(int32(uint32(c) / uint32(d)))
7390 return true
7391 }
7392
7393
7394
7395 for {
7396 n := v_0
7397 if v_1.Op != OpConst32 {
7398 break
7399 }
7400 c := auxIntToInt32(v_1.AuxInt)
7401 if !(isPowerOfTwo(c)) {
7402 break
7403 }
7404 v.reset(OpRsh32Ux64)
7405 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7406 v0.AuxInt = int64ToAuxInt(log32(c))
7407 v.AddArg2(n, v0)
7408 return true
7409 }
7410
7411
7412
7413 for {
7414 x := v_0
7415 if v_1.Op != OpConst32 {
7416 break
7417 }
7418 c := auxIntToInt32(v_1.AuxInt)
7419 if !(umagicOK32(c) && config.RegSize == 4 && umagic32(c).m&1 == 0 && config.useHmul) {
7420 break
7421 }
7422 v.reset(OpRsh32Ux64)
7423 v.Type = typ.UInt32
7424 v0 := b.NewValue0(v.Pos, OpHmul32u, typ.UInt32)
7425 v1 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
7426 v1.AuxInt = int32ToAuxInt(int32(1<<31 + umagic32(c).m/2))
7427 v0.AddArg2(v1, x)
7428 v2 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7429 v2.AuxInt = int64ToAuxInt(umagic32(c).s - 1)
7430 v.AddArg2(v0, v2)
7431 return true
7432 }
7433
7434
7435
7436 for {
7437 x := v_0
7438 if v_1.Op != OpConst32 {
7439 break
7440 }
7441 c := auxIntToInt32(v_1.AuxInt)
7442 if !(umagicOK32(c) && config.RegSize == 4 && c&1 == 0 && config.useHmul) {
7443 break
7444 }
7445 v.reset(OpRsh32Ux64)
7446 v.Type = typ.UInt32
7447 v0 := b.NewValue0(v.Pos, OpHmul32u, typ.UInt32)
7448 v1 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
7449 v1.AuxInt = int32ToAuxInt(int32(1<<31 + (umagic32(c).m+1)/2))
7450 v2 := b.NewValue0(v.Pos, OpRsh32Ux64, typ.UInt32)
7451 v3 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7452 v3.AuxInt = int64ToAuxInt(1)
7453 v2.AddArg2(x, v3)
7454 v0.AddArg2(v1, v2)
7455 v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7456 v4.AuxInt = int64ToAuxInt(umagic32(c).s - 2)
7457 v.AddArg2(v0, v4)
7458 return true
7459 }
7460
7461
7462
7463 for {
7464 x := v_0
7465 if v_1.Op != OpConst32 {
7466 break
7467 }
7468 c := auxIntToInt32(v_1.AuxInt)
7469 if !(umagicOK32(c) && config.RegSize == 4 && config.useAvg && config.useHmul) {
7470 break
7471 }
7472 v.reset(OpRsh32Ux64)
7473 v.Type = typ.UInt32
7474 v0 := b.NewValue0(v.Pos, OpAvg32u, typ.UInt32)
7475 v1 := b.NewValue0(v.Pos, OpHmul32u, typ.UInt32)
7476 v2 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
7477 v2.AuxInt = int32ToAuxInt(int32(umagic32(c).m))
7478 v1.AddArg2(v2, x)
7479 v0.AddArg2(x, v1)
7480 v3 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7481 v3.AuxInt = int64ToAuxInt(umagic32(c).s - 1)
7482 v.AddArg2(v0, v3)
7483 return true
7484 }
7485
7486
7487
7488 for {
7489 x := v_0
7490 if v_1.Op != OpConst32 {
7491 break
7492 }
7493 c := auxIntToInt32(v_1.AuxInt)
7494 if !(umagicOK32(c) && config.RegSize == 8 && umagic32(c).m&1 == 0) {
7495 break
7496 }
7497 v.reset(OpTrunc64to32)
7498 v0 := b.NewValue0(v.Pos, OpRsh64Ux64, typ.UInt64)
7499 v1 := b.NewValue0(v.Pos, OpMul64, typ.UInt64)
7500 v2 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7501 v2.AuxInt = int64ToAuxInt(int64(1<<31 + umagic32(c).m/2))
7502 v3 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
7503 v3.AddArg(x)
7504 v1.AddArg2(v2, v3)
7505 v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7506 v4.AuxInt = int64ToAuxInt(32 + umagic32(c).s - 1)
7507 v0.AddArg2(v1, v4)
7508 v.AddArg(v0)
7509 return true
7510 }
7511
7512
7513
7514 for {
7515 x := v_0
7516 if v_1.Op != OpConst32 {
7517 break
7518 }
7519 c := auxIntToInt32(v_1.AuxInt)
7520 if !(umagicOK32(c) && config.RegSize == 8 && c&1 == 0) {
7521 break
7522 }
7523 v.reset(OpTrunc64to32)
7524 v0 := b.NewValue0(v.Pos, OpRsh64Ux64, typ.UInt64)
7525 v1 := b.NewValue0(v.Pos, OpMul64, typ.UInt64)
7526 v2 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7527 v2.AuxInt = int64ToAuxInt(int64(1<<31 + (umagic32(c).m+1)/2))
7528 v3 := b.NewValue0(v.Pos, OpRsh64Ux64, typ.UInt64)
7529 v4 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
7530 v4.AddArg(x)
7531 v5 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7532 v5.AuxInt = int64ToAuxInt(1)
7533 v3.AddArg2(v4, v5)
7534 v1.AddArg2(v2, v3)
7535 v6 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7536 v6.AuxInt = int64ToAuxInt(32 + umagic32(c).s - 2)
7537 v0.AddArg2(v1, v6)
7538 v.AddArg(v0)
7539 return true
7540 }
7541
7542
7543
7544 for {
7545 x := v_0
7546 if v_1.Op != OpConst32 {
7547 break
7548 }
7549 c := auxIntToInt32(v_1.AuxInt)
7550 if !(umagicOK32(c) && config.RegSize == 8 && config.useAvg) {
7551 break
7552 }
7553 v.reset(OpTrunc64to32)
7554 v0 := b.NewValue0(v.Pos, OpRsh64Ux64, typ.UInt64)
7555 v1 := b.NewValue0(v.Pos, OpAvg64u, typ.UInt64)
7556 v2 := b.NewValue0(v.Pos, OpLsh64x64, typ.UInt64)
7557 v3 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
7558 v3.AddArg(x)
7559 v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7560 v4.AuxInt = int64ToAuxInt(32)
7561 v2.AddArg2(v3, v4)
7562 v5 := b.NewValue0(v.Pos, OpMul64, typ.UInt64)
7563 v6 := b.NewValue0(v.Pos, OpConst64, typ.UInt32)
7564 v6.AuxInt = int64ToAuxInt(int64(umagic32(c).m))
7565 v5.AddArg2(v6, v3)
7566 v1.AddArg2(v2, v5)
7567 v7 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7568 v7.AuxInt = int64ToAuxInt(32 + umagic32(c).s - 1)
7569 v0.AddArg2(v1, v7)
7570 v.AddArg(v0)
7571 return true
7572 }
7573 return false
7574 }
7575 func rewriteValuegeneric_OpDiv64(v *Value) bool {
7576 v_1 := v.Args[1]
7577 v_0 := v.Args[0]
7578 b := v.Block
7579 config := b.Func.Config
7580 typ := &b.Func.Config.Types
7581
7582
7583
7584 for {
7585 if v_0.Op != OpConst64 {
7586 break
7587 }
7588 c := auxIntToInt64(v_0.AuxInt)
7589 if v_1.Op != OpConst64 {
7590 break
7591 }
7592 d := auxIntToInt64(v_1.AuxInt)
7593 if !(d != 0) {
7594 break
7595 }
7596 v.reset(OpConst64)
7597 v.AuxInt = int64ToAuxInt(c / d)
7598 return true
7599 }
7600
7601
7602
7603 for {
7604 n := v_0
7605 if v_1.Op != OpConst64 {
7606 break
7607 }
7608 c := auxIntToInt64(v_1.AuxInt)
7609 if !(isNonNegative(n) && isPowerOfTwo(c)) {
7610 break
7611 }
7612 v.reset(OpRsh64Ux64)
7613 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7614 v0.AuxInt = int64ToAuxInt(log64(c))
7615 v.AddArg2(n, v0)
7616 return true
7617 }
7618
7619
7620
7621 for {
7622 n := v_0
7623 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != -1<<63 || !(isNonNegative(n)) {
7624 break
7625 }
7626 v.reset(OpConst64)
7627 v.AuxInt = int64ToAuxInt(0)
7628 return true
7629 }
7630
7631
7632
7633 for {
7634 t := v.Type
7635 n := v_0
7636 if v_1.Op != OpConst64 {
7637 break
7638 }
7639 c := auxIntToInt64(v_1.AuxInt)
7640 if !(c < 0 && c != -1<<63) {
7641 break
7642 }
7643 v.reset(OpNeg64)
7644 v0 := b.NewValue0(v.Pos, OpDiv64, t)
7645 v1 := b.NewValue0(v.Pos, OpConst64, t)
7646 v1.AuxInt = int64ToAuxInt(-c)
7647 v0.AddArg2(n, v1)
7648 v.AddArg(v0)
7649 return true
7650 }
7651
7652
7653 for {
7654 t := v.Type
7655 x := v_0
7656 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != -1<<63 {
7657 break
7658 }
7659 v.reset(OpRsh64Ux64)
7660 v0 := b.NewValue0(v.Pos, OpAnd64, t)
7661 v1 := b.NewValue0(v.Pos, OpNeg64, t)
7662 v1.AddArg(x)
7663 v0.AddArg2(x, v1)
7664 v2 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7665 v2.AuxInt = int64ToAuxInt(63)
7666 v.AddArg2(v0, v2)
7667 return true
7668 }
7669
7670
7671
7672 for {
7673 t := v.Type
7674 n := v_0
7675 if v_1.Op != OpConst64 {
7676 break
7677 }
7678 c := auxIntToInt64(v_1.AuxInt)
7679 if !(isPowerOfTwo(c)) {
7680 break
7681 }
7682 v.reset(OpRsh64x64)
7683 v0 := b.NewValue0(v.Pos, OpAdd64, t)
7684 v1 := b.NewValue0(v.Pos, OpRsh64Ux64, t)
7685 v2 := b.NewValue0(v.Pos, OpRsh64x64, t)
7686 v3 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7687 v3.AuxInt = int64ToAuxInt(63)
7688 v2.AddArg2(n, v3)
7689 v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7690 v4.AuxInt = int64ToAuxInt(int64(64 - log64(c)))
7691 v1.AddArg2(v2, v4)
7692 v0.AddArg2(n, v1)
7693 v5 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7694 v5.AuxInt = int64ToAuxInt(int64(log64(c)))
7695 v.AddArg2(v0, v5)
7696 return true
7697 }
7698
7699
7700
7701 for {
7702 t := v.Type
7703 x := v_0
7704 if v_1.Op != OpConst64 {
7705 break
7706 }
7707 c := auxIntToInt64(v_1.AuxInt)
7708 if !(smagicOK64(c) && smagic64(c).m&1 == 0 && config.useHmul) {
7709 break
7710 }
7711 v.reset(OpSub64)
7712 v.Type = t
7713 v0 := b.NewValue0(v.Pos, OpRsh64x64, t)
7714 v1 := b.NewValue0(v.Pos, OpHmul64, t)
7715 v2 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7716 v2.AuxInt = int64ToAuxInt(int64(smagic64(c).m / 2))
7717 v1.AddArg2(v2, x)
7718 v3 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7719 v3.AuxInt = int64ToAuxInt(smagic64(c).s - 1)
7720 v0.AddArg2(v1, v3)
7721 v4 := b.NewValue0(v.Pos, OpRsh64x64, t)
7722 v5 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7723 v5.AuxInt = int64ToAuxInt(63)
7724 v4.AddArg2(x, v5)
7725 v.AddArg2(v0, v4)
7726 return true
7727 }
7728
7729
7730
7731 for {
7732 t := v.Type
7733 x := v_0
7734 if v_1.Op != OpConst64 {
7735 break
7736 }
7737 c := auxIntToInt64(v_1.AuxInt)
7738 if !(smagicOK64(c) && smagic64(c).m&1 != 0 && config.useHmul) {
7739 break
7740 }
7741 v.reset(OpSub64)
7742 v.Type = t
7743 v0 := b.NewValue0(v.Pos, OpRsh64x64, t)
7744 v1 := b.NewValue0(v.Pos, OpAdd64, t)
7745 v2 := b.NewValue0(v.Pos, OpHmul64, t)
7746 v3 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7747 v3.AuxInt = int64ToAuxInt(int64(smagic64(c).m))
7748 v2.AddArg2(v3, x)
7749 v1.AddArg2(v2, x)
7750 v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7751 v4.AuxInt = int64ToAuxInt(smagic64(c).s)
7752 v0.AddArg2(v1, v4)
7753 v5 := b.NewValue0(v.Pos, OpRsh64x64, t)
7754 v6 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7755 v6.AuxInt = int64ToAuxInt(63)
7756 v5.AddArg2(x, v6)
7757 v.AddArg2(v0, v5)
7758 return true
7759 }
7760 return false
7761 }
7762 func rewriteValuegeneric_OpDiv64F(v *Value) bool {
7763 v_1 := v.Args[1]
7764 v_0 := v.Args[0]
7765 b := v.Block
7766
7767
7768
7769 for {
7770 if v_0.Op != OpConst64F {
7771 break
7772 }
7773 c := auxIntToFloat64(v_0.AuxInt)
7774 if v_1.Op != OpConst64F {
7775 break
7776 }
7777 d := auxIntToFloat64(v_1.AuxInt)
7778 if !(c/d == c/d) {
7779 break
7780 }
7781 v.reset(OpConst64F)
7782 v.AuxInt = float64ToAuxInt(c / d)
7783 return true
7784 }
7785
7786
7787
7788 for {
7789 x := v_0
7790 if v_1.Op != OpConst64F {
7791 break
7792 }
7793 t := v_1.Type
7794 c := auxIntToFloat64(v_1.AuxInt)
7795 if !(reciprocalExact64(c)) {
7796 break
7797 }
7798 v.reset(OpMul64F)
7799 v0 := b.NewValue0(v.Pos, OpConst64F, t)
7800 v0.AuxInt = float64ToAuxInt(1 / c)
7801 v.AddArg2(x, v0)
7802 return true
7803 }
7804 return false
7805 }
7806 func rewriteValuegeneric_OpDiv64u(v *Value) bool {
7807 v_1 := v.Args[1]
7808 v_0 := v.Args[0]
7809 b := v.Block
7810 config := b.Func.Config
7811 typ := &b.Func.Config.Types
7812
7813
7814
7815 for {
7816 if v_0.Op != OpConst64 {
7817 break
7818 }
7819 c := auxIntToInt64(v_0.AuxInt)
7820 if v_1.Op != OpConst64 {
7821 break
7822 }
7823 d := auxIntToInt64(v_1.AuxInt)
7824 if !(d != 0) {
7825 break
7826 }
7827 v.reset(OpConst64)
7828 v.AuxInt = int64ToAuxInt(int64(uint64(c) / uint64(d)))
7829 return true
7830 }
7831
7832
7833
7834 for {
7835 n := v_0
7836 if v_1.Op != OpConst64 {
7837 break
7838 }
7839 c := auxIntToInt64(v_1.AuxInt)
7840 if !(isPowerOfTwo(c)) {
7841 break
7842 }
7843 v.reset(OpRsh64Ux64)
7844 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7845 v0.AuxInt = int64ToAuxInt(log64(c))
7846 v.AddArg2(n, v0)
7847 return true
7848 }
7849
7850
7851 for {
7852 n := v_0
7853 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != -1<<63 {
7854 break
7855 }
7856 v.reset(OpRsh64Ux64)
7857 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7858 v0.AuxInt = int64ToAuxInt(63)
7859 v.AddArg2(n, v0)
7860 return true
7861 }
7862
7863
7864
7865 for {
7866 x := v_0
7867 if v_1.Op != OpConst64 {
7868 break
7869 }
7870 c := auxIntToInt64(v_1.AuxInt)
7871 if !(c > 0 && c <= 0xFFFF && umagicOK32(int32(c)) && config.RegSize == 4 && config.useHmul) {
7872 break
7873 }
7874 v.reset(OpAdd64)
7875 v0 := b.NewValue0(v.Pos, OpAdd64, typ.UInt64)
7876 v1 := b.NewValue0(v.Pos, OpAdd64, typ.UInt64)
7877 v2 := b.NewValue0(v.Pos, OpLsh64x64, typ.UInt64)
7878 v3 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
7879 v4 := b.NewValue0(v.Pos, OpDiv32u, typ.UInt32)
7880 v5 := b.NewValue0(v.Pos, OpTrunc64to32, typ.UInt32)
7881 v6 := b.NewValue0(v.Pos, OpRsh64Ux64, typ.UInt64)
7882 v7 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7883 v7.AuxInt = int64ToAuxInt(32)
7884 v6.AddArg2(x, v7)
7885 v5.AddArg(v6)
7886 v8 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
7887 v8.AuxInt = int32ToAuxInt(int32(c))
7888 v4.AddArg2(v5, v8)
7889 v3.AddArg(v4)
7890 v2.AddArg2(v3, v7)
7891 v9 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
7892 v10 := b.NewValue0(v.Pos, OpDiv32u, typ.UInt32)
7893 v11 := b.NewValue0(v.Pos, OpTrunc64to32, typ.UInt32)
7894 v11.AddArg(x)
7895 v10.AddArg2(v11, v8)
7896 v9.AddArg(v10)
7897 v1.AddArg2(v2, v9)
7898 v12 := b.NewValue0(v.Pos, OpMul64, typ.UInt64)
7899 v13 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
7900 v14 := b.NewValue0(v.Pos, OpMod32u, typ.UInt32)
7901 v14.AddArg2(v5, v8)
7902 v13.AddArg(v14)
7903 v15 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7904 v15.AuxInt = int64ToAuxInt(int64((1 << 32) / c))
7905 v12.AddArg2(v13, v15)
7906 v0.AddArg2(v1, v12)
7907 v16 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
7908 v17 := b.NewValue0(v.Pos, OpDiv32u, typ.UInt32)
7909 v18 := b.NewValue0(v.Pos, OpAdd32, typ.UInt32)
7910 v19 := b.NewValue0(v.Pos, OpMod32u, typ.UInt32)
7911 v19.AddArg2(v11, v8)
7912 v20 := b.NewValue0(v.Pos, OpMul32, typ.UInt32)
7913 v21 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
7914 v21.AuxInt = int32ToAuxInt(int32((1 << 32) % c))
7915 v20.AddArg2(v14, v21)
7916 v18.AddArg2(v19, v20)
7917 v17.AddArg2(v18, v8)
7918 v16.AddArg(v17)
7919 v.AddArg2(v0, v16)
7920 return true
7921 }
7922
7923
7924
7925 for {
7926 x := v_0
7927 if v_1.Op != OpConst64 {
7928 break
7929 }
7930 c := auxIntToInt64(v_1.AuxInt)
7931 if !(umagicOK64(c) && config.RegSize == 8 && umagic64(c).m&1 == 0 && config.useHmul) {
7932 break
7933 }
7934 v.reset(OpRsh64Ux64)
7935 v.Type = typ.UInt64
7936 v0 := b.NewValue0(v.Pos, OpHmul64u, typ.UInt64)
7937 v1 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7938 v1.AuxInt = int64ToAuxInt(int64(1<<63 + umagic64(c).m/2))
7939 v0.AddArg2(v1, x)
7940 v2 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7941 v2.AuxInt = int64ToAuxInt(umagic64(c).s - 1)
7942 v.AddArg2(v0, v2)
7943 return true
7944 }
7945
7946
7947
7948 for {
7949 x := v_0
7950 if v_1.Op != OpConst64 {
7951 break
7952 }
7953 c := auxIntToInt64(v_1.AuxInt)
7954 if !(umagicOK64(c) && config.RegSize == 8 && c&1 == 0 && config.useHmul) {
7955 break
7956 }
7957 v.reset(OpRsh64Ux64)
7958 v.Type = typ.UInt64
7959 v0 := b.NewValue0(v.Pos, OpHmul64u, typ.UInt64)
7960 v1 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7961 v1.AuxInt = int64ToAuxInt(int64(1<<63 + (umagic64(c).m+1)/2))
7962 v2 := b.NewValue0(v.Pos, OpRsh64Ux64, typ.UInt64)
7963 v3 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7964 v3.AuxInt = int64ToAuxInt(1)
7965 v2.AddArg2(x, v3)
7966 v0.AddArg2(v1, v2)
7967 v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7968 v4.AuxInt = int64ToAuxInt(umagic64(c).s - 2)
7969 v.AddArg2(v0, v4)
7970 return true
7971 }
7972
7973
7974
7975 for {
7976 x := v_0
7977 if v_1.Op != OpConst64 {
7978 break
7979 }
7980 c := auxIntToInt64(v_1.AuxInt)
7981 if !(umagicOK64(c) && config.RegSize == 8 && config.useAvg && config.useHmul) {
7982 break
7983 }
7984 v.reset(OpRsh64Ux64)
7985 v.Type = typ.UInt64
7986 v0 := b.NewValue0(v.Pos, OpAvg64u, typ.UInt64)
7987 v1 := b.NewValue0(v.Pos, OpHmul64u, typ.UInt64)
7988 v2 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7989 v2.AuxInt = int64ToAuxInt(int64(umagic64(c).m))
7990 v1.AddArg2(v2, x)
7991 v0.AddArg2(x, v1)
7992 v3 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7993 v3.AuxInt = int64ToAuxInt(umagic64(c).s - 1)
7994 v.AddArg2(v0, v3)
7995 return true
7996 }
7997 return false
7998 }
7999 func rewriteValuegeneric_OpDiv8(v *Value) bool {
8000 v_1 := v.Args[1]
8001 v_0 := v.Args[0]
8002 b := v.Block
8003 typ := &b.Func.Config.Types
8004
8005
8006
8007 for {
8008 if v_0.Op != OpConst8 {
8009 break
8010 }
8011 c := auxIntToInt8(v_0.AuxInt)
8012 if v_1.Op != OpConst8 {
8013 break
8014 }
8015 d := auxIntToInt8(v_1.AuxInt)
8016 if !(d != 0) {
8017 break
8018 }
8019 v.reset(OpConst8)
8020 v.AuxInt = int8ToAuxInt(c / d)
8021 return true
8022 }
8023
8024
8025
8026 for {
8027 n := v_0
8028 if v_1.Op != OpConst8 {
8029 break
8030 }
8031 c := auxIntToInt8(v_1.AuxInt)
8032 if !(isNonNegative(n) && isPowerOfTwo(c)) {
8033 break
8034 }
8035 v.reset(OpRsh8Ux64)
8036 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
8037 v0.AuxInt = int64ToAuxInt(log8(c))
8038 v.AddArg2(n, v0)
8039 return true
8040 }
8041
8042
8043
8044 for {
8045 t := v.Type
8046 n := v_0
8047 if v_1.Op != OpConst8 {
8048 break
8049 }
8050 c := auxIntToInt8(v_1.AuxInt)
8051 if !(c < 0 && c != -1<<7) {
8052 break
8053 }
8054 v.reset(OpNeg8)
8055 v0 := b.NewValue0(v.Pos, OpDiv8, t)
8056 v1 := b.NewValue0(v.Pos, OpConst8, t)
8057 v1.AuxInt = int8ToAuxInt(-c)
8058 v0.AddArg2(n, v1)
8059 v.AddArg(v0)
8060 return true
8061 }
8062
8063
8064 for {
8065 t := v.Type
8066 x := v_0
8067 if v_1.Op != OpConst8 || auxIntToInt8(v_1.AuxInt) != -1<<7 {
8068 break
8069 }
8070 v.reset(OpRsh8Ux64)
8071 v0 := b.NewValue0(v.Pos, OpAnd8, t)
8072 v1 := b.NewValue0(v.Pos, OpNeg8, t)
8073 v1.AddArg(x)
8074 v0.AddArg2(x, v1)
8075 v2 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
8076 v2.AuxInt = int64ToAuxInt(7)
8077 v.AddArg2(v0, v2)
8078 return true
8079 }
8080
8081
8082
8083 for {
8084 t := v.Type
8085 n := v_0
8086 if v_1.Op != OpConst8 {
8087 break
8088 }
8089 c := auxIntToInt8(v_1.AuxInt)
8090 if !(isPowerOfTwo(c)) {
8091 break
8092 }
8093 v.reset(OpRsh8x64)
8094 v0 := b.NewValue0(v.Pos, OpAdd8, t)
8095 v1 := b.NewValue0(v.Pos, OpRsh8Ux64, t)
8096 v2 := b.NewValue0(v.Pos, OpRsh8x64, t)
8097 v3 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
8098 v3.AuxInt = int64ToAuxInt(7)
8099 v2.AddArg2(n, v3)
8100 v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
8101 v4.AuxInt = int64ToAuxInt(int64(8 - log8(c)))
8102 v1.AddArg2(v2, v4)
8103 v0.AddArg2(n, v1)
8104 v5 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
8105 v5.AuxInt = int64ToAuxInt(int64(log8(c)))
8106 v.AddArg2(v0, v5)
8107 return true
8108 }
8109
8110
8111
8112 for {
8113 t := v.Type
8114 x := v_0
8115 if v_1.Op != OpConst8 {
8116 break
8117 }
8118 c := auxIntToInt8(v_1.AuxInt)
8119 if !(smagicOK8(c)) {
8120 break
8121 }
8122 v.reset(OpSub8)
8123 v.Type = t
8124 v0 := b.NewValue0(v.Pos, OpRsh32x64, t)
8125 v1 := b.NewValue0(v.Pos, OpMul32, typ.UInt32)
8126 v2 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
8127 v2.AuxInt = int32ToAuxInt(int32(smagic8(c).m))
8128 v3 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
8129 v3.AddArg(x)
8130 v1.AddArg2(v2, v3)
8131 v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
8132 v4.AuxInt = int64ToAuxInt(8 + smagic8(c).s)
8133 v0.AddArg2(v1, v4)
8134 v5 := b.NewValue0(v.Pos, OpRsh32x64, t)
8135 v6 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
8136 v6.AuxInt = int64ToAuxInt(31)
8137 v5.AddArg2(v3, v6)
8138 v.AddArg2(v0, v5)
8139 return true
8140 }
8141 return false
8142 }
8143 func rewriteValuegeneric_OpDiv8u(v *Value) bool {
8144 v_1 := v.Args[1]
8145 v_0 := v.Args[0]
8146 b := v.Block
8147 typ := &b.Func.Config.Types
8148
8149
8150
8151 for {
8152 if v_0.Op != OpConst8 {
8153 break
8154 }
8155 c := auxIntToInt8(v_0.AuxInt)
8156 if v_1.Op != OpConst8 {
8157 break
8158 }
8159 d := auxIntToInt8(v_1.AuxInt)
8160 if !(d != 0) {
8161 break
8162 }
8163 v.reset(OpConst8)
8164 v.AuxInt = int8ToAuxInt(int8(uint8(c) / uint8(d)))
8165 return true
8166 }
8167
8168
8169
8170 for {
8171 n := v_0
8172 if v_1.Op != OpConst8 {
8173 break
8174 }
8175 c := auxIntToInt8(v_1.AuxInt)
8176 if !(isPowerOfTwo(c)) {
8177 break
8178 }
8179 v.reset(OpRsh8Ux64)
8180 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
8181 v0.AuxInt = int64ToAuxInt(log8(c))
8182 v.AddArg2(n, v0)
8183 return true
8184 }
8185
8186
8187
8188 for {
8189 x := v_0
8190 if v_1.Op != OpConst8 {
8191 break
8192 }
8193 c := auxIntToInt8(v_1.AuxInt)
8194 if !(umagicOK8(c)) {
8195 break
8196 }
8197 v.reset(OpTrunc32to8)
8198 v0 := b.NewValue0(v.Pos, OpRsh32Ux64, typ.UInt32)
8199 v1 := b.NewValue0(v.Pos, OpMul32, typ.UInt32)
8200 v2 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
8201 v2.AuxInt = int32ToAuxInt(int32(1<<8 + umagic8(c).m))
8202 v3 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
8203 v3.AddArg(x)
8204 v1.AddArg2(v2, v3)
8205 v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
8206 v4.AuxInt = int64ToAuxInt(8 + umagic8(c).s)
8207 v0.AddArg2(v1, v4)
8208 v.AddArg(v0)
8209 return true
8210 }
8211 return false
8212 }
8213 func rewriteValuegeneric_OpEq16(v *Value) bool {
8214 v_1 := v.Args[1]
8215 v_0 := v.Args[0]
8216 b := v.Block
8217 config := b.Func.Config
8218 typ := &b.Func.Config.Types
8219
8220
8221 for {
8222 x := v_0
8223 if x != v_1 {
8224 break
8225 }
8226 v.reset(OpConstBool)
8227 v.AuxInt = boolToAuxInt(true)
8228 return true
8229 }
8230
8231
8232 for {
8233 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
8234 if v_0.Op != OpConst16 {
8235 continue
8236 }
8237 t := v_0.Type
8238 c := auxIntToInt16(v_0.AuxInt)
8239 if v_1.Op != OpAdd16 {
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 != OpConst16 || v_1_0.Type != t {
8247 continue
8248 }
8249 d := auxIntToInt16(v_1_0.AuxInt)
8250 x := v_1_1
8251 v.reset(OpEq16)
8252 v0 := b.NewValue0(v.Pos, OpConst16, t)
8253 v0.AuxInt = int16ToAuxInt(c - d)
8254 v.AddArg2(v0, x)
8255 return true
8256 }
8257 }
8258 break
8259 }
8260
8261
8262 for {
8263 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
8264 if v_0.Op != OpConst16 {
8265 continue
8266 }
8267 c := auxIntToInt16(v_0.AuxInt)
8268 if v_1.Op != OpConst16 {
8269 continue
8270 }
8271 d := auxIntToInt16(v_1.AuxInt)
8272 v.reset(OpConstBool)
8273 v.AuxInt = boolToAuxInt(c == d)
8274 return true
8275 }
8276 break
8277 }
8278
8279
8280
8281 for {
8282 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
8283 if v_0.Op != OpMod16u {
8284 continue
8285 }
8286 _ = v_0.Args[1]
8287 x := v_0.Args[0]
8288 v_0_1 := v_0.Args[1]
8289 if v_0_1.Op != OpConst16 {
8290 continue
8291 }
8292 c := auxIntToInt16(v_0_1.AuxInt)
8293 if v_1.Op != OpConst16 || auxIntToInt16(v_1.AuxInt) != 0 || !(x.Op != OpConst16 && udivisibleOK16(c) && !hasSmallRotate(config)) {
8294 continue
8295 }
8296 v.reset(OpEq32)
8297 v0 := b.NewValue0(v.Pos, OpMod32u, typ.UInt32)
8298 v1 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
8299 v1.AddArg(x)
8300 v2 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
8301 v2.AuxInt = int32ToAuxInt(int32(uint16(c)))
8302 v0.AddArg2(v1, v2)
8303 v3 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
8304 v3.AuxInt = int32ToAuxInt(0)
8305 v.AddArg2(v0, v3)
8306 return true
8307 }
8308 break
8309 }
8310
8311
8312
8313 for {
8314 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
8315 if v_0.Op != OpMod16 {
8316 continue
8317 }
8318 _ = v_0.Args[1]
8319 x := v_0.Args[0]
8320 v_0_1 := v_0.Args[1]
8321 if v_0_1.Op != OpConst16 {
8322 continue
8323 }
8324 c := auxIntToInt16(v_0_1.AuxInt)
8325 if v_1.Op != OpConst16 || auxIntToInt16(v_1.AuxInt) != 0 || !(x.Op != OpConst16 && sdivisibleOK16(c) && !hasSmallRotate(config)) {
8326 continue
8327 }
8328 v.reset(OpEq32)
8329 v0 := b.NewValue0(v.Pos, OpMod32, typ.Int32)
8330 v1 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
8331 v1.AddArg(x)
8332 v2 := b.NewValue0(v.Pos, OpConst32, typ.Int32)
8333 v2.AuxInt = int32ToAuxInt(int32(c))
8334 v0.AddArg2(v1, v2)
8335 v3 := b.NewValue0(v.Pos, OpConst32, typ.Int32)
8336 v3.AuxInt = int32ToAuxInt(0)
8337 v.AddArg2(v0, v3)
8338 return true
8339 }
8340 break
8341 }
8342
8343
8344
8345 for {
8346 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
8347 x := v_0
8348 if v_1.Op != OpMul16 {
8349 continue
8350 }
8351 _ = v_1.Args[1]
8352 v_1_0 := v_1.Args[0]
8353 v_1_1 := v_1.Args[1]
8354 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
8355 if v_1_0.Op != OpConst16 {
8356 continue
8357 }
8358 c := auxIntToInt16(v_1_0.AuxInt)
8359 if v_1_1.Op != OpTrunc64to16 {
8360 continue
8361 }
8362 v_1_1_0 := v_1_1.Args[0]
8363 if v_1_1_0.Op != OpRsh64Ux64 {
8364 continue
8365 }
8366 _ = v_1_1_0.Args[1]
8367 mul := v_1_1_0.Args[0]
8368 if mul.Op != OpMul64 {
8369 continue
8370 }
8371 _ = mul.Args[1]
8372 mul_0 := mul.Args[0]
8373 mul_1 := mul.Args[1]
8374 for _i2 := 0; _i2 <= 1; _i2, mul_0, mul_1 = _i2+1, mul_1, mul_0 {
8375 if mul_0.Op != OpConst64 {
8376 continue
8377 }
8378 m := auxIntToInt64(mul_0.AuxInt)
8379 if mul_1.Op != OpZeroExt16to64 || x != mul_1.Args[0] {
8380 continue
8381 }
8382 v_1_1_0_1 := v_1_1_0.Args[1]
8383 if v_1_1_0_1.Op != OpConst64 {
8384 continue
8385 }
8386 s := auxIntToInt64(v_1_1_0_1.AuxInt)
8387 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)) {
8388 continue
8389 }
8390 v.reset(OpLeq16U)
8391 v0 := b.NewValue0(v.Pos, OpRotateLeft16, typ.UInt16)
8392 v1 := b.NewValue0(v.Pos, OpMul16, typ.UInt16)
8393 v2 := b.NewValue0(v.Pos, OpConst16, typ.UInt16)
8394 v2.AuxInt = int16ToAuxInt(int16(udivisible16(c).m))
8395 v1.AddArg2(v2, x)
8396 v3 := b.NewValue0(v.Pos, OpConst16, typ.UInt16)
8397 v3.AuxInt = int16ToAuxInt(int16(16 - udivisible16(c).k))
8398 v0.AddArg2(v1, v3)
8399 v4 := b.NewValue0(v.Pos, OpConst16, typ.UInt16)
8400 v4.AuxInt = int16ToAuxInt(int16(udivisible16(c).max))
8401 v.AddArg2(v0, v4)
8402 return true
8403 }
8404 }
8405 }
8406 break
8407 }
8408
8409
8410
8411 for {
8412 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
8413 x := v_0
8414 if v_1.Op != OpMul16 {
8415 continue
8416 }
8417 _ = v_1.Args[1]
8418 v_1_0 := v_1.Args[0]
8419 v_1_1 := v_1.Args[1]
8420 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
8421 if v_1_0.Op != OpConst16 {
8422 continue
8423 }
8424 c := auxIntToInt16(v_1_0.AuxInt)
8425 if v_1_1.Op != OpTrunc32to16 {
8426 continue
8427 }
8428 v_1_1_0 := v_1_1.Args[0]
8429 if v_1_1_0.Op != OpRsh32Ux64 {
8430 continue
8431 }
8432 _ = v_1_1_0.Args[1]
8433 mul := v_1_1_0.Args[0]
8434 if mul.Op != OpMul32 {
8435 continue
8436 }
8437 _ = mul.Args[1]
8438 mul_0 := mul.Args[0]
8439 mul_1 := mul.Args[1]
8440 for _i2 := 0; _i2 <= 1; _i2, mul_0, mul_1 = _i2+1, mul_1, mul_0 {
8441 if mul_0.Op != OpConst32 {
8442 continue
8443 }
8444 m := auxIntToInt32(mul_0.AuxInt)
8445 if mul_1.Op != OpZeroExt16to32 || x != mul_1.Args[0] {
8446 continue
8447 }
8448 v_1_1_0_1 := v_1_1_0.Args[1]
8449 if v_1_1_0_1.Op != OpConst64 {
8450 continue
8451 }
8452 s := auxIntToInt64(v_1_1_0_1.AuxInt)
8453 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)) {
8454 continue
8455 }
8456 v.reset(OpLeq16U)
8457 v0 := b.NewValue0(v.Pos, OpRotateLeft16, typ.UInt16)
8458 v1 := b.NewValue0(v.Pos, OpMul16, typ.UInt16)
8459 v2 := b.NewValue0(v.Pos, OpConst16, typ.UInt16)
8460 v2.AuxInt = int16ToAuxInt(int16(udivisible16(c).m))
8461 v1.AddArg2(v2, x)
8462 v3 := b.NewValue0(v.Pos, OpConst16, typ.UInt16)
8463 v3.AuxInt = int16ToAuxInt(int16(16 - udivisible16(c).k))
8464 v0.AddArg2(v1, v3)
8465 v4 := b.NewValue0(v.Pos, OpConst16, typ.UInt16)
8466 v4.AuxInt = int16ToAuxInt(int16(udivisible16(c).max))
8467 v.AddArg2(v0, v4)
8468 return true
8469 }
8470 }
8471 }
8472 break
8473 }
8474
8475
8476
8477 for {
8478 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
8479 x := v_0
8480 if v_1.Op != OpMul16 {
8481 continue
8482 }
8483 _ = v_1.Args[1]
8484 v_1_0 := v_1.Args[0]
8485 v_1_1 := v_1.Args[1]
8486 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
8487 if v_1_0.Op != OpConst16 {
8488 continue
8489 }
8490 c := auxIntToInt16(v_1_0.AuxInt)
8491 if v_1_1.Op != OpTrunc32to16 {
8492 continue
8493 }
8494 v_1_1_0 := v_1_1.Args[0]
8495 if v_1_1_0.Op != OpRsh32Ux64 {
8496 continue
8497 }
8498 _ = v_1_1_0.Args[1]
8499 mul := v_1_1_0.Args[0]
8500 if mul.Op != OpMul32 {
8501 continue
8502 }
8503 _ = mul.Args[1]
8504 mul_0 := mul.Args[0]
8505 mul_1 := mul.Args[1]
8506 for _i2 := 0; _i2 <= 1; _i2, mul_0, mul_1 = _i2+1, mul_1, mul_0 {
8507 if mul_0.Op != OpConst32 {
8508 continue
8509 }
8510 m := auxIntToInt32(mul_0.AuxInt)
8511 if mul_1.Op != OpRsh32Ux64 {
8512 continue
8513 }
8514 _ = mul_1.Args[1]
8515 mul_1_0 := mul_1.Args[0]
8516 if mul_1_0.Op != OpZeroExt16to32 || x != mul_1_0.Args[0] {
8517 continue
8518 }
8519 mul_1_1 := mul_1.Args[1]
8520 if mul_1_1.Op != OpConst64 || auxIntToInt64(mul_1_1.AuxInt) != 1 {
8521 continue
8522 }
8523 v_1_1_0_1 := v_1_1_0.Args[1]
8524 if v_1_1_0_1.Op != OpConst64 {
8525 continue
8526 }
8527 s := auxIntToInt64(v_1_1_0_1.AuxInt)
8528 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)) {
8529 continue
8530 }
8531 v.reset(OpLeq16U)
8532 v0 := b.NewValue0(v.Pos, OpRotateLeft16, typ.UInt16)
8533 v1 := b.NewValue0(v.Pos, OpMul16, typ.UInt16)
8534 v2 := b.NewValue0(v.Pos, OpConst16, typ.UInt16)
8535 v2.AuxInt = int16ToAuxInt(int16(udivisible16(c).m))
8536 v1.AddArg2(v2, x)
8537 v3 := b.NewValue0(v.Pos, OpConst16, typ.UInt16)
8538 v3.AuxInt = int16ToAuxInt(int16(16 - udivisible16(c).k))
8539 v0.AddArg2(v1, v3)
8540 v4 := b.NewValue0(v.Pos, OpConst16, typ.UInt16)
8541 v4.AuxInt = int16ToAuxInt(int16(udivisible16(c).max))
8542 v.AddArg2(v0, v4)
8543 return true
8544 }
8545 }
8546 }
8547 break
8548 }
8549
8550
8551
8552 for {
8553 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
8554 x := v_0
8555 if v_1.Op != OpMul16 {
8556 continue
8557 }
8558 _ = v_1.Args[1]
8559 v_1_0 := v_1.Args[0]
8560 v_1_1 := v_1.Args[1]
8561 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
8562 if v_1_0.Op != OpConst16 {
8563 continue
8564 }
8565 c := auxIntToInt16(v_1_0.AuxInt)
8566 if v_1_1.Op != OpTrunc32to16 {
8567 continue
8568 }
8569 v_1_1_0 := v_1_1.Args[0]
8570 if v_1_1_0.Op != OpRsh32Ux64 {
8571 continue
8572 }
8573 _ = v_1_1_0.Args[1]
8574 v_1_1_0_0 := v_1_1_0.Args[0]
8575 if v_1_1_0_0.Op != OpAvg32u {
8576 continue
8577 }
8578 _ = v_1_1_0_0.Args[1]
8579 v_1_1_0_0_0 := v_1_1_0_0.Args[0]
8580 if v_1_1_0_0_0.Op != OpLsh32x64 {
8581 continue
8582 }
8583 _ = v_1_1_0_0_0.Args[1]
8584 v_1_1_0_0_0_0 := v_1_1_0_0_0.Args[0]
8585 if v_1_1_0_0_0_0.Op != OpZeroExt16to32 || x != v_1_1_0_0_0_0.Args[0] {
8586 continue
8587 }
8588 v_1_1_0_0_0_1 := v_1_1_0_0_0.Args[1]
8589 if v_1_1_0_0_0_1.Op != OpConst64 || auxIntToInt64(v_1_1_0_0_0_1.AuxInt) != 16 {
8590 continue
8591 }
8592 mul := v_1_1_0_0.Args[1]
8593 if mul.Op != OpMul32 {
8594 continue
8595 }
8596 _ = mul.Args[1]
8597 mul_0 := mul.Args[0]
8598 mul_1 := mul.Args[1]
8599 for _i2 := 0; _i2 <= 1; _i2, mul_0, mul_1 = _i2+1, mul_1, mul_0 {
8600 if mul_0.Op != OpConst32 {
8601 continue
8602 }
8603 m := auxIntToInt32(mul_0.AuxInt)
8604 if mul_1.Op != OpZeroExt16to32 || x != mul_1.Args[0] {
8605 continue
8606 }
8607 v_1_1_0_1 := v_1_1_0.Args[1]
8608 if v_1_1_0_1.Op != OpConst64 {
8609 continue
8610 }
8611 s := auxIntToInt64(v_1_1_0_1.AuxInt)
8612 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)) {
8613 continue
8614 }
8615 v.reset(OpLeq16U)
8616 v0 := b.NewValue0(v.Pos, OpRotateLeft16, typ.UInt16)
8617 v1 := b.NewValue0(v.Pos, OpMul16, typ.UInt16)
8618 v2 := b.NewValue0(v.Pos, OpConst16, typ.UInt16)
8619 v2.AuxInt = int16ToAuxInt(int16(udivisible16(c).m))
8620 v1.AddArg2(v2, x)
8621 v3 := b.NewValue0(v.Pos, OpConst16, typ.UInt16)
8622 v3.AuxInt = int16ToAuxInt(int16(16 - udivisible16(c).k))
8623 v0.AddArg2(v1, v3)
8624 v4 := b.NewValue0(v.Pos, OpConst16, typ.UInt16)
8625 v4.AuxInt = int16ToAuxInt(int16(udivisible16(c).max))
8626 v.AddArg2(v0, v4)
8627 return true
8628 }
8629 }
8630 }
8631 break
8632 }
8633
8634
8635
8636 for {
8637 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
8638 x := v_0
8639 if v_1.Op != OpMul16 {
8640 continue
8641 }
8642 _ = v_1.Args[1]
8643 v_1_0 := v_1.Args[0]
8644 v_1_1 := v_1.Args[1]
8645 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
8646 if v_1_0.Op != OpConst16 {
8647 continue
8648 }
8649 c := auxIntToInt16(v_1_0.AuxInt)
8650 if v_1_1.Op != OpSub16 {
8651 continue
8652 }
8653 _ = v_1_1.Args[1]
8654 v_1_1_0 := v_1_1.Args[0]
8655 if v_1_1_0.Op != OpRsh32x64 {
8656 continue
8657 }
8658 _ = v_1_1_0.Args[1]
8659 mul := v_1_1_0.Args[0]
8660 if mul.Op != OpMul32 {
8661 continue
8662 }
8663 _ = mul.Args[1]
8664 mul_0 := mul.Args[0]
8665 mul_1 := mul.Args[1]
8666 for _i2 := 0; _i2 <= 1; _i2, mul_0, mul_1 = _i2+1, mul_1, mul_0 {
8667 if mul_0.Op != OpConst32 {
8668 continue
8669 }
8670 m := auxIntToInt32(mul_0.AuxInt)
8671 if mul_1.Op != OpSignExt16to32 || x != mul_1.Args[0] {
8672 continue
8673 }
8674 v_1_1_0_1 := v_1_1_0.Args[1]
8675 if v_1_1_0_1.Op != OpConst64 {
8676 continue
8677 }
8678 s := auxIntToInt64(v_1_1_0_1.AuxInt)
8679 v_1_1_1 := v_1_1.Args[1]
8680 if v_1_1_1.Op != OpRsh32x64 {
8681 continue
8682 }
8683 _ = v_1_1_1.Args[1]
8684 v_1_1_1_0 := v_1_1_1.Args[0]
8685 if v_1_1_1_0.Op != OpSignExt16to32 || x != v_1_1_1_0.Args[0] {
8686 continue
8687 }
8688 v_1_1_1_1 := v_1_1_1.Args[1]
8689 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)) {
8690 continue
8691 }
8692 v.reset(OpLeq16U)
8693 v0 := b.NewValue0(v.Pos, OpRotateLeft16, typ.UInt16)
8694 v1 := b.NewValue0(v.Pos, OpAdd16, typ.UInt16)
8695 v2 := b.NewValue0(v.Pos, OpMul16, typ.UInt16)
8696 v3 := b.NewValue0(v.Pos, OpConst16, typ.UInt16)
8697 v3.AuxInt = int16ToAuxInt(int16(sdivisible16(c).m))
8698 v2.AddArg2(v3, x)
8699 v4 := b.NewValue0(v.Pos, OpConst16, typ.UInt16)
8700 v4.AuxInt = int16ToAuxInt(int16(sdivisible16(c).a))
8701 v1.AddArg2(v2, v4)
8702 v5 := b.NewValue0(v.Pos, OpConst16, typ.UInt16)
8703 v5.AuxInt = int16ToAuxInt(int16(16 - sdivisible16(c).k))
8704 v0.AddArg2(v1, v5)
8705 v6 := b.NewValue0(v.Pos, OpConst16, typ.UInt16)
8706 v6.AuxInt = int16ToAuxInt(int16(sdivisible16(c).max))
8707 v.AddArg2(v0, v6)
8708 return true
8709 }
8710 }
8711 }
8712 break
8713 }
8714
8715
8716
8717 for {
8718 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
8719 n := v_0
8720 if v_1.Op != OpLsh16x64 {
8721 continue
8722 }
8723 _ = v_1.Args[1]
8724 v_1_0 := v_1.Args[0]
8725 if v_1_0.Op != OpRsh16x64 {
8726 continue
8727 }
8728 _ = v_1_0.Args[1]
8729 v_1_0_0 := v_1_0.Args[0]
8730 if v_1_0_0.Op != OpAdd16 {
8731 continue
8732 }
8733 t := v_1_0_0.Type
8734 _ = v_1_0_0.Args[1]
8735 v_1_0_0_0 := v_1_0_0.Args[0]
8736 v_1_0_0_1 := v_1_0_0.Args[1]
8737 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 {
8738 if n != v_1_0_0_0 || v_1_0_0_1.Op != OpRsh16Ux64 || v_1_0_0_1.Type != t {
8739 continue
8740 }
8741 _ = v_1_0_0_1.Args[1]
8742 v_1_0_0_1_0 := v_1_0_0_1.Args[0]
8743 if v_1_0_0_1_0.Op != OpRsh16x64 || v_1_0_0_1_0.Type != t {
8744 continue
8745 }
8746 _ = v_1_0_0_1_0.Args[1]
8747 if n != v_1_0_0_1_0.Args[0] {
8748 continue
8749 }
8750 v_1_0_0_1_0_1 := v_1_0_0_1_0.Args[1]
8751 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 {
8752 continue
8753 }
8754 v_1_0_0_1_1 := v_1_0_0_1.Args[1]
8755 if v_1_0_0_1_1.Op != OpConst64 || v_1_0_0_1_1.Type != typ.UInt64 {
8756 continue
8757 }
8758 kbar := auxIntToInt64(v_1_0_0_1_1.AuxInt)
8759 v_1_0_1 := v_1_0.Args[1]
8760 if v_1_0_1.Op != OpConst64 || v_1_0_1.Type != typ.UInt64 {
8761 continue
8762 }
8763 k := auxIntToInt64(v_1_0_1.AuxInt)
8764 v_1_1 := v_1.Args[1]
8765 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) {
8766 continue
8767 }
8768 v.reset(OpEq16)
8769 v0 := b.NewValue0(v.Pos, OpAnd16, t)
8770 v1 := b.NewValue0(v.Pos, OpConst16, t)
8771 v1.AuxInt = int16ToAuxInt(1<<uint(k) - 1)
8772 v0.AddArg2(n, v1)
8773 v2 := b.NewValue0(v.Pos, OpConst16, t)
8774 v2.AuxInt = int16ToAuxInt(0)
8775 v.AddArg2(v0, v2)
8776 return true
8777 }
8778 }
8779 break
8780 }
8781
8782
8783
8784 for {
8785 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
8786 s := v_0
8787 if s.Op != OpSub16 {
8788 continue
8789 }
8790 y := s.Args[1]
8791 x := s.Args[0]
8792 if v_1.Op != OpConst16 || auxIntToInt16(v_1.AuxInt) != 0 || !(s.Uses == 1) {
8793 continue
8794 }
8795 v.reset(OpEq16)
8796 v.AddArg2(x, y)
8797 return true
8798 }
8799 break
8800 }
8801
8802
8803
8804 for {
8805 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
8806 if v_0.Op != OpAnd16 {
8807 continue
8808 }
8809 t := v_0.Type
8810 _ = v_0.Args[1]
8811 v_0_0 := v_0.Args[0]
8812 v_0_1 := v_0.Args[1]
8813 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
8814 x := v_0_0
8815 if v_0_1.Op != OpConst16 || v_0_1.Type != t {
8816 continue
8817 }
8818 y := auxIntToInt16(v_0_1.AuxInt)
8819 if v_1.Op != OpConst16 || v_1.Type != t || auxIntToInt16(v_1.AuxInt) != y || !(oneBit16(y)) {
8820 continue
8821 }
8822 v.reset(OpNeq16)
8823 v0 := b.NewValue0(v.Pos, OpAnd16, t)
8824 v1 := b.NewValue0(v.Pos, OpConst16, t)
8825 v1.AuxInt = int16ToAuxInt(y)
8826 v0.AddArg2(x, v1)
8827 v2 := b.NewValue0(v.Pos, OpConst16, t)
8828 v2.AuxInt = int16ToAuxInt(0)
8829 v.AddArg2(v0, v2)
8830 return true
8831 }
8832 }
8833 break
8834 }
8835 return false
8836 }
8837 func rewriteValuegeneric_OpEq32(v *Value) bool {
8838 v_1 := v.Args[1]
8839 v_0 := v.Args[0]
8840 b := v.Block
8841 typ := &b.Func.Config.Types
8842
8843
8844 for {
8845 x := v_0
8846 if x != v_1 {
8847 break
8848 }
8849 v.reset(OpConstBool)
8850 v.AuxInt = boolToAuxInt(true)
8851 return true
8852 }
8853
8854
8855 for {
8856 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
8857 if v_0.Op != OpConst32 {
8858 continue
8859 }
8860 t := v_0.Type
8861 c := auxIntToInt32(v_0.AuxInt)
8862 if v_1.Op != OpAdd32 {
8863 continue
8864 }
8865 _ = v_1.Args[1]
8866 v_1_0 := v_1.Args[0]
8867 v_1_1 := v_1.Args[1]
8868 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
8869 if v_1_0.Op != OpConst32 || v_1_0.Type != t {
8870 continue
8871 }
8872 d := auxIntToInt32(v_1_0.AuxInt)
8873 x := v_1_1
8874 v.reset(OpEq32)
8875 v0 := b.NewValue0(v.Pos, OpConst32, t)
8876 v0.AuxInt = int32ToAuxInt(c - d)
8877 v.AddArg2(v0, x)
8878 return true
8879 }
8880 }
8881 break
8882 }
8883
8884
8885 for {
8886 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
8887 if v_0.Op != OpConst32 {
8888 continue
8889 }
8890 c := auxIntToInt32(v_0.AuxInt)
8891 if v_1.Op != OpConst32 {
8892 continue
8893 }
8894 d := auxIntToInt32(v_1.AuxInt)
8895 v.reset(OpConstBool)
8896 v.AuxInt = boolToAuxInt(c == d)
8897 return true
8898 }
8899 break
8900 }
8901
8902
8903
8904 for {
8905 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
8906 x := v_0
8907 if v_1.Op != OpMul32 {
8908 continue
8909 }
8910 _ = v_1.Args[1]
8911 v_1_0 := v_1.Args[0]
8912 v_1_1 := v_1.Args[1]
8913 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
8914 if v_1_0.Op != OpConst32 {
8915 continue
8916 }
8917 c := auxIntToInt32(v_1_0.AuxInt)
8918 if v_1_1.Op != OpRsh32Ux64 {
8919 continue
8920 }
8921 _ = v_1_1.Args[1]
8922 mul := v_1_1.Args[0]
8923 if mul.Op != OpHmul32u {
8924 continue
8925 }
8926 _ = mul.Args[1]
8927 mul_0 := mul.Args[0]
8928 mul_1 := mul.Args[1]
8929 for _i2 := 0; _i2 <= 1; _i2, mul_0, mul_1 = _i2+1, mul_1, mul_0 {
8930 if mul_0.Op != OpConst32 {
8931 continue
8932 }
8933 m := auxIntToInt32(mul_0.AuxInt)
8934 if x != mul_1 {
8935 continue
8936 }
8937 v_1_1_1 := v_1_1.Args[1]
8938 if v_1_1_1.Op != OpConst64 {
8939 continue
8940 }
8941 s := auxIntToInt64(v_1_1_1.AuxInt)
8942 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)) {
8943 continue
8944 }
8945 v.reset(OpLeq32U)
8946 v0 := b.NewValue0(v.Pos, OpRotateLeft32, typ.UInt32)
8947 v1 := b.NewValue0(v.Pos, OpMul32, typ.UInt32)
8948 v2 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
8949 v2.AuxInt = int32ToAuxInt(int32(udivisible32(c).m))
8950 v1.AddArg2(v2, x)
8951 v3 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
8952 v3.AuxInt = int32ToAuxInt(int32(32 - udivisible32(c).k))
8953 v0.AddArg2(v1, v3)
8954 v4 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
8955 v4.AuxInt = int32ToAuxInt(int32(udivisible32(c).max))
8956 v.AddArg2(v0, v4)
8957 return true
8958 }
8959 }
8960 }
8961 break
8962 }
8963
8964
8965
8966 for {
8967 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
8968 x := v_0
8969 if v_1.Op != OpMul32 {
8970 continue
8971 }
8972 _ = v_1.Args[1]
8973 v_1_0 := v_1.Args[0]
8974 v_1_1 := v_1.Args[1]
8975 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
8976 if v_1_0.Op != OpConst32 {
8977 continue
8978 }
8979 c := auxIntToInt32(v_1_0.AuxInt)
8980 if v_1_1.Op != OpRsh32Ux64 {
8981 continue
8982 }
8983 _ = v_1_1.Args[1]
8984 mul := v_1_1.Args[0]
8985 if mul.Op != OpHmul32u {
8986 continue
8987 }
8988 _ = mul.Args[1]
8989 mul_0 := mul.Args[0]
8990 mul_1 := mul.Args[1]
8991 for _i2 := 0; _i2 <= 1; _i2, mul_0, mul_1 = _i2+1, mul_1, mul_0 {
8992 if mul_0.Op != OpConst32 || mul_0.Type != typ.UInt32 {
8993 continue
8994 }
8995 m := auxIntToInt32(mul_0.AuxInt)
8996 if mul_1.Op != OpRsh32Ux64 {
8997 continue
8998 }
8999 _ = mul_1.Args[1]
9000 if x != mul_1.Args[0] {
9001 continue
9002 }
9003 mul_1_1 := mul_1.Args[1]
9004 if mul_1_1.Op != OpConst64 || auxIntToInt64(mul_1_1.AuxInt) != 1 {
9005 continue
9006 }
9007 v_1_1_1 := v_1_1.Args[1]
9008 if v_1_1_1.Op != OpConst64 {
9009 continue
9010 }
9011 s := auxIntToInt64(v_1_1_1.AuxInt)
9012 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)) {
9013 continue
9014 }
9015 v.reset(OpLeq32U)
9016 v0 := b.NewValue0(v.Pos, OpRotateLeft32, typ.UInt32)
9017 v1 := b.NewValue0(v.Pos, OpMul32, typ.UInt32)
9018 v2 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
9019 v2.AuxInt = int32ToAuxInt(int32(udivisible32(c).m))
9020 v1.AddArg2(v2, x)
9021 v3 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
9022 v3.AuxInt = int32ToAuxInt(int32(32 - udivisible32(c).k))
9023 v0.AddArg2(v1, v3)
9024 v4 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
9025 v4.AuxInt = int32ToAuxInt(int32(udivisible32(c).max))
9026 v.AddArg2(v0, v4)
9027 return true
9028 }
9029 }
9030 }
9031 break
9032 }
9033
9034
9035
9036 for {
9037 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
9038 x := v_0
9039 if v_1.Op != OpMul32 {
9040 continue
9041 }
9042 _ = v_1.Args[1]
9043 v_1_0 := v_1.Args[0]
9044 v_1_1 := v_1.Args[1]
9045 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
9046 if v_1_0.Op != OpConst32 {
9047 continue
9048 }
9049 c := auxIntToInt32(v_1_0.AuxInt)
9050 if v_1_1.Op != OpRsh32Ux64 {
9051 continue
9052 }
9053 _ = v_1_1.Args[1]
9054 v_1_1_0 := v_1_1.Args[0]
9055 if v_1_1_0.Op != OpAvg32u {
9056 continue
9057 }
9058 _ = v_1_1_0.Args[1]
9059 if x != v_1_1_0.Args[0] {
9060 continue
9061 }
9062 mul := v_1_1_0.Args[1]
9063 if mul.Op != OpHmul32u {
9064 continue
9065 }
9066 _ = mul.Args[1]
9067 mul_0 := mul.Args[0]
9068 mul_1 := mul.Args[1]
9069 for _i2 := 0; _i2 <= 1; _i2, mul_0, mul_1 = _i2+1, mul_1, mul_0 {
9070 if mul_0.Op != OpConst32 {
9071 continue
9072 }
9073 m := auxIntToInt32(mul_0.AuxInt)
9074 if x != mul_1 {
9075 continue
9076 }
9077 v_1_1_1 := v_1_1.Args[1]
9078 if v_1_1_1.Op != OpConst64 {
9079 continue
9080 }
9081 s := auxIntToInt64(v_1_1_1.AuxInt)
9082 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)) {
9083 continue
9084 }
9085 v.reset(OpLeq32U)
9086 v0 := b.NewValue0(v.Pos, OpRotateLeft32, typ.UInt32)
9087 v1 := b.NewValue0(v.Pos, OpMul32, typ.UInt32)
9088 v2 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
9089 v2.AuxInt = int32ToAuxInt(int32(udivisible32(c).m))
9090 v1.AddArg2(v2, x)
9091 v3 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
9092 v3.AuxInt = int32ToAuxInt(int32(32 - udivisible32(c).k))
9093 v0.AddArg2(v1, v3)
9094 v4 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
9095 v4.AuxInt = int32ToAuxInt(int32(udivisible32(c).max))
9096 v.AddArg2(v0, v4)
9097 return true
9098 }
9099 }
9100 }
9101 break
9102 }
9103
9104
9105
9106 for {
9107 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
9108 x := v_0
9109 if v_1.Op != OpMul32 {
9110 continue
9111 }
9112 _ = v_1.Args[1]
9113 v_1_0 := v_1.Args[0]
9114 v_1_1 := v_1.Args[1]
9115 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
9116 if v_1_0.Op != OpConst32 {
9117 continue
9118 }
9119 c := auxIntToInt32(v_1_0.AuxInt)
9120 if v_1_1.Op != OpTrunc64to32 {
9121 continue
9122 }
9123 v_1_1_0 := v_1_1.Args[0]
9124 if v_1_1_0.Op != OpRsh64Ux64 {
9125 continue
9126 }
9127 _ = v_1_1_0.Args[1]
9128 mul := v_1_1_0.Args[0]
9129 if mul.Op != OpMul64 {
9130 continue
9131 }
9132 _ = mul.Args[1]
9133 mul_0 := mul.Args[0]
9134 mul_1 := mul.Args[1]
9135 for _i2 := 0; _i2 <= 1; _i2, mul_0, mul_1 = _i2+1, mul_1, mul_0 {
9136 if mul_0.Op != OpConst64 {
9137 continue
9138 }
9139 m := auxIntToInt64(mul_0.AuxInt)
9140 if mul_1.Op != OpZeroExt32to64 || x != mul_1.Args[0] {
9141 continue
9142 }
9143 v_1_1_0_1 := v_1_1_0.Args[1]
9144 if v_1_1_0_1.Op != OpConst64 {
9145 continue
9146 }
9147 s := auxIntToInt64(v_1_1_0_1.AuxInt)
9148 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)) {
9149 continue
9150 }
9151 v.reset(OpLeq32U)
9152 v0 := b.NewValue0(v.Pos, OpRotateLeft32, typ.UInt32)
9153 v1 := b.NewValue0(v.Pos, OpMul32, typ.UInt32)
9154 v2 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
9155 v2.AuxInt = int32ToAuxInt(int32(udivisible32(c).m))
9156 v1.AddArg2(v2, x)
9157 v3 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
9158 v3.AuxInt = int32ToAuxInt(int32(32 - udivisible32(c).k))
9159 v0.AddArg2(v1, v3)
9160 v4 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
9161 v4.AuxInt = int32ToAuxInt(int32(udivisible32(c).max))
9162 v.AddArg2(v0, v4)
9163 return true
9164 }
9165 }
9166 }
9167 break
9168 }
9169
9170
9171
9172 for {
9173 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
9174 x := v_0
9175 if v_1.Op != OpMul32 {
9176 continue
9177 }
9178 _ = v_1.Args[1]
9179 v_1_0 := v_1.Args[0]
9180 v_1_1 := v_1.Args[1]
9181 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
9182 if v_1_0.Op != OpConst32 {
9183 continue
9184 }
9185 c := auxIntToInt32(v_1_0.AuxInt)
9186 if v_1_1.Op != OpTrunc64to32 {
9187 continue
9188 }
9189 v_1_1_0 := v_1_1.Args[0]
9190 if v_1_1_0.Op != OpRsh64Ux64 {
9191 continue
9192 }
9193 _ = v_1_1_0.Args[1]
9194 mul := v_1_1_0.Args[0]
9195 if mul.Op != OpMul64 {
9196 continue
9197 }
9198 _ = mul.Args[1]
9199 mul_0 := mul.Args[0]
9200 mul_1 := mul.Args[1]
9201 for _i2 := 0; _i2 <= 1; _i2, mul_0, mul_1 = _i2+1, mul_1, mul_0 {
9202 if mul_0.Op != OpConst64 {
9203 continue
9204 }
9205 m := auxIntToInt64(mul_0.AuxInt)
9206 if mul_1.Op != OpRsh64Ux64 {
9207 continue
9208 }
9209 _ = mul_1.Args[1]
9210 mul_1_0 := mul_1.Args[0]
9211 if mul_1_0.Op != OpZeroExt32to64 || x != mul_1_0.Args[0] {
9212 continue
9213 }
9214 mul_1_1 := mul_1.Args[1]
9215 if mul_1_1.Op != OpConst64 || auxIntToInt64(mul_1_1.AuxInt) != 1 {
9216 continue
9217 }
9218 v_1_1_0_1 := v_1_1_0.Args[1]
9219 if v_1_1_0_1.Op != OpConst64 {
9220 continue
9221 }
9222 s := auxIntToInt64(v_1_1_0_1.AuxInt)
9223 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)) {
9224 continue
9225 }
9226 v.reset(OpLeq32U)
9227 v0 := b.NewValue0(v.Pos, OpRotateLeft32, typ.UInt32)
9228 v1 := b.NewValue0(v.Pos, OpMul32, typ.UInt32)
9229 v2 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
9230 v2.AuxInt = int32ToAuxInt(int32(udivisible32(c).m))
9231 v1.AddArg2(v2, x)
9232 v3 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
9233 v3.AuxInt = int32ToAuxInt(int32(32 - udivisible32(c).k))
9234 v0.AddArg2(v1, v3)
9235 v4 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
9236 v4.AuxInt = int32ToAuxInt(int32(udivisible32(c).max))
9237 v.AddArg2(v0, v4)
9238 return true
9239 }
9240 }
9241 }
9242 break
9243 }
9244
9245
9246
9247 for {
9248 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
9249 x := v_0
9250 if v_1.Op != OpMul32 {
9251 continue
9252 }
9253 _ = v_1.Args[1]
9254 v_1_0 := v_1.Args[0]
9255 v_1_1 := v_1.Args[1]
9256 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
9257 if v_1_0.Op != OpConst32 {
9258 continue
9259 }
9260 c := auxIntToInt32(v_1_0.AuxInt)
9261 if v_1_1.Op != OpTrunc64to32 {
9262 continue
9263 }
9264 v_1_1_0 := v_1_1.Args[0]
9265 if v_1_1_0.Op != OpRsh64Ux64 {
9266 continue
9267 }
9268 _ = v_1_1_0.Args[1]
9269 v_1_1_0_0 := v_1_1_0.Args[0]
9270 if v_1_1_0_0.Op != OpAvg64u {
9271 continue
9272 }
9273 _ = v_1_1_0_0.Args[1]
9274 v_1_1_0_0_0 := v_1_1_0_0.Args[0]
9275 if v_1_1_0_0_0.Op != OpLsh64x64 {
9276 continue
9277 }
9278 _ = v_1_1_0_0_0.Args[1]
9279 v_1_1_0_0_0_0 := v_1_1_0_0_0.Args[0]
9280 if v_1_1_0_0_0_0.Op != OpZeroExt32to64 || x != v_1_1_0_0_0_0.Args[0] {
9281 continue
9282 }
9283 v_1_1_0_0_0_1 := v_1_1_0_0_0.Args[1]
9284 if v_1_1_0_0_0_1.Op != OpConst64 || auxIntToInt64(v_1_1_0_0_0_1.AuxInt) != 32 {
9285 continue
9286 }
9287 mul := v_1_1_0_0.Args[1]
9288 if mul.Op != OpMul64 {
9289 continue
9290 }
9291 _ = mul.Args[1]
9292 mul_0 := mul.Args[0]
9293 mul_1 := mul.Args[1]
9294 for _i2 := 0; _i2 <= 1; _i2, mul_0, mul_1 = _i2+1, mul_1, mul_0 {
9295 if mul_0.Op != OpConst64 {
9296 continue
9297 }
9298 m := auxIntToInt64(mul_0.AuxInt)
9299 if mul_1.Op != OpZeroExt32to64 || x != mul_1.Args[0] {
9300 continue
9301 }
9302 v_1_1_0_1 := v_1_1_0.Args[1]
9303 if v_1_1_0_1.Op != OpConst64 {
9304 continue
9305 }
9306 s := auxIntToInt64(v_1_1_0_1.AuxInt)
9307 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)) {
9308 continue
9309 }
9310 v.reset(OpLeq32U)
9311 v0 := b.NewValue0(v.Pos, OpRotateLeft32, typ.UInt32)
9312 v1 := b.NewValue0(v.Pos, OpMul32, typ.UInt32)
9313 v2 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
9314 v2.AuxInt = int32ToAuxInt(int32(udivisible32(c).m))
9315 v1.AddArg2(v2, x)
9316 v3 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
9317 v3.AuxInt = int32ToAuxInt(int32(32 - udivisible32(c).k))
9318 v0.AddArg2(v1, v3)
9319 v4 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
9320 v4.AuxInt = int32ToAuxInt(int32(udivisible32(c).max))
9321 v.AddArg2(v0, v4)
9322 return true
9323 }
9324 }
9325 }
9326 break
9327 }
9328
9329
9330
9331 for {
9332 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
9333 x := v_0
9334 if v_1.Op != OpMul32 {
9335 continue
9336 }
9337 _ = v_1.Args[1]
9338 v_1_0 := v_1.Args[0]
9339 v_1_1 := v_1.Args[1]
9340 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
9341 if v_1_0.Op != OpConst32 {
9342 continue
9343 }
9344 c := auxIntToInt32(v_1_0.AuxInt)
9345 if v_1_1.Op != OpSub32 {
9346 continue
9347 }
9348 _ = v_1_1.Args[1]
9349 v_1_1_0 := v_1_1.Args[0]
9350 if v_1_1_0.Op != OpRsh64x64 {
9351 continue
9352 }
9353 _ = v_1_1_0.Args[1]
9354 mul := v_1_1_0.Args[0]
9355 if mul.Op != OpMul64 {
9356 continue
9357 }
9358 _ = mul.Args[1]
9359 mul_0 := mul.Args[0]
9360 mul_1 := mul.Args[1]
9361 for _i2 := 0; _i2 <= 1; _i2, mul_0, mul_1 = _i2+1, mul_1, mul_0 {
9362 if mul_0.Op != OpConst64 {
9363 continue
9364 }
9365 m := auxIntToInt64(mul_0.AuxInt)
9366 if mul_1.Op != OpSignExt32to64 || x != mul_1.Args[0] {
9367 continue
9368 }
9369 v_1_1_0_1 := v_1_1_0.Args[1]
9370 if v_1_1_0_1.Op != OpConst64 {
9371 continue
9372 }
9373 s := auxIntToInt64(v_1_1_0_1.AuxInt)
9374 v_1_1_1 := v_1_1.Args[1]
9375 if v_1_1_1.Op != OpRsh64x64 {
9376 continue
9377 }
9378 _ = v_1_1_1.Args[1]
9379 v_1_1_1_0 := v_1_1_1.Args[0]
9380 if v_1_1_1_0.Op != OpSignExt32to64 || x != v_1_1_1_0.Args[0] {
9381 continue
9382 }
9383 v_1_1_1_1 := v_1_1_1.Args[1]
9384 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)) {
9385 continue
9386 }
9387 v.reset(OpLeq32U)
9388 v0 := b.NewValue0(v.Pos, OpRotateLeft32, typ.UInt32)
9389 v1 := b.NewValue0(v.Pos, OpAdd32, typ.UInt32)
9390 v2 := b.NewValue0(v.Pos, OpMul32, typ.UInt32)
9391 v3 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
9392 v3.AuxInt = int32ToAuxInt(int32(sdivisible32(c).m))
9393 v2.AddArg2(v3, x)
9394 v4 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
9395 v4.AuxInt = int32ToAuxInt(int32(sdivisible32(c).a))
9396 v1.AddArg2(v2, v4)
9397 v5 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
9398 v5.AuxInt = int32ToAuxInt(int32(32 - sdivisible32(c).k))
9399 v0.AddArg2(v1, v5)
9400 v6 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
9401 v6.AuxInt = int32ToAuxInt(int32(sdivisible32(c).max))
9402 v.AddArg2(v0, v6)
9403 return true
9404 }
9405 }
9406 }
9407 break
9408 }
9409
9410
9411
9412 for {
9413 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
9414 x := v_0
9415 if v_1.Op != OpMul32 {
9416 continue
9417 }
9418 _ = v_1.Args[1]
9419 v_1_0 := v_1.Args[0]
9420 v_1_1 := v_1.Args[1]
9421 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
9422 if v_1_0.Op != OpConst32 {
9423 continue
9424 }
9425 c := auxIntToInt32(v_1_0.AuxInt)
9426 if v_1_1.Op != OpSub32 {
9427 continue
9428 }
9429 _ = v_1_1.Args[1]
9430 v_1_1_0 := v_1_1.Args[0]
9431 if v_1_1_0.Op != OpRsh32x64 {
9432 continue
9433 }
9434 _ = v_1_1_0.Args[1]
9435 mul := v_1_1_0.Args[0]
9436 if mul.Op != OpHmul32 {
9437 continue
9438 }
9439 _ = mul.Args[1]
9440 mul_0 := mul.Args[0]
9441 mul_1 := mul.Args[1]
9442 for _i2 := 0; _i2 <= 1; _i2, mul_0, mul_1 = _i2+1, mul_1, mul_0 {
9443 if mul_0.Op != OpConst32 {
9444 continue
9445 }
9446 m := auxIntToInt32(mul_0.AuxInt)
9447 if x != mul_1 {
9448 continue
9449 }
9450 v_1_1_0_1 := v_1_1_0.Args[1]
9451 if v_1_1_0_1.Op != OpConst64 {
9452 continue
9453 }
9454 s := auxIntToInt64(v_1_1_0_1.AuxInt)
9455 v_1_1_1 := v_1_1.Args[1]
9456 if v_1_1_1.Op != OpRsh32x64 {
9457 continue
9458 }
9459 _ = v_1_1_1.Args[1]
9460 if x != v_1_1_1.Args[0] {
9461 continue
9462 }
9463 v_1_1_1_1 := v_1_1_1.Args[1]
9464 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)) {
9465 continue
9466 }
9467 v.reset(OpLeq32U)
9468 v0 := b.NewValue0(v.Pos, OpRotateLeft32, typ.UInt32)
9469 v1 := b.NewValue0(v.Pos, OpAdd32, typ.UInt32)
9470 v2 := b.NewValue0(v.Pos, OpMul32, typ.UInt32)
9471 v3 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
9472 v3.AuxInt = int32ToAuxInt(int32(sdivisible32(c).m))
9473 v2.AddArg2(v3, x)
9474 v4 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
9475 v4.AuxInt = int32ToAuxInt(int32(sdivisible32(c).a))
9476 v1.AddArg2(v2, v4)
9477 v5 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
9478 v5.AuxInt = int32ToAuxInt(int32(32 - sdivisible32(c).k))
9479 v0.AddArg2(v1, v5)
9480 v6 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
9481 v6.AuxInt = int32ToAuxInt(int32(sdivisible32(c).max))
9482 v.AddArg2(v0, v6)
9483 return true
9484 }
9485 }
9486 }
9487 break
9488 }
9489
9490
9491
9492 for {
9493 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
9494 x := v_0
9495 if v_1.Op != OpMul32 {
9496 continue
9497 }
9498 _ = v_1.Args[1]
9499 v_1_0 := v_1.Args[0]
9500 v_1_1 := v_1.Args[1]
9501 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
9502 if v_1_0.Op != OpConst32 {
9503 continue
9504 }
9505 c := auxIntToInt32(v_1_0.AuxInt)
9506 if v_1_1.Op != OpSub32 {
9507 continue
9508 }
9509 _ = v_1_1.Args[1]
9510 v_1_1_0 := v_1_1.Args[0]
9511 if v_1_1_0.Op != OpRsh32x64 {
9512 continue
9513 }
9514 _ = v_1_1_0.Args[1]
9515 v_1_1_0_0 := v_1_1_0.Args[0]
9516 if v_1_1_0_0.Op != OpAdd32 {
9517 continue
9518 }
9519 _ = v_1_1_0_0.Args[1]
9520 v_1_1_0_0_0 := v_1_1_0_0.Args[0]
9521 v_1_1_0_0_1 := v_1_1_0_0.Args[1]
9522 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 {
9523 mul := v_1_1_0_0_0
9524 if mul.Op != OpHmul32 {
9525 continue
9526 }
9527 _ = mul.Args[1]
9528 mul_0 := mul.Args[0]
9529 mul_1 := mul.Args[1]
9530 for _i3 := 0; _i3 <= 1; _i3, mul_0, mul_1 = _i3+1, mul_1, mul_0 {
9531 if mul_0.Op != OpConst32 {
9532 continue
9533 }
9534 m := auxIntToInt32(mul_0.AuxInt)
9535 if x != mul_1 || x != v_1_1_0_0_1 {
9536 continue
9537 }
9538 v_1_1_0_1 := v_1_1_0.Args[1]
9539 if v_1_1_0_1.Op != OpConst64 {
9540 continue
9541 }
9542 s := auxIntToInt64(v_1_1_0_1.AuxInt)
9543 v_1_1_1 := v_1_1.Args[1]
9544 if v_1_1_1.Op != OpRsh32x64 {
9545 continue
9546 }
9547 _ = v_1_1_1.Args[1]
9548 if x != v_1_1_1.Args[0] {
9549 continue
9550 }
9551 v_1_1_1_1 := v_1_1_1.Args[1]
9552 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)) {
9553 continue
9554 }
9555 v.reset(OpLeq32U)
9556 v0 := b.NewValue0(v.Pos, OpRotateLeft32, typ.UInt32)
9557 v1 := b.NewValue0(v.Pos, OpAdd32, typ.UInt32)
9558 v2 := b.NewValue0(v.Pos, OpMul32, typ.UInt32)
9559 v3 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
9560 v3.AuxInt = int32ToAuxInt(int32(sdivisible32(c).m))
9561 v2.AddArg2(v3, x)
9562 v4 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
9563 v4.AuxInt = int32ToAuxInt(int32(sdivisible32(c).a))
9564 v1.AddArg2(v2, v4)
9565 v5 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
9566 v5.AuxInt = int32ToAuxInt(int32(32 - sdivisible32(c).k))
9567 v0.AddArg2(v1, v5)
9568 v6 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
9569 v6.AuxInt = int32ToAuxInt(int32(sdivisible32(c).max))
9570 v.AddArg2(v0, v6)
9571 return true
9572 }
9573 }
9574 }
9575 }
9576 break
9577 }
9578
9579
9580
9581 for {
9582 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
9583 n := v_0
9584 if v_1.Op != OpLsh32x64 {
9585 continue
9586 }
9587 _ = v_1.Args[1]
9588 v_1_0 := v_1.Args[0]
9589 if v_1_0.Op != OpRsh32x64 {
9590 continue
9591 }
9592 _ = v_1_0.Args[1]
9593 v_1_0_0 := v_1_0.Args[0]
9594 if v_1_0_0.Op != OpAdd32 {
9595 continue
9596 }
9597 t := v_1_0_0.Type
9598 _ = v_1_0_0.Args[1]
9599 v_1_0_0_0 := v_1_0_0.Args[0]
9600 v_1_0_0_1 := v_1_0_0.Args[1]
9601 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 {
9602 if n != v_1_0_0_0 || v_1_0_0_1.Op != OpRsh32Ux64 || v_1_0_0_1.Type != t {
9603 continue
9604 }
9605 _ = v_1_0_0_1.Args[1]
9606 v_1_0_0_1_0 := v_1_0_0_1.Args[0]
9607 if v_1_0_0_1_0.Op != OpRsh32x64 || v_1_0_0_1_0.Type != t {
9608 continue
9609 }
9610 _ = v_1_0_0_1_0.Args[1]
9611 if n != v_1_0_0_1_0.Args[0] {
9612 continue
9613 }
9614 v_1_0_0_1_0_1 := v_1_0_0_1_0.Args[1]
9615 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 {
9616 continue
9617 }
9618 v_1_0_0_1_1 := v_1_0_0_1.Args[1]
9619 if v_1_0_0_1_1.Op != OpConst64 || v_1_0_0_1_1.Type != typ.UInt64 {
9620 continue
9621 }
9622 kbar := auxIntToInt64(v_1_0_0_1_1.AuxInt)
9623 v_1_0_1 := v_1_0.Args[1]
9624 if v_1_0_1.Op != OpConst64 || v_1_0_1.Type != typ.UInt64 {
9625 continue
9626 }
9627 k := auxIntToInt64(v_1_0_1.AuxInt)
9628 v_1_1 := v_1.Args[1]
9629 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) {
9630 continue
9631 }
9632 v.reset(OpEq32)
9633 v0 := b.NewValue0(v.Pos, OpAnd32, t)
9634 v1 := b.NewValue0(v.Pos, OpConst32, t)
9635 v1.AuxInt = int32ToAuxInt(1<<uint(k) - 1)
9636 v0.AddArg2(n, v1)
9637 v2 := b.NewValue0(v.Pos, OpConst32, t)
9638 v2.AuxInt = int32ToAuxInt(0)
9639 v.AddArg2(v0, v2)
9640 return true
9641 }
9642 }
9643 break
9644 }
9645
9646
9647
9648 for {
9649 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
9650 s := v_0
9651 if s.Op != OpSub32 {
9652 continue
9653 }
9654 y := s.Args[1]
9655 x := s.Args[0]
9656 if v_1.Op != OpConst32 || auxIntToInt32(v_1.AuxInt) != 0 || !(s.Uses == 1) {
9657 continue
9658 }
9659 v.reset(OpEq32)
9660 v.AddArg2(x, y)
9661 return true
9662 }
9663 break
9664 }
9665
9666
9667
9668 for {
9669 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
9670 if v_0.Op != OpAnd32 {
9671 continue
9672 }
9673 t := v_0.Type
9674 _ = v_0.Args[1]
9675 v_0_0 := v_0.Args[0]
9676 v_0_1 := v_0.Args[1]
9677 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
9678 x := v_0_0
9679 if v_0_1.Op != OpConst32 || v_0_1.Type != t {
9680 continue
9681 }
9682 y := auxIntToInt32(v_0_1.AuxInt)
9683 if v_1.Op != OpConst32 || v_1.Type != t || auxIntToInt32(v_1.AuxInt) != y || !(oneBit32(y)) {
9684 continue
9685 }
9686 v.reset(OpNeq32)
9687 v0 := b.NewValue0(v.Pos, OpAnd32, t)
9688 v1 := b.NewValue0(v.Pos, OpConst32, t)
9689 v1.AuxInt = int32ToAuxInt(y)
9690 v0.AddArg2(x, v1)
9691 v2 := b.NewValue0(v.Pos, OpConst32, t)
9692 v2.AuxInt = int32ToAuxInt(0)
9693 v.AddArg2(v0, v2)
9694 return true
9695 }
9696 }
9697 break
9698 }
9699 return false
9700 }
9701 func rewriteValuegeneric_OpEq32F(v *Value) bool {
9702 v_1 := v.Args[1]
9703 v_0 := v.Args[0]
9704
9705
9706 for {
9707 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
9708 if v_0.Op != OpConst32F {
9709 continue
9710 }
9711 c := auxIntToFloat32(v_0.AuxInt)
9712 if v_1.Op != OpConst32F {
9713 continue
9714 }
9715 d := auxIntToFloat32(v_1.AuxInt)
9716 v.reset(OpConstBool)
9717 v.AuxInt = boolToAuxInt(c == d)
9718 return true
9719 }
9720 break
9721 }
9722 return false
9723 }
9724 func rewriteValuegeneric_OpEq64(v *Value) bool {
9725 v_1 := v.Args[1]
9726 v_0 := v.Args[0]
9727 b := v.Block
9728 typ := &b.Func.Config.Types
9729
9730
9731 for {
9732 x := v_0
9733 if x != v_1 {
9734 break
9735 }
9736 v.reset(OpConstBool)
9737 v.AuxInt = boolToAuxInt(true)
9738 return true
9739 }
9740
9741
9742 for {
9743 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
9744 if v_0.Op != OpConst64 {
9745 continue
9746 }
9747 t := v_0.Type
9748 c := auxIntToInt64(v_0.AuxInt)
9749 if v_1.Op != OpAdd64 {
9750 continue
9751 }
9752 _ = v_1.Args[1]
9753 v_1_0 := v_1.Args[0]
9754 v_1_1 := v_1.Args[1]
9755 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
9756 if v_1_0.Op != OpConst64 || v_1_0.Type != t {
9757 continue
9758 }
9759 d := auxIntToInt64(v_1_0.AuxInt)
9760 x := v_1_1
9761 v.reset(OpEq64)
9762 v0 := b.NewValue0(v.Pos, OpConst64, t)
9763 v0.AuxInt = int64ToAuxInt(c - d)
9764 v.AddArg2(v0, x)
9765 return true
9766 }
9767 }
9768 break
9769 }
9770
9771
9772 for {
9773 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
9774 if v_0.Op != OpConst64 {
9775 continue
9776 }
9777 c := auxIntToInt64(v_0.AuxInt)
9778 if v_1.Op != OpConst64 {
9779 continue
9780 }
9781 d := auxIntToInt64(v_1.AuxInt)
9782 v.reset(OpConstBool)
9783 v.AuxInt = boolToAuxInt(c == d)
9784 return true
9785 }
9786 break
9787 }
9788
9789
9790
9791 for {
9792 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
9793 x := v_0
9794 if v_1.Op != OpMul64 {
9795 continue
9796 }
9797 _ = v_1.Args[1]
9798 v_1_0 := v_1.Args[0]
9799 v_1_1 := v_1.Args[1]
9800 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
9801 if v_1_0.Op != OpConst64 {
9802 continue
9803 }
9804 c := auxIntToInt64(v_1_0.AuxInt)
9805 if v_1_1.Op != OpRsh64Ux64 {
9806 continue
9807 }
9808 _ = v_1_1.Args[1]
9809 mul := v_1_1.Args[0]
9810 if mul.Op != OpHmul64u {
9811 continue
9812 }
9813 _ = mul.Args[1]
9814 mul_0 := mul.Args[0]
9815 mul_1 := mul.Args[1]
9816 for _i2 := 0; _i2 <= 1; _i2, mul_0, mul_1 = _i2+1, mul_1, mul_0 {
9817 if mul_0.Op != OpConst64 {
9818 continue
9819 }
9820 m := auxIntToInt64(mul_0.AuxInt)
9821 if x != mul_1 {
9822 continue
9823 }
9824 v_1_1_1 := v_1_1.Args[1]
9825 if v_1_1_1.Op != OpConst64 {
9826 continue
9827 }
9828 s := auxIntToInt64(v_1_1_1.AuxInt)
9829 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)) {
9830 continue
9831 }
9832 v.reset(OpLeq64U)
9833 v0 := b.NewValue0(v.Pos, OpRotateLeft64, typ.UInt64)
9834 v1 := b.NewValue0(v.Pos, OpMul64, typ.UInt64)
9835 v2 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
9836 v2.AuxInt = int64ToAuxInt(int64(udivisible64(c).m))
9837 v1.AddArg2(v2, x)
9838 v3 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
9839 v3.AuxInt = int64ToAuxInt(64 - udivisible64(c).k)
9840 v0.AddArg2(v1, v3)
9841 v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
9842 v4.AuxInt = int64ToAuxInt(int64(udivisible64(c).max))
9843 v.AddArg2(v0, v4)
9844 return true
9845 }
9846 }
9847 }
9848 break
9849 }
9850
9851
9852
9853 for {
9854 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
9855 x := v_0
9856 if v_1.Op != OpMul64 {
9857 continue
9858 }
9859 _ = v_1.Args[1]
9860 v_1_0 := v_1.Args[0]
9861 v_1_1 := v_1.Args[1]
9862 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
9863 if v_1_0.Op != OpConst64 {
9864 continue
9865 }
9866 c := auxIntToInt64(v_1_0.AuxInt)
9867 if v_1_1.Op != OpRsh64Ux64 {
9868 continue
9869 }
9870 _ = v_1_1.Args[1]
9871 mul := v_1_1.Args[0]
9872 if mul.Op != OpHmul64u {
9873 continue
9874 }
9875 _ = mul.Args[1]
9876 mul_0 := mul.Args[0]
9877 mul_1 := mul.Args[1]
9878 for _i2 := 0; _i2 <= 1; _i2, mul_0, mul_1 = _i2+1, mul_1, mul_0 {
9879 if mul_0.Op != OpConst64 {
9880 continue
9881 }
9882 m := auxIntToInt64(mul_0.AuxInt)
9883 if mul_1.Op != OpRsh64Ux64 {
9884 continue
9885 }
9886 _ = mul_1.Args[1]
9887 if x != mul_1.Args[0] {
9888 continue
9889 }
9890 mul_1_1 := mul_1.Args[1]
9891 if mul_1_1.Op != OpConst64 || auxIntToInt64(mul_1_1.AuxInt) != 1 {
9892 continue
9893 }
9894 v_1_1_1 := v_1_1.Args[1]
9895 if v_1_1_1.Op != OpConst64 {
9896 continue
9897 }
9898 s := auxIntToInt64(v_1_1_1.AuxInt)
9899 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)) {
9900 continue
9901 }
9902 v.reset(OpLeq64U)
9903 v0 := b.NewValue0(v.Pos, OpRotateLeft64, typ.UInt64)
9904 v1 := b.NewValue0(v.Pos, OpMul64, typ.UInt64)
9905 v2 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
9906 v2.AuxInt = int64ToAuxInt(int64(udivisible64(c).m))
9907 v1.AddArg2(v2, x)
9908 v3 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
9909 v3.AuxInt = int64ToAuxInt(64 - udivisible64(c).k)
9910 v0.AddArg2(v1, v3)
9911 v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
9912 v4.AuxInt = int64ToAuxInt(int64(udivisible64(c).max))
9913 v.AddArg2(v0, v4)
9914 return true
9915 }
9916 }
9917 }
9918 break
9919 }
9920
9921
9922
9923 for {
9924 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
9925 x := v_0
9926 if v_1.Op != OpMul64 {
9927 continue
9928 }
9929 _ = v_1.Args[1]
9930 v_1_0 := v_1.Args[0]
9931 v_1_1 := v_1.Args[1]
9932 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
9933 if v_1_0.Op != OpConst64 {
9934 continue
9935 }
9936 c := auxIntToInt64(v_1_0.AuxInt)
9937 if v_1_1.Op != OpRsh64Ux64 {
9938 continue
9939 }
9940 _ = v_1_1.Args[1]
9941 v_1_1_0 := v_1_1.Args[0]
9942 if v_1_1_0.Op != OpAvg64u {
9943 continue
9944 }
9945 _ = v_1_1_0.Args[1]
9946 if x != v_1_1_0.Args[0] {
9947 continue
9948 }
9949 mul := v_1_1_0.Args[1]
9950 if mul.Op != OpHmul64u {
9951 continue
9952 }
9953 _ = mul.Args[1]
9954 mul_0 := mul.Args[0]
9955 mul_1 := mul.Args[1]
9956 for _i2 := 0; _i2 <= 1; _i2, mul_0, mul_1 = _i2+1, mul_1, mul_0 {
9957 if mul_0.Op != OpConst64 {
9958 continue
9959 }
9960 m := auxIntToInt64(mul_0.AuxInt)
9961 if x != mul_1 {
9962 continue
9963 }
9964 v_1_1_1 := v_1_1.Args[1]
9965 if v_1_1_1.Op != OpConst64 {
9966 continue
9967 }
9968 s := auxIntToInt64(v_1_1_1.AuxInt)
9969 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)) {
9970 continue
9971 }
9972 v.reset(OpLeq64U)
9973 v0 := b.NewValue0(v.Pos, OpRotateLeft64, typ.UInt64)
9974 v1 := b.NewValue0(v.Pos, OpMul64, typ.UInt64)
9975 v2 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
9976 v2.AuxInt = int64ToAuxInt(int64(udivisible64(c).m))
9977 v1.AddArg2(v2, x)
9978 v3 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
9979 v3.AuxInt = int64ToAuxInt(64 - udivisible64(c).k)
9980 v0.AddArg2(v1, v3)
9981 v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
9982 v4.AuxInt = int64ToAuxInt(int64(udivisible64(c).max))
9983 v.AddArg2(v0, v4)
9984 return true
9985 }
9986 }
9987 }
9988 break
9989 }
9990
9991
9992
9993 for {
9994 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
9995 x := v_0
9996 if v_1.Op != OpMul64 {
9997 continue
9998 }
9999 _ = v_1.Args[1]
10000 v_1_0 := v_1.Args[0]
10001 v_1_1 := v_1.Args[1]
10002 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
10003 if v_1_0.Op != OpConst64 {
10004 continue
10005 }
10006 c := auxIntToInt64(v_1_0.AuxInt)
10007 if v_1_1.Op != OpSub64 {
10008 continue
10009 }
10010 _ = v_1_1.Args[1]
10011 v_1_1_0 := v_1_1.Args[0]
10012 if v_1_1_0.Op != OpRsh64x64 {
10013 continue
10014 }
10015 _ = v_1_1_0.Args[1]
10016 mul := v_1_1_0.Args[0]
10017 if mul.Op != OpHmul64 {
10018 continue
10019 }
10020 _ = mul.Args[1]
10021 mul_0 := mul.Args[0]
10022 mul_1 := mul.Args[1]
10023 for _i2 := 0; _i2 <= 1; _i2, mul_0, mul_1 = _i2+1, mul_1, mul_0 {
10024 if mul_0.Op != OpConst64 {
10025 continue
10026 }
10027 m := auxIntToInt64(mul_0.AuxInt)
10028 if x != mul_1 {
10029 continue
10030 }
10031 v_1_1_0_1 := v_1_1_0.Args[1]
10032 if v_1_1_0_1.Op != OpConst64 {
10033 continue
10034 }
10035 s := auxIntToInt64(v_1_1_0_1.AuxInt)
10036 v_1_1_1 := v_1_1.Args[1]
10037 if v_1_1_1.Op != OpRsh64x64 {
10038 continue
10039 }
10040 _ = v_1_1_1.Args[1]
10041 if x != v_1_1_1.Args[0] {
10042 continue
10043 }
10044 v_1_1_1_1 := v_1_1_1.Args[1]
10045 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)) {
10046 continue
10047 }
10048 v.reset(OpLeq64U)
10049 v0 := b.NewValue0(v.Pos, OpRotateLeft64, typ.UInt64)
10050 v1 := b.NewValue0(v.Pos, OpAdd64, typ.UInt64)
10051 v2 := b.NewValue0(v.Pos, OpMul64, typ.UInt64)
10052 v3 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
10053 v3.AuxInt = int64ToAuxInt(int64(sdivisible64(c).m))
10054 v2.AddArg2(v3, x)
10055 v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
10056 v4.AuxInt = int64ToAuxInt(int64(sdivisible64(c).a))
10057 v1.AddArg2(v2, v4)
10058 v5 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
10059 v5.AuxInt = int64ToAuxInt(64 - sdivisible64(c).k)
10060 v0.AddArg2(v1, v5)
10061 v6 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
10062 v6.AuxInt = int64ToAuxInt(int64(sdivisible64(c).max))
10063 v.AddArg2(v0, v6)
10064 return true
10065 }
10066 }
10067 }
10068 break
10069 }
10070
10071
10072
10073 for {
10074 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
10075 x := v_0
10076 if v_1.Op != OpMul64 {
10077 continue
10078 }
10079 _ = v_1.Args[1]
10080 v_1_0 := v_1.Args[0]
10081 v_1_1 := v_1.Args[1]
10082 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
10083 if v_1_0.Op != OpConst64 {
10084 continue
10085 }
10086 c := auxIntToInt64(v_1_0.AuxInt)
10087 if v_1_1.Op != OpSub64 {
10088 continue
10089 }
10090 _ = v_1_1.Args[1]
10091 v_1_1_0 := v_1_1.Args[0]
10092 if v_1_1_0.Op != OpRsh64x64 {
10093 continue
10094 }
10095 _ = v_1_1_0.Args[1]
10096 v_1_1_0_0 := v_1_1_0.Args[0]
10097 if v_1_1_0_0.Op != OpAdd64 {
10098 continue
10099 }
10100 _ = v_1_1_0_0.Args[1]
10101 v_1_1_0_0_0 := v_1_1_0_0.Args[0]
10102 v_1_1_0_0_1 := v_1_1_0_0.Args[1]
10103 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 {
10104 mul := v_1_1_0_0_0
10105 if mul.Op != OpHmul64 {
10106 continue
10107 }
10108 _ = mul.Args[1]
10109 mul_0 := mul.Args[0]
10110 mul_1 := mul.Args[1]
10111 for _i3 := 0; _i3 <= 1; _i3, mul_0, mul_1 = _i3+1, mul_1, mul_0 {
10112 if mul_0.Op != OpConst64 {
10113 continue
10114 }
10115 m := auxIntToInt64(mul_0.AuxInt)
10116 if x != mul_1 || x != v_1_1_0_0_1 {
10117 continue
10118 }
10119 v_1_1_0_1 := v_1_1_0.Args[1]
10120 if v_1_1_0_1.Op != OpConst64 {
10121 continue
10122 }
10123 s := auxIntToInt64(v_1_1_0_1.AuxInt)
10124 v_1_1_1 := v_1_1.Args[1]
10125 if v_1_1_1.Op != OpRsh64x64 {
10126 continue
10127 }
10128 _ = v_1_1_1.Args[1]
10129 if x != v_1_1_1.Args[0] {
10130 continue
10131 }
10132 v_1_1_1_1 := v_1_1_1.Args[1]
10133 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)) {
10134 continue
10135 }
10136 v.reset(OpLeq64U)
10137 v0 := b.NewValue0(v.Pos, OpRotateLeft64, typ.UInt64)
10138 v1 := b.NewValue0(v.Pos, OpAdd64, typ.UInt64)
10139 v2 := b.NewValue0(v.Pos, OpMul64, typ.UInt64)
10140 v3 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
10141 v3.AuxInt = int64ToAuxInt(int64(sdivisible64(c).m))
10142 v2.AddArg2(v3, x)
10143 v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
10144 v4.AuxInt = int64ToAuxInt(int64(sdivisible64(c).a))
10145 v1.AddArg2(v2, v4)
10146 v5 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
10147 v5.AuxInt = int64ToAuxInt(64 - sdivisible64(c).k)
10148 v0.AddArg2(v1, v5)
10149 v6 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
10150 v6.AuxInt = int64ToAuxInt(int64(sdivisible64(c).max))
10151 v.AddArg2(v0, v6)
10152 return true
10153 }
10154 }
10155 }
10156 }
10157 break
10158 }
10159
10160
10161
10162 for {
10163 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
10164 n := v_0
10165 if v_1.Op != OpLsh64x64 {
10166 continue
10167 }
10168 _ = v_1.Args[1]
10169 v_1_0 := v_1.Args[0]
10170 if v_1_0.Op != OpRsh64x64 {
10171 continue
10172 }
10173 _ = v_1_0.Args[1]
10174 v_1_0_0 := v_1_0.Args[0]
10175 if v_1_0_0.Op != OpAdd64 {
10176 continue
10177 }
10178 t := v_1_0_0.Type
10179 _ = v_1_0_0.Args[1]
10180 v_1_0_0_0 := v_1_0_0.Args[0]
10181 v_1_0_0_1 := v_1_0_0.Args[1]
10182 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 {
10183 if n != v_1_0_0_0 || v_1_0_0_1.Op != OpRsh64Ux64 || v_1_0_0_1.Type != t {
10184 continue
10185 }
10186 _ = v_1_0_0_1.Args[1]
10187 v_1_0_0_1_0 := v_1_0_0_1.Args[0]
10188 if v_1_0_0_1_0.Op != OpRsh64x64 || v_1_0_0_1_0.Type != t {
10189 continue
10190 }
10191 _ = v_1_0_0_1_0.Args[1]
10192 if n != v_1_0_0_1_0.Args[0] {
10193 continue
10194 }
10195 v_1_0_0_1_0_1 := v_1_0_0_1_0.Args[1]
10196 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 {
10197 continue
10198 }
10199 v_1_0_0_1_1 := v_1_0_0_1.Args[1]
10200 if v_1_0_0_1_1.Op != OpConst64 || v_1_0_0_1_1.Type != typ.UInt64 {
10201 continue
10202 }
10203 kbar := auxIntToInt64(v_1_0_0_1_1.AuxInt)
10204 v_1_0_1 := v_1_0.Args[1]
10205 if v_1_0_1.Op != OpConst64 || v_1_0_1.Type != typ.UInt64 {
10206 continue
10207 }
10208 k := auxIntToInt64(v_1_0_1.AuxInt)
10209 v_1_1 := v_1.Args[1]
10210 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) {
10211 continue
10212 }
10213 v.reset(OpEq64)
10214 v0 := b.NewValue0(v.Pos, OpAnd64, t)
10215 v1 := b.NewValue0(v.Pos, OpConst64, t)
10216 v1.AuxInt = int64ToAuxInt(1<<uint(k) - 1)
10217 v0.AddArg2(n, v1)
10218 v2 := b.NewValue0(v.Pos, OpConst64, t)
10219 v2.AuxInt = int64ToAuxInt(0)
10220 v.AddArg2(v0, v2)
10221 return true
10222 }
10223 }
10224 break
10225 }
10226
10227
10228
10229 for {
10230 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
10231 s := v_0
10232 if s.Op != OpSub64 {
10233 continue
10234 }
10235 y := s.Args[1]
10236 x := s.Args[0]
10237 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 0 || !(s.Uses == 1) {
10238 continue
10239 }
10240 v.reset(OpEq64)
10241 v.AddArg2(x, y)
10242 return true
10243 }
10244 break
10245 }
10246
10247
10248
10249 for {
10250 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
10251 if v_0.Op != OpAnd64 {
10252 continue
10253 }
10254 t := v_0.Type
10255 _ = v_0.Args[1]
10256 v_0_0 := v_0.Args[0]
10257 v_0_1 := v_0.Args[1]
10258 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
10259 x := v_0_0
10260 if v_0_1.Op != OpConst64 || v_0_1.Type != t {
10261 continue
10262 }
10263 y := auxIntToInt64(v_0_1.AuxInt)
10264 if v_1.Op != OpConst64 || v_1.Type != t || auxIntToInt64(v_1.AuxInt) != y || !(oneBit64(y)) {
10265 continue
10266 }
10267 v.reset(OpNeq64)
10268 v0 := b.NewValue0(v.Pos, OpAnd64, t)
10269 v1 := b.NewValue0(v.Pos, OpConst64, t)
10270 v1.AuxInt = int64ToAuxInt(y)
10271 v0.AddArg2(x, v1)
10272 v2 := b.NewValue0(v.Pos, OpConst64, t)
10273 v2.AuxInt = int64ToAuxInt(0)
10274 v.AddArg2(v0, v2)
10275 return true
10276 }
10277 }
10278 break
10279 }
10280 return false
10281 }
10282 func rewriteValuegeneric_OpEq64F(v *Value) bool {
10283 v_1 := v.Args[1]
10284 v_0 := v.Args[0]
10285
10286
10287 for {
10288 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
10289 if v_0.Op != OpConst64F {
10290 continue
10291 }
10292 c := auxIntToFloat64(v_0.AuxInt)
10293 if v_1.Op != OpConst64F {
10294 continue
10295 }
10296 d := auxIntToFloat64(v_1.AuxInt)
10297 v.reset(OpConstBool)
10298 v.AuxInt = boolToAuxInt(c == d)
10299 return true
10300 }
10301 break
10302 }
10303 return false
10304 }
10305 func rewriteValuegeneric_OpEq8(v *Value) bool {
10306 v_1 := v.Args[1]
10307 v_0 := v.Args[0]
10308 b := v.Block
10309 config := b.Func.Config
10310 typ := &b.Func.Config.Types
10311
10312
10313 for {
10314 x := v_0
10315 if x != v_1 {
10316 break
10317 }
10318 v.reset(OpConstBool)
10319 v.AuxInt = boolToAuxInt(true)
10320 return true
10321 }
10322
10323
10324 for {
10325 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
10326 if v_0.Op != OpConst8 {
10327 continue
10328 }
10329 t := v_0.Type
10330 c := auxIntToInt8(v_0.AuxInt)
10331 if v_1.Op != OpAdd8 {
10332 continue
10333 }
10334 _ = v_1.Args[1]
10335 v_1_0 := v_1.Args[0]
10336 v_1_1 := v_1.Args[1]
10337 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
10338 if v_1_0.Op != OpConst8 || v_1_0.Type != t {
10339 continue
10340 }
10341 d := auxIntToInt8(v_1_0.AuxInt)
10342 x := v_1_1
10343 v.reset(OpEq8)
10344 v0 := b.NewValue0(v.Pos, OpConst8, t)
10345 v0.AuxInt = int8ToAuxInt(c - d)
10346 v.AddArg2(v0, x)
10347 return true
10348 }
10349 }
10350 break
10351 }
10352
10353
10354 for {
10355 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
10356 if v_0.Op != OpConst8 {
10357 continue
10358 }
10359 c := auxIntToInt8(v_0.AuxInt)
10360 if v_1.Op != OpConst8 {
10361 continue
10362 }
10363 d := auxIntToInt8(v_1.AuxInt)
10364 v.reset(OpConstBool)
10365 v.AuxInt = boolToAuxInt(c == d)
10366 return true
10367 }
10368 break
10369 }
10370
10371
10372
10373 for {
10374 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
10375 if v_0.Op != OpMod8u {
10376 continue
10377 }
10378 _ = v_0.Args[1]
10379 x := v_0.Args[0]
10380 v_0_1 := v_0.Args[1]
10381 if v_0_1.Op != OpConst8 {
10382 continue
10383 }
10384 c := auxIntToInt8(v_0_1.AuxInt)
10385 if v_1.Op != OpConst8 || auxIntToInt8(v_1.AuxInt) != 0 || !(x.Op != OpConst8 && udivisibleOK8(c) && !hasSmallRotate(config)) {
10386 continue
10387 }
10388 v.reset(OpEq32)
10389 v0 := b.NewValue0(v.Pos, OpMod32u, typ.UInt32)
10390 v1 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
10391 v1.AddArg(x)
10392 v2 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
10393 v2.AuxInt = int32ToAuxInt(int32(uint8(c)))
10394 v0.AddArg2(v1, v2)
10395 v3 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
10396 v3.AuxInt = int32ToAuxInt(0)
10397 v.AddArg2(v0, v3)
10398 return true
10399 }
10400 break
10401 }
10402
10403
10404
10405 for {
10406 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
10407 if v_0.Op != OpMod8 {
10408 continue
10409 }
10410 _ = v_0.Args[1]
10411 x := v_0.Args[0]
10412 v_0_1 := v_0.Args[1]
10413 if v_0_1.Op != OpConst8 {
10414 continue
10415 }
10416 c := auxIntToInt8(v_0_1.AuxInt)
10417 if v_1.Op != OpConst8 || auxIntToInt8(v_1.AuxInt) != 0 || !(x.Op != OpConst8 && sdivisibleOK8(c) && !hasSmallRotate(config)) {
10418 continue
10419 }
10420 v.reset(OpEq32)
10421 v0 := b.NewValue0(v.Pos, OpMod32, typ.Int32)
10422 v1 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
10423 v1.AddArg(x)
10424 v2 := b.NewValue0(v.Pos, OpConst32, typ.Int32)
10425 v2.AuxInt = int32ToAuxInt(int32(c))
10426 v0.AddArg2(v1, v2)
10427 v3 := b.NewValue0(v.Pos, OpConst32, typ.Int32)
10428 v3.AuxInt = int32ToAuxInt(0)
10429 v.AddArg2(v0, v3)
10430 return true
10431 }
10432 break
10433 }
10434
10435
10436
10437 for {
10438 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
10439 x := v_0
10440 if v_1.Op != OpMul8 {
10441 continue
10442 }
10443 _ = v_1.Args[1]
10444 v_1_0 := v_1.Args[0]
10445 v_1_1 := v_1.Args[1]
10446 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
10447 if v_1_0.Op != OpConst8 {
10448 continue
10449 }
10450 c := auxIntToInt8(v_1_0.AuxInt)
10451 if v_1_1.Op != OpTrunc32to8 {
10452 continue
10453 }
10454 v_1_1_0 := v_1_1.Args[0]
10455 if v_1_1_0.Op != OpRsh32Ux64 {
10456 continue
10457 }
10458 _ = v_1_1_0.Args[1]
10459 mul := v_1_1_0.Args[0]
10460 if mul.Op != OpMul32 {
10461 continue
10462 }
10463 _ = mul.Args[1]
10464 mul_0 := mul.Args[0]
10465 mul_1 := mul.Args[1]
10466 for _i2 := 0; _i2 <= 1; _i2, mul_0, mul_1 = _i2+1, mul_1, mul_0 {
10467 if mul_0.Op != OpConst32 {
10468 continue
10469 }
10470 m := auxIntToInt32(mul_0.AuxInt)
10471 if mul_1.Op != OpZeroExt8to32 || x != mul_1.Args[0] {
10472 continue
10473 }
10474 v_1_1_0_1 := v_1_1_0.Args[1]
10475 if v_1_1_0_1.Op != OpConst64 {
10476 continue
10477 }
10478 s := auxIntToInt64(v_1_1_0_1.AuxInt)
10479 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)) {
10480 continue
10481 }
10482 v.reset(OpLeq8U)
10483 v0 := b.NewValue0(v.Pos, OpRotateLeft8, typ.UInt8)
10484 v1 := b.NewValue0(v.Pos, OpMul8, typ.UInt8)
10485 v2 := b.NewValue0(v.Pos, OpConst8, typ.UInt8)
10486 v2.AuxInt = int8ToAuxInt(int8(udivisible8(c).m))
10487 v1.AddArg2(v2, x)
10488 v3 := b.NewValue0(v.Pos, OpConst8, typ.UInt8)
10489 v3.AuxInt = int8ToAuxInt(int8(8 - udivisible8(c).k))
10490 v0.AddArg2(v1, v3)
10491 v4 := b.NewValue0(v.Pos, OpConst8, typ.UInt8)
10492 v4.AuxInt = int8ToAuxInt(int8(udivisible8(c).max))
10493 v.AddArg2(v0, v4)
10494 return true
10495 }
10496 }
10497 }
10498 break
10499 }
10500
10501
10502
10503 for {
10504 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
10505 x := v_0
10506 if v_1.Op != OpMul8 {
10507 continue
10508 }
10509 _ = v_1.Args[1]
10510 v_1_0 := v_1.Args[0]
10511 v_1_1 := v_1.Args[1]
10512 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
10513 if v_1_0.Op != OpConst8 {
10514 continue
10515 }
10516 c := auxIntToInt8(v_1_0.AuxInt)
10517 if v_1_1.Op != OpSub8 {
10518 continue
10519 }
10520 _ = v_1_1.Args[1]
10521 v_1_1_0 := v_1_1.Args[0]
10522 if v_1_1_0.Op != OpRsh32x64 {
10523 continue
10524 }
10525 _ = v_1_1_0.Args[1]
10526 mul := v_1_1_0.Args[0]
10527 if mul.Op != OpMul32 {
10528 continue
10529 }
10530 _ = mul.Args[1]
10531 mul_0 := mul.Args[0]
10532 mul_1 := mul.Args[1]
10533 for _i2 := 0; _i2 <= 1; _i2, mul_0, mul_1 = _i2+1, mul_1, mul_0 {
10534 if mul_0.Op != OpConst32 {
10535 continue
10536 }
10537 m := auxIntToInt32(mul_0.AuxInt)
10538 if mul_1.Op != OpSignExt8to32 || x != mul_1.Args[0] {
10539 continue
10540 }
10541 v_1_1_0_1 := v_1_1_0.Args[1]
10542 if v_1_1_0_1.Op != OpConst64 {
10543 continue
10544 }
10545 s := auxIntToInt64(v_1_1_0_1.AuxInt)
10546 v_1_1_1 := v_1_1.Args[1]
10547 if v_1_1_1.Op != OpRsh32x64 {
10548 continue
10549 }
10550 _ = v_1_1_1.Args[1]
10551 v_1_1_1_0 := v_1_1_1.Args[0]
10552 if v_1_1_1_0.Op != OpSignExt8to32 || x != v_1_1_1_0.Args[0] {
10553 continue
10554 }
10555 v_1_1_1_1 := v_1_1_1.Args[1]
10556 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)) {
10557 continue
10558 }
10559 v.reset(OpLeq8U)
10560 v0 := b.NewValue0(v.Pos, OpRotateLeft8, typ.UInt8)
10561 v1 := b.NewValue0(v.Pos, OpAdd8, typ.UInt8)
10562 v2 := b.NewValue0(v.Pos, OpMul8, typ.UInt8)
10563 v3 := b.NewValue0(v.Pos, OpConst8, typ.UInt8)
10564 v3.AuxInt = int8ToAuxInt(int8(sdivisible8(c).m))
10565 v2.AddArg2(v3, x)
10566 v4 := b.NewValue0(v.Pos, OpConst8, typ.UInt8)
10567 v4.AuxInt = int8ToAuxInt(int8(sdivisible8(c).a))
10568 v1.AddArg2(v2, v4)
10569 v5 := b.NewValue0(v.Pos, OpConst8, typ.UInt8)
10570 v5.AuxInt = int8ToAuxInt(int8(8 - sdivisible8(c).k))
10571 v0.AddArg2(v1, v5)
10572 v6 := b.NewValue0(v.Pos, OpConst8, typ.UInt8)
10573 v6.AuxInt = int8ToAuxInt(int8(sdivisible8(c).max))
10574 v.AddArg2(v0, v6)
10575 return true
10576 }
10577 }
10578 }
10579 break
10580 }
10581
10582
10583
10584 for {
10585 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
10586 n := v_0
10587 if v_1.Op != OpLsh8x64 {
10588 continue
10589 }
10590 _ = v_1.Args[1]
10591 v_1_0 := v_1.Args[0]
10592 if v_1_0.Op != OpRsh8x64 {
10593 continue
10594 }
10595 _ = v_1_0.Args[1]
10596 v_1_0_0 := v_1_0.Args[0]
10597 if v_1_0_0.Op != OpAdd8 {
10598 continue
10599 }
10600 t := v_1_0_0.Type
10601 _ = v_1_0_0.Args[1]
10602 v_1_0_0_0 := v_1_0_0.Args[0]
10603 v_1_0_0_1 := v_1_0_0.Args[1]
10604 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 {
10605 if n != v_1_0_0_0 || v_1_0_0_1.Op != OpRsh8Ux64 || v_1_0_0_1.Type != t {
10606 continue
10607 }
10608 _ = v_1_0_0_1.Args[1]
10609 v_1_0_0_1_0 := v_1_0_0_1.Args[0]
10610 if v_1_0_0_1_0.Op != OpRsh8x64 || v_1_0_0_1_0.Type != t {
10611 continue
10612 }
10613 _ = v_1_0_0_1_0.Args[1]
10614 if n != v_1_0_0_1_0.Args[0] {
10615 continue
10616 }
10617 v_1_0_0_1_0_1 := v_1_0_0_1_0.Args[1]
10618 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 {
10619 continue
10620 }
10621 v_1_0_0_1_1 := v_1_0_0_1.Args[1]
10622 if v_1_0_0_1_1.Op != OpConst64 || v_1_0_0_1_1.Type != typ.UInt64 {
10623 continue
10624 }
10625 kbar := auxIntToInt64(v_1_0_0_1_1.AuxInt)
10626 v_1_0_1 := v_1_0.Args[1]
10627 if v_1_0_1.Op != OpConst64 || v_1_0_1.Type != typ.UInt64 {
10628 continue
10629 }
10630 k := auxIntToInt64(v_1_0_1.AuxInt)
10631 v_1_1 := v_1.Args[1]
10632 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) {
10633 continue
10634 }
10635 v.reset(OpEq8)
10636 v0 := b.NewValue0(v.Pos, OpAnd8, t)
10637 v1 := b.NewValue0(v.Pos, OpConst8, t)
10638 v1.AuxInt = int8ToAuxInt(1<<uint(k) - 1)
10639 v0.AddArg2(n, v1)
10640 v2 := b.NewValue0(v.Pos, OpConst8, t)
10641 v2.AuxInt = int8ToAuxInt(0)
10642 v.AddArg2(v0, v2)
10643 return true
10644 }
10645 }
10646 break
10647 }
10648
10649
10650
10651 for {
10652 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
10653 s := v_0
10654 if s.Op != OpSub8 {
10655 continue
10656 }
10657 y := s.Args[1]
10658 x := s.Args[0]
10659 if v_1.Op != OpConst8 || auxIntToInt8(v_1.AuxInt) != 0 || !(s.Uses == 1) {
10660 continue
10661 }
10662 v.reset(OpEq8)
10663 v.AddArg2(x, y)
10664 return true
10665 }
10666 break
10667 }
10668
10669
10670
10671 for {
10672 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
10673 if v_0.Op != OpAnd8 {
10674 continue
10675 }
10676 t := v_0.Type
10677 _ = v_0.Args[1]
10678 v_0_0 := v_0.Args[0]
10679 v_0_1 := v_0.Args[1]
10680 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
10681 x := v_0_0
10682 if v_0_1.Op != OpConst8 || v_0_1.Type != t {
10683 continue
10684 }
10685 y := auxIntToInt8(v_0_1.AuxInt)
10686 if v_1.Op != OpConst8 || v_1.Type != t || auxIntToInt8(v_1.AuxInt) != y || !(oneBit8(y)) {
10687 continue
10688 }
10689 v.reset(OpNeq8)
10690 v0 := b.NewValue0(v.Pos, OpAnd8, t)
10691 v1 := b.NewValue0(v.Pos, OpConst8, t)
10692 v1.AuxInt = int8ToAuxInt(y)
10693 v0.AddArg2(x, v1)
10694 v2 := b.NewValue0(v.Pos, OpConst8, t)
10695 v2.AuxInt = int8ToAuxInt(0)
10696 v.AddArg2(v0, v2)
10697 return true
10698 }
10699 }
10700 break
10701 }
10702 return false
10703 }
10704 func rewriteValuegeneric_OpEqB(v *Value) bool {
10705 v_1 := v.Args[1]
10706 v_0 := v.Args[0]
10707
10708
10709 for {
10710 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
10711 if v_0.Op != OpConstBool {
10712 continue
10713 }
10714 c := auxIntToBool(v_0.AuxInt)
10715 if v_1.Op != OpConstBool {
10716 continue
10717 }
10718 d := auxIntToBool(v_1.AuxInt)
10719 v.reset(OpConstBool)
10720 v.AuxInt = boolToAuxInt(c == d)
10721 return true
10722 }
10723 break
10724 }
10725
10726
10727 for {
10728 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
10729 if v_0.Op != OpConstBool || auxIntToBool(v_0.AuxInt) != false {
10730 continue
10731 }
10732 x := v_1
10733 v.reset(OpNot)
10734 v.AddArg(x)
10735 return true
10736 }
10737 break
10738 }
10739
10740
10741 for {
10742 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
10743 if v_0.Op != OpConstBool || auxIntToBool(v_0.AuxInt) != true {
10744 continue
10745 }
10746 x := v_1
10747 v.copyOf(x)
10748 return true
10749 }
10750 break
10751 }
10752 return false
10753 }
10754 func rewriteValuegeneric_OpEqInter(v *Value) bool {
10755 v_1 := v.Args[1]
10756 v_0 := v.Args[0]
10757 b := v.Block
10758 typ := &b.Func.Config.Types
10759
10760
10761 for {
10762 x := v_0
10763 y := v_1
10764 v.reset(OpEqPtr)
10765 v0 := b.NewValue0(v.Pos, OpITab, typ.Uintptr)
10766 v0.AddArg(x)
10767 v1 := b.NewValue0(v.Pos, OpITab, typ.Uintptr)
10768 v1.AddArg(y)
10769 v.AddArg2(v0, v1)
10770 return true
10771 }
10772 }
10773 func rewriteValuegeneric_OpEqPtr(v *Value) bool {
10774 v_1 := v.Args[1]
10775 v_0 := v.Args[0]
10776 b := v.Block
10777 typ := &b.Func.Config.Types
10778
10779
10780 for {
10781 x := v_0
10782 if x != v_1 {
10783 break
10784 }
10785 v.reset(OpConstBool)
10786 v.AuxInt = boolToAuxInt(true)
10787 return true
10788 }
10789
10790
10791 for {
10792 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
10793 if v_0.Op != OpAddr {
10794 continue
10795 }
10796 x := auxToSym(v_0.Aux)
10797 if v_1.Op != OpAddr {
10798 continue
10799 }
10800 y := auxToSym(v_1.Aux)
10801 v.reset(OpConstBool)
10802 v.AuxInt = boolToAuxInt(x == y)
10803 return true
10804 }
10805 break
10806 }
10807
10808
10809 for {
10810 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
10811 if v_0.Op != OpAddr {
10812 continue
10813 }
10814 x := auxToSym(v_0.Aux)
10815 if v_1.Op != OpOffPtr {
10816 continue
10817 }
10818 o := auxIntToInt64(v_1.AuxInt)
10819 v_1_0 := v_1.Args[0]
10820 if v_1_0.Op != OpAddr {
10821 continue
10822 }
10823 y := auxToSym(v_1_0.Aux)
10824 v.reset(OpConstBool)
10825 v.AuxInt = boolToAuxInt(x == y && o == 0)
10826 return true
10827 }
10828 break
10829 }
10830
10831
10832 for {
10833 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
10834 if v_0.Op != OpOffPtr {
10835 continue
10836 }
10837 o1 := auxIntToInt64(v_0.AuxInt)
10838 v_0_0 := v_0.Args[0]
10839 if v_0_0.Op != OpAddr {
10840 continue
10841 }
10842 x := auxToSym(v_0_0.Aux)
10843 if v_1.Op != OpOffPtr {
10844 continue
10845 }
10846 o2 := auxIntToInt64(v_1.AuxInt)
10847 v_1_0 := v_1.Args[0]
10848 if v_1_0.Op != OpAddr {
10849 continue
10850 }
10851 y := auxToSym(v_1_0.Aux)
10852 v.reset(OpConstBool)
10853 v.AuxInt = boolToAuxInt(x == y && o1 == o2)
10854 return true
10855 }
10856 break
10857 }
10858
10859
10860 for {
10861 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
10862 if v_0.Op != OpLocalAddr {
10863 continue
10864 }
10865 x := auxToSym(v_0.Aux)
10866 if v_1.Op != OpLocalAddr {
10867 continue
10868 }
10869 y := auxToSym(v_1.Aux)
10870 v.reset(OpConstBool)
10871 v.AuxInt = boolToAuxInt(x == y)
10872 return true
10873 }
10874 break
10875 }
10876
10877
10878 for {
10879 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
10880 if v_0.Op != OpLocalAddr {
10881 continue
10882 }
10883 x := auxToSym(v_0.Aux)
10884 if v_1.Op != OpOffPtr {
10885 continue
10886 }
10887 o := auxIntToInt64(v_1.AuxInt)
10888 v_1_0 := v_1.Args[0]
10889 if v_1_0.Op != OpLocalAddr {
10890 continue
10891 }
10892 y := auxToSym(v_1_0.Aux)
10893 v.reset(OpConstBool)
10894 v.AuxInt = boolToAuxInt(x == y && o == 0)
10895 return true
10896 }
10897 break
10898 }
10899
10900
10901 for {
10902 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
10903 if v_0.Op != OpOffPtr {
10904 continue
10905 }
10906 o1 := auxIntToInt64(v_0.AuxInt)
10907 v_0_0 := v_0.Args[0]
10908 if v_0_0.Op != OpLocalAddr {
10909 continue
10910 }
10911 x := auxToSym(v_0_0.Aux)
10912 if v_1.Op != OpOffPtr {
10913 continue
10914 }
10915 o2 := auxIntToInt64(v_1.AuxInt)
10916 v_1_0 := v_1.Args[0]
10917 if v_1_0.Op != OpLocalAddr {
10918 continue
10919 }
10920 y := auxToSym(v_1_0.Aux)
10921 v.reset(OpConstBool)
10922 v.AuxInt = boolToAuxInt(x == y && o1 == o2)
10923 return true
10924 }
10925 break
10926 }
10927
10928
10929
10930 for {
10931 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
10932 if v_0.Op != OpOffPtr {
10933 continue
10934 }
10935 o1 := auxIntToInt64(v_0.AuxInt)
10936 p1 := v_0.Args[0]
10937 p2 := v_1
10938 if !(isSamePtr(p1, p2)) {
10939 continue
10940 }
10941 v.reset(OpConstBool)
10942 v.AuxInt = boolToAuxInt(o1 == 0)
10943 return true
10944 }
10945 break
10946 }
10947
10948
10949
10950 for {
10951 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
10952 if v_0.Op != OpOffPtr {
10953 continue
10954 }
10955 o1 := auxIntToInt64(v_0.AuxInt)
10956 p1 := v_0.Args[0]
10957 if v_1.Op != OpOffPtr {
10958 continue
10959 }
10960 o2 := auxIntToInt64(v_1.AuxInt)
10961 p2 := v_1.Args[0]
10962 if !(isSamePtr(p1, p2)) {
10963 continue
10964 }
10965 v.reset(OpConstBool)
10966 v.AuxInt = boolToAuxInt(o1 == o2)
10967 return true
10968 }
10969 break
10970 }
10971
10972
10973 for {
10974 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
10975 if v_0.Op != OpConst32 {
10976 continue
10977 }
10978 c := auxIntToInt32(v_0.AuxInt)
10979 if v_1.Op != OpConst32 {
10980 continue
10981 }
10982 d := auxIntToInt32(v_1.AuxInt)
10983 v.reset(OpConstBool)
10984 v.AuxInt = boolToAuxInt(c == d)
10985 return true
10986 }
10987 break
10988 }
10989
10990
10991 for {
10992 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
10993 if v_0.Op != OpConst64 {
10994 continue
10995 }
10996 c := auxIntToInt64(v_0.AuxInt)
10997 if v_1.Op != OpConst64 {
10998 continue
10999 }
11000 d := auxIntToInt64(v_1.AuxInt)
11001 v.reset(OpConstBool)
11002 v.AuxInt = boolToAuxInt(c == d)
11003 return true
11004 }
11005 break
11006 }
11007
11008
11009 for {
11010 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
11011 if v_0.Op != OpConvert {
11012 continue
11013 }
11014 v_0_0 := v_0.Args[0]
11015 if v_0_0.Op != OpAddr {
11016 continue
11017 }
11018 x := auxToSym(v_0_0.Aux)
11019 if v_1.Op != OpAddr {
11020 continue
11021 }
11022 y := auxToSym(v_1.Aux)
11023 v.reset(OpConstBool)
11024 v.AuxInt = boolToAuxInt(x == y)
11025 return true
11026 }
11027 break
11028 }
11029
11030
11031 for {
11032 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
11033 if v_0.Op != OpLocalAddr || v_1.Op != OpAddr {
11034 continue
11035 }
11036 v.reset(OpConstBool)
11037 v.AuxInt = boolToAuxInt(false)
11038 return true
11039 }
11040 break
11041 }
11042
11043
11044 for {
11045 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
11046 if v_0.Op != OpOffPtr {
11047 continue
11048 }
11049 v_0_0 := v_0.Args[0]
11050 if v_0_0.Op != OpLocalAddr || v_1.Op != OpAddr {
11051 continue
11052 }
11053 v.reset(OpConstBool)
11054 v.AuxInt = boolToAuxInt(false)
11055 return true
11056 }
11057 break
11058 }
11059
11060
11061 for {
11062 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
11063 if v_0.Op != OpLocalAddr || v_1.Op != OpOffPtr {
11064 continue
11065 }
11066 v_1_0 := v_1.Args[0]
11067 if v_1_0.Op != OpAddr {
11068 continue
11069 }
11070 v.reset(OpConstBool)
11071 v.AuxInt = boolToAuxInt(false)
11072 return true
11073 }
11074 break
11075 }
11076
11077
11078 for {
11079 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
11080 if v_0.Op != OpOffPtr {
11081 continue
11082 }
11083 v_0_0 := v_0.Args[0]
11084 if v_0_0.Op != OpLocalAddr || v_1.Op != OpOffPtr {
11085 continue
11086 }
11087 v_1_0 := v_1.Args[0]
11088 if v_1_0.Op != OpAddr {
11089 continue
11090 }
11091 v.reset(OpConstBool)
11092 v.AuxInt = boolToAuxInt(false)
11093 return true
11094 }
11095 break
11096 }
11097
11098
11099
11100 for {
11101 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
11102 if v_0.Op != OpAddPtr {
11103 continue
11104 }
11105 o1 := v_0.Args[1]
11106 p1 := v_0.Args[0]
11107 p2 := v_1
11108 if !(isSamePtr(p1, p2)) {
11109 continue
11110 }
11111 v.reset(OpNot)
11112 v0 := b.NewValue0(v.Pos, OpIsNonNil, typ.Bool)
11113 v0.AddArg(o1)
11114 v.AddArg(v0)
11115 return true
11116 }
11117 break
11118 }
11119
11120
11121 for {
11122 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
11123 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
11124 continue
11125 }
11126 p := v_1
11127 v.reset(OpNot)
11128 v0 := b.NewValue0(v.Pos, OpIsNonNil, typ.Bool)
11129 v0.AddArg(p)
11130 v.AddArg(v0)
11131 return true
11132 }
11133 break
11134 }
11135
11136
11137 for {
11138 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
11139 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
11140 continue
11141 }
11142 p := v_1
11143 v.reset(OpNot)
11144 v0 := b.NewValue0(v.Pos, OpIsNonNil, typ.Bool)
11145 v0.AddArg(p)
11146 v.AddArg(v0)
11147 return true
11148 }
11149 break
11150 }
11151
11152
11153 for {
11154 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
11155 if v_0.Op != OpConstNil {
11156 continue
11157 }
11158 p := v_1
11159 v.reset(OpNot)
11160 v0 := b.NewValue0(v.Pos, OpIsNonNil, typ.Bool)
11161 v0.AddArg(p)
11162 v.AddArg(v0)
11163 return true
11164 }
11165 break
11166 }
11167 return false
11168 }
11169 func rewriteValuegeneric_OpEqSlice(v *Value) bool {
11170 v_1 := v.Args[1]
11171 v_0 := v.Args[0]
11172 b := v.Block
11173 typ := &b.Func.Config.Types
11174
11175
11176 for {
11177 x := v_0
11178 y := v_1
11179 v.reset(OpEqPtr)
11180 v0 := b.NewValue0(v.Pos, OpSlicePtr, typ.BytePtr)
11181 v0.AddArg(x)
11182 v1 := b.NewValue0(v.Pos, OpSlicePtr, typ.BytePtr)
11183 v1.AddArg(y)
11184 v.AddArg2(v0, v1)
11185 return true
11186 }
11187 }
11188 func rewriteValuegeneric_OpFloor(v *Value) bool {
11189 v_0 := v.Args[0]
11190
11191
11192 for {
11193 if v_0.Op != OpConst64F {
11194 break
11195 }
11196 c := auxIntToFloat64(v_0.AuxInt)
11197 v.reset(OpConst64F)
11198 v.AuxInt = float64ToAuxInt(math.Floor(c))
11199 return true
11200 }
11201 return false
11202 }
11203 func rewriteValuegeneric_OpIMake(v *Value) bool {
11204 v_1 := v.Args[1]
11205 v_0 := v.Args[0]
11206
11207
11208 for {
11209 _typ := v_0
11210 if v_1.Op != OpStructMake || len(v_1.Args) != 1 {
11211 break
11212 }
11213 val := v_1.Args[0]
11214 v.reset(OpIMake)
11215 v.AddArg2(_typ, val)
11216 return true
11217 }
11218
11219
11220 for {
11221 _typ := v_0
11222 if v_1.Op != OpArrayMake1 {
11223 break
11224 }
11225 val := v_1.Args[0]
11226 v.reset(OpIMake)
11227 v.AddArg2(_typ, val)
11228 return true
11229 }
11230 return false
11231 }
11232 func rewriteValuegeneric_OpInterLECall(v *Value) bool {
11233
11234
11235 for {
11236 if len(v.Args) < 1 {
11237 break
11238 }
11239 v_0 := v.Args[0]
11240 if v_0.Op != OpAddr {
11241 break
11242 }
11243 fn := auxToSym(v_0.Aux)
11244 v_0_0 := v_0.Args[0]
11245 if v_0_0.Op != OpSB {
11246 break
11247 }
11248 v.copyOf(devirtLECall(v, fn.(*obj.LSym)))
11249 return true
11250 }
11251 return false
11252 }
11253 func rewriteValuegeneric_OpIsInBounds(v *Value) bool {
11254 v_1 := v.Args[1]
11255 v_0 := v.Args[0]
11256
11257
11258
11259 for {
11260 if v_0.Op != OpZeroExt8to32 || v_1.Op != OpConst32 {
11261 break
11262 }
11263 c := auxIntToInt32(v_1.AuxInt)
11264 if !((1 << 8) <= c) {
11265 break
11266 }
11267 v.reset(OpConstBool)
11268 v.AuxInt = boolToAuxInt(true)
11269 return true
11270 }
11271
11272
11273
11274 for {
11275 if v_0.Op != OpZeroExt8to64 || v_1.Op != OpConst64 {
11276 break
11277 }
11278 c := auxIntToInt64(v_1.AuxInt)
11279 if !((1 << 8) <= c) {
11280 break
11281 }
11282 v.reset(OpConstBool)
11283 v.AuxInt = boolToAuxInt(true)
11284 return true
11285 }
11286
11287
11288
11289 for {
11290 if v_0.Op != OpZeroExt16to32 || v_1.Op != OpConst32 {
11291 break
11292 }
11293 c := auxIntToInt32(v_1.AuxInt)
11294 if !((1 << 16) <= c) {
11295 break
11296 }
11297 v.reset(OpConstBool)
11298 v.AuxInt = boolToAuxInt(true)
11299 return true
11300 }
11301
11302
11303
11304 for {
11305 if v_0.Op != OpZeroExt16to64 || v_1.Op != OpConst64 {
11306 break
11307 }
11308 c := auxIntToInt64(v_1.AuxInt)
11309 if !((1 << 16) <= c) {
11310 break
11311 }
11312 v.reset(OpConstBool)
11313 v.AuxInt = boolToAuxInt(true)
11314 return true
11315 }
11316
11317
11318 for {
11319 x := v_0
11320 if x != v_1 {
11321 break
11322 }
11323 v.reset(OpConstBool)
11324 v.AuxInt = boolToAuxInt(false)
11325 return true
11326 }
11327
11328
11329
11330 for {
11331 if v_0.Op != OpAnd8 {
11332 break
11333 }
11334 v_0_0 := v_0.Args[0]
11335 v_0_1 := v_0.Args[1]
11336 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
11337 if v_0_0.Op != OpConst8 {
11338 continue
11339 }
11340 c := auxIntToInt8(v_0_0.AuxInt)
11341 if v_1.Op != OpConst8 {
11342 continue
11343 }
11344 d := auxIntToInt8(v_1.AuxInt)
11345 if !(0 <= c && c < d) {
11346 continue
11347 }
11348 v.reset(OpConstBool)
11349 v.AuxInt = boolToAuxInt(true)
11350 return true
11351 }
11352 break
11353 }
11354
11355
11356
11357 for {
11358 if v_0.Op != OpZeroExt8to16 {
11359 break
11360 }
11361 v_0_0 := v_0.Args[0]
11362 if v_0_0.Op != OpAnd8 {
11363 break
11364 }
11365 v_0_0_0 := v_0_0.Args[0]
11366 v_0_0_1 := v_0_0.Args[1]
11367 for _i0 := 0; _i0 <= 1; _i0, v_0_0_0, v_0_0_1 = _i0+1, v_0_0_1, v_0_0_0 {
11368 if v_0_0_0.Op != OpConst8 {
11369 continue
11370 }
11371 c := auxIntToInt8(v_0_0_0.AuxInt)
11372 if v_1.Op != OpConst16 {
11373 continue
11374 }
11375 d := auxIntToInt16(v_1.AuxInt)
11376 if !(0 <= c && int16(c) < d) {
11377 continue
11378 }
11379 v.reset(OpConstBool)
11380 v.AuxInt = boolToAuxInt(true)
11381 return true
11382 }
11383 break
11384 }
11385
11386
11387
11388 for {
11389 if v_0.Op != OpZeroExt8to32 {
11390 break
11391 }
11392 v_0_0 := v_0.Args[0]
11393 if v_0_0.Op != OpAnd8 {
11394 break
11395 }
11396 v_0_0_0 := v_0_0.Args[0]
11397 v_0_0_1 := v_0_0.Args[1]
11398 for _i0 := 0; _i0 <= 1; _i0, v_0_0_0, v_0_0_1 = _i0+1, v_0_0_1, v_0_0_0 {
11399 if v_0_0_0.Op != OpConst8 {
11400 continue
11401 }
11402 c := auxIntToInt8(v_0_0_0.AuxInt)
11403 if v_1.Op != OpConst32 {
11404 continue
11405 }
11406 d := auxIntToInt32(v_1.AuxInt)
11407 if !(0 <= c && int32(c) < d) {
11408 continue
11409 }
11410 v.reset(OpConstBool)
11411 v.AuxInt = boolToAuxInt(true)
11412 return true
11413 }
11414 break
11415 }
11416
11417
11418
11419 for {
11420 if v_0.Op != OpZeroExt8to64 {
11421 break
11422 }
11423 v_0_0 := v_0.Args[0]
11424 if v_0_0.Op != OpAnd8 {
11425 break
11426 }
11427 v_0_0_0 := v_0_0.Args[0]
11428 v_0_0_1 := v_0_0.Args[1]
11429 for _i0 := 0; _i0 <= 1; _i0, v_0_0_0, v_0_0_1 = _i0+1, v_0_0_1, v_0_0_0 {
11430 if v_0_0_0.Op != OpConst8 {
11431 continue
11432 }
11433 c := auxIntToInt8(v_0_0_0.AuxInt)
11434 if v_1.Op != OpConst64 {
11435 continue
11436 }
11437 d := auxIntToInt64(v_1.AuxInt)
11438 if !(0 <= c && int64(c) < d) {
11439 continue
11440 }
11441 v.reset(OpConstBool)
11442 v.AuxInt = boolToAuxInt(true)
11443 return true
11444 }
11445 break
11446 }
11447
11448
11449
11450 for {
11451 if v_0.Op != OpAnd16 {
11452 break
11453 }
11454 v_0_0 := v_0.Args[0]
11455 v_0_1 := v_0.Args[1]
11456 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
11457 if v_0_0.Op != OpConst16 {
11458 continue
11459 }
11460 c := auxIntToInt16(v_0_0.AuxInt)
11461 if v_1.Op != OpConst16 {
11462 continue
11463 }
11464 d := auxIntToInt16(v_1.AuxInt)
11465 if !(0 <= c && c < d) {
11466 continue
11467 }
11468 v.reset(OpConstBool)
11469 v.AuxInt = boolToAuxInt(true)
11470 return true
11471 }
11472 break
11473 }
11474
11475
11476
11477 for {
11478 if v_0.Op != OpZeroExt16to32 {
11479 break
11480 }
11481 v_0_0 := v_0.Args[0]
11482 if v_0_0.Op != OpAnd16 {
11483 break
11484 }
11485 v_0_0_0 := v_0_0.Args[0]
11486 v_0_0_1 := v_0_0.Args[1]
11487 for _i0 := 0; _i0 <= 1; _i0, v_0_0_0, v_0_0_1 = _i0+1, v_0_0_1, v_0_0_0 {
11488 if v_0_0_0.Op != OpConst16 {
11489 continue
11490 }
11491 c := auxIntToInt16(v_0_0_0.AuxInt)
11492 if v_1.Op != OpConst32 {
11493 continue
11494 }
11495 d := auxIntToInt32(v_1.AuxInt)
11496 if !(0 <= c && int32(c) < d) {
11497 continue
11498 }
11499 v.reset(OpConstBool)
11500 v.AuxInt = boolToAuxInt(true)
11501 return true
11502 }
11503 break
11504 }
11505
11506
11507
11508 for {
11509 if v_0.Op != OpZeroExt16to64 {
11510 break
11511 }
11512 v_0_0 := v_0.Args[0]
11513 if v_0_0.Op != OpAnd16 {
11514 break
11515 }
11516 v_0_0_0 := v_0_0.Args[0]
11517 v_0_0_1 := v_0_0.Args[1]
11518 for _i0 := 0; _i0 <= 1; _i0, v_0_0_0, v_0_0_1 = _i0+1, v_0_0_1, v_0_0_0 {
11519 if v_0_0_0.Op != OpConst16 {
11520 continue
11521 }
11522 c := auxIntToInt16(v_0_0_0.AuxInt)
11523 if v_1.Op != OpConst64 {
11524 continue
11525 }
11526 d := auxIntToInt64(v_1.AuxInt)
11527 if !(0 <= c && int64(c) < d) {
11528 continue
11529 }
11530 v.reset(OpConstBool)
11531 v.AuxInt = boolToAuxInt(true)
11532 return true
11533 }
11534 break
11535 }
11536
11537
11538
11539 for {
11540 if v_0.Op != OpAnd32 {
11541 break
11542 }
11543 v_0_0 := v_0.Args[0]
11544 v_0_1 := v_0.Args[1]
11545 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
11546 if v_0_0.Op != OpConst32 {
11547 continue
11548 }
11549 c := auxIntToInt32(v_0_0.AuxInt)
11550 if v_1.Op != OpConst32 {
11551 continue
11552 }
11553 d := auxIntToInt32(v_1.AuxInt)
11554 if !(0 <= c && c < d) {
11555 continue
11556 }
11557 v.reset(OpConstBool)
11558 v.AuxInt = boolToAuxInt(true)
11559 return true
11560 }
11561 break
11562 }
11563
11564
11565
11566 for {
11567 if v_0.Op != OpZeroExt32to64 {
11568 break
11569 }
11570 v_0_0 := v_0.Args[0]
11571 if v_0_0.Op != OpAnd32 {
11572 break
11573 }
11574 v_0_0_0 := v_0_0.Args[0]
11575 v_0_0_1 := v_0_0.Args[1]
11576 for _i0 := 0; _i0 <= 1; _i0, v_0_0_0, v_0_0_1 = _i0+1, v_0_0_1, v_0_0_0 {
11577 if v_0_0_0.Op != OpConst32 {
11578 continue
11579 }
11580 c := auxIntToInt32(v_0_0_0.AuxInt)
11581 if v_1.Op != OpConst64 {
11582 continue
11583 }
11584 d := auxIntToInt64(v_1.AuxInt)
11585 if !(0 <= c && int64(c) < d) {
11586 continue
11587 }
11588 v.reset(OpConstBool)
11589 v.AuxInt = boolToAuxInt(true)
11590 return true
11591 }
11592 break
11593 }
11594
11595
11596
11597 for {
11598 if v_0.Op != OpAnd64 {
11599 break
11600 }
11601 v_0_0 := v_0.Args[0]
11602 v_0_1 := v_0.Args[1]
11603 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
11604 if v_0_0.Op != OpConst64 {
11605 continue
11606 }
11607 c := auxIntToInt64(v_0_0.AuxInt)
11608 if v_1.Op != OpConst64 {
11609 continue
11610 }
11611 d := auxIntToInt64(v_1.AuxInt)
11612 if !(0 <= c && c < d) {
11613 continue
11614 }
11615 v.reset(OpConstBool)
11616 v.AuxInt = boolToAuxInt(true)
11617 return true
11618 }
11619 break
11620 }
11621
11622
11623 for {
11624 if v_0.Op != OpConst32 {
11625 break
11626 }
11627 c := auxIntToInt32(v_0.AuxInt)
11628 if v_1.Op != OpConst32 {
11629 break
11630 }
11631 d := auxIntToInt32(v_1.AuxInt)
11632 v.reset(OpConstBool)
11633 v.AuxInt = boolToAuxInt(0 <= c && c < d)
11634 return true
11635 }
11636
11637
11638 for {
11639 if v_0.Op != OpConst64 {
11640 break
11641 }
11642 c := auxIntToInt64(v_0.AuxInt)
11643 if v_1.Op != OpConst64 {
11644 break
11645 }
11646 d := auxIntToInt64(v_1.AuxInt)
11647 v.reset(OpConstBool)
11648 v.AuxInt = boolToAuxInt(0 <= c && c < d)
11649 return true
11650 }
11651
11652
11653 for {
11654 if v_0.Op != OpMod32u {
11655 break
11656 }
11657 y := v_0.Args[1]
11658 if y != v_1 {
11659 break
11660 }
11661 v.reset(OpConstBool)
11662 v.AuxInt = boolToAuxInt(true)
11663 return true
11664 }
11665
11666
11667 for {
11668 if v_0.Op != OpMod64u {
11669 break
11670 }
11671 y := v_0.Args[1]
11672 if y != v_1 {
11673 break
11674 }
11675 v.reset(OpConstBool)
11676 v.AuxInt = boolToAuxInt(true)
11677 return true
11678 }
11679
11680
11681
11682 for {
11683 if v_0.Op != OpZeroExt8to64 {
11684 break
11685 }
11686 v_0_0 := v_0.Args[0]
11687 if v_0_0.Op != OpRsh8Ux64 {
11688 break
11689 }
11690 _ = v_0_0.Args[1]
11691 v_0_0_1 := v_0_0.Args[1]
11692 if v_0_0_1.Op != OpConst64 {
11693 break
11694 }
11695 c := auxIntToInt64(v_0_0_1.AuxInt)
11696 if v_1.Op != OpConst64 {
11697 break
11698 }
11699 d := auxIntToInt64(v_1.AuxInt)
11700 if !(0 < c && c < 8 && 1<<uint(8-c)-1 < d) {
11701 break
11702 }
11703 v.reset(OpConstBool)
11704 v.AuxInt = boolToAuxInt(true)
11705 return true
11706 }
11707
11708
11709
11710 for {
11711 if v_0.Op != OpZeroExt8to32 {
11712 break
11713 }
11714 v_0_0 := v_0.Args[0]
11715 if v_0_0.Op != OpRsh8Ux64 {
11716 break
11717 }
11718 _ = v_0_0.Args[1]
11719 v_0_0_1 := v_0_0.Args[1]
11720 if v_0_0_1.Op != OpConst64 {
11721 break
11722 }
11723 c := auxIntToInt64(v_0_0_1.AuxInt)
11724 if v_1.Op != OpConst32 {
11725 break
11726 }
11727 d := auxIntToInt32(v_1.AuxInt)
11728 if !(0 < c && c < 8 && 1<<uint(8-c)-1 < d) {
11729 break
11730 }
11731 v.reset(OpConstBool)
11732 v.AuxInt = boolToAuxInt(true)
11733 return true
11734 }
11735
11736
11737
11738 for {
11739 if v_0.Op != OpZeroExt8to16 {
11740 break
11741 }
11742 v_0_0 := v_0.Args[0]
11743 if v_0_0.Op != OpRsh8Ux64 {
11744 break
11745 }
11746 _ = v_0_0.Args[1]
11747 v_0_0_1 := v_0_0.Args[1]
11748 if v_0_0_1.Op != OpConst64 {
11749 break
11750 }
11751 c := auxIntToInt64(v_0_0_1.AuxInt)
11752 if v_1.Op != OpConst16 {
11753 break
11754 }
11755 d := auxIntToInt16(v_1.AuxInt)
11756 if !(0 < c && c < 8 && 1<<uint(8-c)-1 < d) {
11757 break
11758 }
11759 v.reset(OpConstBool)
11760 v.AuxInt = boolToAuxInt(true)
11761 return true
11762 }
11763
11764
11765
11766 for {
11767 if v_0.Op != OpRsh8Ux64 {
11768 break
11769 }
11770 _ = v_0.Args[1]
11771 v_0_1 := v_0.Args[1]
11772 if v_0_1.Op != OpConst64 {
11773 break
11774 }
11775 c := auxIntToInt64(v_0_1.AuxInt)
11776 if v_1.Op != OpConst64 {
11777 break
11778 }
11779 d := auxIntToInt64(v_1.AuxInt)
11780 if !(0 < c && c < 8 && 1<<uint(8-c)-1 < d) {
11781 break
11782 }
11783 v.reset(OpConstBool)
11784 v.AuxInt = boolToAuxInt(true)
11785 return true
11786 }
11787
11788
11789
11790 for {
11791 if v_0.Op != OpZeroExt16to64 {
11792 break
11793 }
11794 v_0_0 := v_0.Args[0]
11795 if v_0_0.Op != OpRsh16Ux64 {
11796 break
11797 }
11798 _ = v_0_0.Args[1]
11799 v_0_0_1 := v_0_0.Args[1]
11800 if v_0_0_1.Op != OpConst64 {
11801 break
11802 }
11803 c := auxIntToInt64(v_0_0_1.AuxInt)
11804 if v_1.Op != OpConst64 {
11805 break
11806 }
11807 d := auxIntToInt64(v_1.AuxInt)
11808 if !(0 < c && c < 16 && 1<<uint(16-c)-1 < d) {
11809 break
11810 }
11811 v.reset(OpConstBool)
11812 v.AuxInt = boolToAuxInt(true)
11813 return true
11814 }
11815
11816
11817
11818 for {
11819 if v_0.Op != OpZeroExt16to32 {
11820 break
11821 }
11822 v_0_0 := v_0.Args[0]
11823 if v_0_0.Op != OpRsh16Ux64 {
11824 break
11825 }
11826 _ = v_0_0.Args[1]
11827 v_0_0_1 := v_0_0.Args[1]
11828 if v_0_0_1.Op != OpConst64 {
11829 break
11830 }
11831 c := auxIntToInt64(v_0_0_1.AuxInt)
11832 if v_1.Op != OpConst64 {
11833 break
11834 }
11835 d := auxIntToInt64(v_1.AuxInt)
11836 if !(0 < c && c < 16 && 1<<uint(16-c)-1 < d) {
11837 break
11838 }
11839 v.reset(OpConstBool)
11840 v.AuxInt = boolToAuxInt(true)
11841 return true
11842 }
11843
11844
11845
11846 for {
11847 if v_0.Op != OpRsh16Ux64 {
11848 break
11849 }
11850 _ = v_0.Args[1]
11851 v_0_1 := v_0.Args[1]
11852 if v_0_1.Op != OpConst64 {
11853 break
11854 }
11855 c := auxIntToInt64(v_0_1.AuxInt)
11856 if v_1.Op != OpConst64 {
11857 break
11858 }
11859 d := auxIntToInt64(v_1.AuxInt)
11860 if !(0 < c && c < 16 && 1<<uint(16-c)-1 < d) {
11861 break
11862 }
11863 v.reset(OpConstBool)
11864 v.AuxInt = boolToAuxInt(true)
11865 return true
11866 }
11867
11868
11869
11870 for {
11871 if v_0.Op != OpZeroExt32to64 {
11872 break
11873 }
11874 v_0_0 := v_0.Args[0]
11875 if v_0_0.Op != OpRsh32Ux64 {
11876 break
11877 }
11878 _ = v_0_0.Args[1]
11879 v_0_0_1 := v_0_0.Args[1]
11880 if v_0_0_1.Op != OpConst64 {
11881 break
11882 }
11883 c := auxIntToInt64(v_0_0_1.AuxInt)
11884 if v_1.Op != OpConst64 {
11885 break
11886 }
11887 d := auxIntToInt64(v_1.AuxInt)
11888 if !(0 < c && c < 32 && 1<<uint(32-c)-1 < d) {
11889 break
11890 }
11891 v.reset(OpConstBool)
11892 v.AuxInt = boolToAuxInt(true)
11893 return true
11894 }
11895
11896
11897
11898 for {
11899 if v_0.Op != OpRsh32Ux64 {
11900 break
11901 }
11902 _ = v_0.Args[1]
11903 v_0_1 := v_0.Args[1]
11904 if v_0_1.Op != OpConst64 {
11905 break
11906 }
11907 c := auxIntToInt64(v_0_1.AuxInt)
11908 if v_1.Op != OpConst64 {
11909 break
11910 }
11911 d := auxIntToInt64(v_1.AuxInt)
11912 if !(0 < c && c < 32 && 1<<uint(32-c)-1 < d) {
11913 break
11914 }
11915 v.reset(OpConstBool)
11916 v.AuxInt = boolToAuxInt(true)
11917 return true
11918 }
11919
11920
11921
11922 for {
11923 if v_0.Op != OpRsh64Ux64 {
11924 break
11925 }
11926 _ = v_0.Args[1]
11927 v_0_1 := v_0.Args[1]
11928 if v_0_1.Op != OpConst64 {
11929 break
11930 }
11931 c := auxIntToInt64(v_0_1.AuxInt)
11932 if v_1.Op != OpConst64 {
11933 break
11934 }
11935 d := auxIntToInt64(v_1.AuxInt)
11936 if !(0 < c && c < 64 && 1<<uint(64-c)-1 < d) {
11937 break
11938 }
11939 v.reset(OpConstBool)
11940 v.AuxInt = boolToAuxInt(true)
11941 return true
11942 }
11943 return false
11944 }
11945 func rewriteValuegeneric_OpIsNonNil(v *Value) bool {
11946 v_0 := v.Args[0]
11947
11948
11949 for {
11950 if v_0.Op != OpConstNil {
11951 break
11952 }
11953 v.reset(OpConstBool)
11954 v.AuxInt = boolToAuxInt(false)
11955 return true
11956 }
11957
11958
11959 for {
11960 if v_0.Op != OpConst32 {
11961 break
11962 }
11963 c := auxIntToInt32(v_0.AuxInt)
11964 v.reset(OpConstBool)
11965 v.AuxInt = boolToAuxInt(c != 0)
11966 return true
11967 }
11968
11969
11970 for {
11971 if v_0.Op != OpConst64 {
11972 break
11973 }
11974 c := auxIntToInt64(v_0.AuxInt)
11975 v.reset(OpConstBool)
11976 v.AuxInt = boolToAuxInt(c != 0)
11977 return true
11978 }
11979
11980
11981 for {
11982 if v_0.Op != OpAddr {
11983 break
11984 }
11985 v.reset(OpConstBool)
11986 v.AuxInt = boolToAuxInt(true)
11987 return true
11988 }
11989
11990
11991 for {
11992 if v_0.Op != OpConvert {
11993 break
11994 }
11995 v_0_0 := v_0.Args[0]
11996 if v_0_0.Op != OpAddr {
11997 break
11998 }
11999 v.reset(OpConstBool)
12000 v.AuxInt = boolToAuxInt(true)
12001 return true
12002 }
12003
12004
12005 for {
12006 if v_0.Op != OpLocalAddr {
12007 break
12008 }
12009 v.reset(OpConstBool)
12010 v.AuxInt = boolToAuxInt(true)
12011 return true
12012 }
12013 return false
12014 }
12015 func rewriteValuegeneric_OpIsSliceInBounds(v *Value) bool {
12016 v_1 := v.Args[1]
12017 v_0 := v.Args[0]
12018
12019
12020 for {
12021 x := v_0
12022 if x != v_1 {
12023 break
12024 }
12025 v.reset(OpConstBool)
12026 v.AuxInt = boolToAuxInt(true)
12027 return true
12028 }
12029
12030
12031
12032 for {
12033 if v_0.Op != OpAnd32 {
12034 break
12035 }
12036 v_0_0 := v_0.Args[0]
12037 v_0_1 := v_0.Args[1]
12038 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
12039 if v_0_0.Op != OpConst32 {
12040 continue
12041 }
12042 c := auxIntToInt32(v_0_0.AuxInt)
12043 if v_1.Op != OpConst32 {
12044 continue
12045 }
12046 d := auxIntToInt32(v_1.AuxInt)
12047 if !(0 <= c && c <= d) {
12048 continue
12049 }
12050 v.reset(OpConstBool)
12051 v.AuxInt = boolToAuxInt(true)
12052 return true
12053 }
12054 break
12055 }
12056
12057
12058
12059 for {
12060 if v_0.Op != OpAnd64 {
12061 break
12062 }
12063 v_0_0 := v_0.Args[0]
12064 v_0_1 := v_0.Args[1]
12065 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
12066 if v_0_0.Op != OpConst64 {
12067 continue
12068 }
12069 c := auxIntToInt64(v_0_0.AuxInt)
12070 if v_1.Op != OpConst64 {
12071 continue
12072 }
12073 d := auxIntToInt64(v_1.AuxInt)
12074 if !(0 <= c && c <= d) {
12075 continue
12076 }
12077 v.reset(OpConstBool)
12078 v.AuxInt = boolToAuxInt(true)
12079 return true
12080 }
12081 break
12082 }
12083
12084
12085 for {
12086 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
12087 break
12088 }
12089 v.reset(OpConstBool)
12090 v.AuxInt = boolToAuxInt(true)
12091 return true
12092 }
12093
12094
12095 for {
12096 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
12097 break
12098 }
12099 v.reset(OpConstBool)
12100 v.AuxInt = boolToAuxInt(true)
12101 return true
12102 }
12103
12104
12105 for {
12106 if v_0.Op != OpConst32 {
12107 break
12108 }
12109 c := auxIntToInt32(v_0.AuxInt)
12110 if v_1.Op != OpConst32 {
12111 break
12112 }
12113 d := auxIntToInt32(v_1.AuxInt)
12114 v.reset(OpConstBool)
12115 v.AuxInt = boolToAuxInt(0 <= c && c <= d)
12116 return true
12117 }
12118
12119
12120 for {
12121 if v_0.Op != OpConst64 {
12122 break
12123 }
12124 c := auxIntToInt64(v_0.AuxInt)
12125 if v_1.Op != OpConst64 {
12126 break
12127 }
12128 d := auxIntToInt64(v_1.AuxInt)
12129 v.reset(OpConstBool)
12130 v.AuxInt = boolToAuxInt(0 <= c && c <= d)
12131 return true
12132 }
12133
12134
12135 for {
12136 if v_0.Op != OpSliceLen {
12137 break
12138 }
12139 x := v_0.Args[0]
12140 if v_1.Op != OpSliceCap || x != v_1.Args[0] {
12141 break
12142 }
12143 v.reset(OpConstBool)
12144 v.AuxInt = boolToAuxInt(true)
12145 return true
12146 }
12147 return false
12148 }
12149 func rewriteValuegeneric_OpLeq16(v *Value) bool {
12150 v_1 := v.Args[1]
12151 v_0 := v.Args[0]
12152 b := v.Block
12153
12154
12155 for {
12156 if v_0.Op != OpConst16 {
12157 break
12158 }
12159 c := auxIntToInt16(v_0.AuxInt)
12160 if v_1.Op != OpConst16 {
12161 break
12162 }
12163 d := auxIntToInt16(v_1.AuxInt)
12164 v.reset(OpConstBool)
12165 v.AuxInt = boolToAuxInt(c <= d)
12166 return true
12167 }
12168
12169
12170
12171 for {
12172 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 || v_1.Op != OpAnd16 {
12173 break
12174 }
12175 _ = v_1.Args[1]
12176 v_1_0 := v_1.Args[0]
12177 v_1_1 := v_1.Args[1]
12178 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
12179 if v_1_1.Op != OpConst16 {
12180 continue
12181 }
12182 c := auxIntToInt16(v_1_1.AuxInt)
12183 if !(c >= 0) {
12184 continue
12185 }
12186 v.reset(OpConstBool)
12187 v.AuxInt = boolToAuxInt(true)
12188 return true
12189 }
12190 break
12191 }
12192
12193
12194
12195 for {
12196 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 || v_1.Op != OpRsh16Ux64 {
12197 break
12198 }
12199 _ = v_1.Args[1]
12200 v_1_1 := v_1.Args[1]
12201 if v_1_1.Op != OpConst64 {
12202 break
12203 }
12204 c := auxIntToInt64(v_1_1.AuxInt)
12205 if !(c > 0) {
12206 break
12207 }
12208 v.reset(OpConstBool)
12209 v.AuxInt = boolToAuxInt(true)
12210 return true
12211 }
12212
12213
12214 for {
12215 x := v_0
12216 if v_1.Op != OpConst16 {
12217 break
12218 }
12219 t := v_1.Type
12220 if auxIntToInt16(v_1.AuxInt) != -1 {
12221 break
12222 }
12223 v.reset(OpLess16)
12224 v0 := b.NewValue0(v.Pos, OpConst16, t)
12225 v0.AuxInt = int16ToAuxInt(0)
12226 v.AddArg2(x, v0)
12227 return true
12228 }
12229
12230
12231 for {
12232 if v_0.Op != OpConst16 {
12233 break
12234 }
12235 t := v_0.Type
12236 if auxIntToInt16(v_0.AuxInt) != 1 {
12237 break
12238 }
12239 x := v_1
12240 v.reset(OpLess16)
12241 v0 := b.NewValue0(v.Pos, OpConst16, t)
12242 v0.AuxInt = int16ToAuxInt(0)
12243 v.AddArg2(v0, x)
12244 return true
12245 }
12246
12247
12248 for {
12249 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != math.MinInt16 {
12250 break
12251 }
12252 v.reset(OpConstBool)
12253 v.AuxInt = boolToAuxInt(true)
12254 return true
12255 }
12256
12257
12258 for {
12259 if v_1.Op != OpConst16 || auxIntToInt16(v_1.AuxInt) != math.MaxInt16 {
12260 break
12261 }
12262 v.reset(OpConstBool)
12263 v.AuxInt = boolToAuxInt(true)
12264 return true
12265 }
12266
12267
12268 for {
12269 x := v_0
12270 c := v_1
12271 if c.Op != OpConst16 || auxIntToInt16(c.AuxInt) != math.MinInt16 {
12272 break
12273 }
12274 v.reset(OpEq16)
12275 v.AddArg2(x, c)
12276 return true
12277 }
12278
12279
12280 for {
12281 c := v_0
12282 if c.Op != OpConst16 || auxIntToInt16(c.AuxInt) != math.MaxInt16 {
12283 break
12284 }
12285 x := v_1
12286 v.reset(OpEq16)
12287 v.AddArg2(x, c)
12288 return true
12289 }
12290 return false
12291 }
12292 func rewriteValuegeneric_OpLeq16U(v *Value) bool {
12293 v_1 := v.Args[1]
12294 v_0 := v.Args[0]
12295 b := v.Block
12296
12297
12298 for {
12299 if v_0.Op != OpConst16 {
12300 break
12301 }
12302 c := auxIntToInt16(v_0.AuxInt)
12303 if v_1.Op != OpConst16 {
12304 break
12305 }
12306 d := auxIntToInt16(v_1.AuxInt)
12307 v.reset(OpConstBool)
12308 v.AuxInt = boolToAuxInt(uint16(c) <= uint16(d))
12309 return true
12310 }
12311
12312
12313 for {
12314 if v_0.Op != OpConst16 {
12315 break
12316 }
12317 t := v_0.Type
12318 if auxIntToInt16(v_0.AuxInt) != 1 {
12319 break
12320 }
12321 x := v_1
12322 v.reset(OpNeq16)
12323 v0 := b.NewValue0(v.Pos, OpConst16, t)
12324 v0.AuxInt = int16ToAuxInt(0)
12325 v.AddArg2(v0, x)
12326 return true
12327 }
12328
12329
12330 for {
12331 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 {
12332 break
12333 }
12334 v.reset(OpConstBool)
12335 v.AuxInt = boolToAuxInt(true)
12336 return true
12337 }
12338
12339
12340 for {
12341 if v_1.Op != OpConst16 || auxIntToInt16(v_1.AuxInt) != -1 {
12342 break
12343 }
12344 v.reset(OpConstBool)
12345 v.AuxInt = boolToAuxInt(true)
12346 return true
12347 }
12348
12349
12350 for {
12351 x := v_0
12352 c := v_1
12353 if c.Op != OpConst16 || auxIntToInt16(c.AuxInt) != 0 {
12354 break
12355 }
12356 v.reset(OpEq16)
12357 v.AddArg2(x, c)
12358 return true
12359 }
12360
12361
12362 for {
12363 c := v_0
12364 if c.Op != OpConst16 || auxIntToInt16(c.AuxInt) != -1 {
12365 break
12366 }
12367 x := v_1
12368 v.reset(OpEq16)
12369 v.AddArg2(x, c)
12370 return true
12371 }
12372 return false
12373 }
12374 func rewriteValuegeneric_OpLeq32(v *Value) bool {
12375 v_1 := v.Args[1]
12376 v_0 := v.Args[0]
12377 b := v.Block
12378
12379
12380 for {
12381 if v_0.Op != OpConst32 {
12382 break
12383 }
12384 c := auxIntToInt32(v_0.AuxInt)
12385 if v_1.Op != OpConst32 {
12386 break
12387 }
12388 d := auxIntToInt32(v_1.AuxInt)
12389 v.reset(OpConstBool)
12390 v.AuxInt = boolToAuxInt(c <= d)
12391 return true
12392 }
12393
12394
12395
12396 for {
12397 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 || v_1.Op != OpAnd32 {
12398 break
12399 }
12400 _ = v_1.Args[1]
12401 v_1_0 := v_1.Args[0]
12402 v_1_1 := v_1.Args[1]
12403 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
12404 if v_1_1.Op != OpConst32 {
12405 continue
12406 }
12407 c := auxIntToInt32(v_1_1.AuxInt)
12408 if !(c >= 0) {
12409 continue
12410 }
12411 v.reset(OpConstBool)
12412 v.AuxInt = boolToAuxInt(true)
12413 return true
12414 }
12415 break
12416 }
12417
12418
12419
12420 for {
12421 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 || v_1.Op != OpRsh32Ux64 {
12422 break
12423 }
12424 _ = v_1.Args[1]
12425 v_1_1 := v_1.Args[1]
12426 if v_1_1.Op != OpConst64 {
12427 break
12428 }
12429 c := auxIntToInt64(v_1_1.AuxInt)
12430 if !(c > 0) {
12431 break
12432 }
12433 v.reset(OpConstBool)
12434 v.AuxInt = boolToAuxInt(true)
12435 return true
12436 }
12437
12438
12439 for {
12440 x := v_0
12441 if v_1.Op != OpConst32 {
12442 break
12443 }
12444 t := v_1.Type
12445 if auxIntToInt32(v_1.AuxInt) != -1 {
12446 break
12447 }
12448 v.reset(OpLess32)
12449 v0 := b.NewValue0(v.Pos, OpConst32, t)
12450 v0.AuxInt = int32ToAuxInt(0)
12451 v.AddArg2(x, v0)
12452 return true
12453 }
12454
12455
12456 for {
12457 if v_0.Op != OpConst32 {
12458 break
12459 }
12460 t := v_0.Type
12461 if auxIntToInt32(v_0.AuxInt) != 1 {
12462 break
12463 }
12464 x := v_1
12465 v.reset(OpLess32)
12466 v0 := b.NewValue0(v.Pos, OpConst32, t)
12467 v0.AuxInt = int32ToAuxInt(0)
12468 v.AddArg2(v0, x)
12469 return true
12470 }
12471
12472
12473 for {
12474 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != math.MinInt32 {
12475 break
12476 }
12477 v.reset(OpConstBool)
12478 v.AuxInt = boolToAuxInt(true)
12479 return true
12480 }
12481
12482
12483 for {
12484 if v_1.Op != OpConst32 || auxIntToInt32(v_1.AuxInt) != math.MaxInt32 {
12485 break
12486 }
12487 v.reset(OpConstBool)
12488 v.AuxInt = boolToAuxInt(true)
12489 return true
12490 }
12491
12492
12493 for {
12494 x := v_0
12495 c := v_1
12496 if c.Op != OpConst32 || auxIntToInt32(c.AuxInt) != math.MinInt32 {
12497 break
12498 }
12499 v.reset(OpEq32)
12500 v.AddArg2(x, c)
12501 return true
12502 }
12503
12504
12505 for {
12506 c := v_0
12507 if c.Op != OpConst32 || auxIntToInt32(c.AuxInt) != math.MaxInt32 {
12508 break
12509 }
12510 x := v_1
12511 v.reset(OpEq32)
12512 v.AddArg2(x, c)
12513 return true
12514 }
12515 return false
12516 }
12517 func rewriteValuegeneric_OpLeq32F(v *Value) bool {
12518 v_1 := v.Args[1]
12519 v_0 := v.Args[0]
12520
12521
12522 for {
12523 if v_0.Op != OpConst32F {
12524 break
12525 }
12526 c := auxIntToFloat32(v_0.AuxInt)
12527 if v_1.Op != OpConst32F {
12528 break
12529 }
12530 d := auxIntToFloat32(v_1.AuxInt)
12531 v.reset(OpConstBool)
12532 v.AuxInt = boolToAuxInt(c <= d)
12533 return true
12534 }
12535 return false
12536 }
12537 func rewriteValuegeneric_OpLeq32U(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 != OpConst32 {
12545 break
12546 }
12547 c := auxIntToInt32(v_0.AuxInt)
12548 if v_1.Op != OpConst32 {
12549 break
12550 }
12551 d := auxIntToInt32(v_1.AuxInt)
12552 v.reset(OpConstBool)
12553 v.AuxInt = boolToAuxInt(uint32(c) <= uint32(d))
12554 return true
12555 }
12556
12557
12558 for {
12559 if v_0.Op != OpConst32 {
12560 break
12561 }
12562 t := v_0.Type
12563 if auxIntToInt32(v_0.AuxInt) != 1 {
12564 break
12565 }
12566 x := v_1
12567 v.reset(OpNeq32)
12568 v0 := b.NewValue0(v.Pos, OpConst32, t)
12569 v0.AuxInt = int32ToAuxInt(0)
12570 v.AddArg2(v0, x)
12571 return true
12572 }
12573
12574
12575 for {
12576 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
12577 break
12578 }
12579 v.reset(OpConstBool)
12580 v.AuxInt = boolToAuxInt(true)
12581 return true
12582 }
12583
12584
12585 for {
12586 if v_1.Op != OpConst32 || auxIntToInt32(v_1.AuxInt) != -1 {
12587 break
12588 }
12589 v.reset(OpConstBool)
12590 v.AuxInt = boolToAuxInt(true)
12591 return true
12592 }
12593
12594
12595 for {
12596 x := v_0
12597 c := v_1
12598 if c.Op != OpConst32 || auxIntToInt32(c.AuxInt) != 0 {
12599 break
12600 }
12601 v.reset(OpEq32)
12602 v.AddArg2(x, c)
12603 return true
12604 }
12605
12606
12607 for {
12608 c := v_0
12609 if c.Op != OpConst32 || auxIntToInt32(c.AuxInt) != -1 {
12610 break
12611 }
12612 x := v_1
12613 v.reset(OpEq32)
12614 v.AddArg2(x, c)
12615 return true
12616 }
12617 return false
12618 }
12619 func rewriteValuegeneric_OpLeq64(v *Value) bool {
12620 v_1 := v.Args[1]
12621 v_0 := v.Args[0]
12622 b := v.Block
12623
12624
12625 for {
12626 if v_0.Op != OpConst64 {
12627 break
12628 }
12629 c := auxIntToInt64(v_0.AuxInt)
12630 if v_1.Op != OpConst64 {
12631 break
12632 }
12633 d := auxIntToInt64(v_1.AuxInt)
12634 v.reset(OpConstBool)
12635 v.AuxInt = boolToAuxInt(c <= d)
12636 return true
12637 }
12638
12639
12640
12641 for {
12642 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 || v_1.Op != OpAnd64 {
12643 break
12644 }
12645 _ = v_1.Args[1]
12646 v_1_0 := v_1.Args[0]
12647 v_1_1 := v_1.Args[1]
12648 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
12649 if v_1_1.Op != OpConst64 {
12650 continue
12651 }
12652 c := auxIntToInt64(v_1_1.AuxInt)
12653 if !(c >= 0) {
12654 continue
12655 }
12656 v.reset(OpConstBool)
12657 v.AuxInt = boolToAuxInt(true)
12658 return true
12659 }
12660 break
12661 }
12662
12663
12664
12665 for {
12666 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 || v_1.Op != OpRsh64Ux64 {
12667 break
12668 }
12669 _ = v_1.Args[1]
12670 v_1_1 := v_1.Args[1]
12671 if v_1_1.Op != OpConst64 {
12672 break
12673 }
12674 c := auxIntToInt64(v_1_1.AuxInt)
12675 if !(c > 0) {
12676 break
12677 }
12678 v.reset(OpConstBool)
12679 v.AuxInt = boolToAuxInt(true)
12680 return true
12681 }
12682
12683
12684 for {
12685 x := v_0
12686 if v_1.Op != OpConst64 {
12687 break
12688 }
12689 t := v_1.Type
12690 if auxIntToInt64(v_1.AuxInt) != -1 {
12691 break
12692 }
12693 v.reset(OpLess64)
12694 v0 := b.NewValue0(v.Pos, OpConst64, t)
12695 v0.AuxInt = int64ToAuxInt(0)
12696 v.AddArg2(x, v0)
12697 return true
12698 }
12699
12700
12701 for {
12702 if v_0.Op != OpConst64 {
12703 break
12704 }
12705 t := v_0.Type
12706 if auxIntToInt64(v_0.AuxInt) != 1 {
12707 break
12708 }
12709 x := v_1
12710 v.reset(OpLess64)
12711 v0 := b.NewValue0(v.Pos, OpConst64, t)
12712 v0.AuxInt = int64ToAuxInt(0)
12713 v.AddArg2(v0, x)
12714 return true
12715 }
12716
12717
12718 for {
12719 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != math.MinInt64 {
12720 break
12721 }
12722 v.reset(OpConstBool)
12723 v.AuxInt = boolToAuxInt(true)
12724 return true
12725 }
12726
12727
12728 for {
12729 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != math.MaxInt64 {
12730 break
12731 }
12732 v.reset(OpConstBool)
12733 v.AuxInt = boolToAuxInt(true)
12734 return true
12735 }
12736
12737
12738 for {
12739 x := v_0
12740 c := v_1
12741 if c.Op != OpConst64 || auxIntToInt64(c.AuxInt) != math.MinInt64 {
12742 break
12743 }
12744 v.reset(OpEq64)
12745 v.AddArg2(x, c)
12746 return true
12747 }
12748
12749
12750 for {
12751 c := v_0
12752 if c.Op != OpConst64 || auxIntToInt64(c.AuxInt) != math.MaxInt64 {
12753 break
12754 }
12755 x := v_1
12756 v.reset(OpEq64)
12757 v.AddArg2(x, c)
12758 return true
12759 }
12760 return false
12761 }
12762 func rewriteValuegeneric_OpLeq64F(v *Value) bool {
12763 v_1 := v.Args[1]
12764 v_0 := v.Args[0]
12765
12766
12767 for {
12768 if v_0.Op != OpConst64F {
12769 break
12770 }
12771 c := auxIntToFloat64(v_0.AuxInt)
12772 if v_1.Op != OpConst64F {
12773 break
12774 }
12775 d := auxIntToFloat64(v_1.AuxInt)
12776 v.reset(OpConstBool)
12777 v.AuxInt = boolToAuxInt(c <= d)
12778 return true
12779 }
12780 return false
12781 }
12782 func rewriteValuegeneric_OpLeq64U(v *Value) bool {
12783 v_1 := v.Args[1]
12784 v_0 := v.Args[0]
12785 b := v.Block
12786
12787
12788 for {
12789 if v_0.Op != OpConst64 {
12790 break
12791 }
12792 c := auxIntToInt64(v_0.AuxInt)
12793 if v_1.Op != OpConst64 {
12794 break
12795 }
12796 d := auxIntToInt64(v_1.AuxInt)
12797 v.reset(OpConstBool)
12798 v.AuxInt = boolToAuxInt(uint64(c) <= uint64(d))
12799 return true
12800 }
12801
12802
12803 for {
12804 if v_0.Op != OpConst64 {
12805 break
12806 }
12807 t := v_0.Type
12808 if auxIntToInt64(v_0.AuxInt) != 1 {
12809 break
12810 }
12811 x := v_1
12812 v.reset(OpNeq64)
12813 v0 := b.NewValue0(v.Pos, OpConst64, t)
12814 v0.AuxInt = int64ToAuxInt(0)
12815 v.AddArg2(v0, x)
12816 return true
12817 }
12818
12819
12820 for {
12821 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
12822 break
12823 }
12824 v.reset(OpConstBool)
12825 v.AuxInt = boolToAuxInt(true)
12826 return true
12827 }
12828
12829
12830 for {
12831 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != -1 {
12832 break
12833 }
12834 v.reset(OpConstBool)
12835 v.AuxInt = boolToAuxInt(true)
12836 return true
12837 }
12838
12839
12840 for {
12841 x := v_0
12842 c := v_1
12843 if c.Op != OpConst64 || auxIntToInt64(c.AuxInt) != 0 {
12844 break
12845 }
12846 v.reset(OpEq64)
12847 v.AddArg2(x, c)
12848 return true
12849 }
12850
12851
12852 for {
12853 c := v_0
12854 if c.Op != OpConst64 || auxIntToInt64(c.AuxInt) != -1 {
12855 break
12856 }
12857 x := v_1
12858 v.reset(OpEq64)
12859 v.AddArg2(x, c)
12860 return true
12861 }
12862 return false
12863 }
12864 func rewriteValuegeneric_OpLeq8(v *Value) bool {
12865 v_1 := v.Args[1]
12866 v_0 := v.Args[0]
12867 b := v.Block
12868
12869
12870 for {
12871 if v_0.Op != OpConst8 {
12872 break
12873 }
12874 c := auxIntToInt8(v_0.AuxInt)
12875 if v_1.Op != OpConst8 {
12876 break
12877 }
12878 d := auxIntToInt8(v_1.AuxInt)
12879 v.reset(OpConstBool)
12880 v.AuxInt = boolToAuxInt(c <= d)
12881 return true
12882 }
12883
12884
12885
12886 for {
12887 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 || v_1.Op != OpAnd8 {
12888 break
12889 }
12890 _ = v_1.Args[1]
12891 v_1_0 := v_1.Args[0]
12892 v_1_1 := v_1.Args[1]
12893 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
12894 if v_1_1.Op != OpConst8 {
12895 continue
12896 }
12897 c := auxIntToInt8(v_1_1.AuxInt)
12898 if !(c >= 0) {
12899 continue
12900 }
12901 v.reset(OpConstBool)
12902 v.AuxInt = boolToAuxInt(true)
12903 return true
12904 }
12905 break
12906 }
12907
12908
12909
12910 for {
12911 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 || v_1.Op != OpRsh8Ux64 {
12912 break
12913 }
12914 _ = v_1.Args[1]
12915 v_1_1 := v_1.Args[1]
12916 if v_1_1.Op != OpConst64 {
12917 break
12918 }
12919 c := auxIntToInt64(v_1_1.AuxInt)
12920 if !(c > 0) {
12921 break
12922 }
12923 v.reset(OpConstBool)
12924 v.AuxInt = boolToAuxInt(true)
12925 return true
12926 }
12927
12928
12929 for {
12930 x := v_0
12931 if v_1.Op != OpConst8 {
12932 break
12933 }
12934 t := v_1.Type
12935 if auxIntToInt8(v_1.AuxInt) != -1 {
12936 break
12937 }
12938 v.reset(OpLess8)
12939 v0 := b.NewValue0(v.Pos, OpConst8, t)
12940 v0.AuxInt = int8ToAuxInt(0)
12941 v.AddArg2(x, v0)
12942 return true
12943 }
12944
12945
12946 for {
12947 if v_0.Op != OpConst8 {
12948 break
12949 }
12950 t := v_0.Type
12951 if auxIntToInt8(v_0.AuxInt) != 1 {
12952 break
12953 }
12954 x := v_1
12955 v.reset(OpLess8)
12956 v0 := b.NewValue0(v.Pos, OpConst8, t)
12957 v0.AuxInt = int8ToAuxInt(0)
12958 v.AddArg2(v0, x)
12959 return true
12960 }
12961
12962
12963 for {
12964 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != math.MinInt8 {
12965 break
12966 }
12967 v.reset(OpConstBool)
12968 v.AuxInt = boolToAuxInt(true)
12969 return true
12970 }
12971
12972
12973 for {
12974 if v_1.Op != OpConst8 || auxIntToInt8(v_1.AuxInt) != math.MaxInt8 {
12975 break
12976 }
12977 v.reset(OpConstBool)
12978 v.AuxInt = boolToAuxInt(true)
12979 return true
12980 }
12981
12982
12983 for {
12984 x := v_0
12985 c := v_1
12986 if c.Op != OpConst8 || auxIntToInt8(c.AuxInt) != math.MinInt8 {
12987 break
12988 }
12989 v.reset(OpEq8)
12990 v.AddArg2(x, c)
12991 return true
12992 }
12993
12994
12995 for {
12996 c := v_0
12997 if c.Op != OpConst8 || auxIntToInt8(c.AuxInt) != math.MaxInt8 {
12998 break
12999 }
13000 x := v_1
13001 v.reset(OpEq8)
13002 v.AddArg2(x, c)
13003 return true
13004 }
13005 return false
13006 }
13007 func rewriteValuegeneric_OpLeq8U(v *Value) bool {
13008 v_1 := v.Args[1]
13009 v_0 := v.Args[0]
13010 b := v.Block
13011
13012
13013 for {
13014 if v_0.Op != OpConst8 {
13015 break
13016 }
13017 c := auxIntToInt8(v_0.AuxInt)
13018 if v_1.Op != OpConst8 {
13019 break
13020 }
13021 d := auxIntToInt8(v_1.AuxInt)
13022 v.reset(OpConstBool)
13023 v.AuxInt = boolToAuxInt(uint8(c) <= uint8(d))
13024 return true
13025 }
13026
13027
13028 for {
13029 if v_0.Op != OpConst8 {
13030 break
13031 }
13032 t := v_0.Type
13033 if auxIntToInt8(v_0.AuxInt) != 1 {
13034 break
13035 }
13036 x := v_1
13037 v.reset(OpNeq8)
13038 v0 := b.NewValue0(v.Pos, OpConst8, t)
13039 v0.AuxInt = int8ToAuxInt(0)
13040 v.AddArg2(v0, x)
13041 return true
13042 }
13043
13044
13045 for {
13046 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 {
13047 break
13048 }
13049 v.reset(OpConstBool)
13050 v.AuxInt = boolToAuxInt(true)
13051 return true
13052 }
13053
13054
13055 for {
13056 if v_1.Op != OpConst8 || auxIntToInt8(v_1.AuxInt) != -1 {
13057 break
13058 }
13059 v.reset(OpConstBool)
13060 v.AuxInt = boolToAuxInt(true)
13061 return true
13062 }
13063
13064
13065 for {
13066 x := v_0
13067 c := v_1
13068 if c.Op != OpConst8 || auxIntToInt8(c.AuxInt) != 0 {
13069 break
13070 }
13071 v.reset(OpEq8)
13072 v.AddArg2(x, c)
13073 return true
13074 }
13075
13076
13077 for {
13078 c := v_0
13079 if c.Op != OpConst8 || auxIntToInt8(c.AuxInt) != -1 {
13080 break
13081 }
13082 x := v_1
13083 v.reset(OpEq8)
13084 v.AddArg2(x, c)
13085 return true
13086 }
13087 return false
13088 }
13089 func rewriteValuegeneric_OpLess16(v *Value) bool {
13090 v_1 := v.Args[1]
13091 v_0 := v.Args[0]
13092 b := v.Block
13093
13094
13095 for {
13096 if v_0.Op != OpConst16 {
13097 break
13098 }
13099 c := auxIntToInt16(v_0.AuxInt)
13100 if v_1.Op != OpConst16 {
13101 break
13102 }
13103 d := auxIntToInt16(v_1.AuxInt)
13104 v.reset(OpConstBool)
13105 v.AuxInt = boolToAuxInt(c < d)
13106 return true
13107 }
13108
13109
13110
13111 for {
13112 if v_0.Op != OpConst16 {
13113 break
13114 }
13115 t := v_0.Type
13116 if auxIntToInt16(v_0.AuxInt) != 0 {
13117 break
13118 }
13119 x := v_1
13120 if !(isNonNegative(x)) {
13121 break
13122 }
13123 v.reset(OpNeq16)
13124 v0 := b.NewValue0(v.Pos, OpConst16, t)
13125 v0.AuxInt = int16ToAuxInt(0)
13126 v.AddArg2(v0, x)
13127 return true
13128 }
13129
13130
13131
13132 for {
13133 x := v_0
13134 if v_1.Op != OpConst16 {
13135 break
13136 }
13137 t := v_1.Type
13138 if auxIntToInt16(v_1.AuxInt) != 1 || !(isNonNegative(x)) {
13139 break
13140 }
13141 v.reset(OpEq16)
13142 v0 := b.NewValue0(v.Pos, OpConst16, t)
13143 v0.AuxInt = int16ToAuxInt(0)
13144 v.AddArg2(v0, x)
13145 return true
13146 }
13147
13148
13149 for {
13150 x := v_0
13151 if v_1.Op != OpConst16 {
13152 break
13153 }
13154 t := v_1.Type
13155 if auxIntToInt16(v_1.AuxInt) != 1 {
13156 break
13157 }
13158 v.reset(OpLeq16)
13159 v0 := b.NewValue0(v.Pos, OpConst16, t)
13160 v0.AuxInt = int16ToAuxInt(0)
13161 v.AddArg2(x, v0)
13162 return true
13163 }
13164
13165
13166 for {
13167 if v_0.Op != OpConst16 {
13168 break
13169 }
13170 t := v_0.Type
13171 if auxIntToInt16(v_0.AuxInt) != -1 {
13172 break
13173 }
13174 x := v_1
13175 v.reset(OpLeq16)
13176 v0 := b.NewValue0(v.Pos, OpConst16, t)
13177 v0.AuxInt = int16ToAuxInt(0)
13178 v.AddArg2(v0, x)
13179 return true
13180 }
13181
13182
13183 for {
13184 if v_1.Op != OpConst16 || auxIntToInt16(v_1.AuxInt) != math.MinInt16 {
13185 break
13186 }
13187 v.reset(OpConstBool)
13188 v.AuxInt = boolToAuxInt(false)
13189 return true
13190 }
13191
13192
13193 for {
13194 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != math.MaxInt16 {
13195 break
13196 }
13197 v.reset(OpConstBool)
13198 v.AuxInt = boolToAuxInt(false)
13199 return true
13200 }
13201
13202
13203 for {
13204 x := v_0
13205 if v_1.Op != OpConst16 {
13206 break
13207 }
13208 t := v_1.Type
13209 if auxIntToInt16(v_1.AuxInt) != math.MinInt16+1 {
13210 break
13211 }
13212 v.reset(OpEq16)
13213 v0 := b.NewValue0(v.Pos, OpConst16, t)
13214 v0.AuxInt = int16ToAuxInt(math.MinInt16)
13215 v.AddArg2(x, v0)
13216 return true
13217 }
13218
13219
13220 for {
13221 if v_0.Op != OpConst16 {
13222 break
13223 }
13224 t := v_0.Type
13225 if auxIntToInt16(v_0.AuxInt) != math.MaxInt16-1 {
13226 break
13227 }
13228 x := v_1
13229 v.reset(OpEq16)
13230 v0 := b.NewValue0(v.Pos, OpConst16, t)
13231 v0.AuxInt = int16ToAuxInt(math.MaxInt16)
13232 v.AddArg2(x, v0)
13233 return true
13234 }
13235 return false
13236 }
13237 func rewriteValuegeneric_OpLess16U(v *Value) bool {
13238 v_1 := v.Args[1]
13239 v_0 := v.Args[0]
13240 b := v.Block
13241
13242
13243 for {
13244 if v_0.Op != OpConst16 {
13245 break
13246 }
13247 c := auxIntToInt16(v_0.AuxInt)
13248 if v_1.Op != OpConst16 {
13249 break
13250 }
13251 d := auxIntToInt16(v_1.AuxInt)
13252 v.reset(OpConstBool)
13253 v.AuxInt = boolToAuxInt(uint16(c) < uint16(d))
13254 return true
13255 }
13256
13257
13258 for {
13259 x := v_0
13260 if v_1.Op != OpConst16 {
13261 break
13262 }
13263 t := v_1.Type
13264 if auxIntToInt16(v_1.AuxInt) != 1 {
13265 break
13266 }
13267 v.reset(OpEq16)
13268 v0 := b.NewValue0(v.Pos, OpConst16, t)
13269 v0.AuxInt = int16ToAuxInt(0)
13270 v.AddArg2(v0, x)
13271 return true
13272 }
13273
13274
13275 for {
13276 if v_1.Op != OpConst16 || auxIntToInt16(v_1.AuxInt) != 0 {
13277 break
13278 }
13279 v.reset(OpConstBool)
13280 v.AuxInt = boolToAuxInt(false)
13281 return true
13282 }
13283
13284
13285 for {
13286 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != -1 {
13287 break
13288 }
13289 v.reset(OpConstBool)
13290 v.AuxInt = boolToAuxInt(false)
13291 return true
13292 }
13293
13294
13295 for {
13296 x := v_0
13297 if v_1.Op != OpConst16 {
13298 break
13299 }
13300 t := v_1.Type
13301 if auxIntToInt16(v_1.AuxInt) != 1 {
13302 break
13303 }
13304 v.reset(OpEq16)
13305 v0 := b.NewValue0(v.Pos, OpConst16, t)
13306 v0.AuxInt = int16ToAuxInt(0)
13307 v.AddArg2(x, v0)
13308 return true
13309 }
13310
13311
13312 for {
13313 if v_0.Op != OpConst16 {
13314 break
13315 }
13316 t := v_0.Type
13317 if auxIntToInt16(v_0.AuxInt) != -2 {
13318 break
13319 }
13320 x := v_1
13321 v.reset(OpEq16)
13322 v0 := b.NewValue0(v.Pos, OpConst16, t)
13323 v0.AuxInt = int16ToAuxInt(-1)
13324 v.AddArg2(x, v0)
13325 return true
13326 }
13327 return false
13328 }
13329 func rewriteValuegeneric_OpLess32(v *Value) bool {
13330 v_1 := v.Args[1]
13331 v_0 := v.Args[0]
13332 b := v.Block
13333
13334
13335 for {
13336 if v_0.Op != OpConst32 {
13337 break
13338 }
13339 c := auxIntToInt32(v_0.AuxInt)
13340 if v_1.Op != OpConst32 {
13341 break
13342 }
13343 d := auxIntToInt32(v_1.AuxInt)
13344 v.reset(OpConstBool)
13345 v.AuxInt = boolToAuxInt(c < d)
13346 return true
13347 }
13348
13349
13350
13351 for {
13352 if v_0.Op != OpConst32 {
13353 break
13354 }
13355 t := v_0.Type
13356 if auxIntToInt32(v_0.AuxInt) != 0 {
13357 break
13358 }
13359 x := v_1
13360 if !(isNonNegative(x)) {
13361 break
13362 }
13363 v.reset(OpNeq32)
13364 v0 := b.NewValue0(v.Pos, OpConst32, t)
13365 v0.AuxInt = int32ToAuxInt(0)
13366 v.AddArg2(v0, x)
13367 return true
13368 }
13369
13370
13371
13372 for {
13373 x := v_0
13374 if v_1.Op != OpConst32 {
13375 break
13376 }
13377 t := v_1.Type
13378 if auxIntToInt32(v_1.AuxInt) != 1 || !(isNonNegative(x)) {
13379 break
13380 }
13381 v.reset(OpEq32)
13382 v0 := b.NewValue0(v.Pos, OpConst32, t)
13383 v0.AuxInt = int32ToAuxInt(0)
13384 v.AddArg2(v0, x)
13385 return true
13386 }
13387
13388
13389 for {
13390 x := v_0
13391 if v_1.Op != OpConst32 {
13392 break
13393 }
13394 t := v_1.Type
13395 if auxIntToInt32(v_1.AuxInt) != 1 {
13396 break
13397 }
13398 v.reset(OpLeq32)
13399 v0 := b.NewValue0(v.Pos, OpConst32, t)
13400 v0.AuxInt = int32ToAuxInt(0)
13401 v.AddArg2(x, v0)
13402 return true
13403 }
13404
13405
13406 for {
13407 if v_0.Op != OpConst32 {
13408 break
13409 }
13410 t := v_0.Type
13411 if auxIntToInt32(v_0.AuxInt) != -1 {
13412 break
13413 }
13414 x := v_1
13415 v.reset(OpLeq32)
13416 v0 := b.NewValue0(v.Pos, OpConst32, t)
13417 v0.AuxInt = int32ToAuxInt(0)
13418 v.AddArg2(v0, x)
13419 return true
13420 }
13421
13422
13423 for {
13424 if v_1.Op != OpConst32 || auxIntToInt32(v_1.AuxInt) != math.MinInt32 {
13425 break
13426 }
13427 v.reset(OpConstBool)
13428 v.AuxInt = boolToAuxInt(false)
13429 return true
13430 }
13431
13432
13433 for {
13434 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != math.MaxInt32 {
13435 break
13436 }
13437 v.reset(OpConstBool)
13438 v.AuxInt = boolToAuxInt(false)
13439 return true
13440 }
13441
13442
13443 for {
13444 x := v_0
13445 if v_1.Op != OpConst32 {
13446 break
13447 }
13448 t := v_1.Type
13449 if auxIntToInt32(v_1.AuxInt) != math.MinInt32+1 {
13450 break
13451 }
13452 v.reset(OpEq32)
13453 v0 := b.NewValue0(v.Pos, OpConst32, t)
13454 v0.AuxInt = int32ToAuxInt(math.MinInt32)
13455 v.AddArg2(x, v0)
13456 return true
13457 }
13458
13459
13460 for {
13461 if v_0.Op != OpConst32 {
13462 break
13463 }
13464 t := v_0.Type
13465 if auxIntToInt32(v_0.AuxInt) != math.MaxInt32-1 {
13466 break
13467 }
13468 x := v_1
13469 v.reset(OpEq32)
13470 v0 := b.NewValue0(v.Pos, OpConst32, t)
13471 v0.AuxInt = int32ToAuxInt(math.MaxInt32)
13472 v.AddArg2(x, v0)
13473 return true
13474 }
13475 return false
13476 }
13477 func rewriteValuegeneric_OpLess32F(v *Value) bool {
13478 v_1 := v.Args[1]
13479 v_0 := v.Args[0]
13480
13481
13482 for {
13483 if v_0.Op != OpConst32F {
13484 break
13485 }
13486 c := auxIntToFloat32(v_0.AuxInt)
13487 if v_1.Op != OpConst32F {
13488 break
13489 }
13490 d := auxIntToFloat32(v_1.AuxInt)
13491 v.reset(OpConstBool)
13492 v.AuxInt = boolToAuxInt(c < d)
13493 return true
13494 }
13495 return false
13496 }
13497 func rewriteValuegeneric_OpLess32U(v *Value) bool {
13498 v_1 := v.Args[1]
13499 v_0 := v.Args[0]
13500 b := v.Block
13501
13502
13503 for {
13504 if v_0.Op != OpConst32 {
13505 break
13506 }
13507 c := auxIntToInt32(v_0.AuxInt)
13508 if v_1.Op != OpConst32 {
13509 break
13510 }
13511 d := auxIntToInt32(v_1.AuxInt)
13512 v.reset(OpConstBool)
13513 v.AuxInt = boolToAuxInt(uint32(c) < uint32(d))
13514 return true
13515 }
13516
13517
13518 for {
13519 x := v_0
13520 if v_1.Op != OpConst32 {
13521 break
13522 }
13523 t := v_1.Type
13524 if auxIntToInt32(v_1.AuxInt) != 1 {
13525 break
13526 }
13527 v.reset(OpEq32)
13528 v0 := b.NewValue0(v.Pos, OpConst32, t)
13529 v0.AuxInt = int32ToAuxInt(0)
13530 v.AddArg2(v0, x)
13531 return true
13532 }
13533
13534
13535 for {
13536 if v_1.Op != OpConst32 || auxIntToInt32(v_1.AuxInt) != 0 {
13537 break
13538 }
13539 v.reset(OpConstBool)
13540 v.AuxInt = boolToAuxInt(false)
13541 return true
13542 }
13543
13544
13545 for {
13546 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != -1 {
13547 break
13548 }
13549 v.reset(OpConstBool)
13550 v.AuxInt = boolToAuxInt(false)
13551 return true
13552 }
13553
13554
13555 for {
13556 x := v_0
13557 if v_1.Op != OpConst32 {
13558 break
13559 }
13560 t := v_1.Type
13561 if auxIntToInt32(v_1.AuxInt) != 1 {
13562 break
13563 }
13564 v.reset(OpEq32)
13565 v0 := b.NewValue0(v.Pos, OpConst32, t)
13566 v0.AuxInt = int32ToAuxInt(0)
13567 v.AddArg2(x, v0)
13568 return true
13569 }
13570
13571
13572 for {
13573 if v_0.Op != OpConst32 {
13574 break
13575 }
13576 t := v_0.Type
13577 if auxIntToInt32(v_0.AuxInt) != -2 {
13578 break
13579 }
13580 x := v_1
13581 v.reset(OpEq32)
13582 v0 := b.NewValue0(v.Pos, OpConst32, t)
13583 v0.AuxInt = int32ToAuxInt(-1)
13584 v.AddArg2(x, v0)
13585 return true
13586 }
13587 return false
13588 }
13589 func rewriteValuegeneric_OpLess64(v *Value) bool {
13590 v_1 := v.Args[1]
13591 v_0 := v.Args[0]
13592 b := v.Block
13593
13594
13595 for {
13596 if v_0.Op != OpConst64 {
13597 break
13598 }
13599 c := auxIntToInt64(v_0.AuxInt)
13600 if v_1.Op != OpConst64 {
13601 break
13602 }
13603 d := auxIntToInt64(v_1.AuxInt)
13604 v.reset(OpConstBool)
13605 v.AuxInt = boolToAuxInt(c < d)
13606 return true
13607 }
13608
13609
13610
13611 for {
13612 if v_0.Op != OpConst64 {
13613 break
13614 }
13615 t := v_0.Type
13616 if auxIntToInt64(v_0.AuxInt) != 0 {
13617 break
13618 }
13619 x := v_1
13620 if !(isNonNegative(x)) {
13621 break
13622 }
13623 v.reset(OpNeq64)
13624 v0 := b.NewValue0(v.Pos, OpConst64, t)
13625 v0.AuxInt = int64ToAuxInt(0)
13626 v.AddArg2(v0, x)
13627 return true
13628 }
13629
13630
13631
13632 for {
13633 x := v_0
13634 if v_1.Op != OpConst64 {
13635 break
13636 }
13637 t := v_1.Type
13638 if auxIntToInt64(v_1.AuxInt) != 1 || !(isNonNegative(x)) {
13639 break
13640 }
13641 v.reset(OpEq64)
13642 v0 := b.NewValue0(v.Pos, OpConst64, t)
13643 v0.AuxInt = int64ToAuxInt(0)
13644 v.AddArg2(v0, x)
13645 return true
13646 }
13647
13648
13649 for {
13650 x := v_0
13651 if v_1.Op != OpConst64 {
13652 break
13653 }
13654 t := v_1.Type
13655 if auxIntToInt64(v_1.AuxInt) != 1 {
13656 break
13657 }
13658 v.reset(OpLeq64)
13659 v0 := b.NewValue0(v.Pos, OpConst64, t)
13660 v0.AuxInt = int64ToAuxInt(0)
13661 v.AddArg2(x, v0)
13662 return true
13663 }
13664
13665
13666 for {
13667 if v_0.Op != OpConst64 {
13668 break
13669 }
13670 t := v_0.Type
13671 if auxIntToInt64(v_0.AuxInt) != -1 {
13672 break
13673 }
13674 x := v_1
13675 v.reset(OpLeq64)
13676 v0 := b.NewValue0(v.Pos, OpConst64, t)
13677 v0.AuxInt = int64ToAuxInt(0)
13678 v.AddArg2(v0, x)
13679 return true
13680 }
13681
13682
13683 for {
13684 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != math.MinInt64 {
13685 break
13686 }
13687 v.reset(OpConstBool)
13688 v.AuxInt = boolToAuxInt(false)
13689 return true
13690 }
13691
13692
13693 for {
13694 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != math.MaxInt64 {
13695 break
13696 }
13697 v.reset(OpConstBool)
13698 v.AuxInt = boolToAuxInt(false)
13699 return true
13700 }
13701
13702
13703 for {
13704 x := v_0
13705 if v_1.Op != OpConst64 {
13706 break
13707 }
13708 t := v_1.Type
13709 if auxIntToInt64(v_1.AuxInt) != math.MinInt64+1 {
13710 break
13711 }
13712 v.reset(OpEq64)
13713 v0 := b.NewValue0(v.Pos, OpConst64, t)
13714 v0.AuxInt = int64ToAuxInt(math.MinInt64)
13715 v.AddArg2(x, v0)
13716 return true
13717 }
13718
13719
13720 for {
13721 if v_0.Op != OpConst64 {
13722 break
13723 }
13724 t := v_0.Type
13725 if auxIntToInt64(v_0.AuxInt) != math.MaxInt64-1 {
13726 break
13727 }
13728 x := v_1
13729 v.reset(OpEq64)
13730 v0 := b.NewValue0(v.Pos, OpConst64, t)
13731 v0.AuxInt = int64ToAuxInt(math.MaxInt64)
13732 v.AddArg2(x, v0)
13733 return true
13734 }
13735 return false
13736 }
13737 func rewriteValuegeneric_OpLess64F(v *Value) bool {
13738 v_1 := v.Args[1]
13739 v_0 := v.Args[0]
13740
13741
13742 for {
13743 if v_0.Op != OpConst64F {
13744 break
13745 }
13746 c := auxIntToFloat64(v_0.AuxInt)
13747 if v_1.Op != OpConst64F {
13748 break
13749 }
13750 d := auxIntToFloat64(v_1.AuxInt)
13751 v.reset(OpConstBool)
13752 v.AuxInt = boolToAuxInt(c < d)
13753 return true
13754 }
13755 return false
13756 }
13757 func rewriteValuegeneric_OpLess64U(v *Value) bool {
13758 v_1 := v.Args[1]
13759 v_0 := v.Args[0]
13760 b := v.Block
13761
13762
13763 for {
13764 if v_0.Op != OpConst64 {
13765 break
13766 }
13767 c := auxIntToInt64(v_0.AuxInt)
13768 if v_1.Op != OpConst64 {
13769 break
13770 }
13771 d := auxIntToInt64(v_1.AuxInt)
13772 v.reset(OpConstBool)
13773 v.AuxInt = boolToAuxInt(uint64(c) < uint64(d))
13774 return true
13775 }
13776
13777
13778 for {
13779 x := v_0
13780 if v_1.Op != OpConst64 {
13781 break
13782 }
13783 t := v_1.Type
13784 if auxIntToInt64(v_1.AuxInt) != 1 {
13785 break
13786 }
13787 v.reset(OpEq64)
13788 v0 := b.NewValue0(v.Pos, OpConst64, t)
13789 v0.AuxInt = int64ToAuxInt(0)
13790 v.AddArg2(v0, x)
13791 return true
13792 }
13793
13794
13795 for {
13796 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 0 {
13797 break
13798 }
13799 v.reset(OpConstBool)
13800 v.AuxInt = boolToAuxInt(false)
13801 return true
13802 }
13803
13804
13805 for {
13806 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != -1 {
13807 break
13808 }
13809 v.reset(OpConstBool)
13810 v.AuxInt = boolToAuxInt(false)
13811 return true
13812 }
13813
13814
13815 for {
13816 x := v_0
13817 if v_1.Op != OpConst64 {
13818 break
13819 }
13820 t := v_1.Type
13821 if auxIntToInt64(v_1.AuxInt) != 1 {
13822 break
13823 }
13824 v.reset(OpEq64)
13825 v0 := b.NewValue0(v.Pos, OpConst64, t)
13826 v0.AuxInt = int64ToAuxInt(0)
13827 v.AddArg2(x, v0)
13828 return true
13829 }
13830
13831
13832 for {
13833 if v_0.Op != OpConst64 {
13834 break
13835 }
13836 t := v_0.Type
13837 if auxIntToInt64(v_0.AuxInt) != -2 {
13838 break
13839 }
13840 x := v_1
13841 v.reset(OpEq64)
13842 v0 := b.NewValue0(v.Pos, OpConst64, t)
13843 v0.AuxInt = int64ToAuxInt(-1)
13844 v.AddArg2(x, v0)
13845 return true
13846 }
13847 return false
13848 }
13849 func rewriteValuegeneric_OpLess8(v *Value) bool {
13850 v_1 := v.Args[1]
13851 v_0 := v.Args[0]
13852 b := v.Block
13853
13854
13855 for {
13856 if v_0.Op != OpConst8 {
13857 break
13858 }
13859 c := auxIntToInt8(v_0.AuxInt)
13860 if v_1.Op != OpConst8 {
13861 break
13862 }
13863 d := auxIntToInt8(v_1.AuxInt)
13864 v.reset(OpConstBool)
13865 v.AuxInt = boolToAuxInt(c < d)
13866 return true
13867 }
13868
13869
13870
13871 for {
13872 if v_0.Op != OpConst8 {
13873 break
13874 }
13875 t := v_0.Type
13876 if auxIntToInt8(v_0.AuxInt) != 0 {
13877 break
13878 }
13879 x := v_1
13880 if !(isNonNegative(x)) {
13881 break
13882 }
13883 v.reset(OpNeq8)
13884 v0 := b.NewValue0(v.Pos, OpConst8, t)
13885 v0.AuxInt = int8ToAuxInt(0)
13886 v.AddArg2(v0, x)
13887 return true
13888 }
13889
13890
13891
13892 for {
13893 x := v_0
13894 if v_1.Op != OpConst8 {
13895 break
13896 }
13897 t := v_1.Type
13898 if auxIntToInt8(v_1.AuxInt) != 1 || !(isNonNegative(x)) {
13899 break
13900 }
13901 v.reset(OpEq8)
13902 v0 := b.NewValue0(v.Pos, OpConst8, t)
13903 v0.AuxInt = int8ToAuxInt(0)
13904 v.AddArg2(v0, x)
13905 return true
13906 }
13907
13908
13909 for {
13910 x := v_0
13911 if v_1.Op != OpConst8 {
13912 break
13913 }
13914 t := v_1.Type
13915 if auxIntToInt8(v_1.AuxInt) != 1 {
13916 break
13917 }
13918 v.reset(OpLeq8)
13919 v0 := b.NewValue0(v.Pos, OpConst8, t)
13920 v0.AuxInt = int8ToAuxInt(0)
13921 v.AddArg2(x, v0)
13922 return true
13923 }
13924
13925
13926 for {
13927 if v_0.Op != OpConst8 {
13928 break
13929 }
13930 t := v_0.Type
13931 if auxIntToInt8(v_0.AuxInt) != -1 {
13932 break
13933 }
13934 x := v_1
13935 v.reset(OpLeq8)
13936 v0 := b.NewValue0(v.Pos, OpConst8, t)
13937 v0.AuxInt = int8ToAuxInt(0)
13938 v.AddArg2(v0, x)
13939 return true
13940 }
13941
13942
13943 for {
13944 if v_1.Op != OpConst8 || auxIntToInt8(v_1.AuxInt) != math.MinInt8 {
13945 break
13946 }
13947 v.reset(OpConstBool)
13948 v.AuxInt = boolToAuxInt(false)
13949 return true
13950 }
13951
13952
13953 for {
13954 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != math.MaxInt8 {
13955 break
13956 }
13957 v.reset(OpConstBool)
13958 v.AuxInt = boolToAuxInt(false)
13959 return true
13960 }
13961
13962
13963 for {
13964 x := v_0
13965 if v_1.Op != OpConst8 {
13966 break
13967 }
13968 t := v_1.Type
13969 if auxIntToInt8(v_1.AuxInt) != math.MinInt8+1 {
13970 break
13971 }
13972 v.reset(OpEq8)
13973 v0 := b.NewValue0(v.Pos, OpConst8, t)
13974 v0.AuxInt = int8ToAuxInt(math.MinInt8)
13975 v.AddArg2(x, v0)
13976 return true
13977 }
13978
13979
13980 for {
13981 if v_0.Op != OpConst8 {
13982 break
13983 }
13984 t := v_0.Type
13985 if auxIntToInt8(v_0.AuxInt) != math.MaxInt8-1 {
13986 break
13987 }
13988 x := v_1
13989 v.reset(OpEq8)
13990 v0 := b.NewValue0(v.Pos, OpConst8, t)
13991 v0.AuxInt = int8ToAuxInt(math.MaxInt8)
13992 v.AddArg2(x, v0)
13993 return true
13994 }
13995 return false
13996 }
13997 func rewriteValuegeneric_OpLess8U(v *Value) bool {
13998 v_1 := v.Args[1]
13999 v_0 := v.Args[0]
14000 b := v.Block
14001
14002
14003 for {
14004 if v_0.Op != OpConst8 {
14005 break
14006 }
14007 c := auxIntToInt8(v_0.AuxInt)
14008 if v_1.Op != OpConst8 {
14009 break
14010 }
14011 d := auxIntToInt8(v_1.AuxInt)
14012 v.reset(OpConstBool)
14013 v.AuxInt = boolToAuxInt(uint8(c) < uint8(d))
14014 return true
14015 }
14016
14017
14018 for {
14019 x := v_0
14020 if v_1.Op != OpConst8 {
14021 break
14022 }
14023 t := v_1.Type
14024 if auxIntToInt8(v_1.AuxInt) != 1 {
14025 break
14026 }
14027 v.reset(OpEq8)
14028 v0 := b.NewValue0(v.Pos, OpConst8, t)
14029 v0.AuxInt = int8ToAuxInt(0)
14030 v.AddArg2(v0, x)
14031 return true
14032 }
14033
14034
14035 for {
14036 if v_1.Op != OpConst8 || auxIntToInt8(v_1.AuxInt) != 0 {
14037 break
14038 }
14039 v.reset(OpConstBool)
14040 v.AuxInt = boolToAuxInt(false)
14041 return true
14042 }
14043
14044
14045 for {
14046 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != -1 {
14047 break
14048 }
14049 v.reset(OpConstBool)
14050 v.AuxInt = boolToAuxInt(false)
14051 return true
14052 }
14053
14054
14055 for {
14056 x := v_0
14057 if v_1.Op != OpConst8 {
14058 break
14059 }
14060 t := v_1.Type
14061 if auxIntToInt8(v_1.AuxInt) != 1 {
14062 break
14063 }
14064 v.reset(OpEq8)
14065 v0 := b.NewValue0(v.Pos, OpConst8, t)
14066 v0.AuxInt = int8ToAuxInt(0)
14067 v.AddArg2(x, v0)
14068 return true
14069 }
14070
14071
14072 for {
14073 if v_0.Op != OpConst8 {
14074 break
14075 }
14076 t := v_0.Type
14077 if auxIntToInt8(v_0.AuxInt) != -2 {
14078 break
14079 }
14080 x := v_1
14081 v.reset(OpEq8)
14082 v0 := b.NewValue0(v.Pos, OpConst8, t)
14083 v0.AuxInt = int8ToAuxInt(-1)
14084 v.AddArg2(x, v0)
14085 return true
14086 }
14087 return false
14088 }
14089 func rewriteValuegeneric_OpLoad(v *Value) bool {
14090 v_1 := v.Args[1]
14091 v_0 := v.Args[0]
14092 b := v.Block
14093 config := b.Func.Config
14094 typ := &b.Func.Config.Types
14095
14096
14097
14098 for {
14099 t1 := v.Type
14100 p1 := v_0
14101 if v_1.Op != OpStore {
14102 break
14103 }
14104 t2 := auxToType(v_1.Aux)
14105 x := v_1.Args[1]
14106 p2 := v_1.Args[0]
14107 if !(isSamePtr(p1, p2) && copyCompatibleType(t1, x.Type) && t1.Size() == t2.Size()) {
14108 break
14109 }
14110 v.copyOf(x)
14111 return true
14112 }
14113
14114
14115
14116 for {
14117 t1 := v.Type
14118 p1 := v_0
14119 if v_1.Op != OpStore {
14120 break
14121 }
14122 t2 := auxToType(v_1.Aux)
14123 _ = v_1.Args[2]
14124 p2 := v_1.Args[0]
14125 v_1_2 := v_1.Args[2]
14126 if v_1_2.Op != OpStore {
14127 break
14128 }
14129 t3 := auxToType(v_1_2.Aux)
14130 x := v_1_2.Args[1]
14131 p3 := v_1_2.Args[0]
14132 if !(isSamePtr(p1, p3) && copyCompatibleType(t1, x.Type) && t1.Size() == t3.Size() && disjoint(p3, t3.Size(), p2, t2.Size())) {
14133 break
14134 }
14135 v.copyOf(x)
14136 return true
14137 }
14138
14139
14140
14141 for {
14142 t1 := v.Type
14143 p1 := v_0
14144 if v_1.Op != OpStore {
14145 break
14146 }
14147 t2 := auxToType(v_1.Aux)
14148 _ = v_1.Args[2]
14149 p2 := v_1.Args[0]
14150 v_1_2 := v_1.Args[2]
14151 if v_1_2.Op != OpStore {
14152 break
14153 }
14154 t3 := auxToType(v_1_2.Aux)
14155 _ = v_1_2.Args[2]
14156 p3 := v_1_2.Args[0]
14157 v_1_2_2 := v_1_2.Args[2]
14158 if v_1_2_2.Op != OpStore {
14159 break
14160 }
14161 t4 := auxToType(v_1_2_2.Aux)
14162 x := v_1_2_2.Args[1]
14163 p4 := v_1_2_2.Args[0]
14164 if !(isSamePtr(p1, p4) && copyCompatibleType(t1, x.Type) && t1.Size() == t4.Size() && disjoint(p4, t4.Size(), p2, t2.Size()) && disjoint(p4, t4.Size(), p3, t3.Size())) {
14165 break
14166 }
14167 v.copyOf(x)
14168 return true
14169 }
14170
14171
14172
14173 for {
14174 t1 := v.Type
14175 p1 := v_0
14176 if v_1.Op != OpStore {
14177 break
14178 }
14179 t2 := auxToType(v_1.Aux)
14180 _ = v_1.Args[2]
14181 p2 := v_1.Args[0]
14182 v_1_2 := v_1.Args[2]
14183 if v_1_2.Op != OpStore {
14184 break
14185 }
14186 t3 := auxToType(v_1_2.Aux)
14187 _ = v_1_2.Args[2]
14188 p3 := v_1_2.Args[0]
14189 v_1_2_2 := v_1_2.Args[2]
14190 if v_1_2_2.Op != OpStore {
14191 break
14192 }
14193 t4 := auxToType(v_1_2_2.Aux)
14194 _ = v_1_2_2.Args[2]
14195 p4 := v_1_2_2.Args[0]
14196 v_1_2_2_2 := v_1_2_2.Args[2]
14197 if v_1_2_2_2.Op != OpStore {
14198 break
14199 }
14200 t5 := auxToType(v_1_2_2_2.Aux)
14201 x := v_1_2_2_2.Args[1]
14202 p5 := v_1_2_2_2.Args[0]
14203 if !(isSamePtr(p1, p5) && copyCompatibleType(t1, x.Type) && t1.Size() == t5.Size() && disjoint(p5, t5.Size(), p2, t2.Size()) && disjoint(p5, t5.Size(), p3, t3.Size()) && disjoint(p5, t5.Size(), p4, t4.Size())) {
14204 break
14205 }
14206 v.copyOf(x)
14207 return true
14208 }
14209
14210
14211
14212 for {
14213 t1 := v.Type
14214 p1 := v_0
14215 if v_1.Op != OpStore {
14216 break
14217 }
14218 t2 := auxToType(v_1.Aux)
14219 _ = v_1.Args[1]
14220 p2 := v_1.Args[0]
14221 v_1_1 := v_1.Args[1]
14222 if v_1_1.Op != OpConst64 {
14223 break
14224 }
14225 x := auxIntToInt64(v_1_1.AuxInt)
14226 if !(isSamePtr(p1, p2) && t2.Size() == 8 && is64BitFloat(t1) && !math.IsNaN(math.Float64frombits(uint64(x)))) {
14227 break
14228 }
14229 v.reset(OpConst64F)
14230 v.AuxInt = float64ToAuxInt(math.Float64frombits(uint64(x)))
14231 return true
14232 }
14233
14234
14235
14236 for {
14237 t1 := v.Type
14238 p1 := v_0
14239 if v_1.Op != OpStore {
14240 break
14241 }
14242 t2 := auxToType(v_1.Aux)
14243 _ = v_1.Args[1]
14244 p2 := v_1.Args[0]
14245 v_1_1 := v_1.Args[1]
14246 if v_1_1.Op != OpConst32 {
14247 break
14248 }
14249 x := auxIntToInt32(v_1_1.AuxInt)
14250 if !(isSamePtr(p1, p2) && t2.Size() == 4 && is32BitFloat(t1) && !math.IsNaN(float64(math.Float32frombits(uint32(x))))) {
14251 break
14252 }
14253 v.reset(OpConst32F)
14254 v.AuxInt = float32ToAuxInt(math.Float32frombits(uint32(x)))
14255 return true
14256 }
14257
14258
14259
14260 for {
14261 t1 := v.Type
14262 p1 := v_0
14263 if v_1.Op != OpStore {
14264 break
14265 }
14266 t2 := auxToType(v_1.Aux)
14267 _ = v_1.Args[1]
14268 p2 := v_1.Args[0]
14269 v_1_1 := v_1.Args[1]
14270 if v_1_1.Op != OpConst64F {
14271 break
14272 }
14273 x := auxIntToFloat64(v_1_1.AuxInt)
14274 if !(isSamePtr(p1, p2) && t2.Size() == 8 && is64BitInt(t1)) {
14275 break
14276 }
14277 v.reset(OpConst64)
14278 v.AuxInt = int64ToAuxInt(int64(math.Float64bits(x)))
14279 return true
14280 }
14281
14282
14283
14284 for {
14285 t1 := v.Type
14286 p1 := v_0
14287 if v_1.Op != OpStore {
14288 break
14289 }
14290 t2 := auxToType(v_1.Aux)
14291 _ = v_1.Args[1]
14292 p2 := v_1.Args[0]
14293 v_1_1 := v_1.Args[1]
14294 if v_1_1.Op != OpConst32F {
14295 break
14296 }
14297 x := auxIntToFloat32(v_1_1.AuxInt)
14298 if !(isSamePtr(p1, p2) && t2.Size() == 4 && is32BitInt(t1)) {
14299 break
14300 }
14301 v.reset(OpConst32)
14302 v.AuxInt = int32ToAuxInt(int32(math.Float32bits(x)))
14303 return true
14304 }
14305
14306
14307
14308 for {
14309 t1 := v.Type
14310 op := v_0
14311 if op.Op != OpOffPtr {
14312 break
14313 }
14314 o1 := auxIntToInt64(op.AuxInt)
14315 p1 := op.Args[0]
14316 if v_1.Op != OpStore {
14317 break
14318 }
14319 t2 := auxToType(v_1.Aux)
14320 _ = v_1.Args[2]
14321 p2 := v_1.Args[0]
14322 mem := v_1.Args[2]
14323 if mem.Op != OpZero {
14324 break
14325 }
14326 n := auxIntToInt64(mem.AuxInt)
14327 p3 := mem.Args[0]
14328 if !(o1 >= 0 && o1+t1.Size() <= n && isSamePtr(p1, p3) && CanSSA(t1) && disjoint(op, t1.Size(), p2, t2.Size())) {
14329 break
14330 }
14331 b = mem.Block
14332 v0 := b.NewValue0(v.Pos, OpLoad, t1)
14333 v.copyOf(v0)
14334 v1 := b.NewValue0(v.Pos, OpOffPtr, op.Type)
14335 v1.AuxInt = int64ToAuxInt(o1)
14336 v1.AddArg(p3)
14337 v0.AddArg2(v1, mem)
14338 return true
14339 }
14340
14341
14342
14343 for {
14344 t1 := v.Type
14345 op := v_0
14346 if op.Op != OpOffPtr {
14347 break
14348 }
14349 o1 := auxIntToInt64(op.AuxInt)
14350 p1 := op.Args[0]
14351 if v_1.Op != OpStore {
14352 break
14353 }
14354 t2 := auxToType(v_1.Aux)
14355 _ = v_1.Args[2]
14356 p2 := v_1.Args[0]
14357 v_1_2 := v_1.Args[2]
14358 if v_1_2.Op != OpStore {
14359 break
14360 }
14361 t3 := auxToType(v_1_2.Aux)
14362 _ = v_1_2.Args[2]
14363 p3 := v_1_2.Args[0]
14364 mem := v_1_2.Args[2]
14365 if mem.Op != OpZero {
14366 break
14367 }
14368 n := auxIntToInt64(mem.AuxInt)
14369 p4 := mem.Args[0]
14370 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())) {
14371 break
14372 }
14373 b = mem.Block
14374 v0 := b.NewValue0(v.Pos, OpLoad, t1)
14375 v.copyOf(v0)
14376 v1 := b.NewValue0(v.Pos, OpOffPtr, op.Type)
14377 v1.AuxInt = int64ToAuxInt(o1)
14378 v1.AddArg(p4)
14379 v0.AddArg2(v1, mem)
14380 return true
14381 }
14382
14383
14384
14385 for {
14386 t1 := v.Type
14387 op := v_0
14388 if op.Op != OpOffPtr {
14389 break
14390 }
14391 o1 := auxIntToInt64(op.AuxInt)
14392 p1 := op.Args[0]
14393 if v_1.Op != OpStore {
14394 break
14395 }
14396 t2 := auxToType(v_1.Aux)
14397 _ = v_1.Args[2]
14398 p2 := v_1.Args[0]
14399 v_1_2 := v_1.Args[2]
14400 if v_1_2.Op != OpStore {
14401 break
14402 }
14403 t3 := auxToType(v_1_2.Aux)
14404 _ = v_1_2.Args[2]
14405 p3 := v_1_2.Args[0]
14406 v_1_2_2 := v_1_2.Args[2]
14407 if v_1_2_2.Op != OpStore {
14408 break
14409 }
14410 t4 := auxToType(v_1_2_2.Aux)
14411 _ = v_1_2_2.Args[2]
14412 p4 := v_1_2_2.Args[0]
14413 mem := v_1_2_2.Args[2]
14414 if mem.Op != OpZero {
14415 break
14416 }
14417 n := auxIntToInt64(mem.AuxInt)
14418 p5 := mem.Args[0]
14419 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())) {
14420 break
14421 }
14422 b = mem.Block
14423 v0 := b.NewValue0(v.Pos, OpLoad, t1)
14424 v.copyOf(v0)
14425 v1 := b.NewValue0(v.Pos, OpOffPtr, op.Type)
14426 v1.AuxInt = int64ToAuxInt(o1)
14427 v1.AddArg(p5)
14428 v0.AddArg2(v1, mem)
14429 return true
14430 }
14431
14432
14433
14434 for {
14435 t1 := v.Type
14436 op := v_0
14437 if op.Op != OpOffPtr {
14438 break
14439 }
14440 o1 := auxIntToInt64(op.AuxInt)
14441 p1 := op.Args[0]
14442 if v_1.Op != OpStore {
14443 break
14444 }
14445 t2 := auxToType(v_1.Aux)
14446 _ = v_1.Args[2]
14447 p2 := v_1.Args[0]
14448 v_1_2 := v_1.Args[2]
14449 if v_1_2.Op != OpStore {
14450 break
14451 }
14452 t3 := auxToType(v_1_2.Aux)
14453 _ = v_1_2.Args[2]
14454 p3 := v_1_2.Args[0]
14455 v_1_2_2 := v_1_2.Args[2]
14456 if v_1_2_2.Op != OpStore {
14457 break
14458 }
14459 t4 := auxToType(v_1_2_2.Aux)
14460 _ = v_1_2_2.Args[2]
14461 p4 := v_1_2_2.Args[0]
14462 v_1_2_2_2 := v_1_2_2.Args[2]
14463 if v_1_2_2_2.Op != OpStore {
14464 break
14465 }
14466 t5 := auxToType(v_1_2_2_2.Aux)
14467 _ = v_1_2_2_2.Args[2]
14468 p5 := v_1_2_2_2.Args[0]
14469 mem := v_1_2_2_2.Args[2]
14470 if mem.Op != OpZero {
14471 break
14472 }
14473 n := auxIntToInt64(mem.AuxInt)
14474 p6 := mem.Args[0]
14475 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())) {
14476 break
14477 }
14478 b = mem.Block
14479 v0 := b.NewValue0(v.Pos, OpLoad, t1)
14480 v.copyOf(v0)
14481 v1 := b.NewValue0(v.Pos, OpOffPtr, op.Type)
14482 v1.AuxInt = int64ToAuxInt(o1)
14483 v1.AddArg(p6)
14484 v0.AddArg2(v1, mem)
14485 return true
14486 }
14487
14488
14489
14490 for {
14491 t1 := v.Type
14492 if v_0.Op != OpOffPtr {
14493 break
14494 }
14495 o := auxIntToInt64(v_0.AuxInt)
14496 p1 := v_0.Args[0]
14497 if v_1.Op != OpZero {
14498 break
14499 }
14500 n := auxIntToInt64(v_1.AuxInt)
14501 p2 := v_1.Args[0]
14502 if !(t1.IsBoolean() && isSamePtr(p1, p2) && n >= o+1) {
14503 break
14504 }
14505 v.reset(OpConstBool)
14506 v.AuxInt = boolToAuxInt(false)
14507 return true
14508 }
14509
14510
14511
14512 for {
14513 t1 := v.Type
14514 if v_0.Op != OpOffPtr {
14515 break
14516 }
14517 o := auxIntToInt64(v_0.AuxInt)
14518 p1 := v_0.Args[0]
14519 if v_1.Op != OpZero {
14520 break
14521 }
14522 n := auxIntToInt64(v_1.AuxInt)
14523 p2 := v_1.Args[0]
14524 if !(is8BitInt(t1) && isSamePtr(p1, p2) && n >= o+1) {
14525 break
14526 }
14527 v.reset(OpConst8)
14528 v.AuxInt = int8ToAuxInt(0)
14529 return true
14530 }
14531
14532
14533
14534 for {
14535 t1 := v.Type
14536 if v_0.Op != OpOffPtr {
14537 break
14538 }
14539 o := auxIntToInt64(v_0.AuxInt)
14540 p1 := v_0.Args[0]
14541 if v_1.Op != OpZero {
14542 break
14543 }
14544 n := auxIntToInt64(v_1.AuxInt)
14545 p2 := v_1.Args[0]
14546 if !(is16BitInt(t1) && isSamePtr(p1, p2) && n >= o+2) {
14547 break
14548 }
14549 v.reset(OpConst16)
14550 v.AuxInt = int16ToAuxInt(0)
14551 return true
14552 }
14553
14554
14555
14556 for {
14557 t1 := v.Type
14558 if v_0.Op != OpOffPtr {
14559 break
14560 }
14561 o := auxIntToInt64(v_0.AuxInt)
14562 p1 := v_0.Args[0]
14563 if v_1.Op != OpZero {
14564 break
14565 }
14566 n := auxIntToInt64(v_1.AuxInt)
14567 p2 := v_1.Args[0]
14568 if !(is32BitInt(t1) && isSamePtr(p1, p2) && n >= o+4) {
14569 break
14570 }
14571 v.reset(OpConst32)
14572 v.AuxInt = int32ToAuxInt(0)
14573 return true
14574 }
14575
14576
14577
14578 for {
14579 t1 := v.Type
14580 if v_0.Op != OpOffPtr {
14581 break
14582 }
14583 o := auxIntToInt64(v_0.AuxInt)
14584 p1 := v_0.Args[0]
14585 if v_1.Op != OpZero {
14586 break
14587 }
14588 n := auxIntToInt64(v_1.AuxInt)
14589 p2 := v_1.Args[0]
14590 if !(is64BitInt(t1) && isSamePtr(p1, p2) && n >= o+8) {
14591 break
14592 }
14593 v.reset(OpConst64)
14594 v.AuxInt = int64ToAuxInt(0)
14595 return true
14596 }
14597
14598
14599
14600 for {
14601 t1 := v.Type
14602 if v_0.Op != OpOffPtr {
14603 break
14604 }
14605 o := auxIntToInt64(v_0.AuxInt)
14606 p1 := v_0.Args[0]
14607 if v_1.Op != OpZero {
14608 break
14609 }
14610 n := auxIntToInt64(v_1.AuxInt)
14611 p2 := v_1.Args[0]
14612 if !(is32BitFloat(t1) && isSamePtr(p1, p2) && n >= o+4) {
14613 break
14614 }
14615 v.reset(OpConst32F)
14616 v.AuxInt = float32ToAuxInt(0)
14617 return true
14618 }
14619
14620
14621
14622 for {
14623 t1 := v.Type
14624 if v_0.Op != OpOffPtr {
14625 break
14626 }
14627 o := auxIntToInt64(v_0.AuxInt)
14628 p1 := v_0.Args[0]
14629 if v_1.Op != OpZero {
14630 break
14631 }
14632 n := auxIntToInt64(v_1.AuxInt)
14633 p2 := v_1.Args[0]
14634 if !(is64BitFloat(t1) && isSamePtr(p1, p2) && n >= o+8) {
14635 break
14636 }
14637 v.reset(OpConst64F)
14638 v.AuxInt = float64ToAuxInt(0)
14639 return true
14640 }
14641
14642
14643
14644 for {
14645 t := v.Type
14646 if !(t.IsStruct() && CanSSA(t)) {
14647 break
14648 }
14649 v.copyOf(rewriteStructLoad(v))
14650 return true
14651 }
14652
14653
14654
14655 for {
14656 t := v.Type
14657 if !(t.IsArray() && t.NumElem() == 0) {
14658 break
14659 }
14660 v.reset(OpArrayMake0)
14661 return true
14662 }
14663
14664
14665
14666 for {
14667 t := v.Type
14668 ptr := v_0
14669 mem := v_1
14670 if !(t.IsArray() && t.NumElem() == 1 && CanSSA(t)) {
14671 break
14672 }
14673 v.reset(OpArrayMake1)
14674 v0 := b.NewValue0(v.Pos, OpLoad, t.Elem())
14675 v0.AddArg2(ptr, mem)
14676 v.AddArg(v0)
14677 return true
14678 }
14679
14680
14681
14682 for {
14683 if v.Type != typ.BytePtr || v_0.Op != OpOffPtr {
14684 break
14685 }
14686 off := auxIntToInt64(v_0.AuxInt)
14687 v_0_0 := v_0.Args[0]
14688 if v_0_0.Op != OpAddr {
14689 break
14690 }
14691 s := auxToSym(v_0_0.Aux)
14692 sb := v_0_0.Args[0]
14693 if !(isFixedSym(s, off)) {
14694 break
14695 }
14696 v.reset(OpAddr)
14697 v.Aux = symToAux(fixedSym(b.Func, s, off))
14698 v.AddArg(sb)
14699 return true
14700 }
14701
14702
14703
14704 for {
14705 if v.Type != typ.BytePtr || v_0.Op != OpOffPtr {
14706 break
14707 }
14708 off := auxIntToInt64(v_0.AuxInt)
14709 v_0_0 := v_0.Args[0]
14710 if v_0_0.Op != OpConvert {
14711 break
14712 }
14713 v_0_0_0 := v_0_0.Args[0]
14714 if v_0_0_0.Op != OpAddr {
14715 break
14716 }
14717 s := auxToSym(v_0_0_0.Aux)
14718 sb := v_0_0_0.Args[0]
14719 if !(isFixedSym(s, off)) {
14720 break
14721 }
14722 v.reset(OpAddr)
14723 v.Aux = symToAux(fixedSym(b.Func, s, off))
14724 v.AddArg(sb)
14725 return true
14726 }
14727
14728
14729
14730 for {
14731 if v.Type != typ.BytePtr || v_0.Op != OpOffPtr {
14732 break
14733 }
14734 off := auxIntToInt64(v_0.AuxInt)
14735 v_0_0 := v_0.Args[0]
14736 if v_0_0.Op != OpITab {
14737 break
14738 }
14739 v_0_0_0 := v_0_0.Args[0]
14740 if v_0_0_0.Op != OpIMake {
14741 break
14742 }
14743 v_0_0_0_0 := v_0_0_0.Args[0]
14744 if v_0_0_0_0.Op != OpAddr {
14745 break
14746 }
14747 s := auxToSym(v_0_0_0_0.Aux)
14748 sb := v_0_0_0_0.Args[0]
14749 if !(isFixedSym(s, off)) {
14750 break
14751 }
14752 v.reset(OpAddr)
14753 v.Aux = symToAux(fixedSym(b.Func, s, off))
14754 v.AddArg(sb)
14755 return true
14756 }
14757
14758
14759
14760 for {
14761 if v.Type != typ.BytePtr || v_0.Op != OpOffPtr {
14762 break
14763 }
14764 off := auxIntToInt64(v_0.AuxInt)
14765 v_0_0 := v_0.Args[0]
14766 if v_0_0.Op != OpITab {
14767 break
14768 }
14769 v_0_0_0 := v_0_0.Args[0]
14770 if v_0_0_0.Op != OpIMake {
14771 break
14772 }
14773 v_0_0_0_0 := v_0_0_0.Args[0]
14774 if v_0_0_0_0.Op != OpConvert {
14775 break
14776 }
14777 v_0_0_0_0_0 := v_0_0_0_0.Args[0]
14778 if v_0_0_0_0_0.Op != OpAddr {
14779 break
14780 }
14781 s := auxToSym(v_0_0_0_0_0.Aux)
14782 sb := v_0_0_0_0_0.Args[0]
14783 if !(isFixedSym(s, off)) {
14784 break
14785 }
14786 v.reset(OpAddr)
14787 v.Aux = symToAux(fixedSym(b.Func, s, off))
14788 v.AddArg(sb)
14789 return true
14790 }
14791
14792
14793
14794 for {
14795 if v.Type != typ.Uintptr || v_0.Op != OpOffPtr {
14796 break
14797 }
14798 off := auxIntToInt64(v_0.AuxInt)
14799 v_0_0 := v_0.Args[0]
14800 if v_0_0.Op != OpAddr {
14801 break
14802 }
14803 s := auxToSym(v_0_0.Aux)
14804 sb := v_0_0.Args[0]
14805 if !(isFixedSym(s, off)) {
14806 break
14807 }
14808 v.reset(OpAddr)
14809 v.Aux = symToAux(fixedSym(b.Func, s, off))
14810 v.AddArg(sb)
14811 return true
14812 }
14813
14814
14815
14816 for {
14817 if v.Type != typ.Uintptr || v_0.Op != OpOffPtr {
14818 break
14819 }
14820 off := auxIntToInt64(v_0.AuxInt)
14821 v_0_0 := v_0.Args[0]
14822 if v_0_0.Op != OpConvert {
14823 break
14824 }
14825 v_0_0_0 := v_0_0.Args[0]
14826 if v_0_0_0.Op != OpAddr {
14827 break
14828 }
14829 s := auxToSym(v_0_0_0.Aux)
14830 sb := v_0_0_0.Args[0]
14831 if !(isFixedSym(s, off)) {
14832 break
14833 }
14834 v.reset(OpAddr)
14835 v.Aux = symToAux(fixedSym(b.Func, s, off))
14836 v.AddArg(sb)
14837 return true
14838 }
14839
14840
14841
14842 for {
14843 if v.Type != typ.Uintptr || v_0.Op != OpOffPtr {
14844 break
14845 }
14846 off := auxIntToInt64(v_0.AuxInt)
14847 v_0_0 := v_0.Args[0]
14848 if v_0_0.Op != OpITab {
14849 break
14850 }
14851 v_0_0_0 := v_0_0.Args[0]
14852 if v_0_0_0.Op != OpIMake {
14853 break
14854 }
14855 v_0_0_0_0 := v_0_0_0.Args[0]
14856 if v_0_0_0_0.Op != OpAddr {
14857 break
14858 }
14859 s := auxToSym(v_0_0_0_0.Aux)
14860 sb := v_0_0_0_0.Args[0]
14861 if !(isFixedSym(s, off)) {
14862 break
14863 }
14864 v.reset(OpAddr)
14865 v.Aux = symToAux(fixedSym(b.Func, s, off))
14866 v.AddArg(sb)
14867 return true
14868 }
14869
14870
14871
14872 for {
14873 if v.Type != typ.Uintptr || v_0.Op != OpOffPtr {
14874 break
14875 }
14876 off := auxIntToInt64(v_0.AuxInt)
14877 v_0_0 := v_0.Args[0]
14878 if v_0_0.Op != OpITab {
14879 break
14880 }
14881 v_0_0_0 := v_0_0.Args[0]
14882 if v_0_0_0.Op != OpIMake {
14883 break
14884 }
14885 v_0_0_0_0 := v_0_0_0.Args[0]
14886 if v_0_0_0_0.Op != OpConvert {
14887 break
14888 }
14889 v_0_0_0_0_0 := v_0_0_0_0.Args[0]
14890 if v_0_0_0_0_0.Op != OpAddr {
14891 break
14892 }
14893 s := auxToSym(v_0_0_0_0_0.Aux)
14894 sb := v_0_0_0_0_0.Args[0]
14895 if !(isFixedSym(s, off)) {
14896 break
14897 }
14898 v.reset(OpAddr)
14899 v.Aux = symToAux(fixedSym(b.Func, s, off))
14900 v.AddArg(sb)
14901 return true
14902 }
14903
14904
14905
14906 for {
14907 t := v.Type
14908 if v_0.Op != OpOffPtr {
14909 break
14910 }
14911 off := auxIntToInt64(v_0.AuxInt)
14912 v_0_0 := v_0.Args[0]
14913 if v_0_0.Op != OpAddr {
14914 break
14915 }
14916 sym := auxToSym(v_0_0.Aux)
14917 if !(t.IsInteger() && t.Size() == 4 && isFixed32(config, sym, off)) {
14918 break
14919 }
14920 v.reset(OpConst32)
14921 v.AuxInt = int32ToAuxInt(fixed32(config, sym, off))
14922 return true
14923 }
14924
14925
14926
14927 for {
14928 t := v.Type
14929 if v_0.Op != OpOffPtr {
14930 break
14931 }
14932 off := auxIntToInt64(v_0.AuxInt)
14933 v_0_0 := v_0.Args[0]
14934 if v_0_0.Op != OpConvert {
14935 break
14936 }
14937 v_0_0_0 := v_0_0.Args[0]
14938 if v_0_0_0.Op != OpAddr {
14939 break
14940 }
14941 sym := auxToSym(v_0_0_0.Aux)
14942 if !(t.IsInteger() && t.Size() == 4 && isFixed32(config, sym, off)) {
14943 break
14944 }
14945 v.reset(OpConst32)
14946 v.AuxInt = int32ToAuxInt(fixed32(config, sym, off))
14947 return true
14948 }
14949
14950
14951
14952 for {
14953 t := v.Type
14954 if v_0.Op != OpOffPtr {
14955 break
14956 }
14957 off := auxIntToInt64(v_0.AuxInt)
14958 v_0_0 := v_0.Args[0]
14959 if v_0_0.Op != OpITab {
14960 break
14961 }
14962 v_0_0_0 := v_0_0.Args[0]
14963 if v_0_0_0.Op != OpIMake {
14964 break
14965 }
14966 v_0_0_0_0 := v_0_0_0.Args[0]
14967 if v_0_0_0_0.Op != OpAddr {
14968 break
14969 }
14970 sym := auxToSym(v_0_0_0_0.Aux)
14971 if !(t.IsInteger() && t.Size() == 4 && isFixed32(config, sym, off)) {
14972 break
14973 }
14974 v.reset(OpConst32)
14975 v.AuxInt = int32ToAuxInt(fixed32(config, sym, off))
14976 return true
14977 }
14978
14979
14980
14981 for {
14982 t := v.Type
14983 if v_0.Op != OpOffPtr {
14984 break
14985 }
14986 off := auxIntToInt64(v_0.AuxInt)
14987 v_0_0 := v_0.Args[0]
14988 if v_0_0.Op != OpITab {
14989 break
14990 }
14991 v_0_0_0 := v_0_0.Args[0]
14992 if v_0_0_0.Op != OpIMake {
14993 break
14994 }
14995 v_0_0_0_0 := v_0_0_0.Args[0]
14996 if v_0_0_0_0.Op != OpConvert {
14997 break
14998 }
14999 v_0_0_0_0_0 := v_0_0_0_0.Args[0]
15000 if v_0_0_0_0_0.Op != OpAddr {
15001 break
15002 }
15003 sym := auxToSym(v_0_0_0_0_0.Aux)
15004 if !(t.IsInteger() && t.Size() == 4 && isFixed32(config, sym, off)) {
15005 break
15006 }
15007 v.reset(OpConst32)
15008 v.AuxInt = int32ToAuxInt(fixed32(config, sym, off))
15009 return true
15010 }
15011 return false
15012 }
15013 func rewriteValuegeneric_OpLsh16x16(v *Value) bool {
15014 v_1 := v.Args[1]
15015 v_0 := v.Args[0]
15016 b := v.Block
15017
15018
15019 for {
15020 t := v.Type
15021 x := v_0
15022 if v_1.Op != OpConst16 {
15023 break
15024 }
15025 c := auxIntToInt16(v_1.AuxInt)
15026 v.reset(OpLsh16x64)
15027 v0 := b.NewValue0(v.Pos, OpConst64, t)
15028 v0.AuxInt = int64ToAuxInt(int64(uint16(c)))
15029 v.AddArg2(x, v0)
15030 return true
15031 }
15032
15033
15034 for {
15035 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 {
15036 break
15037 }
15038 v.reset(OpConst16)
15039 v.AuxInt = int16ToAuxInt(0)
15040 return true
15041 }
15042 return false
15043 }
15044 func rewriteValuegeneric_OpLsh16x32(v *Value) bool {
15045 v_1 := v.Args[1]
15046 v_0 := v.Args[0]
15047 b := v.Block
15048
15049
15050 for {
15051 t := v.Type
15052 x := v_0
15053 if v_1.Op != OpConst32 {
15054 break
15055 }
15056 c := auxIntToInt32(v_1.AuxInt)
15057 v.reset(OpLsh16x64)
15058 v0 := b.NewValue0(v.Pos, OpConst64, t)
15059 v0.AuxInt = int64ToAuxInt(int64(uint32(c)))
15060 v.AddArg2(x, v0)
15061 return true
15062 }
15063
15064
15065 for {
15066 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 {
15067 break
15068 }
15069 v.reset(OpConst16)
15070 v.AuxInt = int16ToAuxInt(0)
15071 return true
15072 }
15073 return false
15074 }
15075 func rewriteValuegeneric_OpLsh16x64(v *Value) bool {
15076 v_1 := v.Args[1]
15077 v_0 := v.Args[0]
15078 b := v.Block
15079 typ := &b.Func.Config.Types
15080
15081
15082 for {
15083 if v_0.Op != OpConst16 {
15084 break
15085 }
15086 c := auxIntToInt16(v_0.AuxInt)
15087 if v_1.Op != OpConst64 {
15088 break
15089 }
15090 d := auxIntToInt64(v_1.AuxInt)
15091 v.reset(OpConst16)
15092 v.AuxInt = int16ToAuxInt(c << uint64(d))
15093 return true
15094 }
15095
15096
15097 for {
15098 x := v_0
15099 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 0 {
15100 break
15101 }
15102 v.copyOf(x)
15103 return true
15104 }
15105
15106
15107 for {
15108 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 {
15109 break
15110 }
15111 v.reset(OpConst16)
15112 v.AuxInt = int16ToAuxInt(0)
15113 return true
15114 }
15115
15116
15117
15118 for {
15119 if v_1.Op != OpConst64 {
15120 break
15121 }
15122 c := auxIntToInt64(v_1.AuxInt)
15123 if !(uint64(c) >= 16) {
15124 break
15125 }
15126 v.reset(OpConst16)
15127 v.AuxInt = int16ToAuxInt(0)
15128 return true
15129 }
15130
15131
15132
15133 for {
15134 t := v.Type
15135 if v_0.Op != OpLsh16x64 {
15136 break
15137 }
15138 _ = v_0.Args[1]
15139 x := v_0.Args[0]
15140 v_0_1 := v_0.Args[1]
15141 if v_0_1.Op != OpConst64 {
15142 break
15143 }
15144 c := auxIntToInt64(v_0_1.AuxInt)
15145 if v_1.Op != OpConst64 {
15146 break
15147 }
15148 d := auxIntToInt64(v_1.AuxInt)
15149 if !(!uaddOvf(c, d)) {
15150 break
15151 }
15152 v.reset(OpLsh16x64)
15153 v0 := b.NewValue0(v.Pos, OpConst64, t)
15154 v0.AuxInt = int64ToAuxInt(c + d)
15155 v.AddArg2(x, v0)
15156 return true
15157 }
15158
15159
15160
15161 for {
15162 i := v_0
15163 if i.Op != OpRsh16x64 {
15164 break
15165 }
15166 _ = i.Args[1]
15167 x := i.Args[0]
15168 i_1 := i.Args[1]
15169 if i_1.Op != OpConst64 {
15170 break
15171 }
15172 c := auxIntToInt64(i_1.AuxInt)
15173 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != c || !(c >= 0 && c < 16 && i.Uses == 1) {
15174 break
15175 }
15176 v.reset(OpAnd16)
15177 v0 := b.NewValue0(v.Pos, OpConst16, v.Type)
15178 v0.AuxInt = int16ToAuxInt(int16(-1) << c)
15179 v.AddArg2(x, v0)
15180 return true
15181 }
15182
15183
15184
15185 for {
15186 i := v_0
15187 if i.Op != OpRsh16Ux64 {
15188 break
15189 }
15190 _ = i.Args[1]
15191 x := i.Args[0]
15192 i_1 := i.Args[1]
15193 if i_1.Op != OpConst64 {
15194 break
15195 }
15196 c := auxIntToInt64(i_1.AuxInt)
15197 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != c || !(c >= 0 && c < 16 && i.Uses == 1) {
15198 break
15199 }
15200 v.reset(OpAnd16)
15201 v0 := b.NewValue0(v.Pos, OpConst16, v.Type)
15202 v0.AuxInt = int16ToAuxInt(int16(-1) << c)
15203 v.AddArg2(x, v0)
15204 return true
15205 }
15206
15207
15208
15209 for {
15210 if v_0.Op != OpRsh16Ux64 {
15211 break
15212 }
15213 _ = v_0.Args[1]
15214 v_0_0 := v_0.Args[0]
15215 if v_0_0.Op != OpLsh16x64 {
15216 break
15217 }
15218 _ = v_0_0.Args[1]
15219 x := v_0_0.Args[0]
15220 v_0_0_1 := v_0_0.Args[1]
15221 if v_0_0_1.Op != OpConst64 {
15222 break
15223 }
15224 c1 := auxIntToInt64(v_0_0_1.AuxInt)
15225 v_0_1 := v_0.Args[1]
15226 if v_0_1.Op != OpConst64 {
15227 break
15228 }
15229 c2 := auxIntToInt64(v_0_1.AuxInt)
15230 if v_1.Op != OpConst64 {
15231 break
15232 }
15233 c3 := auxIntToInt64(v_1.AuxInt)
15234 if !(uint64(c1) >= uint64(c2) && uint64(c3) >= uint64(c2) && !uaddOvf(c1-c2, c3)) {
15235 break
15236 }
15237 v.reset(OpLsh16x64)
15238 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
15239 v0.AuxInt = int64ToAuxInt(c1 - c2 + c3)
15240 v.AddArg2(x, v0)
15241 return true
15242 }
15243
15244
15245
15246 for {
15247 if v_0.Op != OpAnd16 {
15248 break
15249 }
15250 _ = v_0.Args[1]
15251 v_0_0 := v_0.Args[0]
15252 v_0_1 := v_0.Args[1]
15253 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
15254 if v_0_0.Op != OpRsh16x64 {
15255 continue
15256 }
15257 t := v_0_0.Type
15258 _ = v_0_0.Args[1]
15259 x := v_0_0.Args[0]
15260 v_0_0_1 := v_0_0.Args[1]
15261 if v_0_0_1.Op != OpConst64 {
15262 continue
15263 }
15264 t2 := v_0_0_1.Type
15265 c := auxIntToInt64(v_0_0_1.AuxInt)
15266 if v_0_1.Op != OpConst16 {
15267 continue
15268 }
15269 d := auxIntToInt16(v_0_1.AuxInt)
15270 if v_1.Op != OpConst64 {
15271 continue
15272 }
15273 e := auxIntToInt64(v_1.AuxInt)
15274 if !(c >= e) {
15275 continue
15276 }
15277 v.reset(OpAnd16)
15278 v0 := b.NewValue0(v.Pos, OpRsh16x64, t)
15279 v1 := b.NewValue0(v.Pos, OpConst64, t2)
15280 v1.AuxInt = int64ToAuxInt(c - e)
15281 v0.AddArg2(x, v1)
15282 v2 := b.NewValue0(v.Pos, OpConst16, t)
15283 v2.AuxInt = int16ToAuxInt(d << e)
15284 v.AddArg2(v0, v2)
15285 return true
15286 }
15287 break
15288 }
15289
15290
15291
15292 for {
15293 if v_0.Op != OpAnd16 {
15294 break
15295 }
15296 _ = v_0.Args[1]
15297 v_0_0 := v_0.Args[0]
15298 v_0_1 := v_0.Args[1]
15299 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
15300 if v_0_0.Op != OpRsh16Ux64 {
15301 continue
15302 }
15303 t := v_0_0.Type
15304 _ = v_0_0.Args[1]
15305 x := v_0_0.Args[0]
15306 v_0_0_1 := v_0_0.Args[1]
15307 if v_0_0_1.Op != OpConst64 {
15308 continue
15309 }
15310 t2 := v_0_0_1.Type
15311 c := auxIntToInt64(v_0_0_1.AuxInt)
15312 if v_0_1.Op != OpConst16 {
15313 continue
15314 }
15315 d := auxIntToInt16(v_0_1.AuxInt)
15316 if v_1.Op != OpConst64 {
15317 continue
15318 }
15319 e := auxIntToInt64(v_1.AuxInt)
15320 if !(c >= e) {
15321 continue
15322 }
15323 v.reset(OpAnd16)
15324 v0 := b.NewValue0(v.Pos, OpRsh16Ux64, t)
15325 v1 := b.NewValue0(v.Pos, OpConst64, t2)
15326 v1.AuxInt = int64ToAuxInt(c - e)
15327 v0.AddArg2(x, v1)
15328 v2 := b.NewValue0(v.Pos, OpConst16, t)
15329 v2.AuxInt = int16ToAuxInt(d << e)
15330 v.AddArg2(v0, v2)
15331 return true
15332 }
15333 break
15334 }
15335
15336
15337
15338 for {
15339 if v_0.Op != OpAnd16 {
15340 break
15341 }
15342 _ = v_0.Args[1]
15343 v_0_0 := v_0.Args[0]
15344 v_0_1 := v_0.Args[1]
15345 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
15346 if v_0_0.Op != OpRsh16x64 {
15347 continue
15348 }
15349 t := v_0_0.Type
15350 _ = v_0_0.Args[1]
15351 x := v_0_0.Args[0]
15352 v_0_0_1 := v_0_0.Args[1]
15353 if v_0_0_1.Op != OpConst64 {
15354 continue
15355 }
15356 t2 := v_0_0_1.Type
15357 c := auxIntToInt64(v_0_0_1.AuxInt)
15358 if v_0_1.Op != OpConst16 {
15359 continue
15360 }
15361 d := auxIntToInt16(v_0_1.AuxInt)
15362 if v_1.Op != OpConst64 {
15363 continue
15364 }
15365 e := auxIntToInt64(v_1.AuxInt)
15366 if !(c < e) {
15367 continue
15368 }
15369 v.reset(OpAnd16)
15370 v0 := b.NewValue0(v.Pos, OpLsh16x64, t)
15371 v1 := b.NewValue0(v.Pos, OpConst64, t2)
15372 v1.AuxInt = int64ToAuxInt(e - c)
15373 v0.AddArg2(x, v1)
15374 v2 := b.NewValue0(v.Pos, OpConst16, t)
15375 v2.AuxInt = int16ToAuxInt(d << e)
15376 v.AddArg2(v0, v2)
15377 return true
15378 }
15379 break
15380 }
15381
15382
15383
15384 for {
15385 if v_0.Op != OpAnd16 {
15386 break
15387 }
15388 _ = v_0.Args[1]
15389 v_0_0 := v_0.Args[0]
15390 v_0_1 := v_0.Args[1]
15391 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
15392 if v_0_0.Op != OpRsh16Ux64 {
15393 continue
15394 }
15395 t := v_0_0.Type
15396 _ = v_0_0.Args[1]
15397 x := v_0_0.Args[0]
15398 v_0_0_1 := v_0_0.Args[1]
15399 if v_0_0_1.Op != OpConst64 {
15400 continue
15401 }
15402 t2 := v_0_0_1.Type
15403 c := auxIntToInt64(v_0_0_1.AuxInt)
15404 if v_0_1.Op != OpConst16 {
15405 continue
15406 }
15407 d := auxIntToInt16(v_0_1.AuxInt)
15408 if v_1.Op != OpConst64 {
15409 continue
15410 }
15411 e := auxIntToInt64(v_1.AuxInt)
15412 if !(c < e) {
15413 continue
15414 }
15415 v.reset(OpAnd16)
15416 v0 := b.NewValue0(v.Pos, OpLsh16x64, t)
15417 v1 := b.NewValue0(v.Pos, OpConst64, t2)
15418 v1.AuxInt = int64ToAuxInt(e - c)
15419 v0.AddArg2(x, v1)
15420 v2 := b.NewValue0(v.Pos, OpConst16, t)
15421 v2.AuxInt = int16ToAuxInt(d << e)
15422 v.AddArg2(v0, v2)
15423 return true
15424 }
15425 break
15426 }
15427 return false
15428 }
15429 func rewriteValuegeneric_OpLsh16x8(v *Value) bool {
15430 v_1 := v.Args[1]
15431 v_0 := v.Args[0]
15432 b := v.Block
15433
15434
15435 for {
15436 t := v.Type
15437 x := v_0
15438 if v_1.Op != OpConst8 {
15439 break
15440 }
15441 c := auxIntToInt8(v_1.AuxInt)
15442 v.reset(OpLsh16x64)
15443 v0 := b.NewValue0(v.Pos, OpConst64, t)
15444 v0.AuxInt = int64ToAuxInt(int64(uint8(c)))
15445 v.AddArg2(x, v0)
15446 return true
15447 }
15448
15449
15450 for {
15451 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 {
15452 break
15453 }
15454 v.reset(OpConst16)
15455 v.AuxInt = int16ToAuxInt(0)
15456 return true
15457 }
15458 return false
15459 }
15460 func rewriteValuegeneric_OpLsh32x16(v *Value) bool {
15461 v_1 := v.Args[1]
15462 v_0 := v.Args[0]
15463 b := v.Block
15464
15465
15466 for {
15467 t := v.Type
15468 x := v_0
15469 if v_1.Op != OpConst16 {
15470 break
15471 }
15472 c := auxIntToInt16(v_1.AuxInt)
15473 v.reset(OpLsh32x64)
15474 v0 := b.NewValue0(v.Pos, OpConst64, t)
15475 v0.AuxInt = int64ToAuxInt(int64(uint16(c)))
15476 v.AddArg2(x, v0)
15477 return true
15478 }
15479
15480
15481 for {
15482 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
15483 break
15484 }
15485 v.reset(OpConst32)
15486 v.AuxInt = int32ToAuxInt(0)
15487 return true
15488 }
15489 return false
15490 }
15491 func rewriteValuegeneric_OpLsh32x32(v *Value) bool {
15492 v_1 := v.Args[1]
15493 v_0 := v.Args[0]
15494 b := v.Block
15495
15496
15497 for {
15498 t := v.Type
15499 x := v_0
15500 if v_1.Op != OpConst32 {
15501 break
15502 }
15503 c := auxIntToInt32(v_1.AuxInt)
15504 v.reset(OpLsh32x64)
15505 v0 := b.NewValue0(v.Pos, OpConst64, t)
15506 v0.AuxInt = int64ToAuxInt(int64(uint32(c)))
15507 v.AddArg2(x, v0)
15508 return true
15509 }
15510
15511
15512 for {
15513 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
15514 break
15515 }
15516 v.reset(OpConst32)
15517 v.AuxInt = int32ToAuxInt(0)
15518 return true
15519 }
15520 return false
15521 }
15522 func rewriteValuegeneric_OpLsh32x64(v *Value) bool {
15523 v_1 := v.Args[1]
15524 v_0 := v.Args[0]
15525 b := v.Block
15526 typ := &b.Func.Config.Types
15527
15528
15529 for {
15530 if v_0.Op != OpConst32 {
15531 break
15532 }
15533 c := auxIntToInt32(v_0.AuxInt)
15534 if v_1.Op != OpConst64 {
15535 break
15536 }
15537 d := auxIntToInt64(v_1.AuxInt)
15538 v.reset(OpConst32)
15539 v.AuxInt = int32ToAuxInt(c << uint64(d))
15540 return true
15541 }
15542
15543
15544 for {
15545 x := v_0
15546 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 0 {
15547 break
15548 }
15549 v.copyOf(x)
15550 return true
15551 }
15552
15553
15554 for {
15555 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
15556 break
15557 }
15558 v.reset(OpConst32)
15559 v.AuxInt = int32ToAuxInt(0)
15560 return true
15561 }
15562
15563
15564
15565 for {
15566 if v_1.Op != OpConst64 {
15567 break
15568 }
15569 c := auxIntToInt64(v_1.AuxInt)
15570 if !(uint64(c) >= 32) {
15571 break
15572 }
15573 v.reset(OpConst32)
15574 v.AuxInt = int32ToAuxInt(0)
15575 return true
15576 }
15577
15578
15579
15580 for {
15581 t := v.Type
15582 if v_0.Op != OpLsh32x64 {
15583 break
15584 }
15585 _ = v_0.Args[1]
15586 x := v_0.Args[0]
15587 v_0_1 := v_0.Args[1]
15588 if v_0_1.Op != OpConst64 {
15589 break
15590 }
15591 c := auxIntToInt64(v_0_1.AuxInt)
15592 if v_1.Op != OpConst64 {
15593 break
15594 }
15595 d := auxIntToInt64(v_1.AuxInt)
15596 if !(!uaddOvf(c, d)) {
15597 break
15598 }
15599 v.reset(OpLsh32x64)
15600 v0 := b.NewValue0(v.Pos, OpConst64, t)
15601 v0.AuxInt = int64ToAuxInt(c + d)
15602 v.AddArg2(x, v0)
15603 return true
15604 }
15605
15606
15607
15608 for {
15609 i := v_0
15610 if i.Op != OpRsh32x64 {
15611 break
15612 }
15613 _ = i.Args[1]
15614 x := i.Args[0]
15615 i_1 := i.Args[1]
15616 if i_1.Op != OpConst64 {
15617 break
15618 }
15619 c := auxIntToInt64(i_1.AuxInt)
15620 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != c || !(c >= 0 && c < 32 && i.Uses == 1) {
15621 break
15622 }
15623 v.reset(OpAnd32)
15624 v0 := b.NewValue0(v.Pos, OpConst32, v.Type)
15625 v0.AuxInt = int32ToAuxInt(int32(-1) << c)
15626 v.AddArg2(x, v0)
15627 return true
15628 }
15629
15630
15631
15632 for {
15633 i := v_0
15634 if i.Op != OpRsh32Ux64 {
15635 break
15636 }
15637 _ = i.Args[1]
15638 x := i.Args[0]
15639 i_1 := i.Args[1]
15640 if i_1.Op != OpConst64 {
15641 break
15642 }
15643 c := auxIntToInt64(i_1.AuxInt)
15644 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != c || !(c >= 0 && c < 32 && i.Uses == 1) {
15645 break
15646 }
15647 v.reset(OpAnd32)
15648 v0 := b.NewValue0(v.Pos, OpConst32, v.Type)
15649 v0.AuxInt = int32ToAuxInt(int32(-1) << c)
15650 v.AddArg2(x, v0)
15651 return true
15652 }
15653
15654
15655
15656 for {
15657 if v_0.Op != OpRsh32Ux64 {
15658 break
15659 }
15660 _ = v_0.Args[1]
15661 v_0_0 := v_0.Args[0]
15662 if v_0_0.Op != OpLsh32x64 {
15663 break
15664 }
15665 _ = v_0_0.Args[1]
15666 x := v_0_0.Args[0]
15667 v_0_0_1 := v_0_0.Args[1]
15668 if v_0_0_1.Op != OpConst64 {
15669 break
15670 }
15671 c1 := auxIntToInt64(v_0_0_1.AuxInt)
15672 v_0_1 := v_0.Args[1]
15673 if v_0_1.Op != OpConst64 {
15674 break
15675 }
15676 c2 := auxIntToInt64(v_0_1.AuxInt)
15677 if v_1.Op != OpConst64 {
15678 break
15679 }
15680 c3 := auxIntToInt64(v_1.AuxInt)
15681 if !(uint64(c1) >= uint64(c2) && uint64(c3) >= uint64(c2) && !uaddOvf(c1-c2, c3)) {
15682 break
15683 }
15684 v.reset(OpLsh32x64)
15685 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
15686 v0.AuxInt = int64ToAuxInt(c1 - c2 + c3)
15687 v.AddArg2(x, v0)
15688 return true
15689 }
15690
15691
15692
15693 for {
15694 if v_0.Op != OpAnd32 {
15695 break
15696 }
15697 _ = v_0.Args[1]
15698 v_0_0 := v_0.Args[0]
15699 v_0_1 := v_0.Args[1]
15700 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
15701 if v_0_0.Op != OpRsh32x64 {
15702 continue
15703 }
15704 t := v_0_0.Type
15705 _ = v_0_0.Args[1]
15706 x := v_0_0.Args[0]
15707 v_0_0_1 := v_0_0.Args[1]
15708 if v_0_0_1.Op != OpConst64 {
15709 continue
15710 }
15711 t2 := v_0_0_1.Type
15712 c := auxIntToInt64(v_0_0_1.AuxInt)
15713 if v_0_1.Op != OpConst32 {
15714 continue
15715 }
15716 d := auxIntToInt32(v_0_1.AuxInt)
15717 if v_1.Op != OpConst64 {
15718 continue
15719 }
15720 e := auxIntToInt64(v_1.AuxInt)
15721 if !(c >= e) {
15722 continue
15723 }
15724 v.reset(OpAnd32)
15725 v0 := b.NewValue0(v.Pos, OpRsh32x64, t)
15726 v1 := b.NewValue0(v.Pos, OpConst64, t2)
15727 v1.AuxInt = int64ToAuxInt(c - e)
15728 v0.AddArg2(x, v1)
15729 v2 := b.NewValue0(v.Pos, OpConst32, t)
15730 v2.AuxInt = int32ToAuxInt(d << e)
15731 v.AddArg2(v0, v2)
15732 return true
15733 }
15734 break
15735 }
15736
15737
15738
15739 for {
15740 if v_0.Op != OpAnd32 {
15741 break
15742 }
15743 _ = v_0.Args[1]
15744 v_0_0 := v_0.Args[0]
15745 v_0_1 := v_0.Args[1]
15746 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
15747 if v_0_0.Op != OpRsh32Ux64 {
15748 continue
15749 }
15750 t := v_0_0.Type
15751 _ = v_0_0.Args[1]
15752 x := v_0_0.Args[0]
15753 v_0_0_1 := v_0_0.Args[1]
15754 if v_0_0_1.Op != OpConst64 {
15755 continue
15756 }
15757 t2 := v_0_0_1.Type
15758 c := auxIntToInt64(v_0_0_1.AuxInt)
15759 if v_0_1.Op != OpConst32 {
15760 continue
15761 }
15762 d := auxIntToInt32(v_0_1.AuxInt)
15763 if v_1.Op != OpConst64 {
15764 continue
15765 }
15766 e := auxIntToInt64(v_1.AuxInt)
15767 if !(c >= e) {
15768 continue
15769 }
15770 v.reset(OpAnd32)
15771 v0 := b.NewValue0(v.Pos, OpRsh32Ux64, t)
15772 v1 := b.NewValue0(v.Pos, OpConst64, t2)
15773 v1.AuxInt = int64ToAuxInt(c - e)
15774 v0.AddArg2(x, v1)
15775 v2 := b.NewValue0(v.Pos, OpConst32, t)
15776 v2.AuxInt = int32ToAuxInt(d << e)
15777 v.AddArg2(v0, v2)
15778 return true
15779 }
15780 break
15781 }
15782
15783
15784
15785 for {
15786 if v_0.Op != OpAnd32 {
15787 break
15788 }
15789 _ = v_0.Args[1]
15790 v_0_0 := v_0.Args[0]
15791 v_0_1 := v_0.Args[1]
15792 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
15793 if v_0_0.Op != OpRsh32x64 {
15794 continue
15795 }
15796 t := v_0_0.Type
15797 _ = v_0_0.Args[1]
15798 x := v_0_0.Args[0]
15799 v_0_0_1 := v_0_0.Args[1]
15800 if v_0_0_1.Op != OpConst64 {
15801 continue
15802 }
15803 t2 := v_0_0_1.Type
15804 c := auxIntToInt64(v_0_0_1.AuxInt)
15805 if v_0_1.Op != OpConst32 {
15806 continue
15807 }
15808 d := auxIntToInt32(v_0_1.AuxInt)
15809 if v_1.Op != OpConst64 {
15810 continue
15811 }
15812 e := auxIntToInt64(v_1.AuxInt)
15813 if !(c < e) {
15814 continue
15815 }
15816 v.reset(OpAnd32)
15817 v0 := b.NewValue0(v.Pos, OpLsh32x64, t)
15818 v1 := b.NewValue0(v.Pos, OpConst64, t2)
15819 v1.AuxInt = int64ToAuxInt(e - c)
15820 v0.AddArg2(x, v1)
15821 v2 := b.NewValue0(v.Pos, OpConst32, t)
15822 v2.AuxInt = int32ToAuxInt(d << e)
15823 v.AddArg2(v0, v2)
15824 return true
15825 }
15826 break
15827 }
15828
15829
15830
15831 for {
15832 if v_0.Op != OpAnd32 {
15833 break
15834 }
15835 _ = v_0.Args[1]
15836 v_0_0 := v_0.Args[0]
15837 v_0_1 := v_0.Args[1]
15838 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
15839 if v_0_0.Op != OpRsh32Ux64 {
15840 continue
15841 }
15842 t := v_0_0.Type
15843 _ = v_0_0.Args[1]
15844 x := v_0_0.Args[0]
15845 v_0_0_1 := v_0_0.Args[1]
15846 if v_0_0_1.Op != OpConst64 {
15847 continue
15848 }
15849 t2 := v_0_0_1.Type
15850 c := auxIntToInt64(v_0_0_1.AuxInt)
15851 if v_0_1.Op != OpConst32 {
15852 continue
15853 }
15854 d := auxIntToInt32(v_0_1.AuxInt)
15855 if v_1.Op != OpConst64 {
15856 continue
15857 }
15858 e := auxIntToInt64(v_1.AuxInt)
15859 if !(c < e) {
15860 continue
15861 }
15862 v.reset(OpAnd32)
15863 v0 := b.NewValue0(v.Pos, OpLsh32x64, t)
15864 v1 := b.NewValue0(v.Pos, OpConst64, t2)
15865 v1.AuxInt = int64ToAuxInt(e - c)
15866 v0.AddArg2(x, v1)
15867 v2 := b.NewValue0(v.Pos, OpConst32, t)
15868 v2.AuxInt = int32ToAuxInt(d << e)
15869 v.AddArg2(v0, v2)
15870 return true
15871 }
15872 break
15873 }
15874 return false
15875 }
15876 func rewriteValuegeneric_OpLsh32x8(v *Value) bool {
15877 v_1 := v.Args[1]
15878 v_0 := v.Args[0]
15879 b := v.Block
15880
15881
15882 for {
15883 t := v.Type
15884 x := v_0
15885 if v_1.Op != OpConst8 {
15886 break
15887 }
15888 c := auxIntToInt8(v_1.AuxInt)
15889 v.reset(OpLsh32x64)
15890 v0 := b.NewValue0(v.Pos, OpConst64, t)
15891 v0.AuxInt = int64ToAuxInt(int64(uint8(c)))
15892 v.AddArg2(x, v0)
15893 return true
15894 }
15895
15896
15897 for {
15898 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
15899 break
15900 }
15901 v.reset(OpConst32)
15902 v.AuxInt = int32ToAuxInt(0)
15903 return true
15904 }
15905 return false
15906 }
15907 func rewriteValuegeneric_OpLsh64x16(v *Value) bool {
15908 v_1 := v.Args[1]
15909 v_0 := v.Args[0]
15910 b := v.Block
15911
15912
15913 for {
15914 t := v.Type
15915 x := v_0
15916 if v_1.Op != OpConst16 {
15917 break
15918 }
15919 c := auxIntToInt16(v_1.AuxInt)
15920 v.reset(OpLsh64x64)
15921 v0 := b.NewValue0(v.Pos, OpConst64, t)
15922 v0.AuxInt = int64ToAuxInt(int64(uint16(c)))
15923 v.AddArg2(x, v0)
15924 return true
15925 }
15926
15927
15928 for {
15929 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
15930 break
15931 }
15932 v.reset(OpConst64)
15933 v.AuxInt = int64ToAuxInt(0)
15934 return true
15935 }
15936 return false
15937 }
15938 func rewriteValuegeneric_OpLsh64x32(v *Value) bool {
15939 v_1 := v.Args[1]
15940 v_0 := v.Args[0]
15941 b := v.Block
15942
15943
15944 for {
15945 t := v.Type
15946 x := v_0
15947 if v_1.Op != OpConst32 {
15948 break
15949 }
15950 c := auxIntToInt32(v_1.AuxInt)
15951 v.reset(OpLsh64x64)
15952 v0 := b.NewValue0(v.Pos, OpConst64, t)
15953 v0.AuxInt = int64ToAuxInt(int64(uint32(c)))
15954 v.AddArg2(x, v0)
15955 return true
15956 }
15957
15958
15959 for {
15960 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
15961 break
15962 }
15963 v.reset(OpConst64)
15964 v.AuxInt = int64ToAuxInt(0)
15965 return true
15966 }
15967 return false
15968 }
15969 func rewriteValuegeneric_OpLsh64x64(v *Value) bool {
15970 v_1 := v.Args[1]
15971 v_0 := v.Args[0]
15972 b := v.Block
15973 typ := &b.Func.Config.Types
15974
15975
15976 for {
15977 if v_0.Op != OpConst64 {
15978 break
15979 }
15980 c := auxIntToInt64(v_0.AuxInt)
15981 if v_1.Op != OpConst64 {
15982 break
15983 }
15984 d := auxIntToInt64(v_1.AuxInt)
15985 v.reset(OpConst64)
15986 v.AuxInt = int64ToAuxInt(c << uint64(d))
15987 return true
15988 }
15989
15990
15991 for {
15992 x := v_0
15993 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 0 {
15994 break
15995 }
15996 v.copyOf(x)
15997 return true
15998 }
15999
16000
16001 for {
16002 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
16003 break
16004 }
16005 v.reset(OpConst64)
16006 v.AuxInt = int64ToAuxInt(0)
16007 return true
16008 }
16009
16010
16011
16012 for {
16013 if v_1.Op != OpConst64 {
16014 break
16015 }
16016 c := auxIntToInt64(v_1.AuxInt)
16017 if !(uint64(c) >= 64) {
16018 break
16019 }
16020 v.reset(OpConst64)
16021 v.AuxInt = int64ToAuxInt(0)
16022 return true
16023 }
16024
16025
16026
16027 for {
16028 t := v.Type
16029 if v_0.Op != OpLsh64x64 {
16030 break
16031 }
16032 _ = v_0.Args[1]
16033 x := v_0.Args[0]
16034 v_0_1 := v_0.Args[1]
16035 if v_0_1.Op != OpConst64 {
16036 break
16037 }
16038 c := auxIntToInt64(v_0_1.AuxInt)
16039 if v_1.Op != OpConst64 {
16040 break
16041 }
16042 d := auxIntToInt64(v_1.AuxInt)
16043 if !(!uaddOvf(c, d)) {
16044 break
16045 }
16046 v.reset(OpLsh64x64)
16047 v0 := b.NewValue0(v.Pos, OpConst64, t)
16048 v0.AuxInt = int64ToAuxInt(c + d)
16049 v.AddArg2(x, v0)
16050 return true
16051 }
16052
16053
16054
16055 for {
16056 i := v_0
16057 if i.Op != OpRsh64x64 {
16058 break
16059 }
16060 _ = i.Args[1]
16061 x := i.Args[0]
16062 i_1 := i.Args[1]
16063 if i_1.Op != OpConst64 {
16064 break
16065 }
16066 c := auxIntToInt64(i_1.AuxInt)
16067 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != c || !(c >= 0 && c < 64 && i.Uses == 1) {
16068 break
16069 }
16070 v.reset(OpAnd64)
16071 v0 := b.NewValue0(v.Pos, OpConst64, v.Type)
16072 v0.AuxInt = int64ToAuxInt(int64(-1) << c)
16073 v.AddArg2(x, v0)
16074 return true
16075 }
16076
16077
16078
16079 for {
16080 i := v_0
16081 if i.Op != OpRsh64Ux64 {
16082 break
16083 }
16084 _ = i.Args[1]
16085 x := i.Args[0]
16086 i_1 := i.Args[1]
16087 if i_1.Op != OpConst64 {
16088 break
16089 }
16090 c := auxIntToInt64(i_1.AuxInt)
16091 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != c || !(c >= 0 && c < 64 && i.Uses == 1) {
16092 break
16093 }
16094 v.reset(OpAnd64)
16095 v0 := b.NewValue0(v.Pos, OpConst64, v.Type)
16096 v0.AuxInt = int64ToAuxInt(int64(-1) << c)
16097 v.AddArg2(x, v0)
16098 return true
16099 }
16100
16101
16102
16103 for {
16104 if v_0.Op != OpRsh64Ux64 {
16105 break
16106 }
16107 _ = v_0.Args[1]
16108 v_0_0 := v_0.Args[0]
16109 if v_0_0.Op != OpLsh64x64 {
16110 break
16111 }
16112 _ = v_0_0.Args[1]
16113 x := v_0_0.Args[0]
16114 v_0_0_1 := v_0_0.Args[1]
16115 if v_0_0_1.Op != OpConst64 {
16116 break
16117 }
16118 c1 := auxIntToInt64(v_0_0_1.AuxInt)
16119 v_0_1 := v_0.Args[1]
16120 if v_0_1.Op != OpConst64 {
16121 break
16122 }
16123 c2 := auxIntToInt64(v_0_1.AuxInt)
16124 if v_1.Op != OpConst64 {
16125 break
16126 }
16127 c3 := auxIntToInt64(v_1.AuxInt)
16128 if !(uint64(c1) >= uint64(c2) && uint64(c3) >= uint64(c2) && !uaddOvf(c1-c2, c3)) {
16129 break
16130 }
16131 v.reset(OpLsh64x64)
16132 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
16133 v0.AuxInt = int64ToAuxInt(c1 - c2 + c3)
16134 v.AddArg2(x, v0)
16135 return true
16136 }
16137
16138
16139
16140 for {
16141 if v_0.Op != OpAnd64 {
16142 break
16143 }
16144 _ = v_0.Args[1]
16145 v_0_0 := v_0.Args[0]
16146 v_0_1 := v_0.Args[1]
16147 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
16148 if v_0_0.Op != OpRsh64x64 {
16149 continue
16150 }
16151 t := v_0_0.Type
16152 _ = v_0_0.Args[1]
16153 x := v_0_0.Args[0]
16154 v_0_0_1 := v_0_0.Args[1]
16155 if v_0_0_1.Op != OpConst64 {
16156 continue
16157 }
16158 t2 := v_0_0_1.Type
16159 c := auxIntToInt64(v_0_0_1.AuxInt)
16160 if v_0_1.Op != OpConst64 {
16161 continue
16162 }
16163 d := auxIntToInt64(v_0_1.AuxInt)
16164 if v_1.Op != OpConst64 {
16165 continue
16166 }
16167 e := auxIntToInt64(v_1.AuxInt)
16168 if !(c >= e) {
16169 continue
16170 }
16171 v.reset(OpAnd64)
16172 v0 := b.NewValue0(v.Pos, OpRsh64x64, t)
16173 v1 := b.NewValue0(v.Pos, OpConst64, t2)
16174 v1.AuxInt = int64ToAuxInt(c - e)
16175 v0.AddArg2(x, v1)
16176 v2 := b.NewValue0(v.Pos, OpConst64, t)
16177 v2.AuxInt = int64ToAuxInt(d << e)
16178 v.AddArg2(v0, v2)
16179 return true
16180 }
16181 break
16182 }
16183
16184
16185
16186 for {
16187 if v_0.Op != OpAnd64 {
16188 break
16189 }
16190 _ = v_0.Args[1]
16191 v_0_0 := v_0.Args[0]
16192 v_0_1 := v_0.Args[1]
16193 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
16194 if v_0_0.Op != OpRsh64Ux64 {
16195 continue
16196 }
16197 t := v_0_0.Type
16198 _ = v_0_0.Args[1]
16199 x := v_0_0.Args[0]
16200 v_0_0_1 := v_0_0.Args[1]
16201 if v_0_0_1.Op != OpConst64 {
16202 continue
16203 }
16204 t2 := v_0_0_1.Type
16205 c := auxIntToInt64(v_0_0_1.AuxInt)
16206 if v_0_1.Op != OpConst64 {
16207 continue
16208 }
16209 d := auxIntToInt64(v_0_1.AuxInt)
16210 if v_1.Op != OpConst64 {
16211 continue
16212 }
16213 e := auxIntToInt64(v_1.AuxInt)
16214 if !(c >= e) {
16215 continue
16216 }
16217 v.reset(OpAnd64)
16218 v0 := b.NewValue0(v.Pos, OpRsh64Ux64, t)
16219 v1 := b.NewValue0(v.Pos, OpConst64, t2)
16220 v1.AuxInt = int64ToAuxInt(c - e)
16221 v0.AddArg2(x, v1)
16222 v2 := b.NewValue0(v.Pos, OpConst64, t)
16223 v2.AuxInt = int64ToAuxInt(d << e)
16224 v.AddArg2(v0, v2)
16225 return true
16226 }
16227 break
16228 }
16229
16230
16231
16232 for {
16233 if v_0.Op != OpAnd64 {
16234 break
16235 }
16236 _ = v_0.Args[1]
16237 v_0_0 := v_0.Args[0]
16238 v_0_1 := v_0.Args[1]
16239 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
16240 if v_0_0.Op != OpRsh64x64 {
16241 continue
16242 }
16243 t := v_0_0.Type
16244 _ = v_0_0.Args[1]
16245 x := v_0_0.Args[0]
16246 v_0_0_1 := v_0_0.Args[1]
16247 if v_0_0_1.Op != OpConst64 {
16248 continue
16249 }
16250 t2 := v_0_0_1.Type
16251 c := auxIntToInt64(v_0_0_1.AuxInt)
16252 if v_0_1.Op != OpConst64 {
16253 continue
16254 }
16255 d := auxIntToInt64(v_0_1.AuxInt)
16256 if v_1.Op != OpConst64 {
16257 continue
16258 }
16259 e := auxIntToInt64(v_1.AuxInt)
16260 if !(c < e) {
16261 continue
16262 }
16263 v.reset(OpAnd64)
16264 v0 := b.NewValue0(v.Pos, OpLsh64x64, t)
16265 v1 := b.NewValue0(v.Pos, OpConst64, t2)
16266 v1.AuxInt = int64ToAuxInt(e - c)
16267 v0.AddArg2(x, v1)
16268 v2 := b.NewValue0(v.Pos, OpConst64, t)
16269 v2.AuxInt = int64ToAuxInt(d << e)
16270 v.AddArg2(v0, v2)
16271 return true
16272 }
16273 break
16274 }
16275
16276
16277
16278 for {
16279 if v_0.Op != OpAnd64 {
16280 break
16281 }
16282 _ = v_0.Args[1]
16283 v_0_0 := v_0.Args[0]
16284 v_0_1 := v_0.Args[1]
16285 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
16286 if v_0_0.Op != OpRsh64Ux64 {
16287 continue
16288 }
16289 t := v_0_0.Type
16290 _ = v_0_0.Args[1]
16291 x := v_0_0.Args[0]
16292 v_0_0_1 := v_0_0.Args[1]
16293 if v_0_0_1.Op != OpConst64 {
16294 continue
16295 }
16296 t2 := v_0_0_1.Type
16297 c := auxIntToInt64(v_0_0_1.AuxInt)
16298 if v_0_1.Op != OpConst64 {
16299 continue
16300 }
16301 d := auxIntToInt64(v_0_1.AuxInt)
16302 if v_1.Op != OpConst64 {
16303 continue
16304 }
16305 e := auxIntToInt64(v_1.AuxInt)
16306 if !(c < e) {
16307 continue
16308 }
16309 v.reset(OpAnd64)
16310 v0 := b.NewValue0(v.Pos, OpLsh64x64, t)
16311 v1 := b.NewValue0(v.Pos, OpConst64, t2)
16312 v1.AuxInt = int64ToAuxInt(e - c)
16313 v0.AddArg2(x, v1)
16314 v2 := b.NewValue0(v.Pos, OpConst64, t)
16315 v2.AuxInt = int64ToAuxInt(d << e)
16316 v.AddArg2(v0, v2)
16317 return true
16318 }
16319 break
16320 }
16321 return false
16322 }
16323 func rewriteValuegeneric_OpLsh64x8(v *Value) bool {
16324 v_1 := v.Args[1]
16325 v_0 := v.Args[0]
16326 b := v.Block
16327
16328
16329 for {
16330 t := v.Type
16331 x := v_0
16332 if v_1.Op != OpConst8 {
16333 break
16334 }
16335 c := auxIntToInt8(v_1.AuxInt)
16336 v.reset(OpLsh64x64)
16337 v0 := b.NewValue0(v.Pos, OpConst64, t)
16338 v0.AuxInt = int64ToAuxInt(int64(uint8(c)))
16339 v.AddArg2(x, v0)
16340 return true
16341 }
16342
16343
16344 for {
16345 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
16346 break
16347 }
16348 v.reset(OpConst64)
16349 v.AuxInt = int64ToAuxInt(0)
16350 return true
16351 }
16352 return false
16353 }
16354 func rewriteValuegeneric_OpLsh8x16(v *Value) bool {
16355 v_1 := v.Args[1]
16356 v_0 := v.Args[0]
16357 b := v.Block
16358
16359
16360 for {
16361 t := v.Type
16362 x := v_0
16363 if v_1.Op != OpConst16 {
16364 break
16365 }
16366 c := auxIntToInt16(v_1.AuxInt)
16367 v.reset(OpLsh8x64)
16368 v0 := b.NewValue0(v.Pos, OpConst64, t)
16369 v0.AuxInt = int64ToAuxInt(int64(uint16(c)))
16370 v.AddArg2(x, v0)
16371 return true
16372 }
16373
16374
16375 for {
16376 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 {
16377 break
16378 }
16379 v.reset(OpConst8)
16380 v.AuxInt = int8ToAuxInt(0)
16381 return true
16382 }
16383 return false
16384 }
16385 func rewriteValuegeneric_OpLsh8x32(v *Value) bool {
16386 v_1 := v.Args[1]
16387 v_0 := v.Args[0]
16388 b := v.Block
16389
16390
16391 for {
16392 t := v.Type
16393 x := v_0
16394 if v_1.Op != OpConst32 {
16395 break
16396 }
16397 c := auxIntToInt32(v_1.AuxInt)
16398 v.reset(OpLsh8x64)
16399 v0 := b.NewValue0(v.Pos, OpConst64, t)
16400 v0.AuxInt = int64ToAuxInt(int64(uint32(c)))
16401 v.AddArg2(x, v0)
16402 return true
16403 }
16404
16405
16406 for {
16407 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 {
16408 break
16409 }
16410 v.reset(OpConst8)
16411 v.AuxInt = int8ToAuxInt(0)
16412 return true
16413 }
16414 return false
16415 }
16416 func rewriteValuegeneric_OpLsh8x64(v *Value) bool {
16417 v_1 := v.Args[1]
16418 v_0 := v.Args[0]
16419 b := v.Block
16420 typ := &b.Func.Config.Types
16421
16422
16423 for {
16424 if v_0.Op != OpConst8 {
16425 break
16426 }
16427 c := auxIntToInt8(v_0.AuxInt)
16428 if v_1.Op != OpConst64 {
16429 break
16430 }
16431 d := auxIntToInt64(v_1.AuxInt)
16432 v.reset(OpConst8)
16433 v.AuxInt = int8ToAuxInt(c << uint64(d))
16434 return true
16435 }
16436
16437
16438 for {
16439 x := v_0
16440 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 0 {
16441 break
16442 }
16443 v.copyOf(x)
16444 return true
16445 }
16446
16447
16448 for {
16449 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 {
16450 break
16451 }
16452 v.reset(OpConst8)
16453 v.AuxInt = int8ToAuxInt(0)
16454 return true
16455 }
16456
16457
16458
16459 for {
16460 if v_1.Op != OpConst64 {
16461 break
16462 }
16463 c := auxIntToInt64(v_1.AuxInt)
16464 if !(uint64(c) >= 8) {
16465 break
16466 }
16467 v.reset(OpConst8)
16468 v.AuxInt = int8ToAuxInt(0)
16469 return true
16470 }
16471
16472
16473
16474 for {
16475 t := v.Type
16476 if v_0.Op != OpLsh8x64 {
16477 break
16478 }
16479 _ = v_0.Args[1]
16480 x := v_0.Args[0]
16481 v_0_1 := v_0.Args[1]
16482 if v_0_1.Op != OpConst64 {
16483 break
16484 }
16485 c := auxIntToInt64(v_0_1.AuxInt)
16486 if v_1.Op != OpConst64 {
16487 break
16488 }
16489 d := auxIntToInt64(v_1.AuxInt)
16490 if !(!uaddOvf(c, d)) {
16491 break
16492 }
16493 v.reset(OpLsh8x64)
16494 v0 := b.NewValue0(v.Pos, OpConst64, t)
16495 v0.AuxInt = int64ToAuxInt(c + d)
16496 v.AddArg2(x, v0)
16497 return true
16498 }
16499
16500
16501
16502 for {
16503 i := v_0
16504 if i.Op != OpRsh8x64 {
16505 break
16506 }
16507 _ = i.Args[1]
16508 x := i.Args[0]
16509 i_1 := i.Args[1]
16510 if i_1.Op != OpConst64 {
16511 break
16512 }
16513 c := auxIntToInt64(i_1.AuxInt)
16514 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != c || !(c >= 0 && c < 8 && i.Uses == 1) {
16515 break
16516 }
16517 v.reset(OpAnd8)
16518 v0 := b.NewValue0(v.Pos, OpConst8, v.Type)
16519 v0.AuxInt = int8ToAuxInt(int8(-1) << c)
16520 v.AddArg2(x, v0)
16521 return true
16522 }
16523
16524
16525
16526 for {
16527 i := v_0
16528 if i.Op != OpRsh8Ux64 {
16529 break
16530 }
16531 _ = i.Args[1]
16532 x := i.Args[0]
16533 i_1 := i.Args[1]
16534 if i_1.Op != OpConst64 {
16535 break
16536 }
16537 c := auxIntToInt64(i_1.AuxInt)
16538 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != c || !(c >= 0 && c < 8 && i.Uses == 1) {
16539 break
16540 }
16541 v.reset(OpAnd8)
16542 v0 := b.NewValue0(v.Pos, OpConst8, v.Type)
16543 v0.AuxInt = int8ToAuxInt(int8(-1) << c)
16544 v.AddArg2(x, v0)
16545 return true
16546 }
16547
16548
16549
16550 for {
16551 if v_0.Op != OpRsh8Ux64 {
16552 break
16553 }
16554 _ = v_0.Args[1]
16555 v_0_0 := v_0.Args[0]
16556 if v_0_0.Op != OpLsh8x64 {
16557 break
16558 }
16559 _ = v_0_0.Args[1]
16560 x := v_0_0.Args[0]
16561 v_0_0_1 := v_0_0.Args[1]
16562 if v_0_0_1.Op != OpConst64 {
16563 break
16564 }
16565 c1 := auxIntToInt64(v_0_0_1.AuxInt)
16566 v_0_1 := v_0.Args[1]
16567 if v_0_1.Op != OpConst64 {
16568 break
16569 }
16570 c2 := auxIntToInt64(v_0_1.AuxInt)
16571 if v_1.Op != OpConst64 {
16572 break
16573 }
16574 c3 := auxIntToInt64(v_1.AuxInt)
16575 if !(uint64(c1) >= uint64(c2) && uint64(c3) >= uint64(c2) && !uaddOvf(c1-c2, c3)) {
16576 break
16577 }
16578 v.reset(OpLsh8x64)
16579 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
16580 v0.AuxInt = int64ToAuxInt(c1 - c2 + c3)
16581 v.AddArg2(x, v0)
16582 return true
16583 }
16584
16585
16586
16587 for {
16588 if v_0.Op != OpAnd8 {
16589 break
16590 }
16591 _ = v_0.Args[1]
16592 v_0_0 := v_0.Args[0]
16593 v_0_1 := v_0.Args[1]
16594 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
16595 if v_0_0.Op != OpRsh8x64 {
16596 continue
16597 }
16598 t := v_0_0.Type
16599 _ = v_0_0.Args[1]
16600 x := v_0_0.Args[0]
16601 v_0_0_1 := v_0_0.Args[1]
16602 if v_0_0_1.Op != OpConst64 {
16603 continue
16604 }
16605 t2 := v_0_0_1.Type
16606 c := auxIntToInt64(v_0_0_1.AuxInt)
16607 if v_0_1.Op != OpConst8 {
16608 continue
16609 }
16610 d := auxIntToInt8(v_0_1.AuxInt)
16611 if v_1.Op != OpConst64 {
16612 continue
16613 }
16614 e := auxIntToInt64(v_1.AuxInt)
16615 if !(c >= e) {
16616 continue
16617 }
16618 v.reset(OpAnd8)
16619 v0 := b.NewValue0(v.Pos, OpRsh8x64, t)
16620 v1 := b.NewValue0(v.Pos, OpConst64, t2)
16621 v1.AuxInt = int64ToAuxInt(c - e)
16622 v0.AddArg2(x, v1)
16623 v2 := b.NewValue0(v.Pos, OpConst8, t)
16624 v2.AuxInt = int8ToAuxInt(d << e)
16625 v.AddArg2(v0, v2)
16626 return true
16627 }
16628 break
16629 }
16630
16631
16632
16633 for {
16634 if v_0.Op != OpAnd8 {
16635 break
16636 }
16637 _ = v_0.Args[1]
16638 v_0_0 := v_0.Args[0]
16639 v_0_1 := v_0.Args[1]
16640 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
16641 if v_0_0.Op != OpRsh8Ux64 {
16642 continue
16643 }
16644 t := v_0_0.Type
16645 _ = v_0_0.Args[1]
16646 x := v_0_0.Args[0]
16647 v_0_0_1 := v_0_0.Args[1]
16648 if v_0_0_1.Op != OpConst64 {
16649 continue
16650 }
16651 t2 := v_0_0_1.Type
16652 c := auxIntToInt64(v_0_0_1.AuxInt)
16653 if v_0_1.Op != OpConst8 {
16654 continue
16655 }
16656 d := auxIntToInt8(v_0_1.AuxInt)
16657 if v_1.Op != OpConst64 {
16658 continue
16659 }
16660 e := auxIntToInt64(v_1.AuxInt)
16661 if !(c >= e) {
16662 continue
16663 }
16664 v.reset(OpAnd8)
16665 v0 := b.NewValue0(v.Pos, OpRsh8Ux64, t)
16666 v1 := b.NewValue0(v.Pos, OpConst64, t2)
16667 v1.AuxInt = int64ToAuxInt(c - e)
16668 v0.AddArg2(x, v1)
16669 v2 := b.NewValue0(v.Pos, OpConst8, t)
16670 v2.AuxInt = int8ToAuxInt(d << e)
16671 v.AddArg2(v0, v2)
16672 return true
16673 }
16674 break
16675 }
16676
16677
16678
16679 for {
16680 if v_0.Op != OpAnd8 {
16681 break
16682 }
16683 _ = v_0.Args[1]
16684 v_0_0 := v_0.Args[0]
16685 v_0_1 := v_0.Args[1]
16686 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
16687 if v_0_0.Op != OpRsh8x64 {
16688 continue
16689 }
16690 t := v_0_0.Type
16691 _ = v_0_0.Args[1]
16692 x := v_0_0.Args[0]
16693 v_0_0_1 := v_0_0.Args[1]
16694 if v_0_0_1.Op != OpConst64 {
16695 continue
16696 }
16697 t2 := v_0_0_1.Type
16698 c := auxIntToInt64(v_0_0_1.AuxInt)
16699 if v_0_1.Op != OpConst8 {
16700 continue
16701 }
16702 d := auxIntToInt8(v_0_1.AuxInt)
16703 if v_1.Op != OpConst64 {
16704 continue
16705 }
16706 e := auxIntToInt64(v_1.AuxInt)
16707 if !(c < e) {
16708 continue
16709 }
16710 v.reset(OpAnd8)
16711 v0 := b.NewValue0(v.Pos, OpLsh8x64, t)
16712 v1 := b.NewValue0(v.Pos, OpConst64, t2)
16713 v1.AuxInt = int64ToAuxInt(e - c)
16714 v0.AddArg2(x, v1)
16715 v2 := b.NewValue0(v.Pos, OpConst8, t)
16716 v2.AuxInt = int8ToAuxInt(d << e)
16717 v.AddArg2(v0, v2)
16718 return true
16719 }
16720 break
16721 }
16722
16723
16724
16725 for {
16726 if v_0.Op != OpAnd8 {
16727 break
16728 }
16729 _ = v_0.Args[1]
16730 v_0_0 := v_0.Args[0]
16731 v_0_1 := v_0.Args[1]
16732 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
16733 if v_0_0.Op != OpRsh8Ux64 {
16734 continue
16735 }
16736 t := v_0_0.Type
16737 _ = v_0_0.Args[1]
16738 x := v_0_0.Args[0]
16739 v_0_0_1 := v_0_0.Args[1]
16740 if v_0_0_1.Op != OpConst64 {
16741 continue
16742 }
16743 t2 := v_0_0_1.Type
16744 c := auxIntToInt64(v_0_0_1.AuxInt)
16745 if v_0_1.Op != OpConst8 {
16746 continue
16747 }
16748 d := auxIntToInt8(v_0_1.AuxInt)
16749 if v_1.Op != OpConst64 {
16750 continue
16751 }
16752 e := auxIntToInt64(v_1.AuxInt)
16753 if !(c < e) {
16754 continue
16755 }
16756 v.reset(OpAnd8)
16757 v0 := b.NewValue0(v.Pos, OpLsh8x64, t)
16758 v1 := b.NewValue0(v.Pos, OpConst64, t2)
16759 v1.AuxInt = int64ToAuxInt(e - c)
16760 v0.AddArg2(x, v1)
16761 v2 := b.NewValue0(v.Pos, OpConst8, t)
16762 v2.AuxInt = int8ToAuxInt(d << e)
16763 v.AddArg2(v0, v2)
16764 return true
16765 }
16766 break
16767 }
16768 return false
16769 }
16770 func rewriteValuegeneric_OpLsh8x8(v *Value) bool {
16771 v_1 := v.Args[1]
16772 v_0 := v.Args[0]
16773 b := v.Block
16774
16775
16776 for {
16777 t := v.Type
16778 x := v_0
16779 if v_1.Op != OpConst8 {
16780 break
16781 }
16782 c := auxIntToInt8(v_1.AuxInt)
16783 v.reset(OpLsh8x64)
16784 v0 := b.NewValue0(v.Pos, OpConst64, t)
16785 v0.AuxInt = int64ToAuxInt(int64(uint8(c)))
16786 v.AddArg2(x, v0)
16787 return true
16788 }
16789
16790
16791 for {
16792 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 {
16793 break
16794 }
16795 v.reset(OpConst8)
16796 v.AuxInt = int8ToAuxInt(0)
16797 return true
16798 }
16799 return false
16800 }
16801 func rewriteValuegeneric_OpMod16(v *Value) bool {
16802 v_1 := v.Args[1]
16803 v_0 := v.Args[0]
16804 b := v.Block
16805
16806
16807
16808 for {
16809 if v_0.Op != OpConst16 {
16810 break
16811 }
16812 c := auxIntToInt16(v_0.AuxInt)
16813 if v_1.Op != OpConst16 {
16814 break
16815 }
16816 d := auxIntToInt16(v_1.AuxInt)
16817 if !(d != 0) {
16818 break
16819 }
16820 v.reset(OpConst16)
16821 v.AuxInt = int16ToAuxInt(c % d)
16822 return true
16823 }
16824
16825
16826
16827 for {
16828 t := v.Type
16829 n := v_0
16830 if v_1.Op != OpConst16 {
16831 break
16832 }
16833 c := auxIntToInt16(v_1.AuxInt)
16834 if !(isNonNegative(n) && isPowerOfTwo(c)) {
16835 break
16836 }
16837 v.reset(OpAnd16)
16838 v0 := b.NewValue0(v.Pos, OpConst16, t)
16839 v0.AuxInt = int16ToAuxInt(c - 1)
16840 v.AddArg2(n, v0)
16841 return true
16842 }
16843
16844
16845
16846 for {
16847 t := v.Type
16848 n := v_0
16849 if v_1.Op != OpConst16 {
16850 break
16851 }
16852 c := auxIntToInt16(v_1.AuxInt)
16853 if !(c < 0 && c != -1<<15) {
16854 break
16855 }
16856 v.reset(OpMod16)
16857 v.Type = t
16858 v0 := b.NewValue0(v.Pos, OpConst16, t)
16859 v0.AuxInt = int16ToAuxInt(-c)
16860 v.AddArg2(n, v0)
16861 return true
16862 }
16863
16864
16865
16866 for {
16867 t := v.Type
16868 x := v_0
16869 if v_1.Op != OpConst16 {
16870 break
16871 }
16872 c := auxIntToInt16(v_1.AuxInt)
16873 if !(x.Op != OpConst16 && (c > 0 || c == -1<<15)) {
16874 break
16875 }
16876 v.reset(OpSub16)
16877 v0 := b.NewValue0(v.Pos, OpMul16, t)
16878 v1 := b.NewValue0(v.Pos, OpDiv16, t)
16879 v2 := b.NewValue0(v.Pos, OpConst16, t)
16880 v2.AuxInt = int16ToAuxInt(c)
16881 v1.AddArg2(x, v2)
16882 v0.AddArg2(v1, v2)
16883 v.AddArg2(x, v0)
16884 return true
16885 }
16886 return false
16887 }
16888 func rewriteValuegeneric_OpMod16u(v *Value) bool {
16889 v_1 := v.Args[1]
16890 v_0 := v.Args[0]
16891 b := v.Block
16892
16893
16894
16895 for {
16896 if v_0.Op != OpConst16 {
16897 break
16898 }
16899 c := auxIntToInt16(v_0.AuxInt)
16900 if v_1.Op != OpConst16 {
16901 break
16902 }
16903 d := auxIntToInt16(v_1.AuxInt)
16904 if !(d != 0) {
16905 break
16906 }
16907 v.reset(OpConst16)
16908 v.AuxInt = int16ToAuxInt(int16(uint16(c) % uint16(d)))
16909 return true
16910 }
16911
16912
16913
16914 for {
16915 t := v.Type
16916 n := v_0
16917 if v_1.Op != OpConst16 {
16918 break
16919 }
16920 c := auxIntToInt16(v_1.AuxInt)
16921 if !(isPowerOfTwo(c)) {
16922 break
16923 }
16924 v.reset(OpAnd16)
16925 v0 := b.NewValue0(v.Pos, OpConst16, t)
16926 v0.AuxInt = int16ToAuxInt(c - 1)
16927 v.AddArg2(n, v0)
16928 return true
16929 }
16930
16931
16932
16933 for {
16934 t := v.Type
16935 x := v_0
16936 if v_1.Op != OpConst16 {
16937 break
16938 }
16939 c := auxIntToInt16(v_1.AuxInt)
16940 if !(x.Op != OpConst16 && c > 0 && umagicOK16(c)) {
16941 break
16942 }
16943 v.reset(OpSub16)
16944 v0 := b.NewValue0(v.Pos, OpMul16, t)
16945 v1 := b.NewValue0(v.Pos, OpDiv16u, t)
16946 v2 := b.NewValue0(v.Pos, OpConst16, t)
16947 v2.AuxInt = int16ToAuxInt(c)
16948 v1.AddArg2(x, v2)
16949 v0.AddArg2(v1, v2)
16950 v.AddArg2(x, v0)
16951 return true
16952 }
16953 return false
16954 }
16955 func rewriteValuegeneric_OpMod32(v *Value) bool {
16956 v_1 := v.Args[1]
16957 v_0 := v.Args[0]
16958 b := v.Block
16959
16960
16961
16962 for {
16963 if v_0.Op != OpConst32 {
16964 break
16965 }
16966 c := auxIntToInt32(v_0.AuxInt)
16967 if v_1.Op != OpConst32 {
16968 break
16969 }
16970 d := auxIntToInt32(v_1.AuxInt)
16971 if !(d != 0) {
16972 break
16973 }
16974 v.reset(OpConst32)
16975 v.AuxInt = int32ToAuxInt(c % d)
16976 return true
16977 }
16978
16979
16980
16981 for {
16982 t := v.Type
16983 n := v_0
16984 if v_1.Op != OpConst32 {
16985 break
16986 }
16987 c := auxIntToInt32(v_1.AuxInt)
16988 if !(isNonNegative(n) && isPowerOfTwo(c)) {
16989 break
16990 }
16991 v.reset(OpAnd32)
16992 v0 := b.NewValue0(v.Pos, OpConst32, t)
16993 v0.AuxInt = int32ToAuxInt(c - 1)
16994 v.AddArg2(n, v0)
16995 return true
16996 }
16997
16998
16999
17000 for {
17001 t := v.Type
17002 n := v_0
17003 if v_1.Op != OpConst32 {
17004 break
17005 }
17006 c := auxIntToInt32(v_1.AuxInt)
17007 if !(c < 0 && c != -1<<31) {
17008 break
17009 }
17010 v.reset(OpMod32)
17011 v.Type = t
17012 v0 := b.NewValue0(v.Pos, OpConst32, t)
17013 v0.AuxInt = int32ToAuxInt(-c)
17014 v.AddArg2(n, v0)
17015 return true
17016 }
17017
17018
17019
17020 for {
17021 t := v.Type
17022 x := v_0
17023 if v_1.Op != OpConst32 {
17024 break
17025 }
17026 c := auxIntToInt32(v_1.AuxInt)
17027 if !(x.Op != OpConst32 && (c > 0 || c == -1<<31)) {
17028 break
17029 }
17030 v.reset(OpSub32)
17031 v0 := b.NewValue0(v.Pos, OpMul32, t)
17032 v1 := b.NewValue0(v.Pos, OpDiv32, t)
17033 v2 := b.NewValue0(v.Pos, OpConst32, t)
17034 v2.AuxInt = int32ToAuxInt(c)
17035 v1.AddArg2(x, v2)
17036 v0.AddArg2(v1, v2)
17037 v.AddArg2(x, v0)
17038 return true
17039 }
17040 return false
17041 }
17042 func rewriteValuegeneric_OpMod32u(v *Value) bool {
17043 v_1 := v.Args[1]
17044 v_0 := v.Args[0]
17045 b := v.Block
17046
17047
17048
17049 for {
17050 if v_0.Op != OpConst32 {
17051 break
17052 }
17053 c := auxIntToInt32(v_0.AuxInt)
17054 if v_1.Op != OpConst32 {
17055 break
17056 }
17057 d := auxIntToInt32(v_1.AuxInt)
17058 if !(d != 0) {
17059 break
17060 }
17061 v.reset(OpConst32)
17062 v.AuxInt = int32ToAuxInt(int32(uint32(c) % uint32(d)))
17063 return true
17064 }
17065
17066
17067
17068 for {
17069 t := v.Type
17070 n := v_0
17071 if v_1.Op != OpConst32 {
17072 break
17073 }
17074 c := auxIntToInt32(v_1.AuxInt)
17075 if !(isPowerOfTwo(c)) {
17076 break
17077 }
17078 v.reset(OpAnd32)
17079 v0 := b.NewValue0(v.Pos, OpConst32, t)
17080 v0.AuxInt = int32ToAuxInt(c - 1)
17081 v.AddArg2(n, v0)
17082 return true
17083 }
17084
17085
17086
17087 for {
17088 t := v.Type
17089 x := v_0
17090 if v_1.Op != OpConst32 {
17091 break
17092 }
17093 c := auxIntToInt32(v_1.AuxInt)
17094 if !(x.Op != OpConst32 && c > 0 && umagicOK32(c)) {
17095 break
17096 }
17097 v.reset(OpSub32)
17098 v0 := b.NewValue0(v.Pos, OpMul32, t)
17099 v1 := b.NewValue0(v.Pos, OpDiv32u, t)
17100 v2 := b.NewValue0(v.Pos, OpConst32, t)
17101 v2.AuxInt = int32ToAuxInt(c)
17102 v1.AddArg2(x, v2)
17103 v0.AddArg2(v1, v2)
17104 v.AddArg2(x, v0)
17105 return true
17106 }
17107 return false
17108 }
17109 func rewriteValuegeneric_OpMod64(v *Value) bool {
17110 v_1 := v.Args[1]
17111 v_0 := v.Args[0]
17112 b := v.Block
17113
17114
17115
17116 for {
17117 if v_0.Op != OpConst64 {
17118 break
17119 }
17120 c := auxIntToInt64(v_0.AuxInt)
17121 if v_1.Op != OpConst64 {
17122 break
17123 }
17124 d := auxIntToInt64(v_1.AuxInt)
17125 if !(d != 0) {
17126 break
17127 }
17128 v.reset(OpConst64)
17129 v.AuxInt = int64ToAuxInt(c % d)
17130 return true
17131 }
17132
17133
17134
17135 for {
17136 t := v.Type
17137 n := v_0
17138 if v_1.Op != OpConst64 {
17139 break
17140 }
17141 c := auxIntToInt64(v_1.AuxInt)
17142 if !(isNonNegative(n) && isPowerOfTwo(c)) {
17143 break
17144 }
17145 v.reset(OpAnd64)
17146 v0 := b.NewValue0(v.Pos, OpConst64, t)
17147 v0.AuxInt = int64ToAuxInt(c - 1)
17148 v.AddArg2(n, v0)
17149 return true
17150 }
17151
17152
17153
17154 for {
17155 n := v_0
17156 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != -1<<63 || !(isNonNegative(n)) {
17157 break
17158 }
17159 v.copyOf(n)
17160 return true
17161 }
17162
17163
17164
17165 for {
17166 t := v.Type
17167 n := v_0
17168 if v_1.Op != OpConst64 {
17169 break
17170 }
17171 c := auxIntToInt64(v_1.AuxInt)
17172 if !(c < 0 && c != -1<<63) {
17173 break
17174 }
17175 v.reset(OpMod64)
17176 v.Type = t
17177 v0 := b.NewValue0(v.Pos, OpConst64, t)
17178 v0.AuxInt = int64ToAuxInt(-c)
17179 v.AddArg2(n, v0)
17180 return true
17181 }
17182
17183
17184
17185 for {
17186 t := v.Type
17187 x := v_0
17188 if v_1.Op != OpConst64 {
17189 break
17190 }
17191 c := auxIntToInt64(v_1.AuxInt)
17192 if !(x.Op != OpConst64 && (c > 0 || c == -1<<63)) {
17193 break
17194 }
17195 v.reset(OpSub64)
17196 v0 := b.NewValue0(v.Pos, OpMul64, t)
17197 v1 := b.NewValue0(v.Pos, OpDiv64, t)
17198 v2 := b.NewValue0(v.Pos, OpConst64, t)
17199 v2.AuxInt = int64ToAuxInt(c)
17200 v1.AddArg2(x, v2)
17201 v0.AddArg2(v1, v2)
17202 v.AddArg2(x, v0)
17203 return true
17204 }
17205 return false
17206 }
17207 func rewriteValuegeneric_OpMod64u(v *Value) bool {
17208 v_1 := v.Args[1]
17209 v_0 := v.Args[0]
17210 b := v.Block
17211
17212
17213
17214 for {
17215 if v_0.Op != OpConst64 {
17216 break
17217 }
17218 c := auxIntToInt64(v_0.AuxInt)
17219 if v_1.Op != OpConst64 {
17220 break
17221 }
17222 d := auxIntToInt64(v_1.AuxInt)
17223 if !(d != 0) {
17224 break
17225 }
17226 v.reset(OpConst64)
17227 v.AuxInt = int64ToAuxInt(int64(uint64(c) % uint64(d)))
17228 return true
17229 }
17230
17231
17232
17233 for {
17234 t := v.Type
17235 n := v_0
17236 if v_1.Op != OpConst64 {
17237 break
17238 }
17239 c := auxIntToInt64(v_1.AuxInt)
17240 if !(isPowerOfTwo(c)) {
17241 break
17242 }
17243 v.reset(OpAnd64)
17244 v0 := b.NewValue0(v.Pos, OpConst64, t)
17245 v0.AuxInt = int64ToAuxInt(c - 1)
17246 v.AddArg2(n, v0)
17247 return true
17248 }
17249
17250
17251 for {
17252 t := v.Type
17253 n := v_0
17254 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != -1<<63 {
17255 break
17256 }
17257 v.reset(OpAnd64)
17258 v0 := b.NewValue0(v.Pos, OpConst64, t)
17259 v0.AuxInt = int64ToAuxInt(1<<63 - 1)
17260 v.AddArg2(n, v0)
17261 return true
17262 }
17263
17264
17265
17266 for {
17267 t := v.Type
17268 x := v_0
17269 if v_1.Op != OpConst64 {
17270 break
17271 }
17272 c := auxIntToInt64(v_1.AuxInt)
17273 if !(x.Op != OpConst64 && c > 0 && umagicOK64(c)) {
17274 break
17275 }
17276 v.reset(OpSub64)
17277 v0 := b.NewValue0(v.Pos, OpMul64, t)
17278 v1 := b.NewValue0(v.Pos, OpDiv64u, t)
17279 v2 := b.NewValue0(v.Pos, OpConst64, t)
17280 v2.AuxInt = int64ToAuxInt(c)
17281 v1.AddArg2(x, v2)
17282 v0.AddArg2(v1, v2)
17283 v.AddArg2(x, v0)
17284 return true
17285 }
17286 return false
17287 }
17288 func rewriteValuegeneric_OpMod8(v *Value) bool {
17289 v_1 := v.Args[1]
17290 v_0 := v.Args[0]
17291 b := v.Block
17292
17293
17294
17295 for {
17296 if v_0.Op != OpConst8 {
17297 break
17298 }
17299 c := auxIntToInt8(v_0.AuxInt)
17300 if v_1.Op != OpConst8 {
17301 break
17302 }
17303 d := auxIntToInt8(v_1.AuxInt)
17304 if !(d != 0) {
17305 break
17306 }
17307 v.reset(OpConst8)
17308 v.AuxInt = int8ToAuxInt(c % d)
17309 return true
17310 }
17311
17312
17313
17314 for {
17315 t := v.Type
17316 n := v_0
17317 if v_1.Op != OpConst8 {
17318 break
17319 }
17320 c := auxIntToInt8(v_1.AuxInt)
17321 if !(isNonNegative(n) && isPowerOfTwo(c)) {
17322 break
17323 }
17324 v.reset(OpAnd8)
17325 v0 := b.NewValue0(v.Pos, OpConst8, t)
17326 v0.AuxInt = int8ToAuxInt(c - 1)
17327 v.AddArg2(n, v0)
17328 return true
17329 }
17330
17331
17332
17333 for {
17334 t := v.Type
17335 n := v_0
17336 if v_1.Op != OpConst8 {
17337 break
17338 }
17339 c := auxIntToInt8(v_1.AuxInt)
17340 if !(c < 0 && c != -1<<7) {
17341 break
17342 }
17343 v.reset(OpMod8)
17344 v.Type = t
17345 v0 := b.NewValue0(v.Pos, OpConst8, t)
17346 v0.AuxInt = int8ToAuxInt(-c)
17347 v.AddArg2(n, v0)
17348 return true
17349 }
17350
17351
17352
17353 for {
17354 t := v.Type
17355 x := v_0
17356 if v_1.Op != OpConst8 {
17357 break
17358 }
17359 c := auxIntToInt8(v_1.AuxInt)
17360 if !(x.Op != OpConst8 && (c > 0 || c == -1<<7)) {
17361 break
17362 }
17363 v.reset(OpSub8)
17364 v0 := b.NewValue0(v.Pos, OpMul8, t)
17365 v1 := b.NewValue0(v.Pos, OpDiv8, t)
17366 v2 := b.NewValue0(v.Pos, OpConst8, t)
17367 v2.AuxInt = int8ToAuxInt(c)
17368 v1.AddArg2(x, v2)
17369 v0.AddArg2(v1, v2)
17370 v.AddArg2(x, v0)
17371 return true
17372 }
17373 return false
17374 }
17375 func rewriteValuegeneric_OpMod8u(v *Value) bool {
17376 v_1 := v.Args[1]
17377 v_0 := v.Args[0]
17378 b := v.Block
17379
17380
17381
17382 for {
17383 if v_0.Op != OpConst8 {
17384 break
17385 }
17386 c := auxIntToInt8(v_0.AuxInt)
17387 if v_1.Op != OpConst8 {
17388 break
17389 }
17390 d := auxIntToInt8(v_1.AuxInt)
17391 if !(d != 0) {
17392 break
17393 }
17394 v.reset(OpConst8)
17395 v.AuxInt = int8ToAuxInt(int8(uint8(c) % uint8(d)))
17396 return true
17397 }
17398
17399
17400
17401 for {
17402 t := v.Type
17403 n := v_0
17404 if v_1.Op != OpConst8 {
17405 break
17406 }
17407 c := auxIntToInt8(v_1.AuxInt)
17408 if !(isPowerOfTwo(c)) {
17409 break
17410 }
17411 v.reset(OpAnd8)
17412 v0 := b.NewValue0(v.Pos, OpConst8, t)
17413 v0.AuxInt = int8ToAuxInt(c - 1)
17414 v.AddArg2(n, v0)
17415 return true
17416 }
17417
17418
17419
17420 for {
17421 t := v.Type
17422 x := v_0
17423 if v_1.Op != OpConst8 {
17424 break
17425 }
17426 c := auxIntToInt8(v_1.AuxInt)
17427 if !(x.Op != OpConst8 && c > 0 && umagicOK8(c)) {
17428 break
17429 }
17430 v.reset(OpSub8)
17431 v0 := b.NewValue0(v.Pos, OpMul8, t)
17432 v1 := b.NewValue0(v.Pos, OpDiv8u, t)
17433 v2 := b.NewValue0(v.Pos, OpConst8, t)
17434 v2.AuxInt = int8ToAuxInt(c)
17435 v1.AddArg2(x, v2)
17436 v0.AddArg2(v1, v2)
17437 v.AddArg2(x, v0)
17438 return true
17439 }
17440 return false
17441 }
17442 func rewriteValuegeneric_OpMove(v *Value) bool {
17443 v_2 := v.Args[2]
17444 v_1 := v.Args[1]
17445 v_0 := v.Args[0]
17446 b := v.Block
17447 config := b.Func.Config
17448
17449
17450
17451 for {
17452 n := auxIntToInt64(v.AuxInt)
17453 t := auxToType(v.Aux)
17454 dst1 := v_0
17455 src := v_1
17456 mem := v_2
17457 if mem.Op != OpZero || auxIntToInt64(mem.AuxInt) != n || auxToType(mem.Aux) != t {
17458 break
17459 }
17460 dst2 := mem.Args[0]
17461 if !(isSamePtr(src, dst2)) {
17462 break
17463 }
17464 v.reset(OpZero)
17465 v.AuxInt = int64ToAuxInt(n)
17466 v.Aux = typeToAux(t)
17467 v.AddArg2(dst1, mem)
17468 return true
17469 }
17470
17471
17472
17473 for {
17474 n := auxIntToInt64(v.AuxInt)
17475 t := auxToType(v.Aux)
17476 dst1 := v_0
17477 src := v_1
17478 mem := v_2
17479 if mem.Op != OpVarDef {
17480 break
17481 }
17482 mem_0 := mem.Args[0]
17483 if mem_0.Op != OpZero || auxIntToInt64(mem_0.AuxInt) != n || auxToType(mem_0.Aux) != t {
17484 break
17485 }
17486 dst0 := mem_0.Args[0]
17487 if !(isSamePtr(src, dst0)) {
17488 break
17489 }
17490 v.reset(OpZero)
17491 v.AuxInt = int64ToAuxInt(n)
17492 v.Aux = typeToAux(t)
17493 v.AddArg2(dst1, mem)
17494 return true
17495 }
17496
17497
17498
17499 for {
17500 n := auxIntToInt64(v.AuxInt)
17501 t := auxToType(v.Aux)
17502 dst := v_0
17503 if v_1.Op != OpAddr {
17504 break
17505 }
17506 sym := auxToSym(v_1.Aux)
17507 v_1_0 := v_1.Args[0]
17508 if v_1_0.Op != OpSB {
17509 break
17510 }
17511 mem := v_2
17512 if !(symIsROZero(sym)) {
17513 break
17514 }
17515 v.reset(OpZero)
17516 v.AuxInt = int64ToAuxInt(n)
17517 v.Aux = typeToAux(t)
17518 v.AddArg2(dst, mem)
17519 return true
17520 }
17521
17522
17523
17524 for {
17525 n := auxIntToInt64(v.AuxInt)
17526 t1 := auxToType(v.Aux)
17527 dst1 := v_0
17528 src1 := v_1
17529 store := v_2
17530 if store.Op != OpStore {
17531 break
17532 }
17533 t2 := auxToType(store.Aux)
17534 mem := store.Args[2]
17535 op := store.Args[0]
17536 if op.Op != OpOffPtr {
17537 break
17538 }
17539 o2 := auxIntToInt64(op.AuxInt)
17540 dst2 := op.Args[0]
17541 if !(isSamePtr(dst1, dst2) && store.Uses == 1 && n >= o2+t2.Size() && disjoint(src1, n, op, t2.Size()) && clobber(store)) {
17542 break
17543 }
17544 v.reset(OpMove)
17545 v.AuxInt = int64ToAuxInt(n)
17546 v.Aux = typeToAux(t1)
17547 v.AddArg3(dst1, src1, mem)
17548 return true
17549 }
17550
17551
17552
17553 for {
17554 n := auxIntToInt64(v.AuxInt)
17555 t := auxToType(v.Aux)
17556 dst1 := v_0
17557 src1 := v_1
17558 move := v_2
17559 if move.Op != OpMove || auxIntToInt64(move.AuxInt) != n || auxToType(move.Aux) != t {
17560 break
17561 }
17562 mem := move.Args[2]
17563 dst2 := move.Args[0]
17564 if !(move.Uses == 1 && isSamePtr(dst1, dst2) && disjoint(src1, n, dst2, n) && clobber(move)) {
17565 break
17566 }
17567 v.reset(OpMove)
17568 v.AuxInt = int64ToAuxInt(n)
17569 v.Aux = typeToAux(t)
17570 v.AddArg3(dst1, src1, mem)
17571 return true
17572 }
17573
17574
17575
17576 for {
17577 n := auxIntToInt64(v.AuxInt)
17578 t := auxToType(v.Aux)
17579 dst1 := v_0
17580 src1 := v_1
17581 vardef := v_2
17582 if vardef.Op != OpVarDef {
17583 break
17584 }
17585 x := auxToSym(vardef.Aux)
17586 move := vardef.Args[0]
17587 if move.Op != OpMove || auxIntToInt64(move.AuxInt) != n || auxToType(move.Aux) != t {
17588 break
17589 }
17590 mem := move.Args[2]
17591 dst2 := move.Args[0]
17592 if !(move.Uses == 1 && vardef.Uses == 1 && isSamePtr(dst1, dst2) && disjoint(src1, n, dst2, n) && clobber(move, vardef)) {
17593 break
17594 }
17595 v.reset(OpMove)
17596 v.AuxInt = int64ToAuxInt(n)
17597 v.Aux = typeToAux(t)
17598 v0 := b.NewValue0(v.Pos, OpVarDef, types.TypeMem)
17599 v0.Aux = symToAux(x)
17600 v0.AddArg(mem)
17601 v.AddArg3(dst1, src1, v0)
17602 return true
17603 }
17604
17605
17606
17607 for {
17608 n := auxIntToInt64(v.AuxInt)
17609 t := auxToType(v.Aux)
17610 dst1 := v_0
17611 src1 := v_1
17612 zero := v_2
17613 if zero.Op != OpZero || auxIntToInt64(zero.AuxInt) != n || auxToType(zero.Aux) != t {
17614 break
17615 }
17616 mem := zero.Args[1]
17617 dst2 := zero.Args[0]
17618 if !(zero.Uses == 1 && isSamePtr(dst1, dst2) && disjoint(src1, n, dst2, n) && clobber(zero)) {
17619 break
17620 }
17621 v.reset(OpMove)
17622 v.AuxInt = int64ToAuxInt(n)
17623 v.Aux = typeToAux(t)
17624 v.AddArg3(dst1, src1, mem)
17625 return true
17626 }
17627
17628
17629
17630 for {
17631 n := auxIntToInt64(v.AuxInt)
17632 t := auxToType(v.Aux)
17633 dst1 := v_0
17634 src1 := v_1
17635 vardef := v_2
17636 if vardef.Op != OpVarDef {
17637 break
17638 }
17639 x := auxToSym(vardef.Aux)
17640 zero := vardef.Args[0]
17641 if zero.Op != OpZero || auxIntToInt64(zero.AuxInt) != n || auxToType(zero.Aux) != t {
17642 break
17643 }
17644 mem := zero.Args[1]
17645 dst2 := zero.Args[0]
17646 if !(zero.Uses == 1 && vardef.Uses == 1 && isSamePtr(dst1, dst2) && disjoint(src1, n, dst2, n) && clobber(zero, vardef)) {
17647 break
17648 }
17649 v.reset(OpMove)
17650 v.AuxInt = int64ToAuxInt(n)
17651 v.Aux = typeToAux(t)
17652 v0 := b.NewValue0(v.Pos, OpVarDef, types.TypeMem)
17653 v0.Aux = symToAux(x)
17654 v0.AddArg(mem)
17655 v.AddArg3(dst1, src1, v0)
17656 return true
17657 }
17658
17659
17660
17661 for {
17662 n := auxIntToInt64(v.AuxInt)
17663 t1 := auxToType(v.Aux)
17664 dst := v_0
17665 p1 := v_1
17666 mem := v_2
17667 if mem.Op != OpStore {
17668 break
17669 }
17670 t2 := auxToType(mem.Aux)
17671 _ = mem.Args[2]
17672 op2 := mem.Args[0]
17673 if op2.Op != OpOffPtr {
17674 break
17675 }
17676 tt2 := op2.Type
17677 o2 := auxIntToInt64(op2.AuxInt)
17678 p2 := op2.Args[0]
17679 d1 := mem.Args[1]
17680 mem_2 := mem.Args[2]
17681 if mem_2.Op != OpStore {
17682 break
17683 }
17684 t3 := auxToType(mem_2.Aux)
17685 d2 := mem_2.Args[1]
17686 op3 := mem_2.Args[0]
17687 if op3.Op != OpOffPtr {
17688 break
17689 }
17690 tt3 := op3.Type
17691 if auxIntToInt64(op3.AuxInt) != 0 {
17692 break
17693 }
17694 p3 := op3.Args[0]
17695 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()) {
17696 break
17697 }
17698 v.reset(OpStore)
17699 v.Aux = typeToAux(t2)
17700 v0 := b.NewValue0(v.Pos, OpOffPtr, tt2)
17701 v0.AuxInt = int64ToAuxInt(o2)
17702 v0.AddArg(dst)
17703 v1 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
17704 v1.Aux = typeToAux(t3)
17705 v2 := b.NewValue0(v.Pos, OpOffPtr, tt3)
17706 v2.AuxInt = int64ToAuxInt(0)
17707 v2.AddArg(dst)
17708 v1.AddArg3(v2, d2, mem)
17709 v.AddArg3(v0, d1, v1)
17710 return true
17711 }
17712
17713
17714
17715 for {
17716 n := auxIntToInt64(v.AuxInt)
17717 t1 := auxToType(v.Aux)
17718 dst := v_0
17719 p1 := v_1
17720 mem := v_2
17721 if mem.Op != OpStore {
17722 break
17723 }
17724 t2 := auxToType(mem.Aux)
17725 _ = mem.Args[2]
17726 op2 := mem.Args[0]
17727 if op2.Op != OpOffPtr {
17728 break
17729 }
17730 tt2 := op2.Type
17731 o2 := auxIntToInt64(op2.AuxInt)
17732 p2 := op2.Args[0]
17733 d1 := mem.Args[1]
17734 mem_2 := mem.Args[2]
17735 if mem_2.Op != OpStore {
17736 break
17737 }
17738 t3 := auxToType(mem_2.Aux)
17739 _ = mem_2.Args[2]
17740 op3 := mem_2.Args[0]
17741 if op3.Op != OpOffPtr {
17742 break
17743 }
17744 tt3 := op3.Type
17745 o3 := auxIntToInt64(op3.AuxInt)
17746 p3 := op3.Args[0]
17747 d2 := mem_2.Args[1]
17748 mem_2_2 := mem_2.Args[2]
17749 if mem_2_2.Op != OpStore {
17750 break
17751 }
17752 t4 := auxToType(mem_2_2.Aux)
17753 d3 := mem_2_2.Args[1]
17754 op4 := mem_2_2.Args[0]
17755 if op4.Op != OpOffPtr {
17756 break
17757 }
17758 tt4 := op4.Type
17759 if auxIntToInt64(op4.AuxInt) != 0 {
17760 break
17761 }
17762 p4 := op4.Args[0]
17763 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()) {
17764 break
17765 }
17766 v.reset(OpStore)
17767 v.Aux = typeToAux(t2)
17768 v0 := b.NewValue0(v.Pos, OpOffPtr, tt2)
17769 v0.AuxInt = int64ToAuxInt(o2)
17770 v0.AddArg(dst)
17771 v1 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
17772 v1.Aux = typeToAux(t3)
17773 v2 := b.NewValue0(v.Pos, OpOffPtr, tt3)
17774 v2.AuxInt = int64ToAuxInt(o3)
17775 v2.AddArg(dst)
17776 v3 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
17777 v3.Aux = typeToAux(t4)
17778 v4 := b.NewValue0(v.Pos, OpOffPtr, tt4)
17779 v4.AuxInt = int64ToAuxInt(0)
17780 v4.AddArg(dst)
17781 v3.AddArg3(v4, d3, mem)
17782 v1.AddArg3(v2, d2, v3)
17783 v.AddArg3(v0, d1, v1)
17784 return true
17785 }
17786
17787
17788
17789 for {
17790 n := auxIntToInt64(v.AuxInt)
17791 t1 := auxToType(v.Aux)
17792 dst := v_0
17793 p1 := v_1
17794 mem := v_2
17795 if mem.Op != OpStore {
17796 break
17797 }
17798 t2 := auxToType(mem.Aux)
17799 _ = mem.Args[2]
17800 op2 := mem.Args[0]
17801 if op2.Op != OpOffPtr {
17802 break
17803 }
17804 tt2 := op2.Type
17805 o2 := auxIntToInt64(op2.AuxInt)
17806 p2 := op2.Args[0]
17807 d1 := mem.Args[1]
17808 mem_2 := mem.Args[2]
17809 if mem_2.Op != OpStore {
17810 break
17811 }
17812 t3 := auxToType(mem_2.Aux)
17813 _ = mem_2.Args[2]
17814 op3 := mem_2.Args[0]
17815 if op3.Op != OpOffPtr {
17816 break
17817 }
17818 tt3 := op3.Type
17819 o3 := auxIntToInt64(op3.AuxInt)
17820 p3 := op3.Args[0]
17821 d2 := mem_2.Args[1]
17822 mem_2_2 := mem_2.Args[2]
17823 if mem_2_2.Op != OpStore {
17824 break
17825 }
17826 t4 := auxToType(mem_2_2.Aux)
17827 _ = mem_2_2.Args[2]
17828 op4 := mem_2_2.Args[0]
17829 if op4.Op != OpOffPtr {
17830 break
17831 }
17832 tt4 := op4.Type
17833 o4 := auxIntToInt64(op4.AuxInt)
17834 p4 := op4.Args[0]
17835 d3 := mem_2_2.Args[1]
17836 mem_2_2_2 := mem_2_2.Args[2]
17837 if mem_2_2_2.Op != OpStore {
17838 break
17839 }
17840 t5 := auxToType(mem_2_2_2.Aux)
17841 d4 := mem_2_2_2.Args[1]
17842 op5 := mem_2_2_2.Args[0]
17843 if op5.Op != OpOffPtr {
17844 break
17845 }
17846 tt5 := op5.Type
17847 if auxIntToInt64(op5.AuxInt) != 0 {
17848 break
17849 }
17850 p5 := op5.Args[0]
17851 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()) {
17852 break
17853 }
17854 v.reset(OpStore)
17855 v.Aux = typeToAux(t2)
17856 v0 := b.NewValue0(v.Pos, OpOffPtr, tt2)
17857 v0.AuxInt = int64ToAuxInt(o2)
17858 v0.AddArg(dst)
17859 v1 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
17860 v1.Aux = typeToAux(t3)
17861 v2 := b.NewValue0(v.Pos, OpOffPtr, tt3)
17862 v2.AuxInt = int64ToAuxInt(o3)
17863 v2.AddArg(dst)
17864 v3 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
17865 v3.Aux = typeToAux(t4)
17866 v4 := b.NewValue0(v.Pos, OpOffPtr, tt4)
17867 v4.AuxInt = int64ToAuxInt(o4)
17868 v4.AddArg(dst)
17869 v5 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
17870 v5.Aux = typeToAux(t5)
17871 v6 := b.NewValue0(v.Pos, OpOffPtr, tt5)
17872 v6.AuxInt = int64ToAuxInt(0)
17873 v6.AddArg(dst)
17874 v5.AddArg3(v6, d4, mem)
17875 v3.AddArg3(v4, d3, v5)
17876 v1.AddArg3(v2, d2, v3)
17877 v.AddArg3(v0, d1, v1)
17878 return true
17879 }
17880
17881
17882
17883 for {
17884 n := auxIntToInt64(v.AuxInt)
17885 t1 := auxToType(v.Aux)
17886 dst := v_0
17887 p1 := v_1
17888 mem := v_2
17889 if mem.Op != OpVarDef {
17890 break
17891 }
17892 mem_0 := mem.Args[0]
17893 if mem_0.Op != OpStore {
17894 break
17895 }
17896 t2 := auxToType(mem_0.Aux)
17897 _ = mem_0.Args[2]
17898 op2 := mem_0.Args[0]
17899 if op2.Op != OpOffPtr {
17900 break
17901 }
17902 tt2 := op2.Type
17903 o2 := auxIntToInt64(op2.AuxInt)
17904 p2 := op2.Args[0]
17905 d1 := mem_0.Args[1]
17906 mem_0_2 := mem_0.Args[2]
17907 if mem_0_2.Op != OpStore {
17908 break
17909 }
17910 t3 := auxToType(mem_0_2.Aux)
17911 d2 := mem_0_2.Args[1]
17912 op3 := mem_0_2.Args[0]
17913 if op3.Op != OpOffPtr {
17914 break
17915 }
17916 tt3 := op3.Type
17917 if auxIntToInt64(op3.AuxInt) != 0 {
17918 break
17919 }
17920 p3 := op3.Args[0]
17921 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()) {
17922 break
17923 }
17924 v.reset(OpStore)
17925 v.Aux = typeToAux(t2)
17926 v0 := b.NewValue0(v.Pos, OpOffPtr, tt2)
17927 v0.AuxInt = int64ToAuxInt(o2)
17928 v0.AddArg(dst)
17929 v1 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
17930 v1.Aux = typeToAux(t3)
17931 v2 := b.NewValue0(v.Pos, OpOffPtr, tt3)
17932 v2.AuxInt = int64ToAuxInt(0)
17933 v2.AddArg(dst)
17934 v1.AddArg3(v2, d2, mem)
17935 v.AddArg3(v0, d1, v1)
17936 return true
17937 }
17938
17939
17940
17941 for {
17942 n := auxIntToInt64(v.AuxInt)
17943 t1 := auxToType(v.Aux)
17944 dst := v_0
17945 p1 := v_1
17946 mem := v_2
17947 if mem.Op != OpVarDef {
17948 break
17949 }
17950 mem_0 := mem.Args[0]
17951 if mem_0.Op != OpStore {
17952 break
17953 }
17954 t2 := auxToType(mem_0.Aux)
17955 _ = mem_0.Args[2]
17956 op2 := mem_0.Args[0]
17957 if op2.Op != OpOffPtr {
17958 break
17959 }
17960 tt2 := op2.Type
17961 o2 := auxIntToInt64(op2.AuxInt)
17962 p2 := op2.Args[0]
17963 d1 := mem_0.Args[1]
17964 mem_0_2 := mem_0.Args[2]
17965 if mem_0_2.Op != OpStore {
17966 break
17967 }
17968 t3 := auxToType(mem_0_2.Aux)
17969 _ = mem_0_2.Args[2]
17970 op3 := mem_0_2.Args[0]
17971 if op3.Op != OpOffPtr {
17972 break
17973 }
17974 tt3 := op3.Type
17975 o3 := auxIntToInt64(op3.AuxInt)
17976 p3 := op3.Args[0]
17977 d2 := mem_0_2.Args[1]
17978 mem_0_2_2 := mem_0_2.Args[2]
17979 if mem_0_2_2.Op != OpStore {
17980 break
17981 }
17982 t4 := auxToType(mem_0_2_2.Aux)
17983 d3 := mem_0_2_2.Args[1]
17984 op4 := mem_0_2_2.Args[0]
17985 if op4.Op != OpOffPtr {
17986 break
17987 }
17988 tt4 := op4.Type
17989 if auxIntToInt64(op4.AuxInt) != 0 {
17990 break
17991 }
17992 p4 := op4.Args[0]
17993 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()) {
17994 break
17995 }
17996 v.reset(OpStore)
17997 v.Aux = typeToAux(t2)
17998 v0 := b.NewValue0(v.Pos, OpOffPtr, tt2)
17999 v0.AuxInt = int64ToAuxInt(o2)
18000 v0.AddArg(dst)
18001 v1 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
18002 v1.Aux = typeToAux(t3)
18003 v2 := b.NewValue0(v.Pos, OpOffPtr, tt3)
18004 v2.AuxInt = int64ToAuxInt(o3)
18005 v2.AddArg(dst)
18006 v3 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
18007 v3.Aux = typeToAux(t4)
18008 v4 := b.NewValue0(v.Pos, OpOffPtr, tt4)
18009 v4.AuxInt = int64ToAuxInt(0)
18010 v4.AddArg(dst)
18011 v3.AddArg3(v4, d3, mem)
18012 v1.AddArg3(v2, d2, v3)
18013 v.AddArg3(v0, d1, v1)
18014 return true
18015 }
18016
18017
18018
18019 for {
18020 n := auxIntToInt64(v.AuxInt)
18021 t1 := auxToType(v.Aux)
18022 dst := v_0
18023 p1 := v_1
18024 mem := v_2
18025 if mem.Op != OpVarDef {
18026 break
18027 }
18028 mem_0 := mem.Args[0]
18029 if mem_0.Op != OpStore {
18030 break
18031 }
18032 t2 := auxToType(mem_0.Aux)
18033 _ = mem_0.Args[2]
18034 op2 := mem_0.Args[0]
18035 if op2.Op != OpOffPtr {
18036 break
18037 }
18038 tt2 := op2.Type
18039 o2 := auxIntToInt64(op2.AuxInt)
18040 p2 := op2.Args[0]
18041 d1 := mem_0.Args[1]
18042 mem_0_2 := mem_0.Args[2]
18043 if mem_0_2.Op != OpStore {
18044 break
18045 }
18046 t3 := auxToType(mem_0_2.Aux)
18047 _ = mem_0_2.Args[2]
18048 op3 := mem_0_2.Args[0]
18049 if op3.Op != OpOffPtr {
18050 break
18051 }
18052 tt3 := op3.Type
18053 o3 := auxIntToInt64(op3.AuxInt)
18054 p3 := op3.Args[0]
18055 d2 := mem_0_2.Args[1]
18056 mem_0_2_2 := mem_0_2.Args[2]
18057 if mem_0_2_2.Op != OpStore {
18058 break
18059 }
18060 t4 := auxToType(mem_0_2_2.Aux)
18061 _ = mem_0_2_2.Args[2]
18062 op4 := mem_0_2_2.Args[0]
18063 if op4.Op != OpOffPtr {
18064 break
18065 }
18066 tt4 := op4.Type
18067 o4 := auxIntToInt64(op4.AuxInt)
18068 p4 := op4.Args[0]
18069 d3 := mem_0_2_2.Args[1]
18070 mem_0_2_2_2 := mem_0_2_2.Args[2]
18071 if mem_0_2_2_2.Op != OpStore {
18072 break
18073 }
18074 t5 := auxToType(mem_0_2_2_2.Aux)
18075 d4 := mem_0_2_2_2.Args[1]
18076 op5 := mem_0_2_2_2.Args[0]
18077 if op5.Op != OpOffPtr {
18078 break
18079 }
18080 tt5 := op5.Type
18081 if auxIntToInt64(op5.AuxInt) != 0 {
18082 break
18083 }
18084 p5 := op5.Args[0]
18085 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()) {
18086 break
18087 }
18088 v.reset(OpStore)
18089 v.Aux = typeToAux(t2)
18090 v0 := b.NewValue0(v.Pos, OpOffPtr, tt2)
18091 v0.AuxInt = int64ToAuxInt(o2)
18092 v0.AddArg(dst)
18093 v1 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
18094 v1.Aux = typeToAux(t3)
18095 v2 := b.NewValue0(v.Pos, OpOffPtr, tt3)
18096 v2.AuxInt = int64ToAuxInt(o3)
18097 v2.AddArg(dst)
18098 v3 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
18099 v3.Aux = typeToAux(t4)
18100 v4 := b.NewValue0(v.Pos, OpOffPtr, tt4)
18101 v4.AuxInt = int64ToAuxInt(o4)
18102 v4.AddArg(dst)
18103 v5 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
18104 v5.Aux = typeToAux(t5)
18105 v6 := b.NewValue0(v.Pos, OpOffPtr, tt5)
18106 v6.AuxInt = int64ToAuxInt(0)
18107 v6.AddArg(dst)
18108 v5.AddArg3(v6, d4, mem)
18109 v3.AddArg3(v4, d3, v5)
18110 v1.AddArg3(v2, d2, v3)
18111 v.AddArg3(v0, d1, v1)
18112 return true
18113 }
18114
18115
18116
18117 for {
18118 n := auxIntToInt64(v.AuxInt)
18119 t1 := auxToType(v.Aux)
18120 dst := v_0
18121 p1 := v_1
18122 mem := v_2
18123 if mem.Op != OpStore {
18124 break
18125 }
18126 t2 := auxToType(mem.Aux)
18127 _ = mem.Args[2]
18128 op2 := mem.Args[0]
18129 if op2.Op != OpOffPtr {
18130 break
18131 }
18132 tt2 := op2.Type
18133 o2 := auxIntToInt64(op2.AuxInt)
18134 p2 := op2.Args[0]
18135 d1 := mem.Args[1]
18136 mem_2 := mem.Args[2]
18137 if mem_2.Op != OpZero || auxIntToInt64(mem_2.AuxInt) != n {
18138 break
18139 }
18140 t3 := auxToType(mem_2.Aux)
18141 p3 := mem_2.Args[0]
18142 if !(isSamePtr(p1, p2) && isSamePtr(p2, p3) && t2.Alignment() <= t1.Alignment() && t3.Alignment() <= t1.Alignment() && registerizable(b, t2) && n >= o2+t2.Size()) {
18143 break
18144 }
18145 v.reset(OpStore)
18146 v.Aux = typeToAux(t2)
18147 v0 := b.NewValue0(v.Pos, OpOffPtr, tt2)
18148 v0.AuxInt = int64ToAuxInt(o2)
18149 v0.AddArg(dst)
18150 v1 := b.NewValue0(v.Pos, OpZero, types.TypeMem)
18151 v1.AuxInt = int64ToAuxInt(n)
18152 v1.Aux = typeToAux(t1)
18153 v1.AddArg2(dst, mem)
18154 v.AddArg3(v0, d1, v1)
18155 return true
18156 }
18157
18158
18159
18160 for {
18161 n := auxIntToInt64(v.AuxInt)
18162 t1 := auxToType(v.Aux)
18163 dst := v_0
18164 p1 := v_1
18165 mem := v_2
18166 if mem.Op != OpStore {
18167 break
18168 }
18169 t2 := auxToType(mem.Aux)
18170 _ = mem.Args[2]
18171 mem_0 := mem.Args[0]
18172 if mem_0.Op != OpOffPtr {
18173 break
18174 }
18175 tt2 := mem_0.Type
18176 o2 := auxIntToInt64(mem_0.AuxInt)
18177 p2 := mem_0.Args[0]
18178 d1 := mem.Args[1]
18179 mem_2 := mem.Args[2]
18180 if mem_2.Op != OpStore {
18181 break
18182 }
18183 t3 := auxToType(mem_2.Aux)
18184 _ = mem_2.Args[2]
18185 mem_2_0 := mem_2.Args[0]
18186 if mem_2_0.Op != OpOffPtr {
18187 break
18188 }
18189 tt3 := mem_2_0.Type
18190 o3 := auxIntToInt64(mem_2_0.AuxInt)
18191 p3 := mem_2_0.Args[0]
18192 d2 := mem_2.Args[1]
18193 mem_2_2 := mem_2.Args[2]
18194 if mem_2_2.Op != OpZero || auxIntToInt64(mem_2_2.AuxInt) != n {
18195 break
18196 }
18197 t4 := auxToType(mem_2_2.Aux)
18198 p4 := mem_2_2.Args[0]
18199 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()) {
18200 break
18201 }
18202 v.reset(OpStore)
18203 v.Aux = typeToAux(t2)
18204 v0 := b.NewValue0(v.Pos, OpOffPtr, tt2)
18205 v0.AuxInt = int64ToAuxInt(o2)
18206 v0.AddArg(dst)
18207 v1 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
18208 v1.Aux = typeToAux(t3)
18209 v2 := b.NewValue0(v.Pos, OpOffPtr, tt3)
18210 v2.AuxInt = int64ToAuxInt(o3)
18211 v2.AddArg(dst)
18212 v3 := b.NewValue0(v.Pos, OpZero, types.TypeMem)
18213 v3.AuxInt = int64ToAuxInt(n)
18214 v3.Aux = typeToAux(t1)
18215 v3.AddArg2(dst, mem)
18216 v1.AddArg3(v2, d2, v3)
18217 v.AddArg3(v0, d1, v1)
18218 return true
18219 }
18220
18221
18222
18223 for {
18224 n := auxIntToInt64(v.AuxInt)
18225 t1 := auxToType(v.Aux)
18226 dst := v_0
18227 p1 := v_1
18228 mem := v_2
18229 if mem.Op != OpStore {
18230 break
18231 }
18232 t2 := auxToType(mem.Aux)
18233 _ = mem.Args[2]
18234 mem_0 := mem.Args[0]
18235 if mem_0.Op != OpOffPtr {
18236 break
18237 }
18238 tt2 := mem_0.Type
18239 o2 := auxIntToInt64(mem_0.AuxInt)
18240 p2 := mem_0.Args[0]
18241 d1 := mem.Args[1]
18242 mem_2 := mem.Args[2]
18243 if mem_2.Op != OpStore {
18244 break
18245 }
18246 t3 := auxToType(mem_2.Aux)
18247 _ = mem_2.Args[2]
18248 mem_2_0 := mem_2.Args[0]
18249 if mem_2_0.Op != OpOffPtr {
18250 break
18251 }
18252 tt3 := mem_2_0.Type
18253 o3 := auxIntToInt64(mem_2_0.AuxInt)
18254 p3 := mem_2_0.Args[0]
18255 d2 := mem_2.Args[1]
18256 mem_2_2 := mem_2.Args[2]
18257 if mem_2_2.Op != OpStore {
18258 break
18259 }
18260 t4 := auxToType(mem_2_2.Aux)
18261 _ = mem_2_2.Args[2]
18262 mem_2_2_0 := mem_2_2.Args[0]
18263 if mem_2_2_0.Op != OpOffPtr {
18264 break
18265 }
18266 tt4 := mem_2_2_0.Type
18267 o4 := auxIntToInt64(mem_2_2_0.AuxInt)
18268 p4 := mem_2_2_0.Args[0]
18269 d3 := mem_2_2.Args[1]
18270 mem_2_2_2 := mem_2_2.Args[2]
18271 if mem_2_2_2.Op != OpZero || auxIntToInt64(mem_2_2_2.AuxInt) != n {
18272 break
18273 }
18274 t5 := auxToType(mem_2_2_2.Aux)
18275 p5 := mem_2_2_2.Args[0]
18276 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()) {
18277 break
18278 }
18279 v.reset(OpStore)
18280 v.Aux = typeToAux(t2)
18281 v0 := b.NewValue0(v.Pos, OpOffPtr, tt2)
18282 v0.AuxInt = int64ToAuxInt(o2)
18283 v0.AddArg(dst)
18284 v1 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
18285 v1.Aux = typeToAux(t3)
18286 v2 := b.NewValue0(v.Pos, OpOffPtr, tt3)
18287 v2.AuxInt = int64ToAuxInt(o3)
18288 v2.AddArg(dst)
18289 v3 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
18290 v3.Aux = typeToAux(t4)
18291 v4 := b.NewValue0(v.Pos, OpOffPtr, tt4)
18292 v4.AuxInt = int64ToAuxInt(o4)
18293 v4.AddArg(dst)
18294 v5 := b.NewValue0(v.Pos, OpZero, types.TypeMem)
18295 v5.AuxInt = int64ToAuxInt(n)
18296 v5.Aux = typeToAux(t1)
18297 v5.AddArg2(dst, mem)
18298 v3.AddArg3(v4, d3, v5)
18299 v1.AddArg3(v2, d2, v3)
18300 v.AddArg3(v0, d1, v1)
18301 return true
18302 }
18303
18304
18305
18306 for {
18307 n := auxIntToInt64(v.AuxInt)
18308 t1 := auxToType(v.Aux)
18309 dst := v_0
18310 p1 := v_1
18311 mem := v_2
18312 if mem.Op != OpStore {
18313 break
18314 }
18315 t2 := auxToType(mem.Aux)
18316 _ = mem.Args[2]
18317 mem_0 := mem.Args[0]
18318 if mem_0.Op != OpOffPtr {
18319 break
18320 }
18321 tt2 := mem_0.Type
18322 o2 := auxIntToInt64(mem_0.AuxInt)
18323 p2 := mem_0.Args[0]
18324 d1 := mem.Args[1]
18325 mem_2 := mem.Args[2]
18326 if mem_2.Op != OpStore {
18327 break
18328 }
18329 t3 := auxToType(mem_2.Aux)
18330 _ = mem_2.Args[2]
18331 mem_2_0 := mem_2.Args[0]
18332 if mem_2_0.Op != OpOffPtr {
18333 break
18334 }
18335 tt3 := mem_2_0.Type
18336 o3 := auxIntToInt64(mem_2_0.AuxInt)
18337 p3 := mem_2_0.Args[0]
18338 d2 := mem_2.Args[1]
18339 mem_2_2 := mem_2.Args[2]
18340 if mem_2_2.Op != OpStore {
18341 break
18342 }
18343 t4 := auxToType(mem_2_2.Aux)
18344 _ = mem_2_2.Args[2]
18345 mem_2_2_0 := mem_2_2.Args[0]
18346 if mem_2_2_0.Op != OpOffPtr {
18347 break
18348 }
18349 tt4 := mem_2_2_0.Type
18350 o4 := auxIntToInt64(mem_2_2_0.AuxInt)
18351 p4 := mem_2_2_0.Args[0]
18352 d3 := mem_2_2.Args[1]
18353 mem_2_2_2 := mem_2_2.Args[2]
18354 if mem_2_2_2.Op != OpStore {
18355 break
18356 }
18357 t5 := auxToType(mem_2_2_2.Aux)
18358 _ = mem_2_2_2.Args[2]
18359 mem_2_2_2_0 := mem_2_2_2.Args[0]
18360 if mem_2_2_2_0.Op != OpOffPtr {
18361 break
18362 }
18363 tt5 := mem_2_2_2_0.Type
18364 o5 := auxIntToInt64(mem_2_2_2_0.AuxInt)
18365 p5 := mem_2_2_2_0.Args[0]
18366 d4 := mem_2_2_2.Args[1]
18367 mem_2_2_2_2 := mem_2_2_2.Args[2]
18368 if mem_2_2_2_2.Op != OpZero || auxIntToInt64(mem_2_2_2_2.AuxInt) != n {
18369 break
18370 }
18371 t6 := auxToType(mem_2_2_2_2.Aux)
18372 p6 := mem_2_2_2_2.Args[0]
18373 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()) {
18374 break
18375 }
18376 v.reset(OpStore)
18377 v.Aux = typeToAux(t2)
18378 v0 := b.NewValue0(v.Pos, OpOffPtr, tt2)
18379 v0.AuxInt = int64ToAuxInt(o2)
18380 v0.AddArg(dst)
18381 v1 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
18382 v1.Aux = typeToAux(t3)
18383 v2 := b.NewValue0(v.Pos, OpOffPtr, tt3)
18384 v2.AuxInt = int64ToAuxInt(o3)
18385 v2.AddArg(dst)
18386 v3 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
18387 v3.Aux = typeToAux(t4)
18388 v4 := b.NewValue0(v.Pos, OpOffPtr, tt4)
18389 v4.AuxInt = int64ToAuxInt(o4)
18390 v4.AddArg(dst)
18391 v5 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
18392 v5.Aux = typeToAux(t5)
18393 v6 := b.NewValue0(v.Pos, OpOffPtr, tt5)
18394 v6.AuxInt = int64ToAuxInt(o5)
18395 v6.AddArg(dst)
18396 v7 := b.NewValue0(v.Pos, OpZero, types.TypeMem)
18397 v7.AuxInt = int64ToAuxInt(n)
18398 v7.Aux = typeToAux(t1)
18399 v7.AddArg2(dst, mem)
18400 v5.AddArg3(v6, d4, v7)
18401 v3.AddArg3(v4, d3, v5)
18402 v1.AddArg3(v2, d2, v3)
18403 v.AddArg3(v0, d1, v1)
18404 return true
18405 }
18406
18407
18408
18409 for {
18410 n := auxIntToInt64(v.AuxInt)
18411 t1 := auxToType(v.Aux)
18412 dst := v_0
18413 p1 := v_1
18414 mem := v_2
18415 if mem.Op != OpVarDef {
18416 break
18417 }
18418 mem_0 := mem.Args[0]
18419 if mem_0.Op != OpStore {
18420 break
18421 }
18422 t2 := auxToType(mem_0.Aux)
18423 _ = mem_0.Args[2]
18424 op2 := mem_0.Args[0]
18425 if op2.Op != OpOffPtr {
18426 break
18427 }
18428 tt2 := op2.Type
18429 o2 := auxIntToInt64(op2.AuxInt)
18430 p2 := op2.Args[0]
18431 d1 := mem_0.Args[1]
18432 mem_0_2 := mem_0.Args[2]
18433 if mem_0_2.Op != OpZero || auxIntToInt64(mem_0_2.AuxInt) != n {
18434 break
18435 }
18436 t3 := auxToType(mem_0_2.Aux)
18437 p3 := mem_0_2.Args[0]
18438 if !(isSamePtr(p1, p2) && isSamePtr(p2, p3) && t2.Alignment() <= t1.Alignment() && t3.Alignment() <= t1.Alignment() && registerizable(b, t2) && n >= o2+t2.Size()) {
18439 break
18440 }
18441 v.reset(OpStore)
18442 v.Aux = typeToAux(t2)
18443 v0 := b.NewValue0(v.Pos, OpOffPtr, tt2)
18444 v0.AuxInt = int64ToAuxInt(o2)
18445 v0.AddArg(dst)
18446 v1 := b.NewValue0(v.Pos, OpZero, types.TypeMem)
18447 v1.AuxInt = int64ToAuxInt(n)
18448 v1.Aux = typeToAux(t1)
18449 v1.AddArg2(dst, mem)
18450 v.AddArg3(v0, d1, v1)
18451 return true
18452 }
18453
18454
18455
18456 for {
18457 n := auxIntToInt64(v.AuxInt)
18458 t1 := auxToType(v.Aux)
18459 dst := v_0
18460 p1 := v_1
18461 mem := v_2
18462 if mem.Op != OpVarDef {
18463 break
18464 }
18465 mem_0 := mem.Args[0]
18466 if mem_0.Op != OpStore {
18467 break
18468 }
18469 t2 := auxToType(mem_0.Aux)
18470 _ = mem_0.Args[2]
18471 mem_0_0 := mem_0.Args[0]
18472 if mem_0_0.Op != OpOffPtr {
18473 break
18474 }
18475 tt2 := mem_0_0.Type
18476 o2 := auxIntToInt64(mem_0_0.AuxInt)
18477 p2 := mem_0_0.Args[0]
18478 d1 := mem_0.Args[1]
18479 mem_0_2 := mem_0.Args[2]
18480 if mem_0_2.Op != OpStore {
18481 break
18482 }
18483 t3 := auxToType(mem_0_2.Aux)
18484 _ = mem_0_2.Args[2]
18485 mem_0_2_0 := mem_0_2.Args[0]
18486 if mem_0_2_0.Op != OpOffPtr {
18487 break
18488 }
18489 tt3 := mem_0_2_0.Type
18490 o3 := auxIntToInt64(mem_0_2_0.AuxInt)
18491 p3 := mem_0_2_0.Args[0]
18492 d2 := mem_0_2.Args[1]
18493 mem_0_2_2 := mem_0_2.Args[2]
18494 if mem_0_2_2.Op != OpZero || auxIntToInt64(mem_0_2_2.AuxInt) != n {
18495 break
18496 }
18497 t4 := auxToType(mem_0_2_2.Aux)
18498 p4 := mem_0_2_2.Args[0]
18499 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()) {
18500 break
18501 }
18502 v.reset(OpStore)
18503 v.Aux = typeToAux(t2)
18504 v0 := b.NewValue0(v.Pos, OpOffPtr, tt2)
18505 v0.AuxInt = int64ToAuxInt(o2)
18506 v0.AddArg(dst)
18507 v1 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
18508 v1.Aux = typeToAux(t3)
18509 v2 := b.NewValue0(v.Pos, OpOffPtr, tt3)
18510 v2.AuxInt = int64ToAuxInt(o3)
18511 v2.AddArg(dst)
18512 v3 := b.NewValue0(v.Pos, OpZero, types.TypeMem)
18513 v3.AuxInt = int64ToAuxInt(n)
18514 v3.Aux = typeToAux(t1)
18515 v3.AddArg2(dst, mem)
18516 v1.AddArg3(v2, d2, v3)
18517 v.AddArg3(v0, d1, v1)
18518 return true
18519 }
18520
18521
18522
18523 for {
18524 n := auxIntToInt64(v.AuxInt)
18525 t1 := auxToType(v.Aux)
18526 dst := v_0
18527 p1 := v_1
18528 mem := v_2
18529 if mem.Op != OpVarDef {
18530 break
18531 }
18532 mem_0 := mem.Args[0]
18533 if mem_0.Op != OpStore {
18534 break
18535 }
18536 t2 := auxToType(mem_0.Aux)
18537 _ = mem_0.Args[2]
18538 mem_0_0 := mem_0.Args[0]
18539 if mem_0_0.Op != OpOffPtr {
18540 break
18541 }
18542 tt2 := mem_0_0.Type
18543 o2 := auxIntToInt64(mem_0_0.AuxInt)
18544 p2 := mem_0_0.Args[0]
18545 d1 := mem_0.Args[1]
18546 mem_0_2 := mem_0.Args[2]
18547 if mem_0_2.Op != OpStore {
18548 break
18549 }
18550 t3 := auxToType(mem_0_2.Aux)
18551 _ = mem_0_2.Args[2]
18552 mem_0_2_0 := mem_0_2.Args[0]
18553 if mem_0_2_0.Op != OpOffPtr {
18554 break
18555 }
18556 tt3 := mem_0_2_0.Type
18557 o3 := auxIntToInt64(mem_0_2_0.AuxInt)
18558 p3 := mem_0_2_0.Args[0]
18559 d2 := mem_0_2.Args[1]
18560 mem_0_2_2 := mem_0_2.Args[2]
18561 if mem_0_2_2.Op != OpStore {
18562 break
18563 }
18564 t4 := auxToType(mem_0_2_2.Aux)
18565 _ = mem_0_2_2.Args[2]
18566 mem_0_2_2_0 := mem_0_2_2.Args[0]
18567 if mem_0_2_2_0.Op != OpOffPtr {
18568 break
18569 }
18570 tt4 := mem_0_2_2_0.Type
18571 o4 := auxIntToInt64(mem_0_2_2_0.AuxInt)
18572 p4 := mem_0_2_2_0.Args[0]
18573 d3 := mem_0_2_2.Args[1]
18574 mem_0_2_2_2 := mem_0_2_2.Args[2]
18575 if mem_0_2_2_2.Op != OpZero || auxIntToInt64(mem_0_2_2_2.AuxInt) != n {
18576 break
18577 }
18578 t5 := auxToType(mem_0_2_2_2.Aux)
18579 p5 := mem_0_2_2_2.Args[0]
18580 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()) {
18581 break
18582 }
18583 v.reset(OpStore)
18584 v.Aux = typeToAux(t2)
18585 v0 := b.NewValue0(v.Pos, OpOffPtr, tt2)
18586 v0.AuxInt = int64ToAuxInt(o2)
18587 v0.AddArg(dst)
18588 v1 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
18589 v1.Aux = typeToAux(t3)
18590 v2 := b.NewValue0(v.Pos, OpOffPtr, tt3)
18591 v2.AuxInt = int64ToAuxInt(o3)
18592 v2.AddArg(dst)
18593 v3 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
18594 v3.Aux = typeToAux(t4)
18595 v4 := b.NewValue0(v.Pos, OpOffPtr, tt4)
18596 v4.AuxInt = int64ToAuxInt(o4)
18597 v4.AddArg(dst)
18598 v5 := b.NewValue0(v.Pos, OpZero, types.TypeMem)
18599 v5.AuxInt = int64ToAuxInt(n)
18600 v5.Aux = typeToAux(t1)
18601 v5.AddArg2(dst, mem)
18602 v3.AddArg3(v4, d3, v5)
18603 v1.AddArg3(v2, d2, v3)
18604 v.AddArg3(v0, d1, v1)
18605 return true
18606 }
18607
18608
18609
18610 for {
18611 n := auxIntToInt64(v.AuxInt)
18612 t1 := auxToType(v.Aux)
18613 dst := v_0
18614 p1 := v_1
18615 mem := v_2
18616 if mem.Op != OpVarDef {
18617 break
18618 }
18619 mem_0 := mem.Args[0]
18620 if mem_0.Op != OpStore {
18621 break
18622 }
18623 t2 := auxToType(mem_0.Aux)
18624 _ = mem_0.Args[2]
18625 mem_0_0 := mem_0.Args[0]
18626 if mem_0_0.Op != OpOffPtr {
18627 break
18628 }
18629 tt2 := mem_0_0.Type
18630 o2 := auxIntToInt64(mem_0_0.AuxInt)
18631 p2 := mem_0_0.Args[0]
18632 d1 := mem_0.Args[1]
18633 mem_0_2 := mem_0.Args[2]
18634 if mem_0_2.Op != OpStore {
18635 break
18636 }
18637 t3 := auxToType(mem_0_2.Aux)
18638 _ = mem_0_2.Args[2]
18639 mem_0_2_0 := mem_0_2.Args[0]
18640 if mem_0_2_0.Op != OpOffPtr {
18641 break
18642 }
18643 tt3 := mem_0_2_0.Type
18644 o3 := auxIntToInt64(mem_0_2_0.AuxInt)
18645 p3 := mem_0_2_0.Args[0]
18646 d2 := mem_0_2.Args[1]
18647 mem_0_2_2 := mem_0_2.Args[2]
18648 if mem_0_2_2.Op != OpStore {
18649 break
18650 }
18651 t4 := auxToType(mem_0_2_2.Aux)
18652 _ = mem_0_2_2.Args[2]
18653 mem_0_2_2_0 := mem_0_2_2.Args[0]
18654 if mem_0_2_2_0.Op != OpOffPtr {
18655 break
18656 }
18657 tt4 := mem_0_2_2_0.Type
18658 o4 := auxIntToInt64(mem_0_2_2_0.AuxInt)
18659 p4 := mem_0_2_2_0.Args[0]
18660 d3 := mem_0_2_2.Args[1]
18661 mem_0_2_2_2 := mem_0_2_2.Args[2]
18662 if mem_0_2_2_2.Op != OpStore {
18663 break
18664 }
18665 t5 := auxToType(mem_0_2_2_2.Aux)
18666 _ = mem_0_2_2_2.Args[2]
18667 mem_0_2_2_2_0 := mem_0_2_2_2.Args[0]
18668 if mem_0_2_2_2_0.Op != OpOffPtr {
18669 break
18670 }
18671 tt5 := mem_0_2_2_2_0.Type
18672 o5 := auxIntToInt64(mem_0_2_2_2_0.AuxInt)
18673 p5 := mem_0_2_2_2_0.Args[0]
18674 d4 := mem_0_2_2_2.Args[1]
18675 mem_0_2_2_2_2 := mem_0_2_2_2.Args[2]
18676 if mem_0_2_2_2_2.Op != OpZero || auxIntToInt64(mem_0_2_2_2_2.AuxInt) != n {
18677 break
18678 }
18679 t6 := auxToType(mem_0_2_2_2_2.Aux)
18680 p6 := mem_0_2_2_2_2.Args[0]
18681 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()) {
18682 break
18683 }
18684 v.reset(OpStore)
18685 v.Aux = typeToAux(t2)
18686 v0 := b.NewValue0(v.Pos, OpOffPtr, tt2)
18687 v0.AuxInt = int64ToAuxInt(o2)
18688 v0.AddArg(dst)
18689 v1 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
18690 v1.Aux = typeToAux(t3)
18691 v2 := b.NewValue0(v.Pos, OpOffPtr, tt3)
18692 v2.AuxInt = int64ToAuxInt(o3)
18693 v2.AddArg(dst)
18694 v3 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
18695 v3.Aux = typeToAux(t4)
18696 v4 := b.NewValue0(v.Pos, OpOffPtr, tt4)
18697 v4.AuxInt = int64ToAuxInt(o4)
18698 v4.AddArg(dst)
18699 v5 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
18700 v5.Aux = typeToAux(t5)
18701 v6 := b.NewValue0(v.Pos, OpOffPtr, tt5)
18702 v6.AuxInt = int64ToAuxInt(o5)
18703 v6.AddArg(dst)
18704 v7 := b.NewValue0(v.Pos, OpZero, types.TypeMem)
18705 v7.AuxInt = int64ToAuxInt(n)
18706 v7.Aux = typeToAux(t1)
18707 v7.AddArg2(dst, mem)
18708 v5.AddArg3(v6, d4, v7)
18709 v3.AddArg3(v4, d3, v5)
18710 v1.AddArg3(v2, d2, v3)
18711 v.AddArg3(v0, d1, v1)
18712 return true
18713 }
18714
18715
18716
18717 for {
18718 s := auxIntToInt64(v.AuxInt)
18719 t1 := auxToType(v.Aux)
18720 dst := v_0
18721 tmp1 := v_1
18722 midmem := v_2
18723 if midmem.Op != OpMove || auxIntToInt64(midmem.AuxInt) != s {
18724 break
18725 }
18726 t2 := auxToType(midmem.Aux)
18727 src := midmem.Args[1]
18728 tmp2 := midmem.Args[0]
18729 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))) {
18730 break
18731 }
18732 v.reset(OpMove)
18733 v.AuxInt = int64ToAuxInt(s)
18734 v.Aux = typeToAux(t1)
18735 v.AddArg3(dst, src, midmem)
18736 return true
18737 }
18738
18739
18740
18741 for {
18742 s := auxIntToInt64(v.AuxInt)
18743 t1 := auxToType(v.Aux)
18744 dst := v_0
18745 tmp1 := v_1
18746 midmem := v_2
18747 if midmem.Op != OpVarDef {
18748 break
18749 }
18750 midmem_0 := midmem.Args[0]
18751 if midmem_0.Op != OpMove || auxIntToInt64(midmem_0.AuxInt) != s {
18752 break
18753 }
18754 t2 := auxToType(midmem_0.Aux)
18755 src := midmem_0.Args[1]
18756 tmp2 := midmem_0.Args[0]
18757 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))) {
18758 break
18759 }
18760 v.reset(OpMove)
18761 v.AuxInt = int64ToAuxInt(s)
18762 v.Aux = typeToAux(t1)
18763 v.AddArg3(dst, src, midmem)
18764 return true
18765 }
18766
18767
18768
18769 for {
18770 dst := v_0
18771 src := v_1
18772 mem := v_2
18773 if !(isSamePtr(dst, src)) {
18774 break
18775 }
18776 v.copyOf(mem)
18777 return true
18778 }
18779 return false
18780 }
18781 func rewriteValuegeneric_OpMul16(v *Value) bool {
18782 v_1 := v.Args[1]
18783 v_0 := v.Args[0]
18784 b := v.Block
18785 typ := &b.Func.Config.Types
18786
18787
18788 for {
18789 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18790 if v_0.Op != OpConst16 {
18791 continue
18792 }
18793 c := auxIntToInt16(v_0.AuxInt)
18794 if v_1.Op != OpConst16 {
18795 continue
18796 }
18797 d := auxIntToInt16(v_1.AuxInt)
18798 v.reset(OpConst16)
18799 v.AuxInt = int16ToAuxInt(c * d)
18800 return true
18801 }
18802 break
18803 }
18804
18805
18806 for {
18807 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18808 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 1 {
18809 continue
18810 }
18811 x := v_1
18812 v.copyOf(x)
18813 return true
18814 }
18815 break
18816 }
18817
18818
18819 for {
18820 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18821 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != -1 {
18822 continue
18823 }
18824 x := v_1
18825 v.reset(OpNeg16)
18826 v.AddArg(x)
18827 return true
18828 }
18829 break
18830 }
18831
18832
18833
18834 for {
18835 t := v.Type
18836 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18837 n := v_0
18838 if v_1.Op != OpConst16 {
18839 continue
18840 }
18841 c := auxIntToInt16(v_1.AuxInt)
18842 if !(isPowerOfTwo(c)) {
18843 continue
18844 }
18845 v.reset(OpLsh16x64)
18846 v.Type = t
18847 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
18848 v0.AuxInt = int64ToAuxInt(log16(c))
18849 v.AddArg2(n, v0)
18850 return true
18851 }
18852 break
18853 }
18854
18855
18856
18857 for {
18858 t := v.Type
18859 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18860 n := v_0
18861 if v_1.Op != OpConst16 {
18862 continue
18863 }
18864 c := auxIntToInt16(v_1.AuxInt)
18865 if !(t.IsSigned() && isPowerOfTwo(-c)) {
18866 continue
18867 }
18868 v.reset(OpNeg16)
18869 v0 := b.NewValue0(v.Pos, OpLsh16x64, t)
18870 v1 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
18871 v1.AuxInt = int64ToAuxInt(log16(-c))
18872 v0.AddArg2(n, v1)
18873 v.AddArg(v0)
18874 return true
18875 }
18876 break
18877 }
18878
18879
18880 for {
18881 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18882 if v_0.Op != OpConst16 {
18883 continue
18884 }
18885 t := v_0.Type
18886 c := auxIntToInt16(v_0.AuxInt)
18887 if v_1.Op != OpAdd16 || v_1.Type != t {
18888 continue
18889 }
18890 _ = v_1.Args[1]
18891 v_1_0 := v_1.Args[0]
18892 v_1_1 := v_1.Args[1]
18893 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
18894 if v_1_0.Op != OpConst16 || v_1_0.Type != t {
18895 continue
18896 }
18897 d := auxIntToInt16(v_1_0.AuxInt)
18898 x := v_1_1
18899 v.reset(OpAdd16)
18900 v0 := b.NewValue0(v.Pos, OpConst16, t)
18901 v0.AuxInt = int16ToAuxInt(c * d)
18902 v1 := b.NewValue0(v.Pos, OpMul16, t)
18903 v2 := b.NewValue0(v.Pos, OpConst16, t)
18904 v2.AuxInt = int16ToAuxInt(c)
18905 v1.AddArg2(v2, x)
18906 v.AddArg2(v0, v1)
18907 return true
18908 }
18909 }
18910 break
18911 }
18912
18913
18914 for {
18915 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18916 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 {
18917 continue
18918 }
18919 v.reset(OpConst16)
18920 v.AuxInt = int16ToAuxInt(0)
18921 return true
18922 }
18923 break
18924 }
18925
18926
18927
18928 for {
18929 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18930 if v_0.Op != OpMul16 {
18931 continue
18932 }
18933 _ = v_0.Args[1]
18934 v_0_0 := v_0.Args[0]
18935 v_0_1 := v_0.Args[1]
18936 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
18937 i := v_0_0
18938 if i.Op != OpConst16 {
18939 continue
18940 }
18941 t := i.Type
18942 z := v_0_1
18943 x := v_1
18944 if !(z.Op != OpConst16 && x.Op != OpConst16) {
18945 continue
18946 }
18947 v.reset(OpMul16)
18948 v0 := b.NewValue0(v.Pos, OpMul16, t)
18949 v0.AddArg2(x, z)
18950 v.AddArg2(i, v0)
18951 return true
18952 }
18953 }
18954 break
18955 }
18956
18957
18958 for {
18959 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18960 if v_0.Op != OpConst16 {
18961 continue
18962 }
18963 t := v_0.Type
18964 c := auxIntToInt16(v_0.AuxInt)
18965 if v_1.Op != OpMul16 {
18966 continue
18967 }
18968 _ = v_1.Args[1]
18969 v_1_0 := v_1.Args[0]
18970 v_1_1 := v_1.Args[1]
18971 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
18972 if v_1_0.Op != OpConst16 || v_1_0.Type != t {
18973 continue
18974 }
18975 d := auxIntToInt16(v_1_0.AuxInt)
18976 x := v_1_1
18977 v.reset(OpMul16)
18978 v0 := b.NewValue0(v.Pos, OpConst16, t)
18979 v0.AuxInt = int16ToAuxInt(c * d)
18980 v.AddArg2(v0, x)
18981 return true
18982 }
18983 }
18984 break
18985 }
18986 return false
18987 }
18988 func rewriteValuegeneric_OpMul32(v *Value) bool {
18989 v_1 := v.Args[1]
18990 v_0 := v.Args[0]
18991 b := v.Block
18992 typ := &b.Func.Config.Types
18993
18994
18995 for {
18996 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18997 if v_0.Op != OpConst32 {
18998 continue
18999 }
19000 c := auxIntToInt32(v_0.AuxInt)
19001 if v_1.Op != OpConst32 {
19002 continue
19003 }
19004 d := auxIntToInt32(v_1.AuxInt)
19005 v.reset(OpConst32)
19006 v.AuxInt = int32ToAuxInt(c * d)
19007 return true
19008 }
19009 break
19010 }
19011
19012
19013 for {
19014 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19015 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 1 {
19016 continue
19017 }
19018 x := v_1
19019 v.copyOf(x)
19020 return true
19021 }
19022 break
19023 }
19024
19025
19026 for {
19027 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19028 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != -1 {
19029 continue
19030 }
19031 x := v_1
19032 v.reset(OpNeg32)
19033 v.AddArg(x)
19034 return true
19035 }
19036 break
19037 }
19038
19039
19040
19041 for {
19042 t := v.Type
19043 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19044 n := v_0
19045 if v_1.Op != OpConst32 {
19046 continue
19047 }
19048 c := auxIntToInt32(v_1.AuxInt)
19049 if !(isPowerOfTwo(c)) {
19050 continue
19051 }
19052 v.reset(OpLsh32x64)
19053 v.Type = t
19054 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
19055 v0.AuxInt = int64ToAuxInt(log32(c))
19056 v.AddArg2(n, v0)
19057 return true
19058 }
19059 break
19060 }
19061
19062
19063
19064 for {
19065 t := v.Type
19066 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19067 n := v_0
19068 if v_1.Op != OpConst32 {
19069 continue
19070 }
19071 c := auxIntToInt32(v_1.AuxInt)
19072 if !(t.IsSigned() && isPowerOfTwo(-c)) {
19073 continue
19074 }
19075 v.reset(OpNeg32)
19076 v0 := b.NewValue0(v.Pos, OpLsh32x64, t)
19077 v1 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
19078 v1.AuxInt = int64ToAuxInt(log32(-c))
19079 v0.AddArg2(n, v1)
19080 v.AddArg(v0)
19081 return true
19082 }
19083 break
19084 }
19085
19086
19087 for {
19088 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19089 if v_0.Op != OpConst32 {
19090 continue
19091 }
19092 t := v_0.Type
19093 c := auxIntToInt32(v_0.AuxInt)
19094 if v_1.Op != OpAdd32 || v_1.Type != t {
19095 continue
19096 }
19097 _ = v_1.Args[1]
19098 v_1_0 := v_1.Args[0]
19099 v_1_1 := v_1.Args[1]
19100 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
19101 if v_1_0.Op != OpConst32 || v_1_0.Type != t {
19102 continue
19103 }
19104 d := auxIntToInt32(v_1_0.AuxInt)
19105 x := v_1_1
19106 v.reset(OpAdd32)
19107 v0 := b.NewValue0(v.Pos, OpConst32, t)
19108 v0.AuxInt = int32ToAuxInt(c * d)
19109 v1 := b.NewValue0(v.Pos, OpMul32, t)
19110 v2 := b.NewValue0(v.Pos, OpConst32, t)
19111 v2.AuxInt = int32ToAuxInt(c)
19112 v1.AddArg2(v2, x)
19113 v.AddArg2(v0, v1)
19114 return true
19115 }
19116 }
19117 break
19118 }
19119
19120
19121 for {
19122 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19123 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
19124 continue
19125 }
19126 v.reset(OpConst32)
19127 v.AuxInt = int32ToAuxInt(0)
19128 return true
19129 }
19130 break
19131 }
19132
19133
19134
19135 for {
19136 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19137 if v_0.Op != OpMul32 {
19138 continue
19139 }
19140 _ = v_0.Args[1]
19141 v_0_0 := v_0.Args[0]
19142 v_0_1 := v_0.Args[1]
19143 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
19144 i := v_0_0
19145 if i.Op != OpConst32 {
19146 continue
19147 }
19148 t := i.Type
19149 z := v_0_1
19150 x := v_1
19151 if !(z.Op != OpConst32 && x.Op != OpConst32) {
19152 continue
19153 }
19154 v.reset(OpMul32)
19155 v0 := b.NewValue0(v.Pos, OpMul32, t)
19156 v0.AddArg2(x, z)
19157 v.AddArg2(i, v0)
19158 return true
19159 }
19160 }
19161 break
19162 }
19163
19164
19165 for {
19166 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19167 if v_0.Op != OpConst32 {
19168 continue
19169 }
19170 t := v_0.Type
19171 c := auxIntToInt32(v_0.AuxInt)
19172 if v_1.Op != OpMul32 {
19173 continue
19174 }
19175 _ = v_1.Args[1]
19176 v_1_0 := v_1.Args[0]
19177 v_1_1 := v_1.Args[1]
19178 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
19179 if v_1_0.Op != OpConst32 || v_1_0.Type != t {
19180 continue
19181 }
19182 d := auxIntToInt32(v_1_0.AuxInt)
19183 x := v_1_1
19184 v.reset(OpMul32)
19185 v0 := b.NewValue0(v.Pos, OpConst32, t)
19186 v0.AuxInt = int32ToAuxInt(c * d)
19187 v.AddArg2(v0, x)
19188 return true
19189 }
19190 }
19191 break
19192 }
19193 return false
19194 }
19195 func rewriteValuegeneric_OpMul32F(v *Value) bool {
19196 v_1 := v.Args[1]
19197 v_0 := v.Args[0]
19198
19199
19200
19201 for {
19202 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19203 if v_0.Op != OpConst32F {
19204 continue
19205 }
19206 c := auxIntToFloat32(v_0.AuxInt)
19207 if v_1.Op != OpConst32F {
19208 continue
19209 }
19210 d := auxIntToFloat32(v_1.AuxInt)
19211 if !(c*d == c*d) {
19212 continue
19213 }
19214 v.reset(OpConst32F)
19215 v.AuxInt = float32ToAuxInt(c * d)
19216 return true
19217 }
19218 break
19219 }
19220
19221
19222 for {
19223 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19224 x := v_0
19225 if v_1.Op != OpConst32F || auxIntToFloat32(v_1.AuxInt) != 1 {
19226 continue
19227 }
19228 v.copyOf(x)
19229 return true
19230 }
19231 break
19232 }
19233
19234
19235 for {
19236 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19237 x := v_0
19238 if v_1.Op != OpConst32F || auxIntToFloat32(v_1.AuxInt) != -1 {
19239 continue
19240 }
19241 v.reset(OpNeg32F)
19242 v.AddArg(x)
19243 return true
19244 }
19245 break
19246 }
19247
19248
19249 for {
19250 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19251 x := v_0
19252 if v_1.Op != OpConst32F || auxIntToFloat32(v_1.AuxInt) != 2 {
19253 continue
19254 }
19255 v.reset(OpAdd32F)
19256 v.AddArg2(x, x)
19257 return true
19258 }
19259 break
19260 }
19261 return false
19262 }
19263 func rewriteValuegeneric_OpMul32uhilo(v *Value) bool {
19264 v_1 := v.Args[1]
19265 v_0 := v.Args[0]
19266 b := v.Block
19267 typ := &b.Func.Config.Types
19268
19269
19270 for {
19271 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19272 if v_0.Op != OpConst32 {
19273 continue
19274 }
19275 c := auxIntToInt32(v_0.AuxInt)
19276 if v_1.Op != OpConst32 {
19277 continue
19278 }
19279 d := auxIntToInt32(v_1.AuxInt)
19280 v.reset(OpMakeTuple)
19281 v0 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
19282 v0.AuxInt = int32ToAuxInt(bitsMulU32(c, d).hi)
19283 v1 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
19284 v1.AuxInt = int32ToAuxInt(bitsMulU32(c, d).lo)
19285 v.AddArg2(v0, v1)
19286 return true
19287 }
19288 break
19289 }
19290 return false
19291 }
19292 func rewriteValuegeneric_OpMul32uover(v *Value) bool {
19293 v_1 := v.Args[1]
19294 v_0 := v.Args[0]
19295 b := v.Block
19296 typ := &b.Func.Config.Types
19297
19298
19299 for {
19300 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19301 if v_0.Op != OpConst32 {
19302 continue
19303 }
19304 c := auxIntToInt32(v_0.AuxInt)
19305 if v_1.Op != OpConst32 {
19306 continue
19307 }
19308 d := auxIntToInt32(v_1.AuxInt)
19309 v.reset(OpMakeTuple)
19310 v0 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
19311 v0.AuxInt = int32ToAuxInt(bitsMulU32(c, d).lo)
19312 v1 := b.NewValue0(v.Pos, OpConstBool, typ.Bool)
19313 v1.AuxInt = boolToAuxInt(bitsMulU32(c, d).hi != 0)
19314 v.AddArg2(v0, v1)
19315 return true
19316 }
19317 break
19318 }
19319
19320
19321 for {
19322 t := v.Type
19323 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19324 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 1 {
19325 continue
19326 }
19327 x := v_1
19328 v.reset(OpMakeTuple)
19329 v0 := b.NewValue0(v.Pos, OpConstBool, t.FieldType(1))
19330 v0.AuxInt = boolToAuxInt(false)
19331 v.AddArg2(x, v0)
19332 return true
19333 }
19334 break
19335 }
19336
19337
19338 for {
19339 t := v.Type
19340 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19341 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
19342 continue
19343 }
19344 v.reset(OpMakeTuple)
19345 v0 := b.NewValue0(v.Pos, OpConst32, t.FieldType(0))
19346 v0.AuxInt = int32ToAuxInt(0)
19347 v1 := b.NewValue0(v.Pos, OpConstBool, t.FieldType(1))
19348 v1.AuxInt = boolToAuxInt(false)
19349 v.AddArg2(v0, v1)
19350 return true
19351 }
19352 break
19353 }
19354 return false
19355 }
19356 func rewriteValuegeneric_OpMul64(v *Value) bool {
19357 v_1 := v.Args[1]
19358 v_0 := v.Args[0]
19359 b := v.Block
19360 typ := &b.Func.Config.Types
19361
19362
19363 for {
19364 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19365 if v_0.Op != OpConst64 {
19366 continue
19367 }
19368 c := auxIntToInt64(v_0.AuxInt)
19369 if v_1.Op != OpConst64 {
19370 continue
19371 }
19372 d := auxIntToInt64(v_1.AuxInt)
19373 v.reset(OpConst64)
19374 v.AuxInt = int64ToAuxInt(c * d)
19375 return true
19376 }
19377 break
19378 }
19379
19380
19381 for {
19382 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19383 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 1 {
19384 continue
19385 }
19386 x := v_1
19387 v.copyOf(x)
19388 return true
19389 }
19390 break
19391 }
19392
19393
19394 for {
19395 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19396 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != -1 {
19397 continue
19398 }
19399 x := v_1
19400 v.reset(OpNeg64)
19401 v.AddArg(x)
19402 return true
19403 }
19404 break
19405 }
19406
19407
19408
19409 for {
19410 t := v.Type
19411 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19412 n := v_0
19413 if v_1.Op != OpConst64 {
19414 continue
19415 }
19416 c := auxIntToInt64(v_1.AuxInt)
19417 if !(isPowerOfTwo(c)) {
19418 continue
19419 }
19420 v.reset(OpLsh64x64)
19421 v.Type = t
19422 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
19423 v0.AuxInt = int64ToAuxInt(log64(c))
19424 v.AddArg2(n, v0)
19425 return true
19426 }
19427 break
19428 }
19429
19430
19431
19432 for {
19433 t := v.Type
19434 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19435 n := v_0
19436 if v_1.Op != OpConst64 {
19437 continue
19438 }
19439 c := auxIntToInt64(v_1.AuxInt)
19440 if !(t.IsSigned() && isPowerOfTwo(-c)) {
19441 continue
19442 }
19443 v.reset(OpNeg64)
19444 v0 := b.NewValue0(v.Pos, OpLsh64x64, t)
19445 v1 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
19446 v1.AuxInt = int64ToAuxInt(log64(-c))
19447 v0.AddArg2(n, v1)
19448 v.AddArg(v0)
19449 return true
19450 }
19451 break
19452 }
19453
19454
19455 for {
19456 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19457 if v_0.Op != OpConst64 {
19458 continue
19459 }
19460 t := v_0.Type
19461 c := auxIntToInt64(v_0.AuxInt)
19462 if v_1.Op != OpAdd64 || v_1.Type != t {
19463 continue
19464 }
19465 _ = v_1.Args[1]
19466 v_1_0 := v_1.Args[0]
19467 v_1_1 := v_1.Args[1]
19468 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
19469 if v_1_0.Op != OpConst64 || v_1_0.Type != t {
19470 continue
19471 }
19472 d := auxIntToInt64(v_1_0.AuxInt)
19473 x := v_1_1
19474 v.reset(OpAdd64)
19475 v0 := b.NewValue0(v.Pos, OpConst64, t)
19476 v0.AuxInt = int64ToAuxInt(c * d)
19477 v1 := b.NewValue0(v.Pos, OpMul64, t)
19478 v2 := b.NewValue0(v.Pos, OpConst64, t)
19479 v2.AuxInt = int64ToAuxInt(c)
19480 v1.AddArg2(v2, x)
19481 v.AddArg2(v0, v1)
19482 return true
19483 }
19484 }
19485 break
19486 }
19487
19488
19489 for {
19490 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19491 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
19492 continue
19493 }
19494 v.reset(OpConst64)
19495 v.AuxInt = int64ToAuxInt(0)
19496 return true
19497 }
19498 break
19499 }
19500
19501
19502
19503 for {
19504 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19505 if v_0.Op != OpMul64 {
19506 continue
19507 }
19508 _ = v_0.Args[1]
19509 v_0_0 := v_0.Args[0]
19510 v_0_1 := v_0.Args[1]
19511 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
19512 i := v_0_0
19513 if i.Op != OpConst64 {
19514 continue
19515 }
19516 t := i.Type
19517 z := v_0_1
19518 x := v_1
19519 if !(z.Op != OpConst64 && x.Op != OpConst64) {
19520 continue
19521 }
19522 v.reset(OpMul64)
19523 v0 := b.NewValue0(v.Pos, OpMul64, t)
19524 v0.AddArg2(x, z)
19525 v.AddArg2(i, v0)
19526 return true
19527 }
19528 }
19529 break
19530 }
19531
19532
19533 for {
19534 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19535 if v_0.Op != OpConst64 {
19536 continue
19537 }
19538 t := v_0.Type
19539 c := auxIntToInt64(v_0.AuxInt)
19540 if v_1.Op != OpMul64 {
19541 continue
19542 }
19543 _ = v_1.Args[1]
19544 v_1_0 := v_1.Args[0]
19545 v_1_1 := v_1.Args[1]
19546 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
19547 if v_1_0.Op != OpConst64 || v_1_0.Type != t {
19548 continue
19549 }
19550 d := auxIntToInt64(v_1_0.AuxInt)
19551 x := v_1_1
19552 v.reset(OpMul64)
19553 v0 := b.NewValue0(v.Pos, OpConst64, t)
19554 v0.AuxInt = int64ToAuxInt(c * d)
19555 v.AddArg2(v0, x)
19556 return true
19557 }
19558 }
19559 break
19560 }
19561 return false
19562 }
19563 func rewriteValuegeneric_OpMul64F(v *Value) bool {
19564 v_1 := v.Args[1]
19565 v_0 := v.Args[0]
19566
19567
19568
19569 for {
19570 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19571 if v_0.Op != OpConst64F {
19572 continue
19573 }
19574 c := auxIntToFloat64(v_0.AuxInt)
19575 if v_1.Op != OpConst64F {
19576 continue
19577 }
19578 d := auxIntToFloat64(v_1.AuxInt)
19579 if !(c*d == c*d) {
19580 continue
19581 }
19582 v.reset(OpConst64F)
19583 v.AuxInt = float64ToAuxInt(c * d)
19584 return true
19585 }
19586 break
19587 }
19588
19589
19590 for {
19591 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19592 x := v_0
19593 if v_1.Op != OpConst64F || auxIntToFloat64(v_1.AuxInt) != 1 {
19594 continue
19595 }
19596 v.copyOf(x)
19597 return true
19598 }
19599 break
19600 }
19601
19602
19603 for {
19604 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19605 x := v_0
19606 if v_1.Op != OpConst64F || auxIntToFloat64(v_1.AuxInt) != -1 {
19607 continue
19608 }
19609 v.reset(OpNeg64F)
19610 v.AddArg(x)
19611 return true
19612 }
19613 break
19614 }
19615
19616
19617 for {
19618 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19619 x := v_0
19620 if v_1.Op != OpConst64F || auxIntToFloat64(v_1.AuxInt) != 2 {
19621 continue
19622 }
19623 v.reset(OpAdd64F)
19624 v.AddArg2(x, x)
19625 return true
19626 }
19627 break
19628 }
19629 return false
19630 }
19631 func rewriteValuegeneric_OpMul64uhilo(v *Value) bool {
19632 v_1 := v.Args[1]
19633 v_0 := v.Args[0]
19634 b := v.Block
19635 typ := &b.Func.Config.Types
19636
19637
19638 for {
19639 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19640 if v_0.Op != OpConst64 {
19641 continue
19642 }
19643 c := auxIntToInt64(v_0.AuxInt)
19644 if v_1.Op != OpConst64 {
19645 continue
19646 }
19647 d := auxIntToInt64(v_1.AuxInt)
19648 v.reset(OpMakeTuple)
19649 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
19650 v0.AuxInt = int64ToAuxInt(bitsMulU64(c, d).hi)
19651 v1 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
19652 v1.AuxInt = int64ToAuxInt(bitsMulU64(c, d).lo)
19653 v.AddArg2(v0, v1)
19654 return true
19655 }
19656 break
19657 }
19658 return false
19659 }
19660 func rewriteValuegeneric_OpMul64uover(v *Value) bool {
19661 v_1 := v.Args[1]
19662 v_0 := v.Args[0]
19663 b := v.Block
19664 typ := &b.Func.Config.Types
19665
19666
19667 for {
19668 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19669 if v_0.Op != OpConst64 {
19670 continue
19671 }
19672 c := auxIntToInt64(v_0.AuxInt)
19673 if v_1.Op != OpConst64 {
19674 continue
19675 }
19676 d := auxIntToInt64(v_1.AuxInt)
19677 v.reset(OpMakeTuple)
19678 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
19679 v0.AuxInt = int64ToAuxInt(bitsMulU64(c, d).lo)
19680 v1 := b.NewValue0(v.Pos, OpConstBool, typ.Bool)
19681 v1.AuxInt = boolToAuxInt(bitsMulU64(c, d).hi != 0)
19682 v.AddArg2(v0, v1)
19683 return true
19684 }
19685 break
19686 }
19687
19688
19689 for {
19690 t := v.Type
19691 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19692 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 1 {
19693 continue
19694 }
19695 x := v_1
19696 v.reset(OpMakeTuple)
19697 v0 := b.NewValue0(v.Pos, OpConstBool, t.FieldType(1))
19698 v0.AuxInt = boolToAuxInt(false)
19699 v.AddArg2(x, v0)
19700 return true
19701 }
19702 break
19703 }
19704
19705
19706 for {
19707 t := v.Type
19708 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19709 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
19710 continue
19711 }
19712 v.reset(OpMakeTuple)
19713 v0 := b.NewValue0(v.Pos, OpConst64, t.FieldType(0))
19714 v0.AuxInt = int64ToAuxInt(0)
19715 v1 := b.NewValue0(v.Pos, OpConstBool, t.FieldType(1))
19716 v1.AuxInt = boolToAuxInt(false)
19717 v.AddArg2(v0, v1)
19718 return true
19719 }
19720 break
19721 }
19722 return false
19723 }
19724 func rewriteValuegeneric_OpMul8(v *Value) bool {
19725 v_1 := v.Args[1]
19726 v_0 := v.Args[0]
19727 b := v.Block
19728 typ := &b.Func.Config.Types
19729
19730
19731 for {
19732 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19733 if v_0.Op != OpConst8 {
19734 continue
19735 }
19736 c := auxIntToInt8(v_0.AuxInt)
19737 if v_1.Op != OpConst8 {
19738 continue
19739 }
19740 d := auxIntToInt8(v_1.AuxInt)
19741 v.reset(OpConst8)
19742 v.AuxInt = int8ToAuxInt(c * d)
19743 return true
19744 }
19745 break
19746 }
19747
19748
19749 for {
19750 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19751 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 1 {
19752 continue
19753 }
19754 x := v_1
19755 v.copyOf(x)
19756 return true
19757 }
19758 break
19759 }
19760
19761
19762 for {
19763 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19764 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != -1 {
19765 continue
19766 }
19767 x := v_1
19768 v.reset(OpNeg8)
19769 v.AddArg(x)
19770 return true
19771 }
19772 break
19773 }
19774
19775
19776
19777 for {
19778 t := v.Type
19779 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19780 n := v_0
19781 if v_1.Op != OpConst8 {
19782 continue
19783 }
19784 c := auxIntToInt8(v_1.AuxInt)
19785 if !(isPowerOfTwo(c)) {
19786 continue
19787 }
19788 v.reset(OpLsh8x64)
19789 v.Type = t
19790 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
19791 v0.AuxInt = int64ToAuxInt(log8(c))
19792 v.AddArg2(n, v0)
19793 return true
19794 }
19795 break
19796 }
19797
19798
19799
19800 for {
19801 t := v.Type
19802 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19803 n := v_0
19804 if v_1.Op != OpConst8 {
19805 continue
19806 }
19807 c := auxIntToInt8(v_1.AuxInt)
19808 if !(t.IsSigned() && isPowerOfTwo(-c)) {
19809 continue
19810 }
19811 v.reset(OpNeg8)
19812 v0 := b.NewValue0(v.Pos, OpLsh8x64, t)
19813 v1 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
19814 v1.AuxInt = int64ToAuxInt(log8(-c))
19815 v0.AddArg2(n, v1)
19816 v.AddArg(v0)
19817 return true
19818 }
19819 break
19820 }
19821
19822
19823 for {
19824 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19825 if v_0.Op != OpConst8 {
19826 continue
19827 }
19828 t := v_0.Type
19829 c := auxIntToInt8(v_0.AuxInt)
19830 if v_1.Op != OpAdd8 || v_1.Type != t {
19831 continue
19832 }
19833 _ = v_1.Args[1]
19834 v_1_0 := v_1.Args[0]
19835 v_1_1 := v_1.Args[1]
19836 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
19837 if v_1_0.Op != OpConst8 || v_1_0.Type != t {
19838 continue
19839 }
19840 d := auxIntToInt8(v_1_0.AuxInt)
19841 x := v_1_1
19842 v.reset(OpAdd8)
19843 v0 := b.NewValue0(v.Pos, OpConst8, t)
19844 v0.AuxInt = int8ToAuxInt(c * d)
19845 v1 := b.NewValue0(v.Pos, OpMul8, t)
19846 v2 := b.NewValue0(v.Pos, OpConst8, t)
19847 v2.AuxInt = int8ToAuxInt(c)
19848 v1.AddArg2(v2, x)
19849 v.AddArg2(v0, v1)
19850 return true
19851 }
19852 }
19853 break
19854 }
19855
19856
19857 for {
19858 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19859 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 {
19860 continue
19861 }
19862 v.reset(OpConst8)
19863 v.AuxInt = int8ToAuxInt(0)
19864 return true
19865 }
19866 break
19867 }
19868
19869
19870
19871 for {
19872 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19873 if v_0.Op != OpMul8 {
19874 continue
19875 }
19876 _ = v_0.Args[1]
19877 v_0_0 := v_0.Args[0]
19878 v_0_1 := v_0.Args[1]
19879 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
19880 i := v_0_0
19881 if i.Op != OpConst8 {
19882 continue
19883 }
19884 t := i.Type
19885 z := v_0_1
19886 x := v_1
19887 if !(z.Op != OpConst8 && x.Op != OpConst8) {
19888 continue
19889 }
19890 v.reset(OpMul8)
19891 v0 := b.NewValue0(v.Pos, OpMul8, t)
19892 v0.AddArg2(x, z)
19893 v.AddArg2(i, v0)
19894 return true
19895 }
19896 }
19897 break
19898 }
19899
19900
19901 for {
19902 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19903 if v_0.Op != OpConst8 {
19904 continue
19905 }
19906 t := v_0.Type
19907 c := auxIntToInt8(v_0.AuxInt)
19908 if v_1.Op != OpMul8 {
19909 continue
19910 }
19911 _ = v_1.Args[1]
19912 v_1_0 := v_1.Args[0]
19913 v_1_1 := v_1.Args[1]
19914 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
19915 if v_1_0.Op != OpConst8 || v_1_0.Type != t {
19916 continue
19917 }
19918 d := auxIntToInt8(v_1_0.AuxInt)
19919 x := v_1_1
19920 v.reset(OpMul8)
19921 v0 := b.NewValue0(v.Pos, OpConst8, t)
19922 v0.AuxInt = int8ToAuxInt(c * d)
19923 v.AddArg2(v0, x)
19924 return true
19925 }
19926 }
19927 break
19928 }
19929 return false
19930 }
19931 func rewriteValuegeneric_OpNeg16(v *Value) bool {
19932 v_0 := v.Args[0]
19933 b := v.Block
19934
19935
19936 for {
19937 if v_0.Op != OpConst16 {
19938 break
19939 }
19940 c := auxIntToInt16(v_0.AuxInt)
19941 v.reset(OpConst16)
19942 v.AuxInt = int16ToAuxInt(-c)
19943 return true
19944 }
19945
19946
19947 for {
19948 if v_0.Op != OpSub16 {
19949 break
19950 }
19951 y := v_0.Args[1]
19952 x := v_0.Args[0]
19953 v.reset(OpSub16)
19954 v.AddArg2(y, x)
19955 return true
19956 }
19957
19958
19959 for {
19960 if v_0.Op != OpNeg16 {
19961 break
19962 }
19963 x := v_0.Args[0]
19964 v.copyOf(x)
19965 return true
19966 }
19967
19968
19969 for {
19970 t := v.Type
19971 if v_0.Op != OpCom16 {
19972 break
19973 }
19974 x := v_0.Args[0]
19975 v.reset(OpAdd16)
19976 v0 := b.NewValue0(v.Pos, OpConst16, t)
19977 v0.AuxInt = int16ToAuxInt(1)
19978 v.AddArg2(v0, x)
19979 return true
19980 }
19981 return false
19982 }
19983 func rewriteValuegeneric_OpNeg32(v *Value) bool {
19984 v_0 := v.Args[0]
19985 b := v.Block
19986
19987
19988 for {
19989 if v_0.Op != OpConst32 {
19990 break
19991 }
19992 c := auxIntToInt32(v_0.AuxInt)
19993 v.reset(OpConst32)
19994 v.AuxInt = int32ToAuxInt(-c)
19995 return true
19996 }
19997
19998
19999 for {
20000 if v_0.Op != OpSub32 {
20001 break
20002 }
20003 y := v_0.Args[1]
20004 x := v_0.Args[0]
20005 v.reset(OpSub32)
20006 v.AddArg2(y, x)
20007 return true
20008 }
20009
20010
20011 for {
20012 if v_0.Op != OpNeg32 {
20013 break
20014 }
20015 x := v_0.Args[0]
20016 v.copyOf(x)
20017 return true
20018 }
20019
20020
20021 for {
20022 t := v.Type
20023 if v_0.Op != OpCom32 {
20024 break
20025 }
20026 x := v_0.Args[0]
20027 v.reset(OpAdd32)
20028 v0 := b.NewValue0(v.Pos, OpConst32, t)
20029 v0.AuxInt = int32ToAuxInt(1)
20030 v.AddArg2(v0, x)
20031 return true
20032 }
20033 return false
20034 }
20035 func rewriteValuegeneric_OpNeg32F(v *Value) bool {
20036 v_0 := v.Args[0]
20037
20038
20039
20040 for {
20041 if v_0.Op != OpConst32F {
20042 break
20043 }
20044 c := auxIntToFloat32(v_0.AuxInt)
20045 if !(c != 0) {
20046 break
20047 }
20048 v.reset(OpConst32F)
20049 v.AuxInt = float32ToAuxInt(-c)
20050 return true
20051 }
20052 return false
20053 }
20054 func rewriteValuegeneric_OpNeg64(v *Value) bool {
20055 v_0 := v.Args[0]
20056 b := v.Block
20057
20058
20059 for {
20060 if v_0.Op != OpConst64 {
20061 break
20062 }
20063 c := auxIntToInt64(v_0.AuxInt)
20064 v.reset(OpConst64)
20065 v.AuxInt = int64ToAuxInt(-c)
20066 return true
20067 }
20068
20069
20070 for {
20071 if v_0.Op != OpSub64 {
20072 break
20073 }
20074 y := v_0.Args[1]
20075 x := v_0.Args[0]
20076 v.reset(OpSub64)
20077 v.AddArg2(y, x)
20078 return true
20079 }
20080
20081
20082 for {
20083 if v_0.Op != OpNeg64 {
20084 break
20085 }
20086 x := v_0.Args[0]
20087 v.copyOf(x)
20088 return true
20089 }
20090
20091
20092 for {
20093 t := v.Type
20094 if v_0.Op != OpCom64 {
20095 break
20096 }
20097 x := v_0.Args[0]
20098 v.reset(OpAdd64)
20099 v0 := b.NewValue0(v.Pos, OpConst64, t)
20100 v0.AuxInt = int64ToAuxInt(1)
20101 v.AddArg2(v0, x)
20102 return true
20103 }
20104 return false
20105 }
20106 func rewriteValuegeneric_OpNeg64F(v *Value) bool {
20107 v_0 := v.Args[0]
20108
20109
20110
20111 for {
20112 if v_0.Op != OpConst64F {
20113 break
20114 }
20115 c := auxIntToFloat64(v_0.AuxInt)
20116 if !(c != 0) {
20117 break
20118 }
20119 v.reset(OpConst64F)
20120 v.AuxInt = float64ToAuxInt(-c)
20121 return true
20122 }
20123 return false
20124 }
20125 func rewriteValuegeneric_OpNeg8(v *Value) bool {
20126 v_0 := v.Args[0]
20127 b := v.Block
20128
20129
20130 for {
20131 if v_0.Op != OpConst8 {
20132 break
20133 }
20134 c := auxIntToInt8(v_0.AuxInt)
20135 v.reset(OpConst8)
20136 v.AuxInt = int8ToAuxInt(-c)
20137 return true
20138 }
20139
20140
20141 for {
20142 if v_0.Op != OpSub8 {
20143 break
20144 }
20145 y := v_0.Args[1]
20146 x := v_0.Args[0]
20147 v.reset(OpSub8)
20148 v.AddArg2(y, x)
20149 return true
20150 }
20151
20152
20153 for {
20154 if v_0.Op != OpNeg8 {
20155 break
20156 }
20157 x := v_0.Args[0]
20158 v.copyOf(x)
20159 return true
20160 }
20161
20162
20163 for {
20164 t := v.Type
20165 if v_0.Op != OpCom8 {
20166 break
20167 }
20168 x := v_0.Args[0]
20169 v.reset(OpAdd8)
20170 v0 := b.NewValue0(v.Pos, OpConst8, t)
20171 v0.AuxInt = int8ToAuxInt(1)
20172 v.AddArg2(v0, x)
20173 return true
20174 }
20175 return false
20176 }
20177 func rewriteValuegeneric_OpNeq16(v *Value) bool {
20178 v_1 := v.Args[1]
20179 v_0 := v.Args[0]
20180 b := v.Block
20181 typ := &b.Func.Config.Types
20182
20183
20184 for {
20185 x := v_0
20186 if x != v_1 {
20187 break
20188 }
20189 v.reset(OpConstBool)
20190 v.AuxInt = boolToAuxInt(false)
20191 return true
20192 }
20193
20194
20195 for {
20196 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20197 if v_0.Op != OpConst16 {
20198 continue
20199 }
20200 t := v_0.Type
20201 c := auxIntToInt16(v_0.AuxInt)
20202 if v_1.Op != OpAdd16 {
20203 continue
20204 }
20205 _ = v_1.Args[1]
20206 v_1_0 := v_1.Args[0]
20207 v_1_1 := v_1.Args[1]
20208 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
20209 if v_1_0.Op != OpConst16 || v_1_0.Type != t {
20210 continue
20211 }
20212 d := auxIntToInt16(v_1_0.AuxInt)
20213 x := v_1_1
20214 v.reset(OpNeq16)
20215 v0 := b.NewValue0(v.Pos, OpConst16, t)
20216 v0.AuxInt = int16ToAuxInt(c - d)
20217 v.AddArg2(v0, x)
20218 return true
20219 }
20220 }
20221 break
20222 }
20223
20224
20225 for {
20226 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20227 if v_0.Op != OpConst16 {
20228 continue
20229 }
20230 c := auxIntToInt16(v_0.AuxInt)
20231 if v_1.Op != OpConst16 {
20232 continue
20233 }
20234 d := auxIntToInt16(v_1.AuxInt)
20235 v.reset(OpConstBool)
20236 v.AuxInt = boolToAuxInt(c != d)
20237 return true
20238 }
20239 break
20240 }
20241
20242
20243
20244 for {
20245 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20246 n := v_0
20247 if v_1.Op != OpLsh16x64 {
20248 continue
20249 }
20250 _ = v_1.Args[1]
20251 v_1_0 := v_1.Args[0]
20252 if v_1_0.Op != OpRsh16x64 {
20253 continue
20254 }
20255 _ = v_1_0.Args[1]
20256 v_1_0_0 := v_1_0.Args[0]
20257 if v_1_0_0.Op != OpAdd16 {
20258 continue
20259 }
20260 t := v_1_0_0.Type
20261 _ = v_1_0_0.Args[1]
20262 v_1_0_0_0 := v_1_0_0.Args[0]
20263 v_1_0_0_1 := v_1_0_0.Args[1]
20264 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 {
20265 if n != v_1_0_0_0 || v_1_0_0_1.Op != OpRsh16Ux64 || v_1_0_0_1.Type != t {
20266 continue
20267 }
20268 _ = v_1_0_0_1.Args[1]
20269 v_1_0_0_1_0 := v_1_0_0_1.Args[0]
20270 if v_1_0_0_1_0.Op != OpRsh16x64 || v_1_0_0_1_0.Type != t {
20271 continue
20272 }
20273 _ = v_1_0_0_1_0.Args[1]
20274 if n != v_1_0_0_1_0.Args[0] {
20275 continue
20276 }
20277 v_1_0_0_1_0_1 := v_1_0_0_1_0.Args[1]
20278 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 {
20279 continue
20280 }
20281 v_1_0_0_1_1 := v_1_0_0_1.Args[1]
20282 if v_1_0_0_1_1.Op != OpConst64 || v_1_0_0_1_1.Type != typ.UInt64 {
20283 continue
20284 }
20285 kbar := auxIntToInt64(v_1_0_0_1_1.AuxInt)
20286 v_1_0_1 := v_1_0.Args[1]
20287 if v_1_0_1.Op != OpConst64 || v_1_0_1.Type != typ.UInt64 {
20288 continue
20289 }
20290 k := auxIntToInt64(v_1_0_1.AuxInt)
20291 v_1_1 := v_1.Args[1]
20292 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) {
20293 continue
20294 }
20295 v.reset(OpNeq16)
20296 v0 := b.NewValue0(v.Pos, OpAnd16, t)
20297 v1 := b.NewValue0(v.Pos, OpConst16, t)
20298 v1.AuxInt = int16ToAuxInt(1<<uint(k) - 1)
20299 v0.AddArg2(n, v1)
20300 v2 := b.NewValue0(v.Pos, OpConst16, t)
20301 v2.AuxInt = int16ToAuxInt(0)
20302 v.AddArg2(v0, v2)
20303 return true
20304 }
20305 }
20306 break
20307 }
20308
20309
20310
20311 for {
20312 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20313 s := v_0
20314 if s.Op != OpSub16 {
20315 continue
20316 }
20317 y := s.Args[1]
20318 x := s.Args[0]
20319 if v_1.Op != OpConst16 || auxIntToInt16(v_1.AuxInt) != 0 || !(s.Uses == 1) {
20320 continue
20321 }
20322 v.reset(OpNeq16)
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 if v_0.Op != OpAnd16 {
20334 continue
20335 }
20336 t := v_0.Type
20337 _ = v_0.Args[1]
20338 v_0_0 := v_0.Args[0]
20339 v_0_1 := v_0.Args[1]
20340 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
20341 x := v_0_0
20342 if v_0_1.Op != OpConst16 || v_0_1.Type != t {
20343 continue
20344 }
20345 y := auxIntToInt16(v_0_1.AuxInt)
20346 if v_1.Op != OpConst16 || v_1.Type != t || auxIntToInt16(v_1.AuxInt) != y || !(oneBit16(y)) {
20347 continue
20348 }
20349 v.reset(OpEq16)
20350 v0 := b.NewValue0(v.Pos, OpAnd16, t)
20351 v1 := b.NewValue0(v.Pos, OpConst16, t)
20352 v1.AuxInt = int16ToAuxInt(y)
20353 v0.AddArg2(x, v1)
20354 v2 := b.NewValue0(v.Pos, OpConst16, t)
20355 v2.AuxInt = int16ToAuxInt(0)
20356 v.AddArg2(v0, v2)
20357 return true
20358 }
20359 }
20360 break
20361 }
20362 return false
20363 }
20364 func rewriteValuegeneric_OpNeq32(v *Value) bool {
20365 v_1 := v.Args[1]
20366 v_0 := v.Args[0]
20367 b := v.Block
20368 typ := &b.Func.Config.Types
20369
20370
20371 for {
20372 x := v_0
20373 if x != v_1 {
20374 break
20375 }
20376 v.reset(OpConstBool)
20377 v.AuxInt = boolToAuxInt(false)
20378 return true
20379 }
20380
20381
20382 for {
20383 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20384 if v_0.Op != OpConst32 {
20385 continue
20386 }
20387 t := v_0.Type
20388 c := auxIntToInt32(v_0.AuxInt)
20389 if v_1.Op != OpAdd32 {
20390 continue
20391 }
20392 _ = v_1.Args[1]
20393 v_1_0 := v_1.Args[0]
20394 v_1_1 := v_1.Args[1]
20395 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
20396 if v_1_0.Op != OpConst32 || v_1_0.Type != t {
20397 continue
20398 }
20399 d := auxIntToInt32(v_1_0.AuxInt)
20400 x := v_1_1
20401 v.reset(OpNeq32)
20402 v0 := b.NewValue0(v.Pos, OpConst32, t)
20403 v0.AuxInt = int32ToAuxInt(c - d)
20404 v.AddArg2(v0, x)
20405 return true
20406 }
20407 }
20408 break
20409 }
20410
20411
20412 for {
20413 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20414 if v_0.Op != OpConst32 {
20415 continue
20416 }
20417 c := auxIntToInt32(v_0.AuxInt)
20418 if v_1.Op != OpConst32 {
20419 continue
20420 }
20421 d := auxIntToInt32(v_1.AuxInt)
20422 v.reset(OpConstBool)
20423 v.AuxInt = boolToAuxInt(c != d)
20424 return true
20425 }
20426 break
20427 }
20428
20429
20430
20431 for {
20432 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20433 n := v_0
20434 if v_1.Op != OpLsh32x64 {
20435 continue
20436 }
20437 _ = v_1.Args[1]
20438 v_1_0 := v_1.Args[0]
20439 if v_1_0.Op != OpRsh32x64 {
20440 continue
20441 }
20442 _ = v_1_0.Args[1]
20443 v_1_0_0 := v_1_0.Args[0]
20444 if v_1_0_0.Op != OpAdd32 {
20445 continue
20446 }
20447 t := v_1_0_0.Type
20448 _ = v_1_0_0.Args[1]
20449 v_1_0_0_0 := v_1_0_0.Args[0]
20450 v_1_0_0_1 := v_1_0_0.Args[1]
20451 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 {
20452 if n != v_1_0_0_0 || v_1_0_0_1.Op != OpRsh32Ux64 || v_1_0_0_1.Type != t {
20453 continue
20454 }
20455 _ = v_1_0_0_1.Args[1]
20456 v_1_0_0_1_0 := v_1_0_0_1.Args[0]
20457 if v_1_0_0_1_0.Op != OpRsh32x64 || v_1_0_0_1_0.Type != t {
20458 continue
20459 }
20460 _ = v_1_0_0_1_0.Args[1]
20461 if n != v_1_0_0_1_0.Args[0] {
20462 continue
20463 }
20464 v_1_0_0_1_0_1 := v_1_0_0_1_0.Args[1]
20465 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 {
20466 continue
20467 }
20468 v_1_0_0_1_1 := v_1_0_0_1.Args[1]
20469 if v_1_0_0_1_1.Op != OpConst64 || v_1_0_0_1_1.Type != typ.UInt64 {
20470 continue
20471 }
20472 kbar := auxIntToInt64(v_1_0_0_1_1.AuxInt)
20473 v_1_0_1 := v_1_0.Args[1]
20474 if v_1_0_1.Op != OpConst64 || v_1_0_1.Type != typ.UInt64 {
20475 continue
20476 }
20477 k := auxIntToInt64(v_1_0_1.AuxInt)
20478 v_1_1 := v_1.Args[1]
20479 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) {
20480 continue
20481 }
20482 v.reset(OpNeq32)
20483 v0 := b.NewValue0(v.Pos, OpAnd32, t)
20484 v1 := b.NewValue0(v.Pos, OpConst32, t)
20485 v1.AuxInt = int32ToAuxInt(1<<uint(k) - 1)
20486 v0.AddArg2(n, v1)
20487 v2 := b.NewValue0(v.Pos, OpConst32, t)
20488 v2.AuxInt = int32ToAuxInt(0)
20489 v.AddArg2(v0, v2)
20490 return true
20491 }
20492 }
20493 break
20494 }
20495
20496
20497
20498 for {
20499 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20500 s := v_0
20501 if s.Op != OpSub32 {
20502 continue
20503 }
20504 y := s.Args[1]
20505 x := s.Args[0]
20506 if v_1.Op != OpConst32 || auxIntToInt32(v_1.AuxInt) != 0 || !(s.Uses == 1) {
20507 continue
20508 }
20509 v.reset(OpNeq32)
20510 v.AddArg2(x, y)
20511 return true
20512 }
20513 break
20514 }
20515
20516
20517
20518 for {
20519 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20520 if v_0.Op != OpAnd32 {
20521 continue
20522 }
20523 t := v_0.Type
20524 _ = v_0.Args[1]
20525 v_0_0 := v_0.Args[0]
20526 v_0_1 := v_0.Args[1]
20527 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
20528 x := v_0_0
20529 if v_0_1.Op != OpConst32 || v_0_1.Type != t {
20530 continue
20531 }
20532 y := auxIntToInt32(v_0_1.AuxInt)
20533 if v_1.Op != OpConst32 || v_1.Type != t || auxIntToInt32(v_1.AuxInt) != y || !(oneBit32(y)) {
20534 continue
20535 }
20536 v.reset(OpEq32)
20537 v0 := b.NewValue0(v.Pos, OpAnd32, t)
20538 v1 := b.NewValue0(v.Pos, OpConst32, t)
20539 v1.AuxInt = int32ToAuxInt(y)
20540 v0.AddArg2(x, v1)
20541 v2 := b.NewValue0(v.Pos, OpConst32, t)
20542 v2.AuxInt = int32ToAuxInt(0)
20543 v.AddArg2(v0, v2)
20544 return true
20545 }
20546 }
20547 break
20548 }
20549 return false
20550 }
20551 func rewriteValuegeneric_OpNeq32F(v *Value) bool {
20552 v_1 := v.Args[1]
20553 v_0 := v.Args[0]
20554
20555
20556 for {
20557 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20558 if v_0.Op != OpConst32F {
20559 continue
20560 }
20561 c := auxIntToFloat32(v_0.AuxInt)
20562 if v_1.Op != OpConst32F {
20563 continue
20564 }
20565 d := auxIntToFloat32(v_1.AuxInt)
20566 v.reset(OpConstBool)
20567 v.AuxInt = boolToAuxInt(c != d)
20568 return true
20569 }
20570 break
20571 }
20572 return false
20573 }
20574 func rewriteValuegeneric_OpNeq64(v *Value) bool {
20575 v_1 := v.Args[1]
20576 v_0 := v.Args[0]
20577 b := v.Block
20578 typ := &b.Func.Config.Types
20579
20580
20581 for {
20582 x := v_0
20583 if x != v_1 {
20584 break
20585 }
20586 v.reset(OpConstBool)
20587 v.AuxInt = boolToAuxInt(false)
20588 return true
20589 }
20590
20591
20592 for {
20593 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20594 if v_0.Op != OpConst64 {
20595 continue
20596 }
20597 t := v_0.Type
20598 c := auxIntToInt64(v_0.AuxInt)
20599 if v_1.Op != OpAdd64 {
20600 continue
20601 }
20602 _ = v_1.Args[1]
20603 v_1_0 := v_1.Args[0]
20604 v_1_1 := v_1.Args[1]
20605 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
20606 if v_1_0.Op != OpConst64 || v_1_0.Type != t {
20607 continue
20608 }
20609 d := auxIntToInt64(v_1_0.AuxInt)
20610 x := v_1_1
20611 v.reset(OpNeq64)
20612 v0 := b.NewValue0(v.Pos, OpConst64, t)
20613 v0.AuxInt = int64ToAuxInt(c - d)
20614 v.AddArg2(v0, x)
20615 return true
20616 }
20617 }
20618 break
20619 }
20620
20621
20622 for {
20623 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20624 if v_0.Op != OpConst64 {
20625 continue
20626 }
20627 c := auxIntToInt64(v_0.AuxInt)
20628 if v_1.Op != OpConst64 {
20629 continue
20630 }
20631 d := auxIntToInt64(v_1.AuxInt)
20632 v.reset(OpConstBool)
20633 v.AuxInt = boolToAuxInt(c != d)
20634 return true
20635 }
20636 break
20637 }
20638
20639
20640
20641 for {
20642 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20643 n := v_0
20644 if v_1.Op != OpLsh64x64 {
20645 continue
20646 }
20647 _ = v_1.Args[1]
20648 v_1_0 := v_1.Args[0]
20649 if v_1_0.Op != OpRsh64x64 {
20650 continue
20651 }
20652 _ = v_1_0.Args[1]
20653 v_1_0_0 := v_1_0.Args[0]
20654 if v_1_0_0.Op != OpAdd64 {
20655 continue
20656 }
20657 t := v_1_0_0.Type
20658 _ = v_1_0_0.Args[1]
20659 v_1_0_0_0 := v_1_0_0.Args[0]
20660 v_1_0_0_1 := v_1_0_0.Args[1]
20661 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 {
20662 if n != v_1_0_0_0 || v_1_0_0_1.Op != OpRsh64Ux64 || v_1_0_0_1.Type != t {
20663 continue
20664 }
20665 _ = v_1_0_0_1.Args[1]
20666 v_1_0_0_1_0 := v_1_0_0_1.Args[0]
20667 if v_1_0_0_1_0.Op != OpRsh64x64 || v_1_0_0_1_0.Type != t {
20668 continue
20669 }
20670 _ = v_1_0_0_1_0.Args[1]
20671 if n != v_1_0_0_1_0.Args[0] {
20672 continue
20673 }
20674 v_1_0_0_1_0_1 := v_1_0_0_1_0.Args[1]
20675 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 {
20676 continue
20677 }
20678 v_1_0_0_1_1 := v_1_0_0_1.Args[1]
20679 if v_1_0_0_1_1.Op != OpConst64 || v_1_0_0_1_1.Type != typ.UInt64 {
20680 continue
20681 }
20682 kbar := auxIntToInt64(v_1_0_0_1_1.AuxInt)
20683 v_1_0_1 := v_1_0.Args[1]
20684 if v_1_0_1.Op != OpConst64 || v_1_0_1.Type != typ.UInt64 {
20685 continue
20686 }
20687 k := auxIntToInt64(v_1_0_1.AuxInt)
20688 v_1_1 := v_1.Args[1]
20689 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) {
20690 continue
20691 }
20692 v.reset(OpNeq64)
20693 v0 := b.NewValue0(v.Pos, OpAnd64, t)
20694 v1 := b.NewValue0(v.Pos, OpConst64, t)
20695 v1.AuxInt = int64ToAuxInt(1<<uint(k) - 1)
20696 v0.AddArg2(n, v1)
20697 v2 := b.NewValue0(v.Pos, OpConst64, t)
20698 v2.AuxInt = int64ToAuxInt(0)
20699 v.AddArg2(v0, v2)
20700 return true
20701 }
20702 }
20703 break
20704 }
20705
20706
20707
20708 for {
20709 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20710 s := v_0
20711 if s.Op != OpSub64 {
20712 continue
20713 }
20714 y := s.Args[1]
20715 x := s.Args[0]
20716 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 0 || !(s.Uses == 1) {
20717 continue
20718 }
20719 v.reset(OpNeq64)
20720 v.AddArg2(x, y)
20721 return true
20722 }
20723 break
20724 }
20725
20726
20727
20728 for {
20729 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20730 if v_0.Op != OpAnd64 {
20731 continue
20732 }
20733 t := v_0.Type
20734 _ = v_0.Args[1]
20735 v_0_0 := v_0.Args[0]
20736 v_0_1 := v_0.Args[1]
20737 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
20738 x := v_0_0
20739 if v_0_1.Op != OpConst64 || v_0_1.Type != t {
20740 continue
20741 }
20742 y := auxIntToInt64(v_0_1.AuxInt)
20743 if v_1.Op != OpConst64 || v_1.Type != t || auxIntToInt64(v_1.AuxInt) != y || !(oneBit64(y)) {
20744 continue
20745 }
20746 v.reset(OpEq64)
20747 v0 := b.NewValue0(v.Pos, OpAnd64, t)
20748 v1 := b.NewValue0(v.Pos, OpConst64, t)
20749 v1.AuxInt = int64ToAuxInt(y)
20750 v0.AddArg2(x, v1)
20751 v2 := b.NewValue0(v.Pos, OpConst64, t)
20752 v2.AuxInt = int64ToAuxInt(0)
20753 v.AddArg2(v0, v2)
20754 return true
20755 }
20756 }
20757 break
20758 }
20759 return false
20760 }
20761 func rewriteValuegeneric_OpNeq64F(v *Value) bool {
20762 v_1 := v.Args[1]
20763 v_0 := v.Args[0]
20764
20765
20766 for {
20767 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20768 if v_0.Op != OpConst64F {
20769 continue
20770 }
20771 c := auxIntToFloat64(v_0.AuxInt)
20772 if v_1.Op != OpConst64F {
20773 continue
20774 }
20775 d := auxIntToFloat64(v_1.AuxInt)
20776 v.reset(OpConstBool)
20777 v.AuxInt = boolToAuxInt(c != d)
20778 return true
20779 }
20780 break
20781 }
20782 return false
20783 }
20784 func rewriteValuegeneric_OpNeq8(v *Value) bool {
20785 v_1 := v.Args[1]
20786 v_0 := v.Args[0]
20787 b := v.Block
20788 typ := &b.Func.Config.Types
20789
20790
20791 for {
20792 x := v_0
20793 if x != v_1 {
20794 break
20795 }
20796 v.reset(OpConstBool)
20797 v.AuxInt = boolToAuxInt(false)
20798 return true
20799 }
20800
20801
20802 for {
20803 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20804 if v_0.Op != OpConst8 {
20805 continue
20806 }
20807 t := v_0.Type
20808 c := auxIntToInt8(v_0.AuxInt)
20809 if v_1.Op != OpAdd8 {
20810 continue
20811 }
20812 _ = v_1.Args[1]
20813 v_1_0 := v_1.Args[0]
20814 v_1_1 := v_1.Args[1]
20815 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
20816 if v_1_0.Op != OpConst8 || v_1_0.Type != t {
20817 continue
20818 }
20819 d := auxIntToInt8(v_1_0.AuxInt)
20820 x := v_1_1
20821 v.reset(OpNeq8)
20822 v0 := b.NewValue0(v.Pos, OpConst8, t)
20823 v0.AuxInt = int8ToAuxInt(c - d)
20824 v.AddArg2(v0, x)
20825 return true
20826 }
20827 }
20828 break
20829 }
20830
20831
20832 for {
20833 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20834 if v_0.Op != OpConst8 {
20835 continue
20836 }
20837 c := auxIntToInt8(v_0.AuxInt)
20838 if v_1.Op != OpConst8 {
20839 continue
20840 }
20841 d := auxIntToInt8(v_1.AuxInt)
20842 v.reset(OpConstBool)
20843 v.AuxInt = boolToAuxInt(c != d)
20844 return true
20845 }
20846 break
20847 }
20848
20849
20850
20851 for {
20852 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20853 n := v_0
20854 if v_1.Op != OpLsh8x64 {
20855 continue
20856 }
20857 _ = v_1.Args[1]
20858 v_1_0 := v_1.Args[0]
20859 if v_1_0.Op != OpRsh8x64 {
20860 continue
20861 }
20862 _ = v_1_0.Args[1]
20863 v_1_0_0 := v_1_0.Args[0]
20864 if v_1_0_0.Op != OpAdd8 {
20865 continue
20866 }
20867 t := v_1_0_0.Type
20868 _ = v_1_0_0.Args[1]
20869 v_1_0_0_0 := v_1_0_0.Args[0]
20870 v_1_0_0_1 := v_1_0_0.Args[1]
20871 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 {
20872 if n != v_1_0_0_0 || v_1_0_0_1.Op != OpRsh8Ux64 || v_1_0_0_1.Type != t {
20873 continue
20874 }
20875 _ = v_1_0_0_1.Args[1]
20876 v_1_0_0_1_0 := v_1_0_0_1.Args[0]
20877 if v_1_0_0_1_0.Op != OpRsh8x64 || v_1_0_0_1_0.Type != t {
20878 continue
20879 }
20880 _ = v_1_0_0_1_0.Args[1]
20881 if n != v_1_0_0_1_0.Args[0] {
20882 continue
20883 }
20884 v_1_0_0_1_0_1 := v_1_0_0_1_0.Args[1]
20885 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 {
20886 continue
20887 }
20888 v_1_0_0_1_1 := v_1_0_0_1.Args[1]
20889 if v_1_0_0_1_1.Op != OpConst64 || v_1_0_0_1_1.Type != typ.UInt64 {
20890 continue
20891 }
20892 kbar := auxIntToInt64(v_1_0_0_1_1.AuxInt)
20893 v_1_0_1 := v_1_0.Args[1]
20894 if v_1_0_1.Op != OpConst64 || v_1_0_1.Type != typ.UInt64 {
20895 continue
20896 }
20897 k := auxIntToInt64(v_1_0_1.AuxInt)
20898 v_1_1 := v_1.Args[1]
20899 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) {
20900 continue
20901 }
20902 v.reset(OpNeq8)
20903 v0 := b.NewValue0(v.Pos, OpAnd8, t)
20904 v1 := b.NewValue0(v.Pos, OpConst8, t)
20905 v1.AuxInt = int8ToAuxInt(1<<uint(k) - 1)
20906 v0.AddArg2(n, v1)
20907 v2 := b.NewValue0(v.Pos, OpConst8, t)
20908 v2.AuxInt = int8ToAuxInt(0)
20909 v.AddArg2(v0, v2)
20910 return true
20911 }
20912 }
20913 break
20914 }
20915
20916
20917
20918 for {
20919 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20920 s := v_0
20921 if s.Op != OpSub8 {
20922 continue
20923 }
20924 y := s.Args[1]
20925 x := s.Args[0]
20926 if v_1.Op != OpConst8 || auxIntToInt8(v_1.AuxInt) != 0 || !(s.Uses == 1) {
20927 continue
20928 }
20929 v.reset(OpNeq8)
20930 v.AddArg2(x, y)
20931 return true
20932 }
20933 break
20934 }
20935
20936
20937
20938 for {
20939 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20940 if v_0.Op != OpAnd8 {
20941 continue
20942 }
20943 t := v_0.Type
20944 _ = v_0.Args[1]
20945 v_0_0 := v_0.Args[0]
20946 v_0_1 := v_0.Args[1]
20947 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
20948 x := v_0_0
20949 if v_0_1.Op != OpConst8 || v_0_1.Type != t {
20950 continue
20951 }
20952 y := auxIntToInt8(v_0_1.AuxInt)
20953 if v_1.Op != OpConst8 || v_1.Type != t || auxIntToInt8(v_1.AuxInt) != y || !(oneBit8(y)) {
20954 continue
20955 }
20956 v.reset(OpEq8)
20957 v0 := b.NewValue0(v.Pos, OpAnd8, t)
20958 v1 := b.NewValue0(v.Pos, OpConst8, t)
20959 v1.AuxInt = int8ToAuxInt(y)
20960 v0.AddArg2(x, v1)
20961 v2 := b.NewValue0(v.Pos, OpConst8, t)
20962 v2.AuxInt = int8ToAuxInt(0)
20963 v.AddArg2(v0, v2)
20964 return true
20965 }
20966 }
20967 break
20968 }
20969 return false
20970 }
20971 func rewriteValuegeneric_OpNeqB(v *Value) bool {
20972 v_1 := v.Args[1]
20973 v_0 := v.Args[0]
20974
20975
20976 for {
20977 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20978 if v_0.Op != OpConstBool {
20979 continue
20980 }
20981 c := auxIntToBool(v_0.AuxInt)
20982 if v_1.Op != OpConstBool {
20983 continue
20984 }
20985 d := auxIntToBool(v_1.AuxInt)
20986 v.reset(OpConstBool)
20987 v.AuxInt = boolToAuxInt(c != d)
20988 return true
20989 }
20990 break
20991 }
20992
20993
20994 for {
20995 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20996 if v_0.Op != OpConstBool || auxIntToBool(v_0.AuxInt) != false {
20997 continue
20998 }
20999 x := v_1
21000 v.copyOf(x)
21001 return true
21002 }
21003 break
21004 }
21005
21006
21007 for {
21008 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
21009 if v_0.Op != OpConstBool || auxIntToBool(v_0.AuxInt) != true {
21010 continue
21011 }
21012 x := v_1
21013 v.reset(OpNot)
21014 v.AddArg(x)
21015 return true
21016 }
21017 break
21018 }
21019
21020
21021 for {
21022 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
21023 if v_0.Op != OpNot {
21024 continue
21025 }
21026 x := v_0.Args[0]
21027 if v_1.Op != OpNot {
21028 continue
21029 }
21030 y := v_1.Args[0]
21031 v.reset(OpNeqB)
21032 v.AddArg2(x, y)
21033 return true
21034 }
21035 break
21036 }
21037 return false
21038 }
21039 func rewriteValuegeneric_OpNeqInter(v *Value) bool {
21040 v_1 := v.Args[1]
21041 v_0 := v.Args[0]
21042 b := v.Block
21043 typ := &b.Func.Config.Types
21044
21045
21046 for {
21047 x := v_0
21048 y := v_1
21049 v.reset(OpNeqPtr)
21050 v0 := b.NewValue0(v.Pos, OpITab, typ.Uintptr)
21051 v0.AddArg(x)
21052 v1 := b.NewValue0(v.Pos, OpITab, typ.Uintptr)
21053 v1.AddArg(y)
21054 v.AddArg2(v0, v1)
21055 return true
21056 }
21057 }
21058 func rewriteValuegeneric_OpNeqPtr(v *Value) bool {
21059 v_1 := v.Args[1]
21060 v_0 := v.Args[0]
21061
21062
21063 for {
21064 x := v_0
21065 if x != v_1 {
21066 break
21067 }
21068 v.reset(OpConstBool)
21069 v.AuxInt = boolToAuxInt(false)
21070 return true
21071 }
21072
21073
21074 for {
21075 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
21076 if v_0.Op != OpAddr {
21077 continue
21078 }
21079 x := auxToSym(v_0.Aux)
21080 if v_1.Op != OpAddr {
21081 continue
21082 }
21083 y := auxToSym(v_1.Aux)
21084 v.reset(OpConstBool)
21085 v.AuxInt = boolToAuxInt(x != y)
21086 return true
21087 }
21088 break
21089 }
21090
21091
21092 for {
21093 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
21094 if v_0.Op != OpAddr {
21095 continue
21096 }
21097 x := auxToSym(v_0.Aux)
21098 if v_1.Op != OpOffPtr {
21099 continue
21100 }
21101 o := auxIntToInt64(v_1.AuxInt)
21102 v_1_0 := v_1.Args[0]
21103 if v_1_0.Op != OpAddr {
21104 continue
21105 }
21106 y := auxToSym(v_1_0.Aux)
21107 v.reset(OpConstBool)
21108 v.AuxInt = boolToAuxInt(x != y || o != 0)
21109 return true
21110 }
21111 break
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 != OpOffPtr {
21118 continue
21119 }
21120 o1 := auxIntToInt64(v_0.AuxInt)
21121 v_0_0 := v_0.Args[0]
21122 if v_0_0.Op != OpAddr {
21123 continue
21124 }
21125 x := auxToSym(v_0_0.Aux)
21126 if v_1.Op != OpOffPtr {
21127 continue
21128 }
21129 o2 := auxIntToInt64(v_1.AuxInt)
21130 v_1_0 := v_1.Args[0]
21131 if v_1_0.Op != OpAddr {
21132 continue
21133 }
21134 y := auxToSym(v_1_0.Aux)
21135 v.reset(OpConstBool)
21136 v.AuxInt = boolToAuxInt(x != y || o1 != o2)
21137 return true
21138 }
21139 break
21140 }
21141
21142
21143 for {
21144 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
21145 if v_0.Op != OpLocalAddr {
21146 continue
21147 }
21148 x := auxToSym(v_0.Aux)
21149 if v_1.Op != OpLocalAddr {
21150 continue
21151 }
21152 y := auxToSym(v_1.Aux)
21153 v.reset(OpConstBool)
21154 v.AuxInt = boolToAuxInt(x != y)
21155 return true
21156 }
21157 break
21158 }
21159
21160
21161 for {
21162 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
21163 if v_0.Op != OpLocalAddr {
21164 continue
21165 }
21166 x := auxToSym(v_0.Aux)
21167 if v_1.Op != OpOffPtr {
21168 continue
21169 }
21170 o := auxIntToInt64(v_1.AuxInt)
21171 v_1_0 := v_1.Args[0]
21172 if v_1_0.Op != OpLocalAddr {
21173 continue
21174 }
21175 y := auxToSym(v_1_0.Aux)
21176 v.reset(OpConstBool)
21177 v.AuxInt = boolToAuxInt(x != y || o != 0)
21178 return true
21179 }
21180 break
21181 }
21182
21183
21184 for {
21185 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
21186 if v_0.Op != OpOffPtr {
21187 continue
21188 }
21189 o1 := auxIntToInt64(v_0.AuxInt)
21190 v_0_0 := v_0.Args[0]
21191 if v_0_0.Op != OpLocalAddr {
21192 continue
21193 }
21194 x := auxToSym(v_0_0.Aux)
21195 if v_1.Op != OpOffPtr {
21196 continue
21197 }
21198 o2 := auxIntToInt64(v_1.AuxInt)
21199 v_1_0 := v_1.Args[0]
21200 if v_1_0.Op != OpLocalAddr {
21201 continue
21202 }
21203 y := auxToSym(v_1_0.Aux)
21204 v.reset(OpConstBool)
21205 v.AuxInt = boolToAuxInt(x != y || o1 != o2)
21206 return true
21207 }
21208 break
21209 }
21210
21211
21212
21213 for {
21214 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
21215 if v_0.Op != OpOffPtr {
21216 continue
21217 }
21218 o1 := auxIntToInt64(v_0.AuxInt)
21219 p1 := v_0.Args[0]
21220 p2 := v_1
21221 if !(isSamePtr(p1, p2)) {
21222 continue
21223 }
21224 v.reset(OpConstBool)
21225 v.AuxInt = boolToAuxInt(o1 != 0)
21226 return true
21227 }
21228 break
21229 }
21230
21231
21232
21233 for {
21234 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
21235 if v_0.Op != OpOffPtr {
21236 continue
21237 }
21238 o1 := auxIntToInt64(v_0.AuxInt)
21239 p1 := v_0.Args[0]
21240 if v_1.Op != OpOffPtr {
21241 continue
21242 }
21243 o2 := auxIntToInt64(v_1.AuxInt)
21244 p2 := v_1.Args[0]
21245 if !(isSamePtr(p1, p2)) {
21246 continue
21247 }
21248 v.reset(OpConstBool)
21249 v.AuxInt = boolToAuxInt(o1 != o2)
21250 return true
21251 }
21252 break
21253 }
21254
21255
21256 for {
21257 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
21258 if v_0.Op != OpConst32 {
21259 continue
21260 }
21261 c := auxIntToInt32(v_0.AuxInt)
21262 if v_1.Op != OpConst32 {
21263 continue
21264 }
21265 d := auxIntToInt32(v_1.AuxInt)
21266 v.reset(OpConstBool)
21267 v.AuxInt = boolToAuxInt(c != d)
21268 return true
21269 }
21270 break
21271 }
21272
21273
21274 for {
21275 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
21276 if v_0.Op != OpConst64 {
21277 continue
21278 }
21279 c := auxIntToInt64(v_0.AuxInt)
21280 if v_1.Op != OpConst64 {
21281 continue
21282 }
21283 d := auxIntToInt64(v_1.AuxInt)
21284 v.reset(OpConstBool)
21285 v.AuxInt = boolToAuxInt(c != d)
21286 return true
21287 }
21288 break
21289 }
21290
21291
21292 for {
21293 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
21294 if v_0.Op != OpConvert {
21295 continue
21296 }
21297 v_0_0 := v_0.Args[0]
21298 if v_0_0.Op != OpAddr {
21299 continue
21300 }
21301 x := auxToSym(v_0_0.Aux)
21302 if v_1.Op != OpAddr {
21303 continue
21304 }
21305 y := auxToSym(v_1.Aux)
21306 v.reset(OpConstBool)
21307 v.AuxInt = boolToAuxInt(x != y)
21308 return true
21309 }
21310 break
21311 }
21312
21313
21314 for {
21315 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
21316 if v_0.Op != OpLocalAddr || v_1.Op != OpAddr {
21317 continue
21318 }
21319 v.reset(OpConstBool)
21320 v.AuxInt = boolToAuxInt(true)
21321 return true
21322 }
21323 break
21324 }
21325
21326
21327 for {
21328 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
21329 if v_0.Op != OpOffPtr {
21330 continue
21331 }
21332 v_0_0 := v_0.Args[0]
21333 if v_0_0.Op != OpLocalAddr || v_1.Op != OpAddr {
21334 continue
21335 }
21336 v.reset(OpConstBool)
21337 v.AuxInt = boolToAuxInt(true)
21338 return true
21339 }
21340 break
21341 }
21342
21343
21344 for {
21345 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
21346 if v_0.Op != OpLocalAddr || v_1.Op != OpOffPtr {
21347 continue
21348 }
21349 v_1_0 := v_1.Args[0]
21350 if v_1_0.Op != OpAddr {
21351 continue
21352 }
21353 v.reset(OpConstBool)
21354 v.AuxInt = boolToAuxInt(true)
21355 return true
21356 }
21357 break
21358 }
21359
21360
21361 for {
21362 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
21363 if v_0.Op != OpOffPtr {
21364 continue
21365 }
21366 v_0_0 := v_0.Args[0]
21367 if v_0_0.Op != OpLocalAddr || v_1.Op != OpOffPtr {
21368 continue
21369 }
21370 v_1_0 := v_1.Args[0]
21371 if v_1_0.Op != OpAddr {
21372 continue
21373 }
21374 v.reset(OpConstBool)
21375 v.AuxInt = boolToAuxInt(true)
21376 return true
21377 }
21378 break
21379 }
21380
21381
21382
21383 for {
21384 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
21385 if v_0.Op != OpAddPtr {
21386 continue
21387 }
21388 o1 := v_0.Args[1]
21389 p1 := v_0.Args[0]
21390 p2 := v_1
21391 if !(isSamePtr(p1, p2)) {
21392 continue
21393 }
21394 v.reset(OpIsNonNil)
21395 v.AddArg(o1)
21396 return true
21397 }
21398 break
21399 }
21400
21401
21402 for {
21403 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
21404 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
21405 continue
21406 }
21407 p := v_1
21408 v.reset(OpIsNonNil)
21409 v.AddArg(p)
21410 return true
21411 }
21412 break
21413 }
21414
21415
21416 for {
21417 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
21418 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
21419 continue
21420 }
21421 p := v_1
21422 v.reset(OpIsNonNil)
21423 v.AddArg(p)
21424 return true
21425 }
21426 break
21427 }
21428
21429
21430 for {
21431 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
21432 if v_0.Op != OpConstNil {
21433 continue
21434 }
21435 p := v_1
21436 v.reset(OpIsNonNil)
21437 v.AddArg(p)
21438 return true
21439 }
21440 break
21441 }
21442 return false
21443 }
21444 func rewriteValuegeneric_OpNeqSlice(v *Value) bool {
21445 v_1 := v.Args[1]
21446 v_0 := v.Args[0]
21447 b := v.Block
21448 typ := &b.Func.Config.Types
21449
21450
21451 for {
21452 x := v_0
21453 y := v_1
21454 v.reset(OpNeqPtr)
21455 v0 := b.NewValue0(v.Pos, OpSlicePtr, typ.BytePtr)
21456 v0.AddArg(x)
21457 v1 := b.NewValue0(v.Pos, OpSlicePtr, typ.BytePtr)
21458 v1.AddArg(y)
21459 v.AddArg2(v0, v1)
21460 return true
21461 }
21462 }
21463 func rewriteValuegeneric_OpNilCheck(v *Value) bool {
21464 v_1 := v.Args[1]
21465 v_0 := v.Args[0]
21466 b := v.Block
21467 fe := b.Func.fe
21468
21469
21470 for {
21471 ptr := v_0
21472 if ptr.Op != OpGetG {
21473 break
21474 }
21475 mem := ptr.Args[0]
21476 if mem != v_1 {
21477 break
21478 }
21479 v.copyOf(ptr)
21480 return true
21481 }
21482
21483
21484
21485 for {
21486 ptr := v_0
21487 if ptr.Op != OpSelectN || auxIntToInt64(ptr.AuxInt) != 0 {
21488 break
21489 }
21490 call := ptr.Args[0]
21491 if call.Op != OpStaticLECall || len(call.Args) != 2 || !(isSameCall(call.Aux, "runtime.newobject") && warnRule(fe.Debug_checknil(), v, "removed nil check")) {
21492 break
21493 }
21494 v.copyOf(ptr)
21495 return true
21496 }
21497
21498
21499
21500 for {
21501 ptr := v_0
21502 if ptr.Op != OpOffPtr {
21503 break
21504 }
21505 ptr_0 := ptr.Args[0]
21506 if ptr_0.Op != OpSelectN || auxIntToInt64(ptr_0.AuxInt) != 0 {
21507 break
21508 }
21509 call := ptr_0.Args[0]
21510 if call.Op != OpStaticLECall || len(call.Args) != 2 || !(isSameCall(call.Aux, "runtime.newobject") && warnRule(fe.Debug_checknil(), v, "removed nil check")) {
21511 break
21512 }
21513 v.copyOf(ptr)
21514 return true
21515 }
21516
21517
21518 for {
21519 ptr := v_0
21520 if ptr.Op != OpAddr {
21521 break
21522 }
21523 ptr_0 := ptr.Args[0]
21524 if ptr_0.Op != OpSB {
21525 break
21526 }
21527 v.copyOf(ptr)
21528 return true
21529 }
21530
21531
21532 for {
21533 ptr := v_0
21534 if ptr.Op != OpConvert {
21535 break
21536 }
21537 ptr_0 := ptr.Args[0]
21538 if ptr_0.Op != OpAddr {
21539 break
21540 }
21541 ptr_0_0 := ptr_0.Args[0]
21542 if ptr_0_0.Op != OpSB {
21543 break
21544 }
21545 v.copyOf(ptr)
21546 return true
21547 }
21548
21549
21550
21551 for {
21552 ptr := v_0
21553 if ptr.Op != OpLocalAddr || !(warnRule(fe.Debug_checknil(), v, "removed nil check")) {
21554 break
21555 }
21556 v.copyOf(ptr)
21557 return true
21558 }
21559
21560
21561 for {
21562 ptr := v_0
21563 if ptr.Op != OpNilCheck {
21564 break
21565 }
21566 v.copyOf(ptr)
21567 return true
21568 }
21569 return false
21570 }
21571 func rewriteValuegeneric_OpNot(v *Value) bool {
21572 v_0 := v.Args[0]
21573
21574
21575 for {
21576 if v_0.Op != OpConstBool {
21577 break
21578 }
21579 c := auxIntToBool(v_0.AuxInt)
21580 v.reset(OpConstBool)
21581 v.AuxInt = boolToAuxInt(!c)
21582 return true
21583 }
21584
21585
21586 for {
21587 if v_0.Op != OpEq64 {
21588 break
21589 }
21590 y := v_0.Args[1]
21591 x := v_0.Args[0]
21592 v.reset(OpNeq64)
21593 v.AddArg2(x, y)
21594 return true
21595 }
21596
21597
21598 for {
21599 if v_0.Op != OpEq32 {
21600 break
21601 }
21602 y := v_0.Args[1]
21603 x := v_0.Args[0]
21604 v.reset(OpNeq32)
21605 v.AddArg2(x, y)
21606 return true
21607 }
21608
21609
21610 for {
21611 if v_0.Op != OpEq16 {
21612 break
21613 }
21614 y := v_0.Args[1]
21615 x := v_0.Args[0]
21616 v.reset(OpNeq16)
21617 v.AddArg2(x, y)
21618 return true
21619 }
21620
21621
21622 for {
21623 if v_0.Op != OpEq8 {
21624 break
21625 }
21626 y := v_0.Args[1]
21627 x := v_0.Args[0]
21628 v.reset(OpNeq8)
21629 v.AddArg2(x, y)
21630 return true
21631 }
21632
21633
21634 for {
21635 if v_0.Op != OpEqB {
21636 break
21637 }
21638 y := v_0.Args[1]
21639 x := v_0.Args[0]
21640 v.reset(OpNeqB)
21641 v.AddArg2(x, y)
21642 return true
21643 }
21644
21645
21646 for {
21647 if v_0.Op != OpEqPtr {
21648 break
21649 }
21650 y := v_0.Args[1]
21651 x := v_0.Args[0]
21652 v.reset(OpNeqPtr)
21653 v.AddArg2(x, y)
21654 return true
21655 }
21656
21657
21658 for {
21659 if v_0.Op != OpEq64F {
21660 break
21661 }
21662 y := v_0.Args[1]
21663 x := v_0.Args[0]
21664 v.reset(OpNeq64F)
21665 v.AddArg2(x, y)
21666 return true
21667 }
21668
21669
21670 for {
21671 if v_0.Op != OpEq32F {
21672 break
21673 }
21674 y := v_0.Args[1]
21675 x := v_0.Args[0]
21676 v.reset(OpNeq32F)
21677 v.AddArg2(x, y)
21678 return true
21679 }
21680
21681
21682 for {
21683 if v_0.Op != OpNeq64 {
21684 break
21685 }
21686 y := v_0.Args[1]
21687 x := v_0.Args[0]
21688 v.reset(OpEq64)
21689 v.AddArg2(x, y)
21690 return true
21691 }
21692
21693
21694 for {
21695 if v_0.Op != OpNeq32 {
21696 break
21697 }
21698 y := v_0.Args[1]
21699 x := v_0.Args[0]
21700 v.reset(OpEq32)
21701 v.AddArg2(x, y)
21702 return true
21703 }
21704
21705
21706 for {
21707 if v_0.Op != OpNeq16 {
21708 break
21709 }
21710 y := v_0.Args[1]
21711 x := v_0.Args[0]
21712 v.reset(OpEq16)
21713 v.AddArg2(x, y)
21714 return true
21715 }
21716
21717
21718 for {
21719 if v_0.Op != OpNeq8 {
21720 break
21721 }
21722 y := v_0.Args[1]
21723 x := v_0.Args[0]
21724 v.reset(OpEq8)
21725 v.AddArg2(x, y)
21726 return true
21727 }
21728
21729
21730 for {
21731 if v_0.Op != OpNeqB {
21732 break
21733 }
21734 y := v_0.Args[1]
21735 x := v_0.Args[0]
21736 v.reset(OpEqB)
21737 v.AddArg2(x, y)
21738 return true
21739 }
21740
21741
21742 for {
21743 if v_0.Op != OpNeqPtr {
21744 break
21745 }
21746 y := v_0.Args[1]
21747 x := v_0.Args[0]
21748 v.reset(OpEqPtr)
21749 v.AddArg2(x, y)
21750 return true
21751 }
21752
21753
21754 for {
21755 if v_0.Op != OpNeq64F {
21756 break
21757 }
21758 y := v_0.Args[1]
21759 x := v_0.Args[0]
21760 v.reset(OpEq64F)
21761 v.AddArg2(x, y)
21762 return true
21763 }
21764
21765
21766 for {
21767 if v_0.Op != OpNeq32F {
21768 break
21769 }
21770 y := v_0.Args[1]
21771 x := v_0.Args[0]
21772 v.reset(OpEq32F)
21773 v.AddArg2(x, y)
21774 return true
21775 }
21776
21777
21778 for {
21779 if v_0.Op != OpLess64 {
21780 break
21781 }
21782 y := v_0.Args[1]
21783 x := v_0.Args[0]
21784 v.reset(OpLeq64)
21785 v.AddArg2(y, x)
21786 return true
21787 }
21788
21789
21790 for {
21791 if v_0.Op != OpLess32 {
21792 break
21793 }
21794 y := v_0.Args[1]
21795 x := v_0.Args[0]
21796 v.reset(OpLeq32)
21797 v.AddArg2(y, x)
21798 return true
21799 }
21800
21801
21802 for {
21803 if v_0.Op != OpLess16 {
21804 break
21805 }
21806 y := v_0.Args[1]
21807 x := v_0.Args[0]
21808 v.reset(OpLeq16)
21809 v.AddArg2(y, x)
21810 return true
21811 }
21812
21813
21814 for {
21815 if v_0.Op != OpLess8 {
21816 break
21817 }
21818 y := v_0.Args[1]
21819 x := v_0.Args[0]
21820 v.reset(OpLeq8)
21821 v.AddArg2(y, x)
21822 return true
21823 }
21824
21825
21826 for {
21827 if v_0.Op != OpLess64U {
21828 break
21829 }
21830 y := v_0.Args[1]
21831 x := v_0.Args[0]
21832 v.reset(OpLeq64U)
21833 v.AddArg2(y, x)
21834 return true
21835 }
21836
21837
21838 for {
21839 if v_0.Op != OpLess32U {
21840 break
21841 }
21842 y := v_0.Args[1]
21843 x := v_0.Args[0]
21844 v.reset(OpLeq32U)
21845 v.AddArg2(y, x)
21846 return true
21847 }
21848
21849
21850 for {
21851 if v_0.Op != OpLess16U {
21852 break
21853 }
21854 y := v_0.Args[1]
21855 x := v_0.Args[0]
21856 v.reset(OpLeq16U)
21857 v.AddArg2(y, x)
21858 return true
21859 }
21860
21861
21862 for {
21863 if v_0.Op != OpLess8U {
21864 break
21865 }
21866 y := v_0.Args[1]
21867 x := v_0.Args[0]
21868 v.reset(OpLeq8U)
21869 v.AddArg2(y, x)
21870 return true
21871 }
21872
21873
21874 for {
21875 if v_0.Op != OpLeq64 {
21876 break
21877 }
21878 y := v_0.Args[1]
21879 x := v_0.Args[0]
21880 v.reset(OpLess64)
21881 v.AddArg2(y, x)
21882 return true
21883 }
21884
21885
21886 for {
21887 if v_0.Op != OpLeq32 {
21888 break
21889 }
21890 y := v_0.Args[1]
21891 x := v_0.Args[0]
21892 v.reset(OpLess32)
21893 v.AddArg2(y, x)
21894 return true
21895 }
21896
21897
21898 for {
21899 if v_0.Op != OpLeq16 {
21900 break
21901 }
21902 y := v_0.Args[1]
21903 x := v_0.Args[0]
21904 v.reset(OpLess16)
21905 v.AddArg2(y, x)
21906 return true
21907 }
21908
21909
21910 for {
21911 if v_0.Op != OpLeq8 {
21912 break
21913 }
21914 y := v_0.Args[1]
21915 x := v_0.Args[0]
21916 v.reset(OpLess8)
21917 v.AddArg2(y, x)
21918 return true
21919 }
21920
21921
21922 for {
21923 if v_0.Op != OpLeq64U {
21924 break
21925 }
21926 y := v_0.Args[1]
21927 x := v_0.Args[0]
21928 v.reset(OpLess64U)
21929 v.AddArg2(y, x)
21930 return true
21931 }
21932
21933
21934 for {
21935 if v_0.Op != OpLeq32U {
21936 break
21937 }
21938 y := v_0.Args[1]
21939 x := v_0.Args[0]
21940 v.reset(OpLess32U)
21941 v.AddArg2(y, x)
21942 return true
21943 }
21944
21945
21946 for {
21947 if v_0.Op != OpLeq16U {
21948 break
21949 }
21950 y := v_0.Args[1]
21951 x := v_0.Args[0]
21952 v.reset(OpLess16U)
21953 v.AddArg2(y, x)
21954 return true
21955 }
21956
21957
21958 for {
21959 if v_0.Op != OpLeq8U {
21960 break
21961 }
21962 y := v_0.Args[1]
21963 x := v_0.Args[0]
21964 v.reset(OpLess8U)
21965 v.AddArg2(y, x)
21966 return true
21967 }
21968 return false
21969 }
21970 func rewriteValuegeneric_OpOffPtr(v *Value) bool {
21971 v_0 := v.Args[0]
21972
21973
21974 for {
21975 x := auxIntToInt64(v.AuxInt)
21976 if v_0.Op != OpOffPtr {
21977 break
21978 }
21979 y := auxIntToInt64(v_0.AuxInt)
21980 p := v_0.Args[0]
21981 v.reset(OpOffPtr)
21982 v.AuxInt = int64ToAuxInt(x + y)
21983 v.AddArg(p)
21984 return true
21985 }
21986
21987
21988
21989 for {
21990 if auxIntToInt64(v.AuxInt) != 0 {
21991 break
21992 }
21993 p := v_0
21994 if !(v.Type.Compare(p.Type) == types.CMPeq) {
21995 break
21996 }
21997 v.copyOf(p)
21998 return true
21999 }
22000 return false
22001 }
22002 func rewriteValuegeneric_OpOr16(v *Value) bool {
22003 v_1 := v.Args[1]
22004 v_0 := v.Args[0]
22005 b := v.Block
22006 config := b.Func.Config
22007
22008
22009 for {
22010 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22011 if v_0.Op != OpConst16 {
22012 continue
22013 }
22014 c := auxIntToInt16(v_0.AuxInt)
22015 if v_1.Op != OpConst16 {
22016 continue
22017 }
22018 d := auxIntToInt16(v_1.AuxInt)
22019 v.reset(OpConst16)
22020 v.AuxInt = int16ToAuxInt(c | d)
22021 return true
22022 }
22023 break
22024 }
22025
22026
22027 for {
22028 t := v.Type
22029 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22030 if v_0.Op != OpCom16 {
22031 continue
22032 }
22033 x := v_0.Args[0]
22034 if v_1.Op != OpCom16 {
22035 continue
22036 }
22037 y := v_1.Args[0]
22038 v.reset(OpCom16)
22039 v0 := b.NewValue0(v.Pos, OpAnd16, t)
22040 v0.AddArg2(x, y)
22041 v.AddArg(v0)
22042 return true
22043 }
22044 break
22045 }
22046
22047
22048 for {
22049 x := v_0
22050 if x != v_1 {
22051 break
22052 }
22053 v.copyOf(x)
22054 return true
22055 }
22056
22057
22058 for {
22059 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22060 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 {
22061 continue
22062 }
22063 x := v_1
22064 v.copyOf(x)
22065 return true
22066 }
22067 break
22068 }
22069
22070
22071 for {
22072 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22073 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != -1 {
22074 continue
22075 }
22076 v.reset(OpConst16)
22077 v.AuxInt = int16ToAuxInt(-1)
22078 return true
22079 }
22080 break
22081 }
22082
22083
22084 for {
22085 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22086 if v_0.Op != OpCom16 {
22087 continue
22088 }
22089 x := v_0.Args[0]
22090 if x != v_1 {
22091 continue
22092 }
22093 v.reset(OpConst16)
22094 v.AuxInt = int16ToAuxInt(-1)
22095 return true
22096 }
22097 break
22098 }
22099
22100
22101 for {
22102 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22103 x := v_0
22104 if v_1.Op != OpOr16 {
22105 continue
22106 }
22107 _ = v_1.Args[1]
22108 v_1_0 := v_1.Args[0]
22109 v_1_1 := v_1.Args[1]
22110 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
22111 if x != v_1_0 {
22112 continue
22113 }
22114 y := v_1_1
22115 v.reset(OpOr16)
22116 v.AddArg2(x, y)
22117 return true
22118 }
22119 }
22120 break
22121 }
22122
22123
22124
22125 for {
22126 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22127 if v_0.Op != OpAnd16 {
22128 continue
22129 }
22130 _ = v_0.Args[1]
22131 v_0_0 := v_0.Args[0]
22132 v_0_1 := v_0.Args[1]
22133 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
22134 x := v_0_0
22135 if v_0_1.Op != OpConst16 {
22136 continue
22137 }
22138 c2 := auxIntToInt16(v_0_1.AuxInt)
22139 if v_1.Op != OpConst16 {
22140 continue
22141 }
22142 t := v_1.Type
22143 c1 := auxIntToInt16(v_1.AuxInt)
22144 if !(^(c1 | c2) == 0) {
22145 continue
22146 }
22147 v.reset(OpOr16)
22148 v0 := b.NewValue0(v.Pos, OpConst16, t)
22149 v0.AuxInt = int16ToAuxInt(c1)
22150 v.AddArg2(v0, x)
22151 return true
22152 }
22153 }
22154 break
22155 }
22156
22157
22158
22159 for {
22160 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22161 if v_0.Op != OpOr16 {
22162 continue
22163 }
22164 _ = v_0.Args[1]
22165 v_0_0 := v_0.Args[0]
22166 v_0_1 := v_0.Args[1]
22167 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
22168 i := v_0_0
22169 if i.Op != OpConst16 {
22170 continue
22171 }
22172 t := i.Type
22173 z := v_0_1
22174 x := v_1
22175 if !(z.Op != OpConst16 && x.Op != OpConst16) {
22176 continue
22177 }
22178 v.reset(OpOr16)
22179 v0 := b.NewValue0(v.Pos, OpOr16, t)
22180 v0.AddArg2(z, x)
22181 v.AddArg2(i, v0)
22182 return true
22183 }
22184 }
22185 break
22186 }
22187
22188
22189 for {
22190 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22191 if v_0.Op != OpConst16 {
22192 continue
22193 }
22194 t := v_0.Type
22195 c := auxIntToInt16(v_0.AuxInt)
22196 if v_1.Op != OpOr16 {
22197 continue
22198 }
22199 _ = v_1.Args[1]
22200 v_1_0 := v_1.Args[0]
22201 v_1_1 := v_1.Args[1]
22202 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
22203 if v_1_0.Op != OpConst16 || v_1_0.Type != t {
22204 continue
22205 }
22206 d := auxIntToInt16(v_1_0.AuxInt)
22207 x := v_1_1
22208 v.reset(OpOr16)
22209 v0 := b.NewValue0(v.Pos, OpConst16, t)
22210 v0.AuxInt = int16ToAuxInt(c | d)
22211 v.AddArg2(v0, x)
22212 return true
22213 }
22214 }
22215 break
22216 }
22217
22218
22219
22220 for {
22221 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22222 if v_0.Op != OpLsh16x64 {
22223 continue
22224 }
22225 _ = v_0.Args[1]
22226 x := v_0.Args[0]
22227 z := v_0.Args[1]
22228 if z.Op != OpConst64 {
22229 continue
22230 }
22231 c := auxIntToInt64(z.AuxInt)
22232 if v_1.Op != OpRsh16Ux64 {
22233 continue
22234 }
22235 _ = v_1.Args[1]
22236 if x != v_1.Args[0] {
22237 continue
22238 }
22239 v_1_1 := v_1.Args[1]
22240 if v_1_1.Op != OpConst64 {
22241 continue
22242 }
22243 d := auxIntToInt64(v_1_1.AuxInt)
22244 if !(c < 16 && d == 16-c && canRotate(config, 16)) {
22245 continue
22246 }
22247 v.reset(OpRotateLeft16)
22248 v.AddArg2(x, z)
22249 return true
22250 }
22251 break
22252 }
22253
22254
22255
22256 for {
22257 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22258 left := v_0
22259 if left.Op != OpLsh16x64 {
22260 continue
22261 }
22262 y := left.Args[1]
22263 x := left.Args[0]
22264 right := v_1
22265 if right.Op != OpRsh16Ux64 {
22266 continue
22267 }
22268 _ = right.Args[1]
22269 if x != right.Args[0] {
22270 continue
22271 }
22272 right_1 := right.Args[1]
22273 if right_1.Op != OpSub64 {
22274 continue
22275 }
22276 _ = right_1.Args[1]
22277 right_1_0 := right_1.Args[0]
22278 if right_1_0.Op != OpConst64 || auxIntToInt64(right_1_0.AuxInt) != 16 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 16)) {
22279 continue
22280 }
22281 v.reset(OpRotateLeft16)
22282 v.AddArg2(x, y)
22283 return true
22284 }
22285 break
22286 }
22287
22288
22289
22290 for {
22291 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22292 left := v_0
22293 if left.Op != OpLsh16x32 {
22294 continue
22295 }
22296 y := left.Args[1]
22297 x := left.Args[0]
22298 right := v_1
22299 if right.Op != OpRsh16Ux32 {
22300 continue
22301 }
22302 _ = right.Args[1]
22303 if x != right.Args[0] {
22304 continue
22305 }
22306 right_1 := right.Args[1]
22307 if right_1.Op != OpSub32 {
22308 continue
22309 }
22310 _ = right_1.Args[1]
22311 right_1_0 := right_1.Args[0]
22312 if right_1_0.Op != OpConst32 || auxIntToInt32(right_1_0.AuxInt) != 16 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 16)) {
22313 continue
22314 }
22315 v.reset(OpRotateLeft16)
22316 v.AddArg2(x, y)
22317 return true
22318 }
22319 break
22320 }
22321
22322
22323
22324 for {
22325 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22326 left := v_0
22327 if left.Op != OpLsh16x16 {
22328 continue
22329 }
22330 y := left.Args[1]
22331 x := left.Args[0]
22332 right := v_1
22333 if right.Op != OpRsh16Ux16 {
22334 continue
22335 }
22336 _ = right.Args[1]
22337 if x != right.Args[0] {
22338 continue
22339 }
22340 right_1 := right.Args[1]
22341 if right_1.Op != OpSub16 {
22342 continue
22343 }
22344 _ = right_1.Args[1]
22345 right_1_0 := right_1.Args[0]
22346 if right_1_0.Op != OpConst16 || auxIntToInt16(right_1_0.AuxInt) != 16 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 16)) {
22347 continue
22348 }
22349 v.reset(OpRotateLeft16)
22350 v.AddArg2(x, y)
22351 return true
22352 }
22353 break
22354 }
22355
22356
22357
22358 for {
22359 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22360 left := v_0
22361 if left.Op != OpLsh16x8 {
22362 continue
22363 }
22364 y := left.Args[1]
22365 x := left.Args[0]
22366 right := v_1
22367 if right.Op != OpRsh16Ux8 {
22368 continue
22369 }
22370 _ = right.Args[1]
22371 if x != right.Args[0] {
22372 continue
22373 }
22374 right_1 := right.Args[1]
22375 if right_1.Op != OpSub8 {
22376 continue
22377 }
22378 _ = right_1.Args[1]
22379 right_1_0 := right_1.Args[0]
22380 if right_1_0.Op != OpConst8 || auxIntToInt8(right_1_0.AuxInt) != 16 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 16)) {
22381 continue
22382 }
22383 v.reset(OpRotateLeft16)
22384 v.AddArg2(x, y)
22385 return true
22386 }
22387 break
22388 }
22389
22390
22391
22392 for {
22393 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22394 right := v_0
22395 if right.Op != OpRsh16Ux64 {
22396 continue
22397 }
22398 y := right.Args[1]
22399 x := right.Args[0]
22400 left := v_1
22401 if left.Op != OpLsh16x64 {
22402 continue
22403 }
22404 _ = left.Args[1]
22405 if x != left.Args[0] {
22406 continue
22407 }
22408 z := left.Args[1]
22409 if z.Op != OpSub64 {
22410 continue
22411 }
22412 _ = z.Args[1]
22413 z_0 := z.Args[0]
22414 if z_0.Op != OpConst64 || auxIntToInt64(z_0.AuxInt) != 16 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 16)) {
22415 continue
22416 }
22417 v.reset(OpRotateLeft16)
22418 v.AddArg2(x, z)
22419 return true
22420 }
22421 break
22422 }
22423
22424
22425
22426 for {
22427 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22428 right := v_0
22429 if right.Op != OpRsh16Ux32 {
22430 continue
22431 }
22432 y := right.Args[1]
22433 x := right.Args[0]
22434 left := v_1
22435 if left.Op != OpLsh16x32 {
22436 continue
22437 }
22438 _ = left.Args[1]
22439 if x != left.Args[0] {
22440 continue
22441 }
22442 z := left.Args[1]
22443 if z.Op != OpSub32 {
22444 continue
22445 }
22446 _ = z.Args[1]
22447 z_0 := z.Args[0]
22448 if z_0.Op != OpConst32 || auxIntToInt32(z_0.AuxInt) != 16 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 16)) {
22449 continue
22450 }
22451 v.reset(OpRotateLeft16)
22452 v.AddArg2(x, z)
22453 return true
22454 }
22455 break
22456 }
22457
22458
22459
22460 for {
22461 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22462 right := v_0
22463 if right.Op != OpRsh16Ux16 {
22464 continue
22465 }
22466 y := right.Args[1]
22467 x := right.Args[0]
22468 left := v_1
22469 if left.Op != OpLsh16x16 {
22470 continue
22471 }
22472 _ = left.Args[1]
22473 if x != left.Args[0] {
22474 continue
22475 }
22476 z := left.Args[1]
22477 if z.Op != OpSub16 {
22478 continue
22479 }
22480 _ = z.Args[1]
22481 z_0 := z.Args[0]
22482 if z_0.Op != OpConst16 || auxIntToInt16(z_0.AuxInt) != 16 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 16)) {
22483 continue
22484 }
22485 v.reset(OpRotateLeft16)
22486 v.AddArg2(x, z)
22487 return true
22488 }
22489 break
22490 }
22491
22492
22493
22494 for {
22495 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22496 right := v_0
22497 if right.Op != OpRsh16Ux8 {
22498 continue
22499 }
22500 y := right.Args[1]
22501 x := right.Args[0]
22502 left := v_1
22503 if left.Op != OpLsh16x8 {
22504 continue
22505 }
22506 _ = left.Args[1]
22507 if x != left.Args[0] {
22508 continue
22509 }
22510 z := left.Args[1]
22511 if z.Op != OpSub8 {
22512 continue
22513 }
22514 _ = z.Args[1]
22515 z_0 := z.Args[0]
22516 if z_0.Op != OpConst8 || auxIntToInt8(z_0.AuxInt) != 16 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 16)) {
22517 continue
22518 }
22519 v.reset(OpRotateLeft16)
22520 v.AddArg2(x, z)
22521 return true
22522 }
22523 break
22524 }
22525 return false
22526 }
22527 func rewriteValuegeneric_OpOr32(v *Value) bool {
22528 v_1 := v.Args[1]
22529 v_0 := v.Args[0]
22530 b := v.Block
22531 config := b.Func.Config
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 != OpConst32 {
22537 continue
22538 }
22539 c := auxIntToInt32(v_0.AuxInt)
22540 if v_1.Op != OpConst32 {
22541 continue
22542 }
22543 d := auxIntToInt32(v_1.AuxInt)
22544 v.reset(OpConst32)
22545 v.AuxInt = int32ToAuxInt(c | d)
22546 return true
22547 }
22548 break
22549 }
22550
22551
22552 for {
22553 t := v.Type
22554 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22555 if v_0.Op != OpCom32 {
22556 continue
22557 }
22558 x := v_0.Args[0]
22559 if v_1.Op != OpCom32 {
22560 continue
22561 }
22562 y := v_1.Args[0]
22563 v.reset(OpCom32)
22564 v0 := b.NewValue0(v.Pos, OpAnd32, t)
22565 v0.AddArg2(x, y)
22566 v.AddArg(v0)
22567 return true
22568 }
22569 break
22570 }
22571
22572
22573 for {
22574 x := v_0
22575 if x != v_1 {
22576 break
22577 }
22578 v.copyOf(x)
22579 return true
22580 }
22581
22582
22583 for {
22584 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22585 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
22586 continue
22587 }
22588 x := v_1
22589 v.copyOf(x)
22590 return true
22591 }
22592 break
22593 }
22594
22595
22596 for {
22597 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22598 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != -1 {
22599 continue
22600 }
22601 v.reset(OpConst32)
22602 v.AuxInt = int32ToAuxInt(-1)
22603 return true
22604 }
22605 break
22606 }
22607
22608
22609 for {
22610 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22611 if v_0.Op != OpCom32 {
22612 continue
22613 }
22614 x := v_0.Args[0]
22615 if x != v_1 {
22616 continue
22617 }
22618 v.reset(OpConst32)
22619 v.AuxInt = int32ToAuxInt(-1)
22620 return true
22621 }
22622 break
22623 }
22624
22625
22626 for {
22627 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22628 x := v_0
22629 if v_1.Op != OpOr32 {
22630 continue
22631 }
22632 _ = v_1.Args[1]
22633 v_1_0 := v_1.Args[0]
22634 v_1_1 := v_1.Args[1]
22635 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
22636 if x != v_1_0 {
22637 continue
22638 }
22639 y := v_1_1
22640 v.reset(OpOr32)
22641 v.AddArg2(x, y)
22642 return true
22643 }
22644 }
22645 break
22646 }
22647
22648
22649
22650 for {
22651 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22652 if v_0.Op != OpAnd32 {
22653 continue
22654 }
22655 _ = v_0.Args[1]
22656 v_0_0 := v_0.Args[0]
22657 v_0_1 := v_0.Args[1]
22658 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
22659 x := v_0_0
22660 if v_0_1.Op != OpConst32 {
22661 continue
22662 }
22663 c2 := auxIntToInt32(v_0_1.AuxInt)
22664 if v_1.Op != OpConst32 {
22665 continue
22666 }
22667 t := v_1.Type
22668 c1 := auxIntToInt32(v_1.AuxInt)
22669 if !(^(c1 | c2) == 0) {
22670 continue
22671 }
22672 v.reset(OpOr32)
22673 v0 := b.NewValue0(v.Pos, OpConst32, t)
22674 v0.AuxInt = int32ToAuxInt(c1)
22675 v.AddArg2(v0, x)
22676 return true
22677 }
22678 }
22679 break
22680 }
22681
22682
22683
22684 for {
22685 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22686 if v_0.Op != OpOr32 {
22687 continue
22688 }
22689 _ = v_0.Args[1]
22690 v_0_0 := v_0.Args[0]
22691 v_0_1 := v_0.Args[1]
22692 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
22693 i := v_0_0
22694 if i.Op != OpConst32 {
22695 continue
22696 }
22697 t := i.Type
22698 z := v_0_1
22699 x := v_1
22700 if !(z.Op != OpConst32 && x.Op != OpConst32) {
22701 continue
22702 }
22703 v.reset(OpOr32)
22704 v0 := b.NewValue0(v.Pos, OpOr32, t)
22705 v0.AddArg2(z, x)
22706 v.AddArg2(i, v0)
22707 return true
22708 }
22709 }
22710 break
22711 }
22712
22713
22714 for {
22715 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22716 if v_0.Op != OpConst32 {
22717 continue
22718 }
22719 t := v_0.Type
22720 c := auxIntToInt32(v_0.AuxInt)
22721 if v_1.Op != OpOr32 {
22722 continue
22723 }
22724 _ = v_1.Args[1]
22725 v_1_0 := v_1.Args[0]
22726 v_1_1 := v_1.Args[1]
22727 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
22728 if v_1_0.Op != OpConst32 || v_1_0.Type != t {
22729 continue
22730 }
22731 d := auxIntToInt32(v_1_0.AuxInt)
22732 x := v_1_1
22733 v.reset(OpOr32)
22734 v0 := b.NewValue0(v.Pos, OpConst32, t)
22735 v0.AuxInt = int32ToAuxInt(c | d)
22736 v.AddArg2(v0, x)
22737 return true
22738 }
22739 }
22740 break
22741 }
22742
22743
22744
22745 for {
22746 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22747 if v_0.Op != OpLsh32x64 {
22748 continue
22749 }
22750 _ = v_0.Args[1]
22751 x := v_0.Args[0]
22752 z := v_0.Args[1]
22753 if z.Op != OpConst64 {
22754 continue
22755 }
22756 c := auxIntToInt64(z.AuxInt)
22757 if v_1.Op != OpRsh32Ux64 {
22758 continue
22759 }
22760 _ = v_1.Args[1]
22761 if x != v_1.Args[0] {
22762 continue
22763 }
22764 v_1_1 := v_1.Args[1]
22765 if v_1_1.Op != OpConst64 {
22766 continue
22767 }
22768 d := auxIntToInt64(v_1_1.AuxInt)
22769 if !(c < 32 && d == 32-c && canRotate(config, 32)) {
22770 continue
22771 }
22772 v.reset(OpRotateLeft32)
22773 v.AddArg2(x, z)
22774 return true
22775 }
22776 break
22777 }
22778
22779
22780
22781 for {
22782 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22783 left := v_0
22784 if left.Op != OpLsh32x64 {
22785 continue
22786 }
22787 y := left.Args[1]
22788 x := left.Args[0]
22789 right := v_1
22790 if right.Op != OpRsh32Ux64 {
22791 continue
22792 }
22793 _ = right.Args[1]
22794 if x != right.Args[0] {
22795 continue
22796 }
22797 right_1 := right.Args[1]
22798 if right_1.Op != OpSub64 {
22799 continue
22800 }
22801 _ = right_1.Args[1]
22802 right_1_0 := right_1.Args[0]
22803 if right_1_0.Op != OpConst64 || auxIntToInt64(right_1_0.AuxInt) != 32 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 32)) {
22804 continue
22805 }
22806 v.reset(OpRotateLeft32)
22807 v.AddArg2(x, y)
22808 return true
22809 }
22810 break
22811 }
22812
22813
22814
22815 for {
22816 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22817 left := v_0
22818 if left.Op != OpLsh32x32 {
22819 continue
22820 }
22821 y := left.Args[1]
22822 x := left.Args[0]
22823 right := v_1
22824 if right.Op != OpRsh32Ux32 {
22825 continue
22826 }
22827 _ = right.Args[1]
22828 if x != right.Args[0] {
22829 continue
22830 }
22831 right_1 := right.Args[1]
22832 if right_1.Op != OpSub32 {
22833 continue
22834 }
22835 _ = right_1.Args[1]
22836 right_1_0 := right_1.Args[0]
22837 if right_1_0.Op != OpConst32 || auxIntToInt32(right_1_0.AuxInt) != 32 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 32)) {
22838 continue
22839 }
22840 v.reset(OpRotateLeft32)
22841 v.AddArg2(x, y)
22842 return true
22843 }
22844 break
22845 }
22846
22847
22848
22849 for {
22850 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22851 left := v_0
22852 if left.Op != OpLsh32x16 {
22853 continue
22854 }
22855 y := left.Args[1]
22856 x := left.Args[0]
22857 right := v_1
22858 if right.Op != OpRsh32Ux16 {
22859 continue
22860 }
22861 _ = right.Args[1]
22862 if x != right.Args[0] {
22863 continue
22864 }
22865 right_1 := right.Args[1]
22866 if right_1.Op != OpSub16 {
22867 continue
22868 }
22869 _ = right_1.Args[1]
22870 right_1_0 := right_1.Args[0]
22871 if right_1_0.Op != OpConst16 || auxIntToInt16(right_1_0.AuxInt) != 32 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 32)) {
22872 continue
22873 }
22874 v.reset(OpRotateLeft32)
22875 v.AddArg2(x, y)
22876 return true
22877 }
22878 break
22879 }
22880
22881
22882
22883 for {
22884 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22885 left := v_0
22886 if left.Op != OpLsh32x8 {
22887 continue
22888 }
22889 y := left.Args[1]
22890 x := left.Args[0]
22891 right := v_1
22892 if right.Op != OpRsh32Ux8 {
22893 continue
22894 }
22895 _ = right.Args[1]
22896 if x != right.Args[0] {
22897 continue
22898 }
22899 right_1 := right.Args[1]
22900 if right_1.Op != OpSub8 {
22901 continue
22902 }
22903 _ = right_1.Args[1]
22904 right_1_0 := right_1.Args[0]
22905 if right_1_0.Op != OpConst8 || auxIntToInt8(right_1_0.AuxInt) != 32 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 32)) {
22906 continue
22907 }
22908 v.reset(OpRotateLeft32)
22909 v.AddArg2(x, y)
22910 return true
22911 }
22912 break
22913 }
22914
22915
22916
22917 for {
22918 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22919 right := v_0
22920 if right.Op != OpRsh32Ux64 {
22921 continue
22922 }
22923 y := right.Args[1]
22924 x := right.Args[0]
22925 left := v_1
22926 if left.Op != OpLsh32x64 {
22927 continue
22928 }
22929 _ = left.Args[1]
22930 if x != left.Args[0] {
22931 continue
22932 }
22933 z := left.Args[1]
22934 if z.Op != OpSub64 {
22935 continue
22936 }
22937 _ = z.Args[1]
22938 z_0 := z.Args[0]
22939 if z_0.Op != OpConst64 || auxIntToInt64(z_0.AuxInt) != 32 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 32)) {
22940 continue
22941 }
22942 v.reset(OpRotateLeft32)
22943 v.AddArg2(x, z)
22944 return true
22945 }
22946 break
22947 }
22948
22949
22950
22951 for {
22952 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22953 right := v_0
22954 if right.Op != OpRsh32Ux32 {
22955 continue
22956 }
22957 y := right.Args[1]
22958 x := right.Args[0]
22959 left := v_1
22960 if left.Op != OpLsh32x32 {
22961 continue
22962 }
22963 _ = left.Args[1]
22964 if x != left.Args[0] {
22965 continue
22966 }
22967 z := left.Args[1]
22968 if z.Op != OpSub32 {
22969 continue
22970 }
22971 _ = z.Args[1]
22972 z_0 := z.Args[0]
22973 if z_0.Op != OpConst32 || auxIntToInt32(z_0.AuxInt) != 32 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 32)) {
22974 continue
22975 }
22976 v.reset(OpRotateLeft32)
22977 v.AddArg2(x, z)
22978 return true
22979 }
22980 break
22981 }
22982
22983
22984
22985 for {
22986 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22987 right := v_0
22988 if right.Op != OpRsh32Ux16 {
22989 continue
22990 }
22991 y := right.Args[1]
22992 x := right.Args[0]
22993 left := v_1
22994 if left.Op != OpLsh32x16 {
22995 continue
22996 }
22997 _ = left.Args[1]
22998 if x != left.Args[0] {
22999 continue
23000 }
23001 z := left.Args[1]
23002 if z.Op != OpSub16 {
23003 continue
23004 }
23005 _ = z.Args[1]
23006 z_0 := z.Args[0]
23007 if z_0.Op != OpConst16 || auxIntToInt16(z_0.AuxInt) != 32 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 32)) {
23008 continue
23009 }
23010 v.reset(OpRotateLeft32)
23011 v.AddArg2(x, z)
23012 return true
23013 }
23014 break
23015 }
23016
23017
23018
23019 for {
23020 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23021 right := v_0
23022 if right.Op != OpRsh32Ux8 {
23023 continue
23024 }
23025 y := right.Args[1]
23026 x := right.Args[0]
23027 left := v_1
23028 if left.Op != OpLsh32x8 {
23029 continue
23030 }
23031 _ = left.Args[1]
23032 if x != left.Args[0] {
23033 continue
23034 }
23035 z := left.Args[1]
23036 if z.Op != OpSub8 {
23037 continue
23038 }
23039 _ = z.Args[1]
23040 z_0 := z.Args[0]
23041 if z_0.Op != OpConst8 || auxIntToInt8(z_0.AuxInt) != 32 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 32)) {
23042 continue
23043 }
23044 v.reset(OpRotateLeft32)
23045 v.AddArg2(x, z)
23046 return true
23047 }
23048 break
23049 }
23050 return false
23051 }
23052 func rewriteValuegeneric_OpOr64(v *Value) bool {
23053 v_1 := v.Args[1]
23054 v_0 := v.Args[0]
23055 b := v.Block
23056 config := b.Func.Config
23057
23058
23059 for {
23060 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23061 if v_0.Op != OpConst64 {
23062 continue
23063 }
23064 c := auxIntToInt64(v_0.AuxInt)
23065 if v_1.Op != OpConst64 {
23066 continue
23067 }
23068 d := auxIntToInt64(v_1.AuxInt)
23069 v.reset(OpConst64)
23070 v.AuxInt = int64ToAuxInt(c | d)
23071 return true
23072 }
23073 break
23074 }
23075
23076
23077 for {
23078 t := v.Type
23079 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23080 if v_0.Op != OpCom64 {
23081 continue
23082 }
23083 x := v_0.Args[0]
23084 if v_1.Op != OpCom64 {
23085 continue
23086 }
23087 y := v_1.Args[0]
23088 v.reset(OpCom64)
23089 v0 := b.NewValue0(v.Pos, OpAnd64, t)
23090 v0.AddArg2(x, y)
23091 v.AddArg(v0)
23092 return true
23093 }
23094 break
23095 }
23096
23097
23098 for {
23099 x := v_0
23100 if x != v_1 {
23101 break
23102 }
23103 v.copyOf(x)
23104 return true
23105 }
23106
23107
23108 for {
23109 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23110 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
23111 continue
23112 }
23113 x := v_1
23114 v.copyOf(x)
23115 return true
23116 }
23117 break
23118 }
23119
23120
23121 for {
23122 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23123 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != -1 {
23124 continue
23125 }
23126 v.reset(OpConst64)
23127 v.AuxInt = int64ToAuxInt(-1)
23128 return true
23129 }
23130 break
23131 }
23132
23133
23134 for {
23135 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23136 if v_0.Op != OpCom64 {
23137 continue
23138 }
23139 x := v_0.Args[0]
23140 if x != v_1 {
23141 continue
23142 }
23143 v.reset(OpConst64)
23144 v.AuxInt = int64ToAuxInt(-1)
23145 return true
23146 }
23147 break
23148 }
23149
23150
23151 for {
23152 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23153 x := v_0
23154 if v_1.Op != OpOr64 {
23155 continue
23156 }
23157 _ = v_1.Args[1]
23158 v_1_0 := v_1.Args[0]
23159 v_1_1 := v_1.Args[1]
23160 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
23161 if x != v_1_0 {
23162 continue
23163 }
23164 y := v_1_1
23165 v.reset(OpOr64)
23166 v.AddArg2(x, y)
23167 return true
23168 }
23169 }
23170 break
23171 }
23172
23173
23174
23175 for {
23176 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23177 if v_0.Op != OpAnd64 {
23178 continue
23179 }
23180 _ = v_0.Args[1]
23181 v_0_0 := v_0.Args[0]
23182 v_0_1 := v_0.Args[1]
23183 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
23184 x := v_0_0
23185 if v_0_1.Op != OpConst64 {
23186 continue
23187 }
23188 c2 := auxIntToInt64(v_0_1.AuxInt)
23189 if v_1.Op != OpConst64 {
23190 continue
23191 }
23192 t := v_1.Type
23193 c1 := auxIntToInt64(v_1.AuxInt)
23194 if !(^(c1 | c2) == 0) {
23195 continue
23196 }
23197 v.reset(OpOr64)
23198 v0 := b.NewValue0(v.Pos, OpConst64, t)
23199 v0.AuxInt = int64ToAuxInt(c1)
23200 v.AddArg2(v0, x)
23201 return true
23202 }
23203 }
23204 break
23205 }
23206
23207
23208
23209 for {
23210 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23211 if v_0.Op != OpOr64 {
23212 continue
23213 }
23214 _ = v_0.Args[1]
23215 v_0_0 := v_0.Args[0]
23216 v_0_1 := v_0.Args[1]
23217 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
23218 i := v_0_0
23219 if i.Op != OpConst64 {
23220 continue
23221 }
23222 t := i.Type
23223 z := v_0_1
23224 x := v_1
23225 if !(z.Op != OpConst64 && x.Op != OpConst64) {
23226 continue
23227 }
23228 v.reset(OpOr64)
23229 v0 := b.NewValue0(v.Pos, OpOr64, t)
23230 v0.AddArg2(z, x)
23231 v.AddArg2(i, v0)
23232 return true
23233 }
23234 }
23235 break
23236 }
23237
23238
23239 for {
23240 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23241 if v_0.Op != OpConst64 {
23242 continue
23243 }
23244 t := v_0.Type
23245 c := auxIntToInt64(v_0.AuxInt)
23246 if v_1.Op != OpOr64 {
23247 continue
23248 }
23249 _ = v_1.Args[1]
23250 v_1_0 := v_1.Args[0]
23251 v_1_1 := v_1.Args[1]
23252 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
23253 if v_1_0.Op != OpConst64 || v_1_0.Type != t {
23254 continue
23255 }
23256 d := auxIntToInt64(v_1_0.AuxInt)
23257 x := v_1_1
23258 v.reset(OpOr64)
23259 v0 := b.NewValue0(v.Pos, OpConst64, t)
23260 v0.AuxInt = int64ToAuxInt(c | d)
23261 v.AddArg2(v0, x)
23262 return true
23263 }
23264 }
23265 break
23266 }
23267
23268
23269
23270 for {
23271 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23272 if v_0.Op != OpLsh64x64 {
23273 continue
23274 }
23275 _ = v_0.Args[1]
23276 x := v_0.Args[0]
23277 z := v_0.Args[1]
23278 if z.Op != OpConst64 {
23279 continue
23280 }
23281 c := auxIntToInt64(z.AuxInt)
23282 if v_1.Op != OpRsh64Ux64 {
23283 continue
23284 }
23285 _ = v_1.Args[1]
23286 if x != v_1.Args[0] {
23287 continue
23288 }
23289 v_1_1 := v_1.Args[1]
23290 if v_1_1.Op != OpConst64 {
23291 continue
23292 }
23293 d := auxIntToInt64(v_1_1.AuxInt)
23294 if !(c < 64 && d == 64-c && canRotate(config, 64)) {
23295 continue
23296 }
23297 v.reset(OpRotateLeft64)
23298 v.AddArg2(x, z)
23299 return true
23300 }
23301 break
23302 }
23303
23304
23305
23306 for {
23307 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23308 left := v_0
23309 if left.Op != OpLsh64x64 {
23310 continue
23311 }
23312 y := left.Args[1]
23313 x := left.Args[0]
23314 right := v_1
23315 if right.Op != OpRsh64Ux64 {
23316 continue
23317 }
23318 _ = right.Args[1]
23319 if x != right.Args[0] {
23320 continue
23321 }
23322 right_1 := right.Args[1]
23323 if right_1.Op != OpSub64 {
23324 continue
23325 }
23326 _ = right_1.Args[1]
23327 right_1_0 := right_1.Args[0]
23328 if right_1_0.Op != OpConst64 || auxIntToInt64(right_1_0.AuxInt) != 64 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 64)) {
23329 continue
23330 }
23331 v.reset(OpRotateLeft64)
23332 v.AddArg2(x, y)
23333 return true
23334 }
23335 break
23336 }
23337
23338
23339
23340 for {
23341 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23342 left := v_0
23343 if left.Op != OpLsh64x32 {
23344 continue
23345 }
23346 y := left.Args[1]
23347 x := left.Args[0]
23348 right := v_1
23349 if right.Op != OpRsh64Ux32 {
23350 continue
23351 }
23352 _ = right.Args[1]
23353 if x != right.Args[0] {
23354 continue
23355 }
23356 right_1 := right.Args[1]
23357 if right_1.Op != OpSub32 {
23358 continue
23359 }
23360 _ = right_1.Args[1]
23361 right_1_0 := right_1.Args[0]
23362 if right_1_0.Op != OpConst32 || auxIntToInt32(right_1_0.AuxInt) != 64 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 64)) {
23363 continue
23364 }
23365 v.reset(OpRotateLeft64)
23366 v.AddArg2(x, y)
23367 return true
23368 }
23369 break
23370 }
23371
23372
23373
23374 for {
23375 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23376 left := v_0
23377 if left.Op != OpLsh64x16 {
23378 continue
23379 }
23380 y := left.Args[1]
23381 x := left.Args[0]
23382 right := v_1
23383 if right.Op != OpRsh64Ux16 {
23384 continue
23385 }
23386 _ = right.Args[1]
23387 if x != right.Args[0] {
23388 continue
23389 }
23390 right_1 := right.Args[1]
23391 if right_1.Op != OpSub16 {
23392 continue
23393 }
23394 _ = right_1.Args[1]
23395 right_1_0 := right_1.Args[0]
23396 if right_1_0.Op != OpConst16 || auxIntToInt16(right_1_0.AuxInt) != 64 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 64)) {
23397 continue
23398 }
23399 v.reset(OpRotateLeft64)
23400 v.AddArg2(x, y)
23401 return true
23402 }
23403 break
23404 }
23405
23406
23407
23408 for {
23409 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23410 left := v_0
23411 if left.Op != OpLsh64x8 {
23412 continue
23413 }
23414 y := left.Args[1]
23415 x := left.Args[0]
23416 right := v_1
23417 if right.Op != OpRsh64Ux8 {
23418 continue
23419 }
23420 _ = right.Args[1]
23421 if x != right.Args[0] {
23422 continue
23423 }
23424 right_1 := right.Args[1]
23425 if right_1.Op != OpSub8 {
23426 continue
23427 }
23428 _ = right_1.Args[1]
23429 right_1_0 := right_1.Args[0]
23430 if right_1_0.Op != OpConst8 || auxIntToInt8(right_1_0.AuxInt) != 64 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 64)) {
23431 continue
23432 }
23433 v.reset(OpRotateLeft64)
23434 v.AddArg2(x, y)
23435 return true
23436 }
23437 break
23438 }
23439
23440
23441
23442 for {
23443 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23444 right := v_0
23445 if right.Op != OpRsh64Ux64 {
23446 continue
23447 }
23448 y := right.Args[1]
23449 x := right.Args[0]
23450 left := v_1
23451 if left.Op != OpLsh64x64 {
23452 continue
23453 }
23454 _ = left.Args[1]
23455 if x != left.Args[0] {
23456 continue
23457 }
23458 z := left.Args[1]
23459 if z.Op != OpSub64 {
23460 continue
23461 }
23462 _ = z.Args[1]
23463 z_0 := z.Args[0]
23464 if z_0.Op != OpConst64 || auxIntToInt64(z_0.AuxInt) != 64 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 64)) {
23465 continue
23466 }
23467 v.reset(OpRotateLeft64)
23468 v.AddArg2(x, z)
23469 return true
23470 }
23471 break
23472 }
23473
23474
23475
23476 for {
23477 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23478 right := v_0
23479 if right.Op != OpRsh64Ux32 {
23480 continue
23481 }
23482 y := right.Args[1]
23483 x := right.Args[0]
23484 left := v_1
23485 if left.Op != OpLsh64x32 {
23486 continue
23487 }
23488 _ = left.Args[1]
23489 if x != left.Args[0] {
23490 continue
23491 }
23492 z := left.Args[1]
23493 if z.Op != OpSub32 {
23494 continue
23495 }
23496 _ = z.Args[1]
23497 z_0 := z.Args[0]
23498 if z_0.Op != OpConst32 || auxIntToInt32(z_0.AuxInt) != 64 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 64)) {
23499 continue
23500 }
23501 v.reset(OpRotateLeft64)
23502 v.AddArg2(x, z)
23503 return true
23504 }
23505 break
23506 }
23507
23508
23509
23510 for {
23511 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23512 right := v_0
23513 if right.Op != OpRsh64Ux16 {
23514 continue
23515 }
23516 y := right.Args[1]
23517 x := right.Args[0]
23518 left := v_1
23519 if left.Op != OpLsh64x16 {
23520 continue
23521 }
23522 _ = left.Args[1]
23523 if x != left.Args[0] {
23524 continue
23525 }
23526 z := left.Args[1]
23527 if z.Op != OpSub16 {
23528 continue
23529 }
23530 _ = z.Args[1]
23531 z_0 := z.Args[0]
23532 if z_0.Op != OpConst16 || auxIntToInt16(z_0.AuxInt) != 64 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 64)) {
23533 continue
23534 }
23535 v.reset(OpRotateLeft64)
23536 v.AddArg2(x, z)
23537 return true
23538 }
23539 break
23540 }
23541
23542
23543
23544 for {
23545 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23546 right := v_0
23547 if right.Op != OpRsh64Ux8 {
23548 continue
23549 }
23550 y := right.Args[1]
23551 x := right.Args[0]
23552 left := v_1
23553 if left.Op != OpLsh64x8 {
23554 continue
23555 }
23556 _ = left.Args[1]
23557 if x != left.Args[0] {
23558 continue
23559 }
23560 z := left.Args[1]
23561 if z.Op != OpSub8 {
23562 continue
23563 }
23564 _ = z.Args[1]
23565 z_0 := z.Args[0]
23566 if z_0.Op != OpConst8 || auxIntToInt8(z_0.AuxInt) != 64 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 64)) {
23567 continue
23568 }
23569 v.reset(OpRotateLeft64)
23570 v.AddArg2(x, z)
23571 return true
23572 }
23573 break
23574 }
23575 return false
23576 }
23577 func rewriteValuegeneric_OpOr8(v *Value) bool {
23578 v_1 := v.Args[1]
23579 v_0 := v.Args[0]
23580 b := v.Block
23581 config := b.Func.Config
23582
23583
23584 for {
23585 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23586 if v_0.Op != OpConst8 {
23587 continue
23588 }
23589 c := auxIntToInt8(v_0.AuxInt)
23590 if v_1.Op != OpConst8 {
23591 continue
23592 }
23593 d := auxIntToInt8(v_1.AuxInt)
23594 v.reset(OpConst8)
23595 v.AuxInt = int8ToAuxInt(c | d)
23596 return true
23597 }
23598 break
23599 }
23600
23601
23602 for {
23603 t := v.Type
23604 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23605 if v_0.Op != OpCom8 {
23606 continue
23607 }
23608 x := v_0.Args[0]
23609 if v_1.Op != OpCom8 {
23610 continue
23611 }
23612 y := v_1.Args[0]
23613 v.reset(OpCom8)
23614 v0 := b.NewValue0(v.Pos, OpAnd8, t)
23615 v0.AddArg2(x, y)
23616 v.AddArg(v0)
23617 return true
23618 }
23619 break
23620 }
23621
23622
23623 for {
23624 x := v_0
23625 if x != v_1 {
23626 break
23627 }
23628 v.copyOf(x)
23629 return true
23630 }
23631
23632
23633 for {
23634 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23635 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 {
23636 continue
23637 }
23638 x := v_1
23639 v.copyOf(x)
23640 return true
23641 }
23642 break
23643 }
23644
23645
23646 for {
23647 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23648 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != -1 {
23649 continue
23650 }
23651 v.reset(OpConst8)
23652 v.AuxInt = int8ToAuxInt(-1)
23653 return true
23654 }
23655 break
23656 }
23657
23658
23659 for {
23660 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23661 if v_0.Op != OpCom8 {
23662 continue
23663 }
23664 x := v_0.Args[0]
23665 if x != v_1 {
23666 continue
23667 }
23668 v.reset(OpConst8)
23669 v.AuxInt = int8ToAuxInt(-1)
23670 return true
23671 }
23672 break
23673 }
23674
23675
23676 for {
23677 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23678 x := v_0
23679 if v_1.Op != OpOr8 {
23680 continue
23681 }
23682 _ = v_1.Args[1]
23683 v_1_0 := v_1.Args[0]
23684 v_1_1 := v_1.Args[1]
23685 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
23686 if x != v_1_0 {
23687 continue
23688 }
23689 y := v_1_1
23690 v.reset(OpOr8)
23691 v.AddArg2(x, y)
23692 return true
23693 }
23694 }
23695 break
23696 }
23697
23698
23699
23700 for {
23701 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23702 if v_0.Op != OpAnd8 {
23703 continue
23704 }
23705 _ = v_0.Args[1]
23706 v_0_0 := v_0.Args[0]
23707 v_0_1 := v_0.Args[1]
23708 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
23709 x := v_0_0
23710 if v_0_1.Op != OpConst8 {
23711 continue
23712 }
23713 c2 := auxIntToInt8(v_0_1.AuxInt)
23714 if v_1.Op != OpConst8 {
23715 continue
23716 }
23717 t := v_1.Type
23718 c1 := auxIntToInt8(v_1.AuxInt)
23719 if !(^(c1 | c2) == 0) {
23720 continue
23721 }
23722 v.reset(OpOr8)
23723 v0 := b.NewValue0(v.Pos, OpConst8, t)
23724 v0.AuxInt = int8ToAuxInt(c1)
23725 v.AddArg2(v0, x)
23726 return true
23727 }
23728 }
23729 break
23730 }
23731
23732
23733
23734 for {
23735 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23736 if v_0.Op != OpOr8 {
23737 continue
23738 }
23739 _ = v_0.Args[1]
23740 v_0_0 := v_0.Args[0]
23741 v_0_1 := v_0.Args[1]
23742 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
23743 i := v_0_0
23744 if i.Op != OpConst8 {
23745 continue
23746 }
23747 t := i.Type
23748 z := v_0_1
23749 x := v_1
23750 if !(z.Op != OpConst8 && x.Op != OpConst8) {
23751 continue
23752 }
23753 v.reset(OpOr8)
23754 v0 := b.NewValue0(v.Pos, OpOr8, t)
23755 v0.AddArg2(z, x)
23756 v.AddArg2(i, v0)
23757 return true
23758 }
23759 }
23760 break
23761 }
23762
23763
23764 for {
23765 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23766 if v_0.Op != OpConst8 {
23767 continue
23768 }
23769 t := v_0.Type
23770 c := auxIntToInt8(v_0.AuxInt)
23771 if v_1.Op != OpOr8 {
23772 continue
23773 }
23774 _ = v_1.Args[1]
23775 v_1_0 := v_1.Args[0]
23776 v_1_1 := v_1.Args[1]
23777 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
23778 if v_1_0.Op != OpConst8 || v_1_0.Type != t {
23779 continue
23780 }
23781 d := auxIntToInt8(v_1_0.AuxInt)
23782 x := v_1_1
23783 v.reset(OpOr8)
23784 v0 := b.NewValue0(v.Pos, OpConst8, t)
23785 v0.AuxInt = int8ToAuxInt(c | d)
23786 v.AddArg2(v0, x)
23787 return true
23788 }
23789 }
23790 break
23791 }
23792
23793
23794
23795 for {
23796 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23797 if v_0.Op != OpLsh8x64 {
23798 continue
23799 }
23800 _ = v_0.Args[1]
23801 x := v_0.Args[0]
23802 z := v_0.Args[1]
23803 if z.Op != OpConst64 {
23804 continue
23805 }
23806 c := auxIntToInt64(z.AuxInt)
23807 if v_1.Op != OpRsh8Ux64 {
23808 continue
23809 }
23810 _ = v_1.Args[1]
23811 if x != v_1.Args[0] {
23812 continue
23813 }
23814 v_1_1 := v_1.Args[1]
23815 if v_1_1.Op != OpConst64 {
23816 continue
23817 }
23818 d := auxIntToInt64(v_1_1.AuxInt)
23819 if !(c < 8 && d == 8-c && canRotate(config, 8)) {
23820 continue
23821 }
23822 v.reset(OpRotateLeft8)
23823 v.AddArg2(x, z)
23824 return true
23825 }
23826 break
23827 }
23828
23829
23830
23831 for {
23832 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23833 left := v_0
23834 if left.Op != OpLsh8x64 {
23835 continue
23836 }
23837 y := left.Args[1]
23838 x := left.Args[0]
23839 right := v_1
23840 if right.Op != OpRsh8Ux64 {
23841 continue
23842 }
23843 _ = right.Args[1]
23844 if x != right.Args[0] {
23845 continue
23846 }
23847 right_1 := right.Args[1]
23848 if right_1.Op != OpSub64 {
23849 continue
23850 }
23851 _ = right_1.Args[1]
23852 right_1_0 := right_1.Args[0]
23853 if right_1_0.Op != OpConst64 || auxIntToInt64(right_1_0.AuxInt) != 8 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 8)) {
23854 continue
23855 }
23856 v.reset(OpRotateLeft8)
23857 v.AddArg2(x, y)
23858 return true
23859 }
23860 break
23861 }
23862
23863
23864
23865 for {
23866 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23867 left := v_0
23868 if left.Op != OpLsh8x32 {
23869 continue
23870 }
23871 y := left.Args[1]
23872 x := left.Args[0]
23873 right := v_1
23874 if right.Op != OpRsh8Ux32 {
23875 continue
23876 }
23877 _ = right.Args[1]
23878 if x != right.Args[0] {
23879 continue
23880 }
23881 right_1 := right.Args[1]
23882 if right_1.Op != OpSub32 {
23883 continue
23884 }
23885 _ = right_1.Args[1]
23886 right_1_0 := right_1.Args[0]
23887 if right_1_0.Op != OpConst32 || auxIntToInt32(right_1_0.AuxInt) != 8 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 8)) {
23888 continue
23889 }
23890 v.reset(OpRotateLeft8)
23891 v.AddArg2(x, y)
23892 return true
23893 }
23894 break
23895 }
23896
23897
23898
23899 for {
23900 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23901 left := v_0
23902 if left.Op != OpLsh8x16 {
23903 continue
23904 }
23905 y := left.Args[1]
23906 x := left.Args[0]
23907 right := v_1
23908 if right.Op != OpRsh8Ux16 {
23909 continue
23910 }
23911 _ = right.Args[1]
23912 if x != right.Args[0] {
23913 continue
23914 }
23915 right_1 := right.Args[1]
23916 if right_1.Op != OpSub16 {
23917 continue
23918 }
23919 _ = right_1.Args[1]
23920 right_1_0 := right_1.Args[0]
23921 if right_1_0.Op != OpConst16 || auxIntToInt16(right_1_0.AuxInt) != 8 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 8)) {
23922 continue
23923 }
23924 v.reset(OpRotateLeft8)
23925 v.AddArg2(x, y)
23926 return true
23927 }
23928 break
23929 }
23930
23931
23932
23933 for {
23934 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23935 left := v_0
23936 if left.Op != OpLsh8x8 {
23937 continue
23938 }
23939 y := left.Args[1]
23940 x := left.Args[0]
23941 right := v_1
23942 if right.Op != OpRsh8Ux8 {
23943 continue
23944 }
23945 _ = right.Args[1]
23946 if x != right.Args[0] {
23947 continue
23948 }
23949 right_1 := right.Args[1]
23950 if right_1.Op != OpSub8 {
23951 continue
23952 }
23953 _ = right_1.Args[1]
23954 right_1_0 := right_1.Args[0]
23955 if right_1_0.Op != OpConst8 || auxIntToInt8(right_1_0.AuxInt) != 8 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 8)) {
23956 continue
23957 }
23958 v.reset(OpRotateLeft8)
23959 v.AddArg2(x, y)
23960 return true
23961 }
23962 break
23963 }
23964
23965
23966
23967 for {
23968 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23969 right := v_0
23970 if right.Op != OpRsh8Ux64 {
23971 continue
23972 }
23973 y := right.Args[1]
23974 x := right.Args[0]
23975 left := v_1
23976 if left.Op != OpLsh8x64 {
23977 continue
23978 }
23979 _ = left.Args[1]
23980 if x != left.Args[0] {
23981 continue
23982 }
23983 z := left.Args[1]
23984 if z.Op != OpSub64 {
23985 continue
23986 }
23987 _ = z.Args[1]
23988 z_0 := z.Args[0]
23989 if z_0.Op != OpConst64 || auxIntToInt64(z_0.AuxInt) != 8 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 8)) {
23990 continue
23991 }
23992 v.reset(OpRotateLeft8)
23993 v.AddArg2(x, z)
23994 return true
23995 }
23996 break
23997 }
23998
23999
24000
24001 for {
24002 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
24003 right := v_0
24004 if right.Op != OpRsh8Ux32 {
24005 continue
24006 }
24007 y := right.Args[1]
24008 x := right.Args[0]
24009 left := v_1
24010 if left.Op != OpLsh8x32 {
24011 continue
24012 }
24013 _ = left.Args[1]
24014 if x != left.Args[0] {
24015 continue
24016 }
24017 z := left.Args[1]
24018 if z.Op != OpSub32 {
24019 continue
24020 }
24021 _ = z.Args[1]
24022 z_0 := z.Args[0]
24023 if z_0.Op != OpConst32 || auxIntToInt32(z_0.AuxInt) != 8 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 8)) {
24024 continue
24025 }
24026 v.reset(OpRotateLeft8)
24027 v.AddArg2(x, z)
24028 return true
24029 }
24030 break
24031 }
24032
24033
24034
24035 for {
24036 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
24037 right := v_0
24038 if right.Op != OpRsh8Ux16 {
24039 continue
24040 }
24041 y := right.Args[1]
24042 x := right.Args[0]
24043 left := v_1
24044 if left.Op != OpLsh8x16 {
24045 continue
24046 }
24047 _ = left.Args[1]
24048 if x != left.Args[0] {
24049 continue
24050 }
24051 z := left.Args[1]
24052 if z.Op != OpSub16 {
24053 continue
24054 }
24055 _ = z.Args[1]
24056 z_0 := z.Args[0]
24057 if z_0.Op != OpConst16 || auxIntToInt16(z_0.AuxInt) != 8 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 8)) {
24058 continue
24059 }
24060 v.reset(OpRotateLeft8)
24061 v.AddArg2(x, z)
24062 return true
24063 }
24064 break
24065 }
24066
24067
24068
24069 for {
24070 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
24071 right := v_0
24072 if right.Op != OpRsh8Ux8 {
24073 continue
24074 }
24075 y := right.Args[1]
24076 x := right.Args[0]
24077 left := v_1
24078 if left.Op != OpLsh8x8 {
24079 continue
24080 }
24081 _ = left.Args[1]
24082 if x != left.Args[0] {
24083 continue
24084 }
24085 z := left.Args[1]
24086 if z.Op != OpSub8 {
24087 continue
24088 }
24089 _ = z.Args[1]
24090 z_0 := z.Args[0]
24091 if z_0.Op != OpConst8 || auxIntToInt8(z_0.AuxInt) != 8 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 8)) {
24092 continue
24093 }
24094 v.reset(OpRotateLeft8)
24095 v.AddArg2(x, z)
24096 return true
24097 }
24098 break
24099 }
24100 return false
24101 }
24102 func rewriteValuegeneric_OpOrB(v *Value) bool {
24103 v_1 := v.Args[1]
24104 v_0 := v.Args[0]
24105 b := v.Block
24106
24107
24108
24109 for {
24110 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
24111 if v_0.Op != OpLess64 {
24112 continue
24113 }
24114 x := v_0.Args[1]
24115 v_0_0 := v_0.Args[0]
24116 if v_0_0.Op != OpConst64 {
24117 continue
24118 }
24119 c := auxIntToInt64(v_0_0.AuxInt)
24120 if v_1.Op != OpLess64 {
24121 continue
24122 }
24123 _ = v_1.Args[1]
24124 if x != v_1.Args[0] {
24125 continue
24126 }
24127 v_1_1 := v_1.Args[1]
24128 if v_1_1.Op != OpConst64 {
24129 continue
24130 }
24131 d := auxIntToInt64(v_1_1.AuxInt)
24132 if !(c >= d) {
24133 continue
24134 }
24135 v.reset(OpLess64U)
24136 v0 := b.NewValue0(v.Pos, OpConst64, x.Type)
24137 v0.AuxInt = int64ToAuxInt(c - d)
24138 v1 := b.NewValue0(v.Pos, OpSub64, x.Type)
24139 v2 := b.NewValue0(v.Pos, OpConst64, x.Type)
24140 v2.AuxInt = int64ToAuxInt(d)
24141 v1.AddArg2(x, v2)
24142 v.AddArg2(v0, v1)
24143 return true
24144 }
24145 break
24146 }
24147
24148
24149
24150 for {
24151 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
24152 if v_0.Op != OpLeq64 {
24153 continue
24154 }
24155 x := v_0.Args[1]
24156 v_0_0 := v_0.Args[0]
24157 if v_0_0.Op != OpConst64 {
24158 continue
24159 }
24160 c := auxIntToInt64(v_0_0.AuxInt)
24161 if v_1.Op != OpLess64 {
24162 continue
24163 }
24164 _ = v_1.Args[1]
24165 if x != v_1.Args[0] {
24166 continue
24167 }
24168 v_1_1 := v_1.Args[1]
24169 if v_1_1.Op != OpConst64 {
24170 continue
24171 }
24172 d := auxIntToInt64(v_1_1.AuxInt)
24173 if !(c >= d) {
24174 continue
24175 }
24176 v.reset(OpLeq64U)
24177 v0 := b.NewValue0(v.Pos, OpConst64, x.Type)
24178 v0.AuxInt = int64ToAuxInt(c - d)
24179 v1 := b.NewValue0(v.Pos, OpSub64, x.Type)
24180 v2 := b.NewValue0(v.Pos, OpConst64, x.Type)
24181 v2.AuxInt = int64ToAuxInt(d)
24182 v1.AddArg2(x, v2)
24183 v.AddArg2(v0, v1)
24184 return true
24185 }
24186 break
24187 }
24188
24189
24190
24191 for {
24192 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
24193 if v_0.Op != OpLess32 {
24194 continue
24195 }
24196 x := v_0.Args[1]
24197 v_0_0 := v_0.Args[0]
24198 if v_0_0.Op != OpConst32 {
24199 continue
24200 }
24201 c := auxIntToInt32(v_0_0.AuxInt)
24202 if v_1.Op != OpLess32 {
24203 continue
24204 }
24205 _ = v_1.Args[1]
24206 if x != v_1.Args[0] {
24207 continue
24208 }
24209 v_1_1 := v_1.Args[1]
24210 if v_1_1.Op != OpConst32 {
24211 continue
24212 }
24213 d := auxIntToInt32(v_1_1.AuxInt)
24214 if !(c >= d) {
24215 continue
24216 }
24217 v.reset(OpLess32U)
24218 v0 := b.NewValue0(v.Pos, OpConst32, x.Type)
24219 v0.AuxInt = int32ToAuxInt(c - d)
24220 v1 := b.NewValue0(v.Pos, OpSub32, x.Type)
24221 v2 := b.NewValue0(v.Pos, OpConst32, x.Type)
24222 v2.AuxInt = int32ToAuxInt(d)
24223 v1.AddArg2(x, v2)
24224 v.AddArg2(v0, v1)
24225 return true
24226 }
24227 break
24228 }
24229
24230
24231
24232 for {
24233 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
24234 if v_0.Op != OpLeq32 {
24235 continue
24236 }
24237 x := v_0.Args[1]
24238 v_0_0 := v_0.Args[0]
24239 if v_0_0.Op != OpConst32 {
24240 continue
24241 }
24242 c := auxIntToInt32(v_0_0.AuxInt)
24243 if v_1.Op != OpLess32 {
24244 continue
24245 }
24246 _ = v_1.Args[1]
24247 if x != v_1.Args[0] {
24248 continue
24249 }
24250 v_1_1 := v_1.Args[1]
24251 if v_1_1.Op != OpConst32 {
24252 continue
24253 }
24254 d := auxIntToInt32(v_1_1.AuxInt)
24255 if !(c >= d) {
24256 continue
24257 }
24258 v.reset(OpLeq32U)
24259 v0 := b.NewValue0(v.Pos, OpConst32, x.Type)
24260 v0.AuxInt = int32ToAuxInt(c - d)
24261 v1 := b.NewValue0(v.Pos, OpSub32, x.Type)
24262 v2 := b.NewValue0(v.Pos, OpConst32, x.Type)
24263 v2.AuxInt = int32ToAuxInt(d)
24264 v1.AddArg2(x, v2)
24265 v.AddArg2(v0, v1)
24266 return true
24267 }
24268 break
24269 }
24270
24271
24272
24273 for {
24274 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
24275 if v_0.Op != OpLess16 {
24276 continue
24277 }
24278 x := v_0.Args[1]
24279 v_0_0 := v_0.Args[0]
24280 if v_0_0.Op != OpConst16 {
24281 continue
24282 }
24283 c := auxIntToInt16(v_0_0.AuxInt)
24284 if v_1.Op != OpLess16 {
24285 continue
24286 }
24287 _ = v_1.Args[1]
24288 if x != v_1.Args[0] {
24289 continue
24290 }
24291 v_1_1 := v_1.Args[1]
24292 if v_1_1.Op != OpConst16 {
24293 continue
24294 }
24295 d := auxIntToInt16(v_1_1.AuxInt)
24296 if !(c >= d) {
24297 continue
24298 }
24299 v.reset(OpLess16U)
24300 v0 := b.NewValue0(v.Pos, OpConst16, x.Type)
24301 v0.AuxInt = int16ToAuxInt(c - d)
24302 v1 := b.NewValue0(v.Pos, OpSub16, x.Type)
24303 v2 := b.NewValue0(v.Pos, OpConst16, x.Type)
24304 v2.AuxInt = int16ToAuxInt(d)
24305 v1.AddArg2(x, v2)
24306 v.AddArg2(v0, v1)
24307 return true
24308 }
24309 break
24310 }
24311
24312
24313
24314 for {
24315 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
24316 if v_0.Op != OpLeq16 {
24317 continue
24318 }
24319 x := v_0.Args[1]
24320 v_0_0 := v_0.Args[0]
24321 if v_0_0.Op != OpConst16 {
24322 continue
24323 }
24324 c := auxIntToInt16(v_0_0.AuxInt)
24325 if v_1.Op != OpLess16 {
24326 continue
24327 }
24328 _ = v_1.Args[1]
24329 if x != v_1.Args[0] {
24330 continue
24331 }
24332 v_1_1 := v_1.Args[1]
24333 if v_1_1.Op != OpConst16 {
24334 continue
24335 }
24336 d := auxIntToInt16(v_1_1.AuxInt)
24337 if !(c >= d) {
24338 continue
24339 }
24340 v.reset(OpLeq16U)
24341 v0 := b.NewValue0(v.Pos, OpConst16, x.Type)
24342 v0.AuxInt = int16ToAuxInt(c - d)
24343 v1 := b.NewValue0(v.Pos, OpSub16, x.Type)
24344 v2 := b.NewValue0(v.Pos, OpConst16, x.Type)
24345 v2.AuxInt = int16ToAuxInt(d)
24346 v1.AddArg2(x, v2)
24347 v.AddArg2(v0, v1)
24348 return true
24349 }
24350 break
24351 }
24352
24353
24354
24355 for {
24356 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
24357 if v_0.Op != OpLess8 {
24358 continue
24359 }
24360 x := v_0.Args[1]
24361 v_0_0 := v_0.Args[0]
24362 if v_0_0.Op != OpConst8 {
24363 continue
24364 }
24365 c := auxIntToInt8(v_0_0.AuxInt)
24366 if v_1.Op != OpLess8 {
24367 continue
24368 }
24369 _ = v_1.Args[1]
24370 if x != v_1.Args[0] {
24371 continue
24372 }
24373 v_1_1 := v_1.Args[1]
24374 if v_1_1.Op != OpConst8 {
24375 continue
24376 }
24377 d := auxIntToInt8(v_1_1.AuxInt)
24378 if !(c >= d) {
24379 continue
24380 }
24381 v.reset(OpLess8U)
24382 v0 := b.NewValue0(v.Pos, OpConst8, x.Type)
24383 v0.AuxInt = int8ToAuxInt(c - d)
24384 v1 := b.NewValue0(v.Pos, OpSub8, x.Type)
24385 v2 := b.NewValue0(v.Pos, OpConst8, x.Type)
24386 v2.AuxInt = int8ToAuxInt(d)
24387 v1.AddArg2(x, v2)
24388 v.AddArg2(v0, v1)
24389 return true
24390 }
24391 break
24392 }
24393
24394
24395
24396 for {
24397 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
24398 if v_0.Op != OpLeq8 {
24399 continue
24400 }
24401 x := v_0.Args[1]
24402 v_0_0 := v_0.Args[0]
24403 if v_0_0.Op != OpConst8 {
24404 continue
24405 }
24406 c := auxIntToInt8(v_0_0.AuxInt)
24407 if v_1.Op != OpLess8 {
24408 continue
24409 }
24410 _ = v_1.Args[1]
24411 if x != v_1.Args[0] {
24412 continue
24413 }
24414 v_1_1 := v_1.Args[1]
24415 if v_1_1.Op != OpConst8 {
24416 continue
24417 }
24418 d := auxIntToInt8(v_1_1.AuxInt)
24419 if !(c >= d) {
24420 continue
24421 }
24422 v.reset(OpLeq8U)
24423 v0 := b.NewValue0(v.Pos, OpConst8, x.Type)
24424 v0.AuxInt = int8ToAuxInt(c - d)
24425 v1 := b.NewValue0(v.Pos, OpSub8, x.Type)
24426 v2 := b.NewValue0(v.Pos, OpConst8, x.Type)
24427 v2.AuxInt = int8ToAuxInt(d)
24428 v1.AddArg2(x, v2)
24429 v.AddArg2(v0, v1)
24430 return true
24431 }
24432 break
24433 }
24434
24435
24436
24437 for {
24438 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
24439 if v_0.Op != OpLess64 {
24440 continue
24441 }
24442 x := v_0.Args[1]
24443 v_0_0 := v_0.Args[0]
24444 if v_0_0.Op != OpConst64 {
24445 continue
24446 }
24447 c := auxIntToInt64(v_0_0.AuxInt)
24448 if v_1.Op != OpLeq64 {
24449 continue
24450 }
24451 _ = v_1.Args[1]
24452 if x != v_1.Args[0] {
24453 continue
24454 }
24455 v_1_1 := v_1.Args[1]
24456 if v_1_1.Op != OpConst64 {
24457 continue
24458 }
24459 d := auxIntToInt64(v_1_1.AuxInt)
24460 if !(c >= d+1 && d+1 > d) {
24461 continue
24462 }
24463 v.reset(OpLess64U)
24464 v0 := b.NewValue0(v.Pos, OpConst64, x.Type)
24465 v0.AuxInt = int64ToAuxInt(c - d - 1)
24466 v1 := b.NewValue0(v.Pos, OpSub64, x.Type)
24467 v2 := b.NewValue0(v.Pos, OpConst64, x.Type)
24468 v2.AuxInt = int64ToAuxInt(d + 1)
24469 v1.AddArg2(x, v2)
24470 v.AddArg2(v0, v1)
24471 return true
24472 }
24473 break
24474 }
24475
24476
24477
24478 for {
24479 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
24480 if v_0.Op != OpLeq64 {
24481 continue
24482 }
24483 x := v_0.Args[1]
24484 v_0_0 := v_0.Args[0]
24485 if v_0_0.Op != OpConst64 {
24486 continue
24487 }
24488 c := auxIntToInt64(v_0_0.AuxInt)
24489 if v_1.Op != OpLeq64 {
24490 continue
24491 }
24492 _ = v_1.Args[1]
24493 if x != v_1.Args[0] {
24494 continue
24495 }
24496 v_1_1 := v_1.Args[1]
24497 if v_1_1.Op != OpConst64 {
24498 continue
24499 }
24500 d := auxIntToInt64(v_1_1.AuxInt)
24501 if !(c >= d+1 && d+1 > d) {
24502 continue
24503 }
24504 v.reset(OpLeq64U)
24505 v0 := b.NewValue0(v.Pos, OpConst64, x.Type)
24506 v0.AuxInt = int64ToAuxInt(c - d - 1)
24507 v1 := b.NewValue0(v.Pos, OpSub64, x.Type)
24508 v2 := b.NewValue0(v.Pos, OpConst64, x.Type)
24509 v2.AuxInt = int64ToAuxInt(d + 1)
24510 v1.AddArg2(x, v2)
24511 v.AddArg2(v0, v1)
24512 return true
24513 }
24514 break
24515 }
24516
24517
24518
24519 for {
24520 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
24521 if v_0.Op != OpLess32 {
24522 continue
24523 }
24524 x := v_0.Args[1]
24525 v_0_0 := v_0.Args[0]
24526 if v_0_0.Op != OpConst32 {
24527 continue
24528 }
24529 c := auxIntToInt32(v_0_0.AuxInt)
24530 if v_1.Op != OpLeq32 {
24531 continue
24532 }
24533 _ = v_1.Args[1]
24534 if x != v_1.Args[0] {
24535 continue
24536 }
24537 v_1_1 := v_1.Args[1]
24538 if v_1_1.Op != OpConst32 {
24539 continue
24540 }
24541 d := auxIntToInt32(v_1_1.AuxInt)
24542 if !(c >= d+1 && d+1 > d) {
24543 continue
24544 }
24545 v.reset(OpLess32U)
24546 v0 := b.NewValue0(v.Pos, OpConst32, x.Type)
24547 v0.AuxInt = int32ToAuxInt(c - d - 1)
24548 v1 := b.NewValue0(v.Pos, OpSub32, x.Type)
24549 v2 := b.NewValue0(v.Pos, OpConst32, x.Type)
24550 v2.AuxInt = int32ToAuxInt(d + 1)
24551 v1.AddArg2(x, v2)
24552 v.AddArg2(v0, v1)
24553 return true
24554 }
24555 break
24556 }
24557
24558
24559
24560 for {
24561 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
24562 if v_0.Op != OpLeq32 {
24563 continue
24564 }
24565 x := v_0.Args[1]
24566 v_0_0 := v_0.Args[0]
24567 if v_0_0.Op != OpConst32 {
24568 continue
24569 }
24570 c := auxIntToInt32(v_0_0.AuxInt)
24571 if v_1.Op != OpLeq32 {
24572 continue
24573 }
24574 _ = v_1.Args[1]
24575 if x != v_1.Args[0] {
24576 continue
24577 }
24578 v_1_1 := v_1.Args[1]
24579 if v_1_1.Op != OpConst32 {
24580 continue
24581 }
24582 d := auxIntToInt32(v_1_1.AuxInt)
24583 if !(c >= d+1 && d+1 > d) {
24584 continue
24585 }
24586 v.reset(OpLeq32U)
24587 v0 := b.NewValue0(v.Pos, OpConst32, x.Type)
24588 v0.AuxInt = int32ToAuxInt(c - d - 1)
24589 v1 := b.NewValue0(v.Pos, OpSub32, x.Type)
24590 v2 := b.NewValue0(v.Pos, OpConst32, x.Type)
24591 v2.AuxInt = int32ToAuxInt(d + 1)
24592 v1.AddArg2(x, v2)
24593 v.AddArg2(v0, v1)
24594 return true
24595 }
24596 break
24597 }
24598
24599
24600
24601 for {
24602 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
24603 if v_0.Op != OpLess16 {
24604 continue
24605 }
24606 x := v_0.Args[1]
24607 v_0_0 := v_0.Args[0]
24608 if v_0_0.Op != OpConst16 {
24609 continue
24610 }
24611 c := auxIntToInt16(v_0_0.AuxInt)
24612 if v_1.Op != OpLeq16 {
24613 continue
24614 }
24615 _ = v_1.Args[1]
24616 if x != v_1.Args[0] {
24617 continue
24618 }
24619 v_1_1 := v_1.Args[1]
24620 if v_1_1.Op != OpConst16 {
24621 continue
24622 }
24623 d := auxIntToInt16(v_1_1.AuxInt)
24624 if !(c >= d+1 && d+1 > d) {
24625 continue
24626 }
24627 v.reset(OpLess16U)
24628 v0 := b.NewValue0(v.Pos, OpConst16, x.Type)
24629 v0.AuxInt = int16ToAuxInt(c - d - 1)
24630 v1 := b.NewValue0(v.Pos, OpSub16, x.Type)
24631 v2 := b.NewValue0(v.Pos, OpConst16, x.Type)
24632 v2.AuxInt = int16ToAuxInt(d + 1)
24633 v1.AddArg2(x, v2)
24634 v.AddArg2(v0, v1)
24635 return true
24636 }
24637 break
24638 }
24639
24640
24641
24642 for {
24643 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
24644 if v_0.Op != OpLeq16 {
24645 continue
24646 }
24647 x := v_0.Args[1]
24648 v_0_0 := v_0.Args[0]
24649 if v_0_0.Op != OpConst16 {
24650 continue
24651 }
24652 c := auxIntToInt16(v_0_0.AuxInt)
24653 if v_1.Op != OpLeq16 {
24654 continue
24655 }
24656 _ = v_1.Args[1]
24657 if x != v_1.Args[0] {
24658 continue
24659 }
24660 v_1_1 := v_1.Args[1]
24661 if v_1_1.Op != OpConst16 {
24662 continue
24663 }
24664 d := auxIntToInt16(v_1_1.AuxInt)
24665 if !(c >= d+1 && d+1 > d) {
24666 continue
24667 }
24668 v.reset(OpLeq16U)
24669 v0 := b.NewValue0(v.Pos, OpConst16, x.Type)
24670 v0.AuxInt = int16ToAuxInt(c - d - 1)
24671 v1 := b.NewValue0(v.Pos, OpSub16, x.Type)
24672 v2 := b.NewValue0(v.Pos, OpConst16, x.Type)
24673 v2.AuxInt = int16ToAuxInt(d + 1)
24674 v1.AddArg2(x, v2)
24675 v.AddArg2(v0, v1)
24676 return true
24677 }
24678 break
24679 }
24680
24681
24682
24683 for {
24684 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
24685 if v_0.Op != OpLess8 {
24686 continue
24687 }
24688 x := v_0.Args[1]
24689 v_0_0 := v_0.Args[0]
24690 if v_0_0.Op != OpConst8 {
24691 continue
24692 }
24693 c := auxIntToInt8(v_0_0.AuxInt)
24694 if v_1.Op != OpLeq8 {
24695 continue
24696 }
24697 _ = v_1.Args[1]
24698 if x != v_1.Args[0] {
24699 continue
24700 }
24701 v_1_1 := v_1.Args[1]
24702 if v_1_1.Op != OpConst8 {
24703 continue
24704 }
24705 d := auxIntToInt8(v_1_1.AuxInt)
24706 if !(c >= d+1 && d+1 > d) {
24707 continue
24708 }
24709 v.reset(OpLess8U)
24710 v0 := b.NewValue0(v.Pos, OpConst8, x.Type)
24711 v0.AuxInt = int8ToAuxInt(c - d - 1)
24712 v1 := b.NewValue0(v.Pos, OpSub8, x.Type)
24713 v2 := b.NewValue0(v.Pos, OpConst8, x.Type)
24714 v2.AuxInt = int8ToAuxInt(d + 1)
24715 v1.AddArg2(x, v2)
24716 v.AddArg2(v0, v1)
24717 return true
24718 }
24719 break
24720 }
24721
24722
24723
24724 for {
24725 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
24726 if v_0.Op != OpLeq8 {
24727 continue
24728 }
24729 x := v_0.Args[1]
24730 v_0_0 := v_0.Args[0]
24731 if v_0_0.Op != OpConst8 {
24732 continue
24733 }
24734 c := auxIntToInt8(v_0_0.AuxInt)
24735 if v_1.Op != OpLeq8 {
24736 continue
24737 }
24738 _ = v_1.Args[1]
24739 if x != v_1.Args[0] {
24740 continue
24741 }
24742 v_1_1 := v_1.Args[1]
24743 if v_1_1.Op != OpConst8 {
24744 continue
24745 }
24746 d := auxIntToInt8(v_1_1.AuxInt)
24747 if !(c >= d+1 && d+1 > d) {
24748 continue
24749 }
24750 v.reset(OpLeq8U)
24751 v0 := b.NewValue0(v.Pos, OpConst8, x.Type)
24752 v0.AuxInt = int8ToAuxInt(c - d - 1)
24753 v1 := b.NewValue0(v.Pos, OpSub8, x.Type)
24754 v2 := b.NewValue0(v.Pos, OpConst8, x.Type)
24755 v2.AuxInt = int8ToAuxInt(d + 1)
24756 v1.AddArg2(x, v2)
24757 v.AddArg2(v0, v1)
24758 return true
24759 }
24760 break
24761 }
24762
24763
24764
24765 for {
24766 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
24767 if v_0.Op != OpLess64U {
24768 continue
24769 }
24770 x := v_0.Args[1]
24771 v_0_0 := v_0.Args[0]
24772 if v_0_0.Op != OpConst64 {
24773 continue
24774 }
24775 c := auxIntToInt64(v_0_0.AuxInt)
24776 if v_1.Op != OpLess64U {
24777 continue
24778 }
24779 _ = v_1.Args[1]
24780 if x != v_1.Args[0] {
24781 continue
24782 }
24783 v_1_1 := v_1.Args[1]
24784 if v_1_1.Op != OpConst64 {
24785 continue
24786 }
24787 d := auxIntToInt64(v_1_1.AuxInt)
24788 if !(uint64(c) >= uint64(d)) {
24789 continue
24790 }
24791 v.reset(OpLess64U)
24792 v0 := b.NewValue0(v.Pos, OpConst64, x.Type)
24793 v0.AuxInt = int64ToAuxInt(c - d)
24794 v1 := b.NewValue0(v.Pos, OpSub64, x.Type)
24795 v2 := b.NewValue0(v.Pos, OpConst64, x.Type)
24796 v2.AuxInt = int64ToAuxInt(d)
24797 v1.AddArg2(x, v2)
24798 v.AddArg2(v0, v1)
24799 return true
24800 }
24801 break
24802 }
24803
24804
24805
24806 for {
24807 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
24808 if v_0.Op != OpLeq64U {
24809 continue
24810 }
24811 x := v_0.Args[1]
24812 v_0_0 := v_0.Args[0]
24813 if v_0_0.Op != OpConst64 {
24814 continue
24815 }
24816 c := auxIntToInt64(v_0_0.AuxInt)
24817 if v_1.Op != OpLess64U {
24818 continue
24819 }
24820 _ = v_1.Args[1]
24821 if x != v_1.Args[0] {
24822 continue
24823 }
24824 v_1_1 := v_1.Args[1]
24825 if v_1_1.Op != OpConst64 {
24826 continue
24827 }
24828 d := auxIntToInt64(v_1_1.AuxInt)
24829 if !(uint64(c) >= uint64(d)) {
24830 continue
24831 }
24832 v.reset(OpLeq64U)
24833 v0 := b.NewValue0(v.Pos, OpConst64, x.Type)
24834 v0.AuxInt = int64ToAuxInt(c - d)
24835 v1 := b.NewValue0(v.Pos, OpSub64, x.Type)
24836 v2 := b.NewValue0(v.Pos, OpConst64, x.Type)
24837 v2.AuxInt = int64ToAuxInt(d)
24838 v1.AddArg2(x, v2)
24839 v.AddArg2(v0, v1)
24840 return true
24841 }
24842 break
24843 }
24844
24845
24846
24847 for {
24848 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
24849 if v_0.Op != OpLess32U {
24850 continue
24851 }
24852 x := v_0.Args[1]
24853 v_0_0 := v_0.Args[0]
24854 if v_0_0.Op != OpConst32 {
24855 continue
24856 }
24857 c := auxIntToInt32(v_0_0.AuxInt)
24858 if v_1.Op != OpLess32U {
24859 continue
24860 }
24861 _ = v_1.Args[1]
24862 if x != v_1.Args[0] {
24863 continue
24864 }
24865 v_1_1 := v_1.Args[1]
24866 if v_1_1.Op != OpConst32 {
24867 continue
24868 }
24869 d := auxIntToInt32(v_1_1.AuxInt)
24870 if !(uint32(c) >= uint32(d)) {
24871 continue
24872 }
24873 v.reset(OpLess32U)
24874 v0 := b.NewValue0(v.Pos, OpConst32, x.Type)
24875 v0.AuxInt = int32ToAuxInt(c - d)
24876 v1 := b.NewValue0(v.Pos, OpSub32, x.Type)
24877 v2 := b.NewValue0(v.Pos, OpConst32, x.Type)
24878 v2.AuxInt = int32ToAuxInt(d)
24879 v1.AddArg2(x, v2)
24880 v.AddArg2(v0, v1)
24881 return true
24882 }
24883 break
24884 }
24885
24886
24887
24888 for {
24889 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
24890 if v_0.Op != OpLeq32U {
24891 continue
24892 }
24893 x := v_0.Args[1]
24894 v_0_0 := v_0.Args[0]
24895 if v_0_0.Op != OpConst32 {
24896 continue
24897 }
24898 c := auxIntToInt32(v_0_0.AuxInt)
24899 if v_1.Op != OpLess32U {
24900 continue
24901 }
24902 _ = v_1.Args[1]
24903 if x != v_1.Args[0] {
24904 continue
24905 }
24906 v_1_1 := v_1.Args[1]
24907 if v_1_1.Op != OpConst32 {
24908 continue
24909 }
24910 d := auxIntToInt32(v_1_1.AuxInt)
24911 if !(uint32(c) >= uint32(d)) {
24912 continue
24913 }
24914 v.reset(OpLeq32U)
24915 v0 := b.NewValue0(v.Pos, OpConst32, x.Type)
24916 v0.AuxInt = int32ToAuxInt(c - d)
24917 v1 := b.NewValue0(v.Pos, OpSub32, x.Type)
24918 v2 := b.NewValue0(v.Pos, OpConst32, x.Type)
24919 v2.AuxInt = int32ToAuxInt(d)
24920 v1.AddArg2(x, v2)
24921 v.AddArg2(v0, v1)
24922 return true
24923 }
24924 break
24925 }
24926
24927
24928
24929 for {
24930 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
24931 if v_0.Op != OpLess16U {
24932 continue
24933 }
24934 x := v_0.Args[1]
24935 v_0_0 := v_0.Args[0]
24936 if v_0_0.Op != OpConst16 {
24937 continue
24938 }
24939 c := auxIntToInt16(v_0_0.AuxInt)
24940 if v_1.Op != OpLess16U {
24941 continue
24942 }
24943 _ = v_1.Args[1]
24944 if x != v_1.Args[0] {
24945 continue
24946 }
24947 v_1_1 := v_1.Args[1]
24948 if v_1_1.Op != OpConst16 {
24949 continue
24950 }
24951 d := auxIntToInt16(v_1_1.AuxInt)
24952 if !(uint16(c) >= uint16(d)) {
24953 continue
24954 }
24955 v.reset(OpLess16U)
24956 v0 := b.NewValue0(v.Pos, OpConst16, x.Type)
24957 v0.AuxInt = int16ToAuxInt(c - d)
24958 v1 := b.NewValue0(v.Pos, OpSub16, x.Type)
24959 v2 := b.NewValue0(v.Pos, OpConst16, x.Type)
24960 v2.AuxInt = int16ToAuxInt(d)
24961 v1.AddArg2(x, v2)
24962 v.AddArg2(v0, v1)
24963 return true
24964 }
24965 break
24966 }
24967
24968
24969
24970 for {
24971 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
24972 if v_0.Op != OpLeq16U {
24973 continue
24974 }
24975 x := v_0.Args[1]
24976 v_0_0 := v_0.Args[0]
24977 if v_0_0.Op != OpConst16 {
24978 continue
24979 }
24980 c := auxIntToInt16(v_0_0.AuxInt)
24981 if v_1.Op != OpLess16U {
24982 continue
24983 }
24984 _ = v_1.Args[1]
24985 if x != v_1.Args[0] {
24986 continue
24987 }
24988 v_1_1 := v_1.Args[1]
24989 if v_1_1.Op != OpConst16 {
24990 continue
24991 }
24992 d := auxIntToInt16(v_1_1.AuxInt)
24993 if !(uint16(c) >= uint16(d)) {
24994 continue
24995 }
24996 v.reset(OpLeq16U)
24997 v0 := b.NewValue0(v.Pos, OpConst16, x.Type)
24998 v0.AuxInt = int16ToAuxInt(c - d)
24999 v1 := b.NewValue0(v.Pos, OpSub16, x.Type)
25000 v2 := b.NewValue0(v.Pos, OpConst16, x.Type)
25001 v2.AuxInt = int16ToAuxInt(d)
25002 v1.AddArg2(x, v2)
25003 v.AddArg2(v0, v1)
25004 return true
25005 }
25006 break
25007 }
25008
25009
25010
25011 for {
25012 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
25013 if v_0.Op != OpLess8U {
25014 continue
25015 }
25016 x := v_0.Args[1]
25017 v_0_0 := v_0.Args[0]
25018 if v_0_0.Op != OpConst8 {
25019 continue
25020 }
25021 c := auxIntToInt8(v_0_0.AuxInt)
25022 if v_1.Op != OpLess8U {
25023 continue
25024 }
25025 _ = v_1.Args[1]
25026 if x != v_1.Args[0] {
25027 continue
25028 }
25029 v_1_1 := v_1.Args[1]
25030 if v_1_1.Op != OpConst8 {
25031 continue
25032 }
25033 d := auxIntToInt8(v_1_1.AuxInt)
25034 if !(uint8(c) >= uint8(d)) {
25035 continue
25036 }
25037 v.reset(OpLess8U)
25038 v0 := b.NewValue0(v.Pos, OpConst8, x.Type)
25039 v0.AuxInt = int8ToAuxInt(c - d)
25040 v1 := b.NewValue0(v.Pos, OpSub8, x.Type)
25041 v2 := b.NewValue0(v.Pos, OpConst8, x.Type)
25042 v2.AuxInt = int8ToAuxInt(d)
25043 v1.AddArg2(x, v2)
25044 v.AddArg2(v0, v1)
25045 return true
25046 }
25047 break
25048 }
25049
25050
25051
25052 for {
25053 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
25054 if v_0.Op != OpLeq8U {
25055 continue
25056 }
25057 x := v_0.Args[1]
25058 v_0_0 := v_0.Args[0]
25059 if v_0_0.Op != OpConst8 {
25060 continue
25061 }
25062 c := auxIntToInt8(v_0_0.AuxInt)
25063 if v_1.Op != OpLess8U {
25064 continue
25065 }
25066 _ = v_1.Args[1]
25067 if x != v_1.Args[0] {
25068 continue
25069 }
25070 v_1_1 := v_1.Args[1]
25071 if v_1_1.Op != OpConst8 {
25072 continue
25073 }
25074 d := auxIntToInt8(v_1_1.AuxInt)
25075 if !(uint8(c) >= uint8(d)) {
25076 continue
25077 }
25078 v.reset(OpLeq8U)
25079 v0 := b.NewValue0(v.Pos, OpConst8, x.Type)
25080 v0.AuxInt = int8ToAuxInt(c - d)
25081 v1 := b.NewValue0(v.Pos, OpSub8, x.Type)
25082 v2 := b.NewValue0(v.Pos, OpConst8, x.Type)
25083 v2.AuxInt = int8ToAuxInt(d)
25084 v1.AddArg2(x, v2)
25085 v.AddArg2(v0, v1)
25086 return true
25087 }
25088 break
25089 }
25090
25091
25092
25093 for {
25094 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
25095 if v_0.Op != OpLess64U {
25096 continue
25097 }
25098 x := v_0.Args[1]
25099 v_0_0 := v_0.Args[0]
25100 if v_0_0.Op != OpConst64 {
25101 continue
25102 }
25103 c := auxIntToInt64(v_0_0.AuxInt)
25104 if v_1.Op != OpLeq64U {
25105 continue
25106 }
25107 _ = v_1.Args[1]
25108 if x != v_1.Args[0] {
25109 continue
25110 }
25111 v_1_1 := v_1.Args[1]
25112 if v_1_1.Op != OpConst64 {
25113 continue
25114 }
25115 d := auxIntToInt64(v_1_1.AuxInt)
25116 if !(uint64(c) >= uint64(d+1) && uint64(d+1) > uint64(d)) {
25117 continue
25118 }
25119 v.reset(OpLess64U)
25120 v0 := b.NewValue0(v.Pos, OpConst64, x.Type)
25121 v0.AuxInt = int64ToAuxInt(c - d - 1)
25122 v1 := b.NewValue0(v.Pos, OpSub64, x.Type)
25123 v2 := b.NewValue0(v.Pos, OpConst64, x.Type)
25124 v2.AuxInt = int64ToAuxInt(d + 1)
25125 v1.AddArg2(x, v2)
25126 v.AddArg2(v0, v1)
25127 return true
25128 }
25129 break
25130 }
25131
25132
25133
25134 for {
25135 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
25136 if v_0.Op != OpLeq64U {
25137 continue
25138 }
25139 x := v_0.Args[1]
25140 v_0_0 := v_0.Args[0]
25141 if v_0_0.Op != OpConst64 {
25142 continue
25143 }
25144 c := auxIntToInt64(v_0_0.AuxInt)
25145 if v_1.Op != OpLeq64U {
25146 continue
25147 }
25148 _ = v_1.Args[1]
25149 if x != v_1.Args[0] {
25150 continue
25151 }
25152 v_1_1 := v_1.Args[1]
25153 if v_1_1.Op != OpConst64 {
25154 continue
25155 }
25156 d := auxIntToInt64(v_1_1.AuxInt)
25157 if !(uint64(c) >= uint64(d+1) && uint64(d+1) > uint64(d)) {
25158 continue
25159 }
25160 v.reset(OpLeq64U)
25161 v0 := b.NewValue0(v.Pos, OpConst64, x.Type)
25162 v0.AuxInt = int64ToAuxInt(c - d - 1)
25163 v1 := b.NewValue0(v.Pos, OpSub64, x.Type)
25164 v2 := b.NewValue0(v.Pos, OpConst64, x.Type)
25165 v2.AuxInt = int64ToAuxInt(d + 1)
25166 v1.AddArg2(x, v2)
25167 v.AddArg2(v0, v1)
25168 return true
25169 }
25170 break
25171 }
25172
25173
25174
25175 for {
25176 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
25177 if v_0.Op != OpLess32U {
25178 continue
25179 }
25180 x := v_0.Args[1]
25181 v_0_0 := v_0.Args[0]
25182 if v_0_0.Op != OpConst32 {
25183 continue
25184 }
25185 c := auxIntToInt32(v_0_0.AuxInt)
25186 if v_1.Op != OpLeq32U {
25187 continue
25188 }
25189 _ = v_1.Args[1]
25190 if x != v_1.Args[0] {
25191 continue
25192 }
25193 v_1_1 := v_1.Args[1]
25194 if v_1_1.Op != OpConst32 {
25195 continue
25196 }
25197 d := auxIntToInt32(v_1_1.AuxInt)
25198 if !(uint32(c) >= uint32(d+1) && uint32(d+1) > uint32(d)) {
25199 continue
25200 }
25201 v.reset(OpLess32U)
25202 v0 := b.NewValue0(v.Pos, OpConst32, x.Type)
25203 v0.AuxInt = int32ToAuxInt(c - d - 1)
25204 v1 := b.NewValue0(v.Pos, OpSub32, x.Type)
25205 v2 := b.NewValue0(v.Pos, OpConst32, x.Type)
25206 v2.AuxInt = int32ToAuxInt(d + 1)
25207 v1.AddArg2(x, v2)
25208 v.AddArg2(v0, v1)
25209 return true
25210 }
25211 break
25212 }
25213
25214
25215
25216 for {
25217 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
25218 if v_0.Op != OpLeq32U {
25219 continue
25220 }
25221 x := v_0.Args[1]
25222 v_0_0 := v_0.Args[0]
25223 if v_0_0.Op != OpConst32 {
25224 continue
25225 }
25226 c := auxIntToInt32(v_0_0.AuxInt)
25227 if v_1.Op != OpLeq32U {
25228 continue
25229 }
25230 _ = v_1.Args[1]
25231 if x != v_1.Args[0] {
25232 continue
25233 }
25234 v_1_1 := v_1.Args[1]
25235 if v_1_1.Op != OpConst32 {
25236 continue
25237 }
25238 d := auxIntToInt32(v_1_1.AuxInt)
25239 if !(uint32(c) >= uint32(d+1) && uint32(d+1) > uint32(d)) {
25240 continue
25241 }
25242 v.reset(OpLeq32U)
25243 v0 := b.NewValue0(v.Pos, OpConst32, x.Type)
25244 v0.AuxInt = int32ToAuxInt(c - d - 1)
25245 v1 := b.NewValue0(v.Pos, OpSub32, x.Type)
25246 v2 := b.NewValue0(v.Pos, OpConst32, x.Type)
25247 v2.AuxInt = int32ToAuxInt(d + 1)
25248 v1.AddArg2(x, v2)
25249 v.AddArg2(v0, v1)
25250 return true
25251 }
25252 break
25253 }
25254
25255
25256
25257 for {
25258 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
25259 if v_0.Op != OpLess16U {
25260 continue
25261 }
25262 x := v_0.Args[1]
25263 v_0_0 := v_0.Args[0]
25264 if v_0_0.Op != OpConst16 {
25265 continue
25266 }
25267 c := auxIntToInt16(v_0_0.AuxInt)
25268 if v_1.Op != OpLeq16U {
25269 continue
25270 }
25271 _ = v_1.Args[1]
25272 if x != v_1.Args[0] {
25273 continue
25274 }
25275 v_1_1 := v_1.Args[1]
25276 if v_1_1.Op != OpConst16 {
25277 continue
25278 }
25279 d := auxIntToInt16(v_1_1.AuxInt)
25280 if !(uint16(c) >= uint16(d+1) && uint16(d+1) > uint16(d)) {
25281 continue
25282 }
25283 v.reset(OpLess16U)
25284 v0 := b.NewValue0(v.Pos, OpConst16, x.Type)
25285 v0.AuxInt = int16ToAuxInt(c - d - 1)
25286 v1 := b.NewValue0(v.Pos, OpSub16, x.Type)
25287 v2 := b.NewValue0(v.Pos, OpConst16, x.Type)
25288 v2.AuxInt = int16ToAuxInt(d + 1)
25289 v1.AddArg2(x, v2)
25290 v.AddArg2(v0, v1)
25291 return true
25292 }
25293 break
25294 }
25295
25296
25297
25298 for {
25299 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
25300 if v_0.Op != OpLeq16U {
25301 continue
25302 }
25303 x := v_0.Args[1]
25304 v_0_0 := v_0.Args[0]
25305 if v_0_0.Op != OpConst16 {
25306 continue
25307 }
25308 c := auxIntToInt16(v_0_0.AuxInt)
25309 if v_1.Op != OpLeq16U {
25310 continue
25311 }
25312 _ = v_1.Args[1]
25313 if x != v_1.Args[0] {
25314 continue
25315 }
25316 v_1_1 := v_1.Args[1]
25317 if v_1_1.Op != OpConst16 {
25318 continue
25319 }
25320 d := auxIntToInt16(v_1_1.AuxInt)
25321 if !(uint16(c) >= uint16(d+1) && uint16(d+1) > uint16(d)) {
25322 continue
25323 }
25324 v.reset(OpLeq16U)
25325 v0 := b.NewValue0(v.Pos, OpConst16, x.Type)
25326 v0.AuxInt = int16ToAuxInt(c - d - 1)
25327 v1 := b.NewValue0(v.Pos, OpSub16, x.Type)
25328 v2 := b.NewValue0(v.Pos, OpConst16, x.Type)
25329 v2.AuxInt = int16ToAuxInt(d + 1)
25330 v1.AddArg2(x, v2)
25331 v.AddArg2(v0, v1)
25332 return true
25333 }
25334 break
25335 }
25336
25337
25338
25339 for {
25340 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
25341 if v_0.Op != OpLess8U {
25342 continue
25343 }
25344 x := v_0.Args[1]
25345 v_0_0 := v_0.Args[0]
25346 if v_0_0.Op != OpConst8 {
25347 continue
25348 }
25349 c := auxIntToInt8(v_0_0.AuxInt)
25350 if v_1.Op != OpLeq8U {
25351 continue
25352 }
25353 _ = v_1.Args[1]
25354 if x != v_1.Args[0] {
25355 continue
25356 }
25357 v_1_1 := v_1.Args[1]
25358 if v_1_1.Op != OpConst8 {
25359 continue
25360 }
25361 d := auxIntToInt8(v_1_1.AuxInt)
25362 if !(uint8(c) >= uint8(d+1) && uint8(d+1) > uint8(d)) {
25363 continue
25364 }
25365 v.reset(OpLess8U)
25366 v0 := b.NewValue0(v.Pos, OpConst8, x.Type)
25367 v0.AuxInt = int8ToAuxInt(c - d - 1)
25368 v1 := b.NewValue0(v.Pos, OpSub8, x.Type)
25369 v2 := b.NewValue0(v.Pos, OpConst8, x.Type)
25370 v2.AuxInt = int8ToAuxInt(d + 1)
25371 v1.AddArg2(x, v2)
25372 v.AddArg2(v0, v1)
25373 return true
25374 }
25375 break
25376 }
25377
25378
25379
25380 for {
25381 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
25382 if v_0.Op != OpLeq8U {
25383 continue
25384 }
25385 x := v_0.Args[1]
25386 v_0_0 := v_0.Args[0]
25387 if v_0_0.Op != OpConst8 {
25388 continue
25389 }
25390 c := auxIntToInt8(v_0_0.AuxInt)
25391 if v_1.Op != OpLeq8U {
25392 continue
25393 }
25394 _ = v_1.Args[1]
25395 if x != v_1.Args[0] {
25396 continue
25397 }
25398 v_1_1 := v_1.Args[1]
25399 if v_1_1.Op != OpConst8 {
25400 continue
25401 }
25402 d := auxIntToInt8(v_1_1.AuxInt)
25403 if !(uint8(c) >= uint8(d+1) && uint8(d+1) > uint8(d)) {
25404 continue
25405 }
25406 v.reset(OpLeq8U)
25407 v0 := b.NewValue0(v.Pos, OpConst8, x.Type)
25408 v0.AuxInt = int8ToAuxInt(c - d - 1)
25409 v1 := b.NewValue0(v.Pos, OpSub8, x.Type)
25410 v2 := b.NewValue0(v.Pos, OpConst8, x.Type)
25411 v2.AuxInt = int8ToAuxInt(d + 1)
25412 v1.AddArg2(x, v2)
25413 v.AddArg2(v0, v1)
25414 return true
25415 }
25416 break
25417 }
25418 return false
25419 }
25420 func rewriteValuegeneric_OpPhi(v *Value) bool {
25421 b := v.Block
25422
25423
25424 for {
25425 if len(v.Args) != 2 {
25426 break
25427 }
25428 _ = v.Args[1]
25429 v_0 := v.Args[0]
25430 if v_0.Op != OpConst8 {
25431 break
25432 }
25433 c := auxIntToInt8(v_0.AuxInt)
25434 v_1 := v.Args[1]
25435 if v_1.Op != OpConst8 || auxIntToInt8(v_1.AuxInt) != c {
25436 break
25437 }
25438 v.reset(OpConst8)
25439 v.AuxInt = int8ToAuxInt(c)
25440 return true
25441 }
25442
25443
25444 for {
25445 if len(v.Args) != 2 {
25446 break
25447 }
25448 _ = v.Args[1]
25449 v_0 := v.Args[0]
25450 if v_0.Op != OpConst16 {
25451 break
25452 }
25453 c := auxIntToInt16(v_0.AuxInt)
25454 v_1 := v.Args[1]
25455 if v_1.Op != OpConst16 || auxIntToInt16(v_1.AuxInt) != c {
25456 break
25457 }
25458 v.reset(OpConst16)
25459 v.AuxInt = int16ToAuxInt(c)
25460 return true
25461 }
25462
25463
25464 for {
25465 if len(v.Args) != 2 {
25466 break
25467 }
25468 _ = v.Args[1]
25469 v_0 := v.Args[0]
25470 if v_0.Op != OpConst32 {
25471 break
25472 }
25473 c := auxIntToInt32(v_0.AuxInt)
25474 v_1 := v.Args[1]
25475 if v_1.Op != OpConst32 || auxIntToInt32(v_1.AuxInt) != c {
25476 break
25477 }
25478 v.reset(OpConst32)
25479 v.AuxInt = int32ToAuxInt(c)
25480 return true
25481 }
25482
25483
25484 for {
25485 if len(v.Args) != 2 {
25486 break
25487 }
25488 _ = v.Args[1]
25489 v_0 := v.Args[0]
25490 if v_0.Op != OpConst64 {
25491 break
25492 }
25493 c := auxIntToInt64(v_0.AuxInt)
25494 v_1 := v.Args[1]
25495 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != c {
25496 break
25497 }
25498 v.reset(OpConst64)
25499 v.AuxInt = int64ToAuxInt(c)
25500 return true
25501 }
25502
25503
25504
25505 for {
25506 if len(v.Args) != 2 {
25507 break
25508 }
25509 t := v.Type
25510 _ = v.Args[1]
25511 nx := v.Args[0]
25512 if nx.Op != OpNot {
25513 break
25514 }
25515 x := nx.Args[0]
25516 ny := v.Args[1]
25517 if ny.Op != OpNot {
25518 break
25519 }
25520 y := ny.Args[0]
25521 if !(nx.Uses == 1 && ny.Uses == 1) {
25522 break
25523 }
25524 v.reset(OpNot)
25525 v0 := b.NewValue0(v.Pos, OpPhi, t)
25526 v0.AddArg2(x, y)
25527 v.AddArg(v0)
25528 return true
25529 }
25530 return false
25531 }
25532 func rewriteValuegeneric_OpPopCount16(v *Value) bool {
25533 v_0 := v.Args[0]
25534 b := v.Block
25535 config := b.Func.Config
25536
25537
25538
25539 for {
25540 if v_0.Op != OpConst16 {
25541 break
25542 }
25543 c := auxIntToInt16(v_0.AuxInt)
25544 if !(config.PtrSize == 8) {
25545 break
25546 }
25547 v.reset(OpConst64)
25548 v.AuxInt = int64ToAuxInt(int64(bits.OnesCount16(uint16(c))))
25549 return true
25550 }
25551
25552
25553
25554 for {
25555 if v_0.Op != OpConst16 {
25556 break
25557 }
25558 c := auxIntToInt16(v_0.AuxInt)
25559 if !(config.PtrSize == 4) {
25560 break
25561 }
25562 v.reset(OpConst32)
25563 v.AuxInt = int32ToAuxInt(int32(bits.OnesCount16(uint16(c))))
25564 return true
25565 }
25566 return false
25567 }
25568 func rewriteValuegeneric_OpPopCount32(v *Value) bool {
25569 v_0 := v.Args[0]
25570 b := v.Block
25571 config := b.Func.Config
25572
25573
25574
25575 for {
25576 if v_0.Op != OpConst32 {
25577 break
25578 }
25579 c := auxIntToInt32(v_0.AuxInt)
25580 if !(config.PtrSize == 8) {
25581 break
25582 }
25583 v.reset(OpConst64)
25584 v.AuxInt = int64ToAuxInt(int64(bits.OnesCount32(uint32(c))))
25585 return true
25586 }
25587
25588
25589
25590 for {
25591 if v_0.Op != OpConst32 {
25592 break
25593 }
25594 c := auxIntToInt32(v_0.AuxInt)
25595 if !(config.PtrSize == 4) {
25596 break
25597 }
25598 v.reset(OpConst32)
25599 v.AuxInt = int32ToAuxInt(int32(bits.OnesCount32(uint32(c))))
25600 return true
25601 }
25602 return false
25603 }
25604 func rewriteValuegeneric_OpPopCount64(v *Value) bool {
25605 v_0 := v.Args[0]
25606 b := v.Block
25607 config := b.Func.Config
25608
25609
25610
25611 for {
25612 if v_0.Op != OpConst64 {
25613 break
25614 }
25615 c := auxIntToInt64(v_0.AuxInt)
25616 if !(config.PtrSize == 8) {
25617 break
25618 }
25619 v.reset(OpConst64)
25620 v.AuxInt = int64ToAuxInt(int64(bits.OnesCount64(uint64(c))))
25621 return true
25622 }
25623
25624
25625
25626 for {
25627 if v_0.Op != OpConst64 {
25628 break
25629 }
25630 c := auxIntToInt64(v_0.AuxInt)
25631 if !(config.PtrSize == 4) {
25632 break
25633 }
25634 v.reset(OpConst32)
25635 v.AuxInt = int32ToAuxInt(int32(bits.OnesCount64(uint64(c))))
25636 return true
25637 }
25638 return false
25639 }
25640 func rewriteValuegeneric_OpPopCount8(v *Value) bool {
25641 v_0 := v.Args[0]
25642 b := v.Block
25643 config := b.Func.Config
25644
25645
25646
25647 for {
25648 if v_0.Op != OpConst8 {
25649 break
25650 }
25651 c := auxIntToInt8(v_0.AuxInt)
25652 if !(config.PtrSize == 8) {
25653 break
25654 }
25655 v.reset(OpConst64)
25656 v.AuxInt = int64ToAuxInt(int64(bits.OnesCount8(uint8(c))))
25657 return true
25658 }
25659
25660
25661
25662 for {
25663 if v_0.Op != OpConst8 {
25664 break
25665 }
25666 c := auxIntToInt8(v_0.AuxInt)
25667 if !(config.PtrSize == 4) {
25668 break
25669 }
25670 v.reset(OpConst32)
25671 v.AuxInt = int32ToAuxInt(int32(bits.OnesCount8(uint8(c))))
25672 return true
25673 }
25674 return false
25675 }
25676 func rewriteValuegeneric_OpPtrIndex(v *Value) bool {
25677 v_1 := v.Args[1]
25678 v_0 := v.Args[0]
25679 b := v.Block
25680 config := b.Func.Config
25681 typ := &b.Func.Config.Types
25682
25683
25684
25685 for {
25686 t := v.Type
25687 ptr := v_0
25688 idx := v_1
25689 if !(config.PtrSize == 4 && is32Bit(t.Elem().Size())) {
25690 break
25691 }
25692 v.reset(OpAddPtr)
25693 v0 := b.NewValue0(v.Pos, OpMul32, typ.Int)
25694 v1 := b.NewValue0(v.Pos, OpConst32, typ.Int)
25695 v1.AuxInt = int32ToAuxInt(int32(t.Elem().Size()))
25696 v0.AddArg2(idx, v1)
25697 v.AddArg2(ptr, v0)
25698 return true
25699 }
25700
25701
25702
25703 for {
25704 t := v.Type
25705 ptr := v_0
25706 idx := v_1
25707 if !(config.PtrSize == 8) {
25708 break
25709 }
25710 v.reset(OpAddPtr)
25711 v0 := b.NewValue0(v.Pos, OpMul64, typ.Int)
25712 v1 := b.NewValue0(v.Pos, OpConst64, typ.Int)
25713 v1.AuxInt = int64ToAuxInt(t.Elem().Size())
25714 v0.AddArg2(idx, v1)
25715 v.AddArg2(ptr, v0)
25716 return true
25717 }
25718 return false
25719 }
25720 func rewriteValuegeneric_OpRotateLeft16(v *Value) bool {
25721 v_1 := v.Args[1]
25722 v_0 := v.Args[0]
25723 b := v.Block
25724 config := b.Func.Config
25725
25726
25727
25728 for {
25729 x := v_0
25730 if v_1.Op != OpConst16 {
25731 break
25732 }
25733 c := auxIntToInt16(v_1.AuxInt)
25734 if !(c%16 == 0) {
25735 break
25736 }
25737 v.copyOf(x)
25738 return true
25739 }
25740
25741
25742
25743 for {
25744 x := v_0
25745 if v_1.Op != OpAnd64 {
25746 break
25747 }
25748 _ = v_1.Args[1]
25749 v_1_0 := v_1.Args[0]
25750 v_1_1 := v_1.Args[1]
25751 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
25752 y := v_1_0
25753 if v_1_1.Op != OpConst64 {
25754 continue
25755 }
25756 c := auxIntToInt64(v_1_1.AuxInt)
25757 if !(c&15 == 15) {
25758 continue
25759 }
25760 v.reset(OpRotateLeft16)
25761 v.AddArg2(x, y)
25762 return true
25763 }
25764 break
25765 }
25766
25767
25768
25769 for {
25770 x := v_0
25771 if v_1.Op != OpAnd32 {
25772 break
25773 }
25774 _ = v_1.Args[1]
25775 v_1_0 := v_1.Args[0]
25776 v_1_1 := v_1.Args[1]
25777 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
25778 y := v_1_0
25779 if v_1_1.Op != OpConst32 {
25780 continue
25781 }
25782 c := auxIntToInt32(v_1_1.AuxInt)
25783 if !(c&15 == 15) {
25784 continue
25785 }
25786 v.reset(OpRotateLeft16)
25787 v.AddArg2(x, y)
25788 return true
25789 }
25790 break
25791 }
25792
25793
25794
25795 for {
25796 x := v_0
25797 if v_1.Op != OpAnd16 {
25798 break
25799 }
25800 _ = v_1.Args[1]
25801 v_1_0 := v_1.Args[0]
25802 v_1_1 := v_1.Args[1]
25803 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
25804 y := v_1_0
25805 if v_1_1.Op != OpConst16 {
25806 continue
25807 }
25808 c := auxIntToInt16(v_1_1.AuxInt)
25809 if !(c&15 == 15) {
25810 continue
25811 }
25812 v.reset(OpRotateLeft16)
25813 v.AddArg2(x, y)
25814 return true
25815 }
25816 break
25817 }
25818
25819
25820
25821 for {
25822 x := v_0
25823 if v_1.Op != OpAnd8 {
25824 break
25825 }
25826 _ = v_1.Args[1]
25827 v_1_0 := v_1.Args[0]
25828 v_1_1 := v_1.Args[1]
25829 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
25830 y := v_1_0
25831 if v_1_1.Op != OpConst8 {
25832 continue
25833 }
25834 c := auxIntToInt8(v_1_1.AuxInt)
25835 if !(c&15 == 15) {
25836 continue
25837 }
25838 v.reset(OpRotateLeft16)
25839 v.AddArg2(x, y)
25840 return true
25841 }
25842 break
25843 }
25844
25845
25846
25847 for {
25848 x := v_0
25849 if v_1.Op != OpNeg64 {
25850 break
25851 }
25852 v_1_0 := v_1.Args[0]
25853 if v_1_0.Op != OpAnd64 {
25854 break
25855 }
25856 _ = v_1_0.Args[1]
25857 v_1_0_0 := v_1_0.Args[0]
25858 v_1_0_1 := v_1_0.Args[1]
25859 for _i0 := 0; _i0 <= 1; _i0, v_1_0_0, v_1_0_1 = _i0+1, v_1_0_1, v_1_0_0 {
25860 y := v_1_0_0
25861 if v_1_0_1.Op != OpConst64 {
25862 continue
25863 }
25864 c := auxIntToInt64(v_1_0_1.AuxInt)
25865 if !(c&15 == 15) {
25866 continue
25867 }
25868 v.reset(OpRotateLeft16)
25869 v0 := b.NewValue0(v.Pos, OpNeg64, y.Type)
25870 v0.AddArg(y)
25871 v.AddArg2(x, v0)
25872 return true
25873 }
25874 break
25875 }
25876
25877
25878
25879 for {
25880 x := v_0
25881 if v_1.Op != OpNeg32 {
25882 break
25883 }
25884 v_1_0 := v_1.Args[0]
25885 if v_1_0.Op != OpAnd32 {
25886 break
25887 }
25888 _ = v_1_0.Args[1]
25889 v_1_0_0 := v_1_0.Args[0]
25890 v_1_0_1 := v_1_0.Args[1]
25891 for _i0 := 0; _i0 <= 1; _i0, v_1_0_0, v_1_0_1 = _i0+1, v_1_0_1, v_1_0_0 {
25892 y := v_1_0_0
25893 if v_1_0_1.Op != OpConst32 {
25894 continue
25895 }
25896 c := auxIntToInt32(v_1_0_1.AuxInt)
25897 if !(c&15 == 15) {
25898 continue
25899 }
25900 v.reset(OpRotateLeft16)
25901 v0 := b.NewValue0(v.Pos, OpNeg32, y.Type)
25902 v0.AddArg(y)
25903 v.AddArg2(x, v0)
25904 return true
25905 }
25906 break
25907 }
25908
25909
25910
25911 for {
25912 x := v_0
25913 if v_1.Op != OpNeg16 {
25914 break
25915 }
25916 v_1_0 := v_1.Args[0]
25917 if v_1_0.Op != OpAnd16 {
25918 break
25919 }
25920 _ = v_1_0.Args[1]
25921 v_1_0_0 := v_1_0.Args[0]
25922 v_1_0_1 := v_1_0.Args[1]
25923 for _i0 := 0; _i0 <= 1; _i0, v_1_0_0, v_1_0_1 = _i0+1, v_1_0_1, v_1_0_0 {
25924 y := v_1_0_0
25925 if v_1_0_1.Op != OpConst16 {
25926 continue
25927 }
25928 c := auxIntToInt16(v_1_0_1.AuxInt)
25929 if !(c&15 == 15) {
25930 continue
25931 }
25932 v.reset(OpRotateLeft16)
25933 v0 := b.NewValue0(v.Pos, OpNeg16, y.Type)
25934 v0.AddArg(y)
25935 v.AddArg2(x, v0)
25936 return true
25937 }
25938 break
25939 }
25940
25941
25942
25943 for {
25944 x := v_0
25945 if v_1.Op != OpNeg8 {
25946 break
25947 }
25948 v_1_0 := v_1.Args[0]
25949 if v_1_0.Op != OpAnd8 {
25950 break
25951 }
25952 _ = v_1_0.Args[1]
25953 v_1_0_0 := v_1_0.Args[0]
25954 v_1_0_1 := v_1_0.Args[1]
25955 for _i0 := 0; _i0 <= 1; _i0, v_1_0_0, v_1_0_1 = _i0+1, v_1_0_1, v_1_0_0 {
25956 y := v_1_0_0
25957 if v_1_0_1.Op != OpConst8 {
25958 continue
25959 }
25960 c := auxIntToInt8(v_1_0_1.AuxInt)
25961 if !(c&15 == 15) {
25962 continue
25963 }
25964 v.reset(OpRotateLeft16)
25965 v0 := b.NewValue0(v.Pos, OpNeg8, y.Type)
25966 v0.AddArg(y)
25967 v.AddArg2(x, v0)
25968 return true
25969 }
25970 break
25971 }
25972
25973
25974
25975 for {
25976 x := v_0
25977 if v_1.Op != OpAdd64 {
25978 break
25979 }
25980 _ = v_1.Args[1]
25981 v_1_0 := v_1.Args[0]
25982 v_1_1 := v_1.Args[1]
25983 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
25984 y := v_1_0
25985 if v_1_1.Op != OpConst64 {
25986 continue
25987 }
25988 c := auxIntToInt64(v_1_1.AuxInt)
25989 if !(c&15 == 0) {
25990 continue
25991 }
25992 v.reset(OpRotateLeft16)
25993 v.AddArg2(x, y)
25994 return true
25995 }
25996 break
25997 }
25998
25999
26000
26001 for {
26002 x := v_0
26003 if v_1.Op != OpAdd32 {
26004 break
26005 }
26006 _ = v_1.Args[1]
26007 v_1_0 := v_1.Args[0]
26008 v_1_1 := v_1.Args[1]
26009 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
26010 y := v_1_0
26011 if v_1_1.Op != OpConst32 {
26012 continue
26013 }
26014 c := auxIntToInt32(v_1_1.AuxInt)
26015 if !(c&15 == 0) {
26016 continue
26017 }
26018 v.reset(OpRotateLeft16)
26019 v.AddArg2(x, y)
26020 return true
26021 }
26022 break
26023 }
26024
26025
26026
26027 for {
26028 x := v_0
26029 if v_1.Op != OpAdd16 {
26030 break
26031 }
26032 _ = v_1.Args[1]
26033 v_1_0 := v_1.Args[0]
26034 v_1_1 := v_1.Args[1]
26035 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
26036 y := v_1_0
26037 if v_1_1.Op != OpConst16 {
26038 continue
26039 }
26040 c := auxIntToInt16(v_1_1.AuxInt)
26041 if !(c&15 == 0) {
26042 continue
26043 }
26044 v.reset(OpRotateLeft16)
26045 v.AddArg2(x, y)
26046 return true
26047 }
26048 break
26049 }
26050
26051
26052
26053 for {
26054 x := v_0
26055 if v_1.Op != OpAdd8 {
26056 break
26057 }
26058 _ = v_1.Args[1]
26059 v_1_0 := v_1.Args[0]
26060 v_1_1 := v_1.Args[1]
26061 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
26062 y := v_1_0
26063 if v_1_1.Op != OpConst8 {
26064 continue
26065 }
26066 c := auxIntToInt8(v_1_1.AuxInt)
26067 if !(c&15 == 0) {
26068 continue
26069 }
26070 v.reset(OpRotateLeft16)
26071 v.AddArg2(x, y)
26072 return true
26073 }
26074 break
26075 }
26076
26077
26078
26079 for {
26080 x := v_0
26081 if v_1.Op != OpSub64 {
26082 break
26083 }
26084 y := v_1.Args[1]
26085 v_1_0 := v_1.Args[0]
26086 if v_1_0.Op != OpConst64 {
26087 break
26088 }
26089 c := auxIntToInt64(v_1_0.AuxInt)
26090 if !(c&15 == 0) {
26091 break
26092 }
26093 v.reset(OpRotateLeft16)
26094 v0 := b.NewValue0(v.Pos, OpNeg64, y.Type)
26095 v0.AddArg(y)
26096 v.AddArg2(x, v0)
26097 return true
26098 }
26099
26100
26101
26102 for {
26103 x := v_0
26104 if v_1.Op != OpSub32 {
26105 break
26106 }
26107 y := v_1.Args[1]
26108 v_1_0 := v_1.Args[0]
26109 if v_1_0.Op != OpConst32 {
26110 break
26111 }
26112 c := auxIntToInt32(v_1_0.AuxInt)
26113 if !(c&15 == 0) {
26114 break
26115 }
26116 v.reset(OpRotateLeft16)
26117 v0 := b.NewValue0(v.Pos, OpNeg32, y.Type)
26118 v0.AddArg(y)
26119 v.AddArg2(x, v0)
26120 return true
26121 }
26122
26123
26124
26125 for {
26126 x := v_0
26127 if v_1.Op != OpSub16 {
26128 break
26129 }
26130 y := v_1.Args[1]
26131 v_1_0 := v_1.Args[0]
26132 if v_1_0.Op != OpConst16 {
26133 break
26134 }
26135 c := auxIntToInt16(v_1_0.AuxInt)
26136 if !(c&15 == 0) {
26137 break
26138 }
26139 v.reset(OpRotateLeft16)
26140 v0 := b.NewValue0(v.Pos, OpNeg16, y.Type)
26141 v0.AddArg(y)
26142 v.AddArg2(x, v0)
26143 return true
26144 }
26145
26146
26147
26148 for {
26149 x := v_0
26150 if v_1.Op != OpSub8 {
26151 break
26152 }
26153 y := v_1.Args[1]
26154 v_1_0 := v_1.Args[0]
26155 if v_1_0.Op != OpConst8 {
26156 break
26157 }
26158 c := auxIntToInt8(v_1_0.AuxInt)
26159 if !(c&15 == 0) {
26160 break
26161 }
26162 v.reset(OpRotateLeft16)
26163 v0 := b.NewValue0(v.Pos, OpNeg8, y.Type)
26164 v0.AddArg(y)
26165 v.AddArg2(x, v0)
26166 return true
26167 }
26168
26169
26170
26171 for {
26172 x := v_0
26173 if v_1.Op != OpConst64 {
26174 break
26175 }
26176 t := v_1.Type
26177 c := auxIntToInt64(v_1.AuxInt)
26178 if !(config.PtrSize == 4) {
26179 break
26180 }
26181 v.reset(OpRotateLeft16)
26182 v0 := b.NewValue0(v.Pos, OpConst32, t)
26183 v0.AuxInt = int32ToAuxInt(int32(c))
26184 v.AddArg2(x, v0)
26185 return true
26186 }
26187
26188
26189
26190 for {
26191 if v_0.Op != OpRotateLeft16 {
26192 break
26193 }
26194 c := v_0.Args[1]
26195 x := v_0.Args[0]
26196 d := v_1
26197 if !(c.Type.Size() == 8 && d.Type.Size() == 8) {
26198 break
26199 }
26200 v.reset(OpRotateLeft16)
26201 v0 := b.NewValue0(v.Pos, OpAdd64, c.Type)
26202 v0.AddArg2(c, d)
26203 v.AddArg2(x, v0)
26204 return true
26205 }
26206
26207
26208
26209 for {
26210 if v_0.Op != OpRotateLeft16 {
26211 break
26212 }
26213 c := v_0.Args[1]
26214 x := v_0.Args[0]
26215 d := v_1
26216 if !(c.Type.Size() == 4 && d.Type.Size() == 4) {
26217 break
26218 }
26219 v.reset(OpRotateLeft16)
26220 v0 := b.NewValue0(v.Pos, OpAdd32, c.Type)
26221 v0.AddArg2(c, d)
26222 v.AddArg2(x, v0)
26223 return true
26224 }
26225
26226
26227
26228 for {
26229 if v_0.Op != OpRotateLeft16 {
26230 break
26231 }
26232 c := v_0.Args[1]
26233 x := v_0.Args[0]
26234 d := v_1
26235 if !(c.Type.Size() == 2 && d.Type.Size() == 2) {
26236 break
26237 }
26238 v.reset(OpRotateLeft16)
26239 v0 := b.NewValue0(v.Pos, OpAdd16, c.Type)
26240 v0.AddArg2(c, d)
26241 v.AddArg2(x, v0)
26242 return true
26243 }
26244
26245
26246
26247 for {
26248 if v_0.Op != OpRotateLeft16 {
26249 break
26250 }
26251 c := v_0.Args[1]
26252 x := v_0.Args[0]
26253 d := v_1
26254 if !(c.Type.Size() == 1 && d.Type.Size() == 1) {
26255 break
26256 }
26257 v.reset(OpRotateLeft16)
26258 v0 := b.NewValue0(v.Pos, OpAdd8, c.Type)
26259 v0.AddArg2(c, d)
26260 v.AddArg2(x, v0)
26261 return true
26262 }
26263 return false
26264 }
26265 func rewriteValuegeneric_OpRotateLeft32(v *Value) bool {
26266 v_1 := v.Args[1]
26267 v_0 := v.Args[0]
26268 b := v.Block
26269 config := b.Func.Config
26270
26271
26272
26273 for {
26274 x := v_0
26275 if v_1.Op != OpConst32 {
26276 break
26277 }
26278 c := auxIntToInt32(v_1.AuxInt)
26279 if !(c%32 == 0) {
26280 break
26281 }
26282 v.copyOf(x)
26283 return true
26284 }
26285
26286
26287
26288 for {
26289 x := v_0
26290 if v_1.Op != OpAnd64 {
26291 break
26292 }
26293 _ = v_1.Args[1]
26294 v_1_0 := v_1.Args[0]
26295 v_1_1 := v_1.Args[1]
26296 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
26297 y := v_1_0
26298 if v_1_1.Op != OpConst64 {
26299 continue
26300 }
26301 c := auxIntToInt64(v_1_1.AuxInt)
26302 if !(c&31 == 31) {
26303 continue
26304 }
26305 v.reset(OpRotateLeft32)
26306 v.AddArg2(x, y)
26307 return true
26308 }
26309 break
26310 }
26311
26312
26313
26314 for {
26315 x := v_0
26316 if v_1.Op != OpAnd32 {
26317 break
26318 }
26319 _ = v_1.Args[1]
26320 v_1_0 := v_1.Args[0]
26321 v_1_1 := v_1.Args[1]
26322 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
26323 y := v_1_0
26324 if v_1_1.Op != OpConst32 {
26325 continue
26326 }
26327 c := auxIntToInt32(v_1_1.AuxInt)
26328 if !(c&31 == 31) {
26329 continue
26330 }
26331 v.reset(OpRotateLeft32)
26332 v.AddArg2(x, y)
26333 return true
26334 }
26335 break
26336 }
26337
26338
26339
26340 for {
26341 x := v_0
26342 if v_1.Op != OpAnd16 {
26343 break
26344 }
26345 _ = v_1.Args[1]
26346 v_1_0 := v_1.Args[0]
26347 v_1_1 := v_1.Args[1]
26348 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
26349 y := v_1_0
26350 if v_1_1.Op != OpConst16 {
26351 continue
26352 }
26353 c := auxIntToInt16(v_1_1.AuxInt)
26354 if !(c&31 == 31) {
26355 continue
26356 }
26357 v.reset(OpRotateLeft32)
26358 v.AddArg2(x, y)
26359 return true
26360 }
26361 break
26362 }
26363
26364
26365
26366 for {
26367 x := v_0
26368 if v_1.Op != OpAnd8 {
26369 break
26370 }
26371 _ = v_1.Args[1]
26372 v_1_0 := v_1.Args[0]
26373 v_1_1 := v_1.Args[1]
26374 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
26375 y := v_1_0
26376 if v_1_1.Op != OpConst8 {
26377 continue
26378 }
26379 c := auxIntToInt8(v_1_1.AuxInt)
26380 if !(c&31 == 31) {
26381 continue
26382 }
26383 v.reset(OpRotateLeft32)
26384 v.AddArg2(x, y)
26385 return true
26386 }
26387 break
26388 }
26389
26390
26391
26392 for {
26393 x := v_0
26394 if v_1.Op != OpNeg64 {
26395 break
26396 }
26397 v_1_0 := v_1.Args[0]
26398 if v_1_0.Op != OpAnd64 {
26399 break
26400 }
26401 _ = v_1_0.Args[1]
26402 v_1_0_0 := v_1_0.Args[0]
26403 v_1_0_1 := v_1_0.Args[1]
26404 for _i0 := 0; _i0 <= 1; _i0, v_1_0_0, v_1_0_1 = _i0+1, v_1_0_1, v_1_0_0 {
26405 y := v_1_0_0
26406 if v_1_0_1.Op != OpConst64 {
26407 continue
26408 }
26409 c := auxIntToInt64(v_1_0_1.AuxInt)
26410 if !(c&31 == 31) {
26411 continue
26412 }
26413 v.reset(OpRotateLeft32)
26414 v0 := b.NewValue0(v.Pos, OpNeg64, y.Type)
26415 v0.AddArg(y)
26416 v.AddArg2(x, v0)
26417 return true
26418 }
26419 break
26420 }
26421
26422
26423
26424 for {
26425 x := v_0
26426 if v_1.Op != OpNeg32 {
26427 break
26428 }
26429 v_1_0 := v_1.Args[0]
26430 if v_1_0.Op != OpAnd32 {
26431 break
26432 }
26433 _ = v_1_0.Args[1]
26434 v_1_0_0 := v_1_0.Args[0]
26435 v_1_0_1 := v_1_0.Args[1]
26436 for _i0 := 0; _i0 <= 1; _i0, v_1_0_0, v_1_0_1 = _i0+1, v_1_0_1, v_1_0_0 {
26437 y := v_1_0_0
26438 if v_1_0_1.Op != OpConst32 {
26439 continue
26440 }
26441 c := auxIntToInt32(v_1_0_1.AuxInt)
26442 if !(c&31 == 31) {
26443 continue
26444 }
26445 v.reset(OpRotateLeft32)
26446 v0 := b.NewValue0(v.Pos, OpNeg32, y.Type)
26447 v0.AddArg(y)
26448 v.AddArg2(x, v0)
26449 return true
26450 }
26451 break
26452 }
26453
26454
26455
26456 for {
26457 x := v_0
26458 if v_1.Op != OpNeg16 {
26459 break
26460 }
26461 v_1_0 := v_1.Args[0]
26462 if v_1_0.Op != OpAnd16 {
26463 break
26464 }
26465 _ = v_1_0.Args[1]
26466 v_1_0_0 := v_1_0.Args[0]
26467 v_1_0_1 := v_1_0.Args[1]
26468 for _i0 := 0; _i0 <= 1; _i0, v_1_0_0, v_1_0_1 = _i0+1, v_1_0_1, v_1_0_0 {
26469 y := v_1_0_0
26470 if v_1_0_1.Op != OpConst16 {
26471 continue
26472 }
26473 c := auxIntToInt16(v_1_0_1.AuxInt)
26474 if !(c&31 == 31) {
26475 continue
26476 }
26477 v.reset(OpRotateLeft32)
26478 v0 := b.NewValue0(v.Pos, OpNeg16, y.Type)
26479 v0.AddArg(y)
26480 v.AddArg2(x, v0)
26481 return true
26482 }
26483 break
26484 }
26485
26486
26487
26488 for {
26489 x := v_0
26490 if v_1.Op != OpNeg8 {
26491 break
26492 }
26493 v_1_0 := v_1.Args[0]
26494 if v_1_0.Op != OpAnd8 {
26495 break
26496 }
26497 _ = v_1_0.Args[1]
26498 v_1_0_0 := v_1_0.Args[0]
26499 v_1_0_1 := v_1_0.Args[1]
26500 for _i0 := 0; _i0 <= 1; _i0, v_1_0_0, v_1_0_1 = _i0+1, v_1_0_1, v_1_0_0 {
26501 y := v_1_0_0
26502 if v_1_0_1.Op != OpConst8 {
26503 continue
26504 }
26505 c := auxIntToInt8(v_1_0_1.AuxInt)
26506 if !(c&31 == 31) {
26507 continue
26508 }
26509 v.reset(OpRotateLeft32)
26510 v0 := b.NewValue0(v.Pos, OpNeg8, y.Type)
26511 v0.AddArg(y)
26512 v.AddArg2(x, v0)
26513 return true
26514 }
26515 break
26516 }
26517
26518
26519
26520 for {
26521 x := v_0
26522 if v_1.Op != OpAdd64 {
26523 break
26524 }
26525 _ = v_1.Args[1]
26526 v_1_0 := v_1.Args[0]
26527 v_1_1 := v_1.Args[1]
26528 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
26529 y := v_1_0
26530 if v_1_1.Op != OpConst64 {
26531 continue
26532 }
26533 c := auxIntToInt64(v_1_1.AuxInt)
26534 if !(c&31 == 0) {
26535 continue
26536 }
26537 v.reset(OpRotateLeft32)
26538 v.AddArg2(x, y)
26539 return true
26540 }
26541 break
26542 }
26543
26544
26545
26546 for {
26547 x := v_0
26548 if v_1.Op != OpAdd32 {
26549 break
26550 }
26551 _ = v_1.Args[1]
26552 v_1_0 := v_1.Args[0]
26553 v_1_1 := v_1.Args[1]
26554 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
26555 y := v_1_0
26556 if v_1_1.Op != OpConst32 {
26557 continue
26558 }
26559 c := auxIntToInt32(v_1_1.AuxInt)
26560 if !(c&31 == 0) {
26561 continue
26562 }
26563 v.reset(OpRotateLeft32)
26564 v.AddArg2(x, y)
26565 return true
26566 }
26567 break
26568 }
26569
26570
26571
26572 for {
26573 x := v_0
26574 if v_1.Op != OpAdd16 {
26575 break
26576 }
26577 _ = v_1.Args[1]
26578 v_1_0 := v_1.Args[0]
26579 v_1_1 := v_1.Args[1]
26580 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
26581 y := v_1_0
26582 if v_1_1.Op != OpConst16 {
26583 continue
26584 }
26585 c := auxIntToInt16(v_1_1.AuxInt)
26586 if !(c&31 == 0) {
26587 continue
26588 }
26589 v.reset(OpRotateLeft32)
26590 v.AddArg2(x, y)
26591 return true
26592 }
26593 break
26594 }
26595
26596
26597
26598 for {
26599 x := v_0
26600 if v_1.Op != OpAdd8 {
26601 break
26602 }
26603 _ = v_1.Args[1]
26604 v_1_0 := v_1.Args[0]
26605 v_1_1 := v_1.Args[1]
26606 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
26607 y := v_1_0
26608 if v_1_1.Op != OpConst8 {
26609 continue
26610 }
26611 c := auxIntToInt8(v_1_1.AuxInt)
26612 if !(c&31 == 0) {
26613 continue
26614 }
26615 v.reset(OpRotateLeft32)
26616 v.AddArg2(x, y)
26617 return true
26618 }
26619 break
26620 }
26621
26622
26623
26624 for {
26625 x := v_0
26626 if v_1.Op != OpSub64 {
26627 break
26628 }
26629 y := v_1.Args[1]
26630 v_1_0 := v_1.Args[0]
26631 if v_1_0.Op != OpConst64 {
26632 break
26633 }
26634 c := auxIntToInt64(v_1_0.AuxInt)
26635 if !(c&31 == 0) {
26636 break
26637 }
26638 v.reset(OpRotateLeft32)
26639 v0 := b.NewValue0(v.Pos, OpNeg64, y.Type)
26640 v0.AddArg(y)
26641 v.AddArg2(x, v0)
26642 return true
26643 }
26644
26645
26646
26647 for {
26648 x := v_0
26649 if v_1.Op != OpSub32 {
26650 break
26651 }
26652 y := v_1.Args[1]
26653 v_1_0 := v_1.Args[0]
26654 if v_1_0.Op != OpConst32 {
26655 break
26656 }
26657 c := auxIntToInt32(v_1_0.AuxInt)
26658 if !(c&31 == 0) {
26659 break
26660 }
26661 v.reset(OpRotateLeft32)
26662 v0 := b.NewValue0(v.Pos, OpNeg32, y.Type)
26663 v0.AddArg(y)
26664 v.AddArg2(x, v0)
26665 return true
26666 }
26667
26668
26669
26670 for {
26671 x := v_0
26672 if v_1.Op != OpSub16 {
26673 break
26674 }
26675 y := v_1.Args[1]
26676 v_1_0 := v_1.Args[0]
26677 if v_1_0.Op != OpConst16 {
26678 break
26679 }
26680 c := auxIntToInt16(v_1_0.AuxInt)
26681 if !(c&31 == 0) {
26682 break
26683 }
26684 v.reset(OpRotateLeft32)
26685 v0 := b.NewValue0(v.Pos, OpNeg16, y.Type)
26686 v0.AddArg(y)
26687 v.AddArg2(x, v0)
26688 return true
26689 }
26690
26691
26692
26693 for {
26694 x := v_0
26695 if v_1.Op != OpSub8 {
26696 break
26697 }
26698 y := v_1.Args[1]
26699 v_1_0 := v_1.Args[0]
26700 if v_1_0.Op != OpConst8 {
26701 break
26702 }
26703 c := auxIntToInt8(v_1_0.AuxInt)
26704 if !(c&31 == 0) {
26705 break
26706 }
26707 v.reset(OpRotateLeft32)
26708 v0 := b.NewValue0(v.Pos, OpNeg8, y.Type)
26709 v0.AddArg(y)
26710 v.AddArg2(x, v0)
26711 return true
26712 }
26713
26714
26715
26716 for {
26717 x := v_0
26718 if v_1.Op != OpConst64 {
26719 break
26720 }
26721 t := v_1.Type
26722 c := auxIntToInt64(v_1.AuxInt)
26723 if !(config.PtrSize == 4) {
26724 break
26725 }
26726 v.reset(OpRotateLeft32)
26727 v0 := b.NewValue0(v.Pos, OpConst32, t)
26728 v0.AuxInt = int32ToAuxInt(int32(c))
26729 v.AddArg2(x, v0)
26730 return true
26731 }
26732
26733
26734
26735 for {
26736 if v_0.Op != OpRotateLeft32 {
26737 break
26738 }
26739 c := v_0.Args[1]
26740 x := v_0.Args[0]
26741 d := v_1
26742 if !(c.Type.Size() == 8 && d.Type.Size() == 8) {
26743 break
26744 }
26745 v.reset(OpRotateLeft32)
26746 v0 := b.NewValue0(v.Pos, OpAdd64, c.Type)
26747 v0.AddArg2(c, d)
26748 v.AddArg2(x, v0)
26749 return true
26750 }
26751
26752
26753
26754 for {
26755 if v_0.Op != OpRotateLeft32 {
26756 break
26757 }
26758 c := v_0.Args[1]
26759 x := v_0.Args[0]
26760 d := v_1
26761 if !(c.Type.Size() == 4 && d.Type.Size() == 4) {
26762 break
26763 }
26764 v.reset(OpRotateLeft32)
26765 v0 := b.NewValue0(v.Pos, OpAdd32, c.Type)
26766 v0.AddArg2(c, d)
26767 v.AddArg2(x, v0)
26768 return true
26769 }
26770
26771
26772
26773 for {
26774 if v_0.Op != OpRotateLeft32 {
26775 break
26776 }
26777 c := v_0.Args[1]
26778 x := v_0.Args[0]
26779 d := v_1
26780 if !(c.Type.Size() == 2 && d.Type.Size() == 2) {
26781 break
26782 }
26783 v.reset(OpRotateLeft32)
26784 v0 := b.NewValue0(v.Pos, OpAdd16, c.Type)
26785 v0.AddArg2(c, d)
26786 v.AddArg2(x, v0)
26787 return true
26788 }
26789
26790
26791
26792 for {
26793 if v_0.Op != OpRotateLeft32 {
26794 break
26795 }
26796 c := v_0.Args[1]
26797 x := v_0.Args[0]
26798 d := v_1
26799 if !(c.Type.Size() == 1 && d.Type.Size() == 1) {
26800 break
26801 }
26802 v.reset(OpRotateLeft32)
26803 v0 := b.NewValue0(v.Pos, OpAdd8, c.Type)
26804 v0.AddArg2(c, d)
26805 v.AddArg2(x, v0)
26806 return true
26807 }
26808 return false
26809 }
26810 func rewriteValuegeneric_OpRotateLeft64(v *Value) bool {
26811 v_1 := v.Args[1]
26812 v_0 := v.Args[0]
26813 b := v.Block
26814 config := b.Func.Config
26815
26816
26817
26818 for {
26819 x := v_0
26820 if v_1.Op != OpConst64 {
26821 break
26822 }
26823 c := auxIntToInt64(v_1.AuxInt)
26824 if !(c%64 == 0) {
26825 break
26826 }
26827 v.copyOf(x)
26828 return true
26829 }
26830
26831
26832
26833 for {
26834 x := v_0
26835 if v_1.Op != OpAnd64 {
26836 break
26837 }
26838 _ = v_1.Args[1]
26839 v_1_0 := v_1.Args[0]
26840 v_1_1 := v_1.Args[1]
26841 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
26842 y := v_1_0
26843 if v_1_1.Op != OpConst64 {
26844 continue
26845 }
26846 c := auxIntToInt64(v_1_1.AuxInt)
26847 if !(c&63 == 63) {
26848 continue
26849 }
26850 v.reset(OpRotateLeft64)
26851 v.AddArg2(x, y)
26852 return true
26853 }
26854 break
26855 }
26856
26857
26858
26859 for {
26860 x := v_0
26861 if v_1.Op != OpAnd32 {
26862 break
26863 }
26864 _ = v_1.Args[1]
26865 v_1_0 := v_1.Args[0]
26866 v_1_1 := v_1.Args[1]
26867 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
26868 y := v_1_0
26869 if v_1_1.Op != OpConst32 {
26870 continue
26871 }
26872 c := auxIntToInt32(v_1_1.AuxInt)
26873 if !(c&63 == 63) {
26874 continue
26875 }
26876 v.reset(OpRotateLeft64)
26877 v.AddArg2(x, y)
26878 return true
26879 }
26880 break
26881 }
26882
26883
26884
26885 for {
26886 x := v_0
26887 if v_1.Op != OpAnd16 {
26888 break
26889 }
26890 _ = v_1.Args[1]
26891 v_1_0 := v_1.Args[0]
26892 v_1_1 := v_1.Args[1]
26893 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
26894 y := v_1_0
26895 if v_1_1.Op != OpConst16 {
26896 continue
26897 }
26898 c := auxIntToInt16(v_1_1.AuxInt)
26899 if !(c&63 == 63) {
26900 continue
26901 }
26902 v.reset(OpRotateLeft64)
26903 v.AddArg2(x, y)
26904 return true
26905 }
26906 break
26907 }
26908
26909
26910
26911 for {
26912 x := v_0
26913 if v_1.Op != OpAnd8 {
26914 break
26915 }
26916 _ = v_1.Args[1]
26917 v_1_0 := v_1.Args[0]
26918 v_1_1 := v_1.Args[1]
26919 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
26920 y := v_1_0
26921 if v_1_1.Op != OpConst8 {
26922 continue
26923 }
26924 c := auxIntToInt8(v_1_1.AuxInt)
26925 if !(c&63 == 63) {
26926 continue
26927 }
26928 v.reset(OpRotateLeft64)
26929 v.AddArg2(x, y)
26930 return true
26931 }
26932 break
26933 }
26934
26935
26936
26937 for {
26938 x := v_0
26939 if v_1.Op != OpNeg64 {
26940 break
26941 }
26942 v_1_0 := v_1.Args[0]
26943 if v_1_0.Op != OpAnd64 {
26944 break
26945 }
26946 _ = v_1_0.Args[1]
26947 v_1_0_0 := v_1_0.Args[0]
26948 v_1_0_1 := v_1_0.Args[1]
26949 for _i0 := 0; _i0 <= 1; _i0, v_1_0_0, v_1_0_1 = _i0+1, v_1_0_1, v_1_0_0 {
26950 y := v_1_0_0
26951 if v_1_0_1.Op != OpConst64 {
26952 continue
26953 }
26954 c := auxIntToInt64(v_1_0_1.AuxInt)
26955 if !(c&63 == 63) {
26956 continue
26957 }
26958 v.reset(OpRotateLeft64)
26959 v0 := b.NewValue0(v.Pos, OpNeg64, y.Type)
26960 v0.AddArg(y)
26961 v.AddArg2(x, v0)
26962 return true
26963 }
26964 break
26965 }
26966
26967
26968
26969 for {
26970 x := v_0
26971 if v_1.Op != OpNeg32 {
26972 break
26973 }
26974 v_1_0 := v_1.Args[0]
26975 if v_1_0.Op != OpAnd32 {
26976 break
26977 }
26978 _ = v_1_0.Args[1]
26979 v_1_0_0 := v_1_0.Args[0]
26980 v_1_0_1 := v_1_0.Args[1]
26981 for _i0 := 0; _i0 <= 1; _i0, v_1_0_0, v_1_0_1 = _i0+1, v_1_0_1, v_1_0_0 {
26982 y := v_1_0_0
26983 if v_1_0_1.Op != OpConst32 {
26984 continue
26985 }
26986 c := auxIntToInt32(v_1_0_1.AuxInt)
26987 if !(c&63 == 63) {
26988 continue
26989 }
26990 v.reset(OpRotateLeft64)
26991 v0 := b.NewValue0(v.Pos, OpNeg32, y.Type)
26992 v0.AddArg(y)
26993 v.AddArg2(x, v0)
26994 return true
26995 }
26996 break
26997 }
26998
26999
27000
27001 for {
27002 x := v_0
27003 if v_1.Op != OpNeg16 {
27004 break
27005 }
27006 v_1_0 := v_1.Args[0]
27007 if v_1_0.Op != OpAnd16 {
27008 break
27009 }
27010 _ = v_1_0.Args[1]
27011 v_1_0_0 := v_1_0.Args[0]
27012 v_1_0_1 := v_1_0.Args[1]
27013 for _i0 := 0; _i0 <= 1; _i0, v_1_0_0, v_1_0_1 = _i0+1, v_1_0_1, v_1_0_0 {
27014 y := v_1_0_0
27015 if v_1_0_1.Op != OpConst16 {
27016 continue
27017 }
27018 c := auxIntToInt16(v_1_0_1.AuxInt)
27019 if !(c&63 == 63) {
27020 continue
27021 }
27022 v.reset(OpRotateLeft64)
27023 v0 := b.NewValue0(v.Pos, OpNeg16, y.Type)
27024 v0.AddArg(y)
27025 v.AddArg2(x, v0)
27026 return true
27027 }
27028 break
27029 }
27030
27031
27032
27033 for {
27034 x := v_0
27035 if v_1.Op != OpNeg8 {
27036 break
27037 }
27038 v_1_0 := v_1.Args[0]
27039 if v_1_0.Op != OpAnd8 {
27040 break
27041 }
27042 _ = v_1_0.Args[1]
27043 v_1_0_0 := v_1_0.Args[0]
27044 v_1_0_1 := v_1_0.Args[1]
27045 for _i0 := 0; _i0 <= 1; _i0, v_1_0_0, v_1_0_1 = _i0+1, v_1_0_1, v_1_0_0 {
27046 y := v_1_0_0
27047 if v_1_0_1.Op != OpConst8 {
27048 continue
27049 }
27050 c := auxIntToInt8(v_1_0_1.AuxInt)
27051 if !(c&63 == 63) {
27052 continue
27053 }
27054 v.reset(OpRotateLeft64)
27055 v0 := b.NewValue0(v.Pos, OpNeg8, y.Type)
27056 v0.AddArg(y)
27057 v.AddArg2(x, v0)
27058 return true
27059 }
27060 break
27061 }
27062
27063
27064
27065 for {
27066 x := v_0
27067 if v_1.Op != OpAdd64 {
27068 break
27069 }
27070 _ = v_1.Args[1]
27071 v_1_0 := v_1.Args[0]
27072 v_1_1 := v_1.Args[1]
27073 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
27074 y := v_1_0
27075 if v_1_1.Op != OpConst64 {
27076 continue
27077 }
27078 c := auxIntToInt64(v_1_1.AuxInt)
27079 if !(c&63 == 0) {
27080 continue
27081 }
27082 v.reset(OpRotateLeft64)
27083 v.AddArg2(x, y)
27084 return true
27085 }
27086 break
27087 }
27088
27089
27090
27091 for {
27092 x := v_0
27093 if v_1.Op != OpAdd32 {
27094 break
27095 }
27096 _ = v_1.Args[1]
27097 v_1_0 := v_1.Args[0]
27098 v_1_1 := v_1.Args[1]
27099 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
27100 y := v_1_0
27101 if v_1_1.Op != OpConst32 {
27102 continue
27103 }
27104 c := auxIntToInt32(v_1_1.AuxInt)
27105 if !(c&63 == 0) {
27106 continue
27107 }
27108 v.reset(OpRotateLeft64)
27109 v.AddArg2(x, y)
27110 return true
27111 }
27112 break
27113 }
27114
27115
27116
27117 for {
27118 x := v_0
27119 if v_1.Op != OpAdd16 {
27120 break
27121 }
27122 _ = v_1.Args[1]
27123 v_1_0 := v_1.Args[0]
27124 v_1_1 := v_1.Args[1]
27125 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
27126 y := v_1_0
27127 if v_1_1.Op != OpConst16 {
27128 continue
27129 }
27130 c := auxIntToInt16(v_1_1.AuxInt)
27131 if !(c&63 == 0) {
27132 continue
27133 }
27134 v.reset(OpRotateLeft64)
27135 v.AddArg2(x, y)
27136 return true
27137 }
27138 break
27139 }
27140
27141
27142
27143 for {
27144 x := v_0
27145 if v_1.Op != OpAdd8 {
27146 break
27147 }
27148 _ = v_1.Args[1]
27149 v_1_0 := v_1.Args[0]
27150 v_1_1 := v_1.Args[1]
27151 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
27152 y := v_1_0
27153 if v_1_1.Op != OpConst8 {
27154 continue
27155 }
27156 c := auxIntToInt8(v_1_1.AuxInt)
27157 if !(c&63 == 0) {
27158 continue
27159 }
27160 v.reset(OpRotateLeft64)
27161 v.AddArg2(x, y)
27162 return true
27163 }
27164 break
27165 }
27166
27167
27168
27169 for {
27170 x := v_0
27171 if v_1.Op != OpSub64 {
27172 break
27173 }
27174 y := v_1.Args[1]
27175 v_1_0 := v_1.Args[0]
27176 if v_1_0.Op != OpConst64 {
27177 break
27178 }
27179 c := auxIntToInt64(v_1_0.AuxInt)
27180 if !(c&63 == 0) {
27181 break
27182 }
27183 v.reset(OpRotateLeft64)
27184 v0 := b.NewValue0(v.Pos, OpNeg64, y.Type)
27185 v0.AddArg(y)
27186 v.AddArg2(x, v0)
27187 return true
27188 }
27189
27190
27191
27192 for {
27193 x := v_0
27194 if v_1.Op != OpSub32 {
27195 break
27196 }
27197 y := v_1.Args[1]
27198 v_1_0 := v_1.Args[0]
27199 if v_1_0.Op != OpConst32 {
27200 break
27201 }
27202 c := auxIntToInt32(v_1_0.AuxInt)
27203 if !(c&63 == 0) {
27204 break
27205 }
27206 v.reset(OpRotateLeft64)
27207 v0 := b.NewValue0(v.Pos, OpNeg32, y.Type)
27208 v0.AddArg(y)
27209 v.AddArg2(x, v0)
27210 return true
27211 }
27212
27213
27214
27215 for {
27216 x := v_0
27217 if v_1.Op != OpSub16 {
27218 break
27219 }
27220 y := v_1.Args[1]
27221 v_1_0 := v_1.Args[0]
27222 if v_1_0.Op != OpConst16 {
27223 break
27224 }
27225 c := auxIntToInt16(v_1_0.AuxInt)
27226 if !(c&63 == 0) {
27227 break
27228 }
27229 v.reset(OpRotateLeft64)
27230 v0 := b.NewValue0(v.Pos, OpNeg16, y.Type)
27231 v0.AddArg(y)
27232 v.AddArg2(x, v0)
27233 return true
27234 }
27235
27236
27237
27238 for {
27239 x := v_0
27240 if v_1.Op != OpSub8 {
27241 break
27242 }
27243 y := v_1.Args[1]
27244 v_1_0 := v_1.Args[0]
27245 if v_1_0.Op != OpConst8 {
27246 break
27247 }
27248 c := auxIntToInt8(v_1_0.AuxInt)
27249 if !(c&63 == 0) {
27250 break
27251 }
27252 v.reset(OpRotateLeft64)
27253 v0 := b.NewValue0(v.Pos, OpNeg8, y.Type)
27254 v0.AddArg(y)
27255 v.AddArg2(x, v0)
27256 return true
27257 }
27258
27259
27260
27261 for {
27262 x := v_0
27263 if v_1.Op != OpConst64 {
27264 break
27265 }
27266 t := v_1.Type
27267 c := auxIntToInt64(v_1.AuxInt)
27268 if !(config.PtrSize == 4) {
27269 break
27270 }
27271 v.reset(OpRotateLeft64)
27272 v0 := b.NewValue0(v.Pos, OpConst32, t)
27273 v0.AuxInt = int32ToAuxInt(int32(c))
27274 v.AddArg2(x, v0)
27275 return true
27276 }
27277
27278
27279
27280 for {
27281 if v_0.Op != OpRotateLeft64 {
27282 break
27283 }
27284 c := v_0.Args[1]
27285 x := v_0.Args[0]
27286 d := v_1
27287 if !(c.Type.Size() == 8 && d.Type.Size() == 8) {
27288 break
27289 }
27290 v.reset(OpRotateLeft64)
27291 v0 := b.NewValue0(v.Pos, OpAdd64, c.Type)
27292 v0.AddArg2(c, d)
27293 v.AddArg2(x, v0)
27294 return true
27295 }
27296
27297
27298
27299 for {
27300 if v_0.Op != OpRotateLeft64 {
27301 break
27302 }
27303 c := v_0.Args[1]
27304 x := v_0.Args[0]
27305 d := v_1
27306 if !(c.Type.Size() == 4 && d.Type.Size() == 4) {
27307 break
27308 }
27309 v.reset(OpRotateLeft64)
27310 v0 := b.NewValue0(v.Pos, OpAdd32, c.Type)
27311 v0.AddArg2(c, d)
27312 v.AddArg2(x, v0)
27313 return true
27314 }
27315
27316
27317
27318 for {
27319 if v_0.Op != OpRotateLeft64 {
27320 break
27321 }
27322 c := v_0.Args[1]
27323 x := v_0.Args[0]
27324 d := v_1
27325 if !(c.Type.Size() == 2 && d.Type.Size() == 2) {
27326 break
27327 }
27328 v.reset(OpRotateLeft64)
27329 v0 := b.NewValue0(v.Pos, OpAdd16, c.Type)
27330 v0.AddArg2(c, d)
27331 v.AddArg2(x, v0)
27332 return true
27333 }
27334
27335
27336
27337 for {
27338 if v_0.Op != OpRotateLeft64 {
27339 break
27340 }
27341 c := v_0.Args[1]
27342 x := v_0.Args[0]
27343 d := v_1
27344 if !(c.Type.Size() == 1 && d.Type.Size() == 1) {
27345 break
27346 }
27347 v.reset(OpRotateLeft64)
27348 v0 := b.NewValue0(v.Pos, OpAdd8, c.Type)
27349 v0.AddArg2(c, d)
27350 v.AddArg2(x, v0)
27351 return true
27352 }
27353 return false
27354 }
27355 func rewriteValuegeneric_OpRotateLeft8(v *Value) bool {
27356 v_1 := v.Args[1]
27357 v_0 := v.Args[0]
27358 b := v.Block
27359 config := b.Func.Config
27360
27361
27362
27363 for {
27364 x := v_0
27365 if v_1.Op != OpConst8 {
27366 break
27367 }
27368 c := auxIntToInt8(v_1.AuxInt)
27369 if !(c%8 == 0) {
27370 break
27371 }
27372 v.copyOf(x)
27373 return true
27374 }
27375
27376
27377
27378 for {
27379 x := v_0
27380 if v_1.Op != OpAnd64 {
27381 break
27382 }
27383 _ = v_1.Args[1]
27384 v_1_0 := v_1.Args[0]
27385 v_1_1 := v_1.Args[1]
27386 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
27387 y := v_1_0
27388 if v_1_1.Op != OpConst64 {
27389 continue
27390 }
27391 c := auxIntToInt64(v_1_1.AuxInt)
27392 if !(c&7 == 7) {
27393 continue
27394 }
27395 v.reset(OpRotateLeft8)
27396 v.AddArg2(x, y)
27397 return true
27398 }
27399 break
27400 }
27401
27402
27403
27404 for {
27405 x := v_0
27406 if v_1.Op != OpAnd32 {
27407 break
27408 }
27409 _ = v_1.Args[1]
27410 v_1_0 := v_1.Args[0]
27411 v_1_1 := v_1.Args[1]
27412 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
27413 y := v_1_0
27414 if v_1_1.Op != OpConst32 {
27415 continue
27416 }
27417 c := auxIntToInt32(v_1_1.AuxInt)
27418 if !(c&7 == 7) {
27419 continue
27420 }
27421 v.reset(OpRotateLeft8)
27422 v.AddArg2(x, y)
27423 return true
27424 }
27425 break
27426 }
27427
27428
27429
27430 for {
27431 x := v_0
27432 if v_1.Op != OpAnd16 {
27433 break
27434 }
27435 _ = v_1.Args[1]
27436 v_1_0 := v_1.Args[0]
27437 v_1_1 := v_1.Args[1]
27438 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
27439 y := v_1_0
27440 if v_1_1.Op != OpConst16 {
27441 continue
27442 }
27443 c := auxIntToInt16(v_1_1.AuxInt)
27444 if !(c&7 == 7) {
27445 continue
27446 }
27447 v.reset(OpRotateLeft8)
27448 v.AddArg2(x, y)
27449 return true
27450 }
27451 break
27452 }
27453
27454
27455
27456 for {
27457 x := v_0
27458 if v_1.Op != OpAnd8 {
27459 break
27460 }
27461 _ = v_1.Args[1]
27462 v_1_0 := v_1.Args[0]
27463 v_1_1 := v_1.Args[1]
27464 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
27465 y := v_1_0
27466 if v_1_1.Op != OpConst8 {
27467 continue
27468 }
27469 c := auxIntToInt8(v_1_1.AuxInt)
27470 if !(c&7 == 7) {
27471 continue
27472 }
27473 v.reset(OpRotateLeft8)
27474 v.AddArg2(x, y)
27475 return true
27476 }
27477 break
27478 }
27479
27480
27481
27482 for {
27483 x := v_0
27484 if v_1.Op != OpNeg64 {
27485 break
27486 }
27487 v_1_0 := v_1.Args[0]
27488 if v_1_0.Op != OpAnd64 {
27489 break
27490 }
27491 _ = v_1_0.Args[1]
27492 v_1_0_0 := v_1_0.Args[0]
27493 v_1_0_1 := v_1_0.Args[1]
27494 for _i0 := 0; _i0 <= 1; _i0, v_1_0_0, v_1_0_1 = _i0+1, v_1_0_1, v_1_0_0 {
27495 y := v_1_0_0
27496 if v_1_0_1.Op != OpConst64 {
27497 continue
27498 }
27499 c := auxIntToInt64(v_1_0_1.AuxInt)
27500 if !(c&7 == 7) {
27501 continue
27502 }
27503 v.reset(OpRotateLeft8)
27504 v0 := b.NewValue0(v.Pos, OpNeg64, y.Type)
27505 v0.AddArg(y)
27506 v.AddArg2(x, v0)
27507 return true
27508 }
27509 break
27510 }
27511
27512
27513
27514 for {
27515 x := v_0
27516 if v_1.Op != OpNeg32 {
27517 break
27518 }
27519 v_1_0 := v_1.Args[0]
27520 if v_1_0.Op != OpAnd32 {
27521 break
27522 }
27523 _ = v_1_0.Args[1]
27524 v_1_0_0 := v_1_0.Args[0]
27525 v_1_0_1 := v_1_0.Args[1]
27526 for _i0 := 0; _i0 <= 1; _i0, v_1_0_0, v_1_0_1 = _i0+1, v_1_0_1, v_1_0_0 {
27527 y := v_1_0_0
27528 if v_1_0_1.Op != OpConst32 {
27529 continue
27530 }
27531 c := auxIntToInt32(v_1_0_1.AuxInt)
27532 if !(c&7 == 7) {
27533 continue
27534 }
27535 v.reset(OpRotateLeft8)
27536 v0 := b.NewValue0(v.Pos, OpNeg32, y.Type)
27537 v0.AddArg(y)
27538 v.AddArg2(x, v0)
27539 return true
27540 }
27541 break
27542 }
27543
27544
27545
27546 for {
27547 x := v_0
27548 if v_1.Op != OpNeg16 {
27549 break
27550 }
27551 v_1_0 := v_1.Args[0]
27552 if v_1_0.Op != OpAnd16 {
27553 break
27554 }
27555 _ = v_1_0.Args[1]
27556 v_1_0_0 := v_1_0.Args[0]
27557 v_1_0_1 := v_1_0.Args[1]
27558 for _i0 := 0; _i0 <= 1; _i0, v_1_0_0, v_1_0_1 = _i0+1, v_1_0_1, v_1_0_0 {
27559 y := v_1_0_0
27560 if v_1_0_1.Op != OpConst16 {
27561 continue
27562 }
27563 c := auxIntToInt16(v_1_0_1.AuxInt)
27564 if !(c&7 == 7) {
27565 continue
27566 }
27567 v.reset(OpRotateLeft8)
27568 v0 := b.NewValue0(v.Pos, OpNeg16, y.Type)
27569 v0.AddArg(y)
27570 v.AddArg2(x, v0)
27571 return true
27572 }
27573 break
27574 }
27575
27576
27577
27578 for {
27579 x := v_0
27580 if v_1.Op != OpNeg8 {
27581 break
27582 }
27583 v_1_0 := v_1.Args[0]
27584 if v_1_0.Op != OpAnd8 {
27585 break
27586 }
27587 _ = v_1_0.Args[1]
27588 v_1_0_0 := v_1_0.Args[0]
27589 v_1_0_1 := v_1_0.Args[1]
27590 for _i0 := 0; _i0 <= 1; _i0, v_1_0_0, v_1_0_1 = _i0+1, v_1_0_1, v_1_0_0 {
27591 y := v_1_0_0
27592 if v_1_0_1.Op != OpConst8 {
27593 continue
27594 }
27595 c := auxIntToInt8(v_1_0_1.AuxInt)
27596 if !(c&7 == 7) {
27597 continue
27598 }
27599 v.reset(OpRotateLeft8)
27600 v0 := b.NewValue0(v.Pos, OpNeg8, y.Type)
27601 v0.AddArg(y)
27602 v.AddArg2(x, v0)
27603 return true
27604 }
27605 break
27606 }
27607
27608
27609
27610 for {
27611 x := v_0
27612 if v_1.Op != OpAdd64 {
27613 break
27614 }
27615 _ = v_1.Args[1]
27616 v_1_0 := v_1.Args[0]
27617 v_1_1 := v_1.Args[1]
27618 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
27619 y := v_1_0
27620 if v_1_1.Op != OpConst64 {
27621 continue
27622 }
27623 c := auxIntToInt64(v_1_1.AuxInt)
27624 if !(c&7 == 0) {
27625 continue
27626 }
27627 v.reset(OpRotateLeft8)
27628 v.AddArg2(x, y)
27629 return true
27630 }
27631 break
27632 }
27633
27634
27635
27636 for {
27637 x := v_0
27638 if v_1.Op != OpAdd32 {
27639 break
27640 }
27641 _ = v_1.Args[1]
27642 v_1_0 := v_1.Args[0]
27643 v_1_1 := v_1.Args[1]
27644 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
27645 y := v_1_0
27646 if v_1_1.Op != OpConst32 {
27647 continue
27648 }
27649 c := auxIntToInt32(v_1_1.AuxInt)
27650 if !(c&7 == 0) {
27651 continue
27652 }
27653 v.reset(OpRotateLeft8)
27654 v.AddArg2(x, y)
27655 return true
27656 }
27657 break
27658 }
27659
27660
27661
27662 for {
27663 x := v_0
27664 if v_1.Op != OpAdd16 {
27665 break
27666 }
27667 _ = v_1.Args[1]
27668 v_1_0 := v_1.Args[0]
27669 v_1_1 := v_1.Args[1]
27670 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
27671 y := v_1_0
27672 if v_1_1.Op != OpConst16 {
27673 continue
27674 }
27675 c := auxIntToInt16(v_1_1.AuxInt)
27676 if !(c&7 == 0) {
27677 continue
27678 }
27679 v.reset(OpRotateLeft8)
27680 v.AddArg2(x, y)
27681 return true
27682 }
27683 break
27684 }
27685
27686
27687
27688 for {
27689 x := v_0
27690 if v_1.Op != OpAdd8 {
27691 break
27692 }
27693 _ = v_1.Args[1]
27694 v_1_0 := v_1.Args[0]
27695 v_1_1 := v_1.Args[1]
27696 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
27697 y := v_1_0
27698 if v_1_1.Op != OpConst8 {
27699 continue
27700 }
27701 c := auxIntToInt8(v_1_1.AuxInt)
27702 if !(c&7 == 0) {
27703 continue
27704 }
27705 v.reset(OpRotateLeft8)
27706 v.AddArg2(x, y)
27707 return true
27708 }
27709 break
27710 }
27711
27712
27713
27714 for {
27715 x := v_0
27716 if v_1.Op != OpSub64 {
27717 break
27718 }
27719 y := v_1.Args[1]
27720 v_1_0 := v_1.Args[0]
27721 if v_1_0.Op != OpConst64 {
27722 break
27723 }
27724 c := auxIntToInt64(v_1_0.AuxInt)
27725 if !(c&7 == 0) {
27726 break
27727 }
27728 v.reset(OpRotateLeft8)
27729 v0 := b.NewValue0(v.Pos, OpNeg64, y.Type)
27730 v0.AddArg(y)
27731 v.AddArg2(x, v0)
27732 return true
27733 }
27734
27735
27736
27737 for {
27738 x := v_0
27739 if v_1.Op != OpSub32 {
27740 break
27741 }
27742 y := v_1.Args[1]
27743 v_1_0 := v_1.Args[0]
27744 if v_1_0.Op != OpConst32 {
27745 break
27746 }
27747 c := auxIntToInt32(v_1_0.AuxInt)
27748 if !(c&7 == 0) {
27749 break
27750 }
27751 v.reset(OpRotateLeft8)
27752 v0 := b.NewValue0(v.Pos, OpNeg32, y.Type)
27753 v0.AddArg(y)
27754 v.AddArg2(x, v0)
27755 return true
27756 }
27757
27758
27759
27760 for {
27761 x := v_0
27762 if v_1.Op != OpSub16 {
27763 break
27764 }
27765 y := v_1.Args[1]
27766 v_1_0 := v_1.Args[0]
27767 if v_1_0.Op != OpConst16 {
27768 break
27769 }
27770 c := auxIntToInt16(v_1_0.AuxInt)
27771 if !(c&7 == 0) {
27772 break
27773 }
27774 v.reset(OpRotateLeft8)
27775 v0 := b.NewValue0(v.Pos, OpNeg16, y.Type)
27776 v0.AddArg(y)
27777 v.AddArg2(x, v0)
27778 return true
27779 }
27780
27781
27782
27783 for {
27784 x := v_0
27785 if v_1.Op != OpSub8 {
27786 break
27787 }
27788 y := v_1.Args[1]
27789 v_1_0 := v_1.Args[0]
27790 if v_1_0.Op != OpConst8 {
27791 break
27792 }
27793 c := auxIntToInt8(v_1_0.AuxInt)
27794 if !(c&7 == 0) {
27795 break
27796 }
27797 v.reset(OpRotateLeft8)
27798 v0 := b.NewValue0(v.Pos, OpNeg8, y.Type)
27799 v0.AddArg(y)
27800 v.AddArg2(x, v0)
27801 return true
27802 }
27803
27804
27805
27806 for {
27807 x := v_0
27808 if v_1.Op != OpConst64 {
27809 break
27810 }
27811 t := v_1.Type
27812 c := auxIntToInt64(v_1.AuxInt)
27813 if !(config.PtrSize == 4) {
27814 break
27815 }
27816 v.reset(OpRotateLeft8)
27817 v0 := b.NewValue0(v.Pos, OpConst32, t)
27818 v0.AuxInt = int32ToAuxInt(int32(c))
27819 v.AddArg2(x, v0)
27820 return true
27821 }
27822
27823
27824
27825 for {
27826 if v_0.Op != OpRotateLeft8 {
27827 break
27828 }
27829 c := v_0.Args[1]
27830 x := v_0.Args[0]
27831 d := v_1
27832 if !(c.Type.Size() == 8 && d.Type.Size() == 8) {
27833 break
27834 }
27835 v.reset(OpRotateLeft8)
27836 v0 := b.NewValue0(v.Pos, OpAdd64, c.Type)
27837 v0.AddArg2(c, d)
27838 v.AddArg2(x, v0)
27839 return true
27840 }
27841
27842
27843
27844 for {
27845 if v_0.Op != OpRotateLeft8 {
27846 break
27847 }
27848 c := v_0.Args[1]
27849 x := v_0.Args[0]
27850 d := v_1
27851 if !(c.Type.Size() == 4 && d.Type.Size() == 4) {
27852 break
27853 }
27854 v.reset(OpRotateLeft8)
27855 v0 := b.NewValue0(v.Pos, OpAdd32, c.Type)
27856 v0.AddArg2(c, d)
27857 v.AddArg2(x, v0)
27858 return true
27859 }
27860
27861
27862
27863 for {
27864 if v_0.Op != OpRotateLeft8 {
27865 break
27866 }
27867 c := v_0.Args[1]
27868 x := v_0.Args[0]
27869 d := v_1
27870 if !(c.Type.Size() == 2 && d.Type.Size() == 2) {
27871 break
27872 }
27873 v.reset(OpRotateLeft8)
27874 v0 := b.NewValue0(v.Pos, OpAdd16, c.Type)
27875 v0.AddArg2(c, d)
27876 v.AddArg2(x, v0)
27877 return true
27878 }
27879
27880
27881
27882 for {
27883 if v_0.Op != OpRotateLeft8 {
27884 break
27885 }
27886 c := v_0.Args[1]
27887 x := v_0.Args[0]
27888 d := v_1
27889 if !(c.Type.Size() == 1 && d.Type.Size() == 1) {
27890 break
27891 }
27892 v.reset(OpRotateLeft8)
27893 v0 := b.NewValue0(v.Pos, OpAdd8, c.Type)
27894 v0.AddArg2(c, d)
27895 v.AddArg2(x, v0)
27896 return true
27897 }
27898 return false
27899 }
27900 func rewriteValuegeneric_OpRound32F(v *Value) bool {
27901 v_0 := v.Args[0]
27902
27903
27904 for {
27905 x := v_0
27906 if x.Op != OpConst32F {
27907 break
27908 }
27909 v.copyOf(x)
27910 return true
27911 }
27912 return false
27913 }
27914 func rewriteValuegeneric_OpRound64F(v *Value) bool {
27915 v_0 := v.Args[0]
27916
27917
27918 for {
27919 x := v_0
27920 if x.Op != OpConst64F {
27921 break
27922 }
27923 v.copyOf(x)
27924 return true
27925 }
27926 return false
27927 }
27928 func rewriteValuegeneric_OpRoundToEven(v *Value) bool {
27929 v_0 := v.Args[0]
27930
27931
27932 for {
27933 if v_0.Op != OpConst64F {
27934 break
27935 }
27936 c := auxIntToFloat64(v_0.AuxInt)
27937 v.reset(OpConst64F)
27938 v.AuxInt = float64ToAuxInt(math.RoundToEven(c))
27939 return true
27940 }
27941 return false
27942 }
27943 func rewriteValuegeneric_OpRsh16Ux16(v *Value) bool {
27944 v_1 := v.Args[1]
27945 v_0 := v.Args[0]
27946 b := v.Block
27947
27948
27949 for {
27950 t := v.Type
27951 x := v_0
27952 if v_1.Op != OpConst16 {
27953 break
27954 }
27955 c := auxIntToInt16(v_1.AuxInt)
27956 v.reset(OpRsh16Ux64)
27957 v0 := b.NewValue0(v.Pos, OpConst64, t)
27958 v0.AuxInt = int64ToAuxInt(int64(uint16(c)))
27959 v.AddArg2(x, v0)
27960 return true
27961 }
27962
27963
27964 for {
27965 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 {
27966 break
27967 }
27968 v.reset(OpConst16)
27969 v.AuxInt = int16ToAuxInt(0)
27970 return true
27971 }
27972 return false
27973 }
27974 func rewriteValuegeneric_OpRsh16Ux32(v *Value) bool {
27975 v_1 := v.Args[1]
27976 v_0 := v.Args[0]
27977 b := v.Block
27978
27979
27980 for {
27981 t := v.Type
27982 x := v_0
27983 if v_1.Op != OpConst32 {
27984 break
27985 }
27986 c := auxIntToInt32(v_1.AuxInt)
27987 v.reset(OpRsh16Ux64)
27988 v0 := b.NewValue0(v.Pos, OpConst64, t)
27989 v0.AuxInt = int64ToAuxInt(int64(uint32(c)))
27990 v.AddArg2(x, v0)
27991 return true
27992 }
27993
27994
27995 for {
27996 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 {
27997 break
27998 }
27999 v.reset(OpConst16)
28000 v.AuxInt = int16ToAuxInt(0)
28001 return true
28002 }
28003 return false
28004 }
28005 func rewriteValuegeneric_OpRsh16Ux64(v *Value) bool {
28006 v_1 := v.Args[1]
28007 v_0 := v.Args[0]
28008 b := v.Block
28009 typ := &b.Func.Config.Types
28010
28011
28012 for {
28013 if v_0.Op != OpConst16 {
28014 break
28015 }
28016 c := auxIntToInt16(v_0.AuxInt)
28017 if v_1.Op != OpConst64 {
28018 break
28019 }
28020 d := auxIntToInt64(v_1.AuxInt)
28021 v.reset(OpConst16)
28022 v.AuxInt = int16ToAuxInt(int16(uint16(c) >> uint64(d)))
28023 return true
28024 }
28025
28026
28027 for {
28028 x := v_0
28029 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 0 {
28030 break
28031 }
28032 v.copyOf(x)
28033 return true
28034 }
28035
28036
28037 for {
28038 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 {
28039 break
28040 }
28041 v.reset(OpConst16)
28042 v.AuxInt = int16ToAuxInt(0)
28043 return true
28044 }
28045
28046
28047
28048 for {
28049 if v_1.Op != OpConst64 {
28050 break
28051 }
28052 c := auxIntToInt64(v_1.AuxInt)
28053 if !(uint64(c) >= 16) {
28054 break
28055 }
28056 v.reset(OpConst16)
28057 v.AuxInt = int16ToAuxInt(0)
28058 return true
28059 }
28060
28061
28062
28063 for {
28064 t := v.Type
28065 if v_0.Op != OpRsh16Ux64 {
28066 break
28067 }
28068 _ = v_0.Args[1]
28069 x := v_0.Args[0]
28070 v_0_1 := v_0.Args[1]
28071 if v_0_1.Op != OpConst64 {
28072 break
28073 }
28074 c := auxIntToInt64(v_0_1.AuxInt)
28075 if v_1.Op != OpConst64 {
28076 break
28077 }
28078 d := auxIntToInt64(v_1.AuxInt)
28079 if !(!uaddOvf(c, d)) {
28080 break
28081 }
28082 v.reset(OpRsh16Ux64)
28083 v0 := b.NewValue0(v.Pos, OpConst64, t)
28084 v0.AuxInt = int64ToAuxInt(c + d)
28085 v.AddArg2(x, v0)
28086 return true
28087 }
28088
28089
28090 for {
28091 if v_0.Op != OpRsh16x64 {
28092 break
28093 }
28094 x := v_0.Args[0]
28095 if v_1.Op != OpConst64 {
28096 break
28097 }
28098 t := v_1.Type
28099 if auxIntToInt64(v_1.AuxInt) != 15 {
28100 break
28101 }
28102 v.reset(OpRsh16Ux64)
28103 v0 := b.NewValue0(v.Pos, OpConst64, t)
28104 v0.AuxInt = int64ToAuxInt(15)
28105 v.AddArg2(x, v0)
28106 return true
28107 }
28108
28109
28110
28111 for {
28112 i := v_0
28113 if i.Op != OpLsh16x64 {
28114 break
28115 }
28116 _ = i.Args[1]
28117 x := i.Args[0]
28118 i_1 := i.Args[1]
28119 if i_1.Op != OpConst64 {
28120 break
28121 }
28122 c := auxIntToInt64(i_1.AuxInt)
28123 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != c || !(c >= 0 && c < 16 && i.Uses == 1) {
28124 break
28125 }
28126 v.reset(OpAnd16)
28127 v0 := b.NewValue0(v.Pos, OpConst16, v.Type)
28128 v0.AuxInt = int16ToAuxInt(int16(^uint16(0) >> c))
28129 v.AddArg2(x, v0)
28130 return true
28131 }
28132
28133
28134
28135 for {
28136 if v_0.Op != OpLsh16x64 {
28137 break
28138 }
28139 _ = v_0.Args[1]
28140 v_0_0 := v_0.Args[0]
28141 if v_0_0.Op != OpRsh16Ux64 {
28142 break
28143 }
28144 _ = v_0_0.Args[1]
28145 x := v_0_0.Args[0]
28146 v_0_0_1 := v_0_0.Args[1]
28147 if v_0_0_1.Op != OpConst64 {
28148 break
28149 }
28150 c1 := auxIntToInt64(v_0_0_1.AuxInt)
28151 v_0_1 := v_0.Args[1]
28152 if v_0_1.Op != OpConst64 {
28153 break
28154 }
28155 c2 := auxIntToInt64(v_0_1.AuxInt)
28156 if v_1.Op != OpConst64 {
28157 break
28158 }
28159 c3 := auxIntToInt64(v_1.AuxInt)
28160 if !(uint64(c1) >= uint64(c2) && uint64(c3) >= uint64(c2) && !uaddOvf(c1-c2, c3)) {
28161 break
28162 }
28163 v.reset(OpRsh16Ux64)
28164 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
28165 v0.AuxInt = int64ToAuxInt(c1 - c2 + c3)
28166 v.AddArg2(x, v0)
28167 return true
28168 }
28169
28170
28171 for {
28172 if v_0.Op != OpLsh16x64 {
28173 break
28174 }
28175 _ = v_0.Args[1]
28176 x := v_0.Args[0]
28177 v_0_1 := v_0.Args[1]
28178 if v_0_1.Op != OpConst64 || auxIntToInt64(v_0_1.AuxInt) != 8 || v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 8 {
28179 break
28180 }
28181 v.reset(OpZeroExt8to16)
28182 v0 := b.NewValue0(v.Pos, OpTrunc16to8, typ.UInt8)
28183 v0.AddArg(x)
28184 v.AddArg(v0)
28185 return true
28186 }
28187 return false
28188 }
28189 func rewriteValuegeneric_OpRsh16Ux8(v *Value) bool {
28190 v_1 := v.Args[1]
28191 v_0 := v.Args[0]
28192 b := v.Block
28193
28194
28195 for {
28196 t := v.Type
28197 x := v_0
28198 if v_1.Op != OpConst8 {
28199 break
28200 }
28201 c := auxIntToInt8(v_1.AuxInt)
28202 v.reset(OpRsh16Ux64)
28203 v0 := b.NewValue0(v.Pos, OpConst64, t)
28204 v0.AuxInt = int64ToAuxInt(int64(uint8(c)))
28205 v.AddArg2(x, v0)
28206 return true
28207 }
28208
28209
28210 for {
28211 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 {
28212 break
28213 }
28214 v.reset(OpConst16)
28215 v.AuxInt = int16ToAuxInt(0)
28216 return true
28217 }
28218 return false
28219 }
28220 func rewriteValuegeneric_OpRsh16x16(v *Value) bool {
28221 v_1 := v.Args[1]
28222 v_0 := v.Args[0]
28223 b := v.Block
28224
28225
28226 for {
28227 t := v.Type
28228 x := v_0
28229 if v_1.Op != OpConst16 {
28230 break
28231 }
28232 c := auxIntToInt16(v_1.AuxInt)
28233 v.reset(OpRsh16x64)
28234 v0 := b.NewValue0(v.Pos, OpConst64, t)
28235 v0.AuxInt = int64ToAuxInt(int64(uint16(c)))
28236 v.AddArg2(x, v0)
28237 return true
28238 }
28239
28240
28241 for {
28242 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 {
28243 break
28244 }
28245 v.reset(OpConst16)
28246 v.AuxInt = int16ToAuxInt(0)
28247 return true
28248 }
28249 return false
28250 }
28251 func rewriteValuegeneric_OpRsh16x32(v *Value) bool {
28252 v_1 := v.Args[1]
28253 v_0 := v.Args[0]
28254 b := v.Block
28255
28256
28257 for {
28258 t := v.Type
28259 x := v_0
28260 if v_1.Op != OpConst32 {
28261 break
28262 }
28263 c := auxIntToInt32(v_1.AuxInt)
28264 v.reset(OpRsh16x64)
28265 v0 := b.NewValue0(v.Pos, OpConst64, t)
28266 v0.AuxInt = int64ToAuxInt(int64(uint32(c)))
28267 v.AddArg2(x, v0)
28268 return true
28269 }
28270
28271
28272 for {
28273 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 {
28274 break
28275 }
28276 v.reset(OpConst16)
28277 v.AuxInt = int16ToAuxInt(0)
28278 return true
28279 }
28280 return false
28281 }
28282 func rewriteValuegeneric_OpRsh16x64(v *Value) bool {
28283 v_1 := v.Args[1]
28284 v_0 := v.Args[0]
28285 b := v.Block
28286 typ := &b.Func.Config.Types
28287
28288
28289 for {
28290 if v_0.Op != OpConst16 {
28291 break
28292 }
28293 c := auxIntToInt16(v_0.AuxInt)
28294 if v_1.Op != OpConst64 {
28295 break
28296 }
28297 d := auxIntToInt64(v_1.AuxInt)
28298 v.reset(OpConst16)
28299 v.AuxInt = int16ToAuxInt(c >> uint64(d))
28300 return true
28301 }
28302
28303
28304 for {
28305 x := v_0
28306 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 0 {
28307 break
28308 }
28309 v.copyOf(x)
28310 return true
28311 }
28312
28313
28314 for {
28315 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 {
28316 break
28317 }
28318 v.reset(OpConst16)
28319 v.AuxInt = int16ToAuxInt(0)
28320 return true
28321 }
28322
28323
28324
28325 for {
28326 t := v.Type
28327 if v_0.Op != OpRsh16x64 {
28328 break
28329 }
28330 _ = v_0.Args[1]
28331 x := v_0.Args[0]
28332 v_0_1 := v_0.Args[1]
28333 if v_0_1.Op != OpConst64 {
28334 break
28335 }
28336 c := auxIntToInt64(v_0_1.AuxInt)
28337 if v_1.Op != OpConst64 {
28338 break
28339 }
28340 d := auxIntToInt64(v_1.AuxInt)
28341 if !(!uaddOvf(c, d)) {
28342 break
28343 }
28344 v.reset(OpRsh16x64)
28345 v0 := b.NewValue0(v.Pos, OpConst64, t)
28346 v0.AuxInt = int64ToAuxInt(c + d)
28347 v.AddArg2(x, v0)
28348 return true
28349 }
28350
28351
28352 for {
28353 if v_0.Op != OpLsh16x64 {
28354 break
28355 }
28356 _ = v_0.Args[1]
28357 x := v_0.Args[0]
28358 v_0_1 := v_0.Args[1]
28359 if v_0_1.Op != OpConst64 || auxIntToInt64(v_0_1.AuxInt) != 8 || v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 8 {
28360 break
28361 }
28362 v.reset(OpSignExt8to16)
28363 v0 := b.NewValue0(v.Pos, OpTrunc16to8, typ.Int8)
28364 v0.AddArg(x)
28365 v.AddArg(v0)
28366 return true
28367 }
28368 return false
28369 }
28370 func rewriteValuegeneric_OpRsh16x8(v *Value) bool {
28371 v_1 := v.Args[1]
28372 v_0 := v.Args[0]
28373 b := v.Block
28374
28375
28376 for {
28377 t := v.Type
28378 x := v_0
28379 if v_1.Op != OpConst8 {
28380 break
28381 }
28382 c := auxIntToInt8(v_1.AuxInt)
28383 v.reset(OpRsh16x64)
28384 v0 := b.NewValue0(v.Pos, OpConst64, t)
28385 v0.AuxInt = int64ToAuxInt(int64(uint8(c)))
28386 v.AddArg2(x, v0)
28387 return true
28388 }
28389
28390
28391 for {
28392 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 {
28393 break
28394 }
28395 v.reset(OpConst16)
28396 v.AuxInt = int16ToAuxInt(0)
28397 return true
28398 }
28399 return false
28400 }
28401 func rewriteValuegeneric_OpRsh32Ux16(v *Value) bool {
28402 v_1 := v.Args[1]
28403 v_0 := v.Args[0]
28404 b := v.Block
28405
28406
28407 for {
28408 t := v.Type
28409 x := v_0
28410 if v_1.Op != OpConst16 {
28411 break
28412 }
28413 c := auxIntToInt16(v_1.AuxInt)
28414 v.reset(OpRsh32Ux64)
28415 v0 := b.NewValue0(v.Pos, OpConst64, t)
28416 v0.AuxInt = int64ToAuxInt(int64(uint16(c)))
28417 v.AddArg2(x, v0)
28418 return true
28419 }
28420
28421
28422 for {
28423 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
28424 break
28425 }
28426 v.reset(OpConst32)
28427 v.AuxInt = int32ToAuxInt(0)
28428 return true
28429 }
28430 return false
28431 }
28432 func rewriteValuegeneric_OpRsh32Ux32(v *Value) bool {
28433 v_1 := v.Args[1]
28434 v_0 := v.Args[0]
28435 b := v.Block
28436
28437
28438 for {
28439 t := v.Type
28440 x := v_0
28441 if v_1.Op != OpConst32 {
28442 break
28443 }
28444 c := auxIntToInt32(v_1.AuxInt)
28445 v.reset(OpRsh32Ux64)
28446 v0 := b.NewValue0(v.Pos, OpConst64, t)
28447 v0.AuxInt = int64ToAuxInt(int64(uint32(c)))
28448 v.AddArg2(x, v0)
28449 return true
28450 }
28451
28452
28453 for {
28454 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
28455 break
28456 }
28457 v.reset(OpConst32)
28458 v.AuxInt = int32ToAuxInt(0)
28459 return true
28460 }
28461 return false
28462 }
28463 func rewriteValuegeneric_OpRsh32Ux64(v *Value) bool {
28464 v_1 := v.Args[1]
28465 v_0 := v.Args[0]
28466 b := v.Block
28467 typ := &b.Func.Config.Types
28468
28469
28470 for {
28471 if v_0.Op != OpConst32 {
28472 break
28473 }
28474 c := auxIntToInt32(v_0.AuxInt)
28475 if v_1.Op != OpConst64 {
28476 break
28477 }
28478 d := auxIntToInt64(v_1.AuxInt)
28479 v.reset(OpConst32)
28480 v.AuxInt = int32ToAuxInt(int32(uint32(c) >> uint64(d)))
28481 return true
28482 }
28483
28484
28485 for {
28486 x := v_0
28487 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 0 {
28488 break
28489 }
28490 v.copyOf(x)
28491 return true
28492 }
28493
28494
28495 for {
28496 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
28497 break
28498 }
28499 v.reset(OpConst32)
28500 v.AuxInt = int32ToAuxInt(0)
28501 return true
28502 }
28503
28504
28505
28506 for {
28507 if v_1.Op != OpConst64 {
28508 break
28509 }
28510 c := auxIntToInt64(v_1.AuxInt)
28511 if !(uint64(c) >= 32) {
28512 break
28513 }
28514 v.reset(OpConst32)
28515 v.AuxInt = int32ToAuxInt(0)
28516 return true
28517 }
28518
28519
28520
28521 for {
28522 t := v.Type
28523 if v_0.Op != OpRsh32Ux64 {
28524 break
28525 }
28526 _ = v_0.Args[1]
28527 x := v_0.Args[0]
28528 v_0_1 := v_0.Args[1]
28529 if v_0_1.Op != OpConst64 {
28530 break
28531 }
28532 c := auxIntToInt64(v_0_1.AuxInt)
28533 if v_1.Op != OpConst64 {
28534 break
28535 }
28536 d := auxIntToInt64(v_1.AuxInt)
28537 if !(!uaddOvf(c, d)) {
28538 break
28539 }
28540 v.reset(OpRsh32Ux64)
28541 v0 := b.NewValue0(v.Pos, OpConst64, t)
28542 v0.AuxInt = int64ToAuxInt(c + d)
28543 v.AddArg2(x, v0)
28544 return true
28545 }
28546
28547
28548 for {
28549 if v_0.Op != OpRsh32x64 {
28550 break
28551 }
28552 x := v_0.Args[0]
28553 if v_1.Op != OpConst64 {
28554 break
28555 }
28556 t := v_1.Type
28557 if auxIntToInt64(v_1.AuxInt) != 31 {
28558 break
28559 }
28560 v.reset(OpRsh32Ux64)
28561 v0 := b.NewValue0(v.Pos, OpConst64, t)
28562 v0.AuxInt = int64ToAuxInt(31)
28563 v.AddArg2(x, v0)
28564 return true
28565 }
28566
28567
28568
28569 for {
28570 i := v_0
28571 if i.Op != OpLsh32x64 {
28572 break
28573 }
28574 _ = i.Args[1]
28575 x := i.Args[0]
28576 i_1 := i.Args[1]
28577 if i_1.Op != OpConst64 {
28578 break
28579 }
28580 c := auxIntToInt64(i_1.AuxInt)
28581 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != c || !(c >= 0 && c < 32 && i.Uses == 1) {
28582 break
28583 }
28584 v.reset(OpAnd32)
28585 v0 := b.NewValue0(v.Pos, OpConst32, v.Type)
28586 v0.AuxInt = int32ToAuxInt(int32(^uint32(0) >> c))
28587 v.AddArg2(x, v0)
28588 return true
28589 }
28590
28591
28592
28593 for {
28594 if v_0.Op != OpLsh32x64 {
28595 break
28596 }
28597 _ = v_0.Args[1]
28598 v_0_0 := v_0.Args[0]
28599 if v_0_0.Op != OpRsh32Ux64 {
28600 break
28601 }
28602 _ = v_0_0.Args[1]
28603 x := v_0_0.Args[0]
28604 v_0_0_1 := v_0_0.Args[1]
28605 if v_0_0_1.Op != OpConst64 {
28606 break
28607 }
28608 c1 := auxIntToInt64(v_0_0_1.AuxInt)
28609 v_0_1 := v_0.Args[1]
28610 if v_0_1.Op != OpConst64 {
28611 break
28612 }
28613 c2 := auxIntToInt64(v_0_1.AuxInt)
28614 if v_1.Op != OpConst64 {
28615 break
28616 }
28617 c3 := auxIntToInt64(v_1.AuxInt)
28618 if !(uint64(c1) >= uint64(c2) && uint64(c3) >= uint64(c2) && !uaddOvf(c1-c2, c3)) {
28619 break
28620 }
28621 v.reset(OpRsh32Ux64)
28622 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
28623 v0.AuxInt = int64ToAuxInt(c1 - c2 + c3)
28624 v.AddArg2(x, v0)
28625 return true
28626 }
28627
28628
28629 for {
28630 if v_0.Op != OpLsh32x64 {
28631 break
28632 }
28633 _ = v_0.Args[1]
28634 x := v_0.Args[0]
28635 v_0_1 := v_0.Args[1]
28636 if v_0_1.Op != OpConst64 || auxIntToInt64(v_0_1.AuxInt) != 24 || v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 24 {
28637 break
28638 }
28639 v.reset(OpZeroExt8to32)
28640 v0 := b.NewValue0(v.Pos, OpTrunc32to8, typ.UInt8)
28641 v0.AddArg(x)
28642 v.AddArg(v0)
28643 return true
28644 }
28645
28646
28647 for {
28648 if v_0.Op != OpLsh32x64 {
28649 break
28650 }
28651 _ = v_0.Args[1]
28652 x := v_0.Args[0]
28653 v_0_1 := v_0.Args[1]
28654 if v_0_1.Op != OpConst64 || auxIntToInt64(v_0_1.AuxInt) != 16 || v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 16 {
28655 break
28656 }
28657 v.reset(OpZeroExt16to32)
28658 v0 := b.NewValue0(v.Pos, OpTrunc32to16, typ.UInt16)
28659 v0.AddArg(x)
28660 v.AddArg(v0)
28661 return true
28662 }
28663 return false
28664 }
28665 func rewriteValuegeneric_OpRsh32Ux8(v *Value) bool {
28666 v_1 := v.Args[1]
28667 v_0 := v.Args[0]
28668 b := v.Block
28669
28670
28671 for {
28672 t := v.Type
28673 x := v_0
28674 if v_1.Op != OpConst8 {
28675 break
28676 }
28677 c := auxIntToInt8(v_1.AuxInt)
28678 v.reset(OpRsh32Ux64)
28679 v0 := b.NewValue0(v.Pos, OpConst64, t)
28680 v0.AuxInt = int64ToAuxInt(int64(uint8(c)))
28681 v.AddArg2(x, v0)
28682 return true
28683 }
28684
28685
28686 for {
28687 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
28688 break
28689 }
28690 v.reset(OpConst32)
28691 v.AuxInt = int32ToAuxInt(0)
28692 return true
28693 }
28694 return false
28695 }
28696 func rewriteValuegeneric_OpRsh32x16(v *Value) bool {
28697 v_1 := v.Args[1]
28698 v_0 := v.Args[0]
28699 b := v.Block
28700
28701
28702 for {
28703 t := v.Type
28704 x := v_0
28705 if v_1.Op != OpConst16 {
28706 break
28707 }
28708 c := auxIntToInt16(v_1.AuxInt)
28709 v.reset(OpRsh32x64)
28710 v0 := b.NewValue0(v.Pos, OpConst64, t)
28711 v0.AuxInt = int64ToAuxInt(int64(uint16(c)))
28712 v.AddArg2(x, v0)
28713 return true
28714 }
28715
28716
28717 for {
28718 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
28719 break
28720 }
28721 v.reset(OpConst32)
28722 v.AuxInt = int32ToAuxInt(0)
28723 return true
28724 }
28725 return false
28726 }
28727 func rewriteValuegeneric_OpRsh32x32(v *Value) bool {
28728 v_1 := v.Args[1]
28729 v_0 := v.Args[0]
28730 b := v.Block
28731
28732
28733 for {
28734 t := v.Type
28735 x := v_0
28736 if v_1.Op != OpConst32 {
28737 break
28738 }
28739 c := auxIntToInt32(v_1.AuxInt)
28740 v.reset(OpRsh32x64)
28741 v0 := b.NewValue0(v.Pos, OpConst64, t)
28742 v0.AuxInt = int64ToAuxInt(int64(uint32(c)))
28743 v.AddArg2(x, v0)
28744 return true
28745 }
28746
28747
28748 for {
28749 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
28750 break
28751 }
28752 v.reset(OpConst32)
28753 v.AuxInt = int32ToAuxInt(0)
28754 return true
28755 }
28756 return false
28757 }
28758 func rewriteValuegeneric_OpRsh32x64(v *Value) bool {
28759 v_1 := v.Args[1]
28760 v_0 := v.Args[0]
28761 b := v.Block
28762 typ := &b.Func.Config.Types
28763
28764
28765 for {
28766 if v_0.Op != OpConst32 {
28767 break
28768 }
28769 c := auxIntToInt32(v_0.AuxInt)
28770 if v_1.Op != OpConst64 {
28771 break
28772 }
28773 d := auxIntToInt64(v_1.AuxInt)
28774 v.reset(OpConst32)
28775 v.AuxInt = int32ToAuxInt(c >> uint64(d))
28776 return true
28777 }
28778
28779
28780 for {
28781 x := v_0
28782 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 0 {
28783 break
28784 }
28785 v.copyOf(x)
28786 return true
28787 }
28788
28789
28790 for {
28791 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
28792 break
28793 }
28794 v.reset(OpConst32)
28795 v.AuxInt = int32ToAuxInt(0)
28796 return true
28797 }
28798
28799
28800
28801 for {
28802 t := v.Type
28803 if v_0.Op != OpRsh32x64 {
28804 break
28805 }
28806 _ = v_0.Args[1]
28807 x := v_0.Args[0]
28808 v_0_1 := v_0.Args[1]
28809 if v_0_1.Op != OpConst64 {
28810 break
28811 }
28812 c := auxIntToInt64(v_0_1.AuxInt)
28813 if v_1.Op != OpConst64 {
28814 break
28815 }
28816 d := auxIntToInt64(v_1.AuxInt)
28817 if !(!uaddOvf(c, d)) {
28818 break
28819 }
28820 v.reset(OpRsh32x64)
28821 v0 := b.NewValue0(v.Pos, OpConst64, t)
28822 v0.AuxInt = int64ToAuxInt(c + d)
28823 v.AddArg2(x, v0)
28824 return true
28825 }
28826
28827
28828 for {
28829 if v_0.Op != OpLsh32x64 {
28830 break
28831 }
28832 _ = v_0.Args[1]
28833 x := v_0.Args[0]
28834 v_0_1 := v_0.Args[1]
28835 if v_0_1.Op != OpConst64 || auxIntToInt64(v_0_1.AuxInt) != 24 || v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 24 {
28836 break
28837 }
28838 v.reset(OpSignExt8to32)
28839 v0 := b.NewValue0(v.Pos, OpTrunc32to8, typ.Int8)
28840 v0.AddArg(x)
28841 v.AddArg(v0)
28842 return true
28843 }
28844
28845
28846 for {
28847 if v_0.Op != OpLsh32x64 {
28848 break
28849 }
28850 _ = v_0.Args[1]
28851 x := v_0.Args[0]
28852 v_0_1 := v_0.Args[1]
28853 if v_0_1.Op != OpConst64 || auxIntToInt64(v_0_1.AuxInt) != 16 || v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 16 {
28854 break
28855 }
28856 v.reset(OpSignExt16to32)
28857 v0 := b.NewValue0(v.Pos, OpTrunc32to16, typ.Int16)
28858 v0.AddArg(x)
28859 v.AddArg(v0)
28860 return true
28861 }
28862 return false
28863 }
28864 func rewriteValuegeneric_OpRsh32x8(v *Value) bool {
28865 v_1 := v.Args[1]
28866 v_0 := v.Args[0]
28867 b := v.Block
28868
28869
28870 for {
28871 t := v.Type
28872 x := v_0
28873 if v_1.Op != OpConst8 {
28874 break
28875 }
28876 c := auxIntToInt8(v_1.AuxInt)
28877 v.reset(OpRsh32x64)
28878 v0 := b.NewValue0(v.Pos, OpConst64, t)
28879 v0.AuxInt = int64ToAuxInt(int64(uint8(c)))
28880 v.AddArg2(x, v0)
28881 return true
28882 }
28883
28884
28885 for {
28886 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
28887 break
28888 }
28889 v.reset(OpConst32)
28890 v.AuxInt = int32ToAuxInt(0)
28891 return true
28892 }
28893 return false
28894 }
28895 func rewriteValuegeneric_OpRsh64Ux16(v *Value) bool {
28896 v_1 := v.Args[1]
28897 v_0 := v.Args[0]
28898 b := v.Block
28899
28900
28901 for {
28902 t := v.Type
28903 x := v_0
28904 if v_1.Op != OpConst16 {
28905 break
28906 }
28907 c := auxIntToInt16(v_1.AuxInt)
28908 v.reset(OpRsh64Ux64)
28909 v0 := b.NewValue0(v.Pos, OpConst64, t)
28910 v0.AuxInt = int64ToAuxInt(int64(uint16(c)))
28911 v.AddArg2(x, v0)
28912 return true
28913 }
28914
28915
28916 for {
28917 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
28918 break
28919 }
28920 v.reset(OpConst64)
28921 v.AuxInt = int64ToAuxInt(0)
28922 return true
28923 }
28924 return false
28925 }
28926 func rewriteValuegeneric_OpRsh64Ux32(v *Value) bool {
28927 v_1 := v.Args[1]
28928 v_0 := v.Args[0]
28929 b := v.Block
28930
28931
28932 for {
28933 t := v.Type
28934 x := v_0
28935 if v_1.Op != OpConst32 {
28936 break
28937 }
28938 c := auxIntToInt32(v_1.AuxInt)
28939 v.reset(OpRsh64Ux64)
28940 v0 := b.NewValue0(v.Pos, OpConst64, t)
28941 v0.AuxInt = int64ToAuxInt(int64(uint32(c)))
28942 v.AddArg2(x, v0)
28943 return true
28944 }
28945
28946
28947 for {
28948 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
28949 break
28950 }
28951 v.reset(OpConst64)
28952 v.AuxInt = int64ToAuxInt(0)
28953 return true
28954 }
28955 return false
28956 }
28957 func rewriteValuegeneric_OpRsh64Ux64(v *Value) bool {
28958 v_1 := v.Args[1]
28959 v_0 := v.Args[0]
28960 b := v.Block
28961 typ := &b.Func.Config.Types
28962
28963
28964 for {
28965 if v_0.Op != OpConst64 {
28966 break
28967 }
28968 c := auxIntToInt64(v_0.AuxInt)
28969 if v_1.Op != OpConst64 {
28970 break
28971 }
28972 d := auxIntToInt64(v_1.AuxInt)
28973 v.reset(OpConst64)
28974 v.AuxInt = int64ToAuxInt(int64(uint64(c) >> uint64(d)))
28975 return true
28976 }
28977
28978
28979 for {
28980 x := v_0
28981 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 0 {
28982 break
28983 }
28984 v.copyOf(x)
28985 return true
28986 }
28987
28988
28989 for {
28990 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
28991 break
28992 }
28993 v.reset(OpConst64)
28994 v.AuxInt = int64ToAuxInt(0)
28995 return true
28996 }
28997
28998
28999
29000 for {
29001 if v_1.Op != OpConst64 {
29002 break
29003 }
29004 c := auxIntToInt64(v_1.AuxInt)
29005 if !(uint64(c) >= 64) {
29006 break
29007 }
29008 v.reset(OpConst64)
29009 v.AuxInt = int64ToAuxInt(0)
29010 return true
29011 }
29012
29013
29014
29015 for {
29016 t := v.Type
29017 if v_0.Op != OpRsh64Ux64 {
29018 break
29019 }
29020 _ = v_0.Args[1]
29021 x := v_0.Args[0]
29022 v_0_1 := v_0.Args[1]
29023 if v_0_1.Op != OpConst64 {
29024 break
29025 }
29026 c := auxIntToInt64(v_0_1.AuxInt)
29027 if v_1.Op != OpConst64 {
29028 break
29029 }
29030 d := auxIntToInt64(v_1.AuxInt)
29031 if !(!uaddOvf(c, d)) {
29032 break
29033 }
29034 v.reset(OpRsh64Ux64)
29035 v0 := b.NewValue0(v.Pos, OpConst64, t)
29036 v0.AuxInt = int64ToAuxInt(c + d)
29037 v.AddArg2(x, v0)
29038 return true
29039 }
29040
29041
29042 for {
29043 if v_0.Op != OpRsh64x64 {
29044 break
29045 }
29046 x := v_0.Args[0]
29047 if v_1.Op != OpConst64 {
29048 break
29049 }
29050 t := v_1.Type
29051 if auxIntToInt64(v_1.AuxInt) != 63 {
29052 break
29053 }
29054 v.reset(OpRsh64Ux64)
29055 v0 := b.NewValue0(v.Pos, OpConst64, t)
29056 v0.AuxInt = int64ToAuxInt(63)
29057 v.AddArg2(x, v0)
29058 return true
29059 }
29060
29061
29062
29063 for {
29064 i := v_0
29065 if i.Op != OpLsh64x64 {
29066 break
29067 }
29068 _ = i.Args[1]
29069 x := i.Args[0]
29070 i_1 := i.Args[1]
29071 if i_1.Op != OpConst64 {
29072 break
29073 }
29074 c := auxIntToInt64(i_1.AuxInt)
29075 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != c || !(c >= 0 && c < 64 && i.Uses == 1) {
29076 break
29077 }
29078 v.reset(OpAnd64)
29079 v0 := b.NewValue0(v.Pos, OpConst64, v.Type)
29080 v0.AuxInt = int64ToAuxInt(int64(^uint64(0) >> c))
29081 v.AddArg2(x, v0)
29082 return true
29083 }
29084
29085
29086
29087 for {
29088 if v_0.Op != OpLsh64x64 {
29089 break
29090 }
29091 _ = v_0.Args[1]
29092 v_0_0 := v_0.Args[0]
29093 if v_0_0.Op != OpRsh64Ux64 {
29094 break
29095 }
29096 _ = v_0_0.Args[1]
29097 x := v_0_0.Args[0]
29098 v_0_0_1 := v_0_0.Args[1]
29099 if v_0_0_1.Op != OpConst64 {
29100 break
29101 }
29102 c1 := auxIntToInt64(v_0_0_1.AuxInt)
29103 v_0_1 := v_0.Args[1]
29104 if v_0_1.Op != OpConst64 {
29105 break
29106 }
29107 c2 := auxIntToInt64(v_0_1.AuxInt)
29108 if v_1.Op != OpConst64 {
29109 break
29110 }
29111 c3 := auxIntToInt64(v_1.AuxInt)
29112 if !(uint64(c1) >= uint64(c2) && uint64(c3) >= uint64(c2) && !uaddOvf(c1-c2, c3)) {
29113 break
29114 }
29115 v.reset(OpRsh64Ux64)
29116 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
29117 v0.AuxInt = int64ToAuxInt(c1 - c2 + c3)
29118 v.AddArg2(x, v0)
29119 return true
29120 }
29121
29122
29123 for {
29124 if v_0.Op != OpLsh64x64 {
29125 break
29126 }
29127 _ = v_0.Args[1]
29128 x := v_0.Args[0]
29129 v_0_1 := v_0.Args[1]
29130 if v_0_1.Op != OpConst64 || auxIntToInt64(v_0_1.AuxInt) != 56 || v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 56 {
29131 break
29132 }
29133 v.reset(OpZeroExt8to64)
29134 v0 := b.NewValue0(v.Pos, OpTrunc64to8, typ.UInt8)
29135 v0.AddArg(x)
29136 v.AddArg(v0)
29137 return true
29138 }
29139
29140
29141 for {
29142 if v_0.Op != OpLsh64x64 {
29143 break
29144 }
29145 _ = v_0.Args[1]
29146 x := v_0.Args[0]
29147 v_0_1 := v_0.Args[1]
29148 if v_0_1.Op != OpConst64 || auxIntToInt64(v_0_1.AuxInt) != 48 || v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 48 {
29149 break
29150 }
29151 v.reset(OpZeroExt16to64)
29152 v0 := b.NewValue0(v.Pos, OpTrunc64to16, typ.UInt16)
29153 v0.AddArg(x)
29154 v.AddArg(v0)
29155 return true
29156 }
29157
29158
29159 for {
29160 if v_0.Op != OpLsh64x64 {
29161 break
29162 }
29163 _ = v_0.Args[1]
29164 x := v_0.Args[0]
29165 v_0_1 := v_0.Args[1]
29166 if v_0_1.Op != OpConst64 || auxIntToInt64(v_0_1.AuxInt) != 32 || v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 32 {
29167 break
29168 }
29169 v.reset(OpZeroExt32to64)
29170 v0 := b.NewValue0(v.Pos, OpTrunc64to32, typ.UInt32)
29171 v0.AddArg(x)
29172 v.AddArg(v0)
29173 return true
29174 }
29175 return false
29176 }
29177 func rewriteValuegeneric_OpRsh64Ux8(v *Value) bool {
29178 v_1 := v.Args[1]
29179 v_0 := v.Args[0]
29180 b := v.Block
29181
29182
29183 for {
29184 t := v.Type
29185 x := v_0
29186 if v_1.Op != OpConst8 {
29187 break
29188 }
29189 c := auxIntToInt8(v_1.AuxInt)
29190 v.reset(OpRsh64Ux64)
29191 v0 := b.NewValue0(v.Pos, OpConst64, t)
29192 v0.AuxInt = int64ToAuxInt(int64(uint8(c)))
29193 v.AddArg2(x, v0)
29194 return true
29195 }
29196
29197
29198 for {
29199 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
29200 break
29201 }
29202 v.reset(OpConst64)
29203 v.AuxInt = int64ToAuxInt(0)
29204 return true
29205 }
29206 return false
29207 }
29208 func rewriteValuegeneric_OpRsh64x16(v *Value) bool {
29209 v_1 := v.Args[1]
29210 v_0 := v.Args[0]
29211 b := v.Block
29212
29213
29214 for {
29215 t := v.Type
29216 x := v_0
29217 if v_1.Op != OpConst16 {
29218 break
29219 }
29220 c := auxIntToInt16(v_1.AuxInt)
29221 v.reset(OpRsh64x64)
29222 v0 := b.NewValue0(v.Pos, OpConst64, t)
29223 v0.AuxInt = int64ToAuxInt(int64(uint16(c)))
29224 v.AddArg2(x, v0)
29225 return true
29226 }
29227
29228
29229 for {
29230 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
29231 break
29232 }
29233 v.reset(OpConst64)
29234 v.AuxInt = int64ToAuxInt(0)
29235 return true
29236 }
29237 return false
29238 }
29239 func rewriteValuegeneric_OpRsh64x32(v *Value) bool {
29240 v_1 := v.Args[1]
29241 v_0 := v.Args[0]
29242 b := v.Block
29243
29244
29245 for {
29246 t := v.Type
29247 x := v_0
29248 if v_1.Op != OpConst32 {
29249 break
29250 }
29251 c := auxIntToInt32(v_1.AuxInt)
29252 v.reset(OpRsh64x64)
29253 v0 := b.NewValue0(v.Pos, OpConst64, t)
29254 v0.AuxInt = int64ToAuxInt(int64(uint32(c)))
29255 v.AddArg2(x, v0)
29256 return true
29257 }
29258
29259
29260 for {
29261 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
29262 break
29263 }
29264 v.reset(OpConst64)
29265 v.AuxInt = int64ToAuxInt(0)
29266 return true
29267 }
29268 return false
29269 }
29270 func rewriteValuegeneric_OpRsh64x64(v *Value) bool {
29271 v_1 := v.Args[1]
29272 v_0 := v.Args[0]
29273 b := v.Block
29274 typ := &b.Func.Config.Types
29275
29276
29277 for {
29278 if v_0.Op != OpConst64 {
29279 break
29280 }
29281 c := auxIntToInt64(v_0.AuxInt)
29282 if v_1.Op != OpConst64 {
29283 break
29284 }
29285 d := auxIntToInt64(v_1.AuxInt)
29286 v.reset(OpConst64)
29287 v.AuxInt = int64ToAuxInt(c >> uint64(d))
29288 return true
29289 }
29290
29291
29292 for {
29293 x := v_0
29294 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 0 {
29295 break
29296 }
29297 v.copyOf(x)
29298 return true
29299 }
29300
29301
29302 for {
29303 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
29304 break
29305 }
29306 v.reset(OpConst64)
29307 v.AuxInt = int64ToAuxInt(0)
29308 return true
29309 }
29310
29311
29312
29313 for {
29314 t := v.Type
29315 if v_0.Op != OpRsh64x64 {
29316 break
29317 }
29318 _ = v_0.Args[1]
29319 x := v_0.Args[0]
29320 v_0_1 := v_0.Args[1]
29321 if v_0_1.Op != OpConst64 {
29322 break
29323 }
29324 c := auxIntToInt64(v_0_1.AuxInt)
29325 if v_1.Op != OpConst64 {
29326 break
29327 }
29328 d := auxIntToInt64(v_1.AuxInt)
29329 if !(!uaddOvf(c, d)) {
29330 break
29331 }
29332 v.reset(OpRsh64x64)
29333 v0 := b.NewValue0(v.Pos, OpConst64, t)
29334 v0.AuxInt = int64ToAuxInt(c + d)
29335 v.AddArg2(x, v0)
29336 return true
29337 }
29338
29339
29340 for {
29341 if v_0.Op != OpLsh64x64 {
29342 break
29343 }
29344 _ = v_0.Args[1]
29345 x := v_0.Args[0]
29346 v_0_1 := v_0.Args[1]
29347 if v_0_1.Op != OpConst64 || auxIntToInt64(v_0_1.AuxInt) != 56 || v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 56 {
29348 break
29349 }
29350 v.reset(OpSignExt8to64)
29351 v0 := b.NewValue0(v.Pos, OpTrunc64to8, typ.Int8)
29352 v0.AddArg(x)
29353 v.AddArg(v0)
29354 return true
29355 }
29356
29357
29358 for {
29359 if v_0.Op != OpLsh64x64 {
29360 break
29361 }
29362 _ = v_0.Args[1]
29363 x := v_0.Args[0]
29364 v_0_1 := v_0.Args[1]
29365 if v_0_1.Op != OpConst64 || auxIntToInt64(v_0_1.AuxInt) != 48 || v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 48 {
29366 break
29367 }
29368 v.reset(OpSignExt16to64)
29369 v0 := b.NewValue0(v.Pos, OpTrunc64to16, typ.Int16)
29370 v0.AddArg(x)
29371 v.AddArg(v0)
29372 return true
29373 }
29374
29375
29376 for {
29377 if v_0.Op != OpLsh64x64 {
29378 break
29379 }
29380 _ = v_0.Args[1]
29381 x := v_0.Args[0]
29382 v_0_1 := v_0.Args[1]
29383 if v_0_1.Op != OpConst64 || auxIntToInt64(v_0_1.AuxInt) != 32 || v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 32 {
29384 break
29385 }
29386 v.reset(OpSignExt32to64)
29387 v0 := b.NewValue0(v.Pos, OpTrunc64to32, typ.Int32)
29388 v0.AddArg(x)
29389 v.AddArg(v0)
29390 return true
29391 }
29392 return false
29393 }
29394 func rewriteValuegeneric_OpRsh64x8(v *Value) bool {
29395 v_1 := v.Args[1]
29396 v_0 := v.Args[0]
29397 b := v.Block
29398
29399
29400 for {
29401 t := v.Type
29402 x := v_0
29403 if v_1.Op != OpConst8 {
29404 break
29405 }
29406 c := auxIntToInt8(v_1.AuxInt)
29407 v.reset(OpRsh64x64)
29408 v0 := b.NewValue0(v.Pos, OpConst64, t)
29409 v0.AuxInt = int64ToAuxInt(int64(uint8(c)))
29410 v.AddArg2(x, v0)
29411 return true
29412 }
29413
29414
29415 for {
29416 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
29417 break
29418 }
29419 v.reset(OpConst64)
29420 v.AuxInt = int64ToAuxInt(0)
29421 return true
29422 }
29423 return false
29424 }
29425 func rewriteValuegeneric_OpRsh8Ux16(v *Value) bool {
29426 v_1 := v.Args[1]
29427 v_0 := v.Args[0]
29428 b := v.Block
29429
29430
29431 for {
29432 t := v.Type
29433 x := v_0
29434 if v_1.Op != OpConst16 {
29435 break
29436 }
29437 c := auxIntToInt16(v_1.AuxInt)
29438 v.reset(OpRsh8Ux64)
29439 v0 := b.NewValue0(v.Pos, OpConst64, t)
29440 v0.AuxInt = int64ToAuxInt(int64(uint16(c)))
29441 v.AddArg2(x, v0)
29442 return true
29443 }
29444
29445
29446 for {
29447 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 {
29448 break
29449 }
29450 v.reset(OpConst8)
29451 v.AuxInt = int8ToAuxInt(0)
29452 return true
29453 }
29454 return false
29455 }
29456 func rewriteValuegeneric_OpRsh8Ux32(v *Value) bool {
29457 v_1 := v.Args[1]
29458 v_0 := v.Args[0]
29459 b := v.Block
29460
29461
29462 for {
29463 t := v.Type
29464 x := v_0
29465 if v_1.Op != OpConst32 {
29466 break
29467 }
29468 c := auxIntToInt32(v_1.AuxInt)
29469 v.reset(OpRsh8Ux64)
29470 v0 := b.NewValue0(v.Pos, OpConst64, t)
29471 v0.AuxInt = int64ToAuxInt(int64(uint32(c)))
29472 v.AddArg2(x, v0)
29473 return true
29474 }
29475
29476
29477 for {
29478 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 {
29479 break
29480 }
29481 v.reset(OpConst8)
29482 v.AuxInt = int8ToAuxInt(0)
29483 return true
29484 }
29485 return false
29486 }
29487 func rewriteValuegeneric_OpRsh8Ux64(v *Value) bool {
29488 v_1 := v.Args[1]
29489 v_0 := v.Args[0]
29490 b := v.Block
29491 typ := &b.Func.Config.Types
29492
29493
29494 for {
29495 if v_0.Op != OpConst8 {
29496 break
29497 }
29498 c := auxIntToInt8(v_0.AuxInt)
29499 if v_1.Op != OpConst64 {
29500 break
29501 }
29502 d := auxIntToInt64(v_1.AuxInt)
29503 v.reset(OpConst8)
29504 v.AuxInt = int8ToAuxInt(int8(uint8(c) >> uint64(d)))
29505 return true
29506 }
29507
29508
29509 for {
29510 x := v_0
29511 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 0 {
29512 break
29513 }
29514 v.copyOf(x)
29515 return true
29516 }
29517
29518
29519 for {
29520 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 {
29521 break
29522 }
29523 v.reset(OpConst8)
29524 v.AuxInt = int8ToAuxInt(0)
29525 return true
29526 }
29527
29528
29529
29530 for {
29531 if v_1.Op != OpConst64 {
29532 break
29533 }
29534 c := auxIntToInt64(v_1.AuxInt)
29535 if !(uint64(c) >= 8) {
29536 break
29537 }
29538 v.reset(OpConst8)
29539 v.AuxInt = int8ToAuxInt(0)
29540 return true
29541 }
29542
29543
29544
29545 for {
29546 t := v.Type
29547 if v_0.Op != OpRsh8Ux64 {
29548 break
29549 }
29550 _ = v_0.Args[1]
29551 x := v_0.Args[0]
29552 v_0_1 := v_0.Args[1]
29553 if v_0_1.Op != OpConst64 {
29554 break
29555 }
29556 c := auxIntToInt64(v_0_1.AuxInt)
29557 if v_1.Op != OpConst64 {
29558 break
29559 }
29560 d := auxIntToInt64(v_1.AuxInt)
29561 if !(!uaddOvf(c, d)) {
29562 break
29563 }
29564 v.reset(OpRsh8Ux64)
29565 v0 := b.NewValue0(v.Pos, OpConst64, t)
29566 v0.AuxInt = int64ToAuxInt(c + d)
29567 v.AddArg2(x, v0)
29568 return true
29569 }
29570
29571
29572 for {
29573 if v_0.Op != OpRsh8x64 {
29574 break
29575 }
29576 x := v_0.Args[0]
29577 if v_1.Op != OpConst64 {
29578 break
29579 }
29580 t := v_1.Type
29581 if auxIntToInt64(v_1.AuxInt) != 7 {
29582 break
29583 }
29584 v.reset(OpRsh8Ux64)
29585 v0 := b.NewValue0(v.Pos, OpConst64, t)
29586 v0.AuxInt = int64ToAuxInt(7)
29587 v.AddArg2(x, v0)
29588 return true
29589 }
29590
29591
29592
29593 for {
29594 i := v_0
29595 if i.Op != OpLsh8x64 {
29596 break
29597 }
29598 _ = i.Args[1]
29599 x := i.Args[0]
29600 i_1 := i.Args[1]
29601 if i_1.Op != OpConst64 {
29602 break
29603 }
29604 c := auxIntToInt64(i_1.AuxInt)
29605 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != c || !(c >= 0 && c < 8 && i.Uses == 1) {
29606 break
29607 }
29608 v.reset(OpAnd8)
29609 v0 := b.NewValue0(v.Pos, OpConst8, v.Type)
29610 v0.AuxInt = int8ToAuxInt(int8(^uint8(0) >> c))
29611 v.AddArg2(x, v0)
29612 return true
29613 }
29614
29615
29616
29617 for {
29618 if v_0.Op != OpLsh8x64 {
29619 break
29620 }
29621 _ = v_0.Args[1]
29622 v_0_0 := v_0.Args[0]
29623 if v_0_0.Op != OpRsh8Ux64 {
29624 break
29625 }
29626 _ = v_0_0.Args[1]
29627 x := v_0_0.Args[0]
29628 v_0_0_1 := v_0_0.Args[1]
29629 if v_0_0_1.Op != OpConst64 {
29630 break
29631 }
29632 c1 := auxIntToInt64(v_0_0_1.AuxInt)
29633 v_0_1 := v_0.Args[1]
29634 if v_0_1.Op != OpConst64 {
29635 break
29636 }
29637 c2 := auxIntToInt64(v_0_1.AuxInt)
29638 if v_1.Op != OpConst64 {
29639 break
29640 }
29641 c3 := auxIntToInt64(v_1.AuxInt)
29642 if !(uint64(c1) >= uint64(c2) && uint64(c3) >= uint64(c2) && !uaddOvf(c1-c2, c3)) {
29643 break
29644 }
29645 v.reset(OpRsh8Ux64)
29646 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
29647 v0.AuxInt = int64ToAuxInt(c1 - c2 + c3)
29648 v.AddArg2(x, v0)
29649 return true
29650 }
29651 return false
29652 }
29653 func rewriteValuegeneric_OpRsh8Ux8(v *Value) bool {
29654 v_1 := v.Args[1]
29655 v_0 := v.Args[0]
29656 b := v.Block
29657
29658
29659 for {
29660 t := v.Type
29661 x := v_0
29662 if v_1.Op != OpConst8 {
29663 break
29664 }
29665 c := auxIntToInt8(v_1.AuxInt)
29666 v.reset(OpRsh8Ux64)
29667 v0 := b.NewValue0(v.Pos, OpConst64, t)
29668 v0.AuxInt = int64ToAuxInt(int64(uint8(c)))
29669 v.AddArg2(x, v0)
29670 return true
29671 }
29672
29673
29674 for {
29675 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 {
29676 break
29677 }
29678 v.reset(OpConst8)
29679 v.AuxInt = int8ToAuxInt(0)
29680 return true
29681 }
29682 return false
29683 }
29684 func rewriteValuegeneric_OpRsh8x16(v *Value) bool {
29685 v_1 := v.Args[1]
29686 v_0 := v.Args[0]
29687 b := v.Block
29688
29689
29690 for {
29691 t := v.Type
29692 x := v_0
29693 if v_1.Op != OpConst16 {
29694 break
29695 }
29696 c := auxIntToInt16(v_1.AuxInt)
29697 v.reset(OpRsh8x64)
29698 v0 := b.NewValue0(v.Pos, OpConst64, t)
29699 v0.AuxInt = int64ToAuxInt(int64(uint16(c)))
29700 v.AddArg2(x, v0)
29701 return true
29702 }
29703
29704
29705 for {
29706 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 {
29707 break
29708 }
29709 v.reset(OpConst8)
29710 v.AuxInt = int8ToAuxInt(0)
29711 return true
29712 }
29713 return false
29714 }
29715 func rewriteValuegeneric_OpRsh8x32(v *Value) bool {
29716 v_1 := v.Args[1]
29717 v_0 := v.Args[0]
29718 b := v.Block
29719
29720
29721 for {
29722 t := v.Type
29723 x := v_0
29724 if v_1.Op != OpConst32 {
29725 break
29726 }
29727 c := auxIntToInt32(v_1.AuxInt)
29728 v.reset(OpRsh8x64)
29729 v0 := b.NewValue0(v.Pos, OpConst64, t)
29730 v0.AuxInt = int64ToAuxInt(int64(uint32(c)))
29731 v.AddArg2(x, v0)
29732 return true
29733 }
29734
29735
29736 for {
29737 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 {
29738 break
29739 }
29740 v.reset(OpConst8)
29741 v.AuxInt = int8ToAuxInt(0)
29742 return true
29743 }
29744 return false
29745 }
29746 func rewriteValuegeneric_OpRsh8x64(v *Value) bool {
29747 v_1 := v.Args[1]
29748 v_0 := v.Args[0]
29749 b := v.Block
29750
29751
29752 for {
29753 if v_0.Op != OpConst8 {
29754 break
29755 }
29756 c := auxIntToInt8(v_0.AuxInt)
29757 if v_1.Op != OpConst64 {
29758 break
29759 }
29760 d := auxIntToInt64(v_1.AuxInt)
29761 v.reset(OpConst8)
29762 v.AuxInt = int8ToAuxInt(c >> uint64(d))
29763 return true
29764 }
29765
29766
29767 for {
29768 x := v_0
29769 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 0 {
29770 break
29771 }
29772 v.copyOf(x)
29773 return true
29774 }
29775
29776
29777 for {
29778 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 {
29779 break
29780 }
29781 v.reset(OpConst8)
29782 v.AuxInt = int8ToAuxInt(0)
29783 return true
29784 }
29785
29786
29787
29788 for {
29789 t := v.Type
29790 if v_0.Op != OpRsh8x64 {
29791 break
29792 }
29793 _ = v_0.Args[1]
29794 x := v_0.Args[0]
29795 v_0_1 := v_0.Args[1]
29796 if v_0_1.Op != OpConst64 {
29797 break
29798 }
29799 c := auxIntToInt64(v_0_1.AuxInt)
29800 if v_1.Op != OpConst64 {
29801 break
29802 }
29803 d := auxIntToInt64(v_1.AuxInt)
29804 if !(!uaddOvf(c, d)) {
29805 break
29806 }
29807 v.reset(OpRsh8x64)
29808 v0 := b.NewValue0(v.Pos, OpConst64, t)
29809 v0.AuxInt = int64ToAuxInt(c + d)
29810 v.AddArg2(x, v0)
29811 return true
29812 }
29813 return false
29814 }
29815 func rewriteValuegeneric_OpRsh8x8(v *Value) bool {
29816 v_1 := v.Args[1]
29817 v_0 := v.Args[0]
29818 b := v.Block
29819
29820
29821 for {
29822 t := v.Type
29823 x := v_0
29824 if v_1.Op != OpConst8 {
29825 break
29826 }
29827 c := auxIntToInt8(v_1.AuxInt)
29828 v.reset(OpRsh8x64)
29829 v0 := b.NewValue0(v.Pos, OpConst64, t)
29830 v0.AuxInt = int64ToAuxInt(int64(uint8(c)))
29831 v.AddArg2(x, v0)
29832 return true
29833 }
29834
29835
29836 for {
29837 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 {
29838 break
29839 }
29840 v.reset(OpConst8)
29841 v.AuxInt = int8ToAuxInt(0)
29842 return true
29843 }
29844 return false
29845 }
29846 func rewriteValuegeneric_OpSelect0(v *Value) bool {
29847 v_0 := v.Args[0]
29848
29849
29850 for {
29851 if v_0.Op != OpMakeTuple {
29852 break
29853 }
29854 x := v_0.Args[0]
29855 v.copyOf(x)
29856 return true
29857 }
29858 return false
29859 }
29860 func rewriteValuegeneric_OpSelect1(v *Value) bool {
29861 v_0 := v.Args[0]
29862
29863
29864 for {
29865 if v_0.Op != OpMakeTuple {
29866 break
29867 }
29868 y := v_0.Args[1]
29869 v.copyOf(y)
29870 return true
29871 }
29872 return false
29873 }
29874 func rewriteValuegeneric_OpSelectN(v *Value) bool {
29875 v_0 := v.Args[0]
29876 b := v.Block
29877 config := b.Func.Config
29878 typ := &b.Func.Config.Types
29879
29880
29881 for {
29882 if auxIntToInt64(v.AuxInt) != 0 || v_0.Op != OpMakeResult || len(v_0.Args) < 1 {
29883 break
29884 }
29885 x := v_0.Args[0]
29886 v.copyOf(x)
29887 return true
29888 }
29889
29890
29891 for {
29892 if auxIntToInt64(v.AuxInt) != 1 || v_0.Op != OpMakeResult || len(v_0.Args) < 2 {
29893 break
29894 }
29895 y := v_0.Args[1]
29896 v.copyOf(y)
29897 return true
29898 }
29899
29900
29901 for {
29902 if auxIntToInt64(v.AuxInt) != 2 || v_0.Op != OpMakeResult || len(v_0.Args) < 3 {
29903 break
29904 }
29905 z := v_0.Args[2]
29906 v.copyOf(z)
29907 return true
29908 }
29909
29910
29911
29912 for {
29913 if auxIntToInt64(v.AuxInt) != 0 {
29914 break
29915 }
29916 call := v_0
29917 if call.Op != OpStaticCall || len(call.Args) != 3 {
29918 break
29919 }
29920 sym := auxToCall(call.Aux)
29921 mem := call.Args[2]
29922 sptr := call.Args[0]
29923 call_1 := call.Args[1]
29924 if call_1.Op != OpConst64 {
29925 break
29926 }
29927 c := auxIntToInt64(call_1.AuxInt)
29928 if !(isInlinableMemclr(config, int64(c)) && isSameCall(sym, "runtime.memclrNoHeapPointers") && call.Uses == 1 && clobber(call)) {
29929 break
29930 }
29931 v.reset(OpZero)
29932 v.AuxInt = int64ToAuxInt(int64(c))
29933 v.Aux = typeToAux(types.Types[types.TUINT8])
29934 v.AddArg2(sptr, mem)
29935 return true
29936 }
29937
29938
29939
29940 for {
29941 if auxIntToInt64(v.AuxInt) != 0 {
29942 break
29943 }
29944 call := v_0
29945 if call.Op != OpStaticCall || len(call.Args) != 3 {
29946 break
29947 }
29948 sym := auxToCall(call.Aux)
29949 mem := call.Args[2]
29950 sptr := call.Args[0]
29951 call_1 := call.Args[1]
29952 if call_1.Op != OpConst32 {
29953 break
29954 }
29955 c := auxIntToInt32(call_1.AuxInt)
29956 if !(isInlinableMemclr(config, int64(c)) && isSameCall(sym, "runtime.memclrNoHeapPointers") && call.Uses == 1 && clobber(call)) {
29957 break
29958 }
29959 v.reset(OpZero)
29960 v.AuxInt = int64ToAuxInt(int64(c))
29961 v.Aux = typeToAux(types.Types[types.TUINT8])
29962 v.AddArg2(sptr, mem)
29963 return true
29964 }
29965
29966
29967
29968 for {
29969 if auxIntToInt64(v.AuxInt) != 0 {
29970 break
29971 }
29972 call := v_0
29973 if call.Op != OpStaticCall || len(call.Args) != 1 {
29974 break
29975 }
29976 sym := auxToCall(call.Aux)
29977 s1 := call.Args[0]
29978 if s1.Op != OpStore {
29979 break
29980 }
29981 _ = s1.Args[2]
29982 s1_1 := s1.Args[1]
29983 if s1_1.Op != OpConst64 {
29984 break
29985 }
29986 sz := auxIntToInt64(s1_1.AuxInt)
29987 s2 := s1.Args[2]
29988 if s2.Op != OpStore {
29989 break
29990 }
29991 _ = s2.Args[2]
29992 src := s2.Args[1]
29993 s3 := s2.Args[2]
29994 if s3.Op != OpStore {
29995 break
29996 }
29997 mem := s3.Args[2]
29998 dst := s3.Args[1]
29999 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)) {
30000 break
30001 }
30002 v.reset(OpMove)
30003 v.AuxInt = int64ToAuxInt(int64(sz))
30004 v.Aux = typeToAux(types.Types[types.TUINT8])
30005 v.AddArg3(dst, src, mem)
30006 return true
30007 }
30008
30009
30010
30011 for {
30012 if auxIntToInt64(v.AuxInt) != 0 {
30013 break
30014 }
30015 call := v_0
30016 if call.Op != OpStaticCall || len(call.Args) != 1 {
30017 break
30018 }
30019 sym := auxToCall(call.Aux)
30020 s1 := call.Args[0]
30021 if s1.Op != OpStore {
30022 break
30023 }
30024 _ = s1.Args[2]
30025 s1_1 := s1.Args[1]
30026 if s1_1.Op != OpConst32 {
30027 break
30028 }
30029 sz := auxIntToInt32(s1_1.AuxInt)
30030 s2 := s1.Args[2]
30031 if s2.Op != OpStore {
30032 break
30033 }
30034 _ = s2.Args[2]
30035 src := s2.Args[1]
30036 s3 := s2.Args[2]
30037 if s3.Op != OpStore {
30038 break
30039 }
30040 mem := s3.Args[2]
30041 dst := s3.Args[1]
30042 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)) {
30043 break
30044 }
30045 v.reset(OpMove)
30046 v.AuxInt = int64ToAuxInt(int64(sz))
30047 v.Aux = typeToAux(types.Types[types.TUINT8])
30048 v.AddArg3(dst, src, mem)
30049 return true
30050 }
30051
30052
30053
30054 for {
30055 if auxIntToInt64(v.AuxInt) != 0 {
30056 break
30057 }
30058 call := v_0
30059 if call.Op != OpStaticCall || len(call.Args) != 4 {
30060 break
30061 }
30062 sym := auxToCall(call.Aux)
30063 mem := call.Args[3]
30064 dst := call.Args[0]
30065 src := call.Args[1]
30066 call_2 := call.Args[2]
30067 if call_2.Op != OpConst64 {
30068 break
30069 }
30070 sz := auxIntToInt64(call_2.AuxInt)
30071 if !(sz >= 0 && call.Uses == 1 && isSameCall(sym, "runtime.memmove") && isInlinableMemmove(dst, src, int64(sz), config) && clobber(call)) {
30072 break
30073 }
30074 v.reset(OpMove)
30075 v.AuxInt = int64ToAuxInt(int64(sz))
30076 v.Aux = typeToAux(types.Types[types.TUINT8])
30077 v.AddArg3(dst, src, mem)
30078 return true
30079 }
30080
30081
30082
30083 for {
30084 if auxIntToInt64(v.AuxInt) != 0 {
30085 break
30086 }
30087 call := v_0
30088 if call.Op != OpStaticCall || len(call.Args) != 4 {
30089 break
30090 }
30091 sym := auxToCall(call.Aux)
30092 mem := call.Args[3]
30093 dst := call.Args[0]
30094 src := call.Args[1]
30095 call_2 := call.Args[2]
30096 if call_2.Op != OpConst32 {
30097 break
30098 }
30099 sz := auxIntToInt32(call_2.AuxInt)
30100 if !(sz >= 0 && call.Uses == 1 && isSameCall(sym, "runtime.memmove") && isInlinableMemmove(dst, src, int64(sz), config) && clobber(call)) {
30101 break
30102 }
30103 v.reset(OpMove)
30104 v.AuxInt = int64ToAuxInt(int64(sz))
30105 v.Aux = typeToAux(types.Types[types.TUINT8])
30106 v.AddArg3(dst, src, mem)
30107 return true
30108 }
30109
30110
30111
30112 for {
30113 if auxIntToInt64(v.AuxInt) != 0 {
30114 break
30115 }
30116 call := v_0
30117 if call.Op != OpStaticLECall || len(call.Args) != 4 {
30118 break
30119 }
30120 sym := auxToCall(call.Aux)
30121 mem := call.Args[3]
30122 dst := call.Args[0]
30123 src := call.Args[1]
30124 call_2 := call.Args[2]
30125 if call_2.Op != OpConst64 {
30126 break
30127 }
30128 sz := auxIntToInt64(call_2.AuxInt)
30129 if !(sz >= 0 && call.Uses == 1 && isSameCall(sym, "runtime.memmove") && isInlinableMemmove(dst, src, int64(sz), config) && clobber(call)) {
30130 break
30131 }
30132 v.reset(OpMove)
30133 v.AuxInt = int64ToAuxInt(int64(sz))
30134 v.Aux = typeToAux(types.Types[types.TUINT8])
30135 v.AddArg3(dst, src, mem)
30136 return true
30137 }
30138
30139
30140
30141 for {
30142 if auxIntToInt64(v.AuxInt) != 0 {
30143 break
30144 }
30145 call := v_0
30146 if call.Op != OpStaticLECall || len(call.Args) != 4 {
30147 break
30148 }
30149 sym := auxToCall(call.Aux)
30150 mem := call.Args[3]
30151 dst := call.Args[0]
30152 src := call.Args[1]
30153 call_2 := call.Args[2]
30154 if call_2.Op != OpConst32 {
30155 break
30156 }
30157 sz := auxIntToInt32(call_2.AuxInt)
30158 if !(sz >= 0 && call.Uses == 1 && isSameCall(sym, "runtime.memmove") && isInlinableMemmove(dst, src, int64(sz), config) && clobber(call)) {
30159 break
30160 }
30161 v.reset(OpMove)
30162 v.AuxInt = int64ToAuxInt(int64(sz))
30163 v.Aux = typeToAux(types.Types[types.TUINT8])
30164 v.AddArg3(dst, src, mem)
30165 return true
30166 }
30167
30168
30169
30170 for {
30171 if auxIntToInt64(v.AuxInt) != 0 {
30172 break
30173 }
30174 call := v_0
30175 if call.Op != OpStaticLECall || len(call.Args) != 2 {
30176 break
30177 }
30178 sym := auxToCall(call.Aux)
30179 x := call.Args[1]
30180 if !(needRaceCleanup(sym, call) && clobber(call)) {
30181 break
30182 }
30183 v.copyOf(x)
30184 return true
30185 }
30186
30187
30188
30189 for {
30190 if auxIntToInt64(v.AuxInt) != 0 {
30191 break
30192 }
30193 call := v_0
30194 if call.Op != OpStaticLECall || len(call.Args) != 1 {
30195 break
30196 }
30197 sym := auxToCall(call.Aux)
30198 x := call.Args[0]
30199 if !(needRaceCleanup(sym, call) && clobber(call)) {
30200 break
30201 }
30202 v.copyOf(x)
30203 return true
30204 }
30205
30206
30207
30208 for {
30209 if auxIntToInt64(v.AuxInt) != 1 || v_0.Op != OpStaticCall || len(v_0.Args) != 6 {
30210 break
30211 }
30212 sym := auxToCall(v_0.Aux)
30213 _ = v_0.Args[1]
30214 newLen := v_0.Args[1]
30215 if newLen.Op != OpConst64 || !(v.Type.IsInteger() && isSameCall(sym, "runtime.growslice")) {
30216 break
30217 }
30218 v.copyOf(newLen)
30219 return true
30220 }
30221
30222
30223
30224 for {
30225 if auxIntToInt64(v.AuxInt) != 1 || v_0.Op != OpStaticCall || len(v_0.Args) != 6 {
30226 break
30227 }
30228 sym := auxToCall(v_0.Aux)
30229 _ = v_0.Args[1]
30230 newLen := v_0.Args[1]
30231 if newLen.Op != OpConst32 || !(v.Type.IsInteger() && isSameCall(sym, "runtime.growslice")) {
30232 break
30233 }
30234 v.copyOf(newLen)
30235 return true
30236 }
30237
30238
30239
30240 for {
30241 if auxIntToInt64(v.AuxInt) != 0 || v_0.Op != OpStaticLECall || len(v_0.Args) != 3 {
30242 break
30243 }
30244 f := auxToCall(v_0.Aux)
30245 _ = v_0.Args[2]
30246 x := v_0.Args[0]
30247 y := v_0.Args[1]
30248 v_0_2 := v_0.Args[2]
30249 if v_0_2.Op != OpSelectN || auxIntToInt64(v_0_2.AuxInt) != 1 {
30250 break
30251 }
30252 c := v_0_2.Args[0]
30253 if c.Op != OpStaticLECall || len(c.Args) != 3 {
30254 break
30255 }
30256 g := auxToCall(c.Aux)
30257 if x != c.Args[0] || y != c.Args[1] || !(isSameCall(f, "runtime.cmpstring") && isSameCall(g, "runtime.cmpstring")) {
30258 break
30259 }
30260 b = c.Block
30261 v0 := b.NewValue0(v.Pos, OpSelectN, typ.Int)
30262 v.copyOf(v0)
30263 v0.AuxInt = int64ToAuxInt(0)
30264 v0.AddArg(c)
30265 return true
30266 }
30267
30268
30269
30270 for {
30271 if auxIntToInt64(v.AuxInt) != 1 {
30272 break
30273 }
30274 c := v_0
30275 if c.Op != OpStaticLECall || len(c.Args) != 3 {
30276 break
30277 }
30278 f := auxToCall(c.Aux)
30279 mem := c.Args[2]
30280 if !(c.Uses == 1 && isSameCall(f, "runtime.cmpstring") && clobber(c)) {
30281 break
30282 }
30283 v.copyOf(mem)
30284 return true
30285 }
30286 return false
30287 }
30288 func rewriteValuegeneric_OpSignExt16to32(v *Value) bool {
30289 v_0 := v.Args[0]
30290
30291
30292 for {
30293 if v_0.Op != OpConst16 {
30294 break
30295 }
30296 c := auxIntToInt16(v_0.AuxInt)
30297 v.reset(OpConst32)
30298 v.AuxInt = int32ToAuxInt(int32(c))
30299 return true
30300 }
30301
30302
30303
30304 for {
30305 if v_0.Op != OpTrunc32to16 {
30306 break
30307 }
30308 x := v_0.Args[0]
30309 if x.Op != OpRsh32x64 {
30310 break
30311 }
30312 _ = x.Args[1]
30313 x_1 := x.Args[1]
30314 if x_1.Op != OpConst64 {
30315 break
30316 }
30317 s := auxIntToInt64(x_1.AuxInt)
30318 if !(s >= 16) {
30319 break
30320 }
30321 v.copyOf(x)
30322 return true
30323 }
30324 return false
30325 }
30326 func rewriteValuegeneric_OpSignExt16to64(v *Value) bool {
30327 v_0 := v.Args[0]
30328
30329
30330 for {
30331 if v_0.Op != OpConst16 {
30332 break
30333 }
30334 c := auxIntToInt16(v_0.AuxInt)
30335 v.reset(OpConst64)
30336 v.AuxInt = int64ToAuxInt(int64(c))
30337 return true
30338 }
30339
30340
30341
30342 for {
30343 if v_0.Op != OpTrunc64to16 {
30344 break
30345 }
30346 x := v_0.Args[0]
30347 if x.Op != OpRsh64x64 {
30348 break
30349 }
30350 _ = x.Args[1]
30351 x_1 := x.Args[1]
30352 if x_1.Op != OpConst64 {
30353 break
30354 }
30355 s := auxIntToInt64(x_1.AuxInt)
30356 if !(s >= 48) {
30357 break
30358 }
30359 v.copyOf(x)
30360 return true
30361 }
30362 return false
30363 }
30364 func rewriteValuegeneric_OpSignExt32to64(v *Value) bool {
30365 v_0 := v.Args[0]
30366
30367
30368 for {
30369 if v_0.Op != OpConst32 {
30370 break
30371 }
30372 c := auxIntToInt32(v_0.AuxInt)
30373 v.reset(OpConst64)
30374 v.AuxInt = int64ToAuxInt(int64(c))
30375 return true
30376 }
30377
30378
30379
30380 for {
30381 if v_0.Op != OpTrunc64to32 {
30382 break
30383 }
30384 x := v_0.Args[0]
30385 if x.Op != OpRsh64x64 {
30386 break
30387 }
30388 _ = x.Args[1]
30389 x_1 := x.Args[1]
30390 if x_1.Op != OpConst64 {
30391 break
30392 }
30393 s := auxIntToInt64(x_1.AuxInt)
30394 if !(s >= 32) {
30395 break
30396 }
30397 v.copyOf(x)
30398 return true
30399 }
30400 return false
30401 }
30402 func rewriteValuegeneric_OpSignExt8to16(v *Value) bool {
30403 v_0 := v.Args[0]
30404
30405
30406 for {
30407 if v_0.Op != OpConst8 {
30408 break
30409 }
30410 c := auxIntToInt8(v_0.AuxInt)
30411 v.reset(OpConst16)
30412 v.AuxInt = int16ToAuxInt(int16(c))
30413 return true
30414 }
30415
30416
30417
30418 for {
30419 if v_0.Op != OpTrunc16to8 {
30420 break
30421 }
30422 x := v_0.Args[0]
30423 if x.Op != OpRsh16x64 {
30424 break
30425 }
30426 _ = x.Args[1]
30427 x_1 := x.Args[1]
30428 if x_1.Op != OpConst64 {
30429 break
30430 }
30431 s := auxIntToInt64(x_1.AuxInt)
30432 if !(s >= 8) {
30433 break
30434 }
30435 v.copyOf(x)
30436 return true
30437 }
30438 return false
30439 }
30440 func rewriteValuegeneric_OpSignExt8to32(v *Value) bool {
30441 v_0 := v.Args[0]
30442
30443
30444 for {
30445 if v_0.Op != OpConst8 {
30446 break
30447 }
30448 c := auxIntToInt8(v_0.AuxInt)
30449 v.reset(OpConst32)
30450 v.AuxInt = int32ToAuxInt(int32(c))
30451 return true
30452 }
30453
30454
30455
30456 for {
30457 if v_0.Op != OpTrunc32to8 {
30458 break
30459 }
30460 x := v_0.Args[0]
30461 if x.Op != OpRsh32x64 {
30462 break
30463 }
30464 _ = x.Args[1]
30465 x_1 := x.Args[1]
30466 if x_1.Op != OpConst64 {
30467 break
30468 }
30469 s := auxIntToInt64(x_1.AuxInt)
30470 if !(s >= 24) {
30471 break
30472 }
30473 v.copyOf(x)
30474 return true
30475 }
30476 return false
30477 }
30478 func rewriteValuegeneric_OpSignExt8to64(v *Value) bool {
30479 v_0 := v.Args[0]
30480
30481
30482 for {
30483 if v_0.Op != OpConst8 {
30484 break
30485 }
30486 c := auxIntToInt8(v_0.AuxInt)
30487 v.reset(OpConst64)
30488 v.AuxInt = int64ToAuxInt(int64(c))
30489 return true
30490 }
30491
30492
30493
30494 for {
30495 if v_0.Op != OpTrunc64to8 {
30496 break
30497 }
30498 x := v_0.Args[0]
30499 if x.Op != OpRsh64x64 {
30500 break
30501 }
30502 _ = x.Args[1]
30503 x_1 := x.Args[1]
30504 if x_1.Op != OpConst64 {
30505 break
30506 }
30507 s := auxIntToInt64(x_1.AuxInt)
30508 if !(s >= 56) {
30509 break
30510 }
30511 v.copyOf(x)
30512 return true
30513 }
30514 return false
30515 }
30516 func rewriteValuegeneric_OpSliceCap(v *Value) bool {
30517 v_0 := v.Args[0]
30518
30519
30520 for {
30521 if v_0.Op != OpSliceMake {
30522 break
30523 }
30524 _ = v_0.Args[2]
30525 v_0_2 := v_0.Args[2]
30526 if v_0_2.Op != OpConst64 {
30527 break
30528 }
30529 t := v_0_2.Type
30530 c := auxIntToInt64(v_0_2.AuxInt)
30531 v.reset(OpConst64)
30532 v.Type = t
30533 v.AuxInt = int64ToAuxInt(c)
30534 return true
30535 }
30536
30537
30538 for {
30539 if v_0.Op != OpSliceMake {
30540 break
30541 }
30542 _ = v_0.Args[2]
30543 v_0_2 := v_0.Args[2]
30544 if v_0_2.Op != OpConst32 {
30545 break
30546 }
30547 t := v_0_2.Type
30548 c := auxIntToInt32(v_0_2.AuxInt)
30549 v.reset(OpConst32)
30550 v.Type = t
30551 v.AuxInt = int32ToAuxInt(c)
30552 return true
30553 }
30554
30555
30556 for {
30557 if v_0.Op != OpSliceMake {
30558 break
30559 }
30560 _ = v_0.Args[2]
30561 v_0_2 := v_0.Args[2]
30562 if v_0_2.Op != OpSliceCap {
30563 break
30564 }
30565 x := v_0_2.Args[0]
30566 v.reset(OpSliceCap)
30567 v.AddArg(x)
30568 return true
30569 }
30570
30571
30572 for {
30573 if v_0.Op != OpSliceMake {
30574 break
30575 }
30576 _ = v_0.Args[2]
30577 v_0_2 := v_0.Args[2]
30578 if v_0_2.Op != OpSliceLen {
30579 break
30580 }
30581 x := v_0_2.Args[0]
30582 v.reset(OpSliceLen)
30583 v.AddArg(x)
30584 return true
30585 }
30586 return false
30587 }
30588 func rewriteValuegeneric_OpSliceLen(v *Value) bool {
30589 v_0 := v.Args[0]
30590
30591
30592 for {
30593 if v_0.Op != OpSliceMake {
30594 break
30595 }
30596 _ = v_0.Args[1]
30597 v_0_1 := v_0.Args[1]
30598 if v_0_1.Op != OpConst64 {
30599 break
30600 }
30601 t := v_0_1.Type
30602 c := auxIntToInt64(v_0_1.AuxInt)
30603 v.reset(OpConst64)
30604 v.Type = t
30605 v.AuxInt = int64ToAuxInt(c)
30606 return true
30607 }
30608
30609
30610 for {
30611 if v_0.Op != OpSliceMake {
30612 break
30613 }
30614 _ = v_0.Args[1]
30615 v_0_1 := v_0.Args[1]
30616 if v_0_1.Op != OpConst32 {
30617 break
30618 }
30619 t := v_0_1.Type
30620 c := auxIntToInt32(v_0_1.AuxInt)
30621 v.reset(OpConst32)
30622 v.Type = t
30623 v.AuxInt = int32ToAuxInt(c)
30624 return true
30625 }
30626
30627
30628 for {
30629 if v_0.Op != OpSliceMake {
30630 break
30631 }
30632 _ = v_0.Args[1]
30633 v_0_1 := v_0.Args[1]
30634 if v_0_1.Op != OpSliceLen {
30635 break
30636 }
30637 x := v_0_1.Args[0]
30638 v.reset(OpSliceLen)
30639 v.AddArg(x)
30640 return true
30641 }
30642
30643
30644
30645 for {
30646 if v_0.Op != OpSelectN || auxIntToInt64(v_0.AuxInt) != 0 {
30647 break
30648 }
30649 v_0_0 := v_0.Args[0]
30650 if v_0_0.Op != OpStaticLECall || len(v_0_0.Args) != 6 {
30651 break
30652 }
30653 sym := auxToCall(v_0_0.Aux)
30654 _ = v_0_0.Args[1]
30655 newLen := v_0_0.Args[1]
30656 if newLen.Op != OpConst64 || !(isSameCall(sym, "runtime.growslice")) {
30657 break
30658 }
30659 v.copyOf(newLen)
30660 return true
30661 }
30662
30663
30664
30665 for {
30666 if v_0.Op != OpSelectN || auxIntToInt64(v_0.AuxInt) != 0 {
30667 break
30668 }
30669 v_0_0 := v_0.Args[0]
30670 if v_0_0.Op != OpStaticLECall || len(v_0_0.Args) != 6 {
30671 break
30672 }
30673 sym := auxToCall(v_0_0.Aux)
30674 _ = v_0_0.Args[1]
30675 newLen := v_0_0.Args[1]
30676 if newLen.Op != OpConst32 || !(isSameCall(sym, "runtime.growslice")) {
30677 break
30678 }
30679 v.copyOf(newLen)
30680 return true
30681 }
30682 return false
30683 }
30684 func rewriteValuegeneric_OpSlicePtr(v *Value) bool {
30685 v_0 := v.Args[0]
30686
30687
30688 for {
30689 if v_0.Op != OpSliceMake {
30690 break
30691 }
30692 v_0_0 := v_0.Args[0]
30693 if v_0_0.Op != OpSlicePtr {
30694 break
30695 }
30696 x := v_0_0.Args[0]
30697 v.reset(OpSlicePtr)
30698 v.AddArg(x)
30699 return true
30700 }
30701 return false
30702 }
30703 func rewriteValuegeneric_OpSlicemask(v *Value) bool {
30704 v_0 := v.Args[0]
30705
30706
30707
30708 for {
30709 if v_0.Op != OpConst32 {
30710 break
30711 }
30712 x := auxIntToInt32(v_0.AuxInt)
30713 if !(x > 0) {
30714 break
30715 }
30716 v.reset(OpConst32)
30717 v.AuxInt = int32ToAuxInt(-1)
30718 return true
30719 }
30720
30721
30722 for {
30723 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
30724 break
30725 }
30726 v.reset(OpConst32)
30727 v.AuxInt = int32ToAuxInt(0)
30728 return true
30729 }
30730
30731
30732
30733 for {
30734 if v_0.Op != OpConst64 {
30735 break
30736 }
30737 x := auxIntToInt64(v_0.AuxInt)
30738 if !(x > 0) {
30739 break
30740 }
30741 v.reset(OpConst64)
30742 v.AuxInt = int64ToAuxInt(-1)
30743 return true
30744 }
30745
30746
30747 for {
30748 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
30749 break
30750 }
30751 v.reset(OpConst64)
30752 v.AuxInt = int64ToAuxInt(0)
30753 return true
30754 }
30755 return false
30756 }
30757 func rewriteValuegeneric_OpSqrt(v *Value) bool {
30758 v_0 := v.Args[0]
30759
30760
30761
30762 for {
30763 if v_0.Op != OpConst64F {
30764 break
30765 }
30766 c := auxIntToFloat64(v_0.AuxInt)
30767 if !(!math.IsNaN(math.Sqrt(c))) {
30768 break
30769 }
30770 v.reset(OpConst64F)
30771 v.AuxInt = float64ToAuxInt(math.Sqrt(c))
30772 return true
30773 }
30774 return false
30775 }
30776 func rewriteValuegeneric_OpStaticCall(v *Value) bool {
30777 b := v.Block
30778 typ := &b.Func.Config.Types
30779
30780
30781
30782 for {
30783 if len(v.Args) != 4 {
30784 break
30785 }
30786 callAux := auxToCall(v.Aux)
30787 mem := v.Args[3]
30788 p := v.Args[0]
30789 q := v.Args[1]
30790 if !(isSameCall(callAux, "runtime.memequal") && isSamePtr(p, q)) {
30791 break
30792 }
30793 v.reset(OpMakeResult)
30794 v0 := b.NewValue0(v.Pos, OpConstBool, typ.Bool)
30795 v0.AuxInt = boolToAuxInt(true)
30796 v.AddArg2(v0, mem)
30797 return true
30798 }
30799 return false
30800 }
30801 func rewriteValuegeneric_OpStaticLECall(v *Value) bool {
30802 b := v.Block
30803 config := b.Func.Config
30804 typ := &b.Func.Config.Types
30805
30806
30807
30808 for {
30809 if len(v.Args) != 4 {
30810 break
30811 }
30812 callAux := auxToCall(v.Aux)
30813 mem := v.Args[3]
30814 sptr := v.Args[0]
30815 v_1 := v.Args[1]
30816 if v_1.Op != OpAddr {
30817 break
30818 }
30819 scon := auxToSym(v_1.Aux)
30820 v_1_0 := v_1.Args[0]
30821 if v_1_0.Op != OpSB {
30822 break
30823 }
30824 v_2 := v.Args[2]
30825 if v_2.Op != OpConst64 || auxIntToInt64(v_2.AuxInt) != 1 || !(isSameCall(callAux, "runtime.memequal") && symIsRO(scon)) {
30826 break
30827 }
30828 v.reset(OpMakeResult)
30829 v0 := b.NewValue0(v.Pos, OpEq8, typ.Bool)
30830 v1 := b.NewValue0(v.Pos, OpLoad, typ.Int8)
30831 v1.AddArg2(sptr, mem)
30832 v2 := b.NewValue0(v.Pos, OpConst8, typ.Int8)
30833 v2.AuxInt = int8ToAuxInt(int8(read8(scon, 0)))
30834 v0.AddArg2(v1, v2)
30835 v.AddArg2(v0, mem)
30836 return true
30837 }
30838
30839
30840
30841 for {
30842 if len(v.Args) != 4 {
30843 break
30844 }
30845 callAux := auxToCall(v.Aux)
30846 mem := v.Args[3]
30847 v_0 := v.Args[0]
30848 if v_0.Op != OpAddr {
30849 break
30850 }
30851 scon := auxToSym(v_0.Aux)
30852 v_0_0 := v_0.Args[0]
30853 if v_0_0.Op != OpSB {
30854 break
30855 }
30856 sptr := v.Args[1]
30857 v_2 := v.Args[2]
30858 if v_2.Op != OpConst64 || auxIntToInt64(v_2.AuxInt) != 1 || !(isSameCall(callAux, "runtime.memequal") && symIsRO(scon)) {
30859 break
30860 }
30861 v.reset(OpMakeResult)
30862 v0 := b.NewValue0(v.Pos, OpEq8, typ.Bool)
30863 v1 := b.NewValue0(v.Pos, OpLoad, typ.Int8)
30864 v1.AddArg2(sptr, mem)
30865 v2 := b.NewValue0(v.Pos, OpConst8, typ.Int8)
30866 v2.AuxInt = int8ToAuxInt(int8(read8(scon, 0)))
30867 v0.AddArg2(v1, v2)
30868 v.AddArg2(v0, mem)
30869 return true
30870 }
30871
30872
30873
30874 for {
30875 if len(v.Args) != 4 {
30876 break
30877 }
30878 callAux := auxToCall(v.Aux)
30879 mem := v.Args[3]
30880 sptr := v.Args[0]
30881 v_1 := v.Args[1]
30882 if v_1.Op != OpAddr {
30883 break
30884 }
30885 scon := auxToSym(v_1.Aux)
30886 v_1_0 := v_1.Args[0]
30887 if v_1_0.Op != OpSB {
30888 break
30889 }
30890 v_2 := v.Args[2]
30891 if v_2.Op != OpConst64 || auxIntToInt64(v_2.AuxInt) != 2 || !(isSameCall(callAux, "runtime.memequal") && symIsRO(scon) && canLoadUnaligned(config)) {
30892 break
30893 }
30894 v.reset(OpMakeResult)
30895 v0 := b.NewValue0(v.Pos, OpEq16, typ.Bool)
30896 v1 := b.NewValue0(v.Pos, OpLoad, typ.Int16)
30897 v1.AddArg2(sptr, mem)
30898 v2 := b.NewValue0(v.Pos, OpConst16, typ.Int16)
30899 v2.AuxInt = int16ToAuxInt(int16(read16(scon, 0, config.ctxt.Arch.ByteOrder)))
30900 v0.AddArg2(v1, v2)
30901 v.AddArg2(v0, mem)
30902 return true
30903 }
30904
30905
30906
30907 for {
30908 if len(v.Args) != 4 {
30909 break
30910 }
30911 callAux := auxToCall(v.Aux)
30912 mem := v.Args[3]
30913 v_0 := v.Args[0]
30914 if v_0.Op != OpAddr {
30915 break
30916 }
30917 scon := auxToSym(v_0.Aux)
30918 v_0_0 := v_0.Args[0]
30919 if v_0_0.Op != OpSB {
30920 break
30921 }
30922 sptr := v.Args[1]
30923 v_2 := v.Args[2]
30924 if v_2.Op != OpConst64 || auxIntToInt64(v_2.AuxInt) != 2 || !(isSameCall(callAux, "runtime.memequal") && symIsRO(scon) && canLoadUnaligned(config)) {
30925 break
30926 }
30927 v.reset(OpMakeResult)
30928 v0 := b.NewValue0(v.Pos, OpEq16, typ.Bool)
30929 v1 := b.NewValue0(v.Pos, OpLoad, typ.Int16)
30930 v1.AddArg2(sptr, mem)
30931 v2 := b.NewValue0(v.Pos, OpConst16, typ.Int16)
30932 v2.AuxInt = int16ToAuxInt(int16(read16(scon, 0, config.ctxt.Arch.ByteOrder)))
30933 v0.AddArg2(v1, v2)
30934 v.AddArg2(v0, mem)
30935 return true
30936 }
30937
30938
30939
30940 for {
30941 if len(v.Args) != 4 {
30942 break
30943 }
30944 callAux := auxToCall(v.Aux)
30945 mem := v.Args[3]
30946 sptr := v.Args[0]
30947 v_1 := v.Args[1]
30948 if v_1.Op != OpAddr {
30949 break
30950 }
30951 scon := auxToSym(v_1.Aux)
30952 v_1_0 := v_1.Args[0]
30953 if v_1_0.Op != OpSB {
30954 break
30955 }
30956 v_2 := v.Args[2]
30957 if v_2.Op != OpConst64 || auxIntToInt64(v_2.AuxInt) != 4 || !(isSameCall(callAux, "runtime.memequal") && symIsRO(scon) && canLoadUnaligned(config)) {
30958 break
30959 }
30960 v.reset(OpMakeResult)
30961 v0 := b.NewValue0(v.Pos, OpEq32, typ.Bool)
30962 v1 := b.NewValue0(v.Pos, OpLoad, typ.Int32)
30963 v1.AddArg2(sptr, mem)
30964 v2 := b.NewValue0(v.Pos, OpConst32, typ.Int32)
30965 v2.AuxInt = int32ToAuxInt(int32(read32(scon, 0, config.ctxt.Arch.ByteOrder)))
30966 v0.AddArg2(v1, v2)
30967 v.AddArg2(v0, mem)
30968 return true
30969 }
30970
30971
30972
30973 for {
30974 if len(v.Args) != 4 {
30975 break
30976 }
30977 callAux := auxToCall(v.Aux)
30978 mem := v.Args[3]
30979 v_0 := v.Args[0]
30980 if v_0.Op != OpAddr {
30981 break
30982 }
30983 scon := auxToSym(v_0.Aux)
30984 v_0_0 := v_0.Args[0]
30985 if v_0_0.Op != OpSB {
30986 break
30987 }
30988 sptr := v.Args[1]
30989 v_2 := v.Args[2]
30990 if v_2.Op != OpConst64 || auxIntToInt64(v_2.AuxInt) != 4 || !(isSameCall(callAux, "runtime.memequal") && symIsRO(scon) && canLoadUnaligned(config)) {
30991 break
30992 }
30993 v.reset(OpMakeResult)
30994 v0 := b.NewValue0(v.Pos, OpEq32, typ.Bool)
30995 v1 := b.NewValue0(v.Pos, OpLoad, typ.Int32)
30996 v1.AddArg2(sptr, mem)
30997 v2 := b.NewValue0(v.Pos, OpConst32, typ.Int32)
30998 v2.AuxInt = int32ToAuxInt(int32(read32(scon, 0, config.ctxt.Arch.ByteOrder)))
30999 v0.AddArg2(v1, v2)
31000 v.AddArg2(v0, mem)
31001 return true
31002 }
31003
31004
31005
31006 for {
31007 if len(v.Args) != 4 {
31008 break
31009 }
31010 callAux := auxToCall(v.Aux)
31011 mem := v.Args[3]
31012 sptr := v.Args[0]
31013 v_1 := v.Args[1]
31014 if v_1.Op != OpAddr {
31015 break
31016 }
31017 scon := auxToSym(v_1.Aux)
31018 v_1_0 := v_1.Args[0]
31019 if v_1_0.Op != OpSB {
31020 break
31021 }
31022 v_2 := v.Args[2]
31023 if v_2.Op != OpConst64 || auxIntToInt64(v_2.AuxInt) != 8 || !(isSameCall(callAux, "runtime.memequal") && symIsRO(scon) && canLoadUnaligned(config) && config.PtrSize == 8) {
31024 break
31025 }
31026 v.reset(OpMakeResult)
31027 v0 := b.NewValue0(v.Pos, OpEq64, typ.Bool)
31028 v1 := b.NewValue0(v.Pos, OpLoad, typ.Int64)
31029 v1.AddArg2(sptr, mem)
31030 v2 := b.NewValue0(v.Pos, OpConst64, typ.Int64)
31031 v2.AuxInt = int64ToAuxInt(int64(read64(scon, 0, config.ctxt.Arch.ByteOrder)))
31032 v0.AddArg2(v1, v2)
31033 v.AddArg2(v0, mem)
31034 return true
31035 }
31036
31037
31038
31039 for {
31040 if len(v.Args) != 4 {
31041 break
31042 }
31043 callAux := auxToCall(v.Aux)
31044 mem := v.Args[3]
31045 v_0 := v.Args[0]
31046 if v_0.Op != OpAddr {
31047 break
31048 }
31049 scon := auxToSym(v_0.Aux)
31050 v_0_0 := v_0.Args[0]
31051 if v_0_0.Op != OpSB {
31052 break
31053 }
31054 sptr := v.Args[1]
31055 v_2 := v.Args[2]
31056 if v_2.Op != OpConst64 || auxIntToInt64(v_2.AuxInt) != 8 || !(isSameCall(callAux, "runtime.memequal") && symIsRO(scon) && canLoadUnaligned(config) && config.PtrSize == 8) {
31057 break
31058 }
31059 v.reset(OpMakeResult)
31060 v0 := b.NewValue0(v.Pos, OpEq64, typ.Bool)
31061 v1 := b.NewValue0(v.Pos, OpLoad, typ.Int64)
31062 v1.AddArg2(sptr, mem)
31063 v2 := b.NewValue0(v.Pos, OpConst64, typ.Int64)
31064 v2.AuxInt = int64ToAuxInt(int64(read64(scon, 0, config.ctxt.Arch.ByteOrder)))
31065 v0.AddArg2(v1, v2)
31066 v.AddArg2(v0, mem)
31067 return true
31068 }
31069
31070
31071
31072 for {
31073 if len(v.Args) != 4 {
31074 break
31075 }
31076 callAux := auxToCall(v.Aux)
31077 mem := v.Args[3]
31078 v_2 := v.Args[2]
31079 if v_2.Op != OpConst64 || auxIntToInt64(v_2.AuxInt) != 0 || !(isSameCall(callAux, "runtime.memequal")) {
31080 break
31081 }
31082 v.reset(OpMakeResult)
31083 v0 := b.NewValue0(v.Pos, OpConstBool, typ.Bool)
31084 v0.AuxInt = boolToAuxInt(true)
31085 v.AddArg2(v0, mem)
31086 return true
31087 }
31088
31089
31090
31091 for {
31092 if len(v.Args) != 4 {
31093 break
31094 }
31095 callAux := auxToCall(v.Aux)
31096 mem := v.Args[3]
31097 p := v.Args[0]
31098 q := v.Args[1]
31099 if !(isSameCall(callAux, "runtime.memequal") && isSamePtr(p, q)) {
31100 break
31101 }
31102 v.reset(OpMakeResult)
31103 v0 := b.NewValue0(v.Pos, OpConstBool, typ.Bool)
31104 v0.AuxInt = boolToAuxInt(true)
31105 v.AddArg2(v0, mem)
31106 return true
31107 }
31108
31109
31110
31111 for {
31112 if len(v.Args) != 4 {
31113 break
31114 }
31115 callAux := auxToCall(v.Aux)
31116 mem := v.Args[3]
31117 v_1 := v.Args[1]
31118 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 0 {
31119 break
31120 }
31121 v_2 := v.Args[2]
31122 if v_2.Op != OpConst64 || auxIntToInt64(v_2.AuxInt) != 0 || !(isSameCall(callAux, "runtime.makeslice")) {
31123 break
31124 }
31125 v.reset(OpMakeResult)
31126 v0 := b.NewValue0(v.Pos, OpAddr, v.Type.FieldType(0))
31127 v0.Aux = symToAux(ir.Syms.Zerobase)
31128 v1 := b.NewValue0(v.Pos, OpSB, typ.Uintptr)
31129 v0.AddArg(v1)
31130 v.AddArg2(v0, mem)
31131 return true
31132 }
31133
31134
31135
31136 for {
31137 if len(v.Args) != 4 {
31138 break
31139 }
31140 callAux := auxToCall(v.Aux)
31141 mem := v.Args[3]
31142 v_1 := v.Args[1]
31143 if v_1.Op != OpConst32 || auxIntToInt32(v_1.AuxInt) != 0 {
31144 break
31145 }
31146 v_2 := v.Args[2]
31147 if v_2.Op != OpConst32 || auxIntToInt32(v_2.AuxInt) != 0 || !(isSameCall(callAux, "runtime.makeslice")) {
31148 break
31149 }
31150 v.reset(OpMakeResult)
31151 v0 := b.NewValue0(v.Pos, OpAddr, v.Type.FieldType(0))
31152 v0.Aux = symToAux(ir.Syms.Zerobase)
31153 v1 := b.NewValue0(v.Pos, OpSB, typ.Uintptr)
31154 v0.AddArg(v1)
31155 v.AddArg2(v0, mem)
31156 return true
31157 }
31158
31159
31160
31161 for {
31162 if len(v.Args) != 4 {
31163 break
31164 }
31165 f := auxToCall(v.Aux)
31166 mem := v.Args[3]
31167 typ_ := v.Args[0]
31168 x := v.Args[1]
31169 y := v.Args[2]
31170 if !(isSameCall(f, "runtime.efaceeq") && isDirectType(typ_) && clobber(v)) {
31171 break
31172 }
31173 v.reset(OpMakeResult)
31174 v0 := b.NewValue0(v.Pos, OpEqPtr, typ.Bool)
31175 v0.AddArg2(x, y)
31176 v.AddArg2(v0, mem)
31177 return true
31178 }
31179
31180
31181
31182 for {
31183 if len(v.Args) != 4 {
31184 break
31185 }
31186 f := auxToCall(v.Aux)
31187 mem := v.Args[3]
31188 itab := v.Args[0]
31189 x := v.Args[1]
31190 y := v.Args[2]
31191 if !(isSameCall(f, "runtime.ifaceeq") && isDirectIface(itab) && clobber(v)) {
31192 break
31193 }
31194 v.reset(OpMakeResult)
31195 v0 := b.NewValue0(v.Pos, OpEqPtr, typ.Bool)
31196 v0.AddArg2(x, y)
31197 v.AddArg2(v0, mem)
31198 return true
31199 }
31200
31201
31202
31203 for {
31204 if len(v.Args) != 4 {
31205 break
31206 }
31207 argsize := auxIntToInt32(v.AuxInt)
31208 f := auxToCall(v.Aux)
31209 _ = v.Args[3]
31210 typ_ := v.Args[0]
31211 map_ := v.Args[1]
31212 key := v.Args[2]
31213 if key.Op != OpSelectN || auxIntToInt64(key.AuxInt) != 0 {
31214 break
31215 }
31216 sbts := key.Args[0]
31217 if sbts.Op != OpStaticLECall || len(sbts.Args) != 4 {
31218 break
31219 }
31220 g := auxToCall(sbts.Aux)
31221 mem := sbts.Args[3]
31222 ptr := sbts.Args[1]
31223 len := sbts.Args[2]
31224 m := v.Args[3]
31225 if m.Op != OpSelectN || auxIntToInt64(m.AuxInt) != 1 || sbts != m.Args[0] || !((isSameCall(f, "runtime.mapaccess1_faststr") || isSameCall(f, "runtime.mapaccess2_faststr") || isSameCall(f, "runtime.mapdelete_faststr")) && isSameCall(g, "runtime.slicebytetostring") && key.Uses == 1 && sbts.Uses == 2 && resetCopy(m, mem) && clobber(sbts) && clobber(key)) {
31226 break
31227 }
31228 v.reset(OpStaticLECall)
31229 v.AuxInt = int32ToAuxInt(argsize)
31230 v.Aux = callToAux(f)
31231 v0 := b.NewValue0(v.Pos, OpStringMake, typ.String)
31232 v0.AddArg2(ptr, len)
31233 v.AddArg4(typ_, map_, v0, mem)
31234 return true
31235 }
31236
31237
31238
31239 for {
31240 if len(v.Args) != 3 {
31241 break
31242 }
31243 argsize := auxIntToInt32(v.AuxInt)
31244 f := auxToCall(v.Aux)
31245 _ = v.Args[2]
31246 dict_ := v.Args[0]
31247 key := v.Args[1]
31248 if key.Op != OpSelectN || auxIntToInt64(key.AuxInt) != 0 {
31249 break
31250 }
31251 sbts := key.Args[0]
31252 if sbts.Op != OpStaticLECall || len(sbts.Args) != 4 {
31253 break
31254 }
31255 g := auxToCall(sbts.Aux)
31256 mem := sbts.Args[3]
31257 ptr := sbts.Args[1]
31258 len := sbts.Args[2]
31259 m := v.Args[2]
31260 if m.Op != OpSelectN || auxIntToInt64(m.AuxInt) != 1 || sbts != m.Args[0] || !(isSameCall(f, "unique.Make[go.shape.string]") && isSameCall(g, "runtime.slicebytetostring") && key.Uses == 1 && sbts.Uses == 2 && resetCopy(m, mem) && clobber(sbts) && clobber(key)) {
31261 break
31262 }
31263 v.reset(OpStaticLECall)
31264 v.AuxInt = int32ToAuxInt(argsize)
31265 v.Aux = callToAux(f)
31266 v0 := b.NewValue0(v.Pos, OpStringMake, typ.String)
31267 v0.AddArg2(ptr, len)
31268 v.AddArg3(dict_, v0, mem)
31269 return true
31270 }
31271 return false
31272 }
31273 func rewriteValuegeneric_OpStore(v *Value) bool {
31274 v_2 := v.Args[2]
31275 v_1 := v.Args[1]
31276 v_0 := v.Args[0]
31277 b := v.Block
31278
31279
31280
31281 for {
31282 t1 := auxToType(v.Aux)
31283 p1 := v_0
31284 if v_1.Op != OpLoad {
31285 break
31286 }
31287 t2 := v_1.Type
31288 mem := v_1.Args[1]
31289 p2 := v_1.Args[0]
31290 if mem != v_2 || !(isSamePtr(p1, p2) && t2.Size() == t1.Size()) {
31291 break
31292 }
31293 v.copyOf(mem)
31294 return true
31295 }
31296
31297
31298
31299 for {
31300 t1 := auxToType(v.Aux)
31301 p1 := v_0
31302 if v_1.Op != OpLoad {
31303 break
31304 }
31305 t2 := v_1.Type
31306 oldmem := v_1.Args[1]
31307 p2 := v_1.Args[0]
31308 mem := v_2
31309 if mem.Op != OpStore {
31310 break
31311 }
31312 t3 := auxToType(mem.Aux)
31313 _ = mem.Args[2]
31314 p3 := mem.Args[0]
31315 if oldmem != mem.Args[2] || !(isSamePtr(p1, p2) && t2.Size() == t1.Size() && disjoint(p1, t1.Size(), p3, t3.Size())) {
31316 break
31317 }
31318 v.copyOf(mem)
31319 return true
31320 }
31321
31322
31323
31324 for {
31325 t1 := auxToType(v.Aux)
31326 p1 := v_0
31327 if v_1.Op != OpLoad {
31328 break
31329 }
31330 t2 := v_1.Type
31331 oldmem := v_1.Args[1]
31332 p2 := v_1.Args[0]
31333 mem := v_2
31334 if mem.Op != OpStore {
31335 break
31336 }
31337 t3 := auxToType(mem.Aux)
31338 _ = mem.Args[2]
31339 p3 := mem.Args[0]
31340 mem_2 := mem.Args[2]
31341 if mem_2.Op != OpStore {
31342 break
31343 }
31344 t4 := auxToType(mem_2.Aux)
31345 _ = mem_2.Args[2]
31346 p4 := mem_2.Args[0]
31347 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())) {
31348 break
31349 }
31350 v.copyOf(mem)
31351 return true
31352 }
31353
31354
31355
31356 for {
31357 t1 := auxToType(v.Aux)
31358 p1 := v_0
31359 if v_1.Op != OpLoad {
31360 break
31361 }
31362 t2 := v_1.Type
31363 oldmem := v_1.Args[1]
31364 p2 := v_1.Args[0]
31365 mem := v_2
31366 if mem.Op != OpStore {
31367 break
31368 }
31369 t3 := auxToType(mem.Aux)
31370 _ = mem.Args[2]
31371 p3 := mem.Args[0]
31372 mem_2 := mem.Args[2]
31373 if mem_2.Op != OpStore {
31374 break
31375 }
31376 t4 := auxToType(mem_2.Aux)
31377 _ = mem_2.Args[2]
31378 p4 := mem_2.Args[0]
31379 mem_2_2 := mem_2.Args[2]
31380 if mem_2_2.Op != OpStore {
31381 break
31382 }
31383 t5 := auxToType(mem_2_2.Aux)
31384 _ = mem_2_2.Args[2]
31385 p5 := mem_2_2.Args[0]
31386 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())) {
31387 break
31388 }
31389 v.copyOf(mem)
31390 return true
31391 }
31392
31393
31394
31395 for {
31396 t := auxToType(v.Aux)
31397 if v_0.Op != OpOffPtr {
31398 break
31399 }
31400 o := auxIntToInt64(v_0.AuxInt)
31401 p1 := v_0.Args[0]
31402 x := v_1
31403 mem := v_2
31404 if mem.Op != OpZero {
31405 break
31406 }
31407 n := auxIntToInt64(mem.AuxInt)
31408 p2 := mem.Args[0]
31409 if !(isConstZero(x) && o >= 0 && t.Size()+o <= n && isSamePtr(p1, p2)) {
31410 break
31411 }
31412 v.copyOf(mem)
31413 return true
31414 }
31415
31416
31417
31418 for {
31419 t1 := auxToType(v.Aux)
31420 op := v_0
31421 if op.Op != OpOffPtr {
31422 break
31423 }
31424 o1 := auxIntToInt64(op.AuxInt)
31425 p1 := op.Args[0]
31426 x := v_1
31427 mem := v_2
31428 if mem.Op != OpStore {
31429 break
31430 }
31431 t2 := auxToType(mem.Aux)
31432 _ = mem.Args[2]
31433 p2 := mem.Args[0]
31434 mem_2 := mem.Args[2]
31435 if mem_2.Op != OpZero {
31436 break
31437 }
31438 n := auxIntToInt64(mem_2.AuxInt)
31439 p3 := mem_2.Args[0]
31440 if !(isConstZero(x) && o1 >= 0 && t1.Size()+o1 <= n && isSamePtr(p1, p3) && disjoint(op, t1.Size(), p2, t2.Size())) {
31441 break
31442 }
31443 v.copyOf(mem)
31444 return true
31445 }
31446
31447
31448
31449 for {
31450 t1 := auxToType(v.Aux)
31451 op := v_0
31452 if op.Op != OpOffPtr {
31453 break
31454 }
31455 o1 := auxIntToInt64(op.AuxInt)
31456 p1 := op.Args[0]
31457 x := v_1
31458 mem := v_2
31459 if mem.Op != OpStore {
31460 break
31461 }
31462 t2 := auxToType(mem.Aux)
31463 _ = mem.Args[2]
31464 p2 := mem.Args[0]
31465 mem_2 := mem.Args[2]
31466 if mem_2.Op != OpStore {
31467 break
31468 }
31469 t3 := auxToType(mem_2.Aux)
31470 _ = mem_2.Args[2]
31471 p3 := mem_2.Args[0]
31472 mem_2_2 := mem_2.Args[2]
31473 if mem_2_2.Op != OpZero {
31474 break
31475 }
31476 n := auxIntToInt64(mem_2_2.AuxInt)
31477 p4 := mem_2_2.Args[0]
31478 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())) {
31479 break
31480 }
31481 v.copyOf(mem)
31482 return true
31483 }
31484
31485
31486
31487 for {
31488 t1 := auxToType(v.Aux)
31489 op := v_0
31490 if op.Op != OpOffPtr {
31491 break
31492 }
31493 o1 := auxIntToInt64(op.AuxInt)
31494 p1 := op.Args[0]
31495 x := v_1
31496 mem := v_2
31497 if mem.Op != OpStore {
31498 break
31499 }
31500 t2 := auxToType(mem.Aux)
31501 _ = mem.Args[2]
31502 p2 := mem.Args[0]
31503 mem_2 := mem.Args[2]
31504 if mem_2.Op != OpStore {
31505 break
31506 }
31507 t3 := auxToType(mem_2.Aux)
31508 _ = mem_2.Args[2]
31509 p3 := mem_2.Args[0]
31510 mem_2_2 := mem_2.Args[2]
31511 if mem_2_2.Op != OpStore {
31512 break
31513 }
31514 t4 := auxToType(mem_2_2.Aux)
31515 _ = mem_2_2.Args[2]
31516 p4 := mem_2_2.Args[0]
31517 mem_2_2_2 := mem_2_2.Args[2]
31518 if mem_2_2_2.Op != OpZero {
31519 break
31520 }
31521 n := auxIntToInt64(mem_2_2_2.AuxInt)
31522 p5 := mem_2_2_2.Args[0]
31523 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())) {
31524 break
31525 }
31526 v.copyOf(mem)
31527 return true
31528 }
31529
31530
31531 for {
31532 if v_1.Op != OpStructMake {
31533 break
31534 }
31535 v.copyOf(rewriteStructStore(v))
31536 return true
31537 }
31538
31539
31540
31541 for {
31542 t := auxToType(v.Aux)
31543 dst := v_0
31544 if v_1.Op != OpLoad {
31545 break
31546 }
31547 mem := v_1.Args[1]
31548 src := v_1.Args[0]
31549 if mem != v_2 || !(!CanSSA(t)) {
31550 break
31551 }
31552 v.reset(OpMove)
31553 v.AuxInt = int64ToAuxInt(t.Size())
31554 v.Aux = typeToAux(t)
31555 v.AddArg3(dst, src, mem)
31556 return true
31557 }
31558
31559
31560
31561 for {
31562 t := auxToType(v.Aux)
31563 dst := v_0
31564 if v_1.Op != OpLoad {
31565 break
31566 }
31567 mem := v_1.Args[1]
31568 src := v_1.Args[0]
31569 if v_2.Op != OpVarDef {
31570 break
31571 }
31572 x := auxToSym(v_2.Aux)
31573 if mem != v_2.Args[0] || !(!CanSSA(t)) {
31574 break
31575 }
31576 v.reset(OpMove)
31577 v.AuxInt = int64ToAuxInt(t.Size())
31578 v.Aux = typeToAux(t)
31579 v0 := b.NewValue0(v.Pos, OpVarDef, types.TypeMem)
31580 v0.Aux = symToAux(x)
31581 v0.AddArg(mem)
31582 v.AddArg3(dst, src, v0)
31583 return true
31584 }
31585
31586
31587 for {
31588 if v_1.Op != OpArrayMake0 {
31589 break
31590 }
31591 mem := v_2
31592 v.copyOf(mem)
31593 return true
31594 }
31595
31596
31597 for {
31598 dst := v_0
31599 if v_1.Op != OpArrayMake1 {
31600 break
31601 }
31602 e := v_1.Args[0]
31603 mem := v_2
31604 v.reset(OpStore)
31605 v.Aux = typeToAux(e.Type)
31606 v.AddArg3(dst, e, mem)
31607 return true
31608 }
31609
31610
31611
31612 for {
31613 if v_0.Op != OpSelectN || auxIntToInt64(v_0.AuxInt) != 0 {
31614 break
31615 }
31616 call := v_0.Args[0]
31617 if call.Op != OpStaticLECall || len(call.Args) != 2 {
31618 break
31619 }
31620 x := v_1
31621 mem := v_2
31622 if mem.Op != OpSelectN || auxIntToInt64(mem.AuxInt) != 1 || call != mem.Args[0] || !(isConstZero(x) && isSameCall(call.Aux, "runtime.newobject")) {
31623 break
31624 }
31625 v.copyOf(mem)
31626 return true
31627 }
31628
31629
31630
31631 for {
31632 if v_0.Op != OpOffPtr {
31633 break
31634 }
31635 v_0_0 := v_0.Args[0]
31636 if v_0_0.Op != OpSelectN || auxIntToInt64(v_0_0.AuxInt) != 0 {
31637 break
31638 }
31639 call := v_0_0.Args[0]
31640 if call.Op != OpStaticLECall || len(call.Args) != 2 {
31641 break
31642 }
31643 x := v_1
31644 mem := v_2
31645 if mem.Op != OpSelectN || auxIntToInt64(mem.AuxInt) != 1 || call != mem.Args[0] || !(isConstZero(x) && isSameCall(call.Aux, "runtime.newobject")) {
31646 break
31647 }
31648 v.copyOf(mem)
31649 return true
31650 }
31651
31652
31653
31654 for {
31655 t1 := auxToType(v.Aux)
31656 op1 := v_0
31657 if op1.Op != OpOffPtr {
31658 break
31659 }
31660 o1 := auxIntToInt64(op1.AuxInt)
31661 p1 := op1.Args[0]
31662 d1 := v_1
31663 m2 := v_2
31664 if m2.Op != OpStore {
31665 break
31666 }
31667 t2 := auxToType(m2.Aux)
31668 _ = m2.Args[2]
31669 op2 := m2.Args[0]
31670 if op2.Op != OpOffPtr || auxIntToInt64(op2.AuxInt) != 0 {
31671 break
31672 }
31673 p2 := op2.Args[0]
31674 d2 := m2.Args[1]
31675 m3 := m2.Args[2]
31676 if m3.Op != OpMove {
31677 break
31678 }
31679 n := auxIntToInt64(m3.AuxInt)
31680 mem := m3.Args[2]
31681 p3 := m3.Args[0]
31682 if !(m2.Uses == 1 && m3.Uses == 1 && o1 == t2.Size() && n == t2.Size()+t1.Size() && isSamePtr(p1, p2) && isSamePtr(p2, p3) && clobber(m2, m3)) {
31683 break
31684 }
31685 v.reset(OpStore)
31686 v.Aux = typeToAux(t1)
31687 v0 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
31688 v0.Aux = typeToAux(t2)
31689 v0.AddArg3(op2, d2, mem)
31690 v.AddArg3(op1, d1, v0)
31691 return true
31692 }
31693
31694
31695
31696 for {
31697 t1 := auxToType(v.Aux)
31698 op1 := v_0
31699 if op1.Op != OpOffPtr {
31700 break
31701 }
31702 o1 := auxIntToInt64(op1.AuxInt)
31703 p1 := op1.Args[0]
31704 d1 := v_1
31705 m2 := v_2
31706 if m2.Op != OpStore {
31707 break
31708 }
31709 t2 := auxToType(m2.Aux)
31710 _ = m2.Args[2]
31711 op2 := m2.Args[0]
31712 if op2.Op != OpOffPtr {
31713 break
31714 }
31715 o2 := auxIntToInt64(op2.AuxInt)
31716 p2 := op2.Args[0]
31717 d2 := m2.Args[1]
31718 m3 := m2.Args[2]
31719 if m3.Op != OpStore {
31720 break
31721 }
31722 t3 := auxToType(m3.Aux)
31723 _ = m3.Args[2]
31724 op3 := m3.Args[0]
31725 if op3.Op != OpOffPtr || auxIntToInt64(op3.AuxInt) != 0 {
31726 break
31727 }
31728 p3 := op3.Args[0]
31729 d3 := m3.Args[1]
31730 m4 := m3.Args[2]
31731 if m4.Op != OpMove {
31732 break
31733 }
31734 n := auxIntToInt64(m4.AuxInt)
31735 mem := m4.Args[2]
31736 p4 := m4.Args[0]
31737 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)) {
31738 break
31739 }
31740 v.reset(OpStore)
31741 v.Aux = typeToAux(t1)
31742 v0 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
31743 v0.Aux = typeToAux(t2)
31744 v1 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
31745 v1.Aux = typeToAux(t3)
31746 v1.AddArg3(op3, d3, mem)
31747 v0.AddArg3(op2, d2, v1)
31748 v.AddArg3(op1, d1, v0)
31749 return true
31750 }
31751
31752
31753
31754 for {
31755 t1 := auxToType(v.Aux)
31756 op1 := v_0
31757 if op1.Op != OpOffPtr {
31758 break
31759 }
31760 o1 := auxIntToInt64(op1.AuxInt)
31761 p1 := op1.Args[0]
31762 d1 := v_1
31763 m2 := v_2
31764 if m2.Op != OpStore {
31765 break
31766 }
31767 t2 := auxToType(m2.Aux)
31768 _ = m2.Args[2]
31769 op2 := m2.Args[0]
31770 if op2.Op != OpOffPtr {
31771 break
31772 }
31773 o2 := auxIntToInt64(op2.AuxInt)
31774 p2 := op2.Args[0]
31775 d2 := m2.Args[1]
31776 m3 := m2.Args[2]
31777 if m3.Op != OpStore {
31778 break
31779 }
31780 t3 := auxToType(m3.Aux)
31781 _ = m3.Args[2]
31782 op3 := m3.Args[0]
31783 if op3.Op != OpOffPtr {
31784 break
31785 }
31786 o3 := auxIntToInt64(op3.AuxInt)
31787 p3 := op3.Args[0]
31788 d3 := m3.Args[1]
31789 m4 := m3.Args[2]
31790 if m4.Op != OpStore {
31791 break
31792 }
31793 t4 := auxToType(m4.Aux)
31794 _ = m4.Args[2]
31795 op4 := m4.Args[0]
31796 if op4.Op != OpOffPtr || auxIntToInt64(op4.AuxInt) != 0 {
31797 break
31798 }
31799 p4 := op4.Args[0]
31800 d4 := m4.Args[1]
31801 m5 := m4.Args[2]
31802 if m5.Op != OpMove {
31803 break
31804 }
31805 n := auxIntToInt64(m5.AuxInt)
31806 mem := m5.Args[2]
31807 p5 := m5.Args[0]
31808 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)) {
31809 break
31810 }
31811 v.reset(OpStore)
31812 v.Aux = typeToAux(t1)
31813 v0 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
31814 v0.Aux = typeToAux(t2)
31815 v1 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
31816 v1.Aux = typeToAux(t3)
31817 v2 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
31818 v2.Aux = typeToAux(t4)
31819 v2.AddArg3(op4, d4, mem)
31820 v1.AddArg3(op3, d3, v2)
31821 v0.AddArg3(op2, d2, v1)
31822 v.AddArg3(op1, d1, v0)
31823 return true
31824 }
31825
31826
31827
31828 for {
31829 t1 := auxToType(v.Aux)
31830 op1 := v_0
31831 if op1.Op != OpOffPtr {
31832 break
31833 }
31834 o1 := auxIntToInt64(op1.AuxInt)
31835 p1 := op1.Args[0]
31836 d1 := v_1
31837 m2 := v_2
31838 if m2.Op != OpStore {
31839 break
31840 }
31841 t2 := auxToType(m2.Aux)
31842 _ = m2.Args[2]
31843 op2 := m2.Args[0]
31844 if op2.Op != OpOffPtr || auxIntToInt64(op2.AuxInt) != 0 {
31845 break
31846 }
31847 p2 := op2.Args[0]
31848 d2 := m2.Args[1]
31849 m3 := m2.Args[2]
31850 if m3.Op != OpZero {
31851 break
31852 }
31853 n := auxIntToInt64(m3.AuxInt)
31854 mem := m3.Args[1]
31855 p3 := m3.Args[0]
31856 if !(m2.Uses == 1 && m3.Uses == 1 && o1 == t2.Size() && n == t2.Size()+t1.Size() && isSamePtr(p1, p2) && isSamePtr(p2, p3) && clobber(m2, m3)) {
31857 break
31858 }
31859 v.reset(OpStore)
31860 v.Aux = typeToAux(t1)
31861 v0 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
31862 v0.Aux = typeToAux(t2)
31863 v0.AddArg3(op2, d2, mem)
31864 v.AddArg3(op1, d1, v0)
31865 return true
31866 }
31867
31868
31869
31870 for {
31871 t1 := auxToType(v.Aux)
31872 op1 := v_0
31873 if op1.Op != OpOffPtr {
31874 break
31875 }
31876 o1 := auxIntToInt64(op1.AuxInt)
31877 p1 := op1.Args[0]
31878 d1 := v_1
31879 m2 := v_2
31880 if m2.Op != OpStore {
31881 break
31882 }
31883 t2 := auxToType(m2.Aux)
31884 _ = m2.Args[2]
31885 op2 := m2.Args[0]
31886 if op2.Op != OpOffPtr {
31887 break
31888 }
31889 o2 := auxIntToInt64(op2.AuxInt)
31890 p2 := op2.Args[0]
31891 d2 := m2.Args[1]
31892 m3 := m2.Args[2]
31893 if m3.Op != OpStore {
31894 break
31895 }
31896 t3 := auxToType(m3.Aux)
31897 _ = m3.Args[2]
31898 op3 := m3.Args[0]
31899 if op3.Op != OpOffPtr || auxIntToInt64(op3.AuxInt) != 0 {
31900 break
31901 }
31902 p3 := op3.Args[0]
31903 d3 := m3.Args[1]
31904 m4 := m3.Args[2]
31905 if m4.Op != OpZero {
31906 break
31907 }
31908 n := auxIntToInt64(m4.AuxInt)
31909 mem := m4.Args[1]
31910 p4 := m4.Args[0]
31911 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)) {
31912 break
31913 }
31914 v.reset(OpStore)
31915 v.Aux = typeToAux(t1)
31916 v0 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
31917 v0.Aux = typeToAux(t2)
31918 v1 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
31919 v1.Aux = typeToAux(t3)
31920 v1.AddArg3(op3, d3, mem)
31921 v0.AddArg3(op2, d2, v1)
31922 v.AddArg3(op1, d1, v0)
31923 return true
31924 }
31925
31926
31927
31928 for {
31929 t1 := auxToType(v.Aux)
31930 op1 := v_0
31931 if op1.Op != OpOffPtr {
31932 break
31933 }
31934 o1 := auxIntToInt64(op1.AuxInt)
31935 p1 := op1.Args[0]
31936 d1 := v_1
31937 m2 := v_2
31938 if m2.Op != OpStore {
31939 break
31940 }
31941 t2 := auxToType(m2.Aux)
31942 _ = m2.Args[2]
31943 op2 := m2.Args[0]
31944 if op2.Op != OpOffPtr {
31945 break
31946 }
31947 o2 := auxIntToInt64(op2.AuxInt)
31948 p2 := op2.Args[0]
31949 d2 := m2.Args[1]
31950 m3 := m2.Args[2]
31951 if m3.Op != OpStore {
31952 break
31953 }
31954 t3 := auxToType(m3.Aux)
31955 _ = m3.Args[2]
31956 op3 := m3.Args[0]
31957 if op3.Op != OpOffPtr {
31958 break
31959 }
31960 o3 := auxIntToInt64(op3.AuxInt)
31961 p3 := op3.Args[0]
31962 d3 := m3.Args[1]
31963 m4 := m3.Args[2]
31964 if m4.Op != OpStore {
31965 break
31966 }
31967 t4 := auxToType(m4.Aux)
31968 _ = m4.Args[2]
31969 op4 := m4.Args[0]
31970 if op4.Op != OpOffPtr || auxIntToInt64(op4.AuxInt) != 0 {
31971 break
31972 }
31973 p4 := op4.Args[0]
31974 d4 := m4.Args[1]
31975 m5 := m4.Args[2]
31976 if m5.Op != OpZero {
31977 break
31978 }
31979 n := auxIntToInt64(m5.AuxInt)
31980 mem := m5.Args[1]
31981 p5 := m5.Args[0]
31982 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)) {
31983 break
31984 }
31985 v.reset(OpStore)
31986 v.Aux = typeToAux(t1)
31987 v0 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
31988 v0.Aux = typeToAux(t2)
31989 v1 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
31990 v1.Aux = typeToAux(t3)
31991 v2 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
31992 v2.Aux = typeToAux(t4)
31993 v2.AddArg3(op4, d4, mem)
31994 v1.AddArg3(op3, d3, v2)
31995 v0.AddArg3(op2, d2, v1)
31996 v.AddArg3(op1, d1, v0)
31997 return true
31998 }
31999 return false
32000 }
32001 func rewriteValuegeneric_OpStringLen(v *Value) bool {
32002 v_0 := v.Args[0]
32003
32004
32005 for {
32006 if v_0.Op != OpStringMake {
32007 break
32008 }
32009 _ = v_0.Args[1]
32010 v_0_1 := v_0.Args[1]
32011 if v_0_1.Op != OpConst64 {
32012 break
32013 }
32014 t := v_0_1.Type
32015 c := auxIntToInt64(v_0_1.AuxInt)
32016 v.reset(OpConst64)
32017 v.Type = t
32018 v.AuxInt = int64ToAuxInt(c)
32019 return true
32020 }
32021 return false
32022 }
32023 func rewriteValuegeneric_OpStringPtr(v *Value) bool {
32024 v_0 := v.Args[0]
32025
32026
32027 for {
32028 if v_0.Op != OpStringMake {
32029 break
32030 }
32031 v_0_0 := v_0.Args[0]
32032 if v_0_0.Op != OpAddr {
32033 break
32034 }
32035 t := v_0_0.Type
32036 s := auxToSym(v_0_0.Aux)
32037 base := v_0_0.Args[0]
32038 v.reset(OpAddr)
32039 v.Type = t
32040 v.Aux = symToAux(s)
32041 v.AddArg(base)
32042 return true
32043 }
32044 return false
32045 }
32046 func rewriteValuegeneric_OpStructSelect(v *Value) bool {
32047 v_0 := v.Args[0]
32048 b := v.Block
32049
32050
32051 for {
32052 i := auxIntToInt64(v.AuxInt)
32053 x := v_0
32054 if x.Op != OpStructMake {
32055 break
32056 }
32057 v.copyOf(x.Args[i])
32058 return true
32059 }
32060
32061
32062
32063 for {
32064 i := auxIntToInt64(v.AuxInt)
32065 x := v_0
32066 if x.Op != OpLoad {
32067 break
32068 }
32069 t := x.Type
32070 mem := x.Args[1]
32071 ptr := x.Args[0]
32072 if !(!CanSSA(t)) {
32073 break
32074 }
32075 b = x.Block
32076 v0 := b.NewValue0(v.Pos, OpLoad, v.Type)
32077 v.copyOf(v0)
32078 v1 := b.NewValue0(v.Pos, OpOffPtr, v.Type.PtrTo())
32079 v1.AuxInt = int64ToAuxInt(t.FieldOff(int(i)))
32080 v1.AddArg(ptr)
32081 v0.AddArg2(v1, mem)
32082 return true
32083 }
32084
32085
32086 for {
32087 if auxIntToInt64(v.AuxInt) != 0 || v_0.Op != OpIData {
32088 break
32089 }
32090 x := v_0.Args[0]
32091 v.reset(OpIData)
32092 v.AddArg(x)
32093 return true
32094 }
32095 return false
32096 }
32097 func rewriteValuegeneric_OpSub16(v *Value) bool {
32098 v_1 := v.Args[1]
32099 v_0 := v.Args[0]
32100 b := v.Block
32101
32102
32103 for {
32104 if v_0.Op != OpConst16 {
32105 break
32106 }
32107 c := auxIntToInt16(v_0.AuxInt)
32108 if v_1.Op != OpConst16 {
32109 break
32110 }
32111 d := auxIntToInt16(v_1.AuxInt)
32112 v.reset(OpConst16)
32113 v.AuxInt = int16ToAuxInt(c - d)
32114 return true
32115 }
32116
32117
32118
32119 for {
32120 x := v_0
32121 if v_1.Op != OpConst16 {
32122 break
32123 }
32124 t := v_1.Type
32125 c := auxIntToInt16(v_1.AuxInt)
32126 if !(x.Op != OpConst16) {
32127 break
32128 }
32129 v.reset(OpAdd16)
32130 v0 := b.NewValue0(v.Pos, OpConst16, t)
32131 v0.AuxInt = int16ToAuxInt(-c)
32132 v.AddArg2(v0, x)
32133 return true
32134 }
32135
32136
32137 for {
32138 t := v.Type
32139 if v_0.Op != OpMul16 {
32140 break
32141 }
32142 _ = v_0.Args[1]
32143 v_0_0 := v_0.Args[0]
32144 v_0_1 := v_0.Args[1]
32145 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
32146 x := v_0_0
32147 y := v_0_1
32148 if v_1.Op != OpMul16 {
32149 continue
32150 }
32151 _ = v_1.Args[1]
32152 v_1_0 := v_1.Args[0]
32153 v_1_1 := v_1.Args[1]
32154 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
32155 if x != v_1_0 {
32156 continue
32157 }
32158 z := v_1_1
32159 v.reset(OpMul16)
32160 v0 := b.NewValue0(v.Pos, OpSub16, t)
32161 v0.AddArg2(y, z)
32162 v.AddArg2(x, v0)
32163 return true
32164 }
32165 }
32166 break
32167 }
32168
32169
32170 for {
32171 x := v_0
32172 if x != v_1 {
32173 break
32174 }
32175 v.reset(OpConst16)
32176 v.AuxInt = int16ToAuxInt(0)
32177 return true
32178 }
32179
32180
32181 for {
32182 if v_0.Op != OpNeg16 {
32183 break
32184 }
32185 x := v_0.Args[0]
32186 if v_1.Op != OpCom16 || x != v_1.Args[0] {
32187 break
32188 }
32189 v.reset(OpConst16)
32190 v.AuxInt = int16ToAuxInt(1)
32191 return true
32192 }
32193
32194
32195 for {
32196 if v_0.Op != OpCom16 {
32197 break
32198 }
32199 x := v_0.Args[0]
32200 if v_1.Op != OpNeg16 || x != v_1.Args[0] {
32201 break
32202 }
32203 v.reset(OpConst16)
32204 v.AuxInt = int16ToAuxInt(-1)
32205 return true
32206 }
32207
32208
32209 for {
32210 if v_0.Op != OpAdd16 {
32211 break
32212 }
32213 _ = v_0.Args[1]
32214 v_0_0 := v_0.Args[0]
32215 v_0_1 := v_0.Args[1]
32216 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
32217 t := v_0_0
32218 x := v_0_1
32219 if v_1.Op != OpAdd16 {
32220 continue
32221 }
32222 _ = v_1.Args[1]
32223 v_1_0 := v_1.Args[0]
32224 v_1_1 := v_1.Args[1]
32225 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
32226 if t != v_1_0 {
32227 continue
32228 }
32229 y := v_1_1
32230 v.reset(OpSub16)
32231 v.AddArg2(x, y)
32232 return true
32233 }
32234 }
32235 break
32236 }
32237
32238
32239 for {
32240 if v_0.Op != OpAdd16 {
32241 break
32242 }
32243 _ = v_0.Args[1]
32244 v_0_0 := v_0.Args[0]
32245 v_0_1 := v_0.Args[1]
32246 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
32247 x := v_0_0
32248 y := v_0_1
32249 if x != v_1 {
32250 continue
32251 }
32252 v.copyOf(y)
32253 return true
32254 }
32255 break
32256 }
32257
32258
32259 for {
32260 if v_0.Op != OpAdd16 {
32261 break
32262 }
32263 _ = v_0.Args[1]
32264 v_0_0 := v_0.Args[0]
32265 v_0_1 := v_0.Args[1]
32266 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
32267 x := v_0_0
32268 y := v_0_1
32269 if y != v_1 {
32270 continue
32271 }
32272 v.copyOf(x)
32273 return true
32274 }
32275 break
32276 }
32277
32278
32279 for {
32280 if v_0.Op != OpSub16 {
32281 break
32282 }
32283 y := v_0.Args[1]
32284 x := v_0.Args[0]
32285 if x != v_1 {
32286 break
32287 }
32288 v.reset(OpNeg16)
32289 v.AddArg(y)
32290 return true
32291 }
32292
32293
32294 for {
32295 x := v_0
32296 if v_1.Op != OpAdd16 {
32297 break
32298 }
32299 _ = v_1.Args[1]
32300 v_1_0 := v_1.Args[0]
32301 v_1_1 := v_1.Args[1]
32302 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
32303 if x != v_1_0 {
32304 continue
32305 }
32306 y := v_1_1
32307 v.reset(OpNeg16)
32308 v.AddArg(y)
32309 return true
32310 }
32311 break
32312 }
32313
32314
32315
32316 for {
32317 x := v_0
32318 if v_1.Op != OpSub16 {
32319 break
32320 }
32321 z := v_1.Args[1]
32322 i := v_1.Args[0]
32323 if i.Op != OpConst16 {
32324 break
32325 }
32326 t := i.Type
32327 if !(z.Op != OpConst16 && x.Op != OpConst16) {
32328 break
32329 }
32330 v.reset(OpSub16)
32331 v0 := b.NewValue0(v.Pos, OpAdd16, t)
32332 v0.AddArg2(x, z)
32333 v.AddArg2(v0, i)
32334 return true
32335 }
32336
32337
32338
32339 for {
32340 x := v_0
32341 if v_1.Op != OpAdd16 {
32342 break
32343 }
32344 _ = v_1.Args[1]
32345 v_1_0 := v_1.Args[0]
32346 v_1_1 := v_1.Args[1]
32347 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
32348 z := v_1_0
32349 i := v_1_1
32350 if i.Op != OpConst16 {
32351 continue
32352 }
32353 t := i.Type
32354 if !(z.Op != OpConst16 && x.Op != OpConst16) {
32355 continue
32356 }
32357 v.reset(OpSub16)
32358 v0 := b.NewValue0(v.Pos, OpSub16, t)
32359 v0.AddArg2(x, z)
32360 v.AddArg2(v0, i)
32361 return true
32362 }
32363 break
32364 }
32365
32366
32367
32368 for {
32369 if v_0.Op != OpSub16 {
32370 break
32371 }
32372 z := v_0.Args[1]
32373 i := v_0.Args[0]
32374 if i.Op != OpConst16 {
32375 break
32376 }
32377 t := i.Type
32378 x := v_1
32379 if !(z.Op != OpConst16 && x.Op != OpConst16) {
32380 break
32381 }
32382 v.reset(OpSub16)
32383 v0 := b.NewValue0(v.Pos, OpAdd16, t)
32384 v0.AddArg2(z, x)
32385 v.AddArg2(i, v0)
32386 return true
32387 }
32388
32389
32390
32391 for {
32392 if v_0.Op != OpAdd16 {
32393 break
32394 }
32395 _ = v_0.Args[1]
32396 v_0_0 := v_0.Args[0]
32397 v_0_1 := v_0.Args[1]
32398 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
32399 z := v_0_0
32400 i := v_0_1
32401 if i.Op != OpConst16 {
32402 continue
32403 }
32404 t := i.Type
32405 x := v_1
32406 if !(z.Op != OpConst16 && x.Op != OpConst16) {
32407 continue
32408 }
32409 v.reset(OpAdd16)
32410 v0 := b.NewValue0(v.Pos, OpSub16, t)
32411 v0.AddArg2(z, x)
32412 v.AddArg2(i, v0)
32413 return true
32414 }
32415 break
32416 }
32417
32418
32419 for {
32420 if v_0.Op != OpConst16 {
32421 break
32422 }
32423 t := v_0.Type
32424 c := auxIntToInt16(v_0.AuxInt)
32425 if v_1.Op != OpSub16 {
32426 break
32427 }
32428 x := v_1.Args[1]
32429 v_1_0 := v_1.Args[0]
32430 if v_1_0.Op != OpConst16 || v_1_0.Type != t {
32431 break
32432 }
32433 d := auxIntToInt16(v_1_0.AuxInt)
32434 v.reset(OpAdd16)
32435 v0 := b.NewValue0(v.Pos, OpConst16, t)
32436 v0.AuxInt = int16ToAuxInt(c - d)
32437 v.AddArg2(v0, x)
32438 return true
32439 }
32440
32441
32442 for {
32443 if v_0.Op != OpConst16 {
32444 break
32445 }
32446 t := v_0.Type
32447 c := auxIntToInt16(v_0.AuxInt)
32448 if v_1.Op != OpAdd16 {
32449 break
32450 }
32451 _ = v_1.Args[1]
32452 v_1_0 := v_1.Args[0]
32453 v_1_1 := v_1.Args[1]
32454 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
32455 if v_1_0.Op != OpConst16 || v_1_0.Type != t {
32456 continue
32457 }
32458 d := auxIntToInt16(v_1_0.AuxInt)
32459 x := v_1_1
32460 v.reset(OpSub16)
32461 v0 := b.NewValue0(v.Pos, OpConst16, t)
32462 v0.AuxInt = int16ToAuxInt(c - d)
32463 v.AddArg2(v0, x)
32464 return true
32465 }
32466 break
32467 }
32468 return false
32469 }
32470 func rewriteValuegeneric_OpSub32(v *Value) bool {
32471 v_1 := v.Args[1]
32472 v_0 := v.Args[0]
32473 b := v.Block
32474
32475
32476 for {
32477 if v_0.Op != OpConst32 {
32478 break
32479 }
32480 c := auxIntToInt32(v_0.AuxInt)
32481 if v_1.Op != OpConst32 {
32482 break
32483 }
32484 d := auxIntToInt32(v_1.AuxInt)
32485 v.reset(OpConst32)
32486 v.AuxInt = int32ToAuxInt(c - d)
32487 return true
32488 }
32489
32490
32491
32492 for {
32493 x := v_0
32494 if v_1.Op != OpConst32 {
32495 break
32496 }
32497 t := v_1.Type
32498 c := auxIntToInt32(v_1.AuxInt)
32499 if !(x.Op != OpConst32) {
32500 break
32501 }
32502 v.reset(OpAdd32)
32503 v0 := b.NewValue0(v.Pos, OpConst32, t)
32504 v0.AuxInt = int32ToAuxInt(-c)
32505 v.AddArg2(v0, x)
32506 return true
32507 }
32508
32509
32510 for {
32511 t := v.Type
32512 if v_0.Op != OpMul32 {
32513 break
32514 }
32515 _ = v_0.Args[1]
32516 v_0_0 := v_0.Args[0]
32517 v_0_1 := v_0.Args[1]
32518 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
32519 x := v_0_0
32520 y := v_0_1
32521 if v_1.Op != OpMul32 {
32522 continue
32523 }
32524 _ = v_1.Args[1]
32525 v_1_0 := v_1.Args[0]
32526 v_1_1 := v_1.Args[1]
32527 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
32528 if x != v_1_0 {
32529 continue
32530 }
32531 z := v_1_1
32532 v.reset(OpMul32)
32533 v0 := b.NewValue0(v.Pos, OpSub32, t)
32534 v0.AddArg2(y, z)
32535 v.AddArg2(x, v0)
32536 return true
32537 }
32538 }
32539 break
32540 }
32541
32542
32543 for {
32544 x := v_0
32545 if x != v_1 {
32546 break
32547 }
32548 v.reset(OpConst32)
32549 v.AuxInt = int32ToAuxInt(0)
32550 return true
32551 }
32552
32553
32554 for {
32555 if v_0.Op != OpNeg32 {
32556 break
32557 }
32558 x := v_0.Args[0]
32559 if v_1.Op != OpCom32 || x != v_1.Args[0] {
32560 break
32561 }
32562 v.reset(OpConst32)
32563 v.AuxInt = int32ToAuxInt(1)
32564 return true
32565 }
32566
32567
32568 for {
32569 if v_0.Op != OpCom32 {
32570 break
32571 }
32572 x := v_0.Args[0]
32573 if v_1.Op != OpNeg32 || x != v_1.Args[0] {
32574 break
32575 }
32576 v.reset(OpConst32)
32577 v.AuxInt = int32ToAuxInt(-1)
32578 return true
32579 }
32580
32581
32582 for {
32583 if v_0.Op != OpAdd32 {
32584 break
32585 }
32586 _ = v_0.Args[1]
32587 v_0_0 := v_0.Args[0]
32588 v_0_1 := v_0.Args[1]
32589 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
32590 t := v_0_0
32591 x := v_0_1
32592 if v_1.Op != OpAdd32 {
32593 continue
32594 }
32595 _ = v_1.Args[1]
32596 v_1_0 := v_1.Args[0]
32597 v_1_1 := v_1.Args[1]
32598 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
32599 if t != v_1_0 {
32600 continue
32601 }
32602 y := v_1_1
32603 v.reset(OpSub32)
32604 v.AddArg2(x, y)
32605 return true
32606 }
32607 }
32608 break
32609 }
32610
32611
32612 for {
32613 if v_0.Op != OpAdd32 {
32614 break
32615 }
32616 _ = v_0.Args[1]
32617 v_0_0 := v_0.Args[0]
32618 v_0_1 := v_0.Args[1]
32619 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
32620 x := v_0_0
32621 y := v_0_1
32622 if x != v_1 {
32623 continue
32624 }
32625 v.copyOf(y)
32626 return true
32627 }
32628 break
32629 }
32630
32631
32632 for {
32633 if v_0.Op != OpAdd32 {
32634 break
32635 }
32636 _ = v_0.Args[1]
32637 v_0_0 := v_0.Args[0]
32638 v_0_1 := v_0.Args[1]
32639 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
32640 x := v_0_0
32641 y := v_0_1
32642 if y != v_1 {
32643 continue
32644 }
32645 v.copyOf(x)
32646 return true
32647 }
32648 break
32649 }
32650
32651
32652 for {
32653 if v_0.Op != OpSub32 {
32654 break
32655 }
32656 y := v_0.Args[1]
32657 x := v_0.Args[0]
32658 if x != v_1 {
32659 break
32660 }
32661 v.reset(OpNeg32)
32662 v.AddArg(y)
32663 return true
32664 }
32665
32666
32667 for {
32668 x := v_0
32669 if v_1.Op != OpAdd32 {
32670 break
32671 }
32672 _ = v_1.Args[1]
32673 v_1_0 := v_1.Args[0]
32674 v_1_1 := v_1.Args[1]
32675 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
32676 if x != v_1_0 {
32677 continue
32678 }
32679 y := v_1_1
32680 v.reset(OpNeg32)
32681 v.AddArg(y)
32682 return true
32683 }
32684 break
32685 }
32686
32687
32688
32689 for {
32690 x := v_0
32691 if v_1.Op != OpSub32 {
32692 break
32693 }
32694 z := v_1.Args[1]
32695 i := v_1.Args[0]
32696 if i.Op != OpConst32 {
32697 break
32698 }
32699 t := i.Type
32700 if !(z.Op != OpConst32 && x.Op != OpConst32) {
32701 break
32702 }
32703 v.reset(OpSub32)
32704 v0 := b.NewValue0(v.Pos, OpAdd32, t)
32705 v0.AddArg2(x, z)
32706 v.AddArg2(v0, i)
32707 return true
32708 }
32709
32710
32711
32712 for {
32713 x := v_0
32714 if v_1.Op != OpAdd32 {
32715 break
32716 }
32717 _ = v_1.Args[1]
32718 v_1_0 := v_1.Args[0]
32719 v_1_1 := v_1.Args[1]
32720 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
32721 z := v_1_0
32722 i := v_1_1
32723 if i.Op != OpConst32 {
32724 continue
32725 }
32726 t := i.Type
32727 if !(z.Op != OpConst32 && x.Op != OpConst32) {
32728 continue
32729 }
32730 v.reset(OpSub32)
32731 v0 := b.NewValue0(v.Pos, OpSub32, t)
32732 v0.AddArg2(x, z)
32733 v.AddArg2(v0, i)
32734 return true
32735 }
32736 break
32737 }
32738
32739
32740
32741 for {
32742 if v_0.Op != OpSub32 {
32743 break
32744 }
32745 z := v_0.Args[1]
32746 i := v_0.Args[0]
32747 if i.Op != OpConst32 {
32748 break
32749 }
32750 t := i.Type
32751 x := v_1
32752 if !(z.Op != OpConst32 && x.Op != OpConst32) {
32753 break
32754 }
32755 v.reset(OpSub32)
32756 v0 := b.NewValue0(v.Pos, OpAdd32, t)
32757 v0.AddArg2(z, x)
32758 v.AddArg2(i, v0)
32759 return true
32760 }
32761
32762
32763
32764 for {
32765 if v_0.Op != OpAdd32 {
32766 break
32767 }
32768 _ = v_0.Args[1]
32769 v_0_0 := v_0.Args[0]
32770 v_0_1 := v_0.Args[1]
32771 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
32772 z := v_0_0
32773 i := v_0_1
32774 if i.Op != OpConst32 {
32775 continue
32776 }
32777 t := i.Type
32778 x := v_1
32779 if !(z.Op != OpConst32 && x.Op != OpConst32) {
32780 continue
32781 }
32782 v.reset(OpAdd32)
32783 v0 := b.NewValue0(v.Pos, OpSub32, t)
32784 v0.AddArg2(z, x)
32785 v.AddArg2(i, v0)
32786 return true
32787 }
32788 break
32789 }
32790
32791
32792 for {
32793 if v_0.Op != OpConst32 {
32794 break
32795 }
32796 t := v_0.Type
32797 c := auxIntToInt32(v_0.AuxInt)
32798 if v_1.Op != OpSub32 {
32799 break
32800 }
32801 x := v_1.Args[1]
32802 v_1_0 := v_1.Args[0]
32803 if v_1_0.Op != OpConst32 || v_1_0.Type != t {
32804 break
32805 }
32806 d := auxIntToInt32(v_1_0.AuxInt)
32807 v.reset(OpAdd32)
32808 v0 := b.NewValue0(v.Pos, OpConst32, t)
32809 v0.AuxInt = int32ToAuxInt(c - d)
32810 v.AddArg2(v0, x)
32811 return true
32812 }
32813
32814
32815 for {
32816 if v_0.Op != OpConst32 {
32817 break
32818 }
32819 t := v_0.Type
32820 c := auxIntToInt32(v_0.AuxInt)
32821 if v_1.Op != OpAdd32 {
32822 break
32823 }
32824 _ = v_1.Args[1]
32825 v_1_0 := v_1.Args[0]
32826 v_1_1 := v_1.Args[1]
32827 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
32828 if v_1_0.Op != OpConst32 || v_1_0.Type != t {
32829 continue
32830 }
32831 d := auxIntToInt32(v_1_0.AuxInt)
32832 x := v_1_1
32833 v.reset(OpSub32)
32834 v0 := b.NewValue0(v.Pos, OpConst32, t)
32835 v0.AuxInt = int32ToAuxInt(c - d)
32836 v.AddArg2(v0, x)
32837 return true
32838 }
32839 break
32840 }
32841 return false
32842 }
32843 func rewriteValuegeneric_OpSub32F(v *Value) bool {
32844 v_1 := v.Args[1]
32845 v_0 := v.Args[0]
32846
32847
32848
32849 for {
32850 if v_0.Op != OpConst32F {
32851 break
32852 }
32853 c := auxIntToFloat32(v_0.AuxInt)
32854 if v_1.Op != OpConst32F {
32855 break
32856 }
32857 d := auxIntToFloat32(v_1.AuxInt)
32858 if !(c-d == c-d) {
32859 break
32860 }
32861 v.reset(OpConst32F)
32862 v.AuxInt = float32ToAuxInt(c - d)
32863 return true
32864 }
32865 return false
32866 }
32867 func rewriteValuegeneric_OpSub64(v *Value) bool {
32868 v_1 := v.Args[1]
32869 v_0 := v.Args[0]
32870 b := v.Block
32871
32872
32873 for {
32874 if v_0.Op != OpConst64 {
32875 break
32876 }
32877 c := auxIntToInt64(v_0.AuxInt)
32878 if v_1.Op != OpConst64 {
32879 break
32880 }
32881 d := auxIntToInt64(v_1.AuxInt)
32882 v.reset(OpConst64)
32883 v.AuxInt = int64ToAuxInt(c - d)
32884 return true
32885 }
32886
32887
32888
32889 for {
32890 x := v_0
32891 if v_1.Op != OpConst64 {
32892 break
32893 }
32894 t := v_1.Type
32895 c := auxIntToInt64(v_1.AuxInt)
32896 if !(x.Op != OpConst64) {
32897 break
32898 }
32899 v.reset(OpAdd64)
32900 v0 := b.NewValue0(v.Pos, OpConst64, t)
32901 v0.AuxInt = int64ToAuxInt(-c)
32902 v.AddArg2(v0, x)
32903 return true
32904 }
32905
32906
32907 for {
32908 t := v.Type
32909 if v_0.Op != OpMul64 {
32910 break
32911 }
32912 _ = v_0.Args[1]
32913 v_0_0 := v_0.Args[0]
32914 v_0_1 := v_0.Args[1]
32915 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
32916 x := v_0_0
32917 y := v_0_1
32918 if v_1.Op != OpMul64 {
32919 continue
32920 }
32921 _ = v_1.Args[1]
32922 v_1_0 := v_1.Args[0]
32923 v_1_1 := v_1.Args[1]
32924 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
32925 if x != v_1_0 {
32926 continue
32927 }
32928 z := v_1_1
32929 v.reset(OpMul64)
32930 v0 := b.NewValue0(v.Pos, OpSub64, t)
32931 v0.AddArg2(y, z)
32932 v.AddArg2(x, v0)
32933 return true
32934 }
32935 }
32936 break
32937 }
32938
32939
32940 for {
32941 x := v_0
32942 if x != v_1 {
32943 break
32944 }
32945 v.reset(OpConst64)
32946 v.AuxInt = int64ToAuxInt(0)
32947 return true
32948 }
32949
32950
32951 for {
32952 if v_0.Op != OpNeg64 {
32953 break
32954 }
32955 x := v_0.Args[0]
32956 if v_1.Op != OpCom64 || x != v_1.Args[0] {
32957 break
32958 }
32959 v.reset(OpConst64)
32960 v.AuxInt = int64ToAuxInt(1)
32961 return true
32962 }
32963
32964
32965 for {
32966 if v_0.Op != OpCom64 {
32967 break
32968 }
32969 x := v_0.Args[0]
32970 if v_1.Op != OpNeg64 || x != v_1.Args[0] {
32971 break
32972 }
32973 v.reset(OpConst64)
32974 v.AuxInt = int64ToAuxInt(-1)
32975 return true
32976 }
32977
32978
32979 for {
32980 if v_0.Op != OpAdd64 {
32981 break
32982 }
32983 _ = v_0.Args[1]
32984 v_0_0 := v_0.Args[0]
32985 v_0_1 := v_0.Args[1]
32986 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
32987 t := v_0_0
32988 x := v_0_1
32989 if v_1.Op != OpAdd64 {
32990 continue
32991 }
32992 _ = v_1.Args[1]
32993 v_1_0 := v_1.Args[0]
32994 v_1_1 := v_1.Args[1]
32995 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
32996 if t != v_1_0 {
32997 continue
32998 }
32999 y := v_1_1
33000 v.reset(OpSub64)
33001 v.AddArg2(x, y)
33002 return true
33003 }
33004 }
33005 break
33006 }
33007
33008
33009 for {
33010 if v_0.Op != OpAdd64 {
33011 break
33012 }
33013 _ = v_0.Args[1]
33014 v_0_0 := v_0.Args[0]
33015 v_0_1 := v_0.Args[1]
33016 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
33017 x := v_0_0
33018 y := v_0_1
33019 if x != v_1 {
33020 continue
33021 }
33022 v.copyOf(y)
33023 return true
33024 }
33025 break
33026 }
33027
33028
33029 for {
33030 if v_0.Op != OpAdd64 {
33031 break
33032 }
33033 _ = v_0.Args[1]
33034 v_0_0 := v_0.Args[0]
33035 v_0_1 := v_0.Args[1]
33036 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
33037 x := v_0_0
33038 y := v_0_1
33039 if y != v_1 {
33040 continue
33041 }
33042 v.copyOf(x)
33043 return true
33044 }
33045 break
33046 }
33047
33048
33049 for {
33050 if v_0.Op != OpSub64 {
33051 break
33052 }
33053 y := v_0.Args[1]
33054 x := v_0.Args[0]
33055 if x != v_1 {
33056 break
33057 }
33058 v.reset(OpNeg64)
33059 v.AddArg(y)
33060 return true
33061 }
33062
33063
33064 for {
33065 x := v_0
33066 if v_1.Op != OpAdd64 {
33067 break
33068 }
33069 _ = v_1.Args[1]
33070 v_1_0 := v_1.Args[0]
33071 v_1_1 := v_1.Args[1]
33072 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
33073 if x != v_1_0 {
33074 continue
33075 }
33076 y := v_1_1
33077 v.reset(OpNeg64)
33078 v.AddArg(y)
33079 return true
33080 }
33081 break
33082 }
33083
33084
33085
33086 for {
33087 x := v_0
33088 if v_1.Op != OpSub64 {
33089 break
33090 }
33091 z := v_1.Args[1]
33092 i := v_1.Args[0]
33093 if i.Op != OpConst64 {
33094 break
33095 }
33096 t := i.Type
33097 if !(z.Op != OpConst64 && x.Op != OpConst64) {
33098 break
33099 }
33100 v.reset(OpSub64)
33101 v0 := b.NewValue0(v.Pos, OpAdd64, t)
33102 v0.AddArg2(x, z)
33103 v.AddArg2(v0, i)
33104 return true
33105 }
33106
33107
33108
33109 for {
33110 x := v_0
33111 if v_1.Op != OpAdd64 {
33112 break
33113 }
33114 _ = v_1.Args[1]
33115 v_1_0 := v_1.Args[0]
33116 v_1_1 := v_1.Args[1]
33117 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
33118 z := v_1_0
33119 i := v_1_1
33120 if i.Op != OpConst64 {
33121 continue
33122 }
33123 t := i.Type
33124 if !(z.Op != OpConst64 && x.Op != OpConst64) {
33125 continue
33126 }
33127 v.reset(OpSub64)
33128 v0 := b.NewValue0(v.Pos, OpSub64, t)
33129 v0.AddArg2(x, z)
33130 v.AddArg2(v0, i)
33131 return true
33132 }
33133 break
33134 }
33135
33136
33137
33138 for {
33139 if v_0.Op != OpSub64 {
33140 break
33141 }
33142 z := v_0.Args[1]
33143 i := v_0.Args[0]
33144 if i.Op != OpConst64 {
33145 break
33146 }
33147 t := i.Type
33148 x := v_1
33149 if !(z.Op != OpConst64 && x.Op != OpConst64) {
33150 break
33151 }
33152 v.reset(OpSub64)
33153 v0 := b.NewValue0(v.Pos, OpAdd64, t)
33154 v0.AddArg2(z, x)
33155 v.AddArg2(i, v0)
33156 return true
33157 }
33158
33159
33160
33161 for {
33162 if v_0.Op != OpAdd64 {
33163 break
33164 }
33165 _ = v_0.Args[1]
33166 v_0_0 := v_0.Args[0]
33167 v_0_1 := v_0.Args[1]
33168 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
33169 z := v_0_0
33170 i := v_0_1
33171 if i.Op != OpConst64 {
33172 continue
33173 }
33174 t := i.Type
33175 x := v_1
33176 if !(z.Op != OpConst64 && x.Op != OpConst64) {
33177 continue
33178 }
33179 v.reset(OpAdd64)
33180 v0 := b.NewValue0(v.Pos, OpSub64, t)
33181 v0.AddArg2(z, x)
33182 v.AddArg2(i, v0)
33183 return true
33184 }
33185 break
33186 }
33187
33188
33189 for {
33190 if v_0.Op != OpConst64 {
33191 break
33192 }
33193 t := v_0.Type
33194 c := auxIntToInt64(v_0.AuxInt)
33195 if v_1.Op != OpSub64 {
33196 break
33197 }
33198 x := v_1.Args[1]
33199 v_1_0 := v_1.Args[0]
33200 if v_1_0.Op != OpConst64 || v_1_0.Type != t {
33201 break
33202 }
33203 d := auxIntToInt64(v_1_0.AuxInt)
33204 v.reset(OpAdd64)
33205 v0 := b.NewValue0(v.Pos, OpConst64, t)
33206 v0.AuxInt = int64ToAuxInt(c - d)
33207 v.AddArg2(v0, x)
33208 return true
33209 }
33210
33211
33212 for {
33213 if v_0.Op != OpConst64 {
33214 break
33215 }
33216 t := v_0.Type
33217 c := auxIntToInt64(v_0.AuxInt)
33218 if v_1.Op != OpAdd64 {
33219 break
33220 }
33221 _ = v_1.Args[1]
33222 v_1_0 := v_1.Args[0]
33223 v_1_1 := v_1.Args[1]
33224 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
33225 if v_1_0.Op != OpConst64 || v_1_0.Type != t {
33226 continue
33227 }
33228 d := auxIntToInt64(v_1_0.AuxInt)
33229 x := v_1_1
33230 v.reset(OpSub64)
33231 v0 := b.NewValue0(v.Pos, OpConst64, t)
33232 v0.AuxInt = int64ToAuxInt(c - d)
33233 v.AddArg2(v0, x)
33234 return true
33235 }
33236 break
33237 }
33238 return false
33239 }
33240 func rewriteValuegeneric_OpSub64F(v *Value) bool {
33241 v_1 := v.Args[1]
33242 v_0 := v.Args[0]
33243
33244
33245
33246 for {
33247 if v_0.Op != OpConst64F {
33248 break
33249 }
33250 c := auxIntToFloat64(v_0.AuxInt)
33251 if v_1.Op != OpConst64F {
33252 break
33253 }
33254 d := auxIntToFloat64(v_1.AuxInt)
33255 if !(c-d == c-d) {
33256 break
33257 }
33258 v.reset(OpConst64F)
33259 v.AuxInt = float64ToAuxInt(c - d)
33260 return true
33261 }
33262 return false
33263 }
33264 func rewriteValuegeneric_OpSub8(v *Value) bool {
33265 v_1 := v.Args[1]
33266 v_0 := v.Args[0]
33267 b := v.Block
33268
33269
33270 for {
33271 if v_0.Op != OpConst8 {
33272 break
33273 }
33274 c := auxIntToInt8(v_0.AuxInt)
33275 if v_1.Op != OpConst8 {
33276 break
33277 }
33278 d := auxIntToInt8(v_1.AuxInt)
33279 v.reset(OpConst8)
33280 v.AuxInt = int8ToAuxInt(c - d)
33281 return true
33282 }
33283
33284
33285
33286 for {
33287 x := v_0
33288 if v_1.Op != OpConst8 {
33289 break
33290 }
33291 t := v_1.Type
33292 c := auxIntToInt8(v_1.AuxInt)
33293 if !(x.Op != OpConst8) {
33294 break
33295 }
33296 v.reset(OpAdd8)
33297 v0 := b.NewValue0(v.Pos, OpConst8, t)
33298 v0.AuxInt = int8ToAuxInt(-c)
33299 v.AddArg2(v0, x)
33300 return true
33301 }
33302
33303
33304 for {
33305 t := v.Type
33306 if v_0.Op != OpMul8 {
33307 break
33308 }
33309 _ = v_0.Args[1]
33310 v_0_0 := v_0.Args[0]
33311 v_0_1 := v_0.Args[1]
33312 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
33313 x := v_0_0
33314 y := v_0_1
33315 if v_1.Op != OpMul8 {
33316 continue
33317 }
33318 _ = v_1.Args[1]
33319 v_1_0 := v_1.Args[0]
33320 v_1_1 := v_1.Args[1]
33321 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
33322 if x != v_1_0 {
33323 continue
33324 }
33325 z := v_1_1
33326 v.reset(OpMul8)
33327 v0 := b.NewValue0(v.Pos, OpSub8, t)
33328 v0.AddArg2(y, z)
33329 v.AddArg2(x, v0)
33330 return true
33331 }
33332 }
33333 break
33334 }
33335
33336
33337 for {
33338 x := v_0
33339 if x != v_1 {
33340 break
33341 }
33342 v.reset(OpConst8)
33343 v.AuxInt = int8ToAuxInt(0)
33344 return true
33345 }
33346
33347
33348 for {
33349 if v_0.Op != OpNeg8 {
33350 break
33351 }
33352 x := v_0.Args[0]
33353 if v_1.Op != OpCom8 || x != v_1.Args[0] {
33354 break
33355 }
33356 v.reset(OpConst8)
33357 v.AuxInt = int8ToAuxInt(1)
33358 return true
33359 }
33360
33361
33362 for {
33363 if v_0.Op != OpCom8 {
33364 break
33365 }
33366 x := v_0.Args[0]
33367 if v_1.Op != OpNeg8 || x != v_1.Args[0] {
33368 break
33369 }
33370 v.reset(OpConst8)
33371 v.AuxInt = int8ToAuxInt(-1)
33372 return true
33373 }
33374
33375
33376 for {
33377 if v_0.Op != OpAdd8 {
33378 break
33379 }
33380 _ = v_0.Args[1]
33381 v_0_0 := v_0.Args[0]
33382 v_0_1 := v_0.Args[1]
33383 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
33384 t := v_0_0
33385 x := v_0_1
33386 if v_1.Op != OpAdd8 {
33387 continue
33388 }
33389 _ = v_1.Args[1]
33390 v_1_0 := v_1.Args[0]
33391 v_1_1 := v_1.Args[1]
33392 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
33393 if t != v_1_0 {
33394 continue
33395 }
33396 y := v_1_1
33397 v.reset(OpSub8)
33398 v.AddArg2(x, y)
33399 return true
33400 }
33401 }
33402 break
33403 }
33404
33405
33406 for {
33407 if v_0.Op != OpAdd8 {
33408 break
33409 }
33410 _ = v_0.Args[1]
33411 v_0_0 := v_0.Args[0]
33412 v_0_1 := v_0.Args[1]
33413 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
33414 x := v_0_0
33415 y := v_0_1
33416 if x != v_1 {
33417 continue
33418 }
33419 v.copyOf(y)
33420 return true
33421 }
33422 break
33423 }
33424
33425
33426 for {
33427 if v_0.Op != OpAdd8 {
33428 break
33429 }
33430 _ = v_0.Args[1]
33431 v_0_0 := v_0.Args[0]
33432 v_0_1 := v_0.Args[1]
33433 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
33434 x := v_0_0
33435 y := v_0_1
33436 if y != v_1 {
33437 continue
33438 }
33439 v.copyOf(x)
33440 return true
33441 }
33442 break
33443 }
33444
33445
33446 for {
33447 if v_0.Op != OpSub8 {
33448 break
33449 }
33450 y := v_0.Args[1]
33451 x := v_0.Args[0]
33452 if x != v_1 {
33453 break
33454 }
33455 v.reset(OpNeg8)
33456 v.AddArg(y)
33457 return true
33458 }
33459
33460
33461 for {
33462 x := v_0
33463 if v_1.Op != OpAdd8 {
33464 break
33465 }
33466 _ = v_1.Args[1]
33467 v_1_0 := v_1.Args[0]
33468 v_1_1 := v_1.Args[1]
33469 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
33470 if x != v_1_0 {
33471 continue
33472 }
33473 y := v_1_1
33474 v.reset(OpNeg8)
33475 v.AddArg(y)
33476 return true
33477 }
33478 break
33479 }
33480
33481
33482
33483 for {
33484 x := v_0
33485 if v_1.Op != OpSub8 {
33486 break
33487 }
33488 z := v_1.Args[1]
33489 i := v_1.Args[0]
33490 if i.Op != OpConst8 {
33491 break
33492 }
33493 t := i.Type
33494 if !(z.Op != OpConst8 && x.Op != OpConst8) {
33495 break
33496 }
33497 v.reset(OpSub8)
33498 v0 := b.NewValue0(v.Pos, OpAdd8, t)
33499 v0.AddArg2(x, z)
33500 v.AddArg2(v0, i)
33501 return true
33502 }
33503
33504
33505
33506 for {
33507 x := v_0
33508 if v_1.Op != OpAdd8 {
33509 break
33510 }
33511 _ = v_1.Args[1]
33512 v_1_0 := v_1.Args[0]
33513 v_1_1 := v_1.Args[1]
33514 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
33515 z := v_1_0
33516 i := v_1_1
33517 if i.Op != OpConst8 {
33518 continue
33519 }
33520 t := i.Type
33521 if !(z.Op != OpConst8 && x.Op != OpConst8) {
33522 continue
33523 }
33524 v.reset(OpSub8)
33525 v0 := b.NewValue0(v.Pos, OpSub8, t)
33526 v0.AddArg2(x, z)
33527 v.AddArg2(v0, i)
33528 return true
33529 }
33530 break
33531 }
33532
33533
33534
33535 for {
33536 if v_0.Op != OpSub8 {
33537 break
33538 }
33539 z := v_0.Args[1]
33540 i := v_0.Args[0]
33541 if i.Op != OpConst8 {
33542 break
33543 }
33544 t := i.Type
33545 x := v_1
33546 if !(z.Op != OpConst8 && x.Op != OpConst8) {
33547 break
33548 }
33549 v.reset(OpSub8)
33550 v0 := b.NewValue0(v.Pos, OpAdd8, t)
33551 v0.AddArg2(z, x)
33552 v.AddArg2(i, v0)
33553 return true
33554 }
33555
33556
33557
33558 for {
33559 if v_0.Op != OpAdd8 {
33560 break
33561 }
33562 _ = v_0.Args[1]
33563 v_0_0 := v_0.Args[0]
33564 v_0_1 := v_0.Args[1]
33565 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
33566 z := v_0_0
33567 i := v_0_1
33568 if i.Op != OpConst8 {
33569 continue
33570 }
33571 t := i.Type
33572 x := v_1
33573 if !(z.Op != OpConst8 && x.Op != OpConst8) {
33574 continue
33575 }
33576 v.reset(OpAdd8)
33577 v0 := b.NewValue0(v.Pos, OpSub8, t)
33578 v0.AddArg2(z, x)
33579 v.AddArg2(i, v0)
33580 return true
33581 }
33582 break
33583 }
33584
33585
33586 for {
33587 if v_0.Op != OpConst8 {
33588 break
33589 }
33590 t := v_0.Type
33591 c := auxIntToInt8(v_0.AuxInt)
33592 if v_1.Op != OpSub8 {
33593 break
33594 }
33595 x := v_1.Args[1]
33596 v_1_0 := v_1.Args[0]
33597 if v_1_0.Op != OpConst8 || v_1_0.Type != t {
33598 break
33599 }
33600 d := auxIntToInt8(v_1_0.AuxInt)
33601 v.reset(OpAdd8)
33602 v0 := b.NewValue0(v.Pos, OpConst8, t)
33603 v0.AuxInt = int8ToAuxInt(c - d)
33604 v.AddArg2(v0, x)
33605 return true
33606 }
33607
33608
33609 for {
33610 if v_0.Op != OpConst8 {
33611 break
33612 }
33613 t := v_0.Type
33614 c := auxIntToInt8(v_0.AuxInt)
33615 if v_1.Op != OpAdd8 {
33616 break
33617 }
33618 _ = v_1.Args[1]
33619 v_1_0 := v_1.Args[0]
33620 v_1_1 := v_1.Args[1]
33621 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
33622 if v_1_0.Op != OpConst8 || v_1_0.Type != t {
33623 continue
33624 }
33625 d := auxIntToInt8(v_1_0.AuxInt)
33626 x := v_1_1
33627 v.reset(OpSub8)
33628 v0 := b.NewValue0(v.Pos, OpConst8, t)
33629 v0.AuxInt = int8ToAuxInt(c - d)
33630 v.AddArg2(v0, x)
33631 return true
33632 }
33633 break
33634 }
33635 return false
33636 }
33637 func rewriteValuegeneric_OpTrunc(v *Value) bool {
33638 v_0 := v.Args[0]
33639
33640
33641 for {
33642 if v_0.Op != OpConst64F {
33643 break
33644 }
33645 c := auxIntToFloat64(v_0.AuxInt)
33646 v.reset(OpConst64F)
33647 v.AuxInt = float64ToAuxInt(math.Trunc(c))
33648 return true
33649 }
33650 return false
33651 }
33652 func rewriteValuegeneric_OpTrunc16to8(v *Value) bool {
33653 v_0 := v.Args[0]
33654
33655
33656 for {
33657 if v_0.Op != OpConst16 {
33658 break
33659 }
33660 c := auxIntToInt16(v_0.AuxInt)
33661 v.reset(OpConst8)
33662 v.AuxInt = int8ToAuxInt(int8(c))
33663 return true
33664 }
33665
33666
33667 for {
33668 if v_0.Op != OpZeroExt8to16 {
33669 break
33670 }
33671 x := v_0.Args[0]
33672 v.copyOf(x)
33673 return true
33674 }
33675
33676
33677 for {
33678 if v_0.Op != OpSignExt8to16 {
33679 break
33680 }
33681 x := v_0.Args[0]
33682 v.copyOf(x)
33683 return true
33684 }
33685
33686
33687
33688 for {
33689 if v_0.Op != OpAnd16 {
33690 break
33691 }
33692 _ = v_0.Args[1]
33693 v_0_0 := v_0.Args[0]
33694 v_0_1 := v_0.Args[1]
33695 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
33696 if v_0_0.Op != OpConst16 {
33697 continue
33698 }
33699 y := auxIntToInt16(v_0_0.AuxInt)
33700 x := v_0_1
33701 if !(y&0xFF == 0xFF) {
33702 continue
33703 }
33704 v.reset(OpTrunc16to8)
33705 v.AddArg(x)
33706 return true
33707 }
33708 break
33709 }
33710 return false
33711 }
33712 func rewriteValuegeneric_OpTrunc32to16(v *Value) bool {
33713 v_0 := v.Args[0]
33714
33715
33716 for {
33717 if v_0.Op != OpConst32 {
33718 break
33719 }
33720 c := auxIntToInt32(v_0.AuxInt)
33721 v.reset(OpConst16)
33722 v.AuxInt = int16ToAuxInt(int16(c))
33723 return true
33724 }
33725
33726
33727 for {
33728 if v_0.Op != OpZeroExt8to32 {
33729 break
33730 }
33731 x := v_0.Args[0]
33732 v.reset(OpZeroExt8to16)
33733 v.AddArg(x)
33734 return true
33735 }
33736
33737
33738 for {
33739 if v_0.Op != OpZeroExt16to32 {
33740 break
33741 }
33742 x := v_0.Args[0]
33743 v.copyOf(x)
33744 return true
33745 }
33746
33747
33748 for {
33749 if v_0.Op != OpSignExt8to32 {
33750 break
33751 }
33752 x := v_0.Args[0]
33753 v.reset(OpSignExt8to16)
33754 v.AddArg(x)
33755 return true
33756 }
33757
33758
33759 for {
33760 if v_0.Op != OpSignExt16to32 {
33761 break
33762 }
33763 x := v_0.Args[0]
33764 v.copyOf(x)
33765 return true
33766 }
33767
33768
33769
33770 for {
33771 if v_0.Op != OpAnd32 {
33772 break
33773 }
33774 _ = v_0.Args[1]
33775 v_0_0 := v_0.Args[0]
33776 v_0_1 := v_0.Args[1]
33777 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
33778 if v_0_0.Op != OpConst32 {
33779 continue
33780 }
33781 y := auxIntToInt32(v_0_0.AuxInt)
33782 x := v_0_1
33783 if !(y&0xFFFF == 0xFFFF) {
33784 continue
33785 }
33786 v.reset(OpTrunc32to16)
33787 v.AddArg(x)
33788 return true
33789 }
33790 break
33791 }
33792 return false
33793 }
33794 func rewriteValuegeneric_OpTrunc32to8(v *Value) bool {
33795 v_0 := v.Args[0]
33796
33797
33798 for {
33799 if v_0.Op != OpConst32 {
33800 break
33801 }
33802 c := auxIntToInt32(v_0.AuxInt)
33803 v.reset(OpConst8)
33804 v.AuxInt = int8ToAuxInt(int8(c))
33805 return true
33806 }
33807
33808
33809 for {
33810 if v_0.Op != OpZeroExt8to32 {
33811 break
33812 }
33813 x := v_0.Args[0]
33814 v.copyOf(x)
33815 return true
33816 }
33817
33818
33819 for {
33820 if v_0.Op != OpSignExt8to32 {
33821 break
33822 }
33823 x := v_0.Args[0]
33824 v.copyOf(x)
33825 return true
33826 }
33827
33828
33829
33830 for {
33831 if v_0.Op != OpAnd32 {
33832 break
33833 }
33834 _ = v_0.Args[1]
33835 v_0_0 := v_0.Args[0]
33836 v_0_1 := v_0.Args[1]
33837 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
33838 if v_0_0.Op != OpConst32 {
33839 continue
33840 }
33841 y := auxIntToInt32(v_0_0.AuxInt)
33842 x := v_0_1
33843 if !(y&0xFF == 0xFF) {
33844 continue
33845 }
33846 v.reset(OpTrunc32to8)
33847 v.AddArg(x)
33848 return true
33849 }
33850 break
33851 }
33852 return false
33853 }
33854 func rewriteValuegeneric_OpTrunc64to16(v *Value) bool {
33855 v_0 := v.Args[0]
33856
33857
33858 for {
33859 if v_0.Op != OpConst64 {
33860 break
33861 }
33862 c := auxIntToInt64(v_0.AuxInt)
33863 v.reset(OpConst16)
33864 v.AuxInt = int16ToAuxInt(int16(c))
33865 return true
33866 }
33867
33868
33869 for {
33870 if v_0.Op != OpZeroExt8to64 {
33871 break
33872 }
33873 x := v_0.Args[0]
33874 v.reset(OpZeroExt8to16)
33875 v.AddArg(x)
33876 return true
33877 }
33878
33879
33880 for {
33881 if v_0.Op != OpZeroExt16to64 {
33882 break
33883 }
33884 x := v_0.Args[0]
33885 v.copyOf(x)
33886 return true
33887 }
33888
33889
33890 for {
33891 if v_0.Op != OpSignExt8to64 {
33892 break
33893 }
33894 x := v_0.Args[0]
33895 v.reset(OpSignExt8to16)
33896 v.AddArg(x)
33897 return true
33898 }
33899
33900
33901 for {
33902 if v_0.Op != OpSignExt16to64 {
33903 break
33904 }
33905 x := v_0.Args[0]
33906 v.copyOf(x)
33907 return true
33908 }
33909
33910
33911
33912 for {
33913 if v_0.Op != OpAnd64 {
33914 break
33915 }
33916 _ = v_0.Args[1]
33917 v_0_0 := v_0.Args[0]
33918 v_0_1 := v_0.Args[1]
33919 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
33920 if v_0_0.Op != OpConst64 {
33921 continue
33922 }
33923 y := auxIntToInt64(v_0_0.AuxInt)
33924 x := v_0_1
33925 if !(y&0xFFFF == 0xFFFF) {
33926 continue
33927 }
33928 v.reset(OpTrunc64to16)
33929 v.AddArg(x)
33930 return true
33931 }
33932 break
33933 }
33934 return false
33935 }
33936 func rewriteValuegeneric_OpTrunc64to32(v *Value) bool {
33937 v_0 := v.Args[0]
33938
33939
33940 for {
33941 if v_0.Op != OpConst64 {
33942 break
33943 }
33944 c := auxIntToInt64(v_0.AuxInt)
33945 v.reset(OpConst32)
33946 v.AuxInt = int32ToAuxInt(int32(c))
33947 return true
33948 }
33949
33950
33951 for {
33952 if v_0.Op != OpZeroExt8to64 {
33953 break
33954 }
33955 x := v_0.Args[0]
33956 v.reset(OpZeroExt8to32)
33957 v.AddArg(x)
33958 return true
33959 }
33960
33961
33962 for {
33963 if v_0.Op != OpZeroExt16to64 {
33964 break
33965 }
33966 x := v_0.Args[0]
33967 v.reset(OpZeroExt16to32)
33968 v.AddArg(x)
33969 return true
33970 }
33971
33972
33973 for {
33974 if v_0.Op != OpZeroExt32to64 {
33975 break
33976 }
33977 x := v_0.Args[0]
33978 v.copyOf(x)
33979 return true
33980 }
33981
33982
33983 for {
33984 if v_0.Op != OpSignExt8to64 {
33985 break
33986 }
33987 x := v_0.Args[0]
33988 v.reset(OpSignExt8to32)
33989 v.AddArg(x)
33990 return true
33991 }
33992
33993
33994 for {
33995 if v_0.Op != OpSignExt16to64 {
33996 break
33997 }
33998 x := v_0.Args[0]
33999 v.reset(OpSignExt16to32)
34000 v.AddArg(x)
34001 return true
34002 }
34003
34004
34005 for {
34006 if v_0.Op != OpSignExt32to64 {
34007 break
34008 }
34009 x := v_0.Args[0]
34010 v.copyOf(x)
34011 return true
34012 }
34013
34014
34015
34016 for {
34017 if v_0.Op != OpAnd64 {
34018 break
34019 }
34020 _ = v_0.Args[1]
34021 v_0_0 := v_0.Args[0]
34022 v_0_1 := v_0.Args[1]
34023 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
34024 if v_0_0.Op != OpConst64 {
34025 continue
34026 }
34027 y := auxIntToInt64(v_0_0.AuxInt)
34028 x := v_0_1
34029 if !(y&0xFFFFFFFF == 0xFFFFFFFF) {
34030 continue
34031 }
34032 v.reset(OpTrunc64to32)
34033 v.AddArg(x)
34034 return true
34035 }
34036 break
34037 }
34038 return false
34039 }
34040 func rewriteValuegeneric_OpTrunc64to8(v *Value) bool {
34041 v_0 := v.Args[0]
34042
34043
34044 for {
34045 if v_0.Op != OpConst64 {
34046 break
34047 }
34048 c := auxIntToInt64(v_0.AuxInt)
34049 v.reset(OpConst8)
34050 v.AuxInt = int8ToAuxInt(int8(c))
34051 return true
34052 }
34053
34054
34055 for {
34056 if v_0.Op != OpZeroExt8to64 {
34057 break
34058 }
34059 x := v_0.Args[0]
34060 v.copyOf(x)
34061 return true
34062 }
34063
34064
34065 for {
34066 if v_0.Op != OpSignExt8to64 {
34067 break
34068 }
34069 x := v_0.Args[0]
34070 v.copyOf(x)
34071 return true
34072 }
34073
34074
34075
34076 for {
34077 if v_0.Op != OpAnd64 {
34078 break
34079 }
34080 _ = v_0.Args[1]
34081 v_0_0 := v_0.Args[0]
34082 v_0_1 := v_0.Args[1]
34083 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
34084 if v_0_0.Op != OpConst64 {
34085 continue
34086 }
34087 y := auxIntToInt64(v_0_0.AuxInt)
34088 x := v_0_1
34089 if !(y&0xFF == 0xFF) {
34090 continue
34091 }
34092 v.reset(OpTrunc64to8)
34093 v.AddArg(x)
34094 return true
34095 }
34096 break
34097 }
34098 return false
34099 }
34100 func rewriteValuegeneric_OpXor16(v *Value) bool {
34101 v_1 := v.Args[1]
34102 v_0 := v.Args[0]
34103 b := v.Block
34104 config := b.Func.Config
34105
34106
34107 for {
34108 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34109 if v_0.Op != OpConst16 {
34110 continue
34111 }
34112 c := auxIntToInt16(v_0.AuxInt)
34113 if v_1.Op != OpConst16 {
34114 continue
34115 }
34116 d := auxIntToInt16(v_1.AuxInt)
34117 v.reset(OpConst16)
34118 v.AuxInt = int16ToAuxInt(c ^ d)
34119 return true
34120 }
34121 break
34122 }
34123
34124
34125 for {
34126 x := v_0
34127 if x != v_1 {
34128 break
34129 }
34130 v.reset(OpConst16)
34131 v.AuxInt = int16ToAuxInt(0)
34132 return true
34133 }
34134
34135
34136 for {
34137 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34138 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 {
34139 continue
34140 }
34141 x := v_1
34142 v.copyOf(x)
34143 return true
34144 }
34145 break
34146 }
34147
34148
34149 for {
34150 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34151 if v_0.Op != OpCom16 {
34152 continue
34153 }
34154 x := v_0.Args[0]
34155 if x != v_1 {
34156 continue
34157 }
34158 v.reset(OpConst16)
34159 v.AuxInt = int16ToAuxInt(-1)
34160 return true
34161 }
34162 break
34163 }
34164
34165
34166 for {
34167 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34168 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != -1 {
34169 continue
34170 }
34171 x := v_1
34172 v.reset(OpCom16)
34173 v.AddArg(x)
34174 return true
34175 }
34176 break
34177 }
34178
34179
34180 for {
34181 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34182 x := v_0
34183 if v_1.Op != OpXor16 {
34184 continue
34185 }
34186 _ = v_1.Args[1]
34187 v_1_0 := v_1.Args[0]
34188 v_1_1 := v_1.Args[1]
34189 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
34190 if x != v_1_0 {
34191 continue
34192 }
34193 y := v_1_1
34194 v.copyOf(y)
34195 return true
34196 }
34197 }
34198 break
34199 }
34200
34201
34202
34203 for {
34204 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34205 if v_0.Op != OpXor16 {
34206 continue
34207 }
34208 _ = v_0.Args[1]
34209 v_0_0 := v_0.Args[0]
34210 v_0_1 := v_0.Args[1]
34211 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
34212 i := v_0_0
34213 if i.Op != OpConst16 {
34214 continue
34215 }
34216 t := i.Type
34217 z := v_0_1
34218 x := v_1
34219 if !(z.Op != OpConst16 && x.Op != OpConst16) {
34220 continue
34221 }
34222 v.reset(OpXor16)
34223 v0 := b.NewValue0(v.Pos, OpXor16, t)
34224 v0.AddArg2(z, x)
34225 v.AddArg2(i, v0)
34226 return true
34227 }
34228 }
34229 break
34230 }
34231
34232
34233 for {
34234 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34235 if v_0.Op != OpConst16 {
34236 continue
34237 }
34238 t := v_0.Type
34239 c := auxIntToInt16(v_0.AuxInt)
34240 if v_1.Op != OpXor16 {
34241 continue
34242 }
34243 _ = v_1.Args[1]
34244 v_1_0 := v_1.Args[0]
34245 v_1_1 := v_1.Args[1]
34246 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
34247 if v_1_0.Op != OpConst16 || v_1_0.Type != t {
34248 continue
34249 }
34250 d := auxIntToInt16(v_1_0.AuxInt)
34251 x := v_1_1
34252 v.reset(OpXor16)
34253 v0 := b.NewValue0(v.Pos, OpConst16, t)
34254 v0.AuxInt = int16ToAuxInt(c ^ d)
34255 v.AddArg2(v0, x)
34256 return true
34257 }
34258 }
34259 break
34260 }
34261
34262
34263
34264 for {
34265 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34266 if v_0.Op != OpLsh16x64 {
34267 continue
34268 }
34269 _ = v_0.Args[1]
34270 x := v_0.Args[0]
34271 z := v_0.Args[1]
34272 if z.Op != OpConst64 {
34273 continue
34274 }
34275 c := auxIntToInt64(z.AuxInt)
34276 if v_1.Op != OpRsh16Ux64 {
34277 continue
34278 }
34279 _ = v_1.Args[1]
34280 if x != v_1.Args[0] {
34281 continue
34282 }
34283 v_1_1 := v_1.Args[1]
34284 if v_1_1.Op != OpConst64 {
34285 continue
34286 }
34287 d := auxIntToInt64(v_1_1.AuxInt)
34288 if !(c < 16 && d == 16-c && canRotate(config, 16)) {
34289 continue
34290 }
34291 v.reset(OpRotateLeft16)
34292 v.AddArg2(x, z)
34293 return true
34294 }
34295 break
34296 }
34297
34298
34299
34300 for {
34301 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34302 left := v_0
34303 if left.Op != OpLsh16x64 {
34304 continue
34305 }
34306 y := left.Args[1]
34307 x := left.Args[0]
34308 right := v_1
34309 if right.Op != OpRsh16Ux64 {
34310 continue
34311 }
34312 _ = right.Args[1]
34313 if x != right.Args[0] {
34314 continue
34315 }
34316 right_1 := right.Args[1]
34317 if right_1.Op != OpSub64 {
34318 continue
34319 }
34320 _ = right_1.Args[1]
34321 right_1_0 := right_1.Args[0]
34322 if right_1_0.Op != OpConst64 || auxIntToInt64(right_1_0.AuxInt) != 16 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 16)) {
34323 continue
34324 }
34325 v.reset(OpRotateLeft16)
34326 v.AddArg2(x, y)
34327 return true
34328 }
34329 break
34330 }
34331
34332
34333
34334 for {
34335 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34336 left := v_0
34337 if left.Op != OpLsh16x32 {
34338 continue
34339 }
34340 y := left.Args[1]
34341 x := left.Args[0]
34342 right := v_1
34343 if right.Op != OpRsh16Ux32 {
34344 continue
34345 }
34346 _ = right.Args[1]
34347 if x != right.Args[0] {
34348 continue
34349 }
34350 right_1 := right.Args[1]
34351 if right_1.Op != OpSub32 {
34352 continue
34353 }
34354 _ = right_1.Args[1]
34355 right_1_0 := right_1.Args[0]
34356 if right_1_0.Op != OpConst32 || auxIntToInt32(right_1_0.AuxInt) != 16 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 16)) {
34357 continue
34358 }
34359 v.reset(OpRotateLeft16)
34360 v.AddArg2(x, y)
34361 return true
34362 }
34363 break
34364 }
34365
34366
34367
34368 for {
34369 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34370 left := v_0
34371 if left.Op != OpLsh16x16 {
34372 continue
34373 }
34374 y := left.Args[1]
34375 x := left.Args[0]
34376 right := v_1
34377 if right.Op != OpRsh16Ux16 {
34378 continue
34379 }
34380 _ = right.Args[1]
34381 if x != right.Args[0] {
34382 continue
34383 }
34384 right_1 := right.Args[1]
34385 if right_1.Op != OpSub16 {
34386 continue
34387 }
34388 _ = right_1.Args[1]
34389 right_1_0 := right_1.Args[0]
34390 if right_1_0.Op != OpConst16 || auxIntToInt16(right_1_0.AuxInt) != 16 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 16)) {
34391 continue
34392 }
34393 v.reset(OpRotateLeft16)
34394 v.AddArg2(x, y)
34395 return true
34396 }
34397 break
34398 }
34399
34400
34401
34402 for {
34403 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34404 left := v_0
34405 if left.Op != OpLsh16x8 {
34406 continue
34407 }
34408 y := left.Args[1]
34409 x := left.Args[0]
34410 right := v_1
34411 if right.Op != OpRsh16Ux8 {
34412 continue
34413 }
34414 _ = right.Args[1]
34415 if x != right.Args[0] {
34416 continue
34417 }
34418 right_1 := right.Args[1]
34419 if right_1.Op != OpSub8 {
34420 continue
34421 }
34422 _ = right_1.Args[1]
34423 right_1_0 := right_1.Args[0]
34424 if right_1_0.Op != OpConst8 || auxIntToInt8(right_1_0.AuxInt) != 16 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 16)) {
34425 continue
34426 }
34427 v.reset(OpRotateLeft16)
34428 v.AddArg2(x, y)
34429 return true
34430 }
34431 break
34432 }
34433
34434
34435
34436 for {
34437 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34438 right := v_0
34439 if right.Op != OpRsh16Ux64 {
34440 continue
34441 }
34442 y := right.Args[1]
34443 x := right.Args[0]
34444 left := v_1
34445 if left.Op != OpLsh16x64 {
34446 continue
34447 }
34448 _ = left.Args[1]
34449 if x != left.Args[0] {
34450 continue
34451 }
34452 z := left.Args[1]
34453 if z.Op != OpSub64 {
34454 continue
34455 }
34456 _ = z.Args[1]
34457 z_0 := z.Args[0]
34458 if z_0.Op != OpConst64 || auxIntToInt64(z_0.AuxInt) != 16 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 16)) {
34459 continue
34460 }
34461 v.reset(OpRotateLeft16)
34462 v.AddArg2(x, z)
34463 return true
34464 }
34465 break
34466 }
34467
34468
34469
34470 for {
34471 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34472 right := v_0
34473 if right.Op != OpRsh16Ux32 {
34474 continue
34475 }
34476 y := right.Args[1]
34477 x := right.Args[0]
34478 left := v_1
34479 if left.Op != OpLsh16x32 {
34480 continue
34481 }
34482 _ = left.Args[1]
34483 if x != left.Args[0] {
34484 continue
34485 }
34486 z := left.Args[1]
34487 if z.Op != OpSub32 {
34488 continue
34489 }
34490 _ = z.Args[1]
34491 z_0 := z.Args[0]
34492 if z_0.Op != OpConst32 || auxIntToInt32(z_0.AuxInt) != 16 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 16)) {
34493 continue
34494 }
34495 v.reset(OpRotateLeft16)
34496 v.AddArg2(x, z)
34497 return true
34498 }
34499 break
34500 }
34501
34502
34503
34504 for {
34505 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34506 right := v_0
34507 if right.Op != OpRsh16Ux16 {
34508 continue
34509 }
34510 y := right.Args[1]
34511 x := right.Args[0]
34512 left := v_1
34513 if left.Op != OpLsh16x16 {
34514 continue
34515 }
34516 _ = left.Args[1]
34517 if x != left.Args[0] {
34518 continue
34519 }
34520 z := left.Args[1]
34521 if z.Op != OpSub16 {
34522 continue
34523 }
34524 _ = z.Args[1]
34525 z_0 := z.Args[0]
34526 if z_0.Op != OpConst16 || auxIntToInt16(z_0.AuxInt) != 16 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 16)) {
34527 continue
34528 }
34529 v.reset(OpRotateLeft16)
34530 v.AddArg2(x, z)
34531 return true
34532 }
34533 break
34534 }
34535
34536
34537
34538 for {
34539 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34540 right := v_0
34541 if right.Op != OpRsh16Ux8 {
34542 continue
34543 }
34544 y := right.Args[1]
34545 x := right.Args[0]
34546 left := v_1
34547 if left.Op != OpLsh16x8 {
34548 continue
34549 }
34550 _ = left.Args[1]
34551 if x != left.Args[0] {
34552 continue
34553 }
34554 z := left.Args[1]
34555 if z.Op != OpSub8 {
34556 continue
34557 }
34558 _ = z.Args[1]
34559 z_0 := z.Args[0]
34560 if z_0.Op != OpConst8 || auxIntToInt8(z_0.AuxInt) != 16 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 16)) {
34561 continue
34562 }
34563 v.reset(OpRotateLeft16)
34564 v.AddArg2(x, z)
34565 return true
34566 }
34567 break
34568 }
34569 return false
34570 }
34571 func rewriteValuegeneric_OpXor32(v *Value) bool {
34572 v_1 := v.Args[1]
34573 v_0 := v.Args[0]
34574 b := v.Block
34575 config := b.Func.Config
34576
34577
34578 for {
34579 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34580 if v_0.Op != OpConst32 {
34581 continue
34582 }
34583 c := auxIntToInt32(v_0.AuxInt)
34584 if v_1.Op != OpConst32 {
34585 continue
34586 }
34587 d := auxIntToInt32(v_1.AuxInt)
34588 v.reset(OpConst32)
34589 v.AuxInt = int32ToAuxInt(c ^ d)
34590 return true
34591 }
34592 break
34593 }
34594
34595
34596 for {
34597 x := v_0
34598 if x != v_1 {
34599 break
34600 }
34601 v.reset(OpConst32)
34602 v.AuxInt = int32ToAuxInt(0)
34603 return true
34604 }
34605
34606
34607 for {
34608 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34609 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
34610 continue
34611 }
34612 x := v_1
34613 v.copyOf(x)
34614 return true
34615 }
34616 break
34617 }
34618
34619
34620 for {
34621 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34622 if v_0.Op != OpCom32 {
34623 continue
34624 }
34625 x := v_0.Args[0]
34626 if x != v_1 {
34627 continue
34628 }
34629 v.reset(OpConst32)
34630 v.AuxInt = int32ToAuxInt(-1)
34631 return true
34632 }
34633 break
34634 }
34635
34636
34637 for {
34638 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34639 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != -1 {
34640 continue
34641 }
34642 x := v_1
34643 v.reset(OpCom32)
34644 v.AddArg(x)
34645 return true
34646 }
34647 break
34648 }
34649
34650
34651 for {
34652 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34653 x := v_0
34654 if v_1.Op != OpXor32 {
34655 continue
34656 }
34657 _ = v_1.Args[1]
34658 v_1_0 := v_1.Args[0]
34659 v_1_1 := v_1.Args[1]
34660 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
34661 if x != v_1_0 {
34662 continue
34663 }
34664 y := v_1_1
34665 v.copyOf(y)
34666 return true
34667 }
34668 }
34669 break
34670 }
34671
34672
34673
34674 for {
34675 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34676 if v_0.Op != OpXor32 {
34677 continue
34678 }
34679 _ = v_0.Args[1]
34680 v_0_0 := v_0.Args[0]
34681 v_0_1 := v_0.Args[1]
34682 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
34683 i := v_0_0
34684 if i.Op != OpConst32 {
34685 continue
34686 }
34687 t := i.Type
34688 z := v_0_1
34689 x := v_1
34690 if !(z.Op != OpConst32 && x.Op != OpConst32) {
34691 continue
34692 }
34693 v.reset(OpXor32)
34694 v0 := b.NewValue0(v.Pos, OpXor32, t)
34695 v0.AddArg2(z, x)
34696 v.AddArg2(i, v0)
34697 return true
34698 }
34699 }
34700 break
34701 }
34702
34703
34704 for {
34705 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34706 if v_0.Op != OpConst32 {
34707 continue
34708 }
34709 t := v_0.Type
34710 c := auxIntToInt32(v_0.AuxInt)
34711 if v_1.Op != OpXor32 {
34712 continue
34713 }
34714 _ = v_1.Args[1]
34715 v_1_0 := v_1.Args[0]
34716 v_1_1 := v_1.Args[1]
34717 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
34718 if v_1_0.Op != OpConst32 || v_1_0.Type != t {
34719 continue
34720 }
34721 d := auxIntToInt32(v_1_0.AuxInt)
34722 x := v_1_1
34723 v.reset(OpXor32)
34724 v0 := b.NewValue0(v.Pos, OpConst32, t)
34725 v0.AuxInt = int32ToAuxInt(c ^ d)
34726 v.AddArg2(v0, x)
34727 return true
34728 }
34729 }
34730 break
34731 }
34732
34733
34734
34735 for {
34736 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34737 if v_0.Op != OpLsh32x64 {
34738 continue
34739 }
34740 _ = v_0.Args[1]
34741 x := v_0.Args[0]
34742 z := v_0.Args[1]
34743 if z.Op != OpConst64 {
34744 continue
34745 }
34746 c := auxIntToInt64(z.AuxInt)
34747 if v_1.Op != OpRsh32Ux64 {
34748 continue
34749 }
34750 _ = v_1.Args[1]
34751 if x != v_1.Args[0] {
34752 continue
34753 }
34754 v_1_1 := v_1.Args[1]
34755 if v_1_1.Op != OpConst64 {
34756 continue
34757 }
34758 d := auxIntToInt64(v_1_1.AuxInt)
34759 if !(c < 32 && d == 32-c && canRotate(config, 32)) {
34760 continue
34761 }
34762 v.reset(OpRotateLeft32)
34763 v.AddArg2(x, z)
34764 return true
34765 }
34766 break
34767 }
34768
34769
34770
34771 for {
34772 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34773 left := v_0
34774 if left.Op != OpLsh32x64 {
34775 continue
34776 }
34777 y := left.Args[1]
34778 x := left.Args[0]
34779 right := v_1
34780 if right.Op != OpRsh32Ux64 {
34781 continue
34782 }
34783 _ = right.Args[1]
34784 if x != right.Args[0] {
34785 continue
34786 }
34787 right_1 := right.Args[1]
34788 if right_1.Op != OpSub64 {
34789 continue
34790 }
34791 _ = right_1.Args[1]
34792 right_1_0 := right_1.Args[0]
34793 if right_1_0.Op != OpConst64 || auxIntToInt64(right_1_0.AuxInt) != 32 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 32)) {
34794 continue
34795 }
34796 v.reset(OpRotateLeft32)
34797 v.AddArg2(x, y)
34798 return true
34799 }
34800 break
34801 }
34802
34803
34804
34805 for {
34806 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34807 left := v_0
34808 if left.Op != OpLsh32x32 {
34809 continue
34810 }
34811 y := left.Args[1]
34812 x := left.Args[0]
34813 right := v_1
34814 if right.Op != OpRsh32Ux32 {
34815 continue
34816 }
34817 _ = right.Args[1]
34818 if x != right.Args[0] {
34819 continue
34820 }
34821 right_1 := right.Args[1]
34822 if right_1.Op != OpSub32 {
34823 continue
34824 }
34825 _ = right_1.Args[1]
34826 right_1_0 := right_1.Args[0]
34827 if right_1_0.Op != OpConst32 || auxIntToInt32(right_1_0.AuxInt) != 32 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 32)) {
34828 continue
34829 }
34830 v.reset(OpRotateLeft32)
34831 v.AddArg2(x, y)
34832 return true
34833 }
34834 break
34835 }
34836
34837
34838
34839 for {
34840 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34841 left := v_0
34842 if left.Op != OpLsh32x16 {
34843 continue
34844 }
34845 y := left.Args[1]
34846 x := left.Args[0]
34847 right := v_1
34848 if right.Op != OpRsh32Ux16 {
34849 continue
34850 }
34851 _ = right.Args[1]
34852 if x != right.Args[0] {
34853 continue
34854 }
34855 right_1 := right.Args[1]
34856 if right_1.Op != OpSub16 {
34857 continue
34858 }
34859 _ = right_1.Args[1]
34860 right_1_0 := right_1.Args[0]
34861 if right_1_0.Op != OpConst16 || auxIntToInt16(right_1_0.AuxInt) != 32 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 32)) {
34862 continue
34863 }
34864 v.reset(OpRotateLeft32)
34865 v.AddArg2(x, y)
34866 return true
34867 }
34868 break
34869 }
34870
34871
34872
34873 for {
34874 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34875 left := v_0
34876 if left.Op != OpLsh32x8 {
34877 continue
34878 }
34879 y := left.Args[1]
34880 x := left.Args[0]
34881 right := v_1
34882 if right.Op != OpRsh32Ux8 {
34883 continue
34884 }
34885 _ = right.Args[1]
34886 if x != right.Args[0] {
34887 continue
34888 }
34889 right_1 := right.Args[1]
34890 if right_1.Op != OpSub8 {
34891 continue
34892 }
34893 _ = right_1.Args[1]
34894 right_1_0 := right_1.Args[0]
34895 if right_1_0.Op != OpConst8 || auxIntToInt8(right_1_0.AuxInt) != 32 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 32)) {
34896 continue
34897 }
34898 v.reset(OpRotateLeft32)
34899 v.AddArg2(x, y)
34900 return true
34901 }
34902 break
34903 }
34904
34905
34906
34907 for {
34908 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34909 right := v_0
34910 if right.Op != OpRsh32Ux64 {
34911 continue
34912 }
34913 y := right.Args[1]
34914 x := right.Args[0]
34915 left := v_1
34916 if left.Op != OpLsh32x64 {
34917 continue
34918 }
34919 _ = left.Args[1]
34920 if x != left.Args[0] {
34921 continue
34922 }
34923 z := left.Args[1]
34924 if z.Op != OpSub64 {
34925 continue
34926 }
34927 _ = z.Args[1]
34928 z_0 := z.Args[0]
34929 if z_0.Op != OpConst64 || auxIntToInt64(z_0.AuxInt) != 32 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 32)) {
34930 continue
34931 }
34932 v.reset(OpRotateLeft32)
34933 v.AddArg2(x, z)
34934 return true
34935 }
34936 break
34937 }
34938
34939
34940
34941 for {
34942 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34943 right := v_0
34944 if right.Op != OpRsh32Ux32 {
34945 continue
34946 }
34947 y := right.Args[1]
34948 x := right.Args[0]
34949 left := v_1
34950 if left.Op != OpLsh32x32 {
34951 continue
34952 }
34953 _ = left.Args[1]
34954 if x != left.Args[0] {
34955 continue
34956 }
34957 z := left.Args[1]
34958 if z.Op != OpSub32 {
34959 continue
34960 }
34961 _ = z.Args[1]
34962 z_0 := z.Args[0]
34963 if z_0.Op != OpConst32 || auxIntToInt32(z_0.AuxInt) != 32 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 32)) {
34964 continue
34965 }
34966 v.reset(OpRotateLeft32)
34967 v.AddArg2(x, z)
34968 return true
34969 }
34970 break
34971 }
34972
34973
34974
34975 for {
34976 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34977 right := v_0
34978 if right.Op != OpRsh32Ux16 {
34979 continue
34980 }
34981 y := right.Args[1]
34982 x := right.Args[0]
34983 left := v_1
34984 if left.Op != OpLsh32x16 {
34985 continue
34986 }
34987 _ = left.Args[1]
34988 if x != left.Args[0] {
34989 continue
34990 }
34991 z := left.Args[1]
34992 if z.Op != OpSub16 {
34993 continue
34994 }
34995 _ = z.Args[1]
34996 z_0 := z.Args[0]
34997 if z_0.Op != OpConst16 || auxIntToInt16(z_0.AuxInt) != 32 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 32)) {
34998 continue
34999 }
35000 v.reset(OpRotateLeft32)
35001 v.AddArg2(x, z)
35002 return true
35003 }
35004 break
35005 }
35006
35007
35008
35009 for {
35010 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
35011 right := v_0
35012 if right.Op != OpRsh32Ux8 {
35013 continue
35014 }
35015 y := right.Args[1]
35016 x := right.Args[0]
35017 left := v_1
35018 if left.Op != OpLsh32x8 {
35019 continue
35020 }
35021 _ = left.Args[1]
35022 if x != left.Args[0] {
35023 continue
35024 }
35025 z := left.Args[1]
35026 if z.Op != OpSub8 {
35027 continue
35028 }
35029 _ = z.Args[1]
35030 z_0 := z.Args[0]
35031 if z_0.Op != OpConst8 || auxIntToInt8(z_0.AuxInt) != 32 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 32)) {
35032 continue
35033 }
35034 v.reset(OpRotateLeft32)
35035 v.AddArg2(x, z)
35036 return true
35037 }
35038 break
35039 }
35040 return false
35041 }
35042 func rewriteValuegeneric_OpXor64(v *Value) bool {
35043 v_1 := v.Args[1]
35044 v_0 := v.Args[0]
35045 b := v.Block
35046 config := b.Func.Config
35047
35048
35049 for {
35050 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
35051 if v_0.Op != OpConst64 {
35052 continue
35053 }
35054 c := auxIntToInt64(v_0.AuxInt)
35055 if v_1.Op != OpConst64 {
35056 continue
35057 }
35058 d := auxIntToInt64(v_1.AuxInt)
35059 v.reset(OpConst64)
35060 v.AuxInt = int64ToAuxInt(c ^ d)
35061 return true
35062 }
35063 break
35064 }
35065
35066
35067 for {
35068 x := v_0
35069 if x != v_1 {
35070 break
35071 }
35072 v.reset(OpConst64)
35073 v.AuxInt = int64ToAuxInt(0)
35074 return true
35075 }
35076
35077
35078 for {
35079 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
35080 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
35081 continue
35082 }
35083 x := v_1
35084 v.copyOf(x)
35085 return true
35086 }
35087 break
35088 }
35089
35090
35091 for {
35092 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
35093 if v_0.Op != OpCom64 {
35094 continue
35095 }
35096 x := v_0.Args[0]
35097 if x != v_1 {
35098 continue
35099 }
35100 v.reset(OpConst64)
35101 v.AuxInt = int64ToAuxInt(-1)
35102 return true
35103 }
35104 break
35105 }
35106
35107
35108 for {
35109 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
35110 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != -1 {
35111 continue
35112 }
35113 x := v_1
35114 v.reset(OpCom64)
35115 v.AddArg(x)
35116 return true
35117 }
35118 break
35119 }
35120
35121
35122 for {
35123 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
35124 x := v_0
35125 if v_1.Op != OpXor64 {
35126 continue
35127 }
35128 _ = v_1.Args[1]
35129 v_1_0 := v_1.Args[0]
35130 v_1_1 := v_1.Args[1]
35131 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
35132 if x != v_1_0 {
35133 continue
35134 }
35135 y := v_1_1
35136 v.copyOf(y)
35137 return true
35138 }
35139 }
35140 break
35141 }
35142
35143
35144
35145 for {
35146 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
35147 if v_0.Op != OpXor64 {
35148 continue
35149 }
35150 _ = v_0.Args[1]
35151 v_0_0 := v_0.Args[0]
35152 v_0_1 := v_0.Args[1]
35153 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
35154 i := v_0_0
35155 if i.Op != OpConst64 {
35156 continue
35157 }
35158 t := i.Type
35159 z := v_0_1
35160 x := v_1
35161 if !(z.Op != OpConst64 && x.Op != OpConst64) {
35162 continue
35163 }
35164 v.reset(OpXor64)
35165 v0 := b.NewValue0(v.Pos, OpXor64, t)
35166 v0.AddArg2(z, x)
35167 v.AddArg2(i, v0)
35168 return true
35169 }
35170 }
35171 break
35172 }
35173
35174
35175 for {
35176 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
35177 if v_0.Op != OpConst64 {
35178 continue
35179 }
35180 t := v_0.Type
35181 c := auxIntToInt64(v_0.AuxInt)
35182 if v_1.Op != OpXor64 {
35183 continue
35184 }
35185 _ = v_1.Args[1]
35186 v_1_0 := v_1.Args[0]
35187 v_1_1 := v_1.Args[1]
35188 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
35189 if v_1_0.Op != OpConst64 || v_1_0.Type != t {
35190 continue
35191 }
35192 d := auxIntToInt64(v_1_0.AuxInt)
35193 x := v_1_1
35194 v.reset(OpXor64)
35195 v0 := b.NewValue0(v.Pos, OpConst64, t)
35196 v0.AuxInt = int64ToAuxInt(c ^ d)
35197 v.AddArg2(v0, x)
35198 return true
35199 }
35200 }
35201 break
35202 }
35203
35204
35205
35206 for {
35207 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
35208 if v_0.Op != OpLsh64x64 {
35209 continue
35210 }
35211 _ = v_0.Args[1]
35212 x := v_0.Args[0]
35213 z := v_0.Args[1]
35214 if z.Op != OpConst64 {
35215 continue
35216 }
35217 c := auxIntToInt64(z.AuxInt)
35218 if v_1.Op != OpRsh64Ux64 {
35219 continue
35220 }
35221 _ = v_1.Args[1]
35222 if x != v_1.Args[0] {
35223 continue
35224 }
35225 v_1_1 := v_1.Args[1]
35226 if v_1_1.Op != OpConst64 {
35227 continue
35228 }
35229 d := auxIntToInt64(v_1_1.AuxInt)
35230 if !(c < 64 && d == 64-c && canRotate(config, 64)) {
35231 continue
35232 }
35233 v.reset(OpRotateLeft64)
35234 v.AddArg2(x, z)
35235 return true
35236 }
35237 break
35238 }
35239
35240
35241
35242 for {
35243 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
35244 left := v_0
35245 if left.Op != OpLsh64x64 {
35246 continue
35247 }
35248 y := left.Args[1]
35249 x := left.Args[0]
35250 right := v_1
35251 if right.Op != OpRsh64Ux64 {
35252 continue
35253 }
35254 _ = right.Args[1]
35255 if x != right.Args[0] {
35256 continue
35257 }
35258 right_1 := right.Args[1]
35259 if right_1.Op != OpSub64 {
35260 continue
35261 }
35262 _ = right_1.Args[1]
35263 right_1_0 := right_1.Args[0]
35264 if right_1_0.Op != OpConst64 || auxIntToInt64(right_1_0.AuxInt) != 64 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 64)) {
35265 continue
35266 }
35267 v.reset(OpRotateLeft64)
35268 v.AddArg2(x, y)
35269 return true
35270 }
35271 break
35272 }
35273
35274
35275
35276 for {
35277 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
35278 left := v_0
35279 if left.Op != OpLsh64x32 {
35280 continue
35281 }
35282 y := left.Args[1]
35283 x := left.Args[0]
35284 right := v_1
35285 if right.Op != OpRsh64Ux32 {
35286 continue
35287 }
35288 _ = right.Args[1]
35289 if x != right.Args[0] {
35290 continue
35291 }
35292 right_1 := right.Args[1]
35293 if right_1.Op != OpSub32 {
35294 continue
35295 }
35296 _ = right_1.Args[1]
35297 right_1_0 := right_1.Args[0]
35298 if right_1_0.Op != OpConst32 || auxIntToInt32(right_1_0.AuxInt) != 64 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 64)) {
35299 continue
35300 }
35301 v.reset(OpRotateLeft64)
35302 v.AddArg2(x, y)
35303 return true
35304 }
35305 break
35306 }
35307
35308
35309
35310 for {
35311 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
35312 left := v_0
35313 if left.Op != OpLsh64x16 {
35314 continue
35315 }
35316 y := left.Args[1]
35317 x := left.Args[0]
35318 right := v_1
35319 if right.Op != OpRsh64Ux16 {
35320 continue
35321 }
35322 _ = right.Args[1]
35323 if x != right.Args[0] {
35324 continue
35325 }
35326 right_1 := right.Args[1]
35327 if right_1.Op != OpSub16 {
35328 continue
35329 }
35330 _ = right_1.Args[1]
35331 right_1_0 := right_1.Args[0]
35332 if right_1_0.Op != OpConst16 || auxIntToInt16(right_1_0.AuxInt) != 64 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 64)) {
35333 continue
35334 }
35335 v.reset(OpRotateLeft64)
35336 v.AddArg2(x, y)
35337 return true
35338 }
35339 break
35340 }
35341
35342
35343
35344 for {
35345 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
35346 left := v_0
35347 if left.Op != OpLsh64x8 {
35348 continue
35349 }
35350 y := left.Args[1]
35351 x := left.Args[0]
35352 right := v_1
35353 if right.Op != OpRsh64Ux8 {
35354 continue
35355 }
35356 _ = right.Args[1]
35357 if x != right.Args[0] {
35358 continue
35359 }
35360 right_1 := right.Args[1]
35361 if right_1.Op != OpSub8 {
35362 continue
35363 }
35364 _ = right_1.Args[1]
35365 right_1_0 := right_1.Args[0]
35366 if right_1_0.Op != OpConst8 || auxIntToInt8(right_1_0.AuxInt) != 64 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 64)) {
35367 continue
35368 }
35369 v.reset(OpRotateLeft64)
35370 v.AddArg2(x, y)
35371 return true
35372 }
35373 break
35374 }
35375
35376
35377
35378 for {
35379 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
35380 right := v_0
35381 if right.Op != OpRsh64Ux64 {
35382 continue
35383 }
35384 y := right.Args[1]
35385 x := right.Args[0]
35386 left := v_1
35387 if left.Op != OpLsh64x64 {
35388 continue
35389 }
35390 _ = left.Args[1]
35391 if x != left.Args[0] {
35392 continue
35393 }
35394 z := left.Args[1]
35395 if z.Op != OpSub64 {
35396 continue
35397 }
35398 _ = z.Args[1]
35399 z_0 := z.Args[0]
35400 if z_0.Op != OpConst64 || auxIntToInt64(z_0.AuxInt) != 64 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 64)) {
35401 continue
35402 }
35403 v.reset(OpRotateLeft64)
35404 v.AddArg2(x, z)
35405 return true
35406 }
35407 break
35408 }
35409
35410
35411
35412 for {
35413 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
35414 right := v_0
35415 if right.Op != OpRsh64Ux32 {
35416 continue
35417 }
35418 y := right.Args[1]
35419 x := right.Args[0]
35420 left := v_1
35421 if left.Op != OpLsh64x32 {
35422 continue
35423 }
35424 _ = left.Args[1]
35425 if x != left.Args[0] {
35426 continue
35427 }
35428 z := left.Args[1]
35429 if z.Op != OpSub32 {
35430 continue
35431 }
35432 _ = z.Args[1]
35433 z_0 := z.Args[0]
35434 if z_0.Op != OpConst32 || auxIntToInt32(z_0.AuxInt) != 64 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 64)) {
35435 continue
35436 }
35437 v.reset(OpRotateLeft64)
35438 v.AddArg2(x, z)
35439 return true
35440 }
35441 break
35442 }
35443
35444
35445
35446 for {
35447 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
35448 right := v_0
35449 if right.Op != OpRsh64Ux16 {
35450 continue
35451 }
35452 y := right.Args[1]
35453 x := right.Args[0]
35454 left := v_1
35455 if left.Op != OpLsh64x16 {
35456 continue
35457 }
35458 _ = left.Args[1]
35459 if x != left.Args[0] {
35460 continue
35461 }
35462 z := left.Args[1]
35463 if z.Op != OpSub16 {
35464 continue
35465 }
35466 _ = z.Args[1]
35467 z_0 := z.Args[0]
35468 if z_0.Op != OpConst16 || auxIntToInt16(z_0.AuxInt) != 64 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 64)) {
35469 continue
35470 }
35471 v.reset(OpRotateLeft64)
35472 v.AddArg2(x, z)
35473 return true
35474 }
35475 break
35476 }
35477
35478
35479
35480 for {
35481 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
35482 right := v_0
35483 if right.Op != OpRsh64Ux8 {
35484 continue
35485 }
35486 y := right.Args[1]
35487 x := right.Args[0]
35488 left := v_1
35489 if left.Op != OpLsh64x8 {
35490 continue
35491 }
35492 _ = left.Args[1]
35493 if x != left.Args[0] {
35494 continue
35495 }
35496 z := left.Args[1]
35497 if z.Op != OpSub8 {
35498 continue
35499 }
35500 _ = z.Args[1]
35501 z_0 := z.Args[0]
35502 if z_0.Op != OpConst8 || auxIntToInt8(z_0.AuxInt) != 64 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 64)) {
35503 continue
35504 }
35505 v.reset(OpRotateLeft64)
35506 v.AddArg2(x, z)
35507 return true
35508 }
35509 break
35510 }
35511 return false
35512 }
35513 func rewriteValuegeneric_OpXor8(v *Value) bool {
35514 v_1 := v.Args[1]
35515 v_0 := v.Args[0]
35516 b := v.Block
35517 config := b.Func.Config
35518
35519
35520 for {
35521 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
35522 if v_0.Op != OpConst8 {
35523 continue
35524 }
35525 c := auxIntToInt8(v_0.AuxInt)
35526 if v_1.Op != OpConst8 {
35527 continue
35528 }
35529 d := auxIntToInt8(v_1.AuxInt)
35530 v.reset(OpConst8)
35531 v.AuxInt = int8ToAuxInt(c ^ d)
35532 return true
35533 }
35534 break
35535 }
35536
35537
35538 for {
35539 x := v_0
35540 if x != v_1 {
35541 break
35542 }
35543 v.reset(OpConst8)
35544 v.AuxInt = int8ToAuxInt(0)
35545 return true
35546 }
35547
35548
35549 for {
35550 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
35551 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 {
35552 continue
35553 }
35554 x := v_1
35555 v.copyOf(x)
35556 return true
35557 }
35558 break
35559 }
35560
35561
35562 for {
35563 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
35564 if v_0.Op != OpCom8 {
35565 continue
35566 }
35567 x := v_0.Args[0]
35568 if x != v_1 {
35569 continue
35570 }
35571 v.reset(OpConst8)
35572 v.AuxInt = int8ToAuxInt(-1)
35573 return true
35574 }
35575 break
35576 }
35577
35578
35579 for {
35580 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
35581 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != -1 {
35582 continue
35583 }
35584 x := v_1
35585 v.reset(OpCom8)
35586 v.AddArg(x)
35587 return true
35588 }
35589 break
35590 }
35591
35592
35593 for {
35594 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
35595 x := v_0
35596 if v_1.Op != OpXor8 {
35597 continue
35598 }
35599 _ = v_1.Args[1]
35600 v_1_0 := v_1.Args[0]
35601 v_1_1 := v_1.Args[1]
35602 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
35603 if x != v_1_0 {
35604 continue
35605 }
35606 y := v_1_1
35607 v.copyOf(y)
35608 return true
35609 }
35610 }
35611 break
35612 }
35613
35614
35615
35616 for {
35617 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
35618 if v_0.Op != OpXor8 {
35619 continue
35620 }
35621 _ = v_0.Args[1]
35622 v_0_0 := v_0.Args[0]
35623 v_0_1 := v_0.Args[1]
35624 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
35625 i := v_0_0
35626 if i.Op != OpConst8 {
35627 continue
35628 }
35629 t := i.Type
35630 z := v_0_1
35631 x := v_1
35632 if !(z.Op != OpConst8 && x.Op != OpConst8) {
35633 continue
35634 }
35635 v.reset(OpXor8)
35636 v0 := b.NewValue0(v.Pos, OpXor8, t)
35637 v0.AddArg2(z, x)
35638 v.AddArg2(i, v0)
35639 return true
35640 }
35641 }
35642 break
35643 }
35644
35645
35646 for {
35647 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
35648 if v_0.Op != OpConst8 {
35649 continue
35650 }
35651 t := v_0.Type
35652 c := auxIntToInt8(v_0.AuxInt)
35653 if v_1.Op != OpXor8 {
35654 continue
35655 }
35656 _ = v_1.Args[1]
35657 v_1_0 := v_1.Args[0]
35658 v_1_1 := v_1.Args[1]
35659 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
35660 if v_1_0.Op != OpConst8 || v_1_0.Type != t {
35661 continue
35662 }
35663 d := auxIntToInt8(v_1_0.AuxInt)
35664 x := v_1_1
35665 v.reset(OpXor8)
35666 v0 := b.NewValue0(v.Pos, OpConst8, t)
35667 v0.AuxInt = int8ToAuxInt(c ^ d)
35668 v.AddArg2(v0, x)
35669 return true
35670 }
35671 }
35672 break
35673 }
35674
35675
35676
35677 for {
35678 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
35679 if v_0.Op != OpLsh8x64 {
35680 continue
35681 }
35682 _ = v_0.Args[1]
35683 x := v_0.Args[0]
35684 z := v_0.Args[1]
35685 if z.Op != OpConst64 {
35686 continue
35687 }
35688 c := auxIntToInt64(z.AuxInt)
35689 if v_1.Op != OpRsh8Ux64 {
35690 continue
35691 }
35692 _ = v_1.Args[1]
35693 if x != v_1.Args[0] {
35694 continue
35695 }
35696 v_1_1 := v_1.Args[1]
35697 if v_1_1.Op != OpConst64 {
35698 continue
35699 }
35700 d := auxIntToInt64(v_1_1.AuxInt)
35701 if !(c < 8 && d == 8-c && canRotate(config, 8)) {
35702 continue
35703 }
35704 v.reset(OpRotateLeft8)
35705 v.AddArg2(x, z)
35706 return true
35707 }
35708 break
35709 }
35710
35711
35712
35713 for {
35714 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
35715 left := v_0
35716 if left.Op != OpLsh8x64 {
35717 continue
35718 }
35719 y := left.Args[1]
35720 x := left.Args[0]
35721 right := v_1
35722 if right.Op != OpRsh8Ux64 {
35723 continue
35724 }
35725 _ = right.Args[1]
35726 if x != right.Args[0] {
35727 continue
35728 }
35729 right_1 := right.Args[1]
35730 if right_1.Op != OpSub64 {
35731 continue
35732 }
35733 _ = right_1.Args[1]
35734 right_1_0 := right_1.Args[0]
35735 if right_1_0.Op != OpConst64 || auxIntToInt64(right_1_0.AuxInt) != 8 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 8)) {
35736 continue
35737 }
35738 v.reset(OpRotateLeft8)
35739 v.AddArg2(x, y)
35740 return true
35741 }
35742 break
35743 }
35744
35745
35746
35747 for {
35748 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
35749 left := v_0
35750 if left.Op != OpLsh8x32 {
35751 continue
35752 }
35753 y := left.Args[1]
35754 x := left.Args[0]
35755 right := v_1
35756 if right.Op != OpRsh8Ux32 {
35757 continue
35758 }
35759 _ = right.Args[1]
35760 if x != right.Args[0] {
35761 continue
35762 }
35763 right_1 := right.Args[1]
35764 if right_1.Op != OpSub32 {
35765 continue
35766 }
35767 _ = right_1.Args[1]
35768 right_1_0 := right_1.Args[0]
35769 if right_1_0.Op != OpConst32 || auxIntToInt32(right_1_0.AuxInt) != 8 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 8)) {
35770 continue
35771 }
35772 v.reset(OpRotateLeft8)
35773 v.AddArg2(x, y)
35774 return true
35775 }
35776 break
35777 }
35778
35779
35780
35781 for {
35782 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
35783 left := v_0
35784 if left.Op != OpLsh8x16 {
35785 continue
35786 }
35787 y := left.Args[1]
35788 x := left.Args[0]
35789 right := v_1
35790 if right.Op != OpRsh8Ux16 {
35791 continue
35792 }
35793 _ = right.Args[1]
35794 if x != right.Args[0] {
35795 continue
35796 }
35797 right_1 := right.Args[1]
35798 if right_1.Op != OpSub16 {
35799 continue
35800 }
35801 _ = right_1.Args[1]
35802 right_1_0 := right_1.Args[0]
35803 if right_1_0.Op != OpConst16 || auxIntToInt16(right_1_0.AuxInt) != 8 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 8)) {
35804 continue
35805 }
35806 v.reset(OpRotateLeft8)
35807 v.AddArg2(x, y)
35808 return true
35809 }
35810 break
35811 }
35812
35813
35814
35815 for {
35816 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
35817 left := v_0
35818 if left.Op != OpLsh8x8 {
35819 continue
35820 }
35821 y := left.Args[1]
35822 x := left.Args[0]
35823 right := v_1
35824 if right.Op != OpRsh8Ux8 {
35825 continue
35826 }
35827 _ = right.Args[1]
35828 if x != right.Args[0] {
35829 continue
35830 }
35831 right_1 := right.Args[1]
35832 if right_1.Op != OpSub8 {
35833 continue
35834 }
35835 _ = right_1.Args[1]
35836 right_1_0 := right_1.Args[0]
35837 if right_1_0.Op != OpConst8 || auxIntToInt8(right_1_0.AuxInt) != 8 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 8)) {
35838 continue
35839 }
35840 v.reset(OpRotateLeft8)
35841 v.AddArg2(x, y)
35842 return true
35843 }
35844 break
35845 }
35846
35847
35848
35849 for {
35850 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
35851 right := v_0
35852 if right.Op != OpRsh8Ux64 {
35853 continue
35854 }
35855 y := right.Args[1]
35856 x := right.Args[0]
35857 left := v_1
35858 if left.Op != OpLsh8x64 {
35859 continue
35860 }
35861 _ = left.Args[1]
35862 if x != left.Args[0] {
35863 continue
35864 }
35865 z := left.Args[1]
35866 if z.Op != OpSub64 {
35867 continue
35868 }
35869 _ = z.Args[1]
35870 z_0 := z.Args[0]
35871 if z_0.Op != OpConst64 || auxIntToInt64(z_0.AuxInt) != 8 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 8)) {
35872 continue
35873 }
35874 v.reset(OpRotateLeft8)
35875 v.AddArg2(x, z)
35876 return true
35877 }
35878 break
35879 }
35880
35881
35882
35883 for {
35884 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
35885 right := v_0
35886 if right.Op != OpRsh8Ux32 {
35887 continue
35888 }
35889 y := right.Args[1]
35890 x := right.Args[0]
35891 left := v_1
35892 if left.Op != OpLsh8x32 {
35893 continue
35894 }
35895 _ = left.Args[1]
35896 if x != left.Args[0] {
35897 continue
35898 }
35899 z := left.Args[1]
35900 if z.Op != OpSub32 {
35901 continue
35902 }
35903 _ = z.Args[1]
35904 z_0 := z.Args[0]
35905 if z_0.Op != OpConst32 || auxIntToInt32(z_0.AuxInt) != 8 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 8)) {
35906 continue
35907 }
35908 v.reset(OpRotateLeft8)
35909 v.AddArg2(x, z)
35910 return true
35911 }
35912 break
35913 }
35914
35915
35916
35917 for {
35918 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
35919 right := v_0
35920 if right.Op != OpRsh8Ux16 {
35921 continue
35922 }
35923 y := right.Args[1]
35924 x := right.Args[0]
35925 left := v_1
35926 if left.Op != OpLsh8x16 {
35927 continue
35928 }
35929 _ = left.Args[1]
35930 if x != left.Args[0] {
35931 continue
35932 }
35933 z := left.Args[1]
35934 if z.Op != OpSub16 {
35935 continue
35936 }
35937 _ = z.Args[1]
35938 z_0 := z.Args[0]
35939 if z_0.Op != OpConst16 || auxIntToInt16(z_0.AuxInt) != 8 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 8)) {
35940 continue
35941 }
35942 v.reset(OpRotateLeft8)
35943 v.AddArg2(x, z)
35944 return true
35945 }
35946 break
35947 }
35948
35949
35950
35951 for {
35952 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
35953 right := v_0
35954 if right.Op != OpRsh8Ux8 {
35955 continue
35956 }
35957 y := right.Args[1]
35958 x := right.Args[0]
35959 left := v_1
35960 if left.Op != OpLsh8x8 {
35961 continue
35962 }
35963 _ = left.Args[1]
35964 if x != left.Args[0] {
35965 continue
35966 }
35967 z := left.Args[1]
35968 if z.Op != OpSub8 {
35969 continue
35970 }
35971 _ = z.Args[1]
35972 z_0 := z.Args[0]
35973 if z_0.Op != OpConst8 || auxIntToInt8(z_0.AuxInt) != 8 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 8)) {
35974 continue
35975 }
35976 v.reset(OpRotateLeft8)
35977 v.AddArg2(x, z)
35978 return true
35979 }
35980 break
35981 }
35982 return false
35983 }
35984 func rewriteValuegeneric_OpZero(v *Value) bool {
35985 v_1 := v.Args[1]
35986 v_0 := v.Args[0]
35987 b := v.Block
35988
35989
35990
35991 for {
35992 if v_0.Op != OpSelectN || auxIntToInt64(v_0.AuxInt) != 0 {
35993 break
35994 }
35995 call := v_0.Args[0]
35996 if call.Op != OpStaticLECall || len(call.Args) != 2 {
35997 break
35998 }
35999 mem := v_1
36000 if mem.Op != OpSelectN || auxIntToInt64(mem.AuxInt) != 1 || call != mem.Args[0] || !(isSameCall(call.Aux, "runtime.newobject")) {
36001 break
36002 }
36003 v.copyOf(mem)
36004 return true
36005 }
36006
36007
36008
36009 for {
36010 n := auxIntToInt64(v.AuxInt)
36011 t1 := auxToType(v.Aux)
36012 p1 := v_0
36013 store := v_1
36014 if store.Op != OpStore {
36015 break
36016 }
36017 t2 := auxToType(store.Aux)
36018 mem := store.Args[2]
36019 store_0 := store.Args[0]
36020 if store_0.Op != OpOffPtr {
36021 break
36022 }
36023 o2 := auxIntToInt64(store_0.AuxInt)
36024 p2 := store_0.Args[0]
36025 if !(isSamePtr(p1, p2) && store.Uses == 1 && n >= o2+t2.Size() && clobber(store)) {
36026 break
36027 }
36028 v.reset(OpZero)
36029 v.AuxInt = int64ToAuxInt(n)
36030 v.Aux = typeToAux(t1)
36031 v.AddArg2(p1, mem)
36032 return true
36033 }
36034
36035
36036
36037 for {
36038 n := auxIntToInt64(v.AuxInt)
36039 t := auxToType(v.Aux)
36040 dst1 := v_0
36041 move := v_1
36042 if move.Op != OpMove || auxIntToInt64(move.AuxInt) != n || auxToType(move.Aux) != t {
36043 break
36044 }
36045 mem := move.Args[2]
36046 dst2 := move.Args[0]
36047 if !(move.Uses == 1 && isSamePtr(dst1, dst2) && clobber(move)) {
36048 break
36049 }
36050 v.reset(OpZero)
36051 v.AuxInt = int64ToAuxInt(n)
36052 v.Aux = typeToAux(t)
36053 v.AddArg2(dst1, mem)
36054 return true
36055 }
36056
36057
36058
36059 for {
36060 n := auxIntToInt64(v.AuxInt)
36061 t := auxToType(v.Aux)
36062 dst1 := v_0
36063 vardef := v_1
36064 if vardef.Op != OpVarDef {
36065 break
36066 }
36067 x := auxToSym(vardef.Aux)
36068 move := vardef.Args[0]
36069 if move.Op != OpMove || auxIntToInt64(move.AuxInt) != n || auxToType(move.Aux) != t {
36070 break
36071 }
36072 mem := move.Args[2]
36073 dst2 := move.Args[0]
36074 if !(move.Uses == 1 && vardef.Uses == 1 && isSamePtr(dst1, dst2) && clobber(move, vardef)) {
36075 break
36076 }
36077 v.reset(OpZero)
36078 v.AuxInt = int64ToAuxInt(n)
36079 v.Aux = typeToAux(t)
36080 v0 := b.NewValue0(v.Pos, OpVarDef, types.TypeMem)
36081 v0.Aux = symToAux(x)
36082 v0.AddArg(mem)
36083 v.AddArg2(dst1, v0)
36084 return true
36085 }
36086
36087
36088
36089 for {
36090 s := auxIntToInt64(v.AuxInt)
36091 t := auxToType(v.Aux)
36092 dst1 := v_0
36093 zero := v_1
36094 if zero.Op != OpZero || auxIntToInt64(zero.AuxInt) != s || auxToType(zero.Aux) != t {
36095 break
36096 }
36097 dst2 := zero.Args[0]
36098 if !(isSamePtr(dst1, dst2)) {
36099 break
36100 }
36101 v.copyOf(zero)
36102 return true
36103 }
36104
36105
36106
36107 for {
36108 s := auxIntToInt64(v.AuxInt)
36109 t := auxToType(v.Aux)
36110 dst1 := v_0
36111 vardef := v_1
36112 if vardef.Op != OpVarDef {
36113 break
36114 }
36115 vardef_0 := vardef.Args[0]
36116 if vardef_0.Op != OpZero || auxIntToInt64(vardef_0.AuxInt) != s || auxToType(vardef_0.Aux) != t {
36117 break
36118 }
36119 dst2 := vardef_0.Args[0]
36120 if !(isSamePtr(dst1, dst2)) {
36121 break
36122 }
36123 v.copyOf(vardef)
36124 return true
36125 }
36126 return false
36127 }
36128 func rewriteValuegeneric_OpZeroExt16to32(v *Value) bool {
36129 v_0 := v.Args[0]
36130
36131
36132 for {
36133 if v_0.Op != OpConst16 {
36134 break
36135 }
36136 c := auxIntToInt16(v_0.AuxInt)
36137 v.reset(OpConst32)
36138 v.AuxInt = int32ToAuxInt(int32(uint16(c)))
36139 return true
36140 }
36141
36142
36143
36144 for {
36145 if v_0.Op != OpTrunc32to16 {
36146 break
36147 }
36148 x := v_0.Args[0]
36149 if x.Op != OpRsh32Ux64 {
36150 break
36151 }
36152 _ = x.Args[1]
36153 x_1 := x.Args[1]
36154 if x_1.Op != OpConst64 {
36155 break
36156 }
36157 s := auxIntToInt64(x_1.AuxInt)
36158 if !(s >= 16) {
36159 break
36160 }
36161 v.copyOf(x)
36162 return true
36163 }
36164 return false
36165 }
36166 func rewriteValuegeneric_OpZeroExt16to64(v *Value) bool {
36167 v_0 := v.Args[0]
36168
36169
36170 for {
36171 if v_0.Op != OpConst16 {
36172 break
36173 }
36174 c := auxIntToInt16(v_0.AuxInt)
36175 v.reset(OpConst64)
36176 v.AuxInt = int64ToAuxInt(int64(uint16(c)))
36177 return true
36178 }
36179
36180
36181
36182 for {
36183 if v_0.Op != OpTrunc64to16 {
36184 break
36185 }
36186 x := v_0.Args[0]
36187 if x.Op != OpRsh64Ux64 {
36188 break
36189 }
36190 _ = x.Args[1]
36191 x_1 := x.Args[1]
36192 if x_1.Op != OpConst64 {
36193 break
36194 }
36195 s := auxIntToInt64(x_1.AuxInt)
36196 if !(s >= 48) {
36197 break
36198 }
36199 v.copyOf(x)
36200 return true
36201 }
36202 return false
36203 }
36204 func rewriteValuegeneric_OpZeroExt32to64(v *Value) bool {
36205 v_0 := v.Args[0]
36206
36207
36208 for {
36209 if v_0.Op != OpConst32 {
36210 break
36211 }
36212 c := auxIntToInt32(v_0.AuxInt)
36213 v.reset(OpConst64)
36214 v.AuxInt = int64ToAuxInt(int64(uint32(c)))
36215 return true
36216 }
36217
36218
36219
36220 for {
36221 if v_0.Op != OpTrunc64to32 {
36222 break
36223 }
36224 x := v_0.Args[0]
36225 if x.Op != OpRsh64Ux64 {
36226 break
36227 }
36228 _ = x.Args[1]
36229 x_1 := x.Args[1]
36230 if x_1.Op != OpConst64 {
36231 break
36232 }
36233 s := auxIntToInt64(x_1.AuxInt)
36234 if !(s >= 32) {
36235 break
36236 }
36237 v.copyOf(x)
36238 return true
36239 }
36240 return false
36241 }
36242 func rewriteValuegeneric_OpZeroExt8to16(v *Value) bool {
36243 v_0 := v.Args[0]
36244
36245
36246 for {
36247 if v_0.Op != OpConst8 {
36248 break
36249 }
36250 c := auxIntToInt8(v_0.AuxInt)
36251 v.reset(OpConst16)
36252 v.AuxInt = int16ToAuxInt(int16(uint8(c)))
36253 return true
36254 }
36255
36256
36257
36258 for {
36259 if v_0.Op != OpTrunc16to8 {
36260 break
36261 }
36262 x := v_0.Args[0]
36263 if x.Op != OpRsh16Ux64 {
36264 break
36265 }
36266 _ = x.Args[1]
36267 x_1 := x.Args[1]
36268 if x_1.Op != OpConst64 {
36269 break
36270 }
36271 s := auxIntToInt64(x_1.AuxInt)
36272 if !(s >= 8) {
36273 break
36274 }
36275 v.copyOf(x)
36276 return true
36277 }
36278 return false
36279 }
36280 func rewriteValuegeneric_OpZeroExt8to32(v *Value) bool {
36281 v_0 := v.Args[0]
36282
36283
36284 for {
36285 if v_0.Op != OpConst8 {
36286 break
36287 }
36288 c := auxIntToInt8(v_0.AuxInt)
36289 v.reset(OpConst32)
36290 v.AuxInt = int32ToAuxInt(int32(uint8(c)))
36291 return true
36292 }
36293
36294
36295
36296 for {
36297 if v_0.Op != OpTrunc32to8 {
36298 break
36299 }
36300 x := v_0.Args[0]
36301 if x.Op != OpRsh32Ux64 {
36302 break
36303 }
36304 _ = x.Args[1]
36305 x_1 := x.Args[1]
36306 if x_1.Op != OpConst64 {
36307 break
36308 }
36309 s := auxIntToInt64(x_1.AuxInt)
36310 if !(s >= 24) {
36311 break
36312 }
36313 v.copyOf(x)
36314 return true
36315 }
36316 return false
36317 }
36318 func rewriteValuegeneric_OpZeroExt8to64(v *Value) bool {
36319 v_0 := v.Args[0]
36320
36321
36322 for {
36323 if v_0.Op != OpConst8 {
36324 break
36325 }
36326 c := auxIntToInt8(v_0.AuxInt)
36327 v.reset(OpConst64)
36328 v.AuxInt = int64ToAuxInt(int64(uint8(c)))
36329 return true
36330 }
36331
36332
36333
36334 for {
36335 if v_0.Op != OpTrunc64to8 {
36336 break
36337 }
36338 x := v_0.Args[0]
36339 if x.Op != OpRsh64Ux64 {
36340 break
36341 }
36342 _ = x.Args[1]
36343 x_1 := x.Args[1]
36344 if x_1.Op != OpConst64 {
36345 break
36346 }
36347 s := auxIntToInt64(x_1.AuxInt)
36348 if !(s >= 56) {
36349 break
36350 }
36351 v.copyOf(x)
36352 return true
36353 }
36354 return false
36355 }
36356 func rewriteBlockgeneric(b *Block) bool {
36357 switch b.Kind {
36358 case BlockIf:
36359
36360
36361 for b.Controls[0].Op == OpNot {
36362 v_0 := b.Controls[0]
36363 cond := v_0.Args[0]
36364 b.resetWithControl(BlockIf, cond)
36365 b.swapSuccessors()
36366 return true
36367 }
36368
36369
36370
36371 for b.Controls[0].Op == OpConstBool {
36372 v_0 := b.Controls[0]
36373 c := auxIntToBool(v_0.AuxInt)
36374 if !(c) {
36375 break
36376 }
36377 b.Reset(BlockFirst)
36378 return true
36379 }
36380
36381
36382
36383 for b.Controls[0].Op == OpConstBool {
36384 v_0 := b.Controls[0]
36385 c := auxIntToBool(v_0.AuxInt)
36386 if !(!c) {
36387 break
36388 }
36389 b.Reset(BlockFirst)
36390 b.swapSuccessors()
36391 return true
36392 }
36393 }
36394 return false
36395 }
36396
View as plain text