R600: Use a Southern Islands GPU as the default for the amdgcn target

llvm-svn: 227315
This commit is contained in:
Tom Stellard 2015-01-28 15:38:44 +00:00
parent eba5648ad2
commit d99fb956a3
2 changed files with 14 additions and 2 deletions

View File

@ -1597,8 +1597,15 @@ class R600TargetInfo : public TargetInfo {
public:
R600TargetInfo(const llvm::Triple &Triple)
: TargetInfo(Triple), GPU(GK_R600) {
DescriptionString = DescriptionStringR600;
: TargetInfo(Triple) {
if (Triple.getArch() == llvm::Triple::amdgcn) {
DescriptionString = DescriptionStringSI;
GPU = GK_SOUTHERN_ISLANDS;
} else {
DescriptionString = DescriptionStringR600;
GPU = GK_R600;
}
AddrSpaceMap = &R600AddrSpaceMap;
UseAddrSpaceMapMangling = true;
}

View File

@ -122,6 +122,11 @@
// RUN: | FileCheck %s -check-prefix=R600SI
// R600SI: target datalayout = "e-p:32:32-p1:64:64-p2:64:64-p3:32:32-p4:64:64-p5:32:32-p24:64:64-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-v2048:2048-n32:64"
// Test default -target-cpu
// RUN: %clang_cc1 -triple amdgcn-unknown -o - -emit-llvm %s \
// RUN: | FileCheck %s -check-prefix=R600SIDefault
// R600SIDefault: target datalayout = "e-p:32:32-p1:64:64-p2:64:64-p3:32:32-p4:64:64-p5:32:32-p24:64:64-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-v2048:2048-n32:64"
// RUN: %clang_cc1 -triple arm64-unknown -o - -emit-llvm %s | \
// RUN: FileCheck %s -check-prefix=AARCH64
// AARCH64: target datalayout = "e-m:e-i64:64-i128:128-n32:64-S128"