Debian Codegraph @

clang/test/Preprocessor/x86_target_features.c

raw
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 -mavx512dq -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=AVX512DQ %s
92
93 // AVX512DQ: #define __AVX2__ 1
94 // AVX512DQ: #define __AVX512DQ__ 1
95 // AVX512DQ: #define __AVX512F__ 1
96 // AVX512DQ: #define __AVX__ 1
97 // AVX512DQ: #define __SSE2_MATH__ 1
98 // AVX512DQ: #define __SSE2__ 1
99 // AVX512DQ: #define __SSE3__ 1
100 // AVX512DQ: #define __SSE4_1__ 1
101 // AVX512DQ: #define __SSE4_2__ 1
102 // AVX512DQ: #define __SSE_MATH__ 1
103 // AVX512DQ: #define __SSE__ 1
104 // AVX512DQ: #define __SSSE3__ 1
105
106 // RUN: %clang -target i386-unknown-unknown -march=atom -mavx512bw -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=AVX512BW %s
107
108 // AVX512BW: #define __AVX2__ 1
109 // AVX512BW: #define __AVX512BW__ 1
110 // AVX512BW: #define __AVX512F__ 1
111 // AVX512BW: #define __AVX__ 1
112 // AVX512BW: #define __SSE2_MATH__ 1
113 // AVX512BW: #define __SSE2__ 1
114 // AVX512BW: #define __SSE3__ 1
115 // AVX512BW: #define __SSE4_1__ 1
116 // AVX512BW: #define __SSE4_2__ 1
117 // AVX512BW: #define __SSE_MATH__ 1
118 // AVX512BW: #define __SSE__ 1
119 // AVX512BW: #define __SSSE3__ 1
120
121 // RUN: %clang -target i386-unknown-unknown -march=atom -mavx512vl -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=AVX512VL %s
122
123 // AVX512VL: #define __AVX2__ 1
124 // AVX512VL: #define __AVX512F__ 1
125 // AVX512VL: #define __AVX512VL__ 1
126 // AVX512VL: #define __AVX__ 1
127 // AVX512VL: #define __SSE2_MATH__ 1
128 // AVX512VL: #define __SSE2__ 1
129 // AVX512VL: #define __SSE3__ 1
130 // AVX512VL: #define __SSE4_1__ 1
131 // AVX512VL: #define __SSE4_2__ 1
132 // AVX512VL: #define __SSE_MATH__ 1
133 // AVX512VL: #define __SSE__ 1
134 // AVX512VL: #define __SSSE3__ 1
135
136 // RUN: %clang -target i386-unknown-unknown -march=atom -mavx512ifma -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=AVX512IFMA %s
137
138 // AVX512IFMA: #define __AVX2__ 1
139 // AVX512IFMA: #define __AVX512F__ 1
140 // AVX512IFMA: #define __AVX512IFMA__ 1
141 // AVX512IFMA: #define __AVX__ 1
142 // AVX512IFMA: #define __SSE2_MATH__ 1
143 // AVX512IFMA: #define __SSE2__ 1
144 // AVX512IFMA: #define __SSE3__ 1
145 // AVX512IFMA: #define __SSE4_1__ 1
146 // AVX512IFMA: #define __SSE4_2__ 1
147 // AVX512IFMA: #define __SSE_MATH__ 1
148 // AVX512IFMA: #define __SSE__ 1
149 // AVX512IFMA: #define __SSSE3__ 1
150
151 // RUN: %clang -target i386-unknown-unknown -march=atom -mavx512vbmi -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=AVX512VBMI %s
152
153 // AVX512VBMI: #define __AVX2__ 1
154 // AVX512VBMI: #define __AVX512BW__ 1
155 // AVX512VBMI: #define __AVX512F__ 1
156 // AVX512VBMI: #define __AVX512VBMI__ 1
157 // AVX512VBMI: #define __AVX__ 1
158 // AVX512VBMI: #define __SSE2_MATH__ 1
159 // AVX512VBMI: #define __SSE2__ 1
160 // AVX512VBMI: #define __SSE3__ 1
161 // AVX512VBMI: #define __SSE4_1__ 1
162 // AVX512VBMI: #define __SSE4_2__ 1
163 // AVX512VBMI: #define __SSE_MATH__ 1
164 // AVX512VBMI: #define __SSE__ 1
165 // AVX512VBMI: #define __SSSE3__ 1
166
167 // RUN: %clang -target i386-unknown-unknown -march=atom -mavx512bitalg -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=AVX512BITALG %s
168
169 // AVX512BITALG: #define __AVX2__ 1
170 // AVX512BITALG: #define __AVX512BITALG__ 1
171 // AVX512BITALG: #define __AVX512BW__ 1
172 // AVX512BITALG: #define __AVX512F__ 1
173 // AVX512BITALG: #define __AVX__ 1
174 // AVX512BITALG: #define __SSE2_MATH__ 1
175 // AVX512BITALG: #define __SSE2__ 1
176 // AVX512BITALG: #define __SSE3__ 1
177 // AVX512BITALG: #define __SSE4_1__ 1
178 // AVX512BITALG: #define __SSE4_2__ 1
179 // AVX512BITALG: #define __SSE_MATH__ 1
180 // AVX512BITALG: #define __SSE__ 1
181 // AVX512BITALG: #define __SSSE3__ 1
182
183
184 // 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
185
186 // AVX512VBMINOAVX512BW-NOT: #define __AVX512BW__ 1
187 // AVX512VBMINOAVX512BW-NOT: #define __AVX512VBMI__ 1
188
189 // RUN: %clang -target i386-unknown-unknown -march=atom -mavx512vbmi2 -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=AVX512VBMI2 %s
190
191 // AVX512VBMI2: #define __AVX2__ 1
192 // AVX512VBMI2: #define __AVX512BW__ 1
193 // AVX512VBMI2: #define __AVX512F__ 1
194 // AVX512VBMI2: #define __AVX512VBMI2__ 1
195 // AVX512VBMI2: #define __AVX__ 1
196 // AVX512VBMI2: #define __SSE2_MATH__ 1
197 // AVX512VBMI2: #define __SSE2__ 1
198 // AVX512VBMI2: #define __SSE3__ 1
199 // AVX512VBMI2: #define __SSE4_1__ 1
200 // AVX512VBMI2: #define __SSE4_2__ 1
201 // AVX512VBMI2: #define __SSE_MATH__ 1
202 // AVX512VBMI2: #define __SSE__ 1
203 // AVX512VBMI2: #define __SSSE3__ 1
204
205 // 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
206
207 // AVX512VBMI2NOAVX512BW-NOT: #define __AVX512BW__ 1
208 // AVX512VBMI2NOAVX512BW-NOT: #define __AVX512VBMI2__ 1
209
210 // 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
211
212 // AVX512BITALGNOAVX512BW-NOT: #define __AVX512BITALG__ 1
213 // AVX512BITALGNOAVX512BW-NOT: #define __AVX512BW__ 1
214
215 // RUN: %clang -target i386-unknown-unknown -march=atom -msse4.2 -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=SSE42POPCNT %s
216
217 // SSE42POPCNT: #define __POPCNT__ 1
218
219 // 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
220
221 // SSE42NOPOPCNT-NOT: #define __POPCNT__ 1
222
223 // 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
224
225 // NOSSE42POPCNT: #define __POPCNT__ 1
226
227 // 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
228 // 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
229 // 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
230
231 // CPUPOPCNT: #define __POPCNT__ 1
232
233 // RUN: %clang -target i386-unknown-unknown -march=pentium -msse -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=SSEMMX %s
234
235 // SSEMMX: #define __MMX__ 1
236
237 // 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
238
239 // SSENOSSEMMX-NOT: #define __MMX__ 1
240
241 // 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
242
243 // SSENOMMX-NOT: #define __MMX__ 1
244
245 // RUN: %clang -target i386-unknown-unknown -march=pentium3 -mno-sse -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=MARCHMMXNOSSE %s
246 // RUN: %clang -target i386-unknown-unknown -march=atom -mno-sse -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=MARCHMMXNOSSE %s
247 // RUN: %clang -target i386-unknown-unknown -march=knl -mno-sse -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=MARCHMMXNOSSE %s
248 // RUN: %clang -target i386-unknown-unknown -march=btver1 -mno-sse -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=MARCHMMXNOSSE %s
249 // RUN: %clang -target i386-unknown-unknown -march=znver1 -mno-sse -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=MARCHMMXNOSSE %s
250
251 // MARCHMMXNOSSE: #define __MMX__ 1
252
253 // RUN: %clang -target i386-unknown-unknown -march=atom -mf16c -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=F16C %s
254
255 // F16C: #define __AVX__ 1
256 // F16C: #define __F16C__ 1
257
258 // 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
259
260 // F16CNOAVX-NOT: #define __AVX__ 1
261 // F16CNOAVX-NOT: #define __F16C__ 1
262
263 // RUN: %clang -target i386-unknown-unknown -march=pentiumpro -mpclmul -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=PCLMUL %s
264
265 // PCLMUL: #define __PCLMUL__ 1
266 // PCLMUL: #define __SSE2__ 1
267 // PCLMUL-NOT: #define __SSE3__ 1
268
269 // 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
270
271 // PCLMULNOSSE2-NOT: #define __PCLMUL__ 1
272 // PCLMULNOSSE2-NOT: #define __SSE2__ 1
273 // PCLMULNOSSE2-NOT: #define __SSE3__ 1
274
275 // RUN: %clang -target i386-unknown-unknown -march=pentiumpro -maes -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=AES %s
276
277 // AES: #define __AES__ 1
278 // AES: #define __SSE2__ 1
279 // AES-NOT: #define __SSE3__ 1
280
281 // 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
282
283 // AESNOSSE2-NOT: #define __AES__ 1
284 // AESNOSSE2-NOT: #define __SSE2__ 1
285 // AESNOSSE2-NOT: #define __SSE3__ 1
286
287 // RUN: %clang -target i386-unknown-unknown -march=pentiumpro -mlwp -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=LWP %s
288
289 // LWP: #define __LWP__ 1
290
291 // RUN: %clang -target i386-unknown-unknown -march=bdver1 -mno-lwp -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=NOLWP %s
292
293 // NOLWP-NOT: #define __LWP__ 1
294
295 // RUN: %clang -target i386-unknown-unknown -march=pentiumpro -msha -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=SHA %s
296
297 // SHA: #define __SHA__ 1
298 // SHA: #define __SSE2__ 1
299 // SHA-NOT: #define __SSE3__ 1
300
301 // 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
302
303 // SHANOSHA-NOT: #define __SHA__ 1
304 // SHANOSHA-NOT: #define __SSE2__ 1
305
306 // 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
307
308 // SHANOSSE2-NOT: #define __SHA__ 1
309 // SHANOSSE2-NOT: #define __SSE2__ 1
310 // SHANOSSE2-NOT: #define __SSE3__ 1
311
312 // RUN: %clang -target i386-unknown-unknown -march=atom -mtbm -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=TBM %s
313
314 // TBM: #define __TBM__ 1
315
316 // RUN: %clang -target i386-unknown-unknown -march=bdver2 -mno-tbm -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=NOTBM %s
317
318 // NOTBM-NOT: #define __TBM__ 1
319
320 // RUN: %clang -target i386-unknown-unknown -march=pentiumpro -mcx16 -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=MCX16-32 %s
321
322 // MCX16-32-NOT: #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_16 1
323
324 // 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
325
326 // MCX16-64: #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_16 1
327
328 // RUN: %clang -target i386-unknown-unknown -march=atom -mprfchw -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=PRFCHW %s
329
330 // PRFCHW: #define __PRFCHW__ 1
331
332 // RUN: %clang -target i386-unknown-unknown -march=btver2 -mno-prfchw -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=NOPRFCHW %s
333
334 // NOPRFCHW-NOT: #define __PRFCHW__ 1
335
336 // RUN: %clang -target i386-unknown-unknown -march=atom -m3dnow -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=3DNOWPRFCHW %s
337
338 // 3DNOWPRFCHW-NOT: #define __3dNOW__ 1
339 // 3DNOWPRFCHW-NOT: #define __PRFCHW__ 1
340
341 // 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
342
343 // 3DNOWNOPRFCHW-NOT: #define __3dNOW__ 1
344 // 3DNOWNOPRFCHW-NOT: #define __PRFCHW__ 1
345
346 // 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
347
348 // NO3DNOWPRFCHW: #define __PRFCHW__ 1
349
350 // RUN: %clang -target i386-unknown-unknown -march=atom -madx -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=ADX %s
351
352 // ADX: #define __ADX__ 1
353
354 // RUN: %clang -target i386-unknown-unknown -mshstk -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=SHSTK %s
355
356 // SHSTK: #define __SHSTK__ 1
357
358 // RUN: %clang -target i386-unknown-unknown -march=atom -mrdseed -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=RDSEED %s
359
360 // RDSEED: #define __RDSEED__ 1
361
362 // RUN: %clang -target i386-unknown-unknown -march=atom -mxsave -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=XSAVE %s
363
364 // XSAVE: #define __XSAVE__ 1
365
366 // RUN: %clang -target i386-unknown-unknown -march=atom -mxsaveopt -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=XSAVEOPT %s
367
368 // XSAVEOPT: #define __XSAVEOPT__ 1
369 // XSAVEOPT: #define __XSAVE__ 1
370
371 // RUN: %clang -target i386-unknown-unknown -march=atom -mxsavec -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=XSAVEC %s
372
373 // XSAVEC: #define __XSAVEC__ 1
374 // XSAVEC: #define __XSAVE__ 1
375
376 // RUN: %clang -target i386-unknown-unknown -march=atom -mxsaves -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=XSAVES %s
377
378 // XSAVES: #define __XSAVES__ 1
379 // XSAVES: #define __XSAVE__ 1
380
381 // 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
382
383 // NOXSAVE-NOT: #define __XSAVEC__ 1
384 // NOXSAVE-NOT: #define __XSAVEOPT__ 1
385 // NOXSAVE-NOT: #define __XSAVES__ 1
386 // NOXSAVE-NOT: #define __XSAVE__ 1
387
388 // RUN: %clang -target i386-unknown-unknown -march=atom -mclflushopt -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=CLFLUSHOPT %s
389
390 // CLFLUSHOPT: #define __CLFLUSHOPT__ 1
391
392 // RUN: %clang -target i386-unknown-unknown -march=atom -mvaes -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=VAES %s
393
394 // VAES: #define __AES__ 1
395 // VAES: #define __VAES__ 1
396
397 // 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
398
399 // VAESNOAES-NOT: #define __AES__ 1
400 // VAESNOAES-NOT: #define __VAES__ 1
401
402 // RUN: %clang -target i386-unknown-unknown -march=atom -mgfni -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=GFNI %s
403
404 // GFNI: #define __GFNI__ 1
405 // GFNI: #define __SSE2__ 1
406
407 // RUN: %clang -target i386-unknown-unknown -march=atom -mvpclmulqdq -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=VPCLMULQDQ %s
408
409 // VPCLMULQDQ: #define __PCLMUL__ 1
410 // VPCLMULQDQ: #define __VPCLMULQDQ__ 1
411
412 // 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
413 // VPCLMULQDQNOPCLMUL-NOT: #define __PCLMUL__ 1
414 // VPCLMULQDQNOPCLMUL-NOT: #define __VPCLMULQDQ__ 1
415
416 // RUN: %clang -target i386-unknown-unknown -march=atom -mrdpid -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=RDPID %s
417
418 // RDPID: #define __RDPID__ 1
419
420 // RUN: %clang -target i386-unknown-unknown -march=atom -mavx512bf16 -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=AVX512BF16 %s
421
422 // AVX512BF16: #define __AVX512BF16__ 1
423 // AVX512BF16: #define __AVX512BW__ 1
424 // AVX512BF16-NOT: #define __AVX512VL__ 1
425
426 // 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
427
428 // AVX512BF16_NOAVX512BW-NOT: #define __AVX512BF16__ 1
429
430 // 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
431
432 // AVX512BF16_NOAVX512VL: #define __AVX512BF16__ 1
433
434 // RUN: %clang -target i386-unknown-linux-gnu -march=i386 -mavx512vp2intersect -x c -E -dM -o - %s | FileCheck -check-prefix=VP2INTERSECT %s
435
436 // VP2INTERSECT: #define __AVX512F__ 1
437 // VP2INTERSECT: #define __AVX512VP2INTERSECT__ 1
438
439 // RUN: %clang -target i386-unknown-linux-gnu -march=i386 -mno-avx512vp2intersect -x c -E -dM -o - %s | FileCheck -check-prefix=NOVP2INTERSECT %s
440 // RUN: %clang -target i386-unknown-linux-gnu -march=i386 -mavx512vp2intersect -mno-avx512f -x c -E -dM -o - %s | FileCheck -check-prefix=NOVP2INTERSECT %s
441
442 // NOVP2INTERSECT-NOT: #define __AVX512VP2INTERSECT__ 1
443
444
445 // RUN: %clang -target i386-unknown-linux-gnu -march=i386 -mkl -x c -E -dM -o - %s | FileCheck -check-prefix=KEYLOCKER %s
446 // KEYLOCKER: #define __KL__ 1
447
448 // RUN: %clang -target i386-unknown-linux-gnu -march=i386 -mno-kl -x c -E -dM -o - %s | FileCheck -check-prefix=NOKEYLOCKER %s
449 // NOKEYLOCKER-NOT: #define __KL__ 1
450
451 // RUN: %clang -target i386-unknown-linux-gnu -march=i386 -mwidekl -x c -E -dM -o - %s | FileCheck -check-prefix=KEYLOCKERW %s
452 // KEYLOCKERW: #define __KL__ 1
453 // KEYLOCKERW: #define __WIDEKL__ 1
454
455 // RUN: %clang -target i386-unknown-linux-gnu -march=i386 -mno-widekl -x c -E -dM -o - %s | FileCheck -check-prefix=NOKEYLOCKERW %s
456 // NOKEYLOCKERW-NOT: #define __KL__ 1
457 // NOKEYLOCKERW-NOT: #define __WIDEKL__ 1
458
459 // RUN: %clang -target i386-unknown-linux-gnu -march=i386 -mwidekl -mno-kl -x c -E -dM -o - %s | FileCheck -check-prefix=NOKEYLOCKERW2 %s
460 // NOKEYLOCKERW2-NOT: #define __KL__ 1
461 // NOKEYLOCKERW2-NOT: #define __WIDEKL__ 1
462
463 // RUN: %clang -target i386-unknown-unknown -march=atom -menqcmd -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=ENQCMD %s
464
465 // ENQCMD: #define __ENQCMD__ 1
466
467 // RUN: %clang -target i386-unknown-unknown -march=atom -mno-enqcmd -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=NOENQCMD %s
468
469 // NOENQCMD-NOT: #define __ENQCMD__ 1
470
471 // RUN: %clang -target i386-unknown-unknown -march=atom -mserialize -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=SERIALIZE %s
472
473 // SERIALIZE: #define __SERIALIZE__ 1
474
475 // RUN: %clang -target i386-unknown-unknown -march=atom -mno-serialize -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=NOSERIALIZE %s
476
477 // NOSERIALIZE-NOT: #define __SERIALIZE__ 1
478
479 // RUN: %clang -target i386-unknown-unknown -march=atom -mtsxldtrk -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=TSXLDTRK %s
480
481 // TSXLDTRK: #define __TSXLDTRK__ 1
482
483 // RUN: %clang -target i386-unknown-unknown -march=atom -mno-tsxldtrk -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=NOTSXLDTRK %s
484
485 // NOTSXLDTRK-NOT: #define __TSXLDTRK__ 1
486
487 // RUN: %clang -target i386-unknown-unknown -march=atom -mhreset -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=HRESET %s
488
489 // HRESET: #define __HRESET__ 1
490
491 // RUN: %clang -target i386-unknown-unknown -march=atom -mno-hreset -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=NOHRESET %s
492
493 // NOHRESET-NOT: #define __HRESET__ 1
494
495 // RUN: %clang -target x86_64-unknown-linux-gnu -march=x86-64 -muintr -x c -E -dM -o - %s | FileCheck -check-prefix=UINTR %s
496
497 // UINTR: #define __UINTR__ 1
498
499 // RUN: %clang -target x86_64-unknown-linux-gnu -march=x86-64 -mno-uintr -x c -E -dM -o - %s | FileCheck -check-prefix=NOUINTR %s
500
501 // NOUINTR-NOT: #define __UINTR__ 1
502
503 // RUN: %clang -target x86_64-unknown-linux-gnu -march=atom -mamx-fp16 -x c \
504 // RUN: -E -dM -o - %s | FileCheck -check-prefix=AMX-FP16 %s
505
506 // AMX-FP16: #define __AMX_FP16__ 1
507 // AMX-FP16: #define __AMX_TILE__ 1
508
509 // RUN: %clang -target x86_64-unknown-linux-gnu -march=atom -mno-amx-fp16 \
510 // RUN: -x c -E -dM -o - %s | FileCheck -check-prefix=NO-AMX-FP16 %s
511 // RUN: %clang -target x86_64-unknown-linux-gnu -march=atom -mamx-fp16 \
512 // RUN: -mno-amx-tile -x c -E -dM -o - %s | FileCheck -check-prefix=NO-AMX-FP16 %s
513
514 // NO-AMX-FP16-NOT: #define __AMX_FP16__ 1
515 // NO-AMX-FP16-NOT: #define __AMX_TILE__ 1
516
517 // RUN: %clang -target x86_64-unknown-linux-gnu -march=x86-64 -mamx-complex -x c \
518 // RUN: -E -dM -o - %s | FileCheck -check-prefix=AMX-COMPLEX %s
519
520 // AMX-COMPLEX: #define __AMX_COMPLEX__ 1
521
522 // RUN: %clang -target x86_64-unknown-linux-gnu -march=x86-64 -mno-amx-complex -x c \
523 // RUN: -E -dM -o - %s | FileCheck -check-prefix=NO-AMX-COMPLEX %s
524 // RUN: %clang -target x86_64-unknown-linux-gnu -march=x86-64 -mamx-complex -mno-amx-tile \
525 // RUN: -x c -E -dM -o - %s | FileCheck -check-prefix=NO-AMX-COMPLEX %s
526
527 // NO-AMX-COMPLEX-NOT: #define __AMX_COMPLEX__ 1
528
529 // RUN: %clang -target x86_64-unknown-linux-gnu -march=x86-64 -mamx-avx512 -x c \
530 // RUN: -E -dM -o - %s | FileCheck -check-prefix=AMX-AVX512 %s
531
532 // AMX-AVX512: #define __AMX_AVX512__ 1
533
534 // RUN: %clang -target x86_64-unknown-linux-gnu -march=x86-64 -mno-amx-avx512 -x c \
535 // RUN: -E -dM -o - %s | FileCheck -check-prefix=NO-AMX-AVX512 %s
536 // RUN: %clang -target x86_64-unknown-linux-gnu -march=x86-64 -mamx-avx512 -mno-amx-tile \
537 // RUN: -x c -E -dM -o - %s | FileCheck -check-prefix=NO-AMX-AVX512 %s
538
539 // NO-AMX-AVX512-NOT: #define __AMX_AVX512__ 1
540
541 // RUN: %clang -target x86_64-unknown-linux-gnu -march=x86-64 -mamx-tf32 -x c \
542 // RUN: -E -dM -o - %s | FileCheck -check-prefix=AMX-TF32 %s
543 // AMX-TF32: #define __AMX_TF32__ 1
544 // RUN: %clang -target x86_64-unknown-linux-gnu -march=x86-64 -mno-amx-tf32 -x c \
545 // RUN: -E -dM -o - %s | FileCheck -check-prefix=NO-AMX-TF32 %s
546 // RUN: %clang -target x86_64-unknown-linux-gnu -march=x86-64 -mamx-tf32 -mno-amx-tile \
547 // RUN: -x c -E -dM -o - %s | FileCheck -check-prefix=NO-AMX-TF32 %s
548 // NO-AMX-TF32-NOT: #define __AMX_TF32__ 1
549
550 // RUN: %clang -target i386-unknown-unknown -march=atom -mavxvnni -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=AVXVNNI %s
551
552 // AVXVNNI: #define __AVX2__ 1
553 // AVXVNNI: #define __AVXVNNI__ 1
554
555 // RUN: %clang -target i386-unknown-unknown -march=atom -mno-avxvnni -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=NOAVXVNNI %s
556
557 // NOAVXVNNI-NOT: #define __AVXVNNI__ 1
558
559 // 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
560
561 // AVXVNNINOAVX2-NOT: #define __AVX2__ 1
562 // AVXVNNINOAVX2-NOT: #define __AVXVNNI__ 1
563
564 // RUN: %clang -target i386-unknown-unknown -march=atom -mavx512fp16 -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=AVX512FP16 %s
565
566 // AVX512FP16: #define __AVX512BW__ 1
567 // AVX512FP16: #define __AVX512FP16__ 1
568
569 // RUN: %clang -target i386-unknown-unknown -march=atom -mavx512fp16 -mno-avx512vl -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=AVX512FP16NOAVX512VL %s
570
571 // AVX512FP16NOAVX512VL: #define __AVX512FP16__ 1
572
573 // RUN: %clang -target i386-unknown-unknown -march=atom -mavx512fp16 -mno-avx512bw -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=AVX512FP16NOAVX512BW %s
574
575 // AVX512FP16NOAVX512BW-NOT: #define __AVX512BW__ 1
576 // AVX512FP16NOAVX512BW-NOT: #define __AVX512FP16__ 1
577
578 // RUN: %clang -target i386-unknown-unknown -march=atom -mavx512fp16 -mno-avx512dq -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=AVX512FP16NOAVX512DQ %s
579
580 // AVX512FP16NOAVX512DQ-NOT: #define __AVX512DQ__ 1
581 // AVX512FP16NOAVX512DQ: #define __AVX512FP16__ 1
582
583 // RUN: %clang -target x86_64-unknown-linux-gnu -march=atom -mcmpccxadd -x c -E -dM -o - %s | FileCheck -check-prefix=CMPCCXADD %s
584
585 // CMPCCXADD: #define __CMPCCXADD__ 1
586
587 // RUN: %clang -target x86_64-unknown-linux-gnu -march=atom -mno-cmpccxadd -x c -E -dM -o - %s | FileCheck -check-prefix=NO-CMPCCXADD %s
588
589 // NO-CMPCCXADD-NOT: #define __CMPCCXADD__ 1
590 // RUN: %clang -target i386-unknown-unknown -march=atom -mavxifma -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=AVXIFMA %s
591
592 // AVXIFMA: #define __AVX2__ 1
593 // AVXIFMA: #define __AVXIFMA__ 1
594
595 // RUN: %clang -target i386-unknown-unknown -march=atom -mavxifma -mno-avx2 -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=AVXIFMANOAVX2 %s
596
597 // AVXIFMANOAVX2-NOT: #define __AVX2__ 1
598 // AVXIFMANOAVX2-NOT: #define __AVXIFMA__ 1
599
600 // RUN: %clang -target i386-unknown-linux-gnu -march=atom -mraoint -x c -E -dM -o - %s | FileCheck -check-prefix=RAOINT %s
601
602 // RAOINT: #define __RAOINT__ 1
603
604 // RUN: %clang -target i386-unknown-linux-gnu -march=atom -mno-raoint -x c -E -dM -o - %s | FileCheck -check-prefix=NO-RAOINT %s
605
606 // NO-RAOINT-NOT: #define __RAOINT__ 1
607
608 // RUN: %clang -target i386-unknown-unknown -march=atom -mavxvnniint8 -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=AVXVNNIINT8 %s
609
610 // AVXVNNIINT8: #define __AVX2__ 1
611 // AVXVNNIINT8: #define __AVXVNNIINT8__ 1
612
613 // RUN: %clang -target i386-unknown-unknown -march=atom -mno-avxvnniint8 -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=NOAVXVNNIINT8 %s
614
615 // NOAVXVNNIINT8-NOT: #define __AVXVNNIINT8__ 1
616
617 // RUN: %clang -target i386-unknown-unknown -march=atom -mavxvnniint8 -mno-avx2 -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=AVXVNNIINT8NOAVX2 %s
618
619 // AVXVNNIINT8NOAVX2-NOT: #define __AVX2__ 1
620 // AVXVNNIINT8NOAVX2-NOT: #define __AVXVNNIINT8__ 1
621
622 // RUN: %clang -target i386-unknown-unknown -march=atom -mavxneconvert -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=AVXNECONVERT %s
623
624 // AVXNECONVERT: #define __AVX2__ 1
625 // AVXNECONVERT: #define __AVXNECONVERT__ 1
626
627 // RUN: %clang -target i386-unknown-unknown -march=atom -mno-avxneconvert -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=NOAVXNECONVERT %s
628
629 // NOAVXNECONVERT-NOT: #define __AVXNECONVERT__ 1
630
631 // RUN: %clang -target i386-unknown-unknown -march=atom -mavxneconvert -mno-avx2 -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=AVXNECONVERTNOAVX2 %s
632
633 // AVXNECONVERTNOAVX2-NOT: #define __AVX2__ 1
634 // AVXNECONVERTNOAVX2-NOT: #define __AVXNECONVERT__ 1
635
636 // RUN: %clang -target i386-unknown-linux-gnu -march=atom -msha512 -x c -E -dM -o - %s | FileCheck -check-prefix=SHA512 %s
637
638 // SHA512: #define __AVX__ 1
639 // SHA512: #define __SHA512__ 1
640
641 // RUN: %clang -target i386-unknown-linux-gnu -march=atom -mno-sha512 -x c -E -dM -o - %s | FileCheck -check-prefix=NOSHA512 %s
642 // NOSHA512-NOT: #define __SHA512__ 1
643
644 // RUN: %clang -target i386-unknown-linux-gnu -march=atom -msha512 -mno-avx -x c -E -dM -o - %s | FileCheck -check-prefix=SHA512NOAVX %s
645
646 // SHA512NOAVX-NOT: #define __AVX__ 1
647 // SHA512NOAVX-NOT: #define __SHA512__ 1
648
649 // RUN: %clang -target i686-unknown-linux-gnu -march=atom -msm3 -x c -E -dM -o - %s | FileCheck -check-prefix=SM3 %s
650
651 // SM3: #define __AVX__ 1
652 // SM3: #define __SM3__ 1
653
654 // RUN: %clang -target i686-unknown-linux-gnu -march=atom -mno-sm3 -x c -E -dM -o - %s | FileCheck -check-prefix=NOSM3 %s
655
656 // NOSM3-NOT: #define __SM3__ 1
657
658 // RUN: %clang -target i686-unknown-linux-gnu -march=atom -msm3 -mno-avx -x c -E -dM -o - %s | FileCheck -check-prefix=SM3NOAVX %s
659
660 // SM3NOAVX-NOT: #define __SM3__ 1
661 // SM3NOAVX-NOT: #define __AVX__ 1
662
663 // RUN: %clang -target i686-unknown-linux-gnu -march=atom -msm4 -x c -E -dM -o - %s | FileCheck -check-prefix=SM4 %s
664
665 // SM4: #define __AVX__ 1
666 // SM4: #define __SM4__ 1
667
668 // RUN: %clang -target i686-unknown-linux-gnu -march=atom -mno-sm4 -x c -E -dM -o - %s | FileCheck -check-prefix=NOSM4 %s
669 // NOSM4-NOT: #define __SM4__ 1
670
671 // RUN: %clang -target i686-unknown-linux-gnu -march=atom -msm4 -mno-avx -x c -E -dM -o - %s | FileCheck -check-prefix=SM4NOAVX %s
672
673 // SM4NOAVX-NOT: #define __AVX__ 1
674 // SM4NOAVX-NOT: #define __SM4__ 1
675
676 // RUN: %clang -target i686-unknown-linux-gnu -march=atom -mavxvnniint16 -x c -E -dM -o - %s | FileCheck -check-prefix=AVXVNNIINT16 %s
677
678 // AVXVNNIINT16: #define __AVX2__ 1
679 // AVXVNNIINT16: #define __AVXVNNIINT16__ 1
680
681 // RUN: %clang -target i686-unknown-linux-gnu -march=atom -mno-avxvnniint16 -x c -E -dM -o - %s | FileCheck -check-prefix=NOAVXVNNIINT16 %s
682
683 // NOAVXVNNIINT16-NOT: #define __AVXVNNIINT16__ 1
684
685 // RUN: %clang -target i686-unknown-linux-gnu -march=atom -mavxvnniint16 -mno-avx2 -x c -E -dM -o - %s | FileCheck -check-prefix=AVXVNNIINT16NOAVX2 %s
686
687 // AVXVNNIINT16NOAVX2-NOT: #define __AVX2__ 1
688 // AVXVNNIINT16NOAVX2-NOT: #define __AVXVNNIINT16__ 1
689
690 // RUN: %clang -target i686-unknown-linux-gnu -march=atom -mavx10.1 -x c -E -dM -o - %s | FileCheck -check-prefix=AVX10_1 %s
691 // RUN: %clang -target i686-unknown-linux-gnu -march=atom -mavx10.1 -mno-avx512f -x c -E -dM -o - %s | FileCheck -check-prefix=NO-AVX10_1 %s
692 // RUN: %clang -target i686-unknown-linux-gnu -march=atom -mavx10.2 -x c -E -dM -o - %s | FileCheck -check-prefixes=AVX10_1,AVX10_2 %s
693 // RUN: %clang -target i686-unknown-linux-gnu -march=atom -mavx10.2 -mno-avx10.1 -x c -E -dM -o - %s | FileCheck -check-prefixes=NO-AVX10_1,NO-AVX10_2 %s
694 // AVX10_1: #define __AVX10_1_512__ 1
695 // AVX10_1: #define __AVX10_1__ 1
696 // AVX10_2: #define __AVX10_2_512__ 1
697 // AVX10_2: #define __AVX10_2__ 1
698 // AVX10_1: #define __AVX512F__ 1
699 // NO-AVX10_1-NOT: __AVX10_1_512__
700 // NO-AVX10_1-NOT: __AVX10_1__
701 // NO-AVX10_1-NOT: __AVX10_2_512__
702 // NO-AVX10_1-NOT: __AVX10_2__
703 // NO-AVX10_2: #define __AVX512F__ 1
704
705 // RUN: %clang -target i686-unknown-linux-gnu -march=atom -musermsr -x c -E -dM -o - %s | FileCheck -check-prefix=USERMSR %s
706 // USERMSR: #define __USERMSR__ 1
707
708 // RUN: %clang -target i686-unknown-linux-gnu -march=atom -mno-usermsr -x c -E -dM -o - %s | FileCheck -check-prefix=NO-USERMSR %s
709 // NO-USERMSR-NOT: #define __USERMSR__ 1
710
711 // RUN: %clang -target i686-unknown-linux-gnu -march=atom -mmovrs -x c -E -dM -o - %s | FileCheck -check-prefix=MOVRS %s
712 // MOVRS: #define __MOVRS__ 1
713
714 // RUN: %clang -target i686-unknown-linux-gnu -march=atom -mno-movrs -x c -E -dM -o - %s | FileCheck -check-prefix=NO-MOVRS %s
715 // NO-MOVRS-NOT: #define __MOVRS__ 1
716
717 // RUN: %clang -target i386-unknown-linux-gnu -march=i386 -mcrc32 -x c -E -dM -o - %s | FileCheck -check-prefix=CRC32 %s
718
719 // CRC32: #define __CRC32__ 1
720
721 // RUN: %clang -target i386-unknown-linux-gnu -march=i386 -mno-crc32 -x c -E -dM -o - %s | FileCheck -check-prefix=NOCRC32 %s
722
723 // NOCRC32-NOT: #define __CRC32__ 1
724
725 // RUN: %clang -target i386-unknown-linux-gnu -march=i386 -mrdpru -x c -E -dM -o - %s | FileCheck -check-prefix=RDPRU %s
726
727 // RDPRU: #define __RDPRU__ 1
728
729 // RUN: %clang -target i386-unknown-linux-gnu -march=i386 -mno-rdpru -x c -E -dM -o - %s | FileCheck -check-prefix=NORDPRU %s
730
731 // NORDPRU-NOT: #define __RDPRU__ 1
732
733 // RUN: %clang -target x86_64-unknown-unknown -march=x86-64 -mapx-features=egpr -x c -E -dM -o - %s | FileCheck --check-prefix=EGPR %s
734 // RUN: %clang -target x86_64-unknown-unknown -march=x86-64 -mapx-features=push2pop2 -x c -E -dM -o - %s | FileCheck --check-prefix=PUSH2POP2 %s
735 // RUN: %clang -target x86_64-unknown-unknown -march=x86-64 -mapx-features=ppx -x c -E -dM -o - %s | FileCheck --check-prefix=PPX %s
736 // RUN: %clang -target x86_64-unknown-unknown -march=x86-64 -mapx-features=ndd -x c -E -dM -o - %s | FileCheck --check-prefix=NDD %s
737 // RUN: %clang -target x86_64-unknown-unknown -march=x86-64 -mapx-features=ccmp -x c -E -dM -o - %s | FileCheck --check-prefix=CCMP %s
738 // RUN: %clang -target x86_64-unknown-unknown -march=x86-64 -mapx-features=nf -x c -E -dM -o - %s | FileCheck --check-prefix=NF %s
739 // RUN: %clang -target x86_64-unknown-unknown -march=x86-64 -mapx-features=cf -x c -E -dM -o - %s | FileCheck --check-prefix=CF %s
740 // RUN: %clang -target x86_64-unknown-unknown -march=x86-64 -mapx-features=zu -x c -E -dM -o - %s | FileCheck --check-prefix=ZU %s
741 // RUN: %clang -target x86_64-unknown-unknown -march=x86-64 -mapxf -x c -E -dM -o - %s | FileCheck --check-prefixes=EGPR,PUSH2POP2,PPX,NDD,CCMP,NF,ZU,APXF %s
742 // APXF: #define __APX_F__ 1
743 // CCMP: #define __CCMP__ 1
744 // CF: #define __CF__ 1
745 // EGPR: #define __EGPR__ 1
746 // NDD: #define __NDD__ 1
747 // NF: #define __NF__ 1
748 // PPX: #define __PPX__ 1
749 // PUSH2POP2: #define __PUSH2POP2__ 1
750 // ZU: #define __ZU__ 1
751
752 // RUN: %clang -target x86_64-unknown-unknown -march=x86-64 -mapx-inline-asm-use-gpr32 -x c -E -dM -o - %s | FileCheck --check-prefixes=NOUSEGPR32 %s
753 // RUN: %clang -target x86_64-unknown-unknown -march=x86-64 -mapx-features=egpr -mapx-inline-asm-use-gpr32 -x c -E -dM -o - %s | FileCheck --check-prefixes=USEGPR32 %s
754 // NOUSEGPR32-NOT: #define __APX_INLINE_ASM_USE_GPR32__ 1
755 // USEGPR32: #define __APX_INLINE_ASM_USE_GPR32__ 1