@@ -23,10 +23,11 @@ entry(%body : $@convention(method) (Int, @guaranteed C) -> Int, %context : $C):
23
23
return %closure : $@callee_guaranteed (Int) -> Int
24
24
}
25
25
26
+ // Can't reuse the method because it does not have swiftself.
27
+
26
28
// CHECK-LABEL: define {{.*}} @escape_partial_apply_swift_single_refcount_struct
27
- // CHECK-arm64e: call i64 @llvm.ptrauth.resign.i64
28
- // CHECK: [[FPTR:%.*]] = insertvalue { i8*, %swift.refcounted* } undef, i8* {{.*}}, 0
29
- // CHECK-NEXT: [[FCTX:%.*]] = insertvalue { i8*, %swift.refcounted* } [[FPTR]], %swift.refcounted* {{.*}}, 1
29
+ // CHECK: [[CTXT:%.*]] = call {{.*}} @swift_allocObject
30
+ // CHECK: [[FCTX:%.*]] = insertvalue { i8*, %swift.refcounted* } { i8* bitcast (i{{(64|32)}} (i{{(64|32)}}, %swift.refcounted*)* @"$sTA" to i8*), %swift.refcounted* undef }, %swift.refcounted* [[CTXT]], 1
30
31
// CHECK-NEXT: ret { i8*, %swift.refcounted* } [[FCTX]]
31
32
sil @escape_partial_apply_swift_single_refcount_struct : $@convention(thin) (@convention(method) (Int, @guaranteed SingleRefcounted) -> Int, @guaranteed SingleRefcounted) -> @callee_guaranteed (Int) -> Int {
32
33
entry(%body : $@convention(method) (Int, @guaranteed SingleRefcounted) -> Int, %context : $SingleRefcounted):
@@ -47,11 +48,9 @@ entry(%body : $@convention(method) (Int, @in_guaranteed C) -> Int, %context : $*
47
48
return undef : $()
48
49
}
49
50
51
+ // Can't reuse the method because it does not have swiftself.
50
52
// CHECK-LABEL: define {{.*}} @noescape_partial_apply_swift_direct_word
51
- // CHECK-arm64e: call i64 @llvm.ptrauth.resign.i64
52
- // CHECK: [[CTX:%.*]] = inttoptr i{{.*}} %1 to %swift.opaque*
53
- // CHECK-NEXT: [[CONT:%.*]] = bitcast i8* %2
54
- // CHECK-NEXT: call {{.*}}void [[CONT]](i8* {{.*}}, %swift.opaque* [[CTX]], %swift.refcounted* {{.*}}%3)
53
+ // CHECK: call swiftcc void %11(i8* bitcast (i{{(64|32)}} (i{{(64|32)}}, %swift.refcounted*)* @"$sTA.1" to i8*), %swift.opaque* {{.*}}, %swift.refcounted* swiftself {{.*}})
55
54
sil @noescape_partial_apply_swift_direct_word : $@convention(thin) (@convention(method) (Int, Int) -> Int, Int, @guaranteed @callee_guaranteed (@noescape @callee_guaranteed (Int) -> Int) -> ()) -> () {
56
55
entry(%body : $@convention(method) (Int, Int) -> Int, %context : $Int, %cont : $@callee_guaranteed (@noescape @callee_guaranteed (Int) -> Int) -> ()):
57
56
%closure = partial_apply [callee_guaranteed] [on_stack] %body(%context) : $@convention(method) (Int, Int) -> Int
0 commit comments