@@ -48,6 +48,9 @@ unsigned long check_ulong() { return 0; }
48
48
// CHECK-LABEL: define{{.*}} i64 @check_ulonglong()
49
49
unsigned long long check_ulonglong () { return 0 ; }
50
50
51
+ // CHECK-LABEL: define{{.*}} half @check_float16()
52
+ _Float16 check_float16 () { return 0 ; }
53
+
51
54
// CHECK-LABEL: define{{.*}} float @check_float()
52
55
float check_float () { return 0 ; }
53
56
@@ -127,6 +130,14 @@ struct i16x4_s f_i16x4_s(struct i16x4_s x) {
127
130
/// available, the value is passed in a GAR; if no GAR is available, the value
128
131
/// is passed on the stack.
129
132
133
+ struct f16x1_s {
134
+ __fp16 a ;
135
+ };
136
+
137
+ struct float16x1_s {
138
+ _Float16 a ;
139
+ };
140
+
130
141
struct f32x1_s {
131
142
float a ;
132
143
};
@@ -135,6 +146,16 @@ struct f64x1_s {
135
146
double a ;
136
147
};
137
148
149
+ // CHECK-LABEL: define{{.*}} half @f_f16x1_s(half %0)
150
+ struct f16x1_s f_f16x1_s (struct f16x1_s x ) {
151
+ return x ;
152
+ }
153
+
154
+ // CHECK-LABEL: define{{.*}} half @f_float16x1_s(half %0)
155
+ struct float16x1_s f_float16x1_s (struct float16x1_s x ) {
156
+ return x ;
157
+ }
158
+
138
159
// CHECK-LABEL: define{{.*}} float @f_f32x1_s(float %0)
139
160
struct f32x1_s f_f32x1_s (struct f32x1_s x ) {
140
161
return x ;
@@ -151,10 +172,20 @@ struct f64x1_s f_f64x1_s(struct f64x1_s x) {
151
172
/// number of available FAR is less than 2, it’s passed in a GAR, and passed on
152
173
/// the stack if no GAR is available.
153
174
175
+ struct f16x2_s {
176
+ __fp16 a ;
177
+ _Float16 b ;
178
+ };
179
+
154
180
struct f32x2_s {
155
181
float a , b ;
156
182
};
157
183
184
+ // CHECK-LABEL: define{{.*}} { half, half } @f_f16x2_s(half %0, half %1)
185
+ struct f16x2_s f_f16x2_s (struct f16x2_s x ) {
186
+ return x ;
187
+ }
188
+
158
189
// CHECK-LABEL: define{{.*}} { float, float } @f_f32x2_s(float %0, float %1)
159
190
struct f32x2_s f_f32x2_s (struct f32x2_s x ) {
160
191
return x ;
@@ -165,11 +196,21 @@ struct f32x2_s f_f32x2_s(struct f32x2_s x) {
165
196
/// i. Multiple fixed-point members. If there are available GAR, the structure
166
197
/// is passed in a GAR, and passed on the stack if no GAR is available.
167
198
199
+ struct f16x1_i16x2_s {
200
+ _Float16 a ;
201
+ int16_t b , c ;
202
+ };
203
+
168
204
struct f32x1_i16x2_s {
169
205
float a ;
170
206
int16_t b , c ;
171
207
};
172
208
209
+ // CHECK-LABEL: define{{.*}} i64 @f_f16x1_i16x2_s(i64 %x.coerce)
210
+ struct f16x1_i16x2_s f_f16x1_i16x2_s (struct f16x1_i16x2_s x ) {
211
+ return x ;
212
+ }
213
+
173
214
// CHECK-LABEL: define{{.*}} i64 @f_f32x1_i16x2_s(i64 %x.coerce)
174
215
struct f32x1_i16x2_s f_f32x1_i16x2_s (struct f32x1_i16x2_s x ) {
175
216
return x ;
@@ -181,11 +222,21 @@ struct f32x1_i16x2_s f_f32x1_i16x2_s(struct f32x1_i16x2_s x) {
181
222
/// but one GAR is available, it’s passed in GAR; If no GAR is available, it’s
182
223
/// passed on the stack.
183
224
225
+ struct f16x1_i32x1_s {
226
+ _Float16 a ;
227
+ int32_t b ;
228
+ };
229
+
184
230
struct f32x1_i32x1_s {
185
231
float a ;
186
232
int32_t b ;
187
233
};
188
234
235
+ // CHECK-LABEL: define{{.*}} { half, i32 } @f_f16x1_i32x1_s(half %0, i32 %1)
236
+ struct f16x1_i32x1_s f_f16x1_i32x1_s (struct f16x1_i32x1_s x ) {
237
+ return x ;
238
+ }
239
+
189
240
// CHECK-LABEL: define{{.*}} { float, i32 } @f_f32x1_i32x1_s(float %0, i32 %1)
190
241
struct f32x1_i32x1_s f_f32x1_i32x1_s (struct f32x1_i32x1_s x ) {
191
242
return x ;
@@ -253,6 +304,16 @@ struct f32x4_s f_f32x4_s(struct f32x4_s x) {
253
304
return x ;
254
305
}
255
306
307
+ struct f16x5_s {
308
+ _Float16 a , b , c , d ;
309
+ __fp16 e ;
310
+ };
311
+
312
+ // CHECK-LABEL: define{{.*}} [2 x i64] @f_f16x5_s([2 x i64] %x.coerce)
313
+ struct f16x5_s f_f16x5_s (struct f16x5_s x ) {
314
+ return x ;
315
+ }
316
+
256
317
/// ii. The structure with two double members is passed in a pair of available
257
318
/// FARs. If no a pair of available FARs, it’s passed in GARs. A structure with
258
319
/// one double member and one float member is same.
@@ -312,6 +373,16 @@ struct f32x2_i32x2_s f_f32x2_i32x2_s(struct f32x2_i32x2_s x) {
312
373
return x ;
313
374
}
314
375
376
+ struct f16x4_i32x2_s {
377
+ _Float16 a , b , c , d ;
378
+ int32_t e , f ;
379
+ };
380
+
381
+ // CHECK-LABEL: define{{.*}} [2 x i64] @f_f16x4_i32x2_s([2 x i64] %x.coerce)
382
+ struct f16x4_i32x2_s f_f16x4_i32x2_s (struct f16x4_i32x2_s x ) {
383
+ return x ;
384
+ }
385
+
315
386
/// 3. WOA > 2 × GRLEN
316
387
/// a. It’s passed by reference and are replaced in the argument list with the
317
388
/// address. If there is an available GAR, the reference is passed in the GAR,
0 commit comments