1 // RUN: %clang -target i386-unknown-unknown -march=core2 -msse4 -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=SSE4 %s
2 
3 // SSE4: #define __SSE2_MATH__ 1
4 // SSE4: #define __SSE2__ 1
5 // SSE4: #define __SSE3__ 1
6 // SSE4: #define __SSE4_1__ 1
7 // SSE4: #define __SSE4_2__ 1
8 // SSE4: #define __SSE_MATH__ 1
9 // SSE4: #define __SSE__ 1
10 // SSE4: #define __SSSE3__ 1
11 
12 // RUN: %clang -target i386-unknown-unknown -march=core2 -msse4.1 -mno-sse4 -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=NOSSE4 %s
13 
14 // NOSSE4-NOT: #define __SSE4_1__ 1
15 
16 // RUN: %clang -target i386-unknown-unknown -march=core2 -msse4 -mno-sse2 -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=SSE %s
17 
18 // SSE-NOT: #define __SSE2_MATH__ 1
19 // SSE-NOT: #define __SSE2__ 1
20 // SSE-NOT: #define __SSE3__ 1
21 // SSE-NOT: #define __SSE4_1__ 1
22 // SSE-NOT: #define __SSE4_2__ 1
23 // SSE: #define __SSE_MATH__ 1
24 // SSE: #define __SSE__ 1
25 // SSE-NOT: #define __SSSE3__ 1
26 
27 // RUN: %clang -target i386-unknown-unknown -march=pentium-m -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=SSE2 %s
28 
29 // SSE2: #define __SSE2_MATH__ 1
30 // SSE2: #define __SSE2__ 1
31 // SSE2-NOT: #define __SSE3__ 1
32 // SSE2-NOT: #define __SSE4_1__ 1
33 // SSE2-NOT: #define __SSE4_2__ 1
34 // SSE2: #define __SSE_MATH__ 1
35 // SSE2: #define __SSE__ 1
36 // SSE2-NOT: #define __SSSE3__ 1
37 
38 // RUN: %clang -target i386-unknown-unknown -march=pentium-m -mno-sse -mavx -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=AVX %s
39 
40 // AVX: #define __AVX__ 1
41 // AVX: #define __SSE2_MATH__ 1
42 // AVX: #define __SSE2__ 1
43 // AVX: #define __SSE3__ 1
44 // AVX: #define __SSE4_1__ 1
45 // AVX: #define __SSE4_2__ 1
46 // AVX: #define __SSE_MATH__ 1
47 // AVX: #define __SSE__ 1
48 // AVX: #define __SSSE3__ 1
49 
50 // RUN: %clang -target i386-unknown-unknown -march=pentium-m -mxop -mno-avx -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=SSE4A %s
51 
52 // SSE4A: #define __SSE2_MATH__ 1
53 // SSE4A: #define __SSE2__ 1
54 // SSE4A: #define __SSE3__ 1
55 // SSE4A: #define __SSE4A__ 1
56 // SSE4A: #define __SSE4_1__ 1
57 // SSE4A: #define __SSE4_2__ 1
58 // SSE4A: #define __SSE_MATH__ 1
59 // SSE4A: #define __SSE__ 1
60 // SSE4A: #define __SSSE3__ 1
61 
62 // RUN: %clang -target i386-unknown-unknown -march=atom -mavx512f -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=AVX512F %s
63 
64 // AVX512F: #define __AVX2__ 1
65 // AVX512F: #define __AVX512F__ 1
66 // AVX512F: #define __AVX__ 1
67 // AVX512F: #define __SSE2_MATH__ 1
68 // AVX512F: #define __SSE2__ 1
69 // AVX512F: #define __SSE3__ 1
70 // AVX512F: #define __SSE4_1__ 1
71 // AVX512F: #define __SSE4_2__ 1
72 // AVX512F: #define __SSE_MATH__ 1
73 // AVX512F: #define __SSE__ 1
74 // AVX512F: #define __SSSE3__ 1
75 
76 // RUN: %clang -target i386-unknown-unknown -march=atom -mavx512cd -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=AVX512CD %s
77 
78 // AVX512CD: #define __AVX2__ 1
79 // AVX512CD: #define __AVX512CD__ 1
80 // AVX512CD: #define __AVX512F__ 1
81 // AVX512CD: #define __AVX__ 1
82 // AVX512CD: #define __SSE2_MATH__ 1
83 // AVX512CD: #define __SSE2__ 1
84 // AVX512CD: #define __SSE3__ 1
85 // AVX512CD: #define __SSE4_1__ 1
86 // AVX512CD: #define __SSE4_2__ 1
87 // AVX512CD: #define __SSE_MATH__ 1
88 // AVX512CD: #define __SSE__ 1
89 // AVX512CD: #define __SSSE3__ 1
90 
91 // RUN: %clang -target i386-unknown-unknown -march=atom -mavx512er -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=AVX512ER %s
92 
93 // AVX512ER: #define __AVX2__ 1
94 // AVX512ER: #define __AVX512ER__ 1
95 // AVX512ER: #define __AVX512F__ 1
96 // AVX512ER: #define __AVX__ 1
97 // AVX512ER: #define __SSE2_MATH__ 1
98 // AVX512ER: #define __SSE2__ 1
99 // AVX512ER: #define __SSE3__ 1
100 // AVX512ER: #define __SSE4_1__ 1
101 // AVX512ER: #define __SSE4_2__ 1
102 // AVX512ER: #define __SSE_MATH__ 1
103 // AVX512ER: #define __SSE__ 1
104 // AVX512ER: #define __SSSE3__ 1
105 
106 // RUN: %clang -target i386-unknown-unknown -march=atom -mavx512pf -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=AVX512PF %s
107 
108 // AVX512PF: #define __AVX2__ 1
109 // AVX512PF: #define __AVX512F__ 1
110 // AVX512PF: #define __AVX512PF__ 1
111 // AVX512PF: #define __AVX__ 1
112 // AVX512PF: #define __SSE2_MATH__ 1
113 // AVX512PF: #define __SSE2__ 1
114 // AVX512PF: #define __SSE3__ 1
115 // AVX512PF: #define __SSE4_1__ 1
116 // AVX512PF: #define __SSE4_2__ 1
117 // AVX512PF: #define __SSE_MATH__ 1
118 // AVX512PF: #define __SSE__ 1
119 // AVX512PF: #define __SSSE3__ 1
120 
121 // RUN: %clang -target i386-unknown-unknown -march=atom -mavx512dq -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=AVX512DQ %s
122 
123 // AVX512DQ: #define __AVX2__ 1
124 // AVX512DQ: #define __AVX512DQ__ 1
125 // AVX512DQ: #define __AVX512F__ 1
126 // AVX512DQ: #define __AVX__ 1
127 // AVX512DQ: #define __SSE2_MATH__ 1
128 // AVX512DQ: #define __SSE2__ 1
129 // AVX512DQ: #define __SSE3__ 1
130 // AVX512DQ: #define __SSE4_1__ 1
131 // AVX512DQ: #define __SSE4_2__ 1
132 // AVX512DQ: #define __SSE_MATH__ 1
133 // AVX512DQ: #define __SSE__ 1
134 // AVX512DQ: #define __SSSE3__ 1
135 
136 // RUN: %clang -target i386-unknown-unknown -march=atom -mavx512bw -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=AVX512BW %s
137 
138 // AVX512BW: #define __AVX2__ 1
139 // AVX512BW: #define __AVX512BW__ 1
140 // AVX512BW: #define __AVX512F__ 1
141 // AVX512BW: #define __AVX__ 1
142 // AVX512BW: #define __SSE2_MATH__ 1
143 // AVX512BW: #define __SSE2__ 1
144 // AVX512BW: #define __SSE3__ 1
145 // AVX512BW: #define __SSE4_1__ 1
146 // AVX512BW: #define __SSE4_2__ 1
147 // AVX512BW: #define __SSE_MATH__ 1
148 // AVX512BW: #define __SSE__ 1
149 // AVX512BW: #define __SSSE3__ 1
150 
151 // RUN: %clang -target i386-unknown-unknown -march=atom -mavx512vl -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=AVX512VL %s
152 
153 // AVX512VL: #define __AVX2__ 1
154 // AVX512VL: #define __AVX512F__ 1
155 // AVX512VL: #define __AVX512VL__ 1
156 // AVX512VL: #define __AVX__ 1
157 // AVX512VL: #define __SSE2_MATH__ 1
158 // AVX512VL: #define __SSE2__ 1
159 // AVX512VL: #define __SSE3__ 1
160 // AVX512VL: #define __SSE4_1__ 1
161 // AVX512VL: #define __SSE4_2__ 1
162 // AVX512VL: #define __SSE_MATH__ 1
163 // AVX512VL: #define __SSE__ 1
164 // AVX512VL: #define __SSSE3__ 1
165 
166 // RUN: %clang -target i386-unknown-unknown -march=atom -mavx512pf -mno-avx512f -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=AVX512F2 %s
167 
168 // AVX512F2: #define __AVX2__ 1
169 // AVX512F2-NOT: #define __AVX512F__ 1
170 // AVX512F2-NOT: #define __AVX512PF__ 1
171 // AVX512F2: #define __AVX__ 1
172 // AVX512F2: #define __SSE2_MATH__ 1
173 // AVX512F2: #define __SSE2__ 1
174 // AVX512F2: #define __SSE3__ 1
175 // AVX512F2: #define __SSE4_1__ 1
176 // AVX512F2: #define __SSE4_2__ 1
177 // AVX512F2: #define __SSE_MATH__ 1
178 // AVX512F2: #define __SSE__ 1
179 // AVX512F2: #define __SSSE3__ 1
180 
181 // RUN: %clang -target i386-unknown-unknown -march=atom -mavx512ifma -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=AVX512IFMA %s
182 
183 // AVX512IFMA: #define __AVX2__ 1
184 // AVX512IFMA: #define __AVX512F__ 1
185 // AVX512IFMA: #define __AVX512IFMA__ 1
186 // AVX512IFMA: #define __AVX__ 1
187 // AVX512IFMA: #define __SSE2_MATH__ 1
188 // AVX512IFMA: #define __SSE2__ 1
189 // AVX512IFMA: #define __SSE3__ 1
190 // AVX512IFMA: #define __SSE4_1__ 1
191 // AVX512IFMA: #define __SSE4_2__ 1
192 // AVX512IFMA: #define __SSE_MATH__ 1
193 // AVX512IFMA: #define __SSE__ 1
194 // AVX512IFMA: #define __SSSE3__ 1
195 
196 // RUN: %clang -target i386-unknown-unknown -march=atom -mavx512vbmi -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=AVX512VBMI %s
197 
198 // AVX512VBMI: #define __AVX2__ 1
199 // AVX512VBMI: #define __AVX512BW__ 1
200 // AVX512VBMI: #define __AVX512F__ 1
201 // AVX512VBMI: #define __AVX512VBMI__ 1
202 // AVX512VBMI: #define __AVX__ 1
203 // AVX512VBMI: #define __SSE2_MATH__ 1
204 // AVX512VBMI: #define __SSE2__ 1
205 // AVX512VBMI: #define __SSE3__ 1
206 // AVX512VBMI: #define __SSE4_1__ 1
207 // AVX512VBMI: #define __SSE4_2__ 1
208 // AVX512VBMI: #define __SSE_MATH__ 1
209 // AVX512VBMI: #define __SSE__ 1
210 // AVX512VBMI: #define __SSSE3__ 1
211 
212 // RUN: %clang -target i386-unknown-unknown -march=atom -mavx512bitalg -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=AVX512BITALG %s
213 
214 // AVX512BITALG: #define __AVX2__ 1
215 // AVX512BITALG: #define __AVX512BITALG__ 1
216 // AVX512BITALG: #define __AVX512BW__ 1
217 // AVX512BITALG: #define __AVX512F__ 1
218 // AVX512BITALG: #define __AVX__ 1
219 // AVX512BITALG: #define __SSE2_MATH__ 1
220 // AVX512BITALG: #define __SSE2__ 1
221 // AVX512BITALG: #define __SSE3__ 1
222 // AVX512BITALG: #define __SSE4_1__ 1
223 // AVX512BITALG: #define __SSE4_2__ 1
224 // AVX512BITALG: #define __SSE_MATH__ 1
225 // AVX512BITALG: #define __SSE__ 1
226 // AVX512BITALG: #define __SSSE3__ 1
227 
228 
229 // RUN: %clang -target i386-unknown-unknown -march=atom -mavx512vbmi -mno-avx512bw -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=AVX512VBMINOAVX512BW %s
230 
231 // AVX512VBMINOAVX512BW-NOT: #define __AVX512BW__ 1
232 // AVX512VBMINOAVX512BW-NOT: #define __AVX512VBMI__ 1
233 
234 // RUN: %clang -target i386-unknown-unknown -march=atom -mavx512vbmi2 -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=AVX512VBMI2 %s
235 
236 // AVX512VBMI2: #define __AVX2__ 1
237 // AVX512VBMI2: #define __AVX512BW__ 1
238 // AVX512VBMI2: #define __AVX512F__ 1
239 // AVX512VBMI2: #define __AVX512VBMI2__ 1
240 // AVX512VBMI2: #define __AVX__ 1
241 // AVX512VBMI2: #define __SSE2_MATH__ 1
242 // AVX512VBMI2: #define __SSE2__ 1
243 // AVX512VBMI2: #define __SSE3__ 1
244 // AVX512VBMI2: #define __SSE4_1__ 1
245 // AVX512VBMI2: #define __SSE4_2__ 1
246 // AVX512VBMI2: #define __SSE_MATH__ 1
247 // AVX512VBMI2: #define __SSE__ 1
248 // AVX512VBMI2: #define __SSSE3__ 1
249 
250 // RUN: %clang -target i386-unknown-unknown -march=atom -mavx512vbmi2 -mno-avx512bw -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=AVX512VBMI2NOAVX512BW %s
251 
252 // AVX512VBMI2NOAVX512BW-NOT: #define __AVX512BW__ 1
253 // AVX512VBMI2NOAVX512BW-NOT: #define __AVX512VBMI2__ 1
254 
255 // RUN: %clang -target i386-unknown-unknown -march=atom -mavx512bitalg -mno-avx512bw -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=AVX512BITALGNOAVX512BW %s
256 
257 // AVX512BITALGNOAVX512BW-NOT: #define __AVX512BITALG__ 1
258 // AVX512BITALGNOAVX512BW-NOT: #define __AVX512BW__ 1
259 
260 // RUN: %clang -target i386-unknown-unknown -march=atom -msse4.2 -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=SSE42POPCNT %s
261 
262 // SSE42POPCNT: #define __POPCNT__ 1
263 
264 // RUN: %clang -target i386-unknown-unknown -march=atom -mno-popcnt -msse4.2 -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=SSE42NOPOPCNT %s
265 
266 // SSE42NOPOPCNT-NOT: #define __POPCNT__ 1
267 
268 // RUN: %clang -target i386-unknown-unknown -march=atom -mpopcnt -mno-sse4.2 -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=NOSSE42POPCNT %s
269 
270 // NOSSE42POPCNT: #define __POPCNT__ 1
271 
272 // RUN: %clang -target i386-unknown-unknown -march=nehalem -mno-sse4.2 -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=CPUPOPCNT %s
273 // RUN: %clang -target i386-unknown-unknown -march=silvermont -mno-sse4.2 -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=CPUPOPCNT %s
274 // RUN: %clang -target i386-unknown-unknown -march=knl -mno-sse4.2 -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=CPUPOPCNT %s
275 
276 // CPUPOPCNT: #define __POPCNT__ 1
277 
278 // RUN: %clang -target i386-unknown-unknown -march=pentium -msse -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=SSEMMX %s
279 
280 // SSEMMX: #define __MMX__ 1
281 
282 // RUN: %clang -target i386-unknown-unknown -march=pentium -msse -mno-sse -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=SSENOSSEMMX %s
283 
284 // SSENOSSEMMX-NOT: #define __MMX__ 1
285 
286 // RUN: %clang -target i386-unknown-unknown -march=pentium -msse -mno-mmx -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=SSENOMMX %s
287 
288 // SSENOMMX-NOT: #define __MMX__ 1
289 
290 // RUN: %clang -target i386-unknown-unknown -march=pentium3 -mno-sse -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=MARCHMMXNOSSE %s
291 // RUN: %clang -target i386-unknown-unknown -march=atom -mno-sse -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=MARCHMMXNOSSE %s
292 // RUN: %clang -target i386-unknown-unknown -march=knl -mno-sse -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=MARCHMMXNOSSE %s
293 // RUN: %clang -target i386-unknown-unknown -march=btver1 -mno-sse -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=MARCHMMXNOSSE %s
294 // RUN: %clang -target i386-unknown-unknown -march=znver1 -mno-sse -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=MARCHMMXNOSSE %s
295 
296 // MARCHMMXNOSSE: #define __MMX__ 1
297 
298 // RUN: %clang -target i386-unknown-unknown -march=atom -mf16c -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=F16C %s
299 
300 // F16C: #define __AVX__ 1
301 // F16C: #define __F16C__ 1
302 
303 // RUN: %clang -target i386-unknown-unknown -march=atom -mf16c -mno-avx -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=F16CNOAVX %s
304 
305 // F16CNOAVX-NOT: #define __AVX__ 1
306 // F16CNOAVX-NOT: #define __F16C__ 1
307 
308 // RUN: %clang -target i386-unknown-unknown -march=pentiumpro -mpclmul -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=PCLMUL %s
309 
310 // PCLMUL: #define __PCLMUL__ 1
311 // PCLMUL: #define __SSE2__ 1
312 // PCLMUL-NOT: #define __SSE3__ 1
313 
314 // RUN: %clang -target i386-unknown-unknown -march=pentiumpro -mpclmul -mno-sse2 -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=PCLMULNOSSE2 %s
315 
316 // PCLMULNOSSE2-NOT: #define __PCLMUL__ 1
317 // PCLMULNOSSE2-NOT: #define __SSE2__ 1
318 // PCLMULNOSSE2-NOT: #define __SSE3__ 1
319 
320 // RUN: %clang -target i386-unknown-unknown -march=pentiumpro -maes -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=AES %s
321 
322 // AES: #define __AES__ 1
323 // AES: #define __SSE2__ 1
324 // AES-NOT: #define __SSE3__ 1
325 
326 // RUN: %clang -target i386-unknown-unknown -march=pentiumpro -maes -mno-sse2 -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=AESNOSSE2 %s
327 
328 // AESNOSSE2-NOT: #define __AES__ 1
329 // AESNOSSE2-NOT: #define __SSE2__ 1
330 // AESNOSSE2-NOT: #define __SSE3__ 1
331 
332 // RUN: %clang -target i386-unknown-unknown -march=pentiumpro -mlwp -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=LWP %s
333 
334 // LWP: #define __LWP__ 1
335 
336 // RUN: %clang -target i386-unknown-unknown -march=bdver1 -mno-lwp -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=NOLWP %s
337 
338 // NOLWP-NOT: #define __LWP__ 1
339 
340 // RUN: %clang -target i386-unknown-unknown -march=pentiumpro -msha -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=SHA %s
341 
342 // SHA: #define __SHA__ 1
343 // SHA: #define __SSE2__ 1
344 // SHA-NOT: #define __SSE3__ 1
345 
346 // RUN: %clang -target i386-unknown-unknown -march=pentiumpro -msha -mno-sha -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=SHANOSHA %s
347 
348 // SHANOSHA-NOT: #define __SHA__ 1
349 // SHANOSHA-NOT: #define __SSE2__ 1
350 
351 // RUN: %clang -target i386-unknown-unknown -march=pentiumpro -msha -mno-sse2 -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=SHANOSSE2 %s
352 
353 // SHANOSSE2-NOT: #define __SHA__ 1
354 // SHANOSSE2-NOT: #define __SSE2__ 1
355 // SHANOSSE2-NOT: #define __SSE3__ 1
356 
357 // RUN: %clang -target i386-unknown-unknown -march=atom -mtbm -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=TBM %s
358 
359 // TBM: #define __TBM__ 1
360 
361 // RUN: %clang -target i386-unknown-unknown -march=bdver2 -mno-tbm -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=NOTBM %s
362 
363 // NOTBM-NOT: #define __TBM__ 1
364 
365 // RUN: %clang -target i386-unknown-unknown -march=pentiumpro -mcx16 -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=MCX16-32 %s
366 
367 // MCX16-32-NOT: #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_16 1
368 
369 // RUN: %clang -target x86_64-unknown-unknown -march=x86-64 -mcx16 -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=MCX16-64 %s
370 
371 // MCX16-64: #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_16 1
372 
373 // RUN: %clang -target i386-unknown-unknown -march=atom -mprfchw -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=PRFCHW %s
374 
375 // PRFCHW: #define __PRFCHW__ 1
376 
377 // RUN: %clang -target i386-unknown-unknown -march=btver2 -mno-prfchw -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=NOPRFCHW %s
378 
379 // NOPRFCHW-NOT: #define __PRFCHW__ 1
380 
381 // RUN: %clang -target i386-unknown-unknown -march=atom -m3dnow -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=3DNOWPRFCHW %s
382 
383 // 3DNOWPRFCHW: #define __3dNOW__ 1
384 // 3DNOWPRFCHW-NOT: #define __PRFCHW__ 1
385 
386 // RUN: %clang -target i386-unknown-unknown -march=atom -mno-prfchw -m3dnow -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=3DNOWNOPRFCHW %s
387 
388 // 3DNOWNOPRFCHW: #define __3dNOW__ 1
389 // 3DNOWNOPRFCHW-NOT: #define __PRFCHW__ 1
390 
391 // RUN: %clang -target i386-unknown-unknown -march=atom -mprfchw -mno-3dnow -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=NO3DNOWPRFCHW %s
392 
393 // NO3DNOWPRFCHW: #define __PRFCHW__ 1
394 
395 // RUN: %clang -target i386-unknown-unknown -march=atom -madx -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=ADX %s
396 
397 // ADX: #define __ADX__ 1
398 
399 // RUN: %clang -target i386-unknown-unknown -mshstk -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=SHSTK %s
400 
401 // SHSTK: #define __SHSTK__ 1
402 
403 // RUN: %clang -target i386-unknown-unknown -march=atom -mrdseed -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=RDSEED %s
404 
405 // RDSEED: #define __RDSEED__ 1
406 
407 // RUN: %clang -target i386-unknown-unknown -march=atom -mxsave -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=XSAVE %s
408 
409 // XSAVE: #define __XSAVE__ 1
410 
411 // RUN: %clang -target i386-unknown-unknown -march=atom -mxsaveopt -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=XSAVEOPT %s
412 
413 // XSAVEOPT: #define __XSAVEOPT__ 1
414 // XSAVEOPT: #define __XSAVE__ 1
415 
416 // RUN: %clang -target i386-unknown-unknown -march=atom -mxsavec -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=XSAVEC %s
417 
418 // XSAVEC: #define __XSAVEC__ 1
419 // XSAVEC: #define __XSAVE__ 1
420 
421 // RUN: %clang -target i386-unknown-unknown -march=atom -mxsaves -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=XSAVES %s
422 
423 // XSAVES: #define __XSAVES__ 1
424 // XSAVES: #define __XSAVE__ 1
425 
426 // RUN: %clang -target i386-unknown-unknown -march=atom -mxsaveopt -mxsavec -mxsaves -mno-xsave -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=NOXSAVE %s
427 
428 // NOXSAVE-NOT: #define __XSAVEC__ 1
429 // NOXSAVE-NOT: #define __XSAVEOPT__ 1
430 // NOXSAVE-NOT: #define __XSAVES__ 1
431 // NOXSAVE-NOT: #define __XSAVE__ 1
432 
433 // RUN: %clang -target i386-unknown-unknown -march=atom -mclflushopt -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=CLFLUSHOPT %s
434 
435 // CLFLUSHOPT: #define __CLFLUSHOPT__ 1
436 
437 // RUN: %clang -target i386-unknown-unknown -march=atom -mvaes -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=VAES %s
438 
439 // VAES: #define __AES__ 1
440 // VAES: #define __VAES__ 1
441 
442 // RUN: %clang -target i386-unknown-unknown -march=atom -mvaes -mno-aes -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=VAESNOAES %s
443 
444 // VAESNOAES-NOT: #define __AES__ 1
445 // VAESNOAES-NOT: #define __VAES__ 1
446 
447 // RUN: %clang -target i386-unknown-unknown -march=atom -mgfni -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=GFNI %s
448 
449 // GFNI: #define __GFNI__ 1
450 // GFNI: #define __SSE2__ 1
451 
452 // RUN: %clang -target i386-unknown-unknown -march=atom -mvpclmulqdq -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=VPCLMULQDQ %s
453 
454 // VPCLMULQDQ: #define __PCLMUL__ 1
455 // VPCLMULQDQ: #define __VPCLMULQDQ__ 1
456 
457 // RUN: %clang -target i386-unknown-unknown -march=atom -mvpclmulqdq -mno-pclmul -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=VPCLMULQDQNOPCLMUL %s
458 // VPCLMULQDQNOPCLMUL-NOT: #define __PCLMUL__ 1
459 // VPCLMULQDQNOPCLMUL-NOT: #define __VPCLMULQDQ__ 1
460 
461 // RUN: %clang -target i386-unknown-unknown -march=atom -mrdpid -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=RDPID %s
462 
463 // RDPID: #define __RDPID__ 1
464 
465 // RUN: %clang -target i386-unknown-unknown -march=atom -mavx512bf16 -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=AVX512BF16 %s
466 
467 // AVX512BF16: #define __AVX512BF16__ 1
468 // AVX512BF16: #define __AVX512BW__ 1
469 // AVX512BF16-NOT: #define __AVX512VL__ 1
470 
471 // RUN: %clang -target i386-unknown-unknown -march=atom -mavx512bf16 -mno-avx512bw -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=AVX512BF16_NOAVX512BW %s
472 
473 // AVX512BF16_NOAVX512BW-NOT: #define __AVX512BF16__ 1
474 
475 // RUN: %clang -target i386-unknown-unknown -march=atom -mavx512bf16 -mno-avx512vl -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=AVX512BF16_NOAVX512VL %s
476 
477 // AVX512BF16_NOAVX512VL: #define __AVX512BF16__ 1
478 
479 // RUN: %clang -target i386-unknown-linux-gnu -march=i386 -mavx512vp2intersect -x c -E -dM -o - %s | FileCheck  -check-prefix=VP2INTERSECT %s
480 
481 // VP2INTERSECT: #define __AVX512F__ 1
482 // VP2INTERSECT: #define __AVX512VP2INTERSECT__ 1
483 
484 // RUN: %clang -target i386-unknown-linux-gnu -march=i386 -mno-avx512vp2intersect -x c -E -dM -o - %s | FileCheck  -check-prefix=NOVP2INTERSECT %s
485 // RUN: %clang -target i386-unknown-linux-gnu -march=i386 -mavx512vp2intersect -mno-avx512f -x c -E -dM -o - %s | FileCheck  -check-prefix=NOVP2INTERSECT %s
486 
487 // NOVP2INTERSECT-NOT: #define __AVX512VP2INTERSECT__ 1
488 
489 
490 // RUN: %clang -target i386-unknown-linux-gnu -march=i386 -mkl -x c -E -dM -o - %s | FileCheck  -check-prefix=KEYLOCKER %s
491 // KEYLOCKER: #define __KL__ 1
492 
493 // RUN: %clang -target i386-unknown-linux-gnu -march=i386 -mno-kl -x c -E -dM -o - %s | FileCheck  -check-prefix=NOKEYLOCKER %s
494 // NOKEYLOCKER-NOT: #define __KL__ 1
495 
496 // RUN: %clang -target i386-unknown-linux-gnu -march=i386 -mwidekl -x c -E -dM -o - %s | FileCheck  -check-prefix=KEYLOCKERW %s
497 // KEYLOCKERW: #define __KL__ 1
498 // KEYLOCKERW: #define __WIDEKL__ 1
499 
500 // RUN: %clang -target i386-unknown-linux-gnu -march=i386 -mno-widekl -x c -E -dM -o - %s | FileCheck  -check-prefix=NOKEYLOCKERW %s
501 // NOKEYLOCKERW-NOT: #define __KL__ 1
502 // NOKEYLOCKERW-NOT: #define __WIDEKL__ 1
503 
504 // RUN: %clang -target i386-unknown-linux-gnu -march=i386 -mwidekl -mno-kl -x c -E -dM -o - %s | FileCheck  -check-prefix=NOKEYLOCKERW2 %s
505 // NOKEYLOCKERW2-NOT: #define __KL__ 1
506 // NOKEYLOCKERW2-NOT: #define __WIDEKL__ 1
507 
508 // RUN: %clang -target i386-unknown-unknown -march=atom -menqcmd -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=ENQCMD %s
509 
510 // ENQCMD: #define __ENQCMD__ 1
511 
512 // RUN: %clang -target i386-unknown-unknown -march=atom -mno-enqcmd -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=NOENQCMD %s
513 
514 // NOENQCMD-NOT: #define __ENQCMD__ 1
515 
516 // RUN: %clang -target i386-unknown-unknown -march=atom -mserialize -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=SERIALIZE %s
517 
518 // SERIALIZE: #define __SERIALIZE__ 1
519 
520 // RUN: %clang -target i386-unknown-unknown -march=atom -mno-serialize -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=NOSERIALIZE %s
521 
522 // NOSERIALIZE-NOT: #define __SERIALIZE__ 1
523 
524 // RUN: %clang -target i386-unknown-unknown -march=atom -mtsxldtrk -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=TSXLDTRK %s
525 
526 // TSXLDTRK: #define __TSXLDTRK__ 1
527 
528 // RUN: %clang -target i386-unknown-unknown -march=atom -mno-tsxldtrk -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=NOTSXLDTRK %s
529 
530 // NOTSXLDTRK-NOT: #define __TSXLDTRK__ 1
531 
532 // RUN: %clang -target i386-unknown-unknown -march=atom -mhreset -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=HRESET %s
533 
534 // HRESET: #define __HRESET__ 1
535 
536 // RUN: %clang -target i386-unknown-unknown -march=atom -mno-hreset -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=NOHRESET %s
537 
538 // NOHRESET-NOT: #define __HRESET__ 1
539 
540 // RUN: %clang -target i386-unknown-linux-gnu -march=i386 -muintr -x c -E -dM -o - %s | FileCheck -check-prefix=UINTR %s
541 
542 // UINTR: #define __UINTR__ 1
543 
544 // RUN: %clang -target i386-unknown-linux-gnu -march=i386 -mno-uintr -x c -E -dM -o - %s | FileCheck -check-prefix=NOUINTR %s
545 
546 // NOUINTR-NOT: #define __UINTR__ 1
547 
548 // RUN: %clang -target i386-unknown-unknown -march=atom -mavxvnni -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=AVXVNNI %s
549 
550 // AVXVNNI: #define __AVX2__ 1
551 // AVXVNNI: #define __AVXVNNI__ 1
552 
553 // RUN: %clang -target i386-unknown-unknown -march=atom -mno-avxvnni -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=NOAVXVNNI %s
554 
555 // NOAVXVNNI-NOT: #define __AVXVNNI__ 1
556 
557 // RUN: %clang -target i386-unknown-unknown -march=atom -mavxvnni -mno-avx2 -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=AVXVNNINOAVX2 %s
558 
559 // AVXVNNINOAVX2-NOT: #define __AVX2__ 1
560 // AVXVNNINOAVX2-NOT: #define __AVXVNNI__ 1
561