Index: llvm/trunk/docs/AMDGPUUsage.rst =================================================================== --- llvm/trunk/docs/AMDGPUUsage.rst +++ llvm/trunk/docs/AMDGPUUsage.rst @@ -210,6 +210,11 @@ .. TODO Add product names. + ``gfx909`` ``amdgcn`` APU - xnack *TBA* (Raven Ridge 2) + [on] + .. TODO + Add product + names. =========== =============== ============ ===== ========= ======= ================== .. _amdgpu-target-features: @@ -589,6 +594,7 @@ ``EF_AMDGPU_MACH_AMDGCN_GFX904`` 0x02e ``gfx904`` ``EF_AMDGPU_MACH_AMDGCN_GFX906`` 0x02f ``gfx906`` *reserved* 0x030 Reserved. + ``EF_AMDGPU_MACH_AMDGCN_GFX909`` 0x031 ``gfx909`` ================================= ========== ============================= Sections Index: llvm/trunk/include/llvm/BinaryFormat/ELF.h =================================================================== --- llvm/trunk/include/llvm/BinaryFormat/ELF.h +++ llvm/trunk/include/llvm/BinaryFormat/ELF.h @@ -701,6 +701,7 @@ EF_AMDGPU_MACH_AMDGCN_GFX902 = 0x02d, EF_AMDGPU_MACH_AMDGCN_GFX904 = 0x02e, EF_AMDGPU_MACH_AMDGCN_GFX906 = 0x02f, + EF_AMDGPU_MACH_AMDGCN_GFX909 = 0x031, // Reserved for AMDGCN-based processors. EF_AMDGPU_MACH_AMDGCN_RESERVED0 = 0x027, @@ -708,7 +709,7 @@ // First/last AMDGCN-based processors. EF_AMDGPU_MACH_AMDGCN_FIRST = EF_AMDGPU_MACH_AMDGCN_GFX600, - EF_AMDGPU_MACH_AMDGCN_LAST = EF_AMDGPU_MACH_AMDGCN_GFX906, + EF_AMDGPU_MACH_AMDGCN_LAST = EF_AMDGPU_MACH_AMDGCN_GFX909, // Indicates if the xnack target feature is enabled for all code contained in // the object. Index: llvm/trunk/include/llvm/Support/TargetParser.h =================================================================== --- llvm/trunk/include/llvm/Support/TargetParser.h +++ llvm/trunk/include/llvm/Support/TargetParser.h @@ -317,9 +317,10 @@ GK_GFX902 = 61, GK_GFX904 = 62, GK_GFX906 = 63, + GK_GFX909 = 65, GK_AMDGCN_FIRST = GK_GFX600, - GK_AMDGCN_LAST = GK_GFX906, + GK_AMDGCN_LAST = GK_GFX909, }; /// Instruction set architecture version. Index: llvm/trunk/lib/ObjectYAML/ELFYAML.cpp =================================================================== --- llvm/trunk/lib/ObjectYAML/ELFYAML.cpp +++ llvm/trunk/lib/ObjectYAML/ELFYAML.cpp @@ -402,6 +402,7 @@ BCaseMask(EF_AMDGPU_MACH_AMDGCN_GFX902, EF_AMDGPU_MACH); BCaseMask(EF_AMDGPU_MACH_AMDGCN_GFX904, EF_AMDGPU_MACH); BCaseMask(EF_AMDGPU_MACH_AMDGCN_GFX906, EF_AMDGPU_MACH); + BCaseMask(EF_AMDGPU_MACH_AMDGCN_GFX909, EF_AMDGPU_MACH); BCase(EF_AMDGPU_XNACK); break; case ELF::EM_X86_64: Index: llvm/trunk/lib/Support/TargetParser.cpp =================================================================== --- llvm/trunk/lib/Support/TargetParser.cpp +++ llvm/trunk/lib/Support/TargetParser.cpp @@ -995,7 +995,7 @@ // This table should be sorted by the value of GPUKind // Don't bother listing the implicitly true features -constexpr GPUInfo AMDGCNGPUs[32] = { +constexpr GPUInfo AMDGCNGPUs[33] = { // Name Canonical Kind Features // Name {{"gfx600"}, {"gfx600"}, GK_GFX600, FEATURE_FAST_FMA_F32}, @@ -1030,6 +1030,7 @@ {{"gfx902"}, {"gfx902"}, GK_GFX902, FEATURE_FAST_FMA_F32|FEATURE_FAST_DENORMAL_F32}, {{"gfx904"}, {"gfx904"}, GK_GFX904, FEATURE_FAST_FMA_F32|FEATURE_FAST_DENORMAL_F32}, {{"gfx906"}, {"gfx906"}, GK_GFX906, FEATURE_FAST_FMA_F32|FEATURE_FAST_DENORMAL_F32}, + {{"gfx909"}, {"gfx909"}, GK_GFX909, FEATURE_FAST_FMA_F32|FEATURE_FAST_DENORMAL_F32}, }; const GPUInfo *getArchEntry(AMDGPU::GPUKind AK, ArrayRef Table) { @@ -1124,6 +1125,7 @@ case GK_GFX902: return {9, 0, 2}; case GK_GFX904: return {9, 0, 4}; case GK_GFX906: return {9, 0, 6}; + case GK_GFX909: return {9, 0, 9}; default: return {0, 0, 0}; } } Index: llvm/trunk/lib/Target/AMDGPU/AMDGPU.td =================================================================== --- llvm/trunk/lib/Target/AMDGPU/AMDGPU.td +++ llvm/trunk/lib/Target/AMDGPU/AMDGPU.td @@ -553,6 +553,13 @@ FeatureLDSBankCount32, FeatureDLInsts]>; +def FeatureISAVersion9_0_9 : SubtargetFeatureISAVersion <9,0,9, + [FeatureGFX9, + FeatureMadMixInsts, + FeatureLDSBankCount32, + FeatureXNACK, + FeatureD16PreservesUnusedBits]>; + //===----------------------------------------------------------------------===// // Debugger related subtarget features. //===----------------------------------------------------------------------===// Index: llvm/trunk/lib/Target/AMDGPU/AMDGPUSubtarget.h =================================================================== --- llvm/trunk/lib/Target/AMDGPU/AMDGPUSubtarget.h +++ llvm/trunk/lib/Target/AMDGPU/AMDGPUSubtarget.h @@ -263,6 +263,7 @@ ISAVersion9_0_2, ISAVersion9_0_4, ISAVersion9_0_6, + ISAVersion9_0_9, }; enum TrapHandlerAbi { Index: llvm/trunk/lib/Target/AMDGPU/GCNProcessors.td =================================================================== --- llvm/trunk/lib/Target/AMDGPU/GCNProcessors.td +++ llvm/trunk/lib/Target/AMDGPU/GCNProcessors.td @@ -156,3 +156,8 @@ def : ProcessorModel<"gfx906", SIQuarterSpeedModel, [FeatureISAVersion9_0_6] >; + +def : ProcessorModel<"gfx909", SIQuarterSpeedModel, + [FeatureISAVersion9_0_9] +>; + Index: llvm/trunk/lib/Target/AMDGPU/MCTargetDesc/AMDGPUTargetStreamer.cpp =================================================================== --- llvm/trunk/lib/Target/AMDGPU/MCTargetDesc/AMDGPUTargetStreamer.cpp +++ llvm/trunk/lib/Target/AMDGPU/MCTargetDesc/AMDGPUTargetStreamer.cpp @@ -83,6 +83,7 @@ case ELF::EF_AMDGPU_MACH_AMDGCN_GFX902: AK = GK_GFX902; break; case ELF::EF_AMDGPU_MACH_AMDGCN_GFX904: AK = GK_GFX904; break; case ELF::EF_AMDGPU_MACH_AMDGCN_GFX906: AK = GK_GFX906; break; + case ELF::EF_AMDGPU_MACH_AMDGCN_GFX909: AK = GK_GFX909; break; case ELF::EF_AMDGPU_MACH_NONE: AK = GK_NONE; break; } @@ -129,6 +130,7 @@ case GK_GFX902: return ELF::EF_AMDGPU_MACH_AMDGCN_GFX902; case GK_GFX904: return ELF::EF_AMDGPU_MACH_AMDGCN_GFX904; case GK_GFX906: return ELF::EF_AMDGPU_MACH_AMDGCN_GFX906; + case GK_GFX909: return ELF::EF_AMDGPU_MACH_AMDGCN_GFX909; case GK_NONE: return ELF::EF_AMDGPU_MACH_NONE; } Index: llvm/trunk/test/CodeGen/AMDGPU/elf-header-flags-mach.ll =================================================================== --- llvm/trunk/test/CodeGen/AMDGPU/elf-header-flags-mach.ll +++ llvm/trunk/test/CodeGen/AMDGPU/elf-header-flags-mach.ll @@ -46,6 +46,7 @@ ; RUN: llc -filetype=obj -march=amdgcn -mcpu=gfx902 < %s | llvm-readobj -file-headers - | FileCheck --check-prefixes=ALL,ARCH-GCN,GFX902 %s ; RUN: llc -filetype=obj -march=amdgcn -mcpu=gfx904 < %s | llvm-readobj -file-headers - | FileCheck --check-prefixes=ALL,ARCH-GCN,GFX904 %s ; RUN: llc -filetype=obj -march=amdgcn -mcpu=gfx906 < %s | llvm-readobj -file-headers - | FileCheck --check-prefixes=ALL,ARCH-GCN,GFX906 %s +; RUN: llc -filetype=obj -march=amdgcn -mcpu=gfx909 < %s | llvm-readobj -file-headers - | FileCheck --check-prefixes=ALL,ARCH-GCN,GFX909 %s ; ARCH-R600: Arch: r600 ; ARCH-GCN: Arch: amdgcn @@ -85,6 +86,7 @@ ; GFX902-NEXT: EF_AMDGPU_XNACK (0x100) ; GFX904: EF_AMDGPU_MACH_AMDGCN_GFX904 (0x2E) ; GFX906: EF_AMDGPU_MACH_AMDGCN_GFX906 (0x2F) +; GFX909: EF_AMDGPU_MACH_AMDGCN_GFX909 (0x31) ; ALL: ] define amdgpu_kernel void @elf_header() { Index: llvm/trunk/test/CodeGen/AMDGPU/hsa-note-no-func.ll =================================================================== --- llvm/trunk/test/CodeGen/AMDGPU/hsa-note-no-func.ll +++ llvm/trunk/test/CodeGen/AMDGPU/hsa-note-no-func.ll @@ -23,6 +23,7 @@ ; RUN: llc < %s -mtriple=amdgcn--amdhsa -mcpu=gfx902 | FileCheck --check-prefix=HSA --check-prefix=HSA-GFX902 %s ; RUN: llc < %s -mtriple=amdgcn--amdhsa -mcpu=gfx904 | FileCheck --check-prefix=HSA --check-prefix=HSA-GFX904 %s ; RUN: llc < %s -mtriple=amdgcn--amdhsa -mcpu=gfx906 | FileCheck --check-prefix=HSA --check-prefix=HSA-GFX906 %s +; RUN: llc < %s -mtriple=amdgcn--amdhsa -mcpu=gfx909 | FileCheck --check-prefix=HSA --check-prefix=HSA-GFX909 %s ; HSA: .hsa_code_object_version 2,1 ; HSA-SI600: .hsa_code_object_isa 6,0,0,"AMD","AMDGPU" @@ -40,3 +41,4 @@ ; HSA-GFX902: .hsa_code_object_isa 9,0,2,"AMD","AMDGPU" ; HSA-GFX904: .hsa_code_object_isa 9,0,4,"AMD","AMDGPU" ; HSA-GFX906: .hsa_code_object_isa 9,0,6,"AMD","AMDGPU" +; HSA-GFX909: .hsa_code_object_isa 9,0,9,"AMD","AMDGPU" Index: llvm/trunk/test/Object/AMDGPU/elf-header-flags-mach.yaml =================================================================== --- llvm/trunk/test/Object/AMDGPU/elf-header-flags-mach.yaml +++ llvm/trunk/test/Object/AMDGPU/elf-header-flags-mach.yaml @@ -91,6 +91,9 @@ # RUN: yaml2obj -docnum=31 %s > %t.o.31 # RUN: llvm-readobj -s -file-headers %t.o.31 | FileCheck --check-prefixes=ELF-ALL,ELF-GFX906 %s # RUN: obj2yaml %t.o.31 | FileCheck --check-prefixes=YAML-GFX906 %s +# RUN: yaml2obj -docnum=32 %s > %t.o.32 +# RUN: llvm-readobj -s -file-headers %t.o.32 | FileCheck --check-prefixes=ELF-ALL,ELF-GFX909 %s +# RUN: obj2yaml %t.o.32 | FileCheck --check-prefixes=YAML-GFX909 %s # ELF-ALL: Flags [ @@ -125,6 +128,7 @@ # ELF-GFX902: EF_AMDGPU_MACH_AMDGCN_GFX902 (0x2D) # ELF-GFX904: EF_AMDGPU_MACH_AMDGCN_GFX904 (0x2E) # ELF-GFX906: EF_AMDGPU_MACH_AMDGCN_GFX906 (0x2F) +# ELF-GFX909: EF_AMDGPU_MACH_AMDGCN_GFX909 (0x31) # ELF-ALL: ] # YAML-R600: Flags: [ EF_AMDGPU_MACH_R600_R600 ] @@ -158,6 +162,7 @@ # YAML-GFX902: Flags: [ EF_AMDGPU_MACH_AMDGCN_GFX902 ] # YAML-GFX904: Flags: [ EF_AMDGPU_MACH_AMDGCN_GFX904 ] # YAML-GFX906: Flags: [ EF_AMDGPU_MACH_AMDGCN_GFX906 ] +# YAML-GFX909: Flags: [ EF_AMDGPU_MACH_AMDGCN_GFX909 ] # Doc1 --- !ELF @@ -499,3 +504,14 @@ Machine: EM_AMDGPU Flags: [ EF_AMDGPU_MACH_AMDGCN_GFX906 ] ... + +# Doc32 +--- !ELF +FileHeader: + Class: ELFCLASS64 + Data: ELFDATA2LSB + OSABI: ELFOSABI_NONE + Type: ET_REL + Machine: EM_AMDGPU + Flags: [ EF_AMDGPU_MACH_AMDGCN_GFX909 ] +... Index: llvm/trunk/tools/llvm-readobj/ELFDumper.cpp =================================================================== --- llvm/trunk/tools/llvm-readobj/ELFDumper.cpp +++ llvm/trunk/tools/llvm-readobj/ELFDumper.cpp @@ -1325,6 +1325,7 @@ LLVM_READOBJ_ENUM_ENT(ELF, EF_AMDGPU_MACH_AMDGCN_GFX902), LLVM_READOBJ_ENUM_ENT(ELF, EF_AMDGPU_MACH_AMDGCN_GFX904), LLVM_READOBJ_ENUM_ENT(ELF, EF_AMDGPU_MACH_AMDGCN_GFX906), + LLVM_READOBJ_ENUM_ENT(ELF, EF_AMDGPU_MACH_AMDGCN_GFX909), LLVM_READOBJ_ENUM_ENT(ELF, EF_AMDGPU_XNACK) };