1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -O0 -mtriple=mipsel-linux-gnu -run-pass=instruction-select -verify-machineinstrs %s -o - | FileCheck %s -check-prefixes=MIPS32
5 define void @and_i32() {entry: ret void}
6 define void @or_i32() {entry: ret void}
7 define void @xor_i32() {entry: ret void}
8 define void @shl(i32) {entry: ret void}
9 define void @ashr(i32) {entry: ret void}
10 define void @lshr(i32) {entry: ret void}
11 define void @shlv(i32, i32) {entry: ret void}
12 define void @ashrv(i32, i32) {entry: ret void}
13 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]+]]:gpr32 = COPY $a0
29 ; MIPS32: [[COPY1:%[0-9]+]]:gpr32 = COPY $a1
30 ; MIPS32: [[AND:%[0-9]+]]:gpr32 = AND [[COPY1]], [[COPY]]
31 ; MIPS32: $v0 = COPY [[AND]]
32 ; MIPS32: RetRA implicit $v0
33 %0:gprb(s32) = COPY $a0
34 %1:gprb(s32) = COPY $a1
35 %2:gprb(s32) = G_AND %1, %0
45 tracksRegLiveness: true
50 ; MIPS32-LABEL: name: or_i32
51 ; MIPS32: liveins: $a0, $a1
52 ; MIPS32: [[COPY:%[0-9]+]]:gpr32 = COPY $a0
53 ; MIPS32: [[COPY1:%[0-9]+]]:gpr32 = COPY $a1
54 ; MIPS32: [[OR:%[0-9]+]]:gpr32 = OR [[COPY1]], [[COPY]]
55 ; MIPS32: $v0 = COPY [[OR]]
56 ; MIPS32: RetRA implicit $v0
57 %0:gprb(s32) = COPY $a0
58 %1:gprb(s32) = COPY $a1
59 %2:gprb(s32) = G_OR %1, %0
69 tracksRegLiveness: true
74 ; MIPS32-LABEL: name: xor_i32
75 ; MIPS32: liveins: $a0, $a1
76 ; MIPS32: [[COPY:%[0-9]+]]:gpr32 = COPY $a0
77 ; MIPS32: [[COPY1:%[0-9]+]]:gpr32 = COPY $a1
78 ; MIPS32: [[XOR:%[0-9]+]]:gpr32 = XOR [[COPY1]], [[COPY]]
79 ; MIPS32: $v0 = COPY [[XOR]]
80 ; MIPS32: RetRA implicit $v0
81 %0:gprb(s32) = COPY $a0
82 %1:gprb(s32) = COPY $a1
83 %2:gprb(s32) = G_XOR %1, %0
93 tracksRegLiveness: true
98 ; MIPS32-LABEL: name: shl
99 ; MIPS32: liveins: $a0
100 ; MIPS32: [[COPY:%[0-9]+]]:gpr32 = COPY $a0
101 ; MIPS32: [[SLL:%[0-9]+]]:gpr32 = SLL [[COPY]], 1
102 ; MIPS32: $v0 = COPY [[SLL]]
103 ; MIPS32: RetRA implicit $v0
104 %0:gprb(s32) = COPY $a0
105 %1:gprb(s32) = G_CONSTANT i32 1
106 %2:gprb(s32) = G_SHL %0, %1
115 regBankSelected: true
116 tracksRegLiveness: true
121 ; MIPS32-LABEL: name: ashr
122 ; MIPS32: liveins: $a0
123 ; MIPS32: [[COPY:%[0-9]+]]:gpr32 = COPY $a0
124 ; MIPS32: [[SRA:%[0-9]+]]:gpr32 = SRA [[COPY]], 1
125 ; MIPS32: $v0 = COPY [[SRA]]
126 ; MIPS32: RetRA implicit $v0
127 %0:gprb(s32) = COPY $a0
128 %1:gprb(s32) = G_CONSTANT i32 1
129 %2:gprb(s32) = G_ASHR %0, %1
138 regBankSelected: true
139 tracksRegLiveness: true
144 ; MIPS32-LABEL: name: lshr
145 ; MIPS32: liveins: $a0
146 ; MIPS32: [[COPY:%[0-9]+]]:gpr32 = COPY $a0
147 ; MIPS32: [[SRL:%[0-9]+]]:gpr32 = SRL [[COPY]], 1
148 ; MIPS32: $v0 = COPY [[SRL]]
149 ; MIPS32: RetRA implicit $v0
150 %0:gprb(s32) = COPY $a0
151 %1:gprb(s32) = G_CONSTANT i32 1
152 %2:gprb(s32) = G_LSHR %0, %1
161 regBankSelected: true
162 tracksRegLiveness: true
167 ; MIPS32-LABEL: name: shlv
168 ; MIPS32: liveins: $a0, $a1
169 ; MIPS32: [[COPY:%[0-9]+]]:gpr32 = COPY $a0
170 ; MIPS32: [[COPY1:%[0-9]+]]:gpr32 = COPY $a1
171 ; MIPS32: [[SLLV:%[0-9]+]]:gpr32 = SLLV [[COPY]], [[COPY1]]
172 ; MIPS32: $v0 = COPY [[SLLV]]
173 ; MIPS32: RetRA implicit $v0
174 %0:gprb(s32) = COPY $a0
175 %1:gprb(s32) = COPY $a1
176 %2:gprb(s32) = G_SHL %0, %1
185 regBankSelected: true
186 tracksRegLiveness: true
191 ; MIPS32-LABEL: name: ashrv
192 ; MIPS32: liveins: $a0, $a1
193 ; MIPS32: [[COPY:%[0-9]+]]:gpr32 = COPY $a0
194 ; MIPS32: [[COPY1:%[0-9]+]]:gpr32 = COPY $a1
195 ; MIPS32: [[SRAV:%[0-9]+]]:gpr32 = SRAV [[COPY]], [[COPY1]]
196 ; MIPS32: $v0 = COPY [[SRAV]]
197 ; MIPS32: RetRA implicit $v0
198 %0:gprb(s32) = COPY $a0
199 %1:gprb(s32) = COPY $a1
200 %2:gprb(s32) = G_ASHR %0, %1
209 regBankSelected: true
210 tracksRegLiveness: true
215 ; MIPS32-LABEL: name: lshrv
216 ; MIPS32: liveins: $a0, $a1
217 ; MIPS32: [[COPY:%[0-9]+]]:gpr32 = COPY $a0
218 ; MIPS32: [[COPY1:%[0-9]+]]:gpr32 = COPY $a1
219 ; MIPS32: [[SRLV:%[0-9]+]]:gpr32 = SRLV [[COPY]], [[COPY1]]
220 ; MIPS32: $v0 = COPY [[SRLV]]
221 ; MIPS32: RetRA implicit $v0
222 %0:gprb(s32) = COPY $a0
223 %1:gprb(s32) = COPY $a1
224 %2:gprb(s32) = G_LSHR %0, %1