xref: /minix3/external/bsd/llvm/dist/clang/test/CodeGen/tbaa.cpp (revision 0a6a1f1d05b60e214de2f05a7310ddd1f0e590e7)
1f4a2713aSLionel Sambuc // RUN: %clang_cc1 -triple x86_64-apple-darwin -O1 -no-struct-path-tbaa -disable-llvm-optzns %s -emit-llvm -o - | FileCheck %s
2f4a2713aSLionel Sambuc // RUN: %clang_cc1 -triple x86_64-apple-darwin -O1 -disable-llvm-optzns %s -emit-llvm -o - | FileCheck %s -check-prefix=PATH
3f4a2713aSLionel Sambuc // Test TBAA metadata generated by front-end.
4f4a2713aSLionel Sambuc 
5f4a2713aSLionel Sambuc typedef unsigned char uint8_t;
6f4a2713aSLionel Sambuc typedef unsigned short uint16_t;
7f4a2713aSLionel Sambuc typedef unsigned int uint32_t;
8f4a2713aSLionel Sambuc typedef unsigned long long uint64_t;
9f4a2713aSLionel Sambuc typedef struct
10f4a2713aSLionel Sambuc {
11f4a2713aSLionel Sambuc    uint16_t f16;
12f4a2713aSLionel Sambuc    uint32_t f32;
13f4a2713aSLionel Sambuc    uint16_t f16_2;
14f4a2713aSLionel Sambuc    uint32_t f32_2;
15f4a2713aSLionel Sambuc } StructA;
16f4a2713aSLionel Sambuc typedef struct
17f4a2713aSLionel Sambuc {
18f4a2713aSLionel Sambuc    uint16_t f16;
19f4a2713aSLionel Sambuc    StructA a;
20f4a2713aSLionel Sambuc    uint32_t f32;
21f4a2713aSLionel Sambuc } StructB;
22f4a2713aSLionel Sambuc typedef struct
23f4a2713aSLionel Sambuc {
24f4a2713aSLionel Sambuc    uint16_t f16;
25f4a2713aSLionel Sambuc    StructB b;
26f4a2713aSLionel Sambuc    uint32_t f32;
27f4a2713aSLionel Sambuc } StructC;
28f4a2713aSLionel Sambuc typedef struct
29f4a2713aSLionel Sambuc {
30f4a2713aSLionel Sambuc    uint16_t f16;
31f4a2713aSLionel Sambuc    StructB b;
32f4a2713aSLionel Sambuc    uint32_t f32;
33f4a2713aSLionel Sambuc    uint8_t f8;
34f4a2713aSLionel Sambuc } StructD;
35f4a2713aSLionel Sambuc 
36f4a2713aSLionel Sambuc typedef struct
37f4a2713aSLionel Sambuc {
38f4a2713aSLionel Sambuc    uint16_t f16;
39f4a2713aSLionel Sambuc    uint32_t f32;
40f4a2713aSLionel Sambuc } StructS;
41f4a2713aSLionel Sambuc typedef struct
42f4a2713aSLionel Sambuc {
43f4a2713aSLionel Sambuc    uint16_t f16;
44f4a2713aSLionel Sambuc    uint32_t f32;
45f4a2713aSLionel Sambuc } StructS2;
46f4a2713aSLionel Sambuc 
g(uint32_t * s,StructA * A,uint64_t count)47f4a2713aSLionel Sambuc uint32_t g(uint32_t *s, StructA *A, uint64_t count) {
48f4a2713aSLionel Sambuc // CHECK: define i32 @{{.*}}(
49f4a2713aSLionel Sambuc // CHECK: store i32 1, i32* %{{.*}}, align 4, !tbaa [[TAG_i32:!.*]]
50f4a2713aSLionel Sambuc // CHECK: store i32 4, i32* %{{.*}}, align 4, !tbaa [[TAG_i32]]
51f4a2713aSLionel Sambuc // PATH: define i32 @{{.*}}(
52f4a2713aSLionel Sambuc // PATH: store i32 1, i32* %{{.*}}, align 4, !tbaa [[TAG_i32:!.*]]
53f4a2713aSLionel Sambuc // PATH: store i32 4, i32* %{{.*}}, align 4, !tbaa [[TAG_A_f32:!.*]]
54f4a2713aSLionel Sambuc   *s = 1;
55f4a2713aSLionel Sambuc   A->f32 = 4;
56f4a2713aSLionel Sambuc   return *s;
57f4a2713aSLionel Sambuc }
58f4a2713aSLionel Sambuc 
g2(uint32_t * s,StructA * A,uint64_t count)59f4a2713aSLionel Sambuc uint32_t g2(uint32_t *s, StructA *A, uint64_t count) {
60f4a2713aSLionel Sambuc // CHECK: define i32 @{{.*}}(
61f4a2713aSLionel Sambuc // CHECK: store i32 1, i32* %{{.*}}, align 4, !tbaa [[TAG_i32]]
62f4a2713aSLionel Sambuc // CHECK: store i16 4, i16* %{{.*}}, align 2, !tbaa [[TAG_i16:!.*]]
63f4a2713aSLionel Sambuc // PATH: define i32 @{{.*}}(
64f4a2713aSLionel Sambuc // PATH: store i32 1, i32* %{{.*}}, align 4, !tbaa [[TAG_i32]]
65f4a2713aSLionel Sambuc // PATH: store i16 4, i16* %{{.*}}, align 2, !tbaa [[TAG_A_f16:!.*]]
66f4a2713aSLionel Sambuc   *s = 1;
67f4a2713aSLionel Sambuc   A->f16 = 4;
68f4a2713aSLionel Sambuc   return *s;
69f4a2713aSLionel Sambuc }
70f4a2713aSLionel Sambuc 
g3(StructA * A,StructB * B,uint64_t count)71f4a2713aSLionel Sambuc uint32_t g3(StructA *A, StructB *B, uint64_t count) {
72f4a2713aSLionel Sambuc // CHECK: define i32 @{{.*}}(
73f4a2713aSLionel Sambuc // CHECK: store i32 1, i32* %{{.*}}, align 4, !tbaa [[TAG_i32]]
74f4a2713aSLionel Sambuc // CHECK: store i32 4, i32* %{{.*}}, align 4, !tbaa [[TAG_i32]]
75f4a2713aSLionel Sambuc // PATH: define i32 @{{.*}}(
76f4a2713aSLionel Sambuc // PATH: store i32 1, i32* %{{.*}}, align 4, !tbaa [[TAG_A_f32]]
77f4a2713aSLionel Sambuc // PATH: store i32 4, i32* %{{.*}}, align 4, !tbaa [[TAG_B_a_f32:!.*]]
78f4a2713aSLionel Sambuc   A->f32 = 1;
79f4a2713aSLionel Sambuc   B->a.f32 = 4;
80f4a2713aSLionel Sambuc   return A->f32;
81f4a2713aSLionel Sambuc }
82f4a2713aSLionel Sambuc 
g4(StructA * A,StructB * B,uint64_t count)83f4a2713aSLionel Sambuc uint32_t g4(StructA *A, StructB *B, uint64_t count) {
84f4a2713aSLionel Sambuc // CHECK: define i32 @{{.*}}(
85f4a2713aSLionel Sambuc // CHECK: store i32 1, i32* %{{.*}}, align 4, !tbaa [[TAG_i32]]
86f4a2713aSLionel Sambuc // CHECK: store i16 4, i16* %{{.*}}, align 2, !tbaa [[TAG_i16]]
87f4a2713aSLionel Sambuc // PATH: define i32 @{{.*}}(
88f4a2713aSLionel Sambuc // PATH: store i32 1, i32* %{{.*}}, align 4, !tbaa [[TAG_A_f32]]
89f4a2713aSLionel Sambuc // PATH: store i16 4, i16* %{{.*}}, align 2, !tbaa [[TAG_B_a_f16:!.*]]
90f4a2713aSLionel Sambuc   A->f32 = 1;
91f4a2713aSLionel Sambuc   B->a.f16 = 4;
92f4a2713aSLionel Sambuc   return A->f32;
93f4a2713aSLionel Sambuc }
94f4a2713aSLionel Sambuc 
g5(StructA * A,StructB * B,uint64_t count)95f4a2713aSLionel Sambuc uint32_t g5(StructA *A, StructB *B, uint64_t count) {
96f4a2713aSLionel Sambuc // CHECK: define i32 @{{.*}}(
97f4a2713aSLionel Sambuc // CHECK: store i32 1, i32* %{{.*}}, align 4, !tbaa [[TAG_i32]]
98f4a2713aSLionel Sambuc // CHECK: store i32 4, i32* %{{.*}}, align 4, !tbaa [[TAG_i32]]
99f4a2713aSLionel Sambuc // PATH: define i32 @{{.*}}(
100f4a2713aSLionel Sambuc // PATH: store i32 1, i32* %{{.*}}, align 4, !tbaa [[TAG_A_f32]]
101f4a2713aSLionel Sambuc // PATH: store i32 4, i32* %{{.*}}, align 4, !tbaa [[TAG_B_f32:!.*]]
102f4a2713aSLionel Sambuc   A->f32 = 1;
103f4a2713aSLionel Sambuc   B->f32 = 4;
104f4a2713aSLionel Sambuc   return A->f32;
105f4a2713aSLionel Sambuc }
106f4a2713aSLionel Sambuc 
g6(StructA * A,StructB * B,uint64_t count)107f4a2713aSLionel Sambuc uint32_t g6(StructA *A, StructB *B, uint64_t count) {
108f4a2713aSLionel Sambuc // CHECK: define i32 @{{.*}}(
109f4a2713aSLionel Sambuc // CHECK: store i32 1, i32* %{{.*}}, align 4, !tbaa [[TAG_i32]]
110f4a2713aSLionel Sambuc // CHECK: store i32 4, i32* %{{.*}}, align 4, !tbaa [[TAG_i32]]
111f4a2713aSLionel Sambuc // PATH: define i32 @{{.*}}(
112f4a2713aSLionel Sambuc // PATH: store i32 1, i32* %{{.*}}, align 4, !tbaa [[TAG_A_f32]]
113f4a2713aSLionel Sambuc // PATH: store i32 4, i32* %{{.*}}, align 4, !tbaa [[TAG_B_a_f32_2:!.*]]
114f4a2713aSLionel Sambuc   A->f32 = 1;
115f4a2713aSLionel Sambuc   B->a.f32_2 = 4;
116f4a2713aSLionel Sambuc   return A->f32;
117f4a2713aSLionel Sambuc }
118f4a2713aSLionel Sambuc 
g7(StructA * A,StructS * S,uint64_t count)119f4a2713aSLionel Sambuc uint32_t g7(StructA *A, StructS *S, uint64_t count) {
120f4a2713aSLionel Sambuc // CHECK: define i32 @{{.*}}(
121f4a2713aSLionel Sambuc // CHECK: store i32 1, i32* %{{.*}}, align 4, !tbaa [[TAG_i32]]
122f4a2713aSLionel Sambuc // CHECK: store i32 4, i32* %{{.*}}, align 4, !tbaa [[TAG_i32]]
123f4a2713aSLionel Sambuc // PATH: define i32 @{{.*}}(
124f4a2713aSLionel Sambuc // PATH: store i32 1, i32* %{{.*}}, align 4, !tbaa [[TAG_A_f32]]
125f4a2713aSLionel Sambuc // PATH: store i32 4, i32* %{{.*}}, align 4, !tbaa [[TAG_S_f32:!.*]]
126f4a2713aSLionel Sambuc   A->f32 = 1;
127f4a2713aSLionel Sambuc   S->f32 = 4;
128f4a2713aSLionel Sambuc   return A->f32;
129f4a2713aSLionel Sambuc }
130f4a2713aSLionel Sambuc 
g8(StructA * A,StructS * S,uint64_t count)131f4a2713aSLionel Sambuc uint32_t g8(StructA *A, StructS *S, uint64_t count) {
132f4a2713aSLionel Sambuc // CHECK: define i32 @{{.*}}(
133f4a2713aSLionel Sambuc // CHECK: store i32 1, i32* %{{.*}}, align 4, !tbaa [[TAG_i32]]
134f4a2713aSLionel Sambuc // CHECK: store i16 4, i16* %{{.*}}, align 2, !tbaa [[TAG_i16]]
135f4a2713aSLionel Sambuc // PATH: define i32 @{{.*}}(
136f4a2713aSLionel Sambuc // PATH: store i32 1, i32* %{{.*}}, align 4, !tbaa [[TAG_A_f32]]
137f4a2713aSLionel Sambuc // PATH: store i16 4, i16* %{{.*}}, align 2, !tbaa [[TAG_S_f16:!.*]]
138f4a2713aSLionel Sambuc   A->f32 = 1;
139f4a2713aSLionel Sambuc   S->f16 = 4;
140f4a2713aSLionel Sambuc   return A->f32;
141f4a2713aSLionel Sambuc }
142f4a2713aSLionel Sambuc 
g9(StructS * S,StructS2 * S2,uint64_t count)143f4a2713aSLionel Sambuc uint32_t g9(StructS *S, StructS2 *S2, uint64_t count) {
144f4a2713aSLionel Sambuc // CHECK: define i32 @{{.*}}(
145f4a2713aSLionel Sambuc // CHECK: store i32 1, i32* %{{.*}}, align 4, !tbaa [[TAG_i32]]
146f4a2713aSLionel Sambuc // CHECK: store i32 4, i32* %{{.*}}, align 4, !tbaa [[TAG_i32]]
147f4a2713aSLionel Sambuc // PATH: define i32 @{{.*}}(
148f4a2713aSLionel Sambuc // PATH: store i32 1, i32* %{{.*}}, align 4, !tbaa [[TAG_S_f32]]
149f4a2713aSLionel Sambuc // PATH: store i32 4, i32* %{{.*}}, align 4, !tbaa [[TAG_S2_f32:!.*]]
150f4a2713aSLionel Sambuc   S->f32 = 1;
151f4a2713aSLionel Sambuc   S2->f32 = 4;
152f4a2713aSLionel Sambuc   return S->f32;
153f4a2713aSLionel Sambuc }
154f4a2713aSLionel Sambuc 
g10(StructS * S,StructS2 * S2,uint64_t count)155f4a2713aSLionel Sambuc uint32_t g10(StructS *S, StructS2 *S2, uint64_t count) {
156f4a2713aSLionel Sambuc // CHECK: define i32 @{{.*}}(
157f4a2713aSLionel Sambuc // CHECK: store i32 1, i32* %{{.*}}, align 4, !tbaa [[TAG_i32]]
158f4a2713aSLionel Sambuc // CHECK: store i16 4, i16* %{{.*}}, align 2, !tbaa [[TAG_i16]]
159f4a2713aSLionel Sambuc // PATH: define i32 @{{.*}}(
160f4a2713aSLionel Sambuc // PATH: store i32 1, i32* %{{.*}}, align 4, !tbaa [[TAG_S_f32]]
161f4a2713aSLionel Sambuc // PATH: store i16 4, i16* %{{.*}}, align 2, !tbaa [[TAG_S2_f16:!.*]]
162f4a2713aSLionel Sambuc   S->f32 = 1;
163f4a2713aSLionel Sambuc   S2->f16 = 4;
164f4a2713aSLionel Sambuc   return S->f32;
165f4a2713aSLionel Sambuc }
166f4a2713aSLionel Sambuc 
g11(StructC * C,StructD * D,uint64_t count)167f4a2713aSLionel Sambuc uint32_t g11(StructC *C, StructD *D, uint64_t count) {
168f4a2713aSLionel Sambuc // CHECK: define i32 @{{.*}}(
169f4a2713aSLionel Sambuc // CHECK: store i32 1, i32* %{{.*}}, align 4, !tbaa [[TAG_i32]]
170f4a2713aSLionel Sambuc // CHECK: store i32 4, i32* %{{.*}}, align 4, !tbaa [[TAG_i32]]
171f4a2713aSLionel Sambuc // PATH: define i32 @{{.*}}(
172f4a2713aSLionel Sambuc // PATH: store i32 1, i32* %{{.*}}, align 4, !tbaa [[TAG_C_b_a_f32:!.*]]
173f4a2713aSLionel Sambuc // PATH: store i32 4, i32* %{{.*}}, align 4, !tbaa [[TAG_D_b_a_f32:!.*]]
174f4a2713aSLionel Sambuc   C->b.a.f32 = 1;
175f4a2713aSLionel Sambuc   D->b.a.f32 = 4;
176f4a2713aSLionel Sambuc   return C->b.a.f32;
177f4a2713aSLionel Sambuc }
178f4a2713aSLionel Sambuc 
g12(StructC * C,StructD * D,uint64_t count)179f4a2713aSLionel Sambuc uint32_t g12(StructC *C, StructD *D, uint64_t count) {
180f4a2713aSLionel Sambuc // CHECK: define i32 @{{.*}}(
181f4a2713aSLionel Sambuc // CHECK: store i32 1, i32* %{{.*}}, align 4, !tbaa [[TAG_i32]]
182f4a2713aSLionel Sambuc // CHECK: store i32 4, i32* %{{.*}}, align 4, !tbaa [[TAG_i32]]
183f4a2713aSLionel Sambuc // TODO: differentiate the two accesses.
184f4a2713aSLionel Sambuc // PATH: define i32 @{{.*}}(
185f4a2713aSLionel Sambuc // PATH: store i32 1, i32* %{{.*}}, align 4, !tbaa [[TAG_B_a_f32]]
186f4a2713aSLionel Sambuc // PATH: store i32 4, i32* %{{.*}}, align 4, !tbaa [[TAG_B_a_f32]]
187f4a2713aSLionel Sambuc   StructB *b1 = &(C->b);
188f4a2713aSLionel Sambuc   StructB *b2 = &(D->b);
189f4a2713aSLionel Sambuc   // b1, b2 have different context.
190f4a2713aSLionel Sambuc   b1->a.f32 = 1;
191f4a2713aSLionel Sambuc   b2->a.f32 = 4;
192f4a2713aSLionel Sambuc   return b1->a.f32;
193f4a2713aSLionel Sambuc }
194f4a2713aSLionel Sambuc 
195f4a2713aSLionel Sambuc // Make sure that zero-length bitfield works.
196f4a2713aSLionel Sambuc #define ATTR __attribute__ ((ms_struct))
197f4a2713aSLionel Sambuc struct five {
198f4a2713aSLionel Sambuc   char a;
199f4a2713aSLionel Sambuc   int :0;        /* ignored; prior field is not a bitfield. */
200f4a2713aSLionel Sambuc   char b;
201f4a2713aSLionel Sambuc   char c;
202f4a2713aSLionel Sambuc } ATTR;
g13(struct five * a,struct five * b)203f4a2713aSLionel Sambuc char g13(struct five *a, struct five *b) {
204f4a2713aSLionel Sambuc   return a->b;
205f4a2713aSLionel Sambuc // CHECK: define signext i8 @{{.*}}(
206f4a2713aSLionel Sambuc // CHECK: load i8* %{{.*}}, align 1, !tbaa [[TAG_char:!.*]]
207f4a2713aSLionel Sambuc // PATH: define signext i8 @{{.*}}(
208f4a2713aSLionel Sambuc // PATH: load i8* %{{.*}}, align 1, !tbaa [[TAG_five_b:!.*]]
209f4a2713aSLionel Sambuc }
210f4a2713aSLionel Sambuc 
211f4a2713aSLionel Sambuc struct six {
212f4a2713aSLionel Sambuc   char a;
213f4a2713aSLionel Sambuc   int :0;
214f4a2713aSLionel Sambuc   char b;
215f4a2713aSLionel Sambuc   char c;
216f4a2713aSLionel Sambuc };
g14(struct six * a,struct six * b)217f4a2713aSLionel Sambuc char g14(struct six *a, struct six *b) {
218f4a2713aSLionel Sambuc // CHECK: define signext i8 @{{.*}}(
219f4a2713aSLionel Sambuc // CHECK: load i8* %{{.*}}, align 1, !tbaa [[TAG_char]]
220f4a2713aSLionel Sambuc // PATH: define signext i8 @{{.*}}(
221f4a2713aSLionel Sambuc // PATH: load i8* %{{.*}}, align 1, !tbaa [[TAG_six_b:!.*]]
222f4a2713aSLionel Sambuc   return a->b;
223f4a2713aSLionel Sambuc }
224f4a2713aSLionel Sambuc 
225f4a2713aSLionel Sambuc // Types that differ only by name may alias.
226f4a2713aSLionel Sambuc typedef StructS StructS3;
g15(StructS * S,StructS3 * S3,uint64_t count)227f4a2713aSLionel Sambuc uint32_t g15(StructS *S, StructS3 *S3, uint64_t count) {
228f4a2713aSLionel Sambuc // CHECK: define i32 @{{.*}}(
229f4a2713aSLionel Sambuc // CHECK: store i32 1, i32* %{{.*}}, align 4, !tbaa [[TAG_i32]]
230f4a2713aSLionel Sambuc // CHECK: store i32 4, i32* %{{.*}}, align 4, !tbaa [[TAG_i32]]
231f4a2713aSLionel Sambuc // PATH: define i32 @{{.*}}(
232f4a2713aSLionel Sambuc // PATH: store i32 1, i32* %{{.*}}, align 4, !tbaa [[TAG_S_f32]]
233f4a2713aSLionel Sambuc // PATH: store i32 4, i32* %{{.*}}, align 4, !tbaa [[TAG_S_f32]]
234f4a2713aSLionel Sambuc   S->f32 = 1;
235f4a2713aSLionel Sambuc   S3->f32 = 4;
236f4a2713aSLionel Sambuc   return S->f32;
237f4a2713aSLionel Sambuc }
238f4a2713aSLionel Sambuc 
239*0a6a1f1dSLionel Sambuc // CHECK: [[TYPE_char:!.*]] = !{!"omnipotent char", [[TAG_cxx_tbaa:!.*]],
240*0a6a1f1dSLionel Sambuc // CHECK: [[TAG_cxx_tbaa]] = !{!"Simple C/C++ TBAA"}
241*0a6a1f1dSLionel Sambuc // CHECK: [[TAG_i32]] = !{[[TYPE_i32:!.*]], [[TYPE_i32]], i64 0}
242*0a6a1f1dSLionel Sambuc // CHECK: [[TYPE_i32]] = !{!"int", [[TYPE_char]],
243*0a6a1f1dSLionel Sambuc // CHECK: [[TAG_i16]] = !{[[TYPE_i16:!.*]], [[TYPE_i16]], i64 0}
244*0a6a1f1dSLionel Sambuc // CHECK: [[TYPE_i16]] = !{!"short", [[TYPE_char]],
245*0a6a1f1dSLionel Sambuc // CHECK: [[TAG_char]] = !{[[TYPE_char]], [[TYPE_char]], i64 0}
246f4a2713aSLionel Sambuc 
247*0a6a1f1dSLionel Sambuc // PATH: [[TYPE_CHAR:!.*]] = !{!"omnipotent char", !
248*0a6a1f1dSLionel Sambuc // PATH: [[TAG_i32]] = !{[[TYPE_INT:!.*]], [[TYPE_INT]], i64 0}
249*0a6a1f1dSLionel Sambuc // PATH: [[TYPE_INT]] = !{!"int", [[TYPE_CHAR]]
250*0a6a1f1dSLionel Sambuc // PATH: [[TAG_A_f32]] = !{[[TYPE_A:!.*]], [[TYPE_INT]], i64 4}
251*0a6a1f1dSLionel Sambuc // PATH: [[TYPE_A]] = !{!"_ZTS7StructA", [[TYPE_SHORT:!.*]], i64 0, [[TYPE_INT]], i64 4, [[TYPE_SHORT]], i64 8, [[TYPE_INT]], i64 12}
252*0a6a1f1dSLionel Sambuc // PATH: [[TYPE_SHORT:!.*]] = !{!"short", [[TYPE_CHAR]]
253*0a6a1f1dSLionel Sambuc // PATH: [[TAG_A_f16]] = !{[[TYPE_A]], [[TYPE_SHORT]], i64 0}
254*0a6a1f1dSLionel Sambuc // PATH: [[TAG_B_a_f32]] = !{[[TYPE_B:!.*]], [[TYPE_INT]], i64 8}
255*0a6a1f1dSLionel Sambuc // PATH: [[TYPE_B]] = !{!"_ZTS7StructB", [[TYPE_SHORT]], i64 0, [[TYPE_A]], i64 4, [[TYPE_INT]], i64 20}
256*0a6a1f1dSLionel Sambuc // PATH: [[TAG_B_a_f16]] = !{[[TYPE_B]], [[TYPE_SHORT]], i64 4}
257*0a6a1f1dSLionel Sambuc // PATH: [[TAG_B_f32]] = !{[[TYPE_B]], [[TYPE_INT]], i64 20}
258*0a6a1f1dSLionel Sambuc // PATH: [[TAG_B_a_f32_2]] = !{[[TYPE_B]], [[TYPE_INT]], i64 16}
259*0a6a1f1dSLionel Sambuc // PATH: [[TAG_S_f32]] = !{[[TYPE_S:!.*]], [[TYPE_INT]], i64 4}
260*0a6a1f1dSLionel Sambuc // PATH: [[TYPE_S]] = !{!"_ZTS7StructS", [[TYPE_SHORT]], i64 0, [[TYPE_INT]], i64 4}
261*0a6a1f1dSLionel Sambuc // PATH: [[TAG_S_f16]] = !{[[TYPE_S]], [[TYPE_SHORT]], i64 0}
262*0a6a1f1dSLionel Sambuc // PATH: [[TAG_S2_f32]] = !{[[TYPE_S2:!.*]], [[TYPE_INT]], i64 4}
263*0a6a1f1dSLionel Sambuc // PATH: [[TYPE_S2]] = !{!"_ZTS8StructS2", [[TYPE_SHORT]], i64 0, [[TYPE_INT]], i64 4}
264*0a6a1f1dSLionel Sambuc // PATH: [[TAG_S2_f16]] = !{[[TYPE_S2]], [[TYPE_SHORT]], i64 0}
265*0a6a1f1dSLionel Sambuc // PATH: [[TAG_C_b_a_f32]] = !{[[TYPE_C:!.*]], [[TYPE_INT]], i64 12}
266*0a6a1f1dSLionel Sambuc // PATH: [[TYPE_C]] = !{!"_ZTS7StructC", [[TYPE_SHORT]], i64 0, [[TYPE_B]], i64 4, [[TYPE_INT]], i64 28}
267*0a6a1f1dSLionel Sambuc // PATH: [[TAG_D_b_a_f32]] = !{[[TYPE_D:!.*]], [[TYPE_INT]], i64 12}
268*0a6a1f1dSLionel Sambuc // PATH: [[TYPE_D]] = !{!"_ZTS7StructD", [[TYPE_SHORT]], i64 0, [[TYPE_B]], i64 4, [[TYPE_INT]], i64 28, [[TYPE_CHAR]], i64 32}
269*0a6a1f1dSLionel Sambuc // PATH: [[TAG_five_b]] = !{[[TYPE_five:!.*]], [[TYPE_CHAR]], i64 1}
270*0a6a1f1dSLionel Sambuc // PATH: [[TYPE_five]] = !{!"_ZTS4five", [[TYPE_CHAR]], i64 0, [[TYPE_INT]], i64 1, [[TYPE_CHAR]], i64 1, [[TYPE_CHAR]], i64 2}
271*0a6a1f1dSLionel Sambuc // PATH: [[TAG_six_b]] = !{[[TYPE_six:!.*]], [[TYPE_CHAR]], i64 4}
272*0a6a1f1dSLionel Sambuc // PATH: [[TYPE_six]] = !{!"_ZTS3six", [[TYPE_CHAR]], i64 0, [[TYPE_INT]], i64 4, [[TYPE_CHAR]], i64 4, [[TYPE_CHAR]], i64 5}
273