|
1 | 1 | # RUN: llc -run-pass=aarch64-expand-pseudo -mtriple=arm64-apple-ios -o - -emit-call-site-info %s | FileCheck %s
|
2 | 2 |
|
3 |
| -# CHECK-LABEL: test_1_callsite_info |
4 |
| -# CHECK: bb.0.entry: |
| 3 | +--- | |
| 4 | + define void @test_1_callsite_info() { |
| 5 | + ret void |
| 6 | + } |
| 7 | + |
| 8 | + define void @test_bl_pass_x0_arg() { |
| 9 | + ret void |
| 10 | + } |
| 11 | + |
| 12 | + define void @test_bl_pass_x0_x1_x2_args() { |
| 13 | + ret void |
| 14 | + } |
| 15 | + |
| 16 | + define void @test_bl_pass_w0_w1_args() { |
| 17 | + ret void |
| 18 | + } |
| 19 | + |
| 20 | + define void @test_blr_pass_w0_w1_args() { |
| 21 | + ret void |
| 22 | + } |
| 23 | + |
| 24 | + define void @foo(i32 %a) { |
| 25 | + ret void |
| 26 | + } |
| 27 | + |
| 28 | +... |
| 29 | +--- |
| 30 | + |
| 31 | +# CHECK-LABEL: : test_1_callsite_info |
| 32 | +# CHECK: bb.0: |
5 | 33 | # CHECK-NEXT: BUNDLE implicit-def $lr, implicit-def $w30, implicit-def $sp, implicit-def $wsp, implicit-def dead $x0, implicit-def $fp, implicit-def $w29, implicit $x0, implicit $sp, implicit $xzr, implicit $fp {
|
6 | 34 | # CHECK-NEXT: BLR $x0, csr_aarch64_aapcs, implicit-def $lr, implicit $sp, implicit-def dead $lr, implicit $sp, implicit-def $sp, implicit-def dead $x0
|
7 | 35 | # CHECK-NEXT: ORRXrs $xzr, $fp, 0
|
8 | 36 | # CHECK-NEXT: }
|
9 | 37 | # CHECK-NEXT: RET undef $lr, implicit killed $w0
|
10 |
| ---- |
| 38 | +# |
11 | 39 | name: test_1_callsite_info
|
12 | 40 | callSites:
|
13 | 41 | - {bb: 0, offset: 0, fwdArgRegs:
|
14 | 42 | - { arg: 0, reg: '$x0' } }
|
15 | 43 | body: |
|
16 |
| - bb.0.entry: |
| 44 | + bb.0: |
17 | 45 | liveins: $lr, $x0
|
18 | 46 |
|
19 | 47 | BLR_RVMARKER $x0, csr_aarch64_aapcs, implicit-def dead $lr, implicit $sp, implicit-def $sp, implicit-def dead $x0
|
20 | 48 | RET_ReallyLR implicit killed $w0
|
21 | 49 | ...
|
| 50 | + |
| 51 | +# CHECK-LABEL: : test_bl_pass_x0_arg |
| 52 | +# CHECK: bb.0: |
| 53 | +# CHECK-NEXT: BUNDLE implicit-def $lr, implicit-def $w30, implicit-def $sp, implicit-def $wsp, implicit-def dead $x0, implicit-def $fp, implicit-def $w29, implicit $sp, implicit $x0, implicit $xzr, implicit $fp { |
| 54 | +# CHECK-NEXT: BL @foo, csr_aarch64_aapcs, implicit-def $lr, implicit $sp, implicit $x0, implicit-def dead $lr, implicit $sp, implicit-def $sp, implicit-def dead $x0 |
| 55 | +# CHECK-NEXT: $fp = ORRXrs $xzr, $fp, 0 |
| 56 | +# CHECK-NEXT: } |
| 57 | +# CHECK-NEXT: RET undef $lr, implicit killed $w0 |
| 58 | +# |
| 59 | +name: test_bl_pass_x0_arg |
| 60 | +body: | |
| 61 | + bb.0: |
| 62 | + liveins: $lr, $x0 |
| 63 | +
|
| 64 | + BLR_RVMARKER @foo, $x0, csr_aarch64_aapcs, implicit-def dead $lr, implicit $sp, implicit-def $sp, implicit-def dead $x0 |
| 65 | + RET_ReallyLR implicit killed $w0 |
| 66 | +... |
| 67 | + |
| 68 | +# CHECK-LABEL: : test_bl_pass_x0_x1_x2_args |
| 69 | +# CHECK: bb.0: |
| 70 | +# CHECK-NEXT: BUNDLE implicit-def $lr, implicit-def $w30, implicit-def $sp, implicit-def $wsp, implicit-def $x0, implicit-def $w0, implicit-def $fp, implicit-def $w29, implicit $sp, implicit $x0, implicit $x1, implicit $x2, implicit $xzr, implicit $fp { |
| 71 | +# CHECK-NEXT: BL @foo, csr_aarch64_aapcs, implicit-def $lr, implicit $sp, implicit $x0, implicit $x1, implicit $x2, implicit-def dead $lr, implicit $sp, implicit-def $sp, implicit-def $x0 |
| 72 | +# CHECK-NEXT: $fp = ORRXrs $xzr, $fp, 0 |
| 73 | +# CHECK-NEXT: } |
| 74 | +# CHECK-NEXT: RET undef $lr |
| 75 | +# |
| 76 | +name: test_bl_pass_x0_x1_x2_args |
| 77 | +body: | |
| 78 | + bb.0: |
| 79 | + liveins: $lr, $x0, $x1, $x2 |
| 80 | +
|
| 81 | + BLR_RVMARKER @foo, $x0, $x1, $x2, csr_aarch64_aapcs, implicit-def dead $lr, implicit $sp, implicit-def $sp, implicit-def $x0 |
| 82 | + RET_ReallyLR |
| 83 | +... |
| 84 | + |
| 85 | +# CHECK-LABEL: : test_bl_pass_w0_w1_args |
| 86 | +# CHECK: bb.0: |
| 87 | +# CHECK-NEXT: BUNDLE implicit-def $lr, implicit-def $w30, implicit-def $sp, implicit-def $wsp, implicit-def dead $x0, implicit-def $fp, implicit-def $w29, implicit $sp, implicit $w0, implicit $w1, implicit $xzr, implicit $fp { |
| 88 | +# CHECK-NEXT: BL @foo, csr_aarch64_aapcs, implicit-def $lr, implicit $sp, implicit $w0, implicit $w1, implicit-def dead $lr, implicit $sp, implicit-def $sp, implicit-def dead $x0 |
| 89 | +# CHECK-NEXT: $fp = ORRXrs $xzr, $fp, 0 |
| 90 | +# CHECK-NEXT: } |
| 91 | +# CHECK-NEXT: RET undef $lr, implicit killed $w0 |
| 92 | +# |
| 93 | +name: test_bl_pass_w0_w1_args |
| 94 | +body: | |
| 95 | + bb.0: |
| 96 | + liveins: $lr, $w0, $w1 |
| 97 | +
|
| 98 | + BLR_RVMARKER @foo, $w0, $w1, csr_aarch64_aapcs, implicit-def dead $lr, implicit $sp, implicit-def $sp, implicit-def dead $x0 |
| 99 | + RET_ReallyLR implicit killed $w0 |
| 100 | +... |
| 101 | + |
| 102 | + |
| 103 | +# CHECK-LABEL: : test_blr_pass_w0_w1_args |
| 104 | +# CHECK: bb.0: |
| 105 | +# CHECK-NEXT: BUNDLE implicit-def $lr, implicit-def $w30, implicit-def $sp, implicit-def $wsp, implicit-def dead $x0, implicit-def $fp, implicit-def $w29, implicit $x8, implicit $sp, implicit $w0, implicit $w1, implicit $xzr, implicit $fp { |
| 106 | +# CHECK-NEXT: BLR $x8, csr_aarch64_aapcs, implicit-def $lr, implicit $sp, implicit $w0, implicit $w1, implicit-def dead $lr, implicit $sp, implicit-def $sp, implicit-def dead $x0 |
| 107 | +# CHECK-NEXT: $fp = ORRXrs $xzr, $fp, 0 |
| 108 | +# CHECK-NEXT: } |
| 109 | +# CHECK-NEXT: RET undef $lr, implicit killed $w0 |
| 110 | +# |
| 111 | +name: test_blr_pass_w0_w1_args |
| 112 | +body: | |
| 113 | + bb.0: |
| 114 | + liveins: $lr, $x8, $w0, $w1 |
| 115 | +
|
| 116 | + BLR_RVMARKER $x8, $w0, $w1, csr_aarch64_aapcs, implicit-def dead $lr, implicit $sp, implicit-def $sp, implicit-def dead $x0 |
| 117 | + RET_ReallyLR implicit killed $w0 |
| 118 | +... |
0 commit comments