diff --git a/clang/include/clang/Basic/Cuda.h b/clang/include/clang/Basic/Cuda.h --- a/clang/include/clang/Basic/Cuda.h +++ b/clang/include/clang/Basic/Cuda.h @@ -75,6 +75,7 @@ GFX906, GFX908, GFX909, + GFX90c, GFX1010, GFX1011, GFX1012, diff --git a/clang/lib/Basic/Cuda.cpp b/clang/lib/Basic/Cuda.cpp --- a/clang/lib/Basic/Cuda.cpp +++ b/clang/lib/Basic/Cuda.cpp @@ -87,7 +87,7 @@ GFX(805), // tongapro GFX(810), // stoney GFX(900), // vega, instinct - GFX(902), GFX(904), GFX(906), GFX(908), GFX(909), + GFX(902), GFX(904), GFX(906), GFX(908), GFX(909), GFX(90c), GFX(1010), GFX(1011), GFX(1012), GFX(1030), GFX(1031) // clang-format on }; diff --git a/clang/lib/Basic/Targets/AMDGPU.cpp b/clang/lib/Basic/Targets/AMDGPU.cpp --- a/clang/lib/Basic/Targets/AMDGPU.cpp +++ b/clang/lib/Basic/Targets/AMDGPU.cpp @@ -222,6 +222,7 @@ Features["dot1-insts"] = true; Features["dot2-insts"] = true; LLVM_FALLTHROUGH; + case GK_GFX90C: case GK_GFX909: case GK_GFX904: case GK_GFX902: diff --git a/clang/lib/Basic/Targets/NVPTX.cpp b/clang/lib/Basic/Targets/NVPTX.cpp --- a/clang/lib/Basic/Targets/NVPTX.cpp +++ b/clang/lib/Basic/Targets/NVPTX.cpp @@ -200,6 +200,7 @@ case CudaArch::GFX906: case CudaArch::GFX908: case CudaArch::GFX909: + case CudaArch::GFX90c: case CudaArch::GFX1010: case CudaArch::GFX1011: case CudaArch::GFX1012: diff --git a/clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp b/clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp --- a/clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp +++ b/clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp @@ -4640,6 +4640,7 @@ case CudaArch::GFX906: case CudaArch::GFX908: case CudaArch::GFX909: + case CudaArch::GFX90c: case CudaArch::GFX1010: case CudaArch::GFX1011: case CudaArch::GFX1012: @@ -4706,6 +4707,7 @@ case CudaArch::GFX906: case CudaArch::GFX908: case CudaArch::GFX909: + case CudaArch::GFX90c: case CudaArch::GFX1010: case CudaArch::GFX1011: case CudaArch::GFX1012: diff --git a/clang/test/CodeGenOpenCL/amdgpu-features.cl b/clang/test/CodeGenOpenCL/amdgpu-features.cl --- a/clang/test/CodeGenOpenCL/amdgpu-features.cl +++ b/clang/test/CodeGenOpenCL/amdgpu-features.cl @@ -12,6 +12,7 @@ // RUN: %clang_cc1 -triple amdgcn -target-cpu gfx906 -S -emit-llvm -o - %s | FileCheck --check-prefix=GFX906 %s // RUN: %clang_cc1 -triple amdgcn -target-cpu gfx908 -S -emit-llvm -o - %s | FileCheck --check-prefix=GFX908 %s // RUN: %clang_cc1 -triple amdgcn -target-cpu gfx909 -S -emit-llvm -o - %s | FileCheck --check-prefix=GFX909 %s +// RUN: %clang_cc1 -triple amdgcn -target-cpu gfx90c -S -emit-llvm -o - %s | FileCheck --check-prefix=GFX90C %s // RUN: %clang_cc1 -triple amdgcn -target-cpu gfx1010 -S -emit-llvm -o - %s | FileCheck --check-prefix=GFX1010 %s // RUN: %clang_cc1 -triple amdgcn -target-cpu gfx1011 -S -emit-llvm -o - %s | FileCheck --check-prefix=GFX1011 %s // RUN: %clang_cc1 -triple amdgcn -target-cpu gfx1012 -S -emit-llvm -o - %s | FileCheck --check-prefix=GFX1012 %s @@ -39,6 +40,7 @@ // GFX906: "target-features"="+16-bit-insts,+ci-insts,+dl-insts,+dot1-insts,+dot2-insts,+dpp,+flat-address-space,+gfx8-insts,+gfx9-insts,+s-memrealtime" // GFX908: "target-features"="+16-bit-insts,+ci-insts,+dl-insts,+dot1-insts,+dot2-insts,+dot3-insts,+dot4-insts,+dot5-insts,+dot6-insts,+dpp,+flat-address-space,+gfx8-insts,+gfx9-insts,+mai-insts,+s-memrealtime" // GFX909: "target-features"="+16-bit-insts,+ci-insts,+dpp,+flat-address-space,+gfx8-insts,+gfx9-insts,+s-memrealtime" +// GFX90C: "target-features"="+16-bit-insts,+ci-insts,+dpp,+flat-address-space,+gfx8-insts,+gfx9-insts,+s-memrealtime" // GFX1010: "target-features"="+16-bit-insts,+ci-insts,+dl-insts,+dpp,+flat-address-space,+gfx10-insts,+gfx8-insts,+gfx9-insts,+s-memrealtime" // GFX1011: "target-features"="+16-bit-insts,+ci-insts,+dl-insts,+dot1-insts,+dot2-insts,+dot5-insts,+dot6-insts,+dpp,+flat-address-space,+gfx10-insts,+gfx8-insts,+gfx9-insts,+s-memrealtime" // GFX1012: "target-features"="+16-bit-insts,+ci-insts,+dl-insts,+dot1-insts,+dot2-insts,+dot5-insts,+dot6-insts,+dpp,+flat-address-space,+gfx10-insts,+gfx8-insts,+gfx9-insts,+s-memrealtime" diff --git a/clang/test/Driver/amdgpu-macros.cl b/clang/test/Driver/amdgpu-macros.cl --- a/clang/test/Driver/amdgpu-macros.cl +++ b/clang/test/Driver/amdgpu-macros.cl @@ -181,6 +181,7 @@ // RUN: %clang -E -dM -target amdgcn -mcpu=gfx906 %s 2>&1 | FileCheck --check-prefixes=ARCH-GCN,GFX906 %s // RUN: %clang -E -dM -target amdgcn -mcpu=gfx908 %s 2>&1 | FileCheck --check-prefixes=ARCH-GCN,GFX908 %s // RUN: %clang -E -dM -target amdgcn -mcpu=gfx909 %s 2>&1 | FileCheck --check-prefixes=ARCH-GCN,GFX909 %s +// RUN: %clang -E -dM -target amdgcn -mcpu=gfx90c %s 2>&1 | FileCheck --check-prefixes=ARCH-GCN,GFX90C %s // RUN: %clang -E -dM -target amdgcn -mcpu=gfx1010 %s 2>&1 | FileCheck --check-prefixes=ARCH-GCN,GFX1010 %s // RUN: %clang -E -dM -target amdgcn -mcpu=gfx1011 %s 2>&1 | FileCheck --check-prefixes=ARCH-GCN,GFX1011 %s // RUN: %clang -E -dM -target amdgcn -mcpu=gfx1012 %s 2>&1 | FileCheck --check-prefixes=ARCH-GCN,GFX1012 %s @@ -208,6 +209,7 @@ // GFX906-DAG: #define FP_FAST_FMA 1 // GFX908-DAG: #define FP_FAST_FMA 1 // GFX909-DAG: #define FP_FAST_FMA 1 +// GFX90C-DAG: #define FP_FAST_FMA 1 // GFX1010-DAG: #define FP_FAST_FMA 1 // GFX1011-DAG: #define FP_FAST_FMA 1 // GFX1012-DAG: #define FP_FAST_FMA 1 @@ -235,6 +237,7 @@ // GFX906-DAG: #define FP_FAST_FMAF 1 // GFX908-DAG: #define FP_FAST_FMAF 1 // GFX909-DAG: #define FP_FAST_FMAF 1 +// GFX90C-DAG: #define FP_FAST_FMAF 1 // GFX1010-DAG: #define FP_FAST_FMAF 1 // GFX1011-DAG: #define FP_FAST_FMAF 1 // GFX1012-DAG: #define FP_FAST_FMAF 1 @@ -266,6 +269,7 @@ // GFX906-DAG: #define __HAS_FMAF__ 1 // GFX908-DAG: #define __HAS_FMAF__ 1 // GFX909-DAG: #define __HAS_FMAF__ 1 +// GFX90C-DAG: #define __HAS_FMAF__ 1 // GFX1010-DAG: #define __HAS_FMAF__ 1 // GFX1011-DAG: #define __HAS_FMAF__ 1 // GFX1012-DAG: #define __HAS_FMAF__ 1 @@ -293,6 +297,7 @@ // GFX906-DAG: #define __HAS_FP64__ 1 // GFX908-DAG: #define __HAS_FP64__ 1 // GFX909-DAG: #define __HAS_FP64__ 1 +// GFX90C-DAG: #define __HAS_FP64__ 1 // GFX1010-DAG: #define __HAS_FP64__ 1 // GFX1011-DAG: #define __HAS_FP64__ 1 // GFX1012-DAG: #define __HAS_FP64__ 1 @@ -320,6 +325,7 @@ // GFX906-DAG: #define __HAS_LDEXPF__ 1 // GFX908-DAG: #define __HAS_LDEXPF__ 1 // GFX909-DAG: #define __HAS_LDEXPF__ 1 +// GFX90C-DAG: #define __HAS_LDEXPF__ 1 // GFX1010-DAG: #define __HAS_LDEXPF__ 1 // GFX1011-DAG: #define __HAS_LDEXPF__ 1 // GFX1012-DAG: #define __HAS_LDEXPF__ 1 @@ -347,6 +353,7 @@ // GFX906-DAG: #define __gfx906__ 1 // GFX908-DAG: #define __gfx908__ 1 // GFX909-DAG: #define __gfx909__ 1 +// GFX90C-DAG: #define __gfx90c__ 1 // GFX1010-DAG: #define __gfx1010__ 1 // GFX1011-DAG: #define __gfx1011__ 1 // GFX1012-DAG: #define __gfx1012__ 1 @@ -374,6 +381,7 @@ // GFX906-DAG: #define __amdgcn_processor__ "gfx906" // GFX908-DAG: #define __amdgcn_processor__ "gfx908" // GFX909-DAG: #define __amdgcn_processor__ "gfx909" +// GFX90C-DAG: #define __amdgcn_processor__ "gfx90c" // GFX1010-DAG: #define __amdgcn_processor__ "gfx1010" // GFX1011-DAG: #define __amdgcn_processor__ "gfx1011" // GFX1012-DAG: #define __amdgcn_processor__ "gfx1012" @@ -401,6 +409,7 @@ // GFX906-DAG: #define __AMDGCN_WAVEFRONT_SIZE 64 // GFX908-DAG: #define __AMDGCN_WAVEFRONT_SIZE 64 // GFX909-DAG: #define __AMDGCN_WAVEFRONT_SIZE 64 +// GFX90C-DAG: #define __AMDGCN_WAVEFRONT_SIZE 64 // GFX1010-DAG: #define __AMDGCN_WAVEFRONT_SIZE 32 // GFX1011-DAG: #define __AMDGCN_WAVEFRONT_SIZE 32 // GFX1012-DAG: #define __AMDGCN_WAVEFRONT_SIZE 32 diff --git a/clang/test/Driver/amdgpu-mcpu.cl b/clang/test/Driver/amdgpu-mcpu.cl --- a/clang/test/Driver/amdgpu-mcpu.cl +++ b/clang/test/Driver/amdgpu-mcpu.cl @@ -90,6 +90,7 @@ // RUN: %clang -### -target amdgcn -mcpu=gfx906 %s 2>&1 | FileCheck --check-prefix=GFX906 %s // RUN: %clang -### -target amdgcn -mcpu=gfx908 %s 2>&1 | FileCheck --check-prefix=GFX908 %s // RUN: %clang -### -target amdgcn -mcpu=gfx909 %s 2>&1 | FileCheck --check-prefix=GFX909 %s +// RUN: %clang -### -target amdgcn -mcpu=gfx90c %s 2>&1 | FileCheck --check-prefix=GFX90C %s // RUN: %clang -### -target amdgcn -mcpu=gfx1010 %s 2>&1 | FileCheck --check-prefix=GFX1010 %s // RUN: %clang -### -target amdgcn -mcpu=gfx1011 %s 2>&1 | FileCheck --check-prefix=GFX1011 %s // RUN: %clang -### -target amdgcn -mcpu=gfx1012 %s 2>&1 | FileCheck --check-prefix=GFX1012 %s @@ -118,6 +119,7 @@ // GFX906: "-target-cpu" "gfx906" // GFX908: "-target-cpu" "gfx908" // GFX909: "-target-cpu" "gfx909" +// GFX90C: "-target-cpu" "gfx90c" // GFX1010: "-target-cpu" "gfx1010" // GFX1011: "-target-cpu" "gfx1011" // GFX1012: "-target-cpu" "gfx1012" diff --git a/llvm/docs/AMDGPUUsage.rst b/llvm/docs/AMDGPUUsage.rst --- a/llvm/docs/AMDGPUUsage.rst +++ b/llvm/docs/AMDGPUUsage.rst @@ -257,6 +257,13 @@ Add product names. + ``gfx90c`` ``amdgcn`` APU - xnack *TBA* + [off] + .. TODO:: + + Add product + names. + **GCN GFX10** [AMD-GCN-GFX10]_ ----------------------------------------------------------------------------------------------------------- ``gfx1010`` ``amdgcn`` dGPU - xnack - Radeon RX 5700 @@ -848,7 +855,7 @@ ``EF_AMDGPU_MACH_AMDGCN_GFX906`` 0x02f ``gfx906`` ``EF_AMDGPU_MACH_AMDGCN_GFX908`` 0x030 ``gfx908`` ``EF_AMDGPU_MACH_AMDGCN_GFX909`` 0x031 ``gfx909`` - *reserved* 0x032 Reserved. + ``EF_AMDGPU_MACH_AMDGCN_GFX90C`` 0x032 ``gfx90c`` ``EF_AMDGPU_MACH_AMDGCN_GFX1010`` 0x033 ``gfx1010`` ``EF_AMDGPU_MACH_AMDGCN_GFX1011`` 0x034 ``gfx1011`` ``EF_AMDGPU_MACH_AMDGCN_GFX1012`` 0x035 ``gfx1012`` diff --git a/llvm/include/llvm/BinaryFormat/ELF.h b/llvm/include/llvm/BinaryFormat/ELF.h --- a/llvm/include/llvm/BinaryFormat/ELF.h +++ b/llvm/include/llvm/BinaryFormat/ELF.h @@ -713,7 +713,7 @@ EF_AMDGPU_MACH_AMDGCN_GFX906 = 0x02f, EF_AMDGPU_MACH_AMDGCN_GFX908 = 0x030, EF_AMDGPU_MACH_AMDGCN_GFX909 = 0x031, - EF_AMDGPU_MACH_AMDGCN_RESERVED_0X32 = 0x032, + EF_AMDGPU_MACH_AMDGCN_GFX90C = 0x032, EF_AMDGPU_MACH_AMDGCN_GFX1010 = 0x033, EF_AMDGPU_MACH_AMDGCN_GFX1011 = 0x034, EF_AMDGPU_MACH_AMDGCN_GFX1012 = 0x035, diff --git a/llvm/include/llvm/Support/TargetParser.h b/llvm/include/llvm/Support/TargetParser.h --- a/llvm/include/llvm/Support/TargetParser.h +++ b/llvm/include/llvm/Support/TargetParser.h @@ -83,6 +83,7 @@ GK_GFX906 = 63, GK_GFX908 = 64, GK_GFX909 = 65, + GK_GFX90C = 66, GK_GFX1010 = 71, GK_GFX1011 = 72, diff --git a/llvm/lib/Object/ELFObjectFile.cpp b/llvm/lib/Object/ELFObjectFile.cpp --- a/llvm/lib/Object/ELFObjectFile.cpp +++ b/llvm/lib/Object/ELFObjectFile.cpp @@ -456,6 +456,8 @@ return "gfx908"; case ELF::EF_AMDGPU_MACH_AMDGCN_GFX909: return "gfx909"; + case ELF::EF_AMDGPU_MACH_AMDGCN_GFX90C: + return "gfx90c"; // AMDGCN GFX10. case ELF::EF_AMDGPU_MACH_AMDGCN_GFX1010: diff --git a/llvm/lib/ObjectYAML/ELFYAML.cpp b/llvm/lib/ObjectYAML/ELFYAML.cpp --- a/llvm/lib/ObjectYAML/ELFYAML.cpp +++ b/llvm/lib/ObjectYAML/ELFYAML.cpp @@ -439,6 +439,7 @@ BCaseMask(EF_AMDGPU_MACH_AMDGCN_GFX906, EF_AMDGPU_MACH); BCaseMask(EF_AMDGPU_MACH_AMDGCN_GFX908, EF_AMDGPU_MACH); BCaseMask(EF_AMDGPU_MACH_AMDGCN_GFX909, EF_AMDGPU_MACH); + BCaseMask(EF_AMDGPU_MACH_AMDGCN_GFX90C, EF_AMDGPU_MACH); BCaseMask(EF_AMDGPU_MACH_AMDGCN_GFX1010, EF_AMDGPU_MACH); BCaseMask(EF_AMDGPU_MACH_AMDGCN_GFX1011, EF_AMDGPU_MACH); BCaseMask(EF_AMDGPU_MACH_AMDGCN_GFX1012, EF_AMDGPU_MACH); diff --git a/llvm/lib/Support/TargetParser.cpp b/llvm/lib/Support/TargetParser.cpp --- a/llvm/lib/Support/TargetParser.cpp +++ b/llvm/lib/Support/TargetParser.cpp @@ -104,6 +104,7 @@ {{"gfx906"}, {"gfx906"}, GK_GFX906, FEATURE_FAST_FMA_F32|FEATURE_FAST_DENORMAL_F32|FEATURE_XNACK|FEATURE_SRAM_ECC}, {{"gfx908"}, {"gfx908"}, GK_GFX908, FEATURE_FAST_FMA_F32|FEATURE_FAST_DENORMAL_F32|FEATURE_XNACK|FEATURE_SRAM_ECC}, {{"gfx909"}, {"gfx909"}, GK_GFX909, FEATURE_FAST_FMA_F32|FEATURE_FAST_DENORMAL_F32|FEATURE_XNACK}, + {{"gfx90c"}, {"gfx90c"}, GK_GFX90C, FEATURE_FAST_FMA_F32|FEATURE_FAST_DENORMAL_F32|FEATURE_XNACK}, {{"gfx1010"}, {"gfx1010"}, GK_GFX1010, FEATURE_FAST_FMA_F32|FEATURE_FAST_DENORMAL_F32|FEATURE_WAVE32|FEATURE_XNACK}, {{"gfx1011"}, {"gfx1011"}, GK_GFX1011, FEATURE_FAST_FMA_F32|FEATURE_FAST_DENORMAL_F32|FEATURE_WAVE32|FEATURE_XNACK}, {{"gfx1012"}, {"gfx1012"}, GK_GFX1012, FEATURE_FAST_FMA_F32|FEATURE_FAST_DENORMAL_F32|FEATURE_WAVE32|FEATURE_XNACK}, @@ -211,6 +212,7 @@ case GK_GFX906: return {9, 0, 6}; case GK_GFX908: return {9, 0, 8}; case GK_GFX909: return {9, 0, 9}; + case GK_GFX90C: return {9, 0, 12}; case GK_GFX1010: return {10, 1, 0}; case GK_GFX1011: return {10, 1, 1}; case GK_GFX1012: return {10, 1, 2}; diff --git a/llvm/lib/Target/AMDGPU/AMDGPU.td b/llvm/lib/Target/AMDGPU/AMDGPU.td --- a/llvm/lib/Target/AMDGPU/AMDGPU.td +++ b/llvm/lib/Target/AMDGPU/AMDGPU.td @@ -886,6 +886,13 @@ FeatureXNACK, FeatureImageGather4D16Bug]>; +def FeatureISAVersion9_0_C : FeatureSet< + [FeatureGFX9, + FeatureMadMixInsts, + FeatureLDSBankCount32, + FeatureXNACK, + FeatureImageGather4D16Bug]>; + // TODO: Organize more features into groups. def FeatureGroup { // Bugs present on gfx10.1. diff --git a/llvm/lib/Target/AMDGPU/GCNProcessors.td b/llvm/lib/Target/AMDGPU/GCNProcessors.td --- a/llvm/lib/Target/AMDGPU/GCNProcessors.td +++ b/llvm/lib/Target/AMDGPU/GCNProcessors.td @@ -184,6 +184,10 @@ FeatureISAVersion9_0_9.Features >; +def : ProcessorModel<"gfx90c", SIQuarterSpeedModel, + FeatureISAVersion9_0_C.Features +>; + //===----------------------------------------------------------------------===// // GCN GFX10. //===----------------------------------------------------------------------===// diff --git a/llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUTargetStreamer.cpp b/llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUTargetStreamer.cpp --- a/llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUTargetStreamer.cpp +++ b/llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUTargetStreamer.cpp @@ -97,6 +97,7 @@ case ELF::EF_AMDGPU_MACH_AMDGCN_GFX906: AK = GK_GFX906; break; case ELF::EF_AMDGPU_MACH_AMDGCN_GFX908: AK = GK_GFX908; break; case ELF::EF_AMDGPU_MACH_AMDGCN_GFX909: AK = GK_GFX909; break; + case ELF::EF_AMDGPU_MACH_AMDGCN_GFX90C: AK = GK_GFX90C; break; case ELF::EF_AMDGPU_MACH_AMDGCN_GFX1010: AK = GK_GFX1010; break; case ELF::EF_AMDGPU_MACH_AMDGCN_GFX1011: AK = GK_GFX1011; break; case ELF::EF_AMDGPU_MACH_AMDGCN_GFX1012: AK = GK_GFX1012; break; @@ -154,6 +155,7 @@ case GK_GFX906: return ELF::EF_AMDGPU_MACH_AMDGCN_GFX906; case GK_GFX908: return ELF::EF_AMDGPU_MACH_AMDGCN_GFX908; case GK_GFX909: return ELF::EF_AMDGPU_MACH_AMDGCN_GFX909; + case GK_GFX90C: return ELF::EF_AMDGPU_MACH_AMDGCN_GFX90C; case GK_GFX1010: return ELF::EF_AMDGPU_MACH_AMDGCN_GFX1010; case GK_GFX1011: return ELF::EF_AMDGPU_MACH_AMDGCN_GFX1011; case GK_GFX1012: return ELF::EF_AMDGPU_MACH_AMDGCN_GFX1012; diff --git a/llvm/test/CodeGen/AMDGPU/elf-header-flags-mach.ll b/llvm/test/CodeGen/AMDGPU/elf-header-flags-mach.ll --- a/llvm/test/CodeGen/AMDGPU/elf-header-flags-mach.ll +++ b/llvm/test/CodeGen/AMDGPU/elf-header-flags-mach.ll @@ -52,6 +52,7 @@ ; 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=gfx908 < %s | llvm-readobj -file-headers - | FileCheck --check-prefixes=ALL,ARCH-GCN,GFX908 %s ; RUN: llc -filetype=obj -march=amdgcn -mcpu=gfx909 < %s | llvm-readobj -file-headers - | FileCheck --check-prefixes=ALL,ARCH-GCN,GFX909 %s +; RUN: llc -filetype=obj -march=amdgcn -mcpu=gfx90c < %s | llvm-readobj -file-headers - | FileCheck --check-prefixes=ALL,ARCH-GCN,GFX90C %s ; RUN: llc -filetype=obj -march=amdgcn -mcpu=gfx1010 < %s | llvm-readobj -file-headers - | FileCheck --check-prefixes=ALL,ARCH-GCN,GFX1010 %s ; RUN: llc -filetype=obj -march=amdgcn -mcpu=gfx1011 < %s | llvm-readobj -file-headers - | FileCheck --check-prefixes=ALL,ARCH-GCN,GFX1011 %s ; RUN: llc -filetype=obj -march=amdgcn -mcpu=gfx1012 < %s | llvm-readobj -file-headers - | FileCheck --check-prefixes=ALL,ARCH-GCN,GFX1012 %s @@ -103,6 +104,7 @@ ; GFX908: EF_AMDGPU_MACH_AMDGCN_GFX908 (0x30) ; GFX908-NEXT: EF_AMDGPU_SRAM_ECC (0x200) ; GFX909: EF_AMDGPU_MACH_AMDGCN_GFX909 (0x31) +; GFX90C: EF_AMDGPU_MACH_AMDGCN_GFX90C (0x32) ; GFX1010: EF_AMDGPU_MACH_AMDGCN_GFX1010 (0x33) ; GFX1011: EF_AMDGPU_MACH_AMDGCN_GFX1011 (0x34) ; GFX1012: EF_AMDGPU_MACH_AMDGCN_GFX1012 (0x35) diff --git a/llvm/test/Object/AMDGPU/elf-header-flags-mach.yaml b/llvm/test/Object/AMDGPU/elf-header-flags-mach.yaml --- a/llvm/test/Object/AMDGPU/elf-header-flags-mach.yaml +++ b/llvm/test/Object/AMDGPU/elf-header-flags-mach.yaml @@ -166,6 +166,10 @@ # RUN: llvm-readobj -s -file-headers %t.o.42 | FileCheck --check-prefixes=ELF-ALL,ELF-GFX1032 %s # RUN: obj2yaml %t.o.42 | FileCheck --check-prefixes=YAML-GFX1032 %s +# RUN: yaml2obj --docnum=43 %s -o %t.o.43 +# RUN: llvm-readobj -s -file-headers %t.o.43 | FileCheck --check-prefixes=ELF-ALL,ELF-GFX90C %s +# RUN: obj2yaml %t.o.43 | FileCheck --check-prefixes=YAML-GFX90C %s + # ELF-ALL: Flags [ # ELF-R600: EF_AMDGPU_MACH_R600_R600 (0x1) # ELF-R630: EF_AMDGPU_MACH_R600_R630 (0x2) @@ -203,6 +207,7 @@ # ELF-GFX906: EF_AMDGPU_MACH_AMDGCN_GFX906 (0x2F) # ELF-GFX908: EF_AMDGPU_MACH_AMDGCN_GFX908 (0x30) # ELF-GFX909: EF_AMDGPU_MACH_AMDGCN_GFX909 (0x31) +# ELF-GFX90C: EF_AMDGPU_MACH_AMDGCN_GFX90C (0x32) # ELF-GFX1010: EF_AMDGPU_MACH_AMDGCN_GFX1010 (0x33) # ELF-GFX1011: EF_AMDGPU_MACH_AMDGCN_GFX1011 (0x34) # ELF-GFX1012: EF_AMDGPU_MACH_AMDGCN_GFX1012 (0x35) @@ -247,6 +252,7 @@ # YAML-GFX906: Flags: [ EF_AMDGPU_MACH_AMDGCN_GFX906 ] # YAML-GFX908: Flags: [ EF_AMDGPU_MACH_AMDGCN_GFX908 ] # YAML-GFX909: Flags: [ EF_AMDGPU_MACH_AMDGCN_GFX909 ] +# YAML-GFX90C: Flags: [ EF_AMDGPU_MACH_AMDGCN_GFX90C ] # YAML-GFX1010: Flags: [ EF_AMDGPU_MACH_AMDGCN_GFX1010 ] # YAML-GFX1011: Flags: [ EF_AMDGPU_MACH_AMDGCN_GFX1011 ] # YAML-GFX1012: Flags: [ EF_AMDGPU_MACH_AMDGCN_GFX1012 ] @@ -715,3 +721,14 @@ Machine: EM_AMDGPU Flags: [ EF_AMDGPU_MACH_AMDGCN_GFX1032 ] ... + +# Doc43 +--- !ELF +FileHeader: + Class: ELFCLASS64 + Data: ELFDATA2LSB + OSABI: ELFOSABI_NONE + Type: ET_REL + Machine: EM_AMDGPU + Flags: [ EF_AMDGPU_MACH_AMDGCN_GFX90C ] +... diff --git a/llvm/tools/llvm-readobj/ELFDumper.cpp b/llvm/tools/llvm-readobj/ELFDumper.cpp --- a/llvm/tools/llvm-readobj/ELFDumper.cpp +++ b/llvm/tools/llvm-readobj/ELFDumper.cpp @@ -1779,6 +1779,7 @@ LLVM_READOBJ_ENUM_ENT(ELF, EF_AMDGPU_MACH_AMDGCN_GFX906), LLVM_READOBJ_ENUM_ENT(ELF, EF_AMDGPU_MACH_AMDGCN_GFX908), LLVM_READOBJ_ENUM_ENT(ELF, EF_AMDGPU_MACH_AMDGCN_GFX909), + LLVM_READOBJ_ENUM_ENT(ELF, EF_AMDGPU_MACH_AMDGCN_GFX90C), LLVM_READOBJ_ENUM_ENT(ELF, EF_AMDGPU_MACH_AMDGCN_GFX1010), LLVM_READOBJ_ENUM_ENT(ELF, EF_AMDGPU_MACH_AMDGCN_GFX1011), LLVM_READOBJ_ENUM_ENT(ELF, EF_AMDGPU_MACH_AMDGCN_GFX1012),