@@ -52,7 +52,8 @@ class TakesArrayLiteral<Element> : ExpressibleByArrayLiteral {
5252// CHECK: [[ALLOCATE_VARARGS:%.*]] = function_ref @$ss27_allocateUninitializedArrayySayxG_BptBwlF
5353// CHECK: [[ARR_TMP:%.*]] = apply [[ALLOCATE_VARARGS]]<Int>([[ARRAY_LENGTH]])
5454// CHECK: ([[ARR:%.*]], [[ADDRESS:%.*]]) = destructure_tuple [[ARR_TMP]]
55- // CHECK: [[POINTER:%.*]] = pointer_to_address [[ADDRESS]]
55+ // CHECK: [[MDI:%.*]] = mark_dependence [[ADDRESS]]
56+ // CHECK: [[POINTER:%.*]] = pointer_to_address [[MDI]]
5657// CHECK: store [[TMP:%.*]] to [trivial] [[POINTER]]
5758// CHECK: [[IDX1:%.*]] = integer_literal $Builtin.Word, 1
5859// CHECK: [[POINTER1:%.*]] = index_addr [[POINTER]] : $*Int, [[IDX1]] : $Builtin.Word
@@ -76,7 +77,8 @@ class Klass {}
7677// CHECK: [[ALLOCATE_VARARGS:%.*]] = function_ref @$ss27_allocateUninitializedArrayySayxG_BptBwlF
7778// CHECK: [[ARR_TMP:%.*]] = apply [[ALLOCATE_VARARGS]]<Klass>([[ARRAY_LENGTH]])
7879// CHECK: ([[ARR:%.*]], [[ADDRESS:%.*]]) = destructure_tuple [[ARR_TMP]]
79- // CHECK: [[POINTER:%.*]] = pointer_to_address [[ADDRESS]]
80+ // CHECK: [[MDI:%.*]] = mark_dependence [[ADDRESS]]
81+ // CHECK: [[POINTER:%.*]] = pointer_to_address [[MDI]]
8082// CHECK: [[KLASS_METATYPE:%.*]] = metatype $@thick Klass.Type
8183// CHECK: [[CTOR:%.*]] = function_ref @$s8literals5KlassCACycfC : $@convention(method) (@thick Klass.Type) -> @owned Klass
8284// CHECK: [[TMP:%.*]] = apply [[CTOR]]([[KLASS_METATYPE]]) : $@convention(method) (@thick Klass.Type) -> @owned Klass
@@ -100,7 +102,8 @@ struct Foo<T> {
100102// CHECK: [[ALLOCATE_VARARGS:%.*]] = function_ref @$ss27_allocateUninitializedArrayySayxG_BptBwlF
101103// CHECK: [[ARR_TMP:%.*]] = apply [[ALLOCATE_VARARGS]]<Foo<T>>([[ARRAY_LENGTH]])
102104// CHECK: ([[ARR:%.*]], [[ADDRESS:%.*]]) = destructure_tuple [[ARR_TMP]]
103- // CHECK: [[POINTER:%.*]] = pointer_to_address [[ADDRESS]]
105+ // CHECK: [[MDI:%.*]] = mark_dependence [[ADDRESS]]
106+ // CHECK: [[POINTER:%.*]] = pointer_to_address [[MDI]]
104107// CHECK: copy_addr %0 to [init] [[POINTER]] : $*Foo<T>
105108// CHECK: [[FIN_FN:%.*]] = function_ref @$ss27_finalizeUninitializedArrayySayxGABnlF
106109// CHECK: [[FIN_ARR:%.*]] = apply [[FIN_FN]]<Foo<T>>([[ARR]])
@@ -117,7 +120,8 @@ func returnsAddressOnlyElementArray<T>(t: Foo<T>) -> TakesArrayLiteral<Foo<T>> {
117120// CHECK: [[ALLOCATE_VARARGS:%.*]] = function_ref @$ss27_allocateUninitializedArrayySayxG_BptBwlF
118121// CHECK: [[ARR_TMP:%.*]] = apply [[ALLOCATE_VARARGS]]<Foo<T>>([[ARRAY_LENGTH]])
119122// CHECK: ([[ARR:%.*]], [[ADDRESS:%.*]]) = destructure_tuple [[ARR_TMP]]
120- // CHECK: [[POINTER:%.*]] = pointer_to_address [[ADDRESS]]
123+ // CHECK: [[MDI:%.*]] = mark_dependence [[ADDRESS]]
124+ // CHECK: [[POINTER:%.*]] = pointer_to_address [[MDI]]
121125// CHECK: copy_addr %0 to [init] [[POINTER]] : $*Foo<T>
122126// CHECK: [[FIN_FN:%.*]] = function_ref @$ss27_finalizeUninitializedArrayySayxGABnlF
123127// CHECK: [[FIN_ARR:%.*]] = apply [[FIN_FN]]<Foo<T>>([[ARR]])
@@ -136,7 +140,8 @@ extension Foo {
136140// CHECK: [[ALLOCATE_VARARGS:%.*]] = function_ref @$ss27_allocateUninitializedArrayySayxG_BptBwlF
137141// CHECK: [[ARR_TMP:%.*]] = apply [[ALLOCATE_VARARGS]]<Foo<T>>([[ARRAY_LENGTH]])
138142// CHECK: ([[ARR:%.*]], [[ADDRESS:%.*]]) = destructure_tuple [[ARR_TMP]]
139- // CHECK: [[POINTER:%.*]] = pointer_to_address [[ADDRESS]]
143+ // CHECK: [[MDI:%.*]] = mark_dependence [[ADDRESS]]
144+ // CHECK: [[POINTER:%.*]] = pointer_to_address [[MDI]]
140145// CHECK: [[ACCESS:%.*]] = begin_access [read] [unknown] %0 : $*Foo<T>
141146// CHECK: copy_addr [[ACCESS]] to [init] [[POINTER]] : $*Foo<T>
142147// CHECK: end_access [[ACCESS]] : $*Foo<T>
@@ -161,7 +166,8 @@ struct Foo2 {
161166// CHECK: [[ALLOCATE_VARARGS:%.*]] = function_ref @$ss27_allocateUninitializedArrayySayxG_BptBwlF
162167// CHECK: [[ARR_TMP:%.*]] = apply [[ALLOCATE_VARARGS]]<Foo2>([[ARRAY_LENGTH]])
163168// CHECK: ([[ARR:%.*]], [[ADDRESS:%.*]]) = destructure_tuple [[ARR_TMP]]
164- // CHECK: [[POINTER:%.*]] = pointer_to_address [[ADDRESS]]
169+ // CHECK: [[MDI:%.*]] = mark_dependence [[ADDRESS]]
170+ // CHECK: [[POINTER:%.*]] = pointer_to_address [[MDI]]
165171// CHECK: [[METATYPE_FOO2:%.*]] = metatype $@thin Foo2.Type
166172// CHECK: [[METATYPE_KLASS:%.*]] = metatype $@thick Klass.Type
167173// CHECK: [[CTOR:%.*]] = function_ref @$s8literals5KlassCACycfC : $@convention(method) (@thick Klass.Type) -> @owned Klass
@@ -185,7 +191,8 @@ func returnsNonTrivialStruct() -> TakesArrayLiteral<Foo2> {
185191// CHECK: [[ALLOCATE_VARARGS:%.*]] = function_ref @$ss27_allocateUninitializedArrayySayxG_BptBwlF
186192// CHECK: [[ARR_TMP:%.*]] = apply [[ALLOCATE_VARARGS]]<NestedLValuePath>([[ARRAY_LENGTH]])
187193// CHECK: ([[ARR:%.*]], [[ADDRESS:%.*]]) = destructure_tuple [[ARR_TMP]]
188- // CHECK: [[POINTER:%.*]] = pointer_to_address [[ADDRESS]]
194+ // CHECK: [[MDI:%.*]] = mark_dependence [[ADDRESS]]
195+ // CHECK: [[POINTER:%.*]] = pointer_to_address [[MDI]]
189196
190197// CHECK: [[ACCESS:%.*]] = begin_access [modify] [unknown] %0 : $*NestedLValuePath
191198// CHECK: [[OTHER_FN:%.*]] = function_ref @$s8literals16NestedLValuePathV21otherMutatingFunctionACyF : $@convention(method) (@inout NestedLValuePath) -> @owned NestedLValuePath
@@ -223,7 +230,8 @@ protocol WrapsSelfInArray {}
223230// CHECK: [[ALLOCATE_VARARGS:%.*]] = function_ref @$ss27_allocateUninitializedArrayySayxG_BptBwlF
224231// CHECK: [[ARR_TMP:%.*]] = apply [[ALLOCATE_VARARGS]]<any WrapsSelfInArray>([[ARRAY_LENGTH]])
225232// CHECK: ([[ARR:%.*]], [[ADDRESS:%.*]]) = destructure_tuple [[ARR_TMP]]
226- // CHECK: [[POINTER:%.*]] = pointer_to_address [[ADDRESS]]
233+ // CHECK: [[MDI:%.*]] = mark_dependence [[ADDRESS]]
234+ // CHECK: [[POINTER:%.*]] = pointer_to_address [[MDI]]
227235// CHECK: [[ACCESS:%.*]] = begin_access [read] [unknown] %0 : $*Self
228236// CHECK: [[EXISTENTIAL:%.*]] = init_existential_addr [[POINTER]] : $*any WrapsSelfInArray, $Self
229237// CHECK: copy_addr [[ACCESS]] to [init] [[EXISTENTIAL]] : $*Self
@@ -252,7 +260,8 @@ func makeBasic<T : FooProtocol>() -> T { return T() }
252260// CHECK: [[ALLOCATE_VARARGS:%.*]] = function_ref @$ss27_allocateUninitializedArrayySayxG_BptBwlF
253261// CHECK: [[ARR_TMP:%.*]] = apply [[ALLOCATE_VARARGS]]<T>([[ARRAY_LENGTH]])
254262// CHECK: ([[ARR:%.*]], [[ADDRESS:%.*]]) = destructure_tuple [[ARR_TMP]]
255- // CHECK: [[POINTER:%.*]] = pointer_to_address [[ADDRESS]]
263+ // CHECK: [[MDI:%.*]] = mark_dependence [[ADDRESS]]
264+ // CHECK: [[POINTER:%.*]] = pointer_to_address [[MDI]]
256265// CHECK: [[FN:%.*]] = function_ref @$s8literals9makeBasicxyAA11FooProtocolRzlF : $@convention(thin)
257266// CHECK: [[TMP:%.*]] = apply [[FN]]<T>([[POINTER]])
258267// CHECK: [[IDX:%.*]] = integer_literal $Builtin.Word, 1
@@ -285,7 +294,8 @@ class TakesDictionaryLiteral<Key, Value> : ExpressibleByDictionaryLiteral {
285294// CHECK: [[ALLOCATE_VARARGS:%.*]] = function_ref @$ss27_allocateUninitializedArrayySayxG_BptBwlF : $@convention(thin) <τ_0_0> (Builtin.Word) -> (@owned Array<τ_0_0>, Builtin.RawPointer)
286295// CHECK: [[ARR_TMP:%.*]] = apply [[ALLOCATE_VARARGS]]<(Int, Int)>([[ARRAY_LENGTH]])
287296// CHECK: ([[ARR:%.*]], [[ADDRESS:%.*]]) = destructure_tuple [[ARR_TMP]]
288- // CHECK: [[TUPLE_ADDR:%.*]] = pointer_to_address %9 : $Builtin.RawPointer to [strict] $*(Int, Int)
297+ // CHECK: [[MDI:%.*]] = mark_dependence [[ADDRESS]]
298+ // CHECK: [[TUPLE_ADDR:%.*]] = pointer_to_address [[MDI]] : $Builtin.RawPointer to [strict] $*(Int, Int)
289299// CHECK: [[KEY_ADDR:%.*]] = tuple_element_addr [[TUPLE_ADDR]] : $*(Int, Int), 0
290300// CHECK: [[VALUE_ADDR:%.*]] = tuple_element_addr [[TUPLE_ADDR]] : $*(Int, Int), 1
291301// CHECK: store [[TMP]] to [trivial] [[KEY_ADDR]] : $*Int
0 commit comments