Skip to content

Commit 0bc74db

Browse files
authored
Merge pull request #34127 from gottesmm/pr-6935c466fa79498bc6bd205dea831f31264dfbc7
2 parents f6c008f + 9b9e46b commit 0bc74db

File tree

2 files changed

+20
-20
lines changed

2 files changed

+20
-20
lines changed

test/SILOptimizer/templvalueopt.sil

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import Swift
44
import Builtin
55

6-
// CHECK-LABEL: sil @test_enum_with_initialize
6+
// CHECK-LABEL: sil @test_enum_with_initialize :
77
// CHECK: bb0(%0 : $*Optional<Any>, %1 : $*Any):
88
// CHECK-NEXT: [[E:%[0-9]+]] = init_enum_data_addr %0
99
// CHECK-NEXT: copy_addr [take] %1 to [initialization] [[E]]
@@ -22,7 +22,7 @@ bb0(%0 : $*Optional<Any>, %1 : $*Any):
2222
return %6 : $()
2323
}
2424

25-
// CHECK-LABEL: sil @test_enum_without_initialize
25+
// CHECK-LABEL: sil @test_enum_without_initialize :
2626
// CHECK: bb0(%0 : $*Optional<Any>, %1 : $*Any):
2727
// CHECK-NEXT: destroy_addr %0
2828
// CHECK-NEXT: [[E:%[0-9]+]] = init_enum_data_addr %0
@@ -48,7 +48,7 @@ struct ConformingStruct : Proto {
4848
@_hasStorage let a: Any
4949
}
5050

51-
// CHECK-LABEL: sil @test_existential
51+
// CHECK-LABEL: sil @test_existential :
5252
// CHECK: bb0(%0 : $*Proto, %1 : $*ConformingStruct):
5353
// CHECK-NEXT: [[E:%[0-9]+]] = init_existential_addr %0
5454
// CHECK-NEXT: copy_addr [take] %1 to [initialization] [[E]]
@@ -80,7 +80,7 @@ struct AddressOnlyPayload {
8080

8181
// There should only be a single copy_addr after optimization.
8282
//
83-
// CHECK-LABEL: sil @test_initialize_struct
83+
// CHECK-LABEL: sil @test_initialize_struct :
8484
// CHECK: bb0(%0 : $*TestStruct, %1 : $*Any, %2 : $Int):
8585
// CHECK-NEXT: [[E:%[0-9]+]] = struct_element_addr %0
8686
// CHECK-NEXT: [[LEFT:%[0-9]+]] = init_enum_data_addr [[E]]
@@ -114,7 +114,7 @@ bb0(%0 : $*TestStruct, %1 : $*Any, %2 : $Int):
114114
return %20 : $()
115115
}
116116

117-
// CHECK-LABEL: sil @bail_on_write_to_dest
117+
// CHECK-LABEL: sil @bail_on_write_to_dest :
118118
// CHECK: alloc_stack
119119
// CHECK: copy_addr
120120
// CHECK: copy_addr
@@ -132,7 +132,7 @@ bb0(%0 : $*Optional<Any>, %1 : $*Any):
132132
return %6 : $()
133133
}
134134

135-
// CHECK-LABEL: sil @write_to_dest_ok_if_before_liferange
135+
// CHECK-LABEL: sil @write_to_dest_ok_if_before_liferange :
136136
// CHECK: bb0(%0 : $*Optional<Any>, %1 : $*Any):
137137
// CHECK-NEXT: destroy_addr
138138
// CHECK-NEXT: init_enum_data_addr
@@ -161,7 +161,7 @@ struct StructWithEnum : Proto {
161161
@_hasStorage let e: Enum
162162
}
163163

164-
// CHECK-LABEL: sil @move_projections
164+
// CHECK-LABEL: sil @move_projections :
165165
// CHECK: bb0(%0 : $*Proto, %1 : $*Any):
166166
// CHECK-NEXT: [[S:%[0-9]+]] = init_existential_addr %0 : $*Proto, $StructWithEnum
167167
// CHECK-NEXT: [[E:%[0-9]+]] = struct_element_addr [[S]] : $*StructWithEnum, #StructWithEnum.e
@@ -188,7 +188,7 @@ bb0(%0 : $*Proto, %1 : $*Any):
188188
return %10 : $()
189189
}
190190

191-
// CHECK-LABEL: sil @cant_move_projections
191+
// CHECK-LABEL: sil @cant_move_projections :
192192
// CHECK: alloc_stack
193193
// CHECK: copy_addr
194194
// CHECK: load
@@ -210,7 +210,7 @@ bb0(%0 : $*Any, %1 : $*Builtin.RawPointer):
210210

211211
sil @init_optional : $@convention(thin) () -> @out Optional<Any>
212212

213-
// CHECK-LABEL: sil @instructions_after_copy_addr
213+
// CHECK-LABEL: sil @instructions_after_copy_addr :
214214
// CHECK: alloc_stack
215215
// CHECK: copy_addr
216216
// CHECK: copy_addr
@@ -231,7 +231,7 @@ bb0(%0 : $*Optional<Any>, %1 : $*Any):
231231
return %6 : $()
232232
}
233233

234-
// CHECK-LABEL: sil @dont_optimize_swap
234+
// CHECK-LABEL: sil @dont_optimize_swap :
235235
// CHECK: alloc_stack
236236
// CHECK: copy_addr
237237
// CHECK: copy_addr

test/SILOptimizer/templvalueopt_ossa.sil

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import Swift
44
import Builtin
55

6-
// CHECK-LABEL: sil [ossa] @test_enum_with_initialize
6+
// CHECK-LABEL: sil [ossa] @test_enum_with_initialize :
77
// CHECK: bb0(%0 : $*Optional<Any>, %1 : $*Any):
88
// CHECK-NEXT: [[E:%[0-9]+]] = init_enum_data_addr %0
99
// CHECK-NEXT: copy_addr [take] %1 to [initialization] [[E]]
@@ -22,7 +22,7 @@ bb0(%0 : $*Optional<Any>, %1 : $*Any):
2222
return %6 : $()
2323
}
2424

25-
// CHECK-LABEL: sil [ossa] @test_enum_without_initialize
25+
// CHECK-LABEL: sil [ossa] @test_enum_without_initialize :
2626
// CHECK: bb0(%0 : $*Optional<Any>, %1 : $*Any):
2727
// CHECK-NEXT: destroy_addr %0
2828
// CHECK-NEXT: [[E:%[0-9]+]] = init_enum_data_addr %0
@@ -48,7 +48,7 @@ struct ConformingStruct : Proto {
4848
@_hasStorage let a: Any
4949
}
5050

51-
// CHECK-LABEL: sil [ossa] @test_existential
51+
// CHECK-LABEL: sil [ossa] @test_existential :
5252
// CHECK: bb0(%0 : $*Proto, %1 : $*ConformingStruct):
5353
// CHECK-NEXT: [[E:%[0-9]+]] = init_existential_addr %0
5454
// CHECK-NEXT: copy_addr [take] %1 to [initialization] [[E]]
@@ -80,7 +80,7 @@ struct AddressOnlyPayload {
8080

8181
// There should only be a single copy_addr after optimization.
8282
//
83-
// CHECK-LABEL: sil [ossa] @test_initialize_struct
83+
// CHECK-LABEL: sil [ossa] @test_initialize_struct :
8484
// CHECK: bb0(%0 : $*TestStruct, %1 : $*Any, %2 : $Int):
8585
// CHECK-NEXT: [[E:%[0-9]+]] = struct_element_addr %0
8686
// CHECK-NEXT: [[LEFT:%[0-9]+]] = init_enum_data_addr [[E]]
@@ -114,7 +114,7 @@ bb0(%0 : $*TestStruct, %1 : $*Any, %2 : $Int):
114114
return %20 : $()
115115
}
116116

117-
// CHECK-LABEL: sil [ossa] @bail_on_write_to_dest
117+
// CHECK-LABEL: sil [ossa] @bail_on_write_to_dest :
118118
// CHECK: alloc_stack
119119
// CHECK: copy_addr
120120
// CHECK: copy_addr
@@ -132,7 +132,7 @@ bb0(%0 : $*Optional<Any>, %1 : $*Any):
132132
return %6 : $()
133133
}
134134

135-
// CHECK-LABEL: sil [ossa] @write_to_dest_ok_if_before_liferange
135+
// CHECK-LABEL: sil [ossa] @write_to_dest_ok_if_before_liferange :
136136
// CHECK: bb0(%0 : $*Optional<Any>, %1 : $*Any):
137137
// CHECK-NEXT: destroy_addr
138138
// CHECK-NEXT: init_enum_data_addr
@@ -161,7 +161,7 @@ struct StructWithEnum : Proto {
161161
@_hasStorage let e: Enum
162162
}
163163

164-
// CHECK-LABEL: sil [ossa] @move_projections
164+
// CHECK-LABEL: sil [ossa] @move_projections :
165165
// CHECK: bb0(%0 : $*Proto, %1 : $*Any):
166166
// CHECK-NEXT: [[S:%[0-9]+]] = init_existential_addr %0 : $*Proto, $StructWithEnum
167167
// CHECK-NEXT: [[E:%[0-9]+]] = struct_element_addr [[S]] : $*StructWithEnum, #StructWithEnum.e
@@ -188,7 +188,7 @@ bb0(%0 : $*Proto, %1 : $*Any):
188188
return %10 : $()
189189
}
190190

191-
// CHECK-LABEL: sil [ossa] @cant_move_projections
191+
// CHECK-LABEL: sil [ossa] @cant_move_projections :
192192
// CHECK: alloc_stack
193193
// CHECK: copy_addr
194194
// CHECK: load
@@ -210,7 +210,7 @@ bb0(%0 : $*Any, %1 : $*Builtin.RawPointer):
210210

211211
sil [ossa] @init_optional : $@convention(thin) () -> @out Optional<Any>
212212

213-
// CHECK-LABEL: sil [ossa] @instructions_after_copy_addr
213+
// CHECK-LABEL: sil [ossa] @instructions_after_copy_addr :
214214
// CHECK: alloc_stack
215215
// CHECK: copy_addr
216216
// CHECK: copy_addr
@@ -231,7 +231,7 @@ bb0(%0 : $*Optional<Any>, %1 : $*Any):
231231
return %6 : $()
232232
}
233233

234-
// CHECK-LABEL: sil [ossa] @dont_optimize_swap
234+
// CHECK-LABEL: sil [ossa] @dont_optimize_swap :
235235
// CHECK: alloc_stack
236236
// CHECK: copy_addr
237237
// CHECK: copy_addr

0 commit comments

Comments
 (0)