2929 ret void
3030 }
3131
32+ define void @test_no_nop() {
33+ ret void
34+ }
35+
3236 declare ptr @attachedcall()
3337
3438 declare ptr @objc_retainAutoreleasedReturnValue()
@@ -54,7 +58,7 @@ body: |
5458 bb.0:
5559 liveins: $lr, $x0
5660
57- BLR_RVMARKER @attachedcall, $x0, csr_aarch64_aapcs, implicit-def dead $lr, implicit $sp, implicit-def $sp, implicit-def dead $x0
61+ BLR_RVMARKER @attachedcall, 1, $x0, csr_aarch64_aapcs, implicit-def dead $lr, implicit $sp, implicit-def $sp, implicit-def dead $x0
5862 RET_ReallyLR implicit killed $w0
5963 ...
6064
@@ -74,7 +78,7 @@ body: |
7478 bb.0:
7579 liveins: $lr, $x0
7680
77- BLR_RVMARKER @attachedcall, @foo, $x0, csr_aarch64_aapcs, implicit-def dead $lr, implicit $sp, implicit-def $sp, implicit-def dead $x0
81+ BLR_RVMARKER @attachedcall, 1, @foo, $x0, csr_aarch64_aapcs, implicit-def dead $lr, implicit $sp, implicit-def $sp, implicit-def dead $x0
7882 RET_ReallyLR implicit killed $w0
7983 ...
8084
@@ -94,7 +98,7 @@ body: |
9498 bb.0:
9599 liveins: $lr, $x0, $x1, $x2
96100
97- BLR_RVMARKER @attachedcall, @foo, $x0, $x1, $x2, csr_aarch64_aapcs, implicit-def dead $lr, implicit $sp, implicit-def $sp, implicit-def $x0
101+ BLR_RVMARKER @attachedcall, 1, @foo, $x0, $x1, $x2, csr_aarch64_aapcs, implicit-def dead $lr, implicit $sp, implicit-def $sp, implicit-def $x0
98102 RET_ReallyLR
99103 ...
100104
@@ -114,7 +118,7 @@ body: |
114118 bb.0:
115119 liveins: $lr, $w0, $w1
116120
117- BLR_RVMARKER @attachedcall, @foo, $w0, $w1, csr_aarch64_aapcs, implicit-def dead $lr, implicit $sp, implicit-def $sp, implicit-def dead $x0
121+ BLR_RVMARKER @attachedcall, 1, @foo, $w0, $w1, csr_aarch64_aapcs, implicit-def dead $lr, implicit $sp, implicit-def $sp, implicit-def dead $x0
118122 RET_ReallyLR implicit killed $w0
119123 ...
120124
@@ -135,7 +139,7 @@ body: |
135139 bb.0:
136140 liveins: $lr, $x8, $w0, $w1
137141
138- BLR_RVMARKER @attachedcall, $x8, $w0, $w1, csr_aarch64_aapcs, implicit-def dead $lr, implicit $sp, implicit-def $sp, implicit-def dead $x0
142+ BLR_RVMARKER @attachedcall, 1, $x8, $w0, $w1, csr_aarch64_aapcs, implicit-def dead $lr, implicit $sp, implicit-def $sp, implicit-def dead $x0
139143 RET_ReallyLR implicit killed $w0
140144 ...
141145
@@ -158,6 +162,28 @@ body: |
158162 bb.0:
159163 liveins: $lr
160164
161- BLR_RVMARKER @objc_retainAutoreleasedReturnValue, @foo, undef $x0, csr_darwin_aarch64_aapcs, implicit-def dead $lr, implicit $sp, implicit-def $sp, implicit-def dead $x0
165+ BLR_RVMARKER @objc_retainAutoreleasedReturnValue, 1, @foo, undef $x0, csr_darwin_aarch64_aapcs, implicit-def dead $lr, implicit $sp, implicit-def $sp, implicit-def dead $x0
162166 RET_ReallyLR
163167 ...
168+
169+ # CHECK-LABEL: : test_no_nop
170+ # CHECK: bb.0:
171+ # CHECK-NEXT: liveins:
172+ # CHECK-NEXT: {{ $}}
173+ # CHECK-NEXT: BUNDLE implicit-def $lr, implicit-def $w30, implicit-def $w30_hi, implicit-def $sp, implicit-def $wsp, implicit-def $wsp_hi, implicit-def dead $x0, implicit $x0, implicit $sp {
174+ # 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
175+ # CHECK-NEXT: BL @attachedcall, implicit-def $lr, implicit internal $sp
176+ # CHECK-NEXT: }
177+ # CHECK-NEXT: RET undef $lr, implicit killed $w0
178+ #
179+ name : test_no_nop
180+ callSites :
181+ - {bb: 0, offset: 0, fwdArgRegs:
182+ - { arg: 0, reg: '$x0' } }
183+ body : |
184+ bb.0:
185+ liveins: $lr, $x0
186+
187+ BLR_RVMARKER @attachedcall, 0, $x0, csr_aarch64_aapcs, implicit-def dead $lr, implicit $sp, implicit-def $sp, implicit-def dead $x0
188+ RET_ReallyLR implicit killed $w0
189+ ...
0 commit comments