1 // RUN: %clang_cc1 -ffreestanding -emit-llvm-only -triple x86_64-windows-coff -fdump-record-layouts %s | FileCheck %s --check-prefix=CHECK-MS
2 // RUN: %clang_cc1 -ffreestanding -emit-llvm-only -triple x86_64-apple-darwin -fdump-record-layouts %s | FileCheck %s --check-prefix=CHECK-NOTMS
11 typedef struct s_m64 m64
;
14 static int a1
[(sizeof(m64
) == 16) - 1];
16 static int a1
[(sizeof(m64
) == 12) - 1];
23 typedef struct s_m128 m128
;
26 static int a1
[(sizeof(m128
) == 32) - 1];
28 static int a1
[(sizeof(m128
) == 20) - 1];
35 typedef struct s_m128i m128i
;
38 static int a1
[(sizeof(m128i
) == 32) - 1];
40 static int a1
[(sizeof(m128i
) == 20) - 1];
47 typedef struct s_m128d m128d
;
50 static int a1
[(sizeof(m128d
) == 32) - 1];
52 static int a1
[(sizeof(m128d
) == 20) - 1];
59 typedef struct s_m256 m256
;
62 static int a1
[(sizeof(m256
) == 64) - 1];
64 static int a1
[(sizeof(m256
) == 36) - 1];
71 typedef struct s_m256i m256i
;
74 static int a1
[(sizeof(m256i
) == 64) - 1];
76 static int a1
[(sizeof(m256i
) == 36) - 1];
83 typedef struct s_m256d m256d
;
86 static int a1
[(sizeof(m256d
) == 64) - 1];
88 static int a1
[(sizeof(m256d
) == 36) - 1];
95 typedef struct s_m512 m512
;
98 static int a1
[(sizeof(m512
) == 128) - 1];
100 static int a1
[(sizeof(m512
) == 68) - 1];
107 typedef struct s_m512i m512i
;
110 static int a1
[(sizeof(m512i
) == 128) - 1];
112 static int a1
[(sizeof(m512i
) == 68) - 1];
119 typedef struct s_m512d m512d
;
122 static int a1
[(sizeof(m512d
) == 128) - 1];
124 static int a1
[(sizeof(m512d
) == 68) - 1];
127 // CHECK-MS: *** Dumping AST Record Layout
128 // CHECK-MS: 0 | struct s_m64
129 // CHECK-MS: 0 | int a
130 // CHECK-MS: 8 | __m64 b
131 // CHECK-MS: | [sizeof=16, align=8]
132 // CHECK-MS: *** Dumping AST Record Layout
133 // CHECK-MS: 0 | struct s_m128
134 // CHECK-MS: 0 | int a
135 // CHECK-MS: 16 | __m128 b
136 // CHECK-MS: | [sizeof=32, align=16]
137 // CHECK-MS: *** Dumping AST Record Layout
138 // CHECK-MS: 0 | struct s_m128i
139 // CHECK-MS: 0 | int a
140 // CHECK-MS: 16 | __m128i b
141 // CHECK-MS: | [sizeof=32, align=16]
142 // CHECK-MS: *** Dumping AST Record Layout
143 // CHECK-MS: 0 | struct s_m128d
144 // CHECK-MS: 0 | int a
145 // CHECK-MS: 16 | __m128d b
146 // CHECK-MS: | [sizeof=32, align=16]
147 // CHECK-MS: *** Dumping AST Record Layout
148 // CHECK-MS: 0 | struct s_m256
149 // CHECK-MS: 0 | int a
150 // CHECK-MS: 32 | __m256 b
151 // CHECK-MS: | [sizeof=64, align=32]
152 // CHECK-MS: *** Dumping AST Record Layout
153 // CHECK-MS: 0 | struct s_m256i
154 // CHECK-MS: 0 | int a
155 // CHECK-MS: 32 | __m256i b
156 // CHECK-MS: | [sizeof=64, align=32]
157 // CHECK-MS: *** Dumping AST Record Layout
158 // CHECK-MS: 0 | struct s_m256d
159 // CHECK-MS: 0 | int a
160 // CHECK-MS: 32 | __m256d b
161 // CHECK-MS: | [sizeof=64, align=32]
162 // CHECK-MS: *** Dumping AST Record Layout
163 // CHECK-MS: 0 | struct s_m512
164 // CHECK-MS: 0 | int a
165 // CHECK-MS: 64 | __m512 b
166 // CHECK-MS: | [sizeof=128, align=64]
167 // CHECK-MS: *** Dumping AST Record Layout
168 // CHECK-MS: 0 | struct s_m512i
169 // CHECK-MS: 0 | int a
170 // CHECK-MS: 64 | __m512i b
171 // CHECK-MS: | [sizeof=128, align=64]
172 // CHECK-MS: *** Dumping AST Record Layout
173 // CHECK-MS: 0 | struct s_m512d
174 // CHECK-MS: 0 | int a
175 // CHECK-MS: 64 | __m512d b
176 // CHECK-MS: | [sizeof=128, align=64]
178 // CHECK-NOTMS: *** Dumping AST Record Layout
179 // CHECK-NOTMS: 0 | struct s_m64
180 // CHECK-NOTMS: 0 | int a
181 // CHECK-NOTMS: 4 | __m64 b
182 // CHECK-NOTMS: | [sizeof=12, align=1]
183 // CHECK-NOTMS: *** Dumping AST Record Layout
184 // CHECK-NOTMS: 0 | struct s_m128
185 // CHECK-NOTMS: 0 | int a
186 // CHECK-NOTMS: 4 | __m128 b
187 // CHECK-NOTMS: | [sizeof=20, align=1]
188 // CHECK-NOTMS: *** Dumping AST Record Layout
189 // CHECK-NOTMS: 0 | struct s_m128i
190 // CHECK-NOTMS: 0 | int a
191 // CHECK-NOTMS: 4 | __m128i b
192 // CHECK-NOTMS: | [sizeof=20, align=1]
193 // CHECK-NOTMS: *** Dumping AST Record Layout
194 // CHECK-NOTMS: 0 | struct s_m128d
195 // CHECK-NOTMS: 0 | int a
196 // CHECK-NOTMS: 4 | __m128d b
197 // CHECK-NOTMS: | [sizeof=20, align=1]
198 // CHECK-NOTMS: *** Dumping AST Record Layout
199 // CHECK-NOTMS: 0 | struct s_m256
200 // CHECK-NOTMS: 0 | int a
201 // CHECK-NOTMS: 4 | __m256 b
202 // CHECK-NOTMS: | [sizeof=36, align=1]
203 // CHECK-NOTMS: *** Dumping AST Record Layout
204 // CHECK-NOTMS: 0 | struct s_m256i
205 // CHECK-NOTMS: 0 | int a
206 // CHECK-NOTMS: 4 | __m256i b
207 // CHECK-NOTMS: | [sizeof=36, align=1]
208 // CHECK-NOTMS: *** Dumping AST Record Layout
209 // CHECK-NOTMS: 0 | struct s_m256d
210 // CHECK-NOTMS: 0 | int a
211 // CHECK-NOTMS: 4 | __m256d b
212 // CHECK-NOTMS: | [sizeof=36, align=1]
213 // CHECK-NOTMS: *** Dumping AST Record Layout
214 // CHECK-NOTMS: 0 | struct s_m512
215 // CHECK-NOTMS: 0 | int a
216 // CHECK-NOTMS: 4 | __m512 b
217 // CHECK-NOTMS: | [sizeof=68, align=1]
218 // CHECK-NOTMS: *** Dumping AST Record Layout
219 // CHECK-NOTMS: 0 | struct s_m512i
220 // CHECK-NOTMS: 0 | int a
221 // CHECK-NOTMS: 4 | __m512i b
222 // CHECK-NOTMS: | [sizeof=68, align=1]
223 // CHECK-NOTMS: *** Dumping AST Record Layout
224 // CHECK-NOTMS: 0 | struct s_m512d
225 // CHECK-NOTMS: 0 | int a
226 // CHECK-NOTMS: 4 | __m512d b
227 // CHECK-NOTMS: | [sizeof=68, align=1]