1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -verify-machineinstrs -csky-no-aliases < %s -mtriple=csky -mattr=+2e3 | FileCheck %s
3 ; RUN: llc -verify-machineinstrs -csky-no-aliases < %s -mtriple=csky | FileCheck %s --check-prefix=GENERIC
6 define i32 @brRR_eq(i32 %x, i32 %y) {
7 ; CHECK-LABEL: brRR_eq:
8 ; CHECK: # %bb.0: # %entry
9 ; CHECK-NEXT: cmpne16 a1, a0
10 ; CHECK-NEXT: bt32 .LBB0_2
11 ; CHECK-NEXT: # %bb.1: # %label1
12 ; CHECK-NEXT: movi16 a0, 1
14 ; CHECK-NEXT: .LBB0_2: # %label2
15 ; CHECK-NEXT: movi16 a0, 0
18 ; GENERIC-LABEL: brRR_eq:
19 ; GENERIC: # %bb.0: # %entry
20 ; GENERIC-NEXT: .cfi_def_cfa_offset 0
21 ; GENERIC-NEXT: subi16 sp, sp, 4
22 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
23 ; GENERIC-NEXT: cmpne16 a1, a0
24 ; GENERIC-NEXT: bt16 .LBB0_2
25 ; GENERIC-NEXT: # %bb.1: # %label1
26 ; GENERIC-NEXT: movi16 a0, 1
27 ; GENERIC-NEXT: addi16 sp, sp, 4
29 ; GENERIC-NEXT: .LBB0_2: # %label2
30 ; GENERIC-NEXT: movi16 a0, 0
31 ; GENERIC-NEXT: addi16 sp, sp, 4
34 %icmp = icmp eq i32 %y, %x
35 br i1 %icmp, label %label1, label %label2
42 define i32 @brRI_eq(i32 %x) {
43 ; CHECK-LABEL: brRI_eq:
44 ; CHECK: # %bb.0: # %entry
45 ; CHECK-NEXT: cmpnei16 a0, 10
46 ; CHECK-NEXT: bt32 .LBB1_2
47 ; CHECK-NEXT: # %bb.1: # %label1
48 ; CHECK-NEXT: movi16 a0, 1
50 ; CHECK-NEXT: .LBB1_2: # %label2
51 ; CHECK-NEXT: movi16 a0, 0
54 ; GENERIC-LABEL: brRI_eq:
55 ; GENERIC: # %bb.0: # %entry
56 ; GENERIC-NEXT: .cfi_def_cfa_offset 0
57 ; GENERIC-NEXT: subi16 sp, sp, 4
58 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
59 ; GENERIC-NEXT: cmpnei16 a0, 10
60 ; GENERIC-NEXT: bt16 .LBB1_2
61 ; GENERIC-NEXT: # %bb.1: # %label1
62 ; GENERIC-NEXT: movi16 a0, 1
63 ; GENERIC-NEXT: addi16 sp, sp, 4
65 ; GENERIC-NEXT: .LBB1_2: # %label2
66 ; GENERIC-NEXT: movi16 a0, 0
67 ; GENERIC-NEXT: addi16 sp, sp, 4
70 %icmp = icmp eq i32 %x, 10
71 br i1 %icmp, label %label1, label %label2
78 define i32 @brR0_eq(i32 %x) {
79 ; CHECK-LABEL: brR0_eq:
80 ; CHECK: # %bb.0: # %entry
81 ; CHECK-NEXT: bez32 a0, .LBB2_2
82 ; CHECK-NEXT: # %bb.1: # %label2
83 ; CHECK-NEXT: movi16 a0, 0
85 ; CHECK-NEXT: .LBB2_2: # %label1
86 ; CHECK-NEXT: movi16 a0, 1
89 ; GENERIC-LABEL: brR0_eq:
90 ; GENERIC: # %bb.0: # %entry
91 ; GENERIC-NEXT: .cfi_def_cfa_offset 0
92 ; GENERIC-NEXT: subi16 sp, sp, 4
93 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
94 ; GENERIC-NEXT: cmpnei16 a0, 0
95 ; GENERIC-NEXT: bf16 .LBB2_2
96 ; GENERIC-NEXT: # %bb.1: # %label2
97 ; GENERIC-NEXT: movi16 a0, 0
98 ; GENERIC-NEXT: addi16 sp, sp, 4
100 ; GENERIC-NEXT: .LBB2_2: # %label1
101 ; GENERIC-NEXT: movi16 a0, 1
102 ; GENERIC-NEXT: addi16 sp, sp, 4
103 ; GENERIC-NEXT: rts16
105 %icmp = icmp eq i32 %x, 0
106 br i1 %icmp, label %label1, label %label2
114 define i32 @brRR_ne(i32 %x, i32 %y) {
115 ; CHECK-LABEL: brRR_ne:
116 ; CHECK: # %bb.0: # %entry
117 ; CHECK-NEXT: cmpne16 a1, a0
118 ; CHECK-NEXT: bf32 .LBB3_2
119 ; CHECK-NEXT: # %bb.1: # %label1
120 ; CHECK-NEXT: movi16 a0, 1
122 ; CHECK-NEXT: .LBB3_2: # %label2
123 ; CHECK-NEXT: movi16 a0, 0
126 ; GENERIC-LABEL: brRR_ne:
127 ; GENERIC: # %bb.0: # %entry
128 ; GENERIC-NEXT: .cfi_def_cfa_offset 0
129 ; GENERIC-NEXT: subi16 sp, sp, 4
130 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
131 ; GENERIC-NEXT: cmpne16 a1, a0
132 ; GENERIC-NEXT: bf16 .LBB3_2
133 ; GENERIC-NEXT: # %bb.1: # %label1
134 ; GENERIC-NEXT: movi16 a0, 1
135 ; GENERIC-NEXT: addi16 sp, sp, 4
136 ; GENERIC-NEXT: rts16
137 ; GENERIC-NEXT: .LBB3_2: # %label2
138 ; GENERIC-NEXT: movi16 a0, 0
139 ; GENERIC-NEXT: addi16 sp, sp, 4
140 ; GENERIC-NEXT: rts16
142 %icmp = icmp ne i32 %y, %x
143 br i1 %icmp, label %label1, label %label2
150 define i32 @brRI_ne(i32 %x) {
151 ; CHECK-LABEL: brRI_ne:
152 ; CHECK: # %bb.0: # %entry
153 ; CHECK-NEXT: cmpnei16 a0, 10
154 ; CHECK-NEXT: bf32 .LBB4_2
155 ; CHECK-NEXT: # %bb.1: # %label1
156 ; CHECK-NEXT: movi16 a0, 1
158 ; CHECK-NEXT: .LBB4_2: # %label2
159 ; CHECK-NEXT: movi16 a0, 0
162 ; GENERIC-LABEL: brRI_ne:
163 ; GENERIC: # %bb.0: # %entry
164 ; GENERIC-NEXT: .cfi_def_cfa_offset 0
165 ; GENERIC-NEXT: subi16 sp, sp, 4
166 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
167 ; GENERIC-NEXT: cmpnei16 a0, 10
168 ; GENERIC-NEXT: bf16 .LBB4_2
169 ; GENERIC-NEXT: # %bb.1: # %label1
170 ; GENERIC-NEXT: movi16 a0, 1
171 ; GENERIC-NEXT: addi16 sp, sp, 4
172 ; GENERIC-NEXT: rts16
173 ; GENERIC-NEXT: .LBB4_2: # %label2
174 ; GENERIC-NEXT: movi16 a0, 0
175 ; GENERIC-NEXT: addi16 sp, sp, 4
176 ; GENERIC-NEXT: rts16
178 %icmp = icmp ne i32 %x, 10
179 br i1 %icmp, label %label1, label %label2
186 define i32 @brR0_ne(i32 %x) {
187 ; CHECK-LABEL: brR0_ne:
188 ; CHECK: # %bb.0: # %entry
189 ; CHECK-NEXT: bez32 a0, .LBB5_2
190 ; CHECK-NEXT: # %bb.1: # %label1
191 ; CHECK-NEXT: movi16 a0, 1
193 ; CHECK-NEXT: .LBB5_2: # %label2
194 ; CHECK-NEXT: movi16 a0, 0
197 ; GENERIC-LABEL: brR0_ne:
198 ; GENERIC: # %bb.0: # %entry
199 ; GENERIC-NEXT: .cfi_def_cfa_offset 0
200 ; GENERIC-NEXT: subi16 sp, sp, 4
201 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
202 ; GENERIC-NEXT: cmpnei16 a0, 0
203 ; GENERIC-NEXT: bf16 .LBB5_2
204 ; GENERIC-NEXT: # %bb.1: # %label1
205 ; GENERIC-NEXT: movi16 a0, 1
206 ; GENERIC-NEXT: addi16 sp, sp, 4
207 ; GENERIC-NEXT: rts16
208 ; GENERIC-NEXT: .LBB5_2: # %label2
209 ; GENERIC-NEXT: movi16 a0, 0
210 ; GENERIC-NEXT: addi16 sp, sp, 4
211 ; GENERIC-NEXT: rts16
213 %icmp = icmp ne i32 %x, 0
214 br i1 %icmp, label %label1, label %label2
222 define i32 @brRR_ugt(i32 %x, i32 %y) {
223 ; CHECK-LABEL: brRR_ugt:
224 ; CHECK: # %bb.0: # %entry
225 ; CHECK-NEXT: cmphs16 a0, a1
226 ; CHECK-NEXT: bt32 .LBB6_2
227 ; CHECK-NEXT: # %bb.1: # %label1
228 ; CHECK-NEXT: movi16 a0, 1
230 ; CHECK-NEXT: .LBB6_2: # %label2
231 ; CHECK-NEXT: movi16 a0, 0
234 ; GENERIC-LABEL: brRR_ugt:
235 ; GENERIC: # %bb.0: # %entry
236 ; GENERIC-NEXT: .cfi_def_cfa_offset 0
237 ; GENERIC-NEXT: subi16 sp, sp, 4
238 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
239 ; GENERIC-NEXT: cmphs16 a0, a1
240 ; GENERIC-NEXT: bt16 .LBB6_2
241 ; GENERIC-NEXT: # %bb.1: # %label1
242 ; GENERIC-NEXT: movi16 a0, 1
243 ; GENERIC-NEXT: addi16 sp, sp, 4
244 ; GENERIC-NEXT: rts16
245 ; GENERIC-NEXT: .LBB6_2: # %label2
246 ; GENERIC-NEXT: movi16 a0, 0
247 ; GENERIC-NEXT: addi16 sp, sp, 4
248 ; GENERIC-NEXT: rts16
249 ; CHECK-UGTXT: icmpu32 a0, a1, a0
252 %icmp = icmp ugt i32 %y, %x
253 br i1 %icmp, label %label1, label %label2
260 define i32 @brRI_ugt(i32 %x) {
261 ; CHECK-LABEL: brRI_ugt:
262 ; CHECK: # %bb.0: # %entry
263 ; CHECK-NEXT: cmphsi16 a0, 11
264 ; CHECK-NEXT: bf32 .LBB7_2
265 ; CHECK-NEXT: # %bb.1: # %label1
266 ; CHECK-NEXT: movi16 a0, 1
268 ; CHECK-NEXT: .LBB7_2: # %label2
269 ; CHECK-NEXT: movi16 a0, 0
272 ; GENERIC-LABEL: brRI_ugt:
273 ; GENERIC: # %bb.0: # %entry
274 ; GENERIC-NEXT: .cfi_def_cfa_offset 0
275 ; GENERIC-NEXT: subi16 sp, sp, 4
276 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
277 ; GENERIC-NEXT: cmphsi16 a0, 11
278 ; GENERIC-NEXT: bf16 .LBB7_2
279 ; GENERIC-NEXT: # %bb.1: # %label1
280 ; GENERIC-NEXT: movi16 a0, 1
281 ; GENERIC-NEXT: addi16 sp, sp, 4
282 ; GENERIC-NEXT: rts16
283 ; GENERIC-NEXT: .LBB7_2: # %label2
284 ; GENERIC-NEXT: movi16 a0, 0
285 ; GENERIC-NEXT: addi16 sp, sp, 4
286 ; GENERIC-NEXT: rts16
287 ; CHECK-UGTXT: icmpu32 a0, a1, a0
290 %icmp = icmp ugt i32 %x, 10
291 br i1 %icmp, label %label1, label %label2
298 define i32 @brR0_ugt(i32 %x) {
299 ; CHECK-LABEL: brR0_ugt:
300 ; CHECK: # %bb.0: # %entry
301 ; CHECK-NEXT: bez32 a0, .LBB8_2
302 ; CHECK-NEXT: # %bb.1: # %label1
303 ; CHECK-NEXT: movi16 a0, 1
305 ; CHECK-NEXT: .LBB8_2: # %label2
306 ; CHECK-NEXT: movi16 a0, 0
309 ; GENERIC-LABEL: brR0_ugt:
310 ; GENERIC: # %bb.0: # %entry
311 ; GENERIC-NEXT: .cfi_def_cfa_offset 0
312 ; GENERIC-NEXT: subi16 sp, sp, 4
313 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
314 ; GENERIC-NEXT: cmpnei16 a0, 0
315 ; GENERIC-NEXT: bf16 .LBB8_2
316 ; GENERIC-NEXT: # %bb.1: # %label1
317 ; GENERIC-NEXT: movi16 a0, 1
318 ; GENERIC-NEXT: addi16 sp, sp, 4
319 ; GENERIC-NEXT: rts16
320 ; GENERIC-NEXT: .LBB8_2: # %label2
321 ; GENERIC-NEXT: movi16 a0, 0
322 ; GENERIC-NEXT: addi16 sp, sp, 4
323 ; GENERIC-NEXT: rts16
324 ; CHECK-UGTXT: icmpu32 a0, a1, a0
327 %icmp = icmp ugt i32 %x, 0
328 br i1 %icmp, label %label1, label %label2
336 define i32 @brRR_uge(i32 %x, i32 %y) {
337 ; CHECK-LABEL: brRR_uge:
338 ; CHECK: # %bb.0: # %entry
339 ; CHECK-NEXT: cmphs16 a1, a0
340 ; CHECK-NEXT: bf32 .LBB9_2
341 ; CHECK-NEXT: # %bb.1: # %label1
342 ; CHECK-NEXT: movi16 a0, 1
344 ; CHECK-NEXT: .LBB9_2: # %label2
345 ; CHECK-NEXT: movi16 a0, 0
348 ; GENERIC-LABEL: brRR_uge:
349 ; GENERIC: # %bb.0: # %entry
350 ; GENERIC-NEXT: .cfi_def_cfa_offset 0
351 ; GENERIC-NEXT: subi16 sp, sp, 4
352 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
353 ; GENERIC-NEXT: cmphs16 a1, a0
354 ; GENERIC-NEXT: bf16 .LBB9_2
355 ; GENERIC-NEXT: # %bb.1: # %label1
356 ; GENERIC-NEXT: movi16 a0, 1
357 ; GENERIC-NEXT: addi16 sp, sp, 4
358 ; GENERIC-NEXT: rts16
359 ; GENERIC-NEXT: .LBB9_2: # %label2
360 ; GENERIC-NEXT: movi16 a0, 0
361 ; GENERIC-NEXT: addi16 sp, sp, 4
362 ; GENERIC-NEXT: rts16
363 ; CHECK-UGTXT: icmpu32 a0, a1, a0
366 %icmp = icmp uge i32 %y, %x
367 br i1 %icmp, label %label1, label %label2
374 define i32 @brRI_uge(i32 %x) {
375 ; CHECK-LABEL: brRI_uge:
376 ; CHECK: # %bb.0: # %entry
377 ; CHECK-NEXT: cmphsi16 a0, 10
378 ; CHECK-NEXT: bf32 .LBB10_2
379 ; CHECK-NEXT: # %bb.1: # %label1
380 ; CHECK-NEXT: movi16 a0, 1
382 ; CHECK-NEXT: .LBB10_2: # %label2
383 ; CHECK-NEXT: movi16 a0, 0
386 ; GENERIC-LABEL: brRI_uge:
387 ; GENERIC: # %bb.0: # %entry
388 ; GENERIC-NEXT: .cfi_def_cfa_offset 0
389 ; GENERIC-NEXT: subi16 sp, sp, 4
390 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
391 ; GENERIC-NEXT: cmphsi16 a0, 10
392 ; GENERIC-NEXT: bf16 .LBB10_2
393 ; GENERIC-NEXT: # %bb.1: # %label1
394 ; GENERIC-NEXT: movi16 a0, 1
395 ; GENERIC-NEXT: addi16 sp, sp, 4
396 ; GENERIC-NEXT: rts16
397 ; GENERIC-NEXT: .LBB10_2: # %label2
398 ; GENERIC-NEXT: movi16 a0, 0
399 ; GENERIC-NEXT: addi16 sp, sp, 4
400 ; GENERIC-NEXT: rts16
401 ; CHECK-UGTXT: icmpu32 a0, a1, a0
404 %icmp = icmp uge i32 %x, 10
405 br i1 %icmp, label %label1, label %label2
413 define i32 @brRR_ult(i32 %x, i32 %y) {
414 ; CHECK-LABEL: brRR_ult:
415 ; CHECK: # %bb.0: # %entry
416 ; CHECK-NEXT: cmphs16 a1, a0
417 ; CHECK-NEXT: bt32 .LBB11_2
418 ; CHECK-NEXT: # %bb.1: # %label1
419 ; CHECK-NEXT: movi16 a0, 1
421 ; CHECK-NEXT: .LBB11_2: # %label2
422 ; CHECK-NEXT: movi16 a0, 0
425 ; GENERIC-LABEL: brRR_ult:
426 ; GENERIC: # %bb.0: # %entry
427 ; GENERIC-NEXT: .cfi_def_cfa_offset 0
428 ; GENERIC-NEXT: subi16 sp, sp, 4
429 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
430 ; GENERIC-NEXT: cmphs16 a1, a0
431 ; GENERIC-NEXT: bt16 .LBB11_2
432 ; GENERIC-NEXT: # %bb.1: # %label1
433 ; GENERIC-NEXT: movi16 a0, 1
434 ; GENERIC-NEXT: addi16 sp, sp, 4
435 ; GENERIC-NEXT: rts16
436 ; GENERIC-NEXT: .LBB11_2: # %label2
437 ; GENERIC-NEXT: movi16 a0, 0
438 ; GENERIC-NEXT: addi16 sp, sp, 4
439 ; GENERIC-NEXT: rts16
440 ; CHECK-UGTXT: icmpu32 a0, a1, a0
443 %icmp = icmp ult i32 %y, %x
444 br i1 %icmp, label %label1, label %label2
451 define i32 @brRI_ult(i32 %x) {
452 ; CHECK-LABEL: brRI_ult:
453 ; CHECK: # %bb.0: # %entry
454 ; CHECK-NEXT: movi16 a1, 9
455 ; CHECK-NEXT: cmphs16 a1, a0
456 ; CHECK-NEXT: bf32 .LBB12_2
457 ; CHECK-NEXT: # %bb.1: # %label1
458 ; CHECK-NEXT: movi16 a0, 1
460 ; CHECK-NEXT: .LBB12_2: # %label2
461 ; CHECK-NEXT: movi16 a0, 0
464 ; GENERIC-LABEL: brRI_ult:
465 ; GENERIC: # %bb.0: # %entry
466 ; GENERIC-NEXT: .cfi_def_cfa_offset 0
467 ; GENERIC-NEXT: subi16 sp, sp, 4
468 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
469 ; GENERIC-NEXT: movi16 a1, 9
470 ; GENERIC-NEXT: cmphs16 a1, a0
471 ; GENERIC-NEXT: bf16 .LBB12_2
472 ; GENERIC-NEXT: # %bb.1: # %label1
473 ; GENERIC-NEXT: movi16 a0, 1
474 ; GENERIC-NEXT: addi16 sp, sp, 4
475 ; GENERIC-NEXT: rts16
476 ; GENERIC-NEXT: .LBB12_2: # %label2
477 ; GENERIC-NEXT: movi16 a0, 0
478 ; GENERIC-NEXT: addi16 sp, sp, 4
479 ; GENERIC-NEXT: rts16
480 ; CHECK-UGTXT: icmpu32 a0, a1, a0
483 %icmp = icmp ult i32 %x, 10
484 br i1 %icmp, label %label1, label %label2
493 define i32 @brRR_ule(i32 %x, i32 %y) {
494 ; CHECK-LABEL: brRR_ule:
495 ; CHECK: # %bb.0: # %entry
496 ; CHECK-NEXT: cmphs16 a0, a1
497 ; CHECK-NEXT: bf32 .LBB13_2
498 ; CHECK-NEXT: # %bb.1: # %label1
499 ; CHECK-NEXT: movi16 a0, 1
501 ; CHECK-NEXT: .LBB13_2: # %label2
502 ; CHECK-NEXT: movi16 a0, 0
505 ; GENERIC-LABEL: brRR_ule:
506 ; GENERIC: # %bb.0: # %entry
507 ; GENERIC-NEXT: .cfi_def_cfa_offset 0
508 ; GENERIC-NEXT: subi16 sp, sp, 4
509 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
510 ; GENERIC-NEXT: cmphs16 a0, a1
511 ; GENERIC-NEXT: bf16 .LBB13_2
512 ; GENERIC-NEXT: # %bb.1: # %label1
513 ; GENERIC-NEXT: movi16 a0, 1
514 ; GENERIC-NEXT: addi16 sp, sp, 4
515 ; GENERIC-NEXT: rts16
516 ; GENERIC-NEXT: .LBB13_2: # %label2
517 ; GENERIC-NEXT: movi16 a0, 0
518 ; GENERIC-NEXT: addi16 sp, sp, 4
519 ; GENERIC-NEXT: rts16
520 ; CHECK-UGTXT: icmpu32 a0, a1, a0
523 %icmp = icmp ule i32 %y, %x
524 br i1 %icmp, label %label1, label %label2
531 define i32 @brRI_ule(i32 %x) {
532 ; CHECK-LABEL: brRI_ule:
533 ; CHECK: # %bb.0: # %entry
534 ; CHECK-NEXT: movi16 a1, 10
535 ; CHECK-NEXT: cmphs16 a1, a0
536 ; CHECK-NEXT: bf32 .LBB14_2
537 ; CHECK-NEXT: # %bb.1: # %label1
538 ; CHECK-NEXT: movi16 a0, 1
540 ; CHECK-NEXT: .LBB14_2: # %label2
541 ; CHECK-NEXT: movi16 a0, 0
544 ; GENERIC-LABEL: brRI_ule:
545 ; GENERIC: # %bb.0: # %entry
546 ; GENERIC-NEXT: .cfi_def_cfa_offset 0
547 ; GENERIC-NEXT: subi16 sp, sp, 4
548 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
549 ; GENERIC-NEXT: movi16 a1, 10
550 ; GENERIC-NEXT: cmphs16 a1, a0
551 ; GENERIC-NEXT: bf16 .LBB14_2
552 ; GENERIC-NEXT: # %bb.1: # %label1
553 ; GENERIC-NEXT: movi16 a0, 1
554 ; GENERIC-NEXT: addi16 sp, sp, 4
555 ; GENERIC-NEXT: rts16
556 ; GENERIC-NEXT: .LBB14_2: # %label2
557 ; GENERIC-NEXT: movi16 a0, 0
558 ; GENERIC-NEXT: addi16 sp, sp, 4
559 ; GENERIC-NEXT: rts16
560 ; CHECK-UGTXT: icmpu32 a0, a1, a0
563 %icmp = icmp ule i32 %x, 10
564 br i1 %icmp, label %label1, label %label2
571 define i32 @brR0_ule(i32 %x) {
572 ; CHECK-LABEL: brR0_ule:
573 ; CHECK: # %bb.0: # %entry
574 ; CHECK-NEXT: bnez32 a0, .LBB15_2
575 ; CHECK-NEXT: # %bb.1: # %label1
576 ; CHECK-NEXT: movi16 a0, 1
578 ; CHECK-NEXT: .LBB15_2: # %label2
579 ; CHECK-NEXT: movi16 a0, 0
582 ; GENERIC-LABEL: brR0_ule:
583 ; GENERIC: # %bb.0: # %entry
584 ; GENERIC-NEXT: .cfi_def_cfa_offset 0
585 ; GENERIC-NEXT: subi16 sp, sp, 4
586 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
587 ; GENERIC-NEXT: cmpnei16 a0, 0
588 ; GENERIC-NEXT: bt16 .LBB15_2
589 ; GENERIC-NEXT: # %bb.1: # %label1
590 ; GENERIC-NEXT: movi16 a0, 1
591 ; GENERIC-NEXT: addi16 sp, sp, 4
592 ; GENERIC-NEXT: rts16
593 ; GENERIC-NEXT: .LBB15_2: # %label2
594 ; GENERIC-NEXT: movi16 a0, 0
595 ; GENERIC-NEXT: addi16 sp, sp, 4
596 ; GENERIC-NEXT: rts16
597 ; CHECK-UGTXT: icmpu32 a0, a1, a0
600 %icmp = icmp ule i32 %x, 0
601 br i1 %icmp, label %label1, label %label2
609 define i32 @brRR_sgt(i32 %x, i32 %y) {
610 ; CHECK-LABEL: brRR_sgt:
611 ; CHECK: # %bb.0: # %entry
612 ; CHECK-NEXT: cmplt16 a0, a1
613 ; CHECK-NEXT: bf32 .LBB16_2
614 ; CHECK-NEXT: # %bb.1: # %label1
615 ; CHECK-NEXT: movi16 a0, 1
617 ; CHECK-NEXT: .LBB16_2: # %label2
618 ; CHECK-NEXT: movi16 a0, 0
621 ; GENERIC-LABEL: brRR_sgt:
622 ; GENERIC: # %bb.0: # %entry
623 ; GENERIC-NEXT: .cfi_def_cfa_offset 0
624 ; GENERIC-NEXT: subi16 sp, sp, 4
625 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
626 ; GENERIC-NEXT: cmplt16 a0, a1
627 ; GENERIC-NEXT: bf16 .LBB16_2
628 ; GENERIC-NEXT: # %bb.1: # %label1
629 ; GENERIC-NEXT: movi16 a0, 1
630 ; GENERIC-NEXT: addi16 sp, sp, 4
631 ; GENERIC-NEXT: rts16
632 ; GENERIC-NEXT: .LBB16_2: # %label2
633 ; GENERIC-NEXT: movi16 a0, 0
634 ; GENERIC-NEXT: addi16 sp, sp, 4
635 ; GENERIC-NEXT: rts16
636 ; CHECK-UGTXT: icmpu32 a0, a1, a0
639 %icmp = icmp sgt i32 %y, %x
640 br i1 %icmp, label %label1, label %label2
647 define i32 @brRI_sgt(i32 %x) {
648 ; CHECK-LABEL: brRI_sgt:
649 ; CHECK: # %bb.0: # %entry
650 ; CHECK-NEXT: cmplti16 a0, 11
651 ; CHECK-NEXT: bt32 .LBB17_2
652 ; CHECK-NEXT: # %bb.1: # %label1
653 ; CHECK-NEXT: movi16 a0, 1
655 ; CHECK-NEXT: .LBB17_2: # %label2
656 ; CHECK-NEXT: movi16 a0, 0
659 ; GENERIC-LABEL: brRI_sgt:
660 ; GENERIC: # %bb.0: # %entry
661 ; GENERIC-NEXT: .cfi_def_cfa_offset 0
662 ; GENERIC-NEXT: subi16 sp, sp, 4
663 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
664 ; GENERIC-NEXT: cmplti16 a0, 11
665 ; GENERIC-NEXT: bt16 .LBB17_2
666 ; GENERIC-NEXT: # %bb.1: # %label1
667 ; GENERIC-NEXT: movi16 a0, 1
668 ; GENERIC-NEXT: addi16 sp, sp, 4
669 ; GENERIC-NEXT: rts16
670 ; GENERIC-NEXT: .LBB17_2: # %label2
671 ; GENERIC-NEXT: movi16 a0, 0
672 ; GENERIC-NEXT: addi16 sp, sp, 4
673 ; GENERIC-NEXT: rts16
674 ; CHECK-UGTXT: icmpu32 a0, a1, a0
677 %icmp = icmp sgt i32 %x, 10
678 br i1 %icmp, label %label1, label %label2
685 define i32 @brR0_sgt(i32 %x) {
686 ; CHECK-LABEL: brR0_sgt:
687 ; CHECK: # %bb.0: # %entry
688 ; CHECK-NEXT: blsz32 a0, .LBB18_2
689 ; CHECK-NEXT: # %bb.1: # %label1
690 ; CHECK-NEXT: movi16 a0, 1
692 ; CHECK-NEXT: .LBB18_2: # %label2
693 ; CHECK-NEXT: movi16 a0, 0
696 ; GENERIC-LABEL: brR0_sgt:
697 ; GENERIC: # %bb.0: # %entry
698 ; GENERIC-NEXT: .cfi_def_cfa_offset 0
699 ; GENERIC-NEXT: subi16 sp, sp, 4
700 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
701 ; GENERIC-NEXT: cmplti16 a0, 1
702 ; GENERIC-NEXT: bt16 .LBB18_2
703 ; GENERIC-NEXT: # %bb.1: # %label1
704 ; GENERIC-NEXT: movi16 a0, 1
705 ; GENERIC-NEXT: addi16 sp, sp, 4
706 ; GENERIC-NEXT: rts16
707 ; GENERIC-NEXT: .LBB18_2: # %label2
708 ; GENERIC-NEXT: movi16 a0, 0
709 ; GENERIC-NEXT: addi16 sp, sp, 4
710 ; GENERIC-NEXT: rts16
711 ; CHECK-UGTXT: icmpu32 a0, a1, a0
714 %icmp = icmp sgt i32 %x, 0
715 br i1 %icmp, label %label1, label %label2
723 define i32 @brRR_sge(i32 %x, i32 %y) {
724 ; CHECK-LABEL: brRR_sge:
725 ; CHECK: # %bb.0: # %entry
726 ; CHECK-NEXT: cmplt16 a1, a0
727 ; CHECK-NEXT: bt32 .LBB19_2
728 ; CHECK-NEXT: # %bb.1: # %label1
729 ; CHECK-NEXT: movi16 a0, 1
731 ; CHECK-NEXT: .LBB19_2: # %label2
732 ; CHECK-NEXT: movi16 a0, 0
735 ; GENERIC-LABEL: brRR_sge:
736 ; GENERIC: # %bb.0: # %entry
737 ; GENERIC-NEXT: .cfi_def_cfa_offset 0
738 ; GENERIC-NEXT: subi16 sp, sp, 4
739 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
740 ; GENERIC-NEXT: cmplt16 a1, a0
741 ; GENERIC-NEXT: bt16 .LBB19_2
742 ; GENERIC-NEXT: # %bb.1: # %label1
743 ; GENERIC-NEXT: movi16 a0, 1
744 ; GENERIC-NEXT: addi16 sp, sp, 4
745 ; GENERIC-NEXT: rts16
746 ; GENERIC-NEXT: .LBB19_2: # %label2
747 ; GENERIC-NEXT: movi16 a0, 0
748 ; GENERIC-NEXT: addi16 sp, sp, 4
749 ; GENERIC-NEXT: rts16
750 ; CHECK-UGTXT: icmpu32 a0, a1, a0
753 %icmp = icmp sge i32 %y, %x
754 br i1 %icmp, label %label1, label %label2
761 define i32 @brRI_sge(i32 %x) {
762 ; CHECK-LABEL: brRI_sge:
763 ; CHECK: # %bb.0: # %entry
764 ; CHECK-NEXT: cmplti16 a0, 10
765 ; CHECK-NEXT: bt32 .LBB20_2
766 ; CHECK-NEXT: # %bb.1: # %label1
767 ; CHECK-NEXT: movi16 a0, 1
769 ; CHECK-NEXT: .LBB20_2: # %label2
770 ; CHECK-NEXT: movi16 a0, 0
773 ; GENERIC-LABEL: brRI_sge:
774 ; GENERIC: # %bb.0: # %entry
775 ; GENERIC-NEXT: .cfi_def_cfa_offset 0
776 ; GENERIC-NEXT: subi16 sp, sp, 4
777 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
778 ; GENERIC-NEXT: cmplti16 a0, 10
779 ; GENERIC-NEXT: bt16 .LBB20_2
780 ; GENERIC-NEXT: # %bb.1: # %label1
781 ; GENERIC-NEXT: movi16 a0, 1
782 ; GENERIC-NEXT: addi16 sp, sp, 4
783 ; GENERIC-NEXT: rts16
784 ; GENERIC-NEXT: .LBB20_2: # %label2
785 ; GENERIC-NEXT: movi16 a0, 0
786 ; GENERIC-NEXT: addi16 sp, sp, 4
787 ; GENERIC-NEXT: rts16
788 ; CHECK-UGTXT: icmpu32 a0, a1, a0
791 %icmp = icmp sge i32 %x, 10
792 br i1 %icmp, label %label1, label %label2
799 define i32 @brR0_sge(i32 %x) {
800 ; CHECK-LABEL: brR0_sge:
801 ; CHECK: # %bb.0: # %entry
802 ; CHECK-NEXT: blz32 a0, .LBB21_2
803 ; CHECK-NEXT: # %bb.1: # %label1
804 ; CHECK-NEXT: movi16 a0, 1
806 ; CHECK-NEXT: .LBB21_2: # %label2
807 ; CHECK-NEXT: movi16 a0, 0
810 ; GENERIC-LABEL: brR0_sge:
811 ; GENERIC: # %bb.0: # %entry
812 ; GENERIC-NEXT: .cfi_def_cfa_offset 0
813 ; GENERIC-NEXT: subi16 sp, sp, 4
814 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
815 ; GENERIC-NEXT: movi16 a1, 0
816 ; GENERIC-NEXT: cmplt16 a0, a1
817 ; GENERIC-NEXT: bt16 .LBB21_2
818 ; GENERIC-NEXT: # %bb.1: # %label1
819 ; GENERIC-NEXT: movi16 a0, 1
820 ; GENERIC-NEXT: addi16 sp, sp, 4
821 ; GENERIC-NEXT: rts16
822 ; GENERIC-NEXT: .LBB21_2: # %label2
823 ; GENERIC-NEXT: movi16 a0, 0
824 ; GENERIC-NEXT: addi16 sp, sp, 4
825 ; GENERIC-NEXT: rts16
826 ; CHECK-UGTXT: icmpu32 a0, a1, a0
829 %icmp = icmp sge i32 %x, 0
830 br i1 %icmp, label %label1, label %label2
838 define i32 @brRR_slt(i32 %x, i32 %y) {
839 ; CHECK-LABEL: brRR_slt:
840 ; CHECK: # %bb.0: # %entry
841 ; CHECK-NEXT: cmplt16 a1, a0
842 ; CHECK-NEXT: bf32 .LBB22_2
843 ; CHECK-NEXT: # %bb.1: # %label1
844 ; CHECK-NEXT: movi16 a0, 1
846 ; CHECK-NEXT: .LBB22_2: # %label2
847 ; CHECK-NEXT: movi16 a0, 0
850 ; GENERIC-LABEL: brRR_slt:
851 ; GENERIC: # %bb.0: # %entry
852 ; GENERIC-NEXT: .cfi_def_cfa_offset 0
853 ; GENERIC-NEXT: subi16 sp, sp, 4
854 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
855 ; GENERIC-NEXT: cmplt16 a1, a0
856 ; GENERIC-NEXT: bf16 .LBB22_2
857 ; GENERIC-NEXT: # %bb.1: # %label1
858 ; GENERIC-NEXT: movi16 a0, 1
859 ; GENERIC-NEXT: addi16 sp, sp, 4
860 ; GENERIC-NEXT: rts16
861 ; GENERIC-NEXT: .LBB22_2: # %label2
862 ; GENERIC-NEXT: movi16 a0, 0
863 ; GENERIC-NEXT: addi16 sp, sp, 4
864 ; GENERIC-NEXT: rts16
865 ; CHECK-UGTXT: icmpu32 a0, a1, a0
868 %icmp = icmp slt i32 %y, %x
869 br i1 %icmp, label %label1, label %label2
876 define i32 @brRI_slt(i32 %x) {
877 ; CHECK-LABEL: brRI_slt:
878 ; CHECK: # %bb.0: # %entry
879 ; CHECK-NEXT: movi16 a1, 9
880 ; CHECK-NEXT: cmplt16 a1, a0
881 ; CHECK-NEXT: bt32 .LBB23_2
882 ; CHECK-NEXT: # %bb.1: # %label1
883 ; CHECK-NEXT: movi16 a0, 1
885 ; CHECK-NEXT: .LBB23_2: # %label2
886 ; CHECK-NEXT: movi16 a0, 0
889 ; GENERIC-LABEL: brRI_slt:
890 ; GENERIC: # %bb.0: # %entry
891 ; GENERIC-NEXT: .cfi_def_cfa_offset 0
892 ; GENERIC-NEXT: subi16 sp, sp, 4
893 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
894 ; GENERIC-NEXT: movi16 a1, 9
895 ; GENERIC-NEXT: cmplt16 a1, a0
896 ; GENERIC-NEXT: bt16 .LBB23_2
897 ; GENERIC-NEXT: # %bb.1: # %label1
898 ; GENERIC-NEXT: movi16 a0, 1
899 ; GENERIC-NEXT: addi16 sp, sp, 4
900 ; GENERIC-NEXT: rts16
901 ; GENERIC-NEXT: .LBB23_2: # %label2
902 ; GENERIC-NEXT: movi16 a0, 0
903 ; GENERIC-NEXT: addi16 sp, sp, 4
904 ; GENERIC-NEXT: rts16
905 ; CHECK-UGTXT: icmpu32 a0, a1, a0
908 %icmp = icmp slt i32 %x, 10
909 br i1 %icmp, label %label1, label %label2
916 define i32 @brR0_slt(i32 %x) {
917 ; CHECK-LABEL: brR0_slt:
918 ; CHECK: # %bb.0: # %entry
919 ; CHECK-NEXT: blz32 a0, .LBB24_2
920 ; CHECK-NEXT: # %bb.1: # %label2
921 ; CHECK-NEXT: movi16 a0, 0
923 ; CHECK-NEXT: .LBB24_2: # %label1
924 ; CHECK-NEXT: movi16 a0, 1
927 ; GENERIC-LABEL: brR0_slt:
928 ; GENERIC: # %bb.0: # %entry
929 ; GENERIC-NEXT: .cfi_def_cfa_offset 0
930 ; GENERIC-NEXT: subi16 sp, sp, 4
931 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
932 ; GENERIC-NEXT: movi16 a1, 255
933 ; GENERIC-NEXT: lsli16 a2, a1, 24
934 ; GENERIC-NEXT: lsli16 a3, a1, 16
935 ; GENERIC-NEXT: or16 a3, a2
936 ; GENERIC-NEXT: lsli16 a2, a1, 8
937 ; GENERIC-NEXT: or16 a2, a3
938 ; GENERIC-NEXT: or16 a2, a1
939 ; GENERIC-NEXT: cmplt16 a2, a0
940 ; GENERIC-NEXT: bf16 .LBB24_2
941 ; GENERIC-NEXT: # %bb.1: # %label2
942 ; GENERIC-NEXT: movi16 a0, 0
943 ; GENERIC-NEXT: addi16 sp, sp, 4
944 ; GENERIC-NEXT: rts16
945 ; GENERIC-NEXT: .LBB24_2: # %label1
946 ; GENERIC-NEXT: movi16 a0, 1
947 ; GENERIC-NEXT: addi16 sp, sp, 4
948 ; GENERIC-NEXT: rts16
949 ; CHECK-UGTXT: icmpu32 a0, a1, a0
952 %icmp = icmp slt i32 %x, 0
953 br i1 %icmp, label %label1, label %label2
961 define i32 @brRR_sle(i32 %x, i32 %y) {
962 ; CHECK-LABEL: brRR_sle:
963 ; CHECK: # %bb.0: # %entry
964 ; CHECK-NEXT: cmplt16 a0, a1
965 ; CHECK-NEXT: bt32 .LBB25_2
966 ; CHECK-NEXT: # %bb.1: # %label1
967 ; CHECK-NEXT: movi16 a0, 1
969 ; CHECK-NEXT: .LBB25_2: # %label2
970 ; CHECK-NEXT: movi16 a0, 0
973 ; GENERIC-LABEL: brRR_sle:
974 ; GENERIC: # %bb.0: # %entry
975 ; GENERIC-NEXT: .cfi_def_cfa_offset 0
976 ; GENERIC-NEXT: subi16 sp, sp, 4
977 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
978 ; GENERIC-NEXT: cmplt16 a0, a1
979 ; GENERIC-NEXT: bt16 .LBB25_2
980 ; GENERIC-NEXT: # %bb.1: # %label1
981 ; GENERIC-NEXT: movi16 a0, 1
982 ; GENERIC-NEXT: addi16 sp, sp, 4
983 ; GENERIC-NEXT: rts16
984 ; GENERIC-NEXT: .LBB25_2: # %label2
985 ; GENERIC-NEXT: movi16 a0, 0
986 ; GENERIC-NEXT: addi16 sp, sp, 4
987 ; GENERIC-NEXT: rts16
988 ; CHECK-UGTXT: icmpu32 a0, a1, a0
991 %icmp = icmp sle i32 %y, %x
992 br i1 %icmp, label %label1, label %label2
999 define i32 @brRI_sle(i32 %x) {
1000 ; CHECK-LABEL: brRI_sle:
1001 ; CHECK: # %bb.0: # %entry
1002 ; CHECK-NEXT: movi16 a1, 10
1003 ; CHECK-NEXT: cmplt16 a1, a0
1004 ; CHECK-NEXT: bt32 .LBB26_2
1005 ; CHECK-NEXT: # %bb.1: # %label1
1006 ; CHECK-NEXT: movi16 a0, 1
1008 ; CHECK-NEXT: .LBB26_2: # %label2
1009 ; CHECK-NEXT: movi16 a0, 0
1012 ; GENERIC-LABEL: brRI_sle:
1013 ; GENERIC: # %bb.0: # %entry
1014 ; GENERIC-NEXT: .cfi_def_cfa_offset 0
1015 ; GENERIC-NEXT: subi16 sp, sp, 4
1016 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
1017 ; GENERIC-NEXT: movi16 a1, 10
1018 ; GENERIC-NEXT: cmplt16 a1, a0
1019 ; GENERIC-NEXT: bt16 .LBB26_2
1020 ; GENERIC-NEXT: # %bb.1: # %label1
1021 ; GENERIC-NEXT: movi16 a0, 1
1022 ; GENERIC-NEXT: addi16 sp, sp, 4
1023 ; GENERIC-NEXT: rts16
1024 ; GENERIC-NEXT: .LBB26_2: # %label2
1025 ; GENERIC-NEXT: movi16 a0, 0
1026 ; GENERIC-NEXT: addi16 sp, sp, 4
1027 ; GENERIC-NEXT: rts16
1028 ; CHECK-UGTXT: icmpu32 a0, a1, a0
1029 ; CHECK-UGTXT: rts16
1031 %icmp = icmp sle i32 %x, 10
1032 br i1 %icmp, label %label1, label %label2
1039 define i32 @brR0_sle(i32 %x) {
1040 ; CHECK-LABEL: brR0_sle:
1041 ; CHECK: # %bb.0: # %entry
1042 ; CHECK-NEXT: bhz32 a0, .LBB27_2
1043 ; CHECK-NEXT: # %bb.1: # %label1
1044 ; CHECK-NEXT: movi16 a0, 1
1046 ; CHECK-NEXT: .LBB27_2: # %label2
1047 ; CHECK-NEXT: movi16 a0, 0
1050 ; GENERIC-LABEL: brR0_sle:
1051 ; GENERIC: # %bb.0: # %entry
1052 ; GENERIC-NEXT: .cfi_def_cfa_offset 0
1053 ; GENERIC-NEXT: subi16 sp, sp, 4
1054 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
1055 ; GENERIC-NEXT: movi16 a1, 0
1056 ; GENERIC-NEXT: cmplt16 a1, a0
1057 ; GENERIC-NEXT: bt16 .LBB27_2
1058 ; GENERIC-NEXT: # %bb.1: # %label1
1059 ; GENERIC-NEXT: movi16 a0, 1
1060 ; GENERIC-NEXT: addi16 sp, sp, 4
1061 ; GENERIC-NEXT: rts16
1062 ; GENERIC-NEXT: .LBB27_2: # %label2
1063 ; GENERIC-NEXT: movi16 a0, 0
1064 ; GENERIC-NEXT: addi16 sp, sp, 4
1065 ; GENERIC-NEXT: rts16
1066 ; CHECK-UGTXT: icmpu32 a0, a1, a0
1067 ; CHECK-UGTXT: rts16
1069 %icmp = icmp sle i32 %x, 0
1070 br i1 %icmp, label %label1, label %label2
1078 define i32 @brCBit(i1 %c) {
1079 ; CHECK-LABEL: brCBit:
1080 ; CHECK: # %bb.0: # %entry
1081 ; CHECK-NEXT: andi32 a0, a0, 1
1082 ; CHECK-NEXT: bez32 a0, .LBB28_2
1083 ; CHECK-NEXT: # %bb.1: # %label1
1084 ; CHECK-NEXT: movi16 a0, 1
1086 ; CHECK-NEXT: .LBB28_2: # %label2
1087 ; CHECK-NEXT: movi16 a0, 0
1090 ; GENERIC-LABEL: brCBit:
1091 ; GENERIC: # %bb.0: # %entry
1092 ; GENERIC-NEXT: .cfi_def_cfa_offset 0
1093 ; GENERIC-NEXT: subi16 sp, sp, 4
1094 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
1095 ; GENERIC-NEXT: movi16 a1, 1
1096 ; GENERIC-NEXT: and16 a1, a0
1097 ; GENERIC-NEXT: cmpnei16 a1, 0
1098 ; GENERIC-NEXT: bf16 .LBB28_2
1099 ; GENERIC-NEXT: # %bb.1: # %label1
1100 ; GENERIC-NEXT: movi16 a0, 1
1101 ; GENERIC-NEXT: addi16 sp, sp, 4
1102 ; GENERIC-NEXT: rts16
1103 ; GENERIC-NEXT: .LBB28_2: # %label2
1104 ; GENERIC-NEXT: movi16 a0, 0
1105 ; GENERIC-NEXT: addi16 sp, sp, 4
1106 ; GENERIC-NEXT: rts16
1108 br i1 %c, label %label1, label %label2
1117 define i64 @brRR_i64_eq(i64 %x, i64 %y) {
1118 ; CHECK-LABEL: brRR_i64_eq:
1119 ; CHECK: # %bb.0: # %entry
1120 ; CHECK-NEXT: xor16 a1, a3
1121 ; CHECK-NEXT: xor16 a0, a2
1122 ; CHECK-NEXT: or16 a0, a1
1123 ; CHECK-NEXT: bnez32 a0, .LBB29_2
1124 ; CHECK-NEXT: # %bb.1: # %label1
1125 ; CHECK-NEXT: movi16 a0, 1
1126 ; CHECK-NEXT: movi16 a1, 0
1128 ; CHECK-NEXT: .LBB29_2: # %label2
1129 ; CHECK-NEXT: movi16 a0, 0
1130 ; CHECK-NEXT: movi16 a1, 0
1133 ; GENERIC-LABEL: brRR_i64_eq:
1134 ; GENERIC: # %bb.0: # %entry
1135 ; GENERIC-NEXT: .cfi_def_cfa_offset 0
1136 ; GENERIC-NEXT: subi16 sp, sp, 4
1137 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
1138 ; GENERIC-NEXT: xor16 a1, a3
1139 ; GENERIC-NEXT: xor16 a0, a2
1140 ; GENERIC-NEXT: or16 a0, a1
1141 ; GENERIC-NEXT: cmpnei16 a0, 0
1142 ; GENERIC-NEXT: bt16 .LBB29_2
1143 ; GENERIC-NEXT: # %bb.1: # %label1
1144 ; GENERIC-NEXT: movi16 a0, 1
1145 ; GENERIC-NEXT: br32 .LBB29_3
1146 ; GENERIC-NEXT: .LBB29_2: # %label2
1147 ; GENERIC-NEXT: movi16 a0, 0
1148 ; GENERIC-NEXT: .LBB29_3: # %label1
1149 ; GENERIC-NEXT: movi16 a1, 0
1150 ; GENERIC-NEXT: addi16 sp, sp, 4
1151 ; GENERIC-NEXT: rts16
1153 %icmp = icmp eq i64 %y, %x
1154 br i1 %icmp, label %label1, label %label2
1161 define i64 @brR0_i64_eq(i64 %x) {
1162 ; CHECK-LABEL: brR0_i64_eq:
1163 ; CHECK: # %bb.0: # %entry
1164 ; CHECK-NEXT: xori32 a0, a0, 10
1165 ; CHECK-NEXT: or16 a0, a1
1166 ; CHECK-NEXT: bnez32 a0, .LBB30_2
1167 ; CHECK-NEXT: # %bb.1: # %label1
1168 ; CHECK-NEXT: movi16 a0, 1
1169 ; CHECK-NEXT: movi16 a1, 0
1171 ; CHECK-NEXT: .LBB30_2: # %label2
1172 ; CHECK-NEXT: movi16 a0, 0
1173 ; CHECK-NEXT: movi16 a1, 0
1176 ; GENERIC-LABEL: brR0_i64_eq:
1177 ; GENERIC: # %bb.0: # %entry
1178 ; GENERIC-NEXT: .cfi_def_cfa_offset 0
1179 ; GENERIC-NEXT: subi16 sp, sp, 4
1180 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
1181 ; GENERIC-NEXT: movi16 a2, 10
1182 ; GENERIC-NEXT: xor16 a2, a0
1183 ; GENERIC-NEXT: or16 a2, a1
1184 ; GENERIC-NEXT: cmpnei16 a2, 0
1185 ; GENERIC-NEXT: bt16 .LBB30_2
1186 ; GENERIC-NEXT: # %bb.1: # %label1
1187 ; GENERIC-NEXT: movi16 a0, 1
1188 ; GENERIC-NEXT: br32 .LBB30_3
1189 ; GENERIC-NEXT: .LBB30_2: # %label2
1190 ; GENERIC-NEXT: movi16 a0, 0
1191 ; GENERIC-NEXT: .LBB30_3: # %label1
1192 ; GENERIC-NEXT: movi16 a1, 0
1193 ; GENERIC-NEXT: addi16 sp, sp, 4
1194 ; GENERIC-NEXT: rts16
1196 %icmp = icmp eq i64 %x, 10
1197 br i1 %icmp, label %label1, label %label2
1204 define i64 @brRI_i64_eq(i64 %x) {
1205 ; CHECK-LABEL: brRI_i64_eq:
1206 ; CHECK: # %bb.0: # %entry
1207 ; CHECK-NEXT: or16 a0, a1
1208 ; CHECK-NEXT: bez32 a0, .LBB31_2
1209 ; CHECK-NEXT: # %bb.1: # %label2
1210 ; CHECK-NEXT: movi16 a0, 0
1211 ; CHECK-NEXT: movi16 a1, 0
1213 ; CHECK-NEXT: .LBB31_2: # %label1
1214 ; CHECK-NEXT: movi16 a0, 1
1215 ; CHECK-NEXT: movi16 a1, 0
1218 ; GENERIC-LABEL: brRI_i64_eq:
1219 ; GENERIC: # %bb.0: # %entry
1220 ; GENERIC-NEXT: .cfi_def_cfa_offset 0
1221 ; GENERIC-NEXT: subi16 sp, sp, 4
1222 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
1223 ; GENERIC-NEXT: or16 a0, a1
1224 ; GENERIC-NEXT: cmpnei16 a0, 0
1225 ; GENERIC-NEXT: bf16 .LBB31_2
1226 ; GENERIC-NEXT: # %bb.1: # %label2
1227 ; GENERIC-NEXT: movi16 a0, 0
1228 ; GENERIC-NEXT: br32 .LBB31_3
1229 ; GENERIC-NEXT: .LBB31_2: # %label1
1230 ; GENERIC-NEXT: movi16 a0, 1
1231 ; GENERIC-NEXT: .LBB31_3: # %label1
1232 ; GENERIC-NEXT: movi16 a1, 0
1233 ; GENERIC-NEXT: addi16 sp, sp, 4
1234 ; GENERIC-NEXT: rts16
1236 %icmp = icmp eq i64 %x, 0
1237 br i1 %icmp, label %label1, label %label2
1245 define i64 @brRR_i64_ne(i64 %x, i64 %y) {
1246 ; CHECK-LABEL: brRR_i64_ne:
1247 ; CHECK: # %bb.0: # %entry
1248 ; CHECK-NEXT: xor16 a1, a3
1249 ; CHECK-NEXT: xor16 a0, a2
1250 ; CHECK-NEXT: or16 a0, a1
1251 ; CHECK-NEXT: bez32 a0, .LBB32_2
1252 ; CHECK-NEXT: # %bb.1: # %label1
1253 ; CHECK-NEXT: movi16 a0, 1
1254 ; CHECK-NEXT: movi16 a1, 0
1256 ; CHECK-NEXT: .LBB32_2: # %label2
1257 ; CHECK-NEXT: movi16 a0, 0
1258 ; CHECK-NEXT: movi16 a1, 0
1261 ; GENERIC-LABEL: brRR_i64_ne:
1262 ; GENERIC: # %bb.0: # %entry
1263 ; GENERIC-NEXT: .cfi_def_cfa_offset 0
1264 ; GENERIC-NEXT: subi16 sp, sp, 4
1265 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
1266 ; GENERIC-NEXT: xor16 a1, a3
1267 ; GENERIC-NEXT: xor16 a0, a2
1268 ; GENERIC-NEXT: or16 a0, a1
1269 ; GENERIC-NEXT: cmpnei16 a0, 0
1270 ; GENERIC-NEXT: bf16 .LBB32_2
1271 ; GENERIC-NEXT: # %bb.1: # %label1
1272 ; GENERIC-NEXT: movi16 a0, 1
1273 ; GENERIC-NEXT: br32 .LBB32_3
1274 ; GENERIC-NEXT: .LBB32_2: # %label2
1275 ; GENERIC-NEXT: movi16 a0, 0
1276 ; GENERIC-NEXT: .LBB32_3: # %label1
1277 ; GENERIC-NEXT: movi16 a1, 0
1278 ; GENERIC-NEXT: addi16 sp, sp, 4
1279 ; GENERIC-NEXT: rts16
1281 %icmp = icmp ne i64 %y, %x
1282 br i1 %icmp, label %label1, label %label2
1289 define i64 @brRI_i64_ne(i64 %x) {
1290 ; CHECK-LABEL: brRI_i64_ne:
1291 ; CHECK: # %bb.0: # %entry
1292 ; CHECK-NEXT: xori32 a0, a0, 10
1293 ; CHECK-NEXT: or16 a0, a1
1294 ; CHECK-NEXT: bez32 a0, .LBB33_2
1295 ; CHECK-NEXT: # %bb.1: # %label1
1296 ; CHECK-NEXT: movi16 a0, 1
1297 ; CHECK-NEXT: movi16 a1, 0
1299 ; CHECK-NEXT: .LBB33_2: # %label2
1300 ; CHECK-NEXT: movi16 a0, 0
1301 ; CHECK-NEXT: movi16 a1, 0
1304 ; GENERIC-LABEL: brRI_i64_ne:
1305 ; GENERIC: # %bb.0: # %entry
1306 ; GENERIC-NEXT: .cfi_def_cfa_offset 0
1307 ; GENERIC-NEXT: subi16 sp, sp, 4
1308 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
1309 ; GENERIC-NEXT: movi16 a2, 10
1310 ; GENERIC-NEXT: xor16 a2, a0
1311 ; GENERIC-NEXT: or16 a2, a1
1312 ; GENERIC-NEXT: cmpnei16 a2, 0
1313 ; GENERIC-NEXT: bf16 .LBB33_2
1314 ; GENERIC-NEXT: # %bb.1: # %label1
1315 ; GENERIC-NEXT: movi16 a0, 1
1316 ; GENERIC-NEXT: br32 .LBB33_3
1317 ; GENERIC-NEXT: .LBB33_2: # %label2
1318 ; GENERIC-NEXT: movi16 a0, 0
1319 ; GENERIC-NEXT: .LBB33_3: # %label1
1320 ; GENERIC-NEXT: movi16 a1, 0
1321 ; GENERIC-NEXT: addi16 sp, sp, 4
1322 ; GENERIC-NEXT: rts16
1324 %icmp = icmp ne i64 %x, 10
1325 br i1 %icmp, label %label1, label %label2
1332 define i64 @brR0_i64_ne(i64 %x) {
1333 ; CHECK-LABEL: brR0_i64_ne:
1334 ; CHECK: # %bb.0: # %entry
1335 ; CHECK-NEXT: or16 a0, a1
1336 ; CHECK-NEXT: bez32 a0, .LBB34_2
1337 ; CHECK-NEXT: # %bb.1: # %label1
1338 ; CHECK-NEXT: movi16 a0, 1
1339 ; CHECK-NEXT: movi16 a1, 0
1341 ; CHECK-NEXT: .LBB34_2: # %label2
1342 ; CHECK-NEXT: movi16 a0, 0
1343 ; CHECK-NEXT: movi16 a1, 0
1346 ; GENERIC-LABEL: brR0_i64_ne:
1347 ; GENERIC: # %bb.0: # %entry
1348 ; GENERIC-NEXT: .cfi_def_cfa_offset 0
1349 ; GENERIC-NEXT: subi16 sp, sp, 4
1350 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
1351 ; GENERIC-NEXT: or16 a0, a1
1352 ; GENERIC-NEXT: cmpnei16 a0, 0
1353 ; GENERIC-NEXT: bf16 .LBB34_2
1354 ; GENERIC-NEXT: # %bb.1: # %label1
1355 ; GENERIC-NEXT: movi16 a0, 1
1356 ; GENERIC-NEXT: br32 .LBB34_3
1357 ; GENERIC-NEXT: .LBB34_2: # %label2
1358 ; GENERIC-NEXT: movi16 a0, 0
1359 ; GENERIC-NEXT: .LBB34_3: # %label1
1360 ; GENERIC-NEXT: movi16 a1, 0
1361 ; GENERIC-NEXT: addi16 sp, sp, 4
1362 ; GENERIC-NEXT: rts16
1364 %icmp = icmp ne i64 %x, 0
1365 br i1 %icmp, label %label1, label %label2
1373 define i64 @brRR_i64_ugt(i64 %x, i64 %y) {
1374 ; CHECK-LABEL: brRR_i64_ugt:
1375 ; CHECK: # %bb.0: # %entry
1376 ; CHECK-NEXT: .cfi_def_cfa_offset 0
1377 ; CHECK-NEXT: subi16 sp, sp, 16
1378 ; CHECK-NEXT: .cfi_def_cfa_offset 16
1379 ; CHECK-NEXT: cmphs16 a1, a3
1380 ; CHECK-NEXT: mvc32 t0
1381 ; CHECK-NEXT: st32.w t0, (sp, 12)
1382 ; CHECK-NEXT: cmphs16 a0, a2
1383 ; CHECK-NEXT: mvc32 a0
1384 ; CHECK-NEXT: st16.w a0, (sp, 4)
1385 ; CHECK-NEXT: cmpne16 a3, a1
1386 ; CHECK-NEXT: mvc32 a0
1387 ; CHECK-NEXT: st16.w a0, (sp, 8)
1388 ; CHECK-NEXT: ld16.w a0, (sp, 4)
1389 ; CHECK-NEXT: btsti16 a0, 0
1390 ; CHECK-NEXT: mvc32 a0
1391 ; CHECK-NEXT: ld16.w a1, (sp, 12)
1392 ; CHECK-NEXT: btsti16 a1, 0
1393 ; CHECK-NEXT: mvc32 a1
1394 ; CHECK-NEXT: ld16.w a2, (sp, 8)
1395 ; CHECK-NEXT: btsti16 a2, 0
1396 ; CHECK-NEXT: movf32 a1, a0
1397 ; CHECK-NEXT: btsti16 a1, 0
1398 ; CHECK-NEXT: bt32 .LBB35_2
1399 ; CHECK-NEXT: # %bb.1: # %label1
1400 ; CHECK-NEXT: movi16 a0, 1
1401 ; CHECK-NEXT: br32 .LBB35_3
1402 ; CHECK-NEXT: .LBB35_2: # %label2
1403 ; CHECK-NEXT: movi16 a0, 0
1404 ; CHECK-NEXT: .LBB35_3: # %label1
1405 ; CHECK-NEXT: movi16 a1, 0
1406 ; CHECK-NEXT: addi16 sp, sp, 16
1409 ; GENERIC-LABEL: brRR_i64_ugt:
1410 ; GENERIC: # %bb.0: # %entry
1411 ; GENERIC-NEXT: subi16 sp, sp, 8
1412 ; GENERIC-NEXT: .cfi_def_cfa_offset 8
1413 ; GENERIC-NEXT: st16.w l1, (sp, 4) # 4-byte Folded Spill
1414 ; GENERIC-NEXT: st16.w l0, (sp, 0) # 4-byte Folded Spill
1415 ; GENERIC-NEXT: .cfi_offset l1, -4
1416 ; GENERIC-NEXT: .cfi_offset l0, -8
1417 ; GENERIC-NEXT: subi16 sp, sp, 4
1418 ; GENERIC-NEXT: .cfi_def_cfa_offset 12
1419 ; GENERIC-NEXT: cmphs16 a1, a3
1420 ; GENERIC-NEXT: mvcv16 l1
1421 ; GENERIC-NEXT: movi16 l0, 1
1422 ; GENERIC-NEXT: cmphs16 a0, a2
1423 ; GENERIC-NEXT: mvcv16 a0
1424 ; GENERIC-NEXT: cmpne16 a3, a1
1425 ; GENERIC-NEXT: mvcv16 a1
1426 ; GENERIC-NEXT: btsti16 a1, 0
1427 ; GENERIC-NEXT: bt16 .LBB35_3
1428 ; GENERIC-NEXT: # %bb.1: # %entry
1429 ; GENERIC-NEXT: subu16 l0, l1
1430 ; GENERIC-NEXT: btsti16 l0, 0
1431 ; GENERIC-NEXT: bf16 .LBB35_4
1432 ; GENERIC-NEXT: .LBB35_2: # %label2
1433 ; GENERIC-NEXT: movi16 a0, 0
1434 ; GENERIC-NEXT: br32 .LBB35_5
1435 ; GENERIC-NEXT: .LBB35_3:
1436 ; GENERIC-NEXT: subu16 l0, a0
1437 ; GENERIC-NEXT: btsti16 l0, 0
1438 ; GENERIC-NEXT: bt16 .LBB35_2
1439 ; GENERIC-NEXT: .LBB35_4: # %label1
1440 ; GENERIC-NEXT: movi16 a0, 1
1441 ; GENERIC-NEXT: .LBB35_5: # %label1
1442 ; GENERIC-NEXT: movi16 a1, 0
1443 ; GENERIC-NEXT: addi16 sp, sp, 4
1444 ; GENERIC-NEXT: ld16.w l0, (sp, 0) # 4-byte Folded Reload
1445 ; GENERIC-NEXT: ld16.w l1, (sp, 4) # 4-byte Folded Reload
1446 ; GENERIC-NEXT: addi16 sp, sp, 8
1447 ; GENERIC-NEXT: rts16
1448 ; CHECK-UGTXT: icmpu32 a0, a1, a0
1449 ; CHECK-UGTXT: rts16
1451 %icmp = icmp ugt i64 %y, %x
1452 br i1 %icmp, label %label1, label %label2
1459 define i64 @brRI_i64_ugt(i64 %x) {
1460 ; CHECK-LABEL: brRI_i64_ugt:
1461 ; CHECK: # %bb.0: # %entry
1462 ; CHECK-NEXT: .cfi_def_cfa_offset 0
1463 ; CHECK-NEXT: subi16 sp, sp, 8
1464 ; CHECK-NEXT: .cfi_def_cfa_offset 8
1465 ; CHECK-NEXT: cmpnei16 a1, 0
1466 ; CHECK-NEXT: mvc32 a1
1467 ; CHECK-NEXT: st16.w a1, (sp, 4)
1468 ; CHECK-NEXT: cmphsi16 a0, 11
1469 ; CHECK-NEXT: mvcv16 a0
1470 ; CHECK-NEXT: movi16 a1, 0
1471 ; CHECK-NEXT: ld16.w a2, (sp, 4)
1472 ; CHECK-NEXT: btsti16 a2, 0
1473 ; CHECK-NEXT: movf32 a1, a0
1474 ; CHECK-NEXT: btsti16 a1, 0
1475 ; CHECK-NEXT: bt32 .LBB36_2
1476 ; CHECK-NEXT: # %bb.1: # %label1
1477 ; CHECK-NEXT: movi16 a0, 1
1478 ; CHECK-NEXT: br32 .LBB36_3
1479 ; CHECK-NEXT: .LBB36_2: # %label2
1480 ; CHECK-NEXT: movi16 a0, 0
1481 ; CHECK-NEXT: .LBB36_3: # %label1
1482 ; CHECK-NEXT: movi16 a1, 0
1483 ; CHECK-NEXT: addi16 sp, sp, 8
1486 ; GENERIC-LABEL: brRI_i64_ugt:
1487 ; GENERIC: # %bb.0: # %entry
1488 ; GENERIC-NEXT: .cfi_def_cfa_offset 0
1489 ; GENERIC-NEXT: subi16 sp, sp, 4
1490 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
1491 ; GENERIC-NEXT: cmphsi16 a0, 11
1492 ; GENERIC-NEXT: mvcv16 a0
1493 ; GENERIC-NEXT: cmpnei16 a1, 0
1494 ; GENERIC-NEXT: mvcv16 a1
1495 ; GENERIC-NEXT: btsti16 a1, 0
1496 ; GENERIC-NEXT: bt16 .LBB36_2
1497 ; GENERIC-NEXT: # %bb.1: # %entry
1498 ; GENERIC-NEXT: movi16 a0, 0
1499 ; GENERIC-NEXT: .LBB36_2: # %entry
1500 ; GENERIC-NEXT: btsti16 a0, 0
1501 ; GENERIC-NEXT: bt16 .LBB36_4
1502 ; GENERIC-NEXT: # %bb.3: # %label1
1503 ; GENERIC-NEXT: movi16 a0, 1
1504 ; GENERIC-NEXT: br32 .LBB36_5
1505 ; GENERIC-NEXT: .LBB36_4: # %label2
1506 ; GENERIC-NEXT: movi16 a0, 0
1507 ; GENERIC-NEXT: .LBB36_5: # %label1
1508 ; GENERIC-NEXT: movi16 a1, 0
1509 ; GENERIC-NEXT: addi16 sp, sp, 4
1510 ; GENERIC-NEXT: rts16
1511 ; CHECK-UGTXT: icmpu32 a0, a1, a0
1512 ; CHECK-UGTXT: rts16
1514 %icmp = icmp ugt i64 %x, 10
1515 br i1 %icmp, label %label1, label %label2
1522 define i64 @brR0_i64_ugt(i64 %x) {
1523 ; CHECK-LABEL: brR0_i64_ugt:
1524 ; CHECK: # %bb.0: # %entry
1525 ; CHECK-NEXT: or16 a0, a1
1526 ; CHECK-NEXT: bez32 a0, .LBB37_2
1527 ; CHECK-NEXT: # %bb.1: # %label1
1528 ; CHECK-NEXT: movi16 a0, 1
1529 ; CHECK-NEXT: movi16 a1, 0
1531 ; CHECK-NEXT: .LBB37_2: # %label2
1532 ; CHECK-NEXT: movi16 a0, 0
1533 ; CHECK-NEXT: movi16 a1, 0
1536 ; GENERIC-LABEL: brR0_i64_ugt:
1537 ; GENERIC: # %bb.0: # %entry
1538 ; GENERIC-NEXT: .cfi_def_cfa_offset 0
1539 ; GENERIC-NEXT: subi16 sp, sp, 4
1540 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
1541 ; GENERIC-NEXT: or16 a0, a1
1542 ; GENERIC-NEXT: cmpnei16 a0, 0
1543 ; GENERIC-NEXT: bf16 .LBB37_2
1544 ; GENERIC-NEXT: # %bb.1: # %label1
1545 ; GENERIC-NEXT: movi16 a0, 1
1546 ; GENERIC-NEXT: br32 .LBB37_3
1547 ; GENERIC-NEXT: .LBB37_2: # %label2
1548 ; GENERIC-NEXT: movi16 a0, 0
1549 ; GENERIC-NEXT: .LBB37_3: # %label1
1550 ; GENERIC-NEXT: movi16 a1, 0
1551 ; GENERIC-NEXT: addi16 sp, sp, 4
1552 ; GENERIC-NEXT: rts16
1553 ; CHECK-UGTXT: icmpu32 a0, a1, a0
1554 ; CHECK-UGTXT: rts16
1556 %icmp = icmp ugt i64 %x, 0
1557 br i1 %icmp, label %label1, label %label2
1565 define i64 @brRR_i64_uge(i64 %x, i64 %y) {
1566 ; CHECK-LABEL: brRR_i64_uge:
1567 ; CHECK: # %bb.0: # %entry
1568 ; CHECK-NEXT: .cfi_def_cfa_offset 0
1569 ; CHECK-NEXT: subi16 sp, sp, 8
1570 ; CHECK-NEXT: .cfi_def_cfa_offset 8
1571 ; CHECK-NEXT: cmpne16 a3, a1
1572 ; CHECK-NEXT: mvc32 t0
1573 ; CHECK-NEXT: st32.w t0, (sp, 4)
1574 ; CHECK-NEXT: cmphs16 a3, a1
1575 ; CHECK-NEXT: mvcv16 a1
1576 ; CHECK-NEXT: cmphs16 a2, a0
1577 ; CHECK-NEXT: mvcv16 a0
1578 ; CHECK-NEXT: ld16.w a2, (sp, 4)
1579 ; CHECK-NEXT: btsti16 a2, 0
1580 ; CHECK-NEXT: movf32 a1, a0
1581 ; CHECK-NEXT: btsti16 a1, 0
1582 ; CHECK-NEXT: bt32 .LBB38_2
1583 ; CHECK-NEXT: # %bb.1: # %label1
1584 ; CHECK-NEXT: movi16 a0, 1
1585 ; CHECK-NEXT: br32 .LBB38_3
1586 ; CHECK-NEXT: .LBB38_2: # %label2
1587 ; CHECK-NEXT: movi16 a0, 0
1588 ; CHECK-NEXT: .LBB38_3: # %label1
1589 ; CHECK-NEXT: movi16 a1, 0
1590 ; CHECK-NEXT: addi16 sp, sp, 8
1593 ; GENERIC-LABEL: brRR_i64_uge:
1594 ; GENERIC: # %bb.0: # %entry
1595 ; GENERIC-NEXT: subi16 sp, sp, 4
1596 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
1597 ; GENERIC-NEXT: st16.w l0, (sp, 0) # 4-byte Folded Spill
1598 ; GENERIC-NEXT: .cfi_offset l0, -4
1599 ; GENERIC-NEXT: subi16 sp, sp, 4
1600 ; GENERIC-NEXT: .cfi_def_cfa_offset 8
1601 ; GENERIC-NEXT: cmphs16 a3, a1
1602 ; GENERIC-NEXT: mvcv16 l0
1603 ; GENERIC-NEXT: cmphs16 a2, a0
1604 ; GENERIC-NEXT: mvcv16 a0
1605 ; GENERIC-NEXT: cmpne16 a3, a1
1606 ; GENERIC-NEXT: mvcv16 a1
1607 ; GENERIC-NEXT: btsti16 a1, 0
1608 ; GENERIC-NEXT: bt16 .LBB38_2
1609 ; GENERIC-NEXT: # %bb.1: # %entry
1610 ; GENERIC-NEXT: mov16 a0, l0
1611 ; GENERIC-NEXT: .LBB38_2: # %entry
1612 ; GENERIC-NEXT: btsti16 a0, 0
1613 ; GENERIC-NEXT: bt16 .LBB38_4
1614 ; GENERIC-NEXT: # %bb.3: # %label1
1615 ; GENERIC-NEXT: movi16 a0, 1
1616 ; GENERIC-NEXT: br32 .LBB38_5
1617 ; GENERIC-NEXT: .LBB38_4: # %label2
1618 ; GENERIC-NEXT: movi16 a0, 0
1619 ; GENERIC-NEXT: .LBB38_5: # %label1
1620 ; GENERIC-NEXT: movi16 a1, 0
1621 ; GENERIC-NEXT: addi16 sp, sp, 4
1622 ; GENERIC-NEXT: ld16.w l0, (sp, 0) # 4-byte Folded Reload
1623 ; GENERIC-NEXT: addi16 sp, sp, 4
1624 ; GENERIC-NEXT: rts16
1625 ; CHECK-UGTXT: icmpu32 a0, a1, a0
1626 ; CHECK-UGTXT: rts16
1628 %icmp = icmp uge i64 %y, %x
1629 br i1 %icmp, label %label1, label %label2
1636 define i64 @brRI_i64_uge(i64 %x) {
1637 ; CHECK-LABEL: brRI_i64_uge:
1638 ; CHECK: # %bb.0: # %entry
1639 ; CHECK-NEXT: .cfi_def_cfa_offset 0
1640 ; CHECK-NEXT: subi16 sp, sp, 8
1641 ; CHECK-NEXT: .cfi_def_cfa_offset 8
1642 ; CHECK-NEXT: cmpnei16 a1, 0
1643 ; CHECK-NEXT: mvc32 a1
1644 ; CHECK-NEXT: st16.w a1, (sp, 4)
1645 ; CHECK-NEXT: cmphsi16 a0, 10
1646 ; CHECK-NEXT: mvcv16 a0
1647 ; CHECK-NEXT: movi16 a1, 0
1648 ; CHECK-NEXT: ld16.w a2, (sp, 4)
1649 ; CHECK-NEXT: btsti16 a2, 0
1650 ; CHECK-NEXT: movf32 a1, a0
1651 ; CHECK-NEXT: btsti16 a1, 0
1652 ; CHECK-NEXT: bt32 .LBB39_2
1653 ; CHECK-NEXT: # %bb.1: # %label1
1654 ; CHECK-NEXT: movi16 a0, 1
1655 ; CHECK-NEXT: br32 .LBB39_3
1656 ; CHECK-NEXT: .LBB39_2: # %label2
1657 ; CHECK-NEXT: movi16 a0, 0
1658 ; CHECK-NEXT: .LBB39_3: # %label1
1659 ; CHECK-NEXT: movi16 a1, 0
1660 ; CHECK-NEXT: addi16 sp, sp, 8
1663 ; GENERIC-LABEL: brRI_i64_uge:
1664 ; GENERIC: # %bb.0: # %entry
1665 ; GENERIC-NEXT: .cfi_def_cfa_offset 0
1666 ; GENERIC-NEXT: subi16 sp, sp, 4
1667 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
1668 ; GENERIC-NEXT: cmphsi16 a0, 10
1669 ; GENERIC-NEXT: mvcv16 a0
1670 ; GENERIC-NEXT: cmpnei16 a1, 0
1671 ; GENERIC-NEXT: mvcv16 a1
1672 ; GENERIC-NEXT: btsti16 a1, 0
1673 ; GENERIC-NEXT: bt16 .LBB39_2
1674 ; GENERIC-NEXT: # %bb.1: # %entry
1675 ; GENERIC-NEXT: movi16 a0, 0
1676 ; GENERIC-NEXT: .LBB39_2: # %entry
1677 ; GENERIC-NEXT: btsti16 a0, 0
1678 ; GENERIC-NEXT: bt16 .LBB39_4
1679 ; GENERIC-NEXT: # %bb.3: # %label1
1680 ; GENERIC-NEXT: movi16 a0, 1
1681 ; GENERIC-NEXT: br32 .LBB39_5
1682 ; GENERIC-NEXT: .LBB39_4: # %label2
1683 ; GENERIC-NEXT: movi16 a0, 0
1684 ; GENERIC-NEXT: .LBB39_5: # %label1
1685 ; GENERIC-NEXT: movi16 a1, 0
1686 ; GENERIC-NEXT: addi16 sp, sp, 4
1687 ; GENERIC-NEXT: rts16
1688 ; CHECK-UGTXT: icmpu32 a0, a1, a0
1689 ; CHECK-UGTXT: rts16
1691 %icmp = icmp uge i64 %x, 10
1692 br i1 %icmp, label %label1, label %label2
1700 define i64 @brRR_i64_ult(i64 %x, i64 %y) {
1701 ; CHECK-LABEL: brRR_i64_ult:
1702 ; CHECK: # %bb.0: # %entry
1703 ; CHECK-NEXT: .cfi_def_cfa_offset 0
1704 ; CHECK-NEXT: subi16 sp, sp, 16
1705 ; CHECK-NEXT: .cfi_def_cfa_offset 16
1706 ; CHECK-NEXT: cmphs16 a3, a1
1707 ; CHECK-NEXT: mvc32 t0
1708 ; CHECK-NEXT: st32.w t0, (sp, 12)
1709 ; CHECK-NEXT: cmphs16 a2, a0
1710 ; CHECK-NEXT: mvc32 a0
1711 ; CHECK-NEXT: st16.w a0, (sp, 4)
1712 ; CHECK-NEXT: cmpne16 a3, a1
1713 ; CHECK-NEXT: mvc32 a0
1714 ; CHECK-NEXT: st16.w a0, (sp, 8)
1715 ; CHECK-NEXT: ld16.w a0, (sp, 4)
1716 ; CHECK-NEXT: btsti16 a0, 0
1717 ; CHECK-NEXT: mvc32 a0
1718 ; CHECK-NEXT: ld16.w a1, (sp, 12)
1719 ; CHECK-NEXT: btsti16 a1, 0
1720 ; CHECK-NEXT: mvc32 a1
1721 ; CHECK-NEXT: ld16.w a2, (sp, 8)
1722 ; CHECK-NEXT: btsti16 a2, 0
1723 ; CHECK-NEXT: movf32 a1, a0
1724 ; CHECK-NEXT: btsti16 a1, 0
1725 ; CHECK-NEXT: bt32 .LBB40_2
1726 ; CHECK-NEXT: # %bb.1: # %label1
1727 ; CHECK-NEXT: movi16 a0, 1
1728 ; CHECK-NEXT: br32 .LBB40_3
1729 ; CHECK-NEXT: .LBB40_2: # %label2
1730 ; CHECK-NEXT: movi16 a0, 0
1731 ; CHECK-NEXT: .LBB40_3: # %label1
1732 ; CHECK-NEXT: movi16 a1, 0
1733 ; CHECK-NEXT: addi16 sp, sp, 16
1736 ; GENERIC-LABEL: brRR_i64_ult:
1737 ; GENERIC: # %bb.0: # %entry
1738 ; GENERIC-NEXT: subi16 sp, sp, 8
1739 ; GENERIC-NEXT: .cfi_def_cfa_offset 8
1740 ; GENERIC-NEXT: st16.w l1, (sp, 4) # 4-byte Folded Spill
1741 ; GENERIC-NEXT: st16.w l0, (sp, 0) # 4-byte Folded Spill
1742 ; GENERIC-NEXT: .cfi_offset l1, -4
1743 ; GENERIC-NEXT: .cfi_offset l0, -8
1744 ; GENERIC-NEXT: subi16 sp, sp, 4
1745 ; GENERIC-NEXT: .cfi_def_cfa_offset 12
1746 ; GENERIC-NEXT: cmphs16 a3, a1
1747 ; GENERIC-NEXT: mvcv16 l1
1748 ; GENERIC-NEXT: movi16 l0, 1
1749 ; GENERIC-NEXT: cmphs16 a2, a0
1750 ; GENERIC-NEXT: mvcv16 a0
1751 ; GENERIC-NEXT: cmpne16 a3, a1
1752 ; GENERIC-NEXT: mvcv16 a1
1753 ; GENERIC-NEXT: btsti16 a1, 0
1754 ; GENERIC-NEXT: bt16 .LBB40_3
1755 ; GENERIC-NEXT: # %bb.1: # %entry
1756 ; GENERIC-NEXT: subu16 l0, l1
1757 ; GENERIC-NEXT: btsti16 l0, 0
1758 ; GENERIC-NEXT: bf16 .LBB40_4
1759 ; GENERIC-NEXT: .LBB40_2: # %label2
1760 ; GENERIC-NEXT: movi16 a0, 0
1761 ; GENERIC-NEXT: br32 .LBB40_5
1762 ; GENERIC-NEXT: .LBB40_3:
1763 ; GENERIC-NEXT: subu16 l0, a0
1764 ; GENERIC-NEXT: btsti16 l0, 0
1765 ; GENERIC-NEXT: bt16 .LBB40_2
1766 ; GENERIC-NEXT: .LBB40_4: # %label1
1767 ; GENERIC-NEXT: movi16 a0, 1
1768 ; GENERIC-NEXT: .LBB40_5: # %label1
1769 ; GENERIC-NEXT: movi16 a1, 0
1770 ; GENERIC-NEXT: addi16 sp, sp, 4
1771 ; GENERIC-NEXT: ld16.w l0, (sp, 0) # 4-byte Folded Reload
1772 ; GENERIC-NEXT: ld16.w l1, (sp, 4) # 4-byte Folded Reload
1773 ; GENERIC-NEXT: addi16 sp, sp, 8
1774 ; GENERIC-NEXT: rts16
1775 ; CHECK-UGTXT: icmpu32 a0, a1, a0
1776 ; CHECK-UGTXT: rts16
1778 %icmp = icmp ult i64 %y, %x
1779 br i1 %icmp, label %label1, label %label2
1786 define i64 @brRI_i64_ult(i64 %x) {
1787 ; CHECK-LABEL: brRI_i64_ult:
1788 ; CHECK: # %bb.0: # %entry
1789 ; CHECK-NEXT: movi16 a2, 9
1790 ; CHECK-NEXT: cmphs16 a2, a0
1791 ; CHECK-NEXT: mvcv16 a0
1792 ; CHECK-NEXT: cmpnei16 a1, 0
1793 ; CHECK-NEXT: mvc32 a1
1794 ; CHECK-NEXT: movf32 a1, a0
1795 ; CHECK-NEXT: btsti16 a1, 0
1796 ; CHECK-NEXT: bt32 .LBB41_2
1797 ; CHECK-NEXT: # %bb.1: # %label1
1798 ; CHECK-NEXT: movi16 a0, 1
1799 ; CHECK-NEXT: movi16 a1, 0
1801 ; CHECK-NEXT: .LBB41_2: # %label2
1802 ; CHECK-NEXT: movi16 a0, 0
1803 ; CHECK-NEXT: movi16 a1, 0
1806 ; GENERIC-LABEL: brRI_i64_ult:
1807 ; GENERIC: # %bb.0: # %entry
1808 ; GENERIC-NEXT: .cfi_def_cfa_offset 0
1809 ; GENERIC-NEXT: subi16 sp, sp, 4
1810 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
1811 ; GENERIC-NEXT: cmpnei16 a1, 0
1812 ; GENERIC-NEXT: mvcv16 a1
1813 ; GENERIC-NEXT: movi16 a2, 9
1814 ; GENERIC-NEXT: cmphs16 a2, a0
1815 ; GENERIC-NEXT: mvcv16 a0
1816 ; GENERIC-NEXT: btsti16 a1, 0
1817 ; GENERIC-NEXT: bt16 .LBB41_2
1818 ; GENERIC-NEXT: # %bb.1: # %entry
1819 ; GENERIC-NEXT: movi16 a0, 1
1820 ; GENERIC-NEXT: subu16 a0, a1
1821 ; GENERIC-NEXT: .LBB41_2: # %entry
1822 ; GENERIC-NEXT: btsti16 a0, 0
1823 ; GENERIC-NEXT: bt16 .LBB41_4
1824 ; GENERIC-NEXT: # %bb.3: # %label1
1825 ; GENERIC-NEXT: movi16 a0, 1
1826 ; GENERIC-NEXT: br32 .LBB41_5
1827 ; GENERIC-NEXT: .LBB41_4: # %label2
1828 ; GENERIC-NEXT: movi16 a0, 0
1829 ; GENERIC-NEXT: .LBB41_5: # %label1
1830 ; GENERIC-NEXT: movi16 a1, 0
1831 ; GENERIC-NEXT: addi16 sp, sp, 4
1832 ; GENERIC-NEXT: rts16
1833 ; CHECK-UGTXT: icmpu32 a0, a1, a0
1834 ; CHECK-UGTXT: rts16
1836 %icmp = icmp ult i64 %x, 10
1837 br i1 %icmp, label %label1, label %label2
1846 define i64 @brRR_i64_ule(i64 %x, i64 %y) {
1847 ; CHECK-LABEL: brRR_i64_ule:
1848 ; CHECK: # %bb.0: # %entry
1849 ; CHECK-NEXT: .cfi_def_cfa_offset 0
1850 ; CHECK-NEXT: subi16 sp, sp, 8
1851 ; CHECK-NEXT: .cfi_def_cfa_offset 8
1852 ; CHECK-NEXT: cmpne16 a3, a1
1853 ; CHECK-NEXT: mvc32 t0
1854 ; CHECK-NEXT: st32.w t0, (sp, 4)
1855 ; CHECK-NEXT: cmphs16 a1, a3
1856 ; CHECK-NEXT: mvcv16 a1
1857 ; CHECK-NEXT: cmphs16 a0, a2
1858 ; CHECK-NEXT: mvcv16 a0
1859 ; CHECK-NEXT: ld16.w a2, (sp, 4)
1860 ; CHECK-NEXT: btsti16 a2, 0
1861 ; CHECK-NEXT: movf32 a1, a0
1862 ; CHECK-NEXT: btsti16 a1, 0
1863 ; CHECK-NEXT: bt32 .LBB42_2
1864 ; CHECK-NEXT: # %bb.1: # %label1
1865 ; CHECK-NEXT: movi16 a0, 1
1866 ; CHECK-NEXT: br32 .LBB42_3
1867 ; CHECK-NEXT: .LBB42_2: # %label2
1868 ; CHECK-NEXT: movi16 a0, 0
1869 ; CHECK-NEXT: .LBB42_3: # %label1
1870 ; CHECK-NEXT: movi16 a1, 0
1871 ; CHECK-NEXT: addi16 sp, sp, 8
1874 ; GENERIC-LABEL: brRR_i64_ule:
1875 ; GENERIC: # %bb.0: # %entry
1876 ; GENERIC-NEXT: subi16 sp, sp, 4
1877 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
1878 ; GENERIC-NEXT: st16.w l0, (sp, 0) # 4-byte Folded Spill
1879 ; GENERIC-NEXT: .cfi_offset l0, -4
1880 ; GENERIC-NEXT: subi16 sp, sp, 4
1881 ; GENERIC-NEXT: .cfi_def_cfa_offset 8
1882 ; GENERIC-NEXT: cmphs16 a1, a3
1883 ; GENERIC-NEXT: mvcv16 l0
1884 ; GENERIC-NEXT: cmphs16 a0, a2
1885 ; GENERIC-NEXT: mvcv16 a0
1886 ; GENERIC-NEXT: cmpne16 a3, a1
1887 ; GENERIC-NEXT: mvcv16 a1
1888 ; GENERIC-NEXT: btsti16 a1, 0
1889 ; GENERIC-NEXT: bt16 .LBB42_2
1890 ; GENERIC-NEXT: # %bb.1: # %entry
1891 ; GENERIC-NEXT: mov16 a0, l0
1892 ; GENERIC-NEXT: .LBB42_2: # %entry
1893 ; GENERIC-NEXT: btsti16 a0, 0
1894 ; GENERIC-NEXT: bt16 .LBB42_4
1895 ; GENERIC-NEXT: # %bb.3: # %label1
1896 ; GENERIC-NEXT: movi16 a0, 1
1897 ; GENERIC-NEXT: br32 .LBB42_5
1898 ; GENERIC-NEXT: .LBB42_4: # %label2
1899 ; GENERIC-NEXT: movi16 a0, 0
1900 ; GENERIC-NEXT: .LBB42_5: # %label1
1901 ; GENERIC-NEXT: movi16 a1, 0
1902 ; GENERIC-NEXT: addi16 sp, sp, 4
1903 ; GENERIC-NEXT: ld16.w l0, (sp, 0) # 4-byte Folded Reload
1904 ; GENERIC-NEXT: addi16 sp, sp, 4
1905 ; GENERIC-NEXT: rts16
1906 ; CHECK-UGTXT: icmpu32 a0, a1, a0
1907 ; CHECK-UGTXT: rts16
1909 %icmp = icmp ule i64 %y, %x
1910 br i1 %icmp, label %label1, label %label2
1917 define i64 @brRI_i64_ule(i64 %x) {
1918 ; CHECK-LABEL: brRI_i64_ule:
1919 ; CHECK: # %bb.0: # %entry
1920 ; CHECK-NEXT: movi16 a2, 10
1921 ; CHECK-NEXT: cmphs16 a2, a0
1922 ; CHECK-NEXT: mvcv16 a0
1923 ; CHECK-NEXT: cmpnei16 a1, 0
1924 ; CHECK-NEXT: mvc32 a1
1925 ; CHECK-NEXT: movf32 a1, a0
1926 ; CHECK-NEXT: btsti16 a1, 0
1927 ; CHECK-NEXT: bt32 .LBB43_2
1928 ; CHECK-NEXT: # %bb.1: # %label1
1929 ; CHECK-NEXT: movi16 a0, 1
1930 ; CHECK-NEXT: movi16 a1, 0
1932 ; CHECK-NEXT: .LBB43_2: # %label2
1933 ; CHECK-NEXT: movi16 a0, 0
1934 ; CHECK-NEXT: movi16 a1, 0
1937 ; GENERIC-LABEL: brRI_i64_ule:
1938 ; GENERIC: # %bb.0: # %entry
1939 ; GENERIC-NEXT: .cfi_def_cfa_offset 0
1940 ; GENERIC-NEXT: subi16 sp, sp, 4
1941 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
1942 ; GENERIC-NEXT: cmpnei16 a1, 0
1943 ; GENERIC-NEXT: mvcv16 a1
1944 ; GENERIC-NEXT: movi16 a2, 10
1945 ; GENERIC-NEXT: cmphs16 a2, a0
1946 ; GENERIC-NEXT: mvcv16 a0
1947 ; GENERIC-NEXT: btsti16 a1, 0
1948 ; GENERIC-NEXT: bt16 .LBB43_2
1949 ; GENERIC-NEXT: # %bb.1: # %entry
1950 ; GENERIC-NEXT: movi16 a0, 1
1951 ; GENERIC-NEXT: subu16 a0, a1
1952 ; GENERIC-NEXT: .LBB43_2: # %entry
1953 ; GENERIC-NEXT: btsti16 a0, 0
1954 ; GENERIC-NEXT: bt16 .LBB43_4
1955 ; GENERIC-NEXT: # %bb.3: # %label1
1956 ; GENERIC-NEXT: movi16 a0, 1
1957 ; GENERIC-NEXT: br32 .LBB43_5
1958 ; GENERIC-NEXT: .LBB43_4: # %label2
1959 ; GENERIC-NEXT: movi16 a0, 0
1960 ; GENERIC-NEXT: .LBB43_5: # %label1
1961 ; GENERIC-NEXT: movi16 a1, 0
1962 ; GENERIC-NEXT: addi16 sp, sp, 4
1963 ; GENERIC-NEXT: rts16
1964 ; CHECK-UGTXT: icmpu32 a0, a1, a0
1965 ; CHECK-UGTXT: rts16
1967 %icmp = icmp ule i64 %x, 10
1968 br i1 %icmp, label %label1, label %label2
1975 define i64 @brR0_i64_ule(i64 %x) {
1976 ; CHECK-LABEL: brR0_i64_ule:
1977 ; CHECK: # %bb.0: # %entry
1978 ; CHECK-NEXT: or16 a0, a1
1979 ; CHECK-NEXT: bnez32 a0, .LBB44_2
1980 ; CHECK-NEXT: # %bb.1: # %label1
1981 ; CHECK-NEXT: movi16 a0, 1
1982 ; CHECK-NEXT: movi16 a1, 0
1984 ; CHECK-NEXT: .LBB44_2: # %label2
1985 ; CHECK-NEXT: movi16 a0, 0
1986 ; CHECK-NEXT: movi16 a1, 0
1989 ; GENERIC-LABEL: brR0_i64_ule:
1990 ; GENERIC: # %bb.0: # %entry
1991 ; GENERIC-NEXT: .cfi_def_cfa_offset 0
1992 ; GENERIC-NEXT: subi16 sp, sp, 4
1993 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
1994 ; GENERIC-NEXT: or16 a0, a1
1995 ; GENERIC-NEXT: cmpnei16 a0, 0
1996 ; GENERIC-NEXT: bt16 .LBB44_2
1997 ; GENERIC-NEXT: # %bb.1: # %label1
1998 ; GENERIC-NEXT: movi16 a0, 1
1999 ; GENERIC-NEXT: br32 .LBB44_3
2000 ; GENERIC-NEXT: .LBB44_2: # %label2
2001 ; GENERIC-NEXT: movi16 a0, 0
2002 ; GENERIC-NEXT: .LBB44_3: # %label1
2003 ; GENERIC-NEXT: movi16 a1, 0
2004 ; GENERIC-NEXT: addi16 sp, sp, 4
2005 ; GENERIC-NEXT: rts16
2006 ; CHECK-UGTXT: icmpu32 a0, a1, a0
2007 ; CHECK-UGTXT: rts16
2009 %icmp = icmp ule i64 %x, 0
2010 br i1 %icmp, label %label1, label %label2
2018 define i64 @brRR_i64_sgt(i64 %x, i64 %y) {
2019 ; CHECK-LABEL: brRR_i64_sgt:
2020 ; CHECK: # %bb.0: # %entry
2021 ; CHECK-NEXT: .cfi_def_cfa_offset 0
2022 ; CHECK-NEXT: subi16 sp, sp, 12
2023 ; CHECK-NEXT: .cfi_def_cfa_offset 12
2024 ; CHECK-NEXT: cmphs16 a0, a2
2025 ; CHECK-NEXT: mvc32 a0
2026 ; CHECK-NEXT: st16.w a0, (sp, 4)
2027 ; CHECK-NEXT: cmpne16 a3, a1
2028 ; CHECK-NEXT: mvc32 a0
2029 ; CHECK-NEXT: st16.w a0, (sp, 8)
2030 ; CHECK-NEXT: cmplt16 a1, a3
2031 ; CHECK-NEXT: mvcv16 a0
2032 ; CHECK-NEXT: ld16.w a1, (sp, 4)
2033 ; CHECK-NEXT: btsti16 a1, 0
2034 ; CHECK-NEXT: mvc32 a1
2035 ; CHECK-NEXT: ld16.w a2, (sp, 8)
2036 ; CHECK-NEXT: btsti16 a2, 0
2037 ; CHECK-NEXT: movf32 a0, a1
2038 ; CHECK-NEXT: btsti16 a0, 0
2039 ; CHECK-NEXT: bt32 .LBB45_2
2040 ; CHECK-NEXT: # %bb.1: # %label1
2041 ; CHECK-NEXT: movi16 a0, 1
2042 ; CHECK-NEXT: br32 .LBB45_3
2043 ; CHECK-NEXT: .LBB45_2: # %label2
2044 ; CHECK-NEXT: movi16 a0, 0
2045 ; CHECK-NEXT: .LBB45_3: # %label1
2046 ; CHECK-NEXT: movi16 a1, 0
2047 ; CHECK-NEXT: addi16 sp, sp, 12
2050 ; GENERIC-LABEL: brRR_i64_sgt:
2051 ; GENERIC: # %bb.0: # %entry
2052 ; GENERIC-NEXT: .cfi_def_cfa_offset 0
2053 ; GENERIC-NEXT: subi16 sp, sp, 4
2054 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
2055 ; GENERIC-NEXT: cmphs16 a0, a2
2056 ; GENERIC-NEXT: mvcv16 a2
2057 ; GENERIC-NEXT: cmplt16 a1, a3
2058 ; GENERIC-NEXT: mvcv16 a0
2059 ; GENERIC-NEXT: cmpne16 a3, a1
2060 ; GENERIC-NEXT: mvcv16 a1
2061 ; GENERIC-NEXT: btsti16 a1, 0
2062 ; GENERIC-NEXT: bf16 .LBB45_2
2063 ; GENERIC-NEXT: # %bb.1:
2064 ; GENERIC-NEXT: movi16 a0, 1
2065 ; GENERIC-NEXT: subu16 a0, a2
2066 ; GENERIC-NEXT: .LBB45_2: # %entry
2067 ; GENERIC-NEXT: btsti16 a0, 0
2068 ; GENERIC-NEXT: bt16 .LBB45_4
2069 ; GENERIC-NEXT: # %bb.3: # %label1
2070 ; GENERIC-NEXT: movi16 a0, 1
2071 ; GENERIC-NEXT: br32 .LBB45_5
2072 ; GENERIC-NEXT: .LBB45_4: # %label2
2073 ; GENERIC-NEXT: movi16 a0, 0
2074 ; GENERIC-NEXT: .LBB45_5: # %label1
2075 ; GENERIC-NEXT: movi16 a1, 0
2076 ; GENERIC-NEXT: addi16 sp, sp, 4
2077 ; GENERIC-NEXT: rts16
2078 ; CHECK-UGTXT: icmpu32 a0, a1, a0
2079 ; CHECK-UGTXT: rts16
2081 %icmp = icmp sgt i64 %y, %x
2082 br i1 %icmp, label %label1, label %label2
2089 define i64 @brRI_i64_sgt(i64 %x) {
2090 ; CHECK-LABEL: brRI_i64_sgt:
2091 ; CHECK: # %bb.0: # %entry
2092 ; CHECK-NEXT: .cfi_def_cfa_offset 0
2093 ; CHECK-NEXT: subi16 sp, sp, 12
2094 ; CHECK-NEXT: .cfi_def_cfa_offset 12
2095 ; CHECK-NEXT: movi16 a2, 0
2096 ; CHECK-NEXT: cmplt16 a1, a2
2097 ; CHECK-NEXT: mvc32 a2
2098 ; CHECK-NEXT: st16.w a2, (sp, 4)
2099 ; CHECK-NEXT: cmpnei16 a1, 0
2100 ; CHECK-NEXT: mvc32 a1
2101 ; CHECK-NEXT: st16.w a1, (sp, 8)
2102 ; CHECK-NEXT: cmphsi16 a0, 11
2103 ; CHECK-NEXT: mvcv16 a0
2104 ; CHECK-NEXT: ld16.w a1, (sp, 4)
2105 ; CHECK-NEXT: btsti16 a1, 0
2106 ; CHECK-NEXT: mvc32 a1
2107 ; CHECK-NEXT: ld16.w a2, (sp, 8)
2108 ; CHECK-NEXT: btsti16 a2, 0
2109 ; CHECK-NEXT: movf32 a1, a0
2110 ; CHECK-NEXT: btsti16 a1, 0
2111 ; CHECK-NEXT: bt32 .LBB46_2
2112 ; CHECK-NEXT: # %bb.1: # %label1
2113 ; CHECK-NEXT: movi16 a0, 1
2114 ; CHECK-NEXT: br32 .LBB46_3
2115 ; CHECK-NEXT: .LBB46_2: # %label2
2116 ; CHECK-NEXT: movi16 a0, 0
2117 ; CHECK-NEXT: .LBB46_3: # %label1
2118 ; CHECK-NEXT: movi16 a1, 0
2119 ; CHECK-NEXT: addi16 sp, sp, 12
2122 ; GENERIC-LABEL: brRI_i64_sgt:
2123 ; GENERIC: # %bb.0: # %entry
2124 ; GENERIC-NEXT: .cfi_def_cfa_offset 0
2125 ; GENERIC-NEXT: subi16 sp, sp, 4
2126 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
2127 ; GENERIC-NEXT: movi16 a2, 0
2128 ; GENERIC-NEXT: cmplt16 a1, a2
2129 ; GENERIC-NEXT: mvcv16 a2
2130 ; GENERIC-NEXT: cmphsi16 a0, 11
2131 ; GENERIC-NEXT: mvcv16 a0
2132 ; GENERIC-NEXT: cmpnei16 a1, 0
2133 ; GENERIC-NEXT: mvcv16 a1
2134 ; GENERIC-NEXT: btsti16 a1, 0
2135 ; GENERIC-NEXT: bt16 .LBB46_2
2136 ; GENERIC-NEXT: # %bb.1: # %entry
2137 ; GENERIC-NEXT: movi16 a0, 1
2138 ; GENERIC-NEXT: subu16 a0, a2
2139 ; GENERIC-NEXT: .LBB46_2: # %entry
2140 ; GENERIC-NEXT: btsti16 a0, 0
2141 ; GENERIC-NEXT: bt16 .LBB46_4
2142 ; GENERIC-NEXT: # %bb.3: # %label1
2143 ; GENERIC-NEXT: movi16 a0, 1
2144 ; GENERIC-NEXT: br32 .LBB46_5
2145 ; GENERIC-NEXT: .LBB46_4: # %label2
2146 ; GENERIC-NEXT: movi16 a0, 0
2147 ; GENERIC-NEXT: .LBB46_5: # %label1
2148 ; GENERIC-NEXT: movi16 a1, 0
2149 ; GENERIC-NEXT: addi16 sp, sp, 4
2150 ; GENERIC-NEXT: rts16
2151 ; CHECK-UGTXT: icmpu32 a0, a1, a0
2152 ; CHECK-UGTXT: rts16
2154 %icmp = icmp sgt i64 %x, 10
2155 br i1 %icmp, label %label1, label %label2
2162 define i64 @brR0_i64_sgt(i64 %x) {
2163 ; CHECK-LABEL: brR0_i64_sgt:
2164 ; CHECK: # %bb.0: # %entry
2165 ; CHECK-NEXT: .cfi_def_cfa_offset 0
2166 ; CHECK-NEXT: subi16 sp, sp, 12
2167 ; CHECK-NEXT: .cfi_def_cfa_offset 12
2168 ; CHECK-NEXT: movi16 a2, 0
2169 ; CHECK-NEXT: cmplt16 a1, a2
2170 ; CHECK-NEXT: mvc32 a2
2171 ; CHECK-NEXT: st16.w a2, (sp, 4)
2172 ; CHECK-NEXT: cmpnei16 a1, 0
2173 ; CHECK-NEXT: mvc32 a1
2174 ; CHECK-NEXT: st16.w a1, (sp, 8)
2175 ; CHECK-NEXT: cmpnei16 a0, 0
2176 ; CHECK-NEXT: mvcv16 a0
2177 ; CHECK-NEXT: ld16.w a1, (sp, 4)
2178 ; CHECK-NEXT: btsti16 a1, 0
2179 ; CHECK-NEXT: mvc32 a1
2180 ; CHECK-NEXT: ld16.w a2, (sp, 8)
2181 ; CHECK-NEXT: btsti16 a2, 0
2182 ; CHECK-NEXT: movf32 a1, a0
2183 ; CHECK-NEXT: btsti16 a1, 0
2184 ; CHECK-NEXT: bt32 .LBB47_2
2185 ; CHECK-NEXT: # %bb.1: # %label1
2186 ; CHECK-NEXT: movi16 a0, 1
2187 ; CHECK-NEXT: br32 .LBB47_3
2188 ; CHECK-NEXT: .LBB47_2: # %label2
2189 ; CHECK-NEXT: movi16 a0, 0
2190 ; CHECK-NEXT: .LBB47_3: # %label1
2191 ; CHECK-NEXT: movi16 a1, 0
2192 ; CHECK-NEXT: addi16 sp, sp, 12
2195 ; GENERIC-LABEL: brR0_i64_sgt:
2196 ; GENERIC: # %bb.0: # %entry
2197 ; GENERIC-NEXT: .cfi_def_cfa_offset 0
2198 ; GENERIC-NEXT: subi16 sp, sp, 4
2199 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
2200 ; GENERIC-NEXT: movi16 a2, 0
2201 ; GENERIC-NEXT: cmplt16 a1, a2
2202 ; GENERIC-NEXT: mvcv16 a2
2203 ; GENERIC-NEXT: cmpnei16 a0, 0
2204 ; GENERIC-NEXT: mvcv16 a0
2205 ; GENERIC-NEXT: cmpnei16 a1, 0
2206 ; GENERIC-NEXT: mvcv16 a1
2207 ; GENERIC-NEXT: btsti16 a1, 0
2208 ; GENERIC-NEXT: bt16 .LBB47_2
2209 ; GENERIC-NEXT: # %bb.1: # %entry
2210 ; GENERIC-NEXT: movi16 a0, 1
2211 ; GENERIC-NEXT: subu16 a0, a2
2212 ; GENERIC-NEXT: .LBB47_2: # %entry
2213 ; GENERIC-NEXT: btsti16 a0, 0
2214 ; GENERIC-NEXT: bt16 .LBB47_4
2215 ; GENERIC-NEXT: # %bb.3: # %label1
2216 ; GENERIC-NEXT: movi16 a0, 1
2217 ; GENERIC-NEXT: br32 .LBB47_5
2218 ; GENERIC-NEXT: .LBB47_4: # %label2
2219 ; GENERIC-NEXT: movi16 a0, 0
2220 ; GENERIC-NEXT: .LBB47_5: # %label1
2221 ; GENERIC-NEXT: movi16 a1, 0
2222 ; GENERIC-NEXT: addi16 sp, sp, 4
2223 ; GENERIC-NEXT: rts16
2224 ; CHECK-UGTXT: icmpu32 a0, a1, a0
2225 ; CHECK-UGTXT: rts16
2227 %icmp = icmp sgt i64 %x, 0
2228 br i1 %icmp, label %label1, label %label2
2236 define i64 @brRR_i64_sge(i64 %x, i64 %y) {
2237 ; CHECK-LABEL: brRR_i64_sge:
2238 ; CHECK: # %bb.0: # %entry
2239 ; CHECK-NEXT: .cfi_def_cfa_offset 0
2240 ; CHECK-NEXT: subi16 sp, sp, 12
2241 ; CHECK-NEXT: .cfi_def_cfa_offset 12
2242 ; CHECK-NEXT: cmplt16 a3, a1
2243 ; CHECK-NEXT: mvc32 t0
2244 ; CHECK-NEXT: st32.w t0, (sp, 4)
2245 ; CHECK-NEXT: cmpne16 a3, a1
2246 ; CHECK-NEXT: mvc32 a1
2247 ; CHECK-NEXT: st16.w a1, (sp, 8)
2248 ; CHECK-NEXT: cmphs16 a2, a0
2249 ; CHECK-NEXT: mvcv16 a0
2250 ; CHECK-NEXT: ld16.w a1, (sp, 4)
2251 ; CHECK-NEXT: btsti16 a1, 0
2252 ; CHECK-NEXT: mvc32 a1
2253 ; CHECK-NEXT: ld16.w a2, (sp, 8)
2254 ; CHECK-NEXT: btsti16 a2, 0
2255 ; CHECK-NEXT: movf32 a1, a0
2256 ; CHECK-NEXT: btsti16 a1, 0
2257 ; CHECK-NEXT: bt32 .LBB48_2
2258 ; CHECK-NEXT: # %bb.1: # %label1
2259 ; CHECK-NEXT: movi16 a0, 1
2260 ; CHECK-NEXT: br32 .LBB48_3
2261 ; CHECK-NEXT: .LBB48_2: # %label2
2262 ; CHECK-NEXT: movi16 a0, 0
2263 ; CHECK-NEXT: .LBB48_3: # %label1
2264 ; CHECK-NEXT: movi16 a1, 0
2265 ; CHECK-NEXT: addi16 sp, sp, 12
2268 ; GENERIC-LABEL: brRR_i64_sge:
2269 ; GENERIC: # %bb.0: # %entry
2270 ; GENERIC-NEXT: subi16 sp, sp, 4
2271 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
2272 ; GENERIC-NEXT: st16.w l0, (sp, 0) # 4-byte Folded Spill
2273 ; GENERIC-NEXT: .cfi_offset l0, -4
2274 ; GENERIC-NEXT: subi16 sp, sp, 4
2275 ; GENERIC-NEXT: .cfi_def_cfa_offset 8
2276 ; GENERIC-NEXT: cmplt16 a3, a1
2277 ; GENERIC-NEXT: mvcv16 l0
2278 ; GENERIC-NEXT: cmphs16 a2, a0
2279 ; GENERIC-NEXT: mvcv16 a0
2280 ; GENERIC-NEXT: cmpne16 a3, a1
2281 ; GENERIC-NEXT: mvcv16 a1
2282 ; GENERIC-NEXT: btsti16 a1, 0
2283 ; GENERIC-NEXT: bt16 .LBB48_2
2284 ; GENERIC-NEXT: # %bb.1: # %entry
2285 ; GENERIC-NEXT: movi16 a0, 1
2286 ; GENERIC-NEXT: subu16 a0, l0
2287 ; GENERIC-NEXT: .LBB48_2: # %entry
2288 ; GENERIC-NEXT: btsti16 a0, 0
2289 ; GENERIC-NEXT: bt16 .LBB48_4
2290 ; GENERIC-NEXT: # %bb.3: # %label1
2291 ; GENERIC-NEXT: movi16 a0, 1
2292 ; GENERIC-NEXT: br32 .LBB48_5
2293 ; GENERIC-NEXT: .LBB48_4: # %label2
2294 ; GENERIC-NEXT: movi16 a0, 0
2295 ; GENERIC-NEXT: .LBB48_5: # %label1
2296 ; GENERIC-NEXT: movi16 a1, 0
2297 ; GENERIC-NEXT: addi16 sp, sp, 4
2298 ; GENERIC-NEXT: ld16.w l0, (sp, 0) # 4-byte Folded Reload
2299 ; GENERIC-NEXT: addi16 sp, sp, 4
2300 ; GENERIC-NEXT: rts16
2301 ; CHECK-UGTXT: icmpu32 a0, a1, a0
2302 ; CHECK-UGTXT: rts16
2304 %icmp = icmp sge i64 %y, %x
2305 br i1 %icmp, label %label1, label %label2
2312 define i64 @brRI_i64_sge(i64 %x) {
2313 ; CHECK-LABEL: brRI_i64_sge:
2314 ; CHECK: # %bb.0: # %entry
2315 ; CHECK-NEXT: .cfi_def_cfa_offset 0
2316 ; CHECK-NEXT: subi16 sp, sp, 12
2317 ; CHECK-NEXT: .cfi_def_cfa_offset 12
2318 ; CHECK-NEXT: movi16 a2, 0
2319 ; CHECK-NEXT: cmplt16 a1, a2
2320 ; CHECK-NEXT: mvc32 a2
2321 ; CHECK-NEXT: st16.w a2, (sp, 4)
2322 ; CHECK-NEXT: cmpnei16 a1, 0
2323 ; CHECK-NEXT: mvc32 a1
2324 ; CHECK-NEXT: st16.w a1, (sp, 8)
2325 ; CHECK-NEXT: cmphsi16 a0, 10
2326 ; CHECK-NEXT: mvcv16 a0
2327 ; CHECK-NEXT: ld16.w a1, (sp, 4)
2328 ; CHECK-NEXT: btsti16 a1, 0
2329 ; CHECK-NEXT: mvc32 a1
2330 ; CHECK-NEXT: ld16.w a2, (sp, 8)
2331 ; CHECK-NEXT: btsti16 a2, 0
2332 ; CHECK-NEXT: movf32 a1, a0
2333 ; CHECK-NEXT: btsti16 a1, 0
2334 ; CHECK-NEXT: bt32 .LBB49_2
2335 ; CHECK-NEXT: # %bb.1: # %label1
2336 ; CHECK-NEXT: movi16 a0, 1
2337 ; CHECK-NEXT: br32 .LBB49_3
2338 ; CHECK-NEXT: .LBB49_2: # %label2
2339 ; CHECK-NEXT: movi16 a0, 0
2340 ; CHECK-NEXT: .LBB49_3: # %label1
2341 ; CHECK-NEXT: movi16 a1, 0
2342 ; CHECK-NEXT: addi16 sp, sp, 12
2345 ; GENERIC-LABEL: brRI_i64_sge:
2346 ; GENERIC: # %bb.0: # %entry
2347 ; GENERIC-NEXT: .cfi_def_cfa_offset 0
2348 ; GENERIC-NEXT: subi16 sp, sp, 4
2349 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
2350 ; GENERIC-NEXT: movi16 a2, 0
2351 ; GENERIC-NEXT: cmplt16 a1, a2
2352 ; GENERIC-NEXT: mvcv16 a2
2353 ; GENERIC-NEXT: cmphsi16 a0, 10
2354 ; GENERIC-NEXT: mvcv16 a0
2355 ; GENERIC-NEXT: cmpnei16 a1, 0
2356 ; GENERIC-NEXT: mvcv16 a1
2357 ; GENERIC-NEXT: btsti16 a1, 0
2358 ; GENERIC-NEXT: bt16 .LBB49_2
2359 ; GENERIC-NEXT: # %bb.1: # %entry
2360 ; GENERIC-NEXT: movi16 a0, 1
2361 ; GENERIC-NEXT: subu16 a0, a2
2362 ; GENERIC-NEXT: .LBB49_2: # %entry
2363 ; GENERIC-NEXT: btsti16 a0, 0
2364 ; GENERIC-NEXT: bt16 .LBB49_4
2365 ; GENERIC-NEXT: # %bb.3: # %label1
2366 ; GENERIC-NEXT: movi16 a0, 1
2367 ; GENERIC-NEXT: br32 .LBB49_5
2368 ; GENERIC-NEXT: .LBB49_4: # %label2
2369 ; GENERIC-NEXT: movi16 a0, 0
2370 ; GENERIC-NEXT: .LBB49_5: # %label1
2371 ; GENERIC-NEXT: movi16 a1, 0
2372 ; GENERIC-NEXT: addi16 sp, sp, 4
2373 ; GENERIC-NEXT: rts16
2374 ; CHECK-UGTXT: icmpu32 a0, a1, a0
2375 ; CHECK-UGTXT: rts16
2377 %icmp = icmp sge i64 %x, 10
2378 br i1 %icmp, label %label1, label %label2
2385 define i64 @brR0_i64_sge(i64 %x) {
2386 ; CHECK-LABEL: brR0_i64_sge:
2387 ; CHECK: # %bb.0: # %entry
2388 ; CHECK-NEXT: blz32 a1, .LBB50_2
2389 ; CHECK-NEXT: # %bb.1: # %label1
2390 ; CHECK-NEXT: movi16 a0, 1
2391 ; CHECK-NEXT: movi16 a1, 0
2393 ; CHECK-NEXT: .LBB50_2: # %label2
2394 ; CHECK-NEXT: movi16 a0, 0
2395 ; CHECK-NEXT: movi16 a1, 0
2398 ; GENERIC-LABEL: brR0_i64_sge:
2399 ; GENERIC: # %bb.0: # %entry
2400 ; GENERIC-NEXT: .cfi_def_cfa_offset 0
2401 ; GENERIC-NEXT: subi16 sp, sp, 4
2402 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
2403 ; GENERIC-NEXT: movi16 a0, 0
2404 ; GENERIC-NEXT: cmplt16 a1, a0
2405 ; GENERIC-NEXT: bt16 .LBB50_2
2406 ; GENERIC-NEXT: # %bb.1: # %label1
2407 ; GENERIC-NEXT: movi16 a0, 1
2408 ; GENERIC-NEXT: .LBB50_2: # %label2
2409 ; GENERIC-NEXT: movi16 a1, 0
2410 ; GENERIC-NEXT: addi16 sp, sp, 4
2411 ; GENERIC-NEXT: rts16
2412 ; CHECK-UGTXT: icmpu32 a0, a1, a0
2413 ; CHECK-UGTXT: rts16
2415 %icmp = icmp sge i64 %x, 0
2416 br i1 %icmp, label %label1, label %label2
2424 define i64 @brRR_i64_slt(i64 %x, i64 %y) {
2425 ; CHECK-LABEL: brRR_i64_slt:
2426 ; CHECK: # %bb.0: # %entry
2427 ; CHECK-NEXT: .cfi_def_cfa_offset 0
2428 ; CHECK-NEXT: subi16 sp, sp, 12
2429 ; CHECK-NEXT: .cfi_def_cfa_offset 12
2430 ; CHECK-NEXT: cmphs16 a2, a0
2431 ; CHECK-NEXT: mvc32 a0
2432 ; CHECK-NEXT: st16.w a0, (sp, 4)
2433 ; CHECK-NEXT: cmpne16 a3, a1
2434 ; CHECK-NEXT: mvc32 a0
2435 ; CHECK-NEXT: st16.w a0, (sp, 8)
2436 ; CHECK-NEXT: cmplt16 a3, a1
2437 ; CHECK-NEXT: mvcv16 a0
2438 ; CHECK-NEXT: ld16.w a1, (sp, 4)
2439 ; CHECK-NEXT: btsti16 a1, 0
2440 ; CHECK-NEXT: mvc32 a1
2441 ; CHECK-NEXT: ld16.w a2, (sp, 8)
2442 ; CHECK-NEXT: btsti16 a2, 0
2443 ; CHECK-NEXT: movf32 a0, a1
2444 ; CHECK-NEXT: btsti16 a0, 0
2445 ; CHECK-NEXT: bt32 .LBB51_2
2446 ; CHECK-NEXT: # %bb.1: # %label1
2447 ; CHECK-NEXT: movi16 a0, 1
2448 ; CHECK-NEXT: br32 .LBB51_3
2449 ; CHECK-NEXT: .LBB51_2: # %label2
2450 ; CHECK-NEXT: movi16 a0, 0
2451 ; CHECK-NEXT: .LBB51_3: # %label1
2452 ; CHECK-NEXT: movi16 a1, 0
2453 ; CHECK-NEXT: addi16 sp, sp, 12
2456 ; GENERIC-LABEL: brRR_i64_slt:
2457 ; GENERIC: # %bb.0: # %entry
2458 ; GENERIC-NEXT: .cfi_def_cfa_offset 0
2459 ; GENERIC-NEXT: subi16 sp, sp, 4
2460 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
2461 ; GENERIC-NEXT: cmphs16 a2, a0
2462 ; GENERIC-NEXT: mvcv16 a2
2463 ; GENERIC-NEXT: cmplt16 a3, a1
2464 ; GENERIC-NEXT: mvcv16 a0
2465 ; GENERIC-NEXT: cmpne16 a3, a1
2466 ; GENERIC-NEXT: mvcv16 a1
2467 ; GENERIC-NEXT: btsti16 a1, 0
2468 ; GENERIC-NEXT: bf16 .LBB51_2
2469 ; GENERIC-NEXT: # %bb.1:
2470 ; GENERIC-NEXT: movi16 a0, 1
2471 ; GENERIC-NEXT: subu16 a0, a2
2472 ; GENERIC-NEXT: .LBB51_2: # %entry
2473 ; GENERIC-NEXT: btsti16 a0, 0
2474 ; GENERIC-NEXT: bt16 .LBB51_4
2475 ; GENERIC-NEXT: # %bb.3: # %label1
2476 ; GENERIC-NEXT: movi16 a0, 1
2477 ; GENERIC-NEXT: br32 .LBB51_5
2478 ; GENERIC-NEXT: .LBB51_4: # %label2
2479 ; GENERIC-NEXT: movi16 a0, 0
2480 ; GENERIC-NEXT: .LBB51_5: # %label1
2481 ; GENERIC-NEXT: movi16 a1, 0
2482 ; GENERIC-NEXT: addi16 sp, sp, 4
2483 ; GENERIC-NEXT: rts16
2484 ; CHECK-UGTXT: icmpu32 a0, a1, a0
2485 ; CHECK-UGTXT: rts16
2487 %icmp = icmp slt i64 %y, %x
2488 br i1 %icmp, label %label1, label %label2
2495 define i64 @brRI_i64_slt(i64 %x) {
2496 ; CHECK-LABEL: brRI_i64_slt:
2497 ; CHECK: # %bb.0: # %entry
2498 ; CHECK-NEXT: .cfi_def_cfa_offset 0
2499 ; CHECK-NEXT: subi16 sp, sp, 12
2500 ; CHECK-NEXT: .cfi_def_cfa_offset 12
2501 ; CHECK-NEXT: movi16 a2, 0
2502 ; CHECK-NEXT: cmplt16 a2, a1
2503 ; CHECK-NEXT: mvc32 a2
2504 ; CHECK-NEXT: st16.w a2, (sp, 8)
2505 ; CHECK-NEXT: movi16 a2, 9
2506 ; CHECK-NEXT: cmphs16 a2, a0
2507 ; CHECK-NEXT: mvcv16 a0
2508 ; CHECK-NEXT: cmpnei16 a1, 0
2509 ; CHECK-NEXT: mvc32 a1
2510 ; CHECK-NEXT: st16.w a1, (sp, 4)
2511 ; CHECK-NEXT: ld16.w a1, (sp, 8)
2512 ; CHECK-NEXT: btsti16 a1, 0
2513 ; CHECK-NEXT: mvc32 a1
2514 ; CHECK-NEXT: ld16.w a2, (sp, 4)
2515 ; CHECK-NEXT: btsti16 a2, 0
2516 ; CHECK-NEXT: movf32 a1, a0
2517 ; CHECK-NEXT: btsti16 a1, 0
2518 ; CHECK-NEXT: bt32 .LBB52_2
2519 ; CHECK-NEXT: # %bb.1: # %label1
2520 ; CHECK-NEXT: movi16 a0, 1
2521 ; CHECK-NEXT: br32 .LBB52_3
2522 ; CHECK-NEXT: .LBB52_2: # %label2
2523 ; CHECK-NEXT: movi16 a0, 0
2524 ; CHECK-NEXT: .LBB52_3: # %label1
2525 ; CHECK-NEXT: movi16 a1, 0
2526 ; CHECK-NEXT: addi16 sp, sp, 12
2529 ; GENERIC-LABEL: brRI_i64_slt:
2530 ; GENERIC: # %bb.0: # %entry
2531 ; GENERIC-NEXT: .cfi_def_cfa_offset 0
2532 ; GENERIC-NEXT: subi16 sp, sp, 4
2533 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
2534 ; GENERIC-NEXT: movi16 a2, 0
2535 ; GENERIC-NEXT: cmplt16 a2, a1
2536 ; GENERIC-NEXT: mvcv16 a2
2537 ; GENERIC-NEXT: movi16 a3, 9
2538 ; GENERIC-NEXT: cmphs16 a3, a0
2539 ; GENERIC-NEXT: mvcv16 a0
2540 ; GENERIC-NEXT: cmpnei16 a1, 0
2541 ; GENERIC-NEXT: mvcv16 a1
2542 ; GENERIC-NEXT: btsti16 a1, 0
2543 ; GENERIC-NEXT: bt16 .LBB52_2
2544 ; GENERIC-NEXT: # %bb.1: # %entry
2545 ; GENERIC-NEXT: movi16 a0, 1
2546 ; GENERIC-NEXT: subu16 a0, a2
2547 ; GENERIC-NEXT: .LBB52_2: # %entry
2548 ; GENERIC-NEXT: btsti16 a0, 0
2549 ; GENERIC-NEXT: bt16 .LBB52_4
2550 ; GENERIC-NEXT: # %bb.3: # %label1
2551 ; GENERIC-NEXT: movi16 a0, 1
2552 ; GENERIC-NEXT: br32 .LBB52_5
2553 ; GENERIC-NEXT: .LBB52_4: # %label2
2554 ; GENERIC-NEXT: movi16 a0, 0
2555 ; GENERIC-NEXT: .LBB52_5: # %label1
2556 ; GENERIC-NEXT: movi16 a1, 0
2557 ; GENERIC-NEXT: addi16 sp, sp, 4
2558 ; GENERIC-NEXT: rts16
2559 ; CHECK-UGTXT: icmpu32 a0, a1, a0
2560 ; CHECK-UGTXT: rts16
2562 %icmp = icmp slt i64 %x, 10
2563 br i1 %icmp, label %label1, label %label2
2570 define i64 @brR0_i64_slt(i64 %x) {
2571 ; CHECK-LABEL: brR0_i64_slt:
2572 ; CHECK: # %bb.0: # %entry
2573 ; CHECK-NEXT: blz32 a1, .LBB53_2
2574 ; CHECK-NEXT: # %bb.1: # %label2
2575 ; CHECK-NEXT: movi16 a0, 0
2576 ; CHECK-NEXT: movi16 a1, 0
2578 ; CHECK-NEXT: .LBB53_2: # %label1
2579 ; CHECK-NEXT: movi16 a0, 1
2580 ; CHECK-NEXT: movi16 a1, 0
2583 ; GENERIC-LABEL: brR0_i64_slt:
2584 ; GENERIC: # %bb.0: # %entry
2585 ; GENERIC-NEXT: .cfi_def_cfa_offset 0
2586 ; GENERIC-NEXT: subi16 sp, sp, 4
2587 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
2588 ; GENERIC-NEXT: movi16 a0, 255
2589 ; GENERIC-NEXT: lsli16 a2, a0, 24
2590 ; GENERIC-NEXT: lsli16 a3, a0, 16
2591 ; GENERIC-NEXT: or16 a3, a2
2592 ; GENERIC-NEXT: lsli16 a2, a0, 8
2593 ; GENERIC-NEXT: or16 a2, a3
2594 ; GENERIC-NEXT: or16 a2, a0
2595 ; GENERIC-NEXT: cmplt16 a2, a1
2596 ; GENERIC-NEXT: bf16 .LBB53_2
2597 ; GENERIC-NEXT: # %bb.1: # %label2
2598 ; GENERIC-NEXT: movi16 a0, 0
2599 ; GENERIC-NEXT: br32 .LBB53_3
2600 ; GENERIC-NEXT: .LBB53_2: # %label1
2601 ; GENERIC-NEXT: movi16 a0, 1
2602 ; GENERIC-NEXT: .LBB53_3: # %label1
2603 ; GENERIC-NEXT: movi16 a1, 0
2604 ; GENERIC-NEXT: addi16 sp, sp, 4
2605 ; GENERIC-NEXT: rts16
2606 ; CHECK-UGTXT: icmpu32 a0, a1, a0
2607 ; CHECK-UGTXT: rts16
2609 %icmp = icmp slt i64 %x, 0
2610 br i1 %icmp, label %label1, label %label2
2618 define i64 @brRR_i64_sle(i64 %x, i64 %y) {
2619 ; CHECK-LABEL: brRR_i64_sle:
2620 ; CHECK: # %bb.0: # %entry
2621 ; CHECK-NEXT: .cfi_def_cfa_offset 0
2622 ; CHECK-NEXT: subi16 sp, sp, 12
2623 ; CHECK-NEXT: .cfi_def_cfa_offset 12
2624 ; CHECK-NEXT: cmplt16 a1, a3
2625 ; CHECK-NEXT: mvc32 t0
2626 ; CHECK-NEXT: st32.w t0, (sp, 4)
2627 ; CHECK-NEXT: cmpne16 a3, a1
2628 ; CHECK-NEXT: mvc32 a1
2629 ; CHECK-NEXT: st16.w a1, (sp, 8)
2630 ; CHECK-NEXT: cmphs16 a0, a2
2631 ; CHECK-NEXT: mvcv16 a0
2632 ; CHECK-NEXT: ld16.w a1, (sp, 4)
2633 ; CHECK-NEXT: btsti16 a1, 0
2634 ; CHECK-NEXT: mvc32 a1
2635 ; CHECK-NEXT: ld16.w a2, (sp, 8)
2636 ; CHECK-NEXT: btsti16 a2, 0
2637 ; CHECK-NEXT: movf32 a1, a0
2638 ; CHECK-NEXT: btsti16 a1, 0
2639 ; CHECK-NEXT: bt32 .LBB54_2
2640 ; CHECK-NEXT: # %bb.1: # %label1
2641 ; CHECK-NEXT: movi16 a0, 1
2642 ; CHECK-NEXT: br32 .LBB54_3
2643 ; CHECK-NEXT: .LBB54_2: # %label2
2644 ; CHECK-NEXT: movi16 a0, 0
2645 ; CHECK-NEXT: .LBB54_3: # %label1
2646 ; CHECK-NEXT: movi16 a1, 0
2647 ; CHECK-NEXT: addi16 sp, sp, 12
2650 ; GENERIC-LABEL: brRR_i64_sle:
2651 ; GENERIC: # %bb.0: # %entry
2652 ; GENERIC-NEXT: subi16 sp, sp, 4
2653 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
2654 ; GENERIC-NEXT: st16.w l0, (sp, 0) # 4-byte Folded Spill
2655 ; GENERIC-NEXT: .cfi_offset l0, -4
2656 ; GENERIC-NEXT: subi16 sp, sp, 4
2657 ; GENERIC-NEXT: .cfi_def_cfa_offset 8
2658 ; GENERIC-NEXT: cmplt16 a1, a3
2659 ; GENERIC-NEXT: mvcv16 l0
2660 ; GENERIC-NEXT: cmphs16 a0, a2
2661 ; GENERIC-NEXT: mvcv16 a0
2662 ; GENERIC-NEXT: cmpne16 a3, a1
2663 ; GENERIC-NEXT: mvcv16 a1
2664 ; GENERIC-NEXT: btsti16 a1, 0
2665 ; GENERIC-NEXT: bt16 .LBB54_2
2666 ; GENERIC-NEXT: # %bb.1: # %entry
2667 ; GENERIC-NEXT: movi16 a0, 1
2668 ; GENERIC-NEXT: subu16 a0, l0
2669 ; GENERIC-NEXT: .LBB54_2: # %entry
2670 ; GENERIC-NEXT: btsti16 a0, 0
2671 ; GENERIC-NEXT: bt16 .LBB54_4
2672 ; GENERIC-NEXT: # %bb.3: # %label1
2673 ; GENERIC-NEXT: movi16 a0, 1
2674 ; GENERIC-NEXT: br32 .LBB54_5
2675 ; GENERIC-NEXT: .LBB54_4: # %label2
2676 ; GENERIC-NEXT: movi16 a0, 0
2677 ; GENERIC-NEXT: .LBB54_5: # %label1
2678 ; GENERIC-NEXT: movi16 a1, 0
2679 ; GENERIC-NEXT: addi16 sp, sp, 4
2680 ; GENERIC-NEXT: ld16.w l0, (sp, 0) # 4-byte Folded Reload
2681 ; GENERIC-NEXT: addi16 sp, sp, 4
2682 ; GENERIC-NEXT: rts16
2683 ; CHECK-UGTXT: icmpu32 a0, a1, a0
2684 ; CHECK-UGTXT: rts16
2686 %icmp = icmp sle i64 %y, %x
2687 br i1 %icmp, label %label1, label %label2
2694 define i64 @brRI_i64_sle(i64 %x) {
2695 ; CHECK-LABEL: brRI_i64_sle:
2696 ; CHECK: # %bb.0: # %entry
2697 ; CHECK-NEXT: .cfi_def_cfa_offset 0
2698 ; CHECK-NEXT: subi16 sp, sp, 12
2699 ; CHECK-NEXT: .cfi_def_cfa_offset 12
2700 ; CHECK-NEXT: movi16 a2, 0
2701 ; CHECK-NEXT: cmplt16 a2, a1
2702 ; CHECK-NEXT: mvc32 a2
2703 ; CHECK-NEXT: st16.w a2, (sp, 8)
2704 ; CHECK-NEXT: movi16 a2, 10
2705 ; CHECK-NEXT: cmphs16 a2, a0
2706 ; CHECK-NEXT: mvcv16 a0
2707 ; CHECK-NEXT: cmpnei16 a1, 0
2708 ; CHECK-NEXT: mvc32 a1
2709 ; CHECK-NEXT: st16.w a1, (sp, 4)
2710 ; CHECK-NEXT: ld16.w a1, (sp, 8)
2711 ; CHECK-NEXT: btsti16 a1, 0
2712 ; CHECK-NEXT: mvc32 a1
2713 ; CHECK-NEXT: ld16.w a2, (sp, 4)
2714 ; CHECK-NEXT: btsti16 a2, 0
2715 ; CHECK-NEXT: movf32 a1, a0
2716 ; CHECK-NEXT: btsti16 a1, 0
2717 ; CHECK-NEXT: bt32 .LBB55_2
2718 ; CHECK-NEXT: # %bb.1: # %label1
2719 ; CHECK-NEXT: movi16 a0, 1
2720 ; CHECK-NEXT: br32 .LBB55_3
2721 ; CHECK-NEXT: .LBB55_2: # %label2
2722 ; CHECK-NEXT: movi16 a0, 0
2723 ; CHECK-NEXT: .LBB55_3: # %label1
2724 ; CHECK-NEXT: movi16 a1, 0
2725 ; CHECK-NEXT: addi16 sp, sp, 12
2728 ; GENERIC-LABEL: brRI_i64_sle:
2729 ; GENERIC: # %bb.0: # %entry
2730 ; GENERIC-NEXT: .cfi_def_cfa_offset 0
2731 ; GENERIC-NEXT: subi16 sp, sp, 4
2732 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
2733 ; GENERIC-NEXT: movi16 a2, 0
2734 ; GENERIC-NEXT: cmplt16 a2, a1
2735 ; GENERIC-NEXT: mvcv16 a2
2736 ; GENERIC-NEXT: movi16 a3, 10
2737 ; GENERIC-NEXT: cmphs16 a3, a0
2738 ; GENERIC-NEXT: mvcv16 a0
2739 ; GENERIC-NEXT: cmpnei16 a1, 0
2740 ; GENERIC-NEXT: mvcv16 a1
2741 ; GENERIC-NEXT: btsti16 a1, 0
2742 ; GENERIC-NEXT: bt16 .LBB55_2
2743 ; GENERIC-NEXT: # %bb.1: # %entry
2744 ; GENERIC-NEXT: movi16 a0, 1
2745 ; GENERIC-NEXT: subu16 a0, a2
2746 ; GENERIC-NEXT: .LBB55_2: # %entry
2747 ; GENERIC-NEXT: btsti16 a0, 0
2748 ; GENERIC-NEXT: bt16 .LBB55_4
2749 ; GENERIC-NEXT: # %bb.3: # %label1
2750 ; GENERIC-NEXT: movi16 a0, 1
2751 ; GENERIC-NEXT: br32 .LBB55_5
2752 ; GENERIC-NEXT: .LBB55_4: # %label2
2753 ; GENERIC-NEXT: movi16 a0, 0
2754 ; GENERIC-NEXT: .LBB55_5: # %label1
2755 ; GENERIC-NEXT: movi16 a1, 0
2756 ; GENERIC-NEXT: addi16 sp, sp, 4
2757 ; GENERIC-NEXT: rts16
2758 ; CHECK-UGTXT: icmpu32 a0, a1, a0
2759 ; CHECK-UGTXT: rts16
2761 %icmp = icmp sle i64 %x, 10
2762 br i1 %icmp, label %label1, label %label2
2769 define i64 @brR0_i64_sle(i64 %x) {
2770 ; CHECK-LABEL: brR0_i64_sle:
2771 ; CHECK: # %bb.0: # %entry
2772 ; CHECK-NEXT: .cfi_def_cfa_offset 0
2773 ; CHECK-NEXT: subi16 sp, sp, 16
2774 ; CHECK-NEXT: .cfi_def_cfa_offset 16
2775 ; CHECK-NEXT: movi16 a2, 0
2776 ; CHECK-NEXT: cmplt16 a2, a1
2777 ; CHECK-NEXT: mvc32 a2
2778 ; CHECK-NEXT: st16.w a2, (sp, 12)
2779 ; CHECK-NEXT: cmpnei16 a0, 0
2780 ; CHECK-NEXT: mvc32 a0
2781 ; CHECK-NEXT: st16.w a0, (sp, 4)
2782 ; CHECK-NEXT: cmpnei16 a1, 0
2783 ; CHECK-NEXT: mvc32 a0
2784 ; CHECK-NEXT: st16.w a0, (sp, 8)
2785 ; CHECK-NEXT: ld16.w a0, (sp, 4)
2786 ; CHECK-NEXT: btsti16 a0, 0
2787 ; CHECK-NEXT: mvc32 a0
2788 ; CHECK-NEXT: ld16.w a1, (sp, 12)
2789 ; CHECK-NEXT: btsti16 a1, 0
2790 ; CHECK-NEXT: mvc32 a1
2791 ; CHECK-NEXT: ld16.w a2, (sp, 8)
2792 ; CHECK-NEXT: btsti16 a2, 0
2793 ; CHECK-NEXT: movf32 a1, a0
2794 ; CHECK-NEXT: btsti16 a1, 0
2795 ; CHECK-NEXT: bt32 .LBB56_2
2796 ; CHECK-NEXT: # %bb.1: # %label1
2797 ; CHECK-NEXT: movi16 a0, 1
2798 ; CHECK-NEXT: br32 .LBB56_3
2799 ; CHECK-NEXT: .LBB56_2: # %label2
2800 ; CHECK-NEXT: movi16 a0, 0
2801 ; CHECK-NEXT: .LBB56_3: # %label1
2802 ; CHECK-NEXT: movi16 a1, 0
2803 ; CHECK-NEXT: addi16 sp, sp, 16
2806 ; GENERIC-LABEL: brR0_i64_sle:
2807 ; GENERIC: # %bb.0: # %entry
2808 ; GENERIC-NEXT: .cfi_def_cfa_offset 0
2809 ; GENERIC-NEXT: subi16 sp, sp, 4
2810 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
2811 ; GENERIC-NEXT: movi16 a2, 0
2812 ; GENERIC-NEXT: cmplt16 a2, a1
2813 ; GENERIC-NEXT: mvcv16 a3
2814 ; GENERIC-NEXT: movi16 a2, 1
2815 ; GENERIC-NEXT: cmpnei16 a0, 0
2816 ; GENERIC-NEXT: mvcv16 a0
2817 ; GENERIC-NEXT: cmpnei16 a1, 0
2818 ; GENERIC-NEXT: mvcv16 a1
2819 ; GENERIC-NEXT: btsti16 a1, 0
2820 ; GENERIC-NEXT: bt16 .LBB56_3
2821 ; GENERIC-NEXT: # %bb.1: # %entry
2822 ; GENERIC-NEXT: subu16 a2, a3
2823 ; GENERIC-NEXT: btsti16 a2, 0
2824 ; GENERIC-NEXT: bf16 .LBB56_4
2825 ; GENERIC-NEXT: .LBB56_2: # %label2
2826 ; GENERIC-NEXT: movi16 a0, 0
2827 ; GENERIC-NEXT: br32 .LBB56_5
2828 ; GENERIC-NEXT: .LBB56_3:
2829 ; GENERIC-NEXT: subu16 a2, a0
2830 ; GENERIC-NEXT: btsti16 a2, 0
2831 ; GENERIC-NEXT: bt16 .LBB56_2
2832 ; GENERIC-NEXT: .LBB56_4: # %label1
2833 ; GENERIC-NEXT: movi16 a0, 1
2834 ; GENERIC-NEXT: .LBB56_5: # %label1
2835 ; GENERIC-NEXT: movi16 a1, 0
2836 ; GENERIC-NEXT: addi16 sp, sp, 4
2837 ; GENERIC-NEXT: rts16
2838 ; CHECK-UGTXT: icmpu32 a0, a1, a0
2839 ; CHECK-UGTXT: rts16
2841 %icmp = icmp sle i64 %x, 0
2842 br i1 %icmp, label %label1, label %label2
2850 define i64 @brCBit_i64(i1 %c) {
2851 ; CHECK-LABEL: brCBit_i64:
2852 ; CHECK: # %bb.0: # %entry
2853 ; CHECK-NEXT: andi32 a0, a0, 1
2854 ; CHECK-NEXT: bez32 a0, .LBB57_2
2855 ; CHECK-NEXT: # %bb.1: # %label1
2856 ; CHECK-NEXT: movi16 a0, 1
2857 ; CHECK-NEXT: movi16 a1, 0
2859 ; CHECK-NEXT: .LBB57_2: # %label2
2860 ; CHECK-NEXT: movi16 a0, 0
2861 ; CHECK-NEXT: movi16 a1, 0
2864 ; GENERIC-LABEL: brCBit_i64:
2865 ; GENERIC: # %bb.0: # %entry
2866 ; GENERIC-NEXT: .cfi_def_cfa_offset 0
2867 ; GENERIC-NEXT: subi16 sp, sp, 4
2868 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
2869 ; GENERIC-NEXT: movi16 a1, 1
2870 ; GENERIC-NEXT: and16 a1, a0
2871 ; GENERIC-NEXT: cmpnei16 a1, 0
2872 ; GENERIC-NEXT: bf16 .LBB57_2
2873 ; GENERIC-NEXT: # %bb.1: # %label1
2874 ; GENERIC-NEXT: movi16 a0, 1
2875 ; GENERIC-NEXT: br32 .LBB57_3
2876 ; GENERIC-NEXT: .LBB57_2: # %label2
2877 ; GENERIC-NEXT: movi16 a0, 0
2878 ; GENERIC-NEXT: .LBB57_3: # %label1
2879 ; GENERIC-NEXT: movi16 a1, 0
2880 ; GENERIC-NEXT: addi16 sp, sp, 4
2881 ; GENERIC-NEXT: rts16
2883 br i1 %c, label %label1, label %label2
2892 define i16 @brRR_i16_eq(i16 %x, i16 %y) {
2893 ; CHECK-LABEL: brRR_i16_eq:
2894 ; CHECK: # %bb.0: # %entry
2895 ; CHECK-NEXT: zexth16 a0, a0
2896 ; CHECK-NEXT: zexth16 a1, a1
2897 ; CHECK-NEXT: cmpne16 a1, a0
2898 ; CHECK-NEXT: bt32 .LBB58_2
2899 ; CHECK-NEXT: # %bb.1: # %label1
2900 ; CHECK-NEXT: movi16 a0, 1
2902 ; CHECK-NEXT: .LBB58_2: # %label2
2903 ; CHECK-NEXT: movi16 a0, 0
2906 ; GENERIC-LABEL: brRR_i16_eq:
2907 ; GENERIC: # %bb.0: # %entry
2908 ; GENERIC-NEXT: subi16 sp, sp, 4
2909 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
2910 ; GENERIC-NEXT: st16.w l0, (sp, 0) # 4-byte Folded Spill
2911 ; GENERIC-NEXT: .cfi_offset l0, -4
2912 ; GENERIC-NEXT: subi16 sp, sp, 4
2913 ; GENERIC-NEXT: .cfi_def_cfa_offset 8
2914 ; GENERIC-NEXT: movi16 a2, 0
2915 ; GENERIC-NEXT: lsli16 a3, a2, 24
2916 ; GENERIC-NEXT: lsli16 a2, a2, 16
2917 ; GENERIC-NEXT: or16 a2, a3
2918 ; GENERIC-NEXT: movi16 a3, 255
2919 ; GENERIC-NEXT: lsli16 l0, a3, 8
2920 ; GENERIC-NEXT: or16 l0, a2
2921 ; GENERIC-NEXT: or16 l0, a3
2922 ; GENERIC-NEXT: and16 a0, l0
2923 ; GENERIC-NEXT: and16 l0, a1
2924 ; GENERIC-NEXT: cmpne16 l0, a0
2925 ; GENERIC-NEXT: bt16 .LBB58_2
2926 ; GENERIC-NEXT: # %bb.1: # %label1
2927 ; GENERIC-NEXT: movi16 a0, 1
2928 ; GENERIC-NEXT: br32 .LBB58_3
2929 ; GENERIC-NEXT: .LBB58_2: # %label2
2930 ; GENERIC-NEXT: movi16 a0, 0
2931 ; GENERIC-NEXT: .LBB58_3: # %label1
2932 ; GENERIC-NEXT: addi16 sp, sp, 4
2933 ; GENERIC-NEXT: ld16.w l0, (sp, 0) # 4-byte Folded Reload
2934 ; GENERIC-NEXT: addi16 sp, sp, 4
2935 ; GENERIC-NEXT: rts16
2937 %icmp = icmp eq i16 %y, %x
2938 br i1 %icmp, label %label1, label %label2
2945 define i16 @brRI_i16_eq(i16 %x) {
2946 ; CHECK-LABEL: brRI_i16_eq:
2947 ; CHECK: # %bb.0: # %entry
2948 ; CHECK-NEXT: zexth16 a0, a0
2949 ; CHECK-NEXT: cmpnei16 a0, 10
2950 ; CHECK-NEXT: bt32 .LBB59_2
2951 ; CHECK-NEXT: # %bb.1: # %label1
2952 ; CHECK-NEXT: movi16 a0, 1
2954 ; CHECK-NEXT: .LBB59_2: # %label2
2955 ; CHECK-NEXT: movi16 a0, 0
2958 ; GENERIC-LABEL: brRI_i16_eq:
2959 ; GENERIC: # %bb.0: # %entry
2960 ; GENERIC-NEXT: .cfi_def_cfa_offset 0
2961 ; GENERIC-NEXT: subi16 sp, sp, 4
2962 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
2963 ; GENERIC-NEXT: movi16 a1, 0
2964 ; GENERIC-NEXT: lsli16 a2, a1, 24
2965 ; GENERIC-NEXT: lsli16 a1, a1, 16
2966 ; GENERIC-NEXT: or16 a1, a2
2967 ; GENERIC-NEXT: movi16 a2, 255
2968 ; GENERIC-NEXT: lsli16 a3, a2, 8
2969 ; GENERIC-NEXT: or16 a3, a1
2970 ; GENERIC-NEXT: or16 a3, a2
2971 ; GENERIC-NEXT: and16 a3, a0
2972 ; GENERIC-NEXT: cmpnei16 a3, 10
2973 ; GENERIC-NEXT: bt16 .LBB59_2
2974 ; GENERIC-NEXT: # %bb.1: # %label1
2975 ; GENERIC-NEXT: movi16 a0, 1
2976 ; GENERIC-NEXT: addi16 sp, sp, 4
2977 ; GENERIC-NEXT: rts16
2978 ; GENERIC-NEXT: .LBB59_2: # %label2
2979 ; GENERIC-NEXT: movi16 a0, 0
2980 ; GENERIC-NEXT: addi16 sp, sp, 4
2981 ; GENERIC-NEXT: rts16
2983 %icmp = icmp eq i16 %x, 10
2984 br i1 %icmp, label %label1, label %label2
2991 define i16 @brR0_i16_eq(i16 %x) {
2992 ; CHECK-LABEL: brR0_i16_eq:
2993 ; CHECK: # %bb.0: # %entry
2994 ; CHECK-NEXT: zexth16 a0, a0
2995 ; CHECK-NEXT: bez32 a0, .LBB60_2
2996 ; CHECK-NEXT: # %bb.1: # %label2
2997 ; CHECK-NEXT: movi16 a0, 0
2999 ; CHECK-NEXT: .LBB60_2: # %label1
3000 ; CHECK-NEXT: movi16 a0, 1
3003 ; GENERIC-LABEL: brR0_i16_eq:
3004 ; GENERIC: # %bb.0: # %entry
3005 ; GENERIC-NEXT: .cfi_def_cfa_offset 0
3006 ; GENERIC-NEXT: subi16 sp, sp, 4
3007 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
3008 ; GENERIC-NEXT: movi16 a1, 0
3009 ; GENERIC-NEXT: lsli16 a2, a1, 24
3010 ; GENERIC-NEXT: lsli16 a1, a1, 16
3011 ; GENERIC-NEXT: or16 a1, a2
3012 ; GENERIC-NEXT: movi16 a2, 255
3013 ; GENERIC-NEXT: lsli16 a3, a2, 8
3014 ; GENERIC-NEXT: or16 a3, a1
3015 ; GENERIC-NEXT: or16 a3, a2
3016 ; GENERIC-NEXT: and16 a3, a0
3017 ; GENERIC-NEXT: cmpnei16 a3, 0
3018 ; GENERIC-NEXT: bf16 .LBB60_2
3019 ; GENERIC-NEXT: # %bb.1: # %label2
3020 ; GENERIC-NEXT: movi16 a0, 0
3021 ; GENERIC-NEXT: addi16 sp, sp, 4
3022 ; GENERIC-NEXT: rts16
3023 ; GENERIC-NEXT: .LBB60_2: # %label1
3024 ; GENERIC-NEXT: movi16 a0, 1
3025 ; GENERIC-NEXT: addi16 sp, sp, 4
3026 ; GENERIC-NEXT: rts16
3028 %icmp = icmp eq i16 %x, 0
3029 br i1 %icmp, label %label1, label %label2
3037 define i16 @brRR_i16_ne(i16 %x, i16 %y) {
3038 ; CHECK-LABEL: brRR_i16_ne:
3039 ; CHECK: # %bb.0: # %entry
3040 ; CHECK-NEXT: zexth16 a0, a0
3041 ; CHECK-NEXT: zexth16 a1, a1
3042 ; CHECK-NEXT: cmpne16 a1, a0
3043 ; CHECK-NEXT: bf32 .LBB61_2
3044 ; CHECK-NEXT: # %bb.1: # %label1
3045 ; CHECK-NEXT: movi16 a0, 1
3047 ; CHECK-NEXT: .LBB61_2: # %label2
3048 ; CHECK-NEXT: movi16 a0, 0
3051 ; GENERIC-LABEL: brRR_i16_ne:
3052 ; GENERIC: # %bb.0: # %entry
3053 ; GENERIC-NEXT: subi16 sp, sp, 4
3054 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
3055 ; GENERIC-NEXT: st16.w l0, (sp, 0) # 4-byte Folded Spill
3056 ; GENERIC-NEXT: .cfi_offset l0, -4
3057 ; GENERIC-NEXT: subi16 sp, sp, 4
3058 ; GENERIC-NEXT: .cfi_def_cfa_offset 8
3059 ; GENERIC-NEXT: movi16 a2, 0
3060 ; GENERIC-NEXT: lsli16 a3, a2, 24
3061 ; GENERIC-NEXT: lsli16 a2, a2, 16
3062 ; GENERIC-NEXT: or16 a2, a3
3063 ; GENERIC-NEXT: movi16 a3, 255
3064 ; GENERIC-NEXT: lsli16 l0, a3, 8
3065 ; GENERIC-NEXT: or16 l0, a2
3066 ; GENERIC-NEXT: or16 l0, a3
3067 ; GENERIC-NEXT: and16 a0, l0
3068 ; GENERIC-NEXT: and16 l0, a1
3069 ; GENERIC-NEXT: cmpne16 l0, a0
3070 ; GENERIC-NEXT: bf16 .LBB61_2
3071 ; GENERIC-NEXT: # %bb.1: # %label1
3072 ; GENERIC-NEXT: movi16 a0, 1
3073 ; GENERIC-NEXT: br32 .LBB61_3
3074 ; GENERIC-NEXT: .LBB61_2: # %label2
3075 ; GENERIC-NEXT: movi16 a0, 0
3076 ; GENERIC-NEXT: .LBB61_3: # %label1
3077 ; GENERIC-NEXT: addi16 sp, sp, 4
3078 ; GENERIC-NEXT: ld16.w l0, (sp, 0) # 4-byte Folded Reload
3079 ; GENERIC-NEXT: addi16 sp, sp, 4
3080 ; GENERIC-NEXT: rts16
3082 %icmp = icmp ne i16 %y, %x
3083 br i1 %icmp, label %label1, label %label2
3090 define i16 @brRI_i16_ne(i16 %x) {
3091 ; CHECK-LABEL: brRI_i16_ne:
3092 ; CHECK: # %bb.0: # %entry
3093 ; CHECK-NEXT: zexth16 a0, a0
3094 ; CHECK-NEXT: cmpnei16 a0, 10
3095 ; CHECK-NEXT: bf32 .LBB62_2
3096 ; CHECK-NEXT: # %bb.1: # %label1
3097 ; CHECK-NEXT: movi16 a0, 1
3099 ; CHECK-NEXT: .LBB62_2: # %label2
3100 ; CHECK-NEXT: movi16 a0, 0
3103 ; GENERIC-LABEL: brRI_i16_ne:
3104 ; GENERIC: # %bb.0: # %entry
3105 ; GENERIC-NEXT: .cfi_def_cfa_offset 0
3106 ; GENERIC-NEXT: subi16 sp, sp, 4
3107 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
3108 ; GENERIC-NEXT: movi16 a1, 0
3109 ; GENERIC-NEXT: lsli16 a2, a1, 24
3110 ; GENERIC-NEXT: lsli16 a1, a1, 16
3111 ; GENERIC-NEXT: or16 a1, a2
3112 ; GENERIC-NEXT: movi16 a2, 255
3113 ; GENERIC-NEXT: lsli16 a3, a2, 8
3114 ; GENERIC-NEXT: or16 a3, a1
3115 ; GENERIC-NEXT: or16 a3, a2
3116 ; GENERIC-NEXT: and16 a3, a0
3117 ; GENERIC-NEXT: cmpnei16 a3, 10
3118 ; GENERIC-NEXT: bf16 .LBB62_2
3119 ; GENERIC-NEXT: # %bb.1: # %label1
3120 ; GENERIC-NEXT: movi16 a0, 1
3121 ; GENERIC-NEXT: addi16 sp, sp, 4
3122 ; GENERIC-NEXT: rts16
3123 ; GENERIC-NEXT: .LBB62_2: # %label2
3124 ; GENERIC-NEXT: movi16 a0, 0
3125 ; GENERIC-NEXT: addi16 sp, sp, 4
3126 ; GENERIC-NEXT: rts16
3128 %icmp = icmp ne i16 %x, 10
3129 br i1 %icmp, label %label1, label %label2
3136 define i16 @brR0_i16_ne(i16 %x) {
3137 ; CHECK-LABEL: brR0_i16_ne:
3138 ; CHECK: # %bb.0: # %entry
3139 ; CHECK-NEXT: zexth16 a0, a0
3140 ; CHECK-NEXT: bez32 a0, .LBB63_2
3141 ; CHECK-NEXT: # %bb.1: # %label1
3142 ; CHECK-NEXT: movi16 a0, 1
3144 ; CHECK-NEXT: .LBB63_2: # %label2
3145 ; CHECK-NEXT: movi16 a0, 0
3148 ; GENERIC-LABEL: brR0_i16_ne:
3149 ; GENERIC: # %bb.0: # %entry
3150 ; GENERIC-NEXT: .cfi_def_cfa_offset 0
3151 ; GENERIC-NEXT: subi16 sp, sp, 4
3152 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
3153 ; GENERIC-NEXT: movi16 a1, 0
3154 ; GENERIC-NEXT: lsli16 a2, a1, 24
3155 ; GENERIC-NEXT: lsli16 a1, a1, 16
3156 ; GENERIC-NEXT: or16 a1, a2
3157 ; GENERIC-NEXT: movi16 a2, 255
3158 ; GENERIC-NEXT: lsli16 a3, a2, 8
3159 ; GENERIC-NEXT: or16 a3, a1
3160 ; GENERIC-NEXT: or16 a3, a2
3161 ; GENERIC-NEXT: and16 a3, a0
3162 ; GENERIC-NEXT: cmpnei16 a3, 0
3163 ; GENERIC-NEXT: bf16 .LBB63_2
3164 ; GENERIC-NEXT: # %bb.1: # %label1
3165 ; GENERIC-NEXT: movi16 a0, 1
3166 ; GENERIC-NEXT: addi16 sp, sp, 4
3167 ; GENERIC-NEXT: rts16
3168 ; GENERIC-NEXT: .LBB63_2: # %label2
3169 ; GENERIC-NEXT: movi16 a0, 0
3170 ; GENERIC-NEXT: addi16 sp, sp, 4
3171 ; GENERIC-NEXT: rts16
3173 %icmp = icmp ne i16 %x, 0
3174 br i1 %icmp, label %label1, label %label2
3182 define i16 @brRR_i16_ugt(i16 %x, i16 %y) {
3183 ; CHECK-LABEL: brRR_i16_ugt:
3184 ; CHECK: # %bb.0: # %entry
3185 ; CHECK-NEXT: zexth16 a1, a1
3186 ; CHECK-NEXT: zexth16 a0, a0
3187 ; CHECK-NEXT: cmphs16 a0, a1
3188 ; CHECK-NEXT: bt32 .LBB64_2
3189 ; CHECK-NEXT: # %bb.1: # %label1
3190 ; CHECK-NEXT: movi16 a0, 1
3192 ; CHECK-NEXT: .LBB64_2: # %label2
3193 ; CHECK-NEXT: movi16 a0, 0
3196 ; GENERIC-LABEL: brRR_i16_ugt:
3197 ; GENERIC: # %bb.0: # %entry
3198 ; GENERIC-NEXT: subi16 sp, sp, 4
3199 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
3200 ; GENERIC-NEXT: st16.w l0, (sp, 0) # 4-byte Folded Spill
3201 ; GENERIC-NEXT: .cfi_offset l0, -4
3202 ; GENERIC-NEXT: subi16 sp, sp, 4
3203 ; GENERIC-NEXT: .cfi_def_cfa_offset 8
3204 ; GENERIC-NEXT: movi16 a2, 0
3205 ; GENERIC-NEXT: lsli16 a3, a2, 24
3206 ; GENERIC-NEXT: lsli16 a2, a2, 16
3207 ; GENERIC-NEXT: or16 a2, a3
3208 ; GENERIC-NEXT: movi16 a3, 255
3209 ; GENERIC-NEXT: lsli16 l0, a3, 8
3210 ; GENERIC-NEXT: or16 l0, a2
3211 ; GENERIC-NEXT: or16 l0, a3
3212 ; GENERIC-NEXT: and16 a1, l0
3213 ; GENERIC-NEXT: and16 l0, a0
3214 ; GENERIC-NEXT: cmphs16 l0, a1
3215 ; GENERIC-NEXT: bt16 .LBB64_2
3216 ; GENERIC-NEXT: # %bb.1: # %label1
3217 ; GENERIC-NEXT: movi16 a0, 1
3218 ; GENERIC-NEXT: br32 .LBB64_3
3219 ; GENERIC-NEXT: .LBB64_2: # %label2
3220 ; GENERIC-NEXT: movi16 a0, 0
3221 ; GENERIC-NEXT: .LBB64_3: # %label1
3222 ; GENERIC-NEXT: addi16 sp, sp, 4
3223 ; GENERIC-NEXT: ld16.w l0, (sp, 0) # 4-byte Folded Reload
3224 ; GENERIC-NEXT: addi16 sp, sp, 4
3225 ; GENERIC-NEXT: rts16
3226 ; CHECK-UGTXT: icmpu32 a0, a1, a0
3227 ; CHECK-UGTXT: rts16
3229 %icmp = icmp ugt i16 %y, %x
3230 br i1 %icmp, label %label1, label %label2
3237 define i16 @brRI_i16_ugt(i16 %x) {
3238 ; CHECK-LABEL: brRI_i16_ugt:
3239 ; CHECK: # %bb.0: # %entry
3240 ; CHECK-NEXT: zexth16 a0, a0
3241 ; CHECK-NEXT: cmphsi16 a0, 11
3242 ; CHECK-NEXT: bf32 .LBB65_2
3243 ; CHECK-NEXT: # %bb.1: # %label1
3244 ; CHECK-NEXT: movi16 a0, 1
3246 ; CHECK-NEXT: .LBB65_2: # %label2
3247 ; CHECK-NEXT: movi16 a0, 0
3250 ; GENERIC-LABEL: brRI_i16_ugt:
3251 ; GENERIC: # %bb.0: # %entry
3252 ; GENERIC-NEXT: .cfi_def_cfa_offset 0
3253 ; GENERIC-NEXT: subi16 sp, sp, 4
3254 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
3255 ; GENERIC-NEXT: movi16 a1, 0
3256 ; GENERIC-NEXT: lsli16 a2, a1, 24
3257 ; GENERIC-NEXT: lsli16 a1, a1, 16
3258 ; GENERIC-NEXT: or16 a1, a2
3259 ; GENERIC-NEXT: movi16 a2, 255
3260 ; GENERIC-NEXT: lsli16 a3, a2, 8
3261 ; GENERIC-NEXT: or16 a3, a1
3262 ; GENERIC-NEXT: or16 a3, a2
3263 ; GENERIC-NEXT: and16 a3, a0
3264 ; GENERIC-NEXT: cmphsi16 a3, 11
3265 ; GENERIC-NEXT: bf16 .LBB65_2
3266 ; GENERIC-NEXT: # %bb.1: # %label1
3267 ; GENERIC-NEXT: movi16 a0, 1
3268 ; GENERIC-NEXT: addi16 sp, sp, 4
3269 ; GENERIC-NEXT: rts16
3270 ; GENERIC-NEXT: .LBB65_2: # %label2
3271 ; GENERIC-NEXT: movi16 a0, 0
3272 ; GENERIC-NEXT: addi16 sp, sp, 4
3273 ; GENERIC-NEXT: rts16
3274 ; CHECK-UGTXT: icmpu32 a0, a1, a0
3275 ; CHECK-UGTXT: rts16
3277 %icmp = icmp ugt i16 %x, 10
3278 br i1 %icmp, label %label1, label %label2
3285 define i16 @brR0_i16_ugt(i16 %x) {
3286 ; CHECK-LABEL: brR0_i16_ugt:
3287 ; CHECK: # %bb.0: # %entry
3288 ; CHECK-NEXT: zexth16 a0, a0
3289 ; CHECK-NEXT: bez32 a0, .LBB66_2
3290 ; CHECK-NEXT: # %bb.1: # %label1
3291 ; CHECK-NEXT: movi16 a0, 1
3293 ; CHECK-NEXT: .LBB66_2: # %label2
3294 ; CHECK-NEXT: movi16 a0, 0
3297 ; GENERIC-LABEL: brR0_i16_ugt:
3298 ; GENERIC: # %bb.0: # %entry
3299 ; GENERIC-NEXT: .cfi_def_cfa_offset 0
3300 ; GENERIC-NEXT: subi16 sp, sp, 4
3301 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
3302 ; GENERIC-NEXT: movi16 a1, 0
3303 ; GENERIC-NEXT: lsli16 a2, a1, 24
3304 ; GENERIC-NEXT: lsli16 a1, a1, 16
3305 ; GENERIC-NEXT: or16 a1, a2
3306 ; GENERIC-NEXT: movi16 a2, 255
3307 ; GENERIC-NEXT: lsli16 a3, a2, 8
3308 ; GENERIC-NEXT: or16 a3, a1
3309 ; GENERIC-NEXT: or16 a3, a2
3310 ; GENERIC-NEXT: and16 a3, a0
3311 ; GENERIC-NEXT: cmpnei16 a3, 0
3312 ; GENERIC-NEXT: bf16 .LBB66_2
3313 ; GENERIC-NEXT: # %bb.1: # %label1
3314 ; GENERIC-NEXT: movi16 a0, 1
3315 ; GENERIC-NEXT: addi16 sp, sp, 4
3316 ; GENERIC-NEXT: rts16
3317 ; GENERIC-NEXT: .LBB66_2: # %label2
3318 ; GENERIC-NEXT: movi16 a0, 0
3319 ; GENERIC-NEXT: addi16 sp, sp, 4
3320 ; GENERIC-NEXT: rts16
3321 ; CHECK-UGTXT: icmpu32 a0, a1, a0
3322 ; CHECK-UGTXT: rts16
3324 %icmp = icmp ugt i16 %x, 0
3325 br i1 %icmp, label %label1, label %label2
3333 define i16 @brRR_i16_uge(i16 %x, i16 %y) {
3334 ; CHECK-LABEL: brRR_i16_uge:
3335 ; CHECK: # %bb.0: # %entry
3336 ; CHECK-NEXT: zexth16 a0, a0
3337 ; CHECK-NEXT: zexth16 a1, a1
3338 ; CHECK-NEXT: cmphs16 a1, a0
3339 ; CHECK-NEXT: bf32 .LBB67_2
3340 ; CHECK-NEXT: # %bb.1: # %label1
3341 ; CHECK-NEXT: movi16 a0, 1
3343 ; CHECK-NEXT: .LBB67_2: # %label2
3344 ; CHECK-NEXT: movi16 a0, 0
3347 ; GENERIC-LABEL: brRR_i16_uge:
3348 ; GENERIC: # %bb.0: # %entry
3349 ; GENERIC-NEXT: subi16 sp, sp, 4
3350 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
3351 ; GENERIC-NEXT: st16.w l0, (sp, 0) # 4-byte Folded Spill
3352 ; GENERIC-NEXT: .cfi_offset l0, -4
3353 ; GENERIC-NEXT: subi16 sp, sp, 4
3354 ; GENERIC-NEXT: .cfi_def_cfa_offset 8
3355 ; GENERIC-NEXT: movi16 a2, 0
3356 ; GENERIC-NEXT: lsli16 a3, a2, 24
3357 ; GENERIC-NEXT: lsli16 a2, a2, 16
3358 ; GENERIC-NEXT: or16 a2, a3
3359 ; GENERIC-NEXT: movi16 a3, 255
3360 ; GENERIC-NEXT: lsli16 l0, a3, 8
3361 ; GENERIC-NEXT: or16 l0, a2
3362 ; GENERIC-NEXT: or16 l0, a3
3363 ; GENERIC-NEXT: and16 a0, l0
3364 ; GENERIC-NEXT: and16 l0, a1
3365 ; GENERIC-NEXT: cmphs16 l0, a0
3366 ; GENERIC-NEXT: bf16 .LBB67_2
3367 ; GENERIC-NEXT: # %bb.1: # %label1
3368 ; GENERIC-NEXT: movi16 a0, 1
3369 ; GENERIC-NEXT: br32 .LBB67_3
3370 ; GENERIC-NEXT: .LBB67_2: # %label2
3371 ; GENERIC-NEXT: movi16 a0, 0
3372 ; GENERIC-NEXT: .LBB67_3: # %label1
3373 ; GENERIC-NEXT: addi16 sp, sp, 4
3374 ; GENERIC-NEXT: ld16.w l0, (sp, 0) # 4-byte Folded Reload
3375 ; GENERIC-NEXT: addi16 sp, sp, 4
3376 ; GENERIC-NEXT: rts16
3377 ; CHECK-UGTXT: icmpu32 a0, a1, a0
3378 ; CHECK-UGTXT: rts16
3380 %icmp = icmp uge i16 %y, %x
3381 br i1 %icmp, label %label1, label %label2
3388 define i16 @brRI_i16_uge(i16 %x) {
3389 ; CHECK-LABEL: brRI_i16_uge:
3390 ; CHECK: # %bb.0: # %entry
3391 ; CHECK-NEXT: zexth16 a0, a0
3392 ; CHECK-NEXT: cmphsi16 a0, 10
3393 ; CHECK-NEXT: bf32 .LBB68_2
3394 ; CHECK-NEXT: # %bb.1: # %label1
3395 ; CHECK-NEXT: movi16 a0, 1
3397 ; CHECK-NEXT: .LBB68_2: # %label2
3398 ; CHECK-NEXT: movi16 a0, 0
3401 ; GENERIC-LABEL: brRI_i16_uge:
3402 ; GENERIC: # %bb.0: # %entry
3403 ; GENERIC-NEXT: .cfi_def_cfa_offset 0
3404 ; GENERIC-NEXT: subi16 sp, sp, 4
3405 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
3406 ; GENERIC-NEXT: movi16 a1, 0
3407 ; GENERIC-NEXT: lsli16 a2, a1, 24
3408 ; GENERIC-NEXT: lsli16 a1, a1, 16
3409 ; GENERIC-NEXT: or16 a1, a2
3410 ; GENERIC-NEXT: movi16 a2, 255
3411 ; GENERIC-NEXT: lsli16 a3, a2, 8
3412 ; GENERIC-NEXT: or16 a3, a1
3413 ; GENERIC-NEXT: or16 a3, a2
3414 ; GENERIC-NEXT: and16 a3, a0
3415 ; GENERIC-NEXT: cmphsi16 a3, 10
3416 ; GENERIC-NEXT: bf16 .LBB68_2
3417 ; GENERIC-NEXT: # %bb.1: # %label1
3418 ; GENERIC-NEXT: movi16 a0, 1
3419 ; GENERIC-NEXT: addi16 sp, sp, 4
3420 ; GENERIC-NEXT: rts16
3421 ; GENERIC-NEXT: .LBB68_2: # %label2
3422 ; GENERIC-NEXT: movi16 a0, 0
3423 ; GENERIC-NEXT: addi16 sp, sp, 4
3424 ; GENERIC-NEXT: rts16
3425 ; CHECK-UGTXT: icmpu32 a0, a1, a0
3426 ; CHECK-UGTXT: rts16
3428 %icmp = icmp uge i16 %x, 10
3429 br i1 %icmp, label %label1, label %label2
3437 define i16 @brRR_i16_ult(i16 %x, i16 %y) {
3438 ; CHECK-LABEL: brRR_i16_ult:
3439 ; CHECK: # %bb.0: # %entry
3440 ; CHECK-NEXT: zexth16 a0, a0
3441 ; CHECK-NEXT: zexth16 a1, a1
3442 ; CHECK-NEXT: cmphs16 a1, a0
3443 ; CHECK-NEXT: bt32 .LBB69_2
3444 ; CHECK-NEXT: # %bb.1: # %label1
3445 ; CHECK-NEXT: movi16 a0, 1
3447 ; CHECK-NEXT: .LBB69_2: # %label2
3448 ; CHECK-NEXT: movi16 a0, 0
3451 ; GENERIC-LABEL: brRR_i16_ult:
3452 ; GENERIC: # %bb.0: # %entry
3453 ; GENERIC-NEXT: subi16 sp, sp, 4
3454 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
3455 ; GENERIC-NEXT: st16.w l0, (sp, 0) # 4-byte Folded Spill
3456 ; GENERIC-NEXT: .cfi_offset l0, -4
3457 ; GENERIC-NEXT: subi16 sp, sp, 4
3458 ; GENERIC-NEXT: .cfi_def_cfa_offset 8
3459 ; GENERIC-NEXT: movi16 a2, 0
3460 ; GENERIC-NEXT: lsli16 a3, a2, 24
3461 ; GENERIC-NEXT: lsli16 a2, a2, 16
3462 ; GENERIC-NEXT: or16 a2, a3
3463 ; GENERIC-NEXT: movi16 a3, 255
3464 ; GENERIC-NEXT: lsli16 l0, a3, 8
3465 ; GENERIC-NEXT: or16 l0, a2
3466 ; GENERIC-NEXT: or16 l0, a3
3467 ; GENERIC-NEXT: and16 a0, l0
3468 ; GENERIC-NEXT: and16 l0, a1
3469 ; GENERIC-NEXT: cmphs16 l0, a0
3470 ; GENERIC-NEXT: bt16 .LBB69_2
3471 ; GENERIC-NEXT: # %bb.1: # %label1
3472 ; GENERIC-NEXT: movi16 a0, 1
3473 ; GENERIC-NEXT: br32 .LBB69_3
3474 ; GENERIC-NEXT: .LBB69_2: # %label2
3475 ; GENERIC-NEXT: movi16 a0, 0
3476 ; GENERIC-NEXT: .LBB69_3: # %label1
3477 ; GENERIC-NEXT: addi16 sp, sp, 4
3478 ; GENERIC-NEXT: ld16.w l0, (sp, 0) # 4-byte Folded Reload
3479 ; GENERIC-NEXT: addi16 sp, sp, 4
3480 ; GENERIC-NEXT: rts16
3481 ; CHECK-UGTXT: icmpu32 a0, a1, a0
3482 ; CHECK-UGTXT: rts16
3484 %icmp = icmp ult i16 %y, %x
3485 br i1 %icmp, label %label1, label %label2
3492 define i16 @brRI_i16_ult(i16 %x) {
3493 ; CHECK-LABEL: brRI_i16_ult:
3494 ; CHECK: # %bb.0: # %entry
3495 ; CHECK-NEXT: zexth16 a0, a0
3496 ; CHECK-NEXT: movi16 a1, 9
3497 ; CHECK-NEXT: cmphs16 a1, a0
3498 ; CHECK-NEXT: bf32 .LBB70_2
3499 ; CHECK-NEXT: # %bb.1: # %label1
3500 ; CHECK-NEXT: movi16 a0, 1
3502 ; CHECK-NEXT: .LBB70_2: # %label2
3503 ; CHECK-NEXT: movi16 a0, 0
3506 ; GENERIC-LABEL: brRI_i16_ult:
3507 ; GENERIC: # %bb.0: # %entry
3508 ; GENERIC-NEXT: .cfi_def_cfa_offset 0
3509 ; GENERIC-NEXT: subi16 sp, sp, 4
3510 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
3511 ; GENERIC-NEXT: movi16 a1, 0
3512 ; GENERIC-NEXT: lsli16 a2, a1, 24
3513 ; GENERIC-NEXT: lsli16 a1, a1, 16
3514 ; GENERIC-NEXT: or16 a1, a2
3515 ; GENERIC-NEXT: movi16 a2, 255
3516 ; GENERIC-NEXT: lsli16 a3, a2, 8
3517 ; GENERIC-NEXT: or16 a3, a1
3518 ; GENERIC-NEXT: or16 a3, a2
3519 ; GENERIC-NEXT: and16 a3, a0
3520 ; GENERIC-NEXT: movi16 a0, 9
3521 ; GENERIC-NEXT: cmphs16 a0, a3
3522 ; GENERIC-NEXT: bf16 .LBB70_2
3523 ; GENERIC-NEXT: # %bb.1: # %label1
3524 ; GENERIC-NEXT: movi16 a0, 1
3525 ; GENERIC-NEXT: addi16 sp, sp, 4
3526 ; GENERIC-NEXT: rts16
3527 ; GENERIC-NEXT: .LBB70_2: # %label2
3528 ; GENERIC-NEXT: movi16 a0, 0
3529 ; GENERIC-NEXT: addi16 sp, sp, 4
3530 ; GENERIC-NEXT: rts16
3531 ; CHECK-UGTXT: icmpu32 a0, a1, a0
3532 ; CHECK-UGTXT: rts16
3534 %icmp = icmp ult i16 %x, 10
3535 br i1 %icmp, label %label1, label %label2
3544 define i16 @brRR_i16_ule(i16 %x, i16 %y) {
3545 ; CHECK-LABEL: brRR_i16_ule:
3546 ; CHECK: # %bb.0: # %entry
3547 ; CHECK-NEXT: zexth16 a1, a1
3548 ; CHECK-NEXT: zexth16 a0, a0
3549 ; CHECK-NEXT: cmphs16 a0, a1
3550 ; CHECK-NEXT: bf32 .LBB71_2
3551 ; CHECK-NEXT: # %bb.1: # %label1
3552 ; CHECK-NEXT: movi16 a0, 1
3554 ; CHECK-NEXT: .LBB71_2: # %label2
3555 ; CHECK-NEXT: movi16 a0, 0
3558 ; GENERIC-LABEL: brRR_i16_ule:
3559 ; GENERIC: # %bb.0: # %entry
3560 ; GENERIC-NEXT: subi16 sp, sp, 4
3561 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
3562 ; GENERIC-NEXT: st16.w l0, (sp, 0) # 4-byte Folded Spill
3563 ; GENERIC-NEXT: .cfi_offset l0, -4
3564 ; GENERIC-NEXT: subi16 sp, sp, 4
3565 ; GENERIC-NEXT: .cfi_def_cfa_offset 8
3566 ; GENERIC-NEXT: movi16 a2, 0
3567 ; GENERIC-NEXT: lsli16 a3, a2, 24
3568 ; GENERIC-NEXT: lsli16 a2, a2, 16
3569 ; GENERIC-NEXT: or16 a2, a3
3570 ; GENERIC-NEXT: movi16 a3, 255
3571 ; GENERIC-NEXT: lsli16 l0, a3, 8
3572 ; GENERIC-NEXT: or16 l0, a2
3573 ; GENERIC-NEXT: or16 l0, a3
3574 ; GENERIC-NEXT: and16 a1, l0
3575 ; GENERIC-NEXT: and16 l0, a0
3576 ; GENERIC-NEXT: cmphs16 l0, a1
3577 ; GENERIC-NEXT: bf16 .LBB71_2
3578 ; GENERIC-NEXT: # %bb.1: # %label1
3579 ; GENERIC-NEXT: movi16 a0, 1
3580 ; GENERIC-NEXT: br32 .LBB71_3
3581 ; GENERIC-NEXT: .LBB71_2: # %label2
3582 ; GENERIC-NEXT: movi16 a0, 0
3583 ; GENERIC-NEXT: .LBB71_3: # %label1
3584 ; GENERIC-NEXT: addi16 sp, sp, 4
3585 ; GENERIC-NEXT: ld16.w l0, (sp, 0) # 4-byte Folded Reload
3586 ; GENERIC-NEXT: addi16 sp, sp, 4
3587 ; GENERIC-NEXT: rts16
3588 ; CHECK-UGTXT: icmpu32 a0, a1, a0
3589 ; CHECK-UGTXT: rts16
3591 %icmp = icmp ule i16 %y, %x
3592 br i1 %icmp, label %label1, label %label2
3599 define i16 @brRI_i16_ule(i16 %x) {
3600 ; CHECK-LABEL: brRI_i16_ule:
3601 ; CHECK: # %bb.0: # %entry
3602 ; CHECK-NEXT: zexth16 a0, a0
3603 ; CHECK-NEXT: movi16 a1, 10
3604 ; CHECK-NEXT: cmphs16 a1, a0
3605 ; CHECK-NEXT: bf32 .LBB72_2
3606 ; CHECK-NEXT: # %bb.1: # %label1
3607 ; CHECK-NEXT: movi16 a0, 1
3609 ; CHECK-NEXT: .LBB72_2: # %label2
3610 ; CHECK-NEXT: movi16 a0, 0
3613 ; GENERIC-LABEL: brRI_i16_ule:
3614 ; GENERIC: # %bb.0: # %entry
3615 ; GENERIC-NEXT: .cfi_def_cfa_offset 0
3616 ; GENERIC-NEXT: subi16 sp, sp, 4
3617 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
3618 ; GENERIC-NEXT: movi16 a1, 0
3619 ; GENERIC-NEXT: lsli16 a2, a1, 24
3620 ; GENERIC-NEXT: lsli16 a1, a1, 16
3621 ; GENERIC-NEXT: or16 a1, a2
3622 ; GENERIC-NEXT: movi16 a2, 255
3623 ; GENERIC-NEXT: lsli16 a3, a2, 8
3624 ; GENERIC-NEXT: or16 a3, a1
3625 ; GENERIC-NEXT: or16 a3, a2
3626 ; GENERIC-NEXT: and16 a3, a0
3627 ; GENERIC-NEXT: movi16 a0, 10
3628 ; GENERIC-NEXT: cmphs16 a0, a3
3629 ; GENERIC-NEXT: bf16 .LBB72_2
3630 ; GENERIC-NEXT: # %bb.1: # %label1
3631 ; GENERIC-NEXT: movi16 a0, 1
3632 ; GENERIC-NEXT: addi16 sp, sp, 4
3633 ; GENERIC-NEXT: rts16
3634 ; GENERIC-NEXT: .LBB72_2: # %label2
3635 ; GENERIC-NEXT: movi16 a0, 0
3636 ; GENERIC-NEXT: addi16 sp, sp, 4
3637 ; GENERIC-NEXT: rts16
3638 ; CHECK-UGTXT: icmpu32 a0, a1, a0
3639 ; CHECK-UGTXT: rts16
3641 %icmp = icmp ule i16 %x, 10
3642 br i1 %icmp, label %label1, label %label2
3649 define i16 @brR0_i16_ule(i16 %x) {
3650 ; CHECK-LABEL: brR0_i16_ule:
3651 ; CHECK: # %bb.0: # %entry
3652 ; CHECK-NEXT: zexth16 a0, a0
3653 ; CHECK-NEXT: bnez32 a0, .LBB73_2
3654 ; CHECK-NEXT: # %bb.1: # %label1
3655 ; CHECK-NEXT: movi16 a0, 1
3657 ; CHECK-NEXT: .LBB73_2: # %label2
3658 ; CHECK-NEXT: movi16 a0, 0
3661 ; GENERIC-LABEL: brR0_i16_ule:
3662 ; GENERIC: # %bb.0: # %entry
3663 ; GENERIC-NEXT: .cfi_def_cfa_offset 0
3664 ; GENERIC-NEXT: subi16 sp, sp, 4
3665 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
3666 ; GENERIC-NEXT: movi16 a1, 0
3667 ; GENERIC-NEXT: lsli16 a2, a1, 24
3668 ; GENERIC-NEXT: lsli16 a1, a1, 16
3669 ; GENERIC-NEXT: or16 a1, a2
3670 ; GENERIC-NEXT: movi16 a2, 255
3671 ; GENERIC-NEXT: lsli16 a3, a2, 8
3672 ; GENERIC-NEXT: or16 a3, a1
3673 ; GENERIC-NEXT: or16 a3, a2
3674 ; GENERIC-NEXT: and16 a3, a0
3675 ; GENERIC-NEXT: cmpnei16 a3, 0
3676 ; GENERIC-NEXT: bt16 .LBB73_2
3677 ; GENERIC-NEXT: # %bb.1: # %label1
3678 ; GENERIC-NEXT: movi16 a0, 1
3679 ; GENERIC-NEXT: addi16 sp, sp, 4
3680 ; GENERIC-NEXT: rts16
3681 ; GENERIC-NEXT: .LBB73_2: # %label2
3682 ; GENERIC-NEXT: movi16 a0, 0
3683 ; GENERIC-NEXT: addi16 sp, sp, 4
3684 ; GENERIC-NEXT: rts16
3685 ; CHECK-UGTXT: icmpu32 a0, a1, a0
3686 ; CHECK-UGTXT: rts16
3688 %icmp = icmp ule i16 %x, 0
3689 br i1 %icmp, label %label1, label %label2
3697 define i16 @brRR_i16_sgt(i16 %x, i16 %y) {
3698 ; CHECK-LABEL: brRR_i16_sgt:
3699 ; CHECK: # %bb.0: # %entry
3700 ; CHECK-NEXT: sexth16 a1, a1
3701 ; CHECK-NEXT: sexth16 a0, a0
3702 ; CHECK-NEXT: cmplt16 a0, a1
3703 ; CHECK-NEXT: bf32 .LBB74_2
3704 ; CHECK-NEXT: # %bb.1: # %label1
3705 ; CHECK-NEXT: movi16 a0, 1
3707 ; CHECK-NEXT: .LBB74_2: # %label2
3708 ; CHECK-NEXT: movi16 a0, 0
3711 ; GENERIC-LABEL: brRR_i16_sgt:
3712 ; GENERIC: # %bb.0: # %entry
3713 ; GENERIC-NEXT: .cfi_def_cfa_offset 0
3714 ; GENERIC-NEXT: subi16 sp, sp, 4
3715 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
3716 ; GENERIC-NEXT: sexth16 a1, a1
3717 ; GENERIC-NEXT: sexth16 a0, a0
3718 ; GENERIC-NEXT: cmplt16 a0, a1
3719 ; GENERIC-NEXT: bf16 .LBB74_2
3720 ; GENERIC-NEXT: # %bb.1: # %label1
3721 ; GENERIC-NEXT: movi16 a0, 1
3722 ; GENERIC-NEXT: addi16 sp, sp, 4
3723 ; GENERIC-NEXT: rts16
3724 ; GENERIC-NEXT: .LBB74_2: # %label2
3725 ; GENERIC-NEXT: movi16 a0, 0
3726 ; GENERIC-NEXT: addi16 sp, sp, 4
3727 ; GENERIC-NEXT: rts16
3728 ; CHECK-UGTXT: icmpu32 a0, a1, a0
3729 ; CHECK-UGTXT: rts16
3731 %icmp = icmp sgt i16 %y, %x
3732 br i1 %icmp, label %label1, label %label2
3739 define i16 @brRI_i16_sgt(i16 %x) {
3740 ; CHECK-LABEL: brRI_i16_sgt:
3741 ; CHECK: # %bb.0: # %entry
3742 ; CHECK-NEXT: sexth16 a0, a0
3743 ; CHECK-NEXT: cmplti16 a0, 11
3744 ; CHECK-NEXT: bt32 .LBB75_2
3745 ; CHECK-NEXT: # %bb.1: # %label1
3746 ; CHECK-NEXT: movi16 a0, 1
3748 ; CHECK-NEXT: .LBB75_2: # %label2
3749 ; CHECK-NEXT: movi16 a0, 0
3752 ; GENERIC-LABEL: brRI_i16_sgt:
3753 ; GENERIC: # %bb.0: # %entry
3754 ; GENERIC-NEXT: .cfi_def_cfa_offset 0
3755 ; GENERIC-NEXT: subi16 sp, sp, 4
3756 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
3757 ; GENERIC-NEXT: sexth16 a0, a0
3758 ; GENERIC-NEXT: cmplti16 a0, 11
3759 ; GENERIC-NEXT: bt16 .LBB75_2
3760 ; GENERIC-NEXT: # %bb.1: # %label1
3761 ; GENERIC-NEXT: movi16 a0, 1
3762 ; GENERIC-NEXT: addi16 sp, sp, 4
3763 ; GENERIC-NEXT: rts16
3764 ; GENERIC-NEXT: .LBB75_2: # %label2
3765 ; GENERIC-NEXT: movi16 a0, 0
3766 ; GENERIC-NEXT: addi16 sp, sp, 4
3767 ; GENERIC-NEXT: rts16
3768 ; CHECK-UGTXT: icmpu32 a0, a1, a0
3769 ; CHECK-UGTXT: rts16
3771 %icmp = icmp sgt i16 %x, 10
3772 br i1 %icmp, label %label1, label %label2
3779 define i16 @brR0_i16_sgt(i16 %x) {
3780 ; CHECK-LABEL: brR0_i16_sgt:
3781 ; CHECK: # %bb.0: # %entry
3782 ; CHECK-NEXT: sexth16 a0, a0
3783 ; CHECK-NEXT: blsz32 a0, .LBB76_2
3784 ; CHECK-NEXT: # %bb.1: # %label1
3785 ; CHECK-NEXT: movi16 a0, 1
3787 ; CHECK-NEXT: .LBB76_2: # %label2
3788 ; CHECK-NEXT: movi16 a0, 0
3791 ; GENERIC-LABEL: brR0_i16_sgt:
3792 ; GENERIC: # %bb.0: # %entry
3793 ; GENERIC-NEXT: .cfi_def_cfa_offset 0
3794 ; GENERIC-NEXT: subi16 sp, sp, 4
3795 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
3796 ; GENERIC-NEXT: sexth16 a0, a0
3797 ; GENERIC-NEXT: cmplti16 a0, 1
3798 ; GENERIC-NEXT: bt16 .LBB76_2
3799 ; GENERIC-NEXT: # %bb.1: # %label1
3800 ; GENERIC-NEXT: movi16 a0, 1
3801 ; GENERIC-NEXT: addi16 sp, sp, 4
3802 ; GENERIC-NEXT: rts16
3803 ; GENERIC-NEXT: .LBB76_2: # %label2
3804 ; GENERIC-NEXT: movi16 a0, 0
3805 ; GENERIC-NEXT: addi16 sp, sp, 4
3806 ; GENERIC-NEXT: rts16
3807 ; CHECK-UGTXT: icmpu32 a0, a1, a0
3808 ; CHECK-UGTXT: rts16
3810 %icmp = icmp sgt i16 %x, 0
3811 br i1 %icmp, label %label1, label %label2
3819 define i16 @brRR_i16_sge(i16 %x, i16 %y) {
3820 ; CHECK-LABEL: brRR_i16_sge:
3821 ; CHECK: # %bb.0: # %entry
3822 ; CHECK-NEXT: sexth16 a0, a0
3823 ; CHECK-NEXT: sexth16 a1, a1
3824 ; CHECK-NEXT: cmplt16 a1, a0
3825 ; CHECK-NEXT: bt32 .LBB77_2
3826 ; CHECK-NEXT: # %bb.1: # %label1
3827 ; CHECK-NEXT: movi16 a0, 1
3829 ; CHECK-NEXT: .LBB77_2: # %label2
3830 ; CHECK-NEXT: movi16 a0, 0
3833 ; GENERIC-LABEL: brRR_i16_sge:
3834 ; GENERIC: # %bb.0: # %entry
3835 ; GENERIC-NEXT: .cfi_def_cfa_offset 0
3836 ; GENERIC-NEXT: subi16 sp, sp, 4
3837 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
3838 ; GENERIC-NEXT: sexth16 a0, a0
3839 ; GENERIC-NEXT: sexth16 a1, a1
3840 ; GENERIC-NEXT: cmplt16 a1, a0
3841 ; GENERIC-NEXT: bt16 .LBB77_2
3842 ; GENERIC-NEXT: # %bb.1: # %label1
3843 ; GENERIC-NEXT: movi16 a0, 1
3844 ; GENERIC-NEXT: addi16 sp, sp, 4
3845 ; GENERIC-NEXT: rts16
3846 ; GENERIC-NEXT: .LBB77_2: # %label2
3847 ; GENERIC-NEXT: movi16 a0, 0
3848 ; GENERIC-NEXT: addi16 sp, sp, 4
3849 ; GENERIC-NEXT: rts16
3850 ; CHECK-UGTXT: icmpu32 a0, a1, a0
3851 ; CHECK-UGTXT: rts16
3853 %icmp = icmp sge i16 %y, %x
3854 br i1 %icmp, label %label1, label %label2
3861 define i16 @brRI_i16_sge(i16 %x) {
3862 ; CHECK-LABEL: brRI_i16_sge:
3863 ; CHECK: # %bb.0: # %entry
3864 ; CHECK-NEXT: sexth16 a0, a0
3865 ; CHECK-NEXT: cmplti16 a0, 10
3866 ; CHECK-NEXT: bt32 .LBB78_2
3867 ; CHECK-NEXT: # %bb.1: # %label1
3868 ; CHECK-NEXT: movi16 a0, 1
3870 ; CHECK-NEXT: .LBB78_2: # %label2
3871 ; CHECK-NEXT: movi16 a0, 0
3874 ; GENERIC-LABEL: brRI_i16_sge:
3875 ; GENERIC: # %bb.0: # %entry
3876 ; GENERIC-NEXT: .cfi_def_cfa_offset 0
3877 ; GENERIC-NEXT: subi16 sp, sp, 4
3878 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
3879 ; GENERIC-NEXT: sexth16 a0, a0
3880 ; GENERIC-NEXT: cmplti16 a0, 10
3881 ; GENERIC-NEXT: bt16 .LBB78_2
3882 ; GENERIC-NEXT: # %bb.1: # %label1
3883 ; GENERIC-NEXT: movi16 a0, 1
3884 ; GENERIC-NEXT: addi16 sp, sp, 4
3885 ; GENERIC-NEXT: rts16
3886 ; GENERIC-NEXT: .LBB78_2: # %label2
3887 ; GENERIC-NEXT: movi16 a0, 0
3888 ; GENERIC-NEXT: addi16 sp, sp, 4
3889 ; GENERIC-NEXT: rts16
3890 ; CHECK-UGTXT: icmpu32 a0, a1, a0
3891 ; CHECK-UGTXT: rts16
3893 %icmp = icmp sge i16 %x, 10
3894 br i1 %icmp, label %label1, label %label2
3901 define i16 @brR0_i16_sge(i16 %x) {
3902 ; CHECK-LABEL: brR0_i16_sge:
3903 ; CHECK: # %bb.0: # %entry
3904 ; CHECK-NEXT: sexth16 a0, a0
3905 ; CHECK-NEXT: blz32 a0, .LBB79_2
3906 ; CHECK-NEXT: # %bb.1: # %label1
3907 ; CHECK-NEXT: movi16 a0, 1
3909 ; CHECK-NEXT: .LBB79_2: # %label2
3910 ; CHECK-NEXT: movi16 a0, 0
3913 ; GENERIC-LABEL: brR0_i16_sge:
3914 ; GENERIC: # %bb.0: # %entry
3915 ; GENERIC-NEXT: .cfi_def_cfa_offset 0
3916 ; GENERIC-NEXT: subi16 sp, sp, 4
3917 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
3918 ; GENERIC-NEXT: sexth16 a0, a0
3919 ; GENERIC-NEXT: movi16 a1, 0
3920 ; GENERIC-NEXT: cmplt16 a0, a1
3921 ; GENERIC-NEXT: bt16 .LBB79_2
3922 ; GENERIC-NEXT: # %bb.1: # %label1
3923 ; GENERIC-NEXT: movi16 a0, 1
3924 ; GENERIC-NEXT: addi16 sp, sp, 4
3925 ; GENERIC-NEXT: rts16
3926 ; GENERIC-NEXT: .LBB79_2: # %label2
3927 ; GENERIC-NEXT: movi16 a0, 0
3928 ; GENERIC-NEXT: addi16 sp, sp, 4
3929 ; GENERIC-NEXT: rts16
3930 ; CHECK-UGTXT: icmpu32 a0, a1, a0
3931 ; CHECK-UGTXT: rts16
3933 %icmp = icmp sge i16 %x, 0
3934 br i1 %icmp, label %label1, label %label2
3942 define i16 @brRR_i16_slt(i16 %x, i16 %y) {
3943 ; CHECK-LABEL: brRR_i16_slt:
3944 ; CHECK: # %bb.0: # %entry
3945 ; CHECK-NEXT: sexth16 a0, a0
3946 ; CHECK-NEXT: sexth16 a1, a1
3947 ; CHECK-NEXT: cmplt16 a1, a0
3948 ; CHECK-NEXT: bf32 .LBB80_2
3949 ; CHECK-NEXT: # %bb.1: # %label1
3950 ; CHECK-NEXT: movi16 a0, 1
3952 ; CHECK-NEXT: .LBB80_2: # %label2
3953 ; CHECK-NEXT: movi16 a0, 0
3956 ; GENERIC-LABEL: brRR_i16_slt:
3957 ; GENERIC: # %bb.0: # %entry
3958 ; GENERIC-NEXT: .cfi_def_cfa_offset 0
3959 ; GENERIC-NEXT: subi16 sp, sp, 4
3960 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
3961 ; GENERIC-NEXT: sexth16 a0, a0
3962 ; GENERIC-NEXT: sexth16 a1, a1
3963 ; GENERIC-NEXT: cmplt16 a1, a0
3964 ; GENERIC-NEXT: bf16 .LBB80_2
3965 ; GENERIC-NEXT: # %bb.1: # %label1
3966 ; GENERIC-NEXT: movi16 a0, 1
3967 ; GENERIC-NEXT: addi16 sp, sp, 4
3968 ; GENERIC-NEXT: rts16
3969 ; GENERIC-NEXT: .LBB80_2: # %label2
3970 ; GENERIC-NEXT: movi16 a0, 0
3971 ; GENERIC-NEXT: addi16 sp, sp, 4
3972 ; GENERIC-NEXT: rts16
3973 ; CHECK-UGTXT: icmpu32 a0, a1, a0
3974 ; CHECK-UGTXT: rts16
3976 %icmp = icmp slt i16 %y, %x
3977 br i1 %icmp, label %label1, label %label2
3984 define i16 @brRI_i16_slt(i16 %x) {
3985 ; CHECK-LABEL: brRI_i16_slt:
3986 ; CHECK: # %bb.0: # %entry
3987 ; CHECK-NEXT: sexth16 a0, a0
3988 ; CHECK-NEXT: movi16 a1, 9
3989 ; CHECK-NEXT: cmplt16 a1, a0
3990 ; CHECK-NEXT: bt32 .LBB81_2
3991 ; CHECK-NEXT: # %bb.1: # %label1
3992 ; CHECK-NEXT: movi16 a0, 1
3994 ; CHECK-NEXT: .LBB81_2: # %label2
3995 ; CHECK-NEXT: movi16 a0, 0
3998 ; GENERIC-LABEL: brRI_i16_slt:
3999 ; GENERIC: # %bb.0: # %entry
4000 ; GENERIC-NEXT: .cfi_def_cfa_offset 0
4001 ; GENERIC-NEXT: subi16 sp, sp, 4
4002 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
4003 ; GENERIC-NEXT: sexth16 a0, a0
4004 ; GENERIC-NEXT: movi16 a1, 9
4005 ; GENERIC-NEXT: cmplt16 a1, a0
4006 ; GENERIC-NEXT: bt16 .LBB81_2
4007 ; GENERIC-NEXT: # %bb.1: # %label1
4008 ; GENERIC-NEXT: movi16 a0, 1
4009 ; GENERIC-NEXT: addi16 sp, sp, 4
4010 ; GENERIC-NEXT: rts16
4011 ; GENERIC-NEXT: .LBB81_2: # %label2
4012 ; GENERIC-NEXT: movi16 a0, 0
4013 ; GENERIC-NEXT: addi16 sp, sp, 4
4014 ; GENERIC-NEXT: rts16
4015 ; CHECK-UGTXT: icmpu32 a0, a1, a0
4016 ; CHECK-UGTXT: rts16
4018 %icmp = icmp slt i16 %x, 10
4019 br i1 %icmp, label %label1, label %label2
4026 define i16 @brR0_i16_slt(i16 %x) {
4027 ; CHECK-LABEL: brR0_i16_slt:
4028 ; CHECK: # %bb.0: # %entry
4029 ; CHECK-NEXT: sexth16 a0, a0
4030 ; CHECK-NEXT: blz32 a0, .LBB82_2
4031 ; CHECK-NEXT: # %bb.1: # %label2
4032 ; CHECK-NEXT: movi16 a0, 0
4034 ; CHECK-NEXT: .LBB82_2: # %label1
4035 ; CHECK-NEXT: movi16 a0, 1
4038 ; GENERIC-LABEL: brR0_i16_slt:
4039 ; GENERIC: # %bb.0: # %entry
4040 ; GENERIC-NEXT: .cfi_def_cfa_offset 0
4041 ; GENERIC-NEXT: subi16 sp, sp, 4
4042 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
4043 ; GENERIC-NEXT: sexth16 a0, a0
4044 ; GENERIC-NEXT: movi16 a1, 255
4045 ; GENERIC-NEXT: lsli16 a2, a1, 24
4046 ; GENERIC-NEXT: lsli16 a3, a1, 16
4047 ; GENERIC-NEXT: or16 a3, a2
4048 ; GENERIC-NEXT: lsli16 a2, a1, 8
4049 ; GENERIC-NEXT: or16 a2, a3
4050 ; GENERIC-NEXT: or16 a2, a1
4051 ; GENERIC-NEXT: cmplt16 a2, a0
4052 ; GENERIC-NEXT: bf16 .LBB82_2
4053 ; GENERIC-NEXT: # %bb.1: # %label2
4054 ; GENERIC-NEXT: movi16 a0, 0
4055 ; GENERIC-NEXT: addi16 sp, sp, 4
4056 ; GENERIC-NEXT: rts16
4057 ; GENERIC-NEXT: .LBB82_2: # %label1
4058 ; GENERIC-NEXT: movi16 a0, 1
4059 ; GENERIC-NEXT: addi16 sp, sp, 4
4060 ; GENERIC-NEXT: rts16
4061 ; CHECK-UGTXT: icmpu32 a0, a1, a0
4062 ; CHECK-UGTXT: rts16
4064 %icmp = icmp slt i16 %x, 0
4065 br i1 %icmp, label %label1, label %label2
4073 define i16 @brRR_i16_sle(i16 %x, i16 %y) {
4074 ; CHECK-LABEL: brRR_i16_sle:
4075 ; CHECK: # %bb.0: # %entry
4076 ; CHECK-NEXT: sexth16 a1, a1
4077 ; CHECK-NEXT: sexth16 a0, a0
4078 ; CHECK-NEXT: cmplt16 a0, a1
4079 ; CHECK-NEXT: bt32 .LBB83_2
4080 ; CHECK-NEXT: # %bb.1: # %label1
4081 ; CHECK-NEXT: movi16 a0, 1
4083 ; CHECK-NEXT: .LBB83_2: # %label2
4084 ; CHECK-NEXT: movi16 a0, 0
4087 ; GENERIC-LABEL: brRR_i16_sle:
4088 ; GENERIC: # %bb.0: # %entry
4089 ; GENERIC-NEXT: .cfi_def_cfa_offset 0
4090 ; GENERIC-NEXT: subi16 sp, sp, 4
4091 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
4092 ; GENERIC-NEXT: sexth16 a1, a1
4093 ; GENERIC-NEXT: sexth16 a0, a0
4094 ; GENERIC-NEXT: cmplt16 a0, a1
4095 ; GENERIC-NEXT: bt16 .LBB83_2
4096 ; GENERIC-NEXT: # %bb.1: # %label1
4097 ; GENERIC-NEXT: movi16 a0, 1
4098 ; GENERIC-NEXT: addi16 sp, sp, 4
4099 ; GENERIC-NEXT: rts16
4100 ; GENERIC-NEXT: .LBB83_2: # %label2
4101 ; GENERIC-NEXT: movi16 a0, 0
4102 ; GENERIC-NEXT: addi16 sp, sp, 4
4103 ; GENERIC-NEXT: rts16
4104 ; CHECK-UGTXT: icmpu32 a0, a1, a0
4105 ; CHECK-UGTXT: rts16
4107 %icmp = icmp sle i16 %y, %x
4108 br i1 %icmp, label %label1, label %label2
4115 define i16 @brRI_i16_sle(i16 %x) {
4116 ; CHECK-LABEL: brRI_i16_sle:
4117 ; CHECK: # %bb.0: # %entry
4118 ; CHECK-NEXT: sexth16 a0, a0
4119 ; CHECK-NEXT: movi16 a1, 10
4120 ; CHECK-NEXT: cmplt16 a1, a0
4121 ; CHECK-NEXT: bt32 .LBB84_2
4122 ; CHECK-NEXT: # %bb.1: # %label1
4123 ; CHECK-NEXT: movi16 a0, 1
4125 ; CHECK-NEXT: .LBB84_2: # %label2
4126 ; CHECK-NEXT: movi16 a0, 0
4129 ; GENERIC-LABEL: brRI_i16_sle:
4130 ; GENERIC: # %bb.0: # %entry
4131 ; GENERIC-NEXT: .cfi_def_cfa_offset 0
4132 ; GENERIC-NEXT: subi16 sp, sp, 4
4133 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
4134 ; GENERIC-NEXT: sexth16 a0, a0
4135 ; GENERIC-NEXT: movi16 a1, 10
4136 ; GENERIC-NEXT: cmplt16 a1, a0
4137 ; GENERIC-NEXT: bt16 .LBB84_2
4138 ; GENERIC-NEXT: # %bb.1: # %label1
4139 ; GENERIC-NEXT: movi16 a0, 1
4140 ; GENERIC-NEXT: addi16 sp, sp, 4
4141 ; GENERIC-NEXT: rts16
4142 ; GENERIC-NEXT: .LBB84_2: # %label2
4143 ; GENERIC-NEXT: movi16 a0, 0
4144 ; GENERIC-NEXT: addi16 sp, sp, 4
4145 ; GENERIC-NEXT: rts16
4146 ; CHECK-UGTXT: icmpu32 a0, a1, a0
4147 ; CHECK-UGTXT: rts16
4149 %icmp = icmp sle i16 %x, 10
4150 br i1 %icmp, label %label1, label %label2
4157 define i16 @brR0_i16_sle(i16 %x) {
4158 ; CHECK-LABEL: brR0_i16_sle:
4159 ; CHECK: # %bb.0: # %entry
4160 ; CHECK-NEXT: sexth16 a0, a0
4161 ; CHECK-NEXT: bhz32 a0, .LBB85_2
4162 ; CHECK-NEXT: # %bb.1: # %label1
4163 ; CHECK-NEXT: movi16 a0, 1
4165 ; CHECK-NEXT: .LBB85_2: # %label2
4166 ; CHECK-NEXT: movi16 a0, 0
4169 ; GENERIC-LABEL: brR0_i16_sle:
4170 ; GENERIC: # %bb.0: # %entry
4171 ; GENERIC-NEXT: .cfi_def_cfa_offset 0
4172 ; GENERIC-NEXT: subi16 sp, sp, 4
4173 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
4174 ; GENERIC-NEXT: sexth16 a0, a0
4175 ; GENERIC-NEXT: movi16 a1, 0
4176 ; GENERIC-NEXT: cmplt16 a1, a0
4177 ; GENERIC-NEXT: bt16 .LBB85_2
4178 ; GENERIC-NEXT: # %bb.1: # %label1
4179 ; GENERIC-NEXT: movi16 a0, 1
4180 ; GENERIC-NEXT: addi16 sp, sp, 4
4181 ; GENERIC-NEXT: rts16
4182 ; GENERIC-NEXT: .LBB85_2: # %label2
4183 ; GENERIC-NEXT: movi16 a0, 0
4184 ; GENERIC-NEXT: addi16 sp, sp, 4
4185 ; GENERIC-NEXT: rts16
4186 ; CHECK-UGTXT: icmpu32 a0, a1, a0
4187 ; CHECK-UGTXT: rts16
4189 %icmp = icmp sle i16 %x, 0
4190 br i1 %icmp, label %label1, label %label2
4198 define i16 @brCBit_i16(i1 %c) {
4199 ; CHECK-LABEL: brCBit_i16:
4200 ; CHECK: # %bb.0: # %entry
4201 ; CHECK-NEXT: andi32 a0, a0, 1
4202 ; CHECK-NEXT: bez32 a0, .LBB86_2
4203 ; CHECK-NEXT: # %bb.1: # %label1
4204 ; CHECK-NEXT: movi16 a0, 1
4206 ; CHECK-NEXT: .LBB86_2: # %label2
4207 ; CHECK-NEXT: movi16 a0, 0
4210 ; GENERIC-LABEL: brCBit_i16:
4211 ; GENERIC: # %bb.0: # %entry
4212 ; GENERIC-NEXT: .cfi_def_cfa_offset 0
4213 ; GENERIC-NEXT: subi16 sp, sp, 4
4214 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
4215 ; GENERIC-NEXT: movi16 a1, 1
4216 ; GENERIC-NEXT: and16 a1, a0
4217 ; GENERIC-NEXT: cmpnei16 a1, 0
4218 ; GENERIC-NEXT: bf16 .LBB86_2
4219 ; GENERIC-NEXT: # %bb.1: # %label1
4220 ; GENERIC-NEXT: movi16 a0, 1
4221 ; GENERIC-NEXT: addi16 sp, sp, 4
4222 ; GENERIC-NEXT: rts16
4223 ; GENERIC-NEXT: .LBB86_2: # %label2
4224 ; GENERIC-NEXT: movi16 a0, 0
4225 ; GENERIC-NEXT: addi16 sp, sp, 4
4226 ; GENERIC-NEXT: rts16
4228 br i1 %c, label %label1, label %label2
4237 define i8 @brRR_i8_eq(i8 %x, i8 %y) {
4238 ; CHECK-LABEL: brRR_i8_eq:
4239 ; CHECK: # %bb.0: # %entry
4240 ; CHECK-NEXT: zextb16 a0, a0
4241 ; CHECK-NEXT: zextb16 a1, a1
4242 ; CHECK-NEXT: cmpne16 a1, a0
4243 ; CHECK-NEXT: bt32 .LBB87_2
4244 ; CHECK-NEXT: # %bb.1: # %label1
4245 ; CHECK-NEXT: movi16 a0, 1
4247 ; CHECK-NEXT: .LBB87_2: # %label2
4248 ; CHECK-NEXT: movi16 a0, 0
4251 ; GENERIC-LABEL: brRR_i8_eq:
4252 ; GENERIC: # %bb.0: # %entry
4253 ; GENERIC-NEXT: .cfi_def_cfa_offset 0
4254 ; GENERIC-NEXT: subi16 sp, sp, 4
4255 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
4256 ; GENERIC-NEXT: movi16 a2, 255
4257 ; GENERIC-NEXT: and16 a0, a2
4258 ; GENERIC-NEXT: and16 a1, a2
4259 ; GENERIC-NEXT: cmpne16 a1, a0
4260 ; GENERIC-NEXT: bt16 .LBB87_2
4261 ; GENERIC-NEXT: # %bb.1: # %label1
4262 ; GENERIC-NEXT: movi16 a0, 1
4263 ; GENERIC-NEXT: addi16 sp, sp, 4
4264 ; GENERIC-NEXT: rts16
4265 ; GENERIC-NEXT: .LBB87_2: # %label2
4266 ; GENERIC-NEXT: movi16 a0, 0
4267 ; GENERIC-NEXT: addi16 sp, sp, 4
4268 ; GENERIC-NEXT: rts16
4270 %icmp = icmp eq i8 %y, %x
4271 br i1 %icmp, label %label1, label %label2
4278 define i8 @brRI_i8_eq(i8 %x) {
4279 ; CHECK-LABEL: brRI_i8_eq:
4280 ; CHECK: # %bb.0: # %entry
4281 ; CHECK-NEXT: zextb16 a0, a0
4282 ; CHECK-NEXT: cmpnei16 a0, 10
4283 ; CHECK-NEXT: bt32 .LBB88_2
4284 ; CHECK-NEXT: # %bb.1: # %label1
4285 ; CHECK-NEXT: movi16 a0, 1
4287 ; CHECK-NEXT: .LBB88_2: # %label2
4288 ; CHECK-NEXT: movi16 a0, 0
4291 ; GENERIC-LABEL: brRI_i8_eq:
4292 ; GENERIC: # %bb.0: # %entry
4293 ; GENERIC-NEXT: .cfi_def_cfa_offset 0
4294 ; GENERIC-NEXT: subi16 sp, sp, 4
4295 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
4296 ; GENERIC-NEXT: movi16 a1, 255
4297 ; GENERIC-NEXT: and16 a1, a0
4298 ; GENERIC-NEXT: cmpnei16 a1, 10
4299 ; GENERIC-NEXT: bt16 .LBB88_2
4300 ; GENERIC-NEXT: # %bb.1: # %label1
4301 ; GENERIC-NEXT: movi16 a0, 1
4302 ; GENERIC-NEXT: addi16 sp, sp, 4
4303 ; GENERIC-NEXT: rts16
4304 ; GENERIC-NEXT: .LBB88_2: # %label2
4305 ; GENERIC-NEXT: movi16 a0, 0
4306 ; GENERIC-NEXT: addi16 sp, sp, 4
4307 ; GENERIC-NEXT: rts16
4309 %icmp = icmp eq i8 %x, 10
4310 br i1 %icmp, label %label1, label %label2
4317 define i8 @brR0_i8_eq(i8 %x) {
4318 ; CHECK-LABEL: brR0_i8_eq:
4319 ; CHECK: # %bb.0: # %entry
4320 ; CHECK-NEXT: zextb16 a0, a0
4321 ; CHECK-NEXT: bez32 a0, .LBB89_2
4322 ; CHECK-NEXT: # %bb.1: # %label2
4323 ; CHECK-NEXT: movi16 a0, 0
4325 ; CHECK-NEXT: .LBB89_2: # %label1
4326 ; CHECK-NEXT: movi16 a0, 1
4329 ; GENERIC-LABEL: brR0_i8_eq:
4330 ; GENERIC: # %bb.0: # %entry
4331 ; GENERIC-NEXT: .cfi_def_cfa_offset 0
4332 ; GENERIC-NEXT: subi16 sp, sp, 4
4333 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
4334 ; GENERIC-NEXT: movi16 a1, 255
4335 ; GENERIC-NEXT: and16 a1, a0
4336 ; GENERIC-NEXT: cmpnei16 a1, 0
4337 ; GENERIC-NEXT: bf16 .LBB89_2
4338 ; GENERIC-NEXT: # %bb.1: # %label2
4339 ; GENERIC-NEXT: movi16 a0, 0
4340 ; GENERIC-NEXT: addi16 sp, sp, 4
4341 ; GENERIC-NEXT: rts16
4342 ; GENERIC-NEXT: .LBB89_2: # %label1
4343 ; GENERIC-NEXT: movi16 a0, 1
4344 ; GENERIC-NEXT: addi16 sp, sp, 4
4345 ; GENERIC-NEXT: rts16
4347 %icmp = icmp eq i8 %x, 0
4348 br i1 %icmp, label %label1, label %label2
4356 define i8 @brRR_i8_ne(i8 %x, i8 %y) {
4357 ; CHECK-LABEL: brRR_i8_ne:
4358 ; CHECK: # %bb.0: # %entry
4359 ; CHECK-NEXT: zextb16 a0, a0
4360 ; CHECK-NEXT: zextb16 a1, a1
4361 ; CHECK-NEXT: cmpne16 a1, a0
4362 ; CHECK-NEXT: bf32 .LBB90_2
4363 ; CHECK-NEXT: # %bb.1: # %label1
4364 ; CHECK-NEXT: movi16 a0, 1
4366 ; CHECK-NEXT: .LBB90_2: # %label2
4367 ; CHECK-NEXT: movi16 a0, 0
4370 ; GENERIC-LABEL: brRR_i8_ne:
4371 ; GENERIC: # %bb.0: # %entry
4372 ; GENERIC-NEXT: .cfi_def_cfa_offset 0
4373 ; GENERIC-NEXT: subi16 sp, sp, 4
4374 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
4375 ; GENERIC-NEXT: movi16 a2, 255
4376 ; GENERIC-NEXT: and16 a0, a2
4377 ; GENERIC-NEXT: and16 a1, a2
4378 ; GENERIC-NEXT: cmpne16 a1, a0
4379 ; GENERIC-NEXT: bf16 .LBB90_2
4380 ; GENERIC-NEXT: # %bb.1: # %label1
4381 ; GENERIC-NEXT: movi16 a0, 1
4382 ; GENERIC-NEXT: addi16 sp, sp, 4
4383 ; GENERIC-NEXT: rts16
4384 ; GENERIC-NEXT: .LBB90_2: # %label2
4385 ; GENERIC-NEXT: movi16 a0, 0
4386 ; GENERIC-NEXT: addi16 sp, sp, 4
4387 ; GENERIC-NEXT: rts16
4389 %icmp = icmp ne i8 %y, %x
4390 br i1 %icmp, label %label1, label %label2
4397 define i8 @brRI_i8_ne(i8 %x) {
4398 ; CHECK-LABEL: brRI_i8_ne:
4399 ; CHECK: # %bb.0: # %entry
4400 ; CHECK-NEXT: zextb16 a0, a0
4401 ; CHECK-NEXT: cmpnei16 a0, 10
4402 ; CHECK-NEXT: bf32 .LBB91_2
4403 ; CHECK-NEXT: # %bb.1: # %label1
4404 ; CHECK-NEXT: movi16 a0, 1
4406 ; CHECK-NEXT: .LBB91_2: # %label2
4407 ; CHECK-NEXT: movi16 a0, 0
4410 ; GENERIC-LABEL: brRI_i8_ne:
4411 ; GENERIC: # %bb.0: # %entry
4412 ; GENERIC-NEXT: .cfi_def_cfa_offset 0
4413 ; GENERIC-NEXT: subi16 sp, sp, 4
4414 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
4415 ; GENERIC-NEXT: movi16 a1, 255
4416 ; GENERIC-NEXT: and16 a1, a0
4417 ; GENERIC-NEXT: cmpnei16 a1, 10
4418 ; GENERIC-NEXT: bf16 .LBB91_2
4419 ; GENERIC-NEXT: # %bb.1: # %label1
4420 ; GENERIC-NEXT: movi16 a0, 1
4421 ; GENERIC-NEXT: addi16 sp, sp, 4
4422 ; GENERIC-NEXT: rts16
4423 ; GENERIC-NEXT: .LBB91_2: # %label2
4424 ; GENERIC-NEXT: movi16 a0, 0
4425 ; GENERIC-NEXT: addi16 sp, sp, 4
4426 ; GENERIC-NEXT: rts16
4428 %icmp = icmp ne i8 %x, 10
4429 br i1 %icmp, label %label1, label %label2
4436 define i8 @brR0_i8_ne(i8 %x) {
4437 ; CHECK-LABEL: brR0_i8_ne:
4438 ; CHECK: # %bb.0: # %entry
4439 ; CHECK-NEXT: zextb16 a0, a0
4440 ; CHECK-NEXT: bez32 a0, .LBB92_2
4441 ; CHECK-NEXT: # %bb.1: # %label1
4442 ; CHECK-NEXT: movi16 a0, 1
4444 ; CHECK-NEXT: .LBB92_2: # %label2
4445 ; CHECK-NEXT: movi16 a0, 0
4448 ; GENERIC-LABEL: brR0_i8_ne:
4449 ; GENERIC: # %bb.0: # %entry
4450 ; GENERIC-NEXT: .cfi_def_cfa_offset 0
4451 ; GENERIC-NEXT: subi16 sp, sp, 4
4452 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
4453 ; GENERIC-NEXT: movi16 a1, 255
4454 ; GENERIC-NEXT: and16 a1, a0
4455 ; GENERIC-NEXT: cmpnei16 a1, 0
4456 ; GENERIC-NEXT: bf16 .LBB92_2
4457 ; GENERIC-NEXT: # %bb.1: # %label1
4458 ; GENERIC-NEXT: movi16 a0, 1
4459 ; GENERIC-NEXT: addi16 sp, sp, 4
4460 ; GENERIC-NEXT: rts16
4461 ; GENERIC-NEXT: .LBB92_2: # %label2
4462 ; GENERIC-NEXT: movi16 a0, 0
4463 ; GENERIC-NEXT: addi16 sp, sp, 4
4464 ; GENERIC-NEXT: rts16
4466 %icmp = icmp ne i8 %x, 0
4467 br i1 %icmp, label %label1, label %label2
4475 define i8 @brRR_i8_ugt(i8 %x, i8 %y) {
4476 ; CHECK-LABEL: brRR_i8_ugt:
4477 ; CHECK: # %bb.0: # %entry
4478 ; CHECK-NEXT: zextb16 a1, a1
4479 ; CHECK-NEXT: zextb16 a0, a0
4480 ; CHECK-NEXT: cmphs16 a0, a1
4481 ; CHECK-NEXT: bt32 .LBB93_2
4482 ; CHECK-NEXT: # %bb.1: # %label1
4483 ; CHECK-NEXT: movi16 a0, 1
4485 ; CHECK-NEXT: .LBB93_2: # %label2
4486 ; CHECK-NEXT: movi16 a0, 0
4489 ; GENERIC-LABEL: brRR_i8_ugt:
4490 ; GENERIC: # %bb.0: # %entry
4491 ; GENERIC-NEXT: .cfi_def_cfa_offset 0
4492 ; GENERIC-NEXT: subi16 sp, sp, 4
4493 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
4494 ; GENERIC-NEXT: movi16 a2, 255
4495 ; GENERIC-NEXT: and16 a1, a2
4496 ; GENERIC-NEXT: and16 a0, a2
4497 ; GENERIC-NEXT: cmphs16 a0, a1
4498 ; GENERIC-NEXT: bt16 .LBB93_2
4499 ; GENERIC-NEXT: # %bb.1: # %label1
4500 ; GENERIC-NEXT: movi16 a0, 1
4501 ; GENERIC-NEXT: addi16 sp, sp, 4
4502 ; GENERIC-NEXT: rts16
4503 ; GENERIC-NEXT: .LBB93_2: # %label2
4504 ; GENERIC-NEXT: movi16 a0, 0
4505 ; GENERIC-NEXT: addi16 sp, sp, 4
4506 ; GENERIC-NEXT: rts16
4507 ; CHECK-UGTXT: icmpu32 a0, a1, a0
4508 ; CHECK-UGTXT: rts16
4510 %icmp = icmp ugt i8 %y, %x
4511 br i1 %icmp, label %label1, label %label2
4518 define i8 @brRI_i8_ugt(i8 %x) {
4519 ; CHECK-LABEL: brRI_i8_ugt:
4520 ; CHECK: # %bb.0: # %entry
4521 ; CHECK-NEXT: zextb16 a0, a0
4522 ; CHECK-NEXT: cmphsi16 a0, 11
4523 ; CHECK-NEXT: bf32 .LBB94_2
4524 ; CHECK-NEXT: # %bb.1: # %label1
4525 ; CHECK-NEXT: movi16 a0, 1
4527 ; CHECK-NEXT: .LBB94_2: # %label2
4528 ; CHECK-NEXT: movi16 a0, 0
4531 ; GENERIC-LABEL: brRI_i8_ugt:
4532 ; GENERIC: # %bb.0: # %entry
4533 ; GENERIC-NEXT: .cfi_def_cfa_offset 0
4534 ; GENERIC-NEXT: subi16 sp, sp, 4
4535 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
4536 ; GENERIC-NEXT: movi16 a1, 255
4537 ; GENERIC-NEXT: and16 a1, a0
4538 ; GENERIC-NEXT: cmphsi16 a1, 11
4539 ; GENERIC-NEXT: bf16 .LBB94_2
4540 ; GENERIC-NEXT: # %bb.1: # %label1
4541 ; GENERIC-NEXT: movi16 a0, 1
4542 ; GENERIC-NEXT: addi16 sp, sp, 4
4543 ; GENERIC-NEXT: rts16
4544 ; GENERIC-NEXT: .LBB94_2: # %label2
4545 ; GENERIC-NEXT: movi16 a0, 0
4546 ; GENERIC-NEXT: addi16 sp, sp, 4
4547 ; GENERIC-NEXT: rts16
4548 ; CHECK-UGTXT: icmpu32 a0, a1, a0
4549 ; CHECK-UGTXT: rts16
4551 %icmp = icmp ugt i8 %x, 10
4552 br i1 %icmp, label %label1, label %label2
4559 define i8 @brR0_i8_ugt(i8 %x) {
4560 ; CHECK-LABEL: brR0_i8_ugt:
4561 ; CHECK: # %bb.0: # %entry
4562 ; CHECK-NEXT: zextb16 a0, a0
4563 ; CHECK-NEXT: bez32 a0, .LBB95_2
4564 ; CHECK-NEXT: # %bb.1: # %label1
4565 ; CHECK-NEXT: movi16 a0, 1
4567 ; CHECK-NEXT: .LBB95_2: # %label2
4568 ; CHECK-NEXT: movi16 a0, 0
4571 ; GENERIC-LABEL: brR0_i8_ugt:
4572 ; GENERIC: # %bb.0: # %entry
4573 ; GENERIC-NEXT: .cfi_def_cfa_offset 0
4574 ; GENERIC-NEXT: subi16 sp, sp, 4
4575 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
4576 ; GENERIC-NEXT: movi16 a1, 255
4577 ; GENERIC-NEXT: and16 a1, a0
4578 ; GENERIC-NEXT: cmpnei16 a1, 0
4579 ; GENERIC-NEXT: bf16 .LBB95_2
4580 ; GENERIC-NEXT: # %bb.1: # %label1
4581 ; GENERIC-NEXT: movi16 a0, 1
4582 ; GENERIC-NEXT: addi16 sp, sp, 4
4583 ; GENERIC-NEXT: rts16
4584 ; GENERIC-NEXT: .LBB95_2: # %label2
4585 ; GENERIC-NEXT: movi16 a0, 0
4586 ; GENERIC-NEXT: addi16 sp, sp, 4
4587 ; GENERIC-NEXT: rts16
4588 ; CHECK-UGTXT: icmpu32 a0, a1, a0
4589 ; CHECK-UGTXT: rts16
4591 %icmp = icmp ugt i8 %x, 0
4592 br i1 %icmp, label %label1, label %label2
4600 define i8 @brRR_i8_uge(i8 %x, i8 %y) {
4601 ; CHECK-LABEL: brRR_i8_uge:
4602 ; CHECK: # %bb.0: # %entry
4603 ; CHECK-NEXT: zextb16 a0, a0
4604 ; CHECK-NEXT: zextb16 a1, a1
4605 ; CHECK-NEXT: cmphs16 a1, a0
4606 ; CHECK-NEXT: bf32 .LBB96_2
4607 ; CHECK-NEXT: # %bb.1: # %label1
4608 ; CHECK-NEXT: movi16 a0, 1
4610 ; CHECK-NEXT: .LBB96_2: # %label2
4611 ; CHECK-NEXT: movi16 a0, 0
4614 ; GENERIC-LABEL: brRR_i8_uge:
4615 ; GENERIC: # %bb.0: # %entry
4616 ; GENERIC-NEXT: .cfi_def_cfa_offset 0
4617 ; GENERIC-NEXT: subi16 sp, sp, 4
4618 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
4619 ; GENERIC-NEXT: movi16 a2, 255
4620 ; GENERIC-NEXT: and16 a0, a2
4621 ; GENERIC-NEXT: and16 a1, a2
4622 ; GENERIC-NEXT: cmphs16 a1, a0
4623 ; GENERIC-NEXT: bf16 .LBB96_2
4624 ; GENERIC-NEXT: # %bb.1: # %label1
4625 ; GENERIC-NEXT: movi16 a0, 1
4626 ; GENERIC-NEXT: addi16 sp, sp, 4
4627 ; GENERIC-NEXT: rts16
4628 ; GENERIC-NEXT: .LBB96_2: # %label2
4629 ; GENERIC-NEXT: movi16 a0, 0
4630 ; GENERIC-NEXT: addi16 sp, sp, 4
4631 ; GENERIC-NEXT: rts16
4632 ; CHECK-UGTXT: icmpu32 a0, a1, a0
4633 ; CHECK-UGTXT: rts16
4635 %icmp = icmp uge i8 %y, %x
4636 br i1 %icmp, label %label1, label %label2
4643 define i8 @brRI_i8_uge(i8 %x) {
4644 ; CHECK-LABEL: brRI_i8_uge:
4645 ; CHECK: # %bb.0: # %entry
4646 ; CHECK-NEXT: zextb16 a0, a0
4647 ; CHECK-NEXT: cmphsi16 a0, 10
4648 ; CHECK-NEXT: bf32 .LBB97_2
4649 ; CHECK-NEXT: # %bb.1: # %label1
4650 ; CHECK-NEXT: movi16 a0, 1
4652 ; CHECK-NEXT: .LBB97_2: # %label2
4653 ; CHECK-NEXT: movi16 a0, 0
4656 ; GENERIC-LABEL: brRI_i8_uge:
4657 ; GENERIC: # %bb.0: # %entry
4658 ; GENERIC-NEXT: .cfi_def_cfa_offset 0
4659 ; GENERIC-NEXT: subi16 sp, sp, 4
4660 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
4661 ; GENERIC-NEXT: movi16 a1, 255
4662 ; GENERIC-NEXT: and16 a1, a0
4663 ; GENERIC-NEXT: cmphsi16 a1, 10
4664 ; GENERIC-NEXT: bf16 .LBB97_2
4665 ; GENERIC-NEXT: # %bb.1: # %label1
4666 ; GENERIC-NEXT: movi16 a0, 1
4667 ; GENERIC-NEXT: addi16 sp, sp, 4
4668 ; GENERIC-NEXT: rts16
4669 ; GENERIC-NEXT: .LBB97_2: # %label2
4670 ; GENERIC-NEXT: movi16 a0, 0
4671 ; GENERIC-NEXT: addi16 sp, sp, 4
4672 ; GENERIC-NEXT: rts16
4673 ; CHECK-UGTXT: icmpu32 a0, a1, a0
4674 ; CHECK-UGTXT: rts16
4676 %icmp = icmp uge i8 %x, 10
4677 br i1 %icmp, label %label1, label %label2
4685 define i8 @brRR_i8_ult(i8 %x, i8 %y) {
4686 ; CHECK-LABEL: brRR_i8_ult:
4687 ; CHECK: # %bb.0: # %entry
4688 ; CHECK-NEXT: zextb16 a0, a0
4689 ; CHECK-NEXT: zextb16 a1, a1
4690 ; CHECK-NEXT: cmphs16 a1, a0
4691 ; CHECK-NEXT: bt32 .LBB98_2
4692 ; CHECK-NEXT: # %bb.1: # %label1
4693 ; CHECK-NEXT: movi16 a0, 1
4695 ; CHECK-NEXT: .LBB98_2: # %label2
4696 ; CHECK-NEXT: movi16 a0, 0
4699 ; GENERIC-LABEL: brRR_i8_ult:
4700 ; GENERIC: # %bb.0: # %entry
4701 ; GENERIC-NEXT: .cfi_def_cfa_offset 0
4702 ; GENERIC-NEXT: subi16 sp, sp, 4
4703 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
4704 ; GENERIC-NEXT: movi16 a2, 255
4705 ; GENERIC-NEXT: and16 a0, a2
4706 ; GENERIC-NEXT: and16 a1, a2
4707 ; GENERIC-NEXT: cmphs16 a1, a0
4708 ; GENERIC-NEXT: bt16 .LBB98_2
4709 ; GENERIC-NEXT: # %bb.1: # %label1
4710 ; GENERIC-NEXT: movi16 a0, 1
4711 ; GENERIC-NEXT: addi16 sp, sp, 4
4712 ; GENERIC-NEXT: rts16
4713 ; GENERIC-NEXT: .LBB98_2: # %label2
4714 ; GENERIC-NEXT: movi16 a0, 0
4715 ; GENERIC-NEXT: addi16 sp, sp, 4
4716 ; GENERIC-NEXT: rts16
4717 ; CHECK-UGTXT: icmpu32 a0, a1, a0
4718 ; CHECK-UGTXT: rts16
4720 %icmp = icmp ult i8 %y, %x
4721 br i1 %icmp, label %label1, label %label2
4728 define i8 @brRI_i8_ult(i8 %x) {
4729 ; CHECK-LABEL: brRI_i8_ult:
4730 ; CHECK: # %bb.0: # %entry
4731 ; CHECK-NEXT: zextb16 a0, a0
4732 ; CHECK-NEXT: movi16 a1, 9
4733 ; CHECK-NEXT: cmphs16 a1, a0
4734 ; CHECK-NEXT: bf32 .LBB99_2
4735 ; CHECK-NEXT: # %bb.1: # %label1
4736 ; CHECK-NEXT: movi16 a0, 1
4738 ; CHECK-NEXT: .LBB99_2: # %label2
4739 ; CHECK-NEXT: movi16 a0, 0
4742 ; GENERIC-LABEL: brRI_i8_ult:
4743 ; GENERIC: # %bb.0: # %entry
4744 ; GENERIC-NEXT: .cfi_def_cfa_offset 0
4745 ; GENERIC-NEXT: subi16 sp, sp, 4
4746 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
4747 ; GENERIC-NEXT: movi16 a1, 255
4748 ; GENERIC-NEXT: and16 a1, a0
4749 ; GENERIC-NEXT: movi16 a0, 9
4750 ; GENERIC-NEXT: cmphs16 a0, a1
4751 ; GENERIC-NEXT: bf16 .LBB99_2
4752 ; GENERIC-NEXT: # %bb.1: # %label1
4753 ; GENERIC-NEXT: movi16 a0, 1
4754 ; GENERIC-NEXT: addi16 sp, sp, 4
4755 ; GENERIC-NEXT: rts16
4756 ; GENERIC-NEXT: .LBB99_2: # %label2
4757 ; GENERIC-NEXT: movi16 a0, 0
4758 ; GENERIC-NEXT: addi16 sp, sp, 4
4759 ; GENERIC-NEXT: rts16
4760 ; CHECK-UGTXT: icmpu32 a0, a1, a0
4761 ; CHECK-UGTXT: rts16
4763 %icmp = icmp ult i8 %x, 10
4764 br i1 %icmp, label %label1, label %label2
4773 define i8 @brRR_i8_ule(i8 %x, i8 %y) {
4774 ; CHECK-LABEL: brRR_i8_ule:
4775 ; CHECK: # %bb.0: # %entry
4776 ; CHECK-NEXT: zextb16 a1, a1
4777 ; CHECK-NEXT: zextb16 a0, a0
4778 ; CHECK-NEXT: cmphs16 a0, a1
4779 ; CHECK-NEXT: bf32 .LBB100_2
4780 ; CHECK-NEXT: # %bb.1: # %label1
4781 ; CHECK-NEXT: movi16 a0, 1
4783 ; CHECK-NEXT: .LBB100_2: # %label2
4784 ; CHECK-NEXT: movi16 a0, 0
4787 ; GENERIC-LABEL: brRR_i8_ule:
4788 ; GENERIC: # %bb.0: # %entry
4789 ; GENERIC-NEXT: .cfi_def_cfa_offset 0
4790 ; GENERIC-NEXT: subi16 sp, sp, 4
4791 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
4792 ; GENERIC-NEXT: movi16 a2, 255
4793 ; GENERIC-NEXT: and16 a1, a2
4794 ; GENERIC-NEXT: and16 a0, a2
4795 ; GENERIC-NEXT: cmphs16 a0, a1
4796 ; GENERIC-NEXT: bf16 .LBB100_2
4797 ; GENERIC-NEXT: # %bb.1: # %label1
4798 ; GENERIC-NEXT: movi16 a0, 1
4799 ; GENERIC-NEXT: addi16 sp, sp, 4
4800 ; GENERIC-NEXT: rts16
4801 ; GENERIC-NEXT: .LBB100_2: # %label2
4802 ; GENERIC-NEXT: movi16 a0, 0
4803 ; GENERIC-NEXT: addi16 sp, sp, 4
4804 ; GENERIC-NEXT: rts16
4805 ; CHECK-UGTXT: icmpu32 a0, a1, a0
4806 ; CHECK-UGTXT: rts16
4808 %icmp = icmp ule i8 %y, %x
4809 br i1 %icmp, label %label1, label %label2
4816 define i8 @brRI_i8_ule(i8 %x) {
4817 ; CHECK-LABEL: brRI_i8_ule:
4818 ; CHECK: # %bb.0: # %entry
4819 ; CHECK-NEXT: zextb16 a0, a0
4820 ; CHECK-NEXT: movi16 a1, 10
4821 ; CHECK-NEXT: cmphs16 a1, a0
4822 ; CHECK-NEXT: bf32 .LBB101_2
4823 ; CHECK-NEXT: # %bb.1: # %label1
4824 ; CHECK-NEXT: movi16 a0, 1
4826 ; CHECK-NEXT: .LBB101_2: # %label2
4827 ; CHECK-NEXT: movi16 a0, 0
4830 ; GENERIC-LABEL: brRI_i8_ule:
4831 ; GENERIC: # %bb.0: # %entry
4832 ; GENERIC-NEXT: .cfi_def_cfa_offset 0
4833 ; GENERIC-NEXT: subi16 sp, sp, 4
4834 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
4835 ; GENERIC-NEXT: movi16 a1, 255
4836 ; GENERIC-NEXT: and16 a1, a0
4837 ; GENERIC-NEXT: movi16 a0, 10
4838 ; GENERIC-NEXT: cmphs16 a0, a1
4839 ; GENERIC-NEXT: bf16 .LBB101_2
4840 ; GENERIC-NEXT: # %bb.1: # %label1
4841 ; GENERIC-NEXT: movi16 a0, 1
4842 ; GENERIC-NEXT: addi16 sp, sp, 4
4843 ; GENERIC-NEXT: rts16
4844 ; GENERIC-NEXT: .LBB101_2: # %label2
4845 ; GENERIC-NEXT: movi16 a0, 0
4846 ; GENERIC-NEXT: addi16 sp, sp, 4
4847 ; GENERIC-NEXT: rts16
4848 ; CHECK-UGTXT: icmpu32 a0, a1, a0
4849 ; CHECK-UGTXT: rts16
4851 %icmp = icmp ule i8 %x, 10
4852 br i1 %icmp, label %label1, label %label2
4859 define i8 @brR0_i8_ule(i8 %x) {
4860 ; CHECK-LABEL: brR0_i8_ule:
4861 ; CHECK: # %bb.0: # %entry
4862 ; CHECK-NEXT: zextb16 a0, a0
4863 ; CHECK-NEXT: bnez32 a0, .LBB102_2
4864 ; CHECK-NEXT: # %bb.1: # %label1
4865 ; CHECK-NEXT: movi16 a0, 1
4867 ; CHECK-NEXT: .LBB102_2: # %label2
4868 ; CHECK-NEXT: movi16 a0, 0
4871 ; GENERIC-LABEL: brR0_i8_ule:
4872 ; GENERIC: # %bb.0: # %entry
4873 ; GENERIC-NEXT: .cfi_def_cfa_offset 0
4874 ; GENERIC-NEXT: subi16 sp, sp, 4
4875 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
4876 ; GENERIC-NEXT: movi16 a1, 255
4877 ; GENERIC-NEXT: and16 a1, a0
4878 ; GENERIC-NEXT: cmpnei16 a1, 0
4879 ; GENERIC-NEXT: bt16 .LBB102_2
4880 ; GENERIC-NEXT: # %bb.1: # %label1
4881 ; GENERIC-NEXT: movi16 a0, 1
4882 ; GENERIC-NEXT: addi16 sp, sp, 4
4883 ; GENERIC-NEXT: rts16
4884 ; GENERIC-NEXT: .LBB102_2: # %label2
4885 ; GENERIC-NEXT: movi16 a0, 0
4886 ; GENERIC-NEXT: addi16 sp, sp, 4
4887 ; GENERIC-NEXT: rts16
4888 ; CHECK-UGTXT: icmpu32 a0, a1, a0
4889 ; CHECK-UGTXT: rts16
4891 %icmp = icmp ule i8 %x, 0
4892 br i1 %icmp, label %label1, label %label2
4900 define i8 @brRR_i8_sgt(i8 %x, i8 %y) {
4901 ; CHECK-LABEL: brRR_i8_sgt:
4902 ; CHECK: # %bb.0: # %entry
4903 ; CHECK-NEXT: sextb16 a1, a1
4904 ; CHECK-NEXT: sextb16 a0, a0
4905 ; CHECK-NEXT: cmplt16 a0, a1
4906 ; CHECK-NEXT: bf32 .LBB103_2
4907 ; CHECK-NEXT: # %bb.1: # %label1
4908 ; CHECK-NEXT: movi16 a0, 1
4910 ; CHECK-NEXT: .LBB103_2: # %label2
4911 ; CHECK-NEXT: movi16 a0, 0
4914 ; GENERIC-LABEL: brRR_i8_sgt:
4915 ; GENERIC: # %bb.0: # %entry
4916 ; GENERIC-NEXT: .cfi_def_cfa_offset 0
4917 ; GENERIC-NEXT: subi16 sp, sp, 4
4918 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
4919 ; GENERIC-NEXT: sextb16 a1, a1
4920 ; GENERIC-NEXT: sextb16 a0, a0
4921 ; GENERIC-NEXT: cmplt16 a0, a1
4922 ; GENERIC-NEXT: bf16 .LBB103_2
4923 ; GENERIC-NEXT: # %bb.1: # %label1
4924 ; GENERIC-NEXT: movi16 a0, 1
4925 ; GENERIC-NEXT: addi16 sp, sp, 4
4926 ; GENERIC-NEXT: rts16
4927 ; GENERIC-NEXT: .LBB103_2: # %label2
4928 ; GENERIC-NEXT: movi16 a0, 0
4929 ; GENERIC-NEXT: addi16 sp, sp, 4
4930 ; GENERIC-NEXT: rts16
4931 ; CHECK-UGTXT: icmpu32 a0, a1, a0
4932 ; CHECK-UGTXT: rts16
4934 %icmp = icmp sgt i8 %y, %x
4935 br i1 %icmp, label %label1, label %label2
4942 define i8 @brRI_i8_sgt(i8 %x) {
4943 ; CHECK-LABEL: brRI_i8_sgt:
4944 ; CHECK: # %bb.0: # %entry
4945 ; CHECK-NEXT: sextb16 a0, a0
4946 ; CHECK-NEXT: cmplti16 a0, 11
4947 ; CHECK-NEXT: bt32 .LBB104_2
4948 ; CHECK-NEXT: # %bb.1: # %label1
4949 ; CHECK-NEXT: movi16 a0, 1
4951 ; CHECK-NEXT: .LBB104_2: # %label2
4952 ; CHECK-NEXT: movi16 a0, 0
4955 ; GENERIC-LABEL: brRI_i8_sgt:
4956 ; GENERIC: # %bb.0: # %entry
4957 ; GENERIC-NEXT: .cfi_def_cfa_offset 0
4958 ; GENERIC-NEXT: subi16 sp, sp, 4
4959 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
4960 ; GENERIC-NEXT: sextb16 a0, a0
4961 ; GENERIC-NEXT: cmplti16 a0, 11
4962 ; GENERIC-NEXT: bt16 .LBB104_2
4963 ; GENERIC-NEXT: # %bb.1: # %label1
4964 ; GENERIC-NEXT: movi16 a0, 1
4965 ; GENERIC-NEXT: addi16 sp, sp, 4
4966 ; GENERIC-NEXT: rts16
4967 ; GENERIC-NEXT: .LBB104_2: # %label2
4968 ; GENERIC-NEXT: movi16 a0, 0
4969 ; GENERIC-NEXT: addi16 sp, sp, 4
4970 ; GENERIC-NEXT: rts16
4971 ; CHECK-UGTXT: icmpu32 a0, a1, a0
4972 ; CHECK-UGTXT: rts16
4974 %icmp = icmp sgt i8 %x, 10
4975 br i1 %icmp, label %label1, label %label2
4982 define i8 @brR0_i8_sgt(i8 %x) {
4983 ; CHECK-LABEL: brR0_i8_sgt:
4984 ; CHECK: # %bb.0: # %entry
4985 ; CHECK-NEXT: sextb16 a0, a0
4986 ; CHECK-NEXT: blsz32 a0, .LBB105_2
4987 ; CHECK-NEXT: # %bb.1: # %label1
4988 ; CHECK-NEXT: movi16 a0, 1
4990 ; CHECK-NEXT: .LBB105_2: # %label2
4991 ; CHECK-NEXT: movi16 a0, 0
4994 ; GENERIC-LABEL: brR0_i8_sgt:
4995 ; GENERIC: # %bb.0: # %entry
4996 ; GENERIC-NEXT: .cfi_def_cfa_offset 0
4997 ; GENERIC-NEXT: subi16 sp, sp, 4
4998 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
4999 ; GENERIC-NEXT: sextb16 a0, a0
5000 ; GENERIC-NEXT: cmplti16 a0, 1
5001 ; GENERIC-NEXT: bt16 .LBB105_2
5002 ; GENERIC-NEXT: # %bb.1: # %label1
5003 ; GENERIC-NEXT: movi16 a0, 1
5004 ; GENERIC-NEXT: addi16 sp, sp, 4
5005 ; GENERIC-NEXT: rts16
5006 ; GENERIC-NEXT: .LBB105_2: # %label2
5007 ; GENERIC-NEXT: movi16 a0, 0
5008 ; GENERIC-NEXT: addi16 sp, sp, 4
5009 ; GENERIC-NEXT: rts16
5010 ; CHECK-UGTXT: icmpu32 a0, a1, a0
5011 ; CHECK-UGTXT: rts16
5013 %icmp = icmp sgt i8 %x, 0
5014 br i1 %icmp, label %label1, label %label2
5022 define i8 @brRR_i8_sge(i8 %x, i8 %y) {
5023 ; CHECK-LABEL: brRR_i8_sge:
5024 ; CHECK: # %bb.0: # %entry
5025 ; CHECK-NEXT: sextb16 a0, a0
5026 ; CHECK-NEXT: sextb16 a1, a1
5027 ; CHECK-NEXT: cmplt16 a1, a0
5028 ; CHECK-NEXT: bt32 .LBB106_2
5029 ; CHECK-NEXT: # %bb.1: # %label1
5030 ; CHECK-NEXT: movi16 a0, 1
5032 ; CHECK-NEXT: .LBB106_2: # %label2
5033 ; CHECK-NEXT: movi16 a0, 0
5036 ; GENERIC-LABEL: brRR_i8_sge:
5037 ; GENERIC: # %bb.0: # %entry
5038 ; GENERIC-NEXT: .cfi_def_cfa_offset 0
5039 ; GENERIC-NEXT: subi16 sp, sp, 4
5040 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
5041 ; GENERIC-NEXT: sextb16 a0, a0
5042 ; GENERIC-NEXT: sextb16 a1, a1
5043 ; GENERIC-NEXT: cmplt16 a1, a0
5044 ; GENERIC-NEXT: bt16 .LBB106_2
5045 ; GENERIC-NEXT: # %bb.1: # %label1
5046 ; GENERIC-NEXT: movi16 a0, 1
5047 ; GENERIC-NEXT: addi16 sp, sp, 4
5048 ; GENERIC-NEXT: rts16
5049 ; GENERIC-NEXT: .LBB106_2: # %label2
5050 ; GENERIC-NEXT: movi16 a0, 0
5051 ; GENERIC-NEXT: addi16 sp, sp, 4
5052 ; GENERIC-NEXT: rts16
5053 ; CHECK-UGTXT: icmpu32 a0, a1, a0
5054 ; CHECK-UGTXT: rts16
5056 %icmp = icmp sge i8 %y, %x
5057 br i1 %icmp, label %label1, label %label2
5064 define i8 @brRI_i8_sge(i8 %x) {
5065 ; CHECK-LABEL: brRI_i8_sge:
5066 ; CHECK: # %bb.0: # %entry
5067 ; CHECK-NEXT: sextb16 a0, a0
5068 ; CHECK-NEXT: cmplti16 a0, 10
5069 ; CHECK-NEXT: bt32 .LBB107_2
5070 ; CHECK-NEXT: # %bb.1: # %label1
5071 ; CHECK-NEXT: movi16 a0, 1
5073 ; CHECK-NEXT: .LBB107_2: # %label2
5074 ; CHECK-NEXT: movi16 a0, 0
5077 ; GENERIC-LABEL: brRI_i8_sge:
5078 ; GENERIC: # %bb.0: # %entry
5079 ; GENERIC-NEXT: .cfi_def_cfa_offset 0
5080 ; GENERIC-NEXT: subi16 sp, sp, 4
5081 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
5082 ; GENERIC-NEXT: sextb16 a0, a0
5083 ; GENERIC-NEXT: cmplti16 a0, 10
5084 ; GENERIC-NEXT: bt16 .LBB107_2
5085 ; GENERIC-NEXT: # %bb.1: # %label1
5086 ; GENERIC-NEXT: movi16 a0, 1
5087 ; GENERIC-NEXT: addi16 sp, sp, 4
5088 ; GENERIC-NEXT: rts16
5089 ; GENERIC-NEXT: .LBB107_2: # %label2
5090 ; GENERIC-NEXT: movi16 a0, 0
5091 ; GENERIC-NEXT: addi16 sp, sp, 4
5092 ; GENERIC-NEXT: rts16
5093 ; CHECK-UGTXT: icmpu32 a0, a1, a0
5094 ; CHECK-UGTXT: rts16
5096 %icmp = icmp sge i8 %x, 10
5097 br i1 %icmp, label %label1, label %label2
5104 define i8 @brR0_i8_sge(i8 %x) {
5105 ; CHECK-LABEL: brR0_i8_sge:
5106 ; CHECK: # %bb.0: # %entry
5107 ; CHECK-NEXT: sextb16 a0, a0
5108 ; CHECK-NEXT: blz32 a0, .LBB108_2
5109 ; CHECK-NEXT: # %bb.1: # %label1
5110 ; CHECK-NEXT: movi16 a0, 1
5112 ; CHECK-NEXT: .LBB108_2: # %label2
5113 ; CHECK-NEXT: movi16 a0, 0
5116 ; GENERIC-LABEL: brR0_i8_sge:
5117 ; GENERIC: # %bb.0: # %entry
5118 ; GENERIC-NEXT: .cfi_def_cfa_offset 0
5119 ; GENERIC-NEXT: subi16 sp, sp, 4
5120 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
5121 ; GENERIC-NEXT: sextb16 a0, a0
5122 ; GENERIC-NEXT: movi16 a1, 0
5123 ; GENERIC-NEXT: cmplt16 a0, a1
5124 ; GENERIC-NEXT: bt16 .LBB108_2
5125 ; GENERIC-NEXT: # %bb.1: # %label1
5126 ; GENERIC-NEXT: movi16 a0, 1
5127 ; GENERIC-NEXT: addi16 sp, sp, 4
5128 ; GENERIC-NEXT: rts16
5129 ; GENERIC-NEXT: .LBB108_2: # %label2
5130 ; GENERIC-NEXT: movi16 a0, 0
5131 ; GENERIC-NEXT: addi16 sp, sp, 4
5132 ; GENERIC-NEXT: rts16
5133 ; CHECK-UGTXT: icmpu32 a0, a1, a0
5134 ; CHECK-UGTXT: rts16
5136 %icmp = icmp sge i8 %x, 0
5137 br i1 %icmp, label %label1, label %label2
5145 define i8 @brRR_i8_slt(i8 %x, i8 %y) {
5146 ; CHECK-LABEL: brRR_i8_slt:
5147 ; CHECK: # %bb.0: # %entry
5148 ; CHECK-NEXT: sextb16 a0, a0
5149 ; CHECK-NEXT: sextb16 a1, a1
5150 ; CHECK-NEXT: cmplt16 a1, a0
5151 ; CHECK-NEXT: bf32 .LBB109_2
5152 ; CHECK-NEXT: # %bb.1: # %label1
5153 ; CHECK-NEXT: movi16 a0, 1
5155 ; CHECK-NEXT: .LBB109_2: # %label2
5156 ; CHECK-NEXT: movi16 a0, 0
5159 ; GENERIC-LABEL: brRR_i8_slt:
5160 ; GENERIC: # %bb.0: # %entry
5161 ; GENERIC-NEXT: .cfi_def_cfa_offset 0
5162 ; GENERIC-NEXT: subi16 sp, sp, 4
5163 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
5164 ; GENERIC-NEXT: sextb16 a0, a0
5165 ; GENERIC-NEXT: sextb16 a1, a1
5166 ; GENERIC-NEXT: cmplt16 a1, a0
5167 ; GENERIC-NEXT: bf16 .LBB109_2
5168 ; GENERIC-NEXT: # %bb.1: # %label1
5169 ; GENERIC-NEXT: movi16 a0, 1
5170 ; GENERIC-NEXT: addi16 sp, sp, 4
5171 ; GENERIC-NEXT: rts16
5172 ; GENERIC-NEXT: .LBB109_2: # %label2
5173 ; GENERIC-NEXT: movi16 a0, 0
5174 ; GENERIC-NEXT: addi16 sp, sp, 4
5175 ; GENERIC-NEXT: rts16
5176 ; CHECK-UGTXT: icmpu32 a0, a1, a0
5177 ; CHECK-UGTXT: rts16
5179 %icmp = icmp slt i8 %y, %x
5180 br i1 %icmp, label %label1, label %label2
5187 define i8 @brRI_i8_slt(i8 %x) {
5188 ; CHECK-LABEL: brRI_i8_slt:
5189 ; CHECK: # %bb.0: # %entry
5190 ; CHECK-NEXT: sextb16 a0, a0
5191 ; CHECK-NEXT: movi16 a1, 9
5192 ; CHECK-NEXT: cmplt16 a1, a0
5193 ; CHECK-NEXT: bt32 .LBB110_2
5194 ; CHECK-NEXT: # %bb.1: # %label1
5195 ; CHECK-NEXT: movi16 a0, 1
5197 ; CHECK-NEXT: .LBB110_2: # %label2
5198 ; CHECK-NEXT: movi16 a0, 0
5201 ; GENERIC-LABEL: brRI_i8_slt:
5202 ; GENERIC: # %bb.0: # %entry
5203 ; GENERIC-NEXT: .cfi_def_cfa_offset 0
5204 ; GENERIC-NEXT: subi16 sp, sp, 4
5205 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
5206 ; GENERIC-NEXT: sextb16 a0, a0
5207 ; GENERIC-NEXT: movi16 a1, 9
5208 ; GENERIC-NEXT: cmplt16 a1, a0
5209 ; GENERIC-NEXT: bt16 .LBB110_2
5210 ; GENERIC-NEXT: # %bb.1: # %label1
5211 ; GENERIC-NEXT: movi16 a0, 1
5212 ; GENERIC-NEXT: addi16 sp, sp, 4
5213 ; GENERIC-NEXT: rts16
5214 ; GENERIC-NEXT: .LBB110_2: # %label2
5215 ; GENERIC-NEXT: movi16 a0, 0
5216 ; GENERIC-NEXT: addi16 sp, sp, 4
5217 ; GENERIC-NEXT: rts16
5218 ; CHECK-UGTXT: icmpu32 a0, a1, a0
5219 ; CHECK-UGTXT: rts16
5221 %icmp = icmp slt i8 %x, 10
5222 br i1 %icmp, label %label1, label %label2
5229 define i8 @brR0_i8_slt(i8 %x) {
5230 ; CHECK-LABEL: brR0_i8_slt:
5231 ; CHECK: # %bb.0: # %entry
5232 ; CHECK-NEXT: sextb16 a0, a0
5233 ; CHECK-NEXT: blz32 a0, .LBB111_2
5234 ; CHECK-NEXT: # %bb.1: # %label2
5235 ; CHECK-NEXT: movi16 a0, 0
5237 ; CHECK-NEXT: .LBB111_2: # %label1
5238 ; CHECK-NEXT: movi16 a0, 1
5241 ; GENERIC-LABEL: brR0_i8_slt:
5242 ; GENERIC: # %bb.0: # %entry
5243 ; GENERIC-NEXT: .cfi_def_cfa_offset 0
5244 ; GENERIC-NEXT: subi16 sp, sp, 4
5245 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
5246 ; GENERIC-NEXT: sextb16 a0, a0
5247 ; GENERIC-NEXT: movi16 a1, 255
5248 ; GENERIC-NEXT: lsli16 a2, a1, 24
5249 ; GENERIC-NEXT: lsli16 a3, a1, 16
5250 ; GENERIC-NEXT: or16 a3, a2
5251 ; GENERIC-NEXT: lsli16 a2, a1, 8
5252 ; GENERIC-NEXT: or16 a2, a3
5253 ; GENERIC-NEXT: or16 a2, a1
5254 ; GENERIC-NEXT: cmplt16 a2, a0
5255 ; GENERIC-NEXT: bf16 .LBB111_2
5256 ; GENERIC-NEXT: # %bb.1: # %label2
5257 ; GENERIC-NEXT: movi16 a0, 0
5258 ; GENERIC-NEXT: addi16 sp, sp, 4
5259 ; GENERIC-NEXT: rts16
5260 ; GENERIC-NEXT: .LBB111_2: # %label1
5261 ; GENERIC-NEXT: movi16 a0, 1
5262 ; GENERIC-NEXT: addi16 sp, sp, 4
5263 ; GENERIC-NEXT: rts16
5264 ; CHECK-UGTXT: icmpu32 a0, a1, a0
5265 ; CHECK-UGTXT: rts16
5267 %icmp = icmp slt i8 %x, 0
5268 br i1 %icmp, label %label1, label %label2
5276 define i8 @brRR_i8_sle(i8 %x, i8 %y) {
5277 ; CHECK-LABEL: brRR_i8_sle:
5278 ; CHECK: # %bb.0: # %entry
5279 ; CHECK-NEXT: sextb16 a1, a1
5280 ; CHECK-NEXT: sextb16 a0, a0
5281 ; CHECK-NEXT: cmplt16 a0, a1
5282 ; CHECK-NEXT: bt32 .LBB112_2
5283 ; CHECK-NEXT: # %bb.1: # %label1
5284 ; CHECK-NEXT: movi16 a0, 1
5286 ; CHECK-NEXT: .LBB112_2: # %label2
5287 ; CHECK-NEXT: movi16 a0, 0
5290 ; GENERIC-LABEL: brRR_i8_sle:
5291 ; GENERIC: # %bb.0: # %entry
5292 ; GENERIC-NEXT: .cfi_def_cfa_offset 0
5293 ; GENERIC-NEXT: subi16 sp, sp, 4
5294 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
5295 ; GENERIC-NEXT: sextb16 a1, a1
5296 ; GENERIC-NEXT: sextb16 a0, a0
5297 ; GENERIC-NEXT: cmplt16 a0, a1
5298 ; GENERIC-NEXT: bt16 .LBB112_2
5299 ; GENERIC-NEXT: # %bb.1: # %label1
5300 ; GENERIC-NEXT: movi16 a0, 1
5301 ; GENERIC-NEXT: addi16 sp, sp, 4
5302 ; GENERIC-NEXT: rts16
5303 ; GENERIC-NEXT: .LBB112_2: # %label2
5304 ; GENERIC-NEXT: movi16 a0, 0
5305 ; GENERIC-NEXT: addi16 sp, sp, 4
5306 ; GENERIC-NEXT: rts16
5307 ; CHECK-UGTXT: icmpu32 a0, a1, a0
5308 ; CHECK-UGTXT: rts16
5310 %icmp = icmp sle i8 %y, %x
5311 br i1 %icmp, label %label1, label %label2
5318 define i8 @brRI_i8_sle(i8 %x) {
5319 ; CHECK-LABEL: brRI_i8_sle:
5320 ; CHECK: # %bb.0: # %entry
5321 ; CHECK-NEXT: sextb16 a0, a0
5322 ; CHECK-NEXT: movi16 a1, 10
5323 ; CHECK-NEXT: cmplt16 a1, a0
5324 ; CHECK-NEXT: bt32 .LBB113_2
5325 ; CHECK-NEXT: # %bb.1: # %label1
5326 ; CHECK-NEXT: movi16 a0, 1
5328 ; CHECK-NEXT: .LBB113_2: # %label2
5329 ; CHECK-NEXT: movi16 a0, 0
5332 ; GENERIC-LABEL: brRI_i8_sle:
5333 ; GENERIC: # %bb.0: # %entry
5334 ; GENERIC-NEXT: .cfi_def_cfa_offset 0
5335 ; GENERIC-NEXT: subi16 sp, sp, 4
5336 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
5337 ; GENERIC-NEXT: sextb16 a0, a0
5338 ; GENERIC-NEXT: movi16 a1, 10
5339 ; GENERIC-NEXT: cmplt16 a1, a0
5340 ; GENERIC-NEXT: bt16 .LBB113_2
5341 ; GENERIC-NEXT: # %bb.1: # %label1
5342 ; GENERIC-NEXT: movi16 a0, 1
5343 ; GENERIC-NEXT: addi16 sp, sp, 4
5344 ; GENERIC-NEXT: rts16
5345 ; GENERIC-NEXT: .LBB113_2: # %label2
5346 ; GENERIC-NEXT: movi16 a0, 0
5347 ; GENERIC-NEXT: addi16 sp, sp, 4
5348 ; GENERIC-NEXT: rts16
5349 ; CHECK-UGTXT: icmpu32 a0, a1, a0
5350 ; CHECK-UGTXT: rts16
5352 %icmp = icmp sle i8 %x, 10
5353 br i1 %icmp, label %label1, label %label2
5360 define i8 @brR0_i8_sle(i8 %x) {
5361 ; CHECK-LABEL: brR0_i8_sle:
5362 ; CHECK: # %bb.0: # %entry
5363 ; CHECK-NEXT: sextb16 a0, a0
5364 ; CHECK-NEXT: bhz32 a0, .LBB114_2
5365 ; CHECK-NEXT: # %bb.1: # %label1
5366 ; CHECK-NEXT: movi16 a0, 1
5368 ; CHECK-NEXT: .LBB114_2: # %label2
5369 ; CHECK-NEXT: movi16 a0, 0
5372 ; GENERIC-LABEL: brR0_i8_sle:
5373 ; GENERIC: # %bb.0: # %entry
5374 ; GENERIC-NEXT: .cfi_def_cfa_offset 0
5375 ; GENERIC-NEXT: subi16 sp, sp, 4
5376 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
5377 ; GENERIC-NEXT: sextb16 a0, a0
5378 ; GENERIC-NEXT: movi16 a1, 0
5379 ; GENERIC-NEXT: cmplt16 a1, a0
5380 ; GENERIC-NEXT: bt16 .LBB114_2
5381 ; GENERIC-NEXT: # %bb.1: # %label1
5382 ; GENERIC-NEXT: movi16 a0, 1
5383 ; GENERIC-NEXT: addi16 sp, sp, 4
5384 ; GENERIC-NEXT: rts16
5385 ; GENERIC-NEXT: .LBB114_2: # %label2
5386 ; GENERIC-NEXT: movi16 a0, 0
5387 ; GENERIC-NEXT: addi16 sp, sp, 4
5388 ; GENERIC-NEXT: rts16
5389 ; CHECK-UGTXT: icmpu32 a0, a1, a0
5390 ; CHECK-UGTXT: rts16
5392 %icmp = icmp sle i8 %x, 0
5393 br i1 %icmp, label %label1, label %label2
5401 define i8 @brCBit_i8(i1 %c) {
5402 ; CHECK-LABEL: brCBit_i8:
5403 ; CHECK: # %bb.0: # %entry
5404 ; CHECK-NEXT: andi32 a0, a0, 1
5405 ; CHECK-NEXT: bez32 a0, .LBB115_2
5406 ; CHECK-NEXT: # %bb.1: # %label1
5407 ; CHECK-NEXT: movi16 a0, 1
5409 ; CHECK-NEXT: .LBB115_2: # %label2
5410 ; CHECK-NEXT: movi16 a0, 0
5413 ; GENERIC-LABEL: brCBit_i8:
5414 ; GENERIC: # %bb.0: # %entry
5415 ; GENERIC-NEXT: .cfi_def_cfa_offset 0
5416 ; GENERIC-NEXT: subi16 sp, sp, 4
5417 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
5418 ; GENERIC-NEXT: movi16 a1, 1
5419 ; GENERIC-NEXT: and16 a1, a0
5420 ; GENERIC-NEXT: cmpnei16 a1, 0
5421 ; GENERIC-NEXT: bf16 .LBB115_2
5422 ; GENERIC-NEXT: # %bb.1: # %label1
5423 ; GENERIC-NEXT: movi16 a0, 1
5424 ; GENERIC-NEXT: addi16 sp, sp, 4
5425 ; GENERIC-NEXT: rts16
5426 ; GENERIC-NEXT: .LBB115_2: # %label2
5427 ; GENERIC-NEXT: movi16 a0, 0
5428 ; GENERIC-NEXT: addi16 sp, sp, 4
5429 ; GENERIC-NEXT: rts16
5431 br i1 %c, label %label1, label %label2
5440 define i1 @brRR_i1_eq(i1 %x, i1 %y) {
5441 ; CHECK-LABEL: brRR_i1_eq:
5442 ; CHECK: # %bb.0: # %entry
5443 ; CHECK-NEXT: andi32 a0, a0, 1
5444 ; CHECK-NEXT: andi32 a1, a1, 1
5445 ; CHECK-NEXT: cmpne16 a1, a0
5446 ; CHECK-NEXT: bt32 .LBB116_2
5447 ; CHECK-NEXT: # %bb.1: # %label1
5448 ; CHECK-NEXT: movi16 a0, 1
5450 ; CHECK-NEXT: .LBB116_2: # %label2
5451 ; CHECK-NEXT: movi16 a0, 0
5454 ; GENERIC-LABEL: brRR_i1_eq:
5455 ; GENERIC: # %bb.0: # %entry
5456 ; GENERIC-NEXT: .cfi_def_cfa_offset 0
5457 ; GENERIC-NEXT: subi16 sp, sp, 4
5458 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
5459 ; GENERIC-NEXT: movi16 a2, 1
5460 ; GENERIC-NEXT: and16 a0, a2
5461 ; GENERIC-NEXT: and16 a1, a2
5462 ; GENERIC-NEXT: cmpne16 a1, a0
5463 ; GENERIC-NEXT: bt16 .LBB116_2
5464 ; GENERIC-NEXT: # %bb.1: # %label1
5465 ; GENERIC-NEXT: movi16 a0, 1
5466 ; GENERIC-NEXT: addi16 sp, sp, 4
5467 ; GENERIC-NEXT: rts16
5468 ; GENERIC-NEXT: .LBB116_2: # %label2
5469 ; GENERIC-NEXT: movi16 a0, 0
5470 ; GENERIC-NEXT: addi16 sp, sp, 4
5471 ; GENERIC-NEXT: rts16
5473 %icmp = icmp eq i1 %y, %x
5474 br i1 %icmp, label %label1, label %label2
5481 define i1 @brRI_i1_eq(i1 %x) {
5482 ; CHECK-LABEL: brRI_i1_eq:
5483 ; CHECK: # %bb.0: # %entry
5484 ; CHECK-NEXT: andi32 a0, a0, 1
5485 ; CHECK-NEXT: btsti16 a0, 0
5486 ; CHECK-NEXT: bf32 .LBB117_2
5487 ; CHECK-NEXT: # %bb.1: # %label2
5488 ; CHECK-NEXT: movi16 a0, 0
5490 ; CHECK-NEXT: .LBB117_2: # %label1
5491 ; CHECK-NEXT: movi16 a0, 1
5494 ; GENERIC-LABEL: brRI_i1_eq:
5495 ; GENERIC: # %bb.0: # %entry
5496 ; GENERIC-NEXT: .cfi_def_cfa_offset 0
5497 ; GENERIC-NEXT: subi16 sp, sp, 4
5498 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
5499 ; GENERIC-NEXT: movi16 a1, 1
5500 ; GENERIC-NEXT: and16 a1, a0
5501 ; GENERIC-NEXT: btsti16 a1, 0
5502 ; GENERIC-NEXT: bf16 .LBB117_2
5503 ; GENERIC-NEXT: # %bb.1: # %label2
5504 ; GENERIC-NEXT: movi16 a0, 0
5505 ; GENERIC-NEXT: addi16 sp, sp, 4
5506 ; GENERIC-NEXT: rts16
5507 ; GENERIC-NEXT: .LBB117_2: # %label1
5508 ; GENERIC-NEXT: movi16 a0, 1
5509 ; GENERIC-NEXT: addi16 sp, sp, 4
5510 ; GENERIC-NEXT: rts16
5512 %icmp = icmp eq i1 %x, 10
5513 br i1 %icmp, label %label1, label %label2
5520 define i1 @brR0_i1_eq(i1 %x) {
5521 ; CHECK-LABEL: brR0_i1_eq:
5522 ; CHECK: # %bb.0: # %entry
5523 ; CHECK-NEXT: andi32 a0, a0, 1
5524 ; CHECK-NEXT: btsti16 a0, 0
5525 ; CHECK-NEXT: bf32 .LBB118_2
5526 ; CHECK-NEXT: # %bb.1: # %label2
5527 ; CHECK-NEXT: movi16 a0, 0
5529 ; CHECK-NEXT: .LBB118_2: # %label1
5530 ; CHECK-NEXT: movi16 a0, 1
5533 ; GENERIC-LABEL: brR0_i1_eq:
5534 ; GENERIC: # %bb.0: # %entry
5535 ; GENERIC-NEXT: .cfi_def_cfa_offset 0
5536 ; GENERIC-NEXT: subi16 sp, sp, 4
5537 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
5538 ; GENERIC-NEXT: movi16 a1, 1
5539 ; GENERIC-NEXT: and16 a1, a0
5540 ; GENERIC-NEXT: btsti16 a1, 0
5541 ; GENERIC-NEXT: bf16 .LBB118_2
5542 ; GENERIC-NEXT: # %bb.1: # %label2
5543 ; GENERIC-NEXT: movi16 a0, 0
5544 ; GENERIC-NEXT: addi16 sp, sp, 4
5545 ; GENERIC-NEXT: rts16
5546 ; GENERIC-NEXT: .LBB118_2: # %label1
5547 ; GENERIC-NEXT: movi16 a0, 1
5548 ; GENERIC-NEXT: addi16 sp, sp, 4
5549 ; GENERIC-NEXT: rts16
5551 %icmp = icmp eq i1 %x, 0
5552 br i1 %icmp, label %label1, label %label2
5560 define i1 @brRR_i1_ne(i1 %x, i1 %y) {
5561 ; CHECK-LABEL: brRR_i1_ne:
5562 ; CHECK: # %bb.0: # %entry
5563 ; CHECK-NEXT: andi32 a0, a0, 1
5564 ; CHECK-NEXT: andi32 a1, a1, 1
5565 ; CHECK-NEXT: cmpne16 a1, a0
5566 ; CHECK-NEXT: bf32 .LBB119_2
5567 ; CHECK-NEXT: # %bb.1: # %label1
5568 ; CHECK-NEXT: movi16 a0, 1
5570 ; CHECK-NEXT: .LBB119_2: # %label2
5571 ; CHECK-NEXT: movi16 a0, 0
5574 ; GENERIC-LABEL: brRR_i1_ne:
5575 ; GENERIC: # %bb.0: # %entry
5576 ; GENERIC-NEXT: .cfi_def_cfa_offset 0
5577 ; GENERIC-NEXT: subi16 sp, sp, 4
5578 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
5579 ; GENERIC-NEXT: movi16 a2, 1
5580 ; GENERIC-NEXT: and16 a0, a2
5581 ; GENERIC-NEXT: and16 a1, a2
5582 ; GENERIC-NEXT: cmpne16 a1, a0
5583 ; GENERIC-NEXT: bf16 .LBB119_2
5584 ; GENERIC-NEXT: # %bb.1: # %label1
5585 ; GENERIC-NEXT: movi16 a0, 1
5586 ; GENERIC-NEXT: addi16 sp, sp, 4
5587 ; GENERIC-NEXT: rts16
5588 ; GENERIC-NEXT: .LBB119_2: # %label2
5589 ; GENERIC-NEXT: movi16 a0, 0
5590 ; GENERIC-NEXT: addi16 sp, sp, 4
5591 ; GENERIC-NEXT: rts16
5593 %icmp = icmp ne i1 %y, %x
5594 br i1 %icmp, label %label1, label %label2
5601 define i1 @brRI_i1_ne(i1 %x) {
5602 ; CHECK-LABEL: brRI_i1_ne:
5603 ; CHECK: # %bb.0: # %entry
5604 ; CHECK-NEXT: andi32 a0, a0, 1
5605 ; CHECK-NEXT: bez32 a0, .LBB120_2
5606 ; CHECK-NEXT: # %bb.1: # %label1
5607 ; CHECK-NEXT: movi16 a0, 1
5609 ; CHECK-NEXT: .LBB120_2: # %label2
5610 ; CHECK-NEXT: movi16 a0, 0
5613 ; GENERIC-LABEL: brRI_i1_ne:
5614 ; GENERIC: # %bb.0: # %entry
5615 ; GENERIC-NEXT: .cfi_def_cfa_offset 0
5616 ; GENERIC-NEXT: subi16 sp, sp, 4
5617 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
5618 ; GENERIC-NEXT: movi16 a1, 1
5619 ; GENERIC-NEXT: and16 a1, a0
5620 ; GENERIC-NEXT: cmpnei16 a1, 0
5621 ; GENERIC-NEXT: bf16 .LBB120_2
5622 ; GENERIC-NEXT: # %bb.1: # %label1
5623 ; GENERIC-NEXT: movi16 a0, 1
5624 ; GENERIC-NEXT: addi16 sp, sp, 4
5625 ; GENERIC-NEXT: rts16
5626 ; GENERIC-NEXT: .LBB120_2: # %label2
5627 ; GENERIC-NEXT: movi16 a0, 0
5628 ; GENERIC-NEXT: addi16 sp, sp, 4
5629 ; GENERIC-NEXT: rts16
5631 %icmp = icmp ne i1 %x, 10
5632 br i1 %icmp, label %label1, label %label2
5639 define i1 @brR0_i1_ne(i1 %x) {
5640 ; CHECK-LABEL: brR0_i1_ne:
5641 ; CHECK: # %bb.0: # %entry
5642 ; CHECK-NEXT: andi32 a0, a0, 1
5643 ; CHECK-NEXT: bez32 a0, .LBB121_2
5644 ; CHECK-NEXT: # %bb.1: # %label1
5645 ; CHECK-NEXT: movi16 a0, 1
5647 ; CHECK-NEXT: .LBB121_2: # %label2
5648 ; CHECK-NEXT: movi16 a0, 0
5651 ; GENERIC-LABEL: brR0_i1_ne:
5652 ; GENERIC: # %bb.0: # %entry
5653 ; GENERIC-NEXT: .cfi_def_cfa_offset 0
5654 ; GENERIC-NEXT: subi16 sp, sp, 4
5655 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
5656 ; GENERIC-NEXT: movi16 a1, 1
5657 ; GENERIC-NEXT: and16 a1, a0
5658 ; GENERIC-NEXT: cmpnei16 a1, 0
5659 ; GENERIC-NEXT: bf16 .LBB121_2
5660 ; GENERIC-NEXT: # %bb.1: # %label1
5661 ; GENERIC-NEXT: movi16 a0, 1
5662 ; GENERIC-NEXT: addi16 sp, sp, 4
5663 ; GENERIC-NEXT: rts16
5664 ; GENERIC-NEXT: .LBB121_2: # %label2
5665 ; GENERIC-NEXT: movi16 a0, 0
5666 ; GENERIC-NEXT: addi16 sp, sp, 4
5667 ; GENERIC-NEXT: rts16
5669 %icmp = icmp ne i1 %x, 0
5670 br i1 %icmp, label %label1, label %label2
5678 define i1 @brRR_i1_ugt(i1 %x, i1 %y) {
5679 ; CHECK-LABEL: brRR_i1_ugt:
5680 ; CHECK: # %bb.0: # %entry
5681 ; CHECK-NEXT: andi32 a1, a1, 1
5682 ; CHECK-NEXT: andi32 a0, a0, 1
5683 ; CHECK-NEXT: cmphs16 a0, a1
5684 ; CHECK-NEXT: bt32 .LBB122_2
5685 ; CHECK-NEXT: # %bb.1: # %label1
5686 ; CHECK-NEXT: movi16 a0, 1
5688 ; CHECK-NEXT: .LBB122_2: # %label2
5689 ; CHECK-NEXT: movi16 a0, 0
5692 ; GENERIC-LABEL: brRR_i1_ugt:
5693 ; GENERIC: # %bb.0: # %entry
5694 ; GENERIC-NEXT: .cfi_def_cfa_offset 0
5695 ; GENERIC-NEXT: subi16 sp, sp, 4
5696 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
5697 ; GENERIC-NEXT: movi16 a2, 1
5698 ; GENERIC-NEXT: and16 a1, a2
5699 ; GENERIC-NEXT: and16 a0, a2
5700 ; GENERIC-NEXT: cmphs16 a0, a1
5701 ; GENERIC-NEXT: bt16 .LBB122_2
5702 ; GENERIC-NEXT: # %bb.1: # %label1
5703 ; GENERIC-NEXT: movi16 a0, 1
5704 ; GENERIC-NEXT: addi16 sp, sp, 4
5705 ; GENERIC-NEXT: rts16
5706 ; GENERIC-NEXT: .LBB122_2: # %label2
5707 ; GENERIC-NEXT: movi16 a0, 0
5708 ; GENERIC-NEXT: addi16 sp, sp, 4
5709 ; GENERIC-NEXT: rts16
5710 ; CHECK-UGTXT: icmpu32 a0, a1, a0
5711 ; CHECK-UGTXT: rts16
5713 %icmp = icmp ugt i1 %y, %x
5714 br i1 %icmp, label %label1, label %label2
5721 define i1 @brRI_i1_ugt(i1 %x) {
5722 ; CHECK-LABEL: brRI_i1_ugt:
5723 ; CHECK: # %bb.0: # %entry
5724 ; CHECK-NEXT: andi32 a0, a0, 1
5725 ; CHECK-NEXT: bez32 a0, .LBB123_2
5726 ; CHECK-NEXT: # %bb.1: # %label1
5727 ; CHECK-NEXT: movi16 a0, 1
5729 ; CHECK-NEXT: .LBB123_2: # %label2
5730 ; CHECK-NEXT: movi16 a0, 0
5733 ; GENERIC-LABEL: brRI_i1_ugt:
5734 ; GENERIC: # %bb.0: # %entry
5735 ; GENERIC-NEXT: .cfi_def_cfa_offset 0
5736 ; GENERIC-NEXT: subi16 sp, sp, 4
5737 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
5738 ; GENERIC-NEXT: movi16 a1, 1
5739 ; GENERIC-NEXT: and16 a1, a0
5740 ; GENERIC-NEXT: cmpnei16 a1, 0
5741 ; GENERIC-NEXT: bf16 .LBB123_2
5742 ; GENERIC-NEXT: # %bb.1: # %label1
5743 ; GENERIC-NEXT: movi16 a0, 1
5744 ; GENERIC-NEXT: addi16 sp, sp, 4
5745 ; GENERIC-NEXT: rts16
5746 ; GENERIC-NEXT: .LBB123_2: # %label2
5747 ; GENERIC-NEXT: movi16 a0, 0
5748 ; GENERIC-NEXT: addi16 sp, sp, 4
5749 ; GENERIC-NEXT: rts16
5750 ; CHECK-UGTXT: icmpu32 a0, a1, a0
5751 ; CHECK-UGTXT: rts16
5753 %icmp = icmp ugt i1 %x, 10
5754 br i1 %icmp, label %label1, label %label2
5761 define i1 @brR0_i1_ugt(i1 %x) {
5762 ; CHECK-LABEL: brR0_i1_ugt:
5763 ; CHECK: # %bb.0: # %entry
5764 ; CHECK-NEXT: andi32 a0, a0, 1
5765 ; CHECK-NEXT: bez32 a0, .LBB124_2
5766 ; CHECK-NEXT: # %bb.1: # %label1
5767 ; CHECK-NEXT: movi16 a0, 1
5769 ; CHECK-NEXT: .LBB124_2: # %label2
5770 ; CHECK-NEXT: movi16 a0, 0
5773 ; GENERIC-LABEL: brR0_i1_ugt:
5774 ; GENERIC: # %bb.0: # %entry
5775 ; GENERIC-NEXT: .cfi_def_cfa_offset 0
5776 ; GENERIC-NEXT: subi16 sp, sp, 4
5777 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
5778 ; GENERIC-NEXT: movi16 a1, 1
5779 ; GENERIC-NEXT: and16 a1, a0
5780 ; GENERIC-NEXT: cmpnei16 a1, 0
5781 ; GENERIC-NEXT: bf16 .LBB124_2
5782 ; GENERIC-NEXT: # %bb.1: # %label1
5783 ; GENERIC-NEXT: movi16 a0, 1
5784 ; GENERIC-NEXT: addi16 sp, sp, 4
5785 ; GENERIC-NEXT: rts16
5786 ; GENERIC-NEXT: .LBB124_2: # %label2
5787 ; GENERIC-NEXT: movi16 a0, 0
5788 ; GENERIC-NEXT: addi16 sp, sp, 4
5789 ; GENERIC-NEXT: rts16
5790 ; CHECK-UGTXT: icmpu32 a0, a1, a0
5791 ; CHECK-UGTXT: rts16
5793 %icmp = icmp ugt i1 %x, 0
5794 br i1 %icmp, label %label1, label %label2
5802 define i1 @brRR_i1_uge(i1 %x, i1 %y) {
5803 ; CHECK-LABEL: brRR_i1_uge:
5804 ; CHECK: # %bb.0: # %entry
5805 ; CHECK-NEXT: andi32 a0, a0, 1
5806 ; CHECK-NEXT: andi32 a1, a1, 1
5807 ; CHECK-NEXT: cmphs16 a1, a0
5808 ; CHECK-NEXT: bf32 .LBB125_2
5809 ; CHECK-NEXT: # %bb.1: # %label1
5810 ; CHECK-NEXT: movi16 a0, 1
5812 ; CHECK-NEXT: .LBB125_2: # %label2
5813 ; CHECK-NEXT: movi16 a0, 0
5816 ; GENERIC-LABEL: brRR_i1_uge:
5817 ; GENERIC: # %bb.0: # %entry
5818 ; GENERIC-NEXT: .cfi_def_cfa_offset 0
5819 ; GENERIC-NEXT: subi16 sp, sp, 4
5820 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
5821 ; GENERIC-NEXT: movi16 a2, 1
5822 ; GENERIC-NEXT: and16 a0, a2
5823 ; GENERIC-NEXT: and16 a1, a2
5824 ; GENERIC-NEXT: cmphs16 a1, a0
5825 ; GENERIC-NEXT: bf16 .LBB125_2
5826 ; GENERIC-NEXT: # %bb.1: # %label1
5827 ; GENERIC-NEXT: movi16 a0, 1
5828 ; GENERIC-NEXT: addi16 sp, sp, 4
5829 ; GENERIC-NEXT: rts16
5830 ; GENERIC-NEXT: .LBB125_2: # %label2
5831 ; GENERIC-NEXT: movi16 a0, 0
5832 ; GENERIC-NEXT: addi16 sp, sp, 4
5833 ; GENERIC-NEXT: rts16
5834 ; CHECK-UGTXT: icmpu32 a0, a1, a0
5835 ; CHECK-UGTXT: rts16
5837 %icmp = icmp uge i1 %y, %x
5838 br i1 %icmp, label %label1, label %label2
5845 define i1 @brRI_i1_uge(i1 %x) {
5846 ; CHECK-LABEL: brRI_i1_uge:
5847 ; CHECK: # %bb.0: # %entry
5848 ; CHECK-NEXT: movi16 a0, 0
5849 ; CHECK-NEXT: btsti16 a0, 0
5850 ; CHECK-NEXT: bt32 .LBB126_2
5851 ; CHECK-NEXT: # %bb.1: # %label1
5852 ; CHECK-NEXT: movi16 a0, 1
5853 ; CHECK-NEXT: .LBB126_2: # %label2
5856 ; GENERIC-LABEL: brRI_i1_uge:
5857 ; GENERIC: # %bb.0: # %entry
5858 ; GENERIC-NEXT: .cfi_def_cfa_offset 0
5859 ; GENERIC-NEXT: subi16 sp, sp, 4
5860 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
5861 ; GENERIC-NEXT: movi16 a0, 0
5862 ; GENERIC-NEXT: btsti16 a0, 0
5863 ; GENERIC-NEXT: bt16 .LBB126_2
5864 ; GENERIC-NEXT: # %bb.1: # %label1
5865 ; GENERIC-NEXT: movi16 a0, 1
5866 ; GENERIC-NEXT: .LBB126_2: # %label2
5867 ; GENERIC-NEXT: addi16 sp, sp, 4
5868 ; GENERIC-NEXT: rts16
5869 ; CHECK-UGTXT: icmpu32 a0, a1, a0
5870 ; CHECK-UGTXT: rts16
5872 %icmp = icmp uge i1 %x, 10
5873 br i1 %icmp, label %label1, label %label2
5881 define i1 @brRR_i1_ult(i1 %x, i1 %y) {
5882 ; CHECK-LABEL: brRR_i1_ult:
5883 ; CHECK: # %bb.0: # %entry
5884 ; CHECK-NEXT: andi32 a0, a0, 1
5885 ; CHECK-NEXT: andi32 a1, a1, 1
5886 ; CHECK-NEXT: cmphs16 a1, a0
5887 ; CHECK-NEXT: bt32 .LBB127_2
5888 ; CHECK-NEXT: # %bb.1: # %label1
5889 ; CHECK-NEXT: movi16 a0, 1
5891 ; CHECK-NEXT: .LBB127_2: # %label2
5892 ; CHECK-NEXT: movi16 a0, 0
5895 ; GENERIC-LABEL: brRR_i1_ult:
5896 ; GENERIC: # %bb.0: # %entry
5897 ; GENERIC-NEXT: .cfi_def_cfa_offset 0
5898 ; GENERIC-NEXT: subi16 sp, sp, 4
5899 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
5900 ; GENERIC-NEXT: movi16 a2, 1
5901 ; GENERIC-NEXT: and16 a0, a2
5902 ; GENERIC-NEXT: and16 a1, a2
5903 ; GENERIC-NEXT: cmphs16 a1, a0
5904 ; GENERIC-NEXT: bt16 .LBB127_2
5905 ; GENERIC-NEXT: # %bb.1: # %label1
5906 ; GENERIC-NEXT: movi16 a0, 1
5907 ; GENERIC-NEXT: addi16 sp, sp, 4
5908 ; GENERIC-NEXT: rts16
5909 ; GENERIC-NEXT: .LBB127_2: # %label2
5910 ; GENERIC-NEXT: movi16 a0, 0
5911 ; GENERIC-NEXT: addi16 sp, sp, 4
5912 ; GENERIC-NEXT: rts16
5913 ; CHECK-UGTXT: icmpu32 a0, a1, a0
5914 ; CHECK-UGTXT: rts16
5916 %icmp = icmp ult i1 %y, %x
5917 br i1 %icmp, label %label1, label %label2
5924 define i1 @brRI_i1_ult(i1 %x) {
5925 ; CHECK-LABEL: brRI_i1_ult:
5926 ; CHECK: # %bb.0: # %entry
5927 ; CHECK-NEXT: movi16 a0, 1
5928 ; CHECK-NEXT: btsti16 a0, 0
5929 ; CHECK-NEXT: bt32 .LBB128_2
5930 ; CHECK-NEXT: # %bb.1: # %label1
5932 ; CHECK-NEXT: .LBB128_2: # %label2
5933 ; CHECK-NEXT: movi16 a0, 0
5936 ; GENERIC-LABEL: brRI_i1_ult:
5937 ; GENERIC: # %bb.0: # %entry
5938 ; GENERIC-NEXT: .cfi_def_cfa_offset 0
5939 ; GENERIC-NEXT: subi16 sp, sp, 4
5940 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
5941 ; GENERIC-NEXT: movi16 a0, 1
5942 ; GENERIC-NEXT: btsti16 a0, 0
5943 ; GENERIC-NEXT: bt16 .LBB128_2
5944 ; GENERIC-NEXT: # %bb.1: # %label1
5945 ; GENERIC-NEXT: addi16 sp, sp, 4
5946 ; GENERIC-NEXT: rts16
5947 ; GENERIC-NEXT: .LBB128_2: # %label2
5948 ; GENERIC-NEXT: movi16 a0, 0
5949 ; GENERIC-NEXT: addi16 sp, sp, 4
5950 ; GENERIC-NEXT: rts16
5951 ; CHECK-UGTXT: icmpu32 a0, a1, a0
5952 ; CHECK-UGTXT: rts16
5954 %icmp = icmp ult i1 %x, 10
5955 br i1 %icmp, label %label1, label %label2
5964 define i1 @brRR_i1_ule(i1 %x, i1 %y) {
5965 ; CHECK-LABEL: brRR_i1_ule:
5966 ; CHECK: # %bb.0: # %entry
5967 ; CHECK-NEXT: andi32 a1, a1, 1
5968 ; CHECK-NEXT: andi32 a0, a0, 1
5969 ; CHECK-NEXT: cmphs16 a0, a1
5970 ; CHECK-NEXT: bf32 .LBB129_2
5971 ; CHECK-NEXT: # %bb.1: # %label1
5972 ; CHECK-NEXT: movi16 a0, 1
5974 ; CHECK-NEXT: .LBB129_2: # %label2
5975 ; CHECK-NEXT: movi16 a0, 0
5978 ; GENERIC-LABEL: brRR_i1_ule:
5979 ; GENERIC: # %bb.0: # %entry
5980 ; GENERIC-NEXT: .cfi_def_cfa_offset 0
5981 ; GENERIC-NEXT: subi16 sp, sp, 4
5982 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
5983 ; GENERIC-NEXT: movi16 a2, 1
5984 ; GENERIC-NEXT: and16 a1, a2
5985 ; GENERIC-NEXT: and16 a0, a2
5986 ; GENERIC-NEXT: cmphs16 a0, a1
5987 ; GENERIC-NEXT: bf16 .LBB129_2
5988 ; GENERIC-NEXT: # %bb.1: # %label1
5989 ; GENERIC-NEXT: movi16 a0, 1
5990 ; GENERIC-NEXT: addi16 sp, sp, 4
5991 ; GENERIC-NEXT: rts16
5992 ; GENERIC-NEXT: .LBB129_2: # %label2
5993 ; GENERIC-NEXT: movi16 a0, 0
5994 ; GENERIC-NEXT: addi16 sp, sp, 4
5995 ; GENERIC-NEXT: rts16
5996 ; CHECK-UGTXT: icmpu32 a0, a1, a0
5997 ; CHECK-UGTXT: rts16
5999 %icmp = icmp ule i1 %y, %x
6000 br i1 %icmp, label %label1, label %label2
6007 define i1 @brRI_i1_ule(i1 %x) {
6008 ; CHECK-LABEL: brRI_i1_ule:
6009 ; CHECK: # %bb.0: # %entry
6010 ; CHECK-NEXT: andi32 a0, a0, 1
6011 ; CHECK-NEXT: btsti16 a0, 0
6012 ; CHECK-NEXT: bt32 .LBB130_2
6013 ; CHECK-NEXT: # %bb.1: # %label1
6014 ; CHECK-NEXT: movi16 a0, 1
6016 ; CHECK-NEXT: .LBB130_2: # %label2
6017 ; CHECK-NEXT: movi16 a0, 0
6020 ; GENERIC-LABEL: brRI_i1_ule:
6021 ; GENERIC: # %bb.0: # %entry
6022 ; GENERIC-NEXT: .cfi_def_cfa_offset 0
6023 ; GENERIC-NEXT: subi16 sp, sp, 4
6024 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
6025 ; GENERIC-NEXT: movi16 a1, 1
6026 ; GENERIC-NEXT: and16 a1, a0
6027 ; GENERIC-NEXT: btsti16 a1, 0
6028 ; GENERIC-NEXT: bt16 .LBB130_2
6029 ; GENERIC-NEXT: # %bb.1: # %label1
6030 ; GENERIC-NEXT: movi16 a0, 1
6031 ; GENERIC-NEXT: addi16 sp, sp, 4
6032 ; GENERIC-NEXT: rts16
6033 ; GENERIC-NEXT: .LBB130_2: # %label2
6034 ; GENERIC-NEXT: movi16 a0, 0
6035 ; GENERIC-NEXT: addi16 sp, sp, 4
6036 ; GENERIC-NEXT: rts16
6037 ; CHECK-UGTXT: icmpu32 a0, a1, a0
6038 ; CHECK-UGTXT: rts16
6040 %icmp = icmp ule i1 %x, 10
6041 br i1 %icmp, label %label1, label %label2
6048 define i1 @brR0_i1_ule(i1 %x) {
6049 ; CHECK-LABEL: brR0_i1_ule:
6050 ; CHECK: # %bb.0: # %entry
6051 ; CHECK-NEXT: andi32 a0, a0, 1
6052 ; CHECK-NEXT: btsti16 a0, 0
6053 ; CHECK-NEXT: bt32 .LBB131_2
6054 ; CHECK-NEXT: # %bb.1: # %label1
6055 ; CHECK-NEXT: movi16 a0, 1
6057 ; CHECK-NEXT: .LBB131_2: # %label2
6058 ; CHECK-NEXT: movi16 a0, 0
6061 ; GENERIC-LABEL: brR0_i1_ule:
6062 ; GENERIC: # %bb.0: # %entry
6063 ; GENERIC-NEXT: .cfi_def_cfa_offset 0
6064 ; GENERIC-NEXT: subi16 sp, sp, 4
6065 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
6066 ; GENERIC-NEXT: movi16 a1, 1
6067 ; GENERIC-NEXT: and16 a1, a0
6068 ; GENERIC-NEXT: btsti16 a1, 0
6069 ; GENERIC-NEXT: bt16 .LBB131_2
6070 ; GENERIC-NEXT: # %bb.1: # %label1
6071 ; GENERIC-NEXT: movi16 a0, 1
6072 ; GENERIC-NEXT: addi16 sp, sp, 4
6073 ; GENERIC-NEXT: rts16
6074 ; GENERIC-NEXT: .LBB131_2: # %label2
6075 ; GENERIC-NEXT: movi16 a0, 0
6076 ; GENERIC-NEXT: addi16 sp, sp, 4
6077 ; GENERIC-NEXT: rts16
6078 ; CHECK-UGTXT: icmpu32 a0, a1, a0
6079 ; CHECK-UGTXT: rts16
6081 %icmp = icmp ule i1 %x, 0
6082 br i1 %icmp, label %label1, label %label2
6090 define i1 @brRR_i1_sgt(i1 %x, i1 %y) {
6091 ; CHECK-LABEL: brRR_i1_sgt:
6092 ; CHECK: # %bb.0: # %entry
6093 ; CHECK-NEXT: sext32 a1, a1, 0, 0
6094 ; CHECK-NEXT: sext32 a0, a0, 0, 0
6095 ; CHECK-NEXT: cmplt16 a0, a1
6096 ; CHECK-NEXT: bf32 .LBB132_2
6097 ; CHECK-NEXT: # %bb.1: # %label1
6098 ; CHECK-NEXT: movi16 a0, 1
6100 ; CHECK-NEXT: .LBB132_2: # %label2
6101 ; CHECK-NEXT: movi16 a0, 0
6104 ; GENERIC-LABEL: brRR_i1_sgt:
6105 ; GENERIC: # %bb.0: # %entry
6106 ; GENERIC-NEXT: .cfi_def_cfa_offset 0
6107 ; GENERIC-NEXT: subi16 sp, sp, 4
6108 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
6109 ; GENERIC-NEXT: lsli16 a1, a1, 7
6110 ; GENERIC-NEXT: asri16 a1, a1, 7
6111 ; GENERIC-NEXT: lsli16 a0, a0, 7
6112 ; GENERIC-NEXT: asri16 a0, a0, 7
6113 ; GENERIC-NEXT: cmplt16 a0, a1
6114 ; GENERIC-NEXT: bf16 .LBB132_2
6115 ; GENERIC-NEXT: # %bb.1: # %label1
6116 ; GENERIC-NEXT: movi16 a0, 1
6117 ; GENERIC-NEXT: addi16 sp, sp, 4
6118 ; GENERIC-NEXT: rts16
6119 ; GENERIC-NEXT: .LBB132_2: # %label2
6120 ; GENERIC-NEXT: movi16 a0, 0
6121 ; GENERIC-NEXT: addi16 sp, sp, 4
6122 ; GENERIC-NEXT: rts16
6123 ; CHECK-UGTXT: icmpu32 a0, a1, a0
6124 ; CHECK-UGTXT: rts16
6126 %icmp = icmp sgt i1 %y, %x
6127 br i1 %icmp, label %label1, label %label2
6134 define i1 @brRI_i1_sgt(i1 %x) {
6135 ; CHECK-LABEL: brRI_i1_sgt:
6136 ; CHECK: # %bb.0: # %entry
6137 ; CHECK-NEXT: movi16 a0, 1
6138 ; CHECK-NEXT: btsti16 a0, 0
6139 ; CHECK-NEXT: bt32 .LBB133_2
6140 ; CHECK-NEXT: # %bb.1: # %label1
6142 ; CHECK-NEXT: .LBB133_2: # %label2
6143 ; CHECK-NEXT: movi16 a0, 0
6146 ; GENERIC-LABEL: brRI_i1_sgt:
6147 ; GENERIC: # %bb.0: # %entry
6148 ; GENERIC-NEXT: .cfi_def_cfa_offset 0
6149 ; GENERIC-NEXT: subi16 sp, sp, 4
6150 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
6151 ; GENERIC-NEXT: movi16 a0, 1
6152 ; GENERIC-NEXT: btsti16 a0, 0
6153 ; GENERIC-NEXT: bt16 .LBB133_2
6154 ; GENERIC-NEXT: # %bb.1: # %label1
6155 ; GENERIC-NEXT: addi16 sp, sp, 4
6156 ; GENERIC-NEXT: rts16
6157 ; GENERIC-NEXT: .LBB133_2: # %label2
6158 ; GENERIC-NEXT: movi16 a0, 0
6159 ; GENERIC-NEXT: addi16 sp, sp, 4
6160 ; GENERIC-NEXT: rts16
6161 ; CHECK-UGTXT: icmpu32 a0, a1, a0
6162 ; CHECK-UGTXT: rts16
6164 %icmp = icmp sgt i1 %x, 10
6165 br i1 %icmp, label %label1, label %label2
6172 define i1 @brR0_i1_sgt(i1 %x) {
6173 ; CHECK-LABEL: brR0_i1_sgt:
6174 ; CHECK: # %bb.0: # %entry
6175 ; CHECK-NEXT: movi16 a0, 1
6176 ; CHECK-NEXT: btsti16 a0, 0
6177 ; CHECK-NEXT: bt32 .LBB134_2
6178 ; CHECK-NEXT: # %bb.1: # %label1
6180 ; CHECK-NEXT: .LBB134_2: # %label2
6181 ; CHECK-NEXT: movi16 a0, 0
6184 ; GENERIC-LABEL: brR0_i1_sgt:
6185 ; GENERIC: # %bb.0: # %entry
6186 ; GENERIC-NEXT: .cfi_def_cfa_offset 0
6187 ; GENERIC-NEXT: subi16 sp, sp, 4
6188 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
6189 ; GENERIC-NEXT: movi16 a0, 1
6190 ; GENERIC-NEXT: btsti16 a0, 0
6191 ; GENERIC-NEXT: bt16 .LBB134_2
6192 ; GENERIC-NEXT: # %bb.1: # %label1
6193 ; GENERIC-NEXT: addi16 sp, sp, 4
6194 ; GENERIC-NEXT: rts16
6195 ; GENERIC-NEXT: .LBB134_2: # %label2
6196 ; GENERIC-NEXT: movi16 a0, 0
6197 ; GENERIC-NEXT: addi16 sp, sp, 4
6198 ; GENERIC-NEXT: rts16
6199 ; CHECK-UGTXT: icmpu32 a0, a1, a0
6200 ; CHECK-UGTXT: rts16
6202 %icmp = icmp sgt i1 %x, 0
6203 br i1 %icmp, label %label1, label %label2
6211 define i1 @brRR_i1_sge(i1 %x, i1 %y) {
6212 ; CHECK-LABEL: brRR_i1_sge:
6213 ; CHECK: # %bb.0: # %entry
6214 ; CHECK-NEXT: sext32 a0, a0, 0, 0
6215 ; CHECK-NEXT: sext32 a1, a1, 0, 0
6216 ; CHECK-NEXT: cmplt16 a1, a0
6217 ; CHECK-NEXT: bt32 .LBB135_2
6218 ; CHECK-NEXT: # %bb.1: # %label1
6219 ; CHECK-NEXT: movi16 a0, 1
6221 ; CHECK-NEXT: .LBB135_2: # %label2
6222 ; CHECK-NEXT: movi16 a0, 0
6225 ; GENERIC-LABEL: brRR_i1_sge:
6226 ; GENERIC: # %bb.0: # %entry
6227 ; GENERIC-NEXT: .cfi_def_cfa_offset 0
6228 ; GENERIC-NEXT: subi16 sp, sp, 4
6229 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
6230 ; GENERIC-NEXT: lsli16 a0, a0, 7
6231 ; GENERIC-NEXT: asri16 a0, a0, 7
6232 ; GENERIC-NEXT: lsli16 a1, a1, 7
6233 ; GENERIC-NEXT: asri16 a1, a1, 7
6234 ; GENERIC-NEXT: cmplt16 a1, a0
6235 ; GENERIC-NEXT: bt16 .LBB135_2
6236 ; GENERIC-NEXT: # %bb.1: # %label1
6237 ; GENERIC-NEXT: movi16 a0, 1
6238 ; GENERIC-NEXT: addi16 sp, sp, 4
6239 ; GENERIC-NEXT: rts16
6240 ; GENERIC-NEXT: .LBB135_2: # %label2
6241 ; GENERIC-NEXT: movi16 a0, 0
6242 ; GENERIC-NEXT: addi16 sp, sp, 4
6243 ; GENERIC-NEXT: rts16
6244 ; CHECK-UGTXT: icmpu32 a0, a1, a0
6245 ; CHECK-UGTXT: rts16
6247 %icmp = icmp sge i1 %y, %x
6248 br i1 %icmp, label %label1, label %label2
6255 define i1 @brRI_i1_sge(i1 %x) {
6256 ; CHECK-LABEL: brRI_i1_sge:
6257 ; CHECK: # %bb.0: # %entry
6258 ; CHECK-NEXT: andi32 a0, a0, 1
6259 ; CHECK-NEXT: btsti16 a0, 0
6260 ; CHECK-NEXT: bt32 .LBB136_2
6261 ; CHECK-NEXT: # %bb.1: # %label1
6262 ; CHECK-NEXT: movi16 a0, 1
6264 ; CHECK-NEXT: .LBB136_2: # %label2
6265 ; CHECK-NEXT: movi16 a0, 0
6268 ; GENERIC-LABEL: brRI_i1_sge:
6269 ; GENERIC: # %bb.0: # %entry
6270 ; GENERIC-NEXT: .cfi_def_cfa_offset 0
6271 ; GENERIC-NEXT: subi16 sp, sp, 4
6272 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
6273 ; GENERIC-NEXT: movi16 a1, 1
6274 ; GENERIC-NEXT: and16 a1, a0
6275 ; GENERIC-NEXT: btsti16 a1, 0
6276 ; GENERIC-NEXT: bt16 .LBB136_2
6277 ; GENERIC-NEXT: # %bb.1: # %label1
6278 ; GENERIC-NEXT: movi16 a0, 1
6279 ; GENERIC-NEXT: addi16 sp, sp, 4
6280 ; GENERIC-NEXT: rts16
6281 ; GENERIC-NEXT: .LBB136_2: # %label2
6282 ; GENERIC-NEXT: movi16 a0, 0
6283 ; GENERIC-NEXT: addi16 sp, sp, 4
6284 ; GENERIC-NEXT: rts16
6285 ; CHECK-UGTXT: icmpu32 a0, a1, a0
6286 ; CHECK-UGTXT: rts16
6288 %icmp = icmp sge i1 %x, 10
6289 br i1 %icmp, label %label1, label %label2
6296 define i1 @brR0_i1_sge(i1 %x) {
6297 ; CHECK-LABEL: brR0_i1_sge:
6298 ; CHECK: # %bb.0: # %entry
6299 ; CHECK-NEXT: andi32 a0, a0, 1
6300 ; CHECK-NEXT: btsti16 a0, 0
6301 ; CHECK-NEXT: bt32 .LBB137_2
6302 ; CHECK-NEXT: # %bb.1: # %label1
6303 ; CHECK-NEXT: movi16 a0, 1
6305 ; CHECK-NEXT: .LBB137_2: # %label2
6306 ; CHECK-NEXT: movi16 a0, 0
6309 ; GENERIC-LABEL: brR0_i1_sge:
6310 ; GENERIC: # %bb.0: # %entry
6311 ; GENERIC-NEXT: .cfi_def_cfa_offset 0
6312 ; GENERIC-NEXT: subi16 sp, sp, 4
6313 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
6314 ; GENERIC-NEXT: movi16 a1, 1
6315 ; GENERIC-NEXT: and16 a1, a0
6316 ; GENERIC-NEXT: btsti16 a1, 0
6317 ; GENERIC-NEXT: bt16 .LBB137_2
6318 ; GENERIC-NEXT: # %bb.1: # %label1
6319 ; GENERIC-NEXT: movi16 a0, 1
6320 ; GENERIC-NEXT: addi16 sp, sp, 4
6321 ; GENERIC-NEXT: rts16
6322 ; GENERIC-NEXT: .LBB137_2: # %label2
6323 ; GENERIC-NEXT: movi16 a0, 0
6324 ; GENERIC-NEXT: addi16 sp, sp, 4
6325 ; GENERIC-NEXT: rts16
6326 ; CHECK-UGTXT: icmpu32 a0, a1, a0
6327 ; CHECK-UGTXT: rts16
6329 %icmp = icmp sge i1 %x, 0
6330 br i1 %icmp, label %label1, label %label2
6338 define i1 @brRR_i1_slt(i1 %x, i1 %y) {
6339 ; CHECK-LABEL: brRR_i1_slt:
6340 ; CHECK: # %bb.0: # %entry
6341 ; CHECK-NEXT: sext32 a0, a0, 0, 0
6342 ; CHECK-NEXT: sext32 a1, a1, 0, 0
6343 ; CHECK-NEXT: cmplt16 a1, a0
6344 ; CHECK-NEXT: bf32 .LBB138_2
6345 ; CHECK-NEXT: # %bb.1: # %label1
6346 ; CHECK-NEXT: movi16 a0, 1
6348 ; CHECK-NEXT: .LBB138_2: # %label2
6349 ; CHECK-NEXT: movi16 a0, 0
6352 ; GENERIC-LABEL: brRR_i1_slt:
6353 ; GENERIC: # %bb.0: # %entry
6354 ; GENERIC-NEXT: .cfi_def_cfa_offset 0
6355 ; GENERIC-NEXT: subi16 sp, sp, 4
6356 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
6357 ; GENERIC-NEXT: lsli16 a0, a0, 7
6358 ; GENERIC-NEXT: asri16 a0, a0, 7
6359 ; GENERIC-NEXT: lsli16 a1, a1, 7
6360 ; GENERIC-NEXT: asri16 a1, a1, 7
6361 ; GENERIC-NEXT: cmplt16 a1, a0
6362 ; GENERIC-NEXT: bf16 .LBB138_2
6363 ; GENERIC-NEXT: # %bb.1: # %label1
6364 ; GENERIC-NEXT: movi16 a0, 1
6365 ; GENERIC-NEXT: addi16 sp, sp, 4
6366 ; GENERIC-NEXT: rts16
6367 ; GENERIC-NEXT: .LBB138_2: # %label2
6368 ; GENERIC-NEXT: movi16 a0, 0
6369 ; GENERIC-NEXT: addi16 sp, sp, 4
6370 ; GENERIC-NEXT: rts16
6371 ; CHECK-UGTXT: icmpu32 a0, a1, a0
6372 ; CHECK-UGTXT: rts16
6374 %icmp = icmp slt i1 %y, %x
6375 br i1 %icmp, label %label1, label %label2
6382 define i1 @brRI_i1_slt(i1 %x) {
6383 ; CHECK-LABEL: brRI_i1_slt:
6384 ; CHECK: # %bb.0: # %entry
6385 ; CHECK-NEXT: andi32 a0, a0, 1
6386 ; CHECK-NEXT: bnez32 a0, .LBB139_2
6387 ; CHECK-NEXT: # %bb.1: # %label2
6388 ; CHECK-NEXT: movi16 a0, 0
6390 ; CHECK-NEXT: .LBB139_2: # %label1
6391 ; CHECK-NEXT: movi16 a0, 1
6394 ; GENERIC-LABEL: brRI_i1_slt:
6395 ; GENERIC: # %bb.0: # %entry
6396 ; GENERIC-NEXT: .cfi_def_cfa_offset 0
6397 ; GENERIC-NEXT: subi16 sp, sp, 4
6398 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
6399 ; GENERIC-NEXT: movi16 a1, 1
6400 ; GENERIC-NEXT: and16 a1, a0
6401 ; GENERIC-NEXT: cmpnei16 a1, 0
6402 ; GENERIC-NEXT: bt16 .LBB139_2
6403 ; GENERIC-NEXT: # %bb.1: # %label2
6404 ; GENERIC-NEXT: movi16 a0, 0
6405 ; GENERIC-NEXT: addi16 sp, sp, 4
6406 ; GENERIC-NEXT: rts16
6407 ; GENERIC-NEXT: .LBB139_2: # %label1
6408 ; GENERIC-NEXT: movi16 a0, 1
6409 ; GENERIC-NEXT: addi16 sp, sp, 4
6410 ; GENERIC-NEXT: rts16
6411 ; CHECK-UGTXT: icmpu32 a0, a1, a0
6412 ; CHECK-UGTXT: rts16
6414 %icmp = icmp slt i1 %x, 10
6415 br i1 %icmp, label %label1, label %label2
6422 define i1 @brR0_i1_slt(i1 %x) {
6423 ; CHECK-LABEL: brR0_i1_slt:
6424 ; CHECK: # %bb.0: # %entry
6425 ; CHECK-NEXT: andi32 a0, a0, 1
6426 ; CHECK-NEXT: bnez32 a0, .LBB140_2
6427 ; CHECK-NEXT: # %bb.1: # %label2
6428 ; CHECK-NEXT: movi16 a0, 0
6430 ; CHECK-NEXT: .LBB140_2: # %label1
6431 ; CHECK-NEXT: movi16 a0, 1
6434 ; GENERIC-LABEL: brR0_i1_slt:
6435 ; GENERIC: # %bb.0: # %entry
6436 ; GENERIC-NEXT: .cfi_def_cfa_offset 0
6437 ; GENERIC-NEXT: subi16 sp, sp, 4
6438 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
6439 ; GENERIC-NEXT: movi16 a1, 1
6440 ; GENERIC-NEXT: and16 a1, a0
6441 ; GENERIC-NEXT: cmpnei16 a1, 0
6442 ; GENERIC-NEXT: bt16 .LBB140_2
6443 ; GENERIC-NEXT: # %bb.1: # %label2
6444 ; GENERIC-NEXT: movi16 a0, 0
6445 ; GENERIC-NEXT: addi16 sp, sp, 4
6446 ; GENERIC-NEXT: rts16
6447 ; GENERIC-NEXT: .LBB140_2: # %label1
6448 ; GENERIC-NEXT: movi16 a0, 1
6449 ; GENERIC-NEXT: addi16 sp, sp, 4
6450 ; GENERIC-NEXT: rts16
6451 ; CHECK-UGTXT: icmpu32 a0, a1, a0
6452 ; CHECK-UGTXT: rts16
6454 %icmp = icmp slt i1 %x, 0
6455 br i1 %icmp, label %label1, label %label2
6463 define i1 @brRR_i1_sle(i1 %x, i1 %y) {
6464 ; CHECK-LABEL: brRR_i1_sle:
6465 ; CHECK: # %bb.0: # %entry
6466 ; CHECK-NEXT: sext32 a1, a1, 0, 0
6467 ; CHECK-NEXT: sext32 a0, a0, 0, 0
6468 ; CHECK-NEXT: cmplt16 a0, a1
6469 ; CHECK-NEXT: bt32 .LBB141_2
6470 ; CHECK-NEXT: # %bb.1: # %label1
6471 ; CHECK-NEXT: movi16 a0, 1
6473 ; CHECK-NEXT: .LBB141_2: # %label2
6474 ; CHECK-NEXT: movi16 a0, 0
6477 ; GENERIC-LABEL: brRR_i1_sle:
6478 ; GENERIC: # %bb.0: # %entry
6479 ; GENERIC-NEXT: .cfi_def_cfa_offset 0
6480 ; GENERIC-NEXT: subi16 sp, sp, 4
6481 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
6482 ; GENERIC-NEXT: lsli16 a1, a1, 7
6483 ; GENERIC-NEXT: asri16 a1, a1, 7
6484 ; GENERIC-NEXT: lsli16 a0, a0, 7
6485 ; GENERIC-NEXT: asri16 a0, a0, 7
6486 ; GENERIC-NEXT: cmplt16 a0, a1
6487 ; GENERIC-NEXT: bt16 .LBB141_2
6488 ; GENERIC-NEXT: # %bb.1: # %label1
6489 ; GENERIC-NEXT: movi16 a0, 1
6490 ; GENERIC-NEXT: addi16 sp, sp, 4
6491 ; GENERIC-NEXT: rts16
6492 ; GENERIC-NEXT: .LBB141_2: # %label2
6493 ; GENERIC-NEXT: movi16 a0, 0
6494 ; GENERIC-NEXT: addi16 sp, sp, 4
6495 ; GENERIC-NEXT: rts16
6496 ; CHECK-UGTXT: icmpu32 a0, a1, a0
6497 ; CHECK-UGTXT: rts16
6499 %icmp = icmp sle i1 %y, %x
6500 br i1 %icmp, label %label1, label %label2
6507 define i1 @brRI_i1_sle(i1 %x) {
6508 ; CHECK-LABEL: brRI_i1_sle:
6509 ; CHECK: # %bb.0: # %entry
6510 ; CHECK-NEXT: movi16 a0, 0
6511 ; CHECK-NEXT: btsti16 a0, 0
6512 ; CHECK-NEXT: bt32 .LBB142_2
6513 ; CHECK-NEXT: # %bb.1: # %label1
6514 ; CHECK-NEXT: movi16 a0, 1
6515 ; CHECK-NEXT: .LBB142_2: # %label2
6518 ; GENERIC-LABEL: brRI_i1_sle:
6519 ; GENERIC: # %bb.0: # %entry
6520 ; GENERIC-NEXT: .cfi_def_cfa_offset 0
6521 ; GENERIC-NEXT: subi16 sp, sp, 4
6522 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
6523 ; GENERIC-NEXT: movi16 a0, 0
6524 ; GENERIC-NEXT: btsti16 a0, 0
6525 ; GENERIC-NEXT: bt16 .LBB142_2
6526 ; GENERIC-NEXT: # %bb.1: # %label1
6527 ; GENERIC-NEXT: movi16 a0, 1
6528 ; GENERIC-NEXT: .LBB142_2: # %label2
6529 ; GENERIC-NEXT: addi16 sp, sp, 4
6530 ; GENERIC-NEXT: rts16
6531 ; CHECK-UGTXT: icmpu32 a0, a1, a0
6532 ; CHECK-UGTXT: rts16
6534 %icmp = icmp sle i1 %x, 10
6535 br i1 %icmp, label %label1, label %label2
6542 define i1 @brR0_i1_sle(i1 %x) {
6543 ; CHECK-LABEL: brR0_i1_sle:
6544 ; CHECK: # %bb.0: # %entry
6545 ; CHECK-NEXT: movi16 a0, 0
6546 ; CHECK-NEXT: btsti16 a0, 0
6547 ; CHECK-NEXT: bt32 .LBB143_2
6548 ; CHECK-NEXT: # %bb.1: # %label1
6549 ; CHECK-NEXT: movi16 a0, 1
6550 ; CHECK-NEXT: .LBB143_2: # %label2
6553 ; GENERIC-LABEL: brR0_i1_sle:
6554 ; GENERIC: # %bb.0: # %entry
6555 ; GENERIC-NEXT: .cfi_def_cfa_offset 0
6556 ; GENERIC-NEXT: subi16 sp, sp, 4
6557 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
6558 ; GENERIC-NEXT: movi16 a0, 0
6559 ; GENERIC-NEXT: btsti16 a0, 0
6560 ; GENERIC-NEXT: bt16 .LBB143_2
6561 ; GENERIC-NEXT: # %bb.1: # %label1
6562 ; GENERIC-NEXT: movi16 a0, 1
6563 ; GENERIC-NEXT: .LBB143_2: # %label2
6564 ; GENERIC-NEXT: addi16 sp, sp, 4
6565 ; GENERIC-NEXT: rts16
6566 ; CHECK-UGTXT: icmpu32 a0, a1, a0
6567 ; CHECK-UGTXT: rts16
6569 %icmp = icmp sle i1 %x, 0
6570 br i1 %icmp, label %label1, label %label2
6578 define i1 @brCBit_i1(i1 %c) {
6579 ; CHECK-LABEL: brCBit_i1:
6580 ; CHECK: # %bb.0: # %entry
6581 ; CHECK-NEXT: andi32 a0, a0, 1
6582 ; CHECK-NEXT: bez32 a0, .LBB144_2
6583 ; CHECK-NEXT: # %bb.1: # %label1
6584 ; CHECK-NEXT: movi16 a0, 1
6586 ; CHECK-NEXT: .LBB144_2: # %label2
6587 ; CHECK-NEXT: movi16 a0, 0
6590 ; GENERIC-LABEL: brCBit_i1:
6591 ; GENERIC: # %bb.0: # %entry
6592 ; GENERIC-NEXT: .cfi_def_cfa_offset 0
6593 ; GENERIC-NEXT: subi16 sp, sp, 4
6594 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
6595 ; GENERIC-NEXT: movi16 a1, 1
6596 ; GENERIC-NEXT: and16 a1, a0
6597 ; GENERIC-NEXT: cmpnei16 a1, 0
6598 ; GENERIC-NEXT: bf16 .LBB144_2
6599 ; GENERIC-NEXT: # %bb.1: # %label1
6600 ; GENERIC-NEXT: movi16 a0, 1
6601 ; GENERIC-NEXT: addi16 sp, sp, 4
6602 ; GENERIC-NEXT: rts16
6603 ; GENERIC-NEXT: .LBB144_2: # %label2
6604 ; GENERIC-NEXT: movi16 a0, 0
6605 ; GENERIC-NEXT: addi16 sp, sp, 4
6606 ; GENERIC-NEXT: rts16
6608 br i1 %c, label %label1, label %label2
6615 define i32 @br_bit_test_eq_0(i32 %c) {
6616 ; CHECK-LABEL: br_bit_test_eq_0:
6618 ; CHECK-NEXT: btsti16 a0, 17
6619 ; CHECK-NEXT: bt32 .LBB145_2
6620 ; CHECK-NEXT: # %bb.1: # %label1
6621 ; CHECK-NEXT: movi16 a0, 1
6623 ; CHECK-NEXT: .LBB145_2: # %label2
6624 ; CHECK-NEXT: movi16 a0, 0
6627 ; GENERIC-LABEL: br_bit_test_eq_0:
6629 ; GENERIC-NEXT: .cfi_def_cfa_offset 0
6630 ; GENERIC-NEXT: subi16 sp, sp, 4
6631 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
6632 ; GENERIC-NEXT: movi16 a1, 0
6633 ; GENERIC-NEXT: lsli16 a2, a1, 24
6634 ; GENERIC-NEXT: movi16 a3, 2
6635 ; GENERIC-NEXT: lsli16 a3, a3, 16
6636 ; GENERIC-NEXT: or16 a3, a2
6637 ; GENERIC-NEXT: lsli16 a2, a1, 8
6638 ; GENERIC-NEXT: or16 a2, a3
6639 ; GENERIC-NEXT: or16 a2, a1
6640 ; GENERIC-NEXT: and16 a2, a0
6641 ; GENERIC-NEXT: cmpnei16 a2, 0
6642 ; GENERIC-NEXT: bt16 .LBB145_2
6643 ; GENERIC-NEXT: # %bb.1: # %label1
6644 ; GENERIC-NEXT: movi16 a0, 1
6645 ; GENERIC-NEXT: addi16 sp, sp, 4
6646 ; GENERIC-NEXT: rts16
6647 ; GENERIC-NEXT: .LBB145_2: # %label2
6648 ; GENERIC-NEXT: movi16 a0, 0
6649 ; GENERIC-NEXT: addi16 sp, sp, 4
6650 ; GENERIC-NEXT: rts16
6651 %t0 = and i32 %c, 131072
6652 %t1 = icmp eq i32 %t0, 0
6653 br i1 %t1, label %label1, label %label2
6660 define i32 @br_bit_test_ne_0(i32 %c) {
6661 ; CHECK-LABEL: br_bit_test_ne_0:
6663 ; CHECK-NEXT: btsti16 a0, 17
6664 ; CHECK-NEXT: bf32 .LBB146_2
6665 ; CHECK-NEXT: # %bb.1: # %label1
6666 ; CHECK-NEXT: movi16 a0, 1
6668 ; CHECK-NEXT: .LBB146_2: # %label2
6669 ; CHECK-NEXT: movi16 a0, 0
6672 ; GENERIC-LABEL: br_bit_test_ne_0:
6674 ; GENERIC-NEXT: .cfi_def_cfa_offset 0
6675 ; GENERIC-NEXT: subi16 sp, sp, 4
6676 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
6677 ; GENERIC-NEXT: movi16 a1, 0
6678 ; GENERIC-NEXT: lsli16 a2, a1, 24
6679 ; GENERIC-NEXT: movi16 a3, 2
6680 ; GENERIC-NEXT: lsli16 a3, a3, 16
6681 ; GENERIC-NEXT: or16 a3, a2
6682 ; GENERIC-NEXT: lsli16 a2, a1, 8
6683 ; GENERIC-NEXT: or16 a2, a3
6684 ; GENERIC-NEXT: or16 a2, a1
6685 ; GENERIC-NEXT: and16 a2, a0
6686 ; GENERIC-NEXT: cmpnei16 a2, 0
6687 ; GENERIC-NEXT: bf16 .LBB146_2
6688 ; GENERIC-NEXT: # %bb.1: # %label1
6689 ; GENERIC-NEXT: movi16 a0, 1
6690 ; GENERIC-NEXT: addi16 sp, sp, 4
6691 ; GENERIC-NEXT: rts16
6692 ; GENERIC-NEXT: .LBB146_2: # %label2
6693 ; GENERIC-NEXT: movi16 a0, 0
6694 ; GENERIC-NEXT: addi16 sp, sp, 4
6695 ; GENERIC-NEXT: rts16
6696 %t0 = and i32 %c, 131072
6697 %t1 = icmp ne i32 %t0, 0
6698 br i1 %t1, label %label1, label %label2
6705 define i32 @br_bit_test_eq_mask(i32 %c) {
6706 ; CHECK-LABEL: br_bit_test_eq_mask:
6708 ; CHECK-NEXT: btsti16 a0, 17
6709 ; CHECK-NEXT: bf32 .LBB147_2
6710 ; CHECK-NEXT: # %bb.1: # %label1
6711 ; CHECK-NEXT: movi16 a0, 1
6713 ; CHECK-NEXT: .LBB147_2: # %label2
6714 ; CHECK-NEXT: movi16 a0, 0
6717 ; GENERIC-LABEL: br_bit_test_eq_mask:
6719 ; GENERIC-NEXT: .cfi_def_cfa_offset 0
6720 ; GENERIC-NEXT: subi16 sp, sp, 4
6721 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
6722 ; GENERIC-NEXT: movi16 a1, 0
6723 ; GENERIC-NEXT: lsli16 a2, a1, 24
6724 ; GENERIC-NEXT: movi16 a3, 2
6725 ; GENERIC-NEXT: lsli16 a3, a3, 16
6726 ; GENERIC-NEXT: or16 a3, a2
6727 ; GENERIC-NEXT: lsli16 a2, a1, 8
6728 ; GENERIC-NEXT: or16 a2, a3
6729 ; GENERIC-NEXT: or16 a2, a1
6730 ; GENERIC-NEXT: and16 a2, a0
6731 ; GENERIC-NEXT: cmpnei16 a2, 0
6732 ; GENERIC-NEXT: bf16 .LBB147_2
6733 ; GENERIC-NEXT: # %bb.1: # %label1
6734 ; GENERIC-NEXT: movi16 a0, 1
6735 ; GENERIC-NEXT: addi16 sp, sp, 4
6736 ; GENERIC-NEXT: rts16
6737 ; GENERIC-NEXT: .LBB147_2: # %label2
6738 ; GENERIC-NEXT: movi16 a0, 0
6739 ; GENERIC-NEXT: addi16 sp, sp, 4
6740 ; GENERIC-NEXT: rts16
6741 %t0 = and i32 %c, 131072
6742 %t1 = icmp eq i32 %t0, 131072
6743 br i1 %t1, label %label1, label %label2
6750 define i32 @br_bit_test_ne_mask(i32 %c) {
6751 ; CHECK-LABEL: br_bit_test_ne_mask:
6753 ; CHECK-NEXT: btsti16 a0, 17
6754 ; CHECK-NEXT: bt32 .LBB148_2
6755 ; CHECK-NEXT: # %bb.1: # %label1
6756 ; CHECK-NEXT: movi16 a0, 1
6758 ; CHECK-NEXT: .LBB148_2: # %label2
6759 ; CHECK-NEXT: movi16 a0, 0
6762 ; GENERIC-LABEL: br_bit_test_ne_mask:
6764 ; GENERIC-NEXT: .cfi_def_cfa_offset 0
6765 ; GENERIC-NEXT: subi16 sp, sp, 4
6766 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
6767 ; GENERIC-NEXT: movi16 a1, 0
6768 ; GENERIC-NEXT: lsli16 a2, a1, 24
6769 ; GENERIC-NEXT: movi16 a3, 2
6770 ; GENERIC-NEXT: lsli16 a3, a3, 16
6771 ; GENERIC-NEXT: or16 a3, a2
6772 ; GENERIC-NEXT: lsli16 a2, a1, 8
6773 ; GENERIC-NEXT: or16 a2, a3
6774 ; GENERIC-NEXT: or16 a2, a1
6775 ; GENERIC-NEXT: and16 a2, a0
6776 ; GENERIC-NEXT: cmpnei16 a2, 0
6777 ; GENERIC-NEXT: bt16 .LBB148_2
6778 ; GENERIC-NEXT: # %bb.1: # %label1
6779 ; GENERIC-NEXT: movi16 a0, 1
6780 ; GENERIC-NEXT: addi16 sp, sp, 4
6781 ; GENERIC-NEXT: rts16
6782 ; GENERIC-NEXT: .LBB148_2: # %label2
6783 ; GENERIC-NEXT: movi16 a0, 0
6784 ; GENERIC-NEXT: addi16 sp, sp, 4
6785 ; GENERIC-NEXT: rts16
6786 %t0 = and i32 %c, 131072
6787 %t1 = icmp ne i32 %t0, 131072
6788 br i1 %t1, label %label1, label %label2
6795 define i32 @br_lowbit_test_ne_0(i32 %c) {
6796 ; CHECK-LABEL: br_lowbit_test_ne_0:
6798 ; CHECK-NEXT: andi32 a0, a0, 256
6799 ; CHECK-NEXT: bez32 a0, .LBB149_2
6800 ; CHECK-NEXT: # %bb.1: # %label1
6801 ; CHECK-NEXT: movi16 a0, 1
6803 ; CHECK-NEXT: .LBB149_2: # %label2
6804 ; CHECK-NEXT: movi16 a0, 0
6807 ; GENERIC-LABEL: br_lowbit_test_ne_0:
6809 ; GENERIC-NEXT: .cfi_def_cfa_offset 0
6810 ; GENERIC-NEXT: subi16 sp, sp, 4
6811 ; GENERIC-NEXT: .cfi_def_cfa_offset 4
6812 ; GENERIC-NEXT: movi16 a1, 0
6813 ; GENERIC-NEXT: lsli16 a2, a1, 24
6814 ; GENERIC-NEXT: lsli16 a3, a1, 16
6815 ; GENERIC-NEXT: or16 a3, a2
6816 ; GENERIC-NEXT: movi16 a2, 1
6817 ; GENERIC-NEXT: lsli16 a2, a2, 8
6818 ; GENERIC-NEXT: or16 a2, a3
6819 ; GENERIC-NEXT: or16 a2, a1
6820 ; GENERIC-NEXT: and16 a2, a0
6821 ; GENERIC-NEXT: cmpnei16 a2, 0
6822 ; GENERIC-NEXT: bf16 .LBB149_2
6823 ; GENERIC-NEXT: # %bb.1: # %label1
6824 ; GENERIC-NEXT: movi16 a0, 1
6825 ; GENERIC-NEXT: addi16 sp, sp, 4
6826 ; GENERIC-NEXT: rts16
6827 ; GENERIC-NEXT: .LBB149_2: # %label2
6828 ; GENERIC-NEXT: movi16 a0, 0
6829 ; GENERIC-NEXT: addi16 sp, sp, 4
6830 ; GENERIC-NEXT: rts16
6831 %t0 = and i32 %c, 256
6832 %t1 = icmp ne i32 %t0, 0
6833 br i1 %t1, label %label1, label %label2