|
1 | 1 | ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5
|
2 | 2 | ; RUN: llc -O3 -mtriple=arm64-apple-macosx -o - %s | FileCheck %s
|
| 3 | +; RUN: llc -O3 -mtriple=arm64-apple-macosx -global-isel -o - %s | FileCheck --check-prefix=GISEL %s |
3 | 4 |
|
4 | 5 | define i32 @switch_with_matching_dests_0_and_pow2_3_cases(i8 %v) {
|
5 | 6 | ; CHECK-LABEL: switch_with_matching_dests_0_and_pow2_3_cases:
|
@@ -30,6 +31,33 @@ define i32 @switch_with_matching_dests_0_and_pow2_3_cases(i8 %v) {
|
30 | 31 | ; CHECK-NEXT: LBB0_7: ; %e2
|
31 | 32 | ; CHECK-NEXT: mov w0, #30 ; =0x1e
|
32 | 33 | ; CHECK-NEXT: ret
|
| 34 | +; |
| 35 | +; GISEL-LABEL: switch_with_matching_dests_0_and_pow2_3_cases: |
| 36 | +; GISEL: ; %bb.0: ; %entry |
| 37 | +; GISEL-NEXT: mov w8, w0 |
| 38 | +; GISEL-NEXT: mov w0, #20 ; =0x14 |
| 39 | +; GISEL-NEXT: mov w9, #100 ; =0x64 |
| 40 | +; GISEL-NEXT: LBB0_1: ; %loop.header |
| 41 | +; GISEL-NEXT: ; =>This Inner Loop Header: Depth=1 |
| 42 | +; GISEL-NEXT: ands w10, w8, #0xff |
| 43 | +; GISEL-NEXT: b.eq LBB0_5 |
| 44 | +; GISEL-NEXT: ; %bb.2: ; %loop.header |
| 45 | +; GISEL-NEXT: ; in Loop: Header=BB0_1 Depth=1 |
| 46 | +; GISEL-NEXT: cmp w10, #32 |
| 47 | +; GISEL-NEXT: b.eq LBB0_5 |
| 48 | +; GISEL-NEXT: ; %bb.3: ; %loop.header |
| 49 | +; GISEL-NEXT: ; in Loop: Header=BB0_1 Depth=1 |
| 50 | +; GISEL-NEXT: cmp w10, #124 |
| 51 | +; GISEL-NEXT: b.eq LBB0_6 |
| 52 | +; GISEL-NEXT: ; %bb.4: ; %loop.latch |
| 53 | +; GISEL-NEXT: ; in Loop: Header=BB0_1 Depth=1 |
| 54 | +; GISEL-NEXT: subs w9, w9, #1 |
| 55 | +; GISEL-NEXT: b.ne LBB0_1 |
| 56 | +; GISEL-NEXT: LBB0_5: ; %common.ret |
| 57 | +; GISEL-NEXT: ret |
| 58 | +; GISEL-NEXT: LBB0_6: ; %e2 |
| 59 | +; GISEL-NEXT: mov w0, #30 ; =0x1e |
| 60 | +; GISEL-NEXT: ret |
33 | 61 | entry:
|
34 | 62 | br label %loop.header
|
35 | 63 |
|
@@ -82,6 +110,35 @@ define i32 @switch_with_matching_dests_0_and_pow2_3_cases_swapped(i8 %v) {
|
82 | 110 | ; CHECK-NEXT: LBB1_7: ; %e2
|
83 | 111 | ; CHECK-NEXT: mov w0, #30 ; =0x1e
|
84 | 112 | ; CHECK-NEXT: ret
|
| 113 | +; |
| 114 | +; GISEL-LABEL: switch_with_matching_dests_0_and_pow2_3_cases_swapped: |
| 115 | +; GISEL: ; %bb.0: ; %entry |
| 116 | +; GISEL-NEXT: mov w9, #100 ; =0x64 |
| 117 | +; GISEL-NEXT: mov w8, #20 ; =0x14 |
| 118 | +; GISEL-NEXT: LBB1_1: ; %loop.header |
| 119 | +; GISEL-NEXT: ; =>This Inner Loop Header: Depth=1 |
| 120 | +; GISEL-NEXT: ands w10, w0, #0xff |
| 121 | +; GISEL-NEXT: b.eq LBB1_6 |
| 122 | +; GISEL-NEXT: ; %bb.2: ; %loop.header |
| 123 | +; GISEL-NEXT: ; in Loop: Header=BB1_1 Depth=1 |
| 124 | +; GISEL-NEXT: cmp w10, #32 |
| 125 | +; GISEL-NEXT: b.eq LBB1_6 |
| 126 | +; GISEL-NEXT: ; %bb.3: ; %loop.header |
| 127 | +; GISEL-NEXT: ; in Loop: Header=BB1_1 Depth=1 |
| 128 | +; GISEL-NEXT: cmp w10, #124 |
| 129 | +; GISEL-NEXT: b.eq LBB1_7 |
| 130 | +; GISEL-NEXT: ; %bb.4: ; %loop.latch |
| 131 | +; GISEL-NEXT: ; in Loop: Header=BB1_1 Depth=1 |
| 132 | +; GISEL-NEXT: subs w9, w9, #1 |
| 133 | +; GISEL-NEXT: b.ne LBB1_1 |
| 134 | +; GISEL-NEXT: ; %bb.5: |
| 135 | +; GISEL-NEXT: mov w8, #10 ; =0xa |
| 136 | +; GISEL-NEXT: LBB1_6: ; %common.ret |
| 137 | +; GISEL-NEXT: mov w0, w8 |
| 138 | +; GISEL-NEXT: ret |
| 139 | +; GISEL-NEXT: LBB1_7: ; %e2 |
| 140 | +; GISEL-NEXT: mov w0, #30 ; =0x1e |
| 141 | +; GISEL-NEXT: ret |
85 | 142 | entry:
|
86 | 143 | br label %loop.header
|
87 | 144 |
|
@@ -142,6 +199,38 @@ define i32 @switch_with_matching_dests_0_and_pow2_3_cases_with_phi(i8 %v, i1 %c)
|
142 | 199 | ; CHECK-NEXT: LBB2_9: ; %e2
|
143 | 200 | ; CHECK-NEXT: mov w0, #30 ; =0x1e
|
144 | 201 | ; CHECK-NEXT: ret
|
| 202 | +; |
| 203 | +; GISEL-LABEL: switch_with_matching_dests_0_and_pow2_3_cases_with_phi: |
| 204 | +; GISEL: ; %bb.0: ; %entry |
| 205 | +; GISEL-NEXT: mov w8, wzr |
| 206 | +; GISEL-NEXT: tbz w1, #0, LBB2_7 |
| 207 | +; GISEL-NEXT: ; %bb.1: ; %loop.header.preheader |
| 208 | +; GISEL-NEXT: mov w9, #100 ; =0x64 |
| 209 | +; GISEL-NEXT: mov w8, #20 ; =0x14 |
| 210 | +; GISEL-NEXT: LBB2_2: ; %loop.header |
| 211 | +; GISEL-NEXT: ; =>This Inner Loop Header: Depth=1 |
| 212 | +; GISEL-NEXT: ands w10, w0, #0xff |
| 213 | +; GISEL-NEXT: b.eq LBB2_7 |
| 214 | +; GISEL-NEXT: ; %bb.3: ; %loop.header |
| 215 | +; GISEL-NEXT: ; in Loop: Header=BB2_2 Depth=1 |
| 216 | +; GISEL-NEXT: cmp w10, #32 |
| 217 | +; GISEL-NEXT: b.eq LBB2_7 |
| 218 | +; GISEL-NEXT: ; %bb.4: ; %loop.header |
| 219 | +; GISEL-NEXT: ; in Loop: Header=BB2_2 Depth=1 |
| 220 | +; GISEL-NEXT: cmp w10, #124 |
| 221 | +; GISEL-NEXT: b.eq LBB2_8 |
| 222 | +; GISEL-NEXT: ; %bb.5: ; %loop.latch |
| 223 | +; GISEL-NEXT: ; in Loop: Header=BB2_2 Depth=1 |
| 224 | +; GISEL-NEXT: subs w9, w9, #1 |
| 225 | +; GISEL-NEXT: b.ne LBB2_2 |
| 226 | +; GISEL-NEXT: ; %bb.6: |
| 227 | +; GISEL-NEXT: mov w8, #10 ; =0xa |
| 228 | +; GISEL-NEXT: LBB2_7: ; %common.ret |
| 229 | +; GISEL-NEXT: mov w0, w8 |
| 230 | +; GISEL-NEXT: ret |
| 231 | +; GISEL-NEXT: LBB2_8: ; %e2 |
| 232 | +; GISEL-NEXT: mov w0, #30 ; =0x1e |
| 233 | +; GISEL-NEXT: ret |
145 | 234 | entry:
|
146 | 235 | br i1 %c, label %then, label %e1
|
147 | 236 |
|
@@ -204,6 +293,38 @@ define i32 @switch_with_matching_dests_0_and_pow2_3_cases_all_different_succs(i8
|
204 | 293 | ; CHECK-NEXT: LBB3_8:
|
205 | 294 | ; CHECK-NEXT: mov w0, #20 ; =0x14
|
206 | 295 | ; CHECK-NEXT: ret
|
| 296 | +; |
| 297 | +; GISEL-LABEL: switch_with_matching_dests_0_and_pow2_3_cases_all_different_succs: |
| 298 | +; GISEL: ; %bb.0: ; %entry |
| 299 | +; GISEL-NEXT: mov w8, #100 ; =0x64 |
| 300 | +; GISEL-NEXT: LBB3_1: ; %loop.header |
| 301 | +; GISEL-NEXT: ; =>This Inner Loop Header: Depth=1 |
| 302 | +; GISEL-NEXT: ands w9, w0, #0xff |
| 303 | +; GISEL-NEXT: b.eq LBB3_6 |
| 304 | +; GISEL-NEXT: ; %bb.2: ; %loop.header |
| 305 | +; GISEL-NEXT: ; in Loop: Header=BB3_1 Depth=1 |
| 306 | +; GISEL-NEXT: cmp w9, #32 |
| 307 | +; GISEL-NEXT: b.eq LBB3_8 |
| 308 | +; GISEL-NEXT: ; %bb.3: ; %loop.header |
| 309 | +; GISEL-NEXT: ; in Loop: Header=BB3_1 Depth=1 |
| 310 | +; GISEL-NEXT: cmp w9, #124 |
| 311 | +; GISEL-NEXT: b.eq LBB3_7 |
| 312 | +; GISEL-NEXT: ; %bb.4: ; %loop.latch |
| 313 | +; GISEL-NEXT: ; in Loop: Header=BB3_1 Depth=1 |
| 314 | +; GISEL-NEXT: subs w8, w8, #1 |
| 315 | +; GISEL-NEXT: b.ne LBB3_1 |
| 316 | +; GISEL-NEXT: ; %bb.5: |
| 317 | +; GISEL-NEXT: mov w0, #10 ; =0xa |
| 318 | +; GISEL-NEXT: ret |
| 319 | +; GISEL-NEXT: LBB3_6: ; %e2 |
| 320 | +; GISEL-NEXT: mov w0, #30 ; =0x1e |
| 321 | +; GISEL-NEXT: ret |
| 322 | +; GISEL-NEXT: LBB3_7: ; %e3 |
| 323 | +; GISEL-NEXT: mov w0, #40 ; =0x28 |
| 324 | +; GISEL-NEXT: ret |
| 325 | +; GISEL-NEXT: LBB3_8: |
| 326 | +; GISEL-NEXT: mov w0, #20 ; =0x14 |
| 327 | +; GISEL-NEXT: ret |
207 | 328 | entry:
|
208 | 329 | br label %loop.header
|
209 | 330 |
|
@@ -255,6 +376,28 @@ define i32 @switch_in_loop_with_matching_dests_0_and_pow2_3_cases(ptr %start) {
|
255 | 376 | ; CHECK-NEXT: LBB4_5: ; %e2.loopexit
|
256 | 377 | ; CHECK-NEXT: mov w0, wzr
|
257 | 378 | ; CHECK-NEXT: ret
|
| 379 | +; |
| 380 | +; GISEL-LABEL: switch_in_loop_with_matching_dests_0_and_pow2_3_cases: |
| 381 | +; GISEL: ; %bb.0: ; %entry |
| 382 | +; GISEL-NEXT: add x8, x0, #1 |
| 383 | +; GISEL-NEXT: LBB4_1: ; %loop |
| 384 | +; GISEL-NEXT: ; =>This Inner Loop Header: Depth=1 |
| 385 | +; GISEL-NEXT: ldrb w9, [x8], #1 |
| 386 | +; GISEL-NEXT: cbz w9, LBB4_4 |
| 387 | +; GISEL-NEXT: ; %bb.2: ; %loop |
| 388 | +; GISEL-NEXT: ; in Loop: Header=BB4_1 Depth=1 |
| 389 | +; GISEL-NEXT: cmp w9, #124 |
| 390 | +; GISEL-NEXT: b.eq LBB4_5 |
| 391 | +; GISEL-NEXT: ; %bb.3: ; %loop |
| 392 | +; GISEL-NEXT: ; in Loop: Header=BB4_1 Depth=1 |
| 393 | +; GISEL-NEXT: cmp w9, #32 |
| 394 | +; GISEL-NEXT: b.ne LBB4_1 |
| 395 | +; GISEL-NEXT: LBB4_4: ; %e1 |
| 396 | +; GISEL-NEXT: mov w0, #-1 ; =0xffffffff |
| 397 | +; GISEL-NEXT: ret |
| 398 | +; GISEL-NEXT: LBB4_5: ; %e2.loopexit |
| 399 | +; GISEL-NEXT: mov w0, wzr |
| 400 | +; GISEL-NEXT: ret |
258 | 401 | entry:
|
259 | 402 | br label %loop
|
260 | 403 |
|
@@ -304,6 +447,34 @@ define i32 @switch_in_loop_with_matching_dests_0_and_pow2_4_cases(ptr %start) {
|
304 | 447 | ; CHECK-NEXT: LBB5_5: ; %e2.loopexit
|
305 | 448 | ; CHECK-NEXT: mov w0, wzr
|
306 | 449 | ; CHECK-NEXT: ret
|
| 450 | +; |
| 451 | +; GISEL-LABEL: switch_in_loop_with_matching_dests_0_and_pow2_4_cases: |
| 452 | +; GISEL: ; %bb.0: ; %entry |
| 453 | +; GISEL-NEXT: mov x10, #32769 ; =0x8001 |
| 454 | +; GISEL-NEXT: mov w8, #1 ; =0x1 |
| 455 | +; GISEL-NEXT: add x9, x0, #1 |
| 456 | +; GISEL-NEXT: movk x10, #1, lsl #32 |
| 457 | +; GISEL-NEXT: b LBB5_2 |
| 458 | +; GISEL-NEXT: LBB5_1: ; %loop |
| 459 | +; GISEL-NEXT: ; in Loop: Header=BB5_2 Depth=1 |
| 460 | +; GISEL-NEXT: cmp w11, #124 |
| 461 | +; GISEL-NEXT: b.eq LBB5_5 |
| 462 | +; GISEL-NEXT: LBB5_2: ; %loop |
| 463 | +; GISEL-NEXT: ; =>This Inner Loop Header: Depth=1 |
| 464 | +; GISEL-NEXT: ldrb w11, [x9], #1 |
| 465 | +; GISEL-NEXT: cmp w11, #32 |
| 466 | +; GISEL-NEXT: b.hi LBB5_1 |
| 467 | +; GISEL-NEXT: ; %bb.3: ; %loop |
| 468 | +; GISEL-NEXT: ; in Loop: Header=BB5_2 Depth=1 |
| 469 | +; GISEL-NEXT: lsl x12, x8, x11 |
| 470 | +; GISEL-NEXT: tst x12, x10 |
| 471 | +; GISEL-NEXT: b.eq LBB5_1 |
| 472 | +; GISEL-NEXT: ; %bb.4: ; %e1 |
| 473 | +; GISEL-NEXT: mov w0, #-1 ; =0xffffffff |
| 474 | +; GISEL-NEXT: ret |
| 475 | +; GISEL-NEXT: LBB5_5: ; %e2.loopexit |
| 476 | +; GISEL-NEXT: mov w0, wzr |
| 477 | +; GISEL-NEXT: ret |
307 | 478 | entry:
|
308 | 479 | br label %loop
|
309 | 480 |
|
@@ -348,6 +519,28 @@ define i32 @switch_in_loop_with_matching_dests_0_and_non_pow2(ptr %start) {
|
348 | 519 | ; CHECK-NEXT: LBB6_5: ; %e2
|
349 | 520 | ; CHECK-NEXT: mov w0, #10 ; =0xa
|
350 | 521 | ; CHECK-NEXT: ret
|
| 522 | +; |
| 523 | +; GISEL-LABEL: switch_in_loop_with_matching_dests_0_and_non_pow2: |
| 524 | +; GISEL: ; %bb.0: ; %entry |
| 525 | +; GISEL-NEXT: add x8, x0, #1 |
| 526 | +; GISEL-NEXT: LBB6_1: ; %loop |
| 527 | +; GISEL-NEXT: ; =>This Inner Loop Header: Depth=1 |
| 528 | +; GISEL-NEXT: ldrb w9, [x8], #1 |
| 529 | +; GISEL-NEXT: cmp w9, #35 |
| 530 | +; GISEL-NEXT: b.eq LBB6_4 |
| 531 | +; GISEL-NEXT: ; %bb.2: ; %loop |
| 532 | +; GISEL-NEXT: ; in Loop: Header=BB6_1 Depth=1 |
| 533 | +; GISEL-NEXT: cmp w9, #33 |
| 534 | +; GISEL-NEXT: b.eq LBB6_5 |
| 535 | +; GISEL-NEXT: ; %bb.3: ; %loop |
| 536 | +; GISEL-NEXT: ; in Loop: Header=BB6_1 Depth=1 |
| 537 | +; GISEL-NEXT: cbnz w9, LBB6_1 |
| 538 | +; GISEL-NEXT: LBB6_4: ; %common.ret.loopexit |
| 539 | +; GISEL-NEXT: mov w0, #-1 ; =0xffffffff |
| 540 | +; GISEL-NEXT: ret |
| 541 | +; GISEL-NEXT: LBB6_5: ; %e2 |
| 542 | +; GISEL-NEXT: mov w0, #10 ; =0xa |
| 543 | +; GISEL-NEXT: ret |
351 | 544 | entry:
|
352 | 545 | br label %loop
|
353 | 546 |
|
@@ -381,6 +574,22 @@ define void @test_successor_with_loop_phi(ptr %A, ptr %B) {
|
381 | 574 | ; CHECK-NEXT: b.eq LBB7_1
|
382 | 575 | ; CHECK-NEXT: ; %bb.2: ; %exit
|
383 | 576 | ; CHECK-NEXT: ret
|
| 577 | +; |
| 578 | +; GISEL-LABEL: test_successor_with_loop_phi: |
| 579 | +; GISEL: ; %bb.0: ; %entry |
| 580 | +; GISEL-NEXT: LBB7_1: ; %loop |
| 581 | +; GISEL-NEXT: ; =>This Inner Loop Header: Depth=1 |
| 582 | +; GISEL-NEXT: ldr w8, [x0] |
| 583 | +; GISEL-NEXT: str wzr, [x0] |
| 584 | +; GISEL-NEXT: mov x0, x1 |
| 585 | +; GISEL-NEXT: cbz w8, LBB7_1 |
| 586 | +; GISEL-NEXT: ; %bb.2: ; %loop |
| 587 | +; GISEL-NEXT: ; in Loop: Header=BB7_1 Depth=1 |
| 588 | +; GISEL-NEXT: cmp w8, #4 |
| 589 | +; GISEL-NEXT: mov x0, x1 |
| 590 | +; GISEL-NEXT: b.eq LBB7_1 |
| 591 | +; GISEL-NEXT: ; %bb.3: ; %exit |
| 592 | +; GISEL-NEXT: ret |
384 | 593 | entry:
|
385 | 594 | br label %loop
|
386 | 595 |
|
@@ -423,6 +632,32 @@ define i64 @consecutive_match_both(ptr %p, i32 %param) {
|
423 | 632 | ; CHECK-NEXT: LBB8_5:
|
424 | 633 | ; CHECK-NEXT: mov x0, #-42 ; =0xffffffffffffffd6
|
425 | 634 | ; CHECK-NEXT: ret
|
| 635 | +; |
| 636 | +; GISEL-LABEL: consecutive_match_both: |
| 637 | +; GISEL: ; %bb.0: ; %entry |
| 638 | +; GISEL-NEXT: mov w8, #1 ; =0x1 |
| 639 | +; GISEL-NEXT: mov w9, #100 ; =0x64 |
| 640 | +; GISEL-NEXT: mov w10, #249 ; =0xf9 |
| 641 | +; GISEL-NEXT: lsl w8, w8, w1 |
| 642 | +; GISEL-NEXT: b LBB8_2 |
| 643 | +; GISEL-NEXT: LBB8_1: ; %loop.latch |
| 644 | +; GISEL-NEXT: ; in Loop: Header=BB8_2 Depth=1 |
| 645 | +; GISEL-NEXT: subs w9, w9, #1 |
| 646 | +; GISEL-NEXT: b.eq LBB8_5 |
| 647 | +; GISEL-NEXT: LBB8_2: ; %loop.header |
| 648 | +; GISEL-NEXT: ; =>This Inner Loop Header: Depth=1 |
| 649 | +; GISEL-NEXT: cmp w1, #7 |
| 650 | +; GISEL-NEXT: b.hi LBB8_1 |
| 651 | +; GISEL-NEXT: ; %bb.3: ; %loop.header |
| 652 | +; GISEL-NEXT: ; in Loop: Header=BB8_2 Depth=1 |
| 653 | +; GISEL-NEXT: tst w8, w10 |
| 654 | +; GISEL-NEXT: b.eq LBB8_1 |
| 655 | +; GISEL-NEXT: ; %bb.4: ; %e0 |
| 656 | +; GISEL-NEXT: mov x0, xzr |
| 657 | +; GISEL-NEXT: ret |
| 658 | +; GISEL-NEXT: LBB8_5: |
| 659 | +; GISEL-NEXT: mov x0, #-42 ; =0xffffffffffffffd6 |
| 660 | +; GISEL-NEXT: ret |
426 | 661 | entry:
|
427 | 662 | br label %loop.header
|
428 | 663 |
|
@@ -477,6 +712,32 @@ define i64 @consecutive_match_before(ptr %p, i32 %param) {
|
477 | 712 | ; CHECK-NEXT: LBB9_5:
|
478 | 713 | ; CHECK-NEXT: mov x0, #-42 ; =0xffffffffffffffd6
|
479 | 714 | ; CHECK-NEXT: ret
|
| 715 | +; |
| 716 | +; GISEL-LABEL: consecutive_match_before: |
| 717 | +; GISEL: ; %bb.0: ; %entry |
| 718 | +; GISEL-NEXT: mov w8, #1 ; =0x1 |
| 719 | +; GISEL-NEXT: mov w9, #100 ; =0x64 |
| 720 | +; GISEL-NEXT: mov w10, #25 ; =0x19 |
| 721 | +; GISEL-NEXT: lsl w8, w8, w1 |
| 722 | +; GISEL-NEXT: b LBB9_2 |
| 723 | +; GISEL-NEXT: LBB9_1: ; %loop.latch |
| 724 | +; GISEL-NEXT: ; in Loop: Header=BB9_2 Depth=1 |
| 725 | +; GISEL-NEXT: subs w9, w9, #1 |
| 726 | +; GISEL-NEXT: b.eq LBB9_5 |
| 727 | +; GISEL-NEXT: LBB9_2: ; %loop.header |
| 728 | +; GISEL-NEXT: ; =>This Inner Loop Header: Depth=1 |
| 729 | +; GISEL-NEXT: cmp w1, #4 |
| 730 | +; GISEL-NEXT: b.hi LBB9_1 |
| 731 | +; GISEL-NEXT: ; %bb.3: ; %loop.header |
| 732 | +; GISEL-NEXT: ; in Loop: Header=BB9_2 Depth=1 |
| 733 | +; GISEL-NEXT: tst w8, w10 |
| 734 | +; GISEL-NEXT: b.eq LBB9_1 |
| 735 | +; GISEL-NEXT: ; %bb.4: ; %e0 |
| 736 | +; GISEL-NEXT: mov x0, xzr |
| 737 | +; GISEL-NEXT: ret |
| 738 | +; GISEL-NEXT: LBB9_5: |
| 739 | +; GISEL-NEXT: mov x0, #-42 ; =0xffffffffffffffd6 |
| 740 | +; GISEL-NEXT: ret |
480 | 741 | entry:
|
481 | 742 | br label %loop.header
|
482 | 743 |
|
@@ -528,6 +789,32 @@ define i64 @consecutive_match_after(ptr %p, i32 %param) {
|
528 | 789 | ; CHECK-NEXT: LBB10_5:
|
529 | 790 | ; CHECK-NEXT: mov x0, #-42 ; =0xffffffffffffffd6
|
530 | 791 | ; CHECK-NEXT: ret
|
| 792 | +; |
| 793 | +; GISEL-LABEL: consecutive_match_after: |
| 794 | +; GISEL: ; %bb.0: ; %entry |
| 795 | +; GISEL-NEXT: mov w8, #1 ; =0x1 |
| 796 | +; GISEL-NEXT: mov w9, #100 ; =0x64 |
| 797 | +; GISEL-NEXT: mov w10, #49 ; =0x31 |
| 798 | +; GISEL-NEXT: lsl w8, w8, w1 |
| 799 | +; GISEL-NEXT: b LBB10_2 |
| 800 | +; GISEL-NEXT: LBB10_1: ; %loop.latch |
| 801 | +; GISEL-NEXT: ; in Loop: Header=BB10_2 Depth=1 |
| 802 | +; GISEL-NEXT: subs w9, w9, #1 |
| 803 | +; GISEL-NEXT: b.eq LBB10_5 |
| 804 | +; GISEL-NEXT: LBB10_2: ; %loop.header |
| 805 | +; GISEL-NEXT: ; =>This Inner Loop Header: Depth=1 |
| 806 | +; GISEL-NEXT: cmp w1, #5 |
| 807 | +; GISEL-NEXT: b.hi LBB10_1 |
| 808 | +; GISEL-NEXT: ; %bb.3: ; %loop.header |
| 809 | +; GISEL-NEXT: ; in Loop: Header=BB10_2 Depth=1 |
| 810 | +; GISEL-NEXT: tst w8, w10 |
| 811 | +; GISEL-NEXT: b.eq LBB10_1 |
| 812 | +; GISEL-NEXT: ; %bb.4: ; %e0 |
| 813 | +; GISEL-NEXT: mov x0, xzr |
| 814 | +; GISEL-NEXT: ret |
| 815 | +; GISEL-NEXT: LBB10_5: |
| 816 | +; GISEL-NEXT: mov x0, #-42 ; =0xffffffffffffffd6 |
| 817 | +; GISEL-NEXT: ret |
531 | 818 | entry:
|
532 | 819 | br label %loop.header
|
533 | 820 |
|
@@ -573,6 +860,26 @@ define void @merge_with_stores(ptr %A, i16 %v) {
|
573 | 860 | ; CHECK-NEXT: strh w8, [x0, #36]
|
574 | 861 | ; CHECK-NEXT: LBB11_5: ; %pow2.dst
|
575 | 862 | ; CHECK-NEXT: ret
|
| 863 | +; |
| 864 | +; GISEL-LABEL: merge_with_stores: |
| 865 | +; GISEL: ; %bb.0: ; %entry |
| 866 | +; GISEL-NEXT: and w8, w1, #0xffff |
| 867 | +; GISEL-NEXT: sub w9, w8, #10 |
| 868 | +; GISEL-NEXT: cmp w9, #1 |
| 869 | +; GISEL-NEXT: b.ls LBB11_4 |
| 870 | +; GISEL-NEXT: ; %bb.1: ; %entry |
| 871 | +; GISEL-NEXT: cbz w8, LBB11_5 |
| 872 | +; GISEL-NEXT: ; %bb.2: ; %entry |
| 873 | +; GISEL-NEXT: cmp w8, #2 |
| 874 | +; GISEL-NEXT: b.eq LBB11_5 |
| 875 | +; GISEL-NEXT: ; %bb.3: ; %default.dst |
| 876 | +; GISEL-NEXT: strh wzr, [x0] |
| 877 | +; GISEL-NEXT: ret |
| 878 | +; GISEL-NEXT: LBB11_4: ; %other.dst |
| 879 | +; GISEL-NEXT: mov w8, #1 ; =0x1 |
| 880 | +; GISEL-NEXT: strh w8, [x0, #36] |
| 881 | +; GISEL-NEXT: LBB11_5: ; %pow2.dst |
| 882 | +; GISEL-NEXT: ret |
576 | 883 | entry:
|
577 | 884 | switch i16 %v, label %default.dst [
|
578 | 885 | i16 10, label %other.dst
|
|
0 commit comments