-
Notifications
You must be signed in to change notification settings - Fork 10.5k
/
Copy pathsildeclref_parse.sil
30 lines (22 loc) · 1.74 KB
/
sildeclref_parse.sil
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// RUN: %target-sil-opt %s -module-name=sildeclref_parse | %target-sil-opt -module-name=sildeclref_parse | %FileCheck %s
import Swift
protocol Proto {
@differentiable(wrt: (x, y))
func f(_ x: Float, _ y: Float) -> Float
}
// CHECK-LABEL: sil hidden @generic
sil hidden @generic : $@convention(thin) <T where T : Proto> (@in T) -> () {
bb0(%0 : $*T):
// CHECK: witness_method $T, #Proto.f!1
%1 = witness_method $T, #Proto.f!1 : <Self where Self : Proto> (Self) -> (Float, Float) -> Float : $@convention(witness_method: Proto) <τ_0_0 where τ_0_0 : Proto> (@in_guaranteed τ_0_0) -> (Float, Float) -> Float
// CHECK: witness_method $T, #Proto.f!1.jvp.1.SSS
%2 = witness_method $T, #Proto.f!1.jvp.1.SSS : <Self where Self : Proto> (Self) -> (Float, Float) -> Float : $@convention(witness_method: Proto) <τ_0_0 where τ_0_0 : Proto> (@in_guaranteed τ_0_0) -> (Float, Float) -> Float
// CHECK: witness_method $T, #Proto.f!1.jvp.1.UUS
%3 = witness_method $T, #Proto.f!1.jvp.1.UUS : <Self where Self : Proto> (Self) -> (Float, Float) -> Float : $@convention(witness_method: Proto) <τ_0_0 where τ_0_0 : Proto> (@in_guaranteed τ_0_0) -> (Float, Float) -> Float
// CHECK: witness_method $T, #Proto.f!1.vjp.1.SSS
%4 = witness_method $T, #Proto.f!1.vjp.1.SSS : <Self where Self : Proto> (Self) -> (Float, Float) -> Float : $@convention(witness_method: Proto) <τ_0_0 where τ_0_0 : Proto> (@in_guaranteed τ_0_0) -> (Float, Float) -> Float
// CHECK: witness_method $T, #Proto.f!1.vjp.1.UUS
%5 = witness_method $T, #Proto.f!1.vjp.1.UUS : <Self where Self : Proto> (Self) -> (Float, Float) -> Float : $@convention(witness_method: Proto) <τ_0_0 where τ_0_0 : Proto> (@in_guaranteed τ_0_0) -> (Float, Float) -> Float
%6 = tuple ()
return %6 : $()
}