[llvm] 07824e6 - [AMDGPU] Always enable XNACK feature when support is explicitly requested

Austin Kerbow via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 14 11:59:31 PST 2020


Author: Austin Kerbow
Date: 2020-02-14T11:58:58-08:00
New Revision: 07824e65bf569982894e4afd25ac712b2cf90a9f

URL: https://github.com/llvm/llvm-project/commit/07824e65bf569982894e4afd25ac712b2cf90a9f
DIFF: https://github.com/llvm/llvm-project/commit/07824e65bf569982894e4afd25ac712b2cf90a9f.diff

LOG: [AMDGPU] Always enable XNACK feature when support is explicitly requested

Differential Revision: https://reviews.llvm.org/D74630

Added: 
    

Modified: 
    llvm/lib/Target/AMDGPU/AMDGPUSubtarget.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/AMDGPU/AMDGPUSubtarget.cpp b/llvm/lib/Target/AMDGPU/AMDGPUSubtarget.cpp
index 31c06ce0bfbf..fb488d2b1aab 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUSubtarget.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPUSubtarget.cpp
@@ -150,7 +150,9 @@ GCNSubtarget::initializeSubtargetDependencies(const Triple &TT,
 
   HasFminFmaxLegacy = getGeneration() < AMDGPUSubtarget::VOLCANIC_ISLANDS;
 
-  if (DoesNotSupportXNACK && EnableXNACK) {
+  // Disable XNACK on targets where it is not enabled by default unless it is
+  // explicitly requested.
+  if (!FS.contains("+xnack") && DoesNotSupportXNACK && EnableXNACK) {
     ToggleFeature(AMDGPU::FeatureXNACK);
     EnableXNACK = false;
   }


        


More information about the llvm-commits mailing list