Index: lib/Target/AMDGPU/AMDGPU.td =================================================================== --- lib/Target/AMDGPU/AMDGPU.td +++ lib/Target/AMDGPU/AMDGPU.td @@ -132,10 +132,13 @@ def FeatureISAVersion7_0_0 : SubtargetFeatureISAVersion <7,0,0>; def FeatureISAVersion7_0_1 : SubtargetFeatureISAVersion <7,0,1>; +def FeatureISAVersion7_0_2 : SubtargetFeatureISAVersion <7,0,2>; def FeatureISAVersion8_0_0 : SubtargetFeatureISAVersion <8,0,0>; def FeatureISAVersion8_0_1 : SubtargetFeatureISAVersion <8,0,1>; def FeatureISAVersion8_0_2 : SubtargetFeatureISAVersion <8,0,2>; def FeatureISAVersion8_0_3 : SubtargetFeatureISAVersion <8,0,3>; +def FeatureISAVersion8_0_4 : SubtargetFeatureISAVersion <8,0,4>; +def FeatureISAVersion8_1_0 : SubtargetFeatureISAVersion <8,1,0>; def FeatureISAVersion9_0_0 : SubtargetFeatureISAVersion <9,0,0>; def FeatureISAVersion9_0_1 : SubtargetFeatureISAVersion <9,0,1>; Index: lib/Target/AMDGPU/AMDGPUSubtarget.h =================================================================== --- lib/Target/AMDGPU/AMDGPUSubtarget.h +++ lib/Target/AMDGPU/AMDGPUSubtarget.h @@ -52,10 +52,13 @@ ISAVersion0_0_0, ISAVersion7_0_0, ISAVersion7_0_1, + ISAVersion7_0_2, ISAVersion8_0_0, ISAVersion8_0_1, ISAVersion8_0_2, ISAVersion8_0_3, + ISAVersion8_0_4, + ISAVersion8_1_0, ISAVersion9_0_0, ISAVersion9_0_1 }; Index: lib/Target/AMDGPU/Processors.td =================================================================== --- lib/Target/AMDGPU/Processors.td +++ lib/Target/AMDGPU/Processors.td @@ -120,6 +120,20 @@ def : ProcessorModel<"mullins", SIQuarterSpeedModel, [FeatureSeaIslands, FeatureLDSBankCount16]>; +def : ProcessorModel<"gfx700", SIQuarterSpeedModel, + [FeatureSeaIslands, FeatureLDSBankCount32, FeatureISAVersion7_0_0] +>; + +def : ProcessorModel<"gfx701", SIFullSpeedModel, + [FeatureSeaIslands, FeatureFastFMAF32, HalfRate64Ops, + FeatureLDSBankCount32, FeatureISAVersion7_0_1] +>; + +def : ProcessorModel<"gfx702", SIFullSpeedModel, + [FeatureSeaIslands, FeatureFastFMAF32, HalfRate64Ops, + FeatureLDSBankCount32, FeatureISAVersion7_0_2] +>; + //===----------------------------------------------------------------------===// // Volcanic Islands //===----------------------------------------------------------------------===// @@ -154,6 +168,32 @@ [FeatureVolcanicIslands, FeatureISAVersion8_0_3, FeatureLDSBankCount32] >; +def : ProcessorModel<"gfx800", SIQuarterSpeedModel, + [FeatureVolcanicIslands, FeatureSGPRInitBug, FeatureISAVersion8_0_0, + FeatureLDSBankCount32] +>; + +def : ProcessorModel<"gfx801", SIQuarterSpeedModel, + [FeatureVolcanicIslands, FeatureISAVersion8_0_1, FeatureLDSBankCount32, FeatureXNACK] +>; + +def : ProcessorModel<"gfx802", SIQuarterSpeedModel, + [FeatureVolcanicIslands, FeatureSGPRInitBug, FeatureISAVersion8_0_2, + FeatureLDSBankCount32] +>; + +def : ProcessorModel<"gfx803", SIQuarterSpeedModel, + [FeatureVolcanicIslands, FeatureISAVersion8_0_3, FeatureLDSBankCount32] +>; + +def : ProcessorModel<"gfx804", SIQuarterSpeedModel, + [FeatureVolcanicIslands, FeatureISAVersion8_0_4, FeatureLDSBankCount32] +>; + +def : ProcessorModel<"gfx810", SIQuarterSpeedModel, + [FeatureVolcanicIslands, FeatureISAVersion8_1_0, FeatureLDSBankCount16, FeatureXNACK] +>; + def : ProcessorModel<"gfx900", SIQuarterSpeedModel, [FeatureGFX9, FeatureISAVersion9_0_0, FeatureLDSBankCount32] >; Index: lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp =================================================================== --- lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp +++ lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp @@ -93,6 +93,9 @@ if (Features.test(FeatureISAVersion7_0_1)) return {7, 0, 1}; + if (Features.test(FeatureISAVersion7_0_2)) + return {7, 0, 2}; + if (Features.test(FeatureISAVersion8_0_0)) return {8, 0, 0}; @@ -105,6 +108,12 @@ if (Features.test(FeatureISAVersion8_0_3)) return {8, 0, 3}; + if (Features.test(FeatureISAVersion8_0_4)) + return {8, 0, 4}; + + if (Features.test(FeatureISAVersion8_1_0)) + return {8, 1, 0}; + if (Features.test(FeatureISAVersion9_0_0)) return {9, 0, 0}; Index: test/CodeGen/AMDGPU/hsa-note-no-func.ll =================================================================== --- test/CodeGen/AMDGPU/hsa-note-no-func.ll +++ test/CodeGen/AMDGPU/hsa-note-no-func.ll @@ -1,16 +1,30 @@ -; RUN: llc < %s -mtriple=amdgcn--amdhsa -mcpu=kaveri | FileCheck --check-prefix=HSA --check-prefix=HSA-CI %s +; RUN: llc < %s -mtriple=amdgcn--amdhsa -mcpu=gfx700 | FileCheck --check-prefix=HSA --check-prefix=HSA-CI700 %s +; RUN: llc < %s -mtriple=amdgcn--amdhsa -mcpu=gfx701 | FileCheck --check-prefix=HSA --check-prefix=HSA-CI701 %s +; RUN: llc < %s -mtriple=amdgcn--amdhsa -mcpu=gfx702 | FileCheck --check-prefix=HSA --check-prefix=HSA-CI702 %s +; RUN: llc < %s -mtriple=amdgcn--amdhsa -mcpu=kaveri | FileCheck --check-prefix=HSA --check-prefix=HSA-CI700 %s ; RUN: llc < %s -mtriple=amdgcn--amdhsa -mcpu=carrizo | FileCheck --check-prefix=HSA --check-prefix=HSA-VI801 %s ; RUN: llc < %s -mtriple=amdgcn--amdhsa -mcpu=tonga | FileCheck --check-prefix=HSA --check-prefix=HSA-VI802 %s ; RUN: llc < %s -mtriple=amdgcn--amdhsa -mcpu=fiji | FileCheck --check-prefix=HSA --check-prefix=HSA-VI803 %s ; RUN: llc < %s -mtriple=amdgcn--amdhsa -mcpu=polaris10 | FileCheck --check-prefix=HSA --check-prefix=HSA-VI803 %s ; RUN: llc < %s -mtriple=amdgcn--amdhsa -mcpu=polaris11 | FileCheck --check-prefix=HSA --check-prefix=HSA-VI803 %s +; RUN: llc < %s -mtriple=amdgcn--amdhsa -mcpu=gfx800 | FileCheck --check-prefix=HSA --check-prefix=HSA-VI800 %s +; RUN: llc < %s -mtriple=amdgcn--amdhsa -mcpu=gfx801 | FileCheck --check-prefix=HSA --check-prefix=HSA-VI801 %s +; RUN: llc < %s -mtriple=amdgcn--amdhsa -mcpu=gfx802 | FileCheck --check-prefix=HSA --check-prefix=HSA-VI802 %s +; RUN: llc < %s -mtriple=amdgcn--amdhsa -mcpu=gfx803 | FileCheck --check-prefix=HSA --check-prefix=HSA-VI803 %s +; RUN: llc < %s -mtriple=amdgcn--amdhsa -mcpu=gfx804 | FileCheck --check-prefix=HSA --check-prefix=HSA-VI804 %s +; RUN: llc < %s -mtriple=amdgcn--amdhsa -mcpu=gfx810 | FileCheck --check-prefix=HSA --check-prefix=HSA-VI810 %s ; RUN: llc < %s -mtriple=amdgcn--amdhsa -mcpu=gfx900 | FileCheck --check-prefix=HSA --check-prefix=HSA-GFX900 %s ; RUN: llc < %s -mtriple=amdgcn--amdhsa -mcpu=gfx901 | FileCheck --check-prefix=HSA --check-prefix=HSA-GFX901 %s ; HSA: .hsa_code_object_version 2,1 -; HSA-CI: .hsa_code_object_isa 7,0,0,"AMD","AMDGPU" +; HSA-CI700: .hsa_code_object_isa 7,0,0,"AMD","AMDGPU" +; HSA-CI701: .hsa_code_object_isa 7,0,1,"AMD","AMDGPU" +; HSA-CI702: .hsa_code_object_isa 7,0,2,"AMD","AMDGPU" +; HSA-VI800: .hsa_code_object_isa 8,0,0,"AMD","AMDGPU" ; HSA-VI801: .hsa_code_object_isa 8,0,1,"AMD","AMDGPU" ; HSA-VI802: .hsa_code_object_isa 8,0,2,"AMD","AMDGPU" ; HSA-VI803: .hsa_code_object_isa 8,0,3,"AMD","AMDGPU" +; HSA-VI804: .hsa_code_object_isa 8,0,4,"AMD","AMDGPU" +; HSA-VI810: .hsa_code_object_isa 8,1,0,"AMD","AMDGPU" ; HSA-GFX900: .hsa_code_object_isa 9,0,0,"AMD","AMDGPU" ; HSA-GFX901: .hsa_code_object_isa 9,0,1,"AMD","AMDGPU"