1 ; NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 ; RUN: llc -O0 -mtriple=mipsel-linux-gnu -global-isel -stop-after=irtranslator -verify-machineinstrs %s -o - | FileCheck %s -check-prefixes=MIPS32
4 define i32 @shl(i32 %a) {
5 ; MIPS32-LABEL: name: shl
8 ; MIPS32: [[COPY:%[0-9]+]]:_(s32) = COPY $a0
9 ; MIPS32: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
10 ; MIPS32: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[COPY]], [[C]]
11 ; MIPS32: $v0 = COPY [[SHL]](s32)
12 ; MIPS32: RetRA implicit $v0
18 define i32 @ashr(i32 %a) {
19 ; MIPS32-LABEL: name: ashr
21 ; MIPS32: liveins: $a0
22 ; MIPS32: [[COPY:%[0-9]+]]:_(s32) = COPY $a0
23 ; MIPS32: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
24 ; MIPS32: [[ASHR:%[0-9]+]]:_(s32) = G_ASHR [[COPY]], [[C]]
25 ; MIPS32: $v0 = COPY [[ASHR]](s32)
26 ; MIPS32: RetRA implicit $v0
32 define i32 @lshr(i32 %a) {
33 ; MIPS32-LABEL: name: lshr
35 ; MIPS32: liveins: $a0
36 ; MIPS32: [[COPY:%[0-9]+]]:_(s32) = COPY $a0
37 ; MIPS32: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
38 ; MIPS32: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[COPY]], [[C]]
39 ; MIPS32: $v0 = COPY [[LSHR]](s32)
40 ; MIPS32: RetRA implicit $v0
46 define i32 @shlv(i32 %a, i32 %b) {
47 ; MIPS32-LABEL: name: shlv
49 ; MIPS32: liveins: $a0, $a1
50 ; MIPS32: [[COPY:%[0-9]+]]:_(s32) = COPY $a0
51 ; MIPS32: [[COPY1:%[0-9]+]]:_(s32) = COPY $a1
52 ; MIPS32: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[COPY]], [[COPY1]]
53 ; MIPS32: $v0 = COPY [[SHL]](s32)
54 ; MIPS32: RetRA implicit $v0
60 define i32 @ashrv(i32 %a, i32 %b) {
61 ; MIPS32-LABEL: name: ashrv
63 ; MIPS32: liveins: $a0, $a1
64 ; MIPS32: [[COPY:%[0-9]+]]:_(s32) = COPY $a0
65 ; MIPS32: [[COPY1:%[0-9]+]]:_(s32) = COPY $a1
66 ; MIPS32: [[ASHR:%[0-9]+]]:_(s32) = G_ASHR [[COPY]], [[COPY1]]
67 ; MIPS32: $v0 = COPY [[ASHR]](s32)
68 ; MIPS32: RetRA implicit $v0
70 %shr = ashr i32 %a, %b
74 define i32 @lshrv(i32 %a, i32 %b) {
75 ; MIPS32-LABEL: name: lshrv
77 ; MIPS32: liveins: $a0, $a1
78 ; MIPS32: [[COPY:%[0-9]+]]:_(s32) = COPY $a0
79 ; MIPS32: [[COPY1:%[0-9]+]]:_(s32) = COPY $a1
80 ; MIPS32: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[COPY]], [[COPY1]]
81 ; MIPS32: $v0 = COPY [[LSHR]](s32)
82 ; MIPS32: RetRA implicit $v0
84 %shr = lshr i32 %a, %b