1 // Ensure we support the various CPU architecture names.
2 //
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"
6 //
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"
10 //
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"
14 //
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"
18 //
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"
22 //
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"
26 //
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"
30 //
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"
34 //
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"
38 //
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"
42 //
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"
46 //
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"
50 //
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"
54 //
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"
58 //
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"
62 //
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"
66 //
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"
70 //
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"
74 //
75 // RUN: %clang -target x86_64-unknown-unknown -c -### %s -march=icelake-server 2>&1 \
76 // RUN:   | FileCheck %s -check-prefix=icelake-server
77 // icelake-server: "-target-cpu" "icelake-server"
78 //
79 // RUN: %clang -target x86_64-unknown-unknown -c -### %s -march=tigerlake 2>&1 \
80 // RUN:   | FileCheck %s -check-prefix=tigerlake
81 // tigerlake: "-target-cpu" "tigerlake"
82 //
83 // RUN: %clang -target x86_64-unknown-unknown -c -### %s -march=alderlake 2>&1 \
84 // RUN:   | FileCheck %s -check-prefix=alderlake
85 // alderlake: "-target-cpu" "alderlake"
86 //
87 // RUN: %clang -target x86_64-unknown-unknown -c -### %s -march=lakemont 2>&1 \
88 // RUN:   | FileCheck %s -check-prefix=lakemont
89 // lakemont: "-target-cpu" "lakemont"
90 //
91 // RUN: %clang -target x86_64-unknown-unknown -c -### %s -march=bonnell 2>&1 \
92 // RUN:   | FileCheck %s -check-prefix=bonnell
93 // bonnell: "-target-cpu" "bonnell"
94 //
95 // RUN: %clang -target x86_64-unknown-unknown -c -### %s -march=silvermont 2>&1 \
96 // RUN:   | FileCheck %s -check-prefix=silvermont
97 // silvermont: "-target-cpu" "silvermont"
98 //
99 // RUN: %clang -target x86_64-unknown-unknown -c -### %s -march=goldmont 2>&1 \
100 // RUN:   | FileCheck %s -check-prefix=goldmont
101 // goldmont: "-target-cpu" "goldmont"
102 //
103 // RUN: %clang -target x86_64-unknown-unknown -c -### %s -march=goldmont-plus 2>&1 \
104 // RUN:   | FileCheck %s -check-prefix=goldmont-plus
105 // goldmont-plus: "-target-cpu" "goldmont-plus"
106 //
107 // RUN: %clang -target x86_64-unknown-unknown -c -### %s -march=tremont 2>&1 \
108 // RUN:   | FileCheck %s -check-prefix=tremont
109 // tremont: "-target-cpu" "tremont"
110 //
111 // RUN: %clang -target x86_64-unknown-unknown -c -### %s -march=sapphirerapids 2>&1 \
112 // RUN:   | FileCheck %s -check-prefix=sapphirerapids
113 // sapphirerapids: "-target-cpu" "sapphirerapids"
114 //
115 // RUN: %clang -target x86_64-unknown-unknown -c -### %s -march=k8 2>&1 \
116 // RUN:   | FileCheck %s -check-prefix=k8
117 // k8: "-target-cpu" "k8"
118 //
119 // RUN: %clang -target x86_64-unknown-unknown -c -### %s -march=opteron 2>&1 \
120 // RUN:   | FileCheck %s -check-prefix=opteron
121 // opteron: "-target-cpu" "opteron"
122 //
123 // RUN: %clang -target x86_64-unknown-unknown -c -### %s -march=athlon64 2>&1 \
124 // RUN:   | FileCheck %s -check-prefix=athlon64
125 // athlon64: "-target-cpu" "athlon64"
126 //
127 // RUN: %clang -target x86_64-unknown-unknown -c -### %s -march=athlon-fx 2>&1 \
128 // RUN:   | FileCheck %s -check-prefix=athlon-fx
129 // athlon-fx: "-target-cpu" "athlon-fx"
130 //
131 // RUN: %clang -target x86_64-unknown-unknown -c -### %s -march=k8-sse3 2>&1 \
132 // RUN:   | FileCheck %s -check-prefix=k8-sse3
133 // k8-sse3: "-target-cpu" "k8-sse3"
134 //
135 // RUN: %clang -target x86_64-unknown-unknown -c -### %s -march=opteron-sse3 2>&1 \
136 // RUN:   | FileCheck %s -check-prefix=opteron-sse3
137 // opteron-sse3: "-target-cpu" "opteron-sse3"
138 //
139 // RUN: %clang -target x86_64-unknown-unknown -c -### %s -march=athlon64-sse3 2>&1 \
140 // RUN:   | FileCheck %s -check-prefix=athlon64-sse3
141 // athlon64-sse3: "-target-cpu" "athlon64-sse3"
142 //
143 // RUN: %clang -target x86_64-unknown-unknown -c -### %s -march=amdfam10 2>&1 \
144 // RUN:   | FileCheck %s -check-prefix=amdfam10
145 // amdfam10: "-target-cpu" "amdfam10"
146 //
147 // RUN: %clang -target x86_64-unknown-unknown -c -### %s -march=barcelona 2>&1 \
148 // RUN:   | FileCheck %s -check-prefix=barcelona
149 // barcelona: "-target-cpu" "barcelona"
150 //
151 // RUN: %clang -target x86_64-unknown-unknown -c -### %s -march=bdver1 2>&1 \
152 // RUN:   | FileCheck %s -check-prefix=bdver1
153 // bdver1: "-target-cpu" "bdver1"
154 //
155 // RUN: %clang -target x86_64-unknown-unknown -c -### %s -march=bdver2 2>&1 \
156 // RUN:   | FileCheck %s -check-prefix=bdver2
157 // bdver2: "-target-cpu" "bdver2"
158 //
159 // RUN: %clang -target x86_64-unknown-unknown -c -### %s -march=bdver3 2>&1 \
160 // RUN:   | FileCheck %s -check-prefix=bdver3
161 // bdver3: "-target-cpu" "bdver3"
162 //
163 // RUN: %clang -target x86_64-unknown-unknown -c -### %s -march=bdver4 2>&1 \
164 // RUN:   | FileCheck %s -check-prefix=bdver4
165 // bdver4: "-target-cpu" "bdver4"
166 //
167 // RUN: %clang -target x86_64-unknown-unknown -c -### %s -march=btver1 2>&1 \
168 // RUN:   | FileCheck %s -check-prefix=btver1
169 // btver1: "-target-cpu" "btver1"
170 //
171 // RUN: %clang -target x86_64-unknown-unknown -c -### %s -march=btver2 2>&1 \
172 // RUN:   | FileCheck %s -check-prefix=btver2
173 // btver2: "-target-cpu" "btver2"
174 //
175 // RUN: %clang -target x86_64-unknown-unknown -c -### %s -march=znver1 2>&1 \
176 // RUN:   | FileCheck %s -check-prefix=znver1
177 // znver1: "-target-cpu" "znver1"
178 //
179 // RUN: %clang -target x86_64-unknown-unknown -c -### %s -march=znver2 2>&1 \
180 // RUN:   | FileCheck %s -check-prefix=znver2
181 // znver2: "-target-cpu" "znver2"
182 
183 // RUN: %clang -target x86_64 -c -### %s -march=x86-64 2>&1 | FileCheck %s --check-prefix=x86-64
184 // x86-64: "-target-cpu" "x86-64"
185 // RUN: %clang -target x86_64 -c -### %s -march=x86-64-v2 2>&1 | FileCheck %s --check-prefix=x86-64-v2
186 // x86-64-v2: "-target-cpu" "x86-64-v2"
187 // RUN: %clang -target x86_64 -c -### %s -march=x86-64-v3 2>&1 | FileCheck %s --check-prefix=x86-64-v3
188 // x86-64-v3: "-target-cpu" "x86-64-v3"
189 // RUN: %clang -target x86_64 -c -### %s -march=x86-64-v4 2>&1 | FileCheck %s --check-prefix=x86-64-v4
190 // x86-64-v4: "-target-cpu" "x86-64-v4"
191