Index: llvm/docs/AMDGPUUsage.rst =================================================================== --- llvm/docs/AMDGPUUsage.rst +++ llvm/docs/AMDGPUUsage.rst @@ -1387,6 +1387,7 @@ ``AMD:AMDGPU:9:0:5`` ``gfx904:xnack+`` ``AMD:AMDGPU:9:0:6`` ``gfx906:sramecc-:xnack-`` ``AMD:AMDGPU:9:0:7`` ``gfx906:sramecc-:xnack+`` + ``AMD:AMDGPU:9:0:C`` ``gfx90c:xnack-`` ==================== ========================== .. _amdgpu-note-records-v3-v4: Index: llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp =================================================================== --- llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp +++ llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp @@ -438,7 +438,13 @@ } else if (Processor == "gfx906") { if (isXnackOnOrAny()) Processor = "gfx907"; - } else { + } else if (Processor == "gfx90c") { + if (isXnackOnOrAny()) + report_fatal_error( + "AMD GPU code object V2 does not support processor " + Processor + + " with XNACK being ON or ANY"); + } + else { report_fatal_error( "AMD GPU code object V2 does not support processor " + Processor); } Index: llvm/test/CodeGen/AMDGPU/tid-code-object-v2-backwards-compatibility.ll =================================================================== --- /dev/null +++ llvm/test/CodeGen/AMDGPU/tid-code-object-v2-backwards-compatibility.ll @@ -0,0 +1,5 @@ +; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx90c -mattr=-xnack --amdhsa-code-object-version=2 < %s 2>&1 | FileCheck --check-prefix=GFX90C-VALID %s +; RUN: not --crash llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx90c --amdhsa-code-object-version=2 < %s 2>&1 | FileCheck --check-prefix=GFX90C-ERROR %s + +; GFX90C-VALID: .amd_amdgpu_isa "amdgcn-amd-amdhsa--gfx90c" +; GFX90C-ERROR: LLVM ERROR: AMD GPU code object V2 does not support processor gfx90c with XNACK being ON or ANY