We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 767423a commit 2d5e591Copy full SHA for 2d5e591
test/IRGen/recursion_infinite_optimized.sil
@@ -0,0 +1,22 @@
1
+// RUN: %target-swift-emit-ir %s -O | %FileCheck %s
2
+
3
+// https://github.com/apple/swift/issues/43069
4
5
+sil_stage canonical
6
7
+import Swift
8
9
+sil @rec : $@convention(thin) (Int) -> Int {
10
+bb0(%arg : $Int):
11
+ %ref = function_ref @rec : $@convention(thin) (Int) -> Int
12
+ %res = apply %ref(%arg) : $@convention(thin) (Int) -> Int
13
+ return %res : $Int
14
+}
15
16
+// CHECK: define{{.*}} swiftcc [[T:i[0-9]+]] @rec([[T]] %0) #0 {
17
+// CHECK-NEXT: entry:
18
+// CHECK-NEXT: br label %tailrecurse
19
+// CHECK-EMPTY:
20
+// CHECK-NEXT: tailrecurse:
21
22
+// CHECK-NEXT: }
0 commit comments