1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=mips-unknown-linux-gnu -mcpu=mips2 -relocation-model=pic | FileCheck %s \
3 ; RUN: -check-prefix=MIPS2
4 ; RUN: llc < %s -mtriple=mips-unknown-linux-gnu -mcpu=mips32 -relocation-model=pic | FileCheck %s \
5 ; RUN: -check-prefix=MIPS32
6 ; RUN: llc < %s -mtriple=mips-unknown-linux-gnu -mcpu=mips32r2 -relocation-model=pic | FileCheck %s \
7 ; RUN: -check-prefix=MIPS32R2
8 ; RUN: llc < %s -mtriple=mips-unknown-linux-gnu -mcpu=mips32r3 -relocation-model=pic | FileCheck %s \
9 ; RUN: -check-prefix=MIPS32R2
10 ; RUN: llc < %s -mtriple=mips-unknown-linux-gnu -mcpu=mips32r5 -relocation-model=pic | FileCheck %s \
11 ; RUN: -check-prefix=MIPS32R2
12 ; RUN: llc < %s -mtriple=mips-unknown-linux-gnu -mcpu=mips32r6 -relocation-model=pic | FileCheck %s \
13 ; RUN: -check-prefix=MIPS32R6
14 ; RUN: llc < %s -mtriple=mips64-unknown-linux-gnu -mcpu=mips3 -relocation-model=pic | FileCheck %s \
15 ; RUN: -check-prefix=MIPS3
16 ; RUN: llc < %s -mtriple=mips64-unknown-linux-gnu -mcpu=mips4 -relocation-model=pic | FileCheck %s \
17 ; RUN: -check-prefix=MIPS4
18 ; RUN: llc < %s -mtriple=mips64-unknown-linux-gnu -mcpu=mips64 -relocation-model=pic | FileCheck %s \
19 ; RUN: -check-prefix=MIPS64
20 ; RUN: llc < %s -mtriple=mips64-unknown-linux-gnu -mcpu=mips64r2 -relocation-model=pic | FileCheck %s \
21 ; RUN: -check-prefix=MIPS64R2
22 ; RUN: llc < %s -mtriple=mips64-unknown-linux-gnu -mcpu=mips64r3 -relocation-model=pic | FileCheck %s \
23 ; RUN: -check-prefix=MIPS64R2
24 ; RUN: llc < %s -mtriple=mips64-unknown-linux-gnu -mcpu=mips64r5 -relocation-model=pic | FileCheck %s \
25 ; RUN: -check-prefix=MIPS64R2
26 ; RUN: llc < %s -mtriple=mips64-unknown-linux-gnu -mcpu=mips64r6 -relocation-model=pic | FileCheck %s \
27 ; RUN: -check-prefix=MIPS64R6
28 ; RUN: llc < %s -mtriple=mips-unknown-linux-gnu -mcpu=mips32r3 -mattr=+micromips -relocation-model=pic | FileCheck %s \
29 ; RUN: -check-prefix=MMR3
30 ; RUN: llc < %s -mtriple=mips-unknown-linux-gnu -mcpu=mips32r6 -mattr=+micromips -relocation-model=pic | FileCheck %s \
31 ; RUN: -check-prefix=MMR6
33 define signext i1 @lshr_i1(i1 signext %a, i1 signext %b) {
34 ; MIPS2-LABEL: lshr_i1:
35 ; MIPS2: # %bb.0: # %entry
37 ; MIPS2-NEXT: move $2, $4
39 ; MIPS32-LABEL: lshr_i1:
40 ; MIPS32: # %bb.0: # %entry
42 ; MIPS32-NEXT: move $2, $4
44 ; MIPS32R2-LABEL: lshr_i1:
45 ; MIPS32R2: # %bb.0: # %entry
46 ; MIPS32R2-NEXT: jr $ra
47 ; MIPS32R2-NEXT: move $2, $4
49 ; MIPS32R6-LABEL: lshr_i1:
50 ; MIPS32R6: # %bb.0: # %entry
51 ; MIPS32R6-NEXT: jr $ra
52 ; MIPS32R6-NEXT: move $2, $4
54 ; MIPS3-LABEL: lshr_i1:
55 ; MIPS3: # %bb.0: # %entry
57 ; MIPS3-NEXT: move $2, $4
59 ; MIPS4-LABEL: lshr_i1:
60 ; MIPS4: # %bb.0: # %entry
62 ; MIPS4-NEXT: move $2, $4
64 ; MIPS64-LABEL: lshr_i1:
65 ; MIPS64: # %bb.0: # %entry
67 ; MIPS64-NEXT: move $2, $4
69 ; MIPS64R2-LABEL: lshr_i1:
70 ; MIPS64R2: # %bb.0: # %entry
71 ; MIPS64R2-NEXT: jr $ra
72 ; MIPS64R2-NEXT: move $2, $4
74 ; MIPS64R6-LABEL: lshr_i1:
75 ; MIPS64R6: # %bb.0: # %entry
76 ; MIPS64R6-NEXT: jr $ra
77 ; MIPS64R6-NEXT: move $2, $4
79 ; MMR3-LABEL: lshr_i1:
80 ; MMR3: # %bb.0: # %entry
81 ; MMR3-NEXT: move $2, $4
84 ; MMR6-LABEL: lshr_i1:
85 ; MMR6: # %bb.0: # %entry
86 ; MMR6-NEXT: move $2, $4
94 define zeroext i8 @lshr_i8(i8 zeroext %a, i8 zeroext %b) {
95 ; MIPS2-LABEL: lshr_i8:
96 ; MIPS2: # %bb.0: # %entry
97 ; MIPS2-NEXT: srlv $1, $4, $5
99 ; MIPS2-NEXT: andi $2, $1, 255
101 ; MIPS32-LABEL: lshr_i8:
102 ; MIPS32: # %bb.0: # %entry
103 ; MIPS32-NEXT: srlv $1, $4, $5
104 ; MIPS32-NEXT: jr $ra
105 ; MIPS32-NEXT: andi $2, $1, 255
107 ; MIPS32R2-LABEL: lshr_i8:
108 ; MIPS32R2: # %bb.0: # %entry
109 ; MIPS32R2-NEXT: srlv $1, $4, $5
110 ; MIPS32R2-NEXT: jr $ra
111 ; MIPS32R2-NEXT: andi $2, $1, 255
113 ; MIPS32R6-LABEL: lshr_i8:
114 ; MIPS32R6: # %bb.0: # %entry
115 ; MIPS32R6-NEXT: srlv $1, $4, $5
116 ; MIPS32R6-NEXT: jr $ra
117 ; MIPS32R6-NEXT: andi $2, $1, 255
119 ; MIPS3-LABEL: lshr_i8:
120 ; MIPS3: # %bb.0: # %entry
121 ; MIPS3-NEXT: srlv $1, $4, $5
123 ; MIPS3-NEXT: andi $2, $1, 255
125 ; MIPS4-LABEL: lshr_i8:
126 ; MIPS4: # %bb.0: # %entry
127 ; MIPS4-NEXT: srlv $1, $4, $5
129 ; MIPS4-NEXT: andi $2, $1, 255
131 ; MIPS64-LABEL: lshr_i8:
132 ; MIPS64: # %bb.0: # %entry
133 ; MIPS64-NEXT: srlv $1, $4, $5
134 ; MIPS64-NEXT: jr $ra
135 ; MIPS64-NEXT: andi $2, $1, 255
137 ; MIPS64R2-LABEL: lshr_i8:
138 ; MIPS64R2: # %bb.0: # %entry
139 ; MIPS64R2-NEXT: srlv $1, $4, $5
140 ; MIPS64R2-NEXT: jr $ra
141 ; MIPS64R2-NEXT: andi $2, $1, 255
143 ; MIPS64R6-LABEL: lshr_i8:
144 ; MIPS64R6: # %bb.0: # %entry
145 ; MIPS64R6-NEXT: srlv $1, $4, $5
146 ; MIPS64R6-NEXT: jr $ra
147 ; MIPS64R6-NEXT: andi $2, $1, 255
149 ; MMR3-LABEL: lshr_i8:
150 ; MMR3: # %bb.0: # %entry
151 ; MMR3-NEXT: srlv $2, $4, $5
152 ; MMR3-NEXT: andi16 $2, $2, 255
155 ; MMR6-LABEL: lshr_i8:
156 ; MMR6: # %bb.0: # %entry
157 ; MMR6-NEXT: srlv $2, $4, $5
158 ; MMR6-NEXT: andi16 $2, $2, 255
166 define zeroext i16 @lshr_i16(i16 zeroext %a, i16 zeroext %b) {
167 ; MIPS2-LABEL: lshr_i16:
168 ; MIPS2: # %bb.0: # %entry
169 ; MIPS2-NEXT: srlv $1, $4, $5
171 ; MIPS2-NEXT: andi $2, $1, 65535
173 ; MIPS32-LABEL: lshr_i16:
174 ; MIPS32: # %bb.0: # %entry
175 ; MIPS32-NEXT: srlv $1, $4, $5
176 ; MIPS32-NEXT: jr $ra
177 ; MIPS32-NEXT: andi $2, $1, 65535
179 ; MIPS32R2-LABEL: lshr_i16:
180 ; MIPS32R2: # %bb.0: # %entry
181 ; MIPS32R2-NEXT: srlv $1, $4, $5
182 ; MIPS32R2-NEXT: jr $ra
183 ; MIPS32R2-NEXT: andi $2, $1, 65535
185 ; MIPS32R6-LABEL: lshr_i16:
186 ; MIPS32R6: # %bb.0: # %entry
187 ; MIPS32R6-NEXT: srlv $1, $4, $5
188 ; MIPS32R6-NEXT: jr $ra
189 ; MIPS32R6-NEXT: andi $2, $1, 65535
191 ; MIPS3-LABEL: lshr_i16:
192 ; MIPS3: # %bb.0: # %entry
193 ; MIPS3-NEXT: srlv $1, $4, $5
195 ; MIPS3-NEXT: andi $2, $1, 65535
197 ; MIPS4-LABEL: lshr_i16:
198 ; MIPS4: # %bb.0: # %entry
199 ; MIPS4-NEXT: srlv $1, $4, $5
201 ; MIPS4-NEXT: andi $2, $1, 65535
203 ; MIPS64-LABEL: lshr_i16:
204 ; MIPS64: # %bb.0: # %entry
205 ; MIPS64-NEXT: srlv $1, $4, $5
206 ; MIPS64-NEXT: jr $ra
207 ; MIPS64-NEXT: andi $2, $1, 65535
209 ; MIPS64R2-LABEL: lshr_i16:
210 ; MIPS64R2: # %bb.0: # %entry
211 ; MIPS64R2-NEXT: srlv $1, $4, $5
212 ; MIPS64R2-NEXT: jr $ra
213 ; MIPS64R2-NEXT: andi $2, $1, 65535
215 ; MIPS64R6-LABEL: lshr_i16:
216 ; MIPS64R6: # %bb.0: # %entry
217 ; MIPS64R6-NEXT: srlv $1, $4, $5
218 ; MIPS64R6-NEXT: jr $ra
219 ; MIPS64R6-NEXT: andi $2, $1, 65535
221 ; MMR3-LABEL: lshr_i16:
222 ; MMR3: # %bb.0: # %entry
223 ; MMR3-NEXT: srlv $2, $4, $5
224 ; MMR3-NEXT: andi16 $2, $2, 65535
227 ; MMR6-LABEL: lshr_i16:
228 ; MMR6: # %bb.0: # %entry
229 ; MMR6-NEXT: srlv $2, $4, $5
230 ; MMR6-NEXT: andi16 $2, $2, 65535
238 define signext i32 @lshr_i32(i32 signext %a, i32 signext %b) {
239 ; MIPS2-LABEL: lshr_i32:
240 ; MIPS2: # %bb.0: # %entry
242 ; MIPS2-NEXT: srlv $2, $4, $5
244 ; MIPS32-LABEL: lshr_i32:
245 ; MIPS32: # %bb.0: # %entry
246 ; MIPS32-NEXT: jr $ra
247 ; MIPS32-NEXT: srlv $2, $4, $5
249 ; MIPS32R2-LABEL: lshr_i32:
250 ; MIPS32R2: # %bb.0: # %entry
251 ; MIPS32R2-NEXT: jr $ra
252 ; MIPS32R2-NEXT: srlv $2, $4, $5
254 ; MIPS32R6-LABEL: lshr_i32:
255 ; MIPS32R6: # %bb.0: # %entry
256 ; MIPS32R6-NEXT: jr $ra
257 ; MIPS32R6-NEXT: srlv $2, $4, $5
259 ; MIPS3-LABEL: lshr_i32:
260 ; MIPS3: # %bb.0: # %entry
262 ; MIPS3-NEXT: srlv $2, $4, $5
264 ; MIPS4-LABEL: lshr_i32:
265 ; MIPS4: # %bb.0: # %entry
267 ; MIPS4-NEXT: srlv $2, $4, $5
269 ; MIPS64-LABEL: lshr_i32:
270 ; MIPS64: # %bb.0: # %entry
271 ; MIPS64-NEXT: jr $ra
272 ; MIPS64-NEXT: srlv $2, $4, $5
274 ; MIPS64R2-LABEL: lshr_i32:
275 ; MIPS64R2: # %bb.0: # %entry
276 ; MIPS64R2-NEXT: jr $ra
277 ; MIPS64R2-NEXT: srlv $2, $4, $5
279 ; MIPS64R6-LABEL: lshr_i32:
280 ; MIPS64R6: # %bb.0: # %entry
281 ; MIPS64R6-NEXT: jr $ra
282 ; MIPS64R6-NEXT: srlv $2, $4, $5
284 ; MMR3-LABEL: lshr_i32:
285 ; MMR3: # %bb.0: # %entry
287 ; MMR3-NEXT: srlv $2, $4, $5
289 ; MMR6-LABEL: lshr_i32:
290 ; MMR6: # %bb.0: # %entry
291 ; MMR6-NEXT: srlv $2, $4, $5
299 define signext i64 @lshr_i64(i64 signext %a, i64 signext %b) {
300 ; MIPS2-LABEL: lshr_i64:
302 ; MIPS2-NEXT: srlv $6, $4, $7
303 ; MIPS2-NEXT: andi $1, $7, 32
304 ; MIPS2-NEXT: bnez $1, $BB4_2
305 ; MIPS2-NEXT: addiu $2, $zero, 0
306 ; MIPS2-NEXT: # %bb.1:
307 ; MIPS2-NEXT: srlv $1, $5, $7
308 ; MIPS2-NEXT: not $2, $7
309 ; MIPS2-NEXT: sll $3, $4, 1
310 ; MIPS2-NEXT: sllv $2, $3, $2
311 ; MIPS2-NEXT: or $3, $2, $1
313 ; MIPS2-NEXT: move $2, $6
314 ; MIPS2-NEXT: $BB4_2:
316 ; MIPS2-NEXT: move $3, $6
318 ; MIPS32-LABEL: lshr_i64:
319 ; MIPS32: # %bb.0: # %entry
320 ; MIPS32-NEXT: srlv $1, $5, $7
321 ; MIPS32-NEXT: not $2, $7
322 ; MIPS32-NEXT: sll $3, $4, 1
323 ; MIPS32-NEXT: sllv $2, $3, $2
324 ; MIPS32-NEXT: or $3, $2, $1
325 ; MIPS32-NEXT: srlv $2, $4, $7
326 ; MIPS32-NEXT: andi $1, $7, 32
327 ; MIPS32-NEXT: movn $3, $2, $1
328 ; MIPS32-NEXT: jr $ra
329 ; MIPS32-NEXT: movn $2, $zero, $1
331 ; MIPS32R2-LABEL: lshr_i64:
332 ; MIPS32R2: # %bb.0: # %entry
333 ; MIPS32R2-NEXT: srlv $1, $5, $7
334 ; MIPS32R2-NEXT: not $2, $7
335 ; MIPS32R2-NEXT: sll $3, $4, 1
336 ; MIPS32R2-NEXT: sllv $2, $3, $2
337 ; MIPS32R2-NEXT: or $3, $2, $1
338 ; MIPS32R2-NEXT: srlv $2, $4, $7
339 ; MIPS32R2-NEXT: andi $1, $7, 32
340 ; MIPS32R2-NEXT: movn $3, $2, $1
341 ; MIPS32R2-NEXT: jr $ra
342 ; MIPS32R2-NEXT: movn $2, $zero, $1
344 ; MIPS32R6-LABEL: lshr_i64:
345 ; MIPS32R6: # %bb.0: # %entry
346 ; MIPS32R6-NEXT: srlv $1, $5, $7
347 ; MIPS32R6-NEXT: not $2, $7
348 ; MIPS32R6-NEXT: sll $3, $4, 1
349 ; MIPS32R6-NEXT: sllv $2, $3, $2
350 ; MIPS32R6-NEXT: or $1, $2, $1
351 ; MIPS32R6-NEXT: andi $2, $7, 32
352 ; MIPS32R6-NEXT: seleqz $1, $1, $2
353 ; MIPS32R6-NEXT: srlv $4, $4, $7
354 ; MIPS32R6-NEXT: selnez $3, $4, $2
355 ; MIPS32R6-NEXT: or $3, $3, $1
356 ; MIPS32R6-NEXT: jr $ra
357 ; MIPS32R6-NEXT: seleqz $2, $4, $2
359 ; MIPS3-LABEL: lshr_i64:
360 ; MIPS3: # %bb.0: # %entry
362 ; MIPS3-NEXT: dsrlv $2, $4, $5
364 ; MIPS4-LABEL: lshr_i64:
365 ; MIPS4: # %bb.0: # %entry
367 ; MIPS4-NEXT: dsrlv $2, $4, $5
369 ; MIPS64-LABEL: lshr_i64:
370 ; MIPS64: # %bb.0: # %entry
371 ; MIPS64-NEXT: jr $ra
372 ; MIPS64-NEXT: dsrlv $2, $4, $5
374 ; MIPS64R2-LABEL: lshr_i64:
375 ; MIPS64R2: # %bb.0: # %entry
376 ; MIPS64R2-NEXT: jr $ra
377 ; MIPS64R2-NEXT: dsrlv $2, $4, $5
379 ; MIPS64R6-LABEL: lshr_i64:
380 ; MIPS64R6: # %bb.0: # %entry
381 ; MIPS64R6-NEXT: jr $ra
382 ; MIPS64R6-NEXT: dsrlv $2, $4, $5
384 ; MMR3-LABEL: lshr_i64:
385 ; MMR3: # %bb.0: # %entry
386 ; MMR3-NEXT: srlv $2, $5, $7
387 ; MMR3-NEXT: not16 $3, $7
388 ; MMR3-NEXT: sll16 $5, $4, 1
389 ; MMR3-NEXT: sllv $3, $5, $3
390 ; MMR3-NEXT: or16 $3, $2
391 ; MMR3-NEXT: srlv $2, $4, $7
392 ; MMR3-NEXT: andi16 $4, $7, 32
393 ; MMR3-NEXT: movn $3, $2, $4
394 ; MMR3-NEXT: li16 $5, 0
396 ; MMR3-NEXT: movn $2, $5, $4
398 ; MMR6-LABEL: lshr_i64:
399 ; MMR6: # %bb.0: # %entry
400 ; MMR6-NEXT: srlv $1, $5, $7
401 ; MMR6-NEXT: not16 $2, $7
402 ; MMR6-NEXT: sll16 $3, $4, 1
403 ; MMR6-NEXT: sllv $2, $3, $2
404 ; MMR6-NEXT: or $1, $2, $1
405 ; MMR6-NEXT: andi16 $2, $7, 32
406 ; MMR6-NEXT: seleqz $1, $1, $2
407 ; MMR6-NEXT: srlv $4, $4, $7
408 ; MMR6-NEXT: selnez $3, $4, $2
409 ; MMR6-NEXT: or $3, $3, $1
410 ; MMR6-NEXT: seleqz $2, $4, $2
418 define signext i128 @lshr_i128(i128 signext %a, i128 signext %b) {
419 ; MIPS2-LABEL: lshr_i128:
421 ; MIPS2-NEXT: lw $2, 28($sp)
422 ; MIPS2-NEXT: addiu $1, $zero, 64
423 ; MIPS2-NEXT: subu $12, $1, $2
424 ; MIPS2-NEXT: sllv $10, $5, $12
425 ; MIPS2-NEXT: andi $15, $12, 32
426 ; MIPS2-NEXT: andi $8, $2, 32
427 ; MIPS2-NEXT: addiu $3, $zero, 0
428 ; MIPS2-NEXT: bnez $15, $BB5_2
429 ; MIPS2-NEXT: addiu $13, $zero, 0
430 ; MIPS2-NEXT: # %bb.1:
431 ; MIPS2-NEXT: move $13, $10
432 ; MIPS2-NEXT: $BB5_2:
433 ; MIPS2-NEXT: not $9, $2
434 ; MIPS2-NEXT: bnez $8, $BB5_5
435 ; MIPS2-NEXT: srlv $24, $6, $2
436 ; MIPS2-NEXT: # %bb.3:
437 ; MIPS2-NEXT: sll $1, $6, 1
438 ; MIPS2-NEXT: srlv $11, $7, $2
439 ; MIPS2-NEXT: sllv $1, $1, $9
440 ; MIPS2-NEXT: or $14, $1, $11
441 ; MIPS2-NEXT: bnez $15, $BB5_7
442 ; MIPS2-NEXT: move $11, $24
443 ; MIPS2-NEXT: # %bb.4:
444 ; MIPS2-NEXT: b $BB5_6
446 ; MIPS2-NEXT: $BB5_5:
447 ; MIPS2-NEXT: addiu $11, $zero, 0
448 ; MIPS2-NEXT: bnez $15, $BB5_7
449 ; MIPS2-NEXT: move $14, $24
450 ; MIPS2-NEXT: $BB5_6:
451 ; MIPS2-NEXT: sllv $1, $4, $12
452 ; MIPS2-NEXT: not $10, $12
453 ; MIPS2-NEXT: srl $12, $5, 1
454 ; MIPS2-NEXT: srlv $10, $12, $10
455 ; MIPS2-NEXT: or $10, $1, $10
456 ; MIPS2-NEXT: $BB5_7:
457 ; MIPS2-NEXT: addiu $15, $2, -64
458 ; MIPS2-NEXT: sll $12, $4, 1
459 ; MIPS2-NEXT: andi $1, $15, 32
460 ; MIPS2-NEXT: bnez $1, $BB5_10
461 ; MIPS2-NEXT: srlv $25, $4, $15
462 ; MIPS2-NEXT: # %bb.8:
463 ; MIPS2-NEXT: srlv $1, $5, $15
464 ; MIPS2-NEXT: not $15, $15
465 ; MIPS2-NEXT: sllv $15, $12, $15
466 ; MIPS2-NEXT: or $24, $15, $1
467 ; MIPS2-NEXT: move $15, $25
468 ; MIPS2-NEXT: sltiu $25, $2, 64
469 ; MIPS2-NEXT: beqz $25, $BB5_12
471 ; MIPS2-NEXT: # %bb.9:
472 ; MIPS2-NEXT: b $BB5_11
474 ; MIPS2-NEXT: $BB5_10:
475 ; MIPS2-NEXT: move $24, $25
476 ; MIPS2-NEXT: sltiu $25, $2, 64
477 ; MIPS2-NEXT: beqz $25, $BB5_12
478 ; MIPS2-NEXT: addiu $15, $zero, 0
479 ; MIPS2-NEXT: $BB5_11:
480 ; MIPS2-NEXT: or $24, $14, $13
481 ; MIPS2-NEXT: $BB5_12:
482 ; MIPS2-NEXT: sltiu $13, $2, 1
483 ; MIPS2-NEXT: beqz $13, $BB5_19
485 ; MIPS2-NEXT: # %bb.13:
486 ; MIPS2-NEXT: bnez $25, $BB5_20
488 ; MIPS2-NEXT: $BB5_14:
489 ; MIPS2-NEXT: bnez $13, $BB5_16
490 ; MIPS2-NEXT: addiu $10, $zero, 63
491 ; MIPS2-NEXT: $BB5_15:
492 ; MIPS2-NEXT: move $6, $15
493 ; MIPS2-NEXT: $BB5_16:
494 ; MIPS2-NEXT: sltu $10, $10, $2
495 ; MIPS2-NEXT: bnez $8, $BB5_22
496 ; MIPS2-NEXT: srlv $11, $4, $2
497 ; MIPS2-NEXT: # %bb.17:
498 ; MIPS2-NEXT: srlv $1, $5, $2
499 ; MIPS2-NEXT: sllv $2, $12, $9
500 ; MIPS2-NEXT: or $4, $2, $1
501 ; MIPS2-NEXT: move $5, $11
502 ; MIPS2-NEXT: bnez $10, $BB5_24
503 ; MIPS2-NEXT: addiu $2, $zero, 0
504 ; MIPS2-NEXT: # %bb.18:
505 ; MIPS2-NEXT: b $BB5_23
507 ; MIPS2-NEXT: $BB5_19:
508 ; MIPS2-NEXT: beqz $25, $BB5_14
509 ; MIPS2-NEXT: move $7, $24
510 ; MIPS2-NEXT: $BB5_20:
511 ; MIPS2-NEXT: or $15, $11, $10
512 ; MIPS2-NEXT: bnez $13, $BB5_16
513 ; MIPS2-NEXT: addiu $10, $zero, 63
514 ; MIPS2-NEXT: # %bb.21:
515 ; MIPS2-NEXT: b $BB5_15
517 ; MIPS2-NEXT: $BB5_22:
518 ; MIPS2-NEXT: addiu $5, $zero, 0
519 ; MIPS2-NEXT: move $4, $11
520 ; MIPS2-NEXT: bnez $10, $BB5_24
521 ; MIPS2-NEXT: addiu $2, $zero, 0
522 ; MIPS2-NEXT: $BB5_23:
523 ; MIPS2-NEXT: move $2, $5
524 ; MIPS2-NEXT: $BB5_24:
525 ; MIPS2-NEXT: bnez $10, $BB5_26
527 ; MIPS2-NEXT: # %bb.25:
528 ; MIPS2-NEXT: move $3, $4
529 ; MIPS2-NEXT: $BB5_26:
530 ; MIPS2-NEXT: move $4, $6
532 ; MIPS2-NEXT: move $5, $7
534 ; MIPS32-LABEL: lshr_i128:
535 ; MIPS32: # %bb.0: # %entry
536 ; MIPS32-NEXT: lw $9, 28($sp)
537 ; MIPS32-NEXT: addiu $1, $zero, 64
538 ; MIPS32-NEXT: subu $2, $1, $9
539 ; MIPS32-NEXT: sllv $10, $5, $2
540 ; MIPS32-NEXT: andi $11, $2, 32
541 ; MIPS32-NEXT: move $1, $10
542 ; MIPS32-NEXT: movn $1, $zero, $11
543 ; MIPS32-NEXT: srlv $3, $7, $9
544 ; MIPS32-NEXT: not $12, $9
545 ; MIPS32-NEXT: sll $8, $6, 1
546 ; MIPS32-NEXT: sllv $8, $8, $12
547 ; MIPS32-NEXT: or $3, $8, $3
548 ; MIPS32-NEXT: srlv $13, $6, $9
549 ; MIPS32-NEXT: andi $14, $9, 32
550 ; MIPS32-NEXT: movn $3, $13, $14
551 ; MIPS32-NEXT: addiu $15, $9, -64
552 ; MIPS32-NEXT: or $3, $3, $1
553 ; MIPS32-NEXT: srlv $1, $5, $15
554 ; MIPS32-NEXT: sll $24, $4, 1
555 ; MIPS32-NEXT: not $8, $15
556 ; MIPS32-NEXT: sllv $8, $24, $8
557 ; MIPS32-NEXT: or $1, $8, $1
558 ; MIPS32-NEXT: srlv $8, $4, $15
559 ; MIPS32-NEXT: andi $15, $15, 32
560 ; MIPS32-NEXT: movn $1, $8, $15
561 ; MIPS32-NEXT: sltiu $25, $9, 64
562 ; MIPS32-NEXT: movn $1, $3, $25
563 ; MIPS32-NEXT: sllv $3, $4, $2
564 ; MIPS32-NEXT: not $2, $2
565 ; MIPS32-NEXT: srl $gp, $5, 1
566 ; MIPS32-NEXT: srlv $2, $gp, $2
567 ; MIPS32-NEXT: or $gp, $3, $2
568 ; MIPS32-NEXT: srlv $2, $5, $9
569 ; MIPS32-NEXT: sllv $3, $24, $12
570 ; MIPS32-NEXT: or $3, $3, $2
571 ; MIPS32-NEXT: srlv $2, $4, $9
572 ; MIPS32-NEXT: movn $3, $2, $14
573 ; MIPS32-NEXT: movz $1, $7, $9
574 ; MIPS32-NEXT: movz $3, $zero, $25
575 ; MIPS32-NEXT: movn $gp, $10, $11
576 ; MIPS32-NEXT: movn $13, $zero, $14
577 ; MIPS32-NEXT: or $4, $13, $gp
578 ; MIPS32-NEXT: movn $8, $zero, $15
579 ; MIPS32-NEXT: movn $8, $4, $25
580 ; MIPS32-NEXT: movz $8, $6, $9
581 ; MIPS32-NEXT: movn $2, $zero, $14
582 ; MIPS32-NEXT: movz $2, $zero, $25
583 ; MIPS32-NEXT: move $4, $8
584 ; MIPS32-NEXT: jr $ra
585 ; MIPS32-NEXT: move $5, $1
587 ; MIPS32R2-LABEL: lshr_i128:
588 ; MIPS32R2: # %bb.0: # %entry
589 ; MIPS32R2-NEXT: lw $9, 28($sp)
590 ; MIPS32R2-NEXT: addiu $1, $zero, 64
591 ; MIPS32R2-NEXT: subu $2, $1, $9
592 ; MIPS32R2-NEXT: sllv $10, $5, $2
593 ; MIPS32R2-NEXT: andi $11, $2, 32
594 ; MIPS32R2-NEXT: move $1, $10
595 ; MIPS32R2-NEXT: movn $1, $zero, $11
596 ; MIPS32R2-NEXT: srlv $3, $7, $9
597 ; MIPS32R2-NEXT: not $12, $9
598 ; MIPS32R2-NEXT: sll $8, $6, 1
599 ; MIPS32R2-NEXT: sllv $8, $8, $12
600 ; MIPS32R2-NEXT: or $3, $8, $3
601 ; MIPS32R2-NEXT: srlv $13, $6, $9
602 ; MIPS32R2-NEXT: andi $14, $9, 32
603 ; MIPS32R2-NEXT: movn $3, $13, $14
604 ; MIPS32R2-NEXT: addiu $15, $9, -64
605 ; MIPS32R2-NEXT: or $3, $3, $1
606 ; MIPS32R2-NEXT: srlv $1, $5, $15
607 ; MIPS32R2-NEXT: sll $24, $4, 1
608 ; MIPS32R2-NEXT: not $8, $15
609 ; MIPS32R2-NEXT: sllv $8, $24, $8
610 ; MIPS32R2-NEXT: or $1, $8, $1
611 ; MIPS32R2-NEXT: srlv $8, $4, $15
612 ; MIPS32R2-NEXT: andi $15, $15, 32
613 ; MIPS32R2-NEXT: movn $1, $8, $15
614 ; MIPS32R2-NEXT: sltiu $25, $9, 64
615 ; MIPS32R2-NEXT: movn $1, $3, $25
616 ; MIPS32R2-NEXT: sllv $3, $4, $2
617 ; MIPS32R2-NEXT: not $2, $2
618 ; MIPS32R2-NEXT: srl $gp, $5, 1
619 ; MIPS32R2-NEXT: srlv $2, $gp, $2
620 ; MIPS32R2-NEXT: or $gp, $3, $2
621 ; MIPS32R2-NEXT: srlv $2, $5, $9
622 ; MIPS32R2-NEXT: sllv $3, $24, $12
623 ; MIPS32R2-NEXT: or $3, $3, $2
624 ; MIPS32R2-NEXT: srlv $2, $4, $9
625 ; MIPS32R2-NEXT: movn $3, $2, $14
626 ; MIPS32R2-NEXT: movz $1, $7, $9
627 ; MIPS32R2-NEXT: movz $3, $zero, $25
628 ; MIPS32R2-NEXT: movn $gp, $10, $11
629 ; MIPS32R2-NEXT: movn $13, $zero, $14
630 ; MIPS32R2-NEXT: or $4, $13, $gp
631 ; MIPS32R2-NEXT: movn $8, $zero, $15
632 ; MIPS32R2-NEXT: movn $8, $4, $25
633 ; MIPS32R2-NEXT: movz $8, $6, $9
634 ; MIPS32R2-NEXT: movn $2, $zero, $14
635 ; MIPS32R2-NEXT: movz $2, $zero, $25
636 ; MIPS32R2-NEXT: move $4, $8
637 ; MIPS32R2-NEXT: jr $ra
638 ; MIPS32R2-NEXT: move $5, $1
640 ; MIPS32R6-LABEL: lshr_i128:
641 ; MIPS32R6: # %bb.0: # %entry
642 ; MIPS32R6-NEXT: addiu $sp, $sp, -8
643 ; MIPS32R6-NEXT: .cfi_def_cfa_offset 8
644 ; MIPS32R6-NEXT: sw $16, 4($sp) # 4-byte Folded Spill
645 ; MIPS32R6-NEXT: .cfi_offset 16, -4
646 ; MIPS32R6-NEXT: lw $1, 36($sp)
647 ; MIPS32R6-NEXT: srlv $2, $7, $1
648 ; MIPS32R6-NEXT: not $3, $1
649 ; MIPS32R6-NEXT: sll $8, $6, 1
650 ; MIPS32R6-NEXT: sllv $8, $8, $3
651 ; MIPS32R6-NEXT: or $2, $8, $2
652 ; MIPS32R6-NEXT: addiu $8, $1, -64
653 ; MIPS32R6-NEXT: srlv $9, $5, $8
654 ; MIPS32R6-NEXT: sll $10, $4, 1
655 ; MIPS32R6-NEXT: not $11, $8
656 ; MIPS32R6-NEXT: sllv $11, $10, $11
657 ; MIPS32R6-NEXT: andi $12, $1, 32
658 ; MIPS32R6-NEXT: seleqz $2, $2, $12
659 ; MIPS32R6-NEXT: or $9, $11, $9
660 ; MIPS32R6-NEXT: srlv $11, $6, $1
661 ; MIPS32R6-NEXT: selnez $13, $11, $12
662 ; MIPS32R6-NEXT: addiu $14, $zero, 64
663 ; MIPS32R6-NEXT: subu $14, $14, $1
664 ; MIPS32R6-NEXT: sllv $15, $5, $14
665 ; MIPS32R6-NEXT: andi $24, $14, 32
666 ; MIPS32R6-NEXT: andi $25, $8, 32
667 ; MIPS32R6-NEXT: seleqz $9, $9, $25
668 ; MIPS32R6-NEXT: seleqz $gp, $15, $24
669 ; MIPS32R6-NEXT: or $2, $13, $2
670 ; MIPS32R6-NEXT: selnez $13, $15, $24
671 ; MIPS32R6-NEXT: sllv $15, $4, $14
672 ; MIPS32R6-NEXT: not $14, $14
673 ; MIPS32R6-NEXT: srl $16, $5, 1
674 ; MIPS32R6-NEXT: srlv $14, $16, $14
675 ; MIPS32R6-NEXT: or $14, $15, $14
676 ; MIPS32R6-NEXT: seleqz $14, $14, $24
677 ; MIPS32R6-NEXT: srlv $8, $4, $8
678 ; MIPS32R6-NEXT: or $13, $13, $14
679 ; MIPS32R6-NEXT: or $2, $2, $gp
680 ; MIPS32R6-NEXT: srlv $5, $5, $1
681 ; MIPS32R6-NEXT: selnez $14, $8, $25
682 ; MIPS32R6-NEXT: sltiu $15, $1, 64
683 ; MIPS32R6-NEXT: selnez $2, $2, $15
684 ; MIPS32R6-NEXT: or $9, $14, $9
685 ; MIPS32R6-NEXT: sllv $3, $10, $3
686 ; MIPS32R6-NEXT: seleqz $10, $11, $12
687 ; MIPS32R6-NEXT: or $10, $10, $13
688 ; MIPS32R6-NEXT: or $3, $3, $5
689 ; MIPS32R6-NEXT: seleqz $5, $9, $15
690 ; MIPS32R6-NEXT: seleqz $9, $zero, $15
691 ; MIPS32R6-NEXT: srlv $4, $4, $1
692 ; MIPS32R6-NEXT: seleqz $11, $4, $12
693 ; MIPS32R6-NEXT: selnez $11, $11, $15
694 ; MIPS32R6-NEXT: seleqz $7, $7, $1
695 ; MIPS32R6-NEXT: or $2, $2, $5
696 ; MIPS32R6-NEXT: selnez $2, $2, $1
697 ; MIPS32R6-NEXT: or $5, $7, $2
698 ; MIPS32R6-NEXT: or $2, $9, $11
699 ; MIPS32R6-NEXT: seleqz $3, $3, $12
700 ; MIPS32R6-NEXT: selnez $7, $4, $12
701 ; MIPS32R6-NEXT: seleqz $4, $6, $1
702 ; MIPS32R6-NEXT: selnez $6, $10, $15
703 ; MIPS32R6-NEXT: seleqz $8, $8, $25
704 ; MIPS32R6-NEXT: seleqz $8, $8, $15
705 ; MIPS32R6-NEXT: or $6, $6, $8
706 ; MIPS32R6-NEXT: selnez $1, $6, $1
707 ; MIPS32R6-NEXT: or $4, $4, $1
708 ; MIPS32R6-NEXT: or $1, $7, $3
709 ; MIPS32R6-NEXT: selnez $1, $1, $15
710 ; MIPS32R6-NEXT: or $3, $9, $1
711 ; MIPS32R6-NEXT: lw $16, 4($sp) # 4-byte Folded Reload
712 ; MIPS32R6-NEXT: jr $ra
713 ; MIPS32R6-NEXT: addiu $sp, $sp, 8
715 ; MIPS3-LABEL: lshr_i128:
717 ; MIPS3-NEXT: sll $3, $7, 0
718 ; MIPS3-NEXT: dsrlv $6, $4, $7
719 ; MIPS3-NEXT: andi $1, $3, 64
720 ; MIPS3-NEXT: bnez $1, .LBB5_2
721 ; MIPS3-NEXT: daddiu $2, $zero, 0
722 ; MIPS3-NEXT: # %bb.1:
723 ; MIPS3-NEXT: dsrlv $1, $5, $7
724 ; MIPS3-NEXT: dsll $2, $4, 1
725 ; MIPS3-NEXT: not $3, $3
726 ; MIPS3-NEXT: dsllv $2, $2, $3
727 ; MIPS3-NEXT: or $3, $2, $1
729 ; MIPS3-NEXT: move $2, $6
730 ; MIPS3-NEXT: .LBB5_2:
732 ; MIPS3-NEXT: move $3, $6
734 ; MIPS4-LABEL: lshr_i128:
735 ; MIPS4: # %bb.0: # %entry
736 ; MIPS4-NEXT: dsrlv $1, $5, $7
737 ; MIPS4-NEXT: dsll $2, $4, 1
738 ; MIPS4-NEXT: sll $5, $7, 0
739 ; MIPS4-NEXT: not $3, $5
740 ; MIPS4-NEXT: dsllv $2, $2, $3
741 ; MIPS4-NEXT: or $3, $2, $1
742 ; MIPS4-NEXT: dsrlv $2, $4, $7
743 ; MIPS4-NEXT: andi $1, $5, 64
744 ; MIPS4-NEXT: movn $3, $2, $1
746 ; MIPS4-NEXT: movn $2, $zero, $1
748 ; MIPS64-LABEL: lshr_i128:
749 ; MIPS64: # %bb.0: # %entry
750 ; MIPS64-NEXT: dsrlv $1, $5, $7
751 ; MIPS64-NEXT: dsll $2, $4, 1
752 ; MIPS64-NEXT: sll $5, $7, 0
753 ; MIPS64-NEXT: not $3, $5
754 ; MIPS64-NEXT: dsllv $2, $2, $3
755 ; MIPS64-NEXT: or $3, $2, $1
756 ; MIPS64-NEXT: dsrlv $2, $4, $7
757 ; MIPS64-NEXT: andi $1, $5, 64
758 ; MIPS64-NEXT: movn $3, $2, $1
759 ; MIPS64-NEXT: jr $ra
760 ; MIPS64-NEXT: movn $2, $zero, $1
762 ; MIPS64R2-LABEL: lshr_i128:
763 ; MIPS64R2: # %bb.0: # %entry
764 ; MIPS64R2-NEXT: dsrlv $1, $5, $7
765 ; MIPS64R2-NEXT: dsll $2, $4, 1
766 ; MIPS64R2-NEXT: sll $5, $7, 0
767 ; MIPS64R2-NEXT: not $3, $5
768 ; MIPS64R2-NEXT: dsllv $2, $2, $3
769 ; MIPS64R2-NEXT: or $3, $2, $1
770 ; MIPS64R2-NEXT: dsrlv $2, $4, $7
771 ; MIPS64R2-NEXT: andi $1, $5, 64
772 ; MIPS64R2-NEXT: movn $3, $2, $1
773 ; MIPS64R2-NEXT: jr $ra
774 ; MIPS64R2-NEXT: movn $2, $zero, $1
776 ; MIPS64R6-LABEL: lshr_i128:
777 ; MIPS64R6: # %bb.0: # %entry
778 ; MIPS64R6-NEXT: dsrlv $1, $5, $7
779 ; MIPS64R6-NEXT: dsll $2, $4, 1
780 ; MIPS64R6-NEXT: sll $3, $7, 0
781 ; MIPS64R6-NEXT: not $5, $3
782 ; MIPS64R6-NEXT: dsllv $2, $2, $5
783 ; MIPS64R6-NEXT: or $1, $2, $1
784 ; MIPS64R6-NEXT: andi $2, $3, 64
785 ; MIPS64R6-NEXT: sll $2, $2, 0
786 ; MIPS64R6-NEXT: seleqz $1, $1, $2
787 ; MIPS64R6-NEXT: dsrlv $4, $4, $7
788 ; MIPS64R6-NEXT: selnez $3, $4, $2
789 ; MIPS64R6-NEXT: or $3, $3, $1
790 ; MIPS64R6-NEXT: jr $ra
791 ; MIPS64R6-NEXT: seleqz $2, $4, $2
793 ; MMR3-LABEL: lshr_i128:
794 ; MMR3: # %bb.0: # %entry
795 ; MMR3-NEXT: addiusp -40
796 ; MMR3-NEXT: .cfi_def_cfa_offset 40
797 ; MMR3-NEXT: swp $16, 32($sp)
798 ; MMR3-NEXT: .cfi_offset 17, -4
799 ; MMR3-NEXT: .cfi_offset 16, -8
800 ; MMR3-NEXT: move $8, $7
801 ; MMR3-NEXT: sw $6, 24($sp) # 4-byte Folded Spill
802 ; MMR3-NEXT: sw $4, 28($sp) # 4-byte Folded Spill
803 ; MMR3-NEXT: lw $16, 68($sp)
804 ; MMR3-NEXT: li16 $2, 64
805 ; MMR3-NEXT: subu16 $7, $2, $16
806 ; MMR3-NEXT: sllv $9, $5, $7
807 ; MMR3-NEXT: move $17, $5
808 ; MMR3-NEXT: sw $5, 0($sp) # 4-byte Folded Spill
809 ; MMR3-NEXT: andi16 $3, $7, 32
810 ; MMR3-NEXT: sw $3, 20($sp) # 4-byte Folded Spill
811 ; MMR3-NEXT: li16 $2, 0
812 ; MMR3-NEXT: move $4, $9
813 ; MMR3-NEXT: movn $4, $2, $3
814 ; MMR3-NEXT: srlv $5, $8, $16
815 ; MMR3-NEXT: not16 $3, $16
816 ; MMR3-NEXT: sw $3, 16($sp) # 4-byte Folded Spill
817 ; MMR3-NEXT: sll16 $2, $6, 1
818 ; MMR3-NEXT: sllv $2, $2, $3
819 ; MMR3-NEXT: or16 $2, $5
820 ; MMR3-NEXT: srlv $5, $6, $16
821 ; MMR3-NEXT: sw $5, 4($sp) # 4-byte Folded Spill
822 ; MMR3-NEXT: andi16 $3, $16, 32
823 ; MMR3-NEXT: sw $3, 12($sp) # 4-byte Folded Spill
824 ; MMR3-NEXT: movn $2, $5, $3
825 ; MMR3-NEXT: addiu $3, $16, -64
826 ; MMR3-NEXT: or16 $2, $4
827 ; MMR3-NEXT: srlv $4, $17, $3
828 ; MMR3-NEXT: sw $4, 8($sp) # 4-byte Folded Spill
829 ; MMR3-NEXT: lw $4, 28($sp) # 4-byte Folded Reload
830 ; MMR3-NEXT: sll16 $6, $4, 1
831 ; MMR3-NEXT: not16 $5, $3
832 ; MMR3-NEXT: sllv $5, $6, $5
833 ; MMR3-NEXT: lw $17, 8($sp) # 4-byte Folded Reload
834 ; MMR3-NEXT: or16 $5, $17
835 ; MMR3-NEXT: srlv $1, $4, $3
836 ; MMR3-NEXT: andi16 $3, $3, 32
837 ; MMR3-NEXT: sw $3, 8($sp) # 4-byte Folded Spill
838 ; MMR3-NEXT: movn $5, $1, $3
839 ; MMR3-NEXT: sltiu $10, $16, 64
840 ; MMR3-NEXT: movn $5, $2, $10
841 ; MMR3-NEXT: sllv $2, $4, $7
842 ; MMR3-NEXT: not16 $3, $7
843 ; MMR3-NEXT: lw $7, 0($sp) # 4-byte Folded Reload
844 ; MMR3-NEXT: srl16 $4, $7, 1
845 ; MMR3-NEXT: srlv $4, $4, $3
846 ; MMR3-NEXT: or16 $4, $2
847 ; MMR3-NEXT: srlv $2, $7, $16
848 ; MMR3-NEXT: lw $3, 16($sp) # 4-byte Folded Reload
849 ; MMR3-NEXT: sllv $3, $6, $3
850 ; MMR3-NEXT: or16 $3, $2
851 ; MMR3-NEXT: lw $2, 28($sp) # 4-byte Folded Reload
852 ; MMR3-NEXT: srlv $2, $2, $16
853 ; MMR3-NEXT: lw $17, 12($sp) # 4-byte Folded Reload
854 ; MMR3-NEXT: movn $3, $2, $17
855 ; MMR3-NEXT: movz $5, $8, $16
856 ; MMR3-NEXT: li16 $6, 0
857 ; MMR3-NEXT: movz $3, $6, $10
858 ; MMR3-NEXT: lw $7, 20($sp) # 4-byte Folded Reload
859 ; MMR3-NEXT: movn $4, $9, $7
860 ; MMR3-NEXT: lw $6, 4($sp) # 4-byte Folded Reload
861 ; MMR3-NEXT: li16 $7, 0
862 ; MMR3-NEXT: movn $6, $7, $17
863 ; MMR3-NEXT: or16 $6, $4
864 ; MMR3-NEXT: lw $4, 8($sp) # 4-byte Folded Reload
865 ; MMR3-NEXT: movn $1, $7, $4
866 ; MMR3-NEXT: li16 $7, 0
867 ; MMR3-NEXT: movn $1, $6, $10
868 ; MMR3-NEXT: lw $4, 24($sp) # 4-byte Folded Reload
869 ; MMR3-NEXT: movz $1, $4, $16
870 ; MMR3-NEXT: movn $2, $7, $17
871 ; MMR3-NEXT: li16 $4, 0
872 ; MMR3-NEXT: movz $2, $4, $10
873 ; MMR3-NEXT: move $4, $1
874 ; MMR3-NEXT: lwp $16, 32($sp)
875 ; MMR3-NEXT: addiusp 40
878 ; MMR6-LABEL: lshr_i128:
879 ; MMR6: # %bb.0: # %entry
880 ; MMR6-NEXT: addiu $sp, $sp, -32
881 ; MMR6-NEXT: .cfi_def_cfa_offset 32
882 ; MMR6-NEXT: sw $17, 28($sp) # 4-byte Folded Spill
883 ; MMR6-NEXT: sw $16, 24($sp) # 4-byte Folded Spill
884 ; MMR6-NEXT: .cfi_offset 17, -4
885 ; MMR6-NEXT: .cfi_offset 16, -8
886 ; MMR6-NEXT: move $1, $7
887 ; MMR6-NEXT: move $7, $5
888 ; MMR6-NEXT: lw $3, 60($sp)
889 ; MMR6-NEXT: srlv $2, $1, $3
890 ; MMR6-NEXT: not16 $5, $3
891 ; MMR6-NEXT: sw $5, 12($sp) # 4-byte Folded Spill
892 ; MMR6-NEXT: move $17, $6
893 ; MMR6-NEXT: sw $6, 16($sp) # 4-byte Folded Spill
894 ; MMR6-NEXT: sll16 $6, $6, 1
895 ; MMR6-NEXT: sllv $6, $6, $5
896 ; MMR6-NEXT: or $8, $6, $2
897 ; MMR6-NEXT: addiu $5, $3, -64
898 ; MMR6-NEXT: srlv $9, $7, $5
899 ; MMR6-NEXT: move $6, $4
900 ; MMR6-NEXT: sll16 $2, $4, 1
901 ; MMR6-NEXT: sw $2, 8($sp) # 4-byte Folded Spill
902 ; MMR6-NEXT: not16 $16, $5
903 ; MMR6-NEXT: sllv $10, $2, $16
904 ; MMR6-NEXT: andi16 $16, $3, 32
905 ; MMR6-NEXT: seleqz $8, $8, $16
906 ; MMR6-NEXT: or $9, $10, $9
907 ; MMR6-NEXT: srlv $10, $17, $3
908 ; MMR6-NEXT: selnez $11, $10, $16
909 ; MMR6-NEXT: li16 $17, 64
910 ; MMR6-NEXT: subu16 $2, $17, $3
911 ; MMR6-NEXT: sllv $12, $7, $2
912 ; MMR6-NEXT: move $17, $7
913 ; MMR6-NEXT: andi16 $4, $2, 32
914 ; MMR6-NEXT: andi16 $7, $5, 32
915 ; MMR6-NEXT: sw $7, 20($sp) # 4-byte Folded Spill
916 ; MMR6-NEXT: seleqz $9, $9, $7
917 ; MMR6-NEXT: seleqz $13, $12, $4
918 ; MMR6-NEXT: or $8, $11, $8
919 ; MMR6-NEXT: selnez $11, $12, $4
920 ; MMR6-NEXT: sllv $12, $6, $2
921 ; MMR6-NEXT: move $7, $6
922 ; MMR6-NEXT: sw $6, 4($sp) # 4-byte Folded Spill
923 ; MMR6-NEXT: not16 $2, $2
924 ; MMR6-NEXT: srl16 $6, $17, 1
925 ; MMR6-NEXT: srlv $2, $6, $2
926 ; MMR6-NEXT: or $2, $12, $2
927 ; MMR6-NEXT: seleqz $2, $2, $4
928 ; MMR6-NEXT: srlv $4, $7, $5
929 ; MMR6-NEXT: or $11, $11, $2
930 ; MMR6-NEXT: or $5, $8, $13
931 ; MMR6-NEXT: srlv $6, $17, $3
932 ; MMR6-NEXT: lw $2, 20($sp) # 4-byte Folded Reload
933 ; MMR6-NEXT: selnez $7, $4, $2
934 ; MMR6-NEXT: sltiu $8, $3, 64
935 ; MMR6-NEXT: selnez $12, $5, $8
936 ; MMR6-NEXT: or $7, $7, $9
937 ; MMR6-NEXT: lw $5, 12($sp) # 4-byte Folded Reload
938 ; MMR6-NEXT: lw $2, 8($sp) # 4-byte Folded Reload
939 ; MMR6-NEXT: sllv $9, $2, $5
940 ; MMR6-NEXT: seleqz $10, $10, $16
941 ; MMR6-NEXT: li16 $5, 0
942 ; MMR6-NEXT: or $10, $10, $11
943 ; MMR6-NEXT: or $6, $9, $6
944 ; MMR6-NEXT: seleqz $2, $7, $8
945 ; MMR6-NEXT: seleqz $7, $5, $8
946 ; MMR6-NEXT: lw $5, 4($sp) # 4-byte Folded Reload
947 ; MMR6-NEXT: srlv $9, $5, $3
948 ; MMR6-NEXT: seleqz $11, $9, $16
949 ; MMR6-NEXT: selnez $11, $11, $8
950 ; MMR6-NEXT: seleqz $1, $1, $3
951 ; MMR6-NEXT: or $2, $12, $2
952 ; MMR6-NEXT: selnez $2, $2, $3
953 ; MMR6-NEXT: or $5, $1, $2
954 ; MMR6-NEXT: or $2, $7, $11
955 ; MMR6-NEXT: seleqz $1, $6, $16
956 ; MMR6-NEXT: selnez $6, $9, $16
957 ; MMR6-NEXT: lw $16, 16($sp) # 4-byte Folded Reload
958 ; MMR6-NEXT: seleqz $9, $16, $3
959 ; MMR6-NEXT: selnez $10, $10, $8
960 ; MMR6-NEXT: lw $16, 20($sp) # 4-byte Folded Reload
961 ; MMR6-NEXT: seleqz $4, $4, $16
962 ; MMR6-NEXT: seleqz $4, $4, $8
963 ; MMR6-NEXT: or $4, $10, $4
964 ; MMR6-NEXT: selnez $3, $4, $3
965 ; MMR6-NEXT: or $4, $9, $3
966 ; MMR6-NEXT: or $1, $6, $1
967 ; MMR6-NEXT: selnez $1, $1, $8
968 ; MMR6-NEXT: or $3, $7, $1
969 ; MMR6-NEXT: lw $16, 24($sp) # 4-byte Folded Reload
970 ; MMR6-NEXT: lw $17, 28($sp) # 4-byte Folded Reload
971 ; MMR6-NEXT: addiu $sp, $sp, 32
975 ; o32 shouldn't use TImode helpers.
976 ; GP32-NOT: lw $25, %call16(__lshrti3)($gp)
977 ; MM-NOT: lw $25, %call16(__lshrti3)($2)
979 %r = lshr i128 %a, %b