@@ -37,68 +37,83 @@ fn square(x: f32) -> f32 {
37
37
38
38
// CHECK: ; abi_handling::f1
39
39
// CHECK-NEXT: ; Function Attrs: {{.*}}noinline{{.*}}
40
- // debug-NEXT: define internal float @_ZN12abi_handling2f117h536ac8081c1e4101E(ptr align 4 %x)
41
- // release-NEXT: define internal fastcc noundef float @_ZN12abi_handling2f117h536ac8081c1e4101E(float %x.0.val, float %x.4.val)
40
+ // debug-NEXT: define internal float @_ZN12abi_handling2f117h536ac8081c1e4101E
41
+ // debug-SAME: (ptr align 4 %x)
42
+ // release-NEXT: define internal fastcc noundef float @_ZN12abi_handling2f117h536ac8081c1e4101E
43
+ // release-SAME: (float %x.0.val, float %x.4.val)
42
44
#[ autodiff_forward( df1, Dual , Dual ) ]
43
45
fn f1 ( x : & [ f32 ; 2 ] ) -> f32 {
44
46
x[ 0 ] + x[ 1 ]
45
47
}
46
48
47
49
// CHECK: ; abi_handling::f2
48
50
// CHECK-NEXT: ; Function Attrs: {{.*}}noinline{{.*}}
49
- // debug-NEXT: define internal float @_ZN12abi_handling2f217h33732e9f83c91bc9E(ptr %f, float %x)
50
- // release-NEXT: define internal fastcc noundef float @_ZN12abi_handling2f217h33732e9f83c91bc9E(float noundef %x)
51
+ // debug-NEXT: define internal float @_ZN12abi_handling2f217h33732e9f83c91bc9E
52
+ // debug-SAME: (ptr %f, float %x)
53
+ // release-NEXT: define internal fastcc noundef float @_ZN12abi_handling2f217h33732e9f83c91bc9E
54
+ // release-SAME: (float noundef %x)
51
55
#[ autodiff_reverse( df2, Const , Active , Active ) ]
52
56
fn f2 ( f : fn ( f32 ) -> f32 , x : f32 ) -> f32 {
53
57
f ( x)
54
58
}
55
59
56
60
// CHECK: ; abi_handling::f3
57
61
// CHECK-NEXT: ; Function Attrs: {{.*}}noinline{{.*}}
58
- // debug-NEXT: define internal float @_ZN12abi_handling2f317h9cd1fc602b0815a4E(ptr align 4 %x, ptr align 4 %y)
59
- // release-NEXT: define internal fastcc noundef float @_ZN12abi_handling2f317h9cd1fc602b0815a4E(float %x.0.val)
62
+ // debug-NEXT: define internal float @_ZN12abi_handling2f317h9cd1fc602b0815a4E
63
+ // debug-SAME: (ptr align 4 %x, ptr align 4 %y)
64
+ // release-NEXT: define internal fastcc noundef float @_ZN12abi_handling2f317h9cd1fc602b0815a4E
65
+ // release-SAME: (float %x.0.val)
60
66
#[ autodiff_forward( df3, Dual , Dual , Dual ) ]
61
67
fn f3 < ' a > ( x : & ' a f32 , y : & ' a f32 ) -> f32 {
62
68
* x * * y
63
69
}
64
70
65
71
// CHECK: ; abi_handling::f4
66
72
// CHECK-NEXT: ; Function Attrs: {{.*}}noinline{{.*}}
67
- // debug-NEXT: define internal float @_ZN12abi_handling2f417h2f4a9a7492d91e9fE(float %x.0, float %x.1)
68
- // release-NEXT: define internal fastcc noundef float @_ZN12abi_handling2f417h2f4a9a7492d91e9fE(float noundef %x.0, float noundef %x.1)
73
+ // debug-NEXT: define internal float @_ZN12abi_handling2f417h2f4a9a7492d91e9fE
74
+ // debug-SAME: (float %x.0, float %x.1)
75
+ // release-NEXT: define internal fastcc noundef float @_ZN12abi_handling2f417h2f4a9a7492d91e9fE
76
+ // release-SAME: (float noundef %x.0, float noundef %x.1)
69
77
#[ autodiff_forward( df4, Dual , Dual ) ]
70
78
fn f4 ( x : ( f32 , f32 ) ) -> f32 {
71
79
x. 0 * x. 1
72
80
}
73
81
74
82
// CHECK: ; abi_handling::f5
75
83
// CHECK-NEXT: ; Function Attrs: {{.*}}noinline{{.*}}
76
- // debug-NEXT: define internal float @_ZN12abi_handling2f517hf8d4ac4d2c2a3976E(float %i.0, float %i.1)
77
- // release-NEXT: define internal fastcc noundef float @_ZN12abi_handling2f517hf8d4ac4d2c2a3976E(float noundef %i.0, float noundef %i.1)
84
+ // debug-NEXT: define internal float @_ZN12abi_handling2f517hf8d4ac4d2c2a3976E
85
+ // debug-SAME: (float %i.0, float %i.1)
86
+ // release-NEXT: define internal fastcc noundef float @_ZN12abi_handling2f517hf8d4ac4d2c2a3976E
87
+ // release-SAME: (float noundef %i.0, float noundef %i.1)
78
88
#[ autodiff_forward( df5, Dual , Dual ) ]
79
89
fn f5 ( i : Input ) -> f32 {
80
90
i. x + i. y
81
91
}
82
92
83
93
// CHECK: ; abi_handling::f6
84
94
// CHECK-NEXT: ; Function Attrs: {{.*}}noinline{{.*}}
85
- // debug-NEXT: define internal float @_ZN12abi_handling2f617h5784b207bbb2483eE(float %i.0, float %i.1)
86
- // release-NEXT: define internal fastcc noundef float @_ZN12abi_handling2f617h5784b207bbb2483eE(float noundef %i.0, float noundef %i.1)
95
+ // debug-NEXT: define internal float @_ZN12abi_handling2f617h5784b207bbb2483eE
96
+ // debug-SAME: (float %i.0, float %i.1)
97
+ // release-NEXT: define internal fastcc noundef float @_ZN12abi_handling2f617h5784b207bbb2483eE
98
+ // release-SAME: (float noundef %i.0, float noundef %i.1)
87
99
#[ autodiff_forward( df6, Dual , Dual ) ]
88
100
fn f6 ( i : NestedInput ) -> f32 {
89
101
i. x + i. y . z * i. y . z
90
102
}
91
103
92
104
// df1
93
- // release: define internal fastcc { float, float } @fwddiffe_ZN12abi_handling2f117h536ac8081c1e4101E(float %x.0.val, float %x.4.val)
105
+ // release: define internal fastcc { float, float }
106
+ // release-SAME: @fwddiffe_ZN12abi_handling2f117h536ac8081c1e4101E
107
+ // release-SAME: (float %x.0.val, float %x.4.val)
94
108
// release-NEXT: start:
95
109
// release-NEXT: %_0 = fadd float %x.0.val, %x.4.val
96
110
// release-NEXT: %0 = insertvalue { float, float } undef, float %_0, 0
97
111
// release-NEXT: %1 = insertvalue { float, float } %0, float 1.000000e+00, 1
98
112
// release-NEXT: ret { float, float } %1
99
113
// release-NEXT: }
100
114
101
- // debug: define internal { float, float } @fwddiffe_ZN12abi_handling2f117h536ac8081c1e4101E(ptr align 4 %x, ptr align 4 %"x'")
115
+ // debug: define internal { float, float } @fwddiffe_ZN12abi_handling2f117h536ac8081c1e4101E
116
+ // debug-SAME: (ptr align 4 %x, ptr align 4 %"x'")
102
117
// debug-NEXT: start:
103
118
// debug-NEXT: %"'ipg" = getelementptr inbounds float, ptr %"x'", i64 0
104
119
// debug-NEXT: %0 = getelementptr inbounds nuw float, ptr %x, i64 0
@@ -116,15 +131,18 @@ fn f6(i: NestedInput) -> f32 {
116
131
// debug-NEXT: }
117
132
118
133
// df2
119
- // release: define internal fastcc { float, float } @diffe_ZN12abi_handling2f217h33732e9f83c91bc9E(float noundef %x)
134
+ // release: define internal fastcc { float, float }
135
+ // release-SAME: @diffe_ZN12abi_handling2f217h33732e9f83c91bc9E
136
+ // release-SAME: (float noundef %x)
120
137
// release-NEXT: invertstart:
121
138
// release-NEXT: %_0.i = fmul float %x, %x
122
139
// release-NEXT: %0 = insertvalue { float, float } undef, float %_0.i, 0
123
140
// release-NEXT: %1 = insertvalue { float, float } %0, float 0.000000e+00, 1
124
141
// release-NEXT: ret { float, float } %1
125
142
// release-NEXT: }
126
143
127
- // debug: define internal { float, float } @diffe_ZN12abi_handling2f217h33732e9f83c91bc9E(ptr %f, float %x, float %differeturn)
144
+ // debug: define internal { float, float } @diffe_ZN12abi_handling2f217h33732e9f83c91bc9E
145
+ // debug-SAME: (ptr %f, float %x, float %differeturn)
128
146
// debug-NEXT: start:
129
147
// debug-NEXT: %"x'de" = alloca float, align 4
130
148
// debug-NEXT: store float 0.000000e+00, ptr %"x'de", align 4
@@ -142,14 +160,17 @@ fn f6(i: NestedInput) -> f32 {
142
160
// debug-NEXT: }
143
161
144
162
// df3
145
- // release: define internal fastcc { float, float } @fwddiffe_ZN12abi_handling2f317h9cd1fc602b0815a4E(float %x.0.val)
163
+ // release: define internal fastcc { float, float }
164
+ // release-SAME: @fwddiffe_ZN12abi_handling2f317h9cd1fc602b0815a4E
165
+ // release-SAME: (float %x.0.val)
146
166
// release-NEXT: start:
147
167
// release-NEXT: %0 = insertvalue { float, float } undef, float %x.0.val, 0
148
168
// release-NEXT: %1 = insertvalue { float, float } %0, float 0x40099999A0000000, 1
149
169
// release-NEXT: ret { float, float } %1
150
170
// release-NEXT: }
151
171
152
- // debug: define internal { float, float } @fwddiffe_ZN12abi_handling2f317h9cd1fc602b0815a4E(ptr align 4 %x, ptr align 4 %"x'", ptr align 4 %y, ptr align 4 %"y'")
172
+ // debug: define internal { float, float } @fwddiffe_ZN12abi_handling2f317h9cd1fc602b0815a4E
173
+ // debug-SAME: (ptr align 4 %x, ptr align 4 %"x'", ptr align 4 %y, ptr align 4 %"y'")
153
174
// debug-NEXT: start:
154
175
// debug-NEXT: %"_3'ipl" = load float, ptr %"x'", align 4, !alias.scope !9, !noalias !12
155
176
// debug-NEXT: %_3 = load float, ptr %x, align 4, !alias.scope !12, !noalias !9
@@ -165,14 +186,17 @@ fn f6(i: NestedInput) -> f32 {
165
186
// debug-NEXT: }
166
187
167
188
// df4
168
- // release: define internal fastcc { float, float } @fwddiffe_ZN12abi_handling2f417h2f4a9a7492d91e9fE(float noundef %x.0, float %"x.0'")
189
+ // release: define internal fastcc { float, float }
190
+ // release-SAME: @fwddiffe_ZN12abi_handling2f417h2f4a9a7492d91e9fE
191
+ // release-SAME: (float noundef %x.0, float %"x.0'")
169
192
// release-NEXT: start:
170
193
// release-NEXT: %0 = insertvalue { float, float } undef, float %x.0, 0
171
194
// release-NEXT: %1 = insertvalue { float, float } %0, float %"x.0'", 1
172
195
// release-NEXT: ret { float, float } %1
173
196
// release-NEXT: }
174
197
175
- // debug: define internal { float, float } @fwddiffe_ZN12abi_handling2f417h2f4a9a7492d91e9fE(float %x.0, float %"x.0'", float %x.1, float %"x.1'")
198
+ // debug: define internal { float, float } @fwddiffe_ZN12abi_handling2f417h2f4a9a7492d91e9fE
199
+ // debug-SAME: (float %x.0, float %"x.0'", float %x.1, float %"x.1'")
176
200
// debug-NEXT: start:
177
201
// debug-NEXT: %_0 = fmul float %x.0, %x.1
178
202
// debug-NEXT: %0 = fmul fast float %"x.0'", %x.1
@@ -184,15 +208,18 @@ fn f6(i: NestedInput) -> f32 {
184
208
// debug-NEXT: }
185
209
186
210
// df5
187
- // release: define internal fastcc { float, float } @fwddiffe_ZN12abi_handling2f517hf8d4ac4d2c2a3976E(float noundef %i.0, float %"i.0'")
211
+ // release: define internal fastcc { float, float }
212
+ // release-SAME: @fwddiffe_ZN12abi_handling2f517hf8d4ac4d2c2a3976E
213
+ // release-SAME: (float noundef %i.0, float %"i.0'")
188
214
// release-NEXT: start:
189
215
// release-NEXT: %_0 = fadd float %i.0, 1.000000e+00
190
216
// release-NEXT: %0 = insertvalue { float, float } undef, float %_0, 0
191
217
// release-NEXT: %1 = insertvalue { float, float } %0, float %"i.0'", 1
192
218
// release-NEXT: ret { float, float } %1
193
219
// release-NEXT: }
194
220
195
- // debug: define internal { float, float } @fwddiffe_ZN12abi_handling2f517hf8d4ac4d2c2a3976E(float %i.0, float %"i.0'", float %i.1, float %"i.1'")
221
+ // debug: define internal { float, float } @fwddiffe_ZN12abi_handling2f517hf8d4ac4d2c2a3976E
222
+ // debug-SAME: (float %i.0, float %"i.0'", float %i.1, float %"i.1'")
196
223
// debug-NEXT: start:
197
224
// debug-NEXT: %_0 = fadd float %i.0, %i.1
198
225
// debug-NEXT: %0 = fadd fast float %"i.0'", %"i.1'"
@@ -202,7 +229,9 @@ fn f6(i: NestedInput) -> f32 {
202
229
// debug-NEXT: }
203
230
204
231
// df6
205
- // release: define internal fastcc { float, float } @fwddiffe_ZN12abi_handling2f617h5784b207bbb2483eE(float noundef %i.0, float %"i.0'", float noundef %i.1, float %"i.1'")
232
+ // release: define internal fastcc { float, float }
233
+ // release-SAME: @fwddiffe_ZN12abi_handling2f617h5784b207bbb2483eE
234
+ // release-SAME: (float noundef %i.0, float %"i.0'", float noundef %i.1, float %"i.1'")
206
235
// release-NEXT: start:
207
236
// release-NEXT: %_3 = fmul float %i.1, %i.1
208
237
// release-NEXT: %0 = fadd fast float %"i.1'", %"i.1'"
@@ -214,7 +243,8 @@ fn f6(i: NestedInput) -> f32 {
214
243
// release-NEXT: ret { float, float } %4
215
244
// release-NEXT: }
216
245
217
- // debug: define internal { float, float } @fwddiffe_ZN12abi_handling2f617h5784b207bbb2483eE(float %i.0, float %"i.0'", float %i.1, float %"i.1'")
246
+ // debug: define internal { float, float } @fwddiffe_ZN12abi_handling2f617h5784b207bbb2483eE
247
+ // debug-SAME: (float %i.0, float %"i.0'", float %i.1, float %"i.1'")
218
248
// debug-NEXT: start:
219
249
// debug-NEXT: %_3 = fmul float %i.1, %i.1
220
250
// debug-NEXT: %0 = fmul fast float %"i.1'", %i.1
0 commit comments