1 // RUN: %clang_cc1 -no-enable-noundef-analysis -triple armv7-apple-darwin9 -emit-llvm -o - %s | FileCheck %s
2 // RUN: %clang_cc1 -no-enable-noundef-analysis -triple armv7s-apple-ios9 -emit-llvm -o - %s | FileCheck %s
3 // RUN: %clang_cc1 -no-enable-noundef-analysis -triple armv7k-apple-ios9 -emit-llvm -o - %s | FileCheck %s
5 #define SWIFTCALL __attribute__((swiftcall))
6 #define SWIFTASYNCCALL __attribute__((swiftasynccall))
7 #define OUT __attribute__((swift_indirect_result))
8 #define ERROR __attribute__((swift_error_result))
9 #define CONTEXT __attribute__((swift_context))
10 #define ASYNC_CONTEXT __attribute__((swift_async_context))
12 /*****************************************************************************/
13 /****************************** PARAMETER ABIS *******************************/
14 /*****************************************************************************/
16 SWIFTCALL
void indirect_result_1(OUT
int *arg0
, OUT
float *arg1
) {}
17 // CHECK-LABEL: define{{.*}} void @indirect_result_1(ptr noalias sret(ptr) align 4 dereferenceable(4){{.*}}, ptr noalias align 4 dereferenceable(4){{.*}})
19 // TODO: maybe this shouldn't suppress sret.
20 SWIFTCALL
int indirect_result_2(OUT
int *arg0
, OUT
float *arg1
) { __builtin_unreachable(); }
21 // CHECK-LABEL: define{{.*}} i32 @indirect_result_2(ptr noalias align 4 dereferenceable(4){{.*}}, ptr noalias align 4 dereferenceable(4){{.*}})
23 typedef struct { char array
[1024]; } struct_reallybig
;
24 SWIFTCALL struct_reallybig
indirect_result_3(OUT
int *arg0
, OUT
float *arg1
) { __builtin_unreachable(); }
25 // CHECK-LABEL: define{{.*}} void @indirect_result_3(ptr dead_on_unwind noalias writable sret(%struct.struct_reallybig) {{.*}}, ptr noalias align 4 dereferenceable(4){{.*}}, ptr noalias align 4 dereferenceable(4){{.*}})
27 SWIFTCALL
void context_1(CONTEXT
void *self
) {}
28 // CHECK-LABEL: define{{.*}} void @context_1(ptr swiftself
30 SWIFTASYNCCALL
void async_context_1(ASYNC_CONTEXT
void *self
) {}
31 // CHECK-LABEL: define{{.*}} void @async_context_1(ptr swiftasync
33 SWIFTCALL
void context_2(void *arg0
, CONTEXT
void *self
) {}
34 // CHECK-LABEL: define{{.*}} void @context_2(ptr{{.*}}, ptr swiftself
36 SWIFTASYNCCALL
void async_context_2(void *arg0
, ASYNC_CONTEXT
void *self
) {}
37 // CHECK-LABEL: define{{.*}} void @async_context_2(ptr{{.*}}, ptr swiftasync
39 SWIFTCALL
void context_error_1(CONTEXT
int *self
, ERROR
float **error
) {}
40 // CHECK-LABEL: define{{.*}} void @context_error_1(ptr swiftself{{.*}}, ptr swifterror %0)
41 // CHECK: [[TEMP:%.*]] = alloca ptr, align 4
42 // CHECK: [[T0:%.*]] = load ptr, ptr [[ERRORARG:%.*]], align 4
43 // CHECK: store ptr [[T0]], ptr [[TEMP]], align 4
44 // CHECK: [[T0:%.*]] = load ptr, ptr [[TEMP]], align 4
45 // CHECK: store ptr [[T0]], ptr [[ERRORARG]], align 4
46 void test_context_error_1(void) {
49 context_error_1(&x
, &error
);
51 // CHECK-LABEL: define{{.*}} void @test_context_error_1()
52 // CHECK: [[X:%.*]] = alloca i32, align 4
53 // CHECK: [[ERROR:%.*]] = alloca ptr, align 4
54 // CHECK: [[TEMP:%.*]] = alloca swifterror ptr, align 4
55 // CHECK: [[T0:%.*]] = load ptr, ptr [[ERROR]], align 4
56 // CHECK: store ptr [[T0]], ptr [[TEMP]], align 4
57 // CHECK: call [[SWIFTCC:swiftcc]] void @context_error_1(ptr swiftself [[X]], ptr swifterror [[TEMP]])
58 // CHECK: [[T0:%.*]] = load ptr, ptr [[TEMP]], align 4
59 // CHECK: store ptr [[T0]], ptr [[ERROR]], align 4
61 SWIFTCALL
void context_error_2(short s
, CONTEXT
int *self
, ERROR
float **error
) {}
62 // CHECK-LABEL: define{{.*}} void @context_error_2(i16{{.*}}, ptr swiftself{{.*}}, ptr swifterror %0)
64 /*****************************************************************************/
65 /********************************** LOWERING *********************************/
66 /*****************************************************************************/
68 typedef float float3
__attribute__((ext_vector_type(3)));
69 typedef float float4
__attribute__((ext_vector_type(4)));
70 typedef float float8
__attribute__((ext_vector_type(8)));
71 typedef double double2
__attribute__((ext_vector_type(2)));
72 typedef double double4
__attribute__((ext_vector_type(4)));
73 typedef int int3
__attribute__((ext_vector_type(3)));
74 typedef int int4
__attribute__((ext_vector_type(4)));
75 typedef int int5
__attribute__((ext_vector_type(5)));
76 typedef int int8
__attribute__((ext_vector_type(8)));
77 typedef char char16
__attribute__((ext_vector_type(16)));
78 typedef short short8
__attribute__((ext_vector_type(8)));
79 typedef long long long2
__attribute__((ext_vector_type(2)));
82 SWIFTCALL TYPE return_##TYPE(void) { \
86 SWIFTCALL void take_##TYPE(TYPE v) { \
88 void test_##TYPE(void) { \
89 take_##TYPE(return_##TYPE()); \
92 /*****************************************************************************/
93 /*********************************** STRUCTS *********************************/
94 /*****************************************************************************/
99 // CHECK-LABEL: define{{.*}} @return_struct_empty()
101 // CHECK-LABEL: define{{.*}} @take_struct_empty()
112 // CHECK-LABEL: define{{.*}} @return_struct_1()
113 // CHECK: [[RET:%.*]] = alloca [[REC:%.*]], align 4
114 // CHECK: @llvm.memset
115 // CHECK: [[T0:%.*]] = getelementptr inbounds nuw [[AGG:{ i32, i16, \[2 x i8\], float, float }]], ptr [[RET]], i32 0, i32 0
116 // CHECK: [[FIRST:%.*]] = load i32, ptr [[T0]], align 4
117 // CHECK: [[T0:%.*]] = getelementptr inbounds nuw [[AGG]], ptr [[RET]], i32 0, i32 1
118 // CHECK: [[SECOND:%.*]] = load i16, ptr [[T0]], align 4
119 // CHECK: [[T0:%.*]] = getelementptr inbounds nuw [[AGG]], ptr [[RET]], i32 0, i32 3
120 // CHECK: [[THIRD:%.*]] = load float, ptr [[T0]], align
121 // CHECK: [[T0:%.*]] = getelementptr inbounds nuw [[AGG]], ptr [[RET]], i32 0, i32 4
122 // CHECK: [[FOURTH:%.*]] = load float, ptr [[T0]], align
123 // CHECK: [[T0:%.*]] = insertvalue [[UAGG:{ i32, i16, float, float }]] poison, i32 [[FIRST]], 0
124 // CHECK: [[T1:%.*]] = insertvalue [[UAGG]] [[T0]], i16 [[SECOND]], 1
125 // CHECK: [[T2:%.*]] = insertvalue [[UAGG]] [[T1]], float [[THIRD]], 2
126 // CHECK: [[T3:%.*]] = insertvalue [[UAGG]] [[T2]], float [[FOURTH]], 3
127 // CHECK: ret [[UAGG]] [[T3]]
128 // CHECK-LABEL: define{{.*}} @take_struct_1(i32 %0, i16 %1, float %2, float %3)
129 // CHECK: [[V:%.*]] = alloca [[REC]], align 4
130 // CHECK: [[T0:%.*]] = getelementptr inbounds nuw [[AGG]], ptr [[V]], i32 0, i32 0
131 // CHECK: store i32 %0, ptr [[T0]], align 4
132 // CHECK: [[T0:%.*]] = getelementptr inbounds nuw [[AGG]], ptr [[V]], i32 0, i32 1
133 // CHECK: store i16 %1, ptr [[T0]], align 4
134 // CHECK: [[T0:%.*]] = getelementptr inbounds nuw [[AGG]], ptr [[V]], i32 0, i32 3
135 // CHECK: store float %2, ptr [[T0]], align 4
136 // CHECK: [[T0:%.*]] = getelementptr inbounds nuw [[AGG]], ptr [[V]], i32 0, i32 4
137 // CHECK: store float %3, ptr [[T0]], align 4
139 // CHECK-LABEL: define{{.*}} void @test_struct_1()
140 // CHECK: [[TMP:%.*]] = alloca [[REC]], align 4
141 // CHECK: [[CALL:%.*]] = call [[SWIFTCC]] [[UAGG]] @return_struct_1()
142 // CHECK: [[T0:%.*]] = getelementptr inbounds nuw [[AGG]], ptr [[TMP]], i32 0, i32 0
143 // CHECK: [[T1:%.*]] = extractvalue [[UAGG]] [[CALL]], 0
144 // CHECK: store i32 [[T1]], ptr [[T0]], align 4
145 // CHECK: [[T0:%.*]] = getelementptr inbounds nuw [[AGG]], ptr [[TMP]], i32 0, i32 1
146 // CHECK: [[T1:%.*]] = extractvalue [[UAGG]] [[CALL]], 1
147 // CHECK: store i16 [[T1]], ptr [[T0]], align 4
148 // CHECK: [[T0:%.*]] = getelementptr inbounds nuw [[AGG]], ptr [[TMP]], i32 0, i32 3
149 // CHECK: [[T1:%.*]] = extractvalue [[UAGG]] [[CALL]], 2
150 // CHECK: store float [[T1]], ptr [[T0]], align 4
151 // CHECK: [[T0:%.*]] = getelementptr inbounds nuw [[AGG]], ptr [[TMP]], i32 0, i32 4
152 // CHECK: [[T1:%.*]] = extractvalue [[UAGG]] [[CALL]], 3
153 // CHECK: store float [[T1]], ptr [[T0]], align 4
154 // CHECK: [[T0:%.*]] = getelementptr inbounds nuw [[AGG]], ptr [[TMP]], i32 0, i32 0
155 // CHECK: [[FIRST:%.*]] = load i32, ptr [[T0]], align 4
156 // CHECK: [[T0:%.*]] = getelementptr inbounds nuw [[AGG]], ptr [[TMP]], i32 0, i32 1
157 // CHECK: [[SECOND:%.*]] = load i16, ptr [[T0]], align 4
158 // CHECK: [[T0:%.*]] = getelementptr inbounds nuw [[AGG]], ptr [[TMP]], i32 0, i32 3
159 // CHECK: [[THIRD:%.*]] = load float, ptr [[T0]], align 4
160 // CHECK: [[T0:%.*]] = getelementptr inbounds nuw [[AGG]], ptr [[TMP]], i32 0, i32 4
161 // CHECK: [[FOURTH:%.*]] = load float, ptr [[T0]], align 4
162 // CHECK: call [[SWIFTCC]] void @take_struct_1(i32 [[FIRST]], i16 [[SECOND]], float [[THIRD]], float [[FOURTH]])
168 __attribute__((aligned(2))) char c1
;
173 // CHECK-LABEL: define{{.*}} @return_struct_2()
174 // CHECK: [[RET:%.*]] = alloca [[REC:%.*]], align 4
175 // CHECK: @llvm.memset
176 // CHECK: [[T0:%.*]] = getelementptr inbounds nuw [[AGG:{ i32, i32, float, float }]], ptr [[RET]], i32 0, i32 0
177 // CHECK: [[FIRST:%.*]] = load i32, ptr [[T0]], align 4
178 // CHECK: [[T0:%.*]] = getelementptr inbounds nuw [[AGG]], ptr [[RET]], i32 0, i32 1
179 // CHECK: [[SECOND:%.*]] = load i32, ptr [[T0]], align 4
180 // CHECK: [[T0:%.*]] = getelementptr inbounds nuw [[AGG]], ptr [[RET]], i32 0, i32 2
181 // CHECK: [[THIRD:%.*]] = load float, ptr [[T0]], align
182 // CHECK: [[T0:%.*]] = getelementptr inbounds nuw [[AGG]], ptr [[RET]], i32 0, i32 3
183 // CHECK: [[FOURTH:%.*]] = load float, ptr [[T0]], align
184 // CHECK: [[T0:%.*]] = insertvalue [[UAGG:{ i32, i32, float, float }]] poison, i32 [[FIRST]], 0
185 // CHECK: [[T1:%.*]] = insertvalue [[UAGG]] [[T0]], i32 [[SECOND]], 1
186 // CHECK: [[T2:%.*]] = insertvalue [[UAGG]] [[T1]], float [[THIRD]], 2
187 // CHECK: [[T3:%.*]] = insertvalue [[UAGG]] [[T2]], float [[FOURTH]], 3
188 // CHECK: ret [[UAGG]] [[T3]]
189 // CHECK-LABEL: define{{.*}} @take_struct_2(i32 %0, i32 %1, float %2, float %3)
190 // CHECK: [[V:%.*]] = alloca [[REC]], align 4
191 // CHECK: [[T0:%.*]] = getelementptr inbounds nuw [[AGG]], ptr [[V]], i32 0, i32 0
192 // CHECK: store i32 %0, ptr [[T0]], align 4
193 // CHECK: [[T0:%.*]] = getelementptr inbounds nuw [[AGG]], ptr [[V]], i32 0, i32 1
194 // CHECK: store i32 %1, ptr [[T0]], align 4
195 // CHECK: [[T0:%.*]] = getelementptr inbounds nuw [[AGG]], ptr [[V]], i32 0, i32 2
196 // CHECK: store float %2, ptr [[T0]], align 4
197 // CHECK: [[T0:%.*]] = getelementptr inbounds nuw [[AGG]], ptr [[V]], i32 0, i32 3
198 // CHECK: store float %3, ptr [[T0]], align 4
200 // CHECK-LABEL: define{{.*}} void @test_struct_2()
201 // CHECK: [[TMP:%.*]] = alloca [[REC]], align 4
202 // CHECK: [[CALL:%.*]] = call [[SWIFTCC]] [[UAGG]] @return_struct_2()
203 // CHECK: [[T0:%.*]] = getelementptr inbounds nuw [[AGG]], ptr [[TMP]], i32 0, i32 0
204 // CHECK: [[T1:%.*]] = extractvalue [[UAGG]] [[CALL]], 0
205 // CHECK: store i32 [[T1]], ptr [[T0]], align 4
206 // CHECK: [[T0:%.*]] = getelementptr inbounds nuw [[AGG]], ptr [[TMP]], i32 0, i32 1
207 // CHECK: [[T1:%.*]] = extractvalue [[UAGG]] [[CALL]], 1
208 // CHECK: store i32 [[T1]], ptr [[T0]], align 4
209 // CHECK: [[T0:%.*]] = getelementptr inbounds nuw [[AGG]], ptr [[TMP]], i32 0, i32 2
210 // CHECK: [[T1:%.*]] = extractvalue [[UAGG]] [[CALL]], 2
211 // CHECK: store float [[T1]], ptr [[T0]], align 4
212 // CHECK: [[T0:%.*]] = getelementptr inbounds nuw [[AGG]], ptr [[TMP]], i32 0, i32 3
213 // CHECK: [[T1:%.*]] = extractvalue [[UAGG]] [[CALL]], 3
214 // CHECK: store float [[T1]], ptr [[T0]], align 4
215 // CHECK: [[T0:%.*]] = getelementptr inbounds nuw [[AGG]], ptr [[TMP]], i32 0, i32 0
216 // CHECK: [[FIRST:%.*]] = load i32, ptr [[T0]], align 4
217 // CHECK: [[T0:%.*]] = getelementptr inbounds nuw [[AGG]], ptr [[TMP]], i32 0, i32 1
218 // CHECK: [[SECOND:%.*]] = load i32, ptr [[T0]], align 4
219 // CHECK: [[T0:%.*]] = getelementptr inbounds nuw [[AGG]], ptr [[TMP]], i32 0, i32 2
220 // CHECK: [[THIRD:%.*]] = load float, ptr [[T0]], align 4
221 // CHECK: [[T0:%.*]] = getelementptr inbounds nuw [[AGG]], ptr [[TMP]], i32 0, i32 3
222 // CHECK: [[FOURTH:%.*]] = load float, ptr [[T0]], align 4
223 // CHECK: call [[SWIFTCC]] void @take_struct_2(i32 [[FIRST]], i32 [[SECOND]], float [[THIRD]], float [[FOURTH]])
226 // There's no way to put a field randomly in the middle of an otherwise
227 // empty storage unit in C, so that case has to be tested in C++, which
228 // can use empty structs to introduce arbitrary padding. (In C, they end up
229 // with size 0 and so don't affect layout.)
231 // Misaligned data rule.
234 __attribute__((packed
)) float f
;
235 } struct_misaligned_1
;
236 TEST(struct_misaligned_1
)
237 // CHECK-LABEL: define{{.*}} @return_struct_misaligned_1()
238 // CHECK: [[RET:%.*]] = alloca [[REC:%.*]], align
239 // CHECK: @llvm.memset
240 // CHECK: [[T0:%.*]] = getelementptr inbounds nuw [[AGG:{ i32, i8 }]], ptr [[RET]], i32 0, i32 0
241 // CHECK: [[FIRST:%.*]] = load i32, ptr [[T0]], align
242 // CHECK: [[T0:%.*]] = getelementptr inbounds nuw [[AGG]], ptr [[RET]], i32 0, i32 1
243 // CHECK: [[SECOND:%.*]] = load i8, ptr [[T0]], align
244 // CHECK: [[T0:%.*]] = insertvalue [[UAGG:{ i32, i8 }]] poison, i32 [[FIRST]], 0
245 // CHECK: [[T1:%.*]] = insertvalue [[UAGG]] [[T0]], i8 [[SECOND]], 1
246 // CHECK: ret [[UAGG]] [[T1]]
247 // CHECK-LABEL: define{{.*}} @take_struct_misaligned_1(i32 %0, i8 %1)
248 // CHECK: [[V:%.*]] = alloca [[REC]], align
249 // CHECK: [[T0:%.*]] = getelementptr inbounds nuw [[AGG]], ptr [[V]], i32 0, i32 0
250 // CHECK: store i32 %0, ptr [[T0]], align
251 // CHECK: [[T0:%.*]] = getelementptr inbounds nuw [[AGG]], ptr [[V]], i32 0, i32 1
252 // CHECK: store i8 %1, ptr [[T0]], align
261 // CHECK-LABEL: define{{.*}} void @return_struct_big_1({{.*}} dead_on_unwind noalias writable sret({{.*}})
263 // Should not be byval.
264 // CHECK-LABEL: define{{.*}} void @take_struct_big_1(ptr{{( %.*)?}})
266 /*****************************************************************************/
267 /********************************* TYPE MERGING ******************************/
268 /*****************************************************************************/
275 // CHECK-LABEL: define{{.*}} @return_union_het_fp()
276 // CHECK: [[RET:%.*]] = alloca [[REC:%.*]], align {{(4|8)}}
277 // CHECK: @llvm.memset
278 // CHECK: [[T0:%.*]] = getelementptr inbounds nuw [[AGG:{ i32, i32 }]], ptr [[RET]], i32 0, i32 0
279 // CHECK: [[FIRST:%.*]] = load i32, ptr [[T0]], align {{(4|8)}}
280 // CHECK: [[T0:%.*]] = getelementptr inbounds nuw [[AGG]], ptr [[RET]], i32 0, i32 1
281 // CHECK: [[SECOND:%.*]] = load i32, ptr [[T0]], align {{(4|8)}}
282 // CHECK: [[T0:%.*]] = insertvalue [[UAGG:{ i32, i32 }]] poison, i32 [[FIRST]], 0
283 // CHECK: [[T1:%.*]] = insertvalue [[UAGG]] [[T0]], i32 [[SECOND]], 1
284 // CHECK: ret [[UAGG]] [[T1]]
285 // CHECK-LABEL: define{{.*}} @take_union_het_fp(i32 %0, i32 %1)
286 // CHECK: [[V:%.*]] = alloca [[REC]], align {{(4|8)}}
287 // CHECK: [[T0:%.*]] = getelementptr inbounds nuw [[AGG]], ptr [[V]], i32 0, i32 0
288 // CHECK: store i32 %0, ptr [[T0]], align {{(4|8)}}
289 // CHECK: [[T0:%.*]] = getelementptr inbounds nuw [[AGG]], ptr [[V]], i32 0, i32 1
290 // CHECK: store i32 %1, ptr [[T0]], align {{(4|8)}}
292 // CHECK-LABEL: define{{.*}} void @test_union_het_fp()
293 // CHECK: [[TMP:%.*]] = alloca [[REC]], align {{(4|8)}}
294 // CHECK: [[CALL:%.*]] = call [[SWIFTCC]] [[UAGG]] @return_union_het_fp()
295 // CHECK: [[T0:%.*]] = getelementptr inbounds nuw [[AGG]], ptr [[TMP]], i32 0, i32 0
296 // CHECK: [[T1:%.*]] = extractvalue [[UAGG]] [[CALL]], 0
297 // CHECK: store i32 [[T1]], ptr [[T0]], align {{(4|8)}}
298 // CHECK: [[T0:%.*]] = getelementptr inbounds nuw [[AGG]], ptr [[TMP]], i32 0, i32 1
299 // CHECK: [[T1:%.*]] = extractvalue [[UAGG]] [[CALL]], 1
300 // CHECK: store i32 [[T1]], ptr [[T0]], align {{(4|8)}}
301 // CHECK: [[T0:%.*]] = getelementptr inbounds nuw [[AGG]], ptr [[TMP]], i32 0, i32 0
302 // CHECK: [[FIRST:%.*]] = load i32, ptr [[T0]], align {{(4|8)}}
303 // CHECK: [[T0:%.*]] = getelementptr inbounds nuw [[AGG]], ptr [[TMP]], i32 0, i32 1
304 // CHECK: [[SECOND:%.*]] = load i32, ptr [[T0]], align {{(4|8)}}
305 // CHECK: call [[SWIFTCC]] void @take_union_het_fp(i32 [[FIRST]], i32 [[SECOND]])
314 // CHECK-LABEL: define{{.*}} void @test_union_hom_fp()
315 // CHECK: [[TMP:%.*]] = alloca [[REC:%.*]], align 4
316 // CHECK: [[CALL:%.*]] = call [[SWIFTCC]] float @return_union_hom_fp()
317 // CHECK: [[T0:%.*]] = getelementptr inbounds nuw [[AGG:{ float }]], ptr [[TMP]], i32 0, i32 0
318 // CHECK: store float [[CALL]], ptr [[T0]], align 4
319 // CHECK: [[T0:%.*]] = getelementptr inbounds nuw [[AGG]], ptr [[TMP]], i32 0, i32 0
320 // CHECK: [[FIRST:%.*]] = load float, ptr [[T0]], align 4
321 // CHECK: call [[SWIFTCC]] void @take_union_hom_fp(float [[FIRST]])
327 } union_hom_fp_partial
;
328 TEST(union_hom_fp_partial
)
329 // CHECK-LABEL: define{{.*}} void @test_union_hom_fp_partial()
330 // CHECK: [[TMP:%.*]] = alloca [[REC:%.*]], align 16
331 // CHECK: [[CALL:%.*]] = call [[SWIFTCC]] [[UAGG:{ float, float, float, float }]] @return_union_hom_fp_partial()
332 // CHECK: [[T0:%.*]] = getelementptr inbounds nuw [[AGG:{ float, float, float, float }]], ptr [[TMP]], i32 0, i32 0
333 // CHECK: [[T1:%.*]] = extractvalue [[UAGG]] [[CALL]], 0
334 // CHECK: store float [[T1]], ptr [[T0]], align
335 // CHECK: [[T0:%.*]] = getelementptr inbounds nuw [[AGG]], ptr [[TMP]], i32 0, i32 1
336 // CHECK: [[T1:%.*]] = extractvalue [[UAGG]] [[CALL]], 1
337 // CHECK: store float [[T1]], ptr [[T0]], align
338 // CHECK: [[T0:%.*]] = getelementptr inbounds nuw [[AGG]], ptr [[TMP]], i32 0, i32 2
339 // CHECK: [[T1:%.*]] = extractvalue [[UAGG]] [[CALL]], 2
340 // CHECK: store float [[T1]], ptr [[T0]], align
341 // CHECK: [[T0:%.*]] = getelementptr inbounds nuw [[AGG]], ptr [[TMP]], i32 0, i32 3
342 // CHECK: [[T1:%.*]] = extractvalue [[UAGG]] [[CALL]], 3
343 // CHECK: store float [[T1]], ptr [[T0]], align
344 // CHECK: [[T0:%.*]] = getelementptr inbounds nuw [[AGG]], ptr [[TMP]], i32 0, i32 0
345 // CHECK: [[FIRST:%.*]] = load float, ptr [[T0]], align
346 // CHECK: [[T0:%.*]] = getelementptr inbounds nuw [[AGG]], ptr [[TMP]], i32 0, i32 1
347 // CHECK: [[SECOND:%.*]] = load float, ptr [[T0]], align
348 // CHECK: [[T0:%.*]] = getelementptr inbounds nuw [[AGG]], ptr [[TMP]], i32 0, i32 2
349 // CHECK: [[THIRD:%.*]] = load float, ptr [[T0]], align
350 // CHECK: [[T0:%.*]] = getelementptr inbounds nuw [[AGG]], ptr [[TMP]], i32 0, i32 3
351 // CHECK: [[FOURTH:%.*]] = load float, ptr [[T0]], align
352 // CHECK: call [[SWIFTCC]] void @take_union_hom_fp_partial(float [[FIRST]], float [[SECOND]], float [[THIRD]], float [[FOURTH]])
356 struct { int x
, y
; } f1
;
358 } union_het_fpv_partial
;
359 TEST(union_het_fpv_partial
)
360 // CHECK-LABEL: define{{.*}} void @test_union_het_fpv_partial()
361 // CHECK: [[TMP:%.*]] = alloca [[REC:%.*]], align 16
362 // CHECK: [[CALL:%.*]] = call [[SWIFTCC]] [[UAGG:{ i32, i32, float, float }]] @return_union_het_fpv_partial()
363 // CHECK: [[T0:%.*]] = getelementptr inbounds nuw [[AGG:{ i32, i32, float, float }]], ptr [[TMP]], i32 0, i32 0
364 // CHECK: [[T1:%.*]] = extractvalue [[UAGG]] [[CALL]], 0
365 // CHECK: store i32 [[T1]], ptr [[T0]], align
366 // CHECK: [[T0:%.*]] = getelementptr inbounds nuw [[AGG]], ptr [[TMP]], i32 0, i32 1
367 // CHECK: [[T1:%.*]] = extractvalue [[UAGG]] [[CALL]], 1
368 // CHECK: store i32 [[T1]], ptr [[T0]], align
369 // CHECK: [[T0:%.*]] = getelementptr inbounds nuw [[AGG]], ptr [[TMP]], i32 0, i32 2
370 // CHECK: [[T1:%.*]] = extractvalue [[UAGG]] [[CALL]], 2
371 // CHECK: store float [[T1]], ptr [[T0]], align
372 // CHECK: [[T0:%.*]] = getelementptr inbounds nuw [[AGG]], ptr [[TMP]], i32 0, i32 3
373 // CHECK: [[T1:%.*]] = extractvalue [[UAGG]] [[CALL]], 3
374 // CHECK: store float [[T1]], ptr [[T0]], align
375 // CHECK: [[T0:%.*]] = getelementptr inbounds nuw [[AGG]], ptr [[TMP]], i32 0, i32 0
376 // CHECK: [[FIRST:%.*]] = load i32, ptr [[T0]], align
377 // CHECK: [[T0:%.*]] = getelementptr inbounds nuw [[AGG]], ptr [[TMP]], i32 0, i32 1
378 // CHECK: [[SECOND:%.*]] = load i32, ptr [[T0]], align
379 // CHECK: [[T0:%.*]] = getelementptr inbounds nuw [[AGG]], ptr [[TMP]], i32 0, i32 2
380 // CHECK: [[THIRD:%.*]] = load float, ptr [[T0]], align
381 // CHECK: [[T0:%.*]] = getelementptr inbounds nuw [[AGG]], ptr [[TMP]], i32 0, i32 3
382 // CHECK: [[FOURTH:%.*]] = load float, ptr [[T0]], align
383 // CHECK: call [[SWIFTCC]] void @take_union_het_fpv_partial(i32 [[FIRST]], i32 [[SECOND]], float [[THIRD]], float [[FOURTH]])
386 /*****************************************************************************/
387 /****************************** VECTOR LEGALIZATION **************************/
388 /*****************************************************************************/
391 // CHECK-LABEL: define{{.*}} <4 x i32> @return_int4()
392 // CHECK-LABEL: define{{.*}} @take_int4(<4 x i32>
395 // CHECK-LABEL: define{{.*}} @return_int8()
396 // CHECK: [[RET:%.*]] = alloca [[REC:<8 x i32>]], align 32
400 // CHECK: [[T0:%.*]] = getelementptr inbounds nuw [[AGG:{ <4 x i32>, <4 x i32> }]], ptr [[RET]], i32 0, i32 0
401 // CHECK: [[FIRST:%.*]] = load <4 x i32>, ptr [[T0]], align
402 // CHECK: [[T0:%.*]] = getelementptr inbounds nuw [[AGG]], ptr [[RET]], i32 0, i32 1
403 // CHECK: [[SECOND:%.*]] = load <4 x i32>, ptr [[T0]], align
404 // CHECK: [[T0:%.*]] = insertvalue [[UAGG:{ <4 x i32>, <4 x i32> }]] poison, <4 x i32> [[FIRST]], 0
405 // CHECK: [[T1:%.*]] = insertvalue [[UAGG]] [[T0]], <4 x i32> [[SECOND]], 1
406 // CHECK: ret [[UAGG]] [[T1]]
407 // CHECK-LABEL: define{{.*}} @take_int8(<4 x i32> %0, <4 x i32> %1)
408 // CHECK: [[V:%.*]] = alloca [[REC]], align
409 // CHECK: [[T0:%.*]] = getelementptr inbounds nuw [[AGG]], ptr [[V]], i32 0, i32 0
410 // CHECK: store <4 x i32> %0, ptr [[T0]], align
411 // CHECK: [[T0:%.*]] = getelementptr inbounds nuw [[AGG]], ptr [[V]], i32 0, i32 1
412 // CHECK: store <4 x i32> %1, ptr [[T0]], align
414 // CHECK-LABEL: define{{.*}} void @test_int8()
415 // CHECK: [[TMP1:%.*]] = alloca [[REC]], align
416 // CHECK: [[TMP2:%.*]] = alloca [[REC]], align
417 // CHECK: [[CALL:%.*]] = call [[SWIFTCC]] [[UAGG]] @return_int8()
418 // CHECK: [[T0:%.*]] = getelementptr inbounds nuw [[AGG]], ptr [[TMP1]], i32 0, i32 0
419 // CHECK: [[T1:%.*]] = extractvalue [[UAGG]] [[CALL]], 0
420 // CHECK: store <4 x i32> [[T1]], ptr [[T0]], align
421 // CHECK: [[T0:%.*]] = getelementptr inbounds nuw [[AGG]], ptr [[TMP1]], i32 0, i32 1
422 // CHECK: [[T1:%.*]] = extractvalue [[UAGG]] [[CALL]], 1
423 // CHECK: store <4 x i32> [[T1]], ptr [[T0]], align
424 // CHECK: [[V:%.*]] = load [[REC]], ptr [[TMP1]], align
425 // CHECK: store [[REC]] [[V]], ptr [[TMP2]], align
426 // CHECK: [[T0:%.*]] = getelementptr inbounds nuw [[AGG]], ptr [[TMP2]], i32 0, i32 0
427 // CHECK: [[FIRST:%.*]] = load <4 x i32>, ptr [[T0]], align
428 // CHECK: [[T0:%.*]] = getelementptr inbounds nuw [[AGG]], ptr [[TMP2]], i32 0, i32 1
429 // CHECK: [[SECOND:%.*]] = load <4 x i32>, ptr [[T0]], align
430 // CHECK: call [[SWIFTCC]] void @take_int8(<4 x i32> [[FIRST]], <4 x i32> [[SECOND]])
434 // CHECK-LABEL: define{{.*}} @return_int5()
435 // CHECK: [[RET:%.*]] = alloca [[REC:<5 x i32>]], align 32
439 // CHECK: [[T0:%.*]] = getelementptr inbounds nuw [[AGG:{ <4 x i32>, i32 }]], ptr [[RET]], i32 0, i32 0
440 // CHECK: [[FIRST:%.*]] = load <4 x i32>, ptr [[T0]], align
441 // CHECK: [[T0:%.*]] = getelementptr inbounds nuw [[AGG]], ptr [[RET]], i32 0, i32 1
442 // CHECK: [[SECOND:%.*]] = load i32, ptr [[T0]], align
443 // CHECK: [[T0:%.*]] = insertvalue [[UAGG:{ <4 x i32>, i32 }]] poison, <4 x i32> [[FIRST]], 0
444 // CHECK: [[T1:%.*]] = insertvalue [[UAGG]] [[T0]], i32 [[SECOND]], 1
445 // CHECK: ret [[UAGG]] [[T1]]
446 // CHECK-LABEL: define{{.*}} @take_int5(<4 x i32> %0, i32 %1)
447 // CHECK: [[V:%.*]] = alloca [[REC]], align
448 // CHECK: [[T0:%.*]] = getelementptr inbounds nuw [[AGG]], ptr [[V]], i32 0, i32 0
449 // CHECK: store <4 x i32> %0, ptr [[T0]], align
450 // CHECK: [[T0:%.*]] = getelementptr inbounds nuw [[AGG]], ptr [[V]], i32 0, i32 1
451 // CHECK: store i32 %1, ptr [[T0]], align
453 // CHECK-LABEL: define{{.*}} void @test_int5()
454 // CHECK: [[TMP1:%.*]] = alloca [[REC]], align
455 // CHECK: [[TMP2:%.*]] = alloca [[REC]], align
456 // CHECK: [[CALL:%.*]] = call [[SWIFTCC]] [[UAGG]] @return_int5()
457 // CHECK: [[T0:%.*]] = getelementptr inbounds nuw [[AGG]], ptr [[TMP1]], i32 0, i32 0
458 // CHECK: [[T1:%.*]] = extractvalue [[UAGG]] [[CALL]], 0
459 // CHECK: store <4 x i32> [[T1]], ptr [[T0]], align
460 // CHECK: [[T0:%.*]] = getelementptr inbounds nuw [[AGG]], ptr [[TMP1]], i32 0, i32 1
461 // CHECK: [[T1:%.*]] = extractvalue [[UAGG]] [[CALL]], 1
462 // CHECK: store i32 [[T1]], ptr [[T0]], align
463 // CHECK: [[V:%.*]] = load [[REC]], ptr [[TMP1]], align
464 // CHECK: store [[REC]] [[V]], ptr [[TMP2]], align
465 // CHECK: [[T0:%.*]] = getelementptr inbounds nuw [[AGG]], ptr [[TMP2]], i32 0, i32 0
466 // CHECK: [[FIRST:%.*]] = load <4 x i32>, ptr [[T0]], align
467 // CHECK: [[T0:%.*]] = getelementptr inbounds nuw [[AGG]], ptr [[TMP2]], i32 0, i32 1
468 // CHECK: [[SECOND:%.*]] = load i32, ptr [[T0]], align
469 // CHECK: call [[SWIFTCC]] void @take_int5(<4 x i32> [[FIRST]], i32 [[SECOND]])
474 int3 v
__attribute__((packed
));
476 TEST(misaligned_int3
)
477 // CHECK-LABEL: define{{.*}} @take_misaligned_int3(i32 %0, i32 %1, i32 %2, i32 %3)
483 // CHECK-LABEL: define{{.*}} swiftcc float @return_struct_f1()
484 // CHECK-LABEL: define{{.*}} swiftcc void @take_struct_f1(float %0)
491 // CHECK-LABEL: define{{.*}} swiftcc { float, float } @return_struct_f2()
492 // CHECK-LABEL: define{{.*}} swiftcc void @take_struct_f2(float %0, float %1)
500 // CHECK-LABEL: define{{.*}} swiftcc { float, float, float } @return_struct_f3()
501 // CHECK-LABEL: define{{.*}} swiftcc void @take_struct_f3(float %0, float %1, float %2)
510 // CHECK-LABEL: define{{.*}} swiftcc { float, float, float, float } @return_struct_f4()
511 // CHECK-LABEL: define{{.*}} swiftcc void @take_struct_f4(float %0, float %1, float %2, float %3)
518 // CHECK-LABEL: define{{.*}} swiftcc double @return_struct_d1()
519 // CHECK-LABEL: define{{.*}} swiftcc void @take_struct_d1(double %0)
526 // CHECK-LABEL: define{{.*}} swiftcc { double, double } @return_struct_d2()
527 // CHECK-LABEL: define{{.*}} swiftcc void @take_struct_d2(double %0, double %1)
535 // CHECK-LABEL: define{{.*}} swiftcc { double, double, double } @return_struct_d3()
536 // CHECK-LABEL: define{{.*}} swiftcc void @take_struct_d3(double %0, double %1, double %2)
545 // CHECK-LABEL: define{{.*}} swiftcc { double, double, double, double } @return_struct_d4()
546 // CHECK-LABEL: define{{.*}} swiftcc void @take_struct_d4(double %0, double %1, double %2, double %3)
556 // CHECK: define{{.*}} swiftcc void @return_struct_d5(ptr dead_on_unwind noalias writable sret([[STRUCT5:%.*]])
557 // CHECK: define{{.*}} swiftcc void @take_struct_d5(ptr
563 // CHECK-LABEL: define{{.*}} swiftcc i8 @return_struct_c1()
564 // CHECK-LABEL: define{{.*}} swiftcc void @take_struct_c1(i8 %0)
571 // CHECK-LABEL: define{{.*}} swiftcc i16 @return_struct_c2()
572 // CHECK-LABEL: define{{.*}} swiftcc void @take_struct_c2(i16 %0)
581 // CHECK-LABEL: define{{.*}} swiftcc i32 @return_struct_c3()
582 // CHECK-LABEL: define{{.*}} swiftcc void @take_struct_c3(i32 %0)
591 // CHECK-LABEL: define{{.*}} swiftcc i32 @return_struct_c4()
592 // CHECK-LABEL: define{{.*}} swiftcc void @take_struct_c4(i32 %0)
602 // CHECK-LABEL: define{{.*}} swiftcc { i32, i8 } @return_struct_c5()
603 // CHECK-LABEL: define{{.*}} swiftcc void @take_struct_c5(i32 %0, i8 %1)
609 // CHECK-LABEL: define{{.*}} swiftcc i16 @return_struct_s1()
610 // CHECK-LABEL: define{{.*}} swiftcc void @take_struct_s1(i16 %0)
617 // CHECK-LABEL: define{{.*}} swiftcc i32 @return_struct_s2()
618 // CHECK-LABEL: define{{.*}} swiftcc void @take_struct_s2(i32 %0)
626 // CHECK-LABEL: define{{.*}} swiftcc { i32, i16 } @return_struct_s3()
627 // CHECK-LABEL: define{{.*}} swiftcc void @take_struct_s3(i32 %0, i16 %1)
636 // CHECK-LABEL: define{{.*}} swiftcc { i32, i32 } @return_struct_s4()
637 // CHECK-LABEL: define{{.*}} swiftcc void @take_struct_s4(i32 %0, i32 %1)
647 // CHECK-LABEL: define{{.*}} swiftcc { i32, i32, i16 } @return_struct_s5()
648 // CHECK-LABEL: define{{.*}} swiftcc void @take_struct_s5(i32 %0, i32 %1, i16 %2)
655 // CHECK-LABEL: define{{.*}} swiftcc i32 @return_struct_i1()
656 // CHECK-LABEL: define{{.*}} swiftcc void @take_struct_i1(i32 %0)
663 // CHECK-LABEL: define{{.*}} swiftcc { i32, i32 } @return_struct_i2()
664 // CHECK-LABEL: define{{.*}} swiftcc void @take_struct_i2(i32 %0, i32 %1)
672 // CHECK-LABEL: define{{.*}} swiftcc { i32, i32, i32 } @return_struct_i3()
673 // CHECK-LABEL: define{{.*}} swiftcc void @take_struct_i3(i32 %0, i32 %1, i32 %2)
682 // CHECK-LABEL: define{{.*}} swiftcc { i32, i32, i32, i32 } @return_struct_i4()
683 // CHECK-LABEL: define{{.*}} swiftcc void @take_struct_i4(i32 %0, i32 %1, i32 %2, i32 %3)
689 // CHECK-LABEL: define{{.*}} swiftcc i64 @return_struct_l1()
690 // CHECK-LABEL: define{{.*}} swiftcc void @take_struct_l1(i64 %0)
697 // CHECK-LABEL: define{{.*}} swiftcc { i64, i64 } @return_struct_l2()
698 // CHECK-LABEL: define{{.*}} swiftcc void @take_struct_l2(i64 %0, i64 %1)
706 // CHECK: define{{.*}} swiftcc void @return_struct_l3(ptr dead_on_unwind noalias writable sret([[STRUCT:%.*]])
707 // CHECK: define{{.*}} swiftcc void @take_struct_l3(ptr
716 // CHECK: define{{.*}} swiftcc void @return_struct_l4(ptr dead_on_unwind noalias writable sret([[STRUCT:%.*]])
717 // CHECK: define{{.*}} swiftcc void @take_struct_l4(ptr
727 // CHECK: define{{.*}} swiftcc void @return_struct_l5(ptr dead_on_unwind noalias writable sret([[STRUCT5:%.*]])
728 // CHECK: define{{.*}} swiftcc void @take_struct_l5(ptr
734 // CHECK-LABEL: define{{.*}} swiftcc <16 x i8> @return_struct_vc1()
735 // CHECK-LABEL: define{{.*}} swiftcc void @take_struct_vc1(<16 x i8> %0)
742 // CHECK-LABEL: define{{.*}} swiftcc { <16 x i8>, <16 x i8> } @return_struct_vc2()
743 // CHECK-LABEL: define{{.*}} swiftcc void @take_struct_vc2(<16 x i8> %0, <16 x i8> %1)
751 // CHECK-LABEL: define{{.*}} swiftcc { <16 x i8>, <16 x i8>, <16 x i8> } @return_struct_vc3()
752 // CHECK-LABEL: define{{.*}} swiftcc void @take_struct_vc3(<16 x i8> %0, <16 x i8> %1, <16 x i8> %2)
761 // CHECK-LABEL: define{{.*}} swiftcc { <16 x i8>, <16 x i8>, <16 x i8>, <16 x i8> } @return_struct_vc4()
762 // CHECK-LABEL: define{{.*}} swiftcc void @take_struct_vc4(<16 x i8> %0, <16 x i8> %1, <16 x i8> %2, <16 x i8> %3)
772 // CHECK: define{{.*}} swiftcc void @return_struct_vc5(ptr dead_on_unwind noalias writable sret([[STRUCT:%.*]])
773 // CHECK: define{{.*}} swiftcc void @take_struct_vc5(ptr
779 // CHECK-LABEL: define{{.*}} swiftcc <8 x i16> @return_struct_vs1()
780 // CHECK-LABEL: define{{.*}} swiftcc void @take_struct_vs1(<8 x i16> %0)
787 // CHECK-LABEL: define{{.*}} swiftcc { <8 x i16>, <8 x i16> } @return_struct_vs2()
788 // CHECK-LABEL: define{{.*}} swiftcc void @take_struct_vs2(<8 x i16> %0, <8 x i16> %1)
796 // CHECK-LABEL: define{{.*}} swiftcc { <8 x i16>, <8 x i16>, <8 x i16> } @return_struct_vs3()
797 // CHECK-LABEL: define{{.*}} swiftcc void @take_struct_vs3(<8 x i16> %0, <8 x i16> %1, <8 x i16> %2)
806 // CHECK-LABEL: define{{.*}} swiftcc { <8 x i16>, <8 x i16>, <8 x i16>, <8 x i16> } @return_struct_vs4()
807 // CHECK-LABEL: define{{.*}} swiftcc void @take_struct_vs4(<8 x i16> %0, <8 x i16> %1, <8 x i16> %2, <8 x i16> %3)
817 // CHECK: define{{.*}} swiftcc void @return_struct_vs5(ptr dead_on_unwind noalias writable sret([[STRUCT:%.*]])
818 // CHECK: define{{.*}} swiftcc void @take_struct_vs5(ptr
824 // CHECK-LABEL: define{{.*}} swiftcc <4 x i32> @return_struct_vi1()
825 // CHECK-LABEL: define{{.*}} swiftcc void @take_struct_vi1(<4 x i32> %0)
832 // CHECK-LABEL: define{{.*}} swiftcc { <4 x i32>, <4 x i32> } @return_struct_vi2()
833 // CHECK-LABEL: define{{.*}} swiftcc void @take_struct_vi2(<4 x i32> %0, <4 x i32> %1)
841 // CHECK-LABEL: define{{.*}} swiftcc { <4 x i32>, <4 x i32>, <4 x i32> } @return_struct_vi3()
842 // CHECK-LABEL: define{{.*}} swiftcc void @take_struct_vi3(<4 x i32> %0, <4 x i32> %1, <4 x i32> %2)
851 // CHECK-LABEL: define{{.*}} swiftcc { <4 x i32>, <4 x i32>, <4 x i32>, <4 x i32> } @return_struct_vi4()
852 // CHECK-LABEL: define{{.*}} swiftcc void @take_struct_vi4(<4 x i32> %0, <4 x i32> %1, <4 x i32> %2, <4 x i32> %3)
862 // CHECK: define{{.*}} swiftcc void @return_struct_vi5(ptr dead_on_unwind noalias writable sret([[STRUCT:%.*]])
863 // CHECK: define{{.*}} swiftcc void @take_struct_vi5(ptr
869 // CHECK-LABEL: define{{.*}} swiftcc <2 x i64> @return_struct_vl1()
870 // CHECK-LABEL: define{{.*}} swiftcc void @take_struct_vl1(<2 x i64> %0)
879 // CHECK-LABEL: define{{.*}} swiftcc { <2 x i64>, <2 x i64>, <2 x i64>, <2 x i64> } @return_struct_vl4()
880 // CHECK-LABEL: define{{.*}} swiftcc void @take_struct_vl4(<2 x i64> %0, <2 x i64> %1, <2 x i64> %2, <2 x i64> %3)
890 // CHECK: define{{.*}} swiftcc void @return_struct_vl5(ptr dead_on_unwind noalias writable sret([[STRUCT:%.*]])
891 // CHECK: define{{.*}} swiftcc void @take_struct_vl5(ptr
897 // CHECK-LABEL: define{{.*}} swiftcc <2 x double> @return_struct_vd1()
898 // CHECK-LABEL: define{{.*}} swiftcc void @take_struct_vd1(<2 x double> %0)
907 // CHECK-LABEL: define{{.*}} swiftcc { <2 x double>, <2 x double>, <2 x double>, <2 x double> } @return_struct_vd4()
908 // CHECK-LABEL: define{{.*}} swiftcc void @take_struct_vd4(<2 x double> %0, <2 x double> %1, <2 x double> %2, <2 x double> %3)
918 // CHECK: define{{.*}} swiftcc void @return_struct_vd5(ptr dead_on_unwind noalias writable sret([[STRUCT:%.*]])
919 // CHECK: define{{.*}} swiftcc void @take_struct_vd5(ptr
925 // CHECK-LABEL: define{{.*}} swiftcc { <2 x double>, <2 x double> } @return_struct_vd41()
926 // CHECK-LABEL: define{{.*}} swiftcc void @take_struct_vd41(<2 x double> %0, <2 x double> %1)
933 // CHECK-LABEL: define{{.*}} swiftcc { <2 x double>, <2 x double>, <2 x double>, <2 x double> } @return_struct_vd42()
934 // CHECK-LABEL: define{{.*}} swiftcc void @take_struct_vd42(<2 x double> %0, <2 x double> %1, <2 x double> %2, <2 x double> %3)
942 // CHECK: define{{.*}} swiftcc void @return_struct_vd43(ptr dead_on_unwind noalias writable sret([[STRUCT:%.*]])
943 // CHECK: define{{.*}} swiftcc void @take_struct_vd43(ptr
949 // CHECK-LABEL: define{{.*}} swiftcc <4 x float> @return_struct_vf1()
950 // CHECK-LABEL: define{{.*}} swiftcc void @take_struct_vf1(<4 x float> %0)
957 // CHECK-LABEL: define{{.*}} swiftcc { <4 x float>, <4 x float> } @return_struct_vf2()
958 // CHECK-LABEL: define{{.*}} swiftcc void @take_struct_vf2(<4 x float> %0, <4 x float> %1)
967 // CHECK-LABEL: define{{.*}} swiftcc { <4 x float>, <4 x float>, <4 x float>, <4 x float> } @return_struct_vf4()
968 // CHECK-LABEL: define{{.*}} swiftcc void @take_struct_vf4(<4 x float> %0, <4 x float> %1, <4 x float> %2, <4 x float> %3)
978 // CHECK: define{{.*}} swiftcc void @return_struct_vf5(ptr dead_on_unwind noalias writable sret([[STRUCT:%.*]])
979 // CHECK: define{{.*}} swiftcc void @take_struct_vf5(ptr
985 // CHECK-LABEL: define{{.*}} swiftcc { <4 x float>, <4 x float> } @return_struct_vf81()
986 // CHECK-LABEL: define{{.*}} swiftcc void @take_struct_vf81(<4 x float> %0, <4 x float> %1)
992 // CHECK-LABEL: define{{.*}} swiftcc { <2 x float>, float } @return_struct_v1f3()
993 // CHECK-LABEL: define{{.*}} swiftcc void @take_struct_v1f3(<2 x float> %0, float %1)