1
2
3
4 package ssa
5
6 import "cmd/compile/internal/types"
7
8 func rewriteValuedec64(v *Value) bool {
9 switch v.Op {
10 case OpAdd64:
11 return rewriteValuedec64_OpAdd64(v)
12 case OpAnd64:
13 return rewriteValuedec64_OpAnd64(v)
14 case OpArg:
15 return rewriteValuedec64_OpArg(v)
16 case OpBitLen64:
17 return rewriteValuedec64_OpBitLen64(v)
18 case OpBswap64:
19 return rewriteValuedec64_OpBswap64(v)
20 case OpCom64:
21 return rewriteValuedec64_OpCom64(v)
22 case OpConst64:
23 return rewriteValuedec64_OpConst64(v)
24 case OpCtz64:
25 return rewriteValuedec64_OpCtz64(v)
26 case OpCtz64NonZero:
27 v.Op = OpCtz64
28 return true
29 case OpEq64:
30 return rewriteValuedec64_OpEq64(v)
31 case OpInt64Hi:
32 return rewriteValuedec64_OpInt64Hi(v)
33 case OpInt64Lo:
34 return rewriteValuedec64_OpInt64Lo(v)
35 case OpLeq64:
36 return rewriteValuedec64_OpLeq64(v)
37 case OpLeq64U:
38 return rewriteValuedec64_OpLeq64U(v)
39 case OpLess64:
40 return rewriteValuedec64_OpLess64(v)
41 case OpLess64U:
42 return rewriteValuedec64_OpLess64U(v)
43 case OpLoad:
44 return rewriteValuedec64_OpLoad(v)
45 case OpLsh16x64:
46 return rewriteValuedec64_OpLsh16x64(v)
47 case OpLsh32x64:
48 return rewriteValuedec64_OpLsh32x64(v)
49 case OpLsh64x16:
50 return rewriteValuedec64_OpLsh64x16(v)
51 case OpLsh64x32:
52 return rewriteValuedec64_OpLsh64x32(v)
53 case OpLsh64x64:
54 return rewriteValuedec64_OpLsh64x64(v)
55 case OpLsh64x8:
56 return rewriteValuedec64_OpLsh64x8(v)
57 case OpLsh8x64:
58 return rewriteValuedec64_OpLsh8x64(v)
59 case OpMul64:
60 return rewriteValuedec64_OpMul64(v)
61 case OpNeg64:
62 return rewriteValuedec64_OpNeg64(v)
63 case OpNeq64:
64 return rewriteValuedec64_OpNeq64(v)
65 case OpOr32:
66 return rewriteValuedec64_OpOr32(v)
67 case OpOr64:
68 return rewriteValuedec64_OpOr64(v)
69 case OpRsh16Ux64:
70 return rewriteValuedec64_OpRsh16Ux64(v)
71 case OpRsh16x64:
72 return rewriteValuedec64_OpRsh16x64(v)
73 case OpRsh32Ux64:
74 return rewriteValuedec64_OpRsh32Ux64(v)
75 case OpRsh32x64:
76 return rewriteValuedec64_OpRsh32x64(v)
77 case OpRsh64Ux16:
78 return rewriteValuedec64_OpRsh64Ux16(v)
79 case OpRsh64Ux32:
80 return rewriteValuedec64_OpRsh64Ux32(v)
81 case OpRsh64Ux64:
82 return rewriteValuedec64_OpRsh64Ux64(v)
83 case OpRsh64Ux8:
84 return rewriteValuedec64_OpRsh64Ux8(v)
85 case OpRsh64x16:
86 return rewriteValuedec64_OpRsh64x16(v)
87 case OpRsh64x32:
88 return rewriteValuedec64_OpRsh64x32(v)
89 case OpRsh64x64:
90 return rewriteValuedec64_OpRsh64x64(v)
91 case OpRsh64x8:
92 return rewriteValuedec64_OpRsh64x8(v)
93 case OpRsh8Ux64:
94 return rewriteValuedec64_OpRsh8Ux64(v)
95 case OpRsh8x64:
96 return rewriteValuedec64_OpRsh8x64(v)
97 case OpSignExt16to64:
98 return rewriteValuedec64_OpSignExt16to64(v)
99 case OpSignExt32to64:
100 return rewriteValuedec64_OpSignExt32to64(v)
101 case OpSignExt8to64:
102 return rewriteValuedec64_OpSignExt8to64(v)
103 case OpStore:
104 return rewriteValuedec64_OpStore(v)
105 case OpSub64:
106 return rewriteValuedec64_OpSub64(v)
107 case OpTrunc64to16:
108 return rewriteValuedec64_OpTrunc64to16(v)
109 case OpTrunc64to32:
110 return rewriteValuedec64_OpTrunc64to32(v)
111 case OpTrunc64to8:
112 return rewriteValuedec64_OpTrunc64to8(v)
113 case OpXor64:
114 return rewriteValuedec64_OpXor64(v)
115 case OpZeroExt16to64:
116 return rewriteValuedec64_OpZeroExt16to64(v)
117 case OpZeroExt32to64:
118 return rewriteValuedec64_OpZeroExt32to64(v)
119 case OpZeroExt8to64:
120 return rewriteValuedec64_OpZeroExt8to64(v)
121 }
122 return false
123 }
124 func rewriteValuedec64_OpAdd64(v *Value) bool {
125 v_1 := v.Args[1]
126 v_0 := v.Args[0]
127 b := v.Block
128 typ := &b.Func.Config.Types
129
130
131 for {
132 x := v_0
133 y := v_1
134 v.reset(OpInt64Make)
135 v0 := b.NewValue0(v.Pos, OpAdd32withcarry, typ.Int32)
136 v1 := b.NewValue0(v.Pos, OpInt64Hi, typ.UInt32)
137 v1.AddArg(x)
138 v2 := b.NewValue0(v.Pos, OpInt64Hi, typ.UInt32)
139 v2.AddArg(y)
140 v3 := b.NewValue0(v.Pos, OpSelect1, types.TypeFlags)
141 v4 := b.NewValue0(v.Pos, OpAdd32carry, types.NewTuple(typ.UInt32, types.TypeFlags))
142 v5 := b.NewValue0(v.Pos, OpInt64Lo, typ.UInt32)
143 v5.AddArg(x)
144 v6 := b.NewValue0(v.Pos, OpInt64Lo, typ.UInt32)
145 v6.AddArg(y)
146 v4.AddArg2(v5, v6)
147 v3.AddArg(v4)
148 v0.AddArg3(v1, v2, v3)
149 v7 := b.NewValue0(v.Pos, OpSelect0, typ.UInt32)
150 v7.AddArg(v4)
151 v.AddArg2(v0, v7)
152 return true
153 }
154 }
155 func rewriteValuedec64_OpAnd64(v *Value) bool {
156 v_1 := v.Args[1]
157 v_0 := v.Args[0]
158 b := v.Block
159 typ := &b.Func.Config.Types
160
161
162 for {
163 x := v_0
164 y := v_1
165 v.reset(OpInt64Make)
166 v0 := b.NewValue0(v.Pos, OpAnd32, typ.UInt32)
167 v1 := b.NewValue0(v.Pos, OpInt64Hi, typ.UInt32)
168 v1.AddArg(x)
169 v2 := b.NewValue0(v.Pos, OpInt64Hi, typ.UInt32)
170 v2.AddArg(y)
171 v0.AddArg2(v1, v2)
172 v3 := b.NewValue0(v.Pos, OpAnd32, typ.UInt32)
173 v4 := b.NewValue0(v.Pos, OpInt64Lo, typ.UInt32)
174 v4.AddArg(x)
175 v5 := b.NewValue0(v.Pos, OpInt64Lo, typ.UInt32)
176 v5.AddArg(y)
177 v3.AddArg2(v4, v5)
178 v.AddArg2(v0, v3)
179 return true
180 }
181 }
182 func rewriteValuedec64_OpArg(v *Value) bool {
183 b := v.Block
184 config := b.Func.Config
185 typ := &b.Func.Config.Types
186
187
188
189 for {
190 off := auxIntToInt32(v.AuxInt)
191 n := auxToSym(v.Aux)
192 if !(is64BitInt(v.Type) && !config.BigEndian && v.Type.IsSigned() && !(b.Func.pass.name == "decompose builtin")) {
193 break
194 }
195 v.reset(OpInt64Make)
196 v0 := b.NewValue0(v.Pos, OpArg, typ.Int32)
197 v0.AuxInt = int32ToAuxInt(off + 4)
198 v0.Aux = symToAux(n)
199 v1 := b.NewValue0(v.Pos, OpArg, typ.UInt32)
200 v1.AuxInt = int32ToAuxInt(off)
201 v1.Aux = symToAux(n)
202 v.AddArg2(v0, v1)
203 return true
204 }
205
206
207
208 for {
209 off := auxIntToInt32(v.AuxInt)
210 n := auxToSym(v.Aux)
211 if !(is64BitInt(v.Type) && !config.BigEndian && !v.Type.IsSigned() && !(b.Func.pass.name == "decompose builtin")) {
212 break
213 }
214 v.reset(OpInt64Make)
215 v0 := b.NewValue0(v.Pos, OpArg, typ.UInt32)
216 v0.AuxInt = int32ToAuxInt(off + 4)
217 v0.Aux = symToAux(n)
218 v1 := b.NewValue0(v.Pos, OpArg, typ.UInt32)
219 v1.AuxInt = int32ToAuxInt(off)
220 v1.Aux = symToAux(n)
221 v.AddArg2(v0, v1)
222 return true
223 }
224
225
226
227 for {
228 off := auxIntToInt32(v.AuxInt)
229 n := auxToSym(v.Aux)
230 if !(is64BitInt(v.Type) && config.BigEndian && v.Type.IsSigned() && !(b.Func.pass.name == "decompose builtin")) {
231 break
232 }
233 v.reset(OpInt64Make)
234 v0 := b.NewValue0(v.Pos, OpArg, typ.Int32)
235 v0.AuxInt = int32ToAuxInt(off)
236 v0.Aux = symToAux(n)
237 v1 := b.NewValue0(v.Pos, OpArg, typ.UInt32)
238 v1.AuxInt = int32ToAuxInt(off + 4)
239 v1.Aux = symToAux(n)
240 v.AddArg2(v0, v1)
241 return true
242 }
243
244
245
246 for {
247 off := auxIntToInt32(v.AuxInt)
248 n := auxToSym(v.Aux)
249 if !(is64BitInt(v.Type) && config.BigEndian && !v.Type.IsSigned() && !(b.Func.pass.name == "decompose builtin")) {
250 break
251 }
252 v.reset(OpInt64Make)
253 v0 := b.NewValue0(v.Pos, OpArg, typ.UInt32)
254 v0.AuxInt = int32ToAuxInt(off)
255 v0.Aux = symToAux(n)
256 v1 := b.NewValue0(v.Pos, OpArg, typ.UInt32)
257 v1.AuxInt = int32ToAuxInt(off + 4)
258 v1.Aux = symToAux(n)
259 v.AddArg2(v0, v1)
260 return true
261 }
262 return false
263 }
264 func rewriteValuedec64_OpBitLen64(v *Value) bool {
265 v_0 := v.Args[0]
266 b := v.Block
267 typ := &b.Func.Config.Types
268
269
270 for {
271 x := v_0
272 v.reset(OpAdd32)
273 v.Type = typ.Int
274 v0 := b.NewValue0(v.Pos, OpBitLen32, typ.Int)
275 v1 := b.NewValue0(v.Pos, OpInt64Hi, typ.UInt32)
276 v1.AddArg(x)
277 v0.AddArg(v1)
278 v2 := b.NewValue0(v.Pos, OpBitLen32, typ.Int)
279 v3 := b.NewValue0(v.Pos, OpOr32, typ.UInt32)
280 v4 := b.NewValue0(v.Pos, OpInt64Lo, typ.UInt32)
281 v4.AddArg(x)
282 v5 := b.NewValue0(v.Pos, OpZeromask, typ.UInt32)
283 v5.AddArg(v1)
284 v3.AddArg2(v4, v5)
285 v2.AddArg(v3)
286 v.AddArg2(v0, v2)
287 return true
288 }
289 }
290 func rewriteValuedec64_OpBswap64(v *Value) bool {
291 v_0 := v.Args[0]
292 b := v.Block
293 typ := &b.Func.Config.Types
294
295
296 for {
297 x := v_0
298 v.reset(OpInt64Make)
299 v0 := b.NewValue0(v.Pos, OpBswap32, typ.UInt32)
300 v1 := b.NewValue0(v.Pos, OpInt64Lo, typ.UInt32)
301 v1.AddArg(x)
302 v0.AddArg(v1)
303 v2 := b.NewValue0(v.Pos, OpBswap32, typ.UInt32)
304 v3 := b.NewValue0(v.Pos, OpInt64Hi, typ.UInt32)
305 v3.AddArg(x)
306 v2.AddArg(v3)
307 v.AddArg2(v0, v2)
308 return true
309 }
310 }
311 func rewriteValuedec64_OpCom64(v *Value) bool {
312 v_0 := v.Args[0]
313 b := v.Block
314 typ := &b.Func.Config.Types
315
316
317 for {
318 x := v_0
319 v.reset(OpInt64Make)
320 v0 := b.NewValue0(v.Pos, OpCom32, typ.UInt32)
321 v1 := b.NewValue0(v.Pos, OpInt64Hi, typ.UInt32)
322 v1.AddArg(x)
323 v0.AddArg(v1)
324 v2 := b.NewValue0(v.Pos, OpCom32, typ.UInt32)
325 v3 := b.NewValue0(v.Pos, OpInt64Lo, typ.UInt32)
326 v3.AddArg(x)
327 v2.AddArg(v3)
328 v.AddArg2(v0, v2)
329 return true
330 }
331 }
332 func rewriteValuedec64_OpConst64(v *Value) bool {
333 b := v.Block
334 typ := &b.Func.Config.Types
335
336
337
338 for {
339 t := v.Type
340 c := auxIntToInt64(v.AuxInt)
341 if !(t.IsSigned()) {
342 break
343 }
344 v.reset(OpInt64Make)
345 v0 := b.NewValue0(v.Pos, OpConst32, typ.Int32)
346 v0.AuxInt = int32ToAuxInt(int32(c >> 32))
347 v1 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
348 v1.AuxInt = int32ToAuxInt(int32(c))
349 v.AddArg2(v0, v1)
350 return true
351 }
352
353
354
355 for {
356 t := v.Type
357 c := auxIntToInt64(v.AuxInt)
358 if !(!t.IsSigned()) {
359 break
360 }
361 v.reset(OpInt64Make)
362 v0 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
363 v0.AuxInt = int32ToAuxInt(int32(c >> 32))
364 v1 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
365 v1.AuxInt = int32ToAuxInt(int32(c))
366 v.AddArg2(v0, v1)
367 return true
368 }
369 return false
370 }
371 func rewriteValuedec64_OpCtz64(v *Value) bool {
372 v_0 := v.Args[0]
373 b := v.Block
374 typ := &b.Func.Config.Types
375
376
377 for {
378 x := v_0
379 v.reset(OpAdd32)
380 v.Type = typ.UInt32
381 v0 := b.NewValue0(v.Pos, OpCtz32, typ.UInt32)
382 v1 := b.NewValue0(v.Pos, OpInt64Lo, typ.UInt32)
383 v1.AddArg(x)
384 v0.AddArg(v1)
385 v2 := b.NewValue0(v.Pos, OpAnd32, typ.UInt32)
386 v3 := b.NewValue0(v.Pos, OpCom32, typ.UInt32)
387 v4 := b.NewValue0(v.Pos, OpZeromask, typ.UInt32)
388 v4.AddArg(v1)
389 v3.AddArg(v4)
390 v5 := b.NewValue0(v.Pos, OpCtz32, typ.UInt32)
391 v6 := b.NewValue0(v.Pos, OpInt64Hi, typ.UInt32)
392 v6.AddArg(x)
393 v5.AddArg(v6)
394 v2.AddArg2(v3, v5)
395 v.AddArg2(v0, v2)
396 return true
397 }
398 }
399 func rewriteValuedec64_OpEq64(v *Value) bool {
400 v_1 := v.Args[1]
401 v_0 := v.Args[0]
402 b := v.Block
403 typ := &b.Func.Config.Types
404
405
406 for {
407 x := v_0
408 y := v_1
409 v.reset(OpAndB)
410 v0 := b.NewValue0(v.Pos, OpEq32, typ.Bool)
411 v1 := b.NewValue0(v.Pos, OpInt64Hi, typ.UInt32)
412 v1.AddArg(x)
413 v2 := b.NewValue0(v.Pos, OpInt64Hi, typ.UInt32)
414 v2.AddArg(y)
415 v0.AddArg2(v1, v2)
416 v3 := b.NewValue0(v.Pos, OpEq32, typ.Bool)
417 v4 := b.NewValue0(v.Pos, OpInt64Lo, typ.UInt32)
418 v4.AddArg(x)
419 v5 := b.NewValue0(v.Pos, OpInt64Lo, typ.UInt32)
420 v5.AddArg(y)
421 v3.AddArg2(v4, v5)
422 v.AddArg2(v0, v3)
423 return true
424 }
425 }
426 func rewriteValuedec64_OpInt64Hi(v *Value) bool {
427 v_0 := v.Args[0]
428
429
430 for {
431 if v_0.Op != OpInt64Make {
432 break
433 }
434 hi := v_0.Args[0]
435 v.copyOf(hi)
436 return true
437 }
438 return false
439 }
440 func rewriteValuedec64_OpInt64Lo(v *Value) bool {
441 v_0 := v.Args[0]
442
443
444 for {
445 if v_0.Op != OpInt64Make {
446 break
447 }
448 lo := v_0.Args[1]
449 v.copyOf(lo)
450 return true
451 }
452 return false
453 }
454 func rewriteValuedec64_OpLeq64(v *Value) bool {
455 v_1 := v.Args[1]
456 v_0 := v.Args[0]
457 b := v.Block
458 typ := &b.Func.Config.Types
459
460
461 for {
462 x := v_0
463 y := v_1
464 v.reset(OpOrB)
465 v0 := b.NewValue0(v.Pos, OpLess32, typ.Bool)
466 v1 := b.NewValue0(v.Pos, OpInt64Hi, typ.UInt32)
467 v1.AddArg(x)
468 v2 := b.NewValue0(v.Pos, OpInt64Hi, typ.UInt32)
469 v2.AddArg(y)
470 v0.AddArg2(v1, v2)
471 v3 := b.NewValue0(v.Pos, OpAndB, typ.Bool)
472 v4 := b.NewValue0(v.Pos, OpEq32, typ.Bool)
473 v4.AddArg2(v1, v2)
474 v5 := b.NewValue0(v.Pos, OpLeq32U, typ.Bool)
475 v6 := b.NewValue0(v.Pos, OpInt64Lo, typ.UInt32)
476 v6.AddArg(x)
477 v7 := b.NewValue0(v.Pos, OpInt64Lo, typ.UInt32)
478 v7.AddArg(y)
479 v5.AddArg2(v6, v7)
480 v3.AddArg2(v4, v5)
481 v.AddArg2(v0, v3)
482 return true
483 }
484 }
485 func rewriteValuedec64_OpLeq64U(v *Value) bool {
486 v_1 := v.Args[1]
487 v_0 := v.Args[0]
488 b := v.Block
489 typ := &b.Func.Config.Types
490
491
492 for {
493 x := v_0
494 y := v_1
495 v.reset(OpOrB)
496 v0 := b.NewValue0(v.Pos, OpLess32U, typ.Bool)
497 v1 := b.NewValue0(v.Pos, OpInt64Hi, typ.UInt32)
498 v1.AddArg(x)
499 v2 := b.NewValue0(v.Pos, OpInt64Hi, typ.UInt32)
500 v2.AddArg(y)
501 v0.AddArg2(v1, v2)
502 v3 := b.NewValue0(v.Pos, OpAndB, typ.Bool)
503 v4 := b.NewValue0(v.Pos, OpEq32, typ.Bool)
504 v4.AddArg2(v1, v2)
505 v5 := b.NewValue0(v.Pos, OpLeq32U, typ.Bool)
506 v6 := b.NewValue0(v.Pos, OpInt64Lo, typ.UInt32)
507 v6.AddArg(x)
508 v7 := b.NewValue0(v.Pos, OpInt64Lo, typ.UInt32)
509 v7.AddArg(y)
510 v5.AddArg2(v6, v7)
511 v3.AddArg2(v4, v5)
512 v.AddArg2(v0, v3)
513 return true
514 }
515 }
516 func rewriteValuedec64_OpLess64(v *Value) bool {
517 v_1 := v.Args[1]
518 v_0 := v.Args[0]
519 b := v.Block
520 typ := &b.Func.Config.Types
521
522
523 for {
524 x := v_0
525 y := v_1
526 v.reset(OpOrB)
527 v0 := b.NewValue0(v.Pos, OpLess32, typ.Bool)
528 v1 := b.NewValue0(v.Pos, OpInt64Hi, typ.UInt32)
529 v1.AddArg(x)
530 v2 := b.NewValue0(v.Pos, OpInt64Hi, typ.UInt32)
531 v2.AddArg(y)
532 v0.AddArg2(v1, v2)
533 v3 := b.NewValue0(v.Pos, OpAndB, typ.Bool)
534 v4 := b.NewValue0(v.Pos, OpEq32, typ.Bool)
535 v4.AddArg2(v1, v2)
536 v5 := b.NewValue0(v.Pos, OpLess32U, typ.Bool)
537 v6 := b.NewValue0(v.Pos, OpInt64Lo, typ.UInt32)
538 v6.AddArg(x)
539 v7 := b.NewValue0(v.Pos, OpInt64Lo, typ.UInt32)
540 v7.AddArg(y)
541 v5.AddArg2(v6, v7)
542 v3.AddArg2(v4, v5)
543 v.AddArg2(v0, v3)
544 return true
545 }
546 }
547 func rewriteValuedec64_OpLess64U(v *Value) bool {
548 v_1 := v.Args[1]
549 v_0 := v.Args[0]
550 b := v.Block
551 typ := &b.Func.Config.Types
552
553
554 for {
555 x := v_0
556 y := v_1
557 v.reset(OpOrB)
558 v0 := b.NewValue0(v.Pos, OpLess32U, typ.Bool)
559 v1 := b.NewValue0(v.Pos, OpInt64Hi, typ.UInt32)
560 v1.AddArg(x)
561 v2 := b.NewValue0(v.Pos, OpInt64Hi, typ.UInt32)
562 v2.AddArg(y)
563 v0.AddArg2(v1, v2)
564 v3 := b.NewValue0(v.Pos, OpAndB, typ.Bool)
565 v4 := b.NewValue0(v.Pos, OpEq32, typ.Bool)
566 v4.AddArg2(v1, v2)
567 v5 := b.NewValue0(v.Pos, OpLess32U, typ.Bool)
568 v6 := b.NewValue0(v.Pos, OpInt64Lo, typ.UInt32)
569 v6.AddArg(x)
570 v7 := b.NewValue0(v.Pos, OpInt64Lo, typ.UInt32)
571 v7.AddArg(y)
572 v5.AddArg2(v6, v7)
573 v3.AddArg2(v4, v5)
574 v.AddArg2(v0, v3)
575 return true
576 }
577 }
578 func rewriteValuedec64_OpLoad(v *Value) bool {
579 v_1 := v.Args[1]
580 v_0 := v.Args[0]
581 b := v.Block
582 config := b.Func.Config
583 typ := &b.Func.Config.Types
584
585
586
587 for {
588 t := v.Type
589 ptr := v_0
590 mem := v_1
591 if !(is64BitInt(t) && !config.BigEndian && t.IsSigned()) {
592 break
593 }
594 v.reset(OpInt64Make)
595 v0 := b.NewValue0(v.Pos, OpLoad, typ.Int32)
596 v1 := b.NewValue0(v.Pos, OpOffPtr, typ.Int32Ptr)
597 v1.AuxInt = int64ToAuxInt(4)
598 v1.AddArg(ptr)
599 v0.AddArg2(v1, mem)
600 v2 := b.NewValue0(v.Pos, OpLoad, typ.UInt32)
601 v2.AddArg2(ptr, mem)
602 v.AddArg2(v0, v2)
603 return true
604 }
605
606
607
608 for {
609 t := v.Type
610 ptr := v_0
611 mem := v_1
612 if !(is64BitInt(t) && !config.BigEndian && !t.IsSigned()) {
613 break
614 }
615 v.reset(OpInt64Make)
616 v0 := b.NewValue0(v.Pos, OpLoad, typ.UInt32)
617 v1 := b.NewValue0(v.Pos, OpOffPtr, typ.UInt32Ptr)
618 v1.AuxInt = int64ToAuxInt(4)
619 v1.AddArg(ptr)
620 v0.AddArg2(v1, mem)
621 v2 := b.NewValue0(v.Pos, OpLoad, typ.UInt32)
622 v2.AddArg2(ptr, mem)
623 v.AddArg2(v0, v2)
624 return true
625 }
626
627
628
629 for {
630 t := v.Type
631 ptr := v_0
632 mem := v_1
633 if !(is64BitInt(t) && config.BigEndian && t.IsSigned()) {
634 break
635 }
636 v.reset(OpInt64Make)
637 v0 := b.NewValue0(v.Pos, OpLoad, typ.Int32)
638 v0.AddArg2(ptr, mem)
639 v1 := b.NewValue0(v.Pos, OpLoad, typ.UInt32)
640 v2 := b.NewValue0(v.Pos, OpOffPtr, typ.UInt32Ptr)
641 v2.AuxInt = int64ToAuxInt(4)
642 v2.AddArg(ptr)
643 v1.AddArg2(v2, mem)
644 v.AddArg2(v0, v1)
645 return true
646 }
647
648
649
650 for {
651 t := v.Type
652 ptr := v_0
653 mem := v_1
654 if !(is64BitInt(t) && config.BigEndian && !t.IsSigned()) {
655 break
656 }
657 v.reset(OpInt64Make)
658 v0 := b.NewValue0(v.Pos, OpLoad, typ.UInt32)
659 v0.AddArg2(ptr, mem)
660 v1 := b.NewValue0(v.Pos, OpLoad, typ.UInt32)
661 v2 := b.NewValue0(v.Pos, OpOffPtr, typ.UInt32Ptr)
662 v2.AuxInt = int64ToAuxInt(4)
663 v2.AddArg(ptr)
664 v1.AddArg2(v2, mem)
665 v.AddArg2(v0, v1)
666 return true
667 }
668 return false
669 }
670 func rewriteValuedec64_OpLsh16x64(v *Value) bool {
671 v_1 := v.Args[1]
672 v_0 := v.Args[0]
673 b := v.Block
674 typ := &b.Func.Config.Types
675
676
677
678 for {
679 if v_1.Op != OpInt64Make {
680 break
681 }
682 v_1_0 := v_1.Args[0]
683 if v_1_0.Op != OpConst32 {
684 break
685 }
686 c := auxIntToInt32(v_1_0.AuxInt)
687 if !(c != 0) {
688 break
689 }
690 v.reset(OpConst32)
691 v.AuxInt = int32ToAuxInt(0)
692 return true
693 }
694
695
696 for {
697 c := auxIntToBool(v.AuxInt)
698 x := v_0
699 if v_1.Op != OpInt64Make {
700 break
701 }
702 lo := v_1.Args[1]
703 v_1_0 := v_1.Args[0]
704 if v_1_0.Op != OpConst32 || auxIntToInt32(v_1_0.AuxInt) != 0 {
705 break
706 }
707 v.reset(OpLsh16x32)
708 v.AuxInt = boolToAuxInt(c)
709 v.AddArg2(x, lo)
710 return true
711 }
712
713
714
715 for {
716 x := v_0
717 if v_1.Op != OpInt64Make {
718 break
719 }
720 lo := v_1.Args[1]
721 hi := v_1.Args[0]
722 if !(hi.Op != OpConst32) {
723 break
724 }
725 v.reset(OpLsh16x32)
726 v0 := b.NewValue0(v.Pos, OpOr32, typ.UInt32)
727 v1 := b.NewValue0(v.Pos, OpZeromask, typ.UInt32)
728 v1.AddArg(hi)
729 v0.AddArg2(v1, lo)
730 v.AddArg2(x, v0)
731 return true
732 }
733
734
735 for {
736 x := v_0
737 y := v_1
738 v.reset(OpLsh16x32)
739 v0 := b.NewValue0(v.Pos, OpOr32, typ.UInt32)
740 v1 := b.NewValue0(v.Pos, OpZeromask, typ.UInt32)
741 v2 := b.NewValue0(v.Pos, OpInt64Hi, typ.UInt32)
742 v2.AddArg(y)
743 v1.AddArg(v2)
744 v3 := b.NewValue0(v.Pos, OpInt64Lo, typ.UInt32)
745 v3.AddArg(y)
746 v0.AddArg2(v1, v3)
747 v.AddArg2(x, v0)
748 return true
749 }
750 }
751 func rewriteValuedec64_OpLsh32x64(v *Value) bool {
752 v_1 := v.Args[1]
753 v_0 := v.Args[0]
754 b := v.Block
755 typ := &b.Func.Config.Types
756
757
758
759 for {
760 if v_1.Op != OpInt64Make {
761 break
762 }
763 v_1_0 := v_1.Args[0]
764 if v_1_0.Op != OpConst32 {
765 break
766 }
767 c := auxIntToInt32(v_1_0.AuxInt)
768 if !(c != 0) {
769 break
770 }
771 v.reset(OpConst32)
772 v.AuxInt = int32ToAuxInt(0)
773 return true
774 }
775
776
777 for {
778 c := auxIntToBool(v.AuxInt)
779 x := v_0
780 if v_1.Op != OpInt64Make {
781 break
782 }
783 lo := v_1.Args[1]
784 v_1_0 := v_1.Args[0]
785 if v_1_0.Op != OpConst32 || auxIntToInt32(v_1_0.AuxInt) != 0 {
786 break
787 }
788 v.reset(OpLsh32x32)
789 v.AuxInt = boolToAuxInt(c)
790 v.AddArg2(x, lo)
791 return true
792 }
793
794
795
796 for {
797 x := v_0
798 if v_1.Op != OpInt64Make {
799 break
800 }
801 lo := v_1.Args[1]
802 hi := v_1.Args[0]
803 if !(hi.Op != OpConst32) {
804 break
805 }
806 v.reset(OpLsh32x32)
807 v0 := b.NewValue0(v.Pos, OpOr32, typ.UInt32)
808 v1 := b.NewValue0(v.Pos, OpZeromask, typ.UInt32)
809 v1.AddArg(hi)
810 v0.AddArg2(v1, lo)
811 v.AddArg2(x, v0)
812 return true
813 }
814
815
816 for {
817 x := v_0
818 y := v_1
819 v.reset(OpLsh32x32)
820 v0 := b.NewValue0(v.Pos, OpOr32, typ.UInt32)
821 v1 := b.NewValue0(v.Pos, OpZeromask, typ.UInt32)
822 v2 := b.NewValue0(v.Pos, OpInt64Hi, typ.UInt32)
823 v2.AddArg(y)
824 v1.AddArg(v2)
825 v3 := b.NewValue0(v.Pos, OpInt64Lo, typ.UInt32)
826 v3.AddArg(y)
827 v0.AddArg2(v1, v3)
828 v.AddArg2(x, v0)
829 return true
830 }
831 }
832 func rewriteValuedec64_OpLsh64x16(v *Value) bool {
833 v_1 := v.Args[1]
834 v_0 := v.Args[0]
835 b := v.Block
836 typ := &b.Func.Config.Types
837
838
839 for {
840 x := v_0
841 s := v_1
842 v.reset(OpInt64Make)
843 v0 := b.NewValue0(v.Pos, OpOr32, typ.UInt32)
844 v1 := b.NewValue0(v.Pos, OpOr32, typ.UInt32)
845 v2 := b.NewValue0(v.Pos, OpLsh32x16, typ.UInt32)
846 v3 := b.NewValue0(v.Pos, OpInt64Hi, typ.UInt32)
847 v3.AddArg(x)
848 v2.AddArg2(v3, s)
849 v4 := b.NewValue0(v.Pos, OpRsh32Ux16, typ.UInt32)
850 v5 := b.NewValue0(v.Pos, OpInt64Lo, typ.UInt32)
851 v5.AddArg(x)
852 v6 := b.NewValue0(v.Pos, OpSub16, typ.UInt16)
853 v7 := b.NewValue0(v.Pos, OpConst16, typ.UInt16)
854 v7.AuxInt = int16ToAuxInt(32)
855 v6.AddArg2(v7, s)
856 v4.AddArg2(v5, v6)
857 v1.AddArg2(v2, v4)
858 v8 := b.NewValue0(v.Pos, OpLsh32x16, typ.UInt32)
859 v9 := b.NewValue0(v.Pos, OpSub16, typ.UInt16)
860 v9.AddArg2(s, v7)
861 v8.AddArg2(v5, v9)
862 v0.AddArg2(v1, v8)
863 v10 := b.NewValue0(v.Pos, OpLsh32x16, typ.UInt32)
864 v10.AddArg2(v5, s)
865 v.AddArg2(v0, v10)
866 return true
867 }
868 }
869 func rewriteValuedec64_OpLsh64x32(v *Value) bool {
870 v_1 := v.Args[1]
871 v_0 := v.Args[0]
872 b := v.Block
873 typ := &b.Func.Config.Types
874
875
876 for {
877 x := v_0
878 s := v_1
879 v.reset(OpInt64Make)
880 v0 := b.NewValue0(v.Pos, OpOr32, typ.UInt32)
881 v1 := b.NewValue0(v.Pos, OpOr32, typ.UInt32)
882 v2 := b.NewValue0(v.Pos, OpLsh32x32, typ.UInt32)
883 v3 := b.NewValue0(v.Pos, OpInt64Hi, typ.UInt32)
884 v3.AddArg(x)
885 v2.AddArg2(v3, s)
886 v4 := b.NewValue0(v.Pos, OpRsh32Ux32, typ.UInt32)
887 v5 := b.NewValue0(v.Pos, OpInt64Lo, typ.UInt32)
888 v5.AddArg(x)
889 v6 := b.NewValue0(v.Pos, OpSub32, typ.UInt32)
890 v7 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
891 v7.AuxInt = int32ToAuxInt(32)
892 v6.AddArg2(v7, s)
893 v4.AddArg2(v5, v6)
894 v1.AddArg2(v2, v4)
895 v8 := b.NewValue0(v.Pos, OpLsh32x32, typ.UInt32)
896 v9 := b.NewValue0(v.Pos, OpSub32, typ.UInt32)
897 v9.AddArg2(s, v7)
898 v8.AddArg2(v5, v9)
899 v0.AddArg2(v1, v8)
900 v10 := b.NewValue0(v.Pos, OpLsh32x32, typ.UInt32)
901 v10.AddArg2(v5, s)
902 v.AddArg2(v0, v10)
903 return true
904 }
905 }
906 func rewriteValuedec64_OpLsh64x64(v *Value) bool {
907 v_1 := v.Args[1]
908 v_0 := v.Args[0]
909 b := v.Block
910 typ := &b.Func.Config.Types
911
912
913
914 for {
915 if v_1.Op != OpInt64Make {
916 break
917 }
918 v_1_0 := v_1.Args[0]
919 if v_1_0.Op != OpConst32 {
920 break
921 }
922 c := auxIntToInt32(v_1_0.AuxInt)
923 if !(c != 0) {
924 break
925 }
926 v.reset(OpConst64)
927 v.AuxInt = int64ToAuxInt(0)
928 return true
929 }
930
931
932 for {
933 c := auxIntToBool(v.AuxInt)
934 x := v_0
935 if v_1.Op != OpInt64Make {
936 break
937 }
938 lo := v_1.Args[1]
939 v_1_0 := v_1.Args[0]
940 if v_1_0.Op != OpConst32 || auxIntToInt32(v_1_0.AuxInt) != 0 {
941 break
942 }
943 v.reset(OpLsh64x32)
944 v.AuxInt = boolToAuxInt(c)
945 v.AddArg2(x, lo)
946 return true
947 }
948
949
950
951 for {
952 x := v_0
953 if v_1.Op != OpInt64Make {
954 break
955 }
956 lo := v_1.Args[1]
957 hi := v_1.Args[0]
958 if !(hi.Op != OpConst32) {
959 break
960 }
961 v.reset(OpLsh64x32)
962 v0 := b.NewValue0(v.Pos, OpOr32, typ.UInt32)
963 v1 := b.NewValue0(v.Pos, OpZeromask, typ.UInt32)
964 v1.AddArg(hi)
965 v0.AddArg2(v1, lo)
966 v.AddArg2(x, v0)
967 return true
968 }
969
970
971 for {
972 x := v_0
973 y := v_1
974 v.reset(OpLsh64x32)
975 v0 := b.NewValue0(v.Pos, OpOr32, typ.UInt32)
976 v1 := b.NewValue0(v.Pos, OpZeromask, typ.UInt32)
977 v2 := b.NewValue0(v.Pos, OpInt64Hi, typ.UInt32)
978 v2.AddArg(y)
979 v1.AddArg(v2)
980 v3 := b.NewValue0(v.Pos, OpInt64Lo, typ.UInt32)
981 v3.AddArg(y)
982 v0.AddArg2(v1, v3)
983 v.AddArg2(x, v0)
984 return true
985 }
986 }
987 func rewriteValuedec64_OpLsh64x8(v *Value) bool {
988 v_1 := v.Args[1]
989 v_0 := v.Args[0]
990 b := v.Block
991 typ := &b.Func.Config.Types
992
993
994 for {
995 x := v_0
996 s := v_1
997 v.reset(OpInt64Make)
998 v0 := b.NewValue0(v.Pos, OpOr32, typ.UInt32)
999 v1 := b.NewValue0(v.Pos, OpOr32, typ.UInt32)
1000 v2 := b.NewValue0(v.Pos, OpLsh32x8, typ.UInt32)
1001 v3 := b.NewValue0(v.Pos, OpInt64Hi, typ.UInt32)
1002 v3.AddArg(x)
1003 v2.AddArg2(v3, s)
1004 v4 := b.NewValue0(v.Pos, OpRsh32Ux8, typ.UInt32)
1005 v5 := b.NewValue0(v.Pos, OpInt64Lo, typ.UInt32)
1006 v5.AddArg(x)
1007 v6 := b.NewValue0(v.Pos, OpSub8, typ.UInt8)
1008 v7 := b.NewValue0(v.Pos, OpConst8, typ.UInt8)
1009 v7.AuxInt = int8ToAuxInt(32)
1010 v6.AddArg2(v7, s)
1011 v4.AddArg2(v5, v6)
1012 v1.AddArg2(v2, v4)
1013 v8 := b.NewValue0(v.Pos, OpLsh32x8, typ.UInt32)
1014 v9 := b.NewValue0(v.Pos, OpSub8, typ.UInt8)
1015 v9.AddArg2(s, v7)
1016 v8.AddArg2(v5, v9)
1017 v0.AddArg2(v1, v8)
1018 v10 := b.NewValue0(v.Pos, OpLsh32x8, typ.UInt32)
1019 v10.AddArg2(v5, s)
1020 v.AddArg2(v0, v10)
1021 return true
1022 }
1023 }
1024 func rewriteValuedec64_OpLsh8x64(v *Value) bool {
1025 v_1 := v.Args[1]
1026 v_0 := v.Args[0]
1027 b := v.Block
1028 typ := &b.Func.Config.Types
1029
1030
1031
1032 for {
1033 if v_1.Op != OpInt64Make {
1034 break
1035 }
1036 v_1_0 := v_1.Args[0]
1037 if v_1_0.Op != OpConst32 {
1038 break
1039 }
1040 c := auxIntToInt32(v_1_0.AuxInt)
1041 if !(c != 0) {
1042 break
1043 }
1044 v.reset(OpConst32)
1045 v.AuxInt = int32ToAuxInt(0)
1046 return true
1047 }
1048
1049
1050 for {
1051 c := auxIntToBool(v.AuxInt)
1052 x := v_0
1053 if v_1.Op != OpInt64Make {
1054 break
1055 }
1056 lo := v_1.Args[1]
1057 v_1_0 := v_1.Args[0]
1058 if v_1_0.Op != OpConst32 || auxIntToInt32(v_1_0.AuxInt) != 0 {
1059 break
1060 }
1061 v.reset(OpLsh8x32)
1062 v.AuxInt = boolToAuxInt(c)
1063 v.AddArg2(x, lo)
1064 return true
1065 }
1066
1067
1068
1069 for {
1070 x := v_0
1071 if v_1.Op != OpInt64Make {
1072 break
1073 }
1074 lo := v_1.Args[1]
1075 hi := v_1.Args[0]
1076 if !(hi.Op != OpConst32) {
1077 break
1078 }
1079 v.reset(OpLsh8x32)
1080 v0 := b.NewValue0(v.Pos, OpOr32, typ.UInt32)
1081 v1 := b.NewValue0(v.Pos, OpZeromask, typ.UInt32)
1082 v1.AddArg(hi)
1083 v0.AddArg2(v1, lo)
1084 v.AddArg2(x, v0)
1085 return true
1086 }
1087
1088
1089 for {
1090 x := v_0
1091 y := v_1
1092 v.reset(OpLsh8x32)
1093 v0 := b.NewValue0(v.Pos, OpOr32, typ.UInt32)
1094 v1 := b.NewValue0(v.Pos, OpZeromask, typ.UInt32)
1095 v2 := b.NewValue0(v.Pos, OpInt64Hi, typ.UInt32)
1096 v2.AddArg(y)
1097 v1.AddArg(v2)
1098 v3 := b.NewValue0(v.Pos, OpInt64Lo, typ.UInt32)
1099 v3.AddArg(y)
1100 v0.AddArg2(v1, v3)
1101 v.AddArg2(x, v0)
1102 return true
1103 }
1104 }
1105 func rewriteValuedec64_OpMul64(v *Value) bool {
1106 v_1 := v.Args[1]
1107 v_0 := v.Args[0]
1108 b := v.Block
1109 typ := &b.Func.Config.Types
1110
1111
1112 for {
1113 x := v_0
1114 y := v_1
1115 v.reset(OpInt64Make)
1116 v0 := b.NewValue0(v.Pos, OpAdd32, typ.UInt32)
1117 v1 := b.NewValue0(v.Pos, OpMul32, typ.UInt32)
1118 v2 := b.NewValue0(v.Pos, OpInt64Lo, typ.UInt32)
1119 v2.AddArg(x)
1120 v3 := b.NewValue0(v.Pos, OpInt64Hi, typ.UInt32)
1121 v3.AddArg(y)
1122 v1.AddArg2(v2, v3)
1123 v4 := b.NewValue0(v.Pos, OpAdd32, typ.UInt32)
1124 v5 := b.NewValue0(v.Pos, OpMul32, typ.UInt32)
1125 v6 := b.NewValue0(v.Pos, OpInt64Hi, typ.UInt32)
1126 v6.AddArg(x)
1127 v7 := b.NewValue0(v.Pos, OpInt64Lo, typ.UInt32)
1128 v7.AddArg(y)
1129 v5.AddArg2(v6, v7)
1130 v8 := b.NewValue0(v.Pos, OpSelect0, typ.UInt32)
1131 v9 := b.NewValue0(v.Pos, OpMul32uhilo, types.NewTuple(typ.UInt32, typ.UInt32))
1132 v9.AddArg2(v2, v7)
1133 v8.AddArg(v9)
1134 v4.AddArg2(v5, v8)
1135 v0.AddArg2(v1, v4)
1136 v10 := b.NewValue0(v.Pos, OpSelect1, typ.UInt32)
1137 v10.AddArg(v9)
1138 v.AddArg2(v0, v10)
1139 return true
1140 }
1141 }
1142 func rewriteValuedec64_OpNeg64(v *Value) bool {
1143 v_0 := v.Args[0]
1144 b := v.Block
1145
1146
1147 for {
1148 t := v.Type
1149 x := v_0
1150 v.reset(OpSub64)
1151 v0 := b.NewValue0(v.Pos, OpConst64, t)
1152 v0.AuxInt = int64ToAuxInt(0)
1153 v.AddArg2(v0, x)
1154 return true
1155 }
1156 }
1157 func rewriteValuedec64_OpNeq64(v *Value) bool {
1158 v_1 := v.Args[1]
1159 v_0 := v.Args[0]
1160 b := v.Block
1161 typ := &b.Func.Config.Types
1162
1163
1164 for {
1165 x := v_0
1166 y := v_1
1167 v.reset(OpOrB)
1168 v0 := b.NewValue0(v.Pos, OpNeq32, typ.Bool)
1169 v1 := b.NewValue0(v.Pos, OpInt64Hi, typ.UInt32)
1170 v1.AddArg(x)
1171 v2 := b.NewValue0(v.Pos, OpInt64Hi, typ.UInt32)
1172 v2.AddArg(y)
1173 v0.AddArg2(v1, v2)
1174 v3 := b.NewValue0(v.Pos, OpNeq32, typ.Bool)
1175 v4 := b.NewValue0(v.Pos, OpInt64Lo, typ.UInt32)
1176 v4.AddArg(x)
1177 v5 := b.NewValue0(v.Pos, OpInt64Lo, typ.UInt32)
1178 v5.AddArg(y)
1179 v3.AddArg2(v4, v5)
1180 v.AddArg2(v0, v3)
1181 return true
1182 }
1183 }
1184 func rewriteValuedec64_OpOr32(v *Value) bool {
1185 v_1 := v.Args[1]
1186 v_0 := v.Args[0]
1187 b := v.Block
1188 typ := &b.Func.Config.Types
1189
1190
1191
1192 for {
1193 if v.Type != typ.UInt32 {
1194 break
1195 }
1196 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1197 if v_0.Op != OpZeromask {
1198 continue
1199 }
1200 v_0_0 := v_0.Args[0]
1201 if v_0_0.Op != OpConst32 {
1202 continue
1203 }
1204 c := auxIntToInt32(v_0_0.AuxInt)
1205 y := v_1
1206 if !(c == 0) {
1207 continue
1208 }
1209 v.copyOf(y)
1210 return true
1211 }
1212 break
1213 }
1214
1215
1216
1217 for {
1218 if v.Type != typ.UInt32 {
1219 break
1220 }
1221 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1222 if v_0.Op != OpZeromask {
1223 continue
1224 }
1225 v_0_0 := v_0.Args[0]
1226 if v_0_0.Op != OpConst32 {
1227 continue
1228 }
1229 c := auxIntToInt32(v_0_0.AuxInt)
1230 if !(c != 0) {
1231 continue
1232 }
1233 v.reset(OpConst32)
1234 v.Type = typ.UInt32
1235 v.AuxInt = int32ToAuxInt(-1)
1236 return true
1237 }
1238 break
1239 }
1240 return false
1241 }
1242 func rewriteValuedec64_OpOr64(v *Value) bool {
1243 v_1 := v.Args[1]
1244 v_0 := v.Args[0]
1245 b := v.Block
1246 typ := &b.Func.Config.Types
1247
1248
1249 for {
1250 x := v_0
1251 y := v_1
1252 v.reset(OpInt64Make)
1253 v0 := b.NewValue0(v.Pos, OpOr32, typ.UInt32)
1254 v1 := b.NewValue0(v.Pos, OpInt64Hi, typ.UInt32)
1255 v1.AddArg(x)
1256 v2 := b.NewValue0(v.Pos, OpInt64Hi, typ.UInt32)
1257 v2.AddArg(y)
1258 v0.AddArg2(v1, v2)
1259 v3 := b.NewValue0(v.Pos, OpOr32, typ.UInt32)
1260 v4 := b.NewValue0(v.Pos, OpInt64Lo, typ.UInt32)
1261 v4.AddArg(x)
1262 v5 := b.NewValue0(v.Pos, OpInt64Lo, typ.UInt32)
1263 v5.AddArg(y)
1264 v3.AddArg2(v4, v5)
1265 v.AddArg2(v0, v3)
1266 return true
1267 }
1268 }
1269 func rewriteValuedec64_OpRsh16Ux64(v *Value) bool {
1270 v_1 := v.Args[1]
1271 v_0 := v.Args[0]
1272 b := v.Block
1273 typ := &b.Func.Config.Types
1274
1275
1276
1277 for {
1278 if v_1.Op != OpInt64Make {
1279 break
1280 }
1281 v_1_0 := v_1.Args[0]
1282 if v_1_0.Op != OpConst32 {
1283 break
1284 }
1285 c := auxIntToInt32(v_1_0.AuxInt)
1286 if !(c != 0) {
1287 break
1288 }
1289 v.reset(OpConst32)
1290 v.AuxInt = int32ToAuxInt(0)
1291 return true
1292 }
1293
1294
1295 for {
1296 c := auxIntToBool(v.AuxInt)
1297 x := v_0
1298 if v_1.Op != OpInt64Make {
1299 break
1300 }
1301 lo := v_1.Args[1]
1302 v_1_0 := v_1.Args[0]
1303 if v_1_0.Op != OpConst32 || auxIntToInt32(v_1_0.AuxInt) != 0 {
1304 break
1305 }
1306 v.reset(OpRsh16Ux32)
1307 v.AuxInt = boolToAuxInt(c)
1308 v.AddArg2(x, lo)
1309 return true
1310 }
1311
1312
1313
1314 for {
1315 x := v_0
1316 if v_1.Op != OpInt64Make {
1317 break
1318 }
1319 lo := v_1.Args[1]
1320 hi := v_1.Args[0]
1321 if !(hi.Op != OpConst32) {
1322 break
1323 }
1324 v.reset(OpRsh16Ux32)
1325 v0 := b.NewValue0(v.Pos, OpOr32, typ.UInt32)
1326 v1 := b.NewValue0(v.Pos, OpZeromask, typ.UInt32)
1327 v1.AddArg(hi)
1328 v0.AddArg2(v1, lo)
1329 v.AddArg2(x, v0)
1330 return true
1331 }
1332
1333
1334 for {
1335 x := v_0
1336 y := v_1
1337 v.reset(OpRsh16Ux32)
1338 v0 := b.NewValue0(v.Pos, OpOr32, typ.UInt32)
1339 v1 := b.NewValue0(v.Pos, OpZeromask, typ.UInt32)
1340 v2 := b.NewValue0(v.Pos, OpInt64Hi, typ.UInt32)
1341 v2.AddArg(y)
1342 v1.AddArg(v2)
1343 v3 := b.NewValue0(v.Pos, OpInt64Lo, typ.UInt32)
1344 v3.AddArg(y)
1345 v0.AddArg2(v1, v3)
1346 v.AddArg2(x, v0)
1347 return true
1348 }
1349 }
1350 func rewriteValuedec64_OpRsh16x64(v *Value) bool {
1351 v_1 := v.Args[1]
1352 v_0 := v.Args[0]
1353 b := v.Block
1354 typ := &b.Func.Config.Types
1355
1356
1357
1358 for {
1359 x := v_0
1360 if v_1.Op != OpInt64Make {
1361 break
1362 }
1363 v_1_0 := v_1.Args[0]
1364 if v_1_0.Op != OpConst32 {
1365 break
1366 }
1367 c := auxIntToInt32(v_1_0.AuxInt)
1368 if !(c != 0) {
1369 break
1370 }
1371 v.reset(OpSignmask)
1372 v0 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
1373 v0.AddArg(x)
1374 v.AddArg(v0)
1375 return true
1376 }
1377
1378
1379 for {
1380 c := auxIntToBool(v.AuxInt)
1381 x := v_0
1382 if v_1.Op != OpInt64Make {
1383 break
1384 }
1385 lo := v_1.Args[1]
1386 v_1_0 := v_1.Args[0]
1387 if v_1_0.Op != OpConst32 || auxIntToInt32(v_1_0.AuxInt) != 0 {
1388 break
1389 }
1390 v.reset(OpRsh16x32)
1391 v.AuxInt = boolToAuxInt(c)
1392 v.AddArg2(x, lo)
1393 return true
1394 }
1395
1396
1397
1398 for {
1399 x := v_0
1400 if v_1.Op != OpInt64Make {
1401 break
1402 }
1403 lo := v_1.Args[1]
1404 hi := v_1.Args[0]
1405 if !(hi.Op != OpConst32) {
1406 break
1407 }
1408 v.reset(OpRsh16x32)
1409 v0 := b.NewValue0(v.Pos, OpOr32, typ.UInt32)
1410 v1 := b.NewValue0(v.Pos, OpZeromask, typ.UInt32)
1411 v1.AddArg(hi)
1412 v0.AddArg2(v1, lo)
1413 v.AddArg2(x, v0)
1414 return true
1415 }
1416
1417
1418 for {
1419 x := v_0
1420 y := v_1
1421 v.reset(OpRsh16x32)
1422 v0 := b.NewValue0(v.Pos, OpOr32, typ.UInt32)
1423 v1 := b.NewValue0(v.Pos, OpZeromask, typ.UInt32)
1424 v2 := b.NewValue0(v.Pos, OpInt64Hi, typ.UInt32)
1425 v2.AddArg(y)
1426 v1.AddArg(v2)
1427 v3 := b.NewValue0(v.Pos, OpInt64Lo, typ.UInt32)
1428 v3.AddArg(y)
1429 v0.AddArg2(v1, v3)
1430 v.AddArg2(x, v0)
1431 return true
1432 }
1433 }
1434 func rewriteValuedec64_OpRsh32Ux64(v *Value) bool {
1435 v_1 := v.Args[1]
1436 v_0 := v.Args[0]
1437 b := v.Block
1438 typ := &b.Func.Config.Types
1439
1440
1441
1442 for {
1443 if v_1.Op != OpInt64Make {
1444 break
1445 }
1446 v_1_0 := v_1.Args[0]
1447 if v_1_0.Op != OpConst32 {
1448 break
1449 }
1450 c := auxIntToInt32(v_1_0.AuxInt)
1451 if !(c != 0) {
1452 break
1453 }
1454 v.reset(OpConst32)
1455 v.AuxInt = int32ToAuxInt(0)
1456 return true
1457 }
1458
1459
1460 for {
1461 c := auxIntToBool(v.AuxInt)
1462 x := v_0
1463 if v_1.Op != OpInt64Make {
1464 break
1465 }
1466 lo := v_1.Args[1]
1467 v_1_0 := v_1.Args[0]
1468 if v_1_0.Op != OpConst32 || auxIntToInt32(v_1_0.AuxInt) != 0 {
1469 break
1470 }
1471 v.reset(OpRsh32Ux32)
1472 v.AuxInt = boolToAuxInt(c)
1473 v.AddArg2(x, lo)
1474 return true
1475 }
1476
1477
1478
1479 for {
1480 x := v_0
1481 if v_1.Op != OpInt64Make {
1482 break
1483 }
1484 lo := v_1.Args[1]
1485 hi := v_1.Args[0]
1486 if !(hi.Op != OpConst32) {
1487 break
1488 }
1489 v.reset(OpRsh32Ux32)
1490 v0 := b.NewValue0(v.Pos, OpOr32, typ.UInt32)
1491 v1 := b.NewValue0(v.Pos, OpZeromask, typ.UInt32)
1492 v1.AddArg(hi)
1493 v0.AddArg2(v1, lo)
1494 v.AddArg2(x, v0)
1495 return true
1496 }
1497
1498
1499 for {
1500 x := v_0
1501 y := v_1
1502 v.reset(OpRsh32Ux32)
1503 v0 := b.NewValue0(v.Pos, OpOr32, typ.UInt32)
1504 v1 := b.NewValue0(v.Pos, OpZeromask, typ.UInt32)
1505 v2 := b.NewValue0(v.Pos, OpInt64Hi, typ.UInt32)
1506 v2.AddArg(y)
1507 v1.AddArg(v2)
1508 v3 := b.NewValue0(v.Pos, OpInt64Lo, typ.UInt32)
1509 v3.AddArg(y)
1510 v0.AddArg2(v1, v3)
1511 v.AddArg2(x, v0)
1512 return true
1513 }
1514 }
1515 func rewriteValuedec64_OpRsh32x64(v *Value) bool {
1516 v_1 := v.Args[1]
1517 v_0 := v.Args[0]
1518 b := v.Block
1519 typ := &b.Func.Config.Types
1520
1521
1522
1523 for {
1524 x := v_0
1525 if v_1.Op != OpInt64Make {
1526 break
1527 }
1528 v_1_0 := v_1.Args[0]
1529 if v_1_0.Op != OpConst32 {
1530 break
1531 }
1532 c := auxIntToInt32(v_1_0.AuxInt)
1533 if !(c != 0) {
1534 break
1535 }
1536 v.reset(OpSignmask)
1537 v.AddArg(x)
1538 return true
1539 }
1540
1541
1542 for {
1543 c := auxIntToBool(v.AuxInt)
1544 x := v_0
1545 if v_1.Op != OpInt64Make {
1546 break
1547 }
1548 lo := v_1.Args[1]
1549 v_1_0 := v_1.Args[0]
1550 if v_1_0.Op != OpConst32 || auxIntToInt32(v_1_0.AuxInt) != 0 {
1551 break
1552 }
1553 v.reset(OpRsh32x32)
1554 v.AuxInt = boolToAuxInt(c)
1555 v.AddArg2(x, lo)
1556 return true
1557 }
1558
1559
1560
1561 for {
1562 x := v_0
1563 if v_1.Op != OpInt64Make {
1564 break
1565 }
1566 lo := v_1.Args[1]
1567 hi := v_1.Args[0]
1568 if !(hi.Op != OpConst32) {
1569 break
1570 }
1571 v.reset(OpRsh32x32)
1572 v0 := b.NewValue0(v.Pos, OpOr32, typ.UInt32)
1573 v1 := b.NewValue0(v.Pos, OpZeromask, typ.UInt32)
1574 v1.AddArg(hi)
1575 v0.AddArg2(v1, lo)
1576 v.AddArg2(x, v0)
1577 return true
1578 }
1579
1580
1581 for {
1582 x := v_0
1583 y := v_1
1584 v.reset(OpRsh32x32)
1585 v0 := b.NewValue0(v.Pos, OpOr32, typ.UInt32)
1586 v1 := b.NewValue0(v.Pos, OpZeromask, typ.UInt32)
1587 v2 := b.NewValue0(v.Pos, OpInt64Hi, typ.UInt32)
1588 v2.AddArg(y)
1589 v1.AddArg(v2)
1590 v3 := b.NewValue0(v.Pos, OpInt64Lo, typ.UInt32)
1591 v3.AddArg(y)
1592 v0.AddArg2(v1, v3)
1593 v.AddArg2(x, v0)
1594 return true
1595 }
1596 }
1597 func rewriteValuedec64_OpRsh64Ux16(v *Value) bool {
1598 v_1 := v.Args[1]
1599 v_0 := v.Args[0]
1600 b := v.Block
1601 typ := &b.Func.Config.Types
1602
1603
1604 for {
1605 x := v_0
1606 s := v_1
1607 v.reset(OpInt64Make)
1608 v0 := b.NewValue0(v.Pos, OpRsh32Ux16, typ.UInt32)
1609 v1 := b.NewValue0(v.Pos, OpInt64Hi, typ.UInt32)
1610 v1.AddArg(x)
1611 v0.AddArg2(v1, s)
1612 v2 := b.NewValue0(v.Pos, OpOr32, typ.UInt32)
1613 v3 := b.NewValue0(v.Pos, OpOr32, typ.UInt32)
1614 v4 := b.NewValue0(v.Pos, OpRsh32Ux16, typ.UInt32)
1615 v5 := b.NewValue0(v.Pos, OpInt64Lo, typ.UInt32)
1616 v5.AddArg(x)
1617 v4.AddArg2(v5, s)
1618 v6 := b.NewValue0(v.Pos, OpLsh32x16, typ.UInt32)
1619 v7 := b.NewValue0(v.Pos, OpSub16, typ.UInt16)
1620 v8 := b.NewValue0(v.Pos, OpConst16, typ.UInt16)
1621 v8.AuxInt = int16ToAuxInt(32)
1622 v7.AddArg2(v8, s)
1623 v6.AddArg2(v1, v7)
1624 v3.AddArg2(v4, v6)
1625 v9 := b.NewValue0(v.Pos, OpRsh32Ux16, typ.UInt32)
1626 v10 := b.NewValue0(v.Pos, OpSub16, typ.UInt16)
1627 v10.AddArg2(s, v8)
1628 v9.AddArg2(v1, v10)
1629 v2.AddArg2(v3, v9)
1630 v.AddArg2(v0, v2)
1631 return true
1632 }
1633 }
1634 func rewriteValuedec64_OpRsh64Ux32(v *Value) bool {
1635 v_1 := v.Args[1]
1636 v_0 := v.Args[0]
1637 b := v.Block
1638 typ := &b.Func.Config.Types
1639
1640
1641 for {
1642 x := v_0
1643 s := v_1
1644 v.reset(OpInt64Make)
1645 v0 := b.NewValue0(v.Pos, OpRsh32Ux32, typ.UInt32)
1646 v1 := b.NewValue0(v.Pos, OpInt64Hi, typ.UInt32)
1647 v1.AddArg(x)
1648 v0.AddArg2(v1, s)
1649 v2 := b.NewValue0(v.Pos, OpOr32, typ.UInt32)
1650 v3 := b.NewValue0(v.Pos, OpOr32, typ.UInt32)
1651 v4 := b.NewValue0(v.Pos, OpRsh32Ux32, typ.UInt32)
1652 v5 := b.NewValue0(v.Pos, OpInt64Lo, typ.UInt32)
1653 v5.AddArg(x)
1654 v4.AddArg2(v5, s)
1655 v6 := b.NewValue0(v.Pos, OpLsh32x32, typ.UInt32)
1656 v7 := b.NewValue0(v.Pos, OpSub32, typ.UInt32)
1657 v8 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
1658 v8.AuxInt = int32ToAuxInt(32)
1659 v7.AddArg2(v8, s)
1660 v6.AddArg2(v1, v7)
1661 v3.AddArg2(v4, v6)
1662 v9 := b.NewValue0(v.Pos, OpRsh32Ux32, typ.UInt32)
1663 v10 := b.NewValue0(v.Pos, OpSub32, typ.UInt32)
1664 v10.AddArg2(s, v8)
1665 v9.AddArg2(v1, v10)
1666 v2.AddArg2(v3, v9)
1667 v.AddArg2(v0, v2)
1668 return true
1669 }
1670 }
1671 func rewriteValuedec64_OpRsh64Ux64(v *Value) bool {
1672 v_1 := v.Args[1]
1673 v_0 := v.Args[0]
1674 b := v.Block
1675 typ := &b.Func.Config.Types
1676
1677
1678
1679 for {
1680 if v_1.Op != OpInt64Make {
1681 break
1682 }
1683 v_1_0 := v_1.Args[0]
1684 if v_1_0.Op != OpConst32 {
1685 break
1686 }
1687 c := auxIntToInt32(v_1_0.AuxInt)
1688 if !(c != 0) {
1689 break
1690 }
1691 v.reset(OpConst64)
1692 v.AuxInt = int64ToAuxInt(0)
1693 return true
1694 }
1695
1696
1697 for {
1698 c := auxIntToBool(v.AuxInt)
1699 x := v_0
1700 if v_1.Op != OpInt64Make {
1701 break
1702 }
1703 lo := v_1.Args[1]
1704 v_1_0 := v_1.Args[0]
1705 if v_1_0.Op != OpConst32 || auxIntToInt32(v_1_0.AuxInt) != 0 {
1706 break
1707 }
1708 v.reset(OpRsh64Ux32)
1709 v.AuxInt = boolToAuxInt(c)
1710 v.AddArg2(x, lo)
1711 return true
1712 }
1713
1714
1715
1716 for {
1717 x := v_0
1718 if v_1.Op != OpInt64Make {
1719 break
1720 }
1721 lo := v_1.Args[1]
1722 hi := v_1.Args[0]
1723 if !(hi.Op != OpConst32) {
1724 break
1725 }
1726 v.reset(OpRsh64Ux32)
1727 v0 := b.NewValue0(v.Pos, OpOr32, typ.UInt32)
1728 v1 := b.NewValue0(v.Pos, OpZeromask, typ.UInt32)
1729 v1.AddArg(hi)
1730 v0.AddArg2(v1, lo)
1731 v.AddArg2(x, v0)
1732 return true
1733 }
1734
1735
1736 for {
1737 x := v_0
1738 y := v_1
1739 v.reset(OpRsh64Ux32)
1740 v0 := b.NewValue0(v.Pos, OpOr32, typ.UInt32)
1741 v1 := b.NewValue0(v.Pos, OpZeromask, typ.UInt32)
1742 v2 := b.NewValue0(v.Pos, OpInt64Hi, typ.UInt32)
1743 v2.AddArg(y)
1744 v1.AddArg(v2)
1745 v3 := b.NewValue0(v.Pos, OpInt64Lo, typ.UInt32)
1746 v3.AddArg(y)
1747 v0.AddArg2(v1, v3)
1748 v.AddArg2(x, v0)
1749 return true
1750 }
1751 }
1752 func rewriteValuedec64_OpRsh64Ux8(v *Value) bool {
1753 v_1 := v.Args[1]
1754 v_0 := v.Args[0]
1755 b := v.Block
1756 typ := &b.Func.Config.Types
1757
1758
1759 for {
1760 x := v_0
1761 s := v_1
1762 v.reset(OpInt64Make)
1763 v0 := b.NewValue0(v.Pos, OpRsh32Ux8, typ.UInt32)
1764 v1 := b.NewValue0(v.Pos, OpInt64Hi, typ.UInt32)
1765 v1.AddArg(x)
1766 v0.AddArg2(v1, s)
1767 v2 := b.NewValue0(v.Pos, OpOr32, typ.UInt32)
1768 v3 := b.NewValue0(v.Pos, OpOr32, typ.UInt32)
1769 v4 := b.NewValue0(v.Pos, OpRsh32Ux8, typ.UInt32)
1770 v5 := b.NewValue0(v.Pos, OpInt64Lo, typ.UInt32)
1771 v5.AddArg(x)
1772 v4.AddArg2(v5, s)
1773 v6 := b.NewValue0(v.Pos, OpLsh32x8, typ.UInt32)
1774 v7 := b.NewValue0(v.Pos, OpSub8, typ.UInt8)
1775 v8 := b.NewValue0(v.Pos, OpConst8, typ.UInt8)
1776 v8.AuxInt = int8ToAuxInt(32)
1777 v7.AddArg2(v8, s)
1778 v6.AddArg2(v1, v7)
1779 v3.AddArg2(v4, v6)
1780 v9 := b.NewValue0(v.Pos, OpRsh32Ux8, typ.UInt32)
1781 v10 := b.NewValue0(v.Pos, OpSub8, typ.UInt8)
1782 v10.AddArg2(s, v8)
1783 v9.AddArg2(v1, v10)
1784 v2.AddArg2(v3, v9)
1785 v.AddArg2(v0, v2)
1786 return true
1787 }
1788 }
1789 func rewriteValuedec64_OpRsh64x16(v *Value) bool {
1790 v_1 := v.Args[1]
1791 v_0 := v.Args[0]
1792 b := v.Block
1793 typ := &b.Func.Config.Types
1794
1795
1796 for {
1797 x := v_0
1798 s := v_1
1799 v.reset(OpInt64Make)
1800 v0 := b.NewValue0(v.Pos, OpRsh32x16, typ.UInt32)
1801 v1 := b.NewValue0(v.Pos, OpInt64Hi, typ.UInt32)
1802 v1.AddArg(x)
1803 v0.AddArg2(v1, s)
1804 v2 := b.NewValue0(v.Pos, OpOr32, typ.UInt32)
1805 v3 := b.NewValue0(v.Pos, OpOr32, typ.UInt32)
1806 v4 := b.NewValue0(v.Pos, OpRsh32Ux16, typ.UInt32)
1807 v5 := b.NewValue0(v.Pos, OpInt64Lo, typ.UInt32)
1808 v5.AddArg(x)
1809 v4.AddArg2(v5, s)
1810 v6 := b.NewValue0(v.Pos, OpLsh32x16, typ.UInt32)
1811 v7 := b.NewValue0(v.Pos, OpSub16, typ.UInt16)
1812 v8 := b.NewValue0(v.Pos, OpConst16, typ.UInt16)
1813 v8.AuxInt = int16ToAuxInt(32)
1814 v7.AddArg2(v8, s)
1815 v6.AddArg2(v1, v7)
1816 v3.AddArg2(v4, v6)
1817 v9 := b.NewValue0(v.Pos, OpAnd32, typ.UInt32)
1818 v10 := b.NewValue0(v.Pos, OpRsh32x16, typ.UInt32)
1819 v11 := b.NewValue0(v.Pos, OpSub16, typ.UInt16)
1820 v11.AddArg2(s, v8)
1821 v10.AddArg2(v1, v11)
1822 v12 := b.NewValue0(v.Pos, OpZeromask, typ.UInt32)
1823 v13 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
1824 v14 := b.NewValue0(v.Pos, OpRsh16Ux32, typ.UInt16)
1825 v15 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
1826 v15.AuxInt = int32ToAuxInt(5)
1827 v14.AddArg2(s, v15)
1828 v13.AddArg(v14)
1829 v12.AddArg(v13)
1830 v9.AddArg2(v10, v12)
1831 v2.AddArg2(v3, v9)
1832 v.AddArg2(v0, v2)
1833 return true
1834 }
1835 }
1836 func rewriteValuedec64_OpRsh64x32(v *Value) bool {
1837 v_1 := v.Args[1]
1838 v_0 := v.Args[0]
1839 b := v.Block
1840 typ := &b.Func.Config.Types
1841
1842
1843 for {
1844 x := v_0
1845 s := v_1
1846 v.reset(OpInt64Make)
1847 v0 := b.NewValue0(v.Pos, OpRsh32x32, typ.UInt32)
1848 v1 := b.NewValue0(v.Pos, OpInt64Hi, typ.UInt32)
1849 v1.AddArg(x)
1850 v0.AddArg2(v1, s)
1851 v2 := b.NewValue0(v.Pos, OpOr32, typ.UInt32)
1852 v3 := b.NewValue0(v.Pos, OpOr32, typ.UInt32)
1853 v4 := b.NewValue0(v.Pos, OpRsh32Ux32, typ.UInt32)
1854 v5 := b.NewValue0(v.Pos, OpInt64Lo, typ.UInt32)
1855 v5.AddArg(x)
1856 v4.AddArg2(v5, s)
1857 v6 := b.NewValue0(v.Pos, OpLsh32x32, typ.UInt32)
1858 v7 := b.NewValue0(v.Pos, OpSub32, typ.UInt32)
1859 v8 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
1860 v8.AuxInt = int32ToAuxInt(32)
1861 v7.AddArg2(v8, s)
1862 v6.AddArg2(v1, v7)
1863 v3.AddArg2(v4, v6)
1864 v9 := b.NewValue0(v.Pos, OpAnd32, typ.UInt32)
1865 v10 := b.NewValue0(v.Pos, OpRsh32x32, typ.UInt32)
1866 v11 := b.NewValue0(v.Pos, OpSub32, typ.UInt32)
1867 v11.AddArg2(s, v8)
1868 v10.AddArg2(v1, v11)
1869 v12 := b.NewValue0(v.Pos, OpZeromask, typ.UInt32)
1870 v13 := b.NewValue0(v.Pos, OpRsh32Ux32, typ.UInt32)
1871 v14 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
1872 v14.AuxInt = int32ToAuxInt(5)
1873 v13.AddArg2(s, v14)
1874 v12.AddArg(v13)
1875 v9.AddArg2(v10, v12)
1876 v2.AddArg2(v3, v9)
1877 v.AddArg2(v0, v2)
1878 return true
1879 }
1880 }
1881 func rewriteValuedec64_OpRsh64x64(v *Value) bool {
1882 v_1 := v.Args[1]
1883 v_0 := v.Args[0]
1884 b := v.Block
1885 typ := &b.Func.Config.Types
1886
1887
1888
1889 for {
1890 x := v_0
1891 if v_1.Op != OpInt64Make {
1892 break
1893 }
1894 v_1_0 := v_1.Args[0]
1895 if v_1_0.Op != OpConst32 {
1896 break
1897 }
1898 c := auxIntToInt32(v_1_0.AuxInt)
1899 if !(c != 0) {
1900 break
1901 }
1902 v.reset(OpInt64Make)
1903 v0 := b.NewValue0(v.Pos, OpSignmask, typ.Int32)
1904 v1 := b.NewValue0(v.Pos, OpInt64Hi, typ.UInt32)
1905 v1.AddArg(x)
1906 v0.AddArg(v1)
1907 v.AddArg2(v0, v0)
1908 return true
1909 }
1910
1911
1912 for {
1913 c := auxIntToBool(v.AuxInt)
1914 x := v_0
1915 if v_1.Op != OpInt64Make {
1916 break
1917 }
1918 lo := v_1.Args[1]
1919 v_1_0 := v_1.Args[0]
1920 if v_1_0.Op != OpConst32 || auxIntToInt32(v_1_0.AuxInt) != 0 {
1921 break
1922 }
1923 v.reset(OpRsh64x32)
1924 v.AuxInt = boolToAuxInt(c)
1925 v.AddArg2(x, lo)
1926 return true
1927 }
1928
1929
1930
1931 for {
1932 x := v_0
1933 if v_1.Op != OpInt64Make {
1934 break
1935 }
1936 lo := v_1.Args[1]
1937 hi := v_1.Args[0]
1938 if !(hi.Op != OpConst32) {
1939 break
1940 }
1941 v.reset(OpRsh64x32)
1942 v0 := b.NewValue0(v.Pos, OpOr32, typ.UInt32)
1943 v1 := b.NewValue0(v.Pos, OpZeromask, typ.UInt32)
1944 v1.AddArg(hi)
1945 v0.AddArg2(v1, lo)
1946 v.AddArg2(x, v0)
1947 return true
1948 }
1949
1950
1951 for {
1952 x := v_0
1953 y := v_1
1954 v.reset(OpRsh64x32)
1955 v0 := b.NewValue0(v.Pos, OpOr32, typ.UInt32)
1956 v1 := b.NewValue0(v.Pos, OpZeromask, typ.UInt32)
1957 v2 := b.NewValue0(v.Pos, OpInt64Hi, typ.UInt32)
1958 v2.AddArg(y)
1959 v1.AddArg(v2)
1960 v3 := b.NewValue0(v.Pos, OpInt64Lo, typ.UInt32)
1961 v3.AddArg(y)
1962 v0.AddArg2(v1, v3)
1963 v.AddArg2(x, v0)
1964 return true
1965 }
1966 }
1967 func rewriteValuedec64_OpRsh64x8(v *Value) bool {
1968 v_1 := v.Args[1]
1969 v_0 := v.Args[0]
1970 b := v.Block
1971 typ := &b.Func.Config.Types
1972
1973
1974 for {
1975 x := v_0
1976 s := v_1
1977 v.reset(OpInt64Make)
1978 v0 := b.NewValue0(v.Pos, OpRsh32x8, typ.UInt32)
1979 v1 := b.NewValue0(v.Pos, OpInt64Hi, typ.UInt32)
1980 v1.AddArg(x)
1981 v0.AddArg2(v1, s)
1982 v2 := b.NewValue0(v.Pos, OpOr32, typ.UInt32)
1983 v3 := b.NewValue0(v.Pos, OpOr32, typ.UInt32)
1984 v4 := b.NewValue0(v.Pos, OpRsh32Ux8, typ.UInt32)
1985 v5 := b.NewValue0(v.Pos, OpInt64Lo, typ.UInt32)
1986 v5.AddArg(x)
1987 v4.AddArg2(v5, s)
1988 v6 := b.NewValue0(v.Pos, OpLsh32x8, typ.UInt32)
1989 v7 := b.NewValue0(v.Pos, OpSub8, typ.UInt8)
1990 v8 := b.NewValue0(v.Pos, OpConst8, typ.UInt8)
1991 v8.AuxInt = int8ToAuxInt(32)
1992 v7.AddArg2(v8, s)
1993 v6.AddArg2(v1, v7)
1994 v3.AddArg2(v4, v6)
1995 v9 := b.NewValue0(v.Pos, OpAnd32, typ.UInt32)
1996 v10 := b.NewValue0(v.Pos, OpRsh32x8, typ.UInt32)
1997 v11 := b.NewValue0(v.Pos, OpSub8, typ.UInt8)
1998 v11.AddArg2(s, v8)
1999 v10.AddArg2(v1, v11)
2000 v12 := b.NewValue0(v.Pos, OpZeromask, typ.UInt32)
2001 v13 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
2002 v14 := b.NewValue0(v.Pos, OpRsh8Ux32, typ.UInt8)
2003 v15 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
2004 v15.AuxInt = int32ToAuxInt(5)
2005 v14.AddArg2(s, v15)
2006 v13.AddArg(v14)
2007 v12.AddArg(v13)
2008 v9.AddArg2(v10, v12)
2009 v2.AddArg2(v3, v9)
2010 v.AddArg2(v0, v2)
2011 return true
2012 }
2013 }
2014 func rewriteValuedec64_OpRsh8Ux64(v *Value) bool {
2015 v_1 := v.Args[1]
2016 v_0 := v.Args[0]
2017 b := v.Block
2018 typ := &b.Func.Config.Types
2019
2020
2021
2022 for {
2023 if v_1.Op != OpInt64Make {
2024 break
2025 }
2026 v_1_0 := v_1.Args[0]
2027 if v_1_0.Op != OpConst32 {
2028 break
2029 }
2030 c := auxIntToInt32(v_1_0.AuxInt)
2031 if !(c != 0) {
2032 break
2033 }
2034 v.reset(OpConst32)
2035 v.AuxInt = int32ToAuxInt(0)
2036 return true
2037 }
2038
2039
2040 for {
2041 c := auxIntToBool(v.AuxInt)
2042 x := v_0
2043 if v_1.Op != OpInt64Make {
2044 break
2045 }
2046 lo := v_1.Args[1]
2047 v_1_0 := v_1.Args[0]
2048 if v_1_0.Op != OpConst32 || auxIntToInt32(v_1_0.AuxInt) != 0 {
2049 break
2050 }
2051 v.reset(OpRsh8Ux32)
2052 v.AuxInt = boolToAuxInt(c)
2053 v.AddArg2(x, lo)
2054 return true
2055 }
2056
2057
2058
2059 for {
2060 x := v_0
2061 if v_1.Op != OpInt64Make {
2062 break
2063 }
2064 lo := v_1.Args[1]
2065 hi := v_1.Args[0]
2066 if !(hi.Op != OpConst32) {
2067 break
2068 }
2069 v.reset(OpRsh8Ux32)
2070 v0 := b.NewValue0(v.Pos, OpOr32, typ.UInt32)
2071 v1 := b.NewValue0(v.Pos, OpZeromask, typ.UInt32)
2072 v1.AddArg(hi)
2073 v0.AddArg2(v1, lo)
2074 v.AddArg2(x, v0)
2075 return true
2076 }
2077
2078
2079 for {
2080 x := v_0
2081 y := v_1
2082 v.reset(OpRsh8Ux32)
2083 v0 := b.NewValue0(v.Pos, OpOr32, typ.UInt32)
2084 v1 := b.NewValue0(v.Pos, OpZeromask, typ.UInt32)
2085 v2 := b.NewValue0(v.Pos, OpInt64Hi, typ.UInt32)
2086 v2.AddArg(y)
2087 v1.AddArg(v2)
2088 v3 := b.NewValue0(v.Pos, OpInt64Lo, typ.UInt32)
2089 v3.AddArg(y)
2090 v0.AddArg2(v1, v3)
2091 v.AddArg2(x, v0)
2092 return true
2093 }
2094 }
2095 func rewriteValuedec64_OpRsh8x64(v *Value) bool {
2096 v_1 := v.Args[1]
2097 v_0 := v.Args[0]
2098 b := v.Block
2099 typ := &b.Func.Config.Types
2100
2101
2102
2103 for {
2104 x := v_0
2105 if v_1.Op != OpInt64Make {
2106 break
2107 }
2108 v_1_0 := v_1.Args[0]
2109 if v_1_0.Op != OpConst32 {
2110 break
2111 }
2112 c := auxIntToInt32(v_1_0.AuxInt)
2113 if !(c != 0) {
2114 break
2115 }
2116 v.reset(OpSignmask)
2117 v0 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
2118 v0.AddArg(x)
2119 v.AddArg(v0)
2120 return true
2121 }
2122
2123
2124 for {
2125 c := auxIntToBool(v.AuxInt)
2126 x := v_0
2127 if v_1.Op != OpInt64Make {
2128 break
2129 }
2130 lo := v_1.Args[1]
2131 v_1_0 := v_1.Args[0]
2132 if v_1_0.Op != OpConst32 || auxIntToInt32(v_1_0.AuxInt) != 0 {
2133 break
2134 }
2135 v.reset(OpRsh8x32)
2136 v.AuxInt = boolToAuxInt(c)
2137 v.AddArg2(x, lo)
2138 return true
2139 }
2140
2141
2142
2143 for {
2144 x := v_0
2145 if v_1.Op != OpInt64Make {
2146 break
2147 }
2148 lo := v_1.Args[1]
2149 hi := v_1.Args[0]
2150 if !(hi.Op != OpConst32) {
2151 break
2152 }
2153 v.reset(OpRsh8x32)
2154 v0 := b.NewValue0(v.Pos, OpOr32, typ.UInt32)
2155 v1 := b.NewValue0(v.Pos, OpZeromask, typ.UInt32)
2156 v1.AddArg(hi)
2157 v0.AddArg2(v1, lo)
2158 v.AddArg2(x, v0)
2159 return true
2160 }
2161
2162
2163 for {
2164 x := v_0
2165 y := v_1
2166 v.reset(OpRsh8x32)
2167 v0 := b.NewValue0(v.Pos, OpOr32, typ.UInt32)
2168 v1 := b.NewValue0(v.Pos, OpZeromask, typ.UInt32)
2169 v2 := b.NewValue0(v.Pos, OpInt64Hi, typ.UInt32)
2170 v2.AddArg(y)
2171 v1.AddArg(v2)
2172 v3 := b.NewValue0(v.Pos, OpInt64Lo, typ.UInt32)
2173 v3.AddArg(y)
2174 v0.AddArg2(v1, v3)
2175 v.AddArg2(x, v0)
2176 return true
2177 }
2178 }
2179 func rewriteValuedec64_OpSignExt16to64(v *Value) bool {
2180 v_0 := v.Args[0]
2181 b := v.Block
2182 typ := &b.Func.Config.Types
2183
2184
2185 for {
2186 x := v_0
2187 v.reset(OpSignExt32to64)
2188 v0 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
2189 v0.AddArg(x)
2190 v.AddArg(v0)
2191 return true
2192 }
2193 }
2194 func rewriteValuedec64_OpSignExt32to64(v *Value) bool {
2195 v_0 := v.Args[0]
2196 b := v.Block
2197 typ := &b.Func.Config.Types
2198
2199
2200 for {
2201 x := v_0
2202 v.reset(OpInt64Make)
2203 v0 := b.NewValue0(v.Pos, OpSignmask, typ.Int32)
2204 v0.AddArg(x)
2205 v.AddArg2(v0, x)
2206 return true
2207 }
2208 }
2209 func rewriteValuedec64_OpSignExt8to64(v *Value) bool {
2210 v_0 := v.Args[0]
2211 b := v.Block
2212 typ := &b.Func.Config.Types
2213
2214
2215 for {
2216 x := v_0
2217 v.reset(OpSignExt32to64)
2218 v0 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
2219 v0.AddArg(x)
2220 v.AddArg(v0)
2221 return true
2222 }
2223 }
2224 func rewriteValuedec64_OpStore(v *Value) bool {
2225 v_2 := v.Args[2]
2226 v_1 := v.Args[1]
2227 v_0 := v.Args[0]
2228 b := v.Block
2229 config := b.Func.Config
2230
2231
2232
2233 for {
2234 t := auxToType(v.Aux)
2235 dst := v_0
2236 if v_1.Op != OpInt64Make {
2237 break
2238 }
2239 lo := v_1.Args[1]
2240 hi := v_1.Args[0]
2241 mem := v_2
2242 if !(t.Size() == 8 && !config.BigEndian) {
2243 break
2244 }
2245 v.reset(OpStore)
2246 v.Aux = typeToAux(hi.Type)
2247 v0 := b.NewValue0(v.Pos, OpOffPtr, hi.Type.PtrTo())
2248 v0.AuxInt = int64ToAuxInt(4)
2249 v0.AddArg(dst)
2250 v1 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
2251 v1.Aux = typeToAux(lo.Type)
2252 v1.AddArg3(dst, lo, mem)
2253 v.AddArg3(v0, hi, v1)
2254 return true
2255 }
2256
2257
2258
2259 for {
2260 t := auxToType(v.Aux)
2261 dst := v_0
2262 if v_1.Op != OpInt64Make {
2263 break
2264 }
2265 lo := v_1.Args[1]
2266 hi := v_1.Args[0]
2267 mem := v_2
2268 if !(t.Size() == 8 && config.BigEndian) {
2269 break
2270 }
2271 v.reset(OpStore)
2272 v.Aux = typeToAux(lo.Type)
2273 v0 := b.NewValue0(v.Pos, OpOffPtr, lo.Type.PtrTo())
2274 v0.AuxInt = int64ToAuxInt(4)
2275 v0.AddArg(dst)
2276 v1 := b.NewValue0(v.Pos, OpStore, types.TypeMem)
2277 v1.Aux = typeToAux(hi.Type)
2278 v1.AddArg3(dst, hi, mem)
2279 v.AddArg3(v0, lo, v1)
2280 return true
2281 }
2282 return false
2283 }
2284 func rewriteValuedec64_OpSub64(v *Value) bool {
2285 v_1 := v.Args[1]
2286 v_0 := v.Args[0]
2287 b := v.Block
2288 typ := &b.Func.Config.Types
2289
2290
2291 for {
2292 x := v_0
2293 y := v_1
2294 v.reset(OpInt64Make)
2295 v0 := b.NewValue0(v.Pos, OpSub32withcarry, typ.Int32)
2296 v1 := b.NewValue0(v.Pos, OpInt64Hi, typ.UInt32)
2297 v1.AddArg(x)
2298 v2 := b.NewValue0(v.Pos, OpInt64Hi, typ.UInt32)
2299 v2.AddArg(y)
2300 v3 := b.NewValue0(v.Pos, OpSelect1, types.TypeFlags)
2301 v4 := b.NewValue0(v.Pos, OpSub32carry, types.NewTuple(typ.UInt32, types.TypeFlags))
2302 v5 := b.NewValue0(v.Pos, OpInt64Lo, typ.UInt32)
2303 v5.AddArg(x)
2304 v6 := b.NewValue0(v.Pos, OpInt64Lo, typ.UInt32)
2305 v6.AddArg(y)
2306 v4.AddArg2(v5, v6)
2307 v3.AddArg(v4)
2308 v0.AddArg3(v1, v2, v3)
2309 v7 := b.NewValue0(v.Pos, OpSelect0, typ.UInt32)
2310 v7.AddArg(v4)
2311 v.AddArg2(v0, v7)
2312 return true
2313 }
2314 }
2315 func rewriteValuedec64_OpTrunc64to16(v *Value) bool {
2316 v_0 := v.Args[0]
2317 b := v.Block
2318 typ := &b.Func.Config.Types
2319
2320
2321 for {
2322 if v_0.Op != OpInt64Make {
2323 break
2324 }
2325 lo := v_0.Args[1]
2326 v.reset(OpTrunc32to16)
2327 v.AddArg(lo)
2328 return true
2329 }
2330
2331
2332 for {
2333 x := v_0
2334 v.reset(OpTrunc32to16)
2335 v0 := b.NewValue0(v.Pos, OpInt64Lo, typ.UInt32)
2336 v0.AddArg(x)
2337 v.AddArg(v0)
2338 return true
2339 }
2340 }
2341 func rewriteValuedec64_OpTrunc64to32(v *Value) bool {
2342 v_0 := v.Args[0]
2343
2344
2345 for {
2346 if v_0.Op != OpInt64Make {
2347 break
2348 }
2349 lo := v_0.Args[1]
2350 v.copyOf(lo)
2351 return true
2352 }
2353
2354
2355 for {
2356 x := v_0
2357 v.reset(OpInt64Lo)
2358 v.AddArg(x)
2359 return true
2360 }
2361 }
2362 func rewriteValuedec64_OpTrunc64to8(v *Value) bool {
2363 v_0 := v.Args[0]
2364 b := v.Block
2365 typ := &b.Func.Config.Types
2366
2367
2368 for {
2369 if v_0.Op != OpInt64Make {
2370 break
2371 }
2372 lo := v_0.Args[1]
2373 v.reset(OpTrunc32to8)
2374 v.AddArg(lo)
2375 return true
2376 }
2377
2378
2379 for {
2380 x := v_0
2381 v.reset(OpTrunc32to8)
2382 v0 := b.NewValue0(v.Pos, OpInt64Lo, typ.UInt32)
2383 v0.AddArg(x)
2384 v.AddArg(v0)
2385 return true
2386 }
2387 }
2388 func rewriteValuedec64_OpXor64(v *Value) bool {
2389 v_1 := v.Args[1]
2390 v_0 := v.Args[0]
2391 b := v.Block
2392 typ := &b.Func.Config.Types
2393
2394
2395 for {
2396 x := v_0
2397 y := v_1
2398 v.reset(OpInt64Make)
2399 v0 := b.NewValue0(v.Pos, OpXor32, typ.UInt32)
2400 v1 := b.NewValue0(v.Pos, OpInt64Hi, typ.UInt32)
2401 v1.AddArg(x)
2402 v2 := b.NewValue0(v.Pos, OpInt64Hi, typ.UInt32)
2403 v2.AddArg(y)
2404 v0.AddArg2(v1, v2)
2405 v3 := b.NewValue0(v.Pos, OpXor32, typ.UInt32)
2406 v4 := b.NewValue0(v.Pos, OpInt64Lo, typ.UInt32)
2407 v4.AddArg(x)
2408 v5 := b.NewValue0(v.Pos, OpInt64Lo, typ.UInt32)
2409 v5.AddArg(y)
2410 v3.AddArg2(v4, v5)
2411 v.AddArg2(v0, v3)
2412 return true
2413 }
2414 }
2415 func rewriteValuedec64_OpZeroExt16to64(v *Value) bool {
2416 v_0 := v.Args[0]
2417 b := v.Block
2418 typ := &b.Func.Config.Types
2419
2420
2421 for {
2422 x := v_0
2423 v.reset(OpZeroExt32to64)
2424 v0 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
2425 v0.AddArg(x)
2426 v.AddArg(v0)
2427 return true
2428 }
2429 }
2430 func rewriteValuedec64_OpZeroExt32to64(v *Value) bool {
2431 v_0 := v.Args[0]
2432 b := v.Block
2433 typ := &b.Func.Config.Types
2434
2435
2436 for {
2437 x := v_0
2438 v.reset(OpInt64Make)
2439 v0 := b.NewValue0(v.Pos, OpConst32, typ.UInt32)
2440 v0.AuxInt = int32ToAuxInt(0)
2441 v.AddArg2(v0, x)
2442 return true
2443 }
2444 }
2445 func rewriteValuedec64_OpZeroExt8to64(v *Value) bool {
2446 v_0 := v.Args[0]
2447 b := v.Block
2448 typ := &b.Func.Config.Types
2449
2450
2451 for {
2452 x := v_0
2453 v.reset(OpZeroExt32to64)
2454 v0 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
2455 v0.AddArg(x)
2456 v.AddArg(v0)
2457 return true
2458 }
2459 }
2460 func rewriteBlockdec64(b *Block) bool {
2461 return false
2462 }
2463
View as plain text