1
2
3 package ssa
4
5 import "cmd/compile/internal/types"
6
7 func rewriteValueARM64(v *Value) bool {
8 switch v.Op {
9 case OpARM64ADCSflags:
10 return rewriteValueARM64_OpARM64ADCSflags(v)
11 case OpARM64ADD:
12 return rewriteValueARM64_OpARM64ADD(v)
13 case OpARM64ADDSflags:
14 return rewriteValueARM64_OpARM64ADDSflags(v)
15 case OpARM64ADDconst:
16 return rewriteValueARM64_OpARM64ADDconst(v)
17 case OpARM64ADDshiftLL:
18 return rewriteValueARM64_OpARM64ADDshiftLL(v)
19 case OpARM64ADDshiftRA:
20 return rewriteValueARM64_OpARM64ADDshiftRA(v)
21 case OpARM64ADDshiftRL:
22 return rewriteValueARM64_OpARM64ADDshiftRL(v)
23 case OpARM64AND:
24 return rewriteValueARM64_OpARM64AND(v)
25 case OpARM64ANDconst:
26 return rewriteValueARM64_OpARM64ANDconst(v)
27 case OpARM64ANDshiftLL:
28 return rewriteValueARM64_OpARM64ANDshiftLL(v)
29 case OpARM64ANDshiftRA:
30 return rewriteValueARM64_OpARM64ANDshiftRA(v)
31 case OpARM64ANDshiftRL:
32 return rewriteValueARM64_OpARM64ANDshiftRL(v)
33 case OpARM64ANDshiftRO:
34 return rewriteValueARM64_OpARM64ANDshiftRO(v)
35 case OpARM64BIC:
36 return rewriteValueARM64_OpARM64BIC(v)
37 case OpARM64BICshiftLL:
38 return rewriteValueARM64_OpARM64BICshiftLL(v)
39 case OpARM64BICshiftRA:
40 return rewriteValueARM64_OpARM64BICshiftRA(v)
41 case OpARM64BICshiftRL:
42 return rewriteValueARM64_OpARM64BICshiftRL(v)
43 case OpARM64BICshiftRO:
44 return rewriteValueARM64_OpARM64BICshiftRO(v)
45 case OpARM64CMN:
46 return rewriteValueARM64_OpARM64CMN(v)
47 case OpARM64CMNW:
48 return rewriteValueARM64_OpARM64CMNW(v)
49 case OpARM64CMNWconst:
50 return rewriteValueARM64_OpARM64CMNWconst(v)
51 case OpARM64CMNconst:
52 return rewriteValueARM64_OpARM64CMNconst(v)
53 case OpARM64CMNshiftLL:
54 return rewriteValueARM64_OpARM64CMNshiftLL(v)
55 case OpARM64CMNshiftRA:
56 return rewriteValueARM64_OpARM64CMNshiftRA(v)
57 case OpARM64CMNshiftRL:
58 return rewriteValueARM64_OpARM64CMNshiftRL(v)
59 case OpARM64CMP:
60 return rewriteValueARM64_OpARM64CMP(v)
61 case OpARM64CMPW:
62 return rewriteValueARM64_OpARM64CMPW(v)
63 case OpARM64CMPWconst:
64 return rewriteValueARM64_OpARM64CMPWconst(v)
65 case OpARM64CMPconst:
66 return rewriteValueARM64_OpARM64CMPconst(v)
67 case OpARM64CMPshiftLL:
68 return rewriteValueARM64_OpARM64CMPshiftLL(v)
69 case OpARM64CMPshiftRA:
70 return rewriteValueARM64_OpARM64CMPshiftRA(v)
71 case OpARM64CMPshiftRL:
72 return rewriteValueARM64_OpARM64CMPshiftRL(v)
73 case OpARM64CSEL:
74 return rewriteValueARM64_OpARM64CSEL(v)
75 case OpARM64CSEL0:
76 return rewriteValueARM64_OpARM64CSEL0(v)
77 case OpARM64CSETM:
78 return rewriteValueARM64_OpARM64CSETM(v)
79 case OpARM64CSINC:
80 return rewriteValueARM64_OpARM64CSINC(v)
81 case OpARM64CSINV:
82 return rewriteValueARM64_OpARM64CSINV(v)
83 case OpARM64CSNEG:
84 return rewriteValueARM64_OpARM64CSNEG(v)
85 case OpARM64DIV:
86 return rewriteValueARM64_OpARM64DIV(v)
87 case OpARM64DIVW:
88 return rewriteValueARM64_OpARM64DIVW(v)
89 case OpARM64EON:
90 return rewriteValueARM64_OpARM64EON(v)
91 case OpARM64EONshiftLL:
92 return rewriteValueARM64_OpARM64EONshiftLL(v)
93 case OpARM64EONshiftRA:
94 return rewriteValueARM64_OpARM64EONshiftRA(v)
95 case OpARM64EONshiftRL:
96 return rewriteValueARM64_OpARM64EONshiftRL(v)
97 case OpARM64EONshiftRO:
98 return rewriteValueARM64_OpARM64EONshiftRO(v)
99 case OpARM64Equal:
100 return rewriteValueARM64_OpARM64Equal(v)
101 case OpARM64FADDD:
102 return rewriteValueARM64_OpARM64FADDD(v)
103 case OpARM64FADDS:
104 return rewriteValueARM64_OpARM64FADDS(v)
105 case OpARM64FCMPD:
106 return rewriteValueARM64_OpARM64FCMPD(v)
107 case OpARM64FCMPS:
108 return rewriteValueARM64_OpARM64FCMPS(v)
109 case OpARM64FMOVDfpgp:
110 return rewriteValueARM64_OpARM64FMOVDfpgp(v)
111 case OpARM64FMOVDgpfp:
112 return rewriteValueARM64_OpARM64FMOVDgpfp(v)
113 case OpARM64FMOVDload:
114 return rewriteValueARM64_OpARM64FMOVDload(v)
115 case OpARM64FMOVDloadidx:
116 return rewriteValueARM64_OpARM64FMOVDloadidx(v)
117 case OpARM64FMOVDloadidx8:
118 return rewriteValueARM64_OpARM64FMOVDloadidx8(v)
119 case OpARM64FMOVDstore:
120 return rewriteValueARM64_OpARM64FMOVDstore(v)
121 case OpARM64FMOVDstoreidx:
122 return rewriteValueARM64_OpARM64FMOVDstoreidx(v)
123 case OpARM64FMOVDstoreidx8:
124 return rewriteValueARM64_OpARM64FMOVDstoreidx8(v)
125 case OpARM64FMOVSload:
126 return rewriteValueARM64_OpARM64FMOVSload(v)
127 case OpARM64FMOVSloadidx:
128 return rewriteValueARM64_OpARM64FMOVSloadidx(v)
129 case OpARM64FMOVSloadidx4:
130 return rewriteValueARM64_OpARM64FMOVSloadidx4(v)
131 case OpARM64FMOVSstore:
132 return rewriteValueARM64_OpARM64FMOVSstore(v)
133 case OpARM64FMOVSstoreidx:
134 return rewriteValueARM64_OpARM64FMOVSstoreidx(v)
135 case OpARM64FMOVSstoreidx4:
136 return rewriteValueARM64_OpARM64FMOVSstoreidx4(v)
137 case OpARM64FMULD:
138 return rewriteValueARM64_OpARM64FMULD(v)
139 case OpARM64FMULS:
140 return rewriteValueARM64_OpARM64FMULS(v)
141 case OpARM64FNEGD:
142 return rewriteValueARM64_OpARM64FNEGD(v)
143 case OpARM64FNEGS:
144 return rewriteValueARM64_OpARM64FNEGS(v)
145 case OpARM64FNMULD:
146 return rewriteValueARM64_OpARM64FNMULD(v)
147 case OpARM64FNMULS:
148 return rewriteValueARM64_OpARM64FNMULS(v)
149 case OpARM64FSUBD:
150 return rewriteValueARM64_OpARM64FSUBD(v)
151 case OpARM64FSUBS:
152 return rewriteValueARM64_OpARM64FSUBS(v)
153 case OpARM64GreaterEqual:
154 return rewriteValueARM64_OpARM64GreaterEqual(v)
155 case OpARM64GreaterEqualF:
156 return rewriteValueARM64_OpARM64GreaterEqualF(v)
157 case OpARM64GreaterEqualNoov:
158 return rewriteValueARM64_OpARM64GreaterEqualNoov(v)
159 case OpARM64GreaterEqualU:
160 return rewriteValueARM64_OpARM64GreaterEqualU(v)
161 case OpARM64GreaterThan:
162 return rewriteValueARM64_OpARM64GreaterThan(v)
163 case OpARM64GreaterThanF:
164 return rewriteValueARM64_OpARM64GreaterThanF(v)
165 case OpARM64GreaterThanU:
166 return rewriteValueARM64_OpARM64GreaterThanU(v)
167 case OpARM64LDP:
168 return rewriteValueARM64_OpARM64LDP(v)
169 case OpARM64LessEqual:
170 return rewriteValueARM64_OpARM64LessEqual(v)
171 case OpARM64LessEqualF:
172 return rewriteValueARM64_OpARM64LessEqualF(v)
173 case OpARM64LessEqualU:
174 return rewriteValueARM64_OpARM64LessEqualU(v)
175 case OpARM64LessThan:
176 return rewriteValueARM64_OpARM64LessThan(v)
177 case OpARM64LessThanF:
178 return rewriteValueARM64_OpARM64LessThanF(v)
179 case OpARM64LessThanNoov:
180 return rewriteValueARM64_OpARM64LessThanNoov(v)
181 case OpARM64LessThanU:
182 return rewriteValueARM64_OpARM64LessThanU(v)
183 case OpARM64MADD:
184 return rewriteValueARM64_OpARM64MADD(v)
185 case OpARM64MADDW:
186 return rewriteValueARM64_OpARM64MADDW(v)
187 case OpARM64MNEG:
188 return rewriteValueARM64_OpARM64MNEG(v)
189 case OpARM64MNEGW:
190 return rewriteValueARM64_OpARM64MNEGW(v)
191 case OpARM64MOD:
192 return rewriteValueARM64_OpARM64MOD(v)
193 case OpARM64MODW:
194 return rewriteValueARM64_OpARM64MODW(v)
195 case OpARM64MOVBUload:
196 return rewriteValueARM64_OpARM64MOVBUload(v)
197 case OpARM64MOVBUloadidx:
198 return rewriteValueARM64_OpARM64MOVBUloadidx(v)
199 case OpARM64MOVBUreg:
200 return rewriteValueARM64_OpARM64MOVBUreg(v)
201 case OpARM64MOVBload:
202 return rewriteValueARM64_OpARM64MOVBload(v)
203 case OpARM64MOVBloadidx:
204 return rewriteValueARM64_OpARM64MOVBloadidx(v)
205 case OpARM64MOVBreg:
206 return rewriteValueARM64_OpARM64MOVBreg(v)
207 case OpARM64MOVBstore:
208 return rewriteValueARM64_OpARM64MOVBstore(v)
209 case OpARM64MOVBstoreidx:
210 return rewriteValueARM64_OpARM64MOVBstoreidx(v)
211 case OpARM64MOVBstorezero:
212 return rewriteValueARM64_OpARM64MOVBstorezero(v)
213 case OpARM64MOVBstorezeroidx:
214 return rewriteValueARM64_OpARM64MOVBstorezeroidx(v)
215 case OpARM64MOVDload:
216 return rewriteValueARM64_OpARM64MOVDload(v)
217 case OpARM64MOVDloadidx:
218 return rewriteValueARM64_OpARM64MOVDloadidx(v)
219 case OpARM64MOVDloadidx8:
220 return rewriteValueARM64_OpARM64MOVDloadidx8(v)
221 case OpARM64MOVDnop:
222 return rewriteValueARM64_OpARM64MOVDnop(v)
223 case OpARM64MOVDreg:
224 return rewriteValueARM64_OpARM64MOVDreg(v)
225 case OpARM64MOVDstore:
226 return rewriteValueARM64_OpARM64MOVDstore(v)
227 case OpARM64MOVDstoreidx:
228 return rewriteValueARM64_OpARM64MOVDstoreidx(v)
229 case OpARM64MOVDstoreidx8:
230 return rewriteValueARM64_OpARM64MOVDstoreidx8(v)
231 case OpARM64MOVDstorezero:
232 return rewriteValueARM64_OpARM64MOVDstorezero(v)
233 case OpARM64MOVDstorezeroidx:
234 return rewriteValueARM64_OpARM64MOVDstorezeroidx(v)
235 case OpARM64MOVDstorezeroidx8:
236 return rewriteValueARM64_OpARM64MOVDstorezeroidx8(v)
237 case OpARM64MOVHUload:
238 return rewriteValueARM64_OpARM64MOVHUload(v)
239 case OpARM64MOVHUloadidx:
240 return rewriteValueARM64_OpARM64MOVHUloadidx(v)
241 case OpARM64MOVHUloadidx2:
242 return rewriteValueARM64_OpARM64MOVHUloadidx2(v)
243 case OpARM64MOVHUreg:
244 return rewriteValueARM64_OpARM64MOVHUreg(v)
245 case OpARM64MOVHload:
246 return rewriteValueARM64_OpARM64MOVHload(v)
247 case OpARM64MOVHloadidx:
248 return rewriteValueARM64_OpARM64MOVHloadidx(v)
249 case OpARM64MOVHloadidx2:
250 return rewriteValueARM64_OpARM64MOVHloadidx2(v)
251 case OpARM64MOVHreg:
252 return rewriteValueARM64_OpARM64MOVHreg(v)
253 case OpARM64MOVHstore:
254 return rewriteValueARM64_OpARM64MOVHstore(v)
255 case OpARM64MOVHstoreidx:
256 return rewriteValueARM64_OpARM64MOVHstoreidx(v)
257 case OpARM64MOVHstoreidx2:
258 return rewriteValueARM64_OpARM64MOVHstoreidx2(v)
259 case OpARM64MOVHstorezero:
260 return rewriteValueARM64_OpARM64MOVHstorezero(v)
261 case OpARM64MOVHstorezeroidx:
262 return rewriteValueARM64_OpARM64MOVHstorezeroidx(v)
263 case OpARM64MOVHstorezeroidx2:
264 return rewriteValueARM64_OpARM64MOVHstorezeroidx2(v)
265 case OpARM64MOVQstorezero:
266 return rewriteValueARM64_OpARM64MOVQstorezero(v)
267 case OpARM64MOVWUload:
268 return rewriteValueARM64_OpARM64MOVWUload(v)
269 case OpARM64MOVWUloadidx:
270 return rewriteValueARM64_OpARM64MOVWUloadidx(v)
271 case OpARM64MOVWUloadidx4:
272 return rewriteValueARM64_OpARM64MOVWUloadidx4(v)
273 case OpARM64MOVWUreg:
274 return rewriteValueARM64_OpARM64MOVWUreg(v)
275 case OpARM64MOVWload:
276 return rewriteValueARM64_OpARM64MOVWload(v)
277 case OpARM64MOVWloadidx:
278 return rewriteValueARM64_OpARM64MOVWloadidx(v)
279 case OpARM64MOVWloadidx4:
280 return rewriteValueARM64_OpARM64MOVWloadidx4(v)
281 case OpARM64MOVWreg:
282 return rewriteValueARM64_OpARM64MOVWreg(v)
283 case OpARM64MOVWstore:
284 return rewriteValueARM64_OpARM64MOVWstore(v)
285 case OpARM64MOVWstoreidx:
286 return rewriteValueARM64_OpARM64MOVWstoreidx(v)
287 case OpARM64MOVWstoreidx4:
288 return rewriteValueARM64_OpARM64MOVWstoreidx4(v)
289 case OpARM64MOVWstorezero:
290 return rewriteValueARM64_OpARM64MOVWstorezero(v)
291 case OpARM64MOVWstorezeroidx:
292 return rewriteValueARM64_OpARM64MOVWstorezeroidx(v)
293 case OpARM64MOVWstorezeroidx4:
294 return rewriteValueARM64_OpARM64MOVWstorezeroidx4(v)
295 case OpARM64MSUB:
296 return rewriteValueARM64_OpARM64MSUB(v)
297 case OpARM64MSUBW:
298 return rewriteValueARM64_OpARM64MSUBW(v)
299 case OpARM64MUL:
300 return rewriteValueARM64_OpARM64MUL(v)
301 case OpARM64MULW:
302 return rewriteValueARM64_OpARM64MULW(v)
303 case OpARM64MVN:
304 return rewriteValueARM64_OpARM64MVN(v)
305 case OpARM64MVNshiftLL:
306 return rewriteValueARM64_OpARM64MVNshiftLL(v)
307 case OpARM64MVNshiftRA:
308 return rewriteValueARM64_OpARM64MVNshiftRA(v)
309 case OpARM64MVNshiftRL:
310 return rewriteValueARM64_OpARM64MVNshiftRL(v)
311 case OpARM64MVNshiftRO:
312 return rewriteValueARM64_OpARM64MVNshiftRO(v)
313 case OpARM64NEG:
314 return rewriteValueARM64_OpARM64NEG(v)
315 case OpARM64NEGshiftLL:
316 return rewriteValueARM64_OpARM64NEGshiftLL(v)
317 case OpARM64NEGshiftRA:
318 return rewriteValueARM64_OpARM64NEGshiftRA(v)
319 case OpARM64NEGshiftRL:
320 return rewriteValueARM64_OpARM64NEGshiftRL(v)
321 case OpARM64NotEqual:
322 return rewriteValueARM64_OpARM64NotEqual(v)
323 case OpARM64OR:
324 return rewriteValueARM64_OpARM64OR(v)
325 case OpARM64ORN:
326 return rewriteValueARM64_OpARM64ORN(v)
327 case OpARM64ORNshiftLL:
328 return rewriteValueARM64_OpARM64ORNshiftLL(v)
329 case OpARM64ORNshiftRA:
330 return rewriteValueARM64_OpARM64ORNshiftRA(v)
331 case OpARM64ORNshiftRL:
332 return rewriteValueARM64_OpARM64ORNshiftRL(v)
333 case OpARM64ORNshiftRO:
334 return rewriteValueARM64_OpARM64ORNshiftRO(v)
335 case OpARM64ORconst:
336 return rewriteValueARM64_OpARM64ORconst(v)
337 case OpARM64ORshiftLL:
338 return rewriteValueARM64_OpARM64ORshiftLL(v)
339 case OpARM64ORshiftRA:
340 return rewriteValueARM64_OpARM64ORshiftRA(v)
341 case OpARM64ORshiftRL:
342 return rewriteValueARM64_OpARM64ORshiftRL(v)
343 case OpARM64ORshiftRO:
344 return rewriteValueARM64_OpARM64ORshiftRO(v)
345 case OpARM64REV:
346 return rewriteValueARM64_OpARM64REV(v)
347 case OpARM64REVW:
348 return rewriteValueARM64_OpARM64REVW(v)
349 case OpARM64ROR:
350 return rewriteValueARM64_OpARM64ROR(v)
351 case OpARM64RORW:
352 return rewriteValueARM64_OpARM64RORW(v)
353 case OpARM64SBCSflags:
354 return rewriteValueARM64_OpARM64SBCSflags(v)
355 case OpARM64SBFX:
356 return rewriteValueARM64_OpARM64SBFX(v)
357 case OpARM64SLL:
358 return rewriteValueARM64_OpARM64SLL(v)
359 case OpARM64SLLconst:
360 return rewriteValueARM64_OpARM64SLLconst(v)
361 case OpARM64SRA:
362 return rewriteValueARM64_OpARM64SRA(v)
363 case OpARM64SRAconst:
364 return rewriteValueARM64_OpARM64SRAconst(v)
365 case OpARM64SRL:
366 return rewriteValueARM64_OpARM64SRL(v)
367 case OpARM64SRLconst:
368 return rewriteValueARM64_OpARM64SRLconst(v)
369 case OpARM64STP:
370 return rewriteValueARM64_OpARM64STP(v)
371 case OpARM64SUB:
372 return rewriteValueARM64_OpARM64SUB(v)
373 case OpARM64SUBconst:
374 return rewriteValueARM64_OpARM64SUBconst(v)
375 case OpARM64SUBshiftLL:
376 return rewriteValueARM64_OpARM64SUBshiftLL(v)
377 case OpARM64SUBshiftRA:
378 return rewriteValueARM64_OpARM64SUBshiftRA(v)
379 case OpARM64SUBshiftRL:
380 return rewriteValueARM64_OpARM64SUBshiftRL(v)
381 case OpARM64TST:
382 return rewriteValueARM64_OpARM64TST(v)
383 case OpARM64TSTW:
384 return rewriteValueARM64_OpARM64TSTW(v)
385 case OpARM64TSTWconst:
386 return rewriteValueARM64_OpARM64TSTWconst(v)
387 case OpARM64TSTconst:
388 return rewriteValueARM64_OpARM64TSTconst(v)
389 case OpARM64TSTshiftLL:
390 return rewriteValueARM64_OpARM64TSTshiftLL(v)
391 case OpARM64TSTshiftRA:
392 return rewriteValueARM64_OpARM64TSTshiftRA(v)
393 case OpARM64TSTshiftRL:
394 return rewriteValueARM64_OpARM64TSTshiftRL(v)
395 case OpARM64TSTshiftRO:
396 return rewriteValueARM64_OpARM64TSTshiftRO(v)
397 case OpARM64UBFIZ:
398 return rewriteValueARM64_OpARM64UBFIZ(v)
399 case OpARM64UBFX:
400 return rewriteValueARM64_OpARM64UBFX(v)
401 case OpARM64UDIV:
402 return rewriteValueARM64_OpARM64UDIV(v)
403 case OpARM64UDIVW:
404 return rewriteValueARM64_OpARM64UDIVW(v)
405 case OpARM64UMOD:
406 return rewriteValueARM64_OpARM64UMOD(v)
407 case OpARM64UMODW:
408 return rewriteValueARM64_OpARM64UMODW(v)
409 case OpARM64XOR:
410 return rewriteValueARM64_OpARM64XOR(v)
411 case OpARM64XORconst:
412 return rewriteValueARM64_OpARM64XORconst(v)
413 case OpARM64XORshiftLL:
414 return rewriteValueARM64_OpARM64XORshiftLL(v)
415 case OpARM64XORshiftRA:
416 return rewriteValueARM64_OpARM64XORshiftRA(v)
417 case OpARM64XORshiftRL:
418 return rewriteValueARM64_OpARM64XORshiftRL(v)
419 case OpARM64XORshiftRO:
420 return rewriteValueARM64_OpARM64XORshiftRO(v)
421 case OpAbs:
422 v.Op = OpARM64FABSD
423 return true
424 case OpAdd16:
425 v.Op = OpARM64ADD
426 return true
427 case OpAdd32:
428 v.Op = OpARM64ADD
429 return true
430 case OpAdd32F:
431 v.Op = OpARM64FADDS
432 return true
433 case OpAdd64:
434 v.Op = OpARM64ADD
435 return true
436 case OpAdd64F:
437 v.Op = OpARM64FADDD
438 return true
439 case OpAdd8:
440 v.Op = OpARM64ADD
441 return true
442 case OpAddPtr:
443 v.Op = OpARM64ADD
444 return true
445 case OpAddr:
446 return rewriteValueARM64_OpAddr(v)
447 case OpAnd16:
448 v.Op = OpARM64AND
449 return true
450 case OpAnd32:
451 v.Op = OpARM64AND
452 return true
453 case OpAnd64:
454 v.Op = OpARM64AND
455 return true
456 case OpAnd8:
457 v.Op = OpARM64AND
458 return true
459 case OpAndB:
460 v.Op = OpARM64AND
461 return true
462 case OpAtomicAdd32:
463 v.Op = OpARM64LoweredAtomicAdd32
464 return true
465 case OpAtomicAdd32Variant:
466 v.Op = OpARM64LoweredAtomicAdd32Variant
467 return true
468 case OpAtomicAdd64:
469 v.Op = OpARM64LoweredAtomicAdd64
470 return true
471 case OpAtomicAdd64Variant:
472 v.Op = OpARM64LoweredAtomicAdd64Variant
473 return true
474 case OpAtomicAnd32value:
475 v.Op = OpARM64LoweredAtomicAnd32
476 return true
477 case OpAtomicAnd32valueVariant:
478 v.Op = OpARM64LoweredAtomicAnd32Variant
479 return true
480 case OpAtomicAnd64value:
481 v.Op = OpARM64LoweredAtomicAnd64
482 return true
483 case OpAtomicAnd64valueVariant:
484 v.Op = OpARM64LoweredAtomicAnd64Variant
485 return true
486 case OpAtomicAnd8value:
487 v.Op = OpARM64LoweredAtomicAnd8
488 return true
489 case OpAtomicAnd8valueVariant:
490 v.Op = OpARM64LoweredAtomicAnd8Variant
491 return true
492 case OpAtomicCompareAndSwap32:
493 v.Op = OpARM64LoweredAtomicCas32
494 return true
495 case OpAtomicCompareAndSwap32Variant:
496 v.Op = OpARM64LoweredAtomicCas32Variant
497 return true
498 case OpAtomicCompareAndSwap64:
499 v.Op = OpARM64LoweredAtomicCas64
500 return true
501 case OpAtomicCompareAndSwap64Variant:
502 v.Op = OpARM64LoweredAtomicCas64Variant
503 return true
504 case OpAtomicExchange32:
505 v.Op = OpARM64LoweredAtomicExchange32
506 return true
507 case OpAtomicExchange32Variant:
508 v.Op = OpARM64LoweredAtomicExchange32Variant
509 return true
510 case OpAtomicExchange64:
511 v.Op = OpARM64LoweredAtomicExchange64
512 return true
513 case OpAtomicExchange64Variant:
514 v.Op = OpARM64LoweredAtomicExchange64Variant
515 return true
516 case OpAtomicExchange8:
517 v.Op = OpARM64LoweredAtomicExchange8
518 return true
519 case OpAtomicExchange8Variant:
520 v.Op = OpARM64LoweredAtomicExchange8Variant
521 return true
522 case OpAtomicLoad32:
523 v.Op = OpARM64LDARW
524 return true
525 case OpAtomicLoad64:
526 v.Op = OpARM64LDAR
527 return true
528 case OpAtomicLoad8:
529 v.Op = OpARM64LDARB
530 return true
531 case OpAtomicLoadPtr:
532 v.Op = OpARM64LDAR
533 return true
534 case OpAtomicOr32value:
535 v.Op = OpARM64LoweredAtomicOr32
536 return true
537 case OpAtomicOr32valueVariant:
538 v.Op = OpARM64LoweredAtomicOr32Variant
539 return true
540 case OpAtomicOr64value:
541 v.Op = OpARM64LoweredAtomicOr64
542 return true
543 case OpAtomicOr64valueVariant:
544 v.Op = OpARM64LoweredAtomicOr64Variant
545 return true
546 case OpAtomicOr8value:
547 v.Op = OpARM64LoweredAtomicOr8
548 return true
549 case OpAtomicOr8valueVariant:
550 v.Op = OpARM64LoweredAtomicOr8Variant
551 return true
552 case OpAtomicStore32:
553 v.Op = OpARM64STLRW
554 return true
555 case OpAtomicStore64:
556 v.Op = OpARM64STLR
557 return true
558 case OpAtomicStore8:
559 v.Op = OpARM64STLRB
560 return true
561 case OpAtomicStorePtrNoWB:
562 v.Op = OpARM64STLR
563 return true
564 case OpAvg64u:
565 return rewriteValueARM64_OpAvg64u(v)
566 case OpBitLen32:
567 return rewriteValueARM64_OpBitLen32(v)
568 case OpBitLen64:
569 return rewriteValueARM64_OpBitLen64(v)
570 case OpBitRev16:
571 return rewriteValueARM64_OpBitRev16(v)
572 case OpBitRev32:
573 v.Op = OpARM64RBITW
574 return true
575 case OpBitRev64:
576 v.Op = OpARM64RBIT
577 return true
578 case OpBitRev8:
579 return rewriteValueARM64_OpBitRev8(v)
580 case OpBswap16:
581 v.Op = OpARM64REV16W
582 return true
583 case OpBswap32:
584 v.Op = OpARM64REVW
585 return true
586 case OpBswap64:
587 v.Op = OpARM64REV
588 return true
589 case OpCeil:
590 v.Op = OpARM64FRINTPD
591 return true
592 case OpClosureCall:
593 v.Op = OpARM64CALLclosure
594 return true
595 case OpCom16:
596 v.Op = OpARM64MVN
597 return true
598 case OpCom32:
599 v.Op = OpARM64MVN
600 return true
601 case OpCom64:
602 v.Op = OpARM64MVN
603 return true
604 case OpCom8:
605 v.Op = OpARM64MVN
606 return true
607 case OpCondSelect:
608 return rewriteValueARM64_OpCondSelect(v)
609 case OpConst16:
610 return rewriteValueARM64_OpConst16(v)
611 case OpConst32:
612 return rewriteValueARM64_OpConst32(v)
613 case OpConst32F:
614 return rewriteValueARM64_OpConst32F(v)
615 case OpConst64:
616 return rewriteValueARM64_OpConst64(v)
617 case OpConst64F:
618 return rewriteValueARM64_OpConst64F(v)
619 case OpConst8:
620 return rewriteValueARM64_OpConst8(v)
621 case OpConstBool:
622 return rewriteValueARM64_OpConstBool(v)
623 case OpConstNil:
624 return rewriteValueARM64_OpConstNil(v)
625 case OpCtz16:
626 return rewriteValueARM64_OpCtz16(v)
627 case OpCtz16NonZero:
628 v.Op = OpCtz32
629 return true
630 case OpCtz32:
631 return rewriteValueARM64_OpCtz32(v)
632 case OpCtz32NonZero:
633 v.Op = OpCtz32
634 return true
635 case OpCtz64:
636 return rewriteValueARM64_OpCtz64(v)
637 case OpCtz64NonZero:
638 v.Op = OpCtz64
639 return true
640 case OpCtz8:
641 return rewriteValueARM64_OpCtz8(v)
642 case OpCtz8NonZero:
643 v.Op = OpCtz32
644 return true
645 case OpCvt32Fto32:
646 v.Op = OpARM64FCVTZSSW
647 return true
648 case OpCvt32Fto32U:
649 v.Op = OpARM64FCVTZUSW
650 return true
651 case OpCvt32Fto64:
652 v.Op = OpARM64FCVTZSS
653 return true
654 case OpCvt32Fto64F:
655 v.Op = OpARM64FCVTSD
656 return true
657 case OpCvt32Fto64U:
658 v.Op = OpARM64FCVTZUS
659 return true
660 case OpCvt32Uto32F:
661 v.Op = OpARM64UCVTFWS
662 return true
663 case OpCvt32Uto64F:
664 v.Op = OpARM64UCVTFWD
665 return true
666 case OpCvt32to32F:
667 v.Op = OpARM64SCVTFWS
668 return true
669 case OpCvt32to64F:
670 v.Op = OpARM64SCVTFWD
671 return true
672 case OpCvt64Fto32:
673 v.Op = OpARM64FCVTZSDW
674 return true
675 case OpCvt64Fto32F:
676 v.Op = OpARM64FCVTDS
677 return true
678 case OpCvt64Fto32U:
679 v.Op = OpARM64FCVTZUDW
680 return true
681 case OpCvt64Fto64:
682 v.Op = OpARM64FCVTZSD
683 return true
684 case OpCvt64Fto64U:
685 v.Op = OpARM64FCVTZUD
686 return true
687 case OpCvt64Uto32F:
688 v.Op = OpARM64UCVTFS
689 return true
690 case OpCvt64Uto64F:
691 v.Op = OpARM64UCVTFD
692 return true
693 case OpCvt64to32F:
694 v.Op = OpARM64SCVTFS
695 return true
696 case OpCvt64to64F:
697 v.Op = OpARM64SCVTFD
698 return true
699 case OpCvtBoolToUint8:
700 v.Op = OpCopy
701 return true
702 case OpDiv16:
703 return rewriteValueARM64_OpDiv16(v)
704 case OpDiv16u:
705 return rewriteValueARM64_OpDiv16u(v)
706 case OpDiv32:
707 return rewriteValueARM64_OpDiv32(v)
708 case OpDiv32F:
709 v.Op = OpARM64FDIVS
710 return true
711 case OpDiv32u:
712 v.Op = OpARM64UDIVW
713 return true
714 case OpDiv64:
715 return rewriteValueARM64_OpDiv64(v)
716 case OpDiv64F:
717 v.Op = OpARM64FDIVD
718 return true
719 case OpDiv64u:
720 v.Op = OpARM64UDIV
721 return true
722 case OpDiv8:
723 return rewriteValueARM64_OpDiv8(v)
724 case OpDiv8u:
725 return rewriteValueARM64_OpDiv8u(v)
726 case OpEq16:
727 return rewriteValueARM64_OpEq16(v)
728 case OpEq32:
729 return rewriteValueARM64_OpEq32(v)
730 case OpEq32F:
731 return rewriteValueARM64_OpEq32F(v)
732 case OpEq64:
733 return rewriteValueARM64_OpEq64(v)
734 case OpEq64F:
735 return rewriteValueARM64_OpEq64F(v)
736 case OpEq8:
737 return rewriteValueARM64_OpEq8(v)
738 case OpEqB:
739 return rewriteValueARM64_OpEqB(v)
740 case OpEqPtr:
741 return rewriteValueARM64_OpEqPtr(v)
742 case OpFMA:
743 return rewriteValueARM64_OpFMA(v)
744 case OpFloor:
745 v.Op = OpARM64FRINTMD
746 return true
747 case OpGetCallerPC:
748 v.Op = OpARM64LoweredGetCallerPC
749 return true
750 case OpGetCallerSP:
751 v.Op = OpARM64LoweredGetCallerSP
752 return true
753 case OpGetClosurePtr:
754 v.Op = OpARM64LoweredGetClosurePtr
755 return true
756 case OpHmul32:
757 return rewriteValueARM64_OpHmul32(v)
758 case OpHmul32u:
759 return rewriteValueARM64_OpHmul32u(v)
760 case OpHmul64:
761 v.Op = OpARM64MULH
762 return true
763 case OpHmul64u:
764 v.Op = OpARM64UMULH
765 return true
766 case OpInterCall:
767 v.Op = OpARM64CALLinter
768 return true
769 case OpIsInBounds:
770 return rewriteValueARM64_OpIsInBounds(v)
771 case OpIsNonNil:
772 return rewriteValueARM64_OpIsNonNil(v)
773 case OpIsSliceInBounds:
774 return rewriteValueARM64_OpIsSliceInBounds(v)
775 case OpLeq16:
776 return rewriteValueARM64_OpLeq16(v)
777 case OpLeq16U:
778 return rewriteValueARM64_OpLeq16U(v)
779 case OpLeq32:
780 return rewriteValueARM64_OpLeq32(v)
781 case OpLeq32F:
782 return rewriteValueARM64_OpLeq32F(v)
783 case OpLeq32U:
784 return rewriteValueARM64_OpLeq32U(v)
785 case OpLeq64:
786 return rewriteValueARM64_OpLeq64(v)
787 case OpLeq64F:
788 return rewriteValueARM64_OpLeq64F(v)
789 case OpLeq64U:
790 return rewriteValueARM64_OpLeq64U(v)
791 case OpLeq8:
792 return rewriteValueARM64_OpLeq8(v)
793 case OpLeq8U:
794 return rewriteValueARM64_OpLeq8U(v)
795 case OpLess16:
796 return rewriteValueARM64_OpLess16(v)
797 case OpLess16U:
798 return rewriteValueARM64_OpLess16U(v)
799 case OpLess32:
800 return rewriteValueARM64_OpLess32(v)
801 case OpLess32F:
802 return rewriteValueARM64_OpLess32F(v)
803 case OpLess32U:
804 return rewriteValueARM64_OpLess32U(v)
805 case OpLess64:
806 return rewriteValueARM64_OpLess64(v)
807 case OpLess64F:
808 return rewriteValueARM64_OpLess64F(v)
809 case OpLess64U:
810 return rewriteValueARM64_OpLess64U(v)
811 case OpLess8:
812 return rewriteValueARM64_OpLess8(v)
813 case OpLess8U:
814 return rewriteValueARM64_OpLess8U(v)
815 case OpLoad:
816 return rewriteValueARM64_OpLoad(v)
817 case OpLocalAddr:
818 return rewriteValueARM64_OpLocalAddr(v)
819 case OpLsh16x16:
820 return rewriteValueARM64_OpLsh16x16(v)
821 case OpLsh16x32:
822 return rewriteValueARM64_OpLsh16x32(v)
823 case OpLsh16x64:
824 return rewriteValueARM64_OpLsh16x64(v)
825 case OpLsh16x8:
826 return rewriteValueARM64_OpLsh16x8(v)
827 case OpLsh32x16:
828 return rewriteValueARM64_OpLsh32x16(v)
829 case OpLsh32x32:
830 return rewriteValueARM64_OpLsh32x32(v)
831 case OpLsh32x64:
832 return rewriteValueARM64_OpLsh32x64(v)
833 case OpLsh32x8:
834 return rewriteValueARM64_OpLsh32x8(v)
835 case OpLsh64x16:
836 return rewriteValueARM64_OpLsh64x16(v)
837 case OpLsh64x32:
838 return rewriteValueARM64_OpLsh64x32(v)
839 case OpLsh64x64:
840 return rewriteValueARM64_OpLsh64x64(v)
841 case OpLsh64x8:
842 return rewriteValueARM64_OpLsh64x8(v)
843 case OpLsh8x16:
844 return rewriteValueARM64_OpLsh8x16(v)
845 case OpLsh8x32:
846 return rewriteValueARM64_OpLsh8x32(v)
847 case OpLsh8x64:
848 return rewriteValueARM64_OpLsh8x64(v)
849 case OpLsh8x8:
850 return rewriteValueARM64_OpLsh8x8(v)
851 case OpMax32F:
852 v.Op = OpARM64FMAXS
853 return true
854 case OpMax64F:
855 v.Op = OpARM64FMAXD
856 return true
857 case OpMin32F:
858 v.Op = OpARM64FMINS
859 return true
860 case OpMin64F:
861 v.Op = OpARM64FMIND
862 return true
863 case OpMod16:
864 return rewriteValueARM64_OpMod16(v)
865 case OpMod16u:
866 return rewriteValueARM64_OpMod16u(v)
867 case OpMod32:
868 return rewriteValueARM64_OpMod32(v)
869 case OpMod32u:
870 v.Op = OpARM64UMODW
871 return true
872 case OpMod64:
873 return rewriteValueARM64_OpMod64(v)
874 case OpMod64u:
875 v.Op = OpARM64UMOD
876 return true
877 case OpMod8:
878 return rewriteValueARM64_OpMod8(v)
879 case OpMod8u:
880 return rewriteValueARM64_OpMod8u(v)
881 case OpMove:
882 return rewriteValueARM64_OpMove(v)
883 case OpMul16:
884 v.Op = OpARM64MULW
885 return true
886 case OpMul32:
887 v.Op = OpARM64MULW
888 return true
889 case OpMul32F:
890 v.Op = OpARM64FMULS
891 return true
892 case OpMul64:
893 v.Op = OpARM64MUL
894 return true
895 case OpMul64F:
896 v.Op = OpARM64FMULD
897 return true
898 case OpMul8:
899 v.Op = OpARM64MULW
900 return true
901 case OpNeg16:
902 v.Op = OpARM64NEG
903 return true
904 case OpNeg32:
905 v.Op = OpARM64NEG
906 return true
907 case OpNeg32F:
908 v.Op = OpARM64FNEGS
909 return true
910 case OpNeg64:
911 v.Op = OpARM64NEG
912 return true
913 case OpNeg64F:
914 v.Op = OpARM64FNEGD
915 return true
916 case OpNeg8:
917 v.Op = OpARM64NEG
918 return true
919 case OpNeq16:
920 return rewriteValueARM64_OpNeq16(v)
921 case OpNeq32:
922 return rewriteValueARM64_OpNeq32(v)
923 case OpNeq32F:
924 return rewriteValueARM64_OpNeq32F(v)
925 case OpNeq64:
926 return rewriteValueARM64_OpNeq64(v)
927 case OpNeq64F:
928 return rewriteValueARM64_OpNeq64F(v)
929 case OpNeq8:
930 return rewriteValueARM64_OpNeq8(v)
931 case OpNeqB:
932 v.Op = OpARM64XOR
933 return true
934 case OpNeqPtr:
935 return rewriteValueARM64_OpNeqPtr(v)
936 case OpNilCheck:
937 v.Op = OpARM64LoweredNilCheck
938 return true
939 case OpNot:
940 return rewriteValueARM64_OpNot(v)
941 case OpOffPtr:
942 return rewriteValueARM64_OpOffPtr(v)
943 case OpOr16:
944 v.Op = OpARM64OR
945 return true
946 case OpOr32:
947 v.Op = OpARM64OR
948 return true
949 case OpOr64:
950 v.Op = OpARM64OR
951 return true
952 case OpOr8:
953 v.Op = OpARM64OR
954 return true
955 case OpOrB:
956 v.Op = OpARM64OR
957 return true
958 case OpPanicBounds:
959 return rewriteValueARM64_OpPanicBounds(v)
960 case OpPopCount16:
961 return rewriteValueARM64_OpPopCount16(v)
962 case OpPopCount32:
963 return rewriteValueARM64_OpPopCount32(v)
964 case OpPopCount64:
965 return rewriteValueARM64_OpPopCount64(v)
966 case OpPrefetchCache:
967 return rewriteValueARM64_OpPrefetchCache(v)
968 case OpPrefetchCacheStreamed:
969 return rewriteValueARM64_OpPrefetchCacheStreamed(v)
970 case OpPubBarrier:
971 return rewriteValueARM64_OpPubBarrier(v)
972 case OpRotateLeft16:
973 return rewriteValueARM64_OpRotateLeft16(v)
974 case OpRotateLeft32:
975 return rewriteValueARM64_OpRotateLeft32(v)
976 case OpRotateLeft64:
977 return rewriteValueARM64_OpRotateLeft64(v)
978 case OpRotateLeft8:
979 return rewriteValueARM64_OpRotateLeft8(v)
980 case OpRound:
981 v.Op = OpARM64FRINTAD
982 return true
983 case OpRound32F:
984 v.Op = OpARM64LoweredRound32F
985 return true
986 case OpRound64F:
987 v.Op = OpARM64LoweredRound64F
988 return true
989 case OpRoundToEven:
990 v.Op = OpARM64FRINTND
991 return true
992 case OpRsh16Ux16:
993 return rewriteValueARM64_OpRsh16Ux16(v)
994 case OpRsh16Ux32:
995 return rewriteValueARM64_OpRsh16Ux32(v)
996 case OpRsh16Ux64:
997 return rewriteValueARM64_OpRsh16Ux64(v)
998 case OpRsh16Ux8:
999 return rewriteValueARM64_OpRsh16Ux8(v)
1000 case OpRsh16x16:
1001 return rewriteValueARM64_OpRsh16x16(v)
1002 case OpRsh16x32:
1003 return rewriteValueARM64_OpRsh16x32(v)
1004 case OpRsh16x64:
1005 return rewriteValueARM64_OpRsh16x64(v)
1006 case OpRsh16x8:
1007 return rewriteValueARM64_OpRsh16x8(v)
1008 case OpRsh32Ux16:
1009 return rewriteValueARM64_OpRsh32Ux16(v)
1010 case OpRsh32Ux32:
1011 return rewriteValueARM64_OpRsh32Ux32(v)
1012 case OpRsh32Ux64:
1013 return rewriteValueARM64_OpRsh32Ux64(v)
1014 case OpRsh32Ux8:
1015 return rewriteValueARM64_OpRsh32Ux8(v)
1016 case OpRsh32x16:
1017 return rewriteValueARM64_OpRsh32x16(v)
1018 case OpRsh32x32:
1019 return rewriteValueARM64_OpRsh32x32(v)
1020 case OpRsh32x64:
1021 return rewriteValueARM64_OpRsh32x64(v)
1022 case OpRsh32x8:
1023 return rewriteValueARM64_OpRsh32x8(v)
1024 case OpRsh64Ux16:
1025 return rewriteValueARM64_OpRsh64Ux16(v)
1026 case OpRsh64Ux32:
1027 return rewriteValueARM64_OpRsh64Ux32(v)
1028 case OpRsh64Ux64:
1029 return rewriteValueARM64_OpRsh64Ux64(v)
1030 case OpRsh64Ux8:
1031 return rewriteValueARM64_OpRsh64Ux8(v)
1032 case OpRsh64x16:
1033 return rewriteValueARM64_OpRsh64x16(v)
1034 case OpRsh64x32:
1035 return rewriteValueARM64_OpRsh64x32(v)
1036 case OpRsh64x64:
1037 return rewriteValueARM64_OpRsh64x64(v)
1038 case OpRsh64x8:
1039 return rewriteValueARM64_OpRsh64x8(v)
1040 case OpRsh8Ux16:
1041 return rewriteValueARM64_OpRsh8Ux16(v)
1042 case OpRsh8Ux32:
1043 return rewriteValueARM64_OpRsh8Ux32(v)
1044 case OpRsh8Ux64:
1045 return rewriteValueARM64_OpRsh8Ux64(v)
1046 case OpRsh8Ux8:
1047 return rewriteValueARM64_OpRsh8Ux8(v)
1048 case OpRsh8x16:
1049 return rewriteValueARM64_OpRsh8x16(v)
1050 case OpRsh8x32:
1051 return rewriteValueARM64_OpRsh8x32(v)
1052 case OpRsh8x64:
1053 return rewriteValueARM64_OpRsh8x64(v)
1054 case OpRsh8x8:
1055 return rewriteValueARM64_OpRsh8x8(v)
1056 case OpSelect0:
1057 return rewriteValueARM64_OpSelect0(v)
1058 case OpSelect1:
1059 return rewriteValueARM64_OpSelect1(v)
1060 case OpSelectN:
1061 return rewriteValueARM64_OpSelectN(v)
1062 case OpSignExt16to32:
1063 v.Op = OpARM64MOVHreg
1064 return true
1065 case OpSignExt16to64:
1066 v.Op = OpARM64MOVHreg
1067 return true
1068 case OpSignExt32to64:
1069 v.Op = OpARM64MOVWreg
1070 return true
1071 case OpSignExt8to16:
1072 v.Op = OpARM64MOVBreg
1073 return true
1074 case OpSignExt8to32:
1075 v.Op = OpARM64MOVBreg
1076 return true
1077 case OpSignExt8to64:
1078 v.Op = OpARM64MOVBreg
1079 return true
1080 case OpSlicemask:
1081 return rewriteValueARM64_OpSlicemask(v)
1082 case OpSqrt:
1083 v.Op = OpARM64FSQRTD
1084 return true
1085 case OpSqrt32:
1086 v.Op = OpARM64FSQRTS
1087 return true
1088 case OpStaticCall:
1089 v.Op = OpARM64CALLstatic
1090 return true
1091 case OpStore:
1092 return rewriteValueARM64_OpStore(v)
1093 case OpSub16:
1094 v.Op = OpARM64SUB
1095 return true
1096 case OpSub32:
1097 v.Op = OpARM64SUB
1098 return true
1099 case OpSub32F:
1100 v.Op = OpARM64FSUBS
1101 return true
1102 case OpSub64:
1103 v.Op = OpARM64SUB
1104 return true
1105 case OpSub64F:
1106 v.Op = OpARM64FSUBD
1107 return true
1108 case OpSub8:
1109 v.Op = OpARM64SUB
1110 return true
1111 case OpSubPtr:
1112 v.Op = OpARM64SUB
1113 return true
1114 case OpTailCall:
1115 v.Op = OpARM64CALLtail
1116 return true
1117 case OpTrunc:
1118 v.Op = OpARM64FRINTZD
1119 return true
1120 case OpTrunc16to8:
1121 v.Op = OpCopy
1122 return true
1123 case OpTrunc32to16:
1124 v.Op = OpCopy
1125 return true
1126 case OpTrunc32to8:
1127 v.Op = OpCopy
1128 return true
1129 case OpTrunc64to16:
1130 v.Op = OpCopy
1131 return true
1132 case OpTrunc64to32:
1133 v.Op = OpCopy
1134 return true
1135 case OpTrunc64to8:
1136 v.Op = OpCopy
1137 return true
1138 case OpWB:
1139 v.Op = OpARM64LoweredWB
1140 return true
1141 case OpXor16:
1142 v.Op = OpARM64XOR
1143 return true
1144 case OpXor32:
1145 v.Op = OpARM64XOR
1146 return true
1147 case OpXor64:
1148 v.Op = OpARM64XOR
1149 return true
1150 case OpXor8:
1151 v.Op = OpARM64XOR
1152 return true
1153 case OpZero:
1154 return rewriteValueARM64_OpZero(v)
1155 case OpZeroExt16to32:
1156 v.Op = OpARM64MOVHUreg
1157 return true
1158 case OpZeroExt16to64:
1159 v.Op = OpARM64MOVHUreg
1160 return true
1161 case OpZeroExt32to64:
1162 v.Op = OpARM64MOVWUreg
1163 return true
1164 case OpZeroExt8to16:
1165 v.Op = OpARM64MOVBUreg
1166 return true
1167 case OpZeroExt8to32:
1168 v.Op = OpARM64MOVBUreg
1169 return true
1170 case OpZeroExt8to64:
1171 v.Op = OpARM64MOVBUreg
1172 return true
1173 }
1174 return false
1175 }
1176 func rewriteValueARM64_OpARM64ADCSflags(v *Value) bool {
1177 v_2 := v.Args[2]
1178 v_1 := v.Args[1]
1179 v_0 := v.Args[0]
1180 b := v.Block
1181 typ := &b.Func.Config.Types
1182
1183
1184 for {
1185 x := v_0
1186 y := v_1
1187 if v_2.Op != OpSelect1 || v_2.Type != types.TypeFlags {
1188 break
1189 }
1190 v_2_0 := v_2.Args[0]
1191 if v_2_0.Op != OpARM64ADDSconstflags || auxIntToInt64(v_2_0.AuxInt) != -1 {
1192 break
1193 }
1194 v_2_0_0 := v_2_0.Args[0]
1195 if v_2_0_0.Op != OpARM64ADCzerocarry || v_2_0_0.Type != typ.UInt64 {
1196 break
1197 }
1198 c := v_2_0_0.Args[0]
1199 v.reset(OpARM64ADCSflags)
1200 v.AddArg3(x, y, c)
1201 return true
1202 }
1203
1204
1205 for {
1206 x := v_0
1207 y := v_1
1208 if v_2.Op != OpSelect1 || v_2.Type != types.TypeFlags {
1209 break
1210 }
1211 v_2_0 := v_2.Args[0]
1212 if v_2_0.Op != OpARM64ADDSconstflags || auxIntToInt64(v_2_0.AuxInt) != -1 {
1213 break
1214 }
1215 v_2_0_0 := v_2_0.Args[0]
1216 if v_2_0_0.Op != OpARM64MOVDconst || auxIntToInt64(v_2_0_0.AuxInt) != 0 {
1217 break
1218 }
1219 v.reset(OpARM64ADDSflags)
1220 v.AddArg2(x, y)
1221 return true
1222 }
1223 return false
1224 }
1225 func rewriteValueARM64_OpARM64ADD(v *Value) bool {
1226 v_1 := v.Args[1]
1227 v_0 := v.Args[0]
1228
1229
1230
1231 for {
1232 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1233 x := v_0
1234 if v_1.Op != OpARM64MOVDconst {
1235 continue
1236 }
1237 t := v_1.Type
1238 c := auxIntToInt64(v_1.AuxInt)
1239 if !(!t.IsPtr()) {
1240 continue
1241 }
1242 v.reset(OpARM64ADDconst)
1243 v.AuxInt = int64ToAuxInt(c)
1244 v.AddArg(x)
1245 return true
1246 }
1247 break
1248 }
1249
1250
1251
1252 for {
1253 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1254 a := v_0
1255 l := v_1
1256 if l.Op != OpARM64MUL {
1257 continue
1258 }
1259 y := l.Args[1]
1260 x := l.Args[0]
1261 if !(l.Uses == 1 && clobber(l)) {
1262 continue
1263 }
1264 v.reset(OpARM64MADD)
1265 v.AddArg3(a, x, y)
1266 return true
1267 }
1268 break
1269 }
1270
1271
1272
1273 for {
1274 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1275 a := v_0
1276 l := v_1
1277 if l.Op != OpARM64MNEG {
1278 continue
1279 }
1280 y := l.Args[1]
1281 x := l.Args[0]
1282 if !(l.Uses == 1 && clobber(l)) {
1283 continue
1284 }
1285 v.reset(OpARM64MSUB)
1286 v.AddArg3(a, x, y)
1287 return true
1288 }
1289 break
1290 }
1291
1292
1293
1294 for {
1295 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1296 a := v_0
1297 l := v_1
1298 if l.Op != OpARM64MULW {
1299 continue
1300 }
1301 y := l.Args[1]
1302 x := l.Args[0]
1303 if !(v.Type.Size() <= 4 && l.Uses == 1 && clobber(l)) {
1304 continue
1305 }
1306 v.reset(OpARM64MADDW)
1307 v.AddArg3(a, x, y)
1308 return true
1309 }
1310 break
1311 }
1312
1313
1314
1315 for {
1316 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1317 a := v_0
1318 l := v_1
1319 if l.Op != OpARM64MNEGW {
1320 continue
1321 }
1322 y := l.Args[1]
1323 x := l.Args[0]
1324 if !(v.Type.Size() <= 4 && l.Uses == 1 && clobber(l)) {
1325 continue
1326 }
1327 v.reset(OpARM64MSUBW)
1328 v.AddArg3(a, x, y)
1329 return true
1330 }
1331 break
1332 }
1333
1334
1335 for {
1336 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1337 x := v_0
1338 if v_1.Op != OpARM64NEG {
1339 continue
1340 }
1341 y := v_1.Args[0]
1342 v.reset(OpARM64SUB)
1343 v.AddArg2(x, y)
1344 return true
1345 }
1346 break
1347 }
1348
1349
1350
1351 for {
1352 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1353 x0 := v_0
1354 x1 := v_1
1355 if x1.Op != OpARM64SLLconst {
1356 continue
1357 }
1358 c := auxIntToInt64(x1.AuxInt)
1359 y := x1.Args[0]
1360 if !(clobberIfDead(x1)) {
1361 continue
1362 }
1363 v.reset(OpARM64ADDshiftLL)
1364 v.AuxInt = int64ToAuxInt(c)
1365 v.AddArg2(x0, y)
1366 return true
1367 }
1368 break
1369 }
1370
1371
1372
1373 for {
1374 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1375 x0 := v_0
1376 x1 := v_1
1377 if x1.Op != OpARM64SRLconst {
1378 continue
1379 }
1380 c := auxIntToInt64(x1.AuxInt)
1381 y := x1.Args[0]
1382 if !(clobberIfDead(x1)) {
1383 continue
1384 }
1385 v.reset(OpARM64ADDshiftRL)
1386 v.AuxInt = int64ToAuxInt(c)
1387 v.AddArg2(x0, y)
1388 return true
1389 }
1390 break
1391 }
1392
1393
1394
1395 for {
1396 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1397 x0 := v_0
1398 x1 := v_1
1399 if x1.Op != OpARM64SRAconst {
1400 continue
1401 }
1402 c := auxIntToInt64(x1.AuxInt)
1403 y := x1.Args[0]
1404 if !(clobberIfDead(x1)) {
1405 continue
1406 }
1407 v.reset(OpARM64ADDshiftRA)
1408 v.AuxInt = int64ToAuxInt(c)
1409 v.AddArg2(x0, y)
1410 return true
1411 }
1412 break
1413 }
1414 return false
1415 }
1416 func rewriteValueARM64_OpARM64ADDSflags(v *Value) bool {
1417 v_1 := v.Args[1]
1418 v_0 := v.Args[0]
1419
1420
1421 for {
1422 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1423 x := v_0
1424 if v_1.Op != OpARM64MOVDconst {
1425 continue
1426 }
1427 c := auxIntToInt64(v_1.AuxInt)
1428 v.reset(OpARM64ADDSconstflags)
1429 v.AuxInt = int64ToAuxInt(c)
1430 v.AddArg(x)
1431 return true
1432 }
1433 break
1434 }
1435 return false
1436 }
1437 func rewriteValueARM64_OpARM64ADDconst(v *Value) bool {
1438 v_0 := v.Args[0]
1439
1440
1441
1442 for {
1443 off1 := auxIntToInt64(v.AuxInt)
1444 if v_0.Op != OpARM64MOVDaddr {
1445 break
1446 }
1447 off2 := auxIntToInt32(v_0.AuxInt)
1448 sym := auxToSym(v_0.Aux)
1449 ptr := v_0.Args[0]
1450 if !(is32Bit(off1 + int64(off2))) {
1451 break
1452 }
1453 v.reset(OpARM64MOVDaddr)
1454 v.AuxInt = int32ToAuxInt(int32(off1) + off2)
1455 v.Aux = symToAux(sym)
1456 v.AddArg(ptr)
1457 return true
1458 }
1459
1460
1461
1462 for {
1463 c := auxIntToInt64(v.AuxInt)
1464 y := v_0
1465 if !(c < 0) {
1466 break
1467 }
1468 v.reset(OpARM64SUBconst)
1469 v.AuxInt = int64ToAuxInt(-c)
1470 v.AddArg(y)
1471 return true
1472 }
1473
1474
1475 for {
1476 if auxIntToInt64(v.AuxInt) != 0 {
1477 break
1478 }
1479 x := v_0
1480 v.copyOf(x)
1481 return true
1482 }
1483
1484
1485 for {
1486 c := auxIntToInt64(v.AuxInt)
1487 if v_0.Op != OpARM64MOVDconst {
1488 break
1489 }
1490 d := auxIntToInt64(v_0.AuxInt)
1491 v.reset(OpARM64MOVDconst)
1492 v.AuxInt = int64ToAuxInt(c + d)
1493 return true
1494 }
1495
1496
1497 for {
1498 c := auxIntToInt64(v.AuxInt)
1499 if v_0.Op != OpARM64ADDconst {
1500 break
1501 }
1502 d := auxIntToInt64(v_0.AuxInt)
1503 x := v_0.Args[0]
1504 v.reset(OpARM64ADDconst)
1505 v.AuxInt = int64ToAuxInt(c + d)
1506 v.AddArg(x)
1507 return true
1508 }
1509
1510
1511 for {
1512 c := auxIntToInt64(v.AuxInt)
1513 if v_0.Op != OpARM64SUBconst {
1514 break
1515 }
1516 d := auxIntToInt64(v_0.AuxInt)
1517 x := v_0.Args[0]
1518 v.reset(OpARM64ADDconst)
1519 v.AuxInt = int64ToAuxInt(c - d)
1520 v.AddArg(x)
1521 return true
1522 }
1523 return false
1524 }
1525 func rewriteValueARM64_OpARM64ADDshiftLL(v *Value) bool {
1526 v_1 := v.Args[1]
1527 v_0 := v.Args[0]
1528 b := v.Block
1529 typ := &b.Func.Config.Types
1530
1531
1532 for {
1533 d := auxIntToInt64(v.AuxInt)
1534 if v_0.Op != OpARM64MOVDconst {
1535 break
1536 }
1537 c := auxIntToInt64(v_0.AuxInt)
1538 x := v_1
1539 v.reset(OpARM64ADDconst)
1540 v.AuxInt = int64ToAuxInt(c)
1541 v0 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
1542 v0.AuxInt = int64ToAuxInt(d)
1543 v0.AddArg(x)
1544 v.AddArg(v0)
1545 return true
1546 }
1547
1548
1549 for {
1550 d := auxIntToInt64(v.AuxInt)
1551 x := v_0
1552 if v_1.Op != OpARM64MOVDconst {
1553 break
1554 }
1555 c := auxIntToInt64(v_1.AuxInt)
1556 v.reset(OpARM64ADDconst)
1557 v.AuxInt = int64ToAuxInt(int64(uint64(c) << uint64(d)))
1558 v.AddArg(x)
1559 return true
1560 }
1561
1562
1563 for {
1564 if v.Type != typ.UInt16 || auxIntToInt64(v.AuxInt) != 8 || v_0.Op != OpARM64UBFX || v_0.Type != typ.UInt16 || auxIntToArm64BitField(v_0.AuxInt) != armBFAuxInt(8, 8) {
1565 break
1566 }
1567 x := v_0.Args[0]
1568 if x != v_1 {
1569 break
1570 }
1571 v.reset(OpARM64REV16W)
1572 v.AddArg(x)
1573 return true
1574 }
1575
1576
1577
1578 for {
1579 if auxIntToInt64(v.AuxInt) != 8 || v_0.Op != OpARM64UBFX || auxIntToArm64BitField(v_0.AuxInt) != armBFAuxInt(8, 24) {
1580 break
1581 }
1582 v_0_0 := v_0.Args[0]
1583 if v_0_0.Op != OpARM64ANDconst {
1584 break
1585 }
1586 c1 := auxIntToInt64(v_0_0.AuxInt)
1587 x := v_0_0.Args[0]
1588 if v_1.Op != OpARM64ANDconst {
1589 break
1590 }
1591 c2 := auxIntToInt64(v_1.AuxInt)
1592 if x != v_1.Args[0] || !(uint32(c1) == 0xff00ff00 && uint32(c2) == 0x00ff00ff) {
1593 break
1594 }
1595 v.reset(OpARM64REV16W)
1596 v.AddArg(x)
1597 return true
1598 }
1599
1600
1601
1602 for {
1603 if auxIntToInt64(v.AuxInt) != 8 || v_0.Op != OpARM64SRLconst || auxIntToInt64(v_0.AuxInt) != 8 {
1604 break
1605 }
1606 v_0_0 := v_0.Args[0]
1607 if v_0_0.Op != OpARM64ANDconst {
1608 break
1609 }
1610 c1 := auxIntToInt64(v_0_0.AuxInt)
1611 x := v_0_0.Args[0]
1612 if v_1.Op != OpARM64ANDconst {
1613 break
1614 }
1615 c2 := auxIntToInt64(v_1.AuxInt)
1616 if x != v_1.Args[0] || !(uint64(c1) == 0xff00ff00ff00ff00 && uint64(c2) == 0x00ff00ff00ff00ff) {
1617 break
1618 }
1619 v.reset(OpARM64REV16)
1620 v.AddArg(x)
1621 return true
1622 }
1623
1624
1625
1626 for {
1627 if auxIntToInt64(v.AuxInt) != 8 || v_0.Op != OpARM64SRLconst || auxIntToInt64(v_0.AuxInt) != 8 {
1628 break
1629 }
1630 v_0_0 := v_0.Args[0]
1631 if v_0_0.Op != OpARM64ANDconst {
1632 break
1633 }
1634 c1 := auxIntToInt64(v_0_0.AuxInt)
1635 x := v_0_0.Args[0]
1636 if v_1.Op != OpARM64ANDconst {
1637 break
1638 }
1639 c2 := auxIntToInt64(v_1.AuxInt)
1640 if x != v_1.Args[0] || !(uint64(c1) == 0xff00ff00 && uint64(c2) == 0x00ff00ff) {
1641 break
1642 }
1643 v.reset(OpARM64REV16)
1644 v0 := b.NewValue0(v.Pos, OpARM64ANDconst, x.Type)
1645 v0.AuxInt = int64ToAuxInt(0xffffffff)
1646 v0.AddArg(x)
1647 v.AddArg(v0)
1648 return true
1649 }
1650
1651
1652 for {
1653 c := auxIntToInt64(v.AuxInt)
1654 if v_0.Op != OpARM64SRLconst || auxIntToInt64(v_0.AuxInt) != 64-c {
1655 break
1656 }
1657 x := v_0.Args[0]
1658 x2 := v_1
1659 v.reset(OpARM64EXTRconst)
1660 v.AuxInt = int64ToAuxInt(64 - c)
1661 v.AddArg2(x2, x)
1662 return true
1663 }
1664
1665
1666
1667 for {
1668 t := v.Type
1669 c := auxIntToInt64(v.AuxInt)
1670 if v_0.Op != OpARM64UBFX {
1671 break
1672 }
1673 bfc := auxIntToArm64BitField(v_0.AuxInt)
1674 x := v_0.Args[0]
1675 x2 := v_1
1676 if !(c < 32 && t.Size() == 4 && bfc == armBFAuxInt(32-c, c)) {
1677 break
1678 }
1679 v.reset(OpARM64EXTRWconst)
1680 v.AuxInt = int64ToAuxInt(32 - c)
1681 v.AddArg2(x2, x)
1682 return true
1683 }
1684 return false
1685 }
1686 func rewriteValueARM64_OpARM64ADDshiftRA(v *Value) bool {
1687 v_1 := v.Args[1]
1688 v_0 := v.Args[0]
1689 b := v.Block
1690
1691
1692 for {
1693 d := auxIntToInt64(v.AuxInt)
1694 if v_0.Op != OpARM64MOVDconst {
1695 break
1696 }
1697 c := auxIntToInt64(v_0.AuxInt)
1698 x := v_1
1699 v.reset(OpARM64ADDconst)
1700 v.AuxInt = int64ToAuxInt(c)
1701 v0 := b.NewValue0(v.Pos, OpARM64SRAconst, x.Type)
1702 v0.AuxInt = int64ToAuxInt(d)
1703 v0.AddArg(x)
1704 v.AddArg(v0)
1705 return true
1706 }
1707
1708
1709 for {
1710 d := auxIntToInt64(v.AuxInt)
1711 x := v_0
1712 if v_1.Op != OpARM64MOVDconst {
1713 break
1714 }
1715 c := auxIntToInt64(v_1.AuxInt)
1716 v.reset(OpARM64ADDconst)
1717 v.AuxInt = int64ToAuxInt(c >> uint64(d))
1718 v.AddArg(x)
1719 return true
1720 }
1721 return false
1722 }
1723 func rewriteValueARM64_OpARM64ADDshiftRL(v *Value) bool {
1724 v_1 := v.Args[1]
1725 v_0 := v.Args[0]
1726 b := v.Block
1727
1728
1729 for {
1730 d := auxIntToInt64(v.AuxInt)
1731 if v_0.Op != OpARM64MOVDconst {
1732 break
1733 }
1734 c := auxIntToInt64(v_0.AuxInt)
1735 x := v_1
1736 v.reset(OpARM64ADDconst)
1737 v.AuxInt = int64ToAuxInt(c)
1738 v0 := b.NewValue0(v.Pos, OpARM64SRLconst, x.Type)
1739 v0.AuxInt = int64ToAuxInt(d)
1740 v0.AddArg(x)
1741 v.AddArg(v0)
1742 return true
1743 }
1744
1745
1746 for {
1747 d := auxIntToInt64(v.AuxInt)
1748 x := v_0
1749 if v_1.Op != OpARM64MOVDconst {
1750 break
1751 }
1752 c := auxIntToInt64(v_1.AuxInt)
1753 v.reset(OpARM64ADDconst)
1754 v.AuxInt = int64ToAuxInt(int64(uint64(c) >> uint64(d)))
1755 v.AddArg(x)
1756 return true
1757 }
1758 return false
1759 }
1760 func rewriteValueARM64_OpARM64AND(v *Value) bool {
1761 v_1 := v.Args[1]
1762 v_0 := v.Args[0]
1763
1764
1765 for {
1766 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1767 x := v_0
1768 if v_1.Op != OpARM64MOVDconst {
1769 continue
1770 }
1771 c := auxIntToInt64(v_1.AuxInt)
1772 v.reset(OpARM64ANDconst)
1773 v.AuxInt = int64ToAuxInt(c)
1774 v.AddArg(x)
1775 return true
1776 }
1777 break
1778 }
1779
1780
1781 for {
1782 x := v_0
1783 if x != v_1 {
1784 break
1785 }
1786 v.copyOf(x)
1787 return true
1788 }
1789
1790
1791 for {
1792 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1793 x := v_0
1794 if v_1.Op != OpARM64MVN {
1795 continue
1796 }
1797 y := v_1.Args[0]
1798 v.reset(OpARM64BIC)
1799 v.AddArg2(x, y)
1800 return true
1801 }
1802 break
1803 }
1804
1805
1806
1807 for {
1808 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1809 x0 := v_0
1810 x1 := v_1
1811 if x1.Op != OpARM64SLLconst {
1812 continue
1813 }
1814 c := auxIntToInt64(x1.AuxInt)
1815 y := x1.Args[0]
1816 if !(clobberIfDead(x1)) {
1817 continue
1818 }
1819 v.reset(OpARM64ANDshiftLL)
1820 v.AuxInt = int64ToAuxInt(c)
1821 v.AddArg2(x0, y)
1822 return true
1823 }
1824 break
1825 }
1826
1827
1828
1829 for {
1830 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1831 x0 := v_0
1832 x1 := v_1
1833 if x1.Op != OpARM64SRLconst {
1834 continue
1835 }
1836 c := auxIntToInt64(x1.AuxInt)
1837 y := x1.Args[0]
1838 if !(clobberIfDead(x1)) {
1839 continue
1840 }
1841 v.reset(OpARM64ANDshiftRL)
1842 v.AuxInt = int64ToAuxInt(c)
1843 v.AddArg2(x0, y)
1844 return true
1845 }
1846 break
1847 }
1848
1849
1850
1851 for {
1852 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1853 x0 := v_0
1854 x1 := v_1
1855 if x1.Op != OpARM64SRAconst {
1856 continue
1857 }
1858 c := auxIntToInt64(x1.AuxInt)
1859 y := x1.Args[0]
1860 if !(clobberIfDead(x1)) {
1861 continue
1862 }
1863 v.reset(OpARM64ANDshiftRA)
1864 v.AuxInt = int64ToAuxInt(c)
1865 v.AddArg2(x0, y)
1866 return true
1867 }
1868 break
1869 }
1870
1871
1872
1873 for {
1874 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
1875 x0 := v_0
1876 x1 := v_1
1877 if x1.Op != OpARM64RORconst {
1878 continue
1879 }
1880 c := auxIntToInt64(x1.AuxInt)
1881 y := x1.Args[0]
1882 if !(clobberIfDead(x1)) {
1883 continue
1884 }
1885 v.reset(OpARM64ANDshiftRO)
1886 v.AuxInt = int64ToAuxInt(c)
1887 v.AddArg2(x0, y)
1888 return true
1889 }
1890 break
1891 }
1892 return false
1893 }
1894 func rewriteValueARM64_OpARM64ANDconst(v *Value) bool {
1895 v_0 := v.Args[0]
1896
1897
1898 for {
1899 if auxIntToInt64(v.AuxInt) != 0 {
1900 break
1901 }
1902 v.reset(OpARM64MOVDconst)
1903 v.AuxInt = int64ToAuxInt(0)
1904 return true
1905 }
1906
1907
1908 for {
1909 if auxIntToInt64(v.AuxInt) != -1 {
1910 break
1911 }
1912 x := v_0
1913 v.copyOf(x)
1914 return true
1915 }
1916
1917
1918 for {
1919 c := auxIntToInt64(v.AuxInt)
1920 if v_0.Op != OpARM64MOVDconst {
1921 break
1922 }
1923 d := auxIntToInt64(v_0.AuxInt)
1924 v.reset(OpARM64MOVDconst)
1925 v.AuxInt = int64ToAuxInt(c & d)
1926 return true
1927 }
1928
1929
1930 for {
1931 c := auxIntToInt64(v.AuxInt)
1932 if v_0.Op != OpARM64ANDconst {
1933 break
1934 }
1935 d := auxIntToInt64(v_0.AuxInt)
1936 x := v_0.Args[0]
1937 v.reset(OpARM64ANDconst)
1938 v.AuxInt = int64ToAuxInt(c & d)
1939 v.AddArg(x)
1940 return true
1941 }
1942
1943
1944 for {
1945 c := auxIntToInt64(v.AuxInt)
1946 if v_0.Op != OpARM64MOVWUreg {
1947 break
1948 }
1949 x := v_0.Args[0]
1950 v.reset(OpARM64ANDconst)
1951 v.AuxInt = int64ToAuxInt(c & (1<<32 - 1))
1952 v.AddArg(x)
1953 return true
1954 }
1955
1956
1957 for {
1958 c := auxIntToInt64(v.AuxInt)
1959 if v_0.Op != OpARM64MOVHUreg {
1960 break
1961 }
1962 x := v_0.Args[0]
1963 v.reset(OpARM64ANDconst)
1964 v.AuxInt = int64ToAuxInt(c & (1<<16 - 1))
1965 v.AddArg(x)
1966 return true
1967 }
1968
1969
1970 for {
1971 c := auxIntToInt64(v.AuxInt)
1972 if v_0.Op != OpARM64MOVBUreg {
1973 break
1974 }
1975 x := v_0.Args[0]
1976 v.reset(OpARM64ANDconst)
1977 v.AuxInt = int64ToAuxInt(c & (1<<8 - 1))
1978 v.AddArg(x)
1979 return true
1980 }
1981
1982
1983
1984 for {
1985 ac := auxIntToInt64(v.AuxInt)
1986 if v_0.Op != OpARM64SLLconst {
1987 break
1988 }
1989 sc := auxIntToInt64(v_0.AuxInt)
1990 x := v_0.Args[0]
1991 if !(isARM64BFMask(sc, ac, sc)) {
1992 break
1993 }
1994 v.reset(OpARM64UBFIZ)
1995 v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(sc, arm64BFWidth(ac, sc)))
1996 v.AddArg(x)
1997 return true
1998 }
1999
2000
2001
2002 for {
2003 ac := auxIntToInt64(v.AuxInt)
2004 if v_0.Op != OpARM64SRLconst {
2005 break
2006 }
2007 sc := auxIntToInt64(v_0.AuxInt)
2008 x := v_0.Args[0]
2009 if !(isARM64BFMask(sc, ac, 0)) {
2010 break
2011 }
2012 v.reset(OpARM64UBFX)
2013 v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(sc, arm64BFWidth(ac, 0)))
2014 v.AddArg(x)
2015 return true
2016 }
2017
2018
2019
2020 for {
2021 c := auxIntToInt64(v.AuxInt)
2022 if v_0.Op != OpARM64UBFX {
2023 break
2024 }
2025 bfc := auxIntToArm64BitField(v_0.AuxInt)
2026 x := v_0.Args[0]
2027 if !(isARM64BFMask(0, c, 0)) {
2028 break
2029 }
2030 v.reset(OpARM64UBFX)
2031 v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(bfc.lsb(), min(bfc.width(), arm64BFWidth(c, 0))))
2032 v.AddArg(x)
2033 return true
2034 }
2035 return false
2036 }
2037 func rewriteValueARM64_OpARM64ANDshiftLL(v *Value) bool {
2038 v_1 := v.Args[1]
2039 v_0 := v.Args[0]
2040 b := v.Block
2041
2042
2043 for {
2044 d := auxIntToInt64(v.AuxInt)
2045 if v_0.Op != OpARM64MOVDconst {
2046 break
2047 }
2048 c := auxIntToInt64(v_0.AuxInt)
2049 x := v_1
2050 v.reset(OpARM64ANDconst)
2051 v.AuxInt = int64ToAuxInt(c)
2052 v0 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
2053 v0.AuxInt = int64ToAuxInt(d)
2054 v0.AddArg(x)
2055 v.AddArg(v0)
2056 return true
2057 }
2058
2059
2060 for {
2061 d := auxIntToInt64(v.AuxInt)
2062 x := v_0
2063 if v_1.Op != OpARM64MOVDconst {
2064 break
2065 }
2066 c := auxIntToInt64(v_1.AuxInt)
2067 v.reset(OpARM64ANDconst)
2068 v.AuxInt = int64ToAuxInt(int64(uint64(c) << uint64(d)))
2069 v.AddArg(x)
2070 return true
2071 }
2072
2073
2074 for {
2075 c := auxIntToInt64(v.AuxInt)
2076 y := v_0
2077 if y.Op != OpARM64SLLconst || auxIntToInt64(y.AuxInt) != c {
2078 break
2079 }
2080 x := y.Args[0]
2081 if x != v_1 {
2082 break
2083 }
2084 v.copyOf(y)
2085 return true
2086 }
2087 return false
2088 }
2089 func rewriteValueARM64_OpARM64ANDshiftRA(v *Value) bool {
2090 v_1 := v.Args[1]
2091 v_0 := v.Args[0]
2092 b := v.Block
2093
2094
2095 for {
2096 d := auxIntToInt64(v.AuxInt)
2097 if v_0.Op != OpARM64MOVDconst {
2098 break
2099 }
2100 c := auxIntToInt64(v_0.AuxInt)
2101 x := v_1
2102 v.reset(OpARM64ANDconst)
2103 v.AuxInt = int64ToAuxInt(c)
2104 v0 := b.NewValue0(v.Pos, OpARM64SRAconst, x.Type)
2105 v0.AuxInt = int64ToAuxInt(d)
2106 v0.AddArg(x)
2107 v.AddArg(v0)
2108 return true
2109 }
2110
2111
2112 for {
2113 d := auxIntToInt64(v.AuxInt)
2114 x := v_0
2115 if v_1.Op != OpARM64MOVDconst {
2116 break
2117 }
2118 c := auxIntToInt64(v_1.AuxInt)
2119 v.reset(OpARM64ANDconst)
2120 v.AuxInt = int64ToAuxInt(c >> uint64(d))
2121 v.AddArg(x)
2122 return true
2123 }
2124
2125
2126 for {
2127 c := auxIntToInt64(v.AuxInt)
2128 y := v_0
2129 if y.Op != OpARM64SRAconst || auxIntToInt64(y.AuxInt) != c {
2130 break
2131 }
2132 x := y.Args[0]
2133 if x != v_1 {
2134 break
2135 }
2136 v.copyOf(y)
2137 return true
2138 }
2139 return false
2140 }
2141 func rewriteValueARM64_OpARM64ANDshiftRL(v *Value) bool {
2142 v_1 := v.Args[1]
2143 v_0 := v.Args[0]
2144 b := v.Block
2145
2146
2147 for {
2148 d := auxIntToInt64(v.AuxInt)
2149 if v_0.Op != OpARM64MOVDconst {
2150 break
2151 }
2152 c := auxIntToInt64(v_0.AuxInt)
2153 x := v_1
2154 v.reset(OpARM64ANDconst)
2155 v.AuxInt = int64ToAuxInt(c)
2156 v0 := b.NewValue0(v.Pos, OpARM64SRLconst, x.Type)
2157 v0.AuxInt = int64ToAuxInt(d)
2158 v0.AddArg(x)
2159 v.AddArg(v0)
2160 return true
2161 }
2162
2163
2164 for {
2165 d := auxIntToInt64(v.AuxInt)
2166 x := v_0
2167 if v_1.Op != OpARM64MOVDconst {
2168 break
2169 }
2170 c := auxIntToInt64(v_1.AuxInt)
2171 v.reset(OpARM64ANDconst)
2172 v.AuxInt = int64ToAuxInt(int64(uint64(c) >> uint64(d)))
2173 v.AddArg(x)
2174 return true
2175 }
2176
2177
2178 for {
2179 c := auxIntToInt64(v.AuxInt)
2180 y := v_0
2181 if y.Op != OpARM64SRLconst || auxIntToInt64(y.AuxInt) != c {
2182 break
2183 }
2184 x := y.Args[0]
2185 if x != v_1 {
2186 break
2187 }
2188 v.copyOf(y)
2189 return true
2190 }
2191 return false
2192 }
2193 func rewriteValueARM64_OpARM64ANDshiftRO(v *Value) bool {
2194 v_1 := v.Args[1]
2195 v_0 := v.Args[0]
2196 b := v.Block
2197
2198
2199 for {
2200 d := auxIntToInt64(v.AuxInt)
2201 if v_0.Op != OpARM64MOVDconst {
2202 break
2203 }
2204 c := auxIntToInt64(v_0.AuxInt)
2205 x := v_1
2206 v.reset(OpARM64ANDconst)
2207 v.AuxInt = int64ToAuxInt(c)
2208 v0 := b.NewValue0(v.Pos, OpARM64RORconst, x.Type)
2209 v0.AuxInt = int64ToAuxInt(d)
2210 v0.AddArg(x)
2211 v.AddArg(v0)
2212 return true
2213 }
2214
2215
2216 for {
2217 d := auxIntToInt64(v.AuxInt)
2218 x := v_0
2219 if v_1.Op != OpARM64MOVDconst {
2220 break
2221 }
2222 c := auxIntToInt64(v_1.AuxInt)
2223 v.reset(OpARM64ANDconst)
2224 v.AuxInt = int64ToAuxInt(rotateRight64(c, d))
2225 v.AddArg(x)
2226 return true
2227 }
2228
2229
2230 for {
2231 c := auxIntToInt64(v.AuxInt)
2232 y := v_0
2233 if y.Op != OpARM64RORconst || auxIntToInt64(y.AuxInt) != c {
2234 break
2235 }
2236 x := y.Args[0]
2237 if x != v_1 {
2238 break
2239 }
2240 v.copyOf(y)
2241 return true
2242 }
2243 return false
2244 }
2245 func rewriteValueARM64_OpARM64BIC(v *Value) bool {
2246 v_1 := v.Args[1]
2247 v_0 := v.Args[0]
2248
2249
2250 for {
2251 x := v_0
2252 if v_1.Op != OpARM64MOVDconst {
2253 break
2254 }
2255 c := auxIntToInt64(v_1.AuxInt)
2256 v.reset(OpARM64ANDconst)
2257 v.AuxInt = int64ToAuxInt(^c)
2258 v.AddArg(x)
2259 return true
2260 }
2261
2262
2263 for {
2264 x := v_0
2265 if x != v_1 {
2266 break
2267 }
2268 v.reset(OpARM64MOVDconst)
2269 v.AuxInt = int64ToAuxInt(0)
2270 return true
2271 }
2272
2273
2274
2275 for {
2276 x0 := v_0
2277 x1 := v_1
2278 if x1.Op != OpARM64SLLconst {
2279 break
2280 }
2281 c := auxIntToInt64(x1.AuxInt)
2282 y := x1.Args[0]
2283 if !(clobberIfDead(x1)) {
2284 break
2285 }
2286 v.reset(OpARM64BICshiftLL)
2287 v.AuxInt = int64ToAuxInt(c)
2288 v.AddArg2(x0, y)
2289 return true
2290 }
2291
2292
2293
2294 for {
2295 x0 := v_0
2296 x1 := v_1
2297 if x1.Op != OpARM64SRLconst {
2298 break
2299 }
2300 c := auxIntToInt64(x1.AuxInt)
2301 y := x1.Args[0]
2302 if !(clobberIfDead(x1)) {
2303 break
2304 }
2305 v.reset(OpARM64BICshiftRL)
2306 v.AuxInt = int64ToAuxInt(c)
2307 v.AddArg2(x0, y)
2308 return true
2309 }
2310
2311
2312
2313 for {
2314 x0 := v_0
2315 x1 := v_1
2316 if x1.Op != OpARM64SRAconst {
2317 break
2318 }
2319 c := auxIntToInt64(x1.AuxInt)
2320 y := x1.Args[0]
2321 if !(clobberIfDead(x1)) {
2322 break
2323 }
2324 v.reset(OpARM64BICshiftRA)
2325 v.AuxInt = int64ToAuxInt(c)
2326 v.AddArg2(x0, y)
2327 return true
2328 }
2329
2330
2331
2332 for {
2333 x0 := v_0
2334 x1 := v_1
2335 if x1.Op != OpARM64RORconst {
2336 break
2337 }
2338 c := auxIntToInt64(x1.AuxInt)
2339 y := x1.Args[0]
2340 if !(clobberIfDead(x1)) {
2341 break
2342 }
2343 v.reset(OpARM64BICshiftRO)
2344 v.AuxInt = int64ToAuxInt(c)
2345 v.AddArg2(x0, y)
2346 return true
2347 }
2348 return false
2349 }
2350 func rewriteValueARM64_OpARM64BICshiftLL(v *Value) bool {
2351 v_1 := v.Args[1]
2352 v_0 := v.Args[0]
2353
2354
2355 for {
2356 d := auxIntToInt64(v.AuxInt)
2357 x := v_0
2358 if v_1.Op != OpARM64MOVDconst {
2359 break
2360 }
2361 c := auxIntToInt64(v_1.AuxInt)
2362 v.reset(OpARM64ANDconst)
2363 v.AuxInt = int64ToAuxInt(^int64(uint64(c) << uint64(d)))
2364 v.AddArg(x)
2365 return true
2366 }
2367
2368
2369 for {
2370 c := auxIntToInt64(v.AuxInt)
2371 if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != c {
2372 break
2373 }
2374 x := v_0.Args[0]
2375 if x != v_1 {
2376 break
2377 }
2378 v.reset(OpARM64MOVDconst)
2379 v.AuxInt = int64ToAuxInt(0)
2380 return true
2381 }
2382 return false
2383 }
2384 func rewriteValueARM64_OpARM64BICshiftRA(v *Value) bool {
2385 v_1 := v.Args[1]
2386 v_0 := v.Args[0]
2387
2388
2389 for {
2390 d := auxIntToInt64(v.AuxInt)
2391 x := v_0
2392 if v_1.Op != OpARM64MOVDconst {
2393 break
2394 }
2395 c := auxIntToInt64(v_1.AuxInt)
2396 v.reset(OpARM64ANDconst)
2397 v.AuxInt = int64ToAuxInt(^(c >> uint64(d)))
2398 v.AddArg(x)
2399 return true
2400 }
2401
2402
2403 for {
2404 c := auxIntToInt64(v.AuxInt)
2405 if v_0.Op != OpARM64SRAconst || auxIntToInt64(v_0.AuxInt) != c {
2406 break
2407 }
2408 x := v_0.Args[0]
2409 if x != v_1 {
2410 break
2411 }
2412 v.reset(OpARM64MOVDconst)
2413 v.AuxInt = int64ToAuxInt(0)
2414 return true
2415 }
2416 return false
2417 }
2418 func rewriteValueARM64_OpARM64BICshiftRL(v *Value) bool {
2419 v_1 := v.Args[1]
2420 v_0 := v.Args[0]
2421
2422
2423 for {
2424 d := auxIntToInt64(v.AuxInt)
2425 x := v_0
2426 if v_1.Op != OpARM64MOVDconst {
2427 break
2428 }
2429 c := auxIntToInt64(v_1.AuxInt)
2430 v.reset(OpARM64ANDconst)
2431 v.AuxInt = int64ToAuxInt(^int64(uint64(c) >> uint64(d)))
2432 v.AddArg(x)
2433 return true
2434 }
2435
2436
2437 for {
2438 c := auxIntToInt64(v.AuxInt)
2439 if v_0.Op != OpARM64SRLconst || auxIntToInt64(v_0.AuxInt) != c {
2440 break
2441 }
2442 x := v_0.Args[0]
2443 if x != v_1 {
2444 break
2445 }
2446 v.reset(OpARM64MOVDconst)
2447 v.AuxInt = int64ToAuxInt(0)
2448 return true
2449 }
2450 return false
2451 }
2452 func rewriteValueARM64_OpARM64BICshiftRO(v *Value) bool {
2453 v_1 := v.Args[1]
2454 v_0 := v.Args[0]
2455
2456
2457 for {
2458 d := auxIntToInt64(v.AuxInt)
2459 x := v_0
2460 if v_1.Op != OpARM64MOVDconst {
2461 break
2462 }
2463 c := auxIntToInt64(v_1.AuxInt)
2464 v.reset(OpARM64ANDconst)
2465 v.AuxInt = int64ToAuxInt(^rotateRight64(c, d))
2466 v.AddArg(x)
2467 return true
2468 }
2469
2470
2471 for {
2472 c := auxIntToInt64(v.AuxInt)
2473 if v_0.Op != OpARM64RORconst || auxIntToInt64(v_0.AuxInt) != c {
2474 break
2475 }
2476 x := v_0.Args[0]
2477 if x != v_1 {
2478 break
2479 }
2480 v.reset(OpARM64MOVDconst)
2481 v.AuxInt = int64ToAuxInt(0)
2482 return true
2483 }
2484 return false
2485 }
2486 func rewriteValueARM64_OpARM64CMN(v *Value) bool {
2487 v_1 := v.Args[1]
2488 v_0 := v.Args[0]
2489
2490
2491 for {
2492 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2493 x := v_0
2494 if v_1.Op != OpARM64MOVDconst {
2495 continue
2496 }
2497 c := auxIntToInt64(v_1.AuxInt)
2498 v.reset(OpARM64CMNconst)
2499 v.AuxInt = int64ToAuxInt(c)
2500 v.AddArg(x)
2501 return true
2502 }
2503 break
2504 }
2505
2506
2507
2508 for {
2509 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2510 x0 := v_0
2511 x1 := v_1
2512 if x1.Op != OpARM64SLLconst {
2513 continue
2514 }
2515 c := auxIntToInt64(x1.AuxInt)
2516 y := x1.Args[0]
2517 if !(clobberIfDead(x1)) {
2518 continue
2519 }
2520 v.reset(OpARM64CMNshiftLL)
2521 v.AuxInt = int64ToAuxInt(c)
2522 v.AddArg2(x0, y)
2523 return true
2524 }
2525 break
2526 }
2527
2528
2529
2530 for {
2531 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2532 x0 := v_0
2533 x1 := v_1
2534 if x1.Op != OpARM64SRLconst {
2535 continue
2536 }
2537 c := auxIntToInt64(x1.AuxInt)
2538 y := x1.Args[0]
2539 if !(clobberIfDead(x1)) {
2540 continue
2541 }
2542 v.reset(OpARM64CMNshiftRL)
2543 v.AuxInt = int64ToAuxInt(c)
2544 v.AddArg2(x0, y)
2545 return true
2546 }
2547 break
2548 }
2549
2550
2551
2552 for {
2553 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2554 x0 := v_0
2555 x1 := v_1
2556 if x1.Op != OpARM64SRAconst {
2557 continue
2558 }
2559 c := auxIntToInt64(x1.AuxInt)
2560 y := x1.Args[0]
2561 if !(clobberIfDead(x1)) {
2562 continue
2563 }
2564 v.reset(OpARM64CMNshiftRA)
2565 v.AuxInt = int64ToAuxInt(c)
2566 v.AddArg2(x0, y)
2567 return true
2568 }
2569 break
2570 }
2571 return false
2572 }
2573 func rewriteValueARM64_OpARM64CMNW(v *Value) bool {
2574 v_1 := v.Args[1]
2575 v_0 := v.Args[0]
2576
2577
2578 for {
2579 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
2580 x := v_0
2581 if v_1.Op != OpARM64MOVDconst {
2582 continue
2583 }
2584 c := auxIntToInt64(v_1.AuxInt)
2585 v.reset(OpARM64CMNWconst)
2586 v.AuxInt = int32ToAuxInt(int32(c))
2587 v.AddArg(x)
2588 return true
2589 }
2590 break
2591 }
2592 return false
2593 }
2594 func rewriteValueARM64_OpARM64CMNWconst(v *Value) bool {
2595 v_0 := v.Args[0]
2596
2597
2598
2599 for {
2600 c := auxIntToInt32(v.AuxInt)
2601 y := v_0
2602 if !(c < 0 && c != -1<<31) {
2603 break
2604 }
2605 v.reset(OpARM64CMPWconst)
2606 v.AuxInt = int32ToAuxInt(-c)
2607 v.AddArg(y)
2608 return true
2609 }
2610
2611
2612 for {
2613 y := auxIntToInt32(v.AuxInt)
2614 if v_0.Op != OpARM64MOVDconst {
2615 break
2616 }
2617 x := auxIntToInt64(v_0.AuxInt)
2618 v.reset(OpARM64FlagConstant)
2619 v.AuxInt = flagConstantToAuxInt(addFlags32(int32(x), y))
2620 return true
2621 }
2622 return false
2623 }
2624 func rewriteValueARM64_OpARM64CMNconst(v *Value) bool {
2625 v_0 := v.Args[0]
2626
2627
2628
2629 for {
2630 c := auxIntToInt64(v.AuxInt)
2631 y := v_0
2632 if !(c < 0 && c != -1<<63) {
2633 break
2634 }
2635 v.reset(OpARM64CMPconst)
2636 v.AuxInt = int64ToAuxInt(-c)
2637 v.AddArg(y)
2638 return true
2639 }
2640
2641
2642 for {
2643 y := auxIntToInt64(v.AuxInt)
2644 if v_0.Op != OpARM64MOVDconst {
2645 break
2646 }
2647 x := auxIntToInt64(v_0.AuxInt)
2648 v.reset(OpARM64FlagConstant)
2649 v.AuxInt = flagConstantToAuxInt(addFlags64(x, y))
2650 return true
2651 }
2652 return false
2653 }
2654 func rewriteValueARM64_OpARM64CMNshiftLL(v *Value) bool {
2655 v_1 := v.Args[1]
2656 v_0 := v.Args[0]
2657 b := v.Block
2658
2659
2660 for {
2661 d := auxIntToInt64(v.AuxInt)
2662 if v_0.Op != OpARM64MOVDconst {
2663 break
2664 }
2665 c := auxIntToInt64(v_0.AuxInt)
2666 x := v_1
2667 v.reset(OpARM64CMNconst)
2668 v.AuxInt = int64ToAuxInt(c)
2669 v0 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
2670 v0.AuxInt = int64ToAuxInt(d)
2671 v0.AddArg(x)
2672 v.AddArg(v0)
2673 return true
2674 }
2675
2676
2677 for {
2678 d := auxIntToInt64(v.AuxInt)
2679 x := v_0
2680 if v_1.Op != OpARM64MOVDconst {
2681 break
2682 }
2683 c := auxIntToInt64(v_1.AuxInt)
2684 v.reset(OpARM64CMNconst)
2685 v.AuxInt = int64ToAuxInt(int64(uint64(c) << uint64(d)))
2686 v.AddArg(x)
2687 return true
2688 }
2689 return false
2690 }
2691 func rewriteValueARM64_OpARM64CMNshiftRA(v *Value) bool {
2692 v_1 := v.Args[1]
2693 v_0 := v.Args[0]
2694 b := v.Block
2695
2696
2697 for {
2698 d := auxIntToInt64(v.AuxInt)
2699 if v_0.Op != OpARM64MOVDconst {
2700 break
2701 }
2702 c := auxIntToInt64(v_0.AuxInt)
2703 x := v_1
2704 v.reset(OpARM64CMNconst)
2705 v.AuxInt = int64ToAuxInt(c)
2706 v0 := b.NewValue0(v.Pos, OpARM64SRAconst, x.Type)
2707 v0.AuxInt = int64ToAuxInt(d)
2708 v0.AddArg(x)
2709 v.AddArg(v0)
2710 return true
2711 }
2712
2713
2714 for {
2715 d := auxIntToInt64(v.AuxInt)
2716 x := v_0
2717 if v_1.Op != OpARM64MOVDconst {
2718 break
2719 }
2720 c := auxIntToInt64(v_1.AuxInt)
2721 v.reset(OpARM64CMNconst)
2722 v.AuxInt = int64ToAuxInt(c >> uint64(d))
2723 v.AddArg(x)
2724 return true
2725 }
2726 return false
2727 }
2728 func rewriteValueARM64_OpARM64CMNshiftRL(v *Value) bool {
2729 v_1 := v.Args[1]
2730 v_0 := v.Args[0]
2731 b := v.Block
2732
2733
2734 for {
2735 d := auxIntToInt64(v.AuxInt)
2736 if v_0.Op != OpARM64MOVDconst {
2737 break
2738 }
2739 c := auxIntToInt64(v_0.AuxInt)
2740 x := v_1
2741 v.reset(OpARM64CMNconst)
2742 v.AuxInt = int64ToAuxInt(c)
2743 v0 := b.NewValue0(v.Pos, OpARM64SRLconst, x.Type)
2744 v0.AuxInt = int64ToAuxInt(d)
2745 v0.AddArg(x)
2746 v.AddArg(v0)
2747 return true
2748 }
2749
2750
2751 for {
2752 d := auxIntToInt64(v.AuxInt)
2753 x := v_0
2754 if v_1.Op != OpARM64MOVDconst {
2755 break
2756 }
2757 c := auxIntToInt64(v_1.AuxInt)
2758 v.reset(OpARM64CMNconst)
2759 v.AuxInt = int64ToAuxInt(int64(uint64(c) >> uint64(d)))
2760 v.AddArg(x)
2761 return true
2762 }
2763 return false
2764 }
2765 func rewriteValueARM64_OpARM64CMP(v *Value) bool {
2766 v_1 := v.Args[1]
2767 v_0 := v.Args[0]
2768 b := v.Block
2769
2770
2771 for {
2772 x := v_0
2773 if v_1.Op != OpARM64MOVDconst {
2774 break
2775 }
2776 c := auxIntToInt64(v_1.AuxInt)
2777 v.reset(OpARM64CMPconst)
2778 v.AuxInt = int64ToAuxInt(c)
2779 v.AddArg(x)
2780 return true
2781 }
2782
2783
2784 for {
2785 if v_0.Op != OpARM64MOVDconst {
2786 break
2787 }
2788 c := auxIntToInt64(v_0.AuxInt)
2789 x := v_1
2790 v.reset(OpARM64InvertFlags)
2791 v0 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
2792 v0.AuxInt = int64ToAuxInt(c)
2793 v0.AddArg(x)
2794 v.AddArg(v0)
2795 return true
2796 }
2797
2798
2799
2800 for {
2801 x := v_0
2802 y := v_1
2803 if !(canonLessThan(x, y)) {
2804 break
2805 }
2806 v.reset(OpARM64InvertFlags)
2807 v0 := b.NewValue0(v.Pos, OpARM64CMP, types.TypeFlags)
2808 v0.AddArg2(y, x)
2809 v.AddArg(v0)
2810 return true
2811 }
2812
2813
2814
2815 for {
2816 x0 := v_0
2817 x1 := v_1
2818 if x1.Op != OpARM64SLLconst {
2819 break
2820 }
2821 c := auxIntToInt64(x1.AuxInt)
2822 y := x1.Args[0]
2823 if !(clobberIfDead(x1)) {
2824 break
2825 }
2826 v.reset(OpARM64CMPshiftLL)
2827 v.AuxInt = int64ToAuxInt(c)
2828 v.AddArg2(x0, y)
2829 return true
2830 }
2831
2832
2833
2834 for {
2835 x0 := v_0
2836 if x0.Op != OpARM64SLLconst {
2837 break
2838 }
2839 c := auxIntToInt64(x0.AuxInt)
2840 y := x0.Args[0]
2841 x1 := v_1
2842 if !(clobberIfDead(x0)) {
2843 break
2844 }
2845 v.reset(OpARM64InvertFlags)
2846 v0 := b.NewValue0(v.Pos, OpARM64CMPshiftLL, types.TypeFlags)
2847 v0.AuxInt = int64ToAuxInt(c)
2848 v0.AddArg2(x1, y)
2849 v.AddArg(v0)
2850 return true
2851 }
2852
2853
2854
2855 for {
2856 x0 := v_0
2857 x1 := v_1
2858 if x1.Op != OpARM64SRLconst {
2859 break
2860 }
2861 c := auxIntToInt64(x1.AuxInt)
2862 y := x1.Args[0]
2863 if !(clobberIfDead(x1)) {
2864 break
2865 }
2866 v.reset(OpARM64CMPshiftRL)
2867 v.AuxInt = int64ToAuxInt(c)
2868 v.AddArg2(x0, y)
2869 return true
2870 }
2871
2872
2873
2874 for {
2875 x0 := v_0
2876 if x0.Op != OpARM64SRLconst {
2877 break
2878 }
2879 c := auxIntToInt64(x0.AuxInt)
2880 y := x0.Args[0]
2881 x1 := v_1
2882 if !(clobberIfDead(x0)) {
2883 break
2884 }
2885 v.reset(OpARM64InvertFlags)
2886 v0 := b.NewValue0(v.Pos, OpARM64CMPshiftRL, types.TypeFlags)
2887 v0.AuxInt = int64ToAuxInt(c)
2888 v0.AddArg2(x1, y)
2889 v.AddArg(v0)
2890 return true
2891 }
2892
2893
2894
2895 for {
2896 x0 := v_0
2897 x1 := v_1
2898 if x1.Op != OpARM64SRAconst {
2899 break
2900 }
2901 c := auxIntToInt64(x1.AuxInt)
2902 y := x1.Args[0]
2903 if !(clobberIfDead(x1)) {
2904 break
2905 }
2906 v.reset(OpARM64CMPshiftRA)
2907 v.AuxInt = int64ToAuxInt(c)
2908 v.AddArg2(x0, y)
2909 return true
2910 }
2911
2912
2913
2914 for {
2915 x0 := v_0
2916 if x0.Op != OpARM64SRAconst {
2917 break
2918 }
2919 c := auxIntToInt64(x0.AuxInt)
2920 y := x0.Args[0]
2921 x1 := v_1
2922 if !(clobberIfDead(x0)) {
2923 break
2924 }
2925 v.reset(OpARM64InvertFlags)
2926 v0 := b.NewValue0(v.Pos, OpARM64CMPshiftRA, types.TypeFlags)
2927 v0.AuxInt = int64ToAuxInt(c)
2928 v0.AddArg2(x1, y)
2929 v.AddArg(v0)
2930 return true
2931 }
2932 return false
2933 }
2934 func rewriteValueARM64_OpARM64CMPW(v *Value) bool {
2935 v_1 := v.Args[1]
2936 v_0 := v.Args[0]
2937 b := v.Block
2938
2939
2940 for {
2941 x := v_0
2942 if v_1.Op != OpARM64MOVDconst {
2943 break
2944 }
2945 c := auxIntToInt64(v_1.AuxInt)
2946 v.reset(OpARM64CMPWconst)
2947 v.AuxInt = int32ToAuxInt(int32(c))
2948 v.AddArg(x)
2949 return true
2950 }
2951
2952
2953 for {
2954 if v_0.Op != OpARM64MOVDconst {
2955 break
2956 }
2957 c := auxIntToInt64(v_0.AuxInt)
2958 x := v_1
2959 v.reset(OpARM64InvertFlags)
2960 v0 := b.NewValue0(v.Pos, OpARM64CMPWconst, types.TypeFlags)
2961 v0.AuxInt = int32ToAuxInt(int32(c))
2962 v0.AddArg(x)
2963 v.AddArg(v0)
2964 return true
2965 }
2966
2967
2968
2969 for {
2970 x := v_0
2971 y := v_1
2972 if !(canonLessThan(x, y)) {
2973 break
2974 }
2975 v.reset(OpARM64InvertFlags)
2976 v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
2977 v0.AddArg2(y, x)
2978 v.AddArg(v0)
2979 return true
2980 }
2981 return false
2982 }
2983 func rewriteValueARM64_OpARM64CMPWconst(v *Value) bool {
2984 v_0 := v.Args[0]
2985
2986
2987
2988 for {
2989 c := auxIntToInt32(v.AuxInt)
2990 y := v_0
2991 if !(c < 0 && c != -1<<31) {
2992 break
2993 }
2994 v.reset(OpARM64CMNWconst)
2995 v.AuxInt = int32ToAuxInt(-c)
2996 v.AddArg(y)
2997 return true
2998 }
2999
3000
3001 for {
3002 y := auxIntToInt32(v.AuxInt)
3003 if v_0.Op != OpARM64MOVDconst {
3004 break
3005 }
3006 x := auxIntToInt64(v_0.AuxInt)
3007 v.reset(OpARM64FlagConstant)
3008 v.AuxInt = flagConstantToAuxInt(subFlags32(int32(x), y))
3009 return true
3010 }
3011
3012
3013
3014 for {
3015 c := auxIntToInt32(v.AuxInt)
3016 if v_0.Op != OpARM64MOVBUreg || !(0xff < c) {
3017 break
3018 }
3019 v.reset(OpARM64FlagConstant)
3020 v.AuxInt = flagConstantToAuxInt(subFlags64(0, 1))
3021 return true
3022 }
3023
3024
3025
3026 for {
3027 c := auxIntToInt32(v.AuxInt)
3028 if v_0.Op != OpARM64MOVHUreg || !(0xffff < c) {
3029 break
3030 }
3031 v.reset(OpARM64FlagConstant)
3032 v.AuxInt = flagConstantToAuxInt(subFlags64(0, 1))
3033 return true
3034 }
3035 return false
3036 }
3037 func rewriteValueARM64_OpARM64CMPconst(v *Value) bool {
3038 v_0 := v.Args[0]
3039
3040
3041
3042 for {
3043 c := auxIntToInt64(v.AuxInt)
3044 y := v_0
3045 if !(c < 0 && c != -1<<63) {
3046 break
3047 }
3048 v.reset(OpARM64CMNconst)
3049 v.AuxInt = int64ToAuxInt(-c)
3050 v.AddArg(y)
3051 return true
3052 }
3053
3054
3055 for {
3056 y := auxIntToInt64(v.AuxInt)
3057 if v_0.Op != OpARM64MOVDconst {
3058 break
3059 }
3060 x := auxIntToInt64(v_0.AuxInt)
3061 v.reset(OpARM64FlagConstant)
3062 v.AuxInt = flagConstantToAuxInt(subFlags64(x, y))
3063 return true
3064 }
3065
3066
3067
3068 for {
3069 c := auxIntToInt64(v.AuxInt)
3070 if v_0.Op != OpARM64MOVBUreg || !(0xff < c) {
3071 break
3072 }
3073 v.reset(OpARM64FlagConstant)
3074 v.AuxInt = flagConstantToAuxInt(subFlags64(0, 1))
3075 return true
3076 }
3077
3078
3079
3080 for {
3081 c := auxIntToInt64(v.AuxInt)
3082 if v_0.Op != OpARM64MOVHUreg || !(0xffff < c) {
3083 break
3084 }
3085 v.reset(OpARM64FlagConstant)
3086 v.AuxInt = flagConstantToAuxInt(subFlags64(0, 1))
3087 return true
3088 }
3089
3090
3091
3092 for {
3093 c := auxIntToInt64(v.AuxInt)
3094 if v_0.Op != OpARM64MOVWUreg || !(0xffffffff < c) {
3095 break
3096 }
3097 v.reset(OpARM64FlagConstant)
3098 v.AuxInt = flagConstantToAuxInt(subFlags64(0, 1))
3099 return true
3100 }
3101
3102
3103
3104 for {
3105 n := auxIntToInt64(v.AuxInt)
3106 if v_0.Op != OpARM64ANDconst {
3107 break
3108 }
3109 m := auxIntToInt64(v_0.AuxInt)
3110 if !(0 <= m && m < n) {
3111 break
3112 }
3113 v.reset(OpARM64FlagConstant)
3114 v.AuxInt = flagConstantToAuxInt(subFlags64(0, 1))
3115 return true
3116 }
3117
3118
3119
3120 for {
3121 n := auxIntToInt64(v.AuxInt)
3122 if v_0.Op != OpARM64SRLconst {
3123 break
3124 }
3125 c := auxIntToInt64(v_0.AuxInt)
3126 if !(0 <= n && 0 < c && c <= 63 && (1<<uint64(64-c)) <= uint64(n)) {
3127 break
3128 }
3129 v.reset(OpARM64FlagConstant)
3130 v.AuxInt = flagConstantToAuxInt(subFlags64(0, 1))
3131 return true
3132 }
3133 return false
3134 }
3135 func rewriteValueARM64_OpARM64CMPshiftLL(v *Value) bool {
3136 v_1 := v.Args[1]
3137 v_0 := v.Args[0]
3138 b := v.Block
3139
3140
3141 for {
3142 d := auxIntToInt64(v.AuxInt)
3143 if v_0.Op != OpARM64MOVDconst {
3144 break
3145 }
3146 c := auxIntToInt64(v_0.AuxInt)
3147 x := v_1
3148 v.reset(OpARM64InvertFlags)
3149 v0 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
3150 v0.AuxInt = int64ToAuxInt(c)
3151 v1 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
3152 v1.AuxInt = int64ToAuxInt(d)
3153 v1.AddArg(x)
3154 v0.AddArg(v1)
3155 v.AddArg(v0)
3156 return true
3157 }
3158
3159
3160 for {
3161 d := auxIntToInt64(v.AuxInt)
3162 x := v_0
3163 if v_1.Op != OpARM64MOVDconst {
3164 break
3165 }
3166 c := auxIntToInt64(v_1.AuxInt)
3167 v.reset(OpARM64CMPconst)
3168 v.AuxInt = int64ToAuxInt(int64(uint64(c) << uint64(d)))
3169 v.AddArg(x)
3170 return true
3171 }
3172 return false
3173 }
3174 func rewriteValueARM64_OpARM64CMPshiftRA(v *Value) bool {
3175 v_1 := v.Args[1]
3176 v_0 := v.Args[0]
3177 b := v.Block
3178
3179
3180 for {
3181 d := auxIntToInt64(v.AuxInt)
3182 if v_0.Op != OpARM64MOVDconst {
3183 break
3184 }
3185 c := auxIntToInt64(v_0.AuxInt)
3186 x := v_1
3187 v.reset(OpARM64InvertFlags)
3188 v0 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
3189 v0.AuxInt = int64ToAuxInt(c)
3190 v1 := b.NewValue0(v.Pos, OpARM64SRAconst, x.Type)
3191 v1.AuxInt = int64ToAuxInt(d)
3192 v1.AddArg(x)
3193 v0.AddArg(v1)
3194 v.AddArg(v0)
3195 return true
3196 }
3197
3198
3199 for {
3200 d := auxIntToInt64(v.AuxInt)
3201 x := v_0
3202 if v_1.Op != OpARM64MOVDconst {
3203 break
3204 }
3205 c := auxIntToInt64(v_1.AuxInt)
3206 v.reset(OpARM64CMPconst)
3207 v.AuxInt = int64ToAuxInt(c >> uint64(d))
3208 v.AddArg(x)
3209 return true
3210 }
3211 return false
3212 }
3213 func rewriteValueARM64_OpARM64CMPshiftRL(v *Value) bool {
3214 v_1 := v.Args[1]
3215 v_0 := v.Args[0]
3216 b := v.Block
3217
3218
3219 for {
3220 d := auxIntToInt64(v.AuxInt)
3221 if v_0.Op != OpARM64MOVDconst {
3222 break
3223 }
3224 c := auxIntToInt64(v_0.AuxInt)
3225 x := v_1
3226 v.reset(OpARM64InvertFlags)
3227 v0 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
3228 v0.AuxInt = int64ToAuxInt(c)
3229 v1 := b.NewValue0(v.Pos, OpARM64SRLconst, x.Type)
3230 v1.AuxInt = int64ToAuxInt(d)
3231 v1.AddArg(x)
3232 v0.AddArg(v1)
3233 v.AddArg(v0)
3234 return true
3235 }
3236
3237
3238 for {
3239 d := auxIntToInt64(v.AuxInt)
3240 x := v_0
3241 if v_1.Op != OpARM64MOVDconst {
3242 break
3243 }
3244 c := auxIntToInt64(v_1.AuxInt)
3245 v.reset(OpARM64CMPconst)
3246 v.AuxInt = int64ToAuxInt(int64(uint64(c) >> uint64(d)))
3247 v.AddArg(x)
3248 return true
3249 }
3250 return false
3251 }
3252 func rewriteValueARM64_OpARM64CSEL(v *Value) bool {
3253 v_2 := v.Args[2]
3254 v_1 := v.Args[1]
3255 v_0 := v.Args[0]
3256
3257
3258 for {
3259 cc := auxIntToOp(v.AuxInt)
3260 if v_0.Op != OpARM64MOVDconst || auxIntToInt64(v_0.AuxInt) != -1 || v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 0 {
3261 break
3262 }
3263 flag := v_2
3264 v.reset(OpARM64CSETM)
3265 v.AuxInt = opToAuxInt(cc)
3266 v.AddArg(flag)
3267 return true
3268 }
3269
3270
3271 for {
3272 cc := auxIntToOp(v.AuxInt)
3273 if v_0.Op != OpARM64MOVDconst || auxIntToInt64(v_0.AuxInt) != 0 || v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != -1 {
3274 break
3275 }
3276 flag := v_2
3277 v.reset(OpARM64CSETM)
3278 v.AuxInt = opToAuxInt(arm64Negate(cc))
3279 v.AddArg(flag)
3280 return true
3281 }
3282
3283
3284 for {
3285 cc := auxIntToOp(v.AuxInt)
3286 x := v_0
3287 if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 0 {
3288 break
3289 }
3290 flag := v_2
3291 v.reset(OpARM64CSEL0)
3292 v.AuxInt = opToAuxInt(cc)
3293 v.AddArg2(x, flag)
3294 return true
3295 }
3296
3297
3298 for {
3299 cc := auxIntToOp(v.AuxInt)
3300 if v_0.Op != OpARM64MOVDconst || auxIntToInt64(v_0.AuxInt) != 0 {
3301 break
3302 }
3303 y := v_1
3304 flag := v_2
3305 v.reset(OpARM64CSEL0)
3306 v.AuxInt = opToAuxInt(arm64Negate(cc))
3307 v.AddArg2(y, flag)
3308 return true
3309 }
3310
3311
3312 for {
3313 cc := auxIntToOp(v.AuxInt)
3314 x := v_0
3315 if v_1.Op != OpARM64ADDconst || auxIntToInt64(v_1.AuxInt) != 1 {
3316 break
3317 }
3318 a := v_1.Args[0]
3319 flag := v_2
3320 v.reset(OpARM64CSINC)
3321 v.AuxInt = opToAuxInt(cc)
3322 v.AddArg3(x, a, flag)
3323 return true
3324 }
3325
3326
3327 for {
3328 cc := auxIntToOp(v.AuxInt)
3329 if v_0.Op != OpARM64ADDconst || auxIntToInt64(v_0.AuxInt) != 1 {
3330 break
3331 }
3332 a := v_0.Args[0]
3333 x := v_1
3334 flag := v_2
3335 v.reset(OpARM64CSINC)
3336 v.AuxInt = opToAuxInt(arm64Negate(cc))
3337 v.AddArg3(x, a, flag)
3338 return true
3339 }
3340
3341
3342 for {
3343 cc := auxIntToOp(v.AuxInt)
3344 x := v_0
3345 if v_1.Op != OpARM64MVN {
3346 break
3347 }
3348 a := v_1.Args[0]
3349 flag := v_2
3350 v.reset(OpARM64CSINV)
3351 v.AuxInt = opToAuxInt(cc)
3352 v.AddArg3(x, a, flag)
3353 return true
3354 }
3355
3356
3357 for {
3358 cc := auxIntToOp(v.AuxInt)
3359 if v_0.Op != OpARM64MVN {
3360 break
3361 }
3362 a := v_0.Args[0]
3363 x := v_1
3364 flag := v_2
3365 v.reset(OpARM64CSINV)
3366 v.AuxInt = opToAuxInt(arm64Negate(cc))
3367 v.AddArg3(x, a, flag)
3368 return true
3369 }
3370
3371
3372 for {
3373 cc := auxIntToOp(v.AuxInt)
3374 x := v_0
3375 if v_1.Op != OpARM64NEG {
3376 break
3377 }
3378 a := v_1.Args[0]
3379 flag := v_2
3380 v.reset(OpARM64CSNEG)
3381 v.AuxInt = opToAuxInt(cc)
3382 v.AddArg3(x, a, flag)
3383 return true
3384 }
3385
3386
3387 for {
3388 cc := auxIntToOp(v.AuxInt)
3389 if v_0.Op != OpARM64NEG {
3390 break
3391 }
3392 a := v_0.Args[0]
3393 x := v_1
3394 flag := v_2
3395 v.reset(OpARM64CSNEG)
3396 v.AuxInt = opToAuxInt(arm64Negate(cc))
3397 v.AddArg3(x, a, flag)
3398 return true
3399 }
3400
3401
3402 for {
3403 cc := auxIntToOp(v.AuxInt)
3404 x := v_0
3405 y := v_1
3406 if v_2.Op != OpARM64InvertFlags {
3407 break
3408 }
3409 cmp := v_2.Args[0]
3410 v.reset(OpARM64CSEL)
3411 v.AuxInt = opToAuxInt(arm64Invert(cc))
3412 v.AddArg3(x, y, cmp)
3413 return true
3414 }
3415
3416
3417
3418 for {
3419 cc := auxIntToOp(v.AuxInt)
3420 x := v_0
3421 flag := v_2
3422 if !(ccARM64Eval(cc, flag) > 0) {
3423 break
3424 }
3425 v.copyOf(x)
3426 return true
3427 }
3428
3429
3430
3431 for {
3432 cc := auxIntToOp(v.AuxInt)
3433 y := v_1
3434 flag := v_2
3435 if !(ccARM64Eval(cc, flag) < 0) {
3436 break
3437 }
3438 v.copyOf(y)
3439 return true
3440 }
3441
3442
3443
3444 for {
3445 cc := auxIntToOp(v.AuxInt)
3446 x := v_0
3447 y := v_1
3448 if v_2.Op != OpARM64CMPWconst || auxIntToInt32(v_2.AuxInt) != 0 {
3449 break
3450 }
3451 boolval := v_2.Args[0]
3452 if !(cc == OpARM64NotEqual && flagArg(boolval) != nil) {
3453 break
3454 }
3455 v.reset(OpARM64CSEL)
3456 v.AuxInt = opToAuxInt(boolval.Op)
3457 v.AddArg3(x, y, flagArg(boolval))
3458 return true
3459 }
3460
3461
3462
3463 for {
3464 cc := auxIntToOp(v.AuxInt)
3465 x := v_0
3466 y := v_1
3467 if v_2.Op != OpARM64CMPWconst || auxIntToInt32(v_2.AuxInt) != 0 {
3468 break
3469 }
3470 boolval := v_2.Args[0]
3471 if !(cc == OpARM64Equal && flagArg(boolval) != nil) {
3472 break
3473 }
3474 v.reset(OpARM64CSEL)
3475 v.AuxInt = opToAuxInt(arm64Negate(boolval.Op))
3476 v.AddArg3(x, y, flagArg(boolval))
3477 return true
3478 }
3479 return false
3480 }
3481 func rewriteValueARM64_OpARM64CSEL0(v *Value) bool {
3482 v_1 := v.Args[1]
3483 v_0 := v.Args[0]
3484
3485
3486 for {
3487 cc := auxIntToOp(v.AuxInt)
3488 x := v_0
3489 if v_1.Op != OpARM64InvertFlags {
3490 break
3491 }
3492 cmp := v_1.Args[0]
3493 v.reset(OpARM64CSEL0)
3494 v.AuxInt = opToAuxInt(arm64Invert(cc))
3495 v.AddArg2(x, cmp)
3496 return true
3497 }
3498
3499
3500
3501 for {
3502 cc := auxIntToOp(v.AuxInt)
3503 x := v_0
3504 flag := v_1
3505 if !(ccARM64Eval(cc, flag) > 0) {
3506 break
3507 }
3508 v.copyOf(x)
3509 return true
3510 }
3511
3512
3513
3514 for {
3515 cc := auxIntToOp(v.AuxInt)
3516 flag := v_1
3517 if !(ccARM64Eval(cc, flag) < 0) {
3518 break
3519 }
3520 v.reset(OpARM64MOVDconst)
3521 v.AuxInt = int64ToAuxInt(0)
3522 return true
3523 }
3524
3525
3526
3527 for {
3528 cc := auxIntToOp(v.AuxInt)
3529 x := v_0
3530 if v_1.Op != OpARM64CMPWconst || auxIntToInt32(v_1.AuxInt) != 0 {
3531 break
3532 }
3533 boolval := v_1.Args[0]
3534 if !(cc == OpARM64NotEqual && flagArg(boolval) != nil) {
3535 break
3536 }
3537 v.reset(OpARM64CSEL0)
3538 v.AuxInt = opToAuxInt(boolval.Op)
3539 v.AddArg2(x, flagArg(boolval))
3540 return true
3541 }
3542
3543
3544
3545 for {
3546 cc := auxIntToOp(v.AuxInt)
3547 x := v_0
3548 if v_1.Op != OpARM64CMPWconst || auxIntToInt32(v_1.AuxInt) != 0 {
3549 break
3550 }
3551 boolval := v_1.Args[0]
3552 if !(cc == OpARM64Equal && flagArg(boolval) != nil) {
3553 break
3554 }
3555 v.reset(OpARM64CSEL0)
3556 v.AuxInt = opToAuxInt(arm64Negate(boolval.Op))
3557 v.AddArg2(x, flagArg(boolval))
3558 return true
3559 }
3560 return false
3561 }
3562 func rewriteValueARM64_OpARM64CSETM(v *Value) bool {
3563 v_0 := v.Args[0]
3564
3565
3566 for {
3567 cc := auxIntToOp(v.AuxInt)
3568 if v_0.Op != OpARM64InvertFlags {
3569 break
3570 }
3571 cmp := v_0.Args[0]
3572 v.reset(OpARM64CSETM)
3573 v.AuxInt = opToAuxInt(arm64Invert(cc))
3574 v.AddArg(cmp)
3575 return true
3576 }
3577
3578
3579
3580 for {
3581 cc := auxIntToOp(v.AuxInt)
3582 flag := v_0
3583 if !(ccARM64Eval(cc, flag) > 0) {
3584 break
3585 }
3586 v.reset(OpARM64MOVDconst)
3587 v.AuxInt = int64ToAuxInt(-1)
3588 return true
3589 }
3590
3591
3592
3593 for {
3594 cc := auxIntToOp(v.AuxInt)
3595 flag := v_0
3596 if !(ccARM64Eval(cc, flag) < 0) {
3597 break
3598 }
3599 v.reset(OpARM64MOVDconst)
3600 v.AuxInt = int64ToAuxInt(0)
3601 return true
3602 }
3603 return false
3604 }
3605 func rewriteValueARM64_OpARM64CSINC(v *Value) bool {
3606 v_2 := v.Args[2]
3607 v_1 := v.Args[1]
3608 v_0 := v.Args[0]
3609
3610
3611 for {
3612 cc := auxIntToOp(v.AuxInt)
3613 x := v_0
3614 y := v_1
3615 if v_2.Op != OpARM64InvertFlags {
3616 break
3617 }
3618 cmp := v_2.Args[0]
3619 v.reset(OpARM64CSINC)
3620 v.AuxInt = opToAuxInt(arm64Invert(cc))
3621 v.AddArg3(x, y, cmp)
3622 return true
3623 }
3624
3625
3626
3627 for {
3628 cc := auxIntToOp(v.AuxInt)
3629 x := v_0
3630 flag := v_2
3631 if !(ccARM64Eval(cc, flag) > 0) {
3632 break
3633 }
3634 v.copyOf(x)
3635 return true
3636 }
3637
3638
3639
3640 for {
3641 cc := auxIntToOp(v.AuxInt)
3642 y := v_1
3643 flag := v_2
3644 if !(ccARM64Eval(cc, flag) < 0) {
3645 break
3646 }
3647 v.reset(OpARM64ADDconst)
3648 v.AuxInt = int64ToAuxInt(1)
3649 v.AddArg(y)
3650 return true
3651 }
3652 return false
3653 }
3654 func rewriteValueARM64_OpARM64CSINV(v *Value) bool {
3655 v_2 := v.Args[2]
3656 v_1 := v.Args[1]
3657 v_0 := v.Args[0]
3658
3659
3660 for {
3661 cc := auxIntToOp(v.AuxInt)
3662 x := v_0
3663 y := v_1
3664 if v_2.Op != OpARM64InvertFlags {
3665 break
3666 }
3667 cmp := v_2.Args[0]
3668 v.reset(OpARM64CSINV)
3669 v.AuxInt = opToAuxInt(arm64Invert(cc))
3670 v.AddArg3(x, y, cmp)
3671 return true
3672 }
3673
3674
3675
3676 for {
3677 cc := auxIntToOp(v.AuxInt)
3678 x := v_0
3679 flag := v_2
3680 if !(ccARM64Eval(cc, flag) > 0) {
3681 break
3682 }
3683 v.copyOf(x)
3684 return true
3685 }
3686
3687
3688
3689 for {
3690 cc := auxIntToOp(v.AuxInt)
3691 y := v_1
3692 flag := v_2
3693 if !(ccARM64Eval(cc, flag) < 0) {
3694 break
3695 }
3696 v.reset(OpNot)
3697 v.AddArg(y)
3698 return true
3699 }
3700 return false
3701 }
3702 func rewriteValueARM64_OpARM64CSNEG(v *Value) bool {
3703 v_2 := v.Args[2]
3704 v_1 := v.Args[1]
3705 v_0 := v.Args[0]
3706
3707
3708 for {
3709 cc := auxIntToOp(v.AuxInt)
3710 x := v_0
3711 y := v_1
3712 if v_2.Op != OpARM64InvertFlags {
3713 break
3714 }
3715 cmp := v_2.Args[0]
3716 v.reset(OpARM64CSNEG)
3717 v.AuxInt = opToAuxInt(arm64Invert(cc))
3718 v.AddArg3(x, y, cmp)
3719 return true
3720 }
3721
3722
3723
3724 for {
3725 cc := auxIntToOp(v.AuxInt)
3726 x := v_0
3727 flag := v_2
3728 if !(ccARM64Eval(cc, flag) > 0) {
3729 break
3730 }
3731 v.copyOf(x)
3732 return true
3733 }
3734
3735
3736
3737 for {
3738 cc := auxIntToOp(v.AuxInt)
3739 y := v_1
3740 flag := v_2
3741 if !(ccARM64Eval(cc, flag) < 0) {
3742 break
3743 }
3744 v.reset(OpARM64NEG)
3745 v.AddArg(y)
3746 return true
3747 }
3748 return false
3749 }
3750 func rewriteValueARM64_OpARM64DIV(v *Value) bool {
3751 v_1 := v.Args[1]
3752 v_0 := v.Args[0]
3753
3754
3755
3756 for {
3757 if v_0.Op != OpARM64MOVDconst {
3758 break
3759 }
3760 c := auxIntToInt64(v_0.AuxInt)
3761 if v_1.Op != OpARM64MOVDconst {
3762 break
3763 }
3764 d := auxIntToInt64(v_1.AuxInt)
3765 if !(d != 0) {
3766 break
3767 }
3768 v.reset(OpARM64MOVDconst)
3769 v.AuxInt = int64ToAuxInt(c / d)
3770 return true
3771 }
3772 return false
3773 }
3774 func rewriteValueARM64_OpARM64DIVW(v *Value) bool {
3775 v_1 := v.Args[1]
3776 v_0 := v.Args[0]
3777
3778
3779
3780 for {
3781 if v_0.Op != OpARM64MOVDconst {
3782 break
3783 }
3784 c := auxIntToInt64(v_0.AuxInt)
3785 if v_1.Op != OpARM64MOVDconst {
3786 break
3787 }
3788 d := auxIntToInt64(v_1.AuxInt)
3789 if !(d != 0) {
3790 break
3791 }
3792 v.reset(OpARM64MOVDconst)
3793 v.AuxInt = int64ToAuxInt(int64(uint32(int32(c) / int32(d))))
3794 return true
3795 }
3796 return false
3797 }
3798 func rewriteValueARM64_OpARM64EON(v *Value) bool {
3799 v_1 := v.Args[1]
3800 v_0 := v.Args[0]
3801
3802
3803 for {
3804 x := v_0
3805 if v_1.Op != OpARM64MOVDconst {
3806 break
3807 }
3808 c := auxIntToInt64(v_1.AuxInt)
3809 v.reset(OpARM64XORconst)
3810 v.AuxInt = int64ToAuxInt(^c)
3811 v.AddArg(x)
3812 return true
3813 }
3814
3815
3816 for {
3817 x := v_0
3818 if x != v_1 {
3819 break
3820 }
3821 v.reset(OpARM64MOVDconst)
3822 v.AuxInt = int64ToAuxInt(-1)
3823 return true
3824 }
3825
3826
3827
3828 for {
3829 x0 := v_0
3830 x1 := v_1
3831 if x1.Op != OpARM64SLLconst {
3832 break
3833 }
3834 c := auxIntToInt64(x1.AuxInt)
3835 y := x1.Args[0]
3836 if !(clobberIfDead(x1)) {
3837 break
3838 }
3839 v.reset(OpARM64EONshiftLL)
3840 v.AuxInt = int64ToAuxInt(c)
3841 v.AddArg2(x0, y)
3842 return true
3843 }
3844
3845
3846
3847 for {
3848 x0 := v_0
3849 x1 := v_1
3850 if x1.Op != OpARM64SRLconst {
3851 break
3852 }
3853 c := auxIntToInt64(x1.AuxInt)
3854 y := x1.Args[0]
3855 if !(clobberIfDead(x1)) {
3856 break
3857 }
3858 v.reset(OpARM64EONshiftRL)
3859 v.AuxInt = int64ToAuxInt(c)
3860 v.AddArg2(x0, y)
3861 return true
3862 }
3863
3864
3865
3866 for {
3867 x0 := v_0
3868 x1 := v_1
3869 if x1.Op != OpARM64SRAconst {
3870 break
3871 }
3872 c := auxIntToInt64(x1.AuxInt)
3873 y := x1.Args[0]
3874 if !(clobberIfDead(x1)) {
3875 break
3876 }
3877 v.reset(OpARM64EONshiftRA)
3878 v.AuxInt = int64ToAuxInt(c)
3879 v.AddArg2(x0, y)
3880 return true
3881 }
3882
3883
3884
3885 for {
3886 x0 := v_0
3887 x1 := v_1
3888 if x1.Op != OpARM64RORconst {
3889 break
3890 }
3891 c := auxIntToInt64(x1.AuxInt)
3892 y := x1.Args[0]
3893 if !(clobberIfDead(x1)) {
3894 break
3895 }
3896 v.reset(OpARM64EONshiftRO)
3897 v.AuxInt = int64ToAuxInt(c)
3898 v.AddArg2(x0, y)
3899 return true
3900 }
3901 return false
3902 }
3903 func rewriteValueARM64_OpARM64EONshiftLL(v *Value) bool {
3904 v_1 := v.Args[1]
3905 v_0 := v.Args[0]
3906
3907
3908 for {
3909 d := auxIntToInt64(v.AuxInt)
3910 x := v_0
3911 if v_1.Op != OpARM64MOVDconst {
3912 break
3913 }
3914 c := auxIntToInt64(v_1.AuxInt)
3915 v.reset(OpARM64XORconst)
3916 v.AuxInt = int64ToAuxInt(^int64(uint64(c) << uint64(d)))
3917 v.AddArg(x)
3918 return true
3919 }
3920
3921
3922 for {
3923 c := auxIntToInt64(v.AuxInt)
3924 if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != c {
3925 break
3926 }
3927 x := v_0.Args[0]
3928 if x != v_1 {
3929 break
3930 }
3931 v.reset(OpARM64MOVDconst)
3932 v.AuxInt = int64ToAuxInt(-1)
3933 return true
3934 }
3935 return false
3936 }
3937 func rewriteValueARM64_OpARM64EONshiftRA(v *Value) bool {
3938 v_1 := v.Args[1]
3939 v_0 := v.Args[0]
3940
3941
3942 for {
3943 d := auxIntToInt64(v.AuxInt)
3944 x := v_0
3945 if v_1.Op != OpARM64MOVDconst {
3946 break
3947 }
3948 c := auxIntToInt64(v_1.AuxInt)
3949 v.reset(OpARM64XORconst)
3950 v.AuxInt = int64ToAuxInt(^(c >> uint64(d)))
3951 v.AddArg(x)
3952 return true
3953 }
3954
3955
3956 for {
3957 c := auxIntToInt64(v.AuxInt)
3958 if v_0.Op != OpARM64SRAconst || auxIntToInt64(v_0.AuxInt) != c {
3959 break
3960 }
3961 x := v_0.Args[0]
3962 if x != v_1 {
3963 break
3964 }
3965 v.reset(OpARM64MOVDconst)
3966 v.AuxInt = int64ToAuxInt(-1)
3967 return true
3968 }
3969 return false
3970 }
3971 func rewriteValueARM64_OpARM64EONshiftRL(v *Value) bool {
3972 v_1 := v.Args[1]
3973 v_0 := v.Args[0]
3974
3975
3976 for {
3977 d := auxIntToInt64(v.AuxInt)
3978 x := v_0
3979 if v_1.Op != OpARM64MOVDconst {
3980 break
3981 }
3982 c := auxIntToInt64(v_1.AuxInt)
3983 v.reset(OpARM64XORconst)
3984 v.AuxInt = int64ToAuxInt(^int64(uint64(c) >> uint64(d)))
3985 v.AddArg(x)
3986 return true
3987 }
3988
3989
3990 for {
3991 c := auxIntToInt64(v.AuxInt)
3992 if v_0.Op != OpARM64SRLconst || auxIntToInt64(v_0.AuxInt) != c {
3993 break
3994 }
3995 x := v_0.Args[0]
3996 if x != v_1 {
3997 break
3998 }
3999 v.reset(OpARM64MOVDconst)
4000 v.AuxInt = int64ToAuxInt(-1)
4001 return true
4002 }
4003 return false
4004 }
4005 func rewriteValueARM64_OpARM64EONshiftRO(v *Value) bool {
4006 v_1 := v.Args[1]
4007 v_0 := v.Args[0]
4008
4009
4010 for {
4011 d := auxIntToInt64(v.AuxInt)
4012 x := v_0
4013 if v_1.Op != OpARM64MOVDconst {
4014 break
4015 }
4016 c := auxIntToInt64(v_1.AuxInt)
4017 v.reset(OpARM64XORconst)
4018 v.AuxInt = int64ToAuxInt(^rotateRight64(c, d))
4019 v.AddArg(x)
4020 return true
4021 }
4022
4023
4024 for {
4025 c := auxIntToInt64(v.AuxInt)
4026 if v_0.Op != OpARM64RORconst || auxIntToInt64(v_0.AuxInt) != c {
4027 break
4028 }
4029 x := v_0.Args[0]
4030 if x != v_1 {
4031 break
4032 }
4033 v.reset(OpARM64MOVDconst)
4034 v.AuxInt = int64ToAuxInt(-1)
4035 return true
4036 }
4037 return false
4038 }
4039 func rewriteValueARM64_OpARM64Equal(v *Value) bool {
4040 v_0 := v.Args[0]
4041 b := v.Block
4042
4043
4044
4045 for {
4046 if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
4047 break
4048 }
4049 z := v_0.Args[0]
4050 if z.Op != OpARM64AND {
4051 break
4052 }
4053 y := z.Args[1]
4054 x := z.Args[0]
4055 if !(z.Uses == 1) {
4056 break
4057 }
4058 v.reset(OpARM64Equal)
4059 v0 := b.NewValue0(v.Pos, OpARM64TST, types.TypeFlags)
4060 v0.AddArg2(x, y)
4061 v.AddArg(v0)
4062 return true
4063 }
4064
4065
4066
4067 for {
4068 if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
4069 break
4070 }
4071 x := v_0.Args[0]
4072 if x.Op != OpARM64ANDconst {
4073 break
4074 }
4075 c := auxIntToInt64(x.AuxInt)
4076 y := x.Args[0]
4077 if !(x.Uses == 1) {
4078 break
4079 }
4080 v.reset(OpARM64Equal)
4081 v0 := b.NewValue0(v.Pos, OpARM64TSTWconst, types.TypeFlags)
4082 v0.AuxInt = int32ToAuxInt(int32(c))
4083 v0.AddArg(y)
4084 v.AddArg(v0)
4085 return true
4086 }
4087
4088
4089
4090 for {
4091 if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
4092 break
4093 }
4094 z := v_0.Args[0]
4095 if z.Op != OpARM64AND {
4096 break
4097 }
4098 y := z.Args[1]
4099 x := z.Args[0]
4100 if !(z.Uses == 1) {
4101 break
4102 }
4103 v.reset(OpARM64Equal)
4104 v0 := b.NewValue0(v.Pos, OpARM64TSTW, types.TypeFlags)
4105 v0.AddArg2(x, y)
4106 v.AddArg(v0)
4107 return true
4108 }
4109
4110
4111
4112 for {
4113 if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
4114 break
4115 }
4116 x := v_0.Args[0]
4117 if x.Op != OpARM64ANDconst {
4118 break
4119 }
4120 c := auxIntToInt64(x.AuxInt)
4121 y := x.Args[0]
4122 if !(x.Uses == 1) {
4123 break
4124 }
4125 v.reset(OpARM64Equal)
4126 v0 := b.NewValue0(v.Pos, OpARM64TSTconst, types.TypeFlags)
4127 v0.AuxInt = int64ToAuxInt(c)
4128 v0.AddArg(y)
4129 v.AddArg(v0)
4130 return true
4131 }
4132
4133
4134
4135 for {
4136 if v_0.Op != OpARM64CMP {
4137 break
4138 }
4139 _ = v_0.Args[1]
4140 x := v_0.Args[0]
4141 z := v_0.Args[1]
4142 if z.Op != OpARM64NEG {
4143 break
4144 }
4145 y := z.Args[0]
4146 if !(z.Uses == 1) {
4147 break
4148 }
4149 v.reset(OpARM64Equal)
4150 v0 := b.NewValue0(v.Pos, OpARM64CMN, types.TypeFlags)
4151 v0.AddArg2(x, y)
4152 v.AddArg(v0)
4153 return true
4154 }
4155
4156
4157
4158 for {
4159 if v_0.Op != OpARM64CMPW {
4160 break
4161 }
4162 _ = v_0.Args[1]
4163 x := v_0.Args[0]
4164 z := v_0.Args[1]
4165 if z.Op != OpARM64NEG {
4166 break
4167 }
4168 y := z.Args[0]
4169 if !(z.Uses == 1) {
4170 break
4171 }
4172 v.reset(OpARM64Equal)
4173 v0 := b.NewValue0(v.Pos, OpARM64CMNW, types.TypeFlags)
4174 v0.AddArg2(x, y)
4175 v.AddArg(v0)
4176 return true
4177 }
4178
4179
4180
4181 for {
4182 if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
4183 break
4184 }
4185 x := v_0.Args[0]
4186 if x.Op != OpARM64ADDconst {
4187 break
4188 }
4189 c := auxIntToInt64(x.AuxInt)
4190 y := x.Args[0]
4191 if !(x.Uses == 1) {
4192 break
4193 }
4194 v.reset(OpARM64Equal)
4195 v0 := b.NewValue0(v.Pos, OpARM64CMNconst, types.TypeFlags)
4196 v0.AuxInt = int64ToAuxInt(c)
4197 v0.AddArg(y)
4198 v.AddArg(v0)
4199 return true
4200 }
4201
4202
4203
4204 for {
4205 if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
4206 break
4207 }
4208 x := v_0.Args[0]
4209 if x.Op != OpARM64ADDconst {
4210 break
4211 }
4212 c := auxIntToInt64(x.AuxInt)
4213 y := x.Args[0]
4214 if !(x.Uses == 1) {
4215 break
4216 }
4217 v.reset(OpARM64Equal)
4218 v0 := b.NewValue0(v.Pos, OpARM64CMNWconst, types.TypeFlags)
4219 v0.AuxInt = int32ToAuxInt(int32(c))
4220 v0.AddArg(y)
4221 v.AddArg(v0)
4222 return true
4223 }
4224
4225
4226
4227 for {
4228 if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
4229 break
4230 }
4231 z := v_0.Args[0]
4232 if z.Op != OpARM64ADD {
4233 break
4234 }
4235 y := z.Args[1]
4236 x := z.Args[0]
4237 if !(z.Uses == 1) {
4238 break
4239 }
4240 v.reset(OpARM64Equal)
4241 v0 := b.NewValue0(v.Pos, OpARM64CMN, types.TypeFlags)
4242 v0.AddArg2(x, y)
4243 v.AddArg(v0)
4244 return true
4245 }
4246
4247
4248
4249 for {
4250 if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
4251 break
4252 }
4253 z := v_0.Args[0]
4254 if z.Op != OpARM64ADD {
4255 break
4256 }
4257 y := z.Args[1]
4258 x := z.Args[0]
4259 if !(z.Uses == 1) {
4260 break
4261 }
4262 v.reset(OpARM64Equal)
4263 v0 := b.NewValue0(v.Pos, OpARM64CMNW, types.TypeFlags)
4264 v0.AddArg2(x, y)
4265 v.AddArg(v0)
4266 return true
4267 }
4268
4269
4270
4271 for {
4272 if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
4273 break
4274 }
4275 z := v_0.Args[0]
4276 if z.Op != OpARM64MADD {
4277 break
4278 }
4279 y := z.Args[2]
4280 a := z.Args[0]
4281 x := z.Args[1]
4282 if !(z.Uses == 1) {
4283 break
4284 }
4285 v.reset(OpARM64Equal)
4286 v0 := b.NewValue0(v.Pos, OpARM64CMN, types.TypeFlags)
4287 v1 := b.NewValue0(v.Pos, OpARM64MUL, x.Type)
4288 v1.AddArg2(x, y)
4289 v0.AddArg2(a, v1)
4290 v.AddArg(v0)
4291 return true
4292 }
4293
4294
4295
4296 for {
4297 if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
4298 break
4299 }
4300 z := v_0.Args[0]
4301 if z.Op != OpARM64MSUB {
4302 break
4303 }
4304 y := z.Args[2]
4305 a := z.Args[0]
4306 x := z.Args[1]
4307 if !(z.Uses == 1) {
4308 break
4309 }
4310 v.reset(OpARM64Equal)
4311 v0 := b.NewValue0(v.Pos, OpARM64CMP, types.TypeFlags)
4312 v1 := b.NewValue0(v.Pos, OpARM64MUL, x.Type)
4313 v1.AddArg2(x, y)
4314 v0.AddArg2(a, v1)
4315 v.AddArg(v0)
4316 return true
4317 }
4318
4319
4320
4321 for {
4322 if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
4323 break
4324 }
4325 z := v_0.Args[0]
4326 if z.Op != OpARM64MADDW {
4327 break
4328 }
4329 y := z.Args[2]
4330 a := z.Args[0]
4331 x := z.Args[1]
4332 if !(z.Uses == 1) {
4333 break
4334 }
4335 v.reset(OpARM64Equal)
4336 v0 := b.NewValue0(v.Pos, OpARM64CMNW, types.TypeFlags)
4337 v1 := b.NewValue0(v.Pos, OpARM64MULW, x.Type)
4338 v1.AddArg2(x, y)
4339 v0.AddArg2(a, v1)
4340 v.AddArg(v0)
4341 return true
4342 }
4343
4344
4345
4346 for {
4347 if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
4348 break
4349 }
4350 z := v_0.Args[0]
4351 if z.Op != OpARM64MSUBW {
4352 break
4353 }
4354 y := z.Args[2]
4355 a := z.Args[0]
4356 x := z.Args[1]
4357 if !(z.Uses == 1) {
4358 break
4359 }
4360 v.reset(OpARM64Equal)
4361 v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
4362 v1 := b.NewValue0(v.Pos, OpARM64MULW, x.Type)
4363 v1.AddArg2(x, y)
4364 v0.AddArg2(a, v1)
4365 v.AddArg(v0)
4366 return true
4367 }
4368
4369
4370 for {
4371 if v_0.Op != OpARM64FlagConstant {
4372 break
4373 }
4374 fc := auxIntToFlagConstant(v_0.AuxInt)
4375 v.reset(OpARM64MOVDconst)
4376 v.AuxInt = int64ToAuxInt(b2i(fc.eq()))
4377 return true
4378 }
4379
4380
4381 for {
4382 if v_0.Op != OpARM64InvertFlags {
4383 break
4384 }
4385 x := v_0.Args[0]
4386 v.reset(OpARM64Equal)
4387 v.AddArg(x)
4388 return true
4389 }
4390 return false
4391 }
4392 func rewriteValueARM64_OpARM64FADDD(v *Value) bool {
4393 v_1 := v.Args[1]
4394 v_0 := v.Args[0]
4395
4396
4397
4398 for {
4399 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
4400 a := v_0
4401 if v_1.Op != OpARM64FMULD {
4402 continue
4403 }
4404 y := v_1.Args[1]
4405 x := v_1.Args[0]
4406 if !(a.Block.Func.useFMA(v)) {
4407 continue
4408 }
4409 v.reset(OpARM64FMADDD)
4410 v.AddArg3(a, x, y)
4411 return true
4412 }
4413 break
4414 }
4415
4416
4417
4418 for {
4419 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
4420 a := v_0
4421 if v_1.Op != OpARM64FNMULD {
4422 continue
4423 }
4424 y := v_1.Args[1]
4425 x := v_1.Args[0]
4426 if !(a.Block.Func.useFMA(v)) {
4427 continue
4428 }
4429 v.reset(OpARM64FMSUBD)
4430 v.AddArg3(a, x, y)
4431 return true
4432 }
4433 break
4434 }
4435 return false
4436 }
4437 func rewriteValueARM64_OpARM64FADDS(v *Value) bool {
4438 v_1 := v.Args[1]
4439 v_0 := v.Args[0]
4440
4441
4442
4443 for {
4444 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
4445 a := v_0
4446 if v_1.Op != OpARM64FMULS {
4447 continue
4448 }
4449 y := v_1.Args[1]
4450 x := v_1.Args[0]
4451 if !(a.Block.Func.useFMA(v)) {
4452 continue
4453 }
4454 v.reset(OpARM64FMADDS)
4455 v.AddArg3(a, x, y)
4456 return true
4457 }
4458 break
4459 }
4460
4461
4462
4463 for {
4464 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
4465 a := v_0
4466 if v_1.Op != OpARM64FNMULS {
4467 continue
4468 }
4469 y := v_1.Args[1]
4470 x := v_1.Args[0]
4471 if !(a.Block.Func.useFMA(v)) {
4472 continue
4473 }
4474 v.reset(OpARM64FMSUBS)
4475 v.AddArg3(a, x, y)
4476 return true
4477 }
4478 break
4479 }
4480 return false
4481 }
4482 func rewriteValueARM64_OpARM64FCMPD(v *Value) bool {
4483 v_1 := v.Args[1]
4484 v_0 := v.Args[0]
4485 b := v.Block
4486
4487
4488 for {
4489 x := v_0
4490 if v_1.Op != OpARM64FMOVDconst || auxIntToFloat64(v_1.AuxInt) != 0 {
4491 break
4492 }
4493 v.reset(OpARM64FCMPD0)
4494 v.AddArg(x)
4495 return true
4496 }
4497
4498
4499 for {
4500 if v_0.Op != OpARM64FMOVDconst || auxIntToFloat64(v_0.AuxInt) != 0 {
4501 break
4502 }
4503 x := v_1
4504 v.reset(OpARM64InvertFlags)
4505 v0 := b.NewValue0(v.Pos, OpARM64FCMPD0, types.TypeFlags)
4506 v0.AddArg(x)
4507 v.AddArg(v0)
4508 return true
4509 }
4510 return false
4511 }
4512 func rewriteValueARM64_OpARM64FCMPS(v *Value) bool {
4513 v_1 := v.Args[1]
4514 v_0 := v.Args[0]
4515 b := v.Block
4516
4517
4518 for {
4519 x := v_0
4520 if v_1.Op != OpARM64FMOVSconst || auxIntToFloat64(v_1.AuxInt) != 0 {
4521 break
4522 }
4523 v.reset(OpARM64FCMPS0)
4524 v.AddArg(x)
4525 return true
4526 }
4527
4528
4529 for {
4530 if v_0.Op != OpARM64FMOVSconst || auxIntToFloat64(v_0.AuxInt) != 0 {
4531 break
4532 }
4533 x := v_1
4534 v.reset(OpARM64InvertFlags)
4535 v0 := b.NewValue0(v.Pos, OpARM64FCMPS0, types.TypeFlags)
4536 v0.AddArg(x)
4537 v.AddArg(v0)
4538 return true
4539 }
4540 return false
4541 }
4542 func rewriteValueARM64_OpARM64FMOVDfpgp(v *Value) bool {
4543 v_0 := v.Args[0]
4544 b := v.Block
4545
4546
4547 for {
4548 t := v.Type
4549 if v_0.Op != OpArg {
4550 break
4551 }
4552 off := auxIntToInt32(v_0.AuxInt)
4553 sym := auxToSym(v_0.Aux)
4554 b = b.Func.Entry
4555 v0 := b.NewValue0(v.Pos, OpArg, t)
4556 v.copyOf(v0)
4557 v0.AuxInt = int32ToAuxInt(off)
4558 v0.Aux = symToAux(sym)
4559 return true
4560 }
4561 return false
4562 }
4563 func rewriteValueARM64_OpARM64FMOVDgpfp(v *Value) bool {
4564 v_0 := v.Args[0]
4565 b := v.Block
4566
4567
4568 for {
4569 t := v.Type
4570 if v_0.Op != OpArg {
4571 break
4572 }
4573 off := auxIntToInt32(v_0.AuxInt)
4574 sym := auxToSym(v_0.Aux)
4575 b = b.Func.Entry
4576 v0 := b.NewValue0(v.Pos, OpArg, t)
4577 v.copyOf(v0)
4578 v0.AuxInt = int32ToAuxInt(off)
4579 v0.Aux = symToAux(sym)
4580 return true
4581 }
4582 return false
4583 }
4584 func rewriteValueARM64_OpARM64FMOVDload(v *Value) bool {
4585 v_1 := v.Args[1]
4586 v_0 := v.Args[0]
4587 b := v.Block
4588 config := b.Func.Config
4589
4590
4591 for {
4592 off := auxIntToInt32(v.AuxInt)
4593 sym := auxToSym(v.Aux)
4594 ptr := v_0
4595 if v_1.Op != OpARM64MOVDstore || auxIntToInt32(v_1.AuxInt) != off || auxToSym(v_1.Aux) != sym {
4596 break
4597 }
4598 val := v_1.Args[1]
4599 if ptr != v_1.Args[0] {
4600 break
4601 }
4602 v.reset(OpARM64FMOVDgpfp)
4603 v.AddArg(val)
4604 return true
4605 }
4606
4607
4608
4609 for {
4610 off1 := auxIntToInt32(v.AuxInt)
4611 sym := auxToSym(v.Aux)
4612 if v_0.Op != OpARM64ADDconst {
4613 break
4614 }
4615 off2 := auxIntToInt64(v_0.AuxInt)
4616 ptr := v_0.Args[0]
4617 mem := v_1
4618 if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
4619 break
4620 }
4621 v.reset(OpARM64FMOVDload)
4622 v.AuxInt = int32ToAuxInt(off1 + int32(off2))
4623 v.Aux = symToAux(sym)
4624 v.AddArg2(ptr, mem)
4625 return true
4626 }
4627
4628
4629
4630 for {
4631 off := auxIntToInt32(v.AuxInt)
4632 sym := auxToSym(v.Aux)
4633 if v_0.Op != OpARM64ADD {
4634 break
4635 }
4636 idx := v_0.Args[1]
4637 ptr := v_0.Args[0]
4638 mem := v_1
4639 if !(off == 0 && sym == nil) {
4640 break
4641 }
4642 v.reset(OpARM64FMOVDloadidx)
4643 v.AddArg3(ptr, idx, mem)
4644 return true
4645 }
4646
4647
4648
4649 for {
4650 off := auxIntToInt32(v.AuxInt)
4651 sym := auxToSym(v.Aux)
4652 if v_0.Op != OpARM64ADDshiftLL || auxIntToInt64(v_0.AuxInt) != 3 {
4653 break
4654 }
4655 idx := v_0.Args[1]
4656 ptr := v_0.Args[0]
4657 mem := v_1
4658 if !(off == 0 && sym == nil) {
4659 break
4660 }
4661 v.reset(OpARM64FMOVDloadidx8)
4662 v.AddArg3(ptr, idx, mem)
4663 return true
4664 }
4665
4666
4667
4668 for {
4669 off1 := auxIntToInt32(v.AuxInt)
4670 sym1 := auxToSym(v.Aux)
4671 if v_0.Op != OpARM64MOVDaddr {
4672 break
4673 }
4674 off2 := auxIntToInt32(v_0.AuxInt)
4675 sym2 := auxToSym(v_0.Aux)
4676 ptr := v_0.Args[0]
4677 mem := v_1
4678 if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
4679 break
4680 }
4681 v.reset(OpARM64FMOVDload)
4682 v.AuxInt = int32ToAuxInt(off1 + off2)
4683 v.Aux = symToAux(mergeSym(sym1, sym2))
4684 v.AddArg2(ptr, mem)
4685 return true
4686 }
4687 return false
4688 }
4689 func rewriteValueARM64_OpARM64FMOVDloadidx(v *Value) bool {
4690 v_2 := v.Args[2]
4691 v_1 := v.Args[1]
4692 v_0 := v.Args[0]
4693
4694
4695
4696 for {
4697 ptr := v_0
4698 if v_1.Op != OpARM64MOVDconst {
4699 break
4700 }
4701 c := auxIntToInt64(v_1.AuxInt)
4702 mem := v_2
4703 if !(is32Bit(c)) {
4704 break
4705 }
4706 v.reset(OpARM64FMOVDload)
4707 v.AuxInt = int32ToAuxInt(int32(c))
4708 v.AddArg2(ptr, mem)
4709 return true
4710 }
4711
4712
4713
4714 for {
4715 if v_0.Op != OpARM64MOVDconst {
4716 break
4717 }
4718 c := auxIntToInt64(v_0.AuxInt)
4719 ptr := v_1
4720 mem := v_2
4721 if !(is32Bit(c)) {
4722 break
4723 }
4724 v.reset(OpARM64FMOVDload)
4725 v.AuxInt = int32ToAuxInt(int32(c))
4726 v.AddArg2(ptr, mem)
4727 return true
4728 }
4729
4730
4731 for {
4732 ptr := v_0
4733 if v_1.Op != OpARM64SLLconst || auxIntToInt64(v_1.AuxInt) != 3 {
4734 break
4735 }
4736 idx := v_1.Args[0]
4737 mem := v_2
4738 v.reset(OpARM64FMOVDloadidx8)
4739 v.AddArg3(ptr, idx, mem)
4740 return true
4741 }
4742
4743
4744 for {
4745 if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != 3 {
4746 break
4747 }
4748 idx := v_0.Args[0]
4749 ptr := v_1
4750 mem := v_2
4751 v.reset(OpARM64FMOVDloadidx8)
4752 v.AddArg3(ptr, idx, mem)
4753 return true
4754 }
4755 return false
4756 }
4757 func rewriteValueARM64_OpARM64FMOVDloadidx8(v *Value) bool {
4758 v_2 := v.Args[2]
4759 v_1 := v.Args[1]
4760 v_0 := v.Args[0]
4761
4762
4763
4764 for {
4765 ptr := v_0
4766 if v_1.Op != OpARM64MOVDconst {
4767 break
4768 }
4769 c := auxIntToInt64(v_1.AuxInt)
4770 mem := v_2
4771 if !(is32Bit(c << 3)) {
4772 break
4773 }
4774 v.reset(OpARM64FMOVDload)
4775 v.AuxInt = int32ToAuxInt(int32(c) << 3)
4776 v.AddArg2(ptr, mem)
4777 return true
4778 }
4779 return false
4780 }
4781 func rewriteValueARM64_OpARM64FMOVDstore(v *Value) bool {
4782 v_2 := v.Args[2]
4783 v_1 := v.Args[1]
4784 v_0 := v.Args[0]
4785 b := v.Block
4786 config := b.Func.Config
4787
4788
4789 for {
4790 off := auxIntToInt32(v.AuxInt)
4791 sym := auxToSym(v.Aux)
4792 ptr := v_0
4793 if v_1.Op != OpARM64FMOVDgpfp {
4794 break
4795 }
4796 val := v_1.Args[0]
4797 mem := v_2
4798 v.reset(OpARM64MOVDstore)
4799 v.AuxInt = int32ToAuxInt(off)
4800 v.Aux = symToAux(sym)
4801 v.AddArg3(ptr, val, mem)
4802 return true
4803 }
4804
4805
4806
4807 for {
4808 off1 := auxIntToInt32(v.AuxInt)
4809 sym := auxToSym(v.Aux)
4810 if v_0.Op != OpARM64ADDconst {
4811 break
4812 }
4813 off2 := auxIntToInt64(v_0.AuxInt)
4814 ptr := v_0.Args[0]
4815 val := v_1
4816 mem := v_2
4817 if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
4818 break
4819 }
4820 v.reset(OpARM64FMOVDstore)
4821 v.AuxInt = int32ToAuxInt(off1 + int32(off2))
4822 v.Aux = symToAux(sym)
4823 v.AddArg3(ptr, val, mem)
4824 return true
4825 }
4826
4827
4828
4829 for {
4830 off := auxIntToInt32(v.AuxInt)
4831 sym := auxToSym(v.Aux)
4832 if v_0.Op != OpARM64ADD {
4833 break
4834 }
4835 idx := v_0.Args[1]
4836 ptr := v_0.Args[0]
4837 val := v_1
4838 mem := v_2
4839 if !(off == 0 && sym == nil) {
4840 break
4841 }
4842 v.reset(OpARM64FMOVDstoreidx)
4843 v.AddArg4(ptr, idx, val, mem)
4844 return true
4845 }
4846
4847
4848
4849 for {
4850 off := auxIntToInt32(v.AuxInt)
4851 sym := auxToSym(v.Aux)
4852 if v_0.Op != OpARM64ADDshiftLL || auxIntToInt64(v_0.AuxInt) != 3 {
4853 break
4854 }
4855 idx := v_0.Args[1]
4856 ptr := v_0.Args[0]
4857 val := v_1
4858 mem := v_2
4859 if !(off == 0 && sym == nil) {
4860 break
4861 }
4862 v.reset(OpARM64FMOVDstoreidx8)
4863 v.AddArg4(ptr, idx, val, mem)
4864 return true
4865 }
4866
4867
4868
4869 for {
4870 off1 := auxIntToInt32(v.AuxInt)
4871 sym1 := auxToSym(v.Aux)
4872 if v_0.Op != OpARM64MOVDaddr {
4873 break
4874 }
4875 off2 := auxIntToInt32(v_0.AuxInt)
4876 sym2 := auxToSym(v_0.Aux)
4877 ptr := v_0.Args[0]
4878 val := v_1
4879 mem := v_2
4880 if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
4881 break
4882 }
4883 v.reset(OpARM64FMOVDstore)
4884 v.AuxInt = int32ToAuxInt(off1 + off2)
4885 v.Aux = symToAux(mergeSym(sym1, sym2))
4886 v.AddArg3(ptr, val, mem)
4887 return true
4888 }
4889 return false
4890 }
4891 func rewriteValueARM64_OpARM64FMOVDstoreidx(v *Value) bool {
4892 v_3 := v.Args[3]
4893 v_2 := v.Args[2]
4894 v_1 := v.Args[1]
4895 v_0 := v.Args[0]
4896
4897
4898
4899 for {
4900 ptr := v_0
4901 if v_1.Op != OpARM64MOVDconst {
4902 break
4903 }
4904 c := auxIntToInt64(v_1.AuxInt)
4905 val := v_2
4906 mem := v_3
4907 if !(is32Bit(c)) {
4908 break
4909 }
4910 v.reset(OpARM64FMOVDstore)
4911 v.AuxInt = int32ToAuxInt(int32(c))
4912 v.AddArg3(ptr, val, mem)
4913 return true
4914 }
4915
4916
4917
4918 for {
4919 if v_0.Op != OpARM64MOVDconst {
4920 break
4921 }
4922 c := auxIntToInt64(v_0.AuxInt)
4923 idx := v_1
4924 val := v_2
4925 mem := v_3
4926 if !(is32Bit(c)) {
4927 break
4928 }
4929 v.reset(OpARM64FMOVDstore)
4930 v.AuxInt = int32ToAuxInt(int32(c))
4931 v.AddArg3(idx, val, mem)
4932 return true
4933 }
4934
4935
4936 for {
4937 ptr := v_0
4938 if v_1.Op != OpARM64SLLconst || auxIntToInt64(v_1.AuxInt) != 3 {
4939 break
4940 }
4941 idx := v_1.Args[0]
4942 val := v_2
4943 mem := v_3
4944 v.reset(OpARM64FMOVDstoreidx8)
4945 v.AddArg4(ptr, idx, val, mem)
4946 return true
4947 }
4948
4949
4950 for {
4951 if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != 3 {
4952 break
4953 }
4954 idx := v_0.Args[0]
4955 ptr := v_1
4956 val := v_2
4957 mem := v_3
4958 v.reset(OpARM64FMOVDstoreidx8)
4959 v.AddArg4(ptr, idx, val, mem)
4960 return true
4961 }
4962 return false
4963 }
4964 func rewriteValueARM64_OpARM64FMOVDstoreidx8(v *Value) bool {
4965 v_3 := v.Args[3]
4966 v_2 := v.Args[2]
4967 v_1 := v.Args[1]
4968 v_0 := v.Args[0]
4969
4970
4971
4972 for {
4973 ptr := v_0
4974 if v_1.Op != OpARM64MOVDconst {
4975 break
4976 }
4977 c := auxIntToInt64(v_1.AuxInt)
4978 val := v_2
4979 mem := v_3
4980 if !(is32Bit(c << 3)) {
4981 break
4982 }
4983 v.reset(OpARM64FMOVDstore)
4984 v.AuxInt = int32ToAuxInt(int32(c) << 3)
4985 v.AddArg3(ptr, val, mem)
4986 return true
4987 }
4988 return false
4989 }
4990 func rewriteValueARM64_OpARM64FMOVSload(v *Value) bool {
4991 v_1 := v.Args[1]
4992 v_0 := v.Args[0]
4993 b := v.Block
4994 config := b.Func.Config
4995
4996
4997 for {
4998 off := auxIntToInt32(v.AuxInt)
4999 sym := auxToSym(v.Aux)
5000 ptr := v_0
5001 if v_1.Op != OpARM64MOVWstore || auxIntToInt32(v_1.AuxInt) != off || auxToSym(v_1.Aux) != sym {
5002 break
5003 }
5004 val := v_1.Args[1]
5005 if ptr != v_1.Args[0] {
5006 break
5007 }
5008 v.reset(OpARM64FMOVSgpfp)
5009 v.AddArg(val)
5010 return true
5011 }
5012
5013
5014
5015 for {
5016 off1 := auxIntToInt32(v.AuxInt)
5017 sym := auxToSym(v.Aux)
5018 if v_0.Op != OpARM64ADDconst {
5019 break
5020 }
5021 off2 := auxIntToInt64(v_0.AuxInt)
5022 ptr := v_0.Args[0]
5023 mem := v_1
5024 if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
5025 break
5026 }
5027 v.reset(OpARM64FMOVSload)
5028 v.AuxInt = int32ToAuxInt(off1 + int32(off2))
5029 v.Aux = symToAux(sym)
5030 v.AddArg2(ptr, mem)
5031 return true
5032 }
5033
5034
5035
5036 for {
5037 off := auxIntToInt32(v.AuxInt)
5038 sym := auxToSym(v.Aux)
5039 if v_0.Op != OpARM64ADD {
5040 break
5041 }
5042 idx := v_0.Args[1]
5043 ptr := v_0.Args[0]
5044 mem := v_1
5045 if !(off == 0 && sym == nil) {
5046 break
5047 }
5048 v.reset(OpARM64FMOVSloadidx)
5049 v.AddArg3(ptr, idx, mem)
5050 return true
5051 }
5052
5053
5054
5055 for {
5056 off := auxIntToInt32(v.AuxInt)
5057 sym := auxToSym(v.Aux)
5058 if v_0.Op != OpARM64ADDshiftLL || auxIntToInt64(v_0.AuxInt) != 2 {
5059 break
5060 }
5061 idx := v_0.Args[1]
5062 ptr := v_0.Args[0]
5063 mem := v_1
5064 if !(off == 0 && sym == nil) {
5065 break
5066 }
5067 v.reset(OpARM64FMOVSloadidx4)
5068 v.AddArg3(ptr, idx, mem)
5069 return true
5070 }
5071
5072
5073
5074 for {
5075 off1 := auxIntToInt32(v.AuxInt)
5076 sym1 := auxToSym(v.Aux)
5077 if v_0.Op != OpARM64MOVDaddr {
5078 break
5079 }
5080 off2 := auxIntToInt32(v_0.AuxInt)
5081 sym2 := auxToSym(v_0.Aux)
5082 ptr := v_0.Args[0]
5083 mem := v_1
5084 if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
5085 break
5086 }
5087 v.reset(OpARM64FMOVSload)
5088 v.AuxInt = int32ToAuxInt(off1 + off2)
5089 v.Aux = symToAux(mergeSym(sym1, sym2))
5090 v.AddArg2(ptr, mem)
5091 return true
5092 }
5093 return false
5094 }
5095 func rewriteValueARM64_OpARM64FMOVSloadidx(v *Value) bool {
5096 v_2 := v.Args[2]
5097 v_1 := v.Args[1]
5098 v_0 := v.Args[0]
5099
5100
5101
5102 for {
5103 ptr := v_0
5104 if v_1.Op != OpARM64MOVDconst {
5105 break
5106 }
5107 c := auxIntToInt64(v_1.AuxInt)
5108 mem := v_2
5109 if !(is32Bit(c)) {
5110 break
5111 }
5112 v.reset(OpARM64FMOVSload)
5113 v.AuxInt = int32ToAuxInt(int32(c))
5114 v.AddArg2(ptr, mem)
5115 return true
5116 }
5117
5118
5119
5120 for {
5121 if v_0.Op != OpARM64MOVDconst {
5122 break
5123 }
5124 c := auxIntToInt64(v_0.AuxInt)
5125 ptr := v_1
5126 mem := v_2
5127 if !(is32Bit(c)) {
5128 break
5129 }
5130 v.reset(OpARM64FMOVSload)
5131 v.AuxInt = int32ToAuxInt(int32(c))
5132 v.AddArg2(ptr, mem)
5133 return true
5134 }
5135
5136
5137 for {
5138 ptr := v_0
5139 if v_1.Op != OpARM64SLLconst || auxIntToInt64(v_1.AuxInt) != 2 {
5140 break
5141 }
5142 idx := v_1.Args[0]
5143 mem := v_2
5144 v.reset(OpARM64FMOVSloadidx4)
5145 v.AddArg3(ptr, idx, mem)
5146 return true
5147 }
5148
5149
5150 for {
5151 if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != 2 {
5152 break
5153 }
5154 idx := v_0.Args[0]
5155 ptr := v_1
5156 mem := v_2
5157 v.reset(OpARM64FMOVSloadidx4)
5158 v.AddArg3(ptr, idx, mem)
5159 return true
5160 }
5161 return false
5162 }
5163 func rewriteValueARM64_OpARM64FMOVSloadidx4(v *Value) bool {
5164 v_2 := v.Args[2]
5165 v_1 := v.Args[1]
5166 v_0 := v.Args[0]
5167
5168
5169
5170 for {
5171 ptr := v_0
5172 if v_1.Op != OpARM64MOVDconst {
5173 break
5174 }
5175 c := auxIntToInt64(v_1.AuxInt)
5176 mem := v_2
5177 if !(is32Bit(c << 2)) {
5178 break
5179 }
5180 v.reset(OpARM64FMOVSload)
5181 v.AuxInt = int32ToAuxInt(int32(c) << 2)
5182 v.AddArg2(ptr, mem)
5183 return true
5184 }
5185 return false
5186 }
5187 func rewriteValueARM64_OpARM64FMOVSstore(v *Value) bool {
5188 v_2 := v.Args[2]
5189 v_1 := v.Args[1]
5190 v_0 := v.Args[0]
5191 b := v.Block
5192 config := b.Func.Config
5193
5194
5195 for {
5196 off := auxIntToInt32(v.AuxInt)
5197 sym := auxToSym(v.Aux)
5198 ptr := v_0
5199 if v_1.Op != OpARM64FMOVSgpfp {
5200 break
5201 }
5202 val := v_1.Args[0]
5203 mem := v_2
5204 v.reset(OpARM64MOVWstore)
5205 v.AuxInt = int32ToAuxInt(off)
5206 v.Aux = symToAux(sym)
5207 v.AddArg3(ptr, val, mem)
5208 return true
5209 }
5210
5211
5212
5213 for {
5214 off1 := auxIntToInt32(v.AuxInt)
5215 sym := auxToSym(v.Aux)
5216 if v_0.Op != OpARM64ADDconst {
5217 break
5218 }
5219 off2 := auxIntToInt64(v_0.AuxInt)
5220 ptr := v_0.Args[0]
5221 val := v_1
5222 mem := v_2
5223 if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
5224 break
5225 }
5226 v.reset(OpARM64FMOVSstore)
5227 v.AuxInt = int32ToAuxInt(off1 + int32(off2))
5228 v.Aux = symToAux(sym)
5229 v.AddArg3(ptr, val, mem)
5230 return true
5231 }
5232
5233
5234
5235 for {
5236 off := auxIntToInt32(v.AuxInt)
5237 sym := auxToSym(v.Aux)
5238 if v_0.Op != OpARM64ADD {
5239 break
5240 }
5241 idx := v_0.Args[1]
5242 ptr := v_0.Args[0]
5243 val := v_1
5244 mem := v_2
5245 if !(off == 0 && sym == nil) {
5246 break
5247 }
5248 v.reset(OpARM64FMOVSstoreidx)
5249 v.AddArg4(ptr, idx, val, mem)
5250 return true
5251 }
5252
5253
5254
5255 for {
5256 off := auxIntToInt32(v.AuxInt)
5257 sym := auxToSym(v.Aux)
5258 if v_0.Op != OpARM64ADDshiftLL || auxIntToInt64(v_0.AuxInt) != 2 {
5259 break
5260 }
5261 idx := v_0.Args[1]
5262 ptr := v_0.Args[0]
5263 val := v_1
5264 mem := v_2
5265 if !(off == 0 && sym == nil) {
5266 break
5267 }
5268 v.reset(OpARM64FMOVSstoreidx4)
5269 v.AddArg4(ptr, idx, val, mem)
5270 return true
5271 }
5272
5273
5274
5275 for {
5276 off1 := auxIntToInt32(v.AuxInt)
5277 sym1 := auxToSym(v.Aux)
5278 if v_0.Op != OpARM64MOVDaddr {
5279 break
5280 }
5281 off2 := auxIntToInt32(v_0.AuxInt)
5282 sym2 := auxToSym(v_0.Aux)
5283 ptr := v_0.Args[0]
5284 val := v_1
5285 mem := v_2
5286 if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
5287 break
5288 }
5289 v.reset(OpARM64FMOVSstore)
5290 v.AuxInt = int32ToAuxInt(off1 + off2)
5291 v.Aux = symToAux(mergeSym(sym1, sym2))
5292 v.AddArg3(ptr, val, mem)
5293 return true
5294 }
5295 return false
5296 }
5297 func rewriteValueARM64_OpARM64FMOVSstoreidx(v *Value) bool {
5298 v_3 := v.Args[3]
5299 v_2 := v.Args[2]
5300 v_1 := v.Args[1]
5301 v_0 := v.Args[0]
5302
5303
5304
5305 for {
5306 ptr := v_0
5307 if v_1.Op != OpARM64MOVDconst {
5308 break
5309 }
5310 c := auxIntToInt64(v_1.AuxInt)
5311 val := v_2
5312 mem := v_3
5313 if !(is32Bit(c)) {
5314 break
5315 }
5316 v.reset(OpARM64FMOVSstore)
5317 v.AuxInt = int32ToAuxInt(int32(c))
5318 v.AddArg3(ptr, val, mem)
5319 return true
5320 }
5321
5322
5323
5324 for {
5325 if v_0.Op != OpARM64MOVDconst {
5326 break
5327 }
5328 c := auxIntToInt64(v_0.AuxInt)
5329 idx := v_1
5330 val := v_2
5331 mem := v_3
5332 if !(is32Bit(c)) {
5333 break
5334 }
5335 v.reset(OpARM64FMOVSstore)
5336 v.AuxInt = int32ToAuxInt(int32(c))
5337 v.AddArg3(idx, val, mem)
5338 return true
5339 }
5340
5341
5342 for {
5343 ptr := v_0
5344 if v_1.Op != OpARM64SLLconst || auxIntToInt64(v_1.AuxInt) != 2 {
5345 break
5346 }
5347 idx := v_1.Args[0]
5348 val := v_2
5349 mem := v_3
5350 v.reset(OpARM64FMOVSstoreidx4)
5351 v.AddArg4(ptr, idx, val, mem)
5352 return true
5353 }
5354
5355
5356 for {
5357 if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != 2 {
5358 break
5359 }
5360 idx := v_0.Args[0]
5361 ptr := v_1
5362 val := v_2
5363 mem := v_3
5364 v.reset(OpARM64FMOVSstoreidx4)
5365 v.AddArg4(ptr, idx, val, mem)
5366 return true
5367 }
5368 return false
5369 }
5370 func rewriteValueARM64_OpARM64FMOVSstoreidx4(v *Value) bool {
5371 v_3 := v.Args[3]
5372 v_2 := v.Args[2]
5373 v_1 := v.Args[1]
5374 v_0 := v.Args[0]
5375
5376
5377
5378 for {
5379 ptr := v_0
5380 if v_1.Op != OpARM64MOVDconst {
5381 break
5382 }
5383 c := auxIntToInt64(v_1.AuxInt)
5384 val := v_2
5385 mem := v_3
5386 if !(is32Bit(c << 2)) {
5387 break
5388 }
5389 v.reset(OpARM64FMOVSstore)
5390 v.AuxInt = int32ToAuxInt(int32(c) << 2)
5391 v.AddArg3(ptr, val, mem)
5392 return true
5393 }
5394 return false
5395 }
5396 func rewriteValueARM64_OpARM64FMULD(v *Value) bool {
5397 v_1 := v.Args[1]
5398 v_0 := v.Args[0]
5399
5400
5401 for {
5402 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
5403 if v_0.Op != OpARM64FNEGD {
5404 continue
5405 }
5406 x := v_0.Args[0]
5407 y := v_1
5408 v.reset(OpARM64FNMULD)
5409 v.AddArg2(x, y)
5410 return true
5411 }
5412 break
5413 }
5414 return false
5415 }
5416 func rewriteValueARM64_OpARM64FMULS(v *Value) bool {
5417 v_1 := v.Args[1]
5418 v_0 := v.Args[0]
5419
5420
5421 for {
5422 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
5423 if v_0.Op != OpARM64FNEGS {
5424 continue
5425 }
5426 x := v_0.Args[0]
5427 y := v_1
5428 v.reset(OpARM64FNMULS)
5429 v.AddArg2(x, y)
5430 return true
5431 }
5432 break
5433 }
5434 return false
5435 }
5436 func rewriteValueARM64_OpARM64FNEGD(v *Value) bool {
5437 v_0 := v.Args[0]
5438
5439
5440 for {
5441 if v_0.Op != OpARM64FMULD {
5442 break
5443 }
5444 y := v_0.Args[1]
5445 x := v_0.Args[0]
5446 v.reset(OpARM64FNMULD)
5447 v.AddArg2(x, y)
5448 return true
5449 }
5450
5451
5452 for {
5453 if v_0.Op != OpARM64FNMULD {
5454 break
5455 }
5456 y := v_0.Args[1]
5457 x := v_0.Args[0]
5458 v.reset(OpARM64FMULD)
5459 v.AddArg2(x, y)
5460 return true
5461 }
5462 return false
5463 }
5464 func rewriteValueARM64_OpARM64FNEGS(v *Value) bool {
5465 v_0 := v.Args[0]
5466
5467
5468 for {
5469 if v_0.Op != OpARM64FMULS {
5470 break
5471 }
5472 y := v_0.Args[1]
5473 x := v_0.Args[0]
5474 v.reset(OpARM64FNMULS)
5475 v.AddArg2(x, y)
5476 return true
5477 }
5478
5479
5480 for {
5481 if v_0.Op != OpARM64FNMULS {
5482 break
5483 }
5484 y := v_0.Args[1]
5485 x := v_0.Args[0]
5486 v.reset(OpARM64FMULS)
5487 v.AddArg2(x, y)
5488 return true
5489 }
5490 return false
5491 }
5492 func rewriteValueARM64_OpARM64FNMULD(v *Value) bool {
5493 v_1 := v.Args[1]
5494 v_0 := v.Args[0]
5495
5496
5497 for {
5498 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
5499 if v_0.Op != OpARM64FNEGD {
5500 continue
5501 }
5502 x := v_0.Args[0]
5503 y := v_1
5504 v.reset(OpARM64FMULD)
5505 v.AddArg2(x, y)
5506 return true
5507 }
5508 break
5509 }
5510 return false
5511 }
5512 func rewriteValueARM64_OpARM64FNMULS(v *Value) bool {
5513 v_1 := v.Args[1]
5514 v_0 := v.Args[0]
5515
5516
5517 for {
5518 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
5519 if v_0.Op != OpARM64FNEGS {
5520 continue
5521 }
5522 x := v_0.Args[0]
5523 y := v_1
5524 v.reset(OpARM64FMULS)
5525 v.AddArg2(x, y)
5526 return true
5527 }
5528 break
5529 }
5530 return false
5531 }
5532 func rewriteValueARM64_OpARM64FSUBD(v *Value) bool {
5533 v_1 := v.Args[1]
5534 v_0 := v.Args[0]
5535
5536
5537
5538 for {
5539 a := v_0
5540 if v_1.Op != OpARM64FMULD {
5541 break
5542 }
5543 y := v_1.Args[1]
5544 x := v_1.Args[0]
5545 if !(a.Block.Func.useFMA(v)) {
5546 break
5547 }
5548 v.reset(OpARM64FMSUBD)
5549 v.AddArg3(a, x, y)
5550 return true
5551 }
5552
5553
5554
5555 for {
5556 if v_0.Op != OpARM64FMULD {
5557 break
5558 }
5559 y := v_0.Args[1]
5560 x := v_0.Args[0]
5561 a := v_1
5562 if !(a.Block.Func.useFMA(v)) {
5563 break
5564 }
5565 v.reset(OpARM64FNMSUBD)
5566 v.AddArg3(a, x, y)
5567 return true
5568 }
5569
5570
5571
5572 for {
5573 a := v_0
5574 if v_1.Op != OpARM64FNMULD {
5575 break
5576 }
5577 y := v_1.Args[1]
5578 x := v_1.Args[0]
5579 if !(a.Block.Func.useFMA(v)) {
5580 break
5581 }
5582 v.reset(OpARM64FMADDD)
5583 v.AddArg3(a, x, y)
5584 return true
5585 }
5586
5587
5588
5589 for {
5590 if v_0.Op != OpARM64FNMULD {
5591 break
5592 }
5593 y := v_0.Args[1]
5594 x := v_0.Args[0]
5595 a := v_1
5596 if !(a.Block.Func.useFMA(v)) {
5597 break
5598 }
5599 v.reset(OpARM64FNMADDD)
5600 v.AddArg3(a, x, y)
5601 return true
5602 }
5603 return false
5604 }
5605 func rewriteValueARM64_OpARM64FSUBS(v *Value) bool {
5606 v_1 := v.Args[1]
5607 v_0 := v.Args[0]
5608
5609
5610
5611 for {
5612 a := v_0
5613 if v_1.Op != OpARM64FMULS {
5614 break
5615 }
5616 y := v_1.Args[1]
5617 x := v_1.Args[0]
5618 if !(a.Block.Func.useFMA(v)) {
5619 break
5620 }
5621 v.reset(OpARM64FMSUBS)
5622 v.AddArg3(a, x, y)
5623 return true
5624 }
5625
5626
5627
5628 for {
5629 if v_0.Op != OpARM64FMULS {
5630 break
5631 }
5632 y := v_0.Args[1]
5633 x := v_0.Args[0]
5634 a := v_1
5635 if !(a.Block.Func.useFMA(v)) {
5636 break
5637 }
5638 v.reset(OpARM64FNMSUBS)
5639 v.AddArg3(a, x, y)
5640 return true
5641 }
5642
5643
5644
5645 for {
5646 a := v_0
5647 if v_1.Op != OpARM64FNMULS {
5648 break
5649 }
5650 y := v_1.Args[1]
5651 x := v_1.Args[0]
5652 if !(a.Block.Func.useFMA(v)) {
5653 break
5654 }
5655 v.reset(OpARM64FMADDS)
5656 v.AddArg3(a, x, y)
5657 return true
5658 }
5659
5660
5661
5662 for {
5663 if v_0.Op != OpARM64FNMULS {
5664 break
5665 }
5666 y := v_0.Args[1]
5667 x := v_0.Args[0]
5668 a := v_1
5669 if !(a.Block.Func.useFMA(v)) {
5670 break
5671 }
5672 v.reset(OpARM64FNMADDS)
5673 v.AddArg3(a, x, y)
5674 return true
5675 }
5676 return false
5677 }
5678 func rewriteValueARM64_OpARM64GreaterEqual(v *Value) bool {
5679 v_0 := v.Args[0]
5680 b := v.Block
5681
5682
5683
5684 for {
5685 if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
5686 break
5687 }
5688 z := v_0.Args[0]
5689 if z.Op != OpARM64AND {
5690 break
5691 }
5692 y := z.Args[1]
5693 x := z.Args[0]
5694 if !(z.Uses == 1) {
5695 break
5696 }
5697 v.reset(OpARM64GreaterEqual)
5698 v0 := b.NewValue0(v.Pos, OpARM64TST, types.TypeFlags)
5699 v0.AddArg2(x, y)
5700 v.AddArg(v0)
5701 return true
5702 }
5703
5704
5705
5706 for {
5707 if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
5708 break
5709 }
5710 x := v_0.Args[0]
5711 if x.Op != OpARM64ANDconst {
5712 break
5713 }
5714 c := auxIntToInt64(x.AuxInt)
5715 y := x.Args[0]
5716 if !(x.Uses == 1) {
5717 break
5718 }
5719 v.reset(OpARM64GreaterEqual)
5720 v0 := b.NewValue0(v.Pos, OpARM64TSTWconst, types.TypeFlags)
5721 v0.AuxInt = int32ToAuxInt(int32(c))
5722 v0.AddArg(y)
5723 v.AddArg(v0)
5724 return true
5725 }
5726
5727
5728
5729 for {
5730 if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
5731 break
5732 }
5733 z := v_0.Args[0]
5734 if z.Op != OpARM64AND {
5735 break
5736 }
5737 y := z.Args[1]
5738 x := z.Args[0]
5739 if !(z.Uses == 1) {
5740 break
5741 }
5742 v.reset(OpARM64GreaterEqual)
5743 v0 := b.NewValue0(v.Pos, OpARM64TSTW, types.TypeFlags)
5744 v0.AddArg2(x, y)
5745 v.AddArg(v0)
5746 return true
5747 }
5748
5749
5750
5751 for {
5752 if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
5753 break
5754 }
5755 x := v_0.Args[0]
5756 if x.Op != OpARM64ANDconst {
5757 break
5758 }
5759 c := auxIntToInt64(x.AuxInt)
5760 y := x.Args[0]
5761 if !(x.Uses == 1) {
5762 break
5763 }
5764 v.reset(OpARM64GreaterEqual)
5765 v0 := b.NewValue0(v.Pos, OpARM64TSTconst, types.TypeFlags)
5766 v0.AuxInt = int64ToAuxInt(c)
5767 v0.AddArg(y)
5768 v.AddArg(v0)
5769 return true
5770 }
5771
5772
5773
5774 for {
5775 if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
5776 break
5777 }
5778 x := v_0.Args[0]
5779 if x.Op != OpARM64ADDconst {
5780 break
5781 }
5782 c := auxIntToInt64(x.AuxInt)
5783 y := x.Args[0]
5784 if !(x.Uses == 1) {
5785 break
5786 }
5787 v.reset(OpARM64GreaterEqualNoov)
5788 v0 := b.NewValue0(v.Pos, OpARM64CMNconst, types.TypeFlags)
5789 v0.AuxInt = int64ToAuxInt(c)
5790 v0.AddArg(y)
5791 v.AddArg(v0)
5792 return true
5793 }
5794
5795
5796
5797 for {
5798 if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
5799 break
5800 }
5801 x := v_0.Args[0]
5802 if x.Op != OpARM64ADDconst {
5803 break
5804 }
5805 c := auxIntToInt64(x.AuxInt)
5806 y := x.Args[0]
5807 if !(x.Uses == 1) {
5808 break
5809 }
5810 v.reset(OpARM64GreaterEqualNoov)
5811 v0 := b.NewValue0(v.Pos, OpARM64CMNWconst, types.TypeFlags)
5812 v0.AuxInt = int32ToAuxInt(int32(c))
5813 v0.AddArg(y)
5814 v.AddArg(v0)
5815 return true
5816 }
5817
5818
5819
5820 for {
5821 if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
5822 break
5823 }
5824 z := v_0.Args[0]
5825 if z.Op != OpARM64ADD {
5826 break
5827 }
5828 y := z.Args[1]
5829 x := z.Args[0]
5830 if !(z.Uses == 1) {
5831 break
5832 }
5833 v.reset(OpARM64GreaterEqualNoov)
5834 v0 := b.NewValue0(v.Pos, OpARM64CMN, types.TypeFlags)
5835 v0.AddArg2(x, y)
5836 v.AddArg(v0)
5837 return true
5838 }
5839
5840
5841
5842 for {
5843 if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
5844 break
5845 }
5846 z := v_0.Args[0]
5847 if z.Op != OpARM64ADD {
5848 break
5849 }
5850 y := z.Args[1]
5851 x := z.Args[0]
5852 if !(z.Uses == 1) {
5853 break
5854 }
5855 v.reset(OpARM64GreaterEqualNoov)
5856 v0 := b.NewValue0(v.Pos, OpARM64CMNW, types.TypeFlags)
5857 v0.AddArg2(x, y)
5858 v.AddArg(v0)
5859 return true
5860 }
5861
5862
5863
5864 for {
5865 if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
5866 break
5867 }
5868 z := v_0.Args[0]
5869 if z.Op != OpARM64MADD {
5870 break
5871 }
5872 y := z.Args[2]
5873 a := z.Args[0]
5874 x := z.Args[1]
5875 if !(z.Uses == 1) {
5876 break
5877 }
5878 v.reset(OpARM64GreaterEqualNoov)
5879 v0 := b.NewValue0(v.Pos, OpARM64CMN, types.TypeFlags)
5880 v1 := b.NewValue0(v.Pos, OpARM64MUL, x.Type)
5881 v1.AddArg2(x, y)
5882 v0.AddArg2(a, v1)
5883 v.AddArg(v0)
5884 return true
5885 }
5886
5887
5888
5889 for {
5890 if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
5891 break
5892 }
5893 z := v_0.Args[0]
5894 if z.Op != OpARM64MSUB {
5895 break
5896 }
5897 y := z.Args[2]
5898 a := z.Args[0]
5899 x := z.Args[1]
5900 if !(z.Uses == 1) {
5901 break
5902 }
5903 v.reset(OpARM64GreaterEqualNoov)
5904 v0 := b.NewValue0(v.Pos, OpARM64CMP, types.TypeFlags)
5905 v1 := b.NewValue0(v.Pos, OpARM64MUL, x.Type)
5906 v1.AddArg2(x, y)
5907 v0.AddArg2(a, v1)
5908 v.AddArg(v0)
5909 return true
5910 }
5911
5912
5913
5914 for {
5915 if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
5916 break
5917 }
5918 z := v_0.Args[0]
5919 if z.Op != OpARM64MADDW {
5920 break
5921 }
5922 y := z.Args[2]
5923 a := z.Args[0]
5924 x := z.Args[1]
5925 if !(z.Uses == 1) {
5926 break
5927 }
5928 v.reset(OpARM64GreaterEqualNoov)
5929 v0 := b.NewValue0(v.Pos, OpARM64CMNW, types.TypeFlags)
5930 v1 := b.NewValue0(v.Pos, OpARM64MULW, x.Type)
5931 v1.AddArg2(x, y)
5932 v0.AddArg2(a, v1)
5933 v.AddArg(v0)
5934 return true
5935 }
5936
5937
5938
5939 for {
5940 if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
5941 break
5942 }
5943 z := v_0.Args[0]
5944 if z.Op != OpARM64MSUBW {
5945 break
5946 }
5947 y := z.Args[2]
5948 a := z.Args[0]
5949 x := z.Args[1]
5950 if !(z.Uses == 1) {
5951 break
5952 }
5953 v.reset(OpARM64GreaterEqualNoov)
5954 v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
5955 v1 := b.NewValue0(v.Pos, OpARM64MULW, x.Type)
5956 v1.AddArg2(x, y)
5957 v0.AddArg2(a, v1)
5958 v.AddArg(v0)
5959 return true
5960 }
5961
5962
5963 for {
5964 if v_0.Op != OpARM64FlagConstant {
5965 break
5966 }
5967 fc := auxIntToFlagConstant(v_0.AuxInt)
5968 v.reset(OpARM64MOVDconst)
5969 v.AuxInt = int64ToAuxInt(b2i(fc.ge()))
5970 return true
5971 }
5972
5973
5974 for {
5975 if v_0.Op != OpARM64InvertFlags {
5976 break
5977 }
5978 x := v_0.Args[0]
5979 v.reset(OpARM64LessEqual)
5980 v.AddArg(x)
5981 return true
5982 }
5983 return false
5984 }
5985 func rewriteValueARM64_OpARM64GreaterEqualF(v *Value) bool {
5986 v_0 := v.Args[0]
5987
5988
5989 for {
5990 if v_0.Op != OpARM64InvertFlags {
5991 break
5992 }
5993 x := v_0.Args[0]
5994 v.reset(OpARM64LessEqualF)
5995 v.AddArg(x)
5996 return true
5997 }
5998 return false
5999 }
6000 func rewriteValueARM64_OpARM64GreaterEqualNoov(v *Value) bool {
6001 v_0 := v.Args[0]
6002 b := v.Block
6003 typ := &b.Func.Config.Types
6004
6005
6006 for {
6007 if v_0.Op != OpARM64InvertFlags {
6008 break
6009 }
6010 x := v_0.Args[0]
6011 v.reset(OpARM64CSINC)
6012 v.AuxInt = opToAuxInt(OpARM64NotEqual)
6013 v0 := b.NewValue0(v.Pos, OpARM64LessThanNoov, typ.Bool)
6014 v0.AddArg(x)
6015 v1 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
6016 v1.AuxInt = int64ToAuxInt(0)
6017 v.AddArg3(v0, v1, x)
6018 return true
6019 }
6020 return false
6021 }
6022 func rewriteValueARM64_OpARM64GreaterEqualU(v *Value) bool {
6023 v_0 := v.Args[0]
6024
6025
6026 for {
6027 if v_0.Op != OpARM64FlagConstant {
6028 break
6029 }
6030 fc := auxIntToFlagConstant(v_0.AuxInt)
6031 v.reset(OpARM64MOVDconst)
6032 v.AuxInt = int64ToAuxInt(b2i(fc.uge()))
6033 return true
6034 }
6035
6036
6037 for {
6038 if v_0.Op != OpARM64InvertFlags {
6039 break
6040 }
6041 x := v_0.Args[0]
6042 v.reset(OpARM64LessEqualU)
6043 v.AddArg(x)
6044 return true
6045 }
6046 return false
6047 }
6048 func rewriteValueARM64_OpARM64GreaterThan(v *Value) bool {
6049 v_0 := v.Args[0]
6050 b := v.Block
6051
6052
6053
6054 for {
6055 if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
6056 break
6057 }
6058 z := v_0.Args[0]
6059 if z.Op != OpARM64AND {
6060 break
6061 }
6062 y := z.Args[1]
6063 x := z.Args[0]
6064 if !(z.Uses == 1) {
6065 break
6066 }
6067 v.reset(OpARM64GreaterThan)
6068 v0 := b.NewValue0(v.Pos, OpARM64TST, types.TypeFlags)
6069 v0.AddArg2(x, y)
6070 v.AddArg(v0)
6071 return true
6072 }
6073
6074
6075
6076 for {
6077 if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
6078 break
6079 }
6080 x := v_0.Args[0]
6081 if x.Op != OpARM64ANDconst {
6082 break
6083 }
6084 c := auxIntToInt64(x.AuxInt)
6085 y := x.Args[0]
6086 if !(x.Uses == 1) {
6087 break
6088 }
6089 v.reset(OpARM64GreaterThan)
6090 v0 := b.NewValue0(v.Pos, OpARM64TSTWconst, types.TypeFlags)
6091 v0.AuxInt = int32ToAuxInt(int32(c))
6092 v0.AddArg(y)
6093 v.AddArg(v0)
6094 return true
6095 }
6096
6097
6098
6099 for {
6100 if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
6101 break
6102 }
6103 z := v_0.Args[0]
6104 if z.Op != OpARM64AND {
6105 break
6106 }
6107 y := z.Args[1]
6108 x := z.Args[0]
6109 if !(z.Uses == 1) {
6110 break
6111 }
6112 v.reset(OpARM64GreaterThan)
6113 v0 := b.NewValue0(v.Pos, OpARM64TSTW, types.TypeFlags)
6114 v0.AddArg2(x, y)
6115 v.AddArg(v0)
6116 return true
6117 }
6118
6119
6120
6121 for {
6122 if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
6123 break
6124 }
6125 x := v_0.Args[0]
6126 if x.Op != OpARM64ANDconst {
6127 break
6128 }
6129 c := auxIntToInt64(x.AuxInt)
6130 y := x.Args[0]
6131 if !(x.Uses == 1) {
6132 break
6133 }
6134 v.reset(OpARM64GreaterThan)
6135 v0 := b.NewValue0(v.Pos, OpARM64TSTconst, types.TypeFlags)
6136 v0.AuxInt = int64ToAuxInt(c)
6137 v0.AddArg(y)
6138 v.AddArg(v0)
6139 return true
6140 }
6141
6142
6143 for {
6144 if v_0.Op != OpARM64FlagConstant {
6145 break
6146 }
6147 fc := auxIntToFlagConstant(v_0.AuxInt)
6148 v.reset(OpARM64MOVDconst)
6149 v.AuxInt = int64ToAuxInt(b2i(fc.gt()))
6150 return true
6151 }
6152
6153
6154 for {
6155 if v_0.Op != OpARM64InvertFlags {
6156 break
6157 }
6158 x := v_0.Args[0]
6159 v.reset(OpARM64LessThan)
6160 v.AddArg(x)
6161 return true
6162 }
6163 return false
6164 }
6165 func rewriteValueARM64_OpARM64GreaterThanF(v *Value) bool {
6166 v_0 := v.Args[0]
6167
6168
6169 for {
6170 if v_0.Op != OpARM64InvertFlags {
6171 break
6172 }
6173 x := v_0.Args[0]
6174 v.reset(OpARM64LessThanF)
6175 v.AddArg(x)
6176 return true
6177 }
6178 return false
6179 }
6180 func rewriteValueARM64_OpARM64GreaterThanU(v *Value) bool {
6181 v_0 := v.Args[0]
6182
6183
6184 for {
6185 if v_0.Op != OpARM64FlagConstant {
6186 break
6187 }
6188 fc := auxIntToFlagConstant(v_0.AuxInt)
6189 v.reset(OpARM64MOVDconst)
6190 v.AuxInt = int64ToAuxInt(b2i(fc.ugt()))
6191 return true
6192 }
6193
6194
6195 for {
6196 if v_0.Op != OpARM64InvertFlags {
6197 break
6198 }
6199 x := v_0.Args[0]
6200 v.reset(OpARM64LessThanU)
6201 v.AddArg(x)
6202 return true
6203 }
6204 return false
6205 }
6206 func rewriteValueARM64_OpARM64LDP(v *Value) bool {
6207 v_1 := v.Args[1]
6208 v_0 := v.Args[0]
6209 b := v.Block
6210 config := b.Func.Config
6211
6212
6213
6214 for {
6215 off1 := auxIntToInt32(v.AuxInt)
6216 sym := auxToSym(v.Aux)
6217 if v_0.Op != OpARM64ADDconst {
6218 break
6219 }
6220 off2 := auxIntToInt64(v_0.AuxInt)
6221 ptr := v_0.Args[0]
6222 mem := v_1
6223 if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
6224 break
6225 }
6226 v.reset(OpARM64LDP)
6227 v.AuxInt = int32ToAuxInt(off1 + int32(off2))
6228 v.Aux = symToAux(sym)
6229 v.AddArg2(ptr, mem)
6230 return true
6231 }
6232
6233
6234
6235 for {
6236 off1 := auxIntToInt32(v.AuxInt)
6237 sym1 := auxToSym(v.Aux)
6238 if v_0.Op != OpARM64MOVDaddr {
6239 break
6240 }
6241 off2 := auxIntToInt32(v_0.AuxInt)
6242 sym2 := auxToSym(v_0.Aux)
6243 ptr := v_0.Args[0]
6244 mem := v_1
6245 if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
6246 break
6247 }
6248 v.reset(OpARM64LDP)
6249 v.AuxInt = int32ToAuxInt(off1 + off2)
6250 v.Aux = symToAux(mergeSym(sym1, sym2))
6251 v.AddArg2(ptr, mem)
6252 return true
6253 }
6254 return false
6255 }
6256 func rewriteValueARM64_OpARM64LessEqual(v *Value) bool {
6257 v_0 := v.Args[0]
6258 b := v.Block
6259
6260
6261
6262 for {
6263 if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
6264 break
6265 }
6266 z := v_0.Args[0]
6267 if z.Op != OpARM64AND {
6268 break
6269 }
6270 y := z.Args[1]
6271 x := z.Args[0]
6272 if !(z.Uses == 1) {
6273 break
6274 }
6275 v.reset(OpARM64LessEqual)
6276 v0 := b.NewValue0(v.Pos, OpARM64TST, types.TypeFlags)
6277 v0.AddArg2(x, y)
6278 v.AddArg(v0)
6279 return true
6280 }
6281
6282
6283
6284 for {
6285 if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
6286 break
6287 }
6288 x := v_0.Args[0]
6289 if x.Op != OpARM64ANDconst {
6290 break
6291 }
6292 c := auxIntToInt64(x.AuxInt)
6293 y := x.Args[0]
6294 if !(x.Uses == 1) {
6295 break
6296 }
6297 v.reset(OpARM64LessEqual)
6298 v0 := b.NewValue0(v.Pos, OpARM64TSTWconst, types.TypeFlags)
6299 v0.AuxInt = int32ToAuxInt(int32(c))
6300 v0.AddArg(y)
6301 v.AddArg(v0)
6302 return true
6303 }
6304
6305
6306
6307 for {
6308 if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
6309 break
6310 }
6311 z := v_0.Args[0]
6312 if z.Op != OpARM64AND {
6313 break
6314 }
6315 y := z.Args[1]
6316 x := z.Args[0]
6317 if !(z.Uses == 1) {
6318 break
6319 }
6320 v.reset(OpARM64LessEqual)
6321 v0 := b.NewValue0(v.Pos, OpARM64TSTW, types.TypeFlags)
6322 v0.AddArg2(x, y)
6323 v.AddArg(v0)
6324 return true
6325 }
6326
6327
6328
6329 for {
6330 if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
6331 break
6332 }
6333 x := v_0.Args[0]
6334 if x.Op != OpARM64ANDconst {
6335 break
6336 }
6337 c := auxIntToInt64(x.AuxInt)
6338 y := x.Args[0]
6339 if !(x.Uses == 1) {
6340 break
6341 }
6342 v.reset(OpARM64LessEqual)
6343 v0 := b.NewValue0(v.Pos, OpARM64TSTconst, types.TypeFlags)
6344 v0.AuxInt = int64ToAuxInt(c)
6345 v0.AddArg(y)
6346 v.AddArg(v0)
6347 return true
6348 }
6349
6350
6351 for {
6352 if v_0.Op != OpARM64FlagConstant {
6353 break
6354 }
6355 fc := auxIntToFlagConstant(v_0.AuxInt)
6356 v.reset(OpARM64MOVDconst)
6357 v.AuxInt = int64ToAuxInt(b2i(fc.le()))
6358 return true
6359 }
6360
6361
6362 for {
6363 if v_0.Op != OpARM64InvertFlags {
6364 break
6365 }
6366 x := v_0.Args[0]
6367 v.reset(OpARM64GreaterEqual)
6368 v.AddArg(x)
6369 return true
6370 }
6371 return false
6372 }
6373 func rewriteValueARM64_OpARM64LessEqualF(v *Value) bool {
6374 v_0 := v.Args[0]
6375
6376
6377 for {
6378 if v_0.Op != OpARM64InvertFlags {
6379 break
6380 }
6381 x := v_0.Args[0]
6382 v.reset(OpARM64GreaterEqualF)
6383 v.AddArg(x)
6384 return true
6385 }
6386 return false
6387 }
6388 func rewriteValueARM64_OpARM64LessEqualU(v *Value) bool {
6389 v_0 := v.Args[0]
6390
6391
6392 for {
6393 if v_0.Op != OpARM64FlagConstant {
6394 break
6395 }
6396 fc := auxIntToFlagConstant(v_0.AuxInt)
6397 v.reset(OpARM64MOVDconst)
6398 v.AuxInt = int64ToAuxInt(b2i(fc.ule()))
6399 return true
6400 }
6401
6402
6403 for {
6404 if v_0.Op != OpARM64InvertFlags {
6405 break
6406 }
6407 x := v_0.Args[0]
6408 v.reset(OpARM64GreaterEqualU)
6409 v.AddArg(x)
6410 return true
6411 }
6412 return false
6413 }
6414 func rewriteValueARM64_OpARM64LessThan(v *Value) bool {
6415 v_0 := v.Args[0]
6416 b := v.Block
6417
6418
6419
6420 for {
6421 if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
6422 break
6423 }
6424 z := v_0.Args[0]
6425 if z.Op != OpARM64AND {
6426 break
6427 }
6428 y := z.Args[1]
6429 x := z.Args[0]
6430 if !(z.Uses == 1) {
6431 break
6432 }
6433 v.reset(OpARM64LessThan)
6434 v0 := b.NewValue0(v.Pos, OpARM64TST, types.TypeFlags)
6435 v0.AddArg2(x, y)
6436 v.AddArg(v0)
6437 return true
6438 }
6439
6440
6441
6442 for {
6443 if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
6444 break
6445 }
6446 x := v_0.Args[0]
6447 if x.Op != OpARM64ANDconst {
6448 break
6449 }
6450 c := auxIntToInt64(x.AuxInt)
6451 y := x.Args[0]
6452 if !(x.Uses == 1) {
6453 break
6454 }
6455 v.reset(OpARM64LessThan)
6456 v0 := b.NewValue0(v.Pos, OpARM64TSTWconst, types.TypeFlags)
6457 v0.AuxInt = int32ToAuxInt(int32(c))
6458 v0.AddArg(y)
6459 v.AddArg(v0)
6460 return true
6461 }
6462
6463
6464
6465 for {
6466 if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
6467 break
6468 }
6469 z := v_0.Args[0]
6470 if z.Op != OpARM64AND {
6471 break
6472 }
6473 y := z.Args[1]
6474 x := z.Args[0]
6475 if !(z.Uses == 1) {
6476 break
6477 }
6478 v.reset(OpARM64LessThan)
6479 v0 := b.NewValue0(v.Pos, OpARM64TSTW, types.TypeFlags)
6480 v0.AddArg2(x, y)
6481 v.AddArg(v0)
6482 return true
6483 }
6484
6485
6486
6487 for {
6488 if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
6489 break
6490 }
6491 x := v_0.Args[0]
6492 if x.Op != OpARM64ANDconst {
6493 break
6494 }
6495 c := auxIntToInt64(x.AuxInt)
6496 y := x.Args[0]
6497 if !(x.Uses == 1) {
6498 break
6499 }
6500 v.reset(OpARM64LessThan)
6501 v0 := b.NewValue0(v.Pos, OpARM64TSTconst, types.TypeFlags)
6502 v0.AuxInt = int64ToAuxInt(c)
6503 v0.AddArg(y)
6504 v.AddArg(v0)
6505 return true
6506 }
6507
6508
6509
6510 for {
6511 if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
6512 break
6513 }
6514 x := v_0.Args[0]
6515 if x.Op != OpARM64ADDconst {
6516 break
6517 }
6518 c := auxIntToInt64(x.AuxInt)
6519 y := x.Args[0]
6520 if !(x.Uses == 1) {
6521 break
6522 }
6523 v.reset(OpARM64LessThanNoov)
6524 v0 := b.NewValue0(v.Pos, OpARM64CMNconst, types.TypeFlags)
6525 v0.AuxInt = int64ToAuxInt(c)
6526 v0.AddArg(y)
6527 v.AddArg(v0)
6528 return true
6529 }
6530
6531
6532
6533 for {
6534 if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
6535 break
6536 }
6537 x := v_0.Args[0]
6538 if x.Op != OpARM64ADDconst {
6539 break
6540 }
6541 c := auxIntToInt64(x.AuxInt)
6542 y := x.Args[0]
6543 if !(x.Uses == 1) {
6544 break
6545 }
6546 v.reset(OpARM64LessThanNoov)
6547 v0 := b.NewValue0(v.Pos, OpARM64CMNWconst, types.TypeFlags)
6548 v0.AuxInt = int32ToAuxInt(int32(c))
6549 v0.AddArg(y)
6550 v.AddArg(v0)
6551 return true
6552 }
6553
6554
6555
6556 for {
6557 if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
6558 break
6559 }
6560 z := v_0.Args[0]
6561 if z.Op != OpARM64ADD {
6562 break
6563 }
6564 y := z.Args[1]
6565 x := z.Args[0]
6566 if !(z.Uses == 1) {
6567 break
6568 }
6569 v.reset(OpARM64LessThanNoov)
6570 v0 := b.NewValue0(v.Pos, OpARM64CMN, types.TypeFlags)
6571 v0.AddArg2(x, y)
6572 v.AddArg(v0)
6573 return true
6574 }
6575
6576
6577
6578 for {
6579 if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
6580 break
6581 }
6582 z := v_0.Args[0]
6583 if z.Op != OpARM64ADD {
6584 break
6585 }
6586 y := z.Args[1]
6587 x := z.Args[0]
6588 if !(z.Uses == 1) {
6589 break
6590 }
6591 v.reset(OpARM64LessThanNoov)
6592 v0 := b.NewValue0(v.Pos, OpARM64CMNW, types.TypeFlags)
6593 v0.AddArg2(x, y)
6594 v.AddArg(v0)
6595 return true
6596 }
6597
6598
6599
6600 for {
6601 if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
6602 break
6603 }
6604 z := v_0.Args[0]
6605 if z.Op != OpARM64MADD {
6606 break
6607 }
6608 y := z.Args[2]
6609 a := z.Args[0]
6610 x := z.Args[1]
6611 if !(z.Uses == 1) {
6612 break
6613 }
6614 v.reset(OpARM64LessThanNoov)
6615 v0 := b.NewValue0(v.Pos, OpARM64CMN, types.TypeFlags)
6616 v1 := b.NewValue0(v.Pos, OpARM64MUL, x.Type)
6617 v1.AddArg2(x, y)
6618 v0.AddArg2(a, v1)
6619 v.AddArg(v0)
6620 return true
6621 }
6622
6623
6624
6625 for {
6626 if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
6627 break
6628 }
6629 z := v_0.Args[0]
6630 if z.Op != OpARM64MSUB {
6631 break
6632 }
6633 y := z.Args[2]
6634 a := z.Args[0]
6635 x := z.Args[1]
6636 if !(z.Uses == 1) {
6637 break
6638 }
6639 v.reset(OpARM64LessThanNoov)
6640 v0 := b.NewValue0(v.Pos, OpARM64CMP, types.TypeFlags)
6641 v1 := b.NewValue0(v.Pos, OpARM64MUL, x.Type)
6642 v1.AddArg2(x, y)
6643 v0.AddArg2(a, v1)
6644 v.AddArg(v0)
6645 return true
6646 }
6647
6648
6649
6650 for {
6651 if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
6652 break
6653 }
6654 z := v_0.Args[0]
6655 if z.Op != OpARM64MADDW {
6656 break
6657 }
6658 y := z.Args[2]
6659 a := z.Args[0]
6660 x := z.Args[1]
6661 if !(z.Uses == 1) {
6662 break
6663 }
6664 v.reset(OpARM64LessThanNoov)
6665 v0 := b.NewValue0(v.Pos, OpARM64CMNW, types.TypeFlags)
6666 v1 := b.NewValue0(v.Pos, OpARM64MULW, x.Type)
6667 v1.AddArg2(x, y)
6668 v0.AddArg2(a, v1)
6669 v.AddArg(v0)
6670 return true
6671 }
6672
6673
6674
6675 for {
6676 if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
6677 break
6678 }
6679 z := v_0.Args[0]
6680 if z.Op != OpARM64MSUBW {
6681 break
6682 }
6683 y := z.Args[2]
6684 a := z.Args[0]
6685 x := z.Args[1]
6686 if !(z.Uses == 1) {
6687 break
6688 }
6689 v.reset(OpARM64LessThanNoov)
6690 v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
6691 v1 := b.NewValue0(v.Pos, OpARM64MULW, x.Type)
6692 v1.AddArg2(x, y)
6693 v0.AddArg2(a, v1)
6694 v.AddArg(v0)
6695 return true
6696 }
6697
6698
6699 for {
6700 if v_0.Op != OpARM64FlagConstant {
6701 break
6702 }
6703 fc := auxIntToFlagConstant(v_0.AuxInt)
6704 v.reset(OpARM64MOVDconst)
6705 v.AuxInt = int64ToAuxInt(b2i(fc.lt()))
6706 return true
6707 }
6708
6709
6710 for {
6711 if v_0.Op != OpARM64InvertFlags {
6712 break
6713 }
6714 x := v_0.Args[0]
6715 v.reset(OpARM64GreaterThan)
6716 v.AddArg(x)
6717 return true
6718 }
6719 return false
6720 }
6721 func rewriteValueARM64_OpARM64LessThanF(v *Value) bool {
6722 v_0 := v.Args[0]
6723
6724
6725 for {
6726 if v_0.Op != OpARM64InvertFlags {
6727 break
6728 }
6729 x := v_0.Args[0]
6730 v.reset(OpARM64GreaterThanF)
6731 v.AddArg(x)
6732 return true
6733 }
6734 return false
6735 }
6736 func rewriteValueARM64_OpARM64LessThanNoov(v *Value) bool {
6737 v_0 := v.Args[0]
6738 b := v.Block
6739 typ := &b.Func.Config.Types
6740
6741
6742 for {
6743 if v_0.Op != OpARM64InvertFlags {
6744 break
6745 }
6746 x := v_0.Args[0]
6747 v.reset(OpARM64CSEL0)
6748 v.AuxInt = opToAuxInt(OpARM64NotEqual)
6749 v0 := b.NewValue0(v.Pos, OpARM64GreaterEqualNoov, typ.Bool)
6750 v0.AddArg(x)
6751 v.AddArg2(v0, x)
6752 return true
6753 }
6754 return false
6755 }
6756 func rewriteValueARM64_OpARM64LessThanU(v *Value) bool {
6757 v_0 := v.Args[0]
6758
6759
6760 for {
6761 if v_0.Op != OpARM64FlagConstant {
6762 break
6763 }
6764 fc := auxIntToFlagConstant(v_0.AuxInt)
6765 v.reset(OpARM64MOVDconst)
6766 v.AuxInt = int64ToAuxInt(b2i(fc.ult()))
6767 return true
6768 }
6769
6770
6771 for {
6772 if v_0.Op != OpARM64InvertFlags {
6773 break
6774 }
6775 x := v_0.Args[0]
6776 v.reset(OpARM64GreaterThanU)
6777 v.AddArg(x)
6778 return true
6779 }
6780 return false
6781 }
6782 func rewriteValueARM64_OpARM64MADD(v *Value) bool {
6783 v_2 := v.Args[2]
6784 v_1 := v.Args[1]
6785 v_0 := v.Args[0]
6786 b := v.Block
6787
6788
6789 for {
6790 a := v_0
6791 x := v_1
6792 if v_2.Op != OpARM64MOVDconst || auxIntToInt64(v_2.AuxInt) != -1 {
6793 break
6794 }
6795 v.reset(OpARM64SUB)
6796 v.AddArg2(a, x)
6797 return true
6798 }
6799
6800
6801 for {
6802 a := v_0
6803 if v_2.Op != OpARM64MOVDconst || auxIntToInt64(v_2.AuxInt) != 0 {
6804 break
6805 }
6806 v.copyOf(a)
6807 return true
6808 }
6809
6810
6811 for {
6812 a := v_0
6813 x := v_1
6814 if v_2.Op != OpARM64MOVDconst || auxIntToInt64(v_2.AuxInt) != 1 {
6815 break
6816 }
6817 v.reset(OpARM64ADD)
6818 v.AddArg2(a, x)
6819 return true
6820 }
6821
6822
6823
6824 for {
6825 a := v_0
6826 x := v_1
6827 if v_2.Op != OpARM64MOVDconst {
6828 break
6829 }
6830 c := auxIntToInt64(v_2.AuxInt)
6831 if !(isPowerOfTwo(c)) {
6832 break
6833 }
6834 v.reset(OpARM64ADDshiftLL)
6835 v.AuxInt = int64ToAuxInt(log64(c))
6836 v.AddArg2(a, x)
6837 return true
6838 }
6839
6840
6841
6842 for {
6843 a := v_0
6844 x := v_1
6845 if v_2.Op != OpARM64MOVDconst {
6846 break
6847 }
6848 c := auxIntToInt64(v_2.AuxInt)
6849 if !(isPowerOfTwo(c-1) && c >= 3) {
6850 break
6851 }
6852 v.reset(OpARM64ADD)
6853 v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
6854 v0.AuxInt = int64ToAuxInt(log64(c - 1))
6855 v0.AddArg2(x, x)
6856 v.AddArg2(a, v0)
6857 return true
6858 }
6859
6860
6861
6862 for {
6863 a := v_0
6864 x := v_1
6865 if v_2.Op != OpARM64MOVDconst {
6866 break
6867 }
6868 c := auxIntToInt64(v_2.AuxInt)
6869 if !(isPowerOfTwo(c+1) && c >= 7) {
6870 break
6871 }
6872 v.reset(OpARM64SUB)
6873 v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
6874 v0.AuxInt = int64ToAuxInt(log64(c + 1))
6875 v0.AddArg2(x, x)
6876 v.AddArg2(a, v0)
6877 return true
6878 }
6879
6880
6881
6882 for {
6883 a := v_0
6884 x := v_1
6885 if v_2.Op != OpARM64MOVDconst {
6886 break
6887 }
6888 c := auxIntToInt64(v_2.AuxInt)
6889 if !(c%3 == 0 && isPowerOfTwo(c/3)) {
6890 break
6891 }
6892 v.reset(OpARM64SUBshiftLL)
6893 v.AuxInt = int64ToAuxInt(log64(c / 3))
6894 v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
6895 v0.AuxInt = int64ToAuxInt(2)
6896 v0.AddArg2(x, x)
6897 v.AddArg2(a, v0)
6898 return true
6899 }
6900
6901
6902
6903 for {
6904 a := v_0
6905 x := v_1
6906 if v_2.Op != OpARM64MOVDconst {
6907 break
6908 }
6909 c := auxIntToInt64(v_2.AuxInt)
6910 if !(c%5 == 0 && isPowerOfTwo(c/5)) {
6911 break
6912 }
6913 v.reset(OpARM64ADDshiftLL)
6914 v.AuxInt = int64ToAuxInt(log64(c / 5))
6915 v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
6916 v0.AuxInt = int64ToAuxInt(2)
6917 v0.AddArg2(x, x)
6918 v.AddArg2(a, v0)
6919 return true
6920 }
6921
6922
6923
6924 for {
6925 a := v_0
6926 x := v_1
6927 if v_2.Op != OpARM64MOVDconst {
6928 break
6929 }
6930 c := auxIntToInt64(v_2.AuxInt)
6931 if !(c%7 == 0 && isPowerOfTwo(c/7)) {
6932 break
6933 }
6934 v.reset(OpARM64SUBshiftLL)
6935 v.AuxInt = int64ToAuxInt(log64(c / 7))
6936 v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
6937 v0.AuxInt = int64ToAuxInt(3)
6938 v0.AddArg2(x, x)
6939 v.AddArg2(a, v0)
6940 return true
6941 }
6942
6943
6944
6945 for {
6946 a := v_0
6947 x := v_1
6948 if v_2.Op != OpARM64MOVDconst {
6949 break
6950 }
6951 c := auxIntToInt64(v_2.AuxInt)
6952 if !(c%9 == 0 && isPowerOfTwo(c/9)) {
6953 break
6954 }
6955 v.reset(OpARM64ADDshiftLL)
6956 v.AuxInt = int64ToAuxInt(log64(c / 9))
6957 v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
6958 v0.AuxInt = int64ToAuxInt(3)
6959 v0.AddArg2(x, x)
6960 v.AddArg2(a, v0)
6961 return true
6962 }
6963
6964
6965 for {
6966 a := v_0
6967 if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != -1 {
6968 break
6969 }
6970 x := v_2
6971 v.reset(OpARM64SUB)
6972 v.AddArg2(a, x)
6973 return true
6974 }
6975
6976
6977 for {
6978 a := v_0
6979 if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 0 {
6980 break
6981 }
6982 v.copyOf(a)
6983 return true
6984 }
6985
6986
6987 for {
6988 a := v_0
6989 if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 1 {
6990 break
6991 }
6992 x := v_2
6993 v.reset(OpARM64ADD)
6994 v.AddArg2(a, x)
6995 return true
6996 }
6997
6998
6999
7000 for {
7001 a := v_0
7002 if v_1.Op != OpARM64MOVDconst {
7003 break
7004 }
7005 c := auxIntToInt64(v_1.AuxInt)
7006 x := v_2
7007 if !(isPowerOfTwo(c)) {
7008 break
7009 }
7010 v.reset(OpARM64ADDshiftLL)
7011 v.AuxInt = int64ToAuxInt(log64(c))
7012 v.AddArg2(a, x)
7013 return true
7014 }
7015
7016
7017
7018 for {
7019 a := v_0
7020 if v_1.Op != OpARM64MOVDconst {
7021 break
7022 }
7023 c := auxIntToInt64(v_1.AuxInt)
7024 x := v_2
7025 if !(isPowerOfTwo(c-1) && c >= 3) {
7026 break
7027 }
7028 v.reset(OpARM64ADD)
7029 v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
7030 v0.AuxInt = int64ToAuxInt(log64(c - 1))
7031 v0.AddArg2(x, x)
7032 v.AddArg2(a, v0)
7033 return true
7034 }
7035
7036
7037
7038 for {
7039 a := v_0
7040 if v_1.Op != OpARM64MOVDconst {
7041 break
7042 }
7043 c := auxIntToInt64(v_1.AuxInt)
7044 x := v_2
7045 if !(isPowerOfTwo(c+1) && c >= 7) {
7046 break
7047 }
7048 v.reset(OpARM64SUB)
7049 v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
7050 v0.AuxInt = int64ToAuxInt(log64(c + 1))
7051 v0.AddArg2(x, x)
7052 v.AddArg2(a, v0)
7053 return true
7054 }
7055
7056
7057
7058 for {
7059 a := v_0
7060 if v_1.Op != OpARM64MOVDconst {
7061 break
7062 }
7063 c := auxIntToInt64(v_1.AuxInt)
7064 x := v_2
7065 if !(c%3 == 0 && isPowerOfTwo(c/3)) {
7066 break
7067 }
7068 v.reset(OpARM64SUBshiftLL)
7069 v.AuxInt = int64ToAuxInt(log64(c / 3))
7070 v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
7071 v0.AuxInt = int64ToAuxInt(2)
7072 v0.AddArg2(x, x)
7073 v.AddArg2(a, v0)
7074 return true
7075 }
7076
7077
7078
7079 for {
7080 a := v_0
7081 if v_1.Op != OpARM64MOVDconst {
7082 break
7083 }
7084 c := auxIntToInt64(v_1.AuxInt)
7085 x := v_2
7086 if !(c%5 == 0 && isPowerOfTwo(c/5)) {
7087 break
7088 }
7089 v.reset(OpARM64ADDshiftLL)
7090 v.AuxInt = int64ToAuxInt(log64(c / 5))
7091 v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
7092 v0.AuxInt = int64ToAuxInt(2)
7093 v0.AddArg2(x, x)
7094 v.AddArg2(a, v0)
7095 return true
7096 }
7097
7098
7099
7100 for {
7101 a := v_0
7102 if v_1.Op != OpARM64MOVDconst {
7103 break
7104 }
7105 c := auxIntToInt64(v_1.AuxInt)
7106 x := v_2
7107 if !(c%7 == 0 && isPowerOfTwo(c/7)) {
7108 break
7109 }
7110 v.reset(OpARM64SUBshiftLL)
7111 v.AuxInt = int64ToAuxInt(log64(c / 7))
7112 v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
7113 v0.AuxInt = int64ToAuxInt(3)
7114 v0.AddArg2(x, x)
7115 v.AddArg2(a, v0)
7116 return true
7117 }
7118
7119
7120
7121 for {
7122 a := v_0
7123 if v_1.Op != OpARM64MOVDconst {
7124 break
7125 }
7126 c := auxIntToInt64(v_1.AuxInt)
7127 x := v_2
7128 if !(c%9 == 0 && isPowerOfTwo(c/9)) {
7129 break
7130 }
7131 v.reset(OpARM64ADDshiftLL)
7132 v.AuxInt = int64ToAuxInt(log64(c / 9))
7133 v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
7134 v0.AuxInt = int64ToAuxInt(3)
7135 v0.AddArg2(x, x)
7136 v.AddArg2(a, v0)
7137 return true
7138 }
7139
7140
7141 for {
7142 if v_0.Op != OpARM64MOVDconst {
7143 break
7144 }
7145 c := auxIntToInt64(v_0.AuxInt)
7146 x := v_1
7147 y := v_2
7148 v.reset(OpARM64ADDconst)
7149 v.AuxInt = int64ToAuxInt(c)
7150 v0 := b.NewValue0(v.Pos, OpARM64MUL, x.Type)
7151 v0.AddArg2(x, y)
7152 v.AddArg(v0)
7153 return true
7154 }
7155
7156
7157 for {
7158 a := v_0
7159 if v_1.Op != OpARM64MOVDconst {
7160 break
7161 }
7162 c := auxIntToInt64(v_1.AuxInt)
7163 if v_2.Op != OpARM64MOVDconst {
7164 break
7165 }
7166 d := auxIntToInt64(v_2.AuxInt)
7167 v.reset(OpARM64ADDconst)
7168 v.AuxInt = int64ToAuxInt(c * d)
7169 v.AddArg(a)
7170 return true
7171 }
7172 return false
7173 }
7174 func rewriteValueARM64_OpARM64MADDW(v *Value) bool {
7175 v_2 := v.Args[2]
7176 v_1 := v.Args[1]
7177 v_0 := v.Args[0]
7178 b := v.Block
7179
7180
7181
7182 for {
7183 a := v_0
7184 x := v_1
7185 if v_2.Op != OpARM64MOVDconst {
7186 break
7187 }
7188 c := auxIntToInt64(v_2.AuxInt)
7189 if !(int32(c) == -1) {
7190 break
7191 }
7192 v.reset(OpARM64MOVWUreg)
7193 v0 := b.NewValue0(v.Pos, OpARM64SUB, a.Type)
7194 v0.AddArg2(a, x)
7195 v.AddArg(v0)
7196 return true
7197 }
7198
7199
7200
7201 for {
7202 a := v_0
7203 if v_2.Op != OpARM64MOVDconst {
7204 break
7205 }
7206 c := auxIntToInt64(v_2.AuxInt)
7207 if !(int32(c) == 0) {
7208 break
7209 }
7210 v.reset(OpARM64MOVWUreg)
7211 v.AddArg(a)
7212 return true
7213 }
7214
7215
7216
7217 for {
7218 a := v_0
7219 x := v_1
7220 if v_2.Op != OpARM64MOVDconst {
7221 break
7222 }
7223 c := auxIntToInt64(v_2.AuxInt)
7224 if !(int32(c) == 1) {
7225 break
7226 }
7227 v.reset(OpARM64MOVWUreg)
7228 v0 := b.NewValue0(v.Pos, OpARM64ADD, a.Type)
7229 v0.AddArg2(a, x)
7230 v.AddArg(v0)
7231 return true
7232 }
7233
7234
7235
7236 for {
7237 a := v_0
7238 x := v_1
7239 if v_2.Op != OpARM64MOVDconst {
7240 break
7241 }
7242 c := auxIntToInt64(v_2.AuxInt)
7243 if !(isPowerOfTwo(c)) {
7244 break
7245 }
7246 v.reset(OpARM64MOVWUreg)
7247 v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, a.Type)
7248 v0.AuxInt = int64ToAuxInt(log64(c))
7249 v0.AddArg2(a, x)
7250 v.AddArg(v0)
7251 return true
7252 }
7253
7254
7255
7256 for {
7257 a := v_0
7258 x := v_1
7259 if v_2.Op != OpARM64MOVDconst {
7260 break
7261 }
7262 c := auxIntToInt64(v_2.AuxInt)
7263 if !(isPowerOfTwo(c-1) && int32(c) >= 3) {
7264 break
7265 }
7266 v.reset(OpARM64MOVWUreg)
7267 v0 := b.NewValue0(v.Pos, OpARM64ADD, a.Type)
7268 v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
7269 v1.AuxInt = int64ToAuxInt(log64(c - 1))
7270 v1.AddArg2(x, x)
7271 v0.AddArg2(a, v1)
7272 v.AddArg(v0)
7273 return true
7274 }
7275
7276
7277
7278 for {
7279 a := v_0
7280 x := v_1
7281 if v_2.Op != OpARM64MOVDconst {
7282 break
7283 }
7284 c := auxIntToInt64(v_2.AuxInt)
7285 if !(isPowerOfTwo(c+1) && int32(c) >= 7) {
7286 break
7287 }
7288 v.reset(OpARM64MOVWUreg)
7289 v0 := b.NewValue0(v.Pos, OpARM64SUB, a.Type)
7290 v1 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
7291 v1.AuxInt = int64ToAuxInt(log64(c + 1))
7292 v1.AddArg2(x, x)
7293 v0.AddArg2(a, v1)
7294 v.AddArg(v0)
7295 return true
7296 }
7297
7298
7299
7300 for {
7301 a := v_0
7302 x := v_1
7303 if v_2.Op != OpARM64MOVDconst {
7304 break
7305 }
7306 c := auxIntToInt64(v_2.AuxInt)
7307 if !(c%3 == 0 && isPowerOfTwo(c/3) && is32Bit(c)) {
7308 break
7309 }
7310 v.reset(OpARM64MOVWUreg)
7311 v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, a.Type)
7312 v0.AuxInt = int64ToAuxInt(log64(c / 3))
7313 v1 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
7314 v1.AuxInt = int64ToAuxInt(2)
7315 v1.AddArg2(x, x)
7316 v0.AddArg2(a, v1)
7317 v.AddArg(v0)
7318 return true
7319 }
7320
7321
7322
7323 for {
7324 a := v_0
7325 x := v_1
7326 if v_2.Op != OpARM64MOVDconst {
7327 break
7328 }
7329 c := auxIntToInt64(v_2.AuxInt)
7330 if !(c%5 == 0 && isPowerOfTwo(c/5) && is32Bit(c)) {
7331 break
7332 }
7333 v.reset(OpARM64MOVWUreg)
7334 v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, a.Type)
7335 v0.AuxInt = int64ToAuxInt(log64(c / 5))
7336 v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
7337 v1.AuxInt = int64ToAuxInt(2)
7338 v1.AddArg2(x, x)
7339 v0.AddArg2(a, v1)
7340 v.AddArg(v0)
7341 return true
7342 }
7343
7344
7345
7346 for {
7347 a := v_0
7348 x := v_1
7349 if v_2.Op != OpARM64MOVDconst {
7350 break
7351 }
7352 c := auxIntToInt64(v_2.AuxInt)
7353 if !(c%7 == 0 && isPowerOfTwo(c/7) && is32Bit(c)) {
7354 break
7355 }
7356 v.reset(OpARM64MOVWUreg)
7357 v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, a.Type)
7358 v0.AuxInt = int64ToAuxInt(log64(c / 7))
7359 v1 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
7360 v1.AuxInt = int64ToAuxInt(3)
7361 v1.AddArg2(x, x)
7362 v0.AddArg2(a, v1)
7363 v.AddArg(v0)
7364 return true
7365 }
7366
7367
7368
7369 for {
7370 a := v_0
7371 x := v_1
7372 if v_2.Op != OpARM64MOVDconst {
7373 break
7374 }
7375 c := auxIntToInt64(v_2.AuxInt)
7376 if !(c%9 == 0 && isPowerOfTwo(c/9) && is32Bit(c)) {
7377 break
7378 }
7379 v.reset(OpARM64MOVWUreg)
7380 v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, a.Type)
7381 v0.AuxInt = int64ToAuxInt(log64(c / 9))
7382 v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
7383 v1.AuxInt = int64ToAuxInt(3)
7384 v1.AddArg2(x, x)
7385 v0.AddArg2(a, v1)
7386 v.AddArg(v0)
7387 return true
7388 }
7389
7390
7391
7392 for {
7393 a := v_0
7394 if v_1.Op != OpARM64MOVDconst {
7395 break
7396 }
7397 c := auxIntToInt64(v_1.AuxInt)
7398 x := v_2
7399 if !(int32(c) == -1) {
7400 break
7401 }
7402 v.reset(OpARM64MOVWUreg)
7403 v0 := b.NewValue0(v.Pos, OpARM64SUB, a.Type)
7404 v0.AddArg2(a, x)
7405 v.AddArg(v0)
7406 return true
7407 }
7408
7409
7410
7411 for {
7412 a := v_0
7413 if v_1.Op != OpARM64MOVDconst {
7414 break
7415 }
7416 c := auxIntToInt64(v_1.AuxInt)
7417 if !(int32(c) == 0) {
7418 break
7419 }
7420 v.reset(OpARM64MOVWUreg)
7421 v.AddArg(a)
7422 return true
7423 }
7424
7425
7426
7427 for {
7428 a := v_0
7429 if v_1.Op != OpARM64MOVDconst {
7430 break
7431 }
7432 c := auxIntToInt64(v_1.AuxInt)
7433 x := v_2
7434 if !(int32(c) == 1) {
7435 break
7436 }
7437 v.reset(OpARM64MOVWUreg)
7438 v0 := b.NewValue0(v.Pos, OpARM64ADD, a.Type)
7439 v0.AddArg2(a, x)
7440 v.AddArg(v0)
7441 return true
7442 }
7443
7444
7445
7446 for {
7447 a := v_0
7448 if v_1.Op != OpARM64MOVDconst {
7449 break
7450 }
7451 c := auxIntToInt64(v_1.AuxInt)
7452 x := v_2
7453 if !(isPowerOfTwo(c)) {
7454 break
7455 }
7456 v.reset(OpARM64MOVWUreg)
7457 v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, a.Type)
7458 v0.AuxInt = int64ToAuxInt(log64(c))
7459 v0.AddArg2(a, x)
7460 v.AddArg(v0)
7461 return true
7462 }
7463
7464
7465
7466 for {
7467 a := v_0
7468 if v_1.Op != OpARM64MOVDconst {
7469 break
7470 }
7471 c := auxIntToInt64(v_1.AuxInt)
7472 x := v_2
7473 if !(isPowerOfTwo(c-1) && int32(c) >= 3) {
7474 break
7475 }
7476 v.reset(OpARM64MOVWUreg)
7477 v0 := b.NewValue0(v.Pos, OpARM64ADD, a.Type)
7478 v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
7479 v1.AuxInt = int64ToAuxInt(log64(c - 1))
7480 v1.AddArg2(x, x)
7481 v0.AddArg2(a, v1)
7482 v.AddArg(v0)
7483 return true
7484 }
7485
7486
7487
7488 for {
7489 a := v_0
7490 if v_1.Op != OpARM64MOVDconst {
7491 break
7492 }
7493 c := auxIntToInt64(v_1.AuxInt)
7494 x := v_2
7495 if !(isPowerOfTwo(c+1) && int32(c) >= 7) {
7496 break
7497 }
7498 v.reset(OpARM64MOVWUreg)
7499 v0 := b.NewValue0(v.Pos, OpARM64SUB, a.Type)
7500 v1 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
7501 v1.AuxInt = int64ToAuxInt(log64(c + 1))
7502 v1.AddArg2(x, x)
7503 v0.AddArg2(a, v1)
7504 v.AddArg(v0)
7505 return true
7506 }
7507
7508
7509
7510 for {
7511 a := v_0
7512 if v_1.Op != OpARM64MOVDconst {
7513 break
7514 }
7515 c := auxIntToInt64(v_1.AuxInt)
7516 x := v_2
7517 if !(c%3 == 0 && isPowerOfTwo(c/3) && is32Bit(c)) {
7518 break
7519 }
7520 v.reset(OpARM64MOVWUreg)
7521 v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, a.Type)
7522 v0.AuxInt = int64ToAuxInt(log64(c / 3))
7523 v1 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
7524 v1.AuxInt = int64ToAuxInt(2)
7525 v1.AddArg2(x, x)
7526 v0.AddArg2(a, v1)
7527 v.AddArg(v0)
7528 return true
7529 }
7530
7531
7532
7533 for {
7534 a := v_0
7535 if v_1.Op != OpARM64MOVDconst {
7536 break
7537 }
7538 c := auxIntToInt64(v_1.AuxInt)
7539 x := v_2
7540 if !(c%5 == 0 && isPowerOfTwo(c/5) && is32Bit(c)) {
7541 break
7542 }
7543 v.reset(OpARM64MOVWUreg)
7544 v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, a.Type)
7545 v0.AuxInt = int64ToAuxInt(log64(c / 5))
7546 v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
7547 v1.AuxInt = int64ToAuxInt(2)
7548 v1.AddArg2(x, x)
7549 v0.AddArg2(a, v1)
7550 v.AddArg(v0)
7551 return true
7552 }
7553
7554
7555
7556 for {
7557 a := v_0
7558 if v_1.Op != OpARM64MOVDconst {
7559 break
7560 }
7561 c := auxIntToInt64(v_1.AuxInt)
7562 x := v_2
7563 if !(c%7 == 0 && isPowerOfTwo(c/7) && is32Bit(c)) {
7564 break
7565 }
7566 v.reset(OpARM64MOVWUreg)
7567 v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, a.Type)
7568 v0.AuxInt = int64ToAuxInt(log64(c / 7))
7569 v1 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
7570 v1.AuxInt = int64ToAuxInt(3)
7571 v1.AddArg2(x, x)
7572 v0.AddArg2(a, v1)
7573 v.AddArg(v0)
7574 return true
7575 }
7576
7577
7578
7579 for {
7580 a := v_0
7581 if v_1.Op != OpARM64MOVDconst {
7582 break
7583 }
7584 c := auxIntToInt64(v_1.AuxInt)
7585 x := v_2
7586 if !(c%9 == 0 && isPowerOfTwo(c/9) && is32Bit(c)) {
7587 break
7588 }
7589 v.reset(OpARM64MOVWUreg)
7590 v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, a.Type)
7591 v0.AuxInt = int64ToAuxInt(log64(c / 9))
7592 v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
7593 v1.AuxInt = int64ToAuxInt(3)
7594 v1.AddArg2(x, x)
7595 v0.AddArg2(a, v1)
7596 v.AddArg(v0)
7597 return true
7598 }
7599
7600
7601 for {
7602 if v_0.Op != OpARM64MOVDconst {
7603 break
7604 }
7605 c := auxIntToInt64(v_0.AuxInt)
7606 x := v_1
7607 y := v_2
7608 v.reset(OpARM64MOVWUreg)
7609 v0 := b.NewValue0(v.Pos, OpARM64ADDconst, x.Type)
7610 v0.AuxInt = int64ToAuxInt(c)
7611 v1 := b.NewValue0(v.Pos, OpARM64MULW, x.Type)
7612 v1.AddArg2(x, y)
7613 v0.AddArg(v1)
7614 v.AddArg(v0)
7615 return true
7616 }
7617
7618
7619 for {
7620 a := v_0
7621 if v_1.Op != OpARM64MOVDconst {
7622 break
7623 }
7624 c := auxIntToInt64(v_1.AuxInt)
7625 if v_2.Op != OpARM64MOVDconst {
7626 break
7627 }
7628 d := auxIntToInt64(v_2.AuxInt)
7629 v.reset(OpARM64MOVWUreg)
7630 v0 := b.NewValue0(v.Pos, OpARM64ADDconst, a.Type)
7631 v0.AuxInt = int64ToAuxInt(c * d)
7632 v0.AddArg(a)
7633 v.AddArg(v0)
7634 return true
7635 }
7636 return false
7637 }
7638 func rewriteValueARM64_OpARM64MNEG(v *Value) bool {
7639 v_1 := v.Args[1]
7640 v_0 := v.Args[0]
7641 b := v.Block
7642
7643
7644 for {
7645 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
7646 x := v_0
7647 if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != -1 {
7648 continue
7649 }
7650 v.copyOf(x)
7651 return true
7652 }
7653 break
7654 }
7655
7656
7657 for {
7658 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
7659 if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 0 {
7660 continue
7661 }
7662 v.reset(OpARM64MOVDconst)
7663 v.AuxInt = int64ToAuxInt(0)
7664 return true
7665 }
7666 break
7667 }
7668
7669
7670 for {
7671 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
7672 x := v_0
7673 if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 1 {
7674 continue
7675 }
7676 v.reset(OpARM64NEG)
7677 v.AddArg(x)
7678 return true
7679 }
7680 break
7681 }
7682
7683
7684
7685 for {
7686 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
7687 x := v_0
7688 if v_1.Op != OpARM64MOVDconst {
7689 continue
7690 }
7691 c := auxIntToInt64(v_1.AuxInt)
7692 if !(isPowerOfTwo(c)) {
7693 continue
7694 }
7695 v.reset(OpARM64NEG)
7696 v0 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
7697 v0.AuxInt = int64ToAuxInt(log64(c))
7698 v0.AddArg(x)
7699 v.AddArg(v0)
7700 return true
7701 }
7702 break
7703 }
7704
7705
7706
7707 for {
7708 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
7709 x := v_0
7710 if v_1.Op != OpARM64MOVDconst {
7711 continue
7712 }
7713 c := auxIntToInt64(v_1.AuxInt)
7714 if !(isPowerOfTwo(c-1) && c >= 3) {
7715 continue
7716 }
7717 v.reset(OpARM64NEG)
7718 v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
7719 v0.AuxInt = int64ToAuxInt(log64(c - 1))
7720 v0.AddArg2(x, x)
7721 v.AddArg(v0)
7722 return true
7723 }
7724 break
7725 }
7726
7727
7728
7729 for {
7730 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
7731 x := v_0
7732 if v_1.Op != OpARM64MOVDconst {
7733 continue
7734 }
7735 c := auxIntToInt64(v_1.AuxInt)
7736 if !(isPowerOfTwo(c+1) && c >= 7) {
7737 continue
7738 }
7739 v.reset(OpARM64NEG)
7740 v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
7741 v0.AuxInt = int64ToAuxInt(log64(c + 1))
7742 v1 := b.NewValue0(v.Pos, OpARM64NEG, x.Type)
7743 v1.AddArg(x)
7744 v0.AddArg2(v1, x)
7745 v.AddArg(v0)
7746 return true
7747 }
7748 break
7749 }
7750
7751
7752
7753 for {
7754 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
7755 x := v_0
7756 if v_1.Op != OpARM64MOVDconst {
7757 continue
7758 }
7759 c := auxIntToInt64(v_1.AuxInt)
7760 if !(c%3 == 0 && isPowerOfTwo(c/3)) {
7761 continue
7762 }
7763 v.reset(OpARM64SLLconst)
7764 v.Type = x.Type
7765 v.AuxInt = int64ToAuxInt(log64(c / 3))
7766 v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
7767 v0.AuxInt = int64ToAuxInt(2)
7768 v0.AddArg2(x, x)
7769 v.AddArg(v0)
7770 return true
7771 }
7772 break
7773 }
7774
7775
7776
7777 for {
7778 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
7779 x := v_0
7780 if v_1.Op != OpARM64MOVDconst {
7781 continue
7782 }
7783 c := auxIntToInt64(v_1.AuxInt)
7784 if !(c%5 == 0 && isPowerOfTwo(c/5)) {
7785 continue
7786 }
7787 v.reset(OpARM64NEG)
7788 v0 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
7789 v0.AuxInt = int64ToAuxInt(log64(c / 5))
7790 v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
7791 v1.AuxInt = int64ToAuxInt(2)
7792 v1.AddArg2(x, x)
7793 v0.AddArg(v1)
7794 v.AddArg(v0)
7795 return true
7796 }
7797 break
7798 }
7799
7800
7801
7802 for {
7803 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
7804 x := v_0
7805 if v_1.Op != OpARM64MOVDconst {
7806 continue
7807 }
7808 c := auxIntToInt64(v_1.AuxInt)
7809 if !(c%7 == 0 && isPowerOfTwo(c/7)) {
7810 continue
7811 }
7812 v.reset(OpARM64SLLconst)
7813 v.Type = x.Type
7814 v.AuxInt = int64ToAuxInt(log64(c / 7))
7815 v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
7816 v0.AuxInt = int64ToAuxInt(3)
7817 v0.AddArg2(x, x)
7818 v.AddArg(v0)
7819 return true
7820 }
7821 break
7822 }
7823
7824
7825
7826 for {
7827 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
7828 x := v_0
7829 if v_1.Op != OpARM64MOVDconst {
7830 continue
7831 }
7832 c := auxIntToInt64(v_1.AuxInt)
7833 if !(c%9 == 0 && isPowerOfTwo(c/9)) {
7834 continue
7835 }
7836 v.reset(OpARM64NEG)
7837 v0 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
7838 v0.AuxInt = int64ToAuxInt(log64(c / 9))
7839 v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
7840 v1.AuxInt = int64ToAuxInt(3)
7841 v1.AddArg2(x, x)
7842 v0.AddArg(v1)
7843 v.AddArg(v0)
7844 return true
7845 }
7846 break
7847 }
7848
7849
7850 for {
7851 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
7852 if v_0.Op != OpARM64MOVDconst {
7853 continue
7854 }
7855 c := auxIntToInt64(v_0.AuxInt)
7856 if v_1.Op != OpARM64MOVDconst {
7857 continue
7858 }
7859 d := auxIntToInt64(v_1.AuxInt)
7860 v.reset(OpARM64MOVDconst)
7861 v.AuxInt = int64ToAuxInt(-c * d)
7862 return true
7863 }
7864 break
7865 }
7866 return false
7867 }
7868 func rewriteValueARM64_OpARM64MNEGW(v *Value) bool {
7869 v_1 := v.Args[1]
7870 v_0 := v.Args[0]
7871 b := v.Block
7872
7873
7874
7875 for {
7876 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
7877 x := v_0
7878 if v_1.Op != OpARM64MOVDconst {
7879 continue
7880 }
7881 c := auxIntToInt64(v_1.AuxInt)
7882 if !(int32(c) == -1) {
7883 continue
7884 }
7885 v.reset(OpARM64MOVWUreg)
7886 v.AddArg(x)
7887 return true
7888 }
7889 break
7890 }
7891
7892
7893
7894 for {
7895 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
7896 if v_1.Op != OpARM64MOVDconst {
7897 continue
7898 }
7899 c := auxIntToInt64(v_1.AuxInt)
7900 if !(int32(c) == 0) {
7901 continue
7902 }
7903 v.reset(OpARM64MOVDconst)
7904 v.AuxInt = int64ToAuxInt(0)
7905 return true
7906 }
7907 break
7908 }
7909
7910
7911
7912 for {
7913 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
7914 x := v_0
7915 if v_1.Op != OpARM64MOVDconst {
7916 continue
7917 }
7918 c := auxIntToInt64(v_1.AuxInt)
7919 if !(int32(c) == 1) {
7920 continue
7921 }
7922 v.reset(OpARM64MOVWUreg)
7923 v0 := b.NewValue0(v.Pos, OpARM64NEG, x.Type)
7924 v0.AddArg(x)
7925 v.AddArg(v0)
7926 return true
7927 }
7928 break
7929 }
7930
7931
7932
7933 for {
7934 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
7935 x := v_0
7936 if v_1.Op != OpARM64MOVDconst {
7937 continue
7938 }
7939 c := auxIntToInt64(v_1.AuxInt)
7940 if !(isPowerOfTwo(c)) {
7941 continue
7942 }
7943 v.reset(OpARM64NEG)
7944 v0 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
7945 v0.AuxInt = int64ToAuxInt(log64(c))
7946 v0.AddArg(x)
7947 v.AddArg(v0)
7948 return true
7949 }
7950 break
7951 }
7952
7953
7954
7955 for {
7956 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
7957 x := v_0
7958 if v_1.Op != OpARM64MOVDconst {
7959 continue
7960 }
7961 c := auxIntToInt64(v_1.AuxInt)
7962 if !(isPowerOfTwo(c-1) && int32(c) >= 3) {
7963 continue
7964 }
7965 v.reset(OpARM64MOVWUreg)
7966 v0 := b.NewValue0(v.Pos, OpARM64NEG, x.Type)
7967 v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
7968 v1.AuxInt = int64ToAuxInt(log64(c - 1))
7969 v1.AddArg2(x, x)
7970 v0.AddArg(v1)
7971 v.AddArg(v0)
7972 return true
7973 }
7974 break
7975 }
7976
7977
7978
7979 for {
7980 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
7981 x := v_0
7982 if v_1.Op != OpARM64MOVDconst {
7983 continue
7984 }
7985 c := auxIntToInt64(v_1.AuxInt)
7986 if !(isPowerOfTwo(c+1) && int32(c) >= 7) {
7987 continue
7988 }
7989 v.reset(OpARM64MOVWUreg)
7990 v0 := b.NewValue0(v.Pos, OpARM64NEG, x.Type)
7991 v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
7992 v1.AuxInt = int64ToAuxInt(log64(c + 1))
7993 v2 := b.NewValue0(v.Pos, OpARM64NEG, x.Type)
7994 v2.AddArg(x)
7995 v1.AddArg2(v2, x)
7996 v0.AddArg(v1)
7997 v.AddArg(v0)
7998 return true
7999 }
8000 break
8001 }
8002
8003
8004
8005 for {
8006 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
8007 x := v_0
8008 if v_1.Op != OpARM64MOVDconst {
8009 continue
8010 }
8011 c := auxIntToInt64(v_1.AuxInt)
8012 if !(c%3 == 0 && isPowerOfTwo(c/3) && is32Bit(c)) {
8013 continue
8014 }
8015 v.reset(OpARM64MOVWUreg)
8016 v0 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
8017 v0.AuxInt = int64ToAuxInt(log64(c / 3))
8018 v1 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
8019 v1.AuxInt = int64ToAuxInt(2)
8020 v1.AddArg2(x, x)
8021 v0.AddArg(v1)
8022 v.AddArg(v0)
8023 return true
8024 }
8025 break
8026 }
8027
8028
8029
8030 for {
8031 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
8032 x := v_0
8033 if v_1.Op != OpARM64MOVDconst {
8034 continue
8035 }
8036 c := auxIntToInt64(v_1.AuxInt)
8037 if !(c%5 == 0 && isPowerOfTwo(c/5) && is32Bit(c)) {
8038 continue
8039 }
8040 v.reset(OpARM64MOVWUreg)
8041 v0 := b.NewValue0(v.Pos, OpARM64NEG, x.Type)
8042 v1 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
8043 v1.AuxInt = int64ToAuxInt(log64(c / 5))
8044 v2 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
8045 v2.AuxInt = int64ToAuxInt(2)
8046 v2.AddArg2(x, x)
8047 v1.AddArg(v2)
8048 v0.AddArg(v1)
8049 v.AddArg(v0)
8050 return true
8051 }
8052 break
8053 }
8054
8055
8056
8057 for {
8058 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
8059 x := v_0
8060 if v_1.Op != OpARM64MOVDconst {
8061 continue
8062 }
8063 c := auxIntToInt64(v_1.AuxInt)
8064 if !(c%7 == 0 && isPowerOfTwo(c/7) && is32Bit(c)) {
8065 continue
8066 }
8067 v.reset(OpARM64MOVWUreg)
8068 v0 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
8069 v0.AuxInt = int64ToAuxInt(log64(c / 7))
8070 v1 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
8071 v1.AuxInt = int64ToAuxInt(3)
8072 v1.AddArg2(x, x)
8073 v0.AddArg(v1)
8074 v.AddArg(v0)
8075 return true
8076 }
8077 break
8078 }
8079
8080
8081
8082 for {
8083 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
8084 x := v_0
8085 if v_1.Op != OpARM64MOVDconst {
8086 continue
8087 }
8088 c := auxIntToInt64(v_1.AuxInt)
8089 if !(c%9 == 0 && isPowerOfTwo(c/9) && is32Bit(c)) {
8090 continue
8091 }
8092 v.reset(OpARM64MOVWUreg)
8093 v0 := b.NewValue0(v.Pos, OpARM64NEG, x.Type)
8094 v1 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
8095 v1.AuxInt = int64ToAuxInt(log64(c / 9))
8096 v2 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
8097 v2.AuxInt = int64ToAuxInt(3)
8098 v2.AddArg2(x, x)
8099 v1.AddArg(v2)
8100 v0.AddArg(v1)
8101 v.AddArg(v0)
8102 return true
8103 }
8104 break
8105 }
8106
8107
8108 for {
8109 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
8110 if v_0.Op != OpARM64MOVDconst {
8111 continue
8112 }
8113 c := auxIntToInt64(v_0.AuxInt)
8114 if v_1.Op != OpARM64MOVDconst {
8115 continue
8116 }
8117 d := auxIntToInt64(v_1.AuxInt)
8118 v.reset(OpARM64MOVDconst)
8119 v.AuxInt = int64ToAuxInt(int64(uint32(-c * d)))
8120 return true
8121 }
8122 break
8123 }
8124 return false
8125 }
8126 func rewriteValueARM64_OpARM64MOD(v *Value) bool {
8127 v_1 := v.Args[1]
8128 v_0 := v.Args[0]
8129
8130
8131
8132 for {
8133 if v_0.Op != OpARM64MOVDconst {
8134 break
8135 }
8136 c := auxIntToInt64(v_0.AuxInt)
8137 if v_1.Op != OpARM64MOVDconst {
8138 break
8139 }
8140 d := auxIntToInt64(v_1.AuxInt)
8141 if !(d != 0) {
8142 break
8143 }
8144 v.reset(OpARM64MOVDconst)
8145 v.AuxInt = int64ToAuxInt(c % d)
8146 return true
8147 }
8148 return false
8149 }
8150 func rewriteValueARM64_OpARM64MODW(v *Value) bool {
8151 v_1 := v.Args[1]
8152 v_0 := v.Args[0]
8153
8154
8155
8156 for {
8157 if v_0.Op != OpARM64MOVDconst {
8158 break
8159 }
8160 c := auxIntToInt64(v_0.AuxInt)
8161 if v_1.Op != OpARM64MOVDconst {
8162 break
8163 }
8164 d := auxIntToInt64(v_1.AuxInt)
8165 if !(d != 0) {
8166 break
8167 }
8168 v.reset(OpARM64MOVDconst)
8169 v.AuxInt = int64ToAuxInt(int64(uint32(int32(c) % int32(d))))
8170 return true
8171 }
8172 return false
8173 }
8174 func rewriteValueARM64_OpARM64MOVBUload(v *Value) bool {
8175 v_1 := v.Args[1]
8176 v_0 := v.Args[0]
8177 b := v.Block
8178 config := b.Func.Config
8179
8180
8181
8182 for {
8183 off1 := auxIntToInt32(v.AuxInt)
8184 sym := auxToSym(v.Aux)
8185 if v_0.Op != OpARM64ADDconst {
8186 break
8187 }
8188 off2 := auxIntToInt64(v_0.AuxInt)
8189 ptr := v_0.Args[0]
8190 mem := v_1
8191 if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
8192 break
8193 }
8194 v.reset(OpARM64MOVBUload)
8195 v.AuxInt = int32ToAuxInt(off1 + int32(off2))
8196 v.Aux = symToAux(sym)
8197 v.AddArg2(ptr, mem)
8198 return true
8199 }
8200
8201
8202
8203 for {
8204 off := auxIntToInt32(v.AuxInt)
8205 sym := auxToSym(v.Aux)
8206 if v_0.Op != OpARM64ADD {
8207 break
8208 }
8209 idx := v_0.Args[1]
8210 ptr := v_0.Args[0]
8211 mem := v_1
8212 if !(off == 0 && sym == nil) {
8213 break
8214 }
8215 v.reset(OpARM64MOVBUloadidx)
8216 v.AddArg3(ptr, idx, mem)
8217 return true
8218 }
8219
8220
8221
8222 for {
8223 off1 := auxIntToInt32(v.AuxInt)
8224 sym1 := auxToSym(v.Aux)
8225 if v_0.Op != OpARM64MOVDaddr {
8226 break
8227 }
8228 off2 := auxIntToInt32(v_0.AuxInt)
8229 sym2 := auxToSym(v_0.Aux)
8230 ptr := v_0.Args[0]
8231 mem := v_1
8232 if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
8233 break
8234 }
8235 v.reset(OpARM64MOVBUload)
8236 v.AuxInt = int32ToAuxInt(off1 + off2)
8237 v.Aux = symToAux(mergeSym(sym1, sym2))
8238 v.AddArg2(ptr, mem)
8239 return true
8240 }
8241
8242
8243
8244 for {
8245 off := auxIntToInt32(v.AuxInt)
8246 sym := auxToSym(v.Aux)
8247 ptr := v_0
8248 if v_1.Op != OpARM64MOVBstorezero {
8249 break
8250 }
8251 off2 := auxIntToInt32(v_1.AuxInt)
8252 sym2 := auxToSym(v_1.Aux)
8253 ptr2 := v_1.Args[0]
8254 if !(sym == sym2 && off == off2 && isSamePtr(ptr, ptr2)) {
8255 break
8256 }
8257 v.reset(OpARM64MOVDconst)
8258 v.AuxInt = int64ToAuxInt(0)
8259 return true
8260 }
8261
8262
8263
8264 for {
8265 off := auxIntToInt32(v.AuxInt)
8266 sym := auxToSym(v.Aux)
8267 if v_0.Op != OpSB || !(symIsRO(sym)) {
8268 break
8269 }
8270 v.reset(OpARM64MOVDconst)
8271 v.AuxInt = int64ToAuxInt(int64(read8(sym, int64(off))))
8272 return true
8273 }
8274 return false
8275 }
8276 func rewriteValueARM64_OpARM64MOVBUloadidx(v *Value) bool {
8277 v_2 := v.Args[2]
8278 v_1 := v.Args[1]
8279 v_0 := v.Args[0]
8280
8281
8282
8283 for {
8284 ptr := v_0
8285 if v_1.Op != OpARM64MOVDconst {
8286 break
8287 }
8288 c := auxIntToInt64(v_1.AuxInt)
8289 mem := v_2
8290 if !(is32Bit(c)) {
8291 break
8292 }
8293 v.reset(OpARM64MOVBUload)
8294 v.AuxInt = int32ToAuxInt(int32(c))
8295 v.AddArg2(ptr, mem)
8296 return true
8297 }
8298
8299
8300
8301 for {
8302 if v_0.Op != OpARM64MOVDconst {
8303 break
8304 }
8305 c := auxIntToInt64(v_0.AuxInt)
8306 ptr := v_1
8307 mem := v_2
8308 if !(is32Bit(c)) {
8309 break
8310 }
8311 v.reset(OpARM64MOVBUload)
8312 v.AuxInt = int32ToAuxInt(int32(c))
8313 v.AddArg2(ptr, mem)
8314 return true
8315 }
8316
8317
8318
8319 for {
8320 ptr := v_0
8321 idx := v_1
8322 if v_2.Op != OpARM64MOVBstorezeroidx {
8323 break
8324 }
8325 idx2 := v_2.Args[1]
8326 ptr2 := v_2.Args[0]
8327 if !(isSamePtr(ptr, ptr2) && isSamePtr(idx, idx2) || isSamePtr(ptr, idx2) && isSamePtr(idx, ptr2)) {
8328 break
8329 }
8330 v.reset(OpARM64MOVDconst)
8331 v.AuxInt = int64ToAuxInt(0)
8332 return true
8333 }
8334 return false
8335 }
8336 func rewriteValueARM64_OpARM64MOVBUreg(v *Value) bool {
8337 v_0 := v.Args[0]
8338
8339
8340 for {
8341 if v_0.Op != OpARM64ANDconst {
8342 break
8343 }
8344 c := auxIntToInt64(v_0.AuxInt)
8345 x := v_0.Args[0]
8346 v.reset(OpARM64ANDconst)
8347 v.AuxInt = int64ToAuxInt(c & (1<<8 - 1))
8348 v.AddArg(x)
8349 return true
8350 }
8351
8352
8353 for {
8354 if v_0.Op != OpARM64MOVDconst {
8355 break
8356 }
8357 c := auxIntToInt64(v_0.AuxInt)
8358 v.reset(OpARM64MOVDconst)
8359 v.AuxInt = int64ToAuxInt(int64(uint8(c)))
8360 return true
8361 }
8362
8363
8364
8365 for {
8366 x := v_0
8367 if !(v.Type.Size() <= 1) {
8368 break
8369 }
8370 v.copyOf(x)
8371 return true
8372 }
8373
8374
8375
8376 for {
8377 if v_0.Op != OpARM64SLLconst {
8378 break
8379 }
8380 lc := auxIntToInt64(v_0.AuxInt)
8381 if !(lc >= 8) {
8382 break
8383 }
8384 v.reset(OpARM64MOVDconst)
8385 v.AuxInt = int64ToAuxInt(0)
8386 return true
8387 }
8388
8389
8390
8391 for {
8392 if v_0.Op != OpARM64SLLconst {
8393 break
8394 }
8395 lc := auxIntToInt64(v_0.AuxInt)
8396 x := v_0.Args[0]
8397 if !(lc < 8) {
8398 break
8399 }
8400 v.reset(OpARM64UBFIZ)
8401 v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(lc, 8-lc))
8402 v.AddArg(x)
8403 return true
8404 }
8405
8406
8407
8408 for {
8409 if v_0.Op != OpARM64SRLconst {
8410 break
8411 }
8412 rc := auxIntToInt64(v_0.AuxInt)
8413 x := v_0.Args[0]
8414 if !(rc < 8) {
8415 break
8416 }
8417 v.reset(OpARM64UBFX)
8418 v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(rc, 8))
8419 v.AddArg(x)
8420 return true
8421 }
8422
8423
8424
8425 for {
8426 if v_0.Op != OpARM64UBFX {
8427 break
8428 }
8429 bfc := auxIntToArm64BitField(v_0.AuxInt)
8430 x := v_0.Args[0]
8431 if !(bfc.width() <= 8) {
8432 break
8433 }
8434 v.reset(OpARM64UBFX)
8435 v.AuxInt = arm64BitFieldToAuxInt(bfc)
8436 v.AddArg(x)
8437 return true
8438 }
8439 return false
8440 }
8441 func rewriteValueARM64_OpARM64MOVBload(v *Value) bool {
8442 v_1 := v.Args[1]
8443 v_0 := v.Args[0]
8444 b := v.Block
8445 config := b.Func.Config
8446
8447
8448
8449 for {
8450 off1 := auxIntToInt32(v.AuxInt)
8451 sym := auxToSym(v.Aux)
8452 if v_0.Op != OpARM64ADDconst {
8453 break
8454 }
8455 off2 := auxIntToInt64(v_0.AuxInt)
8456 ptr := v_0.Args[0]
8457 mem := v_1
8458 if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
8459 break
8460 }
8461 v.reset(OpARM64MOVBload)
8462 v.AuxInt = int32ToAuxInt(off1 + int32(off2))
8463 v.Aux = symToAux(sym)
8464 v.AddArg2(ptr, mem)
8465 return true
8466 }
8467
8468
8469
8470 for {
8471 off := auxIntToInt32(v.AuxInt)
8472 sym := auxToSym(v.Aux)
8473 if v_0.Op != OpARM64ADD {
8474 break
8475 }
8476 idx := v_0.Args[1]
8477 ptr := v_0.Args[0]
8478 mem := v_1
8479 if !(off == 0 && sym == nil) {
8480 break
8481 }
8482 v.reset(OpARM64MOVBloadidx)
8483 v.AddArg3(ptr, idx, mem)
8484 return true
8485 }
8486
8487
8488
8489 for {
8490 off1 := auxIntToInt32(v.AuxInt)
8491 sym1 := auxToSym(v.Aux)
8492 if v_0.Op != OpARM64MOVDaddr {
8493 break
8494 }
8495 off2 := auxIntToInt32(v_0.AuxInt)
8496 sym2 := auxToSym(v_0.Aux)
8497 ptr := v_0.Args[0]
8498 mem := v_1
8499 if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
8500 break
8501 }
8502 v.reset(OpARM64MOVBload)
8503 v.AuxInt = int32ToAuxInt(off1 + off2)
8504 v.Aux = symToAux(mergeSym(sym1, sym2))
8505 v.AddArg2(ptr, mem)
8506 return true
8507 }
8508
8509
8510
8511 for {
8512 off := auxIntToInt32(v.AuxInt)
8513 sym := auxToSym(v.Aux)
8514 ptr := v_0
8515 if v_1.Op != OpARM64MOVBstorezero {
8516 break
8517 }
8518 off2 := auxIntToInt32(v_1.AuxInt)
8519 sym2 := auxToSym(v_1.Aux)
8520 ptr2 := v_1.Args[0]
8521 if !(sym == sym2 && off == off2 && isSamePtr(ptr, ptr2)) {
8522 break
8523 }
8524 v.reset(OpARM64MOVDconst)
8525 v.AuxInt = int64ToAuxInt(0)
8526 return true
8527 }
8528 return false
8529 }
8530 func rewriteValueARM64_OpARM64MOVBloadidx(v *Value) bool {
8531 v_2 := v.Args[2]
8532 v_1 := v.Args[1]
8533 v_0 := v.Args[0]
8534
8535
8536
8537 for {
8538 ptr := v_0
8539 if v_1.Op != OpARM64MOVDconst {
8540 break
8541 }
8542 c := auxIntToInt64(v_1.AuxInt)
8543 mem := v_2
8544 if !(is32Bit(c)) {
8545 break
8546 }
8547 v.reset(OpARM64MOVBload)
8548 v.AuxInt = int32ToAuxInt(int32(c))
8549 v.AddArg2(ptr, mem)
8550 return true
8551 }
8552
8553
8554
8555 for {
8556 if v_0.Op != OpARM64MOVDconst {
8557 break
8558 }
8559 c := auxIntToInt64(v_0.AuxInt)
8560 ptr := v_1
8561 mem := v_2
8562 if !(is32Bit(c)) {
8563 break
8564 }
8565 v.reset(OpARM64MOVBload)
8566 v.AuxInt = int32ToAuxInt(int32(c))
8567 v.AddArg2(ptr, mem)
8568 return true
8569 }
8570
8571
8572
8573 for {
8574 ptr := v_0
8575 idx := v_1
8576 if v_2.Op != OpARM64MOVBstorezeroidx {
8577 break
8578 }
8579 idx2 := v_2.Args[1]
8580 ptr2 := v_2.Args[0]
8581 if !(isSamePtr(ptr, ptr2) && isSamePtr(idx, idx2) || isSamePtr(ptr, idx2) && isSamePtr(idx, ptr2)) {
8582 break
8583 }
8584 v.reset(OpARM64MOVDconst)
8585 v.AuxInt = int64ToAuxInt(0)
8586 return true
8587 }
8588 return false
8589 }
8590 func rewriteValueARM64_OpARM64MOVBreg(v *Value) bool {
8591 v_0 := v.Args[0]
8592
8593
8594 for {
8595 if v_0.Op != OpARM64MOVDconst {
8596 break
8597 }
8598 c := auxIntToInt64(v_0.AuxInt)
8599 v.reset(OpARM64MOVDconst)
8600 v.AuxInt = int64ToAuxInt(int64(int8(c)))
8601 return true
8602 }
8603
8604
8605
8606 for {
8607 x := v_0
8608 if !(v.Type.Size() <= 1) {
8609 break
8610 }
8611 v.copyOf(x)
8612 return true
8613 }
8614
8615
8616
8617 for {
8618 t := v.Type
8619 if v_0.Op != OpARM64ANDconst {
8620 break
8621 }
8622 c := auxIntToInt64(v_0.AuxInt)
8623 x := v_0.Args[0]
8624 if !(uint64(c)&uint64(0xffffffffffffff80) == 0) {
8625 break
8626 }
8627 v.reset(OpARM64ANDconst)
8628 v.Type = t
8629 v.AuxInt = int64ToAuxInt(c)
8630 v.AddArg(x)
8631 return true
8632 }
8633
8634
8635
8636 for {
8637 if v_0.Op != OpARM64SLLconst {
8638 break
8639 }
8640 lc := auxIntToInt64(v_0.AuxInt)
8641 x := v_0.Args[0]
8642 if !(lc < 8) {
8643 break
8644 }
8645 v.reset(OpARM64SBFIZ)
8646 v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(lc, 8-lc))
8647 v.AddArg(x)
8648 return true
8649 }
8650
8651
8652
8653 for {
8654 if v_0.Op != OpARM64SBFX {
8655 break
8656 }
8657 bfc := auxIntToArm64BitField(v_0.AuxInt)
8658 x := v_0.Args[0]
8659 if !(bfc.width() <= 8) {
8660 break
8661 }
8662 v.reset(OpARM64SBFX)
8663 v.AuxInt = arm64BitFieldToAuxInt(bfc)
8664 v.AddArg(x)
8665 return true
8666 }
8667 return false
8668 }
8669 func rewriteValueARM64_OpARM64MOVBstore(v *Value) bool {
8670 v_2 := v.Args[2]
8671 v_1 := v.Args[1]
8672 v_0 := v.Args[0]
8673 b := v.Block
8674 config := b.Func.Config
8675
8676
8677
8678 for {
8679 off1 := auxIntToInt32(v.AuxInt)
8680 sym := auxToSym(v.Aux)
8681 if v_0.Op != OpARM64ADDconst {
8682 break
8683 }
8684 off2 := auxIntToInt64(v_0.AuxInt)
8685 ptr := v_0.Args[0]
8686 val := v_1
8687 mem := v_2
8688 if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
8689 break
8690 }
8691 v.reset(OpARM64MOVBstore)
8692 v.AuxInt = int32ToAuxInt(off1 + int32(off2))
8693 v.Aux = symToAux(sym)
8694 v.AddArg3(ptr, val, mem)
8695 return true
8696 }
8697
8698
8699
8700 for {
8701 off := auxIntToInt32(v.AuxInt)
8702 sym := auxToSym(v.Aux)
8703 if v_0.Op != OpARM64ADD {
8704 break
8705 }
8706 idx := v_0.Args[1]
8707 ptr := v_0.Args[0]
8708 val := v_1
8709 mem := v_2
8710 if !(off == 0 && sym == nil) {
8711 break
8712 }
8713 v.reset(OpARM64MOVBstoreidx)
8714 v.AddArg4(ptr, idx, val, mem)
8715 return true
8716 }
8717
8718
8719
8720 for {
8721 off1 := auxIntToInt32(v.AuxInt)
8722 sym1 := auxToSym(v.Aux)
8723 if v_0.Op != OpARM64MOVDaddr {
8724 break
8725 }
8726 off2 := auxIntToInt32(v_0.AuxInt)
8727 sym2 := auxToSym(v_0.Aux)
8728 ptr := v_0.Args[0]
8729 val := v_1
8730 mem := v_2
8731 if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
8732 break
8733 }
8734 v.reset(OpARM64MOVBstore)
8735 v.AuxInt = int32ToAuxInt(off1 + off2)
8736 v.Aux = symToAux(mergeSym(sym1, sym2))
8737 v.AddArg3(ptr, val, mem)
8738 return true
8739 }
8740
8741
8742 for {
8743 off := auxIntToInt32(v.AuxInt)
8744 sym := auxToSym(v.Aux)
8745 ptr := v_0
8746 if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 0 {
8747 break
8748 }
8749 mem := v_2
8750 v.reset(OpARM64MOVBstorezero)
8751 v.AuxInt = int32ToAuxInt(off)
8752 v.Aux = symToAux(sym)
8753 v.AddArg2(ptr, mem)
8754 return true
8755 }
8756
8757
8758 for {
8759 off := auxIntToInt32(v.AuxInt)
8760 sym := auxToSym(v.Aux)
8761 ptr := v_0
8762 if v_1.Op != OpARM64MOVBreg {
8763 break
8764 }
8765 x := v_1.Args[0]
8766 mem := v_2
8767 v.reset(OpARM64MOVBstore)
8768 v.AuxInt = int32ToAuxInt(off)
8769 v.Aux = symToAux(sym)
8770 v.AddArg3(ptr, x, mem)
8771 return true
8772 }
8773
8774
8775 for {
8776 off := auxIntToInt32(v.AuxInt)
8777 sym := auxToSym(v.Aux)
8778 ptr := v_0
8779 if v_1.Op != OpARM64MOVBUreg {
8780 break
8781 }
8782 x := v_1.Args[0]
8783 mem := v_2
8784 v.reset(OpARM64MOVBstore)
8785 v.AuxInt = int32ToAuxInt(off)
8786 v.Aux = symToAux(sym)
8787 v.AddArg3(ptr, x, mem)
8788 return true
8789 }
8790
8791
8792 for {
8793 off := auxIntToInt32(v.AuxInt)
8794 sym := auxToSym(v.Aux)
8795 ptr := v_0
8796 if v_1.Op != OpARM64MOVHreg {
8797 break
8798 }
8799 x := v_1.Args[0]
8800 mem := v_2
8801 v.reset(OpARM64MOVBstore)
8802 v.AuxInt = int32ToAuxInt(off)
8803 v.Aux = symToAux(sym)
8804 v.AddArg3(ptr, x, mem)
8805 return true
8806 }
8807
8808
8809 for {
8810 off := auxIntToInt32(v.AuxInt)
8811 sym := auxToSym(v.Aux)
8812 ptr := v_0
8813 if v_1.Op != OpARM64MOVHUreg {
8814 break
8815 }
8816 x := v_1.Args[0]
8817 mem := v_2
8818 v.reset(OpARM64MOVBstore)
8819 v.AuxInt = int32ToAuxInt(off)
8820 v.Aux = symToAux(sym)
8821 v.AddArg3(ptr, x, mem)
8822 return true
8823 }
8824
8825
8826 for {
8827 off := auxIntToInt32(v.AuxInt)
8828 sym := auxToSym(v.Aux)
8829 ptr := v_0
8830 if v_1.Op != OpARM64MOVWreg {
8831 break
8832 }
8833 x := v_1.Args[0]
8834 mem := v_2
8835 v.reset(OpARM64MOVBstore)
8836 v.AuxInt = int32ToAuxInt(off)
8837 v.Aux = symToAux(sym)
8838 v.AddArg3(ptr, x, mem)
8839 return true
8840 }
8841
8842
8843 for {
8844 off := auxIntToInt32(v.AuxInt)
8845 sym := auxToSym(v.Aux)
8846 ptr := v_0
8847 if v_1.Op != OpARM64MOVWUreg {
8848 break
8849 }
8850 x := v_1.Args[0]
8851 mem := v_2
8852 v.reset(OpARM64MOVBstore)
8853 v.AuxInt = int32ToAuxInt(off)
8854 v.Aux = symToAux(sym)
8855 v.AddArg3(ptr, x, mem)
8856 return true
8857 }
8858 return false
8859 }
8860 func rewriteValueARM64_OpARM64MOVBstoreidx(v *Value) bool {
8861 v_3 := v.Args[3]
8862 v_2 := v.Args[2]
8863 v_1 := v.Args[1]
8864 v_0 := v.Args[0]
8865
8866
8867
8868 for {
8869 ptr := v_0
8870 if v_1.Op != OpARM64MOVDconst {
8871 break
8872 }
8873 c := auxIntToInt64(v_1.AuxInt)
8874 val := v_2
8875 mem := v_3
8876 if !(is32Bit(c)) {
8877 break
8878 }
8879 v.reset(OpARM64MOVBstore)
8880 v.AuxInt = int32ToAuxInt(int32(c))
8881 v.AddArg3(ptr, val, mem)
8882 return true
8883 }
8884
8885
8886
8887 for {
8888 if v_0.Op != OpARM64MOVDconst {
8889 break
8890 }
8891 c := auxIntToInt64(v_0.AuxInt)
8892 idx := v_1
8893 val := v_2
8894 mem := v_3
8895 if !(is32Bit(c)) {
8896 break
8897 }
8898 v.reset(OpARM64MOVBstore)
8899 v.AuxInt = int32ToAuxInt(int32(c))
8900 v.AddArg3(idx, val, mem)
8901 return true
8902 }
8903
8904
8905 for {
8906 ptr := v_0
8907 idx := v_1
8908 if v_2.Op != OpARM64MOVDconst || auxIntToInt64(v_2.AuxInt) != 0 {
8909 break
8910 }
8911 mem := v_3
8912 v.reset(OpARM64MOVBstorezeroidx)
8913 v.AddArg3(ptr, idx, mem)
8914 return true
8915 }
8916
8917
8918 for {
8919 ptr := v_0
8920 idx := v_1
8921 if v_2.Op != OpARM64MOVBreg {
8922 break
8923 }
8924 x := v_2.Args[0]
8925 mem := v_3
8926 v.reset(OpARM64MOVBstoreidx)
8927 v.AddArg4(ptr, idx, x, mem)
8928 return true
8929 }
8930
8931
8932 for {
8933 ptr := v_0
8934 idx := v_1
8935 if v_2.Op != OpARM64MOVBUreg {
8936 break
8937 }
8938 x := v_2.Args[0]
8939 mem := v_3
8940 v.reset(OpARM64MOVBstoreidx)
8941 v.AddArg4(ptr, idx, x, mem)
8942 return true
8943 }
8944
8945
8946 for {
8947 ptr := v_0
8948 idx := v_1
8949 if v_2.Op != OpARM64MOVHreg {
8950 break
8951 }
8952 x := v_2.Args[0]
8953 mem := v_3
8954 v.reset(OpARM64MOVBstoreidx)
8955 v.AddArg4(ptr, idx, x, mem)
8956 return true
8957 }
8958
8959
8960 for {
8961 ptr := v_0
8962 idx := v_1
8963 if v_2.Op != OpARM64MOVHUreg {
8964 break
8965 }
8966 x := v_2.Args[0]
8967 mem := v_3
8968 v.reset(OpARM64MOVBstoreidx)
8969 v.AddArg4(ptr, idx, x, mem)
8970 return true
8971 }
8972
8973
8974 for {
8975 ptr := v_0
8976 idx := v_1
8977 if v_2.Op != OpARM64MOVWreg {
8978 break
8979 }
8980 x := v_2.Args[0]
8981 mem := v_3
8982 v.reset(OpARM64MOVBstoreidx)
8983 v.AddArg4(ptr, idx, x, mem)
8984 return true
8985 }
8986
8987
8988 for {
8989 ptr := v_0
8990 idx := v_1
8991 if v_2.Op != OpARM64MOVWUreg {
8992 break
8993 }
8994 x := v_2.Args[0]
8995 mem := v_3
8996 v.reset(OpARM64MOVBstoreidx)
8997 v.AddArg4(ptr, idx, x, mem)
8998 return true
8999 }
9000 return false
9001 }
9002 func rewriteValueARM64_OpARM64MOVBstorezero(v *Value) bool {
9003 v_1 := v.Args[1]
9004 v_0 := v.Args[0]
9005 b := v.Block
9006 config := b.Func.Config
9007
9008
9009
9010 for {
9011 off1 := auxIntToInt32(v.AuxInt)
9012 sym := auxToSym(v.Aux)
9013 if v_0.Op != OpARM64ADDconst {
9014 break
9015 }
9016 off2 := auxIntToInt64(v_0.AuxInt)
9017 ptr := v_0.Args[0]
9018 mem := v_1
9019 if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
9020 break
9021 }
9022 v.reset(OpARM64MOVBstorezero)
9023 v.AuxInt = int32ToAuxInt(off1 + int32(off2))
9024 v.Aux = symToAux(sym)
9025 v.AddArg2(ptr, mem)
9026 return true
9027 }
9028
9029
9030
9031 for {
9032 off1 := auxIntToInt32(v.AuxInt)
9033 sym1 := auxToSym(v.Aux)
9034 if v_0.Op != OpARM64MOVDaddr {
9035 break
9036 }
9037 off2 := auxIntToInt32(v_0.AuxInt)
9038 sym2 := auxToSym(v_0.Aux)
9039 ptr := v_0.Args[0]
9040 mem := v_1
9041 if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
9042 break
9043 }
9044 v.reset(OpARM64MOVBstorezero)
9045 v.AuxInt = int32ToAuxInt(off1 + off2)
9046 v.Aux = symToAux(mergeSym(sym1, sym2))
9047 v.AddArg2(ptr, mem)
9048 return true
9049 }
9050
9051
9052
9053 for {
9054 off := auxIntToInt32(v.AuxInt)
9055 sym := auxToSym(v.Aux)
9056 if v_0.Op != OpARM64ADD {
9057 break
9058 }
9059 idx := v_0.Args[1]
9060 ptr := v_0.Args[0]
9061 mem := v_1
9062 if !(off == 0 && sym == nil) {
9063 break
9064 }
9065 v.reset(OpARM64MOVBstorezeroidx)
9066 v.AddArg3(ptr, idx, mem)
9067 return true
9068 }
9069 return false
9070 }
9071 func rewriteValueARM64_OpARM64MOVBstorezeroidx(v *Value) bool {
9072 v_2 := v.Args[2]
9073 v_1 := v.Args[1]
9074 v_0 := v.Args[0]
9075
9076
9077
9078 for {
9079 ptr := v_0
9080 if v_1.Op != OpARM64MOVDconst {
9081 break
9082 }
9083 c := auxIntToInt64(v_1.AuxInt)
9084 mem := v_2
9085 if !(is32Bit(c)) {
9086 break
9087 }
9088 v.reset(OpARM64MOVBstorezero)
9089 v.AuxInt = int32ToAuxInt(int32(c))
9090 v.AddArg2(ptr, mem)
9091 return true
9092 }
9093
9094
9095
9096 for {
9097 if v_0.Op != OpARM64MOVDconst {
9098 break
9099 }
9100 c := auxIntToInt64(v_0.AuxInt)
9101 idx := v_1
9102 mem := v_2
9103 if !(is32Bit(c)) {
9104 break
9105 }
9106 v.reset(OpARM64MOVBstorezero)
9107 v.AuxInt = int32ToAuxInt(int32(c))
9108 v.AddArg2(idx, mem)
9109 return true
9110 }
9111 return false
9112 }
9113 func rewriteValueARM64_OpARM64MOVDload(v *Value) bool {
9114 v_1 := v.Args[1]
9115 v_0 := v.Args[0]
9116 b := v.Block
9117 config := b.Func.Config
9118
9119
9120 for {
9121 off := auxIntToInt32(v.AuxInt)
9122 sym := auxToSym(v.Aux)
9123 ptr := v_0
9124 if v_1.Op != OpARM64FMOVDstore || auxIntToInt32(v_1.AuxInt) != off || auxToSym(v_1.Aux) != sym {
9125 break
9126 }
9127 val := v_1.Args[1]
9128 if ptr != v_1.Args[0] {
9129 break
9130 }
9131 v.reset(OpARM64FMOVDfpgp)
9132 v.AddArg(val)
9133 return true
9134 }
9135
9136
9137
9138 for {
9139 off1 := auxIntToInt32(v.AuxInt)
9140 sym := auxToSym(v.Aux)
9141 if v_0.Op != OpARM64ADDconst {
9142 break
9143 }
9144 off2 := auxIntToInt64(v_0.AuxInt)
9145 ptr := v_0.Args[0]
9146 mem := v_1
9147 if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
9148 break
9149 }
9150 v.reset(OpARM64MOVDload)
9151 v.AuxInt = int32ToAuxInt(off1 + int32(off2))
9152 v.Aux = symToAux(sym)
9153 v.AddArg2(ptr, mem)
9154 return true
9155 }
9156
9157
9158
9159 for {
9160 off := auxIntToInt32(v.AuxInt)
9161 sym := auxToSym(v.Aux)
9162 if v_0.Op != OpARM64ADD {
9163 break
9164 }
9165 idx := v_0.Args[1]
9166 ptr := v_0.Args[0]
9167 mem := v_1
9168 if !(off == 0 && sym == nil) {
9169 break
9170 }
9171 v.reset(OpARM64MOVDloadidx)
9172 v.AddArg3(ptr, idx, mem)
9173 return true
9174 }
9175
9176
9177
9178 for {
9179 off := auxIntToInt32(v.AuxInt)
9180 sym := auxToSym(v.Aux)
9181 if v_0.Op != OpARM64ADDshiftLL || auxIntToInt64(v_0.AuxInt) != 3 {
9182 break
9183 }
9184 idx := v_0.Args[1]
9185 ptr := v_0.Args[0]
9186 mem := v_1
9187 if !(off == 0 && sym == nil) {
9188 break
9189 }
9190 v.reset(OpARM64MOVDloadidx8)
9191 v.AddArg3(ptr, idx, mem)
9192 return true
9193 }
9194
9195
9196
9197 for {
9198 off1 := auxIntToInt32(v.AuxInt)
9199 sym1 := auxToSym(v.Aux)
9200 if v_0.Op != OpARM64MOVDaddr {
9201 break
9202 }
9203 off2 := auxIntToInt32(v_0.AuxInt)
9204 sym2 := auxToSym(v_0.Aux)
9205 ptr := v_0.Args[0]
9206 mem := v_1
9207 if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
9208 break
9209 }
9210 v.reset(OpARM64MOVDload)
9211 v.AuxInt = int32ToAuxInt(off1 + off2)
9212 v.Aux = symToAux(mergeSym(sym1, sym2))
9213 v.AddArg2(ptr, mem)
9214 return true
9215 }
9216
9217
9218
9219 for {
9220 off := auxIntToInt32(v.AuxInt)
9221 sym := auxToSym(v.Aux)
9222 ptr := v_0
9223 if v_1.Op != OpARM64MOVDstorezero {
9224 break
9225 }
9226 off2 := auxIntToInt32(v_1.AuxInt)
9227 sym2 := auxToSym(v_1.Aux)
9228 ptr2 := v_1.Args[0]
9229 if !(sym == sym2 && off == off2 && isSamePtr(ptr, ptr2)) {
9230 break
9231 }
9232 v.reset(OpARM64MOVDconst)
9233 v.AuxInt = int64ToAuxInt(0)
9234 return true
9235 }
9236
9237
9238
9239 for {
9240 off := auxIntToInt32(v.AuxInt)
9241 sym := auxToSym(v.Aux)
9242 if v_0.Op != OpSB || !(symIsRO(sym)) {
9243 break
9244 }
9245 v.reset(OpARM64MOVDconst)
9246 v.AuxInt = int64ToAuxInt(int64(read64(sym, int64(off), config.ctxt.Arch.ByteOrder)))
9247 return true
9248 }
9249 return false
9250 }
9251 func rewriteValueARM64_OpARM64MOVDloadidx(v *Value) bool {
9252 v_2 := v.Args[2]
9253 v_1 := v.Args[1]
9254 v_0 := v.Args[0]
9255
9256
9257
9258 for {
9259 ptr := v_0
9260 if v_1.Op != OpARM64MOVDconst {
9261 break
9262 }
9263 c := auxIntToInt64(v_1.AuxInt)
9264 mem := v_2
9265 if !(is32Bit(c)) {
9266 break
9267 }
9268 v.reset(OpARM64MOVDload)
9269 v.AuxInt = int32ToAuxInt(int32(c))
9270 v.AddArg2(ptr, mem)
9271 return true
9272 }
9273
9274
9275
9276 for {
9277 if v_0.Op != OpARM64MOVDconst {
9278 break
9279 }
9280 c := auxIntToInt64(v_0.AuxInt)
9281 ptr := v_1
9282 mem := v_2
9283 if !(is32Bit(c)) {
9284 break
9285 }
9286 v.reset(OpARM64MOVDload)
9287 v.AuxInt = int32ToAuxInt(int32(c))
9288 v.AddArg2(ptr, mem)
9289 return true
9290 }
9291
9292
9293 for {
9294 ptr := v_0
9295 if v_1.Op != OpARM64SLLconst || auxIntToInt64(v_1.AuxInt) != 3 {
9296 break
9297 }
9298 idx := v_1.Args[0]
9299 mem := v_2
9300 v.reset(OpARM64MOVDloadidx8)
9301 v.AddArg3(ptr, idx, mem)
9302 return true
9303 }
9304
9305
9306 for {
9307 if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != 3 {
9308 break
9309 }
9310 idx := v_0.Args[0]
9311 ptr := v_1
9312 mem := v_2
9313 v.reset(OpARM64MOVDloadidx8)
9314 v.AddArg3(ptr, idx, mem)
9315 return true
9316 }
9317
9318
9319
9320 for {
9321 ptr := v_0
9322 idx := v_1
9323 if v_2.Op != OpARM64MOVDstorezeroidx {
9324 break
9325 }
9326 idx2 := v_2.Args[1]
9327 ptr2 := v_2.Args[0]
9328 if !(isSamePtr(ptr, ptr2) && isSamePtr(idx, idx2) || isSamePtr(ptr, idx2) && isSamePtr(idx, ptr2)) {
9329 break
9330 }
9331 v.reset(OpARM64MOVDconst)
9332 v.AuxInt = int64ToAuxInt(0)
9333 return true
9334 }
9335 return false
9336 }
9337 func rewriteValueARM64_OpARM64MOVDloadidx8(v *Value) bool {
9338 v_2 := v.Args[2]
9339 v_1 := v.Args[1]
9340 v_0 := v.Args[0]
9341
9342
9343
9344 for {
9345 ptr := v_0
9346 if v_1.Op != OpARM64MOVDconst {
9347 break
9348 }
9349 c := auxIntToInt64(v_1.AuxInt)
9350 mem := v_2
9351 if !(is32Bit(c << 3)) {
9352 break
9353 }
9354 v.reset(OpARM64MOVDload)
9355 v.AuxInt = int32ToAuxInt(int32(c) << 3)
9356 v.AddArg2(ptr, mem)
9357 return true
9358 }
9359
9360
9361
9362 for {
9363 ptr := v_0
9364 idx := v_1
9365 if v_2.Op != OpARM64MOVDstorezeroidx8 {
9366 break
9367 }
9368 idx2 := v_2.Args[1]
9369 ptr2 := v_2.Args[0]
9370 if !(isSamePtr(ptr, ptr2) && isSamePtr(idx, idx2)) {
9371 break
9372 }
9373 v.reset(OpARM64MOVDconst)
9374 v.AuxInt = int64ToAuxInt(0)
9375 return true
9376 }
9377 return false
9378 }
9379 func rewriteValueARM64_OpARM64MOVDnop(v *Value) bool {
9380 v_0 := v.Args[0]
9381
9382
9383 for {
9384 if v_0.Op != OpARM64MOVDconst {
9385 break
9386 }
9387 c := auxIntToInt64(v_0.AuxInt)
9388 v.reset(OpARM64MOVDconst)
9389 v.AuxInt = int64ToAuxInt(c)
9390 return true
9391 }
9392 return false
9393 }
9394 func rewriteValueARM64_OpARM64MOVDreg(v *Value) bool {
9395 v_0 := v.Args[0]
9396
9397
9398
9399 for {
9400 x := v_0
9401 if !(x.Uses == 1) {
9402 break
9403 }
9404 v.reset(OpARM64MOVDnop)
9405 v.AddArg(x)
9406 return true
9407 }
9408
9409
9410 for {
9411 if v_0.Op != OpARM64MOVDconst {
9412 break
9413 }
9414 c := auxIntToInt64(v_0.AuxInt)
9415 v.reset(OpARM64MOVDconst)
9416 v.AuxInt = int64ToAuxInt(c)
9417 return true
9418 }
9419 return false
9420 }
9421 func rewriteValueARM64_OpARM64MOVDstore(v *Value) bool {
9422 v_2 := v.Args[2]
9423 v_1 := v.Args[1]
9424 v_0 := v.Args[0]
9425 b := v.Block
9426 config := b.Func.Config
9427
9428
9429 for {
9430 off := auxIntToInt32(v.AuxInt)
9431 sym := auxToSym(v.Aux)
9432 ptr := v_0
9433 if v_1.Op != OpARM64FMOVDfpgp {
9434 break
9435 }
9436 val := v_1.Args[0]
9437 mem := v_2
9438 v.reset(OpARM64FMOVDstore)
9439 v.AuxInt = int32ToAuxInt(off)
9440 v.Aux = symToAux(sym)
9441 v.AddArg3(ptr, val, mem)
9442 return true
9443 }
9444
9445
9446
9447 for {
9448 off1 := auxIntToInt32(v.AuxInt)
9449 sym := auxToSym(v.Aux)
9450 if v_0.Op != OpARM64ADDconst {
9451 break
9452 }
9453 off2 := auxIntToInt64(v_0.AuxInt)
9454 ptr := v_0.Args[0]
9455 val := v_1
9456 mem := v_2
9457 if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
9458 break
9459 }
9460 v.reset(OpARM64MOVDstore)
9461 v.AuxInt = int32ToAuxInt(off1 + int32(off2))
9462 v.Aux = symToAux(sym)
9463 v.AddArg3(ptr, val, mem)
9464 return true
9465 }
9466
9467
9468
9469 for {
9470 off := auxIntToInt32(v.AuxInt)
9471 sym := auxToSym(v.Aux)
9472 if v_0.Op != OpARM64ADD {
9473 break
9474 }
9475 idx := v_0.Args[1]
9476 ptr := v_0.Args[0]
9477 val := v_1
9478 mem := v_2
9479 if !(off == 0 && sym == nil) {
9480 break
9481 }
9482 v.reset(OpARM64MOVDstoreidx)
9483 v.AddArg4(ptr, idx, val, mem)
9484 return true
9485 }
9486
9487
9488
9489 for {
9490 off := auxIntToInt32(v.AuxInt)
9491 sym := auxToSym(v.Aux)
9492 if v_0.Op != OpARM64ADDshiftLL || auxIntToInt64(v_0.AuxInt) != 3 {
9493 break
9494 }
9495 idx := v_0.Args[1]
9496 ptr := v_0.Args[0]
9497 val := v_1
9498 mem := v_2
9499 if !(off == 0 && sym == nil) {
9500 break
9501 }
9502 v.reset(OpARM64MOVDstoreidx8)
9503 v.AddArg4(ptr, idx, val, mem)
9504 return true
9505 }
9506
9507
9508
9509 for {
9510 off1 := auxIntToInt32(v.AuxInt)
9511 sym1 := auxToSym(v.Aux)
9512 if v_0.Op != OpARM64MOVDaddr {
9513 break
9514 }
9515 off2 := auxIntToInt32(v_0.AuxInt)
9516 sym2 := auxToSym(v_0.Aux)
9517 ptr := v_0.Args[0]
9518 val := v_1
9519 mem := v_2
9520 if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
9521 break
9522 }
9523 v.reset(OpARM64MOVDstore)
9524 v.AuxInt = int32ToAuxInt(off1 + off2)
9525 v.Aux = symToAux(mergeSym(sym1, sym2))
9526 v.AddArg3(ptr, val, mem)
9527 return true
9528 }
9529
9530
9531 for {
9532 off := auxIntToInt32(v.AuxInt)
9533 sym := auxToSym(v.Aux)
9534 ptr := v_0
9535 if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 0 {
9536 break
9537 }
9538 mem := v_2
9539 v.reset(OpARM64MOVDstorezero)
9540 v.AuxInt = int32ToAuxInt(off)
9541 v.Aux = symToAux(sym)
9542 v.AddArg2(ptr, mem)
9543 return true
9544 }
9545 return false
9546 }
9547 func rewriteValueARM64_OpARM64MOVDstoreidx(v *Value) bool {
9548 v_3 := v.Args[3]
9549 v_2 := v.Args[2]
9550 v_1 := v.Args[1]
9551 v_0 := v.Args[0]
9552
9553
9554
9555 for {
9556 ptr := v_0
9557 if v_1.Op != OpARM64MOVDconst {
9558 break
9559 }
9560 c := auxIntToInt64(v_1.AuxInt)
9561 val := v_2
9562 mem := v_3
9563 if !(is32Bit(c)) {
9564 break
9565 }
9566 v.reset(OpARM64MOVDstore)
9567 v.AuxInt = int32ToAuxInt(int32(c))
9568 v.AddArg3(ptr, val, mem)
9569 return true
9570 }
9571
9572
9573
9574 for {
9575 if v_0.Op != OpARM64MOVDconst {
9576 break
9577 }
9578 c := auxIntToInt64(v_0.AuxInt)
9579 idx := v_1
9580 val := v_2
9581 mem := v_3
9582 if !(is32Bit(c)) {
9583 break
9584 }
9585 v.reset(OpARM64MOVDstore)
9586 v.AuxInt = int32ToAuxInt(int32(c))
9587 v.AddArg3(idx, val, mem)
9588 return true
9589 }
9590
9591
9592 for {
9593 ptr := v_0
9594 if v_1.Op != OpARM64SLLconst || auxIntToInt64(v_1.AuxInt) != 3 {
9595 break
9596 }
9597 idx := v_1.Args[0]
9598 val := v_2
9599 mem := v_3
9600 v.reset(OpARM64MOVDstoreidx8)
9601 v.AddArg4(ptr, idx, val, mem)
9602 return true
9603 }
9604
9605
9606 for {
9607 if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != 3 {
9608 break
9609 }
9610 idx := v_0.Args[0]
9611 ptr := v_1
9612 val := v_2
9613 mem := v_3
9614 v.reset(OpARM64MOVDstoreidx8)
9615 v.AddArg4(ptr, idx, val, mem)
9616 return true
9617 }
9618
9619
9620 for {
9621 ptr := v_0
9622 idx := v_1
9623 if v_2.Op != OpARM64MOVDconst || auxIntToInt64(v_2.AuxInt) != 0 {
9624 break
9625 }
9626 mem := v_3
9627 v.reset(OpARM64MOVDstorezeroidx)
9628 v.AddArg3(ptr, idx, mem)
9629 return true
9630 }
9631 return false
9632 }
9633 func rewriteValueARM64_OpARM64MOVDstoreidx8(v *Value) bool {
9634 v_3 := v.Args[3]
9635 v_2 := v.Args[2]
9636 v_1 := v.Args[1]
9637 v_0 := v.Args[0]
9638
9639
9640
9641 for {
9642 ptr := v_0
9643 if v_1.Op != OpARM64MOVDconst {
9644 break
9645 }
9646 c := auxIntToInt64(v_1.AuxInt)
9647 val := v_2
9648 mem := v_3
9649 if !(is32Bit(c << 3)) {
9650 break
9651 }
9652 v.reset(OpARM64MOVDstore)
9653 v.AuxInt = int32ToAuxInt(int32(c) << 3)
9654 v.AddArg3(ptr, val, mem)
9655 return true
9656 }
9657
9658
9659 for {
9660 ptr := v_0
9661 idx := v_1
9662 if v_2.Op != OpARM64MOVDconst || auxIntToInt64(v_2.AuxInt) != 0 {
9663 break
9664 }
9665 mem := v_3
9666 v.reset(OpARM64MOVDstorezeroidx8)
9667 v.AddArg3(ptr, idx, mem)
9668 return true
9669 }
9670 return false
9671 }
9672 func rewriteValueARM64_OpARM64MOVDstorezero(v *Value) bool {
9673 v_1 := v.Args[1]
9674 v_0 := v.Args[0]
9675 b := v.Block
9676 config := b.Func.Config
9677
9678
9679
9680 for {
9681 i := auxIntToInt32(v.AuxInt)
9682 s := auxToSym(v.Aux)
9683 ptr := v_0
9684 x := v_1
9685 if x.Op != OpARM64MOVDstorezero || auxIntToInt32(x.AuxInt) != i+8 || auxToSym(x.Aux) != s {
9686 break
9687 }
9688 mem := x.Args[1]
9689 if ptr != x.Args[0] || !(x.Uses == 1 && setPos(v, x.Pos) && clobber(x)) {
9690 break
9691 }
9692 v.reset(OpARM64MOVQstorezero)
9693 v.AuxInt = int32ToAuxInt(i)
9694 v.Aux = symToAux(s)
9695 v.AddArg2(ptr, mem)
9696 return true
9697 }
9698
9699
9700
9701 for {
9702 i := auxIntToInt32(v.AuxInt)
9703 s := auxToSym(v.Aux)
9704 ptr := v_0
9705 x := v_1
9706 if x.Op != OpARM64MOVDstorezero || auxIntToInt32(x.AuxInt) != i-8 || auxToSym(x.Aux) != s {
9707 break
9708 }
9709 mem := x.Args[1]
9710 if ptr != x.Args[0] || !(x.Uses == 1 && setPos(v, x.Pos) && clobber(x)) {
9711 break
9712 }
9713 v.reset(OpARM64MOVQstorezero)
9714 v.AuxInt = int32ToAuxInt(i - 8)
9715 v.Aux = symToAux(s)
9716 v.AddArg2(ptr, mem)
9717 return true
9718 }
9719
9720
9721
9722 for {
9723 off1 := auxIntToInt32(v.AuxInt)
9724 sym := auxToSym(v.Aux)
9725 if v_0.Op != OpARM64ADDconst {
9726 break
9727 }
9728 off2 := auxIntToInt64(v_0.AuxInt)
9729 ptr := v_0.Args[0]
9730 mem := v_1
9731 if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
9732 break
9733 }
9734 v.reset(OpARM64MOVDstorezero)
9735 v.AuxInt = int32ToAuxInt(off1 + int32(off2))
9736 v.Aux = symToAux(sym)
9737 v.AddArg2(ptr, mem)
9738 return true
9739 }
9740
9741
9742
9743 for {
9744 off1 := auxIntToInt32(v.AuxInt)
9745 sym1 := auxToSym(v.Aux)
9746 if v_0.Op != OpARM64MOVDaddr {
9747 break
9748 }
9749 off2 := auxIntToInt32(v_0.AuxInt)
9750 sym2 := auxToSym(v_0.Aux)
9751 ptr := v_0.Args[0]
9752 mem := v_1
9753 if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
9754 break
9755 }
9756 v.reset(OpARM64MOVDstorezero)
9757 v.AuxInt = int32ToAuxInt(off1 + off2)
9758 v.Aux = symToAux(mergeSym(sym1, sym2))
9759 v.AddArg2(ptr, mem)
9760 return true
9761 }
9762
9763
9764
9765 for {
9766 off := auxIntToInt32(v.AuxInt)
9767 sym := auxToSym(v.Aux)
9768 if v_0.Op != OpARM64ADD {
9769 break
9770 }
9771 idx := v_0.Args[1]
9772 ptr := v_0.Args[0]
9773 mem := v_1
9774 if !(off == 0 && sym == nil) {
9775 break
9776 }
9777 v.reset(OpARM64MOVDstorezeroidx)
9778 v.AddArg3(ptr, idx, mem)
9779 return true
9780 }
9781
9782
9783
9784 for {
9785 off := auxIntToInt32(v.AuxInt)
9786 sym := auxToSym(v.Aux)
9787 if v_0.Op != OpARM64ADDshiftLL || auxIntToInt64(v_0.AuxInt) != 3 {
9788 break
9789 }
9790 idx := v_0.Args[1]
9791 ptr := v_0.Args[0]
9792 mem := v_1
9793 if !(off == 0 && sym == nil) {
9794 break
9795 }
9796 v.reset(OpARM64MOVDstorezeroidx8)
9797 v.AddArg3(ptr, idx, mem)
9798 return true
9799 }
9800 return false
9801 }
9802 func rewriteValueARM64_OpARM64MOVDstorezeroidx(v *Value) bool {
9803 v_2 := v.Args[2]
9804 v_1 := v.Args[1]
9805 v_0 := v.Args[0]
9806
9807
9808
9809 for {
9810 ptr := v_0
9811 if v_1.Op != OpARM64MOVDconst {
9812 break
9813 }
9814 c := auxIntToInt64(v_1.AuxInt)
9815 mem := v_2
9816 if !(is32Bit(c)) {
9817 break
9818 }
9819 v.reset(OpARM64MOVDstorezero)
9820 v.AuxInt = int32ToAuxInt(int32(c))
9821 v.AddArg2(ptr, mem)
9822 return true
9823 }
9824
9825
9826
9827 for {
9828 if v_0.Op != OpARM64MOVDconst {
9829 break
9830 }
9831 c := auxIntToInt64(v_0.AuxInt)
9832 idx := v_1
9833 mem := v_2
9834 if !(is32Bit(c)) {
9835 break
9836 }
9837 v.reset(OpARM64MOVDstorezero)
9838 v.AuxInt = int32ToAuxInt(int32(c))
9839 v.AddArg2(idx, mem)
9840 return true
9841 }
9842
9843
9844 for {
9845 ptr := v_0
9846 if v_1.Op != OpARM64SLLconst || auxIntToInt64(v_1.AuxInt) != 3 {
9847 break
9848 }
9849 idx := v_1.Args[0]
9850 mem := v_2
9851 v.reset(OpARM64MOVDstorezeroidx8)
9852 v.AddArg3(ptr, idx, mem)
9853 return true
9854 }
9855
9856
9857 for {
9858 if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != 3 {
9859 break
9860 }
9861 idx := v_0.Args[0]
9862 ptr := v_1
9863 mem := v_2
9864 v.reset(OpARM64MOVDstorezeroidx8)
9865 v.AddArg3(ptr, idx, mem)
9866 return true
9867 }
9868 return false
9869 }
9870 func rewriteValueARM64_OpARM64MOVDstorezeroidx8(v *Value) bool {
9871 v_2 := v.Args[2]
9872 v_1 := v.Args[1]
9873 v_0 := v.Args[0]
9874
9875
9876
9877 for {
9878 ptr := v_0
9879 if v_1.Op != OpARM64MOVDconst {
9880 break
9881 }
9882 c := auxIntToInt64(v_1.AuxInt)
9883 mem := v_2
9884 if !(is32Bit(c << 3)) {
9885 break
9886 }
9887 v.reset(OpARM64MOVDstorezero)
9888 v.AuxInt = int32ToAuxInt(int32(c << 3))
9889 v.AddArg2(ptr, mem)
9890 return true
9891 }
9892 return false
9893 }
9894 func rewriteValueARM64_OpARM64MOVHUload(v *Value) bool {
9895 v_1 := v.Args[1]
9896 v_0 := v.Args[0]
9897 b := v.Block
9898 config := b.Func.Config
9899
9900
9901
9902 for {
9903 off1 := auxIntToInt32(v.AuxInt)
9904 sym := auxToSym(v.Aux)
9905 if v_0.Op != OpARM64ADDconst {
9906 break
9907 }
9908 off2 := auxIntToInt64(v_0.AuxInt)
9909 ptr := v_0.Args[0]
9910 mem := v_1
9911 if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
9912 break
9913 }
9914 v.reset(OpARM64MOVHUload)
9915 v.AuxInt = int32ToAuxInt(off1 + int32(off2))
9916 v.Aux = symToAux(sym)
9917 v.AddArg2(ptr, mem)
9918 return true
9919 }
9920
9921
9922
9923 for {
9924 off := auxIntToInt32(v.AuxInt)
9925 sym := auxToSym(v.Aux)
9926 if v_0.Op != OpARM64ADD {
9927 break
9928 }
9929 idx := v_0.Args[1]
9930 ptr := v_0.Args[0]
9931 mem := v_1
9932 if !(off == 0 && sym == nil) {
9933 break
9934 }
9935 v.reset(OpARM64MOVHUloadidx)
9936 v.AddArg3(ptr, idx, mem)
9937 return true
9938 }
9939
9940
9941
9942 for {
9943 off := auxIntToInt32(v.AuxInt)
9944 sym := auxToSym(v.Aux)
9945 if v_0.Op != OpARM64ADDshiftLL || auxIntToInt64(v_0.AuxInt) != 1 {
9946 break
9947 }
9948 idx := v_0.Args[1]
9949 ptr := v_0.Args[0]
9950 mem := v_1
9951 if !(off == 0 && sym == nil) {
9952 break
9953 }
9954 v.reset(OpARM64MOVHUloadidx2)
9955 v.AddArg3(ptr, idx, mem)
9956 return true
9957 }
9958
9959
9960
9961 for {
9962 off1 := auxIntToInt32(v.AuxInt)
9963 sym1 := auxToSym(v.Aux)
9964 if v_0.Op != OpARM64MOVDaddr {
9965 break
9966 }
9967 off2 := auxIntToInt32(v_0.AuxInt)
9968 sym2 := auxToSym(v_0.Aux)
9969 ptr := v_0.Args[0]
9970 mem := v_1
9971 if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
9972 break
9973 }
9974 v.reset(OpARM64MOVHUload)
9975 v.AuxInt = int32ToAuxInt(off1 + off2)
9976 v.Aux = symToAux(mergeSym(sym1, sym2))
9977 v.AddArg2(ptr, mem)
9978 return true
9979 }
9980
9981
9982
9983 for {
9984 off := auxIntToInt32(v.AuxInt)
9985 sym := auxToSym(v.Aux)
9986 ptr := v_0
9987 if v_1.Op != OpARM64MOVHstorezero {
9988 break
9989 }
9990 off2 := auxIntToInt32(v_1.AuxInt)
9991 sym2 := auxToSym(v_1.Aux)
9992 ptr2 := v_1.Args[0]
9993 if !(sym == sym2 && off == off2 && isSamePtr(ptr, ptr2)) {
9994 break
9995 }
9996 v.reset(OpARM64MOVDconst)
9997 v.AuxInt = int64ToAuxInt(0)
9998 return true
9999 }
10000
10001
10002
10003 for {
10004 off := auxIntToInt32(v.AuxInt)
10005 sym := auxToSym(v.Aux)
10006 if v_0.Op != OpSB || !(symIsRO(sym)) {
10007 break
10008 }
10009 v.reset(OpARM64MOVDconst)
10010 v.AuxInt = int64ToAuxInt(int64(read16(sym, int64(off), config.ctxt.Arch.ByteOrder)))
10011 return true
10012 }
10013 return false
10014 }
10015 func rewriteValueARM64_OpARM64MOVHUloadidx(v *Value) bool {
10016 v_2 := v.Args[2]
10017 v_1 := v.Args[1]
10018 v_0 := v.Args[0]
10019
10020
10021
10022 for {
10023 ptr := v_0
10024 if v_1.Op != OpARM64MOVDconst {
10025 break
10026 }
10027 c := auxIntToInt64(v_1.AuxInt)
10028 mem := v_2
10029 if !(is32Bit(c)) {
10030 break
10031 }
10032 v.reset(OpARM64MOVHUload)
10033 v.AuxInt = int32ToAuxInt(int32(c))
10034 v.AddArg2(ptr, mem)
10035 return true
10036 }
10037
10038
10039
10040 for {
10041 if v_0.Op != OpARM64MOVDconst {
10042 break
10043 }
10044 c := auxIntToInt64(v_0.AuxInt)
10045 ptr := v_1
10046 mem := v_2
10047 if !(is32Bit(c)) {
10048 break
10049 }
10050 v.reset(OpARM64MOVHUload)
10051 v.AuxInt = int32ToAuxInt(int32(c))
10052 v.AddArg2(ptr, mem)
10053 return true
10054 }
10055
10056
10057 for {
10058 ptr := v_0
10059 if v_1.Op != OpARM64SLLconst || auxIntToInt64(v_1.AuxInt) != 1 {
10060 break
10061 }
10062 idx := v_1.Args[0]
10063 mem := v_2
10064 v.reset(OpARM64MOVHUloadidx2)
10065 v.AddArg3(ptr, idx, mem)
10066 return true
10067 }
10068
10069
10070 for {
10071 ptr := v_0
10072 if v_1.Op != OpARM64ADD {
10073 break
10074 }
10075 idx := v_1.Args[1]
10076 if idx != v_1.Args[0] {
10077 break
10078 }
10079 mem := v_2
10080 v.reset(OpARM64MOVHUloadidx2)
10081 v.AddArg3(ptr, idx, mem)
10082 return true
10083 }
10084
10085
10086 for {
10087 if v_0.Op != OpARM64ADD {
10088 break
10089 }
10090 idx := v_0.Args[1]
10091 if idx != v_0.Args[0] {
10092 break
10093 }
10094 ptr := v_1
10095 mem := v_2
10096 v.reset(OpARM64MOVHUloadidx2)
10097 v.AddArg3(ptr, idx, mem)
10098 return true
10099 }
10100
10101
10102
10103 for {
10104 ptr := v_0
10105 idx := v_1
10106 if v_2.Op != OpARM64MOVHstorezeroidx {
10107 break
10108 }
10109 idx2 := v_2.Args[1]
10110 ptr2 := v_2.Args[0]
10111 if !(isSamePtr(ptr, ptr2) && isSamePtr(idx, idx2) || isSamePtr(ptr, idx2) && isSamePtr(idx, ptr2)) {
10112 break
10113 }
10114 v.reset(OpARM64MOVDconst)
10115 v.AuxInt = int64ToAuxInt(0)
10116 return true
10117 }
10118 return false
10119 }
10120 func rewriteValueARM64_OpARM64MOVHUloadidx2(v *Value) bool {
10121 v_2 := v.Args[2]
10122 v_1 := v.Args[1]
10123 v_0 := v.Args[0]
10124
10125
10126
10127 for {
10128 ptr := v_0
10129 if v_1.Op != OpARM64MOVDconst {
10130 break
10131 }
10132 c := auxIntToInt64(v_1.AuxInt)
10133 mem := v_2
10134 if !(is32Bit(c << 1)) {
10135 break
10136 }
10137 v.reset(OpARM64MOVHUload)
10138 v.AuxInt = int32ToAuxInt(int32(c) << 1)
10139 v.AddArg2(ptr, mem)
10140 return true
10141 }
10142
10143
10144
10145 for {
10146 ptr := v_0
10147 idx := v_1
10148 if v_2.Op != OpARM64MOVHstorezeroidx2 {
10149 break
10150 }
10151 idx2 := v_2.Args[1]
10152 ptr2 := v_2.Args[0]
10153 if !(isSamePtr(ptr, ptr2) && isSamePtr(idx, idx2)) {
10154 break
10155 }
10156 v.reset(OpARM64MOVDconst)
10157 v.AuxInt = int64ToAuxInt(0)
10158 return true
10159 }
10160 return false
10161 }
10162 func rewriteValueARM64_OpARM64MOVHUreg(v *Value) bool {
10163 v_0 := v.Args[0]
10164
10165
10166 for {
10167 if v_0.Op != OpARM64ANDconst {
10168 break
10169 }
10170 c := auxIntToInt64(v_0.AuxInt)
10171 x := v_0.Args[0]
10172 v.reset(OpARM64ANDconst)
10173 v.AuxInt = int64ToAuxInt(c & (1<<16 - 1))
10174 v.AddArg(x)
10175 return true
10176 }
10177
10178
10179 for {
10180 if v_0.Op != OpARM64MOVDconst {
10181 break
10182 }
10183 c := auxIntToInt64(v_0.AuxInt)
10184 v.reset(OpARM64MOVDconst)
10185 v.AuxInt = int64ToAuxInt(int64(uint16(c)))
10186 return true
10187 }
10188
10189
10190
10191 for {
10192 x := v_0
10193 if !(v.Type.Size() <= 2) {
10194 break
10195 }
10196 v.copyOf(x)
10197 return true
10198 }
10199
10200
10201
10202 for {
10203 if v_0.Op != OpARM64SLLconst {
10204 break
10205 }
10206 lc := auxIntToInt64(v_0.AuxInt)
10207 if !(lc >= 16) {
10208 break
10209 }
10210 v.reset(OpARM64MOVDconst)
10211 v.AuxInt = int64ToAuxInt(0)
10212 return true
10213 }
10214
10215
10216
10217 for {
10218 if v_0.Op != OpARM64SLLconst {
10219 break
10220 }
10221 lc := auxIntToInt64(v_0.AuxInt)
10222 x := v_0.Args[0]
10223 if !(lc < 16) {
10224 break
10225 }
10226 v.reset(OpARM64UBFIZ)
10227 v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(lc, 16-lc))
10228 v.AddArg(x)
10229 return true
10230 }
10231
10232
10233
10234 for {
10235 if v_0.Op != OpARM64SRLconst {
10236 break
10237 }
10238 rc := auxIntToInt64(v_0.AuxInt)
10239 x := v_0.Args[0]
10240 if !(rc < 16) {
10241 break
10242 }
10243 v.reset(OpARM64UBFX)
10244 v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(rc, 16))
10245 v.AddArg(x)
10246 return true
10247 }
10248
10249
10250
10251 for {
10252 if v_0.Op != OpARM64UBFX {
10253 break
10254 }
10255 bfc := auxIntToArm64BitField(v_0.AuxInt)
10256 x := v_0.Args[0]
10257 if !(bfc.width() <= 16) {
10258 break
10259 }
10260 v.reset(OpARM64UBFX)
10261 v.AuxInt = arm64BitFieldToAuxInt(bfc)
10262 v.AddArg(x)
10263 return true
10264 }
10265 return false
10266 }
10267 func rewriteValueARM64_OpARM64MOVHload(v *Value) bool {
10268 v_1 := v.Args[1]
10269 v_0 := v.Args[0]
10270 b := v.Block
10271 config := b.Func.Config
10272
10273
10274
10275 for {
10276 off1 := auxIntToInt32(v.AuxInt)
10277 sym := auxToSym(v.Aux)
10278 if v_0.Op != OpARM64ADDconst {
10279 break
10280 }
10281 off2 := auxIntToInt64(v_0.AuxInt)
10282 ptr := v_0.Args[0]
10283 mem := v_1
10284 if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
10285 break
10286 }
10287 v.reset(OpARM64MOVHload)
10288 v.AuxInt = int32ToAuxInt(off1 + int32(off2))
10289 v.Aux = symToAux(sym)
10290 v.AddArg2(ptr, mem)
10291 return true
10292 }
10293
10294
10295
10296 for {
10297 off := auxIntToInt32(v.AuxInt)
10298 sym := auxToSym(v.Aux)
10299 if v_0.Op != OpARM64ADD {
10300 break
10301 }
10302 idx := v_0.Args[1]
10303 ptr := v_0.Args[0]
10304 mem := v_1
10305 if !(off == 0 && sym == nil) {
10306 break
10307 }
10308 v.reset(OpARM64MOVHloadidx)
10309 v.AddArg3(ptr, idx, mem)
10310 return true
10311 }
10312
10313
10314
10315 for {
10316 off := auxIntToInt32(v.AuxInt)
10317 sym := auxToSym(v.Aux)
10318 if v_0.Op != OpARM64ADDshiftLL || auxIntToInt64(v_0.AuxInt) != 1 {
10319 break
10320 }
10321 idx := v_0.Args[1]
10322 ptr := v_0.Args[0]
10323 mem := v_1
10324 if !(off == 0 && sym == nil) {
10325 break
10326 }
10327 v.reset(OpARM64MOVHloadidx2)
10328 v.AddArg3(ptr, idx, mem)
10329 return true
10330 }
10331
10332
10333
10334 for {
10335 off1 := auxIntToInt32(v.AuxInt)
10336 sym1 := auxToSym(v.Aux)
10337 if v_0.Op != OpARM64MOVDaddr {
10338 break
10339 }
10340 off2 := auxIntToInt32(v_0.AuxInt)
10341 sym2 := auxToSym(v_0.Aux)
10342 ptr := v_0.Args[0]
10343 mem := v_1
10344 if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
10345 break
10346 }
10347 v.reset(OpARM64MOVHload)
10348 v.AuxInt = int32ToAuxInt(off1 + off2)
10349 v.Aux = symToAux(mergeSym(sym1, sym2))
10350 v.AddArg2(ptr, mem)
10351 return true
10352 }
10353
10354
10355
10356 for {
10357 off := auxIntToInt32(v.AuxInt)
10358 sym := auxToSym(v.Aux)
10359 ptr := v_0
10360 if v_1.Op != OpARM64MOVHstorezero {
10361 break
10362 }
10363 off2 := auxIntToInt32(v_1.AuxInt)
10364 sym2 := auxToSym(v_1.Aux)
10365 ptr2 := v_1.Args[0]
10366 if !(sym == sym2 && off == off2 && isSamePtr(ptr, ptr2)) {
10367 break
10368 }
10369 v.reset(OpARM64MOVDconst)
10370 v.AuxInt = int64ToAuxInt(0)
10371 return true
10372 }
10373 return false
10374 }
10375 func rewriteValueARM64_OpARM64MOVHloadidx(v *Value) bool {
10376 v_2 := v.Args[2]
10377 v_1 := v.Args[1]
10378 v_0 := v.Args[0]
10379
10380
10381
10382 for {
10383 ptr := v_0
10384 if v_1.Op != OpARM64MOVDconst {
10385 break
10386 }
10387 c := auxIntToInt64(v_1.AuxInt)
10388 mem := v_2
10389 if !(is32Bit(c)) {
10390 break
10391 }
10392 v.reset(OpARM64MOVHload)
10393 v.AuxInt = int32ToAuxInt(int32(c))
10394 v.AddArg2(ptr, mem)
10395 return true
10396 }
10397
10398
10399
10400 for {
10401 if v_0.Op != OpARM64MOVDconst {
10402 break
10403 }
10404 c := auxIntToInt64(v_0.AuxInt)
10405 ptr := v_1
10406 mem := v_2
10407 if !(is32Bit(c)) {
10408 break
10409 }
10410 v.reset(OpARM64MOVHload)
10411 v.AuxInt = int32ToAuxInt(int32(c))
10412 v.AddArg2(ptr, mem)
10413 return true
10414 }
10415
10416
10417 for {
10418 ptr := v_0
10419 if v_1.Op != OpARM64SLLconst || auxIntToInt64(v_1.AuxInt) != 1 {
10420 break
10421 }
10422 idx := v_1.Args[0]
10423 mem := v_2
10424 v.reset(OpARM64MOVHloadidx2)
10425 v.AddArg3(ptr, idx, mem)
10426 return true
10427 }
10428
10429
10430 for {
10431 ptr := v_0
10432 if v_1.Op != OpARM64ADD {
10433 break
10434 }
10435 idx := v_1.Args[1]
10436 if idx != v_1.Args[0] {
10437 break
10438 }
10439 mem := v_2
10440 v.reset(OpARM64MOVHloadidx2)
10441 v.AddArg3(ptr, idx, mem)
10442 return true
10443 }
10444
10445
10446 for {
10447 if v_0.Op != OpARM64ADD {
10448 break
10449 }
10450 idx := v_0.Args[1]
10451 if idx != v_0.Args[0] {
10452 break
10453 }
10454 ptr := v_1
10455 mem := v_2
10456 v.reset(OpARM64MOVHloadidx2)
10457 v.AddArg3(ptr, idx, mem)
10458 return true
10459 }
10460
10461
10462
10463 for {
10464 ptr := v_0
10465 idx := v_1
10466 if v_2.Op != OpARM64MOVHstorezeroidx {
10467 break
10468 }
10469 idx2 := v_2.Args[1]
10470 ptr2 := v_2.Args[0]
10471 if !(isSamePtr(ptr, ptr2) && isSamePtr(idx, idx2) || isSamePtr(ptr, idx2) && isSamePtr(idx, ptr2)) {
10472 break
10473 }
10474 v.reset(OpARM64MOVDconst)
10475 v.AuxInt = int64ToAuxInt(0)
10476 return true
10477 }
10478 return false
10479 }
10480 func rewriteValueARM64_OpARM64MOVHloadidx2(v *Value) bool {
10481 v_2 := v.Args[2]
10482 v_1 := v.Args[1]
10483 v_0 := v.Args[0]
10484
10485
10486
10487 for {
10488 ptr := v_0
10489 if v_1.Op != OpARM64MOVDconst {
10490 break
10491 }
10492 c := auxIntToInt64(v_1.AuxInt)
10493 mem := v_2
10494 if !(is32Bit(c << 1)) {
10495 break
10496 }
10497 v.reset(OpARM64MOVHload)
10498 v.AuxInt = int32ToAuxInt(int32(c) << 1)
10499 v.AddArg2(ptr, mem)
10500 return true
10501 }
10502
10503
10504
10505 for {
10506 ptr := v_0
10507 idx := v_1
10508 if v_2.Op != OpARM64MOVHstorezeroidx2 {
10509 break
10510 }
10511 idx2 := v_2.Args[1]
10512 ptr2 := v_2.Args[0]
10513 if !(isSamePtr(ptr, ptr2) && isSamePtr(idx, idx2)) {
10514 break
10515 }
10516 v.reset(OpARM64MOVDconst)
10517 v.AuxInt = int64ToAuxInt(0)
10518 return true
10519 }
10520 return false
10521 }
10522 func rewriteValueARM64_OpARM64MOVHreg(v *Value) bool {
10523 v_0 := v.Args[0]
10524
10525
10526 for {
10527 if v_0.Op != OpARM64MOVDconst {
10528 break
10529 }
10530 c := auxIntToInt64(v_0.AuxInt)
10531 v.reset(OpARM64MOVDconst)
10532 v.AuxInt = int64ToAuxInt(int64(int16(c)))
10533 return true
10534 }
10535
10536
10537
10538 for {
10539 x := v_0
10540 if !(v.Type.Size() <= 2) {
10541 break
10542 }
10543 v.copyOf(x)
10544 return true
10545 }
10546
10547
10548
10549 for {
10550 t := v.Type
10551 if v_0.Op != OpARM64ANDconst {
10552 break
10553 }
10554 c := auxIntToInt64(v_0.AuxInt)
10555 x := v_0.Args[0]
10556 if !(uint64(c)&uint64(0xffffffffffff8000) == 0) {
10557 break
10558 }
10559 v.reset(OpARM64ANDconst)
10560 v.Type = t
10561 v.AuxInt = int64ToAuxInt(c)
10562 v.AddArg(x)
10563 return true
10564 }
10565
10566
10567
10568 for {
10569 if v_0.Op != OpARM64SLLconst {
10570 break
10571 }
10572 lc := auxIntToInt64(v_0.AuxInt)
10573 x := v_0.Args[0]
10574 if !(lc < 16) {
10575 break
10576 }
10577 v.reset(OpARM64SBFIZ)
10578 v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(lc, 16-lc))
10579 v.AddArg(x)
10580 return true
10581 }
10582
10583
10584
10585 for {
10586 if v_0.Op != OpARM64SBFX {
10587 break
10588 }
10589 bfc := auxIntToArm64BitField(v_0.AuxInt)
10590 x := v_0.Args[0]
10591 if !(bfc.width() <= 16) {
10592 break
10593 }
10594 v.reset(OpARM64SBFX)
10595 v.AuxInt = arm64BitFieldToAuxInt(bfc)
10596 v.AddArg(x)
10597 return true
10598 }
10599 return false
10600 }
10601 func rewriteValueARM64_OpARM64MOVHstore(v *Value) bool {
10602 v_2 := v.Args[2]
10603 v_1 := v.Args[1]
10604 v_0 := v.Args[0]
10605 b := v.Block
10606 config := b.Func.Config
10607
10608
10609
10610 for {
10611 off1 := auxIntToInt32(v.AuxInt)
10612 sym := auxToSym(v.Aux)
10613 if v_0.Op != OpARM64ADDconst {
10614 break
10615 }
10616 off2 := auxIntToInt64(v_0.AuxInt)
10617 ptr := v_0.Args[0]
10618 val := v_1
10619 mem := v_2
10620 if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
10621 break
10622 }
10623 v.reset(OpARM64MOVHstore)
10624 v.AuxInt = int32ToAuxInt(off1 + int32(off2))
10625 v.Aux = symToAux(sym)
10626 v.AddArg3(ptr, val, mem)
10627 return true
10628 }
10629
10630
10631
10632 for {
10633 off := auxIntToInt32(v.AuxInt)
10634 sym := auxToSym(v.Aux)
10635 if v_0.Op != OpARM64ADD {
10636 break
10637 }
10638 idx := v_0.Args[1]
10639 ptr := v_0.Args[0]
10640 val := v_1
10641 mem := v_2
10642 if !(off == 0 && sym == nil) {
10643 break
10644 }
10645 v.reset(OpARM64MOVHstoreidx)
10646 v.AddArg4(ptr, idx, val, mem)
10647 return true
10648 }
10649
10650
10651
10652 for {
10653 off := auxIntToInt32(v.AuxInt)
10654 sym := auxToSym(v.Aux)
10655 if v_0.Op != OpARM64ADDshiftLL || auxIntToInt64(v_0.AuxInt) != 1 {
10656 break
10657 }
10658 idx := v_0.Args[1]
10659 ptr := v_0.Args[0]
10660 val := v_1
10661 mem := v_2
10662 if !(off == 0 && sym == nil) {
10663 break
10664 }
10665 v.reset(OpARM64MOVHstoreidx2)
10666 v.AddArg4(ptr, idx, val, mem)
10667 return true
10668 }
10669
10670
10671
10672 for {
10673 off1 := auxIntToInt32(v.AuxInt)
10674 sym1 := auxToSym(v.Aux)
10675 if v_0.Op != OpARM64MOVDaddr {
10676 break
10677 }
10678 off2 := auxIntToInt32(v_0.AuxInt)
10679 sym2 := auxToSym(v_0.Aux)
10680 ptr := v_0.Args[0]
10681 val := v_1
10682 mem := v_2
10683 if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
10684 break
10685 }
10686 v.reset(OpARM64MOVHstore)
10687 v.AuxInt = int32ToAuxInt(off1 + off2)
10688 v.Aux = symToAux(mergeSym(sym1, sym2))
10689 v.AddArg3(ptr, val, mem)
10690 return true
10691 }
10692
10693
10694 for {
10695 off := auxIntToInt32(v.AuxInt)
10696 sym := auxToSym(v.Aux)
10697 ptr := v_0
10698 if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 0 {
10699 break
10700 }
10701 mem := v_2
10702 v.reset(OpARM64MOVHstorezero)
10703 v.AuxInt = int32ToAuxInt(off)
10704 v.Aux = symToAux(sym)
10705 v.AddArg2(ptr, mem)
10706 return true
10707 }
10708
10709
10710 for {
10711 off := auxIntToInt32(v.AuxInt)
10712 sym := auxToSym(v.Aux)
10713 ptr := v_0
10714 if v_1.Op != OpARM64MOVHreg {
10715 break
10716 }
10717 x := v_1.Args[0]
10718 mem := v_2
10719 v.reset(OpARM64MOVHstore)
10720 v.AuxInt = int32ToAuxInt(off)
10721 v.Aux = symToAux(sym)
10722 v.AddArg3(ptr, x, mem)
10723 return true
10724 }
10725
10726
10727 for {
10728 off := auxIntToInt32(v.AuxInt)
10729 sym := auxToSym(v.Aux)
10730 ptr := v_0
10731 if v_1.Op != OpARM64MOVHUreg {
10732 break
10733 }
10734 x := v_1.Args[0]
10735 mem := v_2
10736 v.reset(OpARM64MOVHstore)
10737 v.AuxInt = int32ToAuxInt(off)
10738 v.Aux = symToAux(sym)
10739 v.AddArg3(ptr, x, mem)
10740 return true
10741 }
10742
10743
10744 for {
10745 off := auxIntToInt32(v.AuxInt)
10746 sym := auxToSym(v.Aux)
10747 ptr := v_0
10748 if v_1.Op != OpARM64MOVWreg {
10749 break
10750 }
10751 x := v_1.Args[0]
10752 mem := v_2
10753 v.reset(OpARM64MOVHstore)
10754 v.AuxInt = int32ToAuxInt(off)
10755 v.Aux = symToAux(sym)
10756 v.AddArg3(ptr, x, mem)
10757 return true
10758 }
10759
10760
10761 for {
10762 off := auxIntToInt32(v.AuxInt)
10763 sym := auxToSym(v.Aux)
10764 ptr := v_0
10765 if v_1.Op != OpARM64MOVWUreg {
10766 break
10767 }
10768 x := v_1.Args[0]
10769 mem := v_2
10770 v.reset(OpARM64MOVHstore)
10771 v.AuxInt = int32ToAuxInt(off)
10772 v.Aux = symToAux(sym)
10773 v.AddArg3(ptr, x, mem)
10774 return true
10775 }
10776 return false
10777 }
10778 func rewriteValueARM64_OpARM64MOVHstoreidx(v *Value) bool {
10779 v_3 := v.Args[3]
10780 v_2 := v.Args[2]
10781 v_1 := v.Args[1]
10782 v_0 := v.Args[0]
10783
10784
10785
10786 for {
10787 ptr := v_0
10788 if v_1.Op != OpARM64MOVDconst {
10789 break
10790 }
10791 c := auxIntToInt64(v_1.AuxInt)
10792 val := v_2
10793 mem := v_3
10794 if !(is32Bit(c)) {
10795 break
10796 }
10797 v.reset(OpARM64MOVHstore)
10798 v.AuxInt = int32ToAuxInt(int32(c))
10799 v.AddArg3(ptr, val, mem)
10800 return true
10801 }
10802
10803
10804
10805 for {
10806 if v_0.Op != OpARM64MOVDconst {
10807 break
10808 }
10809 c := auxIntToInt64(v_0.AuxInt)
10810 idx := v_1
10811 val := v_2
10812 mem := v_3
10813 if !(is32Bit(c)) {
10814 break
10815 }
10816 v.reset(OpARM64MOVHstore)
10817 v.AuxInt = int32ToAuxInt(int32(c))
10818 v.AddArg3(idx, val, mem)
10819 return true
10820 }
10821
10822
10823 for {
10824 ptr := v_0
10825 if v_1.Op != OpARM64SLLconst || auxIntToInt64(v_1.AuxInt) != 1 {
10826 break
10827 }
10828 idx := v_1.Args[0]
10829 val := v_2
10830 mem := v_3
10831 v.reset(OpARM64MOVHstoreidx2)
10832 v.AddArg4(ptr, idx, val, mem)
10833 return true
10834 }
10835
10836
10837 for {
10838 ptr := v_0
10839 if v_1.Op != OpARM64ADD {
10840 break
10841 }
10842 idx := v_1.Args[1]
10843 if idx != v_1.Args[0] {
10844 break
10845 }
10846 val := v_2
10847 mem := v_3
10848 v.reset(OpARM64MOVHstoreidx2)
10849 v.AddArg4(ptr, idx, val, mem)
10850 return true
10851 }
10852
10853
10854 for {
10855 if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != 1 {
10856 break
10857 }
10858 idx := v_0.Args[0]
10859 ptr := v_1
10860 val := v_2
10861 mem := v_3
10862 v.reset(OpARM64MOVHstoreidx2)
10863 v.AddArg4(ptr, idx, val, mem)
10864 return true
10865 }
10866
10867
10868 for {
10869 if v_0.Op != OpARM64ADD {
10870 break
10871 }
10872 idx := v_0.Args[1]
10873 if idx != v_0.Args[0] {
10874 break
10875 }
10876 ptr := v_1
10877 val := v_2
10878 mem := v_3
10879 v.reset(OpARM64MOVHstoreidx2)
10880 v.AddArg4(ptr, idx, val, mem)
10881 return true
10882 }
10883
10884
10885 for {
10886 ptr := v_0
10887 idx := v_1
10888 if v_2.Op != OpARM64MOVDconst || auxIntToInt64(v_2.AuxInt) != 0 {
10889 break
10890 }
10891 mem := v_3
10892 v.reset(OpARM64MOVHstorezeroidx)
10893 v.AddArg3(ptr, idx, mem)
10894 return true
10895 }
10896
10897
10898 for {
10899 ptr := v_0
10900 idx := v_1
10901 if v_2.Op != OpARM64MOVHreg {
10902 break
10903 }
10904 x := v_2.Args[0]
10905 mem := v_3
10906 v.reset(OpARM64MOVHstoreidx)
10907 v.AddArg4(ptr, idx, x, mem)
10908 return true
10909 }
10910
10911
10912 for {
10913 ptr := v_0
10914 idx := v_1
10915 if v_2.Op != OpARM64MOVHUreg {
10916 break
10917 }
10918 x := v_2.Args[0]
10919 mem := v_3
10920 v.reset(OpARM64MOVHstoreidx)
10921 v.AddArg4(ptr, idx, x, mem)
10922 return true
10923 }
10924
10925
10926 for {
10927 ptr := v_0
10928 idx := v_1
10929 if v_2.Op != OpARM64MOVWreg {
10930 break
10931 }
10932 x := v_2.Args[0]
10933 mem := v_3
10934 v.reset(OpARM64MOVHstoreidx)
10935 v.AddArg4(ptr, idx, x, mem)
10936 return true
10937 }
10938
10939
10940 for {
10941 ptr := v_0
10942 idx := v_1
10943 if v_2.Op != OpARM64MOVWUreg {
10944 break
10945 }
10946 x := v_2.Args[0]
10947 mem := v_3
10948 v.reset(OpARM64MOVHstoreidx)
10949 v.AddArg4(ptr, idx, x, mem)
10950 return true
10951 }
10952 return false
10953 }
10954 func rewriteValueARM64_OpARM64MOVHstoreidx2(v *Value) bool {
10955 v_3 := v.Args[3]
10956 v_2 := v.Args[2]
10957 v_1 := v.Args[1]
10958 v_0 := v.Args[0]
10959
10960
10961
10962 for {
10963 ptr := v_0
10964 if v_1.Op != OpARM64MOVDconst {
10965 break
10966 }
10967 c := auxIntToInt64(v_1.AuxInt)
10968 val := v_2
10969 mem := v_3
10970 if !(is32Bit(c << 1)) {
10971 break
10972 }
10973 v.reset(OpARM64MOVHstore)
10974 v.AuxInt = int32ToAuxInt(int32(c) << 1)
10975 v.AddArg3(ptr, val, mem)
10976 return true
10977 }
10978
10979
10980 for {
10981 ptr := v_0
10982 idx := v_1
10983 if v_2.Op != OpARM64MOVDconst || auxIntToInt64(v_2.AuxInt) != 0 {
10984 break
10985 }
10986 mem := v_3
10987 v.reset(OpARM64MOVHstorezeroidx2)
10988 v.AddArg3(ptr, idx, mem)
10989 return true
10990 }
10991
10992
10993 for {
10994 ptr := v_0
10995 idx := v_1
10996 if v_2.Op != OpARM64MOVHreg {
10997 break
10998 }
10999 x := v_2.Args[0]
11000 mem := v_3
11001 v.reset(OpARM64MOVHstoreidx2)
11002 v.AddArg4(ptr, idx, x, mem)
11003 return true
11004 }
11005
11006
11007 for {
11008 ptr := v_0
11009 idx := v_1
11010 if v_2.Op != OpARM64MOVHUreg {
11011 break
11012 }
11013 x := v_2.Args[0]
11014 mem := v_3
11015 v.reset(OpARM64MOVHstoreidx2)
11016 v.AddArg4(ptr, idx, x, mem)
11017 return true
11018 }
11019
11020
11021 for {
11022 ptr := v_0
11023 idx := v_1
11024 if v_2.Op != OpARM64MOVWreg {
11025 break
11026 }
11027 x := v_2.Args[0]
11028 mem := v_3
11029 v.reset(OpARM64MOVHstoreidx2)
11030 v.AddArg4(ptr, idx, x, mem)
11031 return true
11032 }
11033
11034
11035 for {
11036 ptr := v_0
11037 idx := v_1
11038 if v_2.Op != OpARM64MOVWUreg {
11039 break
11040 }
11041 x := v_2.Args[0]
11042 mem := v_3
11043 v.reset(OpARM64MOVHstoreidx2)
11044 v.AddArg4(ptr, idx, x, mem)
11045 return true
11046 }
11047 return false
11048 }
11049 func rewriteValueARM64_OpARM64MOVHstorezero(v *Value) bool {
11050 v_1 := v.Args[1]
11051 v_0 := v.Args[0]
11052 b := v.Block
11053 config := b.Func.Config
11054
11055
11056
11057 for {
11058 off1 := auxIntToInt32(v.AuxInt)
11059 sym := auxToSym(v.Aux)
11060 if v_0.Op != OpARM64ADDconst {
11061 break
11062 }
11063 off2 := auxIntToInt64(v_0.AuxInt)
11064 ptr := v_0.Args[0]
11065 mem := v_1
11066 if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
11067 break
11068 }
11069 v.reset(OpARM64MOVHstorezero)
11070 v.AuxInt = int32ToAuxInt(off1 + int32(off2))
11071 v.Aux = symToAux(sym)
11072 v.AddArg2(ptr, mem)
11073 return true
11074 }
11075
11076
11077
11078 for {
11079 off1 := auxIntToInt32(v.AuxInt)
11080 sym1 := auxToSym(v.Aux)
11081 if v_0.Op != OpARM64MOVDaddr {
11082 break
11083 }
11084 off2 := auxIntToInt32(v_0.AuxInt)
11085 sym2 := auxToSym(v_0.Aux)
11086 ptr := v_0.Args[0]
11087 mem := v_1
11088 if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
11089 break
11090 }
11091 v.reset(OpARM64MOVHstorezero)
11092 v.AuxInt = int32ToAuxInt(off1 + off2)
11093 v.Aux = symToAux(mergeSym(sym1, sym2))
11094 v.AddArg2(ptr, mem)
11095 return true
11096 }
11097
11098
11099
11100 for {
11101 off := auxIntToInt32(v.AuxInt)
11102 sym := auxToSym(v.Aux)
11103 if v_0.Op != OpARM64ADD {
11104 break
11105 }
11106 idx := v_0.Args[1]
11107 ptr := v_0.Args[0]
11108 mem := v_1
11109 if !(off == 0 && sym == nil) {
11110 break
11111 }
11112 v.reset(OpARM64MOVHstorezeroidx)
11113 v.AddArg3(ptr, idx, mem)
11114 return true
11115 }
11116
11117
11118
11119 for {
11120 off := auxIntToInt32(v.AuxInt)
11121 sym := auxToSym(v.Aux)
11122 if v_0.Op != OpARM64ADDshiftLL || auxIntToInt64(v_0.AuxInt) != 1 {
11123 break
11124 }
11125 idx := v_0.Args[1]
11126 ptr := v_0.Args[0]
11127 mem := v_1
11128 if !(off == 0 && sym == nil) {
11129 break
11130 }
11131 v.reset(OpARM64MOVHstorezeroidx2)
11132 v.AddArg3(ptr, idx, mem)
11133 return true
11134 }
11135 return false
11136 }
11137 func rewriteValueARM64_OpARM64MOVHstorezeroidx(v *Value) bool {
11138 v_2 := v.Args[2]
11139 v_1 := v.Args[1]
11140 v_0 := v.Args[0]
11141
11142
11143
11144 for {
11145 ptr := v_0
11146 if v_1.Op != OpARM64MOVDconst {
11147 break
11148 }
11149 c := auxIntToInt64(v_1.AuxInt)
11150 mem := v_2
11151 if !(is32Bit(c)) {
11152 break
11153 }
11154 v.reset(OpARM64MOVHstorezero)
11155 v.AuxInt = int32ToAuxInt(int32(c))
11156 v.AddArg2(ptr, mem)
11157 return true
11158 }
11159
11160
11161
11162 for {
11163 if v_0.Op != OpARM64MOVDconst {
11164 break
11165 }
11166 c := auxIntToInt64(v_0.AuxInt)
11167 idx := v_1
11168 mem := v_2
11169 if !(is32Bit(c)) {
11170 break
11171 }
11172 v.reset(OpARM64MOVHstorezero)
11173 v.AuxInt = int32ToAuxInt(int32(c))
11174 v.AddArg2(idx, mem)
11175 return true
11176 }
11177
11178
11179 for {
11180 ptr := v_0
11181 if v_1.Op != OpARM64SLLconst || auxIntToInt64(v_1.AuxInt) != 1 {
11182 break
11183 }
11184 idx := v_1.Args[0]
11185 mem := v_2
11186 v.reset(OpARM64MOVHstorezeroidx2)
11187 v.AddArg3(ptr, idx, mem)
11188 return true
11189 }
11190
11191
11192 for {
11193 ptr := v_0
11194 if v_1.Op != OpARM64ADD {
11195 break
11196 }
11197 idx := v_1.Args[1]
11198 if idx != v_1.Args[0] {
11199 break
11200 }
11201 mem := v_2
11202 v.reset(OpARM64MOVHstorezeroidx2)
11203 v.AddArg3(ptr, idx, mem)
11204 return true
11205 }
11206
11207
11208 for {
11209 if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != 1 {
11210 break
11211 }
11212 idx := v_0.Args[0]
11213 ptr := v_1
11214 mem := v_2
11215 v.reset(OpARM64MOVHstorezeroidx2)
11216 v.AddArg3(ptr, idx, mem)
11217 return true
11218 }
11219
11220
11221 for {
11222 if v_0.Op != OpARM64ADD {
11223 break
11224 }
11225 idx := v_0.Args[1]
11226 if idx != v_0.Args[0] {
11227 break
11228 }
11229 ptr := v_1
11230 mem := v_2
11231 v.reset(OpARM64MOVHstorezeroidx2)
11232 v.AddArg3(ptr, idx, mem)
11233 return true
11234 }
11235 return false
11236 }
11237 func rewriteValueARM64_OpARM64MOVHstorezeroidx2(v *Value) bool {
11238 v_2 := v.Args[2]
11239 v_1 := v.Args[1]
11240 v_0 := v.Args[0]
11241
11242
11243
11244 for {
11245 ptr := v_0
11246 if v_1.Op != OpARM64MOVDconst {
11247 break
11248 }
11249 c := auxIntToInt64(v_1.AuxInt)
11250 mem := v_2
11251 if !(is32Bit(c << 1)) {
11252 break
11253 }
11254 v.reset(OpARM64MOVHstorezero)
11255 v.AuxInt = int32ToAuxInt(int32(c << 1))
11256 v.AddArg2(ptr, mem)
11257 return true
11258 }
11259 return false
11260 }
11261 func rewriteValueARM64_OpARM64MOVQstorezero(v *Value) bool {
11262 v_1 := v.Args[1]
11263 v_0 := v.Args[0]
11264 b := v.Block
11265 config := b.Func.Config
11266
11267
11268
11269 for {
11270 off1 := auxIntToInt32(v.AuxInt)
11271 sym := auxToSym(v.Aux)
11272 if v_0.Op != OpARM64ADDconst {
11273 break
11274 }
11275 off2 := auxIntToInt64(v_0.AuxInt)
11276 ptr := v_0.Args[0]
11277 mem := v_1
11278 if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
11279 break
11280 }
11281 v.reset(OpARM64MOVQstorezero)
11282 v.AuxInt = int32ToAuxInt(off1 + int32(off2))
11283 v.Aux = symToAux(sym)
11284 v.AddArg2(ptr, mem)
11285 return true
11286 }
11287
11288
11289
11290 for {
11291 off1 := auxIntToInt32(v.AuxInt)
11292 sym1 := auxToSym(v.Aux)
11293 if v_0.Op != OpARM64MOVDaddr {
11294 break
11295 }
11296 off2 := auxIntToInt32(v_0.AuxInt)
11297 sym2 := auxToSym(v_0.Aux)
11298 ptr := v_0.Args[0]
11299 mem := v_1
11300 if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
11301 break
11302 }
11303 v.reset(OpARM64MOVQstorezero)
11304 v.AuxInt = int32ToAuxInt(off1 + off2)
11305 v.Aux = symToAux(mergeSym(sym1, sym2))
11306 v.AddArg2(ptr, mem)
11307 return true
11308 }
11309 return false
11310 }
11311 func rewriteValueARM64_OpARM64MOVWUload(v *Value) bool {
11312 v_1 := v.Args[1]
11313 v_0 := v.Args[0]
11314 b := v.Block
11315 config := b.Func.Config
11316
11317
11318 for {
11319 off := auxIntToInt32(v.AuxInt)
11320 sym := auxToSym(v.Aux)
11321 ptr := v_0
11322 if v_1.Op != OpARM64FMOVSstore || auxIntToInt32(v_1.AuxInt) != off || auxToSym(v_1.Aux) != sym {
11323 break
11324 }
11325 val := v_1.Args[1]
11326 if ptr != v_1.Args[0] {
11327 break
11328 }
11329 v.reset(OpARM64FMOVSfpgp)
11330 v.AddArg(val)
11331 return true
11332 }
11333
11334
11335
11336 for {
11337 off1 := auxIntToInt32(v.AuxInt)
11338 sym := auxToSym(v.Aux)
11339 if v_0.Op != OpARM64ADDconst {
11340 break
11341 }
11342 off2 := auxIntToInt64(v_0.AuxInt)
11343 ptr := v_0.Args[0]
11344 mem := v_1
11345 if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
11346 break
11347 }
11348 v.reset(OpARM64MOVWUload)
11349 v.AuxInt = int32ToAuxInt(off1 + int32(off2))
11350 v.Aux = symToAux(sym)
11351 v.AddArg2(ptr, mem)
11352 return true
11353 }
11354
11355
11356
11357 for {
11358 off := auxIntToInt32(v.AuxInt)
11359 sym := auxToSym(v.Aux)
11360 if v_0.Op != OpARM64ADD {
11361 break
11362 }
11363 idx := v_0.Args[1]
11364 ptr := v_0.Args[0]
11365 mem := v_1
11366 if !(off == 0 && sym == nil) {
11367 break
11368 }
11369 v.reset(OpARM64MOVWUloadidx)
11370 v.AddArg3(ptr, idx, mem)
11371 return true
11372 }
11373
11374
11375
11376 for {
11377 off := auxIntToInt32(v.AuxInt)
11378 sym := auxToSym(v.Aux)
11379 if v_0.Op != OpARM64ADDshiftLL || auxIntToInt64(v_0.AuxInt) != 2 {
11380 break
11381 }
11382 idx := v_0.Args[1]
11383 ptr := v_0.Args[0]
11384 mem := v_1
11385 if !(off == 0 && sym == nil) {
11386 break
11387 }
11388 v.reset(OpARM64MOVWUloadidx4)
11389 v.AddArg3(ptr, idx, mem)
11390 return true
11391 }
11392
11393
11394
11395 for {
11396 off1 := auxIntToInt32(v.AuxInt)
11397 sym1 := auxToSym(v.Aux)
11398 if v_0.Op != OpARM64MOVDaddr {
11399 break
11400 }
11401 off2 := auxIntToInt32(v_0.AuxInt)
11402 sym2 := auxToSym(v_0.Aux)
11403 ptr := v_0.Args[0]
11404 mem := v_1
11405 if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
11406 break
11407 }
11408 v.reset(OpARM64MOVWUload)
11409 v.AuxInt = int32ToAuxInt(off1 + off2)
11410 v.Aux = symToAux(mergeSym(sym1, sym2))
11411 v.AddArg2(ptr, mem)
11412 return true
11413 }
11414
11415
11416
11417 for {
11418 off := auxIntToInt32(v.AuxInt)
11419 sym := auxToSym(v.Aux)
11420 ptr := v_0
11421 if v_1.Op != OpARM64MOVWstorezero {
11422 break
11423 }
11424 off2 := auxIntToInt32(v_1.AuxInt)
11425 sym2 := auxToSym(v_1.Aux)
11426 ptr2 := v_1.Args[0]
11427 if !(sym == sym2 && off == off2 && isSamePtr(ptr, ptr2)) {
11428 break
11429 }
11430 v.reset(OpARM64MOVDconst)
11431 v.AuxInt = int64ToAuxInt(0)
11432 return true
11433 }
11434
11435
11436
11437 for {
11438 off := auxIntToInt32(v.AuxInt)
11439 sym := auxToSym(v.Aux)
11440 if v_0.Op != OpSB || !(symIsRO(sym)) {
11441 break
11442 }
11443 v.reset(OpARM64MOVDconst)
11444 v.AuxInt = int64ToAuxInt(int64(read32(sym, int64(off), config.ctxt.Arch.ByteOrder)))
11445 return true
11446 }
11447 return false
11448 }
11449 func rewriteValueARM64_OpARM64MOVWUloadidx(v *Value) bool {
11450 v_2 := v.Args[2]
11451 v_1 := v.Args[1]
11452 v_0 := v.Args[0]
11453
11454
11455
11456 for {
11457 ptr := v_0
11458 if v_1.Op != OpARM64MOVDconst {
11459 break
11460 }
11461 c := auxIntToInt64(v_1.AuxInt)
11462 mem := v_2
11463 if !(is32Bit(c)) {
11464 break
11465 }
11466 v.reset(OpARM64MOVWUload)
11467 v.AuxInt = int32ToAuxInt(int32(c))
11468 v.AddArg2(ptr, mem)
11469 return true
11470 }
11471
11472
11473
11474 for {
11475 if v_0.Op != OpARM64MOVDconst {
11476 break
11477 }
11478 c := auxIntToInt64(v_0.AuxInt)
11479 ptr := v_1
11480 mem := v_2
11481 if !(is32Bit(c)) {
11482 break
11483 }
11484 v.reset(OpARM64MOVWUload)
11485 v.AuxInt = int32ToAuxInt(int32(c))
11486 v.AddArg2(ptr, mem)
11487 return true
11488 }
11489
11490
11491 for {
11492 ptr := v_0
11493 if v_1.Op != OpARM64SLLconst || auxIntToInt64(v_1.AuxInt) != 2 {
11494 break
11495 }
11496 idx := v_1.Args[0]
11497 mem := v_2
11498 v.reset(OpARM64MOVWUloadidx4)
11499 v.AddArg3(ptr, idx, mem)
11500 return true
11501 }
11502
11503
11504 for {
11505 if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != 2 {
11506 break
11507 }
11508 idx := v_0.Args[0]
11509 ptr := v_1
11510 mem := v_2
11511 v.reset(OpARM64MOVWUloadidx4)
11512 v.AddArg3(ptr, idx, mem)
11513 return true
11514 }
11515
11516
11517
11518 for {
11519 ptr := v_0
11520 idx := v_1
11521 if v_2.Op != OpARM64MOVWstorezeroidx {
11522 break
11523 }
11524 idx2 := v_2.Args[1]
11525 ptr2 := v_2.Args[0]
11526 if !(isSamePtr(ptr, ptr2) && isSamePtr(idx, idx2) || isSamePtr(ptr, idx2) && isSamePtr(idx, ptr2)) {
11527 break
11528 }
11529 v.reset(OpARM64MOVDconst)
11530 v.AuxInt = int64ToAuxInt(0)
11531 return true
11532 }
11533 return false
11534 }
11535 func rewriteValueARM64_OpARM64MOVWUloadidx4(v *Value) bool {
11536 v_2 := v.Args[2]
11537 v_1 := v.Args[1]
11538 v_0 := v.Args[0]
11539
11540
11541
11542 for {
11543 ptr := v_0
11544 if v_1.Op != OpARM64MOVDconst {
11545 break
11546 }
11547 c := auxIntToInt64(v_1.AuxInt)
11548 mem := v_2
11549 if !(is32Bit(c << 2)) {
11550 break
11551 }
11552 v.reset(OpARM64MOVWUload)
11553 v.AuxInt = int32ToAuxInt(int32(c) << 2)
11554 v.AddArg2(ptr, mem)
11555 return true
11556 }
11557
11558
11559
11560 for {
11561 ptr := v_0
11562 idx := v_1
11563 if v_2.Op != OpARM64MOVWstorezeroidx4 {
11564 break
11565 }
11566 idx2 := v_2.Args[1]
11567 ptr2 := v_2.Args[0]
11568 if !(isSamePtr(ptr, ptr2) && isSamePtr(idx, idx2)) {
11569 break
11570 }
11571 v.reset(OpARM64MOVDconst)
11572 v.AuxInt = int64ToAuxInt(0)
11573 return true
11574 }
11575 return false
11576 }
11577 func rewriteValueARM64_OpARM64MOVWUreg(v *Value) bool {
11578 v_0 := v.Args[0]
11579
11580
11581 for {
11582 if v_0.Op != OpARM64ANDconst {
11583 break
11584 }
11585 c := auxIntToInt64(v_0.AuxInt)
11586 x := v_0.Args[0]
11587 v.reset(OpARM64ANDconst)
11588 v.AuxInt = int64ToAuxInt(c & (1<<32 - 1))
11589 v.AddArg(x)
11590 return true
11591 }
11592
11593
11594 for {
11595 if v_0.Op != OpARM64MOVDconst {
11596 break
11597 }
11598 c := auxIntToInt64(v_0.AuxInt)
11599 v.reset(OpARM64MOVDconst)
11600 v.AuxInt = int64ToAuxInt(int64(uint32(c)))
11601 return true
11602 }
11603
11604
11605
11606 for {
11607 x := v_0
11608 if !(v.Type.Size() <= 4) {
11609 break
11610 }
11611 v.copyOf(x)
11612 return true
11613 }
11614
11615
11616
11617 for {
11618 if v_0.Op != OpARM64SLLconst {
11619 break
11620 }
11621 lc := auxIntToInt64(v_0.AuxInt)
11622 if !(lc >= 32) {
11623 break
11624 }
11625 v.reset(OpARM64MOVDconst)
11626 v.AuxInt = int64ToAuxInt(0)
11627 return true
11628 }
11629
11630
11631
11632 for {
11633 if v_0.Op != OpARM64SLLconst {
11634 break
11635 }
11636 lc := auxIntToInt64(v_0.AuxInt)
11637 x := v_0.Args[0]
11638 if !(lc < 32) {
11639 break
11640 }
11641 v.reset(OpARM64UBFIZ)
11642 v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(lc, 32-lc))
11643 v.AddArg(x)
11644 return true
11645 }
11646
11647
11648
11649 for {
11650 if v_0.Op != OpARM64SRLconst {
11651 break
11652 }
11653 rc := auxIntToInt64(v_0.AuxInt)
11654 x := v_0.Args[0]
11655 if !(rc < 32) {
11656 break
11657 }
11658 v.reset(OpARM64UBFX)
11659 v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(rc, 32))
11660 v.AddArg(x)
11661 return true
11662 }
11663
11664
11665
11666 for {
11667 if v_0.Op != OpARM64UBFX {
11668 break
11669 }
11670 bfc := auxIntToArm64BitField(v_0.AuxInt)
11671 x := v_0.Args[0]
11672 if !(bfc.width() <= 32) {
11673 break
11674 }
11675 v.reset(OpARM64UBFX)
11676 v.AuxInt = arm64BitFieldToAuxInt(bfc)
11677 v.AddArg(x)
11678 return true
11679 }
11680 return false
11681 }
11682 func rewriteValueARM64_OpARM64MOVWload(v *Value) bool {
11683 v_1 := v.Args[1]
11684 v_0 := v.Args[0]
11685 b := v.Block
11686 config := b.Func.Config
11687
11688
11689
11690 for {
11691 off1 := auxIntToInt32(v.AuxInt)
11692 sym := auxToSym(v.Aux)
11693 if v_0.Op != OpARM64ADDconst {
11694 break
11695 }
11696 off2 := auxIntToInt64(v_0.AuxInt)
11697 ptr := v_0.Args[0]
11698 mem := v_1
11699 if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
11700 break
11701 }
11702 v.reset(OpARM64MOVWload)
11703 v.AuxInt = int32ToAuxInt(off1 + int32(off2))
11704 v.Aux = symToAux(sym)
11705 v.AddArg2(ptr, mem)
11706 return true
11707 }
11708
11709
11710
11711 for {
11712 off := auxIntToInt32(v.AuxInt)
11713 sym := auxToSym(v.Aux)
11714 if v_0.Op != OpARM64ADD {
11715 break
11716 }
11717 idx := v_0.Args[1]
11718 ptr := v_0.Args[0]
11719 mem := v_1
11720 if !(off == 0 && sym == nil) {
11721 break
11722 }
11723 v.reset(OpARM64MOVWloadidx)
11724 v.AddArg3(ptr, idx, mem)
11725 return true
11726 }
11727
11728
11729
11730 for {
11731 off := auxIntToInt32(v.AuxInt)
11732 sym := auxToSym(v.Aux)
11733 if v_0.Op != OpARM64ADDshiftLL || auxIntToInt64(v_0.AuxInt) != 2 {
11734 break
11735 }
11736 idx := v_0.Args[1]
11737 ptr := v_0.Args[0]
11738 mem := v_1
11739 if !(off == 0 && sym == nil) {
11740 break
11741 }
11742 v.reset(OpARM64MOVWloadidx4)
11743 v.AddArg3(ptr, idx, mem)
11744 return true
11745 }
11746
11747
11748
11749 for {
11750 off1 := auxIntToInt32(v.AuxInt)
11751 sym1 := auxToSym(v.Aux)
11752 if v_0.Op != OpARM64MOVDaddr {
11753 break
11754 }
11755 off2 := auxIntToInt32(v_0.AuxInt)
11756 sym2 := auxToSym(v_0.Aux)
11757 ptr := v_0.Args[0]
11758 mem := v_1
11759 if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
11760 break
11761 }
11762 v.reset(OpARM64MOVWload)
11763 v.AuxInt = int32ToAuxInt(off1 + off2)
11764 v.Aux = symToAux(mergeSym(sym1, sym2))
11765 v.AddArg2(ptr, mem)
11766 return true
11767 }
11768
11769
11770
11771 for {
11772 off := auxIntToInt32(v.AuxInt)
11773 sym := auxToSym(v.Aux)
11774 ptr := v_0
11775 if v_1.Op != OpARM64MOVWstorezero {
11776 break
11777 }
11778 off2 := auxIntToInt32(v_1.AuxInt)
11779 sym2 := auxToSym(v_1.Aux)
11780 ptr2 := v_1.Args[0]
11781 if !(sym == sym2 && off == off2 && isSamePtr(ptr, ptr2)) {
11782 break
11783 }
11784 v.reset(OpARM64MOVDconst)
11785 v.AuxInt = int64ToAuxInt(0)
11786 return true
11787 }
11788 return false
11789 }
11790 func rewriteValueARM64_OpARM64MOVWloadidx(v *Value) bool {
11791 v_2 := v.Args[2]
11792 v_1 := v.Args[1]
11793 v_0 := v.Args[0]
11794
11795
11796
11797 for {
11798 ptr := v_0
11799 if v_1.Op != OpARM64MOVDconst {
11800 break
11801 }
11802 c := auxIntToInt64(v_1.AuxInt)
11803 mem := v_2
11804 if !(is32Bit(c)) {
11805 break
11806 }
11807 v.reset(OpARM64MOVWload)
11808 v.AuxInt = int32ToAuxInt(int32(c))
11809 v.AddArg2(ptr, mem)
11810 return true
11811 }
11812
11813
11814
11815 for {
11816 if v_0.Op != OpARM64MOVDconst {
11817 break
11818 }
11819 c := auxIntToInt64(v_0.AuxInt)
11820 ptr := v_1
11821 mem := v_2
11822 if !(is32Bit(c)) {
11823 break
11824 }
11825 v.reset(OpARM64MOVWload)
11826 v.AuxInt = int32ToAuxInt(int32(c))
11827 v.AddArg2(ptr, mem)
11828 return true
11829 }
11830
11831
11832 for {
11833 ptr := v_0
11834 if v_1.Op != OpARM64SLLconst || auxIntToInt64(v_1.AuxInt) != 2 {
11835 break
11836 }
11837 idx := v_1.Args[0]
11838 mem := v_2
11839 v.reset(OpARM64MOVWloadidx4)
11840 v.AddArg3(ptr, idx, mem)
11841 return true
11842 }
11843
11844
11845 for {
11846 if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != 2 {
11847 break
11848 }
11849 idx := v_0.Args[0]
11850 ptr := v_1
11851 mem := v_2
11852 v.reset(OpARM64MOVWloadidx4)
11853 v.AddArg3(ptr, idx, mem)
11854 return true
11855 }
11856
11857
11858
11859 for {
11860 ptr := v_0
11861 idx := v_1
11862 if v_2.Op != OpARM64MOVWstorezeroidx {
11863 break
11864 }
11865 idx2 := v_2.Args[1]
11866 ptr2 := v_2.Args[0]
11867 if !(isSamePtr(ptr, ptr2) && isSamePtr(idx, idx2) || isSamePtr(ptr, idx2) && isSamePtr(idx, ptr2)) {
11868 break
11869 }
11870 v.reset(OpARM64MOVDconst)
11871 v.AuxInt = int64ToAuxInt(0)
11872 return true
11873 }
11874 return false
11875 }
11876 func rewriteValueARM64_OpARM64MOVWloadidx4(v *Value) bool {
11877 v_2 := v.Args[2]
11878 v_1 := v.Args[1]
11879 v_0 := v.Args[0]
11880
11881
11882
11883 for {
11884 ptr := v_0
11885 if v_1.Op != OpARM64MOVDconst {
11886 break
11887 }
11888 c := auxIntToInt64(v_1.AuxInt)
11889 mem := v_2
11890 if !(is32Bit(c << 2)) {
11891 break
11892 }
11893 v.reset(OpARM64MOVWload)
11894 v.AuxInt = int32ToAuxInt(int32(c) << 2)
11895 v.AddArg2(ptr, mem)
11896 return true
11897 }
11898
11899
11900
11901 for {
11902 ptr := v_0
11903 idx := v_1
11904 if v_2.Op != OpARM64MOVWstorezeroidx4 {
11905 break
11906 }
11907 idx2 := v_2.Args[1]
11908 ptr2 := v_2.Args[0]
11909 if !(isSamePtr(ptr, ptr2) && isSamePtr(idx, idx2)) {
11910 break
11911 }
11912 v.reset(OpARM64MOVDconst)
11913 v.AuxInt = int64ToAuxInt(0)
11914 return true
11915 }
11916 return false
11917 }
11918 func rewriteValueARM64_OpARM64MOVWreg(v *Value) bool {
11919 v_0 := v.Args[0]
11920
11921
11922 for {
11923 if v_0.Op != OpARM64MOVDconst {
11924 break
11925 }
11926 c := auxIntToInt64(v_0.AuxInt)
11927 v.reset(OpARM64MOVDconst)
11928 v.AuxInt = int64ToAuxInt(int64(int32(c)))
11929 return true
11930 }
11931
11932
11933
11934 for {
11935 x := v_0
11936 if !(v.Type.Size() <= 4) {
11937 break
11938 }
11939 v.copyOf(x)
11940 return true
11941 }
11942
11943
11944
11945 for {
11946 t := v.Type
11947 if v_0.Op != OpARM64ANDconst {
11948 break
11949 }
11950 c := auxIntToInt64(v_0.AuxInt)
11951 x := v_0.Args[0]
11952 if !(uint64(c)&uint64(0xffffffff80000000) == 0) {
11953 break
11954 }
11955 v.reset(OpARM64ANDconst)
11956 v.Type = t
11957 v.AuxInt = int64ToAuxInt(c)
11958 v.AddArg(x)
11959 return true
11960 }
11961
11962
11963
11964 for {
11965 if v_0.Op != OpARM64SLLconst {
11966 break
11967 }
11968 lc := auxIntToInt64(v_0.AuxInt)
11969 x := v_0.Args[0]
11970 if !(lc < 32) {
11971 break
11972 }
11973 v.reset(OpARM64SBFIZ)
11974 v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(lc, 32-lc))
11975 v.AddArg(x)
11976 return true
11977 }
11978
11979
11980
11981 for {
11982 if v_0.Op != OpARM64SBFX {
11983 break
11984 }
11985 bfc := auxIntToArm64BitField(v_0.AuxInt)
11986 x := v_0.Args[0]
11987 if !(bfc.width() <= 32) {
11988 break
11989 }
11990 v.reset(OpARM64SBFX)
11991 v.AuxInt = arm64BitFieldToAuxInt(bfc)
11992 v.AddArg(x)
11993 return true
11994 }
11995 return false
11996 }
11997 func rewriteValueARM64_OpARM64MOVWstore(v *Value) bool {
11998 v_2 := v.Args[2]
11999 v_1 := v.Args[1]
12000 v_0 := v.Args[0]
12001 b := v.Block
12002 config := b.Func.Config
12003
12004
12005 for {
12006 off := auxIntToInt32(v.AuxInt)
12007 sym := auxToSym(v.Aux)
12008 ptr := v_0
12009 if v_1.Op != OpARM64FMOVSfpgp {
12010 break
12011 }
12012 val := v_1.Args[0]
12013 mem := v_2
12014 v.reset(OpARM64FMOVSstore)
12015 v.AuxInt = int32ToAuxInt(off)
12016 v.Aux = symToAux(sym)
12017 v.AddArg3(ptr, val, mem)
12018 return true
12019 }
12020
12021
12022
12023 for {
12024 off1 := auxIntToInt32(v.AuxInt)
12025 sym := auxToSym(v.Aux)
12026 if v_0.Op != OpARM64ADDconst {
12027 break
12028 }
12029 off2 := auxIntToInt64(v_0.AuxInt)
12030 ptr := v_0.Args[0]
12031 val := v_1
12032 mem := v_2
12033 if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
12034 break
12035 }
12036 v.reset(OpARM64MOVWstore)
12037 v.AuxInt = int32ToAuxInt(off1 + int32(off2))
12038 v.Aux = symToAux(sym)
12039 v.AddArg3(ptr, val, mem)
12040 return true
12041 }
12042
12043
12044
12045 for {
12046 off := auxIntToInt32(v.AuxInt)
12047 sym := auxToSym(v.Aux)
12048 if v_0.Op != OpARM64ADD {
12049 break
12050 }
12051 idx := v_0.Args[1]
12052 ptr := v_0.Args[0]
12053 val := v_1
12054 mem := v_2
12055 if !(off == 0 && sym == nil) {
12056 break
12057 }
12058 v.reset(OpARM64MOVWstoreidx)
12059 v.AddArg4(ptr, idx, val, mem)
12060 return true
12061 }
12062
12063
12064
12065 for {
12066 off := auxIntToInt32(v.AuxInt)
12067 sym := auxToSym(v.Aux)
12068 if v_0.Op != OpARM64ADDshiftLL || auxIntToInt64(v_0.AuxInt) != 2 {
12069 break
12070 }
12071 idx := v_0.Args[1]
12072 ptr := v_0.Args[0]
12073 val := v_1
12074 mem := v_2
12075 if !(off == 0 && sym == nil) {
12076 break
12077 }
12078 v.reset(OpARM64MOVWstoreidx4)
12079 v.AddArg4(ptr, idx, val, mem)
12080 return true
12081 }
12082
12083
12084
12085 for {
12086 off1 := auxIntToInt32(v.AuxInt)
12087 sym1 := auxToSym(v.Aux)
12088 if v_0.Op != OpARM64MOVDaddr {
12089 break
12090 }
12091 off2 := auxIntToInt32(v_0.AuxInt)
12092 sym2 := auxToSym(v_0.Aux)
12093 ptr := v_0.Args[0]
12094 val := v_1
12095 mem := v_2
12096 if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
12097 break
12098 }
12099 v.reset(OpARM64MOVWstore)
12100 v.AuxInt = int32ToAuxInt(off1 + off2)
12101 v.Aux = symToAux(mergeSym(sym1, sym2))
12102 v.AddArg3(ptr, val, mem)
12103 return true
12104 }
12105
12106
12107 for {
12108 off := auxIntToInt32(v.AuxInt)
12109 sym := auxToSym(v.Aux)
12110 ptr := v_0
12111 if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 0 {
12112 break
12113 }
12114 mem := v_2
12115 v.reset(OpARM64MOVWstorezero)
12116 v.AuxInt = int32ToAuxInt(off)
12117 v.Aux = symToAux(sym)
12118 v.AddArg2(ptr, mem)
12119 return true
12120 }
12121
12122
12123 for {
12124 off := auxIntToInt32(v.AuxInt)
12125 sym := auxToSym(v.Aux)
12126 ptr := v_0
12127 if v_1.Op != OpARM64MOVWreg {
12128 break
12129 }
12130 x := v_1.Args[0]
12131 mem := v_2
12132 v.reset(OpARM64MOVWstore)
12133 v.AuxInt = int32ToAuxInt(off)
12134 v.Aux = symToAux(sym)
12135 v.AddArg3(ptr, x, mem)
12136 return true
12137 }
12138
12139
12140 for {
12141 off := auxIntToInt32(v.AuxInt)
12142 sym := auxToSym(v.Aux)
12143 ptr := v_0
12144 if v_1.Op != OpARM64MOVWUreg {
12145 break
12146 }
12147 x := v_1.Args[0]
12148 mem := v_2
12149 v.reset(OpARM64MOVWstore)
12150 v.AuxInt = int32ToAuxInt(off)
12151 v.Aux = symToAux(sym)
12152 v.AddArg3(ptr, x, mem)
12153 return true
12154 }
12155 return false
12156 }
12157 func rewriteValueARM64_OpARM64MOVWstoreidx(v *Value) bool {
12158 v_3 := v.Args[3]
12159 v_2 := v.Args[2]
12160 v_1 := v.Args[1]
12161 v_0 := v.Args[0]
12162
12163
12164
12165 for {
12166 ptr := v_0
12167 if v_1.Op != OpARM64MOVDconst {
12168 break
12169 }
12170 c := auxIntToInt64(v_1.AuxInt)
12171 val := v_2
12172 mem := v_3
12173 if !(is32Bit(c)) {
12174 break
12175 }
12176 v.reset(OpARM64MOVWstore)
12177 v.AuxInt = int32ToAuxInt(int32(c))
12178 v.AddArg3(ptr, val, mem)
12179 return true
12180 }
12181
12182
12183
12184 for {
12185 if v_0.Op != OpARM64MOVDconst {
12186 break
12187 }
12188 c := auxIntToInt64(v_0.AuxInt)
12189 idx := v_1
12190 val := v_2
12191 mem := v_3
12192 if !(is32Bit(c)) {
12193 break
12194 }
12195 v.reset(OpARM64MOVWstore)
12196 v.AuxInt = int32ToAuxInt(int32(c))
12197 v.AddArg3(idx, val, mem)
12198 return true
12199 }
12200
12201
12202 for {
12203 ptr := v_0
12204 if v_1.Op != OpARM64SLLconst || auxIntToInt64(v_1.AuxInt) != 2 {
12205 break
12206 }
12207 idx := v_1.Args[0]
12208 val := v_2
12209 mem := v_3
12210 v.reset(OpARM64MOVWstoreidx4)
12211 v.AddArg4(ptr, idx, val, mem)
12212 return true
12213 }
12214
12215
12216 for {
12217 if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != 2 {
12218 break
12219 }
12220 idx := v_0.Args[0]
12221 ptr := v_1
12222 val := v_2
12223 mem := v_3
12224 v.reset(OpARM64MOVWstoreidx4)
12225 v.AddArg4(ptr, idx, val, mem)
12226 return true
12227 }
12228
12229
12230 for {
12231 ptr := v_0
12232 idx := v_1
12233 if v_2.Op != OpARM64MOVDconst || auxIntToInt64(v_2.AuxInt) != 0 {
12234 break
12235 }
12236 mem := v_3
12237 v.reset(OpARM64MOVWstorezeroidx)
12238 v.AddArg3(ptr, idx, mem)
12239 return true
12240 }
12241
12242
12243 for {
12244 ptr := v_0
12245 idx := v_1
12246 if v_2.Op != OpARM64MOVWreg {
12247 break
12248 }
12249 x := v_2.Args[0]
12250 mem := v_3
12251 v.reset(OpARM64MOVWstoreidx)
12252 v.AddArg4(ptr, idx, x, mem)
12253 return true
12254 }
12255
12256
12257 for {
12258 ptr := v_0
12259 idx := v_1
12260 if v_2.Op != OpARM64MOVWUreg {
12261 break
12262 }
12263 x := v_2.Args[0]
12264 mem := v_3
12265 v.reset(OpARM64MOVWstoreidx)
12266 v.AddArg4(ptr, idx, x, mem)
12267 return true
12268 }
12269 return false
12270 }
12271 func rewriteValueARM64_OpARM64MOVWstoreidx4(v *Value) bool {
12272 v_3 := v.Args[3]
12273 v_2 := v.Args[2]
12274 v_1 := v.Args[1]
12275 v_0 := v.Args[0]
12276
12277
12278
12279 for {
12280 ptr := v_0
12281 if v_1.Op != OpARM64MOVDconst {
12282 break
12283 }
12284 c := auxIntToInt64(v_1.AuxInt)
12285 val := v_2
12286 mem := v_3
12287 if !(is32Bit(c << 2)) {
12288 break
12289 }
12290 v.reset(OpARM64MOVWstore)
12291 v.AuxInt = int32ToAuxInt(int32(c) << 2)
12292 v.AddArg3(ptr, val, mem)
12293 return true
12294 }
12295
12296
12297 for {
12298 ptr := v_0
12299 idx := v_1
12300 if v_2.Op != OpARM64MOVDconst || auxIntToInt64(v_2.AuxInt) != 0 {
12301 break
12302 }
12303 mem := v_3
12304 v.reset(OpARM64MOVWstorezeroidx4)
12305 v.AddArg3(ptr, idx, mem)
12306 return true
12307 }
12308
12309
12310 for {
12311 ptr := v_0
12312 idx := v_1
12313 if v_2.Op != OpARM64MOVWreg {
12314 break
12315 }
12316 x := v_2.Args[0]
12317 mem := v_3
12318 v.reset(OpARM64MOVWstoreidx4)
12319 v.AddArg4(ptr, idx, x, mem)
12320 return true
12321 }
12322
12323
12324 for {
12325 ptr := v_0
12326 idx := v_1
12327 if v_2.Op != OpARM64MOVWUreg {
12328 break
12329 }
12330 x := v_2.Args[0]
12331 mem := v_3
12332 v.reset(OpARM64MOVWstoreidx4)
12333 v.AddArg4(ptr, idx, x, mem)
12334 return true
12335 }
12336 return false
12337 }
12338 func rewriteValueARM64_OpARM64MOVWstorezero(v *Value) bool {
12339 v_1 := v.Args[1]
12340 v_0 := v.Args[0]
12341 b := v.Block
12342 config := b.Func.Config
12343
12344
12345
12346 for {
12347 off1 := auxIntToInt32(v.AuxInt)
12348 sym := auxToSym(v.Aux)
12349 if v_0.Op != OpARM64ADDconst {
12350 break
12351 }
12352 off2 := auxIntToInt64(v_0.AuxInt)
12353 ptr := v_0.Args[0]
12354 mem := v_1
12355 if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
12356 break
12357 }
12358 v.reset(OpARM64MOVWstorezero)
12359 v.AuxInt = int32ToAuxInt(off1 + int32(off2))
12360 v.Aux = symToAux(sym)
12361 v.AddArg2(ptr, mem)
12362 return true
12363 }
12364
12365
12366
12367 for {
12368 off1 := auxIntToInt32(v.AuxInt)
12369 sym1 := auxToSym(v.Aux)
12370 if v_0.Op != OpARM64MOVDaddr {
12371 break
12372 }
12373 off2 := auxIntToInt32(v_0.AuxInt)
12374 sym2 := auxToSym(v_0.Aux)
12375 ptr := v_0.Args[0]
12376 mem := v_1
12377 if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
12378 break
12379 }
12380 v.reset(OpARM64MOVWstorezero)
12381 v.AuxInt = int32ToAuxInt(off1 + off2)
12382 v.Aux = symToAux(mergeSym(sym1, sym2))
12383 v.AddArg2(ptr, mem)
12384 return true
12385 }
12386
12387
12388
12389 for {
12390 off := auxIntToInt32(v.AuxInt)
12391 sym := auxToSym(v.Aux)
12392 if v_0.Op != OpARM64ADD {
12393 break
12394 }
12395 idx := v_0.Args[1]
12396 ptr := v_0.Args[0]
12397 mem := v_1
12398 if !(off == 0 && sym == nil) {
12399 break
12400 }
12401 v.reset(OpARM64MOVWstorezeroidx)
12402 v.AddArg3(ptr, idx, mem)
12403 return true
12404 }
12405
12406
12407
12408 for {
12409 off := auxIntToInt32(v.AuxInt)
12410 sym := auxToSym(v.Aux)
12411 if v_0.Op != OpARM64ADDshiftLL || auxIntToInt64(v_0.AuxInt) != 2 {
12412 break
12413 }
12414 idx := v_0.Args[1]
12415 ptr := v_0.Args[0]
12416 mem := v_1
12417 if !(off == 0 && sym == nil) {
12418 break
12419 }
12420 v.reset(OpARM64MOVWstorezeroidx4)
12421 v.AddArg3(ptr, idx, mem)
12422 return true
12423 }
12424 return false
12425 }
12426 func rewriteValueARM64_OpARM64MOVWstorezeroidx(v *Value) bool {
12427 v_2 := v.Args[2]
12428 v_1 := v.Args[1]
12429 v_0 := v.Args[0]
12430
12431
12432
12433 for {
12434 ptr := v_0
12435 if v_1.Op != OpARM64MOVDconst {
12436 break
12437 }
12438 c := auxIntToInt64(v_1.AuxInt)
12439 mem := v_2
12440 if !(is32Bit(c)) {
12441 break
12442 }
12443 v.reset(OpARM64MOVWstorezero)
12444 v.AuxInt = int32ToAuxInt(int32(c))
12445 v.AddArg2(ptr, mem)
12446 return true
12447 }
12448
12449
12450
12451 for {
12452 if v_0.Op != OpARM64MOVDconst {
12453 break
12454 }
12455 c := auxIntToInt64(v_0.AuxInt)
12456 idx := v_1
12457 mem := v_2
12458 if !(is32Bit(c)) {
12459 break
12460 }
12461 v.reset(OpARM64MOVWstorezero)
12462 v.AuxInt = int32ToAuxInt(int32(c))
12463 v.AddArg2(idx, mem)
12464 return true
12465 }
12466
12467
12468 for {
12469 ptr := v_0
12470 if v_1.Op != OpARM64SLLconst || auxIntToInt64(v_1.AuxInt) != 2 {
12471 break
12472 }
12473 idx := v_1.Args[0]
12474 mem := v_2
12475 v.reset(OpARM64MOVWstorezeroidx4)
12476 v.AddArg3(ptr, idx, mem)
12477 return true
12478 }
12479
12480
12481 for {
12482 if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != 2 {
12483 break
12484 }
12485 idx := v_0.Args[0]
12486 ptr := v_1
12487 mem := v_2
12488 v.reset(OpARM64MOVWstorezeroidx4)
12489 v.AddArg3(ptr, idx, mem)
12490 return true
12491 }
12492 return false
12493 }
12494 func rewriteValueARM64_OpARM64MOVWstorezeroidx4(v *Value) bool {
12495 v_2 := v.Args[2]
12496 v_1 := v.Args[1]
12497 v_0 := v.Args[0]
12498
12499
12500
12501 for {
12502 ptr := v_0
12503 if v_1.Op != OpARM64MOVDconst {
12504 break
12505 }
12506 c := auxIntToInt64(v_1.AuxInt)
12507 mem := v_2
12508 if !(is32Bit(c << 2)) {
12509 break
12510 }
12511 v.reset(OpARM64MOVWstorezero)
12512 v.AuxInt = int32ToAuxInt(int32(c << 2))
12513 v.AddArg2(ptr, mem)
12514 return true
12515 }
12516 return false
12517 }
12518 func rewriteValueARM64_OpARM64MSUB(v *Value) bool {
12519 v_2 := v.Args[2]
12520 v_1 := v.Args[1]
12521 v_0 := v.Args[0]
12522 b := v.Block
12523
12524
12525 for {
12526 a := v_0
12527 x := v_1
12528 if v_2.Op != OpARM64MOVDconst || auxIntToInt64(v_2.AuxInt) != -1 {
12529 break
12530 }
12531 v.reset(OpARM64ADD)
12532 v.AddArg2(a, x)
12533 return true
12534 }
12535
12536
12537 for {
12538 a := v_0
12539 if v_2.Op != OpARM64MOVDconst || auxIntToInt64(v_2.AuxInt) != 0 {
12540 break
12541 }
12542 v.copyOf(a)
12543 return true
12544 }
12545
12546
12547 for {
12548 a := v_0
12549 x := v_1
12550 if v_2.Op != OpARM64MOVDconst || auxIntToInt64(v_2.AuxInt) != 1 {
12551 break
12552 }
12553 v.reset(OpARM64SUB)
12554 v.AddArg2(a, x)
12555 return true
12556 }
12557
12558
12559
12560 for {
12561 a := v_0
12562 x := v_1
12563 if v_2.Op != OpARM64MOVDconst {
12564 break
12565 }
12566 c := auxIntToInt64(v_2.AuxInt)
12567 if !(isPowerOfTwo(c)) {
12568 break
12569 }
12570 v.reset(OpARM64SUBshiftLL)
12571 v.AuxInt = int64ToAuxInt(log64(c))
12572 v.AddArg2(a, x)
12573 return true
12574 }
12575
12576
12577
12578 for {
12579 a := v_0
12580 x := v_1
12581 if v_2.Op != OpARM64MOVDconst {
12582 break
12583 }
12584 c := auxIntToInt64(v_2.AuxInt)
12585 if !(isPowerOfTwo(c-1) && c >= 3) {
12586 break
12587 }
12588 v.reset(OpARM64SUB)
12589 v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
12590 v0.AuxInt = int64ToAuxInt(log64(c - 1))
12591 v0.AddArg2(x, x)
12592 v.AddArg2(a, v0)
12593 return true
12594 }
12595
12596
12597
12598 for {
12599 a := v_0
12600 x := v_1
12601 if v_2.Op != OpARM64MOVDconst {
12602 break
12603 }
12604 c := auxIntToInt64(v_2.AuxInt)
12605 if !(isPowerOfTwo(c+1) && c >= 7) {
12606 break
12607 }
12608 v.reset(OpARM64ADD)
12609 v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
12610 v0.AuxInt = int64ToAuxInt(log64(c + 1))
12611 v0.AddArg2(x, x)
12612 v.AddArg2(a, v0)
12613 return true
12614 }
12615
12616
12617
12618 for {
12619 a := v_0
12620 x := v_1
12621 if v_2.Op != OpARM64MOVDconst {
12622 break
12623 }
12624 c := auxIntToInt64(v_2.AuxInt)
12625 if !(c%3 == 0 && isPowerOfTwo(c/3)) {
12626 break
12627 }
12628 v.reset(OpARM64ADDshiftLL)
12629 v.AuxInt = int64ToAuxInt(log64(c / 3))
12630 v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
12631 v0.AuxInt = int64ToAuxInt(2)
12632 v0.AddArg2(x, x)
12633 v.AddArg2(a, v0)
12634 return true
12635 }
12636
12637
12638
12639 for {
12640 a := v_0
12641 x := v_1
12642 if v_2.Op != OpARM64MOVDconst {
12643 break
12644 }
12645 c := auxIntToInt64(v_2.AuxInt)
12646 if !(c%5 == 0 && isPowerOfTwo(c/5)) {
12647 break
12648 }
12649 v.reset(OpARM64SUBshiftLL)
12650 v.AuxInt = int64ToAuxInt(log64(c / 5))
12651 v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
12652 v0.AuxInt = int64ToAuxInt(2)
12653 v0.AddArg2(x, x)
12654 v.AddArg2(a, v0)
12655 return true
12656 }
12657
12658
12659
12660 for {
12661 a := v_0
12662 x := v_1
12663 if v_2.Op != OpARM64MOVDconst {
12664 break
12665 }
12666 c := auxIntToInt64(v_2.AuxInt)
12667 if !(c%7 == 0 && isPowerOfTwo(c/7)) {
12668 break
12669 }
12670 v.reset(OpARM64ADDshiftLL)
12671 v.AuxInt = int64ToAuxInt(log64(c / 7))
12672 v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
12673 v0.AuxInt = int64ToAuxInt(3)
12674 v0.AddArg2(x, x)
12675 v.AddArg2(a, v0)
12676 return true
12677 }
12678
12679
12680
12681 for {
12682 a := v_0
12683 x := v_1
12684 if v_2.Op != OpARM64MOVDconst {
12685 break
12686 }
12687 c := auxIntToInt64(v_2.AuxInt)
12688 if !(c%9 == 0 && isPowerOfTwo(c/9)) {
12689 break
12690 }
12691 v.reset(OpARM64SUBshiftLL)
12692 v.AuxInt = int64ToAuxInt(log64(c / 9))
12693 v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
12694 v0.AuxInt = int64ToAuxInt(3)
12695 v0.AddArg2(x, x)
12696 v.AddArg2(a, v0)
12697 return true
12698 }
12699
12700
12701 for {
12702 a := v_0
12703 if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != -1 {
12704 break
12705 }
12706 x := v_2
12707 v.reset(OpARM64ADD)
12708 v.AddArg2(a, x)
12709 return true
12710 }
12711
12712
12713 for {
12714 a := v_0
12715 if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 0 {
12716 break
12717 }
12718 v.copyOf(a)
12719 return true
12720 }
12721
12722
12723 for {
12724 a := v_0
12725 if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 1 {
12726 break
12727 }
12728 x := v_2
12729 v.reset(OpARM64SUB)
12730 v.AddArg2(a, x)
12731 return true
12732 }
12733
12734
12735
12736 for {
12737 a := v_0
12738 if v_1.Op != OpARM64MOVDconst {
12739 break
12740 }
12741 c := auxIntToInt64(v_1.AuxInt)
12742 x := v_2
12743 if !(isPowerOfTwo(c)) {
12744 break
12745 }
12746 v.reset(OpARM64SUBshiftLL)
12747 v.AuxInt = int64ToAuxInt(log64(c))
12748 v.AddArg2(a, x)
12749 return true
12750 }
12751
12752
12753
12754 for {
12755 a := v_0
12756 if v_1.Op != OpARM64MOVDconst {
12757 break
12758 }
12759 c := auxIntToInt64(v_1.AuxInt)
12760 x := v_2
12761 if !(isPowerOfTwo(c-1) && c >= 3) {
12762 break
12763 }
12764 v.reset(OpARM64SUB)
12765 v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
12766 v0.AuxInt = int64ToAuxInt(log64(c - 1))
12767 v0.AddArg2(x, x)
12768 v.AddArg2(a, v0)
12769 return true
12770 }
12771
12772
12773
12774 for {
12775 a := v_0
12776 if v_1.Op != OpARM64MOVDconst {
12777 break
12778 }
12779 c := auxIntToInt64(v_1.AuxInt)
12780 x := v_2
12781 if !(isPowerOfTwo(c+1) && c >= 7) {
12782 break
12783 }
12784 v.reset(OpARM64ADD)
12785 v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
12786 v0.AuxInt = int64ToAuxInt(log64(c + 1))
12787 v0.AddArg2(x, x)
12788 v.AddArg2(a, v0)
12789 return true
12790 }
12791
12792
12793
12794 for {
12795 a := v_0
12796 if v_1.Op != OpARM64MOVDconst {
12797 break
12798 }
12799 c := auxIntToInt64(v_1.AuxInt)
12800 x := v_2
12801 if !(c%3 == 0 && isPowerOfTwo(c/3)) {
12802 break
12803 }
12804 v.reset(OpARM64ADDshiftLL)
12805 v.AuxInt = int64ToAuxInt(log64(c / 3))
12806 v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
12807 v0.AuxInt = int64ToAuxInt(2)
12808 v0.AddArg2(x, x)
12809 v.AddArg2(a, v0)
12810 return true
12811 }
12812
12813
12814
12815 for {
12816 a := v_0
12817 if v_1.Op != OpARM64MOVDconst {
12818 break
12819 }
12820 c := auxIntToInt64(v_1.AuxInt)
12821 x := v_2
12822 if !(c%5 == 0 && isPowerOfTwo(c/5)) {
12823 break
12824 }
12825 v.reset(OpARM64SUBshiftLL)
12826 v.AuxInt = int64ToAuxInt(log64(c / 5))
12827 v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
12828 v0.AuxInt = int64ToAuxInt(2)
12829 v0.AddArg2(x, x)
12830 v.AddArg2(a, v0)
12831 return true
12832 }
12833
12834
12835
12836 for {
12837 a := v_0
12838 if v_1.Op != OpARM64MOVDconst {
12839 break
12840 }
12841 c := auxIntToInt64(v_1.AuxInt)
12842 x := v_2
12843 if !(c%7 == 0 && isPowerOfTwo(c/7)) {
12844 break
12845 }
12846 v.reset(OpARM64ADDshiftLL)
12847 v.AuxInt = int64ToAuxInt(log64(c / 7))
12848 v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
12849 v0.AuxInt = int64ToAuxInt(3)
12850 v0.AddArg2(x, x)
12851 v.AddArg2(a, v0)
12852 return true
12853 }
12854
12855
12856
12857 for {
12858 a := v_0
12859 if v_1.Op != OpARM64MOVDconst {
12860 break
12861 }
12862 c := auxIntToInt64(v_1.AuxInt)
12863 x := v_2
12864 if !(c%9 == 0 && isPowerOfTwo(c/9)) {
12865 break
12866 }
12867 v.reset(OpARM64SUBshiftLL)
12868 v.AuxInt = int64ToAuxInt(log64(c / 9))
12869 v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
12870 v0.AuxInt = int64ToAuxInt(3)
12871 v0.AddArg2(x, x)
12872 v.AddArg2(a, v0)
12873 return true
12874 }
12875
12876
12877 for {
12878 if v_0.Op != OpARM64MOVDconst {
12879 break
12880 }
12881 c := auxIntToInt64(v_0.AuxInt)
12882 x := v_1
12883 y := v_2
12884 v.reset(OpARM64ADDconst)
12885 v.AuxInt = int64ToAuxInt(c)
12886 v0 := b.NewValue0(v.Pos, OpARM64MNEG, x.Type)
12887 v0.AddArg2(x, y)
12888 v.AddArg(v0)
12889 return true
12890 }
12891
12892
12893 for {
12894 a := v_0
12895 if v_1.Op != OpARM64MOVDconst {
12896 break
12897 }
12898 c := auxIntToInt64(v_1.AuxInt)
12899 if v_2.Op != OpARM64MOVDconst {
12900 break
12901 }
12902 d := auxIntToInt64(v_2.AuxInt)
12903 v.reset(OpARM64SUBconst)
12904 v.AuxInt = int64ToAuxInt(c * d)
12905 v.AddArg(a)
12906 return true
12907 }
12908 return false
12909 }
12910 func rewriteValueARM64_OpARM64MSUBW(v *Value) bool {
12911 v_2 := v.Args[2]
12912 v_1 := v.Args[1]
12913 v_0 := v.Args[0]
12914 b := v.Block
12915
12916
12917
12918 for {
12919 a := v_0
12920 x := v_1
12921 if v_2.Op != OpARM64MOVDconst {
12922 break
12923 }
12924 c := auxIntToInt64(v_2.AuxInt)
12925 if !(int32(c) == -1) {
12926 break
12927 }
12928 v.reset(OpARM64MOVWUreg)
12929 v0 := b.NewValue0(v.Pos, OpARM64ADD, a.Type)
12930 v0.AddArg2(a, x)
12931 v.AddArg(v0)
12932 return true
12933 }
12934
12935
12936
12937 for {
12938 a := v_0
12939 if v_2.Op != OpARM64MOVDconst {
12940 break
12941 }
12942 c := auxIntToInt64(v_2.AuxInt)
12943 if !(int32(c) == 0) {
12944 break
12945 }
12946 v.reset(OpARM64MOVWUreg)
12947 v.AddArg(a)
12948 return true
12949 }
12950
12951
12952
12953 for {
12954 a := v_0
12955 x := v_1
12956 if v_2.Op != OpARM64MOVDconst {
12957 break
12958 }
12959 c := auxIntToInt64(v_2.AuxInt)
12960 if !(int32(c) == 1) {
12961 break
12962 }
12963 v.reset(OpARM64MOVWUreg)
12964 v0 := b.NewValue0(v.Pos, OpARM64SUB, a.Type)
12965 v0.AddArg2(a, x)
12966 v.AddArg(v0)
12967 return true
12968 }
12969
12970
12971
12972 for {
12973 a := v_0
12974 x := v_1
12975 if v_2.Op != OpARM64MOVDconst {
12976 break
12977 }
12978 c := auxIntToInt64(v_2.AuxInt)
12979 if !(isPowerOfTwo(c)) {
12980 break
12981 }
12982 v.reset(OpARM64MOVWUreg)
12983 v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, a.Type)
12984 v0.AuxInt = int64ToAuxInt(log64(c))
12985 v0.AddArg2(a, x)
12986 v.AddArg(v0)
12987 return true
12988 }
12989
12990
12991
12992 for {
12993 a := v_0
12994 x := v_1
12995 if v_2.Op != OpARM64MOVDconst {
12996 break
12997 }
12998 c := auxIntToInt64(v_2.AuxInt)
12999 if !(isPowerOfTwo(c-1) && int32(c) >= 3) {
13000 break
13001 }
13002 v.reset(OpARM64MOVWUreg)
13003 v0 := b.NewValue0(v.Pos, OpARM64SUB, a.Type)
13004 v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
13005 v1.AuxInt = int64ToAuxInt(log64(c - 1))
13006 v1.AddArg2(x, x)
13007 v0.AddArg2(a, v1)
13008 v.AddArg(v0)
13009 return true
13010 }
13011
13012
13013
13014 for {
13015 a := v_0
13016 x := v_1
13017 if v_2.Op != OpARM64MOVDconst {
13018 break
13019 }
13020 c := auxIntToInt64(v_2.AuxInt)
13021 if !(isPowerOfTwo(c+1) && int32(c) >= 7) {
13022 break
13023 }
13024 v.reset(OpARM64MOVWUreg)
13025 v0 := b.NewValue0(v.Pos, OpARM64ADD, a.Type)
13026 v1 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
13027 v1.AuxInt = int64ToAuxInt(log64(c + 1))
13028 v1.AddArg2(x, x)
13029 v0.AddArg2(a, v1)
13030 v.AddArg(v0)
13031 return true
13032 }
13033
13034
13035
13036 for {
13037 a := v_0
13038 x := v_1
13039 if v_2.Op != OpARM64MOVDconst {
13040 break
13041 }
13042 c := auxIntToInt64(v_2.AuxInt)
13043 if !(c%3 == 0 && isPowerOfTwo(c/3) && is32Bit(c)) {
13044 break
13045 }
13046 v.reset(OpARM64MOVWUreg)
13047 v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, a.Type)
13048 v0.AuxInt = int64ToAuxInt(log64(c / 3))
13049 v1 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
13050 v1.AuxInt = int64ToAuxInt(2)
13051 v1.AddArg2(x, x)
13052 v0.AddArg2(a, v1)
13053 v.AddArg(v0)
13054 return true
13055 }
13056
13057
13058
13059 for {
13060 a := v_0
13061 x := v_1
13062 if v_2.Op != OpARM64MOVDconst {
13063 break
13064 }
13065 c := auxIntToInt64(v_2.AuxInt)
13066 if !(c%5 == 0 && isPowerOfTwo(c/5) && is32Bit(c)) {
13067 break
13068 }
13069 v.reset(OpARM64MOVWUreg)
13070 v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, a.Type)
13071 v0.AuxInt = int64ToAuxInt(log64(c / 5))
13072 v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
13073 v1.AuxInt = int64ToAuxInt(2)
13074 v1.AddArg2(x, x)
13075 v0.AddArg2(a, v1)
13076 v.AddArg(v0)
13077 return true
13078 }
13079
13080
13081
13082 for {
13083 a := v_0
13084 x := v_1
13085 if v_2.Op != OpARM64MOVDconst {
13086 break
13087 }
13088 c := auxIntToInt64(v_2.AuxInt)
13089 if !(c%7 == 0 && isPowerOfTwo(c/7) && is32Bit(c)) {
13090 break
13091 }
13092 v.reset(OpARM64MOVWUreg)
13093 v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, a.Type)
13094 v0.AuxInt = int64ToAuxInt(log64(c / 7))
13095 v1 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
13096 v1.AuxInt = int64ToAuxInt(3)
13097 v1.AddArg2(x, x)
13098 v0.AddArg2(a, v1)
13099 v.AddArg(v0)
13100 return true
13101 }
13102
13103
13104
13105 for {
13106 a := v_0
13107 x := v_1
13108 if v_2.Op != OpARM64MOVDconst {
13109 break
13110 }
13111 c := auxIntToInt64(v_2.AuxInt)
13112 if !(c%9 == 0 && isPowerOfTwo(c/9) && is32Bit(c)) {
13113 break
13114 }
13115 v.reset(OpARM64MOVWUreg)
13116 v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, a.Type)
13117 v0.AuxInt = int64ToAuxInt(log64(c / 9))
13118 v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
13119 v1.AuxInt = int64ToAuxInt(3)
13120 v1.AddArg2(x, x)
13121 v0.AddArg2(a, v1)
13122 v.AddArg(v0)
13123 return true
13124 }
13125
13126
13127
13128 for {
13129 a := v_0
13130 if v_1.Op != OpARM64MOVDconst {
13131 break
13132 }
13133 c := auxIntToInt64(v_1.AuxInt)
13134 x := v_2
13135 if !(int32(c) == -1) {
13136 break
13137 }
13138 v.reset(OpARM64MOVWUreg)
13139 v0 := b.NewValue0(v.Pos, OpARM64ADD, a.Type)
13140 v0.AddArg2(a, x)
13141 v.AddArg(v0)
13142 return true
13143 }
13144
13145
13146
13147 for {
13148 a := v_0
13149 if v_1.Op != OpARM64MOVDconst {
13150 break
13151 }
13152 c := auxIntToInt64(v_1.AuxInt)
13153 if !(int32(c) == 0) {
13154 break
13155 }
13156 v.reset(OpARM64MOVWUreg)
13157 v.AddArg(a)
13158 return true
13159 }
13160
13161
13162
13163 for {
13164 a := v_0
13165 if v_1.Op != OpARM64MOVDconst {
13166 break
13167 }
13168 c := auxIntToInt64(v_1.AuxInt)
13169 x := v_2
13170 if !(int32(c) == 1) {
13171 break
13172 }
13173 v.reset(OpARM64MOVWUreg)
13174 v0 := b.NewValue0(v.Pos, OpARM64SUB, a.Type)
13175 v0.AddArg2(a, x)
13176 v.AddArg(v0)
13177 return true
13178 }
13179
13180
13181
13182 for {
13183 a := v_0
13184 if v_1.Op != OpARM64MOVDconst {
13185 break
13186 }
13187 c := auxIntToInt64(v_1.AuxInt)
13188 x := v_2
13189 if !(isPowerOfTwo(c)) {
13190 break
13191 }
13192 v.reset(OpARM64MOVWUreg)
13193 v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, a.Type)
13194 v0.AuxInt = int64ToAuxInt(log64(c))
13195 v0.AddArg2(a, x)
13196 v.AddArg(v0)
13197 return true
13198 }
13199
13200
13201
13202 for {
13203 a := v_0
13204 if v_1.Op != OpARM64MOVDconst {
13205 break
13206 }
13207 c := auxIntToInt64(v_1.AuxInt)
13208 x := v_2
13209 if !(isPowerOfTwo(c-1) && int32(c) >= 3) {
13210 break
13211 }
13212 v.reset(OpARM64MOVWUreg)
13213 v0 := b.NewValue0(v.Pos, OpARM64SUB, a.Type)
13214 v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
13215 v1.AuxInt = int64ToAuxInt(log64(c - 1))
13216 v1.AddArg2(x, x)
13217 v0.AddArg2(a, v1)
13218 v.AddArg(v0)
13219 return true
13220 }
13221
13222
13223
13224 for {
13225 a := v_0
13226 if v_1.Op != OpARM64MOVDconst {
13227 break
13228 }
13229 c := auxIntToInt64(v_1.AuxInt)
13230 x := v_2
13231 if !(isPowerOfTwo(c+1) && int32(c) >= 7) {
13232 break
13233 }
13234 v.reset(OpARM64MOVWUreg)
13235 v0 := b.NewValue0(v.Pos, OpARM64ADD, a.Type)
13236 v1 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
13237 v1.AuxInt = int64ToAuxInt(log64(c + 1))
13238 v1.AddArg2(x, x)
13239 v0.AddArg2(a, v1)
13240 v.AddArg(v0)
13241 return true
13242 }
13243
13244
13245
13246 for {
13247 a := v_0
13248 if v_1.Op != OpARM64MOVDconst {
13249 break
13250 }
13251 c := auxIntToInt64(v_1.AuxInt)
13252 x := v_2
13253 if !(c%3 == 0 && isPowerOfTwo(c/3) && is32Bit(c)) {
13254 break
13255 }
13256 v.reset(OpARM64MOVWUreg)
13257 v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, a.Type)
13258 v0.AuxInt = int64ToAuxInt(log64(c / 3))
13259 v1 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
13260 v1.AuxInt = int64ToAuxInt(2)
13261 v1.AddArg2(x, x)
13262 v0.AddArg2(a, v1)
13263 v.AddArg(v0)
13264 return true
13265 }
13266
13267
13268
13269 for {
13270 a := v_0
13271 if v_1.Op != OpARM64MOVDconst {
13272 break
13273 }
13274 c := auxIntToInt64(v_1.AuxInt)
13275 x := v_2
13276 if !(c%5 == 0 && isPowerOfTwo(c/5) && is32Bit(c)) {
13277 break
13278 }
13279 v.reset(OpARM64MOVWUreg)
13280 v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, a.Type)
13281 v0.AuxInt = int64ToAuxInt(log64(c / 5))
13282 v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
13283 v1.AuxInt = int64ToAuxInt(2)
13284 v1.AddArg2(x, x)
13285 v0.AddArg2(a, v1)
13286 v.AddArg(v0)
13287 return true
13288 }
13289
13290
13291
13292 for {
13293 a := v_0
13294 if v_1.Op != OpARM64MOVDconst {
13295 break
13296 }
13297 c := auxIntToInt64(v_1.AuxInt)
13298 x := v_2
13299 if !(c%7 == 0 && isPowerOfTwo(c/7) && is32Bit(c)) {
13300 break
13301 }
13302 v.reset(OpARM64MOVWUreg)
13303 v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, a.Type)
13304 v0.AuxInt = int64ToAuxInt(log64(c / 7))
13305 v1 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, x.Type)
13306 v1.AuxInt = int64ToAuxInt(3)
13307 v1.AddArg2(x, x)
13308 v0.AddArg2(a, v1)
13309 v.AddArg(v0)
13310 return true
13311 }
13312
13313
13314
13315 for {
13316 a := v_0
13317 if v_1.Op != OpARM64MOVDconst {
13318 break
13319 }
13320 c := auxIntToInt64(v_1.AuxInt)
13321 x := v_2
13322 if !(c%9 == 0 && isPowerOfTwo(c/9) && is32Bit(c)) {
13323 break
13324 }
13325 v.reset(OpARM64MOVWUreg)
13326 v0 := b.NewValue0(v.Pos, OpARM64SUBshiftLL, a.Type)
13327 v0.AuxInt = int64ToAuxInt(log64(c / 9))
13328 v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
13329 v1.AuxInt = int64ToAuxInt(3)
13330 v1.AddArg2(x, x)
13331 v0.AddArg2(a, v1)
13332 v.AddArg(v0)
13333 return true
13334 }
13335
13336
13337 for {
13338 if v_0.Op != OpARM64MOVDconst {
13339 break
13340 }
13341 c := auxIntToInt64(v_0.AuxInt)
13342 x := v_1
13343 y := v_2
13344 v.reset(OpARM64MOVWUreg)
13345 v0 := b.NewValue0(v.Pos, OpARM64ADDconst, x.Type)
13346 v0.AuxInt = int64ToAuxInt(c)
13347 v1 := b.NewValue0(v.Pos, OpARM64MNEGW, x.Type)
13348 v1.AddArg2(x, y)
13349 v0.AddArg(v1)
13350 v.AddArg(v0)
13351 return true
13352 }
13353
13354
13355 for {
13356 a := v_0
13357 if v_1.Op != OpARM64MOVDconst {
13358 break
13359 }
13360 c := auxIntToInt64(v_1.AuxInt)
13361 if v_2.Op != OpARM64MOVDconst {
13362 break
13363 }
13364 d := auxIntToInt64(v_2.AuxInt)
13365 v.reset(OpARM64MOVWUreg)
13366 v0 := b.NewValue0(v.Pos, OpARM64SUBconst, a.Type)
13367 v0.AuxInt = int64ToAuxInt(c * d)
13368 v0.AddArg(a)
13369 v.AddArg(v0)
13370 return true
13371 }
13372 return false
13373 }
13374 func rewriteValueARM64_OpARM64MUL(v *Value) bool {
13375 v_1 := v.Args[1]
13376 v_0 := v.Args[0]
13377 b := v.Block
13378
13379
13380 for {
13381 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
13382 if v_0.Op != OpARM64NEG {
13383 continue
13384 }
13385 x := v_0.Args[0]
13386 y := v_1
13387 v.reset(OpARM64MNEG)
13388 v.AddArg2(x, y)
13389 return true
13390 }
13391 break
13392 }
13393
13394
13395 for {
13396 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
13397 x := v_0
13398 if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != -1 {
13399 continue
13400 }
13401 v.reset(OpARM64NEG)
13402 v.AddArg(x)
13403 return true
13404 }
13405 break
13406 }
13407
13408
13409 for {
13410 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
13411 if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 0 {
13412 continue
13413 }
13414 v.reset(OpARM64MOVDconst)
13415 v.AuxInt = int64ToAuxInt(0)
13416 return true
13417 }
13418 break
13419 }
13420
13421
13422 for {
13423 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
13424 x := v_0
13425 if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 1 {
13426 continue
13427 }
13428 v.copyOf(x)
13429 return true
13430 }
13431 break
13432 }
13433
13434
13435
13436 for {
13437 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
13438 x := v_0
13439 if v_1.Op != OpARM64MOVDconst {
13440 continue
13441 }
13442 c := auxIntToInt64(v_1.AuxInt)
13443 if !(isPowerOfTwo(c)) {
13444 continue
13445 }
13446 v.reset(OpARM64SLLconst)
13447 v.AuxInt = int64ToAuxInt(log64(c))
13448 v.AddArg(x)
13449 return true
13450 }
13451 break
13452 }
13453
13454
13455
13456 for {
13457 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
13458 x := v_0
13459 if v_1.Op != OpARM64MOVDconst {
13460 continue
13461 }
13462 c := auxIntToInt64(v_1.AuxInt)
13463 if !(isPowerOfTwo(c-1) && c >= 3) {
13464 continue
13465 }
13466 v.reset(OpARM64ADDshiftLL)
13467 v.AuxInt = int64ToAuxInt(log64(c - 1))
13468 v.AddArg2(x, x)
13469 return true
13470 }
13471 break
13472 }
13473
13474
13475
13476 for {
13477 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
13478 x := v_0
13479 if v_1.Op != OpARM64MOVDconst {
13480 continue
13481 }
13482 c := auxIntToInt64(v_1.AuxInt)
13483 if !(isPowerOfTwo(c+1) && c >= 7) {
13484 continue
13485 }
13486 v.reset(OpARM64ADDshiftLL)
13487 v.AuxInt = int64ToAuxInt(log64(c + 1))
13488 v0 := b.NewValue0(v.Pos, OpARM64NEG, x.Type)
13489 v0.AddArg(x)
13490 v.AddArg2(v0, x)
13491 return true
13492 }
13493 break
13494 }
13495
13496
13497
13498 for {
13499 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
13500 x := v_0
13501 if v_1.Op != OpARM64MOVDconst {
13502 continue
13503 }
13504 c := auxIntToInt64(v_1.AuxInt)
13505 if !(c%3 == 0 && isPowerOfTwo(c/3)) {
13506 continue
13507 }
13508 v.reset(OpARM64SLLconst)
13509 v.AuxInt = int64ToAuxInt(log64(c / 3))
13510 v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
13511 v0.AuxInt = int64ToAuxInt(1)
13512 v0.AddArg2(x, x)
13513 v.AddArg(v0)
13514 return true
13515 }
13516 break
13517 }
13518
13519
13520
13521 for {
13522 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
13523 x := v_0
13524 if v_1.Op != OpARM64MOVDconst {
13525 continue
13526 }
13527 c := auxIntToInt64(v_1.AuxInt)
13528 if !(c%5 == 0 && isPowerOfTwo(c/5)) {
13529 continue
13530 }
13531 v.reset(OpARM64SLLconst)
13532 v.AuxInt = int64ToAuxInt(log64(c / 5))
13533 v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
13534 v0.AuxInt = int64ToAuxInt(2)
13535 v0.AddArg2(x, x)
13536 v.AddArg(v0)
13537 return true
13538 }
13539 break
13540 }
13541
13542
13543
13544 for {
13545 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
13546 x := v_0
13547 if v_1.Op != OpARM64MOVDconst {
13548 continue
13549 }
13550 c := auxIntToInt64(v_1.AuxInt)
13551 if !(c%7 == 0 && isPowerOfTwo(c/7)) {
13552 continue
13553 }
13554 v.reset(OpARM64SLLconst)
13555 v.AuxInt = int64ToAuxInt(log64(c / 7))
13556 v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
13557 v0.AuxInt = int64ToAuxInt(3)
13558 v1 := b.NewValue0(v.Pos, OpARM64NEG, x.Type)
13559 v1.AddArg(x)
13560 v0.AddArg2(v1, x)
13561 v.AddArg(v0)
13562 return true
13563 }
13564 break
13565 }
13566
13567
13568
13569 for {
13570 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
13571 x := v_0
13572 if v_1.Op != OpARM64MOVDconst {
13573 continue
13574 }
13575 c := auxIntToInt64(v_1.AuxInt)
13576 if !(c%9 == 0 && isPowerOfTwo(c/9)) {
13577 continue
13578 }
13579 v.reset(OpARM64SLLconst)
13580 v.AuxInt = int64ToAuxInt(log64(c / 9))
13581 v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
13582 v0.AuxInt = int64ToAuxInt(3)
13583 v0.AddArg2(x, x)
13584 v.AddArg(v0)
13585 return true
13586 }
13587 break
13588 }
13589
13590
13591 for {
13592 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
13593 if v_0.Op != OpARM64MOVDconst {
13594 continue
13595 }
13596 c := auxIntToInt64(v_0.AuxInt)
13597 if v_1.Op != OpARM64MOVDconst {
13598 continue
13599 }
13600 d := auxIntToInt64(v_1.AuxInt)
13601 v.reset(OpARM64MOVDconst)
13602 v.AuxInt = int64ToAuxInt(c * d)
13603 return true
13604 }
13605 break
13606 }
13607 return false
13608 }
13609 func rewriteValueARM64_OpARM64MULW(v *Value) bool {
13610 v_1 := v.Args[1]
13611 v_0 := v.Args[0]
13612 b := v.Block
13613
13614
13615 for {
13616 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
13617 if v_0.Op != OpARM64NEG {
13618 continue
13619 }
13620 x := v_0.Args[0]
13621 y := v_1
13622 v.reset(OpARM64MNEGW)
13623 v.AddArg2(x, y)
13624 return true
13625 }
13626 break
13627 }
13628
13629
13630
13631 for {
13632 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
13633 x := v_0
13634 if v_1.Op != OpARM64MOVDconst {
13635 continue
13636 }
13637 c := auxIntToInt64(v_1.AuxInt)
13638 if !(int32(c) == -1) {
13639 continue
13640 }
13641 v.reset(OpARM64MOVWUreg)
13642 v0 := b.NewValue0(v.Pos, OpARM64NEG, x.Type)
13643 v0.AddArg(x)
13644 v.AddArg(v0)
13645 return true
13646 }
13647 break
13648 }
13649
13650
13651
13652 for {
13653 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
13654 if v_1.Op != OpARM64MOVDconst {
13655 continue
13656 }
13657 c := auxIntToInt64(v_1.AuxInt)
13658 if !(int32(c) == 0) {
13659 continue
13660 }
13661 v.reset(OpARM64MOVDconst)
13662 v.AuxInt = int64ToAuxInt(0)
13663 return true
13664 }
13665 break
13666 }
13667
13668
13669
13670 for {
13671 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
13672 x := v_0
13673 if v_1.Op != OpARM64MOVDconst {
13674 continue
13675 }
13676 c := auxIntToInt64(v_1.AuxInt)
13677 if !(int32(c) == 1) {
13678 continue
13679 }
13680 v.reset(OpARM64MOVWUreg)
13681 v.AddArg(x)
13682 return true
13683 }
13684 break
13685 }
13686
13687
13688
13689 for {
13690 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
13691 x := v_0
13692 if v_1.Op != OpARM64MOVDconst {
13693 continue
13694 }
13695 c := auxIntToInt64(v_1.AuxInt)
13696 if !(isPowerOfTwo(c)) {
13697 continue
13698 }
13699 v.reset(OpARM64MOVWUreg)
13700 v0 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
13701 v0.AuxInt = int64ToAuxInt(log64(c))
13702 v0.AddArg(x)
13703 v.AddArg(v0)
13704 return true
13705 }
13706 break
13707 }
13708
13709
13710
13711 for {
13712 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
13713 x := v_0
13714 if v_1.Op != OpARM64MOVDconst {
13715 continue
13716 }
13717 c := auxIntToInt64(v_1.AuxInt)
13718 if !(isPowerOfTwo(c-1) && int32(c) >= 3) {
13719 continue
13720 }
13721 v.reset(OpARM64MOVWUreg)
13722 v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
13723 v0.AuxInt = int64ToAuxInt(log64(c - 1))
13724 v0.AddArg2(x, x)
13725 v.AddArg(v0)
13726 return true
13727 }
13728 break
13729 }
13730
13731
13732
13733 for {
13734 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
13735 x := v_0
13736 if v_1.Op != OpARM64MOVDconst {
13737 continue
13738 }
13739 c := auxIntToInt64(v_1.AuxInt)
13740 if !(isPowerOfTwo(c+1) && int32(c) >= 7) {
13741 continue
13742 }
13743 v.reset(OpARM64MOVWUreg)
13744 v0 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
13745 v0.AuxInt = int64ToAuxInt(log64(c + 1))
13746 v1 := b.NewValue0(v.Pos, OpARM64NEG, x.Type)
13747 v1.AddArg(x)
13748 v0.AddArg2(v1, x)
13749 v.AddArg(v0)
13750 return true
13751 }
13752 break
13753 }
13754
13755
13756
13757 for {
13758 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
13759 x := v_0
13760 if v_1.Op != OpARM64MOVDconst {
13761 continue
13762 }
13763 c := auxIntToInt64(v_1.AuxInt)
13764 if !(c%3 == 0 && isPowerOfTwo(c/3) && is32Bit(c)) {
13765 continue
13766 }
13767 v.reset(OpARM64MOVWUreg)
13768 v0 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
13769 v0.AuxInt = int64ToAuxInt(log64(c / 3))
13770 v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
13771 v1.AuxInt = int64ToAuxInt(1)
13772 v1.AddArg2(x, x)
13773 v0.AddArg(v1)
13774 v.AddArg(v0)
13775 return true
13776 }
13777 break
13778 }
13779
13780
13781
13782 for {
13783 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
13784 x := v_0
13785 if v_1.Op != OpARM64MOVDconst {
13786 continue
13787 }
13788 c := auxIntToInt64(v_1.AuxInt)
13789 if !(c%5 == 0 && isPowerOfTwo(c/5) && is32Bit(c)) {
13790 continue
13791 }
13792 v.reset(OpARM64MOVWUreg)
13793 v0 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
13794 v0.AuxInt = int64ToAuxInt(log64(c / 5))
13795 v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
13796 v1.AuxInt = int64ToAuxInt(2)
13797 v1.AddArg2(x, x)
13798 v0.AddArg(v1)
13799 v.AddArg(v0)
13800 return true
13801 }
13802 break
13803 }
13804
13805
13806
13807 for {
13808 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
13809 x := v_0
13810 if v_1.Op != OpARM64MOVDconst {
13811 continue
13812 }
13813 c := auxIntToInt64(v_1.AuxInt)
13814 if !(c%7 == 0 && isPowerOfTwo(c/7) && is32Bit(c)) {
13815 continue
13816 }
13817 v.reset(OpARM64MOVWUreg)
13818 v0 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
13819 v0.AuxInt = int64ToAuxInt(log64(c / 7))
13820 v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
13821 v1.AuxInt = int64ToAuxInt(3)
13822 v2 := b.NewValue0(v.Pos, OpARM64NEG, x.Type)
13823 v2.AddArg(x)
13824 v1.AddArg2(v2, x)
13825 v0.AddArg(v1)
13826 v.AddArg(v0)
13827 return true
13828 }
13829 break
13830 }
13831
13832
13833
13834 for {
13835 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
13836 x := v_0
13837 if v_1.Op != OpARM64MOVDconst {
13838 continue
13839 }
13840 c := auxIntToInt64(v_1.AuxInt)
13841 if !(c%9 == 0 && isPowerOfTwo(c/9) && is32Bit(c)) {
13842 continue
13843 }
13844 v.reset(OpARM64MOVWUreg)
13845 v0 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
13846 v0.AuxInt = int64ToAuxInt(log64(c / 9))
13847 v1 := b.NewValue0(v.Pos, OpARM64ADDshiftLL, x.Type)
13848 v1.AuxInt = int64ToAuxInt(3)
13849 v1.AddArg2(x, x)
13850 v0.AddArg(v1)
13851 v.AddArg(v0)
13852 return true
13853 }
13854 break
13855 }
13856
13857
13858 for {
13859 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
13860 if v_0.Op != OpARM64MOVDconst {
13861 continue
13862 }
13863 c := auxIntToInt64(v_0.AuxInt)
13864 if v_1.Op != OpARM64MOVDconst {
13865 continue
13866 }
13867 d := auxIntToInt64(v_1.AuxInt)
13868 v.reset(OpARM64MOVDconst)
13869 v.AuxInt = int64ToAuxInt(int64(uint32(c * d)))
13870 return true
13871 }
13872 break
13873 }
13874 return false
13875 }
13876 func rewriteValueARM64_OpARM64MVN(v *Value) bool {
13877 v_0 := v.Args[0]
13878
13879
13880 for {
13881 if v_0.Op != OpARM64XOR {
13882 break
13883 }
13884 y := v_0.Args[1]
13885 x := v_0.Args[0]
13886 v.reset(OpARM64EON)
13887 v.AddArg2(x, y)
13888 return true
13889 }
13890
13891
13892 for {
13893 if v_0.Op != OpARM64MOVDconst {
13894 break
13895 }
13896 c := auxIntToInt64(v_0.AuxInt)
13897 v.reset(OpARM64MOVDconst)
13898 v.AuxInt = int64ToAuxInt(^c)
13899 return true
13900 }
13901
13902
13903
13904 for {
13905 x := v_0
13906 if x.Op != OpARM64SLLconst {
13907 break
13908 }
13909 c := auxIntToInt64(x.AuxInt)
13910 y := x.Args[0]
13911 if !(clobberIfDead(x)) {
13912 break
13913 }
13914 v.reset(OpARM64MVNshiftLL)
13915 v.AuxInt = int64ToAuxInt(c)
13916 v.AddArg(y)
13917 return true
13918 }
13919
13920
13921
13922 for {
13923 x := v_0
13924 if x.Op != OpARM64SRLconst {
13925 break
13926 }
13927 c := auxIntToInt64(x.AuxInt)
13928 y := x.Args[0]
13929 if !(clobberIfDead(x)) {
13930 break
13931 }
13932 v.reset(OpARM64MVNshiftRL)
13933 v.AuxInt = int64ToAuxInt(c)
13934 v.AddArg(y)
13935 return true
13936 }
13937
13938
13939
13940 for {
13941 x := v_0
13942 if x.Op != OpARM64SRAconst {
13943 break
13944 }
13945 c := auxIntToInt64(x.AuxInt)
13946 y := x.Args[0]
13947 if !(clobberIfDead(x)) {
13948 break
13949 }
13950 v.reset(OpARM64MVNshiftRA)
13951 v.AuxInt = int64ToAuxInt(c)
13952 v.AddArg(y)
13953 return true
13954 }
13955
13956
13957
13958 for {
13959 x := v_0
13960 if x.Op != OpARM64RORconst {
13961 break
13962 }
13963 c := auxIntToInt64(x.AuxInt)
13964 y := x.Args[0]
13965 if !(clobberIfDead(x)) {
13966 break
13967 }
13968 v.reset(OpARM64MVNshiftRO)
13969 v.AuxInt = int64ToAuxInt(c)
13970 v.AddArg(y)
13971 return true
13972 }
13973 return false
13974 }
13975 func rewriteValueARM64_OpARM64MVNshiftLL(v *Value) bool {
13976 v_0 := v.Args[0]
13977
13978
13979 for {
13980 d := auxIntToInt64(v.AuxInt)
13981 if v_0.Op != OpARM64MOVDconst {
13982 break
13983 }
13984 c := auxIntToInt64(v_0.AuxInt)
13985 v.reset(OpARM64MOVDconst)
13986 v.AuxInt = int64ToAuxInt(^int64(uint64(c) << uint64(d)))
13987 return true
13988 }
13989 return false
13990 }
13991 func rewriteValueARM64_OpARM64MVNshiftRA(v *Value) bool {
13992 v_0 := v.Args[0]
13993
13994
13995 for {
13996 d := auxIntToInt64(v.AuxInt)
13997 if v_0.Op != OpARM64MOVDconst {
13998 break
13999 }
14000 c := auxIntToInt64(v_0.AuxInt)
14001 v.reset(OpARM64MOVDconst)
14002 v.AuxInt = int64ToAuxInt(^(c >> uint64(d)))
14003 return true
14004 }
14005 return false
14006 }
14007 func rewriteValueARM64_OpARM64MVNshiftRL(v *Value) bool {
14008 v_0 := v.Args[0]
14009
14010
14011 for {
14012 d := auxIntToInt64(v.AuxInt)
14013 if v_0.Op != OpARM64MOVDconst {
14014 break
14015 }
14016 c := auxIntToInt64(v_0.AuxInt)
14017 v.reset(OpARM64MOVDconst)
14018 v.AuxInt = int64ToAuxInt(^int64(uint64(c) >> uint64(d)))
14019 return true
14020 }
14021 return false
14022 }
14023 func rewriteValueARM64_OpARM64MVNshiftRO(v *Value) bool {
14024 v_0 := v.Args[0]
14025
14026
14027 for {
14028 d := auxIntToInt64(v.AuxInt)
14029 if v_0.Op != OpARM64MOVDconst {
14030 break
14031 }
14032 c := auxIntToInt64(v_0.AuxInt)
14033 v.reset(OpARM64MOVDconst)
14034 v.AuxInt = int64ToAuxInt(^rotateRight64(c, d))
14035 return true
14036 }
14037 return false
14038 }
14039 func rewriteValueARM64_OpARM64NEG(v *Value) bool {
14040 v_0 := v.Args[0]
14041
14042
14043 for {
14044 if v_0.Op != OpARM64MUL {
14045 break
14046 }
14047 y := v_0.Args[1]
14048 x := v_0.Args[0]
14049 v.reset(OpARM64MNEG)
14050 v.AddArg2(x, y)
14051 return true
14052 }
14053
14054
14055
14056 for {
14057 if v_0.Op != OpARM64MULW {
14058 break
14059 }
14060 y := v_0.Args[1]
14061 x := v_0.Args[0]
14062 if !(v.Type.Size() <= 4) {
14063 break
14064 }
14065 v.reset(OpARM64MNEGW)
14066 v.AddArg2(x, y)
14067 return true
14068 }
14069
14070
14071 for {
14072 if v_0.Op != OpARM64NEG {
14073 break
14074 }
14075 x := v_0.Args[0]
14076 v.copyOf(x)
14077 return true
14078 }
14079
14080
14081 for {
14082 if v_0.Op != OpARM64MOVDconst {
14083 break
14084 }
14085 c := auxIntToInt64(v_0.AuxInt)
14086 v.reset(OpARM64MOVDconst)
14087 v.AuxInt = int64ToAuxInt(-c)
14088 return true
14089 }
14090
14091
14092
14093 for {
14094 x := v_0
14095 if x.Op != OpARM64SLLconst {
14096 break
14097 }
14098 c := auxIntToInt64(x.AuxInt)
14099 y := x.Args[0]
14100 if !(clobberIfDead(x)) {
14101 break
14102 }
14103 v.reset(OpARM64NEGshiftLL)
14104 v.AuxInt = int64ToAuxInt(c)
14105 v.AddArg(y)
14106 return true
14107 }
14108
14109
14110
14111 for {
14112 x := v_0
14113 if x.Op != OpARM64SRLconst {
14114 break
14115 }
14116 c := auxIntToInt64(x.AuxInt)
14117 y := x.Args[0]
14118 if !(clobberIfDead(x)) {
14119 break
14120 }
14121 v.reset(OpARM64NEGshiftRL)
14122 v.AuxInt = int64ToAuxInt(c)
14123 v.AddArg(y)
14124 return true
14125 }
14126
14127
14128
14129 for {
14130 x := v_0
14131 if x.Op != OpARM64SRAconst {
14132 break
14133 }
14134 c := auxIntToInt64(x.AuxInt)
14135 y := x.Args[0]
14136 if !(clobberIfDead(x)) {
14137 break
14138 }
14139 v.reset(OpARM64NEGshiftRA)
14140 v.AuxInt = int64ToAuxInt(c)
14141 v.AddArg(y)
14142 return true
14143 }
14144 return false
14145 }
14146 func rewriteValueARM64_OpARM64NEGshiftLL(v *Value) bool {
14147 v_0 := v.Args[0]
14148
14149
14150 for {
14151 d := auxIntToInt64(v.AuxInt)
14152 if v_0.Op != OpARM64MOVDconst {
14153 break
14154 }
14155 c := auxIntToInt64(v_0.AuxInt)
14156 v.reset(OpARM64MOVDconst)
14157 v.AuxInt = int64ToAuxInt(-int64(uint64(c) << uint64(d)))
14158 return true
14159 }
14160 return false
14161 }
14162 func rewriteValueARM64_OpARM64NEGshiftRA(v *Value) bool {
14163 v_0 := v.Args[0]
14164
14165
14166 for {
14167 d := auxIntToInt64(v.AuxInt)
14168 if v_0.Op != OpARM64MOVDconst {
14169 break
14170 }
14171 c := auxIntToInt64(v_0.AuxInt)
14172 v.reset(OpARM64MOVDconst)
14173 v.AuxInt = int64ToAuxInt(-(c >> uint64(d)))
14174 return true
14175 }
14176 return false
14177 }
14178 func rewriteValueARM64_OpARM64NEGshiftRL(v *Value) bool {
14179 v_0 := v.Args[0]
14180
14181
14182 for {
14183 d := auxIntToInt64(v.AuxInt)
14184 if v_0.Op != OpARM64MOVDconst {
14185 break
14186 }
14187 c := auxIntToInt64(v_0.AuxInt)
14188 v.reset(OpARM64MOVDconst)
14189 v.AuxInt = int64ToAuxInt(-int64(uint64(c) >> uint64(d)))
14190 return true
14191 }
14192 return false
14193 }
14194 func rewriteValueARM64_OpARM64NotEqual(v *Value) bool {
14195 v_0 := v.Args[0]
14196 b := v.Block
14197
14198
14199
14200 for {
14201 if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
14202 break
14203 }
14204 z := v_0.Args[0]
14205 if z.Op != OpARM64AND {
14206 break
14207 }
14208 y := z.Args[1]
14209 x := z.Args[0]
14210 if !(z.Uses == 1) {
14211 break
14212 }
14213 v.reset(OpARM64NotEqual)
14214 v0 := b.NewValue0(v.Pos, OpARM64TST, types.TypeFlags)
14215 v0.AddArg2(x, y)
14216 v.AddArg(v0)
14217 return true
14218 }
14219
14220
14221
14222 for {
14223 if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
14224 break
14225 }
14226 x := v_0.Args[0]
14227 if x.Op != OpARM64ANDconst {
14228 break
14229 }
14230 c := auxIntToInt64(x.AuxInt)
14231 y := x.Args[0]
14232 if !(x.Uses == 1) {
14233 break
14234 }
14235 v.reset(OpARM64NotEqual)
14236 v0 := b.NewValue0(v.Pos, OpARM64TSTWconst, types.TypeFlags)
14237 v0.AuxInt = int32ToAuxInt(int32(c))
14238 v0.AddArg(y)
14239 v.AddArg(v0)
14240 return true
14241 }
14242
14243
14244
14245 for {
14246 if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
14247 break
14248 }
14249 z := v_0.Args[0]
14250 if z.Op != OpARM64AND {
14251 break
14252 }
14253 y := z.Args[1]
14254 x := z.Args[0]
14255 if !(z.Uses == 1) {
14256 break
14257 }
14258 v.reset(OpARM64NotEqual)
14259 v0 := b.NewValue0(v.Pos, OpARM64TSTW, types.TypeFlags)
14260 v0.AddArg2(x, y)
14261 v.AddArg(v0)
14262 return true
14263 }
14264
14265
14266
14267 for {
14268 if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
14269 break
14270 }
14271 x := v_0.Args[0]
14272 if x.Op != OpARM64ANDconst {
14273 break
14274 }
14275 c := auxIntToInt64(x.AuxInt)
14276 y := x.Args[0]
14277 if !(x.Uses == 1) {
14278 break
14279 }
14280 v.reset(OpARM64NotEqual)
14281 v0 := b.NewValue0(v.Pos, OpARM64TSTconst, types.TypeFlags)
14282 v0.AuxInt = int64ToAuxInt(c)
14283 v0.AddArg(y)
14284 v.AddArg(v0)
14285 return true
14286 }
14287
14288
14289
14290 for {
14291 if v_0.Op != OpARM64CMP {
14292 break
14293 }
14294 _ = v_0.Args[1]
14295 x := v_0.Args[0]
14296 z := v_0.Args[1]
14297 if z.Op != OpARM64NEG {
14298 break
14299 }
14300 y := z.Args[0]
14301 if !(z.Uses == 1) {
14302 break
14303 }
14304 v.reset(OpARM64NotEqual)
14305 v0 := b.NewValue0(v.Pos, OpARM64CMN, types.TypeFlags)
14306 v0.AddArg2(x, y)
14307 v.AddArg(v0)
14308 return true
14309 }
14310
14311
14312
14313 for {
14314 if v_0.Op != OpARM64CMPW {
14315 break
14316 }
14317 _ = v_0.Args[1]
14318 x := v_0.Args[0]
14319 z := v_0.Args[1]
14320 if z.Op != OpARM64NEG {
14321 break
14322 }
14323 y := z.Args[0]
14324 if !(z.Uses == 1) {
14325 break
14326 }
14327 v.reset(OpARM64NotEqual)
14328 v0 := b.NewValue0(v.Pos, OpARM64CMNW, types.TypeFlags)
14329 v0.AddArg2(x, y)
14330 v.AddArg(v0)
14331 return true
14332 }
14333
14334
14335
14336 for {
14337 if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
14338 break
14339 }
14340 x := v_0.Args[0]
14341 if x.Op != OpARM64ADDconst {
14342 break
14343 }
14344 c := auxIntToInt64(x.AuxInt)
14345 y := x.Args[0]
14346 if !(x.Uses == 1) {
14347 break
14348 }
14349 v.reset(OpARM64NotEqual)
14350 v0 := b.NewValue0(v.Pos, OpARM64CMNconst, types.TypeFlags)
14351 v0.AuxInt = int64ToAuxInt(c)
14352 v0.AddArg(y)
14353 v.AddArg(v0)
14354 return true
14355 }
14356
14357
14358
14359 for {
14360 if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
14361 break
14362 }
14363 x := v_0.Args[0]
14364 if x.Op != OpARM64ADDconst {
14365 break
14366 }
14367 c := auxIntToInt64(x.AuxInt)
14368 y := x.Args[0]
14369 if !(x.Uses == 1) {
14370 break
14371 }
14372 v.reset(OpARM64NotEqual)
14373 v0 := b.NewValue0(v.Pos, OpARM64CMNWconst, types.TypeFlags)
14374 v0.AuxInt = int32ToAuxInt(int32(c))
14375 v0.AddArg(y)
14376 v.AddArg(v0)
14377 return true
14378 }
14379
14380
14381
14382 for {
14383 if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
14384 break
14385 }
14386 z := v_0.Args[0]
14387 if z.Op != OpARM64ADD {
14388 break
14389 }
14390 y := z.Args[1]
14391 x := z.Args[0]
14392 if !(z.Uses == 1) {
14393 break
14394 }
14395 v.reset(OpARM64NotEqual)
14396 v0 := b.NewValue0(v.Pos, OpARM64CMN, types.TypeFlags)
14397 v0.AddArg2(x, y)
14398 v.AddArg(v0)
14399 return true
14400 }
14401
14402
14403
14404 for {
14405 if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
14406 break
14407 }
14408 z := v_0.Args[0]
14409 if z.Op != OpARM64ADD {
14410 break
14411 }
14412 y := z.Args[1]
14413 x := z.Args[0]
14414 if !(z.Uses == 1) {
14415 break
14416 }
14417 v.reset(OpARM64NotEqual)
14418 v0 := b.NewValue0(v.Pos, OpARM64CMNW, types.TypeFlags)
14419 v0.AddArg2(x, y)
14420 v.AddArg(v0)
14421 return true
14422 }
14423
14424
14425
14426 for {
14427 if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
14428 break
14429 }
14430 z := v_0.Args[0]
14431 if z.Op != OpARM64MADD {
14432 break
14433 }
14434 y := z.Args[2]
14435 a := z.Args[0]
14436 x := z.Args[1]
14437 if !(z.Uses == 1) {
14438 break
14439 }
14440 v.reset(OpARM64NotEqual)
14441 v0 := b.NewValue0(v.Pos, OpARM64CMN, types.TypeFlags)
14442 v1 := b.NewValue0(v.Pos, OpARM64MUL, x.Type)
14443 v1.AddArg2(x, y)
14444 v0.AddArg2(a, v1)
14445 v.AddArg(v0)
14446 return true
14447 }
14448
14449
14450
14451 for {
14452 if v_0.Op != OpARM64CMPconst || auxIntToInt64(v_0.AuxInt) != 0 {
14453 break
14454 }
14455 z := v_0.Args[0]
14456 if z.Op != OpARM64MSUB {
14457 break
14458 }
14459 y := z.Args[2]
14460 a := z.Args[0]
14461 x := z.Args[1]
14462 if !(z.Uses == 1) {
14463 break
14464 }
14465 v.reset(OpARM64NotEqual)
14466 v0 := b.NewValue0(v.Pos, OpARM64CMP, types.TypeFlags)
14467 v1 := b.NewValue0(v.Pos, OpARM64MUL, x.Type)
14468 v1.AddArg2(x, y)
14469 v0.AddArg2(a, v1)
14470 v.AddArg(v0)
14471 return true
14472 }
14473
14474
14475
14476 for {
14477 if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
14478 break
14479 }
14480 z := v_0.Args[0]
14481 if z.Op != OpARM64MADDW {
14482 break
14483 }
14484 y := z.Args[2]
14485 a := z.Args[0]
14486 x := z.Args[1]
14487 if !(z.Uses == 1) {
14488 break
14489 }
14490 v.reset(OpARM64NotEqual)
14491 v0 := b.NewValue0(v.Pos, OpARM64CMNW, types.TypeFlags)
14492 v1 := b.NewValue0(v.Pos, OpARM64MULW, x.Type)
14493 v1.AddArg2(x, y)
14494 v0.AddArg2(a, v1)
14495 v.AddArg(v0)
14496 return true
14497 }
14498
14499
14500
14501 for {
14502 if v_0.Op != OpARM64CMPWconst || auxIntToInt32(v_0.AuxInt) != 0 {
14503 break
14504 }
14505 z := v_0.Args[0]
14506 if z.Op != OpARM64MSUBW {
14507 break
14508 }
14509 y := z.Args[2]
14510 a := z.Args[0]
14511 x := z.Args[1]
14512 if !(z.Uses == 1) {
14513 break
14514 }
14515 v.reset(OpARM64NotEqual)
14516 v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
14517 v1 := b.NewValue0(v.Pos, OpARM64MULW, x.Type)
14518 v1.AddArg2(x, y)
14519 v0.AddArg2(a, v1)
14520 v.AddArg(v0)
14521 return true
14522 }
14523
14524
14525 for {
14526 if v_0.Op != OpARM64FlagConstant {
14527 break
14528 }
14529 fc := auxIntToFlagConstant(v_0.AuxInt)
14530 v.reset(OpARM64MOVDconst)
14531 v.AuxInt = int64ToAuxInt(b2i(fc.ne()))
14532 return true
14533 }
14534
14535
14536 for {
14537 if v_0.Op != OpARM64InvertFlags {
14538 break
14539 }
14540 x := v_0.Args[0]
14541 v.reset(OpARM64NotEqual)
14542 v.AddArg(x)
14543 return true
14544 }
14545 return false
14546 }
14547 func rewriteValueARM64_OpARM64OR(v *Value) bool {
14548 v_1 := v.Args[1]
14549 v_0 := v.Args[0]
14550
14551
14552 for {
14553 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
14554 x := v_0
14555 if v_1.Op != OpARM64MOVDconst {
14556 continue
14557 }
14558 c := auxIntToInt64(v_1.AuxInt)
14559 v.reset(OpARM64ORconst)
14560 v.AuxInt = int64ToAuxInt(c)
14561 v.AddArg(x)
14562 return true
14563 }
14564 break
14565 }
14566
14567
14568 for {
14569 x := v_0
14570 if x != v_1 {
14571 break
14572 }
14573 v.copyOf(x)
14574 return true
14575 }
14576
14577
14578 for {
14579 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
14580 x := v_0
14581 if v_1.Op != OpARM64MVN {
14582 continue
14583 }
14584 y := v_1.Args[0]
14585 v.reset(OpARM64ORN)
14586 v.AddArg2(x, y)
14587 return true
14588 }
14589 break
14590 }
14591
14592
14593
14594 for {
14595 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
14596 x0 := v_0
14597 x1 := v_1
14598 if x1.Op != OpARM64SLLconst {
14599 continue
14600 }
14601 c := auxIntToInt64(x1.AuxInt)
14602 y := x1.Args[0]
14603 if !(clobberIfDead(x1)) {
14604 continue
14605 }
14606 v.reset(OpARM64ORshiftLL)
14607 v.AuxInt = int64ToAuxInt(c)
14608 v.AddArg2(x0, y)
14609 return true
14610 }
14611 break
14612 }
14613
14614
14615
14616 for {
14617 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
14618 x0 := v_0
14619 x1 := v_1
14620 if x1.Op != OpARM64SRLconst {
14621 continue
14622 }
14623 c := auxIntToInt64(x1.AuxInt)
14624 y := x1.Args[0]
14625 if !(clobberIfDead(x1)) {
14626 continue
14627 }
14628 v.reset(OpARM64ORshiftRL)
14629 v.AuxInt = int64ToAuxInt(c)
14630 v.AddArg2(x0, y)
14631 return true
14632 }
14633 break
14634 }
14635
14636
14637
14638 for {
14639 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
14640 x0 := v_0
14641 x1 := v_1
14642 if x1.Op != OpARM64SRAconst {
14643 continue
14644 }
14645 c := auxIntToInt64(x1.AuxInt)
14646 y := x1.Args[0]
14647 if !(clobberIfDead(x1)) {
14648 continue
14649 }
14650 v.reset(OpARM64ORshiftRA)
14651 v.AuxInt = int64ToAuxInt(c)
14652 v.AddArg2(x0, y)
14653 return true
14654 }
14655 break
14656 }
14657
14658
14659
14660 for {
14661 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
14662 x0 := v_0
14663 x1 := v_1
14664 if x1.Op != OpARM64RORconst {
14665 continue
14666 }
14667 c := auxIntToInt64(x1.AuxInt)
14668 y := x1.Args[0]
14669 if !(clobberIfDead(x1)) {
14670 continue
14671 }
14672 v.reset(OpARM64ORshiftRO)
14673 v.AuxInt = int64ToAuxInt(c)
14674 v.AddArg2(x0, y)
14675 return true
14676 }
14677 break
14678 }
14679
14680
14681
14682 for {
14683 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
14684 if v_0.Op != OpARM64UBFIZ {
14685 continue
14686 }
14687 bfc := auxIntToArm64BitField(v_0.AuxInt)
14688 x := v_0.Args[0]
14689 if v_1.Op != OpARM64ANDconst {
14690 continue
14691 }
14692 ac := auxIntToInt64(v_1.AuxInt)
14693 y := v_1.Args[0]
14694 if !(ac == ^((1<<uint(bfc.width()) - 1) << uint(bfc.lsb()))) {
14695 continue
14696 }
14697 v.reset(OpARM64BFI)
14698 v.AuxInt = arm64BitFieldToAuxInt(bfc)
14699 v.AddArg2(y, x)
14700 return true
14701 }
14702 break
14703 }
14704
14705
14706
14707 for {
14708 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
14709 if v_0.Op != OpARM64UBFX {
14710 continue
14711 }
14712 bfc := auxIntToArm64BitField(v_0.AuxInt)
14713 x := v_0.Args[0]
14714 if v_1.Op != OpARM64ANDconst {
14715 continue
14716 }
14717 ac := auxIntToInt64(v_1.AuxInt)
14718 y := v_1.Args[0]
14719 if !(ac == ^(1<<uint(bfc.width()) - 1)) {
14720 continue
14721 }
14722 v.reset(OpARM64BFXIL)
14723 v.AuxInt = arm64BitFieldToAuxInt(bfc)
14724 v.AddArg2(y, x)
14725 return true
14726 }
14727 break
14728 }
14729 return false
14730 }
14731 func rewriteValueARM64_OpARM64ORN(v *Value) bool {
14732 v_1 := v.Args[1]
14733 v_0 := v.Args[0]
14734
14735
14736 for {
14737 x := v_0
14738 if v_1.Op != OpARM64MOVDconst {
14739 break
14740 }
14741 c := auxIntToInt64(v_1.AuxInt)
14742 v.reset(OpARM64ORconst)
14743 v.AuxInt = int64ToAuxInt(^c)
14744 v.AddArg(x)
14745 return true
14746 }
14747
14748
14749 for {
14750 x := v_0
14751 if x != v_1 {
14752 break
14753 }
14754 v.reset(OpARM64MOVDconst)
14755 v.AuxInt = int64ToAuxInt(-1)
14756 return true
14757 }
14758
14759
14760
14761 for {
14762 x0 := v_0
14763 x1 := v_1
14764 if x1.Op != OpARM64SLLconst {
14765 break
14766 }
14767 c := auxIntToInt64(x1.AuxInt)
14768 y := x1.Args[0]
14769 if !(clobberIfDead(x1)) {
14770 break
14771 }
14772 v.reset(OpARM64ORNshiftLL)
14773 v.AuxInt = int64ToAuxInt(c)
14774 v.AddArg2(x0, y)
14775 return true
14776 }
14777
14778
14779
14780 for {
14781 x0 := v_0
14782 x1 := v_1
14783 if x1.Op != OpARM64SRLconst {
14784 break
14785 }
14786 c := auxIntToInt64(x1.AuxInt)
14787 y := x1.Args[0]
14788 if !(clobberIfDead(x1)) {
14789 break
14790 }
14791 v.reset(OpARM64ORNshiftRL)
14792 v.AuxInt = int64ToAuxInt(c)
14793 v.AddArg2(x0, y)
14794 return true
14795 }
14796
14797
14798
14799 for {
14800 x0 := v_0
14801 x1 := v_1
14802 if x1.Op != OpARM64SRAconst {
14803 break
14804 }
14805 c := auxIntToInt64(x1.AuxInt)
14806 y := x1.Args[0]
14807 if !(clobberIfDead(x1)) {
14808 break
14809 }
14810 v.reset(OpARM64ORNshiftRA)
14811 v.AuxInt = int64ToAuxInt(c)
14812 v.AddArg2(x0, y)
14813 return true
14814 }
14815
14816
14817
14818 for {
14819 x0 := v_0
14820 x1 := v_1
14821 if x1.Op != OpARM64RORconst {
14822 break
14823 }
14824 c := auxIntToInt64(x1.AuxInt)
14825 y := x1.Args[0]
14826 if !(clobberIfDead(x1)) {
14827 break
14828 }
14829 v.reset(OpARM64ORNshiftRO)
14830 v.AuxInt = int64ToAuxInt(c)
14831 v.AddArg2(x0, y)
14832 return true
14833 }
14834 return false
14835 }
14836 func rewriteValueARM64_OpARM64ORNshiftLL(v *Value) bool {
14837 v_1 := v.Args[1]
14838 v_0 := v.Args[0]
14839
14840
14841 for {
14842 d := auxIntToInt64(v.AuxInt)
14843 x := v_0
14844 if v_1.Op != OpARM64MOVDconst {
14845 break
14846 }
14847 c := auxIntToInt64(v_1.AuxInt)
14848 v.reset(OpARM64ORconst)
14849 v.AuxInt = int64ToAuxInt(^int64(uint64(c) << uint64(d)))
14850 v.AddArg(x)
14851 return true
14852 }
14853
14854
14855 for {
14856 c := auxIntToInt64(v.AuxInt)
14857 if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != c {
14858 break
14859 }
14860 x := v_0.Args[0]
14861 if x != v_1 {
14862 break
14863 }
14864 v.reset(OpARM64MOVDconst)
14865 v.AuxInt = int64ToAuxInt(-1)
14866 return true
14867 }
14868 return false
14869 }
14870 func rewriteValueARM64_OpARM64ORNshiftRA(v *Value) bool {
14871 v_1 := v.Args[1]
14872 v_0 := v.Args[0]
14873
14874
14875 for {
14876 d := auxIntToInt64(v.AuxInt)
14877 x := v_0
14878 if v_1.Op != OpARM64MOVDconst {
14879 break
14880 }
14881 c := auxIntToInt64(v_1.AuxInt)
14882 v.reset(OpARM64ORconst)
14883 v.AuxInt = int64ToAuxInt(^(c >> uint64(d)))
14884 v.AddArg(x)
14885 return true
14886 }
14887
14888
14889 for {
14890 c := auxIntToInt64(v.AuxInt)
14891 if v_0.Op != OpARM64SRAconst || auxIntToInt64(v_0.AuxInt) != c {
14892 break
14893 }
14894 x := v_0.Args[0]
14895 if x != v_1 {
14896 break
14897 }
14898 v.reset(OpARM64MOVDconst)
14899 v.AuxInt = int64ToAuxInt(-1)
14900 return true
14901 }
14902 return false
14903 }
14904 func rewriteValueARM64_OpARM64ORNshiftRL(v *Value) bool {
14905 v_1 := v.Args[1]
14906 v_0 := v.Args[0]
14907
14908
14909 for {
14910 d := auxIntToInt64(v.AuxInt)
14911 x := v_0
14912 if v_1.Op != OpARM64MOVDconst {
14913 break
14914 }
14915 c := auxIntToInt64(v_1.AuxInt)
14916 v.reset(OpARM64ORconst)
14917 v.AuxInt = int64ToAuxInt(^int64(uint64(c) >> uint64(d)))
14918 v.AddArg(x)
14919 return true
14920 }
14921
14922
14923 for {
14924 c := auxIntToInt64(v.AuxInt)
14925 if v_0.Op != OpARM64SRLconst || auxIntToInt64(v_0.AuxInt) != c {
14926 break
14927 }
14928 x := v_0.Args[0]
14929 if x != v_1 {
14930 break
14931 }
14932 v.reset(OpARM64MOVDconst)
14933 v.AuxInt = int64ToAuxInt(-1)
14934 return true
14935 }
14936 return false
14937 }
14938 func rewriteValueARM64_OpARM64ORNshiftRO(v *Value) bool {
14939 v_1 := v.Args[1]
14940 v_0 := v.Args[0]
14941
14942
14943 for {
14944 d := auxIntToInt64(v.AuxInt)
14945 x := v_0
14946 if v_1.Op != OpARM64MOVDconst {
14947 break
14948 }
14949 c := auxIntToInt64(v_1.AuxInt)
14950 v.reset(OpARM64ORconst)
14951 v.AuxInt = int64ToAuxInt(^rotateRight64(c, d))
14952 v.AddArg(x)
14953 return true
14954 }
14955
14956
14957 for {
14958 c := auxIntToInt64(v.AuxInt)
14959 if v_0.Op != OpARM64RORconst || auxIntToInt64(v_0.AuxInt) != c {
14960 break
14961 }
14962 x := v_0.Args[0]
14963 if x != v_1 {
14964 break
14965 }
14966 v.reset(OpARM64MOVDconst)
14967 v.AuxInt = int64ToAuxInt(-1)
14968 return true
14969 }
14970 return false
14971 }
14972 func rewriteValueARM64_OpARM64ORconst(v *Value) bool {
14973 v_0 := v.Args[0]
14974
14975
14976 for {
14977 if auxIntToInt64(v.AuxInt) != 0 {
14978 break
14979 }
14980 x := v_0
14981 v.copyOf(x)
14982 return true
14983 }
14984
14985
14986 for {
14987 if auxIntToInt64(v.AuxInt) != -1 {
14988 break
14989 }
14990 v.reset(OpARM64MOVDconst)
14991 v.AuxInt = int64ToAuxInt(-1)
14992 return true
14993 }
14994
14995
14996 for {
14997 c := auxIntToInt64(v.AuxInt)
14998 if v_0.Op != OpARM64MOVDconst {
14999 break
15000 }
15001 d := auxIntToInt64(v_0.AuxInt)
15002 v.reset(OpARM64MOVDconst)
15003 v.AuxInt = int64ToAuxInt(c | d)
15004 return true
15005 }
15006
15007
15008 for {
15009 c := auxIntToInt64(v.AuxInt)
15010 if v_0.Op != OpARM64ORconst {
15011 break
15012 }
15013 d := auxIntToInt64(v_0.AuxInt)
15014 x := v_0.Args[0]
15015 v.reset(OpARM64ORconst)
15016 v.AuxInt = int64ToAuxInt(c | d)
15017 v.AddArg(x)
15018 return true
15019 }
15020
15021
15022
15023 for {
15024 c1 := auxIntToInt64(v.AuxInt)
15025 if v_0.Op != OpARM64ANDconst {
15026 break
15027 }
15028 c2 := auxIntToInt64(v_0.AuxInt)
15029 x := v_0.Args[0]
15030 if !(c2|c1 == ^0) {
15031 break
15032 }
15033 v.reset(OpARM64ORconst)
15034 v.AuxInt = int64ToAuxInt(c1)
15035 v.AddArg(x)
15036 return true
15037 }
15038 return false
15039 }
15040 func rewriteValueARM64_OpARM64ORshiftLL(v *Value) bool {
15041 v_1 := v.Args[1]
15042 v_0 := v.Args[0]
15043 b := v.Block
15044 typ := &b.Func.Config.Types
15045
15046
15047 for {
15048 d := auxIntToInt64(v.AuxInt)
15049 if v_0.Op != OpARM64MOVDconst {
15050 break
15051 }
15052 c := auxIntToInt64(v_0.AuxInt)
15053 x := v_1
15054 v.reset(OpARM64ORconst)
15055 v.AuxInt = int64ToAuxInt(c)
15056 v0 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
15057 v0.AuxInt = int64ToAuxInt(d)
15058 v0.AddArg(x)
15059 v.AddArg(v0)
15060 return true
15061 }
15062
15063
15064 for {
15065 d := auxIntToInt64(v.AuxInt)
15066 x := v_0
15067 if v_1.Op != OpARM64MOVDconst {
15068 break
15069 }
15070 c := auxIntToInt64(v_1.AuxInt)
15071 v.reset(OpARM64ORconst)
15072 v.AuxInt = int64ToAuxInt(int64(uint64(c) << uint64(d)))
15073 v.AddArg(x)
15074 return true
15075 }
15076
15077
15078 for {
15079 c := auxIntToInt64(v.AuxInt)
15080 y := v_0
15081 if y.Op != OpARM64SLLconst || auxIntToInt64(y.AuxInt) != c {
15082 break
15083 }
15084 x := y.Args[0]
15085 if x != v_1 {
15086 break
15087 }
15088 v.copyOf(y)
15089 return true
15090 }
15091
15092
15093 for {
15094 if v.Type != typ.UInt16 || auxIntToInt64(v.AuxInt) != 8 || v_0.Op != OpARM64UBFX || v_0.Type != typ.UInt16 || auxIntToArm64BitField(v_0.AuxInt) != armBFAuxInt(8, 8) {
15095 break
15096 }
15097 x := v_0.Args[0]
15098 if x != v_1 {
15099 break
15100 }
15101 v.reset(OpARM64REV16W)
15102 v.AddArg(x)
15103 return true
15104 }
15105
15106
15107
15108 for {
15109 if auxIntToInt64(v.AuxInt) != 8 || v_0.Op != OpARM64UBFX || auxIntToArm64BitField(v_0.AuxInt) != armBFAuxInt(8, 24) {
15110 break
15111 }
15112 v_0_0 := v_0.Args[0]
15113 if v_0_0.Op != OpARM64ANDconst {
15114 break
15115 }
15116 c1 := auxIntToInt64(v_0_0.AuxInt)
15117 x := v_0_0.Args[0]
15118 if v_1.Op != OpARM64ANDconst {
15119 break
15120 }
15121 c2 := auxIntToInt64(v_1.AuxInt)
15122 if x != v_1.Args[0] || !(uint32(c1) == 0xff00ff00 && uint32(c2) == 0x00ff00ff) {
15123 break
15124 }
15125 v.reset(OpARM64REV16W)
15126 v.AddArg(x)
15127 return true
15128 }
15129
15130
15131
15132 for {
15133 if auxIntToInt64(v.AuxInt) != 8 || v_0.Op != OpARM64SRLconst || auxIntToInt64(v_0.AuxInt) != 8 {
15134 break
15135 }
15136 v_0_0 := v_0.Args[0]
15137 if v_0_0.Op != OpARM64ANDconst {
15138 break
15139 }
15140 c1 := auxIntToInt64(v_0_0.AuxInt)
15141 x := v_0_0.Args[0]
15142 if v_1.Op != OpARM64ANDconst {
15143 break
15144 }
15145 c2 := auxIntToInt64(v_1.AuxInt)
15146 if x != v_1.Args[0] || !(uint64(c1) == 0xff00ff00ff00ff00 && uint64(c2) == 0x00ff00ff00ff00ff) {
15147 break
15148 }
15149 v.reset(OpARM64REV16)
15150 v.AddArg(x)
15151 return true
15152 }
15153
15154
15155
15156 for {
15157 if auxIntToInt64(v.AuxInt) != 8 || v_0.Op != OpARM64SRLconst || auxIntToInt64(v_0.AuxInt) != 8 {
15158 break
15159 }
15160 v_0_0 := v_0.Args[0]
15161 if v_0_0.Op != OpARM64ANDconst {
15162 break
15163 }
15164 c1 := auxIntToInt64(v_0_0.AuxInt)
15165 x := v_0_0.Args[0]
15166 if v_1.Op != OpARM64ANDconst {
15167 break
15168 }
15169 c2 := auxIntToInt64(v_1.AuxInt)
15170 if x != v_1.Args[0] || !(uint64(c1) == 0xff00ff00 && uint64(c2) == 0x00ff00ff) {
15171 break
15172 }
15173 v.reset(OpARM64REV16)
15174 v0 := b.NewValue0(v.Pos, OpARM64ANDconst, x.Type)
15175 v0.AuxInt = int64ToAuxInt(0xffffffff)
15176 v0.AddArg(x)
15177 v.AddArg(v0)
15178 return true
15179 }
15180
15181
15182 for {
15183 c := auxIntToInt64(v.AuxInt)
15184 if v_0.Op != OpARM64SRLconst || auxIntToInt64(v_0.AuxInt) != 64-c {
15185 break
15186 }
15187 x := v_0.Args[0]
15188 x2 := v_1
15189 v.reset(OpARM64EXTRconst)
15190 v.AuxInt = int64ToAuxInt(64 - c)
15191 v.AddArg2(x2, x)
15192 return true
15193 }
15194
15195
15196
15197 for {
15198 t := v.Type
15199 c := auxIntToInt64(v.AuxInt)
15200 if v_0.Op != OpARM64UBFX {
15201 break
15202 }
15203 bfc := auxIntToArm64BitField(v_0.AuxInt)
15204 x := v_0.Args[0]
15205 x2 := v_1
15206 if !(c < 32 && t.Size() == 4 && bfc == armBFAuxInt(32-c, c)) {
15207 break
15208 }
15209 v.reset(OpARM64EXTRWconst)
15210 v.AuxInt = int64ToAuxInt(32 - c)
15211 v.AddArg2(x2, x)
15212 return true
15213 }
15214
15215
15216
15217 for {
15218 s := auxIntToInt64(v.AuxInt)
15219 if v_0.Op != OpARM64ANDconst {
15220 break
15221 }
15222 xc := auxIntToInt64(v_0.AuxInt)
15223 x := v_0.Args[0]
15224 if v_1.Op != OpARM64ANDconst {
15225 break
15226 }
15227 yc := auxIntToInt64(v_1.AuxInt)
15228 y := v_1.Args[0]
15229 if !(xc == ^(yc<<s) && yc&(yc+1) == 0 && yc > 0 && s+log64(yc+1) <= 64) {
15230 break
15231 }
15232 v.reset(OpARM64BFI)
15233 v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(s, log64(yc+1)))
15234 v.AddArg2(x, y)
15235 return true
15236 }
15237
15238
15239
15240 for {
15241 sc := auxIntToInt64(v.AuxInt)
15242 if v_0.Op != OpARM64UBFX {
15243 break
15244 }
15245 bfc := auxIntToArm64BitField(v_0.AuxInt)
15246 x := v_0.Args[0]
15247 if v_1.Op != OpARM64SRLconst || auxIntToInt64(v_1.AuxInt) != sc {
15248 break
15249 }
15250 y := v_1.Args[0]
15251 if !(sc == bfc.width()) {
15252 break
15253 }
15254 v.reset(OpARM64BFXIL)
15255 v.AuxInt = arm64BitFieldToAuxInt(bfc)
15256 v.AddArg2(y, x)
15257 return true
15258 }
15259 return false
15260 }
15261 func rewriteValueARM64_OpARM64ORshiftRA(v *Value) bool {
15262 v_1 := v.Args[1]
15263 v_0 := v.Args[0]
15264 b := v.Block
15265
15266
15267 for {
15268 d := auxIntToInt64(v.AuxInt)
15269 if v_0.Op != OpARM64MOVDconst {
15270 break
15271 }
15272 c := auxIntToInt64(v_0.AuxInt)
15273 x := v_1
15274 v.reset(OpARM64ORconst)
15275 v.AuxInt = int64ToAuxInt(c)
15276 v0 := b.NewValue0(v.Pos, OpARM64SRAconst, x.Type)
15277 v0.AuxInt = int64ToAuxInt(d)
15278 v0.AddArg(x)
15279 v.AddArg(v0)
15280 return true
15281 }
15282
15283
15284 for {
15285 d := auxIntToInt64(v.AuxInt)
15286 x := v_0
15287 if v_1.Op != OpARM64MOVDconst {
15288 break
15289 }
15290 c := auxIntToInt64(v_1.AuxInt)
15291 v.reset(OpARM64ORconst)
15292 v.AuxInt = int64ToAuxInt(c >> uint64(d))
15293 v.AddArg(x)
15294 return true
15295 }
15296
15297
15298 for {
15299 c := auxIntToInt64(v.AuxInt)
15300 y := v_0
15301 if y.Op != OpARM64SRAconst || auxIntToInt64(y.AuxInt) != c {
15302 break
15303 }
15304 x := y.Args[0]
15305 if x != v_1 {
15306 break
15307 }
15308 v.copyOf(y)
15309 return true
15310 }
15311 return false
15312 }
15313 func rewriteValueARM64_OpARM64ORshiftRL(v *Value) bool {
15314 v_1 := v.Args[1]
15315 v_0 := v.Args[0]
15316 b := v.Block
15317
15318
15319 for {
15320 d := auxIntToInt64(v.AuxInt)
15321 if v_0.Op != OpARM64MOVDconst {
15322 break
15323 }
15324 c := auxIntToInt64(v_0.AuxInt)
15325 x := v_1
15326 v.reset(OpARM64ORconst)
15327 v.AuxInt = int64ToAuxInt(c)
15328 v0 := b.NewValue0(v.Pos, OpARM64SRLconst, x.Type)
15329 v0.AuxInt = int64ToAuxInt(d)
15330 v0.AddArg(x)
15331 v.AddArg(v0)
15332 return true
15333 }
15334
15335
15336 for {
15337 d := auxIntToInt64(v.AuxInt)
15338 x := v_0
15339 if v_1.Op != OpARM64MOVDconst {
15340 break
15341 }
15342 c := auxIntToInt64(v_1.AuxInt)
15343 v.reset(OpARM64ORconst)
15344 v.AuxInt = int64ToAuxInt(int64(uint64(c) >> uint64(d)))
15345 v.AddArg(x)
15346 return true
15347 }
15348
15349
15350 for {
15351 c := auxIntToInt64(v.AuxInt)
15352 y := v_0
15353 if y.Op != OpARM64SRLconst || auxIntToInt64(y.AuxInt) != c {
15354 break
15355 }
15356 x := y.Args[0]
15357 if x != v_1 {
15358 break
15359 }
15360 v.copyOf(y)
15361 return true
15362 }
15363
15364
15365
15366 for {
15367 rc := auxIntToInt64(v.AuxInt)
15368 if v_0.Op != OpARM64ANDconst {
15369 break
15370 }
15371 ac := auxIntToInt64(v_0.AuxInt)
15372 x := v_0.Args[0]
15373 if v_1.Op != OpARM64SLLconst {
15374 break
15375 }
15376 lc := auxIntToInt64(v_1.AuxInt)
15377 y := v_1.Args[0]
15378 if !(lc > rc && ac == ^((1<<uint(64-lc)-1)<<uint64(lc-rc))) {
15379 break
15380 }
15381 v.reset(OpARM64BFI)
15382 v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(lc-rc, 64-lc))
15383 v.AddArg2(x, y)
15384 return true
15385 }
15386
15387
15388
15389 for {
15390 rc := auxIntToInt64(v.AuxInt)
15391 if v_0.Op != OpARM64ANDconst {
15392 break
15393 }
15394 ac := auxIntToInt64(v_0.AuxInt)
15395 y := v_0.Args[0]
15396 if v_1.Op != OpARM64SLLconst {
15397 break
15398 }
15399 lc := auxIntToInt64(v_1.AuxInt)
15400 x := v_1.Args[0]
15401 if !(lc < rc && ac == ^(1<<uint(64-rc)-1)) {
15402 break
15403 }
15404 v.reset(OpARM64BFXIL)
15405 v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(rc-lc, 64-rc))
15406 v.AddArg2(y, x)
15407 return true
15408 }
15409 return false
15410 }
15411 func rewriteValueARM64_OpARM64ORshiftRO(v *Value) bool {
15412 v_1 := v.Args[1]
15413 v_0 := v.Args[0]
15414 b := v.Block
15415
15416
15417 for {
15418 d := auxIntToInt64(v.AuxInt)
15419 if v_0.Op != OpARM64MOVDconst {
15420 break
15421 }
15422 c := auxIntToInt64(v_0.AuxInt)
15423 x := v_1
15424 v.reset(OpARM64ORconst)
15425 v.AuxInt = int64ToAuxInt(c)
15426 v0 := b.NewValue0(v.Pos, OpARM64RORconst, x.Type)
15427 v0.AuxInt = int64ToAuxInt(d)
15428 v0.AddArg(x)
15429 v.AddArg(v0)
15430 return true
15431 }
15432
15433
15434 for {
15435 d := auxIntToInt64(v.AuxInt)
15436 x := v_0
15437 if v_1.Op != OpARM64MOVDconst {
15438 break
15439 }
15440 c := auxIntToInt64(v_1.AuxInt)
15441 v.reset(OpARM64ORconst)
15442 v.AuxInt = int64ToAuxInt(rotateRight64(c, d))
15443 v.AddArg(x)
15444 return true
15445 }
15446
15447
15448 for {
15449 c := auxIntToInt64(v.AuxInt)
15450 y := v_0
15451 if y.Op != OpARM64RORconst || auxIntToInt64(y.AuxInt) != c {
15452 break
15453 }
15454 x := y.Args[0]
15455 if x != v_1 {
15456 break
15457 }
15458 v.copyOf(y)
15459 return true
15460 }
15461 return false
15462 }
15463 func rewriteValueARM64_OpARM64REV(v *Value) bool {
15464 v_0 := v.Args[0]
15465
15466
15467 for {
15468 if v_0.Op != OpARM64REV {
15469 break
15470 }
15471 p := v_0.Args[0]
15472 v.copyOf(p)
15473 return true
15474 }
15475 return false
15476 }
15477 func rewriteValueARM64_OpARM64REVW(v *Value) bool {
15478 v_0 := v.Args[0]
15479
15480
15481 for {
15482 if v_0.Op != OpARM64REVW {
15483 break
15484 }
15485 p := v_0.Args[0]
15486 v.copyOf(p)
15487 return true
15488 }
15489 return false
15490 }
15491 func rewriteValueARM64_OpARM64ROR(v *Value) bool {
15492 v_1 := v.Args[1]
15493 v_0 := v.Args[0]
15494
15495
15496 for {
15497 x := v_0
15498 if v_1.Op != OpARM64MOVDconst {
15499 break
15500 }
15501 c := auxIntToInt64(v_1.AuxInt)
15502 v.reset(OpARM64RORconst)
15503 v.AuxInt = int64ToAuxInt(c & 63)
15504 v.AddArg(x)
15505 return true
15506 }
15507 return false
15508 }
15509 func rewriteValueARM64_OpARM64RORW(v *Value) bool {
15510 v_1 := v.Args[1]
15511 v_0 := v.Args[0]
15512
15513
15514 for {
15515 x := v_0
15516 if v_1.Op != OpARM64MOVDconst {
15517 break
15518 }
15519 c := auxIntToInt64(v_1.AuxInt)
15520 v.reset(OpARM64RORWconst)
15521 v.AuxInt = int64ToAuxInt(c & 31)
15522 v.AddArg(x)
15523 return true
15524 }
15525 return false
15526 }
15527 func rewriteValueARM64_OpARM64SBCSflags(v *Value) bool {
15528 v_2 := v.Args[2]
15529 v_1 := v.Args[1]
15530 v_0 := v.Args[0]
15531 b := v.Block
15532 typ := &b.Func.Config.Types
15533
15534
15535 for {
15536 x := v_0
15537 y := v_1
15538 if v_2.Op != OpSelect1 || v_2.Type != types.TypeFlags {
15539 break
15540 }
15541 v_2_0 := v_2.Args[0]
15542 if v_2_0.Op != OpARM64NEGSflags {
15543 break
15544 }
15545 v_2_0_0 := v_2_0.Args[0]
15546 if v_2_0_0.Op != OpARM64NEG || v_2_0_0.Type != typ.UInt64 {
15547 break
15548 }
15549 v_2_0_0_0 := v_2_0_0.Args[0]
15550 if v_2_0_0_0.Op != OpARM64NGCzerocarry || v_2_0_0_0.Type != typ.UInt64 {
15551 break
15552 }
15553 bo := v_2_0_0_0.Args[0]
15554 v.reset(OpARM64SBCSflags)
15555 v.AddArg3(x, y, bo)
15556 return true
15557 }
15558
15559
15560 for {
15561 x := v_0
15562 y := v_1
15563 if v_2.Op != OpSelect1 || v_2.Type != types.TypeFlags {
15564 break
15565 }
15566 v_2_0 := v_2.Args[0]
15567 if v_2_0.Op != OpARM64NEGSflags {
15568 break
15569 }
15570 v_2_0_0 := v_2_0.Args[0]
15571 if v_2_0_0.Op != OpARM64MOVDconst || auxIntToInt64(v_2_0_0.AuxInt) != 0 {
15572 break
15573 }
15574 v.reset(OpARM64SUBSflags)
15575 v.AddArg2(x, y)
15576 return true
15577 }
15578 return false
15579 }
15580 func rewriteValueARM64_OpARM64SBFX(v *Value) bool {
15581 v_0 := v.Args[0]
15582
15583
15584
15585 for {
15586 bfc := auxIntToArm64BitField(v.AuxInt)
15587 s := v_0
15588 if s.Op != OpARM64SLLconst {
15589 break
15590 }
15591 sc := auxIntToInt64(s.AuxInt)
15592 x := s.Args[0]
15593 if !(s.Uses == 1 && sc <= bfc.lsb()) {
15594 break
15595 }
15596 v.reset(OpARM64SBFX)
15597 v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(bfc.lsb()-sc, bfc.width()))
15598 v.AddArg(x)
15599 return true
15600 }
15601
15602
15603
15604 for {
15605 bfc := auxIntToArm64BitField(v.AuxInt)
15606 s := v_0
15607 if s.Op != OpARM64SLLconst {
15608 break
15609 }
15610 sc := auxIntToInt64(s.AuxInt)
15611 x := s.Args[0]
15612 if !(s.Uses == 1 && sc > bfc.lsb()) {
15613 break
15614 }
15615 v.reset(OpARM64SBFIZ)
15616 v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(sc-bfc.lsb(), bfc.width()-(sc-bfc.lsb())))
15617 v.AddArg(x)
15618 return true
15619 }
15620 return false
15621 }
15622 func rewriteValueARM64_OpARM64SLL(v *Value) bool {
15623 v_1 := v.Args[1]
15624 v_0 := v.Args[0]
15625
15626
15627 for {
15628 x := v_0
15629 if v_1.Op != OpARM64MOVDconst {
15630 break
15631 }
15632 c := auxIntToInt64(v_1.AuxInt)
15633 v.reset(OpARM64SLLconst)
15634 v.AuxInt = int64ToAuxInt(c & 63)
15635 v.AddArg(x)
15636 return true
15637 }
15638
15639
15640 for {
15641 x := v_0
15642 if v_1.Op != OpARM64ANDconst || auxIntToInt64(v_1.AuxInt) != 63 {
15643 break
15644 }
15645 y := v_1.Args[0]
15646 v.reset(OpARM64SLL)
15647 v.AddArg2(x, y)
15648 return true
15649 }
15650 return false
15651 }
15652 func rewriteValueARM64_OpARM64SLLconst(v *Value) bool {
15653 v_0 := v.Args[0]
15654
15655
15656 for {
15657 c := auxIntToInt64(v.AuxInt)
15658 if v_0.Op != OpARM64MOVDconst {
15659 break
15660 }
15661 d := auxIntToInt64(v_0.AuxInt)
15662 v.reset(OpARM64MOVDconst)
15663 v.AuxInt = int64ToAuxInt(d << uint64(c))
15664 return true
15665 }
15666
15667
15668
15669 for {
15670 c := auxIntToInt64(v.AuxInt)
15671 if v_0.Op != OpARM64SRLconst || auxIntToInt64(v_0.AuxInt) != c {
15672 break
15673 }
15674 x := v_0.Args[0]
15675 if !(0 < c && c < 64) {
15676 break
15677 }
15678 v.reset(OpARM64ANDconst)
15679 v.AuxInt = int64ToAuxInt(^(1<<uint(c) - 1))
15680 v.AddArg(x)
15681 return true
15682 }
15683
15684
15685 for {
15686 lc := auxIntToInt64(v.AuxInt)
15687 if v_0.Op != OpARM64MOVWreg {
15688 break
15689 }
15690 x := v_0.Args[0]
15691 v.reset(OpARM64SBFIZ)
15692 v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(lc, min(32, 64-lc)))
15693 v.AddArg(x)
15694 return true
15695 }
15696
15697
15698 for {
15699 lc := auxIntToInt64(v.AuxInt)
15700 if v_0.Op != OpARM64MOVHreg {
15701 break
15702 }
15703 x := v_0.Args[0]
15704 v.reset(OpARM64SBFIZ)
15705 v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(lc, min(16, 64-lc)))
15706 v.AddArg(x)
15707 return true
15708 }
15709
15710
15711 for {
15712 lc := auxIntToInt64(v.AuxInt)
15713 if v_0.Op != OpARM64MOVBreg {
15714 break
15715 }
15716 x := v_0.Args[0]
15717 v.reset(OpARM64SBFIZ)
15718 v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(lc, min(8, 64-lc)))
15719 v.AddArg(x)
15720 return true
15721 }
15722
15723
15724 for {
15725 lc := auxIntToInt64(v.AuxInt)
15726 if v_0.Op != OpARM64MOVWUreg {
15727 break
15728 }
15729 x := v_0.Args[0]
15730 v.reset(OpARM64UBFIZ)
15731 v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(lc, min(32, 64-lc)))
15732 v.AddArg(x)
15733 return true
15734 }
15735
15736
15737 for {
15738 lc := auxIntToInt64(v.AuxInt)
15739 if v_0.Op != OpARM64MOVHUreg {
15740 break
15741 }
15742 x := v_0.Args[0]
15743 v.reset(OpARM64UBFIZ)
15744 v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(lc, min(16, 64-lc)))
15745 v.AddArg(x)
15746 return true
15747 }
15748
15749
15750 for {
15751 lc := auxIntToInt64(v.AuxInt)
15752 if v_0.Op != OpARM64MOVBUreg {
15753 break
15754 }
15755 x := v_0.Args[0]
15756 v.reset(OpARM64UBFIZ)
15757 v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(lc, min(8, 64-lc)))
15758 v.AddArg(x)
15759 return true
15760 }
15761
15762
15763
15764 for {
15765 sc := auxIntToInt64(v.AuxInt)
15766 if v_0.Op != OpARM64ANDconst {
15767 break
15768 }
15769 ac := auxIntToInt64(v_0.AuxInt)
15770 x := v_0.Args[0]
15771 if !(isARM64BFMask(sc, ac, 0)) {
15772 break
15773 }
15774 v.reset(OpARM64UBFIZ)
15775 v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(sc, arm64BFWidth(ac, 0)))
15776 v.AddArg(x)
15777 return true
15778 }
15779
15780
15781
15782 for {
15783 sc := auxIntToInt64(v.AuxInt)
15784 if v_0.Op != OpARM64UBFIZ {
15785 break
15786 }
15787 bfc := auxIntToArm64BitField(v_0.AuxInt)
15788 x := v_0.Args[0]
15789 if !(sc+bfc.width()+bfc.lsb() < 64) {
15790 break
15791 }
15792 v.reset(OpARM64UBFIZ)
15793 v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(bfc.lsb()+sc, bfc.width()))
15794 v.AddArg(x)
15795 return true
15796 }
15797 return false
15798 }
15799 func rewriteValueARM64_OpARM64SRA(v *Value) bool {
15800 v_1 := v.Args[1]
15801 v_0 := v.Args[0]
15802
15803
15804 for {
15805 x := v_0
15806 if v_1.Op != OpARM64MOVDconst {
15807 break
15808 }
15809 c := auxIntToInt64(v_1.AuxInt)
15810 v.reset(OpARM64SRAconst)
15811 v.AuxInt = int64ToAuxInt(c & 63)
15812 v.AddArg(x)
15813 return true
15814 }
15815
15816
15817 for {
15818 x := v_0
15819 if v_1.Op != OpARM64ANDconst || auxIntToInt64(v_1.AuxInt) != 63 {
15820 break
15821 }
15822 y := v_1.Args[0]
15823 v.reset(OpARM64SRA)
15824 v.AddArg2(x, y)
15825 return true
15826 }
15827 return false
15828 }
15829 func rewriteValueARM64_OpARM64SRAconst(v *Value) bool {
15830 v_0 := v.Args[0]
15831
15832
15833 for {
15834 c := auxIntToInt64(v.AuxInt)
15835 if v_0.Op != OpARM64MOVDconst {
15836 break
15837 }
15838 d := auxIntToInt64(v_0.AuxInt)
15839 v.reset(OpARM64MOVDconst)
15840 v.AuxInt = int64ToAuxInt(d >> uint64(c))
15841 return true
15842 }
15843
15844
15845
15846 for {
15847 rc := auxIntToInt64(v.AuxInt)
15848 if v_0.Op != OpARM64SLLconst {
15849 break
15850 }
15851 lc := auxIntToInt64(v_0.AuxInt)
15852 x := v_0.Args[0]
15853 if !(lc > rc) {
15854 break
15855 }
15856 v.reset(OpARM64SBFIZ)
15857 v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(lc-rc, 64-lc))
15858 v.AddArg(x)
15859 return true
15860 }
15861
15862
15863
15864 for {
15865 rc := auxIntToInt64(v.AuxInt)
15866 if v_0.Op != OpARM64SLLconst {
15867 break
15868 }
15869 lc := auxIntToInt64(v_0.AuxInt)
15870 x := v_0.Args[0]
15871 if !(lc <= rc) {
15872 break
15873 }
15874 v.reset(OpARM64SBFX)
15875 v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(rc-lc, 64-rc))
15876 v.AddArg(x)
15877 return true
15878 }
15879
15880
15881
15882 for {
15883 rc := auxIntToInt64(v.AuxInt)
15884 if v_0.Op != OpARM64MOVWreg {
15885 break
15886 }
15887 x := v_0.Args[0]
15888 if !(rc < 32) {
15889 break
15890 }
15891 v.reset(OpARM64SBFX)
15892 v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(rc, 32-rc))
15893 v.AddArg(x)
15894 return true
15895 }
15896
15897
15898
15899 for {
15900 rc := auxIntToInt64(v.AuxInt)
15901 if v_0.Op != OpARM64MOVHreg {
15902 break
15903 }
15904 x := v_0.Args[0]
15905 if !(rc < 16) {
15906 break
15907 }
15908 v.reset(OpARM64SBFX)
15909 v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(rc, 16-rc))
15910 v.AddArg(x)
15911 return true
15912 }
15913
15914
15915
15916 for {
15917 rc := auxIntToInt64(v.AuxInt)
15918 if v_0.Op != OpARM64MOVBreg {
15919 break
15920 }
15921 x := v_0.Args[0]
15922 if !(rc < 8) {
15923 break
15924 }
15925 v.reset(OpARM64SBFX)
15926 v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(rc, 8-rc))
15927 v.AddArg(x)
15928 return true
15929 }
15930
15931
15932
15933 for {
15934 sc := auxIntToInt64(v.AuxInt)
15935 if v_0.Op != OpARM64SBFIZ {
15936 break
15937 }
15938 bfc := auxIntToArm64BitField(v_0.AuxInt)
15939 x := v_0.Args[0]
15940 if !(sc < bfc.lsb()) {
15941 break
15942 }
15943 v.reset(OpARM64SBFIZ)
15944 v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(bfc.lsb()-sc, bfc.width()))
15945 v.AddArg(x)
15946 return true
15947 }
15948
15949
15950
15951 for {
15952 sc := auxIntToInt64(v.AuxInt)
15953 if v_0.Op != OpARM64SBFIZ {
15954 break
15955 }
15956 bfc := auxIntToArm64BitField(v_0.AuxInt)
15957 x := v_0.Args[0]
15958 if !(sc >= bfc.lsb() && sc < bfc.lsb()+bfc.width()) {
15959 break
15960 }
15961 v.reset(OpARM64SBFX)
15962 v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(sc-bfc.lsb(), bfc.lsb()+bfc.width()-sc))
15963 v.AddArg(x)
15964 return true
15965 }
15966 return false
15967 }
15968 func rewriteValueARM64_OpARM64SRL(v *Value) bool {
15969 v_1 := v.Args[1]
15970 v_0 := v.Args[0]
15971
15972
15973 for {
15974 x := v_0
15975 if v_1.Op != OpARM64MOVDconst {
15976 break
15977 }
15978 c := auxIntToInt64(v_1.AuxInt)
15979 v.reset(OpARM64SRLconst)
15980 v.AuxInt = int64ToAuxInt(c & 63)
15981 v.AddArg(x)
15982 return true
15983 }
15984
15985
15986 for {
15987 x := v_0
15988 if v_1.Op != OpARM64ANDconst || auxIntToInt64(v_1.AuxInt) != 63 {
15989 break
15990 }
15991 y := v_1.Args[0]
15992 v.reset(OpARM64SRL)
15993 v.AddArg2(x, y)
15994 return true
15995 }
15996 return false
15997 }
15998 func rewriteValueARM64_OpARM64SRLconst(v *Value) bool {
15999 v_0 := v.Args[0]
16000
16001
16002 for {
16003 c := auxIntToInt64(v.AuxInt)
16004 if v_0.Op != OpARM64MOVDconst {
16005 break
16006 }
16007 d := auxIntToInt64(v_0.AuxInt)
16008 v.reset(OpARM64MOVDconst)
16009 v.AuxInt = int64ToAuxInt(int64(uint64(d) >> uint64(c)))
16010 return true
16011 }
16012
16013
16014
16015 for {
16016 c := auxIntToInt64(v.AuxInt)
16017 if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != c {
16018 break
16019 }
16020 x := v_0.Args[0]
16021 if !(0 < c && c < 64) {
16022 break
16023 }
16024 v.reset(OpARM64ANDconst)
16025 v.AuxInt = int64ToAuxInt(1<<uint(64-c) - 1)
16026 v.AddArg(x)
16027 return true
16028 }
16029
16030
16031
16032 for {
16033 rc := auxIntToInt64(v.AuxInt)
16034 if v_0.Op != OpARM64MOVWUreg {
16035 break
16036 }
16037 if !(rc >= 32) {
16038 break
16039 }
16040 v.reset(OpARM64MOVDconst)
16041 v.AuxInt = int64ToAuxInt(0)
16042 return true
16043 }
16044
16045
16046
16047 for {
16048 rc := auxIntToInt64(v.AuxInt)
16049 if v_0.Op != OpARM64MOVHUreg {
16050 break
16051 }
16052 if !(rc >= 16) {
16053 break
16054 }
16055 v.reset(OpARM64MOVDconst)
16056 v.AuxInt = int64ToAuxInt(0)
16057 return true
16058 }
16059
16060
16061
16062 for {
16063 rc := auxIntToInt64(v.AuxInt)
16064 if v_0.Op != OpARM64MOVBUreg {
16065 break
16066 }
16067 if !(rc >= 8) {
16068 break
16069 }
16070 v.reset(OpARM64MOVDconst)
16071 v.AuxInt = int64ToAuxInt(0)
16072 return true
16073 }
16074
16075
16076
16077 for {
16078 rc := auxIntToInt64(v.AuxInt)
16079 if v_0.Op != OpARM64SLLconst {
16080 break
16081 }
16082 lc := auxIntToInt64(v_0.AuxInt)
16083 x := v_0.Args[0]
16084 if !(lc > rc) {
16085 break
16086 }
16087 v.reset(OpARM64UBFIZ)
16088 v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(lc-rc, 64-lc))
16089 v.AddArg(x)
16090 return true
16091 }
16092
16093
16094
16095 for {
16096 rc := auxIntToInt64(v.AuxInt)
16097 if v_0.Op != OpARM64SLLconst {
16098 break
16099 }
16100 lc := auxIntToInt64(v_0.AuxInt)
16101 x := v_0.Args[0]
16102 if !(lc < rc) {
16103 break
16104 }
16105 v.reset(OpARM64UBFX)
16106 v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(rc-lc, 64-rc))
16107 v.AddArg(x)
16108 return true
16109 }
16110
16111
16112
16113 for {
16114 rc := auxIntToInt64(v.AuxInt)
16115 if v_0.Op != OpARM64MOVWUreg {
16116 break
16117 }
16118 x := v_0.Args[0]
16119 if !(rc < 32) {
16120 break
16121 }
16122 v.reset(OpARM64UBFX)
16123 v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(rc, 32-rc))
16124 v.AddArg(x)
16125 return true
16126 }
16127
16128
16129
16130 for {
16131 rc := auxIntToInt64(v.AuxInt)
16132 if v_0.Op != OpARM64MOVHUreg {
16133 break
16134 }
16135 x := v_0.Args[0]
16136 if !(rc < 16) {
16137 break
16138 }
16139 v.reset(OpARM64UBFX)
16140 v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(rc, 16-rc))
16141 v.AddArg(x)
16142 return true
16143 }
16144
16145
16146
16147 for {
16148 rc := auxIntToInt64(v.AuxInt)
16149 if v_0.Op != OpARM64MOVBUreg {
16150 break
16151 }
16152 x := v_0.Args[0]
16153 if !(rc < 8) {
16154 break
16155 }
16156 v.reset(OpARM64UBFX)
16157 v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(rc, 8-rc))
16158 v.AddArg(x)
16159 return true
16160 }
16161
16162
16163
16164 for {
16165 sc := auxIntToInt64(v.AuxInt)
16166 if v_0.Op != OpARM64ANDconst {
16167 break
16168 }
16169 ac := auxIntToInt64(v_0.AuxInt)
16170 x := v_0.Args[0]
16171 if !(isARM64BFMask(sc, ac, sc)) {
16172 break
16173 }
16174 v.reset(OpARM64UBFX)
16175 v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(sc, arm64BFWidth(ac, sc)))
16176 v.AddArg(x)
16177 return true
16178 }
16179
16180
16181
16182 for {
16183 sc := auxIntToInt64(v.AuxInt)
16184 if v_0.Op != OpARM64UBFX {
16185 break
16186 }
16187 bfc := auxIntToArm64BitField(v_0.AuxInt)
16188 x := v_0.Args[0]
16189 if !(sc < bfc.width()) {
16190 break
16191 }
16192 v.reset(OpARM64UBFX)
16193 v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(bfc.lsb()+sc, bfc.width()-sc))
16194 v.AddArg(x)
16195 return true
16196 }
16197
16198
16199
16200 for {
16201 sc := auxIntToInt64(v.AuxInt)
16202 if v_0.Op != OpARM64UBFIZ {
16203 break
16204 }
16205 bfc := auxIntToArm64BitField(v_0.AuxInt)
16206 x := v_0.Args[0]
16207 if !(sc == bfc.lsb()) {
16208 break
16209 }
16210 v.reset(OpARM64ANDconst)
16211 v.AuxInt = int64ToAuxInt(1<<uint(bfc.width()) - 1)
16212 v.AddArg(x)
16213 return true
16214 }
16215
16216
16217
16218 for {
16219 sc := auxIntToInt64(v.AuxInt)
16220 if v_0.Op != OpARM64UBFIZ {
16221 break
16222 }
16223 bfc := auxIntToArm64BitField(v_0.AuxInt)
16224 x := v_0.Args[0]
16225 if !(sc < bfc.lsb()) {
16226 break
16227 }
16228 v.reset(OpARM64UBFIZ)
16229 v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(bfc.lsb()-sc, bfc.width()))
16230 v.AddArg(x)
16231 return true
16232 }
16233
16234
16235
16236 for {
16237 sc := auxIntToInt64(v.AuxInt)
16238 if v_0.Op != OpARM64UBFIZ {
16239 break
16240 }
16241 bfc := auxIntToArm64BitField(v_0.AuxInt)
16242 x := v_0.Args[0]
16243 if !(sc > bfc.lsb() && sc < bfc.lsb()+bfc.width()) {
16244 break
16245 }
16246 v.reset(OpARM64UBFX)
16247 v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(sc-bfc.lsb(), bfc.lsb()+bfc.width()-sc))
16248 v.AddArg(x)
16249 return true
16250 }
16251 return false
16252 }
16253 func rewriteValueARM64_OpARM64STP(v *Value) bool {
16254 v_3 := v.Args[3]
16255 v_2 := v.Args[2]
16256 v_1 := v.Args[1]
16257 v_0 := v.Args[0]
16258 b := v.Block
16259 config := b.Func.Config
16260
16261
16262
16263 for {
16264 off1 := auxIntToInt32(v.AuxInt)
16265 sym := auxToSym(v.Aux)
16266 if v_0.Op != OpARM64ADDconst {
16267 break
16268 }
16269 off2 := auxIntToInt64(v_0.AuxInt)
16270 ptr := v_0.Args[0]
16271 val1 := v_1
16272 val2 := v_2
16273 mem := v_3
16274 if !(is32Bit(int64(off1)+off2) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
16275 break
16276 }
16277 v.reset(OpARM64STP)
16278 v.AuxInt = int32ToAuxInt(off1 + int32(off2))
16279 v.Aux = symToAux(sym)
16280 v.AddArg4(ptr, val1, val2, mem)
16281 return true
16282 }
16283
16284
16285
16286 for {
16287 off1 := auxIntToInt32(v.AuxInt)
16288 sym1 := auxToSym(v.Aux)
16289 if v_0.Op != OpARM64MOVDaddr {
16290 break
16291 }
16292 off2 := auxIntToInt32(v_0.AuxInt)
16293 sym2 := auxToSym(v_0.Aux)
16294 ptr := v_0.Args[0]
16295 val1 := v_1
16296 val2 := v_2
16297 mem := v_3
16298 if !(canMergeSym(sym1, sym2) && is32Bit(int64(off1)+int64(off2)) && (ptr.Op != OpSB || !config.ctxt.Flag_dynlink)) {
16299 break
16300 }
16301 v.reset(OpARM64STP)
16302 v.AuxInt = int32ToAuxInt(off1 + off2)
16303 v.Aux = symToAux(mergeSym(sym1, sym2))
16304 v.AddArg4(ptr, val1, val2, mem)
16305 return true
16306 }
16307
16308
16309 for {
16310 off := auxIntToInt32(v.AuxInt)
16311 sym := auxToSym(v.Aux)
16312 ptr := v_0
16313 if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 0 || v_2.Op != OpARM64MOVDconst || auxIntToInt64(v_2.AuxInt) != 0 {
16314 break
16315 }
16316 mem := v_3
16317 v.reset(OpARM64MOVQstorezero)
16318 v.AuxInt = int32ToAuxInt(off)
16319 v.Aux = symToAux(sym)
16320 v.AddArg2(ptr, mem)
16321 return true
16322 }
16323 return false
16324 }
16325 func rewriteValueARM64_OpARM64SUB(v *Value) bool {
16326 v_1 := v.Args[1]
16327 v_0 := v.Args[0]
16328 b := v.Block
16329
16330
16331 for {
16332 x := v_0
16333 if v_1.Op != OpARM64MOVDconst {
16334 break
16335 }
16336 c := auxIntToInt64(v_1.AuxInt)
16337 v.reset(OpARM64SUBconst)
16338 v.AuxInt = int64ToAuxInt(c)
16339 v.AddArg(x)
16340 return true
16341 }
16342
16343
16344
16345 for {
16346 a := v_0
16347 l := v_1
16348 if l.Op != OpARM64MUL {
16349 break
16350 }
16351 y := l.Args[1]
16352 x := l.Args[0]
16353 if !(l.Uses == 1 && clobber(l)) {
16354 break
16355 }
16356 v.reset(OpARM64MSUB)
16357 v.AddArg3(a, x, y)
16358 return true
16359 }
16360
16361
16362
16363 for {
16364 a := v_0
16365 l := v_1
16366 if l.Op != OpARM64MNEG {
16367 break
16368 }
16369 y := l.Args[1]
16370 x := l.Args[0]
16371 if !(l.Uses == 1 && clobber(l)) {
16372 break
16373 }
16374 v.reset(OpARM64MADD)
16375 v.AddArg3(a, x, y)
16376 return true
16377 }
16378
16379
16380
16381 for {
16382 a := v_0
16383 l := v_1
16384 if l.Op != OpARM64MULW {
16385 break
16386 }
16387 y := l.Args[1]
16388 x := l.Args[0]
16389 if !(v.Type.Size() <= 4 && l.Uses == 1 && clobber(l)) {
16390 break
16391 }
16392 v.reset(OpARM64MSUBW)
16393 v.AddArg3(a, x, y)
16394 return true
16395 }
16396
16397
16398
16399 for {
16400 a := v_0
16401 l := v_1
16402 if l.Op != OpARM64MNEGW {
16403 break
16404 }
16405 y := l.Args[1]
16406 x := l.Args[0]
16407 if !(v.Type.Size() <= 4 && l.Uses == 1 && clobber(l)) {
16408 break
16409 }
16410 v.reset(OpARM64MADDW)
16411 v.AddArg3(a, x, y)
16412 return true
16413 }
16414
16415
16416 for {
16417 x := v_0
16418 if x != v_1 {
16419 break
16420 }
16421 v.reset(OpARM64MOVDconst)
16422 v.AuxInt = int64ToAuxInt(0)
16423 return true
16424 }
16425
16426
16427 for {
16428 x := v_0
16429 if v_1.Op != OpARM64SUB {
16430 break
16431 }
16432 z := v_1.Args[1]
16433 y := v_1.Args[0]
16434 v.reset(OpARM64SUB)
16435 v0 := b.NewValue0(v.Pos, OpARM64ADD, v.Type)
16436 v0.AddArg2(x, z)
16437 v.AddArg2(v0, y)
16438 return true
16439 }
16440
16441
16442 for {
16443 if v_0.Op != OpARM64SUB {
16444 break
16445 }
16446 y := v_0.Args[1]
16447 x := v_0.Args[0]
16448 z := v_1
16449 v.reset(OpARM64SUB)
16450 v0 := b.NewValue0(v.Pos, OpARM64ADD, y.Type)
16451 v0.AddArg2(y, z)
16452 v.AddArg2(x, v0)
16453 return true
16454 }
16455
16456
16457
16458 for {
16459 x0 := v_0
16460 x1 := v_1
16461 if x1.Op != OpARM64SLLconst {
16462 break
16463 }
16464 c := auxIntToInt64(x1.AuxInt)
16465 y := x1.Args[0]
16466 if !(clobberIfDead(x1)) {
16467 break
16468 }
16469 v.reset(OpARM64SUBshiftLL)
16470 v.AuxInt = int64ToAuxInt(c)
16471 v.AddArg2(x0, y)
16472 return true
16473 }
16474
16475
16476
16477 for {
16478 x0 := v_0
16479 x1 := v_1
16480 if x1.Op != OpARM64SRLconst {
16481 break
16482 }
16483 c := auxIntToInt64(x1.AuxInt)
16484 y := x1.Args[0]
16485 if !(clobberIfDead(x1)) {
16486 break
16487 }
16488 v.reset(OpARM64SUBshiftRL)
16489 v.AuxInt = int64ToAuxInt(c)
16490 v.AddArg2(x0, y)
16491 return true
16492 }
16493
16494
16495
16496 for {
16497 x0 := v_0
16498 x1 := v_1
16499 if x1.Op != OpARM64SRAconst {
16500 break
16501 }
16502 c := auxIntToInt64(x1.AuxInt)
16503 y := x1.Args[0]
16504 if !(clobberIfDead(x1)) {
16505 break
16506 }
16507 v.reset(OpARM64SUBshiftRA)
16508 v.AuxInt = int64ToAuxInt(c)
16509 v.AddArg2(x0, y)
16510 return true
16511 }
16512 return false
16513 }
16514 func rewriteValueARM64_OpARM64SUBconst(v *Value) bool {
16515 v_0 := v.Args[0]
16516
16517
16518 for {
16519 if auxIntToInt64(v.AuxInt) != 0 {
16520 break
16521 }
16522 x := v_0
16523 v.copyOf(x)
16524 return true
16525 }
16526
16527
16528 for {
16529 c := auxIntToInt64(v.AuxInt)
16530 if v_0.Op != OpARM64MOVDconst {
16531 break
16532 }
16533 d := auxIntToInt64(v_0.AuxInt)
16534 v.reset(OpARM64MOVDconst)
16535 v.AuxInt = int64ToAuxInt(d - c)
16536 return true
16537 }
16538
16539
16540 for {
16541 c := auxIntToInt64(v.AuxInt)
16542 if v_0.Op != OpARM64SUBconst {
16543 break
16544 }
16545 d := auxIntToInt64(v_0.AuxInt)
16546 x := v_0.Args[0]
16547 v.reset(OpARM64ADDconst)
16548 v.AuxInt = int64ToAuxInt(-c - d)
16549 v.AddArg(x)
16550 return true
16551 }
16552
16553
16554 for {
16555 c := auxIntToInt64(v.AuxInt)
16556 if v_0.Op != OpARM64ADDconst {
16557 break
16558 }
16559 d := auxIntToInt64(v_0.AuxInt)
16560 x := v_0.Args[0]
16561 v.reset(OpARM64ADDconst)
16562 v.AuxInt = int64ToAuxInt(-c + d)
16563 v.AddArg(x)
16564 return true
16565 }
16566 return false
16567 }
16568 func rewriteValueARM64_OpARM64SUBshiftLL(v *Value) bool {
16569 v_1 := v.Args[1]
16570 v_0 := v.Args[0]
16571
16572
16573 for {
16574 d := auxIntToInt64(v.AuxInt)
16575 x := v_0
16576 if v_1.Op != OpARM64MOVDconst {
16577 break
16578 }
16579 c := auxIntToInt64(v_1.AuxInt)
16580 v.reset(OpARM64SUBconst)
16581 v.AuxInt = int64ToAuxInt(int64(uint64(c) << uint64(d)))
16582 v.AddArg(x)
16583 return true
16584 }
16585
16586
16587 for {
16588 c := auxIntToInt64(v.AuxInt)
16589 if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != c {
16590 break
16591 }
16592 x := v_0.Args[0]
16593 if x != v_1 {
16594 break
16595 }
16596 v.reset(OpARM64MOVDconst)
16597 v.AuxInt = int64ToAuxInt(0)
16598 return true
16599 }
16600 return false
16601 }
16602 func rewriteValueARM64_OpARM64SUBshiftRA(v *Value) bool {
16603 v_1 := v.Args[1]
16604 v_0 := v.Args[0]
16605
16606
16607 for {
16608 d := auxIntToInt64(v.AuxInt)
16609 x := v_0
16610 if v_1.Op != OpARM64MOVDconst {
16611 break
16612 }
16613 c := auxIntToInt64(v_1.AuxInt)
16614 v.reset(OpARM64SUBconst)
16615 v.AuxInt = int64ToAuxInt(c >> uint64(d))
16616 v.AddArg(x)
16617 return true
16618 }
16619
16620
16621 for {
16622 c := auxIntToInt64(v.AuxInt)
16623 if v_0.Op != OpARM64SRAconst || auxIntToInt64(v_0.AuxInt) != c {
16624 break
16625 }
16626 x := v_0.Args[0]
16627 if x != v_1 {
16628 break
16629 }
16630 v.reset(OpARM64MOVDconst)
16631 v.AuxInt = int64ToAuxInt(0)
16632 return true
16633 }
16634 return false
16635 }
16636 func rewriteValueARM64_OpARM64SUBshiftRL(v *Value) bool {
16637 v_1 := v.Args[1]
16638 v_0 := v.Args[0]
16639
16640
16641 for {
16642 d := auxIntToInt64(v.AuxInt)
16643 x := v_0
16644 if v_1.Op != OpARM64MOVDconst {
16645 break
16646 }
16647 c := auxIntToInt64(v_1.AuxInt)
16648 v.reset(OpARM64SUBconst)
16649 v.AuxInt = int64ToAuxInt(int64(uint64(c) >> uint64(d)))
16650 v.AddArg(x)
16651 return true
16652 }
16653
16654
16655 for {
16656 c := auxIntToInt64(v.AuxInt)
16657 if v_0.Op != OpARM64SRLconst || auxIntToInt64(v_0.AuxInt) != c {
16658 break
16659 }
16660 x := v_0.Args[0]
16661 if x != v_1 {
16662 break
16663 }
16664 v.reset(OpARM64MOVDconst)
16665 v.AuxInt = int64ToAuxInt(0)
16666 return true
16667 }
16668 return false
16669 }
16670 func rewriteValueARM64_OpARM64TST(v *Value) bool {
16671 v_1 := v.Args[1]
16672 v_0 := v.Args[0]
16673
16674
16675 for {
16676 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
16677 x := v_0
16678 if v_1.Op != OpARM64MOVDconst {
16679 continue
16680 }
16681 c := auxIntToInt64(v_1.AuxInt)
16682 v.reset(OpARM64TSTconst)
16683 v.AuxInt = int64ToAuxInt(c)
16684 v.AddArg(x)
16685 return true
16686 }
16687 break
16688 }
16689
16690
16691
16692 for {
16693 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
16694 x0 := v_0
16695 x1 := v_1
16696 if x1.Op != OpARM64SLLconst {
16697 continue
16698 }
16699 c := auxIntToInt64(x1.AuxInt)
16700 y := x1.Args[0]
16701 if !(clobberIfDead(x1)) {
16702 continue
16703 }
16704 v.reset(OpARM64TSTshiftLL)
16705 v.AuxInt = int64ToAuxInt(c)
16706 v.AddArg2(x0, y)
16707 return true
16708 }
16709 break
16710 }
16711
16712
16713
16714 for {
16715 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
16716 x0 := v_0
16717 x1 := v_1
16718 if x1.Op != OpARM64SRLconst {
16719 continue
16720 }
16721 c := auxIntToInt64(x1.AuxInt)
16722 y := x1.Args[0]
16723 if !(clobberIfDead(x1)) {
16724 continue
16725 }
16726 v.reset(OpARM64TSTshiftRL)
16727 v.AuxInt = int64ToAuxInt(c)
16728 v.AddArg2(x0, y)
16729 return true
16730 }
16731 break
16732 }
16733
16734
16735
16736 for {
16737 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
16738 x0 := v_0
16739 x1 := v_1
16740 if x1.Op != OpARM64SRAconst {
16741 continue
16742 }
16743 c := auxIntToInt64(x1.AuxInt)
16744 y := x1.Args[0]
16745 if !(clobberIfDead(x1)) {
16746 continue
16747 }
16748 v.reset(OpARM64TSTshiftRA)
16749 v.AuxInt = int64ToAuxInt(c)
16750 v.AddArg2(x0, y)
16751 return true
16752 }
16753 break
16754 }
16755
16756
16757
16758 for {
16759 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
16760 x0 := v_0
16761 x1 := v_1
16762 if x1.Op != OpARM64RORconst {
16763 continue
16764 }
16765 c := auxIntToInt64(x1.AuxInt)
16766 y := x1.Args[0]
16767 if !(clobberIfDead(x1)) {
16768 continue
16769 }
16770 v.reset(OpARM64TSTshiftRO)
16771 v.AuxInt = int64ToAuxInt(c)
16772 v.AddArg2(x0, y)
16773 return true
16774 }
16775 break
16776 }
16777 return false
16778 }
16779 func rewriteValueARM64_OpARM64TSTW(v *Value) bool {
16780 v_1 := v.Args[1]
16781 v_0 := v.Args[0]
16782
16783
16784 for {
16785 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
16786 x := v_0
16787 if v_1.Op != OpARM64MOVDconst {
16788 continue
16789 }
16790 c := auxIntToInt64(v_1.AuxInt)
16791 v.reset(OpARM64TSTWconst)
16792 v.AuxInt = int32ToAuxInt(int32(c))
16793 v.AddArg(x)
16794 return true
16795 }
16796 break
16797 }
16798 return false
16799 }
16800 func rewriteValueARM64_OpARM64TSTWconst(v *Value) bool {
16801 v_0 := v.Args[0]
16802
16803
16804 for {
16805 y := auxIntToInt32(v.AuxInt)
16806 if v_0.Op != OpARM64MOVDconst {
16807 break
16808 }
16809 x := auxIntToInt64(v_0.AuxInt)
16810 v.reset(OpARM64FlagConstant)
16811 v.AuxInt = flagConstantToAuxInt(logicFlags32(int32(x) & y))
16812 return true
16813 }
16814 return false
16815 }
16816 func rewriteValueARM64_OpARM64TSTconst(v *Value) bool {
16817 v_0 := v.Args[0]
16818
16819
16820 for {
16821 y := auxIntToInt64(v.AuxInt)
16822 if v_0.Op != OpARM64MOVDconst {
16823 break
16824 }
16825 x := auxIntToInt64(v_0.AuxInt)
16826 v.reset(OpARM64FlagConstant)
16827 v.AuxInt = flagConstantToAuxInt(logicFlags64(x & y))
16828 return true
16829 }
16830 return false
16831 }
16832 func rewriteValueARM64_OpARM64TSTshiftLL(v *Value) bool {
16833 v_1 := v.Args[1]
16834 v_0 := v.Args[0]
16835 b := v.Block
16836
16837
16838 for {
16839 d := auxIntToInt64(v.AuxInt)
16840 if v_0.Op != OpARM64MOVDconst {
16841 break
16842 }
16843 c := auxIntToInt64(v_0.AuxInt)
16844 x := v_1
16845 v.reset(OpARM64TSTconst)
16846 v.AuxInt = int64ToAuxInt(c)
16847 v0 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
16848 v0.AuxInt = int64ToAuxInt(d)
16849 v0.AddArg(x)
16850 v.AddArg(v0)
16851 return true
16852 }
16853
16854
16855 for {
16856 d := auxIntToInt64(v.AuxInt)
16857 x := v_0
16858 if v_1.Op != OpARM64MOVDconst {
16859 break
16860 }
16861 c := auxIntToInt64(v_1.AuxInt)
16862 v.reset(OpARM64TSTconst)
16863 v.AuxInt = int64ToAuxInt(int64(uint64(c) << uint64(d)))
16864 v.AddArg(x)
16865 return true
16866 }
16867 return false
16868 }
16869 func rewriteValueARM64_OpARM64TSTshiftRA(v *Value) bool {
16870 v_1 := v.Args[1]
16871 v_0 := v.Args[0]
16872 b := v.Block
16873
16874
16875 for {
16876 d := auxIntToInt64(v.AuxInt)
16877 if v_0.Op != OpARM64MOVDconst {
16878 break
16879 }
16880 c := auxIntToInt64(v_0.AuxInt)
16881 x := v_1
16882 v.reset(OpARM64TSTconst)
16883 v.AuxInt = int64ToAuxInt(c)
16884 v0 := b.NewValue0(v.Pos, OpARM64SRAconst, x.Type)
16885 v0.AuxInt = int64ToAuxInt(d)
16886 v0.AddArg(x)
16887 v.AddArg(v0)
16888 return true
16889 }
16890
16891
16892 for {
16893 d := auxIntToInt64(v.AuxInt)
16894 x := v_0
16895 if v_1.Op != OpARM64MOVDconst {
16896 break
16897 }
16898 c := auxIntToInt64(v_1.AuxInt)
16899 v.reset(OpARM64TSTconst)
16900 v.AuxInt = int64ToAuxInt(c >> uint64(d))
16901 v.AddArg(x)
16902 return true
16903 }
16904 return false
16905 }
16906 func rewriteValueARM64_OpARM64TSTshiftRL(v *Value) bool {
16907 v_1 := v.Args[1]
16908 v_0 := v.Args[0]
16909 b := v.Block
16910
16911
16912 for {
16913 d := auxIntToInt64(v.AuxInt)
16914 if v_0.Op != OpARM64MOVDconst {
16915 break
16916 }
16917 c := auxIntToInt64(v_0.AuxInt)
16918 x := v_1
16919 v.reset(OpARM64TSTconst)
16920 v.AuxInt = int64ToAuxInt(c)
16921 v0 := b.NewValue0(v.Pos, OpARM64SRLconst, x.Type)
16922 v0.AuxInt = int64ToAuxInt(d)
16923 v0.AddArg(x)
16924 v.AddArg(v0)
16925 return true
16926 }
16927
16928
16929 for {
16930 d := auxIntToInt64(v.AuxInt)
16931 x := v_0
16932 if v_1.Op != OpARM64MOVDconst {
16933 break
16934 }
16935 c := auxIntToInt64(v_1.AuxInt)
16936 v.reset(OpARM64TSTconst)
16937 v.AuxInt = int64ToAuxInt(int64(uint64(c) >> uint64(d)))
16938 v.AddArg(x)
16939 return true
16940 }
16941 return false
16942 }
16943 func rewriteValueARM64_OpARM64TSTshiftRO(v *Value) bool {
16944 v_1 := v.Args[1]
16945 v_0 := v.Args[0]
16946 b := v.Block
16947
16948
16949 for {
16950 d := auxIntToInt64(v.AuxInt)
16951 if v_0.Op != OpARM64MOVDconst {
16952 break
16953 }
16954 c := auxIntToInt64(v_0.AuxInt)
16955 x := v_1
16956 v.reset(OpARM64TSTconst)
16957 v.AuxInt = int64ToAuxInt(c)
16958 v0 := b.NewValue0(v.Pos, OpARM64RORconst, x.Type)
16959 v0.AuxInt = int64ToAuxInt(d)
16960 v0.AddArg(x)
16961 v.AddArg(v0)
16962 return true
16963 }
16964
16965
16966 for {
16967 d := auxIntToInt64(v.AuxInt)
16968 x := v_0
16969 if v_1.Op != OpARM64MOVDconst {
16970 break
16971 }
16972 c := auxIntToInt64(v_1.AuxInt)
16973 v.reset(OpARM64TSTconst)
16974 v.AuxInt = int64ToAuxInt(rotateRight64(c, d))
16975 v.AddArg(x)
16976 return true
16977 }
16978 return false
16979 }
16980 func rewriteValueARM64_OpARM64UBFIZ(v *Value) bool {
16981 v_0 := v.Args[0]
16982
16983
16984
16985 for {
16986 bfc := auxIntToArm64BitField(v.AuxInt)
16987 if v_0.Op != OpARM64SLLconst {
16988 break
16989 }
16990 sc := auxIntToInt64(v_0.AuxInt)
16991 x := v_0.Args[0]
16992 if !(sc < bfc.width()) {
16993 break
16994 }
16995 v.reset(OpARM64UBFIZ)
16996 v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(bfc.lsb()+sc, bfc.width()-sc))
16997 v.AddArg(x)
16998 return true
16999 }
17000 return false
17001 }
17002 func rewriteValueARM64_OpARM64UBFX(v *Value) bool {
17003 v_0 := v.Args[0]
17004
17005
17006
17007 for {
17008 bfc := auxIntToArm64BitField(v.AuxInt)
17009 if v_0.Op != OpARM64ANDconst {
17010 break
17011 }
17012 c := auxIntToInt64(v_0.AuxInt)
17013 x := v_0.Args[0]
17014 if !(isARM64BFMask(0, c, 0) && bfc.lsb()+bfc.width() <= arm64BFWidth(c, 0)) {
17015 break
17016 }
17017 v.reset(OpARM64UBFX)
17018 v.AuxInt = arm64BitFieldToAuxInt(bfc)
17019 v.AddArg(x)
17020 return true
17021 }
17022
17023
17024
17025 for {
17026 bfc := auxIntToArm64BitField(v.AuxInt)
17027 e := v_0
17028 if e.Op != OpARM64MOVWUreg {
17029 break
17030 }
17031 x := e.Args[0]
17032 if !(e.Uses == 1 && bfc.lsb() < 32) {
17033 break
17034 }
17035 v.reset(OpARM64UBFX)
17036 v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(bfc.lsb(), min(bfc.width(), 32-bfc.lsb())))
17037 v.AddArg(x)
17038 return true
17039 }
17040
17041
17042
17043 for {
17044 bfc := auxIntToArm64BitField(v.AuxInt)
17045 e := v_0
17046 if e.Op != OpARM64MOVHUreg {
17047 break
17048 }
17049 x := e.Args[0]
17050 if !(e.Uses == 1 && bfc.lsb() < 16) {
17051 break
17052 }
17053 v.reset(OpARM64UBFX)
17054 v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(bfc.lsb(), min(bfc.width(), 16-bfc.lsb())))
17055 v.AddArg(x)
17056 return true
17057 }
17058
17059
17060
17061 for {
17062 bfc := auxIntToArm64BitField(v.AuxInt)
17063 e := v_0
17064 if e.Op != OpARM64MOVBUreg {
17065 break
17066 }
17067 x := e.Args[0]
17068 if !(e.Uses == 1 && bfc.lsb() < 8) {
17069 break
17070 }
17071 v.reset(OpARM64UBFX)
17072 v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(bfc.lsb(), min(bfc.width(), 8-bfc.lsb())))
17073 v.AddArg(x)
17074 return true
17075 }
17076
17077
17078
17079 for {
17080 bfc := auxIntToArm64BitField(v.AuxInt)
17081 if v_0.Op != OpARM64SRLconst {
17082 break
17083 }
17084 sc := auxIntToInt64(v_0.AuxInt)
17085 x := v_0.Args[0]
17086 if !(sc+bfc.width()+bfc.lsb() < 64) {
17087 break
17088 }
17089 v.reset(OpARM64UBFX)
17090 v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(bfc.lsb()+sc, bfc.width()))
17091 v.AddArg(x)
17092 return true
17093 }
17094
17095
17096
17097 for {
17098 bfc := auxIntToArm64BitField(v.AuxInt)
17099 if v_0.Op != OpARM64SLLconst {
17100 break
17101 }
17102 sc := auxIntToInt64(v_0.AuxInt)
17103 x := v_0.Args[0]
17104 if !(sc == bfc.lsb()) {
17105 break
17106 }
17107 v.reset(OpARM64ANDconst)
17108 v.AuxInt = int64ToAuxInt(1<<uint(bfc.width()) - 1)
17109 v.AddArg(x)
17110 return true
17111 }
17112
17113
17114
17115 for {
17116 bfc := auxIntToArm64BitField(v.AuxInt)
17117 if v_0.Op != OpARM64SLLconst {
17118 break
17119 }
17120 sc := auxIntToInt64(v_0.AuxInt)
17121 x := v_0.Args[0]
17122 if !(sc < bfc.lsb()) {
17123 break
17124 }
17125 v.reset(OpARM64UBFX)
17126 v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(bfc.lsb()-sc, bfc.width()))
17127 v.AddArg(x)
17128 return true
17129 }
17130
17131
17132
17133 for {
17134 bfc := auxIntToArm64BitField(v.AuxInt)
17135 if v_0.Op != OpARM64SLLconst {
17136 break
17137 }
17138 sc := auxIntToInt64(v_0.AuxInt)
17139 x := v_0.Args[0]
17140 if !(sc > bfc.lsb() && sc < bfc.lsb()+bfc.width()) {
17141 break
17142 }
17143 v.reset(OpARM64UBFIZ)
17144 v.AuxInt = arm64BitFieldToAuxInt(armBFAuxInt(sc-bfc.lsb(), bfc.lsb()+bfc.width()-sc))
17145 v.AddArg(x)
17146 return true
17147 }
17148 return false
17149 }
17150 func rewriteValueARM64_OpARM64UDIV(v *Value) bool {
17151 v_1 := v.Args[1]
17152 v_0 := v.Args[0]
17153
17154
17155 for {
17156 x := v_0
17157 if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 1 {
17158 break
17159 }
17160 v.copyOf(x)
17161 return true
17162 }
17163
17164
17165
17166 for {
17167 x := v_0
17168 if v_1.Op != OpARM64MOVDconst {
17169 break
17170 }
17171 c := auxIntToInt64(v_1.AuxInt)
17172 if !(isPowerOfTwo(c)) {
17173 break
17174 }
17175 v.reset(OpARM64SRLconst)
17176 v.AuxInt = int64ToAuxInt(log64(c))
17177 v.AddArg(x)
17178 return true
17179 }
17180
17181
17182
17183 for {
17184 if v_0.Op != OpARM64MOVDconst {
17185 break
17186 }
17187 c := auxIntToInt64(v_0.AuxInt)
17188 if v_1.Op != OpARM64MOVDconst {
17189 break
17190 }
17191 d := auxIntToInt64(v_1.AuxInt)
17192 if !(d != 0) {
17193 break
17194 }
17195 v.reset(OpARM64MOVDconst)
17196 v.AuxInt = int64ToAuxInt(int64(uint64(c) / uint64(d)))
17197 return true
17198 }
17199 return false
17200 }
17201 func rewriteValueARM64_OpARM64UDIVW(v *Value) bool {
17202 v_1 := v.Args[1]
17203 v_0 := v.Args[0]
17204 b := v.Block
17205
17206
17207
17208 for {
17209 x := v_0
17210 if v_1.Op != OpARM64MOVDconst {
17211 break
17212 }
17213 c := auxIntToInt64(v_1.AuxInt)
17214 if !(uint32(c) == 1) {
17215 break
17216 }
17217 v.reset(OpARM64MOVWUreg)
17218 v.AddArg(x)
17219 return true
17220 }
17221
17222
17223
17224 for {
17225 x := v_0
17226 if v_1.Op != OpARM64MOVDconst {
17227 break
17228 }
17229 c := auxIntToInt64(v_1.AuxInt)
17230 if !(isPowerOfTwo(c) && is32Bit(c)) {
17231 break
17232 }
17233 v.reset(OpARM64SRLconst)
17234 v.AuxInt = int64ToAuxInt(log64(c))
17235 v0 := b.NewValue0(v.Pos, OpARM64MOVWUreg, v.Type)
17236 v0.AddArg(x)
17237 v.AddArg(v0)
17238 return true
17239 }
17240
17241
17242
17243 for {
17244 if v_0.Op != OpARM64MOVDconst {
17245 break
17246 }
17247 c := auxIntToInt64(v_0.AuxInt)
17248 if v_1.Op != OpARM64MOVDconst {
17249 break
17250 }
17251 d := auxIntToInt64(v_1.AuxInt)
17252 if !(d != 0) {
17253 break
17254 }
17255 v.reset(OpARM64MOVDconst)
17256 v.AuxInt = int64ToAuxInt(int64(uint32(c) / uint32(d)))
17257 return true
17258 }
17259 return false
17260 }
17261 func rewriteValueARM64_OpARM64UMOD(v *Value) bool {
17262 v_1 := v.Args[1]
17263 v_0 := v.Args[0]
17264 b := v.Block
17265 typ := &b.Func.Config.Types
17266
17267
17268 for {
17269 if v.Type != typ.UInt64 {
17270 break
17271 }
17272 x := v_0
17273 y := v_1
17274 v.reset(OpARM64MSUB)
17275 v.Type = typ.UInt64
17276 v0 := b.NewValue0(v.Pos, OpARM64UDIV, typ.UInt64)
17277 v0.AddArg2(x, y)
17278 v.AddArg3(x, y, v0)
17279 return true
17280 }
17281
17282
17283 for {
17284 if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 1 {
17285 break
17286 }
17287 v.reset(OpARM64MOVDconst)
17288 v.AuxInt = int64ToAuxInt(0)
17289 return true
17290 }
17291
17292
17293
17294 for {
17295 x := v_0
17296 if v_1.Op != OpARM64MOVDconst {
17297 break
17298 }
17299 c := auxIntToInt64(v_1.AuxInt)
17300 if !(isPowerOfTwo(c)) {
17301 break
17302 }
17303 v.reset(OpARM64ANDconst)
17304 v.AuxInt = int64ToAuxInt(c - 1)
17305 v.AddArg(x)
17306 return true
17307 }
17308
17309
17310
17311 for {
17312 if v_0.Op != OpARM64MOVDconst {
17313 break
17314 }
17315 c := auxIntToInt64(v_0.AuxInt)
17316 if v_1.Op != OpARM64MOVDconst {
17317 break
17318 }
17319 d := auxIntToInt64(v_1.AuxInt)
17320 if !(d != 0) {
17321 break
17322 }
17323 v.reset(OpARM64MOVDconst)
17324 v.AuxInt = int64ToAuxInt(int64(uint64(c) % uint64(d)))
17325 return true
17326 }
17327 return false
17328 }
17329 func rewriteValueARM64_OpARM64UMODW(v *Value) bool {
17330 v_1 := v.Args[1]
17331 v_0 := v.Args[0]
17332 b := v.Block
17333 typ := &b.Func.Config.Types
17334
17335
17336 for {
17337 if v.Type != typ.UInt32 {
17338 break
17339 }
17340 x := v_0
17341 y := v_1
17342 v.reset(OpARM64MSUBW)
17343 v.Type = typ.UInt32
17344 v0 := b.NewValue0(v.Pos, OpARM64UDIVW, typ.UInt32)
17345 v0.AddArg2(x, y)
17346 v.AddArg3(x, y, v0)
17347 return true
17348 }
17349
17350
17351
17352 for {
17353 if v_1.Op != OpARM64MOVDconst {
17354 break
17355 }
17356 c := auxIntToInt64(v_1.AuxInt)
17357 if !(uint32(c) == 1) {
17358 break
17359 }
17360 v.reset(OpARM64MOVDconst)
17361 v.AuxInt = int64ToAuxInt(0)
17362 return true
17363 }
17364
17365
17366
17367 for {
17368 x := v_0
17369 if v_1.Op != OpARM64MOVDconst {
17370 break
17371 }
17372 c := auxIntToInt64(v_1.AuxInt)
17373 if !(isPowerOfTwo(c) && is32Bit(c)) {
17374 break
17375 }
17376 v.reset(OpARM64ANDconst)
17377 v.AuxInt = int64ToAuxInt(c - 1)
17378 v.AddArg(x)
17379 return true
17380 }
17381
17382
17383
17384 for {
17385 if v_0.Op != OpARM64MOVDconst {
17386 break
17387 }
17388 c := auxIntToInt64(v_0.AuxInt)
17389 if v_1.Op != OpARM64MOVDconst {
17390 break
17391 }
17392 d := auxIntToInt64(v_1.AuxInt)
17393 if !(d != 0) {
17394 break
17395 }
17396 v.reset(OpARM64MOVDconst)
17397 v.AuxInt = int64ToAuxInt(int64(uint32(c) % uint32(d)))
17398 return true
17399 }
17400 return false
17401 }
17402 func rewriteValueARM64_OpARM64XOR(v *Value) bool {
17403 v_1 := v.Args[1]
17404 v_0 := v.Args[0]
17405
17406
17407 for {
17408 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
17409 x := v_0
17410 if v_1.Op != OpARM64MOVDconst {
17411 continue
17412 }
17413 c := auxIntToInt64(v_1.AuxInt)
17414 v.reset(OpARM64XORconst)
17415 v.AuxInt = int64ToAuxInt(c)
17416 v.AddArg(x)
17417 return true
17418 }
17419 break
17420 }
17421
17422
17423 for {
17424 x := v_0
17425 if x != v_1 {
17426 break
17427 }
17428 v.reset(OpARM64MOVDconst)
17429 v.AuxInt = int64ToAuxInt(0)
17430 return true
17431 }
17432
17433
17434 for {
17435 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
17436 x := v_0
17437 if v_1.Op != OpARM64MVN {
17438 continue
17439 }
17440 y := v_1.Args[0]
17441 v.reset(OpARM64EON)
17442 v.AddArg2(x, y)
17443 return true
17444 }
17445 break
17446 }
17447
17448
17449
17450 for {
17451 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
17452 x0 := v_0
17453 x1 := v_1
17454 if x1.Op != OpARM64SLLconst {
17455 continue
17456 }
17457 c := auxIntToInt64(x1.AuxInt)
17458 y := x1.Args[0]
17459 if !(clobberIfDead(x1)) {
17460 continue
17461 }
17462 v.reset(OpARM64XORshiftLL)
17463 v.AuxInt = int64ToAuxInt(c)
17464 v.AddArg2(x0, y)
17465 return true
17466 }
17467 break
17468 }
17469
17470
17471
17472 for {
17473 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
17474 x0 := v_0
17475 x1 := v_1
17476 if x1.Op != OpARM64SRLconst {
17477 continue
17478 }
17479 c := auxIntToInt64(x1.AuxInt)
17480 y := x1.Args[0]
17481 if !(clobberIfDead(x1)) {
17482 continue
17483 }
17484 v.reset(OpARM64XORshiftRL)
17485 v.AuxInt = int64ToAuxInt(c)
17486 v.AddArg2(x0, y)
17487 return true
17488 }
17489 break
17490 }
17491
17492
17493
17494 for {
17495 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
17496 x0 := v_0
17497 x1 := v_1
17498 if x1.Op != OpARM64SRAconst {
17499 continue
17500 }
17501 c := auxIntToInt64(x1.AuxInt)
17502 y := x1.Args[0]
17503 if !(clobberIfDead(x1)) {
17504 continue
17505 }
17506 v.reset(OpARM64XORshiftRA)
17507 v.AuxInt = int64ToAuxInt(c)
17508 v.AddArg2(x0, y)
17509 return true
17510 }
17511 break
17512 }
17513
17514
17515
17516 for {
17517 for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
17518 x0 := v_0
17519 x1 := v_1
17520 if x1.Op != OpARM64RORconst {
17521 continue
17522 }
17523 c := auxIntToInt64(x1.AuxInt)
17524 y := x1.Args[0]
17525 if !(clobberIfDead(x1)) {
17526 continue
17527 }
17528 v.reset(OpARM64XORshiftRO)
17529 v.AuxInt = int64ToAuxInt(c)
17530 v.AddArg2(x0, y)
17531 return true
17532 }
17533 break
17534 }
17535 return false
17536 }
17537 func rewriteValueARM64_OpARM64XORconst(v *Value) bool {
17538 v_0 := v.Args[0]
17539
17540
17541 for {
17542 if auxIntToInt64(v.AuxInt) != 0 {
17543 break
17544 }
17545 x := v_0
17546 v.copyOf(x)
17547 return true
17548 }
17549
17550
17551 for {
17552 if auxIntToInt64(v.AuxInt) != -1 {
17553 break
17554 }
17555 x := v_0
17556 v.reset(OpARM64MVN)
17557 v.AddArg(x)
17558 return true
17559 }
17560
17561
17562 for {
17563 c := auxIntToInt64(v.AuxInt)
17564 if v_0.Op != OpARM64MOVDconst {
17565 break
17566 }
17567 d := auxIntToInt64(v_0.AuxInt)
17568 v.reset(OpARM64MOVDconst)
17569 v.AuxInt = int64ToAuxInt(c ^ d)
17570 return true
17571 }
17572
17573
17574 for {
17575 c := auxIntToInt64(v.AuxInt)
17576 if v_0.Op != OpARM64XORconst {
17577 break
17578 }
17579 d := auxIntToInt64(v_0.AuxInt)
17580 x := v_0.Args[0]
17581 v.reset(OpARM64XORconst)
17582 v.AuxInt = int64ToAuxInt(c ^ d)
17583 v.AddArg(x)
17584 return true
17585 }
17586 return false
17587 }
17588 func rewriteValueARM64_OpARM64XORshiftLL(v *Value) bool {
17589 v_1 := v.Args[1]
17590 v_0 := v.Args[0]
17591 b := v.Block
17592 typ := &b.Func.Config.Types
17593
17594
17595 for {
17596 d := auxIntToInt64(v.AuxInt)
17597 if v_0.Op != OpARM64MOVDconst {
17598 break
17599 }
17600 c := auxIntToInt64(v_0.AuxInt)
17601 x := v_1
17602 v.reset(OpARM64XORconst)
17603 v.AuxInt = int64ToAuxInt(c)
17604 v0 := b.NewValue0(v.Pos, OpARM64SLLconst, x.Type)
17605 v0.AuxInt = int64ToAuxInt(d)
17606 v0.AddArg(x)
17607 v.AddArg(v0)
17608 return true
17609 }
17610
17611
17612 for {
17613 d := auxIntToInt64(v.AuxInt)
17614 x := v_0
17615 if v_1.Op != OpARM64MOVDconst {
17616 break
17617 }
17618 c := auxIntToInt64(v_1.AuxInt)
17619 v.reset(OpARM64XORconst)
17620 v.AuxInt = int64ToAuxInt(int64(uint64(c) << uint64(d)))
17621 v.AddArg(x)
17622 return true
17623 }
17624
17625
17626 for {
17627 c := auxIntToInt64(v.AuxInt)
17628 if v_0.Op != OpARM64SLLconst || auxIntToInt64(v_0.AuxInt) != c {
17629 break
17630 }
17631 x := v_0.Args[0]
17632 if x != v_1 {
17633 break
17634 }
17635 v.reset(OpARM64MOVDconst)
17636 v.AuxInt = int64ToAuxInt(0)
17637 return true
17638 }
17639
17640
17641 for {
17642 if v.Type != typ.UInt16 || auxIntToInt64(v.AuxInt) != 8 || v_0.Op != OpARM64UBFX || v_0.Type != typ.UInt16 || auxIntToArm64BitField(v_0.AuxInt) != armBFAuxInt(8, 8) {
17643 break
17644 }
17645 x := v_0.Args[0]
17646 if x != v_1 {
17647 break
17648 }
17649 v.reset(OpARM64REV16W)
17650 v.AddArg(x)
17651 return true
17652 }
17653
17654
17655
17656 for {
17657 if auxIntToInt64(v.AuxInt) != 8 || v_0.Op != OpARM64UBFX || auxIntToArm64BitField(v_0.AuxInt) != armBFAuxInt(8, 24) {
17658 break
17659 }
17660 v_0_0 := v_0.Args[0]
17661 if v_0_0.Op != OpARM64ANDconst {
17662 break
17663 }
17664 c1 := auxIntToInt64(v_0_0.AuxInt)
17665 x := v_0_0.Args[0]
17666 if v_1.Op != OpARM64ANDconst {
17667 break
17668 }
17669 c2 := auxIntToInt64(v_1.AuxInt)
17670 if x != v_1.Args[0] || !(uint32(c1) == 0xff00ff00 && uint32(c2) == 0x00ff00ff) {
17671 break
17672 }
17673 v.reset(OpARM64REV16W)
17674 v.AddArg(x)
17675 return true
17676 }
17677
17678
17679
17680 for {
17681 if auxIntToInt64(v.AuxInt) != 8 || v_0.Op != OpARM64SRLconst || auxIntToInt64(v_0.AuxInt) != 8 {
17682 break
17683 }
17684 v_0_0 := v_0.Args[0]
17685 if v_0_0.Op != OpARM64ANDconst {
17686 break
17687 }
17688 c1 := auxIntToInt64(v_0_0.AuxInt)
17689 x := v_0_0.Args[0]
17690 if v_1.Op != OpARM64ANDconst {
17691 break
17692 }
17693 c2 := auxIntToInt64(v_1.AuxInt)
17694 if x != v_1.Args[0] || !(uint64(c1) == 0xff00ff00ff00ff00 && uint64(c2) == 0x00ff00ff00ff00ff) {
17695 break
17696 }
17697 v.reset(OpARM64REV16)
17698 v.AddArg(x)
17699 return true
17700 }
17701
17702
17703
17704 for {
17705 if auxIntToInt64(v.AuxInt) != 8 || v_0.Op != OpARM64SRLconst || auxIntToInt64(v_0.AuxInt) != 8 {
17706 break
17707 }
17708 v_0_0 := v_0.Args[0]
17709 if v_0_0.Op != OpARM64ANDconst {
17710 break
17711 }
17712 c1 := auxIntToInt64(v_0_0.AuxInt)
17713 x := v_0_0.Args[0]
17714 if v_1.Op != OpARM64ANDconst {
17715 break
17716 }
17717 c2 := auxIntToInt64(v_1.AuxInt)
17718 if x != v_1.Args[0] || !(uint64(c1) == 0xff00ff00 && uint64(c2) == 0x00ff00ff) {
17719 break
17720 }
17721 v.reset(OpARM64REV16)
17722 v0 := b.NewValue0(v.Pos, OpARM64ANDconst, x.Type)
17723 v0.AuxInt = int64ToAuxInt(0xffffffff)
17724 v0.AddArg(x)
17725 v.AddArg(v0)
17726 return true
17727 }
17728
17729
17730 for {
17731 c := auxIntToInt64(v.AuxInt)
17732 if v_0.Op != OpARM64SRLconst || auxIntToInt64(v_0.AuxInt) != 64-c {
17733 break
17734 }
17735 x := v_0.Args[0]
17736 x2 := v_1
17737 v.reset(OpARM64EXTRconst)
17738 v.AuxInt = int64ToAuxInt(64 - c)
17739 v.AddArg2(x2, x)
17740 return true
17741 }
17742
17743
17744
17745 for {
17746 t := v.Type
17747 c := auxIntToInt64(v.AuxInt)
17748 if v_0.Op != OpARM64UBFX {
17749 break
17750 }
17751 bfc := auxIntToArm64BitField(v_0.AuxInt)
17752 x := v_0.Args[0]
17753 x2 := v_1
17754 if !(c < 32 && t.Size() == 4 && bfc == armBFAuxInt(32-c, c)) {
17755 break
17756 }
17757 v.reset(OpARM64EXTRWconst)
17758 v.AuxInt = int64ToAuxInt(32 - c)
17759 v.AddArg2(x2, x)
17760 return true
17761 }
17762 return false
17763 }
17764 func rewriteValueARM64_OpARM64XORshiftRA(v *Value) bool {
17765 v_1 := v.Args[1]
17766 v_0 := v.Args[0]
17767 b := v.Block
17768
17769
17770 for {
17771 d := auxIntToInt64(v.AuxInt)
17772 if v_0.Op != OpARM64MOVDconst {
17773 break
17774 }
17775 c := auxIntToInt64(v_0.AuxInt)
17776 x := v_1
17777 v.reset(OpARM64XORconst)
17778 v.AuxInt = int64ToAuxInt(c)
17779 v0 := b.NewValue0(v.Pos, OpARM64SRAconst, x.Type)
17780 v0.AuxInt = int64ToAuxInt(d)
17781 v0.AddArg(x)
17782 v.AddArg(v0)
17783 return true
17784 }
17785
17786
17787 for {
17788 d := auxIntToInt64(v.AuxInt)
17789 x := v_0
17790 if v_1.Op != OpARM64MOVDconst {
17791 break
17792 }
17793 c := auxIntToInt64(v_1.AuxInt)
17794 v.reset(OpARM64XORconst)
17795 v.AuxInt = int64ToAuxInt(c >> uint64(d))
17796 v.AddArg(x)
17797 return true
17798 }
17799
17800
17801 for {
17802 c := auxIntToInt64(v.AuxInt)
17803 if v_0.Op != OpARM64SRAconst || auxIntToInt64(v_0.AuxInt) != c {
17804 break
17805 }
17806 x := v_0.Args[0]
17807 if x != v_1 {
17808 break
17809 }
17810 v.reset(OpARM64MOVDconst)
17811 v.AuxInt = int64ToAuxInt(0)
17812 return true
17813 }
17814 return false
17815 }
17816 func rewriteValueARM64_OpARM64XORshiftRL(v *Value) bool {
17817 v_1 := v.Args[1]
17818 v_0 := v.Args[0]
17819 b := v.Block
17820
17821
17822 for {
17823 d := auxIntToInt64(v.AuxInt)
17824 if v_0.Op != OpARM64MOVDconst {
17825 break
17826 }
17827 c := auxIntToInt64(v_0.AuxInt)
17828 x := v_1
17829 v.reset(OpARM64XORconst)
17830 v.AuxInt = int64ToAuxInt(c)
17831 v0 := b.NewValue0(v.Pos, OpARM64SRLconst, x.Type)
17832 v0.AuxInt = int64ToAuxInt(d)
17833 v0.AddArg(x)
17834 v.AddArg(v0)
17835 return true
17836 }
17837
17838
17839 for {
17840 d := auxIntToInt64(v.AuxInt)
17841 x := v_0
17842 if v_1.Op != OpARM64MOVDconst {
17843 break
17844 }
17845 c := auxIntToInt64(v_1.AuxInt)
17846 v.reset(OpARM64XORconst)
17847 v.AuxInt = int64ToAuxInt(int64(uint64(c) >> uint64(d)))
17848 v.AddArg(x)
17849 return true
17850 }
17851
17852
17853 for {
17854 c := auxIntToInt64(v.AuxInt)
17855 if v_0.Op != OpARM64SRLconst || auxIntToInt64(v_0.AuxInt) != c {
17856 break
17857 }
17858 x := v_0.Args[0]
17859 if x != v_1 {
17860 break
17861 }
17862 v.reset(OpARM64MOVDconst)
17863 v.AuxInt = int64ToAuxInt(0)
17864 return true
17865 }
17866 return false
17867 }
17868 func rewriteValueARM64_OpARM64XORshiftRO(v *Value) bool {
17869 v_1 := v.Args[1]
17870 v_0 := v.Args[0]
17871 b := v.Block
17872
17873
17874 for {
17875 d := auxIntToInt64(v.AuxInt)
17876 if v_0.Op != OpARM64MOVDconst {
17877 break
17878 }
17879 c := auxIntToInt64(v_0.AuxInt)
17880 x := v_1
17881 v.reset(OpARM64XORconst)
17882 v.AuxInt = int64ToAuxInt(c)
17883 v0 := b.NewValue0(v.Pos, OpARM64RORconst, x.Type)
17884 v0.AuxInt = int64ToAuxInt(d)
17885 v0.AddArg(x)
17886 v.AddArg(v0)
17887 return true
17888 }
17889
17890
17891 for {
17892 d := auxIntToInt64(v.AuxInt)
17893 x := v_0
17894 if v_1.Op != OpARM64MOVDconst {
17895 break
17896 }
17897 c := auxIntToInt64(v_1.AuxInt)
17898 v.reset(OpARM64XORconst)
17899 v.AuxInt = int64ToAuxInt(rotateRight64(c, d))
17900 v.AddArg(x)
17901 return true
17902 }
17903
17904
17905 for {
17906 c := auxIntToInt64(v.AuxInt)
17907 if v_0.Op != OpARM64RORconst || auxIntToInt64(v_0.AuxInt) != c {
17908 break
17909 }
17910 x := v_0.Args[0]
17911 if x != v_1 {
17912 break
17913 }
17914 v.reset(OpARM64MOVDconst)
17915 v.AuxInt = int64ToAuxInt(0)
17916 return true
17917 }
17918 return false
17919 }
17920 func rewriteValueARM64_OpAddr(v *Value) bool {
17921 v_0 := v.Args[0]
17922
17923
17924 for {
17925 sym := auxToSym(v.Aux)
17926 base := v_0
17927 v.reset(OpARM64MOVDaddr)
17928 v.Aux = symToAux(sym)
17929 v.AddArg(base)
17930 return true
17931 }
17932 }
17933 func rewriteValueARM64_OpAvg64u(v *Value) bool {
17934 v_1 := v.Args[1]
17935 v_0 := v.Args[0]
17936 b := v.Block
17937
17938
17939 for {
17940 t := v.Type
17941 x := v_0
17942 y := v_1
17943 v.reset(OpARM64ADD)
17944 v0 := b.NewValue0(v.Pos, OpARM64SRLconst, t)
17945 v0.AuxInt = int64ToAuxInt(1)
17946 v1 := b.NewValue0(v.Pos, OpARM64SUB, t)
17947 v1.AddArg2(x, y)
17948 v0.AddArg(v1)
17949 v.AddArg2(v0, y)
17950 return true
17951 }
17952 }
17953 func rewriteValueARM64_OpBitLen32(v *Value) bool {
17954 v_0 := v.Args[0]
17955 b := v.Block
17956 typ := &b.Func.Config.Types
17957
17958
17959 for {
17960 x := v_0
17961 v.reset(OpARM64SUB)
17962 v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
17963 v0.AuxInt = int64ToAuxInt(32)
17964 v1 := b.NewValue0(v.Pos, OpARM64CLZW, typ.Int)
17965 v1.AddArg(x)
17966 v.AddArg2(v0, v1)
17967 return true
17968 }
17969 }
17970 func rewriteValueARM64_OpBitLen64(v *Value) bool {
17971 v_0 := v.Args[0]
17972 b := v.Block
17973 typ := &b.Func.Config.Types
17974
17975
17976 for {
17977 x := v_0
17978 v.reset(OpARM64SUB)
17979 v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
17980 v0.AuxInt = int64ToAuxInt(64)
17981 v1 := b.NewValue0(v.Pos, OpARM64CLZ, typ.Int)
17982 v1.AddArg(x)
17983 v.AddArg2(v0, v1)
17984 return true
17985 }
17986 }
17987 func rewriteValueARM64_OpBitRev16(v *Value) bool {
17988 v_0 := v.Args[0]
17989 b := v.Block
17990 typ := &b.Func.Config.Types
17991
17992
17993 for {
17994 x := v_0
17995 v.reset(OpARM64SRLconst)
17996 v.AuxInt = int64ToAuxInt(48)
17997 v0 := b.NewValue0(v.Pos, OpARM64RBIT, typ.UInt64)
17998 v0.AddArg(x)
17999 v.AddArg(v0)
18000 return true
18001 }
18002 }
18003 func rewriteValueARM64_OpBitRev8(v *Value) bool {
18004 v_0 := v.Args[0]
18005 b := v.Block
18006 typ := &b.Func.Config.Types
18007
18008
18009 for {
18010 x := v_0
18011 v.reset(OpARM64SRLconst)
18012 v.AuxInt = int64ToAuxInt(56)
18013 v0 := b.NewValue0(v.Pos, OpARM64RBIT, typ.UInt64)
18014 v0.AddArg(x)
18015 v.AddArg(v0)
18016 return true
18017 }
18018 }
18019 func rewriteValueARM64_OpCondSelect(v *Value) bool {
18020 v_2 := v.Args[2]
18021 v_1 := v.Args[1]
18022 v_0 := v.Args[0]
18023 b := v.Block
18024
18025
18026
18027 for {
18028 x := v_0
18029 y := v_1
18030 boolval := v_2
18031 if !(flagArg(boolval) != nil) {
18032 break
18033 }
18034 v.reset(OpARM64CSEL)
18035 v.AuxInt = opToAuxInt(boolval.Op)
18036 v.AddArg3(x, y, flagArg(boolval))
18037 return true
18038 }
18039
18040
18041
18042 for {
18043 x := v_0
18044 y := v_1
18045 boolval := v_2
18046 if !(flagArg(boolval) == nil) {
18047 break
18048 }
18049 v.reset(OpARM64CSEL)
18050 v.AuxInt = opToAuxInt(OpARM64NotEqual)
18051 v0 := b.NewValue0(v.Pos, OpARM64TSTWconst, types.TypeFlags)
18052 v0.AuxInt = int32ToAuxInt(1)
18053 v0.AddArg(boolval)
18054 v.AddArg3(x, y, v0)
18055 return true
18056 }
18057 return false
18058 }
18059 func rewriteValueARM64_OpConst16(v *Value) bool {
18060
18061
18062 for {
18063 val := auxIntToInt16(v.AuxInt)
18064 v.reset(OpARM64MOVDconst)
18065 v.AuxInt = int64ToAuxInt(int64(val))
18066 return true
18067 }
18068 }
18069 func rewriteValueARM64_OpConst32(v *Value) bool {
18070
18071
18072 for {
18073 val := auxIntToInt32(v.AuxInt)
18074 v.reset(OpARM64MOVDconst)
18075 v.AuxInt = int64ToAuxInt(int64(val))
18076 return true
18077 }
18078 }
18079 func rewriteValueARM64_OpConst32F(v *Value) bool {
18080
18081
18082 for {
18083 val := auxIntToFloat32(v.AuxInt)
18084 v.reset(OpARM64FMOVSconst)
18085 v.AuxInt = float64ToAuxInt(float64(val))
18086 return true
18087 }
18088 }
18089 func rewriteValueARM64_OpConst64(v *Value) bool {
18090
18091
18092 for {
18093 val := auxIntToInt64(v.AuxInt)
18094 v.reset(OpARM64MOVDconst)
18095 v.AuxInt = int64ToAuxInt(int64(val))
18096 return true
18097 }
18098 }
18099 func rewriteValueARM64_OpConst64F(v *Value) bool {
18100
18101
18102 for {
18103 val := auxIntToFloat64(v.AuxInt)
18104 v.reset(OpARM64FMOVDconst)
18105 v.AuxInt = float64ToAuxInt(float64(val))
18106 return true
18107 }
18108 }
18109 func rewriteValueARM64_OpConst8(v *Value) bool {
18110
18111
18112 for {
18113 val := auxIntToInt8(v.AuxInt)
18114 v.reset(OpARM64MOVDconst)
18115 v.AuxInt = int64ToAuxInt(int64(val))
18116 return true
18117 }
18118 }
18119 func rewriteValueARM64_OpConstBool(v *Value) bool {
18120
18121
18122 for {
18123 t := auxIntToBool(v.AuxInt)
18124 v.reset(OpARM64MOVDconst)
18125 v.AuxInt = int64ToAuxInt(b2i(t))
18126 return true
18127 }
18128 }
18129 func rewriteValueARM64_OpConstNil(v *Value) bool {
18130
18131
18132 for {
18133 v.reset(OpARM64MOVDconst)
18134 v.AuxInt = int64ToAuxInt(0)
18135 return true
18136 }
18137 }
18138 func rewriteValueARM64_OpCtz16(v *Value) bool {
18139 v_0 := v.Args[0]
18140 b := v.Block
18141 typ := &b.Func.Config.Types
18142
18143
18144 for {
18145 t := v.Type
18146 x := v_0
18147 v.reset(OpARM64CLZW)
18148 v.Type = t
18149 v0 := b.NewValue0(v.Pos, OpARM64RBITW, typ.UInt32)
18150 v1 := b.NewValue0(v.Pos, OpARM64ORconst, typ.UInt32)
18151 v1.AuxInt = int64ToAuxInt(0x10000)
18152 v1.AddArg(x)
18153 v0.AddArg(v1)
18154 v.AddArg(v0)
18155 return true
18156 }
18157 }
18158 func rewriteValueARM64_OpCtz32(v *Value) bool {
18159 v_0 := v.Args[0]
18160 b := v.Block
18161
18162
18163 for {
18164 t := v.Type
18165 x := v_0
18166 v.reset(OpARM64CLZW)
18167 v0 := b.NewValue0(v.Pos, OpARM64RBITW, t)
18168 v0.AddArg(x)
18169 v.AddArg(v0)
18170 return true
18171 }
18172 }
18173 func rewriteValueARM64_OpCtz64(v *Value) bool {
18174 v_0 := v.Args[0]
18175 b := v.Block
18176
18177
18178 for {
18179 t := v.Type
18180 x := v_0
18181 v.reset(OpARM64CLZ)
18182 v0 := b.NewValue0(v.Pos, OpARM64RBIT, t)
18183 v0.AddArg(x)
18184 v.AddArg(v0)
18185 return true
18186 }
18187 }
18188 func rewriteValueARM64_OpCtz8(v *Value) bool {
18189 v_0 := v.Args[0]
18190 b := v.Block
18191 typ := &b.Func.Config.Types
18192
18193
18194 for {
18195 t := v.Type
18196 x := v_0
18197 v.reset(OpARM64CLZW)
18198 v.Type = t
18199 v0 := b.NewValue0(v.Pos, OpARM64RBITW, typ.UInt32)
18200 v1 := b.NewValue0(v.Pos, OpARM64ORconst, typ.UInt32)
18201 v1.AuxInt = int64ToAuxInt(0x100)
18202 v1.AddArg(x)
18203 v0.AddArg(v1)
18204 v.AddArg(v0)
18205 return true
18206 }
18207 }
18208 func rewriteValueARM64_OpDiv16(v *Value) bool {
18209 v_1 := v.Args[1]
18210 v_0 := v.Args[0]
18211 b := v.Block
18212 typ := &b.Func.Config.Types
18213
18214
18215 for {
18216 if auxIntToBool(v.AuxInt) != false {
18217 break
18218 }
18219 x := v_0
18220 y := v_1
18221 v.reset(OpARM64DIVW)
18222 v0 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
18223 v0.AddArg(x)
18224 v1 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
18225 v1.AddArg(y)
18226 v.AddArg2(v0, v1)
18227 return true
18228 }
18229 return false
18230 }
18231 func rewriteValueARM64_OpDiv16u(v *Value) bool {
18232 v_1 := v.Args[1]
18233 v_0 := v.Args[0]
18234 b := v.Block
18235 typ := &b.Func.Config.Types
18236
18237
18238 for {
18239 x := v_0
18240 y := v_1
18241 v.reset(OpARM64UDIVW)
18242 v0 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
18243 v0.AddArg(x)
18244 v1 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
18245 v1.AddArg(y)
18246 v.AddArg2(v0, v1)
18247 return true
18248 }
18249 }
18250 func rewriteValueARM64_OpDiv32(v *Value) bool {
18251 v_1 := v.Args[1]
18252 v_0 := v.Args[0]
18253
18254
18255 for {
18256 if auxIntToBool(v.AuxInt) != false {
18257 break
18258 }
18259 x := v_0
18260 y := v_1
18261 v.reset(OpARM64DIVW)
18262 v.AddArg2(x, y)
18263 return true
18264 }
18265 return false
18266 }
18267 func rewriteValueARM64_OpDiv64(v *Value) bool {
18268 v_1 := v.Args[1]
18269 v_0 := v.Args[0]
18270
18271
18272 for {
18273 if auxIntToBool(v.AuxInt) != false {
18274 break
18275 }
18276 x := v_0
18277 y := v_1
18278 v.reset(OpARM64DIV)
18279 v.AddArg2(x, y)
18280 return true
18281 }
18282 return false
18283 }
18284 func rewriteValueARM64_OpDiv8(v *Value) bool {
18285 v_1 := v.Args[1]
18286 v_0 := v.Args[0]
18287 b := v.Block
18288 typ := &b.Func.Config.Types
18289
18290
18291 for {
18292 x := v_0
18293 y := v_1
18294 v.reset(OpARM64DIVW)
18295 v0 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
18296 v0.AddArg(x)
18297 v1 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
18298 v1.AddArg(y)
18299 v.AddArg2(v0, v1)
18300 return true
18301 }
18302 }
18303 func rewriteValueARM64_OpDiv8u(v *Value) bool {
18304 v_1 := v.Args[1]
18305 v_0 := v.Args[0]
18306 b := v.Block
18307 typ := &b.Func.Config.Types
18308
18309
18310 for {
18311 x := v_0
18312 y := v_1
18313 v.reset(OpARM64UDIVW)
18314 v0 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
18315 v0.AddArg(x)
18316 v1 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
18317 v1.AddArg(y)
18318 v.AddArg2(v0, v1)
18319 return true
18320 }
18321 }
18322 func rewriteValueARM64_OpEq16(v *Value) bool {
18323 v_1 := v.Args[1]
18324 v_0 := v.Args[0]
18325 b := v.Block
18326 typ := &b.Func.Config.Types
18327
18328
18329 for {
18330 x := v_0
18331 y := v_1
18332 v.reset(OpARM64Equal)
18333 v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
18334 v1 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
18335 v1.AddArg(x)
18336 v2 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
18337 v2.AddArg(y)
18338 v0.AddArg2(v1, v2)
18339 v.AddArg(v0)
18340 return true
18341 }
18342 }
18343 func rewriteValueARM64_OpEq32(v *Value) bool {
18344 v_1 := v.Args[1]
18345 v_0 := v.Args[0]
18346 b := v.Block
18347
18348
18349 for {
18350 x := v_0
18351 y := v_1
18352 v.reset(OpARM64Equal)
18353 v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
18354 v0.AddArg2(x, y)
18355 v.AddArg(v0)
18356 return true
18357 }
18358 }
18359 func rewriteValueARM64_OpEq32F(v *Value) bool {
18360 v_1 := v.Args[1]
18361 v_0 := v.Args[0]
18362 b := v.Block
18363
18364
18365 for {
18366 x := v_0
18367 y := v_1
18368 v.reset(OpARM64Equal)
18369 v0 := b.NewValue0(v.Pos, OpARM64FCMPS, types.TypeFlags)
18370 v0.AddArg2(x, y)
18371 v.AddArg(v0)
18372 return true
18373 }
18374 }
18375 func rewriteValueARM64_OpEq64(v *Value) bool {
18376 v_1 := v.Args[1]
18377 v_0 := v.Args[0]
18378 b := v.Block
18379
18380
18381 for {
18382 x := v_0
18383 y := v_1
18384 v.reset(OpARM64Equal)
18385 v0 := b.NewValue0(v.Pos, OpARM64CMP, types.TypeFlags)
18386 v0.AddArg2(x, y)
18387 v.AddArg(v0)
18388 return true
18389 }
18390 }
18391 func rewriteValueARM64_OpEq64F(v *Value) bool {
18392 v_1 := v.Args[1]
18393 v_0 := v.Args[0]
18394 b := v.Block
18395
18396
18397 for {
18398 x := v_0
18399 y := v_1
18400 v.reset(OpARM64Equal)
18401 v0 := b.NewValue0(v.Pos, OpARM64FCMPD, types.TypeFlags)
18402 v0.AddArg2(x, y)
18403 v.AddArg(v0)
18404 return true
18405 }
18406 }
18407 func rewriteValueARM64_OpEq8(v *Value) bool {
18408 v_1 := v.Args[1]
18409 v_0 := v.Args[0]
18410 b := v.Block
18411 typ := &b.Func.Config.Types
18412
18413
18414 for {
18415 x := v_0
18416 y := v_1
18417 v.reset(OpARM64Equal)
18418 v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
18419 v1 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
18420 v1.AddArg(x)
18421 v2 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
18422 v2.AddArg(y)
18423 v0.AddArg2(v1, v2)
18424 v.AddArg(v0)
18425 return true
18426 }
18427 }
18428 func rewriteValueARM64_OpEqB(v *Value) bool {
18429 v_1 := v.Args[1]
18430 v_0 := v.Args[0]
18431 b := v.Block
18432 typ := &b.Func.Config.Types
18433
18434
18435 for {
18436 x := v_0
18437 y := v_1
18438 v.reset(OpARM64XOR)
18439 v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
18440 v0.AuxInt = int64ToAuxInt(1)
18441 v1 := b.NewValue0(v.Pos, OpARM64XOR, typ.Bool)
18442 v1.AddArg2(x, y)
18443 v.AddArg2(v0, v1)
18444 return true
18445 }
18446 }
18447 func rewriteValueARM64_OpEqPtr(v *Value) bool {
18448 v_1 := v.Args[1]
18449 v_0 := v.Args[0]
18450 b := v.Block
18451
18452
18453 for {
18454 x := v_0
18455 y := v_1
18456 v.reset(OpARM64Equal)
18457 v0 := b.NewValue0(v.Pos, OpARM64CMP, types.TypeFlags)
18458 v0.AddArg2(x, y)
18459 v.AddArg(v0)
18460 return true
18461 }
18462 }
18463 func rewriteValueARM64_OpFMA(v *Value) bool {
18464 v_2 := v.Args[2]
18465 v_1 := v.Args[1]
18466 v_0 := v.Args[0]
18467
18468
18469 for {
18470 x := v_0
18471 y := v_1
18472 z := v_2
18473 v.reset(OpARM64FMADDD)
18474 v.AddArg3(z, x, y)
18475 return true
18476 }
18477 }
18478 func rewriteValueARM64_OpHmul32(v *Value) bool {
18479 v_1 := v.Args[1]
18480 v_0 := v.Args[0]
18481 b := v.Block
18482 typ := &b.Func.Config.Types
18483
18484
18485 for {
18486 x := v_0
18487 y := v_1
18488 v.reset(OpARM64SRAconst)
18489 v.AuxInt = int64ToAuxInt(32)
18490 v0 := b.NewValue0(v.Pos, OpARM64MULL, typ.Int64)
18491 v0.AddArg2(x, y)
18492 v.AddArg(v0)
18493 return true
18494 }
18495 }
18496 func rewriteValueARM64_OpHmul32u(v *Value) bool {
18497 v_1 := v.Args[1]
18498 v_0 := v.Args[0]
18499 b := v.Block
18500 typ := &b.Func.Config.Types
18501
18502
18503 for {
18504 x := v_0
18505 y := v_1
18506 v.reset(OpARM64SRAconst)
18507 v.AuxInt = int64ToAuxInt(32)
18508 v0 := b.NewValue0(v.Pos, OpARM64UMULL, typ.UInt64)
18509 v0.AddArg2(x, y)
18510 v.AddArg(v0)
18511 return true
18512 }
18513 }
18514 func rewriteValueARM64_OpIsInBounds(v *Value) bool {
18515 v_1 := v.Args[1]
18516 v_0 := v.Args[0]
18517 b := v.Block
18518
18519
18520 for {
18521 idx := v_0
18522 len := v_1
18523 v.reset(OpARM64LessThanU)
18524 v0 := b.NewValue0(v.Pos, OpARM64CMP, types.TypeFlags)
18525 v0.AddArg2(idx, len)
18526 v.AddArg(v0)
18527 return true
18528 }
18529 }
18530 func rewriteValueARM64_OpIsNonNil(v *Value) bool {
18531 v_0 := v.Args[0]
18532 b := v.Block
18533
18534
18535 for {
18536 ptr := v_0
18537 v.reset(OpARM64NotEqual)
18538 v0 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
18539 v0.AuxInt = int64ToAuxInt(0)
18540 v0.AddArg(ptr)
18541 v.AddArg(v0)
18542 return true
18543 }
18544 }
18545 func rewriteValueARM64_OpIsSliceInBounds(v *Value) bool {
18546 v_1 := v.Args[1]
18547 v_0 := v.Args[0]
18548 b := v.Block
18549
18550
18551 for {
18552 idx := v_0
18553 len := v_1
18554 v.reset(OpARM64LessEqualU)
18555 v0 := b.NewValue0(v.Pos, OpARM64CMP, types.TypeFlags)
18556 v0.AddArg2(idx, len)
18557 v.AddArg(v0)
18558 return true
18559 }
18560 }
18561 func rewriteValueARM64_OpLeq16(v *Value) bool {
18562 v_1 := v.Args[1]
18563 v_0 := v.Args[0]
18564 b := v.Block
18565 typ := &b.Func.Config.Types
18566
18567
18568 for {
18569 x := v_0
18570 y := v_1
18571 v.reset(OpARM64LessEqual)
18572 v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
18573 v1 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
18574 v1.AddArg(x)
18575 v2 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
18576 v2.AddArg(y)
18577 v0.AddArg2(v1, v2)
18578 v.AddArg(v0)
18579 return true
18580 }
18581 }
18582 func rewriteValueARM64_OpLeq16U(v *Value) bool {
18583 v_1 := v.Args[1]
18584 v_0 := v.Args[0]
18585 b := v.Block
18586 typ := &b.Func.Config.Types
18587
18588
18589 for {
18590 x := v_0
18591 zero := v_1
18592 if zero.Op != OpARM64MOVDconst || auxIntToInt64(zero.AuxInt) != 0 {
18593 break
18594 }
18595 v.reset(OpEq16)
18596 v.AddArg2(x, zero)
18597 return true
18598 }
18599
18600
18601 for {
18602 if v_0.Op != OpARM64MOVDconst || auxIntToInt64(v_0.AuxInt) != 1 {
18603 break
18604 }
18605 x := v_1
18606 v.reset(OpNeq16)
18607 v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
18608 v0.AuxInt = int64ToAuxInt(0)
18609 v.AddArg2(v0, x)
18610 return true
18611 }
18612
18613
18614 for {
18615 x := v_0
18616 y := v_1
18617 v.reset(OpARM64LessEqualU)
18618 v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
18619 v1 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
18620 v1.AddArg(x)
18621 v2 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
18622 v2.AddArg(y)
18623 v0.AddArg2(v1, v2)
18624 v.AddArg(v0)
18625 return true
18626 }
18627 }
18628 func rewriteValueARM64_OpLeq32(v *Value) bool {
18629 v_1 := v.Args[1]
18630 v_0 := v.Args[0]
18631 b := v.Block
18632
18633
18634 for {
18635 x := v_0
18636 y := v_1
18637 v.reset(OpARM64LessEqual)
18638 v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
18639 v0.AddArg2(x, y)
18640 v.AddArg(v0)
18641 return true
18642 }
18643 }
18644 func rewriteValueARM64_OpLeq32F(v *Value) bool {
18645 v_1 := v.Args[1]
18646 v_0 := v.Args[0]
18647 b := v.Block
18648
18649
18650 for {
18651 x := v_0
18652 y := v_1
18653 v.reset(OpARM64LessEqualF)
18654 v0 := b.NewValue0(v.Pos, OpARM64FCMPS, types.TypeFlags)
18655 v0.AddArg2(x, y)
18656 v.AddArg(v0)
18657 return true
18658 }
18659 }
18660 func rewriteValueARM64_OpLeq32U(v *Value) bool {
18661 v_1 := v.Args[1]
18662 v_0 := v.Args[0]
18663 b := v.Block
18664 typ := &b.Func.Config.Types
18665
18666
18667 for {
18668 x := v_0
18669 zero := v_1
18670 if zero.Op != OpARM64MOVDconst || auxIntToInt64(zero.AuxInt) != 0 {
18671 break
18672 }
18673 v.reset(OpEq32)
18674 v.AddArg2(x, zero)
18675 return true
18676 }
18677
18678
18679 for {
18680 if v_0.Op != OpARM64MOVDconst || auxIntToInt64(v_0.AuxInt) != 1 {
18681 break
18682 }
18683 x := v_1
18684 v.reset(OpNeq32)
18685 v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
18686 v0.AuxInt = int64ToAuxInt(0)
18687 v.AddArg2(v0, x)
18688 return true
18689 }
18690
18691
18692 for {
18693 x := v_0
18694 y := v_1
18695 v.reset(OpARM64LessEqualU)
18696 v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
18697 v0.AddArg2(x, y)
18698 v.AddArg(v0)
18699 return true
18700 }
18701 }
18702 func rewriteValueARM64_OpLeq64(v *Value) bool {
18703 v_1 := v.Args[1]
18704 v_0 := v.Args[0]
18705 b := v.Block
18706
18707
18708 for {
18709 x := v_0
18710 y := v_1
18711 v.reset(OpARM64LessEqual)
18712 v0 := b.NewValue0(v.Pos, OpARM64CMP, types.TypeFlags)
18713 v0.AddArg2(x, y)
18714 v.AddArg(v0)
18715 return true
18716 }
18717 }
18718 func rewriteValueARM64_OpLeq64F(v *Value) bool {
18719 v_1 := v.Args[1]
18720 v_0 := v.Args[0]
18721 b := v.Block
18722
18723
18724 for {
18725 x := v_0
18726 y := v_1
18727 v.reset(OpARM64LessEqualF)
18728 v0 := b.NewValue0(v.Pos, OpARM64FCMPD, types.TypeFlags)
18729 v0.AddArg2(x, y)
18730 v.AddArg(v0)
18731 return true
18732 }
18733 }
18734 func rewriteValueARM64_OpLeq64U(v *Value) bool {
18735 v_1 := v.Args[1]
18736 v_0 := v.Args[0]
18737 b := v.Block
18738 typ := &b.Func.Config.Types
18739
18740
18741 for {
18742 x := v_0
18743 zero := v_1
18744 if zero.Op != OpARM64MOVDconst || auxIntToInt64(zero.AuxInt) != 0 {
18745 break
18746 }
18747 v.reset(OpEq64)
18748 v.AddArg2(x, zero)
18749 return true
18750 }
18751
18752
18753 for {
18754 if v_0.Op != OpARM64MOVDconst || auxIntToInt64(v_0.AuxInt) != 1 {
18755 break
18756 }
18757 x := v_1
18758 v.reset(OpNeq64)
18759 v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
18760 v0.AuxInt = int64ToAuxInt(0)
18761 v.AddArg2(v0, x)
18762 return true
18763 }
18764
18765
18766 for {
18767 x := v_0
18768 y := v_1
18769 v.reset(OpARM64LessEqualU)
18770 v0 := b.NewValue0(v.Pos, OpARM64CMP, types.TypeFlags)
18771 v0.AddArg2(x, y)
18772 v.AddArg(v0)
18773 return true
18774 }
18775 }
18776 func rewriteValueARM64_OpLeq8(v *Value) bool {
18777 v_1 := v.Args[1]
18778 v_0 := v.Args[0]
18779 b := v.Block
18780 typ := &b.Func.Config.Types
18781
18782
18783 for {
18784 x := v_0
18785 y := v_1
18786 v.reset(OpARM64LessEqual)
18787 v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
18788 v1 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
18789 v1.AddArg(x)
18790 v2 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
18791 v2.AddArg(y)
18792 v0.AddArg2(v1, v2)
18793 v.AddArg(v0)
18794 return true
18795 }
18796 }
18797 func rewriteValueARM64_OpLeq8U(v *Value) bool {
18798 v_1 := v.Args[1]
18799 v_0 := v.Args[0]
18800 b := v.Block
18801 typ := &b.Func.Config.Types
18802
18803
18804 for {
18805 x := v_0
18806 zero := v_1
18807 if zero.Op != OpARM64MOVDconst || auxIntToInt64(zero.AuxInt) != 0 {
18808 break
18809 }
18810 v.reset(OpEq8)
18811 v.AddArg2(x, zero)
18812 return true
18813 }
18814
18815
18816 for {
18817 if v_0.Op != OpARM64MOVDconst || auxIntToInt64(v_0.AuxInt) != 1 {
18818 break
18819 }
18820 x := v_1
18821 v.reset(OpNeq8)
18822 v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
18823 v0.AuxInt = int64ToAuxInt(0)
18824 v.AddArg2(v0, x)
18825 return true
18826 }
18827
18828
18829 for {
18830 x := v_0
18831 y := v_1
18832 v.reset(OpARM64LessEqualU)
18833 v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
18834 v1 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
18835 v1.AddArg(x)
18836 v2 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
18837 v2.AddArg(y)
18838 v0.AddArg2(v1, v2)
18839 v.AddArg(v0)
18840 return true
18841 }
18842 }
18843 func rewriteValueARM64_OpLess16(v *Value) bool {
18844 v_1 := v.Args[1]
18845 v_0 := v.Args[0]
18846 b := v.Block
18847 typ := &b.Func.Config.Types
18848
18849
18850 for {
18851 x := v_0
18852 y := v_1
18853 v.reset(OpARM64LessThan)
18854 v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
18855 v1 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
18856 v1.AddArg(x)
18857 v2 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
18858 v2.AddArg(y)
18859 v0.AddArg2(v1, v2)
18860 v.AddArg(v0)
18861 return true
18862 }
18863 }
18864 func rewriteValueARM64_OpLess16U(v *Value) bool {
18865 v_1 := v.Args[1]
18866 v_0 := v.Args[0]
18867 b := v.Block
18868 typ := &b.Func.Config.Types
18869
18870
18871 for {
18872 zero := v_0
18873 if zero.Op != OpARM64MOVDconst || auxIntToInt64(zero.AuxInt) != 0 {
18874 break
18875 }
18876 x := v_1
18877 v.reset(OpNeq16)
18878 v.AddArg2(zero, x)
18879 return true
18880 }
18881
18882
18883 for {
18884 x := v_0
18885 if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 1 {
18886 break
18887 }
18888 v.reset(OpEq16)
18889 v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
18890 v0.AuxInt = int64ToAuxInt(0)
18891 v.AddArg2(x, v0)
18892 return true
18893 }
18894
18895
18896 for {
18897 x := v_0
18898 y := v_1
18899 v.reset(OpARM64LessThanU)
18900 v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
18901 v1 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
18902 v1.AddArg(x)
18903 v2 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
18904 v2.AddArg(y)
18905 v0.AddArg2(v1, v2)
18906 v.AddArg(v0)
18907 return true
18908 }
18909 }
18910 func rewriteValueARM64_OpLess32(v *Value) bool {
18911 v_1 := v.Args[1]
18912 v_0 := v.Args[0]
18913 b := v.Block
18914
18915
18916 for {
18917 x := v_0
18918 y := v_1
18919 v.reset(OpARM64LessThan)
18920 v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
18921 v0.AddArg2(x, y)
18922 v.AddArg(v0)
18923 return true
18924 }
18925 }
18926 func rewriteValueARM64_OpLess32F(v *Value) bool {
18927 v_1 := v.Args[1]
18928 v_0 := v.Args[0]
18929 b := v.Block
18930
18931
18932 for {
18933 x := v_0
18934 y := v_1
18935 v.reset(OpARM64LessThanF)
18936 v0 := b.NewValue0(v.Pos, OpARM64FCMPS, types.TypeFlags)
18937 v0.AddArg2(x, y)
18938 v.AddArg(v0)
18939 return true
18940 }
18941 }
18942 func rewriteValueARM64_OpLess32U(v *Value) bool {
18943 v_1 := v.Args[1]
18944 v_0 := v.Args[0]
18945 b := v.Block
18946 typ := &b.Func.Config.Types
18947
18948
18949 for {
18950 zero := v_0
18951 if zero.Op != OpARM64MOVDconst || auxIntToInt64(zero.AuxInt) != 0 {
18952 break
18953 }
18954 x := v_1
18955 v.reset(OpNeq32)
18956 v.AddArg2(zero, x)
18957 return true
18958 }
18959
18960
18961 for {
18962 x := v_0
18963 if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 1 {
18964 break
18965 }
18966 v.reset(OpEq32)
18967 v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
18968 v0.AuxInt = int64ToAuxInt(0)
18969 v.AddArg2(x, v0)
18970 return true
18971 }
18972
18973
18974 for {
18975 x := v_0
18976 y := v_1
18977 v.reset(OpARM64LessThanU)
18978 v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
18979 v0.AddArg2(x, y)
18980 v.AddArg(v0)
18981 return true
18982 }
18983 }
18984 func rewriteValueARM64_OpLess64(v *Value) bool {
18985 v_1 := v.Args[1]
18986 v_0 := v.Args[0]
18987 b := v.Block
18988
18989
18990 for {
18991 x := v_0
18992 y := v_1
18993 v.reset(OpARM64LessThan)
18994 v0 := b.NewValue0(v.Pos, OpARM64CMP, types.TypeFlags)
18995 v0.AddArg2(x, y)
18996 v.AddArg(v0)
18997 return true
18998 }
18999 }
19000 func rewriteValueARM64_OpLess64F(v *Value) bool {
19001 v_1 := v.Args[1]
19002 v_0 := v.Args[0]
19003 b := v.Block
19004
19005
19006 for {
19007 x := v_0
19008 y := v_1
19009 v.reset(OpARM64LessThanF)
19010 v0 := b.NewValue0(v.Pos, OpARM64FCMPD, types.TypeFlags)
19011 v0.AddArg2(x, y)
19012 v.AddArg(v0)
19013 return true
19014 }
19015 }
19016 func rewriteValueARM64_OpLess64U(v *Value) bool {
19017 v_1 := v.Args[1]
19018 v_0 := v.Args[0]
19019 b := v.Block
19020 typ := &b.Func.Config.Types
19021
19022
19023 for {
19024 zero := v_0
19025 if zero.Op != OpARM64MOVDconst || auxIntToInt64(zero.AuxInt) != 0 {
19026 break
19027 }
19028 x := v_1
19029 v.reset(OpNeq64)
19030 v.AddArg2(zero, x)
19031 return true
19032 }
19033
19034
19035 for {
19036 x := v_0
19037 if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 1 {
19038 break
19039 }
19040 v.reset(OpEq64)
19041 v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
19042 v0.AuxInt = int64ToAuxInt(0)
19043 v.AddArg2(x, v0)
19044 return true
19045 }
19046
19047
19048 for {
19049 x := v_0
19050 y := v_1
19051 v.reset(OpARM64LessThanU)
19052 v0 := b.NewValue0(v.Pos, OpARM64CMP, types.TypeFlags)
19053 v0.AddArg2(x, y)
19054 v.AddArg(v0)
19055 return true
19056 }
19057 }
19058 func rewriteValueARM64_OpLess8(v *Value) bool {
19059 v_1 := v.Args[1]
19060 v_0 := v.Args[0]
19061 b := v.Block
19062 typ := &b.Func.Config.Types
19063
19064
19065 for {
19066 x := v_0
19067 y := v_1
19068 v.reset(OpARM64LessThan)
19069 v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
19070 v1 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
19071 v1.AddArg(x)
19072 v2 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
19073 v2.AddArg(y)
19074 v0.AddArg2(v1, v2)
19075 v.AddArg(v0)
19076 return true
19077 }
19078 }
19079 func rewriteValueARM64_OpLess8U(v *Value) bool {
19080 v_1 := v.Args[1]
19081 v_0 := v.Args[0]
19082 b := v.Block
19083 typ := &b.Func.Config.Types
19084
19085
19086 for {
19087 zero := v_0
19088 if zero.Op != OpARM64MOVDconst || auxIntToInt64(zero.AuxInt) != 0 {
19089 break
19090 }
19091 x := v_1
19092 v.reset(OpNeq8)
19093 v.AddArg2(zero, x)
19094 return true
19095 }
19096
19097
19098 for {
19099 x := v_0
19100 if v_1.Op != OpARM64MOVDconst || auxIntToInt64(v_1.AuxInt) != 1 {
19101 break
19102 }
19103 v.reset(OpEq8)
19104 v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
19105 v0.AuxInt = int64ToAuxInt(0)
19106 v.AddArg2(x, v0)
19107 return true
19108 }
19109
19110
19111 for {
19112 x := v_0
19113 y := v_1
19114 v.reset(OpARM64LessThanU)
19115 v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
19116 v1 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
19117 v1.AddArg(x)
19118 v2 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
19119 v2.AddArg(y)
19120 v0.AddArg2(v1, v2)
19121 v.AddArg(v0)
19122 return true
19123 }
19124 }
19125 func rewriteValueARM64_OpLoad(v *Value) bool {
19126 v_1 := v.Args[1]
19127 v_0 := v.Args[0]
19128
19129
19130
19131 for {
19132 t := v.Type
19133 ptr := v_0
19134 mem := v_1
19135 if !(t.IsBoolean()) {
19136 break
19137 }
19138 v.reset(OpARM64MOVBUload)
19139 v.AddArg2(ptr, mem)
19140 return true
19141 }
19142
19143
19144
19145 for {
19146 t := v.Type
19147 ptr := v_0
19148 mem := v_1
19149 if !(is8BitInt(t) && t.IsSigned()) {
19150 break
19151 }
19152 v.reset(OpARM64MOVBload)
19153 v.AddArg2(ptr, mem)
19154 return true
19155 }
19156
19157
19158
19159 for {
19160 t := v.Type
19161 ptr := v_0
19162 mem := v_1
19163 if !(is8BitInt(t) && !t.IsSigned()) {
19164 break
19165 }
19166 v.reset(OpARM64MOVBUload)
19167 v.AddArg2(ptr, mem)
19168 return true
19169 }
19170
19171
19172
19173 for {
19174 t := v.Type
19175 ptr := v_0
19176 mem := v_1
19177 if !(is16BitInt(t) && t.IsSigned()) {
19178 break
19179 }
19180 v.reset(OpARM64MOVHload)
19181 v.AddArg2(ptr, mem)
19182 return true
19183 }
19184
19185
19186
19187 for {
19188 t := v.Type
19189 ptr := v_0
19190 mem := v_1
19191 if !(is16BitInt(t) && !t.IsSigned()) {
19192 break
19193 }
19194 v.reset(OpARM64MOVHUload)
19195 v.AddArg2(ptr, mem)
19196 return true
19197 }
19198
19199
19200
19201 for {
19202 t := v.Type
19203 ptr := v_0
19204 mem := v_1
19205 if !(is32BitInt(t) && t.IsSigned()) {
19206 break
19207 }
19208 v.reset(OpARM64MOVWload)
19209 v.AddArg2(ptr, mem)
19210 return true
19211 }
19212
19213
19214
19215 for {
19216 t := v.Type
19217 ptr := v_0
19218 mem := v_1
19219 if !(is32BitInt(t) && !t.IsSigned()) {
19220 break
19221 }
19222 v.reset(OpARM64MOVWUload)
19223 v.AddArg2(ptr, mem)
19224 return true
19225 }
19226
19227
19228
19229 for {
19230 t := v.Type
19231 ptr := v_0
19232 mem := v_1
19233 if !(is64BitInt(t) || isPtr(t)) {
19234 break
19235 }
19236 v.reset(OpARM64MOVDload)
19237 v.AddArg2(ptr, mem)
19238 return true
19239 }
19240
19241
19242
19243 for {
19244 t := v.Type
19245 ptr := v_0
19246 mem := v_1
19247 if !(is32BitFloat(t)) {
19248 break
19249 }
19250 v.reset(OpARM64FMOVSload)
19251 v.AddArg2(ptr, mem)
19252 return true
19253 }
19254
19255
19256
19257 for {
19258 t := v.Type
19259 ptr := v_0
19260 mem := v_1
19261 if !(is64BitFloat(t)) {
19262 break
19263 }
19264 v.reset(OpARM64FMOVDload)
19265 v.AddArg2(ptr, mem)
19266 return true
19267 }
19268 return false
19269 }
19270 func rewriteValueARM64_OpLocalAddr(v *Value) bool {
19271 v_1 := v.Args[1]
19272 v_0 := v.Args[0]
19273 b := v.Block
19274 typ := &b.Func.Config.Types
19275
19276
19277
19278 for {
19279 t := v.Type
19280 sym := auxToSym(v.Aux)
19281 base := v_0
19282 mem := v_1
19283 if !(t.Elem().HasPointers()) {
19284 break
19285 }
19286 v.reset(OpARM64MOVDaddr)
19287 v.Aux = symToAux(sym)
19288 v0 := b.NewValue0(v.Pos, OpSPanchored, typ.Uintptr)
19289 v0.AddArg2(base, mem)
19290 v.AddArg(v0)
19291 return true
19292 }
19293
19294
19295
19296 for {
19297 t := v.Type
19298 sym := auxToSym(v.Aux)
19299 base := v_0
19300 if !(!t.Elem().HasPointers()) {
19301 break
19302 }
19303 v.reset(OpARM64MOVDaddr)
19304 v.Aux = symToAux(sym)
19305 v.AddArg(base)
19306 return true
19307 }
19308 return false
19309 }
19310 func rewriteValueARM64_OpLsh16x16(v *Value) bool {
19311 v_1 := v.Args[1]
19312 v_0 := v.Args[0]
19313 b := v.Block
19314 typ := &b.Func.Config.Types
19315
19316
19317
19318 for {
19319 t := v.Type
19320 x := v_0
19321 y := v_1
19322 if !(shiftIsBounded(v)) {
19323 break
19324 }
19325 v.reset(OpARM64SLL)
19326 v.Type = t
19327 v.AddArg2(x, y)
19328 return true
19329 }
19330
19331
19332
19333 for {
19334 t := v.Type
19335 x := v_0
19336 y := v_1
19337 if !(!shiftIsBounded(v)) {
19338 break
19339 }
19340 v.reset(OpARM64CSEL)
19341 v.AuxInt = opToAuxInt(OpARM64LessThanU)
19342 v0 := b.NewValue0(v.Pos, OpARM64SLL, t)
19343 v0.AddArg2(x, y)
19344 v1 := b.NewValue0(v.Pos, OpConst64, t)
19345 v1.AuxInt = int64ToAuxInt(0)
19346 v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
19347 v2.AuxInt = int64ToAuxInt(64)
19348 v3 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
19349 v3.AddArg(y)
19350 v2.AddArg(v3)
19351 v.AddArg3(v0, v1, v2)
19352 return true
19353 }
19354 return false
19355 }
19356 func rewriteValueARM64_OpLsh16x32(v *Value) bool {
19357 v_1 := v.Args[1]
19358 v_0 := v.Args[0]
19359 b := v.Block
19360 typ := &b.Func.Config.Types
19361
19362
19363
19364 for {
19365 t := v.Type
19366 x := v_0
19367 y := v_1
19368 if !(shiftIsBounded(v)) {
19369 break
19370 }
19371 v.reset(OpARM64SLL)
19372 v.Type = t
19373 v.AddArg2(x, y)
19374 return true
19375 }
19376
19377
19378
19379 for {
19380 t := v.Type
19381 x := v_0
19382 y := v_1
19383 if !(!shiftIsBounded(v)) {
19384 break
19385 }
19386 v.reset(OpARM64CSEL)
19387 v.AuxInt = opToAuxInt(OpARM64LessThanU)
19388 v0 := b.NewValue0(v.Pos, OpARM64SLL, t)
19389 v0.AddArg2(x, y)
19390 v1 := b.NewValue0(v.Pos, OpConst64, t)
19391 v1.AuxInt = int64ToAuxInt(0)
19392 v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
19393 v2.AuxInt = int64ToAuxInt(64)
19394 v3 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
19395 v3.AddArg(y)
19396 v2.AddArg(v3)
19397 v.AddArg3(v0, v1, v2)
19398 return true
19399 }
19400 return false
19401 }
19402 func rewriteValueARM64_OpLsh16x64(v *Value) bool {
19403 v_1 := v.Args[1]
19404 v_0 := v.Args[0]
19405 b := v.Block
19406
19407
19408
19409 for {
19410 t := v.Type
19411 x := v_0
19412 y := v_1
19413 if !(shiftIsBounded(v)) {
19414 break
19415 }
19416 v.reset(OpARM64SLL)
19417 v.Type = t
19418 v.AddArg2(x, y)
19419 return true
19420 }
19421
19422
19423
19424 for {
19425 t := v.Type
19426 x := v_0
19427 y := v_1
19428 if !(!shiftIsBounded(v)) {
19429 break
19430 }
19431 v.reset(OpARM64CSEL)
19432 v.AuxInt = opToAuxInt(OpARM64LessThanU)
19433 v0 := b.NewValue0(v.Pos, OpARM64SLL, t)
19434 v0.AddArg2(x, y)
19435 v1 := b.NewValue0(v.Pos, OpConst64, t)
19436 v1.AuxInt = int64ToAuxInt(0)
19437 v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
19438 v2.AuxInt = int64ToAuxInt(64)
19439 v2.AddArg(y)
19440 v.AddArg3(v0, v1, v2)
19441 return true
19442 }
19443 return false
19444 }
19445 func rewriteValueARM64_OpLsh16x8(v *Value) bool {
19446 v_1 := v.Args[1]
19447 v_0 := v.Args[0]
19448 b := v.Block
19449 typ := &b.Func.Config.Types
19450
19451
19452
19453 for {
19454 t := v.Type
19455 x := v_0
19456 y := v_1
19457 if !(shiftIsBounded(v)) {
19458 break
19459 }
19460 v.reset(OpARM64SLL)
19461 v.Type = t
19462 v.AddArg2(x, y)
19463 return true
19464 }
19465
19466
19467
19468 for {
19469 t := v.Type
19470 x := v_0
19471 y := v_1
19472 if !(!shiftIsBounded(v)) {
19473 break
19474 }
19475 v.reset(OpARM64CSEL)
19476 v.AuxInt = opToAuxInt(OpARM64LessThanU)
19477 v0 := b.NewValue0(v.Pos, OpARM64SLL, t)
19478 v0.AddArg2(x, y)
19479 v1 := b.NewValue0(v.Pos, OpConst64, t)
19480 v1.AuxInt = int64ToAuxInt(0)
19481 v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
19482 v2.AuxInt = int64ToAuxInt(64)
19483 v3 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
19484 v3.AddArg(y)
19485 v2.AddArg(v3)
19486 v.AddArg3(v0, v1, v2)
19487 return true
19488 }
19489 return false
19490 }
19491 func rewriteValueARM64_OpLsh32x16(v *Value) bool {
19492 v_1 := v.Args[1]
19493 v_0 := v.Args[0]
19494 b := v.Block
19495 typ := &b.Func.Config.Types
19496
19497
19498
19499 for {
19500 t := v.Type
19501 x := v_0
19502 y := v_1
19503 if !(shiftIsBounded(v)) {
19504 break
19505 }
19506 v.reset(OpARM64SLL)
19507 v.Type = t
19508 v.AddArg2(x, y)
19509 return true
19510 }
19511
19512
19513
19514 for {
19515 t := v.Type
19516 x := v_0
19517 y := v_1
19518 if !(!shiftIsBounded(v)) {
19519 break
19520 }
19521 v.reset(OpARM64CSEL)
19522 v.AuxInt = opToAuxInt(OpARM64LessThanU)
19523 v0 := b.NewValue0(v.Pos, OpARM64SLL, t)
19524 v0.AddArg2(x, y)
19525 v1 := b.NewValue0(v.Pos, OpConst64, t)
19526 v1.AuxInt = int64ToAuxInt(0)
19527 v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
19528 v2.AuxInt = int64ToAuxInt(64)
19529 v3 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
19530 v3.AddArg(y)
19531 v2.AddArg(v3)
19532 v.AddArg3(v0, v1, v2)
19533 return true
19534 }
19535 return false
19536 }
19537 func rewriteValueARM64_OpLsh32x32(v *Value) bool {
19538 v_1 := v.Args[1]
19539 v_0 := v.Args[0]
19540 b := v.Block
19541 typ := &b.Func.Config.Types
19542
19543
19544
19545 for {
19546 t := v.Type
19547 x := v_0
19548 y := v_1
19549 if !(shiftIsBounded(v)) {
19550 break
19551 }
19552 v.reset(OpARM64SLL)
19553 v.Type = t
19554 v.AddArg2(x, y)
19555 return true
19556 }
19557
19558
19559
19560 for {
19561 t := v.Type
19562 x := v_0
19563 y := v_1
19564 if !(!shiftIsBounded(v)) {
19565 break
19566 }
19567 v.reset(OpARM64CSEL)
19568 v.AuxInt = opToAuxInt(OpARM64LessThanU)
19569 v0 := b.NewValue0(v.Pos, OpARM64SLL, t)
19570 v0.AddArg2(x, y)
19571 v1 := b.NewValue0(v.Pos, OpConst64, t)
19572 v1.AuxInt = int64ToAuxInt(0)
19573 v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
19574 v2.AuxInt = int64ToAuxInt(64)
19575 v3 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
19576 v3.AddArg(y)
19577 v2.AddArg(v3)
19578 v.AddArg3(v0, v1, v2)
19579 return true
19580 }
19581 return false
19582 }
19583 func rewriteValueARM64_OpLsh32x64(v *Value) bool {
19584 v_1 := v.Args[1]
19585 v_0 := v.Args[0]
19586 b := v.Block
19587
19588
19589
19590 for {
19591 t := v.Type
19592 x := v_0
19593 y := v_1
19594 if !(shiftIsBounded(v)) {
19595 break
19596 }
19597 v.reset(OpARM64SLL)
19598 v.Type = t
19599 v.AddArg2(x, y)
19600 return true
19601 }
19602
19603
19604
19605 for {
19606 t := v.Type
19607 x := v_0
19608 y := v_1
19609 if !(!shiftIsBounded(v)) {
19610 break
19611 }
19612 v.reset(OpARM64CSEL)
19613 v.AuxInt = opToAuxInt(OpARM64LessThanU)
19614 v0 := b.NewValue0(v.Pos, OpARM64SLL, t)
19615 v0.AddArg2(x, y)
19616 v1 := b.NewValue0(v.Pos, OpConst64, t)
19617 v1.AuxInt = int64ToAuxInt(0)
19618 v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
19619 v2.AuxInt = int64ToAuxInt(64)
19620 v2.AddArg(y)
19621 v.AddArg3(v0, v1, v2)
19622 return true
19623 }
19624 return false
19625 }
19626 func rewriteValueARM64_OpLsh32x8(v *Value) bool {
19627 v_1 := v.Args[1]
19628 v_0 := v.Args[0]
19629 b := v.Block
19630 typ := &b.Func.Config.Types
19631
19632
19633
19634 for {
19635 t := v.Type
19636 x := v_0
19637 y := v_1
19638 if !(shiftIsBounded(v)) {
19639 break
19640 }
19641 v.reset(OpARM64SLL)
19642 v.Type = t
19643 v.AddArg2(x, y)
19644 return true
19645 }
19646
19647
19648
19649 for {
19650 t := v.Type
19651 x := v_0
19652 y := v_1
19653 if !(!shiftIsBounded(v)) {
19654 break
19655 }
19656 v.reset(OpARM64CSEL)
19657 v.AuxInt = opToAuxInt(OpARM64LessThanU)
19658 v0 := b.NewValue0(v.Pos, OpARM64SLL, t)
19659 v0.AddArg2(x, y)
19660 v1 := b.NewValue0(v.Pos, OpConst64, t)
19661 v1.AuxInt = int64ToAuxInt(0)
19662 v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
19663 v2.AuxInt = int64ToAuxInt(64)
19664 v3 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
19665 v3.AddArg(y)
19666 v2.AddArg(v3)
19667 v.AddArg3(v0, v1, v2)
19668 return true
19669 }
19670 return false
19671 }
19672 func rewriteValueARM64_OpLsh64x16(v *Value) bool {
19673 v_1 := v.Args[1]
19674 v_0 := v.Args[0]
19675 b := v.Block
19676 typ := &b.Func.Config.Types
19677
19678
19679
19680 for {
19681 t := v.Type
19682 x := v_0
19683 y := v_1
19684 if !(shiftIsBounded(v)) {
19685 break
19686 }
19687 v.reset(OpARM64SLL)
19688 v.Type = t
19689 v.AddArg2(x, y)
19690 return true
19691 }
19692
19693
19694
19695 for {
19696 t := v.Type
19697 x := v_0
19698 y := v_1
19699 if !(!shiftIsBounded(v)) {
19700 break
19701 }
19702 v.reset(OpARM64CSEL)
19703 v.AuxInt = opToAuxInt(OpARM64LessThanU)
19704 v0 := b.NewValue0(v.Pos, OpARM64SLL, t)
19705 v0.AddArg2(x, y)
19706 v1 := b.NewValue0(v.Pos, OpConst64, t)
19707 v1.AuxInt = int64ToAuxInt(0)
19708 v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
19709 v2.AuxInt = int64ToAuxInt(64)
19710 v3 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
19711 v3.AddArg(y)
19712 v2.AddArg(v3)
19713 v.AddArg3(v0, v1, v2)
19714 return true
19715 }
19716 return false
19717 }
19718 func rewriteValueARM64_OpLsh64x32(v *Value) bool {
19719 v_1 := v.Args[1]
19720 v_0 := v.Args[0]
19721 b := v.Block
19722 typ := &b.Func.Config.Types
19723
19724
19725
19726 for {
19727 t := v.Type
19728 x := v_0
19729 y := v_1
19730 if !(shiftIsBounded(v)) {
19731 break
19732 }
19733 v.reset(OpARM64SLL)
19734 v.Type = t
19735 v.AddArg2(x, y)
19736 return true
19737 }
19738
19739
19740
19741 for {
19742 t := v.Type
19743 x := v_0
19744 y := v_1
19745 if !(!shiftIsBounded(v)) {
19746 break
19747 }
19748 v.reset(OpARM64CSEL)
19749 v.AuxInt = opToAuxInt(OpARM64LessThanU)
19750 v0 := b.NewValue0(v.Pos, OpARM64SLL, t)
19751 v0.AddArg2(x, y)
19752 v1 := b.NewValue0(v.Pos, OpConst64, t)
19753 v1.AuxInt = int64ToAuxInt(0)
19754 v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
19755 v2.AuxInt = int64ToAuxInt(64)
19756 v3 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
19757 v3.AddArg(y)
19758 v2.AddArg(v3)
19759 v.AddArg3(v0, v1, v2)
19760 return true
19761 }
19762 return false
19763 }
19764 func rewriteValueARM64_OpLsh64x64(v *Value) bool {
19765 v_1 := v.Args[1]
19766 v_0 := v.Args[0]
19767 b := v.Block
19768
19769
19770
19771 for {
19772 t := v.Type
19773 x := v_0
19774 y := v_1
19775 if !(shiftIsBounded(v)) {
19776 break
19777 }
19778 v.reset(OpARM64SLL)
19779 v.Type = t
19780 v.AddArg2(x, y)
19781 return true
19782 }
19783
19784
19785
19786 for {
19787 t := v.Type
19788 x := v_0
19789 y := v_1
19790 if !(!shiftIsBounded(v)) {
19791 break
19792 }
19793 v.reset(OpARM64CSEL)
19794 v.AuxInt = opToAuxInt(OpARM64LessThanU)
19795 v0 := b.NewValue0(v.Pos, OpARM64SLL, t)
19796 v0.AddArg2(x, y)
19797 v1 := b.NewValue0(v.Pos, OpConst64, t)
19798 v1.AuxInt = int64ToAuxInt(0)
19799 v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
19800 v2.AuxInt = int64ToAuxInt(64)
19801 v2.AddArg(y)
19802 v.AddArg3(v0, v1, v2)
19803 return true
19804 }
19805 return false
19806 }
19807 func rewriteValueARM64_OpLsh64x8(v *Value) bool {
19808 v_1 := v.Args[1]
19809 v_0 := v.Args[0]
19810 b := v.Block
19811 typ := &b.Func.Config.Types
19812
19813
19814
19815 for {
19816 t := v.Type
19817 x := v_0
19818 y := v_1
19819 if !(shiftIsBounded(v)) {
19820 break
19821 }
19822 v.reset(OpARM64SLL)
19823 v.Type = t
19824 v.AddArg2(x, y)
19825 return true
19826 }
19827
19828
19829
19830 for {
19831 t := v.Type
19832 x := v_0
19833 y := v_1
19834 if !(!shiftIsBounded(v)) {
19835 break
19836 }
19837 v.reset(OpARM64CSEL)
19838 v.AuxInt = opToAuxInt(OpARM64LessThanU)
19839 v0 := b.NewValue0(v.Pos, OpARM64SLL, t)
19840 v0.AddArg2(x, y)
19841 v1 := b.NewValue0(v.Pos, OpConst64, t)
19842 v1.AuxInt = int64ToAuxInt(0)
19843 v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
19844 v2.AuxInt = int64ToAuxInt(64)
19845 v3 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
19846 v3.AddArg(y)
19847 v2.AddArg(v3)
19848 v.AddArg3(v0, v1, v2)
19849 return true
19850 }
19851 return false
19852 }
19853 func rewriteValueARM64_OpLsh8x16(v *Value) bool {
19854 v_1 := v.Args[1]
19855 v_0 := v.Args[0]
19856 b := v.Block
19857 typ := &b.Func.Config.Types
19858
19859
19860
19861 for {
19862 t := v.Type
19863 x := v_0
19864 y := v_1
19865 if !(shiftIsBounded(v)) {
19866 break
19867 }
19868 v.reset(OpARM64SLL)
19869 v.Type = t
19870 v.AddArg2(x, y)
19871 return true
19872 }
19873
19874
19875
19876 for {
19877 t := v.Type
19878 x := v_0
19879 y := v_1
19880 if !(!shiftIsBounded(v)) {
19881 break
19882 }
19883 v.reset(OpARM64CSEL)
19884 v.AuxInt = opToAuxInt(OpARM64LessThanU)
19885 v0 := b.NewValue0(v.Pos, OpARM64SLL, t)
19886 v0.AddArg2(x, y)
19887 v1 := b.NewValue0(v.Pos, OpConst64, t)
19888 v1.AuxInt = int64ToAuxInt(0)
19889 v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
19890 v2.AuxInt = int64ToAuxInt(64)
19891 v3 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
19892 v3.AddArg(y)
19893 v2.AddArg(v3)
19894 v.AddArg3(v0, v1, v2)
19895 return true
19896 }
19897 return false
19898 }
19899 func rewriteValueARM64_OpLsh8x32(v *Value) bool {
19900 v_1 := v.Args[1]
19901 v_0 := v.Args[0]
19902 b := v.Block
19903 typ := &b.Func.Config.Types
19904
19905
19906
19907 for {
19908 t := v.Type
19909 x := v_0
19910 y := v_1
19911 if !(shiftIsBounded(v)) {
19912 break
19913 }
19914 v.reset(OpARM64SLL)
19915 v.Type = t
19916 v.AddArg2(x, y)
19917 return true
19918 }
19919
19920
19921
19922 for {
19923 t := v.Type
19924 x := v_0
19925 y := v_1
19926 if !(!shiftIsBounded(v)) {
19927 break
19928 }
19929 v.reset(OpARM64CSEL)
19930 v.AuxInt = opToAuxInt(OpARM64LessThanU)
19931 v0 := b.NewValue0(v.Pos, OpARM64SLL, t)
19932 v0.AddArg2(x, y)
19933 v1 := b.NewValue0(v.Pos, OpConst64, t)
19934 v1.AuxInt = int64ToAuxInt(0)
19935 v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
19936 v2.AuxInt = int64ToAuxInt(64)
19937 v3 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
19938 v3.AddArg(y)
19939 v2.AddArg(v3)
19940 v.AddArg3(v0, v1, v2)
19941 return true
19942 }
19943 return false
19944 }
19945 func rewriteValueARM64_OpLsh8x64(v *Value) bool {
19946 v_1 := v.Args[1]
19947 v_0 := v.Args[0]
19948 b := v.Block
19949
19950
19951
19952 for {
19953 t := v.Type
19954 x := v_0
19955 y := v_1
19956 if !(shiftIsBounded(v)) {
19957 break
19958 }
19959 v.reset(OpARM64SLL)
19960 v.Type = t
19961 v.AddArg2(x, y)
19962 return true
19963 }
19964
19965
19966
19967 for {
19968 t := v.Type
19969 x := v_0
19970 y := v_1
19971 if !(!shiftIsBounded(v)) {
19972 break
19973 }
19974 v.reset(OpARM64CSEL)
19975 v.AuxInt = opToAuxInt(OpARM64LessThanU)
19976 v0 := b.NewValue0(v.Pos, OpARM64SLL, t)
19977 v0.AddArg2(x, y)
19978 v1 := b.NewValue0(v.Pos, OpConst64, t)
19979 v1.AuxInt = int64ToAuxInt(0)
19980 v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
19981 v2.AuxInt = int64ToAuxInt(64)
19982 v2.AddArg(y)
19983 v.AddArg3(v0, v1, v2)
19984 return true
19985 }
19986 return false
19987 }
19988 func rewriteValueARM64_OpLsh8x8(v *Value) bool {
19989 v_1 := v.Args[1]
19990 v_0 := v.Args[0]
19991 b := v.Block
19992 typ := &b.Func.Config.Types
19993
19994
19995
19996 for {
19997 t := v.Type
19998 x := v_0
19999 y := v_1
20000 if !(shiftIsBounded(v)) {
20001 break
20002 }
20003 v.reset(OpARM64SLL)
20004 v.Type = t
20005 v.AddArg2(x, y)
20006 return true
20007 }
20008
20009
20010
20011 for {
20012 t := v.Type
20013 x := v_0
20014 y := v_1
20015 if !(!shiftIsBounded(v)) {
20016 break
20017 }
20018 v.reset(OpARM64CSEL)
20019 v.AuxInt = opToAuxInt(OpARM64LessThanU)
20020 v0 := b.NewValue0(v.Pos, OpARM64SLL, t)
20021 v0.AddArg2(x, y)
20022 v1 := b.NewValue0(v.Pos, OpConst64, t)
20023 v1.AuxInt = int64ToAuxInt(0)
20024 v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
20025 v2.AuxInt = int64ToAuxInt(64)
20026 v3 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
20027 v3.AddArg(y)
20028 v2.AddArg(v3)
20029 v.AddArg3(v0, v1, v2)
20030 return true
20031 }
20032 return false
20033 }
20034 func rewriteValueARM64_OpMod16(v *Value) bool {
20035 v_1 := v.Args[1]
20036 v_0 := v.Args[0]
20037 b := v.Block
20038 typ := &b.Func.Config.Types
20039
20040
20041 for {
20042 x := v_0
20043 y := v_1
20044 v.reset(OpARM64MODW)
20045 v0 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
20046 v0.AddArg(x)
20047 v1 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
20048 v1.AddArg(y)
20049 v.AddArg2(v0, v1)
20050 return true
20051 }
20052 }
20053 func rewriteValueARM64_OpMod16u(v *Value) bool {
20054 v_1 := v.Args[1]
20055 v_0 := v.Args[0]
20056 b := v.Block
20057 typ := &b.Func.Config.Types
20058
20059
20060 for {
20061 x := v_0
20062 y := v_1
20063 v.reset(OpARM64UMODW)
20064 v0 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
20065 v0.AddArg(x)
20066 v1 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
20067 v1.AddArg(y)
20068 v.AddArg2(v0, v1)
20069 return true
20070 }
20071 }
20072 func rewriteValueARM64_OpMod32(v *Value) bool {
20073 v_1 := v.Args[1]
20074 v_0 := v.Args[0]
20075
20076
20077 for {
20078 x := v_0
20079 y := v_1
20080 v.reset(OpARM64MODW)
20081 v.AddArg2(x, y)
20082 return true
20083 }
20084 }
20085 func rewriteValueARM64_OpMod64(v *Value) bool {
20086 v_1 := v.Args[1]
20087 v_0 := v.Args[0]
20088
20089
20090 for {
20091 x := v_0
20092 y := v_1
20093 v.reset(OpARM64MOD)
20094 v.AddArg2(x, y)
20095 return true
20096 }
20097 }
20098 func rewriteValueARM64_OpMod8(v *Value) bool {
20099 v_1 := v.Args[1]
20100 v_0 := v.Args[0]
20101 b := v.Block
20102 typ := &b.Func.Config.Types
20103
20104
20105 for {
20106 x := v_0
20107 y := v_1
20108 v.reset(OpARM64MODW)
20109 v0 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
20110 v0.AddArg(x)
20111 v1 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
20112 v1.AddArg(y)
20113 v.AddArg2(v0, v1)
20114 return true
20115 }
20116 }
20117 func rewriteValueARM64_OpMod8u(v *Value) bool {
20118 v_1 := v.Args[1]
20119 v_0 := v.Args[0]
20120 b := v.Block
20121 typ := &b.Func.Config.Types
20122
20123
20124 for {
20125 x := v_0
20126 y := v_1
20127 v.reset(OpARM64UMODW)
20128 v0 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
20129 v0.AddArg(x)
20130 v1 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
20131 v1.AddArg(y)
20132 v.AddArg2(v0, v1)
20133 return true
20134 }
20135 }
20136 func rewriteValueARM64_OpMove(v *Value) bool {
20137 v_2 := v.Args[2]
20138 v_1 := v.Args[1]
20139 v_0 := v.Args[0]
20140 b := v.Block
20141 config := b.Func.Config
20142 typ := &b.Func.Config.Types
20143
20144
20145 for {
20146 if auxIntToInt64(v.AuxInt) != 0 {
20147 break
20148 }
20149 mem := v_2
20150 v.copyOf(mem)
20151 return true
20152 }
20153
20154
20155 for {
20156 if auxIntToInt64(v.AuxInt) != 1 {
20157 break
20158 }
20159 dst := v_0
20160 src := v_1
20161 mem := v_2
20162 v.reset(OpARM64MOVBstore)
20163 v0 := b.NewValue0(v.Pos, OpARM64MOVBUload, typ.UInt8)
20164 v0.AddArg2(src, mem)
20165 v.AddArg3(dst, v0, mem)
20166 return true
20167 }
20168
20169
20170 for {
20171 if auxIntToInt64(v.AuxInt) != 2 {
20172 break
20173 }
20174 dst := v_0
20175 src := v_1
20176 mem := v_2
20177 v.reset(OpARM64MOVHstore)
20178 v0 := b.NewValue0(v.Pos, OpARM64MOVHUload, typ.UInt16)
20179 v0.AddArg2(src, mem)
20180 v.AddArg3(dst, v0, mem)
20181 return true
20182 }
20183
20184
20185 for {
20186 if auxIntToInt64(v.AuxInt) != 3 {
20187 break
20188 }
20189 dst := v_0
20190 src := v_1
20191 mem := v_2
20192 v.reset(OpARM64MOVBstore)
20193 v.AuxInt = int32ToAuxInt(2)
20194 v0 := b.NewValue0(v.Pos, OpARM64MOVBUload, typ.UInt8)
20195 v0.AuxInt = int32ToAuxInt(2)
20196 v0.AddArg2(src, mem)
20197 v1 := b.NewValue0(v.Pos, OpARM64MOVHstore, types.TypeMem)
20198 v2 := b.NewValue0(v.Pos, OpARM64MOVHUload, typ.UInt16)
20199 v2.AddArg2(src, mem)
20200 v1.AddArg3(dst, v2, mem)
20201 v.AddArg3(dst, v0, v1)
20202 return true
20203 }
20204
20205
20206 for {
20207 if auxIntToInt64(v.AuxInt) != 4 {
20208 break
20209 }
20210 dst := v_0
20211 src := v_1
20212 mem := v_2
20213 v.reset(OpARM64MOVWstore)
20214 v0 := b.NewValue0(v.Pos, OpARM64MOVWUload, typ.UInt32)
20215 v0.AddArg2(src, mem)
20216 v.AddArg3(dst, v0, mem)
20217 return true
20218 }
20219
20220
20221 for {
20222 if auxIntToInt64(v.AuxInt) != 5 {
20223 break
20224 }
20225 dst := v_0
20226 src := v_1
20227 mem := v_2
20228 v.reset(OpARM64MOVBstore)
20229 v.AuxInt = int32ToAuxInt(4)
20230 v0 := b.NewValue0(v.Pos, OpARM64MOVBUload, typ.UInt8)
20231 v0.AuxInt = int32ToAuxInt(4)
20232 v0.AddArg2(src, mem)
20233 v1 := b.NewValue0(v.Pos, OpARM64MOVWstore, types.TypeMem)
20234 v2 := b.NewValue0(v.Pos, OpARM64MOVWUload, typ.UInt32)
20235 v2.AddArg2(src, mem)
20236 v1.AddArg3(dst, v2, mem)
20237 v.AddArg3(dst, v0, v1)
20238 return true
20239 }
20240
20241
20242 for {
20243 if auxIntToInt64(v.AuxInt) != 6 {
20244 break
20245 }
20246 dst := v_0
20247 src := v_1
20248 mem := v_2
20249 v.reset(OpARM64MOVHstore)
20250 v.AuxInt = int32ToAuxInt(4)
20251 v0 := b.NewValue0(v.Pos, OpARM64MOVHUload, typ.UInt16)
20252 v0.AuxInt = int32ToAuxInt(4)
20253 v0.AddArg2(src, mem)
20254 v1 := b.NewValue0(v.Pos, OpARM64MOVWstore, types.TypeMem)
20255 v2 := b.NewValue0(v.Pos, OpARM64MOVWUload, typ.UInt32)
20256 v2.AddArg2(src, mem)
20257 v1.AddArg3(dst, v2, mem)
20258 v.AddArg3(dst, v0, v1)
20259 return true
20260 }
20261
20262
20263 for {
20264 if auxIntToInt64(v.AuxInt) != 7 {
20265 break
20266 }
20267 dst := v_0
20268 src := v_1
20269 mem := v_2
20270 v.reset(OpARM64MOVWstore)
20271 v.AuxInt = int32ToAuxInt(3)
20272 v0 := b.NewValue0(v.Pos, OpARM64MOVWUload, typ.UInt32)
20273 v0.AuxInt = int32ToAuxInt(3)
20274 v0.AddArg2(src, mem)
20275 v1 := b.NewValue0(v.Pos, OpARM64MOVWstore, types.TypeMem)
20276 v2 := b.NewValue0(v.Pos, OpARM64MOVWUload, typ.UInt32)
20277 v2.AddArg2(src, mem)
20278 v1.AddArg3(dst, v2, mem)
20279 v.AddArg3(dst, v0, v1)
20280 return true
20281 }
20282
20283
20284 for {
20285 if auxIntToInt64(v.AuxInt) != 8 {
20286 break
20287 }
20288 dst := v_0
20289 src := v_1
20290 mem := v_2
20291 v.reset(OpARM64MOVDstore)
20292 v0 := b.NewValue0(v.Pos, OpARM64MOVDload, typ.UInt64)
20293 v0.AddArg2(src, mem)
20294 v.AddArg3(dst, v0, mem)
20295 return true
20296 }
20297
20298
20299 for {
20300 if auxIntToInt64(v.AuxInt) != 9 {
20301 break
20302 }
20303 dst := v_0
20304 src := v_1
20305 mem := v_2
20306 v.reset(OpARM64MOVBstore)
20307 v.AuxInt = int32ToAuxInt(8)
20308 v0 := b.NewValue0(v.Pos, OpARM64MOVBUload, typ.UInt8)
20309 v0.AuxInt = int32ToAuxInt(8)
20310 v0.AddArg2(src, mem)
20311 v1 := b.NewValue0(v.Pos, OpARM64MOVDstore, types.TypeMem)
20312 v2 := b.NewValue0(v.Pos, OpARM64MOVDload, typ.UInt64)
20313 v2.AddArg2(src, mem)
20314 v1.AddArg3(dst, v2, mem)
20315 v.AddArg3(dst, v0, v1)
20316 return true
20317 }
20318
20319
20320 for {
20321 if auxIntToInt64(v.AuxInt) != 10 {
20322 break
20323 }
20324 dst := v_0
20325 src := v_1
20326 mem := v_2
20327 v.reset(OpARM64MOVHstore)
20328 v.AuxInt = int32ToAuxInt(8)
20329 v0 := b.NewValue0(v.Pos, OpARM64MOVHUload, typ.UInt16)
20330 v0.AuxInt = int32ToAuxInt(8)
20331 v0.AddArg2(src, mem)
20332 v1 := b.NewValue0(v.Pos, OpARM64MOVDstore, types.TypeMem)
20333 v2 := b.NewValue0(v.Pos, OpARM64MOVDload, typ.UInt64)
20334 v2.AddArg2(src, mem)
20335 v1.AddArg3(dst, v2, mem)
20336 v.AddArg3(dst, v0, v1)
20337 return true
20338 }
20339
20340
20341 for {
20342 if auxIntToInt64(v.AuxInt) != 11 {
20343 break
20344 }
20345 dst := v_0
20346 src := v_1
20347 mem := v_2
20348 v.reset(OpARM64MOVDstore)
20349 v.AuxInt = int32ToAuxInt(3)
20350 v0 := b.NewValue0(v.Pos, OpARM64MOVDload, typ.UInt64)
20351 v0.AuxInt = int32ToAuxInt(3)
20352 v0.AddArg2(src, mem)
20353 v1 := b.NewValue0(v.Pos, OpARM64MOVDstore, types.TypeMem)
20354 v2 := b.NewValue0(v.Pos, OpARM64MOVDload, typ.UInt64)
20355 v2.AddArg2(src, mem)
20356 v1.AddArg3(dst, v2, mem)
20357 v.AddArg3(dst, v0, v1)
20358 return true
20359 }
20360
20361
20362 for {
20363 if auxIntToInt64(v.AuxInt) != 12 {
20364 break
20365 }
20366 dst := v_0
20367 src := v_1
20368 mem := v_2
20369 v.reset(OpARM64MOVWstore)
20370 v.AuxInt = int32ToAuxInt(8)
20371 v0 := b.NewValue0(v.Pos, OpARM64MOVWUload, typ.UInt32)
20372 v0.AuxInt = int32ToAuxInt(8)
20373 v0.AddArg2(src, mem)
20374 v1 := b.NewValue0(v.Pos, OpARM64MOVDstore, types.TypeMem)
20375 v2 := b.NewValue0(v.Pos, OpARM64MOVDload, typ.UInt64)
20376 v2.AddArg2(src, mem)
20377 v1.AddArg3(dst, v2, mem)
20378 v.AddArg3(dst, v0, v1)
20379 return true
20380 }
20381
20382
20383 for {
20384 if auxIntToInt64(v.AuxInt) != 13 {
20385 break
20386 }
20387 dst := v_0
20388 src := v_1
20389 mem := v_2
20390 v.reset(OpARM64MOVDstore)
20391 v.AuxInt = int32ToAuxInt(5)
20392 v0 := b.NewValue0(v.Pos, OpARM64MOVDload, typ.UInt64)
20393 v0.AuxInt = int32ToAuxInt(5)
20394 v0.AddArg2(src, mem)
20395 v1 := b.NewValue0(v.Pos, OpARM64MOVDstore, types.TypeMem)
20396 v2 := b.NewValue0(v.Pos, OpARM64MOVDload, typ.UInt64)
20397 v2.AddArg2(src, mem)
20398 v1.AddArg3(dst, v2, mem)
20399 v.AddArg3(dst, v0, v1)
20400 return true
20401 }
20402
20403
20404 for {
20405 if auxIntToInt64(v.AuxInt) != 14 {
20406 break
20407 }
20408 dst := v_0
20409 src := v_1
20410 mem := v_2
20411 v.reset(OpARM64MOVDstore)
20412 v.AuxInt = int32ToAuxInt(6)
20413 v0 := b.NewValue0(v.Pos, OpARM64MOVDload, typ.UInt64)
20414 v0.AuxInt = int32ToAuxInt(6)
20415 v0.AddArg2(src, mem)
20416 v1 := b.NewValue0(v.Pos, OpARM64MOVDstore, types.TypeMem)
20417 v2 := b.NewValue0(v.Pos, OpARM64MOVDload, typ.UInt64)
20418 v2.AddArg2(src, mem)
20419 v1.AddArg3(dst, v2, mem)
20420 v.AddArg3(dst, v0, v1)
20421 return true
20422 }
20423
20424
20425 for {
20426 if auxIntToInt64(v.AuxInt) != 15 {
20427 break
20428 }
20429 dst := v_0
20430 src := v_1
20431 mem := v_2
20432 v.reset(OpARM64MOVDstore)
20433 v.AuxInt = int32ToAuxInt(7)
20434 v0 := b.NewValue0(v.Pos, OpARM64MOVDload, typ.UInt64)
20435 v0.AuxInt = int32ToAuxInt(7)
20436 v0.AddArg2(src, mem)
20437 v1 := b.NewValue0(v.Pos, OpARM64MOVDstore, types.TypeMem)
20438 v2 := b.NewValue0(v.Pos, OpARM64MOVDload, typ.UInt64)
20439 v2.AddArg2(src, mem)
20440 v1.AddArg3(dst, v2, mem)
20441 v.AddArg3(dst, v0, v1)
20442 return true
20443 }
20444
20445
20446 for {
20447 if auxIntToInt64(v.AuxInt) != 16 {
20448 break
20449 }
20450 dst := v_0
20451 src := v_1
20452 mem := v_2
20453 v.reset(OpARM64STP)
20454 v0 := b.NewValue0(v.Pos, OpSelect0, typ.UInt64)
20455 v1 := b.NewValue0(v.Pos, OpARM64LDP, types.NewTuple(typ.UInt64, typ.UInt64))
20456 v1.AddArg2(src, mem)
20457 v0.AddArg(v1)
20458 v2 := b.NewValue0(v.Pos, OpSelect1, typ.UInt64)
20459 v2.AddArg(v1)
20460 v.AddArg4(dst, v0, v2, mem)
20461 return true
20462 }
20463
20464
20465 for {
20466 if auxIntToInt64(v.AuxInt) != 32 {
20467 break
20468 }
20469 dst := v_0
20470 src := v_1
20471 mem := v_2
20472 v.reset(OpARM64STP)
20473 v.AuxInt = int32ToAuxInt(16)
20474 v0 := b.NewValue0(v.Pos, OpSelect0, typ.UInt64)
20475 v1 := b.NewValue0(v.Pos, OpARM64LDP, types.NewTuple(typ.UInt64, typ.UInt64))
20476 v1.AuxInt = int32ToAuxInt(16)
20477 v1.AddArg2(src, mem)
20478 v0.AddArg(v1)
20479 v2 := b.NewValue0(v.Pos, OpSelect1, typ.UInt64)
20480 v2.AddArg(v1)
20481 v3 := b.NewValue0(v.Pos, OpARM64STP, types.TypeMem)
20482 v4 := b.NewValue0(v.Pos, OpSelect0, typ.UInt64)
20483 v5 := b.NewValue0(v.Pos, OpARM64LDP, types.NewTuple(typ.UInt64, typ.UInt64))
20484 v5.AddArg2(src, mem)
20485 v4.AddArg(v5)
20486 v6 := b.NewValue0(v.Pos, OpSelect1, typ.UInt64)
20487 v6.AddArg(v5)
20488 v3.AddArg4(dst, v4, v6, mem)
20489 v.AddArg4(dst, v0, v2, v3)
20490 return true
20491 }
20492
20493
20494 for {
20495 if auxIntToInt64(v.AuxInt) != 48 {
20496 break
20497 }
20498 dst := v_0
20499 src := v_1
20500 mem := v_2
20501 v.reset(OpARM64STP)
20502 v.AuxInt = int32ToAuxInt(32)
20503 v0 := b.NewValue0(v.Pos, OpSelect0, typ.UInt64)
20504 v1 := b.NewValue0(v.Pos, OpARM64LDP, types.NewTuple(typ.UInt64, typ.UInt64))
20505 v1.AuxInt = int32ToAuxInt(32)
20506 v1.AddArg2(src, mem)
20507 v0.AddArg(v1)
20508 v2 := b.NewValue0(v.Pos, OpSelect1, typ.UInt64)
20509 v2.AddArg(v1)
20510 v3 := b.NewValue0(v.Pos, OpARM64STP, types.TypeMem)
20511 v3.AuxInt = int32ToAuxInt(16)
20512 v4 := b.NewValue0(v.Pos, OpSelect0, typ.UInt64)
20513 v5 := b.NewValue0(v.Pos, OpARM64LDP, types.NewTuple(typ.UInt64, typ.UInt64))
20514 v5.AuxInt = int32ToAuxInt(16)
20515 v5.AddArg2(src, mem)
20516 v4.AddArg(v5)
20517 v6 := b.NewValue0(v.Pos, OpSelect1, typ.UInt64)
20518 v6.AddArg(v5)
20519 v7 := b.NewValue0(v.Pos, OpARM64STP, types.TypeMem)
20520 v8 := b.NewValue0(v.Pos, OpSelect0, typ.UInt64)
20521 v9 := b.NewValue0(v.Pos, OpARM64LDP, types.NewTuple(typ.UInt64, typ.UInt64))
20522 v9.AddArg2(src, mem)
20523 v8.AddArg(v9)
20524 v10 := b.NewValue0(v.Pos, OpSelect1, typ.UInt64)
20525 v10.AddArg(v9)
20526 v7.AddArg4(dst, v8, v10, mem)
20527 v3.AddArg4(dst, v4, v6, v7)
20528 v.AddArg4(dst, v0, v2, v3)
20529 return true
20530 }
20531
20532
20533 for {
20534 if auxIntToInt64(v.AuxInt) != 64 {
20535 break
20536 }
20537 dst := v_0
20538 src := v_1
20539 mem := v_2
20540 v.reset(OpARM64STP)
20541 v.AuxInt = int32ToAuxInt(48)
20542 v0 := b.NewValue0(v.Pos, OpSelect0, typ.UInt64)
20543 v1 := b.NewValue0(v.Pos, OpARM64LDP, types.NewTuple(typ.UInt64, typ.UInt64))
20544 v1.AuxInt = int32ToAuxInt(48)
20545 v1.AddArg2(src, mem)
20546 v0.AddArg(v1)
20547 v2 := b.NewValue0(v.Pos, OpSelect1, typ.UInt64)
20548 v2.AddArg(v1)
20549 v3 := b.NewValue0(v.Pos, OpARM64STP, types.TypeMem)
20550 v3.AuxInt = int32ToAuxInt(32)
20551 v4 := b.NewValue0(v.Pos, OpSelect0, typ.UInt64)
20552 v5 := b.NewValue0(v.Pos, OpARM64LDP, types.NewTuple(typ.UInt64, typ.UInt64))
20553 v5.AuxInt = int32ToAuxInt(32)
20554 v5.AddArg2(src, mem)
20555 v4.AddArg(v5)
20556 v6 := b.NewValue0(v.Pos, OpSelect1, typ.UInt64)
20557 v6.AddArg(v5)
20558 v7 := b.NewValue0(v.Pos, OpARM64STP, types.TypeMem)
20559 v7.AuxInt = int32ToAuxInt(16)
20560 v8 := b.NewValue0(v.Pos, OpSelect0, typ.UInt64)
20561 v9 := b.NewValue0(v.Pos, OpARM64LDP, types.NewTuple(typ.UInt64, typ.UInt64))
20562 v9.AuxInt = int32ToAuxInt(16)
20563 v9.AddArg2(src, mem)
20564 v8.AddArg(v9)
20565 v10 := b.NewValue0(v.Pos, OpSelect1, typ.UInt64)
20566 v10.AddArg(v9)
20567 v11 := b.NewValue0(v.Pos, OpARM64STP, types.TypeMem)
20568 v12 := b.NewValue0(v.Pos, OpSelect0, typ.UInt64)
20569 v13 := b.NewValue0(v.Pos, OpARM64LDP, types.NewTuple(typ.UInt64, typ.UInt64))
20570 v13.AddArg2(src, mem)
20571 v12.AddArg(v13)
20572 v14 := b.NewValue0(v.Pos, OpSelect1, typ.UInt64)
20573 v14.AddArg(v13)
20574 v11.AddArg4(dst, v12, v14, mem)
20575 v7.AddArg4(dst, v8, v10, v11)
20576 v3.AddArg4(dst, v4, v6, v7)
20577 v.AddArg4(dst, v0, v2, v3)
20578 return true
20579 }
20580
20581
20582
20583 for {
20584 s := auxIntToInt64(v.AuxInt)
20585 dst := v_0
20586 src := v_1
20587 mem := v_2
20588 if !(s%16 != 0 && s%16 <= 8 && s > 16) {
20589 break
20590 }
20591 v.reset(OpMove)
20592 v.AuxInt = int64ToAuxInt(8)
20593 v0 := b.NewValue0(v.Pos, OpOffPtr, dst.Type)
20594 v0.AuxInt = int64ToAuxInt(s - 8)
20595 v0.AddArg(dst)
20596 v1 := b.NewValue0(v.Pos, OpOffPtr, src.Type)
20597 v1.AuxInt = int64ToAuxInt(s - 8)
20598 v1.AddArg(src)
20599 v2 := b.NewValue0(v.Pos, OpMove, types.TypeMem)
20600 v2.AuxInt = int64ToAuxInt(s - s%16)
20601 v2.AddArg3(dst, src, mem)
20602 v.AddArg3(v0, v1, v2)
20603 return true
20604 }
20605
20606
20607
20608 for {
20609 s := auxIntToInt64(v.AuxInt)
20610 dst := v_0
20611 src := v_1
20612 mem := v_2
20613 if !(s%16 != 0 && s%16 > 8 && s > 16) {
20614 break
20615 }
20616 v.reset(OpMove)
20617 v.AuxInt = int64ToAuxInt(16)
20618 v0 := b.NewValue0(v.Pos, OpOffPtr, dst.Type)
20619 v0.AuxInt = int64ToAuxInt(s - 16)
20620 v0.AddArg(dst)
20621 v1 := b.NewValue0(v.Pos, OpOffPtr, src.Type)
20622 v1.AuxInt = int64ToAuxInt(s - 16)
20623 v1.AddArg(src)
20624 v2 := b.NewValue0(v.Pos, OpMove, types.TypeMem)
20625 v2.AuxInt = int64ToAuxInt(s - s%16)
20626 v2.AddArg3(dst, src, mem)
20627 v.AddArg3(v0, v1, v2)
20628 return true
20629 }
20630
20631
20632
20633 for {
20634 s := auxIntToInt64(v.AuxInt)
20635 dst := v_0
20636 src := v_1
20637 mem := v_2
20638 if !(s > 64 && s <= 16*64 && s%16 == 0 && !config.noDuffDevice && logLargeCopy(v, s)) {
20639 break
20640 }
20641 v.reset(OpARM64DUFFCOPY)
20642 v.AuxInt = int64ToAuxInt(8 * (64 - s/16))
20643 v.AddArg3(dst, src, mem)
20644 return true
20645 }
20646
20647
20648
20649 for {
20650 s := auxIntToInt64(v.AuxInt)
20651 dst := v_0
20652 src := v_1
20653 mem := v_2
20654 if !(s%16 == 0 && (s > 16*64 || config.noDuffDevice) && logLargeCopy(v, s)) {
20655 break
20656 }
20657 v.reset(OpARM64LoweredMove)
20658 v0 := b.NewValue0(v.Pos, OpARM64ADDconst, src.Type)
20659 v0.AuxInt = int64ToAuxInt(s - 16)
20660 v0.AddArg(src)
20661 v.AddArg4(dst, src, v0, mem)
20662 return true
20663 }
20664 return false
20665 }
20666 func rewriteValueARM64_OpNeq16(v *Value) bool {
20667 v_1 := v.Args[1]
20668 v_0 := v.Args[0]
20669 b := v.Block
20670 typ := &b.Func.Config.Types
20671
20672
20673 for {
20674 x := v_0
20675 y := v_1
20676 v.reset(OpARM64NotEqual)
20677 v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
20678 v1 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
20679 v1.AddArg(x)
20680 v2 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
20681 v2.AddArg(y)
20682 v0.AddArg2(v1, v2)
20683 v.AddArg(v0)
20684 return true
20685 }
20686 }
20687 func rewriteValueARM64_OpNeq32(v *Value) bool {
20688 v_1 := v.Args[1]
20689 v_0 := v.Args[0]
20690 b := v.Block
20691
20692
20693 for {
20694 x := v_0
20695 y := v_1
20696 v.reset(OpARM64NotEqual)
20697 v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
20698 v0.AddArg2(x, y)
20699 v.AddArg(v0)
20700 return true
20701 }
20702 }
20703 func rewriteValueARM64_OpNeq32F(v *Value) bool {
20704 v_1 := v.Args[1]
20705 v_0 := v.Args[0]
20706 b := v.Block
20707
20708
20709 for {
20710 x := v_0
20711 y := v_1
20712 v.reset(OpARM64NotEqual)
20713 v0 := b.NewValue0(v.Pos, OpARM64FCMPS, types.TypeFlags)
20714 v0.AddArg2(x, y)
20715 v.AddArg(v0)
20716 return true
20717 }
20718 }
20719 func rewriteValueARM64_OpNeq64(v *Value) bool {
20720 v_1 := v.Args[1]
20721 v_0 := v.Args[0]
20722 b := v.Block
20723
20724
20725 for {
20726 x := v_0
20727 y := v_1
20728 v.reset(OpARM64NotEqual)
20729 v0 := b.NewValue0(v.Pos, OpARM64CMP, types.TypeFlags)
20730 v0.AddArg2(x, y)
20731 v.AddArg(v0)
20732 return true
20733 }
20734 }
20735 func rewriteValueARM64_OpNeq64F(v *Value) bool {
20736 v_1 := v.Args[1]
20737 v_0 := v.Args[0]
20738 b := v.Block
20739
20740
20741 for {
20742 x := v_0
20743 y := v_1
20744 v.reset(OpARM64NotEqual)
20745 v0 := b.NewValue0(v.Pos, OpARM64FCMPD, types.TypeFlags)
20746 v0.AddArg2(x, y)
20747 v.AddArg(v0)
20748 return true
20749 }
20750 }
20751 func rewriteValueARM64_OpNeq8(v *Value) bool {
20752 v_1 := v.Args[1]
20753 v_0 := v.Args[0]
20754 b := v.Block
20755 typ := &b.Func.Config.Types
20756
20757
20758 for {
20759 x := v_0
20760 y := v_1
20761 v.reset(OpARM64NotEqual)
20762 v0 := b.NewValue0(v.Pos, OpARM64CMPW, types.TypeFlags)
20763 v1 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
20764 v1.AddArg(x)
20765 v2 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
20766 v2.AddArg(y)
20767 v0.AddArg2(v1, v2)
20768 v.AddArg(v0)
20769 return true
20770 }
20771 }
20772 func rewriteValueARM64_OpNeqPtr(v *Value) bool {
20773 v_1 := v.Args[1]
20774 v_0 := v.Args[0]
20775 b := v.Block
20776
20777
20778 for {
20779 x := v_0
20780 y := v_1
20781 v.reset(OpARM64NotEqual)
20782 v0 := b.NewValue0(v.Pos, OpARM64CMP, types.TypeFlags)
20783 v0.AddArg2(x, y)
20784 v.AddArg(v0)
20785 return true
20786 }
20787 }
20788 func rewriteValueARM64_OpNot(v *Value) bool {
20789 v_0 := v.Args[0]
20790 b := v.Block
20791 typ := &b.Func.Config.Types
20792
20793
20794 for {
20795 x := v_0
20796 v.reset(OpARM64XOR)
20797 v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
20798 v0.AuxInt = int64ToAuxInt(1)
20799 v.AddArg2(v0, x)
20800 return true
20801 }
20802 }
20803 func rewriteValueARM64_OpOffPtr(v *Value) bool {
20804 v_0 := v.Args[0]
20805
20806
20807
20808 for {
20809 off := auxIntToInt64(v.AuxInt)
20810 ptr := v_0
20811 if ptr.Op != OpSP || !(is32Bit(off)) {
20812 break
20813 }
20814 v.reset(OpARM64MOVDaddr)
20815 v.AuxInt = int32ToAuxInt(int32(off))
20816 v.AddArg(ptr)
20817 return true
20818 }
20819
20820
20821 for {
20822 off := auxIntToInt64(v.AuxInt)
20823 ptr := v_0
20824 v.reset(OpARM64ADDconst)
20825 v.AuxInt = int64ToAuxInt(off)
20826 v.AddArg(ptr)
20827 return true
20828 }
20829 }
20830 func rewriteValueARM64_OpPanicBounds(v *Value) bool {
20831 v_2 := v.Args[2]
20832 v_1 := v.Args[1]
20833 v_0 := v.Args[0]
20834
20835
20836
20837 for {
20838 kind := auxIntToInt64(v.AuxInt)
20839 x := v_0
20840 y := v_1
20841 mem := v_2
20842 if !(boundsABI(kind) == 0) {
20843 break
20844 }
20845 v.reset(OpARM64LoweredPanicBoundsA)
20846 v.AuxInt = int64ToAuxInt(kind)
20847 v.AddArg3(x, y, mem)
20848 return true
20849 }
20850
20851
20852
20853 for {
20854 kind := auxIntToInt64(v.AuxInt)
20855 x := v_0
20856 y := v_1
20857 mem := v_2
20858 if !(boundsABI(kind) == 1) {
20859 break
20860 }
20861 v.reset(OpARM64LoweredPanicBoundsB)
20862 v.AuxInt = int64ToAuxInt(kind)
20863 v.AddArg3(x, y, mem)
20864 return true
20865 }
20866
20867
20868
20869 for {
20870 kind := auxIntToInt64(v.AuxInt)
20871 x := v_0
20872 y := v_1
20873 mem := v_2
20874 if !(boundsABI(kind) == 2) {
20875 break
20876 }
20877 v.reset(OpARM64LoweredPanicBoundsC)
20878 v.AuxInt = int64ToAuxInt(kind)
20879 v.AddArg3(x, y, mem)
20880 return true
20881 }
20882 return false
20883 }
20884 func rewriteValueARM64_OpPopCount16(v *Value) bool {
20885 v_0 := v.Args[0]
20886 b := v.Block
20887 typ := &b.Func.Config.Types
20888
20889
20890 for {
20891 t := v.Type
20892 x := v_0
20893 v.reset(OpARM64FMOVDfpgp)
20894 v.Type = t
20895 v0 := b.NewValue0(v.Pos, OpARM64VUADDLV, typ.Float64)
20896 v1 := b.NewValue0(v.Pos, OpARM64VCNT, typ.Float64)
20897 v2 := b.NewValue0(v.Pos, OpARM64FMOVDgpfp, typ.Float64)
20898 v3 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
20899 v3.AddArg(x)
20900 v2.AddArg(v3)
20901 v1.AddArg(v2)
20902 v0.AddArg(v1)
20903 v.AddArg(v0)
20904 return true
20905 }
20906 }
20907 func rewriteValueARM64_OpPopCount32(v *Value) bool {
20908 v_0 := v.Args[0]
20909 b := v.Block
20910 typ := &b.Func.Config.Types
20911
20912
20913 for {
20914 t := v.Type
20915 x := v_0
20916 v.reset(OpARM64FMOVDfpgp)
20917 v.Type = t
20918 v0 := b.NewValue0(v.Pos, OpARM64VUADDLV, typ.Float64)
20919 v1 := b.NewValue0(v.Pos, OpARM64VCNT, typ.Float64)
20920 v2 := b.NewValue0(v.Pos, OpARM64FMOVDgpfp, typ.Float64)
20921 v3 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
20922 v3.AddArg(x)
20923 v2.AddArg(v3)
20924 v1.AddArg(v2)
20925 v0.AddArg(v1)
20926 v.AddArg(v0)
20927 return true
20928 }
20929 }
20930 func rewriteValueARM64_OpPopCount64(v *Value) bool {
20931 v_0 := v.Args[0]
20932 b := v.Block
20933 typ := &b.Func.Config.Types
20934
20935
20936 for {
20937 t := v.Type
20938 x := v_0
20939 v.reset(OpARM64FMOVDfpgp)
20940 v.Type = t
20941 v0 := b.NewValue0(v.Pos, OpARM64VUADDLV, typ.Float64)
20942 v1 := b.NewValue0(v.Pos, OpARM64VCNT, typ.Float64)
20943 v2 := b.NewValue0(v.Pos, OpARM64FMOVDgpfp, typ.Float64)
20944 v2.AddArg(x)
20945 v1.AddArg(v2)
20946 v0.AddArg(v1)
20947 v.AddArg(v0)
20948 return true
20949 }
20950 }
20951 func rewriteValueARM64_OpPrefetchCache(v *Value) bool {
20952 v_1 := v.Args[1]
20953 v_0 := v.Args[0]
20954
20955
20956 for {
20957 addr := v_0
20958 mem := v_1
20959 v.reset(OpARM64PRFM)
20960 v.AuxInt = int64ToAuxInt(0)
20961 v.AddArg2(addr, mem)
20962 return true
20963 }
20964 }
20965 func rewriteValueARM64_OpPrefetchCacheStreamed(v *Value) bool {
20966 v_1 := v.Args[1]
20967 v_0 := v.Args[0]
20968
20969
20970 for {
20971 addr := v_0
20972 mem := v_1
20973 v.reset(OpARM64PRFM)
20974 v.AuxInt = int64ToAuxInt(1)
20975 v.AddArg2(addr, mem)
20976 return true
20977 }
20978 }
20979 func rewriteValueARM64_OpPubBarrier(v *Value) bool {
20980 v_0 := v.Args[0]
20981
20982
20983 for {
20984 mem := v_0
20985 v.reset(OpARM64DMB)
20986 v.AuxInt = int64ToAuxInt(0xe)
20987 v.AddArg(mem)
20988 return true
20989 }
20990 }
20991 func rewriteValueARM64_OpRotateLeft16(v *Value) bool {
20992 v_1 := v.Args[1]
20993 v_0 := v.Args[0]
20994 b := v.Block
20995 typ := &b.Func.Config.Types
20996
20997
20998 for {
20999 t := v.Type
21000 x := v_0
21001 if v_1.Op != OpARM64MOVDconst {
21002 break
21003 }
21004 c := auxIntToInt64(v_1.AuxInt)
21005 v.reset(OpOr16)
21006 v0 := b.NewValue0(v.Pos, OpLsh16x64, t)
21007 v1 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
21008 v1.AuxInt = int64ToAuxInt(c & 15)
21009 v0.AddArg2(x, v1)
21010 v2 := b.NewValue0(v.Pos, OpRsh16Ux64, t)
21011 v3 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
21012 v3.AuxInt = int64ToAuxInt(-c & 15)
21013 v2.AddArg2(x, v3)
21014 v.AddArg2(v0, v2)
21015 return true
21016 }
21017
21018
21019 for {
21020 t := v.Type
21021 x := v_0
21022 y := v_1
21023 v.reset(OpARM64RORW)
21024 v.Type = t
21025 v0 := b.NewValue0(v.Pos, OpARM64ORshiftLL, typ.UInt32)
21026 v0.AuxInt = int64ToAuxInt(16)
21027 v1 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
21028 v1.AddArg(x)
21029 v0.AddArg2(v1, v1)
21030 v2 := b.NewValue0(v.Pos, OpARM64NEG, typ.Int64)
21031 v2.AddArg(y)
21032 v.AddArg2(v0, v2)
21033 return true
21034 }
21035 }
21036 func rewriteValueARM64_OpRotateLeft32(v *Value) bool {
21037 v_1 := v.Args[1]
21038 v_0 := v.Args[0]
21039 b := v.Block
21040
21041
21042 for {
21043 x := v_0
21044 y := v_1
21045 v.reset(OpARM64RORW)
21046 v0 := b.NewValue0(v.Pos, OpARM64NEG, y.Type)
21047 v0.AddArg(y)
21048 v.AddArg2(x, v0)
21049 return true
21050 }
21051 }
21052 func rewriteValueARM64_OpRotateLeft64(v *Value) bool {
21053 v_1 := v.Args[1]
21054 v_0 := v.Args[0]
21055 b := v.Block
21056
21057
21058 for {
21059 x := v_0
21060 y := v_1
21061 v.reset(OpARM64ROR)
21062 v0 := b.NewValue0(v.Pos, OpARM64NEG, y.Type)
21063 v0.AddArg(y)
21064 v.AddArg2(x, v0)
21065 return true
21066 }
21067 }
21068 func rewriteValueARM64_OpRotateLeft8(v *Value) bool {
21069 v_1 := v.Args[1]
21070 v_0 := v.Args[0]
21071 b := v.Block
21072 typ := &b.Func.Config.Types
21073
21074
21075 for {
21076 t := v.Type
21077 x := v_0
21078 if v_1.Op != OpARM64MOVDconst {
21079 break
21080 }
21081 c := auxIntToInt64(v_1.AuxInt)
21082 v.reset(OpOr8)
21083 v0 := b.NewValue0(v.Pos, OpLsh8x64, t)
21084 v1 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
21085 v1.AuxInt = int64ToAuxInt(c & 7)
21086 v0.AddArg2(x, v1)
21087 v2 := b.NewValue0(v.Pos, OpRsh8Ux64, t)
21088 v3 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
21089 v3.AuxInt = int64ToAuxInt(-c & 7)
21090 v2.AddArg2(x, v3)
21091 v.AddArg2(v0, v2)
21092 return true
21093 }
21094
21095
21096 for {
21097 t := v.Type
21098 x := v_0
21099 y := v_1
21100 v.reset(OpARM64OR)
21101 v.Type = t
21102 v0 := b.NewValue0(v.Pos, OpARM64SLL, t)
21103 v1 := b.NewValue0(v.Pos, OpARM64ANDconst, typ.Int64)
21104 v1.AuxInt = int64ToAuxInt(7)
21105 v1.AddArg(y)
21106 v0.AddArg2(x, v1)
21107 v2 := b.NewValue0(v.Pos, OpARM64SRL, t)
21108 v3 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
21109 v3.AddArg(x)
21110 v4 := b.NewValue0(v.Pos, OpARM64ANDconst, typ.Int64)
21111 v4.AuxInt = int64ToAuxInt(7)
21112 v5 := b.NewValue0(v.Pos, OpARM64NEG, typ.Int64)
21113 v5.AddArg(y)
21114 v4.AddArg(v5)
21115 v2.AddArg2(v3, v4)
21116 v.AddArg2(v0, v2)
21117 return true
21118 }
21119 }
21120 func rewriteValueARM64_OpRsh16Ux16(v *Value) bool {
21121 v_1 := v.Args[1]
21122 v_0 := v.Args[0]
21123 b := v.Block
21124 typ := &b.Func.Config.Types
21125
21126
21127
21128 for {
21129 t := v.Type
21130 x := v_0
21131 y := v_1
21132 if !(shiftIsBounded(v)) {
21133 break
21134 }
21135 v.reset(OpARM64SRL)
21136 v.Type = t
21137 v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
21138 v0.AddArg(x)
21139 v.AddArg2(v0, y)
21140 return true
21141 }
21142
21143
21144
21145 for {
21146 t := v.Type
21147 x := v_0
21148 y := v_1
21149 if !(!shiftIsBounded(v)) {
21150 break
21151 }
21152 v.reset(OpARM64CSEL)
21153 v.AuxInt = opToAuxInt(OpARM64LessThanU)
21154 v0 := b.NewValue0(v.Pos, OpARM64SRL, t)
21155 v1 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
21156 v1.AddArg(x)
21157 v0.AddArg2(v1, y)
21158 v2 := b.NewValue0(v.Pos, OpConst64, t)
21159 v2.AuxInt = int64ToAuxInt(0)
21160 v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
21161 v3.AuxInt = int64ToAuxInt(64)
21162 v4 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
21163 v4.AddArg(y)
21164 v3.AddArg(v4)
21165 v.AddArg3(v0, v2, v3)
21166 return true
21167 }
21168 return false
21169 }
21170 func rewriteValueARM64_OpRsh16Ux32(v *Value) bool {
21171 v_1 := v.Args[1]
21172 v_0 := v.Args[0]
21173 b := v.Block
21174 typ := &b.Func.Config.Types
21175
21176
21177
21178 for {
21179 t := v.Type
21180 x := v_0
21181 y := v_1
21182 if !(shiftIsBounded(v)) {
21183 break
21184 }
21185 v.reset(OpARM64SRL)
21186 v.Type = t
21187 v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
21188 v0.AddArg(x)
21189 v.AddArg2(v0, y)
21190 return true
21191 }
21192
21193
21194
21195 for {
21196 t := v.Type
21197 x := v_0
21198 y := v_1
21199 if !(!shiftIsBounded(v)) {
21200 break
21201 }
21202 v.reset(OpARM64CSEL)
21203 v.AuxInt = opToAuxInt(OpARM64LessThanU)
21204 v0 := b.NewValue0(v.Pos, OpARM64SRL, t)
21205 v1 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
21206 v1.AddArg(x)
21207 v0.AddArg2(v1, y)
21208 v2 := b.NewValue0(v.Pos, OpConst64, t)
21209 v2.AuxInt = int64ToAuxInt(0)
21210 v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
21211 v3.AuxInt = int64ToAuxInt(64)
21212 v4 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
21213 v4.AddArg(y)
21214 v3.AddArg(v4)
21215 v.AddArg3(v0, v2, v3)
21216 return true
21217 }
21218 return false
21219 }
21220 func rewriteValueARM64_OpRsh16Ux64(v *Value) bool {
21221 v_1 := v.Args[1]
21222 v_0 := v.Args[0]
21223 b := v.Block
21224 typ := &b.Func.Config.Types
21225
21226
21227
21228 for {
21229 t := v.Type
21230 x := v_0
21231 y := v_1
21232 if !(shiftIsBounded(v)) {
21233 break
21234 }
21235 v.reset(OpARM64SRL)
21236 v.Type = t
21237 v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
21238 v0.AddArg(x)
21239 v.AddArg2(v0, y)
21240 return true
21241 }
21242
21243
21244
21245 for {
21246 t := v.Type
21247 x := v_0
21248 y := v_1
21249 if !(!shiftIsBounded(v)) {
21250 break
21251 }
21252 v.reset(OpARM64CSEL)
21253 v.AuxInt = opToAuxInt(OpARM64LessThanU)
21254 v0 := b.NewValue0(v.Pos, OpARM64SRL, t)
21255 v1 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
21256 v1.AddArg(x)
21257 v0.AddArg2(v1, y)
21258 v2 := b.NewValue0(v.Pos, OpConst64, t)
21259 v2.AuxInt = int64ToAuxInt(0)
21260 v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
21261 v3.AuxInt = int64ToAuxInt(64)
21262 v3.AddArg(y)
21263 v.AddArg3(v0, v2, v3)
21264 return true
21265 }
21266 return false
21267 }
21268 func rewriteValueARM64_OpRsh16Ux8(v *Value) bool {
21269 v_1 := v.Args[1]
21270 v_0 := v.Args[0]
21271 b := v.Block
21272 typ := &b.Func.Config.Types
21273
21274
21275
21276 for {
21277 t := v.Type
21278 x := v_0
21279 y := v_1
21280 if !(shiftIsBounded(v)) {
21281 break
21282 }
21283 v.reset(OpARM64SRL)
21284 v.Type = t
21285 v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
21286 v0.AddArg(x)
21287 v.AddArg2(v0, y)
21288 return true
21289 }
21290
21291
21292
21293 for {
21294 t := v.Type
21295 x := v_0
21296 y := v_1
21297 if !(!shiftIsBounded(v)) {
21298 break
21299 }
21300 v.reset(OpARM64CSEL)
21301 v.AuxInt = opToAuxInt(OpARM64LessThanU)
21302 v0 := b.NewValue0(v.Pos, OpARM64SRL, t)
21303 v1 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
21304 v1.AddArg(x)
21305 v0.AddArg2(v1, y)
21306 v2 := b.NewValue0(v.Pos, OpConst64, t)
21307 v2.AuxInt = int64ToAuxInt(0)
21308 v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
21309 v3.AuxInt = int64ToAuxInt(64)
21310 v4 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
21311 v4.AddArg(y)
21312 v3.AddArg(v4)
21313 v.AddArg3(v0, v2, v3)
21314 return true
21315 }
21316 return false
21317 }
21318 func rewriteValueARM64_OpRsh16x16(v *Value) bool {
21319 v_1 := v.Args[1]
21320 v_0 := v.Args[0]
21321 b := v.Block
21322 typ := &b.Func.Config.Types
21323
21324
21325
21326 for {
21327 t := v.Type
21328 x := v_0
21329 y := v_1
21330 if !(shiftIsBounded(v)) {
21331 break
21332 }
21333 v.reset(OpARM64SRA)
21334 v.Type = t
21335 v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
21336 v0.AddArg(x)
21337 v.AddArg2(v0, y)
21338 return true
21339 }
21340
21341
21342
21343 for {
21344 x := v_0
21345 y := v_1
21346 if !(!shiftIsBounded(v)) {
21347 break
21348 }
21349 v.reset(OpARM64SRA)
21350 v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
21351 v0.AddArg(x)
21352 v1 := b.NewValue0(v.Pos, OpARM64CSEL, y.Type)
21353 v1.AuxInt = opToAuxInt(OpARM64LessThanU)
21354 v2 := b.NewValue0(v.Pos, OpConst64, y.Type)
21355 v2.AuxInt = int64ToAuxInt(63)
21356 v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
21357 v3.AuxInt = int64ToAuxInt(64)
21358 v4 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
21359 v4.AddArg(y)
21360 v3.AddArg(v4)
21361 v1.AddArg3(y, v2, v3)
21362 v.AddArg2(v0, v1)
21363 return true
21364 }
21365 return false
21366 }
21367 func rewriteValueARM64_OpRsh16x32(v *Value) bool {
21368 v_1 := v.Args[1]
21369 v_0 := v.Args[0]
21370 b := v.Block
21371 typ := &b.Func.Config.Types
21372
21373
21374
21375 for {
21376 t := v.Type
21377 x := v_0
21378 y := v_1
21379 if !(shiftIsBounded(v)) {
21380 break
21381 }
21382 v.reset(OpARM64SRA)
21383 v.Type = t
21384 v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
21385 v0.AddArg(x)
21386 v.AddArg2(v0, y)
21387 return true
21388 }
21389
21390
21391
21392 for {
21393 x := v_0
21394 y := v_1
21395 if !(!shiftIsBounded(v)) {
21396 break
21397 }
21398 v.reset(OpARM64SRA)
21399 v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
21400 v0.AddArg(x)
21401 v1 := b.NewValue0(v.Pos, OpARM64CSEL, y.Type)
21402 v1.AuxInt = opToAuxInt(OpARM64LessThanU)
21403 v2 := b.NewValue0(v.Pos, OpConst64, y.Type)
21404 v2.AuxInt = int64ToAuxInt(63)
21405 v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
21406 v3.AuxInt = int64ToAuxInt(64)
21407 v4 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
21408 v4.AddArg(y)
21409 v3.AddArg(v4)
21410 v1.AddArg3(y, v2, v3)
21411 v.AddArg2(v0, v1)
21412 return true
21413 }
21414 return false
21415 }
21416 func rewriteValueARM64_OpRsh16x64(v *Value) bool {
21417 v_1 := v.Args[1]
21418 v_0 := v.Args[0]
21419 b := v.Block
21420 typ := &b.Func.Config.Types
21421
21422
21423
21424 for {
21425 t := v.Type
21426 x := v_0
21427 y := v_1
21428 if !(shiftIsBounded(v)) {
21429 break
21430 }
21431 v.reset(OpARM64SRA)
21432 v.Type = t
21433 v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
21434 v0.AddArg(x)
21435 v.AddArg2(v0, y)
21436 return true
21437 }
21438
21439
21440
21441 for {
21442 x := v_0
21443 y := v_1
21444 if !(!shiftIsBounded(v)) {
21445 break
21446 }
21447 v.reset(OpARM64SRA)
21448 v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
21449 v0.AddArg(x)
21450 v1 := b.NewValue0(v.Pos, OpARM64CSEL, y.Type)
21451 v1.AuxInt = opToAuxInt(OpARM64LessThanU)
21452 v2 := b.NewValue0(v.Pos, OpConst64, y.Type)
21453 v2.AuxInt = int64ToAuxInt(63)
21454 v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
21455 v3.AuxInt = int64ToAuxInt(64)
21456 v3.AddArg(y)
21457 v1.AddArg3(y, v2, v3)
21458 v.AddArg2(v0, v1)
21459 return true
21460 }
21461 return false
21462 }
21463 func rewriteValueARM64_OpRsh16x8(v *Value) bool {
21464 v_1 := v.Args[1]
21465 v_0 := v.Args[0]
21466 b := v.Block
21467 typ := &b.Func.Config.Types
21468
21469
21470
21471 for {
21472 t := v.Type
21473 x := v_0
21474 y := v_1
21475 if !(shiftIsBounded(v)) {
21476 break
21477 }
21478 v.reset(OpARM64SRA)
21479 v.Type = t
21480 v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
21481 v0.AddArg(x)
21482 v.AddArg2(v0, y)
21483 return true
21484 }
21485
21486
21487
21488 for {
21489 x := v_0
21490 y := v_1
21491 if !(!shiftIsBounded(v)) {
21492 break
21493 }
21494 v.reset(OpARM64SRA)
21495 v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
21496 v0.AddArg(x)
21497 v1 := b.NewValue0(v.Pos, OpARM64CSEL, y.Type)
21498 v1.AuxInt = opToAuxInt(OpARM64LessThanU)
21499 v2 := b.NewValue0(v.Pos, OpConst64, y.Type)
21500 v2.AuxInt = int64ToAuxInt(63)
21501 v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
21502 v3.AuxInt = int64ToAuxInt(64)
21503 v4 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
21504 v4.AddArg(y)
21505 v3.AddArg(v4)
21506 v1.AddArg3(y, v2, v3)
21507 v.AddArg2(v0, v1)
21508 return true
21509 }
21510 return false
21511 }
21512 func rewriteValueARM64_OpRsh32Ux16(v *Value) bool {
21513 v_1 := v.Args[1]
21514 v_0 := v.Args[0]
21515 b := v.Block
21516 typ := &b.Func.Config.Types
21517
21518
21519
21520 for {
21521 t := v.Type
21522 x := v_0
21523 y := v_1
21524 if !(shiftIsBounded(v)) {
21525 break
21526 }
21527 v.reset(OpARM64SRL)
21528 v.Type = t
21529 v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
21530 v0.AddArg(x)
21531 v.AddArg2(v0, y)
21532 return true
21533 }
21534
21535
21536
21537 for {
21538 t := v.Type
21539 x := v_0
21540 y := v_1
21541 if !(!shiftIsBounded(v)) {
21542 break
21543 }
21544 v.reset(OpARM64CSEL)
21545 v.AuxInt = opToAuxInt(OpARM64LessThanU)
21546 v0 := b.NewValue0(v.Pos, OpARM64SRL, t)
21547 v1 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
21548 v1.AddArg(x)
21549 v0.AddArg2(v1, y)
21550 v2 := b.NewValue0(v.Pos, OpConst64, t)
21551 v2.AuxInt = int64ToAuxInt(0)
21552 v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
21553 v3.AuxInt = int64ToAuxInt(64)
21554 v4 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
21555 v4.AddArg(y)
21556 v3.AddArg(v4)
21557 v.AddArg3(v0, v2, v3)
21558 return true
21559 }
21560 return false
21561 }
21562 func rewriteValueARM64_OpRsh32Ux32(v *Value) bool {
21563 v_1 := v.Args[1]
21564 v_0 := v.Args[0]
21565 b := v.Block
21566 typ := &b.Func.Config.Types
21567
21568
21569
21570 for {
21571 t := v.Type
21572 x := v_0
21573 y := v_1
21574 if !(shiftIsBounded(v)) {
21575 break
21576 }
21577 v.reset(OpARM64SRL)
21578 v.Type = t
21579 v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
21580 v0.AddArg(x)
21581 v.AddArg2(v0, y)
21582 return true
21583 }
21584
21585
21586
21587 for {
21588 t := v.Type
21589 x := v_0
21590 y := v_1
21591 if !(!shiftIsBounded(v)) {
21592 break
21593 }
21594 v.reset(OpARM64CSEL)
21595 v.AuxInt = opToAuxInt(OpARM64LessThanU)
21596 v0 := b.NewValue0(v.Pos, OpARM64SRL, t)
21597 v1 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
21598 v1.AddArg(x)
21599 v0.AddArg2(v1, y)
21600 v2 := b.NewValue0(v.Pos, OpConst64, t)
21601 v2.AuxInt = int64ToAuxInt(0)
21602 v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
21603 v3.AuxInt = int64ToAuxInt(64)
21604 v4 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
21605 v4.AddArg(y)
21606 v3.AddArg(v4)
21607 v.AddArg3(v0, v2, v3)
21608 return true
21609 }
21610 return false
21611 }
21612 func rewriteValueARM64_OpRsh32Ux64(v *Value) bool {
21613 v_1 := v.Args[1]
21614 v_0 := v.Args[0]
21615 b := v.Block
21616 typ := &b.Func.Config.Types
21617
21618
21619
21620 for {
21621 t := v.Type
21622 x := v_0
21623 y := v_1
21624 if !(shiftIsBounded(v)) {
21625 break
21626 }
21627 v.reset(OpARM64SRL)
21628 v.Type = t
21629 v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
21630 v0.AddArg(x)
21631 v.AddArg2(v0, y)
21632 return true
21633 }
21634
21635
21636
21637 for {
21638 t := v.Type
21639 x := v_0
21640 y := v_1
21641 if !(!shiftIsBounded(v)) {
21642 break
21643 }
21644 v.reset(OpARM64CSEL)
21645 v.AuxInt = opToAuxInt(OpARM64LessThanU)
21646 v0 := b.NewValue0(v.Pos, OpARM64SRL, t)
21647 v1 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
21648 v1.AddArg(x)
21649 v0.AddArg2(v1, y)
21650 v2 := b.NewValue0(v.Pos, OpConst64, t)
21651 v2.AuxInt = int64ToAuxInt(0)
21652 v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
21653 v3.AuxInt = int64ToAuxInt(64)
21654 v3.AddArg(y)
21655 v.AddArg3(v0, v2, v3)
21656 return true
21657 }
21658 return false
21659 }
21660 func rewriteValueARM64_OpRsh32Ux8(v *Value) bool {
21661 v_1 := v.Args[1]
21662 v_0 := v.Args[0]
21663 b := v.Block
21664 typ := &b.Func.Config.Types
21665
21666
21667
21668 for {
21669 t := v.Type
21670 x := v_0
21671 y := v_1
21672 if !(shiftIsBounded(v)) {
21673 break
21674 }
21675 v.reset(OpARM64SRL)
21676 v.Type = t
21677 v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
21678 v0.AddArg(x)
21679 v.AddArg2(v0, y)
21680 return true
21681 }
21682
21683
21684
21685 for {
21686 t := v.Type
21687 x := v_0
21688 y := v_1
21689 if !(!shiftIsBounded(v)) {
21690 break
21691 }
21692 v.reset(OpARM64CSEL)
21693 v.AuxInt = opToAuxInt(OpARM64LessThanU)
21694 v0 := b.NewValue0(v.Pos, OpARM64SRL, t)
21695 v1 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
21696 v1.AddArg(x)
21697 v0.AddArg2(v1, y)
21698 v2 := b.NewValue0(v.Pos, OpConst64, t)
21699 v2.AuxInt = int64ToAuxInt(0)
21700 v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
21701 v3.AuxInt = int64ToAuxInt(64)
21702 v4 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
21703 v4.AddArg(y)
21704 v3.AddArg(v4)
21705 v.AddArg3(v0, v2, v3)
21706 return true
21707 }
21708 return false
21709 }
21710 func rewriteValueARM64_OpRsh32x16(v *Value) bool {
21711 v_1 := v.Args[1]
21712 v_0 := v.Args[0]
21713 b := v.Block
21714 typ := &b.Func.Config.Types
21715
21716
21717
21718 for {
21719 t := v.Type
21720 x := v_0
21721 y := v_1
21722 if !(shiftIsBounded(v)) {
21723 break
21724 }
21725 v.reset(OpARM64SRA)
21726 v.Type = t
21727 v0 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
21728 v0.AddArg(x)
21729 v.AddArg2(v0, y)
21730 return true
21731 }
21732
21733
21734
21735 for {
21736 x := v_0
21737 y := v_1
21738 if !(!shiftIsBounded(v)) {
21739 break
21740 }
21741 v.reset(OpARM64SRA)
21742 v0 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
21743 v0.AddArg(x)
21744 v1 := b.NewValue0(v.Pos, OpARM64CSEL, y.Type)
21745 v1.AuxInt = opToAuxInt(OpARM64LessThanU)
21746 v2 := b.NewValue0(v.Pos, OpConst64, y.Type)
21747 v2.AuxInt = int64ToAuxInt(63)
21748 v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
21749 v3.AuxInt = int64ToAuxInt(64)
21750 v4 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
21751 v4.AddArg(y)
21752 v3.AddArg(v4)
21753 v1.AddArg3(y, v2, v3)
21754 v.AddArg2(v0, v1)
21755 return true
21756 }
21757 return false
21758 }
21759 func rewriteValueARM64_OpRsh32x32(v *Value) bool {
21760 v_1 := v.Args[1]
21761 v_0 := v.Args[0]
21762 b := v.Block
21763 typ := &b.Func.Config.Types
21764
21765
21766
21767 for {
21768 t := v.Type
21769 x := v_0
21770 y := v_1
21771 if !(shiftIsBounded(v)) {
21772 break
21773 }
21774 v.reset(OpARM64SRA)
21775 v.Type = t
21776 v0 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
21777 v0.AddArg(x)
21778 v.AddArg2(v0, y)
21779 return true
21780 }
21781
21782
21783
21784 for {
21785 x := v_0
21786 y := v_1
21787 if !(!shiftIsBounded(v)) {
21788 break
21789 }
21790 v.reset(OpARM64SRA)
21791 v0 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
21792 v0.AddArg(x)
21793 v1 := b.NewValue0(v.Pos, OpARM64CSEL, y.Type)
21794 v1.AuxInt = opToAuxInt(OpARM64LessThanU)
21795 v2 := b.NewValue0(v.Pos, OpConst64, y.Type)
21796 v2.AuxInt = int64ToAuxInt(63)
21797 v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
21798 v3.AuxInt = int64ToAuxInt(64)
21799 v4 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
21800 v4.AddArg(y)
21801 v3.AddArg(v4)
21802 v1.AddArg3(y, v2, v3)
21803 v.AddArg2(v0, v1)
21804 return true
21805 }
21806 return false
21807 }
21808 func rewriteValueARM64_OpRsh32x64(v *Value) bool {
21809 v_1 := v.Args[1]
21810 v_0 := v.Args[0]
21811 b := v.Block
21812 typ := &b.Func.Config.Types
21813
21814
21815
21816 for {
21817 t := v.Type
21818 x := v_0
21819 y := v_1
21820 if !(shiftIsBounded(v)) {
21821 break
21822 }
21823 v.reset(OpARM64SRA)
21824 v.Type = t
21825 v0 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
21826 v0.AddArg(x)
21827 v.AddArg2(v0, y)
21828 return true
21829 }
21830
21831
21832
21833 for {
21834 x := v_0
21835 y := v_1
21836 if !(!shiftIsBounded(v)) {
21837 break
21838 }
21839 v.reset(OpARM64SRA)
21840 v0 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
21841 v0.AddArg(x)
21842 v1 := b.NewValue0(v.Pos, OpARM64CSEL, y.Type)
21843 v1.AuxInt = opToAuxInt(OpARM64LessThanU)
21844 v2 := b.NewValue0(v.Pos, OpConst64, y.Type)
21845 v2.AuxInt = int64ToAuxInt(63)
21846 v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
21847 v3.AuxInt = int64ToAuxInt(64)
21848 v3.AddArg(y)
21849 v1.AddArg3(y, v2, v3)
21850 v.AddArg2(v0, v1)
21851 return true
21852 }
21853 return false
21854 }
21855 func rewriteValueARM64_OpRsh32x8(v *Value) bool {
21856 v_1 := v.Args[1]
21857 v_0 := v.Args[0]
21858 b := v.Block
21859 typ := &b.Func.Config.Types
21860
21861
21862
21863 for {
21864 t := v.Type
21865 x := v_0
21866 y := v_1
21867 if !(shiftIsBounded(v)) {
21868 break
21869 }
21870 v.reset(OpARM64SRA)
21871 v.Type = t
21872 v0 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
21873 v0.AddArg(x)
21874 v.AddArg2(v0, y)
21875 return true
21876 }
21877
21878
21879
21880 for {
21881 x := v_0
21882 y := v_1
21883 if !(!shiftIsBounded(v)) {
21884 break
21885 }
21886 v.reset(OpARM64SRA)
21887 v0 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
21888 v0.AddArg(x)
21889 v1 := b.NewValue0(v.Pos, OpARM64CSEL, y.Type)
21890 v1.AuxInt = opToAuxInt(OpARM64LessThanU)
21891 v2 := b.NewValue0(v.Pos, OpConst64, y.Type)
21892 v2.AuxInt = int64ToAuxInt(63)
21893 v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
21894 v3.AuxInt = int64ToAuxInt(64)
21895 v4 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
21896 v4.AddArg(y)
21897 v3.AddArg(v4)
21898 v1.AddArg3(y, v2, v3)
21899 v.AddArg2(v0, v1)
21900 return true
21901 }
21902 return false
21903 }
21904 func rewriteValueARM64_OpRsh64Ux16(v *Value) bool {
21905 v_1 := v.Args[1]
21906 v_0 := v.Args[0]
21907 b := v.Block
21908 typ := &b.Func.Config.Types
21909
21910
21911
21912 for {
21913 t := v.Type
21914 x := v_0
21915 y := v_1
21916 if !(shiftIsBounded(v)) {
21917 break
21918 }
21919 v.reset(OpARM64SRL)
21920 v.Type = t
21921 v.AddArg2(x, y)
21922 return true
21923 }
21924
21925
21926
21927 for {
21928 t := v.Type
21929 x := v_0
21930 y := v_1
21931 if !(!shiftIsBounded(v)) {
21932 break
21933 }
21934 v.reset(OpARM64CSEL)
21935 v.AuxInt = opToAuxInt(OpARM64LessThanU)
21936 v0 := b.NewValue0(v.Pos, OpARM64SRL, t)
21937 v0.AddArg2(x, y)
21938 v1 := b.NewValue0(v.Pos, OpConst64, t)
21939 v1.AuxInt = int64ToAuxInt(0)
21940 v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
21941 v2.AuxInt = int64ToAuxInt(64)
21942 v3 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
21943 v3.AddArg(y)
21944 v2.AddArg(v3)
21945 v.AddArg3(v0, v1, v2)
21946 return true
21947 }
21948 return false
21949 }
21950 func rewriteValueARM64_OpRsh64Ux32(v *Value) bool {
21951 v_1 := v.Args[1]
21952 v_0 := v.Args[0]
21953 b := v.Block
21954 typ := &b.Func.Config.Types
21955
21956
21957
21958 for {
21959 t := v.Type
21960 x := v_0
21961 y := v_1
21962 if !(shiftIsBounded(v)) {
21963 break
21964 }
21965 v.reset(OpARM64SRL)
21966 v.Type = t
21967 v.AddArg2(x, y)
21968 return true
21969 }
21970
21971
21972
21973 for {
21974 t := v.Type
21975 x := v_0
21976 y := v_1
21977 if !(!shiftIsBounded(v)) {
21978 break
21979 }
21980 v.reset(OpARM64CSEL)
21981 v.AuxInt = opToAuxInt(OpARM64LessThanU)
21982 v0 := b.NewValue0(v.Pos, OpARM64SRL, t)
21983 v0.AddArg2(x, y)
21984 v1 := b.NewValue0(v.Pos, OpConst64, t)
21985 v1.AuxInt = int64ToAuxInt(0)
21986 v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
21987 v2.AuxInt = int64ToAuxInt(64)
21988 v3 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
21989 v3.AddArg(y)
21990 v2.AddArg(v3)
21991 v.AddArg3(v0, v1, v2)
21992 return true
21993 }
21994 return false
21995 }
21996 func rewriteValueARM64_OpRsh64Ux64(v *Value) bool {
21997 v_1 := v.Args[1]
21998 v_0 := v.Args[0]
21999 b := v.Block
22000
22001
22002
22003 for {
22004 t := v.Type
22005 x := v_0
22006 y := v_1
22007 if !(shiftIsBounded(v)) {
22008 break
22009 }
22010 v.reset(OpARM64SRL)
22011 v.Type = t
22012 v.AddArg2(x, y)
22013 return true
22014 }
22015
22016
22017
22018 for {
22019 t := v.Type
22020 x := v_0
22021 y := v_1
22022 if !(!shiftIsBounded(v)) {
22023 break
22024 }
22025 v.reset(OpARM64CSEL)
22026 v.AuxInt = opToAuxInt(OpARM64LessThanU)
22027 v0 := b.NewValue0(v.Pos, OpARM64SRL, t)
22028 v0.AddArg2(x, y)
22029 v1 := b.NewValue0(v.Pos, OpConst64, t)
22030 v1.AuxInt = int64ToAuxInt(0)
22031 v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
22032 v2.AuxInt = int64ToAuxInt(64)
22033 v2.AddArg(y)
22034 v.AddArg3(v0, v1, v2)
22035 return true
22036 }
22037 return false
22038 }
22039 func rewriteValueARM64_OpRsh64Ux8(v *Value) bool {
22040 v_1 := v.Args[1]
22041 v_0 := v.Args[0]
22042 b := v.Block
22043 typ := &b.Func.Config.Types
22044
22045
22046
22047 for {
22048 t := v.Type
22049 x := v_0
22050 y := v_1
22051 if !(shiftIsBounded(v)) {
22052 break
22053 }
22054 v.reset(OpARM64SRL)
22055 v.Type = t
22056 v.AddArg2(x, y)
22057 return true
22058 }
22059
22060
22061
22062 for {
22063 t := v.Type
22064 x := v_0
22065 y := v_1
22066 if !(!shiftIsBounded(v)) {
22067 break
22068 }
22069 v.reset(OpARM64CSEL)
22070 v.AuxInt = opToAuxInt(OpARM64LessThanU)
22071 v0 := b.NewValue0(v.Pos, OpARM64SRL, t)
22072 v0.AddArg2(x, y)
22073 v1 := b.NewValue0(v.Pos, OpConst64, t)
22074 v1.AuxInt = int64ToAuxInt(0)
22075 v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
22076 v2.AuxInt = int64ToAuxInt(64)
22077 v3 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
22078 v3.AddArg(y)
22079 v2.AddArg(v3)
22080 v.AddArg3(v0, v1, v2)
22081 return true
22082 }
22083 return false
22084 }
22085 func rewriteValueARM64_OpRsh64x16(v *Value) bool {
22086 v_1 := v.Args[1]
22087 v_0 := v.Args[0]
22088 b := v.Block
22089 typ := &b.Func.Config.Types
22090
22091
22092
22093 for {
22094 t := v.Type
22095 x := v_0
22096 y := v_1
22097 if !(shiftIsBounded(v)) {
22098 break
22099 }
22100 v.reset(OpARM64SRA)
22101 v.Type = t
22102 v.AddArg2(x, y)
22103 return true
22104 }
22105
22106
22107
22108 for {
22109 x := v_0
22110 y := v_1
22111 if !(!shiftIsBounded(v)) {
22112 break
22113 }
22114 v.reset(OpARM64SRA)
22115 v0 := b.NewValue0(v.Pos, OpARM64CSEL, y.Type)
22116 v0.AuxInt = opToAuxInt(OpARM64LessThanU)
22117 v1 := b.NewValue0(v.Pos, OpConst64, y.Type)
22118 v1.AuxInt = int64ToAuxInt(63)
22119 v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
22120 v2.AuxInt = int64ToAuxInt(64)
22121 v3 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
22122 v3.AddArg(y)
22123 v2.AddArg(v3)
22124 v0.AddArg3(y, v1, v2)
22125 v.AddArg2(x, v0)
22126 return true
22127 }
22128 return false
22129 }
22130 func rewriteValueARM64_OpRsh64x32(v *Value) bool {
22131 v_1 := v.Args[1]
22132 v_0 := v.Args[0]
22133 b := v.Block
22134 typ := &b.Func.Config.Types
22135
22136
22137
22138 for {
22139 t := v.Type
22140 x := v_0
22141 y := v_1
22142 if !(shiftIsBounded(v)) {
22143 break
22144 }
22145 v.reset(OpARM64SRA)
22146 v.Type = t
22147 v.AddArg2(x, y)
22148 return true
22149 }
22150
22151
22152
22153 for {
22154 x := v_0
22155 y := v_1
22156 if !(!shiftIsBounded(v)) {
22157 break
22158 }
22159 v.reset(OpARM64SRA)
22160 v0 := b.NewValue0(v.Pos, OpARM64CSEL, y.Type)
22161 v0.AuxInt = opToAuxInt(OpARM64LessThanU)
22162 v1 := b.NewValue0(v.Pos, OpConst64, y.Type)
22163 v1.AuxInt = int64ToAuxInt(63)
22164 v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
22165 v2.AuxInt = int64ToAuxInt(64)
22166 v3 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
22167 v3.AddArg(y)
22168 v2.AddArg(v3)
22169 v0.AddArg3(y, v1, v2)
22170 v.AddArg2(x, v0)
22171 return true
22172 }
22173 return false
22174 }
22175 func rewriteValueARM64_OpRsh64x64(v *Value) bool {
22176 v_1 := v.Args[1]
22177 v_0 := v.Args[0]
22178 b := v.Block
22179
22180
22181
22182 for {
22183 t := v.Type
22184 x := v_0
22185 y := v_1
22186 if !(shiftIsBounded(v)) {
22187 break
22188 }
22189 v.reset(OpARM64SRA)
22190 v.Type = t
22191 v.AddArg2(x, y)
22192 return true
22193 }
22194
22195
22196
22197 for {
22198 x := v_0
22199 y := v_1
22200 if !(!shiftIsBounded(v)) {
22201 break
22202 }
22203 v.reset(OpARM64SRA)
22204 v0 := b.NewValue0(v.Pos, OpARM64CSEL, y.Type)
22205 v0.AuxInt = opToAuxInt(OpARM64LessThanU)
22206 v1 := b.NewValue0(v.Pos, OpConst64, y.Type)
22207 v1.AuxInt = int64ToAuxInt(63)
22208 v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
22209 v2.AuxInt = int64ToAuxInt(64)
22210 v2.AddArg(y)
22211 v0.AddArg3(y, v1, v2)
22212 v.AddArg2(x, v0)
22213 return true
22214 }
22215 return false
22216 }
22217 func rewriteValueARM64_OpRsh64x8(v *Value) bool {
22218 v_1 := v.Args[1]
22219 v_0 := v.Args[0]
22220 b := v.Block
22221 typ := &b.Func.Config.Types
22222
22223
22224
22225 for {
22226 t := v.Type
22227 x := v_0
22228 y := v_1
22229 if !(shiftIsBounded(v)) {
22230 break
22231 }
22232 v.reset(OpARM64SRA)
22233 v.Type = t
22234 v.AddArg2(x, y)
22235 return true
22236 }
22237
22238
22239
22240 for {
22241 x := v_0
22242 y := v_1
22243 if !(!shiftIsBounded(v)) {
22244 break
22245 }
22246 v.reset(OpARM64SRA)
22247 v0 := b.NewValue0(v.Pos, OpARM64CSEL, y.Type)
22248 v0.AuxInt = opToAuxInt(OpARM64LessThanU)
22249 v1 := b.NewValue0(v.Pos, OpConst64, y.Type)
22250 v1.AuxInt = int64ToAuxInt(63)
22251 v2 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
22252 v2.AuxInt = int64ToAuxInt(64)
22253 v3 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
22254 v3.AddArg(y)
22255 v2.AddArg(v3)
22256 v0.AddArg3(y, v1, v2)
22257 v.AddArg2(x, v0)
22258 return true
22259 }
22260 return false
22261 }
22262 func rewriteValueARM64_OpRsh8Ux16(v *Value) bool {
22263 v_1 := v.Args[1]
22264 v_0 := v.Args[0]
22265 b := v.Block
22266 typ := &b.Func.Config.Types
22267
22268
22269
22270 for {
22271 t := v.Type
22272 x := v_0
22273 y := v_1
22274 if !(shiftIsBounded(v)) {
22275 break
22276 }
22277 v.reset(OpARM64SRL)
22278 v.Type = t
22279 v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
22280 v0.AddArg(x)
22281 v.AddArg2(v0, y)
22282 return true
22283 }
22284
22285
22286
22287 for {
22288 t := v.Type
22289 x := v_0
22290 y := v_1
22291 if !(!shiftIsBounded(v)) {
22292 break
22293 }
22294 v.reset(OpARM64CSEL)
22295 v.AuxInt = opToAuxInt(OpARM64LessThanU)
22296 v0 := b.NewValue0(v.Pos, OpARM64SRL, t)
22297 v1 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
22298 v1.AddArg(x)
22299 v0.AddArg2(v1, y)
22300 v2 := b.NewValue0(v.Pos, OpConst64, t)
22301 v2.AuxInt = int64ToAuxInt(0)
22302 v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
22303 v3.AuxInt = int64ToAuxInt(64)
22304 v4 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
22305 v4.AddArg(y)
22306 v3.AddArg(v4)
22307 v.AddArg3(v0, v2, v3)
22308 return true
22309 }
22310 return false
22311 }
22312 func rewriteValueARM64_OpRsh8Ux32(v *Value) bool {
22313 v_1 := v.Args[1]
22314 v_0 := v.Args[0]
22315 b := v.Block
22316 typ := &b.Func.Config.Types
22317
22318
22319
22320 for {
22321 t := v.Type
22322 x := v_0
22323 y := v_1
22324 if !(shiftIsBounded(v)) {
22325 break
22326 }
22327 v.reset(OpARM64SRL)
22328 v.Type = t
22329 v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
22330 v0.AddArg(x)
22331 v.AddArg2(v0, y)
22332 return true
22333 }
22334
22335
22336
22337 for {
22338 t := v.Type
22339 x := v_0
22340 y := v_1
22341 if !(!shiftIsBounded(v)) {
22342 break
22343 }
22344 v.reset(OpARM64CSEL)
22345 v.AuxInt = opToAuxInt(OpARM64LessThanU)
22346 v0 := b.NewValue0(v.Pos, OpARM64SRL, t)
22347 v1 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
22348 v1.AddArg(x)
22349 v0.AddArg2(v1, y)
22350 v2 := b.NewValue0(v.Pos, OpConst64, t)
22351 v2.AuxInt = int64ToAuxInt(0)
22352 v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
22353 v3.AuxInt = int64ToAuxInt(64)
22354 v4 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
22355 v4.AddArg(y)
22356 v3.AddArg(v4)
22357 v.AddArg3(v0, v2, v3)
22358 return true
22359 }
22360 return false
22361 }
22362 func rewriteValueARM64_OpRsh8Ux64(v *Value) bool {
22363 v_1 := v.Args[1]
22364 v_0 := v.Args[0]
22365 b := v.Block
22366 typ := &b.Func.Config.Types
22367
22368
22369
22370 for {
22371 t := v.Type
22372 x := v_0
22373 y := v_1
22374 if !(shiftIsBounded(v)) {
22375 break
22376 }
22377 v.reset(OpARM64SRL)
22378 v.Type = t
22379 v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
22380 v0.AddArg(x)
22381 v.AddArg2(v0, y)
22382 return true
22383 }
22384
22385
22386
22387 for {
22388 t := v.Type
22389 x := v_0
22390 y := v_1
22391 if !(!shiftIsBounded(v)) {
22392 break
22393 }
22394 v.reset(OpARM64CSEL)
22395 v.AuxInt = opToAuxInt(OpARM64LessThanU)
22396 v0 := b.NewValue0(v.Pos, OpARM64SRL, t)
22397 v1 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
22398 v1.AddArg(x)
22399 v0.AddArg2(v1, y)
22400 v2 := b.NewValue0(v.Pos, OpConst64, t)
22401 v2.AuxInt = int64ToAuxInt(0)
22402 v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
22403 v3.AuxInt = int64ToAuxInt(64)
22404 v3.AddArg(y)
22405 v.AddArg3(v0, v2, v3)
22406 return true
22407 }
22408 return false
22409 }
22410 func rewriteValueARM64_OpRsh8Ux8(v *Value) bool {
22411 v_1 := v.Args[1]
22412 v_0 := v.Args[0]
22413 b := v.Block
22414 typ := &b.Func.Config.Types
22415
22416
22417
22418 for {
22419 t := v.Type
22420 x := v_0
22421 y := v_1
22422 if !(shiftIsBounded(v)) {
22423 break
22424 }
22425 v.reset(OpARM64SRL)
22426 v.Type = t
22427 v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
22428 v0.AddArg(x)
22429 v.AddArg2(v0, y)
22430 return true
22431 }
22432
22433
22434
22435 for {
22436 t := v.Type
22437 x := v_0
22438 y := v_1
22439 if !(!shiftIsBounded(v)) {
22440 break
22441 }
22442 v.reset(OpARM64CSEL)
22443 v.AuxInt = opToAuxInt(OpARM64LessThanU)
22444 v0 := b.NewValue0(v.Pos, OpARM64SRL, t)
22445 v1 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
22446 v1.AddArg(x)
22447 v0.AddArg2(v1, y)
22448 v2 := b.NewValue0(v.Pos, OpConst64, t)
22449 v2.AuxInt = int64ToAuxInt(0)
22450 v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
22451 v3.AuxInt = int64ToAuxInt(64)
22452 v4 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
22453 v4.AddArg(y)
22454 v3.AddArg(v4)
22455 v.AddArg3(v0, v2, v3)
22456 return true
22457 }
22458 return false
22459 }
22460 func rewriteValueARM64_OpRsh8x16(v *Value) bool {
22461 v_1 := v.Args[1]
22462 v_0 := v.Args[0]
22463 b := v.Block
22464 typ := &b.Func.Config.Types
22465
22466
22467
22468 for {
22469 t := v.Type
22470 x := v_0
22471 y := v_1
22472 if !(shiftIsBounded(v)) {
22473 break
22474 }
22475 v.reset(OpARM64SRA)
22476 v.Type = t
22477 v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
22478 v0.AddArg(x)
22479 v.AddArg2(v0, y)
22480 return true
22481 }
22482
22483
22484
22485 for {
22486 x := v_0
22487 y := v_1
22488 if !(!shiftIsBounded(v)) {
22489 break
22490 }
22491 v.reset(OpARM64SRA)
22492 v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
22493 v0.AddArg(x)
22494 v1 := b.NewValue0(v.Pos, OpARM64CSEL, y.Type)
22495 v1.AuxInt = opToAuxInt(OpARM64LessThanU)
22496 v2 := b.NewValue0(v.Pos, OpConst64, y.Type)
22497 v2.AuxInt = int64ToAuxInt(63)
22498 v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
22499 v3.AuxInt = int64ToAuxInt(64)
22500 v4 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
22501 v4.AddArg(y)
22502 v3.AddArg(v4)
22503 v1.AddArg3(y, v2, v3)
22504 v.AddArg2(v0, v1)
22505 return true
22506 }
22507 return false
22508 }
22509 func rewriteValueARM64_OpRsh8x32(v *Value) bool {
22510 v_1 := v.Args[1]
22511 v_0 := v.Args[0]
22512 b := v.Block
22513 typ := &b.Func.Config.Types
22514
22515
22516
22517 for {
22518 t := v.Type
22519 x := v_0
22520 y := v_1
22521 if !(shiftIsBounded(v)) {
22522 break
22523 }
22524 v.reset(OpARM64SRA)
22525 v.Type = t
22526 v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
22527 v0.AddArg(x)
22528 v.AddArg2(v0, y)
22529 return true
22530 }
22531
22532
22533
22534 for {
22535 x := v_0
22536 y := v_1
22537 if !(!shiftIsBounded(v)) {
22538 break
22539 }
22540 v.reset(OpARM64SRA)
22541 v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
22542 v0.AddArg(x)
22543 v1 := b.NewValue0(v.Pos, OpARM64CSEL, y.Type)
22544 v1.AuxInt = opToAuxInt(OpARM64LessThanU)
22545 v2 := b.NewValue0(v.Pos, OpConst64, y.Type)
22546 v2.AuxInt = int64ToAuxInt(63)
22547 v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
22548 v3.AuxInt = int64ToAuxInt(64)
22549 v4 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
22550 v4.AddArg(y)
22551 v3.AddArg(v4)
22552 v1.AddArg3(y, v2, v3)
22553 v.AddArg2(v0, v1)
22554 return true
22555 }
22556 return false
22557 }
22558 func rewriteValueARM64_OpRsh8x64(v *Value) bool {
22559 v_1 := v.Args[1]
22560 v_0 := v.Args[0]
22561 b := v.Block
22562 typ := &b.Func.Config.Types
22563
22564
22565
22566 for {
22567 t := v.Type
22568 x := v_0
22569 y := v_1
22570 if !(shiftIsBounded(v)) {
22571 break
22572 }
22573 v.reset(OpARM64SRA)
22574 v.Type = t
22575 v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
22576 v0.AddArg(x)
22577 v.AddArg2(v0, y)
22578 return true
22579 }
22580
22581
22582
22583 for {
22584 x := v_0
22585 y := v_1
22586 if !(!shiftIsBounded(v)) {
22587 break
22588 }
22589 v.reset(OpARM64SRA)
22590 v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
22591 v0.AddArg(x)
22592 v1 := b.NewValue0(v.Pos, OpARM64CSEL, y.Type)
22593 v1.AuxInt = opToAuxInt(OpARM64LessThanU)
22594 v2 := b.NewValue0(v.Pos, OpConst64, y.Type)
22595 v2.AuxInt = int64ToAuxInt(63)
22596 v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
22597 v3.AuxInt = int64ToAuxInt(64)
22598 v3.AddArg(y)
22599 v1.AddArg3(y, v2, v3)
22600 v.AddArg2(v0, v1)
22601 return true
22602 }
22603 return false
22604 }
22605 func rewriteValueARM64_OpRsh8x8(v *Value) bool {
22606 v_1 := v.Args[1]
22607 v_0 := v.Args[0]
22608 b := v.Block
22609 typ := &b.Func.Config.Types
22610
22611
22612
22613 for {
22614 t := v.Type
22615 x := v_0
22616 y := v_1
22617 if !(shiftIsBounded(v)) {
22618 break
22619 }
22620 v.reset(OpARM64SRA)
22621 v.Type = t
22622 v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
22623 v0.AddArg(x)
22624 v.AddArg2(v0, y)
22625 return true
22626 }
22627
22628
22629
22630 for {
22631 x := v_0
22632 y := v_1
22633 if !(!shiftIsBounded(v)) {
22634 break
22635 }
22636 v.reset(OpARM64SRA)
22637 v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
22638 v0.AddArg(x)
22639 v1 := b.NewValue0(v.Pos, OpARM64CSEL, y.Type)
22640 v1.AuxInt = opToAuxInt(OpARM64LessThanU)
22641 v2 := b.NewValue0(v.Pos, OpConst64, y.Type)
22642 v2.AuxInt = int64ToAuxInt(63)
22643 v3 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
22644 v3.AuxInt = int64ToAuxInt(64)
22645 v4 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
22646 v4.AddArg(y)
22647 v3.AddArg(v4)
22648 v1.AddArg3(y, v2, v3)
22649 v.AddArg2(v0, v1)
22650 return true
22651 }
22652 return false
22653 }
22654 func rewriteValueARM64_OpSelect0(v *Value) bool {
22655 v_0 := v.Args[0]
22656 b := v.Block
22657 typ := &b.Func.Config.Types
22658
22659
22660 for {
22661 if v_0.Op != OpMul64uhilo {
22662 break
22663 }
22664 y := v_0.Args[1]
22665 x := v_0.Args[0]
22666 v.reset(OpARM64UMULH)
22667 v.AddArg2(x, y)
22668 return true
22669 }
22670
22671
22672 for {
22673 if v_0.Op != OpAdd64carry {
22674 break
22675 }
22676 c := v_0.Args[2]
22677 x := v_0.Args[0]
22678 y := v_0.Args[1]
22679 v.reset(OpSelect0)
22680 v.Type = typ.UInt64
22681 v0 := b.NewValue0(v.Pos, OpARM64ADCSflags, types.NewTuple(typ.UInt64, types.TypeFlags))
22682 v1 := b.NewValue0(v.Pos, OpSelect1, types.TypeFlags)
22683 v2 := b.NewValue0(v.Pos, OpARM64ADDSconstflags, types.NewTuple(typ.UInt64, types.TypeFlags))
22684 v2.AuxInt = int64ToAuxInt(-1)
22685 v2.AddArg(c)
22686 v1.AddArg(v2)
22687 v0.AddArg3(x, y, v1)
22688 v.AddArg(v0)
22689 return true
22690 }
22691
22692
22693 for {
22694 if v_0.Op != OpSub64borrow {
22695 break
22696 }
22697 bo := v_0.Args[2]
22698 x := v_0.Args[0]
22699 y := v_0.Args[1]
22700 v.reset(OpSelect0)
22701 v.Type = typ.UInt64
22702 v0 := b.NewValue0(v.Pos, OpARM64SBCSflags, types.NewTuple(typ.UInt64, types.TypeFlags))
22703 v1 := b.NewValue0(v.Pos, OpSelect1, types.TypeFlags)
22704 v2 := b.NewValue0(v.Pos, OpARM64NEGSflags, types.NewTuple(typ.UInt64, types.TypeFlags))
22705 v2.AddArg(bo)
22706 v1.AddArg(v2)
22707 v0.AddArg3(x, y, v1)
22708 v.AddArg(v0)
22709 return true
22710 }
22711
22712
22713 for {
22714 if v_0.Op != OpMul64uover {
22715 break
22716 }
22717 y := v_0.Args[1]
22718 x := v_0.Args[0]
22719 v.reset(OpARM64MUL)
22720 v.AddArg2(x, y)
22721 return true
22722 }
22723 return false
22724 }
22725 func rewriteValueARM64_OpSelect1(v *Value) bool {
22726 v_0 := v.Args[0]
22727 b := v.Block
22728 typ := &b.Func.Config.Types
22729
22730
22731 for {
22732 if v_0.Op != OpMul64uhilo {
22733 break
22734 }
22735 y := v_0.Args[1]
22736 x := v_0.Args[0]
22737 v.reset(OpARM64MUL)
22738 v.AddArg2(x, y)
22739 return true
22740 }
22741
22742
22743 for {
22744 if v_0.Op != OpAdd64carry {
22745 break
22746 }
22747 c := v_0.Args[2]
22748 x := v_0.Args[0]
22749 y := v_0.Args[1]
22750 v.reset(OpARM64ADCzerocarry)
22751 v.Type = typ.UInt64
22752 v0 := b.NewValue0(v.Pos, OpSelect1, types.TypeFlags)
22753 v1 := b.NewValue0(v.Pos, OpARM64ADCSflags, types.NewTuple(typ.UInt64, types.TypeFlags))
22754 v2 := b.NewValue0(v.Pos, OpSelect1, types.TypeFlags)
22755 v3 := b.NewValue0(v.Pos, OpARM64ADDSconstflags, types.NewTuple(typ.UInt64, types.TypeFlags))
22756 v3.AuxInt = int64ToAuxInt(-1)
22757 v3.AddArg(c)
22758 v2.AddArg(v3)
22759 v1.AddArg3(x, y, v2)
22760 v0.AddArg(v1)
22761 v.AddArg(v0)
22762 return true
22763 }
22764
22765
22766 for {
22767 if v_0.Op != OpSub64borrow {
22768 break
22769 }
22770 bo := v_0.Args[2]
22771 x := v_0.Args[0]
22772 y := v_0.Args[1]
22773 v.reset(OpARM64NEG)
22774 v.Type = typ.UInt64
22775 v0 := b.NewValue0(v.Pos, OpARM64NGCzerocarry, typ.UInt64)
22776 v1 := b.NewValue0(v.Pos, OpSelect1, types.TypeFlags)
22777 v2 := b.NewValue0(v.Pos, OpARM64SBCSflags, types.NewTuple(typ.UInt64, types.TypeFlags))
22778 v3 := b.NewValue0(v.Pos, OpSelect1, types.TypeFlags)
22779 v4 := b.NewValue0(v.Pos, OpARM64NEGSflags, types.NewTuple(typ.UInt64, types.TypeFlags))
22780 v4.AddArg(bo)
22781 v3.AddArg(v4)
22782 v2.AddArg3(x, y, v3)
22783 v1.AddArg(v2)
22784 v0.AddArg(v1)
22785 v.AddArg(v0)
22786 return true
22787 }
22788
22789
22790 for {
22791 if v_0.Op != OpMul64uover {
22792 break
22793 }
22794 y := v_0.Args[1]
22795 x := v_0.Args[0]
22796 v.reset(OpARM64NotEqual)
22797 v0 := b.NewValue0(v.Pos, OpARM64CMPconst, types.TypeFlags)
22798 v0.AuxInt = int64ToAuxInt(0)
22799 v1 := b.NewValue0(v.Pos, OpARM64UMULH, typ.UInt64)
22800 v1.AddArg2(x, y)
22801 v0.AddArg(v1)
22802 v.AddArg(v0)
22803 return true
22804 }
22805 return false
22806 }
22807 func rewriteValueARM64_OpSelectN(v *Value) bool {
22808 v_0 := v.Args[0]
22809 b := v.Block
22810 config := b.Func.Config
22811
22812
22813
22814 for {
22815 if auxIntToInt64(v.AuxInt) != 0 {
22816 break
22817 }
22818 call := v_0
22819 if call.Op != OpARM64CALLstatic || len(call.Args) != 1 {
22820 break
22821 }
22822 sym := auxToCall(call.Aux)
22823 s1 := call.Args[0]
22824 if s1.Op != OpARM64MOVDstore {
22825 break
22826 }
22827 _ = s1.Args[2]
22828 s1_1 := s1.Args[1]
22829 if s1_1.Op != OpARM64MOVDconst {
22830 break
22831 }
22832 sz := auxIntToInt64(s1_1.AuxInt)
22833 s2 := s1.Args[2]
22834 if s2.Op != OpARM64MOVDstore {
22835 break
22836 }
22837 _ = s2.Args[2]
22838 src := s2.Args[1]
22839 s3 := s2.Args[2]
22840 if s3.Op != OpARM64MOVDstore {
22841 break
22842 }
22843 mem := s3.Args[2]
22844 dst := s3.Args[1]
22845 if !(sz >= 0 && isSameCall(sym, "runtime.memmove") && s1.Uses == 1 && s2.Uses == 1 && s3.Uses == 1 && isInlinableMemmove(dst, src, sz, config) && clobber(s1, s2, s3, call)) {
22846 break
22847 }
22848 v.reset(OpMove)
22849 v.AuxInt = int64ToAuxInt(sz)
22850 v.AddArg3(dst, src, mem)
22851 return true
22852 }
22853
22854
22855
22856 for {
22857 if auxIntToInt64(v.AuxInt) != 0 {
22858 break
22859 }
22860 call := v_0
22861 if call.Op != OpARM64CALLstatic || len(call.Args) != 4 {
22862 break
22863 }
22864 sym := auxToCall(call.Aux)
22865 mem := call.Args[3]
22866 dst := call.Args[0]
22867 src := call.Args[1]
22868 call_2 := call.Args[2]
22869 if call_2.Op != OpARM64MOVDconst {
22870 break
22871 }
22872 sz := auxIntToInt64(call_2.AuxInt)
22873 if !(sz >= 0 && isSameCall(sym, "runtime.memmove") && call.Uses == 1 && isInlinableMemmove(dst, src, sz, config) && clobber(call)) {
22874 break
22875 }
22876 v.reset(OpMove)
22877 v.AuxInt = int64ToAuxInt(sz)
22878 v.AddArg3(dst, src, mem)
22879 return true
22880 }
22881 return false
22882 }
22883 func rewriteValueARM64_OpSlicemask(v *Value) bool {
22884 v_0 := v.Args[0]
22885 b := v.Block
22886
22887
22888 for {
22889 t := v.Type
22890 x := v_0
22891 v.reset(OpARM64SRAconst)
22892 v.AuxInt = int64ToAuxInt(63)
22893 v0 := b.NewValue0(v.Pos, OpARM64NEG, t)
22894 v0.AddArg(x)
22895 v.AddArg(v0)
22896 return true
22897 }
22898 }
22899 func rewriteValueARM64_OpStore(v *Value) bool {
22900 v_2 := v.Args[2]
22901 v_1 := v.Args[1]
22902 v_0 := v.Args[0]
22903
22904
22905
22906 for {
22907 t := auxToType(v.Aux)
22908 ptr := v_0
22909 val := v_1
22910 mem := v_2
22911 if !(t.Size() == 1) {
22912 break
22913 }
22914 v.reset(OpARM64MOVBstore)
22915 v.AddArg3(ptr, val, mem)
22916 return true
22917 }
22918
22919
22920
22921 for {
22922 t := auxToType(v.Aux)
22923 ptr := v_0
22924 val := v_1
22925 mem := v_2
22926 if !(t.Size() == 2) {
22927 break
22928 }
22929 v.reset(OpARM64MOVHstore)
22930 v.AddArg3(ptr, val, mem)
22931 return true
22932 }
22933
22934
22935
22936 for {
22937 t := auxToType(v.Aux)
22938 ptr := v_0
22939 val := v_1
22940 mem := v_2
22941 if !(t.Size() == 4 && !t.IsFloat()) {
22942 break
22943 }
22944 v.reset(OpARM64MOVWstore)
22945 v.AddArg3(ptr, val, mem)
22946 return true
22947 }
22948
22949
22950
22951 for {
22952 t := auxToType(v.Aux)
22953 ptr := v_0
22954 val := v_1
22955 mem := v_2
22956 if !(t.Size() == 8 && !t.IsFloat()) {
22957 break
22958 }
22959 v.reset(OpARM64MOVDstore)
22960 v.AddArg3(ptr, val, mem)
22961 return true
22962 }
22963
22964
22965
22966 for {
22967 t := auxToType(v.Aux)
22968 ptr := v_0
22969 val := v_1
22970 mem := v_2
22971 if !(t.Size() == 4 && t.IsFloat()) {
22972 break
22973 }
22974 v.reset(OpARM64FMOVSstore)
22975 v.AddArg3(ptr, val, mem)
22976 return true
22977 }
22978
22979
22980
22981 for {
22982 t := auxToType(v.Aux)
22983 ptr := v_0
22984 val := v_1
22985 mem := v_2
22986 if !(t.Size() == 8 && t.IsFloat()) {
22987 break
22988 }
22989 v.reset(OpARM64FMOVDstore)
22990 v.AddArg3(ptr, val, mem)
22991 return true
22992 }
22993 return false
22994 }
22995 func rewriteValueARM64_OpZero(v *Value) bool {
22996 v_1 := v.Args[1]
22997 v_0 := v.Args[0]
22998 b := v.Block
22999 config := b.Func.Config
23000 typ := &b.Func.Config.Types
23001
23002
23003 for {
23004 if auxIntToInt64(v.AuxInt) != 0 {
23005 break
23006 }
23007 mem := v_1
23008 v.copyOf(mem)
23009 return true
23010 }
23011
23012
23013 for {
23014 if auxIntToInt64(v.AuxInt) != 1 {
23015 break
23016 }
23017 ptr := v_0
23018 mem := v_1
23019 v.reset(OpARM64MOVBstore)
23020 v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
23021 v0.AuxInt = int64ToAuxInt(0)
23022 v.AddArg3(ptr, v0, mem)
23023 return true
23024 }
23025
23026
23027 for {
23028 if auxIntToInt64(v.AuxInt) != 2 {
23029 break
23030 }
23031 ptr := v_0
23032 mem := v_1
23033 v.reset(OpARM64MOVHstore)
23034 v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
23035 v0.AuxInt = int64ToAuxInt(0)
23036 v.AddArg3(ptr, v0, mem)
23037 return true
23038 }
23039
23040
23041 for {
23042 if auxIntToInt64(v.AuxInt) != 4 {
23043 break
23044 }
23045 ptr := v_0
23046 mem := v_1
23047 v.reset(OpARM64MOVWstore)
23048 v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
23049 v0.AuxInt = int64ToAuxInt(0)
23050 v.AddArg3(ptr, v0, mem)
23051 return true
23052 }
23053
23054
23055 for {
23056 if auxIntToInt64(v.AuxInt) != 3 {
23057 break
23058 }
23059 ptr := v_0
23060 mem := v_1
23061 v.reset(OpARM64MOVBstore)
23062 v.AuxInt = int32ToAuxInt(2)
23063 v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
23064 v0.AuxInt = int64ToAuxInt(0)
23065 v1 := b.NewValue0(v.Pos, OpARM64MOVHstore, types.TypeMem)
23066 v1.AddArg3(ptr, v0, mem)
23067 v.AddArg3(ptr, v0, v1)
23068 return true
23069 }
23070
23071
23072 for {
23073 if auxIntToInt64(v.AuxInt) != 5 {
23074 break
23075 }
23076 ptr := v_0
23077 mem := v_1
23078 v.reset(OpARM64MOVBstore)
23079 v.AuxInt = int32ToAuxInt(4)
23080 v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
23081 v0.AuxInt = int64ToAuxInt(0)
23082 v1 := b.NewValue0(v.Pos, OpARM64MOVWstore, types.TypeMem)
23083 v1.AddArg3(ptr, v0, mem)
23084 v.AddArg3(ptr, v0, v1)
23085 return true
23086 }
23087
23088
23089 for {
23090 if auxIntToInt64(v.AuxInt) != 6 {
23091 break
23092 }
23093 ptr := v_0
23094 mem := v_1
23095 v.reset(OpARM64MOVHstore)
23096 v.AuxInt = int32ToAuxInt(4)
23097 v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
23098 v0.AuxInt = int64ToAuxInt(0)
23099 v1 := b.NewValue0(v.Pos, OpARM64MOVWstore, types.TypeMem)
23100 v1.AddArg3(ptr, v0, mem)
23101 v.AddArg3(ptr, v0, v1)
23102 return true
23103 }
23104
23105
23106 for {
23107 if auxIntToInt64(v.AuxInt) != 7 {
23108 break
23109 }
23110 ptr := v_0
23111 mem := v_1
23112 v.reset(OpARM64MOVWstore)
23113 v.AuxInt = int32ToAuxInt(3)
23114 v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
23115 v0.AuxInt = int64ToAuxInt(0)
23116 v1 := b.NewValue0(v.Pos, OpARM64MOVWstore, types.TypeMem)
23117 v1.AddArg3(ptr, v0, mem)
23118 v.AddArg3(ptr, v0, v1)
23119 return true
23120 }
23121
23122
23123 for {
23124 if auxIntToInt64(v.AuxInt) != 8 {
23125 break
23126 }
23127 ptr := v_0
23128 mem := v_1
23129 v.reset(OpARM64MOVDstore)
23130 v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
23131 v0.AuxInt = int64ToAuxInt(0)
23132 v.AddArg3(ptr, v0, mem)
23133 return true
23134 }
23135
23136
23137 for {
23138 if auxIntToInt64(v.AuxInt) != 9 {
23139 break
23140 }
23141 ptr := v_0
23142 mem := v_1
23143 v.reset(OpARM64MOVBstore)
23144 v.AuxInt = int32ToAuxInt(8)
23145 v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
23146 v0.AuxInt = int64ToAuxInt(0)
23147 v1 := b.NewValue0(v.Pos, OpARM64MOVDstore, types.TypeMem)
23148 v1.AddArg3(ptr, v0, mem)
23149 v.AddArg3(ptr, v0, v1)
23150 return true
23151 }
23152
23153
23154 for {
23155 if auxIntToInt64(v.AuxInt) != 10 {
23156 break
23157 }
23158 ptr := v_0
23159 mem := v_1
23160 v.reset(OpARM64MOVHstore)
23161 v.AuxInt = int32ToAuxInt(8)
23162 v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
23163 v0.AuxInt = int64ToAuxInt(0)
23164 v1 := b.NewValue0(v.Pos, OpARM64MOVDstore, types.TypeMem)
23165 v1.AddArg3(ptr, v0, mem)
23166 v.AddArg3(ptr, v0, v1)
23167 return true
23168 }
23169
23170
23171 for {
23172 if auxIntToInt64(v.AuxInt) != 11 {
23173 break
23174 }
23175 ptr := v_0
23176 mem := v_1
23177 v.reset(OpARM64MOVDstore)
23178 v.AuxInt = int32ToAuxInt(3)
23179 v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
23180 v0.AuxInt = int64ToAuxInt(0)
23181 v1 := b.NewValue0(v.Pos, OpARM64MOVDstore, types.TypeMem)
23182 v1.AddArg3(ptr, v0, mem)
23183 v.AddArg3(ptr, v0, v1)
23184 return true
23185 }
23186
23187
23188 for {
23189 if auxIntToInt64(v.AuxInt) != 12 {
23190 break
23191 }
23192 ptr := v_0
23193 mem := v_1
23194 v.reset(OpARM64MOVWstore)
23195 v.AuxInt = int32ToAuxInt(8)
23196 v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
23197 v0.AuxInt = int64ToAuxInt(0)
23198 v1 := b.NewValue0(v.Pos, OpARM64MOVDstore, types.TypeMem)
23199 v1.AddArg3(ptr, v0, mem)
23200 v.AddArg3(ptr, v0, v1)
23201 return true
23202 }
23203
23204
23205 for {
23206 if auxIntToInt64(v.AuxInt) != 13 {
23207 break
23208 }
23209 ptr := v_0
23210 mem := v_1
23211 v.reset(OpARM64MOVDstore)
23212 v.AuxInt = int32ToAuxInt(5)
23213 v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
23214 v0.AuxInt = int64ToAuxInt(0)
23215 v1 := b.NewValue0(v.Pos, OpARM64MOVDstore, types.TypeMem)
23216 v1.AddArg3(ptr, v0, mem)
23217 v.AddArg3(ptr, v0, v1)
23218 return true
23219 }
23220
23221
23222 for {
23223 if auxIntToInt64(v.AuxInt) != 14 {
23224 break
23225 }
23226 ptr := v_0
23227 mem := v_1
23228 v.reset(OpARM64MOVDstore)
23229 v.AuxInt = int32ToAuxInt(6)
23230 v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
23231 v0.AuxInt = int64ToAuxInt(0)
23232 v1 := b.NewValue0(v.Pos, OpARM64MOVDstore, types.TypeMem)
23233 v1.AddArg3(ptr, v0, mem)
23234 v.AddArg3(ptr, v0, v1)
23235 return true
23236 }
23237
23238
23239 for {
23240 if auxIntToInt64(v.AuxInt) != 15 {
23241 break
23242 }
23243 ptr := v_0
23244 mem := v_1
23245 v.reset(OpARM64MOVDstore)
23246 v.AuxInt = int32ToAuxInt(7)
23247 v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
23248 v0.AuxInt = int64ToAuxInt(0)
23249 v1 := b.NewValue0(v.Pos, OpARM64MOVDstore, types.TypeMem)
23250 v1.AddArg3(ptr, v0, mem)
23251 v.AddArg3(ptr, v0, v1)
23252 return true
23253 }
23254
23255
23256 for {
23257 if auxIntToInt64(v.AuxInt) != 16 {
23258 break
23259 }
23260 ptr := v_0
23261 mem := v_1
23262 v.reset(OpARM64STP)
23263 v.AuxInt = int32ToAuxInt(0)
23264 v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
23265 v0.AuxInt = int64ToAuxInt(0)
23266 v.AddArg4(ptr, v0, v0, mem)
23267 return true
23268 }
23269
23270
23271 for {
23272 if auxIntToInt64(v.AuxInt) != 32 {
23273 break
23274 }
23275 ptr := v_0
23276 mem := v_1
23277 v.reset(OpARM64STP)
23278 v.AuxInt = int32ToAuxInt(16)
23279 v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
23280 v0.AuxInt = int64ToAuxInt(0)
23281 v1 := b.NewValue0(v.Pos, OpARM64STP, types.TypeMem)
23282 v1.AuxInt = int32ToAuxInt(0)
23283 v1.AddArg4(ptr, v0, v0, mem)
23284 v.AddArg4(ptr, v0, v0, v1)
23285 return true
23286 }
23287
23288
23289 for {
23290 if auxIntToInt64(v.AuxInt) != 48 {
23291 break
23292 }
23293 ptr := v_0
23294 mem := v_1
23295 v.reset(OpARM64STP)
23296 v.AuxInt = int32ToAuxInt(32)
23297 v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
23298 v0.AuxInt = int64ToAuxInt(0)
23299 v1 := b.NewValue0(v.Pos, OpARM64STP, types.TypeMem)
23300 v1.AuxInt = int32ToAuxInt(16)
23301 v2 := b.NewValue0(v.Pos, OpARM64STP, types.TypeMem)
23302 v2.AuxInt = int32ToAuxInt(0)
23303 v2.AddArg4(ptr, v0, v0, mem)
23304 v1.AddArg4(ptr, v0, v0, v2)
23305 v.AddArg4(ptr, v0, v0, v1)
23306 return true
23307 }
23308
23309
23310 for {
23311 if auxIntToInt64(v.AuxInt) != 64 {
23312 break
23313 }
23314 ptr := v_0
23315 mem := v_1
23316 v.reset(OpARM64STP)
23317 v.AuxInt = int32ToAuxInt(48)
23318 v0 := b.NewValue0(v.Pos, OpARM64MOVDconst, typ.UInt64)
23319 v0.AuxInt = int64ToAuxInt(0)
23320 v1 := b.NewValue0(v.Pos, OpARM64STP, types.TypeMem)
23321 v1.AuxInt = int32ToAuxInt(32)
23322 v2 := b.NewValue0(v.Pos, OpARM64STP, types.TypeMem)
23323 v2.AuxInt = int32ToAuxInt(16)
23324 v3 := b.NewValue0(v.Pos, OpARM64STP, types.TypeMem)
23325 v3.AuxInt = int32ToAuxInt(0)
23326 v3.AddArg4(ptr, v0, v0, mem)
23327 v2.AddArg4(ptr, v0, v0, v3)
23328 v1.AddArg4(ptr, v0, v0, v2)
23329 v.AddArg4(ptr, v0, v0, v1)
23330 return true
23331 }
23332
23333
23334
23335 for {
23336 s := auxIntToInt64(v.AuxInt)
23337 ptr := v_0
23338 mem := v_1
23339 if !(s%16 != 0 && s%16 <= 8 && s > 16) {
23340 break
23341 }
23342 v.reset(OpZero)
23343 v.AuxInt = int64ToAuxInt(8)
23344 v0 := b.NewValue0(v.Pos, OpOffPtr, ptr.Type)
23345 v0.AuxInt = int64ToAuxInt(s - 8)
23346 v0.AddArg(ptr)
23347 v1 := b.NewValue0(v.Pos, OpZero, types.TypeMem)
23348 v1.AuxInt = int64ToAuxInt(s - s%16)
23349 v1.AddArg2(ptr, mem)
23350 v.AddArg2(v0, v1)
23351 return true
23352 }
23353
23354
23355
23356 for {
23357 s := auxIntToInt64(v.AuxInt)
23358 ptr := v_0
23359 mem := v_1
23360 if !(s%16 != 0 && s%16 > 8 && s > 16) {
23361 break
23362 }
23363 v.reset(OpZero)
23364 v.AuxInt = int64ToAuxInt(16)
23365 v0 := b.NewValue0(v.Pos, OpOffPtr, ptr.Type)
23366 v0.AuxInt = int64ToAuxInt(s - 16)
23367 v0.AddArg(ptr)
23368 v1 := b.NewValue0(v.Pos, OpZero, types.TypeMem)
23369 v1.AuxInt = int64ToAuxInt(s - s%16)
23370 v1.AddArg2(ptr, mem)
23371 v.AddArg2(v0, v1)
23372 return true
23373 }
23374
23375
23376
23377 for {
23378 s := auxIntToInt64(v.AuxInt)
23379 ptr := v_0
23380 mem := v_1
23381 if !(s%16 == 0 && s > 64 && s <= 16*64 && !config.noDuffDevice) {
23382 break
23383 }
23384 v.reset(OpARM64DUFFZERO)
23385 v.AuxInt = int64ToAuxInt(4 * (64 - s/16))
23386 v.AddArg2(ptr, mem)
23387 return true
23388 }
23389
23390
23391
23392 for {
23393 s := auxIntToInt64(v.AuxInt)
23394 ptr := v_0
23395 mem := v_1
23396 if !(s%16 == 0 && (s > 16*64 || config.noDuffDevice)) {
23397 break
23398 }
23399 v.reset(OpARM64LoweredZero)
23400 v0 := b.NewValue0(v.Pos, OpARM64ADDconst, ptr.Type)
23401 v0.AuxInt = int64ToAuxInt(s - 16)
23402 v0.AddArg(ptr)
23403 v.AddArg3(ptr, v0, mem)
23404 return true
23405 }
23406 return false
23407 }
23408 func rewriteBlockARM64(b *Block) bool {
23409 typ := &b.Func.Config.Types
23410 switch b.Kind {
23411 case BlockARM64EQ:
23412
23413
23414
23415 for b.Controls[0].Op == OpARM64CMPconst {
23416 v_0 := b.Controls[0]
23417 if auxIntToInt64(v_0.AuxInt) != 0 {
23418 break
23419 }
23420 z := v_0.Args[0]
23421 if z.Op != OpARM64AND {
23422 break
23423 }
23424 _ = z.Args[1]
23425 z_0 := z.Args[0]
23426 z_1 := z.Args[1]
23427 for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
23428 x := z_0
23429 y := z_1
23430 if !(z.Uses == 1) {
23431 continue
23432 }
23433 v0 := b.NewValue0(v_0.Pos, OpARM64TST, types.TypeFlags)
23434 v0.AddArg2(x, y)
23435 b.resetWithControl(BlockARM64EQ, v0)
23436 return true
23437 }
23438 break
23439 }
23440
23441
23442
23443 for b.Controls[0].Op == OpARM64CMPconst {
23444 v_0 := b.Controls[0]
23445 if auxIntToInt64(v_0.AuxInt) != 0 {
23446 break
23447 }
23448 x := v_0.Args[0]
23449 if x.Op != OpARM64ANDconst {
23450 break
23451 }
23452 c := auxIntToInt64(x.AuxInt)
23453 y := x.Args[0]
23454 if !(x.Uses == 1) {
23455 break
23456 }
23457 v0 := b.NewValue0(v_0.Pos, OpARM64TSTconst, types.TypeFlags)
23458 v0.AuxInt = int64ToAuxInt(c)
23459 v0.AddArg(y)
23460 b.resetWithControl(BlockARM64EQ, v0)
23461 return true
23462 }
23463
23464
23465
23466 for b.Controls[0].Op == OpARM64CMPWconst {
23467 v_0 := b.Controls[0]
23468 if auxIntToInt32(v_0.AuxInt) != 0 {
23469 break
23470 }
23471 z := v_0.Args[0]
23472 if z.Op != OpARM64AND {
23473 break
23474 }
23475 _ = z.Args[1]
23476 z_0 := z.Args[0]
23477 z_1 := z.Args[1]
23478 for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
23479 x := z_0
23480 y := z_1
23481 if !(z.Uses == 1) {
23482 continue
23483 }
23484 v0 := b.NewValue0(v_0.Pos, OpARM64TSTW, types.TypeFlags)
23485 v0.AddArg2(x, y)
23486 b.resetWithControl(BlockARM64EQ, v0)
23487 return true
23488 }
23489 break
23490 }
23491
23492
23493
23494 for b.Controls[0].Op == OpARM64CMPWconst {
23495 v_0 := b.Controls[0]
23496 if auxIntToInt32(v_0.AuxInt) != 0 {
23497 break
23498 }
23499 x := v_0.Args[0]
23500 if x.Op != OpARM64ANDconst {
23501 break
23502 }
23503 c := auxIntToInt64(x.AuxInt)
23504 y := x.Args[0]
23505 if !(x.Uses == 1) {
23506 break
23507 }
23508 v0 := b.NewValue0(v_0.Pos, OpARM64TSTWconst, types.TypeFlags)
23509 v0.AuxInt = int32ToAuxInt(int32(c))
23510 v0.AddArg(y)
23511 b.resetWithControl(BlockARM64EQ, v0)
23512 return true
23513 }
23514
23515
23516
23517 for b.Controls[0].Op == OpARM64CMPconst {
23518 v_0 := b.Controls[0]
23519 if auxIntToInt64(v_0.AuxInt) != 0 {
23520 break
23521 }
23522 x := v_0.Args[0]
23523 if x.Op != OpARM64ADDconst {
23524 break
23525 }
23526 c := auxIntToInt64(x.AuxInt)
23527 y := x.Args[0]
23528 if !(x.Uses == 1) {
23529 break
23530 }
23531 v0 := b.NewValue0(v_0.Pos, OpARM64CMNconst, types.TypeFlags)
23532 v0.AuxInt = int64ToAuxInt(c)
23533 v0.AddArg(y)
23534 b.resetWithControl(BlockARM64EQ, v0)
23535 return true
23536 }
23537
23538
23539
23540 for b.Controls[0].Op == OpARM64CMPWconst {
23541 v_0 := b.Controls[0]
23542 if auxIntToInt32(v_0.AuxInt) != 0 {
23543 break
23544 }
23545 x := v_0.Args[0]
23546 if x.Op != OpARM64ADDconst {
23547 break
23548 }
23549 c := auxIntToInt64(x.AuxInt)
23550 y := x.Args[0]
23551 if !(x.Uses == 1) {
23552 break
23553 }
23554 v0 := b.NewValue0(v_0.Pos, OpARM64CMNWconst, types.TypeFlags)
23555 v0.AuxInt = int32ToAuxInt(int32(c))
23556 v0.AddArg(y)
23557 b.resetWithControl(BlockARM64EQ, v0)
23558 return true
23559 }
23560
23561
23562
23563 for b.Controls[0].Op == OpARM64CMPconst {
23564 v_0 := b.Controls[0]
23565 if auxIntToInt64(v_0.AuxInt) != 0 {
23566 break
23567 }
23568 z := v_0.Args[0]
23569 if z.Op != OpARM64ADD {
23570 break
23571 }
23572 _ = z.Args[1]
23573 z_0 := z.Args[0]
23574 z_1 := z.Args[1]
23575 for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
23576 x := z_0
23577 y := z_1
23578 if !(z.Uses == 1) {
23579 continue
23580 }
23581 v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
23582 v0.AddArg2(x, y)
23583 b.resetWithControl(BlockARM64EQ, v0)
23584 return true
23585 }
23586 break
23587 }
23588
23589
23590
23591 for b.Controls[0].Op == OpARM64CMPWconst {
23592 v_0 := b.Controls[0]
23593 if auxIntToInt32(v_0.AuxInt) != 0 {
23594 break
23595 }
23596 z := v_0.Args[0]
23597 if z.Op != OpARM64ADD {
23598 break
23599 }
23600 _ = z.Args[1]
23601 z_0 := z.Args[0]
23602 z_1 := z.Args[1]
23603 for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
23604 x := z_0
23605 y := z_1
23606 if !(z.Uses == 1) {
23607 continue
23608 }
23609 v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
23610 v0.AddArg2(x, y)
23611 b.resetWithControl(BlockARM64EQ, v0)
23612 return true
23613 }
23614 break
23615 }
23616
23617
23618
23619 for b.Controls[0].Op == OpARM64CMP {
23620 v_0 := b.Controls[0]
23621 _ = v_0.Args[1]
23622 x := v_0.Args[0]
23623 z := v_0.Args[1]
23624 if z.Op != OpARM64NEG {
23625 break
23626 }
23627 y := z.Args[0]
23628 if !(z.Uses == 1) {
23629 break
23630 }
23631 v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
23632 v0.AddArg2(x, y)
23633 b.resetWithControl(BlockARM64EQ, v0)
23634 return true
23635 }
23636
23637
23638
23639 for b.Controls[0].Op == OpARM64CMPW {
23640 v_0 := b.Controls[0]
23641 _ = v_0.Args[1]
23642 x := v_0.Args[0]
23643 z := v_0.Args[1]
23644 if z.Op != OpARM64NEG {
23645 break
23646 }
23647 y := z.Args[0]
23648 if !(z.Uses == 1) {
23649 break
23650 }
23651 v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
23652 v0.AddArg2(x, y)
23653 b.resetWithControl(BlockARM64EQ, v0)
23654 return true
23655 }
23656
23657
23658 for b.Controls[0].Op == OpARM64CMPconst {
23659 v_0 := b.Controls[0]
23660 if auxIntToInt64(v_0.AuxInt) != 0 {
23661 break
23662 }
23663 x := v_0.Args[0]
23664 b.resetWithControl(BlockARM64Z, x)
23665 return true
23666 }
23667
23668
23669 for b.Controls[0].Op == OpARM64CMPWconst {
23670 v_0 := b.Controls[0]
23671 if auxIntToInt32(v_0.AuxInt) != 0 {
23672 break
23673 }
23674 x := v_0.Args[0]
23675 b.resetWithControl(BlockARM64ZW, x)
23676 return true
23677 }
23678
23679
23680
23681 for b.Controls[0].Op == OpARM64CMPconst {
23682 v_0 := b.Controls[0]
23683 if auxIntToInt64(v_0.AuxInt) != 0 {
23684 break
23685 }
23686 z := v_0.Args[0]
23687 if z.Op != OpARM64MADD {
23688 break
23689 }
23690 y := z.Args[2]
23691 a := z.Args[0]
23692 x := z.Args[1]
23693 if !(z.Uses == 1) {
23694 break
23695 }
23696 v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
23697 v1 := b.NewValue0(v_0.Pos, OpARM64MUL, x.Type)
23698 v1.AddArg2(x, y)
23699 v0.AddArg2(a, v1)
23700 b.resetWithControl(BlockARM64EQ, v0)
23701 return true
23702 }
23703
23704
23705
23706 for b.Controls[0].Op == OpARM64CMPconst {
23707 v_0 := b.Controls[0]
23708 if auxIntToInt64(v_0.AuxInt) != 0 {
23709 break
23710 }
23711 z := v_0.Args[0]
23712 if z.Op != OpARM64MSUB {
23713 break
23714 }
23715 y := z.Args[2]
23716 a := z.Args[0]
23717 x := z.Args[1]
23718 if !(z.Uses == 1) {
23719 break
23720 }
23721 v0 := b.NewValue0(v_0.Pos, OpARM64CMP, types.TypeFlags)
23722 v1 := b.NewValue0(v_0.Pos, OpARM64MUL, x.Type)
23723 v1.AddArg2(x, y)
23724 v0.AddArg2(a, v1)
23725 b.resetWithControl(BlockARM64EQ, v0)
23726 return true
23727 }
23728
23729
23730
23731 for b.Controls[0].Op == OpARM64CMPWconst {
23732 v_0 := b.Controls[0]
23733 if auxIntToInt32(v_0.AuxInt) != 0 {
23734 break
23735 }
23736 z := v_0.Args[0]
23737 if z.Op != OpARM64MADDW {
23738 break
23739 }
23740 y := z.Args[2]
23741 a := z.Args[0]
23742 x := z.Args[1]
23743 if !(z.Uses == 1) {
23744 break
23745 }
23746 v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
23747 v1 := b.NewValue0(v_0.Pos, OpARM64MULW, x.Type)
23748 v1.AddArg2(x, y)
23749 v0.AddArg2(a, v1)
23750 b.resetWithControl(BlockARM64EQ, v0)
23751 return true
23752 }
23753
23754
23755
23756 for b.Controls[0].Op == OpARM64CMPWconst {
23757 v_0 := b.Controls[0]
23758 if auxIntToInt32(v_0.AuxInt) != 0 {
23759 break
23760 }
23761 z := v_0.Args[0]
23762 if z.Op != OpARM64MSUBW {
23763 break
23764 }
23765 y := z.Args[2]
23766 a := z.Args[0]
23767 x := z.Args[1]
23768 if !(z.Uses == 1) {
23769 break
23770 }
23771 v0 := b.NewValue0(v_0.Pos, OpARM64CMPW, types.TypeFlags)
23772 v1 := b.NewValue0(v_0.Pos, OpARM64MULW, x.Type)
23773 v1.AddArg2(x, y)
23774 v0.AddArg2(a, v1)
23775 b.resetWithControl(BlockARM64EQ, v0)
23776 return true
23777 }
23778
23779
23780
23781 for b.Controls[0].Op == OpARM64TSTconst {
23782 v_0 := b.Controls[0]
23783 c := auxIntToInt64(v_0.AuxInt)
23784 x := v_0.Args[0]
23785 if !(oneBit(c)) {
23786 break
23787 }
23788 b.resetWithControl(BlockARM64TBZ, x)
23789 b.AuxInt = int64ToAuxInt(int64(ntz64(c)))
23790 return true
23791 }
23792
23793
23794
23795 for b.Controls[0].Op == OpARM64TSTWconst {
23796 v_0 := b.Controls[0]
23797 c := auxIntToInt32(v_0.AuxInt)
23798 x := v_0.Args[0]
23799 if !(oneBit(int64(uint32(c)))) {
23800 break
23801 }
23802 b.resetWithControl(BlockARM64TBZ, x)
23803 b.AuxInt = int64ToAuxInt(int64(ntz64(int64(uint32(c)))))
23804 return true
23805 }
23806
23807
23808
23809 for b.Controls[0].Op == OpARM64FlagConstant {
23810 v_0 := b.Controls[0]
23811 fc := auxIntToFlagConstant(v_0.AuxInt)
23812 if !(fc.eq()) {
23813 break
23814 }
23815 b.Reset(BlockFirst)
23816 return true
23817 }
23818
23819
23820
23821 for b.Controls[0].Op == OpARM64FlagConstant {
23822 v_0 := b.Controls[0]
23823 fc := auxIntToFlagConstant(v_0.AuxInt)
23824 if !(!fc.eq()) {
23825 break
23826 }
23827 b.Reset(BlockFirst)
23828 b.swapSuccessors()
23829 return true
23830 }
23831
23832
23833 for b.Controls[0].Op == OpARM64InvertFlags {
23834 v_0 := b.Controls[0]
23835 cmp := v_0.Args[0]
23836 b.resetWithControl(BlockARM64EQ, cmp)
23837 return true
23838 }
23839 case BlockARM64FGE:
23840
23841
23842 for b.Controls[0].Op == OpARM64InvertFlags {
23843 v_0 := b.Controls[0]
23844 cmp := v_0.Args[0]
23845 b.resetWithControl(BlockARM64FLE, cmp)
23846 return true
23847 }
23848 case BlockARM64FGT:
23849
23850
23851 for b.Controls[0].Op == OpARM64InvertFlags {
23852 v_0 := b.Controls[0]
23853 cmp := v_0.Args[0]
23854 b.resetWithControl(BlockARM64FLT, cmp)
23855 return true
23856 }
23857 case BlockARM64FLE:
23858
23859
23860 for b.Controls[0].Op == OpARM64InvertFlags {
23861 v_0 := b.Controls[0]
23862 cmp := v_0.Args[0]
23863 b.resetWithControl(BlockARM64FGE, cmp)
23864 return true
23865 }
23866 case BlockARM64FLT:
23867
23868
23869 for b.Controls[0].Op == OpARM64InvertFlags {
23870 v_0 := b.Controls[0]
23871 cmp := v_0.Args[0]
23872 b.resetWithControl(BlockARM64FGT, cmp)
23873 return true
23874 }
23875 case BlockARM64GE:
23876
23877
23878
23879 for b.Controls[0].Op == OpARM64CMPconst {
23880 v_0 := b.Controls[0]
23881 if auxIntToInt64(v_0.AuxInt) != 0 {
23882 break
23883 }
23884 z := v_0.Args[0]
23885 if z.Op != OpARM64AND {
23886 break
23887 }
23888 _ = z.Args[1]
23889 z_0 := z.Args[0]
23890 z_1 := z.Args[1]
23891 for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
23892 x := z_0
23893 y := z_1
23894 if !(z.Uses == 1) {
23895 continue
23896 }
23897 v0 := b.NewValue0(v_0.Pos, OpARM64TST, types.TypeFlags)
23898 v0.AddArg2(x, y)
23899 b.resetWithControl(BlockARM64GE, v0)
23900 return true
23901 }
23902 break
23903 }
23904
23905
23906
23907 for b.Controls[0].Op == OpARM64CMPconst {
23908 v_0 := b.Controls[0]
23909 if auxIntToInt64(v_0.AuxInt) != 0 {
23910 break
23911 }
23912 x := v_0.Args[0]
23913 if x.Op != OpARM64ANDconst {
23914 break
23915 }
23916 c := auxIntToInt64(x.AuxInt)
23917 y := x.Args[0]
23918 if !(x.Uses == 1) {
23919 break
23920 }
23921 v0 := b.NewValue0(v_0.Pos, OpARM64TSTconst, types.TypeFlags)
23922 v0.AuxInt = int64ToAuxInt(c)
23923 v0.AddArg(y)
23924 b.resetWithControl(BlockARM64GE, v0)
23925 return true
23926 }
23927
23928
23929
23930 for b.Controls[0].Op == OpARM64CMPWconst {
23931 v_0 := b.Controls[0]
23932 if auxIntToInt32(v_0.AuxInt) != 0 {
23933 break
23934 }
23935 z := v_0.Args[0]
23936 if z.Op != OpARM64AND {
23937 break
23938 }
23939 _ = z.Args[1]
23940 z_0 := z.Args[0]
23941 z_1 := z.Args[1]
23942 for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
23943 x := z_0
23944 y := z_1
23945 if !(z.Uses == 1) {
23946 continue
23947 }
23948 v0 := b.NewValue0(v_0.Pos, OpARM64TSTW, types.TypeFlags)
23949 v0.AddArg2(x, y)
23950 b.resetWithControl(BlockARM64GE, v0)
23951 return true
23952 }
23953 break
23954 }
23955
23956
23957
23958 for b.Controls[0].Op == OpARM64CMPWconst {
23959 v_0 := b.Controls[0]
23960 if auxIntToInt32(v_0.AuxInt) != 0 {
23961 break
23962 }
23963 x := v_0.Args[0]
23964 if x.Op != OpARM64ANDconst {
23965 break
23966 }
23967 c := auxIntToInt64(x.AuxInt)
23968 y := x.Args[0]
23969 if !(x.Uses == 1) {
23970 break
23971 }
23972 v0 := b.NewValue0(v_0.Pos, OpARM64TSTWconst, types.TypeFlags)
23973 v0.AuxInt = int32ToAuxInt(int32(c))
23974 v0.AddArg(y)
23975 b.resetWithControl(BlockARM64GE, v0)
23976 return true
23977 }
23978
23979
23980
23981 for b.Controls[0].Op == OpARM64CMPconst {
23982 v_0 := b.Controls[0]
23983 if auxIntToInt64(v_0.AuxInt) != 0 {
23984 break
23985 }
23986 x := v_0.Args[0]
23987 if x.Op != OpARM64ADDconst {
23988 break
23989 }
23990 c := auxIntToInt64(x.AuxInt)
23991 y := x.Args[0]
23992 if !(x.Uses == 1) {
23993 break
23994 }
23995 v0 := b.NewValue0(v_0.Pos, OpARM64CMNconst, types.TypeFlags)
23996 v0.AuxInt = int64ToAuxInt(c)
23997 v0.AddArg(y)
23998 b.resetWithControl(BlockARM64GEnoov, v0)
23999 return true
24000 }
24001
24002
24003
24004 for b.Controls[0].Op == OpARM64CMPWconst {
24005 v_0 := b.Controls[0]
24006 if auxIntToInt32(v_0.AuxInt) != 0 {
24007 break
24008 }
24009 x := v_0.Args[0]
24010 if x.Op != OpARM64ADDconst {
24011 break
24012 }
24013 c := auxIntToInt64(x.AuxInt)
24014 y := x.Args[0]
24015 if !(x.Uses == 1) {
24016 break
24017 }
24018 v0 := b.NewValue0(v_0.Pos, OpARM64CMNWconst, types.TypeFlags)
24019 v0.AuxInt = int32ToAuxInt(int32(c))
24020 v0.AddArg(y)
24021 b.resetWithControl(BlockARM64GEnoov, v0)
24022 return true
24023 }
24024
24025
24026
24027 for b.Controls[0].Op == OpARM64CMPconst {
24028 v_0 := b.Controls[0]
24029 if auxIntToInt64(v_0.AuxInt) != 0 {
24030 break
24031 }
24032 z := v_0.Args[0]
24033 if z.Op != OpARM64ADD {
24034 break
24035 }
24036 _ = z.Args[1]
24037 z_0 := z.Args[0]
24038 z_1 := z.Args[1]
24039 for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
24040 x := z_0
24041 y := z_1
24042 if !(z.Uses == 1) {
24043 continue
24044 }
24045 v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
24046 v0.AddArg2(x, y)
24047 b.resetWithControl(BlockARM64GEnoov, v0)
24048 return true
24049 }
24050 break
24051 }
24052
24053
24054
24055 for b.Controls[0].Op == OpARM64CMPWconst {
24056 v_0 := b.Controls[0]
24057 if auxIntToInt32(v_0.AuxInt) != 0 {
24058 break
24059 }
24060 z := v_0.Args[0]
24061 if z.Op != OpARM64ADD {
24062 break
24063 }
24064 _ = z.Args[1]
24065 z_0 := z.Args[0]
24066 z_1 := z.Args[1]
24067 for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
24068 x := z_0
24069 y := z_1
24070 if !(z.Uses == 1) {
24071 continue
24072 }
24073 v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
24074 v0.AddArg2(x, y)
24075 b.resetWithControl(BlockARM64GEnoov, v0)
24076 return true
24077 }
24078 break
24079 }
24080
24081
24082
24083 for b.Controls[0].Op == OpARM64CMPconst {
24084 v_0 := b.Controls[0]
24085 if auxIntToInt64(v_0.AuxInt) != 0 {
24086 break
24087 }
24088 z := v_0.Args[0]
24089 if z.Op != OpARM64MADD {
24090 break
24091 }
24092 y := z.Args[2]
24093 a := z.Args[0]
24094 x := z.Args[1]
24095 if !(z.Uses == 1) {
24096 break
24097 }
24098 v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
24099 v1 := b.NewValue0(v_0.Pos, OpARM64MUL, x.Type)
24100 v1.AddArg2(x, y)
24101 v0.AddArg2(a, v1)
24102 b.resetWithControl(BlockARM64GEnoov, v0)
24103 return true
24104 }
24105
24106
24107
24108 for b.Controls[0].Op == OpARM64CMPconst {
24109 v_0 := b.Controls[0]
24110 if auxIntToInt64(v_0.AuxInt) != 0 {
24111 break
24112 }
24113 z := v_0.Args[0]
24114 if z.Op != OpARM64MSUB {
24115 break
24116 }
24117 y := z.Args[2]
24118 a := z.Args[0]
24119 x := z.Args[1]
24120 if !(z.Uses == 1) {
24121 break
24122 }
24123 v0 := b.NewValue0(v_0.Pos, OpARM64CMP, types.TypeFlags)
24124 v1 := b.NewValue0(v_0.Pos, OpARM64MUL, x.Type)
24125 v1.AddArg2(x, y)
24126 v0.AddArg2(a, v1)
24127 b.resetWithControl(BlockARM64GEnoov, v0)
24128 return true
24129 }
24130
24131
24132
24133 for b.Controls[0].Op == OpARM64CMPWconst {
24134 v_0 := b.Controls[0]
24135 if auxIntToInt32(v_0.AuxInt) != 0 {
24136 break
24137 }
24138 z := v_0.Args[0]
24139 if z.Op != OpARM64MADDW {
24140 break
24141 }
24142 y := z.Args[2]
24143 a := z.Args[0]
24144 x := z.Args[1]
24145 if !(z.Uses == 1) {
24146 break
24147 }
24148 v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
24149 v1 := b.NewValue0(v_0.Pos, OpARM64MULW, x.Type)
24150 v1.AddArg2(x, y)
24151 v0.AddArg2(a, v1)
24152 b.resetWithControl(BlockARM64GEnoov, v0)
24153 return true
24154 }
24155
24156
24157
24158 for b.Controls[0].Op == OpARM64CMPWconst {
24159 v_0 := b.Controls[0]
24160 if auxIntToInt32(v_0.AuxInt) != 0 {
24161 break
24162 }
24163 z := v_0.Args[0]
24164 if z.Op != OpARM64MSUBW {
24165 break
24166 }
24167 y := z.Args[2]
24168 a := z.Args[0]
24169 x := z.Args[1]
24170 if !(z.Uses == 1) {
24171 break
24172 }
24173 v0 := b.NewValue0(v_0.Pos, OpARM64CMPW, types.TypeFlags)
24174 v1 := b.NewValue0(v_0.Pos, OpARM64MULW, x.Type)
24175 v1.AddArg2(x, y)
24176 v0.AddArg2(a, v1)
24177 b.resetWithControl(BlockARM64GEnoov, v0)
24178 return true
24179 }
24180
24181
24182 for b.Controls[0].Op == OpARM64CMPWconst {
24183 v_0 := b.Controls[0]
24184 if auxIntToInt32(v_0.AuxInt) != 0 {
24185 break
24186 }
24187 x := v_0.Args[0]
24188 b.resetWithControl(BlockARM64TBZ, x)
24189 b.AuxInt = int64ToAuxInt(31)
24190 return true
24191 }
24192
24193
24194 for b.Controls[0].Op == OpARM64CMPconst {
24195 v_0 := b.Controls[0]
24196 if auxIntToInt64(v_0.AuxInt) != 0 {
24197 break
24198 }
24199 x := v_0.Args[0]
24200 b.resetWithControl(BlockARM64TBZ, x)
24201 b.AuxInt = int64ToAuxInt(63)
24202 return true
24203 }
24204
24205
24206
24207 for b.Controls[0].Op == OpARM64FlagConstant {
24208 v_0 := b.Controls[0]
24209 fc := auxIntToFlagConstant(v_0.AuxInt)
24210 if !(fc.ge()) {
24211 break
24212 }
24213 b.Reset(BlockFirst)
24214 return true
24215 }
24216
24217
24218
24219 for b.Controls[0].Op == OpARM64FlagConstant {
24220 v_0 := b.Controls[0]
24221 fc := auxIntToFlagConstant(v_0.AuxInt)
24222 if !(!fc.ge()) {
24223 break
24224 }
24225 b.Reset(BlockFirst)
24226 b.swapSuccessors()
24227 return true
24228 }
24229
24230
24231 for b.Controls[0].Op == OpARM64InvertFlags {
24232 v_0 := b.Controls[0]
24233 cmp := v_0.Args[0]
24234 b.resetWithControl(BlockARM64LE, cmp)
24235 return true
24236 }
24237 case BlockARM64GEnoov:
24238
24239
24240
24241 for b.Controls[0].Op == OpARM64FlagConstant {
24242 v_0 := b.Controls[0]
24243 fc := auxIntToFlagConstant(v_0.AuxInt)
24244 if !(fc.geNoov()) {
24245 break
24246 }
24247 b.Reset(BlockFirst)
24248 return true
24249 }
24250
24251
24252
24253 for b.Controls[0].Op == OpARM64FlagConstant {
24254 v_0 := b.Controls[0]
24255 fc := auxIntToFlagConstant(v_0.AuxInt)
24256 if !(!fc.geNoov()) {
24257 break
24258 }
24259 b.Reset(BlockFirst)
24260 b.swapSuccessors()
24261 return true
24262 }
24263
24264
24265 for b.Controls[0].Op == OpARM64InvertFlags {
24266 v_0 := b.Controls[0]
24267 cmp := v_0.Args[0]
24268 b.resetWithControl(BlockARM64LEnoov, cmp)
24269 return true
24270 }
24271 case BlockARM64GT:
24272
24273
24274
24275 for b.Controls[0].Op == OpARM64CMPconst {
24276 v_0 := b.Controls[0]
24277 if auxIntToInt64(v_0.AuxInt) != 0 {
24278 break
24279 }
24280 z := v_0.Args[0]
24281 if z.Op != OpARM64AND {
24282 break
24283 }
24284 _ = z.Args[1]
24285 z_0 := z.Args[0]
24286 z_1 := z.Args[1]
24287 for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
24288 x := z_0
24289 y := z_1
24290 if !(z.Uses == 1) {
24291 continue
24292 }
24293 v0 := b.NewValue0(v_0.Pos, OpARM64TST, types.TypeFlags)
24294 v0.AddArg2(x, y)
24295 b.resetWithControl(BlockARM64GT, v0)
24296 return true
24297 }
24298 break
24299 }
24300
24301
24302
24303 for b.Controls[0].Op == OpARM64CMPconst {
24304 v_0 := b.Controls[0]
24305 if auxIntToInt64(v_0.AuxInt) != 0 {
24306 break
24307 }
24308 x := v_0.Args[0]
24309 if x.Op != OpARM64ANDconst {
24310 break
24311 }
24312 c := auxIntToInt64(x.AuxInt)
24313 y := x.Args[0]
24314 if !(x.Uses == 1) {
24315 break
24316 }
24317 v0 := b.NewValue0(v_0.Pos, OpARM64TSTconst, types.TypeFlags)
24318 v0.AuxInt = int64ToAuxInt(c)
24319 v0.AddArg(y)
24320 b.resetWithControl(BlockARM64GT, v0)
24321 return true
24322 }
24323
24324
24325
24326 for b.Controls[0].Op == OpARM64CMPWconst {
24327 v_0 := b.Controls[0]
24328 if auxIntToInt32(v_0.AuxInt) != 0 {
24329 break
24330 }
24331 z := v_0.Args[0]
24332 if z.Op != OpARM64AND {
24333 break
24334 }
24335 _ = z.Args[1]
24336 z_0 := z.Args[0]
24337 z_1 := z.Args[1]
24338 for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
24339 x := z_0
24340 y := z_1
24341 if !(z.Uses == 1) {
24342 continue
24343 }
24344 v0 := b.NewValue0(v_0.Pos, OpARM64TSTW, types.TypeFlags)
24345 v0.AddArg2(x, y)
24346 b.resetWithControl(BlockARM64GT, v0)
24347 return true
24348 }
24349 break
24350 }
24351
24352
24353
24354 for b.Controls[0].Op == OpARM64CMPWconst {
24355 v_0 := b.Controls[0]
24356 if auxIntToInt32(v_0.AuxInt) != 0 {
24357 break
24358 }
24359 x := v_0.Args[0]
24360 if x.Op != OpARM64ANDconst {
24361 break
24362 }
24363 c := auxIntToInt64(x.AuxInt)
24364 y := x.Args[0]
24365 if !(x.Uses == 1) {
24366 break
24367 }
24368 v0 := b.NewValue0(v_0.Pos, OpARM64TSTWconst, types.TypeFlags)
24369 v0.AuxInt = int32ToAuxInt(int32(c))
24370 v0.AddArg(y)
24371 b.resetWithControl(BlockARM64GT, v0)
24372 return true
24373 }
24374
24375
24376
24377 for b.Controls[0].Op == OpARM64CMPconst {
24378 v_0 := b.Controls[0]
24379 if auxIntToInt64(v_0.AuxInt) != 0 {
24380 break
24381 }
24382 x := v_0.Args[0]
24383 if x.Op != OpARM64ADDconst {
24384 break
24385 }
24386 c := auxIntToInt64(x.AuxInt)
24387 y := x.Args[0]
24388 if !(x.Uses == 1) {
24389 break
24390 }
24391 v0 := b.NewValue0(v_0.Pos, OpARM64CMNconst, types.TypeFlags)
24392 v0.AuxInt = int64ToAuxInt(c)
24393 v0.AddArg(y)
24394 b.resetWithControl(BlockARM64GTnoov, v0)
24395 return true
24396 }
24397
24398
24399
24400 for b.Controls[0].Op == OpARM64CMPWconst {
24401 v_0 := b.Controls[0]
24402 if auxIntToInt32(v_0.AuxInt) != 0 {
24403 break
24404 }
24405 x := v_0.Args[0]
24406 if x.Op != OpARM64ADDconst {
24407 break
24408 }
24409 c := auxIntToInt64(x.AuxInt)
24410 y := x.Args[0]
24411 if !(x.Uses == 1) {
24412 break
24413 }
24414 v0 := b.NewValue0(v_0.Pos, OpARM64CMNWconst, types.TypeFlags)
24415 v0.AuxInt = int32ToAuxInt(int32(c))
24416 v0.AddArg(y)
24417 b.resetWithControl(BlockARM64GTnoov, v0)
24418 return true
24419 }
24420
24421
24422
24423 for b.Controls[0].Op == OpARM64CMPconst {
24424 v_0 := b.Controls[0]
24425 if auxIntToInt64(v_0.AuxInt) != 0 {
24426 break
24427 }
24428 z := v_0.Args[0]
24429 if z.Op != OpARM64ADD {
24430 break
24431 }
24432 _ = z.Args[1]
24433 z_0 := z.Args[0]
24434 z_1 := z.Args[1]
24435 for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
24436 x := z_0
24437 y := z_1
24438 if !(z.Uses == 1) {
24439 continue
24440 }
24441 v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
24442 v0.AddArg2(x, y)
24443 b.resetWithControl(BlockARM64GTnoov, v0)
24444 return true
24445 }
24446 break
24447 }
24448
24449
24450
24451 for b.Controls[0].Op == OpARM64CMPWconst {
24452 v_0 := b.Controls[0]
24453 if auxIntToInt32(v_0.AuxInt) != 0 {
24454 break
24455 }
24456 z := v_0.Args[0]
24457 if z.Op != OpARM64ADD {
24458 break
24459 }
24460 _ = z.Args[1]
24461 z_0 := z.Args[0]
24462 z_1 := z.Args[1]
24463 for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
24464 x := z_0
24465 y := z_1
24466 if !(z.Uses == 1) {
24467 continue
24468 }
24469 v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
24470 v0.AddArg2(x, y)
24471 b.resetWithControl(BlockARM64GTnoov, v0)
24472 return true
24473 }
24474 break
24475 }
24476
24477
24478
24479 for b.Controls[0].Op == OpARM64CMPconst {
24480 v_0 := b.Controls[0]
24481 if auxIntToInt64(v_0.AuxInt) != 0 {
24482 break
24483 }
24484 z := v_0.Args[0]
24485 if z.Op != OpARM64MADD {
24486 break
24487 }
24488 y := z.Args[2]
24489 a := z.Args[0]
24490 x := z.Args[1]
24491 if !(z.Uses == 1) {
24492 break
24493 }
24494 v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
24495 v1 := b.NewValue0(v_0.Pos, OpARM64MUL, x.Type)
24496 v1.AddArg2(x, y)
24497 v0.AddArg2(a, v1)
24498 b.resetWithControl(BlockARM64GTnoov, v0)
24499 return true
24500 }
24501
24502
24503
24504 for b.Controls[0].Op == OpARM64CMPconst {
24505 v_0 := b.Controls[0]
24506 if auxIntToInt64(v_0.AuxInt) != 0 {
24507 break
24508 }
24509 z := v_0.Args[0]
24510 if z.Op != OpARM64MSUB {
24511 break
24512 }
24513 y := z.Args[2]
24514 a := z.Args[0]
24515 x := z.Args[1]
24516 if !(z.Uses == 1) {
24517 break
24518 }
24519 v0 := b.NewValue0(v_0.Pos, OpARM64CMP, types.TypeFlags)
24520 v1 := b.NewValue0(v_0.Pos, OpARM64MUL, x.Type)
24521 v1.AddArg2(x, y)
24522 v0.AddArg2(a, v1)
24523 b.resetWithControl(BlockARM64GTnoov, v0)
24524 return true
24525 }
24526
24527
24528
24529 for b.Controls[0].Op == OpARM64CMPWconst {
24530 v_0 := b.Controls[0]
24531 if auxIntToInt32(v_0.AuxInt) != 0 {
24532 break
24533 }
24534 z := v_0.Args[0]
24535 if z.Op != OpARM64MADDW {
24536 break
24537 }
24538 y := z.Args[2]
24539 a := z.Args[0]
24540 x := z.Args[1]
24541 if !(z.Uses == 1) {
24542 break
24543 }
24544 v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
24545 v1 := b.NewValue0(v_0.Pos, OpARM64MULW, x.Type)
24546 v1.AddArg2(x, y)
24547 v0.AddArg2(a, v1)
24548 b.resetWithControl(BlockARM64GTnoov, v0)
24549 return true
24550 }
24551
24552
24553
24554 for b.Controls[0].Op == OpARM64CMPWconst {
24555 v_0 := b.Controls[0]
24556 if auxIntToInt32(v_0.AuxInt) != 0 {
24557 break
24558 }
24559 z := v_0.Args[0]
24560 if z.Op != OpARM64MSUBW {
24561 break
24562 }
24563 y := z.Args[2]
24564 a := z.Args[0]
24565 x := z.Args[1]
24566 if !(z.Uses == 1) {
24567 break
24568 }
24569 v0 := b.NewValue0(v_0.Pos, OpARM64CMPW, types.TypeFlags)
24570 v1 := b.NewValue0(v_0.Pos, OpARM64MULW, x.Type)
24571 v1.AddArg2(x, y)
24572 v0.AddArg2(a, v1)
24573 b.resetWithControl(BlockARM64GTnoov, v0)
24574 return true
24575 }
24576
24577
24578
24579 for b.Controls[0].Op == OpARM64FlagConstant {
24580 v_0 := b.Controls[0]
24581 fc := auxIntToFlagConstant(v_0.AuxInt)
24582 if !(fc.gt()) {
24583 break
24584 }
24585 b.Reset(BlockFirst)
24586 return true
24587 }
24588
24589
24590
24591 for b.Controls[0].Op == OpARM64FlagConstant {
24592 v_0 := b.Controls[0]
24593 fc := auxIntToFlagConstant(v_0.AuxInt)
24594 if !(!fc.gt()) {
24595 break
24596 }
24597 b.Reset(BlockFirst)
24598 b.swapSuccessors()
24599 return true
24600 }
24601
24602
24603 for b.Controls[0].Op == OpARM64InvertFlags {
24604 v_0 := b.Controls[0]
24605 cmp := v_0.Args[0]
24606 b.resetWithControl(BlockARM64LT, cmp)
24607 return true
24608 }
24609 case BlockARM64GTnoov:
24610
24611
24612
24613 for b.Controls[0].Op == OpARM64FlagConstant {
24614 v_0 := b.Controls[0]
24615 fc := auxIntToFlagConstant(v_0.AuxInt)
24616 if !(fc.gtNoov()) {
24617 break
24618 }
24619 b.Reset(BlockFirst)
24620 return true
24621 }
24622
24623
24624
24625 for b.Controls[0].Op == OpARM64FlagConstant {
24626 v_0 := b.Controls[0]
24627 fc := auxIntToFlagConstant(v_0.AuxInt)
24628 if !(!fc.gtNoov()) {
24629 break
24630 }
24631 b.Reset(BlockFirst)
24632 b.swapSuccessors()
24633 return true
24634 }
24635
24636
24637 for b.Controls[0].Op == OpARM64InvertFlags {
24638 v_0 := b.Controls[0]
24639 cmp := v_0.Args[0]
24640 b.resetWithControl(BlockARM64LTnoov, cmp)
24641 return true
24642 }
24643 case BlockIf:
24644
24645
24646 for b.Controls[0].Op == OpARM64Equal {
24647 v_0 := b.Controls[0]
24648 cc := v_0.Args[0]
24649 b.resetWithControl(BlockARM64EQ, cc)
24650 return true
24651 }
24652
24653
24654 for b.Controls[0].Op == OpARM64NotEqual {
24655 v_0 := b.Controls[0]
24656 cc := v_0.Args[0]
24657 b.resetWithControl(BlockARM64NE, cc)
24658 return true
24659 }
24660
24661
24662 for b.Controls[0].Op == OpARM64LessThan {
24663 v_0 := b.Controls[0]
24664 cc := v_0.Args[0]
24665 b.resetWithControl(BlockARM64LT, cc)
24666 return true
24667 }
24668
24669
24670 for b.Controls[0].Op == OpARM64LessThanU {
24671 v_0 := b.Controls[0]
24672 cc := v_0.Args[0]
24673 b.resetWithControl(BlockARM64ULT, cc)
24674 return true
24675 }
24676
24677
24678 for b.Controls[0].Op == OpARM64LessEqual {
24679 v_0 := b.Controls[0]
24680 cc := v_0.Args[0]
24681 b.resetWithControl(BlockARM64LE, cc)
24682 return true
24683 }
24684
24685
24686 for b.Controls[0].Op == OpARM64LessEqualU {
24687 v_0 := b.Controls[0]
24688 cc := v_0.Args[0]
24689 b.resetWithControl(BlockARM64ULE, cc)
24690 return true
24691 }
24692
24693
24694 for b.Controls[0].Op == OpARM64GreaterThan {
24695 v_0 := b.Controls[0]
24696 cc := v_0.Args[0]
24697 b.resetWithControl(BlockARM64GT, cc)
24698 return true
24699 }
24700
24701
24702 for b.Controls[0].Op == OpARM64GreaterThanU {
24703 v_0 := b.Controls[0]
24704 cc := v_0.Args[0]
24705 b.resetWithControl(BlockARM64UGT, cc)
24706 return true
24707 }
24708
24709
24710 for b.Controls[0].Op == OpARM64GreaterEqual {
24711 v_0 := b.Controls[0]
24712 cc := v_0.Args[0]
24713 b.resetWithControl(BlockARM64GE, cc)
24714 return true
24715 }
24716
24717
24718 for b.Controls[0].Op == OpARM64GreaterEqualU {
24719 v_0 := b.Controls[0]
24720 cc := v_0.Args[0]
24721 b.resetWithControl(BlockARM64UGE, cc)
24722 return true
24723 }
24724
24725
24726 for b.Controls[0].Op == OpARM64LessThanF {
24727 v_0 := b.Controls[0]
24728 cc := v_0.Args[0]
24729 b.resetWithControl(BlockARM64FLT, cc)
24730 return true
24731 }
24732
24733
24734 for b.Controls[0].Op == OpARM64LessEqualF {
24735 v_0 := b.Controls[0]
24736 cc := v_0.Args[0]
24737 b.resetWithControl(BlockARM64FLE, cc)
24738 return true
24739 }
24740
24741
24742 for b.Controls[0].Op == OpARM64GreaterThanF {
24743 v_0 := b.Controls[0]
24744 cc := v_0.Args[0]
24745 b.resetWithControl(BlockARM64FGT, cc)
24746 return true
24747 }
24748
24749
24750 for b.Controls[0].Op == OpARM64GreaterEqualF {
24751 v_0 := b.Controls[0]
24752 cc := v_0.Args[0]
24753 b.resetWithControl(BlockARM64FGE, cc)
24754 return true
24755 }
24756
24757
24758 for {
24759 cond := b.Controls[0]
24760 b.resetWithControl(BlockARM64TBNZ, cond)
24761 b.AuxInt = int64ToAuxInt(0)
24762 return true
24763 }
24764 case BlockJumpTable:
24765
24766
24767 for {
24768 idx := b.Controls[0]
24769 v0 := b.NewValue0(b.Pos, OpARM64MOVDaddr, typ.Uintptr)
24770 v0.Aux = symToAux(makeJumpTableSym(b))
24771 v1 := b.NewValue0(b.Pos, OpSB, typ.Uintptr)
24772 v0.AddArg(v1)
24773 b.resetWithControl2(BlockARM64JUMPTABLE, idx, v0)
24774 b.Aux = symToAux(makeJumpTableSym(b))
24775 return true
24776 }
24777 case BlockARM64LE:
24778
24779
24780
24781 for b.Controls[0].Op == OpARM64CMPconst {
24782 v_0 := b.Controls[0]
24783 if auxIntToInt64(v_0.AuxInt) != 0 {
24784 break
24785 }
24786 z := v_0.Args[0]
24787 if z.Op != OpARM64AND {
24788 break
24789 }
24790 _ = z.Args[1]
24791 z_0 := z.Args[0]
24792 z_1 := z.Args[1]
24793 for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
24794 x := z_0
24795 y := z_1
24796 if !(z.Uses == 1) {
24797 continue
24798 }
24799 v0 := b.NewValue0(v_0.Pos, OpARM64TST, types.TypeFlags)
24800 v0.AddArg2(x, y)
24801 b.resetWithControl(BlockARM64LE, v0)
24802 return true
24803 }
24804 break
24805 }
24806
24807
24808
24809 for b.Controls[0].Op == OpARM64CMPconst {
24810 v_0 := b.Controls[0]
24811 if auxIntToInt64(v_0.AuxInt) != 0 {
24812 break
24813 }
24814 x := v_0.Args[0]
24815 if x.Op != OpARM64ANDconst {
24816 break
24817 }
24818 c := auxIntToInt64(x.AuxInt)
24819 y := x.Args[0]
24820 if !(x.Uses == 1) {
24821 break
24822 }
24823 v0 := b.NewValue0(v_0.Pos, OpARM64TSTconst, types.TypeFlags)
24824 v0.AuxInt = int64ToAuxInt(c)
24825 v0.AddArg(y)
24826 b.resetWithControl(BlockARM64LE, v0)
24827 return true
24828 }
24829
24830
24831
24832 for b.Controls[0].Op == OpARM64CMPWconst {
24833 v_0 := b.Controls[0]
24834 if auxIntToInt32(v_0.AuxInt) != 0 {
24835 break
24836 }
24837 z := v_0.Args[0]
24838 if z.Op != OpARM64AND {
24839 break
24840 }
24841 _ = z.Args[1]
24842 z_0 := z.Args[0]
24843 z_1 := z.Args[1]
24844 for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
24845 x := z_0
24846 y := z_1
24847 if !(z.Uses == 1) {
24848 continue
24849 }
24850 v0 := b.NewValue0(v_0.Pos, OpARM64TSTW, types.TypeFlags)
24851 v0.AddArg2(x, y)
24852 b.resetWithControl(BlockARM64LE, v0)
24853 return true
24854 }
24855 break
24856 }
24857
24858
24859
24860 for b.Controls[0].Op == OpARM64CMPWconst {
24861 v_0 := b.Controls[0]
24862 if auxIntToInt32(v_0.AuxInt) != 0 {
24863 break
24864 }
24865 x := v_0.Args[0]
24866 if x.Op != OpARM64ANDconst {
24867 break
24868 }
24869 c := auxIntToInt64(x.AuxInt)
24870 y := x.Args[0]
24871 if !(x.Uses == 1) {
24872 break
24873 }
24874 v0 := b.NewValue0(v_0.Pos, OpARM64TSTWconst, types.TypeFlags)
24875 v0.AuxInt = int32ToAuxInt(int32(c))
24876 v0.AddArg(y)
24877 b.resetWithControl(BlockARM64LE, v0)
24878 return true
24879 }
24880
24881
24882
24883 for b.Controls[0].Op == OpARM64CMPconst {
24884 v_0 := b.Controls[0]
24885 if auxIntToInt64(v_0.AuxInt) != 0 {
24886 break
24887 }
24888 x := v_0.Args[0]
24889 if x.Op != OpARM64ADDconst {
24890 break
24891 }
24892 c := auxIntToInt64(x.AuxInt)
24893 y := x.Args[0]
24894 if !(x.Uses == 1) {
24895 break
24896 }
24897 v0 := b.NewValue0(v_0.Pos, OpARM64CMNconst, types.TypeFlags)
24898 v0.AuxInt = int64ToAuxInt(c)
24899 v0.AddArg(y)
24900 b.resetWithControl(BlockARM64LEnoov, v0)
24901 return true
24902 }
24903
24904
24905
24906 for b.Controls[0].Op == OpARM64CMPWconst {
24907 v_0 := b.Controls[0]
24908 if auxIntToInt32(v_0.AuxInt) != 0 {
24909 break
24910 }
24911 x := v_0.Args[0]
24912 if x.Op != OpARM64ADDconst {
24913 break
24914 }
24915 c := auxIntToInt64(x.AuxInt)
24916 y := x.Args[0]
24917 if !(x.Uses == 1) {
24918 break
24919 }
24920 v0 := b.NewValue0(v_0.Pos, OpARM64CMNWconst, types.TypeFlags)
24921 v0.AuxInt = int32ToAuxInt(int32(c))
24922 v0.AddArg(y)
24923 b.resetWithControl(BlockARM64LEnoov, v0)
24924 return true
24925 }
24926
24927
24928
24929 for b.Controls[0].Op == OpARM64CMPconst {
24930 v_0 := b.Controls[0]
24931 if auxIntToInt64(v_0.AuxInt) != 0 {
24932 break
24933 }
24934 z := v_0.Args[0]
24935 if z.Op != OpARM64ADD {
24936 break
24937 }
24938 _ = z.Args[1]
24939 z_0 := z.Args[0]
24940 z_1 := z.Args[1]
24941 for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
24942 x := z_0
24943 y := z_1
24944 if !(z.Uses == 1) {
24945 continue
24946 }
24947 v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
24948 v0.AddArg2(x, y)
24949 b.resetWithControl(BlockARM64LEnoov, v0)
24950 return true
24951 }
24952 break
24953 }
24954
24955
24956
24957 for b.Controls[0].Op == OpARM64CMPWconst {
24958 v_0 := b.Controls[0]
24959 if auxIntToInt32(v_0.AuxInt) != 0 {
24960 break
24961 }
24962 z := v_0.Args[0]
24963 if z.Op != OpARM64ADD {
24964 break
24965 }
24966 _ = z.Args[1]
24967 z_0 := z.Args[0]
24968 z_1 := z.Args[1]
24969 for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
24970 x := z_0
24971 y := z_1
24972 if !(z.Uses == 1) {
24973 continue
24974 }
24975 v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
24976 v0.AddArg2(x, y)
24977 b.resetWithControl(BlockARM64LEnoov, v0)
24978 return true
24979 }
24980 break
24981 }
24982
24983
24984
24985 for b.Controls[0].Op == OpARM64CMPconst {
24986 v_0 := b.Controls[0]
24987 if auxIntToInt64(v_0.AuxInt) != 0 {
24988 break
24989 }
24990 z := v_0.Args[0]
24991 if z.Op != OpARM64MADD {
24992 break
24993 }
24994 y := z.Args[2]
24995 a := z.Args[0]
24996 x := z.Args[1]
24997 if !(z.Uses == 1) {
24998 break
24999 }
25000 v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
25001 v1 := b.NewValue0(v_0.Pos, OpARM64MUL, x.Type)
25002 v1.AddArg2(x, y)
25003 v0.AddArg2(a, v1)
25004 b.resetWithControl(BlockARM64LEnoov, v0)
25005 return true
25006 }
25007
25008
25009
25010 for b.Controls[0].Op == OpARM64CMPconst {
25011 v_0 := b.Controls[0]
25012 if auxIntToInt64(v_0.AuxInt) != 0 {
25013 break
25014 }
25015 z := v_0.Args[0]
25016 if z.Op != OpARM64MSUB {
25017 break
25018 }
25019 y := z.Args[2]
25020 a := z.Args[0]
25021 x := z.Args[1]
25022 if !(z.Uses == 1) {
25023 break
25024 }
25025 v0 := b.NewValue0(v_0.Pos, OpARM64CMP, types.TypeFlags)
25026 v1 := b.NewValue0(v_0.Pos, OpARM64MUL, x.Type)
25027 v1.AddArg2(x, y)
25028 v0.AddArg2(a, v1)
25029 b.resetWithControl(BlockARM64LEnoov, v0)
25030 return true
25031 }
25032
25033
25034
25035 for b.Controls[0].Op == OpARM64CMPWconst {
25036 v_0 := b.Controls[0]
25037 if auxIntToInt32(v_0.AuxInt) != 0 {
25038 break
25039 }
25040 z := v_0.Args[0]
25041 if z.Op != OpARM64MADDW {
25042 break
25043 }
25044 y := z.Args[2]
25045 a := z.Args[0]
25046 x := z.Args[1]
25047 if !(z.Uses == 1) {
25048 break
25049 }
25050 v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
25051 v1 := b.NewValue0(v_0.Pos, OpARM64MULW, x.Type)
25052 v1.AddArg2(x, y)
25053 v0.AddArg2(a, v1)
25054 b.resetWithControl(BlockARM64LEnoov, v0)
25055 return true
25056 }
25057
25058
25059
25060 for b.Controls[0].Op == OpARM64CMPWconst {
25061 v_0 := b.Controls[0]
25062 if auxIntToInt32(v_0.AuxInt) != 0 {
25063 break
25064 }
25065 z := v_0.Args[0]
25066 if z.Op != OpARM64MSUBW {
25067 break
25068 }
25069 y := z.Args[2]
25070 a := z.Args[0]
25071 x := z.Args[1]
25072 if !(z.Uses == 1) {
25073 break
25074 }
25075 v0 := b.NewValue0(v_0.Pos, OpARM64CMPW, types.TypeFlags)
25076 v1 := b.NewValue0(v_0.Pos, OpARM64MULW, x.Type)
25077 v1.AddArg2(x, y)
25078 v0.AddArg2(a, v1)
25079 b.resetWithControl(BlockARM64LEnoov, v0)
25080 return true
25081 }
25082
25083
25084
25085 for b.Controls[0].Op == OpARM64FlagConstant {
25086 v_0 := b.Controls[0]
25087 fc := auxIntToFlagConstant(v_0.AuxInt)
25088 if !(fc.le()) {
25089 break
25090 }
25091 b.Reset(BlockFirst)
25092 return true
25093 }
25094
25095
25096
25097 for b.Controls[0].Op == OpARM64FlagConstant {
25098 v_0 := b.Controls[0]
25099 fc := auxIntToFlagConstant(v_0.AuxInt)
25100 if !(!fc.le()) {
25101 break
25102 }
25103 b.Reset(BlockFirst)
25104 b.swapSuccessors()
25105 return true
25106 }
25107
25108
25109 for b.Controls[0].Op == OpARM64InvertFlags {
25110 v_0 := b.Controls[0]
25111 cmp := v_0.Args[0]
25112 b.resetWithControl(BlockARM64GE, cmp)
25113 return true
25114 }
25115 case BlockARM64LEnoov:
25116
25117
25118
25119 for b.Controls[0].Op == OpARM64FlagConstant {
25120 v_0 := b.Controls[0]
25121 fc := auxIntToFlagConstant(v_0.AuxInt)
25122 if !(fc.leNoov()) {
25123 break
25124 }
25125 b.Reset(BlockFirst)
25126 return true
25127 }
25128
25129
25130
25131 for b.Controls[0].Op == OpARM64FlagConstant {
25132 v_0 := b.Controls[0]
25133 fc := auxIntToFlagConstant(v_0.AuxInt)
25134 if !(!fc.leNoov()) {
25135 break
25136 }
25137 b.Reset(BlockFirst)
25138 b.swapSuccessors()
25139 return true
25140 }
25141
25142
25143 for b.Controls[0].Op == OpARM64InvertFlags {
25144 v_0 := b.Controls[0]
25145 cmp := v_0.Args[0]
25146 b.resetWithControl(BlockARM64GEnoov, cmp)
25147 return true
25148 }
25149 case BlockARM64LT:
25150
25151
25152
25153 for b.Controls[0].Op == OpARM64CMPconst {
25154 v_0 := b.Controls[0]
25155 if auxIntToInt64(v_0.AuxInt) != 0 {
25156 break
25157 }
25158 z := v_0.Args[0]
25159 if z.Op != OpARM64AND {
25160 break
25161 }
25162 _ = z.Args[1]
25163 z_0 := z.Args[0]
25164 z_1 := z.Args[1]
25165 for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
25166 x := z_0
25167 y := z_1
25168 if !(z.Uses == 1) {
25169 continue
25170 }
25171 v0 := b.NewValue0(v_0.Pos, OpARM64TST, types.TypeFlags)
25172 v0.AddArg2(x, y)
25173 b.resetWithControl(BlockARM64LT, v0)
25174 return true
25175 }
25176 break
25177 }
25178
25179
25180
25181 for b.Controls[0].Op == OpARM64CMPconst {
25182 v_0 := b.Controls[0]
25183 if auxIntToInt64(v_0.AuxInt) != 0 {
25184 break
25185 }
25186 x := v_0.Args[0]
25187 if x.Op != OpARM64ANDconst {
25188 break
25189 }
25190 c := auxIntToInt64(x.AuxInt)
25191 y := x.Args[0]
25192 if !(x.Uses == 1) {
25193 break
25194 }
25195 v0 := b.NewValue0(v_0.Pos, OpARM64TSTconst, types.TypeFlags)
25196 v0.AuxInt = int64ToAuxInt(c)
25197 v0.AddArg(y)
25198 b.resetWithControl(BlockARM64LT, v0)
25199 return true
25200 }
25201
25202
25203
25204 for b.Controls[0].Op == OpARM64CMPWconst {
25205 v_0 := b.Controls[0]
25206 if auxIntToInt32(v_0.AuxInt) != 0 {
25207 break
25208 }
25209 z := v_0.Args[0]
25210 if z.Op != OpARM64AND {
25211 break
25212 }
25213 _ = z.Args[1]
25214 z_0 := z.Args[0]
25215 z_1 := z.Args[1]
25216 for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
25217 x := z_0
25218 y := z_1
25219 if !(z.Uses == 1) {
25220 continue
25221 }
25222 v0 := b.NewValue0(v_0.Pos, OpARM64TSTW, types.TypeFlags)
25223 v0.AddArg2(x, y)
25224 b.resetWithControl(BlockARM64LT, v0)
25225 return true
25226 }
25227 break
25228 }
25229
25230
25231
25232 for b.Controls[0].Op == OpARM64CMPWconst {
25233 v_0 := b.Controls[0]
25234 if auxIntToInt32(v_0.AuxInt) != 0 {
25235 break
25236 }
25237 x := v_0.Args[0]
25238 if x.Op != OpARM64ANDconst {
25239 break
25240 }
25241 c := auxIntToInt64(x.AuxInt)
25242 y := x.Args[0]
25243 if !(x.Uses == 1) {
25244 break
25245 }
25246 v0 := b.NewValue0(v_0.Pos, OpARM64TSTWconst, types.TypeFlags)
25247 v0.AuxInt = int32ToAuxInt(int32(c))
25248 v0.AddArg(y)
25249 b.resetWithControl(BlockARM64LT, v0)
25250 return true
25251 }
25252
25253
25254
25255 for b.Controls[0].Op == OpARM64CMPconst {
25256 v_0 := b.Controls[0]
25257 if auxIntToInt64(v_0.AuxInt) != 0 {
25258 break
25259 }
25260 x := v_0.Args[0]
25261 if x.Op != OpARM64ADDconst {
25262 break
25263 }
25264 c := auxIntToInt64(x.AuxInt)
25265 y := x.Args[0]
25266 if !(x.Uses == 1) {
25267 break
25268 }
25269 v0 := b.NewValue0(v_0.Pos, OpARM64CMNconst, types.TypeFlags)
25270 v0.AuxInt = int64ToAuxInt(c)
25271 v0.AddArg(y)
25272 b.resetWithControl(BlockARM64LTnoov, v0)
25273 return true
25274 }
25275
25276
25277
25278 for b.Controls[0].Op == OpARM64CMPWconst {
25279 v_0 := b.Controls[0]
25280 if auxIntToInt32(v_0.AuxInt) != 0 {
25281 break
25282 }
25283 x := v_0.Args[0]
25284 if x.Op != OpARM64ADDconst {
25285 break
25286 }
25287 c := auxIntToInt64(x.AuxInt)
25288 y := x.Args[0]
25289 if !(x.Uses == 1) {
25290 break
25291 }
25292 v0 := b.NewValue0(v_0.Pos, OpARM64CMNWconst, types.TypeFlags)
25293 v0.AuxInt = int32ToAuxInt(int32(c))
25294 v0.AddArg(y)
25295 b.resetWithControl(BlockARM64LTnoov, v0)
25296 return true
25297 }
25298
25299
25300
25301 for b.Controls[0].Op == OpARM64CMPconst {
25302 v_0 := b.Controls[0]
25303 if auxIntToInt64(v_0.AuxInt) != 0 {
25304 break
25305 }
25306 z := v_0.Args[0]
25307 if z.Op != OpARM64ADD {
25308 break
25309 }
25310 _ = z.Args[1]
25311 z_0 := z.Args[0]
25312 z_1 := z.Args[1]
25313 for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
25314 x := z_0
25315 y := z_1
25316 if !(z.Uses == 1) {
25317 continue
25318 }
25319 v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
25320 v0.AddArg2(x, y)
25321 b.resetWithControl(BlockARM64LTnoov, v0)
25322 return true
25323 }
25324 break
25325 }
25326
25327
25328
25329 for b.Controls[0].Op == OpARM64CMPWconst {
25330 v_0 := b.Controls[0]
25331 if auxIntToInt32(v_0.AuxInt) != 0 {
25332 break
25333 }
25334 z := v_0.Args[0]
25335 if z.Op != OpARM64ADD {
25336 break
25337 }
25338 _ = z.Args[1]
25339 z_0 := z.Args[0]
25340 z_1 := z.Args[1]
25341 for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
25342 x := z_0
25343 y := z_1
25344 if !(z.Uses == 1) {
25345 continue
25346 }
25347 v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
25348 v0.AddArg2(x, y)
25349 b.resetWithControl(BlockARM64LTnoov, v0)
25350 return true
25351 }
25352 break
25353 }
25354
25355
25356
25357 for b.Controls[0].Op == OpARM64CMPconst {
25358 v_0 := b.Controls[0]
25359 if auxIntToInt64(v_0.AuxInt) != 0 {
25360 break
25361 }
25362 z := v_0.Args[0]
25363 if z.Op != OpARM64MADD {
25364 break
25365 }
25366 y := z.Args[2]
25367 a := z.Args[0]
25368 x := z.Args[1]
25369 if !(z.Uses == 1) {
25370 break
25371 }
25372 v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
25373 v1 := b.NewValue0(v_0.Pos, OpARM64MUL, x.Type)
25374 v1.AddArg2(x, y)
25375 v0.AddArg2(a, v1)
25376 b.resetWithControl(BlockARM64LTnoov, v0)
25377 return true
25378 }
25379
25380
25381
25382 for b.Controls[0].Op == OpARM64CMPconst {
25383 v_0 := b.Controls[0]
25384 if auxIntToInt64(v_0.AuxInt) != 0 {
25385 break
25386 }
25387 z := v_0.Args[0]
25388 if z.Op != OpARM64MSUB {
25389 break
25390 }
25391 y := z.Args[2]
25392 a := z.Args[0]
25393 x := z.Args[1]
25394 if !(z.Uses == 1) {
25395 break
25396 }
25397 v0 := b.NewValue0(v_0.Pos, OpARM64CMP, types.TypeFlags)
25398 v1 := b.NewValue0(v_0.Pos, OpARM64MUL, x.Type)
25399 v1.AddArg2(x, y)
25400 v0.AddArg2(a, v1)
25401 b.resetWithControl(BlockARM64LTnoov, v0)
25402 return true
25403 }
25404
25405
25406
25407 for b.Controls[0].Op == OpARM64CMPWconst {
25408 v_0 := b.Controls[0]
25409 if auxIntToInt32(v_0.AuxInt) != 0 {
25410 break
25411 }
25412 z := v_0.Args[0]
25413 if z.Op != OpARM64MADDW {
25414 break
25415 }
25416 y := z.Args[2]
25417 a := z.Args[0]
25418 x := z.Args[1]
25419 if !(z.Uses == 1) {
25420 break
25421 }
25422 v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
25423 v1 := b.NewValue0(v_0.Pos, OpARM64MULW, x.Type)
25424 v1.AddArg2(x, y)
25425 v0.AddArg2(a, v1)
25426 b.resetWithControl(BlockARM64LTnoov, v0)
25427 return true
25428 }
25429
25430
25431
25432 for b.Controls[0].Op == OpARM64CMPWconst {
25433 v_0 := b.Controls[0]
25434 if auxIntToInt32(v_0.AuxInt) != 0 {
25435 break
25436 }
25437 z := v_0.Args[0]
25438 if z.Op != OpARM64MSUBW {
25439 break
25440 }
25441 y := z.Args[2]
25442 a := z.Args[0]
25443 x := z.Args[1]
25444 if !(z.Uses == 1) {
25445 break
25446 }
25447 v0 := b.NewValue0(v_0.Pos, OpARM64CMPW, types.TypeFlags)
25448 v1 := b.NewValue0(v_0.Pos, OpARM64MULW, x.Type)
25449 v1.AddArg2(x, y)
25450 v0.AddArg2(a, v1)
25451 b.resetWithControl(BlockARM64LTnoov, v0)
25452 return true
25453 }
25454
25455
25456 for b.Controls[0].Op == OpARM64CMPWconst {
25457 v_0 := b.Controls[0]
25458 if auxIntToInt32(v_0.AuxInt) != 0 {
25459 break
25460 }
25461 x := v_0.Args[0]
25462 b.resetWithControl(BlockARM64TBNZ, x)
25463 b.AuxInt = int64ToAuxInt(31)
25464 return true
25465 }
25466
25467
25468 for b.Controls[0].Op == OpARM64CMPconst {
25469 v_0 := b.Controls[0]
25470 if auxIntToInt64(v_0.AuxInt) != 0 {
25471 break
25472 }
25473 x := v_0.Args[0]
25474 b.resetWithControl(BlockARM64TBNZ, x)
25475 b.AuxInt = int64ToAuxInt(63)
25476 return true
25477 }
25478
25479
25480
25481 for b.Controls[0].Op == OpARM64FlagConstant {
25482 v_0 := b.Controls[0]
25483 fc := auxIntToFlagConstant(v_0.AuxInt)
25484 if !(fc.lt()) {
25485 break
25486 }
25487 b.Reset(BlockFirst)
25488 return true
25489 }
25490
25491
25492
25493 for b.Controls[0].Op == OpARM64FlagConstant {
25494 v_0 := b.Controls[0]
25495 fc := auxIntToFlagConstant(v_0.AuxInt)
25496 if !(!fc.lt()) {
25497 break
25498 }
25499 b.Reset(BlockFirst)
25500 b.swapSuccessors()
25501 return true
25502 }
25503
25504
25505 for b.Controls[0].Op == OpARM64InvertFlags {
25506 v_0 := b.Controls[0]
25507 cmp := v_0.Args[0]
25508 b.resetWithControl(BlockARM64GT, cmp)
25509 return true
25510 }
25511 case BlockARM64LTnoov:
25512
25513
25514
25515 for b.Controls[0].Op == OpARM64FlagConstant {
25516 v_0 := b.Controls[0]
25517 fc := auxIntToFlagConstant(v_0.AuxInt)
25518 if !(fc.ltNoov()) {
25519 break
25520 }
25521 b.Reset(BlockFirst)
25522 return true
25523 }
25524
25525
25526
25527 for b.Controls[0].Op == OpARM64FlagConstant {
25528 v_0 := b.Controls[0]
25529 fc := auxIntToFlagConstant(v_0.AuxInt)
25530 if !(!fc.ltNoov()) {
25531 break
25532 }
25533 b.Reset(BlockFirst)
25534 b.swapSuccessors()
25535 return true
25536 }
25537
25538
25539 for b.Controls[0].Op == OpARM64InvertFlags {
25540 v_0 := b.Controls[0]
25541 cmp := v_0.Args[0]
25542 b.resetWithControl(BlockARM64GTnoov, cmp)
25543 return true
25544 }
25545 case BlockARM64NE:
25546
25547
25548
25549 for b.Controls[0].Op == OpARM64CMPconst {
25550 v_0 := b.Controls[0]
25551 if auxIntToInt64(v_0.AuxInt) != 0 {
25552 break
25553 }
25554 z := v_0.Args[0]
25555 if z.Op != OpARM64AND {
25556 break
25557 }
25558 _ = z.Args[1]
25559 z_0 := z.Args[0]
25560 z_1 := z.Args[1]
25561 for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
25562 x := z_0
25563 y := z_1
25564 if !(z.Uses == 1) {
25565 continue
25566 }
25567 v0 := b.NewValue0(v_0.Pos, OpARM64TST, types.TypeFlags)
25568 v0.AddArg2(x, y)
25569 b.resetWithControl(BlockARM64NE, v0)
25570 return true
25571 }
25572 break
25573 }
25574
25575
25576
25577 for b.Controls[0].Op == OpARM64CMPconst {
25578 v_0 := b.Controls[0]
25579 if auxIntToInt64(v_0.AuxInt) != 0 {
25580 break
25581 }
25582 x := v_0.Args[0]
25583 if x.Op != OpARM64ANDconst {
25584 break
25585 }
25586 c := auxIntToInt64(x.AuxInt)
25587 y := x.Args[0]
25588 if !(x.Uses == 1) {
25589 break
25590 }
25591 v0 := b.NewValue0(v_0.Pos, OpARM64TSTconst, types.TypeFlags)
25592 v0.AuxInt = int64ToAuxInt(c)
25593 v0.AddArg(y)
25594 b.resetWithControl(BlockARM64NE, v0)
25595 return true
25596 }
25597
25598
25599
25600 for b.Controls[0].Op == OpARM64CMPWconst {
25601 v_0 := b.Controls[0]
25602 if auxIntToInt32(v_0.AuxInt) != 0 {
25603 break
25604 }
25605 z := v_0.Args[0]
25606 if z.Op != OpARM64AND {
25607 break
25608 }
25609 _ = z.Args[1]
25610 z_0 := z.Args[0]
25611 z_1 := z.Args[1]
25612 for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
25613 x := z_0
25614 y := z_1
25615 if !(z.Uses == 1) {
25616 continue
25617 }
25618 v0 := b.NewValue0(v_0.Pos, OpARM64TSTW, types.TypeFlags)
25619 v0.AddArg2(x, y)
25620 b.resetWithControl(BlockARM64NE, v0)
25621 return true
25622 }
25623 break
25624 }
25625
25626
25627
25628 for b.Controls[0].Op == OpARM64CMPWconst {
25629 v_0 := b.Controls[0]
25630 if auxIntToInt32(v_0.AuxInt) != 0 {
25631 break
25632 }
25633 x := v_0.Args[0]
25634 if x.Op != OpARM64ANDconst {
25635 break
25636 }
25637 c := auxIntToInt64(x.AuxInt)
25638 y := x.Args[0]
25639 if !(x.Uses == 1) {
25640 break
25641 }
25642 v0 := b.NewValue0(v_0.Pos, OpARM64TSTWconst, types.TypeFlags)
25643 v0.AuxInt = int32ToAuxInt(int32(c))
25644 v0.AddArg(y)
25645 b.resetWithControl(BlockARM64NE, v0)
25646 return true
25647 }
25648
25649
25650
25651 for b.Controls[0].Op == OpARM64CMPconst {
25652 v_0 := b.Controls[0]
25653 if auxIntToInt64(v_0.AuxInt) != 0 {
25654 break
25655 }
25656 x := v_0.Args[0]
25657 if x.Op != OpARM64ADDconst {
25658 break
25659 }
25660 c := auxIntToInt64(x.AuxInt)
25661 y := x.Args[0]
25662 if !(x.Uses == 1) {
25663 break
25664 }
25665 v0 := b.NewValue0(v_0.Pos, OpARM64CMNconst, types.TypeFlags)
25666 v0.AuxInt = int64ToAuxInt(c)
25667 v0.AddArg(y)
25668 b.resetWithControl(BlockARM64NE, v0)
25669 return true
25670 }
25671
25672
25673
25674 for b.Controls[0].Op == OpARM64CMPWconst {
25675 v_0 := b.Controls[0]
25676 if auxIntToInt32(v_0.AuxInt) != 0 {
25677 break
25678 }
25679 x := v_0.Args[0]
25680 if x.Op != OpARM64ADDconst {
25681 break
25682 }
25683 c := auxIntToInt64(x.AuxInt)
25684 y := x.Args[0]
25685 if !(x.Uses == 1) {
25686 break
25687 }
25688 v0 := b.NewValue0(v_0.Pos, OpARM64CMNWconst, types.TypeFlags)
25689 v0.AuxInt = int32ToAuxInt(int32(c))
25690 v0.AddArg(y)
25691 b.resetWithControl(BlockARM64NE, v0)
25692 return true
25693 }
25694
25695
25696
25697 for b.Controls[0].Op == OpARM64CMPconst {
25698 v_0 := b.Controls[0]
25699 if auxIntToInt64(v_0.AuxInt) != 0 {
25700 break
25701 }
25702 z := v_0.Args[0]
25703 if z.Op != OpARM64ADD {
25704 break
25705 }
25706 _ = z.Args[1]
25707 z_0 := z.Args[0]
25708 z_1 := z.Args[1]
25709 for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
25710 x := z_0
25711 y := z_1
25712 if !(z.Uses == 1) {
25713 continue
25714 }
25715 v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
25716 v0.AddArg2(x, y)
25717 b.resetWithControl(BlockARM64NE, v0)
25718 return true
25719 }
25720 break
25721 }
25722
25723
25724
25725 for b.Controls[0].Op == OpARM64CMPWconst {
25726 v_0 := b.Controls[0]
25727 if auxIntToInt32(v_0.AuxInt) != 0 {
25728 break
25729 }
25730 z := v_0.Args[0]
25731 if z.Op != OpARM64ADD {
25732 break
25733 }
25734 _ = z.Args[1]
25735 z_0 := z.Args[0]
25736 z_1 := z.Args[1]
25737 for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
25738 x := z_0
25739 y := z_1
25740 if !(z.Uses == 1) {
25741 continue
25742 }
25743 v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
25744 v0.AddArg2(x, y)
25745 b.resetWithControl(BlockARM64NE, v0)
25746 return true
25747 }
25748 break
25749 }
25750
25751
25752
25753 for b.Controls[0].Op == OpARM64CMP {
25754 v_0 := b.Controls[0]
25755 _ = v_0.Args[1]
25756 x := v_0.Args[0]
25757 z := v_0.Args[1]
25758 if z.Op != OpARM64NEG {
25759 break
25760 }
25761 y := z.Args[0]
25762 if !(z.Uses == 1) {
25763 break
25764 }
25765 v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
25766 v0.AddArg2(x, y)
25767 b.resetWithControl(BlockARM64NE, v0)
25768 return true
25769 }
25770
25771
25772
25773 for b.Controls[0].Op == OpARM64CMPW {
25774 v_0 := b.Controls[0]
25775 _ = v_0.Args[1]
25776 x := v_0.Args[0]
25777 z := v_0.Args[1]
25778 if z.Op != OpARM64NEG {
25779 break
25780 }
25781 y := z.Args[0]
25782 if !(z.Uses == 1) {
25783 break
25784 }
25785 v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
25786 v0.AddArg2(x, y)
25787 b.resetWithControl(BlockARM64NE, v0)
25788 return true
25789 }
25790
25791
25792 for b.Controls[0].Op == OpARM64CMPconst {
25793 v_0 := b.Controls[0]
25794 if auxIntToInt64(v_0.AuxInt) != 0 {
25795 break
25796 }
25797 x := v_0.Args[0]
25798 b.resetWithControl(BlockARM64NZ, x)
25799 return true
25800 }
25801
25802
25803 for b.Controls[0].Op == OpARM64CMPWconst {
25804 v_0 := b.Controls[0]
25805 if auxIntToInt32(v_0.AuxInt) != 0 {
25806 break
25807 }
25808 x := v_0.Args[0]
25809 b.resetWithControl(BlockARM64NZW, x)
25810 return true
25811 }
25812
25813
25814
25815 for b.Controls[0].Op == OpARM64CMPconst {
25816 v_0 := b.Controls[0]
25817 if auxIntToInt64(v_0.AuxInt) != 0 {
25818 break
25819 }
25820 z := v_0.Args[0]
25821 if z.Op != OpARM64MADD {
25822 break
25823 }
25824 y := z.Args[2]
25825 a := z.Args[0]
25826 x := z.Args[1]
25827 if !(z.Uses == 1) {
25828 break
25829 }
25830 v0 := b.NewValue0(v_0.Pos, OpARM64CMN, types.TypeFlags)
25831 v1 := b.NewValue0(v_0.Pos, OpARM64MUL, x.Type)
25832 v1.AddArg2(x, y)
25833 v0.AddArg2(a, v1)
25834 b.resetWithControl(BlockARM64NE, v0)
25835 return true
25836 }
25837
25838
25839
25840 for b.Controls[0].Op == OpARM64CMPconst {
25841 v_0 := b.Controls[0]
25842 if auxIntToInt64(v_0.AuxInt) != 0 {
25843 break
25844 }
25845 z := v_0.Args[0]
25846 if z.Op != OpARM64MSUB {
25847 break
25848 }
25849 y := z.Args[2]
25850 a := z.Args[0]
25851 x := z.Args[1]
25852 if !(z.Uses == 1) {
25853 break
25854 }
25855 v0 := b.NewValue0(v_0.Pos, OpARM64CMP, types.TypeFlags)
25856 v1 := b.NewValue0(v_0.Pos, OpARM64MUL, x.Type)
25857 v1.AddArg2(x, y)
25858 v0.AddArg2(a, v1)
25859 b.resetWithControl(BlockARM64NE, v0)
25860 return true
25861 }
25862
25863
25864
25865 for b.Controls[0].Op == OpARM64CMPWconst {
25866 v_0 := b.Controls[0]
25867 if auxIntToInt32(v_0.AuxInt) != 0 {
25868 break
25869 }
25870 z := v_0.Args[0]
25871 if z.Op != OpARM64MADDW {
25872 break
25873 }
25874 y := z.Args[2]
25875 a := z.Args[0]
25876 x := z.Args[1]
25877 if !(z.Uses == 1) {
25878 break
25879 }
25880 v0 := b.NewValue0(v_0.Pos, OpARM64CMNW, types.TypeFlags)
25881 v1 := b.NewValue0(v_0.Pos, OpARM64MULW, x.Type)
25882 v1.AddArg2(x, y)
25883 v0.AddArg2(a, v1)
25884 b.resetWithControl(BlockARM64NE, v0)
25885 return true
25886 }
25887
25888
25889
25890 for b.Controls[0].Op == OpARM64CMPWconst {
25891 v_0 := b.Controls[0]
25892 if auxIntToInt32(v_0.AuxInt) != 0 {
25893 break
25894 }
25895 z := v_0.Args[0]
25896 if z.Op != OpARM64MSUBW {
25897 break
25898 }
25899 y := z.Args[2]
25900 a := z.Args[0]
25901 x := z.Args[1]
25902 if !(z.Uses == 1) {
25903 break
25904 }
25905 v0 := b.NewValue0(v_0.Pos, OpARM64CMPW, types.TypeFlags)
25906 v1 := b.NewValue0(v_0.Pos, OpARM64MULW, x.Type)
25907 v1.AddArg2(x, y)
25908 v0.AddArg2(a, v1)
25909 b.resetWithControl(BlockARM64NE, v0)
25910 return true
25911 }
25912
25913
25914
25915 for b.Controls[0].Op == OpARM64TSTconst {
25916 v_0 := b.Controls[0]
25917 c := auxIntToInt64(v_0.AuxInt)
25918 x := v_0.Args[0]
25919 if !(oneBit(c)) {
25920 break
25921 }
25922 b.resetWithControl(BlockARM64TBNZ, x)
25923 b.AuxInt = int64ToAuxInt(int64(ntz64(c)))
25924 return true
25925 }
25926
25927
25928
25929 for b.Controls[0].Op == OpARM64TSTWconst {
25930 v_0 := b.Controls[0]
25931 c := auxIntToInt32(v_0.AuxInt)
25932 x := v_0.Args[0]
25933 if !(oneBit(int64(uint32(c)))) {
25934 break
25935 }
25936 b.resetWithControl(BlockARM64TBNZ, x)
25937 b.AuxInt = int64ToAuxInt(int64(ntz64(int64(uint32(c)))))
25938 return true
25939 }
25940
25941
25942
25943 for b.Controls[0].Op == OpARM64FlagConstant {
25944 v_0 := b.Controls[0]
25945 fc := auxIntToFlagConstant(v_0.AuxInt)
25946 if !(fc.ne()) {
25947 break
25948 }
25949 b.Reset(BlockFirst)
25950 return true
25951 }
25952
25953
25954
25955 for b.Controls[0].Op == OpARM64FlagConstant {
25956 v_0 := b.Controls[0]
25957 fc := auxIntToFlagConstant(v_0.AuxInt)
25958 if !(!fc.ne()) {
25959 break
25960 }
25961 b.Reset(BlockFirst)
25962 b.swapSuccessors()
25963 return true
25964 }
25965
25966
25967 for b.Controls[0].Op == OpARM64InvertFlags {
25968 v_0 := b.Controls[0]
25969 cmp := v_0.Args[0]
25970 b.resetWithControl(BlockARM64NE, cmp)
25971 return true
25972 }
25973 case BlockARM64NZ:
25974
25975
25976 for b.Controls[0].Op == OpARM64Equal {
25977 v_0 := b.Controls[0]
25978 cc := v_0.Args[0]
25979 b.resetWithControl(BlockARM64EQ, cc)
25980 return true
25981 }
25982
25983
25984 for b.Controls[0].Op == OpARM64NotEqual {
25985 v_0 := b.Controls[0]
25986 cc := v_0.Args[0]
25987 b.resetWithControl(BlockARM64NE, cc)
25988 return true
25989 }
25990
25991
25992 for b.Controls[0].Op == OpARM64LessThan {
25993 v_0 := b.Controls[0]
25994 cc := v_0.Args[0]
25995 b.resetWithControl(BlockARM64LT, cc)
25996 return true
25997 }
25998
25999
26000 for b.Controls[0].Op == OpARM64LessThanU {
26001 v_0 := b.Controls[0]
26002 cc := v_0.Args[0]
26003 b.resetWithControl(BlockARM64ULT, cc)
26004 return true
26005 }
26006
26007
26008 for b.Controls[0].Op == OpARM64LessEqual {
26009 v_0 := b.Controls[0]
26010 cc := v_0.Args[0]
26011 b.resetWithControl(BlockARM64LE, cc)
26012 return true
26013 }
26014
26015
26016 for b.Controls[0].Op == OpARM64LessEqualU {
26017 v_0 := b.Controls[0]
26018 cc := v_0.Args[0]
26019 b.resetWithControl(BlockARM64ULE, cc)
26020 return true
26021 }
26022
26023
26024 for b.Controls[0].Op == OpARM64GreaterThan {
26025 v_0 := b.Controls[0]
26026 cc := v_0.Args[0]
26027 b.resetWithControl(BlockARM64GT, cc)
26028 return true
26029 }
26030
26031
26032 for b.Controls[0].Op == OpARM64GreaterThanU {
26033 v_0 := b.Controls[0]
26034 cc := v_0.Args[0]
26035 b.resetWithControl(BlockARM64UGT, cc)
26036 return true
26037 }
26038
26039
26040 for b.Controls[0].Op == OpARM64GreaterEqual {
26041 v_0 := b.Controls[0]
26042 cc := v_0.Args[0]
26043 b.resetWithControl(BlockARM64GE, cc)
26044 return true
26045 }
26046
26047
26048 for b.Controls[0].Op == OpARM64GreaterEqualU {
26049 v_0 := b.Controls[0]
26050 cc := v_0.Args[0]
26051 b.resetWithControl(BlockARM64UGE, cc)
26052 return true
26053 }
26054
26055
26056 for b.Controls[0].Op == OpARM64LessThanF {
26057 v_0 := b.Controls[0]
26058 cc := v_0.Args[0]
26059 b.resetWithControl(BlockARM64FLT, cc)
26060 return true
26061 }
26062
26063
26064 for b.Controls[0].Op == OpARM64LessEqualF {
26065 v_0 := b.Controls[0]
26066 cc := v_0.Args[0]
26067 b.resetWithControl(BlockARM64FLE, cc)
26068 return true
26069 }
26070
26071
26072 for b.Controls[0].Op == OpARM64GreaterThanF {
26073 v_0 := b.Controls[0]
26074 cc := v_0.Args[0]
26075 b.resetWithControl(BlockARM64FGT, cc)
26076 return true
26077 }
26078
26079
26080 for b.Controls[0].Op == OpARM64GreaterEqualF {
26081 v_0 := b.Controls[0]
26082 cc := v_0.Args[0]
26083 b.resetWithControl(BlockARM64FGE, cc)
26084 return true
26085 }
26086
26087
26088
26089 for b.Controls[0].Op == OpARM64ANDconst {
26090 v_0 := b.Controls[0]
26091 c := auxIntToInt64(v_0.AuxInt)
26092 x := v_0.Args[0]
26093 if !(oneBit(c)) {
26094 break
26095 }
26096 b.resetWithControl(BlockARM64TBNZ, x)
26097 b.AuxInt = int64ToAuxInt(int64(ntz64(c)))
26098 return true
26099 }
26100
26101
26102 for b.Controls[0].Op == OpARM64MOVDconst {
26103 v_0 := b.Controls[0]
26104 if auxIntToInt64(v_0.AuxInt) != 0 {
26105 break
26106 }
26107 b.Reset(BlockFirst)
26108 b.swapSuccessors()
26109 return true
26110 }
26111
26112
26113
26114 for b.Controls[0].Op == OpARM64MOVDconst {
26115 v_0 := b.Controls[0]
26116 c := auxIntToInt64(v_0.AuxInt)
26117 if !(c != 0) {
26118 break
26119 }
26120 b.Reset(BlockFirst)
26121 return true
26122 }
26123 case BlockARM64NZW:
26124
26125
26126
26127 for b.Controls[0].Op == OpARM64ANDconst {
26128 v_0 := b.Controls[0]
26129 c := auxIntToInt64(v_0.AuxInt)
26130 x := v_0.Args[0]
26131 if !(oneBit(int64(uint32(c)))) {
26132 break
26133 }
26134 b.resetWithControl(BlockARM64TBNZ, x)
26135 b.AuxInt = int64ToAuxInt(int64(ntz64(int64(uint32(c)))))
26136 return true
26137 }
26138
26139
26140
26141 for b.Controls[0].Op == OpARM64MOVDconst {
26142 v_0 := b.Controls[0]
26143 c := auxIntToInt64(v_0.AuxInt)
26144 if !(int32(c) == 0) {
26145 break
26146 }
26147 b.Reset(BlockFirst)
26148 b.swapSuccessors()
26149 return true
26150 }
26151
26152
26153
26154 for b.Controls[0].Op == OpARM64MOVDconst {
26155 v_0 := b.Controls[0]
26156 c := auxIntToInt64(v_0.AuxInt)
26157 if !(int32(c) != 0) {
26158 break
26159 }
26160 b.Reset(BlockFirst)
26161 return true
26162 }
26163 case BlockARM64TBNZ:
26164
26165
26166 for b.Controls[0].Op == OpARM64Equal {
26167 v_0 := b.Controls[0]
26168 cc := v_0.Args[0]
26169 if auxIntToInt64(b.AuxInt) != 0 {
26170 break
26171 }
26172 b.resetWithControl(BlockARM64EQ, cc)
26173 return true
26174 }
26175
26176
26177 for b.Controls[0].Op == OpARM64NotEqual {
26178 v_0 := b.Controls[0]
26179 cc := v_0.Args[0]
26180 if auxIntToInt64(b.AuxInt) != 0 {
26181 break
26182 }
26183 b.resetWithControl(BlockARM64NE, cc)
26184 return true
26185 }
26186
26187
26188 for b.Controls[0].Op == OpARM64LessThan {
26189 v_0 := b.Controls[0]
26190 cc := v_0.Args[0]
26191 if auxIntToInt64(b.AuxInt) != 0 {
26192 break
26193 }
26194 b.resetWithControl(BlockARM64LT, cc)
26195 return true
26196 }
26197
26198
26199 for b.Controls[0].Op == OpARM64LessThanU {
26200 v_0 := b.Controls[0]
26201 cc := v_0.Args[0]
26202 if auxIntToInt64(b.AuxInt) != 0 {
26203 break
26204 }
26205 b.resetWithControl(BlockARM64ULT, cc)
26206 return true
26207 }
26208
26209
26210 for b.Controls[0].Op == OpARM64LessEqual {
26211 v_0 := b.Controls[0]
26212 cc := v_0.Args[0]
26213 if auxIntToInt64(b.AuxInt) != 0 {
26214 break
26215 }
26216 b.resetWithControl(BlockARM64LE, cc)
26217 return true
26218 }
26219
26220
26221 for b.Controls[0].Op == OpARM64LessEqualU {
26222 v_0 := b.Controls[0]
26223 cc := v_0.Args[0]
26224 if auxIntToInt64(b.AuxInt) != 0 {
26225 break
26226 }
26227 b.resetWithControl(BlockARM64ULE, cc)
26228 return true
26229 }
26230
26231
26232 for b.Controls[0].Op == OpARM64GreaterThan {
26233 v_0 := b.Controls[0]
26234 cc := v_0.Args[0]
26235 if auxIntToInt64(b.AuxInt) != 0 {
26236 break
26237 }
26238 b.resetWithControl(BlockARM64GT, cc)
26239 return true
26240 }
26241
26242
26243 for b.Controls[0].Op == OpARM64GreaterThanU {
26244 v_0 := b.Controls[0]
26245 cc := v_0.Args[0]
26246 if auxIntToInt64(b.AuxInt) != 0 {
26247 break
26248 }
26249 b.resetWithControl(BlockARM64UGT, cc)
26250 return true
26251 }
26252
26253
26254 for b.Controls[0].Op == OpARM64GreaterEqual {
26255 v_0 := b.Controls[0]
26256 cc := v_0.Args[0]
26257 if auxIntToInt64(b.AuxInt) != 0 {
26258 break
26259 }
26260 b.resetWithControl(BlockARM64GE, cc)
26261 return true
26262 }
26263
26264
26265 for b.Controls[0].Op == OpARM64GreaterEqualU {
26266 v_0 := b.Controls[0]
26267 cc := v_0.Args[0]
26268 if auxIntToInt64(b.AuxInt) != 0 {
26269 break
26270 }
26271 b.resetWithControl(BlockARM64UGE, cc)
26272 return true
26273 }
26274
26275
26276 for b.Controls[0].Op == OpARM64LessThanF {
26277 v_0 := b.Controls[0]
26278 cc := v_0.Args[0]
26279 if auxIntToInt64(b.AuxInt) != 0 {
26280 break
26281 }
26282 b.resetWithControl(BlockARM64FLT, cc)
26283 return true
26284 }
26285
26286
26287 for b.Controls[0].Op == OpARM64LessEqualF {
26288 v_0 := b.Controls[0]
26289 cc := v_0.Args[0]
26290 if auxIntToInt64(b.AuxInt) != 0 {
26291 break
26292 }
26293 b.resetWithControl(BlockARM64FLE, cc)
26294 return true
26295 }
26296
26297
26298 for b.Controls[0].Op == OpARM64GreaterThanF {
26299 v_0 := b.Controls[0]
26300 cc := v_0.Args[0]
26301 if auxIntToInt64(b.AuxInt) != 0 {
26302 break
26303 }
26304 b.resetWithControl(BlockARM64FGT, cc)
26305 return true
26306 }
26307
26308
26309 for b.Controls[0].Op == OpARM64GreaterEqualF {
26310 v_0 := b.Controls[0]
26311 cc := v_0.Args[0]
26312 if auxIntToInt64(b.AuxInt) != 0 {
26313 break
26314 }
26315 b.resetWithControl(BlockARM64FGE, cc)
26316 return true
26317 }
26318 case BlockARM64UGE:
26319
26320
26321
26322 for b.Controls[0].Op == OpARM64FlagConstant {
26323 v_0 := b.Controls[0]
26324 fc := auxIntToFlagConstant(v_0.AuxInt)
26325 if !(fc.uge()) {
26326 break
26327 }
26328 b.Reset(BlockFirst)
26329 return true
26330 }
26331
26332
26333
26334 for b.Controls[0].Op == OpARM64FlagConstant {
26335 v_0 := b.Controls[0]
26336 fc := auxIntToFlagConstant(v_0.AuxInt)
26337 if !(!fc.uge()) {
26338 break
26339 }
26340 b.Reset(BlockFirst)
26341 b.swapSuccessors()
26342 return true
26343 }
26344
26345
26346 for b.Controls[0].Op == OpARM64InvertFlags {
26347 v_0 := b.Controls[0]
26348 cmp := v_0.Args[0]
26349 b.resetWithControl(BlockARM64ULE, cmp)
26350 return true
26351 }
26352 case BlockARM64UGT:
26353
26354
26355
26356 for b.Controls[0].Op == OpARM64FlagConstant {
26357 v_0 := b.Controls[0]
26358 fc := auxIntToFlagConstant(v_0.AuxInt)
26359 if !(fc.ugt()) {
26360 break
26361 }
26362 b.Reset(BlockFirst)
26363 return true
26364 }
26365
26366
26367
26368 for b.Controls[0].Op == OpARM64FlagConstant {
26369 v_0 := b.Controls[0]
26370 fc := auxIntToFlagConstant(v_0.AuxInt)
26371 if !(!fc.ugt()) {
26372 break
26373 }
26374 b.Reset(BlockFirst)
26375 b.swapSuccessors()
26376 return true
26377 }
26378
26379
26380 for b.Controls[0].Op == OpARM64InvertFlags {
26381 v_0 := b.Controls[0]
26382 cmp := v_0.Args[0]
26383 b.resetWithControl(BlockARM64ULT, cmp)
26384 return true
26385 }
26386 case BlockARM64ULE:
26387
26388
26389
26390 for b.Controls[0].Op == OpARM64FlagConstant {
26391 v_0 := b.Controls[0]
26392 fc := auxIntToFlagConstant(v_0.AuxInt)
26393 if !(fc.ule()) {
26394 break
26395 }
26396 b.Reset(BlockFirst)
26397 return true
26398 }
26399
26400
26401
26402 for b.Controls[0].Op == OpARM64FlagConstant {
26403 v_0 := b.Controls[0]
26404 fc := auxIntToFlagConstant(v_0.AuxInt)
26405 if !(!fc.ule()) {
26406 break
26407 }
26408 b.Reset(BlockFirst)
26409 b.swapSuccessors()
26410 return true
26411 }
26412
26413
26414 for b.Controls[0].Op == OpARM64InvertFlags {
26415 v_0 := b.Controls[0]
26416 cmp := v_0.Args[0]
26417 b.resetWithControl(BlockARM64UGE, cmp)
26418 return true
26419 }
26420 case BlockARM64ULT:
26421
26422
26423
26424 for b.Controls[0].Op == OpARM64FlagConstant {
26425 v_0 := b.Controls[0]
26426 fc := auxIntToFlagConstant(v_0.AuxInt)
26427 if !(fc.ult()) {
26428 break
26429 }
26430 b.Reset(BlockFirst)
26431 return true
26432 }
26433
26434
26435
26436 for b.Controls[0].Op == OpARM64FlagConstant {
26437 v_0 := b.Controls[0]
26438 fc := auxIntToFlagConstant(v_0.AuxInt)
26439 if !(!fc.ult()) {
26440 break
26441 }
26442 b.Reset(BlockFirst)
26443 b.swapSuccessors()
26444 return true
26445 }
26446
26447
26448 for b.Controls[0].Op == OpARM64InvertFlags {
26449 v_0 := b.Controls[0]
26450 cmp := v_0.Args[0]
26451 b.resetWithControl(BlockARM64UGT, cmp)
26452 return true
26453 }
26454 case BlockARM64Z:
26455
26456
26457
26458 for b.Controls[0].Op == OpARM64ANDconst {
26459 v_0 := b.Controls[0]
26460 c := auxIntToInt64(v_0.AuxInt)
26461 x := v_0.Args[0]
26462 if !(oneBit(c)) {
26463 break
26464 }
26465 b.resetWithControl(BlockARM64TBZ, x)
26466 b.AuxInt = int64ToAuxInt(int64(ntz64(c)))
26467 return true
26468 }
26469
26470
26471 for b.Controls[0].Op == OpARM64MOVDconst {
26472 v_0 := b.Controls[0]
26473 if auxIntToInt64(v_0.AuxInt) != 0 {
26474 break
26475 }
26476 b.Reset(BlockFirst)
26477 return true
26478 }
26479
26480
26481
26482 for b.Controls[0].Op == OpARM64MOVDconst {
26483 v_0 := b.Controls[0]
26484 c := auxIntToInt64(v_0.AuxInt)
26485 if !(c != 0) {
26486 break
26487 }
26488 b.Reset(BlockFirst)
26489 b.swapSuccessors()
26490 return true
26491 }
26492 case BlockARM64ZW:
26493
26494
26495
26496 for b.Controls[0].Op == OpARM64ANDconst {
26497 v_0 := b.Controls[0]
26498 c := auxIntToInt64(v_0.AuxInt)
26499 x := v_0.Args[0]
26500 if !(oneBit(int64(uint32(c)))) {
26501 break
26502 }
26503 b.resetWithControl(BlockARM64TBZ, x)
26504 b.AuxInt = int64ToAuxInt(int64(ntz64(int64(uint32(c)))))
26505 return true
26506 }
26507
26508
26509
26510 for b.Controls[0].Op == OpARM64MOVDconst {
26511 v_0 := b.Controls[0]
26512 c := auxIntToInt64(v_0.AuxInt)
26513 if !(int32(c) == 0) {
26514 break
26515 }
26516 b.Reset(BlockFirst)
26517 return true
26518 }
26519
26520
26521
26522 for b.Controls[0].Op == OpARM64MOVDconst {
26523 v_0 := b.Controls[0]
26524 c := auxIntToInt64(v_0.AuxInt)
26525 if !(int32(c) != 0) {
26526 break
26527 }
26528 b.Reset(BlockFirst)
26529 b.swapSuccessors()
26530 return true
26531 }
26532 }
26533 return false
26534 }
26535
View as plain text