1 // Begin X86/GCC/Linux tests ----------------
3 // RUN: %clang -march=i386 -m32 -E -dM %s -o - 2>&1 \
4 // RUN: -target i386-unknown-linux \
5 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_I386_M32
6 // CHECK_I386_M32: #define __LAHF_SAHF__ 1
7 // CHECK_I386_M32: #define __i386 1
8 // CHECK_I386_M32: #define __i386__ 1
9 // CHECK_I386_M32: #define __tune_i386__ 1
10 // CHECK_I386_M32: #define i386 1
11 // RUN: not %clang -march=i386 -m64 -E -dM %s -o - 2>&1 \
12 // RUN: -target i386-unknown-linux \
13 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_I386_M64
14 // CHECK_I386_M64: error: {{.*}}
16 // RUN: %clang -march=i486 -m32 -E -dM %s -o - 2>&1 \
17 // RUN: -target i386-unknown-linux \
18 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_I486_M32
19 // CHECK_I486_M32: #define __i386 1
20 // CHECK_I486_M32: #define __i386__ 1
21 // CHECK_I486_M32: #define __i486 1
22 // CHECK_I486_M32: #define __i486__ 1
23 // CHECK_I486_M32: #define __tune_i486__ 1
24 // CHECK_I486_M32: #define i386 1
25 // RUN: not %clang -march=i486 -m64 -E -dM %s -o - 2>&1 \
26 // RUN: -target i386-unknown-linux \
27 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_I486_M64
28 // CHECK_I486_M64: error: {{.*}}
30 // RUN: %clang -march=i586 -m32 -E -dM %s -o - 2>&1 \
31 // RUN: -target i386-unknown-linux \
32 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_I586_M32
33 // CHECK_I586_M32: #define __i386 1
34 // CHECK_I586_M32: #define __i386__ 1
35 // CHECK_I586_M32: #define __i586 1
36 // CHECK_I586_M32: #define __i586__ 1
37 // CHECK_I586_M32: #define __pentium 1
38 // CHECK_I586_M32: #define __pentium__ 1
39 // CHECK_I586_M32: #define __tune_i586__ 1
40 // CHECK_I586_M32: #define __tune_pentium__ 1
41 // CHECK_I586_M32: #define i386 1
42 // RUN: not %clang -march=i586 -m64 -E -dM %s -o - 2>&1 \
43 // RUN: -target i386-unknown-linux \
44 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_I586_M64
45 // CHECK_I586_M64: error: {{.*}}
47 // RUN: %clang -march=pentium -m32 -E -dM %s -o - 2>&1 \
48 // RUN: -target i386-unknown-linux \
49 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_PENTIUM_M32
50 // CHECK_PENTIUM_M32: #define __i386 1
51 // CHECK_PENTIUM_M32: #define __i386__ 1
52 // CHECK_PENTIUM_M32: #define __i586 1
53 // CHECK_PENTIUM_M32: #define __i586__ 1
54 // CHECK_PENTIUM_M32: #define __pentium 1
55 // CHECK_PENTIUM_M32: #define __pentium__ 1
56 // CHECK_PENTIUM_M32: #define __tune_i586__ 1
57 // CHECK_PENTIUM_M32: #define __tune_pentium__ 1
58 // CHECK_PENTIUM_M32: #define i386 1
59 // RUN: not %clang -march=pentium -m64 -E -dM %s -o - 2>&1 \
60 // RUN: -target i386-unknown-linux \
61 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_PENTIUM_M64
62 // CHECK_PENTIUM_M64: error: {{.*}}
64 // RUN: %clang -march=pentium-mmx -m32 -E -dM %s -o - 2>&1 \
65 // RUN: -target i386-unknown-linux \
66 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_PENTIUM_MMX_M32
67 // CHECK_PENTIUM_MMX_M32: #define __MMX__ 1
68 // CHECK_PENTIUM_MMX_M32: #define __i386 1
69 // CHECK_PENTIUM_MMX_M32: #define __i386__ 1
70 // CHECK_PENTIUM_MMX_M32: #define __i586 1
71 // CHECK_PENTIUM_MMX_M32: #define __i586__ 1
72 // CHECK_PENTIUM_MMX_M32: #define __pentium 1
73 // CHECK_PENTIUM_MMX_M32: #define __pentium__ 1
74 // CHECK_PENTIUM_MMX_M32: #define __pentium_mmx__ 1
75 // CHECK_PENTIUM_MMX_M32: #define __tune_i586__ 1
76 // CHECK_PENTIUM_MMX_M32: #define __tune_pentium__ 1
77 // CHECK_PENTIUM_MMX_M32: #define __tune_pentium_mmx__ 1
78 // CHECK_PENTIUM_MMX_M32: #define i386 1
79 // RUN: not %clang -march=pentium-mmx -m64 -E -dM %s -o - 2>&1 \
80 // RUN: -target i386-unknown-linux \
81 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_PENTIUM_MMX_M64
82 // CHECK_PENTIUM_MMX_M64: error: {{.*}}
84 // RUN: %clang -march=winchip-c6 -m32 -E -dM %s -o - 2>&1 \
85 // RUN: -target i386-unknown-linux \
86 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_WINCHIP_C6_M32
87 // CHECK_WINCHIP_C6_M32: #define __MMX__ 1
88 // CHECK_WINCHIP_C6_M32: #define __i386 1
89 // CHECK_WINCHIP_C6_M32: #define __i386__ 1
90 // CHECK_WINCHIP_C6_M32: #define __i486 1
91 // CHECK_WINCHIP_C6_M32: #define __i486__ 1
92 // CHECK_WINCHIP_C6_M32: #define __tune_i486__ 1
93 // CHECK_WINCHIP_C6_M32: #define i386 1
94 // RUN: not %clang -march=winchip-c6 -m64 -E -dM %s -o - 2>&1 \
95 // RUN: -target i386-unknown-linux \
96 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_WINCHIP_C6_M64
97 // CHECK_WINCHIP_C6_M64: error: {{.*}}
99 // RUN: %clang -march=winchip2 -m32 -E -dM %s -o - 2>&1 \
100 // RUN: -target i386-unknown-linux \
101 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_WINCHIP2_M32
102 // CHECK_WINCHIP2_M32: #define __3dNOW__ 1
103 // CHECK_WINCHIP2_M32: #define __MMX__ 1
104 // CHECK_WINCHIP2_M32: #define __i386 1
105 // CHECK_WINCHIP2_M32: #define __i386__ 1
106 // CHECK_WINCHIP2_M32: #define __i486 1
107 // CHECK_WINCHIP2_M32: #define __i486__ 1
108 // CHECK_WINCHIP2_M32: #define __tune_i486__ 1
109 // CHECK_WINCHIP2_M32: #define i386 1
110 // RUN: not %clang -march=winchip2 -m64 -E -dM %s -o - 2>&1 \
111 // RUN: -target i386-unknown-linux \
112 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_WINCHIP2_M64
113 // CHECK_WINCHIP2_M64: error: {{.*}}
115 // RUN: %clang -march=c3 -m32 -E -dM %s -o - 2>&1 \
116 // RUN: -target i386-unknown-linux \
117 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_C3_M32
118 // CHECK_C3_M32: #define __3dNOW__ 1
119 // CHECK_C3_M32: #define __MMX__ 1
120 // CHECK_C3_M32: #define __i386 1
121 // CHECK_C3_M32: #define __i386__ 1
122 // CHECK_C3_M32: #define __i486 1
123 // CHECK_C3_M32: #define __i486__ 1
124 // CHECK_C3_M32: #define __tune_i486__ 1
125 // CHECK_C3_M32: #define i386 1
126 // RUN: not %clang -march=c3 -m64 -E -dM %s -o - 2>&1 \
127 // RUN: -target i386-unknown-linux \
128 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_C3_M64
129 // CHECK_C3_M64: error: {{.*}}
131 // RUN: %clang -march=c3-2 -m32 -E -dM %s -o - 2>&1 \
132 // RUN: -target i386-unknown-linux \
133 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_C3_2_M32
134 // CHECK_C3_2_M32: #define __MMX__ 1
135 // CHECK_C3_2_M32: #define __SSE__ 1
136 // CHECK_C3_2_M32: #define __i386 1
137 // CHECK_C3_2_M32: #define __i386__ 1
138 // CHECK_C3_2_M32: #define __i686 1
139 // CHECK_C3_2_M32: #define __i686__ 1
140 // CHECK_C3_2_M32: #define __pentiumpro 1
141 // CHECK_C3_2_M32: #define __pentiumpro__ 1
142 // CHECK_C3_2_M32: #define __tune_i686__ 1
143 // CHECK_C3_2_M32: #define __tune_pentium2__ 1
144 // CHECK_C3_2_M32: #define __tune_pentiumpro__ 1
145 // CHECK_C3_2_M32: #define i386 1
146 // RUN: not %clang -march=c3-2 -m64 -E -dM %s -o - 2>&1 \
147 // RUN: -target i386-unknown-linux \
148 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_C3_2_M64
149 // CHECK_C3_2_M64: error: {{.*}}
151 // RUN: %clang -march=i686 -m32 -E -dM %s -o - 2>&1 \
152 // RUN: -target i386-unknown-linux \
153 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_I686_M32
154 // CHECK_I686_M32: #define __i386 1
155 // CHECK_I686_M32: #define __i386__ 1
156 // CHECK_I686_M32: #define __i686 1
157 // CHECK_I686_M32: #define __i686__ 1
158 // CHECK_I686_M32: #define __pentiumpro 1
159 // CHECK_I686_M32: #define __pentiumpro__ 1
160 // CHECK_I686_M32: #define __tune_i686__ 1
161 // CHECK_I686_M32: #define __tune_pentiumpro__ 1
162 // CHECK_I686_M32: #define i386 1
163 // RUN: not %clang -march=i686 -m64 -E -dM %s -o - 2>&1 \
164 // RUN: -target i386-unknown-linux \
165 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_I686_M64
166 // CHECK_I686_M64: error: {{.*}}
168 // RUN: %clang -march=pentiumpro -m32 -E -dM %s -o - 2>&1 \
169 // RUN: -target i386-unknown-linux \
170 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_PENTIUMPRO_M32
171 // CHECK_PENTIUMPRO_M32: #define __i386 1
172 // CHECK_PENTIUMPRO_M32: #define __i386__ 1
173 // CHECK_PENTIUMPRO_M32: #define __i686 1
174 // CHECK_PENTIUMPRO_M32: #define __i686__ 1
175 // CHECK_PENTIUMPRO_M32: #define __pentiumpro 1
176 // CHECK_PENTIUMPRO_M32: #define __pentiumpro__ 1
177 // CHECK_PENTIUMPRO_M32: #define __tune_i686__ 1
178 // CHECK_PENTIUMPRO_M32: #define __tune_pentiumpro__ 1
179 // CHECK_PENTIUMPRO_M32: #define i386 1
180 // RUN: not %clang -march=pentiumpro -m64 -E -dM %s -o - 2>&1 \
181 // RUN: -target i386-unknown-linux \
182 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_PENTIUMPRO_M64
183 // CHECK_PENTIUMPRO_M64: error: {{.*}}
185 // RUN: %clang -march=pentium2 -m32 -E -dM %s -o - 2>&1 \
186 // RUN: -target i386-unknown-linux \
187 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_PENTIUM2_M32
188 // CHECK_PENTIUM2_M32: #define __FXSR__ 1
189 // CHECK_PENTIUM2_M32: #define __MMX__ 1
190 // CHECK_PENTIUM2_M32: #define __i386 1
191 // CHECK_PENTIUM2_M32: #define __i386__ 1
192 // CHECK_PENTIUM2_M32: #define __i686 1
193 // CHECK_PENTIUM2_M32: #define __i686__ 1
194 // CHECK_PENTIUM2_M32: #define __pentiumpro 1
195 // CHECK_PENTIUM2_M32: #define __pentiumpro__ 1
196 // CHECK_PENTIUM2_M32: #define __tune_i686__ 1
197 // CHECK_PENTIUM2_M32: #define __tune_pentium2__ 1
198 // CHECK_PENTIUM2_M32: #define __tune_pentiumpro__ 1
199 // CHECK_PENTIUM2_M32: #define i386 1
200 // RUN: not %clang -march=pentium2 -m64 -E -dM %s -o - 2>&1 \
201 // RUN: -target i386-unknown-linux \
202 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_PENTIUM2_M64
203 // CHECK_PENTIUM2_M64: error: {{.*}}
205 // RUN: %clang -march=pentium3 -m32 -E -dM %s -o - 2>&1 \
206 // RUN: -target i386-unknown-linux \
207 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_PENTIUM3_M32
208 // CHECK_PENTIUM3_M32: #define __MMX__ 1
209 // CHECK_PENTIUM3_M32: #define __SSE__ 1
210 // CHECK_PENTIUM3_M32: #define __i386 1
211 // CHECK_PENTIUM3_M32: #define __i386__ 1
212 // CHECK_PENTIUM3_M32: #define __i686 1
213 // CHECK_PENTIUM3_M32: #define __i686__ 1
214 // CHECK_PENTIUM3_M32: #define __pentiumpro 1
215 // CHECK_PENTIUM3_M32: #define __pentiumpro__ 1
216 // CHECK_PENTIUM3_M32: #define __tune_i686__ 1
217 // CHECK_PENTIUM3_M32: #define __tune_pentium2__ 1
218 // CHECK_PENTIUM3_M32: #define __tune_pentium3__ 1
219 // CHECK_PENTIUM3_M32: #define __tune_pentiumpro__ 1
220 // CHECK_PENTIUM3_M32: #define i386 1
221 // RUN: not %clang -march=pentium3 -m64 -E -dM %s -o - 2>&1 \
222 // RUN: -target i386-unknown-linux \
223 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_PENTIUM3_M64
224 // CHECK_PENTIUM3_M64: error: {{.*}}
226 // RUN: %clang -march=pentium3m -m32 -E -dM %s -o - 2>&1 \
227 // RUN: -target i386-unknown-linux \
228 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_PENTIUM3M_M32
229 // CHECK_PENTIUM3M_M32: #define __MMX__ 1
230 // CHECK_PENTIUM3M_M32: #define __SSE__ 1
231 // CHECK_PENTIUM3M_M32: #define __i386 1
232 // CHECK_PENTIUM3M_M32: #define __i386__ 1
233 // CHECK_PENTIUM3M_M32: #define __i686 1
234 // CHECK_PENTIUM3M_M32: #define __i686__ 1
235 // CHECK_PENTIUM3M_M32: #define __pentiumpro 1
236 // CHECK_PENTIUM3M_M32: #define __pentiumpro__ 1
237 // CHECK_PENTIUM3M_M32: #define __tune_i686__ 1
238 // CHECK_PENTIUM3M_M32: #define __tune_pentiumpro__ 1
239 // CHECK_PENTIUM3M_M32: #define i386 1
240 // RUN: not %clang -march=pentium3m -m64 -E -dM %s -o - 2>&1 \
241 // RUN: -target i386-unknown-linux \
242 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_PENTIUM3M_M64
243 // CHECK_PENTIUM3M_M64: error: {{.*}}
245 // RUN: %clang -march=pentium-m -m32 -E -dM %s -o - 2>&1 \
246 // RUN: -target i386-unknown-linux \
247 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_PENTIUM_M_M32
248 // CHECK_PENTIUM_M_M32: #define __MMX__ 1
249 // CHECK_PENTIUM_M_M32: #define __SSE2__ 1
250 // CHECK_PENTIUM_M_M32: #define __SSE__ 1
251 // CHECK_PENTIUM_M_M32: #define __i386 1
252 // CHECK_PENTIUM_M_M32: #define __i386__ 1
253 // CHECK_PENTIUM_M_M32: #define __i686 1
254 // CHECK_PENTIUM_M_M32: #define __i686__ 1
255 // CHECK_PENTIUM_M_M32: #define __pentiumpro 1
256 // CHECK_PENTIUM_M_M32: #define __pentiumpro__ 1
257 // CHECK_PENTIUM_M_M32: #define __tune_i686__ 1
258 // CHECK_PENTIUM_M_M32: #define __tune_pentiumpro__ 1
259 // CHECK_PENTIUM_M_M32: #define i386 1
260 // RUN: not %clang -march=pentium-m -m64 -E -dM %s -o - 2>&1 \
261 // RUN: -target i386-unknown-linux \
262 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_PENTIUM_M_M64
263 // CHECK_PENTIUM_M_M64: error: {{.*}}
265 // RUN: %clang -march=pentium4 -m32 -E -dM %s -o - 2>&1 \
266 // RUN: -target i386-unknown-linux \
267 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_PENTIUM4_M32
268 // CHECK_PENTIUM4_M32: #define __MMX__ 1
269 // CHECK_PENTIUM4_M32: #define __SSE2__ 1
270 // CHECK_PENTIUM4_M32: #define __SSE__ 1
271 // CHECK_PENTIUM4_M32: #define __i386 1
272 // CHECK_PENTIUM4_M32: #define __i386__ 1
273 // CHECK_PENTIUM4_M32: #define __pentium4 1
274 // CHECK_PENTIUM4_M32: #define __pentium4__ 1
275 // CHECK_PENTIUM4_M32: #define __tune_pentium4__ 1
276 // CHECK_PENTIUM4_M32: #define i386 1
277 // RUN: not %clang -march=pentium4 -m64 -E -dM %s -o - 2>&1 \
278 // RUN: -target i386-unknown-linux \
279 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_PENTIUM4_M64
280 // CHECK_PENTIUM4_M64: error: {{.*}}
282 // RUN: %clang -march=pentium4m -m32 -E -dM %s -o - 2>&1 \
283 // RUN: -target i386-unknown-linux \
284 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_PENTIUM4M_M32
285 // CHECK_PENTIUM4M_M32: #define __MMX__ 1
286 // CHECK_PENTIUM4M_M32: #define __SSE2__ 1
287 // CHECK_PENTIUM4M_M32: #define __SSE__ 1
288 // CHECK_PENTIUM4M_M32: #define __i386 1
289 // CHECK_PENTIUM4M_M32: #define __i386__ 1
290 // CHECK_PENTIUM4M_M32: #define __pentium4 1
291 // CHECK_PENTIUM4M_M32: #define __pentium4__ 1
292 // CHECK_PENTIUM4M_M32: #define __tune_pentium4__ 1
293 // CHECK_PENTIUM4M_M32: #define i386 1
294 // RUN: not %clang -march=pentium4m -m64 -E -dM %s -o - 2>&1 \
295 // RUN: -target i386-unknown-linux \
296 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_PENTIUM4M_M64
297 // CHECK_PENTIUM4M_M64: error: {{.*}}
299 // RUN: %clang -march=yonah -m32 -E -dM %s -o - 2>&1 \
300 // RUN: -target i386-unknown-linux \
301 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_YONAH_M32
302 // CHECK_YONAH_M32: #define __MMX__ 1
303 // CHECK_YONAH_M32: #define __SSE2__ 1
304 // CHECK_YONAH_M32: #define __SSE3__ 1
305 // CHECK_YONAH_M32: #define __SSE__ 1
306 // CHECK_YONAH_M32: #define __i386 1
307 // CHECK_YONAH_M32: #define __i386__ 1
308 // CHECK_YONAH_M32: #define __nocona 1
309 // CHECK_YONAH_M32: #define __nocona__ 1
310 // CHECK_YONAH_M32: #define __tune_nocona__ 1
311 // CHECK_YONAH_M32: #define i386 1
312 // RUN: not %clang -march=yonah -m64 -E -dM %s -o - 2>&1 \
313 // RUN: -target i386-unknown-linux \
314 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_YONAH_M64
315 // CHECK_YONAH_M64: error: {{.*}}
317 // RUN: %clang -march=prescott -m32 -E -dM %s -o - 2>&1 \
318 // RUN: -target i386-unknown-linux \
319 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_PRESCOTT_M32
320 // CHECK_PRESCOTT_M32: #define __MMX__ 1
321 // CHECK_PRESCOTT_M32: #define __SSE2__ 1
322 // CHECK_PRESCOTT_M32: #define __SSE3__ 1
323 // CHECK_PRESCOTT_M32: #define __SSE__ 1
324 // CHECK_PRESCOTT_M32: #define __i386 1
325 // CHECK_PRESCOTT_M32: #define __i386__ 1
326 // CHECK_PRESCOTT_M32: #define __nocona 1
327 // CHECK_PRESCOTT_M32: #define __nocona__ 1
328 // CHECK_PRESCOTT_M32: #define __tune_nocona__ 1
329 // CHECK_PRESCOTT_M32: #define i386 1
330 // RUN: not %clang -march=prescott -m64 -E -dM %s -o - 2>&1 \
331 // RUN: -target i386-unknown-linux \
332 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_PRESCOTT_M64
333 // CHECK_PRESCOTT_M64: error: {{.*}}
335 // RUN: %clang -march=nocona -m32 -E -dM %s -o - 2>&1 \
336 // RUN: -target i386-unknown-linux \
337 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_NOCONA_M32
338 // CHECK_NOCONA_M32: #define __MMX__ 1
339 // CHECK_NOCONA_M32: #define __SSE2__ 1
340 // CHECK_NOCONA_M32: #define __SSE3__ 1
341 // CHECK_NOCONA_M32: #define __SSE__ 1
342 // CHECK_NOCONA_M32: #define __i386 1
343 // CHECK_NOCONA_M32: #define __i386__ 1
344 // CHECK_NOCONA_M32: #define __nocona 1
345 // CHECK_NOCONA_M32: #define __nocona__ 1
346 // CHECK_NOCONA_M32: #define __tune_nocona__ 1
347 // CHECK_NOCONA_M32: #define i386 1
348 // RUN: %clang -march=nocona -m64 -E -dM %s -o - 2>&1 \
349 // RUN: -target i386-unknown-linux \
350 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_NOCONA_M64
351 // CHECK_NOCONA_M64: #define __MMX__ 1
352 // CHECK_NOCONA_M64: #define __SSE2_MATH__ 1
353 // CHECK_NOCONA_M64: #define __SSE2__ 1
354 // CHECK_NOCONA_M64: #define __SSE3__ 1
355 // CHECK_NOCONA_M64: #define __SSE_MATH__ 1
356 // CHECK_NOCONA_M64: #define __SSE__ 1
357 // CHECK_NOCONA_M64: #define __amd64 1
358 // CHECK_NOCONA_M64: #define __amd64__ 1
359 // CHECK_NOCONA_M64: #define __nocona 1
360 // CHECK_NOCONA_M64: #define __nocona__ 1
361 // CHECK_NOCONA_M64: #define __tune_nocona__ 1
362 // CHECK_NOCONA_M64: #define __x86_64 1
363 // CHECK_NOCONA_M64: #define __x86_64__ 1
365 // RUN: %clang -march=core2 -m32 -E -dM %s -o - 2>&1 \
366 // RUN: -target i386-unknown-linux \
367 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_CORE2_M32
368 // RUN: %clang -march=penryn -m32 -E -dM %s -o - 2>&1 \
369 // RUN: -target i386-unknown-linux \
370 // RUN: | FileCheck -match-full-lines %s -check-prefixes=CHECK_CORE2_M32,CHECK_PENRYN_M32
371 // CHECK_CORE2_M32: #define __MMX__ 1
372 // CHECK_CORE2_M32: #define __SSE2__ 1
373 // CHECK_CORE2_M32: #define __SSE3__ 1
374 // CHECK_PENRYN_M32: #define __SSE4_1__ 1
375 // CHECK_CORE2_M32: #define __SSE__ 1
376 // CHECK_CORE2_M32: #define __SSSE3__ 1
377 // CHECK_CORE2_M32: #define __core2 1
378 // CHECK_CORE2_M32: #define __core2__ 1
379 // CHECK_CORE2_M32: #define __i386 1
380 // CHECK_CORE2_M32: #define __i386__ 1
381 // CHECK_CORE2_M32: #define __tune_core2__ 1
382 // CHECK_CORE2_M32: #define i386 1
384 // RUN: %clang -march=core2 -m64 -E -dM %s -o - 2>&1 \
385 // RUN: -target i386-unknown-linux \
386 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_CORE2_M64
387 // RUN: %clang -march=penryn -m64 -E -dM %s -o - 2>&1 \
388 // RUN: -target i386-unknown-linux \
389 // RUN: | FileCheck -match-full-lines %s -check-prefixes=CHECK_CORE2_M64,CHECK_PENRYN_M64
390 // CHECK_CORE2_M64: #define __MMX__ 1
391 // CHECK_CORE2_M64: #define __SSE2_MATH__ 1
392 // CHECK_CORE2_M64: #define __SSE2__ 1
393 // CHECK_CORE2_M64: #define __SSE3__ 1
394 // CHECK_PENRYN_M64: #define __SSE4_1__ 1
395 // CHECK_CORE2_M64: #define __SSE_MATH__ 1
396 // CHECK_CORE2_M64: #define __SSE__ 1
397 // CHECK_CORE2_M64: #define __SSSE3__ 1
398 // CHECK_CORE2_M64: #define __amd64 1
399 // CHECK_CORE2_M64: #define __amd64__ 1
400 // CHECK_CORE2_M64: #define __core2 1
401 // CHECK_CORE2_M64: #define __core2__ 1
402 // CHECK_CORE2_M64: #define __tune_core2__ 1
403 // CHECK_CORE2_M64: #define __x86_64 1
404 // CHECK_CORE2_M64: #define __x86_64__ 1
406 // RUN: %clang -march=corei7 -m32 -E -dM %s -o - 2>&1 \
407 // RUN: -target i386-unknown-linux \
408 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_COREI7_M32
409 // RUN: %clang -march=nehalem -m32 -E -dM %s -o - 2>&1 \
410 // RUN: -target i386-unknown-linux \
411 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_COREI7_M32
412 // RUN: %clang -march=westmere -m32 -E -dM %s -o - 2>&1 \
413 // RUN: -target i386-unknown-linux \
414 // RUN: | FileCheck -match-full-lines %s -check-prefixes=CHECK_COREI7_M32,CHECK_WESTMERE_M32
415 // CHECK_COREI7_M32: #define __CRC32__ 1
416 // CHECK_COREI7_M32: #define __MMX__ 1
417 // CHECK_WESTMERE_M32: #define __PCLMUL__ 1
418 // CHECK_COREI7_M32: #define __POPCNT__ 1
419 // CHECK_COREI7_M32: #define __SSE2__ 1
420 // CHECK_COREI7_M32: #define __SSE3__ 1
421 // CHECK_COREI7_M32: #define __SSE4_1__ 1
422 // CHECK_COREI7_M32: #define __SSE4_2__ 1
423 // CHECK_COREI7_M32: #define __SSE__ 1
424 // CHECK_COREI7_M32: #define __SSSE3__ 1
425 // CHECK_COREI7_M32: #define __corei7 1
426 // CHECK_COREI7_M32: #define __corei7__ 1
427 // CHECK_COREI7_M32: #define __i386 1
428 // CHECK_COREI7_M32: #define __i386__ 1
429 // CHECK_COREI7_M32: #define __tune_corei7__ 1
430 // CHECK_COREI7_M32: #define i386 1
432 // RUN: %clang -march=corei7 -m64 -E -dM %s -o - 2>&1 \
433 // RUN: -target i386-unknown-linux \
434 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_COREI7_M64
435 // RUN: %clang -march=nehalem -m64 -E -dM %s -o - 2>&1 \
436 // RUN: -target i386-unknown-linux \
437 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_COREI7_M64
438 // RUN: %clang -march=westmere -m64 -E -dM %s -o - 2>&1 \
439 // RUN: -target i386-unknown-linux \
440 // RUN: | FileCheck -match-full-lines %s -check-prefixes=CHECK_COREI7_M64,CHECK_WESTMERE_M64
441 // CHECK_COREI7_M64: #define __CRC32__ 1
442 // CHECK_COREI7_M64: #define __MMX__ 1
443 // CHECK_WESTMERE_M64: #define __PCLMUL__ 1
444 // CHECK_COREI7_M64: #define __POPCNT__ 1
445 // CHECK_COREI7_M64: #define __SSE2_MATH__ 1
446 // CHECK_COREI7_M64: #define __SSE2__ 1
447 // CHECK_COREI7_M64: #define __SSE3__ 1
448 // CHECK_COREI7_M64: #define __SSE4_1__ 1
449 // CHECK_COREI7_M64: #define __SSE4_2__ 1
450 // CHECK_COREI7_M64: #define __SSE_MATH__ 1
451 // CHECK_COREI7_M64: #define __SSE__ 1
452 // CHECK_COREI7_M64: #define __SSSE3__ 1
453 // CHECK_COREI7_M64: #define __amd64 1
454 // CHECK_COREI7_M64: #define __amd64__ 1
455 // CHECK_COREI7_M64: #define __corei7 1
456 // CHECK_COREI7_M64: #define __corei7__ 1
457 // CHECK_COREI7_M64: #define __tune_corei7__ 1
458 // CHECK_COREI7_M64: #define __x86_64 1
459 // CHECK_COREI7_M64: #define __x86_64__ 1
461 // RUN: %clang -march=corei7-avx -m32 -E -dM %s -o - 2>&1 \
462 // RUN: -target i386-unknown-linux \
463 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_COREI7_AVX_M32
464 // RUN: %clang -march=sandybridge -m32 -E -dM %s -o - 2>&1 \
465 // RUN: -target i386-unknown-linux \
466 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_COREI7_AVX_M32
467 // CHECK_COREI7_AVX_M32: #define __AVX__ 1
468 // CHECK_COREI7_AVX_M32: #define __MMX__ 1
469 // CHECK_COREI7_AVX_M32: #define __PCLMUL__ 1
470 // CHECK_COREI7_AVX_M32-NOT: __RDRND__
471 // CHECK_COREI7_AVX_M32: #define __POPCNT__ 1
472 // CHECK_COREI7_AVX_M32: #define __SSE2__ 1
473 // CHECK_COREI7_AVX_M32: #define __SSE3__ 1
474 // CHECK_COREI7_AVX_M32: #define __SSE4_1__ 1
475 // CHECK_COREI7_AVX_M32: #define __SSE4_2__ 1
476 // CHECK_COREI7_AVX_M32: #define __SSE__ 1
477 // CHECK_COREI7_AVX_M32: #define __SSSE3__ 1
478 // CHECK_COREI7_AVX_M32: #define __XSAVEOPT__ 1
479 // CHECK_COREI7_AVX_M32: #define __XSAVE__ 1
480 // CHECK_COREI7_AVX_M32: #define __corei7 1
481 // CHECK_COREI7_AVX_M32: #define __corei7__ 1
482 // CHECK_COREI7_AVX_M32: #define __i386 1
483 // CHECK_COREI7_AVX_M32: #define __i386__ 1
484 // CHECK_COREI7_AVX_M32: #define __tune_corei7__ 1
485 // CHECK_COREI7_AVX_M32: #define i386 1
487 // RUN: %clang -march=corei7-avx -m64 -E -dM %s -o - 2>&1 \
488 // RUN: -target i386-unknown-linux \
489 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_COREI7_AVX_M64
490 // RUN: %clang -march=sandybridge -m64 -E -dM %s -o - 2>&1 \
491 // RUN: -target i386-unknown-linux \
492 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_COREI7_AVX_M64
493 // CHECK_COREI7_AVX_M64: #define __AVX__ 1
494 // CHECK_COREI7_AVX_M64: #define __MMX__ 1
495 // CHECK_COREI7_AVX_M64: #define __PCLMUL__ 1
496 // CHECK_COREI7_AVX_M64-NOT: __RDRND__
497 // CHECK_COREI7_AVX_M64: #define __POPCNT__ 1
498 // CHECK_COREI7_AVX_M64: #define __SSE2_MATH__ 1
499 // CHECK_COREI7_AVX_M64: #define __SSE2__ 1
500 // CHECK_COREI7_AVX_M64: #define __SSE3__ 1
501 // CHECK_COREI7_AVX_M64: #define __SSE4_1__ 1
502 // CHECK_COREI7_AVX_M64: #define __SSE4_2__ 1
503 // CHECK_COREI7_AVX_M64: #define __SSE_MATH__ 1
504 // CHECK_COREI7_AVX_M64: #define __SSE__ 1
505 // CHECK_COREI7_AVX_M64: #define __SSSE3__ 1
506 // CHECK_COREI7_AVX_M64: #define __XSAVEOPT__ 1
507 // CHECK_COREI7_AVX_M64: #define __XSAVE__ 1
508 // CHECK_COREI7_AVX_M64: #define __amd64 1
509 // CHECK_COREI7_AVX_M64: #define __amd64__ 1
510 // CHECK_COREI7_AVX_M64: #define __corei7 1
511 // CHECK_COREI7_AVX_M64: #define __corei7__ 1
512 // CHECK_COREI7_AVX_M64: #define __tune_corei7__ 1
513 // CHECK_COREI7_AVX_M64: #define __x86_64 1
514 // CHECK_COREI7_AVX_M64: #define __x86_64__ 1
516 // RUN: %clang -march=core-avx-i -m32 -E -dM %s -o - 2>&1 \
517 // RUN: -target i386-unknown-linux \
518 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_CORE_AVX_I_M32
519 // RUN: %clang -march=ivybridge -m32 -E -dM %s -o - 2>&1 \
520 // RUN: -target i386-unknown-linux \
521 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_CORE_AVX_I_M32
522 // CHECK_CORE_AVX_I_M32: #define __AVX__ 1
523 // CHECK_CORE_AVX_I_M32: #define __F16C__ 1
524 // CHECK_CORE_AVX_I_M32: #define __MMX__ 1
525 // CHECK_CORE_AVX_I_M32: #define __PCLMUL__ 1
526 // CHECK_CORE_AVX_I_M32: #define __RDRND__ 1
527 // CHECK_CORE_AVX_I_M32: #define __SSE2__ 1
528 // CHECK_CORE_AVX_I_M32: #define __SSE3__ 1
529 // CHECK_CORE_AVX_I_M32: #define __SSE4_1__ 1
530 // CHECK_CORE_AVX_I_M32: #define __SSE4_2__ 1
531 // CHECK_CORE_AVX_I_M32: #define __SSE__ 1
532 // CHECK_CORE_AVX_I_M32: #define __SSSE3__ 1
533 // CHECK_CORE_AVX_I_M32: #define __XSAVEOPT__ 1
534 // CHECK_CORE_AVX_I_M32: #define __XSAVE__ 1
535 // CHECK_CORE_AVX_I_M32: #define __corei7 1
536 // CHECK_CORE_AVX_I_M32: #define __corei7__ 1
537 // CHECK_CORE_AVX_I_M32: #define __i386 1
538 // CHECK_CORE_AVX_I_M32: #define __i386__ 1
539 // CHECK_CORE_AVX_I_M32: #define __tune_corei7__ 1
540 // CHECK_CORE_AVX_I_M32: #define i386 1
542 // RUN: %clang -march=core-avx-i -m64 -E -dM %s -o - 2>&1 \
543 // RUN: -target i386-unknown-linux \
544 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_CORE_AVX_I_M64
545 // RUN: %clang -march=ivybridge -m64 -E -dM %s -o - 2>&1 \
546 // RUN: -target i386-unknown-linux \
547 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_CORE_AVX_I_M64
548 // CHECK_CORE_AVX_I_M64: #define __AVX__ 1
549 // CHECK_CORE_AVX_I_M64: #define __F16C__ 1
550 // CHECK_CORE_AVX_I_M64: #define __MMX__ 1
551 // CHECK_CORE_AVX_I_M64: #define __PCLMUL__ 1
552 // CHECK_CORE_AVX_I_M64: #define __RDRND__ 1
553 // CHECK_CORE_AVX_I_M64: #define __SSE2_MATH__ 1
554 // CHECK_CORE_AVX_I_M64: #define __SSE2__ 1
555 // CHECK_CORE_AVX_I_M64: #define __SSE3__ 1
556 // CHECK_CORE_AVX_I_M64: #define __SSE4_1__ 1
557 // CHECK_CORE_AVX_I_M64: #define __SSE4_2__ 1
558 // CHECK_CORE_AVX_I_M64: #define __SSE_MATH__ 1
559 // CHECK_CORE_AVX_I_M64: #define __SSE__ 1
560 // CHECK_CORE_AVX_I_M64: #define __SSSE3__ 1
561 // CHECK_CORE_AVX_I_M64: #define __XSAVEOPT__ 1
562 // CHECK_CORE_AVX_I_M64: #define __XSAVE__ 1
563 // CHECK_CORE_AVX_I_M64: #define __amd64 1
564 // CHECK_CORE_AVX_I_M64: #define __amd64__ 1
565 // CHECK_CORE_AVX_I_M64: #define __corei7 1
566 // CHECK_CORE_AVX_I_M64: #define __corei7__ 1
567 // CHECK_CORE_AVX_I_M64: #define __tune_corei7__ 1
568 // CHECK_CORE_AVX_I_M64: #define __x86_64 1
569 // CHECK_CORE_AVX_I_M64: #define __x86_64__ 1
571 // RUN: %clang -march=core-avx2 -m32 -E -dM %s -o - 2>&1 \
572 // RUN: -target i386-unknown-linux \
573 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_CORE_AVX2_M32
574 // RUN: %clang -march=haswell -m32 -E -dM %s -o - 2>&1 \
575 // RUN: -target i386-unknown-linux \
576 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_CORE_AVX2_M32
577 // CHECK_CORE_AVX2_M32: #define __AVX2__ 1
578 // CHECK_CORE_AVX2_M32: #define __AVX__ 1
579 // CHECK_CORE_AVX2_M32: #define __BMI2__ 1
580 // CHECK_CORE_AVX2_M32: #define __BMI__ 1
581 // CHECK_CORE_AVX2_M32: #define __F16C__ 1
582 // CHECK_CORE_AVX2_M32: #define __FMA__ 1
583 // CHECK_CORE_AVX2_M32: #define __INVPCID__ 1
584 // CHECK_CORE_AVX2_M32: #define __LAHF_SAHF__ 1
585 // CHECK_CORE_AVX2_M32: #define __LZCNT__ 1
586 // CHECK_CORE_AVX2_M32: #define __MMX__ 1
587 // CHECK_CORE_AVX2_M32: #define __MOVBE__ 1
588 // CHECK_CORE_AVX2_M32: #define __PCLMUL__ 1
589 // CHECK_CORE_AVX2_M32: #define __POPCNT__ 1
590 // CHECK_CORE_AVX2_M32: #define __RDRND__ 1
591 // CHECK_CORE_AVX2_M32: #define __SSE2__ 1
592 // CHECK_CORE_AVX2_M32: #define __SSE3__ 1
593 // CHECK_CORE_AVX2_M32: #define __SSE4_1__ 1
594 // CHECK_CORE_AVX2_M32: #define __SSE4_2__ 1
595 // CHECK_CORE_AVX2_M32: #define __SSE__ 1
596 // CHECK_CORE_AVX2_M32: #define __SSSE3__ 1
597 // CHECK_CORE_AVX2_M32: #define __XSAVEOPT__ 1
598 // CHECK_CORE_AVX2_M32: #define __XSAVE__ 1
599 // CHECK_CORE_AVX2_M32: #define __corei7 1
600 // CHECK_CORE_AVX2_M32: #define __corei7__ 1
601 // CHECK_CORE_AVX2_M32: #define __i386 1
602 // CHECK_CORE_AVX2_M32: #define __i386__ 1
603 // CHECK_CORE_AVX2_M32: #define __tune_corei7__ 1
604 // CHECK_CORE_AVX2_M32: #define i386 1
606 // RUN: %clang -march=core-avx2 -m64 -E -dM %s -o - 2>&1 \
607 // RUN: -target i386-unknown-linux \
608 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_CORE_AVX2_M64
609 // RUN: %clang -march=haswell -m64 -E -dM %s -o - 2>&1 \
610 // RUN: -target i386-unknown-linux \
611 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_CORE_AVX2_M64
612 // CHECK_CORE_AVX2_M64: #define __AVX2__ 1
613 // CHECK_CORE_AVX2_M64: #define __AVX__ 1
614 // CHECK_CORE_AVX2_M64: #define __BMI2__ 1
615 // CHECK_CORE_AVX2_M64: #define __BMI__ 1
616 // CHECK_CORE_AVX2_M64: #define __F16C__ 1
617 // CHECK_CORE_AVX2_M64: #define __FMA__ 1
618 // CHECK_CORE_AVX2_M64: #define __INVPCID__ 1
619 // CHECK_CORE_AVX2_M64: #define __LAHF_SAHF__ 1
620 // CHECK_CORE_AVX2_M64: #define __LZCNT__ 1
621 // CHECK_CORE_AVX2_M64: #define __MMX__ 1
622 // CHECK_CORE_AVX2_M64: #define __MOVBE__ 1
623 // CHECK_CORE_AVX2_M64: #define __PCLMUL__ 1
624 // CHECK_CORE_AVX2_M64: #define __POPCNT__ 1
625 // CHECK_CORE_AVX2_M64: #define __RDRND__ 1
626 // CHECK_CORE_AVX2_M64: #define __SSE2_MATH__ 1
627 // CHECK_CORE_AVX2_M64: #define __SSE2__ 1
628 // CHECK_CORE_AVX2_M64: #define __SSE3__ 1
629 // CHECK_CORE_AVX2_M64: #define __SSE4_1__ 1
630 // CHECK_CORE_AVX2_M64: #define __SSE4_2__ 1
631 // CHECK_CORE_AVX2_M64: #define __SSE_MATH__ 1
632 // CHECK_CORE_AVX2_M64: #define __SSE__ 1
633 // CHECK_CORE_AVX2_M64: #define __SSSE3__ 1
634 // CHECK_CORE_AVX2_M64: #define __XSAVEOPT__ 1
635 // CHECK_CORE_AVX2_M64: #define __XSAVE__ 1
636 // CHECK_CORE_AVX2_M64: #define __amd64 1
637 // CHECK_CORE_AVX2_M64: #define __amd64__ 1
638 // CHECK_CORE_AVX2_M64: #define __corei7 1
639 // CHECK_CORE_AVX2_M64: #define __corei7__ 1
640 // CHECK_CORE_AVX2_M64: #define __tune_corei7__ 1
641 // CHECK_CORE_AVX2_M64: #define __x86_64 1
642 // CHECK_CORE_AVX2_M64: #define __x86_64__ 1
644 // RUN: %clang -march=broadwell -m32 -E -dM %s -o - 2>&1 \
645 // RUN: -target i386-unknown-linux \
646 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_BROADWELL_M32
647 // CHECK_BROADWELL_M32: #define __ADX__ 1
648 // CHECK_BROADWELL_M32: #define __AVX2__ 1
649 // CHECK_BROADWELL_M32: #define __AVX__ 1
650 // CHECK_BROADWELL_M32: #define __BMI2__ 1
651 // CHECK_BROADWELL_M32: #define __BMI__ 1
652 // CHECK_BROADWELL_M32: #define __F16C__ 1
653 // CHECK_BROADWELL_M32: #define __FMA__ 1
654 // CHECK_BROADWELL_M32: #define __INVPCID__ 1
655 // CHECK_BROADWELL_M32: #define __LAHF_SAHF__ 1
656 // CHECK_BROADWELL_M32: #define __LZCNT__ 1
657 // CHECK_BROADWELL_M32: #define __MMX__ 1
658 // CHECK_BROADWELL_M32: #define __MOVBE__ 1
659 // CHECK_BROADWELL_M32: #define __PCLMUL__ 1
660 // CHECK_BROADWELL_M32: #define __POPCNT__ 1
661 // CHECK_BROADWELL_M32: #define __PRFCHW__ 1
662 // CHECK_BROADWELL_M32: #define __RDRND__ 1
663 // CHECK_BROADWELL_M32: #define __RDSEED__ 1
664 // CHECK_BROADWELL_M32: #define __SSE2__ 1
665 // CHECK_BROADWELL_M32: #define __SSE3__ 1
666 // CHECK_BROADWELL_M32: #define __SSE4_1__ 1
667 // CHECK_BROADWELL_M32: #define __SSE4_2__ 1
668 // CHECK_BROADWELL_M32: #define __SSE__ 1
669 // CHECK_BROADWELL_M32: #define __SSSE3__ 1
670 // CHECK_BROADWELL_M32: #define __XSAVEOPT__ 1
671 // CHECK_BROADWELL_M32: #define __XSAVE__ 1
672 // CHECK_BROADWELL_M32: #define __corei7 1
673 // CHECK_BROADWELL_M32: #define __corei7__ 1
674 // CHECK_BROADWELL_M32: #define __i386 1
675 // CHECK_BROADWELL_M32: #define __i386__ 1
676 // CHECK_BROADWELL_M32: #define __tune_corei7__ 1
677 // CHECK_BROADWELL_M32: #define i386 1
679 // RUN: %clang -march=broadwell -m64 -E -dM %s -o - 2>&1 \
680 // RUN: -target i386-unknown-linux \
681 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_BROADWELL_M64
682 // CHECK_BROADWELL_M64: #define __ADX__ 1
683 // CHECK_BROADWELL_M64: #define __AVX2__ 1
684 // CHECK_BROADWELL_M64: #define __AVX__ 1
685 // CHECK_BROADWELL_M64: #define __BMI2__ 1
686 // CHECK_BROADWELL_M64: #define __BMI__ 1
687 // CHECK_BROADWELL_M64: #define __F16C__ 1
688 // CHECK_BROADWELL_M64: #define __FMA__ 1
689 // CHECK_BROADWELL_M64: #define __INVPCID__ 1
690 // CHECK_BROADWELL_M64: #define __LAHF_SAHF__ 1
691 // CHECK_BROADWELL_M64: #define __LZCNT__ 1
692 // CHECK_BROADWELL_M64: #define __MMX__ 1
693 // CHECK_BROADWELL_M64: #define __MOVBE__ 1
694 // CHECK_BROADWELL_M64: #define __PCLMUL__ 1
695 // CHECK_BROADWELL_M64: #define __POPCNT__ 1
696 // CHECK_BROADWELL_M64: #define __PRFCHW__ 1
697 // CHECK_BROADWELL_M64: #define __RDRND__ 1
698 // CHECK_BROADWELL_M64: #define __RDSEED__ 1
699 // CHECK_BROADWELL_M64: #define __SSE2_MATH__ 1
700 // CHECK_BROADWELL_M64: #define __SSE2__ 1
701 // CHECK_BROADWELL_M64: #define __SSE3__ 1
702 // CHECK_BROADWELL_M64: #define __SSE4_1__ 1
703 // CHECK_BROADWELL_M64: #define __SSE4_2__ 1
704 // CHECK_BROADWELL_M64: #define __SSE_MATH__ 1
705 // CHECK_BROADWELL_M64: #define __SSE__ 1
706 // CHECK_BROADWELL_M64: #define __SSSE3__ 1
707 // CHECK_BROADWELL_M64: #define __XSAVEOPT__ 1
708 // CHECK_BROADWELL_M64: #define __XSAVE__ 1
709 // CHECK_BROADWELL_M64: #define __amd64 1
710 // CHECK_BROADWELL_M64: #define __amd64__ 1
711 // CHECK_BROADWELL_M64: #define __corei7 1
712 // CHECK_BROADWELL_M64: #define __corei7__ 1
713 // CHECK_BROADWELL_M64: #define __tune_corei7__ 1
714 // CHECK_BROADWELL_M64: #define __x86_64 1
715 // CHECK_BROADWELL_M64: #define __x86_64__ 1
717 // RUN: %clang -march=skylake -m32 -E -dM %s -o - 2>&1 \
718 // RUN: -target i386-unknown-linux \
719 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_SKL_M32
720 // CHECK_SKL_M32: #define __ADX__ 1
721 // CHECK_SKL_M32: #define __AES__ 1
722 // CHECK_SKL_M32: #define __AVX2__ 1
723 // CHECK_SKL_M32: #define __AVX__ 1
724 // CHECK_SKL_M32: #define __BMI2__ 1
725 // CHECK_SKL_M32: #define __BMI__ 1
726 // CHECK_SKL_M32: #define __CLFLUSHOPT__ 1
727 // CHECK_SKL_M32: #define __F16C__ 1
728 // CHECK_SKL_M32: #define __FMA__ 1
729 // CHECK_SKL_M32: #define __INVPCID__ 1
730 // CHECK_SKL_M32: #define __LZCNT__ 1
731 // CHECK_SKL_M32: #define __MMX__ 1
732 // CHECK_SKL_M32: #define __MOVBE__ 1
733 // CHECK_SKL_M32: #define __PCLMUL__ 1
734 // CHECK_SKL_M32: #define __POPCNT__ 1
735 // CHECK_SKL_M32: #define __PRFCHW__ 1
736 // CHECK_SKL_M32: #define __RDRND__ 1
737 // CHECK_SKL_M32: #define __RDSEED__ 1
738 // CHECK_SKL_M32: #define __SGX__ 1
739 // CHECK_SKL_M32: #define __SSE2__ 1
740 // CHECK_SKL_M32: #define __SSE3__ 1
741 // CHECK_SKL_M32: #define __SSE4_1__ 1
742 // CHECK_SKL_M32: #define __SSE4_2__ 1
743 // CHECK_SKL_M32: #define __SSE__ 1
744 // CHECK_SKL_M32: #define __SSSE3__ 1
745 // CHECK_SKL_M32: #define __XSAVEC__ 1
746 // CHECK_SKL_M32: #define __XSAVEOPT__ 1
747 // CHECK_SKL_M32: #define __XSAVES__ 1
748 // CHECK_SKL_M32: #define __XSAVE__ 1
749 // CHECK_SKL_M32: #define i386 1
751 // RUN: %clang -march=skylake -m64 -E -dM %s -o - 2>&1 \
752 // RUN: -target i386-unknown-linux \
753 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_SKL_M64
754 // CHECK_SKL_M64: #define __ADX__ 1
755 // CHECK_SKL_M64: #define __AES__ 1
756 // CHECK_SKL_M64: #define __AVX2__ 1
757 // CHECK_SKL_M64: #define __AVX__ 1
758 // CHECK_SKL_M64: #define __BMI2__ 1
759 // CHECK_SKL_M64: #define __BMI__ 1
760 // CHECK_SKL_M64: #define __CLFLUSHOPT__ 1
761 // CHECK_SKL_M64: #define __F16C__ 1
762 // CHECK_SKL_M64: #define __FMA__ 1
763 // CHECK_SKL_M64: #define __INVPCID__ 1
764 // CHECK_SKL_M64: #define __LZCNT__ 1
765 // CHECK_SKL_M64: #define __MMX__ 1
766 // CHECK_SKL_M64: #define __MOVBE__ 1
767 // CHECK_SKL_M64: #define __PCLMUL__ 1
768 // CHECK_SKL_M64: #define __POPCNT__ 1
769 // CHECK_SKL_M64: #define __PRFCHW__ 1
770 // CHECK_SKL_M64: #define __RDRND__ 1
771 // CHECK_SKL_M64: #define __RDSEED__ 1
772 // CHECK_SKL_M64: #define __SGX__ 1
773 // CHECK_SKL_M64: #define __SSE2_MATH__ 1
774 // CHECK_SKL_M64: #define __SSE2__ 1
775 // CHECK_SKL_M64: #define __SSE3__ 1
776 // CHECK_SKL_M64: #define __SSE4_1__ 1
777 // CHECK_SKL_M64: #define __SSE4_2__ 1
778 // CHECK_SKL_M64: #define __SSE_MATH__ 1
779 // CHECK_SKL_M64: #define __SSE__ 1
780 // CHECK_SKL_M64: #define __SSSE3__ 1
781 // CHECK_SKL_M64: #define __XSAVEC__ 1
782 // CHECK_SKL_M64: #define __XSAVEOPT__ 1
783 // CHECK_SKL_M64: #define __XSAVES__ 1
784 // CHECK_SKL_M64: #define __XSAVE__ 1
785 // CHECK_SKL_M64: #define __amd64 1
786 // CHECK_SKL_M64: #define __amd64__ 1
787 // CHECK_SKL_M64: #define __x86_64 1
788 // CHECK_SKL_M64: #define __x86_64__ 1
790 // RUN: %clang -march=knl -m32 -E -dM %s -o - 2>&1 \
791 // RUN: -target i386-unknown-linux \
792 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_KNL_M32
793 // CHECK_KNL_M32: #define __AES__ 1
794 // CHECK_KNL_M32: #define __AVX2__ 1
795 // CHECK_KNL_M32: #define __AVX512CD__ 1
796 // CHECK_KNL_M32: #define __AVX512ER__ 1
797 // CHECK_KNL_M32: #define __AVX512F__ 1
798 // CHECK_KNL_M32: #define __AVX512PF__ 1
799 // CHECK_KNL_M32: #define __AVX__ 1
800 // CHECK_KNL_M32: #define __BMI2__ 1
801 // CHECK_KNL_M32: #define __BMI__ 1
802 // CHECK_KNL_M32: #define __EVEX512__ 1
803 // CHECK_KNL_M32: #define __F16C__ 1
804 // CHECK_KNL_M32: #define __FMA__ 1
805 // CHECK_KNL_M32: #define __LZCNT__ 1
806 // CHECK_KNL_M32: #define __MMX__ 1
807 // CHECK_KNL_M32: #define __MOVBE__ 1
808 // CHECK_KNL_M32: #define __PCLMUL__ 1
809 // CHECK_KNL_M32: #define __POPCNT__ 1
810 // CHECK_KNL_M32: #define __PREFETCHWT1__ 1
811 // CHECK_KNL_M32: #define __PRFCHW__ 1
812 // CHECK_KNL_M32: #define __RDRND__ 1
813 // CHECK_KNL_M32: #define __SSE2__ 1
814 // CHECK_KNL_M32: #define __SSE3__ 1
815 // CHECK_KNL_M32: #define __SSE4_1__ 1
816 // CHECK_KNL_M32: #define __SSE4_2__ 1
817 // CHECK_KNL_M32: #define __SSE__ 1
818 // CHECK_KNL_M32: #define __SSSE3__ 1
819 // CHECK_KNL_M32: #define __XSAVEOPT__ 1
820 // CHECK_KNL_M32: #define __XSAVE__ 1
821 // CHECK_KNL_M32: #define __i386 1
822 // CHECK_KNL_M32: #define __i386__ 1
823 // CHECK_KNL_M32: #define __knl 1
824 // CHECK_KNL_M32: #define __knl__ 1
825 // CHECK_KNL_M32: #define __tune_knl__ 1
826 // CHECK_KNL_M32: #define i386 1
828 // RUN: %clang -march=knl -m64 -E -dM %s -o - 2>&1 \
829 // RUN: -target i386-unknown-linux \
830 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_KNL_M64
831 // CHECK_KNL_M64: #define __AES__ 1
832 // CHECK_KNL_M64: #define __AVX2__ 1
833 // CHECK_KNL_M64: #define __AVX512CD__ 1
834 // CHECK_KNL_M64: #define __AVX512ER__ 1
835 // CHECK_KNL_M64: #define __AVX512F__ 1
836 // CHECK_KNL_M64: #define __AVX512PF__ 1
837 // CHECK_KNL_M64: #define __AVX__ 1
838 // CHECK_KNL_M64: #define __BMI2__ 1
839 // CHECK_KNL_M64: #define __BMI__ 1
840 // CHECK_KNL_M64: #define __EVEX512__ 1
841 // CHECK_KNL_M64: #define __F16C__ 1
842 // CHECK_KNL_M64: #define __FMA__ 1
843 // CHECK_KNL_M64: #define __LZCNT__ 1
844 // CHECK_KNL_M64: #define __MMX__ 1
845 // CHECK_KNL_M64: #define __MOVBE__ 1
846 // CHECK_KNL_M64: #define __PCLMUL__ 1
847 // CHECK_KNL_M64: #define __POPCNT__ 1
848 // CHECK_KNL_M64: #define __PREFETCHWT1__ 1
849 // CHECK_KNL_M64: #define __PRFCHW__ 1
850 // CHECK_KNL_M64: #define __RDRND__ 1
851 // CHECK_KNL_M64: #define __SSE2_MATH__ 1
852 // CHECK_KNL_M64: #define __SSE2__ 1
853 // CHECK_KNL_M64: #define __SSE3__ 1
854 // CHECK_KNL_M64: #define __SSE4_1__ 1
855 // CHECK_KNL_M64: #define __SSE4_2__ 1
856 // CHECK_KNL_M64: #define __SSE_MATH__ 1
857 // CHECK_KNL_M64: #define __SSE__ 1
858 // CHECK_KNL_M64: #define __SSSE3__ 1
859 // CHECK_KNL_M64: #define __XSAVEOPT__ 1
860 // CHECK_KNL_M64: #define __XSAVE__ 1
861 // CHECK_KNL_M64: #define __amd64 1
862 // CHECK_KNL_M64: #define __amd64__ 1
863 // CHECK_KNL_M64: #define __knl 1
864 // CHECK_KNL_M64: #define __knl__ 1
865 // CHECK_KNL_M64: #define __tune_knl__ 1
866 // CHECK_KNL_M64: #define __x86_64 1
867 // CHECK_KNL_M64: #define __x86_64__ 1
869 // RUN: %clang -march=knm -m32 -E -dM %s -o - 2>&1 \
870 // RUN: -target i386-unknown-linux \
871 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_KNM_M32
872 // CHECK_KNM_M32: #define __AES__ 1
873 // CHECK_KNM_M32: #define __AVX2__ 1
874 // CHECK_KNM_M32: #define __AVX512CD__ 1
875 // CHECK_KNM_M32: #define __AVX512ER__ 1
876 // CHECK_KNM_M32: #define __AVX512F__ 1
877 // CHECK_KNM_M32: #define __AVX512PF__ 1
878 // CHECK_KNM_M32: #define __AVX512VPOPCNTDQ__ 1
879 // CHECK_KNM_M32: #define __AVX__ 1
880 // CHECK_KNM_M32: #define __BMI2__ 1
881 // CHECK_KNM_M32: #define __BMI__ 1
882 // CHECK_KNM_M32: #define __EVEX512__ 1
883 // CHECK_KNM_M32: #define __F16C__ 1
884 // CHECK_KNM_M32: #define __FMA__ 1
885 // CHECK_KNM_M32: #define __LZCNT__ 1
886 // CHECK_KNM_M32: #define __MMX__ 1
887 // CHECK_KNM_M32: #define __MOVBE__ 1
888 // CHECK_KNM_M32: #define __PCLMUL__ 1
889 // CHECK_KNM_M32: #define __POPCNT__ 1
890 // CHECK_KNM_M32: #define __PREFETCHWT1__ 1
891 // CHECK_KNM_M32: #define __PRFCHW__ 1
892 // CHECK_KNM_M32: #define __RDRND__ 1
893 // CHECK_KNM_M32: #define __SSE2__ 1
894 // CHECK_KNM_M32: #define __SSE3__ 1
895 // CHECK_KNM_M32: #define __SSE4_1__ 1
896 // CHECK_KNM_M32: #define __SSE4_2__ 1
897 // CHECK_KNM_M32: #define __SSE__ 1
898 // CHECK_KNM_M32: #define __SSSE3__ 1
899 // CHECK_KNM_M32: #define __XSAVEOPT__ 1
900 // CHECK_KNM_M32: #define __XSAVE__ 1
901 // CHECK_KNM_M32: #define __i386 1
902 // CHECK_KNM_M32: #define __i386__ 1
903 // CHECK_KNM_M32: #define i386 1
905 // RUN: %clang -march=knm -m64 -E -dM %s -o - 2>&1 \
906 // RUN: -target i386-unknown-linux \
907 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_KNM_M64
908 // CHECK_KNM_M64: #define __AES__ 1
909 // CHECK_KNM_M64: #define __AVX2__ 1
910 // CHECK_KNM_M64: #define __AVX512CD__ 1
911 // CHECK_KNM_M64: #define __AVX512ER__ 1
912 // CHECK_KNM_M64: #define __AVX512F__ 1
913 // CHECK_KNM_M64: #define __AVX512PF__ 1
914 // CHECK_KNM_M64: #define __AVX512VPOPCNTDQ__ 1
915 // CHECK_KNM_M64: #define __AVX__ 1
916 // CHECK_KNM_M64: #define __BMI2__ 1
917 // CHECK_KNM_M64: #define __BMI__ 1
918 // CHECK_KNM_M64: #define __EVEX512__ 1
919 // CHECK_KNM_M64: #define __F16C__ 1
920 // CHECK_KNM_M64: #define __FMA__ 1
921 // CHECK_KNM_M64: #define __LZCNT__ 1
922 // CHECK_KNM_M64: #define __MMX__ 1
923 // CHECK_KNM_M64: #define __MOVBE__ 1
924 // CHECK_KNM_M64: #define __PCLMUL__ 1
925 // CHECK_KNM_M64: #define __POPCNT__ 1
926 // CHECK_KNM_M64: #define __PREFETCHWT1__ 1
927 // CHECK_KNM_M64: #define __PRFCHW__ 1
928 // CHECK_KNM_M64: #define __RDRND__ 1
929 // CHECK_KNM_M64: #define __SSE2_MATH__ 1
930 // CHECK_KNM_M64: #define __SSE2__ 1
931 // CHECK_KNM_M64: #define __SSE3__ 1
932 // CHECK_KNM_M64: #define __SSE4_1__ 1
933 // CHECK_KNM_M64: #define __SSE4_2__ 1
934 // CHECK_KNM_M64: #define __SSE_MATH__ 1
935 // CHECK_KNM_M64: #define __SSE__ 1
936 // CHECK_KNM_M64: #define __SSSE3__ 1
937 // CHECK_KNM_M64: #define __XSAVEOPT__ 1
938 // CHECK_KNM_M64: #define __XSAVE__ 1
939 // CHECK_KNM_M64: #define __amd64 1
940 // CHECK_KNM_M64: #define __amd64__ 1
941 // CHECK_KNM_M64: #define __x86_64 1
942 // CHECK_KNM_M64: #define __x86_64__ 1
944 // RUN: %clang -march=skylake-avx512 -m32 -E -dM %s -o - 2>&1 \
945 // RUN: -target i386-unknown-linux \
946 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_SKX_M32
947 // CHECK_SKX_M32: #define __AES__ 1
948 // CHECK_SKX_M32: #define __AVX2__ 1
949 // CHECK_SKX_M32: #define __AVX512BW__ 1
950 // CHECK_SKX_M32: #define __AVX512CD__ 1
951 // CHECK_SKX_M32: #define __AVX512DQ__ 1
952 // CHECK_SKX_M32: #define __AVX512F__ 1
953 // CHECK_SKX_M32: #define __AVX512VL__ 1
954 // CHECK_SKX_M32: #define __AVX__ 1
955 // CHECK_SKX_M32: #define __BMI2__ 1
956 // CHECK_SKX_M32: #define __BMI__ 1
957 // CHECK_SKX_M32: #define __CLFLUSHOPT__ 1
958 // CHECK_SKX_M32: #define __CLWB__ 1
959 // CHECK_SKX_M32: #define __EVEX512__ 1
960 // CHECK_SKX_M32: #define __F16C__ 1
961 // CHECK_SKX_M32: #define __FMA__ 1
962 // CHECK_SKX_M32: #define __INVPCID__ 1
963 // CHECK_SKX_M32: #define __LZCNT__ 1
964 // CHECK_SKX_M32: #define __MMX__ 1
965 // CHECK_SKX_M32: #define __MOVBE__ 1
966 // CHECK_SKX_M32: #define __PCLMUL__ 1
967 // CHECK_SKX_M32: #define __PKU__ 1
968 // CHECK_SKX_M32: #define __POPCNT__ 1
969 // CHECK_SKX_M32: #define __PRFCHW__ 1
970 // CHECK_SKX_M32: #define __RDRND__ 1
971 // CHECK_SKX_M32: #define __RDSEED__ 1
972 // CHECK_SKX_M32-NOT: #define __SGX__ 1
973 // CHECK_SKX_M32: #define __SSE2__ 1
974 // CHECK_SKX_M32: #define __SSE3__ 1
975 // CHECK_SKX_M32: #define __SSE4_1__ 1
976 // CHECK_SKX_M32: #define __SSE4_2__ 1
977 // CHECK_SKX_M32: #define __SSE__ 1
978 // CHECK_SKX_M32: #define __SSSE3__ 1
979 // CHECK_SKX_M32: #define __XSAVEC__ 1
980 // CHECK_SKX_M32: #define __XSAVEOPT__ 1
981 // CHECK_SKX_M32: #define __XSAVES__ 1
982 // CHECK_SKX_M32: #define __XSAVE__ 1
983 // CHECK_SKX_M32: #define __corei7 1
984 // CHECK_SKX_M32: #define __corei7__ 1
985 // CHECK_SKX_M32: #define __i386 1
986 // CHECK_SKX_M32: #define __i386__ 1
987 // CHECK_SKX_M32: #define __tune_corei7__ 1
988 // CHECK_SKX_M32: #define i386 1
990 // RUN: %clang -march=skylake-avx512 -m64 -E -dM %s -o - 2>&1 \
991 // RUN: -target i386-unknown-linux \
992 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_SKX_M64
993 // CHECK_SKX_M64: #define __AES__ 1
994 // CHECK_SKX_M64: #define __AVX2__ 1
995 // CHECK_SKX_M64: #define __AVX512BW__ 1
996 // CHECK_SKX_M64: #define __AVX512CD__ 1
997 // CHECK_SKX_M64: #define __AVX512DQ__ 1
998 // CHECK_SKX_M64: #define __AVX512F__ 1
999 // CHECK_SKX_M64: #define __AVX512VL__ 1
1000 // CHECK_SKX_M64: #define __AVX__ 1
1001 // CHECK_SKX_M64: #define __BMI2__ 1
1002 // CHECK_SKX_M64: #define __BMI__ 1
1003 // CHECK_SKX_M64: #define __CLFLUSHOPT__ 1
1004 // CHECK_SKX_M64: #define __CLWB__ 1
1005 // CHECK_SKX_M64: #define __EVEX512__ 1
1006 // CHECK_SKX_M64: #define __F16C__ 1
1007 // CHECK_SKX_M64: #define __FMA__ 1
1008 // CHECK_SKX_M64: #define __INVPCID__ 1
1009 // CHECK_SKX_M64: #define __LZCNT__ 1
1010 // CHECK_SKX_M64: #define __MMX__ 1
1011 // CHECK_SKX_M64: #define __MOVBE__ 1
1012 // CHECK_SKX_M64: #define __PCLMUL__ 1
1013 // CHECK_SKX_M64: #define __PKU__ 1
1014 // CHECK_SKX_M64: #define __POPCNT__ 1
1015 // CHECK_SKX_M64: #define __PRFCHW__ 1
1016 // CHECK_SKX_M64: #define __RDRND__ 1
1017 // CHECK_SKX_M64: #define __RDSEED__ 1
1018 // CHECK_SKX_M64-NOT: #define __SGX__ 1
1019 // CHECK_SKX_M64: #define __SSE2_MATH__ 1
1020 // CHECK_SKX_M64: #define __SSE2__ 1
1021 // CHECK_SKX_M64: #define __SSE3__ 1
1022 // CHECK_SKX_M64: #define __SSE4_1__ 1
1023 // CHECK_SKX_M64: #define __SSE4_2__ 1
1024 // CHECK_SKX_M64: #define __SSE_MATH__ 1
1025 // CHECK_SKX_M64: #define __SSE__ 1
1026 // CHECK_SKX_M64: #define __SSSE3__ 1
1027 // CHECK_SKX_M64: #define __XSAVEC__ 1
1028 // CHECK_SKX_M64: #define __XSAVEOPT__ 1
1029 // CHECK_SKX_M64: #define __XSAVES__ 1
1030 // CHECK_SKX_M64: #define __XSAVE__ 1
1031 // CHECK_SKX_M64: #define __amd64 1
1032 // CHECK_SKX_M64: #define __amd64__ 1
1033 // CHECK_SKX_M64: #define __corei7 1
1034 // CHECK_SKX_M64: #define __corei7__ 1
1035 // CHECK_SKX_M64: #define __tune_corei7__ 1
1036 // CHECK_SKX_M64: #define __x86_64 1
1037 // CHECK_SKX_M64: #define __x86_64__ 1
1039 // RUN: %clang -march=cascadelake -m32 -E -dM %s -o - 2>&1 \
1040 // RUN: -target i386-unknown-linux \
1041 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_CLX_M32
1042 // CHECK_CLX_M32: #define __AES__ 1
1043 // CHECK_CLX_M32: #define __AVX2__ 1
1044 // CHECK_CLX_M32: #define __AVX512BW__ 1
1045 // CHECK_CLX_M32: #define __AVX512CD__ 1
1046 // CHECK_CLX_M32: #define __AVX512DQ__ 1
1047 // CHECK_CLX_M32: #define __AVX512F__ 1
1048 // CHECK_CLX_M32: #define __AVX512VL__ 1
1049 // CHECK_CLX_M32: #define __AVX512VNNI__ 1
1050 // CHECK_CLX_M32: #define __AVX__ 1
1051 // CHECK_CLX_M32: #define __BMI2__ 1
1052 // CHECK_CLX_M32: #define __BMI__ 1
1053 // CHECK_CLX_M32: #define __CLFLUSHOPT__ 1
1054 // CHECK_CLX_M32: #define __CLWB__ 1
1055 // CHECK_CLX_M32: #define __EVEX512__ 1
1056 // CHECK_CLX_M32: #define __F16C__ 1
1057 // CHECK_CLX_M32: #define __FMA__ 1
1058 // CHECK_CLX_M32: #define __INVPCID__ 1
1059 // CHECK_CLX_M32: #define __LZCNT__ 1
1060 // CHECK_CLX_M32: #define __MMX__ 1
1061 // CHECK_CLX_M32: #define __MOVBE__ 1
1062 // CHECK_CLX_M32: #define __PCLMUL__ 1
1063 // CHECK_CLX_M32: #define __PKU__ 1
1064 // CHECK_CLX_M32: #define __POPCNT__ 1
1065 // CHECK_CLX_M32: #define __PRFCHW__ 1
1066 // CHECK_CLX_M32: #define __RDRND__ 1
1067 // CHECK_CLX_M32: #define __RDSEED__ 1
1068 // CHECK_CLX_M32-NOT: #define __SGX__ 1
1069 // CHECK_CLX_M32: #define __SSE2__ 1
1070 // CHECK_CLX_M32: #define __SSE3__ 1
1071 // CHECK_CLX_M32: #define __SSE4_1__ 1
1072 // CHECK_CLX_M32: #define __SSE4_2__ 1
1073 // CHECK_CLX_M32: #define __SSE__ 1
1074 // CHECK_CLX_M32: #define __SSSE3__ 1
1075 // CHECK_CLX_M32: #define __XSAVEC__ 1
1076 // CHECK_CLX_M32: #define __XSAVEOPT__ 1
1077 // CHECK_CLX_M32: #define __XSAVES__ 1
1078 // CHECK_CLX_M32: #define __XSAVE__ 1
1079 // CHECK_CLX_M32: #define __corei7 1
1080 // CHECK_CLX_M32: #define __corei7__ 1
1081 // CHECK_CLX_M32: #define __i386 1
1082 // CHECK_CLX_M32: #define __i386__ 1
1083 // CHECK_CLX_M32: #define __tune_corei7__ 1
1084 // CHECK_CLX_M32: #define i386 1
1086 // RUN: %clang -march=cascadelake -m64 -E -dM %s -o - 2>&1 \
1087 // RUN: -target i386-unknown-linux \
1088 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_CLX_M64
1089 // CHECK_CLX_M64: #define __AES__ 1
1090 // CHECK_CLX_M64: #define __AVX2__ 1
1091 // CHECK_CLX_M64: #define __AVX512BW__ 1
1092 // CHECK_CLX_M64: #define __AVX512CD__ 1
1093 // CHECK_CLX_M64: #define __AVX512DQ__ 1
1094 // CHECK_CLX_M64: #define __AVX512F__ 1
1095 // CHECK_CLX_M64: #define __AVX512VL__ 1
1096 // CHECK_CLX_M64: #define __AVX512VNNI__ 1
1097 // CHECK_CLX_M64: #define __AVX__ 1
1098 // CHECK_CLX_M64: #define __BMI2__ 1
1099 // CHECK_CLX_M64: #define __BMI__ 1
1100 // CHECK_CLX_M64: #define __CLFLUSHOPT__ 1
1101 // CHECK_CLX_M64: #define __CLWB__ 1
1102 // CHECK_CLX_M64: #define __EVEX512__ 1
1103 // CHECK_CLX_M64: #define __F16C__ 1
1104 // CHECK_CLX_M64: #define __FMA__ 1
1105 // CHECK_CLX_M64: #define __INVPCID__ 1
1106 // CHECK_CLX_M64: #define __LZCNT__ 1
1107 // CHECK_CLX_M64: #define __MMX__ 1
1108 // CHECK_CLX_M64: #define __MOVBE__ 1
1109 // CHECK_CLX_M64: #define __PCLMUL__ 1
1110 // CHECK_CLX_M64: #define __PKU__ 1
1111 // CHECK_CLX_M64: #define __POPCNT__ 1
1112 // CHECK_CLX_M64: #define __PRFCHW__ 1
1113 // CHECK_CLX_M64: #define __RDRND__ 1
1114 // CHECK_CLX_M64: #define __RDSEED__ 1
1115 // CHECK_CLX_M64-NOT: #define __SGX__ 1
1116 // CHECK_CLX_M64: #define __SSE2_MATH__ 1
1117 // CHECK_CLX_M64: #define __SSE2__ 1
1118 // CHECK_CLX_M64: #define __SSE3__ 1
1119 // CHECK_CLX_M64: #define __SSE4_1__ 1
1120 // CHECK_CLX_M64: #define __SSE4_2__ 1
1121 // CHECK_CLX_M64: #define __SSE_MATH__ 1
1122 // CHECK_CLX_M64: #define __SSE__ 1
1123 // CHECK_CLX_M64: #define __SSSE3__ 1
1124 // CHECK_CLX_M64: #define __XSAVEC__ 1
1125 // CHECK_CLX_M64: #define __XSAVEOPT__ 1
1126 // CHECK_CLX_M64: #define __XSAVES__ 1
1127 // CHECK_CLX_M64: #define __XSAVE__ 1
1128 // CHECK_CLX_M64: #define __amd64 1
1129 // CHECK_CLX_M64: #define __amd64__ 1
1130 // CHECK_CLX_M64: #define __corei7 1
1131 // CHECK_CLX_M64: #define __corei7__ 1
1132 // CHECK_CLX_M64: #define __tune_corei7__ 1
1133 // CHECK_CLX_M64: #define __x86_64 1
1134 // CHECK_CLX_M64: #define __x86_64__ 1
1136 // RUN: %clang -march=cooperlake -m32 -E -dM %s -o - 2>&1 \
1137 // RUN: -target i386-unknown-linux \
1138 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_CPX_M32
1139 // CHECK_CPX_M32: #define __AES__ 1
1140 // CHECK_CPX_M32: #define __AVX2__ 1
1141 // CHECK_CPX_M32: #define __AVX512BF16__ 1
1142 // CHECK_CPX_M32: #define __AVX512BW__ 1
1143 // CHECK_CPX_M32: #define __AVX512CD__ 1
1144 // CHECK_CPX_M32: #define __AVX512DQ__ 1
1145 // CHECK_CPX_M32: #define __AVX512F__ 1
1146 // CHECK_CPX_M32: #define __AVX512VL__ 1
1147 // CHECK_CPX_M32: #define __AVX512VNNI__ 1
1148 // CHECK_CPX_M32: #define __AVX__ 1
1149 // CHECK_CPX_M32: #define __BMI2__ 1
1150 // CHECK_CPX_M32: #define __BMI__ 1
1151 // CHECK_CPX_M32: #define __CLFLUSHOPT__ 1
1152 // CHECK_CPX_M32: #define __CLWB__ 1
1153 // CHECK_CPX_M32: #define __EVEX512__ 1
1154 // CHECK_CPX_M32: #define __F16C__ 1
1155 // CHECK_CPX_M32: #define __FMA__ 1
1156 // CHECK_CPX_M32: #define __INVPCID__ 1
1157 // CHECK_CPX_M32: #define __LZCNT__ 1
1158 // CHECK_CPX_M32: #define __MMX__ 1
1159 // CHECK_CPX_M32: #define __MOVBE__ 1
1160 // CHECK_CPX_M32: #define __PCLMUL__ 1
1161 // CHECK_CPX_M32: #define __PKU__ 1
1162 // CHECK_CPX_M32: #define __POPCNT__ 1
1163 // CHECK_CPX_M32: #define __PRFCHW__ 1
1164 // CHECK_CPX_M32: #define __RDRND__ 1
1165 // CHECK_CPX_M32: #define __RDSEED__ 1
1166 // CHECK_CPX_M32-NOT: #define __SGX__ 1
1167 // CHECK_CPX_M32: #define __SSE2__ 1
1168 // CHECK_CPX_M32: #define __SSE3__ 1
1169 // CHECK_CPX_M32: #define __SSE4_1__ 1
1170 // CHECK_CPX_M32: #define __SSE4_2__ 1
1171 // CHECK_CPX_M32: #define __SSE__ 1
1172 // CHECK_CPX_M32: #define __SSSE3__ 1
1173 // CHECK_CPX_M32: #define __XSAVEC__ 1
1174 // CHECK_CPX_M32: #define __XSAVEOPT__ 1
1175 // CHECK_CPX_M32: #define __XSAVES__ 1
1176 // CHECK_CPX_M32: #define __XSAVE__ 1
1177 // CHECK_CPX_M32: #define __corei7 1
1178 // CHECK_CPX_M32: #define __corei7__ 1
1179 // CHECK_CPX_M32: #define __i386 1
1180 // CHECK_CPX_M32: #define __i386__ 1
1181 // CHECK_CPX_M32: #define __tune_corei7__ 1
1182 // CHECK_CPX_M32: #define i386 1
1184 // RUN: %clang -march=cooperlake -m64 -E -dM %s -o - 2>&1 \
1185 // RUN: -target i386-unknown-linux \
1186 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_CPX_M64
1187 // CHECK_CPX_M64: #define __AES__ 1
1188 // CHECK_CPX_M64: #define __AVX2__ 1
1189 // CHECK_CPX_M64: #define __AVX512BF16__ 1
1190 // CHECK_CPX_M64: #define __AVX512BW__ 1
1191 // CHECK_CPX_M64: #define __AVX512CD__ 1
1192 // CHECK_CPX_M64: #define __AVX512DQ__ 1
1193 // CHECK_CPX_M64: #define __AVX512F__ 1
1194 // CHECK_CPX_M64: #define __AVX512VL__ 1
1195 // CHECK_CPX_M64: #define __AVX512VNNI__ 1
1196 // CHECK_CPX_M64: #define __AVX__ 1
1197 // CHECK_CPX_M64: #define __BMI2__ 1
1198 // CHECK_CPX_M64: #define __BMI__ 1
1199 // CHECK_CPX_M64: #define __CLFLUSHOPT__ 1
1200 // CHECK_CPX_M64: #define __CLWB__ 1
1201 // CHECK_CPX_M64: #define __EVEX512__ 1
1202 // CHECK_CPX_M64: #define __F16C__ 1
1203 // CHECK_CPX_M64: #define __FMA__ 1
1204 // CHECK_CPX_M64: #define __INVPCID__ 1
1205 // CHECK_CPX_M64: #define __LZCNT__ 1
1206 // CHECK_CPX_M64: #define __MMX__ 1
1207 // CHECK_CPX_M64: #define __MOVBE__ 1
1208 // CHECK_CPX_M64: #define __PCLMUL__ 1
1209 // CHECK_CPX_M64: #define __PKU__ 1
1210 // CHECK_CPX_M64: #define __POPCNT__ 1
1211 // CHECK_CPX_M64: #define __PRFCHW__ 1
1212 // CHECK_CPX_M64: #define __RDRND__ 1
1213 // CHECK_CPX_M64: #define __RDSEED__ 1
1214 // CHECK_CPX_M64-NOT: #define __SGX__ 1
1215 // CHECK_CPX_M64: #define __SSE2_MATH__ 1
1216 // CHECK_CPX_M64: #define __SSE2__ 1
1217 // CHECK_CPX_M64: #define __SSE3__ 1
1218 // CHECK_CPX_M64: #define __SSE4_1__ 1
1219 // CHECK_CPX_M64: #define __SSE4_2__ 1
1220 // CHECK_CPX_M64: #define __SSE_MATH__ 1
1221 // CHECK_CPX_M64: #define __SSE__ 1
1222 // CHECK_CPX_M64: #define __SSSE3__ 1
1223 // CHECK_CPX_M64: #define __XSAVEC__ 1
1224 // CHECK_CPX_M64: #define __XSAVEOPT__ 1
1225 // CHECK_CPX_M64: #define __XSAVES__ 1
1226 // CHECK_CPX_M64: #define __XSAVE__ 1
1227 // CHECK_CPX_M64: #define __amd64 1
1228 // CHECK_CPX_M64: #define __amd64__ 1
1229 // CHECK_CPX_M64: #define __corei7 1
1230 // CHECK_CPX_M64: #define __corei7__ 1
1231 // CHECK_CPX_M64: #define __tune_corei7__ 1
1232 // CHECK_CPX_M64: #define __x86_64 1
1233 // CHECK_CPX_M64: #define __x86_64__ 1
1235 // RUN: %clang -march=cannonlake -m32 -E -dM %s -o - 2>&1 \
1236 // RUN: -target i386-unknown-linux \
1237 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_CNL_M32
1238 // CHECK_CNL_M32: #define __AES__ 1
1239 // CHECK_CNL_M32: #define __AVX2__ 1
1240 // CHECK_CNL_M32: #define __AVX512BW__ 1
1241 // CHECK_CNL_M32: #define __AVX512CD__ 1
1242 // CHECK_CNL_M32: #define __AVX512DQ__ 1
1243 // CHECK_CNL_M32: #define __AVX512F__ 1
1244 // CHECK_CNL_M32: #define __AVX512IFMA__ 1
1245 // CHECK_CNL_M32: #define __AVX512VBMI__ 1
1246 // CHECK_CNL_M32: #define __AVX512VL__ 1
1247 // CHECK_CNL_M32: #define __AVX__ 1
1248 // CHECK_CNL_M32: #define __BMI2__ 1
1249 // CHECK_CNL_M32: #define __BMI__ 1
1250 // CHECK_CNL_M32: #define __CLFLUSHOPT__ 1
1251 // CHECK_CNL_M32-NOT: #define __CLWB__ 1
1252 // CHECK_CNL_M32: #define __EVEX512__ 1
1253 // CHECK_CNL_M32: #define __F16C__ 1
1254 // CHECK_CNL_M32: #define __FMA__ 1
1255 // CHECK_CNL_M32: #define __INVPCID__ 1
1256 // CHECK_CNL_M32: #define __LZCNT__ 1
1257 // CHECK_CNL_M32: #define __MMX__ 1
1258 // CHECK_CNL_M32: #define __MOVBE__ 1
1259 // CHECK_CNL_M32: #define __PCLMUL__ 1
1260 // CHECK_CNL_M32: #define __PKU__ 1
1261 // CHECK_CNL_M32: #define __POPCNT__ 1
1262 // CHECK_CNL_M32: #define __PRFCHW__ 1
1263 // CHECK_CNL_M32: #define __RDRND__ 1
1264 // CHECK_CNL_M32: #define __RDSEED__ 1
1265 // CHECK_CNL_M32: #define __SGX__ 1
1266 // CHECK_CNL_M32: #define __SHA__ 1
1267 // CHECK_CNL_M32: #define __SSE2__ 1
1268 // CHECK_CNL_M32: #define __SSE3__ 1
1269 // CHECK_CNL_M32: #define __SSE4_1__ 1
1270 // CHECK_CNL_M32: #define __SSE4_2__ 1
1271 // CHECK_CNL_M32: #define __SSE__ 1
1272 // CHECK_CNL_M32: #define __SSSE3__ 1
1273 // CHECK_CNL_M32: #define __XSAVEC__ 1
1274 // CHECK_CNL_M32: #define __XSAVEOPT__ 1
1275 // CHECK_CNL_M32: #define __XSAVES__ 1
1276 // CHECK_CNL_M32: #define __XSAVE__ 1
1277 // CHECK_CNL_M32: #define __corei7 1
1278 // CHECK_CNL_M32: #define __corei7__ 1
1279 // CHECK_CNL_M32: #define __i386 1
1280 // CHECK_CNL_M32: #define __i386__ 1
1281 // CHECK_CNL_M32: #define __tune_corei7__ 1
1282 // CHECK_CNL_M32: #define i386 1
1284 // RUN: %clang -march=cannonlake -m64 -E -dM %s -o - 2>&1 \
1285 // RUN: -target i386-unknown-linux \
1286 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_CNL_M64
1287 // CHECK_CNL_M64: #define __AES__ 1
1288 // CHECK_CNL_M64: #define __AVX2__ 1
1289 // CHECK_CNL_M64: #define __AVX512BW__ 1
1290 // CHECK_CNL_M64: #define __AVX512CD__ 1
1291 // CHECK_CNL_M64: #define __AVX512DQ__ 1
1292 // CHECK_CNL_M64: #define __AVX512F__ 1
1293 // CHECK_CNL_M64: #define __AVX512IFMA__ 1
1294 // CHECK_CNL_M64: #define __AVX512VBMI__ 1
1295 // CHECK_CNL_M64: #define __AVX512VL__ 1
1296 // CHECK_CNL_M64: #define __AVX__ 1
1297 // CHECK_CNL_M64: #define __BMI2__ 1
1298 // CHECK_CNL_M64: #define __BMI__ 1
1299 // CHECK_CNL_M64: #define __CLFLUSHOPT__ 1
1300 // CHECK_CNL_M64-NOT: #define __CLWB__ 1
1301 // CHECK_CNL_M64: #define __EVEX512__ 1
1302 // CHECK_CNL_M64: #define __F16C__ 1
1303 // CHECK_CNL_M64: #define __FMA__ 1
1304 // CHECK_CNL_M64: #define __INVPCID__ 1
1305 // CHECK_CNL_M64: #define __LZCNT__ 1
1306 // CHECK_CNL_M64: #define __MMX__ 1
1307 // CHECK_CNL_M64: #define __MOVBE__ 1
1308 // CHECK_CNL_M64: #define __PCLMUL__ 1
1309 // CHECK_CNL_M64: #define __PKU__ 1
1310 // CHECK_CNL_M64: #define __POPCNT__ 1
1311 // CHECK_CNL_M64: #define __PRFCHW__ 1
1312 // CHECK_CNL_M64: #define __RDRND__ 1
1313 // CHECK_CNL_M64: #define __RDSEED__ 1
1314 // CHECK_CNL_M64: #define __SGX__ 1
1315 // CHECK_CNL_M64: #define __SHA__ 1
1316 // CHECK_CNL_M64: #define __SSE2__ 1
1317 // CHECK_CNL_M64: #define __SSE3__ 1
1318 // CHECK_CNL_M64: #define __SSE4_1__ 1
1319 // CHECK_CNL_M64: #define __SSE4_2__ 1
1320 // CHECK_CNL_M64: #define __SSE__ 1
1321 // CHECK_CNL_M64: #define __SSSE3__ 1
1322 // CHECK_CNL_M64: #define __XSAVEC__ 1
1323 // CHECK_CNL_M64: #define __XSAVEOPT__ 1
1324 // CHECK_CNL_M64: #define __XSAVES__ 1
1325 // CHECK_CNL_M64: #define __XSAVE__ 1
1326 // CHECK_CNL_M64: #define __amd64 1
1327 // CHECK_CNL_M64: #define __amd64__ 1
1328 // CHECK_CNL_M64: #define __corei7 1
1329 // CHECK_CNL_M64: #define __corei7__ 1
1330 // CHECK_CNL_M64: #define __tune_corei7__ 1
1331 // CHECK_CNL_M64: #define __x86_64 1
1332 // CHECK_CNL_M64: #define __x86_64__ 1
1334 // RUN: %clang -march=icelake-client -m32 -E -dM %s -o - 2>&1 \
1335 // RUN: -target i386-unknown-linux \
1336 // RUN: | FileCheck -match-full-lines %s -check-prefixes=CHECK_ICL_M32,CHECK_ICL_M32S
1337 // RUN: %clang -march=rocketlake -m32 -E -dM %s -o - 2>&1 \
1338 // RUN: -target i386-unknown-linux \
1339 // RUN: | FileCheck -match-full-lines %s -check-prefixes=CHECK_ICL_M32,CHECK_RKL_M32S
1340 // CHECK_ICL_M32: #define __AES__ 1
1341 // CHECK_ICL_M32: #define __AVX2__ 1
1342 // CHECK_ICL_M32: #define __AVX512BITALG__ 1
1343 // CHECK_ICL_M32: #define __AVX512BW__ 1
1344 // CHECK_ICL_M32: #define __AVX512CD__ 1
1345 // CHECK_ICL_M32: #define __AVX512DQ__ 1
1346 // CHECK_ICL_M32: #define __AVX512F__ 1
1347 // CHECK_ICL_M32: #define __AVX512IFMA__ 1
1348 // CHECK_ICL_M32: #define __AVX512VBMI2__ 1
1349 // CHECK_ICL_M32: #define __AVX512VBMI__ 1
1350 // CHECK_ICL_M32: #define __AVX512VL__ 1
1351 // CHECK_ICL_M32: #define __AVX512VNNI__ 1
1352 // CHECK_ICL_M32: #define __AVX512VPOPCNTDQ__ 1
1353 // CHECK_ICL_M32: #define __AVX__ 1
1354 // CHECK_ICL_M32: #define __BMI2__ 1
1355 // CHECK_ICL_M32: #define __BMI__ 1
1356 // CHECK_ICL_M32: #define __CLFLUSHOPT__ 1
1357 // CHECK_ICL_M32-NOT: #define __CLWB__ 1
1358 // CHECK_ICL_M32: #define __EVEX512__ 1
1359 // CHECK_ICL_M32: #define __F16C__ 1
1360 // CHECK_ICL_M32: #define __FMA__ 1
1361 // CHECK_ICL_M32: #define __GFNI__ 1
1362 // CHECK_ICL_M32: #define __INVPCID__ 1
1363 // CHECK_ICL_M32: #define __LZCNT__ 1
1364 // CHECK_ICL_M32: #define __MMX__ 1
1365 // CHECK_ICL_M32: #define __MOVBE__ 1
1366 // CHECK_ICL_M32: #define __PCLMUL__ 1
1367 // CHECK_ICL_M32: #define __PKU__ 1
1368 // CHECK_ICL_M32: #define __POPCNT__ 1
1369 // CHECK_ICL_M32: #define __PRFCHW__ 1
1370 // CHECK_ICL_M32: #define __RDPID__ 1
1371 // CHECK_ICL_M32: #define __RDRND__ 1
1372 // CHECK_ICL_M32: #define __RDSEED__ 1
1373 // CHECK_ICL_M32S: #define __SGX__ 1
1374 // CHECK_RKL_M32S-NOT: #define __SGX__ 1
1375 // CHECK_ICL_M32: #define __SHA__ 1
1376 // CHECK_ICL_M32: #define __SSE2__ 1
1377 // CHECK_ICL_M32: #define __SSE3__ 1
1378 // CHECK_ICL_M32: #define __SSE4_1__ 1
1379 // CHECK_ICL_M32: #define __SSE4_2__ 1
1380 // CHECK_ICL_M32: #define __SSE__ 1
1381 // CHECK_ICL_M32: #define __SSSE3__ 1
1382 // CHECK_ICL_M32: #define __VAES__ 1
1383 // CHECK_ICL_M32: #define __VPCLMULQDQ__ 1
1384 // CHECK_ICL_M32-NOT: #define __WBNOINVD__ 1
1385 // CHECK_ICL_M32: #define __XSAVEC__ 1
1386 // CHECK_ICL_M32: #define __XSAVEOPT__ 1
1387 // CHECK_ICL_M32: #define __XSAVES__ 1
1388 // CHECK_ICL_M32: #define __XSAVE__ 1
1389 // CHECK_ICL_M32: #define __corei7 1
1390 // CHECK_ICL_M32: #define __corei7__ 1
1391 // CHECK_ICL_M32: #define __i386 1
1392 // CHECK_ICL_M32: #define __i386__ 1
1393 // CHECK_ICL_M32: #define __tune_corei7__ 1
1394 // CHECK_ICL_M32: #define i386 1
1396 // RUN: %clang -march=icelake-client -m64 -E -dM %s -o - 2>&1 \
1397 // RUN: -target i386-unknown-linux \
1398 // RUN: | FileCheck -match-full-lines %s -check-prefixes=CHECK_ICL_M64,CHECK_ICL_M64S
1399 // RUN: %clang -march=rocketlake -m64 -E -dM %s -o - 2>&1 \
1400 // RUN: -target i386-unknown-linux \
1401 // RUN: | FileCheck -match-full-lines %s -check-prefixes=CHECK_ICL_M64,CHECK_RKL_M64S
1402 // CHECK_ICL_M64: #define __AES__ 1
1403 // CHECK_ICL_M64: #define __AVX2__ 1
1404 // CHECK_ICL_M64: #define __AVX512BITALG__ 1
1405 // CHECK_ICL_M64: #define __AVX512BW__ 1
1406 // CHECK_ICL_M64: #define __AVX512CD__ 1
1407 // CHECK_ICL_M64: #define __AVX512DQ__ 1
1408 // CHECK_ICL_M64: #define __AVX512F__ 1
1409 // CHECK_ICL_M64: #define __AVX512IFMA__ 1
1410 // CHECK_ICL_M64: #define __AVX512VBMI2__ 1
1411 // CHECK_ICL_M64: #define __AVX512VBMI__ 1
1412 // CHECK_ICL_M64: #define __AVX512VL__ 1
1413 // CHECK_ICL_M64: #define __AVX512VNNI__ 1
1414 // CHECK_ICL_M64: #define __AVX512VPOPCNTDQ__ 1
1415 // CHECK_ICL_M64: #define __AVX__ 1
1416 // CHECK_ICL_M64: #define __BMI2__ 1
1417 // CHECK_ICL_M64: #define __BMI__ 1
1418 // CHECK_ICL_M64: #define __CLFLUSHOPT__ 1
1419 // CHECK_ICL_M64-NOT: #define __CLWB__ 1
1420 // CHECK_ICL_M64: #define __EVEX512__ 1
1421 // CHECK_ICL_M64: #define __F16C__ 1
1422 // CHECK_ICL_M64: #define __FMA__ 1
1423 // CHECK_ICL_M64: #define __GFNI__ 1
1424 // CHECK_ICL_M64: #define __INVPCID__ 1
1425 // CHECK_ICL_M64: #define __LZCNT__ 1
1426 // CHECK_ICL_M64: #define __MMX__ 1
1427 // CHECK_ICL_M64: #define __MOVBE__ 1
1428 // CHECK_ICL_M64: #define __PCLMUL__ 1
1429 // CHECK_ICL_M64: #define __PKU__ 1
1430 // CHECK_ICL_M64: #define __POPCNT__ 1
1431 // CHECK_ICL_M64: #define __PRFCHW__ 1
1432 // CHECK_ICL_M64: #define __RDPID__ 1
1433 // CHECK_ICL_M64: #define __RDRND__ 1
1434 // CHECK_ICL_M64: #define __RDSEED__ 1
1435 // CHECK_ICL_M64S: #define __SGX__ 1
1436 // CHECK_RKL_M64S-NOT: #define __SGX__ 1
1437 // CHECK_ICL_M64: #define __SHA__ 1
1438 // CHECK_ICL_M64: #define __SSE2__ 1
1439 // CHECK_ICL_M64: #define __SSE3__ 1
1440 // CHECK_ICL_M64: #define __SSE4_1__ 1
1441 // CHECK_ICL_M64: #define __SSE4_2__ 1
1442 // CHECK_ICL_M64: #define __SSE__ 1
1443 // CHECK_ICL_M64: #define __SSSE3__ 1
1444 // CHECK_ICL_M64: #define __VAES__ 1
1445 // CHECK_ICL_M64: #define __VPCLMULQDQ__ 1
1446 // CHECK_ICL_M64-NOT: #define __WBNOINVD__ 1
1447 // CHECK_ICL_M64: #define __XSAVEC__ 1
1448 // CHECK_ICL_M64: #define __XSAVEOPT__ 1
1449 // CHECK_ICL_M64: #define __XSAVES__ 1
1450 // CHECK_ICL_M64: #define __XSAVE__ 1
1451 // CHECK_ICL_M64: #define __amd64 1
1452 // CHECK_ICL_M64: #define __amd64__ 1
1453 // CHECK_ICL_M64: #define __corei7 1
1454 // CHECK_ICL_M64: #define __corei7__ 1
1455 // CHECK_ICL_M64: #define __tune_corei7__ 1
1456 // CHECK_ICL_M64: #define __x86_64 1
1457 // CHECK_ICL_M64: #define __x86_64__ 1
1459 // RUN: %clang -march=icelake-server -m32 -E -dM %s -o - 2>&1 \
1460 // RUN: -target i386-unknown-linux \
1461 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_ICX_M32
1462 // CHECK_ICX_M32: #define __AES__ 1
1463 // CHECK_ICX_M32: #define __AVX2__ 1
1464 // CHECK_ICX_M32: #define __AVX512BITALG__ 1
1465 // CHECK_ICX_M32: #define __AVX512BW__ 1
1466 // CHECK_ICX_M32: #define __AVX512CD__ 1
1467 // CHECK_ICX_M32: #define __AVX512DQ__ 1
1468 // CHECK_ICX_M32: #define __AVX512F__ 1
1469 // CHECK_ICX_M32: #define __AVX512IFMA__ 1
1470 // CHECK_ICX_M32: #define __AVX512VBMI2__ 1
1471 // CHECK_ICX_M32: #define __AVX512VBMI__ 1
1472 // CHECK_ICX_M32: #define __AVX512VL__ 1
1473 // CHECK_ICX_M32: #define __AVX512VNNI__ 1
1474 // CHECK_ICX_M32: #define __AVX512VPOPCNTDQ__ 1
1475 // CHECK_ICX_M32: #define __AVX__ 1
1476 // CHECK_ICX_M32: #define __BMI2__ 1
1477 // CHECK_ICX_M32: #define __BMI__ 1
1478 // CHECK_ICX_M32: #define __CLFLUSHOPT__ 1
1479 // CHECK_ICX_M32: #define __CLWB__ 1
1480 // CHECK_ICX_M32: #define __EVEX512__ 1
1481 // CHECK_ICX_M32: #define __F16C__ 1
1482 // CHECK_ICX_M32: #define __FMA__ 1
1483 // CHECK_ICX_M32: #define __GFNI__ 1
1484 // CHECK_ICX_M32: #define __INVPCID__ 1
1485 // CHECK_ICX_M32: #define __LZCNT__ 1
1486 // CHECK_ICX_M32: #define __MMX__ 1
1487 // CHECK_ICX_M32: #define __MOVBE__ 1
1488 // CHECK_ICX_M32: #define __PCLMUL__ 1
1489 // CHECK_ICX_M32: #define __PCONFIG__ 1
1490 // CHECK_ICX_M32: #define __PKU__ 1
1491 // CHECK_ICX_M32: #define __POPCNT__ 1
1492 // CHECK_ICX_M32: #define __PRFCHW__ 1
1493 // CHECK_ICX_M32: #define __RDPID__ 1
1494 // CHECK_ICX_M32: #define __RDRND__ 1
1495 // CHECK_ICX_M32: #define __RDSEED__ 1
1496 // CHECK_ICX_M32: #define __SGX__ 1
1497 // CHECK_ICX_M32: #define __SHA__ 1
1498 // CHECK_ICX_M32: #define __SSE2__ 1
1499 // CHECK_ICX_M32: #define __SSE3__ 1
1500 // CHECK_ICX_M32: #define __SSE4_1__ 1
1501 // CHECK_ICX_M32: #define __SSE4_2__ 1
1502 // CHECK_ICX_M32: #define __SSE__ 1
1503 // CHECK_ICX_M32: #define __SSSE3__ 1
1504 // CHECK_ICX_M32: #define __VAES__ 1
1505 // CHECK_ICX_M32: #define __VPCLMULQDQ__ 1
1506 // CHECK_ICX_M32: #define __WBNOINVD__ 1
1507 // CHECK_ICX_M32: #define __XSAVEC__ 1
1508 // CHECK_ICX_M32: #define __XSAVEOPT__ 1
1509 // CHECK_ICX_M32: #define __XSAVES__ 1
1510 // CHECK_ICX_M32: #define __XSAVE__ 1
1511 // CHECK_ICX_M32: #define __corei7 1
1512 // CHECK_ICX_M32: #define __corei7__ 1
1513 // CHECK_ICX_M32: #define __i386 1
1514 // CHECK_ICX_M32: #define __i386__ 1
1515 // CHECK_ICX_M32: #define __tune_corei7__ 1
1516 // CHECK_ICX_M32: #define i386 1
1518 // RUN: %clang -march=icelake-server -m64 -E -dM %s -o - 2>&1 \
1519 // RUN: -target i386-unknown-linux \
1520 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_ICX_M64
1521 // CHECK_ICX_M64: #define __AES__ 1
1522 // CHECK_ICX_M64: #define __AVX2__ 1
1523 // CHECK_ICX_M64: #define __AVX512BITALG__ 1
1524 // CHECK_ICX_M64: #define __AVX512BW__ 1
1525 // CHECK_ICX_M64: #define __AVX512CD__ 1
1526 // CHECK_ICX_M64: #define __AVX512DQ__ 1
1527 // CHECK_ICX_M64: #define __AVX512F__ 1
1528 // CHECK_ICX_M64: #define __AVX512IFMA__ 1
1529 // CHECK_ICX_M64: #define __AVX512VBMI2__ 1
1530 // CHECK_ICX_M64: #define __AVX512VBMI__ 1
1531 // CHECK_ICX_M64: #define __AVX512VL__ 1
1532 // CHECK_ICX_M64: #define __AVX512VNNI__ 1
1533 // CHECK_ICX_M64: #define __AVX512VPOPCNTDQ__ 1
1534 // CHECK_ICX_M64: #define __AVX__ 1
1535 // CHECK_ICX_M64: #define __BMI2__ 1
1536 // CHECK_ICX_M64: #define __BMI__ 1
1537 // CHECK_ICX_M64: #define __CLFLUSHOPT__ 1
1538 // CHECK_ICX_M64: #define __CLWB__ 1
1539 // CHECK_ICX_M64: #define __EVEX512__ 1
1540 // CHECK_ICX_M64: #define __F16C__ 1
1541 // CHECK_ICX_M64: #define __FMA__ 1
1542 // CHECK_ICX_M64: #define __GFNI__ 1
1543 // CHECK_ICX_M64: #define __INVPCID__ 1
1544 // CHECK_ICX_M64: #define __LZCNT__ 1
1545 // CHECK_ICX_M64: #define __MMX__ 1
1546 // CHECK_ICX_M64: #define __MOVBE__ 1
1547 // CHECK_ICX_M64: #define __PCLMUL__ 1
1548 // CHECK_ICX_M64: #define __PCONFIG__ 1
1549 // CHECK_ICX_M64: #define __PKU__ 1
1550 // CHECK_ICX_M64: #define __POPCNT__ 1
1551 // CHECK_ICX_M64: #define __PRFCHW__ 1
1552 // CHECK_ICX_M64: #define __RDPID__ 1
1553 // CHECK_ICX_M64: #define __RDRND__ 1
1554 // CHECK_ICX_M64: #define __RDSEED__ 1
1555 // CHECK_ICX_M64: #define __SGX__ 1
1556 // CHECK_ICX_M64: #define __SHA__ 1
1557 // CHECK_ICX_M64: #define __SSE2__ 1
1558 // CHECK_ICX_M64: #define __SSE3__ 1
1559 // CHECK_ICX_M64: #define __SSE4_1__ 1
1560 // CHECK_ICX_M64: #define __SSE4_2__ 1
1561 // CHECK_ICX_M64: #define __SSE__ 1
1562 // CHECK_ICX_M64: #define __SSSE3__ 1
1563 // CHECK_ICX_M64: #define __VAES__ 1
1564 // CHECK_ICX_M64: #define __VPCLMULQDQ__ 1
1565 // CHECK_ICX_M64: #define __WBNOINVD__ 1
1566 // CHECK_ICX_M64: #define __XSAVEC__ 1
1567 // CHECK_ICX_M64: #define __XSAVEOPT__ 1
1568 // CHECK_ICX_M64: #define __XSAVES__ 1
1569 // CHECK_ICX_M64: #define __XSAVE__ 1
1570 // CHECK_ICX_M64: #define __amd64 1
1571 // CHECK_ICX_M64: #define __amd64__ 1
1572 // CHECK_ICX_M64: #define __corei7 1
1573 // CHECK_ICX_M64: #define __corei7__ 1
1574 // CHECK_ICX_M64: #define __tune_corei7__ 1
1575 // CHECK_ICX_M64: #define __x86_64 1
1576 // CHECK_ICX_M64: #define __x86_64__ 1
1578 // RUN: %clang -march=tigerlake -m32 -E -dM %s -o - 2>&1 \
1579 // RUN: -target i386-unknown-linux \
1580 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_TGL_M32
1581 // CHECK_TGL_M32: #define __AES__ 1
1582 // CHECK_TGL_M32: #define __AVX2__ 1
1583 // CHECK_TGL_M32: #define __AVX512BITALG__ 1
1584 // CHECK_TGL_M32: #define __AVX512BW__ 1
1585 // CHECK_TGL_M32: #define __AVX512CD__ 1
1586 // CHECK_TGL_M32: #define __AVX512DQ__ 1
1587 // CHECK_TGL_M32: #define __AVX512F__ 1
1588 // CHECK_TGL_M32: #define __AVX512IFMA__ 1
1589 // CHECK_TGL_M32: #define __AVX512VBMI2__ 1
1590 // CHECK_TGL_M32: #define __AVX512VBMI__ 1
1591 // CHECK_TGL_M32: #define __AVX512VL__ 1
1592 // CHECK_TGL_M32: #define __AVX512VNNI__ 1
1593 // CHECK_TGL_M32: #define __AVX512VP2INTERSECT__ 1
1594 // CHECK_TGL_M32: #define __AVX512VPOPCNTDQ__ 1
1595 // CHECK_TGL_M32: #define __AVX__ 1
1596 // CHECK_TGL_M32: #define __BMI2__ 1
1597 // CHECK_TGL_M32: #define __BMI__ 1
1598 // CHECK_TGL_M32: #define __CLFLUSHOPT__ 1
1599 // CHECK_TGL_M32: #define __CLWB__ 1
1600 // CHECK_TGL_M32: #define __EVEX512__ 1
1601 // CHECK_TGL_M32: #define __F16C__ 1
1602 // CHECK_TGL_M32: #define __FMA__ 1
1603 // CHECK_TGL_M32: #define __GFNI__ 1
1604 // CHECK_TGL_M32: #define __INVPCID__ 1
1605 // CHECK_TGL_M32: #define __LZCNT__ 1
1606 // CHECK_TGL_M32: #define __MMX__ 1
1607 // CHECK_TGL_M32: #define __MOVBE__ 1
1608 // CHECK_TGL_M32: #define __MOVDIR64B__ 1
1609 // CHECK_TGL_M32: #define __MOVDIRI__ 1
1610 // CHECK_TGL_M32: #define __PCLMUL__ 1
1611 // CHECK_TGL_M32-NOT: #define __PCONFIG__ 1
1612 // CHECK_TGL_M32: #define __PKU__ 1
1613 // CHECK_TGL_M32: #define __POPCNT__ 1
1614 // CHECK_TGL_M32: #define __PRFCHW__ 1
1615 // CHECK_TGL_M32: #define __RDPID__ 1
1616 // CHECK_TGL_M32: #define __RDRND__ 1
1617 // CHECK_TGL_M32: #define __RDSEED__ 1
1618 // CHECK_TGL_M32: #define __SGX__ 1
1619 // CHECK_TGL_M32: #define __SHA__ 1
1620 // CHECK_TGL_M32: #define __SHSTK__ 1
1621 // CHECK_TGL_M32: #define __SSE2__ 1
1622 // CHECK_TGL_M32: #define __SSE3__ 1
1623 // CHECK_TGL_M32: #define __SSE4_1__ 1
1624 // CHECK_TGL_M32: #define __SSE4_2__ 1
1625 // CHECK_TGL_M32: #define __SSE__ 1
1626 // CHECK_TGL_M32: #define __SSSE3__ 1
1627 // CHECK_TGL_M32: #define __VAES__ 1
1628 // CHECK_TGL_M32: #define __VPCLMULQDQ__ 1
1629 // CHECK_TGL_M32-NOT: #define __WBNOINVD__ 1
1630 // CHECK_TGL_M32: #define __XSAVEC__ 1
1631 // CHECK_TGL_M32: #define __XSAVEOPT__ 1
1632 // CHECK_TGL_M32: #define __XSAVES__ 1
1633 // CHECK_TGL_M32: #define __XSAVE__ 1
1634 // CHECK_TGL_M32: #define __corei7 1
1635 // CHECK_TGL_M32: #define __corei7__ 1
1636 // CHECK_TGL_M32: #define __i386 1
1637 // CHECK_TGL_M32: #define __i386__ 1
1638 // CHECK_TGL_M32: #define __tune_corei7__ 1
1639 // CHECK_TGL_M32: #define i386 1
1641 // RUN: %clang -march=tigerlake -m64 -E -dM %s -o - 2>&1 \
1642 // RUN: -target i386-unknown-linux \
1643 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_TGL_M64
1644 // CHECK_TGL_M64: #define __AES__ 1
1645 // CHECK_TGL_M64: #define __AVX2__ 1
1646 // CHECK_TGL_M64: #define __AVX512BITALG__ 1
1647 // CHECK_TGL_M64: #define __AVX512BW__ 1
1648 // CHECK_TGL_M64: #define __AVX512CD__ 1
1649 // CHECK_TGL_M64: #define __AVX512DQ__ 1
1650 // CHECK_TGL_M64: #define __AVX512F__ 1
1651 // CHECK_TGL_M64: #define __AVX512IFMA__ 1
1652 // CHECK_TGL_M64: #define __AVX512VBMI2__ 1
1653 // CHECK_TGL_M64: #define __AVX512VBMI__ 1
1654 // CHECK_TGL_M64: #define __AVX512VL__ 1
1655 // CHECK_TGL_M64: #define __AVX512VNNI__ 1
1656 // CHECK_TGL_M64: #define __AVX512VP2INTERSECT__ 1
1657 // CHECK_TGL_M64: #define __AVX512VPOPCNTDQ__ 1
1658 // CHECK_TGL_M64: #define __AVX__ 1
1659 // CHECK_TGL_M64: #define __BMI2__ 1
1660 // CHECK_TGL_M64: #define __BMI__ 1
1661 // CHECK_TGL_M64: #define __CLFLUSHOPT__ 1
1662 // CHECK_TGL_M64: #define __CLWB__ 1
1663 // CHECK_TGL_M64: #define __EVEX512__ 1
1664 // CHECK_TGL_M64: #define __F16C__ 1
1665 // CHECK_TGL_M64: #define __FMA__ 1
1666 // CHECK_TGL_M64: #define __GFNI__ 1
1667 // CHECK_TGL_M64: #define __INVPCID__ 1
1668 // CHECK_TGL_M64: #define __LZCNT__ 1
1669 // CHECK_TGL_M64: #define __MMX__ 1
1670 // CHECK_TGL_M64: #define __MOVBE__ 1
1671 // CHECK_TGL_M64: #define __MOVDIR64B__ 1
1672 // CHECK_TGL_M64: #define __MOVDIRI__ 1
1673 // CHECK_TGL_M64: #define __PCLMUL__ 1
1674 // CHECK_TGL_M64-NOT: #define __PCONFIG__ 1
1675 // CHECK_TGL_M64: #define __PKU__ 1
1676 // CHECK_TGL_M64: #define __POPCNT__ 1
1677 // CHECK_TGL_M64: #define __PRFCHW__ 1
1678 // CHECK_TGL_M64: #define __RDPID__ 1
1679 // CHECK_TGL_M64: #define __RDRND__ 1
1680 // CHECK_TGL_M64: #define __RDSEED__ 1
1681 // CHECK_TGL_M64: #define __SGX__ 1
1682 // CHECK_TGL_M64: #define __SHA__ 1
1683 // CHECK_TGL_M64: #define __SHSTK__ 1
1684 // CHECK_TGL_M64: #define __SSE2__ 1
1685 // CHECK_TGL_M64: #define __SSE3__ 1
1686 // CHECK_TGL_M64: #define __SSE4_1__ 1
1687 // CHECK_TGL_M64: #define __SSE4_2__ 1
1688 // CHECK_TGL_M64: #define __SSE__ 1
1689 // CHECK_TGL_M64: #define __SSSE3__ 1
1690 // CHECK_TGL_M64: #define __VAES__ 1
1691 // CHECK_TGL_M64: #define __VPCLMULQDQ__ 1
1692 // CHECK_TGL_M64-NOT: #define __WBNOINVD__ 1
1693 // CHECK_TGL_M64: #define __XSAVEC__ 1
1694 // CHECK_TGL_M64: #define __XSAVEOPT__ 1
1695 // CHECK_TGL_M64: #define __XSAVES__ 1
1696 // CHECK_TGL_M64: #define __XSAVE__ 1
1697 // CHECK_TGL_M64: #define __amd64 1
1698 // CHECK_TGL_M64: #define __amd64__ 1
1699 // CHECK_TGL_M64: #define __corei7 1
1700 // CHECK_TGL_M64: #define __corei7__ 1
1701 // CHECK_TGL_M64: #define __tune_corei7__ 1
1702 // CHECK_TGL_M64: #define __x86_64 1
1703 // CHECK_TGL_M64: #define __x86_64__ 1
1705 // RUN: %clang -march=sapphirerapids -m32 -E -dM %s -o - 2>&1 \
1706 // RUN: -target i386-unknown-linux \
1707 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_SPR_M32
1708 // RUN: %clang -march=emeraldrapids -m32 -E -dM %s -o - 2>&1 \
1709 // RUN: -target i386-unknown-linux \
1710 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_SPR_M32
1711 // CHECK_SPR_M32: #define __AES__ 1
1712 // CHECK_SPR_M32: #define __AMX_BF16__ 1
1713 // CHECK_SPR_M32: #define __AMX_INT8__ 1
1714 // CHECK_SPR_M32: #define __AMX_TILE__ 1
1715 // CHECK_SPR_M32: #define __AVX2__ 1
1716 // CHECK_SPR_M32: #define __AVX512BF16__ 1
1717 // CHECK_SPR_M32: #define __AVX512BITALG__ 1
1718 // CHECK_SPR_M32: #define __AVX512BW__ 1
1719 // CHECK_SPR_M32: #define __AVX512CD__ 1
1720 // CHECK_SPR_M32: #define __AVX512DQ__ 1
1721 // CHECK_SPR_M32: #define __AVX512FP16__ 1
1722 // CHECK_SPR_M32: #define __AVX512F__ 1
1723 // CHECK_SPR_M32: #define __AVX512IFMA__ 1
1724 // CHECK_SPR_M32: #define __AVX512VBMI2__ 1
1725 // CHECK_SPR_M32: #define __AVX512VBMI__ 1
1726 // CHECK_SPR_M32: #define __AVX512VL__ 1
1727 // CHECK_SPR_M32: #define __AVX512VNNI__ 1
1728 // CHECK_SPR_M32: #define __AVX512VPOPCNTDQ__ 1
1729 // CHECK_SPR_M32: #define __AVXVNNI__ 1
1730 // CHECK_SPR_M32: #define __AVX__ 1
1731 // CHECK_SPR_M32: #define __BMI2__ 1
1732 // CHECK_SPR_M32: #define __BMI__ 1
1733 // CHECK_SPR_M32: #define __CLDEMOTE__ 1
1734 // CHECK_SPR_M32: #define __CLFLUSHOPT__ 1
1735 // CHECK_SPR_M32: #define __CLWB__ 1
1736 // CHECK_SPR_M32: #define __ENQCMD__ 1
1737 // CHECK_SPR_M32: #define __EVEX512__ 1
1738 // CHECK_SPR_M32: #define __F16C__ 1
1739 // CHECK_SPR_M32: #define __FMA__ 1
1740 // CHECK_SPR_M32: #define __GFNI__ 1
1741 // CHECK_SPR_M32: #define __INVPCID__ 1
1742 // CHECK_SPR_M32: #define __LZCNT__ 1
1743 // CHECK_SPR_M32: #define __MMX__ 1
1744 // CHECK_SPR_M32: #define __MOVBE__ 1
1745 // CHECK_SPR_M32: #define __PCLMUL__ 1
1746 // CHECK_SPR_M32: #define __PCONFIG__ 1
1747 // CHECK_SPR_M32: #define __PKU__ 1
1748 // CHECK_SPR_M32: #define __POPCNT__ 1
1749 // CHECK_SPR_M32: #define __PRFCHW__ 1
1750 // CHECK_SPR_M32: #define __PTWRITE__ 1
1751 // CHECK_SPR_M32: #define __RDPID__ 1
1752 // CHECK_SPR_M32: #define __RDRND__ 1
1753 // CHECK_SPR_M32: #define __RDSEED__ 1
1754 // CHECK_SPR_M32: #define __SERIALIZE__ 1
1755 // CHECK_SPR_M32: #define __SGX__ 1
1756 // CHECK_SPR_M32: #define __SHA__ 1
1757 // CHECK_SPR_M32: #define __SHSTK__ 1
1758 // CHECK_SPR_M32: #define __SSE2__ 1
1759 // CHECK_SPR_M32: #define __SSE3__ 1
1760 // CHECK_SPR_M32: #define __SSE4_1__ 1
1761 // CHECK_SPR_M32: #define __SSE4_2__ 1
1762 // CHECK_SPR_M32: #define __SSE__ 1
1763 // CHECK_SPR_M32: #define __SSSE3__ 1
1764 // CHECK_SPR_M32: #define __TSXLDTRK__ 1
1765 // CHECK_SPR_M32: #define __UINTR__ 1
1766 // CHECK_SPR_M32: #define __VAES__ 1
1767 // CHECK_SPR_M32: #define __VPCLMULQDQ__ 1
1768 // CHECK_SPR_M32: #define __WAITPKG__ 1
1769 // CHECK_SPR_M32: #define __WBNOINVD__ 1
1770 // CHECK_SPR_M32: #define __XSAVEC__ 1
1771 // CHECK_SPR_M32: #define __XSAVEOPT__ 1
1772 // CHECK_SPR_M32: #define __XSAVES__ 1
1773 // CHECK_SPR_M32: #define __XSAVE__ 1
1774 // CHECK_SPR_M32: #define __corei7 1
1775 // CHECK_SPR_M32: #define __corei7__ 1
1776 // CHECK_SPR_M32: #define __i386 1
1777 // CHECK_SPR_M32: #define __i386__ 1
1778 // CHECK_SPR_M32: #define __tune_corei7__ 1
1779 // CHECK_SPR_M32: #define i386 1
1781 // RUN: %clang -march=sapphirerapids -m64 -E -dM %s -o - 2>&1 \
1782 // RUN: -target i386-unknown-linux \
1783 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_SPR_M64
1784 // RUN: %clang -march=emeraldrapids -m64 -E -dM %s -o - 2>&1 \
1785 // RUN: -target i386-unknown-linux \
1786 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_SPR_M64
1787 // CHECK_SPR_M64: #define __AES__ 1
1788 // CHECK_SPR_M64: #define __AMX_BF16__ 1
1789 // CHECK_SPR_M64: #define __AMX_INT8__ 1
1790 // CHECK_SPR_M64: #define __AMX_TILE__ 1
1791 // CHECK_SPR_M64: #define __AVX2__ 1
1792 // CHECK_SPR_M64: #define __AVX512BF16__ 1
1793 // CHECK_SPR_M64: #define __AVX512BITALG__ 1
1794 // CHECK_SPR_M64: #define __AVX512BW__ 1
1795 // CHECK_SPR_M64: #define __AVX512CD__ 1
1796 // CHECK_SPR_M64: #define __AVX512DQ__ 1
1797 // CHECK_SPR_M64: #define __AVX512FP16__ 1
1798 // CHECK_SPR_M64: #define __AVX512F__ 1
1799 // CHECK_SPR_M64: #define __AVX512IFMA__ 1
1800 // CHECK_SPR_M64: #define __AVX512VBMI2__ 1
1801 // CHECK_SPR_M64: #define __AVX512VBMI__ 1
1802 // CHECK_SPR_M64: #define __AVX512VL__ 1
1803 // CHECK_SPR_M64: #define __AVX512VNNI__ 1
1804 // CHECK_SPR_M64: #define __AVX512VPOPCNTDQ__ 1
1805 // CHECK_SPR_M64: #define __AVXVNNI__ 1
1806 // CHECK_SPR_M64: #define __AVX__ 1
1807 // CHECK_SPR_M64: #define __BMI2__ 1
1808 // CHECK_SPR_M64: #define __BMI__ 1
1809 // CHECK_SPR_M64: #define __CLDEMOTE__ 1
1810 // CHECK_SPR_M64: #define __CLFLUSHOPT__ 1
1811 // CHECK_SPR_M64: #define __CLWB__ 1
1812 // CHECK_SPR_M64: #define __ENQCMD__ 1
1813 // CHECK_SPR_M64: #define __EVEX512__ 1
1814 // CHECK_SPR_M64: #define __F16C__ 1
1815 // CHECK_SPR_M64: #define __FMA__ 1
1816 // CHECK_SPR_M64: #define __GFNI__ 1
1817 // CHECK_SPR_M64: #define __INVPCID__ 1
1818 // CHECK_SPR_M64: #define __LZCNT__ 1
1819 // CHECK_SPR_M64: #define __MMX__ 1
1820 // CHECK_SPR_M64: #define __MOVBE__ 1
1821 // CHECK_SPR_M64: #define __PCLMUL__ 1
1822 // CHECK_SPR_M64: #define __PCONFIG__ 1
1823 // CHECK_SPR_M64: #define __PKU__ 1
1824 // CHECK_SPR_M64: #define __POPCNT__ 1
1825 // CHECK_SPR_M64: #define __PRFCHW__ 1
1826 // CHECK_SPR_M64: #define __PTWRITE__ 1
1827 // CHECK_SPR_M64: #define __RDPID__ 1
1828 // CHECK_SPR_M64: #define __RDRND__ 1
1829 // CHECK_SPR_M64: #define __RDSEED__ 1
1830 // CHECK_SPR_M64: #define __SERIALIZE__ 1
1831 // CHECK_SPR_M64: #define __SGX__ 1
1832 // CHECK_SPR_M64: #define __SHA__ 1
1833 // CHECK_SPR_M64: #define __SHSTK__ 1
1834 // CHECK_SPR_M64: #define __SSE2__ 1
1835 // CHECK_SPR_M64: #define __SSE3__ 1
1836 // CHECK_SPR_M64: #define __SSE4_1__ 1
1837 // CHECK_SPR_M64: #define __SSE4_2__ 1
1838 // CHECK_SPR_M64: #define __SSE__ 1
1839 // CHECK_SPR_M64: #define __SSSE3__ 1
1840 // CHECK_SPR_M64: #define __TSXLDTRK__ 1
1841 // CHECK_SPR_M64: #define __UINTR__ 1
1842 // CHECK_SPR_M64: #define __VAES__ 1
1843 // CHECK_SPR_M64: #define __VPCLMULQDQ__ 1
1844 // CHECK_SPR_M64: #define __WAITPKG__ 1
1845 // CHECK_SPR_M64: #define __WBNOINVD__ 1
1846 // CHECK_SPR_M64: #define __XSAVEC__ 1
1847 // CHECK_SPR_M64: #define __XSAVEOPT__ 1
1848 // CHECK_SPR_M64: #define __XSAVES__ 1
1849 // CHECK_SPR_M64: #define __XSAVE__ 1
1850 // CHECK_SPR_M64: #define __amd64 1
1851 // CHECK_SPR_M64: #define __amd64__ 1
1852 // CHECK_SPR_M64: #define __corei7 1
1853 // CHECK_SPR_M64: #define __corei7__ 1
1854 // CHECK_SPR_M64: #define __tune_corei7__ 1
1855 // CHECK_SPR_M64: #define __x86_64 1
1856 // CHECK_SPR_M64: #define __x86_64__ 1
1858 // RUN: %clang -march=graniterapids -m32 -E -dM %s -o - 2>&1 \
1859 // RUN: --target=i386 \
1860 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_GNR_M32
1861 // RUN: %clang -march=graniterapids-d -m32 -E -dM %s -o - 2>&1 \
1862 // RUN: --target=i386 \
1863 // RUN: | FileCheck -match-full-lines %s -check-prefixes=CHECK_GNR_M32,CHECK_GNRD_M32
1864 // CHECK_GNR_M32: #define __AES__ 1
1865 // CHECK_GNR_M32: #define __AMX_BF16__ 1
1866 // CHECK_GNR_M32-NOT: #define __AMX_COMPLEX__ 1
1867 // CHECK_GNRD_M32: #define __AMX_COMPLEX__ 1
1868 // CHECK_GNR_M32: #define __AMX_FP16__ 1
1869 // CHECK_GNR_M32: #define __AMX_INT8__ 1
1870 // CHECK_GNR_M32: #define __AMX_TILE__ 1
1871 // CHECK_GNR_M32: #define __AVX2__ 1
1872 // CHECK_GNR_M32: #define __AVX512BF16__ 1
1873 // CHECK_GNR_M32: #define __AVX512BITALG__ 1
1874 // CHECK_GNR_M32: #define __AVX512BW__ 1
1875 // CHECK_GNR_M32: #define __AVX512CD__ 1
1876 // CHECK_GNR_M32: #define __AVX512DQ__ 1
1877 // CHECK_GNR_M32: #define __AVX512FP16__ 1
1878 // CHECK_GNR_M32: #define __AVX512F__ 1
1879 // CHECK_GNR_M32: #define __AVX512IFMA__ 1
1880 // CHECK_GNR_M32: #define __AVX512VBMI2__ 1
1881 // CHECK_GNR_M32: #define __AVX512VBMI__ 1
1882 // CHECK_GNR_M32: #define __AVX512VL__ 1
1883 // CHECK_GNR_M32: #define __AVX512VNNI__ 1
1884 // CHECK_GNR_M32: #define __AVX512VPOPCNTDQ__ 1
1885 // CHECK_GNR_M32: #define __AVXVNNI__ 1
1886 // CHECK_GNR_M32: #define __AVX__ 1
1887 // CHECK_GNR_M32: #define __BMI2__ 1
1888 // CHECK_GNR_M32: #define __BMI__ 1
1889 // CHECK_GNR_M32: #define __CLDEMOTE__ 1
1890 // CHECK_GNR_M32: #define __CLFLUSHOPT__ 1
1891 // CHECK_GNR_M32: #define __CLWB__ 1
1892 // CHECK_GNR_M32: #define __ENQCMD__ 1
1893 // CHECK_GNR_M32: #define __EVEX512__ 1
1894 // CHECK_GNR_M32: #define __F16C__ 1
1895 // CHECK_GNR_M32: #define __FMA__ 1
1896 // CHECK_GNR_M32: #define __GFNI__ 1
1897 // CHECK_GNR_M32: #define __INVPCID__ 1
1898 // CHECK_GNR_M32: #define __LZCNT__ 1
1899 // CHECK_GNR_M32: #define __MMX__ 1
1900 // CHECK_GNR_M32: #define __MOVBE__ 1
1901 // CHECK_GNR_M32: #define __PCLMUL__ 1
1902 // CHECK_GNR_M32: #define __PCONFIG__ 1
1903 // CHECK_GNR_M32: #define __PKU__ 1
1904 // CHECK_GNR_M32: #define __POPCNT__ 1
1905 // CHECK_GNR_M32: #define __PREFETCHI__ 1
1906 // CHECK_GNR_M32: #define __PRFCHW__ 1
1907 // CHECK_GNR_M32: #define __PTWRITE__ 1
1908 // CHECK_GNR_M32: #define __RDPID__ 1
1909 // CHECK_GNR_M32: #define __RDRND__ 1
1910 // CHECK_GNR_M32: #define __RDSEED__ 1
1911 // CHECK_GNR_M32: #define __SERIALIZE__ 1
1912 // CHECK_GNR_M32: #define __SGX__ 1
1913 // CHECK_GNR_M32: #define __SHA__ 1
1914 // CHECK_GNR_M32: #define __SHSTK__ 1
1915 // CHECK_GNR_M32: #define __SSE2__ 1
1916 // CHECK_GNR_M32: #define __SSE3__ 1
1917 // CHECK_GNR_M32: #define __SSE4_1__ 1
1918 // CHECK_GNR_M32: #define __SSE4_2__ 1
1919 // CHECK_GNR_M32: #define __SSE__ 1
1920 // CHECK_GNR_M32: #define __SSSE3__ 1
1921 // CHECK_GNR_M32: #define __TSXLDTRK__ 1
1922 // CHECK_GNR_M32: #define __UINTR__ 1
1923 // CHECK_GNR_M32: #define __VAES__ 1
1924 // CHECK_GNR_M32: #define __VPCLMULQDQ__ 1
1925 // CHECK_GNR_M32: #define __WAITPKG__ 1
1926 // CHECK_GNR_M32: #define __WBNOINVD__ 1
1927 // CHECK_GNR_M32: #define __XSAVEC__ 1
1928 // CHECK_GNR_M32: #define __XSAVEOPT__ 1
1929 // CHECK_GNR_M32: #define __XSAVES__ 1
1930 // CHECK_GNR_M32: #define __XSAVE__ 1
1931 // CHECK_GNR_M32: #define __corei7 1
1932 // CHECK_GNR_M32: #define __corei7__ 1
1933 // CHECK_GNR_M32: #define __i386 1
1934 // CHECK_GNR_M32: #define __i386__ 1
1935 // CHECK_GNR_M32: #define __tune_corei7__ 1
1936 // CHECK_GNR_M32: #define i386 1
1938 // RUN: %clang -march=graniterapids -m64 -E -dM %s -o - 2>&1 \
1939 // RUN: --target=x86_64 \
1940 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_GNR_M64
1941 // RUN: %clang -march=graniterapids-d -m64 -E -dM %s -o - 2>&1 \
1942 // RUN: --target=x86_64 \
1943 // RUN: | FileCheck -match-full-lines %s -check-prefixes=CHECK_GNR_M64,CHECK_GNRD_M64
1944 // CHECK_GNR_M64: #define __AES__ 1
1945 // CHECK_GNR_M64: #define __AMX_BF16__ 1
1946 // CHECK_GNR_M64-NOT: #define __AMX_COMPLEX__ 1
1947 // CHECK_GNRD_M64: #define __AMX_COMPLEX__ 1
1948 // CHECK_GNR_M64: #define __AMX_FP16__ 1
1949 // CHECK_GNR_M64: #define __AMX_INT8__ 1
1950 // CHECK_GNR_M64: #define __AMX_TILE__ 1
1951 // CHECK_GNR_M64: #define __AVX2__ 1
1952 // CHECK_GNR_M64: #define __AVX512BF16__ 1
1953 // CHECK_GNR_M64: #define __AVX512BITALG__ 1
1954 // CHECK_GNR_M64: #define __AVX512BW__ 1
1955 // CHECK_GNR_M64: #define __AVX512CD__ 1
1956 // CHECK_GNR_M64: #define __AVX512DQ__ 1
1957 // CHECK_GNR_M64: #define __AVX512FP16__ 1
1958 // CHECK_GNR_M64: #define __AVX512F__ 1
1959 // CHECK_GNR_M64: #define __AVX512IFMA__ 1
1960 // CHECK_GNR_M64: #define __AVX512VBMI2__ 1
1961 // CHECK_GNR_M64: #define __AVX512VBMI__ 1
1962 // CHECK_GNR_M64: #define __AVX512VL__ 1
1963 // CHECK_GNR_M64: #define __AVX512VNNI__ 1
1964 // CHECK_GNR_M64: #define __AVX512VPOPCNTDQ__ 1
1965 // CHECK_GNR_M64: #define __AVXVNNI__ 1
1966 // CHECK_GNR_M64: #define __AVX__ 1
1967 // CHECK_GNR_M64: #define __BMI2__ 1
1968 // CHECK_GNR_M64: #define __BMI__ 1
1969 // CHECK_GNR_M64: #define __CLDEMOTE__ 1
1970 // CHECK_GNR_M64: #define __CLFLUSHOPT__ 1
1971 // CHECK_GNR_M64: #define __CLWB__ 1
1972 // CHECK_GNR_M64: #define __ENQCMD__ 1
1973 // CHECK_GNR_M64: #define __EVEX512__ 1
1974 // CHECK_GNR_M64: #define __F16C__ 1
1975 // CHECK_GNR_M64: #define __FMA__ 1
1976 // CHECK_GNR_M64: #define __GFNI__ 1
1977 // CHECK_GNR_M64: #define __INVPCID__ 1
1978 // CHECK_GNR_M64: #define __LZCNT__ 1
1979 // CHECK_GNR_M64: #define __MMX__ 1
1980 // CHECK_GNR_M64: #define __MOVBE__ 1
1981 // CHECK_GNR_M64: #define __PCLMUL__ 1
1982 // CHECK_GNR_M64: #define __PCONFIG__ 1
1983 // CHECK_GNR_M64: #define __PKU__ 1
1984 // CHECK_GNR_M64: #define __POPCNT__ 1
1985 // CHECK_GNR_M64: #define __PREFETCHI__ 1
1986 // CHECK_GNR_M64: #define __PRFCHW__ 1
1987 // CHECK_GNR_M64: #define __PTWRITE__ 1
1988 // CHECK_GNR_M64: #define __RDPID__ 1
1989 // CHECK_GNR_M64: #define __RDRND__ 1
1990 // CHECK_GNR_M64: #define __RDSEED__ 1
1991 // CHECK_GNR_M64: #define __SERIALIZE__ 1
1992 // CHECK_GNR_M64: #define __SGX__ 1
1993 // CHECK_GNR_M64: #define __SHA__ 1
1994 // CHECK_GNR_M64: #define __SHSTK__ 1
1995 // CHECK_GNR_M64: #define __SSE2__ 1
1996 // CHECK_GNR_M64: #define __SSE3__ 1
1997 // CHECK_GNR_M64: #define __SSE4_1__ 1
1998 // CHECK_GNR_M64: #define __SSE4_2__ 1
1999 // CHECK_GNR_M64: #define __SSE__ 1
2000 // CHECK_GNR_M64: #define __SSSE3__ 1
2001 // CHECK_GNR_M64: #define __TSXLDTRK__ 1
2002 // CHECK_GNR_M64: #define __UINTR__ 1
2003 // CHECK_GNR_M64: #define __VAES__ 1
2004 // CHECK_GNR_M64: #define __VPCLMULQDQ__ 1
2005 // CHECK_GNR_M64: #define __WAITPKG__ 1
2006 // CHECK_GNR_M64: #define __WBNOINVD__ 1
2007 // CHECK_GNR_M64: #define __XSAVEC__ 1
2008 // CHECK_GNR_M64: #define __XSAVEOPT__ 1
2009 // CHECK_GNR_M64: #define __XSAVES__ 1
2010 // CHECK_GNR_M64: #define __XSAVE__ 1
2011 // CHECK_GNR_M64: #define __amd64 1
2012 // CHECK_GNR_M64: #define __amd64__ 1
2013 // CHECK_GNR_M64: #define __corei7 1
2014 // CHECK_GNR_M64: #define __corei7__ 1
2015 // CHECK_GNR_M64: #define __tune_corei7__ 1
2016 // CHECK_GNR_M64: #define __x86_64 1
2017 // CHECK_GNR_M64: #define __x86_64__ 1
2019 // RUN: %clang -march=alderlake -m32 -E -dM %s -o - 2>&1 \
2020 // RUN: -target i386-unknown-linux \
2021 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_ADL_M32
2022 // RUN: %clang -march=raptorlake -m32 -E -dM %s -o - 2>&1 \
2023 // RUN: -target i386-unknown-linux \
2024 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_ADL_M32
2025 // RUN: %clang -march=meteorlake -m32 -E -dM %s -o - 2>&1 \
2026 // RUN: -target i386-unknown-linux \
2027 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_ADL_M32
2028 // RUN: %clang -march=gracemont -m32 -E -dM %s -o - 2>&1 \
2029 // RUN: -target i386-unknown-linux \
2030 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_ADL_M32
2031 // CHECK_ADL_M32: #define __ADX__ 1
2032 // CHECK_ADL_M32: #define __AES__ 1
2033 // CHECK_ADL_M32: #define __AVX2__ 1
2034 // CHECK_ADL_M32-NOT: AVX512
2035 // CHECK_ADL_M32: #define __AVXVNNI__ 1
2036 // CHECK_ADL_M32: #define __AVX__ 1
2037 // CHECK_ADL_M32: #define __BMI2__ 1
2038 // CHECK_ADL_M32: #define __BMI__ 1
2039 // CHECK_ADL_M32: #define __CLDEMOTE__ 1
2040 // CHECK_ADL_M32: #define __CLFLUSHOPT__ 1
2041 // CHECK_ADL_M32: #define __CLWB__ 1
2042 // CHECK_ADL_M32: #define __F16C__ 1
2043 // CHECK_ADL_M32: #define __FMA__ 1
2044 // CHECK_ADL_M32: #define __FSGSBASE__ 1
2045 // CHECK_ADL_M32: #define __FXSR__ 1
2046 // CHECK_ADL_M32: #define __GFNI__ 1
2047 // CHECK_ADL_M32: #define __HRESET__ 1
2048 // CHECK_ADL_M32: #define __INVPCID__ 1
2049 // CHECK_ADL_M32: #define __KL__ 1
2050 // CHECK_ADL_M32: #define __LZCNT__ 1
2051 // CHECK_ADL_M32: #define __MMX__ 1
2052 // CHECK_ADL_M32: #define __MOVBE__ 1
2053 // CHECK_ADL_M32: #define __MOVDIR64B__ 1
2054 // CHECK_ADL_M32: #define __MOVDIRI__ 1
2055 // CHECK_ADL_M32: #define __PCLMUL__ 1
2056 // CHECK_ADL_M32: #define __PCONFIG__ 1
2057 // CHECK_ADL_M32: #define __PKU__ 1
2058 // CHECK_ADL_M32: #define __POPCNT__ 1
2059 // CHECK_ADL_M32: #define __PRFCHW__ 1
2060 // CHECK_ADL_M32: #define __PTWRITE__ 1
2061 // CHECK_ADL_M32: #define __RDPID__ 1
2062 // CHECK_ADL_M32: #define __RDRND__ 1
2063 // CHECK_ADL_M32: #define __RDSEED__ 1
2064 // CHECK_ADL_M32: #define __SERIALIZE__ 1
2065 // CHECK_ADL_M32: #define __SGX__ 1
2066 // CHECK_ADL_M32: #define __SHA__ 1
2067 // CHECK_ADL_M32: #define __SHSTK__ 1
2068 // CHECK_ADL_M32: #define __SSE2__ 1
2069 // CHECK_ADL_M32: #define __SSE3__ 1
2070 // CHECK_ADL_M32: #define __SSE4_1__ 1
2071 // CHECK_ADL_M32: #define __SSE4_2__ 1
2072 // CHECK_ADL_M32: #define __SSE_MATH__ 1
2073 // CHECK_ADL_M32: #define __SSE__ 1
2074 // CHECK_ADL_M32: #define __SSSE3__ 1
2075 // CHECK_ADL_M32: #define __VAES__ 1
2076 // CHECK_ADL_M32: #define __VPCLMULQDQ__ 1
2077 // CHECK_ADL_M32: #define __WAITPKG__ 1
2078 // CHECK_ADL_M32: #define __WIDEKL__ 1
2079 // CHECK_ADL_M32: #define __XSAVEC__ 1
2080 // CHECK_ADL_M32: #define __XSAVEOPT__ 1
2081 // CHECK_ADL_M32: #define __XSAVES__ 1
2082 // CHECK_ADL_M32: #define __XSAVE__ 1
2083 // CHECK_ADL_M32: #define __corei7 1
2084 // CHECK_ADL_M32: #define __corei7__ 1
2085 // CHECK_ADL_M32: #define __i386 1
2086 // CHECK_ADL_M32: #define __i386__ 1
2087 // CHECK_ADL_M32: #define __tune_corei7__ 1
2088 // CHECK_ADL_M32: #define i386 1
2090 // RUN: %clang -march=alderlake -m64 -E -dM %s -o - 2>&1 \
2091 // RUN: -target i386-unknown-linux \
2092 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_ADL_M64
2093 // RUN: %clang -march=raptorlake -m64 -E -dM %s -o - 2>&1 \
2094 // RUN: -target i386-unknown-linux \
2095 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_ADL_M64
2096 // RUN: %clang -march=meteorlake -m64 -E -dM %s -o - 2>&1 \
2097 // RUN: -target i386-unknown-linux \
2098 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_ADL_M64
2099 // RUN: %clang -march=gracemont -m64 -E -dM %s -o - 2>&1 \
2100 // RUN: -target i386-unknown-linux \
2101 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_ADL_M64
2102 // CHECK_ADL_M64: #define __ADX__ 1
2103 // CHECK_ADL_M64: #define __AES__ 1
2104 // CHECK_ADL_M64: #define __AVX2__ 1
2105 // CHECK_ADL_M64-NOT: AVX512
2106 // CHECK_ADL_M64: #define __AVXVNNI__ 1
2107 // CHECK_ADL_M64: #define __AVX__ 1
2108 // CHECK_ADL_M64: #define __BMI2__ 1
2109 // CHECK_ADL_M64: #define __BMI__ 1
2110 // CHECK_ADL_M64: #define __CLDEMOTE__ 1
2111 // CHECK_ADL_M64: #define __CLFLUSHOPT__ 1
2112 // CHECK_ADL_M64: #define __CLWB__ 1
2113 // CHECK_ADL_M64: #define __F16C__ 1
2114 // CHECK_ADL_M64: #define __FMA__ 1
2115 // CHECK_ADL_M64: #define __FSGSBASE__ 1
2116 // CHECK_ADL_M64: #define __FXSR__ 1
2117 // CHECK_ADL_M64: #define __GFNI__ 1
2118 // CHECK_ADL_M64: #define __HRESET__ 1
2119 // CHECK_ADL_M64: #define __INVPCID__ 1
2120 // CHECK_ADL_M64: #define __KL__ 1
2121 // CHECK_ADL_M64: #define __LZCNT__ 1
2122 // CHECK_ADL_M64: #define __MMX__ 1
2123 // CHECK_ADL_M64: #define __MOVBE__ 1
2124 // CHECK_ADL_M64: #define __MOVDIR64B__ 1
2125 // CHECK_ADL_M64: #define __MOVDIRI__ 1
2126 // CHECK_ADL_M64: #define __PCLMUL__ 1
2127 // CHECK_ADL_M64: #define __PCONFIG__ 1
2128 // CHECK_ADL_M64: #define __PKU__ 1
2129 // CHECK_ADL_M64: #define __POPCNT__ 1
2130 // CHECK_ADL_M64: #define __PRFCHW__ 1
2131 // CHECK_ADL_M64: #define __PTWRITE__ 1
2132 // CHECK_ADL_M64: #define __RDPID__ 1
2133 // CHECK_ADL_M64: #define __RDRND__ 1
2134 // CHECK_ADL_M64: #define __RDSEED__ 1
2135 // CHECK_ADL_M64: #define __SERIALIZE__ 1
2136 // CHECK_ADL_M64: #define __SGX__ 1
2137 // CHECK_ADL_M64: #define __SHA__ 1
2138 // CHECK_ADL_M64: #define __SHSTK__ 1
2139 // CHECK_ADL_M64: #define __SSE2_MATH__ 1
2140 // CHECK_ADL_M64: #define __SSE2__ 1
2141 // CHECK_ADL_M64: #define __SSE3__ 1
2142 // CHECK_ADL_M64: #define __SSE4_1__ 1
2143 // CHECK_ADL_M64: #define __SSE4_2__ 1
2144 // CHECK_ADL_M64: #define __SSE_MATH__ 1
2145 // CHECK_ADL_M64: #define __SSE__ 1
2146 // CHECK_ADL_M64: #define __SSSE3__ 1
2147 // CHECK_ADL_M64: #define __VAES__ 1
2148 // CHECK_ADL_M64: #define __VPCLMULQDQ__ 1
2149 // CHECK_ADL_M64: #define __WAITPKG__ 1
2150 // CHECK_ADL_M64: #define __WIDEKL__ 1
2151 // CHECK_ADL_M64: #define __XSAVEC__ 1
2152 // CHECK_ADL_M64: #define __XSAVEOPT__ 1
2153 // CHECK_ADL_M64: #define __XSAVES__ 1
2154 // CHECK_ADL_M64: #define __XSAVE__ 1
2155 // CHECK_ADL_M64: #define __amd64 1
2156 // CHECK_ADL_M64: #define __amd64__ 1
2157 // CHECK_ADL_M64: #define __corei7 1
2158 // CHECK_ADL_M64: #define __corei7__ 1
2159 // CHECK_ADL_M64: #define __tune_corei7__ 1
2160 // CHECK_ADL_M64: #define __x86_64 1
2161 // CHECK_ADL_M64: #define __x86_64__ 1
2163 // RUN: %clang -march=atom -m32 -E -dM %s -o - 2>&1 \
2164 // RUN: -target i386-unknown-linux \
2165 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_ATOM_M32
2166 // RUN: %clang -march=bonnell -m32 -E -dM %s -o - 2>&1 \
2167 // RUN: -target i386-unknown-linux \
2168 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_ATOM_M32
2169 // CHECK_ATOM_M32: #define __MMX__ 1
2170 // CHECK_ATOM_M32: #define __MOVBE__ 1
2171 // CHECK_ATOM_M32: #define __SSE2__ 1
2172 // CHECK_ATOM_M32: #define __SSE3__ 1
2173 // CHECK_ATOM_M32: #define __SSE__ 1
2174 // CHECK_ATOM_M32: #define __SSSE3__ 1
2175 // CHECK_ATOM_M32: #define __atom 1
2176 // CHECK_ATOM_M32: #define __atom__ 1
2177 // CHECK_ATOM_M32: #define __i386 1
2178 // CHECK_ATOM_M32: #define __i386__ 1
2179 // CHECK_ATOM_M32: #define __tune_atom__ 1
2180 // CHECK_ATOM_M32: #define i386 1
2182 // RUN: %clang -march=atom -m64 -E -dM %s -o - 2>&1 \
2183 // RUN: -target i386-unknown-linux \
2184 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_ATOM_M64
2185 // RUN: %clang -march=bonnell -m64 -E -dM %s -o - 2>&1 \
2186 // RUN: -target i386-unknown-linux \
2187 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_ATOM_M64
2188 // CHECK_ATOM_M64: #define __MMX__ 1
2189 // CHECK_ATOM_M64: #define __MOVBE__ 1
2190 // CHECK_ATOM_M64: #define __SSE2_MATH__ 1
2191 // CHECK_ATOM_M64: #define __SSE2__ 1
2192 // CHECK_ATOM_M64: #define __SSE3__ 1
2193 // CHECK_ATOM_M64: #define __SSE_MATH__ 1
2194 // CHECK_ATOM_M64: #define __SSE__ 1
2195 // CHECK_ATOM_M64: #define __SSSE3__ 1
2196 // CHECK_ATOM_M64: #define __amd64 1
2197 // CHECK_ATOM_M64: #define __amd64__ 1
2198 // CHECK_ATOM_M64: #define __atom 1
2199 // CHECK_ATOM_M64: #define __atom__ 1
2200 // CHECK_ATOM_M64: #define __tune_atom__ 1
2201 // CHECK_ATOM_M64: #define __x86_64 1
2202 // CHECK_ATOM_M64: #define __x86_64__ 1
2204 // RUN: %clang -march=goldmont -m32 -E -dM %s -o - 2>&1 \
2205 // RUN: -target i386-unknown-linux \
2206 // RUN: | FileCheck %s -check-prefix=CHECK_GLM_M32
2207 // CHECK_GLM_M32: #define __AES__ 1
2208 // CHECK_GLM_M32: #define __CLFLUSHOPT__ 1
2209 // CHECK_GLM_M32: #define __FSGSBASE__ 1
2210 // CHECK_GLM_M32: #define __FXSR__ 1
2211 // CHECK_GLM_M32: #define __MMX__ 1
2212 // CHECK_GLM_M32: #define __MOVBE__ 1
2213 // CHECK_GLM_M32: #define __PCLMUL__ 1
2214 // CHECK_GLM_M32: #define __POPCNT__ 1
2215 // CHECK_GLM_M32: #define __PRFCHW__ 1
2216 // CHECK_GLM_M32: #define __RDRND__ 1
2217 // CHECK_GLM_M32: #define __RDSEED__ 1
2218 // CHECK_GLM_M32: #define __SHA__ 1
2219 // CHECK_GLM_M32: #define __SSE2__ 1
2220 // CHECK_GLM_M32: #define __SSE3__ 1
2221 // CHECK_GLM_M32: #define __SSE4_1__ 1
2222 // CHECK_GLM_M32: #define __SSE4_2__ 1
2223 // CHECK_GLM_M32: #define __SSE_MATH__ 1
2224 // CHECK_GLM_M32: #define __SSE__ 1
2225 // CHECK_GLM_M32: #define __SSSE3__ 1
2226 // CHECK_GLM_M32: #define __XSAVEC__ 1
2227 // CHECK_GLM_M32: #define __XSAVEOPT__ 1
2228 // CHECK_GLM_M32: #define __XSAVES__ 1
2229 // CHECK_GLM_M32: #define __XSAVE__ 1
2230 // CHECK_GLM_M32: #define __goldmont 1
2231 // CHECK_GLM_M32: #define __goldmont__ 1
2232 // CHECK_GLM_M32: #define __i386 1
2233 // CHECK_GLM_M32: #define __i386__ 1
2234 // CHECK_GLM_M32: #define __tune_goldmont__ 1
2235 // CHECK_GLM_M32: #define i386 1
2237 // RUN: %clang -march=goldmont -m64 -E -dM %s -o - 2>&1 \
2238 // RUN: -target i386-unknown-linux \
2239 // RUN: | FileCheck %s -check-prefix=CHECK_GLM_M64
2240 // CHECK_GLM_M64: #define __AES__ 1
2241 // CHECK_GLM_M64: #define __CLFLUSHOPT__ 1
2242 // CHECK_GLM_M64: #define __FSGSBASE__ 1
2243 // CHECK_GLM_M64: #define __FXSR__ 1
2244 // CHECK_GLM_M64: #define __MMX__ 1
2245 // CHECK_GLM_M64: #define __MOVBE__ 1
2246 // CHECK_GLM_M64: #define __PCLMUL__ 1
2247 // CHECK_GLM_M64: #define __POPCNT__ 1
2248 // CHECK_GLM_M64: #define __PRFCHW__ 1
2249 // CHECK_GLM_M64: #define __RDRND__ 1
2250 // CHECK_GLM_M64: #define __RDSEED__ 1
2251 // CHECK_GLM_M64: #define __SHA__ 1
2252 // CHECK_GLM_M64: #define __SSE2__ 1
2253 // CHECK_GLM_M64: #define __SSE3__ 1
2254 // CHECK_GLM_M64: #define __SSE4_1__ 1
2255 // CHECK_GLM_M64: #define __SSE4_2__ 1
2256 // CHECK_GLM_M64: #define __SSE__ 1
2257 // CHECK_GLM_M64: #define __SSSE3__ 1
2258 // CHECK_GLM_M64: #define __XSAVEC__ 1
2259 // CHECK_GLM_M64: #define __XSAVEOPT__ 1
2260 // CHECK_GLM_M64: #define __XSAVES__ 1
2261 // CHECK_GLM_M64: #define __XSAVE__ 1
2262 // CHECK_GLM_M64: #define __goldmont 1
2263 // CHECK_GLM_M64: #define __goldmont__ 1
2264 // CHECK_GLM_M64: #define __tune_goldmont__ 1
2265 // CHECK_GLM_M64: #define __x86_64 1
2266 // CHECK_GLM_M64: #define __x86_64__ 1
2268 // RUN: %clang -march=goldmont-plus -m32 -E -dM %s -o - 2>&1 \
2269 // RUN: -target i386-unknown-linux \
2270 // RUN: | FileCheck %s -check-prefix=CHECK_GLMP_M32
2271 // CHECK_GLMP_M32: #define __AES__ 1
2272 // CHECK_GLMP_M32: #define __CLFLUSHOPT__ 1
2273 // CHECK_GLMP_M32: #define __FSGSBASE__ 1
2274 // CHECK_GLMP_M32: #define __FXSR__ 1
2275 // CHECK_GLMP_M32: #define __MMX__ 1
2276 // CHECK_GLMP_M32: #define __MOVBE__ 1
2277 // CHECK_GLMP_M32: #define __PCLMUL__ 1
2278 // CHECK_GLMP_M32: #define __POPCNT__ 1
2279 // CHECK_GLMP_M32: #define __PRFCHW__ 1
2280 // CHECK_GLMP_M32: #define __PTWRITE__ 1
2281 // CHECK_GLMP_M32: #define __RDPID__ 1
2282 // CHECK_GLMP_M32: #define __RDRND__ 1
2283 // CHECK_GLMP_M32: #define __RDSEED__ 1
2284 // CHECK_GLMP_M32: #define __SGX__ 1
2285 // CHECK_GLMP_M32: #define __SHA__ 1
2286 // CHECK_GLMP_M32: #define __SSE2__ 1
2287 // CHECK_GLMP_M32: #define __SSE3__ 1
2288 // CHECK_GLMP_M32: #define __SSE4_1__ 1
2289 // CHECK_GLMP_M32: #define __SSE4_2__ 1
2290 // CHECK_GLMP_M32: #define __SSE_MATH__ 1
2291 // CHECK_GLMP_M32: #define __SSE__ 1
2292 // CHECK_GLMP_M32: #define __SSSE3__ 1
2293 // CHECK_GLMP_M32: #define __XSAVEC__ 1
2294 // CHECK_GLMP_M32: #define __XSAVEOPT__ 1
2295 // CHECK_GLMP_M32: #define __XSAVES__ 1
2296 // CHECK_GLMP_M32: #define __XSAVE__ 1
2297 // CHECK_GLMP_M32: #define __goldmont_plus 1
2298 // CHECK_GLMP_M32: #define __goldmont_plus__ 1
2299 // CHECK_GLMP_M32: #define __i386 1
2300 // CHECK_GLMP_M32: #define __i386__ 1
2301 // CHECK_GLMP_M32: #define __tune_goldmont_plus__ 1
2302 // CHECK_GLMP_M32: #define i386 1
2304 // RUN: %clang -march=goldmont-plus -m64 -E -dM %s -o - 2>&1 \
2305 // RUN: -target i386-unknown-linux \
2306 // RUN: | FileCheck %s -check-prefix=CHECK_GLMP_M64
2307 // CHECK_GLMP_M64: #define __AES__ 1
2308 // CHECK_GLMP_M64: #define __CLFLUSHOPT__ 1
2309 // CHECK_GLMP_M64: #define __FSGSBASE__ 1
2310 // CHECK_GLMP_M64: #define __FXSR__ 1
2311 // CHECK_GLMP_M64: #define __MMX__ 1
2312 // CHECK_GLMP_M64: #define __MOVBE__ 1
2313 // CHECK_GLMP_M64: #define __PCLMUL__ 1
2314 // CHECK_GLMP_M64: #define __POPCNT__ 1
2315 // CHECK_GLMP_M64: #define __PRFCHW__ 1
2316 // CHECK_GLMP_M64: #define __PTWRITE__ 1
2317 // CHECK_GLMP_M64: #define __RDPID__ 1
2318 // CHECK_GLMP_M64: #define __RDRND__ 1
2319 // CHECK_GLMP_M64: #define __RDSEED__ 1
2320 // CHECK_GLMP_M64: #define __SGX__ 1
2321 // CHECK_GLMP_M64: #define __SHA__ 1
2322 // CHECK_GLMP_M64: #define __SSE2__ 1
2323 // CHECK_GLMP_M64: #define __SSE3__ 1
2324 // CHECK_GLMP_M64: #define __SSE4_1__ 1
2325 // CHECK_GLMP_M64: #define __SSE4_2__ 1
2326 // CHECK_GLMP_M64: #define __SSE__ 1
2327 // CHECK_GLMP_M64: #define __SSSE3__ 1
2328 // CHECK_GLMP_M64: #define __XSAVEC__ 1
2329 // CHECK_GLMP_M64: #define __XSAVEOPT__ 1
2330 // CHECK_GLMP_M64: #define __XSAVES__ 1
2331 // CHECK_GLMP_M64: #define __XSAVE__ 1
2332 // CHECK_GLMP_M64: #define __goldmont_plus 1
2333 // CHECK_GLMP_M64: #define __goldmont_plus__ 1
2334 // CHECK_GLMP_M64: #define __tune_goldmont_plus__ 1
2335 // CHECK_GLMP_M64: #define __x86_64 1
2336 // CHECK_GLMP_M64: #define __x86_64__ 1
2338 // RUN: %clang -march=tremont -m32 -E -dM %s -o - 2>&1 \
2339 // RUN: -target i386-unknown-linux \
2340 // RUN: | FileCheck %s -check-prefix=CHECK_TRM_M32
2341 // CHECK_TRM_M32: #define __AES__ 1
2342 // CHECK_TRM_M32-NOT: #define __CLDEMOTE__ 1
2343 // CHECK_TRM_M32: #define __CLFLUSHOPT__ 1
2344 // CHECK_TRM_M32: #define __CLWB__ 1
2345 // CHECK_TRM_M32: #define __FSGSBASE__ 1
2346 // CHECK_TRM_M32: #define __FXSR__ 1
2347 // CHECK_TRM_M32: #define __GFNI__ 1
2348 // CHECK_TRM_M32: #define __MMX__ 1
2349 // CHECK_TRM_M32: #define __MOVBE__ 1
2350 // CHECK_TRM_M32-NOT: #define __MOVDIR64B__ 1
2351 // CHECK_TRM_M32-NOT: #define __MOVDIRI__ 1
2352 // CHECK_TRM_M32: #define __PCLMUL__ 1
2353 // CHECK_TRM_M32: #define __POPCNT__ 1
2354 // CHECK_TRM_M32: #define __PRFCHW__ 1
2355 // CHECK_TRM_M32: #define __PTWRITE__ 1
2356 // CHECK_TRM_M32: #define __RDPID__ 1
2357 // CHECK_TRM_M32: #define __RDRND__ 1
2358 // CHECK_TRM_M32: #define __RDSEED__ 1
2359 // CHECK_TRM_M32: #define __SGX__ 1
2360 // CHECK_TRM_M32: #define __SHA__ 1
2361 // CHECK_TRM_M32: #define __SSE2__ 1
2362 // CHECK_TRM_M32: #define __SSE3__ 1
2363 // CHECK_TRM_M32: #define __SSE4_1__ 1
2364 // CHECK_TRM_M32: #define __SSE4_2__ 1
2365 // CHECK_TRM_M32: #define __SSE_MATH__ 1
2366 // CHECK_TRM_M32: #define __SSE__ 1
2367 // CHECK_TRM_M32: #define __SSSE3__ 1
2368 // CHECK_TRM_M32-NOT: #define __WAITPKG__ 1
2369 // CHECK_TRM_M32: #define __XSAVEC__ 1
2370 // CHECK_TRM_M32: #define __XSAVEOPT__ 1
2371 // CHECK_TRM_M32: #define __XSAVES__ 1
2372 // CHECK_TRM_M32: #define __XSAVE__ 1
2373 // CHECK_TRM_M32: #define __i386 1
2374 // CHECK_TRM_M32: #define __i386__ 1
2375 // CHECK_TRM_M32: #define __tremont 1
2376 // CHECK_TRM_M32: #define __tremont__ 1
2377 // CHECK_TRM_M32: #define __tune_tremont__ 1
2378 // CHECK_TRM_M32: #define i386 1
2380 // RUN: %clang -march=tremont -m64 -E -dM %s -o - 2>&1 \
2381 // RUN: -target i386-unknown-linux \
2382 // RUN: | FileCheck %s -check-prefix=CHECK_TRM_M64
2383 // CHECK_TRM_M64: #define __AES__ 1
2384 // CHECK_TRM_M64-NOT: #define __CLDEMOTE__ 1
2385 // CHECK_TRM_M64: #define __CLFLUSHOPT__ 1
2386 // CHECK_TRM_M64: #define __CLWB__ 1
2387 // CHECK_TRM_M64: #define __FSGSBASE__ 1
2388 // CHECK_TRM_M64: #define __FXSR__ 1
2389 // CHECK_TRM_M64: #define __GFNI__ 1
2390 // CHECK_TRM_M64: #define __MMX__ 1
2391 // CHECK_TRM_M64: #define __MOVBE__ 1
2392 // CHECK_TRM_M64-NOT: #define __MOVDIR64B__ 1
2393 // CHECK_TRM_M64-NOT: #define __MOVDIRI__ 1
2394 // CHECK_TRM_M64: #define __PCLMUL__ 1
2395 // CHECK_TRM_M64: #define __POPCNT__ 1
2396 // CHECK_TRM_M64: #define __PRFCHW__ 1
2397 // CHECK_TRM_M64: #define __PTWRITE__ 1
2398 // CHECK_TRM_M64: #define __RDPID__ 1
2399 // CHECK_TRM_M64: #define __RDRND__ 1
2400 // CHECK_TRM_M64: #define __RDSEED__ 1
2401 // CHECK_TRM_M64: #define __SGX__ 1
2402 // CHECK_TRM_M64: #define __SHA__ 1
2403 // CHECK_TRM_M64: #define __SSE2__ 1
2404 // CHECK_TRM_M64: #define __SSE3__ 1
2405 // CHECK_TRM_M64: #define __SSE4_1__ 1
2406 // CHECK_TRM_M64: #define __SSE4_2__ 1
2407 // CHECK_TRM_M64: #define __SSE__ 1
2408 // CHECK_TRM_M64: #define __SSSE3__ 1
2409 // CHECK_TRM_M64-NOT: #define __WAITPKG__ 1
2410 // CHECK_TRM_M64: #define __XSAVEC__ 1
2411 // CHECK_TRM_M64: #define __XSAVEOPT__ 1
2412 // CHECK_TRM_M64: #define __XSAVES__ 1
2413 // CHECK_TRM_M64: #define __XSAVE__ 1
2414 // CHECK_TRM_M64: #define __tremont 1
2415 // CHECK_TRM_M64: #define __tremont__ 1
2416 // CHECK_TRM_M64: #define __tune_tremont__ 1
2417 // CHECK_TRM_M64: #define __x86_64 1
2418 // CHECK_TRM_M64: #define __x86_64__ 1
2420 // RUN: %clang -march=slm -m32 -E -dM %s -o - 2>&1 \
2421 // RUN: -target i386-unknown-linux \
2422 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_SLM_M32
2423 // RUN: %clang -march=silvermont -m32 -E -dM %s -o - 2>&1 \
2424 // RUN: -target i386-unknown-linux \
2425 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_SLM_M32
2426 // CHECK_SLM_M32: #define __FXSR__ 1
2427 // CHECK_SLM_M32: #define __MMX__ 1
2428 // CHECK_SLM_M32: #define __MOVBE__ 1
2429 // CHECK_SLM_M32: #define __PCLMUL__ 1
2430 // CHECK_SLM_M32: #define __POPCNT__ 1
2431 // CHECK_SLM_M32: #define __PRFCHW__ 1
2432 // CHECK_SLM_M32: #define __RDRND__ 1
2433 // CHECK_SLM_M32: #define __SSE2__ 1
2434 // CHECK_SLM_M32: #define __SSE3__ 1
2435 // CHECK_SLM_M32: #define __SSE4_1__ 1
2436 // CHECK_SLM_M32: #define __SSE4_2__ 1
2437 // CHECK_SLM_M32: #define __SSE__ 1
2438 // CHECK_SLM_M32: #define __SSSE3__ 1
2439 // CHECK_SLM_M32: #define __i386 1
2440 // CHECK_SLM_M32: #define __i386__ 1
2441 // CHECK_SLM_M32: #define __slm 1
2442 // CHECK_SLM_M32: #define __slm__ 1
2443 // CHECK_SLM_M32: #define __tune_slm__ 1
2444 // CHECK_SLM_M32: #define i386 1
2446 // RUN: %clang -march=slm -m64 -E -dM %s -o - 2>&1 \
2447 // RUN: -target i386-unknown-linux \
2448 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_SLM_M64
2449 // RUN: %clang -march=silvermont -m64 -E -dM %s -o - 2>&1 \
2450 // RUN: -target i386-unknown-linux \
2451 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_SLM_M64
2452 // CHECK_SLM_M64: #define __FXSR__ 1
2453 // CHECK_SLM_M64: #define __MMX__ 1
2454 // CHECK_SLM_M64: #define __MOVBE__ 1
2455 // CHECK_SLM_M64: #define __PCLMUL__ 1
2456 // CHECK_SLM_M64: #define __POPCNT__ 1
2457 // CHECK_SLM_M64: #define __PRFCHW__ 1
2458 // CHECK_SLM_M64: #define __RDRND__ 1
2459 // CHECK_SLM_M64: #define __SSE2_MATH__ 1
2460 // CHECK_SLM_M64: #define __SSE2__ 1
2461 // CHECK_SLM_M64: #define __SSE3__ 1
2462 // CHECK_SLM_M64: #define __SSE4_1__ 1
2463 // CHECK_SLM_M64: #define __SSE4_2__ 1
2464 // CHECK_SLM_M64: #define __SSE_MATH__ 1
2465 // CHECK_SLM_M64: #define __SSE__ 1
2466 // CHECK_SLM_M64: #define __SSSE3__ 1
2467 // CHECK_SLM_M64: #define __amd64 1
2468 // CHECK_SLM_M64: #define __amd64__ 1
2469 // CHECK_SLM_M64: #define __slm 1
2470 // CHECK_SLM_M64: #define __slm__ 1
2471 // CHECK_SLM_M64: #define __tune_slm__ 1
2472 // CHECK_SLM_M64: #define __x86_64 1
2473 // CHECK_SLM_M64: #define __x86_64__ 1
2475 // RUN: %clang -march=lakemont -m32 -E -dM %s -o - 2>&1 \
2476 // RUN: -target i386-unknown-linux \
2477 // RUN: | FileCheck %s -check-prefix=CHECK_LAKEMONT_M32
2478 // CHECK_LAKEMONT_M32: #define __i386 1
2479 // CHECK_LAKEMONT_M32: #define __i386__ 1
2480 // CHECK_LAKEMONT_M32: #define __i586 1
2481 // CHECK_LAKEMONT_M32: #define __i586__ 1
2482 // CHECK_LAKEMONT_M32: #define __pentium 1
2483 // CHECK_LAKEMONT_M32: #define __pentium__ 1
2484 // CHECK_LAKEMONT_M32: #define __tune_lakemont__ 1
2485 // CHECK_LAKEMONT_M32: #define i386 1
2486 // RUN: not %clang -march=lakemont -m64 -E -dM %s -o - 2>&1 \
2487 // RUN: -target i386-unknown-linux \
2488 // RUN: | FileCheck %s -check-prefix=CHECK_LAKEMONT_M64
2489 // CHECK_LAKEMONT_M64: error:
2491 // RUN: %clang -march=sierraforest -m32 -E -dM %s -o - 2>&1 \
2492 // RUN: --target=i386 \
2493 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_SRF_M32
2494 // RUN: %clang -march=grandridge -m32 -E -dM %s -o - 2>&1 \
2495 // RUN: --target=i386 \
2496 // RUN: | FileCheck -match-full-lines %s -check-prefixes=CHECK_SRF_M32,CHECK_GRR_M32
2497 // RUN: %clang -march=arrowlake -m32 -E -dM %s -o - 2>&1 \
2498 // RUN: -target i386-unknown-linux \
2499 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_SRF_M32
2500 // RUN: %clang -march=arrowlake-s -m32 -E -dM %s -o - 2>&1 \
2501 // RUN: -target i386-unknown-linux \
2502 // RUN: | FileCheck -match-full-lines %s -check-prefixes=CHECK_SRF_M32,CHECK_ARLS_M32
2503 // RUN: %clang -march=lunarlake -m32 -E -dM %s -o - 2>&1 \
2504 // RUN: -target i386-unknown-linux \
2505 // RUN: | FileCheck -match-full-lines %s -check-prefixes=CHECK_SRF_M32,CHECK_ARLS_M32
2506 // RUN: %clang -march=pantherlake -m32 -E -dM %s -o - 2>&1 \
2507 // RUN: -target i386-unknown-linux \
2508 // RUN: | FileCheck -match-full-lines %s -check-prefixes=CHECK_SRF_M32,CHECK_ARLS_M32,CHECK_PTL_M32
2509 // RUN: %clang -march=clearwaterforest -m32 -E -dM %s -o - 2>&1 \
2510 // RUN: -target i386-unknown-linux \
2511 // RUN: | FileCheck -match-full-lines %s -check-prefixes=CHECK_SRF_M32,CHECK_ARLS_M32,CHECK_PTL_M32,CHECK_CWF_M32
2512 // CHECK_SRF_M32: #define __ADX__ 1
2513 // CHECK_SRF_M32: #define __AES__ 1
2514 // CHECK_SRF_M32: #define __AVX2__ 1
2515 // CHECK_SRF_M32-NOT: AVX512
2516 // CHECK_SRF_M32: #define __AVXIFMA__ 1
2517 // CHECK_SRF_M32: #define __AVXNECONVERT__ 1
2518 // CHECK_SRF_M32-NOT: #define __AVXVNNIINT16__ 1
2519 // CHECK_ARLS_M32: #define __AVXVNNIINT16__ 1
2520 // CHECK_SRF_M32: #define __AVXVNNIINT8__ 1
2521 // CHECK_SRF_M32: #define __AVXVNNI__ 1
2522 // CHECK_SRF_M32: #define __AVX__ 1
2523 // CHECK_SRF_M32: #define __BMI2__ 1
2524 // CHECK_SRF_M32: #define __BMI__ 1
2525 // CHECK_SRF_M32: #define __CLDEMOTE__ 1
2526 // CHECK_SRF_M32: #define __CLFLUSHOPT__ 1
2527 // CHECK_SRF_M32: #define __CLWB__ 1
2528 // CHECK_SRF_M32: #define __CMPCCXADD__ 1
2529 // CHECK_SRF_M32: #define __ENQCMD__ 1
2530 // CHECK_SRF_M32: #define __F16C__ 1
2531 // CHECK_SRF_M32: #define __FMA__ 1
2532 // CHECK_SRF_M32: #define __FSGSBASE__ 1
2533 // CHECK_SRF_M32: #define __FXSR__ 1
2534 // CHECK_SRF_M32: #define __GFNI__ 1
2535 // CHECK_SRF_M32: #define __HRESET__ 1
2536 // CHECK_SRF_M32: #define __INVPCID__ 1
2537 // CHECK_SRF_M32: #define __KL__ 1
2538 // CHECK_SRF_M32: #define __LZCNT__ 1
2539 // CHECK_SRF_M32: #define __MMX__ 1
2540 // CHECK_SRF_M32: #define __MOVBE__ 1
2541 // CHECK_SRF_M32: #define __MOVDIR64B__ 1
2542 // CHECK_SRF_M32: #define __MOVDIRI__ 1
2543 // CHECK_SRF_M32: #define __PCLMUL__ 1
2544 // CHECK_SRF_M32: #define __PCONFIG__ 1
2545 // CHECK_SRF_M32: #define __PKU__ 1
2546 // CHECK_SRF_M32: #define __POPCNT__ 1
2547 // CHECK_SRF_M32-NOT: #define __PREFETCHI__ 1
2548 // CHECK_ARLS_M32-NOT: #define __PREFETCHI__ 1
2549 // CHECK_PTL_M32: #define __PREFETCHI__ 1
2550 // CHECK_SRF_M32: #define __PRFCHW__ 1
2551 // CHECK_SRF_M32: #define __PTWRITE__ 1
2552 // CHECK_SRF_M32-NOT: #define __RAOINT__ 1
2553 // CHECK_GRR_M32: #define __RAOINT__ 1
2554 // CHECK_SRF_M32: #define __RDPID__ 1
2555 // CHECK_SRF_M32: #define __RDRND__ 1
2556 // CHECK_SRF_M32: #define __RDSEED__ 1
2557 // CHECK_SRF_M32: #define __SERIALIZE__ 1
2558 // CHECK_SRF_M32: #define __SGX__ 1
2559 // CHECK_SRF_M32-NOT: #define __SHA512__ 1
2560 // CHECK_ARLS_M32: #define __SHA512__ 1
2561 // CHECK_SRF_M32: #define __SHA__ 1
2562 // CHECK_SRF_M32: #define __SHSTK__ 1
2563 // CHECK_SRF_M32-NOT: #define __SM3__ 1
2564 // CHECK_ARLS_M32: #define __SM3__ 1
2565 // CHECK_SRF_M32-NOT: #define __SM4__ 1
2566 // CHECK_ARLS_M32: #define __SM4__ 1
2567 // CHECK_SRF_M32: #define __SSE2__ 1
2568 // CHECK_SRF_M32: #define __SSE3__ 1
2569 // CHECK_SRF_M32: #define __SSE4_1__ 1
2570 // CHECK_SRF_M32: #define __SSE4_2__ 1
2571 // CHECK_SRF_M32: #define __SSE_MATH__ 1
2572 // CHECK_SRF_M32: #define __SSE__ 1
2573 // CHECK_SRF_M32: #define __SSSE3__ 1
2574 // CHECK_SRF_M32: #define __UINTR__ 1
2575 // CHECK_SRF_M32-NOT: #define __USERMSR__ 1
2576 // CHECK_ARLS_M32-NOT: #define __USERMSR__ 1
2577 // CHECK_PTL_M32-NOT: #define __USERMSR__ 1
2578 // CHECK_CWF_M32: #define __USERMSR__ 1
2579 // CHECK_SRF_M32: #define __VAES__ 1
2580 // CHECK_SRF_M32: #define __VPCLMULQDQ__ 1
2581 // CHECK_SRF_M32: #define __WAITPKG__ 1
2582 // CHECK_SRF_M32: #define __WIDEKL__ 1
2583 // CHECK_SRF_M32: #define __XSAVEC__ 1
2584 // CHECK_SRF_M32: #define __XSAVEOPT__ 1
2585 // CHECK_SRF_M32: #define __XSAVES__ 1
2586 // CHECK_SRF_M32: #define __XSAVE__ 1
2587 // CHECK_SRF_M32: #define __corei7 1
2588 // CHECK_SRF_M32: #define __corei7__ 1
2589 // CHECK_SRF_M32: #define __i386 1
2590 // CHECK_SRF_M32: #define __i386__ 1
2591 // CHECK_SRF_M32: #define __tune_corei7__ 1
2592 // CHECK_SRF_M32: #define i386 1
2594 // RUN: %clang -march=sierraforest -m64 -E -dM %s -o - 2>&1 \
2595 // RUN: --target=i386 \
2596 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_SRF_M64
2597 // RUN: %clang -march=grandridge -m64 -E -dM %s -o - 2>&1 \
2598 // RUN: --target=i386 \
2599 // RUN: | FileCheck -match-full-lines %s -check-prefixes=CHECK_SRF_M64,CHECK_GRR_M64
2600 // RUN: %clang -march=arrowlake -m64 -E -dM %s -o - 2>&1 \
2601 // RUN: -target i386-unknown-linux \
2602 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_SRF_M64
2603 // RUN: %clang -march=arrowlake-s -m64 -E -dM %s -o - 2>&1 \
2604 // RUN: -target i386-unknown-linux \
2605 // RUN: | FileCheck -match-full-lines %s -check-prefixes=CHECK_SRF_M64,CHECK_ARLS_M64
2606 // RUN: %clang -march=lunarlake -m64 -E -dM %s -o - 2>&1 \
2607 // RUN: -target i386-unknown-linux \
2608 // RUN: | FileCheck -match-full-lines %s -check-prefixes=CHECK_SRF_M64,CHECK_ARLS_M64
2609 // RUN: %clang -march=pantherlake -m64 -E -dM %s -o - 2>&1 \
2610 // RUN: -target i386-unknown-linux \
2611 // RUN: | FileCheck -match-full-lines %s -check-prefixes=CHECK_SRF_M64,CHECK_ARLS_M64,CHECK_PTL_M64
2612 // RUN: %clang -march=clearwaterforest -m64 -E -dM %s -o - 2>&1 \
2613 // RUN: -target i386-unknown-linux \
2614 // RUN: | FileCheck -match-full-lines %s -check-prefixes=CHECK_SRF_M64,CHECK_ARLS_M64,CHECK_PTL_M64,CHECK_CWF_M64
2615 // CHECK_SRF_M64: #define __ADX__ 1
2616 // CHECK_SRF_M64: #define __AES__ 1
2617 // CHECK_SRF_M64: #define __AVX2__ 1
2618 // CHECK_SRF_M64-NOT: AVX512
2619 // CHECK_SRF_M64: #define __AVXIFMA__ 1
2620 // CHECK_SRF_M64: #define __AVXNECONVERT__ 1
2621 // CHECK_SRF_M64-NOT: #define __AVXVNNIINT16__ 1
2622 // CHECK_ARLS_M64: #define __AVXVNNIINT16__ 1
2623 // CHECK_SRF_M64: #define __AVXVNNIINT8__ 1
2624 // CHECK_SRF_M64: #define __AVXVNNI__ 1
2625 // CHECK_SRF_M64: #define __AVX__ 1
2626 // CHECK_SRF_M64: #define __BMI2__ 1
2627 // CHECK_SRF_M64: #define __BMI__ 1
2628 // CHECK_SRF_M64: #define __CLDEMOTE__ 1
2629 // CHECK_SRF_M64: #define __CLFLUSHOPT__ 1
2630 // CHECK_SRF_M64: #define __CLWB__ 1
2631 // CHECK_SRF_M64: #define __CMPCCXADD__ 1
2632 // CHECK_SRF_M64: #define __ENQCMD__ 1
2633 // CHECK_SRF_M64: #define __F16C__ 1
2634 // CHECK_SRF_M64: #define __FMA__ 1
2635 // CHECK_SRF_M64: #define __FSGSBASE__ 1
2636 // CHECK_SRF_M64: #define __FXSR__ 1
2637 // CHECK_SRF_M64: #define __GFNI__ 1
2638 // CHECK_SRF_M64: #define __HRESET__ 1
2639 // CHECK_SRF_M64: #define __INVPCID__ 1
2640 // CHECK_SRF_M64: #define __KL__ 1
2641 // CHECK_SRF_M64: #define __LZCNT__ 1
2642 // CHECK_SRF_M64: #define __MMX__ 1
2643 // CHECK_SRF_M64: #define __MOVBE__ 1
2644 // CHECK_SRF_M64: #define __MOVDIR64B__ 1
2645 // CHECK_SRF_M64: #define __MOVDIRI__ 1
2646 // CHECK_SRF_M64: #define __PCLMUL__ 1
2647 // CHECK_SRF_M64: #define __PCONFIG__ 1
2648 // CHECK_SRF_M64: #define __PKU__ 1
2649 // CHECK_SRF_M64: #define __POPCNT__ 1
2650 // CHECK_SRF_M64-NOT: #define __PREFETCHI__ 1
2651 // CHECK_ARLS_M64-NOT: #define __PREFETCHI__ 1
2652 // CHECK_PTL_M64: #define __PREFETCHI__ 1
2653 // CHECK_SRF_M64: #define __PRFCHW__ 1
2654 // CHECK_SRF_M64: #define __PTWRITE__ 1
2655 // CHECK_SRF_M64-NOT: #define __RAOINT__ 1
2656 // CHECK_GRR_M64: #define __RAOINT__ 1
2657 // CHECK_SRF_M64: #define __RDPID__ 1
2658 // CHECK_SRF_M64: #define __RDRND__ 1
2659 // CHECK_SRF_M64: #define __RDSEED__ 1
2660 // CHECK_SRF_M64: #define __SERIALIZE__ 1
2661 // CHECK_SRF_M64: #define __SGX__ 1
2662 // CHECK_SRF_M64-NOT: #define __SHA512__ 1
2663 // CHECK_ARLS_M64: #define __SHA512__ 1
2664 // CHECK_SRF_M64: #define __SHA__ 1
2665 // CHECK_SRF_M64: #define __SHSTK__ 1
2666 // CHECK_SRF_M64-NOT: #define __SM3__ 1
2667 // CHECK_ARLS_M64: #define __SM3__ 1
2668 // CHECK_SRF_M64-NOT: #define __SM4__ 1
2669 // CHECK_ARLS_M64: #define __SM4__ 1
2670 // CHECK_SRF_M64: #define __SSE2_MATH__ 1
2671 // CHECK_SRF_M64: #define __SSE2__ 1
2672 // CHECK_SRF_M64: #define __SSE3__ 1
2673 // CHECK_SRF_M64: #define __SSE4_1__ 1
2674 // CHECK_SRF_M64: #define __SSE4_2__ 1
2675 // CHECK_SRF_M64: #define __SSE_MATH__ 1
2676 // CHECK_SRF_M64: #define __SSE__ 1
2677 // CHECK_SRF_M64: #define __SSSE3__ 1
2678 // CHECK_SRF_M64: #define __UINTR__ 1
2679 // CHECK_SRF_M64-NOT: #define __USERMSR__ 1
2680 // CHECK_ARLS_M64-NOT: #define __USERMSR__ 1
2681 // CHECK_PTL_M64-NOT: #define __USERMSR__ 1
2682 // CHECK_CWF_M64: #define __USERMSR__ 1
2683 // CHECK_SRF_M64: #define __VAES__ 1
2684 // CHECK_SRF_M64: #define __VPCLMULQDQ__ 1
2685 // CHECK_SRF_M64: #define __WAITPKG__ 1
2686 // CHECK_SRF_M64: #define __WIDEKL__ 1
2687 // CHECK_SRF_M64: #define __XSAVEC__ 1
2688 // CHECK_SRF_M64: #define __XSAVEOPT__ 1
2689 // CHECK_SRF_M64: #define __XSAVES__ 1
2690 // CHECK_SRF_M64: #define __XSAVE__ 1
2691 // CHECK_SRF_M64: #define __amd64 1
2692 // CHECK_SRF_M64: #define __amd64__ 1
2693 // CHECK_SRF_M64: #define __corei7 1
2694 // CHECK_SRF_M64: #define __corei7__ 1
2695 // CHECK_SRF_M64: #define __tune_corei7__ 1
2696 // CHECK_SRF_M64: #define __x86_64 1
2697 // CHECK_SRF_M64: #define __x86_64__ 1
2699 // RUN: %clang -march=geode -m32 -E -dM %s -o - 2>&1 \
2700 // RUN: -target i386-unknown-linux \
2701 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_GEODE_M32
2702 // CHECK_GEODE_M32: #define __3dNOW_A__ 1
2703 // CHECK_GEODE_M32: #define __3dNOW__ 1
2704 // CHECK_GEODE_M32: #define __MMX__ 1
2705 // CHECK_GEODE_M32: #define __geode 1
2706 // CHECK_GEODE_M32: #define __geode__ 1
2707 // CHECK_GEODE_M32: #define __i386 1
2708 // CHECK_GEODE_M32: #define __i386__ 1
2709 // CHECK_GEODE_M32: #define __tune_geode__ 1
2710 // CHECK_GEODE_M32: #define i386 1
2711 // RUN: not %clang -march=geode -m64 -E -dM %s -o - 2>&1 \
2712 // RUN: -target i386-unknown-linux \
2713 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_GEODE_M64
2714 // CHECK_GEODE_M64: error: {{.*}}
2716 // RUN: %clang -march=k6 -m32 -E -dM %s -o - 2>&1 \
2717 // RUN: -target i386-unknown-linux \
2718 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_K6_M32
2719 // CHECK_K6_M32: #define __MMX__ 1
2720 // CHECK_K6_M32: #define __i386 1
2721 // CHECK_K6_M32: #define __i386__ 1
2722 // CHECK_K6_M32: #define __k6 1
2723 // CHECK_K6_M32: #define __k6__ 1
2724 // CHECK_K6_M32: #define __tune_k6__ 1
2725 // CHECK_K6_M32: #define i386 1
2726 // RUN: not %clang -march=k6 -m64 -E -dM %s -o - 2>&1 \
2727 // RUN: -target i386-unknown-linux \
2728 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_K6_M64
2729 // CHECK_K6_M64: error: {{.*}}
2731 // RUN: %clang -march=k6-2 -m32 -E -dM %s -o - 2>&1 \
2732 // RUN: -target i386-unknown-linux \
2733 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_K6_2_M32
2734 // CHECK_K6_2_M32: #define __3dNOW__ 1
2735 // CHECK_K6_2_M32: #define __MMX__ 1
2736 // CHECK_K6_2_M32: #define __i386 1
2737 // CHECK_K6_2_M32: #define __i386__ 1
2738 // CHECK_K6_2_M32: #define __k6 1
2739 // CHECK_K6_2_M32: #define __k6_2__ 1
2740 // CHECK_K6_2_M32: #define __k6__ 1
2741 // CHECK_K6_2_M32: #define __tune_k6_2__ 1
2742 // CHECK_K6_2_M32: #define __tune_k6__ 1
2743 // CHECK_K6_2_M32: #define i386 1
2744 // RUN: not %clang -march=k6-2 -m64 -E -dM %s -o - 2>&1 \
2745 // RUN: -target i386-unknown-linux \
2746 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_K6_2_M64
2747 // CHECK_K6_2_M64: error: {{.*}}
2749 // RUN: %clang -march=k6-3 -m32 -E -dM %s -o - 2>&1 \
2750 // RUN: -target i386-unknown-linux \
2751 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_K6_3_M32
2752 // CHECK_K6_3_M32: #define __3dNOW__ 1
2753 // CHECK_K6_3_M32: #define __MMX__ 1
2754 // CHECK_K6_3_M32: #define __i386 1
2755 // CHECK_K6_3_M32: #define __i386__ 1
2756 // CHECK_K6_3_M32: #define __k6 1
2757 // CHECK_K6_3_M32: #define __k6_3__ 1
2758 // CHECK_K6_3_M32: #define __k6__ 1
2759 // CHECK_K6_3_M32: #define __tune_k6_3__ 1
2760 // CHECK_K6_3_M32: #define __tune_k6__ 1
2761 // CHECK_K6_3_M32: #define i386 1
2762 // RUN: not %clang -march=k6-3 -m64 -E -dM %s -o - 2>&1 \
2763 // RUN: -target i386-unknown-linux \
2764 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_K6_3_M64
2765 // CHECK_K6_3_M64: error: {{.*}}
2767 // RUN: %clang -march=athlon -m32 -E -dM %s -o - 2>&1 \
2768 // RUN: -target i386-unknown-linux \
2769 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_ATHLON_M32
2770 // CHECK_ATHLON_M32: #define __3dNOW_A__ 1
2771 // CHECK_ATHLON_M32: #define __3dNOW__ 1
2772 // CHECK_ATHLON_M32: #define __MMX__ 1
2773 // CHECK_ATHLON_M32: #define __athlon 1
2774 // CHECK_ATHLON_M32: #define __athlon__ 1
2775 // CHECK_ATHLON_M32: #define __i386 1
2776 // CHECK_ATHLON_M32: #define __i386__ 1
2777 // CHECK_ATHLON_M32: #define __tune_athlon__ 1
2778 // CHECK_ATHLON_M32: #define i386 1
2779 // RUN: not %clang -march=athlon -m64 -E -dM %s -o - 2>&1 \
2780 // RUN: -target i386-unknown-linux \
2781 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_ATHLON_M64
2782 // CHECK_ATHLON_M64: error: {{.*}}
2784 // RUN: %clang -march=athlon-tbird -m32 -E -dM %s -o - 2>&1 \
2785 // RUN: -target i386-unknown-linux \
2786 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_ATHLON_TBIRD_M32
2787 // CHECK_ATHLON_TBIRD_M32: #define __3dNOW_A__ 1
2788 // CHECK_ATHLON_TBIRD_M32: #define __3dNOW__ 1
2789 // CHECK_ATHLON_TBIRD_M32: #define __MMX__ 1
2790 // CHECK_ATHLON_TBIRD_M32: #define __athlon 1
2791 // CHECK_ATHLON_TBIRD_M32: #define __athlon__ 1
2792 // CHECK_ATHLON_TBIRD_M32: #define __i386 1
2793 // CHECK_ATHLON_TBIRD_M32: #define __i386__ 1
2794 // CHECK_ATHLON_TBIRD_M32: #define __tune_athlon__ 1
2795 // CHECK_ATHLON_TBIRD_M32: #define i386 1
2796 // RUN: not %clang -march=athlon-tbird -m64 -E -dM %s -o - 2>&1 \
2797 // RUN: -target i386-unknown-linux \
2798 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_ATHLON_TBIRD_M64
2799 // CHECK_ATHLON_TBIRD_M64: error: {{.*}}
2801 // RUN: %clang -march=athlon-4 -m32 -E -dM %s -o - 2>&1 \
2802 // RUN: -target i386-unknown-linux \
2803 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_ATHLON_4_M32
2804 // CHECK_ATHLON_4_M32: #define __3dNOW_A__ 1
2805 // CHECK_ATHLON_4_M32: #define __3dNOW__ 1
2806 // CHECK_ATHLON_4_M32: #define __MMX__ 1
2807 // CHECK_ATHLON_4_M32: #define __SSE__ 1
2808 // CHECK_ATHLON_4_M32: #define __athlon 1
2809 // CHECK_ATHLON_4_M32: #define __athlon__ 1
2810 // CHECK_ATHLON_4_M32: #define __athlon_sse__ 1
2811 // CHECK_ATHLON_4_M32: #define __i386 1
2812 // CHECK_ATHLON_4_M32: #define __i386__ 1
2813 // CHECK_ATHLON_4_M32: #define __tune_athlon__ 1
2814 // CHECK_ATHLON_4_M32: #define __tune_athlon_sse__ 1
2815 // CHECK_ATHLON_4_M32: #define i386 1
2816 // RUN: not %clang -march=athlon-4 -m64 -E -dM %s -o - 2>&1 \
2817 // RUN: -target i386-unknown-linux \
2818 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_ATHLON_4_M64
2819 // CHECK_ATHLON_4_M64: error: {{.*}}
2821 // RUN: %clang -march=athlon-xp -m32 -E -dM %s -o - 2>&1 \
2822 // RUN: -target i386-unknown-linux \
2823 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_ATHLON_XP_M32
2824 // CHECK_ATHLON_XP_M32: #define __3dNOW_A__ 1
2825 // CHECK_ATHLON_XP_M32: #define __3dNOW__ 1
2826 // CHECK_ATHLON_XP_M32: #define __MMX__ 1
2827 // CHECK_ATHLON_XP_M32: #define __SSE__ 1
2828 // CHECK_ATHLON_XP_M32: #define __athlon 1
2829 // CHECK_ATHLON_XP_M32: #define __athlon__ 1
2830 // CHECK_ATHLON_XP_M32: #define __athlon_sse__ 1
2831 // CHECK_ATHLON_XP_M32: #define __i386 1
2832 // CHECK_ATHLON_XP_M32: #define __i386__ 1
2833 // CHECK_ATHLON_XP_M32: #define __tune_athlon__ 1
2834 // CHECK_ATHLON_XP_M32: #define __tune_athlon_sse__ 1
2835 // CHECK_ATHLON_XP_M32: #define i386 1
2836 // RUN: not %clang -march=athlon-xp -m64 -E -dM %s -o - 2>&1 \
2837 // RUN: -target i386-unknown-linux \
2838 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_ATHLON_XP_M64
2839 // CHECK_ATHLON_XP_M64: error: {{.*}}
2841 // RUN: %clang -march=athlon-mp -m32 -E -dM %s -o - 2>&1 \
2842 // RUN: -target i386-unknown-linux \
2843 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_ATHLON_MP_M32
2844 // CHECK_ATHLON_MP_M32: #define __3dNOW_A__ 1
2845 // CHECK_ATHLON_MP_M32: #define __3dNOW__ 1
2846 // CHECK_ATHLON_MP_M32: #define __MMX__ 1
2847 // CHECK_ATHLON_MP_M32: #define __SSE__ 1
2848 // CHECK_ATHLON_MP_M32: #define __athlon 1
2849 // CHECK_ATHLON_MP_M32: #define __athlon__ 1
2850 // CHECK_ATHLON_MP_M32: #define __athlon_sse__ 1
2851 // CHECK_ATHLON_MP_M32: #define __i386 1
2852 // CHECK_ATHLON_MP_M32: #define __i386__ 1
2853 // CHECK_ATHLON_MP_M32: #define __tune_athlon__ 1
2854 // CHECK_ATHLON_MP_M32: #define __tune_athlon_sse__ 1
2855 // CHECK_ATHLON_MP_M32: #define i386 1
2856 // RUN: not %clang -march=athlon-mp -m64 -E -dM %s -o - 2>&1 \
2857 // RUN: -target i386-unknown-linux \
2858 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_ATHLON_MP_M64
2859 // CHECK_ATHLON_MP_M64: error: {{.*}}
2861 // RUN: %clang -march=x86-64 -m32 -E -dM %s -o - 2>&1 \
2862 // RUN: -target i386-unknown-linux \
2863 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_X86_64_M32
2864 // CHECK_X86_64_M32: #define __MMX__ 1
2865 // CHECK_X86_64_M32: #define __SSE2__ 1
2866 // CHECK_X86_64_M32: #define __SSE__ 1
2867 // CHECK_X86_64_M32: #define __i386 1
2868 // CHECK_X86_64_M32: #define __i386__ 1
2869 // CHECK_X86_64_M32: #define __k8 1
2870 // CHECK_X86_64_M32: #define __k8__ 1
2871 // CHECK_X86_64_M32: #define i386 1
2873 // RUN: %clang -march=k8 -m32 -E -dM %s -o - 2>&1 \
2874 // RUN: -target i386-unknown-linux \
2875 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_K8_M32
2876 // CHECK_K8_M32: #define __3dNOW_A__ 1
2877 // CHECK_K8_M32: #define __3dNOW__ 1
2878 // CHECK_K8_M32: #define __MMX__ 1
2879 // CHECK_K8_M32: #define __SSE2__ 1
2880 // CHECK_K8_M32: #define __SSE__ 1
2881 // CHECK_K8_M32: #define __i386 1
2882 // CHECK_K8_M32: #define __i386__ 1
2883 // CHECK_K8_M32: #define __k8 1
2884 // CHECK_K8_M32: #define __k8__ 1
2885 // CHECK_K8_M32: #define __tune_k8__ 1
2886 // CHECK_K8_M32: #define i386 1
2888 // RUN: %clang -march=k8 -m64 -E -dM %s -o - 2>&1 \
2889 // RUN: -target i386-unknown-linux \
2890 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_K8_M64
2891 // CHECK_K8_M64: #define __3dNOW_A__ 1
2892 // CHECK_K8_M64: #define __3dNOW__ 1
2893 // CHECK_K8_M64: #define __MMX__ 1
2894 // CHECK_K8_M64: #define __SSE2_MATH__ 1
2895 // CHECK_K8_M64: #define __SSE2__ 1
2896 // CHECK_K8_M64: #define __SSE_MATH__ 1
2897 // CHECK_K8_M64: #define __SSE__ 1
2898 // CHECK_K8_M64: #define __amd64 1
2899 // CHECK_K8_M64: #define __amd64__ 1
2900 // CHECK_K8_M64: #define __k8 1
2901 // CHECK_K8_M64: #define __k8__ 1
2902 // CHECK_K8_M64: #define __tune_k8__ 1
2903 // CHECK_K8_M64: #define __x86_64 1
2904 // CHECK_K8_M64: #define __x86_64__ 1
2906 // RUN: %clang -march=k8-sse3 -m32 -E -dM %s -o - 2>&1 \
2907 // RUN: -target i386-unknown-linux \
2908 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_K8_SSE3_M32
2909 // CHECK_K8_SSE3_M32: #define __3dNOW_A__ 1
2910 // CHECK_K8_SSE3_M32: #define __3dNOW__ 1
2911 // CHECK_K8_SSE3_M32: #define __MMX__ 1
2912 // CHECK_K8_SSE3_M32: #define __SSE2__ 1
2913 // CHECK_K8_SSE3_M32: #define __SSE3__ 1
2914 // CHECK_K8_SSE3_M32: #define __SSE__ 1
2915 // CHECK_K8_SSE3_M32: #define __i386 1
2916 // CHECK_K8_SSE3_M32: #define __i386__ 1
2917 // CHECK_K8_SSE3_M32: #define __k8 1
2918 // CHECK_K8_SSE3_M32: #define __k8__ 1
2919 // CHECK_K8_SSE3_M32: #define __tune_k8__ 1
2920 // CHECK_K8_SSE3_M32: #define i386 1
2922 // RUN: %clang -march=k8-sse3 -m64 -E -dM %s -o - 2>&1 \
2923 // RUN: -target i386-unknown-linux \
2924 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_K8_SSE3_M64
2925 // CHECK_K8_SSE3_M64: #define __3dNOW_A__ 1
2926 // CHECK_K8_SSE3_M64: #define __3dNOW__ 1
2927 // CHECK_K8_SSE3_M64: #define __MMX__ 1
2928 // CHECK_K8_SSE3_M64: #define __SSE2_MATH__ 1
2929 // CHECK_K8_SSE3_M64: #define __SSE2__ 1
2930 // CHECK_K8_SSE3_M64: #define __SSE3__ 1
2931 // CHECK_K8_SSE3_M64: #define __SSE_MATH__ 1
2932 // CHECK_K8_SSE3_M64: #define __SSE__ 1
2933 // CHECK_K8_SSE3_M64: #define __amd64 1
2934 // CHECK_K8_SSE3_M64: #define __amd64__ 1
2935 // CHECK_K8_SSE3_M64: #define __k8 1
2936 // CHECK_K8_SSE3_M64: #define __k8__ 1
2937 // CHECK_K8_SSE3_M64: #define __tune_k8__ 1
2938 // CHECK_K8_SSE3_M64: #define __x86_64 1
2939 // CHECK_K8_SSE3_M64: #define __x86_64__ 1
2941 // RUN: %clang -march=opteron -m32 -E -dM %s -o - 2>&1 \
2942 // RUN: -target i386-unknown-linux \
2943 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_OPTERON_M32
2944 // CHECK_OPTERON_M32: #define __3dNOW_A__ 1
2945 // CHECK_OPTERON_M32: #define __3dNOW__ 1
2946 // CHECK_OPTERON_M32: #define __MMX__ 1
2947 // CHECK_OPTERON_M32: #define __SSE2__ 1
2948 // CHECK_OPTERON_M32: #define __SSE__ 1
2949 // CHECK_OPTERON_M32: #define __i386 1
2950 // CHECK_OPTERON_M32: #define __i386__ 1
2951 // CHECK_OPTERON_M32: #define __k8 1
2952 // CHECK_OPTERON_M32: #define __k8__ 1
2953 // CHECK_OPTERON_M32: #define __tune_k8__ 1
2954 // CHECK_OPTERON_M32: #define i386 1
2956 // RUN: %clang -march=opteron -m64 -E -dM %s -o - 2>&1 \
2957 // RUN: -target i386-unknown-linux \
2958 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_OPTERON_M64
2959 // CHECK_OPTERON_M64: #define __3dNOW_A__ 1
2960 // CHECK_OPTERON_M64: #define __3dNOW__ 1
2961 // CHECK_OPTERON_M64: #define __MMX__ 1
2962 // CHECK_OPTERON_M64: #define __SSE2_MATH__ 1
2963 // CHECK_OPTERON_M64: #define __SSE2__ 1
2964 // CHECK_OPTERON_M64: #define __SSE_MATH__ 1
2965 // CHECK_OPTERON_M64: #define __SSE__ 1
2966 // CHECK_OPTERON_M64: #define __amd64 1
2967 // CHECK_OPTERON_M64: #define __amd64__ 1
2968 // CHECK_OPTERON_M64: #define __k8 1
2969 // CHECK_OPTERON_M64: #define __k8__ 1
2970 // CHECK_OPTERON_M64: #define __tune_k8__ 1
2971 // CHECK_OPTERON_M64: #define __x86_64 1
2972 // CHECK_OPTERON_M64: #define __x86_64__ 1
2974 // RUN: %clang -march=opteron-sse3 -m32 -E -dM %s -o - 2>&1 \
2975 // RUN: -target i386-unknown-linux \
2976 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_OPTERON_SSE3_M32
2977 // CHECK_OPTERON_SSE3_M32: #define __3dNOW_A__ 1
2978 // CHECK_OPTERON_SSE3_M32: #define __3dNOW__ 1
2979 // CHECK_OPTERON_SSE3_M32: #define __MMX__ 1
2980 // CHECK_OPTERON_SSE3_M32: #define __SSE2__ 1
2981 // CHECK_OPTERON_SSE3_M32: #define __SSE3__ 1
2982 // CHECK_OPTERON_SSE3_M32: #define __SSE__ 1
2983 // CHECK_OPTERON_SSE3_M32: #define __i386 1
2984 // CHECK_OPTERON_SSE3_M32: #define __i386__ 1
2985 // CHECK_OPTERON_SSE3_M32: #define __k8 1
2986 // CHECK_OPTERON_SSE3_M32: #define __k8__ 1
2987 // CHECK_OPTERON_SSE3_M32: #define __tune_k8__ 1
2988 // CHECK_OPTERON_SSE3_M32: #define i386 1
2990 // RUN: %clang -march=opteron-sse3 -m64 -E -dM %s -o - 2>&1 \
2991 // RUN: -target i386-unknown-linux \
2992 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_OPTERON_SSE3_M64
2993 // CHECK_OPTERON_SSE3_M64: #define __3dNOW_A__ 1
2994 // CHECK_OPTERON_SSE3_M64: #define __3dNOW__ 1
2995 // CHECK_OPTERON_SSE3_M64: #define __MMX__ 1
2996 // CHECK_OPTERON_SSE3_M64: #define __SSE2_MATH__ 1
2997 // CHECK_OPTERON_SSE3_M64: #define __SSE2__ 1
2998 // CHECK_OPTERON_SSE3_M64: #define __SSE3__ 1
2999 // CHECK_OPTERON_SSE3_M64: #define __SSE_MATH__ 1
3000 // CHECK_OPTERON_SSE3_M64: #define __SSE__ 1
3001 // CHECK_OPTERON_SSE3_M64: #define __amd64 1
3002 // CHECK_OPTERON_SSE3_M64: #define __amd64__ 1
3003 // CHECK_OPTERON_SSE3_M64: #define __k8 1
3004 // CHECK_OPTERON_SSE3_M64: #define __k8__ 1
3005 // CHECK_OPTERON_SSE3_M64: #define __tune_k8__ 1
3006 // CHECK_OPTERON_SSE3_M64: #define __x86_64 1
3007 // CHECK_OPTERON_SSE3_M64: #define __x86_64__ 1
3009 // RUN: %clang -march=athlon64 -m32 -E -dM %s -o - 2>&1 \
3010 // RUN: -target i386-unknown-linux \
3011 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_ATHLON64_M32
3012 // CHECK_ATHLON64_M32: #define __3dNOW_A__ 1
3013 // CHECK_ATHLON64_M32: #define __3dNOW__ 1
3014 // CHECK_ATHLON64_M32: #define __MMX__ 1
3015 // CHECK_ATHLON64_M32: #define __SSE2__ 1
3016 // CHECK_ATHLON64_M32: #define __SSE__ 1
3017 // CHECK_ATHLON64_M32: #define __i386 1
3018 // CHECK_ATHLON64_M32: #define __i386__ 1
3019 // CHECK_ATHLON64_M32: #define __k8 1
3020 // CHECK_ATHLON64_M32: #define __k8__ 1
3021 // CHECK_ATHLON64_M32: #define __tune_k8__ 1
3022 // CHECK_ATHLON64_M32: #define i386 1
3024 // RUN: %clang -march=athlon64 -m64 -E -dM %s -o - 2>&1 \
3025 // RUN: -target i386-unknown-linux \
3026 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_ATHLON64_M64
3027 // CHECK_ATHLON64_M64: #define __3dNOW_A__ 1
3028 // CHECK_ATHLON64_M64: #define __3dNOW__ 1
3029 // CHECK_ATHLON64_M64: #define __MMX__ 1
3030 // CHECK_ATHLON64_M64: #define __SSE2_MATH__ 1
3031 // CHECK_ATHLON64_M64: #define __SSE2__ 1
3032 // CHECK_ATHLON64_M64: #define __SSE_MATH__ 1
3033 // CHECK_ATHLON64_M64: #define __SSE__ 1
3034 // CHECK_ATHLON64_M64: #define __amd64 1
3035 // CHECK_ATHLON64_M64: #define __amd64__ 1
3036 // CHECK_ATHLON64_M64: #define __k8 1
3037 // CHECK_ATHLON64_M64: #define __k8__ 1
3038 // CHECK_ATHLON64_M64: #define __tune_k8__ 1
3039 // CHECK_ATHLON64_M64: #define __x86_64 1
3040 // CHECK_ATHLON64_M64: #define __x86_64__ 1
3042 // RUN: %clang -march=athlon64-sse3 -m32 -E -dM %s -o - 2>&1 \
3043 // RUN: -target i386-unknown-linux \
3044 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_ATHLON64_SSE3_M32
3045 // CHECK_ATHLON64_SSE3_M32: #define __3dNOW_A__ 1
3046 // CHECK_ATHLON64_SSE3_M32: #define __3dNOW__ 1
3047 // CHECK_ATHLON64_SSE3_M32: #define __MMX__ 1
3048 // CHECK_ATHLON64_SSE3_M32: #define __SSE2__ 1
3049 // CHECK_ATHLON64_SSE3_M32: #define __SSE3__ 1
3050 // CHECK_ATHLON64_SSE3_M32: #define __SSE__ 1
3051 // CHECK_ATHLON64_SSE3_M32: #define __i386 1
3052 // CHECK_ATHLON64_SSE3_M32: #define __i386__ 1
3053 // CHECK_ATHLON64_SSE3_M32: #define __k8 1
3054 // CHECK_ATHLON64_SSE3_M32: #define __k8__ 1
3055 // CHECK_ATHLON64_SSE3_M32: #define __tune_k8__ 1
3056 // CHECK_ATHLON64_SSE3_M32: #define i386 1
3058 // RUN: %clang -march=athlon64-sse3 -m64 -E -dM %s -o - 2>&1 \
3059 // RUN: -target i386-unknown-linux \
3060 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_ATHLON64_SSE3_M64
3061 // CHECK_ATHLON64_SSE3_M64: #define __3dNOW_A__ 1
3062 // CHECK_ATHLON64_SSE3_M64: #define __3dNOW__ 1
3063 // CHECK_ATHLON64_SSE3_M64: #define __MMX__ 1
3064 // CHECK_ATHLON64_SSE3_M64: #define __SSE2_MATH__ 1
3065 // CHECK_ATHLON64_SSE3_M64: #define __SSE2__ 1
3066 // CHECK_ATHLON64_SSE3_M64: #define __SSE3__ 1
3067 // CHECK_ATHLON64_SSE3_M64: #define __SSE_MATH__ 1
3068 // CHECK_ATHLON64_SSE3_M64: #define __SSE__ 1
3069 // CHECK_ATHLON64_SSE3_M64: #define __amd64 1
3070 // CHECK_ATHLON64_SSE3_M64: #define __amd64__ 1
3071 // CHECK_ATHLON64_SSE3_M64: #define __k8 1
3072 // CHECK_ATHLON64_SSE3_M64: #define __k8__ 1
3073 // CHECK_ATHLON64_SSE3_M64: #define __tune_k8__ 1
3074 // CHECK_ATHLON64_SSE3_M64: #define __x86_64 1
3075 // CHECK_ATHLON64_SSE3_M64: #define __x86_64__ 1
3077 // RUN: %clang -march=athlon-fx -m32 -E -dM %s -o - 2>&1 \
3078 // RUN: -target i386-unknown-linux \
3079 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_ATHLON_FX_M32
3080 // CHECK_ATHLON_FX_M32: #define __3dNOW_A__ 1
3081 // CHECK_ATHLON_FX_M32: #define __3dNOW__ 1
3082 // CHECK_ATHLON_FX_M32: #define __MMX__ 1
3083 // CHECK_ATHLON_FX_M32: #define __SSE2__ 1
3084 // CHECK_ATHLON_FX_M32: #define __SSE__ 1
3085 // CHECK_ATHLON_FX_M32: #define __i386 1
3086 // CHECK_ATHLON_FX_M32: #define __i386__ 1
3087 // CHECK_ATHLON_FX_M32: #define __k8 1
3088 // CHECK_ATHLON_FX_M32: #define __k8__ 1
3089 // CHECK_ATHLON_FX_M32: #define __tune_k8__ 1
3090 // CHECK_ATHLON_FX_M32: #define i386 1
3092 // RUN: %clang -march=athlon-fx -m64 -E -dM %s -o - 2>&1 \
3093 // RUN: -target i386-unknown-linux \
3094 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_ATHLON_FX_M64
3095 // CHECK_ATHLON_FX_M64: #define __3dNOW_A__ 1
3096 // CHECK_ATHLON_FX_M64: #define __3dNOW__ 1
3097 // CHECK_ATHLON_FX_M64: #define __MMX__ 1
3098 // CHECK_ATHLON_FX_M64: #define __SSE2_MATH__ 1
3099 // CHECK_ATHLON_FX_M64: #define __SSE2__ 1
3100 // CHECK_ATHLON_FX_M64: #define __SSE_MATH__ 1
3101 // CHECK_ATHLON_FX_M64: #define __SSE__ 1
3102 // CHECK_ATHLON_FX_M64: #define __amd64 1
3103 // CHECK_ATHLON_FX_M64: #define __amd64__ 1
3104 // CHECK_ATHLON_FX_M64: #define __k8 1
3105 // CHECK_ATHLON_FX_M64: #define __k8__ 1
3106 // CHECK_ATHLON_FX_M64: #define __tune_k8__ 1
3107 // CHECK_ATHLON_FX_M64: #define __x86_64 1
3108 // CHECK_ATHLON_FX_M64: #define __x86_64__ 1
3110 // RUN: %clang -march=amdfam10 -m32 -E -dM %s -o - 2>&1 \
3111 // RUN: -target i386-unknown-linux \
3112 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_AMDFAM10_M32
3113 // CHECK_AMDFAM10_M32: #define __3dNOW_A__ 1
3114 // CHECK_AMDFAM10_M32: #define __3dNOW__ 1
3115 // CHECK_AMDFAM10_M32: #define __LAHF_SAHF__ 1
3116 // CHECK_AMDFAM10_M32: #define __LZCNT__ 1
3117 // CHECK_AMDFAM10_M32: #define __MMX__ 1
3118 // CHECK_AMDFAM10_M32: #define __POPCNT__ 1
3119 // CHECK_AMDFAM10_M32: #define __PRFCHW__ 1
3120 // CHECK_AMDFAM10_M32: #define __SSE2_MATH__ 1
3121 // CHECK_AMDFAM10_M32: #define __SSE2__ 1
3122 // CHECK_AMDFAM10_M32: #define __SSE3__ 1
3123 // CHECK_AMDFAM10_M32: #define __SSE4A__ 1
3124 // CHECK_AMDFAM10_M32: #define __SSE_MATH__ 1
3125 // CHECK_AMDFAM10_M32: #define __SSE__ 1
3126 // CHECK_AMDFAM10_M32-NOT: #define __SSSE3__ 1
3127 // CHECK_AMDFAM10_M32: #define __amdfam10 1
3128 // CHECK_AMDFAM10_M32: #define __amdfam10__ 1
3129 // CHECK_AMDFAM10_M32: #define __i386 1
3130 // CHECK_AMDFAM10_M32: #define __i386__ 1
3131 // CHECK_AMDFAM10_M32: #define __tune_amdfam10__ 1
3133 // RUN: %clang -march=amdfam10 -m64 -E -dM %s -o - 2>&1 \
3134 // RUN: -target i386-unknown-linux \
3135 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_AMDFAM10_M64
3136 // CHECK_AMDFAM10_M64: #define __3dNOW_A__ 1
3137 // CHECK_AMDFAM10_M64: #define __3dNOW__ 1
3138 // CHECK_AMDFAM10_M64: #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_16 1
3139 // CHECK_AMDFAM10_M64: #define __LAHF_SAHF__ 1
3140 // CHECK_AMDFAM10_M64: #define __LZCNT__ 1
3141 // CHECK_AMDFAM10_M64: #define __MMX__ 1
3142 // CHECK_AMDFAM10_M64: #define __POPCNT__ 1
3143 // CHECK_AMDFAM10_M64: #define __PRFCHW__ 1
3144 // CHECK_AMDFAM10_M64: #define __SSE2_MATH__ 1
3145 // CHECK_AMDFAM10_M64: #define __SSE2__ 1
3146 // CHECK_AMDFAM10_M64: #define __SSE3__ 1
3147 // CHECK_AMDFAM10_M64: #define __SSE4A__ 1
3148 // CHECK_AMDFAM10_M64: #define __SSE_MATH__ 1
3149 // CHECK_AMDFAM10_M64: #define __SSE__ 1
3150 // CHECK_AMDFAM10_M64-NOT: #define __SSSE3__ 1
3151 // CHECK_AMDFAM10_M64: #define __amd64 1
3152 // CHECK_AMDFAM10_M64: #define __amd64__ 1
3153 // CHECK_AMDFAM10_M64: #define __amdfam10 1
3154 // CHECK_AMDFAM10_M64: #define __amdfam10__ 1
3155 // CHECK_AMDFAM10_M64: #define __tune_amdfam10__ 1
3156 // CHECK_AMDFAM10_M64: #define __x86_64 1
3157 // CHECK_AMDFAM10_M64: #define __x86_64__ 1
3159 // RUN: %clang -march=btver1 -m32 -E -dM %s -o - 2>&1 \
3160 // RUN: -target i386-unknown-linux \
3161 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_BTVER1_M32
3162 // CHECK_BTVER1_M32-NOT: #define __3dNOW_A__ 1
3163 // CHECK_BTVER1_M32-NOT: #define __3dNOW__ 1
3164 // CHECK_BTVER1_M32: #define __LAHF_SAHF__ 1
3165 // CHECK_BTVER1_M32: #define __LZCNT__ 1
3166 // CHECK_BTVER1_M32: #define __MMX__ 1
3167 // CHECK_BTVER1_M32: #define __POPCNT__ 1
3168 // CHECK_BTVER1_M32: #define __PRFCHW__ 1
3169 // CHECK_BTVER1_M32: #define __SSE2_MATH__ 1
3170 // CHECK_BTVER1_M32: #define __SSE2__ 1
3171 // CHECK_BTVER1_M32: #define __SSE3__ 1
3172 // CHECK_BTVER1_M32: #define __SSE4A__ 1
3173 // CHECK_BTVER1_M32: #define __SSE_MATH__ 1
3174 // CHECK_BTVER1_M32: #define __SSE__ 1
3175 // CHECK_BTVER1_M32: #define __SSSE3__ 1
3176 // CHECK_BTVER1_M32: #define __btver1 1
3177 // CHECK_BTVER1_M32: #define __btver1__ 1
3178 // CHECK_BTVER1_M32: #define __i386 1
3179 // CHECK_BTVER1_M32: #define __i386__ 1
3180 // CHECK_BTVER1_M32: #define __tune_btver1__ 1
3182 // RUN: %clang -march=btver1 -m64 -E -dM %s -o - 2>&1 \
3183 // RUN: -target i386-unknown-linux \
3184 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_BTVER1_M64
3185 // CHECK_BTVER1_M64-NOT: #define __3dNOW_A__ 1
3186 // CHECK_BTVER1_M64-NOT: #define __3dNOW__ 1
3187 // CHECK_BTVER1_M64: #define __LAHF_SAHF__ 1
3188 // CHECK_BTVER1_M64: #define __LZCNT__ 1
3189 // CHECK_BTVER1_M64: #define __MMX__ 1
3190 // CHECK_BTVER1_M64: #define __POPCNT__ 1
3191 // CHECK_BTVER1_M64: #define __PRFCHW__ 1
3192 // CHECK_BTVER1_M64: #define __SSE2_MATH__ 1
3193 // CHECK_BTVER1_M64: #define __SSE2__ 1
3194 // CHECK_BTVER1_M64: #define __SSE3__ 1
3195 // CHECK_BTVER1_M64: #define __SSE4A__ 1
3196 // CHECK_BTVER1_M64: #define __SSE_MATH__ 1
3197 // CHECK_BTVER1_M64: #define __SSE__ 1
3198 // CHECK_BTVER1_M64: #define __SSSE3__ 1
3199 // CHECK_BTVER1_M64: #define __amd64 1
3200 // CHECK_BTVER1_M64: #define __amd64__ 1
3201 // CHECK_BTVER1_M64: #define __btver1 1
3202 // CHECK_BTVER1_M64: #define __btver1__ 1
3203 // CHECK_BTVER1_M64: #define __tune_btver1__ 1
3204 // CHECK_BTVER1_M64: #define __x86_64 1
3205 // CHECK_BTVER1_M64: #define __x86_64__ 1
3207 // RUN: %clang -march=btver2 -m32 -E -dM %s -o - 2>&1 \
3208 // RUN: -target i386-unknown-linux \
3209 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_BTVER2_M32
3210 // CHECK_BTVER2_M32-NOT: #define __3dNOW_A__ 1
3211 // CHECK_BTVER2_M32-NOT: #define __3dNOW__ 1
3212 // CHECK_BTVER2_M32: #define __AES__ 1
3213 // CHECK_BTVER2_M32: #define __AVX__ 1
3214 // CHECK_BTVER2_M32: #define __BMI__ 1
3215 // CHECK_BTVER2_M32: #define __F16C__ 1
3216 // CHECK_BTVER2_M32: #define __LZCNT__ 1
3217 // CHECK_BTVER2_M32: #define __MMX__ 1
3218 // CHECK_BTVER2_M32: #define __MOVBE__ 1
3219 // CHECK_BTVER2_M32: #define __PCLMUL__ 1
3220 // CHECK_BTVER2_M32: #define __POPCNT__ 1
3221 // CHECK_BTVER2_M32: #define __PRFCHW__ 1
3222 // CHECK_BTVER2_M32: #define __SSE2_MATH__ 1
3223 // CHECK_BTVER2_M32: #define __SSE2__ 1
3224 // CHECK_BTVER2_M32: #define __SSE3__ 1
3225 // CHECK_BTVER2_M32: #define __SSE4A__ 1
3226 // CHECK_BTVER2_M32: #define __SSE_MATH__ 1
3227 // CHECK_BTVER2_M32: #define __SSE__ 1
3228 // CHECK_BTVER2_M32: #define __SSSE3__ 1
3229 // CHECK_BTVER2_M32: #define __XSAVEOPT__ 1
3230 // CHECK_BTVER2_M32: #define __XSAVE__ 1
3231 // CHECK_BTVER2_M32: #define __btver2 1
3232 // CHECK_BTVER2_M32: #define __btver2__ 1
3233 // CHECK_BTVER2_M32: #define __i386 1
3234 // CHECK_BTVER2_M32: #define __i386__ 1
3235 // CHECK_BTVER2_M32: #define __tune_btver2__ 1
3237 // RUN: %clang -march=btver2 -m64 -E -dM %s -o - 2>&1 \
3238 // RUN: -target i386-unknown-linux \
3239 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_BTVER2_M64
3240 // CHECK_BTVER2_M64-NOT: #define __3dNOW_A__ 1
3241 // CHECK_BTVER2_M64-NOT: #define __3dNOW__ 1
3242 // CHECK_BTVER2_M64: #define __AES__ 1
3243 // CHECK_BTVER2_M64: #define __AVX__ 1
3244 // CHECK_BTVER2_M64: #define __BMI__ 1
3245 // CHECK_BTVER2_M64: #define __F16C__ 1
3246 // CHECK_BTVER2_M64: #define __LZCNT__ 1
3247 // CHECK_BTVER2_M64: #define __MMX__ 1
3248 // CHECK_BTVER2_M64: #define __MOVBE__ 1
3249 // CHECK_BTVER2_M64: #define __PCLMUL__ 1
3250 // CHECK_BTVER2_M64: #define __POPCNT__ 1
3251 // CHECK_BTVER2_M64: #define __PRFCHW__ 1
3252 // CHECK_BTVER2_M64: #define __SSE2_MATH__ 1
3253 // CHECK_BTVER2_M64: #define __SSE2__ 1
3254 // CHECK_BTVER2_M64: #define __SSE3__ 1
3255 // CHECK_BTVER2_M64: #define __SSE4A__ 1
3256 // CHECK_BTVER2_M64: #define __SSE_MATH__ 1
3257 // CHECK_BTVER2_M64: #define __SSE__ 1
3258 // CHECK_BTVER2_M64: #define __SSSE3__ 1
3259 // CHECK_BTVER2_M64: #define __XSAVEOPT__ 1
3260 // CHECK_BTVER2_M64: #define __XSAVE__ 1
3261 // CHECK_BTVER2_M64: #define __amd64 1
3262 // CHECK_BTVER2_M64: #define __amd64__ 1
3263 // CHECK_BTVER2_M64: #define __btver2 1
3264 // CHECK_BTVER2_M64: #define __btver2__ 1
3265 // CHECK_BTVER2_M64: #define __tune_btver2__ 1
3266 // CHECK_BTVER2_M64: #define __x86_64 1
3267 // CHECK_BTVER2_M64: #define __x86_64__ 1
3269 // RUN: %clang -march=bdver1 -m32 -E -dM %s -o - 2>&1 \
3270 // RUN: -target i386-unknown-linux \
3271 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_BDVER1_M32
3272 // CHECK_BDVER1_M32-NOT: #define __3dNOW_A__ 1
3273 // CHECK_BDVER1_M32-NOT: #define __3dNOW__ 1
3274 // CHECK_BDVER1_M32: #define __AES__ 1
3275 // CHECK_BDVER1_M32: #define __AVX__ 1
3276 // CHECK_BDVER1_M32: #define __FMA4__ 1
3277 // CHECK_BDVER1_M32: #define __LWP__ 1
3278 // CHECK_BDVER1_M32: #define __LZCNT__ 1
3279 // CHECK_BDVER1_M32: #define __MMX__ 1
3280 // CHECK_BDVER1_M32: #define __PCLMUL__ 1
3281 // CHECK_BDVER1_M32: #define __POPCNT__ 1
3282 // CHECK_BDVER1_M32: #define __PRFCHW__ 1
3283 // CHECK_BDVER1_M32: #define __SSE2_MATH__ 1
3284 // CHECK_BDVER1_M32: #define __SSE2__ 1
3285 // CHECK_BDVER1_M32: #define __SSE3__ 1
3286 // CHECK_BDVER1_M32: #define __SSE4A__ 1
3287 // CHECK_BDVER1_M32: #define __SSE4_1__ 1
3288 // CHECK_BDVER1_M32: #define __SSE4_2__ 1
3289 // CHECK_BDVER1_M32: #define __SSE_MATH__ 1
3290 // CHECK_BDVER1_M32: #define __SSE__ 1
3291 // CHECK_BDVER1_M32: #define __SSSE3__ 1
3292 // CHECK_BDVER1_M32: #define __XOP__ 1
3293 // CHECK_BDVER1_M32: #define __XSAVE__ 1
3294 // CHECK_BDVER1_M32: #define __bdver1 1
3295 // CHECK_BDVER1_M32: #define __bdver1__ 1
3296 // CHECK_BDVER1_M32: #define __i386 1
3297 // CHECK_BDVER1_M32: #define __i386__ 1
3298 // CHECK_BDVER1_M32: #define __tune_bdver1__ 1
3300 // RUN: %clang -march=bdver1 -m64 -E -dM %s -o - 2>&1 \
3301 // RUN: -target i386-unknown-linux \
3302 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_BDVER1_M64
3303 // CHECK_BDVER1_M64-NOT: #define __3dNOW_A__ 1
3304 // CHECK_BDVER1_M64-NOT: #define __3dNOW__ 1
3305 // CHECK_BDVER1_M64: #define __AES__ 1
3306 // CHECK_BDVER1_M64: #define __AVX__ 1
3307 // CHECK_BDVER1_M64: #define __FMA4__ 1
3308 // CHECK_BDVER1_M64: #define __LWP__ 1
3309 // CHECK_BDVER1_M64: #define __LZCNT__ 1
3310 // CHECK_BDVER1_M64: #define __MMX__ 1
3311 // CHECK_BDVER1_M64: #define __PCLMUL__ 1
3312 // CHECK_BDVER1_M64: #define __POPCNT__ 1
3313 // CHECK_BDVER1_M64: #define __PRFCHW__ 1
3314 // CHECK_BDVER1_M64: #define __SSE2_MATH__ 1
3315 // CHECK_BDVER1_M64: #define __SSE2__ 1
3316 // CHECK_BDVER1_M64: #define __SSE3__ 1
3317 // CHECK_BDVER1_M64: #define __SSE4A__ 1
3318 // CHECK_BDVER1_M64: #define __SSE4_1__ 1
3319 // CHECK_BDVER1_M64: #define __SSE4_2__ 1
3320 // CHECK_BDVER1_M64: #define __SSE_MATH__ 1
3321 // CHECK_BDVER1_M64: #define __SSE__ 1
3322 // CHECK_BDVER1_M64: #define __SSSE3__ 1
3323 // CHECK_BDVER1_M64: #define __XOP__ 1
3324 // CHECK_BDVER1_M64: #define __XSAVE__ 1
3325 // CHECK_BDVER1_M64: #define __amd64 1
3326 // CHECK_BDVER1_M64: #define __amd64__ 1
3327 // CHECK_BDVER1_M64: #define __bdver1 1
3328 // CHECK_BDVER1_M64: #define __bdver1__ 1
3329 // CHECK_BDVER1_M64: #define __tune_bdver1__ 1
3330 // CHECK_BDVER1_M64: #define __x86_64 1
3331 // CHECK_BDVER1_M64: #define __x86_64__ 1
3333 // RUN: %clang -march=bdver2 -m32 -E -dM %s -o - 2>&1 \
3334 // RUN: -target i386-unknown-linux \
3335 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_BDVER2_M32
3336 // CHECK_BDVER2_M32-NOT: #define __3dNOW_A__ 1
3337 // CHECK_BDVER2_M32-NOT: #define __3dNOW__ 1
3338 // CHECK_BDVER2_M32: #define __AES__ 1
3339 // CHECK_BDVER2_M32: #define __AVX__ 1
3340 // CHECK_BDVER2_M32: #define __BMI__ 1
3341 // CHECK_BDVER2_M32: #define __F16C__ 1
3342 // CHECK_BDVER2_M32: #define __FMA4__ 1
3343 // CHECK_BDVER2_M32: #define __FMA__ 1
3344 // CHECK_BDVER2_M32: #define __LWP__ 1
3345 // CHECK_BDVER2_M32: #define __LZCNT__ 1
3346 // CHECK_BDVER2_M32: #define __MMX__ 1
3347 // CHECK_BDVER2_M32: #define __PCLMUL__ 1
3348 // CHECK_BDVER2_M32: #define __POPCNT__ 1
3349 // CHECK_BDVER2_M32: #define __PRFCHW__ 1
3350 // CHECK_BDVER2_M32: #define __SSE2_MATH__ 1
3351 // CHECK_BDVER2_M32: #define __SSE2__ 1
3352 // CHECK_BDVER2_M32: #define __SSE3__ 1
3353 // CHECK_BDVER2_M32: #define __SSE4A__ 1
3354 // CHECK_BDVER2_M32: #define __SSE4_1__ 1
3355 // CHECK_BDVER2_M32: #define __SSE4_2__ 1
3356 // CHECK_BDVER2_M32: #define __SSE_MATH__ 1
3357 // CHECK_BDVER2_M32: #define __SSE__ 1
3358 // CHECK_BDVER2_M32: #define __SSSE3__ 1
3359 // CHECK_BDVER2_M32: #define __TBM__ 1
3360 // CHECK_BDVER2_M32: #define __XOP__ 1
3361 // CHECK_BDVER2_M32: #define __XSAVE__ 1
3362 // CHECK_BDVER2_M32: #define __bdver2 1
3363 // CHECK_BDVER2_M32: #define __bdver2__ 1
3364 // CHECK_BDVER2_M32: #define __i386 1
3365 // CHECK_BDVER2_M32: #define __i386__ 1
3366 // CHECK_BDVER2_M32: #define __tune_bdver2__ 1
3368 // RUN: %clang -march=bdver2 -m64 -E -dM %s -o - 2>&1 \
3369 // RUN: -target i386-unknown-linux \
3370 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_BDVER2_M64
3371 // CHECK_BDVER2_M64-NOT: #define __3dNOW_A__ 1
3372 // CHECK_BDVER2_M64-NOT: #define __3dNOW__ 1
3373 // CHECK_BDVER2_M64: #define __AES__ 1
3374 // CHECK_BDVER2_M64: #define __AVX__ 1
3375 // CHECK_BDVER2_M64: #define __BMI__ 1
3376 // CHECK_BDVER2_M64: #define __F16C__ 1
3377 // CHECK_BDVER2_M64: #define __FMA4__ 1
3378 // CHECK_BDVER2_M64: #define __FMA__ 1
3379 // CHECK_BDVER2_M64: #define __LWP__ 1
3380 // CHECK_BDVER2_M64: #define __LZCNT__ 1
3381 // CHECK_BDVER2_M64: #define __MMX__ 1
3382 // CHECK_BDVER2_M64: #define __PCLMUL__ 1
3383 // CHECK_BDVER2_M64: #define __POPCNT__ 1
3384 // CHECK_BDVER2_M64: #define __PRFCHW__ 1
3385 // CHECK_BDVER2_M64: #define __SSE2_MATH__ 1
3386 // CHECK_BDVER2_M64: #define __SSE2__ 1
3387 // CHECK_BDVER2_M64: #define __SSE3__ 1
3388 // CHECK_BDVER2_M64: #define __SSE4A__ 1
3389 // CHECK_BDVER2_M64: #define __SSE4_1__ 1
3390 // CHECK_BDVER2_M64: #define __SSE4_2__ 1
3391 // CHECK_BDVER2_M64: #define __SSE_MATH__ 1
3392 // CHECK_BDVER2_M64: #define __SSE__ 1
3393 // CHECK_BDVER2_M64: #define __SSSE3__ 1
3394 // CHECK_BDVER2_M64: #define __TBM__ 1
3395 // CHECK_BDVER2_M64: #define __XOP__ 1
3396 // CHECK_BDVER2_M64: #define __XSAVE__ 1
3397 // CHECK_BDVER2_M64: #define __amd64 1
3398 // CHECK_BDVER2_M64: #define __amd64__ 1
3399 // CHECK_BDVER2_M64: #define __bdver2 1
3400 // CHECK_BDVER2_M64: #define __bdver2__ 1
3401 // CHECK_BDVER2_M64: #define __tune_bdver2__ 1
3402 // CHECK_BDVER2_M64: #define __x86_64 1
3403 // CHECK_BDVER2_M64: #define __x86_64__ 1
3405 // RUN: %clang -march=bdver3 -m32 -E -dM %s -o - 2>&1 \
3406 // RUN: -target i386-unknown-linux \
3407 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_BDVER3_M32
3408 // CHECK_BDVER3_M32-NOT: #define __3dNOW_A__ 1
3409 // CHECK_BDVER3_M32-NOT: #define __3dNOW__ 1
3410 // CHECK_BDVER3_M32: #define __AES__ 1
3411 // CHECK_BDVER3_M32: #define __AVX__ 1
3412 // CHECK_BDVER3_M32: #define __BMI__ 1
3413 // CHECK_BDVER3_M32: #define __F16C__ 1
3414 // CHECK_BDVER3_M32: #define __FMA4__ 1
3415 // CHECK_BDVER3_M32: #define __FMA__ 1
3416 // CHECK_BDVER3_M32: #define __FSGSBASE__ 1
3417 // CHECK_BDVER3_M32: #define __LWP__ 1
3418 // CHECK_BDVER3_M32: #define __LZCNT__ 1
3419 // CHECK_BDVER3_M32: #define __MMX__ 1
3420 // CHECK_BDVER3_M32: #define __PCLMUL__ 1
3421 // CHECK_BDVER3_M32: #define __POPCNT__ 1
3422 // CHECK_BDVER3_M32: #define __PRFCHW__ 1
3423 // CHECK_BDVER3_M32: #define __SSE2_MATH__ 1
3424 // CHECK_BDVER3_M32: #define __SSE2__ 1
3425 // CHECK_BDVER3_M32: #define __SSE3__ 1
3426 // CHECK_BDVER3_M32: #define __SSE4A__ 1
3427 // CHECK_BDVER3_M32: #define __SSE4_1__ 1
3428 // CHECK_BDVER3_M32: #define __SSE4_2__ 1
3429 // CHECK_BDVER3_M32: #define __SSE_MATH__ 1
3430 // CHECK_BDVER3_M32: #define __SSE__ 1
3431 // CHECK_BDVER3_M32: #define __SSSE3__ 1
3432 // CHECK_BDVER3_M32: #define __TBM__ 1
3433 // CHECK_BDVER3_M32: #define __XOP__ 1
3434 // CHECK_BDVER3_M32: #define __XSAVEOPT__ 1
3435 // CHECK_BDVER3_M32: #define __XSAVE__ 1
3436 // CHECK_BDVER3_M32: #define __bdver3 1
3437 // CHECK_BDVER3_M32: #define __bdver3__ 1
3438 // CHECK_BDVER3_M32: #define __i386 1
3439 // CHECK_BDVER3_M32: #define __i386__ 1
3440 // CHECK_BDVER3_M32: #define __tune_bdver3__ 1
3442 // RUN: %clang -march=bdver3 -m64 -E -dM %s -o - 2>&1 \
3443 // RUN: -target i386-unknown-linux \
3444 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_BDVER3_M64
3445 // CHECK_BDVER3_M64-NOT: #define __3dNOW_A__ 1
3446 // CHECK_BDVER3_M64-NOT: #define __3dNOW__ 1
3447 // CHECK_BDVER3_M64: #define __AES__ 1
3448 // CHECK_BDVER3_M64: #define __AVX__ 1
3449 // CHECK_BDVER3_M64: #define __BMI__ 1
3450 // CHECK_BDVER3_M64: #define __F16C__ 1
3451 // CHECK_BDVER3_M64: #define __FMA4__ 1
3452 // CHECK_BDVER3_M64: #define __FMA__ 1
3453 // CHECK_BDVER3_M64: #define __FSGSBASE__ 1
3454 // CHECK_BDVER3_M64: #define __LWP__ 1
3455 // CHECK_BDVER3_M64: #define __LZCNT__ 1
3456 // CHECK_BDVER3_M64: #define __MMX__ 1
3457 // CHECK_BDVER3_M64: #define __PCLMUL__ 1
3458 // CHECK_BDVER3_M64: #define __POPCNT__ 1
3459 // CHECK_BDVER3_M64: #define __PRFCHW__ 1
3460 // CHECK_BDVER3_M64: #define __SSE2_MATH__ 1
3461 // CHECK_BDVER3_M64: #define __SSE2__ 1
3462 // CHECK_BDVER3_M64: #define __SSE3__ 1
3463 // CHECK_BDVER3_M64: #define __SSE4A__ 1
3464 // CHECK_BDVER3_M64: #define __SSE4_1__ 1
3465 // CHECK_BDVER3_M64: #define __SSE4_2__ 1
3466 // CHECK_BDVER3_M64: #define __SSE_MATH__ 1
3467 // CHECK_BDVER3_M64: #define __SSE__ 1
3468 // CHECK_BDVER3_M64: #define __SSSE3__ 1
3469 // CHECK_BDVER3_M64: #define __TBM__ 1
3470 // CHECK_BDVER3_M64: #define __XOP__ 1
3471 // CHECK_BDVER3_M64: #define __XSAVEOPT__ 1
3472 // CHECK_BDVER3_M64: #define __XSAVE__ 1
3473 // CHECK_BDVER3_M64: #define __amd64 1
3474 // CHECK_BDVER3_M64: #define __amd64__ 1
3475 // CHECK_BDVER3_M64: #define __bdver3 1
3476 // CHECK_BDVER3_M64: #define __bdver3__ 1
3477 // CHECK_BDVER3_M64: #define __tune_bdver3__ 1
3478 // CHECK_BDVER3_M64: #define __x86_64 1
3479 // CHECK_BDVER3_M64: #define __x86_64__ 1
3481 // RUN: %clang -march=bdver4 -m32 -E -dM %s -o - 2>&1 \
3482 // RUN: -target i386-unknown-linux \
3483 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_BDVER4_M32
3484 // CHECK_BDVER4_M32-NOT: #define __3dNOW_A__ 1
3485 // CHECK_BDVER4_M32-NOT: #define __3dNOW__ 1
3486 // CHECK_BDVER4_M32: #define __AES__ 1
3487 // CHECK_BDVER4_M32: #define __AVX2__ 1
3488 // CHECK_BDVER4_M32: #define __AVX__ 1
3489 // CHECK_BDVER4_M32: #define __BMI2__ 1
3490 // CHECK_BDVER4_M32: #define __BMI__ 1
3491 // CHECK_BDVER4_M32: #define __F16C__ 1
3492 // CHECK_BDVER4_M32: #define __FMA4__ 1
3493 // CHECK_BDVER4_M32: #define __FMA__ 1
3494 // CHECK_BDVER4_M32: #define __FSGSBASE__ 1
3495 // CHECK_BDVER4_M32: #define __LWP__ 1
3496 // CHECK_BDVER4_M32: #define __LZCNT__ 1
3497 // CHECK_BDVER4_M32: #define __MMX__ 1
3498 // CHECK_BDVER4_M32: #define __MOVBE__ 1
3499 // CHECK_BDVER4_M32: #define __PCLMUL__ 1
3500 // CHECK_BDVER4_M32: #define __POPCNT__ 1
3501 // CHECK_BDVER4_M32: #define __PRFCHW__ 1
3502 // CHECK_BDVER4_M32: #define __RDRND__ 1
3503 // CHECK_BDVER4_M32: #define __SSE2_MATH__ 1
3504 // CHECK_BDVER4_M32: #define __SSE2__ 1
3505 // CHECK_BDVER4_M32: #define __SSE3__ 1
3506 // CHECK_BDVER4_M32: #define __SSE4A__ 1
3507 // CHECK_BDVER4_M32: #define __SSE4_1__ 1
3508 // CHECK_BDVER4_M32: #define __SSE4_2__ 1
3509 // CHECK_BDVER4_M32: #define __SSE_MATH__ 1
3510 // CHECK_BDVER4_M32: #define __SSE__ 1
3511 // CHECK_BDVER4_M32: #define __SSSE3__ 1
3512 // CHECK_BDVER4_M32: #define __TBM__ 1
3513 // CHECK_BDVER4_M32: #define __XOP__ 1
3514 // CHECK_BDVER4_M32: #define __XSAVE__ 1
3515 // CHECK_BDVER4_M32: #define __bdver4 1
3516 // CHECK_BDVER4_M32: #define __bdver4__ 1
3517 // CHECK_BDVER4_M32: #define __i386 1
3518 // CHECK_BDVER4_M32: #define __i386__ 1
3519 // CHECK_BDVER4_M32: #define __tune_bdver4__ 1
3521 // RUN: %clang -march=bdver4 -m64 -E -dM %s -o - 2>&1 \
3522 // RUN: -target i386-unknown-linux \
3523 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_BDVER4_M64
3524 // CHECK_BDVER4_M64-NOT: #define __3dNOW_A__ 1
3525 // CHECK_BDVER4_M64-NOT: #define __3dNOW__ 1
3526 // CHECK_BDVER4_M64: #define __AES__ 1
3527 // CHECK_BDVER4_M64: #define __AVX2__ 1
3528 // CHECK_BDVER4_M64: #define __AVX__ 1
3529 // CHECK_BDVER4_M64: #define __BMI2__ 1
3530 // CHECK_BDVER4_M64: #define __BMI__ 1
3531 // CHECK_BDVER4_M64: #define __F16C__ 1
3532 // CHECK_BDVER4_M64: #define __FMA4__ 1
3533 // CHECK_BDVER4_M64: #define __FMA__ 1
3534 // CHECK_BDVER4_M64: #define __FSGSBASE__ 1
3535 // CHECK_BDVER4_M64: #define __LWP__ 1
3536 // CHECK_BDVER4_M64: #define __LZCNT__ 1
3537 // CHECK_BDVER4_M64: #define __MMX__ 1
3538 // CHECK_BDVER4_M64: #define __MOVBE__ 1
3539 // CHECK_BDVER4_M64: #define __PCLMUL__ 1
3540 // CHECK_BDVER4_M64: #define __POPCNT__ 1
3541 // CHECK_BDVER4_M64: #define __PRFCHW__ 1
3542 // CHECK_BDVER4_M64: #define __RDRND__ 1
3543 // CHECK_BDVER4_M64: #define __SSE2_MATH__ 1
3544 // CHECK_BDVER4_M64: #define __SSE2__ 1
3545 // CHECK_BDVER4_M64: #define __SSE3__ 1
3546 // CHECK_BDVER4_M64: #define __SSE4A__ 1
3547 // CHECK_BDVER4_M64: #define __SSE4_1__ 1
3548 // CHECK_BDVER4_M64: #define __SSE4_2__ 1
3549 // CHECK_BDVER4_M64: #define __SSE_MATH__ 1
3550 // CHECK_BDVER4_M64: #define __SSE__ 1
3551 // CHECK_BDVER4_M64: #define __SSSE3__ 1
3552 // CHECK_BDVER4_M64: #define __TBM__ 1
3553 // CHECK_BDVER4_M64: #define __XOP__ 1
3554 // CHECK_BDVER4_M64: #define __XSAVE__ 1
3555 // CHECK_BDVER4_M64: #define __amd64 1
3556 // CHECK_BDVER4_M64: #define __amd64__ 1
3557 // CHECK_BDVER4_M64: #define __bdver4 1
3558 // CHECK_BDVER4_M64: #define __bdver4__ 1
3559 // CHECK_BDVER4_M64: #define __tune_bdver4__ 1
3560 // CHECK_BDVER4_M64: #define __x86_64 1
3561 // CHECK_BDVER4_M64: #define __x86_64__ 1
3563 // RUN: %clang -march=znver1 -m32 -E -dM %s -o - 2>&1 \
3564 // RUN: -target i386-unknown-linux \
3565 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_ZNVER1_M32
3566 // CHECK_ZNVER1_M32-NOT: #define __3dNOW_A__ 1
3567 // CHECK_ZNVER1_M32-NOT: #define __3dNOW__ 1
3568 // CHECK_ZNVER1_M32: #define __ADX__ 1
3569 // CHECK_ZNVER1_M32: #define __AES__ 1
3570 // CHECK_ZNVER1_M32: #define __AVX2__ 1
3571 // CHECK_ZNVER1_M32: #define __AVX__ 1
3572 // CHECK_ZNVER1_M32: #define __BMI2__ 1
3573 // CHECK_ZNVER1_M32: #define __BMI__ 1
3574 // CHECK_ZNVER1_M32: #define __CLFLUSHOPT__ 1
3575 // CHECK_ZNVER1_M32: #define __CLZERO__ 1
3576 // CHECK_ZNVER1_M32: #define __F16C__ 1
3577 // CHECK_ZNVER1_M32-NOT: #define __FMA4__ 1
3578 // CHECK_ZNVER1_M32: #define __FMA__ 1
3579 // CHECK_ZNVER1_M32: #define __FSGSBASE__ 1
3580 // CHECK_ZNVER1_M32: #define __LZCNT__ 1
3581 // CHECK_ZNVER1_M32: #define __MMX__ 1
3582 // CHECK_ZNVER1_M32: #define __MOVBE__ 1
3583 // CHECK_ZNVER1_M32: #define __PCLMUL__ 1
3584 // CHECK_ZNVER1_M32: #define __POPCNT__ 1
3585 // CHECK_ZNVER1_M32: #define __PRFCHW__ 1
3586 // CHECK_ZNVER1_M32: #define __RDRND__ 1
3587 // CHECK_ZNVER1_M32: #define __RDSEED__ 1
3588 // CHECK_ZNVER1_M32: #define __SHA__ 1
3589 // CHECK_ZNVER1_M32: #define __SSE2_MATH__ 1
3590 // CHECK_ZNVER1_M32: #define __SSE2__ 1
3591 // CHECK_ZNVER1_M32: #define __SSE3__ 1
3592 // CHECK_ZNVER1_M32: #define __SSE4A__ 1
3593 // CHECK_ZNVER1_M32: #define __SSE4_1__ 1
3594 // CHECK_ZNVER1_M32: #define __SSE4_2__ 1
3595 // CHECK_ZNVER1_M32: #define __SSE_MATH__ 1
3596 // CHECK_ZNVER1_M32: #define __SSE__ 1
3597 // CHECK_ZNVER1_M32: #define __SSSE3__ 1
3598 // CHECK_ZNVER1_M32-NOT: #define __TBM__ 1
3599 // CHECK_ZNVER1_M32-NOT: #define __XOP__ 1
3600 // CHECK_ZNVER1_M32: #define __XSAVEC__ 1
3601 // CHECK_ZNVER1_M32: #define __XSAVEOPT__ 1
3602 // CHECK_ZNVER1_M32: #define __XSAVES__ 1
3603 // CHECK_ZNVER1_M32: #define __XSAVE__ 1
3604 // CHECK_ZNVER1_M32: #define __i386 1
3605 // CHECK_ZNVER1_M32: #define __i386__ 1
3606 // CHECK_ZNVER1_M32: #define __tune_znver1__ 1
3607 // CHECK_ZNVER1_M32: #define __znver1 1
3608 // CHECK_ZNVER1_M32: #define __znver1__ 1
3610 // RUN: %clang -march=znver1 -m64 -E -dM %s -o - 2>&1 \
3611 // RUN: -target i386-unknown-linux \
3612 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_ZNVER1_M64
3613 // CHECK_ZNVER1_M64-NOT: #define __3dNOW_A__ 1
3614 // CHECK_ZNVER1_M64-NOT: #define __3dNOW__ 1
3615 // CHECK_ZNVER1_M64: #define __ADX__ 1
3616 // CHECK_ZNVER1_M64: #define __AES__ 1
3617 // CHECK_ZNVER1_M64: #define __AVX2__ 1
3618 // CHECK_ZNVER1_M64: #define __AVX__ 1
3619 // CHECK_ZNVER1_M64: #define __BMI2__ 1
3620 // CHECK_ZNVER1_M64: #define __BMI__ 1
3621 // CHECK_ZNVER1_M64: #define __CLFLUSHOPT__ 1
3622 // CHECK_ZNVER1_M64: #define __CLZERO__ 1
3623 // CHECK_ZNVER1_M64: #define __F16C__ 1
3624 // CHECK_ZNVER1_M64-NOT: #define __FMA4__ 1
3625 // CHECK_ZNVER1_M64: #define __FMA__ 1
3626 // CHECK_ZNVER1_M64: #define __FSGSBASE__ 1
3627 // CHECK_ZNVER1_M64: #define __LAHF_SAHF__ 1
3628 // CHECK_ZNVER1_M64: #define __LZCNT__ 1
3629 // CHECK_ZNVER1_M64: #define __MMX__ 1
3630 // CHECK_ZNVER1_M64: #define __MOVBE__ 1
3631 // CHECK_ZNVER1_M64: #define __PCLMUL__ 1
3632 // CHECK_ZNVER1_M64: #define __POPCNT__ 1
3633 // CHECK_ZNVER1_M64: #define __PRFCHW__ 1
3634 // CHECK_ZNVER1_M64: #define __RDRND__ 1
3635 // CHECK_ZNVER1_M64: #define __RDSEED__ 1
3636 // CHECK_ZNVER1_M64: #define __SHA__ 1
3637 // CHECK_ZNVER1_M64: #define __SSE2_MATH__ 1
3638 // CHECK_ZNVER1_M64: #define __SSE2__ 1
3639 // CHECK_ZNVER1_M64: #define __SSE3__ 1
3640 // CHECK_ZNVER1_M64: #define __SSE4A__ 1
3641 // CHECK_ZNVER1_M64: #define __SSE4_1__ 1
3642 // CHECK_ZNVER1_M64: #define __SSE4_2__ 1
3643 // CHECK_ZNVER1_M64: #define __SSE_MATH__ 1
3644 // CHECK_ZNVER1_M64: #define __SSE__ 1
3645 // CHECK_ZNVER1_M64: #define __SSSE3__ 1
3646 // CHECK_ZNVER1_M64-NOT: #define __TBM__ 1
3647 // CHECK_ZNVER1_M64-NOT: #define __XOP__ 1
3648 // CHECK_ZNVER1_M64: #define __XSAVEC__ 1
3649 // CHECK_ZNVER1_M64: #define __XSAVEOPT__ 1
3650 // CHECK_ZNVER1_M64: #define __XSAVES__ 1
3651 // CHECK_ZNVER1_M64: #define __XSAVE__ 1
3652 // CHECK_ZNVER1_M64: #define __amd64 1
3653 // CHECK_ZNVER1_M64: #define __amd64__ 1
3654 // CHECK_ZNVER1_M64: #define __tune_znver1__ 1
3655 // CHECK_ZNVER1_M64: #define __x86_64 1
3656 // CHECK_ZNVER1_M64: #define __x86_64__ 1
3657 // CHECK_ZNVER1_M64: #define __znver1 1
3658 // CHECK_ZNVER1_M64: #define __znver1__ 1
3660 // RUN: %clang -march=znver2 -m32 -E -dM %s -o - 2>&1 \
3661 // RUN: -target i386-unknown-linux \
3662 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_ZNVER2_M32
3663 // CHECK_ZNVER2_M32-NOT: #define __3dNOW_A__ 1
3664 // CHECK_ZNVER2_M32-NOT: #define __3dNOW__ 1
3665 // CHECK_ZNVER2_M32: #define __ADX__ 1
3666 // CHECK_ZNVER2_M32: #define __AES__ 1
3667 // CHECK_ZNVER2_M32: #define __AVX2__ 1
3668 // CHECK_ZNVER2_M32: #define __AVX__ 1
3669 // CHECK_ZNVER2_M32: #define __BMI2__ 1
3670 // CHECK_ZNVER2_M32: #define __BMI__ 1
3671 // CHECK_ZNVER2_M32: #define __CLFLUSHOPT__ 1
3672 // CHECK_ZNVER2_M32: #define __CLWB__ 1
3673 // CHECK_ZNVER2_M32: #define __CLZERO__ 1
3674 // CHECK_ZNVER2_M32: #define __F16C__ 1
3675 // CHECK_ZNVER2_M32-NOT: #define __FMA4__ 1
3676 // CHECK_ZNVER2_M32: #define __FMA__ 1
3677 // CHECK_ZNVER2_M32: #define __FSGSBASE__ 1
3678 // CHECK_ZNVER2_M32: #define __LAHF_SAHF__ 1
3679 // CHECK_ZNVER2_M32: #define __LZCNT__ 1
3680 // CHECK_ZNVER2_M32: #define __MMX__ 1
3681 // CHECK_ZNVER2_M32: #define __PCLMUL__ 1
3682 // CHECK_ZNVER2_M32: #define __POPCNT__ 1
3683 // CHECK_ZNVER2_M32: #define __PRFCHW__ 1
3684 // CHECK_ZNVER2_M32: #define __RDPID__ 1
3685 // CHECK_ZNVER2_M32: #define __RDPRU__ 1
3686 // CHECK_ZNVER2_M32: #define __RDRND__ 1
3687 // CHECK_ZNVER2_M32: #define __RDSEED__ 1
3688 // CHECK_ZNVER2_M32: #define __SHA__ 1
3689 // CHECK_ZNVER2_M32: #define __SSE2_MATH__ 1
3690 // CHECK_ZNVER2_M32: #define __SSE2__ 1
3691 // CHECK_ZNVER2_M32: #define __SSE3__ 1
3692 // CHECK_ZNVER2_M32: #define __SSE4A__ 1
3693 // CHECK_ZNVER2_M32: #define __SSE4_1__ 1
3694 // CHECK_ZNVER2_M32: #define __SSE4_2__ 1
3695 // CHECK_ZNVER2_M32: #define __SSE_MATH__ 1
3696 // CHECK_ZNVER2_M32: #define __SSE__ 1
3697 // CHECK_ZNVER2_M32: #define __SSSE3__ 1
3698 // CHECK_ZNVER2_M32-NOT: #define __TBM__ 1
3699 // CHECK_ZNVER2_M32: #define __WBNOINVD__ 1
3700 // CHECK_ZNVER2_M32-NOT: #define __XOP__ 1
3701 // CHECK_ZNVER2_M32: #define __XSAVEC__ 1
3702 // CHECK_ZNVER2_M32: #define __XSAVEOPT__ 1
3703 // CHECK_ZNVER2_M32: #define __XSAVES__ 1
3704 // CHECK_ZNVER2_M32: #define __XSAVE__ 1
3705 // CHECK_ZNVER2_M32: #define __i386 1
3706 // CHECK_ZNVER2_M32: #define __i386__ 1
3707 // CHECK_ZNVER2_M32: #define __tune_znver2__ 1
3708 // CHECK_ZNVER2_M32: #define __znver2 1
3709 // CHECK_ZNVER2_M32: #define __znver2__ 1
3711 // RUN: %clang -march=znver2 -m64 -E -dM %s -o - 2>&1 \
3712 // RUN: -target i386-unknown-linux \
3713 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_ZNVER2_M64
3714 // CHECK_ZNVER2_M64-NOT: #define __3dNOW_A__ 1
3715 // CHECK_ZNVER2_M64-NOT: #define __3dNOW__ 1
3716 // CHECK_ZNVER2_M64: #define __ADX__ 1
3717 // CHECK_ZNVER2_M64: #define __AES__ 1
3718 // CHECK_ZNVER2_M64: #define __AVX2__ 1
3719 // CHECK_ZNVER2_M64: #define __AVX__ 1
3720 // CHECK_ZNVER2_M64: #define __BMI2__ 1
3721 // CHECK_ZNVER2_M64: #define __BMI__ 1
3722 // CHECK_ZNVER2_M64: #define __CLFLUSHOPT__ 1
3723 // CHECK_ZNVER2_M64: #define __CLWB__ 1
3724 // CHECK_ZNVER2_M64: #define __CLZERO__ 1
3725 // CHECK_ZNVER2_M64: #define __F16C__ 1
3726 // CHECK_ZNVER2_M64-NOT: #define __FMA4__ 1
3727 // CHECK_ZNVER2_M64: #define __FMA__ 1
3728 // CHECK_ZNVER2_M64: #define __FSGSBASE__ 1
3729 // CHECK_ZNVER2_M64: #define __LAHF_SAHF__ 1
3730 // CHECK_ZNVER2_M64: #define __LZCNT__ 1
3731 // CHECK_ZNVER2_M64: #define __MMX__ 1
3732 // CHECK_ZNVER2_M64: #define __PCLMUL__ 1
3733 // CHECK_ZNVER2_M64: #define __POPCNT__ 1
3734 // CHECK_ZNVER2_M64: #define __PRFCHW__ 1
3735 // CHECK_ZNVER2_M64: #define __RDPID__ 1
3736 // CHECK_ZNVER2_M64: #define __RDPRU__ 1
3737 // CHECK_ZNVER2_M64: #define __RDRND__ 1
3738 // CHECK_ZNVER2_M64: #define __RDSEED__ 1
3739 // CHECK_ZNVER2_M64: #define __SHA__ 1
3740 // CHECK_ZNVER2_M64: #define __SSE2_MATH__ 1
3741 // CHECK_ZNVER2_M64: #define __SSE2__ 1
3742 // CHECK_ZNVER2_M64: #define __SSE3__ 1
3743 // CHECK_ZNVER2_M64: #define __SSE4A__ 1
3744 // CHECK_ZNVER2_M64: #define __SSE4_1__ 1
3745 // CHECK_ZNVER2_M64: #define __SSE4_2__ 1
3746 // CHECK_ZNVER2_M64: #define __SSE_MATH__ 1
3747 // CHECK_ZNVER2_M64: #define __SSE__ 1
3748 // CHECK_ZNVER2_M64: #define __SSSE3__ 1
3749 // CHECK_ZNVER2_M64-NOT: #define __TBM__ 1
3750 // CHECK_ZNVER2_M64: #define __WBNOINVD__ 1
3751 // CHECK_ZNVER2_M64-NOT: #define __XOP__ 1
3752 // CHECK_ZNVER2_M64: #define __XSAVEC__ 1
3753 // CHECK_ZNVER2_M64: #define __XSAVEOPT__ 1
3754 // CHECK_ZNVER2_M64: #define __XSAVES__ 1
3755 // CHECK_ZNVER2_M64: #define __XSAVE__ 1
3756 // CHECK_ZNVER2_M64: #define __amd64 1
3757 // CHECK_ZNVER2_M64: #define __amd64__ 1
3758 // CHECK_ZNVER2_M64: #define __tune_znver2__ 1
3759 // CHECK_ZNVER2_M64: #define __x86_64 1
3760 // CHECK_ZNVER2_M64: #define __x86_64__ 1
3761 // CHECK_ZNVER2_M64: #define __znver2 1
3762 // CHECK_ZNVER2_M64: #define __znver2__ 1
3764 // RUN: %clang -march=znver3 -m32 -E -dM %s -o - 2>&1 \
3765 // RUN: -target i386-unknown-linux \
3766 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_ZNVER3_M32
3767 // CHECK_ZNVER3_M32-NOT: #define __3dNOW_A__ 1
3768 // CHECK_ZNVER3_M32-NOT: #define __3dNOW__ 1
3769 // CHECK_ZNVER3_M32: #define __ADX__ 1
3770 // CHECK_ZNVER3_M32: #define __AES__ 1
3771 // CHECK_ZNVER3_M32: #define __AVX2__ 1
3772 // CHECK_ZNVER3_M32: #define __AVX__ 1
3773 // CHECK_ZNVER3_M32: #define __BMI2__ 1
3774 // CHECK_ZNVER3_M32: #define __BMI__ 1
3775 // CHECK_ZNVER3_M32: #define __CLFLUSHOPT__ 1
3776 // CHECK_ZNVER3_M32: #define __CLWB__ 1
3777 // CHECK_ZNVER3_M32: #define __CLZERO__ 1
3778 // CHECK_ZNVER3_M32: #define __F16C__ 1
3779 // CHECK_ZNVER3_M32-NOT: #define __FMA4__ 1
3780 // CHECK_ZNVER3_M32: #define __FMA__ 1
3781 // CHECK_ZNVER3_M32: #define __FSGSBASE__ 1
3782 // CHECK_ZNVER3_M32: #define __LZCNT__ 1
3783 // CHECK_ZNVER3_M32: #define __MMX__ 1
3784 // CHECK_ZNVER3_M32: #define __PCLMUL__ 1
3785 // CHECK_ZNVER3_M32: #define __PKU__ 1
3786 // CHECK_ZNVER3_M32: #define __POPCNT__ 1
3787 // CHECK_ZNVER3_M32: #define __PRFCHW__ 1
3788 // CHECK_ZNVER3_M32: #define __RDPID__ 1
3789 // CHECK_ZNVER3_M32: #define __RDPRU__ 1
3790 // CHECK_ZNVER3_M32: #define __RDRND__ 1
3791 // CHECK_ZNVER3_M32: #define __RDSEED__ 1
3792 // CHECK_ZNVER3_M32: #define __SHA__ 1
3793 // CHECK_ZNVER3_M32: #define __SSE2_MATH__ 1
3794 // CHECK_ZNVER3_M32: #define __SSE2__ 1
3795 // CHECK_ZNVER3_M32: #define __SSE3__ 1
3796 // CHECK_ZNVER3_M32: #define __SSE4A__ 1
3797 // CHECK_ZNVER3_M32: #define __SSE4_1__ 1
3798 // CHECK_ZNVER3_M32: #define __SSE4_2__ 1
3799 // CHECK_ZNVER3_M32: #define __SSE_MATH__ 1
3800 // CHECK_ZNVER3_M32: #define __SSE__ 1
3801 // CHECK_ZNVER3_M32: #define __SSSE3__ 1
3802 // CHECK_ZNVER3_M32-NOT: #define __TBM__ 1
3803 // CHECK_ZNVER3_M32: #define __WBNOINVD__ 1
3804 // CHECK_ZNVER3_M32-NOT: #define __XOP__ 1
3805 // CHECK_ZNVER3_M32: #define __XSAVEC__ 1
3806 // CHECK_ZNVER3_M32: #define __XSAVEOPT__ 1
3807 // CHECK_ZNVER3_M32: #define __XSAVES__ 1
3808 // CHECK_ZNVER3_M32: #define __XSAVE__ 1
3809 // CHECK_ZNVER3_M32: #define __i386 1
3810 // CHECK_ZNVER3_M32: #define __i386__ 1
3811 // CHECK_ZNVER3_M32: #define __tune_znver3__ 1
3812 // CHECK_ZNVER3_M32: #define __znver3 1
3813 // CHECK_ZNVER3_M32: #define __znver3__ 1
3815 // RUN: %clang -march=znver3 -m64 -E -dM %s -o - 2>&1 \
3816 // RUN: -target i386-unknown-linux \
3817 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_ZNVER3_M64
3818 // CHECK_ZNVER3_M64-NOT: #define __3dNOW_A__ 1
3819 // CHECK_ZNVER3_M64-NOT: #define __3dNOW__ 1
3820 // CHECK_ZNVER3_M64: #define __ADX__ 1
3821 // CHECK_ZNVER3_M64: #define __AES__ 1
3822 // CHECK_ZNVER3_M64: #define __AVX2__ 1
3823 // CHECK_ZNVER3_M64: #define __AVX__ 1
3824 // CHECK_ZNVER3_M64: #define __BMI2__ 1
3825 // CHECK_ZNVER3_M64: #define __BMI__ 1
3826 // CHECK_ZNVER3_M64: #define __CLFLUSHOPT__ 1
3827 // CHECK_ZNVER3_M64: #define __CLWB__ 1
3828 // CHECK_ZNVER3_M64: #define __CLZERO__ 1
3829 // CHECK_ZNVER3_M64: #define __F16C__ 1
3830 // CHECK_ZNVER3_M64-NOT: #define __FMA4__ 1
3831 // CHECK_ZNVER3_M64: #define __FMA__ 1
3832 // CHECK_ZNVER3_M64: #define __FSGSBASE__ 1
3833 // CHECK_ZNVER3_M64: #define __LZCNT__ 1
3834 // CHECK_ZNVER3_M64: #define __MMX__ 1
3835 // CHECK_ZNVER3_M64: #define __PCLMUL__ 1
3836 // CHECK_ZNVER3_M64: #define __PKU__ 1
3837 // CHECK_ZNVER3_M64: #define __POPCNT__ 1
3838 // CHECK_ZNVER3_M64: #define __PRFCHW__ 1
3839 // CHECK_ZNVER3_M64: #define __RDPID__ 1
3840 // CHECK_ZNVER3_M64: #define __RDPRU__ 1
3841 // CHECK_ZNVER3_M64: #define __RDRND__ 1
3842 // CHECK_ZNVER3_M64: #define __RDSEED__ 1
3843 // CHECK_ZNVER3_M64: #define __SHA__ 1
3844 // CHECK_ZNVER3_M64: #define __SSE2_MATH__ 1
3845 // CHECK_ZNVER3_M64: #define __SSE2__ 1
3846 // CHECK_ZNVER3_M64: #define __SSE3__ 1
3847 // CHECK_ZNVER3_M64: #define __SSE4A__ 1
3848 // CHECK_ZNVER3_M64: #define __SSE4_1__ 1
3849 // CHECK_ZNVER3_M64: #define __SSE4_2__ 1
3850 // CHECK_ZNVER3_M64: #define __SSE_MATH__ 1
3851 // CHECK_ZNVER3_M64: #define __SSE__ 1
3852 // CHECK_ZNVER3_M64: #define __SSSE3__ 1
3853 // CHECK_ZNVER3_M64-NOT: #define __TBM__ 1
3854 // CHECK_ZNVER3_M64: #define __VAES__ 1
3855 // CHECK_ZNVER3_M64: #define __VPCLMULQDQ__ 1
3856 // CHECK_ZNVER3_M64: #define __WBNOINVD__ 1
3857 // CHECK_ZNVER3_M64-NOT: #define __XOP__ 1
3858 // CHECK_ZNVER3_M64: #define __XSAVEC__ 1
3859 // CHECK_ZNVER3_M64: #define __XSAVEOPT__ 1
3860 // CHECK_ZNVER3_M64: #define __XSAVES__ 1
3861 // CHECK_ZNVER3_M64: #define __XSAVE__ 1
3862 // CHECK_ZNVER3_M64: #define __amd64 1
3863 // CHECK_ZNVER3_M64: #define __amd64__ 1
3864 // CHECK_ZNVER3_M64: #define __tune_znver3__ 1
3865 // CHECK_ZNVER3_M64: #define __x86_64 1
3866 // CHECK_ZNVER3_M64: #define __x86_64__ 1
3867 // CHECK_ZNVER3_M64: #define __znver3 1
3868 // CHECK_ZNVER3_M64: #define __znver3__ 1
3870 // RUN: %clang -march=znver4 -m32 -E -dM %s -o - 2>&1 \
3871 // RUN: -target i386-unknown-linux \
3872 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_ZNVER4_M32
3873 // CHECK_ZNVER4_M32-NOT: #define __3dNOW_A__ 1
3874 // CHECK_ZNVER4_M32-NOT: #define __3dNOW__ 1
3875 // CHECK_ZNVER4_M32: #define __ADX__ 1
3876 // CHECK_ZNVER4_M32: #define __AES__ 1
3877 // CHECK_ZNVER4_M32: #define __AVX2__ 1
3878 // CHECK_ZNVER4_M32: #define __AVX512BF16__ 1
3879 // CHECK_ZNVER4_M32: #define __AVX512BITALG__ 1
3880 // CHECK_ZNVER4_M32: #define __AVX512BW__ 1
3881 // CHECK_ZNVER4_M32: #define __AVX512CD__ 1
3882 // CHECK_ZNVER4_M32: #define __AVX512DQ__ 1
3883 // CHECK_ZNVER4_M32: #define __AVX512F__ 1
3884 // CHECK_ZNVER4_M32: #define __AVX512IFMA__ 1
3885 // CHECK_ZNVER4_M32: #define __AVX512VBMI2__ 1
3886 // CHECK_ZNVER4_M32: #define __AVX512VBMI__ 1
3887 // CHECK_ZNVER4_M32: #define __AVX512VL__ 1
3888 // CHECK_ZNVER4_M32: #define __AVX512VNNI__ 1
3889 // CHECK_ZNVER4_M32: #define __AVX512VPOPCNTDQ__ 1
3890 // CHECK_ZNVER4_M32: #define __AVX__ 1
3891 // CHECK_ZNVER4_M32: #define __BMI2__ 1
3892 // CHECK_ZNVER4_M32: #define __BMI__ 1
3893 // CHECK_ZNVER4_M32: #define __CLFLUSHOPT__ 1
3894 // CHECK_ZNVER4_M32: #define __CLWB__ 1
3895 // CHECK_ZNVER4_M32: #define __CLZERO__ 1
3896 // CHECK_ZNVER4_M32: #define __EVEX512__ 1
3897 // CHECK_ZNVER4_M32: #define __F16C__ 1
3898 // CHECK_ZNVER4_M32-NOT: #define __FMA4__ 1
3899 // CHECK_ZNVER4_M32: #define __FMA__ 1
3900 // CHECK_ZNVER4_M32: #define __FSGSBASE__ 1
3901 // CHECK_ZNVER4_M32: #define __GFNI__ 1
3902 // CHECK_ZNVER4_M32: #define __LZCNT__ 1
3903 // CHECK_ZNVER4_M32: #define __MMX__ 1
3904 // CHECK_ZNVER4_M32: #define __PCLMUL__ 1
3905 // CHECK_ZNVER4_M32: #define __PKU__ 1
3906 // CHECK_ZNVER4_M32: #define __POPCNT__ 1
3907 // CHECK_ZNVER4_M32: #define __PRFCHW__ 1
3908 // CHECK_ZNVER4_M32: #define __RDPID__ 1
3909 // CHECK_ZNVER4_M32: #define __RDPRU__ 1
3910 // CHECK_ZNVER4_M32: #define __RDRND__ 1
3911 // CHECK_ZNVER4_M32: #define __RDSEED__ 1
3912 // CHECK_ZNVER4_M32: #define __SHA__ 1
3913 // CHECK_ZNVER4_M32: #define __SSE2_MATH__ 1
3914 // CHECK_ZNVER4_M32: #define __SSE2__ 1
3915 // CHECK_ZNVER4_M32: #define __SSE3__ 1
3916 // CHECK_ZNVER4_M32: #define __SSE4A__ 1
3917 // CHECK_ZNVER4_M32: #define __SSE4_1__ 1
3918 // CHECK_ZNVER4_M32: #define __SSE4_2__ 1
3919 // CHECK_ZNVER4_M32: #define __SSE_MATH__ 1
3920 // CHECK_ZNVER4_M32: #define __SSE__ 1
3921 // CHECK_ZNVER4_M32: #define __SSSE3__ 1
3922 // CHECK_ZNVER4_M32-NOT: #define __TBM__ 1
3923 // CHECK_ZNVER4_M32: #define __WBNOINVD__ 1
3924 // CHECK_ZNVER4_M32-NOT: #define __XOP__ 1
3925 // CHECK_ZNVER4_M32: #define __XSAVEC__ 1
3926 // CHECK_ZNVER4_M32: #define __XSAVEOPT__ 1
3927 // CHECK_ZNVER4_M32: #define __XSAVES__ 1
3928 // CHECK_ZNVER4_M32: #define __XSAVE__ 1
3929 // CHECK_ZNVER4_M32: #define __i386 1
3930 // CHECK_ZNVER4_M32: #define __i386__ 1
3931 // CHECK_ZNVER4_M32: #define __tune_znver4__ 1
3932 // CHECK_ZNVER4_M32: #define __znver4 1
3933 // CHECK_ZNVER4_M32: #define __znver4__ 1
3935 // RUN: %clang -march=znver4 -m64 -E -dM %s -o - 2>&1 \
3936 // RUN: -target i386-unknown-linux \
3937 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_ZNVER4_M64
3938 // CHECK_ZNVER4_M64-NOT: #define __3dNOW_A__ 1
3939 // CHECK_ZNVER4_M64-NOT: #define __3dNOW__ 1
3940 // CHECK_ZNVER4_M64: #define __ADX__ 1
3941 // CHECK_ZNVER4_M64: #define __AES__ 1
3942 // CHECK_ZNVER4_M64: #define __AVX2__ 1
3943 // CHECK_ZNVER4_M64: #define __AVX512BF16__ 1
3944 // CHECK_ZNVER4_M64: #define __AVX512BITALG__ 1
3945 // CHECK_ZNVER4_M64: #define __AVX512BW__ 1
3946 // CHECK_ZNVER4_M64: #define __AVX512CD__ 1
3947 // CHECK_ZNVER4_M64: #define __AVX512DQ__ 1
3948 // CHECK_ZNVER4_M64: #define __AVX512F__ 1
3949 // CHECK_ZNVER4_M64: #define __AVX512IFMA__ 1
3950 // CHECK_ZNVER4_M64: #define __AVX512VBMI2__ 1
3951 // CHECK_ZNVER4_M64: #define __AVX512VBMI__ 1
3952 // CHECK_ZNVER4_M64: #define __AVX512VL__ 1
3953 // CHECK_ZNVER4_M64: #define __AVX512VNNI__ 1
3954 // CHECK_ZNVER4_M64: #define __AVX512VPOPCNTDQ__ 1
3955 // CHECK_ZNVER4_M64: #define __AVX__ 1
3956 // CHECK_ZNVER4_M64: #define __BMI2__ 1
3957 // CHECK_ZNVER4_M64: #define __BMI__ 1
3958 // CHECK_ZNVER4_M64: #define __CLFLUSHOPT__ 1
3959 // CHECK_ZNVER4_M64: #define __CLWB__ 1
3960 // CHECK_ZNVER4_M64: #define __CLZERO__ 1
3961 // CHECK_ZNVER4_M64: #define __EVEX512__ 1
3962 // CHECK_ZNVER4_M64: #define __F16C__ 1
3963 // CHECK_ZNVER4_M64-NOT: #define __FMA4__ 1
3964 // CHECK_ZNVER4_M64: #define __FMA__ 1
3965 // CHECK_ZNVER4_M64: #define __FSGSBASE__ 1
3966 // CHECK_ZNVER4_M64: #define __GFNI__ 1
3967 // CHECK_ZNVER4_M64: #define __LZCNT__ 1
3968 // CHECK_ZNVER4_M64: #define __MMX__ 1
3969 // CHECK_ZNVER4_M64: #define __PCLMUL__ 1
3970 // CHECK_ZNVER4_M64: #define __PKU__ 1
3971 // CHECK_ZNVER4_M64: #define __POPCNT__ 1
3972 // CHECK_ZNVER4_M64: #define __PRFCHW__ 1
3973 // CHECK_ZNVER4_M64: #define __RDPID__ 1
3974 // CHECK_ZNVER4_M64: #define __RDPRU__ 1
3975 // CHECK_ZNVER4_M64: #define __RDRND__ 1
3976 // CHECK_ZNVER4_M64: #define __RDSEED__ 1
3977 // CHECK_ZNVER4_M64: #define __SHA__ 1
3978 // CHECK_ZNVER4_M64: #define __SSE2_MATH__ 1
3979 // CHECK_ZNVER4_M64: #define __SSE2__ 1
3980 // CHECK_ZNVER4_M64: #define __SSE3__ 1
3981 // CHECK_ZNVER4_M64: #define __SSE4A__ 1
3982 // CHECK_ZNVER4_M64: #define __SSE4_1__ 1
3983 // CHECK_ZNVER4_M64: #define __SSE4_2__ 1
3984 // CHECK_ZNVER4_M64: #define __SSE_MATH__ 1
3985 // CHECK_ZNVER4_M64: #define __SSE__ 1
3986 // CHECK_ZNVER4_M64: #define __SSSE3__ 1
3987 // CHECK_ZNVER4_M64-NOT: #define __TBM__ 1
3988 // CHECK_ZNVER4_M64: #define __VAES__ 1
3989 // CHECK_ZNVER4_M64: #define __VPCLMULQDQ__ 1
3990 // CHECK_ZNVER4_M64: #define __WBNOINVD__ 1
3991 // CHECK_ZNVER4_M64-NOT: #define __XOP__ 1
3992 // CHECK_ZNVER4_M64: #define __XSAVEC__ 1
3993 // CHECK_ZNVER4_M64: #define __XSAVEOPT__ 1
3994 // CHECK_ZNVER4_M64: #define __XSAVES__ 1
3995 // CHECK_ZNVER4_M64: #define __XSAVE__ 1
3996 // CHECK_ZNVER4_M64: #define __amd64 1
3997 // CHECK_ZNVER4_M64: #define __amd64__ 1
3998 // CHECK_ZNVER4_M64: #define __tune_znver4__ 1
3999 // CHECK_ZNVER4_M64: #define __x86_64 1
4000 // CHECK_ZNVER4_M64: #define __x86_64__ 1
4001 // CHECK_ZNVER4_M64: #define __znver4 1
4002 // CHECK_ZNVER4_M64: #define __znver4__ 1
4004 // End X86/GCC/Linux tests ------------------
4006 // Begin PPC/GCC/Linux tests ----------------
4007 // Check that VSX also turns on altivec.
4008 // RUN: %clang -mvsx -E -dM %s -o - 2>&1 \
4009 // RUN: -target powerpc-unknown-linux \
4010 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_PPC_VSX_M32
4011 // CHECK_PPC_VSX_M32: #define __ALTIVEC__ 1
4012 // CHECK_PPC_VSX_M32: #define __VSX__ 1
4014 // RUN: %clang -mvsx -E -dM %s -o - 2>&1 \
4015 // RUN: -target powerpc64-unknown-linux \
4016 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_PPC_VSX_M64
4017 // CHECK_PPC_VSX_M64: #define __VSX__ 1
4019 // RUN: %clang -mpower8-vector -E -dM %s -o - 2>&1 \
4020 // RUN: -target powerpc64-unknown-linux \
4021 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_PPC_POWER8_VECTOR_M64
4022 // CHECK_PPC_POWER8_VECTOR_M64: #define __POWER8_VECTOR__ 1
4024 // RUN: %clang -mpower9-vector -E -dM %s -o - 2>&1 \
4025 // RUN: -target powerpc64-unknown-linux \
4026 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_PPC_POWER9_VECTOR_M64
4027 // CHECK_PPC_POWER9_VECTOR_M64: #define __POWER9_VECTOR__ 1
4029 // RUN: %clang -mcrypto -E -dM %s -o - 2>&1 \
4030 // RUN: -target powerpc64-unknown-linux \
4031 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_PPC_CRYPTO_M64
4032 // CHECK_PPC_CRYPTO_M64: #define __CRYPTO__ 1
4034 // HTM is available on power8 or later which includes all of powerpc64le as an
4035 // ABI choice. Test that, the cpus, and the option.
4036 // RUN: %clang -mhtm -E -dM %s -o - 2>&1 \
4037 // RUN: -target powerpc64-unknown-linux \
4038 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_PPC_HTM
4039 // RUN: %clang -E -dM %s -o - 2>&1 \
4040 // RUN: -target powerpc64le-unknown-linux \
4041 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_PPC_HTM
4042 // RUN: %clang -mcpu=pwr8 -E -dM %s -o - 2>&1 \
4043 // RUN: -target powerpc64-unknown-linux \
4044 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_PPC_HTM
4045 // RUN: %clang -mcpu=pwr9 -E -dM %s -o - 2>&1 \
4046 // RUN: -target powerpc64-unknown-linux \
4047 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_PPC_HTM
4048 // CHECK_PPC_HTM: #define __HTM__ 1
4050 // RUN: %clang -mcpu=ppc64 -E -dM %s -o - 2>&1 \
4051 // RUN: -target powerpc64-unknown-unknown \
4052 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_PPC_GCC_ATOMICS
4053 // RUN: %clang -mcpu=pwr8 -E -dM %s -o - 2>&1 \
4054 // RUN: -target powerpc64-unknown-unknown \
4055 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_PPC_GCC_ATOMICS
4056 // RUN: %clang -E -dM %s -o - 2>&1 \
4057 // RUN: -target powerpc64le-unknown-linux \
4058 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_PPC_GCC_ATOMICS
4059 // CHECK_PPC_GCC_ATOMICS: #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1
4060 // CHECK_PPC_GCC_ATOMICS: #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 1
4061 // CHECK_PPC_GCC_ATOMICS: #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1
4062 // CHECK_PPC_GCC_ATOMICS: #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 1
4064 // End PPC/GCC/Linux tests ------------------
4066 // Begin Sparc/GCC/Linux tests ----------------
4068 // RUN: %clang -E -dM %s -o - 2>&1 \
4069 // RUN: -target sparc-unknown-linux \
4070 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_SPARC
4071 // CHECK_SPARC: #define __BIG_ENDIAN__ 1
4072 // CHECK_SPARC: #define __sparc 1
4073 // CHECK_SPARC: #define __sparc__ 1
4074 // CHECK_SPARC-NOT: #define __sparcv9 1
4075 // CHECK_SPARC-NOT: #define __sparcv9__ 1
4076 // CHECK_SPARC: #define __sparcv8 1
4077 // CHECK_SPARC-NOT: #define __sparcv9 1
4078 // CHECK_SPARC-NOT: #define __sparcv9__ 1
4080 // RUN: %clang -mcpu=v9 -E -dM %s -o - 2>&1 \
4081 // RUN: -target sparc-unknown-linux \
4082 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_SPARC-V9
4083 // CHECK_SPARC-V9-NOT: #define __sparcv8 1
4084 // CHECK_SPARC-V9-NOT: #define __sparcv8__ 1
4085 // CHECK_SPARC-V9: #define __sparc_v9__ 1
4086 // CHECK_SPARC-V9-NOT: #define __sparcv9 1
4087 // CHECK_SPARC-V9-NOT: #define __sparcv9__ 1
4089 // RUN: %clang -E -dM %s -o - 2>&1 \
4090 // RUN: -target sparc-sun-solaris \
4091 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_SPARC_SOLARIS_GCC_ATOMICS
4092 // CHECK_SPARC_SOLARIS_GCC_ATOMICS: #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1
4093 // CHECK_SPARC_SOLARIS_GCC_ATOMICS: #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 1
4094 // CHECK_SPARC_SOLARIS_GCC_ATOMICS: #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1
4095 // CHECK_SPARC_SOLARIS_GCC_ATOMICS: #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 1
4097 // RUN: %clang -mcpu=v8 -E -dM %s -o - 2>&1 \
4098 // RUN: -target sparc-sun-solaris \
4099 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_SPARC_SOLARIS_GCC_ATOMICS-V8
4100 // CHECK_SPARC_SOLARIS_GCC_ATOMICS-V8-NOT: #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1
4101 // CHECK_SPARC_SOLARIS_GCC_ATOMICS-V8-NOT: #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 1
4102 // CHECK_SPARC_SOLARIS_GCC_ATOMICS-V8-NOT: #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1
4103 // CHECK_SPARC_SOLARIS_GCC_ATOMICS-V8-NOT: #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 1
4105 // RUN: %clang -E -dM %s -o - 2>&1 \
4106 // RUN: -target sparcel-unknown-linux \
4107 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_SPARCEL
4108 // CHECK_SPARCEL: #define __LITTLE_ENDIAN__ 1
4109 // CHECK_SPARCEL: #define __sparc 1
4110 // CHECK_SPARCEL: #define __sparc__ 1
4111 // CHECK_SPARCEL: #define __sparcv8 1
4113 // RUN: %clang -E -dM %s -o - 2>&1 \
4114 // RUN: -target sparcv9-unknown-linux \
4115 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_SPARCV9
4116 // CHECK_SPARCV9: #define __BIG_ENDIAN__ 1
4117 // CHECK_SPARCV9: #define __sparc 1
4118 // CHECK_SPARCV9: #define __sparc64__ 1
4119 // CHECK_SPARCV9: #define __sparc__ 1
4120 // CHECK_SPARCV9: #define __sparc_v9__ 1
4121 // CHECK_SPARCV9: #define __sparcv9 1
4122 // CHECK_SPARCV9: #define __sparcv9__ 1
4124 // RUN: %clang -E -dM %s -o - 2>&1 \
4125 // RUN: -target sparcv9-unknown-linux \
4126 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_SPARCV9_GCC_ATOMICS
4127 // CHECK_SPARCV9_GCC_ATOMICS: #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1
4128 // CHECK_SPARCV9_GCC_ATOMICS: #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 1
4129 // CHECK_SPARCV9_GCC_ATOMICS: #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1
4130 // CHECK_SPARCV9_GCC_ATOMICS: #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 1
4132 // Begin SystemZ/GCC/Linux tests ----------------
4134 // RUN: %clang -march=arch8 -E -dM %s -o - 2>&1 \
4135 // RUN: -target s390x-unknown-linux \
4136 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_SYSTEMZ_ARCH8
4137 // RUN: %clang -march=z10 -E -dM %s -o - 2>&1 \
4138 // RUN: -target s390x-unknown-linux \
4139 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_SYSTEMZ_ARCH8
4140 // CHECK_SYSTEMZ_ARCH8: #define __ARCH__ 8
4141 // CHECK_SYSTEMZ_ARCH8: #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1
4142 // CHECK_SYSTEMZ_ARCH8: #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 1
4143 // CHECK_SYSTEMZ_ARCH8: #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1
4144 // CHECK_SYSTEMZ_ARCH8: #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 1
4145 // CHECK_SYSTEMZ_ARCH8: #define __LONG_DOUBLE_128__ 1
4146 // CHECK_SYSTEMZ_ARCH8: #define __s390__ 1
4147 // CHECK_SYSTEMZ_ARCH8: #define __s390x__ 1
4148 // CHECK_SYSTEMZ_ARCH8: #define __zarch__ 1
4150 // RUN: %clang -march=arch9 -E -dM %s -o - 2>&1 \
4151 // RUN: -target s390x-unknown-linux \
4152 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_SYSTEMZ_ARCH9
4153 // RUN: %clang -march=z196 -E -dM %s -o - 2>&1 \
4154 // RUN: -target s390x-unknown-linux \
4155 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_SYSTEMZ_ARCH9
4156 // CHECK_SYSTEMZ_ARCH9: #define __ARCH__ 9
4157 // CHECK_SYSTEMZ_ARCH9: #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1
4158 // CHECK_SYSTEMZ_ARCH9: #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 1
4159 // CHECK_SYSTEMZ_ARCH9: #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1
4160 // CHECK_SYSTEMZ_ARCH9: #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 1
4161 // CHECK_SYSTEMZ_ARCH9: #define __LONG_DOUBLE_128__ 1
4162 // CHECK_SYSTEMZ_ARCH9: #define __s390__ 1
4163 // CHECK_SYSTEMZ_ARCH9: #define __s390x__ 1
4164 // CHECK_SYSTEMZ_ARCH9: #define __zarch__ 1
4166 // RUN: %clang -march=arch10 -E -dM %s -o - 2>&1 \
4167 // RUN: -target s390x-unknown-linux \
4168 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_SYSTEMZ_ARCH10
4169 // RUN: %clang -march=zEC12 -E -dM %s -o - 2>&1 \
4170 // RUN: -target s390x-unknown-linux \
4171 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_SYSTEMZ_ARCH10
4172 // CHECK_SYSTEMZ_ARCH10: #define __ARCH__ 10
4173 // CHECK_SYSTEMZ_ARCH10: #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1
4174 // CHECK_SYSTEMZ_ARCH10: #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 1
4175 // CHECK_SYSTEMZ_ARCH10: #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1
4176 // CHECK_SYSTEMZ_ARCH10: #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 1
4177 // CHECK_SYSTEMZ_ARCH10: #define __HTM__ 1
4178 // CHECK_SYSTEMZ_ARCH10: #define __LONG_DOUBLE_128__ 1
4179 // CHECK_SYSTEMZ_ARCH10: #define __s390__ 1
4180 // CHECK_SYSTEMZ_ARCH10: #define __s390x__ 1
4181 // CHECK_SYSTEMZ_ARCH10: #define __zarch__ 1
4183 // RUN: %clang -march=arch11 -E -dM %s -o - 2>&1 \
4184 // RUN: -target s390x-unknown-linux \
4185 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_SYSTEMZ_ARCH11
4186 // RUN: %clang -march=z13 -E -dM %s -o - 2>&1 \
4187 // RUN: -target s390x-unknown-linux \
4188 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_SYSTEMZ_ARCH11
4189 // CHECK_SYSTEMZ_ARCH11: #define __ARCH__ 11
4190 // CHECK_SYSTEMZ_ARCH11: #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1
4191 // CHECK_SYSTEMZ_ARCH11: #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 1
4192 // CHECK_SYSTEMZ_ARCH11: #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1
4193 // CHECK_SYSTEMZ_ARCH11: #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 1
4194 // CHECK_SYSTEMZ_ARCH11: #define __HTM__ 1
4195 // CHECK_SYSTEMZ_ARCH11: #define __LONG_DOUBLE_128__ 1
4196 // CHECK_SYSTEMZ_ARCH11: #define __VX__ 1
4197 // CHECK_SYSTEMZ_ARCH11: #define __s390__ 1
4198 // CHECK_SYSTEMZ_ARCH11: #define __s390x__ 1
4199 // CHECK_SYSTEMZ_ARCH11: #define __zarch__ 1
4201 // RUN: %clang -march=arch12 -E -dM %s -o - 2>&1 \
4202 // RUN: -target s390x-unknown-linux \
4203 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_SYSTEMZ_ARCH12
4204 // RUN: %clang -march=z14 -E -dM %s -o - 2>&1 \
4205 // RUN: -target s390x-unknown-linux \
4206 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_SYSTEMZ_ARCH12
4207 // CHECK_SYSTEMZ_ARCH12: #define __ARCH__ 12
4208 // CHECK_SYSTEMZ_ARCH12: #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1
4209 // CHECK_SYSTEMZ_ARCH12: #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 1
4210 // CHECK_SYSTEMZ_ARCH12: #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1
4211 // CHECK_SYSTEMZ_ARCH12: #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 1
4212 // CHECK_SYSTEMZ_ARCH12: #define __HTM__ 1
4213 // CHECK_SYSTEMZ_ARCH12: #define __LONG_DOUBLE_128__ 1
4214 // CHECK_SYSTEMZ_ARCH12: #define __VX__ 1
4215 // CHECK_SYSTEMZ_ARCH12: #define __s390__ 1
4216 // CHECK_SYSTEMZ_ARCH12: #define __s390x__ 1
4217 // CHECK_SYSTEMZ_ARCH12: #define __zarch__ 1
4219 // RUN: %clang -march=arch13 -E -dM %s -o - 2>&1 \
4220 // RUN: -target s390x-unknown-linux \
4221 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_SYSTEMZ_ARCH13
4222 // RUN: %clang -march=z15 -E -dM %s -o - 2>&1 \
4223 // RUN: -target s390x-unknown-linux \
4224 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_SYSTEMZ_ARCH13
4225 // CHECK_SYSTEMZ_ARCH13: #define __ARCH__ 13
4226 // CHECK_SYSTEMZ_ARCH13: #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1
4227 // CHECK_SYSTEMZ_ARCH13: #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 1
4228 // CHECK_SYSTEMZ_ARCH13: #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1
4229 // CHECK_SYSTEMZ_ARCH13: #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 1
4230 // CHECK_SYSTEMZ_ARCH13: #define __HTM__ 1
4231 // CHECK_SYSTEMZ_ARCH13: #define __LONG_DOUBLE_128__ 1
4232 // CHECK_SYSTEMZ_ARCH13: #define __VX__ 1
4233 // CHECK_SYSTEMZ_ARCH13: #define __s390__ 1
4234 // CHECK_SYSTEMZ_ARCH13: #define __s390x__ 1
4235 // CHECK_SYSTEMZ_ARCH13: #define __zarch__ 1
4237 // RUN: %clang -march=arch14 -E -dM %s -o - 2>&1 \
4238 // RUN: -target s390x-unknown-linux \
4239 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_SYSTEMZ_ARCH14
4240 // RUN: %clang -march=z16 -E -dM %s -o - 2>&1 \
4241 // RUN: -target s390x-unknown-linux \
4242 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_SYSTEMZ_ARCH14
4243 // CHECK_SYSTEMZ_ARCH14: #define __ARCH__ 14
4244 // CHECK_SYSTEMZ_ARCH14: #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1
4245 // CHECK_SYSTEMZ_ARCH14: #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 1
4246 // CHECK_SYSTEMZ_ARCH14: #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1
4247 // CHECK_SYSTEMZ_ARCH14: #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 1
4248 // CHECK_SYSTEMZ_ARCH14: #define __HTM__ 1
4249 // CHECK_SYSTEMZ_ARCH14: #define __LONG_DOUBLE_128__ 1
4250 // CHECK_SYSTEMZ_ARCH14: #define __VX__ 1
4251 // CHECK_SYSTEMZ_ARCH14: #define __s390__ 1
4252 // CHECK_SYSTEMZ_ARCH14: #define __s390x__ 1
4253 // CHECK_SYSTEMZ_ARCH14: #define __zarch__ 1
4255 // RUN: %clang -mhtm -E -dM %s -o - 2>&1 \
4256 // RUN: -target s390x-unknown-linux \
4257 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_SYSTEMZ_HTM
4258 // CHECK_SYSTEMZ_HTM: #define __HTM__ 1
4260 // RUN: %clang -mvx -E -dM %s -o - 2>&1 \
4261 // RUN: -target s390x-unknown-linux \
4262 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_SYSTEMZ_VX
4263 // CHECK_SYSTEMZ_VX: #define __VX__ 1
4265 // RUN: %clang -fzvector -E -dM %s -o - 2>&1 \
4266 // RUN: -target s390x-unknown-linux \
4267 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_SYSTEMZ_ZVECTOR
4268 // RUN: %clang -mzvector -E -dM %s -o - 2>&1 \
4269 // RUN: -target s390x-unknown-linux \
4270 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_SYSTEMZ_ZVECTOR
4271 // CHECK_SYSTEMZ_ZVECTOR: #define __VEC__ 10304
4273 // Begin amdgcn tests ----------------
4275 // RUN: %clang -march=amdgcn -E -dM %s -o - 2>&1 \
4276 // RUN: -target amdgcn-unknown-unknown \
4277 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_AMDGCN
4278 // CHECK_AMDGCN: #define __AMDGCN__ 1
4279 // CHECK_AMDGCN: #define __HAS_FMAF__ 1
4280 // CHECK_AMDGCN: #define __HAS_FP64__ 1
4281 // CHECK_AMDGCN: #define __HAS_LDEXPF__ 1
4283 // Begin r600 tests ----------------
4285 // RUN: %clang -march=amdgcn -E -dM %s -o - 2>&1 \
4286 // RUN: -target r600-unknown-unknown \
4287 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_R600
4288 // CHECK_R600: #define __R600__ 1
4289 // CHECK_R600-NOT: #define __HAS_FMAF__ 1
4291 // RUN: %clang -march=amdgcn -mcpu=cypress -E -dM %s -o - 2>&1 \
4292 // RUN: -target r600-unknown-unknown \
4293 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_R600_FP64
4294 // CHECK_R600_FP64-DAG: #define __R600__ 1
4295 // CHECK_R600_FP64-DAG: #define __HAS_FMAF__ 1
4297 // Begin avr tests ----------------
4299 // RUN: %clang --target=avr -mmcu=atmega328 -E -dM %s -o - 2>&1 \
4300 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK-AVR0
4301 // CHECK-AVR0: #define __AVR_ARCH__ 5
4302 // CHECK-AVR0: #define __AVR_ATmega328__ 1
4303 // CHECK-AVR0: #define __flash __attribute__((__address_space__(1)))
4304 // RUN: %clang --target=avr -mmcu=atmega2560 -E -dM %s -o - 2>&1 \
4305 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK-AVR1
4306 // CHECK-AVR1: #define __AVR_ARCH__ 6
4307 // CHECK-AVR1: #define __AVR_ATmega2560__ 1
4308 // CHECK-AVR1: #define __flash __attribute__((__address_space__(1)))
4309 // CHECK-AVR1: #define __flash1 __attribute__((__address_space__(2)))
4310 // CHECK-AVR1: #define __flash2 __attribute__((__address_space__(3)))
4311 // CHECK-AVR1: #define __flash3 __attribute__((__address_space__(4)))
4313 // Begin M68k tests ----------------
4315 // RUN: %clang -mcpu=68000 -E -dM %s -o - 2>&1 \
4316 // RUN: -target m68k-unknown-linux \
4317 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_M68K_68000_ATOMICS
4318 // RUN: %clang -mcpu=68010 -E -dM %s -o - 2>&1 \
4319 // RUN: -target m68k-unknown-linux \
4320 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_M68K_68000_ATOMICS
4321 // RUN: %clang -mcpu=68020 -E -dM %s -o - 2>&1 \
4322 // RUN: -target m68k-unknown-linux \
4323 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_M68K_68020_ATOMICS
4325 // CHECK_M68K_68000_ATOMICS-NOT: #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP
4326 // CHECK_M68K_68020_ATOMICS: #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1
4327 // CHECK_M68K_68020_ATOMICS: #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 1
4328 // CHECK_M68K_68020_ATOMICS: #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1
4330 // Begin Hexagon tests ----------------
4332 // RUN: %clang -E -dM %s -o - 2>&1 \
4333 // RUN: --target=hexagon-unknown-linux \
4334 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_HEXAGON_ATOMICS
4336 // CHECK_HEXAGON_ATOMICS: #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1
4337 // CHECK_HEXAGON_ATOMICS: #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 1
4338 // CHECK_HEXAGON_ATOMICS: #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1
4339 // CHECK_HEXAGON_ATOMICS: #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 1
4341 // Begin VE tests ----------------
4343 // RUN: %clang -E -dM %s -o - 2>&1 \
4344 // RUN: --target=ve-unknown-linux \
4345 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_VE_ATOMICS
4347 // CHECK_VE_ATOMICS: #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1
4348 // CHECK_VE_ATOMICS: #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 1
4349 // CHECK_VE_ATOMICS: #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1
4350 // CHECK_VE_ATOMICS: #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 1
4352 // Begin WebAssembly tests ----------------
4354 // RUN: %clang -E -dM %s -o - 2>&1 \
4355 // RUN: --target=wasm32-unknown-unknown \
4356 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_WASM_ATOMICS
4357 // RUN: %clang -E -dM %s -o - 2>&1 \
4358 // RUN: --target=wasm64-unknown-unknown \
4359 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_WASM_ATOMICS
4361 // CHECK_WASM_ATOMICS: #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1
4362 // CHECK_WASM_ATOMICS: #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 1
4363 // CHECK_WASM_ATOMICS: #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1
4364 // CHECK_WASM_ATOMICS: #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 1
4366 // Begin LoongArch tests ----------------
4368 // RUN: %clang -E -dM %s -o - 2>&1 \
4369 // RUN: --target=loongarch32-unknown-linux-gnu \
4370 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_LA32_ATOMICS
4371 // CHECK_LA32_ATOMICS: #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1
4372 // CHECK_LA32_ATOMICS: #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 1
4373 // CHECK_LA32_ATOMICS: #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1
4375 // RUN: %clang -E -dM %s -o - 2>&1 \
4376 // RUN: --target=loongarch64-unknown-linux-gnu \
4377 // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_LA64_ATOMICS
4378 // CHECK_LA64_ATOMICS: #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1
4379 // CHECK_LA64_ATOMICS: #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 1
4380 // CHECK_LA64_ATOMICS: #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1
4381 // CHECK_LA64_ATOMICS: #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 1