Skip to content

Commit 645cac4

Browse files
committed
[sil-combine] Enable even more tests that we pass now.
1 parent f0c984f commit 645cac4

File tree

6 files changed

+178
-177
lines changed

6 files changed

+178
-177
lines changed

test/SILOptimizer/pointer_conversion_objc.swift

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,11 @@ public func testOptionalArray() {
3535
// CHECK: cond_br {{%.*}}, [[CHECK_BB_2:bb[0-9]+]], {{bb[0-9]+}}
3636
3737
// CHECK: [[CHECK_BB_2]]:
38-
// CHECK: [[OWNER:%.+]] = enum $Optional<AnyObject>, #Optional.some!enumelt,
38+
// CHECK: [[ORIGINAL_OWNER:%.*]] = unchecked_ref_cast {{%.*}} : $Builtin.BridgeObject to $__ContiguousArrayStorageBase
39+
// CHECK: [[ORIGINAL_OWNER_EXISTENTIAL:%.*]] = init_existential_ref [[ORIGINAL_OWNER]]
40+
// CHECK: [[OWNER:%.+]] = enum $Optional<AnyObject>, #Optional.some!enumelt, [[ORIGINAL_OWNER_EXISTENTIAL]]
3941
// CHECK-NEXT: [[POINTER:%.+]] = struct $UnsafeRawPointer (
40-
// CHECK-NEXT: [[DEP_POINTER:%.+]] = mark_dependence [[POINTER]] : $UnsafeRawPointer on [[OWNER]] : $Optional<AnyObject>
42+
// CHECK-NEXT: [[DEP_POINTER:%.+]] = mark_dependence [[POINTER]] : $UnsafeRawPointer on [[ORIGINAL_OWNER]]
4143
// CHECK-NEXT: [[OPT_POINTER:%.+]] = enum $Optional<UnsafeRawPointer>, #Optional.some!enumelt, [[DEP_POINTER]]
4244
// CHECK-NEXT: br [[CALL_BRANCH:bb[0-9]+]]([[OPT_POINTER]] : $Optional<UnsafeRawPointer>, [[OWNER]] : $Optional<AnyObject>)
4345

test/SILOptimizer/sil_combine_bitops_ossa.sil

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ import Builtin
88
import Swift
99

1010
// CHECK-LABEL: sil [ossa] @test_and1
11-
// XHECK: %1 = integer_literal $Builtin.Int64, 0
12-
// XHECK: return %1
11+
// CHECK: %1 = integer_literal $Builtin.Int64, 0
12+
// CHECK: return %1
1313
sil [ossa] @test_and1 : $@convention(thin) (Builtin.Int64) -> Builtin.Int64 {
1414
bb0(%0 : $Builtin.Int64):
1515
%1 = integer_literal $Builtin.Int64, 0
@@ -18,8 +18,8 @@ bb0(%0 : $Builtin.Int64):
1818
}
1919

2020
// CHECK-LABEL: sil [ossa] @test_and2
21-
// XHECK: bb0(%0 : $Builtin.Int64):
22-
// XHECK: return %0
21+
// CHECK: bb0(%0 : $Builtin.Int64):
22+
// CHECK: return %0
2323
sil [ossa] @test_and2 : $@convention(thin) (Builtin.Int64) -> Builtin.Int64 {
2424
bb0(%0 : $Builtin.Int64):
2525
%1 = integer_literal $Builtin.Int64, -1
@@ -28,9 +28,9 @@ bb0(%0 : $Builtin.Int64):
2828
}
2929

3030
// CHECK-LABEL: sil [ossa] @test_and3
31-
// XHECK: %1 = integer_literal $Builtin.Int64, 32
32-
// XHECK: %2 = builtin "and_Int64"(%0 : $Builtin.Int64, %1 : $Builtin.Int64)
33-
// XHECK: return %2
31+
// CHECK: %1 = integer_literal $Builtin.Int64, 32
32+
// CHECK: %2 = builtin "and_Int64"(%0 : $Builtin.Int64, %1 : $Builtin.Int64)
33+
// CHECK: return %2
3434
sil [ossa] @test_and3 : $@convention(thin) (Builtin.Int64) -> Builtin.Int64 {
3535
bb0(%0 : $Builtin.Int64):
3636
%1 = integer_literal $Builtin.Int64, 288
@@ -41,8 +41,8 @@ bb0(%0 : $Builtin.Int64):
4141
}
4242

4343
// CHECK-LABEL: sil [ossa] @test_and4
44-
// XHECK: %1 = integer_literal $Builtin.Int64, 0
45-
// XHECK: return %1
44+
// CHECK: %1 = integer_literal $Builtin.Int64, 0
45+
// CHECK: return %1
4646
sil [ossa] @test_and4 : $@convention(thin) (Builtin.Int64) -> Builtin.Int64 {
4747
bb0(%0 : $Builtin.Int64):
4848
%1 = integer_literal $Builtin.Int64, 18
@@ -53,8 +53,8 @@ bb0(%0 : $Builtin.Int64):
5353
}
5454

5555
// CHECK-LABEL: sil [ossa] @test_or1
56-
// XHECK: bb0(%0 : $Builtin.Int64):
57-
// XHECK: return %0
56+
// CHECK: bb0(%0 : $Builtin.Int64):
57+
// CHECK: return %0
5858
sil [ossa] @test_or1 : $@convention(thin) (Builtin.Int64) -> Builtin.Int64 {
5959
bb0(%0 : $Builtin.Int64):
6060
%1 = integer_literal $Builtin.Int64, 0
@@ -63,8 +63,8 @@ bb0(%0 : $Builtin.Int64):
6363
}
6464

6565
// CHECK-LABEL: sil [ossa] @test_or2
66-
// XHECK: %1 = integer_literal $Builtin.Int64, -1
67-
// XHECK: return %1
66+
// CHECK: %1 = integer_literal $Builtin.Int64, -1
67+
// CHECK: return %1
6868
sil [ossa] @test_or2 : $@convention(thin) (Builtin.Int64) -> Builtin.Int64 {
6969
bb0(%0 : $Builtin.Int64):
7070
%1 = integer_literal $Builtin.Int64, -1
@@ -73,9 +73,9 @@ bb0(%0 : $Builtin.Int64):
7373
}
7474

7575
// CHECK-LABEL: sil [ossa] @test_or3
76-
// XHECK: %1 = integer_literal $Builtin.Int64, 291
77-
// XHECK: %2 = builtin "or_Int64"(%0 : $Builtin.Int64, %1 : $Builtin.Int64)
78-
// XHECK: return %2
76+
// CHECK: %1 = integer_literal $Builtin.Int64, 291
77+
// CHECK: %2 = builtin "or_Int64"(%0 : $Builtin.Int64, %1 : $Builtin.Int64)
78+
// CHECK: return %2
7979
sil [ossa] @test_or3 : $@convention(thin) (Builtin.Int64) -> Builtin.Int64 {
8080
bb0(%0 : $Builtin.Int64):
8181
%1 = integer_literal $Builtin.Int64, 288
@@ -86,8 +86,8 @@ bb0(%0 : $Builtin.Int64):
8686
}
8787

8888
// CHECK-LABEL: sil [ossa] @test_or4
89-
// XHECK: %1 = integer_literal $Builtin.Int64, -1
90-
// XHECK: return %1
89+
// CHECK: %1 = integer_literal $Builtin.Int64, -1
90+
// CHECK: return %1
9191
sil [ossa] @test_or4 : $@convention(thin) (Builtin.Int64) -> Builtin.Int64 {
9292
bb0(%0 : $Builtin.Int64):
9393
%1 = integer_literal $Builtin.Int64, -4
@@ -98,8 +98,8 @@ bb0(%0 : $Builtin.Int64):
9898
}
9999

100100
// CHECK-LABEL: sil [ossa] @test_xor1
101-
// XHECK: bb0(%0 : $Builtin.Int64):
102-
// XHECK: return %0
101+
// CHECK: bb0(%0 : $Builtin.Int64):
102+
// CHECK: return %0
103103
sil [ossa] @test_xor1 : $@convention(thin) (Builtin.Int64) -> Builtin.Int64 {
104104
bb0(%0 : $Builtin.Int64):
105105
%1 = integer_literal $Builtin.Int64, 0
@@ -108,9 +108,9 @@ bb0(%0 : $Builtin.Int64):
108108
}
109109

110110
// CHECK-LABEL: sil [ossa] @test_xor2
111-
// XHECK: %1 = integer_literal $Builtin.Int64, -1
112-
// XHECK: %2 = builtin "xor_Int64"(%0 : $Builtin.Int64, %1 : $Builtin.Int64)
113-
// XHECK: return %2
111+
// CHECK: %1 = integer_literal $Builtin.Int64, -1
112+
// CHECK: %2 = builtin "xor_Int64"(%0 : $Builtin.Int64, %1 : $Builtin.Int64)
113+
// CHECK: return %2
114114
sil [ossa] @test_xor2 : $@convention(thin) (Builtin.Int64) -> Builtin.Int64 {
115115
bb0(%0 : $Builtin.Int64):
116116
%1 = integer_literal $Builtin.Int64, -1
@@ -119,9 +119,9 @@ bb0(%0 : $Builtin.Int64):
119119
}
120120

121121
// CHECK-LABEL: sil [ossa] @test_xor3
122-
// XHECK: %1 = integer_literal $Builtin.Int64, 259
123-
// XHECK: %2 = builtin "xor_Int64"(%0 : $Builtin.Int64, %1 : $Builtin.Int64)
124-
// XHECK: return %2
122+
// CHECK: %1 = integer_literal $Builtin.Int64, 259
123+
// CHECK: %2 = builtin "xor_Int64"(%0 : $Builtin.Int64, %1 : $Builtin.Int64)
124+
// CHECK: return %2
125125
sil [ossa] @test_xor3 : $@convention(thin) (Builtin.Int64) -> Builtin.Int64 {
126126
bb0(%0 : $Builtin.Int64):
127127
%1 = integer_literal $Builtin.Int64, 288
@@ -132,8 +132,8 @@ bb0(%0 : $Builtin.Int64):
132132
}
133133

134134
// CHECK-LABEL: sil [ossa] @test_xor4
135-
// XHECK: bb0(%0 : $Builtin.Int64):
136-
// XHECK: return %0
135+
// CHECK: bb0(%0 : $Builtin.Int64):
136+
// CHECK: return %0
137137
sil [ossa] @test_xor4 : $@convention(thin) (Builtin.Int64) -> Builtin.Int64 {
138138
bb0(%0 : $Builtin.Int64):
139139
%1 = integer_literal $Builtin.Int64, 18

test/SILOptimizer/sil_combine_pa_removal.sil

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ import Builtin
66
import Swift
77

88
// CHECK-LABEL: sil @a_function1
9-
// XHECK-NOT: partial_apply
10-
// XHECK: return
9+
// CHECK-NOT: partial_apply
10+
// CHECK: return
1111
sil @a_function1 : $@convention(thin) (Int64) -> () {
1212
bb0(%0 : $Int64):
1313
%1 = function_ref @our_closure_function1 : $@convention(thin) (Int64) -> Bool // user: %2
@@ -26,15 +26,15 @@ sil @a_function2 : $@convention(thin) (@owned K) -> () {
2626
bb0(%0 : $K):
2727
%1 = alloc_ref $K
2828
%2 = function_ref @our_closure_function2 : $@convention(thin) (@owned K) -> Bool // user: %2
29-
// XHECK-NOT: partial_apply
29+
// CHECK-NOT: partial_apply
3030
%3 = partial_apply %2(%0) : $@convention(thin) (@owned K) -> Bool // user: %3
31-
// XHECK: br
31+
// CHECK: br
3232
br bb1
3333
bb1:
34-
// XHECK: strong_release
34+
// CHECK: strong_release
3535
strong_release %3 : $@callee_owned () -> Bool // id: %3
3636
%5 = tuple () // user: %5
37-
// XHECK: return
37+
// CHECK: return
3838
return %5 : $() // id: %5
3939
}
4040

0 commit comments

Comments
 (0)