Index: include/clang/Driver/Options.td =================================================================== --- include/clang/Driver/Options.td +++ include/clang/Driver/Options.td @@ -1822,7 +1822,6 @@ def mgeneral_regs_only : Flag<["-"], "mgeneral-regs-only">, Group, HelpText<"Generate code which only uses the general purpose registers (AArch64 only)">; - def mfix_cortex_a53_835769 : Flag<["-"], "mfix-cortex-a53-835769">, Group, HelpText<"Workaround Cortex-A53 erratum 835769 (AArch64 only)">; @@ -1840,6 +1839,10 @@ Group, HelpText<"Generate additional code for specified of debugger ABI (AMDGPU only)">, MetaVarName<"">; +def mxnack : Flag<["-"], "mxnack">, Group, + HelpText<"Enable XNACK (AMDGPU only)">; +def mno_xnack : Flag<["-"], "mno-xnack">, Group, + HelpText<"Disable XNACK (AMDGPU only)">; def faltivec : Flag<["-"], "faltivec">, Group, Flags<[DriverOption]>; def fno_altivec : Flag<["-"], "fno-altivec">, Group, Flags<[DriverOption]>; Index: test/Driver/amdgpu-features.c =================================================================== --- test/Driver/amdgpu-features.c +++ test/Driver/amdgpu-features.c @@ -5,3 +5,9 @@ // RUN: %clang -### -target amdgcn -x cl -S -emit-llvm -mcpu=kaveri -mamdgpu-debugger-abi=1.0 %s -o - 2>&1 \ // RUN: | FileCheck --check-prefix=CHECK-MAMDGPU-DEBUGGER-ABI-1-0 %s // CHECK-MAMDGPU-DEBUGGER-ABI-1-0: "-target-feature" "+amdgpu-debugger-insert-nops" "-target-feature" "+amdgpu-debugger-reserve-regs" "-target-feature" "+amdgpu-debugger-emit-prologue" + +// RUN: %clang -### -target amdgcn -mcpu=gfx700 -mxnack %s 2>&1 | FileCheck --check-prefix=XNACK %s +// XNACK: "-target-feature" "+xnack" + +// RUN: %clang -### -target amdgcn -mcpu=gfx700 -mno-xnack %s 2>&1 | FileCheck --check-prefix=NO-XNACK %s +// NO-XNACK: "-target-feature" "-xnack"