[clang] Handle __declspec() attributes in using
[llvm-project.git] / clang / test / Driver / x86-march.c
blob8e86be6c76cd793261fb7bbd021748aaedc1e8e9
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"
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-unknown-unknown -c -### %s -march=lakemont 2>&1 \
100 // RUN: | FileCheck %s -check-prefix=lakemont
101 // lakemont: "-target-cpu" "lakemont"
103 // RUN: %clang -target x86_64-unknown-unknown -c -### %s -march=bonnell 2>&1 \
104 // RUN: | FileCheck %s -check-prefix=bonnell
105 // bonnell: "-target-cpu" "bonnell"
107 // RUN: %clang -target x86_64-unknown-unknown -c -### %s -march=silvermont 2>&1 \
108 // RUN: | FileCheck %s -check-prefix=silvermont
109 // silvermont: "-target-cpu" "silvermont"
111 // RUN: %clang -target x86_64-unknown-unknown -c -### %s -march=goldmont 2>&1 \
112 // RUN: | FileCheck %s -check-prefix=goldmont
113 // goldmont: "-target-cpu" "goldmont"
115 // RUN: %clang -target x86_64-unknown-unknown -c -### %s -march=goldmont-plus 2>&1 \
116 // RUN: | FileCheck %s -check-prefix=goldmont-plus
117 // goldmont-plus: "-target-cpu" "goldmont-plus"
119 // RUN: %clang -target x86_64-unknown-unknown -c -### %s -march=tremont 2>&1 \
120 // RUN: | FileCheck %s -check-prefix=tremont
121 // tremont: "-target-cpu" "tremont"
122 // RUN: %clang -target x86_64-unknown-unknown -c -### %s -march=sierraforest 2>&1 \
123 // RUN: | FileCheck %s -check-prefix=sierraforest
124 // sierraforest: "-target-cpu" "sierraforest"
126 // RUN: %clang -target x86_64-unknown-unknown -c -### %s -march=grandridge 2>&1 \
127 // RUN: | FileCheck %s -check-prefix=grandridge
128 // grandridge: "-target-cpu" "grandridge"
130 // RUN: %clang -target x86_64-unknown-unknown -c -### %s -march=graniterapids 2>&1 \
131 // RUN: | FileCheck %s -check-prefix=graniterapids
132 // graniterapids: "-target-cpu" "graniterapids"
134 // RUN: %clang -target x86_64-unknown-unknown -c -### %s -march=emeraldrapids 2>&1 \
135 // RUN: | FileCheck %s -check-prefix=emeraldrapids
136 // emeraldrapids: "-target-cpu" "emeraldrapids"
138 // RUN: %clang -target x86_64-unknown-unknown -c -### %s -march=sapphirerapids 2>&1 \
139 // RUN: | FileCheck %s -check-prefix=sapphirerapids
140 // sapphirerapids: "-target-cpu" "sapphirerapids"
142 // RUN: %clang -target x86_64-unknown-unknown -c -### %s -march=k8 2>&1 \
143 // RUN: | FileCheck %s -check-prefix=k8
144 // k8: "-target-cpu" "k8"
146 // RUN: %clang -target x86_64-unknown-unknown -c -### %s -march=opteron 2>&1 \
147 // RUN: | FileCheck %s -check-prefix=opteron
148 // opteron: "-target-cpu" "opteron"
150 // RUN: %clang -target x86_64-unknown-unknown -c -### %s -march=athlon64 2>&1 \
151 // RUN: | FileCheck %s -check-prefix=athlon64
152 // athlon64: "-target-cpu" "athlon64"
154 // RUN: %clang -target x86_64-unknown-unknown -c -### %s -march=athlon-fx 2>&1 \
155 // RUN: | FileCheck %s -check-prefix=athlon-fx
156 // athlon-fx: "-target-cpu" "athlon-fx"
158 // RUN: %clang -target x86_64-unknown-unknown -c -### %s -march=k8-sse3 2>&1 \
159 // RUN: | FileCheck %s -check-prefix=k8-sse3
160 // k8-sse3: "-target-cpu" "k8-sse3"
162 // RUN: %clang -target x86_64-unknown-unknown -c -### %s -march=opteron-sse3 2>&1 \
163 // RUN: | FileCheck %s -check-prefix=opteron-sse3
164 // opteron-sse3: "-target-cpu" "opteron-sse3"
166 // RUN: %clang -target x86_64-unknown-unknown -c -### %s -march=athlon64-sse3 2>&1 \
167 // RUN: | FileCheck %s -check-prefix=athlon64-sse3
168 // athlon64-sse3: "-target-cpu" "athlon64-sse3"
170 // RUN: %clang -target x86_64-unknown-unknown -c -### %s -march=amdfam10 2>&1 \
171 // RUN: | FileCheck %s -check-prefix=amdfam10
172 // amdfam10: "-target-cpu" "amdfam10"
174 // RUN: %clang -target x86_64-unknown-unknown -c -### %s -march=barcelona 2>&1 \
175 // RUN: | FileCheck %s -check-prefix=barcelona
176 // barcelona: "-target-cpu" "barcelona"
178 // RUN: %clang -target x86_64-unknown-unknown -c -### %s -march=bdver1 2>&1 \
179 // RUN: | FileCheck %s -check-prefix=bdver1
180 // bdver1: "-target-cpu" "bdver1"
182 // RUN: %clang -target x86_64-unknown-unknown -c -### %s -march=bdver2 2>&1 \
183 // RUN: | FileCheck %s -check-prefix=bdver2
184 // bdver2: "-target-cpu" "bdver2"
186 // RUN: %clang -target x86_64-unknown-unknown -c -### %s -march=bdver3 2>&1 \
187 // RUN: | FileCheck %s -check-prefix=bdver3
188 // bdver3: "-target-cpu" "bdver3"
190 // RUN: %clang -target x86_64-unknown-unknown -c -### %s -march=bdver4 2>&1 \
191 // RUN: | FileCheck %s -check-prefix=bdver4
192 // bdver4: "-target-cpu" "bdver4"
194 // RUN: %clang -target x86_64-unknown-unknown -c -### %s -march=btver1 2>&1 \
195 // RUN: | FileCheck %s -check-prefix=btver1
196 // btver1: "-target-cpu" "btver1"
198 // RUN: %clang -target x86_64-unknown-unknown -c -### %s -march=btver2 2>&1 \
199 // RUN: | FileCheck %s -check-prefix=btver2
200 // btver2: "-target-cpu" "btver2"
202 // RUN: %clang -target x86_64-unknown-unknown -c -### %s -march=znver1 2>&1 \
203 // RUN: | FileCheck %s -check-prefix=znver1
204 // znver1: "-target-cpu" "znver1"
206 // RUN: %clang -target x86_64-unknown-unknown -c -### %s -march=znver2 2>&1 \
207 // RUN: | FileCheck %s -check-prefix=znver2
208 // znver2: "-target-cpu" "znver2"
210 // RUN: %clang -target x86_64-unknown-unknown -c -### %s -march=znver3 2>&1 \
211 // RUN: | FileCheck %s -check-prefix=znver3
212 // znver3: "-target-cpu" "znver3"
214 // RUN: %clang -target x86_64-unknown-unknown -c -### %s -march=znver4 2>&1 \
215 // RUN: | FileCheck %s -check-prefix=znver4
216 // znver4: "-target-cpu" "znver4"
218 // RUN: %clang -target x86_64 -c -### %s -march=x86-64 2>&1 | FileCheck %s --check-prefix=x86-64
219 // x86-64: "-target-cpu" "x86-64"
220 // RUN: %clang -target x86_64 -c -### %s -march=x86-64-v2 2>&1 | FileCheck %s --check-prefix=x86-64-v2
221 // x86-64-v2: "-target-cpu" "x86-64-v2"
222 // RUN: %clang -target x86_64 -c -### %s -march=x86-64-v3 2>&1 | FileCheck %s --check-prefix=x86-64-v3
223 // x86-64-v3: "-target-cpu" "x86-64-v3"
224 // RUN: %clang -target x86_64 -c -### %s -march=x86-64-v4 2>&1 | FileCheck %s --check-prefix=x86-64-v4
225 // x86-64-v4: "-target-cpu" "x86-64-v4"