|
100 | 100 | ret void
|
101 | 101 | }
|
102 | 102 |
|
| 103 | + define i64 @vsetvli_vleff() { |
| 104 | + entry: |
| 105 | + br label %while.cond |
| 106 | + |
| 107 | + while.cond: |
| 108 | + %new_vl.0 = phi i64 [ 0, %entry ], [ %1, %while.body ] |
| 109 | + %cmp = icmp eq i64 %new_vl.0, 0 |
| 110 | + br i1 %cmp, label %while.body, label %while.end |
| 111 | + |
| 112 | + while.body: |
| 113 | + %0 = tail call { <vscale x 4 x i16>, i64 } @llvm.riscv.vleff.nxv4i16.i64(<vscale x 4 x i16> zeroinitializer, ptr null, i64 0) |
| 114 | + %1 = extractvalue { <vscale x 4 x i16>, i64 } %0, 1 |
| 115 | + br label %while.cond |
| 116 | + |
| 117 | + while.end: |
| 118 | + ret i64 0 |
| 119 | + } |
| 120 | + |
103 | 121 | declare <vscale x 1 x i64> @llvm.riscv.vadd.nxv1i64.nxv1i64.i64(<vscale x 1 x i64>, <vscale x 1 x i64>, <vscale x 1 x i64>, i64) #1
|
104 | 122 |
|
105 | 123 | declare <vscale x 1 x i64> @llvm.riscv.vle.nxv1i64.i64(<vscale x 1 x i64>, ptr nocapture, i64) #4
|
@@ -622,3 +640,75 @@ body: |
|
622 | 640 | dead $x0 = PseudoVSETIVLI 1, 208, implicit-def $vl, implicit-def $vtype
|
623 | 641 | %v:vr = COPY $v8, implicit $vtype
|
624 | 642 | %x = PseudoVSETVLI %x, 208, implicit-def $vl, implicit-def $vtype
|
| 643 | +... |
| 644 | +--- |
| 645 | +name: vsetvli_vleff |
| 646 | +alignment: 4 |
| 647 | +tracksRegLiveness: true |
| 648 | +registers: |
| 649 | + - { id: 0, class: gpr, preferred-register: '' } |
| 650 | + - { id: 1, class: gpr, preferred-register: '' } |
| 651 | + - { id: 2, class: gpr, preferred-register: '' } |
| 652 | + - { id: 3, class: gpr, preferred-register: '' } |
| 653 | + - { id: 4, class: gpr, preferred-register: '' } |
| 654 | + - { id: 5, class: vr, preferred-register: '%7' } |
| 655 | + - { id: 6, class: gpr, preferred-register: '' } |
| 656 | + - { id: 7, class: vr, preferred-register: '%5' } |
| 657 | + - { id: 8, class: vr, preferred-register: '' } |
| 658 | + - { id: 9, class: gpr, preferred-register: '' } |
| 659 | +frameInfo: |
| 660 | + maxAlignment: 1 |
| 661 | +machineFunctionInfo: {} |
| 662 | +body: | |
| 663 | + ; CHECK-LABEL: name: vsetvli_vleff |
| 664 | + ; CHECK: bb.0.entry: |
| 665 | + ; CHECK-NEXT: successors: %bb.1(0x80000000) |
| 666 | + ; CHECK-NEXT: {{ $}} |
| 667 | + ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr = COPY $x0 |
| 668 | + ; CHECK-NEXT: dead [[PseudoVSETVLIX0_:%[0-9]+]]:gprnox0 = PseudoVSETVLIX0 killed $x0, 200 /* e16, m1, ta, ma */, implicit-def $vl, implicit-def $vtype |
| 669 | + ; CHECK-NEXT: renamable $v8 = PseudoVMV_V_I_M1 undef renamable $v8, 0, -1, 4 /* e16 */, 0 /* tu, mu */, implicit $vl, implicit $vtype |
| 670 | + ; CHECK-NEXT: {{ $}} |
| 671 | + ; CHECK-NEXT: bb.1.while.cond: |
| 672 | + ; CHECK-NEXT: successors: %bb.2(0x7c000000), %bb.3(0x04000000) |
| 673 | + ; CHECK-NEXT: liveins: $v8 |
| 674 | + ; CHECK-NEXT: {{ $}} |
| 675 | + ; CHECK-NEXT: BNE [[COPY]], $x0, %bb.3 |
| 676 | + ; CHECK-NEXT: PseudoBR %bb.2 |
| 677 | + ; CHECK-NEXT: {{ $}} |
| 678 | + ; CHECK-NEXT: bb.2.while.body: |
| 679 | + ; CHECK-NEXT: successors: %bb.1(0x80000000) |
| 680 | + ; CHECK-NEXT: liveins: $v8 |
| 681 | + ; CHECK-NEXT: {{ $}} |
| 682 | + ; CHECK-NEXT: $x0 = PseudoVSETIVLI 0, 136 /* e16, m1, tu, ma */, implicit-def $vl, implicit-def $vtype |
| 683 | + ; CHECK-NEXT: renamable $v9 = COPY renamable $v8, implicit $vtype |
| 684 | + ; CHECK-NEXT: dead renamable $v9, $x0 = PseudoVLE16FF_V_M1 killed renamable $v9, $x0, 0, 4 /* e16 */, 2 /* tu, ma */, implicit-def dead $vl, implicit $vl, implicit $vtype :: (load unknown-size from `ptr null`, align 2) |
| 685 | + ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr = PseudoReadVL implicit $vl |
| 686 | + ; CHECK-NEXT: PseudoBR %bb.1 |
| 687 | + ; CHECK-NEXT: {{ $}} |
| 688 | + ; CHECK-NEXT: bb.3.while.end: |
| 689 | + ; CHECK-NEXT: $x10 = COPY $x0 |
| 690 | + ; CHECK-NEXT: PseudoRET implicit killed $x10 |
| 691 | + bb.0.entry: |
| 692 | + successors: %bb.1(0x80000000) |
| 693 | +
|
| 694 | + %9:gpr = COPY $x0 |
| 695 | + renamable $v8 = PseudoVMV_V_I_M1 undef renamable $v8, 0, -1, 4 /* e16 */, 0 /* tu, mu */ |
| 696 | +
|
| 697 | + bb.1.while.cond: |
| 698 | + successors: %bb.2(0x7c000000), %bb.3(0x04000000) |
| 699 | + liveins: $v8 |
| 700 | +
|
| 701 | + BNE %9, $x0, %bb.3 |
| 702 | + PseudoBR %bb.2 |
| 703 | +
|
| 704 | + bb.2.while.body: |
| 705 | + successors: %bb.1(0x80000000) |
| 706 | + liveins: $v8 |
| 707 | +
|
| 708 | + renamable $v9 = COPY renamable $v8 |
| 709 | + dead renamable $v9, %9:gpr = PseudoVLE16FF_V_M1 killed renamable $v9, $x0, 0, 4 /* e16 */, 2 /* tu, ma */, implicit-def dead $vl :: (load unknown-size from `ptr null`, align 2) |
| 710 | + PseudoBR %bb.1 |
| 711 | +
|
| 712 | + bb.3.while.end: |
| 713 | + $x10 = COPY $x0 |
| 714 | + PseudoRET implicit killed $x10 |
0 commit comments