[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / CodeGen / attr-arm-sve-vector-bits-types.c
blobc6d5d2d2cffdc28d2373cd5e174fbc7692866677
1 // RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sve -target-feature +bf16 -mvscale-min=1 -mvscale-max=1 -emit-llvm -o - %s | FileCheck %s --check-prefix=CHECK-128
2 // RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sve -target-feature +bf16 -mvscale-min=2 -mvscale-max=2 -emit-llvm -o - %s | FileCheck %s --check-prefix=CHECK-256
3 // RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sve -target-feature +bf16 -mvscale-min=4 -mvscale-max=4 -emit-llvm -o - %s | FileCheck %s --check-prefix=CHECK-512
4 // RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sve -target-feature +bf16 -mvscale-min=8 -mvscale-max=8 -emit-llvm -o - %s | FileCheck %s --check-prefix=CHECK-1024
5 // RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sve -target-feature +bf16 -mvscale-min=16 -mvscale-max=16 -emit-llvm -o - %s | FileCheck %s --check-prefix=CHECK-2048
6 // RUN: %clang_cc1 -triple aarch64_32-unknown-darwin -target-feature +sve -target-feature +bf16 -mvscale-min=4 -mvscale-max=4 -emit-llvm -o - %s | FileCheck %s --check-prefix=CHECK-ILP32
8 // REQUIRES: aarch64-registered-target
10 #include <arm_sve.h>
12 #define N __ARM_FEATURE_SVE_BITS
14 typedef svint8_t fixed_int8_t __attribute__((arm_sve_vector_bits(N)));
15 typedef svint16_t fixed_int16_t __attribute__((arm_sve_vector_bits(N)));
16 typedef svint32_t fixed_int32_t __attribute__((arm_sve_vector_bits(N)));
17 typedef svint64_t fixed_int64_t __attribute__((arm_sve_vector_bits(N)));
19 typedef svuint8_t fixed_uint8_t __attribute__((arm_sve_vector_bits(N)));
20 typedef svuint16_t fixed_uint16_t __attribute__((arm_sve_vector_bits(N)));
21 typedef svuint32_t fixed_uint32_t __attribute__((arm_sve_vector_bits(N)));
22 typedef svuint64_t fixed_uint64_t __attribute__((arm_sve_vector_bits(N)));
24 typedef svfloat16_t fixed_float16_t __attribute__((arm_sve_vector_bits(N)));
25 typedef svfloat32_t fixed_float32_t __attribute__((arm_sve_vector_bits(N)));
26 typedef svfloat64_t fixed_float64_t __attribute__((arm_sve_vector_bits(N)));
28 typedef svbfloat16_t fixed_bfloat16_t __attribute__((arm_sve_vector_bits(N)));
30 typedef svbool_t fixed_bool_t __attribute__((arm_sve_vector_bits(N)));
32 //===----------------------------------------------------------------------===//
33 // Structs and unions
34 //===----------------------------------------------------------------------===//
35 #define DEFINE_STRUCT(ty) \
36 struct struct_##ty { \
37 fixed_##ty##_t x; \
38 } struct_##ty;
40 #define DEFINE_UNION(ty) \
41 union union_##ty { \
42 fixed_##ty##_t x; \
43 } union_##ty;
45 DEFINE_STRUCT(int8)
46 DEFINE_STRUCT(int16)
47 DEFINE_STRUCT(int32)
48 DEFINE_STRUCT(int64)
49 DEFINE_STRUCT(uint8)
50 DEFINE_STRUCT(uint16)
51 DEFINE_STRUCT(uint32)
52 DEFINE_STRUCT(uint64)
53 DEFINE_STRUCT(float16)
54 DEFINE_STRUCT(float32)
55 DEFINE_STRUCT(float64)
56 DEFINE_STRUCT(bfloat16)
57 DEFINE_STRUCT(bool)
59 DEFINE_UNION(int8)
60 DEFINE_UNION(int16)
61 DEFINE_UNION(int32)
62 DEFINE_UNION(int64)
63 DEFINE_UNION(uint8)
64 DEFINE_UNION(uint16)
65 DEFINE_UNION(uint32)
66 DEFINE_UNION(uint64)
67 DEFINE_UNION(float16)
68 DEFINE_UNION(float32)
69 DEFINE_UNION(float64)
70 DEFINE_UNION(bfloat16)
71 DEFINE_UNION(bool)
73 //===----------------------------------------------------------------------===//
74 // Global variables
75 //===----------------------------------------------------------------------===//
76 fixed_int8_t global_i8;
77 fixed_int16_t global_i16;
78 fixed_int32_t global_i32;
79 fixed_int64_t global_i64;
81 fixed_uint8_t global_u8;
82 fixed_uint16_t global_u16;
83 fixed_uint32_t global_u32;
84 fixed_uint64_t global_u64;
86 fixed_float16_t global_f16;
87 fixed_float32_t global_f32;
88 fixed_float64_t global_f64;
90 fixed_bfloat16_t global_bf16;
92 fixed_bool_t global_bool;
94 //===----------------------------------------------------------------------===//
95 // Global arrays
96 //===----------------------------------------------------------------------===//
97 fixed_int8_t global_arr_i8[3];
98 fixed_int16_t global_arr_i16[3];
99 fixed_int32_t global_arr_i32[3];
100 fixed_int64_t global_arr_i64[3];
102 fixed_uint8_t global_arr_u8[3];
103 fixed_uint16_t global_arr_u16[3];
104 fixed_uint32_t global_arr_u32[3];
105 fixed_uint64_t global_arr_u64[3];
107 fixed_float16_t global_arr_f16[3];
108 fixed_float32_t global_arr_f32[3];
109 fixed_float64_t global_arr_f64[3];
111 fixed_bfloat16_t global_arr_bf16[3];
113 fixed_bool_t global_arr_bool[3];
115 //===----------------------------------------------------------------------===//
116 // Locals
117 //===----------------------------------------------------------------------===//
118 void f() {
119 // Variables
120 fixed_int8_t local_i8;
121 fixed_int16_t local_i16;
122 fixed_int32_t local_i32;
123 fixed_int64_t local_i64;
124 fixed_uint8_t local_u8;
125 fixed_uint16_t local_u16;
126 fixed_uint32_t local_u32;
127 fixed_uint64_t local_u64;
128 fixed_float16_t local_f16;
129 fixed_float32_t local_f32;
130 fixed_float64_t local_f64;
131 fixed_bfloat16_t local_bf16;
132 fixed_bool_t local_bool;
134 // Arrays
135 fixed_int8_t local_arr_i8[3];
136 fixed_int16_t local_arr_i16[3];
137 fixed_int32_t local_arr_i32[3];
138 fixed_int64_t local_arr_i64[3];
139 fixed_uint8_t local_arr_u8[3];
140 fixed_uint16_t local_arr_u16[3];
141 fixed_uint32_t local_arr_u32[3];
142 fixed_uint64_t local_arr_u64[3];
143 fixed_float16_t local_arr_f16[3];
144 fixed_float32_t local_arr_f32[3];
145 fixed_float64_t local_arr_f64[3];
146 fixed_bfloat16_t local_arr_bf16[3];
147 fixed_bool_t local_arr_bool[3];
150 //===----------------------------------------------------------------------===//
151 // Structs and unions
152 //===----------------------------------------------------------------------===//
153 // CHECK-128: %struct.struct_int8 = type { <16 x i8> }
154 // CHECK-128-NEXT: %struct.struct_int16 = type { <8 x i16> }
155 // CHECK-128-NEXT: %struct.struct_int32 = type { <4 x i32> }
156 // CHECK-128-NEXT: %struct.struct_int64 = type { <2 x i64> }
157 // CHECK-128-NEXT: %struct.struct_uint8 = type { <16 x i8> }
158 // CHECK-128-NEXT: %struct.struct_uint16 = type { <8 x i16> }
159 // CHECK-128-NEXT: %struct.struct_uint32 = type { <4 x i32> }
160 // CHECK-128-NEXT: %struct.struct_uint64 = type { <2 x i64> }
161 // CHECK-128-NEXT: %struct.struct_float16 = type { <8 x half> }
162 // CHECK-128-NEXT: %struct.struct_float32 = type { <4 x float> }
163 // CHECK-128-NEXT: %struct.struct_float64 = type { <2 x double> }
164 // CHECK-128-NEXT: %struct.struct_bfloat16 = type { <8 x bfloat> }
165 // CHECK-128-NEXT: %struct.struct_bool = type { <2 x i8> }
167 // CHECK-256: %struct.struct_int8 = type { <32 x i8> }
168 // CHECK-256-NEXT: %struct.struct_int16 = type { <16 x i16> }
169 // CHECK-256-NEXT: %struct.struct_int32 = type { <8 x i32> }
170 // CHECK-256-NEXT: %struct.struct_int64 = type { <4 x i64> }
171 // CHECK-256-NEXT: %struct.struct_uint8 = type { <32 x i8> }
172 // CHECK-256-NEXT: %struct.struct_uint16 = type { <16 x i16> }
173 // CHECK-256-NEXT: %struct.struct_uint32 = type { <8 x i32> }
174 // CHECK-256-NEXT: %struct.struct_uint64 = type { <4 x i64> }
175 // CHECK-256-NEXT: %struct.struct_float16 = type { <16 x half> }
176 // CHECK-256-NEXT: %struct.struct_float32 = type { <8 x float> }
177 // CHECK-256-NEXT: %struct.struct_float64 = type { <4 x double> }
178 // CHECK-256-NEXT: %struct.struct_bfloat16 = type { <16 x bfloat> }
179 // CHECK-256-NEXT: %struct.struct_bool = type { <4 x i8> }
181 // CHECK-512: %struct.struct_int8 = type { <64 x i8> }
182 // CHECK-512-NEXT: %struct.struct_int16 = type { <32 x i16> }
183 // CHECK-512-NEXT: %struct.struct_int32 = type { <16 x i32> }
184 // CHECK-512-NEXT: %struct.struct_int64 = type { <8 x i64> }
185 // CHECK-512-NEXT: %struct.struct_uint8 = type { <64 x i8> }
186 // CHECK-512-NEXT: %struct.struct_uint16 = type { <32 x i16> }
187 // CHECK-512-NEXT: %struct.struct_uint32 = type { <16 x i32> }
188 // CHECK-512-NEXT: %struct.struct_uint64 = type { <8 x i64> }
189 // CHECK-512-NEXT: %struct.struct_float16 = type { <32 x half> }
190 // CHECK-512-NEXT: %struct.struct_float32 = type { <16 x float> }
191 // CHECK-512-NEXT: %struct.struct_float64 = type { <8 x double> }
192 // CHECK-512-NEXT: %struct.struct_bfloat16 = type { <32 x bfloat> }
193 // CHECK-512-NEXT: %struct.struct_bool = type { <8 x i8> }
195 // CHECK-1024: %struct.struct_int8 = type { <128 x i8> }
196 // CHECK-1024-NEXT: %struct.struct_int16 = type { <64 x i16> }
197 // CHECK-1024-NEXT: %struct.struct_int32 = type { <32 x i32> }
198 // CHECK-1024-NEXT: %struct.struct_int64 = type { <16 x i64> }
199 // CHECK-1024-NEXT: %struct.struct_uint8 = type { <128 x i8> }
200 // CHECK-1024-NEXT: %struct.struct_uint16 = type { <64 x i16> }
201 // CHECK-1024-NEXT: %struct.struct_uint32 = type { <32 x i32> }
202 // CHECK-1024-NEXT: %struct.struct_uint64 = type { <16 x i64> }
203 // CHECK-1024-NEXT: %struct.struct_float16 = type { <64 x half> }
204 // CHECK-1024-NEXT: %struct.struct_float32 = type { <32 x float> }
205 // CHECK-1024-NEXT: %struct.struct_float64 = type { <16 x double> }
206 // CHECK-1024-NEXT: %struct.struct_bfloat16 = type { <64 x bfloat> }
207 // CHECK-1024-NEXT: %struct.struct_bool = type { <16 x i8> }
209 // CHECK-2048: %struct.struct_int8 = type { <256 x i8> }
210 // CHECK-2048-NEXT: %struct.struct_int16 = type { <128 x i16> }
211 // CHECK-2048-NEXT: %struct.struct_int32 = type { <64 x i32> }
212 // CHECK-2048-NEXT: %struct.struct_int64 = type { <32 x i64> }
213 // CHECK-2048-NEXT: %struct.struct_uint8 = type { <256 x i8> }
214 // CHECK-2048-NEXT: %struct.struct_uint16 = type { <128 x i16> }
215 // CHECK-2048-NEXT: %struct.struct_uint32 = type { <64 x i32> }
216 // CHECK-2048-NEXT: %struct.struct_uint64 = type { <32 x i64> }
217 // CHECK-2048-NEXT: %struct.struct_float16 = type { <128 x half> }
218 // CHECK-2048-NEXT: %struct.struct_float32 = type { <64 x float> }
219 // CHECK-2048-NEXT: %struct.struct_float64 = type { <32 x double> }
220 // CHECK-2048-NEXT: %struct.struct_bfloat16 = type { <128 x bfloat> }
221 // CHECK-2048-NEXT: %struct.struct_bool = type { <32 x i8> }
223 // CHECK-128: %union.union_int8 = type { <16 x i8> }
224 // CHECK-128-NEXT: %union.union_int16 = type { <8 x i16> }
225 // CHECK-128-NEXT: %union.union_int32 = type { <4 x i32> }
226 // CHECK-128-NEXT: %union.union_int64 = type { <2 x i64> }
227 // CHECK-128-NEXT: %union.union_uint8 = type { <16 x i8> }
228 // CHECK-128-NEXT: %union.union_uint16 = type { <8 x i16> }
229 // CHECK-128-NEXT: %union.union_uint32 = type { <4 x i32> }
230 // CHECK-128-NEXT: %union.union_uint64 = type { <2 x i64> }
231 // CHECK-128-NEXT: %union.union_float16 = type { <8 x half> }
232 // CHECK-128-NEXT: %union.union_float32 = type { <4 x float> }
233 // CHECK-128-NEXT: %union.union_float64 = type { <2 x double> }
234 // CHECK-128-NEXT: %union.union_bfloat16 = type { <8 x bfloat> }
235 // CHECK-128-NEXT: %union.union_bool = type { <2 x i8> }
237 // CHECK-256: %union.union_int8 = type { <32 x i8> }
238 // CHECK-256-NEXT: %union.union_int16 = type { <16 x i16> }
239 // CHECK-256-NEXT: %union.union_int32 = type { <8 x i32> }
240 // CHECK-256-NEXT: %union.union_int64 = type { <4 x i64> }
241 // CHECK-256-NEXT: %union.union_uint8 = type { <32 x i8> }
242 // CHECK-256-NEXT: %union.union_uint16 = type { <16 x i16> }
243 // CHECK-256-NEXT: %union.union_uint32 = type { <8 x i32> }
244 // CHECK-256-NEXT: %union.union_uint64 = type { <4 x i64> }
245 // CHECK-256-NEXT: %union.union_float16 = type { <16 x half> }
246 // CHECK-256-NEXT: %union.union_float32 = type { <8 x float> }
247 // CHECK-256-NEXT: %union.union_float64 = type { <4 x double> }
248 // CHECK-256-NEXT: %union.union_bfloat16 = type { <16 x bfloat> }
249 // CHECK-256-NEXT: %union.union_bool = type { <4 x i8> }
251 // CHECK-512: %union.union_int8 = type { <64 x i8> }
252 // CHECK-512-NEXT: %union.union_int16 = type { <32 x i16> }
253 // CHECK-512-NEXT: %union.union_int32 = type { <16 x i32> }
254 // CHECK-512-NEXT: %union.union_int64 = type { <8 x i64> }
255 // CHECK-512-NEXT: %union.union_uint8 = type { <64 x i8> }
256 // CHECK-512-NEXT: %union.union_uint16 = type { <32 x i16> }
257 // CHECK-512-NEXT: %union.union_uint32 = type { <16 x i32> }
258 // CHECK-512-NEXT: %union.union_uint64 = type { <8 x i64> }
259 // CHECK-512-NEXT: %union.union_float16 = type { <32 x half> }
260 // CHECK-512-NEXT: %union.union_float32 = type { <16 x float> }
261 // CHECK-512-NEXT: %union.union_float64 = type { <8 x double> }
262 // CHECK-512-NEXT: %union.union_bfloat16 = type { <32 x bfloat> }
263 // CHECK-512-NEXT: %union.union_bool = type { <8 x i8> }
265 // CHECK-1024: %union.union_int8 = type { <128 x i8> }
266 // CHECK-1024-NEXT: %union.union_int16 = type { <64 x i16> }
267 // CHECK-1024-NEXT: %union.union_int32 = type { <32 x i32> }
268 // CHECK-1024-NEXT: %union.union_int64 = type { <16 x i64> }
269 // CHECK-1024-NEXT: %union.union_uint8 = type { <128 x i8> }
270 // CHECK-1024-NEXT: %union.union_uint16 = type { <64 x i16> }
271 // CHECK-1024-NEXT: %union.union_uint32 = type { <32 x i32> }
272 // CHECK-1024-NEXT: %union.union_uint64 = type { <16 x i64> }
273 // CHECK-1024-NEXT: %union.union_float16 = type { <64 x half> }
274 // CHECK-1024-NEXT: %union.union_float32 = type { <32 x float> }
275 // CHECK-1024-NEXT: %union.union_float64 = type { <16 x double> }
276 // CHECK-1024-NEXT: %union.union_bfloat16 = type { <64 x bfloat> }
277 // CHECK-1024-NEXT: %union.union_bool = type { <16 x i8> }
279 // CHECK-2048: %union.union_int8 = type { <256 x i8> }
280 // CHECK-2048-NEXT: %union.union_int16 = type { <128 x i16> }
281 // CHECK-2048-NEXT: %union.union_int32 = type { <64 x i32> }
282 // CHECK-2048-NEXT: %union.union_int64 = type { <32 x i64> }
283 // CHECK-2048-NEXT: %union.union_uint8 = type { <256 x i8> }
284 // CHECK-2048-NEXT: %union.union_uint16 = type { <128 x i16> }
285 // CHECK-2048-NEXT: %union.union_uint32 = type { <64 x i32> }
286 // CHECK-2048-NEXT: %union.union_uint64 = type { <32 x i64> }
287 // CHECK-2048-NEXT: %union.union_float16 = type { <128 x half> }
288 // CHECK-2048-NEXT: %union.union_float32 = type { <64 x float> }
289 // CHECK-2048-NEXT: %union.union_float64 = type { <32 x double> }
290 // CHECK-2048-NEXT: %union.union_bfloat16 = type { <128 x bfloat> }
291 // CHECK-2048-NEXT: %union.union_bool = type { <32 x i8> }
293 //===----------------------------------------------------------------------===//
294 // Global variables
295 //===----------------------------------------------------------------------===//
296 // CHECK-128: @global_i8 ={{.*}} global <16 x i8> zeroinitializer, align 16
297 // CHECK-128-NEXT: @global_i16 ={{.*}} global <8 x i16> zeroinitializer, align 16
298 // CHECK-128-NEXT: @global_i32 ={{.*}} global <4 x i32> zeroinitializer, align 16
299 // CHECK-128-NEXT: @global_i64 ={{.*}} global <2 x i64> zeroinitializer, align 16
300 // CHECK-128-NEXT: @global_u8 ={{.*}} global <16 x i8> zeroinitializer, align 16
301 // CHECK-128-NEXT: @global_u16 ={{.*}} global <8 x i16> zeroinitializer, align 16
302 // CHECK-128-NEXT: @global_u32 ={{.*}} global <4 x i32> zeroinitializer, align 16
303 // CHECK-128-NEXT: @global_u64 ={{.*}} global <2 x i64> zeroinitializer, align 16
304 // CHECK-128-NEXT: @global_f16 ={{.*}} global <8 x half> zeroinitializer, align 16
305 // CHECK-128-NEXT: @global_f32 ={{.*}} global <4 x float> zeroinitializer, align 16
306 // CHECK-128-NEXT: @global_f64 ={{.*}} global <2 x double> zeroinitializer, align 16
307 // CHECK-128-NEXT: @global_bf16 ={{.*}} global <8 x bfloat> zeroinitializer, align 16
308 // CHECK-128-NEXT: @global_bool ={{.*}} global <2 x i8> zeroinitializer, align 2
310 // CHECK-256: @global_i8 ={{.*}} global <32 x i8> zeroinitializer, align 16
311 // CHECK-NEXT-256: @global_i16 ={{.*}} global <16 x i16> zeroinitializer, align 16
312 // CHECK-NEXT-256: @global_i32 ={{.*}} global <8 x i32> zeroinitializer, align 16
313 // CHECK-NEXT-256: @global_i64 ={{.*}} global <4 x i64> zeroinitializer, align 16
314 // CHECK-NEXT-256: @global_u8 ={{.*}} global <32 x i8> zeroinitializer, align 16
315 // CHECK-NEXT-256: @global_u16 ={{.*}} global <16 x i16> zeroinitializer, align 16
316 // CHECK-NEXT-256: @global_u32 ={{.*}} global <8 x i32> zeroinitializer, align 16
317 // CHECK-NEXT-256: @global_u64 ={{.*}} global <4 x i64> zeroinitializer, align 16
318 // CHECK-NEXT-256: @global_f16 ={{.*}} global <16 x half> zeroinitializer, align 16
319 // CHECK-NEXT-256: @global_f32 ={{.*}} global <8 x float> zeroinitializer, align 16
320 // CHECK-NEXT-256: @global_f64 ={{.*}} global <4 x double> zeroinitializer, align 16
321 // CHECK-NEXT-256: @global_bf16 ={{.*}} global <16 x bfloat> zeroinitializer, align 16
322 // CHECK-NEXT-256: @global_bool ={{.*}} global <4 x i8> zeroinitializer, align 2
324 // CHECK-512: @global_i8 ={{.*}} global <64 x i8> zeroinitializer, align 16
325 // CHECK-NEXT-512: @global_i16 ={{.*}} global <32 x i16> zeroinitializer, align 16
326 // CHECK-NEXT-512: @global_i32 ={{.*}} global <16 x i32> zeroinitializer, align 16
327 // CHECK-NEXT-512: @global_i64 ={{.*}} global <8 x i64> zeroinitializer, align 16
328 // CHECK-NEXT-512: @global_u8 ={{.*}} global <64 x i8> zeroinitializer, align 16
329 // CHECK-NEXT-512: @global_u16 ={{.*}} global <32 x i16> zeroinitializer, align 16
330 // CHECK-NEXT-512: @global_u32 ={{.*}} global <16 x i32> zeroinitializer, align 16
331 // CHECK-NEXT-512: @global_u64 ={{.*}} global <8 x i64> zeroinitializer, align 16
332 // CHECK-NEXT-512: @global_f16 ={{.*}} global <32 x half> zeroinitializer, align 16
333 // CHECK-NEXT-512: @global_f32 ={{.*}} global <16 x float> zeroinitializer, align 16
334 // CHECK-NEXT-512: @global_f64 ={{.*}} global <8 x double> zeroinitializer, align 16
335 // CHECK-NEXT-512: @global_bf16 ={{.*}} global <32 x bfloat> zeroinitializer, align 16
336 // CHECK-NEXT-512: @global_bool ={{.*}} global <8 x i8> zeroinitializer, align 2
338 // CHECK-1024: @global_i8 ={{.*}} global <128 x i8> zeroinitializer, align 16
339 // CHECK-NEXT-1024: @global_i16 ={{.*}} global <64 x i16> zeroinitializer, align 16
340 // CHECK-NEXT-1024: @global_i32 ={{.*}} global <32 x i32> zeroinitializer, align 16
341 // CHECK-NEXT-1024: @global_i64 ={{.*}} global <16 x i64> zeroinitializer, align 16
342 // CHECK-NEXT-1024: @global_u8 ={{.*}} global <128 x i8> zeroinitializer, align 16
343 // CHECK-NEXT-1024: @global_u16 ={{.*}} global <64 x i16> zeroinitializer, align 16
344 // CHECK-NEXT-1024: @global_u32 ={{.*}} global <32 x i32> zeroinitializer, align 16
345 // CHECK-NEXT-1024: @global_u64 ={{.*}} global <16 x i64> zeroinitializer, align 16
346 // CHECK-NEXT-1024: @global_f16 ={{.*}} global <64 x half> zeroinitializer, align 16
347 // CHECK-NEXT-1024: @global_f32 ={{.*}} global <32 x float> zeroinitializer, align 16
348 // CHECK-NEXT-1024: @global_f64 ={{.*}} global <16 x double> zeroinitializer, align 16
349 // CHECK-NEXT-1024: @global_bf16 ={{.*}} global <64 x bfloat> zeroinitializer, align 16
350 // CHECK-NEXT-1024: @global_bool ={{.*}} global <16 x i8> zeroinitializer, align 2
352 // CHECK-2048: @global_i8 ={{.*}} global <256 x i8> zeroinitializer, align 16
353 // CHECK-NEXT-2048: @global_i16 ={{.*}} global <128 x i16> zeroinitializer, align 16
354 // CHECK-NEXT-2048: @global_i32 ={{.*}} global <64 x i32> zeroinitializer, align 16
355 // CHECK-NEXT-2048: @global_i64 ={{.*}} global <32 x i64> zeroinitializer, align 16
356 // CHECK-NEXT-2048: @global_u8 ={{.*}} global <256 x i8> zeroinitializer, align 16
357 // CHECK-NEXT-2048: @global_u16 ={{.*}} global <128 x i16> zeroinitializer, align 16
358 // CHECK-NEXT-2048: @global_u32 ={{.*}} global <64 x i32> zeroinitializer, align 16
359 // CHECK-NEXT-2048: @global_u64 ={{.*}} global <32 x i64> zeroinitializer, align 16
360 // CHECK-NEXT-2048: @global_f16 ={{.*}} global <128 x half> zeroinitializer, align 16
361 // CHECK-NEXT-2048: @global_f32 ={{.*}} global <64 x float> zeroinitializer, align 16
362 // CHECK-NEXT-2048: @global_f64 ={{.*}} global <32 x double> zeroinitializer, align 16
363 // CHECK-NEXT-2048: @global_bf16 ={{.*}} global <128 x bfloat> zeroinitializer, align 16
364 // CHECK-NEXT-2048: @global_bool ={{.*}} global <32 x i8> zeroinitializer, align 2
366 //===----------------------------------------------------------------------===//
367 // Global arrays
368 //===----------------------------------------------------------------------===//
369 // CHECK-128: @global_arr_i8 ={{.*}} global [3 x <16 x i8>] zeroinitializer, align 16
370 // CHECK-128-NEXT: @global_arr_i16 ={{.*}} global [3 x <8 x i16>] zeroinitializer, align 16
371 // CHECK-128-NEXT: @global_arr_i32 ={{.*}} global [3 x <4 x i32>] zeroinitializer, align 16
372 // CHECK-128-NEXT: @global_arr_i64 ={{.*}} global [3 x <2 x i64>] zeroinitializer, align 16
373 // CHECK-128-NEXT: @global_arr_u8 ={{.*}} global [3 x <16 x i8>] zeroinitializer, align 16
374 // CHECK-128-NEXT: @global_arr_u16 ={{.*}} global [3 x <8 x i16>] zeroinitializer, align 16
375 // CHECK-128-NEXT: @global_arr_u32 ={{.*}} global [3 x <4 x i32>] zeroinitializer, align 16
376 // CHECK-128-NEXT: @global_arr_u64 ={{.*}} global [3 x <2 x i64>] zeroinitializer, align 16
377 // CHECK-128-NEXT: @global_arr_f16 ={{.*}} global [3 x <8 x half>] zeroinitializer, align 16
378 // CHECK-128-NEXT: @global_arr_f32 ={{.*}} global [3 x <4 x float>] zeroinitializer, align 16
379 // CHECK-128-NEXT: @global_arr_f64 ={{.*}} global [3 x <2 x double>] zeroinitializer, align 16
380 // CHECK-128-NEXT: @global_arr_bf16 ={{.*}} global [3 x <8 x bfloat>] zeroinitializer, align 16
381 // CHECK-128-NEXT: @global_arr_bool ={{.*}} global [3 x <2 x i8>] zeroinitializer, align 2
383 // CHECK-256: @global_arr_i8 ={{.*}} global [3 x <32 x i8>] zeroinitializer, align 16
384 // CHECK-NEXT-256: @global_arr_i16 ={{.*}} global [3 x <16 x i16>] zeroinitializer, align 16
385 // CHECK-NEXT-256: @global_arr_i32 ={{.*}} global [3 x <8 x i32>] zeroinitializer, align 16
386 // CHECK-NEXT-256: @global_arr_i64 ={{.*}} global [3 x <4 x i64>] zeroinitializer, align 16
387 // CHECK-NEXT-256: @global_arr_u8 ={{.*}} global [3 x <32 x i8>] zeroinitializer, align 16
388 // CHECK-NEXT-256: @global_arr_u16 ={{.*}} global [3 x <16 x i16>] zeroinitializer, align 16
389 // CHECK-NEXT-256: @global_arr_u32 ={{.*}} global [3 x <8 x i32>] zeroinitializer, align 16
390 // CHECK-NEXT-256: @global_arr_u64 ={{.*}} global [3 x <4 x i64>] zeroinitializer, align 16
391 // CHECK-NEXT-256: @global_arr_f16 ={{.*}} global [3 x <16 x half>] zeroinitializer, align 16
392 // CHECK-NEXT-256: @global_arr_f32 ={{.*}} global [3 x <8 x float>] zeroinitializer, align 16
393 // CHECK-NEXT-256: @global_arr_f64 ={{.*}} global [3 x <4 x double>] zeroinitializer, align 16
394 // CHECK-NEXT-256: @global_arr_bf16 ={{.*}} global [3 x <16 x bfloat>] zeroinitializer, align 16
395 // CHECK-NEXT-256: @global_arr_bool ={{.*}} global [3 x <4 x i8>] zeroinitializer, align 2
397 // CHECK-512: @global_arr_i8 ={{.*}} global [3 x <64 x i8>] zeroinitializer, align 16
398 // CHECK-NEXT-512: @global_arr_i16 ={{.*}} global [3 x <32 x i16>] zeroinitializer, align 16
399 // CHECK-NEXT-512: @global_arr_i32 ={{.*}} global [3 x <16 x i32>] zeroinitializer, align 16
400 // CHECK-NEXT-512: @global_arr_i64 ={{.*}} global [3 x <8 x i64>] zeroinitializer, align 16
401 // CHECK-NEXT-512: @global_arr_u8 ={{.*}} global [3 x <64 x i8>] zeroinitializer, align 16
402 // CHECK-NEXT-512: @global_arr_u16 ={{.*}} global [3 x <32 x i16>] zeroinitializer, align 16
403 // CHECK-NEXT-512: @global_arr_u32 ={{.*}} global [3 x <16 x i32>] zeroinitializer, align 16
404 // CHECK-NEXT-512: @global_arr_u64 ={{.*}} global [3 x <8 x i64>] zeroinitializer, align 16
405 // CHECK-NEXT-512: @global_arr_f16 ={{.*}} global [3 x <32 x half>] zeroinitializer, align 16
406 // CHECK-NEXT-512: @global_arr_f32 ={{.*}} global [3 x <16 x float>] zeroinitializer, align 16
407 // CHECK-NEXT-512: @global_arr_f64 ={{.*}} global [3 x <8 x double>] zeroinitializer, align 16
408 // CHECK-NEXT-512: @global_arr_bf16 ={{.*}} global [3 x <32 x bfloat>] zeroinitializer, align 16
409 // CHECK-NEXT-512: @global_arr_bool ={{.*}} global [3 x <8 x i8>] zeroinitializer, align 2
411 // CHECK-1024: @global_arr_i8 ={{.*}} global [3 x <128 x i8>] zeroinitializer, align 16
412 // CHECK-NEXT-1024: @global_arr_i16 ={{.*}} global [3 x <64 x i16>] zeroinitializer, align 16
413 // CHECK-NEXT-1024: @global_arr_i32 ={{.*}} global [3 x <32 x i32>] zeroinitializer, align 16
414 // CHECK-NEXT-1024: @global_arr_i64 ={{.*}} global [3 x <16 x i64>] zeroinitializer, align 16
415 // CHECK-NEXT-1024: @global_arr_u8 ={{.*}} global [3 x <128 x i8>] zeroinitializer, align 16
416 // CHECK-NEXT-1024: @global_arr_u16 ={{.*}} global [3 x <64 x i16>] zeroinitializer, align 16
417 // CHECK-NEXT-1024: @global_arr_u32 ={{.*}} global [3 x <32 x i32>] zeroinitializer, align 16
418 // CHECK-NEXT-1024: @global_arr_u64 ={{.*}} global [3 x <16 x i64>] zeroinitializer, align 16
419 // CHECK-NEXT-1024: @global_arr_f16 ={{.*}} global [3 x <64 x half>] zeroinitializer, align 16
420 // CHECK-NEXT-1024: @global_arr_f32 ={{.*}} global [3 x <32 x float>] zeroinitializer, align 16
421 // CHECK-NEXT-1024: @global_arr_f64 ={{.*}} global [3 x <16 x double>] zeroinitializer, align 16
422 // CHECK-NEXT-1024: @global_arr_bf16 ={{.*}} global [3 x <64 x bfloat>] zeroinitializer, align 16
423 // CHECK-NEXT-1024: @global_arr_bool ={{.*}} global [3 x <16 x i8>] zeroinitializer, align 2
425 // CHECK-2048: @global_arr_i8 ={{.*}} global [3 x <256 x i8>] zeroinitializer, align 16
426 // CHECK-NEXT-2048: @global_arr_i16 ={{.*}} global [3 x <128 x i16>] zeroinitializer, align 16
427 // CHECK-NEXT-2048: @global_arr_i32 ={{.*}} global [3 x <64 x i32>] zeroinitializer, align 16
428 // CHECK-NEXT-2048: @global_arr_i64 ={{.*}} global [3 x <32 x i64>] zeroinitializer, align 16
429 // CHECK-NEXT-2048: @global_arr_u8 ={{.*}} global [3 x <256 x i8>] zeroinitializer, align 16
430 // CHECK-NEXT-2048: @global_arr_u16 ={{.*}} global [3 x <128 x i16>] zeroinitializer, align 16
431 // CHECK-NEXT-2048: @global_arr_u32 ={{.*}} global [3 x <64 x i32>] zeroinitializer, align 16
432 // CHECK-NEXT-2048: @global_arr_u64 ={{.*}} global [3 x <32 x i64>] zeroinitializer, align 16
433 // CHECK-NEXT-2048: @global_arr_f16 ={{.*}} global [3 x <128 x half>] zeroinitializer, align 16
434 // CHECK-NEXT-2048: @global_arr_f32 ={{.*}} global [3 x <64 x float>] zeroinitializer, align 16
435 // CHECK-NEXT-2048: @global_arr_f64 ={{.*}} global [3 x <32 x double>] zeroinitializer, align 16
436 // CHECK-NEXT-2048: @global_arr_bf16 ={{.*}} global [3 x <128 x bfloat>] zeroinitializer, align 16
437 // CHECK-NEXT-2048: @global_arr_bool ={{.*}} global [3 x <32 x i8>] zeroinitializer, align 2
439 //===----------------------------------------------------------------------===//
440 // Local variables
441 //===----------------------------------------------------------------------===//
442 // CHECK-128: %local_i8 = alloca <16 x i8>, align 16
443 // CHECK-128-NEXT: %local_i16 = alloca <8 x i16>, align 16
444 // CHECK-128-NEXT: %local_i32 = alloca <4 x i32>, align 16
445 // CHECK-128-NEXT: %local_i64 = alloca <2 x i64>, align 16
446 // CHECK-128-NEXT: %local_u8 = alloca <16 x i8>, align 16
447 // CHECK-128-NEXT: %local_u16 = alloca <8 x i16>, align 16
448 // CHECK-128-NEXT: %local_u32 = alloca <4 x i32>, align 16
449 // CHECK-128-NEXT: %local_u64 = alloca <2 x i64>, align 16
450 // CHECK-128-NEXT: %local_f16 = alloca <8 x half>, align 16
451 // CHECK-128-NEXT: %local_f32 = alloca <4 x float>, align 16
452 // CHECK-128-NEXT: %local_f64 = alloca <2 x double>, align 16
453 // CHECK-128-NEXT: %local_bf16 = alloca <8 x bfloat>, align 16
454 // CHECK-128-NEXT: %local_bool = alloca <2 x i8>, align 2
456 // CHECK-256: %local_i8 = alloca <32 x i8>, align 16
457 // CHECK-256-NEXT: %local_i16 = alloca <16 x i16>, align 16
458 // CHECK-256-NEXT: %local_i32 = alloca <8 x i32>, align 16
459 // CHECK-256-NEXT: %local_i64 = alloca <4 x i64>, align 16
460 // CHECK-256-NEXT: %local_u8 = alloca <32 x i8>, align 16
461 // CHECK-256-NEXT: %local_u16 = alloca <16 x i16>, align 16
462 // CHECK-256-NEXT: %local_u32 = alloca <8 x i32>, align 16
463 // CHECK-256-NEXT: %local_u64 = alloca <4 x i64>, align 16
464 // CHECK-256-NEXT: %local_f16 = alloca <16 x half>, align 16
465 // CHECK-256-NEXT: %local_f32 = alloca <8 x float>, align 16
466 // CHECK-256-NEXT: %local_f64 = alloca <4 x double>, align 16
467 // CHECK-256-NEXT: %local_bf16 = alloca <16 x bfloat>, align 16
468 // CHECK-256-NEXT: %local_bool = alloca <4 x i8>, align 2
470 // CHECK-512: %local_i8 = alloca <64 x i8>, align 16
471 // CHECK-512-NEXT: %local_i16 = alloca <32 x i16>, align 16
472 // CHECK-512-NEXT: %local_i32 = alloca <16 x i32>, align 16
473 // CHECK-512-NEXT: %local_i64 = alloca <8 x i64>, align 16
474 // CHECK-512-NEXT: %local_u8 = alloca <64 x i8>, align 16
475 // CHECK-512-NEXT: %local_u16 = alloca <32 x i16>, align 16
476 // CHECK-512-NEXT: %local_u32 = alloca <16 x i32>, align 16
477 // CHECK-512-NEXT: %local_u64 = alloca <8 x i64>, align 16
478 // CHECK-512-NEXT: %local_f16 = alloca <32 x half>, align 16
479 // CHECK-512-NEXT: %local_f32 = alloca <16 x float>, align 16
480 // CHECK-512-NEXT: %local_f64 = alloca <8 x double>, align 16
481 // CHECK-512-NEXT: %local_bf16 = alloca <32 x bfloat>, align 16
482 // CHECK-512-NEXT: %local_bool = alloca <8 x i8>, align 2
484 // CHECK-1024: %local_i8 = alloca <128 x i8>, align 16
485 // CHECK-1024-NEXT: %local_i16 = alloca <64 x i16>, align 16
486 // CHECK-1024-NEXT: %local_i32 = alloca <32 x i32>, align 16
487 // CHECK-1024-NEXT: %local_i64 = alloca <16 x i64>, align 16
488 // CHECK-1024-NEXT: %local_u8 = alloca <128 x i8>, align 16
489 // CHECK-1024-NEXT: %local_u16 = alloca <64 x i16>, align 16
490 // CHECK-1024-NEXT: %local_u32 = alloca <32 x i32>, align 16
491 // CHECK-1024-NEXT: %local_u64 = alloca <16 x i64>, align 16
492 // CHECK-1024-NEXT: %local_f16 = alloca <64 x half>, align 16
493 // CHECK-1024-NEXT: %local_f32 = alloca <32 x float>, align 16
494 // CHECK-1024-NEXT: %local_f64 = alloca <16 x double>, align 16
495 // CHECK-1024-NEXT: %local_bf16 = alloca <64 x bfloat>, align 16
496 // CHECK-1024-NEXT: %local_bool = alloca <16 x i8>, align 2
498 // CHECK-2048: %local_i8 = alloca <256 x i8>, align 16
499 // CHECK-2048-NEXT: %local_i16 = alloca <128 x i16>, align 16
500 // CHECK-2048-NEXT: %local_i32 = alloca <64 x i32>, align 16
501 // CHECK-2048-NEXT: %local_i64 = alloca <32 x i64>, align 16
502 // CHECK-2048-NEXT: %local_u8 = alloca <256 x i8>, align 16
503 // CHECK-2048-NEXT: %local_u16 = alloca <128 x i16>, align 16
504 // CHECK-2048-NEXT: %local_u32 = alloca <64 x i32>, align 16
505 // CHECK-2048-NEXT: %local_u64 = alloca <32 x i64>, align 16
506 // CHECK-2048-NEXT: %local_f16 = alloca <128 x half>, align 16
507 // CHECK-2048-NEXT: %local_f32 = alloca <64 x float>, align 16
508 // CHECK-2048-NEXT: %local_f64 = alloca <32 x double>, align 16
509 // CHECK-2048-NEXT: %local_bf16 = alloca <128 x bfloat>, align 16
510 // CHECK-2048-NEXT: %local_bool = alloca <32 x i8>, align 2
512 //===----------------------------------------------------------------------===//
513 // Local arrays
514 //===----------------------------------------------------------------------===//
515 // CHECK-128: %local_arr_i8 = alloca [3 x <16 x i8>], align 16
516 // CHECK-128-NEXT: %local_arr_i16 = alloca [3 x <8 x i16>], align 16
517 // CHECK-128-NEXT: %local_arr_i32 = alloca [3 x <4 x i32>], align 16
518 // CHECK-128-NEXT: %local_arr_i64 = alloca [3 x <2 x i64>], align 16
519 // CHECK-128-NEXT: %local_arr_u8 = alloca [3 x <16 x i8>], align 16
520 // CHECK-128-NEXT: %local_arr_u16 = alloca [3 x <8 x i16>], align 16
521 // CHECK-128-NEXT: %local_arr_u32 = alloca [3 x <4 x i32>], align 16
522 // CHECK-128-NEXT: %local_arr_u64 = alloca [3 x <2 x i64>], align 16
523 // CHECK-128-NEXT: %local_arr_f16 = alloca [3 x <8 x half>], align 16
524 // CHECK-128-NEXT: %local_arr_f32 = alloca [3 x <4 x float>], align 16
525 // CHECK-128-NEXT: %local_arr_f64 = alloca [3 x <2 x double>], align 16
526 // CHECK-128-NEXT: %local_arr_bf16 = alloca [3 x <8 x bfloat>], align 16
527 // CHECK-128-NEXT: %local_arr_bool = alloca [3 x <2 x i8>], align 2
529 // CHECK-256: %local_arr_i8 = alloca [3 x <32 x i8>], align 16
530 // CHECK-256-NEXT: %local_arr_i16 = alloca [3 x <16 x i16>], align 16
531 // CHECK-256-NEXT: %local_arr_i32 = alloca [3 x <8 x i32>], align 16
532 // CHECK-256-NEXT: %local_arr_i64 = alloca [3 x <4 x i64>], align 16
533 // CHECK-256-NEXT: %local_arr_u8 = alloca [3 x <32 x i8>], align 16
534 // CHECK-256-NEXT: %local_arr_u16 = alloca [3 x <16 x i16>], align 16
535 // CHECK-256-NEXT: %local_arr_u32 = alloca [3 x <8 x i32>], align 16
536 // CHECK-256-NEXT: %local_arr_u64 = alloca [3 x <4 x i64>], align 16
537 // CHECK-256-NEXT: %local_arr_f16 = alloca [3 x <16 x half>], align 16
538 // CHECK-256-NEXT: %local_arr_f32 = alloca [3 x <8 x float>], align 16
539 // CHECK-256-NEXT: %local_arr_f64 = alloca [3 x <4 x double>], align 16
540 // CHECK-256-NEXT: %local_arr_bf16 = alloca [3 x <16 x bfloat>], align 16
541 // CHECK-256-NEXT: %local_arr_bool = alloca [3 x <4 x i8>], align 2
543 // CHECK-512: %local_arr_i8 = alloca [3 x <64 x i8>], align 16
544 // CHECK-512-NEXT: %local_arr_i16 = alloca [3 x <32 x i16>], align 16
545 // CHECK-512-NEXT: %local_arr_i32 = alloca [3 x <16 x i32>], align 16
546 // CHECK-512-NEXT: %local_arr_i64 = alloca [3 x <8 x i64>], align 16
547 // CHECK-512-NEXT: %local_arr_u8 = alloca [3 x <64 x i8>], align 16
548 // CHECK-512-NEXT: %local_arr_u16 = alloca [3 x <32 x i16>], align 16
549 // CHECK-512-NEXT: %local_arr_u32 = alloca [3 x <16 x i32>], align 16
550 // CHECK-512-NEXT: %local_arr_u64 = alloca [3 x <8 x i64>], align 16
551 // CHECK-512-NEXT: %local_arr_f16 = alloca [3 x <32 x half>], align 16
552 // CHECK-512-NEXT: %local_arr_f32 = alloca [3 x <16 x float>], align 16
553 // CHECK-512-NEXT: %local_arr_f64 = alloca [3 x <8 x double>], align 16
554 // CHECK-512-NEXT: %local_arr_bf16 = alloca [3 x <32 x bfloat>], align 16
555 // CHECK-512-NEXT: %local_arr_bool = alloca [3 x <8 x i8>], align 2
557 // CHECK-1024: %local_arr_i8 = alloca [3 x <128 x i8>], align 16
558 // CHECK-1024-NEXT: %local_arr_i16 = alloca [3 x <64 x i16>], align 16
559 // CHECK-1024-NEXT: %local_arr_i32 = alloca [3 x <32 x i32>], align 16
560 // CHECK-1024-NEXT: %local_arr_i64 = alloca [3 x <16 x i64>], align 16
561 // CHECK-1024-NEXT: %local_arr_u8 = alloca [3 x <128 x i8>], align 16
562 // CHECK-1024-NEXT: %local_arr_u16 = alloca [3 x <64 x i16>], align 16
563 // CHECK-1024-NEXT: %local_arr_u32 = alloca [3 x <32 x i32>], align 16
564 // CHECK-1024-NEXT: %local_arr_u64 = alloca [3 x <16 x i64>], align 16
565 // CHECK-1024-NEXT: %local_arr_f16 = alloca [3 x <64 x half>], align 16
566 // CHECK-1024-NEXT: %local_arr_f32 = alloca [3 x <32 x float>], align 16
567 // CHECK-1024-NEXT: %local_arr_f64 = alloca [3 x <16 x double>], align 16
568 // CHECK-1024-NEXT: %local_arr_bf16 = alloca [3 x <64 x bfloat>], align 16
569 // CHECK-1024-NEXT: %local_arr_bool = alloca [3 x <16 x i8>], align 2
571 // CHECK-2048: %local_arr_i8 = alloca [3 x <256 x i8>], align 16
572 // CHECK-2048-NEXT: %local_arr_i16 = alloca [3 x <128 x i16>], align 16
573 // CHECK-2048-NEXT: %local_arr_i32 = alloca [3 x <64 x i32>], align 16
574 // CHECK-2048-NEXT: %local_arr_i64 = alloca [3 x <32 x i64>], align 16
575 // CHECK-2048-NEXT: %local_arr_u8 = alloca [3 x <256 x i8>], align 16
576 // CHECK-2048-NEXT: %local_arr_u16 = alloca [3 x <128 x i16>], align 16
577 // CHECK-2048-NEXT: %local_arr_u32 = alloca [3 x <64 x i32>], align 16
578 // CHECK-2048-NEXT: %local_arr_u64 = alloca [3 x <32 x i64>], align 16
579 // CHECK-2048-NEXT: %local_arr_f16 = alloca [3 x <128 x half>], align 16
580 // CHECK-2048-NEXT: %local_arr_f32 = alloca [3 x <64 x float>], align 16
581 // CHECK-2048-NEXT: %local_arr_f64 = alloca [3 x <32 x double>], align 16
582 // CHECK-2048-NEXT: %local_arr_bf16 = alloca [3 x <128 x bfloat>], align 16
583 // CHECK-2048-NEXT: %local_arr_bool = alloca [3 x <32 x i8>], align 2
585 //===----------------------------------------------------------------------===//
586 // ILP32 ABI
587 //===----------------------------------------------------------------------===//
588 // CHECK-ILP32: @global_i32 ={{.*}} global <16 x i32> zeroinitializer, align 16
589 // CHECK-ILP32: @global_i64 ={{.*}} global <8 x i64> zeroinitializer, align 16
590 // CHECK-ILP32: @global_u32 ={{.*}} global <16 x i32> zeroinitializer, align 16
591 // CHECK-ILP32: @global_u64 ={{.*}} global <8 x i64> zeroinitializer, align 16