1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -O0 -mtriple=mipsel-linux-gnu -run-pass=legalizer -verify-machineinstrs %s -o - | FileCheck %s -check-prefixes=MIPS32
5 define void @and_i1() {entry: ret void}
6 define void @and_i8() {entry: ret void}
7 define void @and_i16() {entry: ret void}
8 define void @and_i32() {entry: ret void}
9 define void @and_i64() {entry: ret void}
10 define void @or_i1() {entry: ret void}
11 define void @or_i8() {entry: ret void}
12 define void @or_i16() {entry: ret void}
13 define void @or_i32() {entry: ret void}
14 define void @or_i64() {entry: ret void}
15 define void @xor_i1() {entry: ret void}
16 define void @xor_i8() {entry: ret void}
17 define void @xor_i16() {entry: ret void}
18 define void @xor_i32() {entry: ret void}
19 define void @xor_i64() {entry: ret void}
20 define void @shl(i32) {entry: ret void}
21 define void @ashr(i32) {entry: ret void}
22 define void @lshr(i32) {entry: ret void}
23 define void @lshr_i64_shift_amount(i32) {entry: ret void}
24 define void @shlv(i32, i32) {entry: ret void}
25 define void @ashrv(i32, i32) {entry: ret void}
26 define void @lshrv(i32, i32) {entry: ret void}
27 define void @shl_i16() {entry: ret void}
28 define void @ashr_i8() {entry: ret void}
29 define void @lshr_i16() {entry: ret void}
30 define void @shl_i64() {entry: ret void}
31 define void @ashl_i64() {entry: ret void}
32 define void @lshr_i64() {entry: ret void}
38 tracksRegLiveness: true
43 ; MIPS32-LABEL: name: and_i1
44 ; MIPS32: liveins: $a0, $a1
45 ; MIPS32: [[COPY:%[0-9]+]]:_(s32) = COPY $a0
46 ; MIPS32: [[COPY1:%[0-9]+]]:_(s32) = COPY $a1
47 ; MIPS32: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY1]], [[COPY]]
48 ; MIPS32: $v0 = COPY [[AND]](s32)
49 ; MIPS32: RetRA implicit $v0
51 %0:_(s1) = G_TRUNC %2(s32)
53 %1:_(s1) = G_TRUNC %3(s32)
54 %4:_(s1) = G_AND %1, %0
55 %5:_(s32) = G_ANYEXT %4(s1)
63 tracksRegLiveness: true
68 ; MIPS32-LABEL: name: and_i8
69 ; MIPS32: liveins: $a0, $a1
70 ; MIPS32: [[COPY:%[0-9]+]]:_(s32) = COPY $a0
71 ; MIPS32: [[COPY1:%[0-9]+]]:_(s32) = COPY $a1
72 ; MIPS32: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY1]], [[COPY]]
73 ; MIPS32: $v0 = COPY [[AND]](s32)
74 ; MIPS32: RetRA implicit $v0
76 %0:_(s8) = G_TRUNC %2(s32)
78 %1:_(s8) = G_TRUNC %3(s32)
79 %4:_(s8) = G_AND %1, %0
80 %5:_(s32) = G_ANYEXT %4(s8)
88 tracksRegLiveness: true
93 ; MIPS32-LABEL: name: and_i16
94 ; MIPS32: liveins: $a0, $a1
95 ; MIPS32: [[COPY:%[0-9]+]]:_(s32) = COPY $a0
96 ; MIPS32: [[COPY1:%[0-9]+]]:_(s32) = COPY $a1
97 ; MIPS32: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY1]], [[COPY]]
98 ; MIPS32: $v0 = COPY [[AND]](s32)
99 ; MIPS32: RetRA implicit $v0
101 %0:_(s16) = G_TRUNC %2(s32)
103 %1:_(s16) = G_TRUNC %3(s32)
104 %4:_(s16) = G_AND %1, %0
105 %5:_(s32) = G_ANYEXT %4(s16)
113 tracksRegLiveness: true
118 ; MIPS32-LABEL: name: and_i32
119 ; MIPS32: liveins: $a0, $a1
120 ; MIPS32: [[COPY:%[0-9]+]]:_(s32) = COPY $a0
121 ; MIPS32: [[COPY1:%[0-9]+]]:_(s32) = COPY $a1
122 ; MIPS32: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY1]], [[COPY]]
123 ; MIPS32: $v0 = COPY [[AND]](s32)
124 ; MIPS32: RetRA implicit $v0
127 %2:_(s32) = G_AND %1, %0
135 tracksRegLiveness: true
138 liveins: $a0, $a1, $a2, $a3
140 ; MIPS32-LABEL: name: and_i64
141 ; MIPS32: liveins: $a0, $a1, $a2, $a3
142 ; MIPS32: [[COPY:%[0-9]+]]:_(s32) = COPY $a0
143 ; MIPS32: [[COPY1:%[0-9]+]]:_(s32) = COPY $a1
144 ; MIPS32: [[COPY2:%[0-9]+]]:_(s32) = COPY $a2
145 ; MIPS32: [[COPY3:%[0-9]+]]:_(s32) = COPY $a3
146 ; MIPS32: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY2]], [[COPY]]
147 ; MIPS32: [[AND1:%[0-9]+]]:_(s32) = G_AND [[COPY3]], [[COPY1]]
148 ; MIPS32: $v0 = COPY [[AND]](s32)
149 ; MIPS32: $v1 = COPY [[AND1]](s32)
150 ; MIPS32: RetRA implicit $v0, implicit $v1
153 %0:_(s64) = G_MERGE_VALUES %2(s32), %3(s32)
156 %1:_(s64) = G_MERGE_VALUES %4(s32), %5(s32)
157 %6:_(s64) = G_AND %1, %0
158 %7:_(s32), %8:_(s32) = G_UNMERGE_VALUES %6(s64)
161 RetRA implicit $v0, implicit $v1
167 tracksRegLiveness: true
172 ; MIPS32-LABEL: name: or_i1
173 ; MIPS32: liveins: $a0, $a1
174 ; MIPS32: [[COPY:%[0-9]+]]:_(s32) = COPY $a0
175 ; MIPS32: [[COPY1:%[0-9]+]]:_(s32) = COPY $a1
176 ; MIPS32: [[OR:%[0-9]+]]:_(s32) = G_OR [[COPY1]], [[COPY]]
177 ; MIPS32: $v0 = COPY [[OR]](s32)
178 ; MIPS32: RetRA implicit $v0
180 %0:_(s1) = G_TRUNC %2(s32)
182 %1:_(s1) = G_TRUNC %3(s32)
183 %4:_(s1) = G_OR %1, %0
184 %5:_(s32) = G_ANYEXT %4(s1)
192 tracksRegLiveness: true
197 ; MIPS32-LABEL: name: or_i8
198 ; MIPS32: liveins: $a0, $a1
199 ; MIPS32: [[COPY:%[0-9]+]]:_(s32) = COPY $a0
200 ; MIPS32: [[COPY1:%[0-9]+]]:_(s32) = COPY $a1
201 ; MIPS32: [[OR:%[0-9]+]]:_(s32) = G_OR [[COPY1]], [[COPY]]
202 ; MIPS32: $v0 = COPY [[OR]](s32)
203 ; MIPS32: RetRA implicit $v0
205 %0:_(s8) = G_TRUNC %2(s32)
207 %1:_(s8) = G_TRUNC %3(s32)
208 %4:_(s8) = G_OR %1, %0
209 %5:_(s32) = G_ANYEXT %4(s8)
217 tracksRegLiveness: true
222 ; MIPS32-LABEL: name: or_i16
223 ; MIPS32: liveins: $a0, $a1
224 ; MIPS32: [[COPY:%[0-9]+]]:_(s32) = COPY $a0
225 ; MIPS32: [[COPY1:%[0-9]+]]:_(s32) = COPY $a1
226 ; MIPS32: [[OR:%[0-9]+]]:_(s32) = G_OR [[COPY1]], [[COPY]]
227 ; MIPS32: $v0 = COPY [[OR]](s32)
228 ; MIPS32: RetRA implicit $v0
230 %0:_(s16) = G_TRUNC %2(s32)
232 %1:_(s16) = G_TRUNC %3(s32)
233 %4:_(s16) = G_OR %1, %0
234 %5:_(s32) = G_ANYEXT %4(s16)
242 tracksRegLiveness: true
247 ; MIPS32-LABEL: name: or_i32
248 ; MIPS32: liveins: $a0, $a1
249 ; MIPS32: [[COPY:%[0-9]+]]:_(s32) = COPY $a0
250 ; MIPS32: [[COPY1:%[0-9]+]]:_(s32) = COPY $a1
251 ; MIPS32: [[OR:%[0-9]+]]:_(s32) = G_OR [[COPY1]], [[COPY]]
252 ; MIPS32: $v0 = COPY [[OR]](s32)
253 ; MIPS32: RetRA implicit $v0
256 %2:_(s32) = G_OR %1, %0
264 tracksRegLiveness: true
267 liveins: $a0, $a1, $a2, $a3
269 ; MIPS32-LABEL: name: or_i64
270 ; MIPS32: liveins: $a0, $a1, $a2, $a3
271 ; MIPS32: [[COPY:%[0-9]+]]:_(s32) = COPY $a0
272 ; MIPS32: [[COPY1:%[0-9]+]]:_(s32) = COPY $a1
273 ; MIPS32: [[COPY2:%[0-9]+]]:_(s32) = COPY $a2
274 ; MIPS32: [[COPY3:%[0-9]+]]:_(s32) = COPY $a3
275 ; MIPS32: [[OR:%[0-9]+]]:_(s32) = G_OR [[COPY2]], [[COPY]]
276 ; MIPS32: [[OR1:%[0-9]+]]:_(s32) = G_OR [[COPY3]], [[COPY1]]
277 ; MIPS32: $v0 = COPY [[OR]](s32)
278 ; MIPS32: $v1 = COPY [[OR1]](s32)
279 ; MIPS32: RetRA implicit $v0, implicit $v1
282 %0:_(s64) = G_MERGE_VALUES %2(s32), %3(s32)
285 %1:_(s64) = G_MERGE_VALUES %4(s32), %5(s32)
286 %6:_(s64) = G_OR %1, %0
287 %7:_(s32), %8:_(s32) = G_UNMERGE_VALUES %6(s64)
290 RetRA implicit $v0, implicit $v1
296 tracksRegLiveness: true
301 ; MIPS32-LABEL: name: xor_i1
302 ; MIPS32: liveins: $a0, $a1
303 ; MIPS32: [[COPY:%[0-9]+]]:_(s32) = COPY $a0
304 ; MIPS32: [[COPY1:%[0-9]+]]:_(s32) = COPY $a1
305 ; MIPS32: [[XOR:%[0-9]+]]:_(s32) = G_XOR [[COPY1]], [[COPY]]
306 ; MIPS32: $v0 = COPY [[XOR]](s32)
307 ; MIPS32: RetRA implicit $v0
309 %0:_(s1) = G_TRUNC %2(s32)
311 %1:_(s1) = G_TRUNC %3(s32)
312 %4:_(s1) = G_XOR %1, %0
313 %5:_(s32) = G_ANYEXT %4(s1)
321 tracksRegLiveness: true
326 ; MIPS32-LABEL: name: xor_i8
327 ; MIPS32: liveins: $a0, $a1
328 ; MIPS32: [[COPY:%[0-9]+]]:_(s32) = COPY $a0
329 ; MIPS32: [[COPY1:%[0-9]+]]:_(s32) = COPY $a1
330 ; MIPS32: [[XOR:%[0-9]+]]:_(s32) = G_XOR [[COPY1]], [[COPY]]
331 ; MIPS32: $v0 = COPY [[XOR]](s32)
332 ; MIPS32: RetRA implicit $v0
334 %0:_(s8) = G_TRUNC %2(s32)
336 %1:_(s8) = G_TRUNC %3(s32)
337 %4:_(s8) = G_XOR %1, %0
338 %5:_(s32) = G_ANYEXT %4(s8)
346 tracksRegLiveness: true
351 ; MIPS32-LABEL: name: xor_i16
352 ; MIPS32: liveins: $a0, $a1
353 ; MIPS32: [[COPY:%[0-9]+]]:_(s32) = COPY $a0
354 ; MIPS32: [[COPY1:%[0-9]+]]:_(s32) = COPY $a1
355 ; MIPS32: [[XOR:%[0-9]+]]:_(s32) = G_XOR [[COPY1]], [[COPY]]
356 ; MIPS32: $v0 = COPY [[XOR]](s32)
357 ; MIPS32: RetRA implicit $v0
359 %0:_(s16) = G_TRUNC %2(s32)
361 %1:_(s16) = G_TRUNC %3(s32)
362 %4:_(s16) = G_XOR %1, %0
363 %5:_(s32) = G_ANYEXT %4(s16)
371 tracksRegLiveness: true
376 ; MIPS32-LABEL: name: xor_i32
377 ; MIPS32: liveins: $a0, $a1
378 ; MIPS32: [[COPY:%[0-9]+]]:_(s32) = COPY $a0
379 ; MIPS32: [[COPY1:%[0-9]+]]:_(s32) = COPY $a1
380 ; MIPS32: [[XOR:%[0-9]+]]:_(s32) = G_XOR [[COPY1]], [[COPY]]
381 ; MIPS32: $v0 = COPY [[XOR]](s32)
382 ; MIPS32: RetRA implicit $v0
385 %2:_(s32) = G_XOR %1, %0
393 tracksRegLiveness: true
396 liveins: $a0, $a1, $a2, $a3
398 ; MIPS32-LABEL: name: xor_i64
399 ; MIPS32: liveins: $a0, $a1, $a2, $a3
400 ; MIPS32: [[COPY:%[0-9]+]]:_(s32) = COPY $a0
401 ; MIPS32: [[COPY1:%[0-9]+]]:_(s32) = COPY $a1
402 ; MIPS32: [[COPY2:%[0-9]+]]:_(s32) = COPY $a2
403 ; MIPS32: [[COPY3:%[0-9]+]]:_(s32) = COPY $a3
404 ; MIPS32: [[XOR:%[0-9]+]]:_(s32) = G_XOR [[COPY2]], [[COPY]]
405 ; MIPS32: [[XOR1:%[0-9]+]]:_(s32) = G_XOR [[COPY3]], [[COPY1]]
406 ; MIPS32: $v0 = COPY [[XOR]](s32)
407 ; MIPS32: $v1 = COPY [[XOR1]](s32)
408 ; MIPS32: RetRA implicit $v0, implicit $v1
411 %0:_(s64) = G_MERGE_VALUES %2(s32), %3(s32)
414 %1:_(s64) = G_MERGE_VALUES %4(s32), %5(s32)
415 %6:_(s64) = G_XOR %1, %0
416 %7:_(s32), %8:_(s32) = G_UNMERGE_VALUES %6(s64)
419 RetRA implicit $v0, implicit $v1
425 tracksRegLiveness: true
430 ; MIPS32-LABEL: name: shl
431 ; MIPS32: liveins: $a0
432 ; MIPS32: [[COPY:%[0-9]+]]:_(s32) = COPY $a0
433 ; MIPS32: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
434 ; MIPS32: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[COPY]], [[C]](s32)
435 ; MIPS32: $v0 = COPY [[SHL]](s32)
436 ; MIPS32: RetRA implicit $v0
438 %1:_(s32) = G_CONSTANT i32 1
439 %2:_(s32) = G_SHL %0, %1
447 tracksRegLiveness: true
452 ; MIPS32-LABEL: name: ashr
453 ; MIPS32: liveins: $a0
454 ; MIPS32: [[COPY:%[0-9]+]]:_(s32) = COPY $a0
455 ; MIPS32: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
456 ; MIPS32: [[ASHR:%[0-9]+]]:_(s32) = G_ASHR [[COPY]], [[C]](s32)
457 ; MIPS32: $v0 = COPY [[ASHR]](s32)
458 ; MIPS32: RetRA implicit $v0
460 %1:_(s32) = G_CONSTANT i32 1
461 %2:_(s32) = G_ASHR %0, %1
469 tracksRegLiveness: true
474 ; MIPS32-LABEL: name: lshr
475 ; MIPS32: liveins: $a0
476 ; MIPS32: [[COPY:%[0-9]+]]:_(s32) = COPY $a0
477 ; MIPS32: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
478 ; MIPS32: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[COPY]], [[C]](s32)
479 ; MIPS32: $v0 = COPY [[LSHR]](s32)
480 ; MIPS32: RetRA implicit $v0
482 %1:_(s32) = G_CONSTANT i32 1
483 %2:_(s32) = G_LSHR %0, %1
489 name: lshr_i64_shift_amount
491 tracksRegLiveness: true
496 ; MIPS32-LABEL: name: lshr_i64_shift_amount
497 ; MIPS32: liveins: $a0
498 ; MIPS32: [[COPY:%[0-9]+]]:_(s32) = COPY $a0
499 ; MIPS32: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
500 ; MIPS32: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[COPY]], [[C]](s32)
501 ; MIPS32: $v0 = COPY [[LSHR]](s32)
502 ; MIPS32: RetRA implicit $v0
504 %1:_(s64) = G_CONSTANT i64 1
505 %2:_(s32) = G_LSHR %0, %1
513 tracksRegLiveness: true
518 ; MIPS32-LABEL: name: shlv
519 ; MIPS32: liveins: $a0, $a1
520 ; MIPS32: [[COPY:%[0-9]+]]:_(s32) = COPY $a0
521 ; MIPS32: [[COPY1:%[0-9]+]]:_(s32) = COPY $a1
522 ; MIPS32: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[COPY]], [[COPY1]](s32)
523 ; MIPS32: $v0 = COPY [[SHL]](s32)
524 ; MIPS32: RetRA implicit $v0
527 %2:_(s32) = G_SHL %0, %1
535 tracksRegLiveness: true
540 ; MIPS32-LABEL: name: ashrv
541 ; MIPS32: liveins: $a0, $a1
542 ; MIPS32: [[COPY:%[0-9]+]]:_(s32) = COPY $a0
543 ; MIPS32: [[COPY1:%[0-9]+]]:_(s32) = COPY $a1
544 ; MIPS32: [[ASHR:%[0-9]+]]:_(s32) = G_ASHR [[COPY]], [[COPY1]](s32)
545 ; MIPS32: $v0 = COPY [[ASHR]](s32)
546 ; MIPS32: RetRA implicit $v0
549 %2:_(s32) = G_ASHR %0, %1
557 tracksRegLiveness: true
562 ; MIPS32-LABEL: name: lshrv
563 ; MIPS32: liveins: $a0, $a1
564 ; MIPS32: [[COPY:%[0-9]+]]:_(s32) = COPY $a0
565 ; MIPS32: [[COPY1:%[0-9]+]]:_(s32) = COPY $a1
566 ; MIPS32: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[COPY]], [[COPY1]](s32)
567 ; MIPS32: $v0 = COPY [[LSHR]](s32)
568 ; MIPS32: RetRA implicit $v0
571 %2:_(s32) = G_LSHR %0, %1
579 tracksRegLiveness: true
584 ; MIPS32-LABEL: name: shl_i16
585 ; MIPS32: liveins: $a0
586 ; MIPS32: [[COPY:%[0-9]+]]:_(s32) = COPY $a0
587 ; MIPS32: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 2
588 ; MIPS32: [[COPY1:%[0-9]+]]:_(s32) = COPY [[C]](s32)
589 ; MIPS32: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[COPY]], [[COPY1]](s32)
590 ; MIPS32: $v0 = COPY [[SHL]](s32)
591 ; MIPS32: RetRA implicit $v0
593 %0:_(s16) = G_TRUNC %1(s32)
594 %2:_(s16) = G_CONSTANT i16 2
595 %3:_(s16) = G_SHL %0, %2(s16)
596 %4:_(s32) = G_ANYEXT %3(s16)
604 tracksRegLiveness: true
609 ; MIPS32-LABEL: name: ashr_i8
610 ; MIPS32: liveins: $a0
611 ; MIPS32: [[COPY:%[0-9]+]]:_(s32) = COPY $a0
612 ; MIPS32: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 2
613 ; MIPS32: [[COPY1:%[0-9]+]]:_(s32) = COPY [[C]](s32)
614 ; MIPS32: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 24
615 ; MIPS32: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[COPY]], [[C1]](s32)
616 ; MIPS32: [[ASHR:%[0-9]+]]:_(s32) = G_ASHR [[SHL]], [[C1]](s32)
617 ; MIPS32: [[ASHR1:%[0-9]+]]:_(s32) = G_ASHR [[ASHR]], [[COPY1]](s32)
618 ; MIPS32: $v0 = COPY [[ASHR1]](s32)
619 ; MIPS32: RetRA implicit $v0
621 %0:_(s8) = G_TRUNC %1(s32)
622 %2:_(s8) = G_CONSTANT i8 2
623 %3:_(s8) = G_ASHR %0, %2(s8)
624 %4:_(s32) = G_ANYEXT %3(s8)
632 tracksRegLiveness: true
637 ; MIPS32-LABEL: name: lshr_i16
638 ; MIPS32: liveins: $a0
639 ; MIPS32: [[COPY:%[0-9]+]]:_(s32) = COPY $a0
640 ; MIPS32: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 2
641 ; MIPS32: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535
642 ; MIPS32: [[COPY1:%[0-9]+]]:_(s32) = COPY [[C]](s32)
643 ; MIPS32: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY]], [[C1]]
644 ; MIPS32: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[AND]], [[COPY1]](s32)
645 ; MIPS32: $v0 = COPY [[LSHR]](s32)
646 ; MIPS32: RetRA implicit $v0
648 %0:_(s16) = G_TRUNC %1(s32)
649 %2:_(s16) = G_CONSTANT i16 2
650 %3:_(s16) = G_LSHR %0, %2(s16)
651 %4:_(s32) = G_ANYEXT %3(s16)
659 tracksRegLiveness: true
662 liveins: $a0, $a1, $a2, $a3
664 ; MIPS32-LABEL: name: shl_i64
665 ; MIPS32: liveins: $a0, $a1, $a2, $a3
666 ; MIPS32: [[COPY:%[0-9]+]]:_(s32) = COPY $a0
667 ; MIPS32: [[COPY1:%[0-9]+]]:_(s32) = COPY $a1
668 ; MIPS32: [[COPY2:%[0-9]+]]:_(s32) = COPY $a2
669 ; MIPS32: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 32
670 ; MIPS32: [[SUB:%[0-9]+]]:_(s32) = G_SUB [[COPY2]], [[C]]
671 ; MIPS32: [[SUB1:%[0-9]+]]:_(s32) = G_SUB [[C]], [[COPY2]]
672 ; MIPS32: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
673 ; MIPS32: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(ult), [[COPY2]](s32), [[C]]
674 ; MIPS32: [[ICMP1:%[0-9]+]]:_(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C1]]
675 ; MIPS32: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[COPY]], [[COPY2]](s32)
676 ; MIPS32: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[COPY]], [[SUB1]](s32)
677 ; MIPS32: [[SHL1:%[0-9]+]]:_(s32) = G_SHL [[COPY1]], [[COPY2]](s32)
678 ; MIPS32: [[OR:%[0-9]+]]:_(s32) = G_OR [[LSHR]], [[SHL1]]
679 ; MIPS32: [[SHL2:%[0-9]+]]:_(s32) = G_SHL [[COPY]], [[SUB]](s32)
680 ; MIPS32: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
681 ; MIPS32: [[AND:%[0-9]+]]:_(s32) = G_AND [[ICMP]], [[C2]]
682 ; MIPS32: [[SELECT:%[0-9]+]]:_(s32) = G_SELECT [[AND]](s32), [[SHL]], [[C1]]
683 ; MIPS32: [[AND1:%[0-9]+]]:_(s32) = G_AND [[ICMP]], [[C2]]
684 ; MIPS32: [[SELECT1:%[0-9]+]]:_(s32) = G_SELECT [[AND1]](s32), [[OR]], [[SHL2]]
685 ; MIPS32: [[AND2:%[0-9]+]]:_(s32) = G_AND [[ICMP1]], [[C2]]
686 ; MIPS32: [[SELECT2:%[0-9]+]]:_(s32) = G_SELECT [[AND2]](s32), [[COPY1]], [[SELECT1]]
687 ; MIPS32: $v0 = COPY [[SELECT]](s32)
688 ; MIPS32: $v1 = COPY [[SELECT2]](s32)
689 ; MIPS32: RetRA implicit $v0, implicit $v1
692 %0:_(s64) = G_MERGE_VALUES %2(s32), %3(s32)
695 %1:_(s64) = G_MERGE_VALUES %4(s32), %5(s32)
696 %6:_(s64) = G_SHL %0, %1(s64)
697 %7:_(s32), %8:_(s32) = G_UNMERGE_VALUES %6(s64)
700 RetRA implicit $v0, implicit $v1
706 tracksRegLiveness: true
709 liveins: $a0, $a1, $a2, $a3
711 ; MIPS32-LABEL: name: ashl_i64
712 ; MIPS32: liveins: $a0, $a1, $a2, $a3
713 ; MIPS32: [[COPY:%[0-9]+]]:_(s32) = COPY $a0
714 ; MIPS32: [[COPY1:%[0-9]+]]:_(s32) = COPY $a1
715 ; MIPS32: [[COPY2:%[0-9]+]]:_(s32) = COPY $a2
716 ; MIPS32: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 32
717 ; MIPS32: [[SUB:%[0-9]+]]:_(s32) = G_SUB [[COPY2]], [[C]]
718 ; MIPS32: [[SUB1:%[0-9]+]]:_(s32) = G_SUB [[C]], [[COPY2]]
719 ; MIPS32: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
720 ; MIPS32: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(ult), [[COPY2]](s32), [[C]]
721 ; MIPS32: [[ICMP1:%[0-9]+]]:_(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C1]]
722 ; MIPS32: [[ASHR:%[0-9]+]]:_(s32) = G_ASHR [[COPY1]], [[COPY2]](s32)
723 ; MIPS32: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[COPY]], [[COPY2]](s32)
724 ; MIPS32: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[COPY1]], [[SUB1]](s32)
725 ; MIPS32: [[OR:%[0-9]+]]:_(s32) = G_OR [[LSHR]], [[SHL]]
726 ; MIPS32: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 31
727 ; MIPS32: [[ASHR1:%[0-9]+]]:_(s32) = G_ASHR [[COPY1]], [[C2]](s32)
728 ; MIPS32: [[ASHR2:%[0-9]+]]:_(s32) = G_ASHR [[COPY1]], [[SUB]](s32)
729 ; MIPS32: [[C3:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
730 ; MIPS32: [[AND:%[0-9]+]]:_(s32) = G_AND [[ICMP]], [[C3]]
731 ; MIPS32: [[SELECT:%[0-9]+]]:_(s32) = G_SELECT [[AND]](s32), [[OR]], [[ASHR2]]
732 ; MIPS32: [[AND1:%[0-9]+]]:_(s32) = G_AND [[ICMP1]], [[C3]]
733 ; MIPS32: [[SELECT1:%[0-9]+]]:_(s32) = G_SELECT [[AND1]](s32), [[COPY]], [[SELECT]]
734 ; MIPS32: [[AND2:%[0-9]+]]:_(s32) = G_AND [[ICMP]], [[C3]]
735 ; MIPS32: [[SELECT2:%[0-9]+]]:_(s32) = G_SELECT [[AND2]](s32), [[ASHR]], [[ASHR1]]
736 ; MIPS32: $v0 = COPY [[SELECT1]](s32)
737 ; MIPS32: $v1 = COPY [[SELECT2]](s32)
738 ; MIPS32: RetRA implicit $v0, implicit $v1
741 %0:_(s64) = G_MERGE_VALUES %2(s32), %3(s32)
744 %1:_(s64) = G_MERGE_VALUES %4(s32), %5(s32)
745 %6:_(s64) = G_ASHR %0, %1(s64)
746 %7:_(s32), %8:_(s32) = G_UNMERGE_VALUES %6(s64)
749 RetRA implicit $v0, implicit $v1
755 tracksRegLiveness: true
758 liveins: $a0, $a1, $a2, $a3
760 ; MIPS32-LABEL: name: lshr_i64
761 ; MIPS32: liveins: $a0, $a1, $a2, $a3
762 ; MIPS32: [[COPY:%[0-9]+]]:_(s32) = COPY $a0
763 ; MIPS32: [[COPY1:%[0-9]+]]:_(s32) = COPY $a1
764 ; MIPS32: [[COPY2:%[0-9]+]]:_(s32) = COPY $a2
765 ; MIPS32: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 32
766 ; MIPS32: [[SUB:%[0-9]+]]:_(s32) = G_SUB [[COPY2]], [[C]]
767 ; MIPS32: [[SUB1:%[0-9]+]]:_(s32) = G_SUB [[C]], [[COPY2]]
768 ; MIPS32: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
769 ; MIPS32: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(ult), [[COPY2]](s32), [[C]]
770 ; MIPS32: [[ICMP1:%[0-9]+]]:_(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C1]]
771 ; MIPS32: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[COPY1]], [[COPY2]](s32)
772 ; MIPS32: [[LSHR1:%[0-9]+]]:_(s32) = G_LSHR [[COPY]], [[COPY2]](s32)
773 ; MIPS32: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[COPY1]], [[SUB1]](s32)
774 ; MIPS32: [[OR:%[0-9]+]]:_(s32) = G_OR [[LSHR1]], [[SHL]]
775 ; MIPS32: [[LSHR2:%[0-9]+]]:_(s32) = G_LSHR [[COPY1]], [[SUB]](s32)
776 ; MIPS32: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
777 ; MIPS32: [[AND:%[0-9]+]]:_(s32) = G_AND [[ICMP]], [[C2]]
778 ; MIPS32: [[SELECT:%[0-9]+]]:_(s32) = G_SELECT [[AND]](s32), [[OR]], [[LSHR2]]
779 ; MIPS32: [[AND1:%[0-9]+]]:_(s32) = G_AND [[ICMP1]], [[C2]]
780 ; MIPS32: [[SELECT1:%[0-9]+]]:_(s32) = G_SELECT [[AND1]](s32), [[COPY]], [[SELECT]]
781 ; MIPS32: [[AND2:%[0-9]+]]:_(s32) = G_AND [[ICMP]], [[C2]]
782 ; MIPS32: [[SELECT2:%[0-9]+]]:_(s32) = G_SELECT [[AND2]](s32), [[LSHR]], [[C1]]
783 ; MIPS32: $v0 = COPY [[SELECT1]](s32)
784 ; MIPS32: $v1 = COPY [[SELECT2]](s32)
785 ; MIPS32: RetRA implicit $v0, implicit $v1
788 %0:_(s64) = G_MERGE_VALUES %2(s32), %3(s32)
791 %1:_(s64) = G_MERGE_VALUES %4(s32), %5(s32)
792 %6:_(s64) = G_LSHR %0, %1(s64)
793 %7:_(s32), %8:_(s32) = G_UNMERGE_VALUES %6(s64)
796 RetRA implicit $v0, implicit $v1