File tree Expand file tree Collapse file tree 2 files changed +12
-13
lines changed Expand file tree Collapse file tree 2 files changed +12
-13
lines changed Original file line number Diff line number Diff line change 1
- // RUN: %target-swift-frontend -parse-as-library -O -emit-sil %s | %FileCheck %s
1
+ // RUN: %target-swift-frontend -parse-as-library -enable-spec-devirt - O -emit-sil %s | %FileCheck %s
2
2
// REQUIRES: swift_stdlib_no_asserts,optimized_stdlib,CPU=x86_64
3
3
4
4
// Test inline cache with a global class. Make sure the retain|release pair
@@ -19,7 +19,6 @@ public func testit() {
19
19
// CHECK-LABEL: sil @{{.*}}testityyF
20
20
// CHECK: bb0:
21
21
// CHECK-NOT: {{.*(retain|release).*}}
22
- // CHECK: checked_cast_br
23
22
// CHECK: bb1{{.*}}:
24
23
// CHECK-NOT: {{.*(retain|release).*}}
25
24
// CHECK: return
Original file line number Diff line number Diff line change @@ -15,16 +15,6 @@ class B : A {
15
15
16
16
func donothing( _ x: Int ) -> Int { return x }
17
17
18
- // CHECK-LABEL: sil {{.*}} [Ospeed] @{{.*}}test_ospeed
19
- // CHECK: checked_cast_br
20
- // CHECK: checked_cast_br
21
- // CHECK: }
22
- // CHECK-IR: define hidden {{.*}}test_ospeed{{.*}} [[NOSIZE_ATTR:#[0-9]+]]
23
- @_optimize ( speed)
24
- func test_ospeed( _ a: A ) -> Int {
25
- return donothing ( a. foo ( 27 ) )
26
- }
27
-
28
18
// CHECK-LABEL: sil {{.*}} [Osize] @{{.*}}test_osize
29
19
// CHECK: [[M:%[0-9]+]] = class_method
30
20
// CHECK: [[A:%[0-9]+]] = apply [[M]]
@@ -46,6 +36,16 @@ func test_onone(_ a: A) -> Int {
46
36
return donothing ( a. foo ( 27 ) )
47
37
}
48
38
39
+ // CHECK-LABEL: sil {{.*}} [Ospeed] @{{.*}}test_ospeed
40
+ // CHECK: [[M:%[0-9]+]] = class_method
41
+ // CHECK: [[A:%[0-9]+]] = apply [[M]]
42
+ // CHECK: return [[A]]
43
+ // CHECK-IR: define hidden {{.*}}test_ospeed{{.*}} [[NOSIZE_ATTR:#[0-9]+]]
44
+ @_optimize ( speed)
45
+ func test_ospeed( _ a: A ) -> Int {
46
+ return donothing ( a. foo ( 27 ) )
47
+ }
48
+
49
49
50
- // CHECK-IR: attributes [[NOSIZE_ATTR]] = { "
51
50
// CHECK-IR: attributes [[SIZE_ATTR]] = { minsize "
51
+ // CHECK-IR: attributes [[NOSIZE_ATTR]] = { "
You can’t perform that action at this time.
0 commit comments