Skip to content

Commit 4e4981a

Browse files
committed
Fix more tests failing in release build
1 parent c55e57b commit 4e4981a

File tree

2 files changed

+12
-13
lines changed

2 files changed

+12
-13
lines changed

test/SILOptimizer/inline_cache_and_arc.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
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
22
// REQUIRES: swift_stdlib_no_asserts,optimized_stdlib,CPU=x86_64
33

44
// Test inline cache with a global class. Make sure the retain|release pair
@@ -19,7 +19,6 @@ public func testit() {
1919
// CHECK-LABEL: sil @{{.*}}testityyF
2020
// CHECK: bb0:
2121
// CHECK-NOT: {{.*(retain|release).*}}
22-
// CHECK: checked_cast_br
2322
// CHECK: bb1{{.*}}:
2423
// CHECK-NOT: {{.*(retain|release).*}}
2524
// CHECK: return

test/SILOptimizer/opt_mode.swift

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,6 @@ class B : A {
1515

1616
func donothing(_ x: Int) -> Int { return x }
1717

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-
2818
// CHECK-LABEL: sil {{.*}} [Osize] @{{.*}}test_osize
2919
// CHECK: [[M:%[0-9]+]] = class_method
3020
// CHECK: [[A:%[0-9]+]] = apply [[M]]
@@ -46,6 +36,16 @@ func test_onone(_ a: A) -> Int {
4636
return donothing(a.foo(27))
4737
}
4838

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+
4949

50-
// CHECK-IR: attributes [[NOSIZE_ATTR]] = { "
5150
// CHECK-IR: attributes [[SIZE_ATTR]] = { minsize "
51+
// CHECK-IR: attributes [[NOSIZE_ATTR]] = { "

0 commit comments

Comments
 (0)