• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // RUN: %clang_cc1 -std=c++14 -triple x86_64-unknown-unknown -fblocks %s -emit-llvm -o - | FileCheck %s -check-prefixes=CHECK,CHECK-O0
2 // RUN: %clang_cc1 -std=c++14 -triple x86_64-unknown-unknown -fblocks -ftrivial-auto-var-init=pattern %s -emit-llvm -o - | FileCheck %s -check-prefixes=CHECK-O0,PATTERN,PATTERN-O0
3 // RUN: %clang_cc1 -std=c++14 -triple x86_64-unknown-unknown -fblocks -ftrivial-auto-var-init=pattern %s -O1 -fno-experimental-new-pass-manager -emit-llvm -o - | FileCheck %s -check-prefixes=CHECK-O1,PATTERN,PATTERN-O1,PATTERN-O1-LEGACY
4 // RUN: %clang_cc1 -std=c++14 -triple x86_64-unknown-unknown -fblocks -ftrivial-auto-var-init=pattern %s -O1 -fexperimental-new-pass-manager -emit-llvm -o - | FileCheck %s -check-prefixes=CHECK-O1,PATTERN,PATTERN-O1,PATTERN-O1-NEWPM
5 // RUN: %clang_cc1 -std=c++14 -triple x86_64-unknown-unknown -fblocks -ftrivial-auto-var-init=zero %s -emit-llvm -o - | FileCheck %s -check-prefixes=CHECK-O0,ZERO,ZERO-O0
6 // RUN: %clang_cc1 -std=c++14 -triple x86_64-unknown-unknown -fblocks -ftrivial-auto-var-init=zero %s -O1 -fno-experimental-new-pass-manager -emit-llvm -o - | FileCheck %s -check-prefixes=CHECK-O1,ZERO,ZERO-O1,ZERO-O1-LEGACY
7 // RUN: %clang_cc1 -std=c++14 -triple x86_64-unknown-unknown -fblocks -ftrivial-auto-var-init=zero %s -O1 -fexperimental-new-pass-manager -emit-llvm -o - | FileCheck %s -check-prefixes=CHECK-O1,ZERO,ZERO-O1,ZERO-O1-NEWPM
8 // RUN: %clang_cc1 -std=c++14 -triple i386-unknown-unknown -fblocks -ftrivial-auto-var-init=pattern %s -emit-llvm -o - | FileCheck %s -check-prefixes=CHECK-O0,PATTERN,PATTERN-O0
9 
10 #pragma clang diagnostic ignored "-Winaccessible-base"
11 
12 #ifdef __x86_64__
13 char inits[] = {"-86/-21846/-1431655766/i64/-6148914691236517206/-6148914691236517206/i128/-113427455640312821154458202477256070486/i64/-6148914691236517206/AA/"};
14 #else
15 char inits[] = {"-1/-1/-1/i32/-1/-1/i32/-1/i32/-1/FF/"};
16 #define __int128 int;
17 #endif
18 // PATTERN: @inits = {{.*}} c"[[I8:[^/]+]]/[[I16:[^/]+]]/[[I32:[^/]+]]/[[ILONGT:[^/]+]]/[[ILONG:[^/]+]]/[[I64:[^/]+]]/[[I128T:[^/]+]]/[[I128:[^/]+]]/[[IPTRT:[^/]+]]/[[IPTR:[^/]+]]/[[IC:[^/]+]]/\00", align 1
19 
20 template<typename T> void used(T &) noexcept;
21 
22 #define TEST_UNINIT(NAME, TYPE)                 \
23   using type_##NAME = TYPE;                     \
24   void test_##NAME##_uninit() {                 \
25     type_##NAME uninit;                         \
26     used(uninit);                               \
27   }
28 
29 // Value initialization on scalars, aggregate initialization on aggregates.
30 #define TEST_BRACES(NAME, TYPE)                 \
31   using type_##NAME = TYPE;                     \
32   void test_##NAME##_braces() {                 \
33     type_##NAME braces = {};                    \
34     used(braces);                               \
35   }
36 
37 #define TEST_CUSTOM(NAME, TYPE, ...)            \
38   using type_##NAME = TYPE;                     \
39   void test_##NAME##_custom() {                 \
40     type_##NAME custom __VA_ARGS__;             \
41     used(custom);                               \
42   }
43 
44 // None of the synthesized globals should contain `undef`.
45 // PATTERN-NOT: undef
46 // ZERO-NOT: undef
47 
48 // PATTERN-O0: @__const.test_empty_uninit.uninit = private unnamed_addr constant %struct.empty { i8 [[I8]] }, align 1
49 // PATTERN-O1-NOT: @__const.test_empty_uninit.uninit
50 struct empty {};
51 // PATTERN-O0: @__const.test_small_uninit.uninit = private unnamed_addr constant %struct.small { i8 [[I8]] }, align 1
52 // PATTERN-O0: @__const.test_small_custom.custom = private unnamed_addr constant %struct.small { i8 42 }, align 1
53 // ZERO-O0: @__const.test_small_custom.custom = private unnamed_addr constant %struct.small { i8 42 }, align 1
54 // PATTERN-O1-NOT: @__const.test_small_uninit.uninit
55 // PATTERN-O1-NOT: @__const.test_small_custom.custom
56 // ZERO-O1-NOT: @__const.test_small_custom.custom
57 struct small { char c; };
58 // PATTERN-O0: @__const.test_smallinit_uninit.uninit = private unnamed_addr constant %struct.smallinit { i8 [[I8]] }, align 1
59 // PATTERN-O0: @__const.test_smallinit_braces.braces = private unnamed_addr constant %struct.smallinit { i8 [[I8]] }, align 1
60 // PATTERN-O0: @__const.test_smallinit_custom.custom = private unnamed_addr constant %struct.smallinit { i8 [[I8]] }, align 1
61 // PATTERN-O1-NOT: @__const.test_smallinit_uninit.uninit
62 // PATTERN-O1-NOT: @__const.test_smallinit_braces.braces
63 // PATTERN-O1-NOT: @__const.test_smallinit_custom.custom
64 struct smallinit { char c = 42; };
65 // PATTERN-O0: @__const.test_smallpartinit_uninit.uninit = private unnamed_addr constant %struct.smallpartinit { i8 [[I8]], i8 [[I8]] }, align 1
66 // PATTERN-O0: @__const.test_smallpartinit_braces.braces = private unnamed_addr constant %struct.smallpartinit { i8 [[I8]], i8 [[I8]] }, align 1
67 // PATTERN-O0: @__const.test_smallpartinit_custom.custom = private unnamed_addr constant %struct.smallpartinit { i8 [[I8]], i8 [[I8]] }, align 1
68 // PATTERN-O1-NOT: @__const.test_smallpartinit_uninit.uninit
69 // PATTERN-O1-NOT: @__const.test_smallpartinit_braces.braces
70 // PATTERN-O1-NOT: @__const.test_smallpartinit_custom.custom
71 struct smallpartinit { char c = 42, d; };
72 // PATTERN-O0: @__const.test_nullinit_uninit.uninit = private unnamed_addr constant %struct.nullinit { i8* inttoptr ([[IPTRT]] [[IPTR]] to i8*) }, align
73 // PATTERN-O0: @__const.test_nullinit_braces.braces = private unnamed_addr constant %struct.nullinit { i8* inttoptr ([[IPTRT]] [[IPTR]] to i8*) }, align
74 // PATTERN-O0: @__const.test_nullinit_custom.custom = private unnamed_addr constant %struct.nullinit { i8* inttoptr ([[IPTRT]] [[IPTR]] to i8*) }, align
75 // PATTERN-O1-NOT: @__const.test_nullinit_uninit.uninit
76 // PATTERN-O1-NOT: @__const.test_nullinit_braces.braces
77 // PATTERN-O1-NOT: @__const.test_nullinit_custom.custom
78 struct nullinit { char* null = nullptr; };
79 // PATTERN-O0: @__const.test_padded_uninit.uninit = private unnamed_addr constant { i8, [3 x i8], i32 } { i8 [[I8]], [3 x i8] c"\[[IC]]\[[IC]]\[[IC]]", i32 [[I32]] }, align 4
80 // PATTERN-O0: @__const.test_padded_custom.custom = private unnamed_addr constant { i8, [3 x i8], i32 } { i8 42, [3 x i8] zeroinitializer, i32 13371337 }, align 4
81 // ZERO-O0: @__const.test_padded_custom.custom = private unnamed_addr constant { i8, [3 x i8], i32 } { i8 42, [3 x i8] zeroinitializer, i32 13371337 }, align 4
82 // PATTERN-O1-NOT: @__const.test_padded_uninit.uninit
83 // PATTERN-O1-NOT: @__const.test_padded_custom.custom
84 // ZERO-O1-NOT: @__const.test_padded_custom.custom
85 struct padded { char c; int i; };
86 // PATTERN-O0: @__const.test_paddednullinit_uninit.uninit = private unnamed_addr constant { i8, [3 x i8], i32 } { i8 [[I8]], [3 x i8] c"\[[IC]]\[[IC]]\[[IC]]", i32 [[I32]] }, align 4
87 // PATTERN-O0: @__const.test_paddednullinit_braces.braces = private unnamed_addr constant { i8, [3 x i8], i32 } { i8 [[I8]], [3 x i8] c"\[[IC]]\[[IC]]\[[IC]]", i32 [[I32]] }, align 4
88 // PATTERN-O0: @__const.test_paddednullinit_custom.custom = private unnamed_addr constant { i8, [3 x i8], i32 } { i8 [[I8]], [3 x i8] c"\[[IC]]\[[IC]]\[[IC]]", i32 [[I32]] }, align 4
89 // PATTERN-O1-NOT: @__const.test_paddednullinit_uninit.uninit
90 // PATTERN-O1-NOT: @__const.test_paddednullinit_braces.braces
91 // PATTERN-O1-NOT: @__const.test_paddednullinit_custom.custom
92 struct paddednullinit { char c = 0; int i = 0; };
93 // PATTERN-O0: @__const.test_paddedpacked_uninit.uninit = private unnamed_addr constant %struct.paddedpacked <{ i8 [[I8]], i32 [[I32]] }>, align 1
94 // PATTERN: @__const.test_paddedpacked_custom.custom = private unnamed_addr constant %struct.paddedpacked <{ i8 42, i32 13371337 }>, align 1
95 // ZERO: @__const.test_paddedpacked_custom.custom = private unnamed_addr constant %struct.paddedpacked <{ i8 42, i32 13371337 }>, align 1
96 struct paddedpacked { char c; int i; } __attribute__((packed));
97 // PATTERN-O0: @__const.test_paddedpackedarray_uninit.uninit = private unnamed_addr constant %struct.paddedpackedarray { [2 x %struct.paddedpacked] [%struct.paddedpacked <{ i8 [[I8]], i32 [[I32]] }>, %struct.paddedpacked <{ i8 [[I8]], i32 [[I32]] }>] }, align 1
98 // PATTERN: @__const.test_paddedpackedarray_custom.custom = private unnamed_addr constant %struct.paddedpackedarray { [2 x %struct.paddedpacked] [%struct.paddedpacked <{ i8 42, i32 13371337 }>, %struct.paddedpacked <{ i8 43, i32 13371338 }>] }, align 1
99 // ZERO: @__const.test_paddedpackedarray_custom.custom = private unnamed_addr constant %struct.paddedpackedarray { [2 x %struct.paddedpacked] [%struct.paddedpacked <{ i8 42, i32 13371337 }>, %struct.paddedpacked <{ i8 43, i32 13371338 }>] }, align 1
100 struct paddedpackedarray { struct paddedpacked p[2]; };
101 // PATTERN-O0: @__const.test_unpackedinpacked_uninit.uninit = private unnamed_addr constant <{ { i8, [3 x i8], i32 }, i8 }> <{ { i8, [3 x i8], i32 } { i8 [[I8]], [3 x i8] c"\[[IC]]\[[IC]]\[[IC]]", i32 [[I32]] }, i8 [[I8]] }>, align 1
102 struct unpackedinpacked { padded a; char b; } __attribute__((packed));
103 // PATTERN-O0: @__const.test_paddednested_uninit.uninit = private unnamed_addr constant { { i8, [3 x i8], i32 }, { i8, [3 x i8], i32 } } { { i8, [3 x i8], i32 } { i8 [[I8]], [3 x i8] c"\[[IC]]\[[IC]]\[[IC]]", i32 [[I32]] }, { i8, [3 x i8], i32 } { i8 [[I8]], [3 x i8] c"\[[IC]]\[[IC]]\[[IC]]", i32 [[I32]] } }, align 4
104 // PATTERN: @__const.test_paddednested_custom.custom = private unnamed_addr constant { { i8, [3 x i8], i32 }, { i8, [3 x i8], i32 } } { { i8, [3 x i8], i32 } { i8 42, [3 x i8] zeroinitializer, i32 13371337 }, { i8, [3 x i8], i32 } { i8 43, [3 x i8] zeroinitializer, i32 13371338 } }, align 4
105 // ZERO: @__const.test_paddednested_custom.custom = private unnamed_addr constant { { i8, [3 x i8], i32 }, { i8, [3 x i8], i32 } } { { i8, [3 x i8], i32 } { i8 42, [3 x i8] zeroinitializer, i32 13371337 }, { i8, [3 x i8], i32 } { i8 43, [3 x i8] zeroinitializer, i32 13371338 } }, align 4
106 struct paddednested { struct padded p1, p2; };
107 // PATTERN-O0: @__const.test_paddedpackednested_uninit.uninit = private unnamed_addr constant %struct.paddedpackednested { %struct.paddedpacked <{ i8 [[I8]], i32 [[I32]] }>, %struct.paddedpacked <{ i8 [[I8]], i32 [[I32]] }> }, align 1
108 // PATTERN: @__const.test_paddedpackednested_custom.custom = private unnamed_addr constant %struct.paddedpackednested { %struct.paddedpacked <{ i8 42, i32 13371337 }>, %struct.paddedpacked <{ i8 43, i32 13371338 }> }, align 1
109 // ZERO: @__const.test_paddedpackednested_custom.custom = private unnamed_addr constant %struct.paddedpackednested { %struct.paddedpacked <{ i8 42, i32 13371337 }>, %struct.paddedpacked <{ i8 43, i32 13371338 }> }, align 1
110 struct paddedpackednested { struct paddedpacked p1, p2; };
111 // PATTERN-O0: @__const.test_bitfield_uninit.uninit = private unnamed_addr constant %struct.bitfield { i8 [[I8]], [3 x i8] c"\[[IC]]\[[IC]]\[[IC]]" }, align 4
112 // PATTERN-O0: @__const.test_bitfield_custom.custom = private unnamed_addr constant %struct.bitfield { i8 20, [3 x i8] c"\[[IC]]\[[IC]]\[[IC]]" }, align 4
113 // ZERO-O0: @__const.test_bitfield_custom.custom = private unnamed_addr constant %struct.bitfield { i8 20, [3 x i8] zeroinitializer }, align 4
114 // PATTERN-O1-NOT: @__const.test_bitfield_uninit.uninit
115 // PATTERN-O1-NOT: @__const.test_bitfield_custom.custom
116 // ZERO-O1-NOT: @__const.test_bitfield_custom.custom
117 struct bitfield { int i : 4; int j : 2; };
118 // PATTERN-O0: @__const.test_bitfieldaligned_uninit.uninit = private unnamed_addr constant %struct.bitfieldaligned { i8 [[I8]], [3 x i8] c"\[[IC]]\[[IC]]\[[IC]]", i8 [[I8]], [3 x i8] c"\[[IC]]\[[IC]]\[[IC]]" }, align 4
119 // PATTERN-O0: @__const.test_bitfieldaligned_custom.custom = private unnamed_addr constant %struct.bitfieldaligned { i8 4, [3 x i8] c"\[[IC]]\[[IC]]\[[IC]]", i8 1, [3 x i8] c"\[[IC]]\[[IC]]\[[IC]]" }, align 4
120 // ZERO-O0: @__const.test_bitfieldaligned_custom.custom = private unnamed_addr constant %struct.bitfieldaligned { i8 4, [3 x i8] zeroinitializer, i8 1, [3 x i8] zeroinitializer }, align 4
121 // PATTERN-O1-NOT: @__const.test_bitfieldaligned_uninit.uninit
122 // PATTERN-O1-NOT: @__const.test_bitfieldaligned_custom.custom
123 // ZERO-O1-NOT: @__const.test_bitfieldaligned_custom.custom
124 struct bitfieldaligned { int i : 4; int : 0; int j : 2; };
125 struct big { unsigned a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z; };
126 // PATTERN-O0: @__const.test_arraytail_uninit.uninit = private unnamed_addr constant %struct.arraytail { i32 [[I32]], [0 x i32] zeroinitializer }, align 4
127 // PATTERN-O0: @__const.test_arraytail_custom.custom = private unnamed_addr constant %struct.arraytail { i32 57005, [0 x i32] zeroinitializer }, align 4
128 // ZERO-O0: @__const.test_arraytail_custom.custom = private unnamed_addr constant %struct.arraytail { i32 57005, [0 x i32] zeroinitializer }, align 4
129 // PATTERN-O1-NOT: @__const.test_arraytail_uninit.uninit
130 // PATTERN-O1-NOT: @__const.test_arraytail_custom.custom
131 // ZERO-O1-NOT: @__const.test_arraytail_custom.custom
132 struct arraytail { int i; int arr[]; };
133 // PATTERN-O0: @__const.test_int1_uninit.uninit = private unnamed_addr constant [1 x i32] {{\[}}i32 [[I32]]], align 4
134 // PATTERN-O0: @__const.test_int1_custom.custom = private unnamed_addr constant [1 x i32] [i32 858993459], align 4
135 // ZERO-O0: @__const.test_int1_custom.custom = private unnamed_addr constant [1 x i32] [i32 858993459], align 4
136 // PATTERN-O1-NOT: @__const.test_int1_uninit.uninit
137 // PATTERN-O1-NOT: @__const.test_int1_custom.custom
138 // ZERO-O1-NOT: @__const.test_int1_custom.custom
139 
140 // PATTERN-O0: @__const.test_bool4_uninit.uninit = private unnamed_addr constant [4 x i8] c"\[[IC]]\[[IC]]\[[IC]]\[[IC]]", align 1
141 // PATTERN-O0: @__const.test_bool4_custom.custom = private unnamed_addr constant [4 x i8] c"\01\01\01\01", align 1
142 // ZERO-O0: @__const.test_bool4_custom.custom = private unnamed_addr constant [4 x i8] c"\01\01\01\01", align 1
143 // PATTERN-O1-NOT: @__const.test_bool4_uninit.uninit
144 // PATTERN-O1-NOT: @__const.test_bool4_custom.custom
145 // ZERO-O1-NOT: @__const.test_bool4_custom.custom
146 
147 // PATTERN: @__const.test_intptr4_custom.custom = private unnamed_addr constant [4 x i32*] [i32* inttoptr ([[IPTRT]] 572662306 to i32*), i32* inttoptr ([[IPTRT]] 572662306 to i32*), i32* inttoptr ([[IPTRT]] 572662306 to i32*), i32* inttoptr ([[IPTRT]] 572662306 to i32*)], align
148 // ZERO: @__const.test_intptr4_custom.custom = private unnamed_addr constant [4 x i32*] [i32* inttoptr (i64 572662306 to i32*), i32* inttoptr (i64 572662306 to i32*), i32* inttoptr (i64 572662306 to i32*), i32* inttoptr (i64 572662306 to i32*)], align 16
149 // PATTERN-O0: @__const.test_tailpad4_uninit.uninit = private unnamed_addr constant [4 x { i16, i8, [1 x i8] }] [{ i16, i8, [1 x i8] } { i16 [[I16]], i8 [[I8]], [1 x i8] c"\[[IC]]" }, { i16, i8, [1 x i8] } { i16 [[I16]], i8 [[I8]], [1 x i8] c"\[[IC]]" }, { i16, i8, [1 x i8] } { i16 [[I16]], i8 [[I8]], [1 x i8] c"\[[IC]]" }, { i16, i8, [1 x i8] } { i16 [[I16]], i8 [[I8]], [1 x i8] c"\[[IC]]" }], align
150 // PATTERN-O1-NOT: @__const.test_tailpad4_uninit.uninit
151 // PATTERN:   @__const.test_tailpad4_custom.custom = private unnamed_addr constant [4 x { i16, i8, [1 x i8] }] [{ i16, i8, [1 x i8] } { i16 257, i8 1, [1 x i8] zeroinitializer }, { i16, i8, [1 x i8] } { i16 257, i8 1, [1 x i8] zeroinitializer }, { i16, i8, [1 x i8] } { i16 257, i8 1, [1 x i8] zeroinitializer }, { i16, i8, [1 x i8] } { i16 257, i8 1, [1 x i8] zeroinitializer }], align
152 // ZERO: @__const.test_tailpad4_custom.custom = private unnamed_addr constant [4 x { i16, i8, [1 x i8] }] [{ i16, i8, [1 x i8] } { i16 257, i8 1, [1 x i8] zeroinitializer }, { i16, i8, [1 x i8] } { i16 257, i8 1, [1 x i8] zeroinitializer }, { i16, i8, [1 x i8] } { i16 257, i8 1, [1 x i8] zeroinitializer }, { i16, i8, [1 x i8] } { i16 257, i8 1, [1 x i8] zeroinitializer }], align 16
153 struct tailpad { short s; char c; };
154 // PATTERN-O0: @__const.test_atomicnotlockfree_uninit.uninit = private unnamed_addr constant %struct.notlockfree { [4 x i64] {{\[}}i64 [[I64]], i64 [[I64]], i64 [[I64]], i64 [[I64]]] }, align
155 // PATTERN-O1-NOT: @__const.test_atomicnotlockfree_uninit.uninit
156 struct notlockfree { long long a[4]; };
157 // PATTERN-O0: @__const.test_atomicpadded_uninit.uninit = private unnamed_addr constant { i8, [3 x i8], i32 } { i8 [[I8]], [3 x i8] c"\[[IC]]\[[IC]]\[[IC]]", i32 [[I32]] }, align 8
158 // PATTERN-O1-NOT: @__const.test_atomicpadded_uninit.uninit
159 // PATTERN-O0: @__const.test_atomictailpad_uninit.uninit = private unnamed_addr constant { i16, i8, [1 x i8] } { i16 [[I16]], i8 [[I8]], [1 x i8] c"\[[IC]]" }, align 4
160 // PATTERN-O1-NOT: @__const.test_atomictailpad_uninit.uninit
161 // PATTERN-O0: @__const.test_complexfloat_uninit.uninit = private unnamed_addr constant { float, float } { float 0xFFFFFFFFE0000000, float 0xFFFFFFFFE0000000 }, align 4
162 // PATTERN-O1-NOT: @__const.test_complexfloat_uninit.uninit
163 // PATTERN-O0: @__const.test_complexfloat_braces.braces = private unnamed_addr constant { float, float } { float 0xFFFFFFFFE0000000, float 0xFFFFFFFFE0000000 }, align 4
164 // PATTERN-O1-NOT: @__const.test_complexfloat_braces.braces
165 // PATTERN-O0: @__const.test_complexfloat_custom.custom = private unnamed_addr constant { float, float } { float 0xFFFFFFFFE0000000, float 0xFFFFFFFFE0000000 }, align 4
166 // PATTERN-O1-NOT: @__const.test_complexfloat_custom.custom
167 // PATTERN-O0: @__const.test_complexdouble_uninit.uninit = private unnamed_addr constant { double, double } { double 0xFFFFFFFFFFFFFFFF, double 0xFFFFFFFFFFFFFFFF }, align 8
168 // PATTERN-O1-NOT: @__const.test_complexdouble_uninit.uninit
169 // PATTERN-O0: @__const.test_complexdouble_braces.braces = private unnamed_addr constant { double, double } { double 0xFFFFFFFFFFFFFFFF, double 0xFFFFFFFFFFFFFFFF }, align 8
170 // PATTERN-O1-NOT: @__const.test_complexdouble_braces.braces
171 // PATTERN-O0: @__const.test_complexdouble_custom.custom = private unnamed_addr constant { double, double } { double 0xFFFFFFFFFFFFFFFF, double 0xFFFFFFFFFFFFFFFF }, align 8
172 // PATTERN-O1-NOT: @__const.test_complexdouble_custom.custom
173 // PATTERN-O0: @__const.test_semivolatile_uninit.uninit = private unnamed_addr constant %struct.semivolatile { i32 [[I32]], i32 [[I32]] }, align 4
174 // PATTERN-O0: @__const.test_semivolatile_custom.custom = private unnamed_addr constant %struct.semivolatile { i32 1145324612, i32 1145324612 }, align 4
175 // PATTERN-O1-NOT: @__const.test_semivolatile_custom.custom
176 struct semivolatile { int i; volatile int vi; };
177 // PATTERN-O0: @__const.test_semivolatileinit_uninit.uninit = private unnamed_addr constant %struct.semivolatileinit { i32 [[I32]], i32 [[I32]] }, align 4
178 // PATTERN-O1-NOT: @__const.test_semivolatileinit_uninit.uninit
179 // PATTERN-O0: @__const.test_semivolatileinit_braces.braces = private unnamed_addr constant %struct.semivolatileinit { i32 [[I32]], i32 [[I32]] }, align 4
180 // PATTERN-O1-NOT: @__const.test_semivolatileinit_braces.braces
181 // PATTERN-O0: @__const.test_semivolatileinit_custom.custom = private unnamed_addr constant %struct.semivolatileinit { i32 [[I32]], i32 [[I32]] }, align 4
182 // PATTERN-O1-NOT: @__const.test_semivolatileinit_custom.custom = private unnamed_addr constant %struct.semivolatileinit { i32 [[I32]], i32 [[I32]] }, align 4
183 // ZERO-O0: @__const.test_semivolatile_custom.custom = private unnamed_addr constant %struct.semivolatile { i32 1145324612, i32 1145324612 }, align 4
184 // ZERO-O1-NOT: @__const.test_semivolatile_custom.custom
185 struct semivolatileinit { int i = 0x11111111; volatile int vi = 0x11111111; };
186 // PATTERN-O0: @__const.test_base_uninit.uninit = private unnamed_addr constant %struct.base { i32 (...)** inttoptr ([[IPTRT]] [[IPTR]] to i32 (...)**) }, align
187 // PATTERN-O1-NOT: @__const.test_base_uninit.uninit
188 // PATTERN-O0: @__const.test_base_braces.braces = private unnamed_addr constant %struct.base { i32 (...)** inttoptr ([[IPTRT]] [[IPTR]] to i32 (...)**) }, align
189 // PATTERN-O1-NOT: @__const.test_base_braces.braces
190 struct base { virtual ~base(); };
191 // PATTERN-O0: @__const.test_derived_uninit.uninit = private unnamed_addr constant %struct.derived { %struct.base { i32 (...)** inttoptr ([[IPTRT]] [[IPTR]] to i32 (...)**) } }, align
192 // PATTERN-O1-NOT: @__const.test_derived_uninit.uninit
193 // PATTERN-O0: @__const.test_derived_braces.braces = private unnamed_addr constant %struct.derived { %struct.base { i32 (...)** inttoptr ([[IPTRT]] [[IPTR]] to i32 (...)**) } }, align
194 // PATTERN-O1-NOT: @__const.test_derived_braces.braces
195 struct derived : public base {};
196 // PATTERN-O0: @__const.test_virtualderived_uninit.uninit = private unnamed_addr constant %struct.virtualderived { %struct.base { i32 (...)** inttoptr ([[IPTRT]] [[IPTR]] to i32 (...)**) }, %struct.derived { %struct.base { i32 (...)** inttoptr ([[IPTRT]] [[IPTR]] to i32 (...)**) } } }, align
197 // PATTERN-O1-NOT: @__const.test_virtualderived_uninit.uninit
198 // PATTERN-O0: @__const.test_virtualderived_braces.braces = private unnamed_addr constant %struct.virtualderived { %struct.base { i32 (...)** inttoptr ([[IPTRT]] [[IPTR]] to i32 (...)**) }, %struct.derived { %struct.base { i32 (...)** inttoptr ([[IPTRT]] [[IPTR]] to i32 (...)**) } } }, align
199 // PATTERN-O1-NOT: @__const.test_virtualderived_braces.braces
200 struct virtualderived : public virtual base, public virtual derived {};
201 // PATTERN-O0: @__const.test_matching_uninit.uninit = private unnamed_addr constant %union.matching { i32 [[I32]] }, align 4
202 // PATTERN-O1-NOT: @__const.test_matching_uninit.uninit
203 // PATTERN-O0: @__const.test_matching_custom.custom = private unnamed_addr constant { float } { float 6.145500e+04 }, align 4
204 // PATTERN-O1-NOT: @__const.test_matching_custom.custom
205 // ZERO-O0: @__const.test_matching_custom.custom = private unnamed_addr constant { float } { float 6.145500e+04 }, align 4
206 // ZERO-O1-NOT: @__const.test_matching_custom.custom
207 union matching { int i; float f; };
208 // PATTERN-O0: @__const.test_matchingreverse_uninit.uninit = private unnamed_addr constant %union.matchingreverse { float 0xFFFFFFFFE0000000 }, align 4
209 // PATTERN-O1-NOT: @__const.test_matchingreverse_uninit.uninit
210 // PATTERN-O0: @__const.test_matchingreverse_custom.custom = private unnamed_addr constant { i32 } { i32 61455 }, align 4
211 // PATTERN-O1-NOT: @__const.test_matchingreverse_custom.custom
212 // ZERO-O0: @__const.test_matchingreverse_custom.custom = private unnamed_addr constant { i32 } { i32 61455 }, align 4
213 // ZERO-O1-NOT: @__const.test_matchingreverse_custom.custom
214 union matchingreverse { float f; int i; };
215 // PATTERN-O0: @__const.test_unmatched_uninit.uninit = private unnamed_addr constant %union.unmatched { i32 [[I32]] }, align 4
216 // PATTERN-O1-NOT: @__const.test_unmatched_uninit.uninit
217 // PATTERN-O0: @__const.test_unmatched_custom.custom = private unnamed_addr constant %union.unmatched { i32 1001242351 }, align 4
218 // PATTERN-O1-NOT: @__const.test_unmatched_custom.custom
219 // ZERO-O0: @__const.test_unmatched_custom.custom = private unnamed_addr constant %union.unmatched { i32 1001242351 }, align 4
220 // ZERO-O1-NOT: @__const.test_unmatched_custom.custom
221 union unmatched { char c; int i; };
222 // PATTERN-O0: @__const.test_unmatchedreverse_uninit.uninit = private unnamed_addr constant %union.unmatchedreverse { i32 [[I32]] }, align 4
223 // PATTERN-O1-NOT: @__const.test_unmatchedreverse_uninit.uninit
224 // PATTERN-O0: @__const.test_unmatchedreverse_custom.custom = private unnamed_addr constant { i8, [3 x i8] } { i8 42, [3 x i8] c"\[[IC]]\[[IC]]\[[IC]]" }, align 4
225 // PATTERN-O1-NOT: @__const.test_unmatchedreverse_custom.custom
226 // ZERO-O0: @__const.test_unmatchedreverse_custom.custom = private unnamed_addr constant { i8, [3 x i8] } { i8 42, [3 x i8] zeroinitializer }, align 4
227 // ZERO-O1-NOT: @__const.test_unmatchedreverse_custom.custom
228 union unmatchedreverse { int i; char c; };
229 // PATTERN-O0: @__const.test_unmatchedfp_uninit.uninit = private unnamed_addr constant %union.unmatchedfp { double 0xFFFFFFFFFFFFFFFF }, align
230 // PATTERN-O1-NOT: @__const.test_unmatchedfp_uninit.uninit
231 // PATTERN-O0: @__const.test_unmatchedfp_custom.custom = private unnamed_addr constant %union.unmatchedfp { double 0x400921FB54442D18 }, align
232 // PATTERN-O1-NOT: @__const.test_unmatchedfp_custom.custom
233 // ZERO-O0: @__const.test_unmatchedfp_custom.custom = private unnamed_addr constant %union.unmatchedfp { double 0x400921FB54442D18 }, align 8
234 // ZERO-O1-NOT: @__const.test_unmatchedfp_custom.custom
235 union unmatchedfp { float f; double d; };
236 enum emptyenum {};
237 enum smallenum { VALUE };
238 
239 extern "C" {
240 
241 TEST_UNINIT(char, char);
242 // CHECK-LABEL: @test_char_uninit()
243 // CHECK:       %uninit = alloca i8, align
244 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%uninit)
245 // PATTERN-LABEL: @test_char_uninit()
246 // PATTERN: store i8 [[I8]], i8* %uninit, align 1, !annotation [[AUTO_INIT:!.+]]
247 // ZERO-LABEL: @test_char_uninit()
248 // ZERO: store i8 0, i8* %uninit, align 1, !annotation [[AUTO_INIT:!.+]]
249 
250 TEST_BRACES(char, char);
251 // CHECK-LABEL: @test_char_braces()
252 // CHECK:       %braces = alloca i8, align [[ALIGN:[0-9]*]]
253 // CHECK-NEXT:  store i8 0, i8* %braces, align [[ALIGN]]
254 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%braces)
255 
256 TEST_UNINIT(uchar, unsigned char);
257 // CHECK-LABEL: @test_uchar_uninit()
258 // CHECK:       %uninit = alloca i8, align
259 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%uninit)
260 // PATTERN-LABEL: @test_uchar_uninit()
261 // PATTERN: store i8 [[I8]], i8* %uninit, align 1, !annotation [[AUTO_INIT]]
262 // ZERO-LABEL: @test_uchar_uninit()
263 // ZERO: store i8 0, i8* %uninit, align 1, !annotation [[AUTO_INIT]]
264 
265 TEST_BRACES(uchar, unsigned char);
266 // CHECK-LABEL: @test_uchar_braces()
267 // CHECK:       %braces = alloca i8, align [[ALIGN:[0-9]*]]
268 // CHECK-NEXT:  store i8 0, i8* %braces, align [[ALIGN]]
269 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%braces)
270 
271 TEST_UNINIT(schar, signed char);
272 // CHECK-LABEL: @test_schar_uninit()
273 // CHECK:       %uninit = alloca i8, align
274 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%uninit)
275 // PATTERN-LABEL: @test_schar_uninit()
276 // PATTERN: store i8 [[I8]], i8* %uninit, align 1, !annotation [[AUTO_INIT]]
277 // ZERO-LABEL: @test_schar_uninit()
278 // ZERO: store i8 0, i8* %uninit, align 1, !annotation [[AUTO_INIT]]
279 
280 TEST_BRACES(schar, signed char);
281 // CHECK-LABEL: @test_schar_braces()
282 // CHECK:       %braces = alloca i8, align [[ALIGN:[0-9]*]]
283 // CHECK-NEXT:  store i8 0, i8* %braces, align [[ALIGN]]
284 // CHECK-NOT:   !annotation
285 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%braces)
286 
287 TEST_UNINIT(wchar_t, wchar_t);
288 // CHECK-LABEL: @test_wchar_t_uninit()
289 // CHECK:       %uninit = alloca i32, align
290 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%uninit)
291 // PATTERN-LABEL: @test_wchar_t_uninit()
292 // PATTERN: store i32 [[I32]], i32* %uninit, align 4, !annotation [[AUTO_INIT]]
293 // ZERO-LABEL: @test_wchar_t_uninit()
294 // ZERO: store i32 0, i32* %uninit, align 4, !annotation [[AUTO_INIT]]
295 
296 TEST_BRACES(wchar_t, wchar_t);
297 // CHECK-LABEL: @test_wchar_t_braces()
298 // CHECK:       %braces = alloca i32, align [[ALIGN:[0-9]*]]
299 // CHECK-NEXT:  store i32 0, i32* %braces, align [[ALIGN]]
300 //  CHECK-NOT:  !annotation
301 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%braces)
302 
303 TEST_UNINIT(short, short);
304 // CHECK-LABEL: @test_short_uninit()
305 // CHECK:       %uninit = alloca i16, align
306 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%uninit)
307 // PATTERN-LABEL: @test_short_uninit()
308 // PATTERN: store i16 [[I16]], i16* %uninit, align 2, !annotation [[AUTO_INIT]]
309 // ZERO-LABEL: @test_short_uninit()
310 // ZERO: store i16 0, i16* %uninit, align 2, !annotation [[AUTO_INIT]]
311 
312 TEST_BRACES(short, short);
313 // CHECK-LABEL: @test_short_braces()
314 // CHECK:       %braces = alloca i16, align [[ALIGN:[0-9]*]]
315 // CHECK-NEXT:  store i16 0, i16* %braces, align [[ALIGN]]
316 // CHECK-NOT:   !annotation
317 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%braces)
318 
319 TEST_UNINIT(ushort, unsigned short);
320 // CHECK-LABEL: @test_ushort_uninit()
321 // CHECK:       %uninit = alloca i16, align
322 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%uninit)
323 // PATTERN-LABEL: @test_ushort_uninit()
324 // PATTERN: store i16 [[I16]], i16* %uninit, align 2, !annotation [[AUTO_INIT]]
325 // ZERO-LABEL: @test_ushort_uninit()
326 // ZERO: store i16 0, i16* %uninit, align 2, !annotation [[AUTO_INIT]]
327 
328 TEST_BRACES(ushort, unsigned short);
329 // CHECK-LABEL: @test_ushort_braces()
330 // CHECK:       %braces = alloca i16, align [[ALIGN:[0-9]*]]
331 // CHECK-NEXT:  store i16 0, i16* %braces, align [[ALIGN]]
332 //CHECK-NOT:    !annotation
333 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%braces)
334 
335 TEST_UNINIT(int, int);
336 // CHECK-LABEL: @test_int_uninit()
337 // CHECK:       %uninit = alloca i32, align
338 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%uninit)
339 // PATTERN-LABEL: @test_int_uninit()
340 // PATTERN: store i32 [[I32]], i32* %uninit, align 4, !annotation [[AUTO_INIT]]
341 // ZERO-LABEL: @test_int_uninit()
342 // ZERO: store i32 0, i32* %uninit, align 4, !annotation [[AUTO_INIT]]
343 
344 TEST_BRACES(int, int);
345 // CHECK-LABEL: @test_int_braces()
346 // CHECK:       %braces = alloca i32, align [[ALIGN:[0-9]*]]
347 // CHECK-NEXT:  store i32 0, i32* %braces, align [[ALIGN]]
348 // CHECK-NOT:   !annotation
349 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%braces)
350 
351 TEST_UNINIT(unsigned, unsigned);
352 // CHECK-LABEL: @test_unsigned_uninit()
353 // CHECK:       %uninit = alloca i32, align
354 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%uninit)
355 // PATTERN-LABEL: @test_unsigned_uninit()
356 // PATTERN: store i32 [[I32]], i32* %uninit, align 4, !annotation [[AUTO_INIT]]
357 // ZERO-LABEL: @test_unsigned_uninit()
358 // ZERO: store i32 0, i32* %uninit, align 4, !annotation [[AUTO_INIT]]
359 
360 TEST_BRACES(unsigned, unsigned);
361 // CHECK-LABEL: @test_unsigned_braces()
362 // CHECK:       %braces = alloca i32, align [[ALIGN:[0-9]*]]
363 // CHECK-NEXT:  store i32 0, i32* %braces, align [[ALIGN]]
364 // CHECK-NOT:   !annotation
365 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%braces)
366 
367 TEST_UNINIT(long, long);
368 // CHECK-LABEL: @test_long_uninit()
369 // CHECK:       %uninit = alloca i64, align
370 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%uninit)
371 // PATTERN-LABEL: @test_long_uninit()
372 // PATTERN: store [[ILONGT]] [[ILONG]], [[ILONGT]]* %uninit, align {{.+}}, !annotation [[AUTO_INIT]]
373 // ZERO-LABEL: @test_long_uninit()
374 // ZERO: store i64 0, i64* %uninit, align 8, !annotation [[AUTO_INIT]]
375 
376 TEST_BRACES(long, long);
377 // CHECK-LABEL: @test_long_braces()
378 // CHECK:       %braces = alloca i64, align [[ALIGN:[0-9]*]]
379 // CHECK-NEXT:  store i64 0, i64* %braces, align [[ALIGN]]
380 // CHECK-NOT:   !annotation
381 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%braces)
382 
383 TEST_UNINIT(ulong, unsigned long);
384 // CHECK-LABEL: @test_ulong_uninit()
385 // CHECK:       %uninit = alloca i64, align
386 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%uninit)
387 // PATTERN-LABEL: @test_ulong_uninit()
388 // PATTERN: store [[ILONGT]] [[ILONG]], [[ILONGT]]* %uninit, align {{.+}}, !annotation [[AUTO_INIT]]
389 // ZERO-LABEL: @test_ulong_uninit()
390 // ZERO: store i64 0, i64* %uninit, align 8, !annotation [[AUTO_INIT]]
391 
392 TEST_BRACES(ulong, unsigned long);
393 // CHECK-LABEL: @test_ulong_braces()
394 // CHECK:       %braces = alloca i64, align [[ALIGN:[0-9]*]]
395 // CHECK-NEXT:  store i64 0, i64* %braces, align [[ALIGN]]
396 // CHECK-NOT:   !annotation
397 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%braces)
398 
399 TEST_UNINIT(longlong, long long);
400 // CHECK-LABEL: @test_longlong_uninit()
401 // CHECK:       %uninit = alloca i64, align
402 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%uninit)
403 // PATTERN-LABEL: @test_longlong_uninit()
404 // PATTERN: store i64 [[I64]], i64* %uninit, align 8, !annotation [[AUTO_INIT]]
405 // ZERO-LABEL: @test_longlong_uninit()
406 // ZERO: store i64 0, i64* %uninit, align 8, !annotation [[AUTO_INIT]]
407 
408 TEST_BRACES(longlong, long long);
409 // CHECK-LABEL: @test_longlong_braces()
410 // CHECK:       %braces = alloca i64, align [[ALIGN:[0-9]*]]
411 // CHECK-NEXT:  store i64 0, i64* %braces, align [[ALIGN]]
412 // CHECK-NOT:   !annotation
413 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%braces)
414 
415 TEST_UNINIT(ulonglong, unsigned long long);
416 // CHECK-LABEL: @test_ulonglong_uninit()
417 // CHECK:       %uninit = alloca i64, align
418 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%uninit)
419 // PATTERN-LABEL: @test_ulonglong_uninit()
420 // PATTERN: store i64 [[I64]], i64* %uninit, align 8, !annotation [[AUTO_INIT]]
421 // ZERO-LABEL: @test_ulonglong_uninit()
422 // ZERO: store i64 0, i64* %uninit, align 8, !annotation [[AUTO_INIT]]
423 
424 TEST_BRACES(ulonglong, unsigned long long);
425 // CHECK-LABEL: @test_ulonglong_braces()
426 // CHECK:       %braces = alloca i64, align [[ALIGN:[0-9]*]]
427 // CHECK-NEXT:  store i64 0, i64* %braces, align [[ALIGN]]
428 // CHECK-NOT:   !annotation
429 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%braces)
430 
431 TEST_UNINIT(int128, __int128);
432 // CHECK-LABEL: @test_int128_uninit()
433 // CHECK:       %uninit = alloca i128, align
434 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%uninit)
435 // PATTERN-LABEL: @test_int128_uninit()
436 // PATTERN: store [[I128T]] [[I128]], [[I128T]]* %uninit, align {{.+}}, !annotation [[AUTO_INIT]]
437 // ZERO-LABEL: @test_int128_uninit()
438 // ZERO: store i128 0, i128* %uninit, align 16, !annotation [[AUTO_INIT]]
439 
440 TEST_BRACES(int128, __int128);
441 // CHECK-LABEL: @test_int128_braces()
442 // CHECK:       %braces = alloca i128, align [[ALIGN:[0-9]*]]
443 // CHECK-NEXT:  store i128 0, i128* %braces, align [[ALIGN]]
444 // CHECK-NOT:   !annotation
445 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%braces)
446 
447 TEST_UNINIT(uint128, unsigned __int128);
448 // CHECK-LABEL: @test_uint128_uninit()
449 // CHECK:       %uninit = alloca i128, align
450 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%uninit)
451 // PATTERN-LABEL: @test_uint128_uninit()
452 // PATTERN: store [[I128T]] [[I128]], [[I128T]]* %uninit, align {{.+}}, !annotation [[AUTO_INIT]]
453 // ZERO-LABEL: @test_uint128_uninit()
454 // ZERO: store i128 0, i128* %uninit, align 16, !annotation [[AUTO_INIT]]
455 
456 TEST_BRACES(uint128, unsigned __int128);
457 // CHECK-LABEL: @test_uint128_braces()
458 // CHECK:       %braces = alloca i128, align [[ALIGN:[0-9]*]]
459 // CHECK-NEXT:  store i128 0, i128* %braces, align [[ALIGN]]
460 // CHECK-NOT:   !annotation
461 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%braces)
462 
463 TEST_UNINIT(fp16, __fp16);
464 // CHECK-LABEL: @test_fp16_uninit()
465 // CHECK:       %uninit = alloca half, align
466 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%uninit)
467 // PATTERN-LABEL: @test_fp16_uninit()
468 // PATTERN: store half 0xHFFFF, half* %uninit, align 2, !annotation [[AUTO_INIT]]
469 // ZERO-LABEL: @test_fp16_uninit()
470 // ZERO: store half 0xH0000, half* %uninit, align 2, !annotation [[AUTO_INIT]]
471 
472 TEST_BRACES(fp16, __fp16);
473 // CHECK-LABEL: @test_fp16_braces()
474 // CHECK:       %braces = alloca half, align [[ALIGN:[0-9]*]]
475 // CHECK-NEXT:  store half 0xH0000, half* %braces, align [[ALIGN]]
476 // CHECK-NOT:   !annotation
477 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%braces)
478 
479 TEST_UNINIT(float, float);
480 // CHECK-LABEL: @test_float_uninit()
481 // CHECK:       %uninit = alloca float, align
482 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%uninit)
483 // PATTERN-LABEL: @test_float_uninit()
484 // PATTERN: store float 0xFFFFFFFFE0000000, float* %uninit, align 4, !annotation [[AUTO_INIT]]
485 // ZERO-LABEL: @test_float_uninit()
486 // ZERO: store float 0.000000e+00, float* %uninit, align 4, !annotation [[AUTO_INIT]]
487 
488 TEST_BRACES(float, float);
489 // CHECK-LABEL: @test_float_braces()
490 // CHECK:       %braces = alloca float, align [[ALIGN:[0-9]*]]
491 // CHECK-NEXT:  store float 0.000000e+00, float* %braces, align [[ALIGN]]
492 // CHECK-NOT:   !annotation
493 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%braces)
494 
495 TEST_UNINIT(double, double);
496 // CHECK-LABEL: @test_double_uninit()
497 // CHECK:       %uninit = alloca double, align
498 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%uninit)
499 // PATTERN-LABEL: @test_double_uninit()
500 // PATTERN: store double 0xFFFFFFFFFFFFFFFF, double* %uninit, align 8, !annotation [[AUTO_INIT]]
501 // ZERO-LABEL: @test_double_uninit()
502 // ZERO: store double 0.000000e+00, double* %uninit, align 8, !annotation [[AUTO_INIT]]
503 
504 TEST_BRACES(double, double);
505 // CHECK-LABEL: @test_double_braces()
506 // CHECK:       %braces = alloca double, align [[ALIGN:[0-9]*]]
507 // CHECK-NEXT:  store double 0.000000e+00, double* %braces, align [[ALIGN]]
508 // CHECK-NOT:   !annotation
509 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%braces)
510 
511 TEST_UNINIT(longdouble, long double);
512 // CHECK-LABEL: @test_longdouble_uninit()
513 // CHECK:       %uninit = alloca x86_fp80, align
514 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%uninit)
515 // PATTERN-LABEL: @test_longdouble_uninit()
516 // PATTERN: store x86_fp80 0xKFFFFFFFFFFFFFFFFFFFF, x86_fp80* %uninit, align {{.+}}, !annotation [[AUTO_INIT]]
517 // ZERO-LABEL: @test_longdouble_uninit()
518 // ZERO: store x86_fp80 0xK00000000000000000000, x86_fp80* %uninit, align {{.+}}, !annotation [[AUTO_INIT]]
519 
520 TEST_BRACES(longdouble, long double);
521 // CHECK-LABEL: @test_longdouble_braces()
522 // CHECK:       %braces = alloca x86_fp80, align [[ALIGN:[0-9]*]]
523 // CHECK-NEXT:  store x86_fp80 0xK00000000000000000000, x86_fp80* %braces, align [[ALIGN]]
524 // CHECK-NOT:   !annotation
525 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%braces)
526 
527 TEST_UNINIT(intptr, int*);
528 // CHECK-LABEL: @test_intptr_uninit()
529 // CHECK:       %uninit = alloca i32*, align
530 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%uninit)
531 // PATTERN-LABEL: @test_intptr_uninit()
532 // PATTERN: store i32* inttoptr ([[IPTRT]] [[IPTR]] to i32*), i32** %uninit, align {{.+}}, !annotation [[AUTO_INIT]]
533 // ZERO-LABEL: @test_intptr_uninit()
534 // ZERO: store i32* null, i32** %uninit, align {{.+}}, !annotation [[AUTO_INIT]]
535 
536 TEST_BRACES(intptr, int*);
537 // CHECK-LABEL: @test_intptr_braces()
538 // CHECK:       %braces = alloca i32*, align [[ALIGN:[0-9]*]]
539 // CHECK-NEXT:  store i32* null, i32** %braces, align [[ALIGN]]
540 // CHECK-NOT:   !annotation
541 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%braces)
542 
543 TEST_UNINIT(intptrptr, int**);
544 // CHECK-LABEL: @test_intptrptr_uninit()
545 // CHECK:       %uninit = alloca i32**, align
546 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%uninit)
547 // PATTERN-LABEL: @test_intptrptr_uninit()
548 // PATTERN: store i32** inttoptr ([[IPTRT]] [[IPTR]] to i32**), i32*** %uninit, align {{.+}}, !annotation [[AUTO_INIT]]
549 // ZERO-LABEL: @test_intptrptr_uninit()
550 // ZERO: store i32** null, i32*** %uninit, align {{.+}}, !annotation [[AUTO_INIT]]
551 
552 TEST_BRACES(intptrptr, int**);
553 // CHECK-LABEL: @test_intptrptr_braces()
554 // CHECK:       %braces = alloca i32**, align [[ALIGN:[0-9]*]]
555 // CHECK-NEXT:  store i32** null, i32*** %braces, align [[ALIGN]]
556 // CHECK-NOT:   !annotation
557 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%braces)
558 
559 TEST_UNINIT(function, void(*)());
560 // CHECK-LABEL: @test_function_uninit()
561 // CHECK:       %uninit = alloca void ()*, align
562 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%uninit)
563 // PATTERN-LABEL: @test_function_uninit()
564 // PATTERN: store void ()* inttoptr ([[IPTRT]] [[IPTR]] to void ()*), void ()** %uninit, align {{.+}}, !annotation [[AUTO_INIT]]
565 // ZERO-LABEL: @test_function_uninit()
566 // ZERO: store void ()* null, void ()** %uninit, align {{.+}}, !annotation [[AUTO_INIT]]
567 
568 TEST_BRACES(function, void(*)());
569 // CHECK-LABEL: @test_function_braces()
570 // CHECK:       %braces = alloca void ()*, align [[ALIGN:[0-9]*]]
571 // CHECK-NEXT:  store void ()* null, void ()** %braces, align [[ALIGN]]
572 // CHECK-NOT:   !annotation
573 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%braces)
574 
575 TEST_UNINIT(bool, bool);
576 // CHECK-LABEL: @test_bool_uninit()
577 // CHECK:       %uninit = alloca i8, align
578 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%uninit)
579 // PATTERN-LABEL: @test_bool_uninit()
580 // PATTERN: store i8 [[I8]], i8* %uninit, align 1, !annotation [[AUTO_INIT]]
581 // ZERO-LABEL: @test_bool_uninit()
582 // ZERO: store i8 0, i8* %uninit, align 1, !annotation [[AUTO_INIT]]
583 
584 TEST_BRACES(bool, bool);
585 // CHECK-LABEL: @test_bool_braces()
586 // CHECK:       %braces = alloca i8, align [[ALIGN:[0-9]*]]
587 // CHECK-NEXT:  store i8 0, i8* %braces, align [[ALIGN]]
588 // CHECK-NOT:   !annotation
589 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%braces)
590 
591 TEST_UNINIT(empty, empty);
592 // CHECK-LABEL: @test_empty_uninit()
593 // CHECK:       %uninit = alloca %struct.empty, align
594 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%uninit)
595 // PATTERN-LABEL: @test_empty_uninit()
596 // PATTERN-O0: call void @llvm.memcpy{{.*}} @__const.test_empty_uninit.uninit{{.+}}), !annotation [[AUTO_INIT]]
597 // PATTERN-O1: store i8 [[I8]], {{.*}} align 1, !annotation [[AUTO_INIT]]
598 // ZERO-LABEL: @test_empty_uninit()
599 // ZERO-O0: call void @llvm.memset{{.*}}, i8 0,{{.+}}), !annotation [[AUTO_INIT]]
600 // ZERO-O1: store i8 0, {{.*}} align 1
601 // FIXME: !annotation dropped by optimizations
602 // ZERO-O1-NOT: !annotation
603 
604 TEST_BRACES(empty, empty);
605 // CHECK-LABEL: @test_empty_braces()
606 // CHECK:       %braces = alloca %struct.empty, align
607 // CHECK-NEXT:  bitcast
608 // CHECK-NEXT:  call void @llvm.memcpy
609 // CHECK-NOT:   !annotation
610 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%braces)
611 
612 TEST_UNINIT(small, small);
613 // CHECK-LABEL: @test_small_uninit()
614 // CHECK:       %uninit = alloca %struct.small, align
615 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%uninit)
616 // PATTERN-LABEL: @test_small_uninit()
617 // PATTERN-O0: call void @llvm.memcpy{{.*}} @__const.test_small_uninit.uninit{{.+}}), !annotation [[AUTO_INIT]]
618 // PATTERN-O1: store i8 [[I8]], {{.*}} align 1, !annotation [[AUTO_INIT]]
619 // ZERO-LABEL: @test_small_uninit()
620 // ZERO-O0: call void @llvm.memset{{.*}}, i8 0,{{.+}}), !annotation [[AUTO_INIT]]
621 // ZERO-O1: store i8 0, {{.*}} align 1
622 // FIXME: !annotation dropped by optimizations
623 // ZERO-O1-NOT: !annotation
624 
625 TEST_BRACES(small, small);
626 // CHECK-LABEL: @test_small_braces()
627 // CHECK:       %braces = alloca %struct.small, align [[ALIGN:[0-9]*]]
628 // CHECK-NEXT:  bitcast
629 // CHECK-NEXT:  call void @llvm.memset{{.*}}(i8* align [[ALIGN]] %{{.*}}, i8 0, i64 1, i1 false)
630 // CHECK-NOT:   !annotation
631 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%braces)
632 
633 TEST_CUSTOM(small, small, { 42 });
634 // CHECK-LABEL: @test_small_custom()
635 // CHECK:       %custom = alloca %struct.small, align
636 // CHECK-NEXT:  bitcast
637 // CHECK-NEXT:  call void @llvm.memcpy
638 // CHECK-NOT:   !annotation
639 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%custom)
640 
641 TEST_UNINIT(smallinit, smallinit);
642 // CHECK-LABEL: @test_smallinit_uninit()
643 // CHECK:       %uninit = alloca %struct.smallinit, align
644 // CHECK-NEXT:  call void @{{.*}}smallinit{{.*}}%uninit)
645 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%uninit)
646 
647 TEST_BRACES(smallinit, smallinit);
648 // CHECK-LABEL: @test_smallinit_braces()
649 // CHECK:       %braces = alloca %struct.smallinit, align [[ALIGN:[0-9]*]]
650 // CHECK-NEXT:  %[[C:[^ ]*]] = getelementptr inbounds %struct.smallinit, %struct.smallinit* %braces, i32 0, i32 0
651 // CHECK-NEXT:  store i8 42, i8* %[[C]], align [[ALIGN]]
652 // CHECK-NOT:   !annotation
653 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%braces)
654 
655 TEST_CUSTOM(smallinit, smallinit, { 100 });
656 // CHECK-LABEL: @test_smallinit_custom()
657 // CHECK:       %custom = alloca %struct.smallinit, align [[ALIGN:[0-9]*]]
658 // CHECK-NEXT:  %[[C:[^ ]*]] = getelementptr inbounds %struct.smallinit, %struct.smallinit* %custom, i32 0, i32 0
659 // CHECK-NEXT:  store i8 100, i8* %[[C]], align [[ALIGN]]
660 // CHECK-NOT:   !annotation
661 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%custom)
662 
663 TEST_UNINIT(smallpartinit, smallpartinit);
664 // CHECK-LABEL: @test_smallpartinit_uninit()
665 // CHECK:       %uninit = alloca %struct.smallpartinit, align
666 // CHECK-NEXT:  call void @{{.*}}smallpartinit{{.*}}%uninit)
667 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%uninit)
668 // PATTERN-LABEL: @test_smallpartinit_uninit()
669 // PATTERN-O0: call void @llvm.memcpy{{.*}} @__const.test_smallpartinit_uninit.uninit{{.+}}), !annotation [[AUTO_INIT]]
670 // PATTERN-O1: store i8 [[I8]], {{.*}} align 1, !annotation [[AUTO_INIT]]
671 // PATTERN-O1: store i8 42, {{.*}} align 1
672 // ZERO-LABEL: @test_smallpartinit_uninit()
673 // ZERO-O0: call void @llvm.memset{{.*}}, i8 0,{{.+}}), !annotation [[AUTO_INIT]]
674 // ZERO-O1-LEGACY: store i16 0, i16* %uninit, align 2
675 // ZERO-O1-NEWPM: store i16 0, i16* %uninit, align 2
676 // FIXME: !annotation dropped by optimizations
677 // ZERO-O1-NOT: !annotation
678 
679 TEST_BRACES(smallpartinit, smallpartinit);
680 // CHECK-LABEL: @test_smallpartinit_braces()
681 // CHECK:       %braces = alloca %struct.smallpartinit, align [[ALIGN:[0-9]*]]
682 // CHECK-NEXT:  %[[C:[^ ]*]] = getelementptr inbounds %struct.smallpartinit, %struct.smallpartinit* %braces, i32 0, i32 0
683 // CHECK-NEXT:  store i8 42, i8* %[[C]], align [[ALIGN]]
684 // CHECK-NOT:   !annotation
685 // CHECK-NEXT:  %[[D:[^ ]*]] = getelementptr inbounds %struct.smallpartinit, %struct.smallpartinit* %braces, i32 0, i32 1
686 // CHECK-NEXT:  store i8 0, i8* %[[D]], align [[ALIGN]]
687 // CHECK-NOT:   !annotation
688 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%braces)
689 
690 TEST_CUSTOM(smallpartinit, smallpartinit, { 100, 42 });
691 // CHECK-LABEL: @test_smallpartinit_custom()
692 // CHECK:       %custom = alloca %struct.smallpartinit, align [[ALIGN:[0-9]*]]
693 // CHECK-NEXT:  %[[C:[^ ]*]] = getelementptr inbounds %struct.smallpartinit, %struct.smallpartinit* %custom, i32 0, i32 0
694 // CHECK-NEXT:  store i8 100, i8* %[[C]], align [[ALIGN]]
695 // CHECK-NOT:   !annotation
696 // CHECK-NEXT:  %[[D:[^ ]*]] = getelementptr inbounds %struct.smallpartinit, %struct.smallpartinit* %custom, i32 0, i32 1
697 // CHECK-NEXT:  store i8 42, i8* %[[D]], align [[ALIGN]]
698 // CHECK-NOT:   !annotation
699 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%custom)
700 
701 TEST_UNINIT(nullinit, nullinit);
702 // CHECK-LABEL: @test_nullinit_uninit()
703 // CHECK:       %uninit = alloca %struct.nullinit, align
704 // CHECK-NEXT:  call void @{{.*}}nullinit{{.*}}%uninit)
705 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%uninit)
706 
707 TEST_BRACES(nullinit, nullinit);
708 // CHECK-LABEL: @test_nullinit_braces()
709 // CHECK:       %braces = alloca %struct.nullinit, align [[ALIGN:[0-9]*]]
710 // CHECK-NEXT:  %[[N:[^ ]*]] = getelementptr inbounds %struct.nullinit, %struct.nullinit* %braces, i32 0, i32 0
711 // CHECK-NEXT:  store i8* null, i8** %[[N]], align [[ALIGN]]
712 // CHECK-NOT:   !annotation
713 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%braces)
714 
715 TEST_CUSTOM(nullinit, nullinit, { (char*)"derp" });
716 // CHECK-LABEL: @test_nullinit_custom()
717 // CHECK:       %custom = alloca %struct.nullinit, align [[ALIGN:[0-9]*]]
718 // CHECK-NEXT:  %[[N:[^ ]*]] = getelementptr inbounds %struct.nullinit, %struct.nullinit* %custom, i32 0, i32 0
719 // CHECK-NEXT:  store i8* getelementptr inbounds {{.*}}, i8** %[[N]], align [[ALIGN]]
720 // CHECK-NOT:   !annotation
721 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%custom)
722 
723 TEST_UNINIT(padded, padded);
724 // CHECK-LABEL: @test_padded_uninit()
725 // CHECK:       %uninit = alloca %struct.padded, align
726 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%uninit)
727 // PATTERN-LABEL: @test_padded_uninit()
728 // PATTERN-O0: call void @llvm.memcpy{{.*}} @__const.test_padded_uninit.uninit{{.+}}), !annotation [[AUTO_INIT]]
729 // PATTERN-O1: store i64 [[I64]], i64* %uninit, align 8
730 // FIXME: !annotation dropped by optimizations
731 // PATTERN-O1-NOT: !annotation
732 // ZERO-LABEL: @test_padded_uninit()
733 // ZERO-O0: call void @llvm.memset{{.*}}, i8 0,{{.+}})
734 // ZERO-O1: store i64 0, i64* %uninit, align 8
735 // FIXME: !annotation dropped by optimizations
736 // ZERO-O1-NOT: !annotation
737 
738 TEST_BRACES(padded, padded);
739 // CHECK-LABEL: @test_padded_braces()
740 // CHECK:       %braces = alloca %struct.padded, align [[ALIGN:[0-9]*]]
741 // CHECK-NEXT:  bitcast
742 // CHECK-NEXT:  call void @llvm.memset{{.*}}(i8* align [[ALIGN]] %{{.*}}, i8 0, i64 8, i1 false)
743 // CHECK-NOT:   !annotation
744 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%braces)
745 
746 TEST_CUSTOM(padded, padded, { 42, 13371337 });
747 // CHECK-LABEL: @test_padded_custom()
748 // CHECK:       %custom = alloca %struct.padded, align
749 // CHECK-NEXT:  bitcast
750 // CHECK-NEXT:  call void @llvm.memcpy
751 // CHECK-NOT:   !annotation
752 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%custom)
753 
754 TEST_UNINIT(paddednullinit, paddednullinit);
755 // CHECK-LABEL: @test_paddednullinit_uninit()
756 // CHECK:       %uninit = alloca %struct.paddednullinit, align
757 // CHECK-NEXT:  call void @{{.*}}paddednullinit{{.*}}%uninit)
758 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%uninit)
759 // PATTERN-LABEL: @test_paddednullinit_uninit()
760 // PATTERN-O0: call void @llvm.memcpy{{.*}} @__const.test_paddednullinit_uninit.uninit{{.+}}), !annotation [[AUTO_INIT]]
761 // PATTERN-O1-LEGACY: store i64 [[I64]], i64* %uninit, align 8
762 // PATTERN-O1-NEWPM: store i64 [[I64]], i64* %uninit, align 8
763 // FIXME: !annotation dropped by optimizations
764 // PATTERN-O1-NOT: !annotation
765 // ZERO-LABEL: @test_paddednullinit_uninit()
766 // ZERO-O0: call void @llvm.memset{{.*}}, i8 0,
767 // ZERO-O1: store i64 0, i64* %uninit, align 8
768 // FIXME: !annotation dropped by optimizations
769 // ZERO-O1-NOT: !annotation
770 
771 TEST_BRACES(paddednullinit, paddednullinit);
772 // CHECK-LABEL: @test_paddednullinit_braces()
773 // CHECK:       %braces = alloca %struct.paddednullinit, align [[ALIGN:[0-9]*]]
774 // CHECK-NEXT:  %[[C:[^ ]*]] = getelementptr inbounds %struct.paddednullinit, %struct.paddednullinit* %braces, i32 0, i32 0
775 // CHECK-NEXT:  store i8 0, i8* %[[C]], align [[ALIGN]]
776 // CHECK-NOT:   !annotation
777 // CHECK-NEXT:  %[[I:[^ ]*]] = getelementptr inbounds %struct.paddednullinit, %struct.paddednullinit* %braces, i32 0, i32 1
778 // CHECK-NEXT:  store i32 0, i32* %[[I]], align [[ALIGN]]
779 // CHECK-NOT:   !annotation
780 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%braces)
781 
782 TEST_CUSTOM(paddednullinit, paddednullinit, { 42, 13371337 });
783 // CHECK-LABEL: @test_paddednullinit_custom()
784 // CHECK:       %custom = alloca %struct.paddednullinit, align [[ALIGN:[0-9]*]]
785 // CHECK-NEXT:  %[[C:[^ ]*]] = getelementptr inbounds %struct.paddednullinit, %struct.paddednullinit* %custom, i32 0, i32 0
786 // CHECK-NEXT:  store i8 42, i8* %[[C]], align [[ALIGN]]
787 // CHECK-NOT:   !annotation
788 // CHECK-NEXT:  %[[I:[^ ]*]] = getelementptr inbounds %struct.paddednullinit, %struct.paddednullinit* %custom, i32 0, i32 1
789 // CHECK-NEXT:  store i32 13371337, i32* %[[I]], align [[ALIGN]]
790 // CHECK-NOT:   !annotation
791 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%custom)
792 
793 TEST_UNINIT(paddedpacked, paddedpacked);
794 // CHECK-LABEL: @test_paddedpacked_uninit()
795 // CHECK:       %uninit = alloca %struct.paddedpacked, align
796 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%uninit)
797 // PATTERN-LABEL: @test_paddedpacked_uninit()
798 // PATTERN-O0: call void @llvm.memcpy{{.*}} @__const.test_paddedpacked_uninit.uninit{{.+}}), !annotation [[AUTO_INIT]]
799 // PATTERN-O1:  %[[C:[^ ]*]] = getelementptr inbounds {{.*}}%uninit, i64 0, i32 0
800 // PATTERN-O1:  store i8 [[I8]], i8* %[[C]], align {{.+}}, !annotation [[AUTO_INIT]]
801 // PATTERN-O1:  %[[I:[^ ]*]] = getelementptr inbounds {{.*}}%uninit, i64 0, i32 1
802 // PATTERN-O1: store i32 [[I32]], i32* %[[I]], align {{.+}}, !annotation [[AUTO_INIT]]
803 
804 // ZERO-LABEL: @test_paddedpacked_uninit()
805 // ZERO: call void @llvm.memset{{.*}}, i8 0,{{.+}}), !annotation [[AUTO_INIT]]
806 
807 TEST_BRACES(paddedpacked, paddedpacked);
808 // CHECK-LABEL: @test_paddedpacked_braces()
809 // CHECK:       %braces = alloca %struct.paddedpacked, align [[ALIGN:[0-9]*]]
810 // CHECK-NEXT:  bitcast
811 // CHECK-NEXT:  call void @llvm.memset{{.*}}(i8* align [[ALIGN]] %{{.*}}, i8 0, i64 5, i1 false)
812 // CHECK-NOT:   !annotation
813 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%braces)
814 
815 TEST_CUSTOM(paddedpacked, paddedpacked, { 42, 13371337 });
816 // CHECK-LABEL: @test_paddedpacked_custom()
817 // CHECK:       %custom = alloca %struct.paddedpacked, align
818 // CHECK-NEXT:  bitcast
819 // CHECK-NEXT:  call void @llvm.memcpy{{.*}}({{.*}}@__const.test_paddedpacked_custom.custom
820 // CHECK-NOT:   !annotation
821 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%custom)
822 
823 TEST_UNINIT(paddedpackedarray, paddedpackedarray);
824 // CHECK-LABEL: @test_paddedpackedarray_uninit()
825 // CHECK:       %uninit = alloca %struct.paddedpackedarray, align
826 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%uninit)
827 // PATTERN-LABEL: @test_paddedpackedarray_uninit()
828 // PATTERN-O0: call void @llvm.memcpy{{.*}} @__const.test_paddedpackedarray_uninit.uninit{{.+}}), !annotation [[AUTO_INIT]]
829 // PATTERN-O1: getelementptr
830 // PATTERN-O1: call void @llvm.memset{{.*}}({{.*}}i8 [[I8]], i64 10
831 // FIXME: !annotation dropped by optimizations
832 // PATTERN-O1-NOT: !annotation
833 // ZERO-LABEL: @test_paddedpackedarray_uninit()
834 // ZERO: call void @llvm.memset{{.*}}, i8 0,{{.+}}), !annotation [[AUTO_INIT]]
835 
836 TEST_BRACES(paddedpackedarray, paddedpackedarray);
837 // CHECK-LABEL: @test_paddedpackedarray_braces()
838 // CHECK:       %braces = alloca %struct.paddedpackedarray, align [[ALIGN:[0-9]*]]
839 // CHECK-NEXT:  bitcast
840 // CHECK-NEXT:  call void @llvm.memset{{.*}}(i8* align [[ALIGN]] %{{.*}}, i8 0, i64 10, i1 false)
841 // CHECK-NOT:   !annotation
842 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%braces)
843 
844 TEST_CUSTOM(paddedpackedarray, paddedpackedarray, { {{ 42, 13371337 }, { 43, 13371338 }} });
845 // CHECK-LABEL: @test_paddedpackedarray_custom()
846 // CHECK:       %custom = alloca %struct.paddedpackedarray, align
847 // CHECK-NEXT:  bitcast
848 // CHECK-NEXT:  call void @llvm.memcpy{{.*}}({{.*}}@__const.test_paddedpackedarray_custom.custom
849 // CHECK-NOT:   !annotation
850 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%custom)
851 
852 TEST_UNINIT(unpackedinpacked, unpackedinpacked);
853 // PATTERN-LABEL: @test_unpackedinpacked_uninit()
854 // PATTERN-O0: call void @llvm.memcpy{{.*}} 9, i1 false), !annotation [[AUTO_INIT]]
855 
856 TEST_UNINIT(paddednested, paddednested);
857 // CHECK-LABEL: @test_paddednested_uninit()
858 // CHECK:       %uninit = alloca %struct.paddednested, align
859 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%uninit)
860 // PATTERN-LABEL: @test_paddednested_uninit()
861 // PATTERN-O0: call void @llvm.memcpy{{.*}} @__const.test_paddednested_uninit.uninit{{.+}}), !annotation [[AUTO_INIT]]
862 // PATTERN-O1: getelementptr
863 // PATTERN-O1: call void @llvm.memset{{.*}}({{.*}}, i8 [[I8]], i64 16{{.+}})
864 // FIXME: !annotation dropped by optimizations
865 // PATTERN-O1-NOT: !annotation
866 // ZERO-LABEL: @test_paddednested_uninit()
867 // ZERO: call void @llvm.memset{{.*}}, i8 0,{{.+}}), !annotation [[AUTO_INIT]]
868 
869 TEST_BRACES(paddednested, paddednested);
870 // CHECK-LABEL: @test_paddednested_braces()
871 // CHECK:       %braces = alloca %struct.paddednested, align [[ALIGN:[0-9]*]]
872 // CHECK-NEXT:  bitcast
873 // CHECK-NEXT:  call void @llvm.memset{{.*}}(i8* align [[ALIGN]] %{{.*}}, i8 0, i64 16, i1 false)
874 // CHECK-NOT:   !annotation
875 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%braces)
876 
877 TEST_CUSTOM(paddednested, paddednested, { { 42, 13371337 }, { 43, 13371338 } });
878 // CHECK-LABEL: @test_paddednested_custom()
879 // CHECK:       %custom = alloca %struct.paddednested, align
880 // CHECK-NEXT:  bitcast
881 // CHECK-NEXT:  call void @llvm.memcpy{{.*}}({{.*}}@__const.test_paddednested_custom.custom
882 // CHECK-NOT:   !annotation
883 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%custom)
884 
885 TEST_UNINIT(paddedpackednested, paddedpackednested);
886 // CHECK-LABEL: @test_paddedpackednested_uninit()
887 // CHECK:       %uninit = alloca %struct.paddedpackednested, align
888 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%uninit)
889 // PATTERN-LABEL: @test_paddedpackednested_uninit()
890 // PATTERN-O0: call void @llvm.memcpy{{.*}} @__const.test_paddedpackednested_uninit.uninit{{.+}}), !annotation [[AUTO_INIT]]
891 // PATTERN-O1: getelementptr
892 // PATTERN-O1: call void @llvm.memset.p0i8.i64(i8* nonnull align 1 dereferenceable(10) %0, i8 [[I8]], i64 10, i1 false)
893 // FIXME: !annotation dropped by optimizations
894 // PATTERN-O1-NOT: !annotation
895 // ZERO-LABEL: @test_paddedpackednested_uninit()
896 // ZERO: call void @llvm.memset{{.*}}, i8 0, {{.+}}), !annotation [[AUTO_INIT]]
897 
898 TEST_BRACES(paddedpackednested, paddedpackednested);
899 // CHECK-LABEL: @test_paddedpackednested_braces()
900 // CHECK:       %braces = alloca %struct.paddedpackednested, align [[ALIGN:[0-9]*]]
901 // CHECK-NEXT:  bitcast
902 // CHECK-NEXT:  call void @llvm.memset{{.*}}(i8* align [[ALIGN]] %{{.*}}, i8 0, i64 10, i1 false)
903 // CHECK-NOT:   !annotation
904 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%braces)
905 
906 TEST_CUSTOM(paddedpackednested, paddedpackednested, { { 42, 13371337 }, { 43, 13371338 } });
907 // CHECK-LABEL: @test_paddedpackednested_custom()
908 // CHECK:       %custom = alloca %struct.paddedpackednested, align
909 // CHECK-NEXT:  bitcast
910 // CHECK-NEXT:  call void @llvm.memcpy{{.*}}({{.*}}@__const.test_paddedpackednested_custom.custom
911 // CHECK-NOT:   !annotation
912 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%custom)
913 
914 TEST_UNINIT(bitfield, bitfield);
915 // CHECK-LABEL: @test_bitfield_uninit()
916 // CHECK:       %uninit = alloca %struct.bitfield, align
917 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%uninit)
918 // PATTERN-LABEL: @test_bitfield_uninit()
919 // PATTERN-O0: call void @llvm.memcpy{{.*}} @__const.test_bitfield_uninit.uninit{{.+}}), !annotation [[AUTO_INIT]]
920 // PATTERN-O1: store i32 [[I32]], i32* %uninit, align 4
921 // FIXME: !annotation dropped by optimizations
922 // PATTERN-O1-NOT: !annotation
923 // ZERO-LABEL: @test_bitfield_uninit()
924 // ZERO-O0: call void @llvm.memset{{.*}}, i8 0{{.+}}), !annotation [[AUTO_INIT]]
925 // ZERO-O1: store i32 0, i32* %uninit, align 4
926 // FIXME: !annotation dropped by optimizations
927 // ZERO-O1-NOT: !annotation
928 
929 TEST_BRACES(bitfield, bitfield);
930 // CHECK-LABEL: @test_bitfield_braces()
931 // CHECK:       %braces = alloca %struct.bitfield, align
932 // CHECK-NEXT:  bitcast
933 // CHECK-NEXT:  call void @llvm.memcpy
934 // CHECK-NOT:   !annotation
935 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%braces)
936 
937 TEST_CUSTOM(bitfield, bitfield, { 4, 1 });
938 // CHECK-LABEL: @test_bitfield_custom()
939 // CHECK:       %custom = alloca %struct.bitfield, align
940 // CHECK-NEXT:  bitcast
941 // CHECK-NEXT:  call void @llvm.memcpy
942 // CHECK-NOT:   !annotation
943 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%custom)
944 
945 TEST_UNINIT(bitfieldaligned, bitfieldaligned);
946 // CHECK-LABEL: @test_bitfieldaligned_uninit()
947 // CHECK:       %uninit = alloca %struct.bitfieldaligned, align
948 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%uninit)
949 // PATTERN-LABEL: @test_bitfieldaligned_uninit()
950 // PATTERN-O0: call void @llvm.memcpy{{.*}} @__const.test_bitfieldaligned_uninit.uninit{{.+}}), !annotation [[AUTO_INIT]]
951 // PATTERN-O1: store i64 [[IPTR]], i64* %uninit, align 8
952 // FIXME: !annotation dropped by optimizations
953 // PATTERN-O1-NOT: !annotation
954 // ZERO-LABEL: @test_bitfieldaligned_uninit()
955 // ZERO-O0: call void @llvm.memset{{.*}}, i8 0,{{.+}}), !annotation [[AUTO_INIT]]
956 // ZERO-O1: store i64 0, i64* %uninit, align 8
957 // FIXME: !annotation dropped by optimizations
958 // ZERO-O1-NOT: !annotation
959 
960 TEST_BRACES(bitfieldaligned, bitfieldaligned);
961 // CHECK-LABEL: @test_bitfieldaligned_braces()
962 // CHECK:       %braces = alloca %struct.bitfieldaligned, align
963 // CHECK-NEXT:  bitcast
964 // CHECK-NEXT:  call void @llvm.memcpy
965 // CHECK-NOT:   !annotation
966 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%braces)
967 
968 TEST_CUSTOM(bitfieldaligned, bitfieldaligned, { 4, 1  });
969 // CHECK-LABEL: @test_bitfieldaligned_custom()
970 // CHECK:       %custom = alloca %struct.bitfieldaligned, align
971 // CHECK-NEXT:  bitcast
972 // CHECK-NEXT:  call void @llvm.memcpy
973 // CHECK-NOT:   !annotation
974 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%custom)
975 
976 TEST_UNINIT(big, big);
977 // CHECK-LABEL: @test_big_uninit()
978 // CHECK:       %uninit = alloca %struct.big, align
979 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%uninit)
980 // PATTERN-LABEL: @test_big_uninit()
981 // PATTERN: call void @llvm.memset{{.*}}, i8 [[I8]],{{.+}}), !annotation [[AUTO_INIT]]
982 // ZERO-LABEL: @test_big_uninit()
983 // ZERO: call void @llvm.memset{{.*}}, i8 0,{{.+}}), !annotation [[AUTO_INIT]]
984 
985 TEST_BRACES(big, big);
986 // CHECK-LABEL: @test_big_braces()
987 // CHECK:       %braces = alloca %struct.big, align [[ALIGN:[0-9]*]]
988 // CHECK-NEXT:  bitcast
989 // CHECK-NEXT:  call void @llvm.memset{{.*}}(i8* align [[ALIGN]] %{{.*}}, i8 0, i64 104, i1 false)
990 // CHECK-NOT:   !annotation
991 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%braces)
992 
993 TEST_CUSTOM(big, big, { 0xAAAAAAAA, 0xAAAAAAAA, 0xAAAAAAAA, 0xAAAAAAAA, 0xAAAAAAAA, 0xAAAAAAAA, 0xAAAAAAAA, 0xAAAAAAAA, 0xAAAAAAAA, 0xAAAAAAAA, 0xAAAAAAAA, 0xAAAAAAAA, 0xAAAAAAAA, 0xAAAAAAAA, 0xAAAAAAAA, 0xAAAAAAAA, 0xAAAAAAAA, 0xAAAAAAAA, 0xAAAAAAAA, 0xAAAAAAAA, 0xAAAAAAAA, 0xAAAAAAAA, 0xAAAAAAAA, 0xAAAAAAAA, 0xAAAAAAAA, 0xAAAAAAAA });
994 // CHECK-LABEL: @test_big_custom()
995 // CHECK:       %custom = alloca %struct.big, align [[ALIGN:[0-9]*]]
996 // CHECK-NEXT:  bitcast
997 // CHECK-NEXT:  call void @llvm.memset{{.*}}(i8* align [[ALIGN]] %{{.*}}, i8 -86, i64 104, i1 false)
998 // CHECK-NOT:   !annotation
999 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%custom)
1000 
1001 TEST_UNINIT(arraytail, arraytail);
1002 // CHECK-LABEL: @test_arraytail_uninit()
1003 // CHECK:       %uninit = alloca %struct.arraytail, align
1004 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%uninit)
1005 // PATTERN-LABEL: @test_arraytail_uninit()
1006 // PATTERN-O0: call void @llvm.memcpy{{.*}} @__const.test_arraytail_uninit.uninit{{.+}}), !annotation [[AUTO_INIT]]
1007 // PATTERN-O1: store i32 [[I32]], {{.*}} align 4, !annotation [[AUTO_INIT]]
1008 // ZERO-LABEL: @test_arraytail_uninit()
1009 // ZERO-O0: call void @llvm.memset{{.*}}, i8 0,{{.+}}), !annotation [[AUTO_INIT]]
1010 // ZERO-O1: store i32 0, {{.*}} align 4
1011 // FIXME: !annotation dropped by optimizations
1012 // ZERO-O1-NOT: !annotation
1013 
1014 TEST_BRACES(arraytail, arraytail);
1015 // CHECK-LABEL: @test_arraytail_braces()
1016 // CHECK:       %braces = alloca %struct.arraytail, align [[ALIGN:[0-9]*]]
1017 // CHECK-NEXT:  bitcast
1018 // CHECK-NEXT:  call void @llvm.memset{{.*}}(i8* align [[ALIGN]] %{{.*}}, i8 0, i64 4, i1 false)
1019 // CHECK-NOT:   !annotation
1020 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%braces)
1021 
1022 TEST_CUSTOM(arraytail, arraytail, { 0xdead });
1023 // CHECK-LABEL: @test_arraytail_custom()
1024 // CHECK:       %custom = alloca %struct.arraytail, align
1025 // CHECK-NEXT:  bitcast
1026 // CHECK-NEXT:  call void @llvm.memcpy
1027 // CHECK-NOT:   !annotation
1028 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%custom)
1029 
1030 TEST_UNINIT(int0, int[0]);
1031 // CHECK-LABEL: @test_int0_uninit()
1032 // CHECK:       %uninit = alloca [0 x i32], align
1033 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%uninit)
1034 // PATTERN-LABEL: @test_int0_uninit()
1035 // PATTERN:       %uninit = alloca [0 x i32], align
1036 // PATTERN-O0-NEXT:  call void @{{.*}}used{{.*}}%uninit)
1037 // ZERO-LABEL: @test_int0_uninit()
1038 // ZERO:       %uninit = alloca [0 x i32], align
1039 // ZERO-O0-NEXT:  call void @{{.*}}used{{.*}}%uninit)
1040 
1041 TEST_BRACES(int0, int[0]);
1042 // CHECK-LABEL: @test_int0_braces()
1043 // CHECK:       %braces = alloca [0 x i32], align [[ALIGN:[0-9]*]]
1044 // CHECK-NEXT:  bitcast
1045 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%braces)
1046 
1047 TEST_UNINIT(int1, int[1]);
1048 // CHECK-LABEL: @test_int1_uninit()
1049 // CHECK:       %uninit = alloca [1 x i32], align [[ALIGN:[0-9]*]]
1050 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%uninit)
1051 // PATTERN-LABEL: @test_int1_uninit()
1052 // PATTERN-O0: call void @llvm.memcpy{{.*}} @__const.test_int1_uninit.uninit{{.+}}), !annotation [[AUTO_INIT]]
1053 // PATTERN-O1: store i32 [[I32]], {{.*}} align 4, !annotation [[AUTO_INIT]]
1054 // ZERO-LABEL: @test_int1_uninit()
1055 // ZERO-O0: call void @llvm.memset{{.*}}, i8 0,{{.+}}), !annotation [[AUTO_INIT]]
1056 // ZERO-O1: store i32 0, {{.*}} align 4
1057 // FIXME: !annotation dropped by optimizations
1058 // ZERO-O1-NOT: !annotation
1059 
1060 TEST_BRACES(int1, int[1]);
1061 // CHECK-LABEL: @test_int1_braces()
1062 // CHECK:       %braces = alloca [1 x i32], align [[ALIGN:[0-9]*]]
1063 // CHECK-NEXT:  bitcast
1064 // CHECK-NEXT:  call void @llvm.memset{{.*}}(i8* align [[ALIGN]] %{{.*}}, i8 0, i64 4, i1 false)
1065 // CHECK-NOT:   !annotation
1066 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%braces)
1067 
1068 TEST_CUSTOM(int1, int[1], { 0x33333333 });
1069 // CHECK-LABEL: @test_int1_custom()
1070 // CHECK:       %custom = alloca [1 x i32], align
1071 // CHECK-NEXT:  bitcast
1072 // CHECK-NEXT:  call void @llvm.memcpy
1073 // CHECK-NOT:   !annotation
1074 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%custom)
1075 
1076 TEST_UNINIT(int64, int[64]);
1077 // CHECK-LABEL: @test_int64_uninit()
1078 // CHECK:       %uninit = alloca [64 x i32], align
1079 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%uninit)
1080 // PATTERN-LABEL: @test_int64_uninit()
1081 // PATTERN: call void @llvm.memset{{.*}}, i8 [[I8]],{{.+}}), !annotation [[AUTO_INIT]]
1082 // ZERO-LABEL: @test_int64_uninit()
1083 // ZERO: call void @llvm.memset{{.*}}, i8 0,{{.+}}), !annotation [[AUTO_INIT]]
1084 
1085 TEST_BRACES(int64, int[64]);
1086 // CHECK-LABEL: @test_int64_braces()
1087 // CHECK:       %braces = alloca [64 x i32], align [[ALIGN:[0-9]*]]
1088 // CHECK-NEXT:  bitcast
1089 // CHECK-NEXT:  call void @llvm.memset{{.*}}(i8* align [[ALIGN]] %{{.*}}, i8 0, i64 256, i1 false)
1090 // CHECK-NOT:   !annotation
1091 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%braces)
1092 
1093 TEST_CUSTOM(int64, int[64], = { 0x11111111, 0x11111111, 0x11111111, 0x11111111, 0x11111111, 0x11111111, 0x11111111, 0x11111111, 0x11111111, 0x11111111, 0x11111111, 0x11111111, 0x11111111, 0x11111111, 0x11111111, 0x11111111, 0x11111111, 0x11111111, 0x11111111, 0x11111111, 0x11111111, 0x11111111, 0x11111111, 0x11111111, 0x11111111, 0x11111111, 0x11111111, 0x11111111, 0x11111111, 0x11111111, 0x11111111, 0x11111111, 0x11111111, 0x11111111, 0x11111111, 0x11111111, 0x11111111, 0x11111111, 0x11111111, 0x11111111, 0x11111111, 0x11111111, 0x11111111, 0x11111111, 0x11111111, 0x11111111, 0x11111111, 0x11111111, 0x11111111, 0x11111111, 0x11111111, 0x11111111, 0x11111111, 0x11111111, 0x11111111, 0x11111111, 0x11111111, 0x11111111, 0x11111111, 0x11111111, 0x11111111, 0x11111111, 0x11111111, 0x11111111 });
1094 // CHECK-LABEL: @test_int64_custom()
1095 // CHECK:       %custom = alloca [64 x i32], align [[ALIGN:[0-9]*]]
1096 // CHECK-NEXT:  bitcast
1097 // CHECK-NEXT:  call void @llvm.memset{{.*}}(i8* align [[ALIGN]] %{{.*}}, i8 17, i64 256, i1 false)
1098 // CHECK-NOT:   !annotation
1099 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%custom)
1100 
1101 TEST_UNINIT(bool4, bool[4]);
1102 // CHECK-LABEL: @test_bool4_uninit()
1103 // CHECK:       %uninit = alloca [4 x i8], align
1104 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%uninit)
1105 // PATTERN-LABEL: @test_bool4_uninit()
1106 // PATTERN-O0: call void @llvm.memcpy{{.*}} @__const.test_bool4_uninit.uninit{{.+}}), !annotation [[AUTO_INIT]]
1107 // PATTERN-O1: store i32 [[I32]], i32* %uninit, align 4
1108 // FIXME: !annotation dropped by optimizations
1109 // PATTERN-O1-NOT: !annotation
1110 // ZERO-LABEL: @test_bool4_uninit()
1111 // ZERO-O0: call void @llvm.memset{{.*}}, i8 0,{{.+}}), !annotation [[AUTO_INIT]]
1112 // ZERO-O1: store i32 0, i32* %uninit, align 4
1113 // FIXME: !annotation dropped by optimizations
1114 // ZERO-O1-NOT: !annotation
1115 
1116 TEST_BRACES(bool4, bool[4]);
1117 // CHECK-LABEL: @test_bool4_braces()
1118 // CHECK:       %braces = alloca [4 x i8], align [[ALIGN:[0-9]*]]
1119 // CHECK-NEXT:  bitcast
1120 // CHECK-NEXT:  call void @llvm.memset{{.*}}(i8* align [[ALIGN]] %{{.*}}, i8 0, i64 4, i1 false)
1121 // CHECK-NOT:   !annotation
1122 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%braces)
1123 
1124 TEST_CUSTOM(bool4, bool[4], { true, true, true, true });
1125 // CHECK-LABEL: @test_bool4_custom()
1126 // CHECK:       %custom = alloca [4 x i8], align
1127 // CHECK-NEXT:  bitcast
1128 // CHECK-NEXT:  call void @llvm.memcpy
1129 // CHECK-NOT:   !annotation
1130 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%custom)
1131 
1132 TEST_UNINIT(intptr4, int*[4]);
1133 // CHECK-LABEL:      @test_intptr4_uninit()
1134 // CHECK:            %uninit = alloca [4 x i32*], align
1135 // CHECK-NEXT:       call void @{{.*}}used{{.*}}%uninit)
1136 // PATTERN-O1-LABEL: @test_intptr4_uninit()
1137 // PATTERN-O1:  call void @llvm.memset.p0i8.i64(i8* nonnull align 16  dereferenceable(32) %{{[0-9*]}}, i8 -86, i64 32, i1 false)
1138 // FIXME: !annotation dropped by optimizations
1139 // PATTERN-O1-NOT: !annotation
1140 // ZERO-LABEL:       @test_intptr4_uninit()
1141 // ZERO:             call void @llvm.memset{{.*}}, i8 0,{{.+}}), !annotation [[AUTO_INIT]]
1142 
1143 TEST_BRACES(intptr4, int*[4]);
1144 // CHECK-LABEL: @test_intptr4_braces()
1145 // CHECK:       %braces = alloca [4 x i32*], align [[ALIGN:[0-9]*]]
1146 // CHECK-NEXT:  bitcast
1147 // CHECK-NEXT:  call void @llvm.memset{{.*}}(i8* align [[ALIGN]] %{{.*}}, i8 0, i64 32, i1 false)
1148 // CHECK-NOT:   !annotation
1149 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%braces)
1150 
1151 TEST_CUSTOM(intptr4, int *[4], = {(int *)0x22222222, (int *)0x22222222, (int *)0x22222222, (int *)0x22222222});
1152 // CHECK-LABEL: @test_intptr4_custom()
1153 // CHECK:       %custom = alloca [4 x i32*], align
1154 // CHECK-NEXT:  bitcast
1155 // CHECK-NEXT:  call void @llvm.memcpy
1156 // CHECK-NOT:   !annotation
1157 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%custom)
1158 
1159 TEST_UNINIT(tailpad4, tailpad[4]);
1160 // CHECK-LABEL: @test_tailpad4_uninit()
1161 // CHECK:       %uninit = alloca [4 x %struct.tailpad], align
1162 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%uninit)
1163 // PATTERN-LABEL: @test_tailpad4_uninit()
1164 // PATTERN-O0: call void @llvm.memcpy{{.*}} @__const.test_tailpad4_uninit.uninit{{.+}}), !annotation [[AUTO_INIT]]
1165 // PATTERN-O1: bitcast
1166 // PATTERN-O1: call void @llvm.memset{{.*}}({{.*}}0, i8 [[I8]], i64 16{{.+}})
1167 // FIXME: !annotation dropped by optimizations
1168 // PATTERN-O1-NOT: !annotation
1169 // ZERO-LABEL: @test_tailpad4_uninit()
1170 // ZERO: call void @llvm.memset{{.*}}, i8 0,{{.+}}), !annotation [[AUTO_INIT]]
1171 
1172 TEST_BRACES(tailpad4, tailpad[4]);
1173 // CHECK-LABEL: @test_tailpad4_braces()
1174 // CHECK:       %braces = alloca [4 x %struct.tailpad], align [[ALIGN:[0-9]*]]
1175 // CHECK-NEXT:  bitcast
1176 // CHECK-NEXT:  call void @llvm.memset{{.*}}(i8* align [[ALIGN]] %{{.*}}, i8 0, i64 16, i1 false)
1177 // CHECK-NOT:   !annotation
1178 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%braces)
1179 
1180 TEST_CUSTOM(tailpad4, tailpad[4], { {257, 1}, {257, 1}, {257, 1}, {257, 1} });
1181 // CHECK-LABEL: @test_tailpad4_custom()
1182 // CHECK:       %custom = alloca [4 x %struct.tailpad], align
1183 // CHECK-NEXT:  bitcast
1184 // CHECK-NEXT:  call void @llvm.memcpy
1185 // CHECK-NOT:   !annotation
1186 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%custom)
1187 
1188 TEST_UNINIT(tailpad9, tailpad[9]);
1189 // CHECK-LABEL: @test_tailpad9_uninit()
1190 // CHECK:       %uninit = alloca [9 x %struct.tailpad], align
1191 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%uninit)
1192 // PATTERN-LABEL: @test_tailpad9_uninit()
1193 // PATTERN-O0: call void @llvm.memset{{.*}}, i8 [[I8]],{{.+}}), !annotation [[AUTO_INIT]]
1194 // ZERO-LABEL: @test_tailpad9_uninit()
1195 // ZERO: call void @llvm.memset{{.*}}, i8 0,{{.+}}), !annotation [[AUTO_INIT]]
1196 
1197 TEST_BRACES(tailpad9, tailpad[9]);
1198 // CHECK-LABEL: @test_tailpad9_braces()
1199 // CHECK:       %braces = alloca [9 x %struct.tailpad], align [[ALIGN:[0-9]*]]
1200 // CHECK-NEXT:  bitcast
1201 // CHECK-NEXT:  call void @llvm.memset{{.*}}(i8* align [[ALIGN]] %{{.*}}, i8 0, i64 36, i1 false)
1202 // CHECK-NOT:   !annotation
1203 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%braces)
1204 
1205 TEST_CUSTOM(tailpad9, tailpad[9], { {257, 1}, {257, 1}, {257, 1}, {257, 1}, {257, 1}, {257, 1}, {257, 1}, {257, 1}, {257, 1} });
1206 // CHECK-LABEL: @test_tailpad9_custom()
1207 // CHECK:       %custom = alloca [9 x %struct.tailpad], align [[ALIGN:[0-9]*]]
1208 // CHECK-NEXT:  bitcast
1209 // CHECK-NEXT:  call void @llvm.memset{{.*}}(i8* align [[ALIGN]] %{{.*}}, i8 1, i64 36, i1 false)
1210 // CHECK-NOT:   !annotation
1211 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%custom)
1212 
1213 TEST_UNINIT(atomicbool, _Atomic(bool));
1214 // CHECK-LABEL: @test_atomicbool_uninit()
1215 // CHECK:       %uninit = alloca i8, align
1216 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%uninit)
1217 // PATTERN-LABEL: @test_atomicbool_uninit()
1218 // PATTERN: store i8 [[I8]], i8* %uninit, align 1, !annotation [[AUTO_INIT]]
1219 // ZERO-LABEL: @test_atomicbool_uninit()
1220 // ZERO: store i8 0, i8* %uninit, align 1, !annotation [[AUTO_INIT]]
1221 
1222 TEST_UNINIT(atomicint, _Atomic(int));
1223 // CHECK-LABEL: @test_atomicint_uninit()
1224 // CHECK:       %uninit = alloca i32, align
1225 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%uninit)
1226 // PATTERN-LABEL: @test_atomicint_uninit()
1227 // PATTERN: store i32 [[I32]], i32* %uninit, align 4, !annotation [[AUTO_INIT]]
1228 // ZERO-LABEL: @test_atomicint_uninit()
1229 // ZERO: store i32 0, i32* %uninit, align 4, !annotation [[AUTO_INIT]]
1230 
1231 TEST_UNINIT(atomicdouble, _Atomic(double));
1232 // CHECK-LABEL: @test_atomicdouble_uninit()
1233 // CHECK:       %uninit = alloca double, align
1234 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%uninit)
1235 // PATTERN-LABEL: @test_atomicdouble_uninit()
1236 // PATTERN: store double 0xFFFFFFFFFFFFFFFF, double* %uninit, align 8, !annotation [[AUTO_INIT]]
1237 // ZERO-LABEL: @test_atomicdouble_uninit()
1238 // ZERO: store double 0.000000e+00, double* %uninit, align 8, !annotation [[AUTO_INIT]]
1239 
1240 TEST_UNINIT(atomicnotlockfree, _Atomic(notlockfree));
1241 // CHECK-LABEL: @test_atomicnotlockfree_uninit()
1242 // CHECK:       %uninit = alloca %struct.notlockfree, align
1243 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%uninit)
1244 // PATTERN-LABEL: @test_atomicnotlockfree_uninit()
1245 // PATTERN-O0: call void @llvm.memcpy{{.*}} @__const.test_atomicnotlockfree_uninit.uninit{{.+}}), !annotation [[AUTO_INIT]]
1246 // PATTERN-O1: bitcast
1247 // PATTERN-O1: call void @llvm.memset{{.*}}({{.*}}, i8 [[I8]], i64 32
1248 // FIXME: !annotation dropped by optimizations
1249 // PATTERN-O1-NOT: !annotation
1250 // ZERO-LABEL: @test_atomicnotlockfree_uninit()
1251 // ZERO: call void @llvm.memset{{.*}}, i8 0,{{.+}}), !annotation [[AUTO_INIT]]
1252 
1253 TEST_UNINIT(atomicpadded, _Atomic(padded));
1254 // CHECK-LABEL: @test_atomicpadded_uninit()
1255 // CHECK:       %uninit = alloca %struct.padded, align
1256 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%uninit)
1257 // PATTERN-LABEL: @test_atomicpadded_uninit()
1258 // PATTERN-O0: call void @llvm.memcpy{{.*}} @__const.test_atomicpadded_uninit.uninit{{.+}}), !annotation [[AUTO_INIT]]
1259 // PATTERN-O1: store i64 [[IPTR]], i64* %uninit, align 8
1260 // FIXME: !annotation dropped by optimizations
1261 // PATTERN-O1-NOT: !annotation
1262 // ZERO-LABEL: @test_atomicpadded_uninit()
1263 // ZERO-O0: call void @llvm.memset{{.*}}, i8 0, {{.+}}), !annotation [[AUTO_INIT]]
1264 // ZERO-O1: store i64 0, i64* %uninit, align 8
1265 // FIXME: !annotation dropped by optimizations
1266 // ZERO-O1-NOT: !annotation
1267 
1268 TEST_UNINIT(atomictailpad, _Atomic(tailpad));
1269 // CHECK-LABEL: @test_atomictailpad_uninit()
1270 // CHECK:       %uninit = alloca %struct.tailpad, align
1271 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%uninit)
1272 // PATTERN-LABEL: @test_atomictailpad_uninit()
1273 // PATTERN-O0: call void @llvm.memcpy{{.*}} @__const.test_atomictailpad_uninit.uninit{{.+}}), !annotation [[AUTO_INIT]]
1274 // ZERO-LABEL: @test_atomictailpad_uninit()
1275 // ZERO-O0: call void @llvm.memset{{.*}}, i8 0,{{.+}}), !annotation [[AUTO_INIT]]
1276 // ZERO-O1: store i32 0, i32* %uninit, align 4
1277 // FIXME: !annotation dropped by optimizations
1278 // ZERO-O1-NOT: !annotation
1279 
1280 TEST_UNINIT(complexfloat, _Complex float);
1281 // CHECK-LABEL: @test_complexfloat_uninit()
1282 // CHECK:       %uninit = alloca { float, float }, align
1283 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%uninit)
1284 // PATTERN-LABEL: @test_complexfloat_uninit()
1285 // PATTERN-O0: call void @llvm.memcpy{{.*}} @__const.test_complexfloat_uninit.uninit{{.+}}), !annotation [[AUTO_INIT]]
1286 // PATTERN-O1:  %[[F1:[^ ]*]] = getelementptr inbounds {{.*}}%uninit, i64 0, i32 0
1287 // PATTERN-O1: store float 0xFFFFFFFFE0000000, float* %[[F1]], align {{.+}}, !annotation [[AUTO_INIT]]
1288 
1289 // PATTERN-O1:  %[[F2:[^ ]*]] = getelementptr inbounds {{.*}}%uninit, i64 0, i32 1
1290 // PATTERN-O1: store float 0xFFFFFFFFE0000000, float* %[[F2]], align {{.+}}, !annotation [[AUTO_INIT]]
1291 
1292 // ZERO-LABEL: @test_complexfloat_uninit()
1293 // ZERO-O0: call void @llvm.memset{{.*}}, i8 0, {{.+}}), !annotation [[AUTO_INIT]]
1294 // ZERO-O1: store i64 0, i64* %uninit, align 8
1295 // FIXME: !annotation dropped by optimizations
1296 // ZERO-O1-NOT: !annotation
1297 
1298 TEST_BRACES(complexfloat, _Complex float);
1299 // CHECK-LABEL: @test_complexfloat_braces()
1300 // CHECK:       %braces = alloca { float, float }, align [[ALIGN:[0-9]*]]
1301 // CHECK-NEXT:  %[[R:[^ ]*]] = getelementptr inbounds { float, float }, { float, float }* %braces, i32 0, i32 0
1302 // CHECK-NEXT:  %[[I:[^ ]*]] = getelementptr inbounds { float, float }, { float, float }* %braces, i32 0, i32 1
1303 // CHECK-NEXT:  store float 0.000000e+00, float* %[[R]], align [[ALIGN]]
1304 // CHECK-NOT:   !annotation
1305 // CHECK-NEXT:  store float 0.000000e+00, float* %[[I]], align [[ALIGN]]
1306 // CHECK-NOT:   !annotation
1307 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%braces)
1308 
1309 TEST_CUSTOM(complexfloat, _Complex float, { 3.1415926535897932384626433, 3.1415926535897932384626433 });
1310 // CHECK-LABEL: @test_complexfloat_custom()
1311 // CHECK:       %custom = alloca { float, float }, align [[ALIGN:[0-9]*]]
1312 // CHECK-NEXT:  %[[R:[^ ]*]] = getelementptr inbounds { float, float }, { float, float }* %custom, i32 0, i32 0
1313 // CHECK-NEXT:  %[[I:[^ ]*]] = getelementptr inbounds { float, float }, { float, float }* %custom, i32 0, i32 1
1314 // CHECK-NEXT:  store float 0x400921FB60000000, float* %[[R]], align [[ALIGN]]
1315 // CHECK-NOT:   !annotation
1316 // CHECK-NEXT:  store float 0x400921FB60000000, float* %[[I]], align [[ALIGN]]
1317 // CHECK-NOT:   !annotation
1318 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%custom)
1319 
1320 TEST_UNINIT(complexdouble, _Complex double);
1321 // CHECK-LABEL: @test_complexdouble_uninit()
1322 // CHECK:       %uninit = alloca { double, double }, align
1323 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%uninit)
1324 // PATTERN-LABEL: @test_complexdouble_uninit()
1325 // PATTERN-O0: call void @llvm.memcpy{{.*}} @__const.test_complexdouble_uninit.uninit{{.+}}), !annotation [[AUTO_INIT]]
1326 // ZERO-LABEL: @test_complexdouble_uninit()
1327 // ZERO: call void @llvm.memset{{.*}}, i8 0,{{.+}}), !annotation [[AUTO_INIT]]
1328 
1329 TEST_BRACES(complexdouble, _Complex double);
1330 // CHECK-LABEL: @test_complexdouble_braces()
1331 // CHECK:       %braces = alloca { double, double }, align [[ALIGN:[0-9]*]]
1332 // CHECK-NEXT:  %[[R:[^ ]*]] = getelementptr inbounds { double, double }, { double, double }* %braces, i32 0, i32 0
1333 // CHECK-NEXT:  %[[I:[^ ]*]] = getelementptr inbounds { double, double }, { double, double }* %braces, i32 0, i32 1
1334 // CHECK-NEXT:  store double 0.000000e+00, double* %[[R]], align [[ALIGN]]
1335 // CHECK-NOT:   !annotation
1336 // CHECK-NEXT:  store double 0.000000e+00, double* %[[I]], align [[ALIGN]]
1337 // CHECK-NOT:   !annotation
1338 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%braces)
1339 
1340 TEST_CUSTOM(complexdouble, _Complex double, { 3.1415926535897932384626433, 3.1415926535897932384626433 });
1341 // CHECK-LABEL: @test_complexdouble_custom()
1342 // CHECK:       %custom = alloca { double, double }, align [[ALIGN:[0-9]*]]
1343 // CHECK-NEXT:  %[[R:[^ ]*]] = getelementptr inbounds { double, double }, { double, double }* %custom, i32 0, i32 0
1344 // CHECK-NEXT:  %[[I:[^ ]*]] = getelementptr inbounds { double, double }, { double, double }* %custom, i32 0, i32 1
1345 // CHECK-NEXT:  store double 0x400921FB54442D18, double* %[[R]], align [[ALIGN]]
1346 // CHECK-NOT:   !annotation
1347 // CHECK-NEXT:  store double 0x400921FB54442D18, double* %[[I]], align [[ALIGN]]
1348 // CHECK-NOT:   !annotation
1349 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%custom)
1350 
1351 TEST_UNINIT(volatileint, volatile int);
1352 // CHECK-LABEL: @test_volatileint_uninit()
1353 // CHECK:       %uninit = alloca i32, align
1354 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%uninit)
1355 // PATTERN-LABEL: @test_volatileint_uninit()
1356 // PATTERN: store volatile i32 [[I32]], i32* %uninit, align 4, !annotation [[AUTO_INIT]]
1357 // ZERO-LABEL: @test_volatileint_uninit()
1358 // ZERO: store volatile i32 0, i32* %uninit, align 4, !annotation [[AUTO_INIT]]
1359 
1360 TEST_BRACES(volatileint, volatile int);
1361 // CHECK-LABEL: @test_volatileint_braces()
1362 // CHECK:       %braces = alloca i32, align [[ALIGN:[0-9]*]]
1363 // CHECK-NEXT:  store volatile i32 0, i32* %braces, align [[ALIGN]]
1364 // CHECK-NOT:   !annotation
1365 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%braces)
1366 
1367 TEST_UNINIT(semivolatile, semivolatile);
1368 // CHECK-LABEL: @test_semivolatile_uninit()
1369 // CHECK:       %uninit = alloca %struct.semivolatile, align
1370 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%uninit)
1371 // PATTERN-LABEL: @test_semivolatile_uninit()
1372 // PATTERN-O0: call void @llvm.memcpy{{.*}} @__const.test_semivolatile_uninit.uninit{{.+}}), !annotation [[AUTO_INIT]]
1373 // ZERO-LABEL: @test_semivolatile_uninit()
1374 // ZERO-O0: call void @llvm.memset{{.*}}, i8 0, {{.+}}), !annotation [[AUTO_INIT]]
1375 // ZERO-O1: store i64 0, i64* %uninit, align 8
1376 // FIXME: !annotation dropped by optimizations
1377 // ZERO-O1-NOT: !annotation
1378 
1379 TEST_BRACES(semivolatile, semivolatile);
1380 // CHECK-LABEL: @test_semivolatile_braces()
1381 // CHECK:       %braces = alloca %struct.semivolatile, align [[ALIGN:[0-9]*]]
1382 // CHECK-NEXT:  bitcast
1383 // CHECK-NEXT:  call void @llvm.memset{{.*}}(i8* align [[ALIGN]] %{{.*}}, i8 0, i64 8, i1 false)
1384 // CHECK-NOT:   !annotation
1385 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%braces)
1386 
1387 TEST_CUSTOM(semivolatile, semivolatile, { 0x44444444, 0x44444444 });
1388 // CHECK-LABEL: @test_semivolatile_custom()
1389 // CHECK:       %custom = alloca %struct.semivolatile, align
1390 // CHECK-O0:  bitcast
1391 // CHECK-O0:  call void @llvm.memcpy
1392 // CHECK-NOT:   !annotation
1393 // CHECK-O0:  call void @{{.*}}used{{.*}}%custom)
1394 // CHECK-O1:  store i64 4919131752989213764, i64* %custom, align 8
1395 // CHECK-NOT:   !annotation
1396 
1397 TEST_UNINIT(semivolatileinit, semivolatileinit);
1398 // CHECK-LABEL: @test_semivolatileinit_uninit()
1399 // CHECK:       %uninit = alloca %struct.semivolatileinit, align
1400 // CHECK-NEXT:  call void @{{.*}}semivolatileinit{{.*}}%uninit)
1401 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%uninit)
1402 
1403 TEST_BRACES(semivolatileinit, semivolatileinit);
1404 // CHECK-LABEL: @test_semivolatileinit_braces()
1405 // CHECK:       %braces = alloca %struct.semivolatileinit, align [[ALIGN:[0-9]*]]
1406 // CHECK-NEXT:  %[[I:[^ ]*]] = getelementptr inbounds %struct.semivolatileinit, %struct.semivolatileinit* %braces, i32 0, i32 0
1407 // CHECK-NEXT:  store i32 286331153, i32* %[[I]], align [[ALIGN]]
1408 // CHECK-NOT:   !annotation
1409 // CHECK-NEXT:  %[[VI:[^ ]*]] = getelementptr inbounds %struct.semivolatileinit, %struct.semivolatileinit* %braces, i32 0, i32 1
1410 // CHECK-NEXT:  store volatile i32 286331153, i32* %[[VI]], align [[ALIGN]]
1411 // CHECK-NOT:   !annotation
1412 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%braces)
1413 
1414 TEST_CUSTOM(semivolatileinit, semivolatileinit, { 0x44444444, 0x44444444 });
1415 // CHECK-LABEL: @test_semivolatileinit_custom()
1416 // CHECK:       %custom = alloca %struct.semivolatileinit, align [[ALIGN:[0-9]*]]
1417 // CHECK-NEXT:  %[[I:[^ ]*]] = getelementptr inbounds %struct.semivolatileinit, %struct.semivolatileinit* %custom, i32 0, i32 0
1418 // CHECK-NEXT:  store i32 1145324612, i32* %[[I]], align [[ALIGN]]
1419 // CHECK-NOT:   !annotation
1420 // CHECK-NEXT:  %[[VI:[^ ]*]] = getelementptr inbounds %struct.semivolatileinit, %struct.semivolatileinit* %custom, i32 0, i32 1
1421 // CHECK-NEXT:  store volatile i32 1145324612, i32* %[[VI]], align [[ALIGN]]
1422 // CHECK-NOT:   !annotation
1423 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%custom)
1424 
1425 TEST_UNINIT(base, base);
1426 // CHECK-LABEL: @test_base_uninit()
1427 // CHECK:       %uninit = alloca %struct.base, align
1428 // CHECK-NEXT:  call void @{{.*}}base{{.*}}%uninit)
1429 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%uninit)
1430 // PATTERN-LABEL: @test_base_uninit()
1431 // PATTERN-O0: call void @llvm.memcpy{{.*}} @__const.test_base_uninit.uninit{{.+}}), !annotation [[AUTO_INIT]]
1432 // ZERO-LABEL: @test_base_uninit()
1433 // ZERO-O0: call void @llvm.memset{{.*}}, i8 0,{{.+}}), !annotation [[AUTO_INIT]]
1434 // ZERO-O1-LEGACY: store i64 0, {{.*}} align 8
1435 // ZERO-O1-NEWPM: store i32 (...)** bitcast (i8** getelementptr inbounds ({ [4 x i8*] }, { [4 x i8*] }* @_ZTV4base, i64 0, inrange i32 0, i64 2) to i32 (...)**), {{.*}}, align 8
1436 // FIXME: !annotation dropped by optimizations
1437 // ZERO-O1-NOT: !annotation
1438 
1439 TEST_BRACES(base, base);
1440 // CHECK-LABEL: @test_base_braces()
1441 // CHECK:       %braces = alloca %struct.base, align [[ALIGN:[0-9]*]]
1442 // CHECK-NEXT:  bitcast
1443 // CHECK-NEXT:  call void @llvm.memset{{.*}}(i8* align [[ALIGN]] %{{.*}}, i8 0, i64 8, i1 false)
1444 // CHECK-NOT:   !annotation
1445 // CHECK-NEXT:  call void @{{.*}}base{{.*}}%braces)
1446 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%braces)
1447 
1448 TEST_UNINIT(derived, derived);
1449 // CHECK-LABEL: @test_derived_uninit()
1450 // CHECK:       %uninit = alloca %struct.derived, align
1451 // CHECK-NEXT:  call void @{{.*}}derived{{.*}}%uninit)
1452 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%uninit)
1453 // PATTERN-LABEL: @test_derived_uninit()
1454 // PATTERN-O0: call void @llvm.memcpy{{.*}} @__const.test_derived_uninit.uninit{{.+}}), !annotation [[AUTO_INIT]]
1455 // ZERO-LABEL: @test_derived_uninit()
1456 // ZERO-O0: call void @llvm.memset{{.*}}, i8 0, {{.+}}), !annotation [[AUTO_INIT]]
1457 // ZERO-O1-LEGACY: store i64 0, {{.*}} align 8
1458 // ZERO-O1-NEWPM: store i32 (...)** bitcast (i8** getelementptr inbounds ({ [4 x i8*] }, { [4 x i8*] }* @_ZTV7derived, i64 0, inrange i32 0, i64 2) to i32 (...)**), {{.*}} align 8
1459 // FIXME: !annotation dropped by optimizations
1460 // ZERO-O1-NOT: !annotation
1461 
1462 TEST_BRACES(derived, derived);
1463 // CHECK-LABEL: @test_derived_braces()
1464 // CHECK:       %braces = alloca %struct.derived, align [[ALIGN:[0-9]*]]
1465 // CHECK-NEXT:  bitcast
1466 // CHECK-NEXT:  call void @llvm.memset{{.*}}(i8* align [[ALIGN]] %{{.*}}, i8 0, i64 8, i1 false)
1467 // CHECK-NOT:   !annotation
1468 // CHECK-NEXT:  call void @{{.*}}derived{{.*}}%braces)
1469 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%braces)
1470 
1471 TEST_UNINIT(virtualderived, virtualderived);
1472 // CHECK-LABEL: @test_virtualderived_uninit()
1473 // CHECK:       %uninit = alloca %struct.virtualderived, align
1474 // CHECK-NEXT:  call void @{{.*}}virtualderived{{.*}}%uninit)
1475 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%uninit)
1476 // PATTERN-LABEL: @test_virtualderived_uninit()
1477 // PATTERN-O0: call void @llvm.memcpy{{.*}} @__const.test_virtualderived_uninit.uninit{{.+}}), !annotation [[AUTO_INIT]]
1478 // ZERO-LABEL: @test_virtualderived_uninit()
1479 // ZERO-O0: call void @llvm.memset{{.*}}, i8 0, {{.+}}), !annotation [[AUTO_INIT]]
1480 // ZERO-O1-LEGACY: call void @llvm.memset{{.*}}, i8 0, {{.+}}), !annotation [[AUTO_INIT]]
1481 // ZERO-O1-NEWPM: call void @llvm.memset{{.*}}, i8 0, {{.+}}), !annotation [[AUTO_INIT]]
1482 
1483 TEST_BRACES(virtualderived, virtualderived);
1484 // CHECK-LABEL: @test_virtualderived_braces()
1485 // CHECK:       %braces = alloca %struct.virtualderived, align [[ALIGN:[0-9]*]]
1486 // CHECK-NEXT:  bitcast
1487 // CHECK-NEXT:  call void @llvm.memset{{.*}}(i8* align [[ALIGN]] %{{.*}}, i8 0, i64 16, i1 false)
1488 // CHECK-NOT:   !annotation
1489 // CHECK-NEXT:  call void @{{.*}}virtualderived{{.*}}%braces)
1490 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%braces)
1491 
1492 TEST_UNINIT(matching, matching);
1493 // CHECK-LABEL: @test_matching_uninit()
1494 // CHECK:       %uninit = alloca %union.matching, align
1495 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%uninit)
1496 // PATTERN-LABEL: @test_matching_uninit()
1497 // PATTERN-O0: call void @llvm.memcpy{{.*}} @__const.test_matching_uninit.uninit{{.+}}), !annotation [[AUTO_INIT]]
1498 // ZERO-LABEL: @test_matching_uninit()
1499 // ZERO-O0: call void @llvm.memset{{.*}}, i8 0, {{.+}}), !annotation [[AUTO_INIT]]
1500 // ZERO-O1: store i32 0, {{.*}} align 4
1501 // FIXME: !annotation dropped by optimizations
1502 // ZERO-O1-NOT: !annotation
1503 
1504 TEST_BRACES(matching, matching);
1505 // CHECK-LABEL: @test_matching_braces()
1506 // CHECK:       %braces = alloca %union.matching, align [[ALIGN:[0-9]*]]
1507 // CHECK-NEXT:  bitcast
1508 // CHECK-NEXT:  call void @llvm.memset{{.*}}(i8* align [[ALIGN]] %{{.*}}, i8 0, i64 4, i1 false)
1509 // CHECK-NOT:   !annotation
1510 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%braces)
1511 
1512 TEST_CUSTOM(matching, matching, { .f = 0xf00f });
1513 // CHECK-LABEL: @test_matching_custom()
1514 // CHECK:       %custom = alloca %union.matching, align
1515 // CHECK-O0:  bitcast
1516 // CHECK-O0:  call void @llvm.memcpy
1517 // CHECK-NOT:   !annotation
1518 // CHECK-O0:  call void @{{.*}}used{{.*}}%custom)
1519 // CHECK-O1:  getelementptr
1520 // CHECK-O1:  store i32 1198526208, i32* {{.*}}, align 4
1521 // CHECK-NOT:   !annotation
1522 
1523 TEST_UNINIT(matchingreverse, matchingreverse);
1524 // CHECK-LABEL: @test_matchingreverse_uninit()
1525 // CHECK:       %uninit = alloca %union.matchingreverse, align
1526 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%uninit)
1527 // PATTERN-LABEL: @test_matchingreverse_uninit()
1528 // PATTERN-O0: call void @llvm.memcpy{{.*}} @__const.test_matchingreverse_uninit.uninit{{.+}}), !annotation [[AUTO_INIT]]
1529 // PATTERN-O1: store float 0xFFFFFFFFE0000000, {{.+}}, !annotation [[AUTO_INIT]]
1530 // ZERO-LABEL: @test_matchingreverse_uninit()
1531 // ZERO-O0: call void @llvm.memset{{.*}}, i8 0,{{.+}}), !annotation [[AUTO_INIT]]
1532 // ZERO-O1: store i32 0, {{.*}} align 4
1533 // FIXME: !annotation dropped by optimizations
1534 // ZERO-O1-NOT: !annotation
1535 
1536 TEST_BRACES(matchingreverse, matchingreverse);
1537 // CHECK-LABEL: @test_matchingreverse_braces()
1538 // CHECK:       %braces = alloca %union.matchingreverse, align [[ALIGN:[0-9]*]]
1539 // CHECK-NEXT:  bitcast
1540 // CHECK-NEXT:  call void @llvm.memset{{.*}}(i8* align [[ALIGN]] %{{.*}}, i8 0, i64 4, i1 false)
1541 // CHECK-NOT:   !annotation
1542 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%braces)
1543 
1544 TEST_CUSTOM(matchingreverse, matchingreverse, { .i = 0xf00f });
1545 // CHECK-LABEL: @test_matchingreverse_custom()
1546 // CHECK:       %custom = alloca %union.matchingreverse, align
1547 // CHECK-O0:    bitcast
1548 // CHECK-O0:    call void @llvm.memcpy
1549 // CHECK-NOT:   !annotation
1550 // CHECK-O0:    call void @{{.*}}used{{.*}}%custom)
1551 // CHECK-O1:    store i32 61455, i32* %1, align 4
1552 // CHECK-NOT:   !annotation
1553 
1554 TEST_UNINIT(unmatched, unmatched);
1555 // CHECK-LABEL: @test_unmatched_uninit()
1556 // CHECK:       %uninit = alloca %union.unmatched, align
1557 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%uninit)
1558 // PATTERN-LABEL: @test_unmatched_uninit()
1559 // PATTERN-O0: call void @llvm.memcpy{{.*}} @__const.test_unmatched_uninit.uninit{{.+}}), !annotation [[AUTO_INIT]]
1560 // ZERO-LABEL: @test_unmatched_uninit()
1561 // ZERO-O0: call void @llvm.memset{{.*}}, i8 0, {{.+}}), !annotation [[AUTO_INIT]]
1562 // ZERO-O1: store i32 0, {{.*}} align 4
1563 // FIXME: !annotation dropped by optimizations
1564 // ZERO-O1-NOT: !annotation
1565 
1566 TEST_BRACES(unmatched, unmatched);
1567 // CHECK-LABEL: @test_unmatched_braces()
1568 // CHECK:       %braces = alloca %union.unmatched, align
1569 // CHECK-NEXT:  bitcast
1570 // CHECK-NEXT:  call void @llvm.memcpy
1571 // CHECK-NOT:   !annotation
1572 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%braces)
1573 
1574 TEST_CUSTOM(unmatched, unmatched, { .i = 0x3badbeef });
1575 // CHECK-LABEL: @test_unmatched_custom()
1576 // CHECK:       %custom = alloca %union.unmatched, align
1577 // CHECK-O0:    bitcast
1578 // CHECK-O0:    call void @llvm.memcpy
1579 // CHECK-NOT:   !annotation
1580 // CHECK-O0:    call void @{{.*}}used{{.*}}%custom)
1581 // CHECK-O1:    store i32 1001242351, i32* {{.*}}, align 4
1582 // CHECK-NOT:   !annotation
1583 
1584 TEST_UNINIT(unmatchedreverse, unmatchedreverse);
1585 // CHECK-LABEL: @test_unmatchedreverse_uninit()
1586 // CHECK:       %uninit = alloca %union.unmatchedreverse, align
1587 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%uninit)
1588 // PATTERN-LABEL: @test_unmatchedreverse_uninit()
1589 // PATTERN-O0: call void @llvm.memcpy{{.*}} @__const.test_unmatchedreverse_uninit.uninit{{.+}}), !annotation [[AUTO_INIT]]
1590 // ZERO-LABEL: @test_unmatchedreverse_uninit()
1591 // ZERO-O0: call void @llvm.memset{{.*}}, i8 0, {{.+}}), !annotation [[AUTO_INIT]]
1592 // ZERO-O1:  store i32 0, {{.*}} align 4
1593 // FIXME: !annotation dropped by optimizations
1594 // ZERO-O1-NOT: !annotation
1595 
1596 TEST_BRACES(unmatchedreverse, unmatchedreverse);
1597 // CHECK-LABEL: @test_unmatchedreverse_braces()
1598 // CHECK:       %braces = alloca %union.unmatchedreverse, align [[ALIGN:[0-9]*]]
1599 // CHECK-NEXT:  bitcast
1600 // CHECK-NEXT:  call void @llvm.memset{{.*}}(i8* align [[ALIGN]] %{{.*}}, i8 0, i64 4, i1 false)
1601 // CHECK-NOT:   !annotation
1602 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%braces)
1603 
1604 TEST_CUSTOM(unmatchedreverse, unmatchedreverse, { .c = 42  });
1605 // CHECK-LABEL: @test_unmatchedreverse_custom()
1606 // CHECK:       %custom = alloca %union.unmatchedreverse, align
1607 // CHECK-O0:    bitcast
1608 // CHECK-O0:    call void @llvm.memcpy
1609 // CHECK-NOT:   !annotation
1610 // CHECK-O0:    call void @{{.*}}used{{.*}}%custom)
1611 // PATTERN-O1:  store i32 -1431655894, i32* {{.*}}, align 4
1612 // ZERO-O1:     store i32 42, i32* {{.*}}, align 4
1613 
1614 TEST_UNINIT(unmatchedfp, unmatchedfp);
1615 // CHECK-LABEL: @test_unmatchedfp_uninit()
1616 // CHECK:       %uninit = alloca %union.unmatchedfp, align
1617 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%uninit)
1618 // PATTERN-LABEL: @test_unmatchedfp_uninit()
1619 // PATTERN-O0: call void @llvm.memcpy{{.*}} @__const.test_unmatchedfp_uninit.uninit{{.+}}), !annotation [[AUTO_INIT]]
1620 // ZERO-LABEL: @test_unmatchedfp_uninit()
1621 // ZERO-O0: call void @llvm.memset{{.*}}, i8 0, {{.+}}), !annotation [[AUTO_INIT]]
1622 // ZERO-O1: store i64 0, {{.*}} align 8
1623 // FIXME: !annotation dropped by optimizations
1624 // ZERO-O1-NOT: !annotation
1625 
1626 TEST_BRACES(unmatchedfp, unmatchedfp);
1627 // CHECK-LABEL: @test_unmatchedfp_braces()
1628 // CHECK:       %braces = alloca %union.unmatchedfp, align
1629 // CHECK-NEXT:  bitcast
1630 // CHECK-NEXT:  call void @llvm.memcpy
1631 // CHECK-NOT:   !annotation
1632 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%braces)
1633 
1634 TEST_CUSTOM(unmatchedfp, unmatchedfp, { .d = 3.1415926535897932384626433 });
1635 // CHECK-LABEL: @test_unmatchedfp_custom()
1636 // CHECK:       %custom = alloca %union.unmatchedfp, align
1637 // CHECK-O0:    bitcast
1638 // CHECK-O0:    call void @llvm.memcpy
1639 // CHECK-NOT:   !annotation
1640 // CHECK-O0:    call void @{{.*}}used{{.*}}%custom)
1641 // CHECK-O1:    store i64 4614256656552045848, i64* %1, align 8
1642 // CHECK-NOT:   !annotation
1643 
1644 TEST_UNINIT(emptyenum, emptyenum);
1645 // CHECK-LABEL: @test_emptyenum_uninit()
1646 // CHECK:       %uninit = alloca i32, align
1647 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%uninit)
1648 // PATTERN-LABEL: @test_emptyenum_uninit()
1649 // PATTERN: store i32 [[I32]], i32* %uninit, align 4, !annotation [[AUTO_INIT]]
1650 // ZERO-LABEL: @test_emptyenum_uninit()
1651 // ZERO: store i32 0, i32* %uninit, align 4, !annotation [[AUTO_INIT]]
1652 
1653 TEST_BRACES(emptyenum, emptyenum);
1654 // CHECK-LABEL: @test_emptyenum_braces()
1655 // CHECK:       %braces = alloca i32, align [[ALIGN:[0-9]*]]
1656 // CHECK-NOT:   !annotation
1657 // CHECK-NEXT:  store i32 0, i32* %braces, align [[ALIGN]]
1658 // CHECK-NOT:   !annotation
1659 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%braces)
1660 
1661 TEST_CUSTOM(emptyenum, emptyenum, { (emptyenum)42 });
1662 // CHECK-LABEL: @test_emptyenum_custom()
1663 // CHECK:       %custom = alloca i32, align [[ALIGN:[0-9]*]]
1664 // CHECK-NEXT:  store i32 42, i32* %custom, align [[ALIGN]]
1665 // CHECK-NOT:   !annotation
1666 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%custom)
1667 
1668 TEST_UNINIT(smallenum, smallenum);
1669 // CHECK-LABEL: @test_smallenum_uninit()
1670 // CHECK:       %uninit = alloca i32, align
1671 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%uninit)
1672 // PATTERN-LABEL: @test_smallenum_uninit()
1673 // PATTERN: store i32 [[I32]], i32* %uninit, align 4, !annotation [[AUTO_INIT]]
1674 // ZERO-LABEL: @test_smallenum_uninit()
1675 // ZERO: store i32 0, i32* %uninit, align 4, !annotation [[AUTO_INIT]]
1676 
1677 TEST_BRACES(smallenum, smallenum);
1678 // CHECK-LABEL: @test_smallenum_braces()
1679 // CHECK:       %braces = alloca i32, align [[ALIGN:[0-9]*]]
1680 // CHECK-NEXT:  store i32 0, i32* %braces, align [[ALIGN]]
1681 // CHECK-NOT:   !annotation
1682 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%braces)
1683 
1684 TEST_CUSTOM(smallenum, smallenum, { (smallenum)42 });
1685 // CHECK-LABEL: @test_smallenum_custom()
1686 // CHECK:       %custom = alloca i32, align [[ALIGN:[0-9]*]]
1687 // CHECK-NEXT:  store i32 42, i32* %custom, align [[ALIGN]]
1688 // CHECK-NOT:   !annotation
1689 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%custom)
1690 
1691 TEST_UNINIT(intvec16, int  __attribute__((vector_size(16))));
1692 // CHECK-LABEL: @test_intvec16_uninit()
1693 // CHECK:       %uninit = alloca <4 x i32>, align
1694 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%uninit)
1695 // PATTERN-LABEL: @test_intvec16_uninit()
1696 // PATTERN: store <4 x i32> <i32 [[I32]], i32 [[I32]], i32 [[I32]], i32 [[I32]]>, <4 x i32>* %uninit, align 16, !annotation [[AUTO_INIT]]
1697 // ZERO-LABEL: @test_intvec16_uninit()
1698 // ZERO: store <4 x i32> zeroinitializer, <4 x i32>* %uninit, align 16, !annotation [[AUTO_INIT]]
1699 
1700 TEST_BRACES(intvec16, int  __attribute__((vector_size(16))));
1701 // CHECK-LABEL: @test_intvec16_braces()
1702 // CHECK:       %braces = alloca <4 x i32>, align [[ALIGN:[0-9]*]]
1703 // CHECK-NEXT:  store <4 x i32> zeroinitializer, <4 x i32>* %braces, align [[ALIGN]]
1704 // CHECK-NOT:   !annotation
1705 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%braces)
1706 
1707 TEST_CUSTOM(intvec16, int  __attribute__((vector_size(16))), { 0x44444444, 0x44444444, 0x44444444, 0x44444444 });
1708 // CHECK-LABEL: @test_intvec16_custom()
1709 // CHECK:       %custom = alloca <4 x i32>, align [[ALIGN:[0-9]*]]
1710 // CHECK-NEXT:  store <4 x i32> <i32 1145324612, i32 1145324612, i32 1145324612, i32 1145324612>, <4 x i32>* %custom, align [[ALIGN]]
1711 // CHECK-NOT:   !annotation
1712 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%custom)
1713 
1714 TEST_UNINIT(longlongvec32, long long  __attribute__((vector_size(32))));
1715 // CHECK-LABEL: @test_longlongvec32_uninit()
1716 // CHECK:       %uninit = alloca <4 x i64>, align
1717 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%uninit)
1718 // PATTERN-LABEL: @test_longlongvec32_uninit()
1719 // PATTERN: store <4 x i64> <i64 [[I64]], i64 [[I64]], i64 [[I64]], i64 [[I64]]>, <4 x i64>* %uninit, align 32, !annotation [[AUTO_INIT]]
1720 // ZERO-LABEL: @test_longlongvec32_uninit()
1721 // ZERO: store <4 x i64> zeroinitializer, <4 x i64>* %uninit, align 32, !annotation [[AUTO_INIT]]
1722 
1723 TEST_BRACES(longlongvec32, long long  __attribute__((vector_size(32))));
1724 // CHECK-LABEL: @test_longlongvec32_braces()
1725 // CHECK:       %braces = alloca <4 x i64>, align [[ALIGN:[0-9]*]]
1726 // CHECK-NEXT:  store <4 x i64> zeroinitializer, <4 x i64>* %braces, align [[ALIGN]]
1727 // CHECK-NOT:   !annotation
1728 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%braces)
1729 
1730 TEST_CUSTOM(longlongvec32, long long  __attribute__((vector_size(32))), { 0x3333333333333333, 0x3333333333333333, 0x3333333333333333, 0x3333333333333333 });
1731 // CHECK-LABEL: @test_longlongvec32_custom()
1732 // CHECK:       %custom = alloca <4 x i64>, align [[ALIGN:[0-9]*]]
1733 // CHECK-NEXT:  store <4 x i64> <i64 3689348814741910323, i64 3689348814741910323, i64 3689348814741910323, i64 3689348814741910323>, <4 x i64>* %custom, align [[ALIGN]]
1734 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%custom)
1735 
1736 TEST_UNINIT(floatvec16, float  __attribute__((vector_size(16))));
1737 // CHECK-LABEL: @test_floatvec16_uninit()
1738 // CHECK:       %uninit = alloca <4 x float>, align
1739 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%uninit)
1740 // PATTERN-LABEL: @test_floatvec16_uninit()
1741 // PATTERN: store <4 x float> <float 0xFFFFFFFFE0000000, float 0xFFFFFFFFE0000000, float 0xFFFFFFFFE0000000, float 0xFFFFFFFFE0000000>, <4 x float>* %uninit, align 16, !annotation [[AUTO_INIT]]
1742 // ZERO-LABEL: @test_floatvec16_uninit()
1743 // ZERO: store <4 x float> zeroinitializer, <4 x float>* %uninit, align 16, !annotation [[AUTO_INIT]]
1744 
1745 TEST_BRACES(floatvec16, float  __attribute__((vector_size(16))));
1746 // CHECK-LABEL: @test_floatvec16_braces()
1747 // CHECK:       %braces = alloca <4 x float>, align [[ALIGN:[0-9]*]]
1748 // CHECK-NEXT:  store <4 x float> zeroinitializer, <4 x float>* %braces, align [[ALIGN]]
1749 // CHECK-NOT:   !annotation
1750 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%braces)
1751 
1752 TEST_CUSTOM(floatvec16, float  __attribute__((vector_size(16))), { 3.1415926535897932384626433, 3.1415926535897932384626433, 3.1415926535897932384626433, 3.1415926535897932384626433 });
1753 // CHECK-LABEL: @test_floatvec16_custom()
1754 // CHECK:       %custom = alloca <4 x float>, align [[ALIGN:[0-9]*]]
1755 // CHECK-NEXT:  store <4 x float> <float 0x400921FB60000000, float 0x400921FB60000000, float 0x400921FB60000000, float 0x400921FB60000000>, <4 x float>* %custom, align [[ALIGN]]
1756 // CHECK-NOT:   !annotation
1757 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%custom)
1758 
1759 TEST_UNINIT(doublevec32, double  __attribute__((vector_size(32))));
1760 // CHECK-LABEL: @test_doublevec32_uninit()
1761 // CHECK:       %uninit = alloca <4 x double>, align
1762 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%uninit)
1763 // PATTERN-LABEL: @test_doublevec32_uninit()
1764 // PATTERN: store <4 x double> <double 0xFFFFFFFFFFFFFFFF, double 0xFFFFFFFFFFFFFFFF, double 0xFFFFFFFFFFFFFFFF, double 0xFFFFFFFFFFFFFFFF>, <4 x double>* %uninit, align 32, !annotation [[AUTO_INIT]]
1765 // ZERO-LABEL: @test_doublevec32_uninit()
1766 // ZERO: store <4 x double> zeroinitializer, <4 x double>* %uninit, align 32, !annotation [[AUTO_INIT]]
1767 
1768 TEST_BRACES(doublevec32, double  __attribute__((vector_size(32))));
1769 // CHECK-LABEL: @test_doublevec32_braces()
1770 // CHECK:       %braces = alloca <4 x double>, align [[ALIGN:[0-9]*]]
1771 // CHECK-NEXT:  store <4 x double> zeroinitializer, <4 x double>* %braces, align [[ALIGN]]
1772 // CHECK-NOT:   !annotation
1773 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%braces)
1774 
1775 TEST_CUSTOM(doublevec32, double  __attribute__((vector_size(32))), { 3.1415926535897932384626433, 3.1415926535897932384626433, 3.1415926535897932384626433, 3.1415926535897932384626433 });
1776 // CHECK-LABEL: @test_doublevec32_custom()
1777 // CHECK:       %custom = alloca <4 x double>, align [[ALIGN:[0-9]*]]
1778 // CHECK-NEXT:  store <4 x double> <double 0x400921FB54442D18, double 0x400921FB54442D18, double 0x400921FB54442D18, double 0x400921FB54442D18>, <4 x double>* %custom, align [[ALIGN]]
1779 // CHECK-NOT:   !annotation
1780 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%custom)
1781 
1782 // TODO: This vector has tail padding
1783 TEST_UNINIT(doublevec24, double  __attribute__((vector_size(24))));
1784 // CHECK-LABEL: @test_doublevec24_uninit()
1785 // CHECK:       %uninit = alloca <3 x double>, align
1786 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%uninit)
1787 // PATTERN-LABEL: @test_doublevec24_uninit()
1788 // PATTERN: store <3 x double> <double 0xFFFFFFFFFFFFFFFF, double 0xFFFFFFFFFFFFFFFF, double 0xFFFFFFFFFFFFFFFF>, <3 x double>* %uninit, align 32, !annotation [[AUTO_INIT]]
1789 // ZERO-LABEL: @test_doublevec24_uninit()
1790 // ZERO: store <3 x double> zeroinitializer, <3 x double>* %uninit, align 32, !annotation [[AUTO_INIT]]
1791 
1792 // TODO: This vector has tail padding
1793 TEST_UNINIT(longdoublevec32, long double  __attribute__((vector_size(sizeof(long double)*2))));
1794 // CHECK-LABEL: @test_longdoublevec32_uninit()
1795 // CHECK:       %uninit = alloca <2 x x86_fp80>, align
1796 // CHECK-NEXT:  call void @{{.*}}used{{.*}}%uninit)
1797 // PATTERN-LABEL: @test_longdoublevec32_uninit()
1798 // PATTERN: store <2 x x86_fp80> <x86_fp80 0xKFFFFFFFFFFFFFFFFFFFF, x86_fp80 0xKFFFFFFFFFFFFFFFFFFFF>, <2 x x86_fp80>* %uninit, align 32, !annotation [[AUTO_INIT]]
1799 // ZERO-LABEL: @test_longdoublevec32_uninit()
1800 // ZERO: store <2 x x86_fp80> zeroinitializer, <2 x x86_fp80>* %uninit, align 32, !annotation [[AUTO_INIT]]
1801 
1802 } // extern "C"
1803 
1804 // PATTERN: [[AUTO_INIT]] = !{!"auto-init"}
1805 // ZERO: [[AUTO_INIT]] = !{!"auto-init"}
1806