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 || !(oneBit(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 || !(oneBit(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 || !(oneBit(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 || !(oneBit(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 _typ := v_0
11207 if v_1.Op != OpStructMake || len(v_1.Args) != 1 {
11208 break
11209 }
11210 val := v_1.Args[0]
11211 v.reset(OpIMake)
11212 v.AddArg2(_typ, val)
11213 return true
11214 }
11215
11216
11217 for {
11218 _typ := v_0
11219 if v_1.Op != OpArrayMake1 {
11220 break
11221 }
11222 val := v_1.Args[0]
11223 v.reset(OpIMake)
11224 v.AddArg2(_typ, val)
11225 return true
11226 }
11227 return false
11228 }
11229 func rewriteValuegeneric_OpInterLECall(v *Value) bool {
11230
11231
11232 for {
11233 if len(v.Args) < 1 {
11234 break
11235 }
11236 v_0 := v.Args[0]
11237 if v_0.Op != OpAddr {
11238 break
11239 }
11240 fn := auxToSym(v_0.Aux)
11241 v_0_0 := v_0.Args[0]
11242 if v_0_0.Op != OpSB {
11243 break
11244 }
11245 v.copyOf(devirtLECall(v, fn.(*obj.LSym)))
11246 return true
11247 }
11248 return false
11249 }
11250 func rewriteValuegeneric_OpIsInBounds(v *Value) bool {
11251 v_1 := v.Args[1]
11252 v_0 := v.Args[0]
11253
11254
11255
11256 for {
11257 if v_0.Op != OpZeroExt8to32 || v_1.Op != OpConst32 {
11258 break
11259 }
11260 c := auxIntToInt32(v_1.AuxInt)
11261 if !((1 << 8) <= c) {
11262 break
11263 }
11264 v.reset(OpConstBool)
11265 v.AuxInt = boolToAuxInt(true)
11266 return true
11267 }
11268
11269
11270
11271 for {
11272 if v_0.Op != OpZeroExt8to64 || v_1.Op != OpConst64 {
11273 break
11274 }
11275 c := auxIntToInt64(v_1.AuxInt)
11276 if !((1 << 8) <= c) {
11277 break
11278 }
11279 v.reset(OpConstBool)
11280 v.AuxInt = boolToAuxInt(true)
11281 return true
11282 }
11283
11284
11285
11286 for {
11287 if v_0.Op != OpZeroExt16to32 || v_1.Op != OpConst32 {
11288 break
11289 }
11290 c := auxIntToInt32(v_1.AuxInt)
11291 if !((1 << 16) <= c) {
11292 break
11293 }
11294 v.reset(OpConstBool)
11295 v.AuxInt = boolToAuxInt(true)
11296 return true
11297 }
11298
11299
11300
11301 for {
11302 if v_0.Op != OpZeroExt16to64 || v_1.Op != OpConst64 {
11303 break
11304 }
11305 c := auxIntToInt64(v_1.AuxInt)
11306 if !((1 << 16) <= c) {
11307 break
11308 }
11309 v.reset(OpConstBool)
11310 v.AuxInt = boolToAuxInt(true)
11311 return true
11312 }
11313
11314
11315 for {
11316 x := v_0
11317 if x != v_1 {
11318 break
11319 }
11320 v.reset(OpConstBool)
11321 v.AuxInt = boolToAuxInt(false)
11322 return true
11323 }
11324
11325
11326
11327 for {
11328 if v_0.Op != OpAnd8 {
11329 break
11330 }
11331 v_0_0 := v_0.Args[0]
11332 v_0_1 := v_0.Args[1]
11333 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
11334 if v_0_0.Op != OpConst8 {
11335 continue
11336 }
11337 c := auxIntToInt8(v_0_0.AuxInt)
11338 if v_1.Op != OpConst8 {
11339 continue
11340 }
11341 d := auxIntToInt8(v_1.AuxInt)
11342 if !(0 <= c && c < d) {
11343 continue
11344 }
11345 v.reset(OpConstBool)
11346 v.AuxInt = boolToAuxInt(true)
11347 return true
11348 }
11349 break
11350 }
11351
11352
11353
11354 for {
11355 if v_0.Op != OpZeroExt8to16 {
11356 break
11357 }
11358 v_0_0 := v_0.Args[0]
11359 if v_0_0.Op != OpAnd8 {
11360 break
11361 }
11362 v_0_0_0 := v_0_0.Args[0]
11363 v_0_0_1 := v_0_0.Args[1]
11364 for _i0 := 0; _i0 <= 1; _i0, v_0_0_0, v_0_0_1 = _i0+1, v_0_0_1, v_0_0_0 {
11365 if v_0_0_0.Op != OpConst8 {
11366 continue
11367 }
11368 c := auxIntToInt8(v_0_0_0.AuxInt)
11369 if v_1.Op != OpConst16 {
11370 continue
11371 }
11372 d := auxIntToInt16(v_1.AuxInt)
11373 if !(0 <= c && int16(c) < d) {
11374 continue
11375 }
11376 v.reset(OpConstBool)
11377 v.AuxInt = boolToAuxInt(true)
11378 return true
11379 }
11380 break
11381 }
11382
11383
11384
11385 for {
11386 if v_0.Op != OpZeroExt8to32 {
11387 break
11388 }
11389 v_0_0 := v_0.Args[0]
11390 if v_0_0.Op != OpAnd8 {
11391 break
11392 }
11393 v_0_0_0 := v_0_0.Args[0]
11394 v_0_0_1 := v_0_0.Args[1]
11395 for _i0 := 0; _i0 <= 1; _i0, v_0_0_0, v_0_0_1 = _i0+1, v_0_0_1, v_0_0_0 {
11396 if v_0_0_0.Op != OpConst8 {
11397 continue
11398 }
11399 c := auxIntToInt8(v_0_0_0.AuxInt)
11400 if v_1.Op != OpConst32 {
11401 continue
11402 }
11403 d := auxIntToInt32(v_1.AuxInt)
11404 if !(0 <= c && int32(c) < d) {
11405 continue
11406 }
11407 v.reset(OpConstBool)
11408 v.AuxInt = boolToAuxInt(true)
11409 return true
11410 }
11411 break
11412 }
11413
11414
11415
11416 for {
11417 if v_0.Op != OpZeroExt8to64 {
11418 break
11419 }
11420 v_0_0 := v_0.Args[0]
11421 if v_0_0.Op != OpAnd8 {
11422 break
11423 }
11424 v_0_0_0 := v_0_0.Args[0]
11425 v_0_0_1 := v_0_0.Args[1]
11426 for _i0 := 0; _i0 <= 1; _i0, v_0_0_0, v_0_0_1 = _i0+1, v_0_0_1, v_0_0_0 {
11427 if v_0_0_0.Op != OpConst8 {
11428 continue
11429 }
11430 c := auxIntToInt8(v_0_0_0.AuxInt)
11431 if v_1.Op != OpConst64 {
11432 continue
11433 }
11434 d := auxIntToInt64(v_1.AuxInt)
11435 if !(0 <= c && int64(c) < d) {
11436 continue
11437 }
11438 v.reset(OpConstBool)
11439 v.AuxInt = boolToAuxInt(true)
11440 return true
11441 }
11442 break
11443 }
11444
11445
11446
11447 for {
11448 if v_0.Op != OpAnd16 {
11449 break
11450 }
11451 v_0_0 := v_0.Args[0]
11452 v_0_1 := v_0.Args[1]
11453 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
11454 if v_0_0.Op != OpConst16 {
11455 continue
11456 }
11457 c := auxIntToInt16(v_0_0.AuxInt)
11458 if v_1.Op != OpConst16 {
11459 continue
11460 }
11461 d := auxIntToInt16(v_1.AuxInt)
11462 if !(0 <= c && c < d) {
11463 continue
11464 }
11465 v.reset(OpConstBool)
11466 v.AuxInt = boolToAuxInt(true)
11467 return true
11468 }
11469 break
11470 }
11471
11472
11473
11474 for {
11475 if v_0.Op != OpZeroExt16to32 {
11476 break
11477 }
11478 v_0_0 := v_0.Args[0]
11479 if v_0_0.Op != OpAnd16 {
11480 break
11481 }
11482 v_0_0_0 := v_0_0.Args[0]
11483 v_0_0_1 := v_0_0.Args[1]
11484 for _i0 := 0; _i0 <= 1; _i0, v_0_0_0, v_0_0_1 = _i0+1, v_0_0_1, v_0_0_0 {
11485 if v_0_0_0.Op != OpConst16 {
11486 continue
11487 }
11488 c := auxIntToInt16(v_0_0_0.AuxInt)
11489 if v_1.Op != OpConst32 {
11490 continue
11491 }
11492 d := auxIntToInt32(v_1.AuxInt)
11493 if !(0 <= c && int32(c) < d) {
11494 continue
11495 }
11496 v.reset(OpConstBool)
11497 v.AuxInt = boolToAuxInt(true)
11498 return true
11499 }
11500 break
11501 }
11502
11503
11504
11505 for {
11506 if v_0.Op != OpZeroExt16to64 {
11507 break
11508 }
11509 v_0_0 := v_0.Args[0]
11510 if v_0_0.Op != OpAnd16 {
11511 break
11512 }
11513 v_0_0_0 := v_0_0.Args[0]
11514 v_0_0_1 := v_0_0.Args[1]
11515 for _i0 := 0; _i0 <= 1; _i0, v_0_0_0, v_0_0_1 = _i0+1, v_0_0_1, v_0_0_0 {
11516 if v_0_0_0.Op != OpConst16 {
11517 continue
11518 }
11519 c := auxIntToInt16(v_0_0_0.AuxInt)
11520 if v_1.Op != OpConst64 {
11521 continue
11522 }
11523 d := auxIntToInt64(v_1.AuxInt)
11524 if !(0 <= c && int64(c) < d) {
11525 continue
11526 }
11527 v.reset(OpConstBool)
11528 v.AuxInt = boolToAuxInt(true)
11529 return true
11530 }
11531 break
11532 }
11533
11534
11535
11536 for {
11537 if v_0.Op != OpAnd32 {
11538 break
11539 }
11540 v_0_0 := v_0.Args[0]
11541 v_0_1 := v_0.Args[1]
11542 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
11543 if v_0_0.Op != OpConst32 {
11544 continue
11545 }
11546 c := auxIntToInt32(v_0_0.AuxInt)
11547 if v_1.Op != OpConst32 {
11548 continue
11549 }
11550 d := auxIntToInt32(v_1.AuxInt)
11551 if !(0 <= c && c < d) {
11552 continue
11553 }
11554 v.reset(OpConstBool)
11555 v.AuxInt = boolToAuxInt(true)
11556 return true
11557 }
11558 break
11559 }
11560
11561
11562
11563 for {
11564 if v_0.Op != OpZeroExt32to64 {
11565 break
11566 }
11567 v_0_0 := v_0.Args[0]
11568 if v_0_0.Op != OpAnd32 {
11569 break
11570 }
11571 v_0_0_0 := v_0_0.Args[0]
11572 v_0_0_1 := v_0_0.Args[1]
11573 for _i0 := 0; _i0 <= 1; _i0, v_0_0_0, v_0_0_1 = _i0+1, v_0_0_1, v_0_0_0 {
11574 if v_0_0_0.Op != OpConst32 {
11575 continue
11576 }
11577 c := auxIntToInt32(v_0_0_0.AuxInt)
11578 if v_1.Op != OpConst64 {
11579 continue
11580 }
11581 d := auxIntToInt64(v_1.AuxInt)
11582 if !(0 <= c && int64(c) < d) {
11583 continue
11584 }
11585 v.reset(OpConstBool)
11586 v.AuxInt = boolToAuxInt(true)
11587 return true
11588 }
11589 break
11590 }
11591
11592
11593
11594 for {
11595 if v_0.Op != OpAnd64 {
11596 break
11597 }
11598 v_0_0 := v_0.Args[0]
11599 v_0_1 := v_0.Args[1]
11600 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
11601 if v_0_0.Op != OpConst64 {
11602 continue
11603 }
11604 c := auxIntToInt64(v_0_0.AuxInt)
11605 if v_1.Op != OpConst64 {
11606 continue
11607 }
11608 d := auxIntToInt64(v_1.AuxInt)
11609 if !(0 <= c && c < d) {
11610 continue
11611 }
11612 v.reset(OpConstBool)
11613 v.AuxInt = boolToAuxInt(true)
11614 return true
11615 }
11616 break
11617 }
11618
11619
11620 for {
11621 if v_0.Op != OpConst32 {
11622 break
11623 }
11624 c := auxIntToInt32(v_0.AuxInt)
11625 if v_1.Op != OpConst32 {
11626 break
11627 }
11628 d := auxIntToInt32(v_1.AuxInt)
11629 v.reset(OpConstBool)
11630 v.AuxInt = boolToAuxInt(0 <= c && c < d)
11631 return true
11632 }
11633
11634
11635 for {
11636 if v_0.Op != OpConst64 {
11637 break
11638 }
11639 c := auxIntToInt64(v_0.AuxInt)
11640 if v_1.Op != OpConst64 {
11641 break
11642 }
11643 d := auxIntToInt64(v_1.AuxInt)
11644 v.reset(OpConstBool)
11645 v.AuxInt = boolToAuxInt(0 <= c && c < d)
11646 return true
11647 }
11648
11649
11650 for {
11651 if v_0.Op != OpMod32u {
11652 break
11653 }
11654 y := v_0.Args[1]
11655 if y != v_1 {
11656 break
11657 }
11658 v.reset(OpConstBool)
11659 v.AuxInt = boolToAuxInt(true)
11660 return true
11661 }
11662
11663
11664 for {
11665 if v_0.Op != OpMod64u {
11666 break
11667 }
11668 y := v_0.Args[1]
11669 if y != v_1 {
11670 break
11671 }
11672 v.reset(OpConstBool)
11673 v.AuxInt = boolToAuxInt(true)
11674 return true
11675 }
11676
11677
11678
11679 for {
11680 if v_0.Op != OpZeroExt8to64 {
11681 break
11682 }
11683 v_0_0 := v_0.Args[0]
11684 if v_0_0.Op != OpRsh8Ux64 {
11685 break
11686 }
11687 _ = v_0_0.Args[1]
11688 v_0_0_1 := v_0_0.Args[1]
11689 if v_0_0_1.Op != OpConst64 {
11690 break
11691 }
11692 c := auxIntToInt64(v_0_0_1.AuxInt)
11693 if v_1.Op != OpConst64 {
11694 break
11695 }
11696 d := auxIntToInt64(v_1.AuxInt)
11697 if !(0 < c && c < 8 && 1<<uint(8-c)-1 < d) {
11698 break
11699 }
11700 v.reset(OpConstBool)
11701 v.AuxInt = boolToAuxInt(true)
11702 return true
11703 }
11704
11705
11706
11707 for {
11708 if v_0.Op != OpZeroExt8to32 {
11709 break
11710 }
11711 v_0_0 := v_0.Args[0]
11712 if v_0_0.Op != OpRsh8Ux64 {
11713 break
11714 }
11715 _ = v_0_0.Args[1]
11716 v_0_0_1 := v_0_0.Args[1]
11717 if v_0_0_1.Op != OpConst64 {
11718 break
11719 }
11720 c := auxIntToInt64(v_0_0_1.AuxInt)
11721 if v_1.Op != OpConst32 {
11722 break
11723 }
11724 d := auxIntToInt32(v_1.AuxInt)
11725 if !(0 < c && c < 8 && 1<<uint(8-c)-1 < d) {
11726 break
11727 }
11728 v.reset(OpConstBool)
11729 v.AuxInt = boolToAuxInt(true)
11730 return true
11731 }
11732
11733
11734
11735 for {
11736 if v_0.Op != OpZeroExt8to16 {
11737 break
11738 }
11739 v_0_0 := v_0.Args[0]
11740 if v_0_0.Op != OpRsh8Ux64 {
11741 break
11742 }
11743 _ = v_0_0.Args[1]
11744 v_0_0_1 := v_0_0.Args[1]
11745 if v_0_0_1.Op != OpConst64 {
11746 break
11747 }
11748 c := auxIntToInt64(v_0_0_1.AuxInt)
11749 if v_1.Op != OpConst16 {
11750 break
11751 }
11752 d := auxIntToInt16(v_1.AuxInt)
11753 if !(0 < c && c < 8 && 1<<uint(8-c)-1 < d) {
11754 break
11755 }
11756 v.reset(OpConstBool)
11757 v.AuxInt = boolToAuxInt(true)
11758 return true
11759 }
11760
11761
11762
11763 for {
11764 if v_0.Op != OpRsh8Ux64 {
11765 break
11766 }
11767 _ = v_0.Args[1]
11768 v_0_1 := v_0.Args[1]
11769 if v_0_1.Op != OpConst64 {
11770 break
11771 }
11772 c := auxIntToInt64(v_0_1.AuxInt)
11773 if v_1.Op != OpConst64 {
11774 break
11775 }
11776 d := auxIntToInt64(v_1.AuxInt)
11777 if !(0 < c && c < 8 && 1<<uint(8-c)-1 < d) {
11778 break
11779 }
11780 v.reset(OpConstBool)
11781 v.AuxInt = boolToAuxInt(true)
11782 return true
11783 }
11784
11785
11786
11787 for {
11788 if v_0.Op != OpZeroExt16to64 {
11789 break
11790 }
11791 v_0_0 := v_0.Args[0]
11792 if v_0_0.Op != OpRsh16Ux64 {
11793 break
11794 }
11795 _ = v_0_0.Args[1]
11796 v_0_0_1 := v_0_0.Args[1]
11797 if v_0_0_1.Op != OpConst64 {
11798 break
11799 }
11800 c := auxIntToInt64(v_0_0_1.AuxInt)
11801 if v_1.Op != OpConst64 {
11802 break
11803 }
11804 d := auxIntToInt64(v_1.AuxInt)
11805 if !(0 < c && c < 16 && 1<<uint(16-c)-1 < d) {
11806 break
11807 }
11808 v.reset(OpConstBool)
11809 v.AuxInt = boolToAuxInt(true)
11810 return true
11811 }
11812
11813
11814
11815 for {
11816 if v_0.Op != OpZeroExt16to32 {
11817 break
11818 }
11819 v_0_0 := v_0.Args[0]
11820 if v_0_0.Op != OpRsh16Ux64 {
11821 break
11822 }
11823 _ = v_0_0.Args[1]
11824 v_0_0_1 := v_0_0.Args[1]
11825 if v_0_0_1.Op != OpConst64 {
11826 break
11827 }
11828 c := auxIntToInt64(v_0_0_1.AuxInt)
11829 if v_1.Op != OpConst64 {
11830 break
11831 }
11832 d := auxIntToInt64(v_1.AuxInt)
11833 if !(0 < c && c < 16 && 1<<uint(16-c)-1 < d) {
11834 break
11835 }
11836 v.reset(OpConstBool)
11837 v.AuxInt = boolToAuxInt(true)
11838 return true
11839 }
11840
11841
11842
11843 for {
11844 if v_0.Op != OpRsh16Ux64 {
11845 break
11846 }
11847 _ = v_0.Args[1]
11848 v_0_1 := v_0.Args[1]
11849 if v_0_1.Op != OpConst64 {
11850 break
11851 }
11852 c := auxIntToInt64(v_0_1.AuxInt)
11853 if v_1.Op != OpConst64 {
11854 break
11855 }
11856 d := auxIntToInt64(v_1.AuxInt)
11857 if !(0 < c && c < 16 && 1<<uint(16-c)-1 < d) {
11858 break
11859 }
11860 v.reset(OpConstBool)
11861 v.AuxInt = boolToAuxInt(true)
11862 return true
11863 }
11864
11865
11866
11867 for {
11868 if v_0.Op != OpZeroExt32to64 {
11869 break
11870 }
11871 v_0_0 := v_0.Args[0]
11872 if v_0_0.Op != OpRsh32Ux64 {
11873 break
11874 }
11875 _ = v_0_0.Args[1]
11876 v_0_0_1 := v_0_0.Args[1]
11877 if v_0_0_1.Op != OpConst64 {
11878 break
11879 }
11880 c := auxIntToInt64(v_0_0_1.AuxInt)
11881 if v_1.Op != OpConst64 {
11882 break
11883 }
11884 d := auxIntToInt64(v_1.AuxInt)
11885 if !(0 < c && c < 32 && 1<<uint(32-c)-1 < d) {
11886 break
11887 }
11888 v.reset(OpConstBool)
11889 v.AuxInt = boolToAuxInt(true)
11890 return true
11891 }
11892
11893
11894
11895 for {
11896 if v_0.Op != OpRsh32Ux64 {
11897 break
11898 }
11899 _ = v_0.Args[1]
11900 v_0_1 := v_0.Args[1]
11901 if v_0_1.Op != OpConst64 {
11902 break
11903 }
11904 c := auxIntToInt64(v_0_1.AuxInt)
11905 if v_1.Op != OpConst64 {
11906 break
11907 }
11908 d := auxIntToInt64(v_1.AuxInt)
11909 if !(0 < c && c < 32 && 1<<uint(32-c)-1 < d) {
11910 break
11911 }
11912 v.reset(OpConstBool)
11913 v.AuxInt = boolToAuxInt(true)
11914 return true
11915 }
11916
11917
11918
11919 for {
11920 if v_0.Op != OpRsh64Ux64 {
11921 break
11922 }
11923 _ = v_0.Args[1]
11924 v_0_1 := v_0.Args[1]
11925 if v_0_1.Op != OpConst64 {
11926 break
11927 }
11928 c := auxIntToInt64(v_0_1.AuxInt)
11929 if v_1.Op != OpConst64 {
11930 break
11931 }
11932 d := auxIntToInt64(v_1.AuxInt)
11933 if !(0 < c && c < 64 && 1<<uint(64-c)-1 < d) {
11934 break
11935 }
11936 v.reset(OpConstBool)
11937 v.AuxInt = boolToAuxInt(true)
11938 return true
11939 }
11940 return false
11941 }
11942 func rewriteValuegeneric_OpIsNonNil(v *Value) bool {
11943 v_0 := v.Args[0]
11944
11945
11946 for {
11947 if v_0.Op != OpConstNil {
11948 break
11949 }
11950 v.reset(OpConstBool)
11951 v.AuxInt = boolToAuxInt(false)
11952 return true
11953 }
11954
11955
11956 for {
11957 if v_0.Op != OpConst32 {
11958 break
11959 }
11960 c := auxIntToInt32(v_0.AuxInt)
11961 v.reset(OpConstBool)
11962 v.AuxInt = boolToAuxInt(c != 0)
11963 return true
11964 }
11965
11966
11967 for {
11968 if v_0.Op != OpConst64 {
11969 break
11970 }
11971 c := auxIntToInt64(v_0.AuxInt)
11972 v.reset(OpConstBool)
11973 v.AuxInt = boolToAuxInt(c != 0)
11974 return true
11975 }
11976
11977
11978 for {
11979 if v_0.Op != OpAddr {
11980 break
11981 }
11982 v.reset(OpConstBool)
11983 v.AuxInt = boolToAuxInt(true)
11984 return true
11985 }
11986
11987
11988 for {
11989 if v_0.Op != OpConvert {
11990 break
11991 }
11992 v_0_0 := v_0.Args[0]
11993 if v_0_0.Op != OpAddr {
11994 break
11995 }
11996 v.reset(OpConstBool)
11997 v.AuxInt = boolToAuxInt(true)
11998 return true
11999 }
12000
12001
12002 for {
12003 if v_0.Op != OpLocalAddr {
12004 break
12005 }
12006 v.reset(OpConstBool)
12007 v.AuxInt = boolToAuxInt(true)
12008 return true
12009 }
12010 return false
12011 }
12012 func rewriteValuegeneric_OpIsSliceInBounds(v *Value) bool {
12013 v_1 := v.Args[1]
12014 v_0 := v.Args[0]
12015
12016
12017 for {
12018 x := v_0
12019 if x != v_1 {
12020 break
12021 }
12022 v.reset(OpConstBool)
12023 v.AuxInt = boolToAuxInt(true)
12024 return true
12025 }
12026
12027
12028
12029 for {
12030 if v_0.Op != OpAnd32 {
12031 break
12032 }
12033 v_0_0 := v_0.Args[0]
12034 v_0_1 := v_0.Args[1]
12035 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
12036 if v_0_0.Op != OpConst32 {
12037 continue
12038 }
12039 c := auxIntToInt32(v_0_0.AuxInt)
12040 if v_1.Op != OpConst32 {
12041 continue
12042 }
12043 d := auxIntToInt32(v_1.AuxInt)
12044 if !(0 <= c && c <= d) {
12045 continue
12046 }
12047 v.reset(OpConstBool)
12048 v.AuxInt = boolToAuxInt(true)
12049 return true
12050 }
12051 break
12052 }
12053
12054
12055
12056 for {
12057 if v_0.Op != OpAnd64 {
12058 break
12059 }
12060 v_0_0 := v_0.Args[0]
12061 v_0_1 := v_0.Args[1]
12062 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
12063 if v_0_0.Op != OpConst64 {
12064 continue
12065 }
12066 c := auxIntToInt64(v_0_0.AuxInt)
12067 if v_1.Op != OpConst64 {
12068 continue
12069 }
12070 d := auxIntToInt64(v_1.AuxInt)
12071 if !(0 <= c && c <= d) {
12072 continue
12073 }
12074 v.reset(OpConstBool)
12075 v.AuxInt = boolToAuxInt(true)
12076 return true
12077 }
12078 break
12079 }
12080
12081
12082 for {
12083 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
12084 break
12085 }
12086 v.reset(OpConstBool)
12087 v.AuxInt = boolToAuxInt(true)
12088 return true
12089 }
12090
12091
12092 for {
12093 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
12094 break
12095 }
12096 v.reset(OpConstBool)
12097 v.AuxInt = boolToAuxInt(true)
12098 return true
12099 }
12100
12101
12102 for {
12103 if v_0.Op != OpConst32 {
12104 break
12105 }
12106 c := auxIntToInt32(v_0.AuxInt)
12107 if v_1.Op != OpConst32 {
12108 break
12109 }
12110 d := auxIntToInt32(v_1.AuxInt)
12111 v.reset(OpConstBool)
12112 v.AuxInt = boolToAuxInt(0 <= c && c <= d)
12113 return true
12114 }
12115
12116
12117 for {
12118 if v_0.Op != OpConst64 {
12119 break
12120 }
12121 c := auxIntToInt64(v_0.AuxInt)
12122 if v_1.Op != OpConst64 {
12123 break
12124 }
12125 d := auxIntToInt64(v_1.AuxInt)
12126 v.reset(OpConstBool)
12127 v.AuxInt = boolToAuxInt(0 <= c && c <= d)
12128 return true
12129 }
12130
12131
12132 for {
12133 if v_0.Op != OpSliceLen {
12134 break
12135 }
12136 x := v_0.Args[0]
12137 if v_1.Op != OpSliceCap || x != v_1.Args[0] {
12138 break
12139 }
12140 v.reset(OpConstBool)
12141 v.AuxInt = boolToAuxInt(true)
12142 return true
12143 }
12144 return false
12145 }
12146 func rewriteValuegeneric_OpLeq16(v *Value) bool {
12147 v_1 := v.Args[1]
12148 v_0 := v.Args[0]
12149 b := v.Block
12150
12151
12152 for {
12153 if v_0.Op != OpConst16 {
12154 break
12155 }
12156 c := auxIntToInt16(v_0.AuxInt)
12157 if v_1.Op != OpConst16 {
12158 break
12159 }
12160 d := auxIntToInt16(v_1.AuxInt)
12161 v.reset(OpConstBool)
12162 v.AuxInt = boolToAuxInt(c <= d)
12163 return true
12164 }
12165
12166
12167
12168 for {
12169 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 || v_1.Op != OpAnd16 {
12170 break
12171 }
12172 _ = v_1.Args[1]
12173 v_1_0 := v_1.Args[0]
12174 v_1_1 := v_1.Args[1]
12175 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
12176 if v_1_1.Op != OpConst16 {
12177 continue
12178 }
12179 c := auxIntToInt16(v_1_1.AuxInt)
12180 if !(c >= 0) {
12181 continue
12182 }
12183 v.reset(OpConstBool)
12184 v.AuxInt = boolToAuxInt(true)
12185 return true
12186 }
12187 break
12188 }
12189
12190
12191
12192 for {
12193 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 || v_1.Op != OpRsh16Ux64 {
12194 break
12195 }
12196 _ = v_1.Args[1]
12197 v_1_1 := v_1.Args[1]
12198 if v_1_1.Op != OpConst64 {
12199 break
12200 }
12201 c := auxIntToInt64(v_1_1.AuxInt)
12202 if !(c > 0) {
12203 break
12204 }
12205 v.reset(OpConstBool)
12206 v.AuxInt = boolToAuxInt(true)
12207 return true
12208 }
12209
12210
12211 for {
12212 x := v_0
12213 if v_1.Op != OpConst16 {
12214 break
12215 }
12216 t := v_1.Type
12217 if auxIntToInt16(v_1.AuxInt) != -1 {
12218 break
12219 }
12220 v.reset(OpLess16)
12221 v0 := b.NewValue0(v.Pos, OpConst16, t)
12222 v0.AuxInt = int16ToAuxInt(0)
12223 v.AddArg2(x, v0)
12224 return true
12225 }
12226
12227
12228 for {
12229 if v_0.Op != OpConst16 {
12230 break
12231 }
12232 t := v_0.Type
12233 if auxIntToInt16(v_0.AuxInt) != 1 {
12234 break
12235 }
12236 x := v_1
12237 v.reset(OpLess16)
12238 v0 := b.NewValue0(v.Pos, OpConst16, t)
12239 v0.AuxInt = int16ToAuxInt(0)
12240 v.AddArg2(v0, x)
12241 return true
12242 }
12243
12244
12245 for {
12246 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != math.MinInt16 {
12247 break
12248 }
12249 v.reset(OpConstBool)
12250 v.AuxInt = boolToAuxInt(true)
12251 return true
12252 }
12253
12254
12255 for {
12256 if v_1.Op != OpConst16 || auxIntToInt16(v_1.AuxInt) != math.MaxInt16 {
12257 break
12258 }
12259 v.reset(OpConstBool)
12260 v.AuxInt = boolToAuxInt(true)
12261 return true
12262 }
12263
12264
12265 for {
12266 x := v_0
12267 c := v_1
12268 if c.Op != OpConst16 || auxIntToInt16(c.AuxInt) != math.MinInt16 {
12269 break
12270 }
12271 v.reset(OpEq16)
12272 v.AddArg2(x, c)
12273 return true
12274 }
12275
12276
12277 for {
12278 c := v_0
12279 if c.Op != OpConst16 || auxIntToInt16(c.AuxInt) != math.MaxInt16 {
12280 break
12281 }
12282 x := v_1
12283 v.reset(OpEq16)
12284 v.AddArg2(x, c)
12285 return true
12286 }
12287 return false
12288 }
12289 func rewriteValuegeneric_OpLeq16U(v *Value) bool {
12290 v_1 := v.Args[1]
12291 v_0 := v.Args[0]
12292 b := v.Block
12293
12294
12295 for {
12296 if v_0.Op != OpConst16 {
12297 break
12298 }
12299 c := auxIntToInt16(v_0.AuxInt)
12300 if v_1.Op != OpConst16 {
12301 break
12302 }
12303 d := auxIntToInt16(v_1.AuxInt)
12304 v.reset(OpConstBool)
12305 v.AuxInt = boolToAuxInt(uint16(c) <= uint16(d))
12306 return true
12307 }
12308
12309
12310 for {
12311 if v_0.Op != OpConst16 {
12312 break
12313 }
12314 t := v_0.Type
12315 if auxIntToInt16(v_0.AuxInt) != 1 {
12316 break
12317 }
12318 x := v_1
12319 v.reset(OpNeq16)
12320 v0 := b.NewValue0(v.Pos, OpConst16, t)
12321 v0.AuxInt = int16ToAuxInt(0)
12322 v.AddArg2(v0, x)
12323 return true
12324 }
12325
12326
12327 for {
12328 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 {
12329 break
12330 }
12331 v.reset(OpConstBool)
12332 v.AuxInt = boolToAuxInt(true)
12333 return true
12334 }
12335
12336
12337 for {
12338 if v_1.Op != OpConst16 || auxIntToInt16(v_1.AuxInt) != -1 {
12339 break
12340 }
12341 v.reset(OpConstBool)
12342 v.AuxInt = boolToAuxInt(true)
12343 return true
12344 }
12345
12346
12347 for {
12348 x := v_0
12349 c := v_1
12350 if c.Op != OpConst16 || auxIntToInt16(c.AuxInt) != 0 {
12351 break
12352 }
12353 v.reset(OpEq16)
12354 v.AddArg2(x, c)
12355 return true
12356 }
12357
12358
12359 for {
12360 c := v_0
12361 if c.Op != OpConst16 || auxIntToInt16(c.AuxInt) != -1 {
12362 break
12363 }
12364 x := v_1
12365 v.reset(OpEq16)
12366 v.AddArg2(x, c)
12367 return true
12368 }
12369 return false
12370 }
12371 func rewriteValuegeneric_OpLeq32(v *Value) bool {
12372 v_1 := v.Args[1]
12373 v_0 := v.Args[0]
12374 b := v.Block
12375
12376
12377 for {
12378 if v_0.Op != OpConst32 {
12379 break
12380 }
12381 c := auxIntToInt32(v_0.AuxInt)
12382 if v_1.Op != OpConst32 {
12383 break
12384 }
12385 d := auxIntToInt32(v_1.AuxInt)
12386 v.reset(OpConstBool)
12387 v.AuxInt = boolToAuxInt(c <= d)
12388 return true
12389 }
12390
12391
12392
12393 for {
12394 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 || v_1.Op != OpAnd32 {
12395 break
12396 }
12397 _ = v_1.Args[1]
12398 v_1_0 := v_1.Args[0]
12399 v_1_1 := v_1.Args[1]
12400 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
12401 if v_1_1.Op != OpConst32 {
12402 continue
12403 }
12404 c := auxIntToInt32(v_1_1.AuxInt)
12405 if !(c >= 0) {
12406 continue
12407 }
12408 v.reset(OpConstBool)
12409 v.AuxInt = boolToAuxInt(true)
12410 return true
12411 }
12412 break
12413 }
12414
12415
12416
12417 for {
12418 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 || v_1.Op != OpRsh32Ux64 {
12419 break
12420 }
12421 _ = v_1.Args[1]
12422 v_1_1 := v_1.Args[1]
12423 if v_1_1.Op != OpConst64 {
12424 break
12425 }
12426 c := auxIntToInt64(v_1_1.AuxInt)
12427 if !(c > 0) {
12428 break
12429 }
12430 v.reset(OpConstBool)
12431 v.AuxInt = boolToAuxInt(true)
12432 return true
12433 }
12434
12435
12436 for {
12437 x := v_0
12438 if v_1.Op != OpConst32 {
12439 break
12440 }
12441 t := v_1.Type
12442 if auxIntToInt32(v_1.AuxInt) != -1 {
12443 break
12444 }
12445 v.reset(OpLess32)
12446 v0 := b.NewValue0(v.Pos, OpConst32, t)
12447 v0.AuxInt = int32ToAuxInt(0)
12448 v.AddArg2(x, v0)
12449 return true
12450 }
12451
12452
12453 for {
12454 if v_0.Op != OpConst32 {
12455 break
12456 }
12457 t := v_0.Type
12458 if auxIntToInt32(v_0.AuxInt) != 1 {
12459 break
12460 }
12461 x := v_1
12462 v.reset(OpLess32)
12463 v0 := b.NewValue0(v.Pos, OpConst32, t)
12464 v0.AuxInt = int32ToAuxInt(0)
12465 v.AddArg2(v0, x)
12466 return true
12467 }
12468
12469
12470 for {
12471 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != math.MinInt32 {
12472 break
12473 }
12474 v.reset(OpConstBool)
12475 v.AuxInt = boolToAuxInt(true)
12476 return true
12477 }
12478
12479
12480 for {
12481 if v_1.Op != OpConst32 || auxIntToInt32(v_1.AuxInt) != math.MaxInt32 {
12482 break
12483 }
12484 v.reset(OpConstBool)
12485 v.AuxInt = boolToAuxInt(true)
12486 return true
12487 }
12488
12489
12490 for {
12491 x := v_0
12492 c := v_1
12493 if c.Op != OpConst32 || auxIntToInt32(c.AuxInt) != math.MinInt32 {
12494 break
12495 }
12496 v.reset(OpEq32)
12497 v.AddArg2(x, c)
12498 return true
12499 }
12500
12501
12502 for {
12503 c := v_0
12504 if c.Op != OpConst32 || auxIntToInt32(c.AuxInt) != math.MaxInt32 {
12505 break
12506 }
12507 x := v_1
12508 v.reset(OpEq32)
12509 v.AddArg2(x, c)
12510 return true
12511 }
12512 return false
12513 }
12514 func rewriteValuegeneric_OpLeq32F(v *Value) bool {
12515 v_1 := v.Args[1]
12516 v_0 := v.Args[0]
12517
12518
12519 for {
12520 if v_0.Op != OpConst32F {
12521 break
12522 }
12523 c := auxIntToFloat32(v_0.AuxInt)
12524 if v_1.Op != OpConst32F {
12525 break
12526 }
12527 d := auxIntToFloat32(v_1.AuxInt)
12528 v.reset(OpConstBool)
12529 v.AuxInt = boolToAuxInt(c <= d)
12530 return true
12531 }
12532 return false
12533 }
12534 func rewriteValuegeneric_OpLeq32U(v *Value) bool {
12535 v_1 := v.Args[1]
12536 v_0 := v.Args[0]
12537 b := v.Block
12538
12539
12540 for {
12541 if v_0.Op != OpConst32 {
12542 break
12543 }
12544 c := auxIntToInt32(v_0.AuxInt)
12545 if v_1.Op != OpConst32 {
12546 break
12547 }
12548 d := auxIntToInt32(v_1.AuxInt)
12549 v.reset(OpConstBool)
12550 v.AuxInt = boolToAuxInt(uint32(c) <= uint32(d))
12551 return true
12552 }
12553
12554
12555 for {
12556 if v_0.Op != OpConst32 {
12557 break
12558 }
12559 t := v_0.Type
12560 if auxIntToInt32(v_0.AuxInt) != 1 {
12561 break
12562 }
12563 x := v_1
12564 v.reset(OpNeq32)
12565 v0 := b.NewValue0(v.Pos, OpConst32, t)
12566 v0.AuxInt = int32ToAuxInt(0)
12567 v.AddArg2(v0, x)
12568 return true
12569 }
12570
12571
12572 for {
12573 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
12574 break
12575 }
12576 v.reset(OpConstBool)
12577 v.AuxInt = boolToAuxInt(true)
12578 return true
12579 }
12580
12581
12582 for {
12583 if v_1.Op != OpConst32 || auxIntToInt32(v_1.AuxInt) != -1 {
12584 break
12585 }
12586 v.reset(OpConstBool)
12587 v.AuxInt = boolToAuxInt(true)
12588 return true
12589 }
12590
12591
12592 for {
12593 x := v_0
12594 c := v_1
12595 if c.Op != OpConst32 || auxIntToInt32(c.AuxInt) != 0 {
12596 break
12597 }
12598 v.reset(OpEq32)
12599 v.AddArg2(x, c)
12600 return true
12601 }
12602
12603
12604 for {
12605 c := v_0
12606 if c.Op != OpConst32 || auxIntToInt32(c.AuxInt) != -1 {
12607 break
12608 }
12609 x := v_1
12610 v.reset(OpEq32)
12611 v.AddArg2(x, c)
12612 return true
12613 }
12614 return false
12615 }
12616 func rewriteValuegeneric_OpLeq64(v *Value) bool {
12617 v_1 := v.Args[1]
12618 v_0 := v.Args[0]
12619 b := v.Block
12620
12621
12622 for {
12623 if v_0.Op != OpConst64 {
12624 break
12625 }
12626 c := auxIntToInt64(v_0.AuxInt)
12627 if v_1.Op != OpConst64 {
12628 break
12629 }
12630 d := auxIntToInt64(v_1.AuxInt)
12631 v.reset(OpConstBool)
12632 v.AuxInt = boolToAuxInt(c <= d)
12633 return true
12634 }
12635
12636
12637
12638 for {
12639 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 || v_1.Op != OpAnd64 {
12640 break
12641 }
12642 _ = v_1.Args[1]
12643 v_1_0 := v_1.Args[0]
12644 v_1_1 := v_1.Args[1]
12645 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
12646 if v_1_1.Op != OpConst64 {
12647 continue
12648 }
12649 c := auxIntToInt64(v_1_1.AuxInt)
12650 if !(c >= 0) {
12651 continue
12652 }
12653 v.reset(OpConstBool)
12654 v.AuxInt = boolToAuxInt(true)
12655 return true
12656 }
12657 break
12658 }
12659
12660
12661
12662 for {
12663 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 || v_1.Op != OpRsh64Ux64 {
12664 break
12665 }
12666 _ = v_1.Args[1]
12667 v_1_1 := v_1.Args[1]
12668 if v_1_1.Op != OpConst64 {
12669 break
12670 }
12671 c := auxIntToInt64(v_1_1.AuxInt)
12672 if !(c > 0) {
12673 break
12674 }
12675 v.reset(OpConstBool)
12676 v.AuxInt = boolToAuxInt(true)
12677 return true
12678 }
12679
12680
12681 for {
12682 x := v_0
12683 if v_1.Op != OpConst64 {
12684 break
12685 }
12686 t := v_1.Type
12687 if auxIntToInt64(v_1.AuxInt) != -1 {
12688 break
12689 }
12690 v.reset(OpLess64)
12691 v0 := b.NewValue0(v.Pos, OpConst64, t)
12692 v0.AuxInt = int64ToAuxInt(0)
12693 v.AddArg2(x, v0)
12694 return true
12695 }
12696
12697
12698 for {
12699 if v_0.Op != OpConst64 {
12700 break
12701 }
12702 t := v_0.Type
12703 if auxIntToInt64(v_0.AuxInt) != 1 {
12704 break
12705 }
12706 x := v_1
12707 v.reset(OpLess64)
12708 v0 := b.NewValue0(v.Pos, OpConst64, t)
12709 v0.AuxInt = int64ToAuxInt(0)
12710 v.AddArg2(v0, x)
12711 return true
12712 }
12713
12714
12715 for {
12716 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != math.MinInt64 {
12717 break
12718 }
12719 v.reset(OpConstBool)
12720 v.AuxInt = boolToAuxInt(true)
12721 return true
12722 }
12723
12724
12725 for {
12726 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != math.MaxInt64 {
12727 break
12728 }
12729 v.reset(OpConstBool)
12730 v.AuxInt = boolToAuxInt(true)
12731 return true
12732 }
12733
12734
12735 for {
12736 x := v_0
12737 c := v_1
12738 if c.Op != OpConst64 || auxIntToInt64(c.AuxInt) != math.MinInt64 {
12739 break
12740 }
12741 v.reset(OpEq64)
12742 v.AddArg2(x, c)
12743 return true
12744 }
12745
12746
12747 for {
12748 c := v_0
12749 if c.Op != OpConst64 || auxIntToInt64(c.AuxInt) != math.MaxInt64 {
12750 break
12751 }
12752 x := v_1
12753 v.reset(OpEq64)
12754 v.AddArg2(x, c)
12755 return true
12756 }
12757 return false
12758 }
12759 func rewriteValuegeneric_OpLeq64F(v *Value) bool {
12760 v_1 := v.Args[1]
12761 v_0 := v.Args[0]
12762
12763
12764 for {
12765 if v_0.Op != OpConst64F {
12766 break
12767 }
12768 c := auxIntToFloat64(v_0.AuxInt)
12769 if v_1.Op != OpConst64F {
12770 break
12771 }
12772 d := auxIntToFloat64(v_1.AuxInt)
12773 v.reset(OpConstBool)
12774 v.AuxInt = boolToAuxInt(c <= d)
12775 return true
12776 }
12777 return false
12778 }
12779 func rewriteValuegeneric_OpLeq64U(v *Value) bool {
12780 v_1 := v.Args[1]
12781 v_0 := v.Args[0]
12782 b := v.Block
12783
12784
12785 for {
12786 if v_0.Op != OpConst64 {
12787 break
12788 }
12789 c := auxIntToInt64(v_0.AuxInt)
12790 if v_1.Op != OpConst64 {
12791 break
12792 }
12793 d := auxIntToInt64(v_1.AuxInt)
12794 v.reset(OpConstBool)
12795 v.AuxInt = boolToAuxInt(uint64(c) <= uint64(d))
12796 return true
12797 }
12798
12799
12800 for {
12801 if v_0.Op != OpConst64 {
12802 break
12803 }
12804 t := v_0.Type
12805 if auxIntToInt64(v_0.AuxInt) != 1 {
12806 break
12807 }
12808 x := v_1
12809 v.reset(OpNeq64)
12810 v0 := b.NewValue0(v.Pos, OpConst64, t)
12811 v0.AuxInt = int64ToAuxInt(0)
12812 v.AddArg2(v0, x)
12813 return true
12814 }
12815
12816
12817 for {
12818 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
12819 break
12820 }
12821 v.reset(OpConstBool)
12822 v.AuxInt = boolToAuxInt(true)
12823 return true
12824 }
12825
12826
12827 for {
12828 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != -1 {
12829 break
12830 }
12831 v.reset(OpConstBool)
12832 v.AuxInt = boolToAuxInt(true)
12833 return true
12834 }
12835
12836
12837 for {
12838 x := v_0
12839 c := v_1
12840 if c.Op != OpConst64 || auxIntToInt64(c.AuxInt) != 0 {
12841 break
12842 }
12843 v.reset(OpEq64)
12844 v.AddArg2(x, c)
12845 return true
12846 }
12847
12848
12849 for {
12850 c := v_0
12851 if c.Op != OpConst64 || auxIntToInt64(c.AuxInt) != -1 {
12852 break
12853 }
12854 x := v_1
12855 v.reset(OpEq64)
12856 v.AddArg2(x, c)
12857 return true
12858 }
12859 return false
12860 }
12861 func rewriteValuegeneric_OpLeq8(v *Value) bool {
12862 v_1 := v.Args[1]
12863 v_0 := v.Args[0]
12864 b := v.Block
12865
12866
12867 for {
12868 if v_0.Op != OpConst8 {
12869 break
12870 }
12871 c := auxIntToInt8(v_0.AuxInt)
12872 if v_1.Op != OpConst8 {
12873 break
12874 }
12875 d := auxIntToInt8(v_1.AuxInt)
12876 v.reset(OpConstBool)
12877 v.AuxInt = boolToAuxInt(c <= d)
12878 return true
12879 }
12880
12881
12882
12883 for {
12884 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 || v_1.Op != OpAnd8 {
12885 break
12886 }
12887 _ = v_1.Args[1]
12888 v_1_0 := v_1.Args[0]
12889 v_1_1 := v_1.Args[1]
12890 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
12891 if v_1_1.Op != OpConst8 {
12892 continue
12893 }
12894 c := auxIntToInt8(v_1_1.AuxInt)
12895 if !(c >= 0) {
12896 continue
12897 }
12898 v.reset(OpConstBool)
12899 v.AuxInt = boolToAuxInt(true)
12900 return true
12901 }
12902 break
12903 }
12904
12905
12906
12907 for {
12908 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 || v_1.Op != OpRsh8Ux64 {
12909 break
12910 }
12911 _ = v_1.Args[1]
12912 v_1_1 := v_1.Args[1]
12913 if v_1_1.Op != OpConst64 {
12914 break
12915 }
12916 c := auxIntToInt64(v_1_1.AuxInt)
12917 if !(c > 0) {
12918 break
12919 }
12920 v.reset(OpConstBool)
12921 v.AuxInt = boolToAuxInt(true)
12922 return true
12923 }
12924
12925
12926 for {
12927 x := v_0
12928 if v_1.Op != OpConst8 {
12929 break
12930 }
12931 t := v_1.Type
12932 if auxIntToInt8(v_1.AuxInt) != -1 {
12933 break
12934 }
12935 v.reset(OpLess8)
12936 v0 := b.NewValue0(v.Pos, OpConst8, t)
12937 v0.AuxInt = int8ToAuxInt(0)
12938 v.AddArg2(x, v0)
12939 return true
12940 }
12941
12942
12943 for {
12944 if v_0.Op != OpConst8 {
12945 break
12946 }
12947 t := v_0.Type
12948 if auxIntToInt8(v_0.AuxInt) != 1 {
12949 break
12950 }
12951 x := v_1
12952 v.reset(OpLess8)
12953 v0 := b.NewValue0(v.Pos, OpConst8, t)
12954 v0.AuxInt = int8ToAuxInt(0)
12955 v.AddArg2(v0, x)
12956 return true
12957 }
12958
12959
12960 for {
12961 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != math.MinInt8 {
12962 break
12963 }
12964 v.reset(OpConstBool)
12965 v.AuxInt = boolToAuxInt(true)
12966 return true
12967 }
12968
12969
12970 for {
12971 if v_1.Op != OpConst8 || auxIntToInt8(v_1.AuxInt) != math.MaxInt8 {
12972 break
12973 }
12974 v.reset(OpConstBool)
12975 v.AuxInt = boolToAuxInt(true)
12976 return true
12977 }
12978
12979
12980 for {
12981 x := v_0
12982 c := v_1
12983 if c.Op != OpConst8 || auxIntToInt8(c.AuxInt) != math.MinInt8 {
12984 break
12985 }
12986 v.reset(OpEq8)
12987 v.AddArg2(x, c)
12988 return true
12989 }
12990
12991
12992 for {
12993 c := v_0
12994 if c.Op != OpConst8 || auxIntToInt8(c.AuxInt) != math.MaxInt8 {
12995 break
12996 }
12997 x := v_1
12998 v.reset(OpEq8)
12999 v.AddArg2(x, c)
13000 return true
13001 }
13002 return false
13003 }
13004 func rewriteValuegeneric_OpLeq8U(v *Value) bool {
13005 v_1 := v.Args[1]
13006 v_0 := v.Args[0]
13007 b := v.Block
13008
13009
13010 for {
13011 if v_0.Op != OpConst8 {
13012 break
13013 }
13014 c := auxIntToInt8(v_0.AuxInt)
13015 if v_1.Op != OpConst8 {
13016 break
13017 }
13018 d := auxIntToInt8(v_1.AuxInt)
13019 v.reset(OpConstBool)
13020 v.AuxInt = boolToAuxInt(uint8(c) <= uint8(d))
13021 return true
13022 }
13023
13024
13025 for {
13026 if v_0.Op != OpConst8 {
13027 break
13028 }
13029 t := v_0.Type
13030 if auxIntToInt8(v_0.AuxInt) != 1 {
13031 break
13032 }
13033 x := v_1
13034 v.reset(OpNeq8)
13035 v0 := b.NewValue0(v.Pos, OpConst8, t)
13036 v0.AuxInt = int8ToAuxInt(0)
13037 v.AddArg2(v0, x)
13038 return true
13039 }
13040
13041
13042 for {
13043 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 {
13044 break
13045 }
13046 v.reset(OpConstBool)
13047 v.AuxInt = boolToAuxInt(true)
13048 return true
13049 }
13050
13051
13052 for {
13053 if v_1.Op != OpConst8 || auxIntToInt8(v_1.AuxInt) != -1 {
13054 break
13055 }
13056 v.reset(OpConstBool)
13057 v.AuxInt = boolToAuxInt(true)
13058 return true
13059 }
13060
13061
13062 for {
13063 x := v_0
13064 c := v_1
13065 if c.Op != OpConst8 || auxIntToInt8(c.AuxInt) != 0 {
13066 break
13067 }
13068 v.reset(OpEq8)
13069 v.AddArg2(x, c)
13070 return true
13071 }
13072
13073
13074 for {
13075 c := v_0
13076 if c.Op != OpConst8 || auxIntToInt8(c.AuxInt) != -1 {
13077 break
13078 }
13079 x := v_1
13080 v.reset(OpEq8)
13081 v.AddArg2(x, c)
13082 return true
13083 }
13084 return false
13085 }
13086 func rewriteValuegeneric_OpLess16(v *Value) bool {
13087 v_1 := v.Args[1]
13088 v_0 := v.Args[0]
13089 b := v.Block
13090
13091
13092 for {
13093 if v_0.Op != OpConst16 {
13094 break
13095 }
13096 c := auxIntToInt16(v_0.AuxInt)
13097 if v_1.Op != OpConst16 {
13098 break
13099 }
13100 d := auxIntToInt16(v_1.AuxInt)
13101 v.reset(OpConstBool)
13102 v.AuxInt = boolToAuxInt(c < d)
13103 return true
13104 }
13105
13106
13107
13108 for {
13109 if v_0.Op != OpConst16 {
13110 break
13111 }
13112 t := v_0.Type
13113 if auxIntToInt16(v_0.AuxInt) != 0 {
13114 break
13115 }
13116 x := v_1
13117 if !(isNonNegative(x)) {
13118 break
13119 }
13120 v.reset(OpNeq16)
13121 v0 := b.NewValue0(v.Pos, OpConst16, t)
13122 v0.AuxInt = int16ToAuxInt(0)
13123 v.AddArg2(v0, x)
13124 return true
13125 }
13126
13127
13128
13129 for {
13130 x := v_0
13131 if v_1.Op != OpConst16 {
13132 break
13133 }
13134 t := v_1.Type
13135 if auxIntToInt16(v_1.AuxInt) != 1 || !(isNonNegative(x)) {
13136 break
13137 }
13138 v.reset(OpEq16)
13139 v0 := b.NewValue0(v.Pos, OpConst16, t)
13140 v0.AuxInt = int16ToAuxInt(0)
13141 v.AddArg2(v0, x)
13142 return true
13143 }
13144
13145
13146 for {
13147 x := v_0
13148 if v_1.Op != OpConst16 {
13149 break
13150 }
13151 t := v_1.Type
13152 if auxIntToInt16(v_1.AuxInt) != 1 {
13153 break
13154 }
13155 v.reset(OpLeq16)
13156 v0 := b.NewValue0(v.Pos, OpConst16, t)
13157 v0.AuxInt = int16ToAuxInt(0)
13158 v.AddArg2(x, v0)
13159 return true
13160 }
13161
13162
13163 for {
13164 if v_0.Op != OpConst16 {
13165 break
13166 }
13167 t := v_0.Type
13168 if auxIntToInt16(v_0.AuxInt) != -1 {
13169 break
13170 }
13171 x := v_1
13172 v.reset(OpLeq16)
13173 v0 := b.NewValue0(v.Pos, OpConst16, t)
13174 v0.AuxInt = int16ToAuxInt(0)
13175 v.AddArg2(v0, x)
13176 return true
13177 }
13178
13179
13180 for {
13181 if v_1.Op != OpConst16 || auxIntToInt16(v_1.AuxInt) != math.MinInt16 {
13182 break
13183 }
13184 v.reset(OpConstBool)
13185 v.AuxInt = boolToAuxInt(false)
13186 return true
13187 }
13188
13189
13190 for {
13191 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != math.MaxInt16 {
13192 break
13193 }
13194 v.reset(OpConstBool)
13195 v.AuxInt = boolToAuxInt(false)
13196 return true
13197 }
13198
13199
13200 for {
13201 x := v_0
13202 if v_1.Op != OpConst16 {
13203 break
13204 }
13205 t := v_1.Type
13206 if auxIntToInt16(v_1.AuxInt) != math.MinInt16+1 {
13207 break
13208 }
13209 v.reset(OpEq16)
13210 v0 := b.NewValue0(v.Pos, OpConst16, t)
13211 v0.AuxInt = int16ToAuxInt(math.MinInt16)
13212 v.AddArg2(x, v0)
13213 return true
13214 }
13215
13216
13217 for {
13218 if v_0.Op != OpConst16 {
13219 break
13220 }
13221 t := v_0.Type
13222 if auxIntToInt16(v_0.AuxInt) != math.MaxInt16-1 {
13223 break
13224 }
13225 x := v_1
13226 v.reset(OpEq16)
13227 v0 := b.NewValue0(v.Pos, OpConst16, t)
13228 v0.AuxInt = int16ToAuxInt(math.MaxInt16)
13229 v.AddArg2(x, v0)
13230 return true
13231 }
13232 return false
13233 }
13234 func rewriteValuegeneric_OpLess16U(v *Value) bool {
13235 v_1 := v.Args[1]
13236 v_0 := v.Args[0]
13237 b := v.Block
13238
13239
13240 for {
13241 if v_0.Op != OpConst16 {
13242 break
13243 }
13244 c := auxIntToInt16(v_0.AuxInt)
13245 if v_1.Op != OpConst16 {
13246 break
13247 }
13248 d := auxIntToInt16(v_1.AuxInt)
13249 v.reset(OpConstBool)
13250 v.AuxInt = boolToAuxInt(uint16(c) < uint16(d))
13251 return true
13252 }
13253
13254
13255 for {
13256 x := v_0
13257 if v_1.Op != OpConst16 {
13258 break
13259 }
13260 t := v_1.Type
13261 if auxIntToInt16(v_1.AuxInt) != 1 {
13262 break
13263 }
13264 v.reset(OpEq16)
13265 v0 := b.NewValue0(v.Pos, OpConst16, t)
13266 v0.AuxInt = int16ToAuxInt(0)
13267 v.AddArg2(v0, x)
13268 return true
13269 }
13270
13271
13272 for {
13273 if v_1.Op != OpConst16 || auxIntToInt16(v_1.AuxInt) != 0 {
13274 break
13275 }
13276 v.reset(OpConstBool)
13277 v.AuxInt = boolToAuxInt(false)
13278 return true
13279 }
13280
13281
13282 for {
13283 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != -1 {
13284 break
13285 }
13286 v.reset(OpConstBool)
13287 v.AuxInt = boolToAuxInt(false)
13288 return true
13289 }
13290
13291
13292 for {
13293 x := v_0
13294 if v_1.Op != OpConst16 {
13295 break
13296 }
13297 t := v_1.Type
13298 if auxIntToInt16(v_1.AuxInt) != 1 {
13299 break
13300 }
13301 v.reset(OpEq16)
13302 v0 := b.NewValue0(v.Pos, OpConst16, t)
13303 v0.AuxInt = int16ToAuxInt(0)
13304 v.AddArg2(x, v0)
13305 return true
13306 }
13307
13308
13309 for {
13310 if v_0.Op != OpConst16 {
13311 break
13312 }
13313 t := v_0.Type
13314 if auxIntToInt16(v_0.AuxInt) != -2 {
13315 break
13316 }
13317 x := v_1
13318 v.reset(OpEq16)
13319 v0 := b.NewValue0(v.Pos, OpConst16, t)
13320 v0.AuxInt = int16ToAuxInt(-1)
13321 v.AddArg2(x, v0)
13322 return true
13323 }
13324 return false
13325 }
13326 func rewriteValuegeneric_OpLess32(v *Value) bool {
13327 v_1 := v.Args[1]
13328 v_0 := v.Args[0]
13329 b := v.Block
13330
13331
13332 for {
13333 if v_0.Op != OpConst32 {
13334 break
13335 }
13336 c := auxIntToInt32(v_0.AuxInt)
13337 if v_1.Op != OpConst32 {
13338 break
13339 }
13340 d := auxIntToInt32(v_1.AuxInt)
13341 v.reset(OpConstBool)
13342 v.AuxInt = boolToAuxInt(c < d)
13343 return true
13344 }
13345
13346
13347
13348 for {
13349 if v_0.Op != OpConst32 {
13350 break
13351 }
13352 t := v_0.Type
13353 if auxIntToInt32(v_0.AuxInt) != 0 {
13354 break
13355 }
13356 x := v_1
13357 if !(isNonNegative(x)) {
13358 break
13359 }
13360 v.reset(OpNeq32)
13361 v0 := b.NewValue0(v.Pos, OpConst32, t)
13362 v0.AuxInt = int32ToAuxInt(0)
13363 v.AddArg2(v0, x)
13364 return true
13365 }
13366
13367
13368
13369 for {
13370 x := v_0
13371 if v_1.Op != OpConst32 {
13372 break
13373 }
13374 t := v_1.Type
13375 if auxIntToInt32(v_1.AuxInt) != 1 || !(isNonNegative(x)) {
13376 break
13377 }
13378 v.reset(OpEq32)
13379 v0 := b.NewValue0(v.Pos, OpConst32, t)
13380 v0.AuxInt = int32ToAuxInt(0)
13381 v.AddArg2(v0, x)
13382 return true
13383 }
13384
13385
13386 for {
13387 x := v_0
13388 if v_1.Op != OpConst32 {
13389 break
13390 }
13391 t := v_1.Type
13392 if auxIntToInt32(v_1.AuxInt) != 1 {
13393 break
13394 }
13395 v.reset(OpLeq32)
13396 v0 := b.NewValue0(v.Pos, OpConst32, t)
13397 v0.AuxInt = int32ToAuxInt(0)
13398 v.AddArg2(x, v0)
13399 return true
13400 }
13401
13402
13403 for {
13404 if v_0.Op != OpConst32 {
13405 break
13406 }
13407 t := v_0.Type
13408 if auxIntToInt32(v_0.AuxInt) != -1 {
13409 break
13410 }
13411 x := v_1
13412 v.reset(OpLeq32)
13413 v0 := b.NewValue0(v.Pos, OpConst32, t)
13414 v0.AuxInt = int32ToAuxInt(0)
13415 v.AddArg2(v0, x)
13416 return true
13417 }
13418
13419
13420 for {
13421 if v_1.Op != OpConst32 || auxIntToInt32(v_1.AuxInt) != math.MinInt32 {
13422 break
13423 }
13424 v.reset(OpConstBool)
13425 v.AuxInt = boolToAuxInt(false)
13426 return true
13427 }
13428
13429
13430 for {
13431 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != math.MaxInt32 {
13432 break
13433 }
13434 v.reset(OpConstBool)
13435 v.AuxInt = boolToAuxInt(false)
13436 return true
13437 }
13438
13439
13440 for {
13441 x := v_0
13442 if v_1.Op != OpConst32 {
13443 break
13444 }
13445 t := v_1.Type
13446 if auxIntToInt32(v_1.AuxInt) != math.MinInt32+1 {
13447 break
13448 }
13449 v.reset(OpEq32)
13450 v0 := b.NewValue0(v.Pos, OpConst32, t)
13451 v0.AuxInt = int32ToAuxInt(math.MinInt32)
13452 v.AddArg2(x, v0)
13453 return true
13454 }
13455
13456
13457 for {
13458 if v_0.Op != OpConst32 {
13459 break
13460 }
13461 t := v_0.Type
13462 if auxIntToInt32(v_0.AuxInt) != math.MaxInt32-1 {
13463 break
13464 }
13465 x := v_1
13466 v.reset(OpEq32)
13467 v0 := b.NewValue0(v.Pos, OpConst32, t)
13468 v0.AuxInt = int32ToAuxInt(math.MaxInt32)
13469 v.AddArg2(x, v0)
13470 return true
13471 }
13472 return false
13473 }
13474 func rewriteValuegeneric_OpLess32F(v *Value) bool {
13475 v_1 := v.Args[1]
13476 v_0 := v.Args[0]
13477
13478
13479 for {
13480 if v_0.Op != OpConst32F {
13481 break
13482 }
13483 c := auxIntToFloat32(v_0.AuxInt)
13484 if v_1.Op != OpConst32F {
13485 break
13486 }
13487 d := auxIntToFloat32(v_1.AuxInt)
13488 v.reset(OpConstBool)
13489 v.AuxInt = boolToAuxInt(c < d)
13490 return true
13491 }
13492 return false
13493 }
13494 func rewriteValuegeneric_OpLess32U(v *Value) bool {
13495 v_1 := v.Args[1]
13496 v_0 := v.Args[0]
13497 b := v.Block
13498
13499
13500 for {
13501 if v_0.Op != OpConst32 {
13502 break
13503 }
13504 c := auxIntToInt32(v_0.AuxInt)
13505 if v_1.Op != OpConst32 {
13506 break
13507 }
13508 d := auxIntToInt32(v_1.AuxInt)
13509 v.reset(OpConstBool)
13510 v.AuxInt = boolToAuxInt(uint32(c) < uint32(d))
13511 return true
13512 }
13513
13514
13515 for {
13516 x := v_0
13517 if v_1.Op != OpConst32 {
13518 break
13519 }
13520 t := v_1.Type
13521 if auxIntToInt32(v_1.AuxInt) != 1 {
13522 break
13523 }
13524 v.reset(OpEq32)
13525 v0 := b.NewValue0(v.Pos, OpConst32, t)
13526 v0.AuxInt = int32ToAuxInt(0)
13527 v.AddArg2(v0, x)
13528 return true
13529 }
13530
13531
13532 for {
13533 if v_1.Op != OpConst32 || auxIntToInt32(v_1.AuxInt) != 0 {
13534 break
13535 }
13536 v.reset(OpConstBool)
13537 v.AuxInt = boolToAuxInt(false)
13538 return true
13539 }
13540
13541
13542 for {
13543 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != -1 {
13544 break
13545 }
13546 v.reset(OpConstBool)
13547 v.AuxInt = boolToAuxInt(false)
13548 return true
13549 }
13550
13551
13552 for {
13553 x := v_0
13554 if v_1.Op != OpConst32 {
13555 break
13556 }
13557 t := v_1.Type
13558 if auxIntToInt32(v_1.AuxInt) != 1 {
13559 break
13560 }
13561 v.reset(OpEq32)
13562 v0 := b.NewValue0(v.Pos, OpConst32, t)
13563 v0.AuxInt = int32ToAuxInt(0)
13564 v.AddArg2(x, v0)
13565 return true
13566 }
13567
13568
13569 for {
13570 if v_0.Op != OpConst32 {
13571 break
13572 }
13573 t := v_0.Type
13574 if auxIntToInt32(v_0.AuxInt) != -2 {
13575 break
13576 }
13577 x := v_1
13578 v.reset(OpEq32)
13579 v0 := b.NewValue0(v.Pos, OpConst32, t)
13580 v0.AuxInt = int32ToAuxInt(-1)
13581 v.AddArg2(x, v0)
13582 return true
13583 }
13584 return false
13585 }
13586 func rewriteValuegeneric_OpLess64(v *Value) bool {
13587 v_1 := v.Args[1]
13588 v_0 := v.Args[0]
13589 b := v.Block
13590
13591
13592 for {
13593 if v_0.Op != OpConst64 {
13594 break
13595 }
13596 c := auxIntToInt64(v_0.AuxInt)
13597 if v_1.Op != OpConst64 {
13598 break
13599 }
13600 d := auxIntToInt64(v_1.AuxInt)
13601 v.reset(OpConstBool)
13602 v.AuxInt = boolToAuxInt(c < d)
13603 return true
13604 }
13605
13606
13607
13608 for {
13609 if v_0.Op != OpConst64 {
13610 break
13611 }
13612 t := v_0.Type
13613 if auxIntToInt64(v_0.AuxInt) != 0 {
13614 break
13615 }
13616 x := v_1
13617 if !(isNonNegative(x)) {
13618 break
13619 }
13620 v.reset(OpNeq64)
13621 v0 := b.NewValue0(v.Pos, OpConst64, t)
13622 v0.AuxInt = int64ToAuxInt(0)
13623 v.AddArg2(v0, x)
13624 return true
13625 }
13626
13627
13628
13629 for {
13630 x := v_0
13631 if v_1.Op != OpConst64 {
13632 break
13633 }
13634 t := v_1.Type
13635 if auxIntToInt64(v_1.AuxInt) != 1 || !(isNonNegative(x)) {
13636 break
13637 }
13638 v.reset(OpEq64)
13639 v0 := b.NewValue0(v.Pos, OpConst64, t)
13640 v0.AuxInt = int64ToAuxInt(0)
13641 v.AddArg2(v0, x)
13642 return true
13643 }
13644
13645
13646 for {
13647 x := v_0
13648 if v_1.Op != OpConst64 {
13649 break
13650 }
13651 t := v_1.Type
13652 if auxIntToInt64(v_1.AuxInt) != 1 {
13653 break
13654 }
13655 v.reset(OpLeq64)
13656 v0 := b.NewValue0(v.Pos, OpConst64, t)
13657 v0.AuxInt = int64ToAuxInt(0)
13658 v.AddArg2(x, v0)
13659 return true
13660 }
13661
13662
13663 for {
13664 if v_0.Op != OpConst64 {
13665 break
13666 }
13667 t := v_0.Type
13668 if auxIntToInt64(v_0.AuxInt) != -1 {
13669 break
13670 }
13671 x := v_1
13672 v.reset(OpLeq64)
13673 v0 := b.NewValue0(v.Pos, OpConst64, t)
13674 v0.AuxInt = int64ToAuxInt(0)
13675 v.AddArg2(v0, x)
13676 return true
13677 }
13678
13679
13680 for {
13681 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != math.MinInt64 {
13682 break
13683 }
13684 v.reset(OpConstBool)
13685 v.AuxInt = boolToAuxInt(false)
13686 return true
13687 }
13688
13689
13690 for {
13691 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != math.MaxInt64 {
13692 break
13693 }
13694 v.reset(OpConstBool)
13695 v.AuxInt = boolToAuxInt(false)
13696 return true
13697 }
13698
13699
13700 for {
13701 x := v_0
13702 if v_1.Op != OpConst64 {
13703 break
13704 }
13705 t := v_1.Type
13706 if auxIntToInt64(v_1.AuxInt) != math.MinInt64+1 {
13707 break
13708 }
13709 v.reset(OpEq64)
13710 v0 := b.NewValue0(v.Pos, OpConst64, t)
13711 v0.AuxInt = int64ToAuxInt(math.MinInt64)
13712 v.AddArg2(x, v0)
13713 return true
13714 }
13715
13716
13717 for {
13718 if v_0.Op != OpConst64 {
13719 break
13720 }
13721 t := v_0.Type
13722 if auxIntToInt64(v_0.AuxInt) != math.MaxInt64-1 {
13723 break
13724 }
13725 x := v_1
13726 v.reset(OpEq64)
13727 v0 := b.NewValue0(v.Pos, OpConst64, t)
13728 v0.AuxInt = int64ToAuxInt(math.MaxInt64)
13729 v.AddArg2(x, v0)
13730 return true
13731 }
13732 return false
13733 }
13734 func rewriteValuegeneric_OpLess64F(v *Value) bool {
13735 v_1 := v.Args[1]
13736 v_0 := v.Args[0]
13737
13738
13739 for {
13740 if v_0.Op != OpConst64F {
13741 break
13742 }
13743 c := auxIntToFloat64(v_0.AuxInt)
13744 if v_1.Op != OpConst64F {
13745 break
13746 }
13747 d := auxIntToFloat64(v_1.AuxInt)
13748 v.reset(OpConstBool)
13749 v.AuxInt = boolToAuxInt(c < d)
13750 return true
13751 }
13752 return false
13753 }
13754 func rewriteValuegeneric_OpLess64U(v *Value) bool {
13755 v_1 := v.Args[1]
13756 v_0 := v.Args[0]
13757 b := v.Block
13758
13759
13760 for {
13761 if v_0.Op != OpConst64 {
13762 break
13763 }
13764 c := auxIntToInt64(v_0.AuxInt)
13765 if v_1.Op != OpConst64 {
13766 break
13767 }
13768 d := auxIntToInt64(v_1.AuxInt)
13769 v.reset(OpConstBool)
13770 v.AuxInt = boolToAuxInt(uint64(c) < uint64(d))
13771 return true
13772 }
13773
13774
13775 for {
13776 x := v_0
13777 if v_1.Op != OpConst64 {
13778 break
13779 }
13780 t := v_1.Type
13781 if auxIntToInt64(v_1.AuxInt) != 1 {
13782 break
13783 }
13784 v.reset(OpEq64)
13785 v0 := b.NewValue0(v.Pos, OpConst64, t)
13786 v0.AuxInt = int64ToAuxInt(0)
13787 v.AddArg2(v0, x)
13788 return true
13789 }
13790
13791
13792 for {
13793 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 0 {
13794 break
13795 }
13796 v.reset(OpConstBool)
13797 v.AuxInt = boolToAuxInt(false)
13798 return true
13799 }
13800
13801
13802 for {
13803 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != -1 {
13804 break
13805 }
13806 v.reset(OpConstBool)
13807 v.AuxInt = boolToAuxInt(false)
13808 return true
13809 }
13810
13811
13812 for {
13813 x := v_0
13814 if v_1.Op != OpConst64 {
13815 break
13816 }
13817 t := v_1.Type
13818 if auxIntToInt64(v_1.AuxInt) != 1 {
13819 break
13820 }
13821 v.reset(OpEq64)
13822 v0 := b.NewValue0(v.Pos, OpConst64, t)
13823 v0.AuxInt = int64ToAuxInt(0)
13824 v.AddArg2(x, v0)
13825 return true
13826 }
13827
13828
13829 for {
13830 if v_0.Op != OpConst64 {
13831 break
13832 }
13833 t := v_0.Type
13834 if auxIntToInt64(v_0.AuxInt) != -2 {
13835 break
13836 }
13837 x := v_1
13838 v.reset(OpEq64)
13839 v0 := b.NewValue0(v.Pos, OpConst64, t)
13840 v0.AuxInt = int64ToAuxInt(-1)
13841 v.AddArg2(x, v0)
13842 return true
13843 }
13844 return false
13845 }
13846 func rewriteValuegeneric_OpLess8(v *Value) bool {
13847 v_1 := v.Args[1]
13848 v_0 := v.Args[0]
13849 b := v.Block
13850
13851
13852 for {
13853 if v_0.Op != OpConst8 {
13854 break
13855 }
13856 c := auxIntToInt8(v_0.AuxInt)
13857 if v_1.Op != OpConst8 {
13858 break
13859 }
13860 d := auxIntToInt8(v_1.AuxInt)
13861 v.reset(OpConstBool)
13862 v.AuxInt = boolToAuxInt(c < d)
13863 return true
13864 }
13865
13866
13867
13868 for {
13869 if v_0.Op != OpConst8 {
13870 break
13871 }
13872 t := v_0.Type
13873 if auxIntToInt8(v_0.AuxInt) != 0 {
13874 break
13875 }
13876 x := v_1
13877 if !(isNonNegative(x)) {
13878 break
13879 }
13880 v.reset(OpNeq8)
13881 v0 := b.NewValue0(v.Pos, OpConst8, t)
13882 v0.AuxInt = int8ToAuxInt(0)
13883 v.AddArg2(v0, x)
13884 return true
13885 }
13886
13887
13888
13889 for {
13890 x := v_0
13891 if v_1.Op != OpConst8 {
13892 break
13893 }
13894 t := v_1.Type
13895 if auxIntToInt8(v_1.AuxInt) != 1 || !(isNonNegative(x)) {
13896 break
13897 }
13898 v.reset(OpEq8)
13899 v0 := b.NewValue0(v.Pos, OpConst8, t)
13900 v0.AuxInt = int8ToAuxInt(0)
13901 v.AddArg2(v0, x)
13902 return true
13903 }
13904
13905
13906 for {
13907 x := v_0
13908 if v_1.Op != OpConst8 {
13909 break
13910 }
13911 t := v_1.Type
13912 if auxIntToInt8(v_1.AuxInt) != 1 {
13913 break
13914 }
13915 v.reset(OpLeq8)
13916 v0 := b.NewValue0(v.Pos, OpConst8, t)
13917 v0.AuxInt = int8ToAuxInt(0)
13918 v.AddArg2(x, v0)
13919 return true
13920 }
13921
13922
13923 for {
13924 if v_0.Op != OpConst8 {
13925 break
13926 }
13927 t := v_0.Type
13928 if auxIntToInt8(v_0.AuxInt) != -1 {
13929 break
13930 }
13931 x := v_1
13932 v.reset(OpLeq8)
13933 v0 := b.NewValue0(v.Pos, OpConst8, t)
13934 v0.AuxInt = int8ToAuxInt(0)
13935 v.AddArg2(v0, x)
13936 return true
13937 }
13938
13939
13940 for {
13941 if v_1.Op != OpConst8 || auxIntToInt8(v_1.AuxInt) != math.MinInt8 {
13942 break
13943 }
13944 v.reset(OpConstBool)
13945 v.AuxInt = boolToAuxInt(false)
13946 return true
13947 }
13948
13949
13950 for {
13951 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != math.MaxInt8 {
13952 break
13953 }
13954 v.reset(OpConstBool)
13955 v.AuxInt = boolToAuxInt(false)
13956 return true
13957 }
13958
13959
13960 for {
13961 x := v_0
13962 if v_1.Op != OpConst8 {
13963 break
13964 }
13965 t := v_1.Type
13966 if auxIntToInt8(v_1.AuxInt) != math.MinInt8+1 {
13967 break
13968 }
13969 v.reset(OpEq8)
13970 v0 := b.NewValue0(v.Pos, OpConst8, t)
13971 v0.AuxInt = int8ToAuxInt(math.MinInt8)
13972 v.AddArg2(x, v0)
13973 return true
13974 }
13975
13976
13977 for {
13978 if v_0.Op != OpConst8 {
13979 break
13980 }
13981 t := v_0.Type
13982 if auxIntToInt8(v_0.AuxInt) != math.MaxInt8-1 {
13983 break
13984 }
13985 x := v_1
13986 v.reset(OpEq8)
13987 v0 := b.NewValue0(v.Pos, OpConst8, t)
13988 v0.AuxInt = int8ToAuxInt(math.MaxInt8)
13989 v.AddArg2(x, v0)
13990 return true
13991 }
13992 return false
13993 }
13994 func rewriteValuegeneric_OpLess8U(v *Value) bool {
13995 v_1 := v.Args[1]
13996 v_0 := v.Args[0]
13997 b := v.Block
13998
13999
14000 for {
14001 if v_0.Op != OpConst8 {
14002 break
14003 }
14004 c := auxIntToInt8(v_0.AuxInt)
14005 if v_1.Op != OpConst8 {
14006 break
14007 }
14008 d := auxIntToInt8(v_1.AuxInt)
14009 v.reset(OpConstBool)
14010 v.AuxInt = boolToAuxInt(uint8(c) < uint8(d))
14011 return true
14012 }
14013
14014
14015 for {
14016 x := v_0
14017 if v_1.Op != OpConst8 {
14018 break
14019 }
14020 t := v_1.Type
14021 if auxIntToInt8(v_1.AuxInt) != 1 {
14022 break
14023 }
14024 v.reset(OpEq8)
14025 v0 := b.NewValue0(v.Pos, OpConst8, t)
14026 v0.AuxInt = int8ToAuxInt(0)
14027 v.AddArg2(v0, x)
14028 return true
14029 }
14030
14031
14032 for {
14033 if v_1.Op != OpConst8 || auxIntToInt8(v_1.AuxInt) != 0 {
14034 break
14035 }
14036 v.reset(OpConstBool)
14037 v.AuxInt = boolToAuxInt(false)
14038 return true
14039 }
14040
14041
14042 for {
14043 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != -1 {
14044 break
14045 }
14046 v.reset(OpConstBool)
14047 v.AuxInt = boolToAuxInt(false)
14048 return true
14049 }
14050
14051
14052 for {
14053 x := v_0
14054 if v_1.Op != OpConst8 {
14055 break
14056 }
14057 t := v_1.Type
14058 if auxIntToInt8(v_1.AuxInt) != 1 {
14059 break
14060 }
14061 v.reset(OpEq8)
14062 v0 := b.NewValue0(v.Pos, OpConst8, t)
14063 v0.AuxInt = int8ToAuxInt(0)
14064 v.AddArg2(x, v0)
14065 return true
14066 }
14067
14068
14069 for {
14070 if v_0.Op != OpConst8 {
14071 break
14072 }
14073 t := v_0.Type
14074 if auxIntToInt8(v_0.AuxInt) != -2 {
14075 break
14076 }
14077 x := v_1
14078 v.reset(OpEq8)
14079 v0 := b.NewValue0(v.Pos, OpConst8, t)
14080 v0.AuxInt = int8ToAuxInt(-1)
14081 v.AddArg2(x, v0)
14082 return true
14083 }
14084 return false
14085 }
14086 func rewriteValuegeneric_OpLoad(v *Value) bool {
14087 v_1 := v.Args[1]
14088 v_0 := v.Args[0]
14089 b := v.Block
14090
14091
14092
14093 for {
14094 t1 := v.Type
14095 p1 := v_0
14096 if v_1.Op != OpStore {
14097 break
14098 }
14099 t2 := auxToType(v_1.Aux)
14100 x := v_1.Args[1]
14101 p2 := v_1.Args[0]
14102 if !(isSamePtr(p1, p2) && copyCompatibleType(t1, x.Type) && t1.Size() == t2.Size()) {
14103 break
14104 }
14105 v.copyOf(x)
14106 return true
14107 }
14108
14109
14110
14111 for {
14112 t1 := v.Type
14113 p1 := v_0
14114 if v_1.Op != OpStore {
14115 break
14116 }
14117 t2 := auxToType(v_1.Aux)
14118 _ = v_1.Args[2]
14119 p2 := v_1.Args[0]
14120 v_1_2 := v_1.Args[2]
14121 if v_1_2.Op != OpStore {
14122 break
14123 }
14124 t3 := auxToType(v_1_2.Aux)
14125 x := v_1_2.Args[1]
14126 p3 := v_1_2.Args[0]
14127 if !(isSamePtr(p1, p3) && copyCompatibleType(t1, x.Type) && t1.Size() == t3.Size() && disjoint(p3, t3.Size(), p2, t2.Size())) {
14128 break
14129 }
14130 v.copyOf(x)
14131 return true
14132 }
14133
14134
14135
14136 for {
14137 t1 := v.Type
14138 p1 := v_0
14139 if v_1.Op != OpStore {
14140 break
14141 }
14142 t2 := auxToType(v_1.Aux)
14143 _ = v_1.Args[2]
14144 p2 := v_1.Args[0]
14145 v_1_2 := v_1.Args[2]
14146 if v_1_2.Op != OpStore {
14147 break
14148 }
14149 t3 := auxToType(v_1_2.Aux)
14150 _ = v_1_2.Args[2]
14151 p3 := v_1_2.Args[0]
14152 v_1_2_2 := v_1_2.Args[2]
14153 if v_1_2_2.Op != OpStore {
14154 break
14155 }
14156 t4 := auxToType(v_1_2_2.Aux)
14157 x := v_1_2_2.Args[1]
14158 p4 := v_1_2_2.Args[0]
14159 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())) {
14160 break
14161 }
14162 v.copyOf(x)
14163 return true
14164 }
14165
14166
14167
14168 for {
14169 t1 := v.Type
14170 p1 := v_0
14171 if v_1.Op != OpStore {
14172 break
14173 }
14174 t2 := auxToType(v_1.Aux)
14175 _ = v_1.Args[2]
14176 p2 := v_1.Args[0]
14177 v_1_2 := v_1.Args[2]
14178 if v_1_2.Op != OpStore {
14179 break
14180 }
14181 t3 := auxToType(v_1_2.Aux)
14182 _ = v_1_2.Args[2]
14183 p3 := v_1_2.Args[0]
14184 v_1_2_2 := v_1_2.Args[2]
14185 if v_1_2_2.Op != OpStore {
14186 break
14187 }
14188 t4 := auxToType(v_1_2_2.Aux)
14189 _ = v_1_2_2.Args[2]
14190 p4 := v_1_2_2.Args[0]
14191 v_1_2_2_2 := v_1_2_2.Args[2]
14192 if v_1_2_2_2.Op != OpStore {
14193 break
14194 }
14195 t5 := auxToType(v_1_2_2_2.Aux)
14196 x := v_1_2_2_2.Args[1]
14197 p5 := v_1_2_2_2.Args[0]
14198 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())) {
14199 break
14200 }
14201 v.copyOf(x)
14202 return true
14203 }
14204
14205
14206
14207 for {
14208 t1 := v.Type
14209 p1 := v_0
14210 if v_1.Op != OpStore {
14211 break
14212 }
14213 t2 := auxToType(v_1.Aux)
14214 _ = v_1.Args[1]
14215 p2 := v_1.Args[0]
14216 v_1_1 := v_1.Args[1]
14217 if v_1_1.Op != OpConst64 {
14218 break
14219 }
14220 x := auxIntToInt64(v_1_1.AuxInt)
14221 if !(isSamePtr(p1, p2) && t2.Size() == 8 && is64BitFloat(t1) && !math.IsNaN(math.Float64frombits(uint64(x)))) {
14222 break
14223 }
14224 v.reset(OpConst64F)
14225 v.AuxInt = float64ToAuxInt(math.Float64frombits(uint64(x)))
14226 return true
14227 }
14228
14229
14230
14231 for {
14232 t1 := v.Type
14233 p1 := v_0
14234 if v_1.Op != OpStore {
14235 break
14236 }
14237 t2 := auxToType(v_1.Aux)
14238 _ = v_1.Args[1]
14239 p2 := v_1.Args[0]
14240 v_1_1 := v_1.Args[1]
14241 if v_1_1.Op != OpConst32 {
14242 break
14243 }
14244 x := auxIntToInt32(v_1_1.AuxInt)
14245 if !(isSamePtr(p1, p2) && t2.Size() == 4 && is32BitFloat(t1) && !math.IsNaN(float64(math.Float32frombits(uint32(x))))) {
14246 break
14247 }
14248 v.reset(OpConst32F)
14249 v.AuxInt = float32ToAuxInt(math.Float32frombits(uint32(x)))
14250 return true
14251 }
14252
14253
14254
14255 for {
14256 t1 := v.Type
14257 p1 := v_0
14258 if v_1.Op != OpStore {
14259 break
14260 }
14261 t2 := auxToType(v_1.Aux)
14262 _ = v_1.Args[1]
14263 p2 := v_1.Args[0]
14264 v_1_1 := v_1.Args[1]
14265 if v_1_1.Op != OpConst64F {
14266 break
14267 }
14268 x := auxIntToFloat64(v_1_1.AuxInt)
14269 if !(isSamePtr(p1, p2) && t2.Size() == 8 && is64BitInt(t1)) {
14270 break
14271 }
14272 v.reset(OpConst64)
14273 v.AuxInt = int64ToAuxInt(int64(math.Float64bits(x)))
14274 return true
14275 }
14276
14277
14278
14279 for {
14280 t1 := v.Type
14281 p1 := v_0
14282 if v_1.Op != OpStore {
14283 break
14284 }
14285 t2 := auxToType(v_1.Aux)
14286 _ = v_1.Args[1]
14287 p2 := v_1.Args[0]
14288 v_1_1 := v_1.Args[1]
14289 if v_1_1.Op != OpConst32F {
14290 break
14291 }
14292 x := auxIntToFloat32(v_1_1.AuxInt)
14293 if !(isSamePtr(p1, p2) && t2.Size() == 4 && is32BitInt(t1)) {
14294 break
14295 }
14296 v.reset(OpConst32)
14297 v.AuxInt = int32ToAuxInt(int32(math.Float32bits(x)))
14298 return true
14299 }
14300
14301
14302
14303 for {
14304 t1 := v.Type
14305 op := v_0
14306 if op.Op != OpOffPtr {
14307 break
14308 }
14309 o1 := auxIntToInt64(op.AuxInt)
14310 p1 := op.Args[0]
14311 if v_1.Op != OpStore {
14312 break
14313 }
14314 t2 := auxToType(v_1.Aux)
14315 _ = v_1.Args[2]
14316 p2 := v_1.Args[0]
14317 mem := v_1.Args[2]
14318 if mem.Op != OpZero {
14319 break
14320 }
14321 n := auxIntToInt64(mem.AuxInt)
14322 p3 := mem.Args[0]
14323 if !(o1 >= 0 && o1+t1.Size() <= n && isSamePtr(p1, p3) && CanSSA(t1) && disjoint(op, t1.Size(), p2, t2.Size())) {
14324 break
14325 }
14326 b = mem.Block
14327 v0 := b.NewValue0(v.Pos, OpLoad, t1)
14328 v.copyOf(v0)
14329 v1 := b.NewValue0(v.Pos, OpOffPtr, op.Type)
14330 v1.AuxInt = int64ToAuxInt(o1)
14331 v1.AddArg(p3)
14332 v0.AddArg2(v1, mem)
14333 return true
14334 }
14335
14336
14337
14338 for {
14339 t1 := v.Type
14340 op := v_0
14341 if op.Op != OpOffPtr {
14342 break
14343 }
14344 o1 := auxIntToInt64(op.AuxInt)
14345 p1 := op.Args[0]
14346 if v_1.Op != OpStore {
14347 break
14348 }
14349 t2 := auxToType(v_1.Aux)
14350 _ = v_1.Args[2]
14351 p2 := v_1.Args[0]
14352 v_1_2 := v_1.Args[2]
14353 if v_1_2.Op != OpStore {
14354 break
14355 }
14356 t3 := auxToType(v_1_2.Aux)
14357 _ = v_1_2.Args[2]
14358 p3 := v_1_2.Args[0]
14359 mem := v_1_2.Args[2]
14360 if mem.Op != OpZero {
14361 break
14362 }
14363 n := auxIntToInt64(mem.AuxInt)
14364 p4 := mem.Args[0]
14365 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())) {
14366 break
14367 }
14368 b = mem.Block
14369 v0 := b.NewValue0(v.Pos, OpLoad, t1)
14370 v.copyOf(v0)
14371 v1 := b.NewValue0(v.Pos, OpOffPtr, op.Type)
14372 v1.AuxInt = int64ToAuxInt(o1)
14373 v1.AddArg(p4)
14374 v0.AddArg2(v1, mem)
14375 return true
14376 }
14377
14378
14379
14380 for {
14381 t1 := v.Type
14382 op := v_0
14383 if op.Op != OpOffPtr {
14384 break
14385 }
14386 o1 := auxIntToInt64(op.AuxInt)
14387 p1 := op.Args[0]
14388 if v_1.Op != OpStore {
14389 break
14390 }
14391 t2 := auxToType(v_1.Aux)
14392 _ = v_1.Args[2]
14393 p2 := v_1.Args[0]
14394 v_1_2 := v_1.Args[2]
14395 if v_1_2.Op != OpStore {
14396 break
14397 }
14398 t3 := auxToType(v_1_2.Aux)
14399 _ = v_1_2.Args[2]
14400 p3 := v_1_2.Args[0]
14401 v_1_2_2 := v_1_2.Args[2]
14402 if v_1_2_2.Op != OpStore {
14403 break
14404 }
14405 t4 := auxToType(v_1_2_2.Aux)
14406 _ = v_1_2_2.Args[2]
14407 p4 := v_1_2_2.Args[0]
14408 mem := v_1_2_2.Args[2]
14409 if mem.Op != OpZero {
14410 break
14411 }
14412 n := auxIntToInt64(mem.AuxInt)
14413 p5 := mem.Args[0]
14414 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())) {
14415 break
14416 }
14417 b = mem.Block
14418 v0 := b.NewValue0(v.Pos, OpLoad, t1)
14419 v.copyOf(v0)
14420 v1 := b.NewValue0(v.Pos, OpOffPtr, op.Type)
14421 v1.AuxInt = int64ToAuxInt(o1)
14422 v1.AddArg(p5)
14423 v0.AddArg2(v1, mem)
14424 return true
14425 }
14426
14427
14428
14429 for {
14430 t1 := v.Type
14431 op := v_0
14432 if op.Op != OpOffPtr {
14433 break
14434 }
14435 o1 := auxIntToInt64(op.AuxInt)
14436 p1 := op.Args[0]
14437 if v_1.Op != OpStore {
14438 break
14439 }
14440 t2 := auxToType(v_1.Aux)
14441 _ = v_1.Args[2]
14442 p2 := v_1.Args[0]
14443 v_1_2 := v_1.Args[2]
14444 if v_1_2.Op != OpStore {
14445 break
14446 }
14447 t3 := auxToType(v_1_2.Aux)
14448 _ = v_1_2.Args[2]
14449 p3 := v_1_2.Args[0]
14450 v_1_2_2 := v_1_2.Args[2]
14451 if v_1_2_2.Op != OpStore {
14452 break
14453 }
14454 t4 := auxToType(v_1_2_2.Aux)
14455 _ = v_1_2_2.Args[2]
14456 p4 := v_1_2_2.Args[0]
14457 v_1_2_2_2 := v_1_2_2.Args[2]
14458 if v_1_2_2_2.Op != OpStore {
14459 break
14460 }
14461 t5 := auxToType(v_1_2_2_2.Aux)
14462 _ = v_1_2_2_2.Args[2]
14463 p5 := v_1_2_2_2.Args[0]
14464 mem := v_1_2_2_2.Args[2]
14465 if mem.Op != OpZero {
14466 break
14467 }
14468 n := auxIntToInt64(mem.AuxInt)
14469 p6 := mem.Args[0]
14470 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())) {
14471 break
14472 }
14473 b = mem.Block
14474 v0 := b.NewValue0(v.Pos, OpLoad, t1)
14475 v.copyOf(v0)
14476 v1 := b.NewValue0(v.Pos, OpOffPtr, op.Type)
14477 v1.AuxInt = int64ToAuxInt(o1)
14478 v1.AddArg(p6)
14479 v0.AddArg2(v1, mem)
14480 return true
14481 }
14482
14483
14484
14485 for {
14486 t1 := v.Type
14487 if v_0.Op != OpOffPtr {
14488 break
14489 }
14490 o := auxIntToInt64(v_0.AuxInt)
14491 p1 := v_0.Args[0]
14492 if v_1.Op != OpZero {
14493 break
14494 }
14495 n := auxIntToInt64(v_1.AuxInt)
14496 p2 := v_1.Args[0]
14497 if !(t1.IsBoolean() && isSamePtr(p1, p2) && n >= o+1) {
14498 break
14499 }
14500 v.reset(OpConstBool)
14501 v.AuxInt = boolToAuxInt(false)
14502 return true
14503 }
14504
14505
14506
14507 for {
14508 t1 := v.Type
14509 if v_0.Op != OpOffPtr {
14510 break
14511 }
14512 o := auxIntToInt64(v_0.AuxInt)
14513 p1 := v_0.Args[0]
14514 if v_1.Op != OpZero {
14515 break
14516 }
14517 n := auxIntToInt64(v_1.AuxInt)
14518 p2 := v_1.Args[0]
14519 if !(is8BitInt(t1) && isSamePtr(p1, p2) && n >= o+1) {
14520 break
14521 }
14522 v.reset(OpConst8)
14523 v.AuxInt = int8ToAuxInt(0)
14524 return true
14525 }
14526
14527
14528
14529 for {
14530 t1 := v.Type
14531 if v_0.Op != OpOffPtr {
14532 break
14533 }
14534 o := auxIntToInt64(v_0.AuxInt)
14535 p1 := v_0.Args[0]
14536 if v_1.Op != OpZero {
14537 break
14538 }
14539 n := auxIntToInt64(v_1.AuxInt)
14540 p2 := v_1.Args[0]
14541 if !(is16BitInt(t1) && isSamePtr(p1, p2) && n >= o+2) {
14542 break
14543 }
14544 v.reset(OpConst16)
14545 v.AuxInt = int16ToAuxInt(0)
14546 return true
14547 }
14548
14549
14550
14551 for {
14552 t1 := v.Type
14553 if v_0.Op != OpOffPtr {
14554 break
14555 }
14556 o := auxIntToInt64(v_0.AuxInt)
14557 p1 := v_0.Args[0]
14558 if v_1.Op != OpZero {
14559 break
14560 }
14561 n := auxIntToInt64(v_1.AuxInt)
14562 p2 := v_1.Args[0]
14563 if !(is32BitInt(t1) && isSamePtr(p1, p2) && n >= o+4) {
14564 break
14565 }
14566 v.reset(OpConst32)
14567 v.AuxInt = int32ToAuxInt(0)
14568 return true
14569 }
14570
14571
14572
14573 for {
14574 t1 := v.Type
14575 if v_0.Op != OpOffPtr {
14576 break
14577 }
14578 o := auxIntToInt64(v_0.AuxInt)
14579 p1 := v_0.Args[0]
14580 if v_1.Op != OpZero {
14581 break
14582 }
14583 n := auxIntToInt64(v_1.AuxInt)
14584 p2 := v_1.Args[0]
14585 if !(is64BitInt(t1) && isSamePtr(p1, p2) && n >= o+8) {
14586 break
14587 }
14588 v.reset(OpConst64)
14589 v.AuxInt = int64ToAuxInt(0)
14590 return true
14591 }
14592
14593
14594
14595 for {
14596 t1 := v.Type
14597 if v_0.Op != OpOffPtr {
14598 break
14599 }
14600 o := auxIntToInt64(v_0.AuxInt)
14601 p1 := v_0.Args[0]
14602 if v_1.Op != OpZero {
14603 break
14604 }
14605 n := auxIntToInt64(v_1.AuxInt)
14606 p2 := v_1.Args[0]
14607 if !(is32BitFloat(t1) && isSamePtr(p1, p2) && n >= o+4) {
14608 break
14609 }
14610 v.reset(OpConst32F)
14611 v.AuxInt = float32ToAuxInt(0)
14612 return true
14613 }
14614
14615
14616
14617 for {
14618 t1 := v.Type
14619 if v_0.Op != OpOffPtr {
14620 break
14621 }
14622 o := auxIntToInt64(v_0.AuxInt)
14623 p1 := v_0.Args[0]
14624 if v_1.Op != OpZero {
14625 break
14626 }
14627 n := auxIntToInt64(v_1.AuxInt)
14628 p2 := v_1.Args[0]
14629 if !(is64BitFloat(t1) && isSamePtr(p1, p2) && n >= o+8) {
14630 break
14631 }
14632 v.reset(OpConst64F)
14633 v.AuxInt = float64ToAuxInt(0)
14634 return true
14635 }
14636
14637
14638
14639 for {
14640 t := v.Type
14641 if !(t.IsStruct() && CanSSA(t)) {
14642 break
14643 }
14644 v.copyOf(rewriteStructLoad(v))
14645 return true
14646 }
14647
14648
14649
14650 for {
14651 t := v.Type
14652 if !(t.IsArray() && t.NumElem() == 0) {
14653 break
14654 }
14655 v.reset(OpArrayMake0)
14656 return true
14657 }
14658
14659
14660
14661 for {
14662 t := v.Type
14663 ptr := v_0
14664 mem := v_1
14665 if !(t.IsArray() && t.NumElem() == 1 && CanSSA(t)) {
14666 break
14667 }
14668 v.reset(OpArrayMake1)
14669 v0 := b.NewValue0(v.Pos, OpLoad, t.Elem())
14670 v0.AddArg2(ptr, mem)
14671 v.AddArg(v0)
14672 return true
14673 }
14674
14675
14676
14677 for {
14678 if v_0.Op != OpAddr {
14679 break
14680 }
14681 s := auxToSym(v_0.Aux)
14682 sb := v_0.Args[0]
14683 if !(isFixedLoad(v, s, 0)) {
14684 break
14685 }
14686 v.copyOf(rewriteFixedLoad(v, s, sb, 0))
14687 return true
14688 }
14689
14690
14691
14692 for {
14693 if v_0.Op != OpConvert {
14694 break
14695 }
14696 v_0_0 := v_0.Args[0]
14697 if v_0_0.Op != OpAddr {
14698 break
14699 }
14700 s := auxToSym(v_0_0.Aux)
14701 sb := v_0_0.Args[0]
14702 if !(isFixedLoad(v, s, 0)) {
14703 break
14704 }
14705 v.copyOf(rewriteFixedLoad(v, s, sb, 0))
14706 return true
14707 }
14708
14709
14710
14711 for {
14712 if v_0.Op != OpITab {
14713 break
14714 }
14715 v_0_0 := v_0.Args[0]
14716 if v_0_0.Op != OpIMake {
14717 break
14718 }
14719 v_0_0_0 := v_0_0.Args[0]
14720 if v_0_0_0.Op != OpAddr {
14721 break
14722 }
14723 s := auxToSym(v_0_0_0.Aux)
14724 sb := v_0_0_0.Args[0]
14725 if !(isFixedLoad(v, s, 0)) {
14726 break
14727 }
14728 v.copyOf(rewriteFixedLoad(v, s, sb, 0))
14729 return true
14730 }
14731
14732
14733
14734 for {
14735 if v_0.Op != OpITab {
14736 break
14737 }
14738 v_0_0 := v_0.Args[0]
14739 if v_0_0.Op != OpIMake {
14740 break
14741 }
14742 v_0_0_0 := v_0_0.Args[0]
14743 if v_0_0_0.Op != OpConvert {
14744 break
14745 }
14746 v_0_0_0_0 := v_0_0_0.Args[0]
14747 if v_0_0_0_0.Op != OpAddr {
14748 break
14749 }
14750 s := auxToSym(v_0_0_0_0.Aux)
14751 sb := v_0_0_0_0.Args[0]
14752 if !(isFixedLoad(v, s, 0)) {
14753 break
14754 }
14755 v.copyOf(rewriteFixedLoad(v, s, sb, 0))
14756 return true
14757 }
14758
14759
14760
14761 for {
14762 if v_0.Op != OpOffPtr {
14763 break
14764 }
14765 off := auxIntToInt64(v_0.AuxInt)
14766 v_0_0 := v_0.Args[0]
14767 if v_0_0.Op != OpAddr {
14768 break
14769 }
14770 s := auxToSym(v_0_0.Aux)
14771 sb := v_0_0.Args[0]
14772 if !(isFixedLoad(v, s, off)) {
14773 break
14774 }
14775 v.copyOf(rewriteFixedLoad(v, s, sb, off))
14776 return true
14777 }
14778
14779
14780
14781 for {
14782 if v_0.Op != OpOffPtr {
14783 break
14784 }
14785 off := auxIntToInt64(v_0.AuxInt)
14786 v_0_0 := v_0.Args[0]
14787 if v_0_0.Op != OpConvert {
14788 break
14789 }
14790 v_0_0_0 := v_0_0.Args[0]
14791 if v_0_0_0.Op != OpAddr {
14792 break
14793 }
14794 s := auxToSym(v_0_0_0.Aux)
14795 sb := v_0_0_0.Args[0]
14796 if !(isFixedLoad(v, s, off)) {
14797 break
14798 }
14799 v.copyOf(rewriteFixedLoad(v, s, sb, off))
14800 return true
14801 }
14802
14803
14804
14805 for {
14806 if v_0.Op != OpOffPtr {
14807 break
14808 }
14809 off := auxIntToInt64(v_0.AuxInt)
14810 v_0_0 := v_0.Args[0]
14811 if v_0_0.Op != OpITab {
14812 break
14813 }
14814 v_0_0_0 := v_0_0.Args[0]
14815 if v_0_0_0.Op != OpIMake {
14816 break
14817 }
14818 v_0_0_0_0 := v_0_0_0.Args[0]
14819 if v_0_0_0_0.Op != OpAddr {
14820 break
14821 }
14822 s := auxToSym(v_0_0_0_0.Aux)
14823 sb := v_0_0_0_0.Args[0]
14824 if !(isFixedLoad(v, s, off)) {
14825 break
14826 }
14827 v.copyOf(rewriteFixedLoad(v, s, sb, off))
14828 return true
14829 }
14830
14831
14832
14833 for {
14834 if v_0.Op != OpOffPtr {
14835 break
14836 }
14837 off := auxIntToInt64(v_0.AuxInt)
14838 v_0_0 := v_0.Args[0]
14839 if v_0_0.Op != OpITab {
14840 break
14841 }
14842 v_0_0_0 := v_0_0.Args[0]
14843 if v_0_0_0.Op != OpIMake {
14844 break
14845 }
14846 v_0_0_0_0 := v_0_0_0.Args[0]
14847 if v_0_0_0_0.Op != OpConvert {
14848 break
14849 }
14850 v_0_0_0_0_0 := v_0_0_0_0.Args[0]
14851 if v_0_0_0_0_0.Op != OpAddr {
14852 break
14853 }
14854 s := auxToSym(v_0_0_0_0_0.Aux)
14855 sb := v_0_0_0_0_0.Args[0]
14856 if !(isFixedLoad(v, s, off)) {
14857 break
14858 }
14859 v.copyOf(rewriteFixedLoad(v, s, sb, off))
14860 return true
14861 }
14862 return false
14863 }
14864 func rewriteValuegeneric_OpLsh16x16(v *Value) bool {
14865 v_1 := v.Args[1]
14866 v_0 := v.Args[0]
14867 b := v.Block
14868
14869
14870 for {
14871 t := v.Type
14872 x := v_0
14873 if v_1.Op != OpConst16 {
14874 break
14875 }
14876 c := auxIntToInt16(v_1.AuxInt)
14877 v.reset(OpLsh16x64)
14878 v0 := b.NewValue0(v.Pos, OpConst64, t)
14879 v0.AuxInt = int64ToAuxInt(int64(uint16(c)))
14880 v.AddArg2(x, v0)
14881 return true
14882 }
14883
14884
14885 for {
14886 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 {
14887 break
14888 }
14889 v.reset(OpConst16)
14890 v.AuxInt = int16ToAuxInt(0)
14891 return true
14892 }
14893 return false
14894 }
14895 func rewriteValuegeneric_OpLsh16x32(v *Value) bool {
14896 v_1 := v.Args[1]
14897 v_0 := v.Args[0]
14898 b := v.Block
14899
14900
14901 for {
14902 t := v.Type
14903 x := v_0
14904 if v_1.Op != OpConst32 {
14905 break
14906 }
14907 c := auxIntToInt32(v_1.AuxInt)
14908 v.reset(OpLsh16x64)
14909 v0 := b.NewValue0(v.Pos, OpConst64, t)
14910 v0.AuxInt = int64ToAuxInt(int64(uint32(c)))
14911 v.AddArg2(x, v0)
14912 return true
14913 }
14914
14915
14916 for {
14917 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 {
14918 break
14919 }
14920 v.reset(OpConst16)
14921 v.AuxInt = int16ToAuxInt(0)
14922 return true
14923 }
14924 return false
14925 }
14926 func rewriteValuegeneric_OpLsh16x64(v *Value) bool {
14927 v_1 := v.Args[1]
14928 v_0 := v.Args[0]
14929 b := v.Block
14930 typ := &b.Func.Config.Types
14931
14932
14933 for {
14934 if v_0.Op != OpConst16 {
14935 break
14936 }
14937 c := auxIntToInt16(v_0.AuxInt)
14938 if v_1.Op != OpConst64 {
14939 break
14940 }
14941 d := auxIntToInt64(v_1.AuxInt)
14942 v.reset(OpConst16)
14943 v.AuxInt = int16ToAuxInt(c << uint64(d))
14944 return true
14945 }
14946
14947
14948 for {
14949 x := v_0
14950 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 0 {
14951 break
14952 }
14953 v.copyOf(x)
14954 return true
14955 }
14956
14957
14958 for {
14959 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 {
14960 break
14961 }
14962 v.reset(OpConst16)
14963 v.AuxInt = int16ToAuxInt(0)
14964 return true
14965 }
14966
14967
14968
14969 for {
14970 if v_1.Op != OpConst64 {
14971 break
14972 }
14973 c := auxIntToInt64(v_1.AuxInt)
14974 if !(uint64(c) >= 16) {
14975 break
14976 }
14977 v.reset(OpConst16)
14978 v.AuxInt = int16ToAuxInt(0)
14979 return true
14980 }
14981
14982
14983
14984 for {
14985 t := v.Type
14986 if v_0.Op != OpLsh16x64 {
14987 break
14988 }
14989 _ = v_0.Args[1]
14990 x := v_0.Args[0]
14991 v_0_1 := v_0.Args[1]
14992 if v_0_1.Op != OpConst64 {
14993 break
14994 }
14995 c := auxIntToInt64(v_0_1.AuxInt)
14996 if v_1.Op != OpConst64 {
14997 break
14998 }
14999 d := auxIntToInt64(v_1.AuxInt)
15000 if !(!uaddOvf(c, d)) {
15001 break
15002 }
15003 v.reset(OpLsh16x64)
15004 v0 := b.NewValue0(v.Pos, OpConst64, t)
15005 v0.AuxInt = int64ToAuxInt(c + d)
15006 v.AddArg2(x, v0)
15007 return true
15008 }
15009
15010
15011
15012 for {
15013 i := v_0
15014 if i.Op != OpRsh16x64 {
15015 break
15016 }
15017 _ = i.Args[1]
15018 x := i.Args[0]
15019 i_1 := i.Args[1]
15020 if i_1.Op != OpConst64 {
15021 break
15022 }
15023 c := auxIntToInt64(i_1.AuxInt)
15024 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != c || !(c >= 0 && c < 16 && i.Uses == 1) {
15025 break
15026 }
15027 v.reset(OpAnd16)
15028 v0 := b.NewValue0(v.Pos, OpConst16, v.Type)
15029 v0.AuxInt = int16ToAuxInt(int16(-1) << c)
15030 v.AddArg2(x, v0)
15031 return true
15032 }
15033
15034
15035
15036 for {
15037 i := v_0
15038 if i.Op != OpRsh16Ux64 {
15039 break
15040 }
15041 _ = i.Args[1]
15042 x := i.Args[0]
15043 i_1 := i.Args[1]
15044 if i_1.Op != OpConst64 {
15045 break
15046 }
15047 c := auxIntToInt64(i_1.AuxInt)
15048 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != c || !(c >= 0 && c < 16 && i.Uses == 1) {
15049 break
15050 }
15051 v.reset(OpAnd16)
15052 v0 := b.NewValue0(v.Pos, OpConst16, v.Type)
15053 v0.AuxInt = int16ToAuxInt(int16(-1) << c)
15054 v.AddArg2(x, v0)
15055 return true
15056 }
15057
15058
15059
15060 for {
15061 if v_0.Op != OpRsh16Ux64 {
15062 break
15063 }
15064 _ = v_0.Args[1]
15065 v_0_0 := v_0.Args[0]
15066 if v_0_0.Op != OpLsh16x64 {
15067 break
15068 }
15069 _ = v_0_0.Args[1]
15070 x := v_0_0.Args[0]
15071 v_0_0_1 := v_0_0.Args[1]
15072 if v_0_0_1.Op != OpConst64 {
15073 break
15074 }
15075 c1 := auxIntToInt64(v_0_0_1.AuxInt)
15076 v_0_1 := v_0.Args[1]
15077 if v_0_1.Op != OpConst64 {
15078 break
15079 }
15080 c2 := auxIntToInt64(v_0_1.AuxInt)
15081 if v_1.Op != OpConst64 {
15082 break
15083 }
15084 c3 := auxIntToInt64(v_1.AuxInt)
15085 if !(uint64(c1) >= uint64(c2) && uint64(c3) >= uint64(c2) && !uaddOvf(c1-c2, c3)) {
15086 break
15087 }
15088 v.reset(OpLsh16x64)
15089 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
15090 v0.AuxInt = int64ToAuxInt(c1 - c2 + c3)
15091 v.AddArg2(x, v0)
15092 return true
15093 }
15094
15095
15096
15097 for {
15098 if v_0.Op != OpAnd16 {
15099 break
15100 }
15101 _ = v_0.Args[1]
15102 v_0_0 := v_0.Args[0]
15103 v_0_1 := v_0.Args[1]
15104 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
15105 if v_0_0.Op != OpRsh16x64 {
15106 continue
15107 }
15108 t := v_0_0.Type
15109 _ = v_0_0.Args[1]
15110 x := v_0_0.Args[0]
15111 v_0_0_1 := v_0_0.Args[1]
15112 if v_0_0_1.Op != OpConst64 {
15113 continue
15114 }
15115 t2 := v_0_0_1.Type
15116 c := auxIntToInt64(v_0_0_1.AuxInt)
15117 if v_0_1.Op != OpConst16 {
15118 continue
15119 }
15120 d := auxIntToInt16(v_0_1.AuxInt)
15121 if v_1.Op != OpConst64 {
15122 continue
15123 }
15124 e := auxIntToInt64(v_1.AuxInt)
15125 if !(c >= e) {
15126 continue
15127 }
15128 v.reset(OpAnd16)
15129 v0 := b.NewValue0(v.Pos, OpRsh16x64, t)
15130 v1 := b.NewValue0(v.Pos, OpConst64, t2)
15131 v1.AuxInt = int64ToAuxInt(c - e)
15132 v0.AddArg2(x, v1)
15133 v2 := b.NewValue0(v.Pos, OpConst16, t)
15134 v2.AuxInt = int16ToAuxInt(d << e)
15135 v.AddArg2(v0, v2)
15136 return true
15137 }
15138 break
15139 }
15140
15141
15142
15143 for {
15144 if v_0.Op != OpAnd16 {
15145 break
15146 }
15147 _ = v_0.Args[1]
15148 v_0_0 := v_0.Args[0]
15149 v_0_1 := v_0.Args[1]
15150 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
15151 if v_0_0.Op != OpRsh16Ux64 {
15152 continue
15153 }
15154 t := v_0_0.Type
15155 _ = v_0_0.Args[1]
15156 x := v_0_0.Args[0]
15157 v_0_0_1 := v_0_0.Args[1]
15158 if v_0_0_1.Op != OpConst64 {
15159 continue
15160 }
15161 t2 := v_0_0_1.Type
15162 c := auxIntToInt64(v_0_0_1.AuxInt)
15163 if v_0_1.Op != OpConst16 {
15164 continue
15165 }
15166 d := auxIntToInt16(v_0_1.AuxInt)
15167 if v_1.Op != OpConst64 {
15168 continue
15169 }
15170 e := auxIntToInt64(v_1.AuxInt)
15171 if !(c >= e) {
15172 continue
15173 }
15174 v.reset(OpAnd16)
15175 v0 := b.NewValue0(v.Pos, OpRsh16Ux64, t)
15176 v1 := b.NewValue0(v.Pos, OpConst64, t2)
15177 v1.AuxInt = int64ToAuxInt(c - e)
15178 v0.AddArg2(x, v1)
15179 v2 := b.NewValue0(v.Pos, OpConst16, t)
15180 v2.AuxInt = int16ToAuxInt(d << e)
15181 v.AddArg2(v0, v2)
15182 return true
15183 }
15184 break
15185 }
15186
15187
15188
15189 for {
15190 if v_0.Op != OpAnd16 {
15191 break
15192 }
15193 _ = v_0.Args[1]
15194 v_0_0 := v_0.Args[0]
15195 v_0_1 := v_0.Args[1]
15196 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
15197 if v_0_0.Op != OpRsh16x64 {
15198 continue
15199 }
15200 t := v_0_0.Type
15201 _ = v_0_0.Args[1]
15202 x := v_0_0.Args[0]
15203 v_0_0_1 := v_0_0.Args[1]
15204 if v_0_0_1.Op != OpConst64 {
15205 continue
15206 }
15207 t2 := v_0_0_1.Type
15208 c := auxIntToInt64(v_0_0_1.AuxInt)
15209 if v_0_1.Op != OpConst16 {
15210 continue
15211 }
15212 d := auxIntToInt16(v_0_1.AuxInt)
15213 if v_1.Op != OpConst64 {
15214 continue
15215 }
15216 e := auxIntToInt64(v_1.AuxInt)
15217 if !(c < e) {
15218 continue
15219 }
15220 v.reset(OpAnd16)
15221 v0 := b.NewValue0(v.Pos, OpLsh16x64, t)
15222 v1 := b.NewValue0(v.Pos, OpConst64, t2)
15223 v1.AuxInt = int64ToAuxInt(e - c)
15224 v0.AddArg2(x, v1)
15225 v2 := b.NewValue0(v.Pos, OpConst16, t)
15226 v2.AuxInt = int16ToAuxInt(d << e)
15227 v.AddArg2(v0, v2)
15228 return true
15229 }
15230 break
15231 }
15232
15233
15234
15235 for {
15236 if v_0.Op != OpAnd16 {
15237 break
15238 }
15239 _ = v_0.Args[1]
15240 v_0_0 := v_0.Args[0]
15241 v_0_1 := v_0.Args[1]
15242 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
15243 if v_0_0.Op != OpRsh16Ux64 {
15244 continue
15245 }
15246 t := v_0_0.Type
15247 _ = v_0_0.Args[1]
15248 x := v_0_0.Args[0]
15249 v_0_0_1 := v_0_0.Args[1]
15250 if v_0_0_1.Op != OpConst64 {
15251 continue
15252 }
15253 t2 := v_0_0_1.Type
15254 c := auxIntToInt64(v_0_0_1.AuxInt)
15255 if v_0_1.Op != OpConst16 {
15256 continue
15257 }
15258 d := auxIntToInt16(v_0_1.AuxInt)
15259 if v_1.Op != OpConst64 {
15260 continue
15261 }
15262 e := auxIntToInt64(v_1.AuxInt)
15263 if !(c < e) {
15264 continue
15265 }
15266 v.reset(OpAnd16)
15267 v0 := b.NewValue0(v.Pos, OpLsh16x64, t)
15268 v1 := b.NewValue0(v.Pos, OpConst64, t2)
15269 v1.AuxInt = int64ToAuxInt(e - c)
15270 v0.AddArg2(x, v1)
15271 v2 := b.NewValue0(v.Pos, OpConst16, t)
15272 v2.AuxInt = int16ToAuxInt(d << e)
15273 v.AddArg2(v0, v2)
15274 return true
15275 }
15276 break
15277 }
15278 return false
15279 }
15280 func rewriteValuegeneric_OpLsh16x8(v *Value) bool {
15281 v_1 := v.Args[1]
15282 v_0 := v.Args[0]
15283 b := v.Block
15284
15285
15286 for {
15287 t := v.Type
15288 x := v_0
15289 if v_1.Op != OpConst8 {
15290 break
15291 }
15292 c := auxIntToInt8(v_1.AuxInt)
15293 v.reset(OpLsh16x64)
15294 v0 := b.NewValue0(v.Pos, OpConst64, t)
15295 v0.AuxInt = int64ToAuxInt(int64(uint8(c)))
15296 v.AddArg2(x, v0)
15297 return true
15298 }
15299
15300
15301 for {
15302 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 {
15303 break
15304 }
15305 v.reset(OpConst16)
15306 v.AuxInt = int16ToAuxInt(0)
15307 return true
15308 }
15309 return false
15310 }
15311 func rewriteValuegeneric_OpLsh32x16(v *Value) bool {
15312 v_1 := v.Args[1]
15313 v_0 := v.Args[0]
15314 b := v.Block
15315
15316
15317 for {
15318 t := v.Type
15319 x := v_0
15320 if v_1.Op != OpConst16 {
15321 break
15322 }
15323 c := auxIntToInt16(v_1.AuxInt)
15324 v.reset(OpLsh32x64)
15325 v0 := b.NewValue0(v.Pos, OpConst64, t)
15326 v0.AuxInt = int64ToAuxInt(int64(uint16(c)))
15327 v.AddArg2(x, v0)
15328 return true
15329 }
15330
15331
15332 for {
15333 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
15334 break
15335 }
15336 v.reset(OpConst32)
15337 v.AuxInt = int32ToAuxInt(0)
15338 return true
15339 }
15340 return false
15341 }
15342 func rewriteValuegeneric_OpLsh32x32(v *Value) bool {
15343 v_1 := v.Args[1]
15344 v_0 := v.Args[0]
15345 b := v.Block
15346
15347
15348 for {
15349 t := v.Type
15350 x := v_0
15351 if v_1.Op != OpConst32 {
15352 break
15353 }
15354 c := auxIntToInt32(v_1.AuxInt)
15355 v.reset(OpLsh32x64)
15356 v0 := b.NewValue0(v.Pos, OpConst64, t)
15357 v0.AuxInt = int64ToAuxInt(int64(uint32(c)))
15358 v.AddArg2(x, v0)
15359 return true
15360 }
15361
15362
15363 for {
15364 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
15365 break
15366 }
15367 v.reset(OpConst32)
15368 v.AuxInt = int32ToAuxInt(0)
15369 return true
15370 }
15371 return false
15372 }
15373 func rewriteValuegeneric_OpLsh32x64(v *Value) bool {
15374 v_1 := v.Args[1]
15375 v_0 := v.Args[0]
15376 b := v.Block
15377 typ := &b.Func.Config.Types
15378
15379
15380 for {
15381 if v_0.Op != OpConst32 {
15382 break
15383 }
15384 c := auxIntToInt32(v_0.AuxInt)
15385 if v_1.Op != OpConst64 {
15386 break
15387 }
15388 d := auxIntToInt64(v_1.AuxInt)
15389 v.reset(OpConst32)
15390 v.AuxInt = int32ToAuxInt(c << uint64(d))
15391 return true
15392 }
15393
15394
15395 for {
15396 x := v_0
15397 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 0 {
15398 break
15399 }
15400 v.copyOf(x)
15401 return true
15402 }
15403
15404
15405 for {
15406 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
15407 break
15408 }
15409 v.reset(OpConst32)
15410 v.AuxInt = int32ToAuxInt(0)
15411 return true
15412 }
15413
15414
15415
15416 for {
15417 if v_1.Op != OpConst64 {
15418 break
15419 }
15420 c := auxIntToInt64(v_1.AuxInt)
15421 if !(uint64(c) >= 32) {
15422 break
15423 }
15424 v.reset(OpConst32)
15425 v.AuxInt = int32ToAuxInt(0)
15426 return true
15427 }
15428
15429
15430
15431 for {
15432 t := v.Type
15433 if v_0.Op != OpLsh32x64 {
15434 break
15435 }
15436 _ = v_0.Args[1]
15437 x := v_0.Args[0]
15438 v_0_1 := v_0.Args[1]
15439 if v_0_1.Op != OpConst64 {
15440 break
15441 }
15442 c := auxIntToInt64(v_0_1.AuxInt)
15443 if v_1.Op != OpConst64 {
15444 break
15445 }
15446 d := auxIntToInt64(v_1.AuxInt)
15447 if !(!uaddOvf(c, d)) {
15448 break
15449 }
15450 v.reset(OpLsh32x64)
15451 v0 := b.NewValue0(v.Pos, OpConst64, t)
15452 v0.AuxInt = int64ToAuxInt(c + d)
15453 v.AddArg2(x, v0)
15454 return true
15455 }
15456
15457
15458
15459 for {
15460 i := v_0
15461 if i.Op != OpRsh32x64 {
15462 break
15463 }
15464 _ = i.Args[1]
15465 x := i.Args[0]
15466 i_1 := i.Args[1]
15467 if i_1.Op != OpConst64 {
15468 break
15469 }
15470 c := auxIntToInt64(i_1.AuxInt)
15471 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != c || !(c >= 0 && c < 32 && i.Uses == 1) {
15472 break
15473 }
15474 v.reset(OpAnd32)
15475 v0 := b.NewValue0(v.Pos, OpConst32, v.Type)
15476 v0.AuxInt = int32ToAuxInt(int32(-1) << c)
15477 v.AddArg2(x, v0)
15478 return true
15479 }
15480
15481
15482
15483 for {
15484 i := v_0
15485 if i.Op != OpRsh32Ux64 {
15486 break
15487 }
15488 _ = i.Args[1]
15489 x := i.Args[0]
15490 i_1 := i.Args[1]
15491 if i_1.Op != OpConst64 {
15492 break
15493 }
15494 c := auxIntToInt64(i_1.AuxInt)
15495 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != c || !(c >= 0 && c < 32 && i.Uses == 1) {
15496 break
15497 }
15498 v.reset(OpAnd32)
15499 v0 := b.NewValue0(v.Pos, OpConst32, v.Type)
15500 v0.AuxInt = int32ToAuxInt(int32(-1) << c)
15501 v.AddArg2(x, v0)
15502 return true
15503 }
15504
15505
15506
15507 for {
15508 if v_0.Op != OpRsh32Ux64 {
15509 break
15510 }
15511 _ = v_0.Args[1]
15512 v_0_0 := v_0.Args[0]
15513 if v_0_0.Op != OpLsh32x64 {
15514 break
15515 }
15516 _ = v_0_0.Args[1]
15517 x := v_0_0.Args[0]
15518 v_0_0_1 := v_0_0.Args[1]
15519 if v_0_0_1.Op != OpConst64 {
15520 break
15521 }
15522 c1 := auxIntToInt64(v_0_0_1.AuxInt)
15523 v_0_1 := v_0.Args[1]
15524 if v_0_1.Op != OpConst64 {
15525 break
15526 }
15527 c2 := auxIntToInt64(v_0_1.AuxInt)
15528 if v_1.Op != OpConst64 {
15529 break
15530 }
15531 c3 := auxIntToInt64(v_1.AuxInt)
15532 if !(uint64(c1) >= uint64(c2) && uint64(c3) >= uint64(c2) && !uaddOvf(c1-c2, c3)) {
15533 break
15534 }
15535 v.reset(OpLsh32x64)
15536 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
15537 v0.AuxInt = int64ToAuxInt(c1 - c2 + c3)
15538 v.AddArg2(x, v0)
15539 return true
15540 }
15541
15542
15543
15544 for {
15545 if v_0.Op != OpAnd32 {
15546 break
15547 }
15548 _ = v_0.Args[1]
15549 v_0_0 := v_0.Args[0]
15550 v_0_1 := v_0.Args[1]
15551 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
15552 if v_0_0.Op != OpRsh32x64 {
15553 continue
15554 }
15555 t := v_0_0.Type
15556 _ = v_0_0.Args[1]
15557 x := v_0_0.Args[0]
15558 v_0_0_1 := v_0_0.Args[1]
15559 if v_0_0_1.Op != OpConst64 {
15560 continue
15561 }
15562 t2 := v_0_0_1.Type
15563 c := auxIntToInt64(v_0_0_1.AuxInt)
15564 if v_0_1.Op != OpConst32 {
15565 continue
15566 }
15567 d := auxIntToInt32(v_0_1.AuxInt)
15568 if v_1.Op != OpConst64 {
15569 continue
15570 }
15571 e := auxIntToInt64(v_1.AuxInt)
15572 if !(c >= e) {
15573 continue
15574 }
15575 v.reset(OpAnd32)
15576 v0 := b.NewValue0(v.Pos, OpRsh32x64, t)
15577 v1 := b.NewValue0(v.Pos, OpConst64, t2)
15578 v1.AuxInt = int64ToAuxInt(c - e)
15579 v0.AddArg2(x, v1)
15580 v2 := b.NewValue0(v.Pos, OpConst32, t)
15581 v2.AuxInt = int32ToAuxInt(d << e)
15582 v.AddArg2(v0, v2)
15583 return true
15584 }
15585 break
15586 }
15587
15588
15589
15590 for {
15591 if v_0.Op != OpAnd32 {
15592 break
15593 }
15594 _ = v_0.Args[1]
15595 v_0_0 := v_0.Args[0]
15596 v_0_1 := v_0.Args[1]
15597 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
15598 if v_0_0.Op != OpRsh32Ux64 {
15599 continue
15600 }
15601 t := v_0_0.Type
15602 _ = v_0_0.Args[1]
15603 x := v_0_0.Args[0]
15604 v_0_0_1 := v_0_0.Args[1]
15605 if v_0_0_1.Op != OpConst64 {
15606 continue
15607 }
15608 t2 := v_0_0_1.Type
15609 c := auxIntToInt64(v_0_0_1.AuxInt)
15610 if v_0_1.Op != OpConst32 {
15611 continue
15612 }
15613 d := auxIntToInt32(v_0_1.AuxInt)
15614 if v_1.Op != OpConst64 {
15615 continue
15616 }
15617 e := auxIntToInt64(v_1.AuxInt)
15618 if !(c >= e) {
15619 continue
15620 }
15621 v.reset(OpAnd32)
15622 v0 := b.NewValue0(v.Pos, OpRsh32Ux64, t)
15623 v1 := b.NewValue0(v.Pos, OpConst64, t2)
15624 v1.AuxInt = int64ToAuxInt(c - e)
15625 v0.AddArg2(x, v1)
15626 v2 := b.NewValue0(v.Pos, OpConst32, t)
15627 v2.AuxInt = int32ToAuxInt(d << e)
15628 v.AddArg2(v0, v2)
15629 return true
15630 }
15631 break
15632 }
15633
15634
15635
15636 for {
15637 if v_0.Op != OpAnd32 {
15638 break
15639 }
15640 _ = v_0.Args[1]
15641 v_0_0 := v_0.Args[0]
15642 v_0_1 := v_0.Args[1]
15643 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
15644 if v_0_0.Op != OpRsh32x64 {
15645 continue
15646 }
15647 t := v_0_0.Type
15648 _ = v_0_0.Args[1]
15649 x := v_0_0.Args[0]
15650 v_0_0_1 := v_0_0.Args[1]
15651 if v_0_0_1.Op != OpConst64 {
15652 continue
15653 }
15654 t2 := v_0_0_1.Type
15655 c := auxIntToInt64(v_0_0_1.AuxInt)
15656 if v_0_1.Op != OpConst32 {
15657 continue
15658 }
15659 d := auxIntToInt32(v_0_1.AuxInt)
15660 if v_1.Op != OpConst64 {
15661 continue
15662 }
15663 e := auxIntToInt64(v_1.AuxInt)
15664 if !(c < e) {
15665 continue
15666 }
15667 v.reset(OpAnd32)
15668 v0 := b.NewValue0(v.Pos, OpLsh32x64, t)
15669 v1 := b.NewValue0(v.Pos, OpConst64, t2)
15670 v1.AuxInt = int64ToAuxInt(e - c)
15671 v0.AddArg2(x, v1)
15672 v2 := b.NewValue0(v.Pos, OpConst32, t)
15673 v2.AuxInt = int32ToAuxInt(d << e)
15674 v.AddArg2(v0, v2)
15675 return true
15676 }
15677 break
15678 }
15679
15680
15681
15682 for {
15683 if v_0.Op != OpAnd32 {
15684 break
15685 }
15686 _ = v_0.Args[1]
15687 v_0_0 := v_0.Args[0]
15688 v_0_1 := v_0.Args[1]
15689 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
15690 if v_0_0.Op != OpRsh32Ux64 {
15691 continue
15692 }
15693 t := v_0_0.Type
15694 _ = v_0_0.Args[1]
15695 x := v_0_0.Args[0]
15696 v_0_0_1 := v_0_0.Args[1]
15697 if v_0_0_1.Op != OpConst64 {
15698 continue
15699 }
15700 t2 := v_0_0_1.Type
15701 c := auxIntToInt64(v_0_0_1.AuxInt)
15702 if v_0_1.Op != OpConst32 {
15703 continue
15704 }
15705 d := auxIntToInt32(v_0_1.AuxInt)
15706 if v_1.Op != OpConst64 {
15707 continue
15708 }
15709 e := auxIntToInt64(v_1.AuxInt)
15710 if !(c < e) {
15711 continue
15712 }
15713 v.reset(OpAnd32)
15714 v0 := b.NewValue0(v.Pos, OpLsh32x64, t)
15715 v1 := b.NewValue0(v.Pos, OpConst64, t2)
15716 v1.AuxInt = int64ToAuxInt(e - c)
15717 v0.AddArg2(x, v1)
15718 v2 := b.NewValue0(v.Pos, OpConst32, t)
15719 v2.AuxInt = int32ToAuxInt(d << e)
15720 v.AddArg2(v0, v2)
15721 return true
15722 }
15723 break
15724 }
15725 return false
15726 }
15727 func rewriteValuegeneric_OpLsh32x8(v *Value) bool {
15728 v_1 := v.Args[1]
15729 v_0 := v.Args[0]
15730 b := v.Block
15731
15732
15733 for {
15734 t := v.Type
15735 x := v_0
15736 if v_1.Op != OpConst8 {
15737 break
15738 }
15739 c := auxIntToInt8(v_1.AuxInt)
15740 v.reset(OpLsh32x64)
15741 v0 := b.NewValue0(v.Pos, OpConst64, t)
15742 v0.AuxInt = int64ToAuxInt(int64(uint8(c)))
15743 v.AddArg2(x, v0)
15744 return true
15745 }
15746
15747
15748 for {
15749 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
15750 break
15751 }
15752 v.reset(OpConst32)
15753 v.AuxInt = int32ToAuxInt(0)
15754 return true
15755 }
15756 return false
15757 }
15758 func rewriteValuegeneric_OpLsh64x16(v *Value) bool {
15759 v_1 := v.Args[1]
15760 v_0 := v.Args[0]
15761 b := v.Block
15762
15763
15764 for {
15765 t := v.Type
15766 x := v_0
15767 if v_1.Op != OpConst16 {
15768 break
15769 }
15770 c := auxIntToInt16(v_1.AuxInt)
15771 v.reset(OpLsh64x64)
15772 v0 := b.NewValue0(v.Pos, OpConst64, t)
15773 v0.AuxInt = int64ToAuxInt(int64(uint16(c)))
15774 v.AddArg2(x, v0)
15775 return true
15776 }
15777
15778
15779 for {
15780 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
15781 break
15782 }
15783 v.reset(OpConst64)
15784 v.AuxInt = int64ToAuxInt(0)
15785 return true
15786 }
15787 return false
15788 }
15789 func rewriteValuegeneric_OpLsh64x32(v *Value) bool {
15790 v_1 := v.Args[1]
15791 v_0 := v.Args[0]
15792 b := v.Block
15793
15794
15795 for {
15796 t := v.Type
15797 x := v_0
15798 if v_1.Op != OpConst32 {
15799 break
15800 }
15801 c := auxIntToInt32(v_1.AuxInt)
15802 v.reset(OpLsh64x64)
15803 v0 := b.NewValue0(v.Pos, OpConst64, t)
15804 v0.AuxInt = int64ToAuxInt(int64(uint32(c)))
15805 v.AddArg2(x, v0)
15806 return true
15807 }
15808
15809
15810 for {
15811 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
15812 break
15813 }
15814 v.reset(OpConst64)
15815 v.AuxInt = int64ToAuxInt(0)
15816 return true
15817 }
15818 return false
15819 }
15820 func rewriteValuegeneric_OpLsh64x64(v *Value) bool {
15821 v_1 := v.Args[1]
15822 v_0 := v.Args[0]
15823 b := v.Block
15824 typ := &b.Func.Config.Types
15825
15826
15827 for {
15828 if v_0.Op != OpConst64 {
15829 break
15830 }
15831 c := auxIntToInt64(v_0.AuxInt)
15832 if v_1.Op != OpConst64 {
15833 break
15834 }
15835 d := auxIntToInt64(v_1.AuxInt)
15836 v.reset(OpConst64)
15837 v.AuxInt = int64ToAuxInt(c << uint64(d))
15838 return true
15839 }
15840
15841
15842 for {
15843 x := v_0
15844 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 0 {
15845 break
15846 }
15847 v.copyOf(x)
15848 return true
15849 }
15850
15851
15852 for {
15853 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
15854 break
15855 }
15856 v.reset(OpConst64)
15857 v.AuxInt = int64ToAuxInt(0)
15858 return true
15859 }
15860
15861
15862
15863 for {
15864 if v_1.Op != OpConst64 {
15865 break
15866 }
15867 c := auxIntToInt64(v_1.AuxInt)
15868 if !(uint64(c) >= 64) {
15869 break
15870 }
15871 v.reset(OpConst64)
15872 v.AuxInt = int64ToAuxInt(0)
15873 return true
15874 }
15875
15876
15877
15878 for {
15879 t := v.Type
15880 if v_0.Op != OpLsh64x64 {
15881 break
15882 }
15883 _ = v_0.Args[1]
15884 x := v_0.Args[0]
15885 v_0_1 := v_0.Args[1]
15886 if v_0_1.Op != OpConst64 {
15887 break
15888 }
15889 c := auxIntToInt64(v_0_1.AuxInt)
15890 if v_1.Op != OpConst64 {
15891 break
15892 }
15893 d := auxIntToInt64(v_1.AuxInt)
15894 if !(!uaddOvf(c, d)) {
15895 break
15896 }
15897 v.reset(OpLsh64x64)
15898 v0 := b.NewValue0(v.Pos, OpConst64, t)
15899 v0.AuxInt = int64ToAuxInt(c + d)
15900 v.AddArg2(x, v0)
15901 return true
15902 }
15903
15904
15905
15906 for {
15907 i := v_0
15908 if i.Op != OpRsh64x64 {
15909 break
15910 }
15911 _ = i.Args[1]
15912 x := i.Args[0]
15913 i_1 := i.Args[1]
15914 if i_1.Op != OpConst64 {
15915 break
15916 }
15917 c := auxIntToInt64(i_1.AuxInt)
15918 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != c || !(c >= 0 && c < 64 && i.Uses == 1) {
15919 break
15920 }
15921 v.reset(OpAnd64)
15922 v0 := b.NewValue0(v.Pos, OpConst64, v.Type)
15923 v0.AuxInt = int64ToAuxInt(int64(-1) << c)
15924 v.AddArg2(x, v0)
15925 return true
15926 }
15927
15928
15929
15930 for {
15931 i := v_0
15932 if i.Op != OpRsh64Ux64 {
15933 break
15934 }
15935 _ = i.Args[1]
15936 x := i.Args[0]
15937 i_1 := i.Args[1]
15938 if i_1.Op != OpConst64 {
15939 break
15940 }
15941 c := auxIntToInt64(i_1.AuxInt)
15942 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != c || !(c >= 0 && c < 64 && i.Uses == 1) {
15943 break
15944 }
15945 v.reset(OpAnd64)
15946 v0 := b.NewValue0(v.Pos, OpConst64, v.Type)
15947 v0.AuxInt = int64ToAuxInt(int64(-1) << c)
15948 v.AddArg2(x, v0)
15949 return true
15950 }
15951
15952
15953
15954 for {
15955 if v_0.Op != OpRsh64Ux64 {
15956 break
15957 }
15958 _ = v_0.Args[1]
15959 v_0_0 := v_0.Args[0]
15960 if v_0_0.Op != OpLsh64x64 {
15961 break
15962 }
15963 _ = v_0_0.Args[1]
15964 x := v_0_0.Args[0]
15965 v_0_0_1 := v_0_0.Args[1]
15966 if v_0_0_1.Op != OpConst64 {
15967 break
15968 }
15969 c1 := auxIntToInt64(v_0_0_1.AuxInt)
15970 v_0_1 := v_0.Args[1]
15971 if v_0_1.Op != OpConst64 {
15972 break
15973 }
15974 c2 := auxIntToInt64(v_0_1.AuxInt)
15975 if v_1.Op != OpConst64 {
15976 break
15977 }
15978 c3 := auxIntToInt64(v_1.AuxInt)
15979 if !(uint64(c1) >= uint64(c2) && uint64(c3) >= uint64(c2) && !uaddOvf(c1-c2, c3)) {
15980 break
15981 }
15982 v.reset(OpLsh64x64)
15983 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
15984 v0.AuxInt = int64ToAuxInt(c1 - c2 + c3)
15985 v.AddArg2(x, v0)
15986 return true
15987 }
15988
15989
15990
15991 for {
15992 if v_0.Op != OpAnd64 {
15993 break
15994 }
15995 _ = v_0.Args[1]
15996 v_0_0 := v_0.Args[0]
15997 v_0_1 := v_0.Args[1]
15998 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
15999 if v_0_0.Op != OpRsh64x64 {
16000 continue
16001 }
16002 t := v_0_0.Type
16003 _ = v_0_0.Args[1]
16004 x := v_0_0.Args[0]
16005 v_0_0_1 := v_0_0.Args[1]
16006 if v_0_0_1.Op != OpConst64 {
16007 continue
16008 }
16009 t2 := v_0_0_1.Type
16010 c := auxIntToInt64(v_0_0_1.AuxInt)
16011 if v_0_1.Op != OpConst64 {
16012 continue
16013 }
16014 d := auxIntToInt64(v_0_1.AuxInt)
16015 if v_1.Op != OpConst64 {
16016 continue
16017 }
16018 e := auxIntToInt64(v_1.AuxInt)
16019 if !(c >= e) {
16020 continue
16021 }
16022 v.reset(OpAnd64)
16023 v0 := b.NewValue0(v.Pos, OpRsh64x64, t)
16024 v1 := b.NewValue0(v.Pos, OpConst64, t2)
16025 v1.AuxInt = int64ToAuxInt(c - e)
16026 v0.AddArg2(x, v1)
16027 v2 := b.NewValue0(v.Pos, OpConst64, t)
16028 v2.AuxInt = int64ToAuxInt(d << e)
16029 v.AddArg2(v0, v2)
16030 return true
16031 }
16032 break
16033 }
16034
16035
16036
16037 for {
16038 if v_0.Op != OpAnd64 {
16039 break
16040 }
16041 _ = v_0.Args[1]
16042 v_0_0 := v_0.Args[0]
16043 v_0_1 := v_0.Args[1]
16044 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
16045 if v_0_0.Op != OpRsh64Ux64 {
16046 continue
16047 }
16048 t := v_0_0.Type
16049 _ = v_0_0.Args[1]
16050 x := v_0_0.Args[0]
16051 v_0_0_1 := v_0_0.Args[1]
16052 if v_0_0_1.Op != OpConst64 {
16053 continue
16054 }
16055 t2 := v_0_0_1.Type
16056 c := auxIntToInt64(v_0_0_1.AuxInt)
16057 if v_0_1.Op != OpConst64 {
16058 continue
16059 }
16060 d := auxIntToInt64(v_0_1.AuxInt)
16061 if v_1.Op != OpConst64 {
16062 continue
16063 }
16064 e := auxIntToInt64(v_1.AuxInt)
16065 if !(c >= e) {
16066 continue
16067 }
16068 v.reset(OpAnd64)
16069 v0 := b.NewValue0(v.Pos, OpRsh64Ux64, t)
16070 v1 := b.NewValue0(v.Pos, OpConst64, t2)
16071 v1.AuxInt = int64ToAuxInt(c - e)
16072 v0.AddArg2(x, v1)
16073 v2 := b.NewValue0(v.Pos, OpConst64, t)
16074 v2.AuxInt = int64ToAuxInt(d << e)
16075 v.AddArg2(v0, v2)
16076 return true
16077 }
16078 break
16079 }
16080
16081
16082
16083 for {
16084 if v_0.Op != OpAnd64 {
16085 break
16086 }
16087 _ = v_0.Args[1]
16088 v_0_0 := v_0.Args[0]
16089 v_0_1 := v_0.Args[1]
16090 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
16091 if v_0_0.Op != OpRsh64x64 {
16092 continue
16093 }
16094 t := v_0_0.Type
16095 _ = v_0_0.Args[1]
16096 x := v_0_0.Args[0]
16097 v_0_0_1 := v_0_0.Args[1]
16098 if v_0_0_1.Op != OpConst64 {
16099 continue
16100 }
16101 t2 := v_0_0_1.Type
16102 c := auxIntToInt64(v_0_0_1.AuxInt)
16103 if v_0_1.Op != OpConst64 {
16104 continue
16105 }
16106 d := auxIntToInt64(v_0_1.AuxInt)
16107 if v_1.Op != OpConst64 {
16108 continue
16109 }
16110 e := auxIntToInt64(v_1.AuxInt)
16111 if !(c < e) {
16112 continue
16113 }
16114 v.reset(OpAnd64)
16115 v0 := b.NewValue0(v.Pos, OpLsh64x64, t)
16116 v1 := b.NewValue0(v.Pos, OpConst64, t2)
16117 v1.AuxInt = int64ToAuxInt(e - c)
16118 v0.AddArg2(x, v1)
16119 v2 := b.NewValue0(v.Pos, OpConst64, t)
16120 v2.AuxInt = int64ToAuxInt(d << e)
16121 v.AddArg2(v0, v2)
16122 return true
16123 }
16124 break
16125 }
16126
16127
16128
16129 for {
16130 if v_0.Op != OpAnd64 {
16131 break
16132 }
16133 _ = v_0.Args[1]
16134 v_0_0 := v_0.Args[0]
16135 v_0_1 := v_0.Args[1]
16136 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
16137 if v_0_0.Op != OpRsh64Ux64 {
16138 continue
16139 }
16140 t := v_0_0.Type
16141 _ = v_0_0.Args[1]
16142 x := v_0_0.Args[0]
16143 v_0_0_1 := v_0_0.Args[1]
16144 if v_0_0_1.Op != OpConst64 {
16145 continue
16146 }
16147 t2 := v_0_0_1.Type
16148 c := auxIntToInt64(v_0_0_1.AuxInt)
16149 if v_0_1.Op != OpConst64 {
16150 continue
16151 }
16152 d := auxIntToInt64(v_0_1.AuxInt)
16153 if v_1.Op != OpConst64 {
16154 continue
16155 }
16156 e := auxIntToInt64(v_1.AuxInt)
16157 if !(c < e) {
16158 continue
16159 }
16160 v.reset(OpAnd64)
16161 v0 := b.NewValue0(v.Pos, OpLsh64x64, t)
16162 v1 := b.NewValue0(v.Pos, OpConst64, t2)
16163 v1.AuxInt = int64ToAuxInt(e - c)
16164 v0.AddArg2(x, v1)
16165 v2 := b.NewValue0(v.Pos, OpConst64, t)
16166 v2.AuxInt = int64ToAuxInt(d << e)
16167 v.AddArg2(v0, v2)
16168 return true
16169 }
16170 break
16171 }
16172 return false
16173 }
16174 func rewriteValuegeneric_OpLsh64x8(v *Value) bool {
16175 v_1 := v.Args[1]
16176 v_0 := v.Args[0]
16177 b := v.Block
16178
16179
16180 for {
16181 t := v.Type
16182 x := v_0
16183 if v_1.Op != OpConst8 {
16184 break
16185 }
16186 c := auxIntToInt8(v_1.AuxInt)
16187 v.reset(OpLsh64x64)
16188 v0 := b.NewValue0(v.Pos, OpConst64, t)
16189 v0.AuxInt = int64ToAuxInt(int64(uint8(c)))
16190 v.AddArg2(x, v0)
16191 return true
16192 }
16193
16194
16195 for {
16196 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
16197 break
16198 }
16199 v.reset(OpConst64)
16200 v.AuxInt = int64ToAuxInt(0)
16201 return true
16202 }
16203 return false
16204 }
16205 func rewriteValuegeneric_OpLsh8x16(v *Value) bool {
16206 v_1 := v.Args[1]
16207 v_0 := v.Args[0]
16208 b := v.Block
16209
16210
16211 for {
16212 t := v.Type
16213 x := v_0
16214 if v_1.Op != OpConst16 {
16215 break
16216 }
16217 c := auxIntToInt16(v_1.AuxInt)
16218 v.reset(OpLsh8x64)
16219 v0 := b.NewValue0(v.Pos, OpConst64, t)
16220 v0.AuxInt = int64ToAuxInt(int64(uint16(c)))
16221 v.AddArg2(x, v0)
16222 return true
16223 }
16224
16225
16226 for {
16227 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 {
16228 break
16229 }
16230 v.reset(OpConst8)
16231 v.AuxInt = int8ToAuxInt(0)
16232 return true
16233 }
16234 return false
16235 }
16236 func rewriteValuegeneric_OpLsh8x32(v *Value) bool {
16237 v_1 := v.Args[1]
16238 v_0 := v.Args[0]
16239 b := v.Block
16240
16241
16242 for {
16243 t := v.Type
16244 x := v_0
16245 if v_1.Op != OpConst32 {
16246 break
16247 }
16248 c := auxIntToInt32(v_1.AuxInt)
16249 v.reset(OpLsh8x64)
16250 v0 := b.NewValue0(v.Pos, OpConst64, t)
16251 v0.AuxInt = int64ToAuxInt(int64(uint32(c)))
16252 v.AddArg2(x, v0)
16253 return true
16254 }
16255
16256
16257 for {
16258 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 {
16259 break
16260 }
16261 v.reset(OpConst8)
16262 v.AuxInt = int8ToAuxInt(0)
16263 return true
16264 }
16265 return false
16266 }
16267 func rewriteValuegeneric_OpLsh8x64(v *Value) bool {
16268 v_1 := v.Args[1]
16269 v_0 := v.Args[0]
16270 b := v.Block
16271 typ := &b.Func.Config.Types
16272
16273
16274 for {
16275 if v_0.Op != OpConst8 {
16276 break
16277 }
16278 c := auxIntToInt8(v_0.AuxInt)
16279 if v_1.Op != OpConst64 {
16280 break
16281 }
16282 d := auxIntToInt64(v_1.AuxInt)
16283 v.reset(OpConst8)
16284 v.AuxInt = int8ToAuxInt(c << uint64(d))
16285 return true
16286 }
16287
16288
16289 for {
16290 x := v_0
16291 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 0 {
16292 break
16293 }
16294 v.copyOf(x)
16295 return true
16296 }
16297
16298
16299 for {
16300 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 {
16301 break
16302 }
16303 v.reset(OpConst8)
16304 v.AuxInt = int8ToAuxInt(0)
16305 return true
16306 }
16307
16308
16309
16310 for {
16311 if v_1.Op != OpConst64 {
16312 break
16313 }
16314 c := auxIntToInt64(v_1.AuxInt)
16315 if !(uint64(c) >= 8) {
16316 break
16317 }
16318 v.reset(OpConst8)
16319 v.AuxInt = int8ToAuxInt(0)
16320 return true
16321 }
16322
16323
16324
16325 for {
16326 t := v.Type
16327 if v_0.Op != OpLsh8x64 {
16328 break
16329 }
16330 _ = v_0.Args[1]
16331 x := v_0.Args[0]
16332 v_0_1 := v_0.Args[1]
16333 if v_0_1.Op != OpConst64 {
16334 break
16335 }
16336 c := auxIntToInt64(v_0_1.AuxInt)
16337 if v_1.Op != OpConst64 {
16338 break
16339 }
16340 d := auxIntToInt64(v_1.AuxInt)
16341 if !(!uaddOvf(c, d)) {
16342 break
16343 }
16344 v.reset(OpLsh8x64)
16345 v0 := b.NewValue0(v.Pos, OpConst64, t)
16346 v0.AuxInt = int64ToAuxInt(c + d)
16347 v.AddArg2(x, v0)
16348 return true
16349 }
16350
16351
16352
16353 for {
16354 i := v_0
16355 if i.Op != OpRsh8x64 {
16356 break
16357 }
16358 _ = i.Args[1]
16359 x := i.Args[0]
16360 i_1 := i.Args[1]
16361 if i_1.Op != OpConst64 {
16362 break
16363 }
16364 c := auxIntToInt64(i_1.AuxInt)
16365 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != c || !(c >= 0 && c < 8 && i.Uses == 1) {
16366 break
16367 }
16368 v.reset(OpAnd8)
16369 v0 := b.NewValue0(v.Pos, OpConst8, v.Type)
16370 v0.AuxInt = int8ToAuxInt(int8(-1) << c)
16371 v.AddArg2(x, v0)
16372 return true
16373 }
16374
16375
16376
16377 for {
16378 i := v_0
16379 if i.Op != OpRsh8Ux64 {
16380 break
16381 }
16382 _ = i.Args[1]
16383 x := i.Args[0]
16384 i_1 := i.Args[1]
16385 if i_1.Op != OpConst64 {
16386 break
16387 }
16388 c := auxIntToInt64(i_1.AuxInt)
16389 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != c || !(c >= 0 && c < 8 && i.Uses == 1) {
16390 break
16391 }
16392 v.reset(OpAnd8)
16393 v0 := b.NewValue0(v.Pos, OpConst8, v.Type)
16394 v0.AuxInt = int8ToAuxInt(int8(-1) << c)
16395 v.AddArg2(x, v0)
16396 return true
16397 }
16398
16399
16400
16401 for {
16402 if v_0.Op != OpRsh8Ux64 {
16403 break
16404 }
16405 _ = v_0.Args[1]
16406 v_0_0 := v_0.Args[0]
16407 if v_0_0.Op != OpLsh8x64 {
16408 break
16409 }
16410 _ = v_0_0.Args[1]
16411 x := v_0_0.Args[0]
16412 v_0_0_1 := v_0_0.Args[1]
16413 if v_0_0_1.Op != OpConst64 {
16414 break
16415 }
16416 c1 := auxIntToInt64(v_0_0_1.AuxInt)
16417 v_0_1 := v_0.Args[1]
16418 if v_0_1.Op != OpConst64 {
16419 break
16420 }
16421 c2 := auxIntToInt64(v_0_1.AuxInt)
16422 if v_1.Op != OpConst64 {
16423 break
16424 }
16425 c3 := auxIntToInt64(v_1.AuxInt)
16426 if !(uint64(c1) >= uint64(c2) && uint64(c3) >= uint64(c2) && !uaddOvf(c1-c2, c3)) {
16427 break
16428 }
16429 v.reset(OpLsh8x64)
16430 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
16431 v0.AuxInt = int64ToAuxInt(c1 - c2 + c3)
16432 v.AddArg2(x, v0)
16433 return true
16434 }
16435
16436
16437
16438 for {
16439 if v_0.Op != OpAnd8 {
16440 break
16441 }
16442 _ = v_0.Args[1]
16443 v_0_0 := v_0.Args[0]
16444 v_0_1 := v_0.Args[1]
16445 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
16446 if v_0_0.Op != OpRsh8x64 {
16447 continue
16448 }
16449 t := v_0_0.Type
16450 _ = v_0_0.Args[1]
16451 x := v_0_0.Args[0]
16452 v_0_0_1 := v_0_0.Args[1]
16453 if v_0_0_1.Op != OpConst64 {
16454 continue
16455 }
16456 t2 := v_0_0_1.Type
16457 c := auxIntToInt64(v_0_0_1.AuxInt)
16458 if v_0_1.Op != OpConst8 {
16459 continue
16460 }
16461 d := auxIntToInt8(v_0_1.AuxInt)
16462 if v_1.Op != OpConst64 {
16463 continue
16464 }
16465 e := auxIntToInt64(v_1.AuxInt)
16466 if !(c >= e) {
16467 continue
16468 }
16469 v.reset(OpAnd8)
16470 v0 := b.NewValue0(v.Pos, OpRsh8x64, t)
16471 v1 := b.NewValue0(v.Pos, OpConst64, t2)
16472 v1.AuxInt = int64ToAuxInt(c - e)
16473 v0.AddArg2(x, v1)
16474 v2 := b.NewValue0(v.Pos, OpConst8, t)
16475 v2.AuxInt = int8ToAuxInt(d << e)
16476 v.AddArg2(v0, v2)
16477 return true
16478 }
16479 break
16480 }
16481
16482
16483
16484 for {
16485 if v_0.Op != OpAnd8 {
16486 break
16487 }
16488 _ = v_0.Args[1]
16489 v_0_0 := v_0.Args[0]
16490 v_0_1 := v_0.Args[1]
16491 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
16492 if v_0_0.Op != OpRsh8Ux64 {
16493 continue
16494 }
16495 t := v_0_0.Type
16496 _ = v_0_0.Args[1]
16497 x := v_0_0.Args[0]
16498 v_0_0_1 := v_0_0.Args[1]
16499 if v_0_0_1.Op != OpConst64 {
16500 continue
16501 }
16502 t2 := v_0_0_1.Type
16503 c := auxIntToInt64(v_0_0_1.AuxInt)
16504 if v_0_1.Op != OpConst8 {
16505 continue
16506 }
16507 d := auxIntToInt8(v_0_1.AuxInt)
16508 if v_1.Op != OpConst64 {
16509 continue
16510 }
16511 e := auxIntToInt64(v_1.AuxInt)
16512 if !(c >= e) {
16513 continue
16514 }
16515 v.reset(OpAnd8)
16516 v0 := b.NewValue0(v.Pos, OpRsh8Ux64, t)
16517 v1 := b.NewValue0(v.Pos, OpConst64, t2)
16518 v1.AuxInt = int64ToAuxInt(c - e)
16519 v0.AddArg2(x, v1)
16520 v2 := b.NewValue0(v.Pos, OpConst8, t)
16521 v2.AuxInt = int8ToAuxInt(d << e)
16522 v.AddArg2(v0, v2)
16523 return true
16524 }
16525 break
16526 }
16527
16528
16529
16530 for {
16531 if v_0.Op != OpAnd8 {
16532 break
16533 }
16534 _ = v_0.Args[1]
16535 v_0_0 := v_0.Args[0]
16536 v_0_1 := v_0.Args[1]
16537 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
16538 if v_0_0.Op != OpRsh8x64 {
16539 continue
16540 }
16541 t := v_0_0.Type
16542 _ = v_0_0.Args[1]
16543 x := v_0_0.Args[0]
16544 v_0_0_1 := v_0_0.Args[1]
16545 if v_0_0_1.Op != OpConst64 {
16546 continue
16547 }
16548 t2 := v_0_0_1.Type
16549 c := auxIntToInt64(v_0_0_1.AuxInt)
16550 if v_0_1.Op != OpConst8 {
16551 continue
16552 }
16553 d := auxIntToInt8(v_0_1.AuxInt)
16554 if v_1.Op != OpConst64 {
16555 continue
16556 }
16557 e := auxIntToInt64(v_1.AuxInt)
16558 if !(c < e) {
16559 continue
16560 }
16561 v.reset(OpAnd8)
16562 v0 := b.NewValue0(v.Pos, OpLsh8x64, t)
16563 v1 := b.NewValue0(v.Pos, OpConst64, t2)
16564 v1.AuxInt = int64ToAuxInt(e - c)
16565 v0.AddArg2(x, v1)
16566 v2 := b.NewValue0(v.Pos, OpConst8, t)
16567 v2.AuxInt = int8ToAuxInt(d << e)
16568 v.AddArg2(v0, v2)
16569 return true
16570 }
16571 break
16572 }
16573
16574
16575
16576 for {
16577 if v_0.Op != OpAnd8 {
16578 break
16579 }
16580 _ = v_0.Args[1]
16581 v_0_0 := v_0.Args[0]
16582 v_0_1 := v_0.Args[1]
16583 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
16584 if v_0_0.Op != OpRsh8Ux64 {
16585 continue
16586 }
16587 t := v_0_0.Type
16588 _ = v_0_0.Args[1]
16589 x := v_0_0.Args[0]
16590 v_0_0_1 := v_0_0.Args[1]
16591 if v_0_0_1.Op != OpConst64 {
16592 continue
16593 }
16594 t2 := v_0_0_1.Type
16595 c := auxIntToInt64(v_0_0_1.AuxInt)
16596 if v_0_1.Op != OpConst8 {
16597 continue
16598 }
16599 d := auxIntToInt8(v_0_1.AuxInt)
16600 if v_1.Op != OpConst64 {
16601 continue
16602 }
16603 e := auxIntToInt64(v_1.AuxInt)
16604 if !(c < e) {
16605 continue
16606 }
16607 v.reset(OpAnd8)
16608 v0 := b.NewValue0(v.Pos, OpLsh8x64, t)
16609 v1 := b.NewValue0(v.Pos, OpConst64, t2)
16610 v1.AuxInt = int64ToAuxInt(e - c)
16611 v0.AddArg2(x, v1)
16612 v2 := b.NewValue0(v.Pos, OpConst8, t)
16613 v2.AuxInt = int8ToAuxInt(d << e)
16614 v.AddArg2(v0, v2)
16615 return true
16616 }
16617 break
16618 }
16619 return false
16620 }
16621 func rewriteValuegeneric_OpLsh8x8(v *Value) bool {
16622 v_1 := v.Args[1]
16623 v_0 := v.Args[0]
16624 b := v.Block
16625
16626
16627 for {
16628 t := v.Type
16629 x := v_0
16630 if v_1.Op != OpConst8 {
16631 break
16632 }
16633 c := auxIntToInt8(v_1.AuxInt)
16634 v.reset(OpLsh8x64)
16635 v0 := b.NewValue0(v.Pos, OpConst64, t)
16636 v0.AuxInt = int64ToAuxInt(int64(uint8(c)))
16637 v.AddArg2(x, v0)
16638 return true
16639 }
16640
16641
16642 for {
16643 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 {
16644 break
16645 }
16646 v.reset(OpConst8)
16647 v.AuxInt = int8ToAuxInt(0)
16648 return true
16649 }
16650 return false
16651 }
16652 func rewriteValuegeneric_OpMod16(v *Value) bool {
16653 v_1 := v.Args[1]
16654 v_0 := v.Args[0]
16655 b := v.Block
16656
16657
16658
16659 for {
16660 if v_0.Op != OpConst16 {
16661 break
16662 }
16663 c := auxIntToInt16(v_0.AuxInt)
16664 if v_1.Op != OpConst16 {
16665 break
16666 }
16667 d := auxIntToInt16(v_1.AuxInt)
16668 if !(d != 0) {
16669 break
16670 }
16671 v.reset(OpConst16)
16672 v.AuxInt = int16ToAuxInt(c % d)
16673 return true
16674 }
16675
16676
16677
16678 for {
16679 t := v.Type
16680 n := v_0
16681 if v_1.Op != OpConst16 {
16682 break
16683 }
16684 c := auxIntToInt16(v_1.AuxInt)
16685 if !(isNonNegative(n) && isPowerOfTwo(c)) {
16686 break
16687 }
16688 v.reset(OpAnd16)
16689 v0 := b.NewValue0(v.Pos, OpConst16, t)
16690 v0.AuxInt = int16ToAuxInt(c - 1)
16691 v.AddArg2(n, v0)
16692 return true
16693 }
16694
16695
16696
16697 for {
16698 t := v.Type
16699 n := v_0
16700 if v_1.Op != OpConst16 {
16701 break
16702 }
16703 c := auxIntToInt16(v_1.AuxInt)
16704 if !(c < 0 && c != -1<<15) {
16705 break
16706 }
16707 v.reset(OpMod16)
16708 v.Type = t
16709 v0 := b.NewValue0(v.Pos, OpConst16, t)
16710 v0.AuxInt = int16ToAuxInt(-c)
16711 v.AddArg2(n, v0)
16712 return true
16713 }
16714
16715
16716
16717 for {
16718 t := v.Type
16719 x := v_0
16720 if v_1.Op != OpConst16 {
16721 break
16722 }
16723 c := auxIntToInt16(v_1.AuxInt)
16724 if !(x.Op != OpConst16 && (c > 0 || c == -1<<15)) {
16725 break
16726 }
16727 v.reset(OpSub16)
16728 v0 := b.NewValue0(v.Pos, OpMul16, t)
16729 v1 := b.NewValue0(v.Pos, OpDiv16, t)
16730 v2 := b.NewValue0(v.Pos, OpConst16, t)
16731 v2.AuxInt = int16ToAuxInt(c)
16732 v1.AddArg2(x, v2)
16733 v0.AddArg2(v1, v2)
16734 v.AddArg2(x, v0)
16735 return true
16736 }
16737 return false
16738 }
16739 func rewriteValuegeneric_OpMod16u(v *Value) bool {
16740 v_1 := v.Args[1]
16741 v_0 := v.Args[0]
16742 b := v.Block
16743
16744
16745
16746 for {
16747 if v_0.Op != OpConst16 {
16748 break
16749 }
16750 c := auxIntToInt16(v_0.AuxInt)
16751 if v_1.Op != OpConst16 {
16752 break
16753 }
16754 d := auxIntToInt16(v_1.AuxInt)
16755 if !(d != 0) {
16756 break
16757 }
16758 v.reset(OpConst16)
16759 v.AuxInt = int16ToAuxInt(int16(uint16(c) % uint16(d)))
16760 return true
16761 }
16762
16763
16764
16765 for {
16766 t := v.Type
16767 n := v_0
16768 if v_1.Op != OpConst16 {
16769 break
16770 }
16771 c := auxIntToInt16(v_1.AuxInt)
16772 if !(isUnsignedPowerOfTwo(uint16(c))) {
16773 break
16774 }
16775 v.reset(OpAnd16)
16776 v0 := b.NewValue0(v.Pos, OpConst16, t)
16777 v0.AuxInt = int16ToAuxInt(c - 1)
16778 v.AddArg2(n, v0)
16779 return true
16780 }
16781
16782
16783
16784 for {
16785 t := v.Type
16786 x := v_0
16787 if v_1.Op != OpConst16 {
16788 break
16789 }
16790 c := auxIntToInt16(v_1.AuxInt)
16791 if !(x.Op != OpConst16 && c > 0 && umagicOK16(c)) {
16792 break
16793 }
16794 v.reset(OpSub16)
16795 v0 := b.NewValue0(v.Pos, OpMul16, t)
16796 v1 := b.NewValue0(v.Pos, OpDiv16u, t)
16797 v2 := b.NewValue0(v.Pos, OpConst16, t)
16798 v2.AuxInt = int16ToAuxInt(c)
16799 v1.AddArg2(x, v2)
16800 v0.AddArg2(v1, v2)
16801 v.AddArg2(x, v0)
16802 return true
16803 }
16804 return false
16805 }
16806 func rewriteValuegeneric_OpMod32(v *Value) bool {
16807 v_1 := v.Args[1]
16808 v_0 := v.Args[0]
16809 b := v.Block
16810
16811
16812
16813 for {
16814 if v_0.Op != OpConst32 {
16815 break
16816 }
16817 c := auxIntToInt32(v_0.AuxInt)
16818 if v_1.Op != OpConst32 {
16819 break
16820 }
16821 d := auxIntToInt32(v_1.AuxInt)
16822 if !(d != 0) {
16823 break
16824 }
16825 v.reset(OpConst32)
16826 v.AuxInt = int32ToAuxInt(c % d)
16827 return true
16828 }
16829
16830
16831
16832 for {
16833 t := v.Type
16834 n := v_0
16835 if v_1.Op != OpConst32 {
16836 break
16837 }
16838 c := auxIntToInt32(v_1.AuxInt)
16839 if !(isNonNegative(n) && isPowerOfTwo(c)) {
16840 break
16841 }
16842 v.reset(OpAnd32)
16843 v0 := b.NewValue0(v.Pos, OpConst32, t)
16844 v0.AuxInt = int32ToAuxInt(c - 1)
16845 v.AddArg2(n, v0)
16846 return true
16847 }
16848
16849
16850
16851 for {
16852 t := v.Type
16853 n := v_0
16854 if v_1.Op != OpConst32 {
16855 break
16856 }
16857 c := auxIntToInt32(v_1.AuxInt)
16858 if !(c < 0 && c != -1<<31) {
16859 break
16860 }
16861 v.reset(OpMod32)
16862 v.Type = t
16863 v0 := b.NewValue0(v.Pos, OpConst32, t)
16864 v0.AuxInt = int32ToAuxInt(-c)
16865 v.AddArg2(n, v0)
16866 return true
16867 }
16868
16869
16870
16871 for {
16872 t := v.Type
16873 x := v_0
16874 if v_1.Op != OpConst32 {
16875 break
16876 }
16877 c := auxIntToInt32(v_1.AuxInt)
16878 if !(x.Op != OpConst32 && (c > 0 || c == -1<<31)) {
16879 break
16880 }
16881 v.reset(OpSub32)
16882 v0 := b.NewValue0(v.Pos, OpMul32, t)
16883 v1 := b.NewValue0(v.Pos, OpDiv32, t)
16884 v2 := b.NewValue0(v.Pos, OpConst32, t)
16885 v2.AuxInt = int32ToAuxInt(c)
16886 v1.AddArg2(x, v2)
16887 v0.AddArg2(v1, v2)
16888 v.AddArg2(x, v0)
16889 return true
16890 }
16891 return false
16892 }
16893 func rewriteValuegeneric_OpMod32u(v *Value) bool {
16894 v_1 := v.Args[1]
16895 v_0 := v.Args[0]
16896 b := v.Block
16897
16898
16899
16900 for {
16901 if v_0.Op != OpConst32 {
16902 break
16903 }
16904 c := auxIntToInt32(v_0.AuxInt)
16905 if v_1.Op != OpConst32 {
16906 break
16907 }
16908 d := auxIntToInt32(v_1.AuxInt)
16909 if !(d != 0) {
16910 break
16911 }
16912 v.reset(OpConst32)
16913 v.AuxInt = int32ToAuxInt(int32(uint32(c) % uint32(d)))
16914 return true
16915 }
16916
16917
16918
16919 for {
16920 t := v.Type
16921 n := v_0
16922 if v_1.Op != OpConst32 {
16923 break
16924 }
16925 c := auxIntToInt32(v_1.AuxInt)
16926 if !(isUnsignedPowerOfTwo(uint32(c))) {
16927 break
16928 }
16929 v.reset(OpAnd32)
16930 v0 := b.NewValue0(v.Pos, OpConst32, t)
16931 v0.AuxInt = int32ToAuxInt(c - 1)
16932 v.AddArg2(n, v0)
16933 return true
16934 }
16935
16936
16937
16938 for {
16939 t := v.Type
16940 x := v_0
16941 if v_1.Op != OpConst32 {
16942 break
16943 }
16944 c := auxIntToInt32(v_1.AuxInt)
16945 if !(x.Op != OpConst32 && c > 0 && umagicOK32(c)) {
16946 break
16947 }
16948 v.reset(OpSub32)
16949 v0 := b.NewValue0(v.Pos, OpMul32, t)
16950 v1 := b.NewValue0(v.Pos, OpDiv32u, t)
16951 v2 := b.NewValue0(v.Pos, OpConst32, t)
16952 v2.AuxInt = int32ToAuxInt(c)
16953 v1.AddArg2(x, v2)
16954 v0.AddArg2(v1, v2)
16955 v.AddArg2(x, v0)
16956 return true
16957 }
16958 return false
16959 }
16960 func rewriteValuegeneric_OpMod64(v *Value) bool {
16961 v_1 := v.Args[1]
16962 v_0 := v.Args[0]
16963 b := v.Block
16964
16965
16966
16967 for {
16968 if v_0.Op != OpConst64 {
16969 break
16970 }
16971 c := auxIntToInt64(v_0.AuxInt)
16972 if v_1.Op != OpConst64 {
16973 break
16974 }
16975 d := auxIntToInt64(v_1.AuxInt)
16976 if !(d != 0) {
16977 break
16978 }
16979 v.reset(OpConst64)
16980 v.AuxInt = int64ToAuxInt(c % d)
16981 return true
16982 }
16983
16984
16985
16986 for {
16987 t := v.Type
16988 n := v_0
16989 if v_1.Op != OpConst64 {
16990 break
16991 }
16992 c := auxIntToInt64(v_1.AuxInt)
16993 if !(isNonNegative(n) && isPowerOfTwo(c)) {
16994 break
16995 }
16996 v.reset(OpAnd64)
16997 v0 := b.NewValue0(v.Pos, OpConst64, t)
16998 v0.AuxInt = int64ToAuxInt(c - 1)
16999 v.AddArg2(n, v0)
17000 return true
17001 }
17002
17003
17004
17005 for {
17006 n := v_0
17007 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != -1<<63 || !(isNonNegative(n)) {
17008 break
17009 }
17010 v.copyOf(n)
17011 return true
17012 }
17013
17014
17015
17016 for {
17017 t := v.Type
17018 n := v_0
17019 if v_1.Op != OpConst64 {
17020 break
17021 }
17022 c := auxIntToInt64(v_1.AuxInt)
17023 if !(c < 0 && c != -1<<63) {
17024 break
17025 }
17026 v.reset(OpMod64)
17027 v.Type = t
17028 v0 := b.NewValue0(v.Pos, OpConst64, t)
17029 v0.AuxInt = int64ToAuxInt(-c)
17030 v.AddArg2(n, v0)
17031 return true
17032 }
17033
17034
17035
17036 for {
17037 t := v.Type
17038 x := v_0
17039 if v_1.Op != OpConst64 {
17040 break
17041 }
17042 c := auxIntToInt64(v_1.AuxInt)
17043 if !(x.Op != OpConst64 && (c > 0 || c == -1<<63)) {
17044 break
17045 }
17046 v.reset(OpSub64)
17047 v0 := b.NewValue0(v.Pos, OpMul64, t)
17048 v1 := b.NewValue0(v.Pos, OpDiv64, t)
17049 v2 := b.NewValue0(v.Pos, OpConst64, t)
17050 v2.AuxInt = int64ToAuxInt(c)
17051 v1.AddArg2(x, v2)
17052 v0.AddArg2(v1, v2)
17053 v.AddArg2(x, v0)
17054 return true
17055 }
17056 return false
17057 }
17058 func rewriteValuegeneric_OpMod64u(v *Value) bool {
17059 v_1 := v.Args[1]
17060 v_0 := v.Args[0]
17061 b := v.Block
17062
17063
17064
17065 for {
17066 if v_0.Op != OpConst64 {
17067 break
17068 }
17069 c := auxIntToInt64(v_0.AuxInt)
17070 if v_1.Op != OpConst64 {
17071 break
17072 }
17073 d := auxIntToInt64(v_1.AuxInt)
17074 if !(d != 0) {
17075 break
17076 }
17077 v.reset(OpConst64)
17078 v.AuxInt = int64ToAuxInt(int64(uint64(c) % uint64(d)))
17079 return true
17080 }
17081
17082
17083
17084 for {
17085 t := v.Type
17086 n := v_0
17087 if v_1.Op != OpConst64 {
17088 break
17089 }
17090 c := auxIntToInt64(v_1.AuxInt)
17091 if !(isUnsignedPowerOfTwo(uint64(c))) {
17092 break
17093 }
17094 v.reset(OpAnd64)
17095 v0 := b.NewValue0(v.Pos, OpConst64, t)
17096 v0.AuxInt = int64ToAuxInt(c - 1)
17097 v.AddArg2(n, v0)
17098 return true
17099 }
17100
17101
17102
17103 for {
17104 t := v.Type
17105 x := v_0
17106 if v_1.Op != OpConst64 {
17107 break
17108 }
17109 c := auxIntToInt64(v_1.AuxInt)
17110 if !(x.Op != OpConst64 && c > 0 && umagicOK64(c)) {
17111 break
17112 }
17113 v.reset(OpSub64)
17114 v0 := b.NewValue0(v.Pos, OpMul64, t)
17115 v1 := b.NewValue0(v.Pos, OpDiv64u, t)
17116 v2 := b.NewValue0(v.Pos, OpConst64, t)
17117 v2.AuxInt = int64ToAuxInt(c)
17118 v1.AddArg2(x, v2)
17119 v0.AddArg2(v1, v2)
17120 v.AddArg2(x, v0)
17121 return true
17122 }
17123 return false
17124 }
17125 func rewriteValuegeneric_OpMod8(v *Value) bool {
17126 v_1 := v.Args[1]
17127 v_0 := v.Args[0]
17128 b := v.Block
17129
17130
17131
17132 for {
17133 if v_0.Op != OpConst8 {
17134 break
17135 }
17136 c := auxIntToInt8(v_0.AuxInt)
17137 if v_1.Op != OpConst8 {
17138 break
17139 }
17140 d := auxIntToInt8(v_1.AuxInt)
17141 if !(d != 0) {
17142 break
17143 }
17144 v.reset(OpConst8)
17145 v.AuxInt = int8ToAuxInt(c % d)
17146 return true
17147 }
17148
17149
17150
17151 for {
17152 t := v.Type
17153 n := v_0
17154 if v_1.Op != OpConst8 {
17155 break
17156 }
17157 c := auxIntToInt8(v_1.AuxInt)
17158 if !(isNonNegative(n) && isPowerOfTwo(c)) {
17159 break
17160 }
17161 v.reset(OpAnd8)
17162 v0 := b.NewValue0(v.Pos, OpConst8, t)
17163 v0.AuxInt = int8ToAuxInt(c - 1)
17164 v.AddArg2(n, v0)
17165 return true
17166 }
17167
17168
17169
17170 for {
17171 t := v.Type
17172 n := v_0
17173 if v_1.Op != OpConst8 {
17174 break
17175 }
17176 c := auxIntToInt8(v_1.AuxInt)
17177 if !(c < 0 && c != -1<<7) {
17178 break
17179 }
17180 v.reset(OpMod8)
17181 v.Type = t
17182 v0 := b.NewValue0(v.Pos, OpConst8, t)
17183 v0.AuxInt = int8ToAuxInt(-c)
17184 v.AddArg2(n, v0)
17185 return true
17186 }
17187
17188
17189
17190 for {
17191 t := v.Type
17192 x := v_0
17193 if v_1.Op != OpConst8 {
17194 break
17195 }
17196 c := auxIntToInt8(v_1.AuxInt)
17197 if !(x.Op != OpConst8 && (c > 0 || c == -1<<7)) {
17198 break
17199 }
17200 v.reset(OpSub8)
17201 v0 := b.NewValue0(v.Pos, OpMul8, t)
17202 v1 := b.NewValue0(v.Pos, OpDiv8, t)
17203 v2 := b.NewValue0(v.Pos, OpConst8, t)
17204 v2.AuxInt = int8ToAuxInt(c)
17205 v1.AddArg2(x, v2)
17206 v0.AddArg2(v1, v2)
17207 v.AddArg2(x, v0)
17208 return true
17209 }
17210 return false
17211 }
17212 func rewriteValuegeneric_OpMod8u(v *Value) bool {
17213 v_1 := v.Args[1]
17214 v_0 := v.Args[0]
17215 b := v.Block
17216
17217
17218
17219 for {
17220 if v_0.Op != OpConst8 {
17221 break
17222 }
17223 c := auxIntToInt8(v_0.AuxInt)
17224 if v_1.Op != OpConst8 {
17225 break
17226 }
17227 d := auxIntToInt8(v_1.AuxInt)
17228 if !(d != 0) {
17229 break
17230 }
17231 v.reset(OpConst8)
17232 v.AuxInt = int8ToAuxInt(int8(uint8(c) % uint8(d)))
17233 return true
17234 }
17235
17236
17237
17238 for {
17239 t := v.Type
17240 n := v_0
17241 if v_1.Op != OpConst8 {
17242 break
17243 }
17244 c := auxIntToInt8(v_1.AuxInt)
17245 if !(isUnsignedPowerOfTwo(uint8(c))) {
17246 break
17247 }
17248 v.reset(OpAnd8)
17249 v0 := b.NewValue0(v.Pos, OpConst8, t)
17250 v0.AuxInt = int8ToAuxInt(c - 1)
17251 v.AddArg2(n, v0)
17252 return true
17253 }
17254
17255
17256
17257 for {
17258 t := v.Type
17259 x := v_0
17260 if v_1.Op != OpConst8 {
17261 break
17262 }
17263 c := auxIntToInt8(v_1.AuxInt)
17264 if !(x.Op != OpConst8 && c > 0 && umagicOK8(c)) {
17265 break
17266 }
17267 v.reset(OpSub8)
17268 v0 := b.NewValue0(v.Pos, OpMul8, t)
17269 v1 := b.NewValue0(v.Pos, OpDiv8u, t)
17270 v2 := b.NewValue0(v.Pos, OpConst8, t)
17271 v2.AuxInt = int8ToAuxInt(c)
17272 v1.AddArg2(x, v2)
17273 v0.AddArg2(v1, v2)
17274 v.AddArg2(x, v0)
17275 return true
17276 }
17277 return false
17278 }
17279 func rewriteValuegeneric_OpMove(v *Value) bool {
17280 v_2 := v.Args[2]
17281 v_1 := v.Args[1]
17282 v_0 := v.Args[0]
17283 b := v.Block
17284 config := b.Func.Config
17285
17286
17287
17288 for {
17289 n := auxIntToInt64(v.AuxInt)
17290 t := auxToType(v.Aux)
17291 dst1 := v_0
17292 src := v_1
17293 mem := v_2
17294 if mem.Op != OpZero || auxIntToInt64(mem.AuxInt) != n || auxToType(mem.Aux) != t {
17295 break
17296 }
17297 dst2 := mem.Args[0]
17298 if !(isSamePtr(src, dst2)) {
17299 break
17300 }
17301 v.reset(OpZero)
17302 v.AuxInt = int64ToAuxInt(n)
17303 v.Aux = typeToAux(t)
17304 v.AddArg2(dst1, mem)
17305 return true
17306 }
17307
17308
17309
17310 for {
17311 n := auxIntToInt64(v.AuxInt)
17312 t := auxToType(v.Aux)
17313 dst1 := v_0
17314 src := v_1
17315 mem := v_2
17316 if mem.Op != OpVarDef {
17317 break
17318 }
17319 mem_0 := mem.Args[0]
17320 if mem_0.Op != OpZero || auxIntToInt64(mem_0.AuxInt) != n || auxToType(mem_0.Aux) != t {
17321 break
17322 }
17323 dst0 := mem_0.Args[0]
17324 if !(isSamePtr(src, dst0)) {
17325 break
17326 }
17327 v.reset(OpZero)
17328 v.AuxInt = int64ToAuxInt(n)
17329 v.Aux = typeToAux(t)
17330 v.AddArg2(dst1, mem)
17331 return true
17332 }
17333
17334
17335
17336 for {
17337 n := auxIntToInt64(v.AuxInt)
17338 t := auxToType(v.Aux)
17339 dst := v_0
17340 if v_1.Op != OpAddr {
17341 break
17342 }
17343 sym := auxToSym(v_1.Aux)
17344 v_1_0 := v_1.Args[0]
17345 if v_1_0.Op != OpSB {
17346 break
17347 }
17348 mem := v_2
17349 if !(symIsROZero(sym)) {
17350 break
17351 }
17352 v.reset(OpZero)
17353 v.AuxInt = int64ToAuxInt(n)
17354 v.Aux = typeToAux(t)
17355 v.AddArg2(dst, mem)
17356 return true
17357 }
17358
17359
17360
17361 for {
17362 n := auxIntToInt64(v.AuxInt)
17363 t1 := auxToType(v.Aux)
17364 dst1 := v_0
17365 src1 := v_1
17366 store := v_2
17367 if store.Op != OpStore {
17368 break
17369 }
17370 t2 := auxToType(store.Aux)
17371 mem := store.Args[2]
17372 op := store.Args[0]
17373 if op.Op != OpOffPtr {
17374 break
17375 }
17376 o2 := auxIntToInt64(op.AuxInt)
17377 dst2 := op.Args[0]
17378 if !(isSamePtr(dst1, dst2) && store.Uses == 1 && n >= o2+t2.Size() && disjoint(src1, n, op, t2.Size()) && clobber(store)) {
17379 break
17380 }
17381 v.reset(OpMove)
17382 v.AuxInt = int64ToAuxInt(n)
17383 v.Aux = typeToAux(t1)
17384 v.AddArg3(dst1, src1, mem)
17385 return true
17386 }
17387
17388
17389
17390 for {
17391 n := auxIntToInt64(v.AuxInt)
17392 t := auxToType(v.Aux)
17393 dst1 := v_0
17394 src1 := v_1
17395 move := v_2
17396 if move.Op != OpMove || auxIntToInt64(move.AuxInt) != n || auxToType(move.Aux) != t {
17397 break
17398 }
17399 mem := move.Args[2]
17400 dst2 := move.Args[0]
17401 if !(move.Uses == 1 && isSamePtr(dst1, dst2) && disjoint(src1, n, dst2, n) && clobber(move)) {
17402 break
17403 }
17404 v.reset(OpMove)
17405 v.AuxInt = int64ToAuxInt(n)
17406 v.Aux = typeToAux(t)
17407 v.AddArg3(dst1, src1, mem)
17408 return true
17409 }
17410
17411
17412
17413 for {
17414 n := auxIntToInt64(v.AuxInt)
17415 t := auxToType(v.Aux)
17416 dst1 := v_0
17417 src1 := v_1
17418 vardef := v_2
17419 if vardef.Op != OpVarDef {
17420 break
17421 }
17422 x := auxToSym(vardef.Aux)
17423 move := vardef.Args[0]
17424 if move.Op != OpMove || auxIntToInt64(move.AuxInt) != n || auxToType(move.Aux) != t {
17425 break
17426 }
17427 mem := move.Args[2]
17428 dst2 := move.Args[0]
17429 if !(move.Uses == 1 && vardef.Uses == 1 && isSamePtr(dst1, dst2) && disjoint(src1, n, dst2, n) && clobber(move, vardef)) {
17430 break
17431 }
17432 v.reset(OpMove)
17433 v.AuxInt = int64ToAuxInt(n)
17434 v.Aux = typeToAux(t)
17435 v0 := b.NewValue0(v.Pos, OpVarDef, types.TypeMem)
17436 v0.Aux = symToAux(x)
17437 v0.AddArg(mem)
17438 v.AddArg3(dst1, src1, v0)
17439 return true
17440 }
17441
17442
17443
17444 for {
17445 n := auxIntToInt64(v.AuxInt)
17446 t := auxToType(v.Aux)
17447 dst1 := v_0
17448 src1 := v_1
17449 zero := v_2
17450 if zero.Op != OpZero || auxIntToInt64(zero.AuxInt) != n || auxToType(zero.Aux) != t {
17451 break
17452 }
17453 mem := zero.Args[1]
17454 dst2 := zero.Args[0]
17455 if !(zero.Uses == 1 && isSamePtr(dst1, dst2) && disjoint(src1, n, dst2, n) && clobber(zero)) {
17456 break
17457 }
17458 v.reset(OpMove)
17459 v.AuxInt = int64ToAuxInt(n)
17460 v.Aux = typeToAux(t)
17461 v.AddArg3(dst1, src1, mem)
17462 return true
17463 }
17464
17465
17466
17467 for {
17468 n := auxIntToInt64(v.AuxInt)
17469 t := auxToType(v.Aux)
17470 dst1 := v_0
17471 src1 := v_1
17472 vardef := v_2
17473 if vardef.Op != OpVarDef {
17474 break
17475 }
17476 x := auxToSym(vardef.Aux)
17477 zero := vardef.Args[0]
17478 if zero.Op != OpZero || auxIntToInt64(zero.AuxInt) != n || auxToType(zero.Aux) != t {
17479 break
17480 }
17481 mem := zero.Args[1]
17482 dst2 := zero.Args[0]
17483 if !(zero.Uses == 1 && vardef.Uses == 1 && isSamePtr(dst1, dst2) && disjoint(src1, n, dst2, n) && clobber(zero, vardef)) {
17484 break
17485 }
17486 v.reset(OpMove)
17487 v.AuxInt = int64ToAuxInt(n)
17488 v.Aux = typeToAux(t)
17489 v0 := b.NewValue0(v.Pos, OpVarDef, types.TypeMem)
17490 v0.Aux = symToAux(x)
17491 v0.AddArg(mem)
17492 v.AddArg3(dst1, src1, v0)
17493 return true
17494 }
17495
17496
17497
17498 for {
17499 n := auxIntToInt64(v.AuxInt)
17500 t1 := auxToType(v.Aux)
17501 dst := v_0
17502 p1 := v_1
17503 mem := v_2
17504 if mem.Op != OpStore {
17505 break
17506 }
17507 t2 := auxToType(mem.Aux)
17508 _ = mem.Args[2]
17509 op2 := mem.Args[0]
17510 if op2.Op != OpOffPtr {
17511 break
17512 }
17513 tt2 := op2.Type
17514 o2 := auxIntToInt64(op2.AuxInt)
17515 p2 := op2.Args[0]
17516 d1 := mem.Args[1]
17517 mem_2 := mem.Args[2]
17518 if mem_2.Op != OpStore {
17519 break
17520 }
17521 t3 := auxToType(mem_2.Aux)
17522 d2 := mem_2.Args[1]
17523 op3 := mem_2.Args[0]
17524 if op3.Op != OpOffPtr {
17525 break
17526 }
17527 tt3 := op3.Type
17528 if auxIntToInt64(op3.AuxInt) != 0 {
17529 break
17530 }
17531 p3 := op3.Args[0]
17532 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()) {
17533 break
17534 }
17535 v.reset(OpStore)
17536 v.Aux = typeToAux(t2)
17537 v0 := b.NewValue0(v.Pos, OpOffPtr, tt2)
17538 v0.AuxInt = int64ToAuxInt(o2)
17539 v0.AddArg(dst)
17540 v1 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
17541 v1.Aux = typeToAux(t3)
17542 v2 := b.NewValue0(v.Pos, OpOffPtr, tt3)
17543 v2.AuxInt = int64ToAuxInt(0)
17544 v2.AddArg(dst)
17545 v1.AddArg3(v2, d2, mem)
17546 v.AddArg3(v0, d1, v1)
17547 return true
17548 }
17549
17550
17551
17552 for {
17553 n := auxIntToInt64(v.AuxInt)
17554 t1 := auxToType(v.Aux)
17555 dst := v_0
17556 p1 := v_1
17557 mem := v_2
17558 if mem.Op != OpStore {
17559 break
17560 }
17561 t2 := auxToType(mem.Aux)
17562 _ = mem.Args[2]
17563 op2 := mem.Args[0]
17564 if op2.Op != OpOffPtr {
17565 break
17566 }
17567 tt2 := op2.Type
17568 o2 := auxIntToInt64(op2.AuxInt)
17569 p2 := op2.Args[0]
17570 d1 := mem.Args[1]
17571 mem_2 := mem.Args[2]
17572 if mem_2.Op != OpStore {
17573 break
17574 }
17575 t3 := auxToType(mem_2.Aux)
17576 _ = mem_2.Args[2]
17577 op3 := mem_2.Args[0]
17578 if op3.Op != OpOffPtr {
17579 break
17580 }
17581 tt3 := op3.Type
17582 o3 := auxIntToInt64(op3.AuxInt)
17583 p3 := op3.Args[0]
17584 d2 := mem_2.Args[1]
17585 mem_2_2 := mem_2.Args[2]
17586 if mem_2_2.Op != OpStore {
17587 break
17588 }
17589 t4 := auxToType(mem_2_2.Aux)
17590 d3 := mem_2_2.Args[1]
17591 op4 := mem_2_2.Args[0]
17592 if op4.Op != OpOffPtr {
17593 break
17594 }
17595 tt4 := op4.Type
17596 if auxIntToInt64(op4.AuxInt) != 0 {
17597 break
17598 }
17599 p4 := op4.Args[0]
17600 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()) {
17601 break
17602 }
17603 v.reset(OpStore)
17604 v.Aux = typeToAux(t2)
17605 v0 := b.NewValue0(v.Pos, OpOffPtr, tt2)
17606 v0.AuxInt = int64ToAuxInt(o2)
17607 v0.AddArg(dst)
17608 v1 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
17609 v1.Aux = typeToAux(t3)
17610 v2 := b.NewValue0(v.Pos, OpOffPtr, tt3)
17611 v2.AuxInt = int64ToAuxInt(o3)
17612 v2.AddArg(dst)
17613 v3 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
17614 v3.Aux = typeToAux(t4)
17615 v4 := b.NewValue0(v.Pos, OpOffPtr, tt4)
17616 v4.AuxInt = int64ToAuxInt(0)
17617 v4.AddArg(dst)
17618 v3.AddArg3(v4, d3, mem)
17619 v1.AddArg3(v2, d2, v3)
17620 v.AddArg3(v0, d1, v1)
17621 return true
17622 }
17623
17624
17625
17626 for {
17627 n := auxIntToInt64(v.AuxInt)
17628 t1 := auxToType(v.Aux)
17629 dst := v_0
17630 p1 := v_1
17631 mem := v_2
17632 if mem.Op != OpStore {
17633 break
17634 }
17635 t2 := auxToType(mem.Aux)
17636 _ = mem.Args[2]
17637 op2 := mem.Args[0]
17638 if op2.Op != OpOffPtr {
17639 break
17640 }
17641 tt2 := op2.Type
17642 o2 := auxIntToInt64(op2.AuxInt)
17643 p2 := op2.Args[0]
17644 d1 := mem.Args[1]
17645 mem_2 := mem.Args[2]
17646 if mem_2.Op != OpStore {
17647 break
17648 }
17649 t3 := auxToType(mem_2.Aux)
17650 _ = mem_2.Args[2]
17651 op3 := mem_2.Args[0]
17652 if op3.Op != OpOffPtr {
17653 break
17654 }
17655 tt3 := op3.Type
17656 o3 := auxIntToInt64(op3.AuxInt)
17657 p3 := op3.Args[0]
17658 d2 := mem_2.Args[1]
17659 mem_2_2 := mem_2.Args[2]
17660 if mem_2_2.Op != OpStore {
17661 break
17662 }
17663 t4 := auxToType(mem_2_2.Aux)
17664 _ = mem_2_2.Args[2]
17665 op4 := mem_2_2.Args[0]
17666 if op4.Op != OpOffPtr {
17667 break
17668 }
17669 tt4 := op4.Type
17670 o4 := auxIntToInt64(op4.AuxInt)
17671 p4 := op4.Args[0]
17672 d3 := mem_2_2.Args[1]
17673 mem_2_2_2 := mem_2_2.Args[2]
17674 if mem_2_2_2.Op != OpStore {
17675 break
17676 }
17677 t5 := auxToType(mem_2_2_2.Aux)
17678 d4 := mem_2_2_2.Args[1]
17679 op5 := mem_2_2_2.Args[0]
17680 if op5.Op != OpOffPtr {
17681 break
17682 }
17683 tt5 := op5.Type
17684 if auxIntToInt64(op5.AuxInt) != 0 {
17685 break
17686 }
17687 p5 := op5.Args[0]
17688 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()) {
17689 break
17690 }
17691 v.reset(OpStore)
17692 v.Aux = typeToAux(t2)
17693 v0 := b.NewValue0(v.Pos, OpOffPtr, tt2)
17694 v0.AuxInt = int64ToAuxInt(o2)
17695 v0.AddArg(dst)
17696 v1 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
17697 v1.Aux = typeToAux(t3)
17698 v2 := b.NewValue0(v.Pos, OpOffPtr, tt3)
17699 v2.AuxInt = int64ToAuxInt(o3)
17700 v2.AddArg(dst)
17701 v3 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
17702 v3.Aux = typeToAux(t4)
17703 v4 := b.NewValue0(v.Pos, OpOffPtr, tt4)
17704 v4.AuxInt = int64ToAuxInt(o4)
17705 v4.AddArg(dst)
17706 v5 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
17707 v5.Aux = typeToAux(t5)
17708 v6 := b.NewValue0(v.Pos, OpOffPtr, tt5)
17709 v6.AuxInt = int64ToAuxInt(0)
17710 v6.AddArg(dst)
17711 v5.AddArg3(v6, d4, mem)
17712 v3.AddArg3(v4, d3, v5)
17713 v1.AddArg3(v2, d2, v3)
17714 v.AddArg3(v0, d1, v1)
17715 return true
17716 }
17717
17718
17719
17720 for {
17721 n := auxIntToInt64(v.AuxInt)
17722 t1 := auxToType(v.Aux)
17723 dst := v_0
17724 p1 := v_1
17725 mem := v_2
17726 if mem.Op != OpVarDef {
17727 break
17728 }
17729 mem_0 := mem.Args[0]
17730 if mem_0.Op != OpStore {
17731 break
17732 }
17733 t2 := auxToType(mem_0.Aux)
17734 _ = mem_0.Args[2]
17735 op2 := mem_0.Args[0]
17736 if op2.Op != OpOffPtr {
17737 break
17738 }
17739 tt2 := op2.Type
17740 o2 := auxIntToInt64(op2.AuxInt)
17741 p2 := op2.Args[0]
17742 d1 := mem_0.Args[1]
17743 mem_0_2 := mem_0.Args[2]
17744 if mem_0_2.Op != OpStore {
17745 break
17746 }
17747 t3 := auxToType(mem_0_2.Aux)
17748 d2 := mem_0_2.Args[1]
17749 op3 := mem_0_2.Args[0]
17750 if op3.Op != OpOffPtr {
17751 break
17752 }
17753 tt3 := op3.Type
17754 if auxIntToInt64(op3.AuxInt) != 0 {
17755 break
17756 }
17757 p3 := op3.Args[0]
17758 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()) {
17759 break
17760 }
17761 v.reset(OpStore)
17762 v.Aux = typeToAux(t2)
17763 v0 := b.NewValue0(v.Pos, OpOffPtr, tt2)
17764 v0.AuxInt = int64ToAuxInt(o2)
17765 v0.AddArg(dst)
17766 v1 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
17767 v1.Aux = typeToAux(t3)
17768 v2 := b.NewValue0(v.Pos, OpOffPtr, tt3)
17769 v2.AuxInt = int64ToAuxInt(0)
17770 v2.AddArg(dst)
17771 v1.AddArg3(v2, d2, mem)
17772 v.AddArg3(v0, d1, v1)
17773 return true
17774 }
17775
17776
17777
17778 for {
17779 n := auxIntToInt64(v.AuxInt)
17780 t1 := auxToType(v.Aux)
17781 dst := v_0
17782 p1 := v_1
17783 mem := v_2
17784 if mem.Op != OpVarDef {
17785 break
17786 }
17787 mem_0 := mem.Args[0]
17788 if mem_0.Op != OpStore {
17789 break
17790 }
17791 t2 := auxToType(mem_0.Aux)
17792 _ = mem_0.Args[2]
17793 op2 := mem_0.Args[0]
17794 if op2.Op != OpOffPtr {
17795 break
17796 }
17797 tt2 := op2.Type
17798 o2 := auxIntToInt64(op2.AuxInt)
17799 p2 := op2.Args[0]
17800 d1 := mem_0.Args[1]
17801 mem_0_2 := mem_0.Args[2]
17802 if mem_0_2.Op != OpStore {
17803 break
17804 }
17805 t3 := auxToType(mem_0_2.Aux)
17806 _ = mem_0_2.Args[2]
17807 op3 := mem_0_2.Args[0]
17808 if op3.Op != OpOffPtr {
17809 break
17810 }
17811 tt3 := op3.Type
17812 o3 := auxIntToInt64(op3.AuxInt)
17813 p3 := op3.Args[0]
17814 d2 := mem_0_2.Args[1]
17815 mem_0_2_2 := mem_0_2.Args[2]
17816 if mem_0_2_2.Op != OpStore {
17817 break
17818 }
17819 t4 := auxToType(mem_0_2_2.Aux)
17820 d3 := mem_0_2_2.Args[1]
17821 op4 := mem_0_2_2.Args[0]
17822 if op4.Op != OpOffPtr {
17823 break
17824 }
17825 tt4 := op4.Type
17826 if auxIntToInt64(op4.AuxInt) != 0 {
17827 break
17828 }
17829 p4 := op4.Args[0]
17830 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()) {
17831 break
17832 }
17833 v.reset(OpStore)
17834 v.Aux = typeToAux(t2)
17835 v0 := b.NewValue0(v.Pos, OpOffPtr, tt2)
17836 v0.AuxInt = int64ToAuxInt(o2)
17837 v0.AddArg(dst)
17838 v1 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
17839 v1.Aux = typeToAux(t3)
17840 v2 := b.NewValue0(v.Pos, OpOffPtr, tt3)
17841 v2.AuxInt = int64ToAuxInt(o3)
17842 v2.AddArg(dst)
17843 v3 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
17844 v3.Aux = typeToAux(t4)
17845 v4 := b.NewValue0(v.Pos, OpOffPtr, tt4)
17846 v4.AuxInt = int64ToAuxInt(0)
17847 v4.AddArg(dst)
17848 v3.AddArg3(v4, d3, mem)
17849 v1.AddArg3(v2, d2, v3)
17850 v.AddArg3(v0, d1, v1)
17851 return true
17852 }
17853
17854
17855
17856 for {
17857 n := auxIntToInt64(v.AuxInt)
17858 t1 := auxToType(v.Aux)
17859 dst := v_0
17860 p1 := v_1
17861 mem := v_2
17862 if mem.Op != OpVarDef {
17863 break
17864 }
17865 mem_0 := mem.Args[0]
17866 if mem_0.Op != OpStore {
17867 break
17868 }
17869 t2 := auxToType(mem_0.Aux)
17870 _ = mem_0.Args[2]
17871 op2 := mem_0.Args[0]
17872 if op2.Op != OpOffPtr {
17873 break
17874 }
17875 tt2 := op2.Type
17876 o2 := auxIntToInt64(op2.AuxInt)
17877 p2 := op2.Args[0]
17878 d1 := mem_0.Args[1]
17879 mem_0_2 := mem_0.Args[2]
17880 if mem_0_2.Op != OpStore {
17881 break
17882 }
17883 t3 := auxToType(mem_0_2.Aux)
17884 _ = mem_0_2.Args[2]
17885 op3 := mem_0_2.Args[0]
17886 if op3.Op != OpOffPtr {
17887 break
17888 }
17889 tt3 := op3.Type
17890 o3 := auxIntToInt64(op3.AuxInt)
17891 p3 := op3.Args[0]
17892 d2 := mem_0_2.Args[1]
17893 mem_0_2_2 := mem_0_2.Args[2]
17894 if mem_0_2_2.Op != OpStore {
17895 break
17896 }
17897 t4 := auxToType(mem_0_2_2.Aux)
17898 _ = mem_0_2_2.Args[2]
17899 op4 := mem_0_2_2.Args[0]
17900 if op4.Op != OpOffPtr {
17901 break
17902 }
17903 tt4 := op4.Type
17904 o4 := auxIntToInt64(op4.AuxInt)
17905 p4 := op4.Args[0]
17906 d3 := mem_0_2_2.Args[1]
17907 mem_0_2_2_2 := mem_0_2_2.Args[2]
17908 if mem_0_2_2_2.Op != OpStore {
17909 break
17910 }
17911 t5 := auxToType(mem_0_2_2_2.Aux)
17912 d4 := mem_0_2_2_2.Args[1]
17913 op5 := mem_0_2_2_2.Args[0]
17914 if op5.Op != OpOffPtr {
17915 break
17916 }
17917 tt5 := op5.Type
17918 if auxIntToInt64(op5.AuxInt) != 0 {
17919 break
17920 }
17921 p5 := op5.Args[0]
17922 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()) {
17923 break
17924 }
17925 v.reset(OpStore)
17926 v.Aux = typeToAux(t2)
17927 v0 := b.NewValue0(v.Pos, OpOffPtr, tt2)
17928 v0.AuxInt = int64ToAuxInt(o2)
17929 v0.AddArg(dst)
17930 v1 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
17931 v1.Aux = typeToAux(t3)
17932 v2 := b.NewValue0(v.Pos, OpOffPtr, tt3)
17933 v2.AuxInt = int64ToAuxInt(o3)
17934 v2.AddArg(dst)
17935 v3 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
17936 v3.Aux = typeToAux(t4)
17937 v4 := b.NewValue0(v.Pos, OpOffPtr, tt4)
17938 v4.AuxInt = int64ToAuxInt(o4)
17939 v4.AddArg(dst)
17940 v5 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
17941 v5.Aux = typeToAux(t5)
17942 v6 := b.NewValue0(v.Pos, OpOffPtr, tt5)
17943 v6.AuxInt = int64ToAuxInt(0)
17944 v6.AddArg(dst)
17945 v5.AddArg3(v6, d4, mem)
17946 v3.AddArg3(v4, d3, v5)
17947 v1.AddArg3(v2, d2, v3)
17948 v.AddArg3(v0, d1, v1)
17949 return true
17950 }
17951
17952
17953
17954 for {
17955 n := auxIntToInt64(v.AuxInt)
17956 t1 := auxToType(v.Aux)
17957 dst := v_0
17958 p1 := v_1
17959 mem := v_2
17960 if mem.Op != OpStore {
17961 break
17962 }
17963 t2 := auxToType(mem.Aux)
17964 _ = mem.Args[2]
17965 op2 := mem.Args[0]
17966 if op2.Op != OpOffPtr {
17967 break
17968 }
17969 tt2 := op2.Type
17970 o2 := auxIntToInt64(op2.AuxInt)
17971 p2 := op2.Args[0]
17972 d1 := mem.Args[1]
17973 mem_2 := mem.Args[2]
17974 if mem_2.Op != OpZero || auxIntToInt64(mem_2.AuxInt) != n {
17975 break
17976 }
17977 t3 := auxToType(mem_2.Aux)
17978 p3 := mem_2.Args[0]
17979 if !(isSamePtr(p1, p2) && isSamePtr(p2, p3) && t2.Alignment() <= t1.Alignment() && t3.Alignment() <= t1.Alignment() && registerizable(b, t2) && n >= o2+t2.Size()) {
17980 break
17981 }
17982 v.reset(OpStore)
17983 v.Aux = typeToAux(t2)
17984 v0 := b.NewValue0(v.Pos, OpOffPtr, tt2)
17985 v0.AuxInt = int64ToAuxInt(o2)
17986 v0.AddArg(dst)
17987 v1 := b.NewValue0(v.Pos, OpZero, types.TypeMem)
17988 v1.AuxInt = int64ToAuxInt(n)
17989 v1.Aux = typeToAux(t1)
17990 v1.AddArg2(dst, mem)
17991 v.AddArg3(v0, d1, v1)
17992 return true
17993 }
17994
17995
17996
17997 for {
17998 n := auxIntToInt64(v.AuxInt)
17999 t1 := auxToType(v.Aux)
18000 dst := v_0
18001 p1 := v_1
18002 mem := v_2
18003 if mem.Op != OpStore {
18004 break
18005 }
18006 t2 := auxToType(mem.Aux)
18007 _ = mem.Args[2]
18008 mem_0 := mem.Args[0]
18009 if mem_0.Op != OpOffPtr {
18010 break
18011 }
18012 tt2 := mem_0.Type
18013 o2 := auxIntToInt64(mem_0.AuxInt)
18014 p2 := mem_0.Args[0]
18015 d1 := mem.Args[1]
18016 mem_2 := mem.Args[2]
18017 if mem_2.Op != OpStore {
18018 break
18019 }
18020 t3 := auxToType(mem_2.Aux)
18021 _ = mem_2.Args[2]
18022 mem_2_0 := mem_2.Args[0]
18023 if mem_2_0.Op != OpOffPtr {
18024 break
18025 }
18026 tt3 := mem_2_0.Type
18027 o3 := auxIntToInt64(mem_2_0.AuxInt)
18028 p3 := mem_2_0.Args[0]
18029 d2 := mem_2.Args[1]
18030 mem_2_2 := mem_2.Args[2]
18031 if mem_2_2.Op != OpZero || auxIntToInt64(mem_2_2.AuxInt) != n {
18032 break
18033 }
18034 t4 := auxToType(mem_2_2.Aux)
18035 p4 := mem_2_2.Args[0]
18036 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()) {
18037 break
18038 }
18039 v.reset(OpStore)
18040 v.Aux = typeToAux(t2)
18041 v0 := b.NewValue0(v.Pos, OpOffPtr, tt2)
18042 v0.AuxInt = int64ToAuxInt(o2)
18043 v0.AddArg(dst)
18044 v1 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
18045 v1.Aux = typeToAux(t3)
18046 v2 := b.NewValue0(v.Pos, OpOffPtr, tt3)
18047 v2.AuxInt = int64ToAuxInt(o3)
18048 v2.AddArg(dst)
18049 v3 := b.NewValue0(v.Pos, OpZero, types.TypeMem)
18050 v3.AuxInt = int64ToAuxInt(n)
18051 v3.Aux = typeToAux(t1)
18052 v3.AddArg2(dst, mem)
18053 v1.AddArg3(v2, d2, v3)
18054 v.AddArg3(v0, d1, v1)
18055 return true
18056 }
18057
18058
18059
18060 for {
18061 n := auxIntToInt64(v.AuxInt)
18062 t1 := auxToType(v.Aux)
18063 dst := v_0
18064 p1 := v_1
18065 mem := v_2
18066 if mem.Op != OpStore {
18067 break
18068 }
18069 t2 := auxToType(mem.Aux)
18070 _ = mem.Args[2]
18071 mem_0 := mem.Args[0]
18072 if mem_0.Op != OpOffPtr {
18073 break
18074 }
18075 tt2 := mem_0.Type
18076 o2 := auxIntToInt64(mem_0.AuxInt)
18077 p2 := mem_0.Args[0]
18078 d1 := mem.Args[1]
18079 mem_2 := mem.Args[2]
18080 if mem_2.Op != OpStore {
18081 break
18082 }
18083 t3 := auxToType(mem_2.Aux)
18084 _ = mem_2.Args[2]
18085 mem_2_0 := mem_2.Args[0]
18086 if mem_2_0.Op != OpOffPtr {
18087 break
18088 }
18089 tt3 := mem_2_0.Type
18090 o3 := auxIntToInt64(mem_2_0.AuxInt)
18091 p3 := mem_2_0.Args[0]
18092 d2 := mem_2.Args[1]
18093 mem_2_2 := mem_2.Args[2]
18094 if mem_2_2.Op != OpStore {
18095 break
18096 }
18097 t4 := auxToType(mem_2_2.Aux)
18098 _ = mem_2_2.Args[2]
18099 mem_2_2_0 := mem_2_2.Args[0]
18100 if mem_2_2_0.Op != OpOffPtr {
18101 break
18102 }
18103 tt4 := mem_2_2_0.Type
18104 o4 := auxIntToInt64(mem_2_2_0.AuxInt)
18105 p4 := mem_2_2_0.Args[0]
18106 d3 := mem_2_2.Args[1]
18107 mem_2_2_2 := mem_2_2.Args[2]
18108 if mem_2_2_2.Op != OpZero || auxIntToInt64(mem_2_2_2.AuxInt) != n {
18109 break
18110 }
18111 t5 := auxToType(mem_2_2_2.Aux)
18112 p5 := mem_2_2_2.Args[0]
18113 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()) {
18114 break
18115 }
18116 v.reset(OpStore)
18117 v.Aux = typeToAux(t2)
18118 v0 := b.NewValue0(v.Pos, OpOffPtr, tt2)
18119 v0.AuxInt = int64ToAuxInt(o2)
18120 v0.AddArg(dst)
18121 v1 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
18122 v1.Aux = typeToAux(t3)
18123 v2 := b.NewValue0(v.Pos, OpOffPtr, tt3)
18124 v2.AuxInt = int64ToAuxInt(o3)
18125 v2.AddArg(dst)
18126 v3 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
18127 v3.Aux = typeToAux(t4)
18128 v4 := b.NewValue0(v.Pos, OpOffPtr, tt4)
18129 v4.AuxInt = int64ToAuxInt(o4)
18130 v4.AddArg(dst)
18131 v5 := b.NewValue0(v.Pos, OpZero, types.TypeMem)
18132 v5.AuxInt = int64ToAuxInt(n)
18133 v5.Aux = typeToAux(t1)
18134 v5.AddArg2(dst, mem)
18135 v3.AddArg3(v4, d3, v5)
18136 v1.AddArg3(v2, d2, v3)
18137 v.AddArg3(v0, d1, v1)
18138 return true
18139 }
18140
18141
18142
18143 for {
18144 n := auxIntToInt64(v.AuxInt)
18145 t1 := auxToType(v.Aux)
18146 dst := v_0
18147 p1 := v_1
18148 mem := v_2
18149 if mem.Op != OpStore {
18150 break
18151 }
18152 t2 := auxToType(mem.Aux)
18153 _ = mem.Args[2]
18154 mem_0 := mem.Args[0]
18155 if mem_0.Op != OpOffPtr {
18156 break
18157 }
18158 tt2 := mem_0.Type
18159 o2 := auxIntToInt64(mem_0.AuxInt)
18160 p2 := mem_0.Args[0]
18161 d1 := mem.Args[1]
18162 mem_2 := mem.Args[2]
18163 if mem_2.Op != OpStore {
18164 break
18165 }
18166 t3 := auxToType(mem_2.Aux)
18167 _ = mem_2.Args[2]
18168 mem_2_0 := mem_2.Args[0]
18169 if mem_2_0.Op != OpOffPtr {
18170 break
18171 }
18172 tt3 := mem_2_0.Type
18173 o3 := auxIntToInt64(mem_2_0.AuxInt)
18174 p3 := mem_2_0.Args[0]
18175 d2 := mem_2.Args[1]
18176 mem_2_2 := mem_2.Args[2]
18177 if mem_2_2.Op != OpStore {
18178 break
18179 }
18180 t4 := auxToType(mem_2_2.Aux)
18181 _ = mem_2_2.Args[2]
18182 mem_2_2_0 := mem_2_2.Args[0]
18183 if mem_2_2_0.Op != OpOffPtr {
18184 break
18185 }
18186 tt4 := mem_2_2_0.Type
18187 o4 := auxIntToInt64(mem_2_2_0.AuxInt)
18188 p4 := mem_2_2_0.Args[0]
18189 d3 := mem_2_2.Args[1]
18190 mem_2_2_2 := mem_2_2.Args[2]
18191 if mem_2_2_2.Op != OpStore {
18192 break
18193 }
18194 t5 := auxToType(mem_2_2_2.Aux)
18195 _ = mem_2_2_2.Args[2]
18196 mem_2_2_2_0 := mem_2_2_2.Args[0]
18197 if mem_2_2_2_0.Op != OpOffPtr {
18198 break
18199 }
18200 tt5 := mem_2_2_2_0.Type
18201 o5 := auxIntToInt64(mem_2_2_2_0.AuxInt)
18202 p5 := mem_2_2_2_0.Args[0]
18203 d4 := mem_2_2_2.Args[1]
18204 mem_2_2_2_2 := mem_2_2_2.Args[2]
18205 if mem_2_2_2_2.Op != OpZero || auxIntToInt64(mem_2_2_2_2.AuxInt) != n {
18206 break
18207 }
18208 t6 := auxToType(mem_2_2_2_2.Aux)
18209 p6 := mem_2_2_2_2.Args[0]
18210 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()) {
18211 break
18212 }
18213 v.reset(OpStore)
18214 v.Aux = typeToAux(t2)
18215 v0 := b.NewValue0(v.Pos, OpOffPtr, tt2)
18216 v0.AuxInt = int64ToAuxInt(o2)
18217 v0.AddArg(dst)
18218 v1 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
18219 v1.Aux = typeToAux(t3)
18220 v2 := b.NewValue0(v.Pos, OpOffPtr, tt3)
18221 v2.AuxInt = int64ToAuxInt(o3)
18222 v2.AddArg(dst)
18223 v3 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
18224 v3.Aux = typeToAux(t4)
18225 v4 := b.NewValue0(v.Pos, OpOffPtr, tt4)
18226 v4.AuxInt = int64ToAuxInt(o4)
18227 v4.AddArg(dst)
18228 v5 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
18229 v5.Aux = typeToAux(t5)
18230 v6 := b.NewValue0(v.Pos, OpOffPtr, tt5)
18231 v6.AuxInt = int64ToAuxInt(o5)
18232 v6.AddArg(dst)
18233 v7 := b.NewValue0(v.Pos, OpZero, types.TypeMem)
18234 v7.AuxInt = int64ToAuxInt(n)
18235 v7.Aux = typeToAux(t1)
18236 v7.AddArg2(dst, mem)
18237 v5.AddArg3(v6, d4, v7)
18238 v3.AddArg3(v4, d3, v5)
18239 v1.AddArg3(v2, d2, v3)
18240 v.AddArg3(v0, d1, v1)
18241 return true
18242 }
18243
18244
18245
18246 for {
18247 n := auxIntToInt64(v.AuxInt)
18248 t1 := auxToType(v.Aux)
18249 dst := v_0
18250 p1 := v_1
18251 mem := v_2
18252 if mem.Op != OpVarDef {
18253 break
18254 }
18255 mem_0 := mem.Args[0]
18256 if mem_0.Op != OpStore {
18257 break
18258 }
18259 t2 := auxToType(mem_0.Aux)
18260 _ = mem_0.Args[2]
18261 op2 := mem_0.Args[0]
18262 if op2.Op != OpOffPtr {
18263 break
18264 }
18265 tt2 := op2.Type
18266 o2 := auxIntToInt64(op2.AuxInt)
18267 p2 := op2.Args[0]
18268 d1 := mem_0.Args[1]
18269 mem_0_2 := mem_0.Args[2]
18270 if mem_0_2.Op != OpZero || auxIntToInt64(mem_0_2.AuxInt) != n {
18271 break
18272 }
18273 t3 := auxToType(mem_0_2.Aux)
18274 p3 := mem_0_2.Args[0]
18275 if !(isSamePtr(p1, p2) && isSamePtr(p2, p3) && t2.Alignment() <= t1.Alignment() && t3.Alignment() <= t1.Alignment() && registerizable(b, t2) && n >= o2+t2.Size()) {
18276 break
18277 }
18278 v.reset(OpStore)
18279 v.Aux = typeToAux(t2)
18280 v0 := b.NewValue0(v.Pos, OpOffPtr, tt2)
18281 v0.AuxInt = int64ToAuxInt(o2)
18282 v0.AddArg(dst)
18283 v1 := b.NewValue0(v.Pos, OpZero, types.TypeMem)
18284 v1.AuxInt = int64ToAuxInt(n)
18285 v1.Aux = typeToAux(t1)
18286 v1.AddArg2(dst, mem)
18287 v.AddArg3(v0, d1, v1)
18288 return true
18289 }
18290
18291
18292
18293 for {
18294 n := auxIntToInt64(v.AuxInt)
18295 t1 := auxToType(v.Aux)
18296 dst := v_0
18297 p1 := v_1
18298 mem := v_2
18299 if mem.Op != OpVarDef {
18300 break
18301 }
18302 mem_0 := mem.Args[0]
18303 if mem_0.Op != OpStore {
18304 break
18305 }
18306 t2 := auxToType(mem_0.Aux)
18307 _ = mem_0.Args[2]
18308 mem_0_0 := mem_0.Args[0]
18309 if mem_0_0.Op != OpOffPtr {
18310 break
18311 }
18312 tt2 := mem_0_0.Type
18313 o2 := auxIntToInt64(mem_0_0.AuxInt)
18314 p2 := mem_0_0.Args[0]
18315 d1 := mem_0.Args[1]
18316 mem_0_2 := mem_0.Args[2]
18317 if mem_0_2.Op != OpStore {
18318 break
18319 }
18320 t3 := auxToType(mem_0_2.Aux)
18321 _ = mem_0_2.Args[2]
18322 mem_0_2_0 := mem_0_2.Args[0]
18323 if mem_0_2_0.Op != OpOffPtr {
18324 break
18325 }
18326 tt3 := mem_0_2_0.Type
18327 o3 := auxIntToInt64(mem_0_2_0.AuxInt)
18328 p3 := mem_0_2_0.Args[0]
18329 d2 := mem_0_2.Args[1]
18330 mem_0_2_2 := mem_0_2.Args[2]
18331 if mem_0_2_2.Op != OpZero || auxIntToInt64(mem_0_2_2.AuxInt) != n {
18332 break
18333 }
18334 t4 := auxToType(mem_0_2_2.Aux)
18335 p4 := mem_0_2_2.Args[0]
18336 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()) {
18337 break
18338 }
18339 v.reset(OpStore)
18340 v.Aux = typeToAux(t2)
18341 v0 := b.NewValue0(v.Pos, OpOffPtr, tt2)
18342 v0.AuxInt = int64ToAuxInt(o2)
18343 v0.AddArg(dst)
18344 v1 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
18345 v1.Aux = typeToAux(t3)
18346 v2 := b.NewValue0(v.Pos, OpOffPtr, tt3)
18347 v2.AuxInt = int64ToAuxInt(o3)
18348 v2.AddArg(dst)
18349 v3 := b.NewValue0(v.Pos, OpZero, types.TypeMem)
18350 v3.AuxInt = int64ToAuxInt(n)
18351 v3.Aux = typeToAux(t1)
18352 v3.AddArg2(dst, mem)
18353 v1.AddArg3(v2, d2, v3)
18354 v.AddArg3(v0, d1, v1)
18355 return true
18356 }
18357
18358
18359
18360 for {
18361 n := auxIntToInt64(v.AuxInt)
18362 t1 := auxToType(v.Aux)
18363 dst := v_0
18364 p1 := v_1
18365 mem := v_2
18366 if mem.Op != OpVarDef {
18367 break
18368 }
18369 mem_0 := mem.Args[0]
18370 if mem_0.Op != OpStore {
18371 break
18372 }
18373 t2 := auxToType(mem_0.Aux)
18374 _ = mem_0.Args[2]
18375 mem_0_0 := mem_0.Args[0]
18376 if mem_0_0.Op != OpOffPtr {
18377 break
18378 }
18379 tt2 := mem_0_0.Type
18380 o2 := auxIntToInt64(mem_0_0.AuxInt)
18381 p2 := mem_0_0.Args[0]
18382 d1 := mem_0.Args[1]
18383 mem_0_2 := mem_0.Args[2]
18384 if mem_0_2.Op != OpStore {
18385 break
18386 }
18387 t3 := auxToType(mem_0_2.Aux)
18388 _ = mem_0_2.Args[2]
18389 mem_0_2_0 := mem_0_2.Args[0]
18390 if mem_0_2_0.Op != OpOffPtr {
18391 break
18392 }
18393 tt3 := mem_0_2_0.Type
18394 o3 := auxIntToInt64(mem_0_2_0.AuxInt)
18395 p3 := mem_0_2_0.Args[0]
18396 d2 := mem_0_2.Args[1]
18397 mem_0_2_2 := mem_0_2.Args[2]
18398 if mem_0_2_2.Op != OpStore {
18399 break
18400 }
18401 t4 := auxToType(mem_0_2_2.Aux)
18402 _ = mem_0_2_2.Args[2]
18403 mem_0_2_2_0 := mem_0_2_2.Args[0]
18404 if mem_0_2_2_0.Op != OpOffPtr {
18405 break
18406 }
18407 tt4 := mem_0_2_2_0.Type
18408 o4 := auxIntToInt64(mem_0_2_2_0.AuxInt)
18409 p4 := mem_0_2_2_0.Args[0]
18410 d3 := mem_0_2_2.Args[1]
18411 mem_0_2_2_2 := mem_0_2_2.Args[2]
18412 if mem_0_2_2_2.Op != OpZero || auxIntToInt64(mem_0_2_2_2.AuxInt) != n {
18413 break
18414 }
18415 t5 := auxToType(mem_0_2_2_2.Aux)
18416 p5 := mem_0_2_2_2.Args[0]
18417 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()) {
18418 break
18419 }
18420 v.reset(OpStore)
18421 v.Aux = typeToAux(t2)
18422 v0 := b.NewValue0(v.Pos, OpOffPtr, tt2)
18423 v0.AuxInt = int64ToAuxInt(o2)
18424 v0.AddArg(dst)
18425 v1 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
18426 v1.Aux = typeToAux(t3)
18427 v2 := b.NewValue0(v.Pos, OpOffPtr, tt3)
18428 v2.AuxInt = int64ToAuxInt(o3)
18429 v2.AddArg(dst)
18430 v3 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
18431 v3.Aux = typeToAux(t4)
18432 v4 := b.NewValue0(v.Pos, OpOffPtr, tt4)
18433 v4.AuxInt = int64ToAuxInt(o4)
18434 v4.AddArg(dst)
18435 v5 := b.NewValue0(v.Pos, OpZero, types.TypeMem)
18436 v5.AuxInt = int64ToAuxInt(n)
18437 v5.Aux = typeToAux(t1)
18438 v5.AddArg2(dst, mem)
18439 v3.AddArg3(v4, d3, v5)
18440 v1.AddArg3(v2, d2, v3)
18441 v.AddArg3(v0, d1, v1)
18442 return true
18443 }
18444
18445
18446
18447 for {
18448 n := auxIntToInt64(v.AuxInt)
18449 t1 := auxToType(v.Aux)
18450 dst := v_0
18451 p1 := v_1
18452 mem := v_2
18453 if mem.Op != OpVarDef {
18454 break
18455 }
18456 mem_0 := mem.Args[0]
18457 if mem_0.Op != OpStore {
18458 break
18459 }
18460 t2 := auxToType(mem_0.Aux)
18461 _ = mem_0.Args[2]
18462 mem_0_0 := mem_0.Args[0]
18463 if mem_0_0.Op != OpOffPtr {
18464 break
18465 }
18466 tt2 := mem_0_0.Type
18467 o2 := auxIntToInt64(mem_0_0.AuxInt)
18468 p2 := mem_0_0.Args[0]
18469 d1 := mem_0.Args[1]
18470 mem_0_2 := mem_0.Args[2]
18471 if mem_0_2.Op != OpStore {
18472 break
18473 }
18474 t3 := auxToType(mem_0_2.Aux)
18475 _ = mem_0_2.Args[2]
18476 mem_0_2_0 := mem_0_2.Args[0]
18477 if mem_0_2_0.Op != OpOffPtr {
18478 break
18479 }
18480 tt3 := mem_0_2_0.Type
18481 o3 := auxIntToInt64(mem_0_2_0.AuxInt)
18482 p3 := mem_0_2_0.Args[0]
18483 d2 := mem_0_2.Args[1]
18484 mem_0_2_2 := mem_0_2.Args[2]
18485 if mem_0_2_2.Op != OpStore {
18486 break
18487 }
18488 t4 := auxToType(mem_0_2_2.Aux)
18489 _ = mem_0_2_2.Args[2]
18490 mem_0_2_2_0 := mem_0_2_2.Args[0]
18491 if mem_0_2_2_0.Op != OpOffPtr {
18492 break
18493 }
18494 tt4 := mem_0_2_2_0.Type
18495 o4 := auxIntToInt64(mem_0_2_2_0.AuxInt)
18496 p4 := mem_0_2_2_0.Args[0]
18497 d3 := mem_0_2_2.Args[1]
18498 mem_0_2_2_2 := mem_0_2_2.Args[2]
18499 if mem_0_2_2_2.Op != OpStore {
18500 break
18501 }
18502 t5 := auxToType(mem_0_2_2_2.Aux)
18503 _ = mem_0_2_2_2.Args[2]
18504 mem_0_2_2_2_0 := mem_0_2_2_2.Args[0]
18505 if mem_0_2_2_2_0.Op != OpOffPtr {
18506 break
18507 }
18508 tt5 := mem_0_2_2_2_0.Type
18509 o5 := auxIntToInt64(mem_0_2_2_2_0.AuxInt)
18510 p5 := mem_0_2_2_2_0.Args[0]
18511 d4 := mem_0_2_2_2.Args[1]
18512 mem_0_2_2_2_2 := mem_0_2_2_2.Args[2]
18513 if mem_0_2_2_2_2.Op != OpZero || auxIntToInt64(mem_0_2_2_2_2.AuxInt) != n {
18514 break
18515 }
18516 t6 := auxToType(mem_0_2_2_2_2.Aux)
18517 p6 := mem_0_2_2_2_2.Args[0]
18518 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()) {
18519 break
18520 }
18521 v.reset(OpStore)
18522 v.Aux = typeToAux(t2)
18523 v0 := b.NewValue0(v.Pos, OpOffPtr, tt2)
18524 v0.AuxInt = int64ToAuxInt(o2)
18525 v0.AddArg(dst)
18526 v1 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
18527 v1.Aux = typeToAux(t3)
18528 v2 := b.NewValue0(v.Pos, OpOffPtr, tt3)
18529 v2.AuxInt = int64ToAuxInt(o3)
18530 v2.AddArg(dst)
18531 v3 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
18532 v3.Aux = typeToAux(t4)
18533 v4 := b.NewValue0(v.Pos, OpOffPtr, tt4)
18534 v4.AuxInt = int64ToAuxInt(o4)
18535 v4.AddArg(dst)
18536 v5 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
18537 v5.Aux = typeToAux(t5)
18538 v6 := b.NewValue0(v.Pos, OpOffPtr, tt5)
18539 v6.AuxInt = int64ToAuxInt(o5)
18540 v6.AddArg(dst)
18541 v7 := b.NewValue0(v.Pos, OpZero, types.TypeMem)
18542 v7.AuxInt = int64ToAuxInt(n)
18543 v7.Aux = typeToAux(t1)
18544 v7.AddArg2(dst, mem)
18545 v5.AddArg3(v6, d4, v7)
18546 v3.AddArg3(v4, d3, v5)
18547 v1.AddArg3(v2, d2, v3)
18548 v.AddArg3(v0, d1, v1)
18549 return true
18550 }
18551
18552
18553
18554 for {
18555 s := auxIntToInt64(v.AuxInt)
18556 t1 := auxToType(v.Aux)
18557 dst := v_0
18558 tmp1 := v_1
18559 midmem := v_2
18560 if midmem.Op != OpMove || auxIntToInt64(midmem.AuxInt) != s {
18561 break
18562 }
18563 t2 := auxToType(midmem.Aux)
18564 src := midmem.Args[1]
18565 tmp2 := midmem.Args[0]
18566 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))) {
18567 break
18568 }
18569 v.reset(OpMove)
18570 v.AuxInt = int64ToAuxInt(s)
18571 v.Aux = typeToAux(t1)
18572 v.AddArg3(dst, src, midmem)
18573 return true
18574 }
18575
18576
18577
18578 for {
18579 s := auxIntToInt64(v.AuxInt)
18580 t1 := auxToType(v.Aux)
18581 dst := v_0
18582 tmp1 := v_1
18583 midmem := v_2
18584 if midmem.Op != OpVarDef {
18585 break
18586 }
18587 midmem_0 := midmem.Args[0]
18588 if midmem_0.Op != OpMove || auxIntToInt64(midmem_0.AuxInt) != s {
18589 break
18590 }
18591 t2 := auxToType(midmem_0.Aux)
18592 src := midmem_0.Args[1]
18593 tmp2 := midmem_0.Args[0]
18594 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))) {
18595 break
18596 }
18597 v.reset(OpMove)
18598 v.AuxInt = int64ToAuxInt(s)
18599 v.Aux = typeToAux(t1)
18600 v.AddArg3(dst, src, midmem)
18601 return true
18602 }
18603
18604
18605
18606 for {
18607 dst := v_0
18608 src := v_1
18609 mem := v_2
18610 if !(isSamePtr(dst, src)) {
18611 break
18612 }
18613 v.copyOf(mem)
18614 return true
18615 }
18616 return false
18617 }
18618 func rewriteValuegeneric_OpMul16(v *Value) bool {
18619 v_1 := v.Args[1]
18620 v_0 := v.Args[0]
18621 b := v.Block
18622 typ := &b.Func.Config.Types
18623
18624
18625 for {
18626 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18627 if v_0.Op != OpConst16 {
18628 continue
18629 }
18630 c := auxIntToInt16(v_0.AuxInt)
18631 if v_1.Op != OpConst16 {
18632 continue
18633 }
18634 d := auxIntToInt16(v_1.AuxInt)
18635 v.reset(OpConst16)
18636 v.AuxInt = int16ToAuxInt(c * d)
18637 return true
18638 }
18639 break
18640 }
18641
18642
18643 for {
18644 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18645 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 1 {
18646 continue
18647 }
18648 x := v_1
18649 v.copyOf(x)
18650 return true
18651 }
18652 break
18653 }
18654
18655
18656 for {
18657 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18658 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != -1 {
18659 continue
18660 }
18661 x := v_1
18662 v.reset(OpNeg16)
18663 v.AddArg(x)
18664 return true
18665 }
18666 break
18667 }
18668
18669
18670
18671 for {
18672 t := v.Type
18673 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18674 n := v_0
18675 if v_1.Op != OpConst16 {
18676 continue
18677 }
18678 c := auxIntToInt16(v_1.AuxInt)
18679 if !(isPowerOfTwo(c)) {
18680 continue
18681 }
18682 v.reset(OpLsh16x64)
18683 v.Type = t
18684 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
18685 v0.AuxInt = int64ToAuxInt(log16(c))
18686 v.AddArg2(n, v0)
18687 return true
18688 }
18689 break
18690 }
18691
18692
18693
18694 for {
18695 t := v.Type
18696 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18697 n := v_0
18698 if v_1.Op != OpConst16 {
18699 continue
18700 }
18701 c := auxIntToInt16(v_1.AuxInt)
18702 if !(t.IsSigned() && isPowerOfTwo(-c)) {
18703 continue
18704 }
18705 v.reset(OpNeg16)
18706 v0 := b.NewValue0(v.Pos, OpLsh16x64, t)
18707 v1 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
18708 v1.AuxInt = int64ToAuxInt(log16(-c))
18709 v0.AddArg2(n, v1)
18710 v.AddArg(v0)
18711 return true
18712 }
18713 break
18714 }
18715
18716
18717 for {
18718 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18719 if v_0.Op != OpConst16 {
18720 continue
18721 }
18722 t := v_0.Type
18723 c := auxIntToInt16(v_0.AuxInt)
18724 if v_1.Op != OpAdd16 || v_1.Type != t {
18725 continue
18726 }
18727 _ = v_1.Args[1]
18728 v_1_0 := v_1.Args[0]
18729 v_1_1 := v_1.Args[1]
18730 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
18731 if v_1_0.Op != OpConst16 || v_1_0.Type != t {
18732 continue
18733 }
18734 d := auxIntToInt16(v_1_0.AuxInt)
18735 x := v_1_1
18736 v.reset(OpAdd16)
18737 v0 := b.NewValue0(v.Pos, OpConst16, t)
18738 v0.AuxInt = int16ToAuxInt(c * d)
18739 v1 := b.NewValue0(v.Pos, OpMul16, t)
18740 v2 := b.NewValue0(v.Pos, OpConst16, t)
18741 v2.AuxInt = int16ToAuxInt(c)
18742 v1.AddArg2(v2, x)
18743 v.AddArg2(v0, v1)
18744 return true
18745 }
18746 }
18747 break
18748 }
18749
18750
18751 for {
18752 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18753 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 {
18754 continue
18755 }
18756 v.reset(OpConst16)
18757 v.AuxInt = int16ToAuxInt(0)
18758 return true
18759 }
18760 break
18761 }
18762
18763
18764
18765 for {
18766 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18767 if v_0.Op != OpMul16 {
18768 continue
18769 }
18770 _ = v_0.Args[1]
18771 v_0_0 := v_0.Args[0]
18772 v_0_1 := v_0.Args[1]
18773 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
18774 i := v_0_0
18775 if i.Op != OpConst16 {
18776 continue
18777 }
18778 t := i.Type
18779 z := v_0_1
18780 x := v_1
18781 if !(z.Op != OpConst16 && x.Op != OpConst16) {
18782 continue
18783 }
18784 v.reset(OpMul16)
18785 v0 := b.NewValue0(v.Pos, OpMul16, t)
18786 v0.AddArg2(x, z)
18787 v.AddArg2(i, v0)
18788 return true
18789 }
18790 }
18791 break
18792 }
18793
18794
18795 for {
18796 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18797 if v_0.Op != OpConst16 {
18798 continue
18799 }
18800 t := v_0.Type
18801 c := auxIntToInt16(v_0.AuxInt)
18802 if v_1.Op != OpMul16 {
18803 continue
18804 }
18805 _ = v_1.Args[1]
18806 v_1_0 := v_1.Args[0]
18807 v_1_1 := v_1.Args[1]
18808 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
18809 if v_1_0.Op != OpConst16 || v_1_0.Type != t {
18810 continue
18811 }
18812 d := auxIntToInt16(v_1_0.AuxInt)
18813 x := v_1_1
18814 v.reset(OpMul16)
18815 v0 := b.NewValue0(v.Pos, OpConst16, t)
18816 v0.AuxInt = int16ToAuxInt(c * d)
18817 v.AddArg2(v0, x)
18818 return true
18819 }
18820 }
18821 break
18822 }
18823 return false
18824 }
18825 func rewriteValuegeneric_OpMul32(v *Value) bool {
18826 v_1 := v.Args[1]
18827 v_0 := v.Args[0]
18828 b := v.Block
18829 typ := &b.Func.Config.Types
18830
18831
18832 for {
18833 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18834 if v_0.Op != OpConst32 {
18835 continue
18836 }
18837 c := auxIntToInt32(v_0.AuxInt)
18838 if v_1.Op != OpConst32 {
18839 continue
18840 }
18841 d := auxIntToInt32(v_1.AuxInt)
18842 v.reset(OpConst32)
18843 v.AuxInt = int32ToAuxInt(c * d)
18844 return true
18845 }
18846 break
18847 }
18848
18849
18850 for {
18851 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18852 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 1 {
18853 continue
18854 }
18855 x := v_1
18856 v.copyOf(x)
18857 return true
18858 }
18859 break
18860 }
18861
18862
18863 for {
18864 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18865 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != -1 {
18866 continue
18867 }
18868 x := v_1
18869 v.reset(OpNeg32)
18870 v.AddArg(x)
18871 return true
18872 }
18873 break
18874 }
18875
18876
18877
18878 for {
18879 t := v.Type
18880 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18881 n := v_0
18882 if v_1.Op != OpConst32 {
18883 continue
18884 }
18885 c := auxIntToInt32(v_1.AuxInt)
18886 if !(isPowerOfTwo(c)) {
18887 continue
18888 }
18889 v.reset(OpLsh32x64)
18890 v.Type = t
18891 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
18892 v0.AuxInt = int64ToAuxInt(log32(c))
18893 v.AddArg2(n, v0)
18894 return true
18895 }
18896 break
18897 }
18898
18899
18900
18901 for {
18902 t := v.Type
18903 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18904 n := v_0
18905 if v_1.Op != OpConst32 {
18906 continue
18907 }
18908 c := auxIntToInt32(v_1.AuxInt)
18909 if !(t.IsSigned() && isPowerOfTwo(-c)) {
18910 continue
18911 }
18912 v.reset(OpNeg32)
18913 v0 := b.NewValue0(v.Pos, OpLsh32x64, t)
18914 v1 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
18915 v1.AuxInt = int64ToAuxInt(log32(-c))
18916 v0.AddArg2(n, v1)
18917 v.AddArg(v0)
18918 return true
18919 }
18920 break
18921 }
18922
18923
18924 for {
18925 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18926 if v_0.Op != OpConst32 {
18927 continue
18928 }
18929 t := v_0.Type
18930 c := auxIntToInt32(v_0.AuxInt)
18931 if v_1.Op != OpAdd32 || v_1.Type != t {
18932 continue
18933 }
18934 _ = v_1.Args[1]
18935 v_1_0 := v_1.Args[0]
18936 v_1_1 := v_1.Args[1]
18937 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
18938 if v_1_0.Op != OpConst32 || v_1_0.Type != t {
18939 continue
18940 }
18941 d := auxIntToInt32(v_1_0.AuxInt)
18942 x := v_1_1
18943 v.reset(OpAdd32)
18944 v0 := b.NewValue0(v.Pos, OpConst32, t)
18945 v0.AuxInt = int32ToAuxInt(c * d)
18946 v1 := b.NewValue0(v.Pos, OpMul32, t)
18947 v2 := b.NewValue0(v.Pos, OpConst32, t)
18948 v2.AuxInt = int32ToAuxInt(c)
18949 v1.AddArg2(v2, x)
18950 v.AddArg2(v0, v1)
18951 return true
18952 }
18953 }
18954 break
18955 }
18956
18957
18958 for {
18959 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18960 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
18961 continue
18962 }
18963 v.reset(OpConst32)
18964 v.AuxInt = int32ToAuxInt(0)
18965 return true
18966 }
18967 break
18968 }
18969
18970
18971
18972 for {
18973 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
18974 if v_0.Op != OpMul32 {
18975 continue
18976 }
18977 _ = v_0.Args[1]
18978 v_0_0 := v_0.Args[0]
18979 v_0_1 := v_0.Args[1]
18980 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
18981 i := v_0_0
18982 if i.Op != OpConst32 {
18983 continue
18984 }
18985 t := i.Type
18986 z := v_0_1
18987 x := v_1
18988 if !(z.Op != OpConst32 && x.Op != OpConst32) {
18989 continue
18990 }
18991 v.reset(OpMul32)
18992 v0 := b.NewValue0(v.Pos, OpMul32, t)
18993 v0.AddArg2(x, z)
18994 v.AddArg2(i, v0)
18995 return true
18996 }
18997 }
18998 break
18999 }
19000
19001
19002 for {
19003 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19004 if v_0.Op != OpConst32 {
19005 continue
19006 }
19007 t := v_0.Type
19008 c := auxIntToInt32(v_0.AuxInt)
19009 if v_1.Op != OpMul32 {
19010 continue
19011 }
19012 _ = v_1.Args[1]
19013 v_1_0 := v_1.Args[0]
19014 v_1_1 := v_1.Args[1]
19015 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
19016 if v_1_0.Op != OpConst32 || v_1_0.Type != t {
19017 continue
19018 }
19019 d := auxIntToInt32(v_1_0.AuxInt)
19020 x := v_1_1
19021 v.reset(OpMul32)
19022 v0 := b.NewValue0(v.Pos, OpConst32, t)
19023 v0.AuxInt = int32ToAuxInt(c * d)
19024 v.AddArg2(v0, x)
19025 return true
19026 }
19027 }
19028 break
19029 }
19030 return false
19031 }
19032 func rewriteValuegeneric_OpMul32F(v *Value) bool {
19033 v_1 := v.Args[1]
19034 v_0 := v.Args[0]
19035
19036
19037
19038 for {
19039 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19040 if v_0.Op != OpConst32F {
19041 continue
19042 }
19043 c := auxIntToFloat32(v_0.AuxInt)
19044 if v_1.Op != OpConst32F {
19045 continue
19046 }
19047 d := auxIntToFloat32(v_1.AuxInt)
19048 if !(c*d == c*d) {
19049 continue
19050 }
19051 v.reset(OpConst32F)
19052 v.AuxInt = float32ToAuxInt(c * d)
19053 return true
19054 }
19055 break
19056 }
19057
19058
19059 for {
19060 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19061 x := v_0
19062 if v_1.Op != OpConst32F || auxIntToFloat32(v_1.AuxInt) != 1 {
19063 continue
19064 }
19065 v.copyOf(x)
19066 return true
19067 }
19068 break
19069 }
19070
19071
19072 for {
19073 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19074 x := v_0
19075 if v_1.Op != OpConst32F || auxIntToFloat32(v_1.AuxInt) != -1 {
19076 continue
19077 }
19078 v.reset(OpNeg32F)
19079 v.AddArg(x)
19080 return true
19081 }
19082 break
19083 }
19084
19085
19086 for {
19087 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19088 x := v_0
19089 if v_1.Op != OpConst32F || auxIntToFloat32(v_1.AuxInt) != 2 {
19090 continue
19091 }
19092 v.reset(OpAdd32F)
19093 v.AddArg2(x, x)
19094 return true
19095 }
19096 break
19097 }
19098 return false
19099 }
19100 func rewriteValuegeneric_OpMul32uhilo(v *Value) bool {
19101 v_1 := v.Args[1]
19102 v_0 := v.Args[0]
19103 b := v.Block
19104 typ := &b.Func.Config.Types
19105
19106
19107 for {
19108 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19109 if v_0.Op != OpConst32 {
19110 continue
19111 }
19112 c := auxIntToInt32(v_0.AuxInt)
19113 if v_1.Op != OpConst32 {
19114 continue
19115 }
19116 d := auxIntToInt32(v_1.AuxInt)
19117 v.reset(OpMakeTuple)
19118 v0 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
19119 v0.AuxInt = int32ToAuxInt(bitsMulU32(c, d).hi)
19120 v1 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
19121 v1.AuxInt = int32ToAuxInt(bitsMulU32(c, d).lo)
19122 v.AddArg2(v0, v1)
19123 return true
19124 }
19125 break
19126 }
19127 return false
19128 }
19129 func rewriteValuegeneric_OpMul32uover(v *Value) bool {
19130 v_1 := v.Args[1]
19131 v_0 := v.Args[0]
19132 b := v.Block
19133 typ := &b.Func.Config.Types
19134
19135
19136 for {
19137 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19138 if v_0.Op != OpConst32 {
19139 continue
19140 }
19141 c := auxIntToInt32(v_0.AuxInt)
19142 if v_1.Op != OpConst32 {
19143 continue
19144 }
19145 d := auxIntToInt32(v_1.AuxInt)
19146 v.reset(OpMakeTuple)
19147 v0 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
19148 v0.AuxInt = int32ToAuxInt(bitsMulU32(c, d).lo)
19149 v1 := b.NewValue0(v.Pos, OpConstBool, typ.Bool)
19150 v1.AuxInt = boolToAuxInt(bitsMulU32(c, d).hi != 0)
19151 v.AddArg2(v0, v1)
19152 return true
19153 }
19154 break
19155 }
19156
19157
19158 for {
19159 t := v.Type
19160 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19161 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 1 {
19162 continue
19163 }
19164 x := v_1
19165 v.reset(OpMakeTuple)
19166 v0 := b.NewValue0(v.Pos, OpConstBool, t.FieldType(1))
19167 v0.AuxInt = boolToAuxInt(false)
19168 v.AddArg2(x, v0)
19169 return true
19170 }
19171 break
19172 }
19173
19174
19175 for {
19176 t := v.Type
19177 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19178 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
19179 continue
19180 }
19181 v.reset(OpMakeTuple)
19182 v0 := b.NewValue0(v.Pos, OpConst32, t.FieldType(0))
19183 v0.AuxInt = int32ToAuxInt(0)
19184 v1 := b.NewValue0(v.Pos, OpConstBool, t.FieldType(1))
19185 v1.AuxInt = boolToAuxInt(false)
19186 v.AddArg2(v0, v1)
19187 return true
19188 }
19189 break
19190 }
19191 return false
19192 }
19193 func rewriteValuegeneric_OpMul64(v *Value) bool {
19194 v_1 := v.Args[1]
19195 v_0 := v.Args[0]
19196 b := v.Block
19197 typ := &b.Func.Config.Types
19198
19199
19200 for {
19201 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19202 if v_0.Op != OpConst64 {
19203 continue
19204 }
19205 c := auxIntToInt64(v_0.AuxInt)
19206 if v_1.Op != OpConst64 {
19207 continue
19208 }
19209 d := auxIntToInt64(v_1.AuxInt)
19210 v.reset(OpConst64)
19211 v.AuxInt = int64ToAuxInt(c * d)
19212 return true
19213 }
19214 break
19215 }
19216
19217
19218 for {
19219 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19220 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 1 {
19221 continue
19222 }
19223 x := v_1
19224 v.copyOf(x)
19225 return true
19226 }
19227 break
19228 }
19229
19230
19231 for {
19232 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19233 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != -1 {
19234 continue
19235 }
19236 x := v_1
19237 v.reset(OpNeg64)
19238 v.AddArg(x)
19239 return true
19240 }
19241 break
19242 }
19243
19244
19245
19246 for {
19247 t := v.Type
19248 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19249 n := v_0
19250 if v_1.Op != OpConst64 {
19251 continue
19252 }
19253 c := auxIntToInt64(v_1.AuxInt)
19254 if !(isPowerOfTwo(c)) {
19255 continue
19256 }
19257 v.reset(OpLsh64x64)
19258 v.Type = t
19259 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
19260 v0.AuxInt = int64ToAuxInt(log64(c))
19261 v.AddArg2(n, v0)
19262 return true
19263 }
19264 break
19265 }
19266
19267
19268
19269 for {
19270 t := v.Type
19271 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19272 n := v_0
19273 if v_1.Op != OpConst64 {
19274 continue
19275 }
19276 c := auxIntToInt64(v_1.AuxInt)
19277 if !(t.IsSigned() && isPowerOfTwo(-c)) {
19278 continue
19279 }
19280 v.reset(OpNeg64)
19281 v0 := b.NewValue0(v.Pos, OpLsh64x64, t)
19282 v1 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
19283 v1.AuxInt = int64ToAuxInt(log64(-c))
19284 v0.AddArg2(n, v1)
19285 v.AddArg(v0)
19286 return true
19287 }
19288 break
19289 }
19290
19291
19292 for {
19293 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19294 if v_0.Op != OpConst64 {
19295 continue
19296 }
19297 t := v_0.Type
19298 c := auxIntToInt64(v_0.AuxInt)
19299 if v_1.Op != OpAdd64 || v_1.Type != t {
19300 continue
19301 }
19302 _ = v_1.Args[1]
19303 v_1_0 := v_1.Args[0]
19304 v_1_1 := v_1.Args[1]
19305 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
19306 if v_1_0.Op != OpConst64 || v_1_0.Type != t {
19307 continue
19308 }
19309 d := auxIntToInt64(v_1_0.AuxInt)
19310 x := v_1_1
19311 v.reset(OpAdd64)
19312 v0 := b.NewValue0(v.Pos, OpConst64, t)
19313 v0.AuxInt = int64ToAuxInt(c * d)
19314 v1 := b.NewValue0(v.Pos, OpMul64, t)
19315 v2 := b.NewValue0(v.Pos, OpConst64, t)
19316 v2.AuxInt = int64ToAuxInt(c)
19317 v1.AddArg2(v2, x)
19318 v.AddArg2(v0, v1)
19319 return true
19320 }
19321 }
19322 break
19323 }
19324
19325
19326 for {
19327 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19328 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
19329 continue
19330 }
19331 v.reset(OpConst64)
19332 v.AuxInt = int64ToAuxInt(0)
19333 return true
19334 }
19335 break
19336 }
19337
19338
19339
19340 for {
19341 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19342 if v_0.Op != OpMul64 {
19343 continue
19344 }
19345 _ = v_0.Args[1]
19346 v_0_0 := v_0.Args[0]
19347 v_0_1 := v_0.Args[1]
19348 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
19349 i := v_0_0
19350 if i.Op != OpConst64 {
19351 continue
19352 }
19353 t := i.Type
19354 z := v_0_1
19355 x := v_1
19356 if !(z.Op != OpConst64 && x.Op != OpConst64) {
19357 continue
19358 }
19359 v.reset(OpMul64)
19360 v0 := b.NewValue0(v.Pos, OpMul64, t)
19361 v0.AddArg2(x, z)
19362 v.AddArg2(i, v0)
19363 return true
19364 }
19365 }
19366 break
19367 }
19368
19369
19370 for {
19371 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19372 if v_0.Op != OpConst64 {
19373 continue
19374 }
19375 t := v_0.Type
19376 c := auxIntToInt64(v_0.AuxInt)
19377 if v_1.Op != OpMul64 {
19378 continue
19379 }
19380 _ = v_1.Args[1]
19381 v_1_0 := v_1.Args[0]
19382 v_1_1 := v_1.Args[1]
19383 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
19384 if v_1_0.Op != OpConst64 || v_1_0.Type != t {
19385 continue
19386 }
19387 d := auxIntToInt64(v_1_0.AuxInt)
19388 x := v_1_1
19389 v.reset(OpMul64)
19390 v0 := b.NewValue0(v.Pos, OpConst64, t)
19391 v0.AuxInt = int64ToAuxInt(c * d)
19392 v.AddArg2(v0, x)
19393 return true
19394 }
19395 }
19396 break
19397 }
19398 return false
19399 }
19400 func rewriteValuegeneric_OpMul64F(v *Value) bool {
19401 v_1 := v.Args[1]
19402 v_0 := v.Args[0]
19403
19404
19405
19406 for {
19407 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19408 if v_0.Op != OpConst64F {
19409 continue
19410 }
19411 c := auxIntToFloat64(v_0.AuxInt)
19412 if v_1.Op != OpConst64F {
19413 continue
19414 }
19415 d := auxIntToFloat64(v_1.AuxInt)
19416 if !(c*d == c*d) {
19417 continue
19418 }
19419 v.reset(OpConst64F)
19420 v.AuxInt = float64ToAuxInt(c * d)
19421 return true
19422 }
19423 break
19424 }
19425
19426
19427 for {
19428 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19429 x := v_0
19430 if v_1.Op != OpConst64F || auxIntToFloat64(v_1.AuxInt) != 1 {
19431 continue
19432 }
19433 v.copyOf(x)
19434 return true
19435 }
19436 break
19437 }
19438
19439
19440 for {
19441 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19442 x := v_0
19443 if v_1.Op != OpConst64F || auxIntToFloat64(v_1.AuxInt) != -1 {
19444 continue
19445 }
19446 v.reset(OpNeg64F)
19447 v.AddArg(x)
19448 return true
19449 }
19450 break
19451 }
19452
19453
19454 for {
19455 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19456 x := v_0
19457 if v_1.Op != OpConst64F || auxIntToFloat64(v_1.AuxInt) != 2 {
19458 continue
19459 }
19460 v.reset(OpAdd64F)
19461 v.AddArg2(x, x)
19462 return true
19463 }
19464 break
19465 }
19466 return false
19467 }
19468 func rewriteValuegeneric_OpMul64uhilo(v *Value) bool {
19469 v_1 := v.Args[1]
19470 v_0 := v.Args[0]
19471 b := v.Block
19472 typ := &b.Func.Config.Types
19473
19474
19475 for {
19476 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19477 if v_0.Op != OpConst64 {
19478 continue
19479 }
19480 c := auxIntToInt64(v_0.AuxInt)
19481 if v_1.Op != OpConst64 {
19482 continue
19483 }
19484 d := auxIntToInt64(v_1.AuxInt)
19485 v.reset(OpMakeTuple)
19486 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
19487 v0.AuxInt = int64ToAuxInt(bitsMulU64(c, d).hi)
19488 v1 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
19489 v1.AuxInt = int64ToAuxInt(bitsMulU64(c, d).lo)
19490 v.AddArg2(v0, v1)
19491 return true
19492 }
19493 break
19494 }
19495 return false
19496 }
19497 func rewriteValuegeneric_OpMul64uover(v *Value) bool {
19498 v_1 := v.Args[1]
19499 v_0 := v.Args[0]
19500 b := v.Block
19501 typ := &b.Func.Config.Types
19502
19503
19504 for {
19505 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19506 if v_0.Op != OpConst64 {
19507 continue
19508 }
19509 c := auxIntToInt64(v_0.AuxInt)
19510 if v_1.Op != OpConst64 {
19511 continue
19512 }
19513 d := auxIntToInt64(v_1.AuxInt)
19514 v.reset(OpMakeTuple)
19515 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
19516 v0.AuxInt = int64ToAuxInt(bitsMulU64(c, d).lo)
19517 v1 := b.NewValue0(v.Pos, OpConstBool, typ.Bool)
19518 v1.AuxInt = boolToAuxInt(bitsMulU64(c, d).hi != 0)
19519 v.AddArg2(v0, v1)
19520 return true
19521 }
19522 break
19523 }
19524
19525
19526 for {
19527 t := v.Type
19528 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19529 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 1 {
19530 continue
19531 }
19532 x := v_1
19533 v.reset(OpMakeTuple)
19534 v0 := b.NewValue0(v.Pos, OpConstBool, t.FieldType(1))
19535 v0.AuxInt = boolToAuxInt(false)
19536 v.AddArg2(x, v0)
19537 return true
19538 }
19539 break
19540 }
19541
19542
19543 for {
19544 t := v.Type
19545 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19546 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
19547 continue
19548 }
19549 v.reset(OpMakeTuple)
19550 v0 := b.NewValue0(v.Pos, OpConst64, t.FieldType(0))
19551 v0.AuxInt = int64ToAuxInt(0)
19552 v1 := b.NewValue0(v.Pos, OpConstBool, t.FieldType(1))
19553 v1.AuxInt = boolToAuxInt(false)
19554 v.AddArg2(v0, v1)
19555 return true
19556 }
19557 break
19558 }
19559 return false
19560 }
19561 func rewriteValuegeneric_OpMul8(v *Value) bool {
19562 v_1 := v.Args[1]
19563 v_0 := v.Args[0]
19564 b := v.Block
19565 typ := &b.Func.Config.Types
19566
19567
19568 for {
19569 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19570 if v_0.Op != OpConst8 {
19571 continue
19572 }
19573 c := auxIntToInt8(v_0.AuxInt)
19574 if v_1.Op != OpConst8 {
19575 continue
19576 }
19577 d := auxIntToInt8(v_1.AuxInt)
19578 v.reset(OpConst8)
19579 v.AuxInt = int8ToAuxInt(c * d)
19580 return true
19581 }
19582 break
19583 }
19584
19585
19586 for {
19587 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19588 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 1 {
19589 continue
19590 }
19591 x := v_1
19592 v.copyOf(x)
19593 return true
19594 }
19595 break
19596 }
19597
19598
19599 for {
19600 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19601 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != -1 {
19602 continue
19603 }
19604 x := v_1
19605 v.reset(OpNeg8)
19606 v.AddArg(x)
19607 return true
19608 }
19609 break
19610 }
19611
19612
19613
19614 for {
19615 t := v.Type
19616 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19617 n := v_0
19618 if v_1.Op != OpConst8 {
19619 continue
19620 }
19621 c := auxIntToInt8(v_1.AuxInt)
19622 if !(isPowerOfTwo(c)) {
19623 continue
19624 }
19625 v.reset(OpLsh8x64)
19626 v.Type = t
19627 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
19628 v0.AuxInt = int64ToAuxInt(log8(c))
19629 v.AddArg2(n, v0)
19630 return true
19631 }
19632 break
19633 }
19634
19635
19636
19637 for {
19638 t := v.Type
19639 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19640 n := v_0
19641 if v_1.Op != OpConst8 {
19642 continue
19643 }
19644 c := auxIntToInt8(v_1.AuxInt)
19645 if !(t.IsSigned() && isPowerOfTwo(-c)) {
19646 continue
19647 }
19648 v.reset(OpNeg8)
19649 v0 := b.NewValue0(v.Pos, OpLsh8x64, t)
19650 v1 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
19651 v1.AuxInt = int64ToAuxInt(log8(-c))
19652 v0.AddArg2(n, v1)
19653 v.AddArg(v0)
19654 return true
19655 }
19656 break
19657 }
19658
19659
19660 for {
19661 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19662 if v_0.Op != OpConst8 {
19663 continue
19664 }
19665 t := v_0.Type
19666 c := auxIntToInt8(v_0.AuxInt)
19667 if v_1.Op != OpAdd8 || v_1.Type != t {
19668 continue
19669 }
19670 _ = v_1.Args[1]
19671 v_1_0 := v_1.Args[0]
19672 v_1_1 := v_1.Args[1]
19673 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
19674 if v_1_0.Op != OpConst8 || v_1_0.Type != t {
19675 continue
19676 }
19677 d := auxIntToInt8(v_1_0.AuxInt)
19678 x := v_1_1
19679 v.reset(OpAdd8)
19680 v0 := b.NewValue0(v.Pos, OpConst8, t)
19681 v0.AuxInt = int8ToAuxInt(c * d)
19682 v1 := b.NewValue0(v.Pos, OpMul8, t)
19683 v2 := b.NewValue0(v.Pos, OpConst8, t)
19684 v2.AuxInt = int8ToAuxInt(c)
19685 v1.AddArg2(v2, x)
19686 v.AddArg2(v0, v1)
19687 return true
19688 }
19689 }
19690 break
19691 }
19692
19693
19694 for {
19695 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19696 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 {
19697 continue
19698 }
19699 v.reset(OpConst8)
19700 v.AuxInt = int8ToAuxInt(0)
19701 return true
19702 }
19703 break
19704 }
19705
19706
19707
19708 for {
19709 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19710 if v_0.Op != OpMul8 {
19711 continue
19712 }
19713 _ = v_0.Args[1]
19714 v_0_0 := v_0.Args[0]
19715 v_0_1 := v_0.Args[1]
19716 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
19717 i := v_0_0
19718 if i.Op != OpConst8 {
19719 continue
19720 }
19721 t := i.Type
19722 z := v_0_1
19723 x := v_1
19724 if !(z.Op != OpConst8 && x.Op != OpConst8) {
19725 continue
19726 }
19727 v.reset(OpMul8)
19728 v0 := b.NewValue0(v.Pos, OpMul8, t)
19729 v0.AddArg2(x, z)
19730 v.AddArg2(i, v0)
19731 return true
19732 }
19733 }
19734 break
19735 }
19736
19737
19738 for {
19739 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
19740 if v_0.Op != OpConst8 {
19741 continue
19742 }
19743 t := v_0.Type
19744 c := auxIntToInt8(v_0.AuxInt)
19745 if v_1.Op != OpMul8 {
19746 continue
19747 }
19748 _ = v_1.Args[1]
19749 v_1_0 := v_1.Args[0]
19750 v_1_1 := v_1.Args[1]
19751 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
19752 if v_1_0.Op != OpConst8 || v_1_0.Type != t {
19753 continue
19754 }
19755 d := auxIntToInt8(v_1_0.AuxInt)
19756 x := v_1_1
19757 v.reset(OpMul8)
19758 v0 := b.NewValue0(v.Pos, OpConst8, t)
19759 v0.AuxInt = int8ToAuxInt(c * d)
19760 v.AddArg2(v0, x)
19761 return true
19762 }
19763 }
19764 break
19765 }
19766 return false
19767 }
19768 func rewriteValuegeneric_OpNeg16(v *Value) bool {
19769 v_0 := v.Args[0]
19770 b := v.Block
19771
19772
19773 for {
19774 if v_0.Op != OpConst16 {
19775 break
19776 }
19777 c := auxIntToInt16(v_0.AuxInt)
19778 v.reset(OpConst16)
19779 v.AuxInt = int16ToAuxInt(-c)
19780 return true
19781 }
19782
19783
19784 for {
19785 if v_0.Op != OpSub16 {
19786 break
19787 }
19788 y := v_0.Args[1]
19789 x := v_0.Args[0]
19790 v.reset(OpSub16)
19791 v.AddArg2(y, x)
19792 return true
19793 }
19794
19795
19796 for {
19797 if v_0.Op != OpNeg16 {
19798 break
19799 }
19800 x := v_0.Args[0]
19801 v.copyOf(x)
19802 return true
19803 }
19804
19805
19806 for {
19807 t := v.Type
19808 if v_0.Op != OpCom16 {
19809 break
19810 }
19811 x := v_0.Args[0]
19812 v.reset(OpAdd16)
19813 v0 := b.NewValue0(v.Pos, OpConst16, t)
19814 v0.AuxInt = int16ToAuxInt(1)
19815 v.AddArg2(v0, x)
19816 return true
19817 }
19818 return false
19819 }
19820 func rewriteValuegeneric_OpNeg32(v *Value) bool {
19821 v_0 := v.Args[0]
19822 b := v.Block
19823
19824
19825 for {
19826 if v_0.Op != OpConst32 {
19827 break
19828 }
19829 c := auxIntToInt32(v_0.AuxInt)
19830 v.reset(OpConst32)
19831 v.AuxInt = int32ToAuxInt(-c)
19832 return true
19833 }
19834
19835
19836 for {
19837 if v_0.Op != OpSub32 {
19838 break
19839 }
19840 y := v_0.Args[1]
19841 x := v_0.Args[0]
19842 v.reset(OpSub32)
19843 v.AddArg2(y, x)
19844 return true
19845 }
19846
19847
19848 for {
19849 if v_0.Op != OpNeg32 {
19850 break
19851 }
19852 x := v_0.Args[0]
19853 v.copyOf(x)
19854 return true
19855 }
19856
19857
19858 for {
19859 t := v.Type
19860 if v_0.Op != OpCom32 {
19861 break
19862 }
19863 x := v_0.Args[0]
19864 v.reset(OpAdd32)
19865 v0 := b.NewValue0(v.Pos, OpConst32, t)
19866 v0.AuxInt = int32ToAuxInt(1)
19867 v.AddArg2(v0, x)
19868 return true
19869 }
19870 return false
19871 }
19872 func rewriteValuegeneric_OpNeg32F(v *Value) bool {
19873 v_0 := v.Args[0]
19874
19875
19876
19877 for {
19878 if v_0.Op != OpConst32F {
19879 break
19880 }
19881 c := auxIntToFloat32(v_0.AuxInt)
19882 if !(c != 0) {
19883 break
19884 }
19885 v.reset(OpConst32F)
19886 v.AuxInt = float32ToAuxInt(-c)
19887 return true
19888 }
19889 return false
19890 }
19891 func rewriteValuegeneric_OpNeg64(v *Value) bool {
19892 v_0 := v.Args[0]
19893 b := v.Block
19894
19895
19896 for {
19897 if v_0.Op != OpConst64 {
19898 break
19899 }
19900 c := auxIntToInt64(v_0.AuxInt)
19901 v.reset(OpConst64)
19902 v.AuxInt = int64ToAuxInt(-c)
19903 return true
19904 }
19905
19906
19907 for {
19908 if v_0.Op != OpSub64 {
19909 break
19910 }
19911 y := v_0.Args[1]
19912 x := v_0.Args[0]
19913 v.reset(OpSub64)
19914 v.AddArg2(y, x)
19915 return true
19916 }
19917
19918
19919 for {
19920 if v_0.Op != OpNeg64 {
19921 break
19922 }
19923 x := v_0.Args[0]
19924 v.copyOf(x)
19925 return true
19926 }
19927
19928
19929 for {
19930 t := v.Type
19931 if v_0.Op != OpCom64 {
19932 break
19933 }
19934 x := v_0.Args[0]
19935 v.reset(OpAdd64)
19936 v0 := b.NewValue0(v.Pos, OpConst64, t)
19937 v0.AuxInt = int64ToAuxInt(1)
19938 v.AddArg2(v0, x)
19939 return true
19940 }
19941 return false
19942 }
19943 func rewriteValuegeneric_OpNeg64F(v *Value) bool {
19944 v_0 := v.Args[0]
19945
19946
19947
19948 for {
19949 if v_0.Op != OpConst64F {
19950 break
19951 }
19952 c := auxIntToFloat64(v_0.AuxInt)
19953 if !(c != 0) {
19954 break
19955 }
19956 v.reset(OpConst64F)
19957 v.AuxInt = float64ToAuxInt(-c)
19958 return true
19959 }
19960 return false
19961 }
19962 func rewriteValuegeneric_OpNeg8(v *Value) bool {
19963 v_0 := v.Args[0]
19964 b := v.Block
19965
19966
19967 for {
19968 if v_0.Op != OpConst8 {
19969 break
19970 }
19971 c := auxIntToInt8(v_0.AuxInt)
19972 v.reset(OpConst8)
19973 v.AuxInt = int8ToAuxInt(-c)
19974 return true
19975 }
19976
19977
19978 for {
19979 if v_0.Op != OpSub8 {
19980 break
19981 }
19982 y := v_0.Args[1]
19983 x := v_0.Args[0]
19984 v.reset(OpSub8)
19985 v.AddArg2(y, x)
19986 return true
19987 }
19988
19989
19990 for {
19991 if v_0.Op != OpNeg8 {
19992 break
19993 }
19994 x := v_0.Args[0]
19995 v.copyOf(x)
19996 return true
19997 }
19998
19999
20000 for {
20001 t := v.Type
20002 if v_0.Op != OpCom8 {
20003 break
20004 }
20005 x := v_0.Args[0]
20006 v.reset(OpAdd8)
20007 v0 := b.NewValue0(v.Pos, OpConst8, t)
20008 v0.AuxInt = int8ToAuxInt(1)
20009 v.AddArg2(v0, x)
20010 return true
20011 }
20012 return false
20013 }
20014 func rewriteValuegeneric_OpNeq16(v *Value) bool {
20015 v_1 := v.Args[1]
20016 v_0 := v.Args[0]
20017 b := v.Block
20018 typ := &b.Func.Config.Types
20019
20020
20021 for {
20022 x := v_0
20023 if x != v_1 {
20024 break
20025 }
20026 v.reset(OpConstBool)
20027 v.AuxInt = boolToAuxInt(false)
20028 return true
20029 }
20030
20031
20032 for {
20033 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20034 if v_0.Op != OpConst16 {
20035 continue
20036 }
20037 t := v_0.Type
20038 c := auxIntToInt16(v_0.AuxInt)
20039 if v_1.Op != OpAdd16 {
20040 continue
20041 }
20042 _ = v_1.Args[1]
20043 v_1_0 := v_1.Args[0]
20044 v_1_1 := v_1.Args[1]
20045 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
20046 if v_1_0.Op != OpConst16 || v_1_0.Type != t {
20047 continue
20048 }
20049 d := auxIntToInt16(v_1_0.AuxInt)
20050 x := v_1_1
20051 v.reset(OpNeq16)
20052 v0 := b.NewValue0(v.Pos, OpConst16, t)
20053 v0.AuxInt = int16ToAuxInt(c - d)
20054 v.AddArg2(v0, x)
20055 return true
20056 }
20057 }
20058 break
20059 }
20060
20061
20062 for {
20063 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20064 if v_0.Op != OpConst16 {
20065 continue
20066 }
20067 c := auxIntToInt16(v_0.AuxInt)
20068 if v_1.Op != OpConst16 {
20069 continue
20070 }
20071 d := auxIntToInt16(v_1.AuxInt)
20072 v.reset(OpConstBool)
20073 v.AuxInt = boolToAuxInt(c != d)
20074 return true
20075 }
20076 break
20077 }
20078
20079
20080
20081 for {
20082 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20083 n := v_0
20084 if v_1.Op != OpLsh16x64 {
20085 continue
20086 }
20087 _ = v_1.Args[1]
20088 v_1_0 := v_1.Args[0]
20089 if v_1_0.Op != OpRsh16x64 {
20090 continue
20091 }
20092 _ = v_1_0.Args[1]
20093 v_1_0_0 := v_1_0.Args[0]
20094 if v_1_0_0.Op != OpAdd16 {
20095 continue
20096 }
20097 t := v_1_0_0.Type
20098 _ = v_1_0_0.Args[1]
20099 v_1_0_0_0 := v_1_0_0.Args[0]
20100 v_1_0_0_1 := v_1_0_0.Args[1]
20101 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 {
20102 if n != v_1_0_0_0 || v_1_0_0_1.Op != OpRsh16Ux64 || v_1_0_0_1.Type != t {
20103 continue
20104 }
20105 _ = v_1_0_0_1.Args[1]
20106 v_1_0_0_1_0 := v_1_0_0_1.Args[0]
20107 if v_1_0_0_1_0.Op != OpRsh16x64 || v_1_0_0_1_0.Type != t {
20108 continue
20109 }
20110 _ = v_1_0_0_1_0.Args[1]
20111 if n != v_1_0_0_1_0.Args[0] {
20112 continue
20113 }
20114 v_1_0_0_1_0_1 := v_1_0_0_1_0.Args[1]
20115 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 {
20116 continue
20117 }
20118 v_1_0_0_1_1 := v_1_0_0_1.Args[1]
20119 if v_1_0_0_1_1.Op != OpConst64 || v_1_0_0_1_1.Type != typ.UInt64 {
20120 continue
20121 }
20122 kbar := auxIntToInt64(v_1_0_0_1_1.AuxInt)
20123 v_1_0_1 := v_1_0.Args[1]
20124 if v_1_0_1.Op != OpConst64 || v_1_0_1.Type != typ.UInt64 {
20125 continue
20126 }
20127 k := auxIntToInt64(v_1_0_1.AuxInt)
20128 v_1_1 := v_1.Args[1]
20129 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) {
20130 continue
20131 }
20132 v.reset(OpNeq16)
20133 v0 := b.NewValue0(v.Pos, OpAnd16, t)
20134 v1 := b.NewValue0(v.Pos, OpConst16, t)
20135 v1.AuxInt = int16ToAuxInt(1<<uint(k) - 1)
20136 v0.AddArg2(n, v1)
20137 v2 := b.NewValue0(v.Pos, OpConst16, t)
20138 v2.AuxInt = int16ToAuxInt(0)
20139 v.AddArg2(v0, v2)
20140 return true
20141 }
20142 }
20143 break
20144 }
20145
20146
20147
20148 for {
20149 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20150 s := v_0
20151 if s.Op != OpSub16 {
20152 continue
20153 }
20154 y := s.Args[1]
20155 x := s.Args[0]
20156 if v_1.Op != OpConst16 || auxIntToInt16(v_1.AuxInt) != 0 || !(s.Uses == 1) {
20157 continue
20158 }
20159 v.reset(OpNeq16)
20160 v.AddArg2(x, y)
20161 return true
20162 }
20163 break
20164 }
20165
20166
20167
20168 for {
20169 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20170 if v_0.Op != OpAnd16 {
20171 continue
20172 }
20173 t := v_0.Type
20174 _ = v_0.Args[1]
20175 v_0_0 := v_0.Args[0]
20176 v_0_1 := v_0.Args[1]
20177 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
20178 x := v_0_0
20179 if v_0_1.Op != OpConst16 || v_0_1.Type != t {
20180 continue
20181 }
20182 y := auxIntToInt16(v_0_1.AuxInt)
20183 if v_1.Op != OpConst16 || v_1.Type != t || auxIntToInt16(v_1.AuxInt) != y || !(oneBit(y)) {
20184 continue
20185 }
20186 v.reset(OpEq16)
20187 v0 := b.NewValue0(v.Pos, OpAnd16, t)
20188 v1 := b.NewValue0(v.Pos, OpConst16, t)
20189 v1.AuxInt = int16ToAuxInt(y)
20190 v0.AddArg2(x, v1)
20191 v2 := b.NewValue0(v.Pos, OpConst16, t)
20192 v2.AuxInt = int16ToAuxInt(0)
20193 v.AddArg2(v0, v2)
20194 return true
20195 }
20196 }
20197 break
20198 }
20199 return false
20200 }
20201 func rewriteValuegeneric_OpNeq32(v *Value) bool {
20202 v_1 := v.Args[1]
20203 v_0 := v.Args[0]
20204 b := v.Block
20205 typ := &b.Func.Config.Types
20206
20207
20208 for {
20209 x := v_0
20210 if x != v_1 {
20211 break
20212 }
20213 v.reset(OpConstBool)
20214 v.AuxInt = boolToAuxInt(false)
20215 return true
20216 }
20217
20218
20219 for {
20220 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20221 if v_0.Op != OpConst32 {
20222 continue
20223 }
20224 t := v_0.Type
20225 c := auxIntToInt32(v_0.AuxInt)
20226 if v_1.Op != OpAdd32 {
20227 continue
20228 }
20229 _ = v_1.Args[1]
20230 v_1_0 := v_1.Args[0]
20231 v_1_1 := v_1.Args[1]
20232 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
20233 if v_1_0.Op != OpConst32 || v_1_0.Type != t {
20234 continue
20235 }
20236 d := auxIntToInt32(v_1_0.AuxInt)
20237 x := v_1_1
20238 v.reset(OpNeq32)
20239 v0 := b.NewValue0(v.Pos, OpConst32, t)
20240 v0.AuxInt = int32ToAuxInt(c - d)
20241 v.AddArg2(v0, x)
20242 return true
20243 }
20244 }
20245 break
20246 }
20247
20248
20249 for {
20250 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20251 if v_0.Op != OpConst32 {
20252 continue
20253 }
20254 c := auxIntToInt32(v_0.AuxInt)
20255 if v_1.Op != OpConst32 {
20256 continue
20257 }
20258 d := auxIntToInt32(v_1.AuxInt)
20259 v.reset(OpConstBool)
20260 v.AuxInt = boolToAuxInt(c != d)
20261 return true
20262 }
20263 break
20264 }
20265
20266
20267
20268 for {
20269 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20270 n := v_0
20271 if v_1.Op != OpLsh32x64 {
20272 continue
20273 }
20274 _ = v_1.Args[1]
20275 v_1_0 := v_1.Args[0]
20276 if v_1_0.Op != OpRsh32x64 {
20277 continue
20278 }
20279 _ = v_1_0.Args[1]
20280 v_1_0_0 := v_1_0.Args[0]
20281 if v_1_0_0.Op != OpAdd32 {
20282 continue
20283 }
20284 t := v_1_0_0.Type
20285 _ = v_1_0_0.Args[1]
20286 v_1_0_0_0 := v_1_0_0.Args[0]
20287 v_1_0_0_1 := v_1_0_0.Args[1]
20288 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 {
20289 if n != v_1_0_0_0 || v_1_0_0_1.Op != OpRsh32Ux64 || v_1_0_0_1.Type != t {
20290 continue
20291 }
20292 _ = v_1_0_0_1.Args[1]
20293 v_1_0_0_1_0 := v_1_0_0_1.Args[0]
20294 if v_1_0_0_1_0.Op != OpRsh32x64 || v_1_0_0_1_0.Type != t {
20295 continue
20296 }
20297 _ = v_1_0_0_1_0.Args[1]
20298 if n != v_1_0_0_1_0.Args[0] {
20299 continue
20300 }
20301 v_1_0_0_1_0_1 := v_1_0_0_1_0.Args[1]
20302 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 {
20303 continue
20304 }
20305 v_1_0_0_1_1 := v_1_0_0_1.Args[1]
20306 if v_1_0_0_1_1.Op != OpConst64 || v_1_0_0_1_1.Type != typ.UInt64 {
20307 continue
20308 }
20309 kbar := auxIntToInt64(v_1_0_0_1_1.AuxInt)
20310 v_1_0_1 := v_1_0.Args[1]
20311 if v_1_0_1.Op != OpConst64 || v_1_0_1.Type != typ.UInt64 {
20312 continue
20313 }
20314 k := auxIntToInt64(v_1_0_1.AuxInt)
20315 v_1_1 := v_1.Args[1]
20316 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) {
20317 continue
20318 }
20319 v.reset(OpNeq32)
20320 v0 := b.NewValue0(v.Pos, OpAnd32, t)
20321 v1 := b.NewValue0(v.Pos, OpConst32, t)
20322 v1.AuxInt = int32ToAuxInt(1<<uint(k) - 1)
20323 v0.AddArg2(n, v1)
20324 v2 := b.NewValue0(v.Pos, OpConst32, t)
20325 v2.AuxInt = int32ToAuxInt(0)
20326 v.AddArg2(v0, v2)
20327 return true
20328 }
20329 }
20330 break
20331 }
20332
20333
20334
20335 for {
20336 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20337 s := v_0
20338 if s.Op != OpSub32 {
20339 continue
20340 }
20341 y := s.Args[1]
20342 x := s.Args[0]
20343 if v_1.Op != OpConst32 || auxIntToInt32(v_1.AuxInt) != 0 || !(s.Uses == 1) {
20344 continue
20345 }
20346 v.reset(OpNeq32)
20347 v.AddArg2(x, y)
20348 return true
20349 }
20350 break
20351 }
20352
20353
20354
20355 for {
20356 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20357 if v_0.Op != OpAnd32 {
20358 continue
20359 }
20360 t := v_0.Type
20361 _ = v_0.Args[1]
20362 v_0_0 := v_0.Args[0]
20363 v_0_1 := v_0.Args[1]
20364 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
20365 x := v_0_0
20366 if v_0_1.Op != OpConst32 || v_0_1.Type != t {
20367 continue
20368 }
20369 y := auxIntToInt32(v_0_1.AuxInt)
20370 if v_1.Op != OpConst32 || v_1.Type != t || auxIntToInt32(v_1.AuxInt) != y || !(oneBit(y)) {
20371 continue
20372 }
20373 v.reset(OpEq32)
20374 v0 := b.NewValue0(v.Pos, OpAnd32, t)
20375 v1 := b.NewValue0(v.Pos, OpConst32, t)
20376 v1.AuxInt = int32ToAuxInt(y)
20377 v0.AddArg2(x, v1)
20378 v2 := b.NewValue0(v.Pos, OpConst32, t)
20379 v2.AuxInt = int32ToAuxInt(0)
20380 v.AddArg2(v0, v2)
20381 return true
20382 }
20383 }
20384 break
20385 }
20386 return false
20387 }
20388 func rewriteValuegeneric_OpNeq32F(v *Value) bool {
20389 v_1 := v.Args[1]
20390 v_0 := v.Args[0]
20391
20392
20393 for {
20394 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20395 if v_0.Op != OpConst32F {
20396 continue
20397 }
20398 c := auxIntToFloat32(v_0.AuxInt)
20399 if v_1.Op != OpConst32F {
20400 continue
20401 }
20402 d := auxIntToFloat32(v_1.AuxInt)
20403 v.reset(OpConstBool)
20404 v.AuxInt = boolToAuxInt(c != d)
20405 return true
20406 }
20407 break
20408 }
20409 return false
20410 }
20411 func rewriteValuegeneric_OpNeq64(v *Value) bool {
20412 v_1 := v.Args[1]
20413 v_0 := v.Args[0]
20414 b := v.Block
20415 typ := &b.Func.Config.Types
20416
20417
20418 for {
20419 x := v_0
20420 if x != v_1 {
20421 break
20422 }
20423 v.reset(OpConstBool)
20424 v.AuxInt = boolToAuxInt(false)
20425 return true
20426 }
20427
20428
20429 for {
20430 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20431 if v_0.Op != OpConst64 {
20432 continue
20433 }
20434 t := v_0.Type
20435 c := auxIntToInt64(v_0.AuxInt)
20436 if v_1.Op != OpAdd64 {
20437 continue
20438 }
20439 _ = v_1.Args[1]
20440 v_1_0 := v_1.Args[0]
20441 v_1_1 := v_1.Args[1]
20442 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
20443 if v_1_0.Op != OpConst64 || v_1_0.Type != t {
20444 continue
20445 }
20446 d := auxIntToInt64(v_1_0.AuxInt)
20447 x := v_1_1
20448 v.reset(OpNeq64)
20449 v0 := b.NewValue0(v.Pos, OpConst64, t)
20450 v0.AuxInt = int64ToAuxInt(c - d)
20451 v.AddArg2(v0, x)
20452 return true
20453 }
20454 }
20455 break
20456 }
20457
20458
20459 for {
20460 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20461 if v_0.Op != OpConst64 {
20462 continue
20463 }
20464 c := auxIntToInt64(v_0.AuxInt)
20465 if v_1.Op != OpConst64 {
20466 continue
20467 }
20468 d := auxIntToInt64(v_1.AuxInt)
20469 v.reset(OpConstBool)
20470 v.AuxInt = boolToAuxInt(c != d)
20471 return true
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 n := v_0
20481 if v_1.Op != OpLsh64x64 {
20482 continue
20483 }
20484 _ = v_1.Args[1]
20485 v_1_0 := v_1.Args[0]
20486 if v_1_0.Op != OpRsh64x64 {
20487 continue
20488 }
20489 _ = v_1_0.Args[1]
20490 v_1_0_0 := v_1_0.Args[0]
20491 if v_1_0_0.Op != OpAdd64 {
20492 continue
20493 }
20494 t := v_1_0_0.Type
20495 _ = v_1_0_0.Args[1]
20496 v_1_0_0_0 := v_1_0_0.Args[0]
20497 v_1_0_0_1 := v_1_0_0.Args[1]
20498 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 {
20499 if n != v_1_0_0_0 || v_1_0_0_1.Op != OpRsh64Ux64 || v_1_0_0_1.Type != t {
20500 continue
20501 }
20502 _ = v_1_0_0_1.Args[1]
20503 v_1_0_0_1_0 := v_1_0_0_1.Args[0]
20504 if v_1_0_0_1_0.Op != OpRsh64x64 || v_1_0_0_1_0.Type != t {
20505 continue
20506 }
20507 _ = v_1_0_0_1_0.Args[1]
20508 if n != v_1_0_0_1_0.Args[0] {
20509 continue
20510 }
20511 v_1_0_0_1_0_1 := v_1_0_0_1_0.Args[1]
20512 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 {
20513 continue
20514 }
20515 v_1_0_0_1_1 := v_1_0_0_1.Args[1]
20516 if v_1_0_0_1_1.Op != OpConst64 || v_1_0_0_1_1.Type != typ.UInt64 {
20517 continue
20518 }
20519 kbar := auxIntToInt64(v_1_0_0_1_1.AuxInt)
20520 v_1_0_1 := v_1_0.Args[1]
20521 if v_1_0_1.Op != OpConst64 || v_1_0_1.Type != typ.UInt64 {
20522 continue
20523 }
20524 k := auxIntToInt64(v_1_0_1.AuxInt)
20525 v_1_1 := v_1.Args[1]
20526 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) {
20527 continue
20528 }
20529 v.reset(OpNeq64)
20530 v0 := b.NewValue0(v.Pos, OpAnd64, t)
20531 v1 := b.NewValue0(v.Pos, OpConst64, t)
20532 v1.AuxInt = int64ToAuxInt(1<<uint(k) - 1)
20533 v0.AddArg2(n, v1)
20534 v2 := b.NewValue0(v.Pos, OpConst64, t)
20535 v2.AuxInt = int64ToAuxInt(0)
20536 v.AddArg2(v0, v2)
20537 return true
20538 }
20539 }
20540 break
20541 }
20542
20543
20544
20545 for {
20546 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20547 s := v_0
20548 if s.Op != OpSub64 {
20549 continue
20550 }
20551 y := s.Args[1]
20552 x := s.Args[0]
20553 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 0 || !(s.Uses == 1) {
20554 continue
20555 }
20556 v.reset(OpNeq64)
20557 v.AddArg2(x, y)
20558 return true
20559 }
20560 break
20561 }
20562
20563
20564
20565 for {
20566 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20567 if v_0.Op != OpAnd64 {
20568 continue
20569 }
20570 t := v_0.Type
20571 _ = v_0.Args[1]
20572 v_0_0 := v_0.Args[0]
20573 v_0_1 := v_0.Args[1]
20574 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
20575 x := v_0_0
20576 if v_0_1.Op != OpConst64 || v_0_1.Type != t {
20577 continue
20578 }
20579 y := auxIntToInt64(v_0_1.AuxInt)
20580 if v_1.Op != OpConst64 || v_1.Type != t || auxIntToInt64(v_1.AuxInt) != y || !(oneBit(y)) {
20581 continue
20582 }
20583 v.reset(OpEq64)
20584 v0 := b.NewValue0(v.Pos, OpAnd64, t)
20585 v1 := b.NewValue0(v.Pos, OpConst64, t)
20586 v1.AuxInt = int64ToAuxInt(y)
20587 v0.AddArg2(x, v1)
20588 v2 := b.NewValue0(v.Pos, OpConst64, t)
20589 v2.AuxInt = int64ToAuxInt(0)
20590 v.AddArg2(v0, v2)
20591 return true
20592 }
20593 }
20594 break
20595 }
20596 return false
20597 }
20598 func rewriteValuegeneric_OpNeq64F(v *Value) bool {
20599 v_1 := v.Args[1]
20600 v_0 := v.Args[0]
20601
20602
20603 for {
20604 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20605 if v_0.Op != OpConst64F {
20606 continue
20607 }
20608 c := auxIntToFloat64(v_0.AuxInt)
20609 if v_1.Op != OpConst64F {
20610 continue
20611 }
20612 d := auxIntToFloat64(v_1.AuxInt)
20613 v.reset(OpConstBool)
20614 v.AuxInt = boolToAuxInt(c != d)
20615 return true
20616 }
20617 break
20618 }
20619 return false
20620 }
20621 func rewriteValuegeneric_OpNeq8(v *Value) bool {
20622 v_1 := v.Args[1]
20623 v_0 := v.Args[0]
20624 b := v.Block
20625 typ := &b.Func.Config.Types
20626
20627
20628 for {
20629 x := v_0
20630 if x != v_1 {
20631 break
20632 }
20633 v.reset(OpConstBool)
20634 v.AuxInt = boolToAuxInt(false)
20635 return true
20636 }
20637
20638
20639 for {
20640 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20641 if v_0.Op != OpConst8 {
20642 continue
20643 }
20644 t := v_0.Type
20645 c := auxIntToInt8(v_0.AuxInt)
20646 if v_1.Op != OpAdd8 {
20647 continue
20648 }
20649 _ = v_1.Args[1]
20650 v_1_0 := v_1.Args[0]
20651 v_1_1 := v_1.Args[1]
20652 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
20653 if v_1_0.Op != OpConst8 || v_1_0.Type != t {
20654 continue
20655 }
20656 d := auxIntToInt8(v_1_0.AuxInt)
20657 x := v_1_1
20658 v.reset(OpNeq8)
20659 v0 := b.NewValue0(v.Pos, OpConst8, t)
20660 v0.AuxInt = int8ToAuxInt(c - d)
20661 v.AddArg2(v0, x)
20662 return true
20663 }
20664 }
20665 break
20666 }
20667
20668
20669 for {
20670 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20671 if v_0.Op != OpConst8 {
20672 continue
20673 }
20674 c := auxIntToInt8(v_0.AuxInt)
20675 if v_1.Op != OpConst8 {
20676 continue
20677 }
20678 d := auxIntToInt8(v_1.AuxInt)
20679 v.reset(OpConstBool)
20680 v.AuxInt = boolToAuxInt(c != d)
20681 return true
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 n := v_0
20691 if v_1.Op != OpLsh8x64 {
20692 continue
20693 }
20694 _ = v_1.Args[1]
20695 v_1_0 := v_1.Args[0]
20696 if v_1_0.Op != OpRsh8x64 {
20697 continue
20698 }
20699 _ = v_1_0.Args[1]
20700 v_1_0_0 := v_1_0.Args[0]
20701 if v_1_0_0.Op != OpAdd8 {
20702 continue
20703 }
20704 t := v_1_0_0.Type
20705 _ = v_1_0_0.Args[1]
20706 v_1_0_0_0 := v_1_0_0.Args[0]
20707 v_1_0_0_1 := v_1_0_0.Args[1]
20708 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 {
20709 if n != v_1_0_0_0 || v_1_0_0_1.Op != OpRsh8Ux64 || v_1_0_0_1.Type != t {
20710 continue
20711 }
20712 _ = v_1_0_0_1.Args[1]
20713 v_1_0_0_1_0 := v_1_0_0_1.Args[0]
20714 if v_1_0_0_1_0.Op != OpRsh8x64 || v_1_0_0_1_0.Type != t {
20715 continue
20716 }
20717 _ = v_1_0_0_1_0.Args[1]
20718 if n != v_1_0_0_1_0.Args[0] {
20719 continue
20720 }
20721 v_1_0_0_1_0_1 := v_1_0_0_1_0.Args[1]
20722 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 {
20723 continue
20724 }
20725 v_1_0_0_1_1 := v_1_0_0_1.Args[1]
20726 if v_1_0_0_1_1.Op != OpConst64 || v_1_0_0_1_1.Type != typ.UInt64 {
20727 continue
20728 }
20729 kbar := auxIntToInt64(v_1_0_0_1_1.AuxInt)
20730 v_1_0_1 := v_1_0.Args[1]
20731 if v_1_0_1.Op != OpConst64 || v_1_0_1.Type != typ.UInt64 {
20732 continue
20733 }
20734 k := auxIntToInt64(v_1_0_1.AuxInt)
20735 v_1_1 := v_1.Args[1]
20736 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) {
20737 continue
20738 }
20739 v.reset(OpNeq8)
20740 v0 := b.NewValue0(v.Pos, OpAnd8, t)
20741 v1 := b.NewValue0(v.Pos, OpConst8, t)
20742 v1.AuxInt = int8ToAuxInt(1<<uint(k) - 1)
20743 v0.AddArg2(n, v1)
20744 v2 := b.NewValue0(v.Pos, OpConst8, t)
20745 v2.AuxInt = int8ToAuxInt(0)
20746 v.AddArg2(v0, v2)
20747 return true
20748 }
20749 }
20750 break
20751 }
20752
20753
20754
20755 for {
20756 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20757 s := v_0
20758 if s.Op != OpSub8 {
20759 continue
20760 }
20761 y := s.Args[1]
20762 x := s.Args[0]
20763 if v_1.Op != OpConst8 || auxIntToInt8(v_1.AuxInt) != 0 || !(s.Uses == 1) {
20764 continue
20765 }
20766 v.reset(OpNeq8)
20767 v.AddArg2(x, y)
20768 return true
20769 }
20770 break
20771 }
20772
20773
20774
20775 for {
20776 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20777 if v_0.Op != OpAnd8 {
20778 continue
20779 }
20780 t := v_0.Type
20781 _ = v_0.Args[1]
20782 v_0_0 := v_0.Args[0]
20783 v_0_1 := v_0.Args[1]
20784 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
20785 x := v_0_0
20786 if v_0_1.Op != OpConst8 || v_0_1.Type != t {
20787 continue
20788 }
20789 y := auxIntToInt8(v_0_1.AuxInt)
20790 if v_1.Op != OpConst8 || v_1.Type != t || auxIntToInt8(v_1.AuxInt) != y || !(oneBit(y)) {
20791 continue
20792 }
20793 v.reset(OpEq8)
20794 v0 := b.NewValue0(v.Pos, OpAnd8, t)
20795 v1 := b.NewValue0(v.Pos, OpConst8, t)
20796 v1.AuxInt = int8ToAuxInt(y)
20797 v0.AddArg2(x, v1)
20798 v2 := b.NewValue0(v.Pos, OpConst8, t)
20799 v2.AuxInt = int8ToAuxInt(0)
20800 v.AddArg2(v0, v2)
20801 return true
20802 }
20803 }
20804 break
20805 }
20806 return false
20807 }
20808 func rewriteValuegeneric_OpNeqB(v *Value) bool {
20809 v_1 := v.Args[1]
20810 v_0 := v.Args[0]
20811
20812
20813 for {
20814 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20815 if v_0.Op != OpConstBool {
20816 continue
20817 }
20818 c := auxIntToBool(v_0.AuxInt)
20819 if v_1.Op != OpConstBool {
20820 continue
20821 }
20822 d := auxIntToBool(v_1.AuxInt)
20823 v.reset(OpConstBool)
20824 v.AuxInt = boolToAuxInt(c != d)
20825 return true
20826 }
20827 break
20828 }
20829
20830
20831 for {
20832 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20833 if v_0.Op != OpConstBool || auxIntToBool(v_0.AuxInt) != false {
20834 continue
20835 }
20836 x := v_1
20837 v.copyOf(x)
20838 return true
20839 }
20840 break
20841 }
20842
20843
20844 for {
20845 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20846 if v_0.Op != OpConstBool || auxIntToBool(v_0.AuxInt) != true {
20847 continue
20848 }
20849 x := v_1
20850 v.reset(OpNot)
20851 v.AddArg(x)
20852 return true
20853 }
20854 break
20855 }
20856
20857
20858 for {
20859 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20860 if v_0.Op != OpNot {
20861 continue
20862 }
20863 x := v_0.Args[0]
20864 if v_1.Op != OpNot {
20865 continue
20866 }
20867 y := v_1.Args[0]
20868 v.reset(OpNeqB)
20869 v.AddArg2(x, y)
20870 return true
20871 }
20872 break
20873 }
20874 return false
20875 }
20876 func rewriteValuegeneric_OpNeqInter(v *Value) bool {
20877 v_1 := v.Args[1]
20878 v_0 := v.Args[0]
20879 b := v.Block
20880 typ := &b.Func.Config.Types
20881
20882
20883 for {
20884 x := v_0
20885 y := v_1
20886 v.reset(OpNeqPtr)
20887 v0 := b.NewValue0(v.Pos, OpITab, typ.Uintptr)
20888 v0.AddArg(x)
20889 v1 := b.NewValue0(v.Pos, OpITab, typ.Uintptr)
20890 v1.AddArg(y)
20891 v.AddArg2(v0, v1)
20892 return true
20893 }
20894 }
20895 func rewriteValuegeneric_OpNeqPtr(v *Value) bool {
20896 v_1 := v.Args[1]
20897 v_0 := v.Args[0]
20898
20899
20900 for {
20901 x := v_0
20902 if x != v_1 {
20903 break
20904 }
20905 v.reset(OpConstBool)
20906 v.AuxInt = boolToAuxInt(false)
20907 return true
20908 }
20909
20910
20911 for {
20912 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20913 if v_0.Op != OpAddr {
20914 continue
20915 }
20916 x := auxToSym(v_0.Aux)
20917 if v_1.Op != OpAddr {
20918 continue
20919 }
20920 y := auxToSym(v_1.Aux)
20921 v.reset(OpConstBool)
20922 v.AuxInt = boolToAuxInt(x != y)
20923 return true
20924 }
20925 break
20926 }
20927
20928
20929 for {
20930 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20931 if v_0.Op != OpAddr {
20932 continue
20933 }
20934 x := auxToSym(v_0.Aux)
20935 if v_1.Op != OpOffPtr {
20936 continue
20937 }
20938 o := auxIntToInt64(v_1.AuxInt)
20939 v_1_0 := v_1.Args[0]
20940 if v_1_0.Op != OpAddr {
20941 continue
20942 }
20943 y := auxToSym(v_1_0.Aux)
20944 v.reset(OpConstBool)
20945 v.AuxInt = boolToAuxInt(x != y || o != 0)
20946 return true
20947 }
20948 break
20949 }
20950
20951
20952 for {
20953 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20954 if v_0.Op != OpOffPtr {
20955 continue
20956 }
20957 o1 := auxIntToInt64(v_0.AuxInt)
20958 v_0_0 := v_0.Args[0]
20959 if v_0_0.Op != OpAddr {
20960 continue
20961 }
20962 x := auxToSym(v_0_0.Aux)
20963 if v_1.Op != OpOffPtr {
20964 continue
20965 }
20966 o2 := auxIntToInt64(v_1.AuxInt)
20967 v_1_0 := v_1.Args[0]
20968 if v_1_0.Op != OpAddr {
20969 continue
20970 }
20971 y := auxToSym(v_1_0.Aux)
20972 v.reset(OpConstBool)
20973 v.AuxInt = boolToAuxInt(x != y || o1 != o2)
20974 return true
20975 }
20976 break
20977 }
20978
20979
20980 for {
20981 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
20982 if v_0.Op != OpLocalAddr {
20983 continue
20984 }
20985 x := auxToSym(v_0.Aux)
20986 if v_1.Op != OpLocalAddr {
20987 continue
20988 }
20989 y := auxToSym(v_1.Aux)
20990 v.reset(OpConstBool)
20991 v.AuxInt = boolToAuxInt(x != y)
20992 return true
20993 }
20994 break
20995 }
20996
20997
20998 for {
20999 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
21000 if v_0.Op != OpLocalAddr {
21001 continue
21002 }
21003 x := auxToSym(v_0.Aux)
21004 if v_1.Op != OpOffPtr {
21005 continue
21006 }
21007 o := auxIntToInt64(v_1.AuxInt)
21008 v_1_0 := v_1.Args[0]
21009 if v_1_0.Op != OpLocalAddr {
21010 continue
21011 }
21012 y := auxToSym(v_1_0.Aux)
21013 v.reset(OpConstBool)
21014 v.AuxInt = boolToAuxInt(x != y || o != 0)
21015 return true
21016 }
21017 break
21018 }
21019
21020
21021 for {
21022 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
21023 if v_0.Op != OpOffPtr {
21024 continue
21025 }
21026 o1 := auxIntToInt64(v_0.AuxInt)
21027 v_0_0 := v_0.Args[0]
21028 if v_0_0.Op != OpLocalAddr {
21029 continue
21030 }
21031 x := auxToSym(v_0_0.Aux)
21032 if v_1.Op != OpOffPtr {
21033 continue
21034 }
21035 o2 := auxIntToInt64(v_1.AuxInt)
21036 v_1_0 := v_1.Args[0]
21037 if v_1_0.Op != OpLocalAddr {
21038 continue
21039 }
21040 y := auxToSym(v_1_0.Aux)
21041 v.reset(OpConstBool)
21042 v.AuxInt = boolToAuxInt(x != y || o1 != o2)
21043 return true
21044 }
21045 break
21046 }
21047
21048
21049
21050 for {
21051 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
21052 if v_0.Op != OpOffPtr {
21053 continue
21054 }
21055 o1 := auxIntToInt64(v_0.AuxInt)
21056 p1 := v_0.Args[0]
21057 p2 := v_1
21058 if !(isSamePtr(p1, p2)) {
21059 continue
21060 }
21061 v.reset(OpConstBool)
21062 v.AuxInt = boolToAuxInt(o1 != 0)
21063 return true
21064 }
21065 break
21066 }
21067
21068
21069
21070 for {
21071 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
21072 if v_0.Op != OpOffPtr {
21073 continue
21074 }
21075 o1 := auxIntToInt64(v_0.AuxInt)
21076 p1 := v_0.Args[0]
21077 if v_1.Op != OpOffPtr {
21078 continue
21079 }
21080 o2 := auxIntToInt64(v_1.AuxInt)
21081 p2 := v_1.Args[0]
21082 if !(isSamePtr(p1, p2)) {
21083 continue
21084 }
21085 v.reset(OpConstBool)
21086 v.AuxInt = boolToAuxInt(o1 != o2)
21087 return true
21088 }
21089 break
21090 }
21091
21092
21093 for {
21094 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
21095 if v_0.Op != OpConst32 {
21096 continue
21097 }
21098 c := auxIntToInt32(v_0.AuxInt)
21099 if v_1.Op != OpConst32 {
21100 continue
21101 }
21102 d := auxIntToInt32(v_1.AuxInt)
21103 v.reset(OpConstBool)
21104 v.AuxInt = boolToAuxInt(c != d)
21105 return true
21106 }
21107 break
21108 }
21109
21110
21111 for {
21112 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
21113 if v_0.Op != OpConst64 {
21114 continue
21115 }
21116 c := auxIntToInt64(v_0.AuxInt)
21117 if v_1.Op != OpConst64 {
21118 continue
21119 }
21120 d := auxIntToInt64(v_1.AuxInt)
21121 v.reset(OpConstBool)
21122 v.AuxInt = boolToAuxInt(c != d)
21123 return true
21124 }
21125 break
21126 }
21127
21128
21129 for {
21130 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
21131 if v_0.Op != OpConvert {
21132 continue
21133 }
21134 v_0_0 := v_0.Args[0]
21135 if v_0_0.Op != OpAddr {
21136 continue
21137 }
21138 x := auxToSym(v_0_0.Aux)
21139 if v_1.Op != OpAddr {
21140 continue
21141 }
21142 y := auxToSym(v_1.Aux)
21143 v.reset(OpConstBool)
21144 v.AuxInt = boolToAuxInt(x != y)
21145 return true
21146 }
21147 break
21148 }
21149
21150
21151 for {
21152 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
21153 if v_0.Op != OpLocalAddr || v_1.Op != OpAddr {
21154 continue
21155 }
21156 v.reset(OpConstBool)
21157 v.AuxInt = boolToAuxInt(true)
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 v_0_0 := v_0.Args[0]
21170 if v_0_0.Op != OpLocalAddr || v_1.Op != OpAddr {
21171 continue
21172 }
21173 v.reset(OpConstBool)
21174 v.AuxInt = boolToAuxInt(true)
21175 return true
21176 }
21177 break
21178 }
21179
21180
21181 for {
21182 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
21183 if v_0.Op != OpLocalAddr || v_1.Op != OpOffPtr {
21184 continue
21185 }
21186 v_1_0 := v_1.Args[0]
21187 if v_1_0.Op != OpAddr {
21188 continue
21189 }
21190 v.reset(OpConstBool)
21191 v.AuxInt = boolToAuxInt(true)
21192 return true
21193 }
21194 break
21195 }
21196
21197
21198 for {
21199 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
21200 if v_0.Op != OpOffPtr {
21201 continue
21202 }
21203 v_0_0 := v_0.Args[0]
21204 if v_0_0.Op != OpLocalAddr || v_1.Op != OpOffPtr {
21205 continue
21206 }
21207 v_1_0 := v_1.Args[0]
21208 if v_1_0.Op != OpAddr {
21209 continue
21210 }
21211 v.reset(OpConstBool)
21212 v.AuxInt = boolToAuxInt(true)
21213 return true
21214 }
21215 break
21216 }
21217
21218
21219
21220 for {
21221 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
21222 if v_0.Op != OpAddPtr {
21223 continue
21224 }
21225 o1 := v_0.Args[1]
21226 p1 := v_0.Args[0]
21227 p2 := v_1
21228 if !(isSamePtr(p1, p2)) {
21229 continue
21230 }
21231 v.reset(OpIsNonNil)
21232 v.AddArg(o1)
21233 return true
21234 }
21235 break
21236 }
21237
21238
21239 for {
21240 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
21241 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
21242 continue
21243 }
21244 p := v_1
21245 v.reset(OpIsNonNil)
21246 v.AddArg(p)
21247 return true
21248 }
21249 break
21250 }
21251
21252
21253 for {
21254 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
21255 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
21256 continue
21257 }
21258 p := v_1
21259 v.reset(OpIsNonNil)
21260 v.AddArg(p)
21261 return true
21262 }
21263 break
21264 }
21265
21266
21267 for {
21268 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
21269 if v_0.Op != OpConstNil {
21270 continue
21271 }
21272 p := v_1
21273 v.reset(OpIsNonNil)
21274 v.AddArg(p)
21275 return true
21276 }
21277 break
21278 }
21279 return false
21280 }
21281 func rewriteValuegeneric_OpNeqSlice(v *Value) bool {
21282 v_1 := v.Args[1]
21283 v_0 := v.Args[0]
21284 b := v.Block
21285 typ := &b.Func.Config.Types
21286
21287
21288 for {
21289 x := v_0
21290 y := v_1
21291 v.reset(OpNeqPtr)
21292 v0 := b.NewValue0(v.Pos, OpSlicePtr, typ.BytePtr)
21293 v0.AddArg(x)
21294 v1 := b.NewValue0(v.Pos, OpSlicePtr, typ.BytePtr)
21295 v1.AddArg(y)
21296 v.AddArg2(v0, v1)
21297 return true
21298 }
21299 }
21300 func rewriteValuegeneric_OpNilCheck(v *Value) bool {
21301 v_1 := v.Args[1]
21302 v_0 := v.Args[0]
21303 b := v.Block
21304 fe := b.Func.fe
21305
21306
21307 for {
21308 ptr := v_0
21309 if ptr.Op != OpGetG {
21310 break
21311 }
21312 mem := ptr.Args[0]
21313 if mem != v_1 {
21314 break
21315 }
21316 v.copyOf(ptr)
21317 return true
21318 }
21319
21320
21321
21322 for {
21323 ptr := v_0
21324 if ptr.Op != OpSelectN || auxIntToInt64(ptr.AuxInt) != 0 {
21325 break
21326 }
21327 call := ptr.Args[0]
21328 if call.Op != OpStaticLECall || len(call.Args) != 2 || !(isSameCall(call.Aux, "runtime.newobject") && warnRule(fe.Debug_checknil(), v, "removed nil check")) {
21329 break
21330 }
21331 v.copyOf(ptr)
21332 return true
21333 }
21334
21335
21336
21337 for {
21338 ptr := v_0
21339 if ptr.Op != OpOffPtr {
21340 break
21341 }
21342 ptr_0 := ptr.Args[0]
21343 if ptr_0.Op != OpSelectN || auxIntToInt64(ptr_0.AuxInt) != 0 {
21344 break
21345 }
21346 call := ptr_0.Args[0]
21347 if call.Op != OpStaticLECall || len(call.Args) != 2 || !(isSameCall(call.Aux, "runtime.newobject") && warnRule(fe.Debug_checknil(), v, "removed nil check")) {
21348 break
21349 }
21350 v.copyOf(ptr)
21351 return true
21352 }
21353
21354
21355 for {
21356 ptr := v_0
21357 if ptr.Op != OpAddr {
21358 break
21359 }
21360 ptr_0 := ptr.Args[0]
21361 if ptr_0.Op != OpSB {
21362 break
21363 }
21364 v.copyOf(ptr)
21365 return true
21366 }
21367
21368
21369 for {
21370 ptr := v_0
21371 if ptr.Op != OpConvert {
21372 break
21373 }
21374 ptr_0 := ptr.Args[0]
21375 if ptr_0.Op != OpAddr {
21376 break
21377 }
21378 ptr_0_0 := ptr_0.Args[0]
21379 if ptr_0_0.Op != OpSB {
21380 break
21381 }
21382 v.copyOf(ptr)
21383 return true
21384 }
21385
21386
21387
21388 for {
21389 ptr := v_0
21390 if ptr.Op != OpLocalAddr || !(warnRule(fe.Debug_checknil(), v, "removed nil check")) {
21391 break
21392 }
21393 v.copyOf(ptr)
21394 return true
21395 }
21396
21397
21398 for {
21399 ptr := v_0
21400 if ptr.Op != OpNilCheck {
21401 break
21402 }
21403 v.copyOf(ptr)
21404 return true
21405 }
21406 return false
21407 }
21408 func rewriteValuegeneric_OpNot(v *Value) bool {
21409 v_0 := v.Args[0]
21410
21411
21412 for {
21413 if v_0.Op != OpConstBool {
21414 break
21415 }
21416 c := auxIntToBool(v_0.AuxInt)
21417 v.reset(OpConstBool)
21418 v.AuxInt = boolToAuxInt(!c)
21419 return true
21420 }
21421
21422
21423 for {
21424 if v_0.Op != OpEq64 {
21425 break
21426 }
21427 y := v_0.Args[1]
21428 x := v_0.Args[0]
21429 v.reset(OpNeq64)
21430 v.AddArg2(x, y)
21431 return true
21432 }
21433
21434
21435 for {
21436 if v_0.Op != OpEq32 {
21437 break
21438 }
21439 y := v_0.Args[1]
21440 x := v_0.Args[0]
21441 v.reset(OpNeq32)
21442 v.AddArg2(x, y)
21443 return true
21444 }
21445
21446
21447 for {
21448 if v_0.Op != OpEq16 {
21449 break
21450 }
21451 y := v_0.Args[1]
21452 x := v_0.Args[0]
21453 v.reset(OpNeq16)
21454 v.AddArg2(x, y)
21455 return true
21456 }
21457
21458
21459 for {
21460 if v_0.Op != OpEq8 {
21461 break
21462 }
21463 y := v_0.Args[1]
21464 x := v_0.Args[0]
21465 v.reset(OpNeq8)
21466 v.AddArg2(x, y)
21467 return true
21468 }
21469
21470
21471 for {
21472 if v_0.Op != OpEqB {
21473 break
21474 }
21475 y := v_0.Args[1]
21476 x := v_0.Args[0]
21477 v.reset(OpNeqB)
21478 v.AddArg2(x, y)
21479 return true
21480 }
21481
21482
21483 for {
21484 if v_0.Op != OpEqPtr {
21485 break
21486 }
21487 y := v_0.Args[1]
21488 x := v_0.Args[0]
21489 v.reset(OpNeqPtr)
21490 v.AddArg2(x, y)
21491 return true
21492 }
21493
21494
21495 for {
21496 if v_0.Op != OpEq64F {
21497 break
21498 }
21499 y := v_0.Args[1]
21500 x := v_0.Args[0]
21501 v.reset(OpNeq64F)
21502 v.AddArg2(x, y)
21503 return true
21504 }
21505
21506
21507 for {
21508 if v_0.Op != OpEq32F {
21509 break
21510 }
21511 y := v_0.Args[1]
21512 x := v_0.Args[0]
21513 v.reset(OpNeq32F)
21514 v.AddArg2(x, y)
21515 return true
21516 }
21517
21518
21519 for {
21520 if v_0.Op != OpNeq64 {
21521 break
21522 }
21523 y := v_0.Args[1]
21524 x := v_0.Args[0]
21525 v.reset(OpEq64)
21526 v.AddArg2(x, y)
21527 return true
21528 }
21529
21530
21531 for {
21532 if v_0.Op != OpNeq32 {
21533 break
21534 }
21535 y := v_0.Args[1]
21536 x := v_0.Args[0]
21537 v.reset(OpEq32)
21538 v.AddArg2(x, y)
21539 return true
21540 }
21541
21542
21543 for {
21544 if v_0.Op != OpNeq16 {
21545 break
21546 }
21547 y := v_0.Args[1]
21548 x := v_0.Args[0]
21549 v.reset(OpEq16)
21550 v.AddArg2(x, y)
21551 return true
21552 }
21553
21554
21555 for {
21556 if v_0.Op != OpNeq8 {
21557 break
21558 }
21559 y := v_0.Args[1]
21560 x := v_0.Args[0]
21561 v.reset(OpEq8)
21562 v.AddArg2(x, y)
21563 return true
21564 }
21565
21566
21567 for {
21568 if v_0.Op != OpNeqB {
21569 break
21570 }
21571 y := v_0.Args[1]
21572 x := v_0.Args[0]
21573 v.reset(OpEqB)
21574 v.AddArg2(x, y)
21575 return true
21576 }
21577
21578
21579 for {
21580 if v_0.Op != OpNeqPtr {
21581 break
21582 }
21583 y := v_0.Args[1]
21584 x := v_0.Args[0]
21585 v.reset(OpEqPtr)
21586 v.AddArg2(x, y)
21587 return true
21588 }
21589
21590
21591 for {
21592 if v_0.Op != OpNeq64F {
21593 break
21594 }
21595 y := v_0.Args[1]
21596 x := v_0.Args[0]
21597 v.reset(OpEq64F)
21598 v.AddArg2(x, y)
21599 return true
21600 }
21601
21602
21603 for {
21604 if v_0.Op != OpNeq32F {
21605 break
21606 }
21607 y := v_0.Args[1]
21608 x := v_0.Args[0]
21609 v.reset(OpEq32F)
21610 v.AddArg2(x, y)
21611 return true
21612 }
21613
21614
21615 for {
21616 if v_0.Op != OpLess64 {
21617 break
21618 }
21619 y := v_0.Args[1]
21620 x := v_0.Args[0]
21621 v.reset(OpLeq64)
21622 v.AddArg2(y, x)
21623 return true
21624 }
21625
21626
21627 for {
21628 if v_0.Op != OpLess32 {
21629 break
21630 }
21631 y := v_0.Args[1]
21632 x := v_0.Args[0]
21633 v.reset(OpLeq32)
21634 v.AddArg2(y, x)
21635 return true
21636 }
21637
21638
21639 for {
21640 if v_0.Op != OpLess16 {
21641 break
21642 }
21643 y := v_0.Args[1]
21644 x := v_0.Args[0]
21645 v.reset(OpLeq16)
21646 v.AddArg2(y, x)
21647 return true
21648 }
21649
21650
21651 for {
21652 if v_0.Op != OpLess8 {
21653 break
21654 }
21655 y := v_0.Args[1]
21656 x := v_0.Args[0]
21657 v.reset(OpLeq8)
21658 v.AddArg2(y, x)
21659 return true
21660 }
21661
21662
21663 for {
21664 if v_0.Op != OpLess64U {
21665 break
21666 }
21667 y := v_0.Args[1]
21668 x := v_0.Args[0]
21669 v.reset(OpLeq64U)
21670 v.AddArg2(y, x)
21671 return true
21672 }
21673
21674
21675 for {
21676 if v_0.Op != OpLess32U {
21677 break
21678 }
21679 y := v_0.Args[1]
21680 x := v_0.Args[0]
21681 v.reset(OpLeq32U)
21682 v.AddArg2(y, x)
21683 return true
21684 }
21685
21686
21687 for {
21688 if v_0.Op != OpLess16U {
21689 break
21690 }
21691 y := v_0.Args[1]
21692 x := v_0.Args[0]
21693 v.reset(OpLeq16U)
21694 v.AddArg2(y, x)
21695 return true
21696 }
21697
21698
21699 for {
21700 if v_0.Op != OpLess8U {
21701 break
21702 }
21703 y := v_0.Args[1]
21704 x := v_0.Args[0]
21705 v.reset(OpLeq8U)
21706 v.AddArg2(y, x)
21707 return true
21708 }
21709
21710
21711 for {
21712 if v_0.Op != OpLeq64 {
21713 break
21714 }
21715 y := v_0.Args[1]
21716 x := v_0.Args[0]
21717 v.reset(OpLess64)
21718 v.AddArg2(y, x)
21719 return true
21720 }
21721
21722
21723 for {
21724 if v_0.Op != OpLeq32 {
21725 break
21726 }
21727 y := v_0.Args[1]
21728 x := v_0.Args[0]
21729 v.reset(OpLess32)
21730 v.AddArg2(y, x)
21731 return true
21732 }
21733
21734
21735 for {
21736 if v_0.Op != OpLeq16 {
21737 break
21738 }
21739 y := v_0.Args[1]
21740 x := v_0.Args[0]
21741 v.reset(OpLess16)
21742 v.AddArg2(y, x)
21743 return true
21744 }
21745
21746
21747 for {
21748 if v_0.Op != OpLeq8 {
21749 break
21750 }
21751 y := v_0.Args[1]
21752 x := v_0.Args[0]
21753 v.reset(OpLess8)
21754 v.AddArg2(y, x)
21755 return true
21756 }
21757
21758
21759 for {
21760 if v_0.Op != OpLeq64U {
21761 break
21762 }
21763 y := v_0.Args[1]
21764 x := v_0.Args[0]
21765 v.reset(OpLess64U)
21766 v.AddArg2(y, x)
21767 return true
21768 }
21769
21770
21771 for {
21772 if v_0.Op != OpLeq32U {
21773 break
21774 }
21775 y := v_0.Args[1]
21776 x := v_0.Args[0]
21777 v.reset(OpLess32U)
21778 v.AddArg2(y, x)
21779 return true
21780 }
21781
21782
21783 for {
21784 if v_0.Op != OpLeq16U {
21785 break
21786 }
21787 y := v_0.Args[1]
21788 x := v_0.Args[0]
21789 v.reset(OpLess16U)
21790 v.AddArg2(y, x)
21791 return true
21792 }
21793
21794
21795 for {
21796 if v_0.Op != OpLeq8U {
21797 break
21798 }
21799 y := v_0.Args[1]
21800 x := v_0.Args[0]
21801 v.reset(OpLess8U)
21802 v.AddArg2(y, x)
21803 return true
21804 }
21805 return false
21806 }
21807 func rewriteValuegeneric_OpOffPtr(v *Value) bool {
21808 v_0 := v.Args[0]
21809
21810
21811 for {
21812 x := auxIntToInt64(v.AuxInt)
21813 if v_0.Op != OpOffPtr {
21814 break
21815 }
21816 y := auxIntToInt64(v_0.AuxInt)
21817 p := v_0.Args[0]
21818 v.reset(OpOffPtr)
21819 v.AuxInt = int64ToAuxInt(x + y)
21820 v.AddArg(p)
21821 return true
21822 }
21823
21824
21825
21826 for {
21827 if auxIntToInt64(v.AuxInt) != 0 {
21828 break
21829 }
21830 p := v_0
21831 if !(v.Type.Compare(p.Type) == types.CMPeq) {
21832 break
21833 }
21834 v.copyOf(p)
21835 return true
21836 }
21837 return false
21838 }
21839 func rewriteValuegeneric_OpOr16(v *Value) bool {
21840 v_1 := v.Args[1]
21841 v_0 := v.Args[0]
21842 b := v.Block
21843 config := b.Func.Config
21844
21845
21846 for {
21847 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
21848 if v_0.Op != OpConst16 {
21849 continue
21850 }
21851 c := auxIntToInt16(v_0.AuxInt)
21852 if v_1.Op != OpConst16 {
21853 continue
21854 }
21855 d := auxIntToInt16(v_1.AuxInt)
21856 v.reset(OpConst16)
21857 v.AuxInt = int16ToAuxInt(c | d)
21858 return true
21859 }
21860 break
21861 }
21862
21863
21864 for {
21865 t := v.Type
21866 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
21867 if v_0.Op != OpCom16 {
21868 continue
21869 }
21870 x := v_0.Args[0]
21871 if v_1.Op != OpCom16 {
21872 continue
21873 }
21874 y := v_1.Args[0]
21875 v.reset(OpCom16)
21876 v0 := b.NewValue0(v.Pos, OpAnd16, t)
21877 v0.AddArg2(x, y)
21878 v.AddArg(v0)
21879 return true
21880 }
21881 break
21882 }
21883
21884
21885 for {
21886 x := v_0
21887 if x != v_1 {
21888 break
21889 }
21890 v.copyOf(x)
21891 return true
21892 }
21893
21894
21895 for {
21896 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
21897 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 {
21898 continue
21899 }
21900 x := v_1
21901 v.copyOf(x)
21902 return true
21903 }
21904 break
21905 }
21906
21907
21908 for {
21909 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
21910 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != -1 {
21911 continue
21912 }
21913 v.reset(OpConst16)
21914 v.AuxInt = int16ToAuxInt(-1)
21915 return true
21916 }
21917 break
21918 }
21919
21920
21921 for {
21922 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
21923 if v_0.Op != OpCom16 {
21924 continue
21925 }
21926 x := v_0.Args[0]
21927 if x != v_1 {
21928 continue
21929 }
21930 v.reset(OpConst16)
21931 v.AuxInt = int16ToAuxInt(-1)
21932 return true
21933 }
21934 break
21935 }
21936
21937
21938 for {
21939 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
21940 x := v_0
21941 if v_1.Op != OpOr16 {
21942 continue
21943 }
21944 _ = v_1.Args[1]
21945 v_1_0 := v_1.Args[0]
21946 v_1_1 := v_1.Args[1]
21947 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
21948 if x != v_1_0 {
21949 continue
21950 }
21951 y := v_1_1
21952 v.reset(OpOr16)
21953 v.AddArg2(x, y)
21954 return true
21955 }
21956 }
21957 break
21958 }
21959
21960
21961
21962 for {
21963 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
21964 if v_0.Op != OpAnd16 {
21965 continue
21966 }
21967 _ = v_0.Args[1]
21968 v_0_0 := v_0.Args[0]
21969 v_0_1 := v_0.Args[1]
21970 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
21971 x := v_0_0
21972 if v_0_1.Op != OpConst16 {
21973 continue
21974 }
21975 c2 := auxIntToInt16(v_0_1.AuxInt)
21976 if v_1.Op != OpConst16 {
21977 continue
21978 }
21979 t := v_1.Type
21980 c1 := auxIntToInt16(v_1.AuxInt)
21981 if !(^(c1 | c2) == 0) {
21982 continue
21983 }
21984 v.reset(OpOr16)
21985 v0 := b.NewValue0(v.Pos, OpConst16, t)
21986 v0.AuxInt = int16ToAuxInt(c1)
21987 v.AddArg2(v0, x)
21988 return true
21989 }
21990 }
21991 break
21992 }
21993
21994
21995
21996 for {
21997 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
21998 if v_0.Op != OpOr16 {
21999 continue
22000 }
22001 _ = v_0.Args[1]
22002 v_0_0 := v_0.Args[0]
22003 v_0_1 := v_0.Args[1]
22004 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
22005 i := v_0_0
22006 if i.Op != OpConst16 {
22007 continue
22008 }
22009 t := i.Type
22010 z := v_0_1
22011 x := v_1
22012 if !(z.Op != OpConst16 && x.Op != OpConst16) {
22013 continue
22014 }
22015 v.reset(OpOr16)
22016 v0 := b.NewValue0(v.Pos, OpOr16, t)
22017 v0.AddArg2(z, x)
22018 v.AddArg2(i, v0)
22019 return true
22020 }
22021 }
22022 break
22023 }
22024
22025
22026 for {
22027 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22028 if v_0.Op != OpConst16 {
22029 continue
22030 }
22031 t := v_0.Type
22032 c := auxIntToInt16(v_0.AuxInt)
22033 if v_1.Op != OpOr16 {
22034 continue
22035 }
22036 _ = v_1.Args[1]
22037 v_1_0 := v_1.Args[0]
22038 v_1_1 := v_1.Args[1]
22039 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
22040 if v_1_0.Op != OpConst16 || v_1_0.Type != t {
22041 continue
22042 }
22043 d := auxIntToInt16(v_1_0.AuxInt)
22044 x := v_1_1
22045 v.reset(OpOr16)
22046 v0 := b.NewValue0(v.Pos, OpConst16, t)
22047 v0.AuxInt = int16ToAuxInt(c | d)
22048 v.AddArg2(v0, x)
22049 return true
22050 }
22051 }
22052 break
22053 }
22054
22055
22056
22057 for {
22058 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22059 if v_0.Op != OpLsh16x64 {
22060 continue
22061 }
22062 _ = v_0.Args[1]
22063 x := v_0.Args[0]
22064 z := v_0.Args[1]
22065 if z.Op != OpConst64 {
22066 continue
22067 }
22068 c := auxIntToInt64(z.AuxInt)
22069 if v_1.Op != OpRsh16Ux64 {
22070 continue
22071 }
22072 _ = v_1.Args[1]
22073 if x != v_1.Args[0] {
22074 continue
22075 }
22076 v_1_1 := v_1.Args[1]
22077 if v_1_1.Op != OpConst64 {
22078 continue
22079 }
22080 d := auxIntToInt64(v_1_1.AuxInt)
22081 if !(c < 16 && d == 16-c && canRotate(config, 16)) {
22082 continue
22083 }
22084 v.reset(OpRotateLeft16)
22085 v.AddArg2(x, z)
22086 return true
22087 }
22088 break
22089 }
22090
22091
22092
22093 for {
22094 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22095 left := v_0
22096 if left.Op != OpLsh16x64 {
22097 continue
22098 }
22099 y := left.Args[1]
22100 x := left.Args[0]
22101 right := v_1
22102 if right.Op != OpRsh16Ux64 {
22103 continue
22104 }
22105 _ = right.Args[1]
22106 if x != right.Args[0] {
22107 continue
22108 }
22109 right_1 := right.Args[1]
22110 if right_1.Op != OpSub64 {
22111 continue
22112 }
22113 _ = right_1.Args[1]
22114 right_1_0 := right_1.Args[0]
22115 if right_1_0.Op != OpConst64 || auxIntToInt64(right_1_0.AuxInt) != 16 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 16)) {
22116 continue
22117 }
22118 v.reset(OpRotateLeft16)
22119 v.AddArg2(x, y)
22120 return true
22121 }
22122 break
22123 }
22124
22125
22126
22127 for {
22128 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22129 left := v_0
22130 if left.Op != OpLsh16x32 {
22131 continue
22132 }
22133 y := left.Args[1]
22134 x := left.Args[0]
22135 right := v_1
22136 if right.Op != OpRsh16Ux32 {
22137 continue
22138 }
22139 _ = right.Args[1]
22140 if x != right.Args[0] {
22141 continue
22142 }
22143 right_1 := right.Args[1]
22144 if right_1.Op != OpSub32 {
22145 continue
22146 }
22147 _ = right_1.Args[1]
22148 right_1_0 := right_1.Args[0]
22149 if right_1_0.Op != OpConst32 || auxIntToInt32(right_1_0.AuxInt) != 16 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 16)) {
22150 continue
22151 }
22152 v.reset(OpRotateLeft16)
22153 v.AddArg2(x, y)
22154 return true
22155 }
22156 break
22157 }
22158
22159
22160
22161 for {
22162 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22163 left := v_0
22164 if left.Op != OpLsh16x16 {
22165 continue
22166 }
22167 y := left.Args[1]
22168 x := left.Args[0]
22169 right := v_1
22170 if right.Op != OpRsh16Ux16 {
22171 continue
22172 }
22173 _ = right.Args[1]
22174 if x != right.Args[0] {
22175 continue
22176 }
22177 right_1 := right.Args[1]
22178 if right_1.Op != OpSub16 {
22179 continue
22180 }
22181 _ = right_1.Args[1]
22182 right_1_0 := right_1.Args[0]
22183 if right_1_0.Op != OpConst16 || auxIntToInt16(right_1_0.AuxInt) != 16 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 16)) {
22184 continue
22185 }
22186 v.reset(OpRotateLeft16)
22187 v.AddArg2(x, y)
22188 return true
22189 }
22190 break
22191 }
22192
22193
22194
22195 for {
22196 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22197 left := v_0
22198 if left.Op != OpLsh16x8 {
22199 continue
22200 }
22201 y := left.Args[1]
22202 x := left.Args[0]
22203 right := v_1
22204 if right.Op != OpRsh16Ux8 {
22205 continue
22206 }
22207 _ = right.Args[1]
22208 if x != right.Args[0] {
22209 continue
22210 }
22211 right_1 := right.Args[1]
22212 if right_1.Op != OpSub8 {
22213 continue
22214 }
22215 _ = right_1.Args[1]
22216 right_1_0 := right_1.Args[0]
22217 if right_1_0.Op != OpConst8 || auxIntToInt8(right_1_0.AuxInt) != 16 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 16)) {
22218 continue
22219 }
22220 v.reset(OpRotateLeft16)
22221 v.AddArg2(x, y)
22222 return true
22223 }
22224 break
22225 }
22226
22227
22228
22229 for {
22230 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22231 right := v_0
22232 if right.Op != OpRsh16Ux64 {
22233 continue
22234 }
22235 y := right.Args[1]
22236 x := right.Args[0]
22237 left := v_1
22238 if left.Op != OpLsh16x64 {
22239 continue
22240 }
22241 _ = left.Args[1]
22242 if x != left.Args[0] {
22243 continue
22244 }
22245 z := left.Args[1]
22246 if z.Op != OpSub64 {
22247 continue
22248 }
22249 _ = z.Args[1]
22250 z_0 := z.Args[0]
22251 if z_0.Op != OpConst64 || auxIntToInt64(z_0.AuxInt) != 16 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 16)) {
22252 continue
22253 }
22254 v.reset(OpRotateLeft16)
22255 v.AddArg2(x, z)
22256 return true
22257 }
22258 break
22259 }
22260
22261
22262
22263 for {
22264 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22265 right := v_0
22266 if right.Op != OpRsh16Ux32 {
22267 continue
22268 }
22269 y := right.Args[1]
22270 x := right.Args[0]
22271 left := v_1
22272 if left.Op != OpLsh16x32 {
22273 continue
22274 }
22275 _ = left.Args[1]
22276 if x != left.Args[0] {
22277 continue
22278 }
22279 z := left.Args[1]
22280 if z.Op != OpSub32 {
22281 continue
22282 }
22283 _ = z.Args[1]
22284 z_0 := z.Args[0]
22285 if z_0.Op != OpConst32 || auxIntToInt32(z_0.AuxInt) != 16 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 16)) {
22286 continue
22287 }
22288 v.reset(OpRotateLeft16)
22289 v.AddArg2(x, z)
22290 return true
22291 }
22292 break
22293 }
22294
22295
22296
22297 for {
22298 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22299 right := v_0
22300 if right.Op != OpRsh16Ux16 {
22301 continue
22302 }
22303 y := right.Args[1]
22304 x := right.Args[0]
22305 left := v_1
22306 if left.Op != OpLsh16x16 {
22307 continue
22308 }
22309 _ = left.Args[1]
22310 if x != left.Args[0] {
22311 continue
22312 }
22313 z := left.Args[1]
22314 if z.Op != OpSub16 {
22315 continue
22316 }
22317 _ = z.Args[1]
22318 z_0 := z.Args[0]
22319 if z_0.Op != OpConst16 || auxIntToInt16(z_0.AuxInt) != 16 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 16)) {
22320 continue
22321 }
22322 v.reset(OpRotateLeft16)
22323 v.AddArg2(x, z)
22324 return true
22325 }
22326 break
22327 }
22328
22329
22330
22331 for {
22332 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22333 right := v_0
22334 if right.Op != OpRsh16Ux8 {
22335 continue
22336 }
22337 y := right.Args[1]
22338 x := right.Args[0]
22339 left := v_1
22340 if left.Op != OpLsh16x8 {
22341 continue
22342 }
22343 _ = left.Args[1]
22344 if x != left.Args[0] {
22345 continue
22346 }
22347 z := left.Args[1]
22348 if z.Op != OpSub8 {
22349 continue
22350 }
22351 _ = z.Args[1]
22352 z_0 := z.Args[0]
22353 if z_0.Op != OpConst8 || auxIntToInt8(z_0.AuxInt) != 16 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 16)) {
22354 continue
22355 }
22356 v.reset(OpRotateLeft16)
22357 v.AddArg2(x, z)
22358 return true
22359 }
22360 break
22361 }
22362 return false
22363 }
22364 func rewriteValuegeneric_OpOr32(v *Value) bool {
22365 v_1 := v.Args[1]
22366 v_0 := v.Args[0]
22367 b := v.Block
22368 config := b.Func.Config
22369
22370
22371 for {
22372 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22373 if v_0.Op != OpConst32 {
22374 continue
22375 }
22376 c := auxIntToInt32(v_0.AuxInt)
22377 if v_1.Op != OpConst32 {
22378 continue
22379 }
22380 d := auxIntToInt32(v_1.AuxInt)
22381 v.reset(OpConst32)
22382 v.AuxInt = int32ToAuxInt(c | d)
22383 return true
22384 }
22385 break
22386 }
22387
22388
22389 for {
22390 t := v.Type
22391 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22392 if v_0.Op != OpCom32 {
22393 continue
22394 }
22395 x := v_0.Args[0]
22396 if v_1.Op != OpCom32 {
22397 continue
22398 }
22399 y := v_1.Args[0]
22400 v.reset(OpCom32)
22401 v0 := b.NewValue0(v.Pos, OpAnd32, t)
22402 v0.AddArg2(x, y)
22403 v.AddArg(v0)
22404 return true
22405 }
22406 break
22407 }
22408
22409
22410 for {
22411 x := v_0
22412 if x != v_1 {
22413 break
22414 }
22415 v.copyOf(x)
22416 return true
22417 }
22418
22419
22420 for {
22421 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22422 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
22423 continue
22424 }
22425 x := v_1
22426 v.copyOf(x)
22427 return true
22428 }
22429 break
22430 }
22431
22432
22433 for {
22434 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22435 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != -1 {
22436 continue
22437 }
22438 v.reset(OpConst32)
22439 v.AuxInt = int32ToAuxInt(-1)
22440 return true
22441 }
22442 break
22443 }
22444
22445
22446 for {
22447 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22448 if v_0.Op != OpCom32 {
22449 continue
22450 }
22451 x := v_0.Args[0]
22452 if x != v_1 {
22453 continue
22454 }
22455 v.reset(OpConst32)
22456 v.AuxInt = int32ToAuxInt(-1)
22457 return true
22458 }
22459 break
22460 }
22461
22462
22463 for {
22464 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22465 x := v_0
22466 if v_1.Op != OpOr32 {
22467 continue
22468 }
22469 _ = v_1.Args[1]
22470 v_1_0 := v_1.Args[0]
22471 v_1_1 := v_1.Args[1]
22472 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
22473 if x != v_1_0 {
22474 continue
22475 }
22476 y := v_1_1
22477 v.reset(OpOr32)
22478 v.AddArg2(x, y)
22479 return true
22480 }
22481 }
22482 break
22483 }
22484
22485
22486
22487 for {
22488 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22489 if v_0.Op != OpAnd32 {
22490 continue
22491 }
22492 _ = v_0.Args[1]
22493 v_0_0 := v_0.Args[0]
22494 v_0_1 := v_0.Args[1]
22495 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
22496 x := v_0_0
22497 if v_0_1.Op != OpConst32 {
22498 continue
22499 }
22500 c2 := auxIntToInt32(v_0_1.AuxInt)
22501 if v_1.Op != OpConst32 {
22502 continue
22503 }
22504 t := v_1.Type
22505 c1 := auxIntToInt32(v_1.AuxInt)
22506 if !(^(c1 | c2) == 0) {
22507 continue
22508 }
22509 v.reset(OpOr32)
22510 v0 := b.NewValue0(v.Pos, OpConst32, t)
22511 v0.AuxInt = int32ToAuxInt(c1)
22512 v.AddArg2(v0, x)
22513 return true
22514 }
22515 }
22516 break
22517 }
22518
22519
22520
22521 for {
22522 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22523 if v_0.Op != OpOr32 {
22524 continue
22525 }
22526 _ = v_0.Args[1]
22527 v_0_0 := v_0.Args[0]
22528 v_0_1 := v_0.Args[1]
22529 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
22530 i := v_0_0
22531 if i.Op != OpConst32 {
22532 continue
22533 }
22534 t := i.Type
22535 z := v_0_1
22536 x := v_1
22537 if !(z.Op != OpConst32 && x.Op != OpConst32) {
22538 continue
22539 }
22540 v.reset(OpOr32)
22541 v0 := b.NewValue0(v.Pos, OpOr32, t)
22542 v0.AddArg2(z, x)
22543 v.AddArg2(i, v0)
22544 return true
22545 }
22546 }
22547 break
22548 }
22549
22550
22551 for {
22552 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22553 if v_0.Op != OpConst32 {
22554 continue
22555 }
22556 t := v_0.Type
22557 c := auxIntToInt32(v_0.AuxInt)
22558 if v_1.Op != OpOr32 {
22559 continue
22560 }
22561 _ = v_1.Args[1]
22562 v_1_0 := v_1.Args[0]
22563 v_1_1 := v_1.Args[1]
22564 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
22565 if v_1_0.Op != OpConst32 || v_1_0.Type != t {
22566 continue
22567 }
22568 d := auxIntToInt32(v_1_0.AuxInt)
22569 x := v_1_1
22570 v.reset(OpOr32)
22571 v0 := b.NewValue0(v.Pos, OpConst32, t)
22572 v0.AuxInt = int32ToAuxInt(c | d)
22573 v.AddArg2(v0, x)
22574 return true
22575 }
22576 }
22577 break
22578 }
22579
22580
22581
22582 for {
22583 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22584 if v_0.Op != OpLsh32x64 {
22585 continue
22586 }
22587 _ = v_0.Args[1]
22588 x := v_0.Args[0]
22589 z := v_0.Args[1]
22590 if z.Op != OpConst64 {
22591 continue
22592 }
22593 c := auxIntToInt64(z.AuxInt)
22594 if v_1.Op != OpRsh32Ux64 {
22595 continue
22596 }
22597 _ = v_1.Args[1]
22598 if x != v_1.Args[0] {
22599 continue
22600 }
22601 v_1_1 := v_1.Args[1]
22602 if v_1_1.Op != OpConst64 {
22603 continue
22604 }
22605 d := auxIntToInt64(v_1_1.AuxInt)
22606 if !(c < 32 && d == 32-c && canRotate(config, 32)) {
22607 continue
22608 }
22609 v.reset(OpRotateLeft32)
22610 v.AddArg2(x, z)
22611 return true
22612 }
22613 break
22614 }
22615
22616
22617
22618 for {
22619 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22620 left := v_0
22621 if left.Op != OpLsh32x64 {
22622 continue
22623 }
22624 y := left.Args[1]
22625 x := left.Args[0]
22626 right := v_1
22627 if right.Op != OpRsh32Ux64 {
22628 continue
22629 }
22630 _ = right.Args[1]
22631 if x != right.Args[0] {
22632 continue
22633 }
22634 right_1 := right.Args[1]
22635 if right_1.Op != OpSub64 {
22636 continue
22637 }
22638 _ = right_1.Args[1]
22639 right_1_0 := right_1.Args[0]
22640 if right_1_0.Op != OpConst64 || auxIntToInt64(right_1_0.AuxInt) != 32 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 32)) {
22641 continue
22642 }
22643 v.reset(OpRotateLeft32)
22644 v.AddArg2(x, y)
22645 return true
22646 }
22647 break
22648 }
22649
22650
22651
22652 for {
22653 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22654 left := v_0
22655 if left.Op != OpLsh32x32 {
22656 continue
22657 }
22658 y := left.Args[1]
22659 x := left.Args[0]
22660 right := v_1
22661 if right.Op != OpRsh32Ux32 {
22662 continue
22663 }
22664 _ = right.Args[1]
22665 if x != right.Args[0] {
22666 continue
22667 }
22668 right_1 := right.Args[1]
22669 if right_1.Op != OpSub32 {
22670 continue
22671 }
22672 _ = right_1.Args[1]
22673 right_1_0 := right_1.Args[0]
22674 if right_1_0.Op != OpConst32 || auxIntToInt32(right_1_0.AuxInt) != 32 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 32)) {
22675 continue
22676 }
22677 v.reset(OpRotateLeft32)
22678 v.AddArg2(x, y)
22679 return true
22680 }
22681 break
22682 }
22683
22684
22685
22686 for {
22687 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22688 left := v_0
22689 if left.Op != OpLsh32x16 {
22690 continue
22691 }
22692 y := left.Args[1]
22693 x := left.Args[0]
22694 right := v_1
22695 if right.Op != OpRsh32Ux16 {
22696 continue
22697 }
22698 _ = right.Args[1]
22699 if x != right.Args[0] {
22700 continue
22701 }
22702 right_1 := right.Args[1]
22703 if right_1.Op != OpSub16 {
22704 continue
22705 }
22706 _ = right_1.Args[1]
22707 right_1_0 := right_1.Args[0]
22708 if right_1_0.Op != OpConst16 || auxIntToInt16(right_1_0.AuxInt) != 32 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 32)) {
22709 continue
22710 }
22711 v.reset(OpRotateLeft32)
22712 v.AddArg2(x, y)
22713 return true
22714 }
22715 break
22716 }
22717
22718
22719
22720 for {
22721 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22722 left := v_0
22723 if left.Op != OpLsh32x8 {
22724 continue
22725 }
22726 y := left.Args[1]
22727 x := left.Args[0]
22728 right := v_1
22729 if right.Op != OpRsh32Ux8 {
22730 continue
22731 }
22732 _ = right.Args[1]
22733 if x != right.Args[0] {
22734 continue
22735 }
22736 right_1 := right.Args[1]
22737 if right_1.Op != OpSub8 {
22738 continue
22739 }
22740 _ = right_1.Args[1]
22741 right_1_0 := right_1.Args[0]
22742 if right_1_0.Op != OpConst8 || auxIntToInt8(right_1_0.AuxInt) != 32 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 32)) {
22743 continue
22744 }
22745 v.reset(OpRotateLeft32)
22746 v.AddArg2(x, y)
22747 return true
22748 }
22749 break
22750 }
22751
22752
22753
22754 for {
22755 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22756 right := v_0
22757 if right.Op != OpRsh32Ux64 {
22758 continue
22759 }
22760 y := right.Args[1]
22761 x := right.Args[0]
22762 left := v_1
22763 if left.Op != OpLsh32x64 {
22764 continue
22765 }
22766 _ = left.Args[1]
22767 if x != left.Args[0] {
22768 continue
22769 }
22770 z := left.Args[1]
22771 if z.Op != OpSub64 {
22772 continue
22773 }
22774 _ = z.Args[1]
22775 z_0 := z.Args[0]
22776 if z_0.Op != OpConst64 || auxIntToInt64(z_0.AuxInt) != 32 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 32)) {
22777 continue
22778 }
22779 v.reset(OpRotateLeft32)
22780 v.AddArg2(x, z)
22781 return true
22782 }
22783 break
22784 }
22785
22786
22787
22788 for {
22789 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22790 right := v_0
22791 if right.Op != OpRsh32Ux32 {
22792 continue
22793 }
22794 y := right.Args[1]
22795 x := right.Args[0]
22796 left := v_1
22797 if left.Op != OpLsh32x32 {
22798 continue
22799 }
22800 _ = left.Args[1]
22801 if x != left.Args[0] {
22802 continue
22803 }
22804 z := left.Args[1]
22805 if z.Op != OpSub32 {
22806 continue
22807 }
22808 _ = z.Args[1]
22809 z_0 := z.Args[0]
22810 if z_0.Op != OpConst32 || auxIntToInt32(z_0.AuxInt) != 32 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 32)) {
22811 continue
22812 }
22813 v.reset(OpRotateLeft32)
22814 v.AddArg2(x, z)
22815 return true
22816 }
22817 break
22818 }
22819
22820
22821
22822 for {
22823 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22824 right := v_0
22825 if right.Op != OpRsh32Ux16 {
22826 continue
22827 }
22828 y := right.Args[1]
22829 x := right.Args[0]
22830 left := v_1
22831 if left.Op != OpLsh32x16 {
22832 continue
22833 }
22834 _ = left.Args[1]
22835 if x != left.Args[0] {
22836 continue
22837 }
22838 z := left.Args[1]
22839 if z.Op != OpSub16 {
22840 continue
22841 }
22842 _ = z.Args[1]
22843 z_0 := z.Args[0]
22844 if z_0.Op != OpConst16 || auxIntToInt16(z_0.AuxInt) != 32 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 32)) {
22845 continue
22846 }
22847 v.reset(OpRotateLeft32)
22848 v.AddArg2(x, z)
22849 return true
22850 }
22851 break
22852 }
22853
22854
22855
22856 for {
22857 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22858 right := v_0
22859 if right.Op != OpRsh32Ux8 {
22860 continue
22861 }
22862 y := right.Args[1]
22863 x := right.Args[0]
22864 left := v_1
22865 if left.Op != OpLsh32x8 {
22866 continue
22867 }
22868 _ = left.Args[1]
22869 if x != left.Args[0] {
22870 continue
22871 }
22872 z := left.Args[1]
22873 if z.Op != OpSub8 {
22874 continue
22875 }
22876 _ = z.Args[1]
22877 z_0 := z.Args[0]
22878 if z_0.Op != OpConst8 || auxIntToInt8(z_0.AuxInt) != 32 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 32)) {
22879 continue
22880 }
22881 v.reset(OpRotateLeft32)
22882 v.AddArg2(x, z)
22883 return true
22884 }
22885 break
22886 }
22887 return false
22888 }
22889 func rewriteValuegeneric_OpOr64(v *Value) bool {
22890 v_1 := v.Args[1]
22891 v_0 := v.Args[0]
22892 b := v.Block
22893 config := b.Func.Config
22894
22895
22896 for {
22897 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22898 if v_0.Op != OpConst64 {
22899 continue
22900 }
22901 c := auxIntToInt64(v_0.AuxInt)
22902 if v_1.Op != OpConst64 {
22903 continue
22904 }
22905 d := auxIntToInt64(v_1.AuxInt)
22906 v.reset(OpConst64)
22907 v.AuxInt = int64ToAuxInt(c | d)
22908 return true
22909 }
22910 break
22911 }
22912
22913
22914 for {
22915 t := v.Type
22916 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22917 if v_0.Op != OpCom64 {
22918 continue
22919 }
22920 x := v_0.Args[0]
22921 if v_1.Op != OpCom64 {
22922 continue
22923 }
22924 y := v_1.Args[0]
22925 v.reset(OpCom64)
22926 v0 := b.NewValue0(v.Pos, OpAnd64, t)
22927 v0.AddArg2(x, y)
22928 v.AddArg(v0)
22929 return true
22930 }
22931 break
22932 }
22933
22934
22935 for {
22936 x := v_0
22937 if x != v_1 {
22938 break
22939 }
22940 v.copyOf(x)
22941 return true
22942 }
22943
22944
22945 for {
22946 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22947 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
22948 continue
22949 }
22950 x := v_1
22951 v.copyOf(x)
22952 return true
22953 }
22954 break
22955 }
22956
22957
22958 for {
22959 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22960 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != -1 {
22961 continue
22962 }
22963 v.reset(OpConst64)
22964 v.AuxInt = int64ToAuxInt(-1)
22965 return true
22966 }
22967 break
22968 }
22969
22970
22971 for {
22972 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22973 if v_0.Op != OpCom64 {
22974 continue
22975 }
22976 x := v_0.Args[0]
22977 if x != v_1 {
22978 continue
22979 }
22980 v.reset(OpConst64)
22981 v.AuxInt = int64ToAuxInt(-1)
22982 return true
22983 }
22984 break
22985 }
22986
22987
22988 for {
22989 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
22990 x := v_0
22991 if v_1.Op != OpOr64 {
22992 continue
22993 }
22994 _ = v_1.Args[1]
22995 v_1_0 := v_1.Args[0]
22996 v_1_1 := v_1.Args[1]
22997 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
22998 if x != v_1_0 {
22999 continue
23000 }
23001 y := v_1_1
23002 v.reset(OpOr64)
23003 v.AddArg2(x, y)
23004 return true
23005 }
23006 }
23007 break
23008 }
23009
23010
23011
23012 for {
23013 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23014 if v_0.Op != OpAnd64 {
23015 continue
23016 }
23017 _ = v_0.Args[1]
23018 v_0_0 := v_0.Args[0]
23019 v_0_1 := v_0.Args[1]
23020 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
23021 x := v_0_0
23022 if v_0_1.Op != OpConst64 {
23023 continue
23024 }
23025 c2 := auxIntToInt64(v_0_1.AuxInt)
23026 if v_1.Op != OpConst64 {
23027 continue
23028 }
23029 t := v_1.Type
23030 c1 := auxIntToInt64(v_1.AuxInt)
23031 if !(^(c1 | c2) == 0) {
23032 continue
23033 }
23034 v.reset(OpOr64)
23035 v0 := b.NewValue0(v.Pos, OpConst64, t)
23036 v0.AuxInt = int64ToAuxInt(c1)
23037 v.AddArg2(v0, x)
23038 return true
23039 }
23040 }
23041 break
23042 }
23043
23044
23045
23046 for {
23047 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23048 if v_0.Op != OpOr64 {
23049 continue
23050 }
23051 _ = v_0.Args[1]
23052 v_0_0 := v_0.Args[0]
23053 v_0_1 := v_0.Args[1]
23054 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
23055 i := v_0_0
23056 if i.Op != OpConst64 {
23057 continue
23058 }
23059 t := i.Type
23060 z := v_0_1
23061 x := v_1
23062 if !(z.Op != OpConst64 && x.Op != OpConst64) {
23063 continue
23064 }
23065 v.reset(OpOr64)
23066 v0 := b.NewValue0(v.Pos, OpOr64, t)
23067 v0.AddArg2(z, x)
23068 v.AddArg2(i, v0)
23069 return true
23070 }
23071 }
23072 break
23073 }
23074
23075
23076 for {
23077 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23078 if v_0.Op != OpConst64 {
23079 continue
23080 }
23081 t := v_0.Type
23082 c := auxIntToInt64(v_0.AuxInt)
23083 if v_1.Op != OpOr64 {
23084 continue
23085 }
23086 _ = v_1.Args[1]
23087 v_1_0 := v_1.Args[0]
23088 v_1_1 := v_1.Args[1]
23089 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
23090 if v_1_0.Op != OpConst64 || v_1_0.Type != t {
23091 continue
23092 }
23093 d := auxIntToInt64(v_1_0.AuxInt)
23094 x := v_1_1
23095 v.reset(OpOr64)
23096 v0 := b.NewValue0(v.Pos, OpConst64, t)
23097 v0.AuxInt = int64ToAuxInt(c | d)
23098 v.AddArg2(v0, x)
23099 return true
23100 }
23101 }
23102 break
23103 }
23104
23105
23106
23107 for {
23108 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23109 if v_0.Op != OpLsh64x64 {
23110 continue
23111 }
23112 _ = v_0.Args[1]
23113 x := v_0.Args[0]
23114 z := v_0.Args[1]
23115 if z.Op != OpConst64 {
23116 continue
23117 }
23118 c := auxIntToInt64(z.AuxInt)
23119 if v_1.Op != OpRsh64Ux64 {
23120 continue
23121 }
23122 _ = v_1.Args[1]
23123 if x != v_1.Args[0] {
23124 continue
23125 }
23126 v_1_1 := v_1.Args[1]
23127 if v_1_1.Op != OpConst64 {
23128 continue
23129 }
23130 d := auxIntToInt64(v_1_1.AuxInt)
23131 if !(c < 64 && d == 64-c && canRotate(config, 64)) {
23132 continue
23133 }
23134 v.reset(OpRotateLeft64)
23135 v.AddArg2(x, z)
23136 return true
23137 }
23138 break
23139 }
23140
23141
23142
23143 for {
23144 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23145 left := v_0
23146 if left.Op != OpLsh64x64 {
23147 continue
23148 }
23149 y := left.Args[1]
23150 x := left.Args[0]
23151 right := v_1
23152 if right.Op != OpRsh64Ux64 {
23153 continue
23154 }
23155 _ = right.Args[1]
23156 if x != right.Args[0] {
23157 continue
23158 }
23159 right_1 := right.Args[1]
23160 if right_1.Op != OpSub64 {
23161 continue
23162 }
23163 _ = right_1.Args[1]
23164 right_1_0 := right_1.Args[0]
23165 if right_1_0.Op != OpConst64 || auxIntToInt64(right_1_0.AuxInt) != 64 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 64)) {
23166 continue
23167 }
23168 v.reset(OpRotateLeft64)
23169 v.AddArg2(x, y)
23170 return true
23171 }
23172 break
23173 }
23174
23175
23176
23177 for {
23178 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23179 left := v_0
23180 if left.Op != OpLsh64x32 {
23181 continue
23182 }
23183 y := left.Args[1]
23184 x := left.Args[0]
23185 right := v_1
23186 if right.Op != OpRsh64Ux32 {
23187 continue
23188 }
23189 _ = right.Args[1]
23190 if x != right.Args[0] {
23191 continue
23192 }
23193 right_1 := right.Args[1]
23194 if right_1.Op != OpSub32 {
23195 continue
23196 }
23197 _ = right_1.Args[1]
23198 right_1_0 := right_1.Args[0]
23199 if right_1_0.Op != OpConst32 || auxIntToInt32(right_1_0.AuxInt) != 64 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 64)) {
23200 continue
23201 }
23202 v.reset(OpRotateLeft64)
23203 v.AddArg2(x, y)
23204 return true
23205 }
23206 break
23207 }
23208
23209
23210
23211 for {
23212 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23213 left := v_0
23214 if left.Op != OpLsh64x16 {
23215 continue
23216 }
23217 y := left.Args[1]
23218 x := left.Args[0]
23219 right := v_1
23220 if right.Op != OpRsh64Ux16 {
23221 continue
23222 }
23223 _ = right.Args[1]
23224 if x != right.Args[0] {
23225 continue
23226 }
23227 right_1 := right.Args[1]
23228 if right_1.Op != OpSub16 {
23229 continue
23230 }
23231 _ = right_1.Args[1]
23232 right_1_0 := right_1.Args[0]
23233 if right_1_0.Op != OpConst16 || auxIntToInt16(right_1_0.AuxInt) != 64 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 64)) {
23234 continue
23235 }
23236 v.reset(OpRotateLeft64)
23237 v.AddArg2(x, y)
23238 return true
23239 }
23240 break
23241 }
23242
23243
23244
23245 for {
23246 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23247 left := v_0
23248 if left.Op != OpLsh64x8 {
23249 continue
23250 }
23251 y := left.Args[1]
23252 x := left.Args[0]
23253 right := v_1
23254 if right.Op != OpRsh64Ux8 {
23255 continue
23256 }
23257 _ = right.Args[1]
23258 if x != right.Args[0] {
23259 continue
23260 }
23261 right_1 := right.Args[1]
23262 if right_1.Op != OpSub8 {
23263 continue
23264 }
23265 _ = right_1.Args[1]
23266 right_1_0 := right_1.Args[0]
23267 if right_1_0.Op != OpConst8 || auxIntToInt8(right_1_0.AuxInt) != 64 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 64)) {
23268 continue
23269 }
23270 v.reset(OpRotateLeft64)
23271 v.AddArg2(x, y)
23272 return true
23273 }
23274 break
23275 }
23276
23277
23278
23279 for {
23280 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23281 right := v_0
23282 if right.Op != OpRsh64Ux64 {
23283 continue
23284 }
23285 y := right.Args[1]
23286 x := right.Args[0]
23287 left := v_1
23288 if left.Op != OpLsh64x64 {
23289 continue
23290 }
23291 _ = left.Args[1]
23292 if x != left.Args[0] {
23293 continue
23294 }
23295 z := left.Args[1]
23296 if z.Op != OpSub64 {
23297 continue
23298 }
23299 _ = z.Args[1]
23300 z_0 := z.Args[0]
23301 if z_0.Op != OpConst64 || auxIntToInt64(z_0.AuxInt) != 64 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 64)) {
23302 continue
23303 }
23304 v.reset(OpRotateLeft64)
23305 v.AddArg2(x, z)
23306 return true
23307 }
23308 break
23309 }
23310
23311
23312
23313 for {
23314 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23315 right := v_0
23316 if right.Op != OpRsh64Ux32 {
23317 continue
23318 }
23319 y := right.Args[1]
23320 x := right.Args[0]
23321 left := v_1
23322 if left.Op != OpLsh64x32 {
23323 continue
23324 }
23325 _ = left.Args[1]
23326 if x != left.Args[0] {
23327 continue
23328 }
23329 z := left.Args[1]
23330 if z.Op != OpSub32 {
23331 continue
23332 }
23333 _ = z.Args[1]
23334 z_0 := z.Args[0]
23335 if z_0.Op != OpConst32 || auxIntToInt32(z_0.AuxInt) != 64 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 64)) {
23336 continue
23337 }
23338 v.reset(OpRotateLeft64)
23339 v.AddArg2(x, z)
23340 return true
23341 }
23342 break
23343 }
23344
23345
23346
23347 for {
23348 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23349 right := v_0
23350 if right.Op != OpRsh64Ux16 {
23351 continue
23352 }
23353 y := right.Args[1]
23354 x := right.Args[0]
23355 left := v_1
23356 if left.Op != OpLsh64x16 {
23357 continue
23358 }
23359 _ = left.Args[1]
23360 if x != left.Args[0] {
23361 continue
23362 }
23363 z := left.Args[1]
23364 if z.Op != OpSub16 {
23365 continue
23366 }
23367 _ = z.Args[1]
23368 z_0 := z.Args[0]
23369 if z_0.Op != OpConst16 || auxIntToInt16(z_0.AuxInt) != 64 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 64)) {
23370 continue
23371 }
23372 v.reset(OpRotateLeft64)
23373 v.AddArg2(x, z)
23374 return true
23375 }
23376 break
23377 }
23378
23379
23380
23381 for {
23382 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23383 right := v_0
23384 if right.Op != OpRsh64Ux8 {
23385 continue
23386 }
23387 y := right.Args[1]
23388 x := right.Args[0]
23389 left := v_1
23390 if left.Op != OpLsh64x8 {
23391 continue
23392 }
23393 _ = left.Args[1]
23394 if x != left.Args[0] {
23395 continue
23396 }
23397 z := left.Args[1]
23398 if z.Op != OpSub8 {
23399 continue
23400 }
23401 _ = z.Args[1]
23402 z_0 := z.Args[0]
23403 if z_0.Op != OpConst8 || auxIntToInt8(z_0.AuxInt) != 64 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 64)) {
23404 continue
23405 }
23406 v.reset(OpRotateLeft64)
23407 v.AddArg2(x, z)
23408 return true
23409 }
23410 break
23411 }
23412 return false
23413 }
23414 func rewriteValuegeneric_OpOr8(v *Value) bool {
23415 v_1 := v.Args[1]
23416 v_0 := v.Args[0]
23417 b := v.Block
23418 config := b.Func.Config
23419
23420
23421 for {
23422 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23423 if v_0.Op != OpConst8 {
23424 continue
23425 }
23426 c := auxIntToInt8(v_0.AuxInt)
23427 if v_1.Op != OpConst8 {
23428 continue
23429 }
23430 d := auxIntToInt8(v_1.AuxInt)
23431 v.reset(OpConst8)
23432 v.AuxInt = int8ToAuxInt(c | d)
23433 return true
23434 }
23435 break
23436 }
23437
23438
23439 for {
23440 t := v.Type
23441 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23442 if v_0.Op != OpCom8 {
23443 continue
23444 }
23445 x := v_0.Args[0]
23446 if v_1.Op != OpCom8 {
23447 continue
23448 }
23449 y := v_1.Args[0]
23450 v.reset(OpCom8)
23451 v0 := b.NewValue0(v.Pos, OpAnd8, t)
23452 v0.AddArg2(x, y)
23453 v.AddArg(v0)
23454 return true
23455 }
23456 break
23457 }
23458
23459
23460 for {
23461 x := v_0
23462 if x != v_1 {
23463 break
23464 }
23465 v.copyOf(x)
23466 return true
23467 }
23468
23469
23470 for {
23471 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23472 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 {
23473 continue
23474 }
23475 x := v_1
23476 v.copyOf(x)
23477 return true
23478 }
23479 break
23480 }
23481
23482
23483 for {
23484 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23485 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != -1 {
23486 continue
23487 }
23488 v.reset(OpConst8)
23489 v.AuxInt = int8ToAuxInt(-1)
23490 return true
23491 }
23492 break
23493 }
23494
23495
23496 for {
23497 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23498 if v_0.Op != OpCom8 {
23499 continue
23500 }
23501 x := v_0.Args[0]
23502 if x != v_1 {
23503 continue
23504 }
23505 v.reset(OpConst8)
23506 v.AuxInt = int8ToAuxInt(-1)
23507 return true
23508 }
23509 break
23510 }
23511
23512
23513 for {
23514 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23515 x := v_0
23516 if v_1.Op != OpOr8 {
23517 continue
23518 }
23519 _ = v_1.Args[1]
23520 v_1_0 := v_1.Args[0]
23521 v_1_1 := v_1.Args[1]
23522 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
23523 if x != v_1_0 {
23524 continue
23525 }
23526 y := v_1_1
23527 v.reset(OpOr8)
23528 v.AddArg2(x, y)
23529 return true
23530 }
23531 }
23532 break
23533 }
23534
23535
23536
23537 for {
23538 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23539 if v_0.Op != OpAnd8 {
23540 continue
23541 }
23542 _ = v_0.Args[1]
23543 v_0_0 := v_0.Args[0]
23544 v_0_1 := v_0.Args[1]
23545 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
23546 x := v_0_0
23547 if v_0_1.Op != OpConst8 {
23548 continue
23549 }
23550 c2 := auxIntToInt8(v_0_1.AuxInt)
23551 if v_1.Op != OpConst8 {
23552 continue
23553 }
23554 t := v_1.Type
23555 c1 := auxIntToInt8(v_1.AuxInt)
23556 if !(^(c1 | c2) == 0) {
23557 continue
23558 }
23559 v.reset(OpOr8)
23560 v0 := b.NewValue0(v.Pos, OpConst8, t)
23561 v0.AuxInt = int8ToAuxInt(c1)
23562 v.AddArg2(v0, x)
23563 return true
23564 }
23565 }
23566 break
23567 }
23568
23569
23570
23571 for {
23572 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23573 if v_0.Op != OpOr8 {
23574 continue
23575 }
23576 _ = v_0.Args[1]
23577 v_0_0 := v_0.Args[0]
23578 v_0_1 := v_0.Args[1]
23579 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
23580 i := v_0_0
23581 if i.Op != OpConst8 {
23582 continue
23583 }
23584 t := i.Type
23585 z := v_0_1
23586 x := v_1
23587 if !(z.Op != OpConst8 && x.Op != OpConst8) {
23588 continue
23589 }
23590 v.reset(OpOr8)
23591 v0 := b.NewValue0(v.Pos, OpOr8, t)
23592 v0.AddArg2(z, x)
23593 v.AddArg2(i, v0)
23594 return true
23595 }
23596 }
23597 break
23598 }
23599
23600
23601 for {
23602 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23603 if v_0.Op != OpConst8 {
23604 continue
23605 }
23606 t := v_0.Type
23607 c := auxIntToInt8(v_0.AuxInt)
23608 if v_1.Op != OpOr8 {
23609 continue
23610 }
23611 _ = v_1.Args[1]
23612 v_1_0 := v_1.Args[0]
23613 v_1_1 := v_1.Args[1]
23614 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
23615 if v_1_0.Op != OpConst8 || v_1_0.Type != t {
23616 continue
23617 }
23618 d := auxIntToInt8(v_1_0.AuxInt)
23619 x := v_1_1
23620 v.reset(OpOr8)
23621 v0 := b.NewValue0(v.Pos, OpConst8, t)
23622 v0.AuxInt = int8ToAuxInt(c | d)
23623 v.AddArg2(v0, x)
23624 return true
23625 }
23626 }
23627 break
23628 }
23629
23630
23631
23632 for {
23633 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23634 if v_0.Op != OpLsh8x64 {
23635 continue
23636 }
23637 _ = v_0.Args[1]
23638 x := v_0.Args[0]
23639 z := v_0.Args[1]
23640 if z.Op != OpConst64 {
23641 continue
23642 }
23643 c := auxIntToInt64(z.AuxInt)
23644 if v_1.Op != OpRsh8Ux64 {
23645 continue
23646 }
23647 _ = v_1.Args[1]
23648 if x != v_1.Args[0] {
23649 continue
23650 }
23651 v_1_1 := v_1.Args[1]
23652 if v_1_1.Op != OpConst64 {
23653 continue
23654 }
23655 d := auxIntToInt64(v_1_1.AuxInt)
23656 if !(c < 8 && d == 8-c && canRotate(config, 8)) {
23657 continue
23658 }
23659 v.reset(OpRotateLeft8)
23660 v.AddArg2(x, z)
23661 return true
23662 }
23663 break
23664 }
23665
23666
23667
23668 for {
23669 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23670 left := v_0
23671 if left.Op != OpLsh8x64 {
23672 continue
23673 }
23674 y := left.Args[1]
23675 x := left.Args[0]
23676 right := v_1
23677 if right.Op != OpRsh8Ux64 {
23678 continue
23679 }
23680 _ = right.Args[1]
23681 if x != right.Args[0] {
23682 continue
23683 }
23684 right_1 := right.Args[1]
23685 if right_1.Op != OpSub64 {
23686 continue
23687 }
23688 _ = right_1.Args[1]
23689 right_1_0 := right_1.Args[0]
23690 if right_1_0.Op != OpConst64 || auxIntToInt64(right_1_0.AuxInt) != 8 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 8)) {
23691 continue
23692 }
23693 v.reset(OpRotateLeft8)
23694 v.AddArg2(x, y)
23695 return true
23696 }
23697 break
23698 }
23699
23700
23701
23702 for {
23703 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23704 left := v_0
23705 if left.Op != OpLsh8x32 {
23706 continue
23707 }
23708 y := left.Args[1]
23709 x := left.Args[0]
23710 right := v_1
23711 if right.Op != OpRsh8Ux32 {
23712 continue
23713 }
23714 _ = right.Args[1]
23715 if x != right.Args[0] {
23716 continue
23717 }
23718 right_1 := right.Args[1]
23719 if right_1.Op != OpSub32 {
23720 continue
23721 }
23722 _ = right_1.Args[1]
23723 right_1_0 := right_1.Args[0]
23724 if right_1_0.Op != OpConst32 || auxIntToInt32(right_1_0.AuxInt) != 8 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 8)) {
23725 continue
23726 }
23727 v.reset(OpRotateLeft8)
23728 v.AddArg2(x, y)
23729 return true
23730 }
23731 break
23732 }
23733
23734
23735
23736 for {
23737 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23738 left := v_0
23739 if left.Op != OpLsh8x16 {
23740 continue
23741 }
23742 y := left.Args[1]
23743 x := left.Args[0]
23744 right := v_1
23745 if right.Op != OpRsh8Ux16 {
23746 continue
23747 }
23748 _ = right.Args[1]
23749 if x != right.Args[0] {
23750 continue
23751 }
23752 right_1 := right.Args[1]
23753 if right_1.Op != OpSub16 {
23754 continue
23755 }
23756 _ = right_1.Args[1]
23757 right_1_0 := right_1.Args[0]
23758 if right_1_0.Op != OpConst16 || auxIntToInt16(right_1_0.AuxInt) != 8 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 8)) {
23759 continue
23760 }
23761 v.reset(OpRotateLeft8)
23762 v.AddArg2(x, y)
23763 return true
23764 }
23765 break
23766 }
23767
23768
23769
23770 for {
23771 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23772 left := v_0
23773 if left.Op != OpLsh8x8 {
23774 continue
23775 }
23776 y := left.Args[1]
23777 x := left.Args[0]
23778 right := v_1
23779 if right.Op != OpRsh8Ux8 {
23780 continue
23781 }
23782 _ = right.Args[1]
23783 if x != right.Args[0] {
23784 continue
23785 }
23786 right_1 := right.Args[1]
23787 if right_1.Op != OpSub8 {
23788 continue
23789 }
23790 _ = right_1.Args[1]
23791 right_1_0 := right_1.Args[0]
23792 if right_1_0.Op != OpConst8 || auxIntToInt8(right_1_0.AuxInt) != 8 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 8)) {
23793 continue
23794 }
23795 v.reset(OpRotateLeft8)
23796 v.AddArg2(x, y)
23797 return true
23798 }
23799 break
23800 }
23801
23802
23803
23804 for {
23805 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23806 right := v_0
23807 if right.Op != OpRsh8Ux64 {
23808 continue
23809 }
23810 y := right.Args[1]
23811 x := right.Args[0]
23812 left := v_1
23813 if left.Op != OpLsh8x64 {
23814 continue
23815 }
23816 _ = left.Args[1]
23817 if x != left.Args[0] {
23818 continue
23819 }
23820 z := left.Args[1]
23821 if z.Op != OpSub64 {
23822 continue
23823 }
23824 _ = z.Args[1]
23825 z_0 := z.Args[0]
23826 if z_0.Op != OpConst64 || auxIntToInt64(z_0.AuxInt) != 8 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 8)) {
23827 continue
23828 }
23829 v.reset(OpRotateLeft8)
23830 v.AddArg2(x, z)
23831 return true
23832 }
23833 break
23834 }
23835
23836
23837
23838 for {
23839 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23840 right := v_0
23841 if right.Op != OpRsh8Ux32 {
23842 continue
23843 }
23844 y := right.Args[1]
23845 x := right.Args[0]
23846 left := v_1
23847 if left.Op != OpLsh8x32 {
23848 continue
23849 }
23850 _ = left.Args[1]
23851 if x != left.Args[0] {
23852 continue
23853 }
23854 z := left.Args[1]
23855 if z.Op != OpSub32 {
23856 continue
23857 }
23858 _ = z.Args[1]
23859 z_0 := z.Args[0]
23860 if z_0.Op != OpConst32 || auxIntToInt32(z_0.AuxInt) != 8 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 8)) {
23861 continue
23862 }
23863 v.reset(OpRotateLeft8)
23864 v.AddArg2(x, z)
23865 return true
23866 }
23867 break
23868 }
23869
23870
23871
23872 for {
23873 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23874 right := v_0
23875 if right.Op != OpRsh8Ux16 {
23876 continue
23877 }
23878 y := right.Args[1]
23879 x := right.Args[0]
23880 left := v_1
23881 if left.Op != OpLsh8x16 {
23882 continue
23883 }
23884 _ = left.Args[1]
23885 if x != left.Args[0] {
23886 continue
23887 }
23888 z := left.Args[1]
23889 if z.Op != OpSub16 {
23890 continue
23891 }
23892 _ = z.Args[1]
23893 z_0 := z.Args[0]
23894 if z_0.Op != OpConst16 || auxIntToInt16(z_0.AuxInt) != 8 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 8)) {
23895 continue
23896 }
23897 v.reset(OpRotateLeft8)
23898 v.AddArg2(x, z)
23899 return true
23900 }
23901 break
23902 }
23903
23904
23905
23906 for {
23907 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23908 right := v_0
23909 if right.Op != OpRsh8Ux8 {
23910 continue
23911 }
23912 y := right.Args[1]
23913 x := right.Args[0]
23914 left := v_1
23915 if left.Op != OpLsh8x8 {
23916 continue
23917 }
23918 _ = left.Args[1]
23919 if x != left.Args[0] {
23920 continue
23921 }
23922 z := left.Args[1]
23923 if z.Op != OpSub8 {
23924 continue
23925 }
23926 _ = z.Args[1]
23927 z_0 := z.Args[0]
23928 if z_0.Op != OpConst8 || auxIntToInt8(z_0.AuxInt) != 8 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 8)) {
23929 continue
23930 }
23931 v.reset(OpRotateLeft8)
23932 v.AddArg2(x, z)
23933 return true
23934 }
23935 break
23936 }
23937 return false
23938 }
23939 func rewriteValuegeneric_OpOrB(v *Value) bool {
23940 v_1 := v.Args[1]
23941 v_0 := v.Args[0]
23942 b := v.Block
23943
23944
23945
23946 for {
23947 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23948 if v_0.Op != OpLess64 {
23949 continue
23950 }
23951 x := v_0.Args[1]
23952 v_0_0 := v_0.Args[0]
23953 if v_0_0.Op != OpConst64 {
23954 continue
23955 }
23956 c := auxIntToInt64(v_0_0.AuxInt)
23957 if v_1.Op != OpLess64 {
23958 continue
23959 }
23960 _ = v_1.Args[1]
23961 if x != v_1.Args[0] {
23962 continue
23963 }
23964 v_1_1 := v_1.Args[1]
23965 if v_1_1.Op != OpConst64 {
23966 continue
23967 }
23968 d := auxIntToInt64(v_1_1.AuxInt)
23969 if !(c >= d) {
23970 continue
23971 }
23972 v.reset(OpLess64U)
23973 v0 := b.NewValue0(v.Pos, OpConst64, x.Type)
23974 v0.AuxInt = int64ToAuxInt(c - d)
23975 v1 := b.NewValue0(v.Pos, OpSub64, x.Type)
23976 v2 := b.NewValue0(v.Pos, OpConst64, x.Type)
23977 v2.AuxInt = int64ToAuxInt(d)
23978 v1.AddArg2(x, v2)
23979 v.AddArg2(v0, v1)
23980 return true
23981 }
23982 break
23983 }
23984
23985
23986
23987 for {
23988 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
23989 if v_0.Op != OpLeq64 {
23990 continue
23991 }
23992 x := v_0.Args[1]
23993 v_0_0 := v_0.Args[0]
23994 if v_0_0.Op != OpConst64 {
23995 continue
23996 }
23997 c := auxIntToInt64(v_0_0.AuxInt)
23998 if v_1.Op != OpLess64 {
23999 continue
24000 }
24001 _ = v_1.Args[1]
24002 if x != v_1.Args[0] {
24003 continue
24004 }
24005 v_1_1 := v_1.Args[1]
24006 if v_1_1.Op != OpConst64 {
24007 continue
24008 }
24009 d := auxIntToInt64(v_1_1.AuxInt)
24010 if !(c >= d) {
24011 continue
24012 }
24013 v.reset(OpLeq64U)
24014 v0 := b.NewValue0(v.Pos, OpConst64, x.Type)
24015 v0.AuxInt = int64ToAuxInt(c - d)
24016 v1 := b.NewValue0(v.Pos, OpSub64, x.Type)
24017 v2 := b.NewValue0(v.Pos, OpConst64, x.Type)
24018 v2.AuxInt = int64ToAuxInt(d)
24019 v1.AddArg2(x, v2)
24020 v.AddArg2(v0, v1)
24021 return true
24022 }
24023 break
24024 }
24025
24026
24027
24028 for {
24029 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
24030 if v_0.Op != OpLess32 {
24031 continue
24032 }
24033 x := v_0.Args[1]
24034 v_0_0 := v_0.Args[0]
24035 if v_0_0.Op != OpConst32 {
24036 continue
24037 }
24038 c := auxIntToInt32(v_0_0.AuxInt)
24039 if v_1.Op != OpLess32 {
24040 continue
24041 }
24042 _ = v_1.Args[1]
24043 if x != v_1.Args[0] {
24044 continue
24045 }
24046 v_1_1 := v_1.Args[1]
24047 if v_1_1.Op != OpConst32 {
24048 continue
24049 }
24050 d := auxIntToInt32(v_1_1.AuxInt)
24051 if !(c >= d) {
24052 continue
24053 }
24054 v.reset(OpLess32U)
24055 v0 := b.NewValue0(v.Pos, OpConst32, x.Type)
24056 v0.AuxInt = int32ToAuxInt(c - d)
24057 v1 := b.NewValue0(v.Pos, OpSub32, x.Type)
24058 v2 := b.NewValue0(v.Pos, OpConst32, x.Type)
24059 v2.AuxInt = int32ToAuxInt(d)
24060 v1.AddArg2(x, v2)
24061 v.AddArg2(v0, v1)
24062 return true
24063 }
24064 break
24065 }
24066
24067
24068
24069 for {
24070 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
24071 if v_0.Op != OpLeq32 {
24072 continue
24073 }
24074 x := v_0.Args[1]
24075 v_0_0 := v_0.Args[0]
24076 if v_0_0.Op != OpConst32 {
24077 continue
24078 }
24079 c := auxIntToInt32(v_0_0.AuxInt)
24080 if v_1.Op != OpLess32 {
24081 continue
24082 }
24083 _ = v_1.Args[1]
24084 if x != v_1.Args[0] {
24085 continue
24086 }
24087 v_1_1 := v_1.Args[1]
24088 if v_1_1.Op != OpConst32 {
24089 continue
24090 }
24091 d := auxIntToInt32(v_1_1.AuxInt)
24092 if !(c >= d) {
24093 continue
24094 }
24095 v.reset(OpLeq32U)
24096 v0 := b.NewValue0(v.Pos, OpConst32, x.Type)
24097 v0.AuxInt = int32ToAuxInt(c - d)
24098 v1 := b.NewValue0(v.Pos, OpSub32, x.Type)
24099 v2 := b.NewValue0(v.Pos, OpConst32, x.Type)
24100 v2.AuxInt = int32ToAuxInt(d)
24101 v1.AddArg2(x, v2)
24102 v.AddArg2(v0, v1)
24103 return true
24104 }
24105 break
24106 }
24107
24108
24109
24110 for {
24111 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
24112 if v_0.Op != OpLess16 {
24113 continue
24114 }
24115 x := v_0.Args[1]
24116 v_0_0 := v_0.Args[0]
24117 if v_0_0.Op != OpConst16 {
24118 continue
24119 }
24120 c := auxIntToInt16(v_0_0.AuxInt)
24121 if v_1.Op != OpLess16 {
24122 continue
24123 }
24124 _ = v_1.Args[1]
24125 if x != v_1.Args[0] {
24126 continue
24127 }
24128 v_1_1 := v_1.Args[1]
24129 if v_1_1.Op != OpConst16 {
24130 continue
24131 }
24132 d := auxIntToInt16(v_1_1.AuxInt)
24133 if !(c >= d) {
24134 continue
24135 }
24136 v.reset(OpLess16U)
24137 v0 := b.NewValue0(v.Pos, OpConst16, x.Type)
24138 v0.AuxInt = int16ToAuxInt(c - d)
24139 v1 := b.NewValue0(v.Pos, OpSub16, x.Type)
24140 v2 := b.NewValue0(v.Pos, OpConst16, x.Type)
24141 v2.AuxInt = int16ToAuxInt(d)
24142 v1.AddArg2(x, v2)
24143 v.AddArg2(v0, v1)
24144 return true
24145 }
24146 break
24147 }
24148
24149
24150
24151 for {
24152 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
24153 if v_0.Op != OpLeq16 {
24154 continue
24155 }
24156 x := v_0.Args[1]
24157 v_0_0 := v_0.Args[0]
24158 if v_0_0.Op != OpConst16 {
24159 continue
24160 }
24161 c := auxIntToInt16(v_0_0.AuxInt)
24162 if v_1.Op != OpLess16 {
24163 continue
24164 }
24165 _ = v_1.Args[1]
24166 if x != v_1.Args[0] {
24167 continue
24168 }
24169 v_1_1 := v_1.Args[1]
24170 if v_1_1.Op != OpConst16 {
24171 continue
24172 }
24173 d := auxIntToInt16(v_1_1.AuxInt)
24174 if !(c >= d) {
24175 continue
24176 }
24177 v.reset(OpLeq16U)
24178 v0 := b.NewValue0(v.Pos, OpConst16, x.Type)
24179 v0.AuxInt = int16ToAuxInt(c - d)
24180 v1 := b.NewValue0(v.Pos, OpSub16, x.Type)
24181 v2 := b.NewValue0(v.Pos, OpConst16, x.Type)
24182 v2.AuxInt = int16ToAuxInt(d)
24183 v1.AddArg2(x, v2)
24184 v.AddArg2(v0, v1)
24185 return true
24186 }
24187 break
24188 }
24189
24190
24191
24192 for {
24193 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
24194 if v_0.Op != OpLess8 {
24195 continue
24196 }
24197 x := v_0.Args[1]
24198 v_0_0 := v_0.Args[0]
24199 if v_0_0.Op != OpConst8 {
24200 continue
24201 }
24202 c := auxIntToInt8(v_0_0.AuxInt)
24203 if v_1.Op != OpLess8 {
24204 continue
24205 }
24206 _ = v_1.Args[1]
24207 if x != v_1.Args[0] {
24208 continue
24209 }
24210 v_1_1 := v_1.Args[1]
24211 if v_1_1.Op != OpConst8 {
24212 continue
24213 }
24214 d := auxIntToInt8(v_1_1.AuxInt)
24215 if !(c >= d) {
24216 continue
24217 }
24218 v.reset(OpLess8U)
24219 v0 := b.NewValue0(v.Pos, OpConst8, x.Type)
24220 v0.AuxInt = int8ToAuxInt(c - d)
24221 v1 := b.NewValue0(v.Pos, OpSub8, x.Type)
24222 v2 := b.NewValue0(v.Pos, OpConst8, x.Type)
24223 v2.AuxInt = int8ToAuxInt(d)
24224 v1.AddArg2(x, v2)
24225 v.AddArg2(v0, v1)
24226 return true
24227 }
24228 break
24229 }
24230
24231
24232
24233 for {
24234 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
24235 if v_0.Op != OpLeq8 {
24236 continue
24237 }
24238 x := v_0.Args[1]
24239 v_0_0 := v_0.Args[0]
24240 if v_0_0.Op != OpConst8 {
24241 continue
24242 }
24243 c := auxIntToInt8(v_0_0.AuxInt)
24244 if v_1.Op != OpLess8 {
24245 continue
24246 }
24247 _ = v_1.Args[1]
24248 if x != v_1.Args[0] {
24249 continue
24250 }
24251 v_1_1 := v_1.Args[1]
24252 if v_1_1.Op != OpConst8 {
24253 continue
24254 }
24255 d := auxIntToInt8(v_1_1.AuxInt)
24256 if !(c >= d) {
24257 continue
24258 }
24259 v.reset(OpLeq8U)
24260 v0 := b.NewValue0(v.Pos, OpConst8, x.Type)
24261 v0.AuxInt = int8ToAuxInt(c - d)
24262 v1 := b.NewValue0(v.Pos, OpSub8, x.Type)
24263 v2 := b.NewValue0(v.Pos, OpConst8, x.Type)
24264 v2.AuxInt = int8ToAuxInt(d)
24265 v1.AddArg2(x, v2)
24266 v.AddArg2(v0, v1)
24267 return true
24268 }
24269 break
24270 }
24271
24272
24273
24274 for {
24275 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
24276 if v_0.Op != OpLess64 {
24277 continue
24278 }
24279 x := v_0.Args[1]
24280 v_0_0 := v_0.Args[0]
24281 if v_0_0.Op != OpConst64 {
24282 continue
24283 }
24284 c := auxIntToInt64(v_0_0.AuxInt)
24285 if v_1.Op != OpLeq64 {
24286 continue
24287 }
24288 _ = v_1.Args[1]
24289 if x != v_1.Args[0] {
24290 continue
24291 }
24292 v_1_1 := v_1.Args[1]
24293 if v_1_1.Op != OpConst64 {
24294 continue
24295 }
24296 d := auxIntToInt64(v_1_1.AuxInt)
24297 if !(c >= d+1 && d+1 > d) {
24298 continue
24299 }
24300 v.reset(OpLess64U)
24301 v0 := b.NewValue0(v.Pos, OpConst64, x.Type)
24302 v0.AuxInt = int64ToAuxInt(c - d - 1)
24303 v1 := b.NewValue0(v.Pos, OpSub64, x.Type)
24304 v2 := b.NewValue0(v.Pos, OpConst64, x.Type)
24305 v2.AuxInt = int64ToAuxInt(d + 1)
24306 v1.AddArg2(x, v2)
24307 v.AddArg2(v0, v1)
24308 return true
24309 }
24310 break
24311 }
24312
24313
24314
24315 for {
24316 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
24317 if v_0.Op != OpLeq64 {
24318 continue
24319 }
24320 x := v_0.Args[1]
24321 v_0_0 := v_0.Args[0]
24322 if v_0_0.Op != OpConst64 {
24323 continue
24324 }
24325 c := auxIntToInt64(v_0_0.AuxInt)
24326 if v_1.Op != OpLeq64 {
24327 continue
24328 }
24329 _ = v_1.Args[1]
24330 if x != v_1.Args[0] {
24331 continue
24332 }
24333 v_1_1 := v_1.Args[1]
24334 if v_1_1.Op != OpConst64 {
24335 continue
24336 }
24337 d := auxIntToInt64(v_1_1.AuxInt)
24338 if !(c >= d+1 && d+1 > d) {
24339 continue
24340 }
24341 v.reset(OpLeq64U)
24342 v0 := b.NewValue0(v.Pos, OpConst64, x.Type)
24343 v0.AuxInt = int64ToAuxInt(c - d - 1)
24344 v1 := b.NewValue0(v.Pos, OpSub64, x.Type)
24345 v2 := b.NewValue0(v.Pos, OpConst64, x.Type)
24346 v2.AuxInt = int64ToAuxInt(d + 1)
24347 v1.AddArg2(x, v2)
24348 v.AddArg2(v0, v1)
24349 return true
24350 }
24351 break
24352 }
24353
24354
24355
24356 for {
24357 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
24358 if v_0.Op != OpLess32 {
24359 continue
24360 }
24361 x := v_0.Args[1]
24362 v_0_0 := v_0.Args[0]
24363 if v_0_0.Op != OpConst32 {
24364 continue
24365 }
24366 c := auxIntToInt32(v_0_0.AuxInt)
24367 if v_1.Op != OpLeq32 {
24368 continue
24369 }
24370 _ = v_1.Args[1]
24371 if x != v_1.Args[0] {
24372 continue
24373 }
24374 v_1_1 := v_1.Args[1]
24375 if v_1_1.Op != OpConst32 {
24376 continue
24377 }
24378 d := auxIntToInt32(v_1_1.AuxInt)
24379 if !(c >= d+1 && d+1 > d) {
24380 continue
24381 }
24382 v.reset(OpLess32U)
24383 v0 := b.NewValue0(v.Pos, OpConst32, x.Type)
24384 v0.AuxInt = int32ToAuxInt(c - d - 1)
24385 v1 := b.NewValue0(v.Pos, OpSub32, x.Type)
24386 v2 := b.NewValue0(v.Pos, OpConst32, x.Type)
24387 v2.AuxInt = int32ToAuxInt(d + 1)
24388 v1.AddArg2(x, v2)
24389 v.AddArg2(v0, v1)
24390 return true
24391 }
24392 break
24393 }
24394
24395
24396
24397 for {
24398 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
24399 if v_0.Op != OpLeq32 {
24400 continue
24401 }
24402 x := v_0.Args[1]
24403 v_0_0 := v_0.Args[0]
24404 if v_0_0.Op != OpConst32 {
24405 continue
24406 }
24407 c := auxIntToInt32(v_0_0.AuxInt)
24408 if v_1.Op != OpLeq32 {
24409 continue
24410 }
24411 _ = v_1.Args[1]
24412 if x != v_1.Args[0] {
24413 continue
24414 }
24415 v_1_1 := v_1.Args[1]
24416 if v_1_1.Op != OpConst32 {
24417 continue
24418 }
24419 d := auxIntToInt32(v_1_1.AuxInt)
24420 if !(c >= d+1 && d+1 > d) {
24421 continue
24422 }
24423 v.reset(OpLeq32U)
24424 v0 := b.NewValue0(v.Pos, OpConst32, x.Type)
24425 v0.AuxInt = int32ToAuxInt(c - d - 1)
24426 v1 := b.NewValue0(v.Pos, OpSub32, x.Type)
24427 v2 := b.NewValue0(v.Pos, OpConst32, x.Type)
24428 v2.AuxInt = int32ToAuxInt(d + 1)
24429 v1.AddArg2(x, v2)
24430 v.AddArg2(v0, v1)
24431 return true
24432 }
24433 break
24434 }
24435
24436
24437
24438 for {
24439 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
24440 if v_0.Op != OpLess16 {
24441 continue
24442 }
24443 x := v_0.Args[1]
24444 v_0_0 := v_0.Args[0]
24445 if v_0_0.Op != OpConst16 {
24446 continue
24447 }
24448 c := auxIntToInt16(v_0_0.AuxInt)
24449 if v_1.Op != OpLeq16 {
24450 continue
24451 }
24452 _ = v_1.Args[1]
24453 if x != v_1.Args[0] {
24454 continue
24455 }
24456 v_1_1 := v_1.Args[1]
24457 if v_1_1.Op != OpConst16 {
24458 continue
24459 }
24460 d := auxIntToInt16(v_1_1.AuxInt)
24461 if !(c >= d+1 && d+1 > d) {
24462 continue
24463 }
24464 v.reset(OpLess16U)
24465 v0 := b.NewValue0(v.Pos, OpConst16, x.Type)
24466 v0.AuxInt = int16ToAuxInt(c - d - 1)
24467 v1 := b.NewValue0(v.Pos, OpSub16, x.Type)
24468 v2 := b.NewValue0(v.Pos, OpConst16, x.Type)
24469 v2.AuxInt = int16ToAuxInt(d + 1)
24470 v1.AddArg2(x, v2)
24471 v.AddArg2(v0, v1)
24472 return true
24473 }
24474 break
24475 }
24476
24477
24478
24479 for {
24480 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
24481 if v_0.Op != OpLeq16 {
24482 continue
24483 }
24484 x := v_0.Args[1]
24485 v_0_0 := v_0.Args[0]
24486 if v_0_0.Op != OpConst16 {
24487 continue
24488 }
24489 c := auxIntToInt16(v_0_0.AuxInt)
24490 if v_1.Op != OpLeq16 {
24491 continue
24492 }
24493 _ = v_1.Args[1]
24494 if x != v_1.Args[0] {
24495 continue
24496 }
24497 v_1_1 := v_1.Args[1]
24498 if v_1_1.Op != OpConst16 {
24499 continue
24500 }
24501 d := auxIntToInt16(v_1_1.AuxInt)
24502 if !(c >= d+1 && d+1 > d) {
24503 continue
24504 }
24505 v.reset(OpLeq16U)
24506 v0 := b.NewValue0(v.Pos, OpConst16, x.Type)
24507 v0.AuxInt = int16ToAuxInt(c - d - 1)
24508 v1 := b.NewValue0(v.Pos, OpSub16, x.Type)
24509 v2 := b.NewValue0(v.Pos, OpConst16, x.Type)
24510 v2.AuxInt = int16ToAuxInt(d + 1)
24511 v1.AddArg2(x, v2)
24512 v.AddArg2(v0, v1)
24513 return true
24514 }
24515 break
24516 }
24517
24518
24519
24520 for {
24521 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
24522 if v_0.Op != OpLess8 {
24523 continue
24524 }
24525 x := v_0.Args[1]
24526 v_0_0 := v_0.Args[0]
24527 if v_0_0.Op != OpConst8 {
24528 continue
24529 }
24530 c := auxIntToInt8(v_0_0.AuxInt)
24531 if v_1.Op != OpLeq8 {
24532 continue
24533 }
24534 _ = v_1.Args[1]
24535 if x != v_1.Args[0] {
24536 continue
24537 }
24538 v_1_1 := v_1.Args[1]
24539 if v_1_1.Op != OpConst8 {
24540 continue
24541 }
24542 d := auxIntToInt8(v_1_1.AuxInt)
24543 if !(c >= d+1 && d+1 > d) {
24544 continue
24545 }
24546 v.reset(OpLess8U)
24547 v0 := b.NewValue0(v.Pos, OpConst8, x.Type)
24548 v0.AuxInt = int8ToAuxInt(c - d - 1)
24549 v1 := b.NewValue0(v.Pos, OpSub8, x.Type)
24550 v2 := b.NewValue0(v.Pos, OpConst8, x.Type)
24551 v2.AuxInt = int8ToAuxInt(d + 1)
24552 v1.AddArg2(x, v2)
24553 v.AddArg2(v0, v1)
24554 return true
24555 }
24556 break
24557 }
24558
24559
24560
24561 for {
24562 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
24563 if v_0.Op != OpLeq8 {
24564 continue
24565 }
24566 x := v_0.Args[1]
24567 v_0_0 := v_0.Args[0]
24568 if v_0_0.Op != OpConst8 {
24569 continue
24570 }
24571 c := auxIntToInt8(v_0_0.AuxInt)
24572 if v_1.Op != OpLeq8 {
24573 continue
24574 }
24575 _ = v_1.Args[1]
24576 if x != v_1.Args[0] {
24577 continue
24578 }
24579 v_1_1 := v_1.Args[1]
24580 if v_1_1.Op != OpConst8 {
24581 continue
24582 }
24583 d := auxIntToInt8(v_1_1.AuxInt)
24584 if !(c >= d+1 && d+1 > d) {
24585 continue
24586 }
24587 v.reset(OpLeq8U)
24588 v0 := b.NewValue0(v.Pos, OpConst8, x.Type)
24589 v0.AuxInt = int8ToAuxInt(c - d - 1)
24590 v1 := b.NewValue0(v.Pos, OpSub8, x.Type)
24591 v2 := b.NewValue0(v.Pos, OpConst8, x.Type)
24592 v2.AuxInt = int8ToAuxInt(d + 1)
24593 v1.AddArg2(x, v2)
24594 v.AddArg2(v0, v1)
24595 return true
24596 }
24597 break
24598 }
24599
24600
24601
24602 for {
24603 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
24604 if v_0.Op != OpLess64U {
24605 continue
24606 }
24607 x := v_0.Args[1]
24608 v_0_0 := v_0.Args[0]
24609 if v_0_0.Op != OpConst64 {
24610 continue
24611 }
24612 c := auxIntToInt64(v_0_0.AuxInt)
24613 if v_1.Op != OpLess64U {
24614 continue
24615 }
24616 _ = v_1.Args[1]
24617 if x != v_1.Args[0] {
24618 continue
24619 }
24620 v_1_1 := v_1.Args[1]
24621 if v_1_1.Op != OpConst64 {
24622 continue
24623 }
24624 d := auxIntToInt64(v_1_1.AuxInt)
24625 if !(uint64(c) >= uint64(d)) {
24626 continue
24627 }
24628 v.reset(OpLess64U)
24629 v0 := b.NewValue0(v.Pos, OpConst64, x.Type)
24630 v0.AuxInt = int64ToAuxInt(c - d)
24631 v1 := b.NewValue0(v.Pos, OpSub64, x.Type)
24632 v2 := b.NewValue0(v.Pos, OpConst64, x.Type)
24633 v2.AuxInt = int64ToAuxInt(d)
24634 v1.AddArg2(x, v2)
24635 v.AddArg2(v0, v1)
24636 return true
24637 }
24638 break
24639 }
24640
24641
24642
24643 for {
24644 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
24645 if v_0.Op != OpLeq64U {
24646 continue
24647 }
24648 x := v_0.Args[1]
24649 v_0_0 := v_0.Args[0]
24650 if v_0_0.Op != OpConst64 {
24651 continue
24652 }
24653 c := auxIntToInt64(v_0_0.AuxInt)
24654 if v_1.Op != OpLess64U {
24655 continue
24656 }
24657 _ = v_1.Args[1]
24658 if x != v_1.Args[0] {
24659 continue
24660 }
24661 v_1_1 := v_1.Args[1]
24662 if v_1_1.Op != OpConst64 {
24663 continue
24664 }
24665 d := auxIntToInt64(v_1_1.AuxInt)
24666 if !(uint64(c) >= uint64(d)) {
24667 continue
24668 }
24669 v.reset(OpLeq64U)
24670 v0 := b.NewValue0(v.Pos, OpConst64, x.Type)
24671 v0.AuxInt = int64ToAuxInt(c - d)
24672 v1 := b.NewValue0(v.Pos, OpSub64, x.Type)
24673 v2 := b.NewValue0(v.Pos, OpConst64, x.Type)
24674 v2.AuxInt = int64ToAuxInt(d)
24675 v1.AddArg2(x, v2)
24676 v.AddArg2(v0, v1)
24677 return true
24678 }
24679 break
24680 }
24681
24682
24683
24684 for {
24685 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
24686 if v_0.Op != OpLess32U {
24687 continue
24688 }
24689 x := v_0.Args[1]
24690 v_0_0 := v_0.Args[0]
24691 if v_0_0.Op != OpConst32 {
24692 continue
24693 }
24694 c := auxIntToInt32(v_0_0.AuxInt)
24695 if v_1.Op != OpLess32U {
24696 continue
24697 }
24698 _ = v_1.Args[1]
24699 if x != v_1.Args[0] {
24700 continue
24701 }
24702 v_1_1 := v_1.Args[1]
24703 if v_1_1.Op != OpConst32 {
24704 continue
24705 }
24706 d := auxIntToInt32(v_1_1.AuxInt)
24707 if !(uint32(c) >= uint32(d)) {
24708 continue
24709 }
24710 v.reset(OpLess32U)
24711 v0 := b.NewValue0(v.Pos, OpConst32, x.Type)
24712 v0.AuxInt = int32ToAuxInt(c - d)
24713 v1 := b.NewValue0(v.Pos, OpSub32, x.Type)
24714 v2 := b.NewValue0(v.Pos, OpConst32, x.Type)
24715 v2.AuxInt = int32ToAuxInt(d)
24716 v1.AddArg2(x, v2)
24717 v.AddArg2(v0, v1)
24718 return true
24719 }
24720 break
24721 }
24722
24723
24724
24725 for {
24726 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
24727 if v_0.Op != OpLeq32U {
24728 continue
24729 }
24730 x := v_0.Args[1]
24731 v_0_0 := v_0.Args[0]
24732 if v_0_0.Op != OpConst32 {
24733 continue
24734 }
24735 c := auxIntToInt32(v_0_0.AuxInt)
24736 if v_1.Op != OpLess32U {
24737 continue
24738 }
24739 _ = v_1.Args[1]
24740 if x != v_1.Args[0] {
24741 continue
24742 }
24743 v_1_1 := v_1.Args[1]
24744 if v_1_1.Op != OpConst32 {
24745 continue
24746 }
24747 d := auxIntToInt32(v_1_1.AuxInt)
24748 if !(uint32(c) >= uint32(d)) {
24749 continue
24750 }
24751 v.reset(OpLeq32U)
24752 v0 := b.NewValue0(v.Pos, OpConst32, x.Type)
24753 v0.AuxInt = int32ToAuxInt(c - d)
24754 v1 := b.NewValue0(v.Pos, OpSub32, x.Type)
24755 v2 := b.NewValue0(v.Pos, OpConst32, x.Type)
24756 v2.AuxInt = int32ToAuxInt(d)
24757 v1.AddArg2(x, v2)
24758 v.AddArg2(v0, v1)
24759 return true
24760 }
24761 break
24762 }
24763
24764
24765
24766 for {
24767 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
24768 if v_0.Op != OpLess16U {
24769 continue
24770 }
24771 x := v_0.Args[1]
24772 v_0_0 := v_0.Args[0]
24773 if v_0_0.Op != OpConst16 {
24774 continue
24775 }
24776 c := auxIntToInt16(v_0_0.AuxInt)
24777 if v_1.Op != OpLess16U {
24778 continue
24779 }
24780 _ = v_1.Args[1]
24781 if x != v_1.Args[0] {
24782 continue
24783 }
24784 v_1_1 := v_1.Args[1]
24785 if v_1_1.Op != OpConst16 {
24786 continue
24787 }
24788 d := auxIntToInt16(v_1_1.AuxInt)
24789 if !(uint16(c) >= uint16(d)) {
24790 continue
24791 }
24792 v.reset(OpLess16U)
24793 v0 := b.NewValue0(v.Pos, OpConst16, x.Type)
24794 v0.AuxInt = int16ToAuxInt(c - d)
24795 v1 := b.NewValue0(v.Pos, OpSub16, x.Type)
24796 v2 := b.NewValue0(v.Pos, OpConst16, x.Type)
24797 v2.AuxInt = int16ToAuxInt(d)
24798 v1.AddArg2(x, v2)
24799 v.AddArg2(v0, v1)
24800 return true
24801 }
24802 break
24803 }
24804
24805
24806
24807 for {
24808 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
24809 if v_0.Op != OpLeq16U {
24810 continue
24811 }
24812 x := v_0.Args[1]
24813 v_0_0 := v_0.Args[0]
24814 if v_0_0.Op != OpConst16 {
24815 continue
24816 }
24817 c := auxIntToInt16(v_0_0.AuxInt)
24818 if v_1.Op != OpLess16U {
24819 continue
24820 }
24821 _ = v_1.Args[1]
24822 if x != v_1.Args[0] {
24823 continue
24824 }
24825 v_1_1 := v_1.Args[1]
24826 if v_1_1.Op != OpConst16 {
24827 continue
24828 }
24829 d := auxIntToInt16(v_1_1.AuxInt)
24830 if !(uint16(c) >= uint16(d)) {
24831 continue
24832 }
24833 v.reset(OpLeq16U)
24834 v0 := b.NewValue0(v.Pos, OpConst16, x.Type)
24835 v0.AuxInt = int16ToAuxInt(c - d)
24836 v1 := b.NewValue0(v.Pos, OpSub16, x.Type)
24837 v2 := b.NewValue0(v.Pos, OpConst16, x.Type)
24838 v2.AuxInt = int16ToAuxInt(d)
24839 v1.AddArg2(x, v2)
24840 v.AddArg2(v0, v1)
24841 return true
24842 }
24843 break
24844 }
24845
24846
24847
24848 for {
24849 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
24850 if v_0.Op != OpLess8U {
24851 continue
24852 }
24853 x := v_0.Args[1]
24854 v_0_0 := v_0.Args[0]
24855 if v_0_0.Op != OpConst8 {
24856 continue
24857 }
24858 c := auxIntToInt8(v_0_0.AuxInt)
24859 if v_1.Op != OpLess8U {
24860 continue
24861 }
24862 _ = v_1.Args[1]
24863 if x != v_1.Args[0] {
24864 continue
24865 }
24866 v_1_1 := v_1.Args[1]
24867 if v_1_1.Op != OpConst8 {
24868 continue
24869 }
24870 d := auxIntToInt8(v_1_1.AuxInt)
24871 if !(uint8(c) >= uint8(d)) {
24872 continue
24873 }
24874 v.reset(OpLess8U)
24875 v0 := b.NewValue0(v.Pos, OpConst8, x.Type)
24876 v0.AuxInt = int8ToAuxInt(c - d)
24877 v1 := b.NewValue0(v.Pos, OpSub8, x.Type)
24878 v2 := b.NewValue0(v.Pos, OpConst8, x.Type)
24879 v2.AuxInt = int8ToAuxInt(d)
24880 v1.AddArg2(x, v2)
24881 v.AddArg2(v0, v1)
24882 return true
24883 }
24884 break
24885 }
24886
24887
24888
24889 for {
24890 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
24891 if v_0.Op != OpLeq8U {
24892 continue
24893 }
24894 x := v_0.Args[1]
24895 v_0_0 := v_0.Args[0]
24896 if v_0_0.Op != OpConst8 {
24897 continue
24898 }
24899 c := auxIntToInt8(v_0_0.AuxInt)
24900 if v_1.Op != OpLess8U {
24901 continue
24902 }
24903 _ = v_1.Args[1]
24904 if x != v_1.Args[0] {
24905 continue
24906 }
24907 v_1_1 := v_1.Args[1]
24908 if v_1_1.Op != OpConst8 {
24909 continue
24910 }
24911 d := auxIntToInt8(v_1_1.AuxInt)
24912 if !(uint8(c) >= uint8(d)) {
24913 continue
24914 }
24915 v.reset(OpLeq8U)
24916 v0 := b.NewValue0(v.Pos, OpConst8, x.Type)
24917 v0.AuxInt = int8ToAuxInt(c - d)
24918 v1 := b.NewValue0(v.Pos, OpSub8, x.Type)
24919 v2 := b.NewValue0(v.Pos, OpConst8, x.Type)
24920 v2.AuxInt = int8ToAuxInt(d)
24921 v1.AddArg2(x, v2)
24922 v.AddArg2(v0, v1)
24923 return true
24924 }
24925 break
24926 }
24927
24928
24929
24930 for {
24931 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
24932 if v_0.Op != OpLess64U {
24933 continue
24934 }
24935 x := v_0.Args[1]
24936 v_0_0 := v_0.Args[0]
24937 if v_0_0.Op != OpConst64 {
24938 continue
24939 }
24940 c := auxIntToInt64(v_0_0.AuxInt)
24941 if v_1.Op != OpLeq64U {
24942 continue
24943 }
24944 _ = v_1.Args[1]
24945 if x != v_1.Args[0] {
24946 continue
24947 }
24948 v_1_1 := v_1.Args[1]
24949 if v_1_1.Op != OpConst64 {
24950 continue
24951 }
24952 d := auxIntToInt64(v_1_1.AuxInt)
24953 if !(uint64(c) >= uint64(d+1) && uint64(d+1) > uint64(d)) {
24954 continue
24955 }
24956 v.reset(OpLess64U)
24957 v0 := b.NewValue0(v.Pos, OpConst64, x.Type)
24958 v0.AuxInt = int64ToAuxInt(c - d - 1)
24959 v1 := b.NewValue0(v.Pos, OpSub64, x.Type)
24960 v2 := b.NewValue0(v.Pos, OpConst64, x.Type)
24961 v2.AuxInt = int64ToAuxInt(d + 1)
24962 v1.AddArg2(x, v2)
24963 v.AddArg2(v0, v1)
24964 return true
24965 }
24966 break
24967 }
24968
24969
24970
24971 for {
24972 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
24973 if v_0.Op != OpLeq64U {
24974 continue
24975 }
24976 x := v_0.Args[1]
24977 v_0_0 := v_0.Args[0]
24978 if v_0_0.Op != OpConst64 {
24979 continue
24980 }
24981 c := auxIntToInt64(v_0_0.AuxInt)
24982 if v_1.Op != OpLeq64U {
24983 continue
24984 }
24985 _ = v_1.Args[1]
24986 if x != v_1.Args[0] {
24987 continue
24988 }
24989 v_1_1 := v_1.Args[1]
24990 if v_1_1.Op != OpConst64 {
24991 continue
24992 }
24993 d := auxIntToInt64(v_1_1.AuxInt)
24994 if !(uint64(c) >= uint64(d+1) && uint64(d+1) > uint64(d)) {
24995 continue
24996 }
24997 v.reset(OpLeq64U)
24998 v0 := b.NewValue0(v.Pos, OpConst64, x.Type)
24999 v0.AuxInt = int64ToAuxInt(c - d - 1)
25000 v1 := b.NewValue0(v.Pos, OpSub64, x.Type)
25001 v2 := b.NewValue0(v.Pos, OpConst64, x.Type)
25002 v2.AuxInt = int64ToAuxInt(d + 1)
25003 v1.AddArg2(x, v2)
25004 v.AddArg2(v0, v1)
25005 return true
25006 }
25007 break
25008 }
25009
25010
25011
25012 for {
25013 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
25014 if v_0.Op != OpLess32U {
25015 continue
25016 }
25017 x := v_0.Args[1]
25018 v_0_0 := v_0.Args[0]
25019 if v_0_0.Op != OpConst32 {
25020 continue
25021 }
25022 c := auxIntToInt32(v_0_0.AuxInt)
25023 if v_1.Op != OpLeq32U {
25024 continue
25025 }
25026 _ = v_1.Args[1]
25027 if x != v_1.Args[0] {
25028 continue
25029 }
25030 v_1_1 := v_1.Args[1]
25031 if v_1_1.Op != OpConst32 {
25032 continue
25033 }
25034 d := auxIntToInt32(v_1_1.AuxInt)
25035 if !(uint32(c) >= uint32(d+1) && uint32(d+1) > uint32(d)) {
25036 continue
25037 }
25038 v.reset(OpLess32U)
25039 v0 := b.NewValue0(v.Pos, OpConst32, x.Type)
25040 v0.AuxInt = int32ToAuxInt(c - d - 1)
25041 v1 := b.NewValue0(v.Pos, OpSub32, x.Type)
25042 v2 := b.NewValue0(v.Pos, OpConst32, x.Type)
25043 v2.AuxInt = int32ToAuxInt(d + 1)
25044 v1.AddArg2(x, v2)
25045 v.AddArg2(v0, v1)
25046 return true
25047 }
25048 break
25049 }
25050
25051
25052
25053 for {
25054 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
25055 if v_0.Op != OpLeq32U {
25056 continue
25057 }
25058 x := v_0.Args[1]
25059 v_0_0 := v_0.Args[0]
25060 if v_0_0.Op != OpConst32 {
25061 continue
25062 }
25063 c := auxIntToInt32(v_0_0.AuxInt)
25064 if v_1.Op != OpLeq32U {
25065 continue
25066 }
25067 _ = v_1.Args[1]
25068 if x != v_1.Args[0] {
25069 continue
25070 }
25071 v_1_1 := v_1.Args[1]
25072 if v_1_1.Op != OpConst32 {
25073 continue
25074 }
25075 d := auxIntToInt32(v_1_1.AuxInt)
25076 if !(uint32(c) >= uint32(d+1) && uint32(d+1) > uint32(d)) {
25077 continue
25078 }
25079 v.reset(OpLeq32U)
25080 v0 := b.NewValue0(v.Pos, OpConst32, x.Type)
25081 v0.AuxInt = int32ToAuxInt(c - d - 1)
25082 v1 := b.NewValue0(v.Pos, OpSub32, x.Type)
25083 v2 := b.NewValue0(v.Pos, OpConst32, x.Type)
25084 v2.AuxInt = int32ToAuxInt(d + 1)
25085 v1.AddArg2(x, v2)
25086 v.AddArg2(v0, v1)
25087 return true
25088 }
25089 break
25090 }
25091
25092
25093
25094 for {
25095 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
25096 if v_0.Op != OpLess16U {
25097 continue
25098 }
25099 x := v_0.Args[1]
25100 v_0_0 := v_0.Args[0]
25101 if v_0_0.Op != OpConst16 {
25102 continue
25103 }
25104 c := auxIntToInt16(v_0_0.AuxInt)
25105 if v_1.Op != OpLeq16U {
25106 continue
25107 }
25108 _ = v_1.Args[1]
25109 if x != v_1.Args[0] {
25110 continue
25111 }
25112 v_1_1 := v_1.Args[1]
25113 if v_1_1.Op != OpConst16 {
25114 continue
25115 }
25116 d := auxIntToInt16(v_1_1.AuxInt)
25117 if !(uint16(c) >= uint16(d+1) && uint16(d+1) > uint16(d)) {
25118 continue
25119 }
25120 v.reset(OpLess16U)
25121 v0 := b.NewValue0(v.Pos, OpConst16, x.Type)
25122 v0.AuxInt = int16ToAuxInt(c - d - 1)
25123 v1 := b.NewValue0(v.Pos, OpSub16, x.Type)
25124 v2 := b.NewValue0(v.Pos, OpConst16, x.Type)
25125 v2.AuxInt = int16ToAuxInt(d + 1)
25126 v1.AddArg2(x, v2)
25127 v.AddArg2(v0, v1)
25128 return true
25129 }
25130 break
25131 }
25132
25133
25134
25135 for {
25136 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
25137 if v_0.Op != OpLeq16U {
25138 continue
25139 }
25140 x := v_0.Args[1]
25141 v_0_0 := v_0.Args[0]
25142 if v_0_0.Op != OpConst16 {
25143 continue
25144 }
25145 c := auxIntToInt16(v_0_0.AuxInt)
25146 if v_1.Op != OpLeq16U {
25147 continue
25148 }
25149 _ = v_1.Args[1]
25150 if x != v_1.Args[0] {
25151 continue
25152 }
25153 v_1_1 := v_1.Args[1]
25154 if v_1_1.Op != OpConst16 {
25155 continue
25156 }
25157 d := auxIntToInt16(v_1_1.AuxInt)
25158 if !(uint16(c) >= uint16(d+1) && uint16(d+1) > uint16(d)) {
25159 continue
25160 }
25161 v.reset(OpLeq16U)
25162 v0 := b.NewValue0(v.Pos, OpConst16, x.Type)
25163 v0.AuxInt = int16ToAuxInt(c - d - 1)
25164 v1 := b.NewValue0(v.Pos, OpSub16, x.Type)
25165 v2 := b.NewValue0(v.Pos, OpConst16, x.Type)
25166 v2.AuxInt = int16ToAuxInt(d + 1)
25167 v1.AddArg2(x, v2)
25168 v.AddArg2(v0, v1)
25169 return true
25170 }
25171 break
25172 }
25173
25174
25175
25176 for {
25177 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
25178 if v_0.Op != OpLess8U {
25179 continue
25180 }
25181 x := v_0.Args[1]
25182 v_0_0 := v_0.Args[0]
25183 if v_0_0.Op != OpConst8 {
25184 continue
25185 }
25186 c := auxIntToInt8(v_0_0.AuxInt)
25187 if v_1.Op != OpLeq8U {
25188 continue
25189 }
25190 _ = v_1.Args[1]
25191 if x != v_1.Args[0] {
25192 continue
25193 }
25194 v_1_1 := v_1.Args[1]
25195 if v_1_1.Op != OpConst8 {
25196 continue
25197 }
25198 d := auxIntToInt8(v_1_1.AuxInt)
25199 if !(uint8(c) >= uint8(d+1) && uint8(d+1) > uint8(d)) {
25200 continue
25201 }
25202 v.reset(OpLess8U)
25203 v0 := b.NewValue0(v.Pos, OpConst8, x.Type)
25204 v0.AuxInt = int8ToAuxInt(c - d - 1)
25205 v1 := b.NewValue0(v.Pos, OpSub8, x.Type)
25206 v2 := b.NewValue0(v.Pos, OpConst8, x.Type)
25207 v2.AuxInt = int8ToAuxInt(d + 1)
25208 v1.AddArg2(x, v2)
25209 v.AddArg2(v0, v1)
25210 return true
25211 }
25212 break
25213 }
25214
25215
25216
25217 for {
25218 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
25219 if v_0.Op != OpLeq8U {
25220 continue
25221 }
25222 x := v_0.Args[1]
25223 v_0_0 := v_0.Args[0]
25224 if v_0_0.Op != OpConst8 {
25225 continue
25226 }
25227 c := auxIntToInt8(v_0_0.AuxInt)
25228 if v_1.Op != OpLeq8U {
25229 continue
25230 }
25231 _ = v_1.Args[1]
25232 if x != v_1.Args[0] {
25233 continue
25234 }
25235 v_1_1 := v_1.Args[1]
25236 if v_1_1.Op != OpConst8 {
25237 continue
25238 }
25239 d := auxIntToInt8(v_1_1.AuxInt)
25240 if !(uint8(c) >= uint8(d+1) && uint8(d+1) > uint8(d)) {
25241 continue
25242 }
25243 v.reset(OpLeq8U)
25244 v0 := b.NewValue0(v.Pos, OpConst8, x.Type)
25245 v0.AuxInt = int8ToAuxInt(c - d - 1)
25246 v1 := b.NewValue0(v.Pos, OpSub8, x.Type)
25247 v2 := b.NewValue0(v.Pos, OpConst8, x.Type)
25248 v2.AuxInt = int8ToAuxInt(d + 1)
25249 v1.AddArg2(x, v2)
25250 v.AddArg2(v0, v1)
25251 return true
25252 }
25253 break
25254 }
25255 return false
25256 }
25257 func rewriteValuegeneric_OpPhi(v *Value) bool {
25258 b := v.Block
25259
25260
25261 for {
25262 if len(v.Args) != 2 {
25263 break
25264 }
25265 _ = v.Args[1]
25266 v_0 := v.Args[0]
25267 if v_0.Op != OpConst8 {
25268 break
25269 }
25270 c := auxIntToInt8(v_0.AuxInt)
25271 v_1 := v.Args[1]
25272 if v_1.Op != OpConst8 || auxIntToInt8(v_1.AuxInt) != c {
25273 break
25274 }
25275 v.reset(OpConst8)
25276 v.AuxInt = int8ToAuxInt(c)
25277 return true
25278 }
25279
25280
25281 for {
25282 if len(v.Args) != 2 {
25283 break
25284 }
25285 _ = v.Args[1]
25286 v_0 := v.Args[0]
25287 if v_0.Op != OpConst16 {
25288 break
25289 }
25290 c := auxIntToInt16(v_0.AuxInt)
25291 v_1 := v.Args[1]
25292 if v_1.Op != OpConst16 || auxIntToInt16(v_1.AuxInt) != c {
25293 break
25294 }
25295 v.reset(OpConst16)
25296 v.AuxInt = int16ToAuxInt(c)
25297 return true
25298 }
25299
25300
25301 for {
25302 if len(v.Args) != 2 {
25303 break
25304 }
25305 _ = v.Args[1]
25306 v_0 := v.Args[0]
25307 if v_0.Op != OpConst32 {
25308 break
25309 }
25310 c := auxIntToInt32(v_0.AuxInt)
25311 v_1 := v.Args[1]
25312 if v_1.Op != OpConst32 || auxIntToInt32(v_1.AuxInt) != c {
25313 break
25314 }
25315 v.reset(OpConst32)
25316 v.AuxInt = int32ToAuxInt(c)
25317 return true
25318 }
25319
25320
25321 for {
25322 if len(v.Args) != 2 {
25323 break
25324 }
25325 _ = v.Args[1]
25326 v_0 := v.Args[0]
25327 if v_0.Op != OpConst64 {
25328 break
25329 }
25330 c := auxIntToInt64(v_0.AuxInt)
25331 v_1 := v.Args[1]
25332 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != c {
25333 break
25334 }
25335 v.reset(OpConst64)
25336 v.AuxInt = int64ToAuxInt(c)
25337 return true
25338 }
25339
25340
25341
25342 for {
25343 if len(v.Args) != 2 {
25344 break
25345 }
25346 t := v.Type
25347 _ = v.Args[1]
25348 nx := v.Args[0]
25349 if nx.Op != OpNot {
25350 break
25351 }
25352 x := nx.Args[0]
25353 ny := v.Args[1]
25354 if ny.Op != OpNot {
25355 break
25356 }
25357 y := ny.Args[0]
25358 if !(nx.Uses == 1 && ny.Uses == 1) {
25359 break
25360 }
25361 v.reset(OpNot)
25362 v0 := b.NewValue0(v.Pos, OpPhi, t)
25363 v0.AddArg2(x, y)
25364 v.AddArg(v0)
25365 return true
25366 }
25367 return false
25368 }
25369 func rewriteValuegeneric_OpPopCount16(v *Value) bool {
25370 v_0 := v.Args[0]
25371 b := v.Block
25372 config := b.Func.Config
25373
25374
25375
25376 for {
25377 if v_0.Op != OpConst16 {
25378 break
25379 }
25380 c := auxIntToInt16(v_0.AuxInt)
25381 if !(config.PtrSize == 8) {
25382 break
25383 }
25384 v.reset(OpConst64)
25385 v.AuxInt = int64ToAuxInt(int64(bits.OnesCount16(uint16(c))))
25386 return true
25387 }
25388
25389
25390
25391 for {
25392 if v_0.Op != OpConst16 {
25393 break
25394 }
25395 c := auxIntToInt16(v_0.AuxInt)
25396 if !(config.PtrSize == 4) {
25397 break
25398 }
25399 v.reset(OpConst32)
25400 v.AuxInt = int32ToAuxInt(int32(bits.OnesCount16(uint16(c))))
25401 return true
25402 }
25403 return false
25404 }
25405 func rewriteValuegeneric_OpPopCount32(v *Value) bool {
25406 v_0 := v.Args[0]
25407 b := v.Block
25408 config := b.Func.Config
25409
25410
25411
25412 for {
25413 if v_0.Op != OpConst32 {
25414 break
25415 }
25416 c := auxIntToInt32(v_0.AuxInt)
25417 if !(config.PtrSize == 8) {
25418 break
25419 }
25420 v.reset(OpConst64)
25421 v.AuxInt = int64ToAuxInt(int64(bits.OnesCount32(uint32(c))))
25422 return true
25423 }
25424
25425
25426
25427 for {
25428 if v_0.Op != OpConst32 {
25429 break
25430 }
25431 c := auxIntToInt32(v_0.AuxInt)
25432 if !(config.PtrSize == 4) {
25433 break
25434 }
25435 v.reset(OpConst32)
25436 v.AuxInt = int32ToAuxInt(int32(bits.OnesCount32(uint32(c))))
25437 return true
25438 }
25439 return false
25440 }
25441 func rewriteValuegeneric_OpPopCount64(v *Value) bool {
25442 v_0 := v.Args[0]
25443 b := v.Block
25444 config := b.Func.Config
25445
25446
25447
25448 for {
25449 if v_0.Op != OpConst64 {
25450 break
25451 }
25452 c := auxIntToInt64(v_0.AuxInt)
25453 if !(config.PtrSize == 8) {
25454 break
25455 }
25456 v.reset(OpConst64)
25457 v.AuxInt = int64ToAuxInt(int64(bits.OnesCount64(uint64(c))))
25458 return true
25459 }
25460
25461
25462
25463 for {
25464 if v_0.Op != OpConst64 {
25465 break
25466 }
25467 c := auxIntToInt64(v_0.AuxInt)
25468 if !(config.PtrSize == 4) {
25469 break
25470 }
25471 v.reset(OpConst32)
25472 v.AuxInt = int32ToAuxInt(int32(bits.OnesCount64(uint64(c))))
25473 return true
25474 }
25475 return false
25476 }
25477 func rewriteValuegeneric_OpPopCount8(v *Value) bool {
25478 v_0 := v.Args[0]
25479 b := v.Block
25480 config := b.Func.Config
25481
25482
25483
25484 for {
25485 if v_0.Op != OpConst8 {
25486 break
25487 }
25488 c := auxIntToInt8(v_0.AuxInt)
25489 if !(config.PtrSize == 8) {
25490 break
25491 }
25492 v.reset(OpConst64)
25493 v.AuxInt = int64ToAuxInt(int64(bits.OnesCount8(uint8(c))))
25494 return true
25495 }
25496
25497
25498
25499 for {
25500 if v_0.Op != OpConst8 {
25501 break
25502 }
25503 c := auxIntToInt8(v_0.AuxInt)
25504 if !(config.PtrSize == 4) {
25505 break
25506 }
25507 v.reset(OpConst32)
25508 v.AuxInt = int32ToAuxInt(int32(bits.OnesCount8(uint8(c))))
25509 return true
25510 }
25511 return false
25512 }
25513 func rewriteValuegeneric_OpPtrIndex(v *Value) bool {
25514 v_1 := v.Args[1]
25515 v_0 := v.Args[0]
25516 b := v.Block
25517 config := b.Func.Config
25518 typ := &b.Func.Config.Types
25519
25520
25521
25522 for {
25523 t := v.Type
25524 ptr := v_0
25525 idx := v_1
25526 if !(config.PtrSize == 4 && is32Bit(t.Elem().Size())) {
25527 break
25528 }
25529 v.reset(OpAddPtr)
25530 v0 := b.NewValue0(v.Pos, OpMul32, typ.Int)
25531 v1 := b.NewValue0(v.Pos, OpConst32, typ.Int)
25532 v1.AuxInt = int32ToAuxInt(int32(t.Elem().Size()))
25533 v0.AddArg2(idx, v1)
25534 v.AddArg2(ptr, v0)
25535 return true
25536 }
25537
25538
25539
25540 for {
25541 t := v.Type
25542 ptr := v_0
25543 idx := v_1
25544 if !(config.PtrSize == 8) {
25545 break
25546 }
25547 v.reset(OpAddPtr)
25548 v0 := b.NewValue0(v.Pos, OpMul64, typ.Int)
25549 v1 := b.NewValue0(v.Pos, OpConst64, typ.Int)
25550 v1.AuxInt = int64ToAuxInt(t.Elem().Size())
25551 v0.AddArg2(idx, v1)
25552 v.AddArg2(ptr, v0)
25553 return true
25554 }
25555 return false
25556 }
25557 func rewriteValuegeneric_OpRotateLeft16(v *Value) bool {
25558 v_1 := v.Args[1]
25559 v_0 := v.Args[0]
25560 b := v.Block
25561 config := b.Func.Config
25562
25563
25564
25565 for {
25566 x := v_0
25567 if v_1.Op != OpConst16 {
25568 break
25569 }
25570 c := auxIntToInt16(v_1.AuxInt)
25571 if !(c%16 == 0) {
25572 break
25573 }
25574 v.copyOf(x)
25575 return true
25576 }
25577
25578
25579
25580 for {
25581 x := v_0
25582 if v_1.Op != OpAnd64 {
25583 break
25584 }
25585 _ = v_1.Args[1]
25586 v_1_0 := v_1.Args[0]
25587 v_1_1 := v_1.Args[1]
25588 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
25589 y := v_1_0
25590 if v_1_1.Op != OpConst64 {
25591 continue
25592 }
25593 c := auxIntToInt64(v_1_1.AuxInt)
25594 if !(c&15 == 15) {
25595 continue
25596 }
25597 v.reset(OpRotateLeft16)
25598 v.AddArg2(x, y)
25599 return true
25600 }
25601 break
25602 }
25603
25604
25605
25606 for {
25607 x := v_0
25608 if v_1.Op != OpAnd32 {
25609 break
25610 }
25611 _ = v_1.Args[1]
25612 v_1_0 := v_1.Args[0]
25613 v_1_1 := v_1.Args[1]
25614 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
25615 y := v_1_0
25616 if v_1_1.Op != OpConst32 {
25617 continue
25618 }
25619 c := auxIntToInt32(v_1_1.AuxInt)
25620 if !(c&15 == 15) {
25621 continue
25622 }
25623 v.reset(OpRotateLeft16)
25624 v.AddArg2(x, y)
25625 return true
25626 }
25627 break
25628 }
25629
25630
25631
25632 for {
25633 x := v_0
25634 if v_1.Op != OpAnd16 {
25635 break
25636 }
25637 _ = v_1.Args[1]
25638 v_1_0 := v_1.Args[0]
25639 v_1_1 := v_1.Args[1]
25640 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
25641 y := v_1_0
25642 if v_1_1.Op != OpConst16 {
25643 continue
25644 }
25645 c := auxIntToInt16(v_1_1.AuxInt)
25646 if !(c&15 == 15) {
25647 continue
25648 }
25649 v.reset(OpRotateLeft16)
25650 v.AddArg2(x, y)
25651 return true
25652 }
25653 break
25654 }
25655
25656
25657
25658 for {
25659 x := v_0
25660 if v_1.Op != OpAnd8 {
25661 break
25662 }
25663 _ = v_1.Args[1]
25664 v_1_0 := v_1.Args[0]
25665 v_1_1 := v_1.Args[1]
25666 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
25667 y := v_1_0
25668 if v_1_1.Op != OpConst8 {
25669 continue
25670 }
25671 c := auxIntToInt8(v_1_1.AuxInt)
25672 if !(c&15 == 15) {
25673 continue
25674 }
25675 v.reset(OpRotateLeft16)
25676 v.AddArg2(x, y)
25677 return true
25678 }
25679 break
25680 }
25681
25682
25683
25684 for {
25685 x := v_0
25686 if v_1.Op != OpNeg64 {
25687 break
25688 }
25689 v_1_0 := v_1.Args[0]
25690 if v_1_0.Op != OpAnd64 {
25691 break
25692 }
25693 _ = v_1_0.Args[1]
25694 v_1_0_0 := v_1_0.Args[0]
25695 v_1_0_1 := v_1_0.Args[1]
25696 for _i0 := 0; _i0 <= 1; _i0, v_1_0_0, v_1_0_1 = _i0+1, v_1_0_1, v_1_0_0 {
25697 y := v_1_0_0
25698 if v_1_0_1.Op != OpConst64 {
25699 continue
25700 }
25701 c := auxIntToInt64(v_1_0_1.AuxInt)
25702 if !(c&15 == 15) {
25703 continue
25704 }
25705 v.reset(OpRotateLeft16)
25706 v0 := b.NewValue0(v.Pos, OpNeg64, y.Type)
25707 v0.AddArg(y)
25708 v.AddArg2(x, v0)
25709 return true
25710 }
25711 break
25712 }
25713
25714
25715
25716 for {
25717 x := v_0
25718 if v_1.Op != OpNeg32 {
25719 break
25720 }
25721 v_1_0 := v_1.Args[0]
25722 if v_1_0.Op != OpAnd32 {
25723 break
25724 }
25725 _ = v_1_0.Args[1]
25726 v_1_0_0 := v_1_0.Args[0]
25727 v_1_0_1 := v_1_0.Args[1]
25728 for _i0 := 0; _i0 <= 1; _i0, v_1_0_0, v_1_0_1 = _i0+1, v_1_0_1, v_1_0_0 {
25729 y := v_1_0_0
25730 if v_1_0_1.Op != OpConst32 {
25731 continue
25732 }
25733 c := auxIntToInt32(v_1_0_1.AuxInt)
25734 if !(c&15 == 15) {
25735 continue
25736 }
25737 v.reset(OpRotateLeft16)
25738 v0 := b.NewValue0(v.Pos, OpNeg32, y.Type)
25739 v0.AddArg(y)
25740 v.AddArg2(x, v0)
25741 return true
25742 }
25743 break
25744 }
25745
25746
25747
25748 for {
25749 x := v_0
25750 if v_1.Op != OpNeg16 {
25751 break
25752 }
25753 v_1_0 := v_1.Args[0]
25754 if v_1_0.Op != OpAnd16 {
25755 break
25756 }
25757 _ = v_1_0.Args[1]
25758 v_1_0_0 := v_1_0.Args[0]
25759 v_1_0_1 := v_1_0.Args[1]
25760 for _i0 := 0; _i0 <= 1; _i0, v_1_0_0, v_1_0_1 = _i0+1, v_1_0_1, v_1_0_0 {
25761 y := v_1_0_0
25762 if v_1_0_1.Op != OpConst16 {
25763 continue
25764 }
25765 c := auxIntToInt16(v_1_0_1.AuxInt)
25766 if !(c&15 == 15) {
25767 continue
25768 }
25769 v.reset(OpRotateLeft16)
25770 v0 := b.NewValue0(v.Pos, OpNeg16, y.Type)
25771 v0.AddArg(y)
25772 v.AddArg2(x, v0)
25773 return true
25774 }
25775 break
25776 }
25777
25778
25779
25780 for {
25781 x := v_0
25782 if v_1.Op != OpNeg8 {
25783 break
25784 }
25785 v_1_0 := v_1.Args[0]
25786 if v_1_0.Op != OpAnd8 {
25787 break
25788 }
25789 _ = v_1_0.Args[1]
25790 v_1_0_0 := v_1_0.Args[0]
25791 v_1_0_1 := v_1_0.Args[1]
25792 for _i0 := 0; _i0 <= 1; _i0, v_1_0_0, v_1_0_1 = _i0+1, v_1_0_1, v_1_0_0 {
25793 y := v_1_0_0
25794 if v_1_0_1.Op != OpConst8 {
25795 continue
25796 }
25797 c := auxIntToInt8(v_1_0_1.AuxInt)
25798 if !(c&15 == 15) {
25799 continue
25800 }
25801 v.reset(OpRotateLeft16)
25802 v0 := b.NewValue0(v.Pos, OpNeg8, y.Type)
25803 v0.AddArg(y)
25804 v.AddArg2(x, v0)
25805 return true
25806 }
25807 break
25808 }
25809
25810
25811
25812 for {
25813 x := v_0
25814 if v_1.Op != OpAdd64 {
25815 break
25816 }
25817 _ = v_1.Args[1]
25818 v_1_0 := v_1.Args[0]
25819 v_1_1 := v_1.Args[1]
25820 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
25821 y := v_1_0
25822 if v_1_1.Op != OpConst64 {
25823 continue
25824 }
25825 c := auxIntToInt64(v_1_1.AuxInt)
25826 if !(c&15 == 0) {
25827 continue
25828 }
25829 v.reset(OpRotateLeft16)
25830 v.AddArg2(x, y)
25831 return true
25832 }
25833 break
25834 }
25835
25836
25837
25838 for {
25839 x := v_0
25840 if v_1.Op != OpAdd32 {
25841 break
25842 }
25843 _ = v_1.Args[1]
25844 v_1_0 := v_1.Args[0]
25845 v_1_1 := v_1.Args[1]
25846 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
25847 y := v_1_0
25848 if v_1_1.Op != OpConst32 {
25849 continue
25850 }
25851 c := auxIntToInt32(v_1_1.AuxInt)
25852 if !(c&15 == 0) {
25853 continue
25854 }
25855 v.reset(OpRotateLeft16)
25856 v.AddArg2(x, y)
25857 return true
25858 }
25859 break
25860 }
25861
25862
25863
25864 for {
25865 x := v_0
25866 if v_1.Op != OpAdd16 {
25867 break
25868 }
25869 _ = v_1.Args[1]
25870 v_1_0 := v_1.Args[0]
25871 v_1_1 := v_1.Args[1]
25872 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
25873 y := v_1_0
25874 if v_1_1.Op != OpConst16 {
25875 continue
25876 }
25877 c := auxIntToInt16(v_1_1.AuxInt)
25878 if !(c&15 == 0) {
25879 continue
25880 }
25881 v.reset(OpRotateLeft16)
25882 v.AddArg2(x, y)
25883 return true
25884 }
25885 break
25886 }
25887
25888
25889
25890 for {
25891 x := v_0
25892 if v_1.Op != OpAdd8 {
25893 break
25894 }
25895 _ = v_1.Args[1]
25896 v_1_0 := v_1.Args[0]
25897 v_1_1 := v_1.Args[1]
25898 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
25899 y := v_1_0
25900 if v_1_1.Op != OpConst8 {
25901 continue
25902 }
25903 c := auxIntToInt8(v_1_1.AuxInt)
25904 if !(c&15 == 0) {
25905 continue
25906 }
25907 v.reset(OpRotateLeft16)
25908 v.AddArg2(x, y)
25909 return true
25910 }
25911 break
25912 }
25913
25914
25915
25916 for {
25917 x := v_0
25918 if v_1.Op != OpSub64 {
25919 break
25920 }
25921 y := v_1.Args[1]
25922 v_1_0 := v_1.Args[0]
25923 if v_1_0.Op != OpConst64 {
25924 break
25925 }
25926 c := auxIntToInt64(v_1_0.AuxInt)
25927 if !(c&15 == 0) {
25928 break
25929 }
25930 v.reset(OpRotateLeft16)
25931 v0 := b.NewValue0(v.Pos, OpNeg64, y.Type)
25932 v0.AddArg(y)
25933 v.AddArg2(x, v0)
25934 return true
25935 }
25936
25937
25938
25939 for {
25940 x := v_0
25941 if v_1.Op != OpSub32 {
25942 break
25943 }
25944 y := v_1.Args[1]
25945 v_1_0 := v_1.Args[0]
25946 if v_1_0.Op != OpConst32 {
25947 break
25948 }
25949 c := auxIntToInt32(v_1_0.AuxInt)
25950 if !(c&15 == 0) {
25951 break
25952 }
25953 v.reset(OpRotateLeft16)
25954 v0 := b.NewValue0(v.Pos, OpNeg32, y.Type)
25955 v0.AddArg(y)
25956 v.AddArg2(x, v0)
25957 return true
25958 }
25959
25960
25961
25962 for {
25963 x := v_0
25964 if v_1.Op != OpSub16 {
25965 break
25966 }
25967 y := v_1.Args[1]
25968 v_1_0 := v_1.Args[0]
25969 if v_1_0.Op != OpConst16 {
25970 break
25971 }
25972 c := auxIntToInt16(v_1_0.AuxInt)
25973 if !(c&15 == 0) {
25974 break
25975 }
25976 v.reset(OpRotateLeft16)
25977 v0 := b.NewValue0(v.Pos, OpNeg16, y.Type)
25978 v0.AddArg(y)
25979 v.AddArg2(x, v0)
25980 return true
25981 }
25982
25983
25984
25985 for {
25986 x := v_0
25987 if v_1.Op != OpSub8 {
25988 break
25989 }
25990 y := v_1.Args[1]
25991 v_1_0 := v_1.Args[0]
25992 if v_1_0.Op != OpConst8 {
25993 break
25994 }
25995 c := auxIntToInt8(v_1_0.AuxInt)
25996 if !(c&15 == 0) {
25997 break
25998 }
25999 v.reset(OpRotateLeft16)
26000 v0 := b.NewValue0(v.Pos, OpNeg8, y.Type)
26001 v0.AddArg(y)
26002 v.AddArg2(x, v0)
26003 return true
26004 }
26005
26006
26007
26008 for {
26009 x := v_0
26010 if v_1.Op != OpConst64 {
26011 break
26012 }
26013 t := v_1.Type
26014 c := auxIntToInt64(v_1.AuxInt)
26015 if !(config.PtrSize == 4) {
26016 break
26017 }
26018 v.reset(OpRotateLeft16)
26019 v0 := b.NewValue0(v.Pos, OpConst32, t)
26020 v0.AuxInt = int32ToAuxInt(int32(c))
26021 v.AddArg2(x, v0)
26022 return true
26023 }
26024
26025
26026
26027 for {
26028 if v_0.Op != OpRotateLeft16 {
26029 break
26030 }
26031 c := v_0.Args[1]
26032 x := v_0.Args[0]
26033 d := v_1
26034 if !(c.Type.Size() == 8 && d.Type.Size() == 8) {
26035 break
26036 }
26037 v.reset(OpRotateLeft16)
26038 v0 := b.NewValue0(v.Pos, OpAdd64, c.Type)
26039 v0.AddArg2(c, d)
26040 v.AddArg2(x, v0)
26041 return true
26042 }
26043
26044
26045
26046 for {
26047 if v_0.Op != OpRotateLeft16 {
26048 break
26049 }
26050 c := v_0.Args[1]
26051 x := v_0.Args[0]
26052 d := v_1
26053 if !(c.Type.Size() == 4 && d.Type.Size() == 4) {
26054 break
26055 }
26056 v.reset(OpRotateLeft16)
26057 v0 := b.NewValue0(v.Pos, OpAdd32, c.Type)
26058 v0.AddArg2(c, d)
26059 v.AddArg2(x, v0)
26060 return true
26061 }
26062
26063
26064
26065 for {
26066 if v_0.Op != OpRotateLeft16 {
26067 break
26068 }
26069 c := v_0.Args[1]
26070 x := v_0.Args[0]
26071 d := v_1
26072 if !(c.Type.Size() == 2 && d.Type.Size() == 2) {
26073 break
26074 }
26075 v.reset(OpRotateLeft16)
26076 v0 := b.NewValue0(v.Pos, OpAdd16, c.Type)
26077 v0.AddArg2(c, d)
26078 v.AddArg2(x, v0)
26079 return true
26080 }
26081
26082
26083
26084 for {
26085 if v_0.Op != OpRotateLeft16 {
26086 break
26087 }
26088 c := v_0.Args[1]
26089 x := v_0.Args[0]
26090 d := v_1
26091 if !(c.Type.Size() == 1 && d.Type.Size() == 1) {
26092 break
26093 }
26094 v.reset(OpRotateLeft16)
26095 v0 := b.NewValue0(v.Pos, OpAdd8, c.Type)
26096 v0.AddArg2(c, d)
26097 v.AddArg2(x, v0)
26098 return true
26099 }
26100 return false
26101 }
26102 func rewriteValuegeneric_OpRotateLeft32(v *Value) bool {
26103 v_1 := v.Args[1]
26104 v_0 := v.Args[0]
26105 b := v.Block
26106 config := b.Func.Config
26107
26108
26109
26110 for {
26111 x := v_0
26112 if v_1.Op != OpConst32 {
26113 break
26114 }
26115 c := auxIntToInt32(v_1.AuxInt)
26116 if !(c%32 == 0) {
26117 break
26118 }
26119 v.copyOf(x)
26120 return true
26121 }
26122
26123
26124
26125 for {
26126 x := v_0
26127 if v_1.Op != OpAnd64 {
26128 break
26129 }
26130 _ = v_1.Args[1]
26131 v_1_0 := v_1.Args[0]
26132 v_1_1 := v_1.Args[1]
26133 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
26134 y := v_1_0
26135 if v_1_1.Op != OpConst64 {
26136 continue
26137 }
26138 c := auxIntToInt64(v_1_1.AuxInt)
26139 if !(c&31 == 31) {
26140 continue
26141 }
26142 v.reset(OpRotateLeft32)
26143 v.AddArg2(x, y)
26144 return true
26145 }
26146 break
26147 }
26148
26149
26150
26151 for {
26152 x := v_0
26153 if v_1.Op != OpAnd32 {
26154 break
26155 }
26156 _ = v_1.Args[1]
26157 v_1_0 := v_1.Args[0]
26158 v_1_1 := v_1.Args[1]
26159 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
26160 y := v_1_0
26161 if v_1_1.Op != OpConst32 {
26162 continue
26163 }
26164 c := auxIntToInt32(v_1_1.AuxInt)
26165 if !(c&31 == 31) {
26166 continue
26167 }
26168 v.reset(OpRotateLeft32)
26169 v.AddArg2(x, y)
26170 return true
26171 }
26172 break
26173 }
26174
26175
26176
26177 for {
26178 x := v_0
26179 if v_1.Op != OpAnd16 {
26180 break
26181 }
26182 _ = v_1.Args[1]
26183 v_1_0 := v_1.Args[0]
26184 v_1_1 := v_1.Args[1]
26185 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
26186 y := v_1_0
26187 if v_1_1.Op != OpConst16 {
26188 continue
26189 }
26190 c := auxIntToInt16(v_1_1.AuxInt)
26191 if !(c&31 == 31) {
26192 continue
26193 }
26194 v.reset(OpRotateLeft32)
26195 v.AddArg2(x, y)
26196 return true
26197 }
26198 break
26199 }
26200
26201
26202
26203 for {
26204 x := v_0
26205 if v_1.Op != OpAnd8 {
26206 break
26207 }
26208 _ = v_1.Args[1]
26209 v_1_0 := v_1.Args[0]
26210 v_1_1 := v_1.Args[1]
26211 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
26212 y := v_1_0
26213 if v_1_1.Op != OpConst8 {
26214 continue
26215 }
26216 c := auxIntToInt8(v_1_1.AuxInt)
26217 if !(c&31 == 31) {
26218 continue
26219 }
26220 v.reset(OpRotateLeft32)
26221 v.AddArg2(x, y)
26222 return true
26223 }
26224 break
26225 }
26226
26227
26228
26229 for {
26230 x := v_0
26231 if v_1.Op != OpNeg64 {
26232 break
26233 }
26234 v_1_0 := v_1.Args[0]
26235 if v_1_0.Op != OpAnd64 {
26236 break
26237 }
26238 _ = v_1_0.Args[1]
26239 v_1_0_0 := v_1_0.Args[0]
26240 v_1_0_1 := v_1_0.Args[1]
26241 for _i0 := 0; _i0 <= 1; _i0, v_1_0_0, v_1_0_1 = _i0+1, v_1_0_1, v_1_0_0 {
26242 y := v_1_0_0
26243 if v_1_0_1.Op != OpConst64 {
26244 continue
26245 }
26246 c := auxIntToInt64(v_1_0_1.AuxInt)
26247 if !(c&31 == 31) {
26248 continue
26249 }
26250 v.reset(OpRotateLeft32)
26251 v0 := b.NewValue0(v.Pos, OpNeg64, y.Type)
26252 v0.AddArg(y)
26253 v.AddArg2(x, v0)
26254 return true
26255 }
26256 break
26257 }
26258
26259
26260
26261 for {
26262 x := v_0
26263 if v_1.Op != OpNeg32 {
26264 break
26265 }
26266 v_1_0 := v_1.Args[0]
26267 if v_1_0.Op != OpAnd32 {
26268 break
26269 }
26270 _ = v_1_0.Args[1]
26271 v_1_0_0 := v_1_0.Args[0]
26272 v_1_0_1 := v_1_0.Args[1]
26273 for _i0 := 0; _i0 <= 1; _i0, v_1_0_0, v_1_0_1 = _i0+1, v_1_0_1, v_1_0_0 {
26274 y := v_1_0_0
26275 if v_1_0_1.Op != OpConst32 {
26276 continue
26277 }
26278 c := auxIntToInt32(v_1_0_1.AuxInt)
26279 if !(c&31 == 31) {
26280 continue
26281 }
26282 v.reset(OpRotateLeft32)
26283 v0 := b.NewValue0(v.Pos, OpNeg32, y.Type)
26284 v0.AddArg(y)
26285 v.AddArg2(x, v0)
26286 return true
26287 }
26288 break
26289 }
26290
26291
26292
26293 for {
26294 x := v_0
26295 if v_1.Op != OpNeg16 {
26296 break
26297 }
26298 v_1_0 := v_1.Args[0]
26299 if v_1_0.Op != OpAnd16 {
26300 break
26301 }
26302 _ = v_1_0.Args[1]
26303 v_1_0_0 := v_1_0.Args[0]
26304 v_1_0_1 := v_1_0.Args[1]
26305 for _i0 := 0; _i0 <= 1; _i0, v_1_0_0, v_1_0_1 = _i0+1, v_1_0_1, v_1_0_0 {
26306 y := v_1_0_0
26307 if v_1_0_1.Op != OpConst16 {
26308 continue
26309 }
26310 c := auxIntToInt16(v_1_0_1.AuxInt)
26311 if !(c&31 == 31) {
26312 continue
26313 }
26314 v.reset(OpRotateLeft32)
26315 v0 := b.NewValue0(v.Pos, OpNeg16, y.Type)
26316 v0.AddArg(y)
26317 v.AddArg2(x, v0)
26318 return true
26319 }
26320 break
26321 }
26322
26323
26324
26325 for {
26326 x := v_0
26327 if v_1.Op != OpNeg8 {
26328 break
26329 }
26330 v_1_0 := v_1.Args[0]
26331 if v_1_0.Op != OpAnd8 {
26332 break
26333 }
26334 _ = v_1_0.Args[1]
26335 v_1_0_0 := v_1_0.Args[0]
26336 v_1_0_1 := v_1_0.Args[1]
26337 for _i0 := 0; _i0 <= 1; _i0, v_1_0_0, v_1_0_1 = _i0+1, v_1_0_1, v_1_0_0 {
26338 y := v_1_0_0
26339 if v_1_0_1.Op != OpConst8 {
26340 continue
26341 }
26342 c := auxIntToInt8(v_1_0_1.AuxInt)
26343 if !(c&31 == 31) {
26344 continue
26345 }
26346 v.reset(OpRotateLeft32)
26347 v0 := b.NewValue0(v.Pos, OpNeg8, y.Type)
26348 v0.AddArg(y)
26349 v.AddArg2(x, v0)
26350 return true
26351 }
26352 break
26353 }
26354
26355
26356
26357 for {
26358 x := v_0
26359 if v_1.Op != OpAdd64 {
26360 break
26361 }
26362 _ = v_1.Args[1]
26363 v_1_0 := v_1.Args[0]
26364 v_1_1 := v_1.Args[1]
26365 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
26366 y := v_1_0
26367 if v_1_1.Op != OpConst64 {
26368 continue
26369 }
26370 c := auxIntToInt64(v_1_1.AuxInt)
26371 if !(c&31 == 0) {
26372 continue
26373 }
26374 v.reset(OpRotateLeft32)
26375 v.AddArg2(x, y)
26376 return true
26377 }
26378 break
26379 }
26380
26381
26382
26383 for {
26384 x := v_0
26385 if v_1.Op != OpAdd32 {
26386 break
26387 }
26388 _ = v_1.Args[1]
26389 v_1_0 := v_1.Args[0]
26390 v_1_1 := v_1.Args[1]
26391 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
26392 y := v_1_0
26393 if v_1_1.Op != OpConst32 {
26394 continue
26395 }
26396 c := auxIntToInt32(v_1_1.AuxInt)
26397 if !(c&31 == 0) {
26398 continue
26399 }
26400 v.reset(OpRotateLeft32)
26401 v.AddArg2(x, y)
26402 return true
26403 }
26404 break
26405 }
26406
26407
26408
26409 for {
26410 x := v_0
26411 if v_1.Op != OpAdd16 {
26412 break
26413 }
26414 _ = v_1.Args[1]
26415 v_1_0 := v_1.Args[0]
26416 v_1_1 := v_1.Args[1]
26417 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
26418 y := v_1_0
26419 if v_1_1.Op != OpConst16 {
26420 continue
26421 }
26422 c := auxIntToInt16(v_1_1.AuxInt)
26423 if !(c&31 == 0) {
26424 continue
26425 }
26426 v.reset(OpRotateLeft32)
26427 v.AddArg2(x, y)
26428 return true
26429 }
26430 break
26431 }
26432
26433
26434
26435 for {
26436 x := v_0
26437 if v_1.Op != OpAdd8 {
26438 break
26439 }
26440 _ = v_1.Args[1]
26441 v_1_0 := v_1.Args[0]
26442 v_1_1 := v_1.Args[1]
26443 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
26444 y := v_1_0
26445 if v_1_1.Op != OpConst8 {
26446 continue
26447 }
26448 c := auxIntToInt8(v_1_1.AuxInt)
26449 if !(c&31 == 0) {
26450 continue
26451 }
26452 v.reset(OpRotateLeft32)
26453 v.AddArg2(x, y)
26454 return true
26455 }
26456 break
26457 }
26458
26459
26460
26461 for {
26462 x := v_0
26463 if v_1.Op != OpSub64 {
26464 break
26465 }
26466 y := v_1.Args[1]
26467 v_1_0 := v_1.Args[0]
26468 if v_1_0.Op != OpConst64 {
26469 break
26470 }
26471 c := auxIntToInt64(v_1_0.AuxInt)
26472 if !(c&31 == 0) {
26473 break
26474 }
26475 v.reset(OpRotateLeft32)
26476 v0 := b.NewValue0(v.Pos, OpNeg64, y.Type)
26477 v0.AddArg(y)
26478 v.AddArg2(x, v0)
26479 return true
26480 }
26481
26482
26483
26484 for {
26485 x := v_0
26486 if v_1.Op != OpSub32 {
26487 break
26488 }
26489 y := v_1.Args[1]
26490 v_1_0 := v_1.Args[0]
26491 if v_1_0.Op != OpConst32 {
26492 break
26493 }
26494 c := auxIntToInt32(v_1_0.AuxInt)
26495 if !(c&31 == 0) {
26496 break
26497 }
26498 v.reset(OpRotateLeft32)
26499 v0 := b.NewValue0(v.Pos, OpNeg32, y.Type)
26500 v0.AddArg(y)
26501 v.AddArg2(x, v0)
26502 return true
26503 }
26504
26505
26506
26507 for {
26508 x := v_0
26509 if v_1.Op != OpSub16 {
26510 break
26511 }
26512 y := v_1.Args[1]
26513 v_1_0 := v_1.Args[0]
26514 if v_1_0.Op != OpConst16 {
26515 break
26516 }
26517 c := auxIntToInt16(v_1_0.AuxInt)
26518 if !(c&31 == 0) {
26519 break
26520 }
26521 v.reset(OpRotateLeft32)
26522 v0 := b.NewValue0(v.Pos, OpNeg16, y.Type)
26523 v0.AddArg(y)
26524 v.AddArg2(x, v0)
26525 return true
26526 }
26527
26528
26529
26530 for {
26531 x := v_0
26532 if v_1.Op != OpSub8 {
26533 break
26534 }
26535 y := v_1.Args[1]
26536 v_1_0 := v_1.Args[0]
26537 if v_1_0.Op != OpConst8 {
26538 break
26539 }
26540 c := auxIntToInt8(v_1_0.AuxInt)
26541 if !(c&31 == 0) {
26542 break
26543 }
26544 v.reset(OpRotateLeft32)
26545 v0 := b.NewValue0(v.Pos, OpNeg8, y.Type)
26546 v0.AddArg(y)
26547 v.AddArg2(x, v0)
26548 return true
26549 }
26550
26551
26552
26553 for {
26554 x := v_0
26555 if v_1.Op != OpConst64 {
26556 break
26557 }
26558 t := v_1.Type
26559 c := auxIntToInt64(v_1.AuxInt)
26560 if !(config.PtrSize == 4) {
26561 break
26562 }
26563 v.reset(OpRotateLeft32)
26564 v0 := b.NewValue0(v.Pos, OpConst32, t)
26565 v0.AuxInt = int32ToAuxInt(int32(c))
26566 v.AddArg2(x, v0)
26567 return true
26568 }
26569
26570
26571
26572 for {
26573 if v_0.Op != OpRotateLeft32 {
26574 break
26575 }
26576 c := v_0.Args[1]
26577 x := v_0.Args[0]
26578 d := v_1
26579 if !(c.Type.Size() == 8 && d.Type.Size() == 8) {
26580 break
26581 }
26582 v.reset(OpRotateLeft32)
26583 v0 := b.NewValue0(v.Pos, OpAdd64, c.Type)
26584 v0.AddArg2(c, d)
26585 v.AddArg2(x, v0)
26586 return true
26587 }
26588
26589
26590
26591 for {
26592 if v_0.Op != OpRotateLeft32 {
26593 break
26594 }
26595 c := v_0.Args[1]
26596 x := v_0.Args[0]
26597 d := v_1
26598 if !(c.Type.Size() == 4 && d.Type.Size() == 4) {
26599 break
26600 }
26601 v.reset(OpRotateLeft32)
26602 v0 := b.NewValue0(v.Pos, OpAdd32, c.Type)
26603 v0.AddArg2(c, d)
26604 v.AddArg2(x, v0)
26605 return true
26606 }
26607
26608
26609
26610 for {
26611 if v_0.Op != OpRotateLeft32 {
26612 break
26613 }
26614 c := v_0.Args[1]
26615 x := v_0.Args[0]
26616 d := v_1
26617 if !(c.Type.Size() == 2 && d.Type.Size() == 2) {
26618 break
26619 }
26620 v.reset(OpRotateLeft32)
26621 v0 := b.NewValue0(v.Pos, OpAdd16, c.Type)
26622 v0.AddArg2(c, d)
26623 v.AddArg2(x, v0)
26624 return true
26625 }
26626
26627
26628
26629 for {
26630 if v_0.Op != OpRotateLeft32 {
26631 break
26632 }
26633 c := v_0.Args[1]
26634 x := v_0.Args[0]
26635 d := v_1
26636 if !(c.Type.Size() == 1 && d.Type.Size() == 1) {
26637 break
26638 }
26639 v.reset(OpRotateLeft32)
26640 v0 := b.NewValue0(v.Pos, OpAdd8, c.Type)
26641 v0.AddArg2(c, d)
26642 v.AddArg2(x, v0)
26643 return true
26644 }
26645 return false
26646 }
26647 func rewriteValuegeneric_OpRotateLeft64(v *Value) bool {
26648 v_1 := v.Args[1]
26649 v_0 := v.Args[0]
26650 b := v.Block
26651 config := b.Func.Config
26652
26653
26654
26655 for {
26656 x := v_0
26657 if v_1.Op != OpConst64 {
26658 break
26659 }
26660 c := auxIntToInt64(v_1.AuxInt)
26661 if !(c%64 == 0) {
26662 break
26663 }
26664 v.copyOf(x)
26665 return true
26666 }
26667
26668
26669
26670 for {
26671 x := v_0
26672 if v_1.Op != OpAnd64 {
26673 break
26674 }
26675 _ = v_1.Args[1]
26676 v_1_0 := v_1.Args[0]
26677 v_1_1 := v_1.Args[1]
26678 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
26679 y := v_1_0
26680 if v_1_1.Op != OpConst64 {
26681 continue
26682 }
26683 c := auxIntToInt64(v_1_1.AuxInt)
26684 if !(c&63 == 63) {
26685 continue
26686 }
26687 v.reset(OpRotateLeft64)
26688 v.AddArg2(x, y)
26689 return true
26690 }
26691 break
26692 }
26693
26694
26695
26696 for {
26697 x := v_0
26698 if v_1.Op != OpAnd32 {
26699 break
26700 }
26701 _ = v_1.Args[1]
26702 v_1_0 := v_1.Args[0]
26703 v_1_1 := v_1.Args[1]
26704 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
26705 y := v_1_0
26706 if v_1_1.Op != OpConst32 {
26707 continue
26708 }
26709 c := auxIntToInt32(v_1_1.AuxInt)
26710 if !(c&63 == 63) {
26711 continue
26712 }
26713 v.reset(OpRotateLeft64)
26714 v.AddArg2(x, y)
26715 return true
26716 }
26717 break
26718 }
26719
26720
26721
26722 for {
26723 x := v_0
26724 if v_1.Op != OpAnd16 {
26725 break
26726 }
26727 _ = v_1.Args[1]
26728 v_1_0 := v_1.Args[0]
26729 v_1_1 := v_1.Args[1]
26730 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
26731 y := v_1_0
26732 if v_1_1.Op != OpConst16 {
26733 continue
26734 }
26735 c := auxIntToInt16(v_1_1.AuxInt)
26736 if !(c&63 == 63) {
26737 continue
26738 }
26739 v.reset(OpRotateLeft64)
26740 v.AddArg2(x, y)
26741 return true
26742 }
26743 break
26744 }
26745
26746
26747
26748 for {
26749 x := v_0
26750 if v_1.Op != OpAnd8 {
26751 break
26752 }
26753 _ = v_1.Args[1]
26754 v_1_0 := v_1.Args[0]
26755 v_1_1 := v_1.Args[1]
26756 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
26757 y := v_1_0
26758 if v_1_1.Op != OpConst8 {
26759 continue
26760 }
26761 c := auxIntToInt8(v_1_1.AuxInt)
26762 if !(c&63 == 63) {
26763 continue
26764 }
26765 v.reset(OpRotateLeft64)
26766 v.AddArg2(x, y)
26767 return true
26768 }
26769 break
26770 }
26771
26772
26773
26774 for {
26775 x := v_0
26776 if v_1.Op != OpNeg64 {
26777 break
26778 }
26779 v_1_0 := v_1.Args[0]
26780 if v_1_0.Op != OpAnd64 {
26781 break
26782 }
26783 _ = v_1_0.Args[1]
26784 v_1_0_0 := v_1_0.Args[0]
26785 v_1_0_1 := v_1_0.Args[1]
26786 for _i0 := 0; _i0 <= 1; _i0, v_1_0_0, v_1_0_1 = _i0+1, v_1_0_1, v_1_0_0 {
26787 y := v_1_0_0
26788 if v_1_0_1.Op != OpConst64 {
26789 continue
26790 }
26791 c := auxIntToInt64(v_1_0_1.AuxInt)
26792 if !(c&63 == 63) {
26793 continue
26794 }
26795 v.reset(OpRotateLeft64)
26796 v0 := b.NewValue0(v.Pos, OpNeg64, y.Type)
26797 v0.AddArg(y)
26798 v.AddArg2(x, v0)
26799 return true
26800 }
26801 break
26802 }
26803
26804
26805
26806 for {
26807 x := v_0
26808 if v_1.Op != OpNeg32 {
26809 break
26810 }
26811 v_1_0 := v_1.Args[0]
26812 if v_1_0.Op != OpAnd32 {
26813 break
26814 }
26815 _ = v_1_0.Args[1]
26816 v_1_0_0 := v_1_0.Args[0]
26817 v_1_0_1 := v_1_0.Args[1]
26818 for _i0 := 0; _i0 <= 1; _i0, v_1_0_0, v_1_0_1 = _i0+1, v_1_0_1, v_1_0_0 {
26819 y := v_1_0_0
26820 if v_1_0_1.Op != OpConst32 {
26821 continue
26822 }
26823 c := auxIntToInt32(v_1_0_1.AuxInt)
26824 if !(c&63 == 63) {
26825 continue
26826 }
26827 v.reset(OpRotateLeft64)
26828 v0 := b.NewValue0(v.Pos, OpNeg32, y.Type)
26829 v0.AddArg(y)
26830 v.AddArg2(x, v0)
26831 return true
26832 }
26833 break
26834 }
26835
26836
26837
26838 for {
26839 x := v_0
26840 if v_1.Op != OpNeg16 {
26841 break
26842 }
26843 v_1_0 := v_1.Args[0]
26844 if v_1_0.Op != OpAnd16 {
26845 break
26846 }
26847 _ = v_1_0.Args[1]
26848 v_1_0_0 := v_1_0.Args[0]
26849 v_1_0_1 := v_1_0.Args[1]
26850 for _i0 := 0; _i0 <= 1; _i0, v_1_0_0, v_1_0_1 = _i0+1, v_1_0_1, v_1_0_0 {
26851 y := v_1_0_0
26852 if v_1_0_1.Op != OpConst16 {
26853 continue
26854 }
26855 c := auxIntToInt16(v_1_0_1.AuxInt)
26856 if !(c&63 == 63) {
26857 continue
26858 }
26859 v.reset(OpRotateLeft64)
26860 v0 := b.NewValue0(v.Pos, OpNeg16, y.Type)
26861 v0.AddArg(y)
26862 v.AddArg2(x, v0)
26863 return true
26864 }
26865 break
26866 }
26867
26868
26869
26870 for {
26871 x := v_0
26872 if v_1.Op != OpNeg8 {
26873 break
26874 }
26875 v_1_0 := v_1.Args[0]
26876 if v_1_0.Op != OpAnd8 {
26877 break
26878 }
26879 _ = v_1_0.Args[1]
26880 v_1_0_0 := v_1_0.Args[0]
26881 v_1_0_1 := v_1_0.Args[1]
26882 for _i0 := 0; _i0 <= 1; _i0, v_1_0_0, v_1_0_1 = _i0+1, v_1_0_1, v_1_0_0 {
26883 y := v_1_0_0
26884 if v_1_0_1.Op != OpConst8 {
26885 continue
26886 }
26887 c := auxIntToInt8(v_1_0_1.AuxInt)
26888 if !(c&63 == 63) {
26889 continue
26890 }
26891 v.reset(OpRotateLeft64)
26892 v0 := b.NewValue0(v.Pos, OpNeg8, y.Type)
26893 v0.AddArg(y)
26894 v.AddArg2(x, v0)
26895 return true
26896 }
26897 break
26898 }
26899
26900
26901
26902 for {
26903 x := v_0
26904 if v_1.Op != OpAdd64 {
26905 break
26906 }
26907 _ = v_1.Args[1]
26908 v_1_0 := v_1.Args[0]
26909 v_1_1 := v_1.Args[1]
26910 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
26911 y := v_1_0
26912 if v_1_1.Op != OpConst64 {
26913 continue
26914 }
26915 c := auxIntToInt64(v_1_1.AuxInt)
26916 if !(c&63 == 0) {
26917 continue
26918 }
26919 v.reset(OpRotateLeft64)
26920 v.AddArg2(x, y)
26921 return true
26922 }
26923 break
26924 }
26925
26926
26927
26928 for {
26929 x := v_0
26930 if v_1.Op != OpAdd32 {
26931 break
26932 }
26933 _ = v_1.Args[1]
26934 v_1_0 := v_1.Args[0]
26935 v_1_1 := v_1.Args[1]
26936 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
26937 y := v_1_0
26938 if v_1_1.Op != OpConst32 {
26939 continue
26940 }
26941 c := auxIntToInt32(v_1_1.AuxInt)
26942 if !(c&63 == 0) {
26943 continue
26944 }
26945 v.reset(OpRotateLeft64)
26946 v.AddArg2(x, y)
26947 return true
26948 }
26949 break
26950 }
26951
26952
26953
26954 for {
26955 x := v_0
26956 if v_1.Op != OpAdd16 {
26957 break
26958 }
26959 _ = v_1.Args[1]
26960 v_1_0 := v_1.Args[0]
26961 v_1_1 := v_1.Args[1]
26962 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
26963 y := v_1_0
26964 if v_1_1.Op != OpConst16 {
26965 continue
26966 }
26967 c := auxIntToInt16(v_1_1.AuxInt)
26968 if !(c&63 == 0) {
26969 continue
26970 }
26971 v.reset(OpRotateLeft64)
26972 v.AddArg2(x, y)
26973 return true
26974 }
26975 break
26976 }
26977
26978
26979
26980 for {
26981 x := v_0
26982 if v_1.Op != OpAdd8 {
26983 break
26984 }
26985 _ = v_1.Args[1]
26986 v_1_0 := v_1.Args[0]
26987 v_1_1 := v_1.Args[1]
26988 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
26989 y := v_1_0
26990 if v_1_1.Op != OpConst8 {
26991 continue
26992 }
26993 c := auxIntToInt8(v_1_1.AuxInt)
26994 if !(c&63 == 0) {
26995 continue
26996 }
26997 v.reset(OpRotateLeft64)
26998 v.AddArg2(x, y)
26999 return true
27000 }
27001 break
27002 }
27003
27004
27005
27006 for {
27007 x := v_0
27008 if v_1.Op != OpSub64 {
27009 break
27010 }
27011 y := v_1.Args[1]
27012 v_1_0 := v_1.Args[0]
27013 if v_1_0.Op != OpConst64 {
27014 break
27015 }
27016 c := auxIntToInt64(v_1_0.AuxInt)
27017 if !(c&63 == 0) {
27018 break
27019 }
27020 v.reset(OpRotateLeft64)
27021 v0 := b.NewValue0(v.Pos, OpNeg64, y.Type)
27022 v0.AddArg(y)
27023 v.AddArg2(x, v0)
27024 return true
27025 }
27026
27027
27028
27029 for {
27030 x := v_0
27031 if v_1.Op != OpSub32 {
27032 break
27033 }
27034 y := v_1.Args[1]
27035 v_1_0 := v_1.Args[0]
27036 if v_1_0.Op != OpConst32 {
27037 break
27038 }
27039 c := auxIntToInt32(v_1_0.AuxInt)
27040 if !(c&63 == 0) {
27041 break
27042 }
27043 v.reset(OpRotateLeft64)
27044 v0 := b.NewValue0(v.Pos, OpNeg32, y.Type)
27045 v0.AddArg(y)
27046 v.AddArg2(x, v0)
27047 return true
27048 }
27049
27050
27051
27052 for {
27053 x := v_0
27054 if v_1.Op != OpSub16 {
27055 break
27056 }
27057 y := v_1.Args[1]
27058 v_1_0 := v_1.Args[0]
27059 if v_1_0.Op != OpConst16 {
27060 break
27061 }
27062 c := auxIntToInt16(v_1_0.AuxInt)
27063 if !(c&63 == 0) {
27064 break
27065 }
27066 v.reset(OpRotateLeft64)
27067 v0 := b.NewValue0(v.Pos, OpNeg16, y.Type)
27068 v0.AddArg(y)
27069 v.AddArg2(x, v0)
27070 return true
27071 }
27072
27073
27074
27075 for {
27076 x := v_0
27077 if v_1.Op != OpSub8 {
27078 break
27079 }
27080 y := v_1.Args[1]
27081 v_1_0 := v_1.Args[0]
27082 if v_1_0.Op != OpConst8 {
27083 break
27084 }
27085 c := auxIntToInt8(v_1_0.AuxInt)
27086 if !(c&63 == 0) {
27087 break
27088 }
27089 v.reset(OpRotateLeft64)
27090 v0 := b.NewValue0(v.Pos, OpNeg8, y.Type)
27091 v0.AddArg(y)
27092 v.AddArg2(x, v0)
27093 return true
27094 }
27095
27096
27097
27098 for {
27099 x := v_0
27100 if v_1.Op != OpConst64 {
27101 break
27102 }
27103 t := v_1.Type
27104 c := auxIntToInt64(v_1.AuxInt)
27105 if !(config.PtrSize == 4) {
27106 break
27107 }
27108 v.reset(OpRotateLeft64)
27109 v0 := b.NewValue0(v.Pos, OpConst32, t)
27110 v0.AuxInt = int32ToAuxInt(int32(c))
27111 v.AddArg2(x, v0)
27112 return true
27113 }
27114
27115
27116
27117 for {
27118 if v_0.Op != OpRotateLeft64 {
27119 break
27120 }
27121 c := v_0.Args[1]
27122 x := v_0.Args[0]
27123 d := v_1
27124 if !(c.Type.Size() == 8 && d.Type.Size() == 8) {
27125 break
27126 }
27127 v.reset(OpRotateLeft64)
27128 v0 := b.NewValue0(v.Pos, OpAdd64, c.Type)
27129 v0.AddArg2(c, d)
27130 v.AddArg2(x, v0)
27131 return true
27132 }
27133
27134
27135
27136 for {
27137 if v_0.Op != OpRotateLeft64 {
27138 break
27139 }
27140 c := v_0.Args[1]
27141 x := v_0.Args[0]
27142 d := v_1
27143 if !(c.Type.Size() == 4 && d.Type.Size() == 4) {
27144 break
27145 }
27146 v.reset(OpRotateLeft64)
27147 v0 := b.NewValue0(v.Pos, OpAdd32, c.Type)
27148 v0.AddArg2(c, d)
27149 v.AddArg2(x, v0)
27150 return true
27151 }
27152
27153
27154
27155 for {
27156 if v_0.Op != OpRotateLeft64 {
27157 break
27158 }
27159 c := v_0.Args[1]
27160 x := v_0.Args[0]
27161 d := v_1
27162 if !(c.Type.Size() == 2 && d.Type.Size() == 2) {
27163 break
27164 }
27165 v.reset(OpRotateLeft64)
27166 v0 := b.NewValue0(v.Pos, OpAdd16, c.Type)
27167 v0.AddArg2(c, d)
27168 v.AddArg2(x, v0)
27169 return true
27170 }
27171
27172
27173
27174 for {
27175 if v_0.Op != OpRotateLeft64 {
27176 break
27177 }
27178 c := v_0.Args[1]
27179 x := v_0.Args[0]
27180 d := v_1
27181 if !(c.Type.Size() == 1 && d.Type.Size() == 1) {
27182 break
27183 }
27184 v.reset(OpRotateLeft64)
27185 v0 := b.NewValue0(v.Pos, OpAdd8, c.Type)
27186 v0.AddArg2(c, d)
27187 v.AddArg2(x, v0)
27188 return true
27189 }
27190 return false
27191 }
27192 func rewriteValuegeneric_OpRotateLeft8(v *Value) bool {
27193 v_1 := v.Args[1]
27194 v_0 := v.Args[0]
27195 b := v.Block
27196 config := b.Func.Config
27197
27198
27199
27200 for {
27201 x := v_0
27202 if v_1.Op != OpConst8 {
27203 break
27204 }
27205 c := auxIntToInt8(v_1.AuxInt)
27206 if !(c%8 == 0) {
27207 break
27208 }
27209 v.copyOf(x)
27210 return true
27211 }
27212
27213
27214
27215 for {
27216 x := v_0
27217 if v_1.Op != OpAnd64 {
27218 break
27219 }
27220 _ = v_1.Args[1]
27221 v_1_0 := v_1.Args[0]
27222 v_1_1 := v_1.Args[1]
27223 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
27224 y := v_1_0
27225 if v_1_1.Op != OpConst64 {
27226 continue
27227 }
27228 c := auxIntToInt64(v_1_1.AuxInt)
27229 if !(c&7 == 7) {
27230 continue
27231 }
27232 v.reset(OpRotateLeft8)
27233 v.AddArg2(x, y)
27234 return true
27235 }
27236 break
27237 }
27238
27239
27240
27241 for {
27242 x := v_0
27243 if v_1.Op != OpAnd32 {
27244 break
27245 }
27246 _ = v_1.Args[1]
27247 v_1_0 := v_1.Args[0]
27248 v_1_1 := v_1.Args[1]
27249 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
27250 y := v_1_0
27251 if v_1_1.Op != OpConst32 {
27252 continue
27253 }
27254 c := auxIntToInt32(v_1_1.AuxInt)
27255 if !(c&7 == 7) {
27256 continue
27257 }
27258 v.reset(OpRotateLeft8)
27259 v.AddArg2(x, y)
27260 return true
27261 }
27262 break
27263 }
27264
27265
27266
27267 for {
27268 x := v_0
27269 if v_1.Op != OpAnd16 {
27270 break
27271 }
27272 _ = v_1.Args[1]
27273 v_1_0 := v_1.Args[0]
27274 v_1_1 := v_1.Args[1]
27275 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
27276 y := v_1_0
27277 if v_1_1.Op != OpConst16 {
27278 continue
27279 }
27280 c := auxIntToInt16(v_1_1.AuxInt)
27281 if !(c&7 == 7) {
27282 continue
27283 }
27284 v.reset(OpRotateLeft8)
27285 v.AddArg2(x, y)
27286 return true
27287 }
27288 break
27289 }
27290
27291
27292
27293 for {
27294 x := v_0
27295 if v_1.Op != OpAnd8 {
27296 break
27297 }
27298 _ = v_1.Args[1]
27299 v_1_0 := v_1.Args[0]
27300 v_1_1 := v_1.Args[1]
27301 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
27302 y := v_1_0
27303 if v_1_1.Op != OpConst8 {
27304 continue
27305 }
27306 c := auxIntToInt8(v_1_1.AuxInt)
27307 if !(c&7 == 7) {
27308 continue
27309 }
27310 v.reset(OpRotateLeft8)
27311 v.AddArg2(x, y)
27312 return true
27313 }
27314 break
27315 }
27316
27317
27318
27319 for {
27320 x := v_0
27321 if v_1.Op != OpNeg64 {
27322 break
27323 }
27324 v_1_0 := v_1.Args[0]
27325 if v_1_0.Op != OpAnd64 {
27326 break
27327 }
27328 _ = v_1_0.Args[1]
27329 v_1_0_0 := v_1_0.Args[0]
27330 v_1_0_1 := v_1_0.Args[1]
27331 for _i0 := 0; _i0 <= 1; _i0, v_1_0_0, v_1_0_1 = _i0+1, v_1_0_1, v_1_0_0 {
27332 y := v_1_0_0
27333 if v_1_0_1.Op != OpConst64 {
27334 continue
27335 }
27336 c := auxIntToInt64(v_1_0_1.AuxInt)
27337 if !(c&7 == 7) {
27338 continue
27339 }
27340 v.reset(OpRotateLeft8)
27341 v0 := b.NewValue0(v.Pos, OpNeg64, y.Type)
27342 v0.AddArg(y)
27343 v.AddArg2(x, v0)
27344 return true
27345 }
27346 break
27347 }
27348
27349
27350
27351 for {
27352 x := v_0
27353 if v_1.Op != OpNeg32 {
27354 break
27355 }
27356 v_1_0 := v_1.Args[0]
27357 if v_1_0.Op != OpAnd32 {
27358 break
27359 }
27360 _ = v_1_0.Args[1]
27361 v_1_0_0 := v_1_0.Args[0]
27362 v_1_0_1 := v_1_0.Args[1]
27363 for _i0 := 0; _i0 <= 1; _i0, v_1_0_0, v_1_0_1 = _i0+1, v_1_0_1, v_1_0_0 {
27364 y := v_1_0_0
27365 if v_1_0_1.Op != OpConst32 {
27366 continue
27367 }
27368 c := auxIntToInt32(v_1_0_1.AuxInt)
27369 if !(c&7 == 7) {
27370 continue
27371 }
27372 v.reset(OpRotateLeft8)
27373 v0 := b.NewValue0(v.Pos, OpNeg32, y.Type)
27374 v0.AddArg(y)
27375 v.AddArg2(x, v0)
27376 return true
27377 }
27378 break
27379 }
27380
27381
27382
27383 for {
27384 x := v_0
27385 if v_1.Op != OpNeg16 {
27386 break
27387 }
27388 v_1_0 := v_1.Args[0]
27389 if v_1_0.Op != OpAnd16 {
27390 break
27391 }
27392 _ = v_1_0.Args[1]
27393 v_1_0_0 := v_1_0.Args[0]
27394 v_1_0_1 := v_1_0.Args[1]
27395 for _i0 := 0; _i0 <= 1; _i0, v_1_0_0, v_1_0_1 = _i0+1, v_1_0_1, v_1_0_0 {
27396 y := v_1_0_0
27397 if v_1_0_1.Op != OpConst16 {
27398 continue
27399 }
27400 c := auxIntToInt16(v_1_0_1.AuxInt)
27401 if !(c&7 == 7) {
27402 continue
27403 }
27404 v.reset(OpRotateLeft8)
27405 v0 := b.NewValue0(v.Pos, OpNeg16, y.Type)
27406 v0.AddArg(y)
27407 v.AddArg2(x, v0)
27408 return true
27409 }
27410 break
27411 }
27412
27413
27414
27415 for {
27416 x := v_0
27417 if v_1.Op != OpNeg8 {
27418 break
27419 }
27420 v_1_0 := v_1.Args[0]
27421 if v_1_0.Op != OpAnd8 {
27422 break
27423 }
27424 _ = v_1_0.Args[1]
27425 v_1_0_0 := v_1_0.Args[0]
27426 v_1_0_1 := v_1_0.Args[1]
27427 for _i0 := 0; _i0 <= 1; _i0, v_1_0_0, v_1_0_1 = _i0+1, v_1_0_1, v_1_0_0 {
27428 y := v_1_0_0
27429 if v_1_0_1.Op != OpConst8 {
27430 continue
27431 }
27432 c := auxIntToInt8(v_1_0_1.AuxInt)
27433 if !(c&7 == 7) {
27434 continue
27435 }
27436 v.reset(OpRotateLeft8)
27437 v0 := b.NewValue0(v.Pos, OpNeg8, y.Type)
27438 v0.AddArg(y)
27439 v.AddArg2(x, v0)
27440 return true
27441 }
27442 break
27443 }
27444
27445
27446
27447 for {
27448 x := v_0
27449 if v_1.Op != OpAdd64 {
27450 break
27451 }
27452 _ = v_1.Args[1]
27453 v_1_0 := v_1.Args[0]
27454 v_1_1 := v_1.Args[1]
27455 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
27456 y := v_1_0
27457 if v_1_1.Op != OpConst64 {
27458 continue
27459 }
27460 c := auxIntToInt64(v_1_1.AuxInt)
27461 if !(c&7 == 0) {
27462 continue
27463 }
27464 v.reset(OpRotateLeft8)
27465 v.AddArg2(x, y)
27466 return true
27467 }
27468 break
27469 }
27470
27471
27472
27473 for {
27474 x := v_0
27475 if v_1.Op != OpAdd32 {
27476 break
27477 }
27478 _ = v_1.Args[1]
27479 v_1_0 := v_1.Args[0]
27480 v_1_1 := v_1.Args[1]
27481 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
27482 y := v_1_0
27483 if v_1_1.Op != OpConst32 {
27484 continue
27485 }
27486 c := auxIntToInt32(v_1_1.AuxInt)
27487 if !(c&7 == 0) {
27488 continue
27489 }
27490 v.reset(OpRotateLeft8)
27491 v.AddArg2(x, y)
27492 return true
27493 }
27494 break
27495 }
27496
27497
27498
27499 for {
27500 x := v_0
27501 if v_1.Op != OpAdd16 {
27502 break
27503 }
27504 _ = v_1.Args[1]
27505 v_1_0 := v_1.Args[0]
27506 v_1_1 := v_1.Args[1]
27507 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
27508 y := v_1_0
27509 if v_1_1.Op != OpConst16 {
27510 continue
27511 }
27512 c := auxIntToInt16(v_1_1.AuxInt)
27513 if !(c&7 == 0) {
27514 continue
27515 }
27516 v.reset(OpRotateLeft8)
27517 v.AddArg2(x, y)
27518 return true
27519 }
27520 break
27521 }
27522
27523
27524
27525 for {
27526 x := v_0
27527 if v_1.Op != OpAdd8 {
27528 break
27529 }
27530 _ = v_1.Args[1]
27531 v_1_0 := v_1.Args[0]
27532 v_1_1 := v_1.Args[1]
27533 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
27534 y := v_1_0
27535 if v_1_1.Op != OpConst8 {
27536 continue
27537 }
27538 c := auxIntToInt8(v_1_1.AuxInt)
27539 if !(c&7 == 0) {
27540 continue
27541 }
27542 v.reset(OpRotateLeft8)
27543 v.AddArg2(x, y)
27544 return true
27545 }
27546 break
27547 }
27548
27549
27550
27551 for {
27552 x := v_0
27553 if v_1.Op != OpSub64 {
27554 break
27555 }
27556 y := v_1.Args[1]
27557 v_1_0 := v_1.Args[0]
27558 if v_1_0.Op != OpConst64 {
27559 break
27560 }
27561 c := auxIntToInt64(v_1_0.AuxInt)
27562 if !(c&7 == 0) {
27563 break
27564 }
27565 v.reset(OpRotateLeft8)
27566 v0 := b.NewValue0(v.Pos, OpNeg64, y.Type)
27567 v0.AddArg(y)
27568 v.AddArg2(x, v0)
27569 return true
27570 }
27571
27572
27573
27574 for {
27575 x := v_0
27576 if v_1.Op != OpSub32 {
27577 break
27578 }
27579 y := v_1.Args[1]
27580 v_1_0 := v_1.Args[0]
27581 if v_1_0.Op != OpConst32 {
27582 break
27583 }
27584 c := auxIntToInt32(v_1_0.AuxInt)
27585 if !(c&7 == 0) {
27586 break
27587 }
27588 v.reset(OpRotateLeft8)
27589 v0 := b.NewValue0(v.Pos, OpNeg32, y.Type)
27590 v0.AddArg(y)
27591 v.AddArg2(x, v0)
27592 return true
27593 }
27594
27595
27596
27597 for {
27598 x := v_0
27599 if v_1.Op != OpSub16 {
27600 break
27601 }
27602 y := v_1.Args[1]
27603 v_1_0 := v_1.Args[0]
27604 if v_1_0.Op != OpConst16 {
27605 break
27606 }
27607 c := auxIntToInt16(v_1_0.AuxInt)
27608 if !(c&7 == 0) {
27609 break
27610 }
27611 v.reset(OpRotateLeft8)
27612 v0 := b.NewValue0(v.Pos, OpNeg16, y.Type)
27613 v0.AddArg(y)
27614 v.AddArg2(x, v0)
27615 return true
27616 }
27617
27618
27619
27620 for {
27621 x := v_0
27622 if v_1.Op != OpSub8 {
27623 break
27624 }
27625 y := v_1.Args[1]
27626 v_1_0 := v_1.Args[0]
27627 if v_1_0.Op != OpConst8 {
27628 break
27629 }
27630 c := auxIntToInt8(v_1_0.AuxInt)
27631 if !(c&7 == 0) {
27632 break
27633 }
27634 v.reset(OpRotateLeft8)
27635 v0 := b.NewValue0(v.Pos, OpNeg8, y.Type)
27636 v0.AddArg(y)
27637 v.AddArg2(x, v0)
27638 return true
27639 }
27640
27641
27642
27643 for {
27644 x := v_0
27645 if v_1.Op != OpConst64 {
27646 break
27647 }
27648 t := v_1.Type
27649 c := auxIntToInt64(v_1.AuxInt)
27650 if !(config.PtrSize == 4) {
27651 break
27652 }
27653 v.reset(OpRotateLeft8)
27654 v0 := b.NewValue0(v.Pos, OpConst32, t)
27655 v0.AuxInt = int32ToAuxInt(int32(c))
27656 v.AddArg2(x, v0)
27657 return true
27658 }
27659
27660
27661
27662 for {
27663 if v_0.Op != OpRotateLeft8 {
27664 break
27665 }
27666 c := v_0.Args[1]
27667 x := v_0.Args[0]
27668 d := v_1
27669 if !(c.Type.Size() == 8 && d.Type.Size() == 8) {
27670 break
27671 }
27672 v.reset(OpRotateLeft8)
27673 v0 := b.NewValue0(v.Pos, OpAdd64, c.Type)
27674 v0.AddArg2(c, d)
27675 v.AddArg2(x, v0)
27676 return true
27677 }
27678
27679
27680
27681 for {
27682 if v_0.Op != OpRotateLeft8 {
27683 break
27684 }
27685 c := v_0.Args[1]
27686 x := v_0.Args[0]
27687 d := v_1
27688 if !(c.Type.Size() == 4 && d.Type.Size() == 4) {
27689 break
27690 }
27691 v.reset(OpRotateLeft8)
27692 v0 := b.NewValue0(v.Pos, OpAdd32, c.Type)
27693 v0.AddArg2(c, d)
27694 v.AddArg2(x, v0)
27695 return true
27696 }
27697
27698
27699
27700 for {
27701 if v_0.Op != OpRotateLeft8 {
27702 break
27703 }
27704 c := v_0.Args[1]
27705 x := v_0.Args[0]
27706 d := v_1
27707 if !(c.Type.Size() == 2 && d.Type.Size() == 2) {
27708 break
27709 }
27710 v.reset(OpRotateLeft8)
27711 v0 := b.NewValue0(v.Pos, OpAdd16, c.Type)
27712 v0.AddArg2(c, d)
27713 v.AddArg2(x, v0)
27714 return true
27715 }
27716
27717
27718
27719 for {
27720 if v_0.Op != OpRotateLeft8 {
27721 break
27722 }
27723 c := v_0.Args[1]
27724 x := v_0.Args[0]
27725 d := v_1
27726 if !(c.Type.Size() == 1 && d.Type.Size() == 1) {
27727 break
27728 }
27729 v.reset(OpRotateLeft8)
27730 v0 := b.NewValue0(v.Pos, OpAdd8, c.Type)
27731 v0.AddArg2(c, d)
27732 v.AddArg2(x, v0)
27733 return true
27734 }
27735 return false
27736 }
27737 func rewriteValuegeneric_OpRound32F(v *Value) bool {
27738 v_0 := v.Args[0]
27739
27740
27741 for {
27742 x := v_0
27743 if x.Op != OpConst32F {
27744 break
27745 }
27746 v.copyOf(x)
27747 return true
27748 }
27749 return false
27750 }
27751 func rewriteValuegeneric_OpRound64F(v *Value) bool {
27752 v_0 := v.Args[0]
27753
27754
27755 for {
27756 x := v_0
27757 if x.Op != OpConst64F {
27758 break
27759 }
27760 v.copyOf(x)
27761 return true
27762 }
27763 return false
27764 }
27765 func rewriteValuegeneric_OpRoundToEven(v *Value) bool {
27766 v_0 := v.Args[0]
27767
27768
27769 for {
27770 if v_0.Op != OpConst64F {
27771 break
27772 }
27773 c := auxIntToFloat64(v_0.AuxInt)
27774 v.reset(OpConst64F)
27775 v.AuxInt = float64ToAuxInt(math.RoundToEven(c))
27776 return true
27777 }
27778 return false
27779 }
27780 func rewriteValuegeneric_OpRsh16Ux16(v *Value) bool {
27781 v_1 := v.Args[1]
27782 v_0 := v.Args[0]
27783 b := v.Block
27784
27785
27786 for {
27787 t := v.Type
27788 x := v_0
27789 if v_1.Op != OpConst16 {
27790 break
27791 }
27792 c := auxIntToInt16(v_1.AuxInt)
27793 v.reset(OpRsh16Ux64)
27794 v0 := b.NewValue0(v.Pos, OpConst64, t)
27795 v0.AuxInt = int64ToAuxInt(int64(uint16(c)))
27796 v.AddArg2(x, v0)
27797 return true
27798 }
27799
27800
27801 for {
27802 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 {
27803 break
27804 }
27805 v.reset(OpConst16)
27806 v.AuxInt = int16ToAuxInt(0)
27807 return true
27808 }
27809 return false
27810 }
27811 func rewriteValuegeneric_OpRsh16Ux32(v *Value) bool {
27812 v_1 := v.Args[1]
27813 v_0 := v.Args[0]
27814 b := v.Block
27815
27816
27817 for {
27818 t := v.Type
27819 x := v_0
27820 if v_1.Op != OpConst32 {
27821 break
27822 }
27823 c := auxIntToInt32(v_1.AuxInt)
27824 v.reset(OpRsh16Ux64)
27825 v0 := b.NewValue0(v.Pos, OpConst64, t)
27826 v0.AuxInt = int64ToAuxInt(int64(uint32(c)))
27827 v.AddArg2(x, v0)
27828 return true
27829 }
27830
27831
27832 for {
27833 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 {
27834 break
27835 }
27836 v.reset(OpConst16)
27837 v.AuxInt = int16ToAuxInt(0)
27838 return true
27839 }
27840 return false
27841 }
27842 func rewriteValuegeneric_OpRsh16Ux64(v *Value) bool {
27843 v_1 := v.Args[1]
27844 v_0 := v.Args[0]
27845 b := v.Block
27846 typ := &b.Func.Config.Types
27847
27848
27849 for {
27850 if v_0.Op != OpConst16 {
27851 break
27852 }
27853 c := auxIntToInt16(v_0.AuxInt)
27854 if v_1.Op != OpConst64 {
27855 break
27856 }
27857 d := auxIntToInt64(v_1.AuxInt)
27858 v.reset(OpConst16)
27859 v.AuxInt = int16ToAuxInt(int16(uint16(c) >> uint64(d)))
27860 return true
27861 }
27862
27863
27864 for {
27865 x := v_0
27866 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 0 {
27867 break
27868 }
27869 v.copyOf(x)
27870 return true
27871 }
27872
27873
27874 for {
27875 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 {
27876 break
27877 }
27878 v.reset(OpConst16)
27879 v.AuxInt = int16ToAuxInt(0)
27880 return true
27881 }
27882
27883
27884
27885 for {
27886 if v_1.Op != OpConst64 {
27887 break
27888 }
27889 c := auxIntToInt64(v_1.AuxInt)
27890 if !(uint64(c) >= 16) {
27891 break
27892 }
27893 v.reset(OpConst16)
27894 v.AuxInt = int16ToAuxInt(0)
27895 return true
27896 }
27897
27898
27899
27900 for {
27901 t := v.Type
27902 if v_0.Op != OpRsh16Ux64 {
27903 break
27904 }
27905 _ = v_0.Args[1]
27906 x := v_0.Args[0]
27907 v_0_1 := v_0.Args[1]
27908 if v_0_1.Op != OpConst64 {
27909 break
27910 }
27911 c := auxIntToInt64(v_0_1.AuxInt)
27912 if v_1.Op != OpConst64 {
27913 break
27914 }
27915 d := auxIntToInt64(v_1.AuxInt)
27916 if !(!uaddOvf(c, d)) {
27917 break
27918 }
27919 v.reset(OpRsh16Ux64)
27920 v0 := b.NewValue0(v.Pos, OpConst64, t)
27921 v0.AuxInt = int64ToAuxInt(c + d)
27922 v.AddArg2(x, v0)
27923 return true
27924 }
27925
27926
27927 for {
27928 if v_0.Op != OpRsh16x64 {
27929 break
27930 }
27931 x := v_0.Args[0]
27932 if v_1.Op != OpConst64 {
27933 break
27934 }
27935 t := v_1.Type
27936 if auxIntToInt64(v_1.AuxInt) != 15 {
27937 break
27938 }
27939 v.reset(OpRsh16Ux64)
27940 v0 := b.NewValue0(v.Pos, OpConst64, t)
27941 v0.AuxInt = int64ToAuxInt(15)
27942 v.AddArg2(x, v0)
27943 return true
27944 }
27945
27946
27947
27948 for {
27949 i := v_0
27950 if i.Op != OpLsh16x64 {
27951 break
27952 }
27953 _ = i.Args[1]
27954 x := i.Args[0]
27955 i_1 := i.Args[1]
27956 if i_1.Op != OpConst64 {
27957 break
27958 }
27959 c := auxIntToInt64(i_1.AuxInt)
27960 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != c || !(c >= 0 && c < 16 && i.Uses == 1) {
27961 break
27962 }
27963 v.reset(OpAnd16)
27964 v0 := b.NewValue0(v.Pos, OpConst16, v.Type)
27965 v0.AuxInt = int16ToAuxInt(int16(^uint16(0) >> c))
27966 v.AddArg2(x, v0)
27967 return true
27968 }
27969
27970
27971
27972 for {
27973 if v_0.Op != OpLsh16x64 {
27974 break
27975 }
27976 _ = v_0.Args[1]
27977 v_0_0 := v_0.Args[0]
27978 if v_0_0.Op != OpRsh16Ux64 {
27979 break
27980 }
27981 _ = v_0_0.Args[1]
27982 x := v_0_0.Args[0]
27983 v_0_0_1 := v_0_0.Args[1]
27984 if v_0_0_1.Op != OpConst64 {
27985 break
27986 }
27987 c1 := auxIntToInt64(v_0_0_1.AuxInt)
27988 v_0_1 := v_0.Args[1]
27989 if v_0_1.Op != OpConst64 {
27990 break
27991 }
27992 c2 := auxIntToInt64(v_0_1.AuxInt)
27993 if v_1.Op != OpConst64 {
27994 break
27995 }
27996 c3 := auxIntToInt64(v_1.AuxInt)
27997 if !(uint64(c1) >= uint64(c2) && uint64(c3) >= uint64(c2) && !uaddOvf(c1-c2, c3)) {
27998 break
27999 }
28000 v.reset(OpRsh16Ux64)
28001 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
28002 v0.AuxInt = int64ToAuxInt(c1 - c2 + c3)
28003 v.AddArg2(x, v0)
28004 return true
28005 }
28006
28007
28008 for {
28009 if v_0.Op != OpLsh16x64 {
28010 break
28011 }
28012 _ = v_0.Args[1]
28013 x := v_0.Args[0]
28014 v_0_1 := v_0.Args[1]
28015 if v_0_1.Op != OpConst64 || auxIntToInt64(v_0_1.AuxInt) != 8 || v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 8 {
28016 break
28017 }
28018 v.reset(OpZeroExt8to16)
28019 v0 := b.NewValue0(v.Pos, OpTrunc16to8, typ.UInt8)
28020 v0.AddArg(x)
28021 v.AddArg(v0)
28022 return true
28023 }
28024 return false
28025 }
28026 func rewriteValuegeneric_OpRsh16Ux8(v *Value) bool {
28027 v_1 := v.Args[1]
28028 v_0 := v.Args[0]
28029 b := v.Block
28030
28031
28032 for {
28033 t := v.Type
28034 x := v_0
28035 if v_1.Op != OpConst8 {
28036 break
28037 }
28038 c := auxIntToInt8(v_1.AuxInt)
28039 v.reset(OpRsh16Ux64)
28040 v0 := b.NewValue0(v.Pos, OpConst64, t)
28041 v0.AuxInt = int64ToAuxInt(int64(uint8(c)))
28042 v.AddArg2(x, v0)
28043 return true
28044 }
28045
28046
28047 for {
28048 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 {
28049 break
28050 }
28051 v.reset(OpConst16)
28052 v.AuxInt = int16ToAuxInt(0)
28053 return true
28054 }
28055 return false
28056 }
28057 func rewriteValuegeneric_OpRsh16x16(v *Value) bool {
28058 v_1 := v.Args[1]
28059 v_0 := v.Args[0]
28060 b := v.Block
28061
28062
28063 for {
28064 t := v.Type
28065 x := v_0
28066 if v_1.Op != OpConst16 {
28067 break
28068 }
28069 c := auxIntToInt16(v_1.AuxInt)
28070 v.reset(OpRsh16x64)
28071 v0 := b.NewValue0(v.Pos, OpConst64, t)
28072 v0.AuxInt = int64ToAuxInt(int64(uint16(c)))
28073 v.AddArg2(x, v0)
28074 return true
28075 }
28076
28077
28078 for {
28079 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 {
28080 break
28081 }
28082 v.reset(OpConst16)
28083 v.AuxInt = int16ToAuxInt(0)
28084 return true
28085 }
28086 return false
28087 }
28088 func rewriteValuegeneric_OpRsh16x32(v *Value) bool {
28089 v_1 := v.Args[1]
28090 v_0 := v.Args[0]
28091 b := v.Block
28092
28093
28094 for {
28095 t := v.Type
28096 x := v_0
28097 if v_1.Op != OpConst32 {
28098 break
28099 }
28100 c := auxIntToInt32(v_1.AuxInt)
28101 v.reset(OpRsh16x64)
28102 v0 := b.NewValue0(v.Pos, OpConst64, t)
28103 v0.AuxInt = int64ToAuxInt(int64(uint32(c)))
28104 v.AddArg2(x, v0)
28105 return true
28106 }
28107
28108
28109 for {
28110 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 {
28111 break
28112 }
28113 v.reset(OpConst16)
28114 v.AuxInt = int16ToAuxInt(0)
28115 return true
28116 }
28117 return false
28118 }
28119 func rewriteValuegeneric_OpRsh16x64(v *Value) bool {
28120 v_1 := v.Args[1]
28121 v_0 := v.Args[0]
28122 b := v.Block
28123 typ := &b.Func.Config.Types
28124
28125
28126 for {
28127 if v_0.Op != OpConst16 {
28128 break
28129 }
28130 c := auxIntToInt16(v_0.AuxInt)
28131 if v_1.Op != OpConst64 {
28132 break
28133 }
28134 d := auxIntToInt64(v_1.AuxInt)
28135 v.reset(OpConst16)
28136 v.AuxInt = int16ToAuxInt(c >> uint64(d))
28137 return true
28138 }
28139
28140
28141 for {
28142 x := v_0
28143 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 0 {
28144 break
28145 }
28146 v.copyOf(x)
28147 return true
28148 }
28149
28150
28151 for {
28152 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 {
28153 break
28154 }
28155 v.reset(OpConst16)
28156 v.AuxInt = int16ToAuxInt(0)
28157 return true
28158 }
28159
28160
28161
28162 for {
28163 t := v.Type
28164 if v_0.Op != OpRsh16x64 {
28165 break
28166 }
28167 _ = v_0.Args[1]
28168 x := v_0.Args[0]
28169 v_0_1 := v_0.Args[1]
28170 if v_0_1.Op != OpConst64 {
28171 break
28172 }
28173 c := auxIntToInt64(v_0_1.AuxInt)
28174 if v_1.Op != OpConst64 {
28175 break
28176 }
28177 d := auxIntToInt64(v_1.AuxInt)
28178 if !(!uaddOvf(c, d)) {
28179 break
28180 }
28181 v.reset(OpRsh16x64)
28182 v0 := b.NewValue0(v.Pos, OpConst64, t)
28183 v0.AuxInt = int64ToAuxInt(c + d)
28184 v.AddArg2(x, v0)
28185 return true
28186 }
28187
28188
28189 for {
28190 if v_0.Op != OpLsh16x64 {
28191 break
28192 }
28193 _ = v_0.Args[1]
28194 x := v_0.Args[0]
28195 v_0_1 := v_0.Args[1]
28196 if v_0_1.Op != OpConst64 || auxIntToInt64(v_0_1.AuxInt) != 8 || v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 8 {
28197 break
28198 }
28199 v.reset(OpSignExt8to16)
28200 v0 := b.NewValue0(v.Pos, OpTrunc16to8, typ.Int8)
28201 v0.AddArg(x)
28202 v.AddArg(v0)
28203 return true
28204 }
28205 return false
28206 }
28207 func rewriteValuegeneric_OpRsh16x8(v *Value) bool {
28208 v_1 := v.Args[1]
28209 v_0 := v.Args[0]
28210 b := v.Block
28211
28212
28213 for {
28214 t := v.Type
28215 x := v_0
28216 if v_1.Op != OpConst8 {
28217 break
28218 }
28219 c := auxIntToInt8(v_1.AuxInt)
28220 v.reset(OpRsh16x64)
28221 v0 := b.NewValue0(v.Pos, OpConst64, t)
28222 v0.AuxInt = int64ToAuxInt(int64(uint8(c)))
28223 v.AddArg2(x, v0)
28224 return true
28225 }
28226
28227
28228 for {
28229 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 {
28230 break
28231 }
28232 v.reset(OpConst16)
28233 v.AuxInt = int16ToAuxInt(0)
28234 return true
28235 }
28236 return false
28237 }
28238 func rewriteValuegeneric_OpRsh32Ux16(v *Value) bool {
28239 v_1 := v.Args[1]
28240 v_0 := v.Args[0]
28241 b := v.Block
28242
28243
28244 for {
28245 t := v.Type
28246 x := v_0
28247 if v_1.Op != OpConst16 {
28248 break
28249 }
28250 c := auxIntToInt16(v_1.AuxInt)
28251 v.reset(OpRsh32Ux64)
28252 v0 := b.NewValue0(v.Pos, OpConst64, t)
28253 v0.AuxInt = int64ToAuxInt(int64(uint16(c)))
28254 v.AddArg2(x, v0)
28255 return true
28256 }
28257
28258
28259 for {
28260 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
28261 break
28262 }
28263 v.reset(OpConst32)
28264 v.AuxInt = int32ToAuxInt(0)
28265 return true
28266 }
28267 return false
28268 }
28269 func rewriteValuegeneric_OpRsh32Ux32(v *Value) bool {
28270 v_1 := v.Args[1]
28271 v_0 := v.Args[0]
28272 b := v.Block
28273
28274
28275 for {
28276 t := v.Type
28277 x := v_0
28278 if v_1.Op != OpConst32 {
28279 break
28280 }
28281 c := auxIntToInt32(v_1.AuxInt)
28282 v.reset(OpRsh32Ux64)
28283 v0 := b.NewValue0(v.Pos, OpConst64, t)
28284 v0.AuxInt = int64ToAuxInt(int64(uint32(c)))
28285 v.AddArg2(x, v0)
28286 return true
28287 }
28288
28289
28290 for {
28291 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
28292 break
28293 }
28294 v.reset(OpConst32)
28295 v.AuxInt = int32ToAuxInt(0)
28296 return true
28297 }
28298 return false
28299 }
28300 func rewriteValuegeneric_OpRsh32Ux64(v *Value) bool {
28301 v_1 := v.Args[1]
28302 v_0 := v.Args[0]
28303 b := v.Block
28304 typ := &b.Func.Config.Types
28305
28306
28307 for {
28308 if v_0.Op != OpConst32 {
28309 break
28310 }
28311 c := auxIntToInt32(v_0.AuxInt)
28312 if v_1.Op != OpConst64 {
28313 break
28314 }
28315 d := auxIntToInt64(v_1.AuxInt)
28316 v.reset(OpConst32)
28317 v.AuxInt = int32ToAuxInt(int32(uint32(c) >> uint64(d)))
28318 return true
28319 }
28320
28321
28322 for {
28323 x := v_0
28324 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 0 {
28325 break
28326 }
28327 v.copyOf(x)
28328 return true
28329 }
28330
28331
28332 for {
28333 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
28334 break
28335 }
28336 v.reset(OpConst32)
28337 v.AuxInt = int32ToAuxInt(0)
28338 return true
28339 }
28340
28341
28342
28343 for {
28344 if v_1.Op != OpConst64 {
28345 break
28346 }
28347 c := auxIntToInt64(v_1.AuxInt)
28348 if !(uint64(c) >= 32) {
28349 break
28350 }
28351 v.reset(OpConst32)
28352 v.AuxInt = int32ToAuxInt(0)
28353 return true
28354 }
28355
28356
28357
28358 for {
28359 t := v.Type
28360 if v_0.Op != OpRsh32Ux64 {
28361 break
28362 }
28363 _ = v_0.Args[1]
28364 x := v_0.Args[0]
28365 v_0_1 := v_0.Args[1]
28366 if v_0_1.Op != OpConst64 {
28367 break
28368 }
28369 c := auxIntToInt64(v_0_1.AuxInt)
28370 if v_1.Op != OpConst64 {
28371 break
28372 }
28373 d := auxIntToInt64(v_1.AuxInt)
28374 if !(!uaddOvf(c, d)) {
28375 break
28376 }
28377 v.reset(OpRsh32Ux64)
28378 v0 := b.NewValue0(v.Pos, OpConst64, t)
28379 v0.AuxInt = int64ToAuxInt(c + d)
28380 v.AddArg2(x, v0)
28381 return true
28382 }
28383
28384
28385 for {
28386 if v_0.Op != OpRsh32x64 {
28387 break
28388 }
28389 x := v_0.Args[0]
28390 if v_1.Op != OpConst64 {
28391 break
28392 }
28393 t := v_1.Type
28394 if auxIntToInt64(v_1.AuxInt) != 31 {
28395 break
28396 }
28397 v.reset(OpRsh32Ux64)
28398 v0 := b.NewValue0(v.Pos, OpConst64, t)
28399 v0.AuxInt = int64ToAuxInt(31)
28400 v.AddArg2(x, v0)
28401 return true
28402 }
28403
28404
28405
28406 for {
28407 i := v_0
28408 if i.Op != OpLsh32x64 {
28409 break
28410 }
28411 _ = i.Args[1]
28412 x := i.Args[0]
28413 i_1 := i.Args[1]
28414 if i_1.Op != OpConst64 {
28415 break
28416 }
28417 c := auxIntToInt64(i_1.AuxInt)
28418 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != c || !(c >= 0 && c < 32 && i.Uses == 1) {
28419 break
28420 }
28421 v.reset(OpAnd32)
28422 v0 := b.NewValue0(v.Pos, OpConst32, v.Type)
28423 v0.AuxInt = int32ToAuxInt(int32(^uint32(0) >> c))
28424 v.AddArg2(x, v0)
28425 return true
28426 }
28427
28428
28429
28430 for {
28431 if v_0.Op != OpLsh32x64 {
28432 break
28433 }
28434 _ = v_0.Args[1]
28435 v_0_0 := v_0.Args[0]
28436 if v_0_0.Op != OpRsh32Ux64 {
28437 break
28438 }
28439 _ = v_0_0.Args[1]
28440 x := v_0_0.Args[0]
28441 v_0_0_1 := v_0_0.Args[1]
28442 if v_0_0_1.Op != OpConst64 {
28443 break
28444 }
28445 c1 := auxIntToInt64(v_0_0_1.AuxInt)
28446 v_0_1 := v_0.Args[1]
28447 if v_0_1.Op != OpConst64 {
28448 break
28449 }
28450 c2 := auxIntToInt64(v_0_1.AuxInt)
28451 if v_1.Op != OpConst64 {
28452 break
28453 }
28454 c3 := auxIntToInt64(v_1.AuxInt)
28455 if !(uint64(c1) >= uint64(c2) && uint64(c3) >= uint64(c2) && !uaddOvf(c1-c2, c3)) {
28456 break
28457 }
28458 v.reset(OpRsh32Ux64)
28459 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
28460 v0.AuxInt = int64ToAuxInt(c1 - c2 + c3)
28461 v.AddArg2(x, v0)
28462 return true
28463 }
28464
28465
28466 for {
28467 if v_0.Op != OpLsh32x64 {
28468 break
28469 }
28470 _ = v_0.Args[1]
28471 x := v_0.Args[0]
28472 v_0_1 := v_0.Args[1]
28473 if v_0_1.Op != OpConst64 || auxIntToInt64(v_0_1.AuxInt) != 24 || v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 24 {
28474 break
28475 }
28476 v.reset(OpZeroExt8to32)
28477 v0 := b.NewValue0(v.Pos, OpTrunc32to8, typ.UInt8)
28478 v0.AddArg(x)
28479 v.AddArg(v0)
28480 return true
28481 }
28482
28483
28484 for {
28485 if v_0.Op != OpLsh32x64 {
28486 break
28487 }
28488 _ = v_0.Args[1]
28489 x := v_0.Args[0]
28490 v_0_1 := v_0.Args[1]
28491 if v_0_1.Op != OpConst64 || auxIntToInt64(v_0_1.AuxInt) != 16 || v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 16 {
28492 break
28493 }
28494 v.reset(OpZeroExt16to32)
28495 v0 := b.NewValue0(v.Pos, OpTrunc32to16, typ.UInt16)
28496 v0.AddArg(x)
28497 v.AddArg(v0)
28498 return true
28499 }
28500 return false
28501 }
28502 func rewriteValuegeneric_OpRsh32Ux8(v *Value) bool {
28503 v_1 := v.Args[1]
28504 v_0 := v.Args[0]
28505 b := v.Block
28506
28507
28508 for {
28509 t := v.Type
28510 x := v_0
28511 if v_1.Op != OpConst8 {
28512 break
28513 }
28514 c := auxIntToInt8(v_1.AuxInt)
28515 v.reset(OpRsh32Ux64)
28516 v0 := b.NewValue0(v.Pos, OpConst64, t)
28517 v0.AuxInt = int64ToAuxInt(int64(uint8(c)))
28518 v.AddArg2(x, v0)
28519 return true
28520 }
28521
28522
28523 for {
28524 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
28525 break
28526 }
28527 v.reset(OpConst32)
28528 v.AuxInt = int32ToAuxInt(0)
28529 return true
28530 }
28531 return false
28532 }
28533 func rewriteValuegeneric_OpRsh32x16(v *Value) bool {
28534 v_1 := v.Args[1]
28535 v_0 := v.Args[0]
28536 b := v.Block
28537
28538
28539 for {
28540 t := v.Type
28541 x := v_0
28542 if v_1.Op != OpConst16 {
28543 break
28544 }
28545 c := auxIntToInt16(v_1.AuxInt)
28546 v.reset(OpRsh32x64)
28547 v0 := b.NewValue0(v.Pos, OpConst64, t)
28548 v0.AuxInt = int64ToAuxInt(int64(uint16(c)))
28549 v.AddArg2(x, v0)
28550 return true
28551 }
28552
28553
28554 for {
28555 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
28556 break
28557 }
28558 v.reset(OpConst32)
28559 v.AuxInt = int32ToAuxInt(0)
28560 return true
28561 }
28562 return false
28563 }
28564 func rewriteValuegeneric_OpRsh32x32(v *Value) bool {
28565 v_1 := v.Args[1]
28566 v_0 := v.Args[0]
28567 b := v.Block
28568
28569
28570 for {
28571 t := v.Type
28572 x := v_0
28573 if v_1.Op != OpConst32 {
28574 break
28575 }
28576 c := auxIntToInt32(v_1.AuxInt)
28577 v.reset(OpRsh32x64)
28578 v0 := b.NewValue0(v.Pos, OpConst64, t)
28579 v0.AuxInt = int64ToAuxInt(int64(uint32(c)))
28580 v.AddArg2(x, v0)
28581 return true
28582 }
28583
28584
28585 for {
28586 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
28587 break
28588 }
28589 v.reset(OpConst32)
28590 v.AuxInt = int32ToAuxInt(0)
28591 return true
28592 }
28593 return false
28594 }
28595 func rewriteValuegeneric_OpRsh32x64(v *Value) bool {
28596 v_1 := v.Args[1]
28597 v_0 := v.Args[0]
28598 b := v.Block
28599 typ := &b.Func.Config.Types
28600
28601
28602 for {
28603 if v_0.Op != OpConst32 {
28604 break
28605 }
28606 c := auxIntToInt32(v_0.AuxInt)
28607 if v_1.Op != OpConst64 {
28608 break
28609 }
28610 d := auxIntToInt64(v_1.AuxInt)
28611 v.reset(OpConst32)
28612 v.AuxInt = int32ToAuxInt(c >> uint64(d))
28613 return true
28614 }
28615
28616
28617 for {
28618 x := v_0
28619 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 0 {
28620 break
28621 }
28622 v.copyOf(x)
28623 return true
28624 }
28625
28626
28627 for {
28628 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
28629 break
28630 }
28631 v.reset(OpConst32)
28632 v.AuxInt = int32ToAuxInt(0)
28633 return true
28634 }
28635
28636
28637
28638 for {
28639 t := v.Type
28640 if v_0.Op != OpRsh32x64 {
28641 break
28642 }
28643 _ = v_0.Args[1]
28644 x := v_0.Args[0]
28645 v_0_1 := v_0.Args[1]
28646 if v_0_1.Op != OpConst64 {
28647 break
28648 }
28649 c := auxIntToInt64(v_0_1.AuxInt)
28650 if v_1.Op != OpConst64 {
28651 break
28652 }
28653 d := auxIntToInt64(v_1.AuxInt)
28654 if !(!uaddOvf(c, d)) {
28655 break
28656 }
28657 v.reset(OpRsh32x64)
28658 v0 := b.NewValue0(v.Pos, OpConst64, t)
28659 v0.AuxInt = int64ToAuxInt(c + d)
28660 v.AddArg2(x, v0)
28661 return true
28662 }
28663
28664
28665 for {
28666 if v_0.Op != OpLsh32x64 {
28667 break
28668 }
28669 _ = v_0.Args[1]
28670 x := v_0.Args[0]
28671 v_0_1 := v_0.Args[1]
28672 if v_0_1.Op != OpConst64 || auxIntToInt64(v_0_1.AuxInt) != 24 || v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 24 {
28673 break
28674 }
28675 v.reset(OpSignExt8to32)
28676 v0 := b.NewValue0(v.Pos, OpTrunc32to8, typ.Int8)
28677 v0.AddArg(x)
28678 v.AddArg(v0)
28679 return true
28680 }
28681
28682
28683 for {
28684 if v_0.Op != OpLsh32x64 {
28685 break
28686 }
28687 _ = v_0.Args[1]
28688 x := v_0.Args[0]
28689 v_0_1 := v_0.Args[1]
28690 if v_0_1.Op != OpConst64 || auxIntToInt64(v_0_1.AuxInt) != 16 || v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 16 {
28691 break
28692 }
28693 v.reset(OpSignExt16to32)
28694 v0 := b.NewValue0(v.Pos, OpTrunc32to16, typ.Int16)
28695 v0.AddArg(x)
28696 v.AddArg(v0)
28697 return true
28698 }
28699 return false
28700 }
28701 func rewriteValuegeneric_OpRsh32x8(v *Value) bool {
28702 v_1 := v.Args[1]
28703 v_0 := v.Args[0]
28704 b := v.Block
28705
28706
28707 for {
28708 t := v.Type
28709 x := v_0
28710 if v_1.Op != OpConst8 {
28711 break
28712 }
28713 c := auxIntToInt8(v_1.AuxInt)
28714 v.reset(OpRsh32x64)
28715 v0 := b.NewValue0(v.Pos, OpConst64, t)
28716 v0.AuxInt = int64ToAuxInt(int64(uint8(c)))
28717 v.AddArg2(x, v0)
28718 return true
28719 }
28720
28721
28722 for {
28723 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
28724 break
28725 }
28726 v.reset(OpConst32)
28727 v.AuxInt = int32ToAuxInt(0)
28728 return true
28729 }
28730 return false
28731 }
28732 func rewriteValuegeneric_OpRsh64Ux16(v *Value) bool {
28733 v_1 := v.Args[1]
28734 v_0 := v.Args[0]
28735 b := v.Block
28736
28737
28738 for {
28739 t := v.Type
28740 x := v_0
28741 if v_1.Op != OpConst16 {
28742 break
28743 }
28744 c := auxIntToInt16(v_1.AuxInt)
28745 v.reset(OpRsh64Ux64)
28746 v0 := b.NewValue0(v.Pos, OpConst64, t)
28747 v0.AuxInt = int64ToAuxInt(int64(uint16(c)))
28748 v.AddArg2(x, v0)
28749 return true
28750 }
28751
28752
28753 for {
28754 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
28755 break
28756 }
28757 v.reset(OpConst64)
28758 v.AuxInt = int64ToAuxInt(0)
28759 return true
28760 }
28761 return false
28762 }
28763 func rewriteValuegeneric_OpRsh64Ux32(v *Value) bool {
28764 v_1 := v.Args[1]
28765 v_0 := v.Args[0]
28766 b := v.Block
28767
28768
28769 for {
28770 t := v.Type
28771 x := v_0
28772 if v_1.Op != OpConst32 {
28773 break
28774 }
28775 c := auxIntToInt32(v_1.AuxInt)
28776 v.reset(OpRsh64Ux64)
28777 v0 := b.NewValue0(v.Pos, OpConst64, t)
28778 v0.AuxInt = int64ToAuxInt(int64(uint32(c)))
28779 v.AddArg2(x, v0)
28780 return true
28781 }
28782
28783
28784 for {
28785 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
28786 break
28787 }
28788 v.reset(OpConst64)
28789 v.AuxInt = int64ToAuxInt(0)
28790 return true
28791 }
28792 return false
28793 }
28794 func rewriteValuegeneric_OpRsh64Ux64(v *Value) bool {
28795 v_1 := v.Args[1]
28796 v_0 := v.Args[0]
28797 b := v.Block
28798 typ := &b.Func.Config.Types
28799
28800
28801 for {
28802 if v_0.Op != OpConst64 {
28803 break
28804 }
28805 c := auxIntToInt64(v_0.AuxInt)
28806 if v_1.Op != OpConst64 {
28807 break
28808 }
28809 d := auxIntToInt64(v_1.AuxInt)
28810 v.reset(OpConst64)
28811 v.AuxInt = int64ToAuxInt(int64(uint64(c) >> uint64(d)))
28812 return true
28813 }
28814
28815
28816 for {
28817 x := v_0
28818 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 0 {
28819 break
28820 }
28821 v.copyOf(x)
28822 return true
28823 }
28824
28825
28826 for {
28827 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
28828 break
28829 }
28830 v.reset(OpConst64)
28831 v.AuxInt = int64ToAuxInt(0)
28832 return true
28833 }
28834
28835
28836
28837 for {
28838 if v_1.Op != OpConst64 {
28839 break
28840 }
28841 c := auxIntToInt64(v_1.AuxInt)
28842 if !(uint64(c) >= 64) {
28843 break
28844 }
28845 v.reset(OpConst64)
28846 v.AuxInt = int64ToAuxInt(0)
28847 return true
28848 }
28849
28850
28851
28852 for {
28853 t := v.Type
28854 if v_0.Op != OpRsh64Ux64 {
28855 break
28856 }
28857 _ = v_0.Args[1]
28858 x := v_0.Args[0]
28859 v_0_1 := v_0.Args[1]
28860 if v_0_1.Op != OpConst64 {
28861 break
28862 }
28863 c := auxIntToInt64(v_0_1.AuxInt)
28864 if v_1.Op != OpConst64 {
28865 break
28866 }
28867 d := auxIntToInt64(v_1.AuxInt)
28868 if !(!uaddOvf(c, d)) {
28869 break
28870 }
28871 v.reset(OpRsh64Ux64)
28872 v0 := b.NewValue0(v.Pos, OpConst64, t)
28873 v0.AuxInt = int64ToAuxInt(c + d)
28874 v.AddArg2(x, v0)
28875 return true
28876 }
28877
28878
28879 for {
28880 if v_0.Op != OpRsh64x64 {
28881 break
28882 }
28883 x := v_0.Args[0]
28884 if v_1.Op != OpConst64 {
28885 break
28886 }
28887 t := v_1.Type
28888 if auxIntToInt64(v_1.AuxInt) != 63 {
28889 break
28890 }
28891 v.reset(OpRsh64Ux64)
28892 v0 := b.NewValue0(v.Pos, OpConst64, t)
28893 v0.AuxInt = int64ToAuxInt(63)
28894 v.AddArg2(x, v0)
28895 return true
28896 }
28897
28898
28899
28900 for {
28901 i := v_0
28902 if i.Op != OpLsh64x64 {
28903 break
28904 }
28905 _ = i.Args[1]
28906 x := i.Args[0]
28907 i_1 := i.Args[1]
28908 if i_1.Op != OpConst64 {
28909 break
28910 }
28911 c := auxIntToInt64(i_1.AuxInt)
28912 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != c || !(c >= 0 && c < 64 && i.Uses == 1) {
28913 break
28914 }
28915 v.reset(OpAnd64)
28916 v0 := b.NewValue0(v.Pos, OpConst64, v.Type)
28917 v0.AuxInt = int64ToAuxInt(int64(^uint64(0) >> c))
28918 v.AddArg2(x, v0)
28919 return true
28920 }
28921
28922
28923
28924 for {
28925 if v_0.Op != OpLsh64x64 {
28926 break
28927 }
28928 _ = v_0.Args[1]
28929 v_0_0 := v_0.Args[0]
28930 if v_0_0.Op != OpRsh64Ux64 {
28931 break
28932 }
28933 _ = v_0_0.Args[1]
28934 x := v_0_0.Args[0]
28935 v_0_0_1 := v_0_0.Args[1]
28936 if v_0_0_1.Op != OpConst64 {
28937 break
28938 }
28939 c1 := auxIntToInt64(v_0_0_1.AuxInt)
28940 v_0_1 := v_0.Args[1]
28941 if v_0_1.Op != OpConst64 {
28942 break
28943 }
28944 c2 := auxIntToInt64(v_0_1.AuxInt)
28945 if v_1.Op != OpConst64 {
28946 break
28947 }
28948 c3 := auxIntToInt64(v_1.AuxInt)
28949 if !(uint64(c1) >= uint64(c2) && uint64(c3) >= uint64(c2) && !uaddOvf(c1-c2, c3)) {
28950 break
28951 }
28952 v.reset(OpRsh64Ux64)
28953 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
28954 v0.AuxInt = int64ToAuxInt(c1 - c2 + c3)
28955 v.AddArg2(x, v0)
28956 return true
28957 }
28958
28959
28960 for {
28961 if v_0.Op != OpLsh64x64 {
28962 break
28963 }
28964 _ = v_0.Args[1]
28965 x := v_0.Args[0]
28966 v_0_1 := v_0.Args[1]
28967 if v_0_1.Op != OpConst64 || auxIntToInt64(v_0_1.AuxInt) != 56 || v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 56 {
28968 break
28969 }
28970 v.reset(OpZeroExt8to64)
28971 v0 := b.NewValue0(v.Pos, OpTrunc64to8, typ.UInt8)
28972 v0.AddArg(x)
28973 v.AddArg(v0)
28974 return true
28975 }
28976
28977
28978 for {
28979 if v_0.Op != OpLsh64x64 {
28980 break
28981 }
28982 _ = v_0.Args[1]
28983 x := v_0.Args[0]
28984 v_0_1 := v_0.Args[1]
28985 if v_0_1.Op != OpConst64 || auxIntToInt64(v_0_1.AuxInt) != 48 || v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 48 {
28986 break
28987 }
28988 v.reset(OpZeroExt16to64)
28989 v0 := b.NewValue0(v.Pos, OpTrunc64to16, typ.UInt16)
28990 v0.AddArg(x)
28991 v.AddArg(v0)
28992 return true
28993 }
28994
28995
28996 for {
28997 if v_0.Op != OpLsh64x64 {
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 || auxIntToInt64(v_0_1.AuxInt) != 32 || v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 32 {
29004 break
29005 }
29006 v.reset(OpZeroExt32to64)
29007 v0 := b.NewValue0(v.Pos, OpTrunc64to32, typ.UInt32)
29008 v0.AddArg(x)
29009 v.AddArg(v0)
29010 return true
29011 }
29012 return false
29013 }
29014 func rewriteValuegeneric_OpRsh64Ux8(v *Value) bool {
29015 v_1 := v.Args[1]
29016 v_0 := v.Args[0]
29017 b := v.Block
29018
29019
29020 for {
29021 t := v.Type
29022 x := v_0
29023 if v_1.Op != OpConst8 {
29024 break
29025 }
29026 c := auxIntToInt8(v_1.AuxInt)
29027 v.reset(OpRsh64Ux64)
29028 v0 := b.NewValue0(v.Pos, OpConst64, t)
29029 v0.AuxInt = int64ToAuxInt(int64(uint8(c)))
29030 v.AddArg2(x, v0)
29031 return true
29032 }
29033
29034
29035 for {
29036 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
29037 break
29038 }
29039 v.reset(OpConst64)
29040 v.AuxInt = int64ToAuxInt(0)
29041 return true
29042 }
29043 return false
29044 }
29045 func rewriteValuegeneric_OpRsh64x16(v *Value) bool {
29046 v_1 := v.Args[1]
29047 v_0 := v.Args[0]
29048 b := v.Block
29049
29050
29051 for {
29052 t := v.Type
29053 x := v_0
29054 if v_1.Op != OpConst16 {
29055 break
29056 }
29057 c := auxIntToInt16(v_1.AuxInt)
29058 v.reset(OpRsh64x64)
29059 v0 := b.NewValue0(v.Pos, OpConst64, t)
29060 v0.AuxInt = int64ToAuxInt(int64(uint16(c)))
29061 v.AddArg2(x, v0)
29062 return true
29063 }
29064
29065
29066 for {
29067 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
29068 break
29069 }
29070 v.reset(OpConst64)
29071 v.AuxInt = int64ToAuxInt(0)
29072 return true
29073 }
29074 return false
29075 }
29076 func rewriteValuegeneric_OpRsh64x32(v *Value) bool {
29077 v_1 := v.Args[1]
29078 v_0 := v.Args[0]
29079 b := v.Block
29080
29081
29082 for {
29083 t := v.Type
29084 x := v_0
29085 if v_1.Op != OpConst32 {
29086 break
29087 }
29088 c := auxIntToInt32(v_1.AuxInt)
29089 v.reset(OpRsh64x64)
29090 v0 := b.NewValue0(v.Pos, OpConst64, t)
29091 v0.AuxInt = int64ToAuxInt(int64(uint32(c)))
29092 v.AddArg2(x, v0)
29093 return true
29094 }
29095
29096
29097 for {
29098 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
29099 break
29100 }
29101 v.reset(OpConst64)
29102 v.AuxInt = int64ToAuxInt(0)
29103 return true
29104 }
29105 return false
29106 }
29107 func rewriteValuegeneric_OpRsh64x64(v *Value) bool {
29108 v_1 := v.Args[1]
29109 v_0 := v.Args[0]
29110 b := v.Block
29111 typ := &b.Func.Config.Types
29112
29113
29114 for {
29115 if v_0.Op != OpConst64 {
29116 break
29117 }
29118 c := auxIntToInt64(v_0.AuxInt)
29119 if v_1.Op != OpConst64 {
29120 break
29121 }
29122 d := auxIntToInt64(v_1.AuxInt)
29123 v.reset(OpConst64)
29124 v.AuxInt = int64ToAuxInt(c >> uint64(d))
29125 return true
29126 }
29127
29128
29129 for {
29130 x := v_0
29131 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 0 {
29132 break
29133 }
29134 v.copyOf(x)
29135 return true
29136 }
29137
29138
29139 for {
29140 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
29141 break
29142 }
29143 v.reset(OpConst64)
29144 v.AuxInt = int64ToAuxInt(0)
29145 return true
29146 }
29147
29148
29149
29150 for {
29151 t := v.Type
29152 if v_0.Op != OpRsh64x64 {
29153 break
29154 }
29155 _ = v_0.Args[1]
29156 x := v_0.Args[0]
29157 v_0_1 := v_0.Args[1]
29158 if v_0_1.Op != OpConst64 {
29159 break
29160 }
29161 c := auxIntToInt64(v_0_1.AuxInt)
29162 if v_1.Op != OpConst64 {
29163 break
29164 }
29165 d := auxIntToInt64(v_1.AuxInt)
29166 if !(!uaddOvf(c, d)) {
29167 break
29168 }
29169 v.reset(OpRsh64x64)
29170 v0 := b.NewValue0(v.Pos, OpConst64, t)
29171 v0.AuxInt = int64ToAuxInt(c + d)
29172 v.AddArg2(x, v0)
29173 return true
29174 }
29175
29176
29177 for {
29178 if v_0.Op != OpLsh64x64 {
29179 break
29180 }
29181 _ = v_0.Args[1]
29182 x := v_0.Args[0]
29183 v_0_1 := v_0.Args[1]
29184 if v_0_1.Op != OpConst64 || auxIntToInt64(v_0_1.AuxInt) != 56 || v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 56 {
29185 break
29186 }
29187 v.reset(OpSignExt8to64)
29188 v0 := b.NewValue0(v.Pos, OpTrunc64to8, typ.Int8)
29189 v0.AddArg(x)
29190 v.AddArg(v0)
29191 return true
29192 }
29193
29194
29195 for {
29196 if v_0.Op != OpLsh64x64 {
29197 break
29198 }
29199 _ = v_0.Args[1]
29200 x := v_0.Args[0]
29201 v_0_1 := v_0.Args[1]
29202 if v_0_1.Op != OpConst64 || auxIntToInt64(v_0_1.AuxInt) != 48 || v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 48 {
29203 break
29204 }
29205 v.reset(OpSignExt16to64)
29206 v0 := b.NewValue0(v.Pos, OpTrunc64to16, typ.Int16)
29207 v0.AddArg(x)
29208 v.AddArg(v0)
29209 return true
29210 }
29211
29212
29213 for {
29214 if v_0.Op != OpLsh64x64 {
29215 break
29216 }
29217 _ = v_0.Args[1]
29218 x := v_0.Args[0]
29219 v_0_1 := v_0.Args[1]
29220 if v_0_1.Op != OpConst64 || auxIntToInt64(v_0_1.AuxInt) != 32 || v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 32 {
29221 break
29222 }
29223 v.reset(OpSignExt32to64)
29224 v0 := b.NewValue0(v.Pos, OpTrunc64to32, typ.Int32)
29225 v0.AddArg(x)
29226 v.AddArg(v0)
29227 return true
29228 }
29229 return false
29230 }
29231 func rewriteValuegeneric_OpRsh64x8(v *Value) bool {
29232 v_1 := v.Args[1]
29233 v_0 := v.Args[0]
29234 b := v.Block
29235
29236
29237 for {
29238 t := v.Type
29239 x := v_0
29240 if v_1.Op != OpConst8 {
29241 break
29242 }
29243 c := auxIntToInt8(v_1.AuxInt)
29244 v.reset(OpRsh64x64)
29245 v0 := b.NewValue0(v.Pos, OpConst64, t)
29246 v0.AuxInt = int64ToAuxInt(int64(uint8(c)))
29247 v.AddArg2(x, v0)
29248 return true
29249 }
29250
29251
29252 for {
29253 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
29254 break
29255 }
29256 v.reset(OpConst64)
29257 v.AuxInt = int64ToAuxInt(0)
29258 return true
29259 }
29260 return false
29261 }
29262 func rewriteValuegeneric_OpRsh8Ux16(v *Value) bool {
29263 v_1 := v.Args[1]
29264 v_0 := v.Args[0]
29265 b := v.Block
29266
29267
29268 for {
29269 t := v.Type
29270 x := v_0
29271 if v_1.Op != OpConst16 {
29272 break
29273 }
29274 c := auxIntToInt16(v_1.AuxInt)
29275 v.reset(OpRsh8Ux64)
29276 v0 := b.NewValue0(v.Pos, OpConst64, t)
29277 v0.AuxInt = int64ToAuxInt(int64(uint16(c)))
29278 v.AddArg2(x, v0)
29279 return true
29280 }
29281
29282
29283 for {
29284 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 {
29285 break
29286 }
29287 v.reset(OpConst8)
29288 v.AuxInt = int8ToAuxInt(0)
29289 return true
29290 }
29291 return false
29292 }
29293 func rewriteValuegeneric_OpRsh8Ux32(v *Value) bool {
29294 v_1 := v.Args[1]
29295 v_0 := v.Args[0]
29296 b := v.Block
29297
29298
29299 for {
29300 t := v.Type
29301 x := v_0
29302 if v_1.Op != OpConst32 {
29303 break
29304 }
29305 c := auxIntToInt32(v_1.AuxInt)
29306 v.reset(OpRsh8Ux64)
29307 v0 := b.NewValue0(v.Pos, OpConst64, t)
29308 v0.AuxInt = int64ToAuxInt(int64(uint32(c)))
29309 v.AddArg2(x, v0)
29310 return true
29311 }
29312
29313
29314 for {
29315 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 {
29316 break
29317 }
29318 v.reset(OpConst8)
29319 v.AuxInt = int8ToAuxInt(0)
29320 return true
29321 }
29322 return false
29323 }
29324 func rewriteValuegeneric_OpRsh8Ux64(v *Value) bool {
29325 v_1 := v.Args[1]
29326 v_0 := v.Args[0]
29327 b := v.Block
29328 typ := &b.Func.Config.Types
29329
29330
29331 for {
29332 if v_0.Op != OpConst8 {
29333 break
29334 }
29335 c := auxIntToInt8(v_0.AuxInt)
29336 if v_1.Op != OpConst64 {
29337 break
29338 }
29339 d := auxIntToInt64(v_1.AuxInt)
29340 v.reset(OpConst8)
29341 v.AuxInt = int8ToAuxInt(int8(uint8(c) >> uint64(d)))
29342 return true
29343 }
29344
29345
29346 for {
29347 x := v_0
29348 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 0 {
29349 break
29350 }
29351 v.copyOf(x)
29352 return true
29353 }
29354
29355
29356 for {
29357 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 {
29358 break
29359 }
29360 v.reset(OpConst8)
29361 v.AuxInt = int8ToAuxInt(0)
29362 return true
29363 }
29364
29365
29366
29367 for {
29368 if v_1.Op != OpConst64 {
29369 break
29370 }
29371 c := auxIntToInt64(v_1.AuxInt)
29372 if !(uint64(c) >= 8) {
29373 break
29374 }
29375 v.reset(OpConst8)
29376 v.AuxInt = int8ToAuxInt(0)
29377 return true
29378 }
29379
29380
29381
29382 for {
29383 t := v.Type
29384 if v_0.Op != OpRsh8Ux64 {
29385 break
29386 }
29387 _ = v_0.Args[1]
29388 x := v_0.Args[0]
29389 v_0_1 := v_0.Args[1]
29390 if v_0_1.Op != OpConst64 {
29391 break
29392 }
29393 c := auxIntToInt64(v_0_1.AuxInt)
29394 if v_1.Op != OpConst64 {
29395 break
29396 }
29397 d := auxIntToInt64(v_1.AuxInt)
29398 if !(!uaddOvf(c, d)) {
29399 break
29400 }
29401 v.reset(OpRsh8Ux64)
29402 v0 := b.NewValue0(v.Pos, OpConst64, t)
29403 v0.AuxInt = int64ToAuxInt(c + d)
29404 v.AddArg2(x, v0)
29405 return true
29406 }
29407
29408
29409 for {
29410 if v_0.Op != OpRsh8x64 {
29411 break
29412 }
29413 x := v_0.Args[0]
29414 if v_1.Op != OpConst64 {
29415 break
29416 }
29417 t := v_1.Type
29418 if auxIntToInt64(v_1.AuxInt) != 7 {
29419 break
29420 }
29421 v.reset(OpRsh8Ux64)
29422 v0 := b.NewValue0(v.Pos, OpConst64, t)
29423 v0.AuxInt = int64ToAuxInt(7)
29424 v.AddArg2(x, v0)
29425 return true
29426 }
29427
29428
29429
29430 for {
29431 i := v_0
29432 if i.Op != OpLsh8x64 {
29433 break
29434 }
29435 _ = i.Args[1]
29436 x := i.Args[0]
29437 i_1 := i.Args[1]
29438 if i_1.Op != OpConst64 {
29439 break
29440 }
29441 c := auxIntToInt64(i_1.AuxInt)
29442 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != c || !(c >= 0 && c < 8 && i.Uses == 1) {
29443 break
29444 }
29445 v.reset(OpAnd8)
29446 v0 := b.NewValue0(v.Pos, OpConst8, v.Type)
29447 v0.AuxInt = int8ToAuxInt(int8(^uint8(0) >> c))
29448 v.AddArg2(x, v0)
29449 return true
29450 }
29451
29452
29453
29454 for {
29455 if v_0.Op != OpLsh8x64 {
29456 break
29457 }
29458 _ = v_0.Args[1]
29459 v_0_0 := v_0.Args[0]
29460 if v_0_0.Op != OpRsh8Ux64 {
29461 break
29462 }
29463 _ = v_0_0.Args[1]
29464 x := v_0_0.Args[0]
29465 v_0_0_1 := v_0_0.Args[1]
29466 if v_0_0_1.Op != OpConst64 {
29467 break
29468 }
29469 c1 := auxIntToInt64(v_0_0_1.AuxInt)
29470 v_0_1 := v_0.Args[1]
29471 if v_0_1.Op != OpConst64 {
29472 break
29473 }
29474 c2 := auxIntToInt64(v_0_1.AuxInt)
29475 if v_1.Op != OpConst64 {
29476 break
29477 }
29478 c3 := auxIntToInt64(v_1.AuxInt)
29479 if !(uint64(c1) >= uint64(c2) && uint64(c3) >= uint64(c2) && !uaddOvf(c1-c2, c3)) {
29480 break
29481 }
29482 v.reset(OpRsh8Ux64)
29483 v0 := b.NewValue0(v.Pos, OpConst64, typ.UInt64)
29484 v0.AuxInt = int64ToAuxInt(c1 - c2 + c3)
29485 v.AddArg2(x, v0)
29486 return true
29487 }
29488 return false
29489 }
29490 func rewriteValuegeneric_OpRsh8Ux8(v *Value) bool {
29491 v_1 := v.Args[1]
29492 v_0 := v.Args[0]
29493 b := v.Block
29494
29495
29496 for {
29497 t := v.Type
29498 x := v_0
29499 if v_1.Op != OpConst8 {
29500 break
29501 }
29502 c := auxIntToInt8(v_1.AuxInt)
29503 v.reset(OpRsh8Ux64)
29504 v0 := b.NewValue0(v.Pos, OpConst64, t)
29505 v0.AuxInt = int64ToAuxInt(int64(uint8(c)))
29506 v.AddArg2(x, v0)
29507 return true
29508 }
29509
29510
29511 for {
29512 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 {
29513 break
29514 }
29515 v.reset(OpConst8)
29516 v.AuxInt = int8ToAuxInt(0)
29517 return true
29518 }
29519 return false
29520 }
29521 func rewriteValuegeneric_OpRsh8x16(v *Value) bool {
29522 v_1 := v.Args[1]
29523 v_0 := v.Args[0]
29524 b := v.Block
29525
29526
29527 for {
29528 t := v.Type
29529 x := v_0
29530 if v_1.Op != OpConst16 {
29531 break
29532 }
29533 c := auxIntToInt16(v_1.AuxInt)
29534 v.reset(OpRsh8x64)
29535 v0 := b.NewValue0(v.Pos, OpConst64, t)
29536 v0.AuxInt = int64ToAuxInt(int64(uint16(c)))
29537 v.AddArg2(x, v0)
29538 return true
29539 }
29540
29541
29542 for {
29543 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 {
29544 break
29545 }
29546 v.reset(OpConst8)
29547 v.AuxInt = int8ToAuxInt(0)
29548 return true
29549 }
29550 return false
29551 }
29552 func rewriteValuegeneric_OpRsh8x32(v *Value) bool {
29553 v_1 := v.Args[1]
29554 v_0 := v.Args[0]
29555 b := v.Block
29556
29557
29558 for {
29559 t := v.Type
29560 x := v_0
29561 if v_1.Op != OpConst32 {
29562 break
29563 }
29564 c := auxIntToInt32(v_1.AuxInt)
29565 v.reset(OpRsh8x64)
29566 v0 := b.NewValue0(v.Pos, OpConst64, t)
29567 v0.AuxInt = int64ToAuxInt(int64(uint32(c)))
29568 v.AddArg2(x, v0)
29569 return true
29570 }
29571
29572
29573 for {
29574 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 {
29575 break
29576 }
29577 v.reset(OpConst8)
29578 v.AuxInt = int8ToAuxInt(0)
29579 return true
29580 }
29581 return false
29582 }
29583 func rewriteValuegeneric_OpRsh8x64(v *Value) bool {
29584 v_1 := v.Args[1]
29585 v_0 := v.Args[0]
29586 b := v.Block
29587
29588
29589 for {
29590 if v_0.Op != OpConst8 {
29591 break
29592 }
29593 c := auxIntToInt8(v_0.AuxInt)
29594 if v_1.Op != OpConst64 {
29595 break
29596 }
29597 d := auxIntToInt64(v_1.AuxInt)
29598 v.reset(OpConst8)
29599 v.AuxInt = int8ToAuxInt(c >> uint64(d))
29600 return true
29601 }
29602
29603
29604 for {
29605 x := v_0
29606 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 0 {
29607 break
29608 }
29609 v.copyOf(x)
29610 return true
29611 }
29612
29613
29614 for {
29615 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 {
29616 break
29617 }
29618 v.reset(OpConst8)
29619 v.AuxInt = int8ToAuxInt(0)
29620 return true
29621 }
29622
29623
29624
29625 for {
29626 t := v.Type
29627 if v_0.Op != OpRsh8x64 {
29628 break
29629 }
29630 _ = v_0.Args[1]
29631 x := v_0.Args[0]
29632 v_0_1 := v_0.Args[1]
29633 if v_0_1.Op != OpConst64 {
29634 break
29635 }
29636 c := auxIntToInt64(v_0_1.AuxInt)
29637 if v_1.Op != OpConst64 {
29638 break
29639 }
29640 d := auxIntToInt64(v_1.AuxInt)
29641 if !(!uaddOvf(c, d)) {
29642 break
29643 }
29644 v.reset(OpRsh8x64)
29645 v0 := b.NewValue0(v.Pos, OpConst64, t)
29646 v0.AuxInt = int64ToAuxInt(c + d)
29647 v.AddArg2(x, v0)
29648 return true
29649 }
29650 return false
29651 }
29652 func rewriteValuegeneric_OpRsh8x8(v *Value) bool {
29653 v_1 := v.Args[1]
29654 v_0 := v.Args[0]
29655 b := v.Block
29656
29657
29658 for {
29659 t := v.Type
29660 x := v_0
29661 if v_1.Op != OpConst8 {
29662 break
29663 }
29664 c := auxIntToInt8(v_1.AuxInt)
29665 v.reset(OpRsh8x64)
29666 v0 := b.NewValue0(v.Pos, OpConst64, t)
29667 v0.AuxInt = int64ToAuxInt(int64(uint8(c)))
29668 v.AddArg2(x, v0)
29669 return true
29670 }
29671
29672
29673 for {
29674 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 {
29675 break
29676 }
29677 v.reset(OpConst8)
29678 v.AuxInt = int8ToAuxInt(0)
29679 return true
29680 }
29681 return false
29682 }
29683 func rewriteValuegeneric_OpSelect0(v *Value) bool {
29684 v_0 := v.Args[0]
29685
29686
29687 for {
29688 if v_0.Op != OpMakeTuple {
29689 break
29690 }
29691 x := v_0.Args[0]
29692 v.copyOf(x)
29693 return true
29694 }
29695 return false
29696 }
29697 func rewriteValuegeneric_OpSelect1(v *Value) bool {
29698 v_0 := v.Args[0]
29699
29700
29701 for {
29702 if v_0.Op != OpMakeTuple {
29703 break
29704 }
29705 y := v_0.Args[1]
29706 v.copyOf(y)
29707 return true
29708 }
29709 return false
29710 }
29711 func rewriteValuegeneric_OpSelectN(v *Value) bool {
29712 v_0 := v.Args[0]
29713 b := v.Block
29714 config := b.Func.Config
29715 typ := &b.Func.Config.Types
29716
29717
29718 for {
29719 n := auxIntToInt64(v.AuxInt)
29720 m := v_0
29721 if m.Op != OpMakeResult {
29722 break
29723 }
29724 v.copyOf(m.Args[n])
29725 return true
29726 }
29727
29728
29729
29730 for {
29731 if auxIntToInt64(v.AuxInt) != 0 {
29732 break
29733 }
29734 call := v_0
29735 if call.Op != OpStaticCall || len(call.Args) != 3 {
29736 break
29737 }
29738 sym := auxToCall(call.Aux)
29739 mem := call.Args[2]
29740 sptr := call.Args[0]
29741 call_1 := call.Args[1]
29742 if call_1.Op != OpConst64 {
29743 break
29744 }
29745 c := auxIntToInt64(call_1.AuxInt)
29746 if !(isInlinableMemclr(config, int64(c)) && isSameCall(sym, "runtime.memclrNoHeapPointers") && call.Uses == 1 && clobber(call)) {
29747 break
29748 }
29749 v.reset(OpZero)
29750 v.AuxInt = int64ToAuxInt(int64(c))
29751 v.Aux = typeToAux(types.Types[types.TUINT8])
29752 v.AddArg2(sptr, mem)
29753 return true
29754 }
29755
29756
29757
29758 for {
29759 if auxIntToInt64(v.AuxInt) != 0 {
29760 break
29761 }
29762 call := v_0
29763 if call.Op != OpStaticCall || len(call.Args) != 3 {
29764 break
29765 }
29766 sym := auxToCall(call.Aux)
29767 mem := call.Args[2]
29768 sptr := call.Args[0]
29769 call_1 := call.Args[1]
29770 if call_1.Op != OpConst32 {
29771 break
29772 }
29773 c := auxIntToInt32(call_1.AuxInt)
29774 if !(isInlinableMemclr(config, int64(c)) && isSameCall(sym, "runtime.memclrNoHeapPointers") && call.Uses == 1 && clobber(call)) {
29775 break
29776 }
29777 v.reset(OpZero)
29778 v.AuxInt = int64ToAuxInt(int64(c))
29779 v.Aux = typeToAux(types.Types[types.TUINT8])
29780 v.AddArg2(sptr, mem)
29781 return true
29782 }
29783
29784
29785
29786 for {
29787 if auxIntToInt64(v.AuxInt) != 0 {
29788 break
29789 }
29790 call := v_0
29791 if call.Op != OpStaticCall || len(call.Args) != 1 {
29792 break
29793 }
29794 sym := auxToCall(call.Aux)
29795 s1 := call.Args[0]
29796 if s1.Op != OpStore {
29797 break
29798 }
29799 _ = s1.Args[2]
29800 s1_1 := s1.Args[1]
29801 if s1_1.Op != OpConst64 {
29802 break
29803 }
29804 sz := auxIntToInt64(s1_1.AuxInt)
29805 s2 := s1.Args[2]
29806 if s2.Op != OpStore {
29807 break
29808 }
29809 _ = s2.Args[2]
29810 src := s2.Args[1]
29811 s3 := s2.Args[2]
29812 if s3.Op != OpStore {
29813 break
29814 }
29815 mem := s3.Args[2]
29816 dst := s3.Args[1]
29817 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)) {
29818 break
29819 }
29820 v.reset(OpMove)
29821 v.AuxInt = int64ToAuxInt(int64(sz))
29822 v.Aux = typeToAux(types.Types[types.TUINT8])
29823 v.AddArg3(dst, src, mem)
29824 return true
29825 }
29826
29827
29828
29829 for {
29830 if auxIntToInt64(v.AuxInt) != 0 {
29831 break
29832 }
29833 call := v_0
29834 if call.Op != OpStaticCall || len(call.Args) != 1 {
29835 break
29836 }
29837 sym := auxToCall(call.Aux)
29838 s1 := call.Args[0]
29839 if s1.Op != OpStore {
29840 break
29841 }
29842 _ = s1.Args[2]
29843 s1_1 := s1.Args[1]
29844 if s1_1.Op != OpConst32 {
29845 break
29846 }
29847 sz := auxIntToInt32(s1_1.AuxInt)
29848 s2 := s1.Args[2]
29849 if s2.Op != OpStore {
29850 break
29851 }
29852 _ = s2.Args[2]
29853 src := s2.Args[1]
29854 s3 := s2.Args[2]
29855 if s3.Op != OpStore {
29856 break
29857 }
29858 mem := s3.Args[2]
29859 dst := s3.Args[1]
29860 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)) {
29861 break
29862 }
29863 v.reset(OpMove)
29864 v.AuxInt = int64ToAuxInt(int64(sz))
29865 v.Aux = typeToAux(types.Types[types.TUINT8])
29866 v.AddArg3(dst, src, mem)
29867 return true
29868 }
29869
29870
29871
29872 for {
29873 if auxIntToInt64(v.AuxInt) != 0 {
29874 break
29875 }
29876 call := v_0
29877 if call.Op != OpStaticCall || len(call.Args) != 4 {
29878 break
29879 }
29880 sym := auxToCall(call.Aux)
29881 mem := call.Args[3]
29882 dst := call.Args[0]
29883 src := call.Args[1]
29884 call_2 := call.Args[2]
29885 if call_2.Op != OpConst64 {
29886 break
29887 }
29888 sz := auxIntToInt64(call_2.AuxInt)
29889 if !(sz >= 0 && call.Uses == 1 && isSameCall(sym, "runtime.memmove") && isInlinableMemmove(dst, src, int64(sz), config) && clobber(call)) {
29890 break
29891 }
29892 v.reset(OpMove)
29893 v.AuxInt = int64ToAuxInt(int64(sz))
29894 v.Aux = typeToAux(types.Types[types.TUINT8])
29895 v.AddArg3(dst, src, 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) != 4 {
29907 break
29908 }
29909 sym := auxToCall(call.Aux)
29910 mem := call.Args[3]
29911 dst := call.Args[0]
29912 src := call.Args[1]
29913 call_2 := call.Args[2]
29914 if call_2.Op != OpConst32 {
29915 break
29916 }
29917 sz := auxIntToInt32(call_2.AuxInt)
29918 if !(sz >= 0 && call.Uses == 1 && isSameCall(sym, "runtime.memmove") && isInlinableMemmove(dst, src, int64(sz), config) && clobber(call)) {
29919 break
29920 }
29921 v.reset(OpMove)
29922 v.AuxInt = int64ToAuxInt(int64(sz))
29923 v.Aux = typeToAux(types.Types[types.TUINT8])
29924 v.AddArg3(dst, src, mem)
29925 return true
29926 }
29927
29928
29929
29930 for {
29931 if auxIntToInt64(v.AuxInt) != 0 {
29932 break
29933 }
29934 call := v_0
29935 if call.Op != OpStaticLECall || len(call.Args) != 4 {
29936 break
29937 }
29938 sym := auxToCall(call.Aux)
29939 mem := call.Args[3]
29940 dst := call.Args[0]
29941 src := call.Args[1]
29942 call_2 := call.Args[2]
29943 if call_2.Op != OpConst64 {
29944 break
29945 }
29946 sz := auxIntToInt64(call_2.AuxInt)
29947 if !(sz >= 0 && call.Uses == 1 && isSameCall(sym, "runtime.memmove") && isInlinableMemmove(dst, src, int64(sz), config) && clobber(call)) {
29948 break
29949 }
29950 v.reset(OpMove)
29951 v.AuxInt = int64ToAuxInt(int64(sz))
29952 v.Aux = typeToAux(types.Types[types.TUINT8])
29953 v.AddArg3(dst, src, mem)
29954 return true
29955 }
29956
29957
29958
29959 for {
29960 if auxIntToInt64(v.AuxInt) != 0 {
29961 break
29962 }
29963 call := v_0
29964 if call.Op != OpStaticLECall || len(call.Args) != 4 {
29965 break
29966 }
29967 sym := auxToCall(call.Aux)
29968 mem := call.Args[3]
29969 dst := call.Args[0]
29970 src := call.Args[1]
29971 call_2 := call.Args[2]
29972 if call_2.Op != OpConst32 {
29973 break
29974 }
29975 sz := auxIntToInt32(call_2.AuxInt)
29976 if !(sz >= 0 && call.Uses == 1 && isSameCall(sym, "runtime.memmove") && isInlinableMemmove(dst, src, int64(sz), config) && clobber(call)) {
29977 break
29978 }
29979 v.reset(OpMove)
29980 v.AuxInt = int64ToAuxInt(int64(sz))
29981 v.Aux = typeToAux(types.Types[types.TUINT8])
29982 v.AddArg3(dst, src, mem)
29983 return true
29984 }
29985
29986
29987
29988 for {
29989 if auxIntToInt64(v.AuxInt) != 0 {
29990 break
29991 }
29992 call := v_0
29993 if call.Op != OpStaticLECall || len(call.Args) != 2 {
29994 break
29995 }
29996 sym := auxToCall(call.Aux)
29997 x := call.Args[1]
29998 if !(needRaceCleanup(sym, call) && clobber(call)) {
29999 break
30000 }
30001 v.copyOf(x)
30002 return true
30003 }
30004
30005
30006
30007 for {
30008 if auxIntToInt64(v.AuxInt) != 0 {
30009 break
30010 }
30011 call := v_0
30012 if call.Op != OpStaticLECall || len(call.Args) != 1 {
30013 break
30014 }
30015 sym := auxToCall(call.Aux)
30016 x := call.Args[0]
30017 if !(needRaceCleanup(sym, call) && clobber(call)) {
30018 break
30019 }
30020 v.copyOf(x)
30021 return true
30022 }
30023
30024
30025
30026 for {
30027 if auxIntToInt64(v.AuxInt) != 1 || v_0.Op != OpStaticCall || len(v_0.Args) != 6 {
30028 break
30029 }
30030 sym := auxToCall(v_0.Aux)
30031 _ = v_0.Args[1]
30032 newLen := v_0.Args[1]
30033 if newLen.Op != OpConst64 || !(v.Type.IsInteger() && isSameCall(sym, "runtime.growslice")) {
30034 break
30035 }
30036 v.copyOf(newLen)
30037 return true
30038 }
30039
30040
30041
30042 for {
30043 if auxIntToInt64(v.AuxInt) != 1 || v_0.Op != OpStaticCall || len(v_0.Args) != 6 {
30044 break
30045 }
30046 sym := auxToCall(v_0.Aux)
30047 _ = v_0.Args[1]
30048 newLen := v_0.Args[1]
30049 if newLen.Op != OpConst32 || !(v.Type.IsInteger() && isSameCall(sym, "runtime.growslice")) {
30050 break
30051 }
30052 v.copyOf(newLen)
30053 return true
30054 }
30055
30056
30057
30058 for {
30059 if auxIntToInt64(v.AuxInt) != 0 || v_0.Op != OpStaticLECall || len(v_0.Args) != 3 {
30060 break
30061 }
30062 f := auxToCall(v_0.Aux)
30063 _ = v_0.Args[2]
30064 x := v_0.Args[0]
30065 y := v_0.Args[1]
30066 v_0_2 := v_0.Args[2]
30067 if v_0_2.Op != OpSelectN || auxIntToInt64(v_0_2.AuxInt) != 1 {
30068 break
30069 }
30070 c := v_0_2.Args[0]
30071 if c.Op != OpStaticLECall || len(c.Args) != 3 {
30072 break
30073 }
30074 g := auxToCall(c.Aux)
30075 if x != c.Args[0] || y != c.Args[1] || !(isSameCall(f, "runtime.cmpstring") && isSameCall(g, "runtime.cmpstring")) {
30076 break
30077 }
30078 b = c.Block
30079 v0 := b.NewValue0(v.Pos, OpSelectN, typ.Int)
30080 v.copyOf(v0)
30081 v0.AuxInt = int64ToAuxInt(0)
30082 v0.AddArg(c)
30083 return true
30084 }
30085
30086
30087
30088 for {
30089 if auxIntToInt64(v.AuxInt) != 1 {
30090 break
30091 }
30092 c := v_0
30093 if c.Op != OpStaticLECall || len(c.Args) != 3 {
30094 break
30095 }
30096 f := auxToCall(c.Aux)
30097 mem := c.Args[2]
30098 if !(c.Uses == 1 && isSameCall(f, "runtime.cmpstring") && clobber(c)) {
30099 break
30100 }
30101 v.copyOf(mem)
30102 return true
30103 }
30104 return false
30105 }
30106 func rewriteValuegeneric_OpSignExt16to32(v *Value) bool {
30107 v_0 := v.Args[0]
30108
30109
30110 for {
30111 if v_0.Op != OpConst16 {
30112 break
30113 }
30114 c := auxIntToInt16(v_0.AuxInt)
30115 v.reset(OpConst32)
30116 v.AuxInt = int32ToAuxInt(int32(c))
30117 return true
30118 }
30119
30120
30121
30122 for {
30123 if v_0.Op != OpTrunc32to16 {
30124 break
30125 }
30126 x := v_0.Args[0]
30127 if x.Op != OpRsh32x64 {
30128 break
30129 }
30130 _ = x.Args[1]
30131 x_1 := x.Args[1]
30132 if x_1.Op != OpConst64 {
30133 break
30134 }
30135 s := auxIntToInt64(x_1.AuxInt)
30136 if !(s >= 16) {
30137 break
30138 }
30139 v.copyOf(x)
30140 return true
30141 }
30142 return false
30143 }
30144 func rewriteValuegeneric_OpSignExt16to64(v *Value) bool {
30145 v_0 := v.Args[0]
30146
30147
30148 for {
30149 if v_0.Op != OpConst16 {
30150 break
30151 }
30152 c := auxIntToInt16(v_0.AuxInt)
30153 v.reset(OpConst64)
30154 v.AuxInt = int64ToAuxInt(int64(c))
30155 return true
30156 }
30157
30158
30159
30160 for {
30161 if v_0.Op != OpTrunc64to16 {
30162 break
30163 }
30164 x := v_0.Args[0]
30165 if x.Op != OpRsh64x64 {
30166 break
30167 }
30168 _ = x.Args[1]
30169 x_1 := x.Args[1]
30170 if x_1.Op != OpConst64 {
30171 break
30172 }
30173 s := auxIntToInt64(x_1.AuxInt)
30174 if !(s >= 48) {
30175 break
30176 }
30177 v.copyOf(x)
30178 return true
30179 }
30180 return false
30181 }
30182 func rewriteValuegeneric_OpSignExt32to64(v *Value) bool {
30183 v_0 := v.Args[0]
30184
30185
30186 for {
30187 if v_0.Op != OpConst32 {
30188 break
30189 }
30190 c := auxIntToInt32(v_0.AuxInt)
30191 v.reset(OpConst64)
30192 v.AuxInt = int64ToAuxInt(int64(c))
30193 return true
30194 }
30195
30196
30197
30198 for {
30199 if v_0.Op != OpTrunc64to32 {
30200 break
30201 }
30202 x := v_0.Args[0]
30203 if x.Op != OpRsh64x64 {
30204 break
30205 }
30206 _ = x.Args[1]
30207 x_1 := x.Args[1]
30208 if x_1.Op != OpConst64 {
30209 break
30210 }
30211 s := auxIntToInt64(x_1.AuxInt)
30212 if !(s >= 32) {
30213 break
30214 }
30215 v.copyOf(x)
30216 return true
30217 }
30218 return false
30219 }
30220 func rewriteValuegeneric_OpSignExt8to16(v *Value) bool {
30221 v_0 := v.Args[0]
30222
30223
30224 for {
30225 if v_0.Op != OpConst8 {
30226 break
30227 }
30228 c := auxIntToInt8(v_0.AuxInt)
30229 v.reset(OpConst16)
30230 v.AuxInt = int16ToAuxInt(int16(c))
30231 return true
30232 }
30233
30234
30235
30236 for {
30237 if v_0.Op != OpTrunc16to8 {
30238 break
30239 }
30240 x := v_0.Args[0]
30241 if x.Op != OpRsh16x64 {
30242 break
30243 }
30244 _ = x.Args[1]
30245 x_1 := x.Args[1]
30246 if x_1.Op != OpConst64 {
30247 break
30248 }
30249 s := auxIntToInt64(x_1.AuxInt)
30250 if !(s >= 8) {
30251 break
30252 }
30253 v.copyOf(x)
30254 return true
30255 }
30256 return false
30257 }
30258 func rewriteValuegeneric_OpSignExt8to32(v *Value) bool {
30259 v_0 := v.Args[0]
30260
30261
30262 for {
30263 if v_0.Op != OpConst8 {
30264 break
30265 }
30266 c := auxIntToInt8(v_0.AuxInt)
30267 v.reset(OpConst32)
30268 v.AuxInt = int32ToAuxInt(int32(c))
30269 return true
30270 }
30271
30272
30273
30274 for {
30275 if v_0.Op != OpTrunc32to8 {
30276 break
30277 }
30278 x := v_0.Args[0]
30279 if x.Op != OpRsh32x64 {
30280 break
30281 }
30282 _ = x.Args[1]
30283 x_1 := x.Args[1]
30284 if x_1.Op != OpConst64 {
30285 break
30286 }
30287 s := auxIntToInt64(x_1.AuxInt)
30288 if !(s >= 24) {
30289 break
30290 }
30291 v.copyOf(x)
30292 return true
30293 }
30294 return false
30295 }
30296 func rewriteValuegeneric_OpSignExt8to64(v *Value) bool {
30297 v_0 := v.Args[0]
30298
30299
30300 for {
30301 if v_0.Op != OpConst8 {
30302 break
30303 }
30304 c := auxIntToInt8(v_0.AuxInt)
30305 v.reset(OpConst64)
30306 v.AuxInt = int64ToAuxInt(int64(c))
30307 return true
30308 }
30309
30310
30311
30312 for {
30313 if v_0.Op != OpTrunc64to8 {
30314 break
30315 }
30316 x := v_0.Args[0]
30317 if x.Op != OpRsh64x64 {
30318 break
30319 }
30320 _ = x.Args[1]
30321 x_1 := x.Args[1]
30322 if x_1.Op != OpConst64 {
30323 break
30324 }
30325 s := auxIntToInt64(x_1.AuxInt)
30326 if !(s >= 56) {
30327 break
30328 }
30329 v.copyOf(x)
30330 return true
30331 }
30332 return false
30333 }
30334 func rewriteValuegeneric_OpSliceCap(v *Value) bool {
30335 v_0 := v.Args[0]
30336
30337
30338 for {
30339 if v_0.Op != OpSliceMake {
30340 break
30341 }
30342 _ = v_0.Args[2]
30343 v_0_2 := v_0.Args[2]
30344 if v_0_2.Op != OpConst64 {
30345 break
30346 }
30347 t := v_0_2.Type
30348 c := auxIntToInt64(v_0_2.AuxInt)
30349 v.reset(OpConst64)
30350 v.Type = t
30351 v.AuxInt = int64ToAuxInt(c)
30352 return true
30353 }
30354
30355
30356 for {
30357 if v_0.Op != OpSliceMake {
30358 break
30359 }
30360 _ = v_0.Args[2]
30361 v_0_2 := v_0.Args[2]
30362 if v_0_2.Op != OpConst32 {
30363 break
30364 }
30365 t := v_0_2.Type
30366 c := auxIntToInt32(v_0_2.AuxInt)
30367 v.reset(OpConst32)
30368 v.Type = t
30369 v.AuxInt = int32ToAuxInt(c)
30370 return true
30371 }
30372
30373
30374 for {
30375 if v_0.Op != OpSliceMake {
30376 break
30377 }
30378 _ = v_0.Args[2]
30379 v_0_2 := v_0.Args[2]
30380 if v_0_2.Op != OpSliceCap {
30381 break
30382 }
30383 x := v_0_2.Args[0]
30384 v.reset(OpSliceCap)
30385 v.AddArg(x)
30386 return true
30387 }
30388
30389
30390 for {
30391 if v_0.Op != OpSliceMake {
30392 break
30393 }
30394 _ = v_0.Args[2]
30395 v_0_2 := v_0.Args[2]
30396 if v_0_2.Op != OpSliceLen {
30397 break
30398 }
30399 x := v_0_2.Args[0]
30400 v.reset(OpSliceLen)
30401 v.AddArg(x)
30402 return true
30403 }
30404 return false
30405 }
30406 func rewriteValuegeneric_OpSliceLen(v *Value) bool {
30407 v_0 := v.Args[0]
30408
30409
30410 for {
30411 if v_0.Op != OpSliceMake {
30412 break
30413 }
30414 _ = v_0.Args[1]
30415 v_0_1 := v_0.Args[1]
30416 if v_0_1.Op != OpConst64 {
30417 break
30418 }
30419 t := v_0_1.Type
30420 c := auxIntToInt64(v_0_1.AuxInt)
30421 v.reset(OpConst64)
30422 v.Type = t
30423 v.AuxInt = int64ToAuxInt(c)
30424 return true
30425 }
30426
30427
30428 for {
30429 if v_0.Op != OpSliceMake {
30430 break
30431 }
30432 _ = v_0.Args[1]
30433 v_0_1 := v_0.Args[1]
30434 if v_0_1.Op != OpConst32 {
30435 break
30436 }
30437 t := v_0_1.Type
30438 c := auxIntToInt32(v_0_1.AuxInt)
30439 v.reset(OpConst32)
30440 v.Type = t
30441 v.AuxInt = int32ToAuxInt(c)
30442 return true
30443 }
30444
30445
30446 for {
30447 if v_0.Op != OpSliceMake {
30448 break
30449 }
30450 _ = v_0.Args[1]
30451 v_0_1 := v_0.Args[1]
30452 if v_0_1.Op != OpSliceLen {
30453 break
30454 }
30455 x := v_0_1.Args[0]
30456 v.reset(OpSliceLen)
30457 v.AddArg(x)
30458 return true
30459 }
30460
30461
30462
30463 for {
30464 if v_0.Op != OpSelectN || auxIntToInt64(v_0.AuxInt) != 0 {
30465 break
30466 }
30467 v_0_0 := v_0.Args[0]
30468 if v_0_0.Op != OpStaticLECall || len(v_0_0.Args) != 6 {
30469 break
30470 }
30471 sym := auxToCall(v_0_0.Aux)
30472 _ = v_0_0.Args[1]
30473 newLen := v_0_0.Args[1]
30474 if newLen.Op != OpConst64 || !(isSameCall(sym, "runtime.growslice")) {
30475 break
30476 }
30477 v.copyOf(newLen)
30478 return true
30479 }
30480
30481
30482
30483 for {
30484 if v_0.Op != OpSelectN || auxIntToInt64(v_0.AuxInt) != 0 {
30485 break
30486 }
30487 v_0_0 := v_0.Args[0]
30488 if v_0_0.Op != OpStaticLECall || len(v_0_0.Args) != 6 {
30489 break
30490 }
30491 sym := auxToCall(v_0_0.Aux)
30492 _ = v_0_0.Args[1]
30493 newLen := v_0_0.Args[1]
30494 if newLen.Op != OpConst32 || !(isSameCall(sym, "runtime.growslice")) {
30495 break
30496 }
30497 v.copyOf(newLen)
30498 return true
30499 }
30500 return false
30501 }
30502 func rewriteValuegeneric_OpSlicePtr(v *Value) bool {
30503 v_0 := v.Args[0]
30504
30505
30506 for {
30507 if v_0.Op != OpSliceMake {
30508 break
30509 }
30510 v_0_0 := v_0.Args[0]
30511 if v_0_0.Op != OpSlicePtr {
30512 break
30513 }
30514 x := v_0_0.Args[0]
30515 v.reset(OpSlicePtr)
30516 v.AddArg(x)
30517 return true
30518 }
30519 return false
30520 }
30521 func rewriteValuegeneric_OpSlicemask(v *Value) bool {
30522 v_0 := v.Args[0]
30523
30524
30525
30526 for {
30527 if v_0.Op != OpConst32 {
30528 break
30529 }
30530 x := auxIntToInt32(v_0.AuxInt)
30531 if !(x > 0) {
30532 break
30533 }
30534 v.reset(OpConst32)
30535 v.AuxInt = int32ToAuxInt(-1)
30536 return true
30537 }
30538
30539
30540 for {
30541 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
30542 break
30543 }
30544 v.reset(OpConst32)
30545 v.AuxInt = int32ToAuxInt(0)
30546 return true
30547 }
30548
30549
30550
30551 for {
30552 if v_0.Op != OpConst64 {
30553 break
30554 }
30555 x := auxIntToInt64(v_0.AuxInt)
30556 if !(x > 0) {
30557 break
30558 }
30559 v.reset(OpConst64)
30560 v.AuxInt = int64ToAuxInt(-1)
30561 return true
30562 }
30563
30564
30565 for {
30566 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
30567 break
30568 }
30569 v.reset(OpConst64)
30570 v.AuxInt = int64ToAuxInt(0)
30571 return true
30572 }
30573 return false
30574 }
30575 func rewriteValuegeneric_OpSqrt(v *Value) bool {
30576 v_0 := v.Args[0]
30577
30578
30579
30580 for {
30581 if v_0.Op != OpConst64F {
30582 break
30583 }
30584 c := auxIntToFloat64(v_0.AuxInt)
30585 if !(!math.IsNaN(math.Sqrt(c))) {
30586 break
30587 }
30588 v.reset(OpConst64F)
30589 v.AuxInt = float64ToAuxInt(math.Sqrt(c))
30590 return true
30591 }
30592 return false
30593 }
30594 func rewriteValuegeneric_OpStaticCall(v *Value) bool {
30595 b := v.Block
30596 typ := &b.Func.Config.Types
30597
30598
30599
30600 for {
30601 if len(v.Args) != 4 {
30602 break
30603 }
30604 callAux := auxToCall(v.Aux)
30605 mem := v.Args[3]
30606 p := v.Args[0]
30607 q := v.Args[1]
30608 if !(isSameCall(callAux, "runtime.memequal") && isSamePtr(p, q)) {
30609 break
30610 }
30611 v.reset(OpMakeResult)
30612 v0 := b.NewValue0(v.Pos, OpConstBool, typ.Bool)
30613 v0.AuxInt = boolToAuxInt(true)
30614 v.AddArg2(v0, mem)
30615 return true
30616 }
30617 return false
30618 }
30619 func rewriteValuegeneric_OpStaticLECall(v *Value) bool {
30620 b := v.Block
30621 config := b.Func.Config
30622 typ := &b.Func.Config.Types
30623
30624
30625
30626 for {
30627 if len(v.Args) != 4 {
30628 break
30629 }
30630 callAux := auxToCall(v.Aux)
30631 mem := v.Args[3]
30632 sptr := v.Args[0]
30633 v_1 := v.Args[1]
30634 if v_1.Op != OpAddr {
30635 break
30636 }
30637 scon := auxToSym(v_1.Aux)
30638 v_1_0 := v_1.Args[0]
30639 if v_1_0.Op != OpSB {
30640 break
30641 }
30642 v_2 := v.Args[2]
30643 if v_2.Op != OpConst64 || auxIntToInt64(v_2.AuxInt) != 1 || !(isSameCall(callAux, "runtime.memequal") && symIsRO(scon)) {
30644 break
30645 }
30646 v.reset(OpMakeResult)
30647 v0 := b.NewValue0(v.Pos, OpEq8, typ.Bool)
30648 v1 := b.NewValue0(v.Pos, OpLoad, typ.Int8)
30649 v1.AddArg2(sptr, mem)
30650 v2 := b.NewValue0(v.Pos, OpConst8, typ.Int8)
30651 v2.AuxInt = int8ToAuxInt(int8(read8(scon, 0)))
30652 v0.AddArg2(v1, v2)
30653 v.AddArg2(v0, mem)
30654 return true
30655 }
30656
30657
30658
30659 for {
30660 if len(v.Args) != 4 {
30661 break
30662 }
30663 callAux := auxToCall(v.Aux)
30664 mem := v.Args[3]
30665 v_0 := v.Args[0]
30666 if v_0.Op != OpAddr {
30667 break
30668 }
30669 scon := auxToSym(v_0.Aux)
30670 v_0_0 := v_0.Args[0]
30671 if v_0_0.Op != OpSB {
30672 break
30673 }
30674 sptr := v.Args[1]
30675 v_2 := v.Args[2]
30676 if v_2.Op != OpConst64 || auxIntToInt64(v_2.AuxInt) != 1 || !(isSameCall(callAux, "runtime.memequal") && symIsRO(scon)) {
30677 break
30678 }
30679 v.reset(OpMakeResult)
30680 v0 := b.NewValue0(v.Pos, OpEq8, typ.Bool)
30681 v1 := b.NewValue0(v.Pos, OpLoad, typ.Int8)
30682 v1.AddArg2(sptr, mem)
30683 v2 := b.NewValue0(v.Pos, OpConst8, typ.Int8)
30684 v2.AuxInt = int8ToAuxInt(int8(read8(scon, 0)))
30685 v0.AddArg2(v1, v2)
30686 v.AddArg2(v0, mem)
30687 return true
30688 }
30689
30690
30691
30692 for {
30693 if len(v.Args) != 4 {
30694 break
30695 }
30696 callAux := auxToCall(v.Aux)
30697 mem := v.Args[3]
30698 sptr := v.Args[0]
30699 v_1 := v.Args[1]
30700 if v_1.Op != OpAddr {
30701 break
30702 }
30703 scon := auxToSym(v_1.Aux)
30704 v_1_0 := v_1.Args[0]
30705 if v_1_0.Op != OpSB {
30706 break
30707 }
30708 v_2 := v.Args[2]
30709 if v_2.Op != OpConst64 || auxIntToInt64(v_2.AuxInt) != 2 || !(isSameCall(callAux, "runtime.memequal") && symIsRO(scon) && canLoadUnaligned(config)) {
30710 break
30711 }
30712 v.reset(OpMakeResult)
30713 v0 := b.NewValue0(v.Pos, OpEq16, typ.Bool)
30714 v1 := b.NewValue0(v.Pos, OpLoad, typ.Int16)
30715 v1.AddArg2(sptr, mem)
30716 v2 := b.NewValue0(v.Pos, OpConst16, typ.Int16)
30717 v2.AuxInt = int16ToAuxInt(int16(read16(scon, 0, config.ctxt.Arch.ByteOrder)))
30718 v0.AddArg2(v1, v2)
30719 v.AddArg2(v0, mem)
30720 return true
30721 }
30722
30723
30724
30725 for {
30726 if len(v.Args) != 4 {
30727 break
30728 }
30729 callAux := auxToCall(v.Aux)
30730 mem := v.Args[3]
30731 v_0 := v.Args[0]
30732 if v_0.Op != OpAddr {
30733 break
30734 }
30735 scon := auxToSym(v_0.Aux)
30736 v_0_0 := v_0.Args[0]
30737 if v_0_0.Op != OpSB {
30738 break
30739 }
30740 sptr := v.Args[1]
30741 v_2 := v.Args[2]
30742 if v_2.Op != OpConst64 || auxIntToInt64(v_2.AuxInt) != 2 || !(isSameCall(callAux, "runtime.memequal") && symIsRO(scon) && canLoadUnaligned(config)) {
30743 break
30744 }
30745 v.reset(OpMakeResult)
30746 v0 := b.NewValue0(v.Pos, OpEq16, typ.Bool)
30747 v1 := b.NewValue0(v.Pos, OpLoad, typ.Int16)
30748 v1.AddArg2(sptr, mem)
30749 v2 := b.NewValue0(v.Pos, OpConst16, typ.Int16)
30750 v2.AuxInt = int16ToAuxInt(int16(read16(scon, 0, config.ctxt.Arch.ByteOrder)))
30751 v0.AddArg2(v1, v2)
30752 v.AddArg2(v0, mem)
30753 return true
30754 }
30755
30756
30757
30758 for {
30759 if len(v.Args) != 4 {
30760 break
30761 }
30762 callAux := auxToCall(v.Aux)
30763 mem := v.Args[3]
30764 sptr := v.Args[0]
30765 v_1 := v.Args[1]
30766 if v_1.Op != OpAddr {
30767 break
30768 }
30769 scon := auxToSym(v_1.Aux)
30770 v_1_0 := v_1.Args[0]
30771 if v_1_0.Op != OpSB {
30772 break
30773 }
30774 v_2 := v.Args[2]
30775 if v_2.Op != OpConst64 || auxIntToInt64(v_2.AuxInt) != 4 || !(isSameCall(callAux, "runtime.memequal") && symIsRO(scon) && canLoadUnaligned(config)) {
30776 break
30777 }
30778 v.reset(OpMakeResult)
30779 v0 := b.NewValue0(v.Pos, OpEq32, typ.Bool)
30780 v1 := b.NewValue0(v.Pos, OpLoad, typ.Int32)
30781 v1.AddArg2(sptr, mem)
30782 v2 := b.NewValue0(v.Pos, OpConst32, typ.Int32)
30783 v2.AuxInt = int32ToAuxInt(int32(read32(scon, 0, config.ctxt.Arch.ByteOrder)))
30784 v0.AddArg2(v1, v2)
30785 v.AddArg2(v0, mem)
30786 return true
30787 }
30788
30789
30790
30791 for {
30792 if len(v.Args) != 4 {
30793 break
30794 }
30795 callAux := auxToCall(v.Aux)
30796 mem := v.Args[3]
30797 v_0 := v.Args[0]
30798 if v_0.Op != OpAddr {
30799 break
30800 }
30801 scon := auxToSym(v_0.Aux)
30802 v_0_0 := v_0.Args[0]
30803 if v_0_0.Op != OpSB {
30804 break
30805 }
30806 sptr := v.Args[1]
30807 v_2 := v.Args[2]
30808 if v_2.Op != OpConst64 || auxIntToInt64(v_2.AuxInt) != 4 || !(isSameCall(callAux, "runtime.memequal") && symIsRO(scon) && canLoadUnaligned(config)) {
30809 break
30810 }
30811 v.reset(OpMakeResult)
30812 v0 := b.NewValue0(v.Pos, OpEq32, typ.Bool)
30813 v1 := b.NewValue0(v.Pos, OpLoad, typ.Int32)
30814 v1.AddArg2(sptr, mem)
30815 v2 := b.NewValue0(v.Pos, OpConst32, typ.Int32)
30816 v2.AuxInt = int32ToAuxInt(int32(read32(scon, 0, config.ctxt.Arch.ByteOrder)))
30817 v0.AddArg2(v1, v2)
30818 v.AddArg2(v0, mem)
30819 return true
30820 }
30821
30822
30823
30824 for {
30825 if len(v.Args) != 4 {
30826 break
30827 }
30828 callAux := auxToCall(v.Aux)
30829 mem := v.Args[3]
30830 sptr := v.Args[0]
30831 v_1 := v.Args[1]
30832 if v_1.Op != OpAddr {
30833 break
30834 }
30835 scon := auxToSym(v_1.Aux)
30836 v_1_0 := v_1.Args[0]
30837 if v_1_0.Op != OpSB {
30838 break
30839 }
30840 v_2 := v.Args[2]
30841 if v_2.Op != OpConst64 || auxIntToInt64(v_2.AuxInt) != 8 || !(isSameCall(callAux, "runtime.memequal") && symIsRO(scon) && canLoadUnaligned(config) && config.PtrSize == 8) {
30842 break
30843 }
30844 v.reset(OpMakeResult)
30845 v0 := b.NewValue0(v.Pos, OpEq64, typ.Bool)
30846 v1 := b.NewValue0(v.Pos, OpLoad, typ.Int64)
30847 v1.AddArg2(sptr, mem)
30848 v2 := b.NewValue0(v.Pos, OpConst64, typ.Int64)
30849 v2.AuxInt = int64ToAuxInt(int64(read64(scon, 0, config.ctxt.Arch.ByteOrder)))
30850 v0.AddArg2(v1, v2)
30851 v.AddArg2(v0, mem)
30852 return true
30853 }
30854
30855
30856
30857 for {
30858 if len(v.Args) != 4 {
30859 break
30860 }
30861 callAux := auxToCall(v.Aux)
30862 mem := v.Args[3]
30863 v_0 := v.Args[0]
30864 if v_0.Op != OpAddr {
30865 break
30866 }
30867 scon := auxToSym(v_0.Aux)
30868 v_0_0 := v_0.Args[0]
30869 if v_0_0.Op != OpSB {
30870 break
30871 }
30872 sptr := v.Args[1]
30873 v_2 := v.Args[2]
30874 if v_2.Op != OpConst64 || auxIntToInt64(v_2.AuxInt) != 8 || !(isSameCall(callAux, "runtime.memequal") && symIsRO(scon) && canLoadUnaligned(config) && config.PtrSize == 8) {
30875 break
30876 }
30877 v.reset(OpMakeResult)
30878 v0 := b.NewValue0(v.Pos, OpEq64, typ.Bool)
30879 v1 := b.NewValue0(v.Pos, OpLoad, typ.Int64)
30880 v1.AddArg2(sptr, mem)
30881 v2 := b.NewValue0(v.Pos, OpConst64, typ.Int64)
30882 v2.AuxInt = int64ToAuxInt(int64(read64(scon, 0, config.ctxt.Arch.ByteOrder)))
30883 v0.AddArg2(v1, v2)
30884 v.AddArg2(v0, mem)
30885 return true
30886 }
30887
30888
30889
30890 for {
30891 if len(v.Args) != 4 {
30892 break
30893 }
30894 callAux := auxToCall(v.Aux)
30895 mem := v.Args[3]
30896 sptr := v.Args[0]
30897 v_1 := v.Args[1]
30898 if v_1.Op != OpAddr {
30899 break
30900 }
30901 scon := auxToSym(v_1.Aux)
30902 v_1_0 := v_1.Args[0]
30903 if v_1_0.Op != OpSB {
30904 break
30905 }
30906 v_2 := v.Args[2]
30907 if v_2.Op != OpConst64 || auxIntToInt64(v_2.AuxInt) != 3 || !(isSameCall(callAux, "runtime.memequal") && symIsRO(scon) && canLoadUnaligned(config)) {
30908 break
30909 }
30910 v.reset(OpMakeResult)
30911 v0 := b.NewValue0(v.Pos, OpEq32, typ.Bool)
30912 v1 := b.NewValue0(v.Pos, OpOr32, typ.Int32)
30913 v2 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.Int32)
30914 v3 := b.NewValue0(v.Pos, OpLoad, typ.Int16)
30915 v3.AddArg2(sptr, mem)
30916 v2.AddArg(v3)
30917 v4 := b.NewValue0(v.Pos, OpLsh32x32, typ.Int32)
30918 v5 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.Int32)
30919 v6 := b.NewValue0(v.Pos, OpLoad, typ.Int8)
30920 v7 := b.NewValue0(v.Pos, OpOffPtr, typ.BytePtr)
30921 v7.AuxInt = int64ToAuxInt(2)
30922 v7.AddArg(sptr)
30923 v6.AddArg2(v7, mem)
30924 v5.AddArg(v6)
30925 v8 := b.NewValue0(v.Pos, OpConst32, typ.Int32)
30926 v8.AuxInt = int32ToAuxInt(16)
30927 v4.AddArg2(v5, v8)
30928 v1.AddArg2(v2, v4)
30929 v9 := b.NewValue0(v.Pos, OpConst32, typ.Int32)
30930 v9.AuxInt = int32ToAuxInt(int32(uint32(read16(scon, 0, config.ctxt.Arch.ByteOrder)) | (uint32(read8(scon, 2)) << 16)))
30931 v0.AddArg2(v1, v9)
30932 v.AddArg2(v0, mem)
30933 return true
30934 }
30935
30936
30937
30938 for {
30939 if len(v.Args) != 4 {
30940 break
30941 }
30942 callAux := auxToCall(v.Aux)
30943 mem := v.Args[3]
30944 v_0 := v.Args[0]
30945 if v_0.Op != OpAddr {
30946 break
30947 }
30948 scon := auxToSym(v_0.Aux)
30949 v_0_0 := v_0.Args[0]
30950 if v_0_0.Op != OpSB {
30951 break
30952 }
30953 sptr := v.Args[1]
30954 v_2 := v.Args[2]
30955 if v_2.Op != OpConst64 || auxIntToInt64(v_2.AuxInt) != 3 || !(isSameCall(callAux, "runtime.memequal") && symIsRO(scon) && canLoadUnaligned(config)) {
30956 break
30957 }
30958 v.reset(OpMakeResult)
30959 v0 := b.NewValue0(v.Pos, OpEq32, typ.Bool)
30960 v1 := b.NewValue0(v.Pos, OpOr32, typ.Int32)
30961 v2 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.Int32)
30962 v3 := b.NewValue0(v.Pos, OpLoad, typ.Int16)
30963 v3.AddArg2(sptr, mem)
30964 v2.AddArg(v3)
30965 v4 := b.NewValue0(v.Pos, OpLsh32x32, typ.Int32)
30966 v5 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.Int32)
30967 v6 := b.NewValue0(v.Pos, OpLoad, typ.Int8)
30968 v7 := b.NewValue0(v.Pos, OpOffPtr, typ.BytePtr)
30969 v7.AuxInt = int64ToAuxInt(2)
30970 v7.AddArg(sptr)
30971 v6.AddArg2(v7, mem)
30972 v5.AddArg(v6)
30973 v8 := b.NewValue0(v.Pos, OpConst32, typ.Int32)
30974 v8.AuxInt = int32ToAuxInt(16)
30975 v4.AddArg2(v5, v8)
30976 v1.AddArg2(v2, v4)
30977 v9 := b.NewValue0(v.Pos, OpConst32, typ.Int32)
30978 v9.AuxInt = int32ToAuxInt(int32(uint32(read16(scon, 0, config.ctxt.Arch.ByteOrder)) | (uint32(read8(scon, 2)) << 16)))
30979 v0.AddArg2(v1, v9)
30980 v.AddArg2(v0, mem)
30981 return true
30982 }
30983
30984
30985
30986 for {
30987 if len(v.Args) != 4 {
30988 break
30989 }
30990 callAux := auxToCall(v.Aux)
30991 mem := v.Args[3]
30992 sptr := v.Args[0]
30993 v_1 := v.Args[1]
30994 if v_1.Op != OpAddr {
30995 break
30996 }
30997 scon := auxToSym(v_1.Aux)
30998 v_1_0 := v_1.Args[0]
30999 if v_1_0.Op != OpSB {
31000 break
31001 }
31002 v_2 := v.Args[2]
31003 if v_2.Op != OpConst64 || auxIntToInt64(v_2.AuxInt) != 5 || !(isSameCall(callAux, "runtime.memequal") && symIsRO(scon) && canLoadUnaligned(config) && config.PtrSize == 8) {
31004 break
31005 }
31006 v.reset(OpMakeResult)
31007 v0 := b.NewValue0(v.Pos, OpEq64, typ.Bool)
31008 v1 := b.NewValue0(v.Pos, OpOr64, typ.Int64)
31009 v2 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.Int64)
31010 v3 := b.NewValue0(v.Pos, OpLoad, typ.Int32)
31011 v3.AddArg2(sptr, mem)
31012 v2.AddArg(v3)
31013 v4 := b.NewValue0(v.Pos, OpLsh64x64, typ.Int64)
31014 v5 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.Int64)
31015 v6 := b.NewValue0(v.Pos, OpLoad, typ.Int8)
31016 v7 := b.NewValue0(v.Pos, OpOffPtr, typ.BytePtr)
31017 v7.AuxInt = int64ToAuxInt(4)
31018 v7.AddArg(sptr)
31019 v6.AddArg2(v7, mem)
31020 v5.AddArg(v6)
31021 v8 := b.NewValue0(v.Pos, OpConst64, typ.Int64)
31022 v8.AuxInt = int64ToAuxInt(32)
31023 v4.AddArg2(v5, v8)
31024 v1.AddArg2(v2, v4)
31025 v9 := b.NewValue0(v.Pos, OpConst64, typ.Int64)
31026 v9.AuxInt = int64ToAuxInt(int64(uint64(read32(scon, 0, config.ctxt.Arch.ByteOrder)) | (uint64(read8(scon, 4)) << 32)))
31027 v0.AddArg2(v1, v9)
31028 v.AddArg2(v0, mem)
31029 return true
31030 }
31031
31032
31033
31034 for {
31035 if len(v.Args) != 4 {
31036 break
31037 }
31038 callAux := auxToCall(v.Aux)
31039 mem := v.Args[3]
31040 v_0 := v.Args[0]
31041 if v_0.Op != OpAddr {
31042 break
31043 }
31044 scon := auxToSym(v_0.Aux)
31045 v_0_0 := v_0.Args[0]
31046 if v_0_0.Op != OpSB {
31047 break
31048 }
31049 sptr := v.Args[1]
31050 v_2 := v.Args[2]
31051 if v_2.Op != OpConst64 || auxIntToInt64(v_2.AuxInt) != 5 || !(isSameCall(callAux, "runtime.memequal") && symIsRO(scon) && canLoadUnaligned(config) && config.PtrSize == 8) {
31052 break
31053 }
31054 v.reset(OpMakeResult)
31055 v0 := b.NewValue0(v.Pos, OpEq64, typ.Bool)
31056 v1 := b.NewValue0(v.Pos, OpOr64, typ.Int64)
31057 v2 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.Int64)
31058 v3 := b.NewValue0(v.Pos, OpLoad, typ.Int32)
31059 v3.AddArg2(sptr, mem)
31060 v2.AddArg(v3)
31061 v4 := b.NewValue0(v.Pos, OpLsh64x64, typ.Int64)
31062 v5 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.Int64)
31063 v6 := b.NewValue0(v.Pos, OpLoad, typ.Int8)
31064 v7 := b.NewValue0(v.Pos, OpOffPtr, typ.BytePtr)
31065 v7.AuxInt = int64ToAuxInt(4)
31066 v7.AddArg(sptr)
31067 v6.AddArg2(v7, mem)
31068 v5.AddArg(v6)
31069 v8 := b.NewValue0(v.Pos, OpConst64, typ.Int64)
31070 v8.AuxInt = int64ToAuxInt(32)
31071 v4.AddArg2(v5, v8)
31072 v1.AddArg2(v2, v4)
31073 v9 := b.NewValue0(v.Pos, OpConst64, typ.Int64)
31074 v9.AuxInt = int64ToAuxInt(int64(uint64(read32(scon, 0, config.ctxt.Arch.ByteOrder)) | (uint64(read8(scon, 4)) << 32)))
31075 v0.AddArg2(v1, v9)
31076 v.AddArg2(v0, mem)
31077 return true
31078 }
31079
31080
31081
31082 for {
31083 if len(v.Args) != 4 {
31084 break
31085 }
31086 callAux := auxToCall(v.Aux)
31087 mem := v.Args[3]
31088 sptr := v.Args[0]
31089 v_1 := v.Args[1]
31090 if v_1.Op != OpAddr {
31091 break
31092 }
31093 scon := auxToSym(v_1.Aux)
31094 v_1_0 := v_1.Args[0]
31095 if v_1_0.Op != OpSB {
31096 break
31097 }
31098 v_2 := v.Args[2]
31099 if v_2.Op != OpConst64 || auxIntToInt64(v_2.AuxInt) != 6 || !(isSameCall(callAux, "runtime.memequal") && symIsRO(scon) && canLoadUnaligned(config) && config.PtrSize == 8) {
31100 break
31101 }
31102 v.reset(OpMakeResult)
31103 v0 := b.NewValue0(v.Pos, OpEq64, typ.Bool)
31104 v1 := b.NewValue0(v.Pos, OpOr64, typ.Int64)
31105 v2 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.Int64)
31106 v3 := b.NewValue0(v.Pos, OpLoad, typ.Int32)
31107 v3.AddArg2(sptr, mem)
31108 v2.AddArg(v3)
31109 v4 := b.NewValue0(v.Pos, OpLsh64x64, typ.Int64)
31110 v5 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.Int64)
31111 v6 := b.NewValue0(v.Pos, OpLoad, typ.Int16)
31112 v7 := b.NewValue0(v.Pos, OpOffPtr, typ.BytePtr)
31113 v7.AuxInt = int64ToAuxInt(4)
31114 v7.AddArg(sptr)
31115 v6.AddArg2(v7, mem)
31116 v5.AddArg(v6)
31117 v8 := b.NewValue0(v.Pos, OpConst64, typ.Int64)
31118 v8.AuxInt = int64ToAuxInt(32)
31119 v4.AddArg2(v5, v8)
31120 v1.AddArg2(v2, v4)
31121 v9 := b.NewValue0(v.Pos, OpConst64, typ.Int64)
31122 v9.AuxInt = int64ToAuxInt(int64(uint64(read32(scon, 0, config.ctxt.Arch.ByteOrder)) | (uint64(read16(scon, 4, config.ctxt.Arch.ByteOrder)) << 32)))
31123 v0.AddArg2(v1, v9)
31124 v.AddArg2(v0, mem)
31125 return true
31126 }
31127
31128
31129
31130 for {
31131 if len(v.Args) != 4 {
31132 break
31133 }
31134 callAux := auxToCall(v.Aux)
31135 mem := v.Args[3]
31136 v_0 := v.Args[0]
31137 if v_0.Op != OpAddr {
31138 break
31139 }
31140 scon := auxToSym(v_0.Aux)
31141 v_0_0 := v_0.Args[0]
31142 if v_0_0.Op != OpSB {
31143 break
31144 }
31145 sptr := v.Args[1]
31146 v_2 := v.Args[2]
31147 if v_2.Op != OpConst64 || auxIntToInt64(v_2.AuxInt) != 6 || !(isSameCall(callAux, "runtime.memequal") && symIsRO(scon) && canLoadUnaligned(config) && config.PtrSize == 8) {
31148 break
31149 }
31150 v.reset(OpMakeResult)
31151 v0 := b.NewValue0(v.Pos, OpEq64, typ.Bool)
31152 v1 := b.NewValue0(v.Pos, OpOr64, typ.Int64)
31153 v2 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.Int64)
31154 v3 := b.NewValue0(v.Pos, OpLoad, typ.Int32)
31155 v3.AddArg2(sptr, mem)
31156 v2.AddArg(v3)
31157 v4 := b.NewValue0(v.Pos, OpLsh64x64, typ.Int64)
31158 v5 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.Int64)
31159 v6 := b.NewValue0(v.Pos, OpLoad, typ.Int16)
31160 v7 := b.NewValue0(v.Pos, OpOffPtr, typ.BytePtr)
31161 v7.AuxInt = int64ToAuxInt(4)
31162 v7.AddArg(sptr)
31163 v6.AddArg2(v7, mem)
31164 v5.AddArg(v6)
31165 v8 := b.NewValue0(v.Pos, OpConst64, typ.Int64)
31166 v8.AuxInt = int64ToAuxInt(32)
31167 v4.AddArg2(v5, v8)
31168 v1.AddArg2(v2, v4)
31169 v9 := b.NewValue0(v.Pos, OpConst64, typ.Int64)
31170 v9.AuxInt = int64ToAuxInt(int64(uint64(read32(scon, 0, config.ctxt.Arch.ByteOrder)) | (uint64(read16(scon, 4, config.ctxt.Arch.ByteOrder)) << 32)))
31171 v0.AddArg2(v1, v9)
31172 v.AddArg2(v0, mem)
31173 return true
31174 }
31175
31176
31177
31178 for {
31179 if len(v.Args) != 4 {
31180 break
31181 }
31182 callAux := auxToCall(v.Aux)
31183 mem := v.Args[3]
31184 sptr := v.Args[0]
31185 v_1 := v.Args[1]
31186 if v_1.Op != OpAddr {
31187 break
31188 }
31189 scon := auxToSym(v_1.Aux)
31190 v_1_0 := v_1.Args[0]
31191 if v_1_0.Op != OpSB {
31192 break
31193 }
31194 v_2 := v.Args[2]
31195 if v_2.Op != OpConst64 || auxIntToInt64(v_2.AuxInt) != 7 || !(isSameCall(callAux, "runtime.memequal") && symIsRO(scon) && canLoadUnaligned(config) && config.PtrSize == 8) {
31196 break
31197 }
31198 v.reset(OpMakeResult)
31199 v0 := b.NewValue0(v.Pos, OpEq64, typ.Bool)
31200 v1 := b.NewValue0(v.Pos, OpOr64, typ.Int64)
31201 v2 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.Int64)
31202 v3 := b.NewValue0(v.Pos, OpLoad, typ.Int32)
31203 v3.AddArg2(sptr, mem)
31204 v2.AddArg(v3)
31205 v4 := b.NewValue0(v.Pos, OpLsh64x64, typ.Int64)
31206 v5 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.Int64)
31207 v6 := b.NewValue0(v.Pos, OpLoad, typ.Int32)
31208 v7 := b.NewValue0(v.Pos, OpOffPtr, typ.BytePtr)
31209 v7.AuxInt = int64ToAuxInt(3)
31210 v7.AddArg(sptr)
31211 v6.AddArg2(v7, mem)
31212 v5.AddArg(v6)
31213 v8 := b.NewValue0(v.Pos, OpConst64, typ.Int64)
31214 v8.AuxInt = int64ToAuxInt(32)
31215 v4.AddArg2(v5, v8)
31216 v1.AddArg2(v2, v4)
31217 v9 := b.NewValue0(v.Pos, OpConst64, typ.Int64)
31218 v9.AuxInt = int64ToAuxInt(int64(uint64(read32(scon, 0, config.ctxt.Arch.ByteOrder)) | (uint64(read32(scon, 3, config.ctxt.Arch.ByteOrder)) << 32)))
31219 v0.AddArg2(v1, v9)
31220 v.AddArg2(v0, mem)
31221 return true
31222 }
31223
31224
31225
31226 for {
31227 if len(v.Args) != 4 {
31228 break
31229 }
31230 callAux := auxToCall(v.Aux)
31231 mem := v.Args[3]
31232 v_0 := v.Args[0]
31233 if v_0.Op != OpAddr {
31234 break
31235 }
31236 scon := auxToSym(v_0.Aux)
31237 v_0_0 := v_0.Args[0]
31238 if v_0_0.Op != OpSB {
31239 break
31240 }
31241 sptr := v.Args[1]
31242 v_2 := v.Args[2]
31243 if v_2.Op != OpConst64 || auxIntToInt64(v_2.AuxInt) != 7 || !(isSameCall(callAux, "runtime.memequal") && symIsRO(scon) && canLoadUnaligned(config) && config.PtrSize == 8) {
31244 break
31245 }
31246 v.reset(OpMakeResult)
31247 v0 := b.NewValue0(v.Pos, OpEq64, typ.Bool)
31248 v1 := b.NewValue0(v.Pos, OpOr64, typ.Int64)
31249 v2 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.Int64)
31250 v3 := b.NewValue0(v.Pos, OpLoad, typ.Int32)
31251 v3.AddArg2(sptr, mem)
31252 v2.AddArg(v3)
31253 v4 := b.NewValue0(v.Pos, OpLsh64x64, typ.Int64)
31254 v5 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.Int64)
31255 v6 := b.NewValue0(v.Pos, OpLoad, typ.Int32)
31256 v7 := b.NewValue0(v.Pos, OpOffPtr, typ.BytePtr)
31257 v7.AuxInt = int64ToAuxInt(3)
31258 v7.AddArg(sptr)
31259 v6.AddArg2(v7, mem)
31260 v5.AddArg(v6)
31261 v8 := b.NewValue0(v.Pos, OpConst64, typ.Int64)
31262 v8.AuxInt = int64ToAuxInt(32)
31263 v4.AddArg2(v5, v8)
31264 v1.AddArg2(v2, v4)
31265 v9 := b.NewValue0(v.Pos, OpConst64, typ.Int64)
31266 v9.AuxInt = int64ToAuxInt(int64(uint64(read32(scon, 0, config.ctxt.Arch.ByteOrder)) | (uint64(read32(scon, 3, config.ctxt.Arch.ByteOrder)) << 32)))
31267 v0.AddArg2(v1, v9)
31268 v.AddArg2(v0, mem)
31269 return true
31270 }
31271
31272
31273
31274 for {
31275 if len(v.Args) != 4 {
31276 break
31277 }
31278 callAux := auxToCall(v.Aux)
31279 mem := v.Args[3]
31280 v_2 := v.Args[2]
31281 if v_2.Op != OpConst64 || auxIntToInt64(v_2.AuxInt) != 0 || !(isSameCall(callAux, "runtime.memequal")) {
31282 break
31283 }
31284 v.reset(OpMakeResult)
31285 v0 := b.NewValue0(v.Pos, OpConstBool, typ.Bool)
31286 v0.AuxInt = boolToAuxInt(true)
31287 v.AddArg2(v0, mem)
31288 return true
31289 }
31290
31291
31292
31293 for {
31294 if len(v.Args) != 4 {
31295 break
31296 }
31297 callAux := auxToCall(v.Aux)
31298 mem := v.Args[3]
31299 p := v.Args[0]
31300 q := v.Args[1]
31301 if !(isSameCall(callAux, "runtime.memequal") && isSamePtr(p, q)) {
31302 break
31303 }
31304 v.reset(OpMakeResult)
31305 v0 := b.NewValue0(v.Pos, OpConstBool, typ.Bool)
31306 v0.AuxInt = boolToAuxInt(true)
31307 v.AddArg2(v0, mem)
31308 return true
31309 }
31310
31311
31312
31313 for {
31314 if len(v.Args) != 4 {
31315 break
31316 }
31317 callAux := auxToCall(v.Aux)
31318 mem := v.Args[3]
31319 v_1 := v.Args[1]
31320 if v_1.Op != OpConst64 || auxIntToInt64(v_1.AuxInt) != 0 {
31321 break
31322 }
31323 v_2 := v.Args[2]
31324 if v_2.Op != OpConst64 || auxIntToInt64(v_2.AuxInt) != 0 || !(isSameCall(callAux, "runtime.makeslice")) {
31325 break
31326 }
31327 v.reset(OpMakeResult)
31328 v0 := b.NewValue0(v.Pos, OpAddr, v.Type.FieldType(0))
31329 v0.Aux = symToAux(ir.Syms.Zerobase)
31330 v1 := b.NewValue0(v.Pos, OpSB, typ.Uintptr)
31331 v0.AddArg(v1)
31332 v.AddArg2(v0, mem)
31333 return true
31334 }
31335
31336
31337
31338 for {
31339 if len(v.Args) != 4 {
31340 break
31341 }
31342 callAux := auxToCall(v.Aux)
31343 mem := v.Args[3]
31344 v_1 := v.Args[1]
31345 if v_1.Op != OpConst32 || auxIntToInt32(v_1.AuxInt) != 0 {
31346 break
31347 }
31348 v_2 := v.Args[2]
31349 if v_2.Op != OpConst32 || auxIntToInt32(v_2.AuxInt) != 0 || !(isSameCall(callAux, "runtime.makeslice")) {
31350 break
31351 }
31352 v.reset(OpMakeResult)
31353 v0 := b.NewValue0(v.Pos, OpAddr, v.Type.FieldType(0))
31354 v0.Aux = symToAux(ir.Syms.Zerobase)
31355 v1 := b.NewValue0(v.Pos, OpSB, typ.Uintptr)
31356 v0.AddArg(v1)
31357 v.AddArg2(v0, mem)
31358 return true
31359 }
31360
31361
31362
31363 for {
31364 if len(v.Args) != 4 {
31365 break
31366 }
31367 f := auxToCall(v.Aux)
31368 mem := v.Args[3]
31369 typ_ := v.Args[0]
31370 x := v.Args[1]
31371 y := v.Args[2]
31372 if !(isSameCall(f, "runtime.efaceeq") && isDirectType(typ_) && clobber(v)) {
31373 break
31374 }
31375 v.reset(OpMakeResult)
31376 v0 := b.NewValue0(v.Pos, OpEqPtr, typ.Bool)
31377 v0.AddArg2(x, y)
31378 v.AddArg2(v0, mem)
31379 return true
31380 }
31381
31382
31383
31384 for {
31385 if len(v.Args) != 4 {
31386 break
31387 }
31388 f := auxToCall(v.Aux)
31389 mem := v.Args[3]
31390 itab := v.Args[0]
31391 x := v.Args[1]
31392 y := v.Args[2]
31393 if !(isSameCall(f, "runtime.ifaceeq") && isDirectIface(itab) && clobber(v)) {
31394 break
31395 }
31396 v.reset(OpMakeResult)
31397 v0 := b.NewValue0(v.Pos, OpEqPtr, typ.Bool)
31398 v0.AddArg2(x, y)
31399 v.AddArg2(v0, mem)
31400 return true
31401 }
31402
31403
31404
31405 for {
31406 if len(v.Args) != 4 {
31407 break
31408 }
31409 argsize := auxIntToInt32(v.AuxInt)
31410 f := auxToCall(v.Aux)
31411 _ = v.Args[3]
31412 typ_ := v.Args[0]
31413 map_ := v.Args[1]
31414 key := v.Args[2]
31415 if key.Op != OpSelectN || auxIntToInt64(key.AuxInt) != 0 {
31416 break
31417 }
31418 sbts := key.Args[0]
31419 if sbts.Op != OpStaticLECall || len(sbts.Args) != 4 {
31420 break
31421 }
31422 g := auxToCall(sbts.Aux)
31423 mem := sbts.Args[3]
31424 ptr := sbts.Args[1]
31425 len := sbts.Args[2]
31426 m := v.Args[3]
31427 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)) {
31428 break
31429 }
31430 v.reset(OpStaticLECall)
31431 v.AuxInt = int32ToAuxInt(argsize)
31432 v.Aux = callToAux(f)
31433 v0 := b.NewValue0(v.Pos, OpStringMake, typ.String)
31434 v0.AddArg2(ptr, len)
31435 v.AddArg4(typ_, map_, v0, mem)
31436 return true
31437 }
31438
31439
31440
31441 for {
31442 if len(v.Args) != 3 {
31443 break
31444 }
31445 argsize := auxIntToInt32(v.AuxInt)
31446 f := auxToCall(v.Aux)
31447 _ = v.Args[2]
31448 dict_ := v.Args[0]
31449 key := v.Args[1]
31450 if key.Op != OpSelectN || auxIntToInt64(key.AuxInt) != 0 {
31451 break
31452 }
31453 sbts := key.Args[0]
31454 if sbts.Op != OpStaticLECall || len(sbts.Args) != 4 {
31455 break
31456 }
31457 g := auxToCall(sbts.Aux)
31458 mem := sbts.Args[3]
31459 ptr := sbts.Args[1]
31460 len := sbts.Args[2]
31461 m := v.Args[2]
31462 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)) {
31463 break
31464 }
31465 v.reset(OpStaticLECall)
31466 v.AuxInt = int32ToAuxInt(argsize)
31467 v.Aux = callToAux(f)
31468 v0 := b.NewValue0(v.Pos, OpStringMake, typ.String)
31469 v0.AddArg2(ptr, len)
31470 v.AddArg3(dict_, v0, mem)
31471 return true
31472 }
31473 return false
31474 }
31475 func rewriteValuegeneric_OpStore(v *Value) bool {
31476 v_2 := v.Args[2]
31477 v_1 := v.Args[1]
31478 v_0 := v.Args[0]
31479 b := v.Block
31480
31481
31482
31483 for {
31484 t1 := auxToType(v.Aux)
31485 p1 := v_0
31486 if v_1.Op != OpLoad {
31487 break
31488 }
31489 t2 := v_1.Type
31490 mem := v_1.Args[1]
31491 p2 := v_1.Args[0]
31492 if mem != v_2 || !(isSamePtr(p1, p2) && t2.Size() == t1.Size()) {
31493 break
31494 }
31495 v.copyOf(mem)
31496 return true
31497 }
31498
31499
31500
31501 for {
31502 t1 := auxToType(v.Aux)
31503 p1 := v_0
31504 if v_1.Op != OpLoad {
31505 break
31506 }
31507 t2 := v_1.Type
31508 oldmem := v_1.Args[1]
31509 p2 := v_1.Args[0]
31510 mem := v_2
31511 if mem.Op != OpStore {
31512 break
31513 }
31514 t3 := auxToType(mem.Aux)
31515 _ = mem.Args[2]
31516 p3 := mem.Args[0]
31517 if oldmem != mem.Args[2] || !(isSamePtr(p1, p2) && t2.Size() == t1.Size() && disjoint(p1, t1.Size(), p3, t3.Size())) {
31518 break
31519 }
31520 v.copyOf(mem)
31521 return true
31522 }
31523
31524
31525
31526 for {
31527 t1 := auxToType(v.Aux)
31528 p1 := v_0
31529 if v_1.Op != OpLoad {
31530 break
31531 }
31532 t2 := v_1.Type
31533 oldmem := v_1.Args[1]
31534 p2 := v_1.Args[0]
31535 mem := v_2
31536 if mem.Op != OpStore {
31537 break
31538 }
31539 t3 := auxToType(mem.Aux)
31540 _ = mem.Args[2]
31541 p3 := mem.Args[0]
31542 mem_2 := mem.Args[2]
31543 if mem_2.Op != OpStore {
31544 break
31545 }
31546 t4 := auxToType(mem_2.Aux)
31547 _ = mem_2.Args[2]
31548 p4 := mem_2.Args[0]
31549 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())) {
31550 break
31551 }
31552 v.copyOf(mem)
31553 return true
31554 }
31555
31556
31557
31558 for {
31559 t1 := auxToType(v.Aux)
31560 p1 := v_0
31561 if v_1.Op != OpLoad {
31562 break
31563 }
31564 t2 := v_1.Type
31565 oldmem := v_1.Args[1]
31566 p2 := v_1.Args[0]
31567 mem := v_2
31568 if mem.Op != OpStore {
31569 break
31570 }
31571 t3 := auxToType(mem.Aux)
31572 _ = mem.Args[2]
31573 p3 := mem.Args[0]
31574 mem_2 := mem.Args[2]
31575 if mem_2.Op != OpStore {
31576 break
31577 }
31578 t4 := auxToType(mem_2.Aux)
31579 _ = mem_2.Args[2]
31580 p4 := mem_2.Args[0]
31581 mem_2_2 := mem_2.Args[2]
31582 if mem_2_2.Op != OpStore {
31583 break
31584 }
31585 t5 := auxToType(mem_2_2.Aux)
31586 _ = mem_2_2.Args[2]
31587 p5 := mem_2_2.Args[0]
31588 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())) {
31589 break
31590 }
31591 v.copyOf(mem)
31592 return true
31593 }
31594
31595
31596
31597 for {
31598 t := auxToType(v.Aux)
31599 if v_0.Op != OpOffPtr {
31600 break
31601 }
31602 o := auxIntToInt64(v_0.AuxInt)
31603 p1 := v_0.Args[0]
31604 x := v_1
31605 mem := v_2
31606 if mem.Op != OpZero {
31607 break
31608 }
31609 n := auxIntToInt64(mem.AuxInt)
31610 p2 := mem.Args[0]
31611 if !(isConstZero(x) && o >= 0 && t.Size()+o <= n && isSamePtr(p1, p2)) {
31612 break
31613 }
31614 v.copyOf(mem)
31615 return true
31616 }
31617
31618
31619
31620 for {
31621 t1 := auxToType(v.Aux)
31622 op := v_0
31623 if op.Op != OpOffPtr {
31624 break
31625 }
31626 o1 := auxIntToInt64(op.AuxInt)
31627 p1 := op.Args[0]
31628 x := v_1
31629 mem := v_2
31630 if mem.Op != OpStore {
31631 break
31632 }
31633 t2 := auxToType(mem.Aux)
31634 _ = mem.Args[2]
31635 p2 := mem.Args[0]
31636 mem_2 := mem.Args[2]
31637 if mem_2.Op != OpZero {
31638 break
31639 }
31640 n := auxIntToInt64(mem_2.AuxInt)
31641 p3 := mem_2.Args[0]
31642 if !(isConstZero(x) && o1 >= 0 && t1.Size()+o1 <= n && isSamePtr(p1, p3) && disjoint(op, t1.Size(), p2, t2.Size())) {
31643 break
31644 }
31645 v.copyOf(mem)
31646 return true
31647 }
31648
31649
31650
31651 for {
31652 t1 := auxToType(v.Aux)
31653 op := v_0
31654 if op.Op != OpOffPtr {
31655 break
31656 }
31657 o1 := auxIntToInt64(op.AuxInt)
31658 p1 := op.Args[0]
31659 x := v_1
31660 mem := v_2
31661 if mem.Op != OpStore {
31662 break
31663 }
31664 t2 := auxToType(mem.Aux)
31665 _ = mem.Args[2]
31666 p2 := mem.Args[0]
31667 mem_2 := mem.Args[2]
31668 if mem_2.Op != OpStore {
31669 break
31670 }
31671 t3 := auxToType(mem_2.Aux)
31672 _ = mem_2.Args[2]
31673 p3 := mem_2.Args[0]
31674 mem_2_2 := mem_2.Args[2]
31675 if mem_2_2.Op != OpZero {
31676 break
31677 }
31678 n := auxIntToInt64(mem_2_2.AuxInt)
31679 p4 := mem_2_2.Args[0]
31680 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())) {
31681 break
31682 }
31683 v.copyOf(mem)
31684 return true
31685 }
31686
31687
31688
31689 for {
31690 t1 := auxToType(v.Aux)
31691 op := v_0
31692 if op.Op != OpOffPtr {
31693 break
31694 }
31695 o1 := auxIntToInt64(op.AuxInt)
31696 p1 := op.Args[0]
31697 x := v_1
31698 mem := v_2
31699 if mem.Op != OpStore {
31700 break
31701 }
31702 t2 := auxToType(mem.Aux)
31703 _ = mem.Args[2]
31704 p2 := mem.Args[0]
31705 mem_2 := mem.Args[2]
31706 if mem_2.Op != OpStore {
31707 break
31708 }
31709 t3 := auxToType(mem_2.Aux)
31710 _ = mem_2.Args[2]
31711 p3 := mem_2.Args[0]
31712 mem_2_2 := mem_2.Args[2]
31713 if mem_2_2.Op != OpStore {
31714 break
31715 }
31716 t4 := auxToType(mem_2_2.Aux)
31717 _ = mem_2_2.Args[2]
31718 p4 := mem_2_2.Args[0]
31719 mem_2_2_2 := mem_2_2.Args[2]
31720 if mem_2_2_2.Op != OpZero {
31721 break
31722 }
31723 n := auxIntToInt64(mem_2_2_2.AuxInt)
31724 p5 := mem_2_2_2.Args[0]
31725 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())) {
31726 break
31727 }
31728 v.copyOf(mem)
31729 return true
31730 }
31731
31732
31733 for {
31734 if v_1.Op != OpStructMake {
31735 break
31736 }
31737 v.copyOf(rewriteStructStore(v))
31738 return true
31739 }
31740
31741
31742
31743 for {
31744 t := auxToType(v.Aux)
31745 dst := v_0
31746 if v_1.Op != OpLoad {
31747 break
31748 }
31749 mem := v_1.Args[1]
31750 src := v_1.Args[0]
31751 if mem != v_2 || !(!CanSSA(t)) {
31752 break
31753 }
31754 v.reset(OpMove)
31755 v.AuxInt = int64ToAuxInt(t.Size())
31756 v.Aux = typeToAux(t)
31757 v.AddArg3(dst, src, mem)
31758 return true
31759 }
31760
31761
31762
31763 for {
31764 t := auxToType(v.Aux)
31765 dst := v_0
31766 if v_1.Op != OpLoad {
31767 break
31768 }
31769 mem := v_1.Args[1]
31770 src := v_1.Args[0]
31771 if v_2.Op != OpVarDef {
31772 break
31773 }
31774 x := auxToSym(v_2.Aux)
31775 if mem != v_2.Args[0] || !(!CanSSA(t)) {
31776 break
31777 }
31778 v.reset(OpMove)
31779 v.AuxInt = int64ToAuxInt(t.Size())
31780 v.Aux = typeToAux(t)
31781 v0 := b.NewValue0(v.Pos, OpVarDef, types.TypeMem)
31782 v0.Aux = symToAux(x)
31783 v0.AddArg(mem)
31784 v.AddArg3(dst, src, v0)
31785 return true
31786 }
31787
31788
31789 for {
31790 if v_1.Op != OpArrayMake0 {
31791 break
31792 }
31793 mem := v_2
31794 v.copyOf(mem)
31795 return true
31796 }
31797
31798
31799 for {
31800 dst := v_0
31801 if v_1.Op != OpArrayMake1 {
31802 break
31803 }
31804 e := v_1.Args[0]
31805 mem := v_2
31806 v.reset(OpStore)
31807 v.Aux = typeToAux(e.Type)
31808 v.AddArg3(dst, e, mem)
31809 return true
31810 }
31811
31812
31813
31814 for {
31815 if v_0.Op != OpSelectN || auxIntToInt64(v_0.AuxInt) != 0 {
31816 break
31817 }
31818 call := v_0.Args[0]
31819 if call.Op != OpStaticLECall || len(call.Args) != 2 {
31820 break
31821 }
31822 x := v_1
31823 mem := v_2
31824 if mem.Op != OpSelectN || auxIntToInt64(mem.AuxInt) != 1 || call != mem.Args[0] || !(isConstZero(x) && isSameCall(call.Aux, "runtime.newobject")) {
31825 break
31826 }
31827 v.copyOf(mem)
31828 return true
31829 }
31830
31831
31832
31833 for {
31834 if v_0.Op != OpOffPtr {
31835 break
31836 }
31837 v_0_0 := v_0.Args[0]
31838 if v_0_0.Op != OpSelectN || auxIntToInt64(v_0_0.AuxInt) != 0 {
31839 break
31840 }
31841 call := v_0_0.Args[0]
31842 if call.Op != OpStaticLECall || len(call.Args) != 2 {
31843 break
31844 }
31845 x := v_1
31846 mem := v_2
31847 if mem.Op != OpSelectN || auxIntToInt64(mem.AuxInt) != 1 || call != mem.Args[0] || !(isConstZero(x) && isSameCall(call.Aux, "runtime.newobject")) {
31848 break
31849 }
31850 v.copyOf(mem)
31851 return true
31852 }
31853
31854
31855
31856 for {
31857 t1 := auxToType(v.Aux)
31858 op1 := v_0
31859 if op1.Op != OpOffPtr {
31860 break
31861 }
31862 o1 := auxIntToInt64(op1.AuxInt)
31863 p1 := op1.Args[0]
31864 d1 := v_1
31865 m2 := v_2
31866 if m2.Op != OpStore {
31867 break
31868 }
31869 t2 := auxToType(m2.Aux)
31870 _ = m2.Args[2]
31871 op2 := m2.Args[0]
31872 if op2.Op != OpOffPtr || auxIntToInt64(op2.AuxInt) != 0 {
31873 break
31874 }
31875 p2 := op2.Args[0]
31876 d2 := m2.Args[1]
31877 m3 := m2.Args[2]
31878 if m3.Op != OpMove {
31879 break
31880 }
31881 n := auxIntToInt64(m3.AuxInt)
31882 mem := m3.Args[2]
31883 p3 := m3.Args[0]
31884 if !(m2.Uses == 1 && m3.Uses == 1 && o1 == t2.Size() && n == t2.Size()+t1.Size() && isSamePtr(p1, p2) && isSamePtr(p2, p3) && clobber(m2, m3)) {
31885 break
31886 }
31887 v.reset(OpStore)
31888 v.Aux = typeToAux(t1)
31889 v0 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
31890 v0.Aux = typeToAux(t2)
31891 v0.AddArg3(op2, d2, mem)
31892 v.AddArg3(op1, d1, v0)
31893 return true
31894 }
31895
31896
31897
31898 for {
31899 t1 := auxToType(v.Aux)
31900 op1 := v_0
31901 if op1.Op != OpOffPtr {
31902 break
31903 }
31904 o1 := auxIntToInt64(op1.AuxInt)
31905 p1 := op1.Args[0]
31906 d1 := v_1
31907 m2 := v_2
31908 if m2.Op != OpStore {
31909 break
31910 }
31911 t2 := auxToType(m2.Aux)
31912 _ = m2.Args[2]
31913 op2 := m2.Args[0]
31914 if op2.Op != OpOffPtr {
31915 break
31916 }
31917 o2 := auxIntToInt64(op2.AuxInt)
31918 p2 := op2.Args[0]
31919 d2 := m2.Args[1]
31920 m3 := m2.Args[2]
31921 if m3.Op != OpStore {
31922 break
31923 }
31924 t3 := auxToType(m3.Aux)
31925 _ = m3.Args[2]
31926 op3 := m3.Args[0]
31927 if op3.Op != OpOffPtr || auxIntToInt64(op3.AuxInt) != 0 {
31928 break
31929 }
31930 p3 := op3.Args[0]
31931 d3 := m3.Args[1]
31932 m4 := m3.Args[2]
31933 if m4.Op != OpMove {
31934 break
31935 }
31936 n := auxIntToInt64(m4.AuxInt)
31937 mem := m4.Args[2]
31938 p4 := m4.Args[0]
31939 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)) {
31940 break
31941 }
31942 v.reset(OpStore)
31943 v.Aux = typeToAux(t1)
31944 v0 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
31945 v0.Aux = typeToAux(t2)
31946 v1 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
31947 v1.Aux = typeToAux(t3)
31948 v1.AddArg3(op3, d3, mem)
31949 v0.AddArg3(op2, d2, v1)
31950 v.AddArg3(op1, d1, v0)
31951 return true
31952 }
31953
31954
31955
31956 for {
31957 t1 := auxToType(v.Aux)
31958 op1 := v_0
31959 if op1.Op != OpOffPtr {
31960 break
31961 }
31962 o1 := auxIntToInt64(op1.AuxInt)
31963 p1 := op1.Args[0]
31964 d1 := v_1
31965 m2 := v_2
31966 if m2.Op != OpStore {
31967 break
31968 }
31969 t2 := auxToType(m2.Aux)
31970 _ = m2.Args[2]
31971 op2 := m2.Args[0]
31972 if op2.Op != OpOffPtr {
31973 break
31974 }
31975 o2 := auxIntToInt64(op2.AuxInt)
31976 p2 := op2.Args[0]
31977 d2 := m2.Args[1]
31978 m3 := m2.Args[2]
31979 if m3.Op != OpStore {
31980 break
31981 }
31982 t3 := auxToType(m3.Aux)
31983 _ = m3.Args[2]
31984 op3 := m3.Args[0]
31985 if op3.Op != OpOffPtr {
31986 break
31987 }
31988 o3 := auxIntToInt64(op3.AuxInt)
31989 p3 := op3.Args[0]
31990 d3 := m3.Args[1]
31991 m4 := m3.Args[2]
31992 if m4.Op != OpStore {
31993 break
31994 }
31995 t4 := auxToType(m4.Aux)
31996 _ = m4.Args[2]
31997 op4 := m4.Args[0]
31998 if op4.Op != OpOffPtr || auxIntToInt64(op4.AuxInt) != 0 {
31999 break
32000 }
32001 p4 := op4.Args[0]
32002 d4 := m4.Args[1]
32003 m5 := m4.Args[2]
32004 if m5.Op != OpMove {
32005 break
32006 }
32007 n := auxIntToInt64(m5.AuxInt)
32008 mem := m5.Args[2]
32009 p5 := m5.Args[0]
32010 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)) {
32011 break
32012 }
32013 v.reset(OpStore)
32014 v.Aux = typeToAux(t1)
32015 v0 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
32016 v0.Aux = typeToAux(t2)
32017 v1 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
32018 v1.Aux = typeToAux(t3)
32019 v2 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
32020 v2.Aux = typeToAux(t4)
32021 v2.AddArg3(op4, d4, mem)
32022 v1.AddArg3(op3, d3, v2)
32023 v0.AddArg3(op2, d2, v1)
32024 v.AddArg3(op1, d1, v0)
32025 return true
32026 }
32027
32028
32029
32030 for {
32031 t1 := auxToType(v.Aux)
32032 op1 := v_0
32033 if op1.Op != OpOffPtr {
32034 break
32035 }
32036 o1 := auxIntToInt64(op1.AuxInt)
32037 p1 := op1.Args[0]
32038 d1 := v_1
32039 m2 := v_2
32040 if m2.Op != OpStore {
32041 break
32042 }
32043 t2 := auxToType(m2.Aux)
32044 _ = m2.Args[2]
32045 op2 := m2.Args[0]
32046 if op2.Op != OpOffPtr || auxIntToInt64(op2.AuxInt) != 0 {
32047 break
32048 }
32049 p2 := op2.Args[0]
32050 d2 := m2.Args[1]
32051 m3 := m2.Args[2]
32052 if m3.Op != OpZero {
32053 break
32054 }
32055 n := auxIntToInt64(m3.AuxInt)
32056 mem := m3.Args[1]
32057 p3 := m3.Args[0]
32058 if !(m2.Uses == 1 && m3.Uses == 1 && o1 == t2.Size() && n == t2.Size()+t1.Size() && isSamePtr(p1, p2) && isSamePtr(p2, p3) && clobber(m2, m3)) {
32059 break
32060 }
32061 v.reset(OpStore)
32062 v.Aux = typeToAux(t1)
32063 v0 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
32064 v0.Aux = typeToAux(t2)
32065 v0.AddArg3(op2, d2, mem)
32066 v.AddArg3(op1, d1, v0)
32067 return true
32068 }
32069
32070
32071
32072 for {
32073 t1 := auxToType(v.Aux)
32074 op1 := v_0
32075 if op1.Op != OpOffPtr {
32076 break
32077 }
32078 o1 := auxIntToInt64(op1.AuxInt)
32079 p1 := op1.Args[0]
32080 d1 := v_1
32081 m2 := v_2
32082 if m2.Op != OpStore {
32083 break
32084 }
32085 t2 := auxToType(m2.Aux)
32086 _ = m2.Args[2]
32087 op2 := m2.Args[0]
32088 if op2.Op != OpOffPtr {
32089 break
32090 }
32091 o2 := auxIntToInt64(op2.AuxInt)
32092 p2 := op2.Args[0]
32093 d2 := m2.Args[1]
32094 m3 := m2.Args[2]
32095 if m3.Op != OpStore {
32096 break
32097 }
32098 t3 := auxToType(m3.Aux)
32099 _ = m3.Args[2]
32100 op3 := m3.Args[0]
32101 if op3.Op != OpOffPtr || auxIntToInt64(op3.AuxInt) != 0 {
32102 break
32103 }
32104 p3 := op3.Args[0]
32105 d3 := m3.Args[1]
32106 m4 := m3.Args[2]
32107 if m4.Op != OpZero {
32108 break
32109 }
32110 n := auxIntToInt64(m4.AuxInt)
32111 mem := m4.Args[1]
32112 p4 := m4.Args[0]
32113 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)) {
32114 break
32115 }
32116 v.reset(OpStore)
32117 v.Aux = typeToAux(t1)
32118 v0 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
32119 v0.Aux = typeToAux(t2)
32120 v1 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
32121 v1.Aux = typeToAux(t3)
32122 v1.AddArg3(op3, d3, mem)
32123 v0.AddArg3(op2, d2, v1)
32124 v.AddArg3(op1, d1, v0)
32125 return true
32126 }
32127
32128
32129
32130 for {
32131 t1 := auxToType(v.Aux)
32132 op1 := v_0
32133 if op1.Op != OpOffPtr {
32134 break
32135 }
32136 o1 := auxIntToInt64(op1.AuxInt)
32137 p1 := op1.Args[0]
32138 d1 := v_1
32139 m2 := v_2
32140 if m2.Op != OpStore {
32141 break
32142 }
32143 t2 := auxToType(m2.Aux)
32144 _ = m2.Args[2]
32145 op2 := m2.Args[0]
32146 if op2.Op != OpOffPtr {
32147 break
32148 }
32149 o2 := auxIntToInt64(op2.AuxInt)
32150 p2 := op2.Args[0]
32151 d2 := m2.Args[1]
32152 m3 := m2.Args[2]
32153 if m3.Op != OpStore {
32154 break
32155 }
32156 t3 := auxToType(m3.Aux)
32157 _ = m3.Args[2]
32158 op3 := m3.Args[0]
32159 if op3.Op != OpOffPtr {
32160 break
32161 }
32162 o3 := auxIntToInt64(op3.AuxInt)
32163 p3 := op3.Args[0]
32164 d3 := m3.Args[1]
32165 m4 := m3.Args[2]
32166 if m4.Op != OpStore {
32167 break
32168 }
32169 t4 := auxToType(m4.Aux)
32170 _ = m4.Args[2]
32171 op4 := m4.Args[0]
32172 if op4.Op != OpOffPtr || auxIntToInt64(op4.AuxInt) != 0 {
32173 break
32174 }
32175 p4 := op4.Args[0]
32176 d4 := m4.Args[1]
32177 m5 := m4.Args[2]
32178 if m5.Op != OpZero {
32179 break
32180 }
32181 n := auxIntToInt64(m5.AuxInt)
32182 mem := m5.Args[1]
32183 p5 := m5.Args[0]
32184 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)) {
32185 break
32186 }
32187 v.reset(OpStore)
32188 v.Aux = typeToAux(t1)
32189 v0 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
32190 v0.Aux = typeToAux(t2)
32191 v1 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
32192 v1.Aux = typeToAux(t3)
32193 v2 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
32194 v2.Aux = typeToAux(t4)
32195 v2.AddArg3(op4, d4, mem)
32196 v1.AddArg3(op3, d3, v2)
32197 v0.AddArg3(op2, d2, v1)
32198 v.AddArg3(op1, d1, v0)
32199 return true
32200 }
32201 return false
32202 }
32203 func rewriteValuegeneric_OpStringLen(v *Value) bool {
32204 v_0 := v.Args[0]
32205
32206
32207 for {
32208 if v_0.Op != OpStringMake {
32209 break
32210 }
32211 _ = v_0.Args[1]
32212 v_0_1 := v_0.Args[1]
32213 if v_0_1.Op != OpConst64 {
32214 break
32215 }
32216 t := v_0_1.Type
32217 c := auxIntToInt64(v_0_1.AuxInt)
32218 v.reset(OpConst64)
32219 v.Type = t
32220 v.AuxInt = int64ToAuxInt(c)
32221 return true
32222 }
32223 return false
32224 }
32225 func rewriteValuegeneric_OpStringPtr(v *Value) bool {
32226 v_0 := v.Args[0]
32227
32228
32229 for {
32230 if v_0.Op != OpStringMake {
32231 break
32232 }
32233 v_0_0 := v_0.Args[0]
32234 if v_0_0.Op != OpAddr {
32235 break
32236 }
32237 t := v_0_0.Type
32238 s := auxToSym(v_0_0.Aux)
32239 base := v_0_0.Args[0]
32240 v.reset(OpAddr)
32241 v.Type = t
32242 v.Aux = symToAux(s)
32243 v.AddArg(base)
32244 return true
32245 }
32246 return false
32247 }
32248 func rewriteValuegeneric_OpStructSelect(v *Value) bool {
32249 v_0 := v.Args[0]
32250 b := v.Block
32251
32252
32253 for {
32254 i := auxIntToInt64(v.AuxInt)
32255 x := v_0
32256 if x.Op != OpStructMake {
32257 break
32258 }
32259 v.copyOf(x.Args[i])
32260 return true
32261 }
32262
32263
32264
32265 for {
32266 i := auxIntToInt64(v.AuxInt)
32267 x := v_0
32268 if x.Op != OpLoad {
32269 break
32270 }
32271 t := x.Type
32272 mem := x.Args[1]
32273 ptr := x.Args[0]
32274 if !(!CanSSA(t)) {
32275 break
32276 }
32277 b = x.Block
32278 v0 := b.NewValue0(v.Pos, OpLoad, v.Type)
32279 v.copyOf(v0)
32280 v1 := b.NewValue0(v.Pos, OpOffPtr, v.Type.PtrTo())
32281 v1.AuxInt = int64ToAuxInt(t.FieldOff(int(i)))
32282 v1.AddArg(ptr)
32283 v0.AddArg2(v1, mem)
32284 return true
32285 }
32286
32287
32288 for {
32289 if auxIntToInt64(v.AuxInt) != 0 || v_0.Op != OpIData {
32290 break
32291 }
32292 x := v_0.Args[0]
32293 v.reset(OpIData)
32294 v.AddArg(x)
32295 return true
32296 }
32297 return false
32298 }
32299 func rewriteValuegeneric_OpSub16(v *Value) bool {
32300 v_1 := v.Args[1]
32301 v_0 := v.Args[0]
32302 b := v.Block
32303
32304
32305 for {
32306 if v_0.Op != OpConst16 {
32307 break
32308 }
32309 c := auxIntToInt16(v_0.AuxInt)
32310 if v_1.Op != OpConst16 {
32311 break
32312 }
32313 d := auxIntToInt16(v_1.AuxInt)
32314 v.reset(OpConst16)
32315 v.AuxInt = int16ToAuxInt(c - d)
32316 return true
32317 }
32318
32319
32320
32321 for {
32322 x := v_0
32323 if v_1.Op != OpConst16 {
32324 break
32325 }
32326 t := v_1.Type
32327 c := auxIntToInt16(v_1.AuxInt)
32328 if !(x.Op != OpConst16) {
32329 break
32330 }
32331 v.reset(OpAdd16)
32332 v0 := b.NewValue0(v.Pos, OpConst16, t)
32333 v0.AuxInt = int16ToAuxInt(-c)
32334 v.AddArg2(v0, x)
32335 return true
32336 }
32337
32338
32339 for {
32340 t := v.Type
32341 if v_0.Op != OpMul16 {
32342 break
32343 }
32344 _ = v_0.Args[1]
32345 v_0_0 := v_0.Args[0]
32346 v_0_1 := v_0.Args[1]
32347 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
32348 x := v_0_0
32349 y := v_0_1
32350 if v_1.Op != OpMul16 {
32351 continue
32352 }
32353 _ = v_1.Args[1]
32354 v_1_0 := v_1.Args[0]
32355 v_1_1 := v_1.Args[1]
32356 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
32357 if x != v_1_0 {
32358 continue
32359 }
32360 z := v_1_1
32361 v.reset(OpMul16)
32362 v0 := b.NewValue0(v.Pos, OpSub16, t)
32363 v0.AddArg2(y, z)
32364 v.AddArg2(x, v0)
32365 return true
32366 }
32367 }
32368 break
32369 }
32370
32371
32372 for {
32373 x := v_0
32374 if x != v_1 {
32375 break
32376 }
32377 v.reset(OpConst16)
32378 v.AuxInt = int16ToAuxInt(0)
32379 return true
32380 }
32381
32382
32383 for {
32384 if v_0.Op != OpNeg16 {
32385 break
32386 }
32387 x := v_0.Args[0]
32388 if v_1.Op != OpCom16 || x != v_1.Args[0] {
32389 break
32390 }
32391 v.reset(OpConst16)
32392 v.AuxInt = int16ToAuxInt(1)
32393 return true
32394 }
32395
32396
32397 for {
32398 if v_0.Op != OpCom16 {
32399 break
32400 }
32401 x := v_0.Args[0]
32402 if v_1.Op != OpNeg16 || x != v_1.Args[0] {
32403 break
32404 }
32405 v.reset(OpConst16)
32406 v.AuxInt = int16ToAuxInt(-1)
32407 return true
32408 }
32409
32410
32411 for {
32412 if v_0.Op != OpAdd16 {
32413 break
32414 }
32415 _ = v_0.Args[1]
32416 v_0_0 := v_0.Args[0]
32417 v_0_1 := v_0.Args[1]
32418 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
32419 t := v_0_0
32420 x := v_0_1
32421 if v_1.Op != OpAdd16 {
32422 continue
32423 }
32424 _ = v_1.Args[1]
32425 v_1_0 := v_1.Args[0]
32426 v_1_1 := v_1.Args[1]
32427 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
32428 if t != v_1_0 {
32429 continue
32430 }
32431 y := v_1_1
32432 v.reset(OpSub16)
32433 v.AddArg2(x, y)
32434 return true
32435 }
32436 }
32437 break
32438 }
32439
32440
32441 for {
32442 if v_0.Op != OpAdd16 {
32443 break
32444 }
32445 _ = v_0.Args[1]
32446 v_0_0 := v_0.Args[0]
32447 v_0_1 := v_0.Args[1]
32448 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
32449 x := v_0_0
32450 y := v_0_1
32451 if x != v_1 {
32452 continue
32453 }
32454 v.copyOf(y)
32455 return true
32456 }
32457 break
32458 }
32459
32460
32461 for {
32462 if v_0.Op != OpAdd16 {
32463 break
32464 }
32465 _ = v_0.Args[1]
32466 v_0_0 := v_0.Args[0]
32467 v_0_1 := v_0.Args[1]
32468 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
32469 x := v_0_0
32470 y := v_0_1
32471 if y != v_1 {
32472 continue
32473 }
32474 v.copyOf(x)
32475 return true
32476 }
32477 break
32478 }
32479
32480
32481 for {
32482 if v_0.Op != OpSub16 {
32483 break
32484 }
32485 y := v_0.Args[1]
32486 x := v_0.Args[0]
32487 if x != v_1 {
32488 break
32489 }
32490 v.reset(OpNeg16)
32491 v.AddArg(y)
32492 return true
32493 }
32494
32495
32496 for {
32497 x := v_0
32498 if v_1.Op != OpAdd16 {
32499 break
32500 }
32501 _ = v_1.Args[1]
32502 v_1_0 := v_1.Args[0]
32503 v_1_1 := v_1.Args[1]
32504 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
32505 if x != v_1_0 {
32506 continue
32507 }
32508 y := v_1_1
32509 v.reset(OpNeg16)
32510 v.AddArg(y)
32511 return true
32512 }
32513 break
32514 }
32515
32516
32517
32518 for {
32519 x := v_0
32520 if v_1.Op != OpSub16 {
32521 break
32522 }
32523 z := v_1.Args[1]
32524 i := v_1.Args[0]
32525 if i.Op != OpConst16 {
32526 break
32527 }
32528 t := i.Type
32529 if !(z.Op != OpConst16 && x.Op != OpConst16) {
32530 break
32531 }
32532 v.reset(OpSub16)
32533 v0 := b.NewValue0(v.Pos, OpAdd16, t)
32534 v0.AddArg2(x, z)
32535 v.AddArg2(v0, i)
32536 return true
32537 }
32538
32539
32540
32541 for {
32542 x := v_0
32543 if v_1.Op != OpAdd16 {
32544 break
32545 }
32546 _ = v_1.Args[1]
32547 v_1_0 := v_1.Args[0]
32548 v_1_1 := v_1.Args[1]
32549 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
32550 z := v_1_0
32551 i := v_1_1
32552 if i.Op != OpConst16 {
32553 continue
32554 }
32555 t := i.Type
32556 if !(z.Op != OpConst16 && x.Op != OpConst16) {
32557 continue
32558 }
32559 v.reset(OpSub16)
32560 v0 := b.NewValue0(v.Pos, OpSub16, t)
32561 v0.AddArg2(x, z)
32562 v.AddArg2(v0, i)
32563 return true
32564 }
32565 break
32566 }
32567
32568
32569
32570 for {
32571 if v_0.Op != OpSub16 {
32572 break
32573 }
32574 z := v_0.Args[1]
32575 i := v_0.Args[0]
32576 if i.Op != OpConst16 {
32577 break
32578 }
32579 t := i.Type
32580 x := v_1
32581 if !(z.Op != OpConst16 && x.Op != OpConst16) {
32582 break
32583 }
32584 v.reset(OpSub16)
32585 v0 := b.NewValue0(v.Pos, OpAdd16, t)
32586 v0.AddArg2(z, x)
32587 v.AddArg2(i, v0)
32588 return true
32589 }
32590
32591
32592
32593 for {
32594 if v_0.Op != OpAdd16 {
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 z := v_0_0
32602 i := v_0_1
32603 if i.Op != OpConst16 {
32604 continue
32605 }
32606 t := i.Type
32607 x := v_1
32608 if !(z.Op != OpConst16 && x.Op != OpConst16) {
32609 continue
32610 }
32611 v.reset(OpAdd16)
32612 v0 := b.NewValue0(v.Pos, OpSub16, t)
32613 v0.AddArg2(z, x)
32614 v.AddArg2(i, v0)
32615 return true
32616 }
32617 break
32618 }
32619
32620
32621 for {
32622 if v_0.Op != OpConst16 {
32623 break
32624 }
32625 t := v_0.Type
32626 c := auxIntToInt16(v_0.AuxInt)
32627 if v_1.Op != OpSub16 {
32628 break
32629 }
32630 x := v_1.Args[1]
32631 v_1_0 := v_1.Args[0]
32632 if v_1_0.Op != OpConst16 || v_1_0.Type != t {
32633 break
32634 }
32635 d := auxIntToInt16(v_1_0.AuxInt)
32636 v.reset(OpAdd16)
32637 v0 := b.NewValue0(v.Pos, OpConst16, t)
32638 v0.AuxInt = int16ToAuxInt(c - d)
32639 v.AddArg2(v0, x)
32640 return true
32641 }
32642
32643
32644 for {
32645 if v_0.Op != OpConst16 {
32646 break
32647 }
32648 t := v_0.Type
32649 c := auxIntToInt16(v_0.AuxInt)
32650 if v_1.Op != OpAdd16 {
32651 break
32652 }
32653 _ = v_1.Args[1]
32654 v_1_0 := v_1.Args[0]
32655 v_1_1 := v_1.Args[1]
32656 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
32657 if v_1_0.Op != OpConst16 || v_1_0.Type != t {
32658 continue
32659 }
32660 d := auxIntToInt16(v_1_0.AuxInt)
32661 x := v_1_1
32662 v.reset(OpSub16)
32663 v0 := b.NewValue0(v.Pos, OpConst16, t)
32664 v0.AuxInt = int16ToAuxInt(c - d)
32665 v.AddArg2(v0, x)
32666 return true
32667 }
32668 break
32669 }
32670 return false
32671 }
32672 func rewriteValuegeneric_OpSub32(v *Value) bool {
32673 v_1 := v.Args[1]
32674 v_0 := v.Args[0]
32675 b := v.Block
32676
32677
32678 for {
32679 if v_0.Op != OpConst32 {
32680 break
32681 }
32682 c := auxIntToInt32(v_0.AuxInt)
32683 if v_1.Op != OpConst32 {
32684 break
32685 }
32686 d := auxIntToInt32(v_1.AuxInt)
32687 v.reset(OpConst32)
32688 v.AuxInt = int32ToAuxInt(c - d)
32689 return true
32690 }
32691
32692
32693
32694 for {
32695 x := v_0
32696 if v_1.Op != OpConst32 {
32697 break
32698 }
32699 t := v_1.Type
32700 c := auxIntToInt32(v_1.AuxInt)
32701 if !(x.Op != OpConst32) {
32702 break
32703 }
32704 v.reset(OpAdd32)
32705 v0 := b.NewValue0(v.Pos, OpConst32, t)
32706 v0.AuxInt = int32ToAuxInt(-c)
32707 v.AddArg2(v0, x)
32708 return true
32709 }
32710
32711
32712 for {
32713 t := v.Type
32714 if v_0.Op != OpMul32 {
32715 break
32716 }
32717 _ = v_0.Args[1]
32718 v_0_0 := v_0.Args[0]
32719 v_0_1 := v_0.Args[1]
32720 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
32721 x := v_0_0
32722 y := v_0_1
32723 if v_1.Op != OpMul32 {
32724 continue
32725 }
32726 _ = v_1.Args[1]
32727 v_1_0 := v_1.Args[0]
32728 v_1_1 := v_1.Args[1]
32729 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
32730 if x != v_1_0 {
32731 continue
32732 }
32733 z := v_1_1
32734 v.reset(OpMul32)
32735 v0 := b.NewValue0(v.Pos, OpSub32, t)
32736 v0.AddArg2(y, z)
32737 v.AddArg2(x, v0)
32738 return true
32739 }
32740 }
32741 break
32742 }
32743
32744
32745 for {
32746 x := v_0
32747 if x != v_1 {
32748 break
32749 }
32750 v.reset(OpConst32)
32751 v.AuxInt = int32ToAuxInt(0)
32752 return true
32753 }
32754
32755
32756 for {
32757 if v_0.Op != OpNeg32 {
32758 break
32759 }
32760 x := v_0.Args[0]
32761 if v_1.Op != OpCom32 || x != v_1.Args[0] {
32762 break
32763 }
32764 v.reset(OpConst32)
32765 v.AuxInt = int32ToAuxInt(1)
32766 return true
32767 }
32768
32769
32770 for {
32771 if v_0.Op != OpCom32 {
32772 break
32773 }
32774 x := v_0.Args[0]
32775 if v_1.Op != OpNeg32 || x != v_1.Args[0] {
32776 break
32777 }
32778 v.reset(OpConst32)
32779 v.AuxInt = int32ToAuxInt(-1)
32780 return true
32781 }
32782
32783
32784 for {
32785 if v_0.Op != OpAdd32 {
32786 break
32787 }
32788 _ = v_0.Args[1]
32789 v_0_0 := v_0.Args[0]
32790 v_0_1 := v_0.Args[1]
32791 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
32792 t := v_0_0
32793 x := v_0_1
32794 if v_1.Op != OpAdd32 {
32795 continue
32796 }
32797 _ = v_1.Args[1]
32798 v_1_0 := v_1.Args[0]
32799 v_1_1 := v_1.Args[1]
32800 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
32801 if t != v_1_0 {
32802 continue
32803 }
32804 y := v_1_1
32805 v.reset(OpSub32)
32806 v.AddArg2(x, y)
32807 return true
32808 }
32809 }
32810 break
32811 }
32812
32813
32814 for {
32815 if v_0.Op != OpAdd32 {
32816 break
32817 }
32818 _ = v_0.Args[1]
32819 v_0_0 := v_0.Args[0]
32820 v_0_1 := v_0.Args[1]
32821 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
32822 x := v_0_0
32823 y := v_0_1
32824 if x != v_1 {
32825 continue
32826 }
32827 v.copyOf(y)
32828 return true
32829 }
32830 break
32831 }
32832
32833
32834 for {
32835 if v_0.Op != OpAdd32 {
32836 break
32837 }
32838 _ = v_0.Args[1]
32839 v_0_0 := v_0.Args[0]
32840 v_0_1 := v_0.Args[1]
32841 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
32842 x := v_0_0
32843 y := v_0_1
32844 if y != v_1 {
32845 continue
32846 }
32847 v.copyOf(x)
32848 return true
32849 }
32850 break
32851 }
32852
32853
32854 for {
32855 if v_0.Op != OpSub32 {
32856 break
32857 }
32858 y := v_0.Args[1]
32859 x := v_0.Args[0]
32860 if x != v_1 {
32861 break
32862 }
32863 v.reset(OpNeg32)
32864 v.AddArg(y)
32865 return true
32866 }
32867
32868
32869 for {
32870 x := v_0
32871 if v_1.Op != OpAdd32 {
32872 break
32873 }
32874 _ = v_1.Args[1]
32875 v_1_0 := v_1.Args[0]
32876 v_1_1 := v_1.Args[1]
32877 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
32878 if x != v_1_0 {
32879 continue
32880 }
32881 y := v_1_1
32882 v.reset(OpNeg32)
32883 v.AddArg(y)
32884 return true
32885 }
32886 break
32887 }
32888
32889
32890
32891 for {
32892 x := v_0
32893 if v_1.Op != OpSub32 {
32894 break
32895 }
32896 z := v_1.Args[1]
32897 i := v_1.Args[0]
32898 if i.Op != OpConst32 {
32899 break
32900 }
32901 t := i.Type
32902 if !(z.Op != OpConst32 && x.Op != OpConst32) {
32903 break
32904 }
32905 v.reset(OpSub32)
32906 v0 := b.NewValue0(v.Pos, OpAdd32, t)
32907 v0.AddArg2(x, z)
32908 v.AddArg2(v0, i)
32909 return true
32910 }
32911
32912
32913
32914 for {
32915 x := v_0
32916 if v_1.Op != OpAdd32 {
32917 break
32918 }
32919 _ = v_1.Args[1]
32920 v_1_0 := v_1.Args[0]
32921 v_1_1 := v_1.Args[1]
32922 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
32923 z := v_1_0
32924 i := v_1_1
32925 if i.Op != OpConst32 {
32926 continue
32927 }
32928 t := i.Type
32929 if !(z.Op != OpConst32 && x.Op != OpConst32) {
32930 continue
32931 }
32932 v.reset(OpSub32)
32933 v0 := b.NewValue0(v.Pos, OpSub32, t)
32934 v0.AddArg2(x, z)
32935 v.AddArg2(v0, i)
32936 return true
32937 }
32938 break
32939 }
32940
32941
32942
32943 for {
32944 if v_0.Op != OpSub32 {
32945 break
32946 }
32947 z := v_0.Args[1]
32948 i := v_0.Args[0]
32949 if i.Op != OpConst32 {
32950 break
32951 }
32952 t := i.Type
32953 x := v_1
32954 if !(z.Op != OpConst32 && x.Op != OpConst32) {
32955 break
32956 }
32957 v.reset(OpSub32)
32958 v0 := b.NewValue0(v.Pos, OpAdd32, t)
32959 v0.AddArg2(z, x)
32960 v.AddArg2(i, v0)
32961 return true
32962 }
32963
32964
32965
32966 for {
32967 if v_0.Op != OpAdd32 {
32968 break
32969 }
32970 _ = v_0.Args[1]
32971 v_0_0 := v_0.Args[0]
32972 v_0_1 := v_0.Args[1]
32973 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
32974 z := v_0_0
32975 i := v_0_1
32976 if i.Op != OpConst32 {
32977 continue
32978 }
32979 t := i.Type
32980 x := v_1
32981 if !(z.Op != OpConst32 && x.Op != OpConst32) {
32982 continue
32983 }
32984 v.reset(OpAdd32)
32985 v0 := b.NewValue0(v.Pos, OpSub32, t)
32986 v0.AddArg2(z, x)
32987 v.AddArg2(i, v0)
32988 return true
32989 }
32990 break
32991 }
32992
32993
32994 for {
32995 if v_0.Op != OpConst32 {
32996 break
32997 }
32998 t := v_0.Type
32999 c := auxIntToInt32(v_0.AuxInt)
33000 if v_1.Op != OpSub32 {
33001 break
33002 }
33003 x := v_1.Args[1]
33004 v_1_0 := v_1.Args[0]
33005 if v_1_0.Op != OpConst32 || v_1_0.Type != t {
33006 break
33007 }
33008 d := auxIntToInt32(v_1_0.AuxInt)
33009 v.reset(OpAdd32)
33010 v0 := b.NewValue0(v.Pos, OpConst32, t)
33011 v0.AuxInt = int32ToAuxInt(c - d)
33012 v.AddArg2(v0, x)
33013 return true
33014 }
33015
33016
33017 for {
33018 if v_0.Op != OpConst32 {
33019 break
33020 }
33021 t := v_0.Type
33022 c := auxIntToInt32(v_0.AuxInt)
33023 if v_1.Op != OpAdd32 {
33024 break
33025 }
33026 _ = v_1.Args[1]
33027 v_1_0 := v_1.Args[0]
33028 v_1_1 := v_1.Args[1]
33029 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
33030 if v_1_0.Op != OpConst32 || v_1_0.Type != t {
33031 continue
33032 }
33033 d := auxIntToInt32(v_1_0.AuxInt)
33034 x := v_1_1
33035 v.reset(OpSub32)
33036 v0 := b.NewValue0(v.Pos, OpConst32, t)
33037 v0.AuxInt = int32ToAuxInt(c - d)
33038 v.AddArg2(v0, x)
33039 return true
33040 }
33041 break
33042 }
33043 return false
33044 }
33045 func rewriteValuegeneric_OpSub32F(v *Value) bool {
33046 v_1 := v.Args[1]
33047 v_0 := v.Args[0]
33048
33049
33050
33051 for {
33052 if v_0.Op != OpConst32F {
33053 break
33054 }
33055 c := auxIntToFloat32(v_0.AuxInt)
33056 if v_1.Op != OpConst32F {
33057 break
33058 }
33059 d := auxIntToFloat32(v_1.AuxInt)
33060 if !(c-d == c-d) {
33061 break
33062 }
33063 v.reset(OpConst32F)
33064 v.AuxInt = float32ToAuxInt(c - d)
33065 return true
33066 }
33067 return false
33068 }
33069 func rewriteValuegeneric_OpSub64(v *Value) bool {
33070 v_1 := v.Args[1]
33071 v_0 := v.Args[0]
33072 b := v.Block
33073
33074
33075 for {
33076 if v_0.Op != OpConst64 {
33077 break
33078 }
33079 c := auxIntToInt64(v_0.AuxInt)
33080 if v_1.Op != OpConst64 {
33081 break
33082 }
33083 d := auxIntToInt64(v_1.AuxInt)
33084 v.reset(OpConst64)
33085 v.AuxInt = int64ToAuxInt(c - d)
33086 return true
33087 }
33088
33089
33090
33091 for {
33092 x := v_0
33093 if v_1.Op != OpConst64 {
33094 break
33095 }
33096 t := v_1.Type
33097 c := auxIntToInt64(v_1.AuxInt)
33098 if !(x.Op != OpConst64) {
33099 break
33100 }
33101 v.reset(OpAdd64)
33102 v0 := b.NewValue0(v.Pos, OpConst64, t)
33103 v0.AuxInt = int64ToAuxInt(-c)
33104 v.AddArg2(v0, x)
33105 return true
33106 }
33107
33108
33109 for {
33110 t := v.Type
33111 if v_0.Op != OpMul64 {
33112 break
33113 }
33114 _ = v_0.Args[1]
33115 v_0_0 := v_0.Args[0]
33116 v_0_1 := v_0.Args[1]
33117 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
33118 x := v_0_0
33119 y := v_0_1
33120 if v_1.Op != OpMul64 {
33121 continue
33122 }
33123 _ = v_1.Args[1]
33124 v_1_0 := v_1.Args[0]
33125 v_1_1 := v_1.Args[1]
33126 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
33127 if x != v_1_0 {
33128 continue
33129 }
33130 z := v_1_1
33131 v.reset(OpMul64)
33132 v0 := b.NewValue0(v.Pos, OpSub64, t)
33133 v0.AddArg2(y, z)
33134 v.AddArg2(x, v0)
33135 return true
33136 }
33137 }
33138 break
33139 }
33140
33141
33142 for {
33143 x := v_0
33144 if x != v_1 {
33145 break
33146 }
33147 v.reset(OpConst64)
33148 v.AuxInt = int64ToAuxInt(0)
33149 return true
33150 }
33151
33152
33153 for {
33154 if v_0.Op != OpNeg64 {
33155 break
33156 }
33157 x := v_0.Args[0]
33158 if v_1.Op != OpCom64 || x != v_1.Args[0] {
33159 break
33160 }
33161 v.reset(OpConst64)
33162 v.AuxInt = int64ToAuxInt(1)
33163 return true
33164 }
33165
33166
33167 for {
33168 if v_0.Op != OpCom64 {
33169 break
33170 }
33171 x := v_0.Args[0]
33172 if v_1.Op != OpNeg64 || x != v_1.Args[0] {
33173 break
33174 }
33175 v.reset(OpConst64)
33176 v.AuxInt = int64ToAuxInt(-1)
33177 return true
33178 }
33179
33180
33181 for {
33182 if v_0.Op != OpAdd64 {
33183 break
33184 }
33185 _ = v_0.Args[1]
33186 v_0_0 := v_0.Args[0]
33187 v_0_1 := v_0.Args[1]
33188 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
33189 t := v_0_0
33190 x := v_0_1
33191 if v_1.Op != OpAdd64 {
33192 continue
33193 }
33194 _ = v_1.Args[1]
33195 v_1_0 := v_1.Args[0]
33196 v_1_1 := v_1.Args[1]
33197 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
33198 if t != v_1_0 {
33199 continue
33200 }
33201 y := v_1_1
33202 v.reset(OpSub64)
33203 v.AddArg2(x, y)
33204 return true
33205 }
33206 }
33207 break
33208 }
33209
33210
33211 for {
33212 if v_0.Op != OpAdd64 {
33213 break
33214 }
33215 _ = v_0.Args[1]
33216 v_0_0 := v_0.Args[0]
33217 v_0_1 := v_0.Args[1]
33218 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
33219 x := v_0_0
33220 y := v_0_1
33221 if x != v_1 {
33222 continue
33223 }
33224 v.copyOf(y)
33225 return true
33226 }
33227 break
33228 }
33229
33230
33231 for {
33232 if v_0.Op != OpAdd64 {
33233 break
33234 }
33235 _ = v_0.Args[1]
33236 v_0_0 := v_0.Args[0]
33237 v_0_1 := v_0.Args[1]
33238 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
33239 x := v_0_0
33240 y := v_0_1
33241 if y != v_1 {
33242 continue
33243 }
33244 v.copyOf(x)
33245 return true
33246 }
33247 break
33248 }
33249
33250
33251 for {
33252 if v_0.Op != OpSub64 {
33253 break
33254 }
33255 y := v_0.Args[1]
33256 x := v_0.Args[0]
33257 if x != v_1 {
33258 break
33259 }
33260 v.reset(OpNeg64)
33261 v.AddArg(y)
33262 return true
33263 }
33264
33265
33266 for {
33267 x := v_0
33268 if v_1.Op != OpAdd64 {
33269 break
33270 }
33271 _ = v_1.Args[1]
33272 v_1_0 := v_1.Args[0]
33273 v_1_1 := v_1.Args[1]
33274 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
33275 if x != v_1_0 {
33276 continue
33277 }
33278 y := v_1_1
33279 v.reset(OpNeg64)
33280 v.AddArg(y)
33281 return true
33282 }
33283 break
33284 }
33285
33286
33287
33288 for {
33289 x := v_0
33290 if v_1.Op != OpSub64 {
33291 break
33292 }
33293 z := v_1.Args[1]
33294 i := v_1.Args[0]
33295 if i.Op != OpConst64 {
33296 break
33297 }
33298 t := i.Type
33299 if !(z.Op != OpConst64 && x.Op != OpConst64) {
33300 break
33301 }
33302 v.reset(OpSub64)
33303 v0 := b.NewValue0(v.Pos, OpAdd64, t)
33304 v0.AddArg2(x, z)
33305 v.AddArg2(v0, i)
33306 return true
33307 }
33308
33309
33310
33311 for {
33312 x := v_0
33313 if v_1.Op != OpAdd64 {
33314 break
33315 }
33316 _ = v_1.Args[1]
33317 v_1_0 := v_1.Args[0]
33318 v_1_1 := v_1.Args[1]
33319 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
33320 z := v_1_0
33321 i := v_1_1
33322 if i.Op != OpConst64 {
33323 continue
33324 }
33325 t := i.Type
33326 if !(z.Op != OpConst64 && x.Op != OpConst64) {
33327 continue
33328 }
33329 v.reset(OpSub64)
33330 v0 := b.NewValue0(v.Pos, OpSub64, t)
33331 v0.AddArg2(x, z)
33332 v.AddArg2(v0, i)
33333 return true
33334 }
33335 break
33336 }
33337
33338
33339
33340 for {
33341 if v_0.Op != OpSub64 {
33342 break
33343 }
33344 z := v_0.Args[1]
33345 i := v_0.Args[0]
33346 if i.Op != OpConst64 {
33347 break
33348 }
33349 t := i.Type
33350 x := v_1
33351 if !(z.Op != OpConst64 && x.Op != OpConst64) {
33352 break
33353 }
33354 v.reset(OpSub64)
33355 v0 := b.NewValue0(v.Pos, OpAdd64, t)
33356 v0.AddArg2(z, x)
33357 v.AddArg2(i, v0)
33358 return true
33359 }
33360
33361
33362
33363 for {
33364 if v_0.Op != OpAdd64 {
33365 break
33366 }
33367 _ = v_0.Args[1]
33368 v_0_0 := v_0.Args[0]
33369 v_0_1 := v_0.Args[1]
33370 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
33371 z := v_0_0
33372 i := v_0_1
33373 if i.Op != OpConst64 {
33374 continue
33375 }
33376 t := i.Type
33377 x := v_1
33378 if !(z.Op != OpConst64 && x.Op != OpConst64) {
33379 continue
33380 }
33381 v.reset(OpAdd64)
33382 v0 := b.NewValue0(v.Pos, OpSub64, t)
33383 v0.AddArg2(z, x)
33384 v.AddArg2(i, v0)
33385 return true
33386 }
33387 break
33388 }
33389
33390
33391 for {
33392 if v_0.Op != OpConst64 {
33393 break
33394 }
33395 t := v_0.Type
33396 c := auxIntToInt64(v_0.AuxInt)
33397 if v_1.Op != OpSub64 {
33398 break
33399 }
33400 x := v_1.Args[1]
33401 v_1_0 := v_1.Args[0]
33402 if v_1_0.Op != OpConst64 || v_1_0.Type != t {
33403 break
33404 }
33405 d := auxIntToInt64(v_1_0.AuxInt)
33406 v.reset(OpAdd64)
33407 v0 := b.NewValue0(v.Pos, OpConst64, t)
33408 v0.AuxInt = int64ToAuxInt(c - d)
33409 v.AddArg2(v0, x)
33410 return true
33411 }
33412
33413
33414 for {
33415 if v_0.Op != OpConst64 {
33416 break
33417 }
33418 t := v_0.Type
33419 c := auxIntToInt64(v_0.AuxInt)
33420 if v_1.Op != OpAdd64 {
33421 break
33422 }
33423 _ = v_1.Args[1]
33424 v_1_0 := v_1.Args[0]
33425 v_1_1 := v_1.Args[1]
33426 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
33427 if v_1_0.Op != OpConst64 || v_1_0.Type != t {
33428 continue
33429 }
33430 d := auxIntToInt64(v_1_0.AuxInt)
33431 x := v_1_1
33432 v.reset(OpSub64)
33433 v0 := b.NewValue0(v.Pos, OpConst64, t)
33434 v0.AuxInt = int64ToAuxInt(c - d)
33435 v.AddArg2(v0, x)
33436 return true
33437 }
33438 break
33439 }
33440 return false
33441 }
33442 func rewriteValuegeneric_OpSub64F(v *Value) bool {
33443 v_1 := v.Args[1]
33444 v_0 := v.Args[0]
33445
33446
33447
33448 for {
33449 if v_0.Op != OpConst64F {
33450 break
33451 }
33452 c := auxIntToFloat64(v_0.AuxInt)
33453 if v_1.Op != OpConst64F {
33454 break
33455 }
33456 d := auxIntToFloat64(v_1.AuxInt)
33457 if !(c-d == c-d) {
33458 break
33459 }
33460 v.reset(OpConst64F)
33461 v.AuxInt = float64ToAuxInt(c - d)
33462 return true
33463 }
33464 return false
33465 }
33466 func rewriteValuegeneric_OpSub8(v *Value) bool {
33467 v_1 := v.Args[1]
33468 v_0 := v.Args[0]
33469 b := v.Block
33470
33471
33472 for {
33473 if v_0.Op != OpConst8 {
33474 break
33475 }
33476 c := auxIntToInt8(v_0.AuxInt)
33477 if v_1.Op != OpConst8 {
33478 break
33479 }
33480 d := auxIntToInt8(v_1.AuxInt)
33481 v.reset(OpConst8)
33482 v.AuxInt = int8ToAuxInt(c - d)
33483 return true
33484 }
33485
33486
33487
33488 for {
33489 x := v_0
33490 if v_1.Op != OpConst8 {
33491 break
33492 }
33493 t := v_1.Type
33494 c := auxIntToInt8(v_1.AuxInt)
33495 if !(x.Op != OpConst8) {
33496 break
33497 }
33498 v.reset(OpAdd8)
33499 v0 := b.NewValue0(v.Pos, OpConst8, t)
33500 v0.AuxInt = int8ToAuxInt(-c)
33501 v.AddArg2(v0, x)
33502 return true
33503 }
33504
33505
33506 for {
33507 t := v.Type
33508 if v_0.Op != OpMul8 {
33509 break
33510 }
33511 _ = v_0.Args[1]
33512 v_0_0 := v_0.Args[0]
33513 v_0_1 := v_0.Args[1]
33514 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
33515 x := v_0_0
33516 y := v_0_1
33517 if v_1.Op != OpMul8 {
33518 continue
33519 }
33520 _ = v_1.Args[1]
33521 v_1_0 := v_1.Args[0]
33522 v_1_1 := v_1.Args[1]
33523 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
33524 if x != v_1_0 {
33525 continue
33526 }
33527 z := v_1_1
33528 v.reset(OpMul8)
33529 v0 := b.NewValue0(v.Pos, OpSub8, t)
33530 v0.AddArg2(y, z)
33531 v.AddArg2(x, v0)
33532 return true
33533 }
33534 }
33535 break
33536 }
33537
33538
33539 for {
33540 x := v_0
33541 if x != v_1 {
33542 break
33543 }
33544 v.reset(OpConst8)
33545 v.AuxInt = int8ToAuxInt(0)
33546 return true
33547 }
33548
33549
33550 for {
33551 if v_0.Op != OpNeg8 {
33552 break
33553 }
33554 x := v_0.Args[0]
33555 if v_1.Op != OpCom8 || x != v_1.Args[0] {
33556 break
33557 }
33558 v.reset(OpConst8)
33559 v.AuxInt = int8ToAuxInt(1)
33560 return true
33561 }
33562
33563
33564 for {
33565 if v_0.Op != OpCom8 {
33566 break
33567 }
33568 x := v_0.Args[0]
33569 if v_1.Op != OpNeg8 || x != v_1.Args[0] {
33570 break
33571 }
33572 v.reset(OpConst8)
33573 v.AuxInt = int8ToAuxInt(-1)
33574 return true
33575 }
33576
33577
33578 for {
33579 if v_0.Op != OpAdd8 {
33580 break
33581 }
33582 _ = v_0.Args[1]
33583 v_0_0 := v_0.Args[0]
33584 v_0_1 := v_0.Args[1]
33585 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
33586 t := v_0_0
33587 x := v_0_1
33588 if v_1.Op != OpAdd8 {
33589 continue
33590 }
33591 _ = v_1.Args[1]
33592 v_1_0 := v_1.Args[0]
33593 v_1_1 := v_1.Args[1]
33594 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
33595 if t != v_1_0 {
33596 continue
33597 }
33598 y := v_1_1
33599 v.reset(OpSub8)
33600 v.AddArg2(x, y)
33601 return true
33602 }
33603 }
33604 break
33605 }
33606
33607
33608 for {
33609 if v_0.Op != OpAdd8 {
33610 break
33611 }
33612 _ = v_0.Args[1]
33613 v_0_0 := v_0.Args[0]
33614 v_0_1 := v_0.Args[1]
33615 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
33616 x := v_0_0
33617 y := v_0_1
33618 if x != v_1 {
33619 continue
33620 }
33621 v.copyOf(y)
33622 return true
33623 }
33624 break
33625 }
33626
33627
33628 for {
33629 if v_0.Op != OpAdd8 {
33630 break
33631 }
33632 _ = v_0.Args[1]
33633 v_0_0 := v_0.Args[0]
33634 v_0_1 := v_0.Args[1]
33635 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
33636 x := v_0_0
33637 y := v_0_1
33638 if y != v_1 {
33639 continue
33640 }
33641 v.copyOf(x)
33642 return true
33643 }
33644 break
33645 }
33646
33647
33648 for {
33649 if v_0.Op != OpSub8 {
33650 break
33651 }
33652 y := v_0.Args[1]
33653 x := v_0.Args[0]
33654 if x != v_1 {
33655 break
33656 }
33657 v.reset(OpNeg8)
33658 v.AddArg(y)
33659 return true
33660 }
33661
33662
33663 for {
33664 x := v_0
33665 if v_1.Op != OpAdd8 {
33666 break
33667 }
33668 _ = v_1.Args[1]
33669 v_1_0 := v_1.Args[0]
33670 v_1_1 := v_1.Args[1]
33671 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
33672 if x != v_1_0 {
33673 continue
33674 }
33675 y := v_1_1
33676 v.reset(OpNeg8)
33677 v.AddArg(y)
33678 return true
33679 }
33680 break
33681 }
33682
33683
33684
33685 for {
33686 x := v_0
33687 if v_1.Op != OpSub8 {
33688 break
33689 }
33690 z := v_1.Args[1]
33691 i := v_1.Args[0]
33692 if i.Op != OpConst8 {
33693 break
33694 }
33695 t := i.Type
33696 if !(z.Op != OpConst8 && x.Op != OpConst8) {
33697 break
33698 }
33699 v.reset(OpSub8)
33700 v0 := b.NewValue0(v.Pos, OpAdd8, t)
33701 v0.AddArg2(x, z)
33702 v.AddArg2(v0, i)
33703 return true
33704 }
33705
33706
33707
33708 for {
33709 x := v_0
33710 if v_1.Op != OpAdd8 {
33711 break
33712 }
33713 _ = v_1.Args[1]
33714 v_1_0 := v_1.Args[0]
33715 v_1_1 := v_1.Args[1]
33716 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
33717 z := v_1_0
33718 i := v_1_1
33719 if i.Op != OpConst8 {
33720 continue
33721 }
33722 t := i.Type
33723 if !(z.Op != OpConst8 && x.Op != OpConst8) {
33724 continue
33725 }
33726 v.reset(OpSub8)
33727 v0 := b.NewValue0(v.Pos, OpSub8, t)
33728 v0.AddArg2(x, z)
33729 v.AddArg2(v0, i)
33730 return true
33731 }
33732 break
33733 }
33734
33735
33736
33737 for {
33738 if v_0.Op != OpSub8 {
33739 break
33740 }
33741 z := v_0.Args[1]
33742 i := v_0.Args[0]
33743 if i.Op != OpConst8 {
33744 break
33745 }
33746 t := i.Type
33747 x := v_1
33748 if !(z.Op != OpConst8 && x.Op != OpConst8) {
33749 break
33750 }
33751 v.reset(OpSub8)
33752 v0 := b.NewValue0(v.Pos, OpAdd8, t)
33753 v0.AddArg2(z, x)
33754 v.AddArg2(i, v0)
33755 return true
33756 }
33757
33758
33759
33760 for {
33761 if v_0.Op != OpAdd8 {
33762 break
33763 }
33764 _ = v_0.Args[1]
33765 v_0_0 := v_0.Args[0]
33766 v_0_1 := v_0.Args[1]
33767 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
33768 z := v_0_0
33769 i := v_0_1
33770 if i.Op != OpConst8 {
33771 continue
33772 }
33773 t := i.Type
33774 x := v_1
33775 if !(z.Op != OpConst8 && x.Op != OpConst8) {
33776 continue
33777 }
33778 v.reset(OpAdd8)
33779 v0 := b.NewValue0(v.Pos, OpSub8, t)
33780 v0.AddArg2(z, x)
33781 v.AddArg2(i, v0)
33782 return true
33783 }
33784 break
33785 }
33786
33787
33788 for {
33789 if v_0.Op != OpConst8 {
33790 break
33791 }
33792 t := v_0.Type
33793 c := auxIntToInt8(v_0.AuxInt)
33794 if v_1.Op != OpSub8 {
33795 break
33796 }
33797 x := v_1.Args[1]
33798 v_1_0 := v_1.Args[0]
33799 if v_1_0.Op != OpConst8 || v_1_0.Type != t {
33800 break
33801 }
33802 d := auxIntToInt8(v_1_0.AuxInt)
33803 v.reset(OpAdd8)
33804 v0 := b.NewValue0(v.Pos, OpConst8, t)
33805 v0.AuxInt = int8ToAuxInt(c - d)
33806 v.AddArg2(v0, x)
33807 return true
33808 }
33809
33810
33811 for {
33812 if v_0.Op != OpConst8 {
33813 break
33814 }
33815 t := v_0.Type
33816 c := auxIntToInt8(v_0.AuxInt)
33817 if v_1.Op != OpAdd8 {
33818 break
33819 }
33820 _ = v_1.Args[1]
33821 v_1_0 := v_1.Args[0]
33822 v_1_1 := v_1.Args[1]
33823 for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
33824 if v_1_0.Op != OpConst8 || v_1_0.Type != t {
33825 continue
33826 }
33827 d := auxIntToInt8(v_1_0.AuxInt)
33828 x := v_1_1
33829 v.reset(OpSub8)
33830 v0 := b.NewValue0(v.Pos, OpConst8, t)
33831 v0.AuxInt = int8ToAuxInt(c - d)
33832 v.AddArg2(v0, x)
33833 return true
33834 }
33835 break
33836 }
33837 return false
33838 }
33839 func rewriteValuegeneric_OpTrunc(v *Value) bool {
33840 v_0 := v.Args[0]
33841
33842
33843 for {
33844 if v_0.Op != OpConst64F {
33845 break
33846 }
33847 c := auxIntToFloat64(v_0.AuxInt)
33848 v.reset(OpConst64F)
33849 v.AuxInt = float64ToAuxInt(math.Trunc(c))
33850 return true
33851 }
33852 return false
33853 }
33854 func rewriteValuegeneric_OpTrunc16to8(v *Value) bool {
33855 v_0 := v.Args[0]
33856
33857
33858 for {
33859 if v_0.Op != OpConst16 {
33860 break
33861 }
33862 c := auxIntToInt16(v_0.AuxInt)
33863 v.reset(OpConst8)
33864 v.AuxInt = int8ToAuxInt(int8(c))
33865 return true
33866 }
33867
33868
33869 for {
33870 if v_0.Op != OpZeroExt8to16 {
33871 break
33872 }
33873 x := v_0.Args[0]
33874 v.copyOf(x)
33875 return true
33876 }
33877
33878
33879 for {
33880 if v_0.Op != OpSignExt8to16 {
33881 break
33882 }
33883 x := v_0.Args[0]
33884 v.copyOf(x)
33885 return true
33886 }
33887
33888
33889
33890 for {
33891 if v_0.Op != OpAnd16 {
33892 break
33893 }
33894 _ = v_0.Args[1]
33895 v_0_0 := v_0.Args[0]
33896 v_0_1 := v_0.Args[1]
33897 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
33898 if v_0_0.Op != OpConst16 {
33899 continue
33900 }
33901 y := auxIntToInt16(v_0_0.AuxInt)
33902 x := v_0_1
33903 if !(y&0xFF == 0xFF) {
33904 continue
33905 }
33906 v.reset(OpTrunc16to8)
33907 v.AddArg(x)
33908 return true
33909 }
33910 break
33911 }
33912 return false
33913 }
33914 func rewriteValuegeneric_OpTrunc32to16(v *Value) bool {
33915 v_0 := v.Args[0]
33916
33917
33918 for {
33919 if v_0.Op != OpConst32 {
33920 break
33921 }
33922 c := auxIntToInt32(v_0.AuxInt)
33923 v.reset(OpConst16)
33924 v.AuxInt = int16ToAuxInt(int16(c))
33925 return true
33926 }
33927
33928
33929 for {
33930 if v_0.Op != OpZeroExt8to32 {
33931 break
33932 }
33933 x := v_0.Args[0]
33934 v.reset(OpZeroExt8to16)
33935 v.AddArg(x)
33936 return true
33937 }
33938
33939
33940 for {
33941 if v_0.Op != OpZeroExt16to32 {
33942 break
33943 }
33944 x := v_0.Args[0]
33945 v.copyOf(x)
33946 return true
33947 }
33948
33949
33950 for {
33951 if v_0.Op != OpSignExt8to32 {
33952 break
33953 }
33954 x := v_0.Args[0]
33955 v.reset(OpSignExt8to16)
33956 v.AddArg(x)
33957 return true
33958 }
33959
33960
33961 for {
33962 if v_0.Op != OpSignExt16to32 {
33963 break
33964 }
33965 x := v_0.Args[0]
33966 v.copyOf(x)
33967 return true
33968 }
33969
33970
33971
33972 for {
33973 if v_0.Op != OpAnd32 {
33974 break
33975 }
33976 _ = v_0.Args[1]
33977 v_0_0 := v_0.Args[0]
33978 v_0_1 := v_0.Args[1]
33979 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
33980 if v_0_0.Op != OpConst32 {
33981 continue
33982 }
33983 y := auxIntToInt32(v_0_0.AuxInt)
33984 x := v_0_1
33985 if !(y&0xFFFF == 0xFFFF) {
33986 continue
33987 }
33988 v.reset(OpTrunc32to16)
33989 v.AddArg(x)
33990 return true
33991 }
33992 break
33993 }
33994 return false
33995 }
33996 func rewriteValuegeneric_OpTrunc32to8(v *Value) bool {
33997 v_0 := v.Args[0]
33998
33999
34000 for {
34001 if v_0.Op != OpConst32 {
34002 break
34003 }
34004 c := auxIntToInt32(v_0.AuxInt)
34005 v.reset(OpConst8)
34006 v.AuxInt = int8ToAuxInt(int8(c))
34007 return true
34008 }
34009
34010
34011 for {
34012 if v_0.Op != OpZeroExt8to32 {
34013 break
34014 }
34015 x := v_0.Args[0]
34016 v.copyOf(x)
34017 return true
34018 }
34019
34020
34021 for {
34022 if v_0.Op != OpSignExt8to32 {
34023 break
34024 }
34025 x := v_0.Args[0]
34026 v.copyOf(x)
34027 return true
34028 }
34029
34030
34031
34032 for {
34033 if v_0.Op != OpAnd32 {
34034 break
34035 }
34036 _ = v_0.Args[1]
34037 v_0_0 := v_0.Args[0]
34038 v_0_1 := v_0.Args[1]
34039 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
34040 if v_0_0.Op != OpConst32 {
34041 continue
34042 }
34043 y := auxIntToInt32(v_0_0.AuxInt)
34044 x := v_0_1
34045 if !(y&0xFF == 0xFF) {
34046 continue
34047 }
34048 v.reset(OpTrunc32to8)
34049 v.AddArg(x)
34050 return true
34051 }
34052 break
34053 }
34054 return false
34055 }
34056 func rewriteValuegeneric_OpTrunc64to16(v *Value) bool {
34057 v_0 := v.Args[0]
34058
34059
34060 for {
34061 if v_0.Op != OpConst64 {
34062 break
34063 }
34064 c := auxIntToInt64(v_0.AuxInt)
34065 v.reset(OpConst16)
34066 v.AuxInt = int16ToAuxInt(int16(c))
34067 return true
34068 }
34069
34070
34071 for {
34072 if v_0.Op != OpZeroExt8to64 {
34073 break
34074 }
34075 x := v_0.Args[0]
34076 v.reset(OpZeroExt8to16)
34077 v.AddArg(x)
34078 return true
34079 }
34080
34081
34082 for {
34083 if v_0.Op != OpZeroExt16to64 {
34084 break
34085 }
34086 x := v_0.Args[0]
34087 v.copyOf(x)
34088 return true
34089 }
34090
34091
34092 for {
34093 if v_0.Op != OpSignExt8to64 {
34094 break
34095 }
34096 x := v_0.Args[0]
34097 v.reset(OpSignExt8to16)
34098 v.AddArg(x)
34099 return true
34100 }
34101
34102
34103 for {
34104 if v_0.Op != OpSignExt16to64 {
34105 break
34106 }
34107 x := v_0.Args[0]
34108 v.copyOf(x)
34109 return true
34110 }
34111
34112
34113
34114 for {
34115 if v_0.Op != OpAnd64 {
34116 break
34117 }
34118 _ = v_0.Args[1]
34119 v_0_0 := v_0.Args[0]
34120 v_0_1 := v_0.Args[1]
34121 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
34122 if v_0_0.Op != OpConst64 {
34123 continue
34124 }
34125 y := auxIntToInt64(v_0_0.AuxInt)
34126 x := v_0_1
34127 if !(y&0xFFFF == 0xFFFF) {
34128 continue
34129 }
34130 v.reset(OpTrunc64to16)
34131 v.AddArg(x)
34132 return true
34133 }
34134 break
34135 }
34136 return false
34137 }
34138 func rewriteValuegeneric_OpTrunc64to32(v *Value) bool {
34139 v_0 := v.Args[0]
34140
34141
34142 for {
34143 if v_0.Op != OpConst64 {
34144 break
34145 }
34146 c := auxIntToInt64(v_0.AuxInt)
34147 v.reset(OpConst32)
34148 v.AuxInt = int32ToAuxInt(int32(c))
34149 return true
34150 }
34151
34152
34153 for {
34154 if v_0.Op != OpZeroExt8to64 {
34155 break
34156 }
34157 x := v_0.Args[0]
34158 v.reset(OpZeroExt8to32)
34159 v.AddArg(x)
34160 return true
34161 }
34162
34163
34164 for {
34165 if v_0.Op != OpZeroExt16to64 {
34166 break
34167 }
34168 x := v_0.Args[0]
34169 v.reset(OpZeroExt16to32)
34170 v.AddArg(x)
34171 return true
34172 }
34173
34174
34175 for {
34176 if v_0.Op != OpZeroExt32to64 {
34177 break
34178 }
34179 x := v_0.Args[0]
34180 v.copyOf(x)
34181 return true
34182 }
34183
34184
34185 for {
34186 if v_0.Op != OpSignExt8to64 {
34187 break
34188 }
34189 x := v_0.Args[0]
34190 v.reset(OpSignExt8to32)
34191 v.AddArg(x)
34192 return true
34193 }
34194
34195
34196 for {
34197 if v_0.Op != OpSignExt16to64 {
34198 break
34199 }
34200 x := v_0.Args[0]
34201 v.reset(OpSignExt16to32)
34202 v.AddArg(x)
34203 return true
34204 }
34205
34206
34207 for {
34208 if v_0.Op != OpSignExt32to64 {
34209 break
34210 }
34211 x := v_0.Args[0]
34212 v.copyOf(x)
34213 return true
34214 }
34215
34216
34217
34218 for {
34219 if v_0.Op != OpAnd64 {
34220 break
34221 }
34222 _ = v_0.Args[1]
34223 v_0_0 := v_0.Args[0]
34224 v_0_1 := v_0.Args[1]
34225 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
34226 if v_0_0.Op != OpConst64 {
34227 continue
34228 }
34229 y := auxIntToInt64(v_0_0.AuxInt)
34230 x := v_0_1
34231 if !(y&0xFFFFFFFF == 0xFFFFFFFF) {
34232 continue
34233 }
34234 v.reset(OpTrunc64to32)
34235 v.AddArg(x)
34236 return true
34237 }
34238 break
34239 }
34240 return false
34241 }
34242 func rewriteValuegeneric_OpTrunc64to8(v *Value) bool {
34243 v_0 := v.Args[0]
34244
34245
34246 for {
34247 if v_0.Op != OpConst64 {
34248 break
34249 }
34250 c := auxIntToInt64(v_0.AuxInt)
34251 v.reset(OpConst8)
34252 v.AuxInt = int8ToAuxInt(int8(c))
34253 return true
34254 }
34255
34256
34257 for {
34258 if v_0.Op != OpZeroExt8to64 {
34259 break
34260 }
34261 x := v_0.Args[0]
34262 v.copyOf(x)
34263 return true
34264 }
34265
34266
34267 for {
34268 if v_0.Op != OpSignExt8to64 {
34269 break
34270 }
34271 x := v_0.Args[0]
34272 v.copyOf(x)
34273 return true
34274 }
34275
34276
34277
34278 for {
34279 if v_0.Op != OpAnd64 {
34280 break
34281 }
34282 _ = v_0.Args[1]
34283 v_0_0 := v_0.Args[0]
34284 v_0_1 := v_0.Args[1]
34285 for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
34286 if v_0_0.Op != OpConst64 {
34287 continue
34288 }
34289 y := auxIntToInt64(v_0_0.AuxInt)
34290 x := v_0_1
34291 if !(y&0xFF == 0xFF) {
34292 continue
34293 }
34294 v.reset(OpTrunc64to8)
34295 v.AddArg(x)
34296 return true
34297 }
34298 break
34299 }
34300 return false
34301 }
34302 func rewriteValuegeneric_OpXor16(v *Value) bool {
34303 v_1 := v.Args[1]
34304 v_0 := v.Args[0]
34305 b := v.Block
34306 config := b.Func.Config
34307
34308
34309 for {
34310 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34311 if v_0.Op != OpConst16 {
34312 continue
34313 }
34314 c := auxIntToInt16(v_0.AuxInt)
34315 if v_1.Op != OpConst16 {
34316 continue
34317 }
34318 d := auxIntToInt16(v_1.AuxInt)
34319 v.reset(OpConst16)
34320 v.AuxInt = int16ToAuxInt(c ^ d)
34321 return true
34322 }
34323 break
34324 }
34325
34326
34327 for {
34328 x := v_0
34329 if x != v_1 {
34330 break
34331 }
34332 v.reset(OpConst16)
34333 v.AuxInt = int16ToAuxInt(0)
34334 return true
34335 }
34336
34337
34338 for {
34339 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34340 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != 0 {
34341 continue
34342 }
34343 x := v_1
34344 v.copyOf(x)
34345 return true
34346 }
34347 break
34348 }
34349
34350
34351 for {
34352 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34353 if v_0.Op != OpCom16 {
34354 continue
34355 }
34356 x := v_0.Args[0]
34357 if x != v_1 {
34358 continue
34359 }
34360 v.reset(OpConst16)
34361 v.AuxInt = int16ToAuxInt(-1)
34362 return true
34363 }
34364 break
34365 }
34366
34367
34368 for {
34369 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34370 if v_0.Op != OpConst16 || auxIntToInt16(v_0.AuxInt) != -1 {
34371 continue
34372 }
34373 x := v_1
34374 v.reset(OpCom16)
34375 v.AddArg(x)
34376 return true
34377 }
34378 break
34379 }
34380
34381
34382 for {
34383 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34384 x := v_0
34385 if v_1.Op != OpXor16 {
34386 continue
34387 }
34388 _ = v_1.Args[1]
34389 v_1_0 := v_1.Args[0]
34390 v_1_1 := v_1.Args[1]
34391 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
34392 if x != v_1_0 {
34393 continue
34394 }
34395 y := v_1_1
34396 v.copyOf(y)
34397 return true
34398 }
34399 }
34400 break
34401 }
34402
34403
34404
34405 for {
34406 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34407 if v_0.Op != OpXor16 {
34408 continue
34409 }
34410 _ = v_0.Args[1]
34411 v_0_0 := v_0.Args[0]
34412 v_0_1 := v_0.Args[1]
34413 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
34414 i := v_0_0
34415 if i.Op != OpConst16 {
34416 continue
34417 }
34418 t := i.Type
34419 z := v_0_1
34420 x := v_1
34421 if !(z.Op != OpConst16 && x.Op != OpConst16) {
34422 continue
34423 }
34424 v.reset(OpXor16)
34425 v0 := b.NewValue0(v.Pos, OpXor16, t)
34426 v0.AddArg2(z, x)
34427 v.AddArg2(i, v0)
34428 return true
34429 }
34430 }
34431 break
34432 }
34433
34434
34435 for {
34436 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34437 if v_0.Op != OpConst16 {
34438 continue
34439 }
34440 t := v_0.Type
34441 c := auxIntToInt16(v_0.AuxInt)
34442 if v_1.Op != OpXor16 {
34443 continue
34444 }
34445 _ = v_1.Args[1]
34446 v_1_0 := v_1.Args[0]
34447 v_1_1 := v_1.Args[1]
34448 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
34449 if v_1_0.Op != OpConst16 || v_1_0.Type != t {
34450 continue
34451 }
34452 d := auxIntToInt16(v_1_0.AuxInt)
34453 x := v_1_1
34454 v.reset(OpXor16)
34455 v0 := b.NewValue0(v.Pos, OpConst16, t)
34456 v0.AuxInt = int16ToAuxInt(c ^ d)
34457 v.AddArg2(v0, x)
34458 return true
34459 }
34460 }
34461 break
34462 }
34463
34464
34465
34466 for {
34467 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34468 if v_0.Op != OpLsh16x64 {
34469 continue
34470 }
34471 _ = v_0.Args[1]
34472 x := v_0.Args[0]
34473 z := v_0.Args[1]
34474 if z.Op != OpConst64 {
34475 continue
34476 }
34477 c := auxIntToInt64(z.AuxInt)
34478 if v_1.Op != OpRsh16Ux64 {
34479 continue
34480 }
34481 _ = v_1.Args[1]
34482 if x != v_1.Args[0] {
34483 continue
34484 }
34485 v_1_1 := v_1.Args[1]
34486 if v_1_1.Op != OpConst64 {
34487 continue
34488 }
34489 d := auxIntToInt64(v_1_1.AuxInt)
34490 if !(c < 16 && d == 16-c && canRotate(config, 16)) {
34491 continue
34492 }
34493 v.reset(OpRotateLeft16)
34494 v.AddArg2(x, z)
34495 return true
34496 }
34497 break
34498 }
34499
34500
34501
34502 for {
34503 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34504 left := v_0
34505 if left.Op != OpLsh16x64 {
34506 continue
34507 }
34508 y := left.Args[1]
34509 x := left.Args[0]
34510 right := v_1
34511 if right.Op != OpRsh16Ux64 {
34512 continue
34513 }
34514 _ = right.Args[1]
34515 if x != right.Args[0] {
34516 continue
34517 }
34518 right_1 := right.Args[1]
34519 if right_1.Op != OpSub64 {
34520 continue
34521 }
34522 _ = right_1.Args[1]
34523 right_1_0 := right_1.Args[0]
34524 if right_1_0.Op != OpConst64 || auxIntToInt64(right_1_0.AuxInt) != 16 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 16)) {
34525 continue
34526 }
34527 v.reset(OpRotateLeft16)
34528 v.AddArg2(x, y)
34529 return true
34530 }
34531 break
34532 }
34533
34534
34535
34536 for {
34537 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34538 left := v_0
34539 if left.Op != OpLsh16x32 {
34540 continue
34541 }
34542 y := left.Args[1]
34543 x := left.Args[0]
34544 right := v_1
34545 if right.Op != OpRsh16Ux32 {
34546 continue
34547 }
34548 _ = right.Args[1]
34549 if x != right.Args[0] {
34550 continue
34551 }
34552 right_1 := right.Args[1]
34553 if right_1.Op != OpSub32 {
34554 continue
34555 }
34556 _ = right_1.Args[1]
34557 right_1_0 := right_1.Args[0]
34558 if right_1_0.Op != OpConst32 || auxIntToInt32(right_1_0.AuxInt) != 16 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 16)) {
34559 continue
34560 }
34561 v.reset(OpRotateLeft16)
34562 v.AddArg2(x, y)
34563 return true
34564 }
34565 break
34566 }
34567
34568
34569
34570 for {
34571 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34572 left := v_0
34573 if left.Op != OpLsh16x16 {
34574 continue
34575 }
34576 y := left.Args[1]
34577 x := left.Args[0]
34578 right := v_1
34579 if right.Op != OpRsh16Ux16 {
34580 continue
34581 }
34582 _ = right.Args[1]
34583 if x != right.Args[0] {
34584 continue
34585 }
34586 right_1 := right.Args[1]
34587 if right_1.Op != OpSub16 {
34588 continue
34589 }
34590 _ = right_1.Args[1]
34591 right_1_0 := right_1.Args[0]
34592 if right_1_0.Op != OpConst16 || auxIntToInt16(right_1_0.AuxInt) != 16 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 16)) {
34593 continue
34594 }
34595 v.reset(OpRotateLeft16)
34596 v.AddArg2(x, y)
34597 return true
34598 }
34599 break
34600 }
34601
34602
34603
34604 for {
34605 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34606 left := v_0
34607 if left.Op != OpLsh16x8 {
34608 continue
34609 }
34610 y := left.Args[1]
34611 x := left.Args[0]
34612 right := v_1
34613 if right.Op != OpRsh16Ux8 {
34614 continue
34615 }
34616 _ = right.Args[1]
34617 if x != right.Args[0] {
34618 continue
34619 }
34620 right_1 := right.Args[1]
34621 if right_1.Op != OpSub8 {
34622 continue
34623 }
34624 _ = right_1.Args[1]
34625 right_1_0 := right_1.Args[0]
34626 if right_1_0.Op != OpConst8 || auxIntToInt8(right_1_0.AuxInt) != 16 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 16)) {
34627 continue
34628 }
34629 v.reset(OpRotateLeft16)
34630 v.AddArg2(x, y)
34631 return true
34632 }
34633 break
34634 }
34635
34636
34637
34638 for {
34639 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34640 right := v_0
34641 if right.Op != OpRsh16Ux64 {
34642 continue
34643 }
34644 y := right.Args[1]
34645 x := right.Args[0]
34646 left := v_1
34647 if left.Op != OpLsh16x64 {
34648 continue
34649 }
34650 _ = left.Args[1]
34651 if x != left.Args[0] {
34652 continue
34653 }
34654 z := left.Args[1]
34655 if z.Op != OpSub64 {
34656 continue
34657 }
34658 _ = z.Args[1]
34659 z_0 := z.Args[0]
34660 if z_0.Op != OpConst64 || auxIntToInt64(z_0.AuxInt) != 16 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 16)) {
34661 continue
34662 }
34663 v.reset(OpRotateLeft16)
34664 v.AddArg2(x, z)
34665 return true
34666 }
34667 break
34668 }
34669
34670
34671
34672 for {
34673 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34674 right := v_0
34675 if right.Op != OpRsh16Ux32 {
34676 continue
34677 }
34678 y := right.Args[1]
34679 x := right.Args[0]
34680 left := v_1
34681 if left.Op != OpLsh16x32 {
34682 continue
34683 }
34684 _ = left.Args[1]
34685 if x != left.Args[0] {
34686 continue
34687 }
34688 z := left.Args[1]
34689 if z.Op != OpSub32 {
34690 continue
34691 }
34692 _ = z.Args[1]
34693 z_0 := z.Args[0]
34694 if z_0.Op != OpConst32 || auxIntToInt32(z_0.AuxInt) != 16 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 16)) {
34695 continue
34696 }
34697 v.reset(OpRotateLeft16)
34698 v.AddArg2(x, z)
34699 return true
34700 }
34701 break
34702 }
34703
34704
34705
34706 for {
34707 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34708 right := v_0
34709 if right.Op != OpRsh16Ux16 {
34710 continue
34711 }
34712 y := right.Args[1]
34713 x := right.Args[0]
34714 left := v_1
34715 if left.Op != OpLsh16x16 {
34716 continue
34717 }
34718 _ = left.Args[1]
34719 if x != left.Args[0] {
34720 continue
34721 }
34722 z := left.Args[1]
34723 if z.Op != OpSub16 {
34724 continue
34725 }
34726 _ = z.Args[1]
34727 z_0 := z.Args[0]
34728 if z_0.Op != OpConst16 || auxIntToInt16(z_0.AuxInt) != 16 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 16)) {
34729 continue
34730 }
34731 v.reset(OpRotateLeft16)
34732 v.AddArg2(x, z)
34733 return true
34734 }
34735 break
34736 }
34737
34738
34739
34740 for {
34741 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34742 right := v_0
34743 if right.Op != OpRsh16Ux8 {
34744 continue
34745 }
34746 y := right.Args[1]
34747 x := right.Args[0]
34748 left := v_1
34749 if left.Op != OpLsh16x8 {
34750 continue
34751 }
34752 _ = left.Args[1]
34753 if x != left.Args[0] {
34754 continue
34755 }
34756 z := left.Args[1]
34757 if z.Op != OpSub8 {
34758 continue
34759 }
34760 _ = z.Args[1]
34761 z_0 := z.Args[0]
34762 if z_0.Op != OpConst8 || auxIntToInt8(z_0.AuxInt) != 16 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 16)) {
34763 continue
34764 }
34765 v.reset(OpRotateLeft16)
34766 v.AddArg2(x, z)
34767 return true
34768 }
34769 break
34770 }
34771 return false
34772 }
34773 func rewriteValuegeneric_OpXor32(v *Value) bool {
34774 v_1 := v.Args[1]
34775 v_0 := v.Args[0]
34776 b := v.Block
34777 config := b.Func.Config
34778
34779
34780 for {
34781 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34782 if v_0.Op != OpConst32 {
34783 continue
34784 }
34785 c := auxIntToInt32(v_0.AuxInt)
34786 if v_1.Op != OpConst32 {
34787 continue
34788 }
34789 d := auxIntToInt32(v_1.AuxInt)
34790 v.reset(OpConst32)
34791 v.AuxInt = int32ToAuxInt(c ^ d)
34792 return true
34793 }
34794 break
34795 }
34796
34797
34798 for {
34799 x := v_0
34800 if x != v_1 {
34801 break
34802 }
34803 v.reset(OpConst32)
34804 v.AuxInt = int32ToAuxInt(0)
34805 return true
34806 }
34807
34808
34809 for {
34810 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34811 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != 0 {
34812 continue
34813 }
34814 x := v_1
34815 v.copyOf(x)
34816 return true
34817 }
34818 break
34819 }
34820
34821
34822 for {
34823 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34824 if v_0.Op != OpCom32 {
34825 continue
34826 }
34827 x := v_0.Args[0]
34828 if x != v_1 {
34829 continue
34830 }
34831 v.reset(OpConst32)
34832 v.AuxInt = int32ToAuxInt(-1)
34833 return true
34834 }
34835 break
34836 }
34837
34838
34839 for {
34840 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34841 if v_0.Op != OpConst32 || auxIntToInt32(v_0.AuxInt) != -1 {
34842 continue
34843 }
34844 x := v_1
34845 v.reset(OpCom32)
34846 v.AddArg(x)
34847 return true
34848 }
34849 break
34850 }
34851
34852
34853 for {
34854 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34855 x := v_0
34856 if v_1.Op != OpXor32 {
34857 continue
34858 }
34859 _ = v_1.Args[1]
34860 v_1_0 := v_1.Args[0]
34861 v_1_1 := v_1.Args[1]
34862 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
34863 if x != v_1_0 {
34864 continue
34865 }
34866 y := v_1_1
34867 v.copyOf(y)
34868 return true
34869 }
34870 }
34871 break
34872 }
34873
34874
34875
34876 for {
34877 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34878 if v_0.Op != OpXor32 {
34879 continue
34880 }
34881 _ = v_0.Args[1]
34882 v_0_0 := v_0.Args[0]
34883 v_0_1 := v_0.Args[1]
34884 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
34885 i := v_0_0
34886 if i.Op != OpConst32 {
34887 continue
34888 }
34889 t := i.Type
34890 z := v_0_1
34891 x := v_1
34892 if !(z.Op != OpConst32 && x.Op != OpConst32) {
34893 continue
34894 }
34895 v.reset(OpXor32)
34896 v0 := b.NewValue0(v.Pos, OpXor32, t)
34897 v0.AddArg2(z, x)
34898 v.AddArg2(i, v0)
34899 return true
34900 }
34901 }
34902 break
34903 }
34904
34905
34906 for {
34907 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34908 if v_0.Op != OpConst32 {
34909 continue
34910 }
34911 t := v_0.Type
34912 c := auxIntToInt32(v_0.AuxInt)
34913 if v_1.Op != OpXor32 {
34914 continue
34915 }
34916 _ = v_1.Args[1]
34917 v_1_0 := v_1.Args[0]
34918 v_1_1 := v_1.Args[1]
34919 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
34920 if v_1_0.Op != OpConst32 || v_1_0.Type != t {
34921 continue
34922 }
34923 d := auxIntToInt32(v_1_0.AuxInt)
34924 x := v_1_1
34925 v.reset(OpXor32)
34926 v0 := b.NewValue0(v.Pos, OpConst32, t)
34927 v0.AuxInt = int32ToAuxInt(c ^ d)
34928 v.AddArg2(v0, x)
34929 return true
34930 }
34931 }
34932 break
34933 }
34934
34935
34936
34937 for {
34938 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34939 if v_0.Op != OpLsh32x64 {
34940 continue
34941 }
34942 _ = v_0.Args[1]
34943 x := v_0.Args[0]
34944 z := v_0.Args[1]
34945 if z.Op != OpConst64 {
34946 continue
34947 }
34948 c := auxIntToInt64(z.AuxInt)
34949 if v_1.Op != OpRsh32Ux64 {
34950 continue
34951 }
34952 _ = v_1.Args[1]
34953 if x != v_1.Args[0] {
34954 continue
34955 }
34956 v_1_1 := v_1.Args[1]
34957 if v_1_1.Op != OpConst64 {
34958 continue
34959 }
34960 d := auxIntToInt64(v_1_1.AuxInt)
34961 if !(c < 32 && d == 32-c && canRotate(config, 32)) {
34962 continue
34963 }
34964 v.reset(OpRotateLeft32)
34965 v.AddArg2(x, z)
34966 return true
34967 }
34968 break
34969 }
34970
34971
34972
34973 for {
34974 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
34975 left := v_0
34976 if left.Op != OpLsh32x64 {
34977 continue
34978 }
34979 y := left.Args[1]
34980 x := left.Args[0]
34981 right := v_1
34982 if right.Op != OpRsh32Ux64 {
34983 continue
34984 }
34985 _ = right.Args[1]
34986 if x != right.Args[0] {
34987 continue
34988 }
34989 right_1 := right.Args[1]
34990 if right_1.Op != OpSub64 {
34991 continue
34992 }
34993 _ = right_1.Args[1]
34994 right_1_0 := right_1.Args[0]
34995 if right_1_0.Op != OpConst64 || auxIntToInt64(right_1_0.AuxInt) != 32 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 32)) {
34996 continue
34997 }
34998 v.reset(OpRotateLeft32)
34999 v.AddArg2(x, y)
35000 return true
35001 }
35002 break
35003 }
35004
35005
35006
35007 for {
35008 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
35009 left := v_0
35010 if left.Op != OpLsh32x32 {
35011 continue
35012 }
35013 y := left.Args[1]
35014 x := left.Args[0]
35015 right := v_1
35016 if right.Op != OpRsh32Ux32 {
35017 continue
35018 }
35019 _ = right.Args[1]
35020 if x != right.Args[0] {
35021 continue
35022 }
35023 right_1 := right.Args[1]
35024 if right_1.Op != OpSub32 {
35025 continue
35026 }
35027 _ = right_1.Args[1]
35028 right_1_0 := right_1.Args[0]
35029 if right_1_0.Op != OpConst32 || auxIntToInt32(right_1_0.AuxInt) != 32 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 32)) {
35030 continue
35031 }
35032 v.reset(OpRotateLeft32)
35033 v.AddArg2(x, y)
35034 return true
35035 }
35036 break
35037 }
35038
35039
35040
35041 for {
35042 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
35043 left := v_0
35044 if left.Op != OpLsh32x16 {
35045 continue
35046 }
35047 y := left.Args[1]
35048 x := left.Args[0]
35049 right := v_1
35050 if right.Op != OpRsh32Ux16 {
35051 continue
35052 }
35053 _ = right.Args[1]
35054 if x != right.Args[0] {
35055 continue
35056 }
35057 right_1 := right.Args[1]
35058 if right_1.Op != OpSub16 {
35059 continue
35060 }
35061 _ = right_1.Args[1]
35062 right_1_0 := right_1.Args[0]
35063 if right_1_0.Op != OpConst16 || auxIntToInt16(right_1_0.AuxInt) != 32 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 32)) {
35064 continue
35065 }
35066 v.reset(OpRotateLeft32)
35067 v.AddArg2(x, y)
35068 return true
35069 }
35070 break
35071 }
35072
35073
35074
35075 for {
35076 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
35077 left := v_0
35078 if left.Op != OpLsh32x8 {
35079 continue
35080 }
35081 y := left.Args[1]
35082 x := left.Args[0]
35083 right := v_1
35084 if right.Op != OpRsh32Ux8 {
35085 continue
35086 }
35087 _ = right.Args[1]
35088 if x != right.Args[0] {
35089 continue
35090 }
35091 right_1 := right.Args[1]
35092 if right_1.Op != OpSub8 {
35093 continue
35094 }
35095 _ = right_1.Args[1]
35096 right_1_0 := right_1.Args[0]
35097 if right_1_0.Op != OpConst8 || auxIntToInt8(right_1_0.AuxInt) != 32 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 32)) {
35098 continue
35099 }
35100 v.reset(OpRotateLeft32)
35101 v.AddArg2(x, y)
35102 return true
35103 }
35104 break
35105 }
35106
35107
35108
35109 for {
35110 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
35111 right := v_0
35112 if right.Op != OpRsh32Ux64 {
35113 continue
35114 }
35115 y := right.Args[1]
35116 x := right.Args[0]
35117 left := v_1
35118 if left.Op != OpLsh32x64 {
35119 continue
35120 }
35121 _ = left.Args[1]
35122 if x != left.Args[0] {
35123 continue
35124 }
35125 z := left.Args[1]
35126 if z.Op != OpSub64 {
35127 continue
35128 }
35129 _ = z.Args[1]
35130 z_0 := z.Args[0]
35131 if z_0.Op != OpConst64 || auxIntToInt64(z_0.AuxInt) != 32 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 32)) {
35132 continue
35133 }
35134 v.reset(OpRotateLeft32)
35135 v.AddArg2(x, z)
35136 return true
35137 }
35138 break
35139 }
35140
35141
35142
35143 for {
35144 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
35145 right := v_0
35146 if right.Op != OpRsh32Ux32 {
35147 continue
35148 }
35149 y := right.Args[1]
35150 x := right.Args[0]
35151 left := v_1
35152 if left.Op != OpLsh32x32 {
35153 continue
35154 }
35155 _ = left.Args[1]
35156 if x != left.Args[0] {
35157 continue
35158 }
35159 z := left.Args[1]
35160 if z.Op != OpSub32 {
35161 continue
35162 }
35163 _ = z.Args[1]
35164 z_0 := z.Args[0]
35165 if z_0.Op != OpConst32 || auxIntToInt32(z_0.AuxInt) != 32 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 32)) {
35166 continue
35167 }
35168 v.reset(OpRotateLeft32)
35169 v.AddArg2(x, z)
35170 return true
35171 }
35172 break
35173 }
35174
35175
35176
35177 for {
35178 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
35179 right := v_0
35180 if right.Op != OpRsh32Ux16 {
35181 continue
35182 }
35183 y := right.Args[1]
35184 x := right.Args[0]
35185 left := v_1
35186 if left.Op != OpLsh32x16 {
35187 continue
35188 }
35189 _ = left.Args[1]
35190 if x != left.Args[0] {
35191 continue
35192 }
35193 z := left.Args[1]
35194 if z.Op != OpSub16 {
35195 continue
35196 }
35197 _ = z.Args[1]
35198 z_0 := z.Args[0]
35199 if z_0.Op != OpConst16 || auxIntToInt16(z_0.AuxInt) != 32 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 32)) {
35200 continue
35201 }
35202 v.reset(OpRotateLeft32)
35203 v.AddArg2(x, z)
35204 return true
35205 }
35206 break
35207 }
35208
35209
35210
35211 for {
35212 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
35213 right := v_0
35214 if right.Op != OpRsh32Ux8 {
35215 continue
35216 }
35217 y := right.Args[1]
35218 x := right.Args[0]
35219 left := v_1
35220 if left.Op != OpLsh32x8 {
35221 continue
35222 }
35223 _ = left.Args[1]
35224 if x != left.Args[0] {
35225 continue
35226 }
35227 z := left.Args[1]
35228 if z.Op != OpSub8 {
35229 continue
35230 }
35231 _ = z.Args[1]
35232 z_0 := z.Args[0]
35233 if z_0.Op != OpConst8 || auxIntToInt8(z_0.AuxInt) != 32 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 32)) {
35234 continue
35235 }
35236 v.reset(OpRotateLeft32)
35237 v.AddArg2(x, z)
35238 return true
35239 }
35240 break
35241 }
35242 return false
35243 }
35244 func rewriteValuegeneric_OpXor64(v *Value) bool {
35245 v_1 := v.Args[1]
35246 v_0 := v.Args[0]
35247 b := v.Block
35248 config := b.Func.Config
35249
35250
35251 for {
35252 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
35253 if v_0.Op != OpConst64 {
35254 continue
35255 }
35256 c := auxIntToInt64(v_0.AuxInt)
35257 if v_1.Op != OpConst64 {
35258 continue
35259 }
35260 d := auxIntToInt64(v_1.AuxInt)
35261 v.reset(OpConst64)
35262 v.AuxInt = int64ToAuxInt(c ^ d)
35263 return true
35264 }
35265 break
35266 }
35267
35268
35269 for {
35270 x := v_0
35271 if x != v_1 {
35272 break
35273 }
35274 v.reset(OpConst64)
35275 v.AuxInt = int64ToAuxInt(0)
35276 return true
35277 }
35278
35279
35280 for {
35281 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
35282 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != 0 {
35283 continue
35284 }
35285 x := v_1
35286 v.copyOf(x)
35287 return true
35288 }
35289 break
35290 }
35291
35292
35293 for {
35294 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
35295 if v_0.Op != OpCom64 {
35296 continue
35297 }
35298 x := v_0.Args[0]
35299 if x != v_1 {
35300 continue
35301 }
35302 v.reset(OpConst64)
35303 v.AuxInt = int64ToAuxInt(-1)
35304 return true
35305 }
35306 break
35307 }
35308
35309
35310 for {
35311 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
35312 if v_0.Op != OpConst64 || auxIntToInt64(v_0.AuxInt) != -1 {
35313 continue
35314 }
35315 x := v_1
35316 v.reset(OpCom64)
35317 v.AddArg(x)
35318 return true
35319 }
35320 break
35321 }
35322
35323
35324 for {
35325 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
35326 x := v_0
35327 if v_1.Op != OpXor64 {
35328 continue
35329 }
35330 _ = v_1.Args[1]
35331 v_1_0 := v_1.Args[0]
35332 v_1_1 := v_1.Args[1]
35333 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
35334 if x != v_1_0 {
35335 continue
35336 }
35337 y := v_1_1
35338 v.copyOf(y)
35339 return true
35340 }
35341 }
35342 break
35343 }
35344
35345
35346
35347 for {
35348 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
35349 if v_0.Op != OpXor64 {
35350 continue
35351 }
35352 _ = v_0.Args[1]
35353 v_0_0 := v_0.Args[0]
35354 v_0_1 := v_0.Args[1]
35355 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
35356 i := v_0_0
35357 if i.Op != OpConst64 {
35358 continue
35359 }
35360 t := i.Type
35361 z := v_0_1
35362 x := v_1
35363 if !(z.Op != OpConst64 && x.Op != OpConst64) {
35364 continue
35365 }
35366 v.reset(OpXor64)
35367 v0 := b.NewValue0(v.Pos, OpXor64, t)
35368 v0.AddArg2(z, x)
35369 v.AddArg2(i, v0)
35370 return true
35371 }
35372 }
35373 break
35374 }
35375
35376
35377 for {
35378 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
35379 if v_0.Op != OpConst64 {
35380 continue
35381 }
35382 t := v_0.Type
35383 c := auxIntToInt64(v_0.AuxInt)
35384 if v_1.Op != OpXor64 {
35385 continue
35386 }
35387 _ = v_1.Args[1]
35388 v_1_0 := v_1.Args[0]
35389 v_1_1 := v_1.Args[1]
35390 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
35391 if v_1_0.Op != OpConst64 || v_1_0.Type != t {
35392 continue
35393 }
35394 d := auxIntToInt64(v_1_0.AuxInt)
35395 x := v_1_1
35396 v.reset(OpXor64)
35397 v0 := b.NewValue0(v.Pos, OpConst64, t)
35398 v0.AuxInt = int64ToAuxInt(c ^ d)
35399 v.AddArg2(v0, x)
35400 return true
35401 }
35402 }
35403 break
35404 }
35405
35406
35407
35408 for {
35409 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
35410 if v_0.Op != OpLsh64x64 {
35411 continue
35412 }
35413 _ = v_0.Args[1]
35414 x := v_0.Args[0]
35415 z := v_0.Args[1]
35416 if z.Op != OpConst64 {
35417 continue
35418 }
35419 c := auxIntToInt64(z.AuxInt)
35420 if v_1.Op != OpRsh64Ux64 {
35421 continue
35422 }
35423 _ = v_1.Args[1]
35424 if x != v_1.Args[0] {
35425 continue
35426 }
35427 v_1_1 := v_1.Args[1]
35428 if v_1_1.Op != OpConst64 {
35429 continue
35430 }
35431 d := auxIntToInt64(v_1_1.AuxInt)
35432 if !(c < 64 && d == 64-c && canRotate(config, 64)) {
35433 continue
35434 }
35435 v.reset(OpRotateLeft64)
35436 v.AddArg2(x, z)
35437 return true
35438 }
35439 break
35440 }
35441
35442
35443
35444 for {
35445 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
35446 left := v_0
35447 if left.Op != OpLsh64x64 {
35448 continue
35449 }
35450 y := left.Args[1]
35451 x := left.Args[0]
35452 right := v_1
35453 if right.Op != OpRsh64Ux64 {
35454 continue
35455 }
35456 _ = right.Args[1]
35457 if x != right.Args[0] {
35458 continue
35459 }
35460 right_1 := right.Args[1]
35461 if right_1.Op != OpSub64 {
35462 continue
35463 }
35464 _ = right_1.Args[1]
35465 right_1_0 := right_1.Args[0]
35466 if right_1_0.Op != OpConst64 || auxIntToInt64(right_1_0.AuxInt) != 64 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 64)) {
35467 continue
35468 }
35469 v.reset(OpRotateLeft64)
35470 v.AddArg2(x, y)
35471 return true
35472 }
35473 break
35474 }
35475
35476
35477
35478 for {
35479 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
35480 left := v_0
35481 if left.Op != OpLsh64x32 {
35482 continue
35483 }
35484 y := left.Args[1]
35485 x := left.Args[0]
35486 right := v_1
35487 if right.Op != OpRsh64Ux32 {
35488 continue
35489 }
35490 _ = right.Args[1]
35491 if x != right.Args[0] {
35492 continue
35493 }
35494 right_1 := right.Args[1]
35495 if right_1.Op != OpSub32 {
35496 continue
35497 }
35498 _ = right_1.Args[1]
35499 right_1_0 := right_1.Args[0]
35500 if right_1_0.Op != OpConst32 || auxIntToInt32(right_1_0.AuxInt) != 64 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 64)) {
35501 continue
35502 }
35503 v.reset(OpRotateLeft64)
35504 v.AddArg2(x, y)
35505 return true
35506 }
35507 break
35508 }
35509
35510
35511
35512 for {
35513 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
35514 left := v_0
35515 if left.Op != OpLsh64x16 {
35516 continue
35517 }
35518 y := left.Args[1]
35519 x := left.Args[0]
35520 right := v_1
35521 if right.Op != OpRsh64Ux16 {
35522 continue
35523 }
35524 _ = right.Args[1]
35525 if x != right.Args[0] {
35526 continue
35527 }
35528 right_1 := right.Args[1]
35529 if right_1.Op != OpSub16 {
35530 continue
35531 }
35532 _ = right_1.Args[1]
35533 right_1_0 := right_1.Args[0]
35534 if right_1_0.Op != OpConst16 || auxIntToInt16(right_1_0.AuxInt) != 64 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 64)) {
35535 continue
35536 }
35537 v.reset(OpRotateLeft64)
35538 v.AddArg2(x, y)
35539 return true
35540 }
35541 break
35542 }
35543
35544
35545
35546 for {
35547 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
35548 left := v_0
35549 if left.Op != OpLsh64x8 {
35550 continue
35551 }
35552 y := left.Args[1]
35553 x := left.Args[0]
35554 right := v_1
35555 if right.Op != OpRsh64Ux8 {
35556 continue
35557 }
35558 _ = right.Args[1]
35559 if x != right.Args[0] {
35560 continue
35561 }
35562 right_1 := right.Args[1]
35563 if right_1.Op != OpSub8 {
35564 continue
35565 }
35566 _ = right_1.Args[1]
35567 right_1_0 := right_1.Args[0]
35568 if right_1_0.Op != OpConst8 || auxIntToInt8(right_1_0.AuxInt) != 64 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 64)) {
35569 continue
35570 }
35571 v.reset(OpRotateLeft64)
35572 v.AddArg2(x, y)
35573 return true
35574 }
35575 break
35576 }
35577
35578
35579
35580 for {
35581 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
35582 right := v_0
35583 if right.Op != OpRsh64Ux64 {
35584 continue
35585 }
35586 y := right.Args[1]
35587 x := right.Args[0]
35588 left := v_1
35589 if left.Op != OpLsh64x64 {
35590 continue
35591 }
35592 _ = left.Args[1]
35593 if x != left.Args[0] {
35594 continue
35595 }
35596 z := left.Args[1]
35597 if z.Op != OpSub64 {
35598 continue
35599 }
35600 _ = z.Args[1]
35601 z_0 := z.Args[0]
35602 if z_0.Op != OpConst64 || auxIntToInt64(z_0.AuxInt) != 64 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 64)) {
35603 continue
35604 }
35605 v.reset(OpRotateLeft64)
35606 v.AddArg2(x, z)
35607 return true
35608 }
35609 break
35610 }
35611
35612
35613
35614 for {
35615 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
35616 right := v_0
35617 if right.Op != OpRsh64Ux32 {
35618 continue
35619 }
35620 y := right.Args[1]
35621 x := right.Args[0]
35622 left := v_1
35623 if left.Op != OpLsh64x32 {
35624 continue
35625 }
35626 _ = left.Args[1]
35627 if x != left.Args[0] {
35628 continue
35629 }
35630 z := left.Args[1]
35631 if z.Op != OpSub32 {
35632 continue
35633 }
35634 _ = z.Args[1]
35635 z_0 := z.Args[0]
35636 if z_0.Op != OpConst32 || auxIntToInt32(z_0.AuxInt) != 64 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 64)) {
35637 continue
35638 }
35639 v.reset(OpRotateLeft64)
35640 v.AddArg2(x, z)
35641 return true
35642 }
35643 break
35644 }
35645
35646
35647
35648 for {
35649 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
35650 right := v_0
35651 if right.Op != OpRsh64Ux16 {
35652 continue
35653 }
35654 y := right.Args[1]
35655 x := right.Args[0]
35656 left := v_1
35657 if left.Op != OpLsh64x16 {
35658 continue
35659 }
35660 _ = left.Args[1]
35661 if x != left.Args[0] {
35662 continue
35663 }
35664 z := left.Args[1]
35665 if z.Op != OpSub16 {
35666 continue
35667 }
35668 _ = z.Args[1]
35669 z_0 := z.Args[0]
35670 if z_0.Op != OpConst16 || auxIntToInt16(z_0.AuxInt) != 64 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 64)) {
35671 continue
35672 }
35673 v.reset(OpRotateLeft64)
35674 v.AddArg2(x, z)
35675 return true
35676 }
35677 break
35678 }
35679
35680
35681
35682 for {
35683 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
35684 right := v_0
35685 if right.Op != OpRsh64Ux8 {
35686 continue
35687 }
35688 y := right.Args[1]
35689 x := right.Args[0]
35690 left := v_1
35691 if left.Op != OpLsh64x8 {
35692 continue
35693 }
35694 _ = left.Args[1]
35695 if x != left.Args[0] {
35696 continue
35697 }
35698 z := left.Args[1]
35699 if z.Op != OpSub8 {
35700 continue
35701 }
35702 _ = z.Args[1]
35703 z_0 := z.Args[0]
35704 if z_0.Op != OpConst8 || auxIntToInt8(z_0.AuxInt) != 64 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 64)) {
35705 continue
35706 }
35707 v.reset(OpRotateLeft64)
35708 v.AddArg2(x, z)
35709 return true
35710 }
35711 break
35712 }
35713 return false
35714 }
35715 func rewriteValuegeneric_OpXor8(v *Value) bool {
35716 v_1 := v.Args[1]
35717 v_0 := v.Args[0]
35718 b := v.Block
35719 config := b.Func.Config
35720
35721
35722 for {
35723 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
35724 if v_0.Op != OpConst8 {
35725 continue
35726 }
35727 c := auxIntToInt8(v_0.AuxInt)
35728 if v_1.Op != OpConst8 {
35729 continue
35730 }
35731 d := auxIntToInt8(v_1.AuxInt)
35732 v.reset(OpConst8)
35733 v.AuxInt = int8ToAuxInt(c ^ d)
35734 return true
35735 }
35736 break
35737 }
35738
35739
35740 for {
35741 x := v_0
35742 if x != v_1 {
35743 break
35744 }
35745 v.reset(OpConst8)
35746 v.AuxInt = int8ToAuxInt(0)
35747 return true
35748 }
35749
35750
35751 for {
35752 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
35753 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != 0 {
35754 continue
35755 }
35756 x := v_1
35757 v.copyOf(x)
35758 return true
35759 }
35760 break
35761 }
35762
35763
35764 for {
35765 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
35766 if v_0.Op != OpCom8 {
35767 continue
35768 }
35769 x := v_0.Args[0]
35770 if x != v_1 {
35771 continue
35772 }
35773 v.reset(OpConst8)
35774 v.AuxInt = int8ToAuxInt(-1)
35775 return true
35776 }
35777 break
35778 }
35779
35780
35781 for {
35782 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
35783 if v_0.Op != OpConst8 || auxIntToInt8(v_0.AuxInt) != -1 {
35784 continue
35785 }
35786 x := v_1
35787 v.reset(OpCom8)
35788 v.AddArg(x)
35789 return true
35790 }
35791 break
35792 }
35793
35794
35795 for {
35796 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
35797 x := v_0
35798 if v_1.Op != OpXor8 {
35799 continue
35800 }
35801 _ = v_1.Args[1]
35802 v_1_0 := v_1.Args[0]
35803 v_1_1 := v_1.Args[1]
35804 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
35805 if x != v_1_0 {
35806 continue
35807 }
35808 y := v_1_1
35809 v.copyOf(y)
35810 return true
35811 }
35812 }
35813 break
35814 }
35815
35816
35817
35818 for {
35819 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
35820 if v_0.Op != OpXor8 {
35821 continue
35822 }
35823 _ = v_0.Args[1]
35824 v_0_0 := v_0.Args[0]
35825 v_0_1 := v_0.Args[1]
35826 for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
35827 i := v_0_0
35828 if i.Op != OpConst8 {
35829 continue
35830 }
35831 t := i.Type
35832 z := v_0_1
35833 x := v_1
35834 if !(z.Op != OpConst8 && x.Op != OpConst8) {
35835 continue
35836 }
35837 v.reset(OpXor8)
35838 v0 := b.NewValue0(v.Pos, OpXor8, t)
35839 v0.AddArg2(z, x)
35840 v.AddArg2(i, v0)
35841 return true
35842 }
35843 }
35844 break
35845 }
35846
35847
35848 for {
35849 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
35850 if v_0.Op != OpConst8 {
35851 continue
35852 }
35853 t := v_0.Type
35854 c := auxIntToInt8(v_0.AuxInt)
35855 if v_1.Op != OpXor8 {
35856 continue
35857 }
35858 _ = v_1.Args[1]
35859 v_1_0 := v_1.Args[0]
35860 v_1_1 := v_1.Args[1]
35861 for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
35862 if v_1_0.Op != OpConst8 || v_1_0.Type != t {
35863 continue
35864 }
35865 d := auxIntToInt8(v_1_0.AuxInt)
35866 x := v_1_1
35867 v.reset(OpXor8)
35868 v0 := b.NewValue0(v.Pos, OpConst8, t)
35869 v0.AuxInt = int8ToAuxInt(c ^ d)
35870 v.AddArg2(v0, x)
35871 return true
35872 }
35873 }
35874 break
35875 }
35876
35877
35878
35879 for {
35880 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
35881 if v_0.Op != OpLsh8x64 {
35882 continue
35883 }
35884 _ = v_0.Args[1]
35885 x := v_0.Args[0]
35886 z := v_0.Args[1]
35887 if z.Op != OpConst64 {
35888 continue
35889 }
35890 c := auxIntToInt64(z.AuxInt)
35891 if v_1.Op != OpRsh8Ux64 {
35892 continue
35893 }
35894 _ = v_1.Args[1]
35895 if x != v_1.Args[0] {
35896 continue
35897 }
35898 v_1_1 := v_1.Args[1]
35899 if v_1_1.Op != OpConst64 {
35900 continue
35901 }
35902 d := auxIntToInt64(v_1_1.AuxInt)
35903 if !(c < 8 && d == 8-c && canRotate(config, 8)) {
35904 continue
35905 }
35906 v.reset(OpRotateLeft8)
35907 v.AddArg2(x, z)
35908 return true
35909 }
35910 break
35911 }
35912
35913
35914
35915 for {
35916 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
35917 left := v_0
35918 if left.Op != OpLsh8x64 {
35919 continue
35920 }
35921 y := left.Args[1]
35922 x := left.Args[0]
35923 right := v_1
35924 if right.Op != OpRsh8Ux64 {
35925 continue
35926 }
35927 _ = right.Args[1]
35928 if x != right.Args[0] {
35929 continue
35930 }
35931 right_1 := right.Args[1]
35932 if right_1.Op != OpSub64 {
35933 continue
35934 }
35935 _ = right_1.Args[1]
35936 right_1_0 := right_1.Args[0]
35937 if right_1_0.Op != OpConst64 || auxIntToInt64(right_1_0.AuxInt) != 8 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 8)) {
35938 continue
35939 }
35940 v.reset(OpRotateLeft8)
35941 v.AddArg2(x, y)
35942 return true
35943 }
35944 break
35945 }
35946
35947
35948
35949 for {
35950 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
35951 left := v_0
35952 if left.Op != OpLsh8x32 {
35953 continue
35954 }
35955 y := left.Args[1]
35956 x := left.Args[0]
35957 right := v_1
35958 if right.Op != OpRsh8Ux32 {
35959 continue
35960 }
35961 _ = right.Args[1]
35962 if x != right.Args[0] {
35963 continue
35964 }
35965 right_1 := right.Args[1]
35966 if right_1.Op != OpSub32 {
35967 continue
35968 }
35969 _ = right_1.Args[1]
35970 right_1_0 := right_1.Args[0]
35971 if right_1_0.Op != OpConst32 || auxIntToInt32(right_1_0.AuxInt) != 8 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 8)) {
35972 continue
35973 }
35974 v.reset(OpRotateLeft8)
35975 v.AddArg2(x, y)
35976 return true
35977 }
35978 break
35979 }
35980
35981
35982
35983 for {
35984 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
35985 left := v_0
35986 if left.Op != OpLsh8x16 {
35987 continue
35988 }
35989 y := left.Args[1]
35990 x := left.Args[0]
35991 right := v_1
35992 if right.Op != OpRsh8Ux16 {
35993 continue
35994 }
35995 _ = right.Args[1]
35996 if x != right.Args[0] {
35997 continue
35998 }
35999 right_1 := right.Args[1]
36000 if right_1.Op != OpSub16 {
36001 continue
36002 }
36003 _ = right_1.Args[1]
36004 right_1_0 := right_1.Args[0]
36005 if right_1_0.Op != OpConst16 || auxIntToInt16(right_1_0.AuxInt) != 8 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 8)) {
36006 continue
36007 }
36008 v.reset(OpRotateLeft8)
36009 v.AddArg2(x, y)
36010 return true
36011 }
36012 break
36013 }
36014
36015
36016
36017 for {
36018 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
36019 left := v_0
36020 if left.Op != OpLsh8x8 {
36021 continue
36022 }
36023 y := left.Args[1]
36024 x := left.Args[0]
36025 right := v_1
36026 if right.Op != OpRsh8Ux8 {
36027 continue
36028 }
36029 _ = right.Args[1]
36030 if x != right.Args[0] {
36031 continue
36032 }
36033 right_1 := right.Args[1]
36034 if right_1.Op != OpSub8 {
36035 continue
36036 }
36037 _ = right_1.Args[1]
36038 right_1_0 := right_1.Args[0]
36039 if right_1_0.Op != OpConst8 || auxIntToInt8(right_1_0.AuxInt) != 8 || y != right_1.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 8)) {
36040 continue
36041 }
36042 v.reset(OpRotateLeft8)
36043 v.AddArg2(x, y)
36044 return true
36045 }
36046 break
36047 }
36048
36049
36050
36051 for {
36052 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
36053 right := v_0
36054 if right.Op != OpRsh8Ux64 {
36055 continue
36056 }
36057 y := right.Args[1]
36058 x := right.Args[0]
36059 left := v_1
36060 if left.Op != OpLsh8x64 {
36061 continue
36062 }
36063 _ = left.Args[1]
36064 if x != left.Args[0] {
36065 continue
36066 }
36067 z := left.Args[1]
36068 if z.Op != OpSub64 {
36069 continue
36070 }
36071 _ = z.Args[1]
36072 z_0 := z.Args[0]
36073 if z_0.Op != OpConst64 || auxIntToInt64(z_0.AuxInt) != 8 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 8)) {
36074 continue
36075 }
36076 v.reset(OpRotateLeft8)
36077 v.AddArg2(x, z)
36078 return true
36079 }
36080 break
36081 }
36082
36083
36084
36085 for {
36086 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
36087 right := v_0
36088 if right.Op != OpRsh8Ux32 {
36089 continue
36090 }
36091 y := right.Args[1]
36092 x := right.Args[0]
36093 left := v_1
36094 if left.Op != OpLsh8x32 {
36095 continue
36096 }
36097 _ = left.Args[1]
36098 if x != left.Args[0] {
36099 continue
36100 }
36101 z := left.Args[1]
36102 if z.Op != OpSub32 {
36103 continue
36104 }
36105 _ = z.Args[1]
36106 z_0 := z.Args[0]
36107 if z_0.Op != OpConst32 || auxIntToInt32(z_0.AuxInt) != 8 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 8)) {
36108 continue
36109 }
36110 v.reset(OpRotateLeft8)
36111 v.AddArg2(x, z)
36112 return true
36113 }
36114 break
36115 }
36116
36117
36118
36119 for {
36120 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
36121 right := v_0
36122 if right.Op != OpRsh8Ux16 {
36123 continue
36124 }
36125 y := right.Args[1]
36126 x := right.Args[0]
36127 left := v_1
36128 if left.Op != OpLsh8x16 {
36129 continue
36130 }
36131 _ = left.Args[1]
36132 if x != left.Args[0] {
36133 continue
36134 }
36135 z := left.Args[1]
36136 if z.Op != OpSub16 {
36137 continue
36138 }
36139 _ = z.Args[1]
36140 z_0 := z.Args[0]
36141 if z_0.Op != OpConst16 || auxIntToInt16(z_0.AuxInt) != 8 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 8)) {
36142 continue
36143 }
36144 v.reset(OpRotateLeft8)
36145 v.AddArg2(x, z)
36146 return true
36147 }
36148 break
36149 }
36150
36151
36152
36153 for {
36154 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
36155 right := v_0
36156 if right.Op != OpRsh8Ux8 {
36157 continue
36158 }
36159 y := right.Args[1]
36160 x := right.Args[0]
36161 left := v_1
36162 if left.Op != OpLsh8x8 {
36163 continue
36164 }
36165 _ = left.Args[1]
36166 if x != left.Args[0] {
36167 continue
36168 }
36169 z := left.Args[1]
36170 if z.Op != OpSub8 {
36171 continue
36172 }
36173 _ = z.Args[1]
36174 z_0 := z.Args[0]
36175 if z_0.Op != OpConst8 || auxIntToInt8(z_0.AuxInt) != 8 || y != z.Args[1] || !((shiftIsBounded(left) || shiftIsBounded(right)) && canRotate(config, 8)) {
36176 continue
36177 }
36178 v.reset(OpRotateLeft8)
36179 v.AddArg2(x, z)
36180 return true
36181 }
36182 break
36183 }
36184 return false
36185 }
36186 func rewriteValuegeneric_OpZero(v *Value) bool {
36187 v_1 := v.Args[1]
36188 v_0 := v.Args[0]
36189 b := v.Block
36190
36191
36192
36193 for {
36194 if v_0.Op != OpSelectN || auxIntToInt64(v_0.AuxInt) != 0 {
36195 break
36196 }
36197 call := v_0.Args[0]
36198 if call.Op != OpStaticLECall || len(call.Args) != 2 {
36199 break
36200 }
36201 mem := v_1
36202 if mem.Op != OpSelectN || auxIntToInt64(mem.AuxInt) != 1 || call != mem.Args[0] || !(isSameCall(call.Aux, "runtime.newobject")) {
36203 break
36204 }
36205 v.copyOf(mem)
36206 return true
36207 }
36208
36209
36210
36211 for {
36212 n := auxIntToInt64(v.AuxInt)
36213 t1 := auxToType(v.Aux)
36214 p1 := v_0
36215 store := v_1
36216 if store.Op != OpStore {
36217 break
36218 }
36219 t2 := auxToType(store.Aux)
36220 mem := store.Args[2]
36221 store_0 := store.Args[0]
36222 if store_0.Op != OpOffPtr {
36223 break
36224 }
36225 o2 := auxIntToInt64(store_0.AuxInt)
36226 p2 := store_0.Args[0]
36227 if !(isSamePtr(p1, p2) && store.Uses == 1 && n >= o2+t2.Size() && clobber(store)) {
36228 break
36229 }
36230 v.reset(OpZero)
36231 v.AuxInt = int64ToAuxInt(n)
36232 v.Aux = typeToAux(t1)
36233 v.AddArg2(p1, mem)
36234 return true
36235 }
36236
36237
36238
36239 for {
36240 n := auxIntToInt64(v.AuxInt)
36241 t := auxToType(v.Aux)
36242 dst1 := v_0
36243 move := v_1
36244 if move.Op != OpMove || auxIntToInt64(move.AuxInt) != n || auxToType(move.Aux) != t {
36245 break
36246 }
36247 mem := move.Args[2]
36248 dst2 := move.Args[0]
36249 if !(move.Uses == 1 && isSamePtr(dst1, dst2) && clobber(move)) {
36250 break
36251 }
36252 v.reset(OpZero)
36253 v.AuxInt = int64ToAuxInt(n)
36254 v.Aux = typeToAux(t)
36255 v.AddArg2(dst1, mem)
36256 return true
36257 }
36258
36259
36260
36261 for {
36262 n := auxIntToInt64(v.AuxInt)
36263 t := auxToType(v.Aux)
36264 dst1 := v_0
36265 vardef := v_1
36266 if vardef.Op != OpVarDef {
36267 break
36268 }
36269 x := auxToSym(vardef.Aux)
36270 move := vardef.Args[0]
36271 if move.Op != OpMove || auxIntToInt64(move.AuxInt) != n || auxToType(move.Aux) != t {
36272 break
36273 }
36274 mem := move.Args[2]
36275 dst2 := move.Args[0]
36276 if !(move.Uses == 1 && vardef.Uses == 1 && isSamePtr(dst1, dst2) && clobber(move, vardef)) {
36277 break
36278 }
36279 v.reset(OpZero)
36280 v.AuxInt = int64ToAuxInt(n)
36281 v.Aux = typeToAux(t)
36282 v0 := b.NewValue0(v.Pos, OpVarDef, types.TypeMem)
36283 v0.Aux = symToAux(x)
36284 v0.AddArg(mem)
36285 v.AddArg2(dst1, v0)
36286 return true
36287 }
36288
36289
36290
36291 for {
36292 s := auxIntToInt64(v.AuxInt)
36293 t := auxToType(v.Aux)
36294 dst1 := v_0
36295 zero := v_1
36296 if zero.Op != OpZero || auxIntToInt64(zero.AuxInt) != s || auxToType(zero.Aux) != t {
36297 break
36298 }
36299 dst2 := zero.Args[0]
36300 if !(isSamePtr(dst1, dst2)) {
36301 break
36302 }
36303 v.copyOf(zero)
36304 return true
36305 }
36306
36307
36308
36309 for {
36310 s := auxIntToInt64(v.AuxInt)
36311 t := auxToType(v.Aux)
36312 dst1 := v_0
36313 vardef := v_1
36314 if vardef.Op != OpVarDef {
36315 break
36316 }
36317 vardef_0 := vardef.Args[0]
36318 if vardef_0.Op != OpZero || auxIntToInt64(vardef_0.AuxInt) != s || auxToType(vardef_0.Aux) != t {
36319 break
36320 }
36321 dst2 := vardef_0.Args[0]
36322 if !(isSamePtr(dst1, dst2)) {
36323 break
36324 }
36325 v.copyOf(vardef)
36326 return true
36327 }
36328 return false
36329 }
36330 func rewriteValuegeneric_OpZeroExt16to32(v *Value) bool {
36331 v_0 := v.Args[0]
36332
36333
36334 for {
36335 if v_0.Op != OpConst16 {
36336 break
36337 }
36338 c := auxIntToInt16(v_0.AuxInt)
36339 v.reset(OpConst32)
36340 v.AuxInt = int32ToAuxInt(int32(uint16(c)))
36341 return true
36342 }
36343
36344
36345
36346 for {
36347 if v_0.Op != OpTrunc32to16 {
36348 break
36349 }
36350 x := v_0.Args[0]
36351 if x.Op != OpRsh32Ux64 {
36352 break
36353 }
36354 _ = x.Args[1]
36355 x_1 := x.Args[1]
36356 if x_1.Op != OpConst64 {
36357 break
36358 }
36359 s := auxIntToInt64(x_1.AuxInt)
36360 if !(s >= 16) {
36361 break
36362 }
36363 v.copyOf(x)
36364 return true
36365 }
36366 return false
36367 }
36368 func rewriteValuegeneric_OpZeroExt16to64(v *Value) bool {
36369 v_0 := v.Args[0]
36370
36371
36372 for {
36373 if v_0.Op != OpConst16 {
36374 break
36375 }
36376 c := auxIntToInt16(v_0.AuxInt)
36377 v.reset(OpConst64)
36378 v.AuxInt = int64ToAuxInt(int64(uint16(c)))
36379 return true
36380 }
36381
36382
36383
36384 for {
36385 if v_0.Op != OpTrunc64to16 {
36386 break
36387 }
36388 x := v_0.Args[0]
36389 if x.Op != OpRsh64Ux64 {
36390 break
36391 }
36392 _ = x.Args[1]
36393 x_1 := x.Args[1]
36394 if x_1.Op != OpConst64 {
36395 break
36396 }
36397 s := auxIntToInt64(x_1.AuxInt)
36398 if !(s >= 48) {
36399 break
36400 }
36401 v.copyOf(x)
36402 return true
36403 }
36404 return false
36405 }
36406 func rewriteValuegeneric_OpZeroExt32to64(v *Value) bool {
36407 v_0 := v.Args[0]
36408
36409
36410 for {
36411 if v_0.Op != OpConst32 {
36412 break
36413 }
36414 c := auxIntToInt32(v_0.AuxInt)
36415 v.reset(OpConst64)
36416 v.AuxInt = int64ToAuxInt(int64(uint32(c)))
36417 return true
36418 }
36419
36420
36421
36422 for {
36423 if v_0.Op != OpTrunc64to32 {
36424 break
36425 }
36426 x := v_0.Args[0]
36427 if x.Op != OpRsh64Ux64 {
36428 break
36429 }
36430 _ = x.Args[1]
36431 x_1 := x.Args[1]
36432 if x_1.Op != OpConst64 {
36433 break
36434 }
36435 s := auxIntToInt64(x_1.AuxInt)
36436 if !(s >= 32) {
36437 break
36438 }
36439 v.copyOf(x)
36440 return true
36441 }
36442 return false
36443 }
36444 func rewriteValuegeneric_OpZeroExt8to16(v *Value) bool {
36445 v_0 := v.Args[0]
36446
36447
36448 for {
36449 if v_0.Op != OpConst8 {
36450 break
36451 }
36452 c := auxIntToInt8(v_0.AuxInt)
36453 v.reset(OpConst16)
36454 v.AuxInt = int16ToAuxInt(int16(uint8(c)))
36455 return true
36456 }
36457
36458
36459
36460 for {
36461 if v_0.Op != OpTrunc16to8 {
36462 break
36463 }
36464 x := v_0.Args[0]
36465 if x.Op != OpRsh16Ux64 {
36466 break
36467 }
36468 _ = x.Args[1]
36469 x_1 := x.Args[1]
36470 if x_1.Op != OpConst64 {
36471 break
36472 }
36473 s := auxIntToInt64(x_1.AuxInt)
36474 if !(s >= 8) {
36475 break
36476 }
36477 v.copyOf(x)
36478 return true
36479 }
36480 return false
36481 }
36482 func rewriteValuegeneric_OpZeroExt8to32(v *Value) bool {
36483 v_0 := v.Args[0]
36484
36485
36486 for {
36487 if v_0.Op != OpConst8 {
36488 break
36489 }
36490 c := auxIntToInt8(v_0.AuxInt)
36491 v.reset(OpConst32)
36492 v.AuxInt = int32ToAuxInt(int32(uint8(c)))
36493 return true
36494 }
36495
36496
36497
36498 for {
36499 if v_0.Op != OpTrunc32to8 {
36500 break
36501 }
36502 x := v_0.Args[0]
36503 if x.Op != OpRsh32Ux64 {
36504 break
36505 }
36506 _ = x.Args[1]
36507 x_1 := x.Args[1]
36508 if x_1.Op != OpConst64 {
36509 break
36510 }
36511 s := auxIntToInt64(x_1.AuxInt)
36512 if !(s >= 24) {
36513 break
36514 }
36515 v.copyOf(x)
36516 return true
36517 }
36518 return false
36519 }
36520 func rewriteValuegeneric_OpZeroExt8to64(v *Value) bool {
36521 v_0 := v.Args[0]
36522
36523
36524 for {
36525 if v_0.Op != OpConst8 {
36526 break
36527 }
36528 c := auxIntToInt8(v_0.AuxInt)
36529 v.reset(OpConst64)
36530 v.AuxInt = int64ToAuxInt(int64(uint8(c)))
36531 return true
36532 }
36533
36534
36535
36536 for {
36537 if v_0.Op != OpTrunc64to8 {
36538 break
36539 }
36540 x := v_0.Args[0]
36541 if x.Op != OpRsh64Ux64 {
36542 break
36543 }
36544 _ = x.Args[1]
36545 x_1 := x.Args[1]
36546 if x_1.Op != OpConst64 {
36547 break
36548 }
36549 s := auxIntToInt64(x_1.AuxInt)
36550 if !(s >= 56) {
36551 break
36552 }
36553 v.copyOf(x)
36554 return true
36555 }
36556 return false
36557 }
36558 func rewriteBlockgeneric(b *Block) bool {
36559 switch b.Kind {
36560 case BlockIf:
36561
36562
36563 for b.Controls[0].Op == OpNot {
36564 v_0 := b.Controls[0]
36565 cond := v_0.Args[0]
36566 b.resetWithControl(BlockIf, cond)
36567 b.swapSuccessors()
36568 return true
36569 }
36570
36571
36572
36573 for b.Controls[0].Op == OpConstBool {
36574 v_0 := b.Controls[0]
36575 c := auxIntToBool(v_0.AuxInt)
36576 if !(c) {
36577 break
36578 }
36579 b.Reset(BlockFirst)
36580 return true
36581 }
36582
36583
36584
36585 for b.Controls[0].Op == OpConstBool {
36586 v_0 := b.Controls[0]
36587 c := auxIntToBool(v_0.AuxInt)
36588 if !(!c) {
36589 break
36590 }
36591 b.Reset(BlockFirst)
36592 b.swapSuccessors()
36593 return true
36594 }
36595 }
36596 return false
36597 }
36598
View as plain text