1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py UTC_ARGS: --version 5
2 # RUN: llc -mtriple=riscv64 -run-pass=legalizer %s -o - \
3 # RUN: | FileCheck %s --check-prefixes=CHECK,RV64I
4 # RUN: llc -mtriple=riscv64 -mattr=+zbb -run-pass=legalizer %s -o - \
5 # RUN: | FileCheck %s --check-prefixes=CHECK,RV64ZBB
13 ; CHECK-LABEL: name: uaddsat_i32
14 ; CHECK: liveins: $x10, $x11
16 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s64) = COPY $x10
17 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s64) = COPY $x11
18 ; CHECK-NEXT: [[ADD:%[0-9]+]]:_(s64) = G_ADD [[COPY]], [[COPY1]]
19 ; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s32) = G_TRUNC [[ADD]](s64)
20 ; CHECK-NEXT: [[SEXT_INREG:%[0-9]+]]:_(s64) = G_SEXT_INREG [[ADD]], 32
21 ; CHECK-NEXT: [[SEXT_INREG1:%[0-9]+]]:_(s64) = G_SEXT_INREG [[COPY1]], 32
22 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s64) = G_ICMP intpred(ult), [[SEXT_INREG]](s64), [[SEXT_INREG1]]
23 ; CHECK-NEXT: [[COPY2:%[0-9]+]]:_(s32) = COPY [[TRUNC]](s32)
24 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 -1
25 ; CHECK-NEXT: [[TRUNC1:%[0-9]+]]:_(s32) = G_TRUNC [[C]](s64)
26 ; CHECK-NEXT: [[SELECT:%[0-9]+]]:_(s32) = G_SELECT [[ICMP]](s64), [[TRUNC1]], [[COPY2]]
27 ; CHECK-NEXT: [[ANYEXT:%[0-9]+]]:_(s64) = G_ANYEXT [[SELECT]](s32)
28 ; CHECK-NEXT: $x10 = COPY [[ANYEXT]](s64)
29 ; CHECK-NEXT: PseudoRET implicit $x10
31 %0:_(s32) = G_TRUNC %2(s64)
33 %1:_(s32) = G_TRUNC %3(s64)
34 %4:_(s32) = G_UADDSAT %0, %1(s32)
35 %5:_(s64) = G_ANYEXT %4(s32)
37 PseudoRET implicit $x10
46 ; RV64I-LABEL: name: uaddsat_i64
47 ; RV64I: liveins: $x10, $x11
49 ; RV64I-NEXT: [[COPY:%[0-9]+]]:_(s64) = COPY $x10
50 ; RV64I-NEXT: [[COPY1:%[0-9]+]]:_(s64) = COPY $x11
51 ; RV64I-NEXT: [[ADD:%[0-9]+]]:_(s64) = G_ADD [[COPY]], [[COPY1]]
52 ; RV64I-NEXT: [[ICMP:%[0-9]+]]:_(s64) = G_ICMP intpred(ult), [[ADD]](s64), [[COPY1]]
53 ; RV64I-NEXT: [[COPY2:%[0-9]+]]:_(s64) = COPY [[ADD]](s64)
54 ; RV64I-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 -1
55 ; RV64I-NEXT: [[SELECT:%[0-9]+]]:_(s64) = G_SELECT [[ICMP]](s64), [[C]], [[COPY2]]
56 ; RV64I-NEXT: $x10 = COPY [[SELECT]](s64)
57 ; RV64I-NEXT: PseudoRET implicit $x10
59 ; RV64ZBB-LABEL: name: uaddsat_i64
60 ; RV64ZBB: liveins: $x10, $x11
61 ; RV64ZBB-NEXT: {{ $}}
62 ; RV64ZBB-NEXT: [[COPY:%[0-9]+]]:_(s64) = COPY $x10
63 ; RV64ZBB-NEXT: [[COPY1:%[0-9]+]]:_(s64) = COPY $x11
64 ; RV64ZBB-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 -1
65 ; RV64ZBB-NEXT: [[XOR:%[0-9]+]]:_(s64) = G_XOR [[COPY]], [[C]]
66 ; RV64ZBB-NEXT: [[UMIN:%[0-9]+]]:_(s64) = G_UMIN [[XOR]], [[COPY1]]
67 ; RV64ZBB-NEXT: [[ADD:%[0-9]+]]:_(s64) = G_ADD [[COPY]], [[UMIN]]
68 ; RV64ZBB-NEXT: $x10 = COPY [[ADD]](s64)
69 ; RV64ZBB-NEXT: PseudoRET implicit $x10
72 %2:_(s64) = G_UADDSAT %0, %1(s64)
74 PseudoRET implicit $x10
83 ; CHECK-LABEL: name: saddsat_i32
84 ; CHECK: liveins: $x10, $x11
86 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s64) = COPY $x10
87 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s64) = COPY $x11
88 ; CHECK-NEXT: [[SEXT_INREG:%[0-9]+]]:_(s64) = G_SEXT_INREG [[COPY]], 32
89 ; CHECK-NEXT: [[SEXT_INREG1:%[0-9]+]]:_(s64) = G_SEXT_INREG [[COPY1]], 32
90 ; CHECK-NEXT: [[ADD:%[0-9]+]]:_(s64) = G_ADD [[SEXT_INREG]], [[SEXT_INREG1]]
91 ; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s32) = G_TRUNC [[ADD]](s64)
92 ; CHECK-NEXT: [[SEXT_INREG2:%[0-9]+]]:_(s64) = G_SEXT_INREG [[ADD]], 32
93 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s64) = G_ICMP intpred(ne), [[ADD]](s64), [[SEXT_INREG2]]
94 ; CHECK-NEXT: [[COPY2:%[0-9]+]]:_(s32) = COPY [[TRUNC]](s32)
95 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 31
96 ; CHECK-NEXT: [[COPY3:%[0-9]+]]:_(s64) = COPY [[SEXT_INREG2]](s64)
97 ; CHECK-NEXT: [[ASHR:%[0-9]+]]:_(s64) = G_ASHR [[COPY3]], [[C]](s64)
98 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 -2147483648
99 ; CHECK-NEXT: [[ADD1:%[0-9]+]]:_(s64) = G_ADD [[ASHR]], [[C1]]
100 ; CHECK-NEXT: [[TRUNC1:%[0-9]+]]:_(s32) = G_TRUNC [[ADD1]](s64)
101 ; CHECK-NEXT: [[SELECT:%[0-9]+]]:_(s32) = G_SELECT [[ICMP]](s64), [[TRUNC1]], [[COPY2]]
102 ; CHECK-NEXT: [[ANYEXT:%[0-9]+]]:_(s64) = G_ANYEXT [[SELECT]](s32)
103 ; CHECK-NEXT: $x10 = COPY [[ANYEXT]](s64)
104 ; CHECK-NEXT: PseudoRET implicit $x10
105 %2:_(s64) = COPY $x10
106 %0:_(s32) = G_TRUNC %2(s64)
107 %3:_(s64) = COPY $x11
108 %1:_(s32) = G_TRUNC %3(s64)
109 %4:_(s32) = G_SADDSAT %0, %1(s32)
110 %5:_(s64) = G_ANYEXT %4(s32)
112 PseudoRET implicit $x10
121 ; RV64I-LABEL: name: saddsat_i64
122 ; RV64I: liveins: $x10, $x11
124 ; RV64I-NEXT: [[COPY:%[0-9]+]]:_(s64) = COPY $x10
125 ; RV64I-NEXT: [[COPY1:%[0-9]+]]:_(s64) = COPY $x11
126 ; RV64I-NEXT: [[ADD:%[0-9]+]]:_(s64) = G_ADD [[COPY]], [[COPY1]]
127 ; RV64I-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 0
128 ; RV64I-NEXT: [[ICMP:%[0-9]+]]:_(s64) = G_ICMP intpred(slt), [[ADD]](s64), [[COPY]]
129 ; RV64I-NEXT: [[ICMP1:%[0-9]+]]:_(s64) = G_ICMP intpred(slt), [[COPY1]](s64), [[C]]
130 ; RV64I-NEXT: [[XOR:%[0-9]+]]:_(s64) = G_XOR [[ICMP1]], [[ICMP]]
131 ; RV64I-NEXT: [[COPY2:%[0-9]+]]:_(s64) = COPY [[ADD]](s64)
132 ; RV64I-NEXT: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 63
133 ; RV64I-NEXT: [[ASHR:%[0-9]+]]:_(s64) = G_ASHR [[COPY2]], [[C1]](s64)
134 ; RV64I-NEXT: [[C2:%[0-9]+]]:_(s64) = G_CONSTANT i64 -9223372036854775808
135 ; RV64I-NEXT: [[ADD1:%[0-9]+]]:_(s64) = G_ADD [[ASHR]], [[C2]]
136 ; RV64I-NEXT: [[SELECT:%[0-9]+]]:_(s64) = G_SELECT [[XOR]](s64), [[ADD1]], [[COPY2]]
137 ; RV64I-NEXT: $x10 = COPY [[SELECT]](s64)
138 ; RV64I-NEXT: PseudoRET implicit $x10
140 ; RV64ZBB-LABEL: name: saddsat_i64
141 ; RV64ZBB: liveins: $x10, $x11
142 ; RV64ZBB-NEXT: {{ $}}
143 ; RV64ZBB-NEXT: [[COPY:%[0-9]+]]:_(s64) = COPY $x10
144 ; RV64ZBB-NEXT: [[COPY1:%[0-9]+]]:_(s64) = COPY $x11
145 ; RV64ZBB-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 9223372036854775807
146 ; RV64ZBB-NEXT: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 -9223372036854775808
147 ; RV64ZBB-NEXT: [[C2:%[0-9]+]]:_(s64) = G_CONSTANT i64 0
148 ; RV64ZBB-NEXT: [[SMAX:%[0-9]+]]:_(s64) = G_SMAX [[COPY]], [[C2]]
149 ; RV64ZBB-NEXT: [[SUB:%[0-9]+]]:_(s64) = G_SUB [[C]], [[SMAX]]
150 ; RV64ZBB-NEXT: [[SMIN:%[0-9]+]]:_(s64) = G_SMIN [[COPY]], [[C2]]
151 ; RV64ZBB-NEXT: [[SUB1:%[0-9]+]]:_(s64) = G_SUB [[C1]], [[SMIN]]
152 ; RV64ZBB-NEXT: [[SMAX1:%[0-9]+]]:_(s64) = G_SMAX [[SUB1]], [[COPY1]]
153 ; RV64ZBB-NEXT: [[SMIN1:%[0-9]+]]:_(s64) = G_SMIN [[SMAX1]], [[SUB]]
154 ; RV64ZBB-NEXT: [[ADD:%[0-9]+]]:_(s64) = G_ADD [[COPY]], [[SMIN1]]
155 ; RV64ZBB-NEXT: $x10 = COPY [[ADD]](s64)
156 ; RV64ZBB-NEXT: PseudoRET implicit $x10
157 %0:_(s64) = COPY $x10
158 %1:_(s64) = COPY $x11
159 %2:_(s64) = G_SADDSAT %0, %1(s64)
161 PseudoRET implicit $x10
170 ; CHECK-LABEL: name: usubsat_i32
171 ; CHECK: liveins: $x10, $x11
173 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s64) = COPY $x10
174 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s64) = COPY $x11
175 ; CHECK-NEXT: [[SUB:%[0-9]+]]:_(s64) = G_SUB [[COPY]], [[COPY1]]
176 ; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s32) = G_TRUNC [[SUB]](s64)
177 ; CHECK-NEXT: [[SEXT_INREG:%[0-9]+]]:_(s64) = G_SEXT_INREG [[COPY]], 32
178 ; CHECK-NEXT: [[SEXT_INREG1:%[0-9]+]]:_(s64) = G_SEXT_INREG [[COPY1]], 32
179 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s64) = G_ICMP intpred(ult), [[SEXT_INREG]](s64), [[SEXT_INREG1]]
180 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 0
181 ; CHECK-NEXT: [[TRUNC1:%[0-9]+]]:_(s32) = G_TRUNC [[C]](s64)
182 ; CHECK-NEXT: [[SELECT:%[0-9]+]]:_(s32) = G_SELECT [[ICMP]](s64), [[TRUNC1]], [[TRUNC]]
183 ; CHECK-NEXT: [[ANYEXT:%[0-9]+]]:_(s64) = G_ANYEXT [[SELECT]](s32)
184 ; CHECK-NEXT: $x10 = COPY [[ANYEXT]](s64)
185 ; CHECK-NEXT: PseudoRET implicit $x10
186 %2:_(s64) = COPY $x10
187 %0:_(s32) = G_TRUNC %2(s64)
188 %3:_(s64) = COPY $x11
189 %1:_(s32) = G_TRUNC %3(s64)
190 %4:_(s32) = G_USUBSAT %0, %1(s32)
191 %5:_(s64) = G_ANYEXT %4(s32)
193 PseudoRET implicit $x10
202 ; RV64I-LABEL: name: usubsat_i64
203 ; RV64I: liveins: $x10, $x11
205 ; RV64I-NEXT: [[COPY:%[0-9]+]]:_(s64) = COPY $x10
206 ; RV64I-NEXT: [[COPY1:%[0-9]+]]:_(s64) = COPY $x11
207 ; RV64I-NEXT: [[SUB:%[0-9]+]]:_(s64) = G_SUB [[COPY]], [[COPY1]]
208 ; RV64I-NEXT: [[ICMP:%[0-9]+]]:_(s64) = G_ICMP intpred(ult), [[COPY]](s64), [[COPY1]]
209 ; RV64I-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 0
210 ; RV64I-NEXT: [[SELECT:%[0-9]+]]:_(s64) = G_SELECT [[ICMP]](s64), [[C]], [[SUB]]
211 ; RV64I-NEXT: $x10 = COPY [[SELECT]](s64)
212 ; RV64I-NEXT: PseudoRET implicit $x10
214 ; RV64ZBB-LABEL: name: usubsat_i64
215 ; RV64ZBB: liveins: $x10, $x11
216 ; RV64ZBB-NEXT: {{ $}}
217 ; RV64ZBB-NEXT: [[COPY:%[0-9]+]]:_(s64) = COPY $x10
218 ; RV64ZBB-NEXT: [[COPY1:%[0-9]+]]:_(s64) = COPY $x11
219 ; RV64ZBB-NEXT: [[UMIN:%[0-9]+]]:_(s64) = G_UMIN [[COPY]], [[COPY1]]
220 ; RV64ZBB-NEXT: [[SUB:%[0-9]+]]:_(s64) = G_SUB [[COPY]], [[UMIN]]
221 ; RV64ZBB-NEXT: $x10 = COPY [[SUB]](s64)
222 ; RV64ZBB-NEXT: PseudoRET implicit $x10
223 %0:_(s64) = COPY $x10
224 %1:_(s64) = COPY $x11
225 %2:_(s64) = G_USUBSAT %0, %1(s64)
227 PseudoRET implicit $x10
236 ; CHECK-LABEL: name: ssubsat_i32
237 ; CHECK: liveins: $x10, $x11
239 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s64) = COPY $x10
240 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s64) = COPY $x11
241 ; CHECK-NEXT: [[SEXT_INREG:%[0-9]+]]:_(s64) = G_SEXT_INREG [[COPY]], 32
242 ; CHECK-NEXT: [[SEXT_INREG1:%[0-9]+]]:_(s64) = G_SEXT_INREG [[COPY1]], 32
243 ; CHECK-NEXT: [[SUB:%[0-9]+]]:_(s64) = G_SUB [[SEXT_INREG]], [[SEXT_INREG1]]
244 ; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s32) = G_TRUNC [[SUB]](s64)
245 ; CHECK-NEXT: [[SEXT_INREG2:%[0-9]+]]:_(s64) = G_SEXT_INREG [[SUB]], 32
246 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s64) = G_ICMP intpred(ne), [[SUB]](s64), [[SEXT_INREG2]]
247 ; CHECK-NEXT: [[COPY2:%[0-9]+]]:_(s32) = COPY [[TRUNC]](s32)
248 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 31
249 ; CHECK-NEXT: [[COPY3:%[0-9]+]]:_(s64) = COPY [[SEXT_INREG2]](s64)
250 ; CHECK-NEXT: [[ASHR:%[0-9]+]]:_(s64) = G_ASHR [[COPY3]], [[C]](s64)
251 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 -2147483648
252 ; CHECK-NEXT: [[ADD:%[0-9]+]]:_(s64) = G_ADD [[ASHR]], [[C1]]
253 ; CHECK-NEXT: [[TRUNC1:%[0-9]+]]:_(s32) = G_TRUNC [[ADD]](s64)
254 ; CHECK-NEXT: [[SELECT:%[0-9]+]]:_(s32) = G_SELECT [[ICMP]](s64), [[TRUNC1]], [[COPY2]]
255 ; CHECK-NEXT: [[ANYEXT:%[0-9]+]]:_(s64) = G_ANYEXT [[SELECT]](s32)
256 ; CHECK-NEXT: $x10 = COPY [[ANYEXT]](s64)
257 ; CHECK-NEXT: PseudoRET implicit $x10
258 %2:_(s64) = COPY $x10
259 %0:_(s32) = G_TRUNC %2(s64)
260 %3:_(s64) = COPY $x11
261 %1:_(s32) = G_TRUNC %3(s64)
262 %4:_(s32) = G_SSUBSAT %0, %1(s32)
263 %5:_(s64) = G_ANYEXT %4(s32)
265 PseudoRET implicit $x10
274 ; RV64I-LABEL: name: ssubsat_i64
275 ; RV64I: liveins: $x10, $x11
277 ; RV64I-NEXT: [[COPY:%[0-9]+]]:_(s64) = COPY $x10
278 ; RV64I-NEXT: [[COPY1:%[0-9]+]]:_(s64) = COPY $x11
279 ; RV64I-NEXT: [[SUB:%[0-9]+]]:_(s64) = G_SUB [[COPY]], [[COPY1]]
280 ; RV64I-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 0
281 ; RV64I-NEXT: [[ICMP:%[0-9]+]]:_(s64) = G_ICMP intpred(slt), [[SUB]](s64), [[COPY]]
282 ; RV64I-NEXT: [[ICMP1:%[0-9]+]]:_(s64) = G_ICMP intpred(sgt), [[COPY1]](s64), [[C]]
283 ; RV64I-NEXT: [[XOR:%[0-9]+]]:_(s64) = G_XOR [[ICMP1]], [[ICMP]]
284 ; RV64I-NEXT: [[COPY2:%[0-9]+]]:_(s64) = COPY [[SUB]](s64)
285 ; RV64I-NEXT: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 63
286 ; RV64I-NEXT: [[ASHR:%[0-9]+]]:_(s64) = G_ASHR [[COPY2]], [[C1]](s64)
287 ; RV64I-NEXT: [[C2:%[0-9]+]]:_(s64) = G_CONSTANT i64 -9223372036854775808
288 ; RV64I-NEXT: [[ADD:%[0-9]+]]:_(s64) = G_ADD [[ASHR]], [[C2]]
289 ; RV64I-NEXT: [[SELECT:%[0-9]+]]:_(s64) = G_SELECT [[XOR]](s64), [[ADD]], [[COPY2]]
290 ; RV64I-NEXT: $x10 = COPY [[SELECT]](s64)
291 ; RV64I-NEXT: PseudoRET implicit $x10
293 ; RV64ZBB-LABEL: name: ssubsat_i64
294 ; RV64ZBB: liveins: $x10, $x11
295 ; RV64ZBB-NEXT: {{ $}}
296 ; RV64ZBB-NEXT: [[COPY:%[0-9]+]]:_(s64) = COPY $x10
297 ; RV64ZBB-NEXT: [[COPY1:%[0-9]+]]:_(s64) = COPY $x11
298 ; RV64ZBB-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 9223372036854775807
299 ; RV64ZBB-NEXT: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 -9223372036854775808
300 ; RV64ZBB-NEXT: [[C2:%[0-9]+]]:_(s64) = G_CONSTANT i64 -1
301 ; RV64ZBB-NEXT: [[SMAX:%[0-9]+]]:_(s64) = G_SMAX [[COPY]], [[C2]]
302 ; RV64ZBB-NEXT: [[SUB:%[0-9]+]]:_(s64) = G_SUB [[SMAX]], [[C]]
303 ; RV64ZBB-NEXT: [[SMIN:%[0-9]+]]:_(s64) = G_SMIN [[COPY]], [[C2]]
304 ; RV64ZBB-NEXT: [[SUB1:%[0-9]+]]:_(s64) = G_SUB [[SMIN]], [[C1]]
305 ; RV64ZBB-NEXT: [[SMAX1:%[0-9]+]]:_(s64) = G_SMAX [[SUB]], [[COPY1]]
306 ; RV64ZBB-NEXT: [[SMIN1:%[0-9]+]]:_(s64) = G_SMIN [[SMAX1]], [[SUB1]]
307 ; RV64ZBB-NEXT: [[SUB2:%[0-9]+]]:_(s64) = G_SUB [[COPY]], [[SMIN1]]
308 ; RV64ZBB-NEXT: $x10 = COPY [[SUB2]](s64)
309 ; RV64ZBB-NEXT: PseudoRET implicit $x10
310 %0:_(s64) = COPY $x10
311 %1:_(s64) = COPY $x11
312 %2:_(s64) = G_SSUBSAT %0, %1(s64)
314 PseudoRET implicit $x10
323 ; CHECK-LABEL: name: uaddsat_i8
324 ; CHECK: liveins: $x10, $x11
326 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s64) = COPY $x10
327 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s64) = COPY $x11
328 ; CHECK-NEXT: [[ADD:%[0-9]+]]:_(s64) = G_ADD [[COPY]], [[COPY1]]
329 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 255
330 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s64) = G_AND [[ADD]], [[C]]
331 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s64) = G_AND [[COPY1]], [[C]]
332 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s64) = G_ICMP intpred(ult), [[AND]](s64), [[AND1]]
333 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 -1
334 ; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s32) = G_TRUNC [[C1]](s64)
335 ; CHECK-NEXT: [[TRUNC1:%[0-9]+]]:_(s32) = G_TRUNC [[ADD]](s64)
336 ; CHECK-NEXT: [[SELECT:%[0-9]+]]:_(s32) = G_SELECT [[ICMP]](s64), [[TRUNC]], [[TRUNC1]]
337 ; CHECK-NEXT: [[ANYEXT:%[0-9]+]]:_(s64) = G_ANYEXT [[SELECT]](s32)
338 ; CHECK-NEXT: $x10 = COPY [[ANYEXT]](s64)
339 ; CHECK-NEXT: PseudoRET implicit $x10
340 %2:_(s64) = COPY $x10
341 %0:_(s8) = G_TRUNC %2(s64)
342 %3:_(s64) = COPY $x11
343 %1:_(s8) = G_TRUNC %3(s64)
344 %4:_(s8) = G_UADDSAT %0, %1(s8)
345 %5:_(s64) = G_ANYEXT %4(s8)
347 PseudoRET implicit $x10