Skip to content

Commit 641b2a5

Browse files
authored
[Driver][X86] Add -m[no-]apxf to m_x86_Features_Group (#140874)
This is to expose these options to clang-cl on Windows.
1 parent c02e9c8 commit 641b2a5

File tree

3 files changed

+71
-54
lines changed

3 files changed

+71
-54
lines changed

clang/include/clang/Driver/Options.td

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6679,8 +6679,12 @@ def mapx_features_EQ : CommaJoined<["-"], "mapx-features=">, Group<m_x86_Feature
66796679
HelpText<"Enable features of APX">, Values<"egpr,push2pop2,ppx,ndd,ccmp,nf,cf,zu">, Visibility<[ClangOption, CLOption, FlangOption]>;
66806680
def mno_apx_features_EQ : CommaJoined<["-"], "mno-apx-features=">, Group<m_x86_Features_Group>,
66816681
HelpText<"Disable features of APX">, Values<"egpr,push2pop2,ppx,ndd,ccmp,nf,cf,zu">, Visibility<[ClangOption, CLOption, FlangOption]>;
6682-
def mapxf : Flag<["-"], "mapxf">, Alias<mapx_features_EQ>, AliasArgs<["egpr","push2pop2","ppx","ndd","ccmp","nf","cf","zu"]>;
6683-
def mno_apxf : Flag<["-"], "mno-apxf">, Alias<mno_apx_features_EQ>, AliasArgs<["egpr","push2pop2","ppx","ndd","ccmp","nf","cf","zu"]>;
6682+
def mapxf : Flag<["-"], "mapxf">, Alias<mapx_features_EQ>,
6683+
AliasArgs<["egpr","push2pop2","ppx","ndd","ccmp","nf","cf","zu"]>,
6684+
Group<m_x86_Features_Group>;
6685+
def mno_apxf : Flag<["-"], "mno-apxf">, Alias<mno_apx_features_EQ>,
6686+
AliasArgs<["egpr","push2pop2","ppx","ndd","ccmp","nf","cf","zu"]>,
6687+
Group<m_x86_Features_Group>;
66846688
def mapx_inline_asm_use_gpr32 : Flag<["-"], "mapx-inline-asm-use-gpr32">, Group<m_Group>,
66856689
HelpText<"Enable use of GPR32 in inline assembly for APX">;
66866690
} // let Flags = [TargetSpecific]

clang/test/Driver/cl-x86-flags.c

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,3 +135,16 @@
135135

136136
void f(void) {
137137
}
138+
139+
140+
// RUN: not %clang_cl -### --target=i386 -mapx-features=ndd %s 2>&1 | FileCheck --check-prefix=NON-APX %s
141+
// RUN: not %clang_cl -### --target=i386 -mapxf %s 2>&1 | FileCheck --check-prefix=NON-APX %s
142+
// RUN: %clang_cl -### --target=i386 -mno-apxf %s 2>&1 > /dev/null
143+
// NON-APX: error: unsupported option '-mapx-features=|-mapxf' for target 'i386'
144+
// NON-APX-NOT: error: {{.*}} -mapx-features=
145+
146+
// RUN: %clang_cl --target=x86_64-pc-windows -mapxf %s -### 2>&1 | FileCheck -check-prefix=APXF %s
147+
// RUN: %clang_cl --target=x86_64-pc-windows -mapxf -mno-apxf %s -### 2>&1 | FileCheck -check-prefix=NO-APXF %s
148+
// RUN: %clang_cl --target=x86_64-pc-windows -mapx-features=egpr,push2pop2,ppx,ndd,ccmp,nf,cf,zu %s -### 2>&1 | FileCheck -check-prefix=APXF %s
149+
// APXF: "-target-feature" "+egpr" "-target-feature" "+push2pop2" "-target-feature" "+ppx" "-target-feature" "+ndd" "-target-feature" "+ccmp" "-target-feature" "+nf" "-target-feature" "+cf" "-target-feature" "+zu"
150+
// NO-APXF: "-target-feature" "-egpr" "-target-feature" "-push2pop2" "-target-feature" "-ppx" "-target-feature" "-ndd" "-target-feature" "-ccmp" "-target-feature" "-nf" "-target-feature" "-cf" "-target-feature" "-zu"

clang/test/Driver/x86-target-features.c

Lines changed: 52 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,8 @@
131131
// VBMI2: "-target-feature" "+avx512vbmi2"
132132
// NO-VBMI2: "-target-feature" "-avx512vbmi2"
133133

134-
// RUN: %clang -target i386-linux-gnu -mavx512vp2intersect %s -### 2>&1 | FileCheck -check-prefix=VP2INTERSECT %s
135-
// RUN: %clang -target i386-linux-gnu -mno-avx512vp2intersect %s -### 2>&1 | FileCheck -check-prefix=NO-VP2INTERSECT %s
134+
// RUN: %clang --target=i386-linux-gnu -mavx512vp2intersect %s -### 2>&1 | FileCheck -check-prefix=VP2INTERSECT %s
135+
// RUN: %clang --target=i386-linux-gnu -mno-avx512vp2intersect %s -### 2>&1 | FileCheck -check-prefix=NO-VP2INTERSECT %s
136136
// VP2INTERSECT: "-target-feature" "+avx512vp2intersect"
137137
// NO-VP2INTERSECT: "-target-feature" "-avx512vp2intersect"
138138

@@ -146,27 +146,27 @@
146146
// RDPRU: "-target-feature" "+rdpru"
147147
// NO-RDPRU: "-target-feature" "-rdpru"
148148

149-
// RUN: %clang -target i386-linux-gnu -mretpoline %s -### 2>&1 | FileCheck -check-prefix=RETPOLINE %s
150-
// RUN: %clang -target i386-linux-gnu -mno-retpoline %s -### 2>&1 | FileCheck -check-prefix=NO-RETPOLINE %s
149+
// RUN: %clang --target=i386-linux-gnu -mretpoline %s -### 2>&1 | FileCheck -check-prefix=RETPOLINE %s
150+
// RUN: %clang --target=i386-linux-gnu -mno-retpoline %s -### 2>&1 | FileCheck -check-prefix=NO-RETPOLINE %s
151151
// RETPOLINE: "-target-feature" "+retpoline-indirect-calls" "-target-feature" "+retpoline-indirect-branches"
152152
// NO-RETPOLINE-NOT: retpoline
153153

154-
// RUN: %clang -target i386-linux-gnu -mretpoline -mretpoline-external-thunk %s -### 2>&1 | FileCheck -check-prefix=RETPOLINE-EXTERNAL-THUNK %s
155-
// RUN: %clang -target i386-linux-gnu -mretpoline -mno-retpoline-external-thunk %s -### 2>&1 | FileCheck -check-prefix=NO-RETPOLINE-EXTERNAL-THUNK %s
154+
// RUN: %clang --target=i386-linux-gnu -mretpoline -mretpoline-external-thunk %s -### 2>&1 | FileCheck -check-prefix=RETPOLINE-EXTERNAL-THUNK %s
155+
// RUN: %clang --target=i386-linux-gnu -mretpoline -mno-retpoline-external-thunk %s -### 2>&1 | FileCheck -check-prefix=NO-RETPOLINE-EXTERNAL-THUNK %s
156156
// RETPOLINE-EXTERNAL-THUNK: "-target-feature" "+retpoline-external-thunk"
157157
// NO-RETPOLINE-EXTERNAL-THUNK: "-target-feature" "-retpoline-external-thunk"
158158

159-
// RUN: %clang -target i386-linux-gnu -mspeculative-load-hardening %s -### 2>&1 | FileCheck -check-prefix=SLH %s
160-
// RUN: %clang -target i386-linux-gnu -mretpoline -mspeculative-load-hardening %s -### 2>&1 | FileCheck -check-prefix=RETPOLINE %s
161-
// RUN: %clang -target i386-linux-gnu -mno-speculative-load-hardening %s -### 2>&1 | FileCheck -check-prefix=NO-SLH %s
159+
// RUN: %clang --target=i386-linux-gnu -mspeculative-load-hardening %s -### 2>&1 | FileCheck -check-prefix=SLH %s
160+
// RUN: %clang --target=i386-linux-gnu -mretpoline -mspeculative-load-hardening %s -### 2>&1 | FileCheck -check-prefix=RETPOLINE %s
161+
// RUN: %clang --target=i386-linux-gnu -mno-speculative-load-hardening %s -### 2>&1 | FileCheck -check-prefix=NO-SLH %s
162162
// SLH-NOT: retpoline
163163
// SLH: "-target-feature" "+retpoline-indirect-calls"
164164
// SLH-NOT: retpoline
165165
// SLH: "-mspeculative-load-hardening"
166166
// NO-SLH-NOT: retpoline
167167

168-
// RUN: %clang -target i386-linux-gnu -mlvi-cfi %s -### 2>&1 | FileCheck -check-prefix=LVICFI %s
169-
// RUN: %clang -target i386-linux-gnu -mno-lvi-cfi %s -### 2>&1 | FileCheck -check-prefix=NO-LVICFI %s
168+
// RUN: %clang --target=i386-linux-gnu -mlvi-cfi %s -### 2>&1 | FileCheck -check-prefix=LVICFI %s
169+
// RUN: %clang --target=i386-linux-gnu -mno-lvi-cfi %s -### 2>&1 | FileCheck -check-prefix=NO-LVICFI %s
170170
// LVICFI: "-target-feature" "+lvi-cfi"
171171
// NO-LVICFI-NOT: lvi-cfi
172172

@@ -177,8 +177,8 @@
177177
// RUN: not %clang --target=i386-linux-gnu -mlvi-cfi -mretpoline-external-thunk %s -### 2>&1 | FileCheck -check-prefix=LVICFI-RETPOLINE-EXTERNAL-THUNK %s
178178
// LVICFI-RETPOLINE-EXTERNAL-THUNK: error: invalid argument 'mretpoline-external-thunk' not allowed with 'mlvi-cfi'
179179

180-
// RUN: %clang -target i386-linux-gnu -mlvi-hardening %s -### 2>&1 | FileCheck -check-prefix=LVIHARDENING %s
181-
// RUN: %clang -target i386-linux-gnu -mno-lvi-hardening %s -### 2>&1 | FileCheck -check-prefix=NO-LVIHARDENING %s
180+
// RUN: %clang --target=i386-linux-gnu -mlvi-hardening %s -### 2>&1 | FileCheck -check-prefix=LVIHARDENING %s
181+
// RUN: %clang --target=i386-linux-gnu -mno-lvi-hardening %s -### 2>&1 | FileCheck -check-prefix=NO-LVIHARDENING %s
182182
// LVIHARDENING: "-target-feature" "+lvi-load-hardening" "-target-feature" "+lvi-cfi"
183183
// NO-LVIHARDENING-NOT: "+lvi-
184184

@@ -189,14 +189,14 @@
189189
// RUN: not %clang --target=i386-linux-gnu -mlvi-hardening -mretpoline-external-thunk %s -### 2>&1 | FileCheck -check-prefix=LVIHARDENING-RETPOLINE-EXTERNAL-THUNK %s
190190
// LVIHARDENING-RETPOLINE-EXTERNAL-THUNK: error: invalid argument 'mretpoline-external-thunk' not allowed with 'mlvi-hardening'
191191

192-
// RUN: %clang -target i386-linux-gnu -mseses %s -### 2>&1 | FileCheck -check-prefix=SESES %s
193-
// RUN: %clang -target i386-linux-gnu -mno-seses %s -### 2>&1 | FileCheck -check-prefix=NO-SESES %s
192+
// RUN: %clang --target=i386-linux-gnu -mseses %s -### 2>&1 | FileCheck -check-prefix=SESES %s
193+
// RUN: %clang --target=i386-linux-gnu -mno-seses %s -### 2>&1 | FileCheck -check-prefix=NO-SESES %s
194194
// SESES: "-target-feature" "+seses"
195195
// SESES: "-target-feature" "+lvi-cfi"
196196
// NO-SESES-NOT: seses
197197
// NO-SESES-NOT: lvi-cfi
198198

199-
// RUN: %clang -target i386-linux-gnu -mseses -mno-lvi-cfi %s -### 2>&1 | FileCheck -check-prefix=SESES-NOLVICFI %s
199+
// RUN: %clang --target=i386-linux-gnu -mseses -mno-lvi-cfi %s -### 2>&1 | FileCheck -check-prefix=SESES-NOLVICFI %s
200200
// SESES-NOLVICFI: "-target-feature" "+seses"
201201
// SESES-NOLVICFI-NOT: lvi-cfi
202202

@@ -210,8 +210,8 @@
210210
// RUN: not %clang --target=i386-linux-gnu -mseses -mlvi-hardening %s -### 2>&1 | FileCheck -check-prefix=SESES-LVIHARDENING %s
211211
// SESES-LVIHARDENING: error: invalid argument 'mlvi-hardening' not allowed with 'mseses'
212212

213-
// RUN: %clang -target i386-linux-gnu -mwaitpkg %s -### 2>&1 | FileCheck -check-prefix=WAITPKG %s
214-
// RUN: %clang -target i386-linux-gnu -mno-waitpkg %s -### 2>&1 | FileCheck -check-prefix=NO-WAITPKG %s
213+
// RUN: %clang --target=i386-linux-gnu -mwaitpkg %s -### 2>&1 | FileCheck -check-prefix=WAITPKG %s
214+
// RUN: %clang --target=i386-linux-gnu -mno-waitpkg %s -### 2>&1 | FileCheck -check-prefix=NO-WAITPKG %s
215215
// WAITPKG: "-target-feature" "+waitpkg"
216216
// NO-WAITPKG: "-target-feature" "-waitpkg"
217217

@@ -265,13 +265,13 @@
265265
// TSXLDTRK: "-target-feature" "+tsxldtrk"
266266
// NO-TSXLDTRK: "-target-feature" "-tsxldtrk"
267267

268-
// RUN: %clang -target i386-linux-gnu -mkl %s -### 2>&1 | FileCheck -check-prefix=KL %s
269-
// RUN: %clang -target i386-linux-gnu -mno-kl %s -### 2>&1 | FileCheck -check-prefix=NO-KL %s
268+
// RUN: %clang --target=i386-linux-gnu -mkl %s -### 2>&1 | FileCheck -check-prefix=KL %s
269+
// RUN: %clang --target=i386-linux-gnu -mno-kl %s -### 2>&1 | FileCheck -check-prefix=NO-KL %s
270270
// KL: "-target-feature" "+kl"
271271
// NO-KL: "-target-feature" "-kl"
272272

273-
// RUN: %clang -target i386-linux-gnu -mwidekl %s -### 2>&1 | FileCheck -check-prefix=WIDE_KL %s
274-
// RUN: %clang -target i386-linux-gnu -mno-widekl %s -### 2>&1 | FileCheck -check-prefix=NO-WIDE_KL %s
273+
// RUN: %clang --target=i386-linux-gnu -mwidekl %s -### 2>&1 | FileCheck -check-prefix=WIDE_KL %s
274+
// RUN: %clang --target=i386-linux-gnu -mno-widekl %s -### 2>&1 | FileCheck -check-prefix=NO-WIDE_KL %s
275275
// WIDE_KL: "-target-feature" "+widekl"
276276
// NO-WIDE_KL: "-target-feature" "-widekl"
277277

@@ -297,30 +297,30 @@
297297
// AMX-FP16: "-target-feature" "+amx-fp16"
298298
// NO-AMX-FP16: "-target-feature" "-amx-fp16"
299299

300-
// RUN: %clang -target x86_64-unknown-linux-gnu -mamx-complex %s \
300+
// RUN: %clang --target=x86_64-unknown-linux-gnu -mamx-complex %s \
301301
// RUN: -### -o %t.o 2>&1 | FileCheck -check-prefix=AMX-COMPLEX %s
302-
// RUN: %clang -target x86_64-unknown-linux-gnu -mno-amx-complex %s \
302+
// RUN: %clang --target=x86_64-unknown-linux-gnu -mno-amx-complex %s \
303303
// RUN: -### -o %t.o 2>&1 | FileCheck -check-prefix=NO-AMX-COMPLEX %s
304304
// AMX-COMPLEX: "-target-feature" "+amx-complex"
305305
// NO-AMX-COMPLEX: "-target-feature" "-amx-complex"
306306

307-
// RUN: %clang -target x86_64-unknown-linux-gnu -mamx-transpose %s \
307+
// RUN: %clang --target=x86_64-unknown-linux-gnu -mamx-transpose %s \
308308
// RUN: -### -o %t.o 2>&1 | FileCheck -check-prefix=AMX-TRANSPOSE %s
309-
// RUN: %clang -target x86_64-unknown-linux-gnu -mno-amx-transpose %s \
309+
// RUN: %clang --target=x86_64-unknown-linux-gnu -mno-amx-transpose %s \
310310
// RUN: -### -o %t.o 2>&1 | FileCheck -check-prefix=NO-AMX-TRANSPOSE %s
311311
// AMX-TRANSPOSE: "-target-feature" "+amx-transpose"
312312
// NO-AMX-TRANSPOSE: "-target-feature" "-amx-transpose"
313313

314-
// RUN: %clang -target x86_64-unknown-linux-gnu -mamx-avx512 %s \
314+
// RUN: %clang --target=x86_64-unknown-linux-gnu -mamx-avx512 %s \
315315
// RUN: -### -o %t.o 2>&1 | FileCheck -check-prefix=AMX-AVX512 %s
316-
// RUN: %clang -target x86_64-unknown-linux-gnu -mno-amx-avx512 %s \
316+
// RUN: %clang --target=x86_64-unknown-linux-gnu -mno-amx-avx512 %s \
317317
// RUN: -### -o %t.o 2>&1 | FileCheck -check-prefix=NO-AMX-AVX512 %s
318318
// AMX-AVX512: "-target-feature" "+amx-avx512"
319319
// NO-AMX-AVX512: "-target-feature" "-amx-avx512"
320320

321-
// RUN: %clang -target x86_64-unknown-linux-gnu -mamx-tf32 %s \
321+
// RUN: %clang --target=x86_64-unknown-linux-gnu -mamx-tf32 %s \
322322
// RUN: -### -o %t.o 2>&1 | FileCheck -check-prefix=AMX-TF32 %s
323-
// RUN: %clang -target x86_64-unknown-linux-gnu -mno-amx-tf32 %s \
323+
// RUN: %clang --target=x86_64-unknown-linux-gnu -mno-amx-tf32 %s \
324324
// RUN: -### -o %t.o 2>&1 | FileCheck -check-prefix=NO-AMX-TF32 %s
325325
// AMX-TF32: "-target-feature" "+amx-tf32"
326326
// NO-AMX-TF32: "-target-feature" "-amx-tf32"
@@ -355,8 +355,8 @@
355355
// RAOINT: "-target-feature" "+raoint"
356356
// NO-RAOINT: "-target-feature" "-raoint"
357357

358-
// RUN: %clang -target i386-linux-gnu -mavxifma %s -### -o %t.o 2>&1 | FileCheck -check-prefix=AVXIFMA %s
359-
// RUN: %clang -target i386-linux-gnu -mno-avxifma %s -### -o %t.o 2>&1 | FileCheck -check-prefix=NO-AVXIFMA %s
358+
// RUN: %clang --target=i386-linux-gnu -mavxifma %s -### -o %t.o 2>&1 | FileCheck -check-prefix=AVXIFMA %s
359+
// RUN: %clang --target=i386-linux-gnu -mno-avxifma %s -### -o %t.o 2>&1 | FileCheck -check-prefix=NO-AVXIFMA %s
360360
// AVXIFMA: "-target-feature" "+avxifma"
361361
// NO-AVXIFMA: "-target-feature" "-avxifma"
362362

@@ -471,22 +471,22 @@
471471
// RUN: touch %t.o
472472
// RUN: %clang -fdriver-only -Werror --target=x86_64-pc-linux-gnu -mharden-sls=all %t.o -o /dev/null 2>&1 | count 0
473473

474-
// RUN: %clang -target x86_64-unknown-linux-gnu -mapxf %s -### -o %t.o 2>&1 | FileCheck -check-prefix=APXF %s
475-
// RUN: %clang -target x86_64-unknown-linux-gnu -mno-apxf %s -### -o %t.o 2>&1 | FileCheck -check-prefix=NO-APXF %s
476-
// RUN: %clang -target x86_64-unknown-linux-gnu -mno-apxf -mapxf %s -### -o %t.o 2>&1 | FileCheck -check-prefix=APXF %s
477-
// RUN: %clang -target x86_64-unknown-linux-gnu -mapxf -mno-apxf %s -### -o %t.o 2>&1 | FileCheck -check-prefix=NO-APXF %s
474+
// RUN: %clang --target=x86_64-unknown-linux-gnu -mapxf %s -### -o %t.o 2>&1 | FileCheck -check-prefix=APXF %s
475+
// RUN: %clang --target=x86_64-unknown-linux-gnu -mno-apxf %s -### -o %t.o 2>&1 | FileCheck -check-prefix=NO-APXF %s
476+
// RUN: %clang --target=x86_64-unknown-linux-gnu -mno-apxf -mapxf %s -### -o %t.o 2>&1 | FileCheck -check-prefix=APXF %s
477+
// RUN: %clang --target=x86_64-unknown-linux-gnu -mapxf -mno-apxf %s -### -o %t.o 2>&1 | FileCheck -check-prefix=NO-APXF %s
478478
//
479479
// APXF: "-target-feature" "+egpr" "-target-feature" "+push2pop2" "-target-feature" "+ppx" "-target-feature" "+ndd" "-target-feature" "+ccmp" "-target-feature" "+nf" "-target-feature" "+cf" "-target-feature" "+zu"
480480
// NO-APXF: "-target-feature" "-egpr" "-target-feature" "-push2pop2" "-target-feature" "-ppx" "-target-feature" "-ndd" "-target-feature" "-ccmp" "-target-feature" "-nf" "-target-feature" "-cf" "-target-feature" "-zu"
481481

482-
// RUN: %clang -target x86_64-unknown-linux-gnu -mapx-features=egpr %s -### -o %t.o 2>&1 | FileCheck -check-prefix=EGPR %s
483-
// RUN: %clang -target x86_64-unknown-linux-gnu -mapx-features=push2pop2 %s -### -o %t.o 2>&1 | FileCheck -check-prefix=PUSH2POP2 %s
484-
// RUN: %clang -target x86_64-unknown-linux-gnu -mapx-features=ppx %s -### -o %t.o 2>&1 | FileCheck -check-prefix=PPX %s
485-
// RUN: %clang -target x86_64-unknown-linux-gnu -mapx-features=ndd %s -### -o %t.o 2>&1 | FileCheck -check-prefix=NDD %s
486-
// RUN: %clang -target x86_64-unknown-linux-gnu -mapx-features=ccmp %s -### -o %t.o 2>&1 | FileCheck -check-prefix=CCMP %s
487-
// RUN: %clang -target x86_64-unknown-linux-gnu -mapx-features=nf %s -### -o %t.o 2>&1 | FileCheck -check-prefix=NF %s
488-
// RUN: %clang -target x86_64-unknown-linux-gnu -mapx-features=cf %s -### -o %t.o 2>&1 | FileCheck -check-prefix=CF %s
489-
// RUN: %clang -target x86_64-unknown-linux-gnu -mapx-features=zu %s -### -o %t.o 2>&1 | FileCheck -check-prefix=ZU %s
482+
// RUN: %clang --target=x86_64-unknown-linux-gnu -mapx-features=egpr %s -### -o %t.o 2>&1 | FileCheck -check-prefix=EGPR %s
483+
// RUN: %clang --target=x86_64-unknown-linux-gnu -mapx-features=push2pop2 %s -### -o %t.o 2>&1 | FileCheck -check-prefix=PUSH2POP2 %s
484+
// RUN: %clang --target=x86_64-unknown-linux-gnu -mapx-features=ppx %s -### -o %t.o 2>&1 | FileCheck -check-prefix=PPX %s
485+
// RUN: %clang --target=x86_64-unknown-linux-gnu -mapx-features=ndd %s -### -o %t.o 2>&1 | FileCheck -check-prefix=NDD %s
486+
// RUN: %clang --target=x86_64-unknown-linux-gnu -mapx-features=ccmp %s -### -o %t.o 2>&1 | FileCheck -check-prefix=CCMP %s
487+
// RUN: %clang --target=x86_64-unknown-linux-gnu -mapx-features=nf %s -### -o %t.o 2>&1 | FileCheck -check-prefix=NF %s
488+
// RUN: %clang --target=x86_64-unknown-linux-gnu -mapx-features=cf %s -### -o %t.o 2>&1 | FileCheck -check-prefix=CF %s
489+
// RUN: %clang --target=x86_64-unknown-linux-gnu -mapx-features=zu %s -### -o %t.o 2>&1 | FileCheck -check-prefix=ZU %s
490490
// EGPR: "-target-feature" "+egpr"
491491
// PUSH2POP2: "-target-feature" "+push2pop2"
492492
// PPX: "-target-feature" "+ppx"
@@ -496,20 +496,20 @@
496496
// CF: "-target-feature" "+cf"
497497
// ZU: "-target-feature" "+zu"
498498

499-
// RUN: %clang -target x86_64-unknown-linux-gnu -mapx-features=egpr,ndd %s -### -o %t.o 2>&1 | FileCheck -check-prefix=EGPR-NDD %s
500-
// RUN: %clang -target x86_64-unknown-linux-gnu -mapx-features=egpr -mapx-features=ndd %s -### -o %t.o 2>&1 | FileCheck -check-prefix=EGPR-NDD %s
501-
// RUN: %clang -target x86_64-unknown-linux-gnu -mno-apx-features=egpr -mno-apx-features=ndd %s -### -o %t.o 2>&1 | FileCheck -check-prefix=NO-EGPR-NO-NDD %s
502-
// RUN: %clang -target x86_64-unknown-linux-gnu -mno-apx-features=egpr -mapx-features=egpr,ndd %s -### -o %t.o 2>&1 | FileCheck -check-prefix=EGPR-NDD %s
503-
// RUN: %clang -target x86_64-unknown-linux-gnu -mno-apx-features=egpr,ndd -mapx-features=egpr %s -### -o %t.o 2>&1 | FileCheck -check-prefix=EGPR-NO-NDD %s
504-
// RUN: %clang -target x86_64-unknown-linux-gnu -mapx-features=egpr,ndd -mno-apx-features=egpr %s -### -o %t.o 2>&1 | FileCheck -check-prefix=NO-EGPR-NDD %s
505-
// RUN: %clang -target x86_64-unknown-linux-gnu -mapx-features=egpr -mno-apx-features=egpr,ndd %s -### -o %t.o 2>&1 | FileCheck -check-prefix=NO-EGPR-NO-NDD %s
499+
// RUN: %clang --target=x86_64-unknown-linux-gnu -mapx-features=egpr,ndd %s -### -o %t.o 2>&1 | FileCheck -check-prefix=EGPR-NDD %s
500+
// RUN: %clang --target=x86_64-unknown-linux-gnu -mapx-features=egpr -mapx-features=ndd %s -### -o %t.o 2>&1 | FileCheck -check-prefix=EGPR-NDD %s
501+
// RUN: %clang --target=x86_64-unknown-linux-gnu -mno-apx-features=egpr -mno-apx-features=ndd %s -### -o %t.o 2>&1 | FileCheck -check-prefix=NO-EGPR-NO-NDD %s
502+
// RUN: %clang --target=x86_64-unknown-linux-gnu -mno-apx-features=egpr -mapx-features=egpr,ndd %s -### -o %t.o 2>&1 | FileCheck -check-prefix=EGPR-NDD %s
503+
// RUN: %clang --target=x86_64-unknown-linux-gnu -mno-apx-features=egpr,ndd -mapx-features=egpr %s -### -o %t.o 2>&1 | FileCheck -check-prefix=EGPR-NO-NDD %s
504+
// RUN: %clang --target=x86_64-unknown-linux-gnu -mapx-features=egpr,ndd -mno-apx-features=egpr %s -### -o %t.o 2>&1 | FileCheck -check-prefix=NO-EGPR-NDD %s
505+
// RUN: %clang --target=x86_64-unknown-linux-gnu -mapx-features=egpr -mno-apx-features=egpr,ndd %s -### -o %t.o 2>&1 | FileCheck -check-prefix=NO-EGPR-NO-NDD %s
506506
//
507507
// EGPR-NDD: "-target-feature" "+egpr" "-target-feature" "+ndd"
508508
// EGPR-NO-NDD: "-target-feature" "-ndd" "-target-feature" "+egpr"
509509
// NO-EGPR-NDD: "-target-feature" "+ndd" "-target-feature" "-egpr"
510510
// NO-EGPR-NO-NDD: "-target-feature" "-egpr" "-target-feature" "-ndd"
511511

512-
// RUN: not %clang -target x86_64-unknown-linux-gnu -mapx-features=egpr,foo,bar %s -### -o %t.o 2>&1 | FileCheck -check-prefix=ERROR %s
512+
// RUN: not %clang --target=x86_64-unknown-linux-gnu -mapx-features=egpr,foo,bar %s -### -o %t.o 2>&1 | FileCheck -check-prefix=ERROR %s
513513
//
514514
// ERROR: unsupported argument 'foo' to option '-mapx-features='
515515
// ERROR: unsupported argument 'bar' to option '-mapx-features='

0 commit comments

Comments
 (0)