Skip to content

Commit 2f5d603

Browse files
committed
Add regression test to close #43069
1 parent a8d7349 commit 2f5d603

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// RUN: %target-swift-emit-ir %s -O | %FileCheck %s
2+
3+
sil_stage canonical
4+
5+
import Swift
6+
7+
sil @rec : $@convention(thin) (Int) -> Int {
8+
bb0(%arg : $Int):
9+
%ref = function_ref @rec : $@convention(thin) (Int) -> Int
10+
%res = apply %ref(%arg) : $@convention(thin) (Int) -> Int
11+
return %res : $Int
12+
}
13+
14+
// CHECK: define swiftcc [[T:i[0-9]+]] @rec([[T]] %0) #0 {
15+
// CHECK-NEXT: entry:
16+
// CHECK-NEXT: br label %tailrecurse
17+
// CHECK-EMPTY:
18+
// CHECK-NEXT: tailrecurse:
19+
// CHECK-NEXT: br label %tailrecurse
20+
// CHECK-NEXT: }

0 commit comments

Comments
 (0)