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 for {
5728 x := v_0
5729 if x != v_1 {
5730 break
5731 }
5732 v.copyOf(x)
5733 return true
5734 }
5735
5736
5737
5738 for {
5739 if v_0.Op != OpAdd8 {
5740 break
5741 }
5742 t := v_0.Type
5743 _ = v_0.Args[1]
5744 v_0_0 := v_0.Args[0]
5745 v_0_1 := v_0.Args[1]
5746 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
5747 x := v_0_0
5748 if v_0_1.Op != OpConst8 || auxIntToInt8(v_0_1.AuxInt) != 1 || x != v_1 {
5749 continue
5750 }
5751 bool := v_2
5752 if !(config.arch != "arm64") {
5753 continue
5754 }
5755 v.reset(OpAdd8)
5756 v0 := b.NewValue0(v.Pos, OpCvtBoolToUint8, t)
5757 v0.AddArg(bool)
5758 v.AddArg2(x, v0)
5759 return true
5760 }
5761 break
5762 }
5763
5764
5765
5766 for {
5767 if v_0.Op != OpAdd64 {
5768 break
5769 }
5770 t := v_0.Type
5771 _ = v_0.Args[1]
5772 v_0_0 := v_0.Args[0]
5773 v_0_1 := v_0.Args[1]
5774 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
5775 x := v_0_0
5776 if v_0_1.Op != OpConst64 || auxIntToInt64(v_0_1.AuxInt) != 1 || x != v_1 {
5777 continue
5778 }
5779 bool := v_2
5780 if !(config.arch != "arm64") {
5781 continue
5782 }
5783 v.reset(OpAdd64)
5784 v0 := b.NewValue0(v.Pos, OpZeroExt8to64, t)
5785 v1 := b.NewValue0(v.Pos, OpCvtBoolToUint8, types.Types[types.TUINT8])
5786 v1.AddArg(bool)
5787 v0.AddArg(v1)
5788 v.AddArg2(x, v0)
5789 return true
5790 }
5791 break
5792 }
5793
5794
5795
5796 for {
5797 if v_0.Op != OpAdd32 {
5798 break
5799 }
5800 t := v_0.Type
5801 _ = v_0.Args[1]
5802 v_0_0 := v_0.Args[0]
5803 v_0_1 := v_0.Args[1]
5804 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
5805 x := v_0_0
5806 if v_0_1.Op != OpConst32 || auxIntToInt32(v_0_1.AuxInt) != 1 || x != v_1 {
5807 continue
5808 }
5809 bool := v_2
5810 if !(config.arch != "arm64") {
5811 continue
5812 }
5813 v.reset(OpAdd32)
5814 v0 := b.NewValue0(v.Pos, OpZeroExt8to32, t)
5815 v1 := b.NewValue0(v.Pos, OpCvtBoolToUint8, types.Types[types.TUINT8])
5816 v1.AddArg(bool)
5817 v0.AddArg(v1)
5818 v.AddArg2(x, v0)
5819 return true
5820 }
5821 break
5822 }
5823
5824
5825
5826 for {
5827 if v_0.Op != OpAdd16 {
5828 break
5829 }
5830 t := v_0.Type
5831 _ = v_0.Args[1]
5832 v_0_0 := v_0.Args[0]
5833 v_0_1 := v_0.Args[1]
5834 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
5835 x := v_0_0
5836 if v_0_1.Op != OpConst16 || auxIntToInt16(v_0_1.AuxInt) != 1 || x != v_1 {
5837 continue
5838 }
5839 bool := v_2
5840 if !(config.arch != "arm64") {
5841 continue
5842 }
5843 v.reset(OpAdd16)
5844 v0 := b.NewValue0(v.Pos, OpZeroExt8to16, t)
5845 v1 := b.NewValue0(v.Pos, OpCvtBoolToUint8, types.Types[types.TUINT8])
5846 v1.AddArg(bool)
5847 v0.AddArg(v1)
5848 v.AddArg2(x, v0)
5849 return true
5850 }
5851 break
5852 }
5853
5854
5855 for {
5856 if v_0.Op != OpAdd8 {
5857 break
5858 }
5859 t := v_0.Type
5860 _ = v_0.Args[1]
5861 v_0_0 := v_0.Args[0]
5862 v_0_1 := v_0.Args[1]
5863 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
5864 x := v_0_0
5865 if v_0_1.Op != OpConst8 || auxIntToInt8(v_0_1.AuxInt) != -1 || x != v_1 {
5866 continue
5867 }
5868 bool := v_2
5869 v.reset(OpSub8)
5870 v0 := b.NewValue0(v.Pos, OpCvtBoolToUint8, t)
5871 v0.AddArg(bool)
5872 v.AddArg2(x, v0)
5873 return true
5874 }
5875 break
5876 }
5877
5878
5879 for {
5880 if v_0.Op != OpAdd64 {
5881 break
5882 }
5883 t := v_0.Type
5884 _ = v_0.Args[1]
5885 v_0_0 := v_0.Args[0]
5886 v_0_1 := v_0.Args[1]
5887 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
5888 x := v_0_0
5889 if v_0_1.Op != OpConst64 || auxIntToInt64(v_0_1.AuxInt) != -1 || x != v_1 {
5890 continue
5891 }
5892 bool := v_2
5893 v.reset(OpSub64)
5894 v0 := b.NewValue0(v.Pos, OpZeroExt8to64, t)
5895 v1 := b.NewValue0(v.Pos, OpCvtBoolToUint8, types.Types[types.TUINT8])
5896 v1.AddArg(bool)
5897 v0.AddArg(v1)
5898 v.AddArg2(x, v0)
5899 return true
5900 }
5901 break
5902 }
5903
5904
5905 for {
5906 if v_0.Op != OpAdd32 {
5907 break
5908 }
5909 t := v_0.Type
5910 _ = v_0.Args[1]
5911 v_0_0 := v_0.Args[0]
5912 v_0_1 := v_0.Args[1]
5913 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
5914 x := v_0_0
5915 if v_0_1.Op != OpConst32 || auxIntToInt32(v_0_1.AuxInt) != -1 || x != v_1 {
5916 continue
5917 }
5918 bool := v_2
5919 v.reset(OpSub32)
5920 v0 := b.NewValue0(v.Pos, OpZeroExt8to32, t)
5921 v1 := b.NewValue0(v.Pos, OpCvtBoolToUint8, types.Types[types.TUINT8])
5922 v1.AddArg(bool)
5923 v0.AddArg(v1)
5924 v.AddArg2(x, v0)
5925 return true
5926 }
5927 break
5928 }
5929
5930
5931 for {
5932 if v_0.Op != OpAdd16 {
5933 break
5934 }
5935 t := v_0.Type
5936 _ = v_0.Args[1]
5937 v_0_0 := v_0.Args[0]
5938 v_0_1 := v_0.Args[1]
5939 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
5940 x := v_0_0
5941 if v_0_1.Op != OpConst16 || auxIntToInt16(v_0_1.AuxInt) != -1 || x != v_1 {
5942 continue
5943 }
5944 bool := v_2
5945 v.reset(OpSub16)
5946 v0 := b.NewValue0(v.Pos, OpZeroExt8to16, t)
5947 v1 := b.NewValue0(v.Pos, OpCvtBoolToUint8, types.Types[types.TUINT8])
5948 v1.AddArg(bool)
5949 v0.AddArg(v1)
5950 v.AddArg2(x, v0)
5951 return true
5952 }
5953 break
5954 }
5955
5956
5957 for {
5958 if v_0.Op != OpLsh64x64 {
5959 break
5960 }
5961 _ = v_0.Args[1]
5962 x := v_0.Args[0]
5963 v_0_1 := v_0.Args[1]
5964 if v_0_1.Op != OpConst64 || auxIntToInt64(v_0_1.AuxInt) != 1 || x != v_1 {
5965 break
5966 }
5967 bool := v_2
5968 v.reset(OpLsh64x8)
5969 v.AuxInt = boolToAuxInt(true)
5970 v0 := b.NewValue0(v.Pos, OpCvtBoolToUint8, types.Types[types.TUINT8])
5971 v0.AddArg(bool)
5972 v.AddArg2(x, v0)
5973 return true
5974 }
5975
5976
5977 for {
5978 if v_0.Op != OpLsh32x64 {
5979 break
5980 }
5981 _ = v_0.Args[1]
5982 x := v_0.Args[0]
5983 v_0_1 := v_0.Args[1]
5984 if v_0_1.Op != OpConst64 || auxIntToInt64(v_0_1.AuxInt) != 1 || x != v_1 {
5985 break
5986 }
5987 bool := v_2
5988 v.reset(OpLsh32x8)
5989 v.AuxInt = boolToAuxInt(true)
5990 v0 := b.NewValue0(v.Pos, OpCvtBoolToUint8, types.Types[types.TUINT8])
5991 v0.AddArg(bool)
5992 v.AddArg2(x, v0)
5993 return true
5994 }
5995
5996
5997 for {
5998 if v_0.Op != OpLsh16x64 {
5999 break
6000 }
6001 _ = v_0.Args[1]
6002 x := v_0.Args[0]
6003 v_0_1 := v_0.Args[1]
6004 if v_0_1.Op != OpConst64 || auxIntToInt64(v_0_1.AuxInt) != 1 || x != v_1 {
6005 break
6006 }
6007 bool := v_2
6008 v.reset(OpLsh16x8)
6009 v.AuxInt = boolToAuxInt(true)
6010 v0 := b.NewValue0(v.Pos, OpCvtBoolToUint8, types.Types[types.TUINT8])
6011 v0.AddArg(bool)
6012 v.AddArg2(x, v0)
6013 return true
6014 }
6015
6016
6017 for {
6018 if v_0.Op != OpLsh8x64 {
6019 break
6020 }
6021 _ = v_0.Args[1]
6022 x := v_0.Args[0]
6023 v_0_1 := v_0.Args[1]
6024 if v_0_1.Op != OpConst64 || auxIntToInt64(v_0_1.AuxInt) != 1 || x != v_1 {
6025 break
6026 }
6027 bool := v_2
6028 v.reset(OpLsh8x8)
6029 v.AuxInt = boolToAuxInt(true)
6030 v0 := b.NewValue0(v.Pos, OpCvtBoolToUint8, types.Types[types.TUINT8])
6031 v0.AddArg(bool)
6032 v.AddArg2(x, v0)
6033 return true
6034 }
6035
6036
6037 for {
6038 if v_0.Op != OpRsh64x64 {
6039 break
6040 }
6041 _ = v_0.Args[1]
6042 x := v_0.Args[0]
6043 v_0_1 := v_0.Args[1]
6044 if v_0_1.Op != OpConst64 || auxIntToInt64(v_0_1.AuxInt) != 1 || x != v_1 {
6045 break
6046 }
6047 bool := v_2
6048 v.reset(OpRsh64x8)
6049 v.AuxInt = boolToAuxInt(true)
6050 v0 := b.NewValue0(v.Pos, OpCvtBoolToUint8, types.Types[types.TUINT8])
6051 v0.AddArg(bool)
6052 v.AddArg2(x, v0)
6053 return true
6054 }
6055
6056
6057 for {
6058 if v_0.Op != OpRsh32x64 {
6059 break
6060 }
6061 _ = v_0.Args[1]
6062 x := v_0.Args[0]
6063 v_0_1 := v_0.Args[1]
6064 if v_0_1.Op != OpConst64 || auxIntToInt64(v_0_1.AuxInt) != 1 || x != v_1 {
6065 break
6066 }
6067 bool := v_2
6068 v.reset(OpRsh32x8)
6069 v.AuxInt = boolToAuxInt(true)
6070 v0 := b.NewValue0(v.Pos, OpCvtBoolToUint8, types.Types[types.TUINT8])
6071 v0.AddArg(bool)
6072 v.AddArg2(x, v0)
6073 return true
6074 }
6075
6076
6077 for {
6078 if v_0.Op != OpRsh16x64 {
6079 break
6080 }
6081 _ = v_0.Args[1]
6082 x := v_0.Args[0]
6083 v_0_1 := v_0.Args[1]
6084 if v_0_1.Op != OpConst64 || auxIntToInt64(v_0_1.AuxInt) != 1 || x != v_1 {
6085 break
6086 }
6087 bool := v_2
6088 v.reset(OpRsh16x8)
6089 v.AuxInt = boolToAuxInt(true)
6090 v0 := b.NewValue0(v.Pos, OpCvtBoolToUint8, types.Types[types.TUINT8])
6091 v0.AddArg(bool)
6092 v.AddArg2(x, v0)
6093 return true
6094 }
6095
6096
6097 for {
6098 if v_0.Op != OpRsh8x64 {
6099 break
6100 }
6101 _ = v_0.Args[1]
6102 x := v_0.Args[0]
6103 v_0_1 := v_0.Args[1]
6104 if v_0_1.Op != OpConst64 || auxIntToInt64(v_0_1.AuxInt) != 1 || x != v_1 {
6105 break
6106 }
6107 bool := v_2
6108 v.reset(OpRsh8x8)
6109 v.AuxInt = boolToAuxInt(true)
6110 v0 := b.NewValue0(v.Pos, OpCvtBoolToUint8, types.Types[types.TUINT8])
6111 v0.AddArg(bool)
6112 v.AddArg2(x, v0)
6113 return true
6114 }
6115
6116
6117 for {
6118 if v_0.Op != OpRsh64Ux64 {
6119 break
6120 }
6121 _ = v_0.Args[1]
6122 x := v_0.Args[0]
6123 v_0_1 := v_0.Args[1]
6124 if v_0_1.Op != OpConst64 || auxIntToInt64(v_0_1.AuxInt) != 1 || x != v_1 {
6125 break
6126 }
6127 bool := v_2
6128 v.reset(OpRsh64Ux8)
6129 v.AuxInt = boolToAuxInt(true)
6130 v0 := b.NewValue0(v.Pos, OpCvtBoolToUint8, types.Types[types.TUINT8])
6131 v0.AddArg(bool)
6132 v.AddArg2(x, v0)
6133 return true
6134 }
6135
6136
6137 for {
6138 if v_0.Op != OpRsh32Ux64 {
6139 break
6140 }
6141 _ = v_0.Args[1]
6142 x := v_0.Args[0]
6143 v_0_1 := v_0.Args[1]
6144 if v_0_1.Op != OpConst64 || auxIntToInt64(v_0_1.AuxInt) != 1 || x != v_1 {
6145 break
6146 }
6147 bool := v_2
6148 v.reset(OpRsh32Ux8)
6149 v.AuxInt = boolToAuxInt(true)
6150 v0 := b.NewValue0(v.Pos, OpCvtBoolToUint8, types.Types[types.TUINT8])
6151 v0.AddArg(bool)
6152 v.AddArg2(x, v0)
6153 return true
6154 }
6155
6156
6157 for {
6158 if v_0.Op != OpRsh16Ux64 {
6159 break
6160 }
6161 _ = v_0.Args[1]
6162 x := v_0.Args[0]
6163 v_0_1 := v_0.Args[1]
6164 if v_0_1.Op != OpConst64 || auxIntToInt64(v_0_1.AuxInt) != 1 || x != v_1 {
6165 break
6166 }
6167 bool := v_2
6168 v.reset(OpRsh16Ux8)
6169 v.AuxInt = boolToAuxInt(true)
6170 v0 := b.NewValue0(v.Pos, OpCvtBoolToUint8, types.Types[types.TUINT8])
6171 v0.AddArg(bool)
6172 v.AddArg2(x, v0)
6173 return true
6174 }
6175
6176
6177 for {
6178 if v_0.Op != OpRsh8Ux64 {
6179 break
6180 }
6181 _ = v_0.Args[1]
6182 x := v_0.Args[0]
6183 v_0_1 := v_0.Args[1]
6184 if v_0_1.Op != OpConst64 || auxIntToInt64(v_0_1.AuxInt) != 1 || x != v_1 {
6185 break
6186 }
6187 bool := v_2
6188 v.reset(OpRsh8Ux8)
6189 v.AuxInt = boolToAuxInt(true)
6190 v0 := b.NewValue0(v.Pos, OpCvtBoolToUint8, types.Types[types.TUINT8])
6191 v0.AddArg(bool)
6192 v.AddArg2(x, v0)
6193 return true
6194 }
6195 return false
6196 }
6197 func rewriteValuegeneric_OpConstInterface(v *Value) bool {
6198 b := v.Block
6199 typ := &b.Func.Config.Types
6200
6201
6202 for {
6203 v.reset(OpIMake)
6204 v0 := b.NewValue0(v.Pos, OpConstNil, typ.Uintptr)
6205 v1 := b.NewValue0(v.Pos, OpConstNil, typ.BytePtr)
6206 v.AddArg2(v0, v1)
6207 return true
6208 }
6209 }
6210 func rewriteValuegeneric_OpConstSlice(v *Value) bool {
6211 b := v.Block
6212 config := b.Func.Config
6213 typ := &b.Func.Config.Types
6214
6215
6216
6217 for {
6218 if !(config.PtrSize == 4) {
6219 break
6220 }
6221 v.reset(OpSliceMake)
6222 v0 := b.NewValue0(v.Pos, OpConstNil, v.Type.Elem().PtrTo())
6223 v1 := b.NewValue0(v.Pos, OpConst32, typ.Int)
6224 v1.AuxInt = int32ToAuxInt(0)
6225 v.AddArg3(v0, v1, v1)
6226 return true
6227 }
6228
6229
6230
6231 for {
6232 if !(config.PtrSize == 8) {
6233 break
6234 }
6235 v.reset(OpSliceMake)
6236 v0 := b.NewValue0(v.Pos, OpConstNil, v.Type.Elem().PtrTo())
6237 v1 := b.NewValue0(v.Pos, OpConst64, typ.Int)
6238 v1.AuxInt = int64ToAuxInt(0)
6239 v.AddArg3(v0, v1, v1)
6240 return true
6241 }
6242 return false
6243 }
6244 func rewriteValuegeneric_OpConstString(v *Value) bool {
6245 b := v.Block
6246 config := b.Func.Config
6247 fe := b.Func.fe
6248 typ := &b.Func.Config.Types
6249
6250
6251
6252 for {
6253 str := auxToString(v.Aux)
6254 if !(config.PtrSize == 4 && str == "") {
6255 break
6256 }
6257 v.reset(OpStringMake)
6258 v0 := b.NewValue0(v.Pos, OpConstNil, typ.BytePtr)
6259 v1 := b.NewValue0(v.Pos, OpConst32, typ.Int)
6260 v1.AuxInt = int32ToAuxInt(0)
6261 v.AddArg2(v0, v1)
6262 return true
6263 }
6264
6265
6266
6267 for {
6268 str := auxToString(v.Aux)
6269 if !(config.PtrSize == 8 && str == "") {
6270 break
6271 }
6272 v.reset(OpStringMake)
6273 v0 := b.NewValue0(v.Pos, OpConstNil, typ.BytePtr)
6274 v1 := b.NewValue0(v.Pos, OpConst64, typ.Int)
6275 v1.AuxInt = int64ToAuxInt(0)
6276 v.AddArg2(v0, v1)
6277 return true
6278 }
6279
6280
6281
6282 for {
6283 str := auxToString(v.Aux)
6284 if !(config.PtrSize == 4 && str != "") {
6285 break
6286 }
6287 v.reset(OpStringMake)
6288 v0 := b.NewValue0(v.Pos, OpAddr, typ.BytePtr)
6289 v0.Aux = symToAux(fe.StringData(str))
6290 v1 := b.NewValue0(v.Pos, OpSB, typ.Uintptr)
6291 v0.AddArg(v1)
6292 v2 := b.NewValue0(v.Pos, OpConst32, typ.Int)
6293 v2.AuxInt = int32ToAuxInt(int32(len(str)))
6294 v.AddArg2(v0, v2)
6295 return true
6296 }
6297
6298
6299
6300 for {
6301 str := auxToString(v.Aux)
6302 if !(config.PtrSize == 8 && str != "") {
6303 break
6304 }
6305 v.reset(OpStringMake)
6306 v0 := b.NewValue0(v.Pos, OpAddr, typ.BytePtr)
6307 v0.Aux = symToAux(fe.StringData(str))
6308 v1 := b.NewValue0(v.Pos, OpSB, typ.Uintptr)
6309 v0.AddArg(v1)
6310 v2 := b.NewValue0(v.Pos, OpConst64, typ.Int)
6311 v2.AuxInt = int64ToAuxInt(int64(len(str)))
6312 v.AddArg2(v0, v2)
6313 return true
6314 }
6315 return false
6316 }
6317 func rewriteValuegeneric_OpConvert(v *Value) bool {
6318 v_1 := v.Args[1]
6319 v_0 := v.Args[0]
6320 b := v.Block
6321
6322
6323 for {
6324 if v_0.Op != OpAdd64 {
6325 break
6326 }
6327 _ = v_0.Args[1]
6328 v_0_0 := v_0.Args[0]
6329 v_0_1 := v_0.Args[1]
6330 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
6331 if v_0_0.Op != OpConvert {
6332 continue
6333 }
6334 mem := v_0_0.Args[1]
6335 ptr := v_0_0.Args[0]
6336 off := v_0_1
6337 if mem != v_1 {
6338 continue
6339 }
6340 v.reset(OpAddPtr)
6341 v.AddArg2(ptr, off)
6342 return true
6343 }
6344 break
6345 }
6346
6347
6348 for {
6349 if v_0.Op != OpAdd32 {
6350 break
6351 }
6352 _ = v_0.Args[1]
6353 v_0_0 := v_0.Args[0]
6354 v_0_1 := v_0.Args[1]
6355 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
6356 if v_0_0.Op != OpConvert {
6357 continue
6358 }
6359 mem := v_0_0.Args[1]
6360 ptr := v_0_0.Args[0]
6361 off := v_0_1
6362 if mem != v_1 {
6363 continue
6364 }
6365 v.reset(OpAddPtr)
6366 v.AddArg2(ptr, off)
6367 return true
6368 }
6369 break
6370 }
6371
6372
6373 for {
6374 if v_0.Op != OpConvert {
6375 break
6376 }
6377 mem := v_0.Args[1]
6378 ptr := v_0.Args[0]
6379 if mem != v_1 {
6380 break
6381 }
6382 v.copyOf(ptr)
6383 return true
6384 }
6385
6386
6387 for {
6388 a := v_0
6389 if a.Op != OpAdd64 {
6390 break
6391 }
6392 _ = a.Args[1]
6393 a_0 := a.Args[0]
6394 a_1 := a.Args[1]
6395 for _i0 := 0; _i0 <= 1; _i0, a_0, a_1 = _i0+1, a_1, a_0 {
6396 if a_0.Op != OpAdd64 {
6397 continue
6398 }
6399 _ = a_0.Args[1]
6400 a_0_0 := a_0.Args[0]
6401 a_0_1 := a_0.Args[1]
6402 for _i1 := 0; _i1 <= 1; _i1, a_0_0, a_0_1 = _i1+1, a_0_1, a_0_0 {
6403 if a_0_0.Op != OpConvert {
6404 continue
6405 }
6406 mem := a_0_0.Args[1]
6407 ptr := a_0_0.Args[0]
6408 off1 := a_0_1
6409 off2 := a_1
6410 if mem != v_1 {
6411 continue
6412 }
6413 v.reset(OpAddPtr)
6414 v0 := b.NewValue0(v.Pos, OpAdd64, a.Type)
6415 v0.AddArg2(off1, off2)
6416 v.AddArg2(ptr, v0)
6417 return true
6418 }
6419 }
6420 break
6421 }
6422
6423
6424 for {
6425 a := v_0
6426 if a.Op != OpAdd32 {
6427 break
6428 }
6429 _ = a.Args[1]
6430 a_0 := a.Args[0]
6431 a_1 := a.Args[1]
6432 for _i0 := 0; _i0 <= 1; _i0, a_0, a_1 = _i0+1, a_1, a_0 {
6433 if a_0.Op != OpAdd32 {
6434 continue
6435 }
6436 _ = a_0.Args[1]
6437 a_0_0 := a_0.Args[0]
6438 a_0_1 := a_0.Args[1]
6439 for _i1 := 0; _i1 <= 1; _i1, a_0_0, a_0_1 = _i1+1, a_0_1, a_0_0 {
6440 if a_0_0.Op != OpConvert {
6441 continue
6442 }
6443 mem := a_0_0.Args[1]
6444 ptr := a_0_0.Args[0]
6445 off1 := a_0_1
6446 off2 := a_1
6447 if mem != v_1 {
6448 continue
6449 }
6450 v.reset(OpAddPtr)
6451 v0 := b.NewValue0(v.Pos, OpAdd32, a.Type)
6452 v0.AddArg2(off1, off2)
6453 v.AddArg2(ptr, v0)
6454 return true
6455 }
6456 }
6457 break
6458 }
6459 return false
6460 }
6461 func rewriteValuegeneric_OpCtz16(v *Value) bool {
6462 v_0 := v.Args[0]
6463 b := v.Block
6464 config := b.Func.Config
6465
6466
6467
6468 for {
6469 if v_0.Op != OpConst16 {
6470 break
6471 }
6472 c := auxIntToInt16(v_0.AuxInt)
6473 if !(config.PtrSize == 4) {
6474 break
6475 }
6476 v.reset(OpConst32)
6477 v.AuxInt = int32ToAuxInt(int32(ntz16(c)))
6478 return true
6479 }
6480
6481
6482
6483 for {
6484 if v_0.Op != OpConst16 {
6485 break
6486 }
6487 c := auxIntToInt16(v_0.AuxInt)
6488 if !(config.PtrSize == 8) {
6489 break
6490 }
6491 v.reset(OpConst64)
6492 v.AuxInt = int64ToAuxInt(int64(ntz16(c)))
6493 return true
6494 }
6495 return false
6496 }
6497 func rewriteValuegeneric_OpCtz32(v *Value) bool {
6498 v_0 := v.Args[0]
6499 b := v.Block
6500 config := b.Func.Config
6501
6502
6503
6504 for {
6505 if v_0.Op != OpConst32 {
6506 break
6507 }
6508 c := auxIntToInt32(v_0.AuxInt)
6509 if !(config.PtrSize == 4) {
6510 break
6511 }
6512 v.reset(OpConst32)
6513 v.AuxInt = int32ToAuxInt(int32(ntz32(c)))
6514 return true
6515 }
6516
6517
6518
6519 for {
6520 if v_0.Op != OpConst32 {
6521 break
6522 }
6523 c := auxIntToInt32(v_0.AuxInt)
6524 if !(config.PtrSize == 8) {
6525 break
6526 }
6527 v.reset(OpConst64)
6528 v.AuxInt = int64ToAuxInt(int64(ntz32(c)))
6529 return true
6530 }
6531 return false
6532 }
6533 func rewriteValuegeneric_OpCtz64(v *Value) bool {
6534 v_0 := v.Args[0]
6535 b := v.Block
6536 config := b.Func.Config
6537
6538
6539
6540 for {
6541 if v_0.Op != OpConst64 {
6542 break
6543 }
6544 c := auxIntToInt64(v_0.AuxInt)
6545 if !(config.PtrSize == 4) {
6546 break
6547 }
6548 v.reset(OpConst32)
6549 v.AuxInt = int32ToAuxInt(int32(ntz64(c)))
6550 return true
6551 }
6552
6553
6554
6555 for {
6556 if v_0.Op != OpConst64 {
6557 break
6558 }
6559 c := auxIntToInt64(v_0.AuxInt)
6560 if !(config.PtrSize == 8) {
6561 break
6562 }
6563 v.reset(OpConst64)
6564 v.AuxInt = int64ToAuxInt(int64(ntz64(c)))
6565 return true
6566 }
6567 return false
6568 }
6569 func rewriteValuegeneric_OpCtz8(v *Value) bool {
6570 v_0 := v.Args[0]
6571 b := v.Block
6572 config := b.Func.Config
6573
6574
6575
6576 for {
6577 if v_0.Op != OpConst8 {
6578 break
6579 }
6580 c := auxIntToInt8(v_0.AuxInt)
6581 if !(config.PtrSize == 4) {
6582 break
6583 }
6584 v.reset(OpConst32)
6585 v.AuxInt = int32ToAuxInt(int32(ntz8(c)))
6586 return true
6587 }
6588
6589
6590
6591 for {
6592 if v_0.Op != OpConst8 {
6593 break
6594 }
6595 c := auxIntToInt8(v_0.AuxInt)
6596 if !(config.PtrSize == 8) {
6597 break
6598 }
6599 v.reset(OpConst64)
6600 v.AuxInt = int64ToAuxInt(int64(ntz8(c)))
6601 return true
6602 }
6603 return false
6604 }
6605 func rewriteValuegeneric_OpCvt32Fto32(v *Value) bool {
6606 v_0 := v.Args[0]
6607
6608
6609 for {
6610 if v_0.Op != OpConst32F {
6611 break
6612 }
6613 c := auxIntToFloat32(v_0.AuxInt)
6614 v.reset(OpConst32)
6615 v.AuxInt = int32ToAuxInt(int32(c))
6616 return true
6617 }
6618 return false
6619 }
6620 func rewriteValuegeneric_OpCvt32Fto64(v *Value) bool {
6621 v_0 := v.Args[0]
6622
6623
6624 for {
6625 if v_0.Op != OpConst32F {
6626 break
6627 }
6628 c := auxIntToFloat32(v_0.AuxInt)
6629 v.reset(OpConst64)
6630 v.AuxInt = int64ToAuxInt(int64(c))
6631 return true
6632 }
6633 return false
6634 }
6635 func rewriteValuegeneric_OpCvt32Fto64F(v *Value) bool {
6636 v_0 := v.Args[0]
6637
6638
6639 for {
6640 if v_0.Op != OpConst32F {
6641 break
6642 }
6643 c := auxIntToFloat32(v_0.AuxInt)
6644 v.reset(OpConst64F)
6645 v.AuxInt = float64ToAuxInt(float64(c))
6646 return true
6647 }
6648 return false
6649 }
6650 func rewriteValuegeneric_OpCvt32to32F(v *Value) bool {
6651 v_0 := v.Args[0]
6652
6653
6654 for {
6655 if v_0.Op != OpConst32 {
6656 break
6657 }
6658 c := auxIntToInt32(v_0.AuxInt)
6659 v.reset(OpConst32F)
6660 v.AuxInt = float32ToAuxInt(float32(c))
6661 return true
6662 }
6663 return false
6664 }
6665 func rewriteValuegeneric_OpCvt32to64F(v *Value) bool {
6666 v_0 := v.Args[0]
6667
6668
6669 for {
6670 if v_0.Op != OpConst32 {
6671 break
6672 }
6673 c := auxIntToInt32(v_0.AuxInt)
6674 v.reset(OpConst64F)
6675 v.AuxInt = float64ToAuxInt(float64(c))
6676 return true
6677 }
6678 return false
6679 }
6680 func rewriteValuegeneric_OpCvt64Fto32(v *Value) bool {
6681 v_0 := v.Args[0]
6682
6683
6684 for {
6685 if v_0.Op != OpConst64F {
6686 break
6687 }
6688 c := auxIntToFloat64(v_0.AuxInt)
6689 v.reset(OpConst32)
6690 v.AuxInt = int32ToAuxInt(int32(c))
6691 return true
6692 }
6693 return false
6694 }
6695 func rewriteValuegeneric_OpCvt64Fto32F(v *Value) bool {
6696 v_0 := v.Args[0]
6697
6698
6699 for {
6700 if v_0.Op != OpConst64F {
6701 break
6702 }
6703 c := auxIntToFloat64(v_0.AuxInt)
6704 v.reset(OpConst32F)
6705 v.AuxInt = float32ToAuxInt(float32(c))
6706 return true
6707 }
6708
6709
6710
6711 for {
6712 sqrt0 := v_0
6713 if sqrt0.Op != OpSqrt {
6714 break
6715 }
6716 sqrt0_0 := sqrt0.Args[0]
6717 if sqrt0_0.Op != OpCvt32Fto64F {
6718 break
6719 }
6720 x := sqrt0_0.Args[0]
6721 if !(sqrt0.Uses == 1) {
6722 break
6723 }
6724 v.reset(OpSqrt32)
6725 v.AddArg(x)
6726 return true
6727 }
6728 return false
6729 }
6730 func rewriteValuegeneric_OpCvt64Fto64(v *Value) bool {
6731 v_0 := v.Args[0]
6732
6733
6734 for {
6735 if v_0.Op != OpConst64F {
6736 break
6737 }
6738 c := auxIntToFloat64(v_0.AuxInt)
6739 v.reset(OpConst64)
6740 v.AuxInt = int64ToAuxInt(int64(c))
6741 return true
6742 }
6743 return false
6744 }
6745 func rewriteValuegeneric_OpCvt64to32F(v *Value) bool {
6746 v_0 := v.Args[0]
6747
6748
6749 for {
6750 if v_0.Op != OpConst64 {
6751 break
6752 }
6753 c := auxIntToInt64(v_0.AuxInt)
6754 v.reset(OpConst32F)
6755 v.AuxInt = float32ToAuxInt(float32(c))
6756 return true
6757 }
6758 return false
6759 }
6760 func rewriteValuegeneric_OpCvt64to64F(v *Value) bool {
6761 v_0 := v.Args[0]
6762
6763
6764 for {
6765 if v_0.Op != OpConst64 {
6766 break
6767 }
6768 c := auxIntToInt64(v_0.AuxInt)
6769 v.reset(OpConst64F)
6770 v.AuxInt = float64ToAuxInt(float64(c))
6771 return true
6772 }
6773 return false
6774 }
6775 func rewriteValuegeneric_OpCvtBoolToUint8(v *Value) bool {
6776 v_0 := v.Args[0]
6777
6778
6779 for {
6780 if v_0.Op != OpConstBool || auxIntToBool(v_0.AuxInt) != false {
6781 break
6782 }
6783 v.reset(OpConst8)
6784 v.AuxInt = int8ToAuxInt(0)
6785 return true
6786 }
6787
6788
6789 for {
6790 if v_0.Op != OpConstBool || auxIntToBool(v_0.AuxInt) != true {
6791 break
6792 }
6793 v.reset(OpConst8)
6794 v.AuxInt = int8ToAuxInt(1)
6795 return true
6796 }
6797 return false
6798 }
6799 func rewriteValuegeneric_OpDiv128u(v *Value) bool {
6800 v_2 := v.Args[2]
6801 v_1 := v.Args[1]
6802 v_0 := v.Args[0]
6803 b := v.Block
6804
6805
6806 for {
6807 t := v.Type
6808 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
6809 break
6810 }
6811 lo := v_1
6812 y := v_2
6813 v.reset(OpMakeTuple)
6814 v0 := b.NewValue0(v.Pos, OpDiv64u, t.FieldType(0))
6815 v0.AddArg2(lo, y)
6816 v1 := b.NewValue0(v.Pos, OpMod64u, t.FieldType(1))
6817 v1.AddArg2(lo, y)
6818 v.AddArg2(v0, v1)
6819 return true
6820 }
6821 return false
6822 }
6823 func rewriteValuegeneric_OpDiv16(v *Value) bool {
6824 v_1 := v.Args[1]
6825 v_0 := v.Args[0]
6826 b := v.Block
6827 typ := &b.Func.Config.Types
6828
6829
6830
6831 for {
6832 if v_0.Op != OpConst16 {
6833 break
6834 }
6835 c := auxIntToInt16(v_0.AuxInt)
6836 if v_1.Op != OpConst16 {
6837 break
6838 }
6839 d := auxIntToInt16(v_1.AuxInt)
6840 if !(d != 0) {
6841 break
6842 }
6843 v.reset(OpConst16)
6844 v.AuxInt = int16ToAuxInt(c / d)
6845 return true
6846 }
6847
6848
6849
6850 for {
6851 n := v_0
6852 if v_1.Op != OpConst16 {
6853 break
6854 }
6855 c := auxIntToInt16(v_1.AuxInt)
6856 if !(isNonNegative(n) && isPowerOfTwo(c)) {
6857 break
6858 }
6859 v.reset(OpRsh16Ux64)
6860 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
6861 v0.AuxInt = int64ToAuxInt(log16(c))
6862 v.AddArg2(n, v0)
6863 return true
6864 }
6865
6866
6867
6868 for {
6869 t := v.Type
6870 n := v_0
6871 if v_1.Op != OpConst16 {
6872 break
6873 }
6874 c := auxIntToInt16(v_1.AuxInt)
6875 if !(c < 0 && c != -1<<15) {
6876 break
6877 }
6878 v.reset(OpNeg16)
6879 v0 := b.NewValue0(v.Pos, OpDiv16, t)
6880 v1 := b.NewValue0(v.Pos, OpConst16, t)
6881 v1.AuxInt = int16ToAuxInt(-c)
6882 v0.AddArg2(n, v1)
6883 v.AddArg(v0)
6884 return true
6885 }
6886
6887
6888 for {
6889 t := v.Type
6890 x := v_0
6891 if v_1.Op != OpConst16 || auxIntToInt16(v_1.AuxInt) != -1<<15 {
6892 break
6893 }
6894 v.reset(OpRsh16Ux64)
6895 v0 := b.NewValue0(v.Pos, OpAnd16, t)
6896 v1 := b.NewValue0(v.Pos, OpNeg16, t)
6897 v1.AddArg(x)
6898 v0.AddArg2(x, v1)
6899 v2 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
6900 v2.AuxInt = int64ToAuxInt(15)
6901 v.AddArg2(v0, v2)
6902 return true
6903 }
6904
6905
6906
6907 for {
6908 t := v.Type
6909 n := v_0
6910 if v_1.Op != OpConst16 {
6911 break
6912 }
6913 c := auxIntToInt16(v_1.AuxInt)
6914 if !(isPowerOfTwo(c)) {
6915 break
6916 }
6917 v.reset(OpRsh16x64)
6918 v0 := b.NewValue0(v.Pos, OpAdd16, t)
6919 v1 := b.NewValue0(v.Pos, OpRsh16Ux64, t)
6920 v2 := b.NewValue0(v.Pos, OpRsh16x64, t)
6921 v3 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
6922 v3.AuxInt = int64ToAuxInt(15)
6923 v2.AddArg2(n, v3)
6924 v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
6925 v4.AuxInt = int64ToAuxInt(int64(16 - log16(c)))
6926 v1.AddArg2(v2, v4)
6927 v0.AddArg2(n, v1)
6928 v5 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
6929 v5.AuxInt = int64ToAuxInt(int64(log16(c)))
6930 v.AddArg2(v0, v5)
6931 return true
6932 }
6933
6934
6935
6936 for {
6937 t := v.Type
6938 x := v_0
6939 if v_1.Op != OpConst16 {
6940 break
6941 }
6942 c := auxIntToInt16(v_1.AuxInt)
6943 if !(smagicOK16(c)) {
6944 break
6945 }
6946 v.reset(OpSub16)
6947 v.Type = t
6948 v0 := b.NewValue0(v.Pos, OpRsh32x64, t)
6949 v1 := b.NewValue0(v.Pos, OpMul32, typ.UInt32)
6950 v2 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
6951 v2.AuxInt = int32ToAuxInt(int32(smagic16(c).m))
6952 v3 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
6953 v3.AddArg(x)
6954 v1.AddArg2(v2, v3)
6955 v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
6956 v4.AuxInt = int64ToAuxInt(16 + smagic16(c).s)
6957 v0.AddArg2(v1, v4)
6958 v5 := b.NewValue0(v.Pos, OpRsh32x64, t)
6959 v6 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
6960 v6.AuxInt = int64ToAuxInt(31)
6961 v5.AddArg2(v3, v6)
6962 v.AddArg2(v0, v5)
6963 return true
6964 }
6965 return false
6966 }
6967 func rewriteValuegeneric_OpDiv16u(v *Value) bool {
6968 v_1 := v.Args[1]
6969 v_0 := v.Args[0]
6970 b := v.Block
6971 config := b.Func.Config
6972 typ := &b.Func.Config.Types
6973
6974
6975
6976 for {
6977 if v_0.Op != OpConst16 {
6978 break
6979 }
6980 c := auxIntToInt16(v_0.AuxInt)
6981 if v_1.Op != OpConst16 {
6982 break
6983 }
6984 d := auxIntToInt16(v_1.AuxInt)
6985 if !(d != 0) {
6986 break
6987 }
6988 v.reset(OpConst16)
6989 v.AuxInt = int16ToAuxInt(int16(uint16(c) / uint16(d)))
6990 return true
6991 }
6992
6993
6994
6995 for {
6996 n := v_0
6997 if v_1.Op != OpConst16 {
6998 break
6999 }
7000 c := auxIntToInt16(v_1.AuxInt)
7001 if !(isUnsignedPowerOfTwo(uint16(c))) {
7002 break
7003 }
7004 v.reset(OpRsh16Ux64)
7005 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7006 v0.AuxInt = int64ToAuxInt(log16u(uint16(c)))
7007 v.AddArg2(n, v0)
7008 return true
7009 }
7010
7011
7012
7013 for {
7014 x := v_0
7015 if v_1.Op != OpConst16 {
7016 break
7017 }
7018 c := auxIntToInt16(v_1.AuxInt)
7019 if !(umagicOK16(c) && config.RegSize == 8) {
7020 break
7021 }
7022 v.reset(OpTrunc64to16)
7023 v0 := b.NewValue0(v.Pos, OpRsh64Ux64, typ.UInt64)
7024 v1 := b.NewValue0(v.Pos, OpMul64, typ.UInt64)
7025 v2 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7026 v2.AuxInt = int64ToAuxInt(int64(1<<16 + umagic16(c).m))
7027 v3 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
7028 v3.AddArg(x)
7029 v1.AddArg2(v2, v3)
7030 v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7031 v4.AuxInt = int64ToAuxInt(16 + umagic16(c).s)
7032 v0.AddArg2(v1, v4)
7033 v.AddArg(v0)
7034 return true
7035 }
7036
7037
7038
7039 for {
7040 x := v_0
7041 if v_1.Op != OpConst16 {
7042 break
7043 }
7044 c := auxIntToInt16(v_1.AuxInt)
7045 if !(umagicOK16(c) && config.RegSize == 4 && umagic16(c).m&1 == 0) {
7046 break
7047 }
7048 v.reset(OpTrunc32to16)
7049 v0 := b.NewValue0(v.Pos, OpRsh32Ux64, typ.UInt32)
7050 v1 := b.NewValue0(v.Pos, OpMul32, typ.UInt32)
7051 v2 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
7052 v2.AuxInt = int32ToAuxInt(int32(1<<15 + umagic16(c).m/2))
7053 v3 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
7054 v3.AddArg(x)
7055 v1.AddArg2(v2, v3)
7056 v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7057 v4.AuxInt = int64ToAuxInt(16 + umagic16(c).s - 1)
7058 v0.AddArg2(v1, v4)
7059 v.AddArg(v0)
7060 return true
7061 }
7062
7063
7064
7065 for {
7066 x := v_0
7067 if v_1.Op != OpConst16 {
7068 break
7069 }
7070 c := auxIntToInt16(v_1.AuxInt)
7071 if !(umagicOK16(c) && config.RegSize == 4 && c&1 == 0) {
7072 break
7073 }
7074 v.reset(OpTrunc32to16)
7075 v0 := b.NewValue0(v.Pos, OpRsh32Ux64, typ.UInt32)
7076 v1 := b.NewValue0(v.Pos, OpMul32, typ.UInt32)
7077 v2 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
7078 v2.AuxInt = int32ToAuxInt(int32(1<<15 + (umagic16(c).m+1)/2))
7079 v3 := b.NewValue0(v.Pos, OpRsh32Ux64, typ.UInt32)
7080 v4 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
7081 v4.AddArg(x)
7082 v5 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7083 v5.AuxInt = int64ToAuxInt(1)
7084 v3.AddArg2(v4, v5)
7085 v1.AddArg2(v2, v3)
7086 v6 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7087 v6.AuxInt = int64ToAuxInt(16 + umagic16(c).s - 2)
7088 v0.AddArg2(v1, v6)
7089 v.AddArg(v0)
7090 return true
7091 }
7092
7093
7094
7095 for {
7096 x := v_0
7097 if v_1.Op != OpConst16 {
7098 break
7099 }
7100 c := auxIntToInt16(v_1.AuxInt)
7101 if !(umagicOK16(c) && config.RegSize == 4 && config.useAvg) {
7102 break
7103 }
7104 v.reset(OpTrunc32to16)
7105 v0 := b.NewValue0(v.Pos, OpRsh32Ux64, typ.UInt32)
7106 v1 := b.NewValue0(v.Pos, OpAvg32u, typ.UInt32)
7107 v2 := b.NewValue0(v.Pos, OpLsh32x64, typ.UInt32)
7108 v3 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
7109 v3.AddArg(x)
7110 v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7111 v4.AuxInt = int64ToAuxInt(16)
7112 v2.AddArg2(v3, v4)
7113 v5 := b.NewValue0(v.Pos, OpMul32, typ.UInt32)
7114 v6 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
7115 v6.AuxInt = int32ToAuxInt(int32(umagic16(c).m))
7116 v5.AddArg2(v6, v3)
7117 v1.AddArg2(v2, v5)
7118 v7 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7119 v7.AuxInt = int64ToAuxInt(16 + umagic16(c).s - 1)
7120 v0.AddArg2(v1, v7)
7121 v.AddArg(v0)
7122 return true
7123 }
7124 return false
7125 }
7126 func rewriteValuegeneric_OpDiv32(v *Value) bool {
7127 v_1 := v.Args[1]
7128 v_0 := v.Args[0]
7129 b := v.Block
7130 config := b.Func.Config
7131 typ := &b.Func.Config.Types
7132
7133
7134
7135 for {
7136 if v_0.Op != OpConst32 {
7137 break
7138 }
7139 c := auxIntToInt32(v_0.AuxInt)
7140 if v_1.Op != OpConst32 {
7141 break
7142 }
7143 d := auxIntToInt32(v_1.AuxInt)
7144 if !(d != 0) {
7145 break
7146 }
7147 v.reset(OpConst32)
7148 v.AuxInt = int32ToAuxInt(c / d)
7149 return true
7150 }
7151
7152
7153
7154 for {
7155 n := v_0
7156 if v_1.Op != OpConst32 {
7157 break
7158 }
7159 c := auxIntToInt32(v_1.AuxInt)
7160 if !(isNonNegative(n) && isPowerOfTwo(c)) {
7161 break
7162 }
7163 v.reset(OpRsh32Ux64)
7164 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7165 v0.AuxInt = int64ToAuxInt(log32(c))
7166 v.AddArg2(n, v0)
7167 return true
7168 }
7169
7170
7171
7172 for {
7173 t := v.Type
7174 n := v_0
7175 if v_1.Op != OpConst32 {
7176 break
7177 }
7178 c := auxIntToInt32(v_1.AuxInt)
7179 if !(c < 0 && c != -1<<31) {
7180 break
7181 }
7182 v.reset(OpNeg32)
7183 v0 := b.NewValue0(v.Pos, OpDiv32, t)
7184 v1 := b.NewValue0(v.Pos, OpConst32, t)
7185 v1.AuxInt = int32ToAuxInt(-c)
7186 v0.AddArg2(n, v1)
7187 v.AddArg(v0)
7188 return true
7189 }
7190
7191
7192 for {
7193 t := v.Type
7194 x := v_0
7195 if v_1.Op != OpConst32 || auxIntToInt32(v_1.AuxInt) != -1<<31 {
7196 break
7197 }
7198 v.reset(OpRsh32Ux64)
7199 v0 := b.NewValue0(v.Pos, OpAnd32, t)
7200 v1 := b.NewValue0(v.Pos, OpNeg32, t)
7201 v1.AddArg(x)
7202 v0.AddArg2(x, v1)
7203 v2 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7204 v2.AuxInt = int64ToAuxInt(31)
7205 v.AddArg2(v0, v2)
7206 return true
7207 }
7208
7209
7210
7211 for {
7212 t := v.Type
7213 n := v_0
7214 if v_1.Op != OpConst32 {
7215 break
7216 }
7217 c := auxIntToInt32(v_1.AuxInt)
7218 if !(isPowerOfTwo(c)) {
7219 break
7220 }
7221 v.reset(OpRsh32x64)
7222 v0 := b.NewValue0(v.Pos, OpAdd32, t)
7223 v1 := b.NewValue0(v.Pos, OpRsh32Ux64, t)
7224 v2 := b.NewValue0(v.Pos, OpRsh32x64, t)
7225 v3 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7226 v3.AuxInt = int64ToAuxInt(31)
7227 v2.AddArg2(n, v3)
7228 v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7229 v4.AuxInt = int64ToAuxInt(int64(32 - log32(c)))
7230 v1.AddArg2(v2, v4)
7231 v0.AddArg2(n, v1)
7232 v5 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7233 v5.AuxInt = int64ToAuxInt(int64(log32(c)))
7234 v.AddArg2(v0, v5)
7235 return true
7236 }
7237
7238
7239
7240 for {
7241 t := v.Type
7242 x := v_0
7243 if v_1.Op != OpConst32 {
7244 break
7245 }
7246 c := auxIntToInt32(v_1.AuxInt)
7247 if !(smagicOK32(c) && config.RegSize == 8) {
7248 break
7249 }
7250 v.reset(OpSub32)
7251 v.Type = t
7252 v0 := b.NewValue0(v.Pos, OpRsh64x64, t)
7253 v1 := b.NewValue0(v.Pos, OpMul64, typ.UInt64)
7254 v2 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7255 v2.AuxInt = int64ToAuxInt(int64(smagic32(c).m))
7256 v3 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
7257 v3.AddArg(x)
7258 v1.AddArg2(v2, v3)
7259 v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7260 v4.AuxInt = int64ToAuxInt(32 + smagic32(c).s)
7261 v0.AddArg2(v1, v4)
7262 v5 := b.NewValue0(v.Pos, OpRsh64x64, t)
7263 v6 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7264 v6.AuxInt = int64ToAuxInt(63)
7265 v5.AddArg2(v3, v6)
7266 v.AddArg2(v0, v5)
7267 return true
7268 }
7269
7270
7271
7272 for {
7273 t := v.Type
7274 x := v_0
7275 if v_1.Op != OpConst32 {
7276 break
7277 }
7278 c := auxIntToInt32(v_1.AuxInt)
7279 if !(smagicOK32(c) && config.RegSize == 4 && smagic32(c).m&1 == 0 && config.useHmul) {
7280 break
7281 }
7282 v.reset(OpSub32)
7283 v.Type = t
7284 v0 := b.NewValue0(v.Pos, OpRsh32x64, t)
7285 v1 := b.NewValue0(v.Pos, OpHmul32, t)
7286 v2 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
7287 v2.AuxInt = int32ToAuxInt(int32(smagic32(c).m / 2))
7288 v1.AddArg2(v2, x)
7289 v3 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7290 v3.AuxInt = int64ToAuxInt(smagic32(c).s - 1)
7291 v0.AddArg2(v1, v3)
7292 v4 := b.NewValue0(v.Pos, OpRsh32x64, t)
7293 v5 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7294 v5.AuxInt = int64ToAuxInt(31)
7295 v4.AddArg2(x, v5)
7296 v.AddArg2(v0, v4)
7297 return true
7298 }
7299
7300
7301
7302 for {
7303 t := v.Type
7304 x := v_0
7305 if v_1.Op != OpConst32 {
7306 break
7307 }
7308 c := auxIntToInt32(v_1.AuxInt)
7309 if !(smagicOK32(c) && config.RegSize == 4 && smagic32(c).m&1 != 0 && config.useHmul) {
7310 break
7311 }
7312 v.reset(OpSub32)
7313 v.Type = t
7314 v0 := b.NewValue0(v.Pos, OpRsh32x64, t)
7315 v1 := b.NewValue0(v.Pos, OpAdd32, t)
7316 v2 := b.NewValue0(v.Pos, OpHmul32, t)
7317 v3 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
7318 v3.AuxInt = int32ToAuxInt(int32(smagic32(c).m))
7319 v2.AddArg2(v3, x)
7320 v1.AddArg2(v2, x)
7321 v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7322 v4.AuxInt = int64ToAuxInt(smagic32(c).s)
7323 v0.AddArg2(v1, v4)
7324 v5 := b.NewValue0(v.Pos, OpRsh32x64, t)
7325 v6 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7326 v6.AuxInt = int64ToAuxInt(31)
7327 v5.AddArg2(x, v6)
7328 v.AddArg2(v0, v5)
7329 return true
7330 }
7331 return false
7332 }
7333 func rewriteValuegeneric_OpDiv32F(v *Value) bool {
7334 v_1 := v.Args[1]
7335 v_0 := v.Args[0]
7336 b := v.Block
7337
7338
7339
7340 for {
7341 if v_0.Op != OpConst32F {
7342 break
7343 }
7344 c := auxIntToFloat32(v_0.AuxInt)
7345 if v_1.Op != OpConst32F {
7346 break
7347 }
7348 d := auxIntToFloat32(v_1.AuxInt)
7349 if !(c/d == c/d) {
7350 break
7351 }
7352 v.reset(OpConst32F)
7353 v.AuxInt = float32ToAuxInt(c / d)
7354 return true
7355 }
7356
7357
7358
7359 for {
7360 x := v_0
7361 if v_1.Op != OpConst32F {
7362 break
7363 }
7364 t := v_1.Type
7365 c := auxIntToFloat32(v_1.AuxInt)
7366 if !(reciprocalExact32(c)) {
7367 break
7368 }
7369 v.reset(OpMul32F)
7370 v0 := b.NewValue0(v.Pos, OpConst32F, t)
7371 v0.AuxInt = float32ToAuxInt(1 / c)
7372 v.AddArg2(x, v0)
7373 return true
7374 }
7375 return false
7376 }
7377 func rewriteValuegeneric_OpDiv32u(v *Value) bool {
7378 v_1 := v.Args[1]
7379 v_0 := v.Args[0]
7380 b := v.Block
7381 config := b.Func.Config
7382 typ := &b.Func.Config.Types
7383
7384
7385
7386 for {
7387 if v_0.Op != OpConst32 {
7388 break
7389 }
7390 c := auxIntToInt32(v_0.AuxInt)
7391 if v_1.Op != OpConst32 {
7392 break
7393 }
7394 d := auxIntToInt32(v_1.AuxInt)
7395 if !(d != 0) {
7396 break
7397 }
7398 v.reset(OpConst32)
7399 v.AuxInt = int32ToAuxInt(int32(uint32(c) / uint32(d)))
7400 return true
7401 }
7402
7403
7404
7405 for {
7406 n := v_0
7407 if v_1.Op != OpConst32 {
7408 break
7409 }
7410 c := auxIntToInt32(v_1.AuxInt)
7411 if !(isUnsignedPowerOfTwo(uint32(c))) {
7412 break
7413 }
7414 v.reset(OpRsh32Ux64)
7415 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7416 v0.AuxInt = int64ToAuxInt(log32u(uint32(c)))
7417 v.AddArg2(n, v0)
7418 return true
7419 }
7420
7421
7422
7423 for {
7424 x := v_0
7425 if v_1.Op != OpConst32 {
7426 break
7427 }
7428 c := auxIntToInt32(v_1.AuxInt)
7429 if !(umagicOK32(c) && config.RegSize == 4 && umagic32(c).m&1 == 0 && config.useHmul) {
7430 break
7431 }
7432 v.reset(OpRsh32Ux64)
7433 v.Type = typ.UInt32
7434 v0 := b.NewValue0(v.Pos, OpHmul32u, typ.UInt32)
7435 v1 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
7436 v1.AuxInt = int32ToAuxInt(int32(1<<31 + umagic32(c).m/2))
7437 v0.AddArg2(v1, x)
7438 v2 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7439 v2.AuxInt = int64ToAuxInt(umagic32(c).s - 1)
7440 v.AddArg2(v0, v2)
7441 return true
7442 }
7443
7444
7445
7446 for {
7447 x := v_0
7448 if v_1.Op != OpConst32 {
7449 break
7450 }
7451 c := auxIntToInt32(v_1.AuxInt)
7452 if !(umagicOK32(c) && config.RegSize == 4 && c&1 == 0 && config.useHmul) {
7453 break
7454 }
7455 v.reset(OpRsh32Ux64)
7456 v.Type = typ.UInt32
7457 v0 := b.NewValue0(v.Pos, OpHmul32u, typ.UInt32)
7458 v1 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
7459 v1.AuxInt = int32ToAuxInt(int32(1<<31 + (umagic32(c).m+1)/2))
7460 v2 := b.NewValue0(v.Pos, OpRsh32Ux64, typ.UInt32)
7461 v3 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7462 v3.AuxInt = int64ToAuxInt(1)
7463 v2.AddArg2(x, v3)
7464 v0.AddArg2(v1, v2)
7465 v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7466 v4.AuxInt = int64ToAuxInt(umagic32(c).s - 2)
7467 v.AddArg2(v0, v4)
7468 return true
7469 }
7470
7471
7472
7473 for {
7474 x := v_0
7475 if v_1.Op != OpConst32 {
7476 break
7477 }
7478 c := auxIntToInt32(v_1.AuxInt)
7479 if !(umagicOK32(c) && config.RegSize == 4 && config.useAvg && config.useHmul) {
7480 break
7481 }
7482 v.reset(OpRsh32Ux64)
7483 v.Type = typ.UInt32
7484 v0 := b.NewValue0(v.Pos, OpAvg32u, typ.UInt32)
7485 v1 := b.NewValue0(v.Pos, OpHmul32u, typ.UInt32)
7486 v2 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
7487 v2.AuxInt = int32ToAuxInt(int32(umagic32(c).m))
7488 v1.AddArg2(v2, x)
7489 v0.AddArg2(x, v1)
7490 v3 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7491 v3.AuxInt = int64ToAuxInt(umagic32(c).s - 1)
7492 v.AddArg2(v0, v3)
7493 return true
7494 }
7495
7496
7497
7498 for {
7499 x := v_0
7500 if v_1.Op != OpConst32 {
7501 break
7502 }
7503 c := auxIntToInt32(v_1.AuxInt)
7504 if !(umagicOK32(c) && config.RegSize == 8 && umagic32(c).m&1 == 0) {
7505 break
7506 }
7507 v.reset(OpTrunc64to32)
7508 v0 := b.NewValue0(v.Pos, OpRsh64Ux64, typ.UInt64)
7509 v1 := b.NewValue0(v.Pos, OpMul64, typ.UInt64)
7510 v2 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7511 v2.AuxInt = int64ToAuxInt(int64(1<<31 + umagic32(c).m/2))
7512 v3 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
7513 v3.AddArg(x)
7514 v1.AddArg2(v2, v3)
7515 v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7516 v4.AuxInt = int64ToAuxInt(32 + umagic32(c).s - 1)
7517 v0.AddArg2(v1, v4)
7518 v.AddArg(v0)
7519 return true
7520 }
7521
7522
7523
7524 for {
7525 x := v_0
7526 if v_1.Op != OpConst32 {
7527 break
7528 }
7529 c := auxIntToInt32(v_1.AuxInt)
7530 if !(umagicOK32(c) && config.RegSize == 8 && c&1 == 0) {
7531 break
7532 }
7533 v.reset(OpTrunc64to32)
7534 v0 := b.NewValue0(v.Pos, OpRsh64Ux64, typ.UInt64)
7535 v1 := b.NewValue0(v.Pos, OpMul64, typ.UInt64)
7536 v2 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7537 v2.AuxInt = int64ToAuxInt(int64(1<<31 + (umagic32(c).m+1)/2))
7538 v3 := b.NewValue0(v.Pos, OpRsh64Ux64, typ.UInt64)
7539 v4 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
7540 v4.AddArg(x)
7541 v5 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7542 v5.AuxInt = int64ToAuxInt(1)
7543 v3.AddArg2(v4, v5)
7544 v1.AddArg2(v2, v3)
7545 v6 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7546 v6.AuxInt = int64ToAuxInt(32 + umagic32(c).s - 2)
7547 v0.AddArg2(v1, v6)
7548 v.AddArg(v0)
7549 return true
7550 }
7551
7552
7553
7554 for {
7555 x := v_0
7556 if v_1.Op != OpConst32 {
7557 break
7558 }
7559 c := auxIntToInt32(v_1.AuxInt)
7560 if !(umagicOK32(c) && config.RegSize == 8 && config.useAvg) {
7561 break
7562 }
7563 v.reset(OpTrunc64to32)
7564 v0 := b.NewValue0(v.Pos, OpRsh64Ux64, typ.UInt64)
7565 v1 := b.NewValue0(v.Pos, OpAvg64u, typ.UInt64)
7566 v2 := b.NewValue0(v.Pos, OpLsh64x64, typ.UInt64)
7567 v3 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
7568 v3.AddArg(x)
7569 v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7570 v4.AuxInt = int64ToAuxInt(32)
7571 v2.AddArg2(v3, v4)
7572 v5 := b.NewValue0(v.Pos, OpMul64, typ.UInt64)
7573 v6 := b.NewValue0(v.Pos, OpConst64, typ.UInt32)
7574 v6.AuxInt = int64ToAuxInt(int64(umagic32(c).m))
7575 v5.AddArg2(v6, v3)
7576 v1.AddArg2(v2, v5)
7577 v7 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7578 v7.AuxInt = int64ToAuxInt(32 + umagic32(c).s - 1)
7579 v0.AddArg2(v1, v7)
7580 v.AddArg(v0)
7581 return true
7582 }
7583 return false
7584 }
7585 func rewriteValuegeneric_OpDiv64(v *Value) bool {
7586 v_1 := v.Args[1]
7587 v_0 := v.Args[0]
7588 b := v.Block
7589 config := b.Func.Config
7590 typ := &b.Func.Config.Types
7591
7592
7593
7594 for {
7595 if v_0.Op != OpConst64 {
7596 break
7597 }
7598 c := auxIntToInt64(v_0.AuxInt)
7599 if v_1.Op != OpConst64 {
7600 break
7601 }
7602 d := auxIntToInt64(v_1.AuxInt)
7603 if !(d != 0) {
7604 break
7605 }
7606 v.reset(OpConst64)
7607 v.AuxInt = int64ToAuxInt(c / d)
7608 return true
7609 }
7610
7611
7612
7613 for {
7614 n := v_0
7615 if v_1.Op != OpConst64 {
7616 break
7617 }
7618 c := auxIntToInt64(v_1.AuxInt)
7619 if !(isNonNegative(n) && isPowerOfTwo(c)) {
7620 break
7621 }
7622 v.reset(OpRsh64Ux64)
7623 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7624 v0.AuxInt = int64ToAuxInt(log64(c))
7625 v.AddArg2(n, v0)
7626 return true
7627 }
7628
7629
7630
7631 for {
7632 n := v_0
7633 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != -1<<63 || !(isNonNegative(n)) {
7634 break
7635 }
7636 v.reset(OpConst64)
7637 v.AuxInt = int64ToAuxInt(0)
7638 return true
7639 }
7640
7641
7642
7643 for {
7644 t := v.Type
7645 n := v_0
7646 if v_1.Op != OpConst64 {
7647 break
7648 }
7649 c := auxIntToInt64(v_1.AuxInt)
7650 if !(c < 0 && c != -1<<63) {
7651 break
7652 }
7653 v.reset(OpNeg64)
7654 v0 := b.NewValue0(v.Pos, OpDiv64, t)
7655 v1 := b.NewValue0(v.Pos, OpConst64, t)
7656 v1.AuxInt = int64ToAuxInt(-c)
7657 v0.AddArg2(n, v1)
7658 v.AddArg(v0)
7659 return true
7660 }
7661
7662
7663 for {
7664 t := v.Type
7665 x := v_0
7666 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != -1<<63 {
7667 break
7668 }
7669 v.reset(OpRsh64Ux64)
7670 v0 := b.NewValue0(v.Pos, OpAnd64, t)
7671 v1 := b.NewValue0(v.Pos, OpNeg64, t)
7672 v1.AddArg(x)
7673 v0.AddArg2(x, v1)
7674 v2 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7675 v2.AuxInt = int64ToAuxInt(63)
7676 v.AddArg2(v0, v2)
7677 return true
7678 }
7679
7680
7681
7682 for {
7683 t := v.Type
7684 n := v_0
7685 if v_1.Op != OpConst64 {
7686 break
7687 }
7688 c := auxIntToInt64(v_1.AuxInt)
7689 if !(isPowerOfTwo(c)) {
7690 break
7691 }
7692 v.reset(OpRsh64x64)
7693 v0 := b.NewValue0(v.Pos, OpAdd64, t)
7694 v1 := b.NewValue0(v.Pos, OpRsh64Ux64, t)
7695 v2 := b.NewValue0(v.Pos, OpRsh64x64, t)
7696 v3 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7697 v3.AuxInt = int64ToAuxInt(63)
7698 v2.AddArg2(n, v3)
7699 v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7700 v4.AuxInt = int64ToAuxInt(int64(64 - log64(c)))
7701 v1.AddArg2(v2, v4)
7702 v0.AddArg2(n, v1)
7703 v5 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7704 v5.AuxInt = int64ToAuxInt(int64(log64(c)))
7705 v.AddArg2(v0, v5)
7706 return true
7707 }
7708
7709
7710
7711 for {
7712 t := v.Type
7713 x := v_0
7714 if v_1.Op != OpConst64 {
7715 break
7716 }
7717 c := auxIntToInt64(v_1.AuxInt)
7718 if !(smagicOK64(c) && smagic64(c).m&1 == 0 && config.useHmul) {
7719 break
7720 }
7721 v.reset(OpSub64)
7722 v.Type = t
7723 v0 := b.NewValue0(v.Pos, OpRsh64x64, t)
7724 v1 := b.NewValue0(v.Pos, OpHmul64, t)
7725 v2 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7726 v2.AuxInt = int64ToAuxInt(int64(smagic64(c).m / 2))
7727 v1.AddArg2(v2, x)
7728 v3 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7729 v3.AuxInt = int64ToAuxInt(smagic64(c).s - 1)
7730 v0.AddArg2(v1, v3)
7731 v4 := b.NewValue0(v.Pos, OpRsh64x64, t)
7732 v5 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7733 v5.AuxInt = int64ToAuxInt(63)
7734 v4.AddArg2(x, v5)
7735 v.AddArg2(v0, v4)
7736 return true
7737 }
7738
7739
7740
7741 for {
7742 t := v.Type
7743 x := v_0
7744 if v_1.Op != OpConst64 {
7745 break
7746 }
7747 c := auxIntToInt64(v_1.AuxInt)
7748 if !(smagicOK64(c) && smagic64(c).m&1 != 0 && config.useHmul) {
7749 break
7750 }
7751 v.reset(OpSub64)
7752 v.Type = t
7753 v0 := b.NewValue0(v.Pos, OpRsh64x64, t)
7754 v1 := b.NewValue0(v.Pos, OpAdd64, t)
7755 v2 := b.NewValue0(v.Pos, OpHmul64, t)
7756 v3 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7757 v3.AuxInt = int64ToAuxInt(int64(smagic64(c).m))
7758 v2.AddArg2(v3, x)
7759 v1.AddArg2(v2, x)
7760 v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7761 v4.AuxInt = int64ToAuxInt(smagic64(c).s)
7762 v0.AddArg2(v1, v4)
7763 v5 := b.NewValue0(v.Pos, OpRsh64x64, t)
7764 v6 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7765 v6.AuxInt = int64ToAuxInt(63)
7766 v5.AddArg2(x, v6)
7767 v.AddArg2(v0, v5)
7768 return true
7769 }
7770 return false
7771 }
7772 func rewriteValuegeneric_OpDiv64F(v *Value) bool {
7773 v_1 := v.Args[1]
7774 v_0 := v.Args[0]
7775 b := v.Block
7776
7777
7778
7779 for {
7780 if v_0.Op != OpConst64F {
7781 break
7782 }
7783 c := auxIntToFloat64(v_0.AuxInt)
7784 if v_1.Op != OpConst64F {
7785 break
7786 }
7787 d := auxIntToFloat64(v_1.AuxInt)
7788 if !(c/d == c/d) {
7789 break
7790 }
7791 v.reset(OpConst64F)
7792 v.AuxInt = float64ToAuxInt(c / d)
7793 return true
7794 }
7795
7796
7797
7798 for {
7799 x := v_0
7800 if v_1.Op != OpConst64F {
7801 break
7802 }
7803 t := v_1.Type
7804 c := auxIntToFloat64(v_1.AuxInt)
7805 if !(reciprocalExact64(c)) {
7806 break
7807 }
7808 v.reset(OpMul64F)
7809 v0 := b.NewValue0(v.Pos, OpConst64F, t)
7810 v0.AuxInt = float64ToAuxInt(1 / c)
7811 v.AddArg2(x, v0)
7812 return true
7813 }
7814 return false
7815 }
7816 func rewriteValuegeneric_OpDiv64u(v *Value) bool {
7817 v_1 := v.Args[1]
7818 v_0 := v.Args[0]
7819 b := v.Block
7820 config := b.Func.Config
7821 typ := &b.Func.Config.Types
7822
7823
7824
7825 for {
7826 if v_0.Op != OpConst64 {
7827 break
7828 }
7829 c := auxIntToInt64(v_0.AuxInt)
7830 if v_1.Op != OpConst64 {
7831 break
7832 }
7833 d := auxIntToInt64(v_1.AuxInt)
7834 if !(d != 0) {
7835 break
7836 }
7837 v.reset(OpConst64)
7838 v.AuxInt = int64ToAuxInt(int64(uint64(c) / uint64(d)))
7839 return true
7840 }
7841
7842
7843
7844 for {
7845 n := v_0
7846 if v_1.Op != OpConst64 {
7847 break
7848 }
7849 c := auxIntToInt64(v_1.AuxInt)
7850 if !(isUnsignedPowerOfTwo(uint64(c))) {
7851 break
7852 }
7853 v.reset(OpRsh64Ux64)
7854 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7855 v0.AuxInt = int64ToAuxInt(log64u(uint64(c)))
7856 v.AddArg2(n, v0)
7857 return true
7858 }
7859
7860
7861
7862 for {
7863 x := v_0
7864 if v_1.Op != OpConst64 {
7865 break
7866 }
7867 c := auxIntToInt64(v_1.AuxInt)
7868 if !(c > 0 && c <= 0xFFFF && umagicOK32(int32(c)) && config.RegSize == 4 && config.useHmul) {
7869 break
7870 }
7871 v.reset(OpAdd64)
7872 v0 := b.NewValue0(v.Pos, OpAdd64, typ.UInt64)
7873 v1 := b.NewValue0(v.Pos, OpAdd64, typ.UInt64)
7874 v2 := b.NewValue0(v.Pos, OpLsh64x64, typ.UInt64)
7875 v3 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
7876 v4 := b.NewValue0(v.Pos, OpDiv32u, typ.UInt32)
7877 v5 := b.NewValue0(v.Pos, OpTrunc64to32, typ.UInt32)
7878 v6 := b.NewValue0(v.Pos, OpRsh64Ux64, typ.UInt64)
7879 v7 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7880 v7.AuxInt = int64ToAuxInt(32)
7881 v6.AddArg2(x, v7)
7882 v5.AddArg(v6)
7883 v8 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
7884 v8.AuxInt = int32ToAuxInt(int32(c))
7885 v4.AddArg2(v5, v8)
7886 v3.AddArg(v4)
7887 v2.AddArg2(v3, v7)
7888 v9 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
7889 v10 := b.NewValue0(v.Pos, OpDiv32u, typ.UInt32)
7890 v11 := b.NewValue0(v.Pos, OpTrunc64to32, typ.UInt32)
7891 v11.AddArg(x)
7892 v10.AddArg2(v11, v8)
7893 v9.AddArg(v10)
7894 v1.AddArg2(v2, v9)
7895 v12 := b.NewValue0(v.Pos, OpMul64, typ.UInt64)
7896 v13 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
7897 v14 := b.NewValue0(v.Pos, OpMod32u, typ.UInt32)
7898 v14.AddArg2(v5, v8)
7899 v13.AddArg(v14)
7900 v15 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7901 v15.AuxInt = int64ToAuxInt(int64((1 << 32) / c))
7902 v12.AddArg2(v13, v15)
7903 v0.AddArg2(v1, v12)
7904 v16 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
7905 v17 := b.NewValue0(v.Pos, OpDiv32u, typ.UInt32)
7906 v18 := b.NewValue0(v.Pos, OpAdd32, typ.UInt32)
7907 v19 := b.NewValue0(v.Pos, OpMod32u, typ.UInt32)
7908 v19.AddArg2(v11, v8)
7909 v20 := b.NewValue0(v.Pos, OpMul32, typ.UInt32)
7910 v21 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
7911 v21.AuxInt = int32ToAuxInt(int32((1 << 32) % c))
7912 v20.AddArg2(v14, v21)
7913 v18.AddArg2(v19, v20)
7914 v17.AddArg2(v18, v8)
7915 v16.AddArg(v17)
7916 v.AddArg2(v0, v16)
7917 return true
7918 }
7919
7920
7921
7922 for {
7923 x := v_0
7924 if v_1.Op != OpConst64 {
7925 break
7926 }
7927 c := auxIntToInt64(v_1.AuxInt)
7928 if !(umagicOK64(c) && config.RegSize == 8 && umagic64(c).m&1 == 0 && config.useHmul) {
7929 break
7930 }
7931 v.reset(OpRsh64Ux64)
7932 v.Type = typ.UInt64
7933 v0 := b.NewValue0(v.Pos, OpHmul64u, typ.UInt64)
7934 v1 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7935 v1.AuxInt = int64ToAuxInt(int64(1<<63 + umagic64(c).m/2))
7936 v0.AddArg2(v1, x)
7937 v2 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7938 v2.AuxInt = int64ToAuxInt(umagic64(c).s - 1)
7939 v.AddArg2(v0, v2)
7940 return true
7941 }
7942
7943
7944
7945 for {
7946 x := v_0
7947 if v_1.Op != OpConst64 {
7948 break
7949 }
7950 c := auxIntToInt64(v_1.AuxInt)
7951 if !(umagicOK64(c) && config.RegSize == 8 && c&1 == 0 && config.useHmul) {
7952 break
7953 }
7954 v.reset(OpRsh64Ux64)
7955 v.Type = typ.UInt64
7956 v0 := b.NewValue0(v.Pos, OpHmul64u, typ.UInt64)
7957 v1 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7958 v1.AuxInt = int64ToAuxInt(int64(1<<63 + (umagic64(c).m+1)/2))
7959 v2 := b.NewValue0(v.Pos, OpRsh64Ux64, typ.UInt64)
7960 v3 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7961 v3.AuxInt = int64ToAuxInt(1)
7962 v2.AddArg2(x, v3)
7963 v0.AddArg2(v1, v2)
7964 v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7965 v4.AuxInt = int64ToAuxInt(umagic64(c).s - 2)
7966 v.AddArg2(v0, v4)
7967 return true
7968 }
7969
7970
7971
7972 for {
7973 x := v_0
7974 if v_1.Op != OpConst64 {
7975 break
7976 }
7977 c := auxIntToInt64(v_1.AuxInt)
7978 if !(umagicOK64(c) && config.RegSize == 8 && config.useAvg && config.useHmul) {
7979 break
7980 }
7981 v.reset(OpRsh64Ux64)
7982 v.Type = typ.UInt64
7983 v0 := b.NewValue0(v.Pos, OpAvg64u, typ.UInt64)
7984 v1 := b.NewValue0(v.Pos, OpHmul64u, typ.UInt64)
7985 v2 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7986 v2.AuxInt = int64ToAuxInt(int64(umagic64(c).m))
7987 v1.AddArg2(v2, x)
7988 v0.AddArg2(x, v1)
7989 v3 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
7990 v3.AuxInt = int64ToAuxInt(umagic64(c).s - 1)
7991 v.AddArg2(v0, v3)
7992 return true
7993 }
7994 return false
7995 }
7996 func rewriteValuegeneric_OpDiv8(v *Value) bool {
7997 v_1 := v.Args[1]
7998 v_0 := v.Args[0]
7999 b := v.Block
8000 typ := &b.Func.Config.Types
8001
8002
8003
8004 for {
8005 if v_0.Op != OpConst8 {
8006 break
8007 }
8008 c := auxIntToInt8(v_0.AuxInt)
8009 if v_1.Op != OpConst8 {
8010 break
8011 }
8012 d := auxIntToInt8(v_1.AuxInt)
8013 if !(d != 0) {
8014 break
8015 }
8016 v.reset(OpConst8)
8017 v.AuxInt = int8ToAuxInt(c / d)
8018 return true
8019 }
8020
8021
8022
8023 for {
8024 n := v_0
8025 if v_1.Op != OpConst8 {
8026 break
8027 }
8028 c := auxIntToInt8(v_1.AuxInt)
8029 if !(isNonNegative(n) && isPowerOfTwo(c)) {
8030 break
8031 }
8032 v.reset(OpRsh8Ux64)
8033 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
8034 v0.AuxInt = int64ToAuxInt(log8(c))
8035 v.AddArg2(n, v0)
8036 return true
8037 }
8038
8039
8040
8041 for {
8042 t := v.Type
8043 n := v_0
8044 if v_1.Op != OpConst8 {
8045 break
8046 }
8047 c := auxIntToInt8(v_1.AuxInt)
8048 if !(c < 0 && c != -1<<7) {
8049 break
8050 }
8051 v.reset(OpNeg8)
8052 v0 := b.NewValue0(v.Pos, OpDiv8, t)
8053 v1 := b.NewValue0(v.Pos, OpConst8, t)
8054 v1.AuxInt = int8ToAuxInt(-c)
8055 v0.AddArg2(n, v1)
8056 v.AddArg(v0)
8057 return true
8058 }
8059
8060
8061 for {
8062 t := v.Type
8063 x := v_0
8064 if v_1.Op != OpConst8 || auxIntToInt8(v_1.AuxInt) != -1<<7 {
8065 break
8066 }
8067 v.reset(OpRsh8Ux64)
8068 v0 := b.NewValue0(v.Pos, OpAnd8, t)
8069 v1 := b.NewValue0(v.Pos, OpNeg8, t)
8070 v1.AddArg(x)
8071 v0.AddArg2(x, v1)
8072 v2 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
8073 v2.AuxInt = int64ToAuxInt(7)
8074 v.AddArg2(v0, v2)
8075 return true
8076 }
8077
8078
8079
8080 for {
8081 t := v.Type
8082 n := v_0
8083 if v_1.Op != OpConst8 {
8084 break
8085 }
8086 c := auxIntToInt8(v_1.AuxInt)
8087 if !(isPowerOfTwo(c)) {
8088 break
8089 }
8090 v.reset(OpRsh8x64)
8091 v0 := b.NewValue0(v.Pos, OpAdd8, t)
8092 v1 := b.NewValue0(v.Pos, OpRsh8Ux64, t)
8093 v2 := b.NewValue0(v.Pos, OpRsh8x64, t)
8094 v3 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
8095 v3.AuxInt = int64ToAuxInt(7)
8096 v2.AddArg2(n, v3)
8097 v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
8098 v4.AuxInt = int64ToAuxInt(int64(8 - log8(c)))
8099 v1.AddArg2(v2, v4)
8100 v0.AddArg2(n, v1)
8101 v5 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
8102 v5.AuxInt = int64ToAuxInt(int64(log8(c)))
8103 v.AddArg2(v0, v5)
8104 return true
8105 }
8106
8107
8108
8109 for {
8110 t := v.Type
8111 x := v_0
8112 if v_1.Op != OpConst8 {
8113 break
8114 }
8115 c := auxIntToInt8(v_1.AuxInt)
8116 if !(smagicOK8(c)) {
8117 break
8118 }
8119 v.reset(OpSub8)
8120 v.Type = t
8121 v0 := b.NewValue0(v.Pos, OpRsh32x64, t)
8122 v1 := b.NewValue0(v.Pos, OpMul32, typ.UInt32)
8123 v2 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
8124 v2.AuxInt = int32ToAuxInt(int32(smagic8(c).m))
8125 v3 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
8126 v3.AddArg(x)
8127 v1.AddArg2(v2, v3)
8128 v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
8129 v4.AuxInt = int64ToAuxInt(8 + smagic8(c).s)
8130 v0.AddArg2(v1, v4)
8131 v5 := b.NewValue0(v.Pos, OpRsh32x64, t)
8132 v6 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
8133 v6.AuxInt = int64ToAuxInt(31)
8134 v5.AddArg2(v3, v6)
8135 v.AddArg2(v0, v5)
8136 return true
8137 }
8138 return false
8139 }
8140 func rewriteValuegeneric_OpDiv8u(v *Value) bool {
8141 v_1 := v.Args[1]
8142 v_0 := v.Args[0]
8143 b := v.Block
8144 typ := &b.Func.Config.Types
8145
8146
8147
8148 for {
8149 if v_0.Op != OpConst8 {
8150 break
8151 }
8152 c := auxIntToInt8(v_0.AuxInt)
8153 if v_1.Op != OpConst8 {
8154 break
8155 }
8156 d := auxIntToInt8(v_1.AuxInt)
8157 if !(d != 0) {
8158 break
8159 }
8160 v.reset(OpConst8)
8161 v.AuxInt = int8ToAuxInt(int8(uint8(c) / uint8(d)))
8162 return true
8163 }
8164
8165
8166
8167 for {
8168 n := v_0
8169 if v_1.Op != OpConst8 {
8170 break
8171 }
8172 c := auxIntToInt8(v_1.AuxInt)
8173 if !(isUnsignedPowerOfTwo(uint8(c))) {
8174 break
8175 }
8176 v.reset(OpRsh8Ux64)
8177 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
8178 v0.AuxInt = int64ToAuxInt(log8u(uint8(c)))
8179 v.AddArg2(n, v0)
8180 return true
8181 }
8182
8183
8184
8185 for {
8186 x := v_0
8187 if v_1.Op != OpConst8 {
8188 break
8189 }
8190 c := auxIntToInt8(v_1.AuxInt)
8191 if !(umagicOK8(c)) {
8192 break
8193 }
8194 v.reset(OpTrunc32to8)
8195 v0 := b.NewValue0(v.Pos, OpRsh32Ux64, typ.UInt32)
8196 v1 := b.NewValue0(v.Pos, OpMul32, typ.UInt32)
8197 v2 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
8198 v2.AuxInt = int32ToAuxInt(int32(1<<8 + umagic8(c).m))
8199 v3 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
8200 v3.AddArg(x)
8201 v1.AddArg2(v2, v3)
8202 v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
8203 v4.AuxInt = int64ToAuxInt(8 + umagic8(c).s)
8204 v0.AddArg2(v1, v4)
8205 v.AddArg(v0)
8206 return true
8207 }
8208 return false
8209 }
8210 func rewriteValuegeneric_OpEq16(v *Value) bool {
8211 v_1 := v.Args[1]
8212 v_0 := v.Args[0]
8213 b := v.Block
8214 config := b.Func.Config
8215 typ := &b.Func.Config.Types
8216
8217
8218 for {
8219 x := v_0
8220 if x != v_1 {
8221 break
8222 }
8223 v.reset(OpConstBool)
8224 v.AuxInt = boolToAuxInt(true)
8225 return true
8226 }
8227
8228
8229 for {
8230 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
8231 if v_0.Op != OpConst16 {
8232 continue
8233 }
8234 t := v_0.Type
8235 c := auxIntToInt16(v_0.AuxInt)
8236 if v_1.Op != OpAdd16 {
8237 continue
8238 }
8239 _ = v_1.Args[1]
8240 v_1_0 := v_1.Args[0]
8241 v_1_1 := v_1.Args[1]
8242 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
8243 if v_1_0.Op != OpConst16 || v_1_0.Type != t {
8244 continue
8245 }
8246 d := auxIntToInt16(v_1_0.AuxInt)
8247 x := v_1_1
8248 v.reset(OpEq16)
8249 v0 := b.NewValue0(v.Pos, OpConst16, t)
8250 v0.AuxInt = int16ToAuxInt(c - d)
8251 v.AddArg2(v0, x)
8252 return true
8253 }
8254 }
8255 break
8256 }
8257
8258
8259 for {
8260 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
8261 if v_0.Op != OpConst16 {
8262 continue
8263 }
8264 c := auxIntToInt16(v_0.AuxInt)
8265 if v_1.Op != OpConst16 {
8266 continue
8267 }
8268 d := auxIntToInt16(v_1.AuxInt)
8269 v.reset(OpConstBool)
8270 v.AuxInt = boolToAuxInt(c == d)
8271 return true
8272 }
8273 break
8274 }
8275
8276
8277
8278 for {
8279 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
8280 if v_0.Op != OpMod16u {
8281 continue
8282 }
8283 _ = v_0.Args[1]
8284 x := v_0.Args[0]
8285 v_0_1 := v_0.Args[1]
8286 if v_0_1.Op != OpConst16 {
8287 continue
8288 }
8289 c := auxIntToInt16(v_0_1.AuxInt)
8290 if v_1.Op != OpConst16 || auxIntToInt16(v_1.AuxInt) != 0 || !(x.Op != OpConst16 && udivisibleOK16(c) && !hasSmallRotate(config)) {
8291 continue
8292 }
8293 v.reset(OpEq32)
8294 v0 := b.NewValue0(v.Pos, OpMod32u, typ.UInt32)
8295 v1 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
8296 v1.AddArg(x)
8297 v2 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
8298 v2.AuxInt = int32ToAuxInt(int32(uint16(c)))
8299 v0.AddArg2(v1, v2)
8300 v3 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
8301 v3.AuxInt = int32ToAuxInt(0)
8302 v.AddArg2(v0, v3)
8303 return true
8304 }
8305 break
8306 }
8307
8308
8309
8310 for {
8311 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
8312 if v_0.Op != OpMod16 {
8313 continue
8314 }
8315 _ = v_0.Args[1]
8316 x := v_0.Args[0]
8317 v_0_1 := v_0.Args[1]
8318 if v_0_1.Op != OpConst16 {
8319 continue
8320 }
8321 c := auxIntToInt16(v_0_1.AuxInt)
8322 if v_1.Op != OpConst16 || auxIntToInt16(v_1.AuxInt) != 0 || !(x.Op != OpConst16 && sdivisibleOK16(c) && !hasSmallRotate(config)) {
8323 continue
8324 }
8325 v.reset(OpEq32)
8326 v0 := b.NewValue0(v.Pos, OpMod32, typ.Int32)
8327 v1 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
8328 v1.AddArg(x)
8329 v2 := b.NewValue0(v.Pos, OpConst32, typ.Int32)
8330 v2.AuxInt = int32ToAuxInt(int32(c))
8331 v0.AddArg2(v1, v2)
8332 v3 := b.NewValue0(v.Pos, OpConst32, typ.Int32)
8333 v3.AuxInt = int32ToAuxInt(0)
8334 v.AddArg2(v0, v3)
8335 return true
8336 }
8337 break
8338 }
8339
8340
8341
8342 for {
8343 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
8344 x := v_0
8345 if v_1.Op != OpMul16 {
8346 continue
8347 }
8348 _ = v_1.Args[1]
8349 v_1_0 := v_1.Args[0]
8350 v_1_1 := v_1.Args[1]
8351 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
8352 if v_1_0.Op != OpConst16 {
8353 continue
8354 }
8355 c := auxIntToInt16(v_1_0.AuxInt)
8356 if v_1_1.Op != OpTrunc64to16 {
8357 continue
8358 }
8359 v_1_1_0 := v_1_1.Args[0]
8360 if v_1_1_0.Op != OpRsh64Ux64 {
8361 continue
8362 }
8363 _ = v_1_1_0.Args[1]
8364 mul := v_1_1_0.Args[0]
8365 if mul.Op != OpMul64 {
8366 continue
8367 }
8368 _ = mul.Args[1]
8369 mul_0 := mul.Args[0]
8370 mul_1 := mul.Args[1]
8371 for _i2 := 0; _i2 <= 1; _i2, mul_0, mul_1 = _i2+1, mul_1, mul_0 {
8372 if mul_0.Op != OpConst64 {
8373 continue
8374 }
8375 m := auxIntToInt64(mul_0.AuxInt)
8376 if mul_1.Op != OpZeroExt16to64 || x != mul_1.Args[0] {
8377 continue
8378 }
8379 v_1_1_0_1 := v_1_1_0.Args[1]
8380 if v_1_1_0_1.Op != OpConst64 {
8381 continue
8382 }
8383 s := auxIntToInt64(v_1_1_0_1.AuxInt)
8384 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)) {
8385 continue
8386 }
8387 v.reset(OpLeq16U)
8388 v0 := b.NewValue0(v.Pos, OpRotateLeft16, typ.UInt16)
8389 v1 := b.NewValue0(v.Pos, OpMul16, typ.UInt16)
8390 v2 := b.NewValue0(v.Pos, OpConst16, typ.UInt16)
8391 v2.AuxInt = int16ToAuxInt(int16(udivisible16(c).m))
8392 v1.AddArg2(v2, x)
8393 v3 := b.NewValue0(v.Pos, OpConst16, typ.UInt16)
8394 v3.AuxInt = int16ToAuxInt(int16(16 - udivisible16(c).k))
8395 v0.AddArg2(v1, v3)
8396 v4 := b.NewValue0(v.Pos, OpConst16, typ.UInt16)
8397 v4.AuxInt = int16ToAuxInt(int16(udivisible16(c).max))
8398 v.AddArg2(v0, v4)
8399 return true
8400 }
8401 }
8402 }
8403 break
8404 }
8405
8406
8407
8408 for {
8409 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
8410 x := v_0
8411 if v_1.Op != OpMul16 {
8412 continue
8413 }
8414 _ = v_1.Args[1]
8415 v_1_0 := v_1.Args[0]
8416 v_1_1 := v_1.Args[1]
8417 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
8418 if v_1_0.Op != OpConst16 {
8419 continue
8420 }
8421 c := auxIntToInt16(v_1_0.AuxInt)
8422 if v_1_1.Op != OpTrunc32to16 {
8423 continue
8424 }
8425 v_1_1_0 := v_1_1.Args[0]
8426 if v_1_1_0.Op != OpRsh32Ux64 {
8427 continue
8428 }
8429 _ = v_1_1_0.Args[1]
8430 mul := v_1_1_0.Args[0]
8431 if mul.Op != OpMul32 {
8432 continue
8433 }
8434 _ = mul.Args[1]
8435 mul_0 := mul.Args[0]
8436 mul_1 := mul.Args[1]
8437 for _i2 := 0; _i2 <= 1; _i2, mul_0, mul_1 = _i2+1, mul_1, mul_0 {
8438 if mul_0.Op != OpConst32 {
8439 continue
8440 }
8441 m := auxIntToInt32(mul_0.AuxInt)
8442 if mul_1.Op != OpZeroExt16to32 || x != mul_1.Args[0] {
8443 continue
8444 }
8445 v_1_1_0_1 := v_1_1_0.Args[1]
8446 if v_1_1_0_1.Op != OpConst64 {
8447 continue
8448 }
8449 s := auxIntToInt64(v_1_1_0_1.AuxInt)
8450 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)) {
8451 continue
8452 }
8453 v.reset(OpLeq16U)
8454 v0 := b.NewValue0(v.Pos, OpRotateLeft16, typ.UInt16)
8455 v1 := b.NewValue0(v.Pos, OpMul16, typ.UInt16)
8456 v2 := b.NewValue0(v.Pos, OpConst16, typ.UInt16)
8457 v2.AuxInt = int16ToAuxInt(int16(udivisible16(c).m))
8458 v1.AddArg2(v2, x)
8459 v3 := b.NewValue0(v.Pos, OpConst16, typ.UInt16)
8460 v3.AuxInt = int16ToAuxInt(int16(16 - udivisible16(c).k))
8461 v0.AddArg2(v1, v3)
8462 v4 := b.NewValue0(v.Pos, OpConst16, typ.UInt16)
8463 v4.AuxInt = int16ToAuxInt(int16(udivisible16(c).max))
8464 v.AddArg2(v0, v4)
8465 return true
8466 }
8467 }
8468 }
8469 break
8470 }
8471
8472
8473
8474 for {
8475 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
8476 x := v_0
8477 if v_1.Op != OpMul16 {
8478 continue
8479 }
8480 _ = v_1.Args[1]
8481 v_1_0 := v_1.Args[0]
8482 v_1_1 := v_1.Args[1]
8483 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
8484 if v_1_0.Op != OpConst16 {
8485 continue
8486 }
8487 c := auxIntToInt16(v_1_0.AuxInt)
8488 if v_1_1.Op != OpTrunc32to16 {
8489 continue
8490 }
8491 v_1_1_0 := v_1_1.Args[0]
8492 if v_1_1_0.Op != OpRsh32Ux64 {
8493 continue
8494 }
8495 _ = v_1_1_0.Args[1]
8496 mul := v_1_1_0.Args[0]
8497 if mul.Op != OpMul32 {
8498 continue
8499 }
8500 _ = mul.Args[1]
8501 mul_0 := mul.Args[0]
8502 mul_1 := mul.Args[1]
8503 for _i2 := 0; _i2 <= 1; _i2, mul_0, mul_1 = _i2+1, mul_1, mul_0 {
8504 if mul_0.Op != OpConst32 {
8505 continue
8506 }
8507 m := auxIntToInt32(mul_0.AuxInt)
8508 if mul_1.Op != OpRsh32Ux64 {
8509 continue
8510 }
8511 _ = mul_1.Args[1]
8512 mul_1_0 := mul_1.Args[0]
8513 if mul_1_0.Op != OpZeroExt16to32 || x != mul_1_0.Args[0] {
8514 continue
8515 }
8516 mul_1_1 := mul_1.Args[1]
8517 if mul_1_1.Op != OpConst64 || auxIntToInt64(mul_1_1.AuxInt) != 1 {
8518 continue
8519 }
8520 v_1_1_0_1 := v_1_1_0.Args[1]
8521 if v_1_1_0_1.Op != OpConst64 {
8522 continue
8523 }
8524 s := auxIntToInt64(v_1_1_0_1.AuxInt)
8525 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)) {
8526 continue
8527 }
8528 v.reset(OpLeq16U)
8529 v0 := b.NewValue0(v.Pos, OpRotateLeft16, typ.UInt16)
8530 v1 := b.NewValue0(v.Pos, OpMul16, typ.UInt16)
8531 v2 := b.NewValue0(v.Pos, OpConst16, typ.UInt16)
8532 v2.AuxInt = int16ToAuxInt(int16(udivisible16(c).m))
8533 v1.AddArg2(v2, x)
8534 v3 := b.NewValue0(v.Pos, OpConst16, typ.UInt16)
8535 v3.AuxInt = int16ToAuxInt(int16(16 - udivisible16(c).k))
8536 v0.AddArg2(v1, v3)
8537 v4 := b.NewValue0(v.Pos, OpConst16, typ.UInt16)
8538 v4.AuxInt = int16ToAuxInt(int16(udivisible16(c).max))
8539 v.AddArg2(v0, v4)
8540 return true
8541 }
8542 }
8543 }
8544 break
8545 }
8546
8547
8548
8549 for {
8550 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
8551 x := v_0
8552 if v_1.Op != OpMul16 {
8553 continue
8554 }
8555 _ = v_1.Args[1]
8556 v_1_0 := v_1.Args[0]
8557 v_1_1 := v_1.Args[1]
8558 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
8559 if v_1_0.Op != OpConst16 {
8560 continue
8561 }
8562 c := auxIntToInt16(v_1_0.AuxInt)
8563 if v_1_1.Op != OpTrunc32to16 {
8564 continue
8565 }
8566 v_1_1_0 := v_1_1.Args[0]
8567 if v_1_1_0.Op != OpRsh32Ux64 {
8568 continue
8569 }
8570 _ = v_1_1_0.Args[1]
8571 v_1_1_0_0 := v_1_1_0.Args[0]
8572 if v_1_1_0_0.Op != OpAvg32u {
8573 continue
8574 }
8575 _ = v_1_1_0_0.Args[1]
8576 v_1_1_0_0_0 := v_1_1_0_0.Args[0]
8577 if v_1_1_0_0_0.Op != OpLsh32x64 {
8578 continue
8579 }
8580 _ = v_1_1_0_0_0.Args[1]
8581 v_1_1_0_0_0_0 := v_1_1_0_0_0.Args[0]
8582 if v_1_1_0_0_0_0.Op != OpZeroExt16to32 || x != v_1_1_0_0_0_0.Args[0] {
8583 continue
8584 }
8585 v_1_1_0_0_0_1 := v_1_1_0_0_0.Args[1]
8586 if v_1_1_0_0_0_1.Op != OpConst64 || auxIntToInt64(v_1_1_0_0_0_1.AuxInt) != 16 {
8587 continue
8588 }
8589 mul := v_1_1_0_0.Args[1]
8590 if mul.Op != OpMul32 {
8591 continue
8592 }
8593 _ = mul.Args[1]
8594 mul_0 := mul.Args[0]
8595 mul_1 := mul.Args[1]
8596 for _i2 := 0; _i2 <= 1; _i2, mul_0, mul_1 = _i2+1, mul_1, mul_0 {
8597 if mul_0.Op != OpConst32 {
8598 continue
8599 }
8600 m := auxIntToInt32(mul_0.AuxInt)
8601 if mul_1.Op != OpZeroExt16to32 || x != mul_1.Args[0] {
8602 continue
8603 }
8604 v_1_1_0_1 := v_1_1_0.Args[1]
8605 if v_1_1_0_1.Op != OpConst64 {
8606 continue
8607 }
8608 s := auxIntToInt64(v_1_1_0_1.AuxInt)
8609 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)) {
8610 continue
8611 }
8612 v.reset(OpLeq16U)
8613 v0 := b.NewValue0(v.Pos, OpRotateLeft16, typ.UInt16)
8614 v1 := b.NewValue0(v.Pos, OpMul16, typ.UInt16)
8615 v2 := b.NewValue0(v.Pos, OpConst16, typ.UInt16)
8616 v2.AuxInt = int16ToAuxInt(int16(udivisible16(c).m))
8617 v1.AddArg2(v2, x)
8618 v3 := b.NewValue0(v.Pos, OpConst16, typ.UInt16)
8619 v3.AuxInt = int16ToAuxInt(int16(16 - udivisible16(c).k))
8620 v0.AddArg2(v1, v3)
8621 v4 := b.NewValue0(v.Pos, OpConst16, typ.UInt16)
8622 v4.AuxInt = int16ToAuxInt(int16(udivisible16(c).max))
8623 v.AddArg2(v0, v4)
8624 return true
8625 }
8626 }
8627 }
8628 break
8629 }
8630
8631
8632
8633 for {
8634 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
8635 x := v_0
8636 if v_1.Op != OpMul16 {
8637 continue
8638 }
8639 _ = v_1.Args[1]
8640 v_1_0 := v_1.Args[0]
8641 v_1_1 := v_1.Args[1]
8642 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
8643 if v_1_0.Op != OpConst16 {
8644 continue
8645 }
8646 c := auxIntToInt16(v_1_0.AuxInt)
8647 if v_1_1.Op != OpSub16 {
8648 continue
8649 }
8650 _ = v_1_1.Args[1]
8651 v_1_1_0 := v_1_1.Args[0]
8652 if v_1_1_0.Op != OpRsh32x64 {
8653 continue
8654 }
8655 _ = v_1_1_0.Args[1]
8656 mul := v_1_1_0.Args[0]
8657 if mul.Op != OpMul32 {
8658 continue
8659 }
8660 _ = mul.Args[1]
8661 mul_0 := mul.Args[0]
8662 mul_1 := mul.Args[1]
8663 for _i2 := 0; _i2 <= 1; _i2, mul_0, mul_1 = _i2+1, mul_1, mul_0 {
8664 if mul_0.Op != OpConst32 {
8665 continue
8666 }
8667 m := auxIntToInt32(mul_0.AuxInt)
8668 if mul_1.Op != OpSignExt16to32 || x != mul_1.Args[0] {
8669 continue
8670 }
8671 v_1_1_0_1 := v_1_1_0.Args[1]
8672 if v_1_1_0_1.Op != OpConst64 {
8673 continue
8674 }
8675 s := auxIntToInt64(v_1_1_0_1.AuxInt)
8676 v_1_1_1 := v_1_1.Args[1]
8677 if v_1_1_1.Op != OpRsh32x64 {
8678 continue
8679 }
8680 _ = v_1_1_1.Args[1]
8681 v_1_1_1_0 := v_1_1_1.Args[0]
8682 if v_1_1_1_0.Op != OpSignExt16to32 || x != v_1_1_1_0.Args[0] {
8683 continue
8684 }
8685 v_1_1_1_1 := v_1_1_1.Args[1]
8686 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)) {
8687 continue
8688 }
8689 v.reset(OpLeq16U)
8690 v0 := b.NewValue0(v.Pos, OpRotateLeft16, typ.UInt16)
8691 v1 := b.NewValue0(v.Pos, OpAdd16, typ.UInt16)
8692 v2 := b.NewValue0(v.Pos, OpMul16, typ.UInt16)
8693 v3 := b.NewValue0(v.Pos, OpConst16, typ.UInt16)
8694 v3.AuxInt = int16ToAuxInt(int16(sdivisible16(c).m))
8695 v2.AddArg2(v3, x)
8696 v4 := b.NewValue0(v.Pos, OpConst16, typ.UInt16)
8697 v4.AuxInt = int16ToAuxInt(int16(sdivisible16(c).a))
8698 v1.AddArg2(v2, v4)
8699 v5 := b.NewValue0(v.Pos, OpConst16, typ.UInt16)
8700 v5.AuxInt = int16ToAuxInt(int16(16 - sdivisible16(c).k))
8701 v0.AddArg2(v1, v5)
8702 v6 := b.NewValue0(v.Pos, OpConst16, typ.UInt16)
8703 v6.AuxInt = int16ToAuxInt(int16(sdivisible16(c).max))
8704 v.AddArg2(v0, v6)
8705 return true
8706 }
8707 }
8708 }
8709 break
8710 }
8711
8712
8713
8714 for {
8715 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
8716 n := v_0
8717 if v_1.Op != OpLsh16x64 {
8718 continue
8719 }
8720 _ = v_1.Args[1]
8721 v_1_0 := v_1.Args[0]
8722 if v_1_0.Op != OpRsh16x64 {
8723 continue
8724 }
8725 _ = v_1_0.Args[1]
8726 v_1_0_0 := v_1_0.Args[0]
8727 if v_1_0_0.Op != OpAdd16 {
8728 continue
8729 }
8730 t := v_1_0_0.Type
8731 _ = v_1_0_0.Args[1]
8732 v_1_0_0_0 := v_1_0_0.Args[0]
8733 v_1_0_0_1 := v_1_0_0.Args[1]
8734 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 {
8735 if n != v_1_0_0_0 || v_1_0_0_1.Op != OpRsh16Ux64 || v_1_0_0_1.Type != t {
8736 continue
8737 }
8738 _ = v_1_0_0_1.Args[1]
8739 v_1_0_0_1_0 := v_1_0_0_1.Args[0]
8740 if v_1_0_0_1_0.Op != OpRsh16x64 || v_1_0_0_1_0.Type != t {
8741 continue
8742 }
8743 _ = v_1_0_0_1_0.Args[1]
8744 if n != v_1_0_0_1_0.Args[0] {
8745 continue
8746 }
8747 v_1_0_0_1_0_1 := v_1_0_0_1_0.Args[1]
8748 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 {
8749 continue
8750 }
8751 v_1_0_0_1_1 := v_1_0_0_1.Args[1]
8752 if v_1_0_0_1_1.Op != OpConst64 || v_1_0_0_1_1.Type != typ.UInt64 {
8753 continue
8754 }
8755 kbar := auxIntToInt64(v_1_0_0_1_1.AuxInt)
8756 v_1_0_1 := v_1_0.Args[1]
8757 if v_1_0_1.Op != OpConst64 || v_1_0_1.Type != typ.UInt64 {
8758 continue
8759 }
8760 k := auxIntToInt64(v_1_0_1.AuxInt)
8761 v_1_1 := v_1.Args[1]
8762 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) {
8763 continue
8764 }
8765 v.reset(OpEq16)
8766 v0 := b.NewValue0(v.Pos, OpAnd16, t)
8767 v1 := b.NewValue0(v.Pos, OpConst16, t)
8768 v1.AuxInt = int16ToAuxInt(1<<uint(k) - 1)
8769 v0.AddArg2(n, v1)
8770 v2 := b.NewValue0(v.Pos, OpConst16, t)
8771 v2.AuxInt = int16ToAuxInt(0)
8772 v.AddArg2(v0, v2)
8773 return true
8774 }
8775 }
8776 break
8777 }
8778
8779
8780
8781 for {
8782 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
8783 s := v_0
8784 if s.Op != OpSub16 {
8785 continue
8786 }
8787 y := s.Args[1]
8788 x := s.Args[0]
8789 if v_1.Op != OpConst16 || auxIntToInt16(v_1.AuxInt) != 0 || !(s.Uses == 1) {
8790 continue
8791 }
8792 v.reset(OpEq16)
8793 v.AddArg2(x, y)
8794 return true
8795 }
8796 break
8797 }
8798
8799
8800
8801 for {
8802 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
8803 if v_0.Op != OpAnd16 {
8804 continue
8805 }
8806 t := v_0.Type
8807 _ = v_0.Args[1]
8808 v_0_0 := v_0.Args[0]
8809 v_0_1 := v_0.Args[1]
8810 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
8811 x := v_0_0
8812 if v_0_1.Op != OpConst16 || v_0_1.Type != t {
8813 continue
8814 }
8815 y := auxIntToInt16(v_0_1.AuxInt)
8816 if v_1.Op != OpConst16 || v_1.Type != t || auxIntToInt16(v_1.AuxInt) != y || !(oneBit16(y)) {
8817 continue
8818 }
8819 v.reset(OpNeq16)
8820 v0 := b.NewValue0(v.Pos, OpAnd16, t)
8821 v1 := b.NewValue0(v.Pos, OpConst16, t)
8822 v1.AuxInt = int16ToAuxInt(y)
8823 v0.AddArg2(x, v1)
8824 v2 := b.NewValue0(v.Pos, OpConst16, t)
8825 v2.AuxInt = int16ToAuxInt(0)
8826 v.AddArg2(v0, v2)
8827 return true
8828 }
8829 }
8830 break
8831 }
8832 return false
8833 }
8834 func rewriteValuegeneric_OpEq32(v *Value) bool {
8835 v_1 := v.Args[1]
8836 v_0 := v.Args[0]
8837 b := v.Block
8838 typ := &b.Func.Config.Types
8839
8840
8841 for {
8842 x := v_0
8843 if x != v_1 {
8844 break
8845 }
8846 v.reset(OpConstBool)
8847 v.AuxInt = boolToAuxInt(true)
8848 return true
8849 }
8850
8851
8852 for {
8853 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
8854 if v_0.Op != OpConst32 {
8855 continue
8856 }
8857 t := v_0.Type
8858 c := auxIntToInt32(v_0.AuxInt)
8859 if v_1.Op != OpAdd32 {
8860 continue
8861 }
8862 _ = v_1.Args[1]
8863 v_1_0 := v_1.Args[0]
8864 v_1_1 := v_1.Args[1]
8865 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
8866 if v_1_0.Op != OpConst32 || v_1_0.Type != t {
8867 continue
8868 }
8869 d := auxIntToInt32(v_1_0.AuxInt)
8870 x := v_1_1
8871 v.reset(OpEq32)
8872 v0 := b.NewValue0(v.Pos, OpConst32, t)
8873 v0.AuxInt = int32ToAuxInt(c - d)
8874 v.AddArg2(v0, x)
8875 return true
8876 }
8877 }
8878 break
8879 }
8880
8881
8882 for {
8883 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
8884 if v_0.Op != OpConst32 {
8885 continue
8886 }
8887 c := auxIntToInt32(v_0.AuxInt)
8888 if v_1.Op != OpConst32 {
8889 continue
8890 }
8891 d := auxIntToInt32(v_1.AuxInt)
8892 v.reset(OpConstBool)
8893 v.AuxInt = boolToAuxInt(c == d)
8894 return true
8895 }
8896 break
8897 }
8898
8899
8900
8901 for {
8902 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
8903 x := v_0
8904 if v_1.Op != OpMul32 {
8905 continue
8906 }
8907 _ = v_1.Args[1]
8908 v_1_0 := v_1.Args[0]
8909 v_1_1 := v_1.Args[1]
8910 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
8911 if v_1_0.Op != OpConst32 {
8912 continue
8913 }
8914 c := auxIntToInt32(v_1_0.AuxInt)
8915 if v_1_1.Op != OpRsh32Ux64 {
8916 continue
8917 }
8918 _ = v_1_1.Args[1]
8919 mul := v_1_1.Args[0]
8920 if mul.Op != OpHmul32u {
8921 continue
8922 }
8923 _ = mul.Args[1]
8924 mul_0 := mul.Args[0]
8925 mul_1 := mul.Args[1]
8926 for _i2 := 0; _i2 <= 1; _i2, mul_0, mul_1 = _i2+1, mul_1, mul_0 {
8927 if mul_0.Op != OpConst32 {
8928 continue
8929 }
8930 m := auxIntToInt32(mul_0.AuxInt)
8931 if x != mul_1 {
8932 continue
8933 }
8934 v_1_1_1 := v_1_1.Args[1]
8935 if v_1_1_1.Op != OpConst64 {
8936 continue
8937 }
8938 s := auxIntToInt64(v_1_1_1.AuxInt)
8939 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)) {
8940 continue
8941 }
8942 v.reset(OpLeq32U)
8943 v0 := b.NewValue0(v.Pos, OpRotateLeft32, typ.UInt32)
8944 v1 := b.NewValue0(v.Pos, OpMul32, typ.UInt32)
8945 v2 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
8946 v2.AuxInt = int32ToAuxInt(int32(udivisible32(c).m))
8947 v1.AddArg2(v2, x)
8948 v3 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
8949 v3.AuxInt = int32ToAuxInt(int32(32 - udivisible32(c).k))
8950 v0.AddArg2(v1, v3)
8951 v4 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
8952 v4.AuxInt = int32ToAuxInt(int32(udivisible32(c).max))
8953 v.AddArg2(v0, v4)
8954 return true
8955 }
8956 }
8957 }
8958 break
8959 }
8960
8961
8962
8963 for {
8964 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
8965 x := v_0
8966 if v_1.Op != OpMul32 {
8967 continue
8968 }
8969 _ = v_1.Args[1]
8970 v_1_0 := v_1.Args[0]
8971 v_1_1 := v_1.Args[1]
8972 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
8973 if v_1_0.Op != OpConst32 {
8974 continue
8975 }
8976 c := auxIntToInt32(v_1_0.AuxInt)
8977 if v_1_1.Op != OpRsh32Ux64 {
8978 continue
8979 }
8980 _ = v_1_1.Args[1]
8981 mul := v_1_1.Args[0]
8982 if mul.Op != OpHmul32u {
8983 continue
8984 }
8985 _ = mul.Args[1]
8986 mul_0 := mul.Args[0]
8987 mul_1 := mul.Args[1]
8988 for _i2 := 0; _i2 <= 1; _i2, mul_0, mul_1 = _i2+1, mul_1, mul_0 {
8989 if mul_0.Op != OpConst32 || mul_0.Type != typ.UInt32 {
8990 continue
8991 }
8992 m := auxIntToInt32(mul_0.AuxInt)
8993 if mul_1.Op != OpRsh32Ux64 {
8994 continue
8995 }
8996 _ = mul_1.Args[1]
8997 if x != mul_1.Args[0] {
8998 continue
8999 }
9000 mul_1_1 := mul_1.Args[1]
9001 if mul_1_1.Op != OpConst64 || auxIntToInt64(mul_1_1.AuxInt) != 1 {
9002 continue
9003 }
9004 v_1_1_1 := v_1_1.Args[1]
9005 if v_1_1_1.Op != OpConst64 {
9006 continue
9007 }
9008 s := auxIntToInt64(v_1_1_1.AuxInt)
9009 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)) {
9010 continue
9011 }
9012 v.reset(OpLeq32U)
9013 v0 := b.NewValue0(v.Pos, OpRotateLeft32, typ.UInt32)
9014 v1 := b.NewValue0(v.Pos, OpMul32, typ.UInt32)
9015 v2 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
9016 v2.AuxInt = int32ToAuxInt(int32(udivisible32(c).m))
9017 v1.AddArg2(v2, x)
9018 v3 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
9019 v3.AuxInt = int32ToAuxInt(int32(32 - udivisible32(c).k))
9020 v0.AddArg2(v1, v3)
9021 v4 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
9022 v4.AuxInt = int32ToAuxInt(int32(udivisible32(c).max))
9023 v.AddArg2(v0, v4)
9024 return true
9025 }
9026 }
9027 }
9028 break
9029 }
9030
9031
9032
9033 for {
9034 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
9035 x := v_0
9036 if v_1.Op != OpMul32 {
9037 continue
9038 }
9039 _ = v_1.Args[1]
9040 v_1_0 := v_1.Args[0]
9041 v_1_1 := v_1.Args[1]
9042 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
9043 if v_1_0.Op != OpConst32 {
9044 continue
9045 }
9046 c := auxIntToInt32(v_1_0.AuxInt)
9047 if v_1_1.Op != OpRsh32Ux64 {
9048 continue
9049 }
9050 _ = v_1_1.Args[1]
9051 v_1_1_0 := v_1_1.Args[0]
9052 if v_1_1_0.Op != OpAvg32u {
9053 continue
9054 }
9055 _ = v_1_1_0.Args[1]
9056 if x != v_1_1_0.Args[0] {
9057 continue
9058 }
9059 mul := v_1_1_0.Args[1]
9060 if mul.Op != OpHmul32u {
9061 continue
9062 }
9063 _ = mul.Args[1]
9064 mul_0 := mul.Args[0]
9065 mul_1 := mul.Args[1]
9066 for _i2 := 0; _i2 <= 1; _i2, mul_0, mul_1 = _i2+1, mul_1, mul_0 {
9067 if mul_0.Op != OpConst32 {
9068 continue
9069 }
9070 m := auxIntToInt32(mul_0.AuxInt)
9071 if x != mul_1 {
9072 continue
9073 }
9074 v_1_1_1 := v_1_1.Args[1]
9075 if v_1_1_1.Op != OpConst64 {
9076 continue
9077 }
9078 s := auxIntToInt64(v_1_1_1.AuxInt)
9079 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)) {
9080 continue
9081 }
9082 v.reset(OpLeq32U)
9083 v0 := b.NewValue0(v.Pos, OpRotateLeft32, typ.UInt32)
9084 v1 := b.NewValue0(v.Pos, OpMul32, typ.UInt32)
9085 v2 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
9086 v2.AuxInt = int32ToAuxInt(int32(udivisible32(c).m))
9087 v1.AddArg2(v2, x)
9088 v3 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
9089 v3.AuxInt = int32ToAuxInt(int32(32 - udivisible32(c).k))
9090 v0.AddArg2(v1, v3)
9091 v4 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
9092 v4.AuxInt = int32ToAuxInt(int32(udivisible32(c).max))
9093 v.AddArg2(v0, v4)
9094 return true
9095 }
9096 }
9097 }
9098 break
9099 }
9100
9101
9102
9103 for {
9104 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
9105 x := v_0
9106 if v_1.Op != OpMul32 {
9107 continue
9108 }
9109 _ = v_1.Args[1]
9110 v_1_0 := v_1.Args[0]
9111 v_1_1 := v_1.Args[1]
9112 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
9113 if v_1_0.Op != OpConst32 {
9114 continue
9115 }
9116 c := auxIntToInt32(v_1_0.AuxInt)
9117 if v_1_1.Op != OpTrunc64to32 {
9118 continue
9119 }
9120 v_1_1_0 := v_1_1.Args[0]
9121 if v_1_1_0.Op != OpRsh64Ux64 {
9122 continue
9123 }
9124 _ = v_1_1_0.Args[1]
9125 mul := v_1_1_0.Args[0]
9126 if mul.Op != OpMul64 {
9127 continue
9128 }
9129 _ = mul.Args[1]
9130 mul_0 := mul.Args[0]
9131 mul_1 := mul.Args[1]
9132 for _i2 := 0; _i2 <= 1; _i2, mul_0, mul_1 = _i2+1, mul_1, mul_0 {
9133 if mul_0.Op != OpConst64 {
9134 continue
9135 }
9136 m := auxIntToInt64(mul_0.AuxInt)
9137 if mul_1.Op != OpZeroExt32to64 || x != mul_1.Args[0] {
9138 continue
9139 }
9140 v_1_1_0_1 := v_1_1_0.Args[1]
9141 if v_1_1_0_1.Op != OpConst64 {
9142 continue
9143 }
9144 s := auxIntToInt64(v_1_1_0_1.AuxInt)
9145 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)) {
9146 continue
9147 }
9148 v.reset(OpLeq32U)
9149 v0 := b.NewValue0(v.Pos, OpRotateLeft32, typ.UInt32)
9150 v1 := b.NewValue0(v.Pos, OpMul32, typ.UInt32)
9151 v2 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
9152 v2.AuxInt = int32ToAuxInt(int32(udivisible32(c).m))
9153 v1.AddArg2(v2, x)
9154 v3 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
9155 v3.AuxInt = int32ToAuxInt(int32(32 - udivisible32(c).k))
9156 v0.AddArg2(v1, v3)
9157 v4 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
9158 v4.AuxInt = int32ToAuxInt(int32(udivisible32(c).max))
9159 v.AddArg2(v0, v4)
9160 return true
9161 }
9162 }
9163 }
9164 break
9165 }
9166
9167
9168
9169 for {
9170 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
9171 x := v_0
9172 if v_1.Op != OpMul32 {
9173 continue
9174 }
9175 _ = v_1.Args[1]
9176 v_1_0 := v_1.Args[0]
9177 v_1_1 := v_1.Args[1]
9178 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
9179 if v_1_0.Op != OpConst32 {
9180 continue
9181 }
9182 c := auxIntToInt32(v_1_0.AuxInt)
9183 if v_1_1.Op != OpTrunc64to32 {
9184 continue
9185 }
9186 v_1_1_0 := v_1_1.Args[0]
9187 if v_1_1_0.Op != OpRsh64Ux64 {
9188 continue
9189 }
9190 _ = v_1_1_0.Args[1]
9191 mul := v_1_1_0.Args[0]
9192 if mul.Op != OpMul64 {
9193 continue
9194 }
9195 _ = mul.Args[1]
9196 mul_0 := mul.Args[0]
9197 mul_1 := mul.Args[1]
9198 for _i2 := 0; _i2 <= 1; _i2, mul_0, mul_1 = _i2+1, mul_1, mul_0 {
9199 if mul_0.Op != OpConst64 {
9200 continue
9201 }
9202 m := auxIntToInt64(mul_0.AuxInt)
9203 if mul_1.Op != OpRsh64Ux64 {
9204 continue
9205 }
9206 _ = mul_1.Args[1]
9207 mul_1_0 := mul_1.Args[0]
9208 if mul_1_0.Op != OpZeroExt32to64 || x != mul_1_0.Args[0] {
9209 continue
9210 }
9211 mul_1_1 := mul_1.Args[1]
9212 if mul_1_1.Op != OpConst64 || auxIntToInt64(mul_1_1.AuxInt) != 1 {
9213 continue
9214 }
9215 v_1_1_0_1 := v_1_1_0.Args[1]
9216 if v_1_1_0_1.Op != OpConst64 {
9217 continue
9218 }
9219 s := auxIntToInt64(v_1_1_0_1.AuxInt)
9220 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)) {
9221 continue
9222 }
9223 v.reset(OpLeq32U)
9224 v0 := b.NewValue0(v.Pos, OpRotateLeft32, typ.UInt32)
9225 v1 := b.NewValue0(v.Pos, OpMul32, typ.UInt32)
9226 v2 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
9227 v2.AuxInt = int32ToAuxInt(int32(udivisible32(c).m))
9228 v1.AddArg2(v2, x)
9229 v3 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
9230 v3.AuxInt = int32ToAuxInt(int32(32 - udivisible32(c).k))
9231 v0.AddArg2(v1, v3)
9232 v4 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
9233 v4.AuxInt = int32ToAuxInt(int32(udivisible32(c).max))
9234 v.AddArg2(v0, v4)
9235 return true
9236 }
9237 }
9238 }
9239 break
9240 }
9241
9242
9243
9244 for {
9245 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
9246 x := v_0
9247 if v_1.Op != OpMul32 {
9248 continue
9249 }
9250 _ = v_1.Args[1]
9251 v_1_0 := v_1.Args[0]
9252 v_1_1 := v_1.Args[1]
9253 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
9254 if v_1_0.Op != OpConst32 {
9255 continue
9256 }
9257 c := auxIntToInt32(v_1_0.AuxInt)
9258 if v_1_1.Op != OpTrunc64to32 {
9259 continue
9260 }
9261 v_1_1_0 := v_1_1.Args[0]
9262 if v_1_1_0.Op != OpRsh64Ux64 {
9263 continue
9264 }
9265 _ = v_1_1_0.Args[1]
9266 v_1_1_0_0 := v_1_1_0.Args[0]
9267 if v_1_1_0_0.Op != OpAvg64u {
9268 continue
9269 }
9270 _ = v_1_1_0_0.Args[1]
9271 v_1_1_0_0_0 := v_1_1_0_0.Args[0]
9272 if v_1_1_0_0_0.Op != OpLsh64x64 {
9273 continue
9274 }
9275 _ = v_1_1_0_0_0.Args[1]
9276 v_1_1_0_0_0_0 := v_1_1_0_0_0.Args[0]
9277 if v_1_1_0_0_0_0.Op != OpZeroExt32to64 || x != v_1_1_0_0_0_0.Args[0] {
9278 continue
9279 }
9280 v_1_1_0_0_0_1 := v_1_1_0_0_0.Args[1]
9281 if v_1_1_0_0_0_1.Op != OpConst64 || auxIntToInt64(v_1_1_0_0_0_1.AuxInt) != 32 {
9282 continue
9283 }
9284 mul := v_1_1_0_0.Args[1]
9285 if mul.Op != OpMul64 {
9286 continue
9287 }
9288 _ = mul.Args[1]
9289 mul_0 := mul.Args[0]
9290 mul_1 := mul.Args[1]
9291 for _i2 := 0; _i2 <= 1; _i2, mul_0, mul_1 = _i2+1, mul_1, mul_0 {
9292 if mul_0.Op != OpConst64 {
9293 continue
9294 }
9295 m := auxIntToInt64(mul_0.AuxInt)
9296 if mul_1.Op != OpZeroExt32to64 || x != mul_1.Args[0] {
9297 continue
9298 }
9299 v_1_1_0_1 := v_1_1_0.Args[1]
9300 if v_1_1_0_1.Op != OpConst64 {
9301 continue
9302 }
9303 s := auxIntToInt64(v_1_1_0_1.AuxInt)
9304 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)) {
9305 continue
9306 }
9307 v.reset(OpLeq32U)
9308 v0 := b.NewValue0(v.Pos, OpRotateLeft32, typ.UInt32)
9309 v1 := b.NewValue0(v.Pos, OpMul32, typ.UInt32)
9310 v2 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
9311 v2.AuxInt = int32ToAuxInt(int32(udivisible32(c).m))
9312 v1.AddArg2(v2, x)
9313 v3 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
9314 v3.AuxInt = int32ToAuxInt(int32(32 - udivisible32(c).k))
9315 v0.AddArg2(v1, v3)
9316 v4 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
9317 v4.AuxInt = int32ToAuxInt(int32(udivisible32(c).max))
9318 v.AddArg2(v0, v4)
9319 return true
9320 }
9321 }
9322 }
9323 break
9324 }
9325
9326
9327
9328 for {
9329 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
9330 x := v_0
9331 if v_1.Op != OpMul32 {
9332 continue
9333 }
9334 _ = v_1.Args[1]
9335 v_1_0 := v_1.Args[0]
9336 v_1_1 := v_1.Args[1]
9337 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
9338 if v_1_0.Op != OpConst32 {
9339 continue
9340 }
9341 c := auxIntToInt32(v_1_0.AuxInt)
9342 if v_1_1.Op != OpSub32 {
9343 continue
9344 }
9345 _ = v_1_1.Args[1]
9346 v_1_1_0 := v_1_1.Args[0]
9347 if v_1_1_0.Op != OpRsh64x64 {
9348 continue
9349 }
9350 _ = v_1_1_0.Args[1]
9351 mul := v_1_1_0.Args[0]
9352 if mul.Op != OpMul64 {
9353 continue
9354 }
9355 _ = mul.Args[1]
9356 mul_0 := mul.Args[0]
9357 mul_1 := mul.Args[1]
9358 for _i2 := 0; _i2 <= 1; _i2, mul_0, mul_1 = _i2+1, mul_1, mul_0 {
9359 if mul_0.Op != OpConst64 {
9360 continue
9361 }
9362 m := auxIntToInt64(mul_0.AuxInt)
9363 if mul_1.Op != OpSignExt32to64 || x != mul_1.Args[0] {
9364 continue
9365 }
9366 v_1_1_0_1 := v_1_1_0.Args[1]
9367 if v_1_1_0_1.Op != OpConst64 {
9368 continue
9369 }
9370 s := auxIntToInt64(v_1_1_0_1.AuxInt)
9371 v_1_1_1 := v_1_1.Args[1]
9372 if v_1_1_1.Op != OpRsh64x64 {
9373 continue
9374 }
9375 _ = v_1_1_1.Args[1]
9376 v_1_1_1_0 := v_1_1_1.Args[0]
9377 if v_1_1_1_0.Op != OpSignExt32to64 || x != v_1_1_1_0.Args[0] {
9378 continue
9379 }
9380 v_1_1_1_1 := v_1_1_1.Args[1]
9381 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)) {
9382 continue
9383 }
9384 v.reset(OpLeq32U)
9385 v0 := b.NewValue0(v.Pos, OpRotateLeft32, typ.UInt32)
9386 v1 := b.NewValue0(v.Pos, OpAdd32, typ.UInt32)
9387 v2 := b.NewValue0(v.Pos, OpMul32, typ.UInt32)
9388 v3 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
9389 v3.AuxInt = int32ToAuxInt(int32(sdivisible32(c).m))
9390 v2.AddArg2(v3, x)
9391 v4 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
9392 v4.AuxInt = int32ToAuxInt(int32(sdivisible32(c).a))
9393 v1.AddArg2(v2, v4)
9394 v5 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
9395 v5.AuxInt = int32ToAuxInt(int32(32 - sdivisible32(c).k))
9396 v0.AddArg2(v1, v5)
9397 v6 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
9398 v6.AuxInt = int32ToAuxInt(int32(sdivisible32(c).max))
9399 v.AddArg2(v0, v6)
9400 return true
9401 }
9402 }
9403 }
9404 break
9405 }
9406
9407
9408
9409 for {
9410 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
9411 x := v_0
9412 if v_1.Op != OpMul32 {
9413 continue
9414 }
9415 _ = v_1.Args[1]
9416 v_1_0 := v_1.Args[0]
9417 v_1_1 := v_1.Args[1]
9418 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
9419 if v_1_0.Op != OpConst32 {
9420 continue
9421 }
9422 c := auxIntToInt32(v_1_0.AuxInt)
9423 if v_1_1.Op != OpSub32 {
9424 continue
9425 }
9426 _ = v_1_1.Args[1]
9427 v_1_1_0 := v_1_1.Args[0]
9428 if v_1_1_0.Op != OpRsh32x64 {
9429 continue
9430 }
9431 _ = v_1_1_0.Args[1]
9432 mul := v_1_1_0.Args[0]
9433 if mul.Op != OpHmul32 {
9434 continue
9435 }
9436 _ = mul.Args[1]
9437 mul_0 := mul.Args[0]
9438 mul_1 := mul.Args[1]
9439 for _i2 := 0; _i2 <= 1; _i2, mul_0, mul_1 = _i2+1, mul_1, mul_0 {
9440 if mul_0.Op != OpConst32 {
9441 continue
9442 }
9443 m := auxIntToInt32(mul_0.AuxInt)
9444 if x != mul_1 {
9445 continue
9446 }
9447 v_1_1_0_1 := v_1_1_0.Args[1]
9448 if v_1_1_0_1.Op != OpConst64 {
9449 continue
9450 }
9451 s := auxIntToInt64(v_1_1_0_1.AuxInt)
9452 v_1_1_1 := v_1_1.Args[1]
9453 if v_1_1_1.Op != OpRsh32x64 {
9454 continue
9455 }
9456 _ = v_1_1_1.Args[1]
9457 if x != v_1_1_1.Args[0] {
9458 continue
9459 }
9460 v_1_1_1_1 := v_1_1_1.Args[1]
9461 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)) {
9462 continue
9463 }
9464 v.reset(OpLeq32U)
9465 v0 := b.NewValue0(v.Pos, OpRotateLeft32, typ.UInt32)
9466 v1 := b.NewValue0(v.Pos, OpAdd32, typ.UInt32)
9467 v2 := b.NewValue0(v.Pos, OpMul32, typ.UInt32)
9468 v3 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
9469 v3.AuxInt = int32ToAuxInt(int32(sdivisible32(c).m))
9470 v2.AddArg2(v3, x)
9471 v4 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
9472 v4.AuxInt = int32ToAuxInt(int32(sdivisible32(c).a))
9473 v1.AddArg2(v2, v4)
9474 v5 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
9475 v5.AuxInt = int32ToAuxInt(int32(32 - sdivisible32(c).k))
9476 v0.AddArg2(v1, v5)
9477 v6 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
9478 v6.AuxInt = int32ToAuxInt(int32(sdivisible32(c).max))
9479 v.AddArg2(v0, v6)
9480 return true
9481 }
9482 }
9483 }
9484 break
9485 }
9486
9487
9488
9489 for {
9490 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
9491 x := v_0
9492 if v_1.Op != OpMul32 {
9493 continue
9494 }
9495 _ = v_1.Args[1]
9496 v_1_0 := v_1.Args[0]
9497 v_1_1 := v_1.Args[1]
9498 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
9499 if v_1_0.Op != OpConst32 {
9500 continue
9501 }
9502 c := auxIntToInt32(v_1_0.AuxInt)
9503 if v_1_1.Op != OpSub32 {
9504 continue
9505 }
9506 _ = v_1_1.Args[1]
9507 v_1_1_0 := v_1_1.Args[0]
9508 if v_1_1_0.Op != OpRsh32x64 {
9509 continue
9510 }
9511 _ = v_1_1_0.Args[1]
9512 v_1_1_0_0 := v_1_1_0.Args[0]
9513 if v_1_1_0_0.Op != OpAdd32 {
9514 continue
9515 }
9516 _ = v_1_1_0_0.Args[1]
9517 v_1_1_0_0_0 := v_1_1_0_0.Args[0]
9518 v_1_1_0_0_1 := v_1_1_0_0.Args[1]
9519 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 {
9520 mul := v_1_1_0_0_0
9521 if mul.Op != OpHmul32 {
9522 continue
9523 }
9524 _ = mul.Args[1]
9525 mul_0 := mul.Args[0]
9526 mul_1 := mul.Args[1]
9527 for _i3 := 0; _i3 <= 1; _i3, mul_0, mul_1 = _i3+1, mul_1, mul_0 {
9528 if mul_0.Op != OpConst32 {
9529 continue
9530 }
9531 m := auxIntToInt32(mul_0.AuxInt)
9532 if x != mul_1 || x != v_1_1_0_0_1 {
9533 continue
9534 }
9535 v_1_1_0_1 := v_1_1_0.Args[1]
9536 if v_1_1_0_1.Op != OpConst64 {
9537 continue
9538 }
9539 s := auxIntToInt64(v_1_1_0_1.AuxInt)
9540 v_1_1_1 := v_1_1.Args[1]
9541 if v_1_1_1.Op != OpRsh32x64 {
9542 continue
9543 }
9544 _ = v_1_1_1.Args[1]
9545 if x != v_1_1_1.Args[0] {
9546 continue
9547 }
9548 v_1_1_1_1 := v_1_1_1.Args[1]
9549 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)) {
9550 continue
9551 }
9552 v.reset(OpLeq32U)
9553 v0 := b.NewValue0(v.Pos, OpRotateLeft32, typ.UInt32)
9554 v1 := b.NewValue0(v.Pos, OpAdd32, typ.UInt32)
9555 v2 := b.NewValue0(v.Pos, OpMul32, typ.UInt32)
9556 v3 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
9557 v3.AuxInt = int32ToAuxInt(int32(sdivisible32(c).m))
9558 v2.AddArg2(v3, x)
9559 v4 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
9560 v4.AuxInt = int32ToAuxInt(int32(sdivisible32(c).a))
9561 v1.AddArg2(v2, v4)
9562 v5 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
9563 v5.AuxInt = int32ToAuxInt(int32(32 - sdivisible32(c).k))
9564 v0.AddArg2(v1, v5)
9565 v6 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
9566 v6.AuxInt = int32ToAuxInt(int32(sdivisible32(c).max))
9567 v.AddArg2(v0, v6)
9568 return true
9569 }
9570 }
9571 }
9572 }
9573 break
9574 }
9575
9576
9577
9578 for {
9579 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
9580 n := v_0
9581 if v_1.Op != OpLsh32x64 {
9582 continue
9583 }
9584 _ = v_1.Args[1]
9585 v_1_0 := v_1.Args[0]
9586 if v_1_0.Op != OpRsh32x64 {
9587 continue
9588 }
9589 _ = v_1_0.Args[1]
9590 v_1_0_0 := v_1_0.Args[0]
9591 if v_1_0_0.Op != OpAdd32 {
9592 continue
9593 }
9594 t := v_1_0_0.Type
9595 _ = v_1_0_0.Args[1]
9596 v_1_0_0_0 := v_1_0_0.Args[0]
9597 v_1_0_0_1 := v_1_0_0.Args[1]
9598 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 {
9599 if n != v_1_0_0_0 || v_1_0_0_1.Op != OpRsh32Ux64 || v_1_0_0_1.Type != t {
9600 continue
9601 }
9602 _ = v_1_0_0_1.Args[1]
9603 v_1_0_0_1_0 := v_1_0_0_1.Args[0]
9604 if v_1_0_0_1_0.Op != OpRsh32x64 || v_1_0_0_1_0.Type != t {
9605 continue
9606 }
9607 _ = v_1_0_0_1_0.Args[1]
9608 if n != v_1_0_0_1_0.Args[0] {
9609 continue
9610 }
9611 v_1_0_0_1_0_1 := v_1_0_0_1_0.Args[1]
9612 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 {
9613 continue
9614 }
9615 v_1_0_0_1_1 := v_1_0_0_1.Args[1]
9616 if v_1_0_0_1_1.Op != OpConst64 || v_1_0_0_1_1.Type != typ.UInt64 {
9617 continue
9618 }
9619 kbar := auxIntToInt64(v_1_0_0_1_1.AuxInt)
9620 v_1_0_1 := v_1_0.Args[1]
9621 if v_1_0_1.Op != OpConst64 || v_1_0_1.Type != typ.UInt64 {
9622 continue
9623 }
9624 k := auxIntToInt64(v_1_0_1.AuxInt)
9625 v_1_1 := v_1.Args[1]
9626 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) {
9627 continue
9628 }
9629 v.reset(OpEq32)
9630 v0 := b.NewValue0(v.Pos, OpAnd32, t)
9631 v1 := b.NewValue0(v.Pos, OpConst32, t)
9632 v1.AuxInt = int32ToAuxInt(1<<uint(k) - 1)
9633 v0.AddArg2(n, v1)
9634 v2 := b.NewValue0(v.Pos, OpConst32, t)
9635 v2.AuxInt = int32ToAuxInt(0)
9636 v.AddArg2(v0, v2)
9637 return true
9638 }
9639 }
9640 break
9641 }
9642
9643
9644
9645 for {
9646 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
9647 s := v_0
9648 if s.Op != OpSub32 {
9649 continue
9650 }
9651 y := s.Args[1]
9652 x := s.Args[0]
9653 if v_1.Op != OpConst32 || auxIntToInt32(v_1.AuxInt) != 0 || !(s.Uses == 1) {
9654 continue
9655 }
9656 v.reset(OpEq32)
9657 v.AddArg2(x, y)
9658 return true
9659 }
9660 break
9661 }
9662
9663
9664
9665 for {
9666 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
9667 if v_0.Op != OpAnd32 {
9668 continue
9669 }
9670 t := v_0.Type
9671 _ = v_0.Args[1]
9672 v_0_0 := v_0.Args[0]
9673 v_0_1 := v_0.Args[1]
9674 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
9675 x := v_0_0
9676 if v_0_1.Op != OpConst32 || v_0_1.Type != t {
9677 continue
9678 }
9679 y := auxIntToInt32(v_0_1.AuxInt)
9680 if v_1.Op != OpConst32 || v_1.Type != t || auxIntToInt32(v_1.AuxInt) != y || !(oneBit32(y)) {
9681 continue
9682 }
9683 v.reset(OpNeq32)
9684 v0 := b.NewValue0(v.Pos, OpAnd32, t)
9685 v1 := b.NewValue0(v.Pos, OpConst32, t)
9686 v1.AuxInt = int32ToAuxInt(y)
9687 v0.AddArg2(x, v1)
9688 v2 := b.NewValue0(v.Pos, OpConst32, t)
9689 v2.AuxInt = int32ToAuxInt(0)
9690 v.AddArg2(v0, v2)
9691 return true
9692 }
9693 }
9694 break
9695 }
9696 return false
9697 }
9698 func rewriteValuegeneric_OpEq32F(v *Value) bool {
9699 v_1 := v.Args[1]
9700 v_0 := v.Args[0]
9701
9702
9703 for {
9704 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
9705 if v_0.Op != OpConst32F {
9706 continue
9707 }
9708 c := auxIntToFloat32(v_0.AuxInt)
9709 if v_1.Op != OpConst32F {
9710 continue
9711 }
9712 d := auxIntToFloat32(v_1.AuxInt)
9713 v.reset(OpConstBool)
9714 v.AuxInt = boolToAuxInt(c == d)
9715 return true
9716 }
9717 break
9718 }
9719 return false
9720 }
9721 func rewriteValuegeneric_OpEq64(v *Value) bool {
9722 v_1 := v.Args[1]
9723 v_0 := v.Args[0]
9724 b := v.Block
9725 typ := &b.Func.Config.Types
9726
9727
9728 for {
9729 x := v_0
9730 if x != v_1 {
9731 break
9732 }
9733 v.reset(OpConstBool)
9734 v.AuxInt = boolToAuxInt(true)
9735 return true
9736 }
9737
9738
9739 for {
9740 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
9741 if v_0.Op != OpConst64 {
9742 continue
9743 }
9744 t := v_0.Type
9745 c := auxIntToInt64(v_0.AuxInt)
9746 if v_1.Op != OpAdd64 {
9747 continue
9748 }
9749 _ = v_1.Args[1]
9750 v_1_0 := v_1.Args[0]
9751 v_1_1 := v_1.Args[1]
9752 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
9753 if v_1_0.Op != OpConst64 || v_1_0.Type != t {
9754 continue
9755 }
9756 d := auxIntToInt64(v_1_0.AuxInt)
9757 x := v_1_1
9758 v.reset(OpEq64)
9759 v0 := b.NewValue0(v.Pos, OpConst64, t)
9760 v0.AuxInt = int64ToAuxInt(c - d)
9761 v.AddArg2(v0, x)
9762 return true
9763 }
9764 }
9765 break
9766 }
9767
9768
9769 for {
9770 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
9771 if v_0.Op != OpConst64 {
9772 continue
9773 }
9774 c := auxIntToInt64(v_0.AuxInt)
9775 if v_1.Op != OpConst64 {
9776 continue
9777 }
9778 d := auxIntToInt64(v_1.AuxInt)
9779 v.reset(OpConstBool)
9780 v.AuxInt = boolToAuxInt(c == d)
9781 return true
9782 }
9783 break
9784 }
9785
9786
9787
9788 for {
9789 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
9790 x := v_0
9791 if v_1.Op != OpMul64 {
9792 continue
9793 }
9794 _ = v_1.Args[1]
9795 v_1_0 := v_1.Args[0]
9796 v_1_1 := v_1.Args[1]
9797 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
9798 if v_1_0.Op != OpConst64 {
9799 continue
9800 }
9801 c := auxIntToInt64(v_1_0.AuxInt)
9802 if v_1_1.Op != OpRsh64Ux64 {
9803 continue
9804 }
9805 _ = v_1_1.Args[1]
9806 mul := v_1_1.Args[0]
9807 if mul.Op != OpHmul64u {
9808 continue
9809 }
9810 _ = mul.Args[1]
9811 mul_0 := mul.Args[0]
9812 mul_1 := mul.Args[1]
9813 for _i2 := 0; _i2 <= 1; _i2, mul_0, mul_1 = _i2+1, mul_1, mul_0 {
9814 if mul_0.Op != OpConst64 {
9815 continue
9816 }
9817 m := auxIntToInt64(mul_0.AuxInt)
9818 if x != mul_1 {
9819 continue
9820 }
9821 v_1_1_1 := v_1_1.Args[1]
9822 if v_1_1_1.Op != OpConst64 {
9823 continue
9824 }
9825 s := auxIntToInt64(v_1_1_1.AuxInt)
9826 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)) {
9827 continue
9828 }
9829 v.reset(OpLeq64U)
9830 v0 := b.NewValue0(v.Pos, OpRotateLeft64, typ.UInt64)
9831 v1 := b.NewValue0(v.Pos, OpMul64, typ.UInt64)
9832 v2 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
9833 v2.AuxInt = int64ToAuxInt(int64(udivisible64(c).m))
9834 v1.AddArg2(v2, x)
9835 v3 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
9836 v3.AuxInt = int64ToAuxInt(64 - udivisible64(c).k)
9837 v0.AddArg2(v1, v3)
9838 v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
9839 v4.AuxInt = int64ToAuxInt(int64(udivisible64(c).max))
9840 v.AddArg2(v0, v4)
9841 return true
9842 }
9843 }
9844 }
9845 break
9846 }
9847
9848
9849
9850 for {
9851 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
9852 x := v_0
9853 if v_1.Op != OpMul64 {
9854 continue
9855 }
9856 _ = v_1.Args[1]
9857 v_1_0 := v_1.Args[0]
9858 v_1_1 := v_1.Args[1]
9859 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
9860 if v_1_0.Op != OpConst64 {
9861 continue
9862 }
9863 c := auxIntToInt64(v_1_0.AuxInt)
9864 if v_1_1.Op != OpRsh64Ux64 {
9865 continue
9866 }
9867 _ = v_1_1.Args[1]
9868 mul := v_1_1.Args[0]
9869 if mul.Op != OpHmul64u {
9870 continue
9871 }
9872 _ = mul.Args[1]
9873 mul_0 := mul.Args[0]
9874 mul_1 := mul.Args[1]
9875 for _i2 := 0; _i2 <= 1; _i2, mul_0, mul_1 = _i2+1, mul_1, mul_0 {
9876 if mul_0.Op != OpConst64 {
9877 continue
9878 }
9879 m := auxIntToInt64(mul_0.AuxInt)
9880 if mul_1.Op != OpRsh64Ux64 {
9881 continue
9882 }
9883 _ = mul_1.Args[1]
9884 if x != mul_1.Args[0] {
9885 continue
9886 }
9887 mul_1_1 := mul_1.Args[1]
9888 if mul_1_1.Op != OpConst64 || auxIntToInt64(mul_1_1.AuxInt) != 1 {
9889 continue
9890 }
9891 v_1_1_1 := v_1_1.Args[1]
9892 if v_1_1_1.Op != OpConst64 {
9893 continue
9894 }
9895 s := auxIntToInt64(v_1_1_1.AuxInt)
9896 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)) {
9897 continue
9898 }
9899 v.reset(OpLeq64U)
9900 v0 := b.NewValue0(v.Pos, OpRotateLeft64, typ.UInt64)
9901 v1 := b.NewValue0(v.Pos, OpMul64, typ.UInt64)
9902 v2 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
9903 v2.AuxInt = int64ToAuxInt(int64(udivisible64(c).m))
9904 v1.AddArg2(v2, x)
9905 v3 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
9906 v3.AuxInt = int64ToAuxInt(64 - udivisible64(c).k)
9907 v0.AddArg2(v1, v3)
9908 v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
9909 v4.AuxInt = int64ToAuxInt(int64(udivisible64(c).max))
9910 v.AddArg2(v0, v4)
9911 return true
9912 }
9913 }
9914 }
9915 break
9916 }
9917
9918
9919
9920 for {
9921 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
9922 x := v_0
9923 if v_1.Op != OpMul64 {
9924 continue
9925 }
9926 _ = v_1.Args[1]
9927 v_1_0 := v_1.Args[0]
9928 v_1_1 := v_1.Args[1]
9929 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
9930 if v_1_0.Op != OpConst64 {
9931 continue
9932 }
9933 c := auxIntToInt64(v_1_0.AuxInt)
9934 if v_1_1.Op != OpRsh64Ux64 {
9935 continue
9936 }
9937 _ = v_1_1.Args[1]
9938 v_1_1_0 := v_1_1.Args[0]
9939 if v_1_1_0.Op != OpAvg64u {
9940 continue
9941 }
9942 _ = v_1_1_0.Args[1]
9943 if x != v_1_1_0.Args[0] {
9944 continue
9945 }
9946 mul := v_1_1_0.Args[1]
9947 if mul.Op != OpHmul64u {
9948 continue
9949 }
9950 _ = mul.Args[1]
9951 mul_0 := mul.Args[0]
9952 mul_1 := mul.Args[1]
9953 for _i2 := 0; _i2 <= 1; _i2, mul_0, mul_1 = _i2+1, mul_1, mul_0 {
9954 if mul_0.Op != OpConst64 {
9955 continue
9956 }
9957 m := auxIntToInt64(mul_0.AuxInt)
9958 if x != mul_1 {
9959 continue
9960 }
9961 v_1_1_1 := v_1_1.Args[1]
9962 if v_1_1_1.Op != OpConst64 {
9963 continue
9964 }
9965 s := auxIntToInt64(v_1_1_1.AuxInt)
9966 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)) {
9967 continue
9968 }
9969 v.reset(OpLeq64U)
9970 v0 := b.NewValue0(v.Pos, OpRotateLeft64, typ.UInt64)
9971 v1 := b.NewValue0(v.Pos, OpMul64, typ.UInt64)
9972 v2 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
9973 v2.AuxInt = int64ToAuxInt(int64(udivisible64(c).m))
9974 v1.AddArg2(v2, x)
9975 v3 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
9976 v3.AuxInt = int64ToAuxInt(64 - udivisible64(c).k)
9977 v0.AddArg2(v1, v3)
9978 v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
9979 v4.AuxInt = int64ToAuxInt(int64(udivisible64(c).max))
9980 v.AddArg2(v0, v4)
9981 return true
9982 }
9983 }
9984 }
9985 break
9986 }
9987
9988
9989
9990 for {
9991 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
9992 x := v_0
9993 if v_1.Op != OpMul64 {
9994 continue
9995 }
9996 _ = v_1.Args[1]
9997 v_1_0 := v_1.Args[0]
9998 v_1_1 := v_1.Args[1]
9999 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
10000 if v_1_0.Op != OpConst64 {
10001 continue
10002 }
10003 c := auxIntToInt64(v_1_0.AuxInt)
10004 if v_1_1.Op != OpSub64 {
10005 continue
10006 }
10007 _ = v_1_1.Args[1]
10008 v_1_1_0 := v_1_1.Args[0]
10009 if v_1_1_0.Op != OpRsh64x64 {
10010 continue
10011 }
10012 _ = v_1_1_0.Args[1]
10013 mul := v_1_1_0.Args[0]
10014 if mul.Op != OpHmul64 {
10015 continue
10016 }
10017 _ = mul.Args[1]
10018 mul_0 := mul.Args[0]
10019 mul_1 := mul.Args[1]
10020 for _i2 := 0; _i2 <= 1; _i2, mul_0, mul_1 = _i2+1, mul_1, mul_0 {
10021 if mul_0.Op != OpConst64 {
10022 continue
10023 }
10024 m := auxIntToInt64(mul_0.AuxInt)
10025 if x != mul_1 {
10026 continue
10027 }
10028 v_1_1_0_1 := v_1_1_0.Args[1]
10029 if v_1_1_0_1.Op != OpConst64 {
10030 continue
10031 }
10032 s := auxIntToInt64(v_1_1_0_1.AuxInt)
10033 v_1_1_1 := v_1_1.Args[1]
10034 if v_1_1_1.Op != OpRsh64x64 {
10035 continue
10036 }
10037 _ = v_1_1_1.Args[1]
10038 if x != v_1_1_1.Args[0] {
10039 continue
10040 }
10041 v_1_1_1_1 := v_1_1_1.Args[1]
10042 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)) {
10043 continue
10044 }
10045 v.reset(OpLeq64U)
10046 v0 := b.NewValue0(v.Pos, OpRotateLeft64, typ.UInt64)
10047 v1 := b.NewValue0(v.Pos, OpAdd64, typ.UInt64)
10048 v2 := b.NewValue0(v.Pos, OpMul64, typ.UInt64)
10049 v3 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
10050 v3.AuxInt = int64ToAuxInt(int64(sdivisible64(c).m))
10051 v2.AddArg2(v3, x)
10052 v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
10053 v4.AuxInt = int64ToAuxInt(int64(sdivisible64(c).a))
10054 v1.AddArg2(v2, v4)
10055 v5 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
10056 v5.AuxInt = int64ToAuxInt(64 - sdivisible64(c).k)
10057 v0.AddArg2(v1, v5)
10058 v6 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
10059 v6.AuxInt = int64ToAuxInt(int64(sdivisible64(c).max))
10060 v.AddArg2(v0, v6)
10061 return true
10062 }
10063 }
10064 }
10065 break
10066 }
10067
10068
10069
10070 for {
10071 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
10072 x := v_0
10073 if v_1.Op != OpMul64 {
10074 continue
10075 }
10076 _ = v_1.Args[1]
10077 v_1_0 := v_1.Args[0]
10078 v_1_1 := v_1.Args[1]
10079 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
10080 if v_1_0.Op != OpConst64 {
10081 continue
10082 }
10083 c := auxIntToInt64(v_1_0.AuxInt)
10084 if v_1_1.Op != OpSub64 {
10085 continue
10086 }
10087 _ = v_1_1.Args[1]
10088 v_1_1_0 := v_1_1.Args[0]
10089 if v_1_1_0.Op != OpRsh64x64 {
10090 continue
10091 }
10092 _ = v_1_1_0.Args[1]
10093 v_1_1_0_0 := v_1_1_0.Args[0]
10094 if v_1_1_0_0.Op != OpAdd64 {
10095 continue
10096 }
10097 _ = v_1_1_0_0.Args[1]
10098 v_1_1_0_0_0 := v_1_1_0_0.Args[0]
10099 v_1_1_0_0_1 := v_1_1_0_0.Args[1]
10100 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 {
10101 mul := v_1_1_0_0_0
10102 if mul.Op != OpHmul64 {
10103 continue
10104 }
10105 _ = mul.Args[1]
10106 mul_0 := mul.Args[0]
10107 mul_1 := mul.Args[1]
10108 for _i3 := 0; _i3 <= 1; _i3, mul_0, mul_1 = _i3+1, mul_1, mul_0 {
10109 if mul_0.Op != OpConst64 {
10110 continue
10111 }
10112 m := auxIntToInt64(mul_0.AuxInt)
10113 if x != mul_1 || x != v_1_1_0_0_1 {
10114 continue
10115 }
10116 v_1_1_0_1 := v_1_1_0.Args[1]
10117 if v_1_1_0_1.Op != OpConst64 {
10118 continue
10119 }
10120 s := auxIntToInt64(v_1_1_0_1.AuxInt)
10121 v_1_1_1 := v_1_1.Args[1]
10122 if v_1_1_1.Op != OpRsh64x64 {
10123 continue
10124 }
10125 _ = v_1_1_1.Args[1]
10126 if x != v_1_1_1.Args[0] {
10127 continue
10128 }
10129 v_1_1_1_1 := v_1_1_1.Args[1]
10130 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)) {
10131 continue
10132 }
10133 v.reset(OpLeq64U)
10134 v0 := b.NewValue0(v.Pos, OpRotateLeft64, typ.UInt64)
10135 v1 := b.NewValue0(v.Pos, OpAdd64, typ.UInt64)
10136 v2 := b.NewValue0(v.Pos, OpMul64, typ.UInt64)
10137 v3 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
10138 v3.AuxInt = int64ToAuxInt(int64(sdivisible64(c).m))
10139 v2.AddArg2(v3, x)
10140 v4 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
10141 v4.AuxInt = int64ToAuxInt(int64(sdivisible64(c).a))
10142 v1.AddArg2(v2, v4)
10143 v5 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
10144 v5.AuxInt = int64ToAuxInt(64 - sdivisible64(c).k)
10145 v0.AddArg2(v1, v5)
10146 v6 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
10147 v6.AuxInt = int64ToAuxInt(int64(sdivisible64(c).max))
10148 v.AddArg2(v0, v6)
10149 return true
10150 }
10151 }
10152 }
10153 }
10154 break
10155 }
10156
10157
10158
10159 for {
10160 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
10161 n := v_0
10162 if v_1.Op != OpLsh64x64 {
10163 continue
10164 }
10165 _ = v_1.Args[1]
10166 v_1_0 := v_1.Args[0]
10167 if v_1_0.Op != OpRsh64x64 {
10168 continue
10169 }
10170 _ = v_1_0.Args[1]
10171 v_1_0_0 := v_1_0.Args[0]
10172 if v_1_0_0.Op != OpAdd64 {
10173 continue
10174 }
10175 t := v_1_0_0.Type
10176 _ = v_1_0_0.Args[1]
10177 v_1_0_0_0 := v_1_0_0.Args[0]
10178 v_1_0_0_1 := v_1_0_0.Args[1]
10179 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 {
10180 if n != v_1_0_0_0 || v_1_0_0_1.Op != OpRsh64Ux64 || v_1_0_0_1.Type != t {
10181 continue
10182 }
10183 _ = v_1_0_0_1.Args[1]
10184 v_1_0_0_1_0 := v_1_0_0_1.Args[0]
10185 if v_1_0_0_1_0.Op != OpRsh64x64 || v_1_0_0_1_0.Type != t {
10186 continue
10187 }
10188 _ = v_1_0_0_1_0.Args[1]
10189 if n != v_1_0_0_1_0.Args[0] {
10190 continue
10191 }
10192 v_1_0_0_1_0_1 := v_1_0_0_1_0.Args[1]
10193 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 {
10194 continue
10195 }
10196 v_1_0_0_1_1 := v_1_0_0_1.Args[1]
10197 if v_1_0_0_1_1.Op != OpConst64 || v_1_0_0_1_1.Type != typ.UInt64 {
10198 continue
10199 }
10200 kbar := auxIntToInt64(v_1_0_0_1_1.AuxInt)
10201 v_1_0_1 := v_1_0.Args[1]
10202 if v_1_0_1.Op != OpConst64 || v_1_0_1.Type != typ.UInt64 {
10203 continue
10204 }
10205 k := auxIntToInt64(v_1_0_1.AuxInt)
10206 v_1_1 := v_1.Args[1]
10207 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) {
10208 continue
10209 }
10210 v.reset(OpEq64)
10211 v0 := b.NewValue0(v.Pos, OpAnd64, t)
10212 v1 := b.NewValue0(v.Pos, OpConst64, t)
10213 v1.AuxInt = int64ToAuxInt(1<<uint(k) - 1)
10214 v0.AddArg2(n, v1)
10215 v2 := b.NewValue0(v.Pos, OpConst64, t)
10216 v2.AuxInt = int64ToAuxInt(0)
10217 v.AddArg2(v0, v2)
10218 return true
10219 }
10220 }
10221 break
10222 }
10223
10224
10225
10226 for {
10227 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
10228 s := v_0
10229 if s.Op != OpSub64 {
10230 continue
10231 }
10232 y := s.Args[1]
10233 x := s.Args[0]
10234 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 0 || !(s.Uses == 1) {
10235 continue
10236 }
10237 v.reset(OpEq64)
10238 v.AddArg2(x, y)
10239 return true
10240 }
10241 break
10242 }
10243
10244
10245
10246 for {
10247 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
10248 if v_0.Op != OpAnd64 {
10249 continue
10250 }
10251 t := v_0.Type
10252 _ = v_0.Args[1]
10253 v_0_0 := v_0.Args[0]
10254 v_0_1 := v_0.Args[1]
10255 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
10256 x := v_0_0
10257 if v_0_1.Op != OpConst64 || v_0_1.Type != t {
10258 continue
10259 }
10260 y := auxIntToInt64(v_0_1.AuxInt)
10261 if v_1.Op != OpConst64 || v_1.Type != t || auxIntToInt64(v_1.AuxInt) != y || !(oneBit64(y)) {
10262 continue
10263 }
10264 v.reset(OpNeq64)
10265 v0 := b.NewValue0(v.Pos, OpAnd64, t)
10266 v1 := b.NewValue0(v.Pos, OpConst64, t)
10267 v1.AuxInt = int64ToAuxInt(y)
10268 v0.AddArg2(x, v1)
10269 v2 := b.NewValue0(v.Pos, OpConst64, t)
10270 v2.AuxInt = int64ToAuxInt(0)
10271 v.AddArg2(v0, v2)
10272 return true
10273 }
10274 }
10275 break
10276 }
10277 return false
10278 }
10279 func rewriteValuegeneric_OpEq64F(v *Value) bool {
10280 v_1 := v.Args[1]
10281 v_0 := v.Args[0]
10282
10283
10284 for {
10285 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
10286 if v_0.Op != OpConst64F {
10287 continue
10288 }
10289 c := auxIntToFloat64(v_0.AuxInt)
10290 if v_1.Op != OpConst64F {
10291 continue
10292 }
10293 d := auxIntToFloat64(v_1.AuxInt)
10294 v.reset(OpConstBool)
10295 v.AuxInt = boolToAuxInt(c == d)
10296 return true
10297 }
10298 break
10299 }
10300 return false
10301 }
10302 func rewriteValuegeneric_OpEq8(v *Value) bool {
10303 v_1 := v.Args[1]
10304 v_0 := v.Args[0]
10305 b := v.Block
10306 config := b.Func.Config
10307 typ := &b.Func.Config.Types
10308
10309
10310 for {
10311 x := v_0
10312 if x != v_1 {
10313 break
10314 }
10315 v.reset(OpConstBool)
10316 v.AuxInt = boolToAuxInt(true)
10317 return true
10318 }
10319
10320
10321 for {
10322 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
10323 if v_0.Op != OpConst8 {
10324 continue
10325 }
10326 t := v_0.Type
10327 c := auxIntToInt8(v_0.AuxInt)
10328 if v_1.Op != OpAdd8 {
10329 continue
10330 }
10331 _ = v_1.Args[1]
10332 v_1_0 := v_1.Args[0]
10333 v_1_1 := v_1.Args[1]
10334 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
10335 if v_1_0.Op != OpConst8 || v_1_0.Type != t {
10336 continue
10337 }
10338 d := auxIntToInt8(v_1_0.AuxInt)
10339 x := v_1_1
10340 v.reset(OpEq8)
10341 v0 := b.NewValue0(v.Pos, OpConst8, t)
10342 v0.AuxInt = int8ToAuxInt(c - d)
10343 v.AddArg2(v0, x)
10344 return true
10345 }
10346 }
10347 break
10348 }
10349
10350
10351 for {
10352 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
10353 if v_0.Op != OpConst8 {
10354 continue
10355 }
10356 c := auxIntToInt8(v_0.AuxInt)
10357 if v_1.Op != OpConst8 {
10358 continue
10359 }
10360 d := auxIntToInt8(v_1.AuxInt)
10361 v.reset(OpConstBool)
10362 v.AuxInt = boolToAuxInt(c == d)
10363 return true
10364 }
10365 break
10366 }
10367
10368
10369
10370 for {
10371 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
10372 if v_0.Op != OpMod8u {
10373 continue
10374 }
10375 _ = v_0.Args[1]
10376 x := v_0.Args[0]
10377 v_0_1 := v_0.Args[1]
10378 if v_0_1.Op != OpConst8 {
10379 continue
10380 }
10381 c := auxIntToInt8(v_0_1.AuxInt)
10382 if v_1.Op != OpConst8 || auxIntToInt8(v_1.AuxInt) != 0 || !(x.Op != OpConst8 && udivisibleOK8(c) && !hasSmallRotate(config)) {
10383 continue
10384 }
10385 v.reset(OpEq32)
10386 v0 := b.NewValue0(v.Pos, OpMod32u, typ.UInt32)
10387 v1 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
10388 v1.AddArg(x)
10389 v2 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
10390 v2.AuxInt = int32ToAuxInt(int32(uint8(c)))
10391 v0.AddArg2(v1, v2)
10392 v3 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
10393 v3.AuxInt = int32ToAuxInt(0)
10394 v.AddArg2(v0, v3)
10395 return true
10396 }
10397 break
10398 }
10399
10400
10401
10402 for {
10403 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
10404 if v_0.Op != OpMod8 {
10405 continue
10406 }
10407 _ = v_0.Args[1]
10408 x := v_0.Args[0]
10409 v_0_1 := v_0.Args[1]
10410 if v_0_1.Op != OpConst8 {
10411 continue
10412 }
10413 c := auxIntToInt8(v_0_1.AuxInt)
10414 if v_1.Op != OpConst8 || auxIntToInt8(v_1.AuxInt) != 0 || !(x.Op != OpConst8 && sdivisibleOK8(c) && !hasSmallRotate(config)) {
10415 continue
10416 }
10417 v.reset(OpEq32)
10418 v0 := b.NewValue0(v.Pos, OpMod32, typ.Int32)
10419 v1 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
10420 v1.AddArg(x)
10421 v2 := b.NewValue0(v.Pos, OpConst32, typ.Int32)
10422 v2.AuxInt = int32ToAuxInt(int32(c))
10423 v0.AddArg2(v1, v2)
10424 v3 := b.NewValue0(v.Pos, OpConst32, typ.Int32)
10425 v3.AuxInt = int32ToAuxInt(0)
10426 v.AddArg2(v0, v3)
10427 return true
10428 }
10429 break
10430 }
10431
10432
10433
10434 for {
10435 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
10436 x := v_0
10437 if v_1.Op != OpMul8 {
10438 continue
10439 }
10440 _ = v_1.Args[1]
10441 v_1_0 := v_1.Args[0]
10442 v_1_1 := v_1.Args[1]
10443 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
10444 if v_1_0.Op != OpConst8 {
10445 continue
10446 }
10447 c := auxIntToInt8(v_1_0.AuxInt)
10448 if v_1_1.Op != OpTrunc32to8 {
10449 continue
10450 }
10451 v_1_1_0 := v_1_1.Args[0]
10452 if v_1_1_0.Op != OpRsh32Ux64 {
10453 continue
10454 }
10455 _ = v_1_1_0.Args[1]
10456 mul := v_1_1_0.Args[0]
10457 if mul.Op != OpMul32 {
10458 continue
10459 }
10460 _ = mul.Args[1]
10461 mul_0 := mul.Args[0]
10462 mul_1 := mul.Args[1]
10463 for _i2 := 0; _i2 <= 1; _i2, mul_0, mul_1 = _i2+1, mul_1, mul_0 {
10464 if mul_0.Op != OpConst32 {
10465 continue
10466 }
10467 m := auxIntToInt32(mul_0.AuxInt)
10468 if mul_1.Op != OpZeroExt8to32 || x != mul_1.Args[0] {
10469 continue
10470 }
10471 v_1_1_0_1 := v_1_1_0.Args[1]
10472 if v_1_1_0_1.Op != OpConst64 {
10473 continue
10474 }
10475 s := auxIntToInt64(v_1_1_0_1.AuxInt)
10476 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)) {
10477 continue
10478 }
10479 v.reset(OpLeq8U)
10480 v0 := b.NewValue0(v.Pos, OpRotateLeft8, typ.UInt8)
10481 v1 := b.NewValue0(v.Pos, OpMul8, typ.UInt8)
10482 v2 := b.NewValue0(v.Pos, OpConst8, typ.UInt8)
10483 v2.AuxInt = int8ToAuxInt(int8(udivisible8(c).m))
10484 v1.AddArg2(v2, x)
10485 v3 := b.NewValue0(v.Pos, OpConst8, typ.UInt8)
10486 v3.AuxInt = int8ToAuxInt(int8(8 - udivisible8(c).k))
10487 v0.AddArg2(v1, v3)
10488 v4 := b.NewValue0(v.Pos, OpConst8, typ.UInt8)
10489 v4.AuxInt = int8ToAuxInt(int8(udivisible8(c).max))
10490 v.AddArg2(v0, v4)
10491 return true
10492 }
10493 }
10494 }
10495 break
10496 }
10497
10498
10499
10500 for {
10501 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
10502 x := v_0
10503 if v_1.Op != OpMul8 {
10504 continue
10505 }
10506 _ = v_1.Args[1]
10507 v_1_0 := v_1.Args[0]
10508 v_1_1 := v_1.Args[1]
10509 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
10510 if v_1_0.Op != OpConst8 {
10511 continue
10512 }
10513 c := auxIntToInt8(v_1_0.AuxInt)
10514 if v_1_1.Op != OpSub8 {
10515 continue
10516 }
10517 _ = v_1_1.Args[1]
10518 v_1_1_0 := v_1_1.Args[0]
10519 if v_1_1_0.Op != OpRsh32x64 {
10520 continue
10521 }
10522 _ = v_1_1_0.Args[1]
10523 mul := v_1_1_0.Args[0]
10524 if mul.Op != OpMul32 {
10525 continue
10526 }
10527 _ = mul.Args[1]
10528 mul_0 := mul.Args[0]
10529 mul_1 := mul.Args[1]
10530 for _i2 := 0; _i2 <= 1; _i2, mul_0, mul_1 = _i2+1, mul_1, mul_0 {
10531 if mul_0.Op != OpConst32 {
10532 continue
10533 }
10534 m := auxIntToInt32(mul_0.AuxInt)
10535 if mul_1.Op != OpSignExt8to32 || x != mul_1.Args[0] {
10536 continue
10537 }
10538 v_1_1_0_1 := v_1_1_0.Args[1]
10539 if v_1_1_0_1.Op != OpConst64 {
10540 continue
10541 }
10542 s := auxIntToInt64(v_1_1_0_1.AuxInt)
10543 v_1_1_1 := v_1_1.Args[1]
10544 if v_1_1_1.Op != OpRsh32x64 {
10545 continue
10546 }
10547 _ = v_1_1_1.Args[1]
10548 v_1_1_1_0 := v_1_1_1.Args[0]
10549 if v_1_1_1_0.Op != OpSignExt8to32 || x != v_1_1_1_0.Args[0] {
10550 continue
10551 }
10552 v_1_1_1_1 := v_1_1_1.Args[1]
10553 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)) {
10554 continue
10555 }
10556 v.reset(OpLeq8U)
10557 v0 := b.NewValue0(v.Pos, OpRotateLeft8, typ.UInt8)
10558 v1 := b.NewValue0(v.Pos, OpAdd8, typ.UInt8)
10559 v2 := b.NewValue0(v.Pos, OpMul8, typ.UInt8)
10560 v3 := b.NewValue0(v.Pos, OpConst8, typ.UInt8)
10561 v3.AuxInt = int8ToAuxInt(int8(sdivisible8(c).m))
10562 v2.AddArg2(v3, x)
10563 v4 := b.NewValue0(v.Pos, OpConst8, typ.UInt8)
10564 v4.AuxInt = int8ToAuxInt(int8(sdivisible8(c).a))
10565 v1.AddArg2(v2, v4)
10566 v5 := b.NewValue0(v.Pos, OpConst8, typ.UInt8)
10567 v5.AuxInt = int8ToAuxInt(int8(8 - sdivisible8(c).k))
10568 v0.AddArg2(v1, v5)
10569 v6 := b.NewValue0(v.Pos, OpConst8, typ.UInt8)
10570 v6.AuxInt = int8ToAuxInt(int8(sdivisible8(c).max))
10571 v.AddArg2(v0, v6)
10572 return true
10573 }
10574 }
10575 }
10576 break
10577 }
10578
10579
10580
10581 for {
10582 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
10583 n := v_0
10584 if v_1.Op != OpLsh8x64 {
10585 continue
10586 }
10587 _ = v_1.Args[1]
10588 v_1_0 := v_1.Args[0]
10589 if v_1_0.Op != OpRsh8x64 {
10590 continue
10591 }
10592 _ = v_1_0.Args[1]
10593 v_1_0_0 := v_1_0.Args[0]
10594 if v_1_0_0.Op != OpAdd8 {
10595 continue
10596 }
10597 t := v_1_0_0.Type
10598 _ = v_1_0_0.Args[1]
10599 v_1_0_0_0 := v_1_0_0.Args[0]
10600 v_1_0_0_1 := v_1_0_0.Args[1]
10601 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 {
10602 if n != v_1_0_0_0 || v_1_0_0_1.Op != OpRsh8Ux64 || v_1_0_0_1.Type != t {
10603 continue
10604 }
10605 _ = v_1_0_0_1.Args[1]
10606 v_1_0_0_1_0 := v_1_0_0_1.Args[0]
10607 if v_1_0_0_1_0.Op != OpRsh8x64 || v_1_0_0_1_0.Type != t {
10608 continue
10609 }
10610 _ = v_1_0_0_1_0.Args[1]
10611 if n != v_1_0_0_1_0.Args[0] {
10612 continue
10613 }
10614 v_1_0_0_1_0_1 := v_1_0_0_1_0.Args[1]
10615 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 {
10616 continue
10617 }
10618 v_1_0_0_1_1 := v_1_0_0_1.Args[1]
10619 if v_1_0_0_1_1.Op != OpConst64 || v_1_0_0_1_1.Type != typ.UInt64 {
10620 continue
10621 }
10622 kbar := auxIntToInt64(v_1_0_0_1_1.AuxInt)
10623 v_1_0_1 := v_1_0.Args[1]
10624 if v_1_0_1.Op != OpConst64 || v_1_0_1.Type != typ.UInt64 {
10625 continue
10626 }
10627 k := auxIntToInt64(v_1_0_1.AuxInt)
10628 v_1_1 := v_1.Args[1]
10629 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) {
10630 continue
10631 }
10632 v.reset(OpEq8)
10633 v0 := b.NewValue0(v.Pos, OpAnd8, t)
10634 v1 := b.NewValue0(v.Pos, OpConst8, t)
10635 v1.AuxInt = int8ToAuxInt(1<<uint(k) - 1)
10636 v0.AddArg2(n, v1)
10637 v2 := b.NewValue0(v.Pos, OpConst8, t)
10638 v2.AuxInt = int8ToAuxInt(0)
10639 v.AddArg2(v0, v2)
10640 return true
10641 }
10642 }
10643 break
10644 }
10645
10646
10647
10648 for {
10649 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
10650 s := v_0
10651 if s.Op != OpSub8 {
10652 continue
10653 }
10654 y := s.Args[1]
10655 x := s.Args[0]
10656 if v_1.Op != OpConst8 || auxIntToInt8(v_1.AuxInt) != 0 || !(s.Uses == 1) {
10657 continue
10658 }
10659 v.reset(OpEq8)
10660 v.AddArg2(x, y)
10661 return true
10662 }
10663 break
10664 }
10665
10666
10667
10668 for {
10669 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
10670 if v_0.Op != OpAnd8 {
10671 continue
10672 }
10673 t := v_0.Type
10674 _ = v_0.Args[1]
10675 v_0_0 := v_0.Args[0]
10676 v_0_1 := v_0.Args[1]
10677 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
10678 x := v_0_0
10679 if v_0_1.Op != OpConst8 || v_0_1.Type != t {
10680 continue
10681 }
10682 y := auxIntToInt8(v_0_1.AuxInt)
10683 if v_1.Op != OpConst8 || v_1.Type != t || auxIntToInt8(v_1.AuxInt) != y || !(oneBit8(y)) {
10684 continue
10685 }
10686 v.reset(OpNeq8)
10687 v0 := b.NewValue0(v.Pos, OpAnd8, t)
10688 v1 := b.NewValue0(v.Pos, OpConst8, t)
10689 v1.AuxInt = int8ToAuxInt(y)
10690 v0.AddArg2(x, v1)
10691 v2 := b.NewValue0(v.Pos, OpConst8, t)
10692 v2.AuxInt = int8ToAuxInt(0)
10693 v.AddArg2(v0, v2)
10694 return true
10695 }
10696 }
10697 break
10698 }
10699 return false
10700 }
10701 func rewriteValuegeneric_OpEqB(v *Value) bool {
10702 v_1 := v.Args[1]
10703 v_0 := v.Args[0]
10704
10705
10706 for {
10707 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
10708 if v_0.Op != OpConstBool {
10709 continue
10710 }
10711 c := auxIntToBool(v_0.AuxInt)
10712 if v_1.Op != OpConstBool {
10713 continue
10714 }
10715 d := auxIntToBool(v_1.AuxInt)
10716 v.reset(OpConstBool)
10717 v.AuxInt = boolToAuxInt(c == d)
10718 return true
10719 }
10720 break
10721 }
10722
10723
10724 for {
10725 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
10726 if v_0.Op != OpConstBool || auxIntToBool(v_0.AuxInt) != false {
10727 continue
10728 }
10729 x := v_1
10730 v.reset(OpNot)
10731 v.AddArg(x)
10732 return true
10733 }
10734 break
10735 }
10736
10737
10738 for {
10739 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
10740 if v_0.Op != OpConstBool || auxIntToBool(v_0.AuxInt) != true {
10741 continue
10742 }
10743 x := v_1
10744 v.copyOf(x)
10745 return true
10746 }
10747 break
10748 }
10749 return false
10750 }
10751 func rewriteValuegeneric_OpEqInter(v *Value) bool {
10752 v_1 := v.Args[1]
10753 v_0 := v.Args[0]
10754 b := v.Block
10755 typ := &b.Func.Config.Types
10756
10757
10758 for {
10759 x := v_0
10760 y := v_1
10761 v.reset(OpEqPtr)
10762 v0 := b.NewValue0(v.Pos, OpITab, typ.Uintptr)
10763 v0.AddArg(x)
10764 v1 := b.NewValue0(v.Pos, OpITab, typ.Uintptr)
10765 v1.AddArg(y)
10766 v.AddArg2(v0, v1)
10767 return true
10768 }
10769 }
10770 func rewriteValuegeneric_OpEqPtr(v *Value) bool {
10771 v_1 := v.Args[1]
10772 v_0 := v.Args[0]
10773 b := v.Block
10774 typ := &b.Func.Config.Types
10775
10776
10777 for {
10778 x := v_0
10779 if x != v_1 {
10780 break
10781 }
10782 v.reset(OpConstBool)
10783 v.AuxInt = boolToAuxInt(true)
10784 return true
10785 }
10786
10787
10788 for {
10789 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
10790 if v_0.Op != OpAddr {
10791 continue
10792 }
10793 x := auxToSym(v_0.Aux)
10794 if v_1.Op != OpAddr {
10795 continue
10796 }
10797 y := auxToSym(v_1.Aux)
10798 v.reset(OpConstBool)
10799 v.AuxInt = boolToAuxInt(x == y)
10800 return true
10801 }
10802 break
10803 }
10804
10805
10806 for {
10807 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
10808 if v_0.Op != OpAddr {
10809 continue
10810 }
10811 x := auxToSym(v_0.Aux)
10812 if v_1.Op != OpOffPtr {
10813 continue
10814 }
10815 o := auxIntToInt64(v_1.AuxInt)
10816 v_1_0 := v_1.Args[0]
10817 if v_1_0.Op != OpAddr {
10818 continue
10819 }
10820 y := auxToSym(v_1_0.Aux)
10821 v.reset(OpConstBool)
10822 v.AuxInt = boolToAuxInt(x == y && o == 0)
10823 return true
10824 }
10825 break
10826 }
10827
10828
10829 for {
10830 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
10831 if v_0.Op != OpOffPtr {
10832 continue
10833 }
10834 o1 := auxIntToInt64(v_0.AuxInt)
10835 v_0_0 := v_0.Args[0]
10836 if v_0_0.Op != OpAddr {
10837 continue
10838 }
10839 x := auxToSym(v_0_0.Aux)
10840 if v_1.Op != OpOffPtr {
10841 continue
10842 }
10843 o2 := auxIntToInt64(v_1.AuxInt)
10844 v_1_0 := v_1.Args[0]
10845 if v_1_0.Op != OpAddr {
10846 continue
10847 }
10848 y := auxToSym(v_1_0.Aux)
10849 v.reset(OpConstBool)
10850 v.AuxInt = boolToAuxInt(x == y && o1 == o2)
10851 return true
10852 }
10853 break
10854 }
10855
10856
10857 for {
10858 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
10859 if v_0.Op != OpLocalAddr {
10860 continue
10861 }
10862 x := auxToSym(v_0.Aux)
10863 if v_1.Op != OpLocalAddr {
10864 continue
10865 }
10866 y := auxToSym(v_1.Aux)
10867 v.reset(OpConstBool)
10868 v.AuxInt = boolToAuxInt(x == y)
10869 return true
10870 }
10871 break
10872 }
10873
10874
10875 for {
10876 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
10877 if v_0.Op != OpLocalAddr {
10878 continue
10879 }
10880 x := auxToSym(v_0.Aux)
10881 if v_1.Op != OpOffPtr {
10882 continue
10883 }
10884 o := auxIntToInt64(v_1.AuxInt)
10885 v_1_0 := v_1.Args[0]
10886 if v_1_0.Op != OpLocalAddr {
10887 continue
10888 }
10889 y := auxToSym(v_1_0.Aux)
10890 v.reset(OpConstBool)
10891 v.AuxInt = boolToAuxInt(x == y && o == 0)
10892 return true
10893 }
10894 break
10895 }
10896
10897
10898 for {
10899 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
10900 if v_0.Op != OpOffPtr {
10901 continue
10902 }
10903 o1 := auxIntToInt64(v_0.AuxInt)
10904 v_0_0 := v_0.Args[0]
10905 if v_0_0.Op != OpLocalAddr {
10906 continue
10907 }
10908 x := auxToSym(v_0_0.Aux)
10909 if v_1.Op != OpOffPtr {
10910 continue
10911 }
10912 o2 := auxIntToInt64(v_1.AuxInt)
10913 v_1_0 := v_1.Args[0]
10914 if v_1_0.Op != OpLocalAddr {
10915 continue
10916 }
10917 y := auxToSym(v_1_0.Aux)
10918 v.reset(OpConstBool)
10919 v.AuxInt = boolToAuxInt(x == y && o1 == o2)
10920 return true
10921 }
10922 break
10923 }
10924
10925
10926
10927 for {
10928 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
10929 if v_0.Op != OpOffPtr {
10930 continue
10931 }
10932 o1 := auxIntToInt64(v_0.AuxInt)
10933 p1 := v_0.Args[0]
10934 p2 := v_1
10935 if !(isSamePtr(p1, p2)) {
10936 continue
10937 }
10938 v.reset(OpConstBool)
10939 v.AuxInt = boolToAuxInt(o1 == 0)
10940 return true
10941 }
10942 break
10943 }
10944
10945
10946
10947 for {
10948 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
10949 if v_0.Op != OpOffPtr {
10950 continue
10951 }
10952 o1 := auxIntToInt64(v_0.AuxInt)
10953 p1 := v_0.Args[0]
10954 if v_1.Op != OpOffPtr {
10955 continue
10956 }
10957 o2 := auxIntToInt64(v_1.AuxInt)
10958 p2 := v_1.Args[0]
10959 if !(isSamePtr(p1, p2)) {
10960 continue
10961 }
10962 v.reset(OpConstBool)
10963 v.AuxInt = boolToAuxInt(o1 == o2)
10964 return true
10965 }
10966 break
10967 }
10968
10969
10970 for {
10971 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
10972 if v_0.Op != OpConst32 {
10973 continue
10974 }
10975 c := auxIntToInt32(v_0.AuxInt)
10976 if v_1.Op != OpConst32 {
10977 continue
10978 }
10979 d := auxIntToInt32(v_1.AuxInt)
10980 v.reset(OpConstBool)
10981 v.AuxInt = boolToAuxInt(c == d)
10982 return true
10983 }
10984 break
10985 }
10986
10987
10988 for {
10989 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
10990 if v_0.Op != OpConst64 {
10991 continue
10992 }
10993 c := auxIntToInt64(v_0.AuxInt)
10994 if v_1.Op != OpConst64 {
10995 continue
10996 }
10997 d := auxIntToInt64(v_1.AuxInt)
10998 v.reset(OpConstBool)
10999 v.AuxInt = boolToAuxInt(c == d)
11000 return true
11001 }
11002 break
11003 }
11004
11005
11006 for {
11007 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
11008 if v_0.Op != OpConvert {
11009 continue
11010 }
11011 v_0_0 := v_0.Args[0]
11012 if v_0_0.Op != OpAddr {
11013 continue
11014 }
11015 x := auxToSym(v_0_0.Aux)
11016 if v_1.Op != OpAddr {
11017 continue
11018 }
11019 y := auxToSym(v_1.Aux)
11020 v.reset(OpConstBool)
11021 v.AuxInt = boolToAuxInt(x == y)
11022 return true
11023 }
11024 break
11025 }
11026
11027
11028 for {
11029 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
11030 if v_0.Op != OpLocalAddr || v_1.Op != OpAddr {
11031 continue
11032 }
11033 v.reset(OpConstBool)
11034 v.AuxInt = boolToAuxInt(false)
11035 return true
11036 }
11037 break
11038 }
11039
11040
11041 for {
11042 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
11043 if v_0.Op != OpOffPtr {
11044 continue
11045 }
11046 v_0_0 := v_0.Args[0]
11047 if v_0_0.Op != OpLocalAddr || v_1.Op != OpAddr {
11048 continue
11049 }
11050 v.reset(OpConstBool)
11051 v.AuxInt = boolToAuxInt(false)
11052 return true
11053 }
11054 break
11055 }
11056
11057
11058 for {
11059 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
11060 if v_0.Op != OpLocalAddr || v_1.Op != OpOffPtr {
11061 continue
11062 }
11063 v_1_0 := v_1.Args[0]
11064 if v_1_0.Op != OpAddr {
11065 continue
11066 }
11067 v.reset(OpConstBool)
11068 v.AuxInt = boolToAuxInt(false)
11069 return true
11070 }
11071 break
11072 }
11073
11074
11075 for {
11076 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
11077 if v_0.Op != OpOffPtr {
11078 continue
11079 }
11080 v_0_0 := v_0.Args[0]
11081 if v_0_0.Op != OpLocalAddr || v_1.Op != OpOffPtr {
11082 continue
11083 }
11084 v_1_0 := v_1.Args[0]
11085 if v_1_0.Op != OpAddr {
11086 continue
11087 }
11088 v.reset(OpConstBool)
11089 v.AuxInt = boolToAuxInt(false)
11090 return true
11091 }
11092 break
11093 }
11094
11095
11096
11097 for {
11098 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
11099 if v_0.Op != OpAddPtr {
11100 continue
11101 }
11102 o1 := v_0.Args[1]
11103 p1 := v_0.Args[0]
11104 p2 := v_1
11105 if !(isSamePtr(p1, p2)) {
11106 continue
11107 }
11108 v.reset(OpNot)
11109 v0 := b.NewValue0(v.Pos, OpIsNonNil, typ.Bool)
11110 v0.AddArg(o1)
11111 v.AddArg(v0)
11112 return true
11113 }
11114 break
11115 }
11116
11117
11118 for {
11119 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
11120 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
11121 continue
11122 }
11123 p := v_1
11124 v.reset(OpNot)
11125 v0 := b.NewValue0(v.Pos, OpIsNonNil, typ.Bool)
11126 v0.AddArg(p)
11127 v.AddArg(v0)
11128 return true
11129 }
11130 break
11131 }
11132
11133
11134 for {
11135 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
11136 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
11137 continue
11138 }
11139 p := v_1
11140 v.reset(OpNot)
11141 v0 := b.NewValue0(v.Pos, OpIsNonNil, typ.Bool)
11142 v0.AddArg(p)
11143 v.AddArg(v0)
11144 return true
11145 }
11146 break
11147 }
11148
11149
11150 for {
11151 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
11152 if v_0.Op != OpConstNil {
11153 continue
11154 }
11155 p := v_1
11156 v.reset(OpNot)
11157 v0 := b.NewValue0(v.Pos, OpIsNonNil, typ.Bool)
11158 v0.AddArg(p)
11159 v.AddArg(v0)
11160 return true
11161 }
11162 break
11163 }
11164 return false
11165 }
11166 func rewriteValuegeneric_OpEqSlice(v *Value) bool {
11167 v_1 := v.Args[1]
11168 v_0 := v.Args[0]
11169 b := v.Block
11170 typ := &b.Func.Config.Types
11171
11172
11173 for {
11174 x := v_0
11175 y := v_1
11176 v.reset(OpEqPtr)
11177 v0 := b.NewValue0(v.Pos, OpSlicePtr, typ.BytePtr)
11178 v0.AddArg(x)
11179 v1 := b.NewValue0(v.Pos, OpSlicePtr, typ.BytePtr)
11180 v1.AddArg(y)
11181 v.AddArg2(v0, v1)
11182 return true
11183 }
11184 }
11185 func rewriteValuegeneric_OpFloor(v *Value) bool {
11186 v_0 := v.Args[0]
11187
11188
11189 for {
11190 if v_0.Op != OpConst64F {
11191 break
11192 }
11193 c := auxIntToFloat64(v_0.AuxInt)
11194 v.reset(OpConst64F)
11195 v.AuxInt = float64ToAuxInt(math.Floor(c))
11196 return true
11197 }
11198 return false
11199 }
11200 func rewriteValuegeneric_OpIMake(v *Value) bool {
11201 v_1 := v.Args[1]
11202 v_0 := v.Args[0]
11203
11204
11205 for {
11206 if v_1.Op != OpStructMake {
11207 break
11208 }
11209 v.copyOf(imakeOfStructMake(v))
11210 return true
11211 }
11212
11213
11214 for {
11215 _typ := v_0
11216 if v_1.Op != OpArrayMake1 {
11217 break
11218 }
11219 val := v_1.Args[0]
11220 v.reset(OpIMake)
11221 v.AddArg2(_typ, val)
11222 return true
11223 }
11224 return false
11225 }
11226 func rewriteValuegeneric_OpInterLECall(v *Value) bool {
11227
11228
11229 for {
11230 if len(v.Args) < 1 {
11231 break
11232 }
11233 v_0 := v.Args[0]
11234 if v_0.Op != OpAddr {
11235 break
11236 }
11237 fn := auxToSym(v_0.Aux)
11238 v_0_0 := v_0.Args[0]
11239 if v_0_0.Op != OpSB {
11240 break
11241 }
11242 v.copyOf(devirtLECall(v, fn.(*obj.LSym)))
11243 return true
11244 }
11245 return false
11246 }
11247 func rewriteValuegeneric_OpIsInBounds(v *Value) bool {
11248 v_1 := v.Args[1]
11249 v_0 := v.Args[0]
11250
11251
11252
11253 for {
11254 if v_0.Op != OpZeroExt8to32 || v_1.Op != OpConst32 {
11255 break
11256 }
11257 c := auxIntToInt32(v_1.AuxInt)
11258 if !((1 << 8) <= c) {
11259 break
11260 }
11261 v.reset(OpConstBool)
11262 v.AuxInt = boolToAuxInt(true)
11263 return true
11264 }
11265
11266
11267
11268 for {
11269 if v_0.Op != OpZeroExt8to64 || v_1.Op != OpConst64 {
11270 break
11271 }
11272 c := auxIntToInt64(v_1.AuxInt)
11273 if !((1 << 8) <= c) {
11274 break
11275 }
11276 v.reset(OpConstBool)
11277 v.AuxInt = boolToAuxInt(true)
11278 return true
11279 }
11280
11281
11282
11283 for {
11284 if v_0.Op != OpZeroExt16to32 || v_1.Op != OpConst32 {
11285 break
11286 }
11287 c := auxIntToInt32(v_1.AuxInt)
11288 if !((1 << 16) <= c) {
11289 break
11290 }
11291 v.reset(OpConstBool)
11292 v.AuxInt = boolToAuxInt(true)
11293 return true
11294 }
11295
11296
11297
11298 for {
11299 if v_0.Op != OpZeroExt16to64 || v_1.Op != OpConst64 {
11300 break
11301 }
11302 c := auxIntToInt64(v_1.AuxInt)
11303 if !((1 << 16) <= c) {
11304 break
11305 }
11306 v.reset(OpConstBool)
11307 v.AuxInt = boolToAuxInt(true)
11308 return true
11309 }
11310
11311
11312 for {
11313 x := v_0
11314 if x != v_1 {
11315 break
11316 }
11317 v.reset(OpConstBool)
11318 v.AuxInt = boolToAuxInt(false)
11319 return true
11320 }
11321
11322
11323
11324 for {
11325 if v_0.Op != OpAnd8 {
11326 break
11327 }
11328 v_0_0 := v_0.Args[0]
11329 v_0_1 := v_0.Args[1]
11330 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
11331 if v_0_0.Op != OpConst8 {
11332 continue
11333 }
11334 c := auxIntToInt8(v_0_0.AuxInt)
11335 if v_1.Op != OpConst8 {
11336 continue
11337 }
11338 d := auxIntToInt8(v_1.AuxInt)
11339 if !(0 <= c && c < d) {
11340 continue
11341 }
11342 v.reset(OpConstBool)
11343 v.AuxInt = boolToAuxInt(true)
11344 return true
11345 }
11346 break
11347 }
11348
11349
11350
11351 for {
11352 if v_0.Op != OpZeroExt8to16 {
11353 break
11354 }
11355 v_0_0 := v_0.Args[0]
11356 if v_0_0.Op != OpAnd8 {
11357 break
11358 }
11359 v_0_0_0 := v_0_0.Args[0]
11360 v_0_0_1 := v_0_0.Args[1]
11361 for _i0 := 0; _i0 <= 1; _i0, v_0_0_0, v_0_0_1 = _i0+1, v_0_0_1, v_0_0_0 {
11362 if v_0_0_0.Op != OpConst8 {
11363 continue
11364 }
11365 c := auxIntToInt8(v_0_0_0.AuxInt)
11366 if v_1.Op != OpConst16 {
11367 continue
11368 }
11369 d := auxIntToInt16(v_1.AuxInt)
11370 if !(0 <= c && int16(c) < d) {
11371 continue
11372 }
11373 v.reset(OpConstBool)
11374 v.AuxInt = boolToAuxInt(true)
11375 return true
11376 }
11377 break
11378 }
11379
11380
11381
11382 for {
11383 if v_0.Op != OpZeroExt8to32 {
11384 break
11385 }
11386 v_0_0 := v_0.Args[0]
11387 if v_0_0.Op != OpAnd8 {
11388 break
11389 }
11390 v_0_0_0 := v_0_0.Args[0]
11391 v_0_0_1 := v_0_0.Args[1]
11392 for _i0 := 0; _i0 <= 1; _i0, v_0_0_0, v_0_0_1 = _i0+1, v_0_0_1, v_0_0_0 {
11393 if v_0_0_0.Op != OpConst8 {
11394 continue
11395 }
11396 c := auxIntToInt8(v_0_0_0.AuxInt)
11397 if v_1.Op != OpConst32 {
11398 continue
11399 }
11400 d := auxIntToInt32(v_1.AuxInt)
11401 if !(0 <= c && int32(c) < d) {
11402 continue
11403 }
11404 v.reset(OpConstBool)
11405 v.AuxInt = boolToAuxInt(true)
11406 return true
11407 }
11408 break
11409 }
11410
11411
11412
11413 for {
11414 if v_0.Op != OpZeroExt8to64 {
11415 break
11416 }
11417 v_0_0 := v_0.Args[0]
11418 if v_0_0.Op != OpAnd8 {
11419 break
11420 }
11421 v_0_0_0 := v_0_0.Args[0]
11422 v_0_0_1 := v_0_0.Args[1]
11423 for _i0 := 0; _i0 <= 1; _i0, v_0_0_0, v_0_0_1 = _i0+1, v_0_0_1, v_0_0_0 {
11424 if v_0_0_0.Op != OpConst8 {
11425 continue
11426 }
11427 c := auxIntToInt8(v_0_0_0.AuxInt)
11428 if v_1.Op != OpConst64 {
11429 continue
11430 }
11431 d := auxIntToInt64(v_1.AuxInt)
11432 if !(0 <= c && int64(c) < d) {
11433 continue
11434 }
11435 v.reset(OpConstBool)
11436 v.AuxInt = boolToAuxInt(true)
11437 return true
11438 }
11439 break
11440 }
11441
11442
11443
11444 for {
11445 if v_0.Op != OpAnd16 {
11446 break
11447 }
11448 v_0_0 := v_0.Args[0]
11449 v_0_1 := v_0.Args[1]
11450 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
11451 if v_0_0.Op != OpConst16 {
11452 continue
11453 }
11454 c := auxIntToInt16(v_0_0.AuxInt)
11455 if v_1.Op != OpConst16 {
11456 continue
11457 }
11458 d := auxIntToInt16(v_1.AuxInt)
11459 if !(0 <= c && c < d) {
11460 continue
11461 }
11462 v.reset(OpConstBool)
11463 v.AuxInt = boolToAuxInt(true)
11464 return true
11465 }
11466 break
11467 }
11468
11469
11470
11471 for {
11472 if v_0.Op != OpZeroExt16to32 {
11473 break
11474 }
11475 v_0_0 := v_0.Args[0]
11476 if v_0_0.Op != OpAnd16 {
11477 break
11478 }
11479 v_0_0_0 := v_0_0.Args[0]
11480 v_0_0_1 := v_0_0.Args[1]
11481 for _i0 := 0; _i0 <= 1; _i0, v_0_0_0, v_0_0_1 = _i0+1, v_0_0_1, v_0_0_0 {
11482 if v_0_0_0.Op != OpConst16 {
11483 continue
11484 }
11485 c := auxIntToInt16(v_0_0_0.AuxInt)
11486 if v_1.Op != OpConst32 {
11487 continue
11488 }
11489 d := auxIntToInt32(v_1.AuxInt)
11490 if !(0 <= c && int32(c) < d) {
11491 continue
11492 }
11493 v.reset(OpConstBool)
11494 v.AuxInt = boolToAuxInt(true)
11495 return true
11496 }
11497 break
11498 }
11499
11500
11501
11502 for {
11503 if v_0.Op != OpZeroExt16to64 {
11504 break
11505 }
11506 v_0_0 := v_0.Args[0]
11507 if v_0_0.Op != OpAnd16 {
11508 break
11509 }
11510 v_0_0_0 := v_0_0.Args[0]
11511 v_0_0_1 := v_0_0.Args[1]
11512 for _i0 := 0; _i0 <= 1; _i0, v_0_0_0, v_0_0_1 = _i0+1, v_0_0_1, v_0_0_0 {
11513 if v_0_0_0.Op != OpConst16 {
11514 continue
11515 }
11516 c := auxIntToInt16(v_0_0_0.AuxInt)
11517 if v_1.Op != OpConst64 {
11518 continue
11519 }
11520 d := auxIntToInt64(v_1.AuxInt)
11521 if !(0 <= c && int64(c) < d) {
11522 continue
11523 }
11524 v.reset(OpConstBool)
11525 v.AuxInt = boolToAuxInt(true)
11526 return true
11527 }
11528 break
11529 }
11530
11531
11532
11533 for {
11534 if v_0.Op != OpAnd32 {
11535 break
11536 }
11537 v_0_0 := v_0.Args[0]
11538 v_0_1 := v_0.Args[1]
11539 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
11540 if v_0_0.Op != OpConst32 {
11541 continue
11542 }
11543 c := auxIntToInt32(v_0_0.AuxInt)
11544 if v_1.Op != OpConst32 {
11545 continue
11546 }
11547 d := auxIntToInt32(v_1.AuxInt)
11548 if !(0 <= c && c < d) {
11549 continue
11550 }
11551 v.reset(OpConstBool)
11552 v.AuxInt = boolToAuxInt(true)
11553 return true
11554 }
11555 break
11556 }
11557
11558
11559
11560 for {
11561 if v_0.Op != OpZeroExt32to64 {
11562 break
11563 }
11564 v_0_0 := v_0.Args[0]
11565 if v_0_0.Op != OpAnd32 {
11566 break
11567 }
11568 v_0_0_0 := v_0_0.Args[0]
11569 v_0_0_1 := v_0_0.Args[1]
11570 for _i0 := 0; _i0 <= 1; _i0, v_0_0_0, v_0_0_1 = _i0+1, v_0_0_1, v_0_0_0 {
11571 if v_0_0_0.Op != OpConst32 {
11572 continue
11573 }
11574 c := auxIntToInt32(v_0_0_0.AuxInt)
11575 if v_1.Op != OpConst64 {
11576 continue
11577 }
11578 d := auxIntToInt64(v_1.AuxInt)
11579 if !(0 <= c && int64(c) < d) {
11580 continue
11581 }
11582 v.reset(OpConstBool)
11583 v.AuxInt = boolToAuxInt(true)
11584 return true
11585 }
11586 break
11587 }
11588
11589
11590
11591 for {
11592 if v_0.Op != OpAnd64 {
11593 break
11594 }
11595 v_0_0 := v_0.Args[0]
11596 v_0_1 := v_0.Args[1]
11597 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
11598 if v_0_0.Op != OpConst64 {
11599 continue
11600 }
11601 c := auxIntToInt64(v_0_0.AuxInt)
11602 if v_1.Op != OpConst64 {
11603 continue
11604 }
11605 d := auxIntToInt64(v_1.AuxInt)
11606 if !(0 <= c && c < d) {
11607 continue
11608 }
11609 v.reset(OpConstBool)
11610 v.AuxInt = boolToAuxInt(true)
11611 return true
11612 }
11613 break
11614 }
11615
11616
11617 for {
11618 if v_0.Op != OpConst32 {
11619 break
11620 }
11621 c := auxIntToInt32(v_0.AuxInt)
11622 if v_1.Op != OpConst32 {
11623 break
11624 }
11625 d := auxIntToInt32(v_1.AuxInt)
11626 v.reset(OpConstBool)
11627 v.AuxInt = boolToAuxInt(0 <= c && c < d)
11628 return true
11629 }
11630
11631
11632 for {
11633 if v_0.Op != OpConst64 {
11634 break
11635 }
11636 c := auxIntToInt64(v_0.AuxInt)
11637 if v_1.Op != OpConst64 {
11638 break
11639 }
11640 d := auxIntToInt64(v_1.AuxInt)
11641 v.reset(OpConstBool)
11642 v.AuxInt = boolToAuxInt(0 <= c && c < d)
11643 return true
11644 }
11645
11646
11647 for {
11648 if v_0.Op != OpMod32u {
11649 break
11650 }
11651 y := v_0.Args[1]
11652 if y != v_1 {
11653 break
11654 }
11655 v.reset(OpConstBool)
11656 v.AuxInt = boolToAuxInt(true)
11657 return true
11658 }
11659
11660
11661 for {
11662 if v_0.Op != OpMod64u {
11663 break
11664 }
11665 y := v_0.Args[1]
11666 if y != v_1 {
11667 break
11668 }
11669 v.reset(OpConstBool)
11670 v.AuxInt = boolToAuxInt(true)
11671 return true
11672 }
11673
11674
11675
11676 for {
11677 if v_0.Op != OpZeroExt8to64 {
11678 break
11679 }
11680 v_0_0 := v_0.Args[0]
11681 if v_0_0.Op != OpRsh8Ux64 {
11682 break
11683 }
11684 _ = v_0_0.Args[1]
11685 v_0_0_1 := v_0_0.Args[1]
11686 if v_0_0_1.Op != OpConst64 {
11687 break
11688 }
11689 c := auxIntToInt64(v_0_0_1.AuxInt)
11690 if v_1.Op != OpConst64 {
11691 break
11692 }
11693 d := auxIntToInt64(v_1.AuxInt)
11694 if !(0 < c && c < 8 && 1<<uint(8-c)-1 < d) {
11695 break
11696 }
11697 v.reset(OpConstBool)
11698 v.AuxInt = boolToAuxInt(true)
11699 return true
11700 }
11701
11702
11703
11704 for {
11705 if v_0.Op != OpZeroExt8to32 {
11706 break
11707 }
11708 v_0_0 := v_0.Args[0]
11709 if v_0_0.Op != OpRsh8Ux64 {
11710 break
11711 }
11712 _ = v_0_0.Args[1]
11713 v_0_0_1 := v_0_0.Args[1]
11714 if v_0_0_1.Op != OpConst64 {
11715 break
11716 }
11717 c := auxIntToInt64(v_0_0_1.AuxInt)
11718 if v_1.Op != OpConst32 {
11719 break
11720 }
11721 d := auxIntToInt32(v_1.AuxInt)
11722 if !(0 < c && c < 8 && 1<<uint(8-c)-1 < d) {
11723 break
11724 }
11725 v.reset(OpConstBool)
11726 v.AuxInt = boolToAuxInt(true)
11727 return true
11728 }
11729
11730
11731
11732 for {
11733 if v_0.Op != OpZeroExt8to16 {
11734 break
11735 }
11736 v_0_0 := v_0.Args[0]
11737 if v_0_0.Op != OpRsh8Ux64 {
11738 break
11739 }
11740 _ = v_0_0.Args[1]
11741 v_0_0_1 := v_0_0.Args[1]
11742 if v_0_0_1.Op != OpConst64 {
11743 break
11744 }
11745 c := auxIntToInt64(v_0_0_1.AuxInt)
11746 if v_1.Op != OpConst16 {
11747 break
11748 }
11749 d := auxIntToInt16(v_1.AuxInt)
11750 if !(0 < c && c < 8 && 1<<uint(8-c)-1 < d) {
11751 break
11752 }
11753 v.reset(OpConstBool)
11754 v.AuxInt = boolToAuxInt(true)
11755 return true
11756 }
11757
11758
11759
11760 for {
11761 if v_0.Op != OpRsh8Ux64 {
11762 break
11763 }
11764 _ = v_0.Args[1]
11765 v_0_1 := v_0.Args[1]
11766 if v_0_1.Op != OpConst64 {
11767 break
11768 }
11769 c := auxIntToInt64(v_0_1.AuxInt)
11770 if v_1.Op != OpConst64 {
11771 break
11772 }
11773 d := auxIntToInt64(v_1.AuxInt)
11774 if !(0 < c && c < 8 && 1<<uint(8-c)-1 < d) {
11775 break
11776 }
11777 v.reset(OpConstBool)
11778 v.AuxInt = boolToAuxInt(true)
11779 return true
11780 }
11781
11782
11783
11784 for {
11785 if v_0.Op != OpZeroExt16to64 {
11786 break
11787 }
11788 v_0_0 := v_0.Args[0]
11789 if v_0_0.Op != OpRsh16Ux64 {
11790 break
11791 }
11792 _ = v_0_0.Args[1]
11793 v_0_0_1 := v_0_0.Args[1]
11794 if v_0_0_1.Op != OpConst64 {
11795 break
11796 }
11797 c := auxIntToInt64(v_0_0_1.AuxInt)
11798 if v_1.Op != OpConst64 {
11799 break
11800 }
11801 d := auxIntToInt64(v_1.AuxInt)
11802 if !(0 < c && c < 16 && 1<<uint(16-c)-1 < d) {
11803 break
11804 }
11805 v.reset(OpConstBool)
11806 v.AuxInt = boolToAuxInt(true)
11807 return true
11808 }
11809
11810
11811
11812 for {
11813 if v_0.Op != OpZeroExt16to32 {
11814 break
11815 }
11816 v_0_0 := v_0.Args[0]
11817 if v_0_0.Op != OpRsh16Ux64 {
11818 break
11819 }
11820 _ = v_0_0.Args[1]
11821 v_0_0_1 := v_0_0.Args[1]
11822 if v_0_0_1.Op != OpConst64 {
11823 break
11824 }
11825 c := auxIntToInt64(v_0_0_1.AuxInt)
11826 if v_1.Op != OpConst64 {
11827 break
11828 }
11829 d := auxIntToInt64(v_1.AuxInt)
11830 if !(0 < c && c < 16 && 1<<uint(16-c)-1 < d) {
11831 break
11832 }
11833 v.reset(OpConstBool)
11834 v.AuxInt = boolToAuxInt(true)
11835 return true
11836 }
11837
11838
11839
11840 for {
11841 if v_0.Op != OpRsh16Ux64 {
11842 break
11843 }
11844 _ = v_0.Args[1]
11845 v_0_1 := v_0.Args[1]
11846 if v_0_1.Op != OpConst64 {
11847 break
11848 }
11849 c := auxIntToInt64(v_0_1.AuxInt)
11850 if v_1.Op != OpConst64 {
11851 break
11852 }
11853 d := auxIntToInt64(v_1.AuxInt)
11854 if !(0 < c && c < 16 && 1<<uint(16-c)-1 < d) {
11855 break
11856 }
11857 v.reset(OpConstBool)
11858 v.AuxInt = boolToAuxInt(true)
11859 return true
11860 }
11861
11862
11863
11864 for {
11865 if v_0.Op != OpZeroExt32to64 {
11866 break
11867 }
11868 v_0_0 := v_0.Args[0]
11869 if v_0_0.Op != OpRsh32Ux64 {
11870 break
11871 }
11872 _ = v_0_0.Args[1]
11873 v_0_0_1 := v_0_0.Args[1]
11874 if v_0_0_1.Op != OpConst64 {
11875 break
11876 }
11877 c := auxIntToInt64(v_0_0_1.AuxInt)
11878 if v_1.Op != OpConst64 {
11879 break
11880 }
11881 d := auxIntToInt64(v_1.AuxInt)
11882 if !(0 < c && c < 32 && 1<<uint(32-c)-1 < d) {
11883 break
11884 }
11885 v.reset(OpConstBool)
11886 v.AuxInt = boolToAuxInt(true)
11887 return true
11888 }
11889
11890
11891
11892 for {
11893 if v_0.Op != OpRsh32Ux64 {
11894 break
11895 }
11896 _ = v_0.Args[1]
11897 v_0_1 := v_0.Args[1]
11898 if v_0_1.Op != OpConst64 {
11899 break
11900 }
11901 c := auxIntToInt64(v_0_1.AuxInt)
11902 if v_1.Op != OpConst64 {
11903 break
11904 }
11905 d := auxIntToInt64(v_1.AuxInt)
11906 if !(0 < c && c < 32 && 1<<uint(32-c)-1 < d) {
11907 break
11908 }
11909 v.reset(OpConstBool)
11910 v.AuxInt = boolToAuxInt(true)
11911 return true
11912 }
11913
11914
11915
11916 for {
11917 if v_0.Op != OpRsh64Ux64 {
11918 break
11919 }
11920 _ = v_0.Args[1]
11921 v_0_1 := v_0.Args[1]
11922 if v_0_1.Op != OpConst64 {
11923 break
11924 }
11925 c := auxIntToInt64(v_0_1.AuxInt)
11926 if v_1.Op != OpConst64 {
11927 break
11928 }
11929 d := auxIntToInt64(v_1.AuxInt)
11930 if !(0 < c && c < 64 && 1<<uint(64-c)-1 < d) {
11931 break
11932 }
11933 v.reset(OpConstBool)
11934 v.AuxInt = boolToAuxInt(true)
11935 return true
11936 }
11937 return false
11938 }
11939 func rewriteValuegeneric_OpIsNonNil(v *Value) bool {
11940 v_0 := v.Args[0]
11941
11942
11943 for {
11944 if v_0.Op != OpConstNil {
11945 break
11946 }
11947 v.reset(OpConstBool)
11948 v.AuxInt = boolToAuxInt(false)
11949 return true
11950 }
11951
11952
11953 for {
11954 if v_0.Op != OpConst32 {
11955 break
11956 }
11957 c := auxIntToInt32(v_0.AuxInt)
11958 v.reset(OpConstBool)
11959 v.AuxInt = boolToAuxInt(c != 0)
11960 return true
11961 }
11962
11963
11964 for {
11965 if v_0.Op != OpConst64 {
11966 break
11967 }
11968 c := auxIntToInt64(v_0.AuxInt)
11969 v.reset(OpConstBool)
11970 v.AuxInt = boolToAuxInt(c != 0)
11971 return true
11972 }
11973
11974
11975 for {
11976 if v_0.Op != OpAddr {
11977 break
11978 }
11979 v.reset(OpConstBool)
11980 v.AuxInt = boolToAuxInt(true)
11981 return true
11982 }
11983
11984
11985 for {
11986 if v_0.Op != OpConvert {
11987 break
11988 }
11989 v_0_0 := v_0.Args[0]
11990 if v_0_0.Op != OpAddr {
11991 break
11992 }
11993 v.reset(OpConstBool)
11994 v.AuxInt = boolToAuxInt(true)
11995 return true
11996 }
11997
11998
11999 for {
12000 if v_0.Op != OpLocalAddr {
12001 break
12002 }
12003 v.reset(OpConstBool)
12004 v.AuxInt = boolToAuxInt(true)
12005 return true
12006 }
12007 return false
12008 }
12009 func rewriteValuegeneric_OpIsSliceInBounds(v *Value) bool {
12010 v_1 := v.Args[1]
12011 v_0 := v.Args[0]
12012
12013
12014 for {
12015 x := v_0
12016 if x != v_1 {
12017 break
12018 }
12019 v.reset(OpConstBool)
12020 v.AuxInt = boolToAuxInt(true)
12021 return true
12022 }
12023
12024
12025
12026 for {
12027 if v_0.Op != OpAnd32 {
12028 break
12029 }
12030 v_0_0 := v_0.Args[0]
12031 v_0_1 := v_0.Args[1]
12032 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
12033 if v_0_0.Op != OpConst32 {
12034 continue
12035 }
12036 c := auxIntToInt32(v_0_0.AuxInt)
12037 if v_1.Op != OpConst32 {
12038 continue
12039 }
12040 d := auxIntToInt32(v_1.AuxInt)
12041 if !(0 <= c && c <= d) {
12042 continue
12043 }
12044 v.reset(OpConstBool)
12045 v.AuxInt = boolToAuxInt(true)
12046 return true
12047 }
12048 break
12049 }
12050
12051
12052
12053 for {
12054 if v_0.Op != OpAnd64 {
12055 break
12056 }
12057 v_0_0 := v_0.Args[0]
12058 v_0_1 := v_0.Args[1]
12059 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
12060 if v_0_0.Op != OpConst64 {
12061 continue
12062 }
12063 c := auxIntToInt64(v_0_0.AuxInt)
12064 if v_1.Op != OpConst64 {
12065 continue
12066 }
12067 d := auxIntToInt64(v_1.AuxInt)
12068 if !(0 <= c && c <= d) {
12069 continue
12070 }
12071 v.reset(OpConstBool)
12072 v.AuxInt = boolToAuxInt(true)
12073 return true
12074 }
12075 break
12076 }
12077
12078
12079 for {
12080 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
12081 break
12082 }
12083 v.reset(OpConstBool)
12084 v.AuxInt = boolToAuxInt(true)
12085 return true
12086 }
12087
12088
12089 for {
12090 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
12091 break
12092 }
12093 v.reset(OpConstBool)
12094 v.AuxInt = boolToAuxInt(true)
12095 return true
12096 }
12097
12098
12099 for {
12100 if v_0.Op != OpConst32 {
12101 break
12102 }
12103 c := auxIntToInt32(v_0.AuxInt)
12104 if v_1.Op != OpConst32 {
12105 break
12106 }
12107 d := auxIntToInt32(v_1.AuxInt)
12108 v.reset(OpConstBool)
12109 v.AuxInt = boolToAuxInt(0 <= c && c <= d)
12110 return true
12111 }
12112
12113
12114 for {
12115 if v_0.Op != OpConst64 {
12116 break
12117 }
12118 c := auxIntToInt64(v_0.AuxInt)
12119 if v_1.Op != OpConst64 {
12120 break
12121 }
12122 d := auxIntToInt64(v_1.AuxInt)
12123 v.reset(OpConstBool)
12124 v.AuxInt = boolToAuxInt(0 <= c && c <= d)
12125 return true
12126 }
12127
12128
12129 for {
12130 if v_0.Op != OpSliceLen {
12131 break
12132 }
12133 x := v_0.Args[0]
12134 if v_1.Op != OpSliceCap || x != v_1.Args[0] {
12135 break
12136 }
12137 v.reset(OpConstBool)
12138 v.AuxInt = boolToAuxInt(true)
12139 return true
12140 }
12141 return false
12142 }
12143 func rewriteValuegeneric_OpLeq16(v *Value) bool {
12144 v_1 := v.Args[1]
12145 v_0 := v.Args[0]
12146 b := v.Block
12147
12148
12149 for {
12150 if v_0.Op != OpConst16 {
12151 break
12152 }
12153 c := auxIntToInt16(v_0.AuxInt)
12154 if v_1.Op != OpConst16 {
12155 break
12156 }
12157 d := auxIntToInt16(v_1.AuxInt)
12158 v.reset(OpConstBool)
12159 v.AuxInt = boolToAuxInt(c <= d)
12160 return true
12161 }
12162
12163
12164
12165 for {
12166 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 || v_1.Op != OpAnd16 {
12167 break
12168 }
12169 _ = v_1.Args[1]
12170 v_1_0 := v_1.Args[0]
12171 v_1_1 := v_1.Args[1]
12172 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
12173 if v_1_1.Op != OpConst16 {
12174 continue
12175 }
12176 c := auxIntToInt16(v_1_1.AuxInt)
12177 if !(c >= 0) {
12178 continue
12179 }
12180 v.reset(OpConstBool)
12181 v.AuxInt = boolToAuxInt(true)
12182 return true
12183 }
12184 break
12185 }
12186
12187
12188
12189 for {
12190 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 || v_1.Op != OpRsh16Ux64 {
12191 break
12192 }
12193 _ = v_1.Args[1]
12194 v_1_1 := v_1.Args[1]
12195 if v_1_1.Op != OpConst64 {
12196 break
12197 }
12198 c := auxIntToInt64(v_1_1.AuxInt)
12199 if !(c > 0) {
12200 break
12201 }
12202 v.reset(OpConstBool)
12203 v.AuxInt = boolToAuxInt(true)
12204 return true
12205 }
12206
12207
12208 for {
12209 x := v_0
12210 if v_1.Op != OpConst16 {
12211 break
12212 }
12213 t := v_1.Type
12214 if auxIntToInt16(v_1.AuxInt) != -1 {
12215 break
12216 }
12217 v.reset(OpLess16)
12218 v0 := b.NewValue0(v.Pos, OpConst16, t)
12219 v0.AuxInt = int16ToAuxInt(0)
12220 v.AddArg2(x, v0)
12221 return true
12222 }
12223
12224
12225 for {
12226 if v_0.Op != OpConst16 {
12227 break
12228 }
12229 t := v_0.Type
12230 if auxIntToInt16(v_0.AuxInt) != 1 {
12231 break
12232 }
12233 x := v_1
12234 v.reset(OpLess16)
12235 v0 := b.NewValue0(v.Pos, OpConst16, t)
12236 v0.AuxInt = int16ToAuxInt(0)
12237 v.AddArg2(v0, x)
12238 return true
12239 }
12240
12241
12242 for {
12243 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != math.MinInt16 {
12244 break
12245 }
12246 v.reset(OpConstBool)
12247 v.AuxInt = boolToAuxInt(true)
12248 return true
12249 }
12250
12251
12252 for {
12253 if v_1.Op != OpConst16 || auxIntToInt16(v_1.AuxInt) != math.MaxInt16 {
12254 break
12255 }
12256 v.reset(OpConstBool)
12257 v.AuxInt = boolToAuxInt(true)
12258 return true
12259 }
12260
12261
12262 for {
12263 x := v_0
12264 c := v_1
12265 if c.Op != OpConst16 || auxIntToInt16(c.AuxInt) != math.MinInt16 {
12266 break
12267 }
12268 v.reset(OpEq16)
12269 v.AddArg2(x, c)
12270 return true
12271 }
12272
12273
12274 for {
12275 c := v_0
12276 if c.Op != OpConst16 || auxIntToInt16(c.AuxInt) != math.MaxInt16 {
12277 break
12278 }
12279 x := v_1
12280 v.reset(OpEq16)
12281 v.AddArg2(x, c)
12282 return true
12283 }
12284 return false
12285 }
12286 func rewriteValuegeneric_OpLeq16U(v *Value) bool {
12287 v_1 := v.Args[1]
12288 v_0 := v.Args[0]
12289 b := v.Block
12290
12291
12292 for {
12293 if v_0.Op != OpConst16 {
12294 break
12295 }
12296 c := auxIntToInt16(v_0.AuxInt)
12297 if v_1.Op != OpConst16 {
12298 break
12299 }
12300 d := auxIntToInt16(v_1.AuxInt)
12301 v.reset(OpConstBool)
12302 v.AuxInt = boolToAuxInt(uint16(c) <= uint16(d))
12303 return true
12304 }
12305
12306
12307 for {
12308 if v_0.Op != OpConst16 {
12309 break
12310 }
12311 t := v_0.Type
12312 if auxIntToInt16(v_0.AuxInt) != 1 {
12313 break
12314 }
12315 x := v_1
12316 v.reset(OpNeq16)
12317 v0 := b.NewValue0(v.Pos, OpConst16, t)
12318 v0.AuxInt = int16ToAuxInt(0)
12319 v.AddArg2(v0, x)
12320 return true
12321 }
12322
12323
12324 for {
12325 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 {
12326 break
12327 }
12328 v.reset(OpConstBool)
12329 v.AuxInt = boolToAuxInt(true)
12330 return true
12331 }
12332
12333
12334 for {
12335 if v_1.Op != OpConst16 || auxIntToInt16(v_1.AuxInt) != -1 {
12336 break
12337 }
12338 v.reset(OpConstBool)
12339 v.AuxInt = boolToAuxInt(true)
12340 return true
12341 }
12342
12343
12344 for {
12345 x := v_0
12346 c := v_1
12347 if c.Op != OpConst16 || auxIntToInt16(c.AuxInt) != 0 {
12348 break
12349 }
12350 v.reset(OpEq16)
12351 v.AddArg2(x, c)
12352 return true
12353 }
12354
12355
12356 for {
12357 c := v_0
12358 if c.Op != OpConst16 || auxIntToInt16(c.AuxInt) != -1 {
12359 break
12360 }
12361 x := v_1
12362 v.reset(OpEq16)
12363 v.AddArg2(x, c)
12364 return true
12365 }
12366 return false
12367 }
12368 func rewriteValuegeneric_OpLeq32(v *Value) bool {
12369 v_1 := v.Args[1]
12370 v_0 := v.Args[0]
12371 b := v.Block
12372
12373
12374 for {
12375 if v_0.Op != OpConst32 {
12376 break
12377 }
12378 c := auxIntToInt32(v_0.AuxInt)
12379 if v_1.Op != OpConst32 {
12380 break
12381 }
12382 d := auxIntToInt32(v_1.AuxInt)
12383 v.reset(OpConstBool)
12384 v.AuxInt = boolToAuxInt(c <= d)
12385 return true
12386 }
12387
12388
12389
12390 for {
12391 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 || v_1.Op != OpAnd32 {
12392 break
12393 }
12394 _ = v_1.Args[1]
12395 v_1_0 := v_1.Args[0]
12396 v_1_1 := v_1.Args[1]
12397 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
12398 if v_1_1.Op != OpConst32 {
12399 continue
12400 }
12401 c := auxIntToInt32(v_1_1.AuxInt)
12402 if !(c >= 0) {
12403 continue
12404 }
12405 v.reset(OpConstBool)
12406 v.AuxInt = boolToAuxInt(true)
12407 return true
12408 }
12409 break
12410 }
12411
12412
12413
12414 for {
12415 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 || v_1.Op != OpRsh32Ux64 {
12416 break
12417 }
12418 _ = v_1.Args[1]
12419 v_1_1 := v_1.Args[1]
12420 if v_1_1.Op != OpConst64 {
12421 break
12422 }
12423 c := auxIntToInt64(v_1_1.AuxInt)
12424 if !(c > 0) {
12425 break
12426 }
12427 v.reset(OpConstBool)
12428 v.AuxInt = boolToAuxInt(true)
12429 return true
12430 }
12431
12432
12433 for {
12434 x := v_0
12435 if v_1.Op != OpConst32 {
12436 break
12437 }
12438 t := v_1.Type
12439 if auxIntToInt32(v_1.AuxInt) != -1 {
12440 break
12441 }
12442 v.reset(OpLess32)
12443 v0 := b.NewValue0(v.Pos, OpConst32, t)
12444 v0.AuxInt = int32ToAuxInt(0)
12445 v.AddArg2(x, v0)
12446 return true
12447 }
12448
12449
12450 for {
12451 if v_0.Op != OpConst32 {
12452 break
12453 }
12454 t := v_0.Type
12455 if auxIntToInt32(v_0.AuxInt) != 1 {
12456 break
12457 }
12458 x := v_1
12459 v.reset(OpLess32)
12460 v0 := b.NewValue0(v.Pos, OpConst32, t)
12461 v0.AuxInt = int32ToAuxInt(0)
12462 v.AddArg2(v0, x)
12463 return true
12464 }
12465
12466
12467 for {
12468 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != math.MinInt32 {
12469 break
12470 }
12471 v.reset(OpConstBool)
12472 v.AuxInt = boolToAuxInt(true)
12473 return true
12474 }
12475
12476
12477 for {
12478 if v_1.Op != OpConst32 || auxIntToInt32(v_1.AuxInt) != math.MaxInt32 {
12479 break
12480 }
12481 v.reset(OpConstBool)
12482 v.AuxInt = boolToAuxInt(true)
12483 return true
12484 }
12485
12486
12487 for {
12488 x := v_0
12489 c := v_1
12490 if c.Op != OpConst32 || auxIntToInt32(c.AuxInt) != math.MinInt32 {
12491 break
12492 }
12493 v.reset(OpEq32)
12494 v.AddArg2(x, c)
12495 return true
12496 }
12497
12498
12499 for {
12500 c := v_0
12501 if c.Op != OpConst32 || auxIntToInt32(c.AuxInt) != math.MaxInt32 {
12502 break
12503 }
12504 x := v_1
12505 v.reset(OpEq32)
12506 v.AddArg2(x, c)
12507 return true
12508 }
12509 return false
12510 }
12511 func rewriteValuegeneric_OpLeq32F(v *Value) bool {
12512 v_1 := v.Args[1]
12513 v_0 := v.Args[0]
12514
12515
12516 for {
12517 if v_0.Op != OpConst32F {
12518 break
12519 }
12520 c := auxIntToFloat32(v_0.AuxInt)
12521 if v_1.Op != OpConst32F {
12522 break
12523 }
12524 d := auxIntToFloat32(v_1.AuxInt)
12525 v.reset(OpConstBool)
12526 v.AuxInt = boolToAuxInt(c <= d)
12527 return true
12528 }
12529 return false
12530 }
12531 func rewriteValuegeneric_OpLeq32U(v *Value) bool {
12532 v_1 := v.Args[1]
12533 v_0 := v.Args[0]
12534 b := v.Block
12535
12536
12537 for {
12538 if v_0.Op != OpConst32 {
12539 break
12540 }
12541 c := auxIntToInt32(v_0.AuxInt)
12542 if v_1.Op != OpConst32 {
12543 break
12544 }
12545 d := auxIntToInt32(v_1.AuxInt)
12546 v.reset(OpConstBool)
12547 v.AuxInt = boolToAuxInt(uint32(c) <= uint32(d))
12548 return true
12549 }
12550
12551
12552 for {
12553 if v_0.Op != OpConst32 {
12554 break
12555 }
12556 t := v_0.Type
12557 if auxIntToInt32(v_0.AuxInt) != 1 {
12558 break
12559 }
12560 x := v_1
12561 v.reset(OpNeq32)
12562 v0 := b.NewValue0(v.Pos, OpConst32, t)
12563 v0.AuxInt = int32ToAuxInt(0)
12564 v.AddArg2(v0, x)
12565 return true
12566 }
12567
12568
12569 for {
12570 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
12571 break
12572 }
12573 v.reset(OpConstBool)
12574 v.AuxInt = boolToAuxInt(true)
12575 return true
12576 }
12577
12578
12579 for {
12580 if v_1.Op != OpConst32 || auxIntToInt32(v_1.AuxInt) != -1 {
12581 break
12582 }
12583 v.reset(OpConstBool)
12584 v.AuxInt = boolToAuxInt(true)
12585 return true
12586 }
12587
12588
12589 for {
12590 x := v_0
12591 c := v_1
12592 if c.Op != OpConst32 || auxIntToInt32(c.AuxInt) != 0 {
12593 break
12594 }
12595 v.reset(OpEq32)
12596 v.AddArg2(x, c)
12597 return true
12598 }
12599
12600
12601 for {
12602 c := v_0
12603 if c.Op != OpConst32 || auxIntToInt32(c.AuxInt) != -1 {
12604 break
12605 }
12606 x := v_1
12607 v.reset(OpEq32)
12608 v.AddArg2(x, c)
12609 return true
12610 }
12611 return false
12612 }
12613 func rewriteValuegeneric_OpLeq64(v *Value) bool {
12614 v_1 := v.Args[1]
12615 v_0 := v.Args[0]
12616 b := v.Block
12617
12618
12619 for {
12620 if v_0.Op != OpConst64 {
12621 break
12622 }
12623 c := auxIntToInt64(v_0.AuxInt)
12624 if v_1.Op != OpConst64 {
12625 break
12626 }
12627 d := auxIntToInt64(v_1.AuxInt)
12628 v.reset(OpConstBool)
12629 v.AuxInt = boolToAuxInt(c <= d)
12630 return true
12631 }
12632
12633
12634
12635 for {
12636 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 || v_1.Op != OpAnd64 {
12637 break
12638 }
12639 _ = v_1.Args[1]
12640 v_1_0 := v_1.Args[0]
12641 v_1_1 := v_1.Args[1]
12642 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
12643 if v_1_1.Op != OpConst64 {
12644 continue
12645 }
12646 c := auxIntToInt64(v_1_1.AuxInt)
12647 if !(c >= 0) {
12648 continue
12649 }
12650 v.reset(OpConstBool)
12651 v.AuxInt = boolToAuxInt(true)
12652 return true
12653 }
12654 break
12655 }
12656
12657
12658
12659 for {
12660 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 || v_1.Op != OpRsh64Ux64 {
12661 break
12662 }
12663 _ = v_1.Args[1]
12664 v_1_1 := v_1.Args[1]
12665 if v_1_1.Op != OpConst64 {
12666 break
12667 }
12668 c := auxIntToInt64(v_1_1.AuxInt)
12669 if !(c > 0) {
12670 break
12671 }
12672 v.reset(OpConstBool)
12673 v.AuxInt = boolToAuxInt(true)
12674 return true
12675 }
12676
12677
12678 for {
12679 x := v_0
12680 if v_1.Op != OpConst64 {
12681 break
12682 }
12683 t := v_1.Type
12684 if auxIntToInt64(v_1.AuxInt) != -1 {
12685 break
12686 }
12687 v.reset(OpLess64)
12688 v0 := b.NewValue0(v.Pos, OpConst64, t)
12689 v0.AuxInt = int64ToAuxInt(0)
12690 v.AddArg2(x, v0)
12691 return true
12692 }
12693
12694
12695 for {
12696 if v_0.Op != OpConst64 {
12697 break
12698 }
12699 t := v_0.Type
12700 if auxIntToInt64(v_0.AuxInt) != 1 {
12701 break
12702 }
12703 x := v_1
12704 v.reset(OpLess64)
12705 v0 := b.NewValue0(v.Pos, OpConst64, t)
12706 v0.AuxInt = int64ToAuxInt(0)
12707 v.AddArg2(v0, x)
12708 return true
12709 }
12710
12711
12712 for {
12713 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != math.MinInt64 {
12714 break
12715 }
12716 v.reset(OpConstBool)
12717 v.AuxInt = boolToAuxInt(true)
12718 return true
12719 }
12720
12721
12722 for {
12723 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != math.MaxInt64 {
12724 break
12725 }
12726 v.reset(OpConstBool)
12727 v.AuxInt = boolToAuxInt(true)
12728 return true
12729 }
12730
12731
12732 for {
12733 x := v_0
12734 c := v_1
12735 if c.Op != OpConst64 || auxIntToInt64(c.AuxInt) != math.MinInt64 {
12736 break
12737 }
12738 v.reset(OpEq64)
12739 v.AddArg2(x, c)
12740 return true
12741 }
12742
12743
12744 for {
12745 c := v_0
12746 if c.Op != OpConst64 || auxIntToInt64(c.AuxInt) != math.MaxInt64 {
12747 break
12748 }
12749 x := v_1
12750 v.reset(OpEq64)
12751 v.AddArg2(x, c)
12752 return true
12753 }
12754 return false
12755 }
12756 func rewriteValuegeneric_OpLeq64F(v *Value) bool {
12757 v_1 := v.Args[1]
12758 v_0 := v.Args[0]
12759
12760
12761 for {
12762 if v_0.Op != OpConst64F {
12763 break
12764 }
12765 c := auxIntToFloat64(v_0.AuxInt)
12766 if v_1.Op != OpConst64F {
12767 break
12768 }
12769 d := auxIntToFloat64(v_1.AuxInt)
12770 v.reset(OpConstBool)
12771 v.AuxInt = boolToAuxInt(c <= d)
12772 return true
12773 }
12774 return false
12775 }
12776 func rewriteValuegeneric_OpLeq64U(v *Value) bool {
12777 v_1 := v.Args[1]
12778 v_0 := v.Args[0]
12779 b := v.Block
12780
12781
12782 for {
12783 if v_0.Op != OpConst64 {
12784 break
12785 }
12786 c := auxIntToInt64(v_0.AuxInt)
12787 if v_1.Op != OpConst64 {
12788 break
12789 }
12790 d := auxIntToInt64(v_1.AuxInt)
12791 v.reset(OpConstBool)
12792 v.AuxInt = boolToAuxInt(uint64(c) <= uint64(d))
12793 return true
12794 }
12795
12796
12797 for {
12798 if v_0.Op != OpConst64 {
12799 break
12800 }
12801 t := v_0.Type
12802 if auxIntToInt64(v_0.AuxInt) != 1 {
12803 break
12804 }
12805 x := v_1
12806 v.reset(OpNeq64)
12807 v0 := b.NewValue0(v.Pos, OpConst64, t)
12808 v0.AuxInt = int64ToAuxInt(0)
12809 v.AddArg2(v0, x)
12810 return true
12811 }
12812
12813
12814 for {
12815 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
12816 break
12817 }
12818 v.reset(OpConstBool)
12819 v.AuxInt = boolToAuxInt(true)
12820 return true
12821 }
12822
12823
12824 for {
12825 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != -1 {
12826 break
12827 }
12828 v.reset(OpConstBool)
12829 v.AuxInt = boolToAuxInt(true)
12830 return true
12831 }
12832
12833
12834 for {
12835 x := v_0
12836 c := v_1
12837 if c.Op != OpConst64 || auxIntToInt64(c.AuxInt) != 0 {
12838 break
12839 }
12840 v.reset(OpEq64)
12841 v.AddArg2(x, c)
12842 return true
12843 }
12844
12845
12846 for {
12847 c := v_0
12848 if c.Op != OpConst64 || auxIntToInt64(c.AuxInt) != -1 {
12849 break
12850 }
12851 x := v_1
12852 v.reset(OpEq64)
12853 v.AddArg2(x, c)
12854 return true
12855 }
12856 return false
12857 }
12858 func rewriteValuegeneric_OpLeq8(v *Value) bool {
12859 v_1 := v.Args[1]
12860 v_0 := v.Args[0]
12861 b := v.Block
12862
12863
12864 for {
12865 if v_0.Op != OpConst8 {
12866 break
12867 }
12868 c := auxIntToInt8(v_0.AuxInt)
12869 if v_1.Op != OpConst8 {
12870 break
12871 }
12872 d := auxIntToInt8(v_1.AuxInt)
12873 v.reset(OpConstBool)
12874 v.AuxInt = boolToAuxInt(c <= d)
12875 return true
12876 }
12877
12878
12879
12880 for {
12881 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 || v_1.Op != OpAnd8 {
12882 break
12883 }
12884 _ = v_1.Args[1]
12885 v_1_0 := v_1.Args[0]
12886 v_1_1 := v_1.Args[1]
12887 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
12888 if v_1_1.Op != OpConst8 {
12889 continue
12890 }
12891 c := auxIntToInt8(v_1_1.AuxInt)
12892 if !(c >= 0) {
12893 continue
12894 }
12895 v.reset(OpConstBool)
12896 v.AuxInt = boolToAuxInt(true)
12897 return true
12898 }
12899 break
12900 }
12901
12902
12903
12904 for {
12905 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 || v_1.Op != OpRsh8Ux64 {
12906 break
12907 }
12908 _ = v_1.Args[1]
12909 v_1_1 := v_1.Args[1]
12910 if v_1_1.Op != OpConst64 {
12911 break
12912 }
12913 c := auxIntToInt64(v_1_1.AuxInt)
12914 if !(c > 0) {
12915 break
12916 }
12917 v.reset(OpConstBool)
12918 v.AuxInt = boolToAuxInt(true)
12919 return true
12920 }
12921
12922
12923 for {
12924 x := v_0
12925 if v_1.Op != OpConst8 {
12926 break
12927 }
12928 t := v_1.Type
12929 if auxIntToInt8(v_1.AuxInt) != -1 {
12930 break
12931 }
12932 v.reset(OpLess8)
12933 v0 := b.NewValue0(v.Pos, OpConst8, t)
12934 v0.AuxInt = int8ToAuxInt(0)
12935 v.AddArg2(x, v0)
12936 return true
12937 }
12938
12939
12940 for {
12941 if v_0.Op != OpConst8 {
12942 break
12943 }
12944 t := v_0.Type
12945 if auxIntToInt8(v_0.AuxInt) != 1 {
12946 break
12947 }
12948 x := v_1
12949 v.reset(OpLess8)
12950 v0 := b.NewValue0(v.Pos, OpConst8, t)
12951 v0.AuxInt = int8ToAuxInt(0)
12952 v.AddArg2(v0, x)
12953 return true
12954 }
12955
12956
12957 for {
12958 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != math.MinInt8 {
12959 break
12960 }
12961 v.reset(OpConstBool)
12962 v.AuxInt = boolToAuxInt(true)
12963 return true
12964 }
12965
12966
12967 for {
12968 if v_1.Op != OpConst8 || auxIntToInt8(v_1.AuxInt) != math.MaxInt8 {
12969 break
12970 }
12971 v.reset(OpConstBool)
12972 v.AuxInt = boolToAuxInt(true)
12973 return true
12974 }
12975
12976
12977 for {
12978 x := v_0
12979 c := v_1
12980 if c.Op != OpConst8 || auxIntToInt8(c.AuxInt) != math.MinInt8 {
12981 break
12982 }
12983 v.reset(OpEq8)
12984 v.AddArg2(x, c)
12985 return true
12986 }
12987
12988
12989 for {
12990 c := v_0
12991 if c.Op != OpConst8 || auxIntToInt8(c.AuxInt) != math.MaxInt8 {
12992 break
12993 }
12994 x := v_1
12995 v.reset(OpEq8)
12996 v.AddArg2(x, c)
12997 return true
12998 }
12999 return false
13000 }
13001 func rewriteValuegeneric_OpLeq8U(v *Value) bool {
13002 v_1 := v.Args[1]
13003 v_0 := v.Args[0]
13004 b := v.Block
13005
13006
13007 for {
13008 if v_0.Op != OpConst8 {
13009 break
13010 }
13011 c := auxIntToInt8(v_0.AuxInt)
13012 if v_1.Op != OpConst8 {
13013 break
13014 }
13015 d := auxIntToInt8(v_1.AuxInt)
13016 v.reset(OpConstBool)
13017 v.AuxInt = boolToAuxInt(uint8(c) <= uint8(d))
13018 return true
13019 }
13020
13021
13022 for {
13023 if v_0.Op != OpConst8 {
13024 break
13025 }
13026 t := v_0.Type
13027 if auxIntToInt8(v_0.AuxInt) != 1 {
13028 break
13029 }
13030 x := v_1
13031 v.reset(OpNeq8)
13032 v0 := b.NewValue0(v.Pos, OpConst8, t)
13033 v0.AuxInt = int8ToAuxInt(0)
13034 v.AddArg2(v0, x)
13035 return true
13036 }
13037
13038
13039 for {
13040 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 {
13041 break
13042 }
13043 v.reset(OpConstBool)
13044 v.AuxInt = boolToAuxInt(true)
13045 return true
13046 }
13047
13048
13049 for {
13050 if v_1.Op != OpConst8 || auxIntToInt8(v_1.AuxInt) != -1 {
13051 break
13052 }
13053 v.reset(OpConstBool)
13054 v.AuxInt = boolToAuxInt(true)
13055 return true
13056 }
13057
13058
13059 for {
13060 x := v_0
13061 c := v_1
13062 if c.Op != OpConst8 || auxIntToInt8(c.AuxInt) != 0 {
13063 break
13064 }
13065 v.reset(OpEq8)
13066 v.AddArg2(x, c)
13067 return true
13068 }
13069
13070
13071 for {
13072 c := v_0
13073 if c.Op != OpConst8 || auxIntToInt8(c.AuxInt) != -1 {
13074 break
13075 }
13076 x := v_1
13077 v.reset(OpEq8)
13078 v.AddArg2(x, c)
13079 return true
13080 }
13081 return false
13082 }
13083 func rewriteValuegeneric_OpLess16(v *Value) bool {
13084 v_1 := v.Args[1]
13085 v_0 := v.Args[0]
13086 b := v.Block
13087
13088
13089 for {
13090 if v_0.Op != OpConst16 {
13091 break
13092 }
13093 c := auxIntToInt16(v_0.AuxInt)
13094 if v_1.Op != OpConst16 {
13095 break
13096 }
13097 d := auxIntToInt16(v_1.AuxInt)
13098 v.reset(OpConstBool)
13099 v.AuxInt = boolToAuxInt(c < d)
13100 return true
13101 }
13102
13103
13104
13105 for {
13106 if v_0.Op != OpConst16 {
13107 break
13108 }
13109 t := v_0.Type
13110 if auxIntToInt16(v_0.AuxInt) != 0 {
13111 break
13112 }
13113 x := v_1
13114 if !(isNonNegative(x)) {
13115 break
13116 }
13117 v.reset(OpNeq16)
13118 v0 := b.NewValue0(v.Pos, OpConst16, t)
13119 v0.AuxInt = int16ToAuxInt(0)
13120 v.AddArg2(v0, x)
13121 return true
13122 }
13123
13124
13125
13126 for {
13127 x := v_0
13128 if v_1.Op != OpConst16 {
13129 break
13130 }
13131 t := v_1.Type
13132 if auxIntToInt16(v_1.AuxInt) != 1 || !(isNonNegative(x)) {
13133 break
13134 }
13135 v.reset(OpEq16)
13136 v0 := b.NewValue0(v.Pos, OpConst16, t)
13137 v0.AuxInt = int16ToAuxInt(0)
13138 v.AddArg2(v0, x)
13139 return true
13140 }
13141
13142
13143 for {
13144 x := v_0
13145 if v_1.Op != OpConst16 {
13146 break
13147 }
13148 t := v_1.Type
13149 if auxIntToInt16(v_1.AuxInt) != 1 {
13150 break
13151 }
13152 v.reset(OpLeq16)
13153 v0 := b.NewValue0(v.Pos, OpConst16, t)
13154 v0.AuxInt = int16ToAuxInt(0)
13155 v.AddArg2(x, v0)
13156 return true
13157 }
13158
13159
13160 for {
13161 if v_0.Op != OpConst16 {
13162 break
13163 }
13164 t := v_0.Type
13165 if auxIntToInt16(v_0.AuxInt) != -1 {
13166 break
13167 }
13168 x := v_1
13169 v.reset(OpLeq16)
13170 v0 := b.NewValue0(v.Pos, OpConst16, t)
13171 v0.AuxInt = int16ToAuxInt(0)
13172 v.AddArg2(v0, x)
13173 return true
13174 }
13175
13176
13177 for {
13178 if v_1.Op != OpConst16 || auxIntToInt16(v_1.AuxInt) != math.MinInt16 {
13179 break
13180 }
13181 v.reset(OpConstBool)
13182 v.AuxInt = boolToAuxInt(false)
13183 return true
13184 }
13185
13186
13187 for {
13188 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != math.MaxInt16 {
13189 break
13190 }
13191 v.reset(OpConstBool)
13192 v.AuxInt = boolToAuxInt(false)
13193 return true
13194 }
13195
13196
13197 for {
13198 x := v_0
13199 if v_1.Op != OpConst16 {
13200 break
13201 }
13202 t := v_1.Type
13203 if auxIntToInt16(v_1.AuxInt) != math.MinInt16+1 {
13204 break
13205 }
13206 v.reset(OpEq16)
13207 v0 := b.NewValue0(v.Pos, OpConst16, t)
13208 v0.AuxInt = int16ToAuxInt(math.MinInt16)
13209 v.AddArg2(x, v0)
13210 return true
13211 }
13212
13213
13214 for {
13215 if v_0.Op != OpConst16 {
13216 break
13217 }
13218 t := v_0.Type
13219 if auxIntToInt16(v_0.AuxInt) != math.MaxInt16-1 {
13220 break
13221 }
13222 x := v_1
13223 v.reset(OpEq16)
13224 v0 := b.NewValue0(v.Pos, OpConst16, t)
13225 v0.AuxInt = int16ToAuxInt(math.MaxInt16)
13226 v.AddArg2(x, v0)
13227 return true
13228 }
13229 return false
13230 }
13231 func rewriteValuegeneric_OpLess16U(v *Value) bool {
13232 v_1 := v.Args[1]
13233 v_0 := v.Args[0]
13234 b := v.Block
13235
13236
13237 for {
13238 if v_0.Op != OpConst16 {
13239 break
13240 }
13241 c := auxIntToInt16(v_0.AuxInt)
13242 if v_1.Op != OpConst16 {
13243 break
13244 }
13245 d := auxIntToInt16(v_1.AuxInt)
13246 v.reset(OpConstBool)
13247 v.AuxInt = boolToAuxInt(uint16(c) < uint16(d))
13248 return true
13249 }
13250
13251
13252 for {
13253 x := v_0
13254 if v_1.Op != OpConst16 {
13255 break
13256 }
13257 t := v_1.Type
13258 if auxIntToInt16(v_1.AuxInt) != 1 {
13259 break
13260 }
13261 v.reset(OpEq16)
13262 v0 := b.NewValue0(v.Pos, OpConst16, t)
13263 v0.AuxInt = int16ToAuxInt(0)
13264 v.AddArg2(v0, x)
13265 return true
13266 }
13267
13268
13269 for {
13270 if v_1.Op != OpConst16 || auxIntToInt16(v_1.AuxInt) != 0 {
13271 break
13272 }
13273 v.reset(OpConstBool)
13274 v.AuxInt = boolToAuxInt(false)
13275 return true
13276 }
13277
13278
13279 for {
13280 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != -1 {
13281 break
13282 }
13283 v.reset(OpConstBool)
13284 v.AuxInt = boolToAuxInt(false)
13285 return true
13286 }
13287
13288
13289 for {
13290 x := v_0
13291 if v_1.Op != OpConst16 {
13292 break
13293 }
13294 t := v_1.Type
13295 if auxIntToInt16(v_1.AuxInt) != 1 {
13296 break
13297 }
13298 v.reset(OpEq16)
13299 v0 := b.NewValue0(v.Pos, OpConst16, t)
13300 v0.AuxInt = int16ToAuxInt(0)
13301 v.AddArg2(x, v0)
13302 return true
13303 }
13304
13305
13306 for {
13307 if v_0.Op != OpConst16 {
13308 break
13309 }
13310 t := v_0.Type
13311 if auxIntToInt16(v_0.AuxInt) != -2 {
13312 break
13313 }
13314 x := v_1
13315 v.reset(OpEq16)
13316 v0 := b.NewValue0(v.Pos, OpConst16, t)
13317 v0.AuxInt = int16ToAuxInt(-1)
13318 v.AddArg2(x, v0)
13319 return true
13320 }
13321 return false
13322 }
13323 func rewriteValuegeneric_OpLess32(v *Value) bool {
13324 v_1 := v.Args[1]
13325 v_0 := v.Args[0]
13326 b := v.Block
13327
13328
13329 for {
13330 if v_0.Op != OpConst32 {
13331 break
13332 }
13333 c := auxIntToInt32(v_0.AuxInt)
13334 if v_1.Op != OpConst32 {
13335 break
13336 }
13337 d := auxIntToInt32(v_1.AuxInt)
13338 v.reset(OpConstBool)
13339 v.AuxInt = boolToAuxInt(c < d)
13340 return true
13341 }
13342
13343
13344
13345 for {
13346 if v_0.Op != OpConst32 {
13347 break
13348 }
13349 t := v_0.Type
13350 if auxIntToInt32(v_0.AuxInt) != 0 {
13351 break
13352 }
13353 x := v_1
13354 if !(isNonNegative(x)) {
13355 break
13356 }
13357 v.reset(OpNeq32)
13358 v0 := b.NewValue0(v.Pos, OpConst32, t)
13359 v0.AuxInt = int32ToAuxInt(0)
13360 v.AddArg2(v0, x)
13361 return true
13362 }
13363
13364
13365
13366 for {
13367 x := v_0
13368 if v_1.Op != OpConst32 {
13369 break
13370 }
13371 t := v_1.Type
13372 if auxIntToInt32(v_1.AuxInt) != 1 || !(isNonNegative(x)) {
13373 break
13374 }
13375 v.reset(OpEq32)
13376 v0 := b.NewValue0(v.Pos, OpConst32, t)
13377 v0.AuxInt = int32ToAuxInt(0)
13378 v.AddArg2(v0, x)
13379 return true
13380 }
13381
13382
13383 for {
13384 x := v_0
13385 if v_1.Op != OpConst32 {
13386 break
13387 }
13388 t := v_1.Type
13389 if auxIntToInt32(v_1.AuxInt) != 1 {
13390 break
13391 }
13392 v.reset(OpLeq32)
13393 v0 := b.NewValue0(v.Pos, OpConst32, t)
13394 v0.AuxInt = int32ToAuxInt(0)
13395 v.AddArg2(x, v0)
13396 return true
13397 }
13398
13399
13400 for {
13401 if v_0.Op != OpConst32 {
13402 break
13403 }
13404 t := v_0.Type
13405 if auxIntToInt32(v_0.AuxInt) != -1 {
13406 break
13407 }
13408 x := v_1
13409 v.reset(OpLeq32)
13410 v0 := b.NewValue0(v.Pos, OpConst32, t)
13411 v0.AuxInt = int32ToAuxInt(0)
13412 v.AddArg2(v0, x)
13413 return true
13414 }
13415
13416
13417 for {
13418 if v_1.Op != OpConst32 || auxIntToInt32(v_1.AuxInt) != math.MinInt32 {
13419 break
13420 }
13421 v.reset(OpConstBool)
13422 v.AuxInt = boolToAuxInt(false)
13423 return true
13424 }
13425
13426
13427 for {
13428 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != math.MaxInt32 {
13429 break
13430 }
13431 v.reset(OpConstBool)
13432 v.AuxInt = boolToAuxInt(false)
13433 return true
13434 }
13435
13436
13437 for {
13438 x := v_0
13439 if v_1.Op != OpConst32 {
13440 break
13441 }
13442 t := v_1.Type
13443 if auxIntToInt32(v_1.AuxInt) != math.MinInt32+1 {
13444 break
13445 }
13446 v.reset(OpEq32)
13447 v0 := b.NewValue0(v.Pos, OpConst32, t)
13448 v0.AuxInt = int32ToAuxInt(math.MinInt32)
13449 v.AddArg2(x, v0)
13450 return true
13451 }
13452
13453
13454 for {
13455 if v_0.Op != OpConst32 {
13456 break
13457 }
13458 t := v_0.Type
13459 if auxIntToInt32(v_0.AuxInt) != math.MaxInt32-1 {
13460 break
13461 }
13462 x := v_1
13463 v.reset(OpEq32)
13464 v0 := b.NewValue0(v.Pos, OpConst32, t)
13465 v0.AuxInt = int32ToAuxInt(math.MaxInt32)
13466 v.AddArg2(x, v0)
13467 return true
13468 }
13469 return false
13470 }
13471 func rewriteValuegeneric_OpLess32F(v *Value) bool {
13472 v_1 := v.Args[1]
13473 v_0 := v.Args[0]
13474
13475
13476 for {
13477 if v_0.Op != OpConst32F {
13478 break
13479 }
13480 c := auxIntToFloat32(v_0.AuxInt)
13481 if v_1.Op != OpConst32F {
13482 break
13483 }
13484 d := auxIntToFloat32(v_1.AuxInt)
13485 v.reset(OpConstBool)
13486 v.AuxInt = boolToAuxInt(c < d)
13487 return true
13488 }
13489 return false
13490 }
13491 func rewriteValuegeneric_OpLess32U(v *Value) bool {
13492 v_1 := v.Args[1]
13493 v_0 := v.Args[0]
13494 b := v.Block
13495
13496
13497 for {
13498 if v_0.Op != OpConst32 {
13499 break
13500 }
13501 c := auxIntToInt32(v_0.AuxInt)
13502 if v_1.Op != OpConst32 {
13503 break
13504 }
13505 d := auxIntToInt32(v_1.AuxInt)
13506 v.reset(OpConstBool)
13507 v.AuxInt = boolToAuxInt(uint32(c) < uint32(d))
13508 return true
13509 }
13510
13511
13512 for {
13513 x := v_0
13514 if v_1.Op != OpConst32 {
13515 break
13516 }
13517 t := v_1.Type
13518 if auxIntToInt32(v_1.AuxInt) != 1 {
13519 break
13520 }
13521 v.reset(OpEq32)
13522 v0 := b.NewValue0(v.Pos, OpConst32, t)
13523 v0.AuxInt = int32ToAuxInt(0)
13524 v.AddArg2(v0, x)
13525 return true
13526 }
13527
13528
13529 for {
13530 if v_1.Op != OpConst32 || auxIntToInt32(v_1.AuxInt) != 0 {
13531 break
13532 }
13533 v.reset(OpConstBool)
13534 v.AuxInt = boolToAuxInt(false)
13535 return true
13536 }
13537
13538
13539 for {
13540 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != -1 {
13541 break
13542 }
13543 v.reset(OpConstBool)
13544 v.AuxInt = boolToAuxInt(false)
13545 return true
13546 }
13547
13548
13549 for {
13550 x := v_0
13551 if v_1.Op != OpConst32 {
13552 break
13553 }
13554 t := v_1.Type
13555 if auxIntToInt32(v_1.AuxInt) != 1 {
13556 break
13557 }
13558 v.reset(OpEq32)
13559 v0 := b.NewValue0(v.Pos, OpConst32, t)
13560 v0.AuxInt = int32ToAuxInt(0)
13561 v.AddArg2(x, v0)
13562 return true
13563 }
13564
13565
13566 for {
13567 if v_0.Op != OpConst32 {
13568 break
13569 }
13570 t := v_0.Type
13571 if auxIntToInt32(v_0.AuxInt) != -2 {
13572 break
13573 }
13574 x := v_1
13575 v.reset(OpEq32)
13576 v0 := b.NewValue0(v.Pos, OpConst32, t)
13577 v0.AuxInt = int32ToAuxInt(-1)
13578 v.AddArg2(x, v0)
13579 return true
13580 }
13581 return false
13582 }
13583 func rewriteValuegeneric_OpLess64(v *Value) bool {
13584 v_1 := v.Args[1]
13585 v_0 := v.Args[0]
13586 b := v.Block
13587
13588
13589 for {
13590 if v_0.Op != OpConst64 {
13591 break
13592 }
13593 c := auxIntToInt64(v_0.AuxInt)
13594 if v_1.Op != OpConst64 {
13595 break
13596 }
13597 d := auxIntToInt64(v_1.AuxInt)
13598 v.reset(OpConstBool)
13599 v.AuxInt = boolToAuxInt(c < d)
13600 return true
13601 }
13602
13603
13604
13605 for {
13606 if v_0.Op != OpConst64 {
13607 break
13608 }
13609 t := v_0.Type
13610 if auxIntToInt64(v_0.AuxInt) != 0 {
13611 break
13612 }
13613 x := v_1
13614 if !(isNonNegative(x)) {
13615 break
13616 }
13617 v.reset(OpNeq64)
13618 v0 := b.NewValue0(v.Pos, OpConst64, t)
13619 v0.AuxInt = int64ToAuxInt(0)
13620 v.AddArg2(v0, x)
13621 return true
13622 }
13623
13624
13625
13626 for {
13627 x := v_0
13628 if v_1.Op != OpConst64 {
13629 break
13630 }
13631 t := v_1.Type
13632 if auxIntToInt64(v_1.AuxInt) != 1 || !(isNonNegative(x)) {
13633 break
13634 }
13635 v.reset(OpEq64)
13636 v0 := b.NewValue0(v.Pos, OpConst64, t)
13637 v0.AuxInt = int64ToAuxInt(0)
13638 v.AddArg2(v0, x)
13639 return true
13640 }
13641
13642
13643 for {
13644 x := v_0
13645 if v_1.Op != OpConst64 {
13646 break
13647 }
13648 t := v_1.Type
13649 if auxIntToInt64(v_1.AuxInt) != 1 {
13650 break
13651 }
13652 v.reset(OpLeq64)
13653 v0 := b.NewValue0(v.Pos, OpConst64, t)
13654 v0.AuxInt = int64ToAuxInt(0)
13655 v.AddArg2(x, v0)
13656 return true
13657 }
13658
13659
13660 for {
13661 if v_0.Op != OpConst64 {
13662 break
13663 }
13664 t := v_0.Type
13665 if auxIntToInt64(v_0.AuxInt) != -1 {
13666 break
13667 }
13668 x := v_1
13669 v.reset(OpLeq64)
13670 v0 := b.NewValue0(v.Pos, OpConst64, t)
13671 v0.AuxInt = int64ToAuxInt(0)
13672 v.AddArg2(v0, x)
13673 return true
13674 }
13675
13676
13677 for {
13678 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != math.MinInt64 {
13679 break
13680 }
13681 v.reset(OpConstBool)
13682 v.AuxInt = boolToAuxInt(false)
13683 return true
13684 }
13685
13686
13687 for {
13688 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != math.MaxInt64 {
13689 break
13690 }
13691 v.reset(OpConstBool)
13692 v.AuxInt = boolToAuxInt(false)
13693 return true
13694 }
13695
13696
13697 for {
13698 x := v_0
13699 if v_1.Op != OpConst64 {
13700 break
13701 }
13702 t := v_1.Type
13703 if auxIntToInt64(v_1.AuxInt) != math.MinInt64+1 {
13704 break
13705 }
13706 v.reset(OpEq64)
13707 v0 := b.NewValue0(v.Pos, OpConst64, t)
13708 v0.AuxInt = int64ToAuxInt(math.MinInt64)
13709 v.AddArg2(x, v0)
13710 return true
13711 }
13712
13713
13714 for {
13715 if v_0.Op != OpConst64 {
13716 break
13717 }
13718 t := v_0.Type
13719 if auxIntToInt64(v_0.AuxInt) != math.MaxInt64-1 {
13720 break
13721 }
13722 x := v_1
13723 v.reset(OpEq64)
13724 v0 := b.NewValue0(v.Pos, OpConst64, t)
13725 v0.AuxInt = int64ToAuxInt(math.MaxInt64)
13726 v.AddArg2(x, v0)
13727 return true
13728 }
13729 return false
13730 }
13731 func rewriteValuegeneric_OpLess64F(v *Value) bool {
13732 v_1 := v.Args[1]
13733 v_0 := v.Args[0]
13734
13735
13736 for {
13737 if v_0.Op != OpConst64F {
13738 break
13739 }
13740 c := auxIntToFloat64(v_0.AuxInt)
13741 if v_1.Op != OpConst64F {
13742 break
13743 }
13744 d := auxIntToFloat64(v_1.AuxInt)
13745 v.reset(OpConstBool)
13746 v.AuxInt = boolToAuxInt(c < d)
13747 return true
13748 }
13749 return false
13750 }
13751 func rewriteValuegeneric_OpLess64U(v *Value) bool {
13752 v_1 := v.Args[1]
13753 v_0 := v.Args[0]
13754 b := v.Block
13755
13756
13757 for {
13758 if v_0.Op != OpConst64 {
13759 break
13760 }
13761 c := auxIntToInt64(v_0.AuxInt)
13762 if v_1.Op != OpConst64 {
13763 break
13764 }
13765 d := auxIntToInt64(v_1.AuxInt)
13766 v.reset(OpConstBool)
13767 v.AuxInt = boolToAuxInt(uint64(c) < uint64(d))
13768 return true
13769 }
13770
13771
13772 for {
13773 x := v_0
13774 if v_1.Op != OpConst64 {
13775 break
13776 }
13777 t := v_1.Type
13778 if auxIntToInt64(v_1.AuxInt) != 1 {
13779 break
13780 }
13781 v.reset(OpEq64)
13782 v0 := b.NewValue0(v.Pos, OpConst64, t)
13783 v0.AuxInt = int64ToAuxInt(0)
13784 v.AddArg2(v0, x)
13785 return true
13786 }
13787
13788
13789 for {
13790 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 0 {
13791 break
13792 }
13793 v.reset(OpConstBool)
13794 v.AuxInt = boolToAuxInt(false)
13795 return true
13796 }
13797
13798
13799 for {
13800 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != -1 {
13801 break
13802 }
13803 v.reset(OpConstBool)
13804 v.AuxInt = boolToAuxInt(false)
13805 return true
13806 }
13807
13808
13809 for {
13810 x := v_0
13811 if v_1.Op != OpConst64 {
13812 break
13813 }
13814 t := v_1.Type
13815 if auxIntToInt64(v_1.AuxInt) != 1 {
13816 break
13817 }
13818 v.reset(OpEq64)
13819 v0 := b.NewValue0(v.Pos, OpConst64, t)
13820 v0.AuxInt = int64ToAuxInt(0)
13821 v.AddArg2(x, v0)
13822 return true
13823 }
13824
13825
13826 for {
13827 if v_0.Op != OpConst64 {
13828 break
13829 }
13830 t := v_0.Type
13831 if auxIntToInt64(v_0.AuxInt) != -2 {
13832 break
13833 }
13834 x := v_1
13835 v.reset(OpEq64)
13836 v0 := b.NewValue0(v.Pos, OpConst64, t)
13837 v0.AuxInt = int64ToAuxInt(-1)
13838 v.AddArg2(x, v0)
13839 return true
13840 }
13841 return false
13842 }
13843 func rewriteValuegeneric_OpLess8(v *Value) bool {
13844 v_1 := v.Args[1]
13845 v_0 := v.Args[0]
13846 b := v.Block
13847
13848
13849 for {
13850 if v_0.Op != OpConst8 {
13851 break
13852 }
13853 c := auxIntToInt8(v_0.AuxInt)
13854 if v_1.Op != OpConst8 {
13855 break
13856 }
13857 d := auxIntToInt8(v_1.AuxInt)
13858 v.reset(OpConstBool)
13859 v.AuxInt = boolToAuxInt(c < d)
13860 return true
13861 }
13862
13863
13864
13865 for {
13866 if v_0.Op != OpConst8 {
13867 break
13868 }
13869 t := v_0.Type
13870 if auxIntToInt8(v_0.AuxInt) != 0 {
13871 break
13872 }
13873 x := v_1
13874 if !(isNonNegative(x)) {
13875 break
13876 }
13877 v.reset(OpNeq8)
13878 v0 := b.NewValue0(v.Pos, OpConst8, t)
13879 v0.AuxInt = int8ToAuxInt(0)
13880 v.AddArg2(v0, x)
13881 return true
13882 }
13883
13884
13885
13886 for {
13887 x := v_0
13888 if v_1.Op != OpConst8 {
13889 break
13890 }
13891 t := v_1.Type
13892 if auxIntToInt8(v_1.AuxInt) != 1 || !(isNonNegative(x)) {
13893 break
13894 }
13895 v.reset(OpEq8)
13896 v0 := b.NewValue0(v.Pos, OpConst8, t)
13897 v0.AuxInt = int8ToAuxInt(0)
13898 v.AddArg2(v0, x)
13899 return true
13900 }
13901
13902
13903 for {
13904 x := v_0
13905 if v_1.Op != OpConst8 {
13906 break
13907 }
13908 t := v_1.Type
13909 if auxIntToInt8(v_1.AuxInt) != 1 {
13910 break
13911 }
13912 v.reset(OpLeq8)
13913 v0 := b.NewValue0(v.Pos, OpConst8, t)
13914 v0.AuxInt = int8ToAuxInt(0)
13915 v.AddArg2(x, v0)
13916 return true
13917 }
13918
13919
13920 for {
13921 if v_0.Op != OpConst8 {
13922 break
13923 }
13924 t := v_0.Type
13925 if auxIntToInt8(v_0.AuxInt) != -1 {
13926 break
13927 }
13928 x := v_1
13929 v.reset(OpLeq8)
13930 v0 := b.NewValue0(v.Pos, OpConst8, t)
13931 v0.AuxInt = int8ToAuxInt(0)
13932 v.AddArg2(v0, x)
13933 return true
13934 }
13935
13936
13937 for {
13938 if v_1.Op != OpConst8 || auxIntToInt8(v_1.AuxInt) != math.MinInt8 {
13939 break
13940 }
13941 v.reset(OpConstBool)
13942 v.AuxInt = boolToAuxInt(false)
13943 return true
13944 }
13945
13946
13947 for {
13948 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != math.MaxInt8 {
13949 break
13950 }
13951 v.reset(OpConstBool)
13952 v.AuxInt = boolToAuxInt(false)
13953 return true
13954 }
13955
13956
13957 for {
13958 x := v_0
13959 if v_1.Op != OpConst8 {
13960 break
13961 }
13962 t := v_1.Type
13963 if auxIntToInt8(v_1.AuxInt) != math.MinInt8+1 {
13964 break
13965 }
13966 v.reset(OpEq8)
13967 v0 := b.NewValue0(v.Pos, OpConst8, t)
13968 v0.AuxInt = int8ToAuxInt(math.MinInt8)
13969 v.AddArg2(x, v0)
13970 return true
13971 }
13972
13973
13974 for {
13975 if v_0.Op != OpConst8 {
13976 break
13977 }
13978 t := v_0.Type
13979 if auxIntToInt8(v_0.AuxInt) != math.MaxInt8-1 {
13980 break
13981 }
13982 x := v_1
13983 v.reset(OpEq8)
13984 v0 := b.NewValue0(v.Pos, OpConst8, t)
13985 v0.AuxInt = int8ToAuxInt(math.MaxInt8)
13986 v.AddArg2(x, v0)
13987 return true
13988 }
13989 return false
13990 }
13991 func rewriteValuegeneric_OpLess8U(v *Value) bool {
13992 v_1 := v.Args[1]
13993 v_0 := v.Args[0]
13994 b := v.Block
13995
13996
13997 for {
13998 if v_0.Op != OpConst8 {
13999 break
14000 }
14001 c := auxIntToInt8(v_0.AuxInt)
14002 if v_1.Op != OpConst8 {
14003 break
14004 }
14005 d := auxIntToInt8(v_1.AuxInt)
14006 v.reset(OpConstBool)
14007 v.AuxInt = boolToAuxInt(uint8(c) < uint8(d))
14008 return true
14009 }
14010
14011
14012 for {
14013 x := v_0
14014 if v_1.Op != OpConst8 {
14015 break
14016 }
14017 t := v_1.Type
14018 if auxIntToInt8(v_1.AuxInt) != 1 {
14019 break
14020 }
14021 v.reset(OpEq8)
14022 v0 := b.NewValue0(v.Pos, OpConst8, t)
14023 v0.AuxInt = int8ToAuxInt(0)
14024 v.AddArg2(v0, x)
14025 return true
14026 }
14027
14028
14029 for {
14030 if v_1.Op != OpConst8 || auxIntToInt8(v_1.AuxInt) != 0 {
14031 break
14032 }
14033 v.reset(OpConstBool)
14034 v.AuxInt = boolToAuxInt(false)
14035 return true
14036 }
14037
14038
14039 for {
14040 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != -1 {
14041 break
14042 }
14043 v.reset(OpConstBool)
14044 v.AuxInt = boolToAuxInt(false)
14045 return true
14046 }
14047
14048
14049 for {
14050 x := v_0
14051 if v_1.Op != OpConst8 {
14052 break
14053 }
14054 t := v_1.Type
14055 if auxIntToInt8(v_1.AuxInt) != 1 {
14056 break
14057 }
14058 v.reset(OpEq8)
14059 v0 := b.NewValue0(v.Pos, OpConst8, t)
14060 v0.AuxInt = int8ToAuxInt(0)
14061 v.AddArg2(x, v0)
14062 return true
14063 }
14064
14065
14066 for {
14067 if v_0.Op != OpConst8 {
14068 break
14069 }
14070 t := v_0.Type
14071 if auxIntToInt8(v_0.AuxInt) != -2 {
14072 break
14073 }
14074 x := v_1
14075 v.reset(OpEq8)
14076 v0 := b.NewValue0(v.Pos, OpConst8, t)
14077 v0.AuxInt = int8ToAuxInt(-1)
14078 v.AddArg2(x, v0)
14079 return true
14080 }
14081 return false
14082 }
14083 func rewriteValuegeneric_OpLoad(v *Value) bool {
14084 v_1 := v.Args[1]
14085 v_0 := v.Args[0]
14086 b := v.Block
14087 config := b.Func.Config
14088 typ := &b.Func.Config.Types
14089
14090
14091
14092 for {
14093 t1 := v.Type
14094 p1 := v_0
14095 if v_1.Op != OpStore {
14096 break
14097 }
14098 t2 := auxToType(v_1.Aux)
14099 x := v_1.Args[1]
14100 p2 := v_1.Args[0]
14101 if !(isSamePtr(p1, p2) && copyCompatibleType(t1, x.Type) && t1.Size() == t2.Size()) {
14102 break
14103 }
14104 v.copyOf(x)
14105 return true
14106 }
14107
14108
14109
14110 for {
14111 t1 := v.Type
14112 p1 := v_0
14113 if v_1.Op != OpStore {
14114 break
14115 }
14116 t2 := auxToType(v_1.Aux)
14117 _ = v_1.Args[2]
14118 p2 := v_1.Args[0]
14119 v_1_2 := v_1.Args[2]
14120 if v_1_2.Op != OpStore {
14121 break
14122 }
14123 t3 := auxToType(v_1_2.Aux)
14124 x := v_1_2.Args[1]
14125 p3 := v_1_2.Args[0]
14126 if !(isSamePtr(p1, p3) && copyCompatibleType(t1, x.Type) && t1.Size() == t3.Size() && disjoint(p3, t3.Size(), p2, t2.Size())) {
14127 break
14128 }
14129 v.copyOf(x)
14130 return true
14131 }
14132
14133
14134
14135 for {
14136 t1 := v.Type
14137 p1 := v_0
14138 if v_1.Op != OpStore {
14139 break
14140 }
14141 t2 := auxToType(v_1.Aux)
14142 _ = v_1.Args[2]
14143 p2 := v_1.Args[0]
14144 v_1_2 := v_1.Args[2]
14145 if v_1_2.Op != OpStore {
14146 break
14147 }
14148 t3 := auxToType(v_1_2.Aux)
14149 _ = v_1_2.Args[2]
14150 p3 := v_1_2.Args[0]
14151 v_1_2_2 := v_1_2.Args[2]
14152 if v_1_2_2.Op != OpStore {
14153 break
14154 }
14155 t4 := auxToType(v_1_2_2.Aux)
14156 x := v_1_2_2.Args[1]
14157 p4 := v_1_2_2.Args[0]
14158 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())) {
14159 break
14160 }
14161 v.copyOf(x)
14162 return true
14163 }
14164
14165
14166
14167 for {
14168 t1 := v.Type
14169 p1 := v_0
14170 if v_1.Op != OpStore {
14171 break
14172 }
14173 t2 := auxToType(v_1.Aux)
14174 _ = v_1.Args[2]
14175 p2 := v_1.Args[0]
14176 v_1_2 := v_1.Args[2]
14177 if v_1_2.Op != OpStore {
14178 break
14179 }
14180 t3 := auxToType(v_1_2.Aux)
14181 _ = v_1_2.Args[2]
14182 p3 := v_1_2.Args[0]
14183 v_1_2_2 := v_1_2.Args[2]
14184 if v_1_2_2.Op != OpStore {
14185 break
14186 }
14187 t4 := auxToType(v_1_2_2.Aux)
14188 _ = v_1_2_2.Args[2]
14189 p4 := v_1_2_2.Args[0]
14190 v_1_2_2_2 := v_1_2_2.Args[2]
14191 if v_1_2_2_2.Op != OpStore {
14192 break
14193 }
14194 t5 := auxToType(v_1_2_2_2.Aux)
14195 x := v_1_2_2_2.Args[1]
14196 p5 := v_1_2_2_2.Args[0]
14197 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())) {
14198 break
14199 }
14200 v.copyOf(x)
14201 return true
14202 }
14203
14204
14205
14206 for {
14207 t1 := v.Type
14208 p1 := v_0
14209 if v_1.Op != OpStore {
14210 break
14211 }
14212 t2 := auxToType(v_1.Aux)
14213 _ = v_1.Args[1]
14214 p2 := v_1.Args[0]
14215 v_1_1 := v_1.Args[1]
14216 if v_1_1.Op != OpConst64 {
14217 break
14218 }
14219 x := auxIntToInt64(v_1_1.AuxInt)
14220 if !(isSamePtr(p1, p2) && t2.Size() == 8 && is64BitFloat(t1) && !math.IsNaN(math.Float64frombits(uint64(x)))) {
14221 break
14222 }
14223 v.reset(OpConst64F)
14224 v.AuxInt = float64ToAuxInt(math.Float64frombits(uint64(x)))
14225 return true
14226 }
14227
14228
14229
14230 for {
14231 t1 := v.Type
14232 p1 := v_0
14233 if v_1.Op != OpStore {
14234 break
14235 }
14236 t2 := auxToType(v_1.Aux)
14237 _ = v_1.Args[1]
14238 p2 := v_1.Args[0]
14239 v_1_1 := v_1.Args[1]
14240 if v_1_1.Op != OpConst32 {
14241 break
14242 }
14243 x := auxIntToInt32(v_1_1.AuxInt)
14244 if !(isSamePtr(p1, p2) && t2.Size() == 4 && is32BitFloat(t1) && !math.IsNaN(float64(math.Float32frombits(uint32(x))))) {
14245 break
14246 }
14247 v.reset(OpConst32F)
14248 v.AuxInt = float32ToAuxInt(math.Float32frombits(uint32(x)))
14249 return true
14250 }
14251
14252
14253
14254 for {
14255 t1 := v.Type
14256 p1 := v_0
14257 if v_1.Op != OpStore {
14258 break
14259 }
14260 t2 := auxToType(v_1.Aux)
14261 _ = v_1.Args[1]
14262 p2 := v_1.Args[0]
14263 v_1_1 := v_1.Args[1]
14264 if v_1_1.Op != OpConst64F {
14265 break
14266 }
14267 x := auxIntToFloat64(v_1_1.AuxInt)
14268 if !(isSamePtr(p1, p2) && t2.Size() == 8 && is64BitInt(t1)) {
14269 break
14270 }
14271 v.reset(OpConst64)
14272 v.AuxInt = int64ToAuxInt(int64(math.Float64bits(x)))
14273 return true
14274 }
14275
14276
14277
14278 for {
14279 t1 := v.Type
14280 p1 := v_0
14281 if v_1.Op != OpStore {
14282 break
14283 }
14284 t2 := auxToType(v_1.Aux)
14285 _ = v_1.Args[1]
14286 p2 := v_1.Args[0]
14287 v_1_1 := v_1.Args[1]
14288 if v_1_1.Op != OpConst32F {
14289 break
14290 }
14291 x := auxIntToFloat32(v_1_1.AuxInt)
14292 if !(isSamePtr(p1, p2) && t2.Size() == 4 && is32BitInt(t1)) {
14293 break
14294 }
14295 v.reset(OpConst32)
14296 v.AuxInt = int32ToAuxInt(int32(math.Float32bits(x)))
14297 return true
14298 }
14299
14300
14301
14302 for {
14303 t1 := v.Type
14304 op := v_0
14305 if op.Op != OpOffPtr {
14306 break
14307 }
14308 o1 := auxIntToInt64(op.AuxInt)
14309 p1 := op.Args[0]
14310 if v_1.Op != OpStore {
14311 break
14312 }
14313 t2 := auxToType(v_1.Aux)
14314 _ = v_1.Args[2]
14315 p2 := v_1.Args[0]
14316 mem := v_1.Args[2]
14317 if mem.Op != OpZero {
14318 break
14319 }
14320 n := auxIntToInt64(mem.AuxInt)
14321 p3 := mem.Args[0]
14322 if !(o1 >= 0 && o1+t1.Size() <= n && isSamePtr(p1, p3) && CanSSA(t1) && disjoint(op, t1.Size(), p2, t2.Size())) {
14323 break
14324 }
14325 b = mem.Block
14326 v0 := b.NewValue0(v.Pos, OpLoad, t1)
14327 v.copyOf(v0)
14328 v1 := b.NewValue0(v.Pos, OpOffPtr, op.Type)
14329 v1.AuxInt = int64ToAuxInt(o1)
14330 v1.AddArg(p3)
14331 v0.AddArg2(v1, mem)
14332 return true
14333 }
14334
14335
14336
14337 for {
14338 t1 := v.Type
14339 op := v_0
14340 if op.Op != OpOffPtr {
14341 break
14342 }
14343 o1 := auxIntToInt64(op.AuxInt)
14344 p1 := op.Args[0]
14345 if v_1.Op != OpStore {
14346 break
14347 }
14348 t2 := auxToType(v_1.Aux)
14349 _ = v_1.Args[2]
14350 p2 := v_1.Args[0]
14351 v_1_2 := v_1.Args[2]
14352 if v_1_2.Op != OpStore {
14353 break
14354 }
14355 t3 := auxToType(v_1_2.Aux)
14356 _ = v_1_2.Args[2]
14357 p3 := v_1_2.Args[0]
14358 mem := v_1_2.Args[2]
14359 if mem.Op != OpZero {
14360 break
14361 }
14362 n := auxIntToInt64(mem.AuxInt)
14363 p4 := mem.Args[0]
14364 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())) {
14365 break
14366 }
14367 b = mem.Block
14368 v0 := b.NewValue0(v.Pos, OpLoad, t1)
14369 v.copyOf(v0)
14370 v1 := b.NewValue0(v.Pos, OpOffPtr, op.Type)
14371 v1.AuxInt = int64ToAuxInt(o1)
14372 v1.AddArg(p4)
14373 v0.AddArg2(v1, mem)
14374 return true
14375 }
14376
14377
14378
14379 for {
14380 t1 := v.Type
14381 op := v_0
14382 if op.Op != OpOffPtr {
14383 break
14384 }
14385 o1 := auxIntToInt64(op.AuxInt)
14386 p1 := op.Args[0]
14387 if v_1.Op != OpStore {
14388 break
14389 }
14390 t2 := auxToType(v_1.Aux)
14391 _ = v_1.Args[2]
14392 p2 := v_1.Args[0]
14393 v_1_2 := v_1.Args[2]
14394 if v_1_2.Op != OpStore {
14395 break
14396 }
14397 t3 := auxToType(v_1_2.Aux)
14398 _ = v_1_2.Args[2]
14399 p3 := v_1_2.Args[0]
14400 v_1_2_2 := v_1_2.Args[2]
14401 if v_1_2_2.Op != OpStore {
14402 break
14403 }
14404 t4 := auxToType(v_1_2_2.Aux)
14405 _ = v_1_2_2.Args[2]
14406 p4 := v_1_2_2.Args[0]
14407 mem := v_1_2_2.Args[2]
14408 if mem.Op != OpZero {
14409 break
14410 }
14411 n := auxIntToInt64(mem.AuxInt)
14412 p5 := mem.Args[0]
14413 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())) {
14414 break
14415 }
14416 b = mem.Block
14417 v0 := b.NewValue0(v.Pos, OpLoad, t1)
14418 v.copyOf(v0)
14419 v1 := b.NewValue0(v.Pos, OpOffPtr, op.Type)
14420 v1.AuxInt = int64ToAuxInt(o1)
14421 v1.AddArg(p5)
14422 v0.AddArg2(v1, mem)
14423 return true
14424 }
14425
14426
14427
14428 for {
14429 t1 := v.Type
14430 op := v_0
14431 if op.Op != OpOffPtr {
14432 break
14433 }
14434 o1 := auxIntToInt64(op.AuxInt)
14435 p1 := op.Args[0]
14436 if v_1.Op != OpStore {
14437 break
14438 }
14439 t2 := auxToType(v_1.Aux)
14440 _ = v_1.Args[2]
14441 p2 := v_1.Args[0]
14442 v_1_2 := v_1.Args[2]
14443 if v_1_2.Op != OpStore {
14444 break
14445 }
14446 t3 := auxToType(v_1_2.Aux)
14447 _ = v_1_2.Args[2]
14448 p3 := v_1_2.Args[0]
14449 v_1_2_2 := v_1_2.Args[2]
14450 if v_1_2_2.Op != OpStore {
14451 break
14452 }
14453 t4 := auxToType(v_1_2_2.Aux)
14454 _ = v_1_2_2.Args[2]
14455 p4 := v_1_2_2.Args[0]
14456 v_1_2_2_2 := v_1_2_2.Args[2]
14457 if v_1_2_2_2.Op != OpStore {
14458 break
14459 }
14460 t5 := auxToType(v_1_2_2_2.Aux)
14461 _ = v_1_2_2_2.Args[2]
14462 p5 := v_1_2_2_2.Args[0]
14463 mem := v_1_2_2_2.Args[2]
14464 if mem.Op != OpZero {
14465 break
14466 }
14467 n := auxIntToInt64(mem.AuxInt)
14468 p6 := mem.Args[0]
14469 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())) {
14470 break
14471 }
14472 b = mem.Block
14473 v0 := b.NewValue0(v.Pos, OpLoad, t1)
14474 v.copyOf(v0)
14475 v1 := b.NewValue0(v.Pos, OpOffPtr, op.Type)
14476 v1.AuxInt = int64ToAuxInt(o1)
14477 v1.AddArg(p6)
14478 v0.AddArg2(v1, mem)
14479 return true
14480 }
14481
14482
14483
14484 for {
14485 t1 := v.Type
14486 if v_0.Op != OpOffPtr {
14487 break
14488 }
14489 o := auxIntToInt64(v_0.AuxInt)
14490 p1 := v_0.Args[0]
14491 if v_1.Op != OpZero {
14492 break
14493 }
14494 n := auxIntToInt64(v_1.AuxInt)
14495 p2 := v_1.Args[0]
14496 if !(t1.IsBoolean() && isSamePtr(p1, p2) && n >= o+1) {
14497 break
14498 }
14499 v.reset(OpConstBool)
14500 v.AuxInt = boolToAuxInt(false)
14501 return true
14502 }
14503
14504
14505
14506 for {
14507 t1 := v.Type
14508 if v_0.Op != OpOffPtr {
14509 break
14510 }
14511 o := auxIntToInt64(v_0.AuxInt)
14512 p1 := v_0.Args[0]
14513 if v_1.Op != OpZero {
14514 break
14515 }
14516 n := auxIntToInt64(v_1.AuxInt)
14517 p2 := v_1.Args[0]
14518 if !(is8BitInt(t1) && isSamePtr(p1, p2) && n >= o+1) {
14519 break
14520 }
14521 v.reset(OpConst8)
14522 v.AuxInt = int8ToAuxInt(0)
14523 return true
14524 }
14525
14526
14527
14528 for {
14529 t1 := v.Type
14530 if v_0.Op != OpOffPtr {
14531 break
14532 }
14533 o := auxIntToInt64(v_0.AuxInt)
14534 p1 := v_0.Args[0]
14535 if v_1.Op != OpZero {
14536 break
14537 }
14538 n := auxIntToInt64(v_1.AuxInt)
14539 p2 := v_1.Args[0]
14540 if !(is16BitInt(t1) && isSamePtr(p1, p2) && n >= o+2) {
14541 break
14542 }
14543 v.reset(OpConst16)
14544 v.AuxInt = int16ToAuxInt(0)
14545 return true
14546 }
14547
14548
14549
14550 for {
14551 t1 := v.Type
14552 if v_0.Op != OpOffPtr {
14553 break
14554 }
14555 o := auxIntToInt64(v_0.AuxInt)
14556 p1 := v_0.Args[0]
14557 if v_1.Op != OpZero {
14558 break
14559 }
14560 n := auxIntToInt64(v_1.AuxInt)
14561 p2 := v_1.Args[0]
14562 if !(is32BitInt(t1) && isSamePtr(p1, p2) && n >= o+4) {
14563 break
14564 }
14565 v.reset(OpConst32)
14566 v.AuxInt = int32ToAuxInt(0)
14567 return true
14568 }
14569
14570
14571
14572 for {
14573 t1 := v.Type
14574 if v_0.Op != OpOffPtr {
14575 break
14576 }
14577 o := auxIntToInt64(v_0.AuxInt)
14578 p1 := v_0.Args[0]
14579 if v_1.Op != OpZero {
14580 break
14581 }
14582 n := auxIntToInt64(v_1.AuxInt)
14583 p2 := v_1.Args[0]
14584 if !(is64BitInt(t1) && isSamePtr(p1, p2) && n >= o+8) {
14585 break
14586 }
14587 v.reset(OpConst64)
14588 v.AuxInt = int64ToAuxInt(0)
14589 return true
14590 }
14591
14592
14593
14594 for {
14595 t1 := v.Type
14596 if v_0.Op != OpOffPtr {
14597 break
14598 }
14599 o := auxIntToInt64(v_0.AuxInt)
14600 p1 := v_0.Args[0]
14601 if v_1.Op != OpZero {
14602 break
14603 }
14604 n := auxIntToInt64(v_1.AuxInt)
14605 p2 := v_1.Args[0]
14606 if !(is32BitFloat(t1) && isSamePtr(p1, p2) && n >= o+4) {
14607 break
14608 }
14609 v.reset(OpConst32F)
14610 v.AuxInt = float32ToAuxInt(0)
14611 return true
14612 }
14613
14614
14615
14616 for {
14617 t1 := v.Type
14618 if v_0.Op != OpOffPtr {
14619 break
14620 }
14621 o := auxIntToInt64(v_0.AuxInt)
14622 p1 := v_0.Args[0]
14623 if v_1.Op != OpZero {
14624 break
14625 }
14626 n := auxIntToInt64(v_1.AuxInt)
14627 p2 := v_1.Args[0]
14628 if !(is64BitFloat(t1) && isSamePtr(p1, p2) && n >= o+8) {
14629 break
14630 }
14631 v.reset(OpConst64F)
14632 v.AuxInt = float64ToAuxInt(0)
14633 return true
14634 }
14635
14636
14637
14638 for {
14639 t := v.Type
14640 if !(t.IsStruct() && CanSSA(t)) {
14641 break
14642 }
14643 v.copyOf(rewriteStructLoad(v))
14644 return true
14645 }
14646
14647
14648
14649 for {
14650 t := v.Type
14651 if !(t.IsArray() && t.NumElem() == 0) {
14652 break
14653 }
14654 v.reset(OpArrayMake0)
14655 return true
14656 }
14657
14658
14659
14660 for {
14661 t := v.Type
14662 ptr := v_0
14663 mem := v_1
14664 if !(t.IsArray() && t.NumElem() == 1 && CanSSA(t)) {
14665 break
14666 }
14667 v.reset(OpArrayMake1)
14668 v0 := b.NewValue0(v.Pos, OpLoad, t.Elem())
14669 v0.AddArg2(ptr, mem)
14670 v.AddArg(v0)
14671 return true
14672 }
14673
14674
14675
14676 for {
14677 if v.Type != typ.BytePtr || v_0.Op != OpOffPtr {
14678 break
14679 }
14680 off := auxIntToInt64(v_0.AuxInt)
14681 v_0_0 := v_0.Args[0]
14682 if v_0_0.Op != OpAddr {
14683 break
14684 }
14685 s := auxToSym(v_0_0.Aux)
14686 sb := v_0_0.Args[0]
14687 if !(isFixedSym(s, off)) {
14688 break
14689 }
14690 v.reset(OpAddr)
14691 v.Aux = symToAux(fixedSym(b.Func, s, off))
14692 v.AddArg(sb)
14693 return true
14694 }
14695
14696
14697
14698 for {
14699 if v.Type != typ.BytePtr || v_0.Op != OpOffPtr {
14700 break
14701 }
14702 off := auxIntToInt64(v_0.AuxInt)
14703 v_0_0 := v_0.Args[0]
14704 if v_0_0.Op != OpConvert {
14705 break
14706 }
14707 v_0_0_0 := v_0_0.Args[0]
14708 if v_0_0_0.Op != OpAddr {
14709 break
14710 }
14711 s := auxToSym(v_0_0_0.Aux)
14712 sb := v_0_0_0.Args[0]
14713 if !(isFixedSym(s, off)) {
14714 break
14715 }
14716 v.reset(OpAddr)
14717 v.Aux = symToAux(fixedSym(b.Func, s, off))
14718 v.AddArg(sb)
14719 return true
14720 }
14721
14722
14723
14724 for {
14725 if v.Type != typ.BytePtr || v_0.Op != OpOffPtr {
14726 break
14727 }
14728 off := auxIntToInt64(v_0.AuxInt)
14729 v_0_0 := v_0.Args[0]
14730 if v_0_0.Op != OpITab {
14731 break
14732 }
14733 v_0_0_0 := v_0_0.Args[0]
14734 if v_0_0_0.Op != OpIMake {
14735 break
14736 }
14737 v_0_0_0_0 := v_0_0_0.Args[0]
14738 if v_0_0_0_0.Op != OpAddr {
14739 break
14740 }
14741 s := auxToSym(v_0_0_0_0.Aux)
14742 sb := v_0_0_0_0.Args[0]
14743 if !(isFixedSym(s, off)) {
14744 break
14745 }
14746 v.reset(OpAddr)
14747 v.Aux = symToAux(fixedSym(b.Func, s, off))
14748 v.AddArg(sb)
14749 return true
14750 }
14751
14752
14753
14754 for {
14755 if v.Type != typ.BytePtr || v_0.Op != OpOffPtr {
14756 break
14757 }
14758 off := auxIntToInt64(v_0.AuxInt)
14759 v_0_0 := v_0.Args[0]
14760 if v_0_0.Op != OpITab {
14761 break
14762 }
14763 v_0_0_0 := v_0_0.Args[0]
14764 if v_0_0_0.Op != OpIMake {
14765 break
14766 }
14767 v_0_0_0_0 := v_0_0_0.Args[0]
14768 if v_0_0_0_0.Op != OpConvert {
14769 break
14770 }
14771 v_0_0_0_0_0 := v_0_0_0_0.Args[0]
14772 if v_0_0_0_0_0.Op != OpAddr {
14773 break
14774 }
14775 s := auxToSym(v_0_0_0_0_0.Aux)
14776 sb := v_0_0_0_0_0.Args[0]
14777 if !(isFixedSym(s, off)) {
14778 break
14779 }
14780 v.reset(OpAddr)
14781 v.Aux = symToAux(fixedSym(b.Func, s, off))
14782 v.AddArg(sb)
14783 return true
14784 }
14785
14786
14787
14788 for {
14789 if v.Type != typ.Uintptr || v_0.Op != OpOffPtr {
14790 break
14791 }
14792 off := auxIntToInt64(v_0.AuxInt)
14793 v_0_0 := v_0.Args[0]
14794 if v_0_0.Op != OpAddr {
14795 break
14796 }
14797 s := auxToSym(v_0_0.Aux)
14798 sb := v_0_0.Args[0]
14799 if !(isFixedSym(s, off)) {
14800 break
14801 }
14802 v.reset(OpAddr)
14803 v.Aux = symToAux(fixedSym(b.Func, s, off))
14804 v.AddArg(sb)
14805 return true
14806 }
14807
14808
14809
14810 for {
14811 if v.Type != typ.Uintptr || v_0.Op != OpOffPtr {
14812 break
14813 }
14814 off := auxIntToInt64(v_0.AuxInt)
14815 v_0_0 := v_0.Args[0]
14816 if v_0_0.Op != OpConvert {
14817 break
14818 }
14819 v_0_0_0 := v_0_0.Args[0]
14820 if v_0_0_0.Op != OpAddr {
14821 break
14822 }
14823 s := auxToSym(v_0_0_0.Aux)
14824 sb := v_0_0_0.Args[0]
14825 if !(isFixedSym(s, off)) {
14826 break
14827 }
14828 v.reset(OpAddr)
14829 v.Aux = symToAux(fixedSym(b.Func, s, off))
14830 v.AddArg(sb)
14831 return true
14832 }
14833
14834
14835
14836 for {
14837 if v.Type != typ.Uintptr || v_0.Op != OpOffPtr {
14838 break
14839 }
14840 off := auxIntToInt64(v_0.AuxInt)
14841 v_0_0 := v_0.Args[0]
14842 if v_0_0.Op != OpITab {
14843 break
14844 }
14845 v_0_0_0 := v_0_0.Args[0]
14846 if v_0_0_0.Op != OpIMake {
14847 break
14848 }
14849 v_0_0_0_0 := v_0_0_0.Args[0]
14850 if v_0_0_0_0.Op != OpAddr {
14851 break
14852 }
14853 s := auxToSym(v_0_0_0_0.Aux)
14854 sb := v_0_0_0_0.Args[0]
14855 if !(isFixedSym(s, off)) {
14856 break
14857 }
14858 v.reset(OpAddr)
14859 v.Aux = symToAux(fixedSym(b.Func, s, off))
14860 v.AddArg(sb)
14861 return true
14862 }
14863
14864
14865
14866 for {
14867 if v.Type != typ.Uintptr || v_0.Op != OpOffPtr {
14868 break
14869 }
14870 off := auxIntToInt64(v_0.AuxInt)
14871 v_0_0 := v_0.Args[0]
14872 if v_0_0.Op != OpITab {
14873 break
14874 }
14875 v_0_0_0 := v_0_0.Args[0]
14876 if v_0_0_0.Op != OpIMake {
14877 break
14878 }
14879 v_0_0_0_0 := v_0_0_0.Args[0]
14880 if v_0_0_0_0.Op != OpConvert {
14881 break
14882 }
14883 v_0_0_0_0_0 := v_0_0_0_0.Args[0]
14884 if v_0_0_0_0_0.Op != OpAddr {
14885 break
14886 }
14887 s := auxToSym(v_0_0_0_0_0.Aux)
14888 sb := v_0_0_0_0_0.Args[0]
14889 if !(isFixedSym(s, off)) {
14890 break
14891 }
14892 v.reset(OpAddr)
14893 v.Aux = symToAux(fixedSym(b.Func, s, off))
14894 v.AddArg(sb)
14895 return true
14896 }
14897
14898
14899
14900 for {
14901 t := v.Type
14902 if v_0.Op != OpOffPtr {
14903 break
14904 }
14905 off := auxIntToInt64(v_0.AuxInt)
14906 v_0_0 := v_0.Args[0]
14907 if v_0_0.Op != OpAddr {
14908 break
14909 }
14910 sym := auxToSym(v_0_0.Aux)
14911 if !(t.IsInteger() && t.Size() == 4 && isFixed32(config, sym, off)) {
14912 break
14913 }
14914 v.reset(OpConst32)
14915 v.AuxInt = int32ToAuxInt(fixed32(config, sym, off))
14916 return true
14917 }
14918
14919
14920
14921 for {
14922 t := v.Type
14923 if v_0.Op != OpOffPtr {
14924 break
14925 }
14926 off := auxIntToInt64(v_0.AuxInt)
14927 v_0_0 := v_0.Args[0]
14928 if v_0_0.Op != OpConvert {
14929 break
14930 }
14931 v_0_0_0 := v_0_0.Args[0]
14932 if v_0_0_0.Op != OpAddr {
14933 break
14934 }
14935 sym := auxToSym(v_0_0_0.Aux)
14936 if !(t.IsInteger() && t.Size() == 4 && isFixed32(config, sym, off)) {
14937 break
14938 }
14939 v.reset(OpConst32)
14940 v.AuxInt = int32ToAuxInt(fixed32(config, sym, off))
14941 return true
14942 }
14943
14944
14945
14946 for {
14947 t := v.Type
14948 if v_0.Op != OpOffPtr {
14949 break
14950 }
14951 off := auxIntToInt64(v_0.AuxInt)
14952 v_0_0 := v_0.Args[0]
14953 if v_0_0.Op != OpITab {
14954 break
14955 }
14956 v_0_0_0 := v_0_0.Args[0]
14957 if v_0_0_0.Op != OpIMake {
14958 break
14959 }
14960 v_0_0_0_0 := v_0_0_0.Args[0]
14961 if v_0_0_0_0.Op != OpAddr {
14962 break
14963 }
14964 sym := auxToSym(v_0_0_0_0.Aux)
14965 if !(t.IsInteger() && t.Size() == 4 && isFixed32(config, sym, off)) {
14966 break
14967 }
14968 v.reset(OpConst32)
14969 v.AuxInt = int32ToAuxInt(fixed32(config, sym, off))
14970 return true
14971 }
14972
14973
14974
14975 for {
14976 t := v.Type
14977 if v_0.Op != OpOffPtr {
14978 break
14979 }
14980 off := auxIntToInt64(v_0.AuxInt)
14981 v_0_0 := v_0.Args[0]
14982 if v_0_0.Op != OpITab {
14983 break
14984 }
14985 v_0_0_0 := v_0_0.Args[0]
14986 if v_0_0_0.Op != OpIMake {
14987 break
14988 }
14989 v_0_0_0_0 := v_0_0_0.Args[0]
14990 if v_0_0_0_0.Op != OpConvert {
14991 break
14992 }
14993 v_0_0_0_0_0 := v_0_0_0_0.Args[0]
14994 if v_0_0_0_0_0.Op != OpAddr {
14995 break
14996 }
14997 sym := auxToSym(v_0_0_0_0_0.Aux)
14998 if !(t.IsInteger() && t.Size() == 4 && isFixed32(config, sym, off)) {
14999 break
15000 }
15001 v.reset(OpConst32)
15002 v.AuxInt = int32ToAuxInt(fixed32(config, sym, off))
15003 return true
15004 }
15005 return false
15006 }
15007 func rewriteValuegeneric_OpLsh16x16(v *Value) bool {
15008 v_1 := v.Args[1]
15009 v_0 := v.Args[0]
15010 b := v.Block
15011
15012
15013 for {
15014 t := v.Type
15015 x := v_0
15016 if v_1.Op != OpConst16 {
15017 break
15018 }
15019 c := auxIntToInt16(v_1.AuxInt)
15020 v.reset(OpLsh16x64)
15021 v0 := b.NewValue0(v.Pos, OpConst64, t)
15022 v0.AuxInt = int64ToAuxInt(int64(uint16(c)))
15023 v.AddArg2(x, v0)
15024 return true
15025 }
15026
15027
15028 for {
15029 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 {
15030 break
15031 }
15032 v.reset(OpConst16)
15033 v.AuxInt = int16ToAuxInt(0)
15034 return true
15035 }
15036 return false
15037 }
15038 func rewriteValuegeneric_OpLsh16x32(v *Value) bool {
15039 v_1 := v.Args[1]
15040 v_0 := v.Args[0]
15041 b := v.Block
15042
15043
15044 for {
15045 t := v.Type
15046 x := v_0
15047 if v_1.Op != OpConst32 {
15048 break
15049 }
15050 c := auxIntToInt32(v_1.AuxInt)
15051 v.reset(OpLsh16x64)
15052 v0 := b.NewValue0(v.Pos, OpConst64, t)
15053 v0.AuxInt = int64ToAuxInt(int64(uint32(c)))
15054 v.AddArg2(x, v0)
15055 return true
15056 }
15057
15058
15059 for {
15060 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 {
15061 break
15062 }
15063 v.reset(OpConst16)
15064 v.AuxInt = int16ToAuxInt(0)
15065 return true
15066 }
15067 return false
15068 }
15069 func rewriteValuegeneric_OpLsh16x64(v *Value) bool {
15070 v_1 := v.Args[1]
15071 v_0 := v.Args[0]
15072 b := v.Block
15073 typ := &b.Func.Config.Types
15074
15075
15076 for {
15077 if v_0.Op != OpConst16 {
15078 break
15079 }
15080 c := auxIntToInt16(v_0.AuxInt)
15081 if v_1.Op != OpConst64 {
15082 break
15083 }
15084 d := auxIntToInt64(v_1.AuxInt)
15085 v.reset(OpConst16)
15086 v.AuxInt = int16ToAuxInt(c << uint64(d))
15087 return true
15088 }
15089
15090
15091 for {
15092 x := v_0
15093 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 0 {
15094 break
15095 }
15096 v.copyOf(x)
15097 return true
15098 }
15099
15100
15101 for {
15102 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 {
15103 break
15104 }
15105 v.reset(OpConst16)
15106 v.AuxInt = int16ToAuxInt(0)
15107 return true
15108 }
15109
15110
15111
15112 for {
15113 if v_1.Op != OpConst64 {
15114 break
15115 }
15116 c := auxIntToInt64(v_1.AuxInt)
15117 if !(uint64(c) >= 16) {
15118 break
15119 }
15120 v.reset(OpConst16)
15121 v.AuxInt = int16ToAuxInt(0)
15122 return true
15123 }
15124
15125
15126
15127 for {
15128 t := v.Type
15129 if v_0.Op != OpLsh16x64 {
15130 break
15131 }
15132 _ = v_0.Args[1]
15133 x := v_0.Args[0]
15134 v_0_1 := v_0.Args[1]
15135 if v_0_1.Op != OpConst64 {
15136 break
15137 }
15138 c := auxIntToInt64(v_0_1.AuxInt)
15139 if v_1.Op != OpConst64 {
15140 break
15141 }
15142 d := auxIntToInt64(v_1.AuxInt)
15143 if !(!uaddOvf(c, d)) {
15144 break
15145 }
15146 v.reset(OpLsh16x64)
15147 v0 := b.NewValue0(v.Pos, OpConst64, t)
15148 v0.AuxInt = int64ToAuxInt(c + d)
15149 v.AddArg2(x, v0)
15150 return true
15151 }
15152
15153
15154
15155 for {
15156 i := v_0
15157 if i.Op != OpRsh16x64 {
15158 break
15159 }
15160 _ = i.Args[1]
15161 x := i.Args[0]
15162 i_1 := i.Args[1]
15163 if i_1.Op != OpConst64 {
15164 break
15165 }
15166 c := auxIntToInt64(i_1.AuxInt)
15167 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != c || !(c >= 0 && c < 16 && i.Uses == 1) {
15168 break
15169 }
15170 v.reset(OpAnd16)
15171 v0 := b.NewValue0(v.Pos, OpConst16, v.Type)
15172 v0.AuxInt = int16ToAuxInt(int16(-1) << c)
15173 v.AddArg2(x, v0)
15174 return true
15175 }
15176
15177
15178
15179 for {
15180 i := v_0
15181 if i.Op != OpRsh16Ux64 {
15182 break
15183 }
15184 _ = i.Args[1]
15185 x := i.Args[0]
15186 i_1 := i.Args[1]
15187 if i_1.Op != OpConst64 {
15188 break
15189 }
15190 c := auxIntToInt64(i_1.AuxInt)
15191 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != c || !(c >= 0 && c < 16 && i.Uses == 1) {
15192 break
15193 }
15194 v.reset(OpAnd16)
15195 v0 := b.NewValue0(v.Pos, OpConst16, v.Type)
15196 v0.AuxInt = int16ToAuxInt(int16(-1) << c)
15197 v.AddArg2(x, v0)
15198 return true
15199 }
15200
15201
15202
15203 for {
15204 if v_0.Op != OpRsh16Ux64 {
15205 break
15206 }
15207 _ = v_0.Args[1]
15208 v_0_0 := v_0.Args[0]
15209 if v_0_0.Op != OpLsh16x64 {
15210 break
15211 }
15212 _ = v_0_0.Args[1]
15213 x := v_0_0.Args[0]
15214 v_0_0_1 := v_0_0.Args[1]
15215 if v_0_0_1.Op != OpConst64 {
15216 break
15217 }
15218 c1 := auxIntToInt64(v_0_0_1.AuxInt)
15219 v_0_1 := v_0.Args[1]
15220 if v_0_1.Op != OpConst64 {
15221 break
15222 }
15223 c2 := auxIntToInt64(v_0_1.AuxInt)
15224 if v_1.Op != OpConst64 {
15225 break
15226 }
15227 c3 := auxIntToInt64(v_1.AuxInt)
15228 if !(uint64(c1) >= uint64(c2) && uint64(c3) >= uint64(c2) && !uaddOvf(c1-c2, c3)) {
15229 break
15230 }
15231 v.reset(OpLsh16x64)
15232 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
15233 v0.AuxInt = int64ToAuxInt(c1 - c2 + c3)
15234 v.AddArg2(x, v0)
15235 return true
15236 }
15237
15238
15239
15240 for {
15241 if v_0.Op != OpAnd16 {
15242 break
15243 }
15244 _ = v_0.Args[1]
15245 v_0_0 := v_0.Args[0]
15246 v_0_1 := v_0.Args[1]
15247 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
15248 if v_0_0.Op != OpRsh16x64 {
15249 continue
15250 }
15251 t := v_0_0.Type
15252 _ = v_0_0.Args[1]
15253 x := v_0_0.Args[0]
15254 v_0_0_1 := v_0_0.Args[1]
15255 if v_0_0_1.Op != OpConst64 {
15256 continue
15257 }
15258 t2 := v_0_0_1.Type
15259 c := auxIntToInt64(v_0_0_1.AuxInt)
15260 if v_0_1.Op != OpConst16 {
15261 continue
15262 }
15263 d := auxIntToInt16(v_0_1.AuxInt)
15264 if v_1.Op != OpConst64 {
15265 continue
15266 }
15267 e := auxIntToInt64(v_1.AuxInt)
15268 if !(c >= e) {
15269 continue
15270 }
15271 v.reset(OpAnd16)
15272 v0 := b.NewValue0(v.Pos, OpRsh16x64, t)
15273 v1 := b.NewValue0(v.Pos, OpConst64, t2)
15274 v1.AuxInt = int64ToAuxInt(c - e)
15275 v0.AddArg2(x, v1)
15276 v2 := b.NewValue0(v.Pos, OpConst16, t)
15277 v2.AuxInt = int16ToAuxInt(d << e)
15278 v.AddArg2(v0, v2)
15279 return true
15280 }
15281 break
15282 }
15283
15284
15285
15286 for {
15287 if v_0.Op != OpAnd16 {
15288 break
15289 }
15290 _ = v_0.Args[1]
15291 v_0_0 := v_0.Args[0]
15292 v_0_1 := v_0.Args[1]
15293 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
15294 if v_0_0.Op != OpRsh16Ux64 {
15295 continue
15296 }
15297 t := v_0_0.Type
15298 _ = v_0_0.Args[1]
15299 x := v_0_0.Args[0]
15300 v_0_0_1 := v_0_0.Args[1]
15301 if v_0_0_1.Op != OpConst64 {
15302 continue
15303 }
15304 t2 := v_0_0_1.Type
15305 c := auxIntToInt64(v_0_0_1.AuxInt)
15306 if v_0_1.Op != OpConst16 {
15307 continue
15308 }
15309 d := auxIntToInt16(v_0_1.AuxInt)
15310 if v_1.Op != OpConst64 {
15311 continue
15312 }
15313 e := auxIntToInt64(v_1.AuxInt)
15314 if !(c >= e) {
15315 continue
15316 }
15317 v.reset(OpAnd16)
15318 v0 := b.NewValue0(v.Pos, OpRsh16Ux64, t)
15319 v1 := b.NewValue0(v.Pos, OpConst64, t2)
15320 v1.AuxInt = int64ToAuxInt(c - e)
15321 v0.AddArg2(x, v1)
15322 v2 := b.NewValue0(v.Pos, OpConst16, t)
15323 v2.AuxInt = int16ToAuxInt(d << e)
15324 v.AddArg2(v0, v2)
15325 return true
15326 }
15327 break
15328 }
15329
15330
15331
15332 for {
15333 if v_0.Op != OpAnd16 {
15334 break
15335 }
15336 _ = v_0.Args[1]
15337 v_0_0 := v_0.Args[0]
15338 v_0_1 := v_0.Args[1]
15339 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
15340 if v_0_0.Op != OpRsh16x64 {
15341 continue
15342 }
15343 t := v_0_0.Type
15344 _ = v_0_0.Args[1]
15345 x := v_0_0.Args[0]
15346 v_0_0_1 := v_0_0.Args[1]
15347 if v_0_0_1.Op != OpConst64 {
15348 continue
15349 }
15350 t2 := v_0_0_1.Type
15351 c := auxIntToInt64(v_0_0_1.AuxInt)
15352 if v_0_1.Op != OpConst16 {
15353 continue
15354 }
15355 d := auxIntToInt16(v_0_1.AuxInt)
15356 if v_1.Op != OpConst64 {
15357 continue
15358 }
15359 e := auxIntToInt64(v_1.AuxInt)
15360 if !(c < e) {
15361 continue
15362 }
15363 v.reset(OpAnd16)
15364 v0 := b.NewValue0(v.Pos, OpLsh16x64, t)
15365 v1 := b.NewValue0(v.Pos, OpConst64, t2)
15366 v1.AuxInt = int64ToAuxInt(e - c)
15367 v0.AddArg2(x, v1)
15368 v2 := b.NewValue0(v.Pos, OpConst16, t)
15369 v2.AuxInt = int16ToAuxInt(d << e)
15370 v.AddArg2(v0, v2)
15371 return true
15372 }
15373 break
15374 }
15375
15376
15377
15378 for {
15379 if v_0.Op != OpAnd16 {
15380 break
15381 }
15382 _ = v_0.Args[1]
15383 v_0_0 := v_0.Args[0]
15384 v_0_1 := v_0.Args[1]
15385 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
15386 if v_0_0.Op != OpRsh16Ux64 {
15387 continue
15388 }
15389 t := v_0_0.Type
15390 _ = v_0_0.Args[1]
15391 x := v_0_0.Args[0]
15392 v_0_0_1 := v_0_0.Args[1]
15393 if v_0_0_1.Op != OpConst64 {
15394 continue
15395 }
15396 t2 := v_0_0_1.Type
15397 c := auxIntToInt64(v_0_0_1.AuxInt)
15398 if v_0_1.Op != OpConst16 {
15399 continue
15400 }
15401 d := auxIntToInt16(v_0_1.AuxInt)
15402 if v_1.Op != OpConst64 {
15403 continue
15404 }
15405 e := auxIntToInt64(v_1.AuxInt)
15406 if !(c < e) {
15407 continue
15408 }
15409 v.reset(OpAnd16)
15410 v0 := b.NewValue0(v.Pos, OpLsh16x64, t)
15411 v1 := b.NewValue0(v.Pos, OpConst64, t2)
15412 v1.AuxInt = int64ToAuxInt(e - c)
15413 v0.AddArg2(x, v1)
15414 v2 := b.NewValue0(v.Pos, OpConst16, t)
15415 v2.AuxInt = int16ToAuxInt(d << e)
15416 v.AddArg2(v0, v2)
15417 return true
15418 }
15419 break
15420 }
15421 return false
15422 }
15423 func rewriteValuegeneric_OpLsh16x8(v *Value) bool {
15424 v_1 := v.Args[1]
15425 v_0 := v.Args[0]
15426 b := v.Block
15427
15428
15429 for {
15430 t := v.Type
15431 x := v_0
15432 if v_1.Op != OpConst8 {
15433 break
15434 }
15435 c := auxIntToInt8(v_1.AuxInt)
15436 v.reset(OpLsh16x64)
15437 v0 := b.NewValue0(v.Pos, OpConst64, t)
15438 v0.AuxInt = int64ToAuxInt(int64(uint8(c)))
15439 v.AddArg2(x, v0)
15440 return true
15441 }
15442
15443
15444 for {
15445 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 {
15446 break
15447 }
15448 v.reset(OpConst16)
15449 v.AuxInt = int16ToAuxInt(0)
15450 return true
15451 }
15452 return false
15453 }
15454 func rewriteValuegeneric_OpLsh32x16(v *Value) bool {
15455 v_1 := v.Args[1]
15456 v_0 := v.Args[0]
15457 b := v.Block
15458
15459
15460 for {
15461 t := v.Type
15462 x := v_0
15463 if v_1.Op != OpConst16 {
15464 break
15465 }
15466 c := auxIntToInt16(v_1.AuxInt)
15467 v.reset(OpLsh32x64)
15468 v0 := b.NewValue0(v.Pos, OpConst64, t)
15469 v0.AuxInt = int64ToAuxInt(int64(uint16(c)))
15470 v.AddArg2(x, v0)
15471 return true
15472 }
15473
15474
15475 for {
15476 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
15477 break
15478 }
15479 v.reset(OpConst32)
15480 v.AuxInt = int32ToAuxInt(0)
15481 return true
15482 }
15483 return false
15484 }
15485 func rewriteValuegeneric_OpLsh32x32(v *Value) bool {
15486 v_1 := v.Args[1]
15487 v_0 := v.Args[0]
15488 b := v.Block
15489
15490
15491 for {
15492 t := v.Type
15493 x := v_0
15494 if v_1.Op != OpConst32 {
15495 break
15496 }
15497 c := auxIntToInt32(v_1.AuxInt)
15498 v.reset(OpLsh32x64)
15499 v0 := b.NewValue0(v.Pos, OpConst64, t)
15500 v0.AuxInt = int64ToAuxInt(int64(uint32(c)))
15501 v.AddArg2(x, v0)
15502 return true
15503 }
15504
15505
15506 for {
15507 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
15508 break
15509 }
15510 v.reset(OpConst32)
15511 v.AuxInt = int32ToAuxInt(0)
15512 return true
15513 }
15514 return false
15515 }
15516 func rewriteValuegeneric_OpLsh32x64(v *Value) bool {
15517 v_1 := v.Args[1]
15518 v_0 := v.Args[0]
15519 b := v.Block
15520 typ := &b.Func.Config.Types
15521
15522
15523 for {
15524 if v_0.Op != OpConst32 {
15525 break
15526 }
15527 c := auxIntToInt32(v_0.AuxInt)
15528 if v_1.Op != OpConst64 {
15529 break
15530 }
15531 d := auxIntToInt64(v_1.AuxInt)
15532 v.reset(OpConst32)
15533 v.AuxInt = int32ToAuxInt(c << uint64(d))
15534 return true
15535 }
15536
15537
15538 for {
15539 x := v_0
15540 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 0 {
15541 break
15542 }
15543 v.copyOf(x)
15544 return true
15545 }
15546
15547
15548 for {
15549 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
15550 break
15551 }
15552 v.reset(OpConst32)
15553 v.AuxInt = int32ToAuxInt(0)
15554 return true
15555 }
15556
15557
15558
15559 for {
15560 if v_1.Op != OpConst64 {
15561 break
15562 }
15563 c := auxIntToInt64(v_1.AuxInt)
15564 if !(uint64(c) >= 32) {
15565 break
15566 }
15567 v.reset(OpConst32)
15568 v.AuxInt = int32ToAuxInt(0)
15569 return true
15570 }
15571
15572
15573
15574 for {
15575 t := v.Type
15576 if v_0.Op != OpLsh32x64 {
15577 break
15578 }
15579 _ = v_0.Args[1]
15580 x := v_0.Args[0]
15581 v_0_1 := v_0.Args[1]
15582 if v_0_1.Op != OpConst64 {
15583 break
15584 }
15585 c := auxIntToInt64(v_0_1.AuxInt)
15586 if v_1.Op != OpConst64 {
15587 break
15588 }
15589 d := auxIntToInt64(v_1.AuxInt)
15590 if !(!uaddOvf(c, d)) {
15591 break
15592 }
15593 v.reset(OpLsh32x64)
15594 v0 := b.NewValue0(v.Pos, OpConst64, t)
15595 v0.AuxInt = int64ToAuxInt(c + d)
15596 v.AddArg2(x, v0)
15597 return true
15598 }
15599
15600
15601
15602 for {
15603 i := v_0
15604 if i.Op != OpRsh32x64 {
15605 break
15606 }
15607 _ = i.Args[1]
15608 x := i.Args[0]
15609 i_1 := i.Args[1]
15610 if i_1.Op != OpConst64 {
15611 break
15612 }
15613 c := auxIntToInt64(i_1.AuxInt)
15614 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != c || !(c >= 0 && c < 32 && i.Uses == 1) {
15615 break
15616 }
15617 v.reset(OpAnd32)
15618 v0 := b.NewValue0(v.Pos, OpConst32, v.Type)
15619 v0.AuxInt = int32ToAuxInt(int32(-1) << c)
15620 v.AddArg2(x, v0)
15621 return true
15622 }
15623
15624
15625
15626 for {
15627 i := v_0
15628 if i.Op != OpRsh32Ux64 {
15629 break
15630 }
15631 _ = i.Args[1]
15632 x := i.Args[0]
15633 i_1 := i.Args[1]
15634 if i_1.Op != OpConst64 {
15635 break
15636 }
15637 c := auxIntToInt64(i_1.AuxInt)
15638 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != c || !(c >= 0 && c < 32 && i.Uses == 1) {
15639 break
15640 }
15641 v.reset(OpAnd32)
15642 v0 := b.NewValue0(v.Pos, OpConst32, v.Type)
15643 v0.AuxInt = int32ToAuxInt(int32(-1) << c)
15644 v.AddArg2(x, v0)
15645 return true
15646 }
15647
15648
15649
15650 for {
15651 if v_0.Op != OpRsh32Ux64 {
15652 break
15653 }
15654 _ = v_0.Args[1]
15655 v_0_0 := v_0.Args[0]
15656 if v_0_0.Op != OpLsh32x64 {
15657 break
15658 }
15659 _ = v_0_0.Args[1]
15660 x := v_0_0.Args[0]
15661 v_0_0_1 := v_0_0.Args[1]
15662 if v_0_0_1.Op != OpConst64 {
15663 break
15664 }
15665 c1 := auxIntToInt64(v_0_0_1.AuxInt)
15666 v_0_1 := v_0.Args[1]
15667 if v_0_1.Op != OpConst64 {
15668 break
15669 }
15670 c2 := auxIntToInt64(v_0_1.AuxInt)
15671 if v_1.Op != OpConst64 {
15672 break
15673 }
15674 c3 := auxIntToInt64(v_1.AuxInt)
15675 if !(uint64(c1) >= uint64(c2) && uint64(c3) >= uint64(c2) && !uaddOvf(c1-c2, c3)) {
15676 break
15677 }
15678 v.reset(OpLsh32x64)
15679 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
15680 v0.AuxInt = int64ToAuxInt(c1 - c2 + c3)
15681 v.AddArg2(x, v0)
15682 return true
15683 }
15684
15685
15686
15687 for {
15688 if v_0.Op != OpAnd32 {
15689 break
15690 }
15691 _ = v_0.Args[1]
15692 v_0_0 := v_0.Args[0]
15693 v_0_1 := v_0.Args[1]
15694 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
15695 if v_0_0.Op != OpRsh32x64 {
15696 continue
15697 }
15698 t := v_0_0.Type
15699 _ = v_0_0.Args[1]
15700 x := v_0_0.Args[0]
15701 v_0_0_1 := v_0_0.Args[1]
15702 if v_0_0_1.Op != OpConst64 {
15703 continue
15704 }
15705 t2 := v_0_0_1.Type
15706 c := auxIntToInt64(v_0_0_1.AuxInt)
15707 if v_0_1.Op != OpConst32 {
15708 continue
15709 }
15710 d := auxIntToInt32(v_0_1.AuxInt)
15711 if v_1.Op != OpConst64 {
15712 continue
15713 }
15714 e := auxIntToInt64(v_1.AuxInt)
15715 if !(c >= e) {
15716 continue
15717 }
15718 v.reset(OpAnd32)
15719 v0 := b.NewValue0(v.Pos, OpRsh32x64, t)
15720 v1 := b.NewValue0(v.Pos, OpConst64, t2)
15721 v1.AuxInt = int64ToAuxInt(c - e)
15722 v0.AddArg2(x, v1)
15723 v2 := b.NewValue0(v.Pos, OpConst32, t)
15724 v2.AuxInt = int32ToAuxInt(d << e)
15725 v.AddArg2(v0, v2)
15726 return true
15727 }
15728 break
15729 }
15730
15731
15732
15733 for {
15734 if v_0.Op != OpAnd32 {
15735 break
15736 }
15737 _ = v_0.Args[1]
15738 v_0_0 := v_0.Args[0]
15739 v_0_1 := v_0.Args[1]
15740 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
15741 if v_0_0.Op != OpRsh32Ux64 {
15742 continue
15743 }
15744 t := v_0_0.Type
15745 _ = v_0_0.Args[1]
15746 x := v_0_0.Args[0]
15747 v_0_0_1 := v_0_0.Args[1]
15748 if v_0_0_1.Op != OpConst64 {
15749 continue
15750 }
15751 t2 := v_0_0_1.Type
15752 c := auxIntToInt64(v_0_0_1.AuxInt)
15753 if v_0_1.Op != OpConst32 {
15754 continue
15755 }
15756 d := auxIntToInt32(v_0_1.AuxInt)
15757 if v_1.Op != OpConst64 {
15758 continue
15759 }
15760 e := auxIntToInt64(v_1.AuxInt)
15761 if !(c >= e) {
15762 continue
15763 }
15764 v.reset(OpAnd32)
15765 v0 := b.NewValue0(v.Pos, OpRsh32Ux64, t)
15766 v1 := b.NewValue0(v.Pos, OpConst64, t2)
15767 v1.AuxInt = int64ToAuxInt(c - e)
15768 v0.AddArg2(x, v1)
15769 v2 := b.NewValue0(v.Pos, OpConst32, t)
15770 v2.AuxInt = int32ToAuxInt(d << e)
15771 v.AddArg2(v0, v2)
15772 return true
15773 }
15774 break
15775 }
15776
15777
15778
15779 for {
15780 if v_0.Op != OpAnd32 {
15781 break
15782 }
15783 _ = v_0.Args[1]
15784 v_0_0 := v_0.Args[0]
15785 v_0_1 := v_0.Args[1]
15786 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
15787 if v_0_0.Op != OpRsh32x64 {
15788 continue
15789 }
15790 t := v_0_0.Type
15791 _ = v_0_0.Args[1]
15792 x := v_0_0.Args[0]
15793 v_0_0_1 := v_0_0.Args[1]
15794 if v_0_0_1.Op != OpConst64 {
15795 continue
15796 }
15797 t2 := v_0_0_1.Type
15798 c := auxIntToInt64(v_0_0_1.AuxInt)
15799 if v_0_1.Op != OpConst32 {
15800 continue
15801 }
15802 d := auxIntToInt32(v_0_1.AuxInt)
15803 if v_1.Op != OpConst64 {
15804 continue
15805 }
15806 e := auxIntToInt64(v_1.AuxInt)
15807 if !(c < e) {
15808 continue
15809 }
15810 v.reset(OpAnd32)
15811 v0 := b.NewValue0(v.Pos, OpLsh32x64, t)
15812 v1 := b.NewValue0(v.Pos, OpConst64, t2)
15813 v1.AuxInt = int64ToAuxInt(e - c)
15814 v0.AddArg2(x, v1)
15815 v2 := b.NewValue0(v.Pos, OpConst32, t)
15816 v2.AuxInt = int32ToAuxInt(d << e)
15817 v.AddArg2(v0, v2)
15818 return true
15819 }
15820 break
15821 }
15822
15823
15824
15825 for {
15826 if v_0.Op != OpAnd32 {
15827 break
15828 }
15829 _ = v_0.Args[1]
15830 v_0_0 := v_0.Args[0]
15831 v_0_1 := v_0.Args[1]
15832 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
15833 if v_0_0.Op != OpRsh32Ux64 {
15834 continue
15835 }
15836 t := v_0_0.Type
15837 _ = v_0_0.Args[1]
15838 x := v_0_0.Args[0]
15839 v_0_0_1 := v_0_0.Args[1]
15840 if v_0_0_1.Op != OpConst64 {
15841 continue
15842 }
15843 t2 := v_0_0_1.Type
15844 c := auxIntToInt64(v_0_0_1.AuxInt)
15845 if v_0_1.Op != OpConst32 {
15846 continue
15847 }
15848 d := auxIntToInt32(v_0_1.AuxInt)
15849 if v_1.Op != OpConst64 {
15850 continue
15851 }
15852 e := auxIntToInt64(v_1.AuxInt)
15853 if !(c < e) {
15854 continue
15855 }
15856 v.reset(OpAnd32)
15857 v0 := b.NewValue0(v.Pos, OpLsh32x64, t)
15858 v1 := b.NewValue0(v.Pos, OpConst64, t2)
15859 v1.AuxInt = int64ToAuxInt(e - c)
15860 v0.AddArg2(x, v1)
15861 v2 := b.NewValue0(v.Pos, OpConst32, t)
15862 v2.AuxInt = int32ToAuxInt(d << e)
15863 v.AddArg2(v0, v2)
15864 return true
15865 }
15866 break
15867 }
15868 return false
15869 }
15870 func rewriteValuegeneric_OpLsh32x8(v *Value) bool {
15871 v_1 := v.Args[1]
15872 v_0 := v.Args[0]
15873 b := v.Block
15874
15875
15876 for {
15877 t := v.Type
15878 x := v_0
15879 if v_1.Op != OpConst8 {
15880 break
15881 }
15882 c := auxIntToInt8(v_1.AuxInt)
15883 v.reset(OpLsh32x64)
15884 v0 := b.NewValue0(v.Pos, OpConst64, t)
15885 v0.AuxInt = int64ToAuxInt(int64(uint8(c)))
15886 v.AddArg2(x, v0)
15887 return true
15888 }
15889
15890
15891 for {
15892 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
15893 break
15894 }
15895 v.reset(OpConst32)
15896 v.AuxInt = int32ToAuxInt(0)
15897 return true
15898 }
15899 return false
15900 }
15901 func rewriteValuegeneric_OpLsh64x16(v *Value) bool {
15902 v_1 := v.Args[1]
15903 v_0 := v.Args[0]
15904 b := v.Block
15905
15906
15907 for {
15908 t := v.Type
15909 x := v_0
15910 if v_1.Op != OpConst16 {
15911 break
15912 }
15913 c := auxIntToInt16(v_1.AuxInt)
15914 v.reset(OpLsh64x64)
15915 v0 := b.NewValue0(v.Pos, OpConst64, t)
15916 v0.AuxInt = int64ToAuxInt(int64(uint16(c)))
15917 v.AddArg2(x, v0)
15918 return true
15919 }
15920
15921
15922 for {
15923 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
15924 break
15925 }
15926 v.reset(OpConst64)
15927 v.AuxInt = int64ToAuxInt(0)
15928 return true
15929 }
15930 return false
15931 }
15932 func rewriteValuegeneric_OpLsh64x32(v *Value) bool {
15933 v_1 := v.Args[1]
15934 v_0 := v.Args[0]
15935 b := v.Block
15936
15937
15938 for {
15939 t := v.Type
15940 x := v_0
15941 if v_1.Op != OpConst32 {
15942 break
15943 }
15944 c := auxIntToInt32(v_1.AuxInt)
15945 v.reset(OpLsh64x64)
15946 v0 := b.NewValue0(v.Pos, OpConst64, t)
15947 v0.AuxInt = int64ToAuxInt(int64(uint32(c)))
15948 v.AddArg2(x, v0)
15949 return true
15950 }
15951
15952
15953 for {
15954 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
15955 break
15956 }
15957 v.reset(OpConst64)
15958 v.AuxInt = int64ToAuxInt(0)
15959 return true
15960 }
15961 return false
15962 }
15963 func rewriteValuegeneric_OpLsh64x64(v *Value) bool {
15964 v_1 := v.Args[1]
15965 v_0 := v.Args[0]
15966 b := v.Block
15967 typ := &b.Func.Config.Types
15968
15969
15970 for {
15971 if v_0.Op != OpConst64 {
15972 break
15973 }
15974 c := auxIntToInt64(v_0.AuxInt)
15975 if v_1.Op != OpConst64 {
15976 break
15977 }
15978 d := auxIntToInt64(v_1.AuxInt)
15979 v.reset(OpConst64)
15980 v.AuxInt = int64ToAuxInt(c << uint64(d))
15981 return true
15982 }
15983
15984
15985 for {
15986 x := v_0
15987 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 0 {
15988 break
15989 }
15990 v.copyOf(x)
15991 return true
15992 }
15993
15994
15995 for {
15996 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
15997 break
15998 }
15999 v.reset(OpConst64)
16000 v.AuxInt = int64ToAuxInt(0)
16001 return true
16002 }
16003
16004
16005
16006 for {
16007 if v_1.Op != OpConst64 {
16008 break
16009 }
16010 c := auxIntToInt64(v_1.AuxInt)
16011 if !(uint64(c) >= 64) {
16012 break
16013 }
16014 v.reset(OpConst64)
16015 v.AuxInt = int64ToAuxInt(0)
16016 return true
16017 }
16018
16019
16020
16021 for {
16022 t := v.Type
16023 if v_0.Op != OpLsh64x64 {
16024 break
16025 }
16026 _ = v_0.Args[1]
16027 x := v_0.Args[0]
16028 v_0_1 := v_0.Args[1]
16029 if v_0_1.Op != OpConst64 {
16030 break
16031 }
16032 c := auxIntToInt64(v_0_1.AuxInt)
16033 if v_1.Op != OpConst64 {
16034 break
16035 }
16036 d := auxIntToInt64(v_1.AuxInt)
16037 if !(!uaddOvf(c, d)) {
16038 break
16039 }
16040 v.reset(OpLsh64x64)
16041 v0 := b.NewValue0(v.Pos, OpConst64, t)
16042 v0.AuxInt = int64ToAuxInt(c + d)
16043 v.AddArg2(x, v0)
16044 return true
16045 }
16046
16047
16048
16049 for {
16050 i := v_0
16051 if i.Op != OpRsh64x64 {
16052 break
16053 }
16054 _ = i.Args[1]
16055 x := i.Args[0]
16056 i_1 := i.Args[1]
16057 if i_1.Op != OpConst64 {
16058 break
16059 }
16060 c := auxIntToInt64(i_1.AuxInt)
16061 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != c || !(c >= 0 && c < 64 && i.Uses == 1) {
16062 break
16063 }
16064 v.reset(OpAnd64)
16065 v0 := b.NewValue0(v.Pos, OpConst64, v.Type)
16066 v0.AuxInt = int64ToAuxInt(int64(-1) << c)
16067 v.AddArg2(x, v0)
16068 return true
16069 }
16070
16071
16072
16073 for {
16074 i := v_0
16075 if i.Op != OpRsh64Ux64 {
16076 break
16077 }
16078 _ = i.Args[1]
16079 x := i.Args[0]
16080 i_1 := i.Args[1]
16081 if i_1.Op != OpConst64 {
16082 break
16083 }
16084 c := auxIntToInt64(i_1.AuxInt)
16085 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != c || !(c >= 0 && c < 64 && i.Uses == 1) {
16086 break
16087 }
16088 v.reset(OpAnd64)
16089 v0 := b.NewValue0(v.Pos, OpConst64, v.Type)
16090 v0.AuxInt = int64ToAuxInt(int64(-1) << c)
16091 v.AddArg2(x, v0)
16092 return true
16093 }
16094
16095
16096
16097 for {
16098 if v_0.Op != OpRsh64Ux64 {
16099 break
16100 }
16101 _ = v_0.Args[1]
16102 v_0_0 := v_0.Args[0]
16103 if v_0_0.Op != OpLsh64x64 {
16104 break
16105 }
16106 _ = v_0_0.Args[1]
16107 x := v_0_0.Args[0]
16108 v_0_0_1 := v_0_0.Args[1]
16109 if v_0_0_1.Op != OpConst64 {
16110 break
16111 }
16112 c1 := auxIntToInt64(v_0_0_1.AuxInt)
16113 v_0_1 := v_0.Args[1]
16114 if v_0_1.Op != OpConst64 {
16115 break
16116 }
16117 c2 := auxIntToInt64(v_0_1.AuxInt)
16118 if v_1.Op != OpConst64 {
16119 break
16120 }
16121 c3 := auxIntToInt64(v_1.AuxInt)
16122 if !(uint64(c1) >= uint64(c2) && uint64(c3) >= uint64(c2) && !uaddOvf(c1-c2, c3)) {
16123 break
16124 }
16125 v.reset(OpLsh64x64)
16126 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
16127 v0.AuxInt = int64ToAuxInt(c1 - c2 + c3)
16128 v.AddArg2(x, v0)
16129 return true
16130 }
16131
16132
16133
16134 for {
16135 if v_0.Op != OpAnd64 {
16136 break
16137 }
16138 _ = v_0.Args[1]
16139 v_0_0 := v_0.Args[0]
16140 v_0_1 := v_0.Args[1]
16141 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
16142 if v_0_0.Op != OpRsh64x64 {
16143 continue
16144 }
16145 t := v_0_0.Type
16146 _ = v_0_0.Args[1]
16147 x := v_0_0.Args[0]
16148 v_0_0_1 := v_0_0.Args[1]
16149 if v_0_0_1.Op != OpConst64 {
16150 continue
16151 }
16152 t2 := v_0_0_1.Type
16153 c := auxIntToInt64(v_0_0_1.AuxInt)
16154 if v_0_1.Op != OpConst64 {
16155 continue
16156 }
16157 d := auxIntToInt64(v_0_1.AuxInt)
16158 if v_1.Op != OpConst64 {
16159 continue
16160 }
16161 e := auxIntToInt64(v_1.AuxInt)
16162 if !(c >= e) {
16163 continue
16164 }
16165 v.reset(OpAnd64)
16166 v0 := b.NewValue0(v.Pos, OpRsh64x64, t)
16167 v1 := b.NewValue0(v.Pos, OpConst64, t2)
16168 v1.AuxInt = int64ToAuxInt(c - e)
16169 v0.AddArg2(x, v1)
16170 v2 := b.NewValue0(v.Pos, OpConst64, t)
16171 v2.AuxInt = int64ToAuxInt(d << e)
16172 v.AddArg2(v0, v2)
16173 return true
16174 }
16175 break
16176 }
16177
16178
16179
16180 for {
16181 if v_0.Op != OpAnd64 {
16182 break
16183 }
16184 _ = v_0.Args[1]
16185 v_0_0 := v_0.Args[0]
16186 v_0_1 := v_0.Args[1]
16187 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
16188 if v_0_0.Op != OpRsh64Ux64 {
16189 continue
16190 }
16191 t := v_0_0.Type
16192 _ = v_0_0.Args[1]
16193 x := v_0_0.Args[0]
16194 v_0_0_1 := v_0_0.Args[1]
16195 if v_0_0_1.Op != OpConst64 {
16196 continue
16197 }
16198 t2 := v_0_0_1.Type
16199 c := auxIntToInt64(v_0_0_1.AuxInt)
16200 if v_0_1.Op != OpConst64 {
16201 continue
16202 }
16203 d := auxIntToInt64(v_0_1.AuxInt)
16204 if v_1.Op != OpConst64 {
16205 continue
16206 }
16207 e := auxIntToInt64(v_1.AuxInt)
16208 if !(c >= e) {
16209 continue
16210 }
16211 v.reset(OpAnd64)
16212 v0 := b.NewValue0(v.Pos, OpRsh64Ux64, t)
16213 v1 := b.NewValue0(v.Pos, OpConst64, t2)
16214 v1.AuxInt = int64ToAuxInt(c - e)
16215 v0.AddArg2(x, v1)
16216 v2 := b.NewValue0(v.Pos, OpConst64, t)
16217 v2.AuxInt = int64ToAuxInt(d << e)
16218 v.AddArg2(v0, v2)
16219 return true
16220 }
16221 break
16222 }
16223
16224
16225
16226 for {
16227 if v_0.Op != OpAnd64 {
16228 break
16229 }
16230 _ = v_0.Args[1]
16231 v_0_0 := v_0.Args[0]
16232 v_0_1 := v_0.Args[1]
16233 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
16234 if v_0_0.Op != OpRsh64x64 {
16235 continue
16236 }
16237 t := v_0_0.Type
16238 _ = v_0_0.Args[1]
16239 x := v_0_0.Args[0]
16240 v_0_0_1 := v_0_0.Args[1]
16241 if v_0_0_1.Op != OpConst64 {
16242 continue
16243 }
16244 t2 := v_0_0_1.Type
16245 c := auxIntToInt64(v_0_0_1.AuxInt)
16246 if v_0_1.Op != OpConst64 {
16247 continue
16248 }
16249 d := auxIntToInt64(v_0_1.AuxInt)
16250 if v_1.Op != OpConst64 {
16251 continue
16252 }
16253 e := auxIntToInt64(v_1.AuxInt)
16254 if !(c < e) {
16255 continue
16256 }
16257 v.reset(OpAnd64)
16258 v0 := b.NewValue0(v.Pos, OpLsh64x64, t)
16259 v1 := b.NewValue0(v.Pos, OpConst64, t2)
16260 v1.AuxInt = int64ToAuxInt(e - c)
16261 v0.AddArg2(x, v1)
16262 v2 := b.NewValue0(v.Pos, OpConst64, t)
16263 v2.AuxInt = int64ToAuxInt(d << e)
16264 v.AddArg2(v0, v2)
16265 return true
16266 }
16267 break
16268 }
16269
16270
16271
16272 for {
16273 if v_0.Op != OpAnd64 {
16274 break
16275 }
16276 _ = v_0.Args[1]
16277 v_0_0 := v_0.Args[0]
16278 v_0_1 := v_0.Args[1]
16279 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
16280 if v_0_0.Op != OpRsh64Ux64 {
16281 continue
16282 }
16283 t := v_0_0.Type
16284 _ = v_0_0.Args[1]
16285 x := v_0_0.Args[0]
16286 v_0_0_1 := v_0_0.Args[1]
16287 if v_0_0_1.Op != OpConst64 {
16288 continue
16289 }
16290 t2 := v_0_0_1.Type
16291 c := auxIntToInt64(v_0_0_1.AuxInt)
16292 if v_0_1.Op != OpConst64 {
16293 continue
16294 }
16295 d := auxIntToInt64(v_0_1.AuxInt)
16296 if v_1.Op != OpConst64 {
16297 continue
16298 }
16299 e := auxIntToInt64(v_1.AuxInt)
16300 if !(c < e) {
16301 continue
16302 }
16303 v.reset(OpAnd64)
16304 v0 := b.NewValue0(v.Pos, OpLsh64x64, t)
16305 v1 := b.NewValue0(v.Pos, OpConst64, t2)
16306 v1.AuxInt = int64ToAuxInt(e - c)
16307 v0.AddArg2(x, v1)
16308 v2 := b.NewValue0(v.Pos, OpConst64, t)
16309 v2.AuxInt = int64ToAuxInt(d << e)
16310 v.AddArg2(v0, v2)
16311 return true
16312 }
16313 break
16314 }
16315 return false
16316 }
16317 func rewriteValuegeneric_OpLsh64x8(v *Value) bool {
16318 v_1 := v.Args[1]
16319 v_0 := v.Args[0]
16320 b := v.Block
16321
16322
16323 for {
16324 t := v.Type
16325 x := v_0
16326 if v_1.Op != OpConst8 {
16327 break
16328 }
16329 c := auxIntToInt8(v_1.AuxInt)
16330 v.reset(OpLsh64x64)
16331 v0 := b.NewValue0(v.Pos, OpConst64, t)
16332 v0.AuxInt = int64ToAuxInt(int64(uint8(c)))
16333 v.AddArg2(x, v0)
16334 return true
16335 }
16336
16337
16338 for {
16339 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
16340 break
16341 }
16342 v.reset(OpConst64)
16343 v.AuxInt = int64ToAuxInt(0)
16344 return true
16345 }
16346 return false
16347 }
16348 func rewriteValuegeneric_OpLsh8x16(v *Value) bool {
16349 v_1 := v.Args[1]
16350 v_0 := v.Args[0]
16351 b := v.Block
16352
16353
16354 for {
16355 t := v.Type
16356 x := v_0
16357 if v_1.Op != OpConst16 {
16358 break
16359 }
16360 c := auxIntToInt16(v_1.AuxInt)
16361 v.reset(OpLsh8x64)
16362 v0 := b.NewValue0(v.Pos, OpConst64, t)
16363 v0.AuxInt = int64ToAuxInt(int64(uint16(c)))
16364 v.AddArg2(x, v0)
16365 return true
16366 }
16367
16368
16369 for {
16370 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 {
16371 break
16372 }
16373 v.reset(OpConst8)
16374 v.AuxInt = int8ToAuxInt(0)
16375 return true
16376 }
16377 return false
16378 }
16379 func rewriteValuegeneric_OpLsh8x32(v *Value) bool {
16380 v_1 := v.Args[1]
16381 v_0 := v.Args[0]
16382 b := v.Block
16383
16384
16385 for {
16386 t := v.Type
16387 x := v_0
16388 if v_1.Op != OpConst32 {
16389 break
16390 }
16391 c := auxIntToInt32(v_1.AuxInt)
16392 v.reset(OpLsh8x64)
16393 v0 := b.NewValue0(v.Pos, OpConst64, t)
16394 v0.AuxInt = int64ToAuxInt(int64(uint32(c)))
16395 v.AddArg2(x, v0)
16396 return true
16397 }
16398
16399
16400 for {
16401 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 {
16402 break
16403 }
16404 v.reset(OpConst8)
16405 v.AuxInt = int8ToAuxInt(0)
16406 return true
16407 }
16408 return false
16409 }
16410 func rewriteValuegeneric_OpLsh8x64(v *Value) bool {
16411 v_1 := v.Args[1]
16412 v_0 := v.Args[0]
16413 b := v.Block
16414 typ := &b.Func.Config.Types
16415
16416
16417 for {
16418 if v_0.Op != OpConst8 {
16419 break
16420 }
16421 c := auxIntToInt8(v_0.AuxInt)
16422 if v_1.Op != OpConst64 {
16423 break
16424 }
16425 d := auxIntToInt64(v_1.AuxInt)
16426 v.reset(OpConst8)
16427 v.AuxInt = int8ToAuxInt(c << uint64(d))
16428 return true
16429 }
16430
16431
16432 for {
16433 x := v_0
16434 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 0 {
16435 break
16436 }
16437 v.copyOf(x)
16438 return true
16439 }
16440
16441
16442 for {
16443 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 {
16444 break
16445 }
16446 v.reset(OpConst8)
16447 v.AuxInt = int8ToAuxInt(0)
16448 return true
16449 }
16450
16451
16452
16453 for {
16454 if v_1.Op != OpConst64 {
16455 break
16456 }
16457 c := auxIntToInt64(v_1.AuxInt)
16458 if !(uint64(c) >= 8) {
16459 break
16460 }
16461 v.reset(OpConst8)
16462 v.AuxInt = int8ToAuxInt(0)
16463 return true
16464 }
16465
16466
16467
16468 for {
16469 t := v.Type
16470 if v_0.Op != OpLsh8x64 {
16471 break
16472 }
16473 _ = v_0.Args[1]
16474 x := v_0.Args[0]
16475 v_0_1 := v_0.Args[1]
16476 if v_0_1.Op != OpConst64 {
16477 break
16478 }
16479 c := auxIntToInt64(v_0_1.AuxInt)
16480 if v_1.Op != OpConst64 {
16481 break
16482 }
16483 d := auxIntToInt64(v_1.AuxInt)
16484 if !(!uaddOvf(c, d)) {
16485 break
16486 }
16487 v.reset(OpLsh8x64)
16488 v0 := b.NewValue0(v.Pos, OpConst64, t)
16489 v0.AuxInt = int64ToAuxInt(c + d)
16490 v.AddArg2(x, v0)
16491 return true
16492 }
16493
16494
16495
16496 for {
16497 i := v_0
16498 if i.Op != OpRsh8x64 {
16499 break
16500 }
16501 _ = i.Args[1]
16502 x := i.Args[0]
16503 i_1 := i.Args[1]
16504 if i_1.Op != OpConst64 {
16505 break
16506 }
16507 c := auxIntToInt64(i_1.AuxInt)
16508 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != c || !(c >= 0 && c < 8 && i.Uses == 1) {
16509 break
16510 }
16511 v.reset(OpAnd8)
16512 v0 := b.NewValue0(v.Pos, OpConst8, v.Type)
16513 v0.AuxInt = int8ToAuxInt(int8(-1) << c)
16514 v.AddArg2(x, v0)
16515 return true
16516 }
16517
16518
16519
16520 for {
16521 i := v_0
16522 if i.Op != OpRsh8Ux64 {
16523 break
16524 }
16525 _ = i.Args[1]
16526 x := i.Args[0]
16527 i_1 := i.Args[1]
16528 if i_1.Op != OpConst64 {
16529 break
16530 }
16531 c := auxIntToInt64(i_1.AuxInt)
16532 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != c || !(c >= 0 && c < 8 && i.Uses == 1) {
16533 break
16534 }
16535 v.reset(OpAnd8)
16536 v0 := b.NewValue0(v.Pos, OpConst8, v.Type)
16537 v0.AuxInt = int8ToAuxInt(int8(-1) << c)
16538 v.AddArg2(x, v0)
16539 return true
16540 }
16541
16542
16543
16544 for {
16545 if v_0.Op != OpRsh8Ux64 {
16546 break
16547 }
16548 _ = v_0.Args[1]
16549 v_0_0 := v_0.Args[0]
16550 if v_0_0.Op != OpLsh8x64 {
16551 break
16552 }
16553 _ = v_0_0.Args[1]
16554 x := v_0_0.Args[0]
16555 v_0_0_1 := v_0_0.Args[1]
16556 if v_0_0_1.Op != OpConst64 {
16557 break
16558 }
16559 c1 := auxIntToInt64(v_0_0_1.AuxInt)
16560 v_0_1 := v_0.Args[1]
16561 if v_0_1.Op != OpConst64 {
16562 break
16563 }
16564 c2 := auxIntToInt64(v_0_1.AuxInt)
16565 if v_1.Op != OpConst64 {
16566 break
16567 }
16568 c3 := auxIntToInt64(v_1.AuxInt)
16569 if !(uint64(c1) >= uint64(c2) && uint64(c3) >= uint64(c2) && !uaddOvf(c1-c2, c3)) {
16570 break
16571 }
16572 v.reset(OpLsh8x64)
16573 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
16574 v0.AuxInt = int64ToAuxInt(c1 - c2 + c3)
16575 v.AddArg2(x, v0)
16576 return true
16577 }
16578
16579
16580
16581 for {
16582 if v_0.Op != OpAnd8 {
16583 break
16584 }
16585 _ = v_0.Args[1]
16586 v_0_0 := v_0.Args[0]
16587 v_0_1 := v_0.Args[1]
16588 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
16589 if v_0_0.Op != OpRsh8x64 {
16590 continue
16591 }
16592 t := v_0_0.Type
16593 _ = v_0_0.Args[1]
16594 x := v_0_0.Args[0]
16595 v_0_0_1 := v_0_0.Args[1]
16596 if v_0_0_1.Op != OpConst64 {
16597 continue
16598 }
16599 t2 := v_0_0_1.Type
16600 c := auxIntToInt64(v_0_0_1.AuxInt)
16601 if v_0_1.Op != OpConst8 {
16602 continue
16603 }
16604 d := auxIntToInt8(v_0_1.AuxInt)
16605 if v_1.Op != OpConst64 {
16606 continue
16607 }
16608 e := auxIntToInt64(v_1.AuxInt)
16609 if !(c >= e) {
16610 continue
16611 }
16612 v.reset(OpAnd8)
16613 v0 := b.NewValue0(v.Pos, OpRsh8x64, t)
16614 v1 := b.NewValue0(v.Pos, OpConst64, t2)
16615 v1.AuxInt = int64ToAuxInt(c - e)
16616 v0.AddArg2(x, v1)
16617 v2 := b.NewValue0(v.Pos, OpConst8, t)
16618 v2.AuxInt = int8ToAuxInt(d << e)
16619 v.AddArg2(v0, v2)
16620 return true
16621 }
16622 break
16623 }
16624
16625
16626
16627 for {
16628 if v_0.Op != OpAnd8 {
16629 break
16630 }
16631 _ = v_0.Args[1]
16632 v_0_0 := v_0.Args[0]
16633 v_0_1 := v_0.Args[1]
16634 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
16635 if v_0_0.Op != OpRsh8Ux64 {
16636 continue
16637 }
16638 t := v_0_0.Type
16639 _ = v_0_0.Args[1]
16640 x := v_0_0.Args[0]
16641 v_0_0_1 := v_0_0.Args[1]
16642 if v_0_0_1.Op != OpConst64 {
16643 continue
16644 }
16645 t2 := v_0_0_1.Type
16646 c := auxIntToInt64(v_0_0_1.AuxInt)
16647 if v_0_1.Op != OpConst8 {
16648 continue
16649 }
16650 d := auxIntToInt8(v_0_1.AuxInt)
16651 if v_1.Op != OpConst64 {
16652 continue
16653 }
16654 e := auxIntToInt64(v_1.AuxInt)
16655 if !(c >= e) {
16656 continue
16657 }
16658 v.reset(OpAnd8)
16659 v0 := b.NewValue0(v.Pos, OpRsh8Ux64, t)
16660 v1 := b.NewValue0(v.Pos, OpConst64, t2)
16661 v1.AuxInt = int64ToAuxInt(c - e)
16662 v0.AddArg2(x, v1)
16663 v2 := b.NewValue0(v.Pos, OpConst8, t)
16664 v2.AuxInt = int8ToAuxInt(d << e)
16665 v.AddArg2(v0, v2)
16666 return true
16667 }
16668 break
16669 }
16670
16671
16672
16673 for {
16674 if v_0.Op != OpAnd8 {
16675 break
16676 }
16677 _ = v_0.Args[1]
16678 v_0_0 := v_0.Args[0]
16679 v_0_1 := v_0.Args[1]
16680 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
16681 if v_0_0.Op != OpRsh8x64 {
16682 continue
16683 }
16684 t := v_0_0.Type
16685 _ = v_0_0.Args[1]
16686 x := v_0_0.Args[0]
16687 v_0_0_1 := v_0_0.Args[1]
16688 if v_0_0_1.Op != OpConst64 {
16689 continue
16690 }
16691 t2 := v_0_0_1.Type
16692 c := auxIntToInt64(v_0_0_1.AuxInt)
16693 if v_0_1.Op != OpConst8 {
16694 continue
16695 }
16696 d := auxIntToInt8(v_0_1.AuxInt)
16697 if v_1.Op != OpConst64 {
16698 continue
16699 }
16700 e := auxIntToInt64(v_1.AuxInt)
16701 if !(c < e) {
16702 continue
16703 }
16704 v.reset(OpAnd8)
16705 v0 := b.NewValue0(v.Pos, OpLsh8x64, t)
16706 v1 := b.NewValue0(v.Pos, OpConst64, t2)
16707 v1.AuxInt = int64ToAuxInt(e - c)
16708 v0.AddArg2(x, v1)
16709 v2 := b.NewValue0(v.Pos, OpConst8, t)
16710 v2.AuxInt = int8ToAuxInt(d << e)
16711 v.AddArg2(v0, v2)
16712 return true
16713 }
16714 break
16715 }
16716
16717
16718
16719 for {
16720 if v_0.Op != OpAnd8 {
16721 break
16722 }
16723 _ = v_0.Args[1]
16724 v_0_0 := v_0.Args[0]
16725 v_0_1 := v_0.Args[1]
16726 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
16727 if v_0_0.Op != OpRsh8Ux64 {
16728 continue
16729 }
16730 t := v_0_0.Type
16731 _ = v_0_0.Args[1]
16732 x := v_0_0.Args[0]
16733 v_0_0_1 := v_0_0.Args[1]
16734 if v_0_0_1.Op != OpConst64 {
16735 continue
16736 }
16737 t2 := v_0_0_1.Type
16738 c := auxIntToInt64(v_0_0_1.AuxInt)
16739 if v_0_1.Op != OpConst8 {
16740 continue
16741 }
16742 d := auxIntToInt8(v_0_1.AuxInt)
16743 if v_1.Op != OpConst64 {
16744 continue
16745 }
16746 e := auxIntToInt64(v_1.AuxInt)
16747 if !(c < e) {
16748 continue
16749 }
16750 v.reset(OpAnd8)
16751 v0 := b.NewValue0(v.Pos, OpLsh8x64, t)
16752 v1 := b.NewValue0(v.Pos, OpConst64, t2)
16753 v1.AuxInt = int64ToAuxInt(e - c)
16754 v0.AddArg2(x, v1)
16755 v2 := b.NewValue0(v.Pos, OpConst8, t)
16756 v2.AuxInt = int8ToAuxInt(d << e)
16757 v.AddArg2(v0, v2)
16758 return true
16759 }
16760 break
16761 }
16762 return false
16763 }
16764 func rewriteValuegeneric_OpLsh8x8(v *Value) bool {
16765 v_1 := v.Args[1]
16766 v_0 := v.Args[0]
16767 b := v.Block
16768
16769
16770 for {
16771 t := v.Type
16772 x := v_0
16773 if v_1.Op != OpConst8 {
16774 break
16775 }
16776 c := auxIntToInt8(v_1.AuxInt)
16777 v.reset(OpLsh8x64)
16778 v0 := b.NewValue0(v.Pos, OpConst64, t)
16779 v0.AuxInt = int64ToAuxInt(int64(uint8(c)))
16780 v.AddArg2(x, v0)
16781 return true
16782 }
16783
16784
16785 for {
16786 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 {
16787 break
16788 }
16789 v.reset(OpConst8)
16790 v.AuxInt = int8ToAuxInt(0)
16791 return true
16792 }
16793 return false
16794 }
16795 func rewriteValuegeneric_OpMod16(v *Value) bool {
16796 v_1 := v.Args[1]
16797 v_0 := v.Args[0]
16798 b := v.Block
16799
16800
16801
16802 for {
16803 if v_0.Op != OpConst16 {
16804 break
16805 }
16806 c := auxIntToInt16(v_0.AuxInt)
16807 if v_1.Op != OpConst16 {
16808 break
16809 }
16810 d := auxIntToInt16(v_1.AuxInt)
16811 if !(d != 0) {
16812 break
16813 }
16814 v.reset(OpConst16)
16815 v.AuxInt = int16ToAuxInt(c % d)
16816 return true
16817 }
16818
16819
16820
16821 for {
16822 t := v.Type
16823 n := v_0
16824 if v_1.Op != OpConst16 {
16825 break
16826 }
16827 c := auxIntToInt16(v_1.AuxInt)
16828 if !(isNonNegative(n) && isPowerOfTwo(c)) {
16829 break
16830 }
16831 v.reset(OpAnd16)
16832 v0 := b.NewValue0(v.Pos, OpConst16, t)
16833 v0.AuxInt = int16ToAuxInt(c - 1)
16834 v.AddArg2(n, v0)
16835 return true
16836 }
16837
16838
16839
16840 for {
16841 t := v.Type
16842 n := v_0
16843 if v_1.Op != OpConst16 {
16844 break
16845 }
16846 c := auxIntToInt16(v_1.AuxInt)
16847 if !(c < 0 && c != -1<<15) {
16848 break
16849 }
16850 v.reset(OpMod16)
16851 v.Type = t
16852 v0 := b.NewValue0(v.Pos, OpConst16, t)
16853 v0.AuxInt = int16ToAuxInt(-c)
16854 v.AddArg2(n, v0)
16855 return true
16856 }
16857
16858
16859
16860 for {
16861 t := v.Type
16862 x := v_0
16863 if v_1.Op != OpConst16 {
16864 break
16865 }
16866 c := auxIntToInt16(v_1.AuxInt)
16867 if !(x.Op != OpConst16 && (c > 0 || c == -1<<15)) {
16868 break
16869 }
16870 v.reset(OpSub16)
16871 v0 := b.NewValue0(v.Pos, OpMul16, t)
16872 v1 := b.NewValue0(v.Pos, OpDiv16, t)
16873 v2 := b.NewValue0(v.Pos, OpConst16, t)
16874 v2.AuxInt = int16ToAuxInt(c)
16875 v1.AddArg2(x, v2)
16876 v0.AddArg2(v1, v2)
16877 v.AddArg2(x, v0)
16878 return true
16879 }
16880 return false
16881 }
16882 func rewriteValuegeneric_OpMod16u(v *Value) bool {
16883 v_1 := v.Args[1]
16884 v_0 := v.Args[0]
16885 b := v.Block
16886
16887
16888
16889 for {
16890 if v_0.Op != OpConst16 {
16891 break
16892 }
16893 c := auxIntToInt16(v_0.AuxInt)
16894 if v_1.Op != OpConst16 {
16895 break
16896 }
16897 d := auxIntToInt16(v_1.AuxInt)
16898 if !(d != 0) {
16899 break
16900 }
16901 v.reset(OpConst16)
16902 v.AuxInt = int16ToAuxInt(int16(uint16(c) % uint16(d)))
16903 return true
16904 }
16905
16906
16907
16908 for {
16909 t := v.Type
16910 n := v_0
16911 if v_1.Op != OpConst16 {
16912 break
16913 }
16914 c := auxIntToInt16(v_1.AuxInt)
16915 if !(isUnsignedPowerOfTwo(uint16(c))) {
16916 break
16917 }
16918 v.reset(OpAnd16)
16919 v0 := b.NewValue0(v.Pos, OpConst16, t)
16920 v0.AuxInt = int16ToAuxInt(c - 1)
16921 v.AddArg2(n, v0)
16922 return true
16923 }
16924
16925
16926
16927 for {
16928 t := v.Type
16929 x := v_0
16930 if v_1.Op != OpConst16 {
16931 break
16932 }
16933 c := auxIntToInt16(v_1.AuxInt)
16934 if !(x.Op != OpConst16 && c > 0 && umagicOK16(c)) {
16935 break
16936 }
16937 v.reset(OpSub16)
16938 v0 := b.NewValue0(v.Pos, OpMul16, t)
16939 v1 := b.NewValue0(v.Pos, OpDiv16u, t)
16940 v2 := b.NewValue0(v.Pos, OpConst16, t)
16941 v2.AuxInt = int16ToAuxInt(c)
16942 v1.AddArg2(x, v2)
16943 v0.AddArg2(v1, v2)
16944 v.AddArg2(x, v0)
16945 return true
16946 }
16947 return false
16948 }
16949 func rewriteValuegeneric_OpMod32(v *Value) bool {
16950 v_1 := v.Args[1]
16951 v_0 := v.Args[0]
16952 b := v.Block
16953
16954
16955
16956 for {
16957 if v_0.Op != OpConst32 {
16958 break
16959 }
16960 c := auxIntToInt32(v_0.AuxInt)
16961 if v_1.Op != OpConst32 {
16962 break
16963 }
16964 d := auxIntToInt32(v_1.AuxInt)
16965 if !(d != 0) {
16966 break
16967 }
16968 v.reset(OpConst32)
16969 v.AuxInt = int32ToAuxInt(c % d)
16970 return true
16971 }
16972
16973
16974
16975 for {
16976 t := v.Type
16977 n := v_0
16978 if v_1.Op != OpConst32 {
16979 break
16980 }
16981 c := auxIntToInt32(v_1.AuxInt)
16982 if !(isNonNegative(n) && isPowerOfTwo(c)) {
16983 break
16984 }
16985 v.reset(OpAnd32)
16986 v0 := b.NewValue0(v.Pos, OpConst32, t)
16987 v0.AuxInt = int32ToAuxInt(c - 1)
16988 v.AddArg2(n, v0)
16989 return true
16990 }
16991
16992
16993
16994 for {
16995 t := v.Type
16996 n := v_0
16997 if v_1.Op != OpConst32 {
16998 break
16999 }
17000 c := auxIntToInt32(v_1.AuxInt)
17001 if !(c < 0 && c != -1<<31) {
17002 break
17003 }
17004 v.reset(OpMod32)
17005 v.Type = t
17006 v0 := b.NewValue0(v.Pos, OpConst32, t)
17007 v0.AuxInt = int32ToAuxInt(-c)
17008 v.AddArg2(n, v0)
17009 return true
17010 }
17011
17012
17013
17014 for {
17015 t := v.Type
17016 x := v_0
17017 if v_1.Op != OpConst32 {
17018 break
17019 }
17020 c := auxIntToInt32(v_1.AuxInt)
17021 if !(x.Op != OpConst32 && (c > 0 || c == -1<<31)) {
17022 break
17023 }
17024 v.reset(OpSub32)
17025 v0 := b.NewValue0(v.Pos, OpMul32, t)
17026 v1 := b.NewValue0(v.Pos, OpDiv32, t)
17027 v2 := b.NewValue0(v.Pos, OpConst32, t)
17028 v2.AuxInt = int32ToAuxInt(c)
17029 v1.AddArg2(x, v2)
17030 v0.AddArg2(v1, v2)
17031 v.AddArg2(x, v0)
17032 return true
17033 }
17034 return false
17035 }
17036 func rewriteValuegeneric_OpMod32u(v *Value) bool {
17037 v_1 := v.Args[1]
17038 v_0 := v.Args[0]
17039 b := v.Block
17040
17041
17042
17043 for {
17044 if v_0.Op != OpConst32 {
17045 break
17046 }
17047 c := auxIntToInt32(v_0.AuxInt)
17048 if v_1.Op != OpConst32 {
17049 break
17050 }
17051 d := auxIntToInt32(v_1.AuxInt)
17052 if !(d != 0) {
17053 break
17054 }
17055 v.reset(OpConst32)
17056 v.AuxInt = int32ToAuxInt(int32(uint32(c) % uint32(d)))
17057 return true
17058 }
17059
17060
17061
17062 for {
17063 t := v.Type
17064 n := v_0
17065 if v_1.Op != OpConst32 {
17066 break
17067 }
17068 c := auxIntToInt32(v_1.AuxInt)
17069 if !(isUnsignedPowerOfTwo(uint32(c))) {
17070 break
17071 }
17072 v.reset(OpAnd32)
17073 v0 := b.NewValue0(v.Pos, OpConst32, t)
17074 v0.AuxInt = int32ToAuxInt(c - 1)
17075 v.AddArg2(n, v0)
17076 return true
17077 }
17078
17079
17080
17081 for {
17082 t := v.Type
17083 x := v_0
17084 if v_1.Op != OpConst32 {
17085 break
17086 }
17087 c := auxIntToInt32(v_1.AuxInt)
17088 if !(x.Op != OpConst32 && c > 0 && umagicOK32(c)) {
17089 break
17090 }
17091 v.reset(OpSub32)
17092 v0 := b.NewValue0(v.Pos, OpMul32, t)
17093 v1 := b.NewValue0(v.Pos, OpDiv32u, t)
17094 v2 := b.NewValue0(v.Pos, OpConst32, t)
17095 v2.AuxInt = int32ToAuxInt(c)
17096 v1.AddArg2(x, v2)
17097 v0.AddArg2(v1, v2)
17098 v.AddArg2(x, v0)
17099 return true
17100 }
17101 return false
17102 }
17103 func rewriteValuegeneric_OpMod64(v *Value) bool {
17104 v_1 := v.Args[1]
17105 v_0 := v.Args[0]
17106 b := v.Block
17107
17108
17109
17110 for {
17111 if v_0.Op != OpConst64 {
17112 break
17113 }
17114 c := auxIntToInt64(v_0.AuxInt)
17115 if v_1.Op != OpConst64 {
17116 break
17117 }
17118 d := auxIntToInt64(v_1.AuxInt)
17119 if !(d != 0) {
17120 break
17121 }
17122 v.reset(OpConst64)
17123 v.AuxInt = int64ToAuxInt(c % d)
17124 return true
17125 }
17126
17127
17128
17129 for {
17130 t := v.Type
17131 n := v_0
17132 if v_1.Op != OpConst64 {
17133 break
17134 }
17135 c := auxIntToInt64(v_1.AuxInt)
17136 if !(isNonNegative(n) && isPowerOfTwo(c)) {
17137 break
17138 }
17139 v.reset(OpAnd64)
17140 v0 := b.NewValue0(v.Pos, OpConst64, t)
17141 v0.AuxInt = int64ToAuxInt(c - 1)
17142 v.AddArg2(n, v0)
17143 return true
17144 }
17145
17146
17147
17148 for {
17149 n := v_0
17150 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != -1<<63 || !(isNonNegative(n)) {
17151 break
17152 }
17153 v.copyOf(n)
17154 return true
17155 }
17156
17157
17158
17159 for {
17160 t := v.Type
17161 n := v_0
17162 if v_1.Op != OpConst64 {
17163 break
17164 }
17165 c := auxIntToInt64(v_1.AuxInt)
17166 if !(c < 0 && c != -1<<63) {
17167 break
17168 }
17169 v.reset(OpMod64)
17170 v.Type = t
17171 v0 := b.NewValue0(v.Pos, OpConst64, t)
17172 v0.AuxInt = int64ToAuxInt(-c)
17173 v.AddArg2(n, v0)
17174 return true
17175 }
17176
17177
17178
17179 for {
17180 t := v.Type
17181 x := v_0
17182 if v_1.Op != OpConst64 {
17183 break
17184 }
17185 c := auxIntToInt64(v_1.AuxInt)
17186 if !(x.Op != OpConst64 && (c > 0 || c == -1<<63)) {
17187 break
17188 }
17189 v.reset(OpSub64)
17190 v0 := b.NewValue0(v.Pos, OpMul64, t)
17191 v1 := b.NewValue0(v.Pos, OpDiv64, t)
17192 v2 := b.NewValue0(v.Pos, OpConst64, t)
17193 v2.AuxInt = int64ToAuxInt(c)
17194 v1.AddArg2(x, v2)
17195 v0.AddArg2(v1, v2)
17196 v.AddArg2(x, v0)
17197 return true
17198 }
17199 return false
17200 }
17201 func rewriteValuegeneric_OpMod64u(v *Value) bool {
17202 v_1 := v.Args[1]
17203 v_0 := v.Args[0]
17204 b := v.Block
17205
17206
17207
17208 for {
17209 if v_0.Op != OpConst64 {
17210 break
17211 }
17212 c := auxIntToInt64(v_0.AuxInt)
17213 if v_1.Op != OpConst64 {
17214 break
17215 }
17216 d := auxIntToInt64(v_1.AuxInt)
17217 if !(d != 0) {
17218 break
17219 }
17220 v.reset(OpConst64)
17221 v.AuxInt = int64ToAuxInt(int64(uint64(c) % uint64(d)))
17222 return true
17223 }
17224
17225
17226
17227 for {
17228 t := v.Type
17229 n := v_0
17230 if v_1.Op != OpConst64 {
17231 break
17232 }
17233 c := auxIntToInt64(v_1.AuxInt)
17234 if !(isUnsignedPowerOfTwo(uint64(c))) {
17235 break
17236 }
17237 v.reset(OpAnd64)
17238 v0 := b.NewValue0(v.Pos, OpConst64, t)
17239 v0.AuxInt = int64ToAuxInt(c - 1)
17240 v.AddArg2(n, v0)
17241 return true
17242 }
17243
17244
17245
17246 for {
17247 t := v.Type
17248 x := v_0
17249 if v_1.Op != OpConst64 {
17250 break
17251 }
17252 c := auxIntToInt64(v_1.AuxInt)
17253 if !(x.Op != OpConst64 && c > 0 && umagicOK64(c)) {
17254 break
17255 }
17256 v.reset(OpSub64)
17257 v0 := b.NewValue0(v.Pos, OpMul64, t)
17258 v1 := b.NewValue0(v.Pos, OpDiv64u, t)
17259 v2 := b.NewValue0(v.Pos, OpConst64, t)
17260 v2.AuxInt = int64ToAuxInt(c)
17261 v1.AddArg2(x, v2)
17262 v0.AddArg2(v1, v2)
17263 v.AddArg2(x, v0)
17264 return true
17265 }
17266 return false
17267 }
17268 func rewriteValuegeneric_OpMod8(v *Value) bool {
17269 v_1 := v.Args[1]
17270 v_0 := v.Args[0]
17271 b := v.Block
17272
17273
17274
17275 for {
17276 if v_0.Op != OpConst8 {
17277 break
17278 }
17279 c := auxIntToInt8(v_0.AuxInt)
17280 if v_1.Op != OpConst8 {
17281 break
17282 }
17283 d := auxIntToInt8(v_1.AuxInt)
17284 if !(d != 0) {
17285 break
17286 }
17287 v.reset(OpConst8)
17288 v.AuxInt = int8ToAuxInt(c % d)
17289 return true
17290 }
17291
17292
17293
17294 for {
17295 t := v.Type
17296 n := v_0
17297 if v_1.Op != OpConst8 {
17298 break
17299 }
17300 c := auxIntToInt8(v_1.AuxInt)
17301 if !(isNonNegative(n) && isPowerOfTwo(c)) {
17302 break
17303 }
17304 v.reset(OpAnd8)
17305 v0 := b.NewValue0(v.Pos, OpConst8, t)
17306 v0.AuxInt = int8ToAuxInt(c - 1)
17307 v.AddArg2(n, v0)
17308 return true
17309 }
17310
17311
17312
17313 for {
17314 t := v.Type
17315 n := v_0
17316 if v_1.Op != OpConst8 {
17317 break
17318 }
17319 c := auxIntToInt8(v_1.AuxInt)
17320 if !(c < 0 && c != -1<<7) {
17321 break
17322 }
17323 v.reset(OpMod8)
17324 v.Type = t
17325 v0 := b.NewValue0(v.Pos, OpConst8, t)
17326 v0.AuxInt = int8ToAuxInt(-c)
17327 v.AddArg2(n, v0)
17328 return true
17329 }
17330
17331
17332
17333 for {
17334 t := v.Type
17335 x := v_0
17336 if v_1.Op != OpConst8 {
17337 break
17338 }
17339 c := auxIntToInt8(v_1.AuxInt)
17340 if !(x.Op != OpConst8 && (c > 0 || c == -1<<7)) {
17341 break
17342 }
17343 v.reset(OpSub8)
17344 v0 := b.NewValue0(v.Pos, OpMul8, t)
17345 v1 := b.NewValue0(v.Pos, OpDiv8, t)
17346 v2 := b.NewValue0(v.Pos, OpConst8, t)
17347 v2.AuxInt = int8ToAuxInt(c)
17348 v1.AddArg2(x, v2)
17349 v0.AddArg2(v1, v2)
17350 v.AddArg2(x, v0)
17351 return true
17352 }
17353 return false
17354 }
17355 func rewriteValuegeneric_OpMod8u(v *Value) bool {
17356 v_1 := v.Args[1]
17357 v_0 := v.Args[0]
17358 b := v.Block
17359
17360
17361
17362 for {
17363 if v_0.Op != OpConst8 {
17364 break
17365 }
17366 c := auxIntToInt8(v_0.AuxInt)
17367 if v_1.Op != OpConst8 {
17368 break
17369 }
17370 d := auxIntToInt8(v_1.AuxInt)
17371 if !(d != 0) {
17372 break
17373 }
17374 v.reset(OpConst8)
17375 v.AuxInt = int8ToAuxInt(int8(uint8(c) % uint8(d)))
17376 return true
17377 }
17378
17379
17380
17381 for {
17382 t := v.Type
17383 n := v_0
17384 if v_1.Op != OpConst8 {
17385 break
17386 }
17387 c := auxIntToInt8(v_1.AuxInt)
17388 if !(isUnsignedPowerOfTwo(uint8(c))) {
17389 break
17390 }
17391 v.reset(OpAnd8)
17392 v0 := b.NewValue0(v.Pos, OpConst8, t)
17393 v0.AuxInt = int8ToAuxInt(c - 1)
17394 v.AddArg2(n, v0)
17395 return true
17396 }
17397
17398
17399
17400 for {
17401 t := v.Type
17402 x := v_0
17403 if v_1.Op != OpConst8 {
17404 break
17405 }
17406 c := auxIntToInt8(v_1.AuxInt)
17407 if !(x.Op != OpConst8 && c > 0 && umagicOK8(c)) {
17408 break
17409 }
17410 v.reset(OpSub8)
17411 v0 := b.NewValue0(v.Pos, OpMul8, t)
17412 v1 := b.NewValue0(v.Pos, OpDiv8u, t)
17413 v2 := b.NewValue0(v.Pos, OpConst8, t)
17414 v2.AuxInt = int8ToAuxInt(c)
17415 v1.AddArg2(x, v2)
17416 v0.AddArg2(v1, v2)
17417 v.AddArg2(x, v0)
17418 return true
17419 }
17420 return false
17421 }
17422 func rewriteValuegeneric_OpMove(v *Value) bool {
17423 v_2 := v.Args[2]
17424 v_1 := v.Args[1]
17425 v_0 := v.Args[0]
17426 b := v.Block
17427 config := b.Func.Config
17428
17429
17430
17431 for {
17432 n := auxIntToInt64(v.AuxInt)
17433 t := auxToType(v.Aux)
17434 dst1 := v_0
17435 src := v_1
17436 mem := v_2
17437 if mem.Op != OpZero || auxIntToInt64(mem.AuxInt) != n || auxToType(mem.Aux) != t {
17438 break
17439 }
17440 dst2 := mem.Args[0]
17441 if !(isSamePtr(src, dst2)) {
17442 break
17443 }
17444 v.reset(OpZero)
17445 v.AuxInt = int64ToAuxInt(n)
17446 v.Aux = typeToAux(t)
17447 v.AddArg2(dst1, mem)
17448 return true
17449 }
17450
17451
17452
17453 for {
17454 n := auxIntToInt64(v.AuxInt)
17455 t := auxToType(v.Aux)
17456 dst1 := v_0
17457 src := v_1
17458 mem := v_2
17459 if mem.Op != OpVarDef {
17460 break
17461 }
17462 mem_0 := mem.Args[0]
17463 if mem_0.Op != OpZero || auxIntToInt64(mem_0.AuxInt) != n || auxToType(mem_0.Aux) != t {
17464 break
17465 }
17466 dst0 := mem_0.Args[0]
17467 if !(isSamePtr(src, dst0)) {
17468 break
17469 }
17470 v.reset(OpZero)
17471 v.AuxInt = int64ToAuxInt(n)
17472 v.Aux = typeToAux(t)
17473 v.AddArg2(dst1, mem)
17474 return true
17475 }
17476
17477
17478
17479 for {
17480 n := auxIntToInt64(v.AuxInt)
17481 t := auxToType(v.Aux)
17482 dst := v_0
17483 if v_1.Op != OpAddr {
17484 break
17485 }
17486 sym := auxToSym(v_1.Aux)
17487 v_1_0 := v_1.Args[0]
17488 if v_1_0.Op != OpSB {
17489 break
17490 }
17491 mem := v_2
17492 if !(symIsROZero(sym)) {
17493 break
17494 }
17495 v.reset(OpZero)
17496 v.AuxInt = int64ToAuxInt(n)
17497 v.Aux = typeToAux(t)
17498 v.AddArg2(dst, mem)
17499 return true
17500 }
17501
17502
17503
17504 for {
17505 n := auxIntToInt64(v.AuxInt)
17506 t1 := auxToType(v.Aux)
17507 dst1 := v_0
17508 src1 := v_1
17509 store := v_2
17510 if store.Op != OpStore {
17511 break
17512 }
17513 t2 := auxToType(store.Aux)
17514 mem := store.Args[2]
17515 op := store.Args[0]
17516 if op.Op != OpOffPtr {
17517 break
17518 }
17519 o2 := auxIntToInt64(op.AuxInt)
17520 dst2 := op.Args[0]
17521 if !(isSamePtr(dst1, dst2) && store.Uses == 1 && n >= o2+t2.Size() && disjoint(src1, n, op, t2.Size()) && clobber(store)) {
17522 break
17523 }
17524 v.reset(OpMove)
17525 v.AuxInt = int64ToAuxInt(n)
17526 v.Aux = typeToAux(t1)
17527 v.AddArg3(dst1, src1, mem)
17528 return true
17529 }
17530
17531
17532
17533 for {
17534 n := auxIntToInt64(v.AuxInt)
17535 t := auxToType(v.Aux)
17536 dst1 := v_0
17537 src1 := v_1
17538 move := v_2
17539 if move.Op != OpMove || auxIntToInt64(move.AuxInt) != n || auxToType(move.Aux) != t {
17540 break
17541 }
17542 mem := move.Args[2]
17543 dst2 := move.Args[0]
17544 if !(move.Uses == 1 && isSamePtr(dst1, dst2) && disjoint(src1, n, dst2, n) && clobber(move)) {
17545 break
17546 }
17547 v.reset(OpMove)
17548 v.AuxInt = int64ToAuxInt(n)
17549 v.Aux = typeToAux(t)
17550 v.AddArg3(dst1, src1, mem)
17551 return true
17552 }
17553
17554
17555
17556 for {
17557 n := auxIntToInt64(v.AuxInt)
17558 t := auxToType(v.Aux)
17559 dst1 := v_0
17560 src1 := v_1
17561 vardef := v_2
17562 if vardef.Op != OpVarDef {
17563 break
17564 }
17565 x := auxToSym(vardef.Aux)
17566 move := vardef.Args[0]
17567 if move.Op != OpMove || auxIntToInt64(move.AuxInt) != n || auxToType(move.Aux) != t {
17568 break
17569 }
17570 mem := move.Args[2]
17571 dst2 := move.Args[0]
17572 if !(move.Uses == 1 && vardef.Uses == 1 && isSamePtr(dst1, dst2) && disjoint(src1, n, dst2, n) && clobber(move, vardef)) {
17573 break
17574 }
17575 v.reset(OpMove)
17576 v.AuxInt = int64ToAuxInt(n)
17577 v.Aux = typeToAux(t)
17578 v0 := b.NewValue0(v.Pos, OpVarDef, types.TypeMem)
17579 v0.Aux = symToAux(x)
17580 v0.AddArg(mem)
17581 v.AddArg3(dst1, src1, v0)
17582 return true
17583 }
17584
17585
17586
17587 for {
17588 n := auxIntToInt64(v.AuxInt)
17589 t := auxToType(v.Aux)
17590 dst1 := v_0
17591 src1 := v_1
17592 zero := v_2
17593 if zero.Op != OpZero || auxIntToInt64(zero.AuxInt) != n || auxToType(zero.Aux) != t {
17594 break
17595 }
17596 mem := zero.Args[1]
17597 dst2 := zero.Args[0]
17598 if !(zero.Uses == 1 && isSamePtr(dst1, dst2) && disjoint(src1, n, dst2, n) && clobber(zero)) {
17599 break
17600 }
17601 v.reset(OpMove)
17602 v.AuxInt = int64ToAuxInt(n)
17603 v.Aux = typeToAux(t)
17604 v.AddArg3(dst1, src1, mem)
17605 return true
17606 }
17607
17608
17609
17610 for {
17611 n := auxIntToInt64(v.AuxInt)
17612 t := auxToType(v.Aux)
17613 dst1 := v_0
17614 src1 := v_1
17615 vardef := v_2
17616 if vardef.Op != OpVarDef {
17617 break
17618 }
17619 x := auxToSym(vardef.Aux)
17620 zero := vardef.Args[0]
17621 if zero.Op != OpZero || auxIntToInt64(zero.AuxInt) != n || auxToType(zero.Aux) != t {
17622 break
17623 }
17624 mem := zero.Args[1]
17625 dst2 := zero.Args[0]
17626 if !(zero.Uses == 1 && vardef.Uses == 1 && isSamePtr(dst1, dst2) && disjoint(src1, n, dst2, n) && clobber(zero, vardef)) {
17627 break
17628 }
17629 v.reset(OpMove)
17630 v.AuxInt = int64ToAuxInt(n)
17631 v.Aux = typeToAux(t)
17632 v0 := b.NewValue0(v.Pos, OpVarDef, types.TypeMem)
17633 v0.Aux = symToAux(x)
17634 v0.AddArg(mem)
17635 v.AddArg3(dst1, src1, v0)
17636 return true
17637 }
17638
17639
17640
17641 for {
17642 n := auxIntToInt64(v.AuxInt)
17643 t1 := auxToType(v.Aux)
17644 dst := v_0
17645 p1 := v_1
17646 mem := v_2
17647 if mem.Op != OpStore {
17648 break
17649 }
17650 t2 := auxToType(mem.Aux)
17651 _ = mem.Args[2]
17652 op2 := mem.Args[0]
17653 if op2.Op != OpOffPtr {
17654 break
17655 }
17656 tt2 := op2.Type
17657 o2 := auxIntToInt64(op2.AuxInt)
17658 p2 := op2.Args[0]
17659 d1 := mem.Args[1]
17660 mem_2 := mem.Args[2]
17661 if mem_2.Op != OpStore {
17662 break
17663 }
17664 t3 := auxToType(mem_2.Aux)
17665 d2 := mem_2.Args[1]
17666 op3 := mem_2.Args[0]
17667 if op3.Op != OpOffPtr {
17668 break
17669 }
17670 tt3 := op3.Type
17671 if auxIntToInt64(op3.AuxInt) != 0 {
17672 break
17673 }
17674 p3 := op3.Args[0]
17675 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()) {
17676 break
17677 }
17678 v.reset(OpStore)
17679 v.Aux = typeToAux(t2)
17680 v0 := b.NewValue0(v.Pos, OpOffPtr, tt2)
17681 v0.AuxInt = int64ToAuxInt(o2)
17682 v0.AddArg(dst)
17683 v1 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
17684 v1.Aux = typeToAux(t3)
17685 v2 := b.NewValue0(v.Pos, OpOffPtr, tt3)
17686 v2.AuxInt = int64ToAuxInt(0)
17687 v2.AddArg(dst)
17688 v1.AddArg3(v2, d2, mem)
17689 v.AddArg3(v0, d1, v1)
17690 return true
17691 }
17692
17693
17694
17695 for {
17696 n := auxIntToInt64(v.AuxInt)
17697 t1 := auxToType(v.Aux)
17698 dst := v_0
17699 p1 := v_1
17700 mem := v_2
17701 if mem.Op != OpStore {
17702 break
17703 }
17704 t2 := auxToType(mem.Aux)
17705 _ = mem.Args[2]
17706 op2 := mem.Args[0]
17707 if op2.Op != OpOffPtr {
17708 break
17709 }
17710 tt2 := op2.Type
17711 o2 := auxIntToInt64(op2.AuxInt)
17712 p2 := op2.Args[0]
17713 d1 := mem.Args[1]
17714 mem_2 := mem.Args[2]
17715 if mem_2.Op != OpStore {
17716 break
17717 }
17718 t3 := auxToType(mem_2.Aux)
17719 _ = mem_2.Args[2]
17720 op3 := mem_2.Args[0]
17721 if op3.Op != OpOffPtr {
17722 break
17723 }
17724 tt3 := op3.Type
17725 o3 := auxIntToInt64(op3.AuxInt)
17726 p3 := op3.Args[0]
17727 d2 := mem_2.Args[1]
17728 mem_2_2 := mem_2.Args[2]
17729 if mem_2_2.Op != OpStore {
17730 break
17731 }
17732 t4 := auxToType(mem_2_2.Aux)
17733 d3 := mem_2_2.Args[1]
17734 op4 := mem_2_2.Args[0]
17735 if op4.Op != OpOffPtr {
17736 break
17737 }
17738 tt4 := op4.Type
17739 if auxIntToInt64(op4.AuxInt) != 0 {
17740 break
17741 }
17742 p4 := op4.Args[0]
17743 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()) {
17744 break
17745 }
17746 v.reset(OpStore)
17747 v.Aux = typeToAux(t2)
17748 v0 := b.NewValue0(v.Pos, OpOffPtr, tt2)
17749 v0.AuxInt = int64ToAuxInt(o2)
17750 v0.AddArg(dst)
17751 v1 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
17752 v1.Aux = typeToAux(t3)
17753 v2 := b.NewValue0(v.Pos, OpOffPtr, tt3)
17754 v2.AuxInt = int64ToAuxInt(o3)
17755 v2.AddArg(dst)
17756 v3 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
17757 v3.Aux = typeToAux(t4)
17758 v4 := b.NewValue0(v.Pos, OpOffPtr, tt4)
17759 v4.AuxInt = int64ToAuxInt(0)
17760 v4.AddArg(dst)
17761 v3.AddArg3(v4, d3, mem)
17762 v1.AddArg3(v2, d2, v3)
17763 v.AddArg3(v0, d1, v1)
17764 return true
17765 }
17766
17767
17768
17769 for {
17770 n := auxIntToInt64(v.AuxInt)
17771 t1 := auxToType(v.Aux)
17772 dst := v_0
17773 p1 := v_1
17774 mem := v_2
17775 if mem.Op != OpStore {
17776 break
17777 }
17778 t2 := auxToType(mem.Aux)
17779 _ = mem.Args[2]
17780 op2 := mem.Args[0]
17781 if op2.Op != OpOffPtr {
17782 break
17783 }
17784 tt2 := op2.Type
17785 o2 := auxIntToInt64(op2.AuxInt)
17786 p2 := op2.Args[0]
17787 d1 := mem.Args[1]
17788 mem_2 := mem.Args[2]
17789 if mem_2.Op != OpStore {
17790 break
17791 }
17792 t3 := auxToType(mem_2.Aux)
17793 _ = mem_2.Args[2]
17794 op3 := mem_2.Args[0]
17795 if op3.Op != OpOffPtr {
17796 break
17797 }
17798 tt3 := op3.Type
17799 o3 := auxIntToInt64(op3.AuxInt)
17800 p3 := op3.Args[0]
17801 d2 := mem_2.Args[1]
17802 mem_2_2 := mem_2.Args[2]
17803 if mem_2_2.Op != OpStore {
17804 break
17805 }
17806 t4 := auxToType(mem_2_2.Aux)
17807 _ = mem_2_2.Args[2]
17808 op4 := mem_2_2.Args[0]
17809 if op4.Op != OpOffPtr {
17810 break
17811 }
17812 tt4 := op4.Type
17813 o4 := auxIntToInt64(op4.AuxInt)
17814 p4 := op4.Args[0]
17815 d3 := mem_2_2.Args[1]
17816 mem_2_2_2 := mem_2_2.Args[2]
17817 if mem_2_2_2.Op != OpStore {
17818 break
17819 }
17820 t5 := auxToType(mem_2_2_2.Aux)
17821 d4 := mem_2_2_2.Args[1]
17822 op5 := mem_2_2_2.Args[0]
17823 if op5.Op != OpOffPtr {
17824 break
17825 }
17826 tt5 := op5.Type
17827 if auxIntToInt64(op5.AuxInt) != 0 {
17828 break
17829 }
17830 p5 := op5.Args[0]
17831 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()) {
17832 break
17833 }
17834 v.reset(OpStore)
17835 v.Aux = typeToAux(t2)
17836 v0 := b.NewValue0(v.Pos, OpOffPtr, tt2)
17837 v0.AuxInt = int64ToAuxInt(o2)
17838 v0.AddArg(dst)
17839 v1 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
17840 v1.Aux = typeToAux(t3)
17841 v2 := b.NewValue0(v.Pos, OpOffPtr, tt3)
17842 v2.AuxInt = int64ToAuxInt(o3)
17843 v2.AddArg(dst)
17844 v3 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
17845 v3.Aux = typeToAux(t4)
17846 v4 := b.NewValue0(v.Pos, OpOffPtr, tt4)
17847 v4.AuxInt = int64ToAuxInt(o4)
17848 v4.AddArg(dst)
17849 v5 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
17850 v5.Aux = typeToAux(t5)
17851 v6 := b.NewValue0(v.Pos, OpOffPtr, tt5)
17852 v6.AuxInt = int64ToAuxInt(0)
17853 v6.AddArg(dst)
17854 v5.AddArg3(v6, d4, mem)
17855 v3.AddArg3(v4, d3, v5)
17856 v1.AddArg3(v2, d2, v3)
17857 v.AddArg3(v0, d1, v1)
17858 return true
17859 }
17860
17861
17862
17863 for {
17864 n := auxIntToInt64(v.AuxInt)
17865 t1 := auxToType(v.Aux)
17866 dst := v_0
17867 p1 := v_1
17868 mem := v_2
17869 if mem.Op != OpVarDef {
17870 break
17871 }
17872 mem_0 := mem.Args[0]
17873 if mem_0.Op != OpStore {
17874 break
17875 }
17876 t2 := auxToType(mem_0.Aux)
17877 _ = mem_0.Args[2]
17878 op2 := mem_0.Args[0]
17879 if op2.Op != OpOffPtr {
17880 break
17881 }
17882 tt2 := op2.Type
17883 o2 := auxIntToInt64(op2.AuxInt)
17884 p2 := op2.Args[0]
17885 d1 := mem_0.Args[1]
17886 mem_0_2 := mem_0.Args[2]
17887 if mem_0_2.Op != OpStore {
17888 break
17889 }
17890 t3 := auxToType(mem_0_2.Aux)
17891 d2 := mem_0_2.Args[1]
17892 op3 := mem_0_2.Args[0]
17893 if op3.Op != OpOffPtr {
17894 break
17895 }
17896 tt3 := op3.Type
17897 if auxIntToInt64(op3.AuxInt) != 0 {
17898 break
17899 }
17900 p3 := op3.Args[0]
17901 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()) {
17902 break
17903 }
17904 v.reset(OpStore)
17905 v.Aux = typeToAux(t2)
17906 v0 := b.NewValue0(v.Pos, OpOffPtr, tt2)
17907 v0.AuxInt = int64ToAuxInt(o2)
17908 v0.AddArg(dst)
17909 v1 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
17910 v1.Aux = typeToAux(t3)
17911 v2 := b.NewValue0(v.Pos, OpOffPtr, tt3)
17912 v2.AuxInt = int64ToAuxInt(0)
17913 v2.AddArg(dst)
17914 v1.AddArg3(v2, d2, mem)
17915 v.AddArg3(v0, d1, v1)
17916 return true
17917 }
17918
17919
17920
17921 for {
17922 n := auxIntToInt64(v.AuxInt)
17923 t1 := auxToType(v.Aux)
17924 dst := v_0
17925 p1 := v_1
17926 mem := v_2
17927 if mem.Op != OpVarDef {
17928 break
17929 }
17930 mem_0 := mem.Args[0]
17931 if mem_0.Op != OpStore {
17932 break
17933 }
17934 t2 := auxToType(mem_0.Aux)
17935 _ = mem_0.Args[2]
17936 op2 := mem_0.Args[0]
17937 if op2.Op != OpOffPtr {
17938 break
17939 }
17940 tt2 := op2.Type
17941 o2 := auxIntToInt64(op2.AuxInt)
17942 p2 := op2.Args[0]
17943 d1 := mem_0.Args[1]
17944 mem_0_2 := mem_0.Args[2]
17945 if mem_0_2.Op != OpStore {
17946 break
17947 }
17948 t3 := auxToType(mem_0_2.Aux)
17949 _ = mem_0_2.Args[2]
17950 op3 := mem_0_2.Args[0]
17951 if op3.Op != OpOffPtr {
17952 break
17953 }
17954 tt3 := op3.Type
17955 o3 := auxIntToInt64(op3.AuxInt)
17956 p3 := op3.Args[0]
17957 d2 := mem_0_2.Args[1]
17958 mem_0_2_2 := mem_0_2.Args[2]
17959 if mem_0_2_2.Op != OpStore {
17960 break
17961 }
17962 t4 := auxToType(mem_0_2_2.Aux)
17963 d3 := mem_0_2_2.Args[1]
17964 op4 := mem_0_2_2.Args[0]
17965 if op4.Op != OpOffPtr {
17966 break
17967 }
17968 tt4 := op4.Type
17969 if auxIntToInt64(op4.AuxInt) != 0 {
17970 break
17971 }
17972 p4 := op4.Args[0]
17973 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()) {
17974 break
17975 }
17976 v.reset(OpStore)
17977 v.Aux = typeToAux(t2)
17978 v0 := b.NewValue0(v.Pos, OpOffPtr, tt2)
17979 v0.AuxInt = int64ToAuxInt(o2)
17980 v0.AddArg(dst)
17981 v1 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
17982 v1.Aux = typeToAux(t3)
17983 v2 := b.NewValue0(v.Pos, OpOffPtr, tt3)
17984 v2.AuxInt = int64ToAuxInt(o3)
17985 v2.AddArg(dst)
17986 v3 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
17987 v3.Aux = typeToAux(t4)
17988 v4 := b.NewValue0(v.Pos, OpOffPtr, tt4)
17989 v4.AuxInt = int64ToAuxInt(0)
17990 v4.AddArg(dst)
17991 v3.AddArg3(v4, d3, mem)
17992 v1.AddArg3(v2, d2, v3)
17993 v.AddArg3(v0, d1, v1)
17994 return true
17995 }
17996
17997
17998
17999 for {
18000 n := auxIntToInt64(v.AuxInt)
18001 t1 := auxToType(v.Aux)
18002 dst := v_0
18003 p1 := v_1
18004 mem := v_2
18005 if mem.Op != OpVarDef {
18006 break
18007 }
18008 mem_0 := mem.Args[0]
18009 if mem_0.Op != OpStore {
18010 break
18011 }
18012 t2 := auxToType(mem_0.Aux)
18013 _ = mem_0.Args[2]
18014 op2 := mem_0.Args[0]
18015 if op2.Op != OpOffPtr {
18016 break
18017 }
18018 tt2 := op2.Type
18019 o2 := auxIntToInt64(op2.AuxInt)
18020 p2 := op2.Args[0]
18021 d1 := mem_0.Args[1]
18022 mem_0_2 := mem_0.Args[2]
18023 if mem_0_2.Op != OpStore {
18024 break
18025 }
18026 t3 := auxToType(mem_0_2.Aux)
18027 _ = mem_0_2.Args[2]
18028 op3 := mem_0_2.Args[0]
18029 if op3.Op != OpOffPtr {
18030 break
18031 }
18032 tt3 := op3.Type
18033 o3 := auxIntToInt64(op3.AuxInt)
18034 p3 := op3.Args[0]
18035 d2 := mem_0_2.Args[1]
18036 mem_0_2_2 := mem_0_2.Args[2]
18037 if mem_0_2_2.Op != OpStore {
18038 break
18039 }
18040 t4 := auxToType(mem_0_2_2.Aux)
18041 _ = mem_0_2_2.Args[2]
18042 op4 := mem_0_2_2.Args[0]
18043 if op4.Op != OpOffPtr {
18044 break
18045 }
18046 tt4 := op4.Type
18047 o4 := auxIntToInt64(op4.AuxInt)
18048 p4 := op4.Args[0]
18049 d3 := mem_0_2_2.Args[1]
18050 mem_0_2_2_2 := mem_0_2_2.Args[2]
18051 if mem_0_2_2_2.Op != OpStore {
18052 break
18053 }
18054 t5 := auxToType(mem_0_2_2_2.Aux)
18055 d4 := mem_0_2_2_2.Args[1]
18056 op5 := mem_0_2_2_2.Args[0]
18057 if op5.Op != OpOffPtr {
18058 break
18059 }
18060 tt5 := op5.Type
18061 if auxIntToInt64(op5.AuxInt) != 0 {
18062 break
18063 }
18064 p5 := op5.Args[0]
18065 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()) {
18066 break
18067 }
18068 v.reset(OpStore)
18069 v.Aux = typeToAux(t2)
18070 v0 := b.NewValue0(v.Pos, OpOffPtr, tt2)
18071 v0.AuxInt = int64ToAuxInt(o2)
18072 v0.AddArg(dst)
18073 v1 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
18074 v1.Aux = typeToAux(t3)
18075 v2 := b.NewValue0(v.Pos, OpOffPtr, tt3)
18076 v2.AuxInt = int64ToAuxInt(o3)
18077 v2.AddArg(dst)
18078 v3 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
18079 v3.Aux = typeToAux(t4)
18080 v4 := b.NewValue0(v.Pos, OpOffPtr, tt4)
18081 v4.AuxInt = int64ToAuxInt(o4)
18082 v4.AddArg(dst)
18083 v5 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
18084 v5.Aux = typeToAux(t5)
18085 v6 := b.NewValue0(v.Pos, OpOffPtr, tt5)
18086 v6.AuxInt = int64ToAuxInt(0)
18087 v6.AddArg(dst)
18088 v5.AddArg3(v6, d4, mem)
18089 v3.AddArg3(v4, d3, v5)
18090 v1.AddArg3(v2, d2, v3)
18091 v.AddArg3(v0, d1, v1)
18092 return true
18093 }
18094
18095
18096
18097 for {
18098 n := auxIntToInt64(v.AuxInt)
18099 t1 := auxToType(v.Aux)
18100 dst := v_0
18101 p1 := v_1
18102 mem := v_2
18103 if mem.Op != OpStore {
18104 break
18105 }
18106 t2 := auxToType(mem.Aux)
18107 _ = mem.Args[2]
18108 op2 := mem.Args[0]
18109 if op2.Op != OpOffPtr {
18110 break
18111 }
18112 tt2 := op2.Type
18113 o2 := auxIntToInt64(op2.AuxInt)
18114 p2 := op2.Args[0]
18115 d1 := mem.Args[1]
18116 mem_2 := mem.Args[2]
18117 if mem_2.Op != OpZero || auxIntToInt64(mem_2.AuxInt) != n {
18118 break
18119 }
18120 t3 := auxToType(mem_2.Aux)
18121 p3 := mem_2.Args[0]
18122 if !(isSamePtr(p1, p2) && isSamePtr(p2, p3) && t2.Alignment() <= t1.Alignment() && t3.Alignment() <= t1.Alignment() && registerizable(b, t2) && n >= o2+t2.Size()) {
18123 break
18124 }
18125 v.reset(OpStore)
18126 v.Aux = typeToAux(t2)
18127 v0 := b.NewValue0(v.Pos, OpOffPtr, tt2)
18128 v0.AuxInt = int64ToAuxInt(o2)
18129 v0.AddArg(dst)
18130 v1 := b.NewValue0(v.Pos, OpZero, types.TypeMem)
18131 v1.AuxInt = int64ToAuxInt(n)
18132 v1.Aux = typeToAux(t1)
18133 v1.AddArg2(dst, mem)
18134 v.AddArg3(v0, d1, v1)
18135 return true
18136 }
18137
18138
18139
18140 for {
18141 n := auxIntToInt64(v.AuxInt)
18142 t1 := auxToType(v.Aux)
18143 dst := v_0
18144 p1 := v_1
18145 mem := v_2
18146 if mem.Op != OpStore {
18147 break
18148 }
18149 t2 := auxToType(mem.Aux)
18150 _ = mem.Args[2]
18151 mem_0 := mem.Args[0]
18152 if mem_0.Op != OpOffPtr {
18153 break
18154 }
18155 tt2 := mem_0.Type
18156 o2 := auxIntToInt64(mem_0.AuxInt)
18157 p2 := mem_0.Args[0]
18158 d1 := mem.Args[1]
18159 mem_2 := mem.Args[2]
18160 if mem_2.Op != OpStore {
18161 break
18162 }
18163 t3 := auxToType(mem_2.Aux)
18164 _ = mem_2.Args[2]
18165 mem_2_0 := mem_2.Args[0]
18166 if mem_2_0.Op != OpOffPtr {
18167 break
18168 }
18169 tt3 := mem_2_0.Type
18170 o3 := auxIntToInt64(mem_2_0.AuxInt)
18171 p3 := mem_2_0.Args[0]
18172 d2 := mem_2.Args[1]
18173 mem_2_2 := mem_2.Args[2]
18174 if mem_2_2.Op != OpZero || auxIntToInt64(mem_2_2.AuxInt) != n {
18175 break
18176 }
18177 t4 := auxToType(mem_2_2.Aux)
18178 p4 := mem_2_2.Args[0]
18179 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()) {
18180 break
18181 }
18182 v.reset(OpStore)
18183 v.Aux = typeToAux(t2)
18184 v0 := b.NewValue0(v.Pos, OpOffPtr, tt2)
18185 v0.AuxInt = int64ToAuxInt(o2)
18186 v0.AddArg(dst)
18187 v1 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
18188 v1.Aux = typeToAux(t3)
18189 v2 := b.NewValue0(v.Pos, OpOffPtr, tt3)
18190 v2.AuxInt = int64ToAuxInt(o3)
18191 v2.AddArg(dst)
18192 v3 := b.NewValue0(v.Pos, OpZero, types.TypeMem)
18193 v3.AuxInt = int64ToAuxInt(n)
18194 v3.Aux = typeToAux(t1)
18195 v3.AddArg2(dst, mem)
18196 v1.AddArg3(v2, d2, v3)
18197 v.AddArg3(v0, d1, v1)
18198 return true
18199 }
18200
18201
18202
18203 for {
18204 n := auxIntToInt64(v.AuxInt)
18205 t1 := auxToType(v.Aux)
18206 dst := v_0
18207 p1 := v_1
18208 mem := v_2
18209 if mem.Op != OpStore {
18210 break
18211 }
18212 t2 := auxToType(mem.Aux)
18213 _ = mem.Args[2]
18214 mem_0 := mem.Args[0]
18215 if mem_0.Op != OpOffPtr {
18216 break
18217 }
18218 tt2 := mem_0.Type
18219 o2 := auxIntToInt64(mem_0.AuxInt)
18220 p2 := mem_0.Args[0]
18221 d1 := mem.Args[1]
18222 mem_2 := mem.Args[2]
18223 if mem_2.Op != OpStore {
18224 break
18225 }
18226 t3 := auxToType(mem_2.Aux)
18227 _ = mem_2.Args[2]
18228 mem_2_0 := mem_2.Args[0]
18229 if mem_2_0.Op != OpOffPtr {
18230 break
18231 }
18232 tt3 := mem_2_0.Type
18233 o3 := auxIntToInt64(mem_2_0.AuxInt)
18234 p3 := mem_2_0.Args[0]
18235 d2 := mem_2.Args[1]
18236 mem_2_2 := mem_2.Args[2]
18237 if mem_2_2.Op != OpStore {
18238 break
18239 }
18240 t4 := auxToType(mem_2_2.Aux)
18241 _ = mem_2_2.Args[2]
18242 mem_2_2_0 := mem_2_2.Args[0]
18243 if mem_2_2_0.Op != OpOffPtr {
18244 break
18245 }
18246 tt4 := mem_2_2_0.Type
18247 o4 := auxIntToInt64(mem_2_2_0.AuxInt)
18248 p4 := mem_2_2_0.Args[0]
18249 d3 := mem_2_2.Args[1]
18250 mem_2_2_2 := mem_2_2.Args[2]
18251 if mem_2_2_2.Op != OpZero || auxIntToInt64(mem_2_2_2.AuxInt) != n {
18252 break
18253 }
18254 t5 := auxToType(mem_2_2_2.Aux)
18255 p5 := mem_2_2_2.Args[0]
18256 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()) {
18257 break
18258 }
18259 v.reset(OpStore)
18260 v.Aux = typeToAux(t2)
18261 v0 := b.NewValue0(v.Pos, OpOffPtr, tt2)
18262 v0.AuxInt = int64ToAuxInt(o2)
18263 v0.AddArg(dst)
18264 v1 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
18265 v1.Aux = typeToAux(t3)
18266 v2 := b.NewValue0(v.Pos, OpOffPtr, tt3)
18267 v2.AuxInt = int64ToAuxInt(o3)
18268 v2.AddArg(dst)
18269 v3 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
18270 v3.Aux = typeToAux(t4)
18271 v4 := b.NewValue0(v.Pos, OpOffPtr, tt4)
18272 v4.AuxInt = int64ToAuxInt(o4)
18273 v4.AddArg(dst)
18274 v5 := b.NewValue0(v.Pos, OpZero, types.TypeMem)
18275 v5.AuxInt = int64ToAuxInt(n)
18276 v5.Aux = typeToAux(t1)
18277 v5.AddArg2(dst, mem)
18278 v3.AddArg3(v4, d3, v5)
18279 v1.AddArg3(v2, d2, v3)
18280 v.AddArg3(v0, d1, v1)
18281 return true
18282 }
18283
18284
18285
18286 for {
18287 n := auxIntToInt64(v.AuxInt)
18288 t1 := auxToType(v.Aux)
18289 dst := v_0
18290 p1 := v_1
18291 mem := v_2
18292 if mem.Op != OpStore {
18293 break
18294 }
18295 t2 := auxToType(mem.Aux)
18296 _ = mem.Args[2]
18297 mem_0 := mem.Args[0]
18298 if mem_0.Op != OpOffPtr {
18299 break
18300 }
18301 tt2 := mem_0.Type
18302 o2 := auxIntToInt64(mem_0.AuxInt)
18303 p2 := mem_0.Args[0]
18304 d1 := mem.Args[1]
18305 mem_2 := mem.Args[2]
18306 if mem_2.Op != OpStore {
18307 break
18308 }
18309 t3 := auxToType(mem_2.Aux)
18310 _ = mem_2.Args[2]
18311 mem_2_0 := mem_2.Args[0]
18312 if mem_2_0.Op != OpOffPtr {
18313 break
18314 }
18315 tt3 := mem_2_0.Type
18316 o3 := auxIntToInt64(mem_2_0.AuxInt)
18317 p3 := mem_2_0.Args[0]
18318 d2 := mem_2.Args[1]
18319 mem_2_2 := mem_2.Args[2]
18320 if mem_2_2.Op != OpStore {
18321 break
18322 }
18323 t4 := auxToType(mem_2_2.Aux)
18324 _ = mem_2_2.Args[2]
18325 mem_2_2_0 := mem_2_2.Args[0]
18326 if mem_2_2_0.Op != OpOffPtr {
18327 break
18328 }
18329 tt4 := mem_2_2_0.Type
18330 o4 := auxIntToInt64(mem_2_2_0.AuxInt)
18331 p4 := mem_2_2_0.Args[0]
18332 d3 := mem_2_2.Args[1]
18333 mem_2_2_2 := mem_2_2.Args[2]
18334 if mem_2_2_2.Op != OpStore {
18335 break
18336 }
18337 t5 := auxToType(mem_2_2_2.Aux)
18338 _ = mem_2_2_2.Args[2]
18339 mem_2_2_2_0 := mem_2_2_2.Args[0]
18340 if mem_2_2_2_0.Op != OpOffPtr {
18341 break
18342 }
18343 tt5 := mem_2_2_2_0.Type
18344 o5 := auxIntToInt64(mem_2_2_2_0.AuxInt)
18345 p5 := mem_2_2_2_0.Args[0]
18346 d4 := mem_2_2_2.Args[1]
18347 mem_2_2_2_2 := mem_2_2_2.Args[2]
18348 if mem_2_2_2_2.Op != OpZero || auxIntToInt64(mem_2_2_2_2.AuxInt) != n {
18349 break
18350 }
18351 t6 := auxToType(mem_2_2_2_2.Aux)
18352 p6 := mem_2_2_2_2.Args[0]
18353 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()) {
18354 break
18355 }
18356 v.reset(OpStore)
18357 v.Aux = typeToAux(t2)
18358 v0 := b.NewValue0(v.Pos, OpOffPtr, tt2)
18359 v0.AuxInt = int64ToAuxInt(o2)
18360 v0.AddArg(dst)
18361 v1 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
18362 v1.Aux = typeToAux(t3)
18363 v2 := b.NewValue0(v.Pos, OpOffPtr, tt3)
18364 v2.AuxInt = int64ToAuxInt(o3)
18365 v2.AddArg(dst)
18366 v3 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
18367 v3.Aux = typeToAux(t4)
18368 v4 := b.NewValue0(v.Pos, OpOffPtr, tt4)
18369 v4.AuxInt = int64ToAuxInt(o4)
18370 v4.AddArg(dst)
18371 v5 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
18372 v5.Aux = typeToAux(t5)
18373 v6 := b.NewValue0(v.Pos, OpOffPtr, tt5)
18374 v6.AuxInt = int64ToAuxInt(o5)
18375 v6.AddArg(dst)
18376 v7 := b.NewValue0(v.Pos, OpZero, types.TypeMem)
18377 v7.AuxInt = int64ToAuxInt(n)
18378 v7.Aux = typeToAux(t1)
18379 v7.AddArg2(dst, mem)
18380 v5.AddArg3(v6, d4, v7)
18381 v3.AddArg3(v4, d3, v5)
18382 v1.AddArg3(v2, d2, v3)
18383 v.AddArg3(v0, d1, v1)
18384 return true
18385 }
18386
18387
18388
18389 for {
18390 n := auxIntToInt64(v.AuxInt)
18391 t1 := auxToType(v.Aux)
18392 dst := v_0
18393 p1 := v_1
18394 mem := v_2
18395 if mem.Op != OpVarDef {
18396 break
18397 }
18398 mem_0 := mem.Args[0]
18399 if mem_0.Op != OpStore {
18400 break
18401 }
18402 t2 := auxToType(mem_0.Aux)
18403 _ = mem_0.Args[2]
18404 op2 := mem_0.Args[0]
18405 if op2.Op != OpOffPtr {
18406 break
18407 }
18408 tt2 := op2.Type
18409 o2 := auxIntToInt64(op2.AuxInt)
18410 p2 := op2.Args[0]
18411 d1 := mem_0.Args[1]
18412 mem_0_2 := mem_0.Args[2]
18413 if mem_0_2.Op != OpZero || auxIntToInt64(mem_0_2.AuxInt) != n {
18414 break
18415 }
18416 t3 := auxToType(mem_0_2.Aux)
18417 p3 := mem_0_2.Args[0]
18418 if !(isSamePtr(p1, p2) && isSamePtr(p2, p3) && t2.Alignment() <= t1.Alignment() && t3.Alignment() <= t1.Alignment() && registerizable(b, t2) && n >= o2+t2.Size()) {
18419 break
18420 }
18421 v.reset(OpStore)
18422 v.Aux = typeToAux(t2)
18423 v0 := b.NewValue0(v.Pos, OpOffPtr, tt2)
18424 v0.AuxInt = int64ToAuxInt(o2)
18425 v0.AddArg(dst)
18426 v1 := b.NewValue0(v.Pos, OpZero, types.TypeMem)
18427 v1.AuxInt = int64ToAuxInt(n)
18428 v1.Aux = typeToAux(t1)
18429 v1.AddArg2(dst, mem)
18430 v.AddArg3(v0, d1, v1)
18431 return true
18432 }
18433
18434
18435
18436 for {
18437 n := auxIntToInt64(v.AuxInt)
18438 t1 := auxToType(v.Aux)
18439 dst := v_0
18440 p1 := v_1
18441 mem := v_2
18442 if mem.Op != OpVarDef {
18443 break
18444 }
18445 mem_0 := mem.Args[0]
18446 if mem_0.Op != OpStore {
18447 break
18448 }
18449 t2 := auxToType(mem_0.Aux)
18450 _ = mem_0.Args[2]
18451 mem_0_0 := mem_0.Args[0]
18452 if mem_0_0.Op != OpOffPtr {
18453 break
18454 }
18455 tt2 := mem_0_0.Type
18456 o2 := auxIntToInt64(mem_0_0.AuxInt)
18457 p2 := mem_0_0.Args[0]
18458 d1 := mem_0.Args[1]
18459 mem_0_2 := mem_0.Args[2]
18460 if mem_0_2.Op != OpStore {
18461 break
18462 }
18463 t3 := auxToType(mem_0_2.Aux)
18464 _ = mem_0_2.Args[2]
18465 mem_0_2_0 := mem_0_2.Args[0]
18466 if mem_0_2_0.Op != OpOffPtr {
18467 break
18468 }
18469 tt3 := mem_0_2_0.Type
18470 o3 := auxIntToInt64(mem_0_2_0.AuxInt)
18471 p3 := mem_0_2_0.Args[0]
18472 d2 := mem_0_2.Args[1]
18473 mem_0_2_2 := mem_0_2.Args[2]
18474 if mem_0_2_2.Op != OpZero || auxIntToInt64(mem_0_2_2.AuxInt) != n {
18475 break
18476 }
18477 t4 := auxToType(mem_0_2_2.Aux)
18478 p4 := mem_0_2_2.Args[0]
18479 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()) {
18480 break
18481 }
18482 v.reset(OpStore)
18483 v.Aux = typeToAux(t2)
18484 v0 := b.NewValue0(v.Pos, OpOffPtr, tt2)
18485 v0.AuxInt = int64ToAuxInt(o2)
18486 v0.AddArg(dst)
18487 v1 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
18488 v1.Aux = typeToAux(t3)
18489 v2 := b.NewValue0(v.Pos, OpOffPtr, tt3)
18490 v2.AuxInt = int64ToAuxInt(o3)
18491 v2.AddArg(dst)
18492 v3 := b.NewValue0(v.Pos, OpZero, types.TypeMem)
18493 v3.AuxInt = int64ToAuxInt(n)
18494 v3.Aux = typeToAux(t1)
18495 v3.AddArg2(dst, mem)
18496 v1.AddArg3(v2, d2, v3)
18497 v.AddArg3(v0, d1, v1)
18498 return true
18499 }
18500
18501
18502
18503 for {
18504 n := auxIntToInt64(v.AuxInt)
18505 t1 := auxToType(v.Aux)
18506 dst := v_0
18507 p1 := v_1
18508 mem := v_2
18509 if mem.Op != OpVarDef {
18510 break
18511 }
18512 mem_0 := mem.Args[0]
18513 if mem_0.Op != OpStore {
18514 break
18515 }
18516 t2 := auxToType(mem_0.Aux)
18517 _ = mem_0.Args[2]
18518 mem_0_0 := mem_0.Args[0]
18519 if mem_0_0.Op != OpOffPtr {
18520 break
18521 }
18522 tt2 := mem_0_0.Type
18523 o2 := auxIntToInt64(mem_0_0.AuxInt)
18524 p2 := mem_0_0.Args[0]
18525 d1 := mem_0.Args[1]
18526 mem_0_2 := mem_0.Args[2]
18527 if mem_0_2.Op != OpStore {
18528 break
18529 }
18530 t3 := auxToType(mem_0_2.Aux)
18531 _ = mem_0_2.Args[2]
18532 mem_0_2_0 := mem_0_2.Args[0]
18533 if mem_0_2_0.Op != OpOffPtr {
18534 break
18535 }
18536 tt3 := mem_0_2_0.Type
18537 o3 := auxIntToInt64(mem_0_2_0.AuxInt)
18538 p3 := mem_0_2_0.Args[0]
18539 d2 := mem_0_2.Args[1]
18540 mem_0_2_2 := mem_0_2.Args[2]
18541 if mem_0_2_2.Op != OpStore {
18542 break
18543 }
18544 t4 := auxToType(mem_0_2_2.Aux)
18545 _ = mem_0_2_2.Args[2]
18546 mem_0_2_2_0 := mem_0_2_2.Args[0]
18547 if mem_0_2_2_0.Op != OpOffPtr {
18548 break
18549 }
18550 tt4 := mem_0_2_2_0.Type
18551 o4 := auxIntToInt64(mem_0_2_2_0.AuxInt)
18552 p4 := mem_0_2_2_0.Args[0]
18553 d3 := mem_0_2_2.Args[1]
18554 mem_0_2_2_2 := mem_0_2_2.Args[2]
18555 if mem_0_2_2_2.Op != OpZero || auxIntToInt64(mem_0_2_2_2.AuxInt) != n {
18556 break
18557 }
18558 t5 := auxToType(mem_0_2_2_2.Aux)
18559 p5 := mem_0_2_2_2.Args[0]
18560 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()) {
18561 break
18562 }
18563 v.reset(OpStore)
18564 v.Aux = typeToAux(t2)
18565 v0 := b.NewValue0(v.Pos, OpOffPtr, tt2)
18566 v0.AuxInt = int64ToAuxInt(o2)
18567 v0.AddArg(dst)
18568 v1 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
18569 v1.Aux = typeToAux(t3)
18570 v2 := b.NewValue0(v.Pos, OpOffPtr, tt3)
18571 v2.AuxInt = int64ToAuxInt(o3)
18572 v2.AddArg(dst)
18573 v3 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
18574 v3.Aux = typeToAux(t4)
18575 v4 := b.NewValue0(v.Pos, OpOffPtr, tt4)
18576 v4.AuxInt = int64ToAuxInt(o4)
18577 v4.AddArg(dst)
18578 v5 := b.NewValue0(v.Pos, OpZero, types.TypeMem)
18579 v5.AuxInt = int64ToAuxInt(n)
18580 v5.Aux = typeToAux(t1)
18581 v5.AddArg2(dst, mem)
18582 v3.AddArg3(v4, d3, v5)
18583 v1.AddArg3(v2, d2, v3)
18584 v.AddArg3(v0, d1, v1)
18585 return true
18586 }
18587
18588
18589
18590 for {
18591 n := auxIntToInt64(v.AuxInt)
18592 t1 := auxToType(v.Aux)
18593 dst := v_0
18594 p1 := v_1
18595 mem := v_2
18596 if mem.Op != OpVarDef {
18597 break
18598 }
18599 mem_0 := mem.Args[0]
18600 if mem_0.Op != OpStore {
18601 break
18602 }
18603 t2 := auxToType(mem_0.Aux)
18604 _ = mem_0.Args[2]
18605 mem_0_0 := mem_0.Args[0]
18606 if mem_0_0.Op != OpOffPtr {
18607 break
18608 }
18609 tt2 := mem_0_0.Type
18610 o2 := auxIntToInt64(mem_0_0.AuxInt)
18611 p2 := mem_0_0.Args[0]
18612 d1 := mem_0.Args[1]
18613 mem_0_2 := mem_0.Args[2]
18614 if mem_0_2.Op != OpStore {
18615 break
18616 }
18617 t3 := auxToType(mem_0_2.Aux)
18618 _ = mem_0_2.Args[2]
18619 mem_0_2_0 := mem_0_2.Args[0]
18620 if mem_0_2_0.Op != OpOffPtr {
18621 break
18622 }
18623 tt3 := mem_0_2_0.Type
18624 o3 := auxIntToInt64(mem_0_2_0.AuxInt)
18625 p3 := mem_0_2_0.Args[0]
18626 d2 := mem_0_2.Args[1]
18627 mem_0_2_2 := mem_0_2.Args[2]
18628 if mem_0_2_2.Op != OpStore {
18629 break
18630 }
18631 t4 := auxToType(mem_0_2_2.Aux)
18632 _ = mem_0_2_2.Args[2]
18633 mem_0_2_2_0 := mem_0_2_2.Args[0]
18634 if mem_0_2_2_0.Op != OpOffPtr {
18635 break
18636 }
18637 tt4 := mem_0_2_2_0.Type
18638 o4 := auxIntToInt64(mem_0_2_2_0.AuxInt)
18639 p4 := mem_0_2_2_0.Args[0]
18640 d3 := mem_0_2_2.Args[1]
18641 mem_0_2_2_2 := mem_0_2_2.Args[2]
18642 if mem_0_2_2_2.Op != OpStore {
18643 break
18644 }
18645 t5 := auxToType(mem_0_2_2_2.Aux)
18646 _ = mem_0_2_2_2.Args[2]
18647 mem_0_2_2_2_0 := mem_0_2_2_2.Args[0]
18648 if mem_0_2_2_2_0.Op != OpOffPtr {
18649 break
18650 }
18651 tt5 := mem_0_2_2_2_0.Type
18652 o5 := auxIntToInt64(mem_0_2_2_2_0.AuxInt)
18653 p5 := mem_0_2_2_2_0.Args[0]
18654 d4 := mem_0_2_2_2.Args[1]
18655 mem_0_2_2_2_2 := mem_0_2_2_2.Args[2]
18656 if mem_0_2_2_2_2.Op != OpZero || auxIntToInt64(mem_0_2_2_2_2.AuxInt) != n {
18657 break
18658 }
18659 t6 := auxToType(mem_0_2_2_2_2.Aux)
18660 p6 := mem_0_2_2_2_2.Args[0]
18661 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()) {
18662 break
18663 }
18664 v.reset(OpStore)
18665 v.Aux = typeToAux(t2)
18666 v0 := b.NewValue0(v.Pos, OpOffPtr, tt2)
18667 v0.AuxInt = int64ToAuxInt(o2)
18668 v0.AddArg(dst)
18669 v1 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
18670 v1.Aux = typeToAux(t3)
18671 v2 := b.NewValue0(v.Pos, OpOffPtr, tt3)
18672 v2.AuxInt = int64ToAuxInt(o3)
18673 v2.AddArg(dst)
18674 v3 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
18675 v3.Aux = typeToAux(t4)
18676 v4 := b.NewValue0(v.Pos, OpOffPtr, tt4)
18677 v4.AuxInt = int64ToAuxInt(o4)
18678 v4.AddArg(dst)
18679 v5 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
18680 v5.Aux = typeToAux(t5)
18681 v6 := b.NewValue0(v.Pos, OpOffPtr, tt5)
18682 v6.AuxInt = int64ToAuxInt(o5)
18683 v6.AddArg(dst)
18684 v7 := b.NewValue0(v.Pos, OpZero, types.TypeMem)
18685 v7.AuxInt = int64ToAuxInt(n)
18686 v7.Aux = typeToAux(t1)
18687 v7.AddArg2(dst, mem)
18688 v5.AddArg3(v6, d4, v7)
18689 v3.AddArg3(v4, d3, v5)
18690 v1.AddArg3(v2, d2, v3)
18691 v.AddArg3(v0, d1, v1)
18692 return true
18693 }
18694
18695
18696
18697 for {
18698 s := auxIntToInt64(v.AuxInt)
18699 t1 := auxToType(v.Aux)
18700 dst := v_0
18701 tmp1 := v_1
18702 midmem := v_2
18703 if midmem.Op != OpMove || auxIntToInt64(midmem.AuxInt) != s {
18704 break
18705 }
18706 t2 := auxToType(midmem.Aux)
18707 src := midmem.Args[1]
18708 tmp2 := midmem.Args[0]
18709 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))) {
18710 break
18711 }
18712 v.reset(OpMove)
18713 v.AuxInt = int64ToAuxInt(s)
18714 v.Aux = typeToAux(t1)
18715 v.AddArg3(dst, src, midmem)
18716 return true
18717 }
18718
18719
18720
18721 for {
18722 s := auxIntToInt64(v.AuxInt)
18723 t1 := auxToType(v.Aux)
18724 dst := v_0
18725 tmp1 := v_1
18726 midmem := v_2
18727 if midmem.Op != OpVarDef {
18728 break
18729 }
18730 midmem_0 := midmem.Args[0]
18731 if midmem_0.Op != OpMove || auxIntToInt64(midmem_0.AuxInt) != s {
18732 break
18733 }
18734 t2 := auxToType(midmem_0.Aux)
18735 src := midmem_0.Args[1]
18736 tmp2 := midmem_0.Args[0]
18737 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))) {
18738 break
18739 }
18740 v.reset(OpMove)
18741 v.AuxInt = int64ToAuxInt(s)
18742 v.Aux = typeToAux(t1)
18743 v.AddArg3(dst, src, midmem)
18744 return true
18745 }
18746
18747
18748
18749 for {
18750 dst := v_0
18751 src := v_1
18752 mem := v_2
18753 if !(isSamePtr(dst, src)) {
18754 break
18755 }
18756 v.copyOf(mem)
18757 return true
18758 }
18759 return false
18760 }
18761 func rewriteValuegeneric_OpMul16(v *Value) bool {
18762 v_1 := v.Args[1]
18763 v_0 := v.Args[0]
18764 b := v.Block
18765 typ := &b.Func.Config.Types
18766
18767
18768 for {
18769 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18770 if v_0.Op != OpConst16 {
18771 continue
18772 }
18773 c := auxIntToInt16(v_0.AuxInt)
18774 if v_1.Op != OpConst16 {
18775 continue
18776 }
18777 d := auxIntToInt16(v_1.AuxInt)
18778 v.reset(OpConst16)
18779 v.AuxInt = int16ToAuxInt(c * d)
18780 return true
18781 }
18782 break
18783 }
18784
18785
18786 for {
18787 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18788 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 1 {
18789 continue
18790 }
18791 x := v_1
18792 v.copyOf(x)
18793 return true
18794 }
18795 break
18796 }
18797
18798
18799 for {
18800 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18801 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != -1 {
18802 continue
18803 }
18804 x := v_1
18805 v.reset(OpNeg16)
18806 v.AddArg(x)
18807 return true
18808 }
18809 break
18810 }
18811
18812
18813
18814 for {
18815 t := v.Type
18816 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18817 n := v_0
18818 if v_1.Op != OpConst16 {
18819 continue
18820 }
18821 c := auxIntToInt16(v_1.AuxInt)
18822 if !(isPowerOfTwo(c)) {
18823 continue
18824 }
18825 v.reset(OpLsh16x64)
18826 v.Type = t
18827 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
18828 v0.AuxInt = int64ToAuxInt(log16(c))
18829 v.AddArg2(n, v0)
18830 return true
18831 }
18832 break
18833 }
18834
18835
18836
18837 for {
18838 t := v.Type
18839 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18840 n := v_0
18841 if v_1.Op != OpConst16 {
18842 continue
18843 }
18844 c := auxIntToInt16(v_1.AuxInt)
18845 if !(t.IsSigned() && isPowerOfTwo(-c)) {
18846 continue
18847 }
18848 v.reset(OpNeg16)
18849 v0 := b.NewValue0(v.Pos, OpLsh16x64, t)
18850 v1 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
18851 v1.AuxInt = int64ToAuxInt(log16(-c))
18852 v0.AddArg2(n, v1)
18853 v.AddArg(v0)
18854 return true
18855 }
18856 break
18857 }
18858
18859
18860 for {
18861 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18862 if v_0.Op != OpConst16 {
18863 continue
18864 }
18865 t := v_0.Type
18866 c := auxIntToInt16(v_0.AuxInt)
18867 if v_1.Op != OpAdd16 || v_1.Type != t {
18868 continue
18869 }
18870 _ = v_1.Args[1]
18871 v_1_0 := v_1.Args[0]
18872 v_1_1 := v_1.Args[1]
18873 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
18874 if v_1_0.Op != OpConst16 || v_1_0.Type != t {
18875 continue
18876 }
18877 d := auxIntToInt16(v_1_0.AuxInt)
18878 x := v_1_1
18879 v.reset(OpAdd16)
18880 v0 := b.NewValue0(v.Pos, OpConst16, t)
18881 v0.AuxInt = int16ToAuxInt(c * d)
18882 v1 := b.NewValue0(v.Pos, OpMul16, t)
18883 v2 := b.NewValue0(v.Pos, OpConst16, t)
18884 v2.AuxInt = int16ToAuxInt(c)
18885 v1.AddArg2(v2, x)
18886 v.AddArg2(v0, v1)
18887 return true
18888 }
18889 }
18890 break
18891 }
18892
18893
18894 for {
18895 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18896 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 {
18897 continue
18898 }
18899 v.reset(OpConst16)
18900 v.AuxInt = int16ToAuxInt(0)
18901 return true
18902 }
18903 break
18904 }
18905
18906
18907
18908 for {
18909 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18910 if v_0.Op != OpMul16 {
18911 continue
18912 }
18913 _ = v_0.Args[1]
18914 v_0_0 := v_0.Args[0]
18915 v_0_1 := v_0.Args[1]
18916 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
18917 i := v_0_0
18918 if i.Op != OpConst16 {
18919 continue
18920 }
18921 t := i.Type
18922 z := v_0_1
18923 x := v_1
18924 if !(z.Op != OpConst16 && x.Op != OpConst16) {
18925 continue
18926 }
18927 v.reset(OpMul16)
18928 v0 := b.NewValue0(v.Pos, OpMul16, t)
18929 v0.AddArg2(x, z)
18930 v.AddArg2(i, v0)
18931 return true
18932 }
18933 }
18934 break
18935 }
18936
18937
18938 for {
18939 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18940 if v_0.Op != OpConst16 {
18941 continue
18942 }
18943 t := v_0.Type
18944 c := auxIntToInt16(v_0.AuxInt)
18945 if v_1.Op != OpMul16 {
18946 continue
18947 }
18948 _ = v_1.Args[1]
18949 v_1_0 := v_1.Args[0]
18950 v_1_1 := v_1.Args[1]
18951 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
18952 if v_1_0.Op != OpConst16 || v_1_0.Type != t {
18953 continue
18954 }
18955 d := auxIntToInt16(v_1_0.AuxInt)
18956 x := v_1_1
18957 v.reset(OpMul16)
18958 v0 := b.NewValue0(v.Pos, OpConst16, t)
18959 v0.AuxInt = int16ToAuxInt(c * d)
18960 v.AddArg2(v0, x)
18961 return true
18962 }
18963 }
18964 break
18965 }
18966 return false
18967 }
18968 func rewriteValuegeneric_OpMul32(v *Value) bool {
18969 v_1 := v.Args[1]
18970 v_0 := v.Args[0]
18971 b := v.Block
18972 typ := &b.Func.Config.Types
18973
18974
18975 for {
18976 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18977 if v_0.Op != OpConst32 {
18978 continue
18979 }
18980 c := auxIntToInt32(v_0.AuxInt)
18981 if v_1.Op != OpConst32 {
18982 continue
18983 }
18984 d := auxIntToInt32(v_1.AuxInt)
18985 v.reset(OpConst32)
18986 v.AuxInt = int32ToAuxInt(c * d)
18987 return true
18988 }
18989 break
18990 }
18991
18992
18993 for {
18994 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18995 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 1 {
18996 continue
18997 }
18998 x := v_1
18999 v.copyOf(x)
19000 return true
19001 }
19002 break
19003 }
19004
19005
19006 for {
19007 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19008 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != -1 {
19009 continue
19010 }
19011 x := v_1
19012 v.reset(OpNeg32)
19013 v.AddArg(x)
19014 return true
19015 }
19016 break
19017 }
19018
19019
19020
19021 for {
19022 t := v.Type
19023 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19024 n := v_0
19025 if v_1.Op != OpConst32 {
19026 continue
19027 }
19028 c := auxIntToInt32(v_1.AuxInt)
19029 if !(isPowerOfTwo(c)) {
19030 continue
19031 }
19032 v.reset(OpLsh32x64)
19033 v.Type = t
19034 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
19035 v0.AuxInt = int64ToAuxInt(log32(c))
19036 v.AddArg2(n, v0)
19037 return true
19038 }
19039 break
19040 }
19041
19042
19043
19044 for {
19045 t := v.Type
19046 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19047 n := v_0
19048 if v_1.Op != OpConst32 {
19049 continue
19050 }
19051 c := auxIntToInt32(v_1.AuxInt)
19052 if !(t.IsSigned() && isPowerOfTwo(-c)) {
19053 continue
19054 }
19055 v.reset(OpNeg32)
19056 v0 := b.NewValue0(v.Pos, OpLsh32x64, t)
19057 v1 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
19058 v1.AuxInt = int64ToAuxInt(log32(-c))
19059 v0.AddArg2(n, v1)
19060 v.AddArg(v0)
19061 return true
19062 }
19063 break
19064 }
19065
19066
19067 for {
19068 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19069 if v_0.Op != OpConst32 {
19070 continue
19071 }
19072 t := v_0.Type
19073 c := auxIntToInt32(v_0.AuxInt)
19074 if v_1.Op != OpAdd32 || v_1.Type != t {
19075 continue
19076 }
19077 _ = v_1.Args[1]
19078 v_1_0 := v_1.Args[0]
19079 v_1_1 := v_1.Args[1]
19080 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
19081 if v_1_0.Op != OpConst32 || v_1_0.Type != t {
19082 continue
19083 }
19084 d := auxIntToInt32(v_1_0.AuxInt)
19085 x := v_1_1
19086 v.reset(OpAdd32)
19087 v0 := b.NewValue0(v.Pos, OpConst32, t)
19088 v0.AuxInt = int32ToAuxInt(c * d)
19089 v1 := b.NewValue0(v.Pos, OpMul32, t)
19090 v2 := b.NewValue0(v.Pos, OpConst32, t)
19091 v2.AuxInt = int32ToAuxInt(c)
19092 v1.AddArg2(v2, x)
19093 v.AddArg2(v0, v1)
19094 return true
19095 }
19096 }
19097 break
19098 }
19099
19100
19101 for {
19102 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19103 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
19104 continue
19105 }
19106 v.reset(OpConst32)
19107 v.AuxInt = int32ToAuxInt(0)
19108 return true
19109 }
19110 break
19111 }
19112
19113
19114
19115 for {
19116 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19117 if v_0.Op != OpMul32 {
19118 continue
19119 }
19120 _ = v_0.Args[1]
19121 v_0_0 := v_0.Args[0]
19122 v_0_1 := v_0.Args[1]
19123 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
19124 i := v_0_0
19125 if i.Op != OpConst32 {
19126 continue
19127 }
19128 t := i.Type
19129 z := v_0_1
19130 x := v_1
19131 if !(z.Op != OpConst32 && x.Op != OpConst32) {
19132 continue
19133 }
19134 v.reset(OpMul32)
19135 v0 := b.NewValue0(v.Pos, OpMul32, t)
19136 v0.AddArg2(x, z)
19137 v.AddArg2(i, v0)
19138 return true
19139 }
19140 }
19141 break
19142 }
19143
19144
19145 for {
19146 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19147 if v_0.Op != OpConst32 {
19148 continue
19149 }
19150 t := v_0.Type
19151 c := auxIntToInt32(v_0.AuxInt)
19152 if v_1.Op != OpMul32 {
19153 continue
19154 }
19155 _ = v_1.Args[1]
19156 v_1_0 := v_1.Args[0]
19157 v_1_1 := v_1.Args[1]
19158 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
19159 if v_1_0.Op != OpConst32 || v_1_0.Type != t {
19160 continue
19161 }
19162 d := auxIntToInt32(v_1_0.AuxInt)
19163 x := v_1_1
19164 v.reset(OpMul32)
19165 v0 := b.NewValue0(v.Pos, OpConst32, t)
19166 v0.AuxInt = int32ToAuxInt(c * d)
19167 v.AddArg2(v0, x)
19168 return true
19169 }
19170 }
19171 break
19172 }
19173 return false
19174 }
19175 func rewriteValuegeneric_OpMul32F(v *Value) bool {
19176 v_1 := v.Args[1]
19177 v_0 := v.Args[0]
19178
19179
19180
19181 for {
19182 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19183 if v_0.Op != OpConst32F {
19184 continue
19185 }
19186 c := auxIntToFloat32(v_0.AuxInt)
19187 if v_1.Op != OpConst32F {
19188 continue
19189 }
19190 d := auxIntToFloat32(v_1.AuxInt)
19191 if !(c*d == c*d) {
19192 continue
19193 }
19194 v.reset(OpConst32F)
19195 v.AuxInt = float32ToAuxInt(c * d)
19196 return true
19197 }
19198 break
19199 }
19200
19201
19202 for {
19203 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19204 x := v_0
19205 if v_1.Op != OpConst32F || auxIntToFloat32(v_1.AuxInt) != 1 {
19206 continue
19207 }
19208 v.copyOf(x)
19209 return true
19210 }
19211 break
19212 }
19213
19214
19215 for {
19216 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19217 x := v_0
19218 if v_1.Op != OpConst32F || auxIntToFloat32(v_1.AuxInt) != -1 {
19219 continue
19220 }
19221 v.reset(OpNeg32F)
19222 v.AddArg(x)
19223 return true
19224 }
19225 break
19226 }
19227
19228
19229 for {
19230 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19231 x := v_0
19232 if v_1.Op != OpConst32F || auxIntToFloat32(v_1.AuxInt) != 2 {
19233 continue
19234 }
19235 v.reset(OpAdd32F)
19236 v.AddArg2(x, x)
19237 return true
19238 }
19239 break
19240 }
19241 return false
19242 }
19243 func rewriteValuegeneric_OpMul32uhilo(v *Value) bool {
19244 v_1 := v.Args[1]
19245 v_0 := v.Args[0]
19246 b := v.Block
19247 typ := &b.Func.Config.Types
19248
19249
19250 for {
19251 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19252 if v_0.Op != OpConst32 {
19253 continue
19254 }
19255 c := auxIntToInt32(v_0.AuxInt)
19256 if v_1.Op != OpConst32 {
19257 continue
19258 }
19259 d := auxIntToInt32(v_1.AuxInt)
19260 v.reset(OpMakeTuple)
19261 v0 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
19262 v0.AuxInt = int32ToAuxInt(bitsMulU32(c, d).hi)
19263 v1 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
19264 v1.AuxInt = int32ToAuxInt(bitsMulU32(c, d).lo)
19265 v.AddArg2(v0, v1)
19266 return true
19267 }
19268 break
19269 }
19270 return false
19271 }
19272 func rewriteValuegeneric_OpMul32uover(v *Value) bool {
19273 v_1 := v.Args[1]
19274 v_0 := v.Args[0]
19275 b := v.Block
19276 typ := &b.Func.Config.Types
19277
19278
19279 for {
19280 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19281 if v_0.Op != OpConst32 {
19282 continue
19283 }
19284 c := auxIntToInt32(v_0.AuxInt)
19285 if v_1.Op != OpConst32 {
19286 continue
19287 }
19288 d := auxIntToInt32(v_1.AuxInt)
19289 v.reset(OpMakeTuple)
19290 v0 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
19291 v0.AuxInt = int32ToAuxInt(bitsMulU32(c, d).lo)
19292 v1 := b.NewValue0(v.Pos, OpConstBool, typ.Bool)
19293 v1.AuxInt = boolToAuxInt(bitsMulU32(c, d).hi != 0)
19294 v.AddArg2(v0, v1)
19295 return true
19296 }
19297 break
19298 }
19299
19300
19301 for {
19302 t := v.Type
19303 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19304 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 1 {
19305 continue
19306 }
19307 x := v_1
19308 v.reset(OpMakeTuple)
19309 v0 := b.NewValue0(v.Pos, OpConstBool, t.FieldType(1))
19310 v0.AuxInt = boolToAuxInt(false)
19311 v.AddArg2(x, v0)
19312 return true
19313 }
19314 break
19315 }
19316
19317
19318 for {
19319 t := v.Type
19320 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19321 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
19322 continue
19323 }
19324 v.reset(OpMakeTuple)
19325 v0 := b.NewValue0(v.Pos, OpConst32, t.FieldType(0))
19326 v0.AuxInt = int32ToAuxInt(0)
19327 v1 := b.NewValue0(v.Pos, OpConstBool, t.FieldType(1))
19328 v1.AuxInt = boolToAuxInt(false)
19329 v.AddArg2(v0, v1)
19330 return true
19331 }
19332 break
19333 }
19334 return false
19335 }
19336 func rewriteValuegeneric_OpMul64(v *Value) bool {
19337 v_1 := v.Args[1]
19338 v_0 := v.Args[0]
19339 b := v.Block
19340 typ := &b.Func.Config.Types
19341
19342
19343 for {
19344 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19345 if v_0.Op != OpConst64 {
19346 continue
19347 }
19348 c := auxIntToInt64(v_0.AuxInt)
19349 if v_1.Op != OpConst64 {
19350 continue
19351 }
19352 d := auxIntToInt64(v_1.AuxInt)
19353 v.reset(OpConst64)
19354 v.AuxInt = int64ToAuxInt(c * d)
19355 return true
19356 }
19357 break
19358 }
19359
19360
19361 for {
19362 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19363 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 1 {
19364 continue
19365 }
19366 x := v_1
19367 v.copyOf(x)
19368 return true
19369 }
19370 break
19371 }
19372
19373
19374 for {
19375 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19376 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != -1 {
19377 continue
19378 }
19379 x := v_1
19380 v.reset(OpNeg64)
19381 v.AddArg(x)
19382 return true
19383 }
19384 break
19385 }
19386
19387
19388
19389 for {
19390 t := v.Type
19391 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19392 n := v_0
19393 if v_1.Op != OpConst64 {
19394 continue
19395 }
19396 c := auxIntToInt64(v_1.AuxInt)
19397 if !(isPowerOfTwo(c)) {
19398 continue
19399 }
19400 v.reset(OpLsh64x64)
19401 v.Type = t
19402 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
19403 v0.AuxInt = int64ToAuxInt(log64(c))
19404 v.AddArg2(n, v0)
19405 return true
19406 }
19407 break
19408 }
19409
19410
19411
19412 for {
19413 t := v.Type
19414 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19415 n := v_0
19416 if v_1.Op != OpConst64 {
19417 continue
19418 }
19419 c := auxIntToInt64(v_1.AuxInt)
19420 if !(t.IsSigned() && isPowerOfTwo(-c)) {
19421 continue
19422 }
19423 v.reset(OpNeg64)
19424 v0 := b.NewValue0(v.Pos, OpLsh64x64, t)
19425 v1 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
19426 v1.AuxInt = int64ToAuxInt(log64(-c))
19427 v0.AddArg2(n, v1)
19428 v.AddArg(v0)
19429 return true
19430 }
19431 break
19432 }
19433
19434
19435 for {
19436 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19437 if v_0.Op != OpConst64 {
19438 continue
19439 }
19440 t := v_0.Type
19441 c := auxIntToInt64(v_0.AuxInt)
19442 if v_1.Op != OpAdd64 || v_1.Type != t {
19443 continue
19444 }
19445 _ = v_1.Args[1]
19446 v_1_0 := v_1.Args[0]
19447 v_1_1 := v_1.Args[1]
19448 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
19449 if v_1_0.Op != OpConst64 || v_1_0.Type != t {
19450 continue
19451 }
19452 d := auxIntToInt64(v_1_0.AuxInt)
19453 x := v_1_1
19454 v.reset(OpAdd64)
19455 v0 := b.NewValue0(v.Pos, OpConst64, t)
19456 v0.AuxInt = int64ToAuxInt(c * d)
19457 v1 := b.NewValue0(v.Pos, OpMul64, t)
19458 v2 := b.NewValue0(v.Pos, OpConst64, t)
19459 v2.AuxInt = int64ToAuxInt(c)
19460 v1.AddArg2(v2, x)
19461 v.AddArg2(v0, v1)
19462 return true
19463 }
19464 }
19465 break
19466 }
19467
19468
19469 for {
19470 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19471 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
19472 continue
19473 }
19474 v.reset(OpConst64)
19475 v.AuxInt = int64ToAuxInt(0)
19476 return true
19477 }
19478 break
19479 }
19480
19481
19482
19483 for {
19484 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19485 if v_0.Op != OpMul64 {
19486 continue
19487 }
19488 _ = v_0.Args[1]
19489 v_0_0 := v_0.Args[0]
19490 v_0_1 := v_0.Args[1]
19491 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
19492 i := v_0_0
19493 if i.Op != OpConst64 {
19494 continue
19495 }
19496 t := i.Type
19497 z := v_0_1
19498 x := v_1
19499 if !(z.Op != OpConst64 && x.Op != OpConst64) {
19500 continue
19501 }
19502 v.reset(OpMul64)
19503 v0 := b.NewValue0(v.Pos, OpMul64, t)
19504 v0.AddArg2(x, z)
19505 v.AddArg2(i, v0)
19506 return true
19507 }
19508 }
19509 break
19510 }
19511
19512
19513 for {
19514 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19515 if v_0.Op != OpConst64 {
19516 continue
19517 }
19518 t := v_0.Type
19519 c := auxIntToInt64(v_0.AuxInt)
19520 if v_1.Op != OpMul64 {
19521 continue
19522 }
19523 _ = v_1.Args[1]
19524 v_1_0 := v_1.Args[0]
19525 v_1_1 := v_1.Args[1]
19526 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
19527 if v_1_0.Op != OpConst64 || v_1_0.Type != t {
19528 continue
19529 }
19530 d := auxIntToInt64(v_1_0.AuxInt)
19531 x := v_1_1
19532 v.reset(OpMul64)
19533 v0 := b.NewValue0(v.Pos, OpConst64, t)
19534 v0.AuxInt = int64ToAuxInt(c * d)
19535 v.AddArg2(v0, x)
19536 return true
19537 }
19538 }
19539 break
19540 }
19541 return false
19542 }
19543 func rewriteValuegeneric_OpMul64F(v *Value) bool {
19544 v_1 := v.Args[1]
19545 v_0 := v.Args[0]
19546
19547
19548
19549 for {
19550 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19551 if v_0.Op != OpConst64F {
19552 continue
19553 }
19554 c := auxIntToFloat64(v_0.AuxInt)
19555 if v_1.Op != OpConst64F {
19556 continue
19557 }
19558 d := auxIntToFloat64(v_1.AuxInt)
19559 if !(c*d == c*d) {
19560 continue
19561 }
19562 v.reset(OpConst64F)
19563 v.AuxInt = float64ToAuxInt(c * d)
19564 return true
19565 }
19566 break
19567 }
19568
19569
19570 for {
19571 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19572 x := v_0
19573 if v_1.Op != OpConst64F || auxIntToFloat64(v_1.AuxInt) != 1 {
19574 continue
19575 }
19576 v.copyOf(x)
19577 return true
19578 }
19579 break
19580 }
19581
19582
19583 for {
19584 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19585 x := v_0
19586 if v_1.Op != OpConst64F || auxIntToFloat64(v_1.AuxInt) != -1 {
19587 continue
19588 }
19589 v.reset(OpNeg64F)
19590 v.AddArg(x)
19591 return true
19592 }
19593 break
19594 }
19595
19596
19597 for {
19598 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19599 x := v_0
19600 if v_1.Op != OpConst64F || auxIntToFloat64(v_1.AuxInt) != 2 {
19601 continue
19602 }
19603 v.reset(OpAdd64F)
19604 v.AddArg2(x, x)
19605 return true
19606 }
19607 break
19608 }
19609 return false
19610 }
19611 func rewriteValuegeneric_OpMul64uhilo(v *Value) bool {
19612 v_1 := v.Args[1]
19613 v_0 := v.Args[0]
19614 b := v.Block
19615 typ := &b.Func.Config.Types
19616
19617
19618 for {
19619 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19620 if v_0.Op != OpConst64 {
19621 continue
19622 }
19623 c := auxIntToInt64(v_0.AuxInt)
19624 if v_1.Op != OpConst64 {
19625 continue
19626 }
19627 d := auxIntToInt64(v_1.AuxInt)
19628 v.reset(OpMakeTuple)
19629 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
19630 v0.AuxInt = int64ToAuxInt(bitsMulU64(c, d).hi)
19631 v1 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
19632 v1.AuxInt = int64ToAuxInt(bitsMulU64(c, d).lo)
19633 v.AddArg2(v0, v1)
19634 return true
19635 }
19636 break
19637 }
19638 return false
19639 }
19640 func rewriteValuegeneric_OpMul64uover(v *Value) bool {
19641 v_1 := v.Args[1]
19642 v_0 := v.Args[0]
19643 b := v.Block
19644 typ := &b.Func.Config.Types
19645
19646
19647 for {
19648 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19649 if v_0.Op != OpConst64 {
19650 continue
19651 }
19652 c := auxIntToInt64(v_0.AuxInt)
19653 if v_1.Op != OpConst64 {
19654 continue
19655 }
19656 d := auxIntToInt64(v_1.AuxInt)
19657 v.reset(OpMakeTuple)
19658 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
19659 v0.AuxInt = int64ToAuxInt(bitsMulU64(c, d).lo)
19660 v1 := b.NewValue0(v.Pos, OpConstBool, typ.Bool)
19661 v1.AuxInt = boolToAuxInt(bitsMulU64(c, d).hi != 0)
19662 v.AddArg2(v0, v1)
19663 return true
19664 }
19665 break
19666 }
19667
19668
19669 for {
19670 t := v.Type
19671 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19672 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 1 {
19673 continue
19674 }
19675 x := v_1
19676 v.reset(OpMakeTuple)
19677 v0 := b.NewValue0(v.Pos, OpConstBool, t.FieldType(1))
19678 v0.AuxInt = boolToAuxInt(false)
19679 v.AddArg2(x, v0)
19680 return true
19681 }
19682 break
19683 }
19684
19685
19686 for {
19687 t := v.Type
19688 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19689 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
19690 continue
19691 }
19692 v.reset(OpMakeTuple)
19693 v0 := b.NewValue0(v.Pos, OpConst64, t.FieldType(0))
19694 v0.AuxInt = int64ToAuxInt(0)
19695 v1 := b.NewValue0(v.Pos, OpConstBool, t.FieldType(1))
19696 v1.AuxInt = boolToAuxInt(false)
19697 v.AddArg2(v0, v1)
19698 return true
19699 }
19700 break
19701 }
19702 return false
19703 }
19704 func rewriteValuegeneric_OpMul8(v *Value) bool {
19705 v_1 := v.Args[1]
19706 v_0 := v.Args[0]
19707 b := v.Block
19708 typ := &b.Func.Config.Types
19709
19710
19711 for {
19712 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19713 if v_0.Op != OpConst8 {
19714 continue
19715 }
19716 c := auxIntToInt8(v_0.AuxInt)
19717 if v_1.Op != OpConst8 {
19718 continue
19719 }
19720 d := auxIntToInt8(v_1.AuxInt)
19721 v.reset(OpConst8)
19722 v.AuxInt = int8ToAuxInt(c * d)
19723 return true
19724 }
19725 break
19726 }
19727
19728
19729 for {
19730 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19731 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 1 {
19732 continue
19733 }
19734 x := v_1
19735 v.copyOf(x)
19736 return true
19737 }
19738 break
19739 }
19740
19741
19742 for {
19743 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19744 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != -1 {
19745 continue
19746 }
19747 x := v_1
19748 v.reset(OpNeg8)
19749 v.AddArg(x)
19750 return true
19751 }
19752 break
19753 }
19754
19755
19756
19757 for {
19758 t := v.Type
19759 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19760 n := v_0
19761 if v_1.Op != OpConst8 {
19762 continue
19763 }
19764 c := auxIntToInt8(v_1.AuxInt)
19765 if !(isPowerOfTwo(c)) {
19766 continue
19767 }
19768 v.reset(OpLsh8x64)
19769 v.Type = t
19770 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
19771 v0.AuxInt = int64ToAuxInt(log8(c))
19772 v.AddArg2(n, v0)
19773 return true
19774 }
19775 break
19776 }
19777
19778
19779
19780 for {
19781 t := v.Type
19782 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19783 n := v_0
19784 if v_1.Op != OpConst8 {
19785 continue
19786 }
19787 c := auxIntToInt8(v_1.AuxInt)
19788 if !(t.IsSigned() && isPowerOfTwo(-c)) {
19789 continue
19790 }
19791 v.reset(OpNeg8)
19792 v0 := b.NewValue0(v.Pos, OpLsh8x64, t)
19793 v1 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
19794 v1.AuxInt = int64ToAuxInt(log8(-c))
19795 v0.AddArg2(n, v1)
19796 v.AddArg(v0)
19797 return true
19798 }
19799 break
19800 }
19801
19802
19803 for {
19804 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19805 if v_0.Op != OpConst8 {
19806 continue
19807 }
19808 t := v_0.Type
19809 c := auxIntToInt8(v_0.AuxInt)
19810 if v_1.Op != OpAdd8 || v_1.Type != t {
19811 continue
19812 }
19813 _ = v_1.Args[1]
19814 v_1_0 := v_1.Args[0]
19815 v_1_1 := v_1.Args[1]
19816 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
19817 if v_1_0.Op != OpConst8 || v_1_0.Type != t {
19818 continue
19819 }
19820 d := auxIntToInt8(v_1_0.AuxInt)
19821 x := v_1_1
19822 v.reset(OpAdd8)
19823 v0 := b.NewValue0(v.Pos, OpConst8, t)
19824 v0.AuxInt = int8ToAuxInt(c * d)
19825 v1 := b.NewValue0(v.Pos, OpMul8, t)
19826 v2 := b.NewValue0(v.Pos, OpConst8, t)
19827 v2.AuxInt = int8ToAuxInt(c)
19828 v1.AddArg2(v2, x)
19829 v.AddArg2(v0, v1)
19830 return true
19831 }
19832 }
19833 break
19834 }
19835
19836
19837 for {
19838 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19839 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 {
19840 continue
19841 }
19842 v.reset(OpConst8)
19843 v.AuxInt = int8ToAuxInt(0)
19844 return true
19845 }
19846 break
19847 }
19848
19849
19850
19851 for {
19852 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19853 if v_0.Op != OpMul8 {
19854 continue
19855 }
19856 _ = v_0.Args[1]
19857 v_0_0 := v_0.Args[0]
19858 v_0_1 := v_0.Args[1]
19859 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
19860 i := v_0_0
19861 if i.Op != OpConst8 {
19862 continue
19863 }
19864 t := i.Type
19865 z := v_0_1
19866 x := v_1
19867 if !(z.Op != OpConst8 && x.Op != OpConst8) {
19868 continue
19869 }
19870 v.reset(OpMul8)
19871 v0 := b.NewValue0(v.Pos, OpMul8, t)
19872 v0.AddArg2(x, z)
19873 v.AddArg2(i, v0)
19874 return true
19875 }
19876 }
19877 break
19878 }
19879
19880
19881 for {
19882 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19883 if v_0.Op != OpConst8 {
19884 continue
19885 }
19886 t := v_0.Type
19887 c := auxIntToInt8(v_0.AuxInt)
19888 if v_1.Op != OpMul8 {
19889 continue
19890 }
19891 _ = v_1.Args[1]
19892 v_1_0 := v_1.Args[0]
19893 v_1_1 := v_1.Args[1]
19894 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
19895 if v_1_0.Op != OpConst8 || v_1_0.Type != t {
19896 continue
19897 }
19898 d := auxIntToInt8(v_1_0.AuxInt)
19899 x := v_1_1
19900 v.reset(OpMul8)
19901 v0 := b.NewValue0(v.Pos, OpConst8, t)
19902 v0.AuxInt = int8ToAuxInt(c * d)
19903 v.AddArg2(v0, x)
19904 return true
19905 }
19906 }
19907 break
19908 }
19909 return false
19910 }
19911 func rewriteValuegeneric_OpNeg16(v *Value) bool {
19912 v_0 := v.Args[0]
19913 b := v.Block
19914
19915
19916 for {
19917 if v_0.Op != OpConst16 {
19918 break
19919 }
19920 c := auxIntToInt16(v_0.AuxInt)
19921 v.reset(OpConst16)
19922 v.AuxInt = int16ToAuxInt(-c)
19923 return true
19924 }
19925
19926
19927 for {
19928 if v_0.Op != OpSub16 {
19929 break
19930 }
19931 y := v_0.Args[1]
19932 x := v_0.Args[0]
19933 v.reset(OpSub16)
19934 v.AddArg2(y, x)
19935 return true
19936 }
19937
19938
19939 for {
19940 if v_0.Op != OpNeg16 {
19941 break
19942 }
19943 x := v_0.Args[0]
19944 v.copyOf(x)
19945 return true
19946 }
19947
19948
19949 for {
19950 t := v.Type
19951 if v_0.Op != OpCom16 {
19952 break
19953 }
19954 x := v_0.Args[0]
19955 v.reset(OpAdd16)
19956 v0 := b.NewValue0(v.Pos, OpConst16, t)
19957 v0.AuxInt = int16ToAuxInt(1)
19958 v.AddArg2(v0, x)
19959 return true
19960 }
19961 return false
19962 }
19963 func rewriteValuegeneric_OpNeg32(v *Value) bool {
19964 v_0 := v.Args[0]
19965 b := v.Block
19966
19967
19968 for {
19969 if v_0.Op != OpConst32 {
19970 break
19971 }
19972 c := auxIntToInt32(v_0.AuxInt)
19973 v.reset(OpConst32)
19974 v.AuxInt = int32ToAuxInt(-c)
19975 return true
19976 }
19977
19978
19979 for {
19980 if v_0.Op != OpSub32 {
19981 break
19982 }
19983 y := v_0.Args[1]
19984 x := v_0.Args[0]
19985 v.reset(OpSub32)
19986 v.AddArg2(y, x)
19987 return true
19988 }
19989
19990
19991 for {
19992 if v_0.Op != OpNeg32 {
19993 break
19994 }
19995 x := v_0.Args[0]
19996 v.copyOf(x)
19997 return true
19998 }
19999
20000
20001 for {
20002 t := v.Type
20003 if v_0.Op != OpCom32 {
20004 break
20005 }
20006 x := v_0.Args[0]
20007 v.reset(OpAdd32)
20008 v0 := b.NewValue0(v.Pos, OpConst32, t)
20009 v0.AuxInt = int32ToAuxInt(1)
20010 v.AddArg2(v0, x)
20011 return true
20012 }
20013 return false
20014 }
20015 func rewriteValuegeneric_OpNeg32F(v *Value) bool {
20016 v_0 := v.Args[0]
20017
20018
20019
20020 for {
20021 if v_0.Op != OpConst32F {
20022 break
20023 }
20024 c := auxIntToFloat32(v_0.AuxInt)
20025 if !(c != 0) {
20026 break
20027 }
20028 v.reset(OpConst32F)
20029 v.AuxInt = float32ToAuxInt(-c)
20030 return true
20031 }
20032 return false
20033 }
20034 func rewriteValuegeneric_OpNeg64(v *Value) bool {
20035 v_0 := v.Args[0]
20036 b := v.Block
20037
20038
20039 for {
20040 if v_0.Op != OpConst64 {
20041 break
20042 }
20043 c := auxIntToInt64(v_0.AuxInt)
20044 v.reset(OpConst64)
20045 v.AuxInt = int64ToAuxInt(-c)
20046 return true
20047 }
20048
20049
20050 for {
20051 if v_0.Op != OpSub64 {
20052 break
20053 }
20054 y := v_0.Args[1]
20055 x := v_0.Args[0]
20056 v.reset(OpSub64)
20057 v.AddArg2(y, x)
20058 return true
20059 }
20060
20061
20062 for {
20063 if v_0.Op != OpNeg64 {
20064 break
20065 }
20066 x := v_0.Args[0]
20067 v.copyOf(x)
20068 return true
20069 }
20070
20071
20072 for {
20073 t := v.Type
20074 if v_0.Op != OpCom64 {
20075 break
20076 }
20077 x := v_0.Args[0]
20078 v.reset(OpAdd64)
20079 v0 := b.NewValue0(v.Pos, OpConst64, t)
20080 v0.AuxInt = int64ToAuxInt(1)
20081 v.AddArg2(v0, x)
20082 return true
20083 }
20084 return false
20085 }
20086 func rewriteValuegeneric_OpNeg64F(v *Value) bool {
20087 v_0 := v.Args[0]
20088
20089
20090
20091 for {
20092 if v_0.Op != OpConst64F {
20093 break
20094 }
20095 c := auxIntToFloat64(v_0.AuxInt)
20096 if !(c != 0) {
20097 break
20098 }
20099 v.reset(OpConst64F)
20100 v.AuxInt = float64ToAuxInt(-c)
20101 return true
20102 }
20103 return false
20104 }
20105 func rewriteValuegeneric_OpNeg8(v *Value) bool {
20106 v_0 := v.Args[0]
20107 b := v.Block
20108
20109
20110 for {
20111 if v_0.Op != OpConst8 {
20112 break
20113 }
20114 c := auxIntToInt8(v_0.AuxInt)
20115 v.reset(OpConst8)
20116 v.AuxInt = int8ToAuxInt(-c)
20117 return true
20118 }
20119
20120
20121 for {
20122 if v_0.Op != OpSub8 {
20123 break
20124 }
20125 y := v_0.Args[1]
20126 x := v_0.Args[0]
20127 v.reset(OpSub8)
20128 v.AddArg2(y, x)
20129 return true
20130 }
20131
20132
20133 for {
20134 if v_0.Op != OpNeg8 {
20135 break
20136 }
20137 x := v_0.Args[0]
20138 v.copyOf(x)
20139 return true
20140 }
20141
20142
20143 for {
20144 t := v.Type
20145 if v_0.Op != OpCom8 {
20146 break
20147 }
20148 x := v_0.Args[0]
20149 v.reset(OpAdd8)
20150 v0 := b.NewValue0(v.Pos, OpConst8, t)
20151 v0.AuxInt = int8ToAuxInt(1)
20152 v.AddArg2(v0, x)
20153 return true
20154 }
20155 return false
20156 }
20157 func rewriteValuegeneric_OpNeq16(v *Value) bool {
20158 v_1 := v.Args[1]
20159 v_0 := v.Args[0]
20160 b := v.Block
20161 typ := &b.Func.Config.Types
20162
20163
20164 for {
20165 x := v_0
20166 if x != v_1 {
20167 break
20168 }
20169 v.reset(OpConstBool)
20170 v.AuxInt = boolToAuxInt(false)
20171 return true
20172 }
20173
20174
20175 for {
20176 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20177 if v_0.Op != OpConst16 {
20178 continue
20179 }
20180 t := v_0.Type
20181 c := auxIntToInt16(v_0.AuxInt)
20182 if v_1.Op != OpAdd16 {
20183 continue
20184 }
20185 _ = v_1.Args[1]
20186 v_1_0 := v_1.Args[0]
20187 v_1_1 := v_1.Args[1]
20188 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
20189 if v_1_0.Op != OpConst16 || v_1_0.Type != t {
20190 continue
20191 }
20192 d := auxIntToInt16(v_1_0.AuxInt)
20193 x := v_1_1
20194 v.reset(OpNeq16)
20195 v0 := b.NewValue0(v.Pos, OpConst16, t)
20196 v0.AuxInt = int16ToAuxInt(c - d)
20197 v.AddArg2(v0, x)
20198 return true
20199 }
20200 }
20201 break
20202 }
20203
20204
20205 for {
20206 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20207 if v_0.Op != OpConst16 {
20208 continue
20209 }
20210 c := auxIntToInt16(v_0.AuxInt)
20211 if v_1.Op != OpConst16 {
20212 continue
20213 }
20214 d := auxIntToInt16(v_1.AuxInt)
20215 v.reset(OpConstBool)
20216 v.AuxInt = boolToAuxInt(c != d)
20217 return true
20218 }
20219 break
20220 }
20221
20222
20223
20224 for {
20225 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20226 n := v_0
20227 if v_1.Op != OpLsh16x64 {
20228 continue
20229 }
20230 _ = v_1.Args[1]
20231 v_1_0 := v_1.Args[0]
20232 if v_1_0.Op != OpRsh16x64 {
20233 continue
20234 }
20235 _ = v_1_0.Args[1]
20236 v_1_0_0 := v_1_0.Args[0]
20237 if v_1_0_0.Op != OpAdd16 {
20238 continue
20239 }
20240 t := v_1_0_0.Type
20241 _ = v_1_0_0.Args[1]
20242 v_1_0_0_0 := v_1_0_0.Args[0]
20243 v_1_0_0_1 := v_1_0_0.Args[1]
20244 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 {
20245 if n != v_1_0_0_0 || v_1_0_0_1.Op != OpRsh16Ux64 || v_1_0_0_1.Type != t {
20246 continue
20247 }
20248 _ = v_1_0_0_1.Args[1]
20249 v_1_0_0_1_0 := v_1_0_0_1.Args[0]
20250 if v_1_0_0_1_0.Op != OpRsh16x64 || v_1_0_0_1_0.Type != t {
20251 continue
20252 }
20253 _ = v_1_0_0_1_0.Args[1]
20254 if n != v_1_0_0_1_0.Args[0] {
20255 continue
20256 }
20257 v_1_0_0_1_0_1 := v_1_0_0_1_0.Args[1]
20258 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 {
20259 continue
20260 }
20261 v_1_0_0_1_1 := v_1_0_0_1.Args[1]
20262 if v_1_0_0_1_1.Op != OpConst64 || v_1_0_0_1_1.Type != typ.UInt64 {
20263 continue
20264 }
20265 kbar := auxIntToInt64(v_1_0_0_1_1.AuxInt)
20266 v_1_0_1 := v_1_0.Args[1]
20267 if v_1_0_1.Op != OpConst64 || v_1_0_1.Type != typ.UInt64 {
20268 continue
20269 }
20270 k := auxIntToInt64(v_1_0_1.AuxInt)
20271 v_1_1 := v_1.Args[1]
20272 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) {
20273 continue
20274 }
20275 v.reset(OpNeq16)
20276 v0 := b.NewValue0(v.Pos, OpAnd16, t)
20277 v1 := b.NewValue0(v.Pos, OpConst16, t)
20278 v1.AuxInt = int16ToAuxInt(1<<uint(k) - 1)
20279 v0.AddArg2(n, v1)
20280 v2 := b.NewValue0(v.Pos, OpConst16, t)
20281 v2.AuxInt = int16ToAuxInt(0)
20282 v.AddArg2(v0, v2)
20283 return true
20284 }
20285 }
20286 break
20287 }
20288
20289
20290
20291 for {
20292 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20293 s := v_0
20294 if s.Op != OpSub16 {
20295 continue
20296 }
20297 y := s.Args[1]
20298 x := s.Args[0]
20299 if v_1.Op != OpConst16 || auxIntToInt16(v_1.AuxInt) != 0 || !(s.Uses == 1) {
20300 continue
20301 }
20302 v.reset(OpNeq16)
20303 v.AddArg2(x, y)
20304 return true
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 if v_0.Op != OpAnd16 {
20314 continue
20315 }
20316 t := v_0.Type
20317 _ = v_0.Args[1]
20318 v_0_0 := v_0.Args[0]
20319 v_0_1 := v_0.Args[1]
20320 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
20321 x := v_0_0
20322 if v_0_1.Op != OpConst16 || v_0_1.Type != t {
20323 continue
20324 }
20325 y := auxIntToInt16(v_0_1.AuxInt)
20326 if v_1.Op != OpConst16 || v_1.Type != t || auxIntToInt16(v_1.AuxInt) != y || !(oneBit16(y)) {
20327 continue
20328 }
20329 v.reset(OpEq16)
20330 v0 := b.NewValue0(v.Pos, OpAnd16, t)
20331 v1 := b.NewValue0(v.Pos, OpConst16, t)
20332 v1.AuxInt = int16ToAuxInt(y)
20333 v0.AddArg2(x, v1)
20334 v2 := b.NewValue0(v.Pos, OpConst16, t)
20335 v2.AuxInt = int16ToAuxInt(0)
20336 v.AddArg2(v0, v2)
20337 return true
20338 }
20339 }
20340 break
20341 }
20342 return false
20343 }
20344 func rewriteValuegeneric_OpNeq32(v *Value) bool {
20345 v_1 := v.Args[1]
20346 v_0 := v.Args[0]
20347 b := v.Block
20348 typ := &b.Func.Config.Types
20349
20350
20351 for {
20352 x := v_0
20353 if x != v_1 {
20354 break
20355 }
20356 v.reset(OpConstBool)
20357 v.AuxInt = boolToAuxInt(false)
20358 return true
20359 }
20360
20361
20362 for {
20363 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20364 if v_0.Op != OpConst32 {
20365 continue
20366 }
20367 t := v_0.Type
20368 c := auxIntToInt32(v_0.AuxInt)
20369 if v_1.Op != OpAdd32 {
20370 continue
20371 }
20372 _ = v_1.Args[1]
20373 v_1_0 := v_1.Args[0]
20374 v_1_1 := v_1.Args[1]
20375 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
20376 if v_1_0.Op != OpConst32 || v_1_0.Type != t {
20377 continue
20378 }
20379 d := auxIntToInt32(v_1_0.AuxInt)
20380 x := v_1_1
20381 v.reset(OpNeq32)
20382 v0 := b.NewValue0(v.Pos, OpConst32, t)
20383 v0.AuxInt = int32ToAuxInt(c - d)
20384 v.AddArg2(v0, x)
20385 return true
20386 }
20387 }
20388 break
20389 }
20390
20391
20392 for {
20393 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20394 if v_0.Op != OpConst32 {
20395 continue
20396 }
20397 c := auxIntToInt32(v_0.AuxInt)
20398 if v_1.Op != OpConst32 {
20399 continue
20400 }
20401 d := auxIntToInt32(v_1.AuxInt)
20402 v.reset(OpConstBool)
20403 v.AuxInt = boolToAuxInt(c != d)
20404 return true
20405 }
20406 break
20407 }
20408
20409
20410
20411 for {
20412 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20413 n := v_0
20414 if v_1.Op != OpLsh32x64 {
20415 continue
20416 }
20417 _ = v_1.Args[1]
20418 v_1_0 := v_1.Args[0]
20419 if v_1_0.Op != OpRsh32x64 {
20420 continue
20421 }
20422 _ = v_1_0.Args[1]
20423 v_1_0_0 := v_1_0.Args[0]
20424 if v_1_0_0.Op != OpAdd32 {
20425 continue
20426 }
20427 t := v_1_0_0.Type
20428 _ = v_1_0_0.Args[1]
20429 v_1_0_0_0 := v_1_0_0.Args[0]
20430 v_1_0_0_1 := v_1_0_0.Args[1]
20431 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 {
20432 if n != v_1_0_0_0 || v_1_0_0_1.Op != OpRsh32Ux64 || v_1_0_0_1.Type != t {
20433 continue
20434 }
20435 _ = v_1_0_0_1.Args[1]
20436 v_1_0_0_1_0 := v_1_0_0_1.Args[0]
20437 if v_1_0_0_1_0.Op != OpRsh32x64 || v_1_0_0_1_0.Type != t {
20438 continue
20439 }
20440 _ = v_1_0_0_1_0.Args[1]
20441 if n != v_1_0_0_1_0.Args[0] {
20442 continue
20443 }
20444 v_1_0_0_1_0_1 := v_1_0_0_1_0.Args[1]
20445 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 {
20446 continue
20447 }
20448 v_1_0_0_1_1 := v_1_0_0_1.Args[1]
20449 if v_1_0_0_1_1.Op != OpConst64 || v_1_0_0_1_1.Type != typ.UInt64 {
20450 continue
20451 }
20452 kbar := auxIntToInt64(v_1_0_0_1_1.AuxInt)
20453 v_1_0_1 := v_1_0.Args[1]
20454 if v_1_0_1.Op != OpConst64 || v_1_0_1.Type != typ.UInt64 {
20455 continue
20456 }
20457 k := auxIntToInt64(v_1_0_1.AuxInt)
20458 v_1_1 := v_1.Args[1]
20459 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) {
20460 continue
20461 }
20462 v.reset(OpNeq32)
20463 v0 := b.NewValue0(v.Pos, OpAnd32, t)
20464 v1 := b.NewValue0(v.Pos, OpConst32, t)
20465 v1.AuxInt = int32ToAuxInt(1<<uint(k) - 1)
20466 v0.AddArg2(n, v1)
20467 v2 := b.NewValue0(v.Pos, OpConst32, t)
20468 v2.AuxInt = int32ToAuxInt(0)
20469 v.AddArg2(v0, v2)
20470 return true
20471 }
20472 }
20473 break
20474 }
20475
20476
20477
20478 for {
20479 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20480 s := v_0
20481 if s.Op != OpSub32 {
20482 continue
20483 }
20484 y := s.Args[1]
20485 x := s.Args[0]
20486 if v_1.Op != OpConst32 || auxIntToInt32(v_1.AuxInt) != 0 || !(s.Uses == 1) {
20487 continue
20488 }
20489 v.reset(OpNeq32)
20490 v.AddArg2(x, y)
20491 return true
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 if v_0.Op != OpAnd32 {
20501 continue
20502 }
20503 t := v_0.Type
20504 _ = v_0.Args[1]
20505 v_0_0 := v_0.Args[0]
20506 v_0_1 := v_0.Args[1]
20507 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
20508 x := v_0_0
20509 if v_0_1.Op != OpConst32 || v_0_1.Type != t {
20510 continue
20511 }
20512 y := auxIntToInt32(v_0_1.AuxInt)
20513 if v_1.Op != OpConst32 || v_1.Type != t || auxIntToInt32(v_1.AuxInt) != y || !(oneBit32(y)) {
20514 continue
20515 }
20516 v.reset(OpEq32)
20517 v0 := b.NewValue0(v.Pos, OpAnd32, t)
20518 v1 := b.NewValue0(v.Pos, OpConst32, t)
20519 v1.AuxInt = int32ToAuxInt(y)
20520 v0.AddArg2(x, v1)
20521 v2 := b.NewValue0(v.Pos, OpConst32, t)
20522 v2.AuxInt = int32ToAuxInt(0)
20523 v.AddArg2(v0, v2)
20524 return true
20525 }
20526 }
20527 break
20528 }
20529 return false
20530 }
20531 func rewriteValuegeneric_OpNeq32F(v *Value) bool {
20532 v_1 := v.Args[1]
20533 v_0 := v.Args[0]
20534
20535
20536 for {
20537 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20538 if v_0.Op != OpConst32F {
20539 continue
20540 }
20541 c := auxIntToFloat32(v_0.AuxInt)
20542 if v_1.Op != OpConst32F {
20543 continue
20544 }
20545 d := auxIntToFloat32(v_1.AuxInt)
20546 v.reset(OpConstBool)
20547 v.AuxInt = boolToAuxInt(c != d)
20548 return true
20549 }
20550 break
20551 }
20552 return false
20553 }
20554 func rewriteValuegeneric_OpNeq64(v *Value) bool {
20555 v_1 := v.Args[1]
20556 v_0 := v.Args[0]
20557 b := v.Block
20558 typ := &b.Func.Config.Types
20559
20560
20561 for {
20562 x := v_0
20563 if x != v_1 {
20564 break
20565 }
20566 v.reset(OpConstBool)
20567 v.AuxInt = boolToAuxInt(false)
20568 return true
20569 }
20570
20571
20572 for {
20573 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20574 if v_0.Op != OpConst64 {
20575 continue
20576 }
20577 t := v_0.Type
20578 c := auxIntToInt64(v_0.AuxInt)
20579 if v_1.Op != OpAdd64 {
20580 continue
20581 }
20582 _ = v_1.Args[1]
20583 v_1_0 := v_1.Args[0]
20584 v_1_1 := v_1.Args[1]
20585 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
20586 if v_1_0.Op != OpConst64 || v_1_0.Type != t {
20587 continue
20588 }
20589 d := auxIntToInt64(v_1_0.AuxInt)
20590 x := v_1_1
20591 v.reset(OpNeq64)
20592 v0 := b.NewValue0(v.Pos, OpConst64, t)
20593 v0.AuxInt = int64ToAuxInt(c - d)
20594 v.AddArg2(v0, x)
20595 return true
20596 }
20597 }
20598 break
20599 }
20600
20601
20602 for {
20603 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20604 if v_0.Op != OpConst64 {
20605 continue
20606 }
20607 c := auxIntToInt64(v_0.AuxInt)
20608 if v_1.Op != OpConst64 {
20609 continue
20610 }
20611 d := auxIntToInt64(v_1.AuxInt)
20612 v.reset(OpConstBool)
20613 v.AuxInt = boolToAuxInt(c != d)
20614 return true
20615 }
20616 break
20617 }
20618
20619
20620
20621 for {
20622 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20623 n := v_0
20624 if v_1.Op != OpLsh64x64 {
20625 continue
20626 }
20627 _ = v_1.Args[1]
20628 v_1_0 := v_1.Args[0]
20629 if v_1_0.Op != OpRsh64x64 {
20630 continue
20631 }
20632 _ = v_1_0.Args[1]
20633 v_1_0_0 := v_1_0.Args[0]
20634 if v_1_0_0.Op != OpAdd64 {
20635 continue
20636 }
20637 t := v_1_0_0.Type
20638 _ = v_1_0_0.Args[1]
20639 v_1_0_0_0 := v_1_0_0.Args[0]
20640 v_1_0_0_1 := v_1_0_0.Args[1]
20641 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 {
20642 if n != v_1_0_0_0 || v_1_0_0_1.Op != OpRsh64Ux64 || v_1_0_0_1.Type != t {
20643 continue
20644 }
20645 _ = v_1_0_0_1.Args[1]
20646 v_1_0_0_1_0 := v_1_0_0_1.Args[0]
20647 if v_1_0_0_1_0.Op != OpRsh64x64 || v_1_0_0_1_0.Type != t {
20648 continue
20649 }
20650 _ = v_1_0_0_1_0.Args[1]
20651 if n != v_1_0_0_1_0.Args[0] {
20652 continue
20653 }
20654 v_1_0_0_1_0_1 := v_1_0_0_1_0.Args[1]
20655 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 {
20656 continue
20657 }
20658 v_1_0_0_1_1 := v_1_0_0_1.Args[1]
20659 if v_1_0_0_1_1.Op != OpConst64 || v_1_0_0_1_1.Type != typ.UInt64 {
20660 continue
20661 }
20662 kbar := auxIntToInt64(v_1_0_0_1_1.AuxInt)
20663 v_1_0_1 := v_1_0.Args[1]
20664 if v_1_0_1.Op != OpConst64 || v_1_0_1.Type != typ.UInt64 {
20665 continue
20666 }
20667 k := auxIntToInt64(v_1_0_1.AuxInt)
20668 v_1_1 := v_1.Args[1]
20669 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) {
20670 continue
20671 }
20672 v.reset(OpNeq64)
20673 v0 := b.NewValue0(v.Pos, OpAnd64, t)
20674 v1 := b.NewValue0(v.Pos, OpConst64, t)
20675 v1.AuxInt = int64ToAuxInt(1<<uint(k) - 1)
20676 v0.AddArg2(n, v1)
20677 v2 := b.NewValue0(v.Pos, OpConst64, t)
20678 v2.AuxInt = int64ToAuxInt(0)
20679 v.AddArg2(v0, v2)
20680 return true
20681 }
20682 }
20683 break
20684 }
20685
20686
20687
20688 for {
20689 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20690 s := v_0
20691 if s.Op != OpSub64 {
20692 continue
20693 }
20694 y := s.Args[1]
20695 x := s.Args[0]
20696 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 0 || !(s.Uses == 1) {
20697 continue
20698 }
20699 v.reset(OpNeq64)
20700 v.AddArg2(x, y)
20701 return true
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 if v_0.Op != OpAnd64 {
20711 continue
20712 }
20713 t := v_0.Type
20714 _ = v_0.Args[1]
20715 v_0_0 := v_0.Args[0]
20716 v_0_1 := v_0.Args[1]
20717 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
20718 x := v_0_0
20719 if v_0_1.Op != OpConst64 || v_0_1.Type != t {
20720 continue
20721 }
20722 y := auxIntToInt64(v_0_1.AuxInt)
20723 if v_1.Op != OpConst64 || v_1.Type != t || auxIntToInt64(v_1.AuxInt) != y || !(oneBit64(y)) {
20724 continue
20725 }
20726 v.reset(OpEq64)
20727 v0 := b.NewValue0(v.Pos, OpAnd64, t)
20728 v1 := b.NewValue0(v.Pos, OpConst64, t)
20729 v1.AuxInt = int64ToAuxInt(y)
20730 v0.AddArg2(x, v1)
20731 v2 := b.NewValue0(v.Pos, OpConst64, t)
20732 v2.AuxInt = int64ToAuxInt(0)
20733 v.AddArg2(v0, v2)
20734 return true
20735 }
20736 }
20737 break
20738 }
20739 return false
20740 }
20741 func rewriteValuegeneric_OpNeq64F(v *Value) bool {
20742 v_1 := v.Args[1]
20743 v_0 := v.Args[0]
20744
20745
20746 for {
20747 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20748 if v_0.Op != OpConst64F {
20749 continue
20750 }
20751 c := auxIntToFloat64(v_0.AuxInt)
20752 if v_1.Op != OpConst64F {
20753 continue
20754 }
20755 d := auxIntToFloat64(v_1.AuxInt)
20756 v.reset(OpConstBool)
20757 v.AuxInt = boolToAuxInt(c != d)
20758 return true
20759 }
20760 break
20761 }
20762 return false
20763 }
20764 func rewriteValuegeneric_OpNeq8(v *Value) bool {
20765 v_1 := v.Args[1]
20766 v_0 := v.Args[0]
20767 b := v.Block
20768 typ := &b.Func.Config.Types
20769
20770
20771 for {
20772 x := v_0
20773 if x != v_1 {
20774 break
20775 }
20776 v.reset(OpConstBool)
20777 v.AuxInt = boolToAuxInt(false)
20778 return true
20779 }
20780
20781
20782 for {
20783 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20784 if v_0.Op != OpConst8 {
20785 continue
20786 }
20787 t := v_0.Type
20788 c := auxIntToInt8(v_0.AuxInt)
20789 if v_1.Op != OpAdd8 {
20790 continue
20791 }
20792 _ = v_1.Args[1]
20793 v_1_0 := v_1.Args[0]
20794 v_1_1 := v_1.Args[1]
20795 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
20796 if v_1_0.Op != OpConst8 || v_1_0.Type != t {
20797 continue
20798 }
20799 d := auxIntToInt8(v_1_0.AuxInt)
20800 x := v_1_1
20801 v.reset(OpNeq8)
20802 v0 := b.NewValue0(v.Pos, OpConst8, t)
20803 v0.AuxInt = int8ToAuxInt(c - d)
20804 v.AddArg2(v0, x)
20805 return true
20806 }
20807 }
20808 break
20809 }
20810
20811
20812 for {
20813 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20814 if v_0.Op != OpConst8 {
20815 continue
20816 }
20817 c := auxIntToInt8(v_0.AuxInt)
20818 if v_1.Op != OpConst8 {
20819 continue
20820 }
20821 d := auxIntToInt8(v_1.AuxInt)
20822 v.reset(OpConstBool)
20823 v.AuxInt = boolToAuxInt(c != d)
20824 return true
20825 }
20826 break
20827 }
20828
20829
20830
20831 for {
20832 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20833 n := v_0
20834 if v_1.Op != OpLsh8x64 {
20835 continue
20836 }
20837 _ = v_1.Args[1]
20838 v_1_0 := v_1.Args[0]
20839 if v_1_0.Op != OpRsh8x64 {
20840 continue
20841 }
20842 _ = v_1_0.Args[1]
20843 v_1_0_0 := v_1_0.Args[0]
20844 if v_1_0_0.Op != OpAdd8 {
20845 continue
20846 }
20847 t := v_1_0_0.Type
20848 _ = v_1_0_0.Args[1]
20849 v_1_0_0_0 := v_1_0_0.Args[0]
20850 v_1_0_0_1 := v_1_0_0.Args[1]
20851 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 {
20852 if n != v_1_0_0_0 || v_1_0_0_1.Op != OpRsh8Ux64 || v_1_0_0_1.Type != t {
20853 continue
20854 }
20855 _ = v_1_0_0_1.Args[1]
20856 v_1_0_0_1_0 := v_1_0_0_1.Args[0]
20857 if v_1_0_0_1_0.Op != OpRsh8x64 || v_1_0_0_1_0.Type != t {
20858 continue
20859 }
20860 _ = v_1_0_0_1_0.Args[1]
20861 if n != v_1_0_0_1_0.Args[0] {
20862 continue
20863 }
20864 v_1_0_0_1_0_1 := v_1_0_0_1_0.Args[1]
20865 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 {
20866 continue
20867 }
20868 v_1_0_0_1_1 := v_1_0_0_1.Args[1]
20869 if v_1_0_0_1_1.Op != OpConst64 || v_1_0_0_1_1.Type != typ.UInt64 {
20870 continue
20871 }
20872 kbar := auxIntToInt64(v_1_0_0_1_1.AuxInt)
20873 v_1_0_1 := v_1_0.Args[1]
20874 if v_1_0_1.Op != OpConst64 || v_1_0_1.Type != typ.UInt64 {
20875 continue
20876 }
20877 k := auxIntToInt64(v_1_0_1.AuxInt)
20878 v_1_1 := v_1.Args[1]
20879 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) {
20880 continue
20881 }
20882 v.reset(OpNeq8)
20883 v0 := b.NewValue0(v.Pos, OpAnd8, t)
20884 v1 := b.NewValue0(v.Pos, OpConst8, t)
20885 v1.AuxInt = int8ToAuxInt(1<<uint(k) - 1)
20886 v0.AddArg2(n, v1)
20887 v2 := b.NewValue0(v.Pos, OpConst8, t)
20888 v2.AuxInt = int8ToAuxInt(0)
20889 v.AddArg2(v0, v2)
20890 return true
20891 }
20892 }
20893 break
20894 }
20895
20896
20897
20898 for {
20899 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20900 s := v_0
20901 if s.Op != OpSub8 {
20902 continue
20903 }
20904 y := s.Args[1]
20905 x := s.Args[0]
20906 if v_1.Op != OpConst8 || auxIntToInt8(v_1.AuxInt) != 0 || !(s.Uses == 1) {
20907 continue
20908 }
20909 v.reset(OpNeq8)
20910 v.AddArg2(x, y)
20911 return true
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 if v_0.Op != OpAnd8 {
20921 continue
20922 }
20923 t := v_0.Type
20924 _ = v_0.Args[1]
20925 v_0_0 := v_0.Args[0]
20926 v_0_1 := v_0.Args[1]
20927 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
20928 x := v_0_0
20929 if v_0_1.Op != OpConst8 || v_0_1.Type != t {
20930 continue
20931 }
20932 y := auxIntToInt8(v_0_1.AuxInt)
20933 if v_1.Op != OpConst8 || v_1.Type != t || auxIntToInt8(v_1.AuxInt) != y || !(oneBit8(y)) {
20934 continue
20935 }
20936 v.reset(OpEq8)
20937 v0 := b.NewValue0(v.Pos, OpAnd8, t)
20938 v1 := b.NewValue0(v.Pos, OpConst8, t)
20939 v1.AuxInt = int8ToAuxInt(y)
20940 v0.AddArg2(x, v1)
20941 v2 := b.NewValue0(v.Pos, OpConst8, t)
20942 v2.AuxInt = int8ToAuxInt(0)
20943 v.AddArg2(v0, v2)
20944 return true
20945 }
20946 }
20947 break
20948 }
20949 return false
20950 }
20951 func rewriteValuegeneric_OpNeqB(v *Value) bool {
20952 v_1 := v.Args[1]
20953 v_0 := v.Args[0]
20954
20955
20956 for {
20957 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20958 if v_0.Op != OpConstBool {
20959 continue
20960 }
20961 c := auxIntToBool(v_0.AuxInt)
20962 if v_1.Op != OpConstBool {
20963 continue
20964 }
20965 d := auxIntToBool(v_1.AuxInt)
20966 v.reset(OpConstBool)
20967 v.AuxInt = boolToAuxInt(c != d)
20968 return true
20969 }
20970 break
20971 }
20972
20973
20974 for {
20975 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20976 if v_0.Op != OpConstBool || auxIntToBool(v_0.AuxInt) != false {
20977 continue
20978 }
20979 x := v_1
20980 v.copyOf(x)
20981 return true
20982 }
20983 break
20984 }
20985
20986
20987 for {
20988 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20989 if v_0.Op != OpConstBool || auxIntToBool(v_0.AuxInt) != true {
20990 continue
20991 }
20992 x := v_1
20993 v.reset(OpNot)
20994 v.AddArg(x)
20995 return true
20996 }
20997 break
20998 }
20999
21000
21001 for {
21002 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
21003 if v_0.Op != OpNot {
21004 continue
21005 }
21006 x := v_0.Args[0]
21007 if v_1.Op != OpNot {
21008 continue
21009 }
21010 y := v_1.Args[0]
21011 v.reset(OpNeqB)
21012 v.AddArg2(x, y)
21013 return true
21014 }
21015 break
21016 }
21017 return false
21018 }
21019 func rewriteValuegeneric_OpNeqInter(v *Value) bool {
21020 v_1 := v.Args[1]
21021 v_0 := v.Args[0]
21022 b := v.Block
21023 typ := &b.Func.Config.Types
21024
21025
21026 for {
21027 x := v_0
21028 y := v_1
21029 v.reset(OpNeqPtr)
21030 v0 := b.NewValue0(v.Pos, OpITab, typ.Uintptr)
21031 v0.AddArg(x)
21032 v1 := b.NewValue0(v.Pos, OpITab, typ.Uintptr)
21033 v1.AddArg(y)
21034 v.AddArg2(v0, v1)
21035 return true
21036 }
21037 }
21038 func rewriteValuegeneric_OpNeqPtr(v *Value) bool {
21039 v_1 := v.Args[1]
21040 v_0 := v.Args[0]
21041
21042
21043 for {
21044 x := v_0
21045 if x != v_1 {
21046 break
21047 }
21048 v.reset(OpConstBool)
21049 v.AuxInt = boolToAuxInt(false)
21050 return true
21051 }
21052
21053
21054 for {
21055 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
21056 if v_0.Op != OpAddr {
21057 continue
21058 }
21059 x := auxToSym(v_0.Aux)
21060 if v_1.Op != OpAddr {
21061 continue
21062 }
21063 y := auxToSym(v_1.Aux)
21064 v.reset(OpConstBool)
21065 v.AuxInt = boolToAuxInt(x != y)
21066 return true
21067 }
21068 break
21069 }
21070
21071
21072 for {
21073 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
21074 if v_0.Op != OpAddr {
21075 continue
21076 }
21077 x := auxToSym(v_0.Aux)
21078 if v_1.Op != OpOffPtr {
21079 continue
21080 }
21081 o := auxIntToInt64(v_1.AuxInt)
21082 v_1_0 := v_1.Args[0]
21083 if v_1_0.Op != OpAddr {
21084 continue
21085 }
21086 y := auxToSym(v_1_0.Aux)
21087 v.reset(OpConstBool)
21088 v.AuxInt = boolToAuxInt(x != y || o != 0)
21089 return true
21090 }
21091 break
21092 }
21093
21094
21095 for {
21096 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
21097 if v_0.Op != OpOffPtr {
21098 continue
21099 }
21100 o1 := auxIntToInt64(v_0.AuxInt)
21101 v_0_0 := v_0.Args[0]
21102 if v_0_0.Op != OpAddr {
21103 continue
21104 }
21105 x := auxToSym(v_0_0.Aux)
21106 if v_1.Op != OpOffPtr {
21107 continue
21108 }
21109 o2 := auxIntToInt64(v_1.AuxInt)
21110 v_1_0 := v_1.Args[0]
21111 if v_1_0.Op != OpAddr {
21112 continue
21113 }
21114 y := auxToSym(v_1_0.Aux)
21115 v.reset(OpConstBool)
21116 v.AuxInt = boolToAuxInt(x != y || o1 != o2)
21117 return true
21118 }
21119 break
21120 }
21121
21122
21123 for {
21124 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
21125 if v_0.Op != OpLocalAddr {
21126 continue
21127 }
21128 x := auxToSym(v_0.Aux)
21129 if v_1.Op != OpLocalAddr {
21130 continue
21131 }
21132 y := auxToSym(v_1.Aux)
21133 v.reset(OpConstBool)
21134 v.AuxInt = boolToAuxInt(x != y)
21135 return true
21136 }
21137 break
21138 }
21139
21140
21141 for {
21142 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
21143 if v_0.Op != OpLocalAddr {
21144 continue
21145 }
21146 x := auxToSym(v_0.Aux)
21147 if v_1.Op != OpOffPtr {
21148 continue
21149 }
21150 o := auxIntToInt64(v_1.AuxInt)
21151 v_1_0 := v_1.Args[0]
21152 if v_1_0.Op != OpLocalAddr {
21153 continue
21154 }
21155 y := auxToSym(v_1_0.Aux)
21156 v.reset(OpConstBool)
21157 v.AuxInt = boolToAuxInt(x != y || o != 0)
21158 return true
21159 }
21160 break
21161 }
21162
21163
21164 for {
21165 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
21166 if v_0.Op != OpOffPtr {
21167 continue
21168 }
21169 o1 := auxIntToInt64(v_0.AuxInt)
21170 v_0_0 := v_0.Args[0]
21171 if v_0_0.Op != OpLocalAddr {
21172 continue
21173 }
21174 x := auxToSym(v_0_0.Aux)
21175 if v_1.Op != OpOffPtr {
21176 continue
21177 }
21178 o2 := auxIntToInt64(v_1.AuxInt)
21179 v_1_0 := v_1.Args[0]
21180 if v_1_0.Op != OpLocalAddr {
21181 continue
21182 }
21183 y := auxToSym(v_1_0.Aux)
21184 v.reset(OpConstBool)
21185 v.AuxInt = boolToAuxInt(x != y || o1 != o2)
21186 return true
21187 }
21188 break
21189 }
21190
21191
21192
21193 for {
21194 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
21195 if v_0.Op != OpOffPtr {
21196 continue
21197 }
21198 o1 := auxIntToInt64(v_0.AuxInt)
21199 p1 := v_0.Args[0]
21200 p2 := v_1
21201 if !(isSamePtr(p1, p2)) {
21202 continue
21203 }
21204 v.reset(OpConstBool)
21205 v.AuxInt = boolToAuxInt(o1 != 0)
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 if v_1.Op != OpOffPtr {
21221 continue
21222 }
21223 o2 := auxIntToInt64(v_1.AuxInt)
21224 p2 := v_1.Args[0]
21225 if !(isSamePtr(p1, p2)) {
21226 continue
21227 }
21228 v.reset(OpConstBool)
21229 v.AuxInt = boolToAuxInt(o1 != o2)
21230 return true
21231 }
21232 break
21233 }
21234
21235
21236 for {
21237 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
21238 if v_0.Op != OpConst32 {
21239 continue
21240 }
21241 c := auxIntToInt32(v_0.AuxInt)
21242 if v_1.Op != OpConst32 {
21243 continue
21244 }
21245 d := auxIntToInt32(v_1.AuxInt)
21246 v.reset(OpConstBool)
21247 v.AuxInt = boolToAuxInt(c != d)
21248 return true
21249 }
21250 break
21251 }
21252
21253
21254 for {
21255 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
21256 if v_0.Op != OpConst64 {
21257 continue
21258 }
21259 c := auxIntToInt64(v_0.AuxInt)
21260 if v_1.Op != OpConst64 {
21261 continue
21262 }
21263 d := auxIntToInt64(v_1.AuxInt)
21264 v.reset(OpConstBool)
21265 v.AuxInt = boolToAuxInt(c != d)
21266 return true
21267 }
21268 break
21269 }
21270
21271
21272 for {
21273 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
21274 if v_0.Op != OpConvert {
21275 continue
21276 }
21277 v_0_0 := v_0.Args[0]
21278 if v_0_0.Op != OpAddr {
21279 continue
21280 }
21281 x := auxToSym(v_0_0.Aux)
21282 if v_1.Op != OpAddr {
21283 continue
21284 }
21285 y := auxToSym(v_1.Aux)
21286 v.reset(OpConstBool)
21287 v.AuxInt = boolToAuxInt(x != y)
21288 return true
21289 }
21290 break
21291 }
21292
21293
21294 for {
21295 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
21296 if v_0.Op != OpLocalAddr || v_1.Op != OpAddr {
21297 continue
21298 }
21299 v.reset(OpConstBool)
21300 v.AuxInt = boolToAuxInt(true)
21301 return true
21302 }
21303 break
21304 }
21305
21306
21307 for {
21308 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
21309 if v_0.Op != OpOffPtr {
21310 continue
21311 }
21312 v_0_0 := v_0.Args[0]
21313 if v_0_0.Op != OpLocalAddr || v_1.Op != OpAddr {
21314 continue
21315 }
21316 v.reset(OpConstBool)
21317 v.AuxInt = boolToAuxInt(true)
21318 return true
21319 }
21320 break
21321 }
21322
21323
21324 for {
21325 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
21326 if v_0.Op != OpLocalAddr || v_1.Op != OpOffPtr {
21327 continue
21328 }
21329 v_1_0 := v_1.Args[0]
21330 if v_1_0.Op != OpAddr {
21331 continue
21332 }
21333 v.reset(OpConstBool)
21334 v.AuxInt = boolToAuxInt(true)
21335 return true
21336 }
21337 break
21338 }
21339
21340
21341 for {
21342 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
21343 if v_0.Op != OpOffPtr {
21344 continue
21345 }
21346 v_0_0 := v_0.Args[0]
21347 if v_0_0.Op != OpLocalAddr || v_1.Op != OpOffPtr {
21348 continue
21349 }
21350 v_1_0 := v_1.Args[0]
21351 if v_1_0.Op != OpAddr {
21352 continue
21353 }
21354 v.reset(OpConstBool)
21355 v.AuxInt = boolToAuxInt(true)
21356 return true
21357 }
21358 break
21359 }
21360
21361
21362
21363 for {
21364 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
21365 if v_0.Op != OpAddPtr {
21366 continue
21367 }
21368 o1 := v_0.Args[1]
21369 p1 := v_0.Args[0]
21370 p2 := v_1
21371 if !(isSamePtr(p1, p2)) {
21372 continue
21373 }
21374 v.reset(OpIsNonNil)
21375 v.AddArg(o1)
21376 return true
21377 }
21378 break
21379 }
21380
21381
21382 for {
21383 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
21384 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
21385 continue
21386 }
21387 p := v_1
21388 v.reset(OpIsNonNil)
21389 v.AddArg(p)
21390 return true
21391 }
21392 break
21393 }
21394
21395
21396 for {
21397 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
21398 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
21399 continue
21400 }
21401 p := v_1
21402 v.reset(OpIsNonNil)
21403 v.AddArg(p)
21404 return true
21405 }
21406 break
21407 }
21408
21409
21410 for {
21411 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
21412 if v_0.Op != OpConstNil {
21413 continue
21414 }
21415 p := v_1
21416 v.reset(OpIsNonNil)
21417 v.AddArg(p)
21418 return true
21419 }
21420 break
21421 }
21422 return false
21423 }
21424 func rewriteValuegeneric_OpNeqSlice(v *Value) bool {
21425 v_1 := v.Args[1]
21426 v_0 := v.Args[0]
21427 b := v.Block
21428 typ := &b.Func.Config.Types
21429
21430
21431 for {
21432 x := v_0
21433 y := v_1
21434 v.reset(OpNeqPtr)
21435 v0 := b.NewValue0(v.Pos, OpSlicePtr, typ.BytePtr)
21436 v0.AddArg(x)
21437 v1 := b.NewValue0(v.Pos, OpSlicePtr, typ.BytePtr)
21438 v1.AddArg(y)
21439 v.AddArg2(v0, v1)
21440 return true
21441 }
21442 }
21443 func rewriteValuegeneric_OpNilCheck(v *Value) bool {
21444 v_1 := v.Args[1]
21445 v_0 := v.Args[0]
21446 b := v.Block
21447 fe := b.Func.fe
21448
21449
21450 for {
21451 ptr := v_0
21452 if ptr.Op != OpGetG {
21453 break
21454 }
21455 mem := ptr.Args[0]
21456 if mem != v_1 {
21457 break
21458 }
21459 v.copyOf(ptr)
21460 return true
21461 }
21462
21463
21464
21465 for {
21466 ptr := v_0
21467 if ptr.Op != OpSelectN || auxIntToInt64(ptr.AuxInt) != 0 {
21468 break
21469 }
21470 call := ptr.Args[0]
21471 if call.Op != OpStaticLECall || len(call.Args) != 2 || !(isSameCall(call.Aux, "runtime.newobject") && warnRule(fe.Debug_checknil(), v, "removed nil check")) {
21472 break
21473 }
21474 v.copyOf(ptr)
21475 return true
21476 }
21477
21478
21479
21480 for {
21481 ptr := v_0
21482 if ptr.Op != OpOffPtr {
21483 break
21484 }
21485 ptr_0 := ptr.Args[0]
21486 if ptr_0.Op != OpSelectN || auxIntToInt64(ptr_0.AuxInt) != 0 {
21487 break
21488 }
21489 call := ptr_0.Args[0]
21490 if call.Op != OpStaticLECall || len(call.Args) != 2 || !(isSameCall(call.Aux, "runtime.newobject") && warnRule(fe.Debug_checknil(), v, "removed nil check")) {
21491 break
21492 }
21493 v.copyOf(ptr)
21494 return true
21495 }
21496
21497
21498 for {
21499 ptr := v_0
21500 if ptr.Op != OpAddr {
21501 break
21502 }
21503 ptr_0 := ptr.Args[0]
21504 if ptr_0.Op != OpSB {
21505 break
21506 }
21507 v.copyOf(ptr)
21508 return true
21509 }
21510
21511
21512 for {
21513 ptr := v_0
21514 if ptr.Op != OpConvert {
21515 break
21516 }
21517 ptr_0 := ptr.Args[0]
21518 if ptr_0.Op != OpAddr {
21519 break
21520 }
21521 ptr_0_0 := ptr_0.Args[0]
21522 if ptr_0_0.Op != OpSB {
21523 break
21524 }
21525 v.copyOf(ptr)
21526 return true
21527 }
21528
21529
21530
21531 for {
21532 ptr := v_0
21533 if ptr.Op != OpLocalAddr || !(warnRule(fe.Debug_checknil(), v, "removed nil check")) {
21534 break
21535 }
21536 v.copyOf(ptr)
21537 return true
21538 }
21539
21540
21541 for {
21542 ptr := v_0
21543 if ptr.Op != OpNilCheck {
21544 break
21545 }
21546 v.copyOf(ptr)
21547 return true
21548 }
21549 return false
21550 }
21551 func rewriteValuegeneric_OpNot(v *Value) bool {
21552 v_0 := v.Args[0]
21553
21554
21555 for {
21556 if v_0.Op != OpConstBool {
21557 break
21558 }
21559 c := auxIntToBool(v_0.AuxInt)
21560 v.reset(OpConstBool)
21561 v.AuxInt = boolToAuxInt(!c)
21562 return true
21563 }
21564
21565
21566 for {
21567 if v_0.Op != OpEq64 {
21568 break
21569 }
21570 y := v_0.Args[1]
21571 x := v_0.Args[0]
21572 v.reset(OpNeq64)
21573 v.AddArg2(x, y)
21574 return true
21575 }
21576
21577
21578 for {
21579 if v_0.Op != OpEq32 {
21580 break
21581 }
21582 y := v_0.Args[1]
21583 x := v_0.Args[0]
21584 v.reset(OpNeq32)
21585 v.AddArg2(x, y)
21586 return true
21587 }
21588
21589
21590 for {
21591 if v_0.Op != OpEq16 {
21592 break
21593 }
21594 y := v_0.Args[1]
21595 x := v_0.Args[0]
21596 v.reset(OpNeq16)
21597 v.AddArg2(x, y)
21598 return true
21599 }
21600
21601
21602 for {
21603 if v_0.Op != OpEq8 {
21604 break
21605 }
21606 y := v_0.Args[1]
21607 x := v_0.Args[0]
21608 v.reset(OpNeq8)
21609 v.AddArg2(x, y)
21610 return true
21611 }
21612
21613
21614 for {
21615 if v_0.Op != OpEqB {
21616 break
21617 }
21618 y := v_0.Args[1]
21619 x := v_0.Args[0]
21620 v.reset(OpNeqB)
21621 v.AddArg2(x, y)
21622 return true
21623 }
21624
21625
21626 for {
21627 if v_0.Op != OpEqPtr {
21628 break
21629 }
21630 y := v_0.Args[1]
21631 x := v_0.Args[0]
21632 v.reset(OpNeqPtr)
21633 v.AddArg2(x, y)
21634 return true
21635 }
21636
21637
21638 for {
21639 if v_0.Op != OpEq64F {
21640 break
21641 }
21642 y := v_0.Args[1]
21643 x := v_0.Args[0]
21644 v.reset(OpNeq64F)
21645 v.AddArg2(x, y)
21646 return true
21647 }
21648
21649
21650 for {
21651 if v_0.Op != OpEq32F {
21652 break
21653 }
21654 y := v_0.Args[1]
21655 x := v_0.Args[0]
21656 v.reset(OpNeq32F)
21657 v.AddArg2(x, y)
21658 return true
21659 }
21660
21661
21662 for {
21663 if v_0.Op != OpNeq64 {
21664 break
21665 }
21666 y := v_0.Args[1]
21667 x := v_0.Args[0]
21668 v.reset(OpEq64)
21669 v.AddArg2(x, y)
21670 return true
21671 }
21672
21673
21674 for {
21675 if v_0.Op != OpNeq32 {
21676 break
21677 }
21678 y := v_0.Args[1]
21679 x := v_0.Args[0]
21680 v.reset(OpEq32)
21681 v.AddArg2(x, y)
21682 return true
21683 }
21684
21685
21686 for {
21687 if v_0.Op != OpNeq16 {
21688 break
21689 }
21690 y := v_0.Args[1]
21691 x := v_0.Args[0]
21692 v.reset(OpEq16)
21693 v.AddArg2(x, y)
21694 return true
21695 }
21696
21697
21698 for {
21699 if v_0.Op != OpNeq8 {
21700 break
21701 }
21702 y := v_0.Args[1]
21703 x := v_0.Args[0]
21704 v.reset(OpEq8)
21705 v.AddArg2(x, y)
21706 return true
21707 }
21708
21709
21710 for {
21711 if v_0.Op != OpNeqB {
21712 break
21713 }
21714 y := v_0.Args[1]
21715 x := v_0.Args[0]
21716 v.reset(OpEqB)
21717 v.AddArg2(x, y)
21718 return true
21719 }
21720
21721
21722 for {
21723 if v_0.Op != OpNeqPtr {
21724 break
21725 }
21726 y := v_0.Args[1]
21727 x := v_0.Args[0]
21728 v.reset(OpEqPtr)
21729 v.AddArg2(x, y)
21730 return true
21731 }
21732
21733
21734 for {
21735 if v_0.Op != OpNeq64F {
21736 break
21737 }
21738 y := v_0.Args[1]
21739 x := v_0.Args[0]
21740 v.reset(OpEq64F)
21741 v.AddArg2(x, y)
21742 return true
21743 }
21744
21745
21746 for {
21747 if v_0.Op != OpNeq32F {
21748 break
21749 }
21750 y := v_0.Args[1]
21751 x := v_0.Args[0]
21752 v.reset(OpEq32F)
21753 v.AddArg2(x, y)
21754 return true
21755 }
21756
21757
21758 for {
21759 if v_0.Op != OpLess64 {
21760 break
21761 }
21762 y := v_0.Args[1]
21763 x := v_0.Args[0]
21764 v.reset(OpLeq64)
21765 v.AddArg2(y, x)
21766 return true
21767 }
21768
21769
21770 for {
21771 if v_0.Op != OpLess32 {
21772 break
21773 }
21774 y := v_0.Args[1]
21775 x := v_0.Args[0]
21776 v.reset(OpLeq32)
21777 v.AddArg2(y, x)
21778 return true
21779 }
21780
21781
21782 for {
21783 if v_0.Op != OpLess16 {
21784 break
21785 }
21786 y := v_0.Args[1]
21787 x := v_0.Args[0]
21788 v.reset(OpLeq16)
21789 v.AddArg2(y, x)
21790 return true
21791 }
21792
21793
21794 for {
21795 if v_0.Op != OpLess8 {
21796 break
21797 }
21798 y := v_0.Args[1]
21799 x := v_0.Args[0]
21800 v.reset(OpLeq8)
21801 v.AddArg2(y, x)
21802 return true
21803 }
21804
21805
21806 for {
21807 if v_0.Op != OpLess64U {
21808 break
21809 }
21810 y := v_0.Args[1]
21811 x := v_0.Args[0]
21812 v.reset(OpLeq64U)
21813 v.AddArg2(y, x)
21814 return true
21815 }
21816
21817
21818 for {
21819 if v_0.Op != OpLess32U {
21820 break
21821 }
21822 y := v_0.Args[1]
21823 x := v_0.Args[0]
21824 v.reset(OpLeq32U)
21825 v.AddArg2(y, x)
21826 return true
21827 }
21828
21829
21830 for {
21831 if v_0.Op != OpLess16U {
21832 break
21833 }
21834 y := v_0.Args[1]
21835 x := v_0.Args[0]
21836 v.reset(OpLeq16U)
21837 v.AddArg2(y, x)
21838 return true
21839 }
21840
21841
21842 for {
21843 if v_0.Op != OpLess8U {
21844 break
21845 }
21846 y := v_0.Args[1]
21847 x := v_0.Args[0]
21848 v.reset(OpLeq8U)
21849 v.AddArg2(y, x)
21850 return true
21851 }
21852
21853
21854 for {
21855 if v_0.Op != OpLeq64 {
21856 break
21857 }
21858 y := v_0.Args[1]
21859 x := v_0.Args[0]
21860 v.reset(OpLess64)
21861 v.AddArg2(y, x)
21862 return true
21863 }
21864
21865
21866 for {
21867 if v_0.Op != OpLeq32 {
21868 break
21869 }
21870 y := v_0.Args[1]
21871 x := v_0.Args[0]
21872 v.reset(OpLess32)
21873 v.AddArg2(y, x)
21874 return true
21875 }
21876
21877
21878 for {
21879 if v_0.Op != OpLeq16 {
21880 break
21881 }
21882 y := v_0.Args[1]
21883 x := v_0.Args[0]
21884 v.reset(OpLess16)
21885 v.AddArg2(y, x)
21886 return true
21887 }
21888
21889
21890 for {
21891 if v_0.Op != OpLeq8 {
21892 break
21893 }
21894 y := v_0.Args[1]
21895 x := v_0.Args[0]
21896 v.reset(OpLess8)
21897 v.AddArg2(y, x)
21898 return true
21899 }
21900
21901
21902 for {
21903 if v_0.Op != OpLeq64U {
21904 break
21905 }
21906 y := v_0.Args[1]
21907 x := v_0.Args[0]
21908 v.reset(OpLess64U)
21909 v.AddArg2(y, x)
21910 return true
21911 }
21912
21913
21914 for {
21915 if v_0.Op != OpLeq32U {
21916 break
21917 }
21918 y := v_0.Args[1]
21919 x := v_0.Args[0]
21920 v.reset(OpLess32U)
21921 v.AddArg2(y, x)
21922 return true
21923 }
21924
21925
21926 for {
21927 if v_0.Op != OpLeq16U {
21928 break
21929 }
21930 y := v_0.Args[1]
21931 x := v_0.Args[0]
21932 v.reset(OpLess16U)
21933 v.AddArg2(y, x)
21934 return true
21935 }
21936
21937
21938 for {
21939 if v_0.Op != OpLeq8U {
21940 break
21941 }
21942 y := v_0.Args[1]
21943 x := v_0.Args[0]
21944 v.reset(OpLess8U)
21945 v.AddArg2(y, x)
21946 return true
21947 }
21948 return false
21949 }
21950 func rewriteValuegeneric_OpOffPtr(v *Value) bool {
21951 v_0 := v.Args[0]
21952
21953
21954 for {
21955 x := auxIntToInt64(v.AuxInt)
21956 if v_0.Op != OpOffPtr {
21957 break
21958 }
21959 y := auxIntToInt64(v_0.AuxInt)
21960 p := v_0.Args[0]
21961 v.reset(OpOffPtr)
21962 v.AuxInt = int64ToAuxInt(x + y)
21963 v.AddArg(p)
21964 return true
21965 }
21966
21967
21968
21969 for {
21970 if auxIntToInt64(v.AuxInt) != 0 {
21971 break
21972 }
21973 p := v_0
21974 if !(v.Type.Compare(p.Type) == types.CMPeq) {
21975 break
21976 }
21977 v.copyOf(p)
21978 return true
21979 }
21980 return false
21981 }
21982 func rewriteValuegeneric_OpOr16(v *Value) bool {
21983 v_1 := v.Args[1]
21984 v_0 := v.Args[0]
21985 b := v.Block
21986 config := b.Func.Config
21987
21988
21989 for {
21990 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
21991 if v_0.Op != OpConst16 {
21992 continue
21993 }
21994 c := auxIntToInt16(v_0.AuxInt)
21995 if v_1.Op != OpConst16 {
21996 continue
21997 }
21998 d := auxIntToInt16(v_1.AuxInt)
21999 v.reset(OpConst16)
22000 v.AuxInt = int16ToAuxInt(c | d)
22001 return true
22002 }
22003 break
22004 }
22005
22006
22007 for {
22008 t := v.Type
22009 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22010 if v_0.Op != OpCom16 {
22011 continue
22012 }
22013 x := v_0.Args[0]
22014 if v_1.Op != OpCom16 {
22015 continue
22016 }
22017 y := v_1.Args[0]
22018 v.reset(OpCom16)
22019 v0 := b.NewValue0(v.Pos, OpAnd16, t)
22020 v0.AddArg2(x, y)
22021 v.AddArg(v0)
22022 return true
22023 }
22024 break
22025 }
22026
22027
22028 for {
22029 x := v_0
22030 if x != v_1 {
22031 break
22032 }
22033 v.copyOf(x)
22034 return true
22035 }
22036
22037
22038 for {
22039 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22040 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 {
22041 continue
22042 }
22043 x := v_1
22044 v.copyOf(x)
22045 return true
22046 }
22047 break
22048 }
22049
22050
22051 for {
22052 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22053 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != -1 {
22054 continue
22055 }
22056 v.reset(OpConst16)
22057 v.AuxInt = int16ToAuxInt(-1)
22058 return true
22059 }
22060 break
22061 }
22062
22063
22064 for {
22065 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22066 if v_0.Op != OpCom16 {
22067 continue
22068 }
22069 x := v_0.Args[0]
22070 if x != v_1 {
22071 continue
22072 }
22073 v.reset(OpConst16)
22074 v.AuxInt = int16ToAuxInt(-1)
22075 return true
22076 }
22077 break
22078 }
22079
22080
22081 for {
22082 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22083 x := v_0
22084 if v_1.Op != OpOr16 {
22085 continue
22086 }
22087 _ = v_1.Args[1]
22088 v_1_0 := v_1.Args[0]
22089 v_1_1 := v_1.Args[1]
22090 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
22091 if x != v_1_0 {
22092 continue
22093 }
22094 y := v_1_1
22095 v.reset(OpOr16)
22096 v.AddArg2(x, y)
22097 return true
22098 }
22099 }
22100 break
22101 }
22102
22103
22104
22105 for {
22106 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22107 if v_0.Op != OpAnd16 {
22108 continue
22109 }
22110 _ = v_0.Args[1]
22111 v_0_0 := v_0.Args[0]
22112 v_0_1 := v_0.Args[1]
22113 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
22114 x := v_0_0
22115 if v_0_1.Op != OpConst16 {
22116 continue
22117 }
22118 c2 := auxIntToInt16(v_0_1.AuxInt)
22119 if v_1.Op != OpConst16 {
22120 continue
22121 }
22122 t := v_1.Type
22123 c1 := auxIntToInt16(v_1.AuxInt)
22124 if !(^(c1 | c2) == 0) {
22125 continue
22126 }
22127 v.reset(OpOr16)
22128 v0 := b.NewValue0(v.Pos, OpConst16, t)
22129 v0.AuxInt = int16ToAuxInt(c1)
22130 v.AddArg2(v0, x)
22131 return true
22132 }
22133 }
22134 break
22135 }
22136
22137
22138
22139 for {
22140 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22141 if v_0.Op != OpOr16 {
22142 continue
22143 }
22144 _ = v_0.Args[1]
22145 v_0_0 := v_0.Args[0]
22146 v_0_1 := v_0.Args[1]
22147 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
22148 i := v_0_0
22149 if i.Op != OpConst16 {
22150 continue
22151 }
22152 t := i.Type
22153 z := v_0_1
22154 x := v_1
22155 if !(z.Op != OpConst16 && x.Op != OpConst16) {
22156 continue
22157 }
22158 v.reset(OpOr16)
22159 v0 := b.NewValue0(v.Pos, OpOr16, t)
22160 v0.AddArg2(z, x)
22161 v.AddArg2(i, v0)
22162 return true
22163 }
22164 }
22165 break
22166 }
22167
22168
22169 for {
22170 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22171 if v_0.Op != OpConst16 {
22172 continue
22173 }
22174 t := v_0.Type
22175 c := auxIntToInt16(v_0.AuxInt)
22176 if v_1.Op != OpOr16 {
22177 continue
22178 }
22179 _ = v_1.Args[1]
22180 v_1_0 := v_1.Args[0]
22181 v_1_1 := v_1.Args[1]
22182 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
22183 if v_1_0.Op != OpConst16 || v_1_0.Type != t {
22184 continue
22185 }
22186 d := auxIntToInt16(v_1_0.AuxInt)
22187 x := v_1_1
22188 v.reset(OpOr16)
22189 v0 := b.NewValue0(v.Pos, OpConst16, t)
22190 v0.AuxInt = int16ToAuxInt(c | d)
22191 v.AddArg2(v0, x)
22192 return true
22193 }
22194 }
22195 break
22196 }
22197
22198
22199
22200 for {
22201 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22202 if v_0.Op != OpLsh16x64 {
22203 continue
22204 }
22205 _ = v_0.Args[1]
22206 x := v_0.Args[0]
22207 z := v_0.Args[1]
22208 if z.Op != OpConst64 {
22209 continue
22210 }
22211 c := auxIntToInt64(z.AuxInt)
22212 if v_1.Op != OpRsh16Ux64 {
22213 continue
22214 }
22215 _ = v_1.Args[1]
22216 if x != v_1.Args[0] {
22217 continue
22218 }
22219 v_1_1 := v_1.Args[1]
22220 if v_1_1.Op != OpConst64 {
22221 continue
22222 }
22223 d := auxIntToInt64(v_1_1.AuxInt)
22224 if !(c < 16 && d == 16-c && canRotate(config, 16)) {
22225 continue
22226 }
22227 v.reset(OpRotateLeft16)
22228 v.AddArg2(x, z)
22229 return true
22230 }
22231 break
22232 }
22233
22234
22235
22236 for {
22237 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22238 left := v_0
22239 if left.Op != OpLsh16x64 {
22240 continue
22241 }
22242 y := left.Args[1]
22243 x := left.Args[0]
22244 right := v_1
22245 if right.Op != OpRsh16Ux64 {
22246 continue
22247 }
22248 _ = right.Args[1]
22249 if x != right.Args[0] {
22250 continue
22251 }
22252 right_1 := right.Args[1]
22253 if right_1.Op != OpSub64 {
22254 continue
22255 }
22256 _ = right_1.Args[1]
22257 right_1_0 := right_1.Args[0]
22258 if right_1_0.Op != OpConst64 || auxIntToInt64(right_1_0.AuxInt) != 16 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 16)) {
22259 continue
22260 }
22261 v.reset(OpRotateLeft16)
22262 v.AddArg2(x, y)
22263 return true
22264 }
22265 break
22266 }
22267
22268
22269
22270 for {
22271 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22272 left := v_0
22273 if left.Op != OpLsh16x32 {
22274 continue
22275 }
22276 y := left.Args[1]
22277 x := left.Args[0]
22278 right := v_1
22279 if right.Op != OpRsh16Ux32 {
22280 continue
22281 }
22282 _ = right.Args[1]
22283 if x != right.Args[0] {
22284 continue
22285 }
22286 right_1 := right.Args[1]
22287 if right_1.Op != OpSub32 {
22288 continue
22289 }
22290 _ = right_1.Args[1]
22291 right_1_0 := right_1.Args[0]
22292 if right_1_0.Op != OpConst32 || auxIntToInt32(right_1_0.AuxInt) != 16 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 16)) {
22293 continue
22294 }
22295 v.reset(OpRotateLeft16)
22296 v.AddArg2(x, y)
22297 return true
22298 }
22299 break
22300 }
22301
22302
22303
22304 for {
22305 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22306 left := v_0
22307 if left.Op != OpLsh16x16 {
22308 continue
22309 }
22310 y := left.Args[1]
22311 x := left.Args[0]
22312 right := v_1
22313 if right.Op != OpRsh16Ux16 {
22314 continue
22315 }
22316 _ = right.Args[1]
22317 if x != right.Args[0] {
22318 continue
22319 }
22320 right_1 := right.Args[1]
22321 if right_1.Op != OpSub16 {
22322 continue
22323 }
22324 _ = right_1.Args[1]
22325 right_1_0 := right_1.Args[0]
22326 if right_1_0.Op != OpConst16 || auxIntToInt16(right_1_0.AuxInt) != 16 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 16)) {
22327 continue
22328 }
22329 v.reset(OpRotateLeft16)
22330 v.AddArg2(x, y)
22331 return true
22332 }
22333 break
22334 }
22335
22336
22337
22338 for {
22339 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22340 left := v_0
22341 if left.Op != OpLsh16x8 {
22342 continue
22343 }
22344 y := left.Args[1]
22345 x := left.Args[0]
22346 right := v_1
22347 if right.Op != OpRsh16Ux8 {
22348 continue
22349 }
22350 _ = right.Args[1]
22351 if x != right.Args[0] {
22352 continue
22353 }
22354 right_1 := right.Args[1]
22355 if right_1.Op != OpSub8 {
22356 continue
22357 }
22358 _ = right_1.Args[1]
22359 right_1_0 := right_1.Args[0]
22360 if right_1_0.Op != OpConst8 || auxIntToInt8(right_1_0.AuxInt) != 16 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 16)) {
22361 continue
22362 }
22363 v.reset(OpRotateLeft16)
22364 v.AddArg2(x, y)
22365 return true
22366 }
22367 break
22368 }
22369
22370
22371
22372 for {
22373 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22374 right := v_0
22375 if right.Op != OpRsh16Ux64 {
22376 continue
22377 }
22378 y := right.Args[1]
22379 x := right.Args[0]
22380 left := v_1
22381 if left.Op != OpLsh16x64 {
22382 continue
22383 }
22384 _ = left.Args[1]
22385 if x != left.Args[0] {
22386 continue
22387 }
22388 z := left.Args[1]
22389 if z.Op != OpSub64 {
22390 continue
22391 }
22392 _ = z.Args[1]
22393 z_0 := z.Args[0]
22394 if z_0.Op != OpConst64 || auxIntToInt64(z_0.AuxInt) != 16 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 16)) {
22395 continue
22396 }
22397 v.reset(OpRotateLeft16)
22398 v.AddArg2(x, z)
22399 return true
22400 }
22401 break
22402 }
22403
22404
22405
22406 for {
22407 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22408 right := v_0
22409 if right.Op != OpRsh16Ux32 {
22410 continue
22411 }
22412 y := right.Args[1]
22413 x := right.Args[0]
22414 left := v_1
22415 if left.Op != OpLsh16x32 {
22416 continue
22417 }
22418 _ = left.Args[1]
22419 if x != left.Args[0] {
22420 continue
22421 }
22422 z := left.Args[1]
22423 if z.Op != OpSub32 {
22424 continue
22425 }
22426 _ = z.Args[1]
22427 z_0 := z.Args[0]
22428 if z_0.Op != OpConst32 || auxIntToInt32(z_0.AuxInt) != 16 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 16)) {
22429 continue
22430 }
22431 v.reset(OpRotateLeft16)
22432 v.AddArg2(x, z)
22433 return true
22434 }
22435 break
22436 }
22437
22438
22439
22440 for {
22441 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22442 right := v_0
22443 if right.Op != OpRsh16Ux16 {
22444 continue
22445 }
22446 y := right.Args[1]
22447 x := right.Args[0]
22448 left := v_1
22449 if left.Op != OpLsh16x16 {
22450 continue
22451 }
22452 _ = left.Args[1]
22453 if x != left.Args[0] {
22454 continue
22455 }
22456 z := left.Args[1]
22457 if z.Op != OpSub16 {
22458 continue
22459 }
22460 _ = z.Args[1]
22461 z_0 := z.Args[0]
22462 if z_0.Op != OpConst16 || auxIntToInt16(z_0.AuxInt) != 16 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 16)) {
22463 continue
22464 }
22465 v.reset(OpRotateLeft16)
22466 v.AddArg2(x, z)
22467 return true
22468 }
22469 break
22470 }
22471
22472
22473
22474 for {
22475 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22476 right := v_0
22477 if right.Op != OpRsh16Ux8 {
22478 continue
22479 }
22480 y := right.Args[1]
22481 x := right.Args[0]
22482 left := v_1
22483 if left.Op != OpLsh16x8 {
22484 continue
22485 }
22486 _ = left.Args[1]
22487 if x != left.Args[0] {
22488 continue
22489 }
22490 z := left.Args[1]
22491 if z.Op != OpSub8 {
22492 continue
22493 }
22494 _ = z.Args[1]
22495 z_0 := z.Args[0]
22496 if z_0.Op != OpConst8 || auxIntToInt8(z_0.AuxInt) != 16 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 16)) {
22497 continue
22498 }
22499 v.reset(OpRotateLeft16)
22500 v.AddArg2(x, z)
22501 return true
22502 }
22503 break
22504 }
22505 return false
22506 }
22507 func rewriteValuegeneric_OpOr32(v *Value) bool {
22508 v_1 := v.Args[1]
22509 v_0 := v.Args[0]
22510 b := v.Block
22511 config := b.Func.Config
22512
22513
22514 for {
22515 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22516 if v_0.Op != OpConst32 {
22517 continue
22518 }
22519 c := auxIntToInt32(v_0.AuxInt)
22520 if v_1.Op != OpConst32 {
22521 continue
22522 }
22523 d := auxIntToInt32(v_1.AuxInt)
22524 v.reset(OpConst32)
22525 v.AuxInt = int32ToAuxInt(c | d)
22526 return true
22527 }
22528 break
22529 }
22530
22531
22532 for {
22533 t := v.Type
22534 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22535 if v_0.Op != OpCom32 {
22536 continue
22537 }
22538 x := v_0.Args[0]
22539 if v_1.Op != OpCom32 {
22540 continue
22541 }
22542 y := v_1.Args[0]
22543 v.reset(OpCom32)
22544 v0 := b.NewValue0(v.Pos, OpAnd32, t)
22545 v0.AddArg2(x, y)
22546 v.AddArg(v0)
22547 return true
22548 }
22549 break
22550 }
22551
22552
22553 for {
22554 x := v_0
22555 if x != v_1 {
22556 break
22557 }
22558 v.copyOf(x)
22559 return true
22560 }
22561
22562
22563 for {
22564 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22565 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
22566 continue
22567 }
22568 x := v_1
22569 v.copyOf(x)
22570 return true
22571 }
22572 break
22573 }
22574
22575
22576 for {
22577 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22578 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != -1 {
22579 continue
22580 }
22581 v.reset(OpConst32)
22582 v.AuxInt = int32ToAuxInt(-1)
22583 return true
22584 }
22585 break
22586 }
22587
22588
22589 for {
22590 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22591 if v_0.Op != OpCom32 {
22592 continue
22593 }
22594 x := v_0.Args[0]
22595 if x != v_1 {
22596 continue
22597 }
22598 v.reset(OpConst32)
22599 v.AuxInt = int32ToAuxInt(-1)
22600 return true
22601 }
22602 break
22603 }
22604
22605
22606 for {
22607 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22608 x := v_0
22609 if v_1.Op != OpOr32 {
22610 continue
22611 }
22612 _ = v_1.Args[1]
22613 v_1_0 := v_1.Args[0]
22614 v_1_1 := v_1.Args[1]
22615 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
22616 if x != v_1_0 {
22617 continue
22618 }
22619 y := v_1_1
22620 v.reset(OpOr32)
22621 v.AddArg2(x, y)
22622 return true
22623 }
22624 }
22625 break
22626 }
22627
22628
22629
22630 for {
22631 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22632 if v_0.Op != OpAnd32 {
22633 continue
22634 }
22635 _ = v_0.Args[1]
22636 v_0_0 := v_0.Args[0]
22637 v_0_1 := v_0.Args[1]
22638 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
22639 x := v_0_0
22640 if v_0_1.Op != OpConst32 {
22641 continue
22642 }
22643 c2 := auxIntToInt32(v_0_1.AuxInt)
22644 if v_1.Op != OpConst32 {
22645 continue
22646 }
22647 t := v_1.Type
22648 c1 := auxIntToInt32(v_1.AuxInt)
22649 if !(^(c1 | c2) == 0) {
22650 continue
22651 }
22652 v.reset(OpOr32)
22653 v0 := b.NewValue0(v.Pos, OpConst32, t)
22654 v0.AuxInt = int32ToAuxInt(c1)
22655 v.AddArg2(v0, x)
22656 return true
22657 }
22658 }
22659 break
22660 }
22661
22662
22663
22664 for {
22665 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22666 if v_0.Op != OpOr32 {
22667 continue
22668 }
22669 _ = v_0.Args[1]
22670 v_0_0 := v_0.Args[0]
22671 v_0_1 := v_0.Args[1]
22672 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
22673 i := v_0_0
22674 if i.Op != OpConst32 {
22675 continue
22676 }
22677 t := i.Type
22678 z := v_0_1
22679 x := v_1
22680 if !(z.Op != OpConst32 && x.Op != OpConst32) {
22681 continue
22682 }
22683 v.reset(OpOr32)
22684 v0 := b.NewValue0(v.Pos, OpOr32, t)
22685 v0.AddArg2(z, x)
22686 v.AddArg2(i, v0)
22687 return true
22688 }
22689 }
22690 break
22691 }
22692
22693
22694 for {
22695 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22696 if v_0.Op != OpConst32 {
22697 continue
22698 }
22699 t := v_0.Type
22700 c := auxIntToInt32(v_0.AuxInt)
22701 if v_1.Op != OpOr32 {
22702 continue
22703 }
22704 _ = v_1.Args[1]
22705 v_1_0 := v_1.Args[0]
22706 v_1_1 := v_1.Args[1]
22707 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
22708 if v_1_0.Op != OpConst32 || v_1_0.Type != t {
22709 continue
22710 }
22711 d := auxIntToInt32(v_1_0.AuxInt)
22712 x := v_1_1
22713 v.reset(OpOr32)
22714 v0 := b.NewValue0(v.Pos, OpConst32, t)
22715 v0.AuxInt = int32ToAuxInt(c | d)
22716 v.AddArg2(v0, x)
22717 return true
22718 }
22719 }
22720 break
22721 }
22722
22723
22724
22725 for {
22726 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22727 if v_0.Op != OpLsh32x64 {
22728 continue
22729 }
22730 _ = v_0.Args[1]
22731 x := v_0.Args[0]
22732 z := v_0.Args[1]
22733 if z.Op != OpConst64 {
22734 continue
22735 }
22736 c := auxIntToInt64(z.AuxInt)
22737 if v_1.Op != OpRsh32Ux64 {
22738 continue
22739 }
22740 _ = v_1.Args[1]
22741 if x != v_1.Args[0] {
22742 continue
22743 }
22744 v_1_1 := v_1.Args[1]
22745 if v_1_1.Op != OpConst64 {
22746 continue
22747 }
22748 d := auxIntToInt64(v_1_1.AuxInt)
22749 if !(c < 32 && d == 32-c && canRotate(config, 32)) {
22750 continue
22751 }
22752 v.reset(OpRotateLeft32)
22753 v.AddArg2(x, z)
22754 return true
22755 }
22756 break
22757 }
22758
22759
22760
22761 for {
22762 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22763 left := v_0
22764 if left.Op != OpLsh32x64 {
22765 continue
22766 }
22767 y := left.Args[1]
22768 x := left.Args[0]
22769 right := v_1
22770 if right.Op != OpRsh32Ux64 {
22771 continue
22772 }
22773 _ = right.Args[1]
22774 if x != right.Args[0] {
22775 continue
22776 }
22777 right_1 := right.Args[1]
22778 if right_1.Op != OpSub64 {
22779 continue
22780 }
22781 _ = right_1.Args[1]
22782 right_1_0 := right_1.Args[0]
22783 if right_1_0.Op != OpConst64 || auxIntToInt64(right_1_0.AuxInt) != 32 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 32)) {
22784 continue
22785 }
22786 v.reset(OpRotateLeft32)
22787 v.AddArg2(x, y)
22788 return true
22789 }
22790 break
22791 }
22792
22793
22794
22795 for {
22796 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22797 left := v_0
22798 if left.Op != OpLsh32x32 {
22799 continue
22800 }
22801 y := left.Args[1]
22802 x := left.Args[0]
22803 right := v_1
22804 if right.Op != OpRsh32Ux32 {
22805 continue
22806 }
22807 _ = right.Args[1]
22808 if x != right.Args[0] {
22809 continue
22810 }
22811 right_1 := right.Args[1]
22812 if right_1.Op != OpSub32 {
22813 continue
22814 }
22815 _ = right_1.Args[1]
22816 right_1_0 := right_1.Args[0]
22817 if right_1_0.Op != OpConst32 || auxIntToInt32(right_1_0.AuxInt) != 32 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 32)) {
22818 continue
22819 }
22820 v.reset(OpRotateLeft32)
22821 v.AddArg2(x, y)
22822 return true
22823 }
22824 break
22825 }
22826
22827
22828
22829 for {
22830 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22831 left := v_0
22832 if left.Op != OpLsh32x16 {
22833 continue
22834 }
22835 y := left.Args[1]
22836 x := left.Args[0]
22837 right := v_1
22838 if right.Op != OpRsh32Ux16 {
22839 continue
22840 }
22841 _ = right.Args[1]
22842 if x != right.Args[0] {
22843 continue
22844 }
22845 right_1 := right.Args[1]
22846 if right_1.Op != OpSub16 {
22847 continue
22848 }
22849 _ = right_1.Args[1]
22850 right_1_0 := right_1.Args[0]
22851 if right_1_0.Op != OpConst16 || auxIntToInt16(right_1_0.AuxInt) != 32 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 32)) {
22852 continue
22853 }
22854 v.reset(OpRotateLeft32)
22855 v.AddArg2(x, y)
22856 return true
22857 }
22858 break
22859 }
22860
22861
22862
22863 for {
22864 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22865 left := v_0
22866 if left.Op != OpLsh32x8 {
22867 continue
22868 }
22869 y := left.Args[1]
22870 x := left.Args[0]
22871 right := v_1
22872 if right.Op != OpRsh32Ux8 {
22873 continue
22874 }
22875 _ = right.Args[1]
22876 if x != right.Args[0] {
22877 continue
22878 }
22879 right_1 := right.Args[1]
22880 if right_1.Op != OpSub8 {
22881 continue
22882 }
22883 _ = right_1.Args[1]
22884 right_1_0 := right_1.Args[0]
22885 if right_1_0.Op != OpConst8 || auxIntToInt8(right_1_0.AuxInt) != 32 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 32)) {
22886 continue
22887 }
22888 v.reset(OpRotateLeft32)
22889 v.AddArg2(x, y)
22890 return true
22891 }
22892 break
22893 }
22894
22895
22896
22897 for {
22898 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22899 right := v_0
22900 if right.Op != OpRsh32Ux64 {
22901 continue
22902 }
22903 y := right.Args[1]
22904 x := right.Args[0]
22905 left := v_1
22906 if left.Op != OpLsh32x64 {
22907 continue
22908 }
22909 _ = left.Args[1]
22910 if x != left.Args[0] {
22911 continue
22912 }
22913 z := left.Args[1]
22914 if z.Op != OpSub64 {
22915 continue
22916 }
22917 _ = z.Args[1]
22918 z_0 := z.Args[0]
22919 if z_0.Op != OpConst64 || auxIntToInt64(z_0.AuxInt) != 32 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 32)) {
22920 continue
22921 }
22922 v.reset(OpRotateLeft32)
22923 v.AddArg2(x, z)
22924 return true
22925 }
22926 break
22927 }
22928
22929
22930
22931 for {
22932 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22933 right := v_0
22934 if right.Op != OpRsh32Ux32 {
22935 continue
22936 }
22937 y := right.Args[1]
22938 x := right.Args[0]
22939 left := v_1
22940 if left.Op != OpLsh32x32 {
22941 continue
22942 }
22943 _ = left.Args[1]
22944 if x != left.Args[0] {
22945 continue
22946 }
22947 z := left.Args[1]
22948 if z.Op != OpSub32 {
22949 continue
22950 }
22951 _ = z.Args[1]
22952 z_0 := z.Args[0]
22953 if z_0.Op != OpConst32 || auxIntToInt32(z_0.AuxInt) != 32 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 32)) {
22954 continue
22955 }
22956 v.reset(OpRotateLeft32)
22957 v.AddArg2(x, z)
22958 return true
22959 }
22960 break
22961 }
22962
22963
22964
22965 for {
22966 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22967 right := v_0
22968 if right.Op != OpRsh32Ux16 {
22969 continue
22970 }
22971 y := right.Args[1]
22972 x := right.Args[0]
22973 left := v_1
22974 if left.Op != OpLsh32x16 {
22975 continue
22976 }
22977 _ = left.Args[1]
22978 if x != left.Args[0] {
22979 continue
22980 }
22981 z := left.Args[1]
22982 if z.Op != OpSub16 {
22983 continue
22984 }
22985 _ = z.Args[1]
22986 z_0 := z.Args[0]
22987 if z_0.Op != OpConst16 || auxIntToInt16(z_0.AuxInt) != 32 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 32)) {
22988 continue
22989 }
22990 v.reset(OpRotateLeft32)
22991 v.AddArg2(x, z)
22992 return true
22993 }
22994 break
22995 }
22996
22997
22998
22999 for {
23000 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23001 right := v_0
23002 if right.Op != OpRsh32Ux8 {
23003 continue
23004 }
23005 y := right.Args[1]
23006 x := right.Args[0]
23007 left := v_1
23008 if left.Op != OpLsh32x8 {
23009 continue
23010 }
23011 _ = left.Args[1]
23012 if x != left.Args[0] {
23013 continue
23014 }
23015 z := left.Args[1]
23016 if z.Op != OpSub8 {
23017 continue
23018 }
23019 _ = z.Args[1]
23020 z_0 := z.Args[0]
23021 if z_0.Op != OpConst8 || auxIntToInt8(z_0.AuxInt) != 32 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 32)) {
23022 continue
23023 }
23024 v.reset(OpRotateLeft32)
23025 v.AddArg2(x, z)
23026 return true
23027 }
23028 break
23029 }
23030 return false
23031 }
23032 func rewriteValuegeneric_OpOr64(v *Value) bool {
23033 v_1 := v.Args[1]
23034 v_0 := v.Args[0]
23035 b := v.Block
23036 config := b.Func.Config
23037
23038
23039 for {
23040 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23041 if v_0.Op != OpConst64 {
23042 continue
23043 }
23044 c := auxIntToInt64(v_0.AuxInt)
23045 if v_1.Op != OpConst64 {
23046 continue
23047 }
23048 d := auxIntToInt64(v_1.AuxInt)
23049 v.reset(OpConst64)
23050 v.AuxInt = int64ToAuxInt(c | d)
23051 return true
23052 }
23053 break
23054 }
23055
23056
23057 for {
23058 t := v.Type
23059 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23060 if v_0.Op != OpCom64 {
23061 continue
23062 }
23063 x := v_0.Args[0]
23064 if v_1.Op != OpCom64 {
23065 continue
23066 }
23067 y := v_1.Args[0]
23068 v.reset(OpCom64)
23069 v0 := b.NewValue0(v.Pos, OpAnd64, t)
23070 v0.AddArg2(x, y)
23071 v.AddArg(v0)
23072 return true
23073 }
23074 break
23075 }
23076
23077
23078 for {
23079 x := v_0
23080 if x != v_1 {
23081 break
23082 }
23083 v.copyOf(x)
23084 return true
23085 }
23086
23087
23088 for {
23089 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23090 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
23091 continue
23092 }
23093 x := v_1
23094 v.copyOf(x)
23095 return true
23096 }
23097 break
23098 }
23099
23100
23101 for {
23102 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23103 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != -1 {
23104 continue
23105 }
23106 v.reset(OpConst64)
23107 v.AuxInt = int64ToAuxInt(-1)
23108 return true
23109 }
23110 break
23111 }
23112
23113
23114 for {
23115 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23116 if v_0.Op != OpCom64 {
23117 continue
23118 }
23119 x := v_0.Args[0]
23120 if x != v_1 {
23121 continue
23122 }
23123 v.reset(OpConst64)
23124 v.AuxInt = int64ToAuxInt(-1)
23125 return true
23126 }
23127 break
23128 }
23129
23130
23131 for {
23132 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23133 x := v_0
23134 if v_1.Op != OpOr64 {
23135 continue
23136 }
23137 _ = v_1.Args[1]
23138 v_1_0 := v_1.Args[0]
23139 v_1_1 := v_1.Args[1]
23140 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
23141 if x != v_1_0 {
23142 continue
23143 }
23144 y := v_1_1
23145 v.reset(OpOr64)
23146 v.AddArg2(x, y)
23147 return true
23148 }
23149 }
23150 break
23151 }
23152
23153
23154
23155 for {
23156 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23157 if v_0.Op != OpAnd64 {
23158 continue
23159 }
23160 _ = v_0.Args[1]
23161 v_0_0 := v_0.Args[0]
23162 v_0_1 := v_0.Args[1]
23163 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
23164 x := v_0_0
23165 if v_0_1.Op != OpConst64 {
23166 continue
23167 }
23168 c2 := auxIntToInt64(v_0_1.AuxInt)
23169 if v_1.Op != OpConst64 {
23170 continue
23171 }
23172 t := v_1.Type
23173 c1 := auxIntToInt64(v_1.AuxInt)
23174 if !(^(c1 | c2) == 0) {
23175 continue
23176 }
23177 v.reset(OpOr64)
23178 v0 := b.NewValue0(v.Pos, OpConst64, t)
23179 v0.AuxInt = int64ToAuxInt(c1)
23180 v.AddArg2(v0, x)
23181 return true
23182 }
23183 }
23184 break
23185 }
23186
23187
23188
23189 for {
23190 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23191 if v_0.Op != OpOr64 {
23192 continue
23193 }
23194 _ = v_0.Args[1]
23195 v_0_0 := v_0.Args[0]
23196 v_0_1 := v_0.Args[1]
23197 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
23198 i := v_0_0
23199 if i.Op != OpConst64 {
23200 continue
23201 }
23202 t := i.Type
23203 z := v_0_1
23204 x := v_1
23205 if !(z.Op != OpConst64 && x.Op != OpConst64) {
23206 continue
23207 }
23208 v.reset(OpOr64)
23209 v0 := b.NewValue0(v.Pos, OpOr64, t)
23210 v0.AddArg2(z, x)
23211 v.AddArg2(i, v0)
23212 return true
23213 }
23214 }
23215 break
23216 }
23217
23218
23219 for {
23220 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23221 if v_0.Op != OpConst64 {
23222 continue
23223 }
23224 t := v_0.Type
23225 c := auxIntToInt64(v_0.AuxInt)
23226 if v_1.Op != OpOr64 {
23227 continue
23228 }
23229 _ = v_1.Args[1]
23230 v_1_0 := v_1.Args[0]
23231 v_1_1 := v_1.Args[1]
23232 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
23233 if v_1_0.Op != OpConst64 || v_1_0.Type != t {
23234 continue
23235 }
23236 d := auxIntToInt64(v_1_0.AuxInt)
23237 x := v_1_1
23238 v.reset(OpOr64)
23239 v0 := b.NewValue0(v.Pos, OpConst64, t)
23240 v0.AuxInt = int64ToAuxInt(c | d)
23241 v.AddArg2(v0, x)
23242 return true
23243 }
23244 }
23245 break
23246 }
23247
23248
23249
23250 for {
23251 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23252 if v_0.Op != OpLsh64x64 {
23253 continue
23254 }
23255 _ = v_0.Args[1]
23256 x := v_0.Args[0]
23257 z := v_0.Args[1]
23258 if z.Op != OpConst64 {
23259 continue
23260 }
23261 c := auxIntToInt64(z.AuxInt)
23262 if v_1.Op != OpRsh64Ux64 {
23263 continue
23264 }
23265 _ = v_1.Args[1]
23266 if x != v_1.Args[0] {
23267 continue
23268 }
23269 v_1_1 := v_1.Args[1]
23270 if v_1_1.Op != OpConst64 {
23271 continue
23272 }
23273 d := auxIntToInt64(v_1_1.AuxInt)
23274 if !(c < 64 && d == 64-c && canRotate(config, 64)) {
23275 continue
23276 }
23277 v.reset(OpRotateLeft64)
23278 v.AddArg2(x, z)
23279 return true
23280 }
23281 break
23282 }
23283
23284
23285
23286 for {
23287 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23288 left := v_0
23289 if left.Op != OpLsh64x64 {
23290 continue
23291 }
23292 y := left.Args[1]
23293 x := left.Args[0]
23294 right := v_1
23295 if right.Op != OpRsh64Ux64 {
23296 continue
23297 }
23298 _ = right.Args[1]
23299 if x != right.Args[0] {
23300 continue
23301 }
23302 right_1 := right.Args[1]
23303 if right_1.Op != OpSub64 {
23304 continue
23305 }
23306 _ = right_1.Args[1]
23307 right_1_0 := right_1.Args[0]
23308 if right_1_0.Op != OpConst64 || auxIntToInt64(right_1_0.AuxInt) != 64 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 64)) {
23309 continue
23310 }
23311 v.reset(OpRotateLeft64)
23312 v.AddArg2(x, y)
23313 return true
23314 }
23315 break
23316 }
23317
23318
23319
23320 for {
23321 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23322 left := v_0
23323 if left.Op != OpLsh64x32 {
23324 continue
23325 }
23326 y := left.Args[1]
23327 x := left.Args[0]
23328 right := v_1
23329 if right.Op != OpRsh64Ux32 {
23330 continue
23331 }
23332 _ = right.Args[1]
23333 if x != right.Args[0] {
23334 continue
23335 }
23336 right_1 := right.Args[1]
23337 if right_1.Op != OpSub32 {
23338 continue
23339 }
23340 _ = right_1.Args[1]
23341 right_1_0 := right_1.Args[0]
23342 if right_1_0.Op != OpConst32 || auxIntToInt32(right_1_0.AuxInt) != 64 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 64)) {
23343 continue
23344 }
23345 v.reset(OpRotateLeft64)
23346 v.AddArg2(x, y)
23347 return true
23348 }
23349 break
23350 }
23351
23352
23353
23354 for {
23355 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23356 left := v_0
23357 if left.Op != OpLsh64x16 {
23358 continue
23359 }
23360 y := left.Args[1]
23361 x := left.Args[0]
23362 right := v_1
23363 if right.Op != OpRsh64Ux16 {
23364 continue
23365 }
23366 _ = right.Args[1]
23367 if x != right.Args[0] {
23368 continue
23369 }
23370 right_1 := right.Args[1]
23371 if right_1.Op != OpSub16 {
23372 continue
23373 }
23374 _ = right_1.Args[1]
23375 right_1_0 := right_1.Args[0]
23376 if right_1_0.Op != OpConst16 || auxIntToInt16(right_1_0.AuxInt) != 64 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 64)) {
23377 continue
23378 }
23379 v.reset(OpRotateLeft64)
23380 v.AddArg2(x, y)
23381 return true
23382 }
23383 break
23384 }
23385
23386
23387
23388 for {
23389 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23390 left := v_0
23391 if left.Op != OpLsh64x8 {
23392 continue
23393 }
23394 y := left.Args[1]
23395 x := left.Args[0]
23396 right := v_1
23397 if right.Op != OpRsh64Ux8 {
23398 continue
23399 }
23400 _ = right.Args[1]
23401 if x != right.Args[0] {
23402 continue
23403 }
23404 right_1 := right.Args[1]
23405 if right_1.Op != OpSub8 {
23406 continue
23407 }
23408 _ = right_1.Args[1]
23409 right_1_0 := right_1.Args[0]
23410 if right_1_0.Op != OpConst8 || auxIntToInt8(right_1_0.AuxInt) != 64 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 64)) {
23411 continue
23412 }
23413 v.reset(OpRotateLeft64)
23414 v.AddArg2(x, y)
23415 return true
23416 }
23417 break
23418 }
23419
23420
23421
23422 for {
23423 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23424 right := v_0
23425 if right.Op != OpRsh64Ux64 {
23426 continue
23427 }
23428 y := right.Args[1]
23429 x := right.Args[0]
23430 left := v_1
23431 if left.Op != OpLsh64x64 {
23432 continue
23433 }
23434 _ = left.Args[1]
23435 if x != left.Args[0] {
23436 continue
23437 }
23438 z := left.Args[1]
23439 if z.Op != OpSub64 {
23440 continue
23441 }
23442 _ = z.Args[1]
23443 z_0 := z.Args[0]
23444 if z_0.Op != OpConst64 || auxIntToInt64(z_0.AuxInt) != 64 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 64)) {
23445 continue
23446 }
23447 v.reset(OpRotateLeft64)
23448 v.AddArg2(x, z)
23449 return true
23450 }
23451 break
23452 }
23453
23454
23455
23456 for {
23457 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23458 right := v_0
23459 if right.Op != OpRsh64Ux32 {
23460 continue
23461 }
23462 y := right.Args[1]
23463 x := right.Args[0]
23464 left := v_1
23465 if left.Op != OpLsh64x32 {
23466 continue
23467 }
23468 _ = left.Args[1]
23469 if x != left.Args[0] {
23470 continue
23471 }
23472 z := left.Args[1]
23473 if z.Op != OpSub32 {
23474 continue
23475 }
23476 _ = z.Args[1]
23477 z_0 := z.Args[0]
23478 if z_0.Op != OpConst32 || auxIntToInt32(z_0.AuxInt) != 64 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 64)) {
23479 continue
23480 }
23481 v.reset(OpRotateLeft64)
23482 v.AddArg2(x, z)
23483 return true
23484 }
23485 break
23486 }
23487
23488
23489
23490 for {
23491 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23492 right := v_0
23493 if right.Op != OpRsh64Ux16 {
23494 continue
23495 }
23496 y := right.Args[1]
23497 x := right.Args[0]
23498 left := v_1
23499 if left.Op != OpLsh64x16 {
23500 continue
23501 }
23502 _ = left.Args[1]
23503 if x != left.Args[0] {
23504 continue
23505 }
23506 z := left.Args[1]
23507 if z.Op != OpSub16 {
23508 continue
23509 }
23510 _ = z.Args[1]
23511 z_0 := z.Args[0]
23512 if z_0.Op != OpConst16 || auxIntToInt16(z_0.AuxInt) != 64 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 64)) {
23513 continue
23514 }
23515 v.reset(OpRotateLeft64)
23516 v.AddArg2(x, z)
23517 return true
23518 }
23519 break
23520 }
23521
23522
23523
23524 for {
23525 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23526 right := v_0
23527 if right.Op != OpRsh64Ux8 {
23528 continue
23529 }
23530 y := right.Args[1]
23531 x := right.Args[0]
23532 left := v_1
23533 if left.Op != OpLsh64x8 {
23534 continue
23535 }
23536 _ = left.Args[1]
23537 if x != left.Args[0] {
23538 continue
23539 }
23540 z := left.Args[1]
23541 if z.Op != OpSub8 {
23542 continue
23543 }
23544 _ = z.Args[1]
23545 z_0 := z.Args[0]
23546 if z_0.Op != OpConst8 || auxIntToInt8(z_0.AuxInt) != 64 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 64)) {
23547 continue
23548 }
23549 v.reset(OpRotateLeft64)
23550 v.AddArg2(x, z)
23551 return true
23552 }
23553 break
23554 }
23555 return false
23556 }
23557 func rewriteValuegeneric_OpOr8(v *Value) bool {
23558 v_1 := v.Args[1]
23559 v_0 := v.Args[0]
23560 b := v.Block
23561 config := b.Func.Config
23562
23563
23564 for {
23565 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23566 if v_0.Op != OpConst8 {
23567 continue
23568 }
23569 c := auxIntToInt8(v_0.AuxInt)
23570 if v_1.Op != OpConst8 {
23571 continue
23572 }
23573 d := auxIntToInt8(v_1.AuxInt)
23574 v.reset(OpConst8)
23575 v.AuxInt = int8ToAuxInt(c | d)
23576 return true
23577 }
23578 break
23579 }
23580
23581
23582 for {
23583 t := v.Type
23584 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23585 if v_0.Op != OpCom8 {
23586 continue
23587 }
23588 x := v_0.Args[0]
23589 if v_1.Op != OpCom8 {
23590 continue
23591 }
23592 y := v_1.Args[0]
23593 v.reset(OpCom8)
23594 v0 := b.NewValue0(v.Pos, OpAnd8, t)
23595 v0.AddArg2(x, y)
23596 v.AddArg(v0)
23597 return true
23598 }
23599 break
23600 }
23601
23602
23603 for {
23604 x := v_0
23605 if x != v_1 {
23606 break
23607 }
23608 v.copyOf(x)
23609 return true
23610 }
23611
23612
23613 for {
23614 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23615 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 {
23616 continue
23617 }
23618 x := v_1
23619 v.copyOf(x)
23620 return true
23621 }
23622 break
23623 }
23624
23625
23626 for {
23627 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23628 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != -1 {
23629 continue
23630 }
23631 v.reset(OpConst8)
23632 v.AuxInt = int8ToAuxInt(-1)
23633 return true
23634 }
23635 break
23636 }
23637
23638
23639 for {
23640 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23641 if v_0.Op != OpCom8 {
23642 continue
23643 }
23644 x := v_0.Args[0]
23645 if x != v_1 {
23646 continue
23647 }
23648 v.reset(OpConst8)
23649 v.AuxInt = int8ToAuxInt(-1)
23650 return true
23651 }
23652 break
23653 }
23654
23655
23656 for {
23657 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23658 x := v_0
23659 if v_1.Op != OpOr8 {
23660 continue
23661 }
23662 _ = v_1.Args[1]
23663 v_1_0 := v_1.Args[0]
23664 v_1_1 := v_1.Args[1]
23665 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
23666 if x != v_1_0 {
23667 continue
23668 }
23669 y := v_1_1
23670 v.reset(OpOr8)
23671 v.AddArg2(x, y)
23672 return true
23673 }
23674 }
23675 break
23676 }
23677
23678
23679
23680 for {
23681 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23682 if v_0.Op != OpAnd8 {
23683 continue
23684 }
23685 _ = v_0.Args[1]
23686 v_0_0 := v_0.Args[0]
23687 v_0_1 := v_0.Args[1]
23688 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
23689 x := v_0_0
23690 if v_0_1.Op != OpConst8 {
23691 continue
23692 }
23693 c2 := auxIntToInt8(v_0_1.AuxInt)
23694 if v_1.Op != OpConst8 {
23695 continue
23696 }
23697 t := v_1.Type
23698 c1 := auxIntToInt8(v_1.AuxInt)
23699 if !(^(c1 | c2) == 0) {
23700 continue
23701 }
23702 v.reset(OpOr8)
23703 v0 := b.NewValue0(v.Pos, OpConst8, t)
23704 v0.AuxInt = int8ToAuxInt(c1)
23705 v.AddArg2(v0, x)
23706 return true
23707 }
23708 }
23709 break
23710 }
23711
23712
23713
23714 for {
23715 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23716 if v_0.Op != OpOr8 {
23717 continue
23718 }
23719 _ = v_0.Args[1]
23720 v_0_0 := v_0.Args[0]
23721 v_0_1 := v_0.Args[1]
23722 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
23723 i := v_0_0
23724 if i.Op != OpConst8 {
23725 continue
23726 }
23727 t := i.Type
23728 z := v_0_1
23729 x := v_1
23730 if !(z.Op != OpConst8 && x.Op != OpConst8) {
23731 continue
23732 }
23733 v.reset(OpOr8)
23734 v0 := b.NewValue0(v.Pos, OpOr8, t)
23735 v0.AddArg2(z, x)
23736 v.AddArg2(i, v0)
23737 return true
23738 }
23739 }
23740 break
23741 }
23742
23743
23744 for {
23745 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23746 if v_0.Op != OpConst8 {
23747 continue
23748 }
23749 t := v_0.Type
23750 c := auxIntToInt8(v_0.AuxInt)
23751 if v_1.Op != OpOr8 {
23752 continue
23753 }
23754 _ = v_1.Args[1]
23755 v_1_0 := v_1.Args[0]
23756 v_1_1 := v_1.Args[1]
23757 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
23758 if v_1_0.Op != OpConst8 || v_1_0.Type != t {
23759 continue
23760 }
23761 d := auxIntToInt8(v_1_0.AuxInt)
23762 x := v_1_1
23763 v.reset(OpOr8)
23764 v0 := b.NewValue0(v.Pos, OpConst8, t)
23765 v0.AuxInt = int8ToAuxInt(c | d)
23766 v.AddArg2(v0, x)
23767 return true
23768 }
23769 }
23770 break
23771 }
23772
23773
23774
23775 for {
23776 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23777 if v_0.Op != OpLsh8x64 {
23778 continue
23779 }
23780 _ = v_0.Args[1]
23781 x := v_0.Args[0]
23782 z := v_0.Args[1]
23783 if z.Op != OpConst64 {
23784 continue
23785 }
23786 c := auxIntToInt64(z.AuxInt)
23787 if v_1.Op != OpRsh8Ux64 {
23788 continue
23789 }
23790 _ = v_1.Args[1]
23791 if x != v_1.Args[0] {
23792 continue
23793 }
23794 v_1_1 := v_1.Args[1]
23795 if v_1_1.Op != OpConst64 {
23796 continue
23797 }
23798 d := auxIntToInt64(v_1_1.AuxInt)
23799 if !(c < 8 && d == 8-c && canRotate(config, 8)) {
23800 continue
23801 }
23802 v.reset(OpRotateLeft8)
23803 v.AddArg2(x, z)
23804 return true
23805 }
23806 break
23807 }
23808
23809
23810
23811 for {
23812 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23813 left := v_0
23814 if left.Op != OpLsh8x64 {
23815 continue
23816 }
23817 y := left.Args[1]
23818 x := left.Args[0]
23819 right := v_1
23820 if right.Op != OpRsh8Ux64 {
23821 continue
23822 }
23823 _ = right.Args[1]
23824 if x != right.Args[0] {
23825 continue
23826 }
23827 right_1 := right.Args[1]
23828 if right_1.Op != OpSub64 {
23829 continue
23830 }
23831 _ = right_1.Args[1]
23832 right_1_0 := right_1.Args[0]
23833 if right_1_0.Op != OpConst64 || auxIntToInt64(right_1_0.AuxInt) != 8 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 8)) {
23834 continue
23835 }
23836 v.reset(OpRotateLeft8)
23837 v.AddArg2(x, y)
23838 return true
23839 }
23840 break
23841 }
23842
23843
23844
23845 for {
23846 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23847 left := v_0
23848 if left.Op != OpLsh8x32 {
23849 continue
23850 }
23851 y := left.Args[1]
23852 x := left.Args[0]
23853 right := v_1
23854 if right.Op != OpRsh8Ux32 {
23855 continue
23856 }
23857 _ = right.Args[1]
23858 if x != right.Args[0] {
23859 continue
23860 }
23861 right_1 := right.Args[1]
23862 if right_1.Op != OpSub32 {
23863 continue
23864 }
23865 _ = right_1.Args[1]
23866 right_1_0 := right_1.Args[0]
23867 if right_1_0.Op != OpConst32 || auxIntToInt32(right_1_0.AuxInt) != 8 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 8)) {
23868 continue
23869 }
23870 v.reset(OpRotateLeft8)
23871 v.AddArg2(x, y)
23872 return true
23873 }
23874 break
23875 }
23876
23877
23878
23879 for {
23880 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23881 left := v_0
23882 if left.Op != OpLsh8x16 {
23883 continue
23884 }
23885 y := left.Args[1]
23886 x := left.Args[0]
23887 right := v_1
23888 if right.Op != OpRsh8Ux16 {
23889 continue
23890 }
23891 _ = right.Args[1]
23892 if x != right.Args[0] {
23893 continue
23894 }
23895 right_1 := right.Args[1]
23896 if right_1.Op != OpSub16 {
23897 continue
23898 }
23899 _ = right_1.Args[1]
23900 right_1_0 := right_1.Args[0]
23901 if right_1_0.Op != OpConst16 || auxIntToInt16(right_1_0.AuxInt) != 8 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 8)) {
23902 continue
23903 }
23904 v.reset(OpRotateLeft8)
23905 v.AddArg2(x, y)
23906 return true
23907 }
23908 break
23909 }
23910
23911
23912
23913 for {
23914 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23915 left := v_0
23916 if left.Op != OpLsh8x8 {
23917 continue
23918 }
23919 y := left.Args[1]
23920 x := left.Args[0]
23921 right := v_1
23922 if right.Op != OpRsh8Ux8 {
23923 continue
23924 }
23925 _ = right.Args[1]
23926 if x != right.Args[0] {
23927 continue
23928 }
23929 right_1 := right.Args[1]
23930 if right_1.Op != OpSub8 {
23931 continue
23932 }
23933 _ = right_1.Args[1]
23934 right_1_0 := right_1.Args[0]
23935 if right_1_0.Op != OpConst8 || auxIntToInt8(right_1_0.AuxInt) != 8 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 8)) {
23936 continue
23937 }
23938 v.reset(OpRotateLeft8)
23939 v.AddArg2(x, y)
23940 return true
23941 }
23942 break
23943 }
23944
23945
23946
23947 for {
23948 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23949 right := v_0
23950 if right.Op != OpRsh8Ux64 {
23951 continue
23952 }
23953 y := right.Args[1]
23954 x := right.Args[0]
23955 left := v_1
23956 if left.Op != OpLsh8x64 {
23957 continue
23958 }
23959 _ = left.Args[1]
23960 if x != left.Args[0] {
23961 continue
23962 }
23963 z := left.Args[1]
23964 if z.Op != OpSub64 {
23965 continue
23966 }
23967 _ = z.Args[1]
23968 z_0 := z.Args[0]
23969 if z_0.Op != OpConst64 || auxIntToInt64(z_0.AuxInt) != 8 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 8)) {
23970 continue
23971 }
23972 v.reset(OpRotateLeft8)
23973 v.AddArg2(x, z)
23974 return true
23975 }
23976 break
23977 }
23978
23979
23980
23981 for {
23982 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23983 right := v_0
23984 if right.Op != OpRsh8Ux32 {
23985 continue
23986 }
23987 y := right.Args[1]
23988 x := right.Args[0]
23989 left := v_1
23990 if left.Op != OpLsh8x32 {
23991 continue
23992 }
23993 _ = left.Args[1]
23994 if x != left.Args[0] {
23995 continue
23996 }
23997 z := left.Args[1]
23998 if z.Op != OpSub32 {
23999 continue
24000 }
24001 _ = z.Args[1]
24002 z_0 := z.Args[0]
24003 if z_0.Op != OpConst32 || auxIntToInt32(z_0.AuxInt) != 8 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 8)) {
24004 continue
24005 }
24006 v.reset(OpRotateLeft8)
24007 v.AddArg2(x, z)
24008 return true
24009 }
24010 break
24011 }
24012
24013
24014
24015 for {
24016 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
24017 right := v_0
24018 if right.Op != OpRsh8Ux16 {
24019 continue
24020 }
24021 y := right.Args[1]
24022 x := right.Args[0]
24023 left := v_1
24024 if left.Op != OpLsh8x16 {
24025 continue
24026 }
24027 _ = left.Args[1]
24028 if x != left.Args[0] {
24029 continue
24030 }
24031 z := left.Args[1]
24032 if z.Op != OpSub16 {
24033 continue
24034 }
24035 _ = z.Args[1]
24036 z_0 := z.Args[0]
24037 if z_0.Op != OpConst16 || auxIntToInt16(z_0.AuxInt) != 8 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 8)) {
24038 continue
24039 }
24040 v.reset(OpRotateLeft8)
24041 v.AddArg2(x, z)
24042 return true
24043 }
24044 break
24045 }
24046
24047
24048
24049 for {
24050 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
24051 right := v_0
24052 if right.Op != OpRsh8Ux8 {
24053 continue
24054 }
24055 y := right.Args[1]
24056 x := right.Args[0]
24057 left := v_1
24058 if left.Op != OpLsh8x8 {
24059 continue
24060 }
24061 _ = left.Args[1]
24062 if x != left.Args[0] {
24063 continue
24064 }
24065 z := left.Args[1]
24066 if z.Op != OpSub8 {
24067 continue
24068 }
24069 _ = z.Args[1]
24070 z_0 := z.Args[0]
24071 if z_0.Op != OpConst8 || auxIntToInt8(z_0.AuxInt) != 8 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 8)) {
24072 continue
24073 }
24074 v.reset(OpRotateLeft8)
24075 v.AddArg2(x, z)
24076 return true
24077 }
24078 break
24079 }
24080 return false
24081 }
24082 func rewriteValuegeneric_OpOrB(v *Value) bool {
24083 v_1 := v.Args[1]
24084 v_0 := v.Args[0]
24085 b := v.Block
24086
24087
24088
24089 for {
24090 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
24091 if v_0.Op != OpLess64 {
24092 continue
24093 }
24094 x := v_0.Args[1]
24095 v_0_0 := v_0.Args[0]
24096 if v_0_0.Op != OpConst64 {
24097 continue
24098 }
24099 c := auxIntToInt64(v_0_0.AuxInt)
24100 if v_1.Op != OpLess64 {
24101 continue
24102 }
24103 _ = v_1.Args[1]
24104 if x != v_1.Args[0] {
24105 continue
24106 }
24107 v_1_1 := v_1.Args[1]
24108 if v_1_1.Op != OpConst64 {
24109 continue
24110 }
24111 d := auxIntToInt64(v_1_1.AuxInt)
24112 if !(c >= d) {
24113 continue
24114 }
24115 v.reset(OpLess64U)
24116 v0 := b.NewValue0(v.Pos, OpConst64, x.Type)
24117 v0.AuxInt = int64ToAuxInt(c - d)
24118 v1 := b.NewValue0(v.Pos, OpSub64, x.Type)
24119 v2 := b.NewValue0(v.Pos, OpConst64, x.Type)
24120 v2.AuxInt = int64ToAuxInt(d)
24121 v1.AddArg2(x, v2)
24122 v.AddArg2(v0, v1)
24123 return true
24124 }
24125 break
24126 }
24127
24128
24129
24130 for {
24131 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
24132 if v_0.Op != OpLeq64 {
24133 continue
24134 }
24135 x := v_0.Args[1]
24136 v_0_0 := v_0.Args[0]
24137 if v_0_0.Op != OpConst64 {
24138 continue
24139 }
24140 c := auxIntToInt64(v_0_0.AuxInt)
24141 if v_1.Op != OpLess64 {
24142 continue
24143 }
24144 _ = v_1.Args[1]
24145 if x != v_1.Args[0] {
24146 continue
24147 }
24148 v_1_1 := v_1.Args[1]
24149 if v_1_1.Op != OpConst64 {
24150 continue
24151 }
24152 d := auxIntToInt64(v_1_1.AuxInt)
24153 if !(c >= d) {
24154 continue
24155 }
24156 v.reset(OpLeq64U)
24157 v0 := b.NewValue0(v.Pos, OpConst64, x.Type)
24158 v0.AuxInt = int64ToAuxInt(c - d)
24159 v1 := b.NewValue0(v.Pos, OpSub64, x.Type)
24160 v2 := b.NewValue0(v.Pos, OpConst64, x.Type)
24161 v2.AuxInt = int64ToAuxInt(d)
24162 v1.AddArg2(x, v2)
24163 v.AddArg2(v0, v1)
24164 return true
24165 }
24166 break
24167 }
24168
24169
24170
24171 for {
24172 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
24173 if v_0.Op != OpLess32 {
24174 continue
24175 }
24176 x := v_0.Args[1]
24177 v_0_0 := v_0.Args[0]
24178 if v_0_0.Op != OpConst32 {
24179 continue
24180 }
24181 c := auxIntToInt32(v_0_0.AuxInt)
24182 if v_1.Op != OpLess32 {
24183 continue
24184 }
24185 _ = v_1.Args[1]
24186 if x != v_1.Args[0] {
24187 continue
24188 }
24189 v_1_1 := v_1.Args[1]
24190 if v_1_1.Op != OpConst32 {
24191 continue
24192 }
24193 d := auxIntToInt32(v_1_1.AuxInt)
24194 if !(c >= d) {
24195 continue
24196 }
24197 v.reset(OpLess32U)
24198 v0 := b.NewValue0(v.Pos, OpConst32, x.Type)
24199 v0.AuxInt = int32ToAuxInt(c - d)
24200 v1 := b.NewValue0(v.Pos, OpSub32, x.Type)
24201 v2 := b.NewValue0(v.Pos, OpConst32, x.Type)
24202 v2.AuxInt = int32ToAuxInt(d)
24203 v1.AddArg2(x, v2)
24204 v.AddArg2(v0, v1)
24205 return true
24206 }
24207 break
24208 }
24209
24210
24211
24212 for {
24213 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
24214 if v_0.Op != OpLeq32 {
24215 continue
24216 }
24217 x := v_0.Args[1]
24218 v_0_0 := v_0.Args[0]
24219 if v_0_0.Op != OpConst32 {
24220 continue
24221 }
24222 c := auxIntToInt32(v_0_0.AuxInt)
24223 if v_1.Op != OpLess32 {
24224 continue
24225 }
24226 _ = v_1.Args[1]
24227 if x != v_1.Args[0] {
24228 continue
24229 }
24230 v_1_1 := v_1.Args[1]
24231 if v_1_1.Op != OpConst32 {
24232 continue
24233 }
24234 d := auxIntToInt32(v_1_1.AuxInt)
24235 if !(c >= d) {
24236 continue
24237 }
24238 v.reset(OpLeq32U)
24239 v0 := b.NewValue0(v.Pos, OpConst32, x.Type)
24240 v0.AuxInt = int32ToAuxInt(c - d)
24241 v1 := b.NewValue0(v.Pos, OpSub32, x.Type)
24242 v2 := b.NewValue0(v.Pos, OpConst32, x.Type)
24243 v2.AuxInt = int32ToAuxInt(d)
24244 v1.AddArg2(x, v2)
24245 v.AddArg2(v0, v1)
24246 return true
24247 }
24248 break
24249 }
24250
24251
24252
24253 for {
24254 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
24255 if v_0.Op != OpLess16 {
24256 continue
24257 }
24258 x := v_0.Args[1]
24259 v_0_0 := v_0.Args[0]
24260 if v_0_0.Op != OpConst16 {
24261 continue
24262 }
24263 c := auxIntToInt16(v_0_0.AuxInt)
24264 if v_1.Op != OpLess16 {
24265 continue
24266 }
24267 _ = v_1.Args[1]
24268 if x != v_1.Args[0] {
24269 continue
24270 }
24271 v_1_1 := v_1.Args[1]
24272 if v_1_1.Op != OpConst16 {
24273 continue
24274 }
24275 d := auxIntToInt16(v_1_1.AuxInt)
24276 if !(c >= d) {
24277 continue
24278 }
24279 v.reset(OpLess16U)
24280 v0 := b.NewValue0(v.Pos, OpConst16, x.Type)
24281 v0.AuxInt = int16ToAuxInt(c - d)
24282 v1 := b.NewValue0(v.Pos, OpSub16, x.Type)
24283 v2 := b.NewValue0(v.Pos, OpConst16, x.Type)
24284 v2.AuxInt = int16ToAuxInt(d)
24285 v1.AddArg2(x, v2)
24286 v.AddArg2(v0, v1)
24287 return true
24288 }
24289 break
24290 }
24291
24292
24293
24294 for {
24295 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
24296 if v_0.Op != OpLeq16 {
24297 continue
24298 }
24299 x := v_0.Args[1]
24300 v_0_0 := v_0.Args[0]
24301 if v_0_0.Op != OpConst16 {
24302 continue
24303 }
24304 c := auxIntToInt16(v_0_0.AuxInt)
24305 if v_1.Op != OpLess16 {
24306 continue
24307 }
24308 _ = v_1.Args[1]
24309 if x != v_1.Args[0] {
24310 continue
24311 }
24312 v_1_1 := v_1.Args[1]
24313 if v_1_1.Op != OpConst16 {
24314 continue
24315 }
24316 d := auxIntToInt16(v_1_1.AuxInt)
24317 if !(c >= d) {
24318 continue
24319 }
24320 v.reset(OpLeq16U)
24321 v0 := b.NewValue0(v.Pos, OpConst16, x.Type)
24322 v0.AuxInt = int16ToAuxInt(c - d)
24323 v1 := b.NewValue0(v.Pos, OpSub16, x.Type)
24324 v2 := b.NewValue0(v.Pos, OpConst16, x.Type)
24325 v2.AuxInt = int16ToAuxInt(d)
24326 v1.AddArg2(x, v2)
24327 v.AddArg2(v0, v1)
24328 return true
24329 }
24330 break
24331 }
24332
24333
24334
24335 for {
24336 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
24337 if v_0.Op != OpLess8 {
24338 continue
24339 }
24340 x := v_0.Args[1]
24341 v_0_0 := v_0.Args[0]
24342 if v_0_0.Op != OpConst8 {
24343 continue
24344 }
24345 c := auxIntToInt8(v_0_0.AuxInt)
24346 if v_1.Op != OpLess8 {
24347 continue
24348 }
24349 _ = v_1.Args[1]
24350 if x != v_1.Args[0] {
24351 continue
24352 }
24353 v_1_1 := v_1.Args[1]
24354 if v_1_1.Op != OpConst8 {
24355 continue
24356 }
24357 d := auxIntToInt8(v_1_1.AuxInt)
24358 if !(c >= d) {
24359 continue
24360 }
24361 v.reset(OpLess8U)
24362 v0 := b.NewValue0(v.Pos, OpConst8, x.Type)
24363 v0.AuxInt = int8ToAuxInt(c - d)
24364 v1 := b.NewValue0(v.Pos, OpSub8, x.Type)
24365 v2 := b.NewValue0(v.Pos, OpConst8, x.Type)
24366 v2.AuxInt = int8ToAuxInt(d)
24367 v1.AddArg2(x, v2)
24368 v.AddArg2(v0, v1)
24369 return true
24370 }
24371 break
24372 }
24373
24374
24375
24376 for {
24377 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
24378 if v_0.Op != OpLeq8 {
24379 continue
24380 }
24381 x := v_0.Args[1]
24382 v_0_0 := v_0.Args[0]
24383 if v_0_0.Op != OpConst8 {
24384 continue
24385 }
24386 c := auxIntToInt8(v_0_0.AuxInt)
24387 if v_1.Op != OpLess8 {
24388 continue
24389 }
24390 _ = v_1.Args[1]
24391 if x != v_1.Args[0] {
24392 continue
24393 }
24394 v_1_1 := v_1.Args[1]
24395 if v_1_1.Op != OpConst8 {
24396 continue
24397 }
24398 d := auxIntToInt8(v_1_1.AuxInt)
24399 if !(c >= d) {
24400 continue
24401 }
24402 v.reset(OpLeq8U)
24403 v0 := b.NewValue0(v.Pos, OpConst8, x.Type)
24404 v0.AuxInt = int8ToAuxInt(c - d)
24405 v1 := b.NewValue0(v.Pos, OpSub8, x.Type)
24406 v2 := b.NewValue0(v.Pos, OpConst8, x.Type)
24407 v2.AuxInt = int8ToAuxInt(d)
24408 v1.AddArg2(x, v2)
24409 v.AddArg2(v0, v1)
24410 return true
24411 }
24412 break
24413 }
24414
24415
24416
24417 for {
24418 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
24419 if v_0.Op != OpLess64 {
24420 continue
24421 }
24422 x := v_0.Args[1]
24423 v_0_0 := v_0.Args[0]
24424 if v_0_0.Op != OpConst64 {
24425 continue
24426 }
24427 c := auxIntToInt64(v_0_0.AuxInt)
24428 if v_1.Op != OpLeq64 {
24429 continue
24430 }
24431 _ = v_1.Args[1]
24432 if x != v_1.Args[0] {
24433 continue
24434 }
24435 v_1_1 := v_1.Args[1]
24436 if v_1_1.Op != OpConst64 {
24437 continue
24438 }
24439 d := auxIntToInt64(v_1_1.AuxInt)
24440 if !(c >= d+1 && d+1 > d) {
24441 continue
24442 }
24443 v.reset(OpLess64U)
24444 v0 := b.NewValue0(v.Pos, OpConst64, x.Type)
24445 v0.AuxInt = int64ToAuxInt(c - d - 1)
24446 v1 := b.NewValue0(v.Pos, OpSub64, x.Type)
24447 v2 := b.NewValue0(v.Pos, OpConst64, x.Type)
24448 v2.AuxInt = int64ToAuxInt(d + 1)
24449 v1.AddArg2(x, v2)
24450 v.AddArg2(v0, v1)
24451 return true
24452 }
24453 break
24454 }
24455
24456
24457
24458 for {
24459 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
24460 if v_0.Op != OpLeq64 {
24461 continue
24462 }
24463 x := v_0.Args[1]
24464 v_0_0 := v_0.Args[0]
24465 if v_0_0.Op != OpConst64 {
24466 continue
24467 }
24468 c := auxIntToInt64(v_0_0.AuxInt)
24469 if v_1.Op != OpLeq64 {
24470 continue
24471 }
24472 _ = v_1.Args[1]
24473 if x != v_1.Args[0] {
24474 continue
24475 }
24476 v_1_1 := v_1.Args[1]
24477 if v_1_1.Op != OpConst64 {
24478 continue
24479 }
24480 d := auxIntToInt64(v_1_1.AuxInt)
24481 if !(c >= d+1 && d+1 > d) {
24482 continue
24483 }
24484 v.reset(OpLeq64U)
24485 v0 := b.NewValue0(v.Pos, OpConst64, x.Type)
24486 v0.AuxInt = int64ToAuxInt(c - d - 1)
24487 v1 := b.NewValue0(v.Pos, OpSub64, x.Type)
24488 v2 := b.NewValue0(v.Pos, OpConst64, x.Type)
24489 v2.AuxInt = int64ToAuxInt(d + 1)
24490 v1.AddArg2(x, v2)
24491 v.AddArg2(v0, v1)
24492 return true
24493 }
24494 break
24495 }
24496
24497
24498
24499 for {
24500 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
24501 if v_0.Op != OpLess32 {
24502 continue
24503 }
24504 x := v_0.Args[1]
24505 v_0_0 := v_0.Args[0]
24506 if v_0_0.Op != OpConst32 {
24507 continue
24508 }
24509 c := auxIntToInt32(v_0_0.AuxInt)
24510 if v_1.Op != OpLeq32 {
24511 continue
24512 }
24513 _ = v_1.Args[1]
24514 if x != v_1.Args[0] {
24515 continue
24516 }
24517 v_1_1 := v_1.Args[1]
24518 if v_1_1.Op != OpConst32 {
24519 continue
24520 }
24521 d := auxIntToInt32(v_1_1.AuxInt)
24522 if !(c >= d+1 && d+1 > d) {
24523 continue
24524 }
24525 v.reset(OpLess32U)
24526 v0 := b.NewValue0(v.Pos, OpConst32, x.Type)
24527 v0.AuxInt = int32ToAuxInt(c - d - 1)
24528 v1 := b.NewValue0(v.Pos, OpSub32, x.Type)
24529 v2 := b.NewValue0(v.Pos, OpConst32, x.Type)
24530 v2.AuxInt = int32ToAuxInt(d + 1)
24531 v1.AddArg2(x, v2)
24532 v.AddArg2(v0, v1)
24533 return true
24534 }
24535 break
24536 }
24537
24538
24539
24540 for {
24541 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
24542 if v_0.Op != OpLeq32 {
24543 continue
24544 }
24545 x := v_0.Args[1]
24546 v_0_0 := v_0.Args[0]
24547 if v_0_0.Op != OpConst32 {
24548 continue
24549 }
24550 c := auxIntToInt32(v_0_0.AuxInt)
24551 if v_1.Op != OpLeq32 {
24552 continue
24553 }
24554 _ = v_1.Args[1]
24555 if x != v_1.Args[0] {
24556 continue
24557 }
24558 v_1_1 := v_1.Args[1]
24559 if v_1_1.Op != OpConst32 {
24560 continue
24561 }
24562 d := auxIntToInt32(v_1_1.AuxInt)
24563 if !(c >= d+1 && d+1 > d) {
24564 continue
24565 }
24566 v.reset(OpLeq32U)
24567 v0 := b.NewValue0(v.Pos, OpConst32, x.Type)
24568 v0.AuxInt = int32ToAuxInt(c - d - 1)
24569 v1 := b.NewValue0(v.Pos, OpSub32, x.Type)
24570 v2 := b.NewValue0(v.Pos, OpConst32, x.Type)
24571 v2.AuxInt = int32ToAuxInt(d + 1)
24572 v1.AddArg2(x, v2)
24573 v.AddArg2(v0, v1)
24574 return true
24575 }
24576 break
24577 }
24578
24579
24580
24581 for {
24582 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
24583 if v_0.Op != OpLess16 {
24584 continue
24585 }
24586 x := v_0.Args[1]
24587 v_0_0 := v_0.Args[0]
24588 if v_0_0.Op != OpConst16 {
24589 continue
24590 }
24591 c := auxIntToInt16(v_0_0.AuxInt)
24592 if v_1.Op != OpLeq16 {
24593 continue
24594 }
24595 _ = v_1.Args[1]
24596 if x != v_1.Args[0] {
24597 continue
24598 }
24599 v_1_1 := v_1.Args[1]
24600 if v_1_1.Op != OpConst16 {
24601 continue
24602 }
24603 d := auxIntToInt16(v_1_1.AuxInt)
24604 if !(c >= d+1 && d+1 > d) {
24605 continue
24606 }
24607 v.reset(OpLess16U)
24608 v0 := b.NewValue0(v.Pos, OpConst16, x.Type)
24609 v0.AuxInt = int16ToAuxInt(c - d - 1)
24610 v1 := b.NewValue0(v.Pos, OpSub16, x.Type)
24611 v2 := b.NewValue0(v.Pos, OpConst16, x.Type)
24612 v2.AuxInt = int16ToAuxInt(d + 1)
24613 v1.AddArg2(x, v2)
24614 v.AddArg2(v0, v1)
24615 return true
24616 }
24617 break
24618 }
24619
24620
24621
24622 for {
24623 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
24624 if v_0.Op != OpLeq16 {
24625 continue
24626 }
24627 x := v_0.Args[1]
24628 v_0_0 := v_0.Args[0]
24629 if v_0_0.Op != OpConst16 {
24630 continue
24631 }
24632 c := auxIntToInt16(v_0_0.AuxInt)
24633 if v_1.Op != OpLeq16 {
24634 continue
24635 }
24636 _ = v_1.Args[1]
24637 if x != v_1.Args[0] {
24638 continue
24639 }
24640 v_1_1 := v_1.Args[1]
24641 if v_1_1.Op != OpConst16 {
24642 continue
24643 }
24644 d := auxIntToInt16(v_1_1.AuxInt)
24645 if !(c >= d+1 && d+1 > d) {
24646 continue
24647 }
24648 v.reset(OpLeq16U)
24649 v0 := b.NewValue0(v.Pos, OpConst16, x.Type)
24650 v0.AuxInt = int16ToAuxInt(c - d - 1)
24651 v1 := b.NewValue0(v.Pos, OpSub16, x.Type)
24652 v2 := b.NewValue0(v.Pos, OpConst16, x.Type)
24653 v2.AuxInt = int16ToAuxInt(d + 1)
24654 v1.AddArg2(x, v2)
24655 v.AddArg2(v0, v1)
24656 return true
24657 }
24658 break
24659 }
24660
24661
24662
24663 for {
24664 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
24665 if v_0.Op != OpLess8 {
24666 continue
24667 }
24668 x := v_0.Args[1]
24669 v_0_0 := v_0.Args[0]
24670 if v_0_0.Op != OpConst8 {
24671 continue
24672 }
24673 c := auxIntToInt8(v_0_0.AuxInt)
24674 if v_1.Op != OpLeq8 {
24675 continue
24676 }
24677 _ = v_1.Args[1]
24678 if x != v_1.Args[0] {
24679 continue
24680 }
24681 v_1_1 := v_1.Args[1]
24682 if v_1_1.Op != OpConst8 {
24683 continue
24684 }
24685 d := auxIntToInt8(v_1_1.AuxInt)
24686 if !(c >= d+1 && d+1 > d) {
24687 continue
24688 }
24689 v.reset(OpLess8U)
24690 v0 := b.NewValue0(v.Pos, OpConst8, x.Type)
24691 v0.AuxInt = int8ToAuxInt(c - d - 1)
24692 v1 := b.NewValue0(v.Pos, OpSub8, x.Type)
24693 v2 := b.NewValue0(v.Pos, OpConst8, x.Type)
24694 v2.AuxInt = int8ToAuxInt(d + 1)
24695 v1.AddArg2(x, v2)
24696 v.AddArg2(v0, v1)
24697 return true
24698 }
24699 break
24700 }
24701
24702
24703
24704 for {
24705 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
24706 if v_0.Op != OpLeq8 {
24707 continue
24708 }
24709 x := v_0.Args[1]
24710 v_0_0 := v_0.Args[0]
24711 if v_0_0.Op != OpConst8 {
24712 continue
24713 }
24714 c := auxIntToInt8(v_0_0.AuxInt)
24715 if v_1.Op != OpLeq8 {
24716 continue
24717 }
24718 _ = v_1.Args[1]
24719 if x != v_1.Args[0] {
24720 continue
24721 }
24722 v_1_1 := v_1.Args[1]
24723 if v_1_1.Op != OpConst8 {
24724 continue
24725 }
24726 d := auxIntToInt8(v_1_1.AuxInt)
24727 if !(c >= d+1 && d+1 > d) {
24728 continue
24729 }
24730 v.reset(OpLeq8U)
24731 v0 := b.NewValue0(v.Pos, OpConst8, x.Type)
24732 v0.AuxInt = int8ToAuxInt(c - d - 1)
24733 v1 := b.NewValue0(v.Pos, OpSub8, x.Type)
24734 v2 := b.NewValue0(v.Pos, OpConst8, x.Type)
24735 v2.AuxInt = int8ToAuxInt(d + 1)
24736 v1.AddArg2(x, v2)
24737 v.AddArg2(v0, v1)
24738 return true
24739 }
24740 break
24741 }
24742
24743
24744
24745 for {
24746 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
24747 if v_0.Op != OpLess64U {
24748 continue
24749 }
24750 x := v_0.Args[1]
24751 v_0_0 := v_0.Args[0]
24752 if v_0_0.Op != OpConst64 {
24753 continue
24754 }
24755 c := auxIntToInt64(v_0_0.AuxInt)
24756 if v_1.Op != OpLess64U {
24757 continue
24758 }
24759 _ = v_1.Args[1]
24760 if x != v_1.Args[0] {
24761 continue
24762 }
24763 v_1_1 := v_1.Args[1]
24764 if v_1_1.Op != OpConst64 {
24765 continue
24766 }
24767 d := auxIntToInt64(v_1_1.AuxInt)
24768 if !(uint64(c) >= uint64(d)) {
24769 continue
24770 }
24771 v.reset(OpLess64U)
24772 v0 := b.NewValue0(v.Pos, OpConst64, x.Type)
24773 v0.AuxInt = int64ToAuxInt(c - d)
24774 v1 := b.NewValue0(v.Pos, OpSub64, x.Type)
24775 v2 := b.NewValue0(v.Pos, OpConst64, x.Type)
24776 v2.AuxInt = int64ToAuxInt(d)
24777 v1.AddArg2(x, v2)
24778 v.AddArg2(v0, v1)
24779 return true
24780 }
24781 break
24782 }
24783
24784
24785
24786 for {
24787 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
24788 if v_0.Op != OpLeq64U {
24789 continue
24790 }
24791 x := v_0.Args[1]
24792 v_0_0 := v_0.Args[0]
24793 if v_0_0.Op != OpConst64 {
24794 continue
24795 }
24796 c := auxIntToInt64(v_0_0.AuxInt)
24797 if v_1.Op != OpLess64U {
24798 continue
24799 }
24800 _ = v_1.Args[1]
24801 if x != v_1.Args[0] {
24802 continue
24803 }
24804 v_1_1 := v_1.Args[1]
24805 if v_1_1.Op != OpConst64 {
24806 continue
24807 }
24808 d := auxIntToInt64(v_1_1.AuxInt)
24809 if !(uint64(c) >= uint64(d)) {
24810 continue
24811 }
24812 v.reset(OpLeq64U)
24813 v0 := b.NewValue0(v.Pos, OpConst64, x.Type)
24814 v0.AuxInt = int64ToAuxInt(c - d)
24815 v1 := b.NewValue0(v.Pos, OpSub64, x.Type)
24816 v2 := b.NewValue0(v.Pos, OpConst64, x.Type)
24817 v2.AuxInt = int64ToAuxInt(d)
24818 v1.AddArg2(x, v2)
24819 v.AddArg2(v0, v1)
24820 return true
24821 }
24822 break
24823 }
24824
24825
24826
24827 for {
24828 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
24829 if v_0.Op != OpLess32U {
24830 continue
24831 }
24832 x := v_0.Args[1]
24833 v_0_0 := v_0.Args[0]
24834 if v_0_0.Op != OpConst32 {
24835 continue
24836 }
24837 c := auxIntToInt32(v_0_0.AuxInt)
24838 if v_1.Op != OpLess32U {
24839 continue
24840 }
24841 _ = v_1.Args[1]
24842 if x != v_1.Args[0] {
24843 continue
24844 }
24845 v_1_1 := v_1.Args[1]
24846 if v_1_1.Op != OpConst32 {
24847 continue
24848 }
24849 d := auxIntToInt32(v_1_1.AuxInt)
24850 if !(uint32(c) >= uint32(d)) {
24851 continue
24852 }
24853 v.reset(OpLess32U)
24854 v0 := b.NewValue0(v.Pos, OpConst32, x.Type)
24855 v0.AuxInt = int32ToAuxInt(c - d)
24856 v1 := b.NewValue0(v.Pos, OpSub32, x.Type)
24857 v2 := b.NewValue0(v.Pos, OpConst32, x.Type)
24858 v2.AuxInt = int32ToAuxInt(d)
24859 v1.AddArg2(x, v2)
24860 v.AddArg2(v0, v1)
24861 return true
24862 }
24863 break
24864 }
24865
24866
24867
24868 for {
24869 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
24870 if v_0.Op != OpLeq32U {
24871 continue
24872 }
24873 x := v_0.Args[1]
24874 v_0_0 := v_0.Args[0]
24875 if v_0_0.Op != OpConst32 {
24876 continue
24877 }
24878 c := auxIntToInt32(v_0_0.AuxInt)
24879 if v_1.Op != OpLess32U {
24880 continue
24881 }
24882 _ = v_1.Args[1]
24883 if x != v_1.Args[0] {
24884 continue
24885 }
24886 v_1_1 := v_1.Args[1]
24887 if v_1_1.Op != OpConst32 {
24888 continue
24889 }
24890 d := auxIntToInt32(v_1_1.AuxInt)
24891 if !(uint32(c) >= uint32(d)) {
24892 continue
24893 }
24894 v.reset(OpLeq32U)
24895 v0 := b.NewValue0(v.Pos, OpConst32, x.Type)
24896 v0.AuxInt = int32ToAuxInt(c - d)
24897 v1 := b.NewValue0(v.Pos, OpSub32, x.Type)
24898 v2 := b.NewValue0(v.Pos, OpConst32, x.Type)
24899 v2.AuxInt = int32ToAuxInt(d)
24900 v1.AddArg2(x, v2)
24901 v.AddArg2(v0, v1)
24902 return true
24903 }
24904 break
24905 }
24906
24907
24908
24909 for {
24910 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
24911 if v_0.Op != OpLess16U {
24912 continue
24913 }
24914 x := v_0.Args[1]
24915 v_0_0 := v_0.Args[0]
24916 if v_0_0.Op != OpConst16 {
24917 continue
24918 }
24919 c := auxIntToInt16(v_0_0.AuxInt)
24920 if v_1.Op != OpLess16U {
24921 continue
24922 }
24923 _ = v_1.Args[1]
24924 if x != v_1.Args[0] {
24925 continue
24926 }
24927 v_1_1 := v_1.Args[1]
24928 if v_1_1.Op != OpConst16 {
24929 continue
24930 }
24931 d := auxIntToInt16(v_1_1.AuxInt)
24932 if !(uint16(c) >= uint16(d)) {
24933 continue
24934 }
24935 v.reset(OpLess16U)
24936 v0 := b.NewValue0(v.Pos, OpConst16, x.Type)
24937 v0.AuxInt = int16ToAuxInt(c - d)
24938 v1 := b.NewValue0(v.Pos, OpSub16, x.Type)
24939 v2 := b.NewValue0(v.Pos, OpConst16, x.Type)
24940 v2.AuxInt = int16ToAuxInt(d)
24941 v1.AddArg2(x, v2)
24942 v.AddArg2(v0, v1)
24943 return true
24944 }
24945 break
24946 }
24947
24948
24949
24950 for {
24951 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
24952 if v_0.Op != OpLeq16U {
24953 continue
24954 }
24955 x := v_0.Args[1]
24956 v_0_0 := v_0.Args[0]
24957 if v_0_0.Op != OpConst16 {
24958 continue
24959 }
24960 c := auxIntToInt16(v_0_0.AuxInt)
24961 if v_1.Op != OpLess16U {
24962 continue
24963 }
24964 _ = v_1.Args[1]
24965 if x != v_1.Args[0] {
24966 continue
24967 }
24968 v_1_1 := v_1.Args[1]
24969 if v_1_1.Op != OpConst16 {
24970 continue
24971 }
24972 d := auxIntToInt16(v_1_1.AuxInt)
24973 if !(uint16(c) >= uint16(d)) {
24974 continue
24975 }
24976 v.reset(OpLeq16U)
24977 v0 := b.NewValue0(v.Pos, OpConst16, x.Type)
24978 v0.AuxInt = int16ToAuxInt(c - d)
24979 v1 := b.NewValue0(v.Pos, OpSub16, x.Type)
24980 v2 := b.NewValue0(v.Pos, OpConst16, x.Type)
24981 v2.AuxInt = int16ToAuxInt(d)
24982 v1.AddArg2(x, v2)
24983 v.AddArg2(v0, v1)
24984 return true
24985 }
24986 break
24987 }
24988
24989
24990
24991 for {
24992 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
24993 if v_0.Op != OpLess8U {
24994 continue
24995 }
24996 x := v_0.Args[1]
24997 v_0_0 := v_0.Args[0]
24998 if v_0_0.Op != OpConst8 {
24999 continue
25000 }
25001 c := auxIntToInt8(v_0_0.AuxInt)
25002 if v_1.Op != OpLess8U {
25003 continue
25004 }
25005 _ = v_1.Args[1]
25006 if x != v_1.Args[0] {
25007 continue
25008 }
25009 v_1_1 := v_1.Args[1]
25010 if v_1_1.Op != OpConst8 {
25011 continue
25012 }
25013 d := auxIntToInt8(v_1_1.AuxInt)
25014 if !(uint8(c) >= uint8(d)) {
25015 continue
25016 }
25017 v.reset(OpLess8U)
25018 v0 := b.NewValue0(v.Pos, OpConst8, x.Type)
25019 v0.AuxInt = int8ToAuxInt(c - d)
25020 v1 := b.NewValue0(v.Pos, OpSub8, x.Type)
25021 v2 := b.NewValue0(v.Pos, OpConst8, x.Type)
25022 v2.AuxInt = int8ToAuxInt(d)
25023 v1.AddArg2(x, v2)
25024 v.AddArg2(v0, v1)
25025 return true
25026 }
25027 break
25028 }
25029
25030
25031
25032 for {
25033 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
25034 if v_0.Op != OpLeq8U {
25035 continue
25036 }
25037 x := v_0.Args[1]
25038 v_0_0 := v_0.Args[0]
25039 if v_0_0.Op != OpConst8 {
25040 continue
25041 }
25042 c := auxIntToInt8(v_0_0.AuxInt)
25043 if v_1.Op != OpLess8U {
25044 continue
25045 }
25046 _ = v_1.Args[1]
25047 if x != v_1.Args[0] {
25048 continue
25049 }
25050 v_1_1 := v_1.Args[1]
25051 if v_1_1.Op != OpConst8 {
25052 continue
25053 }
25054 d := auxIntToInt8(v_1_1.AuxInt)
25055 if !(uint8(c) >= uint8(d)) {
25056 continue
25057 }
25058 v.reset(OpLeq8U)
25059 v0 := b.NewValue0(v.Pos, OpConst8, x.Type)
25060 v0.AuxInt = int8ToAuxInt(c - d)
25061 v1 := b.NewValue0(v.Pos, OpSub8, x.Type)
25062 v2 := b.NewValue0(v.Pos, OpConst8, x.Type)
25063 v2.AuxInt = int8ToAuxInt(d)
25064 v1.AddArg2(x, v2)
25065 v.AddArg2(v0, v1)
25066 return true
25067 }
25068 break
25069 }
25070
25071
25072
25073 for {
25074 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
25075 if v_0.Op != OpLess64U {
25076 continue
25077 }
25078 x := v_0.Args[1]
25079 v_0_0 := v_0.Args[0]
25080 if v_0_0.Op != OpConst64 {
25081 continue
25082 }
25083 c := auxIntToInt64(v_0_0.AuxInt)
25084 if v_1.Op != OpLeq64U {
25085 continue
25086 }
25087 _ = v_1.Args[1]
25088 if x != v_1.Args[0] {
25089 continue
25090 }
25091 v_1_1 := v_1.Args[1]
25092 if v_1_1.Op != OpConst64 {
25093 continue
25094 }
25095 d := auxIntToInt64(v_1_1.AuxInt)
25096 if !(uint64(c) >= uint64(d+1) && uint64(d+1) > uint64(d)) {
25097 continue
25098 }
25099 v.reset(OpLess64U)
25100 v0 := b.NewValue0(v.Pos, OpConst64, x.Type)
25101 v0.AuxInt = int64ToAuxInt(c - d - 1)
25102 v1 := b.NewValue0(v.Pos, OpSub64, x.Type)
25103 v2 := b.NewValue0(v.Pos, OpConst64, x.Type)
25104 v2.AuxInt = int64ToAuxInt(d + 1)
25105 v1.AddArg2(x, v2)
25106 v.AddArg2(v0, v1)
25107 return true
25108 }
25109 break
25110 }
25111
25112
25113
25114 for {
25115 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
25116 if v_0.Op != OpLeq64U {
25117 continue
25118 }
25119 x := v_0.Args[1]
25120 v_0_0 := v_0.Args[0]
25121 if v_0_0.Op != OpConst64 {
25122 continue
25123 }
25124 c := auxIntToInt64(v_0_0.AuxInt)
25125 if v_1.Op != OpLeq64U {
25126 continue
25127 }
25128 _ = v_1.Args[1]
25129 if x != v_1.Args[0] {
25130 continue
25131 }
25132 v_1_1 := v_1.Args[1]
25133 if v_1_1.Op != OpConst64 {
25134 continue
25135 }
25136 d := auxIntToInt64(v_1_1.AuxInt)
25137 if !(uint64(c) >= uint64(d+1) && uint64(d+1) > uint64(d)) {
25138 continue
25139 }
25140 v.reset(OpLeq64U)
25141 v0 := b.NewValue0(v.Pos, OpConst64, x.Type)
25142 v0.AuxInt = int64ToAuxInt(c - d - 1)
25143 v1 := b.NewValue0(v.Pos, OpSub64, x.Type)
25144 v2 := b.NewValue0(v.Pos, OpConst64, x.Type)
25145 v2.AuxInt = int64ToAuxInt(d + 1)
25146 v1.AddArg2(x, v2)
25147 v.AddArg2(v0, v1)
25148 return true
25149 }
25150 break
25151 }
25152
25153
25154
25155 for {
25156 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
25157 if v_0.Op != OpLess32U {
25158 continue
25159 }
25160 x := v_0.Args[1]
25161 v_0_0 := v_0.Args[0]
25162 if v_0_0.Op != OpConst32 {
25163 continue
25164 }
25165 c := auxIntToInt32(v_0_0.AuxInt)
25166 if v_1.Op != OpLeq32U {
25167 continue
25168 }
25169 _ = v_1.Args[1]
25170 if x != v_1.Args[0] {
25171 continue
25172 }
25173 v_1_1 := v_1.Args[1]
25174 if v_1_1.Op != OpConst32 {
25175 continue
25176 }
25177 d := auxIntToInt32(v_1_1.AuxInt)
25178 if !(uint32(c) >= uint32(d+1) && uint32(d+1) > uint32(d)) {
25179 continue
25180 }
25181 v.reset(OpLess32U)
25182 v0 := b.NewValue0(v.Pos, OpConst32, x.Type)
25183 v0.AuxInt = int32ToAuxInt(c - d - 1)
25184 v1 := b.NewValue0(v.Pos, OpSub32, x.Type)
25185 v2 := b.NewValue0(v.Pos, OpConst32, x.Type)
25186 v2.AuxInt = int32ToAuxInt(d + 1)
25187 v1.AddArg2(x, v2)
25188 v.AddArg2(v0, v1)
25189 return true
25190 }
25191 break
25192 }
25193
25194
25195
25196 for {
25197 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
25198 if v_0.Op != OpLeq32U {
25199 continue
25200 }
25201 x := v_0.Args[1]
25202 v_0_0 := v_0.Args[0]
25203 if v_0_0.Op != OpConst32 {
25204 continue
25205 }
25206 c := auxIntToInt32(v_0_0.AuxInt)
25207 if v_1.Op != OpLeq32U {
25208 continue
25209 }
25210 _ = v_1.Args[1]
25211 if x != v_1.Args[0] {
25212 continue
25213 }
25214 v_1_1 := v_1.Args[1]
25215 if v_1_1.Op != OpConst32 {
25216 continue
25217 }
25218 d := auxIntToInt32(v_1_1.AuxInt)
25219 if !(uint32(c) >= uint32(d+1) && uint32(d+1) > uint32(d)) {
25220 continue
25221 }
25222 v.reset(OpLeq32U)
25223 v0 := b.NewValue0(v.Pos, OpConst32, x.Type)
25224 v0.AuxInt = int32ToAuxInt(c - d - 1)
25225 v1 := b.NewValue0(v.Pos, OpSub32, x.Type)
25226 v2 := b.NewValue0(v.Pos, OpConst32, x.Type)
25227 v2.AuxInt = int32ToAuxInt(d + 1)
25228 v1.AddArg2(x, v2)
25229 v.AddArg2(v0, v1)
25230 return true
25231 }
25232 break
25233 }
25234
25235
25236
25237 for {
25238 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
25239 if v_0.Op != OpLess16U {
25240 continue
25241 }
25242 x := v_0.Args[1]
25243 v_0_0 := v_0.Args[0]
25244 if v_0_0.Op != OpConst16 {
25245 continue
25246 }
25247 c := auxIntToInt16(v_0_0.AuxInt)
25248 if v_1.Op != OpLeq16U {
25249 continue
25250 }
25251 _ = v_1.Args[1]
25252 if x != v_1.Args[0] {
25253 continue
25254 }
25255 v_1_1 := v_1.Args[1]
25256 if v_1_1.Op != OpConst16 {
25257 continue
25258 }
25259 d := auxIntToInt16(v_1_1.AuxInt)
25260 if !(uint16(c) >= uint16(d+1) && uint16(d+1) > uint16(d)) {
25261 continue
25262 }
25263 v.reset(OpLess16U)
25264 v0 := b.NewValue0(v.Pos, OpConst16, x.Type)
25265 v0.AuxInt = int16ToAuxInt(c - d - 1)
25266 v1 := b.NewValue0(v.Pos, OpSub16, x.Type)
25267 v2 := b.NewValue0(v.Pos, OpConst16, x.Type)
25268 v2.AuxInt = int16ToAuxInt(d + 1)
25269 v1.AddArg2(x, v2)
25270 v.AddArg2(v0, v1)
25271 return true
25272 }
25273 break
25274 }
25275
25276
25277
25278 for {
25279 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
25280 if v_0.Op != OpLeq16U {
25281 continue
25282 }
25283 x := v_0.Args[1]
25284 v_0_0 := v_0.Args[0]
25285 if v_0_0.Op != OpConst16 {
25286 continue
25287 }
25288 c := auxIntToInt16(v_0_0.AuxInt)
25289 if v_1.Op != OpLeq16U {
25290 continue
25291 }
25292 _ = v_1.Args[1]
25293 if x != v_1.Args[0] {
25294 continue
25295 }
25296 v_1_1 := v_1.Args[1]
25297 if v_1_1.Op != OpConst16 {
25298 continue
25299 }
25300 d := auxIntToInt16(v_1_1.AuxInt)
25301 if !(uint16(c) >= uint16(d+1) && uint16(d+1) > uint16(d)) {
25302 continue
25303 }
25304 v.reset(OpLeq16U)
25305 v0 := b.NewValue0(v.Pos, OpConst16, x.Type)
25306 v0.AuxInt = int16ToAuxInt(c - d - 1)
25307 v1 := b.NewValue0(v.Pos, OpSub16, x.Type)
25308 v2 := b.NewValue0(v.Pos, OpConst16, x.Type)
25309 v2.AuxInt = int16ToAuxInt(d + 1)
25310 v1.AddArg2(x, v2)
25311 v.AddArg2(v0, v1)
25312 return true
25313 }
25314 break
25315 }
25316
25317
25318
25319 for {
25320 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
25321 if v_0.Op != OpLess8U {
25322 continue
25323 }
25324 x := v_0.Args[1]
25325 v_0_0 := v_0.Args[0]
25326 if v_0_0.Op != OpConst8 {
25327 continue
25328 }
25329 c := auxIntToInt8(v_0_0.AuxInt)
25330 if v_1.Op != OpLeq8U {
25331 continue
25332 }
25333 _ = v_1.Args[1]
25334 if x != v_1.Args[0] {
25335 continue
25336 }
25337 v_1_1 := v_1.Args[1]
25338 if v_1_1.Op != OpConst8 {
25339 continue
25340 }
25341 d := auxIntToInt8(v_1_1.AuxInt)
25342 if !(uint8(c) >= uint8(d+1) && uint8(d+1) > uint8(d)) {
25343 continue
25344 }
25345 v.reset(OpLess8U)
25346 v0 := b.NewValue0(v.Pos, OpConst8, x.Type)
25347 v0.AuxInt = int8ToAuxInt(c - d - 1)
25348 v1 := b.NewValue0(v.Pos, OpSub8, x.Type)
25349 v2 := b.NewValue0(v.Pos, OpConst8, x.Type)
25350 v2.AuxInt = int8ToAuxInt(d + 1)
25351 v1.AddArg2(x, v2)
25352 v.AddArg2(v0, v1)
25353 return true
25354 }
25355 break
25356 }
25357
25358
25359
25360 for {
25361 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
25362 if v_0.Op != OpLeq8U {
25363 continue
25364 }
25365 x := v_0.Args[1]
25366 v_0_0 := v_0.Args[0]
25367 if v_0_0.Op != OpConst8 {
25368 continue
25369 }
25370 c := auxIntToInt8(v_0_0.AuxInt)
25371 if v_1.Op != OpLeq8U {
25372 continue
25373 }
25374 _ = v_1.Args[1]
25375 if x != v_1.Args[0] {
25376 continue
25377 }
25378 v_1_1 := v_1.Args[1]
25379 if v_1_1.Op != OpConst8 {
25380 continue
25381 }
25382 d := auxIntToInt8(v_1_1.AuxInt)
25383 if !(uint8(c) >= uint8(d+1) && uint8(d+1) > uint8(d)) {
25384 continue
25385 }
25386 v.reset(OpLeq8U)
25387 v0 := b.NewValue0(v.Pos, OpConst8, x.Type)
25388 v0.AuxInt = int8ToAuxInt(c - d - 1)
25389 v1 := b.NewValue0(v.Pos, OpSub8, x.Type)
25390 v2 := b.NewValue0(v.Pos, OpConst8, x.Type)
25391 v2.AuxInt = int8ToAuxInt(d + 1)
25392 v1.AddArg2(x, v2)
25393 v.AddArg2(v0, v1)
25394 return true
25395 }
25396 break
25397 }
25398 return false
25399 }
25400 func rewriteValuegeneric_OpPhi(v *Value) bool {
25401 b := v.Block
25402
25403
25404 for {
25405 if len(v.Args) != 2 {
25406 break
25407 }
25408 _ = v.Args[1]
25409 v_0 := v.Args[0]
25410 if v_0.Op != OpConst8 {
25411 break
25412 }
25413 c := auxIntToInt8(v_0.AuxInt)
25414 v_1 := v.Args[1]
25415 if v_1.Op != OpConst8 || auxIntToInt8(v_1.AuxInt) != c {
25416 break
25417 }
25418 v.reset(OpConst8)
25419 v.AuxInt = int8ToAuxInt(c)
25420 return true
25421 }
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 != OpConst16 {
25431 break
25432 }
25433 c := auxIntToInt16(v_0.AuxInt)
25434 v_1 := v.Args[1]
25435 if v_1.Op != OpConst16 || auxIntToInt16(v_1.AuxInt) != c {
25436 break
25437 }
25438 v.reset(OpConst16)
25439 v.AuxInt = int16ToAuxInt(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 != OpConst32 {
25451 break
25452 }
25453 c := auxIntToInt32(v_0.AuxInt)
25454 v_1 := v.Args[1]
25455 if v_1.Op != OpConst32 || auxIntToInt32(v_1.AuxInt) != c {
25456 break
25457 }
25458 v.reset(OpConst32)
25459 v.AuxInt = int32ToAuxInt(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 != OpConst64 {
25471 break
25472 }
25473 c := auxIntToInt64(v_0.AuxInt)
25474 v_1 := v.Args[1]
25475 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != c {
25476 break
25477 }
25478 v.reset(OpConst64)
25479 v.AuxInt = int64ToAuxInt(c)
25480 return true
25481 }
25482
25483
25484
25485 for {
25486 if len(v.Args) != 2 {
25487 break
25488 }
25489 t := v.Type
25490 _ = v.Args[1]
25491 nx := v.Args[0]
25492 if nx.Op != OpNot {
25493 break
25494 }
25495 x := nx.Args[0]
25496 ny := v.Args[1]
25497 if ny.Op != OpNot {
25498 break
25499 }
25500 y := ny.Args[0]
25501 if !(nx.Uses == 1 && ny.Uses == 1) {
25502 break
25503 }
25504 v.reset(OpNot)
25505 v0 := b.NewValue0(v.Pos, OpPhi, t)
25506 v0.AddArg2(x, y)
25507 v.AddArg(v0)
25508 return true
25509 }
25510 return false
25511 }
25512 func rewriteValuegeneric_OpPopCount16(v *Value) bool {
25513 v_0 := v.Args[0]
25514 b := v.Block
25515 config := b.Func.Config
25516
25517
25518
25519 for {
25520 if v_0.Op != OpConst16 {
25521 break
25522 }
25523 c := auxIntToInt16(v_0.AuxInt)
25524 if !(config.PtrSize == 8) {
25525 break
25526 }
25527 v.reset(OpConst64)
25528 v.AuxInt = int64ToAuxInt(int64(bits.OnesCount16(uint16(c))))
25529 return true
25530 }
25531
25532
25533
25534 for {
25535 if v_0.Op != OpConst16 {
25536 break
25537 }
25538 c := auxIntToInt16(v_0.AuxInt)
25539 if !(config.PtrSize == 4) {
25540 break
25541 }
25542 v.reset(OpConst32)
25543 v.AuxInt = int32ToAuxInt(int32(bits.OnesCount16(uint16(c))))
25544 return true
25545 }
25546 return false
25547 }
25548 func rewriteValuegeneric_OpPopCount32(v *Value) bool {
25549 v_0 := v.Args[0]
25550 b := v.Block
25551 config := b.Func.Config
25552
25553
25554
25555 for {
25556 if v_0.Op != OpConst32 {
25557 break
25558 }
25559 c := auxIntToInt32(v_0.AuxInt)
25560 if !(config.PtrSize == 8) {
25561 break
25562 }
25563 v.reset(OpConst64)
25564 v.AuxInt = int64ToAuxInt(int64(bits.OnesCount32(uint32(c))))
25565 return true
25566 }
25567
25568
25569
25570 for {
25571 if v_0.Op != OpConst32 {
25572 break
25573 }
25574 c := auxIntToInt32(v_0.AuxInt)
25575 if !(config.PtrSize == 4) {
25576 break
25577 }
25578 v.reset(OpConst32)
25579 v.AuxInt = int32ToAuxInt(int32(bits.OnesCount32(uint32(c))))
25580 return true
25581 }
25582 return false
25583 }
25584 func rewriteValuegeneric_OpPopCount64(v *Value) bool {
25585 v_0 := v.Args[0]
25586 b := v.Block
25587 config := b.Func.Config
25588
25589
25590
25591 for {
25592 if v_0.Op != OpConst64 {
25593 break
25594 }
25595 c := auxIntToInt64(v_0.AuxInt)
25596 if !(config.PtrSize == 8) {
25597 break
25598 }
25599 v.reset(OpConst64)
25600 v.AuxInt = int64ToAuxInt(int64(bits.OnesCount64(uint64(c))))
25601 return true
25602 }
25603
25604
25605
25606 for {
25607 if v_0.Op != OpConst64 {
25608 break
25609 }
25610 c := auxIntToInt64(v_0.AuxInt)
25611 if !(config.PtrSize == 4) {
25612 break
25613 }
25614 v.reset(OpConst32)
25615 v.AuxInt = int32ToAuxInt(int32(bits.OnesCount64(uint64(c))))
25616 return true
25617 }
25618 return false
25619 }
25620 func rewriteValuegeneric_OpPopCount8(v *Value) bool {
25621 v_0 := v.Args[0]
25622 b := v.Block
25623 config := b.Func.Config
25624
25625
25626
25627 for {
25628 if v_0.Op != OpConst8 {
25629 break
25630 }
25631 c := auxIntToInt8(v_0.AuxInt)
25632 if !(config.PtrSize == 8) {
25633 break
25634 }
25635 v.reset(OpConst64)
25636 v.AuxInt = int64ToAuxInt(int64(bits.OnesCount8(uint8(c))))
25637 return true
25638 }
25639
25640
25641
25642 for {
25643 if v_0.Op != OpConst8 {
25644 break
25645 }
25646 c := auxIntToInt8(v_0.AuxInt)
25647 if !(config.PtrSize == 4) {
25648 break
25649 }
25650 v.reset(OpConst32)
25651 v.AuxInt = int32ToAuxInt(int32(bits.OnesCount8(uint8(c))))
25652 return true
25653 }
25654 return false
25655 }
25656 func rewriteValuegeneric_OpPtrIndex(v *Value) bool {
25657 v_1 := v.Args[1]
25658 v_0 := v.Args[0]
25659 b := v.Block
25660 config := b.Func.Config
25661 typ := &b.Func.Config.Types
25662
25663
25664
25665 for {
25666 t := v.Type
25667 ptr := v_0
25668 idx := v_1
25669 if !(config.PtrSize == 4 && is32Bit(t.Elem().Size())) {
25670 break
25671 }
25672 v.reset(OpAddPtr)
25673 v0 := b.NewValue0(v.Pos, OpMul32, typ.Int)
25674 v1 := b.NewValue0(v.Pos, OpConst32, typ.Int)
25675 v1.AuxInt = int32ToAuxInt(int32(t.Elem().Size()))
25676 v0.AddArg2(idx, v1)
25677 v.AddArg2(ptr, v0)
25678 return true
25679 }
25680
25681
25682
25683 for {
25684 t := v.Type
25685 ptr := v_0
25686 idx := v_1
25687 if !(config.PtrSize == 8) {
25688 break
25689 }
25690 v.reset(OpAddPtr)
25691 v0 := b.NewValue0(v.Pos, OpMul64, typ.Int)
25692 v1 := b.NewValue0(v.Pos, OpConst64, typ.Int)
25693 v1.AuxInt = int64ToAuxInt(t.Elem().Size())
25694 v0.AddArg2(idx, v1)
25695 v.AddArg2(ptr, v0)
25696 return true
25697 }
25698 return false
25699 }
25700 func rewriteValuegeneric_OpRotateLeft16(v *Value) bool {
25701 v_1 := v.Args[1]
25702 v_0 := v.Args[0]
25703 b := v.Block
25704 config := b.Func.Config
25705
25706
25707
25708 for {
25709 x := v_0
25710 if v_1.Op != OpConst16 {
25711 break
25712 }
25713 c := auxIntToInt16(v_1.AuxInt)
25714 if !(c%16 == 0) {
25715 break
25716 }
25717 v.copyOf(x)
25718 return true
25719 }
25720
25721
25722
25723 for {
25724 x := v_0
25725 if v_1.Op != OpAnd64 {
25726 break
25727 }
25728 _ = v_1.Args[1]
25729 v_1_0 := v_1.Args[0]
25730 v_1_1 := v_1.Args[1]
25731 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
25732 y := v_1_0
25733 if v_1_1.Op != OpConst64 {
25734 continue
25735 }
25736 c := auxIntToInt64(v_1_1.AuxInt)
25737 if !(c&15 == 15) {
25738 continue
25739 }
25740 v.reset(OpRotateLeft16)
25741 v.AddArg2(x, y)
25742 return true
25743 }
25744 break
25745 }
25746
25747
25748
25749 for {
25750 x := v_0
25751 if v_1.Op != OpAnd32 {
25752 break
25753 }
25754 _ = v_1.Args[1]
25755 v_1_0 := v_1.Args[0]
25756 v_1_1 := v_1.Args[1]
25757 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
25758 y := v_1_0
25759 if v_1_1.Op != OpConst32 {
25760 continue
25761 }
25762 c := auxIntToInt32(v_1_1.AuxInt)
25763 if !(c&15 == 15) {
25764 continue
25765 }
25766 v.reset(OpRotateLeft16)
25767 v.AddArg2(x, y)
25768 return true
25769 }
25770 break
25771 }
25772
25773
25774
25775 for {
25776 x := v_0
25777 if v_1.Op != OpAnd16 {
25778 break
25779 }
25780 _ = v_1.Args[1]
25781 v_1_0 := v_1.Args[0]
25782 v_1_1 := v_1.Args[1]
25783 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
25784 y := v_1_0
25785 if v_1_1.Op != OpConst16 {
25786 continue
25787 }
25788 c := auxIntToInt16(v_1_1.AuxInt)
25789 if !(c&15 == 15) {
25790 continue
25791 }
25792 v.reset(OpRotateLeft16)
25793 v.AddArg2(x, y)
25794 return true
25795 }
25796 break
25797 }
25798
25799
25800
25801 for {
25802 x := v_0
25803 if v_1.Op != OpAnd8 {
25804 break
25805 }
25806 _ = v_1.Args[1]
25807 v_1_0 := v_1.Args[0]
25808 v_1_1 := v_1.Args[1]
25809 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
25810 y := v_1_0
25811 if v_1_1.Op != OpConst8 {
25812 continue
25813 }
25814 c := auxIntToInt8(v_1_1.AuxInt)
25815 if !(c&15 == 15) {
25816 continue
25817 }
25818 v.reset(OpRotateLeft16)
25819 v.AddArg2(x, y)
25820 return true
25821 }
25822 break
25823 }
25824
25825
25826
25827 for {
25828 x := v_0
25829 if v_1.Op != OpNeg64 {
25830 break
25831 }
25832 v_1_0 := v_1.Args[0]
25833 if v_1_0.Op != OpAnd64 {
25834 break
25835 }
25836 _ = v_1_0.Args[1]
25837 v_1_0_0 := v_1_0.Args[0]
25838 v_1_0_1 := v_1_0.Args[1]
25839 for _i0 := 0; _i0 <= 1; _i0, v_1_0_0, v_1_0_1 = _i0+1, v_1_0_1, v_1_0_0 {
25840 y := v_1_0_0
25841 if v_1_0_1.Op != OpConst64 {
25842 continue
25843 }
25844 c := auxIntToInt64(v_1_0_1.AuxInt)
25845 if !(c&15 == 15) {
25846 continue
25847 }
25848 v.reset(OpRotateLeft16)
25849 v0 := b.NewValue0(v.Pos, OpNeg64, y.Type)
25850 v0.AddArg(y)
25851 v.AddArg2(x, v0)
25852 return true
25853 }
25854 break
25855 }
25856
25857
25858
25859 for {
25860 x := v_0
25861 if v_1.Op != OpNeg32 {
25862 break
25863 }
25864 v_1_0 := v_1.Args[0]
25865 if v_1_0.Op != OpAnd32 {
25866 break
25867 }
25868 _ = v_1_0.Args[1]
25869 v_1_0_0 := v_1_0.Args[0]
25870 v_1_0_1 := v_1_0.Args[1]
25871 for _i0 := 0; _i0 <= 1; _i0, v_1_0_0, v_1_0_1 = _i0+1, v_1_0_1, v_1_0_0 {
25872 y := v_1_0_0
25873 if v_1_0_1.Op != OpConst32 {
25874 continue
25875 }
25876 c := auxIntToInt32(v_1_0_1.AuxInt)
25877 if !(c&15 == 15) {
25878 continue
25879 }
25880 v.reset(OpRotateLeft16)
25881 v0 := b.NewValue0(v.Pos, OpNeg32, y.Type)
25882 v0.AddArg(y)
25883 v.AddArg2(x, v0)
25884 return true
25885 }
25886 break
25887 }
25888
25889
25890
25891 for {
25892 x := v_0
25893 if v_1.Op != OpNeg16 {
25894 break
25895 }
25896 v_1_0 := v_1.Args[0]
25897 if v_1_0.Op != OpAnd16 {
25898 break
25899 }
25900 _ = v_1_0.Args[1]
25901 v_1_0_0 := v_1_0.Args[0]
25902 v_1_0_1 := v_1_0.Args[1]
25903 for _i0 := 0; _i0 <= 1; _i0, v_1_0_0, v_1_0_1 = _i0+1, v_1_0_1, v_1_0_0 {
25904 y := v_1_0_0
25905 if v_1_0_1.Op != OpConst16 {
25906 continue
25907 }
25908 c := auxIntToInt16(v_1_0_1.AuxInt)
25909 if !(c&15 == 15) {
25910 continue
25911 }
25912 v.reset(OpRotateLeft16)
25913 v0 := b.NewValue0(v.Pos, OpNeg16, y.Type)
25914 v0.AddArg(y)
25915 v.AddArg2(x, v0)
25916 return true
25917 }
25918 break
25919 }
25920
25921
25922
25923 for {
25924 x := v_0
25925 if v_1.Op != OpNeg8 {
25926 break
25927 }
25928 v_1_0 := v_1.Args[0]
25929 if v_1_0.Op != OpAnd8 {
25930 break
25931 }
25932 _ = v_1_0.Args[1]
25933 v_1_0_0 := v_1_0.Args[0]
25934 v_1_0_1 := v_1_0.Args[1]
25935 for _i0 := 0; _i0 <= 1; _i0, v_1_0_0, v_1_0_1 = _i0+1, v_1_0_1, v_1_0_0 {
25936 y := v_1_0_0
25937 if v_1_0_1.Op != OpConst8 {
25938 continue
25939 }
25940 c := auxIntToInt8(v_1_0_1.AuxInt)
25941 if !(c&15 == 15) {
25942 continue
25943 }
25944 v.reset(OpRotateLeft16)
25945 v0 := b.NewValue0(v.Pos, OpNeg8, y.Type)
25946 v0.AddArg(y)
25947 v.AddArg2(x, v0)
25948 return true
25949 }
25950 break
25951 }
25952
25953
25954
25955 for {
25956 x := v_0
25957 if v_1.Op != OpAdd64 {
25958 break
25959 }
25960 _ = v_1.Args[1]
25961 v_1_0 := v_1.Args[0]
25962 v_1_1 := v_1.Args[1]
25963 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
25964 y := v_1_0
25965 if v_1_1.Op != OpConst64 {
25966 continue
25967 }
25968 c := auxIntToInt64(v_1_1.AuxInt)
25969 if !(c&15 == 0) {
25970 continue
25971 }
25972 v.reset(OpRotateLeft16)
25973 v.AddArg2(x, y)
25974 return true
25975 }
25976 break
25977 }
25978
25979
25980
25981 for {
25982 x := v_0
25983 if v_1.Op != OpAdd32 {
25984 break
25985 }
25986 _ = v_1.Args[1]
25987 v_1_0 := v_1.Args[0]
25988 v_1_1 := v_1.Args[1]
25989 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
25990 y := v_1_0
25991 if v_1_1.Op != OpConst32 {
25992 continue
25993 }
25994 c := auxIntToInt32(v_1_1.AuxInt)
25995 if !(c&15 == 0) {
25996 continue
25997 }
25998 v.reset(OpRotateLeft16)
25999 v.AddArg2(x, y)
26000 return true
26001 }
26002 break
26003 }
26004
26005
26006
26007 for {
26008 x := v_0
26009 if v_1.Op != OpAdd16 {
26010 break
26011 }
26012 _ = v_1.Args[1]
26013 v_1_0 := v_1.Args[0]
26014 v_1_1 := v_1.Args[1]
26015 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
26016 y := v_1_0
26017 if v_1_1.Op != OpConst16 {
26018 continue
26019 }
26020 c := auxIntToInt16(v_1_1.AuxInt)
26021 if !(c&15 == 0) {
26022 continue
26023 }
26024 v.reset(OpRotateLeft16)
26025 v.AddArg2(x, y)
26026 return true
26027 }
26028 break
26029 }
26030
26031
26032
26033 for {
26034 x := v_0
26035 if v_1.Op != OpAdd8 {
26036 break
26037 }
26038 _ = v_1.Args[1]
26039 v_1_0 := v_1.Args[0]
26040 v_1_1 := v_1.Args[1]
26041 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
26042 y := v_1_0
26043 if v_1_1.Op != OpConst8 {
26044 continue
26045 }
26046 c := auxIntToInt8(v_1_1.AuxInt)
26047 if !(c&15 == 0) {
26048 continue
26049 }
26050 v.reset(OpRotateLeft16)
26051 v.AddArg2(x, y)
26052 return true
26053 }
26054 break
26055 }
26056
26057
26058
26059 for {
26060 x := v_0
26061 if v_1.Op != OpSub64 {
26062 break
26063 }
26064 y := v_1.Args[1]
26065 v_1_0 := v_1.Args[0]
26066 if v_1_0.Op != OpConst64 {
26067 break
26068 }
26069 c := auxIntToInt64(v_1_0.AuxInt)
26070 if !(c&15 == 0) {
26071 break
26072 }
26073 v.reset(OpRotateLeft16)
26074 v0 := b.NewValue0(v.Pos, OpNeg64, y.Type)
26075 v0.AddArg(y)
26076 v.AddArg2(x, v0)
26077 return true
26078 }
26079
26080
26081
26082 for {
26083 x := v_0
26084 if v_1.Op != OpSub32 {
26085 break
26086 }
26087 y := v_1.Args[1]
26088 v_1_0 := v_1.Args[0]
26089 if v_1_0.Op != OpConst32 {
26090 break
26091 }
26092 c := auxIntToInt32(v_1_0.AuxInt)
26093 if !(c&15 == 0) {
26094 break
26095 }
26096 v.reset(OpRotateLeft16)
26097 v0 := b.NewValue0(v.Pos, OpNeg32, y.Type)
26098 v0.AddArg(y)
26099 v.AddArg2(x, v0)
26100 return true
26101 }
26102
26103
26104
26105 for {
26106 x := v_0
26107 if v_1.Op != OpSub16 {
26108 break
26109 }
26110 y := v_1.Args[1]
26111 v_1_0 := v_1.Args[0]
26112 if v_1_0.Op != OpConst16 {
26113 break
26114 }
26115 c := auxIntToInt16(v_1_0.AuxInt)
26116 if !(c&15 == 0) {
26117 break
26118 }
26119 v.reset(OpRotateLeft16)
26120 v0 := b.NewValue0(v.Pos, OpNeg16, y.Type)
26121 v0.AddArg(y)
26122 v.AddArg2(x, v0)
26123 return true
26124 }
26125
26126
26127
26128 for {
26129 x := v_0
26130 if v_1.Op != OpSub8 {
26131 break
26132 }
26133 y := v_1.Args[1]
26134 v_1_0 := v_1.Args[0]
26135 if v_1_0.Op != OpConst8 {
26136 break
26137 }
26138 c := auxIntToInt8(v_1_0.AuxInt)
26139 if !(c&15 == 0) {
26140 break
26141 }
26142 v.reset(OpRotateLeft16)
26143 v0 := b.NewValue0(v.Pos, OpNeg8, y.Type)
26144 v0.AddArg(y)
26145 v.AddArg2(x, v0)
26146 return true
26147 }
26148
26149
26150
26151 for {
26152 x := v_0
26153 if v_1.Op != OpConst64 {
26154 break
26155 }
26156 t := v_1.Type
26157 c := auxIntToInt64(v_1.AuxInt)
26158 if !(config.PtrSize == 4) {
26159 break
26160 }
26161 v.reset(OpRotateLeft16)
26162 v0 := b.NewValue0(v.Pos, OpConst32, t)
26163 v0.AuxInt = int32ToAuxInt(int32(c))
26164 v.AddArg2(x, v0)
26165 return true
26166 }
26167
26168
26169
26170 for {
26171 if v_0.Op != OpRotateLeft16 {
26172 break
26173 }
26174 c := v_0.Args[1]
26175 x := v_0.Args[0]
26176 d := v_1
26177 if !(c.Type.Size() == 8 && d.Type.Size() == 8) {
26178 break
26179 }
26180 v.reset(OpRotateLeft16)
26181 v0 := b.NewValue0(v.Pos, OpAdd64, c.Type)
26182 v0.AddArg2(c, d)
26183 v.AddArg2(x, v0)
26184 return true
26185 }
26186
26187
26188
26189 for {
26190 if v_0.Op != OpRotateLeft16 {
26191 break
26192 }
26193 c := v_0.Args[1]
26194 x := v_0.Args[0]
26195 d := v_1
26196 if !(c.Type.Size() == 4 && d.Type.Size() == 4) {
26197 break
26198 }
26199 v.reset(OpRotateLeft16)
26200 v0 := b.NewValue0(v.Pos, OpAdd32, c.Type)
26201 v0.AddArg2(c, d)
26202 v.AddArg2(x, v0)
26203 return true
26204 }
26205
26206
26207
26208 for {
26209 if v_0.Op != OpRotateLeft16 {
26210 break
26211 }
26212 c := v_0.Args[1]
26213 x := v_0.Args[0]
26214 d := v_1
26215 if !(c.Type.Size() == 2 && d.Type.Size() == 2) {
26216 break
26217 }
26218 v.reset(OpRotateLeft16)
26219 v0 := b.NewValue0(v.Pos, OpAdd16, c.Type)
26220 v0.AddArg2(c, d)
26221 v.AddArg2(x, v0)
26222 return true
26223 }
26224
26225
26226
26227 for {
26228 if v_0.Op != OpRotateLeft16 {
26229 break
26230 }
26231 c := v_0.Args[1]
26232 x := v_0.Args[0]
26233 d := v_1
26234 if !(c.Type.Size() == 1 && d.Type.Size() == 1) {
26235 break
26236 }
26237 v.reset(OpRotateLeft16)
26238 v0 := b.NewValue0(v.Pos, OpAdd8, c.Type)
26239 v0.AddArg2(c, d)
26240 v.AddArg2(x, v0)
26241 return true
26242 }
26243 return false
26244 }
26245 func rewriteValuegeneric_OpRotateLeft32(v *Value) bool {
26246 v_1 := v.Args[1]
26247 v_0 := v.Args[0]
26248 b := v.Block
26249 config := b.Func.Config
26250
26251
26252
26253 for {
26254 x := v_0
26255 if v_1.Op != OpConst32 {
26256 break
26257 }
26258 c := auxIntToInt32(v_1.AuxInt)
26259 if !(c%32 == 0) {
26260 break
26261 }
26262 v.copyOf(x)
26263 return true
26264 }
26265
26266
26267
26268 for {
26269 x := v_0
26270 if v_1.Op != OpAnd64 {
26271 break
26272 }
26273 _ = v_1.Args[1]
26274 v_1_0 := v_1.Args[0]
26275 v_1_1 := v_1.Args[1]
26276 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
26277 y := v_1_0
26278 if v_1_1.Op != OpConst64 {
26279 continue
26280 }
26281 c := auxIntToInt64(v_1_1.AuxInt)
26282 if !(c&31 == 31) {
26283 continue
26284 }
26285 v.reset(OpRotateLeft32)
26286 v.AddArg2(x, y)
26287 return true
26288 }
26289 break
26290 }
26291
26292
26293
26294 for {
26295 x := v_0
26296 if v_1.Op != OpAnd32 {
26297 break
26298 }
26299 _ = v_1.Args[1]
26300 v_1_0 := v_1.Args[0]
26301 v_1_1 := v_1.Args[1]
26302 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
26303 y := v_1_0
26304 if v_1_1.Op != OpConst32 {
26305 continue
26306 }
26307 c := auxIntToInt32(v_1_1.AuxInt)
26308 if !(c&31 == 31) {
26309 continue
26310 }
26311 v.reset(OpRotateLeft32)
26312 v.AddArg2(x, y)
26313 return true
26314 }
26315 break
26316 }
26317
26318
26319
26320 for {
26321 x := v_0
26322 if v_1.Op != OpAnd16 {
26323 break
26324 }
26325 _ = v_1.Args[1]
26326 v_1_0 := v_1.Args[0]
26327 v_1_1 := v_1.Args[1]
26328 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
26329 y := v_1_0
26330 if v_1_1.Op != OpConst16 {
26331 continue
26332 }
26333 c := auxIntToInt16(v_1_1.AuxInt)
26334 if !(c&31 == 31) {
26335 continue
26336 }
26337 v.reset(OpRotateLeft32)
26338 v.AddArg2(x, y)
26339 return true
26340 }
26341 break
26342 }
26343
26344
26345
26346 for {
26347 x := v_0
26348 if v_1.Op != OpAnd8 {
26349 break
26350 }
26351 _ = v_1.Args[1]
26352 v_1_0 := v_1.Args[0]
26353 v_1_1 := v_1.Args[1]
26354 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
26355 y := v_1_0
26356 if v_1_1.Op != OpConst8 {
26357 continue
26358 }
26359 c := auxIntToInt8(v_1_1.AuxInt)
26360 if !(c&31 == 31) {
26361 continue
26362 }
26363 v.reset(OpRotateLeft32)
26364 v.AddArg2(x, y)
26365 return true
26366 }
26367 break
26368 }
26369
26370
26371
26372 for {
26373 x := v_0
26374 if v_1.Op != OpNeg64 {
26375 break
26376 }
26377 v_1_0 := v_1.Args[0]
26378 if v_1_0.Op != OpAnd64 {
26379 break
26380 }
26381 _ = v_1_0.Args[1]
26382 v_1_0_0 := v_1_0.Args[0]
26383 v_1_0_1 := v_1_0.Args[1]
26384 for _i0 := 0; _i0 <= 1; _i0, v_1_0_0, v_1_0_1 = _i0+1, v_1_0_1, v_1_0_0 {
26385 y := v_1_0_0
26386 if v_1_0_1.Op != OpConst64 {
26387 continue
26388 }
26389 c := auxIntToInt64(v_1_0_1.AuxInt)
26390 if !(c&31 == 31) {
26391 continue
26392 }
26393 v.reset(OpRotateLeft32)
26394 v0 := b.NewValue0(v.Pos, OpNeg64, y.Type)
26395 v0.AddArg(y)
26396 v.AddArg2(x, v0)
26397 return true
26398 }
26399 break
26400 }
26401
26402
26403
26404 for {
26405 x := v_0
26406 if v_1.Op != OpNeg32 {
26407 break
26408 }
26409 v_1_0 := v_1.Args[0]
26410 if v_1_0.Op != OpAnd32 {
26411 break
26412 }
26413 _ = v_1_0.Args[1]
26414 v_1_0_0 := v_1_0.Args[0]
26415 v_1_0_1 := v_1_0.Args[1]
26416 for _i0 := 0; _i0 <= 1; _i0, v_1_0_0, v_1_0_1 = _i0+1, v_1_0_1, v_1_0_0 {
26417 y := v_1_0_0
26418 if v_1_0_1.Op != OpConst32 {
26419 continue
26420 }
26421 c := auxIntToInt32(v_1_0_1.AuxInt)
26422 if !(c&31 == 31) {
26423 continue
26424 }
26425 v.reset(OpRotateLeft32)
26426 v0 := b.NewValue0(v.Pos, OpNeg32, y.Type)
26427 v0.AddArg(y)
26428 v.AddArg2(x, v0)
26429 return true
26430 }
26431 break
26432 }
26433
26434
26435
26436 for {
26437 x := v_0
26438 if v_1.Op != OpNeg16 {
26439 break
26440 }
26441 v_1_0 := v_1.Args[0]
26442 if v_1_0.Op != OpAnd16 {
26443 break
26444 }
26445 _ = v_1_0.Args[1]
26446 v_1_0_0 := v_1_0.Args[0]
26447 v_1_0_1 := v_1_0.Args[1]
26448 for _i0 := 0; _i0 <= 1; _i0, v_1_0_0, v_1_0_1 = _i0+1, v_1_0_1, v_1_0_0 {
26449 y := v_1_0_0
26450 if v_1_0_1.Op != OpConst16 {
26451 continue
26452 }
26453 c := auxIntToInt16(v_1_0_1.AuxInt)
26454 if !(c&31 == 31) {
26455 continue
26456 }
26457 v.reset(OpRotateLeft32)
26458 v0 := b.NewValue0(v.Pos, OpNeg16, y.Type)
26459 v0.AddArg(y)
26460 v.AddArg2(x, v0)
26461 return true
26462 }
26463 break
26464 }
26465
26466
26467
26468 for {
26469 x := v_0
26470 if v_1.Op != OpNeg8 {
26471 break
26472 }
26473 v_1_0 := v_1.Args[0]
26474 if v_1_0.Op != OpAnd8 {
26475 break
26476 }
26477 _ = v_1_0.Args[1]
26478 v_1_0_0 := v_1_0.Args[0]
26479 v_1_0_1 := v_1_0.Args[1]
26480 for _i0 := 0; _i0 <= 1; _i0, v_1_0_0, v_1_0_1 = _i0+1, v_1_0_1, v_1_0_0 {
26481 y := v_1_0_0
26482 if v_1_0_1.Op != OpConst8 {
26483 continue
26484 }
26485 c := auxIntToInt8(v_1_0_1.AuxInt)
26486 if !(c&31 == 31) {
26487 continue
26488 }
26489 v.reset(OpRotateLeft32)
26490 v0 := b.NewValue0(v.Pos, OpNeg8, y.Type)
26491 v0.AddArg(y)
26492 v.AddArg2(x, v0)
26493 return true
26494 }
26495 break
26496 }
26497
26498
26499
26500 for {
26501 x := v_0
26502 if v_1.Op != OpAdd64 {
26503 break
26504 }
26505 _ = v_1.Args[1]
26506 v_1_0 := v_1.Args[0]
26507 v_1_1 := v_1.Args[1]
26508 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
26509 y := v_1_0
26510 if v_1_1.Op != OpConst64 {
26511 continue
26512 }
26513 c := auxIntToInt64(v_1_1.AuxInt)
26514 if !(c&31 == 0) {
26515 continue
26516 }
26517 v.reset(OpRotateLeft32)
26518 v.AddArg2(x, y)
26519 return true
26520 }
26521 break
26522 }
26523
26524
26525
26526 for {
26527 x := v_0
26528 if v_1.Op != OpAdd32 {
26529 break
26530 }
26531 _ = v_1.Args[1]
26532 v_1_0 := v_1.Args[0]
26533 v_1_1 := v_1.Args[1]
26534 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
26535 y := v_1_0
26536 if v_1_1.Op != OpConst32 {
26537 continue
26538 }
26539 c := auxIntToInt32(v_1_1.AuxInt)
26540 if !(c&31 == 0) {
26541 continue
26542 }
26543 v.reset(OpRotateLeft32)
26544 v.AddArg2(x, y)
26545 return true
26546 }
26547 break
26548 }
26549
26550
26551
26552 for {
26553 x := v_0
26554 if v_1.Op != OpAdd16 {
26555 break
26556 }
26557 _ = v_1.Args[1]
26558 v_1_0 := v_1.Args[0]
26559 v_1_1 := v_1.Args[1]
26560 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
26561 y := v_1_0
26562 if v_1_1.Op != OpConst16 {
26563 continue
26564 }
26565 c := auxIntToInt16(v_1_1.AuxInt)
26566 if !(c&31 == 0) {
26567 continue
26568 }
26569 v.reset(OpRotateLeft32)
26570 v.AddArg2(x, y)
26571 return true
26572 }
26573 break
26574 }
26575
26576
26577
26578 for {
26579 x := v_0
26580 if v_1.Op != OpAdd8 {
26581 break
26582 }
26583 _ = v_1.Args[1]
26584 v_1_0 := v_1.Args[0]
26585 v_1_1 := v_1.Args[1]
26586 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
26587 y := v_1_0
26588 if v_1_1.Op != OpConst8 {
26589 continue
26590 }
26591 c := auxIntToInt8(v_1_1.AuxInt)
26592 if !(c&31 == 0) {
26593 continue
26594 }
26595 v.reset(OpRotateLeft32)
26596 v.AddArg2(x, y)
26597 return true
26598 }
26599 break
26600 }
26601
26602
26603
26604 for {
26605 x := v_0
26606 if v_1.Op != OpSub64 {
26607 break
26608 }
26609 y := v_1.Args[1]
26610 v_1_0 := v_1.Args[0]
26611 if v_1_0.Op != OpConst64 {
26612 break
26613 }
26614 c := auxIntToInt64(v_1_0.AuxInt)
26615 if !(c&31 == 0) {
26616 break
26617 }
26618 v.reset(OpRotateLeft32)
26619 v0 := b.NewValue0(v.Pos, OpNeg64, y.Type)
26620 v0.AddArg(y)
26621 v.AddArg2(x, v0)
26622 return true
26623 }
26624
26625
26626
26627 for {
26628 x := v_0
26629 if v_1.Op != OpSub32 {
26630 break
26631 }
26632 y := v_1.Args[1]
26633 v_1_0 := v_1.Args[0]
26634 if v_1_0.Op != OpConst32 {
26635 break
26636 }
26637 c := auxIntToInt32(v_1_0.AuxInt)
26638 if !(c&31 == 0) {
26639 break
26640 }
26641 v.reset(OpRotateLeft32)
26642 v0 := b.NewValue0(v.Pos, OpNeg32, y.Type)
26643 v0.AddArg(y)
26644 v.AddArg2(x, v0)
26645 return true
26646 }
26647
26648
26649
26650 for {
26651 x := v_0
26652 if v_1.Op != OpSub16 {
26653 break
26654 }
26655 y := v_1.Args[1]
26656 v_1_0 := v_1.Args[0]
26657 if v_1_0.Op != OpConst16 {
26658 break
26659 }
26660 c := auxIntToInt16(v_1_0.AuxInt)
26661 if !(c&31 == 0) {
26662 break
26663 }
26664 v.reset(OpRotateLeft32)
26665 v0 := b.NewValue0(v.Pos, OpNeg16, y.Type)
26666 v0.AddArg(y)
26667 v.AddArg2(x, v0)
26668 return true
26669 }
26670
26671
26672
26673 for {
26674 x := v_0
26675 if v_1.Op != OpSub8 {
26676 break
26677 }
26678 y := v_1.Args[1]
26679 v_1_0 := v_1.Args[0]
26680 if v_1_0.Op != OpConst8 {
26681 break
26682 }
26683 c := auxIntToInt8(v_1_0.AuxInt)
26684 if !(c&31 == 0) {
26685 break
26686 }
26687 v.reset(OpRotateLeft32)
26688 v0 := b.NewValue0(v.Pos, OpNeg8, y.Type)
26689 v0.AddArg(y)
26690 v.AddArg2(x, v0)
26691 return true
26692 }
26693
26694
26695
26696 for {
26697 x := v_0
26698 if v_1.Op != OpConst64 {
26699 break
26700 }
26701 t := v_1.Type
26702 c := auxIntToInt64(v_1.AuxInt)
26703 if !(config.PtrSize == 4) {
26704 break
26705 }
26706 v.reset(OpRotateLeft32)
26707 v0 := b.NewValue0(v.Pos, OpConst32, t)
26708 v0.AuxInt = int32ToAuxInt(int32(c))
26709 v.AddArg2(x, v0)
26710 return true
26711 }
26712
26713
26714
26715 for {
26716 if v_0.Op != OpRotateLeft32 {
26717 break
26718 }
26719 c := v_0.Args[1]
26720 x := v_0.Args[0]
26721 d := v_1
26722 if !(c.Type.Size() == 8 && d.Type.Size() == 8) {
26723 break
26724 }
26725 v.reset(OpRotateLeft32)
26726 v0 := b.NewValue0(v.Pos, OpAdd64, c.Type)
26727 v0.AddArg2(c, d)
26728 v.AddArg2(x, v0)
26729 return true
26730 }
26731
26732
26733
26734 for {
26735 if v_0.Op != OpRotateLeft32 {
26736 break
26737 }
26738 c := v_0.Args[1]
26739 x := v_0.Args[0]
26740 d := v_1
26741 if !(c.Type.Size() == 4 && d.Type.Size() == 4) {
26742 break
26743 }
26744 v.reset(OpRotateLeft32)
26745 v0 := b.NewValue0(v.Pos, OpAdd32, c.Type)
26746 v0.AddArg2(c, d)
26747 v.AddArg2(x, v0)
26748 return true
26749 }
26750
26751
26752
26753 for {
26754 if v_0.Op != OpRotateLeft32 {
26755 break
26756 }
26757 c := v_0.Args[1]
26758 x := v_0.Args[0]
26759 d := v_1
26760 if !(c.Type.Size() == 2 && d.Type.Size() == 2) {
26761 break
26762 }
26763 v.reset(OpRotateLeft32)
26764 v0 := b.NewValue0(v.Pos, OpAdd16, c.Type)
26765 v0.AddArg2(c, d)
26766 v.AddArg2(x, v0)
26767 return true
26768 }
26769
26770
26771
26772 for {
26773 if v_0.Op != OpRotateLeft32 {
26774 break
26775 }
26776 c := v_0.Args[1]
26777 x := v_0.Args[0]
26778 d := v_1
26779 if !(c.Type.Size() == 1 && d.Type.Size() == 1) {
26780 break
26781 }
26782 v.reset(OpRotateLeft32)
26783 v0 := b.NewValue0(v.Pos, OpAdd8, c.Type)
26784 v0.AddArg2(c, d)
26785 v.AddArg2(x, v0)
26786 return true
26787 }
26788 return false
26789 }
26790 func rewriteValuegeneric_OpRotateLeft64(v *Value) bool {
26791 v_1 := v.Args[1]
26792 v_0 := v.Args[0]
26793 b := v.Block
26794 config := b.Func.Config
26795
26796
26797
26798 for {
26799 x := v_0
26800 if v_1.Op != OpConst64 {
26801 break
26802 }
26803 c := auxIntToInt64(v_1.AuxInt)
26804 if !(c%64 == 0) {
26805 break
26806 }
26807 v.copyOf(x)
26808 return true
26809 }
26810
26811
26812
26813 for {
26814 x := v_0
26815 if v_1.Op != OpAnd64 {
26816 break
26817 }
26818 _ = v_1.Args[1]
26819 v_1_0 := v_1.Args[0]
26820 v_1_1 := v_1.Args[1]
26821 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
26822 y := v_1_0
26823 if v_1_1.Op != OpConst64 {
26824 continue
26825 }
26826 c := auxIntToInt64(v_1_1.AuxInt)
26827 if !(c&63 == 63) {
26828 continue
26829 }
26830 v.reset(OpRotateLeft64)
26831 v.AddArg2(x, y)
26832 return true
26833 }
26834 break
26835 }
26836
26837
26838
26839 for {
26840 x := v_0
26841 if v_1.Op != OpAnd32 {
26842 break
26843 }
26844 _ = v_1.Args[1]
26845 v_1_0 := v_1.Args[0]
26846 v_1_1 := v_1.Args[1]
26847 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
26848 y := v_1_0
26849 if v_1_1.Op != OpConst32 {
26850 continue
26851 }
26852 c := auxIntToInt32(v_1_1.AuxInt)
26853 if !(c&63 == 63) {
26854 continue
26855 }
26856 v.reset(OpRotateLeft64)
26857 v.AddArg2(x, y)
26858 return true
26859 }
26860 break
26861 }
26862
26863
26864
26865 for {
26866 x := v_0
26867 if v_1.Op != OpAnd16 {
26868 break
26869 }
26870 _ = v_1.Args[1]
26871 v_1_0 := v_1.Args[0]
26872 v_1_1 := v_1.Args[1]
26873 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
26874 y := v_1_0
26875 if v_1_1.Op != OpConst16 {
26876 continue
26877 }
26878 c := auxIntToInt16(v_1_1.AuxInt)
26879 if !(c&63 == 63) {
26880 continue
26881 }
26882 v.reset(OpRotateLeft64)
26883 v.AddArg2(x, y)
26884 return true
26885 }
26886 break
26887 }
26888
26889
26890
26891 for {
26892 x := v_0
26893 if v_1.Op != OpAnd8 {
26894 break
26895 }
26896 _ = v_1.Args[1]
26897 v_1_0 := v_1.Args[0]
26898 v_1_1 := v_1.Args[1]
26899 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
26900 y := v_1_0
26901 if v_1_1.Op != OpConst8 {
26902 continue
26903 }
26904 c := auxIntToInt8(v_1_1.AuxInt)
26905 if !(c&63 == 63) {
26906 continue
26907 }
26908 v.reset(OpRotateLeft64)
26909 v.AddArg2(x, y)
26910 return true
26911 }
26912 break
26913 }
26914
26915
26916
26917 for {
26918 x := v_0
26919 if v_1.Op != OpNeg64 {
26920 break
26921 }
26922 v_1_0 := v_1.Args[0]
26923 if v_1_0.Op != OpAnd64 {
26924 break
26925 }
26926 _ = v_1_0.Args[1]
26927 v_1_0_0 := v_1_0.Args[0]
26928 v_1_0_1 := v_1_0.Args[1]
26929 for _i0 := 0; _i0 <= 1; _i0, v_1_0_0, v_1_0_1 = _i0+1, v_1_0_1, v_1_0_0 {
26930 y := v_1_0_0
26931 if v_1_0_1.Op != OpConst64 {
26932 continue
26933 }
26934 c := auxIntToInt64(v_1_0_1.AuxInt)
26935 if !(c&63 == 63) {
26936 continue
26937 }
26938 v.reset(OpRotateLeft64)
26939 v0 := b.NewValue0(v.Pos, OpNeg64, y.Type)
26940 v0.AddArg(y)
26941 v.AddArg2(x, v0)
26942 return true
26943 }
26944 break
26945 }
26946
26947
26948
26949 for {
26950 x := v_0
26951 if v_1.Op != OpNeg32 {
26952 break
26953 }
26954 v_1_0 := v_1.Args[0]
26955 if v_1_0.Op != OpAnd32 {
26956 break
26957 }
26958 _ = v_1_0.Args[1]
26959 v_1_0_0 := v_1_0.Args[0]
26960 v_1_0_1 := v_1_0.Args[1]
26961 for _i0 := 0; _i0 <= 1; _i0, v_1_0_0, v_1_0_1 = _i0+1, v_1_0_1, v_1_0_0 {
26962 y := v_1_0_0
26963 if v_1_0_1.Op != OpConst32 {
26964 continue
26965 }
26966 c := auxIntToInt32(v_1_0_1.AuxInt)
26967 if !(c&63 == 63) {
26968 continue
26969 }
26970 v.reset(OpRotateLeft64)
26971 v0 := b.NewValue0(v.Pos, OpNeg32, y.Type)
26972 v0.AddArg(y)
26973 v.AddArg2(x, v0)
26974 return true
26975 }
26976 break
26977 }
26978
26979
26980
26981 for {
26982 x := v_0
26983 if v_1.Op != OpNeg16 {
26984 break
26985 }
26986 v_1_0 := v_1.Args[0]
26987 if v_1_0.Op != OpAnd16 {
26988 break
26989 }
26990 _ = v_1_0.Args[1]
26991 v_1_0_0 := v_1_0.Args[0]
26992 v_1_0_1 := v_1_0.Args[1]
26993 for _i0 := 0; _i0 <= 1; _i0, v_1_0_0, v_1_0_1 = _i0+1, v_1_0_1, v_1_0_0 {
26994 y := v_1_0_0
26995 if v_1_0_1.Op != OpConst16 {
26996 continue
26997 }
26998 c := auxIntToInt16(v_1_0_1.AuxInt)
26999 if !(c&63 == 63) {
27000 continue
27001 }
27002 v.reset(OpRotateLeft64)
27003 v0 := b.NewValue0(v.Pos, OpNeg16, y.Type)
27004 v0.AddArg(y)
27005 v.AddArg2(x, v0)
27006 return true
27007 }
27008 break
27009 }
27010
27011
27012
27013 for {
27014 x := v_0
27015 if v_1.Op != OpNeg8 {
27016 break
27017 }
27018 v_1_0 := v_1.Args[0]
27019 if v_1_0.Op != OpAnd8 {
27020 break
27021 }
27022 _ = v_1_0.Args[1]
27023 v_1_0_0 := v_1_0.Args[0]
27024 v_1_0_1 := v_1_0.Args[1]
27025 for _i0 := 0; _i0 <= 1; _i0, v_1_0_0, v_1_0_1 = _i0+1, v_1_0_1, v_1_0_0 {
27026 y := v_1_0_0
27027 if v_1_0_1.Op != OpConst8 {
27028 continue
27029 }
27030 c := auxIntToInt8(v_1_0_1.AuxInt)
27031 if !(c&63 == 63) {
27032 continue
27033 }
27034 v.reset(OpRotateLeft64)
27035 v0 := b.NewValue0(v.Pos, OpNeg8, y.Type)
27036 v0.AddArg(y)
27037 v.AddArg2(x, v0)
27038 return true
27039 }
27040 break
27041 }
27042
27043
27044
27045 for {
27046 x := v_0
27047 if v_1.Op != OpAdd64 {
27048 break
27049 }
27050 _ = v_1.Args[1]
27051 v_1_0 := v_1.Args[0]
27052 v_1_1 := v_1.Args[1]
27053 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
27054 y := v_1_0
27055 if v_1_1.Op != OpConst64 {
27056 continue
27057 }
27058 c := auxIntToInt64(v_1_1.AuxInt)
27059 if !(c&63 == 0) {
27060 continue
27061 }
27062 v.reset(OpRotateLeft64)
27063 v.AddArg2(x, y)
27064 return true
27065 }
27066 break
27067 }
27068
27069
27070
27071 for {
27072 x := v_0
27073 if v_1.Op != OpAdd32 {
27074 break
27075 }
27076 _ = v_1.Args[1]
27077 v_1_0 := v_1.Args[0]
27078 v_1_1 := v_1.Args[1]
27079 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
27080 y := v_1_0
27081 if v_1_1.Op != OpConst32 {
27082 continue
27083 }
27084 c := auxIntToInt32(v_1_1.AuxInt)
27085 if !(c&63 == 0) {
27086 continue
27087 }
27088 v.reset(OpRotateLeft64)
27089 v.AddArg2(x, y)
27090 return true
27091 }
27092 break
27093 }
27094
27095
27096
27097 for {
27098 x := v_0
27099 if v_1.Op != OpAdd16 {
27100 break
27101 }
27102 _ = v_1.Args[1]
27103 v_1_0 := v_1.Args[0]
27104 v_1_1 := v_1.Args[1]
27105 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
27106 y := v_1_0
27107 if v_1_1.Op != OpConst16 {
27108 continue
27109 }
27110 c := auxIntToInt16(v_1_1.AuxInt)
27111 if !(c&63 == 0) {
27112 continue
27113 }
27114 v.reset(OpRotateLeft64)
27115 v.AddArg2(x, y)
27116 return true
27117 }
27118 break
27119 }
27120
27121
27122
27123 for {
27124 x := v_0
27125 if v_1.Op != OpAdd8 {
27126 break
27127 }
27128 _ = v_1.Args[1]
27129 v_1_0 := v_1.Args[0]
27130 v_1_1 := v_1.Args[1]
27131 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
27132 y := v_1_0
27133 if v_1_1.Op != OpConst8 {
27134 continue
27135 }
27136 c := auxIntToInt8(v_1_1.AuxInt)
27137 if !(c&63 == 0) {
27138 continue
27139 }
27140 v.reset(OpRotateLeft64)
27141 v.AddArg2(x, y)
27142 return true
27143 }
27144 break
27145 }
27146
27147
27148
27149 for {
27150 x := v_0
27151 if v_1.Op != OpSub64 {
27152 break
27153 }
27154 y := v_1.Args[1]
27155 v_1_0 := v_1.Args[0]
27156 if v_1_0.Op != OpConst64 {
27157 break
27158 }
27159 c := auxIntToInt64(v_1_0.AuxInt)
27160 if !(c&63 == 0) {
27161 break
27162 }
27163 v.reset(OpRotateLeft64)
27164 v0 := b.NewValue0(v.Pos, OpNeg64, y.Type)
27165 v0.AddArg(y)
27166 v.AddArg2(x, v0)
27167 return true
27168 }
27169
27170
27171
27172 for {
27173 x := v_0
27174 if v_1.Op != OpSub32 {
27175 break
27176 }
27177 y := v_1.Args[1]
27178 v_1_0 := v_1.Args[0]
27179 if v_1_0.Op != OpConst32 {
27180 break
27181 }
27182 c := auxIntToInt32(v_1_0.AuxInt)
27183 if !(c&63 == 0) {
27184 break
27185 }
27186 v.reset(OpRotateLeft64)
27187 v0 := b.NewValue0(v.Pos, OpNeg32, y.Type)
27188 v0.AddArg(y)
27189 v.AddArg2(x, v0)
27190 return true
27191 }
27192
27193
27194
27195 for {
27196 x := v_0
27197 if v_1.Op != OpSub16 {
27198 break
27199 }
27200 y := v_1.Args[1]
27201 v_1_0 := v_1.Args[0]
27202 if v_1_0.Op != OpConst16 {
27203 break
27204 }
27205 c := auxIntToInt16(v_1_0.AuxInt)
27206 if !(c&63 == 0) {
27207 break
27208 }
27209 v.reset(OpRotateLeft64)
27210 v0 := b.NewValue0(v.Pos, OpNeg16, y.Type)
27211 v0.AddArg(y)
27212 v.AddArg2(x, v0)
27213 return true
27214 }
27215
27216
27217
27218 for {
27219 x := v_0
27220 if v_1.Op != OpSub8 {
27221 break
27222 }
27223 y := v_1.Args[1]
27224 v_1_0 := v_1.Args[0]
27225 if v_1_0.Op != OpConst8 {
27226 break
27227 }
27228 c := auxIntToInt8(v_1_0.AuxInt)
27229 if !(c&63 == 0) {
27230 break
27231 }
27232 v.reset(OpRotateLeft64)
27233 v0 := b.NewValue0(v.Pos, OpNeg8, y.Type)
27234 v0.AddArg(y)
27235 v.AddArg2(x, v0)
27236 return true
27237 }
27238
27239
27240
27241 for {
27242 x := v_0
27243 if v_1.Op != OpConst64 {
27244 break
27245 }
27246 t := v_1.Type
27247 c := auxIntToInt64(v_1.AuxInt)
27248 if !(config.PtrSize == 4) {
27249 break
27250 }
27251 v.reset(OpRotateLeft64)
27252 v0 := b.NewValue0(v.Pos, OpConst32, t)
27253 v0.AuxInt = int32ToAuxInt(int32(c))
27254 v.AddArg2(x, v0)
27255 return true
27256 }
27257
27258
27259
27260 for {
27261 if v_0.Op != OpRotateLeft64 {
27262 break
27263 }
27264 c := v_0.Args[1]
27265 x := v_0.Args[0]
27266 d := v_1
27267 if !(c.Type.Size() == 8 && d.Type.Size() == 8) {
27268 break
27269 }
27270 v.reset(OpRotateLeft64)
27271 v0 := b.NewValue0(v.Pos, OpAdd64, c.Type)
27272 v0.AddArg2(c, d)
27273 v.AddArg2(x, v0)
27274 return true
27275 }
27276
27277
27278
27279 for {
27280 if v_0.Op != OpRotateLeft64 {
27281 break
27282 }
27283 c := v_0.Args[1]
27284 x := v_0.Args[0]
27285 d := v_1
27286 if !(c.Type.Size() == 4 && d.Type.Size() == 4) {
27287 break
27288 }
27289 v.reset(OpRotateLeft64)
27290 v0 := b.NewValue0(v.Pos, OpAdd32, c.Type)
27291 v0.AddArg2(c, d)
27292 v.AddArg2(x, v0)
27293 return true
27294 }
27295
27296
27297
27298 for {
27299 if v_0.Op != OpRotateLeft64 {
27300 break
27301 }
27302 c := v_0.Args[1]
27303 x := v_0.Args[0]
27304 d := v_1
27305 if !(c.Type.Size() == 2 && d.Type.Size() == 2) {
27306 break
27307 }
27308 v.reset(OpRotateLeft64)
27309 v0 := b.NewValue0(v.Pos, OpAdd16, c.Type)
27310 v0.AddArg2(c, d)
27311 v.AddArg2(x, v0)
27312 return true
27313 }
27314
27315
27316
27317 for {
27318 if v_0.Op != OpRotateLeft64 {
27319 break
27320 }
27321 c := v_0.Args[1]
27322 x := v_0.Args[0]
27323 d := v_1
27324 if !(c.Type.Size() == 1 && d.Type.Size() == 1) {
27325 break
27326 }
27327 v.reset(OpRotateLeft64)
27328 v0 := b.NewValue0(v.Pos, OpAdd8, c.Type)
27329 v0.AddArg2(c, d)
27330 v.AddArg2(x, v0)
27331 return true
27332 }
27333 return false
27334 }
27335 func rewriteValuegeneric_OpRotateLeft8(v *Value) bool {
27336 v_1 := v.Args[1]
27337 v_0 := v.Args[0]
27338 b := v.Block
27339 config := b.Func.Config
27340
27341
27342
27343 for {
27344 x := v_0
27345 if v_1.Op != OpConst8 {
27346 break
27347 }
27348 c := auxIntToInt8(v_1.AuxInt)
27349 if !(c%8 == 0) {
27350 break
27351 }
27352 v.copyOf(x)
27353 return true
27354 }
27355
27356
27357
27358 for {
27359 x := v_0
27360 if v_1.Op != OpAnd64 {
27361 break
27362 }
27363 _ = v_1.Args[1]
27364 v_1_0 := v_1.Args[0]
27365 v_1_1 := v_1.Args[1]
27366 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
27367 y := v_1_0
27368 if v_1_1.Op != OpConst64 {
27369 continue
27370 }
27371 c := auxIntToInt64(v_1_1.AuxInt)
27372 if !(c&7 == 7) {
27373 continue
27374 }
27375 v.reset(OpRotateLeft8)
27376 v.AddArg2(x, y)
27377 return true
27378 }
27379 break
27380 }
27381
27382
27383
27384 for {
27385 x := v_0
27386 if v_1.Op != OpAnd32 {
27387 break
27388 }
27389 _ = v_1.Args[1]
27390 v_1_0 := v_1.Args[0]
27391 v_1_1 := v_1.Args[1]
27392 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
27393 y := v_1_0
27394 if v_1_1.Op != OpConst32 {
27395 continue
27396 }
27397 c := auxIntToInt32(v_1_1.AuxInt)
27398 if !(c&7 == 7) {
27399 continue
27400 }
27401 v.reset(OpRotateLeft8)
27402 v.AddArg2(x, y)
27403 return true
27404 }
27405 break
27406 }
27407
27408
27409
27410 for {
27411 x := v_0
27412 if v_1.Op != OpAnd16 {
27413 break
27414 }
27415 _ = v_1.Args[1]
27416 v_1_0 := v_1.Args[0]
27417 v_1_1 := v_1.Args[1]
27418 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
27419 y := v_1_0
27420 if v_1_1.Op != OpConst16 {
27421 continue
27422 }
27423 c := auxIntToInt16(v_1_1.AuxInt)
27424 if !(c&7 == 7) {
27425 continue
27426 }
27427 v.reset(OpRotateLeft8)
27428 v.AddArg2(x, y)
27429 return true
27430 }
27431 break
27432 }
27433
27434
27435
27436 for {
27437 x := v_0
27438 if v_1.Op != OpAnd8 {
27439 break
27440 }
27441 _ = v_1.Args[1]
27442 v_1_0 := v_1.Args[0]
27443 v_1_1 := v_1.Args[1]
27444 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
27445 y := v_1_0
27446 if v_1_1.Op != OpConst8 {
27447 continue
27448 }
27449 c := auxIntToInt8(v_1_1.AuxInt)
27450 if !(c&7 == 7) {
27451 continue
27452 }
27453 v.reset(OpRotateLeft8)
27454 v.AddArg2(x, y)
27455 return true
27456 }
27457 break
27458 }
27459
27460
27461
27462 for {
27463 x := v_0
27464 if v_1.Op != OpNeg64 {
27465 break
27466 }
27467 v_1_0 := v_1.Args[0]
27468 if v_1_0.Op != OpAnd64 {
27469 break
27470 }
27471 _ = v_1_0.Args[1]
27472 v_1_0_0 := v_1_0.Args[0]
27473 v_1_0_1 := v_1_0.Args[1]
27474 for _i0 := 0; _i0 <= 1; _i0, v_1_0_0, v_1_0_1 = _i0+1, v_1_0_1, v_1_0_0 {
27475 y := v_1_0_0
27476 if v_1_0_1.Op != OpConst64 {
27477 continue
27478 }
27479 c := auxIntToInt64(v_1_0_1.AuxInt)
27480 if !(c&7 == 7) {
27481 continue
27482 }
27483 v.reset(OpRotateLeft8)
27484 v0 := b.NewValue0(v.Pos, OpNeg64, y.Type)
27485 v0.AddArg(y)
27486 v.AddArg2(x, v0)
27487 return true
27488 }
27489 break
27490 }
27491
27492
27493
27494 for {
27495 x := v_0
27496 if v_1.Op != OpNeg32 {
27497 break
27498 }
27499 v_1_0 := v_1.Args[0]
27500 if v_1_0.Op != OpAnd32 {
27501 break
27502 }
27503 _ = v_1_0.Args[1]
27504 v_1_0_0 := v_1_0.Args[0]
27505 v_1_0_1 := v_1_0.Args[1]
27506 for _i0 := 0; _i0 <= 1; _i0, v_1_0_0, v_1_0_1 = _i0+1, v_1_0_1, v_1_0_0 {
27507 y := v_1_0_0
27508 if v_1_0_1.Op != OpConst32 {
27509 continue
27510 }
27511 c := auxIntToInt32(v_1_0_1.AuxInt)
27512 if !(c&7 == 7) {
27513 continue
27514 }
27515 v.reset(OpRotateLeft8)
27516 v0 := b.NewValue0(v.Pos, OpNeg32, y.Type)
27517 v0.AddArg(y)
27518 v.AddArg2(x, v0)
27519 return true
27520 }
27521 break
27522 }
27523
27524
27525
27526 for {
27527 x := v_0
27528 if v_1.Op != OpNeg16 {
27529 break
27530 }
27531 v_1_0 := v_1.Args[0]
27532 if v_1_0.Op != OpAnd16 {
27533 break
27534 }
27535 _ = v_1_0.Args[1]
27536 v_1_0_0 := v_1_0.Args[0]
27537 v_1_0_1 := v_1_0.Args[1]
27538 for _i0 := 0; _i0 <= 1; _i0, v_1_0_0, v_1_0_1 = _i0+1, v_1_0_1, v_1_0_0 {
27539 y := v_1_0_0
27540 if v_1_0_1.Op != OpConst16 {
27541 continue
27542 }
27543 c := auxIntToInt16(v_1_0_1.AuxInt)
27544 if !(c&7 == 7) {
27545 continue
27546 }
27547 v.reset(OpRotateLeft8)
27548 v0 := b.NewValue0(v.Pos, OpNeg16, y.Type)
27549 v0.AddArg(y)
27550 v.AddArg2(x, v0)
27551 return true
27552 }
27553 break
27554 }
27555
27556
27557
27558 for {
27559 x := v_0
27560 if v_1.Op != OpNeg8 {
27561 break
27562 }
27563 v_1_0 := v_1.Args[0]
27564 if v_1_0.Op != OpAnd8 {
27565 break
27566 }
27567 _ = v_1_0.Args[1]
27568 v_1_0_0 := v_1_0.Args[0]
27569 v_1_0_1 := v_1_0.Args[1]
27570 for _i0 := 0; _i0 <= 1; _i0, v_1_0_0, v_1_0_1 = _i0+1, v_1_0_1, v_1_0_0 {
27571 y := v_1_0_0
27572 if v_1_0_1.Op != OpConst8 {
27573 continue
27574 }
27575 c := auxIntToInt8(v_1_0_1.AuxInt)
27576 if !(c&7 == 7) {
27577 continue
27578 }
27579 v.reset(OpRotateLeft8)
27580 v0 := b.NewValue0(v.Pos, OpNeg8, y.Type)
27581 v0.AddArg(y)
27582 v.AddArg2(x, v0)
27583 return true
27584 }
27585 break
27586 }
27587
27588
27589
27590 for {
27591 x := v_0
27592 if v_1.Op != OpAdd64 {
27593 break
27594 }
27595 _ = v_1.Args[1]
27596 v_1_0 := v_1.Args[0]
27597 v_1_1 := v_1.Args[1]
27598 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
27599 y := v_1_0
27600 if v_1_1.Op != OpConst64 {
27601 continue
27602 }
27603 c := auxIntToInt64(v_1_1.AuxInt)
27604 if !(c&7 == 0) {
27605 continue
27606 }
27607 v.reset(OpRotateLeft8)
27608 v.AddArg2(x, y)
27609 return true
27610 }
27611 break
27612 }
27613
27614
27615
27616 for {
27617 x := v_0
27618 if v_1.Op != OpAdd32 {
27619 break
27620 }
27621 _ = v_1.Args[1]
27622 v_1_0 := v_1.Args[0]
27623 v_1_1 := v_1.Args[1]
27624 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
27625 y := v_1_0
27626 if v_1_1.Op != OpConst32 {
27627 continue
27628 }
27629 c := auxIntToInt32(v_1_1.AuxInt)
27630 if !(c&7 == 0) {
27631 continue
27632 }
27633 v.reset(OpRotateLeft8)
27634 v.AddArg2(x, y)
27635 return true
27636 }
27637 break
27638 }
27639
27640
27641
27642 for {
27643 x := v_0
27644 if v_1.Op != OpAdd16 {
27645 break
27646 }
27647 _ = v_1.Args[1]
27648 v_1_0 := v_1.Args[0]
27649 v_1_1 := v_1.Args[1]
27650 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
27651 y := v_1_0
27652 if v_1_1.Op != OpConst16 {
27653 continue
27654 }
27655 c := auxIntToInt16(v_1_1.AuxInt)
27656 if !(c&7 == 0) {
27657 continue
27658 }
27659 v.reset(OpRotateLeft8)
27660 v.AddArg2(x, y)
27661 return true
27662 }
27663 break
27664 }
27665
27666
27667
27668 for {
27669 x := v_0
27670 if v_1.Op != OpAdd8 {
27671 break
27672 }
27673 _ = v_1.Args[1]
27674 v_1_0 := v_1.Args[0]
27675 v_1_1 := v_1.Args[1]
27676 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
27677 y := v_1_0
27678 if v_1_1.Op != OpConst8 {
27679 continue
27680 }
27681 c := auxIntToInt8(v_1_1.AuxInt)
27682 if !(c&7 == 0) {
27683 continue
27684 }
27685 v.reset(OpRotateLeft8)
27686 v.AddArg2(x, y)
27687 return true
27688 }
27689 break
27690 }
27691
27692
27693
27694 for {
27695 x := v_0
27696 if v_1.Op != OpSub64 {
27697 break
27698 }
27699 y := v_1.Args[1]
27700 v_1_0 := v_1.Args[0]
27701 if v_1_0.Op != OpConst64 {
27702 break
27703 }
27704 c := auxIntToInt64(v_1_0.AuxInt)
27705 if !(c&7 == 0) {
27706 break
27707 }
27708 v.reset(OpRotateLeft8)
27709 v0 := b.NewValue0(v.Pos, OpNeg64, y.Type)
27710 v0.AddArg(y)
27711 v.AddArg2(x, v0)
27712 return true
27713 }
27714
27715
27716
27717 for {
27718 x := v_0
27719 if v_1.Op != OpSub32 {
27720 break
27721 }
27722 y := v_1.Args[1]
27723 v_1_0 := v_1.Args[0]
27724 if v_1_0.Op != OpConst32 {
27725 break
27726 }
27727 c := auxIntToInt32(v_1_0.AuxInt)
27728 if !(c&7 == 0) {
27729 break
27730 }
27731 v.reset(OpRotateLeft8)
27732 v0 := b.NewValue0(v.Pos, OpNeg32, y.Type)
27733 v0.AddArg(y)
27734 v.AddArg2(x, v0)
27735 return true
27736 }
27737
27738
27739
27740 for {
27741 x := v_0
27742 if v_1.Op != OpSub16 {
27743 break
27744 }
27745 y := v_1.Args[1]
27746 v_1_0 := v_1.Args[0]
27747 if v_1_0.Op != OpConst16 {
27748 break
27749 }
27750 c := auxIntToInt16(v_1_0.AuxInt)
27751 if !(c&7 == 0) {
27752 break
27753 }
27754 v.reset(OpRotateLeft8)
27755 v0 := b.NewValue0(v.Pos, OpNeg16, y.Type)
27756 v0.AddArg(y)
27757 v.AddArg2(x, v0)
27758 return true
27759 }
27760
27761
27762
27763 for {
27764 x := v_0
27765 if v_1.Op != OpSub8 {
27766 break
27767 }
27768 y := v_1.Args[1]
27769 v_1_0 := v_1.Args[0]
27770 if v_1_0.Op != OpConst8 {
27771 break
27772 }
27773 c := auxIntToInt8(v_1_0.AuxInt)
27774 if !(c&7 == 0) {
27775 break
27776 }
27777 v.reset(OpRotateLeft8)
27778 v0 := b.NewValue0(v.Pos, OpNeg8, y.Type)
27779 v0.AddArg(y)
27780 v.AddArg2(x, v0)
27781 return true
27782 }
27783
27784
27785
27786 for {
27787 x := v_0
27788 if v_1.Op != OpConst64 {
27789 break
27790 }
27791 t := v_1.Type
27792 c := auxIntToInt64(v_1.AuxInt)
27793 if !(config.PtrSize == 4) {
27794 break
27795 }
27796 v.reset(OpRotateLeft8)
27797 v0 := b.NewValue0(v.Pos, OpConst32, t)
27798 v0.AuxInt = int32ToAuxInt(int32(c))
27799 v.AddArg2(x, v0)
27800 return true
27801 }
27802
27803
27804
27805 for {
27806 if v_0.Op != OpRotateLeft8 {
27807 break
27808 }
27809 c := v_0.Args[1]
27810 x := v_0.Args[0]
27811 d := v_1
27812 if !(c.Type.Size() == 8 && d.Type.Size() == 8) {
27813 break
27814 }
27815 v.reset(OpRotateLeft8)
27816 v0 := b.NewValue0(v.Pos, OpAdd64, c.Type)
27817 v0.AddArg2(c, d)
27818 v.AddArg2(x, v0)
27819 return true
27820 }
27821
27822
27823
27824 for {
27825 if v_0.Op != OpRotateLeft8 {
27826 break
27827 }
27828 c := v_0.Args[1]
27829 x := v_0.Args[0]
27830 d := v_1
27831 if !(c.Type.Size() == 4 && d.Type.Size() == 4) {
27832 break
27833 }
27834 v.reset(OpRotateLeft8)
27835 v0 := b.NewValue0(v.Pos, OpAdd32, c.Type)
27836 v0.AddArg2(c, d)
27837 v.AddArg2(x, v0)
27838 return true
27839 }
27840
27841
27842
27843 for {
27844 if v_0.Op != OpRotateLeft8 {
27845 break
27846 }
27847 c := v_0.Args[1]
27848 x := v_0.Args[0]
27849 d := v_1
27850 if !(c.Type.Size() == 2 && d.Type.Size() == 2) {
27851 break
27852 }
27853 v.reset(OpRotateLeft8)
27854 v0 := b.NewValue0(v.Pos, OpAdd16, c.Type)
27855 v0.AddArg2(c, d)
27856 v.AddArg2(x, v0)
27857 return true
27858 }
27859
27860
27861
27862 for {
27863 if v_0.Op != OpRotateLeft8 {
27864 break
27865 }
27866 c := v_0.Args[1]
27867 x := v_0.Args[0]
27868 d := v_1
27869 if !(c.Type.Size() == 1 && d.Type.Size() == 1) {
27870 break
27871 }
27872 v.reset(OpRotateLeft8)
27873 v0 := b.NewValue0(v.Pos, OpAdd8, c.Type)
27874 v0.AddArg2(c, d)
27875 v.AddArg2(x, v0)
27876 return true
27877 }
27878 return false
27879 }
27880 func rewriteValuegeneric_OpRound32F(v *Value) bool {
27881 v_0 := v.Args[0]
27882
27883
27884 for {
27885 x := v_0
27886 if x.Op != OpConst32F {
27887 break
27888 }
27889 v.copyOf(x)
27890 return true
27891 }
27892 return false
27893 }
27894 func rewriteValuegeneric_OpRound64F(v *Value) bool {
27895 v_0 := v.Args[0]
27896
27897
27898 for {
27899 x := v_0
27900 if x.Op != OpConst64F {
27901 break
27902 }
27903 v.copyOf(x)
27904 return true
27905 }
27906 return false
27907 }
27908 func rewriteValuegeneric_OpRoundToEven(v *Value) bool {
27909 v_0 := v.Args[0]
27910
27911
27912 for {
27913 if v_0.Op != OpConst64F {
27914 break
27915 }
27916 c := auxIntToFloat64(v_0.AuxInt)
27917 v.reset(OpConst64F)
27918 v.AuxInt = float64ToAuxInt(math.RoundToEven(c))
27919 return true
27920 }
27921 return false
27922 }
27923 func rewriteValuegeneric_OpRsh16Ux16(v *Value) bool {
27924 v_1 := v.Args[1]
27925 v_0 := v.Args[0]
27926 b := v.Block
27927
27928
27929 for {
27930 t := v.Type
27931 x := v_0
27932 if v_1.Op != OpConst16 {
27933 break
27934 }
27935 c := auxIntToInt16(v_1.AuxInt)
27936 v.reset(OpRsh16Ux64)
27937 v0 := b.NewValue0(v.Pos, OpConst64, t)
27938 v0.AuxInt = int64ToAuxInt(int64(uint16(c)))
27939 v.AddArg2(x, v0)
27940 return true
27941 }
27942
27943
27944 for {
27945 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 {
27946 break
27947 }
27948 v.reset(OpConst16)
27949 v.AuxInt = int16ToAuxInt(0)
27950 return true
27951 }
27952 return false
27953 }
27954 func rewriteValuegeneric_OpRsh16Ux32(v *Value) bool {
27955 v_1 := v.Args[1]
27956 v_0 := v.Args[0]
27957 b := v.Block
27958
27959
27960 for {
27961 t := v.Type
27962 x := v_0
27963 if v_1.Op != OpConst32 {
27964 break
27965 }
27966 c := auxIntToInt32(v_1.AuxInt)
27967 v.reset(OpRsh16Ux64)
27968 v0 := b.NewValue0(v.Pos, OpConst64, t)
27969 v0.AuxInt = int64ToAuxInt(int64(uint32(c)))
27970 v.AddArg2(x, v0)
27971 return true
27972 }
27973
27974
27975 for {
27976 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 {
27977 break
27978 }
27979 v.reset(OpConst16)
27980 v.AuxInt = int16ToAuxInt(0)
27981 return true
27982 }
27983 return false
27984 }
27985 func rewriteValuegeneric_OpRsh16Ux64(v *Value) bool {
27986 v_1 := v.Args[1]
27987 v_0 := v.Args[0]
27988 b := v.Block
27989 typ := &b.Func.Config.Types
27990
27991
27992 for {
27993 if v_0.Op != OpConst16 {
27994 break
27995 }
27996 c := auxIntToInt16(v_0.AuxInt)
27997 if v_1.Op != OpConst64 {
27998 break
27999 }
28000 d := auxIntToInt64(v_1.AuxInt)
28001 v.reset(OpConst16)
28002 v.AuxInt = int16ToAuxInt(int16(uint16(c) >> uint64(d)))
28003 return true
28004 }
28005
28006
28007 for {
28008 x := v_0
28009 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 0 {
28010 break
28011 }
28012 v.copyOf(x)
28013 return true
28014 }
28015
28016
28017 for {
28018 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 {
28019 break
28020 }
28021 v.reset(OpConst16)
28022 v.AuxInt = int16ToAuxInt(0)
28023 return true
28024 }
28025
28026
28027
28028 for {
28029 if v_1.Op != OpConst64 {
28030 break
28031 }
28032 c := auxIntToInt64(v_1.AuxInt)
28033 if !(uint64(c) >= 16) {
28034 break
28035 }
28036 v.reset(OpConst16)
28037 v.AuxInt = int16ToAuxInt(0)
28038 return true
28039 }
28040
28041
28042
28043 for {
28044 t := v.Type
28045 if v_0.Op != OpRsh16Ux64 {
28046 break
28047 }
28048 _ = v_0.Args[1]
28049 x := v_0.Args[0]
28050 v_0_1 := v_0.Args[1]
28051 if v_0_1.Op != OpConst64 {
28052 break
28053 }
28054 c := auxIntToInt64(v_0_1.AuxInt)
28055 if v_1.Op != OpConst64 {
28056 break
28057 }
28058 d := auxIntToInt64(v_1.AuxInt)
28059 if !(!uaddOvf(c, d)) {
28060 break
28061 }
28062 v.reset(OpRsh16Ux64)
28063 v0 := b.NewValue0(v.Pos, OpConst64, t)
28064 v0.AuxInt = int64ToAuxInt(c + d)
28065 v.AddArg2(x, v0)
28066 return true
28067 }
28068
28069
28070 for {
28071 if v_0.Op != OpRsh16x64 {
28072 break
28073 }
28074 x := v_0.Args[0]
28075 if v_1.Op != OpConst64 {
28076 break
28077 }
28078 t := v_1.Type
28079 if auxIntToInt64(v_1.AuxInt) != 15 {
28080 break
28081 }
28082 v.reset(OpRsh16Ux64)
28083 v0 := b.NewValue0(v.Pos, OpConst64, t)
28084 v0.AuxInt = int64ToAuxInt(15)
28085 v.AddArg2(x, v0)
28086 return true
28087 }
28088
28089
28090
28091 for {
28092 i := v_0
28093 if i.Op != OpLsh16x64 {
28094 break
28095 }
28096 _ = i.Args[1]
28097 x := i.Args[0]
28098 i_1 := i.Args[1]
28099 if i_1.Op != OpConst64 {
28100 break
28101 }
28102 c := auxIntToInt64(i_1.AuxInt)
28103 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != c || !(c >= 0 && c < 16 && i.Uses == 1) {
28104 break
28105 }
28106 v.reset(OpAnd16)
28107 v0 := b.NewValue0(v.Pos, OpConst16, v.Type)
28108 v0.AuxInt = int16ToAuxInt(int16(^uint16(0) >> c))
28109 v.AddArg2(x, v0)
28110 return true
28111 }
28112
28113
28114
28115 for {
28116 if v_0.Op != OpLsh16x64 {
28117 break
28118 }
28119 _ = v_0.Args[1]
28120 v_0_0 := v_0.Args[0]
28121 if v_0_0.Op != OpRsh16Ux64 {
28122 break
28123 }
28124 _ = v_0_0.Args[1]
28125 x := v_0_0.Args[0]
28126 v_0_0_1 := v_0_0.Args[1]
28127 if v_0_0_1.Op != OpConst64 {
28128 break
28129 }
28130 c1 := auxIntToInt64(v_0_0_1.AuxInt)
28131 v_0_1 := v_0.Args[1]
28132 if v_0_1.Op != OpConst64 {
28133 break
28134 }
28135 c2 := auxIntToInt64(v_0_1.AuxInt)
28136 if v_1.Op != OpConst64 {
28137 break
28138 }
28139 c3 := auxIntToInt64(v_1.AuxInt)
28140 if !(uint64(c1) >= uint64(c2) && uint64(c3) >= uint64(c2) && !uaddOvf(c1-c2, c3)) {
28141 break
28142 }
28143 v.reset(OpRsh16Ux64)
28144 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
28145 v0.AuxInt = int64ToAuxInt(c1 - c2 + c3)
28146 v.AddArg2(x, v0)
28147 return true
28148 }
28149
28150
28151 for {
28152 if v_0.Op != OpLsh16x64 {
28153 break
28154 }
28155 _ = v_0.Args[1]
28156 x := v_0.Args[0]
28157 v_0_1 := v_0.Args[1]
28158 if v_0_1.Op != OpConst64 || auxIntToInt64(v_0_1.AuxInt) != 8 || v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 8 {
28159 break
28160 }
28161 v.reset(OpZeroExt8to16)
28162 v0 := b.NewValue0(v.Pos, OpTrunc16to8, typ.UInt8)
28163 v0.AddArg(x)
28164 v.AddArg(v0)
28165 return true
28166 }
28167 return false
28168 }
28169 func rewriteValuegeneric_OpRsh16Ux8(v *Value) bool {
28170 v_1 := v.Args[1]
28171 v_0 := v.Args[0]
28172 b := v.Block
28173
28174
28175 for {
28176 t := v.Type
28177 x := v_0
28178 if v_1.Op != OpConst8 {
28179 break
28180 }
28181 c := auxIntToInt8(v_1.AuxInt)
28182 v.reset(OpRsh16Ux64)
28183 v0 := b.NewValue0(v.Pos, OpConst64, t)
28184 v0.AuxInt = int64ToAuxInt(int64(uint8(c)))
28185 v.AddArg2(x, v0)
28186 return true
28187 }
28188
28189
28190 for {
28191 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 {
28192 break
28193 }
28194 v.reset(OpConst16)
28195 v.AuxInt = int16ToAuxInt(0)
28196 return true
28197 }
28198 return false
28199 }
28200 func rewriteValuegeneric_OpRsh16x16(v *Value) bool {
28201 v_1 := v.Args[1]
28202 v_0 := v.Args[0]
28203 b := v.Block
28204
28205
28206 for {
28207 t := v.Type
28208 x := v_0
28209 if v_1.Op != OpConst16 {
28210 break
28211 }
28212 c := auxIntToInt16(v_1.AuxInt)
28213 v.reset(OpRsh16x64)
28214 v0 := b.NewValue0(v.Pos, OpConst64, t)
28215 v0.AuxInt = int64ToAuxInt(int64(uint16(c)))
28216 v.AddArg2(x, v0)
28217 return true
28218 }
28219
28220
28221 for {
28222 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 {
28223 break
28224 }
28225 v.reset(OpConst16)
28226 v.AuxInt = int16ToAuxInt(0)
28227 return true
28228 }
28229 return false
28230 }
28231 func rewriteValuegeneric_OpRsh16x32(v *Value) bool {
28232 v_1 := v.Args[1]
28233 v_0 := v.Args[0]
28234 b := v.Block
28235
28236
28237 for {
28238 t := v.Type
28239 x := v_0
28240 if v_1.Op != OpConst32 {
28241 break
28242 }
28243 c := auxIntToInt32(v_1.AuxInt)
28244 v.reset(OpRsh16x64)
28245 v0 := b.NewValue0(v.Pos, OpConst64, t)
28246 v0.AuxInt = int64ToAuxInt(int64(uint32(c)))
28247 v.AddArg2(x, v0)
28248 return true
28249 }
28250
28251
28252 for {
28253 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 {
28254 break
28255 }
28256 v.reset(OpConst16)
28257 v.AuxInt = int16ToAuxInt(0)
28258 return true
28259 }
28260 return false
28261 }
28262 func rewriteValuegeneric_OpRsh16x64(v *Value) bool {
28263 v_1 := v.Args[1]
28264 v_0 := v.Args[0]
28265 b := v.Block
28266 typ := &b.Func.Config.Types
28267
28268
28269 for {
28270 if v_0.Op != OpConst16 {
28271 break
28272 }
28273 c := auxIntToInt16(v_0.AuxInt)
28274 if v_1.Op != OpConst64 {
28275 break
28276 }
28277 d := auxIntToInt64(v_1.AuxInt)
28278 v.reset(OpConst16)
28279 v.AuxInt = int16ToAuxInt(c >> uint64(d))
28280 return true
28281 }
28282
28283
28284 for {
28285 x := v_0
28286 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 0 {
28287 break
28288 }
28289 v.copyOf(x)
28290 return true
28291 }
28292
28293
28294 for {
28295 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 {
28296 break
28297 }
28298 v.reset(OpConst16)
28299 v.AuxInt = int16ToAuxInt(0)
28300 return true
28301 }
28302
28303
28304
28305 for {
28306 t := v.Type
28307 if v_0.Op != OpRsh16x64 {
28308 break
28309 }
28310 _ = v_0.Args[1]
28311 x := v_0.Args[0]
28312 v_0_1 := v_0.Args[1]
28313 if v_0_1.Op != OpConst64 {
28314 break
28315 }
28316 c := auxIntToInt64(v_0_1.AuxInt)
28317 if v_1.Op != OpConst64 {
28318 break
28319 }
28320 d := auxIntToInt64(v_1.AuxInt)
28321 if !(!uaddOvf(c, d)) {
28322 break
28323 }
28324 v.reset(OpRsh16x64)
28325 v0 := b.NewValue0(v.Pos, OpConst64, t)
28326 v0.AuxInt = int64ToAuxInt(c + d)
28327 v.AddArg2(x, v0)
28328 return true
28329 }
28330
28331
28332 for {
28333 if v_0.Op != OpLsh16x64 {
28334 break
28335 }
28336 _ = v_0.Args[1]
28337 x := v_0.Args[0]
28338 v_0_1 := v_0.Args[1]
28339 if v_0_1.Op != OpConst64 || auxIntToInt64(v_0_1.AuxInt) != 8 || v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 8 {
28340 break
28341 }
28342 v.reset(OpSignExt8to16)
28343 v0 := b.NewValue0(v.Pos, OpTrunc16to8, typ.Int8)
28344 v0.AddArg(x)
28345 v.AddArg(v0)
28346 return true
28347 }
28348 return false
28349 }
28350 func rewriteValuegeneric_OpRsh16x8(v *Value) bool {
28351 v_1 := v.Args[1]
28352 v_0 := v.Args[0]
28353 b := v.Block
28354
28355
28356 for {
28357 t := v.Type
28358 x := v_0
28359 if v_1.Op != OpConst8 {
28360 break
28361 }
28362 c := auxIntToInt8(v_1.AuxInt)
28363 v.reset(OpRsh16x64)
28364 v0 := b.NewValue0(v.Pos, OpConst64, t)
28365 v0.AuxInt = int64ToAuxInt(int64(uint8(c)))
28366 v.AddArg2(x, v0)
28367 return true
28368 }
28369
28370
28371 for {
28372 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 {
28373 break
28374 }
28375 v.reset(OpConst16)
28376 v.AuxInt = int16ToAuxInt(0)
28377 return true
28378 }
28379 return false
28380 }
28381 func rewriteValuegeneric_OpRsh32Ux16(v *Value) bool {
28382 v_1 := v.Args[1]
28383 v_0 := v.Args[0]
28384 b := v.Block
28385
28386
28387 for {
28388 t := v.Type
28389 x := v_0
28390 if v_1.Op != OpConst16 {
28391 break
28392 }
28393 c := auxIntToInt16(v_1.AuxInt)
28394 v.reset(OpRsh32Ux64)
28395 v0 := b.NewValue0(v.Pos, OpConst64, t)
28396 v0.AuxInt = int64ToAuxInt(int64(uint16(c)))
28397 v.AddArg2(x, v0)
28398 return true
28399 }
28400
28401
28402 for {
28403 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
28404 break
28405 }
28406 v.reset(OpConst32)
28407 v.AuxInt = int32ToAuxInt(0)
28408 return true
28409 }
28410 return false
28411 }
28412 func rewriteValuegeneric_OpRsh32Ux32(v *Value) bool {
28413 v_1 := v.Args[1]
28414 v_0 := v.Args[0]
28415 b := v.Block
28416
28417
28418 for {
28419 t := v.Type
28420 x := v_0
28421 if v_1.Op != OpConst32 {
28422 break
28423 }
28424 c := auxIntToInt32(v_1.AuxInt)
28425 v.reset(OpRsh32Ux64)
28426 v0 := b.NewValue0(v.Pos, OpConst64, t)
28427 v0.AuxInt = int64ToAuxInt(int64(uint32(c)))
28428 v.AddArg2(x, v0)
28429 return true
28430 }
28431
28432
28433 for {
28434 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
28435 break
28436 }
28437 v.reset(OpConst32)
28438 v.AuxInt = int32ToAuxInt(0)
28439 return true
28440 }
28441 return false
28442 }
28443 func rewriteValuegeneric_OpRsh32Ux64(v *Value) bool {
28444 v_1 := v.Args[1]
28445 v_0 := v.Args[0]
28446 b := v.Block
28447 typ := &b.Func.Config.Types
28448
28449
28450 for {
28451 if v_0.Op != OpConst32 {
28452 break
28453 }
28454 c := auxIntToInt32(v_0.AuxInt)
28455 if v_1.Op != OpConst64 {
28456 break
28457 }
28458 d := auxIntToInt64(v_1.AuxInt)
28459 v.reset(OpConst32)
28460 v.AuxInt = int32ToAuxInt(int32(uint32(c) >> uint64(d)))
28461 return true
28462 }
28463
28464
28465 for {
28466 x := v_0
28467 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 0 {
28468 break
28469 }
28470 v.copyOf(x)
28471 return true
28472 }
28473
28474
28475 for {
28476 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
28477 break
28478 }
28479 v.reset(OpConst32)
28480 v.AuxInt = int32ToAuxInt(0)
28481 return true
28482 }
28483
28484
28485
28486 for {
28487 if v_1.Op != OpConst64 {
28488 break
28489 }
28490 c := auxIntToInt64(v_1.AuxInt)
28491 if !(uint64(c) >= 32) {
28492 break
28493 }
28494 v.reset(OpConst32)
28495 v.AuxInt = int32ToAuxInt(0)
28496 return true
28497 }
28498
28499
28500
28501 for {
28502 t := v.Type
28503 if v_0.Op != OpRsh32Ux64 {
28504 break
28505 }
28506 _ = v_0.Args[1]
28507 x := v_0.Args[0]
28508 v_0_1 := v_0.Args[1]
28509 if v_0_1.Op != OpConst64 {
28510 break
28511 }
28512 c := auxIntToInt64(v_0_1.AuxInt)
28513 if v_1.Op != OpConst64 {
28514 break
28515 }
28516 d := auxIntToInt64(v_1.AuxInt)
28517 if !(!uaddOvf(c, d)) {
28518 break
28519 }
28520 v.reset(OpRsh32Ux64)
28521 v0 := b.NewValue0(v.Pos, OpConst64, t)
28522 v0.AuxInt = int64ToAuxInt(c + d)
28523 v.AddArg2(x, v0)
28524 return true
28525 }
28526
28527
28528 for {
28529 if v_0.Op != OpRsh32x64 {
28530 break
28531 }
28532 x := v_0.Args[0]
28533 if v_1.Op != OpConst64 {
28534 break
28535 }
28536 t := v_1.Type
28537 if auxIntToInt64(v_1.AuxInt) != 31 {
28538 break
28539 }
28540 v.reset(OpRsh32Ux64)
28541 v0 := b.NewValue0(v.Pos, OpConst64, t)
28542 v0.AuxInt = int64ToAuxInt(31)
28543 v.AddArg2(x, v0)
28544 return true
28545 }
28546
28547
28548
28549 for {
28550 i := v_0
28551 if i.Op != OpLsh32x64 {
28552 break
28553 }
28554 _ = i.Args[1]
28555 x := i.Args[0]
28556 i_1 := i.Args[1]
28557 if i_1.Op != OpConst64 {
28558 break
28559 }
28560 c := auxIntToInt64(i_1.AuxInt)
28561 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != c || !(c >= 0 && c < 32 && i.Uses == 1) {
28562 break
28563 }
28564 v.reset(OpAnd32)
28565 v0 := b.NewValue0(v.Pos, OpConst32, v.Type)
28566 v0.AuxInt = int32ToAuxInt(int32(^uint32(0) >> c))
28567 v.AddArg2(x, v0)
28568 return true
28569 }
28570
28571
28572
28573 for {
28574 if v_0.Op != OpLsh32x64 {
28575 break
28576 }
28577 _ = v_0.Args[1]
28578 v_0_0 := v_0.Args[0]
28579 if v_0_0.Op != OpRsh32Ux64 {
28580 break
28581 }
28582 _ = v_0_0.Args[1]
28583 x := v_0_0.Args[0]
28584 v_0_0_1 := v_0_0.Args[1]
28585 if v_0_0_1.Op != OpConst64 {
28586 break
28587 }
28588 c1 := auxIntToInt64(v_0_0_1.AuxInt)
28589 v_0_1 := v_0.Args[1]
28590 if v_0_1.Op != OpConst64 {
28591 break
28592 }
28593 c2 := auxIntToInt64(v_0_1.AuxInt)
28594 if v_1.Op != OpConst64 {
28595 break
28596 }
28597 c3 := auxIntToInt64(v_1.AuxInt)
28598 if !(uint64(c1) >= uint64(c2) && uint64(c3) >= uint64(c2) && !uaddOvf(c1-c2, c3)) {
28599 break
28600 }
28601 v.reset(OpRsh32Ux64)
28602 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
28603 v0.AuxInt = int64ToAuxInt(c1 - c2 + c3)
28604 v.AddArg2(x, v0)
28605 return true
28606 }
28607
28608
28609 for {
28610 if v_0.Op != OpLsh32x64 {
28611 break
28612 }
28613 _ = v_0.Args[1]
28614 x := v_0.Args[0]
28615 v_0_1 := v_0.Args[1]
28616 if v_0_1.Op != OpConst64 || auxIntToInt64(v_0_1.AuxInt) != 24 || v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 24 {
28617 break
28618 }
28619 v.reset(OpZeroExt8to32)
28620 v0 := b.NewValue0(v.Pos, OpTrunc32to8, typ.UInt8)
28621 v0.AddArg(x)
28622 v.AddArg(v0)
28623 return true
28624 }
28625
28626
28627 for {
28628 if v_0.Op != OpLsh32x64 {
28629 break
28630 }
28631 _ = v_0.Args[1]
28632 x := v_0.Args[0]
28633 v_0_1 := v_0.Args[1]
28634 if v_0_1.Op != OpConst64 || auxIntToInt64(v_0_1.AuxInt) != 16 || v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 16 {
28635 break
28636 }
28637 v.reset(OpZeroExt16to32)
28638 v0 := b.NewValue0(v.Pos, OpTrunc32to16, typ.UInt16)
28639 v0.AddArg(x)
28640 v.AddArg(v0)
28641 return true
28642 }
28643 return false
28644 }
28645 func rewriteValuegeneric_OpRsh32Ux8(v *Value) bool {
28646 v_1 := v.Args[1]
28647 v_0 := v.Args[0]
28648 b := v.Block
28649
28650
28651 for {
28652 t := v.Type
28653 x := v_0
28654 if v_1.Op != OpConst8 {
28655 break
28656 }
28657 c := auxIntToInt8(v_1.AuxInt)
28658 v.reset(OpRsh32Ux64)
28659 v0 := b.NewValue0(v.Pos, OpConst64, t)
28660 v0.AuxInt = int64ToAuxInt(int64(uint8(c)))
28661 v.AddArg2(x, v0)
28662 return true
28663 }
28664
28665
28666 for {
28667 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
28668 break
28669 }
28670 v.reset(OpConst32)
28671 v.AuxInt = int32ToAuxInt(0)
28672 return true
28673 }
28674 return false
28675 }
28676 func rewriteValuegeneric_OpRsh32x16(v *Value) bool {
28677 v_1 := v.Args[1]
28678 v_0 := v.Args[0]
28679 b := v.Block
28680
28681
28682 for {
28683 t := v.Type
28684 x := v_0
28685 if v_1.Op != OpConst16 {
28686 break
28687 }
28688 c := auxIntToInt16(v_1.AuxInt)
28689 v.reset(OpRsh32x64)
28690 v0 := b.NewValue0(v.Pos, OpConst64, t)
28691 v0.AuxInt = int64ToAuxInt(int64(uint16(c)))
28692 v.AddArg2(x, v0)
28693 return true
28694 }
28695
28696
28697 for {
28698 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
28699 break
28700 }
28701 v.reset(OpConst32)
28702 v.AuxInt = int32ToAuxInt(0)
28703 return true
28704 }
28705 return false
28706 }
28707 func rewriteValuegeneric_OpRsh32x32(v *Value) bool {
28708 v_1 := v.Args[1]
28709 v_0 := v.Args[0]
28710 b := v.Block
28711
28712
28713 for {
28714 t := v.Type
28715 x := v_0
28716 if v_1.Op != OpConst32 {
28717 break
28718 }
28719 c := auxIntToInt32(v_1.AuxInt)
28720 v.reset(OpRsh32x64)
28721 v0 := b.NewValue0(v.Pos, OpConst64, t)
28722 v0.AuxInt = int64ToAuxInt(int64(uint32(c)))
28723 v.AddArg2(x, v0)
28724 return true
28725 }
28726
28727
28728 for {
28729 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
28730 break
28731 }
28732 v.reset(OpConst32)
28733 v.AuxInt = int32ToAuxInt(0)
28734 return true
28735 }
28736 return false
28737 }
28738 func rewriteValuegeneric_OpRsh32x64(v *Value) bool {
28739 v_1 := v.Args[1]
28740 v_0 := v.Args[0]
28741 b := v.Block
28742 typ := &b.Func.Config.Types
28743
28744
28745 for {
28746 if v_0.Op != OpConst32 {
28747 break
28748 }
28749 c := auxIntToInt32(v_0.AuxInt)
28750 if v_1.Op != OpConst64 {
28751 break
28752 }
28753 d := auxIntToInt64(v_1.AuxInt)
28754 v.reset(OpConst32)
28755 v.AuxInt = int32ToAuxInt(c >> uint64(d))
28756 return true
28757 }
28758
28759
28760 for {
28761 x := v_0
28762 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 0 {
28763 break
28764 }
28765 v.copyOf(x)
28766 return true
28767 }
28768
28769
28770 for {
28771 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
28772 break
28773 }
28774 v.reset(OpConst32)
28775 v.AuxInt = int32ToAuxInt(0)
28776 return true
28777 }
28778
28779
28780
28781 for {
28782 t := v.Type
28783 if v_0.Op != OpRsh32x64 {
28784 break
28785 }
28786 _ = v_0.Args[1]
28787 x := v_0.Args[0]
28788 v_0_1 := v_0.Args[1]
28789 if v_0_1.Op != OpConst64 {
28790 break
28791 }
28792 c := auxIntToInt64(v_0_1.AuxInt)
28793 if v_1.Op != OpConst64 {
28794 break
28795 }
28796 d := auxIntToInt64(v_1.AuxInt)
28797 if !(!uaddOvf(c, d)) {
28798 break
28799 }
28800 v.reset(OpRsh32x64)
28801 v0 := b.NewValue0(v.Pos, OpConst64, t)
28802 v0.AuxInt = int64ToAuxInt(c + d)
28803 v.AddArg2(x, v0)
28804 return true
28805 }
28806
28807
28808 for {
28809 if v_0.Op != OpLsh32x64 {
28810 break
28811 }
28812 _ = v_0.Args[1]
28813 x := v_0.Args[0]
28814 v_0_1 := v_0.Args[1]
28815 if v_0_1.Op != OpConst64 || auxIntToInt64(v_0_1.AuxInt) != 24 || v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 24 {
28816 break
28817 }
28818 v.reset(OpSignExt8to32)
28819 v0 := b.NewValue0(v.Pos, OpTrunc32to8, typ.Int8)
28820 v0.AddArg(x)
28821 v.AddArg(v0)
28822 return true
28823 }
28824
28825
28826 for {
28827 if v_0.Op != OpLsh32x64 {
28828 break
28829 }
28830 _ = v_0.Args[1]
28831 x := v_0.Args[0]
28832 v_0_1 := v_0.Args[1]
28833 if v_0_1.Op != OpConst64 || auxIntToInt64(v_0_1.AuxInt) != 16 || v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 16 {
28834 break
28835 }
28836 v.reset(OpSignExt16to32)
28837 v0 := b.NewValue0(v.Pos, OpTrunc32to16, typ.Int16)
28838 v0.AddArg(x)
28839 v.AddArg(v0)
28840 return true
28841 }
28842 return false
28843 }
28844 func rewriteValuegeneric_OpRsh32x8(v *Value) bool {
28845 v_1 := v.Args[1]
28846 v_0 := v.Args[0]
28847 b := v.Block
28848
28849
28850 for {
28851 t := v.Type
28852 x := v_0
28853 if v_1.Op != OpConst8 {
28854 break
28855 }
28856 c := auxIntToInt8(v_1.AuxInt)
28857 v.reset(OpRsh32x64)
28858 v0 := b.NewValue0(v.Pos, OpConst64, t)
28859 v0.AuxInt = int64ToAuxInt(int64(uint8(c)))
28860 v.AddArg2(x, v0)
28861 return true
28862 }
28863
28864
28865 for {
28866 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
28867 break
28868 }
28869 v.reset(OpConst32)
28870 v.AuxInt = int32ToAuxInt(0)
28871 return true
28872 }
28873 return false
28874 }
28875 func rewriteValuegeneric_OpRsh64Ux16(v *Value) bool {
28876 v_1 := v.Args[1]
28877 v_0 := v.Args[0]
28878 b := v.Block
28879
28880
28881 for {
28882 t := v.Type
28883 x := v_0
28884 if v_1.Op != OpConst16 {
28885 break
28886 }
28887 c := auxIntToInt16(v_1.AuxInt)
28888 v.reset(OpRsh64Ux64)
28889 v0 := b.NewValue0(v.Pos, OpConst64, t)
28890 v0.AuxInt = int64ToAuxInt(int64(uint16(c)))
28891 v.AddArg2(x, v0)
28892 return true
28893 }
28894
28895
28896 for {
28897 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
28898 break
28899 }
28900 v.reset(OpConst64)
28901 v.AuxInt = int64ToAuxInt(0)
28902 return true
28903 }
28904 return false
28905 }
28906 func rewriteValuegeneric_OpRsh64Ux32(v *Value) bool {
28907 v_1 := v.Args[1]
28908 v_0 := v.Args[0]
28909 b := v.Block
28910
28911
28912 for {
28913 t := v.Type
28914 x := v_0
28915 if v_1.Op != OpConst32 {
28916 break
28917 }
28918 c := auxIntToInt32(v_1.AuxInt)
28919 v.reset(OpRsh64Ux64)
28920 v0 := b.NewValue0(v.Pos, OpConst64, t)
28921 v0.AuxInt = int64ToAuxInt(int64(uint32(c)))
28922 v.AddArg2(x, v0)
28923 return true
28924 }
28925
28926
28927 for {
28928 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
28929 break
28930 }
28931 v.reset(OpConst64)
28932 v.AuxInt = int64ToAuxInt(0)
28933 return true
28934 }
28935 return false
28936 }
28937 func rewriteValuegeneric_OpRsh64Ux64(v *Value) bool {
28938 v_1 := v.Args[1]
28939 v_0 := v.Args[0]
28940 b := v.Block
28941 typ := &b.Func.Config.Types
28942
28943
28944 for {
28945 if v_0.Op != OpConst64 {
28946 break
28947 }
28948 c := auxIntToInt64(v_0.AuxInt)
28949 if v_1.Op != OpConst64 {
28950 break
28951 }
28952 d := auxIntToInt64(v_1.AuxInt)
28953 v.reset(OpConst64)
28954 v.AuxInt = int64ToAuxInt(int64(uint64(c) >> uint64(d)))
28955 return true
28956 }
28957
28958
28959 for {
28960 x := v_0
28961 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 0 {
28962 break
28963 }
28964 v.copyOf(x)
28965 return true
28966 }
28967
28968
28969 for {
28970 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
28971 break
28972 }
28973 v.reset(OpConst64)
28974 v.AuxInt = int64ToAuxInt(0)
28975 return true
28976 }
28977
28978
28979
28980 for {
28981 if v_1.Op != OpConst64 {
28982 break
28983 }
28984 c := auxIntToInt64(v_1.AuxInt)
28985 if !(uint64(c) >= 64) {
28986 break
28987 }
28988 v.reset(OpConst64)
28989 v.AuxInt = int64ToAuxInt(0)
28990 return true
28991 }
28992
28993
28994
28995 for {
28996 t := v.Type
28997 if v_0.Op != OpRsh64Ux64 {
28998 break
28999 }
29000 _ = v_0.Args[1]
29001 x := v_0.Args[0]
29002 v_0_1 := v_0.Args[1]
29003 if v_0_1.Op != OpConst64 {
29004 break
29005 }
29006 c := auxIntToInt64(v_0_1.AuxInt)
29007 if v_1.Op != OpConst64 {
29008 break
29009 }
29010 d := auxIntToInt64(v_1.AuxInt)
29011 if !(!uaddOvf(c, d)) {
29012 break
29013 }
29014 v.reset(OpRsh64Ux64)
29015 v0 := b.NewValue0(v.Pos, OpConst64, t)
29016 v0.AuxInt = int64ToAuxInt(c + d)
29017 v.AddArg2(x, v0)
29018 return true
29019 }
29020
29021
29022 for {
29023 if v_0.Op != OpRsh64x64 {
29024 break
29025 }
29026 x := v_0.Args[0]
29027 if v_1.Op != OpConst64 {
29028 break
29029 }
29030 t := v_1.Type
29031 if auxIntToInt64(v_1.AuxInt) != 63 {
29032 break
29033 }
29034 v.reset(OpRsh64Ux64)
29035 v0 := b.NewValue0(v.Pos, OpConst64, t)
29036 v0.AuxInt = int64ToAuxInt(63)
29037 v.AddArg2(x, v0)
29038 return true
29039 }
29040
29041
29042
29043 for {
29044 i := v_0
29045 if i.Op != OpLsh64x64 {
29046 break
29047 }
29048 _ = i.Args[1]
29049 x := i.Args[0]
29050 i_1 := i.Args[1]
29051 if i_1.Op != OpConst64 {
29052 break
29053 }
29054 c := auxIntToInt64(i_1.AuxInt)
29055 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != c || !(c >= 0 && c < 64 && i.Uses == 1) {
29056 break
29057 }
29058 v.reset(OpAnd64)
29059 v0 := b.NewValue0(v.Pos, OpConst64, v.Type)
29060 v0.AuxInt = int64ToAuxInt(int64(^uint64(0) >> c))
29061 v.AddArg2(x, v0)
29062 return true
29063 }
29064
29065
29066
29067 for {
29068 if v_0.Op != OpLsh64x64 {
29069 break
29070 }
29071 _ = v_0.Args[1]
29072 v_0_0 := v_0.Args[0]
29073 if v_0_0.Op != OpRsh64Ux64 {
29074 break
29075 }
29076 _ = v_0_0.Args[1]
29077 x := v_0_0.Args[0]
29078 v_0_0_1 := v_0_0.Args[1]
29079 if v_0_0_1.Op != OpConst64 {
29080 break
29081 }
29082 c1 := auxIntToInt64(v_0_0_1.AuxInt)
29083 v_0_1 := v_0.Args[1]
29084 if v_0_1.Op != OpConst64 {
29085 break
29086 }
29087 c2 := auxIntToInt64(v_0_1.AuxInt)
29088 if v_1.Op != OpConst64 {
29089 break
29090 }
29091 c3 := auxIntToInt64(v_1.AuxInt)
29092 if !(uint64(c1) >= uint64(c2) && uint64(c3) >= uint64(c2) && !uaddOvf(c1-c2, c3)) {
29093 break
29094 }
29095 v.reset(OpRsh64Ux64)
29096 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
29097 v0.AuxInt = int64ToAuxInt(c1 - c2 + c3)
29098 v.AddArg2(x, v0)
29099 return true
29100 }
29101
29102
29103 for {
29104 if v_0.Op != OpLsh64x64 {
29105 break
29106 }
29107 _ = v_0.Args[1]
29108 x := v_0.Args[0]
29109 v_0_1 := v_0.Args[1]
29110 if v_0_1.Op != OpConst64 || auxIntToInt64(v_0_1.AuxInt) != 56 || v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 56 {
29111 break
29112 }
29113 v.reset(OpZeroExt8to64)
29114 v0 := b.NewValue0(v.Pos, OpTrunc64to8, typ.UInt8)
29115 v0.AddArg(x)
29116 v.AddArg(v0)
29117 return true
29118 }
29119
29120
29121 for {
29122 if v_0.Op != OpLsh64x64 {
29123 break
29124 }
29125 _ = v_0.Args[1]
29126 x := v_0.Args[0]
29127 v_0_1 := v_0.Args[1]
29128 if v_0_1.Op != OpConst64 || auxIntToInt64(v_0_1.AuxInt) != 48 || v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 48 {
29129 break
29130 }
29131 v.reset(OpZeroExt16to64)
29132 v0 := b.NewValue0(v.Pos, OpTrunc64to16, typ.UInt16)
29133 v0.AddArg(x)
29134 v.AddArg(v0)
29135 return true
29136 }
29137
29138
29139 for {
29140 if v_0.Op != OpLsh64x64 {
29141 break
29142 }
29143 _ = v_0.Args[1]
29144 x := v_0.Args[0]
29145 v_0_1 := v_0.Args[1]
29146 if v_0_1.Op != OpConst64 || auxIntToInt64(v_0_1.AuxInt) != 32 || v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 32 {
29147 break
29148 }
29149 v.reset(OpZeroExt32to64)
29150 v0 := b.NewValue0(v.Pos, OpTrunc64to32, typ.UInt32)
29151 v0.AddArg(x)
29152 v.AddArg(v0)
29153 return true
29154 }
29155 return false
29156 }
29157 func rewriteValuegeneric_OpRsh64Ux8(v *Value) bool {
29158 v_1 := v.Args[1]
29159 v_0 := v.Args[0]
29160 b := v.Block
29161
29162
29163 for {
29164 t := v.Type
29165 x := v_0
29166 if v_1.Op != OpConst8 {
29167 break
29168 }
29169 c := auxIntToInt8(v_1.AuxInt)
29170 v.reset(OpRsh64Ux64)
29171 v0 := b.NewValue0(v.Pos, OpConst64, t)
29172 v0.AuxInt = int64ToAuxInt(int64(uint8(c)))
29173 v.AddArg2(x, v0)
29174 return true
29175 }
29176
29177
29178 for {
29179 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
29180 break
29181 }
29182 v.reset(OpConst64)
29183 v.AuxInt = int64ToAuxInt(0)
29184 return true
29185 }
29186 return false
29187 }
29188 func rewriteValuegeneric_OpRsh64x16(v *Value) bool {
29189 v_1 := v.Args[1]
29190 v_0 := v.Args[0]
29191 b := v.Block
29192
29193
29194 for {
29195 t := v.Type
29196 x := v_0
29197 if v_1.Op != OpConst16 {
29198 break
29199 }
29200 c := auxIntToInt16(v_1.AuxInt)
29201 v.reset(OpRsh64x64)
29202 v0 := b.NewValue0(v.Pos, OpConst64, t)
29203 v0.AuxInt = int64ToAuxInt(int64(uint16(c)))
29204 v.AddArg2(x, v0)
29205 return true
29206 }
29207
29208
29209 for {
29210 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
29211 break
29212 }
29213 v.reset(OpConst64)
29214 v.AuxInt = int64ToAuxInt(0)
29215 return true
29216 }
29217 return false
29218 }
29219 func rewriteValuegeneric_OpRsh64x32(v *Value) bool {
29220 v_1 := v.Args[1]
29221 v_0 := v.Args[0]
29222 b := v.Block
29223
29224
29225 for {
29226 t := v.Type
29227 x := v_0
29228 if v_1.Op != OpConst32 {
29229 break
29230 }
29231 c := auxIntToInt32(v_1.AuxInt)
29232 v.reset(OpRsh64x64)
29233 v0 := b.NewValue0(v.Pos, OpConst64, t)
29234 v0.AuxInt = int64ToAuxInt(int64(uint32(c)))
29235 v.AddArg2(x, v0)
29236 return true
29237 }
29238
29239
29240 for {
29241 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
29242 break
29243 }
29244 v.reset(OpConst64)
29245 v.AuxInt = int64ToAuxInt(0)
29246 return true
29247 }
29248 return false
29249 }
29250 func rewriteValuegeneric_OpRsh64x64(v *Value) bool {
29251 v_1 := v.Args[1]
29252 v_0 := v.Args[0]
29253 b := v.Block
29254 typ := &b.Func.Config.Types
29255
29256
29257 for {
29258 if v_0.Op != OpConst64 {
29259 break
29260 }
29261 c := auxIntToInt64(v_0.AuxInt)
29262 if v_1.Op != OpConst64 {
29263 break
29264 }
29265 d := auxIntToInt64(v_1.AuxInt)
29266 v.reset(OpConst64)
29267 v.AuxInt = int64ToAuxInt(c >> uint64(d))
29268 return true
29269 }
29270
29271
29272 for {
29273 x := v_0
29274 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 0 {
29275 break
29276 }
29277 v.copyOf(x)
29278 return true
29279 }
29280
29281
29282 for {
29283 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
29284 break
29285 }
29286 v.reset(OpConst64)
29287 v.AuxInt = int64ToAuxInt(0)
29288 return true
29289 }
29290
29291
29292
29293 for {
29294 t := v.Type
29295 if v_0.Op != OpRsh64x64 {
29296 break
29297 }
29298 _ = v_0.Args[1]
29299 x := v_0.Args[0]
29300 v_0_1 := v_0.Args[1]
29301 if v_0_1.Op != OpConst64 {
29302 break
29303 }
29304 c := auxIntToInt64(v_0_1.AuxInt)
29305 if v_1.Op != OpConst64 {
29306 break
29307 }
29308 d := auxIntToInt64(v_1.AuxInt)
29309 if !(!uaddOvf(c, d)) {
29310 break
29311 }
29312 v.reset(OpRsh64x64)
29313 v0 := b.NewValue0(v.Pos, OpConst64, t)
29314 v0.AuxInt = int64ToAuxInt(c + d)
29315 v.AddArg2(x, v0)
29316 return true
29317 }
29318
29319
29320 for {
29321 if v_0.Op != OpLsh64x64 {
29322 break
29323 }
29324 _ = v_0.Args[1]
29325 x := v_0.Args[0]
29326 v_0_1 := v_0.Args[1]
29327 if v_0_1.Op != OpConst64 || auxIntToInt64(v_0_1.AuxInt) != 56 || v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 56 {
29328 break
29329 }
29330 v.reset(OpSignExt8to64)
29331 v0 := b.NewValue0(v.Pos, OpTrunc64to8, typ.Int8)
29332 v0.AddArg(x)
29333 v.AddArg(v0)
29334 return true
29335 }
29336
29337
29338 for {
29339 if v_0.Op != OpLsh64x64 {
29340 break
29341 }
29342 _ = v_0.Args[1]
29343 x := v_0.Args[0]
29344 v_0_1 := v_0.Args[1]
29345 if v_0_1.Op != OpConst64 || auxIntToInt64(v_0_1.AuxInt) != 48 || v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 48 {
29346 break
29347 }
29348 v.reset(OpSignExt16to64)
29349 v0 := b.NewValue0(v.Pos, OpTrunc64to16, typ.Int16)
29350 v0.AddArg(x)
29351 v.AddArg(v0)
29352 return true
29353 }
29354
29355
29356 for {
29357 if v_0.Op != OpLsh64x64 {
29358 break
29359 }
29360 _ = v_0.Args[1]
29361 x := v_0.Args[0]
29362 v_0_1 := v_0.Args[1]
29363 if v_0_1.Op != OpConst64 || auxIntToInt64(v_0_1.AuxInt) != 32 || v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 32 {
29364 break
29365 }
29366 v.reset(OpSignExt32to64)
29367 v0 := b.NewValue0(v.Pos, OpTrunc64to32, typ.Int32)
29368 v0.AddArg(x)
29369 v.AddArg(v0)
29370 return true
29371 }
29372 return false
29373 }
29374 func rewriteValuegeneric_OpRsh64x8(v *Value) bool {
29375 v_1 := v.Args[1]
29376 v_0 := v.Args[0]
29377 b := v.Block
29378
29379
29380 for {
29381 t := v.Type
29382 x := v_0
29383 if v_1.Op != OpConst8 {
29384 break
29385 }
29386 c := auxIntToInt8(v_1.AuxInt)
29387 v.reset(OpRsh64x64)
29388 v0 := b.NewValue0(v.Pos, OpConst64, t)
29389 v0.AuxInt = int64ToAuxInt(int64(uint8(c)))
29390 v.AddArg2(x, v0)
29391 return true
29392 }
29393
29394
29395 for {
29396 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
29397 break
29398 }
29399 v.reset(OpConst64)
29400 v.AuxInt = int64ToAuxInt(0)
29401 return true
29402 }
29403 return false
29404 }
29405 func rewriteValuegeneric_OpRsh8Ux16(v *Value) bool {
29406 v_1 := v.Args[1]
29407 v_0 := v.Args[0]
29408 b := v.Block
29409
29410
29411 for {
29412 t := v.Type
29413 x := v_0
29414 if v_1.Op != OpConst16 {
29415 break
29416 }
29417 c := auxIntToInt16(v_1.AuxInt)
29418 v.reset(OpRsh8Ux64)
29419 v0 := b.NewValue0(v.Pos, OpConst64, t)
29420 v0.AuxInt = int64ToAuxInt(int64(uint16(c)))
29421 v.AddArg2(x, v0)
29422 return true
29423 }
29424
29425
29426 for {
29427 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 {
29428 break
29429 }
29430 v.reset(OpConst8)
29431 v.AuxInt = int8ToAuxInt(0)
29432 return true
29433 }
29434 return false
29435 }
29436 func rewriteValuegeneric_OpRsh8Ux32(v *Value) bool {
29437 v_1 := v.Args[1]
29438 v_0 := v.Args[0]
29439 b := v.Block
29440
29441
29442 for {
29443 t := v.Type
29444 x := v_0
29445 if v_1.Op != OpConst32 {
29446 break
29447 }
29448 c := auxIntToInt32(v_1.AuxInt)
29449 v.reset(OpRsh8Ux64)
29450 v0 := b.NewValue0(v.Pos, OpConst64, t)
29451 v0.AuxInt = int64ToAuxInt(int64(uint32(c)))
29452 v.AddArg2(x, v0)
29453 return true
29454 }
29455
29456
29457 for {
29458 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 {
29459 break
29460 }
29461 v.reset(OpConst8)
29462 v.AuxInt = int8ToAuxInt(0)
29463 return true
29464 }
29465 return false
29466 }
29467 func rewriteValuegeneric_OpRsh8Ux64(v *Value) bool {
29468 v_1 := v.Args[1]
29469 v_0 := v.Args[0]
29470 b := v.Block
29471 typ := &b.Func.Config.Types
29472
29473
29474 for {
29475 if v_0.Op != OpConst8 {
29476 break
29477 }
29478 c := auxIntToInt8(v_0.AuxInt)
29479 if v_1.Op != OpConst64 {
29480 break
29481 }
29482 d := auxIntToInt64(v_1.AuxInt)
29483 v.reset(OpConst8)
29484 v.AuxInt = int8ToAuxInt(int8(uint8(c) >> uint64(d)))
29485 return true
29486 }
29487
29488
29489 for {
29490 x := v_0
29491 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 0 {
29492 break
29493 }
29494 v.copyOf(x)
29495 return true
29496 }
29497
29498
29499 for {
29500 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 {
29501 break
29502 }
29503 v.reset(OpConst8)
29504 v.AuxInt = int8ToAuxInt(0)
29505 return true
29506 }
29507
29508
29509
29510 for {
29511 if v_1.Op != OpConst64 {
29512 break
29513 }
29514 c := auxIntToInt64(v_1.AuxInt)
29515 if !(uint64(c) >= 8) {
29516 break
29517 }
29518 v.reset(OpConst8)
29519 v.AuxInt = int8ToAuxInt(0)
29520 return true
29521 }
29522
29523
29524
29525 for {
29526 t := v.Type
29527 if v_0.Op != OpRsh8Ux64 {
29528 break
29529 }
29530 _ = v_0.Args[1]
29531 x := v_0.Args[0]
29532 v_0_1 := v_0.Args[1]
29533 if v_0_1.Op != OpConst64 {
29534 break
29535 }
29536 c := auxIntToInt64(v_0_1.AuxInt)
29537 if v_1.Op != OpConst64 {
29538 break
29539 }
29540 d := auxIntToInt64(v_1.AuxInt)
29541 if !(!uaddOvf(c, d)) {
29542 break
29543 }
29544 v.reset(OpRsh8Ux64)
29545 v0 := b.NewValue0(v.Pos, OpConst64, t)
29546 v0.AuxInt = int64ToAuxInt(c + d)
29547 v.AddArg2(x, v0)
29548 return true
29549 }
29550
29551
29552 for {
29553 if v_0.Op != OpRsh8x64 {
29554 break
29555 }
29556 x := v_0.Args[0]
29557 if v_1.Op != OpConst64 {
29558 break
29559 }
29560 t := v_1.Type
29561 if auxIntToInt64(v_1.AuxInt) != 7 {
29562 break
29563 }
29564 v.reset(OpRsh8Ux64)
29565 v0 := b.NewValue0(v.Pos, OpConst64, t)
29566 v0.AuxInt = int64ToAuxInt(7)
29567 v.AddArg2(x, v0)
29568 return true
29569 }
29570
29571
29572
29573 for {
29574 i := v_0
29575 if i.Op != OpLsh8x64 {
29576 break
29577 }
29578 _ = i.Args[1]
29579 x := i.Args[0]
29580 i_1 := i.Args[1]
29581 if i_1.Op != OpConst64 {
29582 break
29583 }
29584 c := auxIntToInt64(i_1.AuxInt)
29585 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != c || !(c >= 0 && c < 8 && i.Uses == 1) {
29586 break
29587 }
29588 v.reset(OpAnd8)
29589 v0 := b.NewValue0(v.Pos, OpConst8, v.Type)
29590 v0.AuxInt = int8ToAuxInt(int8(^uint8(0) >> c))
29591 v.AddArg2(x, v0)
29592 return true
29593 }
29594
29595
29596
29597 for {
29598 if v_0.Op != OpLsh8x64 {
29599 break
29600 }
29601 _ = v_0.Args[1]
29602 v_0_0 := v_0.Args[0]
29603 if v_0_0.Op != OpRsh8Ux64 {
29604 break
29605 }
29606 _ = v_0_0.Args[1]
29607 x := v_0_0.Args[0]
29608 v_0_0_1 := v_0_0.Args[1]
29609 if v_0_0_1.Op != OpConst64 {
29610 break
29611 }
29612 c1 := auxIntToInt64(v_0_0_1.AuxInt)
29613 v_0_1 := v_0.Args[1]
29614 if v_0_1.Op != OpConst64 {
29615 break
29616 }
29617 c2 := auxIntToInt64(v_0_1.AuxInt)
29618 if v_1.Op != OpConst64 {
29619 break
29620 }
29621 c3 := auxIntToInt64(v_1.AuxInt)
29622 if !(uint64(c1) >= uint64(c2) && uint64(c3) >= uint64(c2) && !uaddOvf(c1-c2, c3)) {
29623 break
29624 }
29625 v.reset(OpRsh8Ux64)
29626 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
29627 v0.AuxInt = int64ToAuxInt(c1 - c2 + c3)
29628 v.AddArg2(x, v0)
29629 return true
29630 }
29631 return false
29632 }
29633 func rewriteValuegeneric_OpRsh8Ux8(v *Value) bool {
29634 v_1 := v.Args[1]
29635 v_0 := v.Args[0]
29636 b := v.Block
29637
29638
29639 for {
29640 t := v.Type
29641 x := v_0
29642 if v_1.Op != OpConst8 {
29643 break
29644 }
29645 c := auxIntToInt8(v_1.AuxInt)
29646 v.reset(OpRsh8Ux64)
29647 v0 := b.NewValue0(v.Pos, OpConst64, t)
29648 v0.AuxInt = int64ToAuxInt(int64(uint8(c)))
29649 v.AddArg2(x, v0)
29650 return true
29651 }
29652
29653
29654 for {
29655 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 {
29656 break
29657 }
29658 v.reset(OpConst8)
29659 v.AuxInt = int8ToAuxInt(0)
29660 return true
29661 }
29662 return false
29663 }
29664 func rewriteValuegeneric_OpRsh8x16(v *Value) bool {
29665 v_1 := v.Args[1]
29666 v_0 := v.Args[0]
29667 b := v.Block
29668
29669
29670 for {
29671 t := v.Type
29672 x := v_0
29673 if v_1.Op != OpConst16 {
29674 break
29675 }
29676 c := auxIntToInt16(v_1.AuxInt)
29677 v.reset(OpRsh8x64)
29678 v0 := b.NewValue0(v.Pos, OpConst64, t)
29679 v0.AuxInt = int64ToAuxInt(int64(uint16(c)))
29680 v.AddArg2(x, v0)
29681 return true
29682 }
29683
29684
29685 for {
29686 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 {
29687 break
29688 }
29689 v.reset(OpConst8)
29690 v.AuxInt = int8ToAuxInt(0)
29691 return true
29692 }
29693 return false
29694 }
29695 func rewriteValuegeneric_OpRsh8x32(v *Value) bool {
29696 v_1 := v.Args[1]
29697 v_0 := v.Args[0]
29698 b := v.Block
29699
29700
29701 for {
29702 t := v.Type
29703 x := v_0
29704 if v_1.Op != OpConst32 {
29705 break
29706 }
29707 c := auxIntToInt32(v_1.AuxInt)
29708 v.reset(OpRsh8x64)
29709 v0 := b.NewValue0(v.Pos, OpConst64, t)
29710 v0.AuxInt = int64ToAuxInt(int64(uint32(c)))
29711 v.AddArg2(x, v0)
29712 return true
29713 }
29714
29715
29716 for {
29717 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 {
29718 break
29719 }
29720 v.reset(OpConst8)
29721 v.AuxInt = int8ToAuxInt(0)
29722 return true
29723 }
29724 return false
29725 }
29726 func rewriteValuegeneric_OpRsh8x64(v *Value) bool {
29727 v_1 := v.Args[1]
29728 v_0 := v.Args[0]
29729 b := v.Block
29730
29731
29732 for {
29733 if v_0.Op != OpConst8 {
29734 break
29735 }
29736 c := auxIntToInt8(v_0.AuxInt)
29737 if v_1.Op != OpConst64 {
29738 break
29739 }
29740 d := auxIntToInt64(v_1.AuxInt)
29741 v.reset(OpConst8)
29742 v.AuxInt = int8ToAuxInt(c >> uint64(d))
29743 return true
29744 }
29745
29746
29747 for {
29748 x := v_0
29749 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 0 {
29750 break
29751 }
29752 v.copyOf(x)
29753 return true
29754 }
29755
29756
29757 for {
29758 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 {
29759 break
29760 }
29761 v.reset(OpConst8)
29762 v.AuxInt = int8ToAuxInt(0)
29763 return true
29764 }
29765
29766
29767
29768 for {
29769 t := v.Type
29770 if v_0.Op != OpRsh8x64 {
29771 break
29772 }
29773 _ = v_0.Args[1]
29774 x := v_0.Args[0]
29775 v_0_1 := v_0.Args[1]
29776 if v_0_1.Op != OpConst64 {
29777 break
29778 }
29779 c := auxIntToInt64(v_0_1.AuxInt)
29780 if v_1.Op != OpConst64 {
29781 break
29782 }
29783 d := auxIntToInt64(v_1.AuxInt)
29784 if !(!uaddOvf(c, d)) {
29785 break
29786 }
29787 v.reset(OpRsh8x64)
29788 v0 := b.NewValue0(v.Pos, OpConst64, t)
29789 v0.AuxInt = int64ToAuxInt(c + d)
29790 v.AddArg2(x, v0)
29791 return true
29792 }
29793 return false
29794 }
29795 func rewriteValuegeneric_OpRsh8x8(v *Value) bool {
29796 v_1 := v.Args[1]
29797 v_0 := v.Args[0]
29798 b := v.Block
29799
29800
29801 for {
29802 t := v.Type
29803 x := v_0
29804 if v_1.Op != OpConst8 {
29805 break
29806 }
29807 c := auxIntToInt8(v_1.AuxInt)
29808 v.reset(OpRsh8x64)
29809 v0 := b.NewValue0(v.Pos, OpConst64, t)
29810 v0.AuxInt = int64ToAuxInt(int64(uint8(c)))
29811 v.AddArg2(x, v0)
29812 return true
29813 }
29814
29815
29816 for {
29817 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 {
29818 break
29819 }
29820 v.reset(OpConst8)
29821 v.AuxInt = int8ToAuxInt(0)
29822 return true
29823 }
29824 return false
29825 }
29826 func rewriteValuegeneric_OpSelect0(v *Value) bool {
29827 v_0 := v.Args[0]
29828
29829
29830 for {
29831 if v_0.Op != OpMakeTuple {
29832 break
29833 }
29834 x := v_0.Args[0]
29835 v.copyOf(x)
29836 return true
29837 }
29838 return false
29839 }
29840 func rewriteValuegeneric_OpSelect1(v *Value) bool {
29841 v_0 := v.Args[0]
29842
29843
29844 for {
29845 if v_0.Op != OpMakeTuple {
29846 break
29847 }
29848 y := v_0.Args[1]
29849 v.copyOf(y)
29850 return true
29851 }
29852 return false
29853 }
29854 func rewriteValuegeneric_OpSelectN(v *Value) bool {
29855 v_0 := v.Args[0]
29856 b := v.Block
29857 config := b.Func.Config
29858 typ := &b.Func.Config.Types
29859
29860
29861 for {
29862 n := auxIntToInt64(v.AuxInt)
29863 m := v_0
29864 if m.Op != OpMakeResult {
29865 break
29866 }
29867 v.copyOf(m.Args[n])
29868 return true
29869 }
29870
29871
29872
29873 for {
29874 if auxIntToInt64(v.AuxInt) != 0 {
29875 break
29876 }
29877 call := v_0
29878 if call.Op != OpStaticCall || len(call.Args) != 3 {
29879 break
29880 }
29881 sym := auxToCall(call.Aux)
29882 mem := call.Args[2]
29883 sptr := call.Args[0]
29884 call_1 := call.Args[1]
29885 if call_1.Op != OpConst64 {
29886 break
29887 }
29888 c := auxIntToInt64(call_1.AuxInt)
29889 if !(isInlinableMemclr(config, int64(c)) && isSameCall(sym, "runtime.memclrNoHeapPointers") && call.Uses == 1 && clobber(call)) {
29890 break
29891 }
29892 v.reset(OpZero)
29893 v.AuxInt = int64ToAuxInt(int64(c))
29894 v.Aux = typeToAux(types.Types[types.TUINT8])
29895 v.AddArg2(sptr, mem)
29896 return true
29897 }
29898
29899
29900
29901 for {
29902 if auxIntToInt64(v.AuxInt) != 0 {
29903 break
29904 }
29905 call := v_0
29906 if call.Op != OpStaticCall || len(call.Args) != 3 {
29907 break
29908 }
29909 sym := auxToCall(call.Aux)
29910 mem := call.Args[2]
29911 sptr := call.Args[0]
29912 call_1 := call.Args[1]
29913 if call_1.Op != OpConst32 {
29914 break
29915 }
29916 c := auxIntToInt32(call_1.AuxInt)
29917 if !(isInlinableMemclr(config, int64(c)) && isSameCall(sym, "runtime.memclrNoHeapPointers") && call.Uses == 1 && clobber(call)) {
29918 break
29919 }
29920 v.reset(OpZero)
29921 v.AuxInt = int64ToAuxInt(int64(c))
29922 v.Aux = typeToAux(types.Types[types.TUINT8])
29923 v.AddArg2(sptr, mem)
29924 return true
29925 }
29926
29927
29928
29929 for {
29930 if auxIntToInt64(v.AuxInt) != 0 {
29931 break
29932 }
29933 call := v_0
29934 if call.Op != OpStaticCall || len(call.Args) != 1 {
29935 break
29936 }
29937 sym := auxToCall(call.Aux)
29938 s1 := call.Args[0]
29939 if s1.Op != OpStore {
29940 break
29941 }
29942 _ = s1.Args[2]
29943 s1_1 := s1.Args[1]
29944 if s1_1.Op != OpConst64 {
29945 break
29946 }
29947 sz := auxIntToInt64(s1_1.AuxInt)
29948 s2 := s1.Args[2]
29949 if s2.Op != OpStore {
29950 break
29951 }
29952 _ = s2.Args[2]
29953 src := s2.Args[1]
29954 s3 := s2.Args[2]
29955 if s3.Op != OpStore {
29956 break
29957 }
29958 mem := s3.Args[2]
29959 dst := s3.Args[1]
29960 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)) {
29961 break
29962 }
29963 v.reset(OpMove)
29964 v.AuxInt = int64ToAuxInt(int64(sz))
29965 v.Aux = typeToAux(types.Types[types.TUINT8])
29966 v.AddArg3(dst, src, mem)
29967 return true
29968 }
29969
29970
29971
29972 for {
29973 if auxIntToInt64(v.AuxInt) != 0 {
29974 break
29975 }
29976 call := v_0
29977 if call.Op != OpStaticCall || len(call.Args) != 1 {
29978 break
29979 }
29980 sym := auxToCall(call.Aux)
29981 s1 := call.Args[0]
29982 if s1.Op != OpStore {
29983 break
29984 }
29985 _ = s1.Args[2]
29986 s1_1 := s1.Args[1]
29987 if s1_1.Op != OpConst32 {
29988 break
29989 }
29990 sz := auxIntToInt32(s1_1.AuxInt)
29991 s2 := s1.Args[2]
29992 if s2.Op != OpStore {
29993 break
29994 }
29995 _ = s2.Args[2]
29996 src := s2.Args[1]
29997 s3 := s2.Args[2]
29998 if s3.Op != OpStore {
29999 break
30000 }
30001 mem := s3.Args[2]
30002 dst := s3.Args[1]
30003 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)) {
30004 break
30005 }
30006 v.reset(OpMove)
30007 v.AuxInt = int64ToAuxInt(int64(sz))
30008 v.Aux = typeToAux(types.Types[types.TUINT8])
30009 v.AddArg3(dst, src, mem)
30010 return true
30011 }
30012
30013
30014
30015 for {
30016 if auxIntToInt64(v.AuxInt) != 0 {
30017 break
30018 }
30019 call := v_0
30020 if call.Op != OpStaticCall || len(call.Args) != 4 {
30021 break
30022 }
30023 sym := auxToCall(call.Aux)
30024 mem := call.Args[3]
30025 dst := call.Args[0]
30026 src := call.Args[1]
30027 call_2 := call.Args[2]
30028 if call_2.Op != OpConst64 {
30029 break
30030 }
30031 sz := auxIntToInt64(call_2.AuxInt)
30032 if !(sz >= 0 && call.Uses == 1 && isSameCall(sym, "runtime.memmove") && isInlinableMemmove(dst, src, int64(sz), config) && clobber(call)) {
30033 break
30034 }
30035 v.reset(OpMove)
30036 v.AuxInt = int64ToAuxInt(int64(sz))
30037 v.Aux = typeToAux(types.Types[types.TUINT8])
30038 v.AddArg3(dst, src, mem)
30039 return true
30040 }
30041
30042
30043
30044 for {
30045 if auxIntToInt64(v.AuxInt) != 0 {
30046 break
30047 }
30048 call := v_0
30049 if call.Op != OpStaticCall || len(call.Args) != 4 {
30050 break
30051 }
30052 sym := auxToCall(call.Aux)
30053 mem := call.Args[3]
30054 dst := call.Args[0]
30055 src := call.Args[1]
30056 call_2 := call.Args[2]
30057 if call_2.Op != OpConst32 {
30058 break
30059 }
30060 sz := auxIntToInt32(call_2.AuxInt)
30061 if !(sz >= 0 && call.Uses == 1 && isSameCall(sym, "runtime.memmove") && isInlinableMemmove(dst, src, int64(sz), config) && clobber(call)) {
30062 break
30063 }
30064 v.reset(OpMove)
30065 v.AuxInt = int64ToAuxInt(int64(sz))
30066 v.Aux = typeToAux(types.Types[types.TUINT8])
30067 v.AddArg3(dst, src, mem)
30068 return true
30069 }
30070
30071
30072
30073 for {
30074 if auxIntToInt64(v.AuxInt) != 0 {
30075 break
30076 }
30077 call := v_0
30078 if call.Op != OpStaticLECall || len(call.Args) != 4 {
30079 break
30080 }
30081 sym := auxToCall(call.Aux)
30082 mem := call.Args[3]
30083 dst := call.Args[0]
30084 src := call.Args[1]
30085 call_2 := call.Args[2]
30086 if call_2.Op != OpConst64 {
30087 break
30088 }
30089 sz := auxIntToInt64(call_2.AuxInt)
30090 if !(sz >= 0 && call.Uses == 1 && isSameCall(sym, "runtime.memmove") && isInlinableMemmove(dst, src, int64(sz), config) && clobber(call)) {
30091 break
30092 }
30093 v.reset(OpMove)
30094 v.AuxInt = int64ToAuxInt(int64(sz))
30095 v.Aux = typeToAux(types.Types[types.TUINT8])
30096 v.AddArg3(dst, src, mem)
30097 return true
30098 }
30099
30100
30101
30102 for {
30103 if auxIntToInt64(v.AuxInt) != 0 {
30104 break
30105 }
30106 call := v_0
30107 if call.Op != OpStaticLECall || len(call.Args) != 4 {
30108 break
30109 }
30110 sym := auxToCall(call.Aux)
30111 mem := call.Args[3]
30112 dst := call.Args[0]
30113 src := call.Args[1]
30114 call_2 := call.Args[2]
30115 if call_2.Op != OpConst32 {
30116 break
30117 }
30118 sz := auxIntToInt32(call_2.AuxInt)
30119 if !(sz >= 0 && call.Uses == 1 && isSameCall(sym, "runtime.memmove") && isInlinableMemmove(dst, src, int64(sz), config) && clobber(call)) {
30120 break
30121 }
30122 v.reset(OpMove)
30123 v.AuxInt = int64ToAuxInt(int64(sz))
30124 v.Aux = typeToAux(types.Types[types.TUINT8])
30125 v.AddArg3(dst, src, mem)
30126 return true
30127 }
30128
30129
30130
30131 for {
30132 if auxIntToInt64(v.AuxInt) != 0 {
30133 break
30134 }
30135 call := v_0
30136 if call.Op != OpStaticLECall || len(call.Args) != 2 {
30137 break
30138 }
30139 sym := auxToCall(call.Aux)
30140 x := call.Args[1]
30141 if !(needRaceCleanup(sym, call) && clobber(call)) {
30142 break
30143 }
30144 v.copyOf(x)
30145 return true
30146 }
30147
30148
30149
30150 for {
30151 if auxIntToInt64(v.AuxInt) != 0 {
30152 break
30153 }
30154 call := v_0
30155 if call.Op != OpStaticLECall || len(call.Args) != 1 {
30156 break
30157 }
30158 sym := auxToCall(call.Aux)
30159 x := call.Args[0]
30160 if !(needRaceCleanup(sym, call) && clobber(call)) {
30161 break
30162 }
30163 v.copyOf(x)
30164 return true
30165 }
30166
30167
30168
30169 for {
30170 if auxIntToInt64(v.AuxInt) != 1 || v_0.Op != OpStaticCall || len(v_0.Args) != 6 {
30171 break
30172 }
30173 sym := auxToCall(v_0.Aux)
30174 _ = v_0.Args[1]
30175 newLen := v_0.Args[1]
30176 if newLen.Op != OpConst64 || !(v.Type.IsInteger() && isSameCall(sym, "runtime.growslice")) {
30177 break
30178 }
30179 v.copyOf(newLen)
30180 return true
30181 }
30182
30183
30184
30185 for {
30186 if auxIntToInt64(v.AuxInt) != 1 || v_0.Op != OpStaticCall || len(v_0.Args) != 6 {
30187 break
30188 }
30189 sym := auxToCall(v_0.Aux)
30190 _ = v_0.Args[1]
30191 newLen := v_0.Args[1]
30192 if newLen.Op != OpConst32 || !(v.Type.IsInteger() && isSameCall(sym, "runtime.growslice")) {
30193 break
30194 }
30195 v.copyOf(newLen)
30196 return true
30197 }
30198
30199
30200
30201 for {
30202 if auxIntToInt64(v.AuxInt) != 0 || v_0.Op != OpStaticLECall || len(v_0.Args) != 3 {
30203 break
30204 }
30205 f := auxToCall(v_0.Aux)
30206 _ = v_0.Args[2]
30207 x := v_0.Args[0]
30208 y := v_0.Args[1]
30209 v_0_2 := v_0.Args[2]
30210 if v_0_2.Op != OpSelectN || auxIntToInt64(v_0_2.AuxInt) != 1 {
30211 break
30212 }
30213 c := v_0_2.Args[0]
30214 if c.Op != OpStaticLECall || len(c.Args) != 3 {
30215 break
30216 }
30217 g := auxToCall(c.Aux)
30218 if x != c.Args[0] || y != c.Args[1] || !(isSameCall(f, "runtime.cmpstring") && isSameCall(g, "runtime.cmpstring")) {
30219 break
30220 }
30221 b = c.Block
30222 v0 := b.NewValue0(v.Pos, OpSelectN, typ.Int)
30223 v.copyOf(v0)
30224 v0.AuxInt = int64ToAuxInt(0)
30225 v0.AddArg(c)
30226 return true
30227 }
30228
30229
30230
30231 for {
30232 if auxIntToInt64(v.AuxInt) != 1 {
30233 break
30234 }
30235 c := v_0
30236 if c.Op != OpStaticLECall || len(c.Args) != 3 {
30237 break
30238 }
30239 f := auxToCall(c.Aux)
30240 mem := c.Args[2]
30241 if !(c.Uses == 1 && isSameCall(f, "runtime.cmpstring") && clobber(c)) {
30242 break
30243 }
30244 v.copyOf(mem)
30245 return true
30246 }
30247 return false
30248 }
30249 func rewriteValuegeneric_OpSignExt16to32(v *Value) bool {
30250 v_0 := v.Args[0]
30251
30252
30253 for {
30254 if v_0.Op != OpConst16 {
30255 break
30256 }
30257 c := auxIntToInt16(v_0.AuxInt)
30258 v.reset(OpConst32)
30259 v.AuxInt = int32ToAuxInt(int32(c))
30260 return true
30261 }
30262
30263
30264
30265 for {
30266 if v_0.Op != OpTrunc32to16 {
30267 break
30268 }
30269 x := v_0.Args[0]
30270 if x.Op != OpRsh32x64 {
30271 break
30272 }
30273 _ = x.Args[1]
30274 x_1 := x.Args[1]
30275 if x_1.Op != OpConst64 {
30276 break
30277 }
30278 s := auxIntToInt64(x_1.AuxInt)
30279 if !(s >= 16) {
30280 break
30281 }
30282 v.copyOf(x)
30283 return true
30284 }
30285 return false
30286 }
30287 func rewriteValuegeneric_OpSignExt16to64(v *Value) bool {
30288 v_0 := v.Args[0]
30289
30290
30291 for {
30292 if v_0.Op != OpConst16 {
30293 break
30294 }
30295 c := auxIntToInt16(v_0.AuxInt)
30296 v.reset(OpConst64)
30297 v.AuxInt = int64ToAuxInt(int64(c))
30298 return true
30299 }
30300
30301
30302
30303 for {
30304 if v_0.Op != OpTrunc64to16 {
30305 break
30306 }
30307 x := v_0.Args[0]
30308 if x.Op != OpRsh64x64 {
30309 break
30310 }
30311 _ = x.Args[1]
30312 x_1 := x.Args[1]
30313 if x_1.Op != OpConst64 {
30314 break
30315 }
30316 s := auxIntToInt64(x_1.AuxInt)
30317 if !(s >= 48) {
30318 break
30319 }
30320 v.copyOf(x)
30321 return true
30322 }
30323 return false
30324 }
30325 func rewriteValuegeneric_OpSignExt32to64(v *Value) bool {
30326 v_0 := v.Args[0]
30327
30328
30329 for {
30330 if v_0.Op != OpConst32 {
30331 break
30332 }
30333 c := auxIntToInt32(v_0.AuxInt)
30334 v.reset(OpConst64)
30335 v.AuxInt = int64ToAuxInt(int64(c))
30336 return true
30337 }
30338
30339
30340
30341 for {
30342 if v_0.Op != OpTrunc64to32 {
30343 break
30344 }
30345 x := v_0.Args[0]
30346 if x.Op != OpRsh64x64 {
30347 break
30348 }
30349 _ = x.Args[1]
30350 x_1 := x.Args[1]
30351 if x_1.Op != OpConst64 {
30352 break
30353 }
30354 s := auxIntToInt64(x_1.AuxInt)
30355 if !(s >= 32) {
30356 break
30357 }
30358 v.copyOf(x)
30359 return true
30360 }
30361 return false
30362 }
30363 func rewriteValuegeneric_OpSignExt8to16(v *Value) bool {
30364 v_0 := v.Args[0]
30365
30366
30367 for {
30368 if v_0.Op != OpConst8 {
30369 break
30370 }
30371 c := auxIntToInt8(v_0.AuxInt)
30372 v.reset(OpConst16)
30373 v.AuxInt = int16ToAuxInt(int16(c))
30374 return true
30375 }
30376
30377
30378
30379 for {
30380 if v_0.Op != OpTrunc16to8 {
30381 break
30382 }
30383 x := v_0.Args[0]
30384 if x.Op != OpRsh16x64 {
30385 break
30386 }
30387 _ = x.Args[1]
30388 x_1 := x.Args[1]
30389 if x_1.Op != OpConst64 {
30390 break
30391 }
30392 s := auxIntToInt64(x_1.AuxInt)
30393 if !(s >= 8) {
30394 break
30395 }
30396 v.copyOf(x)
30397 return true
30398 }
30399 return false
30400 }
30401 func rewriteValuegeneric_OpSignExt8to32(v *Value) bool {
30402 v_0 := v.Args[0]
30403
30404
30405 for {
30406 if v_0.Op != OpConst8 {
30407 break
30408 }
30409 c := auxIntToInt8(v_0.AuxInt)
30410 v.reset(OpConst32)
30411 v.AuxInt = int32ToAuxInt(int32(c))
30412 return true
30413 }
30414
30415
30416
30417 for {
30418 if v_0.Op != OpTrunc32to8 {
30419 break
30420 }
30421 x := v_0.Args[0]
30422 if x.Op != OpRsh32x64 {
30423 break
30424 }
30425 _ = x.Args[1]
30426 x_1 := x.Args[1]
30427 if x_1.Op != OpConst64 {
30428 break
30429 }
30430 s := auxIntToInt64(x_1.AuxInt)
30431 if !(s >= 24) {
30432 break
30433 }
30434 v.copyOf(x)
30435 return true
30436 }
30437 return false
30438 }
30439 func rewriteValuegeneric_OpSignExt8to64(v *Value) bool {
30440 v_0 := v.Args[0]
30441
30442
30443 for {
30444 if v_0.Op != OpConst8 {
30445 break
30446 }
30447 c := auxIntToInt8(v_0.AuxInt)
30448 v.reset(OpConst64)
30449 v.AuxInt = int64ToAuxInt(int64(c))
30450 return true
30451 }
30452
30453
30454
30455 for {
30456 if v_0.Op != OpTrunc64to8 {
30457 break
30458 }
30459 x := v_0.Args[0]
30460 if x.Op != OpRsh64x64 {
30461 break
30462 }
30463 _ = x.Args[1]
30464 x_1 := x.Args[1]
30465 if x_1.Op != OpConst64 {
30466 break
30467 }
30468 s := auxIntToInt64(x_1.AuxInt)
30469 if !(s >= 56) {
30470 break
30471 }
30472 v.copyOf(x)
30473 return true
30474 }
30475 return false
30476 }
30477 func rewriteValuegeneric_OpSliceCap(v *Value) bool {
30478 v_0 := v.Args[0]
30479
30480
30481 for {
30482 if v_0.Op != OpSliceMake {
30483 break
30484 }
30485 _ = v_0.Args[2]
30486 v_0_2 := v_0.Args[2]
30487 if v_0_2.Op != OpConst64 {
30488 break
30489 }
30490 t := v_0_2.Type
30491 c := auxIntToInt64(v_0_2.AuxInt)
30492 v.reset(OpConst64)
30493 v.Type = t
30494 v.AuxInt = int64ToAuxInt(c)
30495 return true
30496 }
30497
30498
30499 for {
30500 if v_0.Op != OpSliceMake {
30501 break
30502 }
30503 _ = v_0.Args[2]
30504 v_0_2 := v_0.Args[2]
30505 if v_0_2.Op != OpConst32 {
30506 break
30507 }
30508 t := v_0_2.Type
30509 c := auxIntToInt32(v_0_2.AuxInt)
30510 v.reset(OpConst32)
30511 v.Type = t
30512 v.AuxInt = int32ToAuxInt(c)
30513 return true
30514 }
30515
30516
30517 for {
30518 if v_0.Op != OpSliceMake {
30519 break
30520 }
30521 _ = v_0.Args[2]
30522 v_0_2 := v_0.Args[2]
30523 if v_0_2.Op != OpSliceCap {
30524 break
30525 }
30526 x := v_0_2.Args[0]
30527 v.reset(OpSliceCap)
30528 v.AddArg(x)
30529 return true
30530 }
30531
30532
30533 for {
30534 if v_0.Op != OpSliceMake {
30535 break
30536 }
30537 _ = v_0.Args[2]
30538 v_0_2 := v_0.Args[2]
30539 if v_0_2.Op != OpSliceLen {
30540 break
30541 }
30542 x := v_0_2.Args[0]
30543 v.reset(OpSliceLen)
30544 v.AddArg(x)
30545 return true
30546 }
30547 return false
30548 }
30549 func rewriteValuegeneric_OpSliceLen(v *Value) bool {
30550 v_0 := v.Args[0]
30551
30552
30553 for {
30554 if v_0.Op != OpSliceMake {
30555 break
30556 }
30557 _ = v_0.Args[1]
30558 v_0_1 := v_0.Args[1]
30559 if v_0_1.Op != OpConst64 {
30560 break
30561 }
30562 t := v_0_1.Type
30563 c := auxIntToInt64(v_0_1.AuxInt)
30564 v.reset(OpConst64)
30565 v.Type = t
30566 v.AuxInt = int64ToAuxInt(c)
30567 return true
30568 }
30569
30570
30571 for {
30572 if v_0.Op != OpSliceMake {
30573 break
30574 }
30575 _ = v_0.Args[1]
30576 v_0_1 := v_0.Args[1]
30577 if v_0_1.Op != OpConst32 {
30578 break
30579 }
30580 t := v_0_1.Type
30581 c := auxIntToInt32(v_0_1.AuxInt)
30582 v.reset(OpConst32)
30583 v.Type = t
30584 v.AuxInt = int32ToAuxInt(c)
30585 return true
30586 }
30587
30588
30589 for {
30590 if v_0.Op != OpSliceMake {
30591 break
30592 }
30593 _ = v_0.Args[1]
30594 v_0_1 := v_0.Args[1]
30595 if v_0_1.Op != OpSliceLen {
30596 break
30597 }
30598 x := v_0_1.Args[0]
30599 v.reset(OpSliceLen)
30600 v.AddArg(x)
30601 return true
30602 }
30603
30604
30605
30606 for {
30607 if v_0.Op != OpSelectN || auxIntToInt64(v_0.AuxInt) != 0 {
30608 break
30609 }
30610 v_0_0 := v_0.Args[0]
30611 if v_0_0.Op != OpStaticLECall || len(v_0_0.Args) != 6 {
30612 break
30613 }
30614 sym := auxToCall(v_0_0.Aux)
30615 _ = v_0_0.Args[1]
30616 newLen := v_0_0.Args[1]
30617 if newLen.Op != OpConst64 || !(isSameCall(sym, "runtime.growslice")) {
30618 break
30619 }
30620 v.copyOf(newLen)
30621 return true
30622 }
30623
30624
30625
30626 for {
30627 if v_0.Op != OpSelectN || auxIntToInt64(v_0.AuxInt) != 0 {
30628 break
30629 }
30630 v_0_0 := v_0.Args[0]
30631 if v_0_0.Op != OpStaticLECall || len(v_0_0.Args) != 6 {
30632 break
30633 }
30634 sym := auxToCall(v_0_0.Aux)
30635 _ = v_0_0.Args[1]
30636 newLen := v_0_0.Args[1]
30637 if newLen.Op != OpConst32 || !(isSameCall(sym, "runtime.growslice")) {
30638 break
30639 }
30640 v.copyOf(newLen)
30641 return true
30642 }
30643 return false
30644 }
30645 func rewriteValuegeneric_OpSlicePtr(v *Value) bool {
30646 v_0 := v.Args[0]
30647
30648
30649 for {
30650 if v_0.Op != OpSliceMake {
30651 break
30652 }
30653 v_0_0 := v_0.Args[0]
30654 if v_0_0.Op != OpSlicePtr {
30655 break
30656 }
30657 x := v_0_0.Args[0]
30658 v.reset(OpSlicePtr)
30659 v.AddArg(x)
30660 return true
30661 }
30662 return false
30663 }
30664 func rewriteValuegeneric_OpSlicemask(v *Value) bool {
30665 v_0 := v.Args[0]
30666
30667
30668
30669 for {
30670 if v_0.Op != OpConst32 {
30671 break
30672 }
30673 x := auxIntToInt32(v_0.AuxInt)
30674 if !(x > 0) {
30675 break
30676 }
30677 v.reset(OpConst32)
30678 v.AuxInt = int32ToAuxInt(-1)
30679 return true
30680 }
30681
30682
30683 for {
30684 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
30685 break
30686 }
30687 v.reset(OpConst32)
30688 v.AuxInt = int32ToAuxInt(0)
30689 return true
30690 }
30691
30692
30693
30694 for {
30695 if v_0.Op != OpConst64 {
30696 break
30697 }
30698 x := auxIntToInt64(v_0.AuxInt)
30699 if !(x > 0) {
30700 break
30701 }
30702 v.reset(OpConst64)
30703 v.AuxInt = int64ToAuxInt(-1)
30704 return true
30705 }
30706
30707
30708 for {
30709 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
30710 break
30711 }
30712 v.reset(OpConst64)
30713 v.AuxInt = int64ToAuxInt(0)
30714 return true
30715 }
30716 return false
30717 }
30718 func rewriteValuegeneric_OpSqrt(v *Value) bool {
30719 v_0 := v.Args[0]
30720
30721
30722
30723 for {
30724 if v_0.Op != OpConst64F {
30725 break
30726 }
30727 c := auxIntToFloat64(v_0.AuxInt)
30728 if !(!math.IsNaN(math.Sqrt(c))) {
30729 break
30730 }
30731 v.reset(OpConst64F)
30732 v.AuxInt = float64ToAuxInt(math.Sqrt(c))
30733 return true
30734 }
30735 return false
30736 }
30737 func rewriteValuegeneric_OpStaticCall(v *Value) bool {
30738 b := v.Block
30739 typ := &b.Func.Config.Types
30740
30741
30742
30743 for {
30744 if len(v.Args) != 4 {
30745 break
30746 }
30747 callAux := auxToCall(v.Aux)
30748 mem := v.Args[3]
30749 p := v.Args[0]
30750 q := v.Args[1]
30751 if !(isSameCall(callAux, "runtime.memequal") && isSamePtr(p, q)) {
30752 break
30753 }
30754 v.reset(OpMakeResult)
30755 v0 := b.NewValue0(v.Pos, OpConstBool, typ.Bool)
30756 v0.AuxInt = boolToAuxInt(true)
30757 v.AddArg2(v0, mem)
30758 return true
30759 }
30760 return false
30761 }
30762 func rewriteValuegeneric_OpStaticLECall(v *Value) bool {
30763 b := v.Block
30764 config := b.Func.Config
30765 typ := &b.Func.Config.Types
30766
30767
30768
30769 for {
30770 if len(v.Args) != 4 {
30771 break
30772 }
30773 callAux := auxToCall(v.Aux)
30774 mem := v.Args[3]
30775 sptr := v.Args[0]
30776 v_1 := v.Args[1]
30777 if v_1.Op != OpAddr {
30778 break
30779 }
30780 scon := auxToSym(v_1.Aux)
30781 v_1_0 := v_1.Args[0]
30782 if v_1_0.Op != OpSB {
30783 break
30784 }
30785 v_2 := v.Args[2]
30786 if v_2.Op != OpConst64 || auxIntToInt64(v_2.AuxInt) != 1 || !(isSameCall(callAux, "runtime.memequal") && symIsRO(scon)) {
30787 break
30788 }
30789 v.reset(OpMakeResult)
30790 v0 := b.NewValue0(v.Pos, OpEq8, typ.Bool)
30791 v1 := b.NewValue0(v.Pos, OpLoad, typ.Int8)
30792 v1.AddArg2(sptr, mem)
30793 v2 := b.NewValue0(v.Pos, OpConst8, typ.Int8)
30794 v2.AuxInt = int8ToAuxInt(int8(read8(scon, 0)))
30795 v0.AddArg2(v1, v2)
30796 v.AddArg2(v0, mem)
30797 return true
30798 }
30799
30800
30801
30802 for {
30803 if len(v.Args) != 4 {
30804 break
30805 }
30806 callAux := auxToCall(v.Aux)
30807 mem := v.Args[3]
30808 v_0 := v.Args[0]
30809 if v_0.Op != OpAddr {
30810 break
30811 }
30812 scon := auxToSym(v_0.Aux)
30813 v_0_0 := v_0.Args[0]
30814 if v_0_0.Op != OpSB {
30815 break
30816 }
30817 sptr := v.Args[1]
30818 v_2 := v.Args[2]
30819 if v_2.Op != OpConst64 || auxIntToInt64(v_2.AuxInt) != 1 || !(isSameCall(callAux, "runtime.memequal") && symIsRO(scon)) {
30820 break
30821 }
30822 v.reset(OpMakeResult)
30823 v0 := b.NewValue0(v.Pos, OpEq8, typ.Bool)
30824 v1 := b.NewValue0(v.Pos, OpLoad, typ.Int8)
30825 v1.AddArg2(sptr, mem)
30826 v2 := b.NewValue0(v.Pos, OpConst8, typ.Int8)
30827 v2.AuxInt = int8ToAuxInt(int8(read8(scon, 0)))
30828 v0.AddArg2(v1, v2)
30829 v.AddArg2(v0, mem)
30830 return true
30831 }
30832
30833
30834
30835 for {
30836 if len(v.Args) != 4 {
30837 break
30838 }
30839 callAux := auxToCall(v.Aux)
30840 mem := v.Args[3]
30841 sptr := v.Args[0]
30842 v_1 := v.Args[1]
30843 if v_1.Op != OpAddr {
30844 break
30845 }
30846 scon := auxToSym(v_1.Aux)
30847 v_1_0 := v_1.Args[0]
30848 if v_1_0.Op != OpSB {
30849 break
30850 }
30851 v_2 := v.Args[2]
30852 if v_2.Op != OpConst64 || auxIntToInt64(v_2.AuxInt) != 2 || !(isSameCall(callAux, "runtime.memequal") && symIsRO(scon) && canLoadUnaligned(config)) {
30853 break
30854 }
30855 v.reset(OpMakeResult)
30856 v0 := b.NewValue0(v.Pos, OpEq16, typ.Bool)
30857 v1 := b.NewValue0(v.Pos, OpLoad, typ.Int16)
30858 v1.AddArg2(sptr, mem)
30859 v2 := b.NewValue0(v.Pos, OpConst16, typ.Int16)
30860 v2.AuxInt = int16ToAuxInt(int16(read16(scon, 0, config.ctxt.Arch.ByteOrder)))
30861 v0.AddArg2(v1, v2)
30862 v.AddArg2(v0, mem)
30863 return true
30864 }
30865
30866
30867
30868 for {
30869 if len(v.Args) != 4 {
30870 break
30871 }
30872 callAux := auxToCall(v.Aux)
30873 mem := v.Args[3]
30874 v_0 := v.Args[0]
30875 if v_0.Op != OpAddr {
30876 break
30877 }
30878 scon := auxToSym(v_0.Aux)
30879 v_0_0 := v_0.Args[0]
30880 if v_0_0.Op != OpSB {
30881 break
30882 }
30883 sptr := v.Args[1]
30884 v_2 := v.Args[2]
30885 if v_2.Op != OpConst64 || auxIntToInt64(v_2.AuxInt) != 2 || !(isSameCall(callAux, "runtime.memequal") && symIsRO(scon) && canLoadUnaligned(config)) {
30886 break
30887 }
30888 v.reset(OpMakeResult)
30889 v0 := b.NewValue0(v.Pos, OpEq16, typ.Bool)
30890 v1 := b.NewValue0(v.Pos, OpLoad, typ.Int16)
30891 v1.AddArg2(sptr, mem)
30892 v2 := b.NewValue0(v.Pos, OpConst16, typ.Int16)
30893 v2.AuxInt = int16ToAuxInt(int16(read16(scon, 0, config.ctxt.Arch.ByteOrder)))
30894 v0.AddArg2(v1, v2)
30895 v.AddArg2(v0, mem)
30896 return true
30897 }
30898
30899
30900
30901 for {
30902 if len(v.Args) != 4 {
30903 break
30904 }
30905 callAux := auxToCall(v.Aux)
30906 mem := v.Args[3]
30907 sptr := v.Args[0]
30908 v_1 := v.Args[1]
30909 if v_1.Op != OpAddr {
30910 break
30911 }
30912 scon := auxToSym(v_1.Aux)
30913 v_1_0 := v_1.Args[0]
30914 if v_1_0.Op != OpSB {
30915 break
30916 }
30917 v_2 := v.Args[2]
30918 if v_2.Op != OpConst64 || auxIntToInt64(v_2.AuxInt) != 4 || !(isSameCall(callAux, "runtime.memequal") && symIsRO(scon) && canLoadUnaligned(config)) {
30919 break
30920 }
30921 v.reset(OpMakeResult)
30922 v0 := b.NewValue0(v.Pos, OpEq32, typ.Bool)
30923 v1 := b.NewValue0(v.Pos, OpLoad, typ.Int32)
30924 v1.AddArg2(sptr, mem)
30925 v2 := b.NewValue0(v.Pos, OpConst32, typ.Int32)
30926 v2.AuxInt = int32ToAuxInt(int32(read32(scon, 0, config.ctxt.Arch.ByteOrder)))
30927 v0.AddArg2(v1, v2)
30928 v.AddArg2(v0, mem)
30929 return true
30930 }
30931
30932
30933
30934 for {
30935 if len(v.Args) != 4 {
30936 break
30937 }
30938 callAux := auxToCall(v.Aux)
30939 mem := v.Args[3]
30940 v_0 := v.Args[0]
30941 if v_0.Op != OpAddr {
30942 break
30943 }
30944 scon := auxToSym(v_0.Aux)
30945 v_0_0 := v_0.Args[0]
30946 if v_0_0.Op != OpSB {
30947 break
30948 }
30949 sptr := v.Args[1]
30950 v_2 := v.Args[2]
30951 if v_2.Op != OpConst64 || auxIntToInt64(v_2.AuxInt) != 4 || !(isSameCall(callAux, "runtime.memequal") && symIsRO(scon) && canLoadUnaligned(config)) {
30952 break
30953 }
30954 v.reset(OpMakeResult)
30955 v0 := b.NewValue0(v.Pos, OpEq32, typ.Bool)
30956 v1 := b.NewValue0(v.Pos, OpLoad, typ.Int32)
30957 v1.AddArg2(sptr, mem)
30958 v2 := b.NewValue0(v.Pos, OpConst32, typ.Int32)
30959 v2.AuxInt = int32ToAuxInt(int32(read32(scon, 0, config.ctxt.Arch.ByteOrder)))
30960 v0.AddArg2(v1, v2)
30961 v.AddArg2(v0, mem)
30962 return true
30963 }
30964
30965
30966
30967 for {
30968 if len(v.Args) != 4 {
30969 break
30970 }
30971 callAux := auxToCall(v.Aux)
30972 mem := v.Args[3]
30973 sptr := v.Args[0]
30974 v_1 := v.Args[1]
30975 if v_1.Op != OpAddr {
30976 break
30977 }
30978 scon := auxToSym(v_1.Aux)
30979 v_1_0 := v_1.Args[0]
30980 if v_1_0.Op != OpSB {
30981 break
30982 }
30983 v_2 := v.Args[2]
30984 if v_2.Op != OpConst64 || auxIntToInt64(v_2.AuxInt) != 8 || !(isSameCall(callAux, "runtime.memequal") && symIsRO(scon) && canLoadUnaligned(config) && config.PtrSize == 8) {
30985 break
30986 }
30987 v.reset(OpMakeResult)
30988 v0 := b.NewValue0(v.Pos, OpEq64, typ.Bool)
30989 v1 := b.NewValue0(v.Pos, OpLoad, typ.Int64)
30990 v1.AddArg2(sptr, mem)
30991 v2 := b.NewValue0(v.Pos, OpConst64, typ.Int64)
30992 v2.AuxInt = int64ToAuxInt(int64(read64(scon, 0, config.ctxt.Arch.ByteOrder)))
30993 v0.AddArg2(v1, v2)
30994 v.AddArg2(v0, mem)
30995 return true
30996 }
30997
30998
30999
31000 for {
31001 if len(v.Args) != 4 {
31002 break
31003 }
31004 callAux := auxToCall(v.Aux)
31005 mem := v.Args[3]
31006 v_0 := v.Args[0]
31007 if v_0.Op != OpAddr {
31008 break
31009 }
31010 scon := auxToSym(v_0.Aux)
31011 v_0_0 := v_0.Args[0]
31012 if v_0_0.Op != OpSB {
31013 break
31014 }
31015 sptr := v.Args[1]
31016 v_2 := v.Args[2]
31017 if v_2.Op != OpConst64 || auxIntToInt64(v_2.AuxInt) != 8 || !(isSameCall(callAux, "runtime.memequal") && symIsRO(scon) && canLoadUnaligned(config) && config.PtrSize == 8) {
31018 break
31019 }
31020 v.reset(OpMakeResult)
31021 v0 := b.NewValue0(v.Pos, OpEq64, typ.Bool)
31022 v1 := b.NewValue0(v.Pos, OpLoad, typ.Int64)
31023 v1.AddArg2(sptr, mem)
31024 v2 := b.NewValue0(v.Pos, OpConst64, typ.Int64)
31025 v2.AuxInt = int64ToAuxInt(int64(read64(scon, 0, config.ctxt.Arch.ByteOrder)))
31026 v0.AddArg2(v1, v2)
31027 v.AddArg2(v0, mem)
31028 return true
31029 }
31030
31031
31032
31033 for {
31034 if len(v.Args) != 4 {
31035 break
31036 }
31037 callAux := auxToCall(v.Aux)
31038 mem := v.Args[3]
31039 v_2 := v.Args[2]
31040 if v_2.Op != OpConst64 || auxIntToInt64(v_2.AuxInt) != 0 || !(isSameCall(callAux, "runtime.memequal")) {
31041 break
31042 }
31043 v.reset(OpMakeResult)
31044 v0 := b.NewValue0(v.Pos, OpConstBool, typ.Bool)
31045 v0.AuxInt = boolToAuxInt(true)
31046 v.AddArg2(v0, mem)
31047 return true
31048 }
31049
31050
31051
31052 for {
31053 if len(v.Args) != 4 {
31054 break
31055 }
31056 callAux := auxToCall(v.Aux)
31057 mem := v.Args[3]
31058 p := v.Args[0]
31059 q := v.Args[1]
31060 if !(isSameCall(callAux, "runtime.memequal") && isSamePtr(p, q)) {
31061 break
31062 }
31063 v.reset(OpMakeResult)
31064 v0 := b.NewValue0(v.Pos, OpConstBool, typ.Bool)
31065 v0.AuxInt = boolToAuxInt(true)
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_1 := v.Args[1]
31079 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 0 {
31080 break
31081 }
31082 v_2 := v.Args[2]
31083 if v_2.Op != OpConst64 || auxIntToInt64(v_2.AuxInt) != 0 || !(isSameCall(callAux, "runtime.makeslice")) {
31084 break
31085 }
31086 v.reset(OpMakeResult)
31087 v0 := b.NewValue0(v.Pos, OpAddr, v.Type.FieldType(0))
31088 v0.Aux = symToAux(ir.Syms.Zerobase)
31089 v1 := b.NewValue0(v.Pos, OpSB, typ.Uintptr)
31090 v0.AddArg(v1)
31091 v.AddArg2(v0, mem)
31092 return true
31093 }
31094
31095
31096
31097 for {
31098 if len(v.Args) != 4 {
31099 break
31100 }
31101 callAux := auxToCall(v.Aux)
31102 mem := v.Args[3]
31103 v_1 := v.Args[1]
31104 if v_1.Op != OpConst32 || auxIntToInt32(v_1.AuxInt) != 0 {
31105 break
31106 }
31107 v_2 := v.Args[2]
31108 if v_2.Op != OpConst32 || auxIntToInt32(v_2.AuxInt) != 0 || !(isSameCall(callAux, "runtime.makeslice")) {
31109 break
31110 }
31111 v.reset(OpMakeResult)
31112 v0 := b.NewValue0(v.Pos, OpAddr, v.Type.FieldType(0))
31113 v0.Aux = symToAux(ir.Syms.Zerobase)
31114 v1 := b.NewValue0(v.Pos, OpSB, typ.Uintptr)
31115 v0.AddArg(v1)
31116 v.AddArg2(v0, mem)
31117 return true
31118 }
31119
31120
31121
31122 for {
31123 if len(v.Args) != 4 {
31124 break
31125 }
31126 f := auxToCall(v.Aux)
31127 mem := v.Args[3]
31128 typ_ := v.Args[0]
31129 x := v.Args[1]
31130 y := v.Args[2]
31131 if !(isSameCall(f, "runtime.efaceeq") && isDirectType(typ_) && clobber(v)) {
31132 break
31133 }
31134 v.reset(OpMakeResult)
31135 v0 := b.NewValue0(v.Pos, OpEqPtr, typ.Bool)
31136 v0.AddArg2(x, y)
31137 v.AddArg2(v0, mem)
31138 return true
31139 }
31140
31141
31142
31143 for {
31144 if len(v.Args) != 4 {
31145 break
31146 }
31147 f := auxToCall(v.Aux)
31148 mem := v.Args[3]
31149 itab := v.Args[0]
31150 x := v.Args[1]
31151 y := v.Args[2]
31152 if !(isSameCall(f, "runtime.ifaceeq") && isDirectIface(itab) && clobber(v)) {
31153 break
31154 }
31155 v.reset(OpMakeResult)
31156 v0 := b.NewValue0(v.Pos, OpEqPtr, typ.Bool)
31157 v0.AddArg2(x, y)
31158 v.AddArg2(v0, mem)
31159 return true
31160 }
31161
31162
31163
31164 for {
31165 if len(v.Args) != 4 {
31166 break
31167 }
31168 argsize := auxIntToInt32(v.AuxInt)
31169 f := auxToCall(v.Aux)
31170 _ = v.Args[3]
31171 typ_ := v.Args[0]
31172 map_ := v.Args[1]
31173 key := v.Args[2]
31174 if key.Op != OpSelectN || auxIntToInt64(key.AuxInt) != 0 {
31175 break
31176 }
31177 sbts := key.Args[0]
31178 if sbts.Op != OpStaticLECall || len(sbts.Args) != 4 {
31179 break
31180 }
31181 g := auxToCall(sbts.Aux)
31182 mem := sbts.Args[3]
31183 ptr := sbts.Args[1]
31184 len := sbts.Args[2]
31185 m := v.Args[3]
31186 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)) {
31187 break
31188 }
31189 v.reset(OpStaticLECall)
31190 v.AuxInt = int32ToAuxInt(argsize)
31191 v.Aux = callToAux(f)
31192 v0 := b.NewValue0(v.Pos, OpStringMake, typ.String)
31193 v0.AddArg2(ptr, len)
31194 v.AddArg4(typ_, map_, v0, mem)
31195 return true
31196 }
31197
31198
31199
31200 for {
31201 if len(v.Args) != 3 {
31202 break
31203 }
31204 argsize := auxIntToInt32(v.AuxInt)
31205 f := auxToCall(v.Aux)
31206 _ = v.Args[2]
31207 dict_ := v.Args[0]
31208 key := v.Args[1]
31209 if key.Op != OpSelectN || auxIntToInt64(key.AuxInt) != 0 {
31210 break
31211 }
31212 sbts := key.Args[0]
31213 if sbts.Op != OpStaticLECall || len(sbts.Args) != 4 {
31214 break
31215 }
31216 g := auxToCall(sbts.Aux)
31217 mem := sbts.Args[3]
31218 ptr := sbts.Args[1]
31219 len := sbts.Args[2]
31220 m := v.Args[2]
31221 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)) {
31222 break
31223 }
31224 v.reset(OpStaticLECall)
31225 v.AuxInt = int32ToAuxInt(argsize)
31226 v.Aux = callToAux(f)
31227 v0 := b.NewValue0(v.Pos, OpStringMake, typ.String)
31228 v0.AddArg2(ptr, len)
31229 v.AddArg3(dict_, v0, mem)
31230 return true
31231 }
31232 return false
31233 }
31234 func rewriteValuegeneric_OpStore(v *Value) bool {
31235 v_2 := v.Args[2]
31236 v_1 := v.Args[1]
31237 v_0 := v.Args[0]
31238 b := v.Block
31239
31240
31241
31242 for {
31243 t1 := auxToType(v.Aux)
31244 p1 := v_0
31245 if v_1.Op != OpLoad {
31246 break
31247 }
31248 t2 := v_1.Type
31249 mem := v_1.Args[1]
31250 p2 := v_1.Args[0]
31251 if mem != v_2 || !(isSamePtr(p1, p2) && t2.Size() == t1.Size()) {
31252 break
31253 }
31254 v.copyOf(mem)
31255 return true
31256 }
31257
31258
31259
31260 for {
31261 t1 := auxToType(v.Aux)
31262 p1 := v_0
31263 if v_1.Op != OpLoad {
31264 break
31265 }
31266 t2 := v_1.Type
31267 oldmem := v_1.Args[1]
31268 p2 := v_1.Args[0]
31269 mem := v_2
31270 if mem.Op != OpStore {
31271 break
31272 }
31273 t3 := auxToType(mem.Aux)
31274 _ = mem.Args[2]
31275 p3 := mem.Args[0]
31276 if oldmem != mem.Args[2] || !(isSamePtr(p1, p2) && t2.Size() == t1.Size() && disjoint(p1, t1.Size(), p3, t3.Size())) {
31277 break
31278 }
31279 v.copyOf(mem)
31280 return true
31281 }
31282
31283
31284
31285 for {
31286 t1 := auxToType(v.Aux)
31287 p1 := v_0
31288 if v_1.Op != OpLoad {
31289 break
31290 }
31291 t2 := v_1.Type
31292 oldmem := v_1.Args[1]
31293 p2 := v_1.Args[0]
31294 mem := v_2
31295 if mem.Op != OpStore {
31296 break
31297 }
31298 t3 := auxToType(mem.Aux)
31299 _ = mem.Args[2]
31300 p3 := mem.Args[0]
31301 mem_2 := mem.Args[2]
31302 if mem_2.Op != OpStore {
31303 break
31304 }
31305 t4 := auxToType(mem_2.Aux)
31306 _ = mem_2.Args[2]
31307 p4 := mem_2.Args[0]
31308 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())) {
31309 break
31310 }
31311 v.copyOf(mem)
31312 return true
31313 }
31314
31315
31316
31317 for {
31318 t1 := auxToType(v.Aux)
31319 p1 := v_0
31320 if v_1.Op != OpLoad {
31321 break
31322 }
31323 t2 := v_1.Type
31324 oldmem := v_1.Args[1]
31325 p2 := v_1.Args[0]
31326 mem := v_2
31327 if mem.Op != OpStore {
31328 break
31329 }
31330 t3 := auxToType(mem.Aux)
31331 _ = mem.Args[2]
31332 p3 := mem.Args[0]
31333 mem_2 := mem.Args[2]
31334 if mem_2.Op != OpStore {
31335 break
31336 }
31337 t4 := auxToType(mem_2.Aux)
31338 _ = mem_2.Args[2]
31339 p4 := mem_2.Args[0]
31340 mem_2_2 := mem_2.Args[2]
31341 if mem_2_2.Op != OpStore {
31342 break
31343 }
31344 t5 := auxToType(mem_2_2.Aux)
31345 _ = mem_2_2.Args[2]
31346 p5 := mem_2_2.Args[0]
31347 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())) {
31348 break
31349 }
31350 v.copyOf(mem)
31351 return true
31352 }
31353
31354
31355
31356 for {
31357 t := auxToType(v.Aux)
31358 if v_0.Op != OpOffPtr {
31359 break
31360 }
31361 o := auxIntToInt64(v_0.AuxInt)
31362 p1 := v_0.Args[0]
31363 x := v_1
31364 mem := v_2
31365 if mem.Op != OpZero {
31366 break
31367 }
31368 n := auxIntToInt64(mem.AuxInt)
31369 p2 := mem.Args[0]
31370 if !(isConstZero(x) && o >= 0 && t.Size()+o <= n && isSamePtr(p1, p2)) {
31371 break
31372 }
31373 v.copyOf(mem)
31374 return true
31375 }
31376
31377
31378
31379 for {
31380 t1 := auxToType(v.Aux)
31381 op := v_0
31382 if op.Op != OpOffPtr {
31383 break
31384 }
31385 o1 := auxIntToInt64(op.AuxInt)
31386 p1 := op.Args[0]
31387 x := v_1
31388 mem := v_2
31389 if mem.Op != OpStore {
31390 break
31391 }
31392 t2 := auxToType(mem.Aux)
31393 _ = mem.Args[2]
31394 p2 := mem.Args[0]
31395 mem_2 := mem.Args[2]
31396 if mem_2.Op != OpZero {
31397 break
31398 }
31399 n := auxIntToInt64(mem_2.AuxInt)
31400 p3 := mem_2.Args[0]
31401 if !(isConstZero(x) && o1 >= 0 && t1.Size()+o1 <= n && isSamePtr(p1, p3) && disjoint(op, t1.Size(), p2, t2.Size())) {
31402 break
31403 }
31404 v.copyOf(mem)
31405 return true
31406 }
31407
31408
31409
31410 for {
31411 t1 := auxToType(v.Aux)
31412 op := v_0
31413 if op.Op != OpOffPtr {
31414 break
31415 }
31416 o1 := auxIntToInt64(op.AuxInt)
31417 p1 := op.Args[0]
31418 x := v_1
31419 mem := v_2
31420 if mem.Op != OpStore {
31421 break
31422 }
31423 t2 := auxToType(mem.Aux)
31424 _ = mem.Args[2]
31425 p2 := mem.Args[0]
31426 mem_2 := mem.Args[2]
31427 if mem_2.Op != OpStore {
31428 break
31429 }
31430 t3 := auxToType(mem_2.Aux)
31431 _ = mem_2.Args[2]
31432 p3 := mem_2.Args[0]
31433 mem_2_2 := mem_2.Args[2]
31434 if mem_2_2.Op != OpZero {
31435 break
31436 }
31437 n := auxIntToInt64(mem_2_2.AuxInt)
31438 p4 := mem_2_2.Args[0]
31439 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())) {
31440 break
31441 }
31442 v.copyOf(mem)
31443 return true
31444 }
31445
31446
31447
31448 for {
31449 t1 := auxToType(v.Aux)
31450 op := v_0
31451 if op.Op != OpOffPtr {
31452 break
31453 }
31454 o1 := auxIntToInt64(op.AuxInt)
31455 p1 := op.Args[0]
31456 x := v_1
31457 mem := v_2
31458 if mem.Op != OpStore {
31459 break
31460 }
31461 t2 := auxToType(mem.Aux)
31462 _ = mem.Args[2]
31463 p2 := mem.Args[0]
31464 mem_2 := mem.Args[2]
31465 if mem_2.Op != OpStore {
31466 break
31467 }
31468 t3 := auxToType(mem_2.Aux)
31469 _ = mem_2.Args[2]
31470 p3 := mem_2.Args[0]
31471 mem_2_2 := mem_2.Args[2]
31472 if mem_2_2.Op != OpStore {
31473 break
31474 }
31475 t4 := auxToType(mem_2_2.Aux)
31476 _ = mem_2_2.Args[2]
31477 p4 := mem_2_2.Args[0]
31478 mem_2_2_2 := mem_2_2.Args[2]
31479 if mem_2_2_2.Op != OpZero {
31480 break
31481 }
31482 n := auxIntToInt64(mem_2_2_2.AuxInt)
31483 p5 := mem_2_2_2.Args[0]
31484 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())) {
31485 break
31486 }
31487 v.copyOf(mem)
31488 return true
31489 }
31490
31491
31492 for {
31493 if v_1.Op != OpStructMake {
31494 break
31495 }
31496 v.copyOf(rewriteStructStore(v))
31497 return true
31498 }
31499
31500
31501
31502 for {
31503 t := auxToType(v.Aux)
31504 dst := v_0
31505 if v_1.Op != OpLoad {
31506 break
31507 }
31508 mem := v_1.Args[1]
31509 src := v_1.Args[0]
31510 if mem != v_2 || !(!CanSSA(t)) {
31511 break
31512 }
31513 v.reset(OpMove)
31514 v.AuxInt = int64ToAuxInt(t.Size())
31515 v.Aux = typeToAux(t)
31516 v.AddArg3(dst, src, mem)
31517 return true
31518 }
31519
31520
31521
31522 for {
31523 t := auxToType(v.Aux)
31524 dst := v_0
31525 if v_1.Op != OpLoad {
31526 break
31527 }
31528 mem := v_1.Args[1]
31529 src := v_1.Args[0]
31530 if v_2.Op != OpVarDef {
31531 break
31532 }
31533 x := auxToSym(v_2.Aux)
31534 if mem != v_2.Args[0] || !(!CanSSA(t)) {
31535 break
31536 }
31537 v.reset(OpMove)
31538 v.AuxInt = int64ToAuxInt(t.Size())
31539 v.Aux = typeToAux(t)
31540 v0 := b.NewValue0(v.Pos, OpVarDef, types.TypeMem)
31541 v0.Aux = symToAux(x)
31542 v0.AddArg(mem)
31543 v.AddArg3(dst, src, v0)
31544 return true
31545 }
31546
31547
31548 for {
31549 if v_1.Op != OpArrayMake0 {
31550 break
31551 }
31552 mem := v_2
31553 v.copyOf(mem)
31554 return true
31555 }
31556
31557
31558 for {
31559 dst := v_0
31560 if v_1.Op != OpArrayMake1 {
31561 break
31562 }
31563 e := v_1.Args[0]
31564 mem := v_2
31565 v.reset(OpStore)
31566 v.Aux = typeToAux(e.Type)
31567 v.AddArg3(dst, e, mem)
31568 return true
31569 }
31570
31571
31572
31573 for {
31574 if v_0.Op != OpSelectN || auxIntToInt64(v_0.AuxInt) != 0 {
31575 break
31576 }
31577 call := v_0.Args[0]
31578 if call.Op != OpStaticLECall || len(call.Args) != 2 {
31579 break
31580 }
31581 x := v_1
31582 mem := v_2
31583 if mem.Op != OpSelectN || auxIntToInt64(mem.AuxInt) != 1 || call != mem.Args[0] || !(isConstZero(x) && isSameCall(call.Aux, "runtime.newobject")) {
31584 break
31585 }
31586 v.copyOf(mem)
31587 return true
31588 }
31589
31590
31591
31592 for {
31593 if v_0.Op != OpOffPtr {
31594 break
31595 }
31596 v_0_0 := v_0.Args[0]
31597 if v_0_0.Op != OpSelectN || auxIntToInt64(v_0_0.AuxInt) != 0 {
31598 break
31599 }
31600 call := v_0_0.Args[0]
31601 if call.Op != OpStaticLECall || len(call.Args) != 2 {
31602 break
31603 }
31604 x := v_1
31605 mem := v_2
31606 if mem.Op != OpSelectN || auxIntToInt64(mem.AuxInt) != 1 || call != mem.Args[0] || !(isConstZero(x) && isSameCall(call.Aux, "runtime.newobject")) {
31607 break
31608 }
31609 v.copyOf(mem)
31610 return true
31611 }
31612
31613
31614
31615 for {
31616 t1 := auxToType(v.Aux)
31617 op1 := v_0
31618 if op1.Op != OpOffPtr {
31619 break
31620 }
31621 o1 := auxIntToInt64(op1.AuxInt)
31622 p1 := op1.Args[0]
31623 d1 := v_1
31624 m2 := v_2
31625 if m2.Op != OpStore {
31626 break
31627 }
31628 t2 := auxToType(m2.Aux)
31629 _ = m2.Args[2]
31630 op2 := m2.Args[0]
31631 if op2.Op != OpOffPtr || auxIntToInt64(op2.AuxInt) != 0 {
31632 break
31633 }
31634 p2 := op2.Args[0]
31635 d2 := m2.Args[1]
31636 m3 := m2.Args[2]
31637 if m3.Op != OpMove {
31638 break
31639 }
31640 n := auxIntToInt64(m3.AuxInt)
31641 mem := m3.Args[2]
31642 p3 := m3.Args[0]
31643 if !(m2.Uses == 1 && m3.Uses == 1 && o1 == t2.Size() && n == t2.Size()+t1.Size() && isSamePtr(p1, p2) && isSamePtr(p2, p3) && clobber(m2, m3)) {
31644 break
31645 }
31646 v.reset(OpStore)
31647 v.Aux = typeToAux(t1)
31648 v0 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
31649 v0.Aux = typeToAux(t2)
31650 v0.AddArg3(op2, d2, mem)
31651 v.AddArg3(op1, d1, v0)
31652 return true
31653 }
31654
31655
31656
31657 for {
31658 t1 := auxToType(v.Aux)
31659 op1 := v_0
31660 if op1.Op != OpOffPtr {
31661 break
31662 }
31663 o1 := auxIntToInt64(op1.AuxInt)
31664 p1 := op1.Args[0]
31665 d1 := v_1
31666 m2 := v_2
31667 if m2.Op != OpStore {
31668 break
31669 }
31670 t2 := auxToType(m2.Aux)
31671 _ = m2.Args[2]
31672 op2 := m2.Args[0]
31673 if op2.Op != OpOffPtr {
31674 break
31675 }
31676 o2 := auxIntToInt64(op2.AuxInt)
31677 p2 := op2.Args[0]
31678 d2 := m2.Args[1]
31679 m3 := m2.Args[2]
31680 if m3.Op != OpStore {
31681 break
31682 }
31683 t3 := auxToType(m3.Aux)
31684 _ = m3.Args[2]
31685 op3 := m3.Args[0]
31686 if op3.Op != OpOffPtr || auxIntToInt64(op3.AuxInt) != 0 {
31687 break
31688 }
31689 p3 := op3.Args[0]
31690 d3 := m3.Args[1]
31691 m4 := m3.Args[2]
31692 if m4.Op != OpMove {
31693 break
31694 }
31695 n := auxIntToInt64(m4.AuxInt)
31696 mem := m4.Args[2]
31697 p4 := m4.Args[0]
31698 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)) {
31699 break
31700 }
31701 v.reset(OpStore)
31702 v.Aux = typeToAux(t1)
31703 v0 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
31704 v0.Aux = typeToAux(t2)
31705 v1 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
31706 v1.Aux = typeToAux(t3)
31707 v1.AddArg3(op3, d3, mem)
31708 v0.AddArg3(op2, d2, v1)
31709 v.AddArg3(op1, d1, v0)
31710 return true
31711 }
31712
31713
31714
31715 for {
31716 t1 := auxToType(v.Aux)
31717 op1 := v_0
31718 if op1.Op != OpOffPtr {
31719 break
31720 }
31721 o1 := auxIntToInt64(op1.AuxInt)
31722 p1 := op1.Args[0]
31723 d1 := v_1
31724 m2 := v_2
31725 if m2.Op != OpStore {
31726 break
31727 }
31728 t2 := auxToType(m2.Aux)
31729 _ = m2.Args[2]
31730 op2 := m2.Args[0]
31731 if op2.Op != OpOffPtr {
31732 break
31733 }
31734 o2 := auxIntToInt64(op2.AuxInt)
31735 p2 := op2.Args[0]
31736 d2 := m2.Args[1]
31737 m3 := m2.Args[2]
31738 if m3.Op != OpStore {
31739 break
31740 }
31741 t3 := auxToType(m3.Aux)
31742 _ = m3.Args[2]
31743 op3 := m3.Args[0]
31744 if op3.Op != OpOffPtr {
31745 break
31746 }
31747 o3 := auxIntToInt64(op3.AuxInt)
31748 p3 := op3.Args[0]
31749 d3 := m3.Args[1]
31750 m4 := m3.Args[2]
31751 if m4.Op != OpStore {
31752 break
31753 }
31754 t4 := auxToType(m4.Aux)
31755 _ = m4.Args[2]
31756 op4 := m4.Args[0]
31757 if op4.Op != OpOffPtr || auxIntToInt64(op4.AuxInt) != 0 {
31758 break
31759 }
31760 p4 := op4.Args[0]
31761 d4 := m4.Args[1]
31762 m5 := m4.Args[2]
31763 if m5.Op != OpMove {
31764 break
31765 }
31766 n := auxIntToInt64(m5.AuxInt)
31767 mem := m5.Args[2]
31768 p5 := m5.Args[0]
31769 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)) {
31770 break
31771 }
31772 v.reset(OpStore)
31773 v.Aux = typeToAux(t1)
31774 v0 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
31775 v0.Aux = typeToAux(t2)
31776 v1 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
31777 v1.Aux = typeToAux(t3)
31778 v2 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
31779 v2.Aux = typeToAux(t4)
31780 v2.AddArg3(op4, d4, mem)
31781 v1.AddArg3(op3, d3, v2)
31782 v0.AddArg3(op2, d2, v1)
31783 v.AddArg3(op1, d1, v0)
31784 return true
31785 }
31786
31787
31788
31789 for {
31790 t1 := auxToType(v.Aux)
31791 op1 := v_0
31792 if op1.Op != OpOffPtr {
31793 break
31794 }
31795 o1 := auxIntToInt64(op1.AuxInt)
31796 p1 := op1.Args[0]
31797 d1 := v_1
31798 m2 := v_2
31799 if m2.Op != OpStore {
31800 break
31801 }
31802 t2 := auxToType(m2.Aux)
31803 _ = m2.Args[2]
31804 op2 := m2.Args[0]
31805 if op2.Op != OpOffPtr || auxIntToInt64(op2.AuxInt) != 0 {
31806 break
31807 }
31808 p2 := op2.Args[0]
31809 d2 := m2.Args[1]
31810 m3 := m2.Args[2]
31811 if m3.Op != OpZero {
31812 break
31813 }
31814 n := auxIntToInt64(m3.AuxInt)
31815 mem := m3.Args[1]
31816 p3 := m3.Args[0]
31817 if !(m2.Uses == 1 && m3.Uses == 1 && o1 == t2.Size() && n == t2.Size()+t1.Size() && isSamePtr(p1, p2) && isSamePtr(p2, p3) && clobber(m2, m3)) {
31818 break
31819 }
31820 v.reset(OpStore)
31821 v.Aux = typeToAux(t1)
31822 v0 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
31823 v0.Aux = typeToAux(t2)
31824 v0.AddArg3(op2, d2, mem)
31825 v.AddArg3(op1, d1, v0)
31826 return true
31827 }
31828
31829
31830
31831 for {
31832 t1 := auxToType(v.Aux)
31833 op1 := v_0
31834 if op1.Op != OpOffPtr {
31835 break
31836 }
31837 o1 := auxIntToInt64(op1.AuxInt)
31838 p1 := op1.Args[0]
31839 d1 := v_1
31840 m2 := v_2
31841 if m2.Op != OpStore {
31842 break
31843 }
31844 t2 := auxToType(m2.Aux)
31845 _ = m2.Args[2]
31846 op2 := m2.Args[0]
31847 if op2.Op != OpOffPtr {
31848 break
31849 }
31850 o2 := auxIntToInt64(op2.AuxInt)
31851 p2 := op2.Args[0]
31852 d2 := m2.Args[1]
31853 m3 := m2.Args[2]
31854 if m3.Op != OpStore {
31855 break
31856 }
31857 t3 := auxToType(m3.Aux)
31858 _ = m3.Args[2]
31859 op3 := m3.Args[0]
31860 if op3.Op != OpOffPtr || auxIntToInt64(op3.AuxInt) != 0 {
31861 break
31862 }
31863 p3 := op3.Args[0]
31864 d3 := m3.Args[1]
31865 m4 := m3.Args[2]
31866 if m4.Op != OpZero {
31867 break
31868 }
31869 n := auxIntToInt64(m4.AuxInt)
31870 mem := m4.Args[1]
31871 p4 := m4.Args[0]
31872 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)) {
31873 break
31874 }
31875 v.reset(OpStore)
31876 v.Aux = typeToAux(t1)
31877 v0 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
31878 v0.Aux = typeToAux(t2)
31879 v1 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
31880 v1.Aux = typeToAux(t3)
31881 v1.AddArg3(op3, d3, mem)
31882 v0.AddArg3(op2, d2, v1)
31883 v.AddArg3(op1, d1, v0)
31884 return true
31885 }
31886
31887
31888
31889 for {
31890 t1 := auxToType(v.Aux)
31891 op1 := v_0
31892 if op1.Op != OpOffPtr {
31893 break
31894 }
31895 o1 := auxIntToInt64(op1.AuxInt)
31896 p1 := op1.Args[0]
31897 d1 := v_1
31898 m2 := v_2
31899 if m2.Op != OpStore {
31900 break
31901 }
31902 t2 := auxToType(m2.Aux)
31903 _ = m2.Args[2]
31904 op2 := m2.Args[0]
31905 if op2.Op != OpOffPtr {
31906 break
31907 }
31908 o2 := auxIntToInt64(op2.AuxInt)
31909 p2 := op2.Args[0]
31910 d2 := m2.Args[1]
31911 m3 := m2.Args[2]
31912 if m3.Op != OpStore {
31913 break
31914 }
31915 t3 := auxToType(m3.Aux)
31916 _ = m3.Args[2]
31917 op3 := m3.Args[0]
31918 if op3.Op != OpOffPtr {
31919 break
31920 }
31921 o3 := auxIntToInt64(op3.AuxInt)
31922 p3 := op3.Args[0]
31923 d3 := m3.Args[1]
31924 m4 := m3.Args[2]
31925 if m4.Op != OpStore {
31926 break
31927 }
31928 t4 := auxToType(m4.Aux)
31929 _ = m4.Args[2]
31930 op4 := m4.Args[0]
31931 if op4.Op != OpOffPtr || auxIntToInt64(op4.AuxInt) != 0 {
31932 break
31933 }
31934 p4 := op4.Args[0]
31935 d4 := m4.Args[1]
31936 m5 := m4.Args[2]
31937 if m5.Op != OpZero {
31938 break
31939 }
31940 n := auxIntToInt64(m5.AuxInt)
31941 mem := m5.Args[1]
31942 p5 := m5.Args[0]
31943 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)) {
31944 break
31945 }
31946 v.reset(OpStore)
31947 v.Aux = typeToAux(t1)
31948 v0 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
31949 v0.Aux = typeToAux(t2)
31950 v1 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
31951 v1.Aux = typeToAux(t3)
31952 v2 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
31953 v2.Aux = typeToAux(t4)
31954 v2.AddArg3(op4, d4, mem)
31955 v1.AddArg3(op3, d3, v2)
31956 v0.AddArg3(op2, d2, v1)
31957 v.AddArg3(op1, d1, v0)
31958 return true
31959 }
31960 return false
31961 }
31962 func rewriteValuegeneric_OpStringLen(v *Value) bool {
31963 v_0 := v.Args[0]
31964
31965
31966 for {
31967 if v_0.Op != OpStringMake {
31968 break
31969 }
31970 _ = v_0.Args[1]
31971 v_0_1 := v_0.Args[1]
31972 if v_0_1.Op != OpConst64 {
31973 break
31974 }
31975 t := v_0_1.Type
31976 c := auxIntToInt64(v_0_1.AuxInt)
31977 v.reset(OpConst64)
31978 v.Type = t
31979 v.AuxInt = int64ToAuxInt(c)
31980 return true
31981 }
31982 return false
31983 }
31984 func rewriteValuegeneric_OpStringPtr(v *Value) bool {
31985 v_0 := v.Args[0]
31986
31987
31988 for {
31989 if v_0.Op != OpStringMake {
31990 break
31991 }
31992 v_0_0 := v_0.Args[0]
31993 if v_0_0.Op != OpAddr {
31994 break
31995 }
31996 t := v_0_0.Type
31997 s := auxToSym(v_0_0.Aux)
31998 base := v_0_0.Args[0]
31999 v.reset(OpAddr)
32000 v.Type = t
32001 v.Aux = symToAux(s)
32002 v.AddArg(base)
32003 return true
32004 }
32005 return false
32006 }
32007 func rewriteValuegeneric_OpStructSelect(v *Value) bool {
32008 v_0 := v.Args[0]
32009 b := v.Block
32010
32011
32012 for {
32013 i := auxIntToInt64(v.AuxInt)
32014 x := v_0
32015 if x.Op != OpStructMake {
32016 break
32017 }
32018 v.copyOf(x.Args[i])
32019 return true
32020 }
32021
32022
32023
32024 for {
32025 i := auxIntToInt64(v.AuxInt)
32026 x := v_0
32027 if x.Op != OpLoad {
32028 break
32029 }
32030 t := x.Type
32031 mem := x.Args[1]
32032 ptr := x.Args[0]
32033 if !(!CanSSA(t)) {
32034 break
32035 }
32036 b = x.Block
32037 v0 := b.NewValue0(v.Pos, OpLoad, v.Type)
32038 v.copyOf(v0)
32039 v1 := b.NewValue0(v.Pos, OpOffPtr, v.Type.PtrTo())
32040 v1.AuxInt = int64ToAuxInt(t.FieldOff(int(i)))
32041 v1.AddArg(ptr)
32042 v0.AddArg2(v1, mem)
32043 return true
32044 }
32045
32046
32047 for {
32048 if v_0.Op != OpIData {
32049 break
32050 }
32051 x := v_0.Args[0]
32052 v.reset(OpIData)
32053 v.AddArg(x)
32054 return true
32055 }
32056 return false
32057 }
32058 func rewriteValuegeneric_OpSub16(v *Value) bool {
32059 v_1 := v.Args[1]
32060 v_0 := v.Args[0]
32061 b := v.Block
32062
32063
32064 for {
32065 if v_0.Op != OpConst16 {
32066 break
32067 }
32068 c := auxIntToInt16(v_0.AuxInt)
32069 if v_1.Op != OpConst16 {
32070 break
32071 }
32072 d := auxIntToInt16(v_1.AuxInt)
32073 v.reset(OpConst16)
32074 v.AuxInt = int16ToAuxInt(c - d)
32075 return true
32076 }
32077
32078
32079
32080 for {
32081 x := v_0
32082 if v_1.Op != OpConst16 {
32083 break
32084 }
32085 t := v_1.Type
32086 c := auxIntToInt16(v_1.AuxInt)
32087 if !(x.Op != OpConst16) {
32088 break
32089 }
32090 v.reset(OpAdd16)
32091 v0 := b.NewValue0(v.Pos, OpConst16, t)
32092 v0.AuxInt = int16ToAuxInt(-c)
32093 v.AddArg2(v0, x)
32094 return true
32095 }
32096
32097
32098 for {
32099 t := v.Type
32100 if v_0.Op != OpMul16 {
32101 break
32102 }
32103 _ = v_0.Args[1]
32104 v_0_0 := v_0.Args[0]
32105 v_0_1 := v_0.Args[1]
32106 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
32107 x := v_0_0
32108 y := v_0_1
32109 if v_1.Op != OpMul16 {
32110 continue
32111 }
32112 _ = v_1.Args[1]
32113 v_1_0 := v_1.Args[0]
32114 v_1_1 := v_1.Args[1]
32115 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
32116 if x != v_1_0 {
32117 continue
32118 }
32119 z := v_1_1
32120 v.reset(OpMul16)
32121 v0 := b.NewValue0(v.Pos, OpSub16, t)
32122 v0.AddArg2(y, z)
32123 v.AddArg2(x, v0)
32124 return true
32125 }
32126 }
32127 break
32128 }
32129
32130
32131 for {
32132 x := v_0
32133 if x != v_1 {
32134 break
32135 }
32136 v.reset(OpConst16)
32137 v.AuxInt = int16ToAuxInt(0)
32138 return true
32139 }
32140
32141
32142 for {
32143 if v_0.Op != OpNeg16 {
32144 break
32145 }
32146 x := v_0.Args[0]
32147 if v_1.Op != OpCom16 || x != v_1.Args[0] {
32148 break
32149 }
32150 v.reset(OpConst16)
32151 v.AuxInt = int16ToAuxInt(1)
32152 return true
32153 }
32154
32155
32156 for {
32157 if v_0.Op != OpCom16 {
32158 break
32159 }
32160 x := v_0.Args[0]
32161 if v_1.Op != OpNeg16 || x != v_1.Args[0] {
32162 break
32163 }
32164 v.reset(OpConst16)
32165 v.AuxInt = int16ToAuxInt(-1)
32166 return true
32167 }
32168
32169
32170 for {
32171 if v_0.Op != OpAdd16 {
32172 break
32173 }
32174 _ = v_0.Args[1]
32175 v_0_0 := v_0.Args[0]
32176 v_0_1 := v_0.Args[1]
32177 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
32178 t := v_0_0
32179 x := v_0_1
32180 if v_1.Op != OpAdd16 {
32181 continue
32182 }
32183 _ = v_1.Args[1]
32184 v_1_0 := v_1.Args[0]
32185 v_1_1 := v_1.Args[1]
32186 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
32187 if t != v_1_0 {
32188 continue
32189 }
32190 y := v_1_1
32191 v.reset(OpSub16)
32192 v.AddArg2(x, y)
32193 return true
32194 }
32195 }
32196 break
32197 }
32198
32199
32200 for {
32201 if v_0.Op != OpAdd16 {
32202 break
32203 }
32204 _ = v_0.Args[1]
32205 v_0_0 := v_0.Args[0]
32206 v_0_1 := v_0.Args[1]
32207 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
32208 x := v_0_0
32209 y := v_0_1
32210 if x != v_1 {
32211 continue
32212 }
32213 v.copyOf(y)
32214 return true
32215 }
32216 break
32217 }
32218
32219
32220 for {
32221 if v_0.Op != OpAdd16 {
32222 break
32223 }
32224 _ = v_0.Args[1]
32225 v_0_0 := v_0.Args[0]
32226 v_0_1 := v_0.Args[1]
32227 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
32228 x := v_0_0
32229 y := v_0_1
32230 if y != v_1 {
32231 continue
32232 }
32233 v.copyOf(x)
32234 return true
32235 }
32236 break
32237 }
32238
32239
32240 for {
32241 if v_0.Op != OpSub16 {
32242 break
32243 }
32244 y := v_0.Args[1]
32245 x := v_0.Args[0]
32246 if x != v_1 {
32247 break
32248 }
32249 v.reset(OpNeg16)
32250 v.AddArg(y)
32251 return true
32252 }
32253
32254
32255 for {
32256 x := v_0
32257 if v_1.Op != OpAdd16 {
32258 break
32259 }
32260 _ = v_1.Args[1]
32261 v_1_0 := v_1.Args[0]
32262 v_1_1 := v_1.Args[1]
32263 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
32264 if x != v_1_0 {
32265 continue
32266 }
32267 y := v_1_1
32268 v.reset(OpNeg16)
32269 v.AddArg(y)
32270 return true
32271 }
32272 break
32273 }
32274
32275
32276
32277 for {
32278 x := v_0
32279 if v_1.Op != OpSub16 {
32280 break
32281 }
32282 z := v_1.Args[1]
32283 i := v_1.Args[0]
32284 if i.Op != OpConst16 {
32285 break
32286 }
32287 t := i.Type
32288 if !(z.Op != OpConst16 && x.Op != OpConst16) {
32289 break
32290 }
32291 v.reset(OpSub16)
32292 v0 := b.NewValue0(v.Pos, OpAdd16, t)
32293 v0.AddArg2(x, z)
32294 v.AddArg2(v0, i)
32295 return true
32296 }
32297
32298
32299
32300 for {
32301 x := v_0
32302 if v_1.Op != OpAdd16 {
32303 break
32304 }
32305 _ = v_1.Args[1]
32306 v_1_0 := v_1.Args[0]
32307 v_1_1 := v_1.Args[1]
32308 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
32309 z := v_1_0
32310 i := v_1_1
32311 if i.Op != OpConst16 {
32312 continue
32313 }
32314 t := i.Type
32315 if !(z.Op != OpConst16 && x.Op != OpConst16) {
32316 continue
32317 }
32318 v.reset(OpSub16)
32319 v0 := b.NewValue0(v.Pos, OpSub16, t)
32320 v0.AddArg2(x, z)
32321 v.AddArg2(v0, i)
32322 return true
32323 }
32324 break
32325 }
32326
32327
32328
32329 for {
32330 if v_0.Op != OpSub16 {
32331 break
32332 }
32333 z := v_0.Args[1]
32334 i := v_0.Args[0]
32335 if i.Op != OpConst16 {
32336 break
32337 }
32338 t := i.Type
32339 x := v_1
32340 if !(z.Op != OpConst16 && x.Op != OpConst16) {
32341 break
32342 }
32343 v.reset(OpSub16)
32344 v0 := b.NewValue0(v.Pos, OpAdd16, t)
32345 v0.AddArg2(z, x)
32346 v.AddArg2(i, v0)
32347 return true
32348 }
32349
32350
32351
32352 for {
32353 if v_0.Op != OpAdd16 {
32354 break
32355 }
32356 _ = v_0.Args[1]
32357 v_0_0 := v_0.Args[0]
32358 v_0_1 := v_0.Args[1]
32359 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
32360 z := v_0_0
32361 i := v_0_1
32362 if i.Op != OpConst16 {
32363 continue
32364 }
32365 t := i.Type
32366 x := v_1
32367 if !(z.Op != OpConst16 && x.Op != OpConst16) {
32368 continue
32369 }
32370 v.reset(OpAdd16)
32371 v0 := b.NewValue0(v.Pos, OpSub16, t)
32372 v0.AddArg2(z, x)
32373 v.AddArg2(i, v0)
32374 return true
32375 }
32376 break
32377 }
32378
32379
32380 for {
32381 if v_0.Op != OpConst16 {
32382 break
32383 }
32384 t := v_0.Type
32385 c := auxIntToInt16(v_0.AuxInt)
32386 if v_1.Op != OpSub16 {
32387 break
32388 }
32389 x := v_1.Args[1]
32390 v_1_0 := v_1.Args[0]
32391 if v_1_0.Op != OpConst16 || v_1_0.Type != t {
32392 break
32393 }
32394 d := auxIntToInt16(v_1_0.AuxInt)
32395 v.reset(OpAdd16)
32396 v0 := b.NewValue0(v.Pos, OpConst16, t)
32397 v0.AuxInt = int16ToAuxInt(c - d)
32398 v.AddArg2(v0, x)
32399 return true
32400 }
32401
32402
32403 for {
32404 if v_0.Op != OpConst16 {
32405 break
32406 }
32407 t := v_0.Type
32408 c := auxIntToInt16(v_0.AuxInt)
32409 if v_1.Op != OpAdd16 {
32410 break
32411 }
32412 _ = v_1.Args[1]
32413 v_1_0 := v_1.Args[0]
32414 v_1_1 := v_1.Args[1]
32415 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
32416 if v_1_0.Op != OpConst16 || v_1_0.Type != t {
32417 continue
32418 }
32419 d := auxIntToInt16(v_1_0.AuxInt)
32420 x := v_1_1
32421 v.reset(OpSub16)
32422 v0 := b.NewValue0(v.Pos, OpConst16, t)
32423 v0.AuxInt = int16ToAuxInt(c - d)
32424 v.AddArg2(v0, x)
32425 return true
32426 }
32427 break
32428 }
32429 return false
32430 }
32431 func rewriteValuegeneric_OpSub32(v *Value) bool {
32432 v_1 := v.Args[1]
32433 v_0 := v.Args[0]
32434 b := v.Block
32435
32436
32437 for {
32438 if v_0.Op != OpConst32 {
32439 break
32440 }
32441 c := auxIntToInt32(v_0.AuxInt)
32442 if v_1.Op != OpConst32 {
32443 break
32444 }
32445 d := auxIntToInt32(v_1.AuxInt)
32446 v.reset(OpConst32)
32447 v.AuxInt = int32ToAuxInt(c - d)
32448 return true
32449 }
32450
32451
32452
32453 for {
32454 x := v_0
32455 if v_1.Op != OpConst32 {
32456 break
32457 }
32458 t := v_1.Type
32459 c := auxIntToInt32(v_1.AuxInt)
32460 if !(x.Op != OpConst32) {
32461 break
32462 }
32463 v.reset(OpAdd32)
32464 v0 := b.NewValue0(v.Pos, OpConst32, t)
32465 v0.AuxInt = int32ToAuxInt(-c)
32466 v.AddArg2(v0, x)
32467 return true
32468 }
32469
32470
32471 for {
32472 t := v.Type
32473 if v_0.Op != OpMul32 {
32474 break
32475 }
32476 _ = v_0.Args[1]
32477 v_0_0 := v_0.Args[0]
32478 v_0_1 := v_0.Args[1]
32479 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
32480 x := v_0_0
32481 y := v_0_1
32482 if v_1.Op != OpMul32 {
32483 continue
32484 }
32485 _ = v_1.Args[1]
32486 v_1_0 := v_1.Args[0]
32487 v_1_1 := v_1.Args[1]
32488 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
32489 if x != v_1_0 {
32490 continue
32491 }
32492 z := v_1_1
32493 v.reset(OpMul32)
32494 v0 := b.NewValue0(v.Pos, OpSub32, t)
32495 v0.AddArg2(y, z)
32496 v.AddArg2(x, v0)
32497 return true
32498 }
32499 }
32500 break
32501 }
32502
32503
32504 for {
32505 x := v_0
32506 if x != v_1 {
32507 break
32508 }
32509 v.reset(OpConst32)
32510 v.AuxInt = int32ToAuxInt(0)
32511 return true
32512 }
32513
32514
32515 for {
32516 if v_0.Op != OpNeg32 {
32517 break
32518 }
32519 x := v_0.Args[0]
32520 if v_1.Op != OpCom32 || x != v_1.Args[0] {
32521 break
32522 }
32523 v.reset(OpConst32)
32524 v.AuxInt = int32ToAuxInt(1)
32525 return true
32526 }
32527
32528
32529 for {
32530 if v_0.Op != OpCom32 {
32531 break
32532 }
32533 x := v_0.Args[0]
32534 if v_1.Op != OpNeg32 || x != v_1.Args[0] {
32535 break
32536 }
32537 v.reset(OpConst32)
32538 v.AuxInt = int32ToAuxInt(-1)
32539 return true
32540 }
32541
32542
32543 for {
32544 if v_0.Op != OpAdd32 {
32545 break
32546 }
32547 _ = v_0.Args[1]
32548 v_0_0 := v_0.Args[0]
32549 v_0_1 := v_0.Args[1]
32550 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
32551 t := v_0_0
32552 x := v_0_1
32553 if v_1.Op != OpAdd32 {
32554 continue
32555 }
32556 _ = v_1.Args[1]
32557 v_1_0 := v_1.Args[0]
32558 v_1_1 := v_1.Args[1]
32559 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
32560 if t != v_1_0 {
32561 continue
32562 }
32563 y := v_1_1
32564 v.reset(OpSub32)
32565 v.AddArg2(x, y)
32566 return true
32567 }
32568 }
32569 break
32570 }
32571
32572
32573 for {
32574 if v_0.Op != OpAdd32 {
32575 break
32576 }
32577 _ = v_0.Args[1]
32578 v_0_0 := v_0.Args[0]
32579 v_0_1 := v_0.Args[1]
32580 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
32581 x := v_0_0
32582 y := v_0_1
32583 if x != v_1 {
32584 continue
32585 }
32586 v.copyOf(y)
32587 return true
32588 }
32589 break
32590 }
32591
32592
32593 for {
32594 if v_0.Op != OpAdd32 {
32595 break
32596 }
32597 _ = v_0.Args[1]
32598 v_0_0 := v_0.Args[0]
32599 v_0_1 := v_0.Args[1]
32600 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
32601 x := v_0_0
32602 y := v_0_1
32603 if y != v_1 {
32604 continue
32605 }
32606 v.copyOf(x)
32607 return true
32608 }
32609 break
32610 }
32611
32612
32613 for {
32614 if v_0.Op != OpSub32 {
32615 break
32616 }
32617 y := v_0.Args[1]
32618 x := v_0.Args[0]
32619 if x != v_1 {
32620 break
32621 }
32622 v.reset(OpNeg32)
32623 v.AddArg(y)
32624 return true
32625 }
32626
32627
32628 for {
32629 x := v_0
32630 if v_1.Op != OpAdd32 {
32631 break
32632 }
32633 _ = v_1.Args[1]
32634 v_1_0 := v_1.Args[0]
32635 v_1_1 := v_1.Args[1]
32636 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
32637 if x != v_1_0 {
32638 continue
32639 }
32640 y := v_1_1
32641 v.reset(OpNeg32)
32642 v.AddArg(y)
32643 return true
32644 }
32645 break
32646 }
32647
32648
32649
32650 for {
32651 x := v_0
32652 if v_1.Op != OpSub32 {
32653 break
32654 }
32655 z := v_1.Args[1]
32656 i := v_1.Args[0]
32657 if i.Op != OpConst32 {
32658 break
32659 }
32660 t := i.Type
32661 if !(z.Op != OpConst32 && x.Op != OpConst32) {
32662 break
32663 }
32664 v.reset(OpSub32)
32665 v0 := b.NewValue0(v.Pos, OpAdd32, t)
32666 v0.AddArg2(x, z)
32667 v.AddArg2(v0, i)
32668 return true
32669 }
32670
32671
32672
32673 for {
32674 x := v_0
32675 if v_1.Op != OpAdd32 {
32676 break
32677 }
32678 _ = v_1.Args[1]
32679 v_1_0 := v_1.Args[0]
32680 v_1_1 := v_1.Args[1]
32681 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
32682 z := v_1_0
32683 i := v_1_1
32684 if i.Op != OpConst32 {
32685 continue
32686 }
32687 t := i.Type
32688 if !(z.Op != OpConst32 && x.Op != OpConst32) {
32689 continue
32690 }
32691 v.reset(OpSub32)
32692 v0 := b.NewValue0(v.Pos, OpSub32, t)
32693 v0.AddArg2(x, z)
32694 v.AddArg2(v0, i)
32695 return true
32696 }
32697 break
32698 }
32699
32700
32701
32702 for {
32703 if v_0.Op != OpSub32 {
32704 break
32705 }
32706 z := v_0.Args[1]
32707 i := v_0.Args[0]
32708 if i.Op != OpConst32 {
32709 break
32710 }
32711 t := i.Type
32712 x := v_1
32713 if !(z.Op != OpConst32 && x.Op != OpConst32) {
32714 break
32715 }
32716 v.reset(OpSub32)
32717 v0 := b.NewValue0(v.Pos, OpAdd32, t)
32718 v0.AddArg2(z, x)
32719 v.AddArg2(i, v0)
32720 return true
32721 }
32722
32723
32724
32725 for {
32726 if v_0.Op != OpAdd32 {
32727 break
32728 }
32729 _ = v_0.Args[1]
32730 v_0_0 := v_0.Args[0]
32731 v_0_1 := v_0.Args[1]
32732 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
32733 z := v_0_0
32734 i := v_0_1
32735 if i.Op != OpConst32 {
32736 continue
32737 }
32738 t := i.Type
32739 x := v_1
32740 if !(z.Op != OpConst32 && x.Op != OpConst32) {
32741 continue
32742 }
32743 v.reset(OpAdd32)
32744 v0 := b.NewValue0(v.Pos, OpSub32, t)
32745 v0.AddArg2(z, x)
32746 v.AddArg2(i, v0)
32747 return true
32748 }
32749 break
32750 }
32751
32752
32753 for {
32754 if v_0.Op != OpConst32 {
32755 break
32756 }
32757 t := v_0.Type
32758 c := auxIntToInt32(v_0.AuxInt)
32759 if v_1.Op != OpSub32 {
32760 break
32761 }
32762 x := v_1.Args[1]
32763 v_1_0 := v_1.Args[0]
32764 if v_1_0.Op != OpConst32 || v_1_0.Type != t {
32765 break
32766 }
32767 d := auxIntToInt32(v_1_0.AuxInt)
32768 v.reset(OpAdd32)
32769 v0 := b.NewValue0(v.Pos, OpConst32, t)
32770 v0.AuxInt = int32ToAuxInt(c - d)
32771 v.AddArg2(v0, x)
32772 return true
32773 }
32774
32775
32776 for {
32777 if v_0.Op != OpConst32 {
32778 break
32779 }
32780 t := v_0.Type
32781 c := auxIntToInt32(v_0.AuxInt)
32782 if v_1.Op != OpAdd32 {
32783 break
32784 }
32785 _ = v_1.Args[1]
32786 v_1_0 := v_1.Args[0]
32787 v_1_1 := v_1.Args[1]
32788 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
32789 if v_1_0.Op != OpConst32 || v_1_0.Type != t {
32790 continue
32791 }
32792 d := auxIntToInt32(v_1_0.AuxInt)
32793 x := v_1_1
32794 v.reset(OpSub32)
32795 v0 := b.NewValue0(v.Pos, OpConst32, t)
32796 v0.AuxInt = int32ToAuxInt(c - d)
32797 v.AddArg2(v0, x)
32798 return true
32799 }
32800 break
32801 }
32802 return false
32803 }
32804 func rewriteValuegeneric_OpSub32F(v *Value) bool {
32805 v_1 := v.Args[1]
32806 v_0 := v.Args[0]
32807
32808
32809
32810 for {
32811 if v_0.Op != OpConst32F {
32812 break
32813 }
32814 c := auxIntToFloat32(v_0.AuxInt)
32815 if v_1.Op != OpConst32F {
32816 break
32817 }
32818 d := auxIntToFloat32(v_1.AuxInt)
32819 if !(c-d == c-d) {
32820 break
32821 }
32822 v.reset(OpConst32F)
32823 v.AuxInt = float32ToAuxInt(c - d)
32824 return true
32825 }
32826 return false
32827 }
32828 func rewriteValuegeneric_OpSub64(v *Value) bool {
32829 v_1 := v.Args[1]
32830 v_0 := v.Args[0]
32831 b := v.Block
32832
32833
32834 for {
32835 if v_0.Op != OpConst64 {
32836 break
32837 }
32838 c := auxIntToInt64(v_0.AuxInt)
32839 if v_1.Op != OpConst64 {
32840 break
32841 }
32842 d := auxIntToInt64(v_1.AuxInt)
32843 v.reset(OpConst64)
32844 v.AuxInt = int64ToAuxInt(c - d)
32845 return true
32846 }
32847
32848
32849
32850 for {
32851 x := v_0
32852 if v_1.Op != OpConst64 {
32853 break
32854 }
32855 t := v_1.Type
32856 c := auxIntToInt64(v_1.AuxInt)
32857 if !(x.Op != OpConst64) {
32858 break
32859 }
32860 v.reset(OpAdd64)
32861 v0 := b.NewValue0(v.Pos, OpConst64, t)
32862 v0.AuxInt = int64ToAuxInt(-c)
32863 v.AddArg2(v0, x)
32864 return true
32865 }
32866
32867
32868 for {
32869 t := v.Type
32870 if v_0.Op != OpMul64 {
32871 break
32872 }
32873 _ = v_0.Args[1]
32874 v_0_0 := v_0.Args[0]
32875 v_0_1 := v_0.Args[1]
32876 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
32877 x := v_0_0
32878 y := v_0_1
32879 if v_1.Op != OpMul64 {
32880 continue
32881 }
32882 _ = v_1.Args[1]
32883 v_1_0 := v_1.Args[0]
32884 v_1_1 := v_1.Args[1]
32885 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
32886 if x != v_1_0 {
32887 continue
32888 }
32889 z := v_1_1
32890 v.reset(OpMul64)
32891 v0 := b.NewValue0(v.Pos, OpSub64, t)
32892 v0.AddArg2(y, z)
32893 v.AddArg2(x, v0)
32894 return true
32895 }
32896 }
32897 break
32898 }
32899
32900
32901 for {
32902 x := v_0
32903 if x != v_1 {
32904 break
32905 }
32906 v.reset(OpConst64)
32907 v.AuxInt = int64ToAuxInt(0)
32908 return true
32909 }
32910
32911
32912 for {
32913 if v_0.Op != OpNeg64 {
32914 break
32915 }
32916 x := v_0.Args[0]
32917 if v_1.Op != OpCom64 || x != v_1.Args[0] {
32918 break
32919 }
32920 v.reset(OpConst64)
32921 v.AuxInt = int64ToAuxInt(1)
32922 return true
32923 }
32924
32925
32926 for {
32927 if v_0.Op != OpCom64 {
32928 break
32929 }
32930 x := v_0.Args[0]
32931 if v_1.Op != OpNeg64 || x != v_1.Args[0] {
32932 break
32933 }
32934 v.reset(OpConst64)
32935 v.AuxInt = int64ToAuxInt(-1)
32936 return true
32937 }
32938
32939
32940 for {
32941 if v_0.Op != OpAdd64 {
32942 break
32943 }
32944 _ = v_0.Args[1]
32945 v_0_0 := v_0.Args[0]
32946 v_0_1 := v_0.Args[1]
32947 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
32948 t := v_0_0
32949 x := v_0_1
32950 if v_1.Op != OpAdd64 {
32951 continue
32952 }
32953 _ = v_1.Args[1]
32954 v_1_0 := v_1.Args[0]
32955 v_1_1 := v_1.Args[1]
32956 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
32957 if t != v_1_0 {
32958 continue
32959 }
32960 y := v_1_1
32961 v.reset(OpSub64)
32962 v.AddArg2(x, y)
32963 return true
32964 }
32965 }
32966 break
32967 }
32968
32969
32970 for {
32971 if v_0.Op != OpAdd64 {
32972 break
32973 }
32974 _ = v_0.Args[1]
32975 v_0_0 := v_0.Args[0]
32976 v_0_1 := v_0.Args[1]
32977 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
32978 x := v_0_0
32979 y := v_0_1
32980 if x != v_1 {
32981 continue
32982 }
32983 v.copyOf(y)
32984 return true
32985 }
32986 break
32987 }
32988
32989
32990 for {
32991 if v_0.Op != OpAdd64 {
32992 break
32993 }
32994 _ = v_0.Args[1]
32995 v_0_0 := v_0.Args[0]
32996 v_0_1 := v_0.Args[1]
32997 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
32998 x := v_0_0
32999 y := v_0_1
33000 if y != v_1 {
33001 continue
33002 }
33003 v.copyOf(x)
33004 return true
33005 }
33006 break
33007 }
33008
33009
33010 for {
33011 if v_0.Op != OpSub64 {
33012 break
33013 }
33014 y := v_0.Args[1]
33015 x := v_0.Args[0]
33016 if x != v_1 {
33017 break
33018 }
33019 v.reset(OpNeg64)
33020 v.AddArg(y)
33021 return true
33022 }
33023
33024
33025 for {
33026 x := v_0
33027 if v_1.Op != OpAdd64 {
33028 break
33029 }
33030 _ = v_1.Args[1]
33031 v_1_0 := v_1.Args[0]
33032 v_1_1 := v_1.Args[1]
33033 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
33034 if x != v_1_0 {
33035 continue
33036 }
33037 y := v_1_1
33038 v.reset(OpNeg64)
33039 v.AddArg(y)
33040 return true
33041 }
33042 break
33043 }
33044
33045
33046
33047 for {
33048 x := v_0
33049 if v_1.Op != OpSub64 {
33050 break
33051 }
33052 z := v_1.Args[1]
33053 i := v_1.Args[0]
33054 if i.Op != OpConst64 {
33055 break
33056 }
33057 t := i.Type
33058 if !(z.Op != OpConst64 && x.Op != OpConst64) {
33059 break
33060 }
33061 v.reset(OpSub64)
33062 v0 := b.NewValue0(v.Pos, OpAdd64, t)
33063 v0.AddArg2(x, z)
33064 v.AddArg2(v0, i)
33065 return true
33066 }
33067
33068
33069
33070 for {
33071 x := v_0
33072 if v_1.Op != OpAdd64 {
33073 break
33074 }
33075 _ = v_1.Args[1]
33076 v_1_0 := v_1.Args[0]
33077 v_1_1 := v_1.Args[1]
33078 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
33079 z := v_1_0
33080 i := v_1_1
33081 if i.Op != OpConst64 {
33082 continue
33083 }
33084 t := i.Type
33085 if !(z.Op != OpConst64 && x.Op != OpConst64) {
33086 continue
33087 }
33088 v.reset(OpSub64)
33089 v0 := b.NewValue0(v.Pos, OpSub64, t)
33090 v0.AddArg2(x, z)
33091 v.AddArg2(v0, i)
33092 return true
33093 }
33094 break
33095 }
33096
33097
33098
33099 for {
33100 if v_0.Op != OpSub64 {
33101 break
33102 }
33103 z := v_0.Args[1]
33104 i := v_0.Args[0]
33105 if i.Op != OpConst64 {
33106 break
33107 }
33108 t := i.Type
33109 x := v_1
33110 if !(z.Op != OpConst64 && x.Op != OpConst64) {
33111 break
33112 }
33113 v.reset(OpSub64)
33114 v0 := b.NewValue0(v.Pos, OpAdd64, t)
33115 v0.AddArg2(z, x)
33116 v.AddArg2(i, v0)
33117 return true
33118 }
33119
33120
33121
33122 for {
33123 if v_0.Op != OpAdd64 {
33124 break
33125 }
33126 _ = v_0.Args[1]
33127 v_0_0 := v_0.Args[0]
33128 v_0_1 := v_0.Args[1]
33129 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
33130 z := v_0_0
33131 i := v_0_1
33132 if i.Op != OpConst64 {
33133 continue
33134 }
33135 t := i.Type
33136 x := v_1
33137 if !(z.Op != OpConst64 && x.Op != OpConst64) {
33138 continue
33139 }
33140 v.reset(OpAdd64)
33141 v0 := b.NewValue0(v.Pos, OpSub64, t)
33142 v0.AddArg2(z, x)
33143 v.AddArg2(i, v0)
33144 return true
33145 }
33146 break
33147 }
33148
33149
33150 for {
33151 if v_0.Op != OpConst64 {
33152 break
33153 }
33154 t := v_0.Type
33155 c := auxIntToInt64(v_0.AuxInt)
33156 if v_1.Op != OpSub64 {
33157 break
33158 }
33159 x := v_1.Args[1]
33160 v_1_0 := v_1.Args[0]
33161 if v_1_0.Op != OpConst64 || v_1_0.Type != t {
33162 break
33163 }
33164 d := auxIntToInt64(v_1_0.AuxInt)
33165 v.reset(OpAdd64)
33166 v0 := b.NewValue0(v.Pos, OpConst64, t)
33167 v0.AuxInt = int64ToAuxInt(c - d)
33168 v.AddArg2(v0, x)
33169 return true
33170 }
33171
33172
33173 for {
33174 if v_0.Op != OpConst64 {
33175 break
33176 }
33177 t := v_0.Type
33178 c := auxIntToInt64(v_0.AuxInt)
33179 if v_1.Op != OpAdd64 {
33180 break
33181 }
33182 _ = v_1.Args[1]
33183 v_1_0 := v_1.Args[0]
33184 v_1_1 := v_1.Args[1]
33185 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
33186 if v_1_0.Op != OpConst64 || v_1_0.Type != t {
33187 continue
33188 }
33189 d := auxIntToInt64(v_1_0.AuxInt)
33190 x := v_1_1
33191 v.reset(OpSub64)
33192 v0 := b.NewValue0(v.Pos, OpConst64, t)
33193 v0.AuxInt = int64ToAuxInt(c - d)
33194 v.AddArg2(v0, x)
33195 return true
33196 }
33197 break
33198 }
33199 return false
33200 }
33201 func rewriteValuegeneric_OpSub64F(v *Value) bool {
33202 v_1 := v.Args[1]
33203 v_0 := v.Args[0]
33204
33205
33206
33207 for {
33208 if v_0.Op != OpConst64F {
33209 break
33210 }
33211 c := auxIntToFloat64(v_0.AuxInt)
33212 if v_1.Op != OpConst64F {
33213 break
33214 }
33215 d := auxIntToFloat64(v_1.AuxInt)
33216 if !(c-d == c-d) {
33217 break
33218 }
33219 v.reset(OpConst64F)
33220 v.AuxInt = float64ToAuxInt(c - d)
33221 return true
33222 }
33223 return false
33224 }
33225 func rewriteValuegeneric_OpSub8(v *Value) bool {
33226 v_1 := v.Args[1]
33227 v_0 := v.Args[0]
33228 b := v.Block
33229
33230
33231 for {
33232 if v_0.Op != OpConst8 {
33233 break
33234 }
33235 c := auxIntToInt8(v_0.AuxInt)
33236 if v_1.Op != OpConst8 {
33237 break
33238 }
33239 d := auxIntToInt8(v_1.AuxInt)
33240 v.reset(OpConst8)
33241 v.AuxInt = int8ToAuxInt(c - d)
33242 return true
33243 }
33244
33245
33246
33247 for {
33248 x := v_0
33249 if v_1.Op != OpConst8 {
33250 break
33251 }
33252 t := v_1.Type
33253 c := auxIntToInt8(v_1.AuxInt)
33254 if !(x.Op != OpConst8) {
33255 break
33256 }
33257 v.reset(OpAdd8)
33258 v0 := b.NewValue0(v.Pos, OpConst8, t)
33259 v0.AuxInt = int8ToAuxInt(-c)
33260 v.AddArg2(v0, x)
33261 return true
33262 }
33263
33264
33265 for {
33266 t := v.Type
33267 if v_0.Op != OpMul8 {
33268 break
33269 }
33270 _ = v_0.Args[1]
33271 v_0_0 := v_0.Args[0]
33272 v_0_1 := v_0.Args[1]
33273 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
33274 x := v_0_0
33275 y := v_0_1
33276 if v_1.Op != OpMul8 {
33277 continue
33278 }
33279 _ = v_1.Args[1]
33280 v_1_0 := v_1.Args[0]
33281 v_1_1 := v_1.Args[1]
33282 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
33283 if x != v_1_0 {
33284 continue
33285 }
33286 z := v_1_1
33287 v.reset(OpMul8)
33288 v0 := b.NewValue0(v.Pos, OpSub8, t)
33289 v0.AddArg2(y, z)
33290 v.AddArg2(x, v0)
33291 return true
33292 }
33293 }
33294 break
33295 }
33296
33297
33298 for {
33299 x := v_0
33300 if x != v_1 {
33301 break
33302 }
33303 v.reset(OpConst8)
33304 v.AuxInt = int8ToAuxInt(0)
33305 return true
33306 }
33307
33308
33309 for {
33310 if v_0.Op != OpNeg8 {
33311 break
33312 }
33313 x := v_0.Args[0]
33314 if v_1.Op != OpCom8 || x != v_1.Args[0] {
33315 break
33316 }
33317 v.reset(OpConst8)
33318 v.AuxInt = int8ToAuxInt(1)
33319 return true
33320 }
33321
33322
33323 for {
33324 if v_0.Op != OpCom8 {
33325 break
33326 }
33327 x := v_0.Args[0]
33328 if v_1.Op != OpNeg8 || x != v_1.Args[0] {
33329 break
33330 }
33331 v.reset(OpConst8)
33332 v.AuxInt = int8ToAuxInt(-1)
33333 return true
33334 }
33335
33336
33337 for {
33338 if v_0.Op != OpAdd8 {
33339 break
33340 }
33341 _ = v_0.Args[1]
33342 v_0_0 := v_0.Args[0]
33343 v_0_1 := v_0.Args[1]
33344 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
33345 t := v_0_0
33346 x := v_0_1
33347 if v_1.Op != OpAdd8 {
33348 continue
33349 }
33350 _ = v_1.Args[1]
33351 v_1_0 := v_1.Args[0]
33352 v_1_1 := v_1.Args[1]
33353 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
33354 if t != v_1_0 {
33355 continue
33356 }
33357 y := v_1_1
33358 v.reset(OpSub8)
33359 v.AddArg2(x, y)
33360 return true
33361 }
33362 }
33363 break
33364 }
33365
33366
33367 for {
33368 if v_0.Op != OpAdd8 {
33369 break
33370 }
33371 _ = v_0.Args[1]
33372 v_0_0 := v_0.Args[0]
33373 v_0_1 := v_0.Args[1]
33374 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
33375 x := v_0_0
33376 y := v_0_1
33377 if x != v_1 {
33378 continue
33379 }
33380 v.copyOf(y)
33381 return true
33382 }
33383 break
33384 }
33385
33386
33387 for {
33388 if v_0.Op != OpAdd8 {
33389 break
33390 }
33391 _ = v_0.Args[1]
33392 v_0_0 := v_0.Args[0]
33393 v_0_1 := v_0.Args[1]
33394 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
33395 x := v_0_0
33396 y := v_0_1
33397 if y != v_1 {
33398 continue
33399 }
33400 v.copyOf(x)
33401 return true
33402 }
33403 break
33404 }
33405
33406
33407 for {
33408 if v_0.Op != OpSub8 {
33409 break
33410 }
33411 y := v_0.Args[1]
33412 x := v_0.Args[0]
33413 if x != v_1 {
33414 break
33415 }
33416 v.reset(OpNeg8)
33417 v.AddArg(y)
33418 return true
33419 }
33420
33421
33422 for {
33423 x := v_0
33424 if v_1.Op != OpAdd8 {
33425 break
33426 }
33427 _ = v_1.Args[1]
33428 v_1_0 := v_1.Args[0]
33429 v_1_1 := v_1.Args[1]
33430 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
33431 if x != v_1_0 {
33432 continue
33433 }
33434 y := v_1_1
33435 v.reset(OpNeg8)
33436 v.AddArg(y)
33437 return true
33438 }
33439 break
33440 }
33441
33442
33443
33444 for {
33445 x := v_0
33446 if v_1.Op != OpSub8 {
33447 break
33448 }
33449 z := v_1.Args[1]
33450 i := v_1.Args[0]
33451 if i.Op != OpConst8 {
33452 break
33453 }
33454 t := i.Type
33455 if !(z.Op != OpConst8 && x.Op != OpConst8) {
33456 break
33457 }
33458 v.reset(OpSub8)
33459 v0 := b.NewValue0(v.Pos, OpAdd8, t)
33460 v0.AddArg2(x, z)
33461 v.AddArg2(v0, i)
33462 return true
33463 }
33464
33465
33466
33467 for {
33468 x := v_0
33469 if v_1.Op != OpAdd8 {
33470 break
33471 }
33472 _ = v_1.Args[1]
33473 v_1_0 := v_1.Args[0]
33474 v_1_1 := v_1.Args[1]
33475 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
33476 z := v_1_0
33477 i := v_1_1
33478 if i.Op != OpConst8 {
33479 continue
33480 }
33481 t := i.Type
33482 if !(z.Op != OpConst8 && x.Op != OpConst8) {
33483 continue
33484 }
33485 v.reset(OpSub8)
33486 v0 := b.NewValue0(v.Pos, OpSub8, t)
33487 v0.AddArg2(x, z)
33488 v.AddArg2(v0, i)
33489 return true
33490 }
33491 break
33492 }
33493
33494
33495
33496 for {
33497 if v_0.Op != OpSub8 {
33498 break
33499 }
33500 z := v_0.Args[1]
33501 i := v_0.Args[0]
33502 if i.Op != OpConst8 {
33503 break
33504 }
33505 t := i.Type
33506 x := v_1
33507 if !(z.Op != OpConst8 && x.Op != OpConst8) {
33508 break
33509 }
33510 v.reset(OpSub8)
33511 v0 := b.NewValue0(v.Pos, OpAdd8, t)
33512 v0.AddArg2(z, x)
33513 v.AddArg2(i, v0)
33514 return true
33515 }
33516
33517
33518
33519 for {
33520 if v_0.Op != OpAdd8 {
33521 break
33522 }
33523 _ = v_0.Args[1]
33524 v_0_0 := v_0.Args[0]
33525 v_0_1 := v_0.Args[1]
33526 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
33527 z := v_0_0
33528 i := v_0_1
33529 if i.Op != OpConst8 {
33530 continue
33531 }
33532 t := i.Type
33533 x := v_1
33534 if !(z.Op != OpConst8 && x.Op != OpConst8) {
33535 continue
33536 }
33537 v.reset(OpAdd8)
33538 v0 := b.NewValue0(v.Pos, OpSub8, t)
33539 v0.AddArg2(z, x)
33540 v.AddArg2(i, v0)
33541 return true
33542 }
33543 break
33544 }
33545
33546
33547 for {
33548 if v_0.Op != OpConst8 {
33549 break
33550 }
33551 t := v_0.Type
33552 c := auxIntToInt8(v_0.AuxInt)
33553 if v_1.Op != OpSub8 {
33554 break
33555 }
33556 x := v_1.Args[1]
33557 v_1_0 := v_1.Args[0]
33558 if v_1_0.Op != OpConst8 || v_1_0.Type != t {
33559 break
33560 }
33561 d := auxIntToInt8(v_1_0.AuxInt)
33562 v.reset(OpAdd8)
33563 v0 := b.NewValue0(v.Pos, OpConst8, t)
33564 v0.AuxInt = int8ToAuxInt(c - d)
33565 v.AddArg2(v0, x)
33566 return true
33567 }
33568
33569
33570 for {
33571 if v_0.Op != OpConst8 {
33572 break
33573 }
33574 t := v_0.Type
33575 c := auxIntToInt8(v_0.AuxInt)
33576 if v_1.Op != OpAdd8 {
33577 break
33578 }
33579 _ = v_1.Args[1]
33580 v_1_0 := v_1.Args[0]
33581 v_1_1 := v_1.Args[1]
33582 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
33583 if v_1_0.Op != OpConst8 || v_1_0.Type != t {
33584 continue
33585 }
33586 d := auxIntToInt8(v_1_0.AuxInt)
33587 x := v_1_1
33588 v.reset(OpSub8)
33589 v0 := b.NewValue0(v.Pos, OpConst8, t)
33590 v0.AuxInt = int8ToAuxInt(c - d)
33591 v.AddArg2(v0, x)
33592 return true
33593 }
33594 break
33595 }
33596 return false
33597 }
33598 func rewriteValuegeneric_OpTrunc(v *Value) bool {
33599 v_0 := v.Args[0]
33600
33601
33602 for {
33603 if v_0.Op != OpConst64F {
33604 break
33605 }
33606 c := auxIntToFloat64(v_0.AuxInt)
33607 v.reset(OpConst64F)
33608 v.AuxInt = float64ToAuxInt(math.Trunc(c))
33609 return true
33610 }
33611 return false
33612 }
33613 func rewriteValuegeneric_OpTrunc16to8(v *Value) bool {
33614 v_0 := v.Args[0]
33615
33616
33617 for {
33618 if v_0.Op != OpConst16 {
33619 break
33620 }
33621 c := auxIntToInt16(v_0.AuxInt)
33622 v.reset(OpConst8)
33623 v.AuxInt = int8ToAuxInt(int8(c))
33624 return true
33625 }
33626
33627
33628 for {
33629 if v_0.Op != OpZeroExt8to16 {
33630 break
33631 }
33632 x := v_0.Args[0]
33633 v.copyOf(x)
33634 return true
33635 }
33636
33637
33638 for {
33639 if v_0.Op != OpSignExt8to16 {
33640 break
33641 }
33642 x := v_0.Args[0]
33643 v.copyOf(x)
33644 return true
33645 }
33646
33647
33648
33649 for {
33650 if v_0.Op != OpAnd16 {
33651 break
33652 }
33653 _ = v_0.Args[1]
33654 v_0_0 := v_0.Args[0]
33655 v_0_1 := v_0.Args[1]
33656 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
33657 if v_0_0.Op != OpConst16 {
33658 continue
33659 }
33660 y := auxIntToInt16(v_0_0.AuxInt)
33661 x := v_0_1
33662 if !(y&0xFF == 0xFF) {
33663 continue
33664 }
33665 v.reset(OpTrunc16to8)
33666 v.AddArg(x)
33667 return true
33668 }
33669 break
33670 }
33671 return false
33672 }
33673 func rewriteValuegeneric_OpTrunc32to16(v *Value) bool {
33674 v_0 := v.Args[0]
33675
33676
33677 for {
33678 if v_0.Op != OpConst32 {
33679 break
33680 }
33681 c := auxIntToInt32(v_0.AuxInt)
33682 v.reset(OpConst16)
33683 v.AuxInt = int16ToAuxInt(int16(c))
33684 return true
33685 }
33686
33687
33688 for {
33689 if v_0.Op != OpZeroExt8to32 {
33690 break
33691 }
33692 x := v_0.Args[0]
33693 v.reset(OpZeroExt8to16)
33694 v.AddArg(x)
33695 return true
33696 }
33697
33698
33699 for {
33700 if v_0.Op != OpZeroExt16to32 {
33701 break
33702 }
33703 x := v_0.Args[0]
33704 v.copyOf(x)
33705 return true
33706 }
33707
33708
33709 for {
33710 if v_0.Op != OpSignExt8to32 {
33711 break
33712 }
33713 x := v_0.Args[0]
33714 v.reset(OpSignExt8to16)
33715 v.AddArg(x)
33716 return true
33717 }
33718
33719
33720 for {
33721 if v_0.Op != OpSignExt16to32 {
33722 break
33723 }
33724 x := v_0.Args[0]
33725 v.copyOf(x)
33726 return true
33727 }
33728
33729
33730
33731 for {
33732 if v_0.Op != OpAnd32 {
33733 break
33734 }
33735 _ = v_0.Args[1]
33736 v_0_0 := v_0.Args[0]
33737 v_0_1 := v_0.Args[1]
33738 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
33739 if v_0_0.Op != OpConst32 {
33740 continue
33741 }
33742 y := auxIntToInt32(v_0_0.AuxInt)
33743 x := v_0_1
33744 if !(y&0xFFFF == 0xFFFF) {
33745 continue
33746 }
33747 v.reset(OpTrunc32to16)
33748 v.AddArg(x)
33749 return true
33750 }
33751 break
33752 }
33753 return false
33754 }
33755 func rewriteValuegeneric_OpTrunc32to8(v *Value) bool {
33756 v_0 := v.Args[0]
33757
33758
33759 for {
33760 if v_0.Op != OpConst32 {
33761 break
33762 }
33763 c := auxIntToInt32(v_0.AuxInt)
33764 v.reset(OpConst8)
33765 v.AuxInt = int8ToAuxInt(int8(c))
33766 return true
33767 }
33768
33769
33770 for {
33771 if v_0.Op != OpZeroExt8to32 {
33772 break
33773 }
33774 x := v_0.Args[0]
33775 v.copyOf(x)
33776 return true
33777 }
33778
33779
33780 for {
33781 if v_0.Op != OpSignExt8to32 {
33782 break
33783 }
33784 x := v_0.Args[0]
33785 v.copyOf(x)
33786 return true
33787 }
33788
33789
33790
33791 for {
33792 if v_0.Op != OpAnd32 {
33793 break
33794 }
33795 _ = v_0.Args[1]
33796 v_0_0 := v_0.Args[0]
33797 v_0_1 := v_0.Args[1]
33798 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
33799 if v_0_0.Op != OpConst32 {
33800 continue
33801 }
33802 y := auxIntToInt32(v_0_0.AuxInt)
33803 x := v_0_1
33804 if !(y&0xFF == 0xFF) {
33805 continue
33806 }
33807 v.reset(OpTrunc32to8)
33808 v.AddArg(x)
33809 return true
33810 }
33811 break
33812 }
33813 return false
33814 }
33815 func rewriteValuegeneric_OpTrunc64to16(v *Value) bool {
33816 v_0 := v.Args[0]
33817
33818
33819 for {
33820 if v_0.Op != OpConst64 {
33821 break
33822 }
33823 c := auxIntToInt64(v_0.AuxInt)
33824 v.reset(OpConst16)
33825 v.AuxInt = int16ToAuxInt(int16(c))
33826 return true
33827 }
33828
33829
33830 for {
33831 if v_0.Op != OpZeroExt8to64 {
33832 break
33833 }
33834 x := v_0.Args[0]
33835 v.reset(OpZeroExt8to16)
33836 v.AddArg(x)
33837 return true
33838 }
33839
33840
33841 for {
33842 if v_0.Op != OpZeroExt16to64 {
33843 break
33844 }
33845 x := v_0.Args[0]
33846 v.copyOf(x)
33847 return true
33848 }
33849
33850
33851 for {
33852 if v_0.Op != OpSignExt8to64 {
33853 break
33854 }
33855 x := v_0.Args[0]
33856 v.reset(OpSignExt8to16)
33857 v.AddArg(x)
33858 return true
33859 }
33860
33861
33862 for {
33863 if v_0.Op != OpSignExt16to64 {
33864 break
33865 }
33866 x := v_0.Args[0]
33867 v.copyOf(x)
33868 return true
33869 }
33870
33871
33872
33873 for {
33874 if v_0.Op != OpAnd64 {
33875 break
33876 }
33877 _ = v_0.Args[1]
33878 v_0_0 := v_0.Args[0]
33879 v_0_1 := v_0.Args[1]
33880 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
33881 if v_0_0.Op != OpConst64 {
33882 continue
33883 }
33884 y := auxIntToInt64(v_0_0.AuxInt)
33885 x := v_0_1
33886 if !(y&0xFFFF == 0xFFFF) {
33887 continue
33888 }
33889 v.reset(OpTrunc64to16)
33890 v.AddArg(x)
33891 return true
33892 }
33893 break
33894 }
33895 return false
33896 }
33897 func rewriteValuegeneric_OpTrunc64to32(v *Value) bool {
33898 v_0 := v.Args[0]
33899
33900
33901 for {
33902 if v_0.Op != OpConst64 {
33903 break
33904 }
33905 c := auxIntToInt64(v_0.AuxInt)
33906 v.reset(OpConst32)
33907 v.AuxInt = int32ToAuxInt(int32(c))
33908 return true
33909 }
33910
33911
33912 for {
33913 if v_0.Op != OpZeroExt8to64 {
33914 break
33915 }
33916 x := v_0.Args[0]
33917 v.reset(OpZeroExt8to32)
33918 v.AddArg(x)
33919 return true
33920 }
33921
33922
33923 for {
33924 if v_0.Op != OpZeroExt16to64 {
33925 break
33926 }
33927 x := v_0.Args[0]
33928 v.reset(OpZeroExt16to32)
33929 v.AddArg(x)
33930 return true
33931 }
33932
33933
33934 for {
33935 if v_0.Op != OpZeroExt32to64 {
33936 break
33937 }
33938 x := v_0.Args[0]
33939 v.copyOf(x)
33940 return true
33941 }
33942
33943
33944 for {
33945 if v_0.Op != OpSignExt8to64 {
33946 break
33947 }
33948 x := v_0.Args[0]
33949 v.reset(OpSignExt8to32)
33950 v.AddArg(x)
33951 return true
33952 }
33953
33954
33955 for {
33956 if v_0.Op != OpSignExt16to64 {
33957 break
33958 }
33959 x := v_0.Args[0]
33960 v.reset(OpSignExt16to32)
33961 v.AddArg(x)
33962 return true
33963 }
33964
33965
33966 for {
33967 if v_0.Op != OpSignExt32to64 {
33968 break
33969 }
33970 x := v_0.Args[0]
33971 v.copyOf(x)
33972 return true
33973 }
33974
33975
33976
33977 for {
33978 if v_0.Op != OpAnd64 {
33979 break
33980 }
33981 _ = v_0.Args[1]
33982 v_0_0 := v_0.Args[0]
33983 v_0_1 := v_0.Args[1]
33984 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
33985 if v_0_0.Op != OpConst64 {
33986 continue
33987 }
33988 y := auxIntToInt64(v_0_0.AuxInt)
33989 x := v_0_1
33990 if !(y&0xFFFFFFFF == 0xFFFFFFFF) {
33991 continue
33992 }
33993 v.reset(OpTrunc64to32)
33994 v.AddArg(x)
33995 return true
33996 }
33997 break
33998 }
33999 return false
34000 }
34001 func rewriteValuegeneric_OpTrunc64to8(v *Value) bool {
34002 v_0 := v.Args[0]
34003
34004
34005 for {
34006 if v_0.Op != OpConst64 {
34007 break
34008 }
34009 c := auxIntToInt64(v_0.AuxInt)
34010 v.reset(OpConst8)
34011 v.AuxInt = int8ToAuxInt(int8(c))
34012 return true
34013 }
34014
34015
34016 for {
34017 if v_0.Op != OpZeroExt8to64 {
34018 break
34019 }
34020 x := v_0.Args[0]
34021 v.copyOf(x)
34022 return true
34023 }
34024
34025
34026 for {
34027 if v_0.Op != OpSignExt8to64 {
34028 break
34029 }
34030 x := v_0.Args[0]
34031 v.copyOf(x)
34032 return true
34033 }
34034
34035
34036
34037 for {
34038 if v_0.Op != OpAnd64 {
34039 break
34040 }
34041 _ = v_0.Args[1]
34042 v_0_0 := v_0.Args[0]
34043 v_0_1 := v_0.Args[1]
34044 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
34045 if v_0_0.Op != OpConst64 {
34046 continue
34047 }
34048 y := auxIntToInt64(v_0_0.AuxInt)
34049 x := v_0_1
34050 if !(y&0xFF == 0xFF) {
34051 continue
34052 }
34053 v.reset(OpTrunc64to8)
34054 v.AddArg(x)
34055 return true
34056 }
34057 break
34058 }
34059 return false
34060 }
34061 func rewriteValuegeneric_OpXor16(v *Value) bool {
34062 v_1 := v.Args[1]
34063 v_0 := v.Args[0]
34064 b := v.Block
34065 config := b.Func.Config
34066
34067
34068 for {
34069 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34070 if v_0.Op != OpConst16 {
34071 continue
34072 }
34073 c := auxIntToInt16(v_0.AuxInt)
34074 if v_1.Op != OpConst16 {
34075 continue
34076 }
34077 d := auxIntToInt16(v_1.AuxInt)
34078 v.reset(OpConst16)
34079 v.AuxInt = int16ToAuxInt(c ^ d)
34080 return true
34081 }
34082 break
34083 }
34084
34085
34086 for {
34087 x := v_0
34088 if x != v_1 {
34089 break
34090 }
34091 v.reset(OpConst16)
34092 v.AuxInt = int16ToAuxInt(0)
34093 return true
34094 }
34095
34096
34097 for {
34098 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34099 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 {
34100 continue
34101 }
34102 x := v_1
34103 v.copyOf(x)
34104 return true
34105 }
34106 break
34107 }
34108
34109
34110 for {
34111 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34112 if v_0.Op != OpCom16 {
34113 continue
34114 }
34115 x := v_0.Args[0]
34116 if x != v_1 {
34117 continue
34118 }
34119 v.reset(OpConst16)
34120 v.AuxInt = int16ToAuxInt(-1)
34121 return true
34122 }
34123 break
34124 }
34125
34126
34127 for {
34128 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34129 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != -1 {
34130 continue
34131 }
34132 x := v_1
34133 v.reset(OpCom16)
34134 v.AddArg(x)
34135 return true
34136 }
34137 break
34138 }
34139
34140
34141 for {
34142 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34143 x := v_0
34144 if v_1.Op != OpXor16 {
34145 continue
34146 }
34147 _ = v_1.Args[1]
34148 v_1_0 := v_1.Args[0]
34149 v_1_1 := v_1.Args[1]
34150 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
34151 if x != v_1_0 {
34152 continue
34153 }
34154 y := v_1_1
34155 v.copyOf(y)
34156 return true
34157 }
34158 }
34159 break
34160 }
34161
34162
34163
34164 for {
34165 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34166 if v_0.Op != OpXor16 {
34167 continue
34168 }
34169 _ = v_0.Args[1]
34170 v_0_0 := v_0.Args[0]
34171 v_0_1 := v_0.Args[1]
34172 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
34173 i := v_0_0
34174 if i.Op != OpConst16 {
34175 continue
34176 }
34177 t := i.Type
34178 z := v_0_1
34179 x := v_1
34180 if !(z.Op != OpConst16 && x.Op != OpConst16) {
34181 continue
34182 }
34183 v.reset(OpXor16)
34184 v0 := b.NewValue0(v.Pos, OpXor16, t)
34185 v0.AddArg2(z, x)
34186 v.AddArg2(i, v0)
34187 return true
34188 }
34189 }
34190 break
34191 }
34192
34193
34194 for {
34195 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34196 if v_0.Op != OpConst16 {
34197 continue
34198 }
34199 t := v_0.Type
34200 c := auxIntToInt16(v_0.AuxInt)
34201 if v_1.Op != OpXor16 {
34202 continue
34203 }
34204 _ = v_1.Args[1]
34205 v_1_0 := v_1.Args[0]
34206 v_1_1 := v_1.Args[1]
34207 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
34208 if v_1_0.Op != OpConst16 || v_1_0.Type != t {
34209 continue
34210 }
34211 d := auxIntToInt16(v_1_0.AuxInt)
34212 x := v_1_1
34213 v.reset(OpXor16)
34214 v0 := b.NewValue0(v.Pos, OpConst16, t)
34215 v0.AuxInt = int16ToAuxInt(c ^ d)
34216 v.AddArg2(v0, x)
34217 return true
34218 }
34219 }
34220 break
34221 }
34222
34223
34224
34225 for {
34226 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34227 if v_0.Op != OpLsh16x64 {
34228 continue
34229 }
34230 _ = v_0.Args[1]
34231 x := v_0.Args[0]
34232 z := v_0.Args[1]
34233 if z.Op != OpConst64 {
34234 continue
34235 }
34236 c := auxIntToInt64(z.AuxInt)
34237 if v_1.Op != OpRsh16Ux64 {
34238 continue
34239 }
34240 _ = v_1.Args[1]
34241 if x != v_1.Args[0] {
34242 continue
34243 }
34244 v_1_1 := v_1.Args[1]
34245 if v_1_1.Op != OpConst64 {
34246 continue
34247 }
34248 d := auxIntToInt64(v_1_1.AuxInt)
34249 if !(c < 16 && d == 16-c && canRotate(config, 16)) {
34250 continue
34251 }
34252 v.reset(OpRotateLeft16)
34253 v.AddArg2(x, z)
34254 return true
34255 }
34256 break
34257 }
34258
34259
34260
34261 for {
34262 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34263 left := v_0
34264 if left.Op != OpLsh16x64 {
34265 continue
34266 }
34267 y := left.Args[1]
34268 x := left.Args[0]
34269 right := v_1
34270 if right.Op != OpRsh16Ux64 {
34271 continue
34272 }
34273 _ = right.Args[1]
34274 if x != right.Args[0] {
34275 continue
34276 }
34277 right_1 := right.Args[1]
34278 if right_1.Op != OpSub64 {
34279 continue
34280 }
34281 _ = right_1.Args[1]
34282 right_1_0 := right_1.Args[0]
34283 if right_1_0.Op != OpConst64 || auxIntToInt64(right_1_0.AuxInt) != 16 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 16)) {
34284 continue
34285 }
34286 v.reset(OpRotateLeft16)
34287 v.AddArg2(x, y)
34288 return true
34289 }
34290 break
34291 }
34292
34293
34294
34295 for {
34296 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34297 left := v_0
34298 if left.Op != OpLsh16x32 {
34299 continue
34300 }
34301 y := left.Args[1]
34302 x := left.Args[0]
34303 right := v_1
34304 if right.Op != OpRsh16Ux32 {
34305 continue
34306 }
34307 _ = right.Args[1]
34308 if x != right.Args[0] {
34309 continue
34310 }
34311 right_1 := right.Args[1]
34312 if right_1.Op != OpSub32 {
34313 continue
34314 }
34315 _ = right_1.Args[1]
34316 right_1_0 := right_1.Args[0]
34317 if right_1_0.Op != OpConst32 || auxIntToInt32(right_1_0.AuxInt) != 16 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 16)) {
34318 continue
34319 }
34320 v.reset(OpRotateLeft16)
34321 v.AddArg2(x, y)
34322 return true
34323 }
34324 break
34325 }
34326
34327
34328
34329 for {
34330 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34331 left := v_0
34332 if left.Op != OpLsh16x16 {
34333 continue
34334 }
34335 y := left.Args[1]
34336 x := left.Args[0]
34337 right := v_1
34338 if right.Op != OpRsh16Ux16 {
34339 continue
34340 }
34341 _ = right.Args[1]
34342 if x != right.Args[0] {
34343 continue
34344 }
34345 right_1 := right.Args[1]
34346 if right_1.Op != OpSub16 {
34347 continue
34348 }
34349 _ = right_1.Args[1]
34350 right_1_0 := right_1.Args[0]
34351 if right_1_0.Op != OpConst16 || auxIntToInt16(right_1_0.AuxInt) != 16 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 16)) {
34352 continue
34353 }
34354 v.reset(OpRotateLeft16)
34355 v.AddArg2(x, y)
34356 return true
34357 }
34358 break
34359 }
34360
34361
34362
34363 for {
34364 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34365 left := v_0
34366 if left.Op != OpLsh16x8 {
34367 continue
34368 }
34369 y := left.Args[1]
34370 x := left.Args[0]
34371 right := v_1
34372 if right.Op != OpRsh16Ux8 {
34373 continue
34374 }
34375 _ = right.Args[1]
34376 if x != right.Args[0] {
34377 continue
34378 }
34379 right_1 := right.Args[1]
34380 if right_1.Op != OpSub8 {
34381 continue
34382 }
34383 _ = right_1.Args[1]
34384 right_1_0 := right_1.Args[0]
34385 if right_1_0.Op != OpConst8 || auxIntToInt8(right_1_0.AuxInt) != 16 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 16)) {
34386 continue
34387 }
34388 v.reset(OpRotateLeft16)
34389 v.AddArg2(x, y)
34390 return true
34391 }
34392 break
34393 }
34394
34395
34396
34397 for {
34398 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34399 right := v_0
34400 if right.Op != OpRsh16Ux64 {
34401 continue
34402 }
34403 y := right.Args[1]
34404 x := right.Args[0]
34405 left := v_1
34406 if left.Op != OpLsh16x64 {
34407 continue
34408 }
34409 _ = left.Args[1]
34410 if x != left.Args[0] {
34411 continue
34412 }
34413 z := left.Args[1]
34414 if z.Op != OpSub64 {
34415 continue
34416 }
34417 _ = z.Args[1]
34418 z_0 := z.Args[0]
34419 if z_0.Op != OpConst64 || auxIntToInt64(z_0.AuxInt) != 16 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 16)) {
34420 continue
34421 }
34422 v.reset(OpRotateLeft16)
34423 v.AddArg2(x, z)
34424 return true
34425 }
34426 break
34427 }
34428
34429
34430
34431 for {
34432 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34433 right := v_0
34434 if right.Op != OpRsh16Ux32 {
34435 continue
34436 }
34437 y := right.Args[1]
34438 x := right.Args[0]
34439 left := v_1
34440 if left.Op != OpLsh16x32 {
34441 continue
34442 }
34443 _ = left.Args[1]
34444 if x != left.Args[0] {
34445 continue
34446 }
34447 z := left.Args[1]
34448 if z.Op != OpSub32 {
34449 continue
34450 }
34451 _ = z.Args[1]
34452 z_0 := z.Args[0]
34453 if z_0.Op != OpConst32 || auxIntToInt32(z_0.AuxInt) != 16 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 16)) {
34454 continue
34455 }
34456 v.reset(OpRotateLeft16)
34457 v.AddArg2(x, z)
34458 return true
34459 }
34460 break
34461 }
34462
34463
34464
34465 for {
34466 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34467 right := v_0
34468 if right.Op != OpRsh16Ux16 {
34469 continue
34470 }
34471 y := right.Args[1]
34472 x := right.Args[0]
34473 left := v_1
34474 if left.Op != OpLsh16x16 {
34475 continue
34476 }
34477 _ = left.Args[1]
34478 if x != left.Args[0] {
34479 continue
34480 }
34481 z := left.Args[1]
34482 if z.Op != OpSub16 {
34483 continue
34484 }
34485 _ = z.Args[1]
34486 z_0 := z.Args[0]
34487 if z_0.Op != OpConst16 || auxIntToInt16(z_0.AuxInt) != 16 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 16)) {
34488 continue
34489 }
34490 v.reset(OpRotateLeft16)
34491 v.AddArg2(x, z)
34492 return true
34493 }
34494 break
34495 }
34496
34497
34498
34499 for {
34500 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34501 right := v_0
34502 if right.Op != OpRsh16Ux8 {
34503 continue
34504 }
34505 y := right.Args[1]
34506 x := right.Args[0]
34507 left := v_1
34508 if left.Op != OpLsh16x8 {
34509 continue
34510 }
34511 _ = left.Args[1]
34512 if x != left.Args[0] {
34513 continue
34514 }
34515 z := left.Args[1]
34516 if z.Op != OpSub8 {
34517 continue
34518 }
34519 _ = z.Args[1]
34520 z_0 := z.Args[0]
34521 if z_0.Op != OpConst8 || auxIntToInt8(z_0.AuxInt) != 16 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 16)) {
34522 continue
34523 }
34524 v.reset(OpRotateLeft16)
34525 v.AddArg2(x, z)
34526 return true
34527 }
34528 break
34529 }
34530 return false
34531 }
34532 func rewriteValuegeneric_OpXor32(v *Value) bool {
34533 v_1 := v.Args[1]
34534 v_0 := v.Args[0]
34535 b := v.Block
34536 config := b.Func.Config
34537
34538
34539 for {
34540 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34541 if v_0.Op != OpConst32 {
34542 continue
34543 }
34544 c := auxIntToInt32(v_0.AuxInt)
34545 if v_1.Op != OpConst32 {
34546 continue
34547 }
34548 d := auxIntToInt32(v_1.AuxInt)
34549 v.reset(OpConst32)
34550 v.AuxInt = int32ToAuxInt(c ^ d)
34551 return true
34552 }
34553 break
34554 }
34555
34556
34557 for {
34558 x := v_0
34559 if x != v_1 {
34560 break
34561 }
34562 v.reset(OpConst32)
34563 v.AuxInt = int32ToAuxInt(0)
34564 return true
34565 }
34566
34567
34568 for {
34569 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34570 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
34571 continue
34572 }
34573 x := v_1
34574 v.copyOf(x)
34575 return true
34576 }
34577 break
34578 }
34579
34580
34581 for {
34582 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34583 if v_0.Op != OpCom32 {
34584 continue
34585 }
34586 x := v_0.Args[0]
34587 if x != v_1 {
34588 continue
34589 }
34590 v.reset(OpConst32)
34591 v.AuxInt = int32ToAuxInt(-1)
34592 return true
34593 }
34594 break
34595 }
34596
34597
34598 for {
34599 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34600 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != -1 {
34601 continue
34602 }
34603 x := v_1
34604 v.reset(OpCom32)
34605 v.AddArg(x)
34606 return true
34607 }
34608 break
34609 }
34610
34611
34612 for {
34613 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34614 x := v_0
34615 if v_1.Op != OpXor32 {
34616 continue
34617 }
34618 _ = v_1.Args[1]
34619 v_1_0 := v_1.Args[0]
34620 v_1_1 := v_1.Args[1]
34621 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
34622 if x != v_1_0 {
34623 continue
34624 }
34625 y := v_1_1
34626 v.copyOf(y)
34627 return true
34628 }
34629 }
34630 break
34631 }
34632
34633
34634
34635 for {
34636 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34637 if v_0.Op != OpXor32 {
34638 continue
34639 }
34640 _ = v_0.Args[1]
34641 v_0_0 := v_0.Args[0]
34642 v_0_1 := v_0.Args[1]
34643 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
34644 i := v_0_0
34645 if i.Op != OpConst32 {
34646 continue
34647 }
34648 t := i.Type
34649 z := v_0_1
34650 x := v_1
34651 if !(z.Op != OpConst32 && x.Op != OpConst32) {
34652 continue
34653 }
34654 v.reset(OpXor32)
34655 v0 := b.NewValue0(v.Pos, OpXor32, t)
34656 v0.AddArg2(z, x)
34657 v.AddArg2(i, v0)
34658 return true
34659 }
34660 }
34661 break
34662 }
34663
34664
34665 for {
34666 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34667 if v_0.Op != OpConst32 {
34668 continue
34669 }
34670 t := v_0.Type
34671 c := auxIntToInt32(v_0.AuxInt)
34672 if v_1.Op != OpXor32 {
34673 continue
34674 }
34675 _ = v_1.Args[1]
34676 v_1_0 := v_1.Args[0]
34677 v_1_1 := v_1.Args[1]
34678 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
34679 if v_1_0.Op != OpConst32 || v_1_0.Type != t {
34680 continue
34681 }
34682 d := auxIntToInt32(v_1_0.AuxInt)
34683 x := v_1_1
34684 v.reset(OpXor32)
34685 v0 := b.NewValue0(v.Pos, OpConst32, t)
34686 v0.AuxInt = int32ToAuxInt(c ^ d)
34687 v.AddArg2(v0, x)
34688 return true
34689 }
34690 }
34691 break
34692 }
34693
34694
34695
34696 for {
34697 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34698 if v_0.Op != OpLsh32x64 {
34699 continue
34700 }
34701 _ = v_0.Args[1]
34702 x := v_0.Args[0]
34703 z := v_0.Args[1]
34704 if z.Op != OpConst64 {
34705 continue
34706 }
34707 c := auxIntToInt64(z.AuxInt)
34708 if v_1.Op != OpRsh32Ux64 {
34709 continue
34710 }
34711 _ = v_1.Args[1]
34712 if x != v_1.Args[0] {
34713 continue
34714 }
34715 v_1_1 := v_1.Args[1]
34716 if v_1_1.Op != OpConst64 {
34717 continue
34718 }
34719 d := auxIntToInt64(v_1_1.AuxInt)
34720 if !(c < 32 && d == 32-c && canRotate(config, 32)) {
34721 continue
34722 }
34723 v.reset(OpRotateLeft32)
34724 v.AddArg2(x, z)
34725 return true
34726 }
34727 break
34728 }
34729
34730
34731
34732 for {
34733 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34734 left := v_0
34735 if left.Op != OpLsh32x64 {
34736 continue
34737 }
34738 y := left.Args[1]
34739 x := left.Args[0]
34740 right := v_1
34741 if right.Op != OpRsh32Ux64 {
34742 continue
34743 }
34744 _ = right.Args[1]
34745 if x != right.Args[0] {
34746 continue
34747 }
34748 right_1 := right.Args[1]
34749 if right_1.Op != OpSub64 {
34750 continue
34751 }
34752 _ = right_1.Args[1]
34753 right_1_0 := right_1.Args[0]
34754 if right_1_0.Op != OpConst64 || auxIntToInt64(right_1_0.AuxInt) != 32 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 32)) {
34755 continue
34756 }
34757 v.reset(OpRotateLeft32)
34758 v.AddArg2(x, y)
34759 return true
34760 }
34761 break
34762 }
34763
34764
34765
34766 for {
34767 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34768 left := v_0
34769 if left.Op != OpLsh32x32 {
34770 continue
34771 }
34772 y := left.Args[1]
34773 x := left.Args[0]
34774 right := v_1
34775 if right.Op != OpRsh32Ux32 {
34776 continue
34777 }
34778 _ = right.Args[1]
34779 if x != right.Args[0] {
34780 continue
34781 }
34782 right_1 := right.Args[1]
34783 if right_1.Op != OpSub32 {
34784 continue
34785 }
34786 _ = right_1.Args[1]
34787 right_1_0 := right_1.Args[0]
34788 if right_1_0.Op != OpConst32 || auxIntToInt32(right_1_0.AuxInt) != 32 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 32)) {
34789 continue
34790 }
34791 v.reset(OpRotateLeft32)
34792 v.AddArg2(x, y)
34793 return true
34794 }
34795 break
34796 }
34797
34798
34799
34800 for {
34801 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34802 left := v_0
34803 if left.Op != OpLsh32x16 {
34804 continue
34805 }
34806 y := left.Args[1]
34807 x := left.Args[0]
34808 right := v_1
34809 if right.Op != OpRsh32Ux16 {
34810 continue
34811 }
34812 _ = right.Args[1]
34813 if x != right.Args[0] {
34814 continue
34815 }
34816 right_1 := right.Args[1]
34817 if right_1.Op != OpSub16 {
34818 continue
34819 }
34820 _ = right_1.Args[1]
34821 right_1_0 := right_1.Args[0]
34822 if right_1_0.Op != OpConst16 || auxIntToInt16(right_1_0.AuxInt) != 32 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 32)) {
34823 continue
34824 }
34825 v.reset(OpRotateLeft32)
34826 v.AddArg2(x, y)
34827 return true
34828 }
34829 break
34830 }
34831
34832
34833
34834 for {
34835 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34836 left := v_0
34837 if left.Op != OpLsh32x8 {
34838 continue
34839 }
34840 y := left.Args[1]
34841 x := left.Args[0]
34842 right := v_1
34843 if right.Op != OpRsh32Ux8 {
34844 continue
34845 }
34846 _ = right.Args[1]
34847 if x != right.Args[0] {
34848 continue
34849 }
34850 right_1 := right.Args[1]
34851 if right_1.Op != OpSub8 {
34852 continue
34853 }
34854 _ = right_1.Args[1]
34855 right_1_0 := right_1.Args[0]
34856 if right_1_0.Op != OpConst8 || auxIntToInt8(right_1_0.AuxInt) != 32 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 32)) {
34857 continue
34858 }
34859 v.reset(OpRotateLeft32)
34860 v.AddArg2(x, y)
34861 return true
34862 }
34863 break
34864 }
34865
34866
34867
34868 for {
34869 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34870 right := v_0
34871 if right.Op != OpRsh32Ux64 {
34872 continue
34873 }
34874 y := right.Args[1]
34875 x := right.Args[0]
34876 left := v_1
34877 if left.Op != OpLsh32x64 {
34878 continue
34879 }
34880 _ = left.Args[1]
34881 if x != left.Args[0] {
34882 continue
34883 }
34884 z := left.Args[1]
34885 if z.Op != OpSub64 {
34886 continue
34887 }
34888 _ = z.Args[1]
34889 z_0 := z.Args[0]
34890 if z_0.Op != OpConst64 || auxIntToInt64(z_0.AuxInt) != 32 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 32)) {
34891 continue
34892 }
34893 v.reset(OpRotateLeft32)
34894 v.AddArg2(x, z)
34895 return true
34896 }
34897 break
34898 }
34899
34900
34901
34902 for {
34903 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34904 right := v_0
34905 if right.Op != OpRsh32Ux32 {
34906 continue
34907 }
34908 y := right.Args[1]
34909 x := right.Args[0]
34910 left := v_1
34911 if left.Op != OpLsh32x32 {
34912 continue
34913 }
34914 _ = left.Args[1]
34915 if x != left.Args[0] {
34916 continue
34917 }
34918 z := left.Args[1]
34919 if z.Op != OpSub32 {
34920 continue
34921 }
34922 _ = z.Args[1]
34923 z_0 := z.Args[0]
34924 if z_0.Op != OpConst32 || auxIntToInt32(z_0.AuxInt) != 32 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 32)) {
34925 continue
34926 }
34927 v.reset(OpRotateLeft32)
34928 v.AddArg2(x, z)
34929 return true
34930 }
34931 break
34932 }
34933
34934
34935
34936 for {
34937 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34938 right := v_0
34939 if right.Op != OpRsh32Ux16 {
34940 continue
34941 }
34942 y := right.Args[1]
34943 x := right.Args[0]
34944 left := v_1
34945 if left.Op != OpLsh32x16 {
34946 continue
34947 }
34948 _ = left.Args[1]
34949 if x != left.Args[0] {
34950 continue
34951 }
34952 z := left.Args[1]
34953 if z.Op != OpSub16 {
34954 continue
34955 }
34956 _ = z.Args[1]
34957 z_0 := z.Args[0]
34958 if z_0.Op != OpConst16 || auxIntToInt16(z_0.AuxInt) != 32 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 32)) {
34959 continue
34960 }
34961 v.reset(OpRotateLeft32)
34962 v.AddArg2(x, z)
34963 return true
34964 }
34965 break
34966 }
34967
34968
34969
34970 for {
34971 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34972 right := v_0
34973 if right.Op != OpRsh32Ux8 {
34974 continue
34975 }
34976 y := right.Args[1]
34977 x := right.Args[0]
34978 left := v_1
34979 if left.Op != OpLsh32x8 {
34980 continue
34981 }
34982 _ = left.Args[1]
34983 if x != left.Args[0] {
34984 continue
34985 }
34986 z := left.Args[1]
34987 if z.Op != OpSub8 {
34988 continue
34989 }
34990 _ = z.Args[1]
34991 z_0 := z.Args[0]
34992 if z_0.Op != OpConst8 || auxIntToInt8(z_0.AuxInt) != 32 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 32)) {
34993 continue
34994 }
34995 v.reset(OpRotateLeft32)
34996 v.AddArg2(x, z)
34997 return true
34998 }
34999 break
35000 }
35001 return false
35002 }
35003 func rewriteValuegeneric_OpXor64(v *Value) bool {
35004 v_1 := v.Args[1]
35005 v_0 := v.Args[0]
35006 b := v.Block
35007 config := b.Func.Config
35008
35009
35010 for {
35011 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
35012 if v_0.Op != OpConst64 {
35013 continue
35014 }
35015 c := auxIntToInt64(v_0.AuxInt)
35016 if v_1.Op != OpConst64 {
35017 continue
35018 }
35019 d := auxIntToInt64(v_1.AuxInt)
35020 v.reset(OpConst64)
35021 v.AuxInt = int64ToAuxInt(c ^ d)
35022 return true
35023 }
35024 break
35025 }
35026
35027
35028 for {
35029 x := v_0
35030 if x != v_1 {
35031 break
35032 }
35033 v.reset(OpConst64)
35034 v.AuxInt = int64ToAuxInt(0)
35035 return true
35036 }
35037
35038
35039 for {
35040 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
35041 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
35042 continue
35043 }
35044 x := v_1
35045 v.copyOf(x)
35046 return true
35047 }
35048 break
35049 }
35050
35051
35052 for {
35053 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
35054 if v_0.Op != OpCom64 {
35055 continue
35056 }
35057 x := v_0.Args[0]
35058 if x != v_1 {
35059 continue
35060 }
35061 v.reset(OpConst64)
35062 v.AuxInt = int64ToAuxInt(-1)
35063 return true
35064 }
35065 break
35066 }
35067
35068
35069 for {
35070 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
35071 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != -1 {
35072 continue
35073 }
35074 x := v_1
35075 v.reset(OpCom64)
35076 v.AddArg(x)
35077 return true
35078 }
35079 break
35080 }
35081
35082
35083 for {
35084 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
35085 x := v_0
35086 if v_1.Op != OpXor64 {
35087 continue
35088 }
35089 _ = v_1.Args[1]
35090 v_1_0 := v_1.Args[0]
35091 v_1_1 := v_1.Args[1]
35092 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
35093 if x != v_1_0 {
35094 continue
35095 }
35096 y := v_1_1
35097 v.copyOf(y)
35098 return true
35099 }
35100 }
35101 break
35102 }
35103
35104
35105
35106 for {
35107 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
35108 if v_0.Op != OpXor64 {
35109 continue
35110 }
35111 _ = v_0.Args[1]
35112 v_0_0 := v_0.Args[0]
35113 v_0_1 := v_0.Args[1]
35114 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
35115 i := v_0_0
35116 if i.Op != OpConst64 {
35117 continue
35118 }
35119 t := i.Type
35120 z := v_0_1
35121 x := v_1
35122 if !(z.Op != OpConst64 && x.Op != OpConst64) {
35123 continue
35124 }
35125 v.reset(OpXor64)
35126 v0 := b.NewValue0(v.Pos, OpXor64, t)
35127 v0.AddArg2(z, x)
35128 v.AddArg2(i, v0)
35129 return true
35130 }
35131 }
35132 break
35133 }
35134
35135
35136 for {
35137 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
35138 if v_0.Op != OpConst64 {
35139 continue
35140 }
35141 t := v_0.Type
35142 c := auxIntToInt64(v_0.AuxInt)
35143 if v_1.Op != OpXor64 {
35144 continue
35145 }
35146 _ = v_1.Args[1]
35147 v_1_0 := v_1.Args[0]
35148 v_1_1 := v_1.Args[1]
35149 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
35150 if v_1_0.Op != OpConst64 || v_1_0.Type != t {
35151 continue
35152 }
35153 d := auxIntToInt64(v_1_0.AuxInt)
35154 x := v_1_1
35155 v.reset(OpXor64)
35156 v0 := b.NewValue0(v.Pos, OpConst64, t)
35157 v0.AuxInt = int64ToAuxInt(c ^ d)
35158 v.AddArg2(v0, x)
35159 return true
35160 }
35161 }
35162 break
35163 }
35164
35165
35166
35167 for {
35168 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
35169 if v_0.Op != OpLsh64x64 {
35170 continue
35171 }
35172 _ = v_0.Args[1]
35173 x := v_0.Args[0]
35174 z := v_0.Args[1]
35175 if z.Op != OpConst64 {
35176 continue
35177 }
35178 c := auxIntToInt64(z.AuxInt)
35179 if v_1.Op != OpRsh64Ux64 {
35180 continue
35181 }
35182 _ = v_1.Args[1]
35183 if x != v_1.Args[0] {
35184 continue
35185 }
35186 v_1_1 := v_1.Args[1]
35187 if v_1_1.Op != OpConst64 {
35188 continue
35189 }
35190 d := auxIntToInt64(v_1_1.AuxInt)
35191 if !(c < 64 && d == 64-c && canRotate(config, 64)) {
35192 continue
35193 }
35194 v.reset(OpRotateLeft64)
35195 v.AddArg2(x, z)
35196 return true
35197 }
35198 break
35199 }
35200
35201
35202
35203 for {
35204 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
35205 left := v_0
35206 if left.Op != OpLsh64x64 {
35207 continue
35208 }
35209 y := left.Args[1]
35210 x := left.Args[0]
35211 right := v_1
35212 if right.Op != OpRsh64Ux64 {
35213 continue
35214 }
35215 _ = right.Args[1]
35216 if x != right.Args[0] {
35217 continue
35218 }
35219 right_1 := right.Args[1]
35220 if right_1.Op != OpSub64 {
35221 continue
35222 }
35223 _ = right_1.Args[1]
35224 right_1_0 := right_1.Args[0]
35225 if right_1_0.Op != OpConst64 || auxIntToInt64(right_1_0.AuxInt) != 64 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 64)) {
35226 continue
35227 }
35228 v.reset(OpRotateLeft64)
35229 v.AddArg2(x, y)
35230 return true
35231 }
35232 break
35233 }
35234
35235
35236
35237 for {
35238 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
35239 left := v_0
35240 if left.Op != OpLsh64x32 {
35241 continue
35242 }
35243 y := left.Args[1]
35244 x := left.Args[0]
35245 right := v_1
35246 if right.Op != OpRsh64Ux32 {
35247 continue
35248 }
35249 _ = right.Args[1]
35250 if x != right.Args[0] {
35251 continue
35252 }
35253 right_1 := right.Args[1]
35254 if right_1.Op != OpSub32 {
35255 continue
35256 }
35257 _ = right_1.Args[1]
35258 right_1_0 := right_1.Args[0]
35259 if right_1_0.Op != OpConst32 || auxIntToInt32(right_1_0.AuxInt) != 64 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 64)) {
35260 continue
35261 }
35262 v.reset(OpRotateLeft64)
35263 v.AddArg2(x, y)
35264 return true
35265 }
35266 break
35267 }
35268
35269
35270
35271 for {
35272 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
35273 left := v_0
35274 if left.Op != OpLsh64x16 {
35275 continue
35276 }
35277 y := left.Args[1]
35278 x := left.Args[0]
35279 right := v_1
35280 if right.Op != OpRsh64Ux16 {
35281 continue
35282 }
35283 _ = right.Args[1]
35284 if x != right.Args[0] {
35285 continue
35286 }
35287 right_1 := right.Args[1]
35288 if right_1.Op != OpSub16 {
35289 continue
35290 }
35291 _ = right_1.Args[1]
35292 right_1_0 := right_1.Args[0]
35293 if right_1_0.Op != OpConst16 || auxIntToInt16(right_1_0.AuxInt) != 64 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 64)) {
35294 continue
35295 }
35296 v.reset(OpRotateLeft64)
35297 v.AddArg2(x, y)
35298 return true
35299 }
35300 break
35301 }
35302
35303
35304
35305 for {
35306 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
35307 left := v_0
35308 if left.Op != OpLsh64x8 {
35309 continue
35310 }
35311 y := left.Args[1]
35312 x := left.Args[0]
35313 right := v_1
35314 if right.Op != OpRsh64Ux8 {
35315 continue
35316 }
35317 _ = right.Args[1]
35318 if x != right.Args[0] {
35319 continue
35320 }
35321 right_1 := right.Args[1]
35322 if right_1.Op != OpSub8 {
35323 continue
35324 }
35325 _ = right_1.Args[1]
35326 right_1_0 := right_1.Args[0]
35327 if right_1_0.Op != OpConst8 || auxIntToInt8(right_1_0.AuxInt) != 64 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 64)) {
35328 continue
35329 }
35330 v.reset(OpRotateLeft64)
35331 v.AddArg2(x, y)
35332 return true
35333 }
35334 break
35335 }
35336
35337
35338
35339 for {
35340 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
35341 right := v_0
35342 if right.Op != OpRsh64Ux64 {
35343 continue
35344 }
35345 y := right.Args[1]
35346 x := right.Args[0]
35347 left := v_1
35348 if left.Op != OpLsh64x64 {
35349 continue
35350 }
35351 _ = left.Args[1]
35352 if x != left.Args[0] {
35353 continue
35354 }
35355 z := left.Args[1]
35356 if z.Op != OpSub64 {
35357 continue
35358 }
35359 _ = z.Args[1]
35360 z_0 := z.Args[0]
35361 if z_0.Op != OpConst64 || auxIntToInt64(z_0.AuxInt) != 64 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 64)) {
35362 continue
35363 }
35364 v.reset(OpRotateLeft64)
35365 v.AddArg2(x, z)
35366 return true
35367 }
35368 break
35369 }
35370
35371
35372
35373 for {
35374 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
35375 right := v_0
35376 if right.Op != OpRsh64Ux32 {
35377 continue
35378 }
35379 y := right.Args[1]
35380 x := right.Args[0]
35381 left := v_1
35382 if left.Op != OpLsh64x32 {
35383 continue
35384 }
35385 _ = left.Args[1]
35386 if x != left.Args[0] {
35387 continue
35388 }
35389 z := left.Args[1]
35390 if z.Op != OpSub32 {
35391 continue
35392 }
35393 _ = z.Args[1]
35394 z_0 := z.Args[0]
35395 if z_0.Op != OpConst32 || auxIntToInt32(z_0.AuxInt) != 64 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 64)) {
35396 continue
35397 }
35398 v.reset(OpRotateLeft64)
35399 v.AddArg2(x, z)
35400 return true
35401 }
35402 break
35403 }
35404
35405
35406
35407 for {
35408 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
35409 right := v_0
35410 if right.Op != OpRsh64Ux16 {
35411 continue
35412 }
35413 y := right.Args[1]
35414 x := right.Args[0]
35415 left := v_1
35416 if left.Op != OpLsh64x16 {
35417 continue
35418 }
35419 _ = left.Args[1]
35420 if x != left.Args[0] {
35421 continue
35422 }
35423 z := left.Args[1]
35424 if z.Op != OpSub16 {
35425 continue
35426 }
35427 _ = z.Args[1]
35428 z_0 := z.Args[0]
35429 if z_0.Op != OpConst16 || auxIntToInt16(z_0.AuxInt) != 64 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 64)) {
35430 continue
35431 }
35432 v.reset(OpRotateLeft64)
35433 v.AddArg2(x, z)
35434 return true
35435 }
35436 break
35437 }
35438
35439
35440
35441 for {
35442 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
35443 right := v_0
35444 if right.Op != OpRsh64Ux8 {
35445 continue
35446 }
35447 y := right.Args[1]
35448 x := right.Args[0]
35449 left := v_1
35450 if left.Op != OpLsh64x8 {
35451 continue
35452 }
35453 _ = left.Args[1]
35454 if x != left.Args[0] {
35455 continue
35456 }
35457 z := left.Args[1]
35458 if z.Op != OpSub8 {
35459 continue
35460 }
35461 _ = z.Args[1]
35462 z_0 := z.Args[0]
35463 if z_0.Op != OpConst8 || auxIntToInt8(z_0.AuxInt) != 64 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 64)) {
35464 continue
35465 }
35466 v.reset(OpRotateLeft64)
35467 v.AddArg2(x, z)
35468 return true
35469 }
35470 break
35471 }
35472 return false
35473 }
35474 func rewriteValuegeneric_OpXor8(v *Value) bool {
35475 v_1 := v.Args[1]
35476 v_0 := v.Args[0]
35477 b := v.Block
35478 config := b.Func.Config
35479
35480
35481 for {
35482 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
35483 if v_0.Op != OpConst8 {
35484 continue
35485 }
35486 c := auxIntToInt8(v_0.AuxInt)
35487 if v_1.Op != OpConst8 {
35488 continue
35489 }
35490 d := auxIntToInt8(v_1.AuxInt)
35491 v.reset(OpConst8)
35492 v.AuxInt = int8ToAuxInt(c ^ d)
35493 return true
35494 }
35495 break
35496 }
35497
35498
35499 for {
35500 x := v_0
35501 if x != v_1 {
35502 break
35503 }
35504 v.reset(OpConst8)
35505 v.AuxInt = int8ToAuxInt(0)
35506 return true
35507 }
35508
35509
35510 for {
35511 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
35512 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 {
35513 continue
35514 }
35515 x := v_1
35516 v.copyOf(x)
35517 return true
35518 }
35519 break
35520 }
35521
35522
35523 for {
35524 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
35525 if v_0.Op != OpCom8 {
35526 continue
35527 }
35528 x := v_0.Args[0]
35529 if x != v_1 {
35530 continue
35531 }
35532 v.reset(OpConst8)
35533 v.AuxInt = int8ToAuxInt(-1)
35534 return true
35535 }
35536 break
35537 }
35538
35539
35540 for {
35541 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
35542 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != -1 {
35543 continue
35544 }
35545 x := v_1
35546 v.reset(OpCom8)
35547 v.AddArg(x)
35548 return true
35549 }
35550 break
35551 }
35552
35553
35554 for {
35555 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
35556 x := v_0
35557 if v_1.Op != OpXor8 {
35558 continue
35559 }
35560 _ = v_1.Args[1]
35561 v_1_0 := v_1.Args[0]
35562 v_1_1 := v_1.Args[1]
35563 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
35564 if x != v_1_0 {
35565 continue
35566 }
35567 y := v_1_1
35568 v.copyOf(y)
35569 return true
35570 }
35571 }
35572 break
35573 }
35574
35575
35576
35577 for {
35578 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
35579 if v_0.Op != OpXor8 {
35580 continue
35581 }
35582 _ = v_0.Args[1]
35583 v_0_0 := v_0.Args[0]
35584 v_0_1 := v_0.Args[1]
35585 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
35586 i := v_0_0
35587 if i.Op != OpConst8 {
35588 continue
35589 }
35590 t := i.Type
35591 z := v_0_1
35592 x := v_1
35593 if !(z.Op != OpConst8 && x.Op != OpConst8) {
35594 continue
35595 }
35596 v.reset(OpXor8)
35597 v0 := b.NewValue0(v.Pos, OpXor8, t)
35598 v0.AddArg2(z, x)
35599 v.AddArg2(i, v0)
35600 return true
35601 }
35602 }
35603 break
35604 }
35605
35606
35607 for {
35608 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
35609 if v_0.Op != OpConst8 {
35610 continue
35611 }
35612 t := v_0.Type
35613 c := auxIntToInt8(v_0.AuxInt)
35614 if v_1.Op != OpXor8 {
35615 continue
35616 }
35617 _ = v_1.Args[1]
35618 v_1_0 := v_1.Args[0]
35619 v_1_1 := v_1.Args[1]
35620 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
35621 if v_1_0.Op != OpConst8 || v_1_0.Type != t {
35622 continue
35623 }
35624 d := auxIntToInt8(v_1_0.AuxInt)
35625 x := v_1_1
35626 v.reset(OpXor8)
35627 v0 := b.NewValue0(v.Pos, OpConst8, t)
35628 v0.AuxInt = int8ToAuxInt(c ^ d)
35629 v.AddArg2(v0, x)
35630 return true
35631 }
35632 }
35633 break
35634 }
35635
35636
35637
35638 for {
35639 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
35640 if v_0.Op != OpLsh8x64 {
35641 continue
35642 }
35643 _ = v_0.Args[1]
35644 x := v_0.Args[0]
35645 z := v_0.Args[1]
35646 if z.Op != OpConst64 {
35647 continue
35648 }
35649 c := auxIntToInt64(z.AuxInt)
35650 if v_1.Op != OpRsh8Ux64 {
35651 continue
35652 }
35653 _ = v_1.Args[1]
35654 if x != v_1.Args[0] {
35655 continue
35656 }
35657 v_1_1 := v_1.Args[1]
35658 if v_1_1.Op != OpConst64 {
35659 continue
35660 }
35661 d := auxIntToInt64(v_1_1.AuxInt)
35662 if !(c < 8 && d == 8-c && canRotate(config, 8)) {
35663 continue
35664 }
35665 v.reset(OpRotateLeft8)
35666 v.AddArg2(x, z)
35667 return true
35668 }
35669 break
35670 }
35671
35672
35673
35674 for {
35675 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
35676 left := v_0
35677 if left.Op != OpLsh8x64 {
35678 continue
35679 }
35680 y := left.Args[1]
35681 x := left.Args[0]
35682 right := v_1
35683 if right.Op != OpRsh8Ux64 {
35684 continue
35685 }
35686 _ = right.Args[1]
35687 if x != right.Args[0] {
35688 continue
35689 }
35690 right_1 := right.Args[1]
35691 if right_1.Op != OpSub64 {
35692 continue
35693 }
35694 _ = right_1.Args[1]
35695 right_1_0 := right_1.Args[0]
35696 if right_1_0.Op != OpConst64 || auxIntToInt64(right_1_0.AuxInt) != 8 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 8)) {
35697 continue
35698 }
35699 v.reset(OpRotateLeft8)
35700 v.AddArg2(x, y)
35701 return true
35702 }
35703 break
35704 }
35705
35706
35707
35708 for {
35709 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
35710 left := v_0
35711 if left.Op != OpLsh8x32 {
35712 continue
35713 }
35714 y := left.Args[1]
35715 x := left.Args[0]
35716 right := v_1
35717 if right.Op != OpRsh8Ux32 {
35718 continue
35719 }
35720 _ = right.Args[1]
35721 if x != right.Args[0] {
35722 continue
35723 }
35724 right_1 := right.Args[1]
35725 if right_1.Op != OpSub32 {
35726 continue
35727 }
35728 _ = right_1.Args[1]
35729 right_1_0 := right_1.Args[0]
35730 if right_1_0.Op != OpConst32 || auxIntToInt32(right_1_0.AuxInt) != 8 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 8)) {
35731 continue
35732 }
35733 v.reset(OpRotateLeft8)
35734 v.AddArg2(x, y)
35735 return true
35736 }
35737 break
35738 }
35739
35740
35741
35742 for {
35743 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
35744 left := v_0
35745 if left.Op != OpLsh8x16 {
35746 continue
35747 }
35748 y := left.Args[1]
35749 x := left.Args[0]
35750 right := v_1
35751 if right.Op != OpRsh8Ux16 {
35752 continue
35753 }
35754 _ = right.Args[1]
35755 if x != right.Args[0] {
35756 continue
35757 }
35758 right_1 := right.Args[1]
35759 if right_1.Op != OpSub16 {
35760 continue
35761 }
35762 _ = right_1.Args[1]
35763 right_1_0 := right_1.Args[0]
35764 if right_1_0.Op != OpConst16 || auxIntToInt16(right_1_0.AuxInt) != 8 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 8)) {
35765 continue
35766 }
35767 v.reset(OpRotateLeft8)
35768 v.AddArg2(x, y)
35769 return true
35770 }
35771 break
35772 }
35773
35774
35775
35776 for {
35777 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
35778 left := v_0
35779 if left.Op != OpLsh8x8 {
35780 continue
35781 }
35782 y := left.Args[1]
35783 x := left.Args[0]
35784 right := v_1
35785 if right.Op != OpRsh8Ux8 {
35786 continue
35787 }
35788 _ = right.Args[1]
35789 if x != right.Args[0] {
35790 continue
35791 }
35792 right_1 := right.Args[1]
35793 if right_1.Op != OpSub8 {
35794 continue
35795 }
35796 _ = right_1.Args[1]
35797 right_1_0 := right_1.Args[0]
35798 if right_1_0.Op != OpConst8 || auxIntToInt8(right_1_0.AuxInt) != 8 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 8)) {
35799 continue
35800 }
35801 v.reset(OpRotateLeft8)
35802 v.AddArg2(x, y)
35803 return true
35804 }
35805 break
35806 }
35807
35808
35809
35810 for {
35811 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
35812 right := v_0
35813 if right.Op != OpRsh8Ux64 {
35814 continue
35815 }
35816 y := right.Args[1]
35817 x := right.Args[0]
35818 left := v_1
35819 if left.Op != OpLsh8x64 {
35820 continue
35821 }
35822 _ = left.Args[1]
35823 if x != left.Args[0] {
35824 continue
35825 }
35826 z := left.Args[1]
35827 if z.Op != OpSub64 {
35828 continue
35829 }
35830 _ = z.Args[1]
35831 z_0 := z.Args[0]
35832 if z_0.Op != OpConst64 || auxIntToInt64(z_0.AuxInt) != 8 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 8)) {
35833 continue
35834 }
35835 v.reset(OpRotateLeft8)
35836 v.AddArg2(x, z)
35837 return true
35838 }
35839 break
35840 }
35841
35842
35843
35844 for {
35845 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
35846 right := v_0
35847 if right.Op != OpRsh8Ux32 {
35848 continue
35849 }
35850 y := right.Args[1]
35851 x := right.Args[0]
35852 left := v_1
35853 if left.Op != OpLsh8x32 {
35854 continue
35855 }
35856 _ = left.Args[1]
35857 if x != left.Args[0] {
35858 continue
35859 }
35860 z := left.Args[1]
35861 if z.Op != OpSub32 {
35862 continue
35863 }
35864 _ = z.Args[1]
35865 z_0 := z.Args[0]
35866 if z_0.Op != OpConst32 || auxIntToInt32(z_0.AuxInt) != 8 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 8)) {
35867 continue
35868 }
35869 v.reset(OpRotateLeft8)
35870 v.AddArg2(x, z)
35871 return true
35872 }
35873 break
35874 }
35875
35876
35877
35878 for {
35879 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
35880 right := v_0
35881 if right.Op != OpRsh8Ux16 {
35882 continue
35883 }
35884 y := right.Args[1]
35885 x := right.Args[0]
35886 left := v_1
35887 if left.Op != OpLsh8x16 {
35888 continue
35889 }
35890 _ = left.Args[1]
35891 if x != left.Args[0] {
35892 continue
35893 }
35894 z := left.Args[1]
35895 if z.Op != OpSub16 {
35896 continue
35897 }
35898 _ = z.Args[1]
35899 z_0 := z.Args[0]
35900 if z_0.Op != OpConst16 || auxIntToInt16(z_0.AuxInt) != 8 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 8)) {
35901 continue
35902 }
35903 v.reset(OpRotateLeft8)
35904 v.AddArg2(x, z)
35905 return true
35906 }
35907 break
35908 }
35909
35910
35911
35912 for {
35913 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
35914 right := v_0
35915 if right.Op != OpRsh8Ux8 {
35916 continue
35917 }
35918 y := right.Args[1]
35919 x := right.Args[0]
35920 left := v_1
35921 if left.Op != OpLsh8x8 {
35922 continue
35923 }
35924 _ = left.Args[1]
35925 if x != left.Args[0] {
35926 continue
35927 }
35928 z := left.Args[1]
35929 if z.Op != OpSub8 {
35930 continue
35931 }
35932 _ = z.Args[1]
35933 z_0 := z.Args[0]
35934 if z_0.Op != OpConst8 || auxIntToInt8(z_0.AuxInt) != 8 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 8)) {
35935 continue
35936 }
35937 v.reset(OpRotateLeft8)
35938 v.AddArg2(x, z)
35939 return true
35940 }
35941 break
35942 }
35943 return false
35944 }
35945 func rewriteValuegeneric_OpZero(v *Value) bool {
35946 v_1 := v.Args[1]
35947 v_0 := v.Args[0]
35948 b := v.Block
35949
35950
35951
35952 for {
35953 if v_0.Op != OpSelectN || auxIntToInt64(v_0.AuxInt) != 0 {
35954 break
35955 }
35956 call := v_0.Args[0]
35957 if call.Op != OpStaticLECall || len(call.Args) != 2 {
35958 break
35959 }
35960 mem := v_1
35961 if mem.Op != OpSelectN || auxIntToInt64(mem.AuxInt) != 1 || call != mem.Args[0] || !(isSameCall(call.Aux, "runtime.newobject")) {
35962 break
35963 }
35964 v.copyOf(mem)
35965 return true
35966 }
35967
35968
35969
35970 for {
35971 n := auxIntToInt64(v.AuxInt)
35972 t1 := auxToType(v.Aux)
35973 p1 := v_0
35974 store := v_1
35975 if store.Op != OpStore {
35976 break
35977 }
35978 t2 := auxToType(store.Aux)
35979 mem := store.Args[2]
35980 store_0 := store.Args[0]
35981 if store_0.Op != OpOffPtr {
35982 break
35983 }
35984 o2 := auxIntToInt64(store_0.AuxInt)
35985 p2 := store_0.Args[0]
35986 if !(isSamePtr(p1, p2) && store.Uses == 1 && n >= o2+t2.Size() && clobber(store)) {
35987 break
35988 }
35989 v.reset(OpZero)
35990 v.AuxInt = int64ToAuxInt(n)
35991 v.Aux = typeToAux(t1)
35992 v.AddArg2(p1, mem)
35993 return true
35994 }
35995
35996
35997
35998 for {
35999 n := auxIntToInt64(v.AuxInt)
36000 t := auxToType(v.Aux)
36001 dst1 := v_0
36002 move := v_1
36003 if move.Op != OpMove || auxIntToInt64(move.AuxInt) != n || auxToType(move.Aux) != t {
36004 break
36005 }
36006 mem := move.Args[2]
36007 dst2 := move.Args[0]
36008 if !(move.Uses == 1 && isSamePtr(dst1, dst2) && clobber(move)) {
36009 break
36010 }
36011 v.reset(OpZero)
36012 v.AuxInt = int64ToAuxInt(n)
36013 v.Aux = typeToAux(t)
36014 v.AddArg2(dst1, mem)
36015 return true
36016 }
36017
36018
36019
36020 for {
36021 n := auxIntToInt64(v.AuxInt)
36022 t := auxToType(v.Aux)
36023 dst1 := v_0
36024 vardef := v_1
36025 if vardef.Op != OpVarDef {
36026 break
36027 }
36028 x := auxToSym(vardef.Aux)
36029 move := vardef.Args[0]
36030 if move.Op != OpMove || auxIntToInt64(move.AuxInt) != n || auxToType(move.Aux) != t {
36031 break
36032 }
36033 mem := move.Args[2]
36034 dst2 := move.Args[0]
36035 if !(move.Uses == 1 && vardef.Uses == 1 && isSamePtr(dst1, dst2) && clobber(move, vardef)) {
36036 break
36037 }
36038 v.reset(OpZero)
36039 v.AuxInt = int64ToAuxInt(n)
36040 v.Aux = typeToAux(t)
36041 v0 := b.NewValue0(v.Pos, OpVarDef, types.TypeMem)
36042 v0.Aux = symToAux(x)
36043 v0.AddArg(mem)
36044 v.AddArg2(dst1, v0)
36045 return true
36046 }
36047
36048
36049
36050 for {
36051 s := auxIntToInt64(v.AuxInt)
36052 t := auxToType(v.Aux)
36053 dst1 := v_0
36054 zero := v_1
36055 if zero.Op != OpZero || auxIntToInt64(zero.AuxInt) != s || auxToType(zero.Aux) != t {
36056 break
36057 }
36058 dst2 := zero.Args[0]
36059 if !(isSamePtr(dst1, dst2)) {
36060 break
36061 }
36062 v.copyOf(zero)
36063 return true
36064 }
36065
36066
36067
36068 for {
36069 s := auxIntToInt64(v.AuxInt)
36070 t := auxToType(v.Aux)
36071 dst1 := v_0
36072 vardef := v_1
36073 if vardef.Op != OpVarDef {
36074 break
36075 }
36076 vardef_0 := vardef.Args[0]
36077 if vardef_0.Op != OpZero || auxIntToInt64(vardef_0.AuxInt) != s || auxToType(vardef_0.Aux) != t {
36078 break
36079 }
36080 dst2 := vardef_0.Args[0]
36081 if !(isSamePtr(dst1, dst2)) {
36082 break
36083 }
36084 v.copyOf(vardef)
36085 return true
36086 }
36087 return false
36088 }
36089 func rewriteValuegeneric_OpZeroExt16to32(v *Value) bool {
36090 v_0 := v.Args[0]
36091
36092
36093 for {
36094 if v_0.Op != OpConst16 {
36095 break
36096 }
36097 c := auxIntToInt16(v_0.AuxInt)
36098 v.reset(OpConst32)
36099 v.AuxInt = int32ToAuxInt(int32(uint16(c)))
36100 return true
36101 }
36102
36103
36104
36105 for {
36106 if v_0.Op != OpTrunc32to16 {
36107 break
36108 }
36109 x := v_0.Args[0]
36110 if x.Op != OpRsh32Ux64 {
36111 break
36112 }
36113 _ = x.Args[1]
36114 x_1 := x.Args[1]
36115 if x_1.Op != OpConst64 {
36116 break
36117 }
36118 s := auxIntToInt64(x_1.AuxInt)
36119 if !(s >= 16) {
36120 break
36121 }
36122 v.copyOf(x)
36123 return true
36124 }
36125 return false
36126 }
36127 func rewriteValuegeneric_OpZeroExt16to64(v *Value) bool {
36128 v_0 := v.Args[0]
36129
36130
36131 for {
36132 if v_0.Op != OpConst16 {
36133 break
36134 }
36135 c := auxIntToInt16(v_0.AuxInt)
36136 v.reset(OpConst64)
36137 v.AuxInt = int64ToAuxInt(int64(uint16(c)))
36138 return true
36139 }
36140
36141
36142
36143 for {
36144 if v_0.Op != OpTrunc64to16 {
36145 break
36146 }
36147 x := v_0.Args[0]
36148 if x.Op != OpRsh64Ux64 {
36149 break
36150 }
36151 _ = x.Args[1]
36152 x_1 := x.Args[1]
36153 if x_1.Op != OpConst64 {
36154 break
36155 }
36156 s := auxIntToInt64(x_1.AuxInt)
36157 if !(s >= 48) {
36158 break
36159 }
36160 v.copyOf(x)
36161 return true
36162 }
36163 return false
36164 }
36165 func rewriteValuegeneric_OpZeroExt32to64(v *Value) bool {
36166 v_0 := v.Args[0]
36167
36168
36169 for {
36170 if v_0.Op != OpConst32 {
36171 break
36172 }
36173 c := auxIntToInt32(v_0.AuxInt)
36174 v.reset(OpConst64)
36175 v.AuxInt = int64ToAuxInt(int64(uint32(c)))
36176 return true
36177 }
36178
36179
36180
36181 for {
36182 if v_0.Op != OpTrunc64to32 {
36183 break
36184 }
36185 x := v_0.Args[0]
36186 if x.Op != OpRsh64Ux64 {
36187 break
36188 }
36189 _ = x.Args[1]
36190 x_1 := x.Args[1]
36191 if x_1.Op != OpConst64 {
36192 break
36193 }
36194 s := auxIntToInt64(x_1.AuxInt)
36195 if !(s >= 32) {
36196 break
36197 }
36198 v.copyOf(x)
36199 return true
36200 }
36201 return false
36202 }
36203 func rewriteValuegeneric_OpZeroExt8to16(v *Value) bool {
36204 v_0 := v.Args[0]
36205
36206
36207 for {
36208 if v_0.Op != OpConst8 {
36209 break
36210 }
36211 c := auxIntToInt8(v_0.AuxInt)
36212 v.reset(OpConst16)
36213 v.AuxInt = int16ToAuxInt(int16(uint8(c)))
36214 return true
36215 }
36216
36217
36218
36219 for {
36220 if v_0.Op != OpTrunc16to8 {
36221 break
36222 }
36223 x := v_0.Args[0]
36224 if x.Op != OpRsh16Ux64 {
36225 break
36226 }
36227 _ = x.Args[1]
36228 x_1 := x.Args[1]
36229 if x_1.Op != OpConst64 {
36230 break
36231 }
36232 s := auxIntToInt64(x_1.AuxInt)
36233 if !(s >= 8) {
36234 break
36235 }
36236 v.copyOf(x)
36237 return true
36238 }
36239 return false
36240 }
36241 func rewriteValuegeneric_OpZeroExt8to32(v *Value) bool {
36242 v_0 := v.Args[0]
36243
36244
36245 for {
36246 if v_0.Op != OpConst8 {
36247 break
36248 }
36249 c := auxIntToInt8(v_0.AuxInt)
36250 v.reset(OpConst32)
36251 v.AuxInt = int32ToAuxInt(int32(uint8(c)))
36252 return true
36253 }
36254
36255
36256
36257 for {
36258 if v_0.Op != OpTrunc32to8 {
36259 break
36260 }
36261 x := v_0.Args[0]
36262 if x.Op != OpRsh32Ux64 {
36263 break
36264 }
36265 _ = x.Args[1]
36266 x_1 := x.Args[1]
36267 if x_1.Op != OpConst64 {
36268 break
36269 }
36270 s := auxIntToInt64(x_1.AuxInt)
36271 if !(s >= 24) {
36272 break
36273 }
36274 v.copyOf(x)
36275 return true
36276 }
36277 return false
36278 }
36279 func rewriteValuegeneric_OpZeroExt8to64(v *Value) bool {
36280 v_0 := v.Args[0]
36281
36282
36283 for {
36284 if v_0.Op != OpConst8 {
36285 break
36286 }
36287 c := auxIntToInt8(v_0.AuxInt)
36288 v.reset(OpConst64)
36289 v.AuxInt = int64ToAuxInt(int64(uint8(c)))
36290 return true
36291 }
36292
36293
36294
36295 for {
36296 if v_0.Op != OpTrunc64to8 {
36297 break
36298 }
36299 x := v_0.Args[0]
36300 if x.Op != OpRsh64Ux64 {
36301 break
36302 }
36303 _ = x.Args[1]
36304 x_1 := x.Args[1]
36305 if x_1.Op != OpConst64 {
36306 break
36307 }
36308 s := auxIntToInt64(x_1.AuxInt)
36309 if !(s >= 56) {
36310 break
36311 }
36312 v.copyOf(x)
36313 return true
36314 }
36315 return false
36316 }
36317 func rewriteBlockgeneric(b *Block) bool {
36318 switch b.Kind {
36319 case BlockIf:
36320
36321
36322 for b.Controls[0].Op == OpNot {
36323 v_0 := b.Controls[0]
36324 cond := v_0.Args[0]
36325 b.resetWithControl(BlockIf, cond)
36326 b.swapSuccessors()
36327 return true
36328 }
36329
36330
36331
36332 for b.Controls[0].Op == OpConstBool {
36333 v_0 := b.Controls[0]
36334 c := auxIntToBool(v_0.AuxInt)
36335 if !(c) {
36336 break
36337 }
36338 b.Reset(BlockFirst)
36339 return true
36340 }
36341
36342
36343
36344 for b.Controls[0].Op == OpConstBool {
36345 v_0 := b.Controls[0]
36346 c := auxIntToBool(v_0.AuxInt)
36347 if !(!c) {
36348 break
36349 }
36350 b.Reset(BlockFirst)
36351 b.swapSuccessors()
36352 return true
36353 }
36354 }
36355 return false
36356 }
36357
View as plain text