Skip to content

Commit 8406958

Browse files
committed
[AMDGPU] Add gfx1036 target
Differential Revision: https://reviews.llvm.org/D120846
1 parent 93f4249 commit 8406958

File tree

30 files changed

+73
-8
lines changed

30 files changed

+73
-8
lines changed

clang/include/clang/Basic/Cuda.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ enum class CudaArch {
9696
GFX1033,
9797
GFX1034,
9898
GFX1035,
99+
GFX1036,
99100
Generic, // A processor model named 'generic' if the target backend defines a
100101
// public one.
101102
LAST,

clang/lib/Basic/Cuda.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ static const CudaArchToStringMap arch_names[] = {
124124
GFX(1033), // gfx1033
125125
GFX(1034), // gfx1034
126126
GFX(1035), // gfx1035
127+
GFX(1036), // gfx1036
127128
{CudaArch::Generic, "generic", ""},
128129
// clang-format on
129130
};

clang/lib/Basic/Targets/AMDGPU.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,7 @@ bool AMDGPUTargetInfo::initFeatureMap(
183183
// XXX - What does the member GPU mean if device name string passed here?
184184
if (isAMDGCN(getTriple())) {
185185
switch (llvm::AMDGPU::parseArchAMDGCN(CPU)) {
186+
case GK_GFX1036:
186187
case GK_GFX1035:
187188
case GK_GFX1034:
188189
case GK_GFX1033:

clang/lib/Basic/Targets/NVPTX.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,7 @@ void NVPTXTargetInfo::getTargetDefines(const LangOptions &Opts,
216216
case CudaArch::GFX1033:
217217
case CudaArch::GFX1034:
218218
case CudaArch::GFX1035:
219+
case CudaArch::GFX1036:
219220
case CudaArch::Generic:
220221
case CudaArch::LAST:
221222
break;

clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3927,6 +3927,7 @@ void CGOpenMPRuntimeGPU::processRequiresDirective(
39273927
case CudaArch::GFX1033:
39283928
case CudaArch::GFX1034:
39293929
case CudaArch::GFX1035:
3930+
case CudaArch::GFX1036:
39303931
case CudaArch::Generic:
39313932
case CudaArch::UNUSED:
39323933
case CudaArch::UNKNOWN:

clang/test/CodeGenOpenCL/amdgpu-features.cl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
// RUN: %clang_cc1 -triple amdgcn -target-cpu gfx1033 -S -emit-llvm -o - %s | FileCheck --check-prefix=GFX1033 %s
3737
// RUN: %clang_cc1 -triple amdgcn -target-cpu gfx1034 -S -emit-llvm -o - %s | FileCheck --check-prefix=GFX1034 %s
3838
// RUN: %clang_cc1 -triple amdgcn -target-cpu gfx1035 -S -emit-llvm -o - %s | FileCheck --check-prefix=GFX1035 %s
39+
// RUN: %clang_cc1 -triple amdgcn -target-cpu gfx1036 -S -emit-llvm -o - %s | FileCheck --check-prefix=GFX1036 %s
3940

4041
// GFX600: "target-features"="+s-memtime-inst"
4142
// GFX601: "target-features"="+s-memtime-inst"
@@ -70,5 +71,6 @@
7071
// GFX1033: "target-features"="+16-bit-insts,+ci-insts,+dl-insts,+dot1-insts,+dot2-insts,+dot5-insts,+dot6-insts,+dot7-insts,+dpp,+flat-address-space,+gfx10-3-insts,+gfx10-insts,+gfx8-insts,+gfx9-insts,+s-memrealtime,+s-memtime-inst"
7172
// GFX1034: "target-features"="+16-bit-insts,+ci-insts,+dl-insts,+dot1-insts,+dot2-insts,+dot5-insts,+dot6-insts,+dot7-insts,+dpp,+flat-address-space,+gfx10-3-insts,+gfx10-insts,+gfx8-insts,+gfx9-insts,+s-memrealtime,+s-memtime-inst"
7273
// GFX1035: "target-features"="+16-bit-insts,+ci-insts,+dl-insts,+dot1-insts,+dot2-insts,+dot5-insts,+dot6-insts,+dot7-insts,+dpp,+flat-address-space,+gfx10-3-insts,+gfx10-insts,+gfx8-insts,+gfx9-insts,+s-memrealtime,+s-memtime-inst"
74+
// GFX1036: "target-features"="+16-bit-insts,+ci-insts,+dl-insts,+dot1-insts,+dot2-insts,+dot5-insts,+dot6-insts,+dot7-insts,+dpp,+flat-address-space,+gfx10-3-insts,+gfx10-insts,+gfx8-insts,+gfx9-insts,+s-memrealtime,+s-memtime-inst"
7375

7476
kernel void test() {}

clang/test/Driver/amdgpu-macros.cl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@
118118
// RUN: %clang -E -dM -target amdgcn -mcpu=gfx1033 %s 2>&1 | FileCheck --check-prefixes=ARCH-GCN,FAST_FMAF %s -DWAVEFRONT_SIZE=32 -DCPU=gfx1033
119119
// RUN: %clang -E -dM -target amdgcn -mcpu=gfx1034 %s 2>&1 | FileCheck --check-prefixes=ARCH-GCN,FAST_FMAF %s -DWAVEFRONT_SIZE=32 -DCPU=gfx1034
120120
// RUN: %clang -E -dM -target amdgcn -mcpu=gfx1035 %s 2>&1 | FileCheck --check-prefixes=ARCH-GCN,FAST_FMAF %s -DWAVEFRONT_SIZE=32 -DCPU=gfx1035
121+
// RUN: %clang -E -dM -target amdgcn -mcpu=gfx1036 %s 2>&1 | FileCheck --check-prefixes=ARCH-GCN,FAST_FMAF %s -DWAVEFRONT_SIZE=32 -DCPU=gfx1036
121122

122123
// ARCH-GCN-DAG: #define FP_FAST_FMA 1
123124

clang/test/Driver/amdgpu-mcpu.cl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@
103103
// RUN: %clang -### -target amdgcn -mcpu=gfx1033 %s 2>&1 | FileCheck --check-prefix=GFX1033 %s
104104
// RUN: %clang -### -target amdgcn -mcpu=gfx1034 %s 2>&1 | FileCheck --check-prefix=GFX1034 %s
105105
// RUN: %clang -### -target amdgcn -mcpu=gfx1035 %s 2>&1 | FileCheck --check-prefix=GFX1035 %s
106+
// RUN: %clang -### -target amdgcn -mcpu=gfx1036 %s 2>&1 | FileCheck --check-prefix=GFX1036 %s
106107

107108
// GCNDEFAULT-NOT: -target-cpu
108109
// GFX600: "-target-cpu" "gfx600"
@@ -138,3 +139,4 @@
138139
// GFX1033: "-target-cpu" "gfx1033"
139140
// GFX1034: "-target-cpu" "gfx1034"
140141
// GFX1035: "-target-cpu" "gfx1035"
142+
// GFX1036: "-target-cpu" "gfx1036"

clang/test/Misc/target-invalid-cpu-note.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,15 @@
2929

3030
// RUN: not %clang_cc1 -triple nvptx--- -target-cpu not-a-cpu -fsyntax-only %s 2>&1 | FileCheck %s --check-prefix NVPTX
3131
// NVPTX: error: unknown target CPU 'not-a-cpu'
32-
// NVPTX-NEXT: note: valid target CPU values are: sm_20, sm_21, sm_30, sm_32, sm_35, sm_37, sm_50, sm_52, sm_53, sm_60, sm_61, sm_62, sm_70, sm_72, sm_75, sm_80, sm_86, gfx600, gfx601, gfx602, gfx700, gfx701, gfx702, gfx703, gfx704, gfx705, gfx801, gfx802, gfx803, gfx805, gfx810, gfx900, gfx902, gfx904, gfx906, gfx908, gfx909, gfx90a, gfx90c, gfx940, gfx1010, gfx1011, gfx1012, gfx1013, gfx1030, gfx1031, gfx1032, gfx1033, gfx1034, gfx1035{{$}}
32+
// NVPTX-NEXT: note: valid target CPU values are: sm_20, sm_21, sm_30, sm_32, sm_35, sm_37, sm_50, sm_52, sm_53, sm_60, sm_61, sm_62, sm_70, sm_72, sm_75, sm_80, sm_86, gfx600, gfx601, gfx602, gfx700, gfx701, gfx702, gfx703, gfx704, gfx705, gfx801, gfx802, gfx803, gfx805, gfx810, gfx900, gfx902, gfx904, gfx906, gfx908, gfx909, gfx90a, gfx90c, gfx940, gfx1010, gfx1011, gfx1012, gfx1013, gfx1030, gfx1031, gfx1032, gfx1033, gfx1034, gfx1035, gfx1036{{$}}
3333

3434
// RUN: not %clang_cc1 -triple r600--- -target-cpu not-a-cpu -fsyntax-only %s 2>&1 | FileCheck %s --check-prefix R600
3535
// R600: error: unknown target CPU 'not-a-cpu'
3636
// R600-NEXT: note: valid target CPU values are: r600, rv630, rv635, r630, rs780, rs880, rv610, rv620, rv670, rv710, rv730, rv740, rv770, cedar, palm, cypress, hemlock, juniper, redwood, sumo, sumo2, barts, caicos, aruba, cayman, turks{{$}}
3737

3838
// RUN: not %clang_cc1 -triple amdgcn--- -target-cpu not-a-cpu -fsyntax-only %s 2>&1 | FileCheck %s --check-prefix AMDGCN
3939
// AMDGCN: error: unknown target CPU 'not-a-cpu'
40-
// AMDGCN-NEXT: note: valid target CPU values are: gfx600, tahiti, gfx601, pitcairn, verde, gfx602, hainan, oland, gfx700, kaveri, gfx701, hawaii, gfx702, gfx703, kabini, mullins, gfx704, bonaire, gfx705, gfx801, carrizo, gfx802, iceland, tonga, gfx803, fiji, polaris10, polaris11, gfx805, tongapro, gfx810, stoney, gfx900, gfx902, gfx904, gfx906, gfx908, gfx909, gfx90a, gfx90c, gfx940, gfx1010, gfx1011, gfx1012, gfx1013, gfx1030, gfx1031, gfx1032, gfx1033, gfx1034, gfx1035{{$}}
40+
// AMDGCN-NEXT: note: valid target CPU values are: gfx600, tahiti, gfx601, pitcairn, verde, gfx602, hainan, oland, gfx700, kaveri, gfx701, hawaii, gfx702, gfx703, kabini, mullins, gfx704, bonaire, gfx705, gfx801, carrizo, gfx802, iceland, tonga, gfx803, fiji, polaris10, polaris11, gfx805, tongapro, gfx810, stoney, gfx900, gfx902, gfx904, gfx906, gfx908, gfx909, gfx90a, gfx90c, gfx940, gfx1010, gfx1011, gfx1012, gfx1013, gfx1030, gfx1031, gfx1032, gfx1033, gfx1034, gfx1035, gfx1036{{$}}
4141

4242
// RUN: not %clang_cc1 -triple wasm64--- -target-cpu not-a-cpu -fsyntax-only %s 2>&1 | FileCheck %s --check-prefix WEBASM
4343
// WEBASM: error: unknown target CPU 'not-a-cpu'

llvm/docs/AMDGPUUsage.rst

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -435,6 +435,13 @@ Every processor supports every OS ABI (see :ref:`amdgpu-os`) with the following
435435
Add product
436436
names.
437437

438+
``gfx1036`` ``amdgcn`` APU - cumode - Absolute - *pal-amdpal* *TBA*
439+
- wavefrontsize64 flat
440+
scratch .. TODO::
441+
442+
Add product
443+
names.
444+
438445
=========== =============== ============ ===== ================= =============== =============== ======================
439446

440447
.. _amdgpu-target-features:
@@ -1236,7 +1243,7 @@ The AMDGPU backend uses the following ELF header:
12361243
``EF_AMDGPU_MACH_AMDGCN_GFX1013`` 0x042 ``gfx1013``
12371244
*reserved* 0x043 Reserved.
12381245
*reserved* 0x044 Reserved.
1239-
*reserved* 0x045 Reserved.
1246+
``EF_AMDGPU_MACH_AMDGCN_GFX1036`` 0x045 ``gfx1036``
12401247
==================================== ========== =============================
12411248

12421249
Sections

llvm/include/llvm/BinaryFormat/ELF.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -759,11 +759,11 @@ enum : unsigned {
759759
EF_AMDGPU_MACH_AMDGCN_GFX1013 = 0x042,
760760
EF_AMDGPU_MACH_AMDGCN_RESERVED_0X43 = 0x043,
761761
EF_AMDGPU_MACH_AMDGCN_RESERVED_0X44 = 0x044,
762-
EF_AMDGPU_MACH_AMDGCN_RESERVED_0X45 = 0x045,
762+
EF_AMDGPU_MACH_AMDGCN_GFX1036 = 0x045,
763763

764764
// First/last AMDGCN-based processors.
765765
EF_AMDGPU_MACH_AMDGCN_FIRST = EF_AMDGPU_MACH_AMDGCN_GFX600,
766-
EF_AMDGPU_MACH_AMDGCN_LAST = EF_AMDGPU_MACH_AMDGCN_RESERVED_0X45,
766+
EF_AMDGPU_MACH_AMDGCN_LAST = EF_AMDGPU_MACH_AMDGCN_GFX1036,
767767

768768
// Indicates if the "xnack" target feature is enabled for all code contained
769769
// in the object.

llvm/include/llvm/Support/TargetParser.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,10 @@ enum GPUKind : uint32_t {
9898
GK_GFX1033 = 78,
9999
GK_GFX1034 = 79,
100100
GK_GFX1035 = 80,
101+
GK_GFX1036 = 81,
101102

102103
GK_AMDGCN_FIRST = GK_GFX600,
103-
GK_AMDGCN_LAST = GK_GFX1035,
104+
GK_AMDGCN_LAST = GK_GFX1036,
104105
};
105106

106107
/// Instruction set architecture version.

llvm/lib/Object/ELFObjectFile.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -483,6 +483,8 @@ StringRef ELFObjectFileBase::getAMDGPUCPUName() const {
483483
return "gfx1034";
484484
case ELF::EF_AMDGPU_MACH_AMDGCN_GFX1035:
485485
return "gfx1035";
486+
case ELF::EF_AMDGPU_MACH_AMDGCN_GFX1036:
487+
return "gfx1036";
486488
default:
487489
llvm_unreachable("Unknown EF_AMDGPU_MACH value");
488490
}

llvm/lib/ObjectYAML/ELFYAML.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -574,6 +574,7 @@ void ScalarBitSetTraits<ELFYAML::ELF_EF>::bitset(IO &IO,
574574
BCaseMask(EF_AMDGPU_MACH_AMDGCN_GFX1033, EF_AMDGPU_MACH);
575575
BCaseMask(EF_AMDGPU_MACH_AMDGCN_GFX1034, EF_AMDGPU_MACH);
576576
BCaseMask(EF_AMDGPU_MACH_AMDGCN_GFX1035, EF_AMDGPU_MACH);
577+
BCaseMask(EF_AMDGPU_MACH_AMDGCN_GFX1036, EF_AMDGPU_MACH);
577578
switch (Object->Header.ABIVersion) {
578579
default:
579580
// ELFOSABI_AMDGPU_PAL, ELFOSABI_AMDGPU_MESA3D support *_V3 flags.

llvm/lib/Support/TargetParser.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ constexpr GPUInfo AMDGCNGPUs[] = {
115115
{{"gfx1033"}, {"gfx1033"}, GK_GFX1033, FEATURE_FAST_FMA_F32|FEATURE_FAST_DENORMAL_F32|FEATURE_WAVE32},
116116
{{"gfx1034"}, {"gfx1034"}, GK_GFX1034, FEATURE_FAST_FMA_F32|FEATURE_FAST_DENORMAL_F32|FEATURE_WAVE32},
117117
{{"gfx1035"}, {"gfx1035"}, GK_GFX1035, FEATURE_FAST_FMA_F32|FEATURE_FAST_DENORMAL_F32|FEATURE_WAVE32},
118+
{{"gfx1036"}, {"gfx1036"}, GK_GFX1036, FEATURE_FAST_FMA_F32|FEATURE_FAST_DENORMAL_F32|FEATURE_WAVE32},
118119
};
119120

120121
const GPUInfo *getArchEntry(AMDGPU::GPUKind AK, ArrayRef<GPUInfo> Table) {
@@ -229,6 +230,7 @@ AMDGPU::IsaVersion AMDGPU::getIsaVersion(StringRef GPU) {
229230
case GK_GFX1033: return {10, 3, 3};
230231
case GK_GFX1034: return {10, 3, 4};
231232
case GK_GFX1035: return {10, 3, 5};
233+
case GK_GFX1036: return {10, 3, 6};
232234
default: return {0, 0, 0};
233235
}
234236
}

llvm/lib/Target/AMDGPU/GCNProcessors.td

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,3 +239,7 @@ def : ProcessorModel<"gfx1034", GFX10SpeedModel,
239239
def : ProcessorModel<"gfx1035", GFX10SpeedModel,
240240
FeatureISAVersion10_3_0.Features
241241
>;
242+
243+
def : ProcessorModel<"gfx1036", GFX10SpeedModel,
244+
FeatureISAVersion10_3_0.Features
245+
>;

llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUTargetStreamer.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ StringRef AMDGPUTargetStreamer::getArchNameFromElfMach(unsigned ElfMach) {
117117
case ELF::EF_AMDGPU_MACH_AMDGCN_GFX1033: AK = GK_GFX1033; break;
118118
case ELF::EF_AMDGPU_MACH_AMDGCN_GFX1034: AK = GK_GFX1034; break;
119119
case ELF::EF_AMDGPU_MACH_AMDGCN_GFX1035: AK = GK_GFX1035; break;
120+
case ELF::EF_AMDGPU_MACH_AMDGCN_GFX1036: AK = GK_GFX1036; break;
120121
case ELF::EF_AMDGPU_MACH_NONE: AK = GK_NONE; break;
121122
}
122123

@@ -181,6 +182,7 @@ unsigned AMDGPUTargetStreamer::getElfMach(StringRef GPU) {
181182
case GK_GFX1033: return ELF::EF_AMDGPU_MACH_AMDGCN_GFX1033;
182183
case GK_GFX1034: return ELF::EF_AMDGPU_MACH_AMDGCN_GFX1034;
183184
case GK_GFX1035: return ELF::EF_AMDGPU_MACH_AMDGCN_GFX1035;
185+
case GK_GFX1036: return ELF::EF_AMDGPU_MACH_AMDGCN_GFX1036;
184186
case GK_NONE: return ELF::EF_AMDGPU_MACH_NONE;
185187
}
186188

llvm/test/CodeGen/AMDGPU/directive-amdgcn-target.ll

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@
9292
; RUN: llc -mtriple=amdgcn-amd-amdhsa --amdhsa-code-object-version=3 -mcpu=gfx1033 < %s | FileCheck --check-prefixes=V3-GFX1033 %s
9393
; RUN: llc -mtriple=amdgcn-amd-amdhsa --amdhsa-code-object-version=3 -mcpu=gfx1034 < %s | FileCheck --check-prefixes=V3-GFX1034 %s
9494
; RUN: llc -mtriple=amdgcn-amd-amdhsa --amdhsa-code-object-version=3 -mcpu=gfx1035 < %s | FileCheck --check-prefixes=V3-GFX1035 %s
95+
; RUN: llc -mtriple=amdgcn-amd-amdhsa --amdhsa-code-object-version=3 -mcpu=gfx1036 < %s | FileCheck --check-prefixes=V3-GFX1036 %s
9596

9697
; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx600 < %s | FileCheck --check-prefixes=GFX600 %s
9798
; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=tahiti < %s | FileCheck --check-prefixes=GFX600 %s
@@ -187,6 +188,7 @@
187188
; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1033 < %s | FileCheck --check-prefixes=GFX1033 %s
188189
; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1034 < %s | FileCheck --check-prefixes=GFX1034 %s
189190
; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1035 < %s | FileCheck --check-prefixes=GFX1035 %s
191+
; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1036 < %s | FileCheck --check-prefixes=GFX1036 %s
190192

191193
; V3-GFX600: .amdgcn_target "amdgcn-amd-amdhsa--gfx600"
192194
; V3-GFX601: .amdgcn_target "amdgcn-amd-amdhsa--gfx601"
@@ -238,6 +240,7 @@
238240
; V3-GFX1033: .amdgcn_target "amdgcn-amd-amdhsa--gfx1033"
239241
; V3-GFX1034: .amdgcn_target "amdgcn-amd-amdhsa--gfx1034"
240242
; V3-GFX1035: .amdgcn_target "amdgcn-amd-amdhsa--gfx1035"
243+
; V3-GFX1036: .amdgcn_target "amdgcn-amd-amdhsa--gfx1036"
241244

242245
; GFX600: .amdgcn_target "amdgcn-amd-amdhsa--gfx600"
243246
; GFX601: .amdgcn_target "amdgcn-amd-amdhsa--gfx601"
@@ -311,6 +314,7 @@
311314
; GFX1033: .amdgcn_target "amdgcn-amd-amdhsa--gfx1033"
312315
; GFX1034: .amdgcn_target "amdgcn-amd-amdhsa--gfx1034"
313316
; GFX1035: .amdgcn_target "amdgcn-amd-amdhsa--gfx1035"
317+
; GFX1036: .amdgcn_target "amdgcn-amd-amdhsa--gfx1036"
314318

315319
define amdgpu_kernel void @directive_amdgcn_target() {
316320
ret void

llvm/test/CodeGen/AMDGPU/elf-header-flags-mach.ll

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@
6565
; RUN: llc -filetype=obj -march=amdgcn -mcpu=gfx1033 < %s | llvm-readobj --file-header - | FileCheck --check-prefixes=ALL,ARCH-GCN,GFX1033 %s
6666
; RUN: llc -filetype=obj -march=amdgcn -mcpu=gfx1034 < %s | llvm-readobj --file-header - | FileCheck --check-prefixes=ALL,ARCH-GCN,GFX1034 %s
6767
; RUN: llc -filetype=obj -march=amdgcn -mcpu=gfx1035 < %s | llvm-readobj --file-header - | FileCheck --check-prefixes=ALL,ARCH-GCN,GFX1035 %s
68+
; RUN: llc -filetype=obj -march=amdgcn -mcpu=gfx1036 < %s | llvm-readobj --file-header - | FileCheck --check-prefixes=ALL,ARCH-GCN,GFX1036 %s
6869

6970
; FIXME: With the default attributes the eflags are not accurate for
7071
; xnack and sramecc. Subsequent Target-ID patches will address this.
@@ -127,6 +128,7 @@
127128
; GFX1033: EF_AMDGPU_MACH_AMDGCN_GFX1033 (0x39)
128129
; GFX1034: EF_AMDGPU_MACH_AMDGCN_GFX1034 (0x3E)
129130
; GFX1035: EF_AMDGPU_MACH_AMDGCN_GFX1035 (0x3D)
131+
; GFX1036: EF_AMDGPU_MACH_AMDGCN_GFX1036 (0x45)
130132
; ALL: ]
131133

132134
define amdgpu_kernel void @elf_header() {

llvm/test/MC/AMDGPU/gfx1011_dlops.s

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
// RUN: llvm-mc -arch=amdgcn -mcpu=gfx1033 -show-encoding %s | FileCheck --check-prefix=GFX10 %s
77
// RUN: llvm-mc -arch=amdgcn -mcpu=gfx1034 -show-encoding %s | FileCheck --check-prefix=GFX10 %s
88
// RUN: llvm-mc -arch=amdgcn -mcpu=gfx1035 -show-encoding %s | FileCheck --check-prefix=GFX10 %s
9+
// RUN: llvm-mc -arch=amdgcn -mcpu=gfx1036 -show-encoding %s | FileCheck --check-prefix=GFX10 %s
910

1011
v_dot2_f32_f16 v0, v1, v2, v3
1112
// GFX10: encoding: [0x00,0x40,0x13,0xcc,0x01,0x05,0x0e,0x1c]

llvm/test/MC/AMDGPU/gfx1030_err.s

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
// RUN: not llvm-mc -arch=amdgcn -mcpu=gfx1033 %s 2>&1 | FileCheck --check-prefix=GFX10 --implicit-check-not=error: %s
55
// RUN: not llvm-mc -arch=amdgcn -mcpu=gfx1034 %s 2>&1 | FileCheck --check-prefix=GFX10 --implicit-check-not=error: %s
66
// RUN: not llvm-mc -arch=amdgcn -mcpu=gfx1035 %s 2>&1 | FileCheck --check-prefix=GFX10 --implicit-check-not=error: %s
7+
// RUN: not llvm-mc -arch=amdgcn -mcpu=gfx1036 %s 2>&1 | FileCheck --check-prefix=GFX10 --implicit-check-not=error: %s
78

89
v_dot8c_i32_i4 v5, v1, v2
910
// GFX10: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU

llvm/test/MC/AMDGPU/gfx1030_new.s

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
// RUN: llvm-mc -arch=amdgcn -mcpu=gfx1033 -show-encoding %s | FileCheck --check-prefix=GFX10 %s
55
// RUN: llvm-mc -arch=amdgcn -mcpu=gfx1034 -show-encoding %s | FileCheck --check-prefix=GFX10 %s
66
// RUN: llvm-mc -arch=amdgcn -mcpu=gfx1035 -show-encoding %s | FileCheck --check-prefix=GFX10 %s
7+
// RUN: llvm-mc -arch=amdgcn -mcpu=gfx1036 -show-encoding %s | FileCheck --check-prefix=GFX10 %s
78

89
global_load_dword_addtid v1, s[2:3] offset:16
910
// GFX10: encoding: [0x10,0x80,0x58,0xdc,0x00,0x00,0x02,0x01]

llvm/test/MC/Disassembler/AMDGPU/gfx1011_dasm_dlops.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
# RUN: llvm-mc -arch=amdgcn -mcpu=gfx1033 -disassemble -show-encoding < %s | FileCheck -check-prefix=GFX10 %s
77
# RUN: llvm-mc -arch=amdgcn -mcpu=gfx1034 -disassemble -show-encoding < %s | FileCheck -check-prefix=GFX10 %s
88
# RUN: llvm-mc -arch=amdgcn -mcpu=gfx1035 -disassemble -show-encoding < %s | FileCheck -check-prefix=GFX10 %s
9+
# RUN: llvm-mc -arch=amdgcn -mcpu=gfx1036 -disassemble -show-encoding < %s | FileCheck -check-prefix=GFX10 %s
910

1011
# GFX10: v_dot2_f32_f16 v0, v1, v2, v3 ; encoding: [0x00,0x40,0x13,0xcc,0x01,0x05,0x0e,0x1c]
1112
0x00,0x40,0x13,0xcc,0x01,0x05,0x0e,0x1c

llvm/test/MC/Disassembler/AMDGPU/gfx1030_dasm_new.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
# RUN: llvm-mc -arch=amdgcn -mcpu=gfx1033 -disassemble -show-encoding < %s | FileCheck -check-prefix=GFX10 %s
55
# RUN: llvm-mc -arch=amdgcn -mcpu=gfx1034 -disassemble -show-encoding < %s | FileCheck -check-prefix=GFX10 %s
66
# RUN: llvm-mc -arch=amdgcn -mcpu=gfx1035 -disassemble -show-encoding < %s | FileCheck -check-prefix=GFX10 %s
7+
# RUN: llvm-mc -arch=amdgcn -mcpu=gfx1036 -disassemble -show-encoding < %s | FileCheck -check-prefix=GFX10 %s
78

89
# GFX10: global_load_dword_addtid v1, s[2:3] offset:16
910
0x10,0x80,0x58,0xdc,0x00,0x00,0x02,0x01

llvm/test/Object/AMDGPU/elf-header-flags-mach.yaml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,10 @@
194194
# RUN: llvm-readobj -S --file-headers %t.o.AMDGCN_GFX1035 | FileCheck --check-prefixes=ELF-AMDGCN-ALL,ELF-AMDGCN-GFX1035 %s
195195
# RUN: obj2yaml %t.o.AMDGCN_GFX1035 | FileCheck --check-prefixes=YAML-AMDGCN-ALL,YAML-AMDGCN-GFX1035 %s
196196

197+
# RUN: sed -e 's/<BITS>/64/' -e 's/<MACH>/AMDGCN_GFX1036/' %s | yaml2obj -o %t.o.AMDGCN_GFX1036
198+
# RUN: llvm-readobj -S --file-headers %t.o.AMDGCN_GFX1036 | FileCheck --check-prefixes=ELF-AMDGCN-ALL,ELF-AMDGCN-GFX1036 %s
199+
# RUN: obj2yaml %t.o.AMDGCN_GFX1036 | FileCheck --check-prefixes=YAML-AMDGCN-ALL,YAML-AMDGCN-GFX1036 %s
200+
197201
# ELF-R600-ALL: Format: elf32-amdgpu
198202
# ELF-R600-ALL: Arch: r600
199203
# ELF-R600-ALL: AddressSize: 32bit
@@ -357,7 +361,10 @@
357361

358362
# ELF-AMDGCN-GFX1035: EF_AMDGPU_MACH_AMDGCN_GFX1035 (0x3D)
359363
# YAML-AMDGCN-GFX1035: Flags: [ EF_AMDGPU_MACH_AMDGCN_GFX1035 ]
360-
#
364+
365+
# ELF-AMDGCN-GFX1036: EF_AMDGPU_MACH_AMDGCN_GFX1036 (0x45)
366+
# YAML-AMDGCN-GFX1036: Flags: [ EF_AMDGPU_MACH_AMDGCN_GFX1036 ]
367+
361368
# ELF-AMDGCN-ALL: ]
362369

363370

llvm/test/tools/llvm-objdump/ELF/AMDGPU/subtarget.ll

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ define amdgpu_kernel void @test_kernel() {
55
; Test subtarget detection. Disassembly is only supported for GFX8 and beyond.
66
;
77
; ----------------------------------GFX10--------------------------------------
8+
; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1036 -filetype=obj -O0 -o %t.o %s
9+
; RUN: llvm-objdump -D --arch-name=amdgcn --mcpu=gfx1036 %t.o > %t-specify.txt
10+
; RUN: llvm-objdump -D %t.o > %t-detect.txt
11+
; RUN: diff %t-specify.txt %t-detect.txt
12+
813
; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1035 -filetype=obj -O0 -o %t.o %s
914
; RUN: llvm-objdump -D --arch-name=amdgcn --mcpu=gfx1035 %t.o > %t-specify.txt
1015
; RUN: llvm-objdump -D %t.o > %t-detect.txt

0 commit comments

Comments
 (0)