Revert "[llvm] Improve llvm.objectsize computation by computing GEP, alloca and mallo...
[llvm-project.git] / clang / test / Preprocessor / x86_target_features.c
blobfa3d0038f05a93cd541999408871bce3c4a2f321
1 // RUN: %clang -target i386-unknown-unknown -march=core2 -msse4 -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=SSE4 %s
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
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
14 // NOSSE4-NOT: #define __SSE4_1__ 1
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
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
27 // RUN: %clang -target i386-unknown-unknown -march=pentium-m -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=SSE2 %s
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
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
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
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
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
62 // RUN: %clang -target i386-unknown-unknown -march=atom -mavx512f -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=AVX512F %s
64 // AVX512F: #define __AVX2__ 1
65 // AVX512F: #define __AVX512F__ 1
66 // AVX512F: #define __AVX__ 1
67 // AVX512F: #define __EVEX512__ 1
68 // AVX512F: #define __SSE2_MATH__ 1
69 // AVX512F: #define __SSE2__ 1
70 // AVX512F: #define __SSE3__ 1
71 // AVX512F: #define __SSE4_1__ 1
72 // AVX512F: #define __SSE4_2__ 1
73 // AVX512F: #define __SSE_MATH__ 1
74 // AVX512F: #define __SSE__ 1
75 // AVX512F: #define __SSSE3__ 1
77 // RUN: %clang -target i386-unknown-unknown -march=atom -mavx512cd -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=AVX512CD %s
79 // AVX512CD: #define __AVX2__ 1
80 // AVX512CD: #define __AVX512CD__ 1
81 // AVX512CD: #define __AVX512F__ 1
82 // AVX512CD: #define __AVX__ 1
83 // AVX512CD: #define __EVEX512__ 1
84 // AVX512CD: #define __SSE2_MATH__ 1
85 // AVX512CD: #define __SSE2__ 1
86 // AVX512CD: #define __SSE3__ 1
87 // AVX512CD: #define __SSE4_1__ 1
88 // AVX512CD: #define __SSE4_2__ 1
89 // AVX512CD: #define __SSE_MATH__ 1
90 // AVX512CD: #define __SSE__ 1
91 // AVX512CD: #define __SSSE3__ 1
93 // RUN: %clang -target i386-unknown-unknown -march=atom -mavx512dq -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=AVX512DQ %s
95 // AVX512DQ: #define __AVX2__ 1
96 // AVX512DQ: #define __AVX512DQ__ 1
97 // AVX512DQ: #define __AVX512F__ 1
98 // AVX512DQ: #define __AVX__ 1
99 // AVX512DQ: #define __EVEX512__ 1
100 // AVX512DQ: #define __SSE2_MATH__ 1
101 // AVX512DQ: #define __SSE2__ 1
102 // AVX512DQ: #define __SSE3__ 1
103 // AVX512DQ: #define __SSE4_1__ 1
104 // AVX512DQ: #define __SSE4_2__ 1
105 // AVX512DQ: #define __SSE_MATH__ 1
106 // AVX512DQ: #define __SSE__ 1
107 // AVX512DQ: #define __SSSE3__ 1
109 // RUN: %clang -target i386-unknown-unknown -march=atom -mavx512bw -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=AVX512BW %s
111 // AVX512BW: #define __AVX2__ 1
112 // AVX512BW: #define __AVX512BW__ 1
113 // AVX512BW: #define __AVX512F__ 1
114 // AVX512BW: #define __AVX__ 1
115 // AVX512BW: #define __EVEX512__ 1
116 // AVX512BW: #define __SSE2_MATH__ 1
117 // AVX512BW: #define __SSE2__ 1
118 // AVX512BW: #define __SSE3__ 1
119 // AVX512BW: #define __SSE4_1__ 1
120 // AVX512BW: #define __SSE4_2__ 1
121 // AVX512BW: #define __SSE_MATH__ 1
122 // AVX512BW: #define __SSE__ 1
123 // AVX512BW: #define __SSSE3__ 1
125 // RUN: %clang -target i386-unknown-unknown -march=atom -mavx512vl -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=AVX512VL %s
127 // AVX512VL: #define __AVX2__ 1
128 // AVX512VL: #define __AVX512F__ 1
129 // AVX512VL: #define __AVX512VL__ 1
130 // AVX512VL: #define __AVX__ 1
131 // AVX512VL: #define __EVEX256__ 1
132 // AVX512VL: #define __EVEX512__ 1
133 // AVX512VL: #define __SSE2_MATH__ 1
134 // AVX512VL: #define __SSE2__ 1
135 // AVX512VL: #define __SSE3__ 1
136 // AVX512VL: #define __SSE4_1__ 1
137 // AVX512VL: #define __SSE4_2__ 1
138 // AVX512VL: #define __SSE_MATH__ 1
139 // AVX512VL: #define __SSE__ 1
140 // AVX512VL: #define __SSSE3__ 1
142 // RUN: %clang -target i386-unknown-unknown -march=atom -mavx512ifma -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=AVX512IFMA %s
144 // AVX512IFMA: #define __AVX2__ 1
145 // AVX512IFMA: #define __AVX512F__ 1
146 // AVX512IFMA: #define __AVX512IFMA__ 1
147 // AVX512IFMA: #define __AVX__ 1
148 // AVX512IFMA: #define __EVEX512__ 1
149 // AVX512IFMA: #define __SSE2_MATH__ 1
150 // AVX512IFMA: #define __SSE2__ 1
151 // AVX512IFMA: #define __SSE3__ 1
152 // AVX512IFMA: #define __SSE4_1__ 1
153 // AVX512IFMA: #define __SSE4_2__ 1
154 // AVX512IFMA: #define __SSE_MATH__ 1
155 // AVX512IFMA: #define __SSE__ 1
156 // AVX512IFMA: #define __SSSE3__ 1
158 // RUN: %clang -target i386-unknown-unknown -march=atom -mavx512vbmi -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=AVX512VBMI %s
160 // AVX512VBMI: #define __AVX2__ 1
161 // AVX512VBMI: #define __AVX512BW__ 1
162 // AVX512VBMI: #define __AVX512F__ 1
163 // AVX512VBMI: #define __AVX512VBMI__ 1
164 // AVX512VBMI: #define __AVX__ 1
165 // AVX512VBMI: #define __EVEX512__ 1
166 // AVX512VBMI: #define __SSE2_MATH__ 1
167 // AVX512VBMI: #define __SSE2__ 1
168 // AVX512VBMI: #define __SSE3__ 1
169 // AVX512VBMI: #define __SSE4_1__ 1
170 // AVX512VBMI: #define __SSE4_2__ 1
171 // AVX512VBMI: #define __SSE_MATH__ 1
172 // AVX512VBMI: #define __SSE__ 1
173 // AVX512VBMI: #define __SSSE3__ 1
175 // RUN: %clang -target i386-unknown-unknown -march=atom -mavx512bitalg -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=AVX512BITALG %s
177 // AVX512BITALG: #define __AVX2__ 1
178 // AVX512BITALG: #define __AVX512BITALG__ 1
179 // AVX512BITALG: #define __AVX512BW__ 1
180 // AVX512BITALG: #define __AVX512F__ 1
181 // AVX512BITALG: #define __AVX__ 1
182 // AVX512BITALG: #define __EVEX512__ 1
183 // AVX512BITALG: #define __SSE2_MATH__ 1
184 // AVX512BITALG: #define __SSE2__ 1
185 // AVX512BITALG: #define __SSE3__ 1
186 // AVX512BITALG: #define __SSE4_1__ 1
187 // AVX512BITALG: #define __SSE4_2__ 1
188 // AVX512BITALG: #define __SSE_MATH__ 1
189 // AVX512BITALG: #define __SSE__ 1
190 // AVX512BITALG: #define __SSSE3__ 1
193 // 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
195 // AVX512VBMINOAVX512BW-NOT: #define __AVX512BW__ 1
196 // AVX512VBMINOAVX512BW-NOT: #define __AVX512VBMI__ 1
197 // AVX512VBMINOAVX512BW: #define __EVEX512__ 1
199 // RUN: %clang -target i386-unknown-unknown -march=atom -mavx512vbmi2 -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=AVX512VBMI2 %s
201 // AVX512VBMI2: #define __AVX2__ 1
202 // AVX512VBMI2: #define __AVX512BW__ 1
203 // AVX512VBMI2: #define __AVX512F__ 1
204 // AVX512VBMI2: #define __AVX512VBMI2__ 1
205 // AVX512VBMI2: #define __AVX__ 1
206 // AVX512VBMI2: #define __EVEX512__ 1
207 // AVX512VBMI2: #define __SSE2_MATH__ 1
208 // AVX512VBMI2: #define __SSE2__ 1
209 // AVX512VBMI2: #define __SSE3__ 1
210 // AVX512VBMI2: #define __SSE4_1__ 1
211 // AVX512VBMI2: #define __SSE4_2__ 1
212 // AVX512VBMI2: #define __SSE_MATH__ 1
213 // AVX512VBMI2: #define __SSE__ 1
214 // AVX512VBMI2: #define __SSSE3__ 1
216 // 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
218 // AVX512VBMI2NOAVX512BW-NOT: #define __AVX512BW__ 1
219 // AVX512VBMI2NOAVX512BW-NOT: #define __AVX512VBMI2__ 1
220 // AVX512VBMI2NOAVX512BW: #define __EVEX512__ 1
222 // 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
224 // AVX512BITALGNOAVX512BW-NOT: #define __AVX512BITALG__ 1
225 // AVX512BITALGNOAVX512BW-NOT: #define __AVX512BW__ 1
226 // AVX512BITALGNOAVX512BW: #define __EVEX512__ 1
228 // RUN: %clang -target i386-unknown-unknown -march=atom -msse4.2 -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=SSE42POPCNT %s
230 // SSE42POPCNT: #define __POPCNT__ 1
232 // 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
234 // SSE42NOPOPCNT-NOT: #define __POPCNT__ 1
236 // 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
238 // NOSSE42POPCNT: #define __POPCNT__ 1
240 // 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
241 // 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
242 // 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
244 // CPUPOPCNT: #define __POPCNT__ 1
246 // RUN: %clang -target i386-unknown-unknown -march=pentium -msse -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=SSEMMX %s
248 // SSEMMX: #define __MMX__ 1
250 // 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
252 // SSENOSSEMMX-NOT: #define __MMX__ 1
254 // 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
256 // SSENOMMX-NOT: #define __MMX__ 1
258 // RUN: %clang -target i386-unknown-unknown -march=pentium3 -mno-sse -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=MARCHMMXNOSSE %s
259 // RUN: %clang -target i386-unknown-unknown -march=atom -mno-sse -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=MARCHMMXNOSSE %s
260 // RUN: %clang -target i386-unknown-unknown -march=knl -mno-sse -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=MARCHMMXNOSSE %s
261 // RUN: %clang -target i386-unknown-unknown -march=btver1 -mno-sse -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=MARCHMMXNOSSE %s
262 // RUN: %clang -target i386-unknown-unknown -march=znver1 -mno-sse -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=MARCHMMXNOSSE %s
264 // MARCHMMXNOSSE: #define __MMX__ 1
266 // RUN: %clang -target i386-unknown-unknown -march=atom -mf16c -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=F16C %s
268 // F16C: #define __AVX__ 1
269 // F16C: #define __F16C__ 1
271 // 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
273 // F16CNOAVX-NOT: #define __AVX__ 1
274 // F16CNOAVX-NOT: #define __F16C__ 1
276 // RUN: %clang -target i386-unknown-unknown -march=pentiumpro -mpclmul -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=PCLMUL %s
278 // PCLMUL: #define __PCLMUL__ 1
279 // PCLMUL: #define __SSE2__ 1
280 // PCLMUL-NOT: #define __SSE3__ 1
282 // 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
284 // PCLMULNOSSE2-NOT: #define __PCLMUL__ 1
285 // PCLMULNOSSE2-NOT: #define __SSE2__ 1
286 // PCLMULNOSSE2-NOT: #define __SSE3__ 1
288 // RUN: %clang -target i386-unknown-unknown -march=pentiumpro -maes -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=AES %s
290 // AES: #define __AES__ 1
291 // AES: #define __SSE2__ 1
292 // AES-NOT: #define __SSE3__ 1
294 // 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
296 // AESNOSSE2-NOT: #define __AES__ 1
297 // AESNOSSE2-NOT: #define __SSE2__ 1
298 // AESNOSSE2-NOT: #define __SSE3__ 1
300 // RUN: %clang -target i386-unknown-unknown -march=pentiumpro -mlwp -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=LWP %s
302 // LWP: #define __LWP__ 1
304 // RUN: %clang -target i386-unknown-unknown -march=bdver1 -mno-lwp -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=NOLWP %s
306 // NOLWP-NOT: #define __LWP__ 1
308 // RUN: %clang -target i386-unknown-unknown -march=pentiumpro -msha -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=SHA %s
310 // SHA: #define __SHA__ 1
311 // SHA: #define __SSE2__ 1
312 // SHA-NOT: #define __SSE3__ 1
314 // 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
316 // SHANOSHA-NOT: #define __SHA__ 1
317 // SHANOSHA-NOT: #define __SSE2__ 1
319 // 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
321 // SHANOSSE2-NOT: #define __SHA__ 1
322 // SHANOSSE2-NOT: #define __SSE2__ 1
323 // SHANOSSE2-NOT: #define __SSE3__ 1
325 // RUN: %clang -target i386-unknown-unknown -march=atom -mtbm -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=TBM %s
327 // TBM: #define __TBM__ 1
329 // RUN: %clang -target i386-unknown-unknown -march=bdver2 -mno-tbm -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=NOTBM %s
331 // NOTBM-NOT: #define __TBM__ 1
333 // RUN: %clang -target i386-unknown-unknown -march=pentiumpro -mcx16 -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=MCX16-32 %s
335 // MCX16-32-NOT: #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_16 1
337 // 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
339 // MCX16-64: #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_16 1
341 // RUN: %clang -target i386-unknown-unknown -march=atom -mprfchw -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=PRFCHW %s
343 // PRFCHW: #define __PRFCHW__ 1
345 // RUN: %clang -target i386-unknown-unknown -march=btver2 -mno-prfchw -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=NOPRFCHW %s
347 // NOPRFCHW-NOT: #define __PRFCHW__ 1
349 // RUN: %clang -target i386-unknown-unknown -march=atom -m3dnow -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=3DNOWPRFCHW %s
351 // 3DNOWPRFCHW-NOT: #define __3dNOW__ 1
352 // 3DNOWPRFCHW-NOT: #define __PRFCHW__ 1
354 // 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
356 // 3DNOWNOPRFCHW-NOT: #define __3dNOW__ 1
357 // 3DNOWNOPRFCHW-NOT: #define __PRFCHW__ 1
359 // 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
361 // NO3DNOWPRFCHW: #define __PRFCHW__ 1
363 // RUN: %clang -target i386-unknown-unknown -march=atom -madx -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=ADX %s
365 // ADX: #define __ADX__ 1
367 // RUN: %clang -target i386-unknown-unknown -mshstk -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=SHSTK %s
369 // SHSTK: #define __SHSTK__ 1
371 // RUN: %clang -target i386-unknown-unknown -march=atom -mrdseed -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=RDSEED %s
373 // RDSEED: #define __RDSEED__ 1
375 // RUN: %clang -target i386-unknown-unknown -march=atom -mxsave -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=XSAVE %s
377 // XSAVE: #define __XSAVE__ 1
379 // RUN: %clang -target i386-unknown-unknown -march=atom -mxsaveopt -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=XSAVEOPT %s
381 // XSAVEOPT: #define __XSAVEOPT__ 1
382 // XSAVEOPT: #define __XSAVE__ 1
384 // RUN: %clang -target i386-unknown-unknown -march=atom -mxsavec -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=XSAVEC %s
386 // XSAVEC: #define __XSAVEC__ 1
387 // XSAVEC: #define __XSAVE__ 1
389 // RUN: %clang -target i386-unknown-unknown -march=atom -mxsaves -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=XSAVES %s
391 // XSAVES: #define __XSAVES__ 1
392 // XSAVES: #define __XSAVE__ 1
394 // 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
396 // NOXSAVE-NOT: #define __XSAVEC__ 1
397 // NOXSAVE-NOT: #define __XSAVEOPT__ 1
398 // NOXSAVE-NOT: #define __XSAVES__ 1
399 // NOXSAVE-NOT: #define __XSAVE__ 1
401 // RUN: %clang -target i386-unknown-unknown -march=atom -mclflushopt -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=CLFLUSHOPT %s
403 // CLFLUSHOPT: #define __CLFLUSHOPT__ 1
405 // RUN: %clang -target i386-unknown-unknown -march=atom -mvaes -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=VAES %s
407 // VAES: #define __AES__ 1
408 // VAES: #define __VAES__ 1
410 // 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
412 // VAESNOAES-NOT: #define __AES__ 1
413 // VAESNOAES-NOT: #define __VAES__ 1
415 // RUN: %clang -target i386-unknown-unknown -march=atom -mgfni -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=GFNI %s
417 // GFNI: #define __GFNI__ 1
418 // GFNI: #define __SSE2__ 1
420 // RUN: %clang -target i386-unknown-unknown -march=atom -mvpclmulqdq -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=VPCLMULQDQ %s
422 // VPCLMULQDQ: #define __PCLMUL__ 1
423 // VPCLMULQDQ: #define __VPCLMULQDQ__ 1
425 // 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
426 // VPCLMULQDQNOPCLMUL-NOT: #define __PCLMUL__ 1
427 // VPCLMULQDQNOPCLMUL-NOT: #define __VPCLMULQDQ__ 1
429 // RUN: %clang -target i386-unknown-unknown -march=atom -mrdpid -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=RDPID %s
431 // RDPID: #define __RDPID__ 1
433 // RUN: %clang -target i386-unknown-unknown -march=atom -mavx512bf16 -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=AVX512BF16 %s
435 // AVX512BF16: #define __AVX512BF16__ 1
436 // AVX512BF16: #define __AVX512BW__ 1
437 // AVX512BF16-NOT: #define __AVX512VL__ 1
438 // AVX512BF16: #define __EVEX512__ 1
440 // 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
442 // AVX512BF16_NOAVX512BW-NOT: #define __AVX512BF16__ 1
443 // AVX512BF16_NOAVX512BW: #define __EVEX512__ 1
445 // 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
447 // AVX512BF16_NOAVX512VL: #define __AVX512BF16__ 1
448 // AVX512BF16_NOAVX512VL-NOT: #define __EVEX256__ 1
449 // AVX512BF16_NOAVX512VL: #define __EVEX512__ 1
451 // RUN: %clang -target i386-unknown-linux-gnu -march=i386 -mavx512vp2intersect -x c -E -dM -o - %s | FileCheck -check-prefix=VP2INTERSECT %s
453 // VP2INTERSECT: #define __AVX512F__ 1
454 // VP2INTERSECT: #define __AVX512VP2INTERSECT__ 1
455 // VP2INTERSECT: #define __EVEX512__ 1
457 // RUN: %clang -target i386-unknown-linux-gnu -march=i386 -mno-avx512vp2intersect -x c -E -dM -o - %s | FileCheck -check-prefix=NOVP2INTERSECT %s
458 // RUN: %clang -target i386-unknown-linux-gnu -march=i386 -mavx512vp2intersect -mno-avx512f -x c -E -dM -o - %s | FileCheck -check-prefix=NOVP2INTERSECT %s
460 // NOVP2INTERSECT-NOT: #define __AVX512VP2INTERSECT__ 1
461 // NOVP2INTERSECT-NOT: #define __EVEX256__ 1
462 // NOVP2INTERSECT-NOT: #define __EVEX512__ 1
465 // RUN: %clang -target i386-unknown-linux-gnu -march=i386 -mkl -x c -E -dM -o - %s | FileCheck -check-prefix=KEYLOCKER %s
466 // KEYLOCKER: #define __KL__ 1
468 // RUN: %clang -target i386-unknown-linux-gnu -march=i386 -mno-kl -x c -E -dM -o - %s | FileCheck -check-prefix=NOKEYLOCKER %s
469 // NOKEYLOCKER-NOT: #define __KL__ 1
471 // RUN: %clang -target i386-unknown-linux-gnu -march=i386 -mwidekl -x c -E -dM -o - %s | FileCheck -check-prefix=KEYLOCKERW %s
472 // KEYLOCKERW: #define __KL__ 1
473 // KEYLOCKERW: #define __WIDEKL__ 1
475 // RUN: %clang -target i386-unknown-linux-gnu -march=i386 -mno-widekl -x c -E -dM -o - %s | FileCheck -check-prefix=NOKEYLOCKERW %s
476 // NOKEYLOCKERW-NOT: #define __KL__ 1
477 // NOKEYLOCKERW-NOT: #define __WIDEKL__ 1
479 // RUN: %clang -target i386-unknown-linux-gnu -march=i386 -mwidekl -mno-kl -x c -E -dM -o - %s | FileCheck -check-prefix=NOKEYLOCKERW2 %s
480 // NOKEYLOCKERW2-NOT: #define __KL__ 1
481 // NOKEYLOCKERW2-NOT: #define __WIDEKL__ 1
483 // RUN: %clang -target i386-unknown-unknown -march=atom -menqcmd -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=ENQCMD %s
485 // ENQCMD: #define __ENQCMD__ 1
487 // RUN: %clang -target i386-unknown-unknown -march=atom -mno-enqcmd -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=NOENQCMD %s
489 // NOENQCMD-NOT: #define __ENQCMD__ 1
491 // RUN: %clang -target i386-unknown-unknown -march=atom -mserialize -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=SERIALIZE %s
493 // SERIALIZE: #define __SERIALIZE__ 1
495 // RUN: %clang -target i386-unknown-unknown -march=atom -mno-serialize -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=NOSERIALIZE %s
497 // NOSERIALIZE-NOT: #define __SERIALIZE__ 1
499 // RUN: %clang -target i386-unknown-unknown -march=atom -mtsxldtrk -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=TSXLDTRK %s
501 // TSXLDTRK: #define __TSXLDTRK__ 1
503 // RUN: %clang -target i386-unknown-unknown -march=atom -mno-tsxldtrk -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=NOTSXLDTRK %s
505 // NOTSXLDTRK-NOT: #define __TSXLDTRK__ 1
507 // RUN: %clang -target i386-unknown-unknown -march=atom -mhreset -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=HRESET %s
509 // HRESET: #define __HRESET__ 1
511 // RUN: %clang -target i386-unknown-unknown -march=atom -mno-hreset -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=NOHRESET %s
513 // NOHRESET-NOT: #define __HRESET__ 1
515 // RUN: %clang -target x86_64-unknown-linux-gnu -march=x86-64 -muintr -x c -E -dM -o - %s | FileCheck -check-prefix=UINTR %s
517 // UINTR: #define __UINTR__ 1
519 // RUN: %clang -target x86_64-unknown-linux-gnu -march=x86-64 -mno-uintr -x c -E -dM -o - %s | FileCheck -check-prefix=NOUINTR %s
521 // NOUINTR-NOT: #define __UINTR__ 1
523 // RUN: %clang -target x86_64-unknown-linux-gnu -march=atom -mamx-fp16 -x c \
524 // RUN: -E -dM -o - %s | FileCheck -check-prefix=AMX-FP16 %s
526 // AMX-FP16: #define __AMX_FP16__ 1
527 // AMX-FP16: #define __AMX_TILE__ 1
529 // RUN: %clang -target x86_64-unknown-linux-gnu -march=atom -mno-amx-fp16 \
530 // RUN: -x c -E -dM -o - %s | FileCheck -check-prefix=NO-AMX-FP16 %s
531 // RUN: %clang -target x86_64-unknown-linux-gnu -march=atom -mamx-fp16 \
532 // RUN: -mno-amx-tile -x c -E -dM -o - %s | FileCheck -check-prefix=NO-AMX-FP16 %s
534 // NO-AMX-FP16-NOT: #define __AMX_FP16__ 1
535 // NO-AMX-FP16-NOT: #define __AMX_TILE__ 1
537 // RUN: %clang -target x86_64-unknown-linux-gnu -march=x86-64 -mamx-complex -x c \
538 // RUN: -E -dM -o - %s | FileCheck -check-prefix=AMX-COMPLEX %s
540 // AMX-COMPLEX: #define __AMX_COMPLEX__ 1
542 // RUN: %clang -target x86_64-unknown-linux-gnu -march=x86-64 -mno-amx-complex -x c \
543 // RUN: -E -dM -o - %s | FileCheck -check-prefix=NO-AMX-COMPLEX %s
544 // RUN: %clang -target x86_64-unknown-linux-gnu -march=x86-64 -mamx-complex -mno-amx-tile \
545 // RUN: -x c -E -dM -o - %s | FileCheck -check-prefix=NO-AMX-COMPLEX %s
547 // NO-AMX-COMPLEX-NOT: #define __AMX_COMPLEX__ 1
549 // RUN: %clang -target x86_64-unknown-linux-gnu -march=x86-64 -mamx-transpose -x c \
550 // RUN: -E -dM -o - %s | FileCheck -check-prefix=AMX-TRANSPOSE %s
552 // AMX-TRANSPOSE: #define __AMX_TRANSPOSE__ 1
554 // RUN: %clang -target x86_64-unknown-linux-gnu -march=x86-64 -mno-amx-transpose -x c \
555 // RUN: -E -dM -o - %s | FileCheck -check-prefix=NO-AMX-TRANSPOSE %s
556 // RUN: %clang -target x86_64-unknown-linux-gnu -march=x86-64 -mamx-transpose -mno-amx-tile \
557 // RUN: -x c -E -dM -o - %s | FileCheck -check-prefix=NO-AMX-TRANSPOSE %s
559 // NO-AMX-TRANSPOSE-NOT: #define __AMX_TRANSPOSE__ 1
561 // RUN: %clang -target x86_64-unknown-linux-gnu -march=x86-64 -mamx-avx512 -x c \
562 // RUN: -E -dM -o - %s | FileCheck -check-prefix=AMX-AVX512 %s
564 // AMX-AVX512: #define __AMX_AVX512__ 1
566 // RUN: %clang -target x86_64-unknown-linux-gnu -march=x86-64 -mno-amx-avx512 -x c \
567 // RUN: -E -dM -o - %s | FileCheck -check-prefix=NO-AMX-AVX512 %s
568 // RUN: %clang -target x86_64-unknown-linux-gnu -march=x86-64 -mamx-avx512 -mno-amx-tile \
569 // RUN: -x c -E -dM -o - %s | FileCheck -check-prefix=NO-AMX-AVX512 %s
571 // NO-AMX-AVX512-NOT: #define __AMX_AVX512__ 1
573 // RUN: %clang -target x86_64-unknown-linux-gnu -march=x86-64 -mamx-tf32 -x c \
574 // RUN: -E -dM -o - %s | FileCheck -check-prefix=AMX-TF32 %s
575 // AMX-TF32: #define __AMX_TF32__ 1
576 // RUN: %clang -target x86_64-unknown-linux-gnu -march=x86-64 -mno-amx-tf32 -x c \
577 // RUN: -E -dM -o - %s | FileCheck -check-prefix=NO-AMX-TF32 %s
578 // RUN: %clang -target x86_64-unknown-linux-gnu -march=x86-64 -mamx-tf32 -mno-amx-tile \
579 // RUN: -x c -E -dM -o - %s | FileCheck -check-prefix=NO-AMX-TF32 %s
580 // NO-AMX-TF32-NOT: #define __AMX_TF32__ 1
582 // RUN: %clang -target i386-unknown-unknown -march=atom -mavxvnni -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=AVXVNNI %s
584 // AVXVNNI: #define __AVX2__ 1
585 // AVXVNNI: #define __AVXVNNI__ 1
587 // RUN: %clang -target i386-unknown-unknown -march=atom -mno-avxvnni -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=NOAVXVNNI %s
589 // NOAVXVNNI-NOT: #define __AVXVNNI__ 1
591 // 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
593 // AVXVNNINOAVX2-NOT: #define __AVX2__ 1
594 // AVXVNNINOAVX2-NOT: #define __AVXVNNI__ 1
596 // RUN: %clang -target i386-unknown-unknown -march=atom -mavx512fp16 -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=AVX512FP16 %s
598 // AVX512FP16: #define __AVX512BW__ 1
599 // AVX512FP16: #define __AVX512DQ__ 1
600 // AVX512FP16: #define __AVX512FP16__ 1
601 // AVX512FP16: #define __AVX512VL__ 1
602 // AVX512FP16: #define __EVEX256__ 1
603 // AVX512FP16: #define __EVEX512__ 1
605 // 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
607 // AVX512FP16NOAVX512VL-NOT: #define __AVX512FP16__ 1
608 // AVX512FP16NOAVX512VL-NOT: #define __AVX512VL__ 1
609 // AVX512FP16NOAVX512VL-NOT: #define __EVEX256__ 1
610 // AVX512FP16NOAVX512VL: #define __EVEX512__ 1
612 // 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
614 // AVX512FP16NOAVX512BW-NOT: #define __AVX512BW__ 1
615 // AVX512FP16NOAVX512BW-NOT: #define __AVX512FP16__ 1
616 // AVX512FP16NOAVX512BW: #define __EVEX256__ 1
617 // AVX512FP16NOAVX512BW: #define __EVEX512__ 1
619 // 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
621 // AVX512FP16NOAVX512DQ-NOT: #define __AVX512DQ__ 1
622 // AVX512FP16NOAVX512DQ-NOT: #define __AVX512FP16__ 1
623 // AVX512FP16NOAVX512DQ: #define __EVEX256__ 1
624 // AVX512FP16NOAVX512DQ: #define __EVEX512__ 1
626 // RUN: %clang -target i386-unknown-unknown -march=atom -mavx512f -mno-avx512f -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=NOEVEX512 %s
627 // RUN: %clang -target i386-unknown-unknown -march=atom -mavx512cd -mno-avx512f -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=NOEVEX512 %s
628 // NOEVEX512-NOT: #define __AVX512F__ 1
629 // NOEVEX512-NOT: #define __EVEX256__ 1
630 // NOEVEX512-NOT: #define __EVEX512__ 1
632 // RUN: %clang -target i386-unknown-unknown -march=atom -mavx512f -mno-evex512 -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=AVX512NOEVEX512 %s
633 // RUN: %clang -target i386-unknown-unknown -march=atom -mavx512cd -mno-evex512 -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=AVX512NOEVEX512 %s
634 // AVX512NOEVEX512: #define __AVX512F__ 1
635 // AVX512NOEVEX512-NOT: #define __EVEX256__ 1
636 // AVX512NOEVEX512-NOT: #define __EVEX512__ 1
638 // RUN: %clang -target x86_64-unknown-linux-gnu -march=atom -mcmpccxadd -x c -E -dM -o - %s | FileCheck -check-prefix=CMPCCXADD %s
640 // CMPCCXADD: #define __CMPCCXADD__ 1
642 // RUN: %clang -target x86_64-unknown-linux-gnu -march=atom -mno-cmpccxadd -x c -E -dM -o - %s | FileCheck -check-prefix=NO-CMPCCXADD %s
644 // NO-CMPCCXADD-NOT: #define __CMPCCXADD__ 1
645 // RUN: %clang -target i386-unknown-unknown -march=atom -mavxifma -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=AVXIFMA %s
647 // AVXIFMA: #define __AVX2__ 1
648 // AVXIFMA: #define __AVXIFMA__ 1
650 // 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
652 // AVXIFMANOAVX2-NOT: #define __AVX2__ 1
653 // AVXIFMANOAVX2-NOT: #define __AVXIFMA__ 1
655 // RUN: %clang -target i386-unknown-linux-gnu -march=atom -mraoint -x c -E -dM -o - %s | FileCheck -check-prefix=RAOINT %s
657 // RAOINT: #define __RAOINT__ 1
659 // RUN: %clang -target i386-unknown-linux-gnu -march=atom -mno-raoint -x c -E -dM -o - %s | FileCheck -check-prefix=NO-RAOINT %s
661 // NO-RAOINT-NOT: #define __RAOINT__ 1
663 // RUN: %clang -target i386-unknown-unknown -march=atom -mavxvnniint8 -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=AVXVNNIINT8 %s
665 // AVXVNNIINT8: #define __AVX2__ 1
666 // AVXVNNIINT8: #define __AVXVNNIINT8__ 1
668 // RUN: %clang -target i386-unknown-unknown -march=atom -mno-avxvnniint8 -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=NOAVXVNNIINT8 %s
670 // NOAVXVNNIINT8-NOT: #define __AVXVNNIINT8__ 1
672 // 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
674 // AVXVNNIINT8NOAVX2-NOT: #define __AVX2__ 1
675 // AVXVNNIINT8NOAVX2-NOT: #define __AVXVNNIINT8__ 1
677 // RUN: %clang -target i386-unknown-unknown -march=atom -mavxneconvert -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=AVXNECONVERT %s
679 // AVXNECONVERT: #define __AVX2__ 1
680 // AVXNECONVERT: #define __AVXNECONVERT__ 1
682 // RUN: %clang -target i386-unknown-unknown -march=atom -mno-avxneconvert -x c -E -dM -o - %s | FileCheck -match-full-lines --check-prefix=NOAVXNECONVERT %s
684 // NOAVXNECONVERT-NOT: #define __AVXNECONVERT__ 1
686 // 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
688 // AVXNECONVERTNOAVX2-NOT: #define __AVX2__ 1
689 // AVXNECONVERTNOAVX2-NOT: #define __AVXNECONVERT__ 1
691 // RUN: %clang -target i386-unknown-linux-gnu -march=atom -msha512 -x c -E -dM -o - %s | FileCheck -check-prefix=SHA512 %s
693 // SHA512: #define __AVX__ 1
694 // SHA512: #define __SHA512__ 1
696 // RUN: %clang -target i386-unknown-linux-gnu -march=atom -mno-sha512 -x c -E -dM -o - %s | FileCheck -check-prefix=NOSHA512 %s
697 // NOSHA512-NOT: #define __SHA512__ 1
699 // RUN: %clang -target i386-unknown-linux-gnu -march=atom -msha512 -mno-avx -x c -E -dM -o - %s | FileCheck -check-prefix=SHA512NOAVX %s
701 // SHA512NOAVX-NOT: #define __AVX__ 1
702 // SHA512NOAVX-NOT: #define __SHA512__ 1
704 // RUN: %clang -target i686-unknown-linux-gnu -march=atom -msm3 -x c -E -dM -o - %s | FileCheck -check-prefix=SM3 %s
706 // SM3: #define __AVX__ 1
707 // SM3: #define __SM3__ 1
709 // RUN: %clang -target i686-unknown-linux-gnu -march=atom -mno-sm3 -x c -E -dM -o - %s | FileCheck -check-prefix=NOSM3 %s
711 // NOSM3-NOT: #define __SM3__ 1
713 // RUN: %clang -target i686-unknown-linux-gnu -march=atom -msm3 -mno-avx -x c -E -dM -o - %s | FileCheck -check-prefix=SM3NOAVX %s
715 // SM3NOAVX-NOT: #define __SM3__ 1
716 // SM3NOAVX-NOT: #define __AVX__ 1
718 // RUN: %clang -target i686-unknown-linux-gnu -march=atom -msm4 -x c -E -dM -o - %s | FileCheck -check-prefix=SM4 %s
720 // SM4: #define __AVX__ 1
721 // SM4: #define __SM4__ 1
723 // RUN: %clang -target i686-unknown-linux-gnu -march=atom -mno-sm4 -x c -E -dM -o - %s | FileCheck -check-prefix=NOSM4 %s
724 // NOSM4-NOT: #define __SM4__ 1
726 // RUN: %clang -target i686-unknown-linux-gnu -march=atom -msm4 -mno-avx -x c -E -dM -o - %s | FileCheck -check-prefix=SM4NOAVX %s
728 // SM4NOAVX-NOT: #define __AVX__ 1
729 // SM4NOAVX-NOT: #define __SM4__ 1
731 // RUN: %clang -target i686-unknown-linux-gnu -march=atom -mavxvnniint16 -x c -E -dM -o - %s | FileCheck -check-prefix=AVXVNNIINT16 %s
733 // AVXVNNIINT16: #define __AVX2__ 1
734 // AVXVNNIINT16: #define __AVXVNNIINT16__ 1
736 // RUN: %clang -target i686-unknown-linux-gnu -march=atom -mno-avxvnniint16 -x c -E -dM -o - %s | FileCheck -check-prefix=NOAVXVNNIINT16 %s
738 // NOAVXVNNIINT16-NOT: #define __AVXVNNIINT16__ 1
740 // RUN: %clang -target i686-unknown-linux-gnu -march=atom -mavxvnniint16 -mno-avx2 -x c -E -dM -o - %s | FileCheck -check-prefix=AVXVNNIINT16NOAVX2 %s
742 // AVXVNNIINT16NOAVX2-NOT: #define __AVX2__ 1
743 // AVXVNNIINT16NOAVX2-NOT: #define __AVXVNNIINT16__ 1
745 // RUN: %clang -target i686-unknown-linux-gnu -march=atom -mavx10.1 -x c -E -dM -o - %s | FileCheck -check-prefix=AVX10_1_256 %s
746 // RUN: %clang -target i686-unknown-linux-gnu -march=atom -mavx10.1-256 -x c -E -dM -o - %s | FileCheck -check-prefix=AVX10_1_256 %s
747 // RUN: %clang -target i686-unknown-linux-gnu -march=atom -mavx10.1-256 -mno-avx512f -x c -E -dM -o - %s | FileCheck -check-prefix=AVX10_1_256 %s
748 // RUN: %clang -target i686-unknown-linux-gnu -march=atom -mavx10.2 -x c -E -dM -o - %s | FileCheck -check-prefixes=AVX10_1_256,AVX10_2_256 %s
749 // RUN: %clang -target i686-unknown-linux-gnu -march=atom -mavx10.2-256 -x c -E -dM -o - %s | FileCheck -check-prefixes=AVX10_1_256,AVX10_2_256 %s
750 // AVX10_1_256-NOT: __AVX10_1_512__
751 // AVX10_1_256: #define __AVX10_1__ 1
752 // AVX10_2_256-NOT: __AVX10_2_512__
753 // AVX10_2_256: #define __AVX10_2__ 1
754 // AVX10_1_256: #define __AVX512F__ 1
755 // AVX10_1_256: #define __EVEX256__ 1
756 // AVX10_1_256-NOT: __EVEX512__
758 // RUN: %clang -target i686-unknown-linux-gnu -march=atom -mavx10.1-512 -x c -E -dM -o - %s | FileCheck -check-prefix=AVX10_1_512 %s
759 // RUN: %clang -target i686-unknown-linux-gnu -march=atom -mavx10.1-512 -mno-avx512f -x c -E -dM -o - %s | FileCheck -check-prefix=AVX10_1_512 %s
760 // RUN: %clang -target i686-unknown-linux-gnu -march=atom -mavx10.1-512 -mno-evex512 -x c -E -dM -o - %s | FileCheck -check-prefix=AVX10_1_512 %s
761 // RUN: %clang -target i686-unknown-linux-gnu -march=atom -mavx10.2-512 -x c -E -dM -o - %s | FileCheck -check-prefixes=AVX10_1_512,AVX10_2_512 %s
762 // AVX10_1_512: #define __AVX10_1_512__ 1
763 // AVX10_1_512: #define __AVX10_1__ 1
764 // AVX10_2_512: #define __AVX10_2_512__ 1
765 // AVX10_2_512: #define __AVX10_2__ 1
766 // AVX10_1_512: #define __AVX512F__ 1
767 // AVX10_1_512: #define __EVEX256__ 1
768 // AVX10_1_512: #define __EVEX512__ 1
770 // RUN: %clang -target i686-unknown-linux-gnu -march=atom -musermsr -x c -E -dM -o - %s | FileCheck -check-prefix=USERMSR %s
771 // USERMSR: #define __USERMSR__ 1
773 // RUN: %clang -target i686-unknown-linux-gnu -march=atom -mno-usermsr -x c -E -dM -o - %s | FileCheck -check-prefix=NO-USERMSR %s
774 // NO-USERMSR-NOT: #define __USERMSR__ 1
776 // RUN: %clang -target i686-unknown-linux-gnu -march=atom -mmovrs -x c -E -dM -o - %s | FileCheck -check-prefix=MOVRS %s
777 // MOVRS: #define __MOVRS__ 1
779 // RUN: %clang -target i686-unknown-linux-gnu -march=atom -mno-movrs -x c -E -dM -o - %s | FileCheck -check-prefix=NO-MOVRS %s
780 // NO-MOVRS-NOT: #define __MOVRS__ 1
782 // RUN: %clang -target i386-unknown-linux-gnu -march=i386 -mcrc32 -x c -E -dM -o - %s | FileCheck -check-prefix=CRC32 %s
784 // CRC32: #define __CRC32__ 1
786 // RUN: %clang -target i386-unknown-linux-gnu -march=i386 -mno-crc32 -x c -E -dM -o - %s | FileCheck -check-prefix=NOCRC32 %s
788 // NOCRC32-NOT: #define __CRC32__ 1
790 // RUN: %clang -target i386-unknown-linux-gnu -march=i386 -mrdpru -x c -E -dM -o - %s | FileCheck -check-prefix=RDPRU %s
792 // RDPRU: #define __RDPRU__ 1
794 // RUN: %clang -target i386-unknown-linux-gnu -march=i386 -mno-rdpru -x c -E -dM -o - %s | FileCheck -check-prefix=NORDPRU %s
796 // NORDPRU-NOT: #define __RDPRU__ 1
798 // RUN: %clang -target x86_64-unknown-unknown -march=x86-64 -mapx-features=egpr -x c -E -dM -o - %s | FileCheck --check-prefix=EGPR %s
799 // RUN: %clang -target x86_64-unknown-unknown -march=x86-64 -mapx-features=push2pop2 -x c -E -dM -o - %s | FileCheck --check-prefix=PUSH2POP2 %s
800 // RUN: %clang -target x86_64-unknown-unknown -march=x86-64 -mapx-features=ppx -x c -E -dM -o - %s | FileCheck --check-prefix=PPX %s
801 // RUN: %clang -target x86_64-unknown-unknown -march=x86-64 -mapx-features=ndd -x c -E -dM -o - %s | FileCheck --check-prefix=NDD %s
802 // RUN: %clang -target x86_64-unknown-unknown -march=x86-64 -mapx-features=ccmp -x c -E -dM -o - %s | FileCheck --check-prefix=CCMP %s
803 // RUN: %clang -target x86_64-unknown-unknown -march=x86-64 -mapx-features=nf -x c -E -dM -o - %s | FileCheck --check-prefix=NF %s
804 // RUN: %clang -target x86_64-unknown-unknown -march=x86-64 -mapx-features=cf -x c -E -dM -o - %s | FileCheck --check-prefix=CF %s
805 // RUN: %clang -target x86_64-unknown-unknown -march=x86-64 -mapx-features=zu -x c -E -dM -o - %s | FileCheck --check-prefix=ZU %s
806 // 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,CF,ZU,APXF %s
807 // APXF: #define __APX_F__ 1
808 // CCMP: #define __CCMP__ 1
809 // CF: #define __CF__ 1
810 // EGPR: #define __EGPR__ 1
811 // NDD: #define __NDD__ 1
812 // NF: #define __NF__ 1
813 // PPX: #define __PPX__ 1
814 // PUSH2POP2: #define __PUSH2POP2__ 1
815 // ZU: #define __ZU__ 1
817 // 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
818 // 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
819 // NOUSEGPR32-NOT: #define __APX_INLINE_ASM_USE_GPR32__ 1
820 // USEGPR32: #define __APX_INLINE_ASM_USE_GPR32__ 1