Skip to content

Commit 92542f2

Browse files
committed
[AMDGPU] Add targets gfx1150 and gfx1151
This is the target definition only. Currently they are treated the same as GFX 11.0.x. Differential Revision: https://reviews.llvm.org/D155429
1 parent e6afacc commit 92542f2

File tree

30 files changed

+154
-14
lines changed

30 files changed

+154
-14
lines changed

clang/include/clang/Basic/Cuda.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,8 @@ enum class CudaArch {
111111
GFX1101,
112112
GFX1102,
113113
GFX1103,
114+
GFX1150,
115+
GFX1151,
114116
Generic, // A processor model named 'generic' if the target backend defines a
115117
// public one.
116118
LAST,

clang/lib/Basic/Cuda.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,8 @@ static const CudaArchToStringMap arch_names[] = {
133133
GFX(1101), // gfx1101
134134
GFX(1102), // gfx1102
135135
GFX(1103), // gfx1103
136+
GFX(1150), // gfx1150
137+
GFX(1151), // gfx1151
136138
{CudaArch::Generic, "generic", ""},
137139
// clang-format on
138140
};

clang/lib/Basic/Targets/NVPTX.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,8 @@ void NVPTXTargetInfo::getTargetDefines(const LangOptions &Opts,
212212
case CudaArch::GFX1101:
213213
case CudaArch::GFX1102:
214214
case CudaArch::GFX1103:
215+
case CudaArch::GFX1150:
216+
case CudaArch::GFX1151:
215217
case CudaArch::Generic:
216218
case CudaArch::LAST:
217219
break;

clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3631,6 +3631,8 @@ void CGOpenMPRuntimeGPU::processRequiresDirective(
36313631
case CudaArch::GFX1101:
36323632
case CudaArch::GFX1102:
36333633
case CudaArch::GFX1103:
3634+
case CudaArch::GFX1150:
3635+
case CudaArch::GFX1151:
36343636
case CudaArch::Generic:
36353637
case CudaArch::UNUSED:
36363638
case CudaArch::UNKNOWN:

clang/test/CodeGenOpenCL/amdgpu-features.cl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@
4747
// RUN: %clang_cc1 -triple amdgcn -target-cpu gfx1101 -S -emit-llvm -o - %s | FileCheck --check-prefix=GFX1101 %s
4848
// RUN: %clang_cc1 -triple amdgcn -target-cpu gfx1102 -S -emit-llvm -o - %s | FileCheck --check-prefix=GFX1102 %s
4949
// RUN: %clang_cc1 -triple amdgcn -target-cpu gfx1103 -S -emit-llvm -o - %s | FileCheck --check-prefix=GFX1103 %s
50+
// RUN: %clang_cc1 -triple amdgcn -target-cpu gfx1150 -S -emit-llvm -o - %s | FileCheck --check-prefix=GFX1150 %s
51+
// RUN: %clang_cc1 -triple amdgcn -target-cpu gfx1151 -S -emit-llvm -o - %s | FileCheck --check-prefix=GFX1151 %s
5052

5153
// RUN: %clang_cc1 -triple amdgcn -target-cpu gfx1103 -target-feature +wavefrontsize64 -S -emit-llvm -o - %s | FileCheck --check-prefix=GFX1103-W64 %s
5254

@@ -94,6 +96,9 @@
9496
// GFX1101: "target-features"="+16-bit-insts,+atomic-fadd-rtn-insts,+ci-insts,+dl-insts,+dot10-insts,+dot5-insts,+dot7-insts,+dot8-insts,+dot9-insts,+dpp,+gfx10-3-insts,+gfx10-insts,+gfx11-insts,+gfx8-insts,+gfx9-insts,+wavefrontsize32"
9597
// GFX1102: "target-features"="+16-bit-insts,+atomic-fadd-rtn-insts,+ci-insts,+dl-insts,+dot10-insts,+dot5-insts,+dot7-insts,+dot8-insts,+dot9-insts,+dpp,+gfx10-3-insts,+gfx10-insts,+gfx11-insts,+gfx8-insts,+gfx9-insts,+wavefrontsize32"
9698
// GFX1103: "target-features"="+16-bit-insts,+atomic-fadd-rtn-insts,+ci-insts,+dl-insts,+dot10-insts,+dot5-insts,+dot7-insts,+dot8-insts,+dot9-insts,+dpp,+gfx10-3-insts,+gfx10-insts,+gfx11-insts,+gfx8-insts,+gfx9-insts,+wavefrontsize32"
99+
// GFX1150: "target-features"="+16-bit-insts,+atomic-fadd-rtn-insts,+ci-insts,+dl-insts,+dot10-insts,+dot5-insts,+dot7-insts,+dot8-insts,+dot9-insts,+dpp,+gfx10-3-insts,+gfx10-insts,+gfx11-insts,+gfx8-insts,+gfx9-insts,+wavefrontsize32"
100+
// GFX1151: "target-features"="+16-bit-insts,+atomic-fadd-rtn-insts,+ci-insts,+dl-insts,+dot10-insts,+dot5-insts,+dot7-insts,+dot8-insts,+dot9-insts,+dpp,+gfx10-3-insts,+gfx10-insts,+gfx11-insts,+gfx8-insts,+gfx9-insts,+wavefrontsize32"
101+
97102
// GFX1103-W64: "target-features"="+16-bit-insts,+atomic-fadd-rtn-insts,+ci-insts,+dl-insts,+dot10-insts,+dot5-insts,+dot7-insts,+dot8-insts,+dot9-insts,+dpp,+gfx10-3-insts,+gfx10-insts,+gfx11-insts,+gfx8-insts,+gfx9-insts,+wavefrontsize64"
98103

99104
kernel void test() {}

clang/test/CodeGenOpenCL/builtins-amdgcn-gfx11.cl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
// RUN: %clang_cc1 -triple amdgcn-unknown-unknown -target-cpu gfx1101 -S -emit-llvm -o - %s | FileCheck %s
44
// RUN: %clang_cc1 -triple amdgcn-unknown-unknown -target-cpu gfx1102 -S -emit-llvm -o - %s | FileCheck %s
55
// RUN: %clang_cc1 -triple amdgcn-unknown-unknown -target-cpu gfx1103 -S -emit-llvm -o - %s | FileCheck %s
6+
// RUN: %clang_cc1 -triple amdgcn-unknown-unknown -target-cpu gfx1150 -S -emit-llvm -o - %s | FileCheck %s
7+
// RUN: %clang_cc1 -triple amdgcn-unknown-unknown -target-cpu gfx1151 -S -emit-llvm -o - %s | FileCheck %s
68

79
typedef unsigned int uint;
810
typedef unsigned long ulong;

clang/test/Driver/amdgpu-macros.cl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,8 @@
126126
// RUN: %clang -E -dM -target amdgcn -mcpu=gfx1101 %s 2>&1 | FileCheck --check-prefixes=ARCH-GCN,FAST_FMAF %s -DWAVEFRONT_SIZE=32 -DCPU=gfx1101 -DFAMILY=GFX11
127127
// RUN: %clang -E -dM -target amdgcn -mcpu=gfx1102 %s 2>&1 | FileCheck --check-prefixes=ARCH-GCN,FAST_FMAF %s -DWAVEFRONT_SIZE=32 -DCPU=gfx1102 -DFAMILY=GFX11
128128
// RUN: %clang -E -dM -target amdgcn -mcpu=gfx1103 %s 2>&1 | FileCheck --check-prefixes=ARCH-GCN,FAST_FMAF %s -DWAVEFRONT_SIZE=32 -DCPU=gfx1103 -DFAMILY=GFX11
129+
// RUN: %clang -E -dM -target amdgcn -mcpu=gfx1150 %s 2>&1 | FileCheck --check-prefixes=ARCH-GCN,FAST_FMAF %s -DWAVEFRONT_SIZE=32 -DCPU=gfx1150 -DFAMILY=GFX11
130+
// RUN: %clang -E -dM -target amdgcn -mcpu=gfx1151 %s 2>&1 | FileCheck --check-prefixes=ARCH-GCN,FAST_FMAF %s -DWAVEFRONT_SIZE=32 -DCPU=gfx1151 -DFAMILY=GFX11
129131

130132
// ARCH-GCN-DAG: #define FP_FAST_FMA 1
131133

clang/test/Driver/amdgpu-mcpu.cl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,8 @@
110110
// RUN: %clang -### -target amdgcn -mcpu=gfx1101 %s 2>&1 | FileCheck --check-prefix=GFX1101 %s
111111
// RUN: %clang -### -target amdgcn -mcpu=gfx1102 %s 2>&1 | FileCheck --check-prefix=GFX1102 %s
112112
// RUN: %clang -### -target amdgcn -mcpu=gfx1103 %s 2>&1 | FileCheck --check-prefix=GFX1103 %s
113+
// RUN: %clang -### -target amdgcn -mcpu=gfx1150 %s 2>&1 | FileCheck --check-prefix=GFX1150 %s
114+
// RUN: %clang -### -target amdgcn -mcpu=gfx1151 %s 2>&1 | FileCheck --check-prefix=GFX1151 %s
113115

114116
// GCNDEFAULT-NOT: -target-cpu
115117
// GFX600: "-target-cpu" "gfx600"
@@ -152,3 +154,5 @@
152154
// GFX1101: "-target-cpu" "gfx1101"
153155
// GFX1102: "-target-cpu" "gfx1102"
154156
// GFX1103: "-target-cpu" "gfx1103"
157+
// GFX1150: "-target-cpu" "gfx1150"
158+
// GFX1151: "-target-cpu" "gfx1151"

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, sm_87, sm_89, sm_90, gfx600, gfx601, gfx602, gfx700, gfx701, gfx702, gfx703, gfx704, gfx705, gfx801, gfx802, gfx803, gfx805, gfx810, gfx900, gfx902, gfx904, gfx906, gfx908, gfx909, gfx90a, gfx90c, gfx940, gfx941, gfx942, gfx1010, gfx1011, gfx1012, gfx1013, gfx1030, gfx1031, gfx1032, gfx1033, gfx1034, gfx1035, gfx1036, gfx1100, gfx1101, gfx1102, gfx1103{{$}}
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, sm_87, sm_89, sm_90, gfx600, gfx601, gfx602, gfx700, gfx701, gfx702, gfx703, gfx704, gfx705, gfx801, gfx802, gfx803, gfx805, gfx810, gfx900, gfx902, gfx904, gfx906, gfx908, gfx909, gfx90a, gfx90c, gfx940, gfx941, gfx942, gfx1010, gfx1011, gfx1012, gfx1013, gfx1030, gfx1031, gfx1032, gfx1033, gfx1034, gfx1035, gfx1036, gfx1100, gfx1101, gfx1102, gfx1103, gfx1150, gfx1151{{$}}
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, gfx941, gfx942, gfx1010, gfx1011, gfx1012, gfx1013, gfx1030, gfx1031, gfx1032, gfx1033, gfx1034, gfx1035, gfx1036, gfx1100, gfx1101, gfx1102, gfx1103{{$}}
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, gfx941, gfx942, gfx1010, gfx1011, gfx1012, gfx1013, gfx1030, gfx1031, gfx1032, gfx1033, gfx1034, gfx1035, gfx1036, gfx1100, gfx1101, gfx1102, gfx1103, gfx1150, gfx1151{{$}}
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'

flang/runtime/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ if (NOT FLANG_EXPERIMENTAL_OMP_OFFLOAD_BUILD STREQUAL "off")
217217
"gfx700;gfx701;gfx801;gfx803;gfx900;gfx902;gfx906"
218218
"gfx908;gfx90a;gfx90c;gfx940;gfx1010;gfx1030"
219219
"gfx1031;gfx1032;gfx1033;gfx1034;gfx1035;gfx1036"
220-
"gfx1100;gfx1101;gfx1102;gfx1103"
220+
"gfx1100;gfx1101;gfx1102;gfx1103;gfx1150;gfx1151"
221221
)
222222
set(all_nvptx_architectures
223223
"sm_35;sm_37;sm_50;sm_52;sm_53;sm_60;sm_61;sm_62"

libc/cmake/modules/prepare_libc_gpu_build.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ endif()
77
set(all_amdgpu_architectures "gfx700;gfx701;gfx801;gfx803;gfx900;gfx902;gfx906"
88
"gfx908;gfx90a;gfx90c;gfx940;gfx1010;gfx1030"
99
"gfx1031;gfx1032;gfx1033;gfx1034;gfx1035;gfx1036"
10-
"gfx1100;gfx1101;gfx1102;gfx1103")
10+
"gfx1100;gfx1101;gfx1102;gfx1103;gfx1150;gfx1151")
1111
set(all_nvptx_architectures "sm_35;sm_37;sm_50;sm_52;sm_53;sm_60;sm_61;sm_62"
1212
"sm_70;sm_72;sm_75;sm_80;sm_86")
1313
set(all_gpu_architectures

libc/src/math/gpu/vendor/amdgpu/platform.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,10 @@ extern const uint32_t __oclc_ISA_version = 11001;
100100
extern const uint32_t __oclc_ISA_version = 11002;
101101
#elif defined(__gfx1103__)
102102
extern const uint32_t __oclc_ISA_version = 11003;
103+
#elif defined(__gfx1150__)
104+
extern const uint32_t __oclc_ISA_version = 11500;
105+
#elif defined(__gfx1151__)
106+
extern const uint32_t __oclc_ISA_version = 11501;
103107
#else
104108
#error "Unknown AMDGPU architecture"
105109
#endif

llvm/docs/AMDGPUUsage.rst

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -490,6 +490,20 @@ Every processor supports every OS ABI (see :ref:`amdgpu-os`) with the following
490490
work-item Add product
491491
IDs names.
492492

493+
``gfx1150`` ``amdgcn`` APU - cumode - Architected *TBA*
494+
- wavefrontsize64 flat
495+
scratch .. TODO::
496+
- Packed
497+
work-item Add product
498+
IDs names.
499+
500+
``gfx1151`` ``amdgcn`` APU - cumode - Architected *TBA*
501+
- wavefrontsize64 flat
502+
scratch .. TODO::
503+
- Packed
504+
work-item Add product
505+
IDs names.
506+
493507
=========== =============== ============ ===== ================= =============== =============== ======================
494508

495509
.. _amdgpu-target-features:
@@ -1489,14 +1503,14 @@ The AMDGPU backend uses the following ELF header:
14891503
``EF_AMDGPU_MACH_AMDGCN_GFX940`` 0x040 ``gfx940``
14901504
``EF_AMDGPU_MACH_AMDGCN_GFX1100`` 0x041 ``gfx1100``
14911505
``EF_AMDGPU_MACH_AMDGCN_GFX1013`` 0x042 ``gfx1013``
1492-
*reserved* 0x043 Reserved.
1506+
``EF_AMDGPU_MACH_AMDGCN_GFX1150`` 0x043 ``gfx1150``
14931507
``EF_AMDGPU_MACH_AMDGCN_GFX1103`` 0x044 ``gfx1103``
14941508
``EF_AMDGPU_MACH_AMDGCN_GFX1036`` 0x045 ``gfx1036``
14951509
``EF_AMDGPU_MACH_AMDGCN_GFX1101`` 0x046 ``gfx1101``
14961510
``EF_AMDGPU_MACH_AMDGCN_GFX1102`` 0x047 ``gfx1102``
14971511
*reserved* 0x048 Reserved.
14981512
*reserved* 0x049 Reserved.
1499-
*reserved* 0x04a Reserved.
1513+
``EF_AMDGPU_MACH_AMDGCN_GFX1151`` 0x04a ``gfx1151``
15001514
``EF_AMDGPU_MACH_AMDGCN_GFX941`` 0x04b ``gfx941``
15011515
``EF_AMDGPU_MACH_AMDGCN_GFX942`` 0x04c ``gfx942``
15021516
==================================== ========== =============================

llvm/include/llvm/BinaryFormat/ELF.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -773,14 +773,14 @@ enum : unsigned {
773773
EF_AMDGPU_MACH_AMDGCN_GFX940 = 0x040,
774774
EF_AMDGPU_MACH_AMDGCN_GFX1100 = 0x041,
775775
EF_AMDGPU_MACH_AMDGCN_GFX1013 = 0x042,
776-
EF_AMDGPU_MACH_AMDGCN_RESERVED_0X43 = 0x043,
776+
EF_AMDGPU_MACH_AMDGCN_GFX1150 = 0x043,
777777
EF_AMDGPU_MACH_AMDGCN_GFX1103 = 0x044,
778778
EF_AMDGPU_MACH_AMDGCN_GFX1036 = 0x045,
779779
EF_AMDGPU_MACH_AMDGCN_GFX1101 = 0x046,
780780
EF_AMDGPU_MACH_AMDGCN_GFX1102 = 0x047,
781781
EF_AMDGPU_MACH_AMDGCN_RESERVED_0X48 = 0x048,
782782
EF_AMDGPU_MACH_AMDGCN_RESERVED_0X49 = 0x049,
783-
EF_AMDGPU_MACH_AMDGCN_RESERVED_0X4A = 0x04a,
783+
EF_AMDGPU_MACH_AMDGCN_GFX1151 = 0x04a,
784784
EF_AMDGPU_MACH_AMDGCN_GFX941 = 0x04b,
785785
EF_AMDGPU_MACH_AMDGCN_GFX942 = 0x04c,
786786

llvm/include/llvm/TargetParser/TargetParser.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,11 @@ enum GPUKind : uint32_t {
103103
GK_GFX1101 = 91,
104104
GK_GFX1102 = 92,
105105
GK_GFX1103 = 93,
106+
GK_GFX1150 = 94,
107+
GK_GFX1151 = 95,
106108

107109
GK_AMDGCN_FIRST = GK_GFX600,
108-
GK_AMDGCN_LAST = GK_GFX1103,
110+
GK_AMDGCN_LAST = GK_GFX1151,
109111
};
110112

111113
/// Instruction set architecture version.

llvm/lib/Object/ELFObjectFile.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -502,6 +502,10 @@ StringRef ELFObjectFileBase::getAMDGPUCPUName() const {
502502
return "gfx1102";
503503
case ELF::EF_AMDGPU_MACH_AMDGCN_GFX1103:
504504
return "gfx1103";
505+
case ELF::EF_AMDGPU_MACH_AMDGCN_GFX1150:
506+
return "gfx1150";
507+
case ELF::EF_AMDGPU_MACH_AMDGCN_GFX1151:
508+
return "gfx1151";
505509
default:
506510
llvm_unreachable("Unknown EF_AMDGPU_MACH value");
507511
}

llvm/lib/ObjectYAML/ELFYAML.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -607,6 +607,8 @@ void ScalarBitSetTraits<ELFYAML::ELF_EF>::bitset(IO &IO,
607607
BCaseMask(EF_AMDGPU_MACH_AMDGCN_GFX1101, EF_AMDGPU_MACH);
608608
BCaseMask(EF_AMDGPU_MACH_AMDGCN_GFX1102, EF_AMDGPU_MACH);
609609
BCaseMask(EF_AMDGPU_MACH_AMDGCN_GFX1103, EF_AMDGPU_MACH);
610+
BCaseMask(EF_AMDGPU_MACH_AMDGCN_GFX1150, EF_AMDGPU_MACH);
611+
BCaseMask(EF_AMDGPU_MACH_AMDGCN_GFX1151, EF_AMDGPU_MACH);
610612
switch (Object->Header.ABIVersion) {
611613
default:
612614
// ELFOSABI_AMDGPU_PAL, ELFOSABI_AMDGPU_MESA3D support *_V3 flags.

llvm/lib/Target/AMDGPU/AMDGPU.td

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1309,26 +1309,37 @@ def FeatureISAVersion11_Common : FeatureSet<
13091309
FeatureImageInsts,
13101310
FeaturePackedTID,
13111311
FeatureVcmpxPermlaneHazard,
1312-
FeatureVALUTransUseHazard,
13131312
FeatureMADIntraFwdBug]>;
13141313

1315-
def FeatureISAVersion11_0_0 : FeatureSet<
1314+
def FeatureISAVersion11_0_Common : FeatureSet<
13161315
!listconcat(FeatureISAVersion11_Common.Features,
1316+
[FeatureVALUTransUseHazard])>;
1317+
1318+
def FeatureISAVersion11_0_0 : FeatureSet<
1319+
!listconcat(FeatureISAVersion11_0_Common.Features,
13171320
[FeatureGFX11FullVGPRs,
13181321
FeatureUserSGPRInit16Bug])>;
13191322

13201323
def FeatureISAVersion11_0_1 : FeatureSet<
1321-
!listconcat(FeatureISAVersion11_Common.Features,
1324+
!listconcat(FeatureISAVersion11_0_Common.Features,
13221325
[FeatureGFX11FullVGPRs])>;
13231326

13241327
def FeatureISAVersion11_0_2 : FeatureSet<
1325-
!listconcat(FeatureISAVersion11_Common.Features,
1328+
!listconcat(FeatureISAVersion11_0_Common.Features,
13261329
[FeatureUserSGPRInit16Bug])>;
13271330

13281331
def FeatureISAVersion11_0_3 : FeatureSet<
1332+
!listconcat(FeatureISAVersion11_0_Common.Features,
1333+
[])>;
1334+
1335+
def FeatureISAVersion11_5_0 : FeatureSet<
13291336
!listconcat(FeatureISAVersion11_Common.Features,
13301337
[])>;
13311338

1339+
def FeatureISAVersion11_5_1 : FeatureSet<
1340+
!listconcat(FeatureISAVersion11_Common.Features,
1341+
[FeatureGFX11FullVGPRs])>;
1342+
13321343
//===----------------------------------------------------------------------===//
13331344

13341345
def AMDGPUInstrInfo : InstrInfo {

llvm/lib/Target/AMDGPU/GCNProcessors.td

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,3 +271,11 @@ def : ProcessorModel<"gfx1102", GFX11SpeedModel,
271271
def : ProcessorModel<"gfx1103", GFX11SpeedModel,
272272
FeatureISAVersion11_0_3.Features
273273
>;
274+
275+
def : ProcessorModel<"gfx1150", GFX11SpeedModel,
276+
FeatureISAVersion11_5_0.Features
277+
>;
278+
279+
def : ProcessorModel<"gfx1151", GFX11SpeedModel,
280+
FeatureISAVersion11_5_1.Features
281+
>;

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,8 @@ StringRef AMDGPUTargetStreamer::getArchNameFromElfMach(unsigned ElfMach) {
124124
case ELF::EF_AMDGPU_MACH_AMDGCN_GFX1101: AK = GK_GFX1101; break;
125125
case ELF::EF_AMDGPU_MACH_AMDGCN_GFX1102: AK = GK_GFX1102; break;
126126
case ELF::EF_AMDGPU_MACH_AMDGCN_GFX1103: AK = GK_GFX1103; break;
127+
case ELF::EF_AMDGPU_MACH_AMDGCN_GFX1150: AK = GK_GFX1150; break;
128+
case ELF::EF_AMDGPU_MACH_AMDGCN_GFX1151: AK = GK_GFX1151; break;
127129
case ELF::EF_AMDGPU_MACH_NONE: AK = GK_NONE; break;
128130
}
129131

@@ -195,6 +197,8 @@ unsigned AMDGPUTargetStreamer::getElfMach(StringRef GPU) {
195197
case GK_GFX1101: return ELF::EF_AMDGPU_MACH_AMDGCN_GFX1101;
196198
case GK_GFX1102: return ELF::EF_AMDGPU_MACH_AMDGCN_GFX1102;
197199
case GK_GFX1103: return ELF::EF_AMDGPU_MACH_AMDGCN_GFX1103;
200+
case GK_GFX1150: return ELF::EF_AMDGPU_MACH_AMDGCN_GFX1150;
201+
case GK_GFX1151: return ELF::EF_AMDGPU_MACH_AMDGCN_GFX1151;
198202
case GK_NONE: return ELF::EF_AMDGPU_MACH_NONE;
199203
}
200204

llvm/lib/TargetParser/TargetParser.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,8 @@ constexpr GPUInfo AMDGCNGPUs[] = {
121121
{{"gfx1101"}, {"gfx1101"}, GK_GFX1101, FEATURE_FAST_FMA_F32|FEATURE_FAST_DENORMAL_F32|FEATURE_WAVE32|FEATURE_WGP},
122122
{{"gfx1102"}, {"gfx1102"}, GK_GFX1102, FEATURE_FAST_FMA_F32|FEATURE_FAST_DENORMAL_F32|FEATURE_WAVE32|FEATURE_WGP},
123123
{{"gfx1103"}, {"gfx1103"}, GK_GFX1103, FEATURE_FAST_FMA_F32|FEATURE_FAST_DENORMAL_F32|FEATURE_WAVE32|FEATURE_WGP},
124+
{{"gfx1150"}, {"gfx1150"}, GK_GFX1150, FEATURE_FAST_FMA_F32|FEATURE_FAST_DENORMAL_F32|FEATURE_WAVE32|FEATURE_WGP},
125+
{{"gfx1151"}, {"gfx1151"}, GK_GFX1151, FEATURE_FAST_FMA_F32|FEATURE_FAST_DENORMAL_F32|FEATURE_WAVE32|FEATURE_WGP},
124126
};
125127

126128
const GPUInfo *getArchEntry(AMDGPU::GPUKind AK, ArrayRef<GPUInfo> Table) {
@@ -242,6 +244,8 @@ AMDGPU::IsaVersion AMDGPU::getIsaVersion(StringRef GPU) {
242244
case GK_GFX1101: return {11, 0, 1};
243245
case GK_GFX1102: return {11, 0, 2};
244246
case GK_GFX1103: return {11, 0, 3};
247+
case GK_GFX1150: return {11, 5, 0};
248+
case GK_GFX1151: return {11, 5, 1};
245249
default: return {0, 0, 0};
246250
}
247251
}
@@ -260,6 +264,8 @@ void AMDGPU::fillAMDGPUFeatureMap(StringRef GPU, const Triple &T,
260264
// XXX - What does the member GPU mean if device name string passed here?
261265
if (T.isAMDGCN()) {
262266
switch (parseArchAMDGCN(GPU)) {
267+
case GK_GFX1151:
268+
case GK_GFX1150:
263269
case GK_GFX1103:
264270
case GK_GFX1102:
265271
case GK_GFX1101:
@@ -447,6 +453,8 @@ static bool isWave32Capable(StringRef GPU, const Triple &T) {
447453
// XXX - What does the member GPU mean if device name string passed here?
448454
if (T.isAMDGCN()) {
449455
switch (parseArchAMDGCN(GPU)) {
456+
case GK_GFX1151:
457+
case GK_GFX1150:
450458
case GK_GFX1103:
451459
case GK_GFX1102:
452460
case GK_GFX1101:

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,8 @@
9797
; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1101 < %s | FileCheck --check-prefixes=V3-GFX1101 %s
9898
; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1102 < %s | FileCheck --check-prefixes=V3-GFX1102 %s
9999
; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1103 < %s | FileCheck --check-prefixes=V3-GFX1103 %s
100+
; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1150 < %s | FileCheck --check-prefixes=V3-GFX1150 %s
101+
; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1151 < %s | FileCheck --check-prefixes=V3-GFX1151 %s
100102

101103
; V3-GFX600: .amdgcn_target "amdgcn-amd-amdhsa--gfx600"
102104
; V3-GFX601: .amdgcn_target "amdgcn-amd-amdhsa--gfx601"
@@ -153,6 +155,8 @@
153155
; V3-GFX1101: .amdgcn_target "amdgcn-amd-amdhsa--gfx1101"
154156
; V3-GFX1102: .amdgcn_target "amdgcn-amd-amdhsa--gfx1102"
155157
; V3-GFX1103: .amdgcn_target "amdgcn-amd-amdhsa--gfx1103"
158+
; V3-GFX1150: .amdgcn_target "amdgcn-amd-amdhsa--gfx1150"
159+
; V3-GFX1151: .amdgcn_target "amdgcn-amd-amdhsa--gfx1151"
156160

157161

158162

0 commit comments

Comments
 (0)