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 @eq() {entry: ret void}
6 define void @ne() {entry: ret void}
7 define void @sgt() {entry: ret void}
8 define void @sge() {entry: ret void}
9 define void @slt() {entry: ret void}
10 define void @sle() {entry: ret void}
11 define void @ugt() {entry: ret void}
12 define void @uge() {entry: ret void}
13 define void @ult() {entry: ret void}
14 define void @ule() {entry: ret void}
20 tracksRegLiveness: true
25 ; MIPS32-LABEL: name: eq
26 ; MIPS32: liveins: $a0, $a1
27 ; MIPS32: [[COPY:%[0-9]+]]:_(s32) = COPY $a0
28 ; MIPS32: [[COPY1:%[0-9]+]]:_(s32) = COPY $a1
29 ; MIPS32: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(eq), [[COPY]](s32), [[COPY1]]
30 ; MIPS32: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
31 ; MIPS32: [[COPY2:%[0-9]+]]:_(s32) = COPY [[ICMP]](s32)
32 ; MIPS32: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY2]], [[C]]
33 ; MIPS32: $v0 = COPY [[AND]](s32)
34 ; MIPS32: RetRA implicit $v0
37 %2:_(s1) = G_ICMP intpred(eq), %0(s32), %1
38 %3:_(s32) = G_ZEXT %2(s1)
46 tracksRegLiveness: true
51 ; MIPS32-LABEL: name: ne
52 ; MIPS32: liveins: $a0, $a1
53 ; MIPS32: [[COPY:%[0-9]+]]:_(s32) = COPY $a0
54 ; MIPS32: [[COPY1:%[0-9]+]]:_(s32) = COPY $a1
55 ; MIPS32: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(ne), [[COPY]](s32), [[COPY1]]
56 ; MIPS32: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
57 ; MIPS32: [[COPY2:%[0-9]+]]:_(s32) = COPY [[ICMP]](s32)
58 ; MIPS32: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY2]], [[C]]
59 ; MIPS32: $v0 = COPY [[AND]](s32)
60 ; MIPS32: RetRA implicit $v0
63 %2:_(s1) = G_ICMP intpred(ne), %0(s32), %1
64 %3:_(s32) = G_ZEXT %2(s1)
72 tracksRegLiveness: true
77 ; MIPS32-LABEL: name: sgt
78 ; MIPS32: liveins: $a0, $a1
79 ; MIPS32: [[COPY:%[0-9]+]]:_(s32) = COPY $a0
80 ; MIPS32: [[COPY1:%[0-9]+]]:_(s32) = COPY $a1
81 ; MIPS32: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(sgt), [[COPY]](s32), [[COPY1]]
82 ; MIPS32: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
83 ; MIPS32: [[COPY2:%[0-9]+]]:_(s32) = COPY [[ICMP]](s32)
84 ; MIPS32: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY2]], [[C]]
85 ; MIPS32: $v0 = COPY [[AND]](s32)
86 ; MIPS32: RetRA implicit $v0
89 %2:_(s1) = G_ICMP intpred(sgt), %0(s32), %1
90 %3:_(s32) = G_ZEXT %2(s1)
98 tracksRegLiveness: true
103 ; MIPS32-LABEL: name: sge
104 ; MIPS32: liveins: $a0, $a1
105 ; MIPS32: [[COPY:%[0-9]+]]:_(s32) = COPY $a0
106 ; MIPS32: [[COPY1:%[0-9]+]]:_(s32) = COPY $a1
107 ; MIPS32: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(sge), [[COPY]](s32), [[COPY1]]
108 ; MIPS32: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
109 ; MIPS32: [[COPY2:%[0-9]+]]:_(s32) = COPY [[ICMP]](s32)
110 ; MIPS32: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY2]], [[C]]
111 ; MIPS32: $v0 = COPY [[AND]](s32)
112 ; MIPS32: RetRA implicit $v0
115 %2:_(s1) = G_ICMP intpred(sge), %0(s32), %1
116 %3:_(s32) = G_ZEXT %2(s1)
124 tracksRegLiveness: true
129 ; MIPS32-LABEL: name: slt
130 ; MIPS32: liveins: $a0, $a1
131 ; MIPS32: [[COPY:%[0-9]+]]:_(s32) = COPY $a0
132 ; MIPS32: [[COPY1:%[0-9]+]]:_(s32) = COPY $a1
133 ; MIPS32: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(slt), [[COPY]](s32), [[COPY1]]
134 ; MIPS32: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
135 ; MIPS32: [[COPY2:%[0-9]+]]:_(s32) = COPY [[ICMP]](s32)
136 ; MIPS32: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY2]], [[C]]
137 ; MIPS32: $v0 = COPY [[AND]](s32)
138 ; MIPS32: RetRA implicit $v0
141 %2:_(s1) = G_ICMP intpred(slt), %0(s32), %1
142 %3:_(s32) = G_ZEXT %2(s1)
150 tracksRegLiveness: true
155 ; MIPS32-LABEL: name: sle
156 ; MIPS32: liveins: $a0, $a1
157 ; MIPS32: [[COPY:%[0-9]+]]:_(s32) = COPY $a0
158 ; MIPS32: [[COPY1:%[0-9]+]]:_(s32) = COPY $a1
159 ; MIPS32: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(sle), [[COPY]](s32), [[COPY1]]
160 ; MIPS32: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
161 ; MIPS32: [[COPY2:%[0-9]+]]:_(s32) = COPY [[ICMP]](s32)
162 ; MIPS32: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY2]], [[C]]
163 ; MIPS32: $v0 = COPY [[AND]](s32)
164 ; MIPS32: RetRA implicit $v0
167 %2:_(s1) = G_ICMP intpred(sle), %0(s32), %1
168 %3:_(s32) = G_ZEXT %2(s1)
176 tracksRegLiveness: true
181 ; MIPS32-LABEL: name: ugt
182 ; MIPS32: liveins: $a0, $a1
183 ; MIPS32: [[COPY:%[0-9]+]]:_(s32) = COPY $a0
184 ; MIPS32: [[COPY1:%[0-9]+]]:_(s32) = COPY $a1
185 ; MIPS32: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(ugt), [[COPY]](s32), [[COPY1]]
186 ; MIPS32: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
187 ; MIPS32: [[COPY2:%[0-9]+]]:_(s32) = COPY [[ICMP]](s32)
188 ; MIPS32: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY2]], [[C]]
189 ; MIPS32: $v0 = COPY [[AND]](s32)
190 ; MIPS32: RetRA implicit $v0
193 %2:_(s1) = G_ICMP intpred(ugt), %0(s32), %1
194 %3:_(s32) = G_ZEXT %2(s1)
202 tracksRegLiveness: true
207 ; MIPS32-LABEL: name: uge
208 ; MIPS32: liveins: $a0, $a1
209 ; MIPS32: [[COPY:%[0-9]+]]:_(s32) = COPY $a0
210 ; MIPS32: [[COPY1:%[0-9]+]]:_(s32) = COPY $a1
211 ; MIPS32: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(uge), [[COPY]](s32), [[COPY1]]
212 ; MIPS32: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
213 ; MIPS32: [[COPY2:%[0-9]+]]:_(s32) = COPY [[ICMP]](s32)
214 ; MIPS32: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY2]], [[C]]
215 ; MIPS32: $v0 = COPY [[AND]](s32)
216 ; MIPS32: RetRA implicit $v0
219 %2:_(s1) = G_ICMP intpred(uge), %0(s32), %1
220 %3:_(s32) = G_ZEXT %2(s1)
228 tracksRegLiveness: true
233 ; MIPS32-LABEL: name: ult
234 ; MIPS32: liveins: $a0, $a1
235 ; MIPS32: [[COPY:%[0-9]+]]:_(s32) = COPY $a0
236 ; MIPS32: [[COPY1:%[0-9]+]]:_(s32) = COPY $a1
237 ; MIPS32: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(ult), [[COPY]](s32), [[COPY1]]
238 ; MIPS32: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
239 ; MIPS32: [[COPY2:%[0-9]+]]:_(s32) = COPY [[ICMP]](s32)
240 ; MIPS32: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY2]], [[C]]
241 ; MIPS32: $v0 = COPY [[AND]](s32)
242 ; MIPS32: RetRA implicit $v0
245 %2:_(s1) = G_ICMP intpred(ult), %0(s32), %1
246 %3:_(s32) = G_ZEXT %2(s1)
254 tracksRegLiveness: true
259 ; MIPS32-LABEL: name: ule
260 ; MIPS32: liveins: $a0, $a1
261 ; MIPS32: [[COPY:%[0-9]+]]:_(s32) = COPY $a0
262 ; MIPS32: [[COPY1:%[0-9]+]]:_(s32) = COPY $a1
263 ; MIPS32: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(ule), [[COPY]](s32), [[COPY1]]
264 ; MIPS32: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
265 ; MIPS32: [[COPY2:%[0-9]+]]:_(s32) = COPY [[ICMP]](s32)
266 ; MIPS32: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY2]], [[C]]
267 ; MIPS32: $v0 = COPY [[AND]](s32)
268 ; MIPS32: RetRA implicit $v0
271 %2:_(s1) = G_ICMP intpred(ule), %0(s32), %1
272 %3:_(s32) = G_ZEXT %2(s1)