• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Begin X86/GCC/Linux tests ----------------
2 //
3 // RUN: %clang -march=i386 -m32 -E -dM %s -o - 2>&1 \
4 // RUN:     -target i386-unknown-linux \
5 // RUN:   | FileCheck -match-full-lines %s -check-prefix=CHECK_I386_M32
6 // CHECK_I386_M32: #define __i386 1
7 // CHECK_I386_M32: #define __i386__ 1
8 // CHECK_I386_M32: #define __tune_i386__ 1
9 // CHECK_I386_M32: #define i386 1
10 // RUN: not %clang -march=i386 -m64 -E -dM %s -o - 2>&1 \
11 // RUN:     -target i386-unknown-linux \
12 // RUN:   | FileCheck -match-full-lines %s -check-prefix=CHECK_I386_M64
13 // CHECK_I386_M64: error: {{.*}}
14 //
15 // RUN: %clang -march=i486 -m32 -E -dM %s -o - 2>&1 \
16 // RUN:     -target i386-unknown-linux \
17 // RUN:   | FileCheck -match-full-lines %s -check-prefix=CHECK_I486_M32
18 // CHECK_I486_M32: #define __i386 1
19 // CHECK_I486_M32: #define __i386__ 1
20 // CHECK_I486_M32: #define __i486 1
21 // CHECK_I486_M32: #define __i486__ 1
22 // CHECK_I486_M32: #define __tune_i486__ 1
23 // CHECK_I486_M32: #define i386 1
24 // RUN: not %clang -march=i486 -m64 -E -dM %s -o - 2>&1 \
25 // RUN:     -target i386-unknown-linux \
26 // RUN:   | FileCheck -match-full-lines %s -check-prefix=CHECK_I486_M64
27 // CHECK_I486_M64: error: {{.*}}
28 //
29 // RUN: %clang -march=i586 -m32 -E -dM %s -o - 2>&1 \
30 // RUN:     -target i386-unknown-linux \
31 // RUN:   | FileCheck -match-full-lines %s -check-prefix=CHECK_I586_M32
32 // CHECK_I586_M32: #define __i386 1
33 // CHECK_I586_M32: #define __i386__ 1
34 // CHECK_I586_M32: #define __i586 1
35 // CHECK_I586_M32: #define __i586__ 1
36 // CHECK_I586_M32: #define __pentium 1
37 // CHECK_I586_M32: #define __pentium__ 1
38 // CHECK_I586_M32: #define __tune_i586__ 1
39 // CHECK_I586_M32: #define __tune_pentium__ 1
40 // CHECK_I586_M32: #define i386 1
41 // RUN: not %clang -march=i586 -m64 -E -dM %s -o - 2>&1 \
42 // RUN:     -target i386-unknown-linux \
43 // RUN:   | FileCheck -match-full-lines %s -check-prefix=CHECK_I586_M64
44 // CHECK_I586_M64: error: {{.*}}
45 //
46 // RUN: %clang -march=pentium -m32 -E -dM %s -o - 2>&1 \
47 // RUN:     -target i386-unknown-linux \
48 // RUN:   | FileCheck -match-full-lines %s -check-prefix=CHECK_PENTIUM_M32
49 // CHECK_PENTIUM_M32: #define __i386 1
50 // CHECK_PENTIUM_M32: #define __i386__ 1
51 // CHECK_PENTIUM_M32: #define __i586 1
52 // CHECK_PENTIUM_M32: #define __i586__ 1
53 // CHECK_PENTIUM_M32: #define __pentium 1
54 // CHECK_PENTIUM_M32: #define __pentium__ 1
55 // CHECK_PENTIUM_M32: #define __tune_i586__ 1
56 // CHECK_PENTIUM_M32: #define __tune_pentium__ 1
57 // CHECK_PENTIUM_M32: #define i386 1
58 // RUN: not %clang -march=pentium -m64 -E -dM %s -o - 2>&1 \
59 // RUN:     -target i386-unknown-linux \
60 // RUN:   | FileCheck -match-full-lines %s -check-prefix=CHECK_PENTIUM_M64
61 // CHECK_PENTIUM_M64: error: {{.*}}
62 //
63 // RUN: %clang -march=pentium-mmx -m32 -E -dM %s -o - 2>&1 \
64 // RUN:     -target i386-unknown-linux \
65 // RUN:   | FileCheck -match-full-lines %s -check-prefix=CHECK_PENTIUM_MMX_M32
66 // CHECK_PENTIUM_MMX_M32: #define __MMX__ 1
67 // CHECK_PENTIUM_MMX_M32: #define __i386 1
68 // CHECK_PENTIUM_MMX_M32: #define __i386__ 1
69 // CHECK_PENTIUM_MMX_M32: #define __i586 1
70 // CHECK_PENTIUM_MMX_M32: #define __i586__ 1
71 // CHECK_PENTIUM_MMX_M32: #define __pentium 1
72 // CHECK_PENTIUM_MMX_M32: #define __pentium__ 1
73 // CHECK_PENTIUM_MMX_M32: #define __pentium_mmx__ 1
74 // CHECK_PENTIUM_MMX_M32: #define __tune_i586__ 1
75 // CHECK_PENTIUM_MMX_M32: #define __tune_pentium__ 1
76 // CHECK_PENTIUM_MMX_M32: #define __tune_pentium_mmx__ 1
77 // CHECK_PENTIUM_MMX_M32: #define i386 1
78 // RUN: not %clang -march=pentium-mmx -m64 -E -dM %s -o - 2>&1 \
79 // RUN:     -target i386-unknown-linux \
80 // RUN:   | FileCheck -match-full-lines %s -check-prefix=CHECK_PENTIUM_MMX_M64
81 // CHECK_PENTIUM_MMX_M64: error: {{.*}}
82 //
83 // RUN: %clang -march=winchip-c6 -m32 -E -dM %s -o - 2>&1 \
84 // RUN:     -target i386-unknown-linux \
85 // RUN:   | FileCheck -match-full-lines %s -check-prefix=CHECK_WINCHIP_C6_M32
86 // CHECK_WINCHIP_C6_M32: #define __MMX__ 1
87 // CHECK_WINCHIP_C6_M32: #define __i386 1
88 // CHECK_WINCHIP_C6_M32: #define __i386__ 1
89 // CHECK_WINCHIP_C6_M32: #define __i486 1
90 // CHECK_WINCHIP_C6_M32: #define __i486__ 1
91 // CHECK_WINCHIP_C6_M32: #define __tune_i486__ 1
92 // CHECK_WINCHIP_C6_M32: #define i386 1
93 // RUN: not %clang -march=winchip-c6 -m64 -E -dM %s -o - 2>&1 \
94 // RUN:     -target i386-unknown-linux \
95 // RUN:   | FileCheck -match-full-lines %s -check-prefix=CHECK_WINCHIP_C6_M64
96 // CHECK_WINCHIP_C6_M64: error: {{.*}}
97 //
98 // RUN: %clang -march=winchip2 -m32 -E -dM %s -o - 2>&1 \
99 // RUN:     -target i386-unknown-linux \
100 // RUN:   | FileCheck -match-full-lines %s -check-prefix=CHECK_WINCHIP2_M32
101 // CHECK_WINCHIP2_M32: #define __3dNOW__ 1
102 // CHECK_WINCHIP2_M32: #define __MMX__ 1
103 // CHECK_WINCHIP2_M32: #define __i386 1
104 // CHECK_WINCHIP2_M32: #define __i386__ 1
105 // CHECK_WINCHIP2_M32: #define __i486 1
106 // CHECK_WINCHIP2_M32: #define __i486__ 1
107 // CHECK_WINCHIP2_M32: #define __tune_i486__ 1
108 // CHECK_WINCHIP2_M32: #define i386 1
109 // RUN: not %clang -march=winchip2 -m64 -E -dM %s -o - 2>&1 \
110 // RUN:     -target i386-unknown-linux \
111 // RUN:   | FileCheck -match-full-lines %s -check-prefix=CHECK_WINCHIP2_M64
112 // CHECK_WINCHIP2_M64: error: {{.*}}
113 //
114 // RUN: %clang -march=c3 -m32 -E -dM %s -o - 2>&1 \
115 // RUN:     -target i386-unknown-linux \
116 // RUN:   | FileCheck -match-full-lines %s -check-prefix=CHECK_C3_M32
117 // CHECK_C3_M32: #define __3dNOW__ 1
118 // CHECK_C3_M32: #define __MMX__ 1
119 // CHECK_C3_M32: #define __i386 1
120 // CHECK_C3_M32: #define __i386__ 1
121 // CHECK_C3_M32: #define __i486 1
122 // CHECK_C3_M32: #define __i486__ 1
123 // CHECK_C3_M32: #define __tune_i486__ 1
124 // CHECK_C3_M32: #define i386 1
125 // RUN: not %clang -march=c3 -m64 -E -dM %s -o - 2>&1 \
126 // RUN:     -target i386-unknown-linux \
127 // RUN:   | FileCheck -match-full-lines %s -check-prefix=CHECK_C3_M64
128 // CHECK_C3_M64: error: {{.*}}
129 //
130 // RUN: %clang -march=c3-2 -m32 -E -dM %s -o - 2>&1 \
131 // RUN:     -target i386-unknown-linux \
132 // RUN:   | FileCheck -match-full-lines %s -check-prefix=CHECK_C3_2_M32
133 // CHECK_C3_2_M32: #define __MMX__ 1
134 // CHECK_C3_2_M32: #define __SSE__ 1
135 // CHECK_C3_2_M32: #define __i386 1
136 // CHECK_C3_2_M32: #define __i386__ 1
137 // CHECK_C3_2_M32: #define __i686 1
138 // CHECK_C3_2_M32: #define __i686__ 1
139 // CHECK_C3_2_M32: #define __pentiumpro 1
140 // CHECK_C3_2_M32: #define __pentiumpro__ 1
141 // CHECK_C3_2_M32: #define __tune_i686__ 1
142 // CHECK_C3_2_M32: #define __tune_pentium2__ 1
143 // CHECK_C3_2_M32: #define __tune_pentiumpro__ 1
144 // CHECK_C3_2_M32: #define i386 1
145 // RUN: not %clang -march=c3-2 -m64 -E -dM %s -o - 2>&1 \
146 // RUN:     -target i386-unknown-linux \
147 // RUN:   | FileCheck -match-full-lines %s -check-prefix=CHECK_C3_2_M64
148 // CHECK_C3_2_M64: error: {{.*}}
149 //
150 // RUN: %clang -march=i686 -m32 -E -dM %s -o - 2>&1 \
151 // RUN:     -target i386-unknown-linux \
152 // RUN:   | FileCheck -match-full-lines %s -check-prefix=CHECK_I686_M32
153 // CHECK_I686_M32: #define __i386 1
154 // CHECK_I686_M32: #define __i386__ 1
155 // CHECK_I686_M32: #define __i686 1
156 // CHECK_I686_M32: #define __i686__ 1
157 // CHECK_I686_M32: #define __pentiumpro 1
158 // CHECK_I686_M32: #define __pentiumpro__ 1
159 // CHECK_I686_M32: #define i386 1
160 // RUN: not %clang -march=i686 -m64 -E -dM %s -o - 2>&1 \
161 // RUN:     -target i386-unknown-linux \
162 // RUN:   | FileCheck -match-full-lines %s -check-prefix=CHECK_I686_M64
163 // CHECK_I686_M64: error: {{.*}}
164 //
165 // RUN: %clang -march=pentiumpro -m32 -E -dM %s -o - 2>&1 \
166 // RUN:     -target i386-unknown-linux \
167 // RUN:   | FileCheck -match-full-lines %s -check-prefix=CHECK_PENTIUMPRO_M32
168 // CHECK_PENTIUMPRO_M32: #define __i386 1
169 // CHECK_PENTIUMPRO_M32: #define __i386__ 1
170 // CHECK_PENTIUMPRO_M32: #define __i686 1
171 // CHECK_PENTIUMPRO_M32: #define __i686__ 1
172 // CHECK_PENTIUMPRO_M32: #define __pentiumpro 1
173 // CHECK_PENTIUMPRO_M32: #define __pentiumpro__ 1
174 // CHECK_PENTIUMPRO_M32: #define __tune_i686__ 1
175 // CHECK_PENTIUMPRO_M32: #define __tune_pentiumpro__ 1
176 // CHECK_PENTIUMPRO_M32: #define i386 1
177 // RUN: not %clang -march=pentiumpro -m64 -E -dM %s -o - 2>&1 \
178 // RUN:     -target i386-unknown-linux \
179 // RUN:   | FileCheck -match-full-lines %s -check-prefix=CHECK_PENTIUMPRO_M64
180 // CHECK_PENTIUMPRO_M64: error: {{.*}}
181 //
182 // RUN: %clang -march=pentium2 -m32 -E -dM %s -o - 2>&1 \
183 // RUN:     -target i386-unknown-linux \
184 // RUN:   | FileCheck -match-full-lines %s -check-prefix=CHECK_PENTIUM2_M32
185 // CHECK_PENTIUM2_M32: #define __MMX__ 1
186 // CHECK_PENTIUM2_M32: #define __i386 1
187 // CHECK_PENTIUM2_M32: #define __i386__ 1
188 // CHECK_PENTIUM2_M32: #define __i686 1
189 // CHECK_PENTIUM2_M32: #define __i686__ 1
190 // CHECK_PENTIUM2_M32: #define __pentiumpro 1
191 // CHECK_PENTIUM2_M32: #define __pentiumpro__ 1
192 // CHECK_PENTIUM2_M32: #define __tune_i686__ 1
193 // CHECK_PENTIUM2_M32: #define __tune_pentium2__ 1
194 // CHECK_PENTIUM2_M32: #define __tune_pentiumpro__ 1
195 // CHECK_PENTIUM2_M32: #define i386 1
196 // RUN: not %clang -march=pentium2 -m64 -E -dM %s -o - 2>&1 \
197 // RUN:     -target i386-unknown-linux \
198 // RUN:   | FileCheck -match-full-lines %s -check-prefix=CHECK_PENTIUM2_M64
199 // CHECK_PENTIUM2_M64: error: {{.*}}
200 //
201 // RUN: %clang -march=pentium3 -m32 -E -dM %s -o - 2>&1 \
202 // RUN:     -target i386-unknown-linux \
203 // RUN:   | FileCheck -match-full-lines %s -check-prefix=CHECK_PENTIUM3_M32
204 // CHECK_PENTIUM3_M32: #define __MMX__ 1
205 // CHECK_PENTIUM3_M32: #define __SSE__ 1
206 // CHECK_PENTIUM3_M32: #define __i386 1
207 // CHECK_PENTIUM3_M32: #define __i386__ 1
208 // CHECK_PENTIUM3_M32: #define __i686 1
209 // CHECK_PENTIUM3_M32: #define __i686__ 1
210 // CHECK_PENTIUM3_M32: #define __pentiumpro 1
211 // CHECK_PENTIUM3_M32: #define __pentiumpro__ 1
212 // CHECK_PENTIUM3_M32: #define __tune_i686__ 1
213 // CHECK_PENTIUM3_M32: #define __tune_pentium2__ 1
214 // CHECK_PENTIUM3_M32: #define __tune_pentium3__ 1
215 // CHECK_PENTIUM3_M32: #define __tune_pentiumpro__ 1
216 // CHECK_PENTIUM3_M32: #define i386 1
217 // RUN: not %clang -march=pentium3 -m64 -E -dM %s -o - 2>&1 \
218 // RUN:     -target i386-unknown-linux \
219 // RUN:   | FileCheck -match-full-lines %s -check-prefix=CHECK_PENTIUM3_M64
220 // CHECK_PENTIUM3_M64: error: {{.*}}
221 //
222 // RUN: %clang -march=pentium3m -m32 -E -dM %s -o - 2>&1 \
223 // RUN:     -target i386-unknown-linux \
224 // RUN:   | FileCheck -match-full-lines %s -check-prefix=CHECK_PENTIUM3M_M32
225 // CHECK_PENTIUM3M_M32: #define __MMX__ 1
226 // CHECK_PENTIUM3M_M32: #define __SSE__ 1
227 // CHECK_PENTIUM3M_M32: #define __i386 1
228 // CHECK_PENTIUM3M_M32: #define __i386__ 1
229 // CHECK_PENTIUM3M_M32: #define __i686 1
230 // CHECK_PENTIUM3M_M32: #define __i686__ 1
231 // CHECK_PENTIUM3M_M32: #define __pentiumpro 1
232 // CHECK_PENTIUM3M_M32: #define __pentiumpro__ 1
233 // CHECK_PENTIUM3M_M32: #define __tune_i686__ 1
234 // CHECK_PENTIUM3M_M32: #define __tune_pentiumpro__ 1
235 // CHECK_PENTIUM3M_M32: #define i386 1
236 // RUN: not %clang -march=pentium3m -m64 -E -dM %s -o - 2>&1 \
237 // RUN:     -target i386-unknown-linux \
238 // RUN:   | FileCheck -match-full-lines %s -check-prefix=CHECK_PENTIUM3M_M64
239 // CHECK_PENTIUM3M_M64: error: {{.*}}
240 //
241 // RUN: %clang -march=pentium-m -m32 -E -dM %s -o - 2>&1 \
242 // RUN:     -target i386-unknown-linux \
243 // RUN:   | FileCheck -match-full-lines %s -check-prefix=CHECK_PENTIUM_M_M32
244 // CHECK_PENTIUM_M_M32: #define __MMX__ 1
245 // CHECK_PENTIUM_M_M32: #define __SSE2__ 1
246 // CHECK_PENTIUM_M_M32: #define __SSE__ 1
247 // CHECK_PENTIUM_M_M32: #define __i386 1
248 // CHECK_PENTIUM_M_M32: #define __i386__ 1
249 // CHECK_PENTIUM_M_M32: #define __i686 1
250 // CHECK_PENTIUM_M_M32: #define __i686__ 1
251 // CHECK_PENTIUM_M_M32: #define __pentiumpro 1
252 // CHECK_PENTIUM_M_M32: #define __pentiumpro__ 1
253 // CHECK_PENTIUM_M_M32: #define __tune_i686__ 1
254 // CHECK_PENTIUM_M_M32: #define __tune_pentiumpro__ 1
255 // CHECK_PENTIUM_M_M32: #define i386 1
256 // RUN: not %clang -march=pentium-m -m64 -E -dM %s -o - 2>&1 \
257 // RUN:     -target i386-unknown-linux \
258 // RUN:   | FileCheck -match-full-lines %s -check-prefix=CHECK_PENTIUM_M_M64
259 // CHECK_PENTIUM_M_M64: error: {{.*}}
260 //
261 // RUN: %clang -march=pentium4 -m32 -E -dM %s -o - 2>&1 \
262 // RUN:     -target i386-unknown-linux \
263 // RUN:   | FileCheck -match-full-lines %s -check-prefix=CHECK_PENTIUM4_M32
264 // CHECK_PENTIUM4_M32: #define __MMX__ 1
265 // CHECK_PENTIUM4_M32: #define __SSE2__ 1
266 // CHECK_PENTIUM4_M32: #define __SSE__ 1
267 // CHECK_PENTIUM4_M32: #define __i386 1
268 // CHECK_PENTIUM4_M32: #define __i386__ 1
269 // CHECK_PENTIUM4_M32: #define __pentium4 1
270 // CHECK_PENTIUM4_M32: #define __pentium4__ 1
271 // CHECK_PENTIUM4_M32: #define __tune_pentium4__ 1
272 // CHECK_PENTIUM4_M32: #define i386 1
273 // RUN: not %clang -march=pentium4 -m64 -E -dM %s -o - 2>&1 \
274 // RUN:     -target i386-unknown-linux \
275 // RUN:   | FileCheck -match-full-lines %s -check-prefix=CHECK_PENTIUM4_M64
276 // CHECK_PENTIUM4_M64: error: {{.*}}
277 //
278 // RUN: %clang -march=pentium4m -m32 -E -dM %s -o - 2>&1 \
279 // RUN:     -target i386-unknown-linux \
280 // RUN:   | FileCheck -match-full-lines %s -check-prefix=CHECK_PENTIUM4M_M32
281 // CHECK_PENTIUM4M_M32: #define __MMX__ 1
282 // CHECK_PENTIUM4M_M32: #define __SSE2__ 1
283 // CHECK_PENTIUM4M_M32: #define __SSE__ 1
284 // CHECK_PENTIUM4M_M32: #define __i386 1
285 // CHECK_PENTIUM4M_M32: #define __i386__ 1
286 // CHECK_PENTIUM4M_M32: #define __pentium4 1
287 // CHECK_PENTIUM4M_M32: #define __pentium4__ 1
288 // CHECK_PENTIUM4M_M32: #define __tune_pentium4__ 1
289 // CHECK_PENTIUM4M_M32: #define i386 1
290 // RUN: not %clang -march=pentium4m -m64 -E -dM %s -o - 2>&1 \
291 // RUN:     -target i386-unknown-linux \
292 // RUN:   | FileCheck -match-full-lines %s -check-prefix=CHECK_PENTIUM4M_M64
293 // CHECK_PENTIUM4M_M64: error: {{.*}}
294 //
295 // RUN: %clang -march=prescott -m32 -E -dM %s -o - 2>&1 \
296 // RUN:     -target i386-unknown-linux \
297 // RUN:   | FileCheck -match-full-lines %s -check-prefix=CHECK_PRESCOTT_M32
298 // CHECK_PRESCOTT_M32: #define __MMX__ 1
299 // CHECK_PRESCOTT_M32: #define __SSE2__ 1
300 // CHECK_PRESCOTT_M32: #define __SSE3__ 1
301 // CHECK_PRESCOTT_M32: #define __SSE__ 1
302 // CHECK_PRESCOTT_M32: #define __i386 1
303 // CHECK_PRESCOTT_M32: #define __i386__ 1
304 // CHECK_PRESCOTT_M32: #define __nocona 1
305 // CHECK_PRESCOTT_M32: #define __nocona__ 1
306 // CHECK_PRESCOTT_M32: #define __tune_nocona__ 1
307 // CHECK_PRESCOTT_M32: #define i386 1
308 // RUN: not %clang -march=prescott -m64 -E -dM %s -o - 2>&1 \
309 // RUN:     -target i386-unknown-linux \
310 // RUN:   | FileCheck -match-full-lines %s -check-prefix=CHECK_PRESCOTT_M64
311 // CHECK_PRESCOTT_M64: error: {{.*}}
312 //
313 // RUN: %clang -march=nocona -m32 -E -dM %s -o - 2>&1 \
314 // RUN:     -target i386-unknown-linux \
315 // RUN:   | FileCheck -match-full-lines %s -check-prefix=CHECK_NOCONA_M32
316 // CHECK_NOCONA_M32: #define __MMX__ 1
317 // CHECK_NOCONA_M32: #define __SSE2__ 1
318 // CHECK_NOCONA_M32: #define __SSE3__ 1
319 // CHECK_NOCONA_M32: #define __SSE__ 1
320 // CHECK_NOCONA_M32: #define __i386 1
321 // CHECK_NOCONA_M32: #define __i386__ 1
322 // CHECK_NOCONA_M32: #define __nocona 1
323 // CHECK_NOCONA_M32: #define __nocona__ 1
324 // CHECK_NOCONA_M32: #define __tune_nocona__ 1
325 // CHECK_NOCONA_M32: #define i386 1
326 // RUN: %clang -march=nocona -m64 -E -dM %s -o - 2>&1 \
327 // RUN:     -target i386-unknown-linux \
328 // RUN:   | FileCheck -match-full-lines %s -check-prefix=CHECK_NOCONA_M64
329 // CHECK_NOCONA_M64: #define __MMX__ 1
330 // CHECK_NOCONA_M64: #define __SSE2_MATH__ 1
331 // CHECK_NOCONA_M64: #define __SSE2__ 1
332 // CHECK_NOCONA_M64: #define __SSE3__ 1
333 // CHECK_NOCONA_M64: #define __SSE_MATH__ 1
334 // CHECK_NOCONA_M64: #define __SSE__ 1
335 // CHECK_NOCONA_M64: #define __amd64 1
336 // CHECK_NOCONA_M64: #define __amd64__ 1
337 // CHECK_NOCONA_M64: #define __nocona 1
338 // CHECK_NOCONA_M64: #define __nocona__ 1
339 // CHECK_NOCONA_M64: #define __tune_nocona__ 1
340 // CHECK_NOCONA_M64: #define __x86_64 1
341 // CHECK_NOCONA_M64: #define __x86_64__ 1
342 //
343 // RUN: %clang -march=core2 -m32 -E -dM %s -o - 2>&1 \
344 // RUN:     -target i386-unknown-linux \
345 // RUN:   | FileCheck -match-full-lines %s -check-prefix=CHECK_CORE2_M32
346 // CHECK_CORE2_M32: #define __MMX__ 1
347 // CHECK_CORE2_M32: #define __SSE2__ 1
348 // CHECK_CORE2_M32: #define __SSE3__ 1
349 // CHECK_CORE2_M32: #define __SSE__ 1
350 // CHECK_CORE2_M32: #define __SSSE3__ 1
351 // CHECK_CORE2_M32: #define __core2 1
352 // CHECK_CORE2_M32: #define __core2__ 1
353 // CHECK_CORE2_M32: #define __i386 1
354 // CHECK_CORE2_M32: #define __i386__ 1
355 // CHECK_CORE2_M32: #define __tune_core2__ 1
356 // CHECK_CORE2_M32: #define i386 1
357 // RUN: %clang -march=core2 -m64 -E -dM %s -o - 2>&1 \
358 // RUN:     -target i386-unknown-linux \
359 // RUN:   | FileCheck -match-full-lines %s -check-prefix=CHECK_CORE2_M64
360 // CHECK_CORE2_M64: #define __MMX__ 1
361 // CHECK_CORE2_M64: #define __SSE2_MATH__ 1
362 // CHECK_CORE2_M64: #define __SSE2__ 1
363 // CHECK_CORE2_M64: #define __SSE3__ 1
364 // CHECK_CORE2_M64: #define __SSE_MATH__ 1
365 // CHECK_CORE2_M64: #define __SSE__ 1
366 // CHECK_CORE2_M64: #define __SSSE3__ 1
367 // CHECK_CORE2_M64: #define __amd64 1
368 // CHECK_CORE2_M64: #define __amd64__ 1
369 // CHECK_CORE2_M64: #define __core2 1
370 // CHECK_CORE2_M64: #define __core2__ 1
371 // CHECK_CORE2_M64: #define __tune_core2__ 1
372 // CHECK_CORE2_M64: #define __x86_64 1
373 // CHECK_CORE2_M64: #define __x86_64__ 1
374 //
375 // RUN: %clang -march=corei7 -m32 -E -dM %s -o - 2>&1 \
376 // RUN:     -target i386-unknown-linux \
377 // RUN:   | FileCheck -match-full-lines %s -check-prefix=CHECK_COREI7_M32
378 // CHECK_COREI7_M32: #define __MMX__ 1
379 // CHECK_COREI7_M32: #define __POPCNT__ 1
380 // CHECK_COREI7_M32: #define __SSE2__ 1
381 // CHECK_COREI7_M32: #define __SSE3__ 1
382 // CHECK_COREI7_M32: #define __SSE4_1__ 1
383 // CHECK_COREI7_M32: #define __SSE4_2__ 1
384 // CHECK_COREI7_M32: #define __SSE__ 1
385 // CHECK_COREI7_M32: #define __SSSE3__ 1
386 // CHECK_COREI7_M32: #define __corei7 1
387 // CHECK_COREI7_M32: #define __corei7__ 1
388 // CHECK_COREI7_M32: #define __i386 1
389 // CHECK_COREI7_M32: #define __i386__ 1
390 // CHECK_COREI7_M32: #define __tune_corei7__ 1
391 // CHECK_COREI7_M32: #define i386 1
392 // RUN: %clang -march=corei7 -m64 -E -dM %s -o - 2>&1 \
393 // RUN:     -target i386-unknown-linux \
394 // RUN:   | FileCheck -match-full-lines %s -check-prefix=CHECK_COREI7_M64
395 // CHECK_COREI7_M64: #define __MMX__ 1
396 // CHECK_COREI7_M64: #define __POPCNT__ 1
397 // CHECK_COREI7_M64: #define __SSE2_MATH__ 1
398 // CHECK_COREI7_M64: #define __SSE2__ 1
399 // CHECK_COREI7_M64: #define __SSE3__ 1
400 // CHECK_COREI7_M64: #define __SSE4_1__ 1
401 // CHECK_COREI7_M64: #define __SSE4_2__ 1
402 // CHECK_COREI7_M64: #define __SSE_MATH__ 1
403 // CHECK_COREI7_M64: #define __SSE__ 1
404 // CHECK_COREI7_M64: #define __SSSE3__ 1
405 // CHECK_COREI7_M64: #define __amd64 1
406 // CHECK_COREI7_M64: #define __amd64__ 1
407 // CHECK_COREI7_M64: #define __corei7 1
408 // CHECK_COREI7_M64: #define __corei7__ 1
409 // CHECK_COREI7_M64: #define __tune_corei7__ 1
410 // CHECK_COREI7_M64: #define __x86_64 1
411 // CHECK_COREI7_M64: #define __x86_64__ 1
412 //
413 // RUN: %clang -march=corei7-avx -m32 -E -dM %s -o - 2>&1 \
414 // RUN:     -target i386-unknown-linux \
415 // RUN:   | FileCheck -match-full-lines %s -check-prefix=CHECK_COREI7_AVX_M32
416 // CHECK_COREI7_AVX_M32: #define __AES__ 1
417 // CHECK_COREI7_AVX_M32: #define __AVX__ 1
418 // CHECK_COREI7_AVX_M32: #define __MMX__ 1
419 // CHECK_COREI7_AVX_M32: #define __PCLMUL__ 1
420 // CHECK_COREI7_AVX_M32-NOT: __RDRND__
421 // CHECK_COREI7_AVX_M32: #define __POPCNT__ 1
422 // CHECK_COREI7_AVX_M32: #define __SSE2__ 1
423 // CHECK_COREI7_AVX_M32: #define __SSE3__ 1
424 // CHECK_COREI7_AVX_M32: #define __SSE4_1__ 1
425 // CHECK_COREI7_AVX_M32: #define __SSE4_2__ 1
426 // CHECK_COREI7_AVX_M32: #define __SSE__ 1
427 // CHECK_COREI7_AVX_M32: #define __SSSE3__ 1
428 // CHECK_COREI7_AVX_M32: #define __XSAVEOPT__ 1
429 // CHECK_COREI7_AVX_M32: #define __XSAVE__ 1
430 // CHECK_COREI7_AVX_M32: #define __corei7 1
431 // CHECK_COREI7_AVX_M32: #define __corei7__ 1
432 // CHECK_COREI7_AVX_M32: #define __i386 1
433 // CHECK_COREI7_AVX_M32: #define __i386__ 1
434 // CHECK_COREI7_AVX_M32: #define __tune_corei7__ 1
435 // CHECK_COREI7_AVX_M32: #define i386 1
436 // RUN: %clang -march=corei7-avx -m64 -E -dM %s -o - 2>&1 \
437 // RUN:     -target i386-unknown-linux \
438 // RUN:   | FileCheck -match-full-lines %s -check-prefix=CHECK_COREI7_AVX_M64
439 // CHECK_COREI7_AVX_M64: #define __AES__ 1
440 // CHECK_COREI7_AVX_M64: #define __AVX__ 1
441 // CHECK_COREI7_AVX_M64: #define __MMX__ 1
442 // CHECK_COREI7_AVX_M64: #define __PCLMUL__ 1
443 // CHECK_COREI7_AVX_M64-NOT: __RDRND__
444 // CHECK_COREI7_AVX_M64: #define __POPCNT__ 1
445 // CHECK_COREI7_AVX_M64: #define __SSE2_MATH__ 1
446 // CHECK_COREI7_AVX_M64: #define __SSE2__ 1
447 // CHECK_COREI7_AVX_M64: #define __SSE3__ 1
448 // CHECK_COREI7_AVX_M64: #define __SSE4_1__ 1
449 // CHECK_COREI7_AVX_M64: #define __SSE4_2__ 1
450 // CHECK_COREI7_AVX_M64: #define __SSE_MATH__ 1
451 // CHECK_COREI7_AVX_M64: #define __SSE__ 1
452 // CHECK_COREI7_AVX_M64: #define __SSSE3__ 1
453 // CHECK_COREI7_AVX_M64: #define __XSAVEOPT__ 1
454 // CHECK_COREI7_AVX_M64: #define __XSAVE__ 1
455 // CHECK_COREI7_AVX_M64: #define __amd64 1
456 // CHECK_COREI7_AVX_M64: #define __amd64__ 1
457 // CHECK_COREI7_AVX_M64: #define __corei7 1
458 // CHECK_COREI7_AVX_M64: #define __corei7__ 1
459 // CHECK_COREI7_AVX_M64: #define __tune_corei7__ 1
460 // CHECK_COREI7_AVX_M64: #define __x86_64 1
461 // CHECK_COREI7_AVX_M64: #define __x86_64__ 1
462 //
463 // RUN: %clang -march=core-avx-i -m32 -E -dM %s -o - 2>&1 \
464 // RUN:     -target i386-unknown-linux \
465 // RUN:   | FileCheck -match-full-lines %s -check-prefix=CHECK_CORE_AVX_I_M32
466 // CHECK_CORE_AVX_I_M32: #define __AES__ 1
467 // CHECK_CORE_AVX_I_M32: #define __AVX__ 1
468 // CHECK_CORE_AVX_I_M32: #define __F16C__ 1
469 // CHECK_CORE_AVX_I_M32: #define __MMX__ 1
470 // CHECK_CORE_AVX_I_M32: #define __PCLMUL__ 1
471 // CHECK_CORE_AVX_I_M32: #define __RDRND__ 1
472 // CHECK_CORE_AVX_I_M32: #define __SSE2__ 1
473 // CHECK_CORE_AVX_I_M32: #define __SSE3__ 1
474 // CHECK_CORE_AVX_I_M32: #define __SSE4_1__ 1
475 // CHECK_CORE_AVX_I_M32: #define __SSE4_2__ 1
476 // CHECK_CORE_AVX_I_M32: #define __SSE__ 1
477 // CHECK_CORE_AVX_I_M32: #define __SSSE3__ 1
478 // CHECK_CORE_AVX_I_M32: #define __XSAVEOPT__ 1
479 // CHECK_CORE_AVX_I_M32: #define __XSAVE__ 1
480 // CHECK_CORE_AVX_I_M32: #define __corei7 1
481 // CHECK_CORE_AVX_I_M32: #define __corei7__ 1
482 // CHECK_CORE_AVX_I_M32: #define __i386 1
483 // CHECK_CORE_AVX_I_M32: #define __i386__ 1
484 // CHECK_CORE_AVX_I_M32: #define __tune_corei7__ 1
485 // CHECK_CORE_AVX_I_M32: #define i386 1
486 // RUN: %clang -march=core-avx-i -m64 -E -dM %s -o - 2>&1 \
487 // RUN:     -target i386-unknown-linux \
488 // RUN:   | FileCheck -match-full-lines %s -check-prefix=CHECK_CORE_AVX_I_M64
489 // CHECK_CORE_AVX_I_M64: #define __AES__ 1
490 // CHECK_CORE_AVX_I_M64: #define __AVX__ 1
491 // CHECK_CORE_AVX_I_M64: #define __F16C__ 1
492 // CHECK_CORE_AVX_I_M64: #define __MMX__ 1
493 // CHECK_CORE_AVX_I_M64: #define __PCLMUL__ 1
494 // CHECK_CORE_AVX_I_M64: #define __RDRND__ 1
495 // CHECK_CORE_AVX_I_M64: #define __SSE2_MATH__ 1
496 // CHECK_CORE_AVX_I_M64: #define __SSE2__ 1
497 // CHECK_CORE_AVX_I_M64: #define __SSE3__ 1
498 // CHECK_CORE_AVX_I_M64: #define __SSE4_1__ 1
499 // CHECK_CORE_AVX_I_M64: #define __SSE4_2__ 1
500 // CHECK_CORE_AVX_I_M64: #define __SSE_MATH__ 1
501 // CHECK_CORE_AVX_I_M64: #define __SSE__ 1
502 // CHECK_CORE_AVX_I_M64: #define __SSSE3__ 1
503 // CHECK_CORE_AVX_I_M64: #define __XSAVEOPT__ 1
504 // CHECK_CORE_AVX_I_M64: #define __XSAVE__ 1
505 // CHECK_CORE_AVX_I_M64: #define __amd64 1
506 // CHECK_CORE_AVX_I_M64: #define __amd64__ 1
507 // CHECK_CORE_AVX_I_M64: #define __corei7 1
508 // CHECK_CORE_AVX_I_M64: #define __corei7__ 1
509 // CHECK_CORE_AVX_I_M64: #define __tune_corei7__ 1
510 // CHECK_CORE_AVX_I_M64: #define __x86_64 1
511 // CHECK_CORE_AVX_I_M64: #define __x86_64__ 1
512 //
513 // RUN: %clang -march=core-avx2 -m32 -E -dM %s -o - 2>&1 \
514 // RUN:     -target i386-unknown-linux \
515 // RUN:   | FileCheck -match-full-lines %s -check-prefix=CHECK_CORE_AVX2_M32
516 // CHECK_CORE_AVX2_M32: #define __AES__ 1
517 // CHECK_CORE_AVX2_M32: #define __AVX2__ 1
518 // CHECK_CORE_AVX2_M32: #define __AVX__ 1
519 // CHECK_CORE_AVX2_M32: #define __BMI2__ 1
520 // CHECK_CORE_AVX2_M32: #define __BMI__ 1
521 // CHECK_CORE_AVX2_M32: #define __F16C__ 1
522 // CHECK_CORE_AVX2_M32: #define __FMA__ 1
523 // CHECK_CORE_AVX2_M32: #define __LZCNT__ 1
524 // CHECK_CORE_AVX2_M32: #define __MMX__ 1
525 // CHECK_CORE_AVX2_M32: #define __PCLMUL__ 1
526 // CHECK_CORE_AVX2_M32: #define __POPCNT__ 1
527 // CHECK_CORE_AVX2_M32: #define __RDRND__ 1
528 // CHECK_CORE_AVX2_M32: #define __RTM__ 1
529 // CHECK_CORE_AVX2_M32: #define __SSE2__ 1
530 // CHECK_CORE_AVX2_M32: #define __SSE3__ 1
531 // CHECK_CORE_AVX2_M32: #define __SSE4_1__ 1
532 // CHECK_CORE_AVX2_M32: #define __SSE4_2__ 1
533 // CHECK_CORE_AVX2_M32: #define __SSE__ 1
534 // CHECK_CORE_AVX2_M32: #define __SSSE3__ 1
535 // CHECK_CORE_AVX2_M32: #define __XSAVEOPT__ 1
536 // CHECK_CORE_AVX2_M32: #define __XSAVE__ 1
537 // CHECK_CORE_AVX2_M32: #define __corei7 1
538 // CHECK_CORE_AVX2_M32: #define __corei7__ 1
539 // CHECK_CORE_AVX2_M32: #define __i386 1
540 // CHECK_CORE_AVX2_M32: #define __i386__ 1
541 // CHECK_CORE_AVX2_M32: #define __tune_corei7__ 1
542 // CHECK_CORE_AVX2_M32: #define i386 1
543 // RUN: %clang -march=core-avx2 -m64 -E -dM %s -o - 2>&1 \
544 // RUN:     -target i386-unknown-linux \
545 // RUN:   | FileCheck -match-full-lines %s -check-prefix=CHECK_CORE_AVX2_M64
546 // CHECK_CORE_AVX2_M64: #define __AES__ 1
547 // CHECK_CORE_AVX2_M64: #define __AVX2__ 1
548 // CHECK_CORE_AVX2_M64: #define __AVX__ 1
549 // CHECK_CORE_AVX2_M64: #define __BMI2__ 1
550 // CHECK_CORE_AVX2_M64: #define __BMI__ 1
551 // CHECK_CORE_AVX2_M64: #define __F16C__ 1
552 // CHECK_CORE_AVX2_M64: #define __FMA__ 1
553 // CHECK_CORE_AVX2_M64: #define __LZCNT__ 1
554 // CHECK_CORE_AVX2_M64: #define __MMX__ 1
555 // CHECK_CORE_AVX2_M64: #define __PCLMUL__ 1
556 // CHECK_CORE_AVX2_M64: #define __POPCNT__ 1
557 // CHECK_CORE_AVX2_M64: #define __RDRND__ 1
558 // CHECK_CORE_AVX2_M64: #define __RTM__ 1
559 // CHECK_CORE_AVX2_M64: #define __SSE2_MATH__ 1
560 // CHECK_CORE_AVX2_M64: #define __SSE2__ 1
561 // CHECK_CORE_AVX2_M64: #define __SSE3__ 1
562 // CHECK_CORE_AVX2_M64: #define __SSE4_1__ 1
563 // CHECK_CORE_AVX2_M64: #define __SSE4_2__ 1
564 // CHECK_CORE_AVX2_M64: #define __SSE_MATH__ 1
565 // CHECK_CORE_AVX2_M64: #define __SSE__ 1
566 // CHECK_CORE_AVX2_M64: #define __SSSE3__ 1
567 // CHECK_CORE_AVX2_M64: #define __XSAVEOPT__ 1
568 // CHECK_CORE_AVX2_M64: #define __XSAVE__ 1
569 // CHECK_CORE_AVX2_M64: #define __amd64 1
570 // CHECK_CORE_AVX2_M64: #define __amd64__ 1
571 // CHECK_CORE_AVX2_M64: #define __corei7 1
572 // CHECK_CORE_AVX2_M64: #define __corei7__ 1
573 // CHECK_CORE_AVX2_M64: #define __tune_corei7__ 1
574 // CHECK_CORE_AVX2_M64: #define __x86_64 1
575 // CHECK_CORE_AVX2_M64: #define __x86_64__ 1
576 //
577 // RUN: %clang -march=broadwell -m32 -E -dM %s -o - 2>&1 \
578 // RUN:     -target i386-unknown-linux \
579 // RUN:   | FileCheck -match-full-lines %s -check-prefix=CHECK_BROADWELL_M32
580 // CHECK_BROADWELL_M32: #define __ADX__ 1
581 // CHECK_BROADWELL_M32: #define __AES__ 1
582 // CHECK_BROADWELL_M32: #define __AVX2__ 1
583 // CHECK_BROADWELL_M32: #define __AVX__ 1
584 // CHECK_BROADWELL_M32: #define __BMI2__ 1
585 // CHECK_BROADWELL_M32: #define __BMI__ 1
586 // CHECK_BROADWELL_M32: #define __F16C__ 1
587 // CHECK_BROADWELL_M32: #define __FMA__ 1
588 // CHECK_BROADWELL_M32: #define __LZCNT__ 1
589 // CHECK_BROADWELL_M32: #define __MMX__ 1
590 // CHECK_BROADWELL_M32: #define __PCLMUL__ 1
591 // CHECK_BROADWELL_M32: #define __POPCNT__ 1
592 // CHECK_BROADWELL_M32: #define __RDRND__ 1
593 // CHECK_BROADWELL_M32: #define __RDSEED__ 1
594 // CHECK_BROADWELL_M32: #define __RTM__ 1
595 // CHECK_BROADWELL_M32: #define __SSE2__ 1
596 // CHECK_BROADWELL_M32: #define __SSE3__ 1
597 // CHECK_BROADWELL_M32: #define __SSE4_1__ 1
598 // CHECK_BROADWELL_M32: #define __SSE4_2__ 1
599 // CHECK_BROADWELL_M32: #define __SSE__ 1
600 // CHECK_BROADWELL_M32: #define __SSSE3__ 1
601 // CHECK_BROADWELL_M32: #define __XSAVEOPT__ 1
602 // CHECK_BROADWELL_M32: #define __XSAVE__ 1
603 // CHECK_BROADWELL_M32: #define __corei7 1
604 // CHECK_BROADWELL_M32: #define __corei7__ 1
605 // CHECK_BROADWELL_M32: #define __i386 1
606 // CHECK_BROADWELL_M32: #define __i386__ 1
607 // CHECK_BROADWELL_M32: #define __tune_corei7__ 1
608 // CHECK_BROADWELL_M32: #define i386 1
609 // RUN: %clang -march=broadwell -m64 -E -dM %s -o - 2>&1 \
610 // RUN:     -target i386-unknown-linux \
611 // RUN:   | FileCheck -match-full-lines %s -check-prefix=CHECK_BROADWELL_M64
612 // CHECK_BROADWELL_M64: #define __ADX__ 1
613 // CHECK_BROADWELL_M64: #define __AES__ 1
614 // CHECK_BROADWELL_M64: #define __AVX2__ 1
615 // CHECK_BROADWELL_M64: #define __AVX__ 1
616 // CHECK_BROADWELL_M64: #define __BMI2__ 1
617 // CHECK_BROADWELL_M64: #define __BMI__ 1
618 // CHECK_BROADWELL_M64: #define __F16C__ 1
619 // CHECK_BROADWELL_M64: #define __FMA__ 1
620 // CHECK_BROADWELL_M64: #define __LZCNT__ 1
621 // CHECK_BROADWELL_M64: #define __MMX__ 1
622 // CHECK_BROADWELL_M64: #define __PCLMUL__ 1
623 // CHECK_BROADWELL_M64: #define __POPCNT__ 1
624 // CHECK_BROADWELL_M64: #define __RDRND__ 1
625 // CHECK_BROADWELL_M64: #define __RDSEED__ 1
626 // CHECK_BROADWELL_M64: #define __RTM__ 1
627 // CHECK_BROADWELL_M64: #define __SSE2_MATH__ 1
628 // CHECK_BROADWELL_M64: #define __SSE2__ 1
629 // CHECK_BROADWELL_M64: #define __SSE3__ 1
630 // CHECK_BROADWELL_M64: #define __SSE4_1__ 1
631 // CHECK_BROADWELL_M64: #define __SSE4_2__ 1
632 // CHECK_BROADWELL_M64: #define __SSE_MATH__ 1
633 // CHECK_BROADWELL_M64: #define __SSE__ 1
634 // CHECK_BROADWELL_M64: #define __SSSE3__ 1
635 // CHECK_BROADWELL_M64: #define __XSAVEOPT__ 1
636 // CHECK_BROADWELL_M64: #define __XSAVE__ 1
637 // CHECK_BROADWELL_M64: #define __amd64 1
638 // CHECK_BROADWELL_M64: #define __amd64__ 1
639 // CHECK_BROADWELL_M64: #define __corei7 1
640 // CHECK_BROADWELL_M64: #define __corei7__ 1
641 // CHECK_BROADWELL_M64: #define __tune_corei7__ 1
642 // CHECK_BROADWELL_M64: #define __x86_64 1
643 // CHECK_BROADWELL_M64: #define __x86_64__ 1
644 //
645 // RUN: %clang -march=skylake -m32 -E -dM %s -o - 2>&1 \
646 // RUN:     -target i386-unknown-linux \
647 // RUN:   | FileCheck -match-full-lines %s -check-prefix=CHECK_SKL_M32
648 // CHECK_SKL_M32: #define __ADX__ 1
649 // CHECK_SKL_M32: #define __AES__ 1
650 // CHECK_SKL_M32: #define __AVX2__ 1
651 // CHECK_SKL_M32: #define __AVX__ 1
652 // CHECK_SKL_M32: #define __BMI2__ 1
653 // CHECK_SKL_M32: #define __BMI__ 1
654 // CHECK_SKL_M32: #define __F16C__ 1
655 // CHECK_SKL_M32: #define __FMA__ 1
656 // CHECK_SKL_M32: #define __LZCNT__ 1
657 // CHECK_SKL_M32: #define __MMX__ 1
658 // CHECK_SKL_M32: #define __PCLMUL__ 1
659 // CHECK_SKL_M32: #define __POPCNT__ 1
660 // CHECK_SKL_M32: #define __RDRND__ 1
661 // CHECK_SKL_M32: #define __RDSEED__ 1
662 // CHECK_SKL_M32: #define __RTM__ 1
663 // CHECK_SKL_M32: #define __SSE2__ 1
664 // CHECK_SKL_M32: #define __SSE3__ 1
665 // CHECK_SKL_M32: #define __SSE4_1__ 1
666 // CHECK_SKL_M32: #define __SSE4_2__ 1
667 // CHECK_SKL_M32: #define __SSE__ 1
668 // CHECK_SKL_M32: #define __SSSE3__ 1
669 // CHECK_SKL_M32: #define __XSAVEC__ 1
670 // CHECK_SKL_M32: #define __XSAVEOPT__ 1
671 // CHECK_SKL_M32: #define __XSAVES__ 1
672 // CHECK_SKL_M32: #define __XSAVE__ 1
673 // CHECK_SKL_M32: #define i386 1
674 
675 // RUN: %clang -march=skylake -m64 -E -dM %s -o - 2>&1 \
676 // RUN:     -target i386-unknown-linux \
677 // RUN:   | FileCheck -match-full-lines %s -check-prefix=CHECK_SKL_M64
678 // CHECK_SKL_M64: #define __ADX__ 1
679 // CHECK_SKL_M64: #define __AES__ 1
680 // CHECK_SKL_M64: #define __AVX2__ 1
681 // CHECK_SKL_M64: #define __AVX__ 1
682 // CHECK_SKL_M64: #define __BMI2__ 1
683 // CHECK_SKL_M64: #define __BMI__ 1
684 // CHECK_SKL_M64: #define __F16C__ 1
685 // CHECK_SKL_M64: #define __FMA__ 1
686 // CHECK_SKL_M64: #define __LZCNT__ 1
687 // CHECK_SKL_M64: #define __MMX__ 1
688 // CHECK_SKL_M64: #define __PCLMUL__ 1
689 // CHECK_SKL_M64: #define __POPCNT__ 1
690 // CHECK_SKL_M64: #define __RDRND__ 1
691 // CHECK_SKL_M64: #define __RDSEED__ 1
692 // CHECK_SKL_M64: #define __RTM__ 1
693 // CHECK_SKL_M64: #define __SSE2_MATH__ 1
694 // CHECK_SKL_M64: #define __SSE2__ 1
695 // CHECK_SKL_M64: #define __SSE3__ 1
696 // CHECK_SKL_M64: #define __SSE4_1__ 1
697 // CHECK_SKL_M64: #define __SSE4_2__ 1
698 // CHECK_SKL_M64: #define __SSE_MATH__ 1
699 // CHECK_SKL_M64: #define __SSE__ 1
700 // CHECK_SKL_M64: #define __SSSE3__ 1
701 // CHECK_SKL_M64: #define __XSAVEC__ 1
702 // CHECK_SKL_M64: #define __XSAVEOPT__ 1
703 // CHECK_SKL_M64: #define __XSAVES__ 1
704 // CHECK_SKL_M64: #define __XSAVE__ 1
705 // CHECK_SKL_M64: #define __amd64 1
706 // CHECK_SKL_M64: #define __amd64__ 1
707 // CHECK_SKL_M64: #define __x86_64 1
708 // CHECK_SKL_M64: #define __x86_64__ 1
709 
710 // RUN: %clang -march=knl -m32 -E -dM %s -o - 2>&1 \
711 // RUN:     -target i386-unknown-linux \
712 // RUN:   | FileCheck -match-full-lines %s -check-prefix=CHECK_KNL_M32
713 // CHECK_KNL_M32: #define __AES__ 1
714 // CHECK_KNL_M32: #define __AVX2__ 1
715 // CHECK_KNL_M32: #define __AVX512CD__ 1
716 // CHECK_KNL_M32: #define __AVX512ER__ 1
717 // CHECK_KNL_M32: #define __AVX512F__ 1
718 // CHECK_KNL_M32: #define __AVX512PF__ 1
719 // CHECK_KNL_M32: #define __AVX__ 1
720 // CHECK_KNL_M32: #define __BMI2__ 1
721 // CHECK_KNL_M32: #define __BMI__ 1
722 // CHECK_KNL_M32: #define __F16C__ 1
723 // CHECK_KNL_M32: #define __FMA__ 1
724 // CHECK_KNL_M32: #define __LZCNT__ 1
725 // CHECK_KNL_M32: #define __MMX__ 1
726 // CHECK_KNL_M32: #define __PCLMUL__ 1
727 // CHECK_KNL_M32: #define __POPCNT__ 1
728 // CHECK_KNL_M32: #define __RDRND__ 1
729 // CHECK_KNL_M32: #define __RTM__ 1
730 // CHECK_KNL_M32: #define __SSE2__ 1
731 // CHECK_KNL_M32: #define __SSE3__ 1
732 // CHECK_KNL_M32: #define __SSE4_1__ 1
733 // CHECK_KNL_M32: #define __SSE4_2__ 1
734 // CHECK_KNL_M32: #define __SSE__ 1
735 // CHECK_KNL_M32: #define __SSSE3__ 1
736 // CHECK_KNL_M32: #define __XSAVEOPT__ 1
737 // CHECK_KNL_M32: #define __XSAVE__ 1
738 // CHECK_KNL_M32: #define __i386 1
739 // CHECK_KNL_M32: #define __i386__ 1
740 // CHECK_KNL_M32: #define __knl 1
741 // CHECK_KNL_M32: #define __knl__ 1
742 // CHECK_KNL_M32: #define __tune_knl__ 1
743 // CHECK_KNL_M32: #define i386 1
744 
745 // RUN: %clang -march=knl -m64 -E -dM %s -o - 2>&1 \
746 // RUN:     -target i386-unknown-linux \
747 // RUN:   | FileCheck -match-full-lines %s -check-prefix=CHECK_KNL_M64
748 // CHECK_KNL_M64: #define __AES__ 1
749 // CHECK_KNL_M64: #define __AVX2__ 1
750 // CHECK_KNL_M64: #define __AVX512CD__ 1
751 // CHECK_KNL_M64: #define __AVX512ER__ 1
752 // CHECK_KNL_M64: #define __AVX512F__ 1
753 // CHECK_KNL_M64: #define __AVX512PF__ 1
754 // CHECK_KNL_M64: #define __AVX__ 1
755 // CHECK_KNL_M64: #define __BMI2__ 1
756 // CHECK_KNL_M64: #define __BMI__ 1
757 // CHECK_KNL_M64: #define __F16C__ 1
758 // CHECK_KNL_M64: #define __FMA__ 1
759 // CHECK_KNL_M64: #define __LZCNT__ 1
760 // CHECK_KNL_M64: #define __MMX__ 1
761 // CHECK_KNL_M64: #define __PCLMUL__ 1
762 // CHECK_KNL_M64: #define __POPCNT__ 1
763 // CHECK_KNL_M64: #define __RDRND__ 1
764 // CHECK_KNL_M64: #define __RTM__ 1
765 // CHECK_KNL_M64: #define __SSE2_MATH__ 1
766 // CHECK_KNL_M64: #define __SSE2__ 1
767 // CHECK_KNL_M64: #define __SSE3__ 1
768 // CHECK_KNL_M64: #define __SSE4_1__ 1
769 // CHECK_KNL_M64: #define __SSE4_2__ 1
770 // CHECK_KNL_M64: #define __SSE_MATH__ 1
771 // CHECK_KNL_M64: #define __SSE__ 1
772 // CHECK_KNL_M64: #define __SSSE3__ 1
773 // CHECK_KNL_M64: #define __XSAVEOPT__ 1
774 // CHECK_KNL_M64: #define __XSAVE__ 1
775 // CHECK_KNL_M64: #define __amd64 1
776 // CHECK_KNL_M64: #define __amd64__ 1
777 // CHECK_KNL_M64: #define __knl 1
778 // CHECK_KNL_M64: #define __knl__ 1
779 // CHECK_KNL_M64: #define __tune_knl__ 1
780 // CHECK_KNL_M64: #define __x86_64 1
781 // CHECK_KNL_M64: #define __x86_64__ 1
782 //
783 // RUN: %clang -march=skylake-avx512 -m32 -E -dM %s -o - 2>&1 \
784 // RUN:     -target i386-unknown-linux \
785 // RUN:   | FileCheck -match-full-lines %s -check-prefix=CHECK_SKX_M32
786 // CHECK_SKX_M32: #define __AES__ 1
787 // CHECK_SKX_M32: #define __AVX2__ 1
788 // CHECK_SKX_M32: #define __AVX512BW__ 1
789 // CHECK_SKX_M32: #define __AVX512CD__ 1
790 // CHECK_SKX_M32: #define __AVX512DQ__ 1
791 // CHECK_SKX_M32: #define __AVX512F__ 1
792 // CHECK_SKX_M32: #define __AVX512VL__ 1
793 // CHECK_SKX_M32: #define __AVX__ 1
794 // CHECK_SKX_M32: #define __BMI2__ 1
795 // CHECK_SKX_M32: #define __BMI__ 1
796 // CHECK_SKX_M32: #define __F16C__ 1
797 // CHECK_SKX_M32: #define __FMA__ 1
798 // CHECK_SKX_M32: #define __LZCNT__ 1
799 // CHECK_SKX_M32: #define __MMX__ 1
800 // CHECK_SKX_M32: #define __PCLMUL__ 1
801 // CHECK_SKX_M32: #define __POPCNT__ 1
802 // CHECK_SKX_M32: #define __RDRND__ 1
803 // CHECK_SKX_M32: #define __RTM__ 1
804 // CHECK_SKX_M32: #define __SSE2__ 1
805 // CHECK_SKX_M32: #define __SSE3__ 1
806 // CHECK_SKX_M32: #define __SSE4_1__ 1
807 // CHECK_SKX_M32: #define __SSE4_2__ 1
808 // CHECK_SKX_M32: #define __SSE__ 1
809 // CHECK_SKX_M32: #define __SSSE3__ 1
810 // CHECK_SKX_M32: #define __XSAVEC__ 1
811 // CHECK_SKX_M32: #define __XSAVEOPT__ 1
812 // CHECK_SKX_M32: #define __XSAVES__ 1
813 // CHECK_SKX_M32: #define __XSAVE__ 1
814 // CHECK_SKX_M32: #define __i386 1
815 // CHECK_SKX_M32: #define __i386__ 1
816 // CHECK_SKX_M32: #define __skx 1
817 // CHECK_SKX_M32: #define __skx__ 1
818 // CHECK_SKX_M32: #define __tune_skx__ 1
819 // CHECK_SKX_M32: #define i386 1
820 
821 // RUN: %clang -march=skylake-avx512 -m64 -E -dM %s -o - 2>&1 \
822 // RUN:     -target i386-unknown-linux \
823 // RUN:   | FileCheck -match-full-lines %s -check-prefix=CHECK_SKX_M64
824 // CHECK_SKX_M64: #define __AES__ 1
825 // CHECK_SKX_M64: #define __AVX2__ 1
826 // CHECK_SKX_M64: #define __AVX512BW__ 1
827 // CHECK_SKX_M64: #define __AVX512CD__ 1
828 // CHECK_SKX_M64: #define __AVX512DQ__ 1
829 // CHECK_SKX_M64: #define __AVX512F__ 1
830 // CHECK_SKX_M64: #define __AVX512VL__ 1
831 // CHECK_SKX_M64: #define __AVX__ 1
832 // CHECK_SKX_M64: #define __BMI2__ 1
833 // CHECK_SKX_M64: #define __BMI__ 1
834 // CHECK_SKX_M64: #define __F16C__ 1
835 // CHECK_SKX_M64: #define __FMA__ 1
836 // CHECK_SKX_M64: #define __LZCNT__ 1
837 // CHECK_SKX_M64: #define __MMX__ 1
838 // CHECK_SKX_M64: #define __PCLMUL__ 1
839 // CHECK_SKX_M64: #define __POPCNT__ 1
840 // CHECK_SKX_M64: #define __RDRND__ 1
841 // CHECK_SKX_M64: #define __RTM__ 1
842 // CHECK_SKX_M64: #define __SSE2_MATH__ 1
843 // CHECK_SKX_M64: #define __SSE2__ 1
844 // CHECK_SKX_M64: #define __SSE3__ 1
845 // CHECK_SKX_M64: #define __SSE4_1__ 1
846 // CHECK_SKX_M64: #define __SSE4_2__ 1
847 // CHECK_SKX_M64: #define __SSE_MATH__ 1
848 // CHECK_SKX_M64: #define __SSE__ 1
849 // CHECK_SKX_M64: #define __SSSE3__ 1
850 // CHECK_SKX_M64: #define __XSAVEC__ 1
851 // CHECK_SKX_M64: #define __XSAVEOPT__ 1
852 // CHECK_SKX_M64: #define __XSAVES__ 1
853 // CHECK_SKX_M64: #define __XSAVE__ 1
854 // CHECK_SKX_M64: #define __amd64 1
855 // CHECK_SKX_M64: #define __amd64__ 1
856 // CHECK_SKX_M64: #define __skx 1
857 // CHECK_SKX_M64: #define __skx__ 1
858 // CHECK_SKX_M64: #define __tune_skx__ 1
859 // CHECK_SKX_M64: #define __x86_64 1
860 // CHECK_SKX_M64: #define __x86_64__ 1
861 //
862 // RUN: %clang -march=cannonlake -m32 -E -dM %s -o - 2>&1 \
863 // RUN:     -target i386-unknown-linux \
864 // RUN:   | FileCheck -match-full-lines %s -check-prefix=CHECK_CNL_M32
865 // CHECK_CNL_M32: #define __AES__ 1
866 // CHECK_CNL_M32: #define __AVX2__ 1
867 // CHECK_CNL_M32: #define __AVX512BW__ 1
868 // CHECK_CNL_M32: #define __AVX512CD__ 1
869 // CHECK_CNL_M32: #define __AVX512DQ__ 1
870 // CHECK_CNL_M32: #define __AVX512F__ 1
871 // CHECK_CNL_M32: #define __AVX512IFMA__ 1
872 // CHECK_CNL_M32: #define __AVX512VBMI__ 1
873 // CHECK_CNL_M32: #define __AVX512VL__ 1
874 // CHECK_CNL_M32: #define __AVX__ 1
875 // CHECK_CNL_M32: #define __BMI2__ 1
876 // CHECK_CNL_M32: #define __BMI__ 1
877 // CHECK_CNL_M32: #define __F16C__ 1
878 // CHECK_CNL_M32: #define __FMA__ 1
879 // CHECK_CNL_M32: #define __LZCNT__ 1
880 // CHECK_CNL_M32: #define __MMX__ 1
881 // CHECK_CNL_M32: #define __PCLMUL__ 1
882 // CHECK_CNL_M32: #define __POPCNT__ 1
883 // CHECK_CNL_M32: #define __RDRND__ 1
884 // CHECK_CNL_M32: #define __RTM__ 1
885 // CHECK_CNL_M32: #define __SHA__ 1
886 // CHECK_CNL_M32: #define __SSE2__ 1
887 // CHECK_CNL_M32: #define __SSE3__ 1
888 // CHECK_CNL_M32: #define __SSE4_1__ 1
889 // CHECK_CNL_M32: #define __SSE4_2__ 1
890 // CHECK_CNL_M32: #define __SSE__ 1
891 // CHECK_CNL_M32: #define __SSSE3__ 1
892 // CHECK_CNL_M32: #define __XSAVEC__ 1
893 // CHECK_CNL_M32: #define __XSAVEOPT__ 1
894 // CHECK_CNL_M32: #define __XSAVES__ 1
895 // CHECK_CNL_M32: #define __XSAVE__ 1
896 // CHECK_CNL_M32: #define __i386 1
897 // CHECK_CNL_M32: #define __i386__ 1
898 // CHECK_CNL_M32: #define i386 1
899 //
900 // RUN: %clang -march=cannonlake -m64 -E -dM %s -o - 2>&1 \
901 // RUN:     -target i386-unknown-linux \
902 // RUN:   | FileCheck -match-full-lines %s -check-prefix=CHECK_CNL_M64
903 // CHECK_CNL_M64: #define __AES__ 1
904 // CHECK_CNL_M64: #define __AVX2__ 1
905 // CHECK_CNL_M64: #define __AVX512BW__ 1
906 // CHECK_CNL_M64: #define __AVX512CD__ 1
907 // CHECK_CNL_M64: #define __AVX512DQ__ 1
908 // CHECK_CNL_M64: #define __AVX512F__ 1
909 // CHECK_CNL_M64: #define __AVX512IFMA__ 1
910 // CHECK_CNL_M64: #define __AVX512VBMI__ 1
911 // CHECK_CNL_M64: #define __AVX512VL__ 1
912 // CHECK_CNL_M64: #define __AVX__ 1
913 // CHECK_CNL_M64: #define __BMI2__ 1
914 // CHECK_CNL_M64: #define __BMI__ 1
915 // CHECK_CNL_M64: #define __F16C__ 1
916 // CHECK_CNL_M64: #define __FMA__ 1
917 // CHECK_CNL_M64: #define __LZCNT__ 1
918 // CHECK_CNL_M64: #define __MMX__ 1
919 // CHECK_CNL_M64: #define __PCLMUL__ 1
920 // CHECK_CNL_M64: #define __POPCNT__ 1
921 // CHECK_CNL_M64: #define __RDRND__ 1
922 // CHECK_CNL_M64: #define __RTM__ 1
923 // CHECK_CNL_M64: #define __SHA__ 1
924 // CHECK_CNL_M64: #define __SSE2__ 1
925 // CHECK_CNL_M64: #define __SSE3__ 1
926 // CHECK_CNL_M64: #define __SSE4_1__ 1
927 // CHECK_CNL_M64: #define __SSE4_2__ 1
928 // CHECK_CNL_M64: #define __SSE__ 1
929 // CHECK_CNL_M64: #define __SSSE3__ 1
930 // CHECK_CNL_M64: #define __XSAVEC__ 1
931 // CHECK_CNL_M64: #define __XSAVEOPT__ 1
932 // CHECK_CNL_M64: #define __XSAVES__ 1
933 // CHECK_CNL_M64: #define __XSAVE__ 1
934 // CHECK_CNL_M64: #define __amd64 1
935 // CHECK_CNL_M64: #define __amd64__ 1
936 // CHECK_CNL_M64: #define __x86_64 1
937 // CHECK_CNL_M64: #define __x86_64__ 1
938 
939 // RUN: %clang -march=atom -m32 -E -dM %s -o - 2>&1 \
940 // RUN:     -target i386-unknown-linux \
941 // RUN:   | FileCheck -match-full-lines %s -check-prefix=CHECK_ATOM_M32
942 // CHECK_ATOM_M32: #define __MMX__ 1
943 // CHECK_ATOM_M32: #define __SSE2__ 1
944 // CHECK_ATOM_M32: #define __SSE3__ 1
945 // CHECK_ATOM_M32: #define __SSE__ 1
946 // CHECK_ATOM_M32: #define __SSSE3__ 1
947 // CHECK_ATOM_M32: #define __atom 1
948 // CHECK_ATOM_M32: #define __atom__ 1
949 // CHECK_ATOM_M32: #define __i386 1
950 // CHECK_ATOM_M32: #define __i386__ 1
951 // CHECK_ATOM_M32: #define __tune_atom__ 1
952 // CHECK_ATOM_M32: #define i386 1
953 // RUN: %clang -march=atom -m64 -E -dM %s -o - 2>&1 \
954 // RUN:     -target i386-unknown-linux \
955 // RUN:   | FileCheck -match-full-lines %s -check-prefix=CHECK_ATOM_M64
956 // CHECK_ATOM_M64: #define __MMX__ 1
957 // CHECK_ATOM_M64: #define __SSE2_MATH__ 1
958 // CHECK_ATOM_M64: #define __SSE2__ 1
959 // CHECK_ATOM_M64: #define __SSE3__ 1
960 // CHECK_ATOM_M64: #define __SSE_MATH__ 1
961 // CHECK_ATOM_M64: #define __SSE__ 1
962 // CHECK_ATOM_M64: #define __SSSE3__ 1
963 // CHECK_ATOM_M64: #define __amd64 1
964 // CHECK_ATOM_M64: #define __amd64__ 1
965 // CHECK_ATOM_M64: #define __atom 1
966 // CHECK_ATOM_M64: #define __atom__ 1
967 // CHECK_ATOM_M64: #define __tune_atom__ 1
968 // CHECK_ATOM_M64: #define __x86_64 1
969 // CHECK_ATOM_M64: #define __x86_64__ 1
970 //
971 // RUN: %clang -march=slm -m32 -E -dM %s -o - 2>&1 \
972 // RUN:     -target i386-unknown-linux \
973 // RUN:   | FileCheck -match-full-lines %s -check-prefix=CHECK_SLM_M32
974 // CHECK_SLM_M32: #define __MMX__ 1
975 // CHECK_SLM_M32: #define __SSE2__ 1
976 // CHECK_SLM_M32: #define __SSE3__ 1
977 // CHECK_SLM_M32: #define __SSE4_1__ 1
978 // CHECK_SLM_M32: #define __SSE4_2__ 1
979 // CHECK_SLM_M32: #define __SSE__ 1
980 // CHECK_SLM_M32: #define __SSSE3__ 1
981 // CHECK_SLM_M32: #define __i386 1
982 // CHECK_SLM_M32: #define __i386__ 1
983 // CHECK_SLM_M32: #define __slm 1
984 // CHECK_SLM_M32: #define __slm__ 1
985 // CHECK_SLM_M32: #define __tune_slm__ 1
986 // CHECK_SLM_M32: #define i386 1
987 // RUN: %clang -march=slm -m64 -E -dM %s -o - 2>&1 \
988 // RUN:     -target i386-unknown-linux \
989 // RUN:   | FileCheck -match-full-lines %s -check-prefix=CHECK_SLM_M64
990 // CHECK_SLM_M64: #define __MMX__ 1
991 // CHECK_SLM_M64: #define __SSE2_MATH__ 1
992 // CHECK_SLM_M64: #define __SSE2__ 1
993 // CHECK_SLM_M64: #define __SSE3__ 1
994 // CHECK_SLM_M64: #define __SSE4_1__ 1
995 // CHECK_SLM_M64: #define __SSE4_2__ 1
996 // CHECK_SLM_M64: #define __SSE_MATH__ 1
997 // CHECK_SLM_M64: #define __SSE__ 1
998 // CHECK_SLM_M64: #define __SSSE3__ 1
999 // CHECK_SLM_M64: #define __amd64 1
1000 // CHECK_SLM_M64: #define __amd64__ 1
1001 // CHECK_SLM_M64: #define __slm 1
1002 // CHECK_SLM_M64: #define __slm__ 1
1003 // CHECK_SLM_M64: #define __tune_slm__ 1
1004 // CHECK_SLM_M64: #define __x86_64 1
1005 // CHECK_SLM_M64: #define __x86_64__ 1
1006 //
1007 // RUN: %clang -march=lakemont -m32 -E -dM %s -o - 2>&1 \
1008 // RUN:     -target i386-unknown-linux \
1009 // RUN:   | FileCheck %s -check-prefix=CHECK_LMT_M32
1010 // CHECK_LMT_M32: #define __i386 1
1011 // CHECK_LMT_M32: #define __i386__ 1
1012 // CHECK_LMT_M32: #define __tune_lakemont__ 1
1013 // CHECK_LMT_M32: #define i386 1
1014 // RUN: not %clang -march=lakemont -m64 -E -dM %s -o - 2>&1 \
1015 // RUN:     -target i386-unknown-linux \
1016 // RUN:   | FileCheck %s -check-prefix=CHECK_LMT_M64
1017 // CHECK_LMT_M64: error:
1018 //
1019 // RUN: %clang -march=geode -m32 -E -dM %s -o - 2>&1 \
1020 // RUN:     -target i386-unknown-linux \
1021 // RUN:   | FileCheck -match-full-lines %s -check-prefix=CHECK_GEODE_M32
1022 // CHECK_GEODE_M32: #define __3dNOW_A__ 1
1023 // CHECK_GEODE_M32: #define __3dNOW__ 1
1024 // CHECK_GEODE_M32: #define __MMX__ 1
1025 // CHECK_GEODE_M32: #define __geode 1
1026 // CHECK_GEODE_M32: #define __geode__ 1
1027 // CHECK_GEODE_M32: #define __i386 1
1028 // CHECK_GEODE_M32: #define __i386__ 1
1029 // CHECK_GEODE_M32: #define __tune_geode__ 1
1030 // CHECK_GEODE_M32: #define i386 1
1031 // RUN: not %clang -march=geode -m64 -E -dM %s -o - 2>&1 \
1032 // RUN:     -target i386-unknown-linux \
1033 // RUN:   | FileCheck -match-full-lines %s -check-prefix=CHECK_GEODE_M64
1034 // CHECK_GEODE_M64: error: {{.*}}
1035 //
1036 // RUN: %clang -march=k6 -m32 -E -dM %s -o - 2>&1 \
1037 // RUN:     -target i386-unknown-linux \
1038 // RUN:   | FileCheck -match-full-lines %s -check-prefix=CHECK_K6_M32
1039 // CHECK_K6_M32: #define __MMX__ 1
1040 // CHECK_K6_M32: #define __i386 1
1041 // CHECK_K6_M32: #define __i386__ 1
1042 // CHECK_K6_M32: #define __k6 1
1043 // CHECK_K6_M32: #define __k6__ 1
1044 // CHECK_K6_M32: #define __tune_k6__ 1
1045 // CHECK_K6_M32: #define i386 1
1046 // RUN: not %clang -march=k6 -m64 -E -dM %s -o - 2>&1 \
1047 // RUN:     -target i386-unknown-linux \
1048 // RUN:   | FileCheck -match-full-lines %s -check-prefix=CHECK_K6_M64
1049 // CHECK_K6_M64: error: {{.*}}
1050 //
1051 // RUN: %clang -march=k6-2 -m32 -E -dM %s -o - 2>&1 \
1052 // RUN:     -target i386-unknown-linux \
1053 // RUN:   | FileCheck -match-full-lines %s -check-prefix=CHECK_K6_2_M32
1054 // CHECK_K6_2_M32: #define __3dNOW__ 1
1055 // CHECK_K6_2_M32: #define __MMX__ 1
1056 // CHECK_K6_2_M32: #define __i386 1
1057 // CHECK_K6_2_M32: #define __i386__ 1
1058 // CHECK_K6_2_M32: #define __k6 1
1059 // CHECK_K6_2_M32: #define __k6_2__ 1
1060 // CHECK_K6_2_M32: #define __k6__ 1
1061 // CHECK_K6_2_M32: #define __tune_k6_2__ 1
1062 // CHECK_K6_2_M32: #define __tune_k6__ 1
1063 // CHECK_K6_2_M32: #define i386 1
1064 // RUN: not %clang -march=k6-2 -m64 -E -dM %s -o - 2>&1 \
1065 // RUN:     -target i386-unknown-linux \
1066 // RUN:   | FileCheck -match-full-lines %s -check-prefix=CHECK_K6_2_M64
1067 // CHECK_K6_2_M64: error: {{.*}}
1068 //
1069 // RUN: %clang -march=k6-3 -m32 -E -dM %s -o - 2>&1 \
1070 // RUN:     -target i386-unknown-linux \
1071 // RUN:   | FileCheck -match-full-lines %s -check-prefix=CHECK_K6_3_M32
1072 // CHECK_K6_3_M32: #define __3dNOW__ 1
1073 // CHECK_K6_3_M32: #define __MMX__ 1
1074 // CHECK_K6_3_M32: #define __i386 1
1075 // CHECK_K6_3_M32: #define __i386__ 1
1076 // CHECK_K6_3_M32: #define __k6 1
1077 // CHECK_K6_3_M32: #define __k6_3__ 1
1078 // CHECK_K6_3_M32: #define __k6__ 1
1079 // CHECK_K6_3_M32: #define __tune_k6_3__ 1
1080 // CHECK_K6_3_M32: #define __tune_k6__ 1
1081 // CHECK_K6_3_M32: #define i386 1
1082 // RUN: not %clang -march=k6-3 -m64 -E -dM %s -o - 2>&1 \
1083 // RUN:     -target i386-unknown-linux \
1084 // RUN:   | FileCheck -match-full-lines %s -check-prefix=CHECK_K6_3_M64
1085 // CHECK_K6_3_M64: error: {{.*}}
1086 //
1087 // RUN: %clang -march=athlon -m32 -E -dM %s -o - 2>&1 \
1088 // RUN:     -target i386-unknown-linux \
1089 // RUN:   | FileCheck -match-full-lines %s -check-prefix=CHECK_ATHLON_M32
1090 // CHECK_ATHLON_M32: #define __3dNOW_A__ 1
1091 // CHECK_ATHLON_M32: #define __3dNOW__ 1
1092 // CHECK_ATHLON_M32: #define __MMX__ 1
1093 // CHECK_ATHLON_M32: #define __athlon 1
1094 // CHECK_ATHLON_M32: #define __athlon__ 1
1095 // CHECK_ATHLON_M32: #define __i386 1
1096 // CHECK_ATHLON_M32: #define __i386__ 1
1097 // CHECK_ATHLON_M32: #define __tune_athlon__ 1
1098 // CHECK_ATHLON_M32: #define i386 1
1099 // RUN: not %clang -march=athlon -m64 -E -dM %s -o - 2>&1 \
1100 // RUN:     -target i386-unknown-linux \
1101 // RUN:   | FileCheck -match-full-lines %s -check-prefix=CHECK_ATHLON_M64
1102 // CHECK_ATHLON_M64: error: {{.*}}
1103 //
1104 // RUN: %clang -march=athlon-tbird -m32 -E -dM %s -o - 2>&1 \
1105 // RUN:     -target i386-unknown-linux \
1106 // RUN:   | FileCheck -match-full-lines %s -check-prefix=CHECK_ATHLON_TBIRD_M32
1107 // CHECK_ATHLON_TBIRD_M32: #define __3dNOW_A__ 1
1108 // CHECK_ATHLON_TBIRD_M32: #define __3dNOW__ 1
1109 // CHECK_ATHLON_TBIRD_M32: #define __MMX__ 1
1110 // CHECK_ATHLON_TBIRD_M32: #define __athlon 1
1111 // CHECK_ATHLON_TBIRD_M32: #define __athlon__ 1
1112 // CHECK_ATHLON_TBIRD_M32: #define __i386 1
1113 // CHECK_ATHLON_TBIRD_M32: #define __i386__ 1
1114 // CHECK_ATHLON_TBIRD_M32: #define __tune_athlon__ 1
1115 // CHECK_ATHLON_TBIRD_M32: #define i386 1
1116 // RUN: not %clang -march=athlon-tbird -m64 -E -dM %s -o - 2>&1 \
1117 // RUN:     -target i386-unknown-linux \
1118 // RUN:   | FileCheck -match-full-lines %s -check-prefix=CHECK_ATHLON_TBIRD_M64
1119 // CHECK_ATHLON_TBIRD_M64: error: {{.*}}
1120 //
1121 // RUN: %clang -march=athlon-4 -m32 -E -dM %s -o - 2>&1 \
1122 // RUN:     -target i386-unknown-linux \
1123 // RUN:   | FileCheck -match-full-lines %s -check-prefix=CHECK_ATHLON_4_M32
1124 // CHECK_ATHLON_4_M32: #define __3dNOW_A__ 1
1125 // CHECK_ATHLON_4_M32: #define __3dNOW__ 1
1126 // CHECK_ATHLON_4_M32: #define __MMX__ 1
1127 // CHECK_ATHLON_4_M32: #define __SSE__ 1
1128 // CHECK_ATHLON_4_M32: #define __athlon 1
1129 // CHECK_ATHLON_4_M32: #define __athlon__ 1
1130 // CHECK_ATHLON_4_M32: #define __athlon_sse__ 1
1131 // CHECK_ATHLON_4_M32: #define __i386 1
1132 // CHECK_ATHLON_4_M32: #define __i386__ 1
1133 // CHECK_ATHLON_4_M32: #define __tune_athlon__ 1
1134 // CHECK_ATHLON_4_M32: #define __tune_athlon_sse__ 1
1135 // CHECK_ATHLON_4_M32: #define i386 1
1136 // RUN: not %clang -march=athlon-4 -m64 -E -dM %s -o - 2>&1 \
1137 // RUN:     -target i386-unknown-linux \
1138 // RUN:   | FileCheck -match-full-lines %s -check-prefix=CHECK_ATHLON_4_M64
1139 // CHECK_ATHLON_4_M64: error: {{.*}}
1140 //
1141 // RUN: %clang -march=athlon-xp -m32 -E -dM %s -o - 2>&1 \
1142 // RUN:     -target i386-unknown-linux \
1143 // RUN:   | FileCheck -match-full-lines %s -check-prefix=CHECK_ATHLON_XP_M32
1144 // CHECK_ATHLON_XP_M32: #define __3dNOW_A__ 1
1145 // CHECK_ATHLON_XP_M32: #define __3dNOW__ 1
1146 // CHECK_ATHLON_XP_M32: #define __MMX__ 1
1147 // CHECK_ATHLON_XP_M32: #define __SSE__ 1
1148 // CHECK_ATHLON_XP_M32: #define __athlon 1
1149 // CHECK_ATHLON_XP_M32: #define __athlon__ 1
1150 // CHECK_ATHLON_XP_M32: #define __athlon_sse__ 1
1151 // CHECK_ATHLON_XP_M32: #define __i386 1
1152 // CHECK_ATHLON_XP_M32: #define __i386__ 1
1153 // CHECK_ATHLON_XP_M32: #define __tune_athlon__ 1
1154 // CHECK_ATHLON_XP_M32: #define __tune_athlon_sse__ 1
1155 // CHECK_ATHLON_XP_M32: #define i386 1
1156 // RUN: not %clang -march=athlon-xp -m64 -E -dM %s -o - 2>&1 \
1157 // RUN:     -target i386-unknown-linux \
1158 // RUN:   | FileCheck -match-full-lines %s -check-prefix=CHECK_ATHLON_XP_M64
1159 // CHECK_ATHLON_XP_M64: error: {{.*}}
1160 //
1161 // RUN: %clang -march=athlon-mp -m32 -E -dM %s -o - 2>&1 \
1162 // RUN:     -target i386-unknown-linux \
1163 // RUN:   | FileCheck -match-full-lines %s -check-prefix=CHECK_ATHLON_MP_M32
1164 // CHECK_ATHLON_MP_M32: #define __3dNOW_A__ 1
1165 // CHECK_ATHLON_MP_M32: #define __3dNOW__ 1
1166 // CHECK_ATHLON_MP_M32: #define __MMX__ 1
1167 // CHECK_ATHLON_MP_M32: #define __SSE__ 1
1168 // CHECK_ATHLON_MP_M32: #define __athlon 1
1169 // CHECK_ATHLON_MP_M32: #define __athlon__ 1
1170 // CHECK_ATHLON_MP_M32: #define __athlon_sse__ 1
1171 // CHECK_ATHLON_MP_M32: #define __i386 1
1172 // CHECK_ATHLON_MP_M32: #define __i386__ 1
1173 // CHECK_ATHLON_MP_M32: #define __tune_athlon__ 1
1174 // CHECK_ATHLON_MP_M32: #define __tune_athlon_sse__ 1
1175 // CHECK_ATHLON_MP_M32: #define i386 1
1176 // RUN: not %clang -march=athlon-mp -m64 -E -dM %s -o - 2>&1 \
1177 // RUN:     -target i386-unknown-linux \
1178 // RUN:   | FileCheck -match-full-lines %s -check-prefix=CHECK_ATHLON_MP_M64
1179 // CHECK_ATHLON_MP_M64: error: {{.*}}
1180 //
1181 // RUN: %clang -march=x86-64 -m32 -E -dM %s -o - 2>&1 \
1182 // RUN:     -target i386-unknown-linux \
1183 // RUN:   | FileCheck -match-full-lines %s -check-prefix=CHECK_X86_64_M32
1184 // CHECK_X86_64_M32: #define __MMX__ 1
1185 // CHECK_X86_64_M32: #define __SSE2__ 1
1186 // CHECK_X86_64_M32: #define __SSE__ 1
1187 // CHECK_X86_64_M32: #define __i386 1
1188 // CHECK_X86_64_M32: #define __i386__ 1
1189 // CHECK_X86_64_M32: #define __k8 1
1190 // CHECK_X86_64_M32: #define __k8__ 1
1191 // CHECK_X86_64_M32: #define i386 1
1192 // RUN: %clang -march=x86-64 -m64 -E -dM %s -o - 2>&1 \
1193 // RUN:     -target i386-unknown-linux \
1194 // RUN:   | FileCheck -match-full-lines %s -check-prefix=CHECK_X86_64_M64
1195 // CHECK_X86_64_M64: #define __MMX__ 1
1196 // CHECK_X86_64_M64: #define __SSE2_MATH__ 1
1197 // CHECK_X86_64_M64: #define __SSE2__ 1
1198 // CHECK_X86_64_M64: #define __SSE_MATH__ 1
1199 // CHECK_X86_64_M64: #define __SSE__ 1
1200 // CHECK_X86_64_M64: #define __amd64 1
1201 // CHECK_X86_64_M64: #define __amd64__ 1
1202 // CHECK_X86_64_M64: #define __k8 1
1203 // CHECK_X86_64_M64: #define __k8__ 1
1204 // CHECK_X86_64_M64: #define __x86_64 1
1205 // CHECK_X86_64_M64: #define __x86_64__ 1
1206 //
1207 // RUN: %clang -march=k8 -m32 -E -dM %s -o - 2>&1 \
1208 // RUN:     -target i386-unknown-linux \
1209 // RUN:   | FileCheck -match-full-lines %s -check-prefix=CHECK_K8_M32
1210 // CHECK_K8_M32: #define __3dNOW_A__ 1
1211 // CHECK_K8_M32: #define __3dNOW__ 1
1212 // CHECK_K8_M32: #define __MMX__ 1
1213 // CHECK_K8_M32: #define __SSE2__ 1
1214 // CHECK_K8_M32: #define __SSE__ 1
1215 // CHECK_K8_M32: #define __i386 1
1216 // CHECK_K8_M32: #define __i386__ 1
1217 // CHECK_K8_M32: #define __k8 1
1218 // CHECK_K8_M32: #define __k8__ 1
1219 // CHECK_K8_M32: #define __tune_k8__ 1
1220 // CHECK_K8_M32: #define i386 1
1221 // RUN: %clang -march=k8 -m64 -E -dM %s -o - 2>&1 \
1222 // RUN:     -target i386-unknown-linux \
1223 // RUN:   | FileCheck -match-full-lines %s -check-prefix=CHECK_K8_M64
1224 // CHECK_K8_M64: #define __3dNOW_A__ 1
1225 // CHECK_K8_M64: #define __3dNOW__ 1
1226 // CHECK_K8_M64: #define __MMX__ 1
1227 // CHECK_K8_M64: #define __SSE2_MATH__ 1
1228 // CHECK_K8_M64: #define __SSE2__ 1
1229 // CHECK_K8_M64: #define __SSE_MATH__ 1
1230 // CHECK_K8_M64: #define __SSE__ 1
1231 // CHECK_K8_M64: #define __amd64 1
1232 // CHECK_K8_M64: #define __amd64__ 1
1233 // CHECK_K8_M64: #define __k8 1
1234 // CHECK_K8_M64: #define __k8__ 1
1235 // CHECK_K8_M64: #define __tune_k8__ 1
1236 // CHECK_K8_M64: #define __x86_64 1
1237 // CHECK_K8_M64: #define __x86_64__ 1
1238 //
1239 // RUN: %clang -march=k8-sse3 -m32 -E -dM %s -o - 2>&1 \
1240 // RUN:     -target i386-unknown-linux \
1241 // RUN:   | FileCheck -match-full-lines %s -check-prefix=CHECK_K8_SSE3_M32
1242 // CHECK_K8_SSE3_M32: #define __3dNOW_A__ 1
1243 // CHECK_K8_SSE3_M32: #define __3dNOW__ 1
1244 // CHECK_K8_SSE3_M32: #define __MMX__ 1
1245 // CHECK_K8_SSE3_M32: #define __SSE2__ 1
1246 // CHECK_K8_SSE3_M32: #define __SSE3__ 1
1247 // CHECK_K8_SSE3_M32: #define __SSE__ 1
1248 // CHECK_K8_SSE3_M32: #define __i386 1
1249 // CHECK_K8_SSE3_M32: #define __i386__ 1
1250 // CHECK_K8_SSE3_M32: #define __k8 1
1251 // CHECK_K8_SSE3_M32: #define __k8__ 1
1252 // CHECK_K8_SSE3_M32: #define __tune_k8__ 1
1253 // CHECK_K8_SSE3_M32: #define i386 1
1254 // RUN: %clang -march=k8-sse3 -m64 -E -dM %s -o - 2>&1 \
1255 // RUN:     -target i386-unknown-linux \
1256 // RUN:   | FileCheck -match-full-lines %s -check-prefix=CHECK_K8_SSE3_M64
1257 // CHECK_K8_SSE3_M64: #define __3dNOW_A__ 1
1258 // CHECK_K8_SSE3_M64: #define __3dNOW__ 1
1259 // CHECK_K8_SSE3_M64: #define __MMX__ 1
1260 // CHECK_K8_SSE3_M64: #define __SSE2_MATH__ 1
1261 // CHECK_K8_SSE3_M64: #define __SSE2__ 1
1262 // CHECK_K8_SSE3_M64: #define __SSE3__ 1
1263 // CHECK_K8_SSE3_M64: #define __SSE_MATH__ 1
1264 // CHECK_K8_SSE3_M64: #define __SSE__ 1
1265 // CHECK_K8_SSE3_M64: #define __amd64 1
1266 // CHECK_K8_SSE3_M64: #define __amd64__ 1
1267 // CHECK_K8_SSE3_M64: #define __k8 1
1268 // CHECK_K8_SSE3_M64: #define __k8__ 1
1269 // CHECK_K8_SSE3_M64: #define __tune_k8__ 1
1270 // CHECK_K8_SSE3_M64: #define __x86_64 1
1271 // CHECK_K8_SSE3_M64: #define __x86_64__ 1
1272 //
1273 // RUN: %clang -march=opteron -m32 -E -dM %s -o - 2>&1 \
1274 // RUN:     -target i386-unknown-linux \
1275 // RUN:   | FileCheck -match-full-lines %s -check-prefix=CHECK_OPTERON_M32
1276 // CHECK_OPTERON_M32: #define __3dNOW_A__ 1
1277 // CHECK_OPTERON_M32: #define __3dNOW__ 1
1278 // CHECK_OPTERON_M32: #define __MMX__ 1
1279 // CHECK_OPTERON_M32: #define __SSE2__ 1
1280 // CHECK_OPTERON_M32: #define __SSE__ 1
1281 // CHECK_OPTERON_M32: #define __i386 1
1282 // CHECK_OPTERON_M32: #define __i386__ 1
1283 // CHECK_OPTERON_M32: #define __k8 1
1284 // CHECK_OPTERON_M32: #define __k8__ 1
1285 // CHECK_OPTERON_M32: #define __tune_k8__ 1
1286 // CHECK_OPTERON_M32: #define i386 1
1287 // RUN: %clang -march=opteron -m64 -E -dM %s -o - 2>&1 \
1288 // RUN:     -target i386-unknown-linux \
1289 // RUN:   | FileCheck -match-full-lines %s -check-prefix=CHECK_OPTERON_M64
1290 // CHECK_OPTERON_M64: #define __3dNOW_A__ 1
1291 // CHECK_OPTERON_M64: #define __3dNOW__ 1
1292 // CHECK_OPTERON_M64: #define __MMX__ 1
1293 // CHECK_OPTERON_M64: #define __SSE2_MATH__ 1
1294 // CHECK_OPTERON_M64: #define __SSE2__ 1
1295 // CHECK_OPTERON_M64: #define __SSE_MATH__ 1
1296 // CHECK_OPTERON_M64: #define __SSE__ 1
1297 // CHECK_OPTERON_M64: #define __amd64 1
1298 // CHECK_OPTERON_M64: #define __amd64__ 1
1299 // CHECK_OPTERON_M64: #define __k8 1
1300 // CHECK_OPTERON_M64: #define __k8__ 1
1301 // CHECK_OPTERON_M64: #define __tune_k8__ 1
1302 // CHECK_OPTERON_M64: #define __x86_64 1
1303 // CHECK_OPTERON_M64: #define __x86_64__ 1
1304 //
1305 // RUN: %clang -march=opteron-sse3 -m32 -E -dM %s -o - 2>&1 \
1306 // RUN:     -target i386-unknown-linux \
1307 // RUN:   | FileCheck -match-full-lines %s -check-prefix=CHECK_OPTERON_SSE3_M32
1308 // CHECK_OPTERON_SSE3_M32: #define __3dNOW_A__ 1
1309 // CHECK_OPTERON_SSE3_M32: #define __3dNOW__ 1
1310 // CHECK_OPTERON_SSE3_M32: #define __MMX__ 1
1311 // CHECK_OPTERON_SSE3_M32: #define __SSE2__ 1
1312 // CHECK_OPTERON_SSE3_M32: #define __SSE3__ 1
1313 // CHECK_OPTERON_SSE3_M32: #define __SSE__ 1
1314 // CHECK_OPTERON_SSE3_M32: #define __i386 1
1315 // CHECK_OPTERON_SSE3_M32: #define __i386__ 1
1316 // CHECK_OPTERON_SSE3_M32: #define __k8 1
1317 // CHECK_OPTERON_SSE3_M32: #define __k8__ 1
1318 // CHECK_OPTERON_SSE3_M32: #define __tune_k8__ 1
1319 // CHECK_OPTERON_SSE3_M32: #define i386 1
1320 // RUN: %clang -march=opteron-sse3 -m64 -E -dM %s -o - 2>&1 \
1321 // RUN:     -target i386-unknown-linux \
1322 // RUN:   | FileCheck -match-full-lines %s -check-prefix=CHECK_OPTERON_SSE3_M64
1323 // CHECK_OPTERON_SSE3_M64: #define __3dNOW_A__ 1
1324 // CHECK_OPTERON_SSE3_M64: #define __3dNOW__ 1
1325 // CHECK_OPTERON_SSE3_M64: #define __MMX__ 1
1326 // CHECK_OPTERON_SSE3_M64: #define __SSE2_MATH__ 1
1327 // CHECK_OPTERON_SSE3_M64: #define __SSE2__ 1
1328 // CHECK_OPTERON_SSE3_M64: #define __SSE3__ 1
1329 // CHECK_OPTERON_SSE3_M64: #define __SSE_MATH__ 1
1330 // CHECK_OPTERON_SSE3_M64: #define __SSE__ 1
1331 // CHECK_OPTERON_SSE3_M64: #define __amd64 1
1332 // CHECK_OPTERON_SSE3_M64: #define __amd64__ 1
1333 // CHECK_OPTERON_SSE3_M64: #define __k8 1
1334 // CHECK_OPTERON_SSE3_M64: #define __k8__ 1
1335 // CHECK_OPTERON_SSE3_M64: #define __tune_k8__ 1
1336 // CHECK_OPTERON_SSE3_M64: #define __x86_64 1
1337 // CHECK_OPTERON_SSE3_M64: #define __x86_64__ 1
1338 //
1339 // RUN: %clang -march=athlon64 -m32 -E -dM %s -o - 2>&1 \
1340 // RUN:     -target i386-unknown-linux \
1341 // RUN:   | FileCheck -match-full-lines %s -check-prefix=CHECK_ATHLON64_M32
1342 // CHECK_ATHLON64_M32: #define __3dNOW_A__ 1
1343 // CHECK_ATHLON64_M32: #define __3dNOW__ 1
1344 // CHECK_ATHLON64_M32: #define __MMX__ 1
1345 // CHECK_ATHLON64_M32: #define __SSE2__ 1
1346 // CHECK_ATHLON64_M32: #define __SSE__ 1
1347 // CHECK_ATHLON64_M32: #define __i386 1
1348 // CHECK_ATHLON64_M32: #define __i386__ 1
1349 // CHECK_ATHLON64_M32: #define __k8 1
1350 // CHECK_ATHLON64_M32: #define __k8__ 1
1351 // CHECK_ATHLON64_M32: #define __tune_k8__ 1
1352 // CHECK_ATHLON64_M32: #define i386 1
1353 // RUN: %clang -march=athlon64 -m64 -E -dM %s -o - 2>&1 \
1354 // RUN:     -target i386-unknown-linux \
1355 // RUN:   | FileCheck -match-full-lines %s -check-prefix=CHECK_ATHLON64_M64
1356 // CHECK_ATHLON64_M64: #define __3dNOW_A__ 1
1357 // CHECK_ATHLON64_M64: #define __3dNOW__ 1
1358 // CHECK_ATHLON64_M64: #define __MMX__ 1
1359 // CHECK_ATHLON64_M64: #define __SSE2_MATH__ 1
1360 // CHECK_ATHLON64_M64: #define __SSE2__ 1
1361 // CHECK_ATHLON64_M64: #define __SSE_MATH__ 1
1362 // CHECK_ATHLON64_M64: #define __SSE__ 1
1363 // CHECK_ATHLON64_M64: #define __amd64 1
1364 // CHECK_ATHLON64_M64: #define __amd64__ 1
1365 // CHECK_ATHLON64_M64: #define __k8 1
1366 // CHECK_ATHLON64_M64: #define __k8__ 1
1367 // CHECK_ATHLON64_M64: #define __tune_k8__ 1
1368 // CHECK_ATHLON64_M64: #define __x86_64 1
1369 // CHECK_ATHLON64_M64: #define __x86_64__ 1
1370 //
1371 // RUN: %clang -march=athlon64-sse3 -m32 -E -dM %s -o - 2>&1 \
1372 // RUN:     -target i386-unknown-linux \
1373 // RUN:   | FileCheck -match-full-lines %s -check-prefix=CHECK_ATHLON64_SSE3_M32
1374 // CHECK_ATHLON64_SSE3_M32: #define __3dNOW_A__ 1
1375 // CHECK_ATHLON64_SSE3_M32: #define __3dNOW__ 1
1376 // CHECK_ATHLON64_SSE3_M32: #define __MMX__ 1
1377 // CHECK_ATHLON64_SSE3_M32: #define __SSE2__ 1
1378 // CHECK_ATHLON64_SSE3_M32: #define __SSE3__ 1
1379 // CHECK_ATHLON64_SSE3_M32: #define __SSE__ 1
1380 // CHECK_ATHLON64_SSE3_M32: #define __i386 1
1381 // CHECK_ATHLON64_SSE3_M32: #define __i386__ 1
1382 // CHECK_ATHLON64_SSE3_M32: #define __k8 1
1383 // CHECK_ATHLON64_SSE3_M32: #define __k8__ 1
1384 // CHECK_ATHLON64_SSE3_M32: #define __tune_k8__ 1
1385 // CHECK_ATHLON64_SSE3_M32: #define i386 1
1386 // RUN: %clang -march=athlon64-sse3 -m64 -E -dM %s -o - 2>&1 \
1387 // RUN:     -target i386-unknown-linux \
1388 // RUN:   | FileCheck -match-full-lines %s -check-prefix=CHECK_ATHLON64_SSE3_M64
1389 // CHECK_ATHLON64_SSE3_M64: #define __3dNOW_A__ 1
1390 // CHECK_ATHLON64_SSE3_M64: #define __3dNOW__ 1
1391 // CHECK_ATHLON64_SSE3_M64: #define __MMX__ 1
1392 // CHECK_ATHLON64_SSE3_M64: #define __SSE2_MATH__ 1
1393 // CHECK_ATHLON64_SSE3_M64: #define __SSE2__ 1
1394 // CHECK_ATHLON64_SSE3_M64: #define __SSE3__ 1
1395 // CHECK_ATHLON64_SSE3_M64: #define __SSE_MATH__ 1
1396 // CHECK_ATHLON64_SSE3_M64: #define __SSE__ 1
1397 // CHECK_ATHLON64_SSE3_M64: #define __amd64 1
1398 // CHECK_ATHLON64_SSE3_M64: #define __amd64__ 1
1399 // CHECK_ATHLON64_SSE3_M64: #define __k8 1
1400 // CHECK_ATHLON64_SSE3_M64: #define __k8__ 1
1401 // CHECK_ATHLON64_SSE3_M64: #define __tune_k8__ 1
1402 // CHECK_ATHLON64_SSE3_M64: #define __x86_64 1
1403 // CHECK_ATHLON64_SSE3_M64: #define __x86_64__ 1
1404 //
1405 // RUN: %clang -march=athlon-fx -m32 -E -dM %s -o - 2>&1 \
1406 // RUN:     -target i386-unknown-linux \
1407 // RUN:   | FileCheck -match-full-lines %s -check-prefix=CHECK_ATHLON_FX_M32
1408 // CHECK_ATHLON_FX_M32: #define __3dNOW_A__ 1
1409 // CHECK_ATHLON_FX_M32: #define __3dNOW__ 1
1410 // CHECK_ATHLON_FX_M32: #define __MMX__ 1
1411 // CHECK_ATHLON_FX_M32: #define __SSE2__ 1
1412 // CHECK_ATHLON_FX_M32: #define __SSE__ 1
1413 // CHECK_ATHLON_FX_M32: #define __i386 1
1414 // CHECK_ATHLON_FX_M32: #define __i386__ 1
1415 // CHECK_ATHLON_FX_M32: #define __k8 1
1416 // CHECK_ATHLON_FX_M32: #define __k8__ 1
1417 // CHECK_ATHLON_FX_M32: #define __tune_k8__ 1
1418 // CHECK_ATHLON_FX_M32: #define i386 1
1419 // RUN: %clang -march=athlon-fx -m64 -E -dM %s -o - 2>&1 \
1420 // RUN:     -target i386-unknown-linux \
1421 // RUN:   | FileCheck -match-full-lines %s -check-prefix=CHECK_ATHLON_FX_M64
1422 // CHECK_ATHLON_FX_M64: #define __3dNOW_A__ 1
1423 // CHECK_ATHLON_FX_M64: #define __3dNOW__ 1
1424 // CHECK_ATHLON_FX_M64: #define __MMX__ 1
1425 // CHECK_ATHLON_FX_M64: #define __SSE2_MATH__ 1
1426 // CHECK_ATHLON_FX_M64: #define __SSE2__ 1
1427 // CHECK_ATHLON_FX_M64: #define __SSE_MATH__ 1
1428 // CHECK_ATHLON_FX_M64: #define __SSE__ 1
1429 // CHECK_ATHLON_FX_M64: #define __amd64 1
1430 // CHECK_ATHLON_FX_M64: #define __amd64__ 1
1431 // CHECK_ATHLON_FX_M64: #define __k8 1
1432 // CHECK_ATHLON_FX_M64: #define __k8__ 1
1433 // CHECK_ATHLON_FX_M64: #define __tune_k8__ 1
1434 // CHECK_ATHLON_FX_M64: #define __x86_64 1
1435 // CHECK_ATHLON_FX_M64: #define __x86_64__ 1
1436 // RUN: %clang -march=amdfam10 -m32 -E -dM %s -o - 2>&1 \
1437 // RUN:     -target i386-unknown-linux \
1438 // RUN:   | FileCheck -match-full-lines %s -check-prefix=CHECK_AMDFAM10_M32
1439 // CHECK_AMDFAM10_M32: #define __3dNOW_A__ 1
1440 // CHECK_AMDFAM10_M32: #define __3dNOW__ 1
1441 // CHECK_AMDFAM10_M32: #define __LZCNT__ 1
1442 // CHECK_AMDFAM10_M32: #define __MMX__ 1
1443 // CHECK_AMDFAM10_M32: #define __POPCNT__ 1
1444 // CHECK_AMDFAM10_M32: #define __SSE2_MATH__ 1
1445 // CHECK_AMDFAM10_M32: #define __SSE2__ 1
1446 // CHECK_AMDFAM10_M32: #define __SSE3__ 1
1447 // CHECK_AMDFAM10_M32: #define __SSE4A__ 1
1448 // CHECK_AMDFAM10_M32: #define __SSE_MATH__ 1
1449 // CHECK_AMDFAM10_M32: #define __SSE__ 1
1450 // CHECK_AMDFAM10_M32: #define __amdfam10 1
1451 // CHECK_AMDFAM10_M32: #define __amdfam10__ 1
1452 // CHECK_AMDFAM10_M32: #define __i386 1
1453 // CHECK_AMDFAM10_M32: #define __i386__ 1
1454 // CHECK_AMDFAM10_M32: #define __tune_amdfam10__ 1
1455 // RUN: %clang -march=amdfam10 -m64 -E -dM %s -o - 2>&1 \
1456 // RUN:     -target i386-unknown-linux \
1457 // RUN:   | FileCheck -match-full-lines %s -check-prefix=CHECK_AMDFAM10_M64
1458 // CHECK_AMDFAM10_M64: #define __3dNOW_A__ 1
1459 // CHECK_AMDFAM10_M64: #define __3dNOW__ 1
1460 // CHECK_AMDFAM10_M64: #define __LZCNT__ 1
1461 // CHECK_AMDFAM10_M64: #define __MMX__ 1
1462 // CHECK_AMDFAM10_M64: #define __POPCNT__ 1
1463 // CHECK_AMDFAM10_M64: #define __SSE2_MATH__ 1
1464 // CHECK_AMDFAM10_M64: #define __SSE2__ 1
1465 // CHECK_AMDFAM10_M64: #define __SSE3__ 1
1466 // CHECK_AMDFAM10_M64: #define __SSE4A__ 1
1467 // CHECK_AMDFAM10_M64: #define __SSE_MATH__ 1
1468 // CHECK_AMDFAM10_M64: #define __SSE__ 1
1469 // CHECK_AMDFAM10_M64: #define __amd64 1
1470 // CHECK_AMDFAM10_M64: #define __amd64__ 1
1471 // CHECK_AMDFAM10_M64: #define __amdfam10 1
1472 // CHECK_AMDFAM10_M64: #define __amdfam10__ 1
1473 // CHECK_AMDFAM10_M64: #define __tune_amdfam10__ 1
1474 // CHECK_AMDFAM10_M64: #define __x86_64 1
1475 // CHECK_AMDFAM10_M64: #define __x86_64__ 1
1476 // RUN: %clang -march=btver1 -m32 -E -dM %s -o - 2>&1 \
1477 // RUN:     -target i386-unknown-linux \
1478 // RUN:   | FileCheck -match-full-lines %s -check-prefix=CHECK_BTVER1_M32
1479 // CHECK_BTVER1_M32-NOT: #define __3dNOW_A__ 1
1480 // CHECK_BTVER1_M32-NOT: #define __3dNOW__ 1
1481 // CHECK_BTVER1_M32: #define __LZCNT__ 1
1482 // CHECK_BTVER1_M32: #define __MMX__ 1
1483 // CHECK_BTVER1_M32: #define __POPCNT__ 1
1484 // CHECK_BTVER1_M32: #define __PRFCHW__ 1
1485 // CHECK_BTVER1_M32: #define __SSE2_MATH__ 1
1486 // CHECK_BTVER1_M32: #define __SSE2__ 1
1487 // CHECK_BTVER1_M32: #define __SSE3__ 1
1488 // CHECK_BTVER1_M32: #define __SSE4A__ 1
1489 // CHECK_BTVER1_M32: #define __SSE_MATH__ 1
1490 // CHECK_BTVER1_M32: #define __SSE__ 1
1491 // CHECK_BTVER1_M32: #define __SSSE3__ 1
1492 // CHECK_BTVER1_M32: #define __btver1 1
1493 // CHECK_BTVER1_M32: #define __btver1__ 1
1494 // CHECK_BTVER1_M32: #define __i386 1
1495 // CHECK_BTVER1_M32: #define __i386__ 1
1496 // CHECK_BTVER1_M32: #define __tune_btver1__ 1
1497 // RUN: %clang -march=btver1 -m64 -E -dM %s -o - 2>&1 \
1498 // RUN:     -target i386-unknown-linux \
1499 // RUN:   | FileCheck -match-full-lines %s -check-prefix=CHECK_BTVER1_M64
1500 // CHECK_BTVER1_M64-NOT: #define __3dNOW_A__ 1
1501 // CHECK_BTVER1_M64-NOT: #define __3dNOW__ 1
1502 // CHECK_BTVER1_M64: #define __LZCNT__ 1
1503 // CHECK_BTVER1_M64: #define __MMX__ 1
1504 // CHECK_BTVER1_M64: #define __POPCNT__ 1
1505 // CHECK_BTVER1_M64: #define __PRFCHW__ 1
1506 // CHECK_BTVER1_M64: #define __SSE2_MATH__ 1
1507 // CHECK_BTVER1_M64: #define __SSE2__ 1
1508 // CHECK_BTVER1_M64: #define __SSE3__ 1
1509 // CHECK_BTVER1_M64: #define __SSE4A__ 1
1510 // CHECK_BTVER1_M64: #define __SSE_MATH__ 1
1511 // CHECK_BTVER1_M64: #define __SSE__ 1
1512 // CHECK_BTVER1_M64: #define __SSSE3__ 1
1513 // CHECK_BTVER1_M64: #define __amd64 1
1514 // CHECK_BTVER1_M64: #define __amd64__ 1
1515 // CHECK_BTVER1_M64: #define __btver1 1
1516 // CHECK_BTVER1_M64: #define __btver1__ 1
1517 // CHECK_BTVER1_M64: #define __tune_btver1__ 1
1518 // CHECK_BTVER1_M64: #define __x86_64 1
1519 // CHECK_BTVER1_M64: #define __x86_64__ 1
1520 // RUN: %clang -march=btver2 -m32 -E -dM %s -o - 2>&1 \
1521 // RUN:     -target i386-unknown-linux \
1522 // RUN:   | FileCheck -match-full-lines %s -check-prefix=CHECK_BTVER2_M32
1523 // CHECK_BTVER2_M32-NOT: #define __3dNOW_A__ 1
1524 // CHECK_BTVER2_M32-NOT: #define __3dNOW__ 1
1525 // CHECK_BTVER2_M32: #define __AES__ 1
1526 // CHECK_BTVER2_M32: #define __AVX__ 1
1527 // CHECK_BTVER2_M32: #define __BMI__ 1
1528 // CHECK_BTVER2_M32: #define __F16C__ 1
1529 // CHECK_BTVER2_M32: #define __LZCNT__ 1
1530 // CHECK_BTVER2_M32: #define __MMX__ 1
1531 // CHECK_BTVER2_M32: #define __PCLMUL__ 1
1532 // CHECK_BTVER2_M32: #define __POPCNT__ 1
1533 // CHECK_BTVER2_M32: #define __PRFCHW__ 1
1534 // CHECK_BTVER2_M32: #define __SSE2_MATH__ 1
1535 // CHECK_BTVER2_M32: #define __SSE2__ 1
1536 // CHECK_BTVER2_M32: #define __SSE3__ 1
1537 // CHECK_BTVER2_M32: #define __SSE4A__ 1
1538 // CHECK_BTVER2_M32: #define __SSE_MATH__ 1
1539 // CHECK_BTVER2_M32: #define __SSE__ 1
1540 // CHECK_BTVER2_M32: #define __SSSE3__ 1
1541 // CHECK_BTVER2_M32: #define __XSAVEOPT__ 1
1542 // CHECK_BTVER2_M32: #define __XSAVE__ 1
1543 // CHECK_BTVER2_M32: #define __btver2 1
1544 // CHECK_BTVER2_M32: #define __btver2__ 1
1545 // CHECK_BTVER2_M32: #define __i386 1
1546 // CHECK_BTVER2_M32: #define __i386__ 1
1547 // CHECK_BTVER2_M32: #define __tune_btver2__ 1
1548 // RUN: %clang -march=btver2 -m64 -E -dM %s -o - 2>&1 \
1549 // RUN:     -target i386-unknown-linux \
1550 // RUN:   | FileCheck -match-full-lines %s -check-prefix=CHECK_BTVER2_M64
1551 // CHECK_BTVER2_M64-NOT: #define __3dNOW_A__ 1
1552 // CHECK_BTVER2_M64-NOT: #define __3dNOW__ 1
1553 // CHECK_BTVER2_M64: #define __AES__ 1
1554 // CHECK_BTVER2_M64: #define __AVX__ 1
1555 // CHECK_BTVER2_M64: #define __BMI__ 1
1556 // CHECK_BTVER2_M64: #define __F16C__ 1
1557 // CHECK_BTVER2_M64: #define __LZCNT__ 1
1558 // CHECK_BTVER2_M64: #define __MMX__ 1
1559 // CHECK_BTVER2_M64: #define __PCLMUL__ 1
1560 // CHECK_BTVER2_M64: #define __POPCNT__ 1
1561 // CHECK_BTVER2_M64: #define __PRFCHW__ 1
1562 // CHECK_BTVER2_M64: #define __SSE2_MATH__ 1
1563 // CHECK_BTVER2_M64: #define __SSE2__ 1
1564 // CHECK_BTVER2_M64: #define __SSE3__ 1
1565 // CHECK_BTVER2_M64: #define __SSE4A__ 1
1566 // CHECK_BTVER2_M64: #define __SSE_MATH__ 1
1567 // CHECK_BTVER2_M64: #define __SSE__ 1
1568 // CHECK_BTVER2_M64: #define __SSSE3__ 1
1569 // CHECK_BTVER2_M64: #define __XSAVEOPT__ 1
1570 // CHECK_BTVER2_M64: #define __XSAVE__ 1
1571 // CHECK_BTVER2_M64: #define __amd64 1
1572 // CHECK_BTVER2_M64: #define __amd64__ 1
1573 // CHECK_BTVER2_M64: #define __btver2 1
1574 // CHECK_BTVER2_M64: #define __btver2__ 1
1575 // CHECK_BTVER2_M64: #define __tune_btver2__ 1
1576 // CHECK_BTVER2_M64: #define __x86_64 1
1577 // CHECK_BTVER2_M64: #define __x86_64__ 1
1578 // RUN: %clang -march=bdver1 -m32 -E -dM %s -o - 2>&1 \
1579 // RUN:     -target i386-unknown-linux \
1580 // RUN:   | FileCheck -match-full-lines %s -check-prefix=CHECK_BDVER1_M32
1581 // CHECK_BDVER1_M32-NOT: #define __3dNOW_A__ 1
1582 // CHECK_BDVER1_M32-NOT: #define __3dNOW__ 1
1583 // CHECK_BDVER1_M32: #define __AES__ 1
1584 // CHECK_BDVER1_M32: #define __AVX__ 1
1585 // CHECK_BDVER1_M32: #define __FMA4__ 1
1586 // CHECK_BDVER1_M32: #define __LZCNT__ 1
1587 // CHECK_BDVER1_M32: #define __MMX__ 1
1588 // CHECK_BDVER1_M32: #define __PCLMUL__ 1
1589 // CHECK_BDVER1_M32: #define __POPCNT__ 1
1590 // CHECK_BDVER1_M32: #define __PRFCHW__ 1
1591 // CHECK_BDVER1_M32: #define __SSE2_MATH__ 1
1592 // CHECK_BDVER1_M32: #define __SSE2__ 1
1593 // CHECK_BDVER1_M32: #define __SSE3__ 1
1594 // CHECK_BDVER1_M32: #define __SSE4A__ 1
1595 // CHECK_BDVER1_M32: #define __SSE4_1__ 1
1596 // CHECK_BDVER1_M32: #define __SSE4_2__ 1
1597 // CHECK_BDVER1_M32: #define __SSE_MATH__ 1
1598 // CHECK_BDVER1_M32: #define __SSE__ 1
1599 // CHECK_BDVER1_M32: #define __SSSE3__ 1
1600 // CHECK_BDVER1_M32: #define __XOP__ 1
1601 // CHECK_BDVER1_M32: #define __XSAVE__ 1
1602 // CHECK_BDVER1_M32: #define __bdver1 1
1603 // CHECK_BDVER1_M32: #define __bdver1__ 1
1604 // CHECK_BDVER1_M32: #define __i386 1
1605 // CHECK_BDVER1_M32: #define __i386__ 1
1606 // CHECK_BDVER1_M32: #define __tune_bdver1__ 1
1607 // RUN: %clang -march=bdver1 -m64 -E -dM %s -o - 2>&1 \
1608 // RUN:     -target i386-unknown-linux \
1609 // RUN:   | FileCheck -match-full-lines %s -check-prefix=CHECK_BDVER1_M64
1610 // CHECK_BDVER1_M64-NOT: #define __3dNOW_A__ 1
1611 // CHECK_BDVER1_M64-NOT: #define __3dNOW__ 1
1612 // CHECK_BDVER1_M64: #define __AES__ 1
1613 // CHECK_BDVER1_M64: #define __AVX__ 1
1614 // CHECK_BDVER1_M64: #define __FMA4__ 1
1615 // CHECK_BDVER1_M64: #define __LZCNT__ 1
1616 // CHECK_BDVER1_M64: #define __MMX__ 1
1617 // CHECK_BDVER1_M64: #define __PCLMUL__ 1
1618 // CHECK_BDVER1_M64: #define __POPCNT__ 1
1619 // CHECK_BDVER1_M64: #define __PRFCHW__ 1
1620 // CHECK_BDVER1_M64: #define __SSE2_MATH__ 1
1621 // CHECK_BDVER1_M64: #define __SSE2__ 1
1622 // CHECK_BDVER1_M64: #define __SSE3__ 1
1623 // CHECK_BDVER1_M64: #define __SSE4A__ 1
1624 // CHECK_BDVER1_M64: #define __SSE4_1__ 1
1625 // CHECK_BDVER1_M64: #define __SSE4_2__ 1
1626 // CHECK_BDVER1_M64: #define __SSE_MATH__ 1
1627 // CHECK_BDVER1_M64: #define __SSE__ 1
1628 // CHECK_BDVER1_M64: #define __SSSE3__ 1
1629 // CHECK_BDVER1_M64: #define __XOP__ 1
1630 // CHECK_BDVER1_M64: #define __XSAVE__ 1
1631 // CHECK_BDVER1_M64: #define __amd64 1
1632 // CHECK_BDVER1_M64: #define __amd64__ 1
1633 // CHECK_BDVER1_M64: #define __bdver1 1
1634 // CHECK_BDVER1_M64: #define __bdver1__ 1
1635 // CHECK_BDVER1_M64: #define __tune_bdver1__ 1
1636 // CHECK_BDVER1_M64: #define __x86_64 1
1637 // CHECK_BDVER1_M64: #define __x86_64__ 1
1638 // RUN: %clang -march=bdver2 -m32 -E -dM %s -o - 2>&1 \
1639 // RUN:     -target i386-unknown-linux \
1640 // RUN:   | FileCheck -match-full-lines %s -check-prefix=CHECK_BDVER2_M32
1641 // CHECK_BDVER2_M32-NOT: #define __3dNOW_A__ 1
1642 // CHECK_BDVER2_M32-NOT: #define __3dNOW__ 1
1643 // CHECK_BDVER2_M32: #define __AES__ 1
1644 // CHECK_BDVER2_M32: #define __AVX__ 1
1645 // CHECK_BDVER2_M32: #define __BMI__ 1
1646 // CHECK_BDVER2_M32: #define __F16C__ 1
1647 // CHECK_BDVER2_M32: #define __FMA4__ 1
1648 // CHECK_BDVER2_M32: #define __FMA__ 1
1649 // CHECK_BDVER2_M32: #define __LZCNT__ 1
1650 // CHECK_BDVER2_M32: #define __MMX__ 1
1651 // CHECK_BDVER2_M32: #define __PCLMUL__ 1
1652 // CHECK_BDVER2_M32: #define __POPCNT__ 1
1653 // CHECK_BDVER2_M32: #define __PRFCHW__ 1
1654 // CHECK_BDVER2_M32: #define __SSE2_MATH__ 1
1655 // CHECK_BDVER2_M32: #define __SSE2__ 1
1656 // CHECK_BDVER2_M32: #define __SSE3__ 1
1657 // CHECK_BDVER2_M32: #define __SSE4A__ 1
1658 // CHECK_BDVER2_M32: #define __SSE4_1__ 1
1659 // CHECK_BDVER2_M32: #define __SSE4_2__ 1
1660 // CHECK_BDVER2_M32: #define __SSE_MATH__ 1
1661 // CHECK_BDVER2_M32: #define __SSE__ 1
1662 // CHECK_BDVER2_M32: #define __SSSE3__ 1
1663 // CHECK_BDVER2_M32: #define __TBM__ 1
1664 // CHECK_BDVER2_M32: #define __XOP__ 1
1665 // CHECK_BDVER2_M32: #define __XSAVE__ 1
1666 // CHECK_BDVER2_M32: #define __bdver2 1
1667 // CHECK_BDVER2_M32: #define __bdver2__ 1
1668 // CHECK_BDVER2_M32: #define __i386 1
1669 // CHECK_BDVER2_M32: #define __i386__ 1
1670 // CHECK_BDVER2_M32: #define __tune_bdver2__ 1
1671 // RUN: %clang -march=bdver2 -m64 -E -dM %s -o - 2>&1 \
1672 // RUN:     -target i386-unknown-linux \
1673 // RUN:   | FileCheck -match-full-lines %s -check-prefix=CHECK_BDVER2_M64
1674 // CHECK_BDVER2_M64-NOT: #define __3dNOW_A__ 1
1675 // CHECK_BDVER2_M64-NOT: #define __3dNOW__ 1
1676 // CHECK_BDVER2_M64: #define __AES__ 1
1677 // CHECK_BDVER2_M64: #define __AVX__ 1
1678 // CHECK_BDVER2_M64: #define __BMI__ 1
1679 // CHECK_BDVER2_M64: #define __F16C__ 1
1680 // CHECK_BDVER2_M64: #define __FMA4__ 1
1681 // CHECK_BDVER2_M64: #define __FMA__ 1
1682 // CHECK_BDVER2_M64: #define __LZCNT__ 1
1683 // CHECK_BDVER2_M64: #define __MMX__ 1
1684 // CHECK_BDVER2_M64: #define __PCLMUL__ 1
1685 // CHECK_BDVER2_M64: #define __POPCNT__ 1
1686 // CHECK_BDVER2_M64: #define __PRFCHW__ 1
1687 // CHECK_BDVER2_M64: #define __SSE2_MATH__ 1
1688 // CHECK_BDVER2_M64: #define __SSE2__ 1
1689 // CHECK_BDVER2_M64: #define __SSE3__ 1
1690 // CHECK_BDVER2_M64: #define __SSE4A__ 1
1691 // CHECK_BDVER2_M64: #define __SSE4_1__ 1
1692 // CHECK_BDVER2_M64: #define __SSE4_2__ 1
1693 // CHECK_BDVER2_M64: #define __SSE_MATH__ 1
1694 // CHECK_BDVER2_M64: #define __SSE__ 1
1695 // CHECK_BDVER2_M64: #define __SSSE3__ 1
1696 // CHECK_BDVER2_M64: #define __TBM__ 1
1697 // CHECK_BDVER2_M64: #define __XOP__ 1
1698 // CHECK_BDVER2_M64: #define __XSAVE__ 1
1699 // CHECK_BDVER2_M64: #define __amd64 1
1700 // CHECK_BDVER2_M64: #define __amd64__ 1
1701 // CHECK_BDVER2_M64: #define __bdver2 1
1702 // CHECK_BDVER2_M64: #define __bdver2__ 1
1703 // CHECK_BDVER2_M64: #define __tune_bdver2__ 1
1704 // CHECK_BDVER2_M64: #define __x86_64 1
1705 // CHECK_BDVER2_M64: #define __x86_64__ 1
1706 // RUN: %clang -march=bdver3 -m32 -E -dM %s -o - 2>&1 \
1707 // RUN:     -target i386-unknown-linux \
1708 // RUN:   | FileCheck -match-full-lines %s -check-prefix=CHECK_BDVER3_M32
1709 // CHECK_BDVER3_M32-NOT: #define __3dNOW_A__ 1
1710 // CHECK_BDVER3_M32-NOT: #define __3dNOW__ 1
1711 // CHECK_BDVER3_M32: #define __AES__ 1
1712 // CHECK_BDVER3_M32: #define __AVX__ 1
1713 // CHECK_BDVER3_M32: #define __BMI__ 1
1714 // CHECK_BDVER3_M32: #define __F16C__ 1
1715 // CHECK_BDVER3_M32: #define __FMA4__ 1
1716 // CHECK_BDVER3_M32: #define __FMA__ 1
1717 // CHECK_BDVER3_M32: #define __FSGSBASE__ 1
1718 // CHECK_BDVER3_M32: #define __LZCNT__ 1
1719 // CHECK_BDVER3_M32: #define __MMX__ 1
1720 // CHECK_BDVER3_M32: #define __PCLMUL__ 1
1721 // CHECK_BDVER3_M32: #define __POPCNT__ 1
1722 // CHECK_BDVER3_M32: #define __PRFCHW__ 1
1723 // CHECK_BDVER3_M32: #define __SSE2_MATH__ 1
1724 // CHECK_BDVER3_M32: #define __SSE2__ 1
1725 // CHECK_BDVER3_M32: #define __SSE3__ 1
1726 // CHECK_BDVER3_M32: #define __SSE4A__ 1
1727 // CHECK_BDVER3_M32: #define __SSE4_1__ 1
1728 // CHECK_BDVER3_M32: #define __SSE4_2__ 1
1729 // CHECK_BDVER3_M32: #define __SSE_MATH__ 1
1730 // CHECK_BDVER3_M32: #define __SSE__ 1
1731 // CHECK_BDVER3_M32: #define __SSSE3__ 1
1732 // CHECK_BDVER3_M32: #define __TBM__ 1
1733 // CHECK_BDVER3_M32: #define __XOP__ 1
1734 // CHECK_BDVER3_M32: #define __XSAVEOPT__ 1
1735 // CHECK_BDVER3_M32: #define __XSAVE__ 1
1736 // CHECK_BDVER3_M32: #define __bdver3 1
1737 // CHECK_BDVER3_M32: #define __bdver3__ 1
1738 // CHECK_BDVER3_M32: #define __i386 1
1739 // CHECK_BDVER3_M32: #define __i386__ 1
1740 // CHECK_BDVER3_M32: #define __tune_bdver3__ 1
1741 // RUN: %clang -march=bdver3 -m64 -E -dM %s -o - 2>&1 \
1742 // RUN:     -target i386-unknown-linux \
1743 // RUN:   | FileCheck -match-full-lines %s -check-prefix=CHECK_BDVER3_M64
1744 // CHECK_BDVER3_M64-NOT: #define __3dNOW_A__ 1
1745 // CHECK_BDVER3_M64-NOT: #define __3dNOW__ 1
1746 // CHECK_BDVER3_M64: #define __AES__ 1
1747 // CHECK_BDVER3_M64: #define __AVX__ 1
1748 // CHECK_BDVER3_M64: #define __BMI__ 1
1749 // CHECK_BDVER3_M64: #define __F16C__ 1
1750 // CHECK_BDVER3_M64: #define __FMA4__ 1
1751 // CHECK_BDVER3_M64: #define __FMA__ 1
1752 // CHECK_BDVER3_M64: #define __FSGSBASE__ 1
1753 // CHECK_BDVER3_M64: #define __LZCNT__ 1
1754 // CHECK_BDVER3_M64: #define __MMX__ 1
1755 // CHECK_BDVER3_M64: #define __PCLMUL__ 1
1756 // CHECK_BDVER3_M64: #define __POPCNT__ 1
1757 // CHECK_BDVER3_M64: #define __PRFCHW__ 1
1758 // CHECK_BDVER3_M64: #define __SSE2_MATH__ 1
1759 // CHECK_BDVER3_M64: #define __SSE2__ 1
1760 // CHECK_BDVER3_M64: #define __SSE3__ 1
1761 // CHECK_BDVER3_M64: #define __SSE4A__ 1
1762 // CHECK_BDVER3_M64: #define __SSE4_1__ 1
1763 // CHECK_BDVER3_M64: #define __SSE4_2__ 1
1764 // CHECK_BDVER3_M64: #define __SSE_MATH__ 1
1765 // CHECK_BDVER3_M64: #define __SSE__ 1
1766 // CHECK_BDVER3_M64: #define __SSSE3__ 1
1767 // CHECK_BDVER3_M64: #define __TBM__ 1
1768 // CHECK_BDVER3_M64: #define __XOP__ 1
1769 // CHECK_BDVER3_M64: #define __XSAVEOPT__ 1
1770 // CHECK_BDVER3_M64: #define __XSAVE__ 1
1771 // CHECK_BDVER3_M64: #define __amd64 1
1772 // CHECK_BDVER3_M64: #define __amd64__ 1
1773 // CHECK_BDVER3_M64: #define __bdver3 1
1774 // CHECK_BDVER3_M64: #define __bdver3__ 1
1775 // CHECK_BDVER3_M64: #define __tune_bdver3__ 1
1776 // CHECK_BDVER3_M64: #define __x86_64 1
1777 // CHECK_BDVER3_M64: #define __x86_64__ 1
1778 // RUN: %clang -march=bdver4 -m32 -E -dM %s -o - 2>&1 \
1779 // RUN:     -target i386-unknown-linux \
1780 // RUN:   | FileCheck -match-full-lines %s -check-prefix=CHECK_BDVER4_M32
1781 // CHECK_BDVER4_M32-NOT: #define __3dNOW_A__ 1
1782 // CHECK_BDVER4_M32-NOT: #define __3dNOW__ 1
1783 // CHECK_BDVER4_M32: #define __AES__ 1
1784 // CHECK_BDVER4_M32: #define __AVX2__ 1
1785 // CHECK_BDVER4_M32: #define __AVX__ 1
1786 // CHECK_BDVER4_M32: #define __BMI2__ 1
1787 // CHECK_BDVER4_M32: #define __BMI__ 1
1788 // CHECK_BDVER4_M32: #define __F16C__ 1
1789 // CHECK_BDVER4_M32: #define __FMA4__ 1
1790 // CHECK_BDVER4_M32: #define __FMA__ 1
1791 // CHECK_BDVER4_M32: #define __FSGSBASE__ 1
1792 // CHECK_BDVER4_M32: #define __LZCNT__ 1
1793 // CHECK_BDVER4_M32: #define __MMX__ 1
1794 // CHECK_BDVER4_M32: #define __PCLMUL__ 1
1795 // CHECK_BDVER4_M32: #define __POPCNT__ 1
1796 // CHECK_BDVER4_M32: #define __PRFCHW__ 1
1797 // CHECK_BDVER4_M32: #define __SSE2_MATH__ 1
1798 // CHECK_BDVER4_M32: #define __SSE2__ 1
1799 // CHECK_BDVER4_M32: #define __SSE3__ 1
1800 // CHECK_BDVER4_M32: #define __SSE4A__ 1
1801 // CHECK_BDVER4_M32: #define __SSE4_1__ 1
1802 // CHECK_BDVER4_M32: #define __SSE4_2__ 1
1803 // CHECK_BDVER4_M32: #define __SSE_MATH__ 1
1804 // CHECK_BDVER4_M32: #define __SSE__ 1
1805 // CHECK_BDVER4_M32: #define __SSSE3__ 1
1806 // CHECK_BDVER4_M32: #define __TBM__ 1
1807 // CHECK_BDVER4_M32: #define __XOP__ 1
1808 // CHECK_BDVER4_M32: #define __XSAVE__ 1
1809 // CHECK_BDVER4_M32: #define __bdver4 1
1810 // CHECK_BDVER4_M32: #define __bdver4__ 1
1811 // CHECK_BDVER4_M32: #define __i386 1
1812 // CHECK_BDVER4_M32: #define __i386__ 1
1813 // CHECK_BDVER4_M32: #define __tune_bdver4__ 1
1814 // RUN: %clang -march=bdver4 -m64 -E -dM %s -o - 2>&1 \
1815 // RUN:     -target i386-unknown-linux \
1816 // RUN:   | FileCheck -match-full-lines %s -check-prefix=CHECK_BDVER4_M64
1817 // CHECK_BDVER4_M64-NOT: #define __3dNOW_A__ 1
1818 // CHECK_BDVER4_M64-NOT: #define __3dNOW__ 1
1819 // CHECK_BDVER4_M64: #define __AES__ 1
1820 // CHECK_BDVER4_M64: #define __AVX2__ 1
1821 // CHECK_BDVER4_M64: #define __AVX__ 1
1822 // CHECK_BDVER4_M64: #define __BMI2__ 1
1823 // CHECK_BDVER4_M64: #define __BMI__ 1
1824 // CHECK_BDVER4_M64: #define __F16C__ 1
1825 // CHECK_BDVER4_M64: #define __FMA4__ 1
1826 // CHECK_BDVER4_M64: #define __FMA__ 1
1827 // CHECK_BDVER4_M64: #define __FSGSBASE__ 1
1828 // CHECK_BDVER4_M64: #define __LZCNT__ 1
1829 // CHECK_BDVER4_M64: #define __MMX__ 1
1830 // CHECK_BDVER4_M64: #define __PCLMUL__ 1
1831 // CHECK_BDVER4_M64: #define __POPCNT__ 1
1832 // CHECK_BDVER4_M64: #define __PRFCHW__ 1
1833 // CHECK_BDVER4_M64: #define __SSE2_MATH__ 1
1834 // CHECK_BDVER4_M64: #define __SSE2__ 1
1835 // CHECK_BDVER4_M64: #define __SSE3__ 1
1836 // CHECK_BDVER4_M64: #define __SSE4A__ 1
1837 // CHECK_BDVER4_M64: #define __SSE4_1__ 1
1838 // CHECK_BDVER4_M64: #define __SSE4_2__ 1
1839 // CHECK_BDVER4_M64: #define __SSE_MATH__ 1
1840 // CHECK_BDVER4_M64: #define __SSE__ 1
1841 // CHECK_BDVER4_M64: #define __SSSE3__ 1
1842 // CHECK_BDVER4_M64: #define __TBM__ 1
1843 // CHECK_BDVER4_M64: #define __XOP__ 1
1844 // CHECK_BDVER4_M64: #define __XSAVE__ 1
1845 // CHECK_BDVER4_M64: #define __amd64 1
1846 // CHECK_BDVER4_M64: #define __amd64__ 1
1847 // CHECK_BDVER4_M64: #define __bdver4 1
1848 // CHECK_BDVER4_M64: #define __bdver4__ 1
1849 // CHECK_BDVER4_M64: #define __tune_bdver4__ 1
1850 // CHECK_BDVER4_M64: #define __x86_64 1
1851 // CHECK_BDVER4_M64: #define __x86_64__ 1
1852 //
1853 // End X86/GCC/Linux tests ------------------
1854 
1855 // Begin PPC/GCC/Linux tests ----------------
1856 // RUN: %clang -mvsx -E -dM %s -o - 2>&1 \
1857 // RUN:     -target powerpc64-unknown-linux \
1858 // RUN:   | FileCheck -match-full-lines %s -check-prefix=CHECK_PPC_VSX_M64
1859 //
1860 // CHECK_PPC_VSX_M64: #define __VSX__ 1
1861 //
1862 // RUN: %clang -mpower8-vector -E -dM %s -o - 2>&1 \
1863 // RUN:     -target powerpc64-unknown-linux \
1864 // RUN:   | FileCheck -match-full-lines %s -check-prefix=CHECK_PPC_POWER8_VECTOR_M64
1865 //
1866 // CHECK_PPC_POWER8_VECTOR_M64: #define __POWER8_VECTOR__ 1
1867 //
1868 // RUN: %clang -mcrypto -E -dM %s -o - 2>&1 \
1869 // RUN:     -target powerpc64-unknown-linux \
1870 // RUN:   | FileCheck -match-full-lines %s -check-prefix=CHECK_PPC_CRYPTO_M64
1871 //
1872 // CHECK_PPC_CRYPTO_M64: #define __CRYPTO__ 1
1873 //
1874 // RUN: %clang -mcpu=ppc64 -E -dM %s -o - 2>&1 \
1875 // RUN:     -target powerpc64-unknown-unknown \
1876 // RUN:   | FileCheck -match-full-lines %s -check-prefix=CHECK_PPC_GCC_ATOMICS
1877 // RUN: %clang -mcpu=pwr8 -E -dM %s -o - 2>&1 \
1878 // RUN:     -target powerpc64-unknown-unknown \
1879 // RUN:   | FileCheck -match-full-lines %s -check-prefix=CHECK_PPC_GCC_ATOMICS
1880 // RUN: %clang -E -dM %s -o - 2>&1 \
1881 // RUN:     -target powerpc64le-unknown-linux \
1882 // RUN:   | FileCheck -match-full-lines %s -check-prefix=CHECK_PPC_GCC_ATOMICS
1883 //
1884 // CHECK_PPC_GCC_ATOMICS: #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1
1885 // CHECK_PPC_GCC_ATOMICS: #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 1
1886 // CHECK_PPC_GCC_ATOMICS: #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1
1887 // CHECK_PPC_GCC_ATOMICS: #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 1
1888 //
1889 // End PPC/GCC/Linux tests ------------------
1890 
1891 // Begin Sparc/GCC/Linux tests ----------------
1892 //
1893 // RUN: %clang -E -dM %s -o - 2>&1 \
1894 // RUN:     -target sparc-unknown-linux \
1895 // RUN:   | FileCheck -match-full-lines %s -check-prefix=CHECK_SPARC
1896 // RUN: %clang -mcpu=v9 -E -dM %s -o - 2>&1 \
1897 // RUN:     -target sparc-unknown-linux \
1898 // RUN:   | FileCheck -match-full-lines %s -check-prefix=CHECK_SPARC-V9
1899 //
1900 // CHECK_SPARC: #define __BIG_ENDIAN__ 1
1901 // CHECK_SPARC: #define __sparc 1
1902 // CHECK_SPARC: #define __sparc__ 1
1903 // CHECK_SPARC-NOT: #define __sparcv9 1
1904 // CHECK_SPARC-NOT: #define __sparcv9__ 1
1905 // CHECK_SPARC: #define __sparcv8 1
1906 // CHECK_SPARC-NOT: #define __sparcv9 1
1907 // CHECK_SPARC-NOT: #define __sparcv9__ 1
1908 
1909 // CHECK_SPARC-V9-NOT: #define __sparcv8 1
1910 // CHECK_SPARC-V9: #define __sparc_v9__ 1
1911 // CHECK_SPARC-V9: #define __sparcv9 1
1912 // CHECK_SPARC-V9-NOT: #define __sparcv8 1
1913 
1914 //
1915 // RUN: %clang -E -dM %s -o - 2>&1 \
1916 // RUN:     -target sparcel-unknown-linux \
1917 // RUN:   | FileCheck -match-full-lines %s -check-prefix=CHECK_SPARCEL
1918 // RUN: %clang -E -dM %s -o - -target sparcel-myriad -mcpu=myriad2 2>&1 \
1919 // RUN:   | FileCheck -match-full-lines %s -check-prefix=CHECK_MYRIAD2-1 -check-prefix=CHECK_SPARCEL
1920 // RUN: %clang -E -dM %s -o - -target sparcel-myriad -mcpu=myriad2.1 2>&1 \
1921 // RUN:   | FileCheck -match-full-lines %s -check-prefix=CHECK_MYRIAD2-1 -check-prefix=CHECK_SPARCEL
1922 // RUN: %clang -E -dM %s -o - -target sparcel-myriad -mcpu=myriad2.2 2>&1 \
1923 // RUN:   | FileCheck -match-full-lines %s -check-prefix=CHECK_MYRIAD2-2 -check-prefix=CHECK_SPARCEL
1924 // CHECK_SPARCEL: #define __LITTLE_ENDIAN__ 1
1925 // CHECK_MYRIAD2-1: #define __myriad2 1
1926 // CHECK_MYRIAD2-1: #define __myriad2__ 1
1927 // CHECK_MYRIAD2-2: #define __myriad2 2
1928 // CHECK_MYRIAD2-2: #define __myriad2__ 2
1929 // CHECK_SPARCEL: #define __sparc 1
1930 // CHECK_SPARCEL: #define __sparc__ 1
1931 // CHECK_SPARCEL: #define __sparcv8 1
1932 //
1933 // RUN: %clang -E -dM %s -o - 2>&1 \
1934 // RUN:     -target sparcv9-unknown-linux \
1935 // RUN:   | FileCheck -match-full-lines %s -check-prefix=CHECK_SPARCV9
1936 //
1937 // CHECK_SPARCV9: #define __BIG_ENDIAN__ 1
1938 // CHECK_SPARCV9: #define __sparc 1
1939 // CHECK_SPARCV9: #define __sparc64__ 1
1940 // CHECK_SPARCV9: #define __sparc__ 1
1941 // CHECK_SPARCV9: #define __sparc_v9__ 1
1942 // CHECK_SPARCV9: #define __sparcv9 1
1943 // CHECK_SPARCV9: #define __sparcv9__ 1
1944 
1945 // Begin SystemZ/GCC/Linux tests ----------------
1946 //
1947 // RUN: %clang -march=z10 -E -dM %s -o - 2>&1 \
1948 // RUN:     -target s390x-unknown-linux \
1949 // RUN:   | FileCheck -match-full-lines %s -check-prefix=CHECK_SYSTEMZ_Z10
1950 //
1951 // CHECK_SYSTEMZ_Z10: #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1
1952 // CHECK_SYSTEMZ_Z10: #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 1
1953 // CHECK_SYSTEMZ_Z10: #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1
1954 // CHECK_SYSTEMZ_Z10: #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 1
1955 // CHECK_SYSTEMZ_Z10: #define __LONG_DOUBLE_128__ 1
1956 // CHECK_SYSTEMZ_Z10: #define __s390__ 1
1957 // CHECK_SYSTEMZ_Z10: #define __s390x__ 1
1958 // CHECK_SYSTEMZ_Z10: #define __zarch__ 1
1959 //
1960 // RUN: %clang -march=zEC12 -E -dM %s -o - 2>&1 \
1961 // RUN:     -target s390x-unknown-linux \
1962 // RUN:   | FileCheck -match-full-lines %s -check-prefix=CHECK_SYSTEMZ_ZEC12
1963 //
1964 // CHECK_SYSTEMZ_ZEC12: #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1
1965 // CHECK_SYSTEMZ_ZEC12: #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 1
1966 // CHECK_SYSTEMZ_ZEC12: #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1
1967 // CHECK_SYSTEMZ_ZEC12: #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 1
1968 // CHECK_SYSTEMZ_ZEC12: #define __HTM__ 1
1969 // CHECK_SYSTEMZ_ZEC12: #define __LONG_DOUBLE_128__ 1
1970 // CHECK_SYSTEMZ_ZEC12: #define __s390__ 1
1971 // CHECK_SYSTEMZ_ZEC12: #define __s390x__ 1
1972 // CHECK_SYSTEMZ_ZEC12: #define __zarch__ 1
1973 //
1974 // RUN: %clang -mhtm -E -dM %s -o - 2>&1 \
1975 // RUN:     -target s390x-unknown-linux \
1976 // RUN:   | FileCheck -match-full-lines %s -check-prefix=CHECK_SYSTEMZ_HTM
1977 //
1978 // CHECK_SYSTEMZ_HTM: #define __HTM__ 1
1979 //
1980 // RUN: %clang -fzvector -E -dM %s -o - 2>&1 \
1981 // RUN:     -target s390x-unknown-linux \
1982 // RUN:   | FileCheck -match-full-lines %s -check-prefix=CHECK_SYSTEMZ_ZVECTOR
1983 // RUN: %clang -mzvector -E -dM %s -o - 2>&1 \
1984 // RUN:     -target s390x-unknown-linux \
1985 // RUN:   | FileCheck -match-full-lines %s -check-prefix=CHECK_SYSTEMZ_ZVECTOR
1986 //
1987 // CHECK_SYSTEMZ_ZVECTOR: #define __VEC__ 10301
1988 
1989 // Begin amdgcn tests ----------------
1990 //
1991 // RUN: %clang -march=amdgcn -E -dM %s -o - 2>&1 \
1992 // RUN:     -target amdgcn-unknown-unknown \
1993 // RUN:   | FileCheck -match-full-lines %s -check-prefix=CHECK_AMDGCN
1994 // CHECK_AMDGCN: #define __AMDGCN__ 1
1995 
1996 // Begin r600 tests ----------------
1997 //
1998 // RUN: %clang -march=amdgcn -E -dM %s -o - 2>&1 \
1999 // RUN:     -target r600-unknown-unknown \
2000 // RUN:   | FileCheck -match-full-lines %s -check-prefix=CHECK_R600
2001 // CHECK_R600: #define __R600__ 1
2002