1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -O0 -mtriple=mipsel-linux-gnu -run-pass=regbankselect -verify-machineinstrs %s -o - | FileCheck %s -check-prefixes=MIPS32
6 define void @and_i32() {entry: ret void}
7 define void @or_i32() {entry: ret void}
8 define void @xor_i32() {entry: ret void}
9 define void @shl(i32) {entry: ret void}
10 define void @ashr(i32) {entry: ret void}
11 define void @lshr(i32) {entry: ret void}
12 define void @shlv(i32, i32) {entry: ret void}
13 define void @ashrv(i32, i32) {entry: ret void}
14 define void @lshrv(i32, i32) {entry: ret void}
21 tracksRegLiveness: true
26 ; MIPS32-LABEL: name: and_i32
27 ; MIPS32: liveins: $a0, $a1
28 ; MIPS32: [[COPY:%[0-9]+]]:gprb(s32) = COPY $a0
29 ; MIPS32: [[COPY1:%[0-9]+]]:gprb(s32) = COPY $a1
30 ; MIPS32: [[AND:%[0-9]+]]:gprb(s32) = G_AND [[COPY1]], [[COPY]]
31 ; MIPS32: $v0 = COPY [[AND]](s32)
32 ; MIPS32: RetRA implicit $v0
35 %2:_(s32) = G_AND %1, %0
44 tracksRegLiveness: true
49 ; MIPS32-LABEL: name: or_i32
50 ; MIPS32: liveins: $a0, $a1
51 ; MIPS32: [[COPY:%[0-9]+]]:gprb(s32) = COPY $a0
52 ; MIPS32: [[COPY1:%[0-9]+]]:gprb(s32) = COPY $a1
53 ; MIPS32: [[OR:%[0-9]+]]:gprb(s32) = G_OR [[COPY1]], [[COPY]]
54 ; MIPS32: $v0 = COPY [[OR]](s32)
55 ; MIPS32: RetRA implicit $v0
58 %2:_(s32) = G_OR %1, %0
67 tracksRegLiveness: true
72 ; MIPS32-LABEL: name: xor_i32
73 ; MIPS32: liveins: $a0, $a1
74 ; MIPS32: [[COPY:%[0-9]+]]:gprb(s32) = COPY $a0
75 ; MIPS32: [[COPY1:%[0-9]+]]:gprb(s32) = COPY $a1
76 ; MIPS32: [[XOR:%[0-9]+]]:gprb(s32) = G_XOR [[COPY1]], [[COPY]]
77 ; MIPS32: $v0 = COPY [[XOR]](s32)
78 ; MIPS32: RetRA implicit $v0
81 %2:_(s32) = G_XOR %1, %0
90 tracksRegLiveness: true
95 ; MIPS32-LABEL: name: shl
96 ; MIPS32: liveins: $a0
97 ; MIPS32: [[COPY:%[0-9]+]]:gprb(s32) = COPY $a0
98 ; MIPS32: [[C:%[0-9]+]]:gprb(s32) = G_CONSTANT i32 1
99 ; MIPS32: [[SHL:%[0-9]+]]:gprb(s32) = G_SHL [[COPY]], [[C]]
100 ; MIPS32: $v0 = COPY [[SHL]](s32)
101 ; MIPS32: RetRA implicit $v0
103 %1:_(s32) = G_CONSTANT i32 1
104 %2:_(s32) = G_SHL %0, %1
113 tracksRegLiveness: true
118 ; MIPS32-LABEL: name: ashr
119 ; MIPS32: liveins: $a0
120 ; MIPS32: [[COPY:%[0-9]+]]:gprb(s32) = COPY $a0
121 ; MIPS32: [[C:%[0-9]+]]:gprb(s32) = G_CONSTANT i32 1
122 ; MIPS32: [[ASHR:%[0-9]+]]:gprb(s32) = G_ASHR [[COPY]], [[C]]
123 ; MIPS32: $v0 = COPY [[ASHR]](s32)
124 ; MIPS32: RetRA implicit $v0
126 %1:_(s32) = G_CONSTANT i32 1
127 %2:_(s32) = G_ASHR %0, %1
136 tracksRegLiveness: true
141 ; MIPS32-LABEL: name: lshr
142 ; MIPS32: liveins: $a0
143 ; MIPS32: [[COPY:%[0-9]+]]:gprb(s32) = COPY $a0
144 ; MIPS32: [[C:%[0-9]+]]:gprb(s32) = G_CONSTANT i32 1
145 ; MIPS32: [[LSHR:%[0-9]+]]:gprb(s32) = G_LSHR [[COPY]], [[C]]
146 ; MIPS32: $v0 = COPY [[LSHR]](s32)
147 ; MIPS32: RetRA implicit $v0
149 %1:_(s32) = G_CONSTANT i32 1
150 %2:_(s32) = G_LSHR %0, %1
159 tracksRegLiveness: true
164 ; MIPS32-LABEL: name: shlv
165 ; MIPS32: liveins: $a0, $a1
166 ; MIPS32: [[COPY:%[0-9]+]]:gprb(s32) = COPY $a0
167 ; MIPS32: [[COPY1:%[0-9]+]]:gprb(s32) = COPY $a1
168 ; MIPS32: [[SHL:%[0-9]+]]:gprb(s32) = G_SHL [[COPY]], [[COPY1]]
169 ; MIPS32: $v0 = COPY [[SHL]](s32)
170 ; MIPS32: RetRA implicit $v0
173 %2:_(s32) = G_SHL %0, %1
182 tracksRegLiveness: true
187 ; MIPS32-LABEL: name: ashrv
188 ; MIPS32: liveins: $a0, $a1
189 ; MIPS32: [[COPY:%[0-9]+]]:gprb(s32) = COPY $a0
190 ; MIPS32: [[COPY1:%[0-9]+]]:gprb(s32) = COPY $a1
191 ; MIPS32: [[ASHR:%[0-9]+]]:gprb(s32) = G_ASHR [[COPY]], [[COPY1]]
192 ; MIPS32: $v0 = COPY [[ASHR]](s32)
193 ; MIPS32: RetRA implicit $v0
196 %2:_(s32) = G_ASHR %0, %1
205 tracksRegLiveness: true
210 ; MIPS32-LABEL: name: lshrv
211 ; MIPS32: liveins: $a0, $a1
212 ; MIPS32: [[COPY:%[0-9]+]]:gprb(s32) = COPY $a0
213 ; MIPS32: [[COPY1:%[0-9]+]]:gprb(s32) = COPY $a1
214 ; MIPS32: [[LSHR:%[0-9]+]]:gprb(s32) = G_LSHR [[COPY]], [[COPY1]]
215 ; MIPS32: $v0 = COPY [[LSHR]](s32)
216 ; MIPS32: RetRA implicit $v0
219 %2:_(s32) = G_LSHR %0, %1