1 // Ensure we support the various CPU architecture names.
3 // RUN: %clang -target x86_64-unknown-unknown -c -### %s -march=nocona 2>&1 \
4 // RUN: | FileCheck %s -check-prefix=nocona
5 // nocona: "-target-cpu" "nocona"
7 // RUN: %clang -target x86_64-unknown-unknown -c -### %s -march=core2 2>&1 \
8 // RUN: | FileCheck %s -check-prefix=core2
9 // core2: "-target-cpu" "core2"
11 // RUN: %clang -target x86_64-unknown-unknown -c -### %s -march=penryn 2>&1 \
12 // RUN: | FileCheck %s -check-prefix=penryn
13 // penryn: "-target-cpu" "penryn"
15 // RUN: %clang -target x86_64-unknown-unknown -c -### %s -march=nehalem 2>&1 \
16 // RUN: | FileCheck %s -check-prefix=nehalem
17 // nehalem: "-target-cpu" "nehalem"
19 // RUN: %clang -target x86_64-unknown-unknown -c -### %s -march=westmere 2>&1 \
20 // RUN: | FileCheck %s -check-prefix=westmere
21 // westmere: "-target-cpu" "westmere"
23 // RUN: %clang -target x86_64-unknown-unknown -c -### %s -march=sandybridge 2>&1 \
24 // RUN: | FileCheck %s -check-prefix=sandybridge
25 // sandybridge: "-target-cpu" "sandybridge"
27 // RUN: %clang -target x86_64-unknown-unknown -c -### %s -march=ivybridge 2>&1 \
28 // RUN: | FileCheck %s -check-prefix=ivybridge
29 // ivybridge: "-target-cpu" "ivybridge"
31 // RUN: %clang -target x86_64-unknown-unknown -c -### %s -march=haswell 2>&1 \
32 // RUN: | FileCheck %s -check-prefix=haswell
33 // haswell: "-target-cpu" "haswell"
35 // RUN: %clang -target x86_64-unknown-unknown -c -### %s -march=broadwell 2>&1 \
36 // RUN: | FileCheck %s -check-prefix=broadwell
37 // broadwell: "-target-cpu" "broadwell"
39 // RUN: %clang -target x86_64-unknown-unknown -c -### %s -march=skylake 2>&1 \
40 // RUN: | FileCheck %s -check-prefix=skylake
41 // skylake: "-target-cpu" "skylake"
43 // RUN: %clang -target x86_64-unknown-unknown -c -### %s -march=skylake-avx512 2>&1 \
44 // RUN: | FileCheck %s -check-prefix=skylake-avx512
45 // skylake-avx512: "-target-cpu" "skylake-avx512"
47 // RUN: %clang -target x86_64-unknown-unknown -c -### %s -march=skx 2>&1 \
48 // RUN: | FileCheck %s -check-prefix=skx
49 // skx: "-target-cpu" "skx"
51 // RUN: %clang -target x86_64-unknown-unknown -c -### %s -march=cascadelake 2>&1 \
52 // RUN: | FileCheck %s -check-prefix=cascadelake
53 // cascadelake: "-target-cpu" "cascadelake"
55 // RUN: %clang -target x86_64-unknown-unknown -c -### %s -march=cooperlake 2>&1 \
56 // RUN: | FileCheck %s -check-prefix=cooperlake
57 // cooperlake: "-target-cpu" "cooperlake"
59 // RUN: %clang -target x86_64-unknown-unknown -c -### %s -march=knl 2>&1 \
60 // RUN: | FileCheck %s -check-prefix=knl
61 // knl: "-target-cpu" "knl"
63 // RUN: %clang -target x86_64-unknown-unknown -c -### %s -march=knm 2>&1 \
64 // RUN: | FileCheck %s -check-prefix=knm
65 // knm: "-target-cpu" "knm"
67 // RUN: %clang -target x86_64-unknown-unknown -c -### %s -march=cannonlake 2>&1 \
68 // RUN: | FileCheck %s -check-prefix=cannonlake
69 // cannonlake: "-target-cpu" "cannonlake"
71 // RUN: %clang -target x86_64-unknown-unknown -c -### %s -march=icelake-client 2>&1 \
72 // RUN: | FileCheck %s -check-prefix=icelake-client
73 // icelake-client: "-target-cpu" "icelake-client"
75 // RUN: %clang -target x86_64-unknown-unknown -c -### %s -march=rocketlake 2>&1 \
76 // RUN: | FileCheck %s -check-prefix=rocketlake
77 // rocketlake: "-target-cpu" "rocketlake"
79 // RUN: %clang -target x86_64-unknown-unknown -c -### %s -march=icelake-server 2>&1 \
80 // RUN: | FileCheck %s -check-prefix=icelake-server
81 // icelake-server: "-target-cpu" "icelake-server"
83 // RUN: %clang -target x86_64-unknown-unknown -c -### %s -march=tigerlake 2>&1 \
84 // RUN: | FileCheck %s -check-prefix=tigerlake
85 // tigerlake: "-target-cpu" "tigerlake"
87 // RUN: %clang -target x86_64-unknown-unknown -c -### %s -march=alderlake 2>&1 \
88 // RUN: | FileCheck %s -check-prefix=alderlake
89 // alderlake: "-target-cpu" "alderlake"
91 // RUN: %clang --target=x86_64 -c -### %s -march=raptorlake 2>&1 \
92 // RUN: | FileCheck %s -check-prefix=raptorlake
93 // raptorlake: "-target-cpu" "raptorlake"
95 // RUN: %clang --target=x86_64 -c -### %s -march=meteorlake 2>&1 \
96 // RUN: | FileCheck %s -check-prefix=meteorlake
97 // meteorlake: "-target-cpu" "meteorlake"
99 // RUN: %clang --target=x86_64 -c -### %s -march=arrowlake 2>&1 \
100 // RUN: | FileCheck %s -check-prefix=arrowlake
101 // arrowlake: "-target-cpu" "arrowlake"
103 // RUN: %clang --target=x86_64 -c -### %s -march=arrowlake-s 2>&1 \
104 // RUN: | FileCheck %s -check-prefix=arrowlake-s
105 // arrowlake-s: "-target-cpu" "arrowlake-s"
107 // RUN: %clang --target=x86_64 -c -### %s -march=lunarlake 2>&1 \
108 // RUN: | FileCheck %s -check-prefix=lunarlake
109 // lunarlake: "-target-cpu" "lunarlake"
111 // RUN: %clang -target x86_64-unknown-unknown -c -### %s -march=gracemont 2>&1 \
112 // RUN: | FileCheck %s -check-prefix=gracemont
113 // gracemont: "-target-cpu" "gracemont"
115 // RUN: %clang --target=x86_64 -c -### %s -march=pantherlake 2>&1 \
116 // RUN: | FileCheck %s -check-prefix=pantherlake
117 // pantherlake: "-target-cpu" "pantherlake"
119 // RUN: %clang --target=x86_64 -c -### %s -march=clearwaterforest 2>&1 \
120 // RUN: | FileCheck %s -check-prefix=clearwaterforest
121 // clearwaterforest: "-target-cpu" "clearwaterforest"
123 // RUN: %clang -target x86_64-unknown-unknown -c -### %s -march=diamondrapids 2>&1 \
124 // RUN: | FileCheck %s -check-prefix=diamondrapids
125 // diamondrapids: "-target-cpu" "diamondrapids"
127 // RUN: %clang -target x86_64-unknown-unknown -c -### %s -march=lakemont 2>&1 \
128 // RUN: | FileCheck %s -check-prefix=lakemont
129 // lakemont: "-target-cpu" "lakemont"
131 // RUN: %clang -target x86_64-unknown-unknown -c -### %s -march=bonnell 2>&1 \
132 // RUN: | FileCheck %s -check-prefix=bonnell
133 // bonnell: "-target-cpu" "bonnell"
135 // RUN: %clang -target x86_64-unknown-unknown -c -### %s -march=silvermont 2>&1 \
136 // RUN: | FileCheck %s -check-prefix=silvermont
137 // silvermont: "-target-cpu" "silvermont"
139 // RUN: %clang -target x86_64-unknown-unknown -c -### %s -march=goldmont 2>&1 \
140 // RUN: | FileCheck %s -check-prefix=goldmont
141 // goldmont: "-target-cpu" "goldmont"
143 // RUN: %clang -target x86_64-unknown-unknown -c -### %s -march=goldmont-plus 2>&1 \
144 // RUN: | FileCheck %s -check-prefix=goldmont-plus
145 // goldmont-plus: "-target-cpu" "goldmont-plus"
147 // RUN: %clang -target x86_64-unknown-unknown -c -### %s -march=tremont 2>&1 \
148 // RUN: | FileCheck %s -check-prefix=tremont
149 // tremont: "-target-cpu" "tremont"
150 // RUN: %clang -target x86_64-unknown-unknown -c -### %s -march=sierraforest 2>&1 \
151 // RUN: | FileCheck %s -check-prefix=sierraforest
152 // sierraforest: "-target-cpu" "sierraforest"
154 // RUN: %clang -target x86_64-unknown-unknown -c -### %s -march=grandridge 2>&1 \
155 // RUN: | FileCheck %s -check-prefix=grandridge
156 // grandridge: "-target-cpu" "grandridge"
158 // RUN: %clang -target x86_64-unknown-unknown -c -### %s -march=graniterapids 2>&1 \
159 // RUN: | FileCheck %s -check-prefix=graniterapids
160 // graniterapids: "-target-cpu" "graniterapids"
162 // RUN: %clang --target=x86_64-unknown-unknown -c -### %s -march=graniterapids-d 2>&1 \
163 // RUN: | FileCheck %s -check-prefix=graniterapids-d
164 // graniterapids-d: "-target-cpu" "graniterapids-d"
166 // RUN: %clang -target x86_64-unknown-unknown -c -### %s -march=emeraldrapids 2>&1 \
167 // RUN: | FileCheck %s -check-prefix=emeraldrapids
168 // emeraldrapids: "-target-cpu" "emeraldrapids"
170 // RUN: %clang -target x86_64-unknown-unknown -c -### %s -march=sapphirerapids 2>&1 \
171 // RUN: | FileCheck %s -check-prefix=sapphirerapids
172 // sapphirerapids: "-target-cpu" "sapphirerapids"
174 // RUN: %clang -target x86_64-unknown-unknown -c -### %s -march=k8 2>&1 \
175 // RUN: | FileCheck %s -check-prefix=k8
176 // k8: "-target-cpu" "k8"
178 // RUN: %clang -target x86_64-unknown-unknown -c -### %s -march=opteron 2>&1 \
179 // RUN: | FileCheck %s -check-prefix=opteron
180 // opteron: "-target-cpu" "opteron"
182 // RUN: %clang -target x86_64-unknown-unknown -c -### %s -march=athlon64 2>&1 \
183 // RUN: | FileCheck %s -check-prefix=athlon64
184 // athlon64: "-target-cpu" "athlon64"
186 // RUN: %clang -target x86_64-unknown-unknown -c -### %s -march=athlon-fx 2>&1 \
187 // RUN: | FileCheck %s -check-prefix=athlon-fx
188 // athlon-fx: "-target-cpu" "athlon-fx"
190 // RUN: %clang -target x86_64-unknown-unknown -c -### %s -march=k8-sse3 2>&1 \
191 // RUN: | FileCheck %s -check-prefix=k8-sse3
192 // k8-sse3: "-target-cpu" "k8-sse3"
194 // RUN: %clang -target x86_64-unknown-unknown -c -### %s -march=opteron-sse3 2>&1 \
195 // RUN: | FileCheck %s -check-prefix=opteron-sse3
196 // opteron-sse3: "-target-cpu" "opteron-sse3"
198 // RUN: %clang -target x86_64-unknown-unknown -c -### %s -march=athlon64-sse3 2>&1 \
199 // RUN: | FileCheck %s -check-prefix=athlon64-sse3
200 // athlon64-sse3: "-target-cpu" "athlon64-sse3"
202 // RUN: %clang -target x86_64-unknown-unknown -c -### %s -march=amdfam10 2>&1 \
203 // RUN: | FileCheck %s -check-prefix=amdfam10
204 // amdfam10: "-target-cpu" "amdfam10"
206 // RUN: %clang -target x86_64-unknown-unknown -c -### %s -march=barcelona 2>&1 \
207 // RUN: | FileCheck %s -check-prefix=barcelona
208 // barcelona: "-target-cpu" "barcelona"
210 // RUN: %clang -target x86_64-unknown-unknown -c -### %s -march=bdver1 2>&1 \
211 // RUN: | FileCheck %s -check-prefix=bdver1
212 // bdver1: "-target-cpu" "bdver1"
214 // RUN: %clang -target x86_64-unknown-unknown -c -### %s -march=bdver2 2>&1 \
215 // RUN: | FileCheck %s -check-prefix=bdver2
216 // bdver2: "-target-cpu" "bdver2"
218 // RUN: %clang -target x86_64-unknown-unknown -c -### %s -march=bdver3 2>&1 \
219 // RUN: | FileCheck %s -check-prefix=bdver3
220 // bdver3: "-target-cpu" "bdver3"
222 // RUN: %clang -target x86_64-unknown-unknown -c -### %s -march=bdver4 2>&1 \
223 // RUN: | FileCheck %s -check-prefix=bdver4
224 // bdver4: "-target-cpu" "bdver4"
226 // RUN: %clang -target x86_64-unknown-unknown -c -### %s -march=btver1 2>&1 \
227 // RUN: | FileCheck %s -check-prefix=btver1
228 // btver1: "-target-cpu" "btver1"
230 // RUN: %clang -target x86_64-unknown-unknown -c -### %s -march=btver2 2>&1 \
231 // RUN: | FileCheck %s -check-prefix=btver2
232 // btver2: "-target-cpu" "btver2"
234 // RUN: %clang -target x86_64-unknown-unknown -c -### %s -march=znver1 2>&1 \
235 // RUN: | FileCheck %s -check-prefix=znver1
236 // znver1: "-target-cpu" "znver1"
238 // RUN: %clang -target x86_64-unknown-unknown -c -### %s -march=znver2 2>&1 \
239 // RUN: | FileCheck %s -check-prefix=znver2
240 // znver2: "-target-cpu" "znver2"
242 // RUN: %clang -target x86_64-unknown-unknown -c -### %s -march=znver3 2>&1 \
243 // RUN: | FileCheck %s -check-prefix=znver3
244 // znver3: "-target-cpu" "znver3"
246 // RUN: %clang -target x86_64-unknown-unknown -c -### %s -march=znver4 2>&1 \
247 // RUN: | FileCheck %s -check-prefix=znver4
248 // znver4: "-target-cpu" "znver4"
250 // RUN: %clang -target x86_64-unknown-unknown -c -### %s -march=znver5 2>&1 \
251 // RUN: | FileCheck %s -check-prefix=znver5
252 // znver5: "-target-cpu" "znver5"
254 // RUN: %clang -target x86_64 -c -### %s -march=x86-64 2>&1 | FileCheck %s --check-prefix=x86-64
255 // x86-64: "-target-cpu" "x86-64"
256 // RUN: %clang -target x86_64 -c -### %s -march=x86-64-v2 2>&1 | FileCheck %s --check-prefix=x86-64-v2
257 // x86-64-v2: "-target-cpu" "x86-64-v2"
258 // RUN: %clang -target x86_64 -c -### %s -march=x86-64-v3 2>&1 | FileCheck %s --check-prefix=x86-64-v3
259 // x86-64-v3: "-target-cpu" "x86-64-v3"
260 // RUN: %clang -target x86_64 -c -### %s -march=x86-64-v4 2>&1 | FileCheck %s --check-prefix=x86-64-v4
261 // x86-64-v4: "-target-cpu" "x86-64-v4"