summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/AMDGPU/Utils
diff options
context:
space:
mode:
authorStanislav Mekhanoshin <Stanislav.Mekhanoshin@amd.com>2018-03-06 18:33:55 +0000
committerStanislav Mekhanoshin <Stanislav.Mekhanoshin@amd.com>2018-03-06 18:33:55 +0000
commit0f72225433d46561b9b4764970536c7b9c9c7055 (patch)
treeb4f7de4502bbaadb040505810cab807c3aa31f6b /llvm/lib/Target/AMDGPU/Utils
parent122d9e79ae0fcc41be6066c3928dd59e5cc59ca6 (diff)
downloadbcm5719-llvm-0f72225433d46561b9b4764970536c7b9c9c7055.tar.gz
bcm5719-llvm-0f72225433d46561b9b4764970536c7b9c9c7055.zip
[AMDGPU] Add default ISA version targets
In case if -mattr used to modify feature set bits in llvm-mc call getIsaVersion can fail to identify specific ISA due to test mismatch. Adding default fallback tests which will always correctly report at least major version. Differential Revision: https://reviews.llvm.org/D44163 llvm-svn: 326825
Diffstat (limited to 'llvm/lib/Target/AMDGPU/Utils')
-rw-r--r--llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp b/llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp
index 7848a29cc53..69572b85e1c 100644
--- a/llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp
+++ b/llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp
@@ -206,6 +206,8 @@ IsaVersion getIsaVersion(const FeatureBitset &Features) {
return {7, 0, 3};
if (Features.test(FeatureISAVersion7_0_4))
return {7, 0, 4};
+ if (Features.test(FeatureSeaIslands))
+ return {7, 0, 0};
// GCN GFX8 (Volcanic Islands (VI)).
if (Features.test(FeatureISAVersion8_0_1))
@@ -216,12 +218,16 @@ IsaVersion getIsaVersion(const FeatureBitset &Features) {
return {8, 0, 3};
if (Features.test(FeatureISAVersion8_1_0))
return {8, 1, 0};
+ if (Features.test(FeatureVolcanicIslands))
+ return {8, 0, 0};
// GCN GFX9.
if (Features.test(FeatureISAVersion9_0_0))
return {9, 0, 0};
if (Features.test(FeatureISAVersion9_0_2))
return {9, 0, 2};
+ if (Features.test(FeatureGFX9))
+ return {9, 0, 0};
if (!Features.test(FeatureGCN) || Features.test(FeatureSouthernIslands))
return {0, 0, 0};
OpenPOWER on IntegriCloud