From 9786be49fcf36d3c72adf9fa8b002825e3349237 Mon Sep 17 00:00:00 2001 From: Konstantin Zhuravlyov Date: Fri, 10 Nov 2017 19:28:25 +0000 Subject: [PATCH] AMDGPU: Add -mxnack/-mno-xnack options that set +/-xnack feature Differential Revision: https://reviews.llvm.org/D39878 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@317917 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/clang/Driver/Options.td | 5 ++++- test/Driver/amdgpu-features.c | 6 ++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/include/clang/Driver/Options.td b/include/clang/Driver/Options.td index 01605619e0..07c53fdade 100644 --- a/include/clang/Driver/Options.td +++ b/include/clang/Driver/Options.td @@ -1822,7 +1822,6 @@ def mno_neg_immediates: Flag<["-"], "mno-neg-immediates">, Group, 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 @@ def mamdgpu_debugger_abi : Joined<["-"], "mamdgpu-debugger-abi=">, 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]>; diff --git a/test/Driver/amdgpu-features.c b/test/Driver/amdgpu-features.c index 495cadb119..23ba72b26d 100644 --- a/test/Driver/amdgpu-features.c +++ b/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" -- 2.40.0