1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=mips-linux-gnu -mcpu=mips2 -relocation-model=pic | FileCheck %s \
3 ; RUN: -check-prefix=MIPS2
4 ; RUN: llc < %s -mtriple=mips-linux-gnu -mcpu=mips32 -relocation-model=pic | FileCheck %s \
5 ; RUN: -check-prefix=MIPS32
6 ; RUN: llc < %s -mtriple=mips-linux-gnu -mcpu=mips32r2 -relocation-model=pic | FileCheck %s \
7 ; RUN: -check-prefix=MIPS32R2
8 ; RUN: llc < %s -mtriple=mips-linux-gnu -mcpu=mips32r3 -relocation-model=pic | FileCheck %s \
9 ; RUN: -check-prefix=MIPS32R2
10 ; RUN: llc < %s -mtriple=mips-linux-gnu -mcpu=mips32r5 -relocation-model=pic | FileCheck %s \
11 ; RUN: -check-prefix=MIPS32R2
12 ; RUN: llc < %s -mtriple=mips-linux-gnu -mcpu=mips32r6 -relocation-model=pic | FileCheck %s \
13 ; RUN: -check-prefix=MIPS32R6
14 ; RUN: llc < %s -mtriple=mips64-linux-gnu -mcpu=mips3 -relocation-model=pic | FileCheck %s \
15 ; RUN: -check-prefix=MIPS3
16 ; RUN: llc < %s -mtriple=mips64-linux-gnu -mcpu=mips4 -relocation-model=pic | FileCheck %s \
17 ; RUN: -check-prefix=MIPS4
18 ; RUN: llc < %s -mtriple=mips64-linux-gnu -mcpu=mips64 -relocation-model=pic | FileCheck %s \
19 ; RUN: -check-prefix=MIPS64
20 ; RUN: llc < %s -mtriple=mips64-linux-gnu -mcpu=mips64r2 -relocation-model=pic | FileCheck %s \
21 ; RUN: -check-prefix=MIPS64R2
22 ; RUN: llc < %s -mtriple=mips64-linux-gnu -mcpu=mips64r3 -relocation-model=pic | FileCheck %s \
23 ; RUN: -check-prefix=MIPS64R2
24 ; RUN: llc < %s -mtriple=mips64-linux-gnu -mcpu=mips64r5 -relocation-model=pic | FileCheck %s \
25 ; RUN: -check-prefix=MIPS64R2
26 ; RUN: llc < %s -mtriple=mips64-linux-gnu -mcpu=mips64r6 -relocation-model=pic | FileCheck %s \
27 ; RUN: -check-prefix=MIPS64R6
28 ; RUN: llc < %s -mtriple=mips-linux-gnu -mcpu=mips32r3 -mattr=+micromips -relocation-model=pic | FileCheck %s \
29 ; RUN: -check-prefix=MMR3
30 ; RUN: llc < %s -mtriple=mips-linux-gnu -mcpu=mips32r6 -mattr=+micromips -relocation-model=pic | FileCheck %s \
31 ; RUN: -check-prefix=MMR6
33 define signext i1 @shl_i1(i1 signext %a, i1 signext %b) {
34 ; MIPS2-LABEL: shl_i1:
35 ; MIPS2: # %bb.0: # %entry
37 ; MIPS2-NEXT: move $2, $4
39 ; MIPS32-LABEL: shl_i1:
40 ; MIPS32: # %bb.0: # %entry
42 ; MIPS32-NEXT: move $2, $4
44 ; MIPS32R2-LABEL: shl_i1:
45 ; MIPS32R2: # %bb.0: # %entry
46 ; MIPS32R2-NEXT: jr $ra
47 ; MIPS32R2-NEXT: move $2, $4
49 ; MIPS32R6-LABEL: shl_i1:
50 ; MIPS32R6: # %bb.0: # %entry
51 ; MIPS32R6-NEXT: jr $ra
52 ; MIPS32R6-NEXT: move $2, $4
54 ; MIPS3-LABEL: shl_i1:
55 ; MIPS3: # %bb.0: # %entry
57 ; MIPS3-NEXT: move $2, $4
59 ; MIPS4-LABEL: shl_i1:
60 ; MIPS4: # %bb.0: # %entry
62 ; MIPS4-NEXT: move $2, $4
64 ; MIPS64-LABEL: shl_i1:
65 ; MIPS64: # %bb.0: # %entry
67 ; MIPS64-NEXT: move $2, $4
69 ; MIPS64R2-LABEL: shl_i1:
70 ; MIPS64R2: # %bb.0: # %entry
71 ; MIPS64R2-NEXT: jr $ra
72 ; MIPS64R2-NEXT: move $2, $4
74 ; MIPS64R6-LABEL: shl_i1:
75 ; MIPS64R6: # %bb.0: # %entry
76 ; MIPS64R6-NEXT: jr $ra
77 ; MIPS64R6-NEXT: move $2, $4
80 ; MMR3: # %bb.0: # %entry
81 ; MMR3-NEXT: move $2, $4
85 ; MMR6: # %bb.0: # %entry
86 ; MMR6-NEXT: move $2, $4
94 define signext i8 @shl_i8(i8 signext %a, i8 signext %b) {
95 ; MIPS2-LABEL: shl_i8:
96 ; MIPS2: # %bb.0: # %entry
97 ; MIPS2-NEXT: andi $1, $5, 255
98 ; MIPS2-NEXT: sllv $1, $4, $1
99 ; MIPS2-NEXT: sll $1, $1, 24
101 ; MIPS2-NEXT: sra $2, $1, 24
103 ; MIPS32-LABEL: shl_i8:
104 ; MIPS32: # %bb.0: # %entry
105 ; MIPS32-NEXT: andi $1, $5, 255
106 ; MIPS32-NEXT: sllv $1, $4, $1
107 ; MIPS32-NEXT: sll $1, $1, 24
108 ; MIPS32-NEXT: jr $ra
109 ; MIPS32-NEXT: sra $2, $1, 24
111 ; MIPS32R2-LABEL: shl_i8:
112 ; MIPS32R2: # %bb.0: # %entry
113 ; MIPS32R2-NEXT: andi $1, $5, 255
114 ; MIPS32R2-NEXT: sllv $1, $4, $1
115 ; MIPS32R2-NEXT: jr $ra
116 ; MIPS32R2-NEXT: seb $2, $1
118 ; MIPS32R6-LABEL: shl_i8:
119 ; MIPS32R6: # %bb.0: # %entry
120 ; MIPS32R6-NEXT: andi $1, $5, 255
121 ; MIPS32R6-NEXT: sllv $1, $4, $1
122 ; MIPS32R6-NEXT: jr $ra
123 ; MIPS32R6-NEXT: seb $2, $1
125 ; MIPS3-LABEL: shl_i8:
126 ; MIPS3: # %bb.0: # %entry
127 ; MIPS3-NEXT: andi $1, $5, 255
128 ; MIPS3-NEXT: sllv $1, $4, $1
129 ; MIPS3-NEXT: sll $1, $1, 24
131 ; MIPS3-NEXT: sra $2, $1, 24
133 ; MIPS4-LABEL: shl_i8:
134 ; MIPS4: # %bb.0: # %entry
135 ; MIPS4-NEXT: andi $1, $5, 255
136 ; MIPS4-NEXT: sllv $1, $4, $1
137 ; MIPS4-NEXT: sll $1, $1, 24
139 ; MIPS4-NEXT: sra $2, $1, 24
141 ; MIPS64-LABEL: shl_i8:
142 ; MIPS64: # %bb.0: # %entry
143 ; MIPS64-NEXT: andi $1, $5, 255
144 ; MIPS64-NEXT: sllv $1, $4, $1
145 ; MIPS64-NEXT: sll $1, $1, 24
146 ; MIPS64-NEXT: jr $ra
147 ; MIPS64-NEXT: sra $2, $1, 24
149 ; MIPS64R2-LABEL: shl_i8:
150 ; MIPS64R2: # %bb.0: # %entry
151 ; MIPS64R2-NEXT: andi $1, $5, 255
152 ; MIPS64R2-NEXT: sllv $1, $4, $1
153 ; MIPS64R2-NEXT: jr $ra
154 ; MIPS64R2-NEXT: seb $2, $1
156 ; MIPS64R6-LABEL: shl_i8:
157 ; MIPS64R6: # %bb.0: # %entry
158 ; MIPS64R6-NEXT: andi $1, $5, 255
159 ; MIPS64R6-NEXT: sllv $1, $4, $1
160 ; MIPS64R6-NEXT: jr $ra
161 ; MIPS64R6-NEXT: seb $2, $1
163 ; MMR3-LABEL: shl_i8:
164 ; MMR3: # %bb.0: # %entry
165 ; MMR3-NEXT: andi16 $2, $5, 255
166 ; MMR3-NEXT: sllv $1, $4, $2
168 ; MMR3-NEXT: seb $2, $1
170 ; MMR6-LABEL: shl_i8:
171 ; MMR6: # %bb.0: # %entry
172 ; MMR6-NEXT: andi16 $2, $5, 255
173 ; MMR6-NEXT: sllv $1, $4, $2
174 ; MMR6-NEXT: seb $2, $1
182 define signext i16 @shl_i16(i16 signext %a, i16 signext %b) {
183 ; MIPS2-LABEL: shl_i16:
184 ; MIPS2: # %bb.0: # %entry
185 ; MIPS2-NEXT: andi $1, $5, 65535
186 ; MIPS2-NEXT: sllv $1, $4, $1
187 ; MIPS2-NEXT: sll $1, $1, 16
189 ; MIPS2-NEXT: sra $2, $1, 16
191 ; MIPS32-LABEL: shl_i16:
192 ; MIPS32: # %bb.0: # %entry
193 ; MIPS32-NEXT: andi $1, $5, 65535
194 ; MIPS32-NEXT: sllv $1, $4, $1
195 ; MIPS32-NEXT: sll $1, $1, 16
196 ; MIPS32-NEXT: jr $ra
197 ; MIPS32-NEXT: sra $2, $1, 16
199 ; MIPS32R2-LABEL: shl_i16:
200 ; MIPS32R2: # %bb.0: # %entry
201 ; MIPS32R2-NEXT: andi $1, $5, 65535
202 ; MIPS32R2-NEXT: sllv $1, $4, $1
203 ; MIPS32R2-NEXT: jr $ra
204 ; MIPS32R2-NEXT: seh $2, $1
206 ; MIPS32R6-LABEL: shl_i16:
207 ; MIPS32R6: # %bb.0: # %entry
208 ; MIPS32R6-NEXT: andi $1, $5, 65535
209 ; MIPS32R6-NEXT: sllv $1, $4, $1
210 ; MIPS32R6-NEXT: jr $ra
211 ; MIPS32R6-NEXT: seh $2, $1
213 ; MIPS3-LABEL: shl_i16:
214 ; MIPS3: # %bb.0: # %entry
215 ; MIPS3-NEXT: andi $1, $5, 65535
216 ; MIPS3-NEXT: sllv $1, $4, $1
217 ; MIPS3-NEXT: sll $1, $1, 16
219 ; MIPS3-NEXT: sra $2, $1, 16
221 ; MIPS4-LABEL: shl_i16:
222 ; MIPS4: # %bb.0: # %entry
223 ; MIPS4-NEXT: andi $1, $5, 65535
224 ; MIPS4-NEXT: sllv $1, $4, $1
225 ; MIPS4-NEXT: sll $1, $1, 16
227 ; MIPS4-NEXT: sra $2, $1, 16
229 ; MIPS64-LABEL: shl_i16:
230 ; MIPS64: # %bb.0: # %entry
231 ; MIPS64-NEXT: andi $1, $5, 65535
232 ; MIPS64-NEXT: sllv $1, $4, $1
233 ; MIPS64-NEXT: sll $1, $1, 16
234 ; MIPS64-NEXT: jr $ra
235 ; MIPS64-NEXT: sra $2, $1, 16
237 ; MIPS64R2-LABEL: shl_i16:
238 ; MIPS64R2: # %bb.0: # %entry
239 ; MIPS64R2-NEXT: andi $1, $5, 65535
240 ; MIPS64R2-NEXT: sllv $1, $4, $1
241 ; MIPS64R2-NEXT: jr $ra
242 ; MIPS64R2-NEXT: seh $2, $1
244 ; MIPS64R6-LABEL: shl_i16:
245 ; MIPS64R6: # %bb.0: # %entry
246 ; MIPS64R6-NEXT: andi $1, $5, 65535
247 ; MIPS64R6-NEXT: sllv $1, $4, $1
248 ; MIPS64R6-NEXT: jr $ra
249 ; MIPS64R6-NEXT: seh $2, $1
251 ; MMR3-LABEL: shl_i16:
252 ; MMR3: # %bb.0: # %entry
253 ; MMR3-NEXT: andi16 $2, $5, 65535
254 ; MMR3-NEXT: sllv $1, $4, $2
256 ; MMR3-NEXT: seh $2, $1
258 ; MMR6-LABEL: shl_i16:
259 ; MMR6: # %bb.0: # %entry
260 ; MMR6-NEXT: andi16 $2, $5, 65535
261 ; MMR6-NEXT: sllv $1, $4, $2
262 ; MMR6-NEXT: seh $2, $1
270 define signext i32 @shl_i32(i32 signext %a, i32 signext %b) {
271 ; MIPS2-LABEL: shl_i32:
272 ; MIPS2: # %bb.0: # %entry
274 ; MIPS2-NEXT: sllv $2, $4, $5
276 ; MIPS32-LABEL: shl_i32:
277 ; MIPS32: # %bb.0: # %entry
278 ; MIPS32-NEXT: jr $ra
279 ; MIPS32-NEXT: sllv $2, $4, $5
281 ; MIPS32R2-LABEL: shl_i32:
282 ; MIPS32R2: # %bb.0: # %entry
283 ; MIPS32R2-NEXT: jr $ra
284 ; MIPS32R2-NEXT: sllv $2, $4, $5
286 ; MIPS32R6-LABEL: shl_i32:
287 ; MIPS32R6: # %bb.0: # %entry
288 ; MIPS32R6-NEXT: jr $ra
289 ; MIPS32R6-NEXT: sllv $2, $4, $5
291 ; MIPS3-LABEL: shl_i32:
292 ; MIPS3: # %bb.0: # %entry
294 ; MIPS3-NEXT: sllv $2, $4, $5
296 ; MIPS4-LABEL: shl_i32:
297 ; MIPS4: # %bb.0: # %entry
299 ; MIPS4-NEXT: sllv $2, $4, $5
301 ; MIPS64-LABEL: shl_i32:
302 ; MIPS64: # %bb.0: # %entry
303 ; MIPS64-NEXT: jr $ra
304 ; MIPS64-NEXT: sllv $2, $4, $5
306 ; MIPS64R2-LABEL: shl_i32:
307 ; MIPS64R2: # %bb.0: # %entry
308 ; MIPS64R2-NEXT: jr $ra
309 ; MIPS64R2-NEXT: sllv $2, $4, $5
311 ; MIPS64R6-LABEL: shl_i32:
312 ; MIPS64R6: # %bb.0: # %entry
313 ; MIPS64R6-NEXT: jr $ra
314 ; MIPS64R6-NEXT: sllv $2, $4, $5
316 ; MMR3-LABEL: shl_i32:
317 ; MMR3: # %bb.0: # %entry
319 ; MMR3-NEXT: sllv $2, $4, $5
321 ; MMR6-LABEL: shl_i32:
322 ; MMR6: # %bb.0: # %entry
323 ; MMR6-NEXT: sllv $2, $4, $5
331 define signext i64 @shl_i64(i64 signext %a, i64 signext %b) {
332 ; MIPS2-LABEL: shl_i64:
334 ; MIPS2-NEXT: sllv $6, $5, $7
335 ; MIPS2-NEXT: andi $8, $7, 32
336 ; MIPS2-NEXT: beqz $8, $BB4_3
337 ; MIPS2-NEXT: move $2, $6
338 ; MIPS2-NEXT: # %bb.1:
339 ; MIPS2-NEXT: beqz $8, $BB4_4
340 ; MIPS2-NEXT: addiu $3, $zero, 0
341 ; MIPS2-NEXT: $BB4_2:
344 ; MIPS2-NEXT: $BB4_3:
345 ; MIPS2-NEXT: sllv $1, $4, $7
346 ; MIPS2-NEXT: not $2, $7
347 ; MIPS2-NEXT: srl $3, $5, 1
348 ; MIPS2-NEXT: srlv $2, $3, $2
349 ; MIPS2-NEXT: or $2, $1, $2
350 ; MIPS2-NEXT: bnez $8, $BB4_2
351 ; MIPS2-NEXT: addiu $3, $zero, 0
352 ; MIPS2-NEXT: $BB4_4:
354 ; MIPS2-NEXT: move $3, $6
356 ; MIPS32-LABEL: shl_i64:
357 ; MIPS32: # %bb.0: # %entry
358 ; MIPS32-NEXT: sllv $1, $4, $7
359 ; MIPS32-NEXT: not $2, $7
360 ; MIPS32-NEXT: srl $3, $5, 1
361 ; MIPS32-NEXT: srlv $2, $3, $2
362 ; MIPS32-NEXT: or $2, $1, $2
363 ; MIPS32-NEXT: sllv $3, $5, $7
364 ; MIPS32-NEXT: andi $1, $7, 32
365 ; MIPS32-NEXT: movn $2, $3, $1
366 ; MIPS32-NEXT: jr $ra
367 ; MIPS32-NEXT: movn $3, $zero, $1
369 ; MIPS32R2-LABEL: shl_i64:
370 ; MIPS32R2: # %bb.0: # %entry
371 ; MIPS32R2-NEXT: sllv $1, $4, $7
372 ; MIPS32R2-NEXT: not $2, $7
373 ; MIPS32R2-NEXT: srl $3, $5, 1
374 ; MIPS32R2-NEXT: srlv $2, $3, $2
375 ; MIPS32R2-NEXT: or $2, $1, $2
376 ; MIPS32R2-NEXT: sllv $3, $5, $7
377 ; MIPS32R2-NEXT: andi $1, $7, 32
378 ; MIPS32R2-NEXT: movn $2, $3, $1
379 ; MIPS32R2-NEXT: jr $ra
380 ; MIPS32R2-NEXT: movn $3, $zero, $1
382 ; MIPS32R6-LABEL: shl_i64:
383 ; MIPS32R6: # %bb.0: # %entry
384 ; MIPS32R6-NEXT: sllv $1, $4, $7
385 ; MIPS32R6-NEXT: not $2, $7
386 ; MIPS32R6-NEXT: srl $3, $5, 1
387 ; MIPS32R6-NEXT: srlv $2, $3, $2
388 ; MIPS32R6-NEXT: or $1, $1, $2
389 ; MIPS32R6-NEXT: andi $3, $7, 32
390 ; MIPS32R6-NEXT: seleqz $1, $1, $3
391 ; MIPS32R6-NEXT: sllv $4, $5, $7
392 ; MIPS32R6-NEXT: selnez $2, $4, $3
393 ; MIPS32R6-NEXT: or $2, $2, $1
394 ; MIPS32R6-NEXT: jr $ra
395 ; MIPS32R6-NEXT: seleqz $3, $4, $3
397 ; MIPS3-LABEL: shl_i64:
398 ; MIPS3: # %bb.0: # %entry
400 ; MIPS3-NEXT: dsllv $2, $4, $5
402 ; MIPS4-LABEL: shl_i64:
403 ; MIPS4: # %bb.0: # %entry
405 ; MIPS4-NEXT: dsllv $2, $4, $5
407 ; MIPS64-LABEL: shl_i64:
408 ; MIPS64: # %bb.0: # %entry
409 ; MIPS64-NEXT: jr $ra
410 ; MIPS64-NEXT: dsllv $2, $4, $5
412 ; MIPS64R2-LABEL: shl_i64:
413 ; MIPS64R2: # %bb.0: # %entry
414 ; MIPS64R2-NEXT: jr $ra
415 ; MIPS64R2-NEXT: dsllv $2, $4, $5
417 ; MIPS64R6-LABEL: shl_i64:
418 ; MIPS64R6: # %bb.0: # %entry
419 ; MIPS64R6-NEXT: jr $ra
420 ; MIPS64R6-NEXT: dsllv $2, $4, $5
422 ; MMR3-LABEL: shl_i64:
423 ; MMR3: # %bb.0: # %entry
424 ; MMR3-NEXT: sllv $3, $4, $7
425 ; MMR3-NEXT: not16 $2, $7
426 ; MMR3-NEXT: srl16 $4, $5, 1
427 ; MMR3-NEXT: srlv $2, $4, $2
428 ; MMR3-NEXT: or16 $2, $3
429 ; MMR3-NEXT: sllv $3, $5, $7
430 ; MMR3-NEXT: andi16 $4, $7, 32
431 ; MMR3-NEXT: movn $2, $3, $4
432 ; MMR3-NEXT: li16 $5, 0
434 ; MMR3-NEXT: movn $3, $5, $4
436 ; MMR6-LABEL: shl_i64:
437 ; MMR6: # %bb.0: # %entry
438 ; MMR6-NEXT: sllv $1, $4, $7
439 ; MMR6-NEXT: not16 $2, $7
440 ; MMR6-NEXT: srl16 $3, $5, 1
441 ; MMR6-NEXT: srlv $2, $3, $2
442 ; MMR6-NEXT: or $1, $1, $2
443 ; MMR6-NEXT: andi16 $3, $7, 32
444 ; MMR6-NEXT: seleqz $1, $1, $3
445 ; MMR6-NEXT: sllv $4, $5, $7
446 ; MMR6-NEXT: selnez $2, $4, $3
447 ; MMR6-NEXT: or $2, $2, $1
448 ; MMR6-NEXT: seleqz $3, $4, $3
456 define signext i128 @shl_i128(i128 signext %a, i128 signext %b) {
457 ; MIPS2-LABEL: shl_i128:
459 ; MIPS2-NEXT: addiu $sp, $sp, -8
460 ; MIPS2-NEXT: .cfi_def_cfa_offset 8
461 ; MIPS2-NEXT: sw $17, 4($sp)
462 ; MIPS2-NEXT: sw $16, 0($sp)
463 ; MIPS2-NEXT: .cfi_offset 17, -4
464 ; MIPS2-NEXT: .cfi_offset 16, -8
465 ; MIPS2-NEXT: lw $8, 36($sp)
466 ; MIPS2-NEXT: addiu $1, $zero, 64
467 ; MIPS2-NEXT: subu $3, $1, $8
468 ; MIPS2-NEXT: srlv $9, $6, $3
469 ; MIPS2-NEXT: andi $1, $3, 32
470 ; MIPS2-NEXT: bnez $1, $BB5_2
471 ; MIPS2-NEXT: addiu $2, $zero, 0
472 ; MIPS2-NEXT: # %bb.1:
473 ; MIPS2-NEXT: srlv $1, $7, $3
474 ; MIPS2-NEXT: not $3, $3
475 ; MIPS2-NEXT: sll $10, $6, 1
476 ; MIPS2-NEXT: sllv $3, $10, $3
477 ; MIPS2-NEXT: or $3, $3, $1
478 ; MIPS2-NEXT: b $BB5_3
479 ; MIPS2-NEXT: move $15, $9
480 ; MIPS2-NEXT: $BB5_2:
481 ; MIPS2-NEXT: addiu $15, $zero, 0
482 ; MIPS2-NEXT: move $3, $9
483 ; MIPS2-NEXT: $BB5_3:
484 ; MIPS2-NEXT: not $13, $8
485 ; MIPS2-NEXT: sllv $9, $5, $8
486 ; MIPS2-NEXT: andi $10, $8, 32
487 ; MIPS2-NEXT: bnez $10, $BB5_5
488 ; MIPS2-NEXT: move $25, $9
489 ; MIPS2-NEXT: # %bb.4:
490 ; MIPS2-NEXT: sllv $1, $4, $8
491 ; MIPS2-NEXT: srl $11, $5, 1
492 ; MIPS2-NEXT: srlv $11, $11, $13
493 ; MIPS2-NEXT: or $25, $1, $11
494 ; MIPS2-NEXT: $BB5_5:
495 ; MIPS2-NEXT: addiu $14, $8, -64
496 ; MIPS2-NEXT: srl $24, $7, 1
497 ; MIPS2-NEXT: sllv $11, $7, $14
498 ; MIPS2-NEXT: andi $12, $14, 32
499 ; MIPS2-NEXT: bnez $12, $BB5_7
500 ; MIPS2-NEXT: move $gp, $11
501 ; MIPS2-NEXT: # %bb.6:
502 ; MIPS2-NEXT: sllv $1, $6, $14
503 ; MIPS2-NEXT: not $14, $14
504 ; MIPS2-NEXT: srlv $14, $24, $14
505 ; MIPS2-NEXT: or $gp, $1, $14
506 ; MIPS2-NEXT: $BB5_7:
507 ; MIPS2-NEXT: sltiu $14, $8, 64
508 ; MIPS2-NEXT: beqz $14, $BB5_9
510 ; MIPS2-NEXT: # %bb.8:
511 ; MIPS2-NEXT: or $gp, $25, $15
512 ; MIPS2-NEXT: $BB5_9:
513 ; MIPS2-NEXT: sllv $25, $7, $8
514 ; MIPS2-NEXT: bnez $10, $BB5_11
515 ; MIPS2-NEXT: addiu $17, $zero, 0
516 ; MIPS2-NEXT: # %bb.10:
517 ; MIPS2-NEXT: move $17, $25
518 ; MIPS2-NEXT: $BB5_11:
519 ; MIPS2-NEXT: addiu $1, $zero, 63
520 ; MIPS2-NEXT: sltiu $15, $8, 1
521 ; MIPS2-NEXT: beqz $15, $BB5_21
522 ; MIPS2-NEXT: sltu $16, $1, $8
523 ; MIPS2-NEXT: # %bb.12:
524 ; MIPS2-NEXT: beqz $16, $BB5_22
525 ; MIPS2-NEXT: addiu $7, $zero, 0
526 ; MIPS2-NEXT: $BB5_13:
527 ; MIPS2-NEXT: beqz $10, $BB5_23
529 ; MIPS2-NEXT: $BB5_14:
530 ; MIPS2-NEXT: beqz $16, $BB5_24
531 ; MIPS2-NEXT: addiu $6, $zero, 0
532 ; MIPS2-NEXT: $BB5_15:
533 ; MIPS2-NEXT: beqz $10, $BB5_25
534 ; MIPS2-NEXT: addiu $8, $zero, 0
535 ; MIPS2-NEXT: $BB5_16:
536 ; MIPS2-NEXT: beqz $12, $BB5_26
538 ; MIPS2-NEXT: $BB5_17:
539 ; MIPS2-NEXT: bnez $14, $BB5_27
541 ; MIPS2-NEXT: $BB5_18:
542 ; MIPS2-NEXT: bnez $15, $BB5_20
544 ; MIPS2-NEXT: $BB5_19:
545 ; MIPS2-NEXT: move $5, $2
546 ; MIPS2-NEXT: $BB5_20:
547 ; MIPS2-NEXT: move $2, $4
548 ; MIPS2-NEXT: move $3, $5
549 ; MIPS2-NEXT: move $4, $6
550 ; MIPS2-NEXT: move $5, $7
551 ; MIPS2-NEXT: lw $16, 0($sp)
552 ; MIPS2-NEXT: lw $17, 4($sp)
554 ; MIPS2-NEXT: addiu $sp, $sp, 8
555 ; MIPS2-NEXT: $BB5_21:
556 ; MIPS2-NEXT: move $4, $gp
557 ; MIPS2-NEXT: bnez $16, $BB5_13
558 ; MIPS2-NEXT: addiu $7, $zero, 0
559 ; MIPS2-NEXT: $BB5_22:
560 ; MIPS2-NEXT: bnez $10, $BB5_14
561 ; MIPS2-NEXT: move $7, $17
562 ; MIPS2-NEXT: $BB5_23:
563 ; MIPS2-NEXT: sllv $1, $6, $8
564 ; MIPS2-NEXT: srlv $6, $24, $13
565 ; MIPS2-NEXT: or $25, $1, $6
566 ; MIPS2-NEXT: bnez $16, $BB5_15
567 ; MIPS2-NEXT: addiu $6, $zero, 0
568 ; MIPS2-NEXT: $BB5_24:
569 ; MIPS2-NEXT: move $6, $25
570 ; MIPS2-NEXT: bnez $10, $BB5_16
571 ; MIPS2-NEXT: addiu $8, $zero, 0
572 ; MIPS2-NEXT: $BB5_25:
573 ; MIPS2-NEXT: bnez $12, $BB5_17
574 ; MIPS2-NEXT: move $8, $9
575 ; MIPS2-NEXT: $BB5_26:
576 ; MIPS2-NEXT: beqz $14, $BB5_18
577 ; MIPS2-NEXT: move $2, $11
578 ; MIPS2-NEXT: $BB5_27:
579 ; MIPS2-NEXT: bnez $15, $BB5_20
580 ; MIPS2-NEXT: or $2, $8, $3
581 ; MIPS2-NEXT: # %bb.28:
582 ; MIPS2-NEXT: b $BB5_19
585 ; MIPS32-LABEL: shl_i128:
586 ; MIPS32: # %bb.0: # %entry
587 ; MIPS32-NEXT: lw $8, 28($sp)
588 ; MIPS32-NEXT: addiu $1, $zero, 64
589 ; MIPS32-NEXT: subu $1, $1, $8
590 ; MIPS32-NEXT: srlv $9, $6, $1
591 ; MIPS32-NEXT: andi $10, $1, 32
592 ; MIPS32-NEXT: move $2, $9
593 ; MIPS32-NEXT: movn $2, $zero, $10
594 ; MIPS32-NEXT: sllv $3, $4, $8
595 ; MIPS32-NEXT: not $11, $8
596 ; MIPS32-NEXT: srl $12, $5, 1
597 ; MIPS32-NEXT: srlv $12, $12, $11
598 ; MIPS32-NEXT: or $3, $3, $12
599 ; MIPS32-NEXT: sllv $12, $5, $8
600 ; MIPS32-NEXT: andi $13, $8, 32
601 ; MIPS32-NEXT: movn $3, $12, $13
602 ; MIPS32-NEXT: addiu $14, $8, -64
603 ; MIPS32-NEXT: or $15, $3, $2
604 ; MIPS32-NEXT: sllv $2, $6, $14
605 ; MIPS32-NEXT: srl $24, $7, 1
606 ; MIPS32-NEXT: not $3, $14
607 ; MIPS32-NEXT: srlv $3, $24, $3
608 ; MIPS32-NEXT: or $2, $2, $3
609 ; MIPS32-NEXT: sllv $3, $7, $14
610 ; MIPS32-NEXT: andi $14, $14, 32
611 ; MIPS32-NEXT: movn $2, $3, $14
612 ; MIPS32-NEXT: sltiu $25, $8, 64
613 ; MIPS32-NEXT: movn $2, $15, $25
614 ; MIPS32-NEXT: srlv $15, $7, $1
615 ; MIPS32-NEXT: not $1, $1
616 ; MIPS32-NEXT: sll $gp, $6, 1
617 ; MIPS32-NEXT: sllv $1, $gp, $1
618 ; MIPS32-NEXT: or $15, $1, $15
619 ; MIPS32-NEXT: sllv $1, $6, $8
620 ; MIPS32-NEXT: srlv $6, $24, $11
621 ; MIPS32-NEXT: or $1, $1, $6
622 ; MIPS32-NEXT: sllv $6, $7, $8
623 ; MIPS32-NEXT: movn $1, $6, $13
624 ; MIPS32-NEXT: movz $2, $4, $8
625 ; MIPS32-NEXT: movz $1, $zero, $25
626 ; MIPS32-NEXT: movn $15, $9, $10
627 ; MIPS32-NEXT: movn $12, $zero, $13
628 ; MIPS32-NEXT: or $4, $12, $15
629 ; MIPS32-NEXT: movn $3, $zero, $14
630 ; MIPS32-NEXT: movn $3, $4, $25
631 ; MIPS32-NEXT: movz $3, $5, $8
632 ; MIPS32-NEXT: movn $6, $zero, $13
633 ; MIPS32-NEXT: movz $6, $zero, $25
634 ; MIPS32-NEXT: move $4, $1
635 ; MIPS32-NEXT: jr $ra
636 ; MIPS32-NEXT: move $5, $6
638 ; MIPS32R2-LABEL: shl_i128:
639 ; MIPS32R2: # %bb.0: # %entry
640 ; MIPS32R2-NEXT: lw $8, 28($sp)
641 ; MIPS32R2-NEXT: addiu $1, $zero, 64
642 ; MIPS32R2-NEXT: subu $1, $1, $8
643 ; MIPS32R2-NEXT: srlv $9, $6, $1
644 ; MIPS32R2-NEXT: andi $10, $1, 32
645 ; MIPS32R2-NEXT: move $2, $9
646 ; MIPS32R2-NEXT: movn $2, $zero, $10
647 ; MIPS32R2-NEXT: sllv $3, $4, $8
648 ; MIPS32R2-NEXT: not $11, $8
649 ; MIPS32R2-NEXT: srl $12, $5, 1
650 ; MIPS32R2-NEXT: srlv $12, $12, $11
651 ; MIPS32R2-NEXT: or $3, $3, $12
652 ; MIPS32R2-NEXT: sllv $12, $5, $8
653 ; MIPS32R2-NEXT: andi $13, $8, 32
654 ; MIPS32R2-NEXT: movn $3, $12, $13
655 ; MIPS32R2-NEXT: addiu $14, $8, -64
656 ; MIPS32R2-NEXT: or $15, $3, $2
657 ; MIPS32R2-NEXT: sllv $2, $6, $14
658 ; MIPS32R2-NEXT: srl $24, $7, 1
659 ; MIPS32R2-NEXT: not $3, $14
660 ; MIPS32R2-NEXT: srlv $3, $24, $3
661 ; MIPS32R2-NEXT: or $2, $2, $3
662 ; MIPS32R2-NEXT: sllv $3, $7, $14
663 ; MIPS32R2-NEXT: andi $14, $14, 32
664 ; MIPS32R2-NEXT: movn $2, $3, $14
665 ; MIPS32R2-NEXT: sltiu $25, $8, 64
666 ; MIPS32R2-NEXT: movn $2, $15, $25
667 ; MIPS32R2-NEXT: srlv $15, $7, $1
668 ; MIPS32R2-NEXT: not $1, $1
669 ; MIPS32R2-NEXT: sll $gp, $6, 1
670 ; MIPS32R2-NEXT: sllv $1, $gp, $1
671 ; MIPS32R2-NEXT: or $15, $1, $15
672 ; MIPS32R2-NEXT: sllv $1, $6, $8
673 ; MIPS32R2-NEXT: srlv $6, $24, $11
674 ; MIPS32R2-NEXT: or $1, $1, $6
675 ; MIPS32R2-NEXT: sllv $6, $7, $8
676 ; MIPS32R2-NEXT: movn $1, $6, $13
677 ; MIPS32R2-NEXT: movz $2, $4, $8
678 ; MIPS32R2-NEXT: movz $1, $zero, $25
679 ; MIPS32R2-NEXT: movn $15, $9, $10
680 ; MIPS32R2-NEXT: movn $12, $zero, $13
681 ; MIPS32R2-NEXT: or $4, $12, $15
682 ; MIPS32R2-NEXT: movn $3, $zero, $14
683 ; MIPS32R2-NEXT: movn $3, $4, $25
684 ; MIPS32R2-NEXT: movz $3, $5, $8
685 ; MIPS32R2-NEXT: movn $6, $zero, $13
686 ; MIPS32R2-NEXT: movz $6, $zero, $25
687 ; MIPS32R2-NEXT: move $4, $1
688 ; MIPS32R2-NEXT: jr $ra
689 ; MIPS32R2-NEXT: move $5, $6
691 ; MIPS32R6-LABEL: shl_i128:
692 ; MIPS32R6: # %bb.0: # %entry
693 ; MIPS32R6-NEXT: lw $3, 28($sp)
694 ; MIPS32R6-NEXT: sllv $1, $4, $3
695 ; MIPS32R6-NEXT: not $2, $3
696 ; MIPS32R6-NEXT: srl $8, $5, 1
697 ; MIPS32R6-NEXT: srlv $8, $8, $2
698 ; MIPS32R6-NEXT: or $1, $1, $8
699 ; MIPS32R6-NEXT: sllv $8, $5, $3
700 ; MIPS32R6-NEXT: andi $9, $3, 32
701 ; MIPS32R6-NEXT: seleqz $1, $1, $9
702 ; MIPS32R6-NEXT: selnez $10, $8, $9
703 ; MIPS32R6-NEXT: addiu $11, $zero, 64
704 ; MIPS32R6-NEXT: subu $11, $11, $3
705 ; MIPS32R6-NEXT: srlv $12, $6, $11
706 ; MIPS32R6-NEXT: andi $13, $11, 32
707 ; MIPS32R6-NEXT: seleqz $14, $12, $13
708 ; MIPS32R6-NEXT: or $1, $10, $1
709 ; MIPS32R6-NEXT: selnez $10, $12, $13
710 ; MIPS32R6-NEXT: srlv $12, $7, $11
711 ; MIPS32R6-NEXT: not $11, $11
712 ; MIPS32R6-NEXT: sll $15, $6, 1
713 ; MIPS32R6-NEXT: sllv $11, $15, $11
714 ; MIPS32R6-NEXT: or $11, $11, $12
715 ; MIPS32R6-NEXT: seleqz $11, $11, $13
716 ; MIPS32R6-NEXT: addiu $12, $3, -64
717 ; MIPS32R6-NEXT: or $10, $10, $11
718 ; MIPS32R6-NEXT: or $1, $1, $14
719 ; MIPS32R6-NEXT: sllv $11, $6, $12
720 ; MIPS32R6-NEXT: srl $13, $7, 1
721 ; MIPS32R6-NEXT: not $14, $12
722 ; MIPS32R6-NEXT: srlv $14, $13, $14
723 ; MIPS32R6-NEXT: or $11, $11, $14
724 ; MIPS32R6-NEXT: andi $14, $12, 32
725 ; MIPS32R6-NEXT: seleqz $11, $11, $14
726 ; MIPS32R6-NEXT: sllv $12, $7, $12
727 ; MIPS32R6-NEXT: selnez $15, $12, $14
728 ; MIPS32R6-NEXT: sltiu $24, $3, 64
729 ; MIPS32R6-NEXT: selnez $1, $1, $24
730 ; MIPS32R6-NEXT: or $11, $15, $11
731 ; MIPS32R6-NEXT: sllv $6, $6, $3
732 ; MIPS32R6-NEXT: srlv $2, $13, $2
733 ; MIPS32R6-NEXT: seleqz $8, $8, $9
734 ; MIPS32R6-NEXT: or $8, $8, $10
735 ; MIPS32R6-NEXT: or $6, $6, $2
736 ; MIPS32R6-NEXT: seleqz $2, $11, $24
737 ; MIPS32R6-NEXT: seleqz $10, $zero, $24
738 ; MIPS32R6-NEXT: sllv $7, $7, $3
739 ; MIPS32R6-NEXT: seleqz $11, $7, $9
740 ; MIPS32R6-NEXT: selnez $11, $11, $24
741 ; MIPS32R6-NEXT: seleqz $4, $4, $3
742 ; MIPS32R6-NEXT: or $1, $1, $2
743 ; MIPS32R6-NEXT: selnez $1, $1, $3
744 ; MIPS32R6-NEXT: or $2, $4, $1
745 ; MIPS32R6-NEXT: or $1, $10, $11
746 ; MIPS32R6-NEXT: seleqz $4, $6, $9
747 ; MIPS32R6-NEXT: selnez $6, $7, $9
748 ; MIPS32R6-NEXT: seleqz $5, $5, $3
749 ; MIPS32R6-NEXT: selnez $7, $8, $24
750 ; MIPS32R6-NEXT: seleqz $8, $12, $14
751 ; MIPS32R6-NEXT: seleqz $8, $8, $24
752 ; MIPS32R6-NEXT: or $7, $7, $8
753 ; MIPS32R6-NEXT: selnez $3, $7, $3
754 ; MIPS32R6-NEXT: or $3, $5, $3
755 ; MIPS32R6-NEXT: or $4, $6, $4
756 ; MIPS32R6-NEXT: selnez $4, $4, $24
757 ; MIPS32R6-NEXT: or $4, $10, $4
758 ; MIPS32R6-NEXT: jr $ra
759 ; MIPS32R6-NEXT: move $5, $1
761 ; MIPS3-LABEL: shl_i128:
763 ; MIPS3-NEXT: sll $3, $7, 0
764 ; MIPS3-NEXT: dsllv $6, $5, $7
765 ; MIPS3-NEXT: andi $8, $3, 64
766 ; MIPS3-NEXT: beqz $8, .LBB5_3
767 ; MIPS3-NEXT: move $2, $6
768 ; MIPS3-NEXT: # %bb.1:
769 ; MIPS3-NEXT: beqz $8, .LBB5_4
770 ; MIPS3-NEXT: daddiu $3, $zero, 0
771 ; MIPS3-NEXT: .LBB5_2:
774 ; MIPS3-NEXT: .LBB5_3:
775 ; MIPS3-NEXT: dsllv $1, $4, $7
776 ; MIPS3-NEXT: dsrl $2, $5, 1
777 ; MIPS3-NEXT: not $3, $3
778 ; MIPS3-NEXT: dsrlv $2, $2, $3
779 ; MIPS3-NEXT: or $2, $1, $2
780 ; MIPS3-NEXT: bnez $8, .LBB5_2
781 ; MIPS3-NEXT: daddiu $3, $zero, 0
782 ; MIPS3-NEXT: .LBB5_4:
784 ; MIPS3-NEXT: move $3, $6
786 ; MIPS4-LABEL: shl_i128:
787 ; MIPS4: # %bb.0: # %entry
788 ; MIPS4-NEXT: dsllv $1, $4, $7
789 ; MIPS4-NEXT: dsrl $2, $5, 1
790 ; MIPS4-NEXT: sll $4, $7, 0
791 ; MIPS4-NEXT: not $3, $4
792 ; MIPS4-NEXT: dsrlv $2, $2, $3
793 ; MIPS4-NEXT: or $2, $1, $2
794 ; MIPS4-NEXT: dsllv $3, $5, $7
795 ; MIPS4-NEXT: andi $1, $4, 64
796 ; MIPS4-NEXT: movn $2, $3, $1
798 ; MIPS4-NEXT: movn $3, $zero, $1
800 ; MIPS64-LABEL: shl_i128:
801 ; MIPS64: # %bb.0: # %entry
802 ; MIPS64-NEXT: dsllv $1, $4, $7
803 ; MIPS64-NEXT: dsrl $2, $5, 1
804 ; MIPS64-NEXT: sll $4, $7, 0
805 ; MIPS64-NEXT: not $3, $4
806 ; MIPS64-NEXT: dsrlv $2, $2, $3
807 ; MIPS64-NEXT: or $2, $1, $2
808 ; MIPS64-NEXT: dsllv $3, $5, $7
809 ; MIPS64-NEXT: andi $1, $4, 64
810 ; MIPS64-NEXT: movn $2, $3, $1
811 ; MIPS64-NEXT: jr $ra
812 ; MIPS64-NEXT: movn $3, $zero, $1
814 ; MIPS64R2-LABEL: shl_i128:
815 ; MIPS64R2: # %bb.0: # %entry
816 ; MIPS64R2-NEXT: dsllv $1, $4, $7
817 ; MIPS64R2-NEXT: dsrl $2, $5, 1
818 ; MIPS64R2-NEXT: sll $4, $7, 0
819 ; MIPS64R2-NEXT: not $3, $4
820 ; MIPS64R2-NEXT: dsrlv $2, $2, $3
821 ; MIPS64R2-NEXT: or $2, $1, $2
822 ; MIPS64R2-NEXT: dsllv $3, $5, $7
823 ; MIPS64R2-NEXT: andi $1, $4, 64
824 ; MIPS64R2-NEXT: movn $2, $3, $1
825 ; MIPS64R2-NEXT: jr $ra
826 ; MIPS64R2-NEXT: movn $3, $zero, $1
828 ; MIPS64R6-LABEL: shl_i128:
829 ; MIPS64R6: # %bb.0: # %entry
830 ; MIPS64R6-NEXT: dsllv $1, $4, $7
831 ; MIPS64R6-NEXT: dsrl $2, $5, 1
832 ; MIPS64R6-NEXT: sll $3, $7, 0
833 ; MIPS64R6-NEXT: not $4, $3
834 ; MIPS64R6-NEXT: dsrlv $2, $2, $4
835 ; MIPS64R6-NEXT: or $1, $1, $2
836 ; MIPS64R6-NEXT: andi $2, $3, 64
837 ; MIPS64R6-NEXT: sll $3, $2, 0
838 ; MIPS64R6-NEXT: seleqz $1, $1, $3
839 ; MIPS64R6-NEXT: dsllv $4, $5, $7
840 ; MIPS64R6-NEXT: selnez $2, $4, $3
841 ; MIPS64R6-NEXT: or $2, $2, $1
842 ; MIPS64R6-NEXT: jr $ra
843 ; MIPS64R6-NEXT: seleqz $3, $4, $3
845 ; MMR3-LABEL: shl_i128:
846 ; MMR3: # %bb.0: # %entry
847 ; MMR3-NEXT: addiusp -40
848 ; MMR3-NEXT: .cfi_def_cfa_offset 40
849 ; MMR3-NEXT: swp $16, 32($sp)
850 ; MMR3-NEXT: .cfi_offset 17, -4
851 ; MMR3-NEXT: .cfi_offset 16, -8
852 ; MMR3-NEXT: move $17, $7
853 ; MMR3-NEXT: sw $7, 4($sp) # 4-byte Folded Spill
854 ; MMR3-NEXT: move $7, $6
855 ; MMR3-NEXT: move $1, $4
856 ; MMR3-NEXT: lw $16, 68($sp)
857 ; MMR3-NEXT: li16 $2, 64
858 ; MMR3-NEXT: subu16 $6, $2, $16
859 ; MMR3-NEXT: srlv $9, $7, $6
860 ; MMR3-NEXT: andi16 $4, $6, 32
861 ; MMR3-NEXT: sw $4, 24($sp) # 4-byte Folded Spill
862 ; MMR3-NEXT: li16 $3, 0
863 ; MMR3-NEXT: move $2, $9
864 ; MMR3-NEXT: movn $2, $3, $4
865 ; MMR3-NEXT: sllv $3, $1, $16
866 ; MMR3-NEXT: sw $3, 16($sp) # 4-byte Folded Spill
867 ; MMR3-NEXT: not16 $4, $16
868 ; MMR3-NEXT: sw $4, 20($sp) # 4-byte Folded Spill
869 ; MMR3-NEXT: sw $5, 28($sp) # 4-byte Folded Spill
870 ; MMR3-NEXT: srl16 $3, $5, 1
871 ; MMR3-NEXT: srlv $3, $3, $4
872 ; MMR3-NEXT: lw $4, 16($sp) # 4-byte Folded Reload
873 ; MMR3-NEXT: or16 $3, $4
874 ; MMR3-NEXT: sllv $5, $5, $16
875 ; MMR3-NEXT: sw $5, 8($sp) # 4-byte Folded Spill
876 ; MMR3-NEXT: andi16 $4, $16, 32
877 ; MMR3-NEXT: sw $4, 16($sp) # 4-byte Folded Spill
878 ; MMR3-NEXT: movn $3, $5, $4
879 ; MMR3-NEXT: addiu $4, $16, -64
880 ; MMR3-NEXT: or16 $3, $2
881 ; MMR3-NEXT: sllv $2, $7, $4
882 ; MMR3-NEXT: sw $2, 12($sp) # 4-byte Folded Spill
883 ; MMR3-NEXT: srl16 $5, $17, 1
884 ; MMR3-NEXT: not16 $2, $4
885 ; MMR3-NEXT: srlv $2, $5, $2
886 ; MMR3-NEXT: lw $17, 12($sp) # 4-byte Folded Reload
887 ; MMR3-NEXT: or16 $2, $17
888 ; MMR3-NEXT: lw $17, 4($sp) # 4-byte Folded Reload
889 ; MMR3-NEXT: sllv $8, $17, $4
890 ; MMR3-NEXT: andi16 $4, $4, 32
891 ; MMR3-NEXT: sw $4, 12($sp) # 4-byte Folded Spill
892 ; MMR3-NEXT: movn $2, $8, $4
893 ; MMR3-NEXT: sltiu $10, $16, 64
894 ; MMR3-NEXT: movn $2, $3, $10
895 ; MMR3-NEXT: srlv $4, $17, $6
896 ; MMR3-NEXT: not16 $3, $6
897 ; MMR3-NEXT: sll16 $6, $7, 1
898 ; MMR3-NEXT: sllv $3, $6, $3
899 ; MMR3-NEXT: or16 $3, $4
900 ; MMR3-NEXT: sllv $6, $7, $16
901 ; MMR3-NEXT: lw $4, 20($sp) # 4-byte Folded Reload
902 ; MMR3-NEXT: srlv $4, $5, $4
903 ; MMR3-NEXT: or16 $4, $6
904 ; MMR3-NEXT: sllv $6, $17, $16
905 ; MMR3-NEXT: lw $17, 16($sp) # 4-byte Folded Reload
906 ; MMR3-NEXT: movn $4, $6, $17
907 ; MMR3-NEXT: movz $2, $1, $16
908 ; MMR3-NEXT: li16 $5, 0
909 ; MMR3-NEXT: movz $4, $5, $10
910 ; MMR3-NEXT: lw $7, 24($sp) # 4-byte Folded Reload
911 ; MMR3-NEXT: movn $3, $9, $7
912 ; MMR3-NEXT: lw $5, 8($sp) # 4-byte Folded Reload
913 ; MMR3-NEXT: li16 $7, 0
914 ; MMR3-NEXT: movn $5, $7, $17
915 ; MMR3-NEXT: or16 $5, $3
916 ; MMR3-NEXT: lw $3, 12($sp) # 4-byte Folded Reload
917 ; MMR3-NEXT: movn $8, $7, $3
918 ; MMR3-NEXT: li16 $7, 0
919 ; MMR3-NEXT: movn $8, $5, $10
920 ; MMR3-NEXT: lw $3, 28($sp) # 4-byte Folded Reload
921 ; MMR3-NEXT: movz $8, $3, $16
922 ; MMR3-NEXT: movn $6, $7, $17
923 ; MMR3-NEXT: li16 $3, 0
924 ; MMR3-NEXT: movz $6, $3, $10
925 ; MMR3-NEXT: move $3, $8
926 ; MMR3-NEXT: move $5, $6
927 ; MMR3-NEXT: lwp $16, 32($sp)
928 ; MMR3-NEXT: addiusp 40
931 ; MMR6-LABEL: shl_i128:
932 ; MMR6: # %bb.0: # %entry
933 ; MMR6-NEXT: addiu $sp, $sp, -16
934 ; MMR6-NEXT: .cfi_def_cfa_offset 16
935 ; MMR6-NEXT: sw $17, 12($sp) # 4-byte Folded Spill
936 ; MMR6-NEXT: sw $16, 8($sp) # 4-byte Folded Spill
937 ; MMR6-NEXT: .cfi_offset 17, -4
938 ; MMR6-NEXT: .cfi_offset 16, -8
939 ; MMR6-NEXT: move $11, $4
940 ; MMR6-NEXT: lw $3, 44($sp)
941 ; MMR6-NEXT: sllv $1, $4, $3
942 ; MMR6-NEXT: not16 $2, $3
943 ; MMR6-NEXT: sw $2, 4($sp) # 4-byte Folded Spill
944 ; MMR6-NEXT: srl16 $16, $5, 1
945 ; MMR6-NEXT: srlv $8, $16, $2
946 ; MMR6-NEXT: or $1, $1, $8
947 ; MMR6-NEXT: sllv $8, $5, $3
948 ; MMR6-NEXT: andi16 $16, $3, 32
949 ; MMR6-NEXT: seleqz $1, $1, $16
950 ; MMR6-NEXT: selnez $9, $8, $16
951 ; MMR6-NEXT: li16 $17, 64
952 ; MMR6-NEXT: subu16 $17, $17, $3
953 ; MMR6-NEXT: srlv $10, $6, $17
954 ; MMR6-NEXT: andi16 $2, $17, 32
955 ; MMR6-NEXT: seleqz $12, $10, $2
956 ; MMR6-NEXT: or $1, $9, $1
957 ; MMR6-NEXT: selnez $9, $10, $2
958 ; MMR6-NEXT: srlv $10, $7, $17
959 ; MMR6-NEXT: not16 $17, $17
960 ; MMR6-NEXT: sll16 $4, $6, 1
961 ; MMR6-NEXT: sllv $4, $4, $17
962 ; MMR6-NEXT: or $4, $4, $10
963 ; MMR6-NEXT: seleqz $2, $4, $2
964 ; MMR6-NEXT: addiu $4, $3, -64
965 ; MMR6-NEXT: or $10, $9, $2
966 ; MMR6-NEXT: or $1, $1, $12
967 ; MMR6-NEXT: sllv $9, $6, $4
968 ; MMR6-NEXT: srl16 $2, $7, 1
969 ; MMR6-NEXT: not16 $17, $4
970 ; MMR6-NEXT: srlv $12, $2, $17
971 ; MMR6-NEXT: or $9, $9, $12
972 ; MMR6-NEXT: andi16 $17, $4, 32
973 ; MMR6-NEXT: seleqz $9, $9, $17
974 ; MMR6-NEXT: sllv $14, $7, $4
975 ; MMR6-NEXT: selnez $12, $14, $17
976 ; MMR6-NEXT: sltiu $13, $3, 64
977 ; MMR6-NEXT: selnez $1, $1, $13
978 ; MMR6-NEXT: or $9, $12, $9
979 ; MMR6-NEXT: sllv $6, $6, $3
980 ; MMR6-NEXT: lw $4, 4($sp) # 4-byte Folded Reload
981 ; MMR6-NEXT: srlv $2, $2, $4
982 ; MMR6-NEXT: seleqz $8, $8, $16
983 ; MMR6-NEXT: li16 $4, 0
984 ; MMR6-NEXT: or $8, $8, $10
985 ; MMR6-NEXT: or $6, $6, $2
986 ; MMR6-NEXT: seleqz $2, $9, $13
987 ; MMR6-NEXT: seleqz $9, $4, $13
988 ; MMR6-NEXT: sllv $7, $7, $3
989 ; MMR6-NEXT: seleqz $10, $7, $16
990 ; MMR6-NEXT: selnez $10, $10, $13
991 ; MMR6-NEXT: seleqz $11, $11, $3
992 ; MMR6-NEXT: or $1, $1, $2
993 ; MMR6-NEXT: selnez $1, $1, $3
994 ; MMR6-NEXT: or $2, $11, $1
995 ; MMR6-NEXT: or $1, $9, $10
996 ; MMR6-NEXT: seleqz $6, $6, $16
997 ; MMR6-NEXT: selnez $7, $7, $16
998 ; MMR6-NEXT: seleqz $5, $5, $3
999 ; MMR6-NEXT: selnez $8, $8, $13
1000 ; MMR6-NEXT: seleqz $4, $14, $17
1001 ; MMR6-NEXT: seleqz $4, $4, $13
1002 ; MMR6-NEXT: or $4, $8, $4
1003 ; MMR6-NEXT: selnez $3, $4, $3
1004 ; MMR6-NEXT: or $3, $5, $3
1005 ; MMR6-NEXT: or $4, $7, $6
1006 ; MMR6-NEXT: selnez $4, $4, $13
1007 ; MMR6-NEXT: or $4, $9, $4
1008 ; MMR6-NEXT: move $5, $1
1009 ; MMR6-NEXT: lw $16, 8($sp) # 4-byte Folded Reload
1010 ; MMR6-NEXT: lw $17, 12($sp) # 4-byte Folded Reload
1011 ; MMR6-NEXT: addiu $sp, $sp, 16
1012 ; MMR6-NEXT: jrc $ra
1015 ; o32 shouldn't use TImode helpers.
1016 ; GP32-NOT: lw $25, %call16(__ashlti3)($gp)
1017 ; MM-NOT: lw $25, %call16(__ashlti3)($2)
1019 %r = shl i128 %a, %b