Index: lib/Basic/Targets/AMDGPU.h =================================================================== --- lib/Basic/Targets/AMDGPU.h +++ lib/Basic/Targets/AMDGPU.h @@ -64,6 +64,7 @@ GK_GFX9 } GPU; + std::string GPUName; bool hasFP64 : 1; bool hasFMAF : 1; bool hasLDEXPF : 1; @@ -162,6 +163,8 @@ else GPU = parseR600Name(Name); + if (GPU != GK_NONE) + GPUName = Name; return GPU != GK_NONE; } Index: lib/Basic/Targets/AMDGPU.cpp =================================================================== --- lib/Basic/Targets/AMDGPU.cpp +++ lib/Basic/Targets/AMDGPU.cpp @@ -256,34 +256,39 @@ AMDGPUTargetInfo::GPUKind AMDGPUTargetInfo::parseAMDGCNName(StringRef Name) { return llvm::StringSwitch(Name) + .Case("gfx600", GK_GFX6) .Case("tahiti", GK_GFX6) + .Case("gfx601", GK_GFX6) .Case("pitcairn", GK_GFX6) .Case("verde", GK_GFX6) .Case("oland", GK_GFX6) .Case("hainan", GK_GFX6) + .Case("gfx700", GK_GFX7) .Case("bonaire", GK_GFX7) - .Case("kabini", GK_GFX7) .Case("kaveri", GK_GFX7) - .Case("hawaii", GK_GFX7) - .Case("mullins", GK_GFX7) - .Case("gfx700", GK_GFX7) .Case("gfx701", GK_GFX7) + .Case("hawaii", GK_GFX7) .Case("gfx702", GK_GFX7) - .Case("tonga", GK_GFX8) + .Case("gfx703", GK_GFX7) + .Case("kabini", GK_GFX7) + .Case("mullins", GK_GFX7) + .Case("gfx800", GK_GFX8) .Case("iceland", GK_GFX8) + .Case("gfx801", GK_GFX8) .Case("carrizo", GK_GFX8) + .Case("gfx802", GK_GFX8) + .Case("tonga", GK_GFX8) + .Case("gfx803", GK_GFX8) .Case("fiji", GK_GFX8) - .Case("stoney", GK_GFX8) .Case("polaris10", GK_GFX8) .Case("polaris11", GK_GFX8) - .Case("gfx800", GK_GFX8) - .Case("gfx801", GK_GFX8) - .Case("gfx802", GK_GFX8) - .Case("gfx803", GK_GFX8) .Case("gfx804", GK_GFX8) .Case("gfx810", GK_GFX8) + .Case("stoney", GK_GFX8) .Case("gfx900", GK_GFX9) .Case("gfx901", GK_GFX9) + .Case("gfx902", GK_GFX9) + .Case("gfx903", GK_GFX9) .Default(GK_NONE); } @@ -300,7 +305,7 @@ AMDGPUTargetInfo::AMDGPUTargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts) : TargetInfo(Triple), GPU(isAMDGCN(Triple) ? GK_GFX6 : GK_R600), - hasFP64(false), hasFMAF(false), hasLDEXPF(false), + GPUName(""), hasFP64(false), hasFMAF(false), hasLDEXPF(false), AS(isGenericZero(Triple)) { if (getTriple().getArch() == llvm::Triple::amdgcn) { hasFP64 = true; @@ -355,4 +360,9 @@ Builder.defineMacro("__HAS_LDEXPF__"); if (hasFP64) Builder.defineMacro("__HAS_FP64__"); + + if (GPUName.empty()) + return; + + Builder.defineMacro(Twine("__") + Twine(GPUName) + Twine("__")); } Index: test/Driver/amdgcn-mcpu-macro.cl =================================================================== --- test/Driver/amdgcn-mcpu-macro.cl +++ test/Driver/amdgcn-mcpu-macro.cl @@ -0,0 +1,67 @@ +// RUN: %clang -target amdgcn -mcpu=gfx600 -E -dM %s | FileCheck --check-prefix=GFX600-CHECK %s +// RUN: %clang -target amdgcn -mcpu=tahiti -E -dM %s | FileCheck --check-prefix=TAHITI-CHECK %s +// RUN: %clang -target amdgcn -mcpu=gfx601 -E -dM %s | FileCheck --check-prefix=GFX601-CHECK %s +// RUN: %clang -target amdgcn -mcpu=pitcairn -E -dM %s | FileCheck --check-prefix=PITCAIRN-CHECK %s +// RUN: %clang -target amdgcn -mcpu=verde -E -dM %s | FileCheck --check-prefix=VERDE-CHECK %s +// RUN: %clang -target amdgcn -mcpu=oland -E -dM %s | FileCheck --check-prefix=OLAND-CHECK %s +// RUN: %clang -target amdgcn -mcpu=hainan -E -dM %s | FileCheck --check-prefix=HAINAN-CHECK %s +// RUN: %clang -target amdgcn -mcpu=gfx700 -E -dM %s | FileCheck --check-prefix=GFX700-CHECK %s +// RUN: %clang -target amdgcn -mcpu=bonaire -E -dM %s | FileCheck --check-prefix=BONAIRE-CHECK %s +// RUN: %clang -target amdgcn -mcpu=kaveri -E -dM %s | FileCheck --check-prefix=KAVERI-CHECK %s +// RUN: %clang -target amdgcn -mcpu=gfx701 -E -dM %s | FileCheck --check-prefix=GFX701-CHECK %s +// RUN: %clang -target amdgcn -mcpu=hawaii -E -dM %s | FileCheck --check-prefix=HAWAII-CHECK %s +// RUN: %clang -target amdgcn -mcpu=gfx702 -E -dM %s | FileCheck --check-prefix=GFX702-CHECK %s +// RUN: %clang -target amdgcn -mcpu=gfx703 -E -dM %s | FileCheck --check-prefix=GFX703-CHECK %s +// RUN: %clang -target amdgcn -mcpu=kabini -E -dM %s | FileCheck --check-prefix=KABINI-CHECK %s +// RUN: %clang -target amdgcn -mcpu=mullins -E -dM %s | FileCheck --check-prefix=MULLINS-CHECK %s +// RUN: %clang -target amdgcn -mcpu=gfx800 -E -dM %s | FileCheck --check-prefix=GFX800-CHECK %s +// RUN: %clang -target amdgcn -mcpu=iceland -E -dM %s | FileCheck --check-prefix=ICELAND-CHECK %s +// RUN: %clang -target amdgcn -mcpu=gfx801 -E -dM %s | FileCheck --check-prefix=GFX801-CHECK %s +// RUN: %clang -target amdgcn -mcpu=carrizo -E -dM %s | FileCheck --check-prefix=CARRIZO-CHECK %s +// RUN: %clang -target amdgcn -mcpu=gfx802 -E -dM %s | FileCheck --check-prefix=GFX802-CHECK %s +// RUN: %clang -target amdgcn -mcpu=tonga -E -dM %s | FileCheck --check-prefix=TONGA-CHECK %s +// RUN: %clang -target amdgcn -mcpu=gfx803 -E -dM %s | FileCheck --check-prefix=GFX803-CHECK %s +// RUN: %clang -target amdgcn -mcpu=fiji -E -dM %s | FileCheck --check-prefix=FIJI-CHECK %s +// RUN: %clang -target amdgcn -mcpu=polaris10 -E -dM %s | FileCheck --check-prefix=POLARIS10-CHECK %s +// RUN: %clang -target amdgcn -mcpu=polaris11 -E -dM %s | FileCheck --check-prefix=POLARIS11-CHECK %s +// RUN: %clang -target amdgcn -mcpu=gfx804 -E -dM %s | FileCheck --check-prefix=GFX804-CHECK %s +// RUN: %clang -target amdgcn -mcpu=gfx810 -E -dM %s | FileCheck --check-prefix=GFX810-CHECK %s +// RUN: %clang -target amdgcn -mcpu=stoney -E -dM %s | FileCheck --check-prefix=STONEY-CHECK %s +// RUN: %clang -target amdgcn -mcpu=gfx900 -E -dM %s | FileCheck --check-prefix=GFX900-CHECK %s +// RUN: %clang -target amdgcn -mcpu=gfx901 -E -dM %s | FileCheck --check-prefix=GFX901-CHECK %s +// RUN: %clang -target amdgcn -mcpu=gfx902 -E -dM %s | FileCheck --check-prefix=GFX902-CHECK %s +// RUN: %clang -target amdgcn -mcpu=gfx903 -E -dM %s | FileCheck --check-prefix=GFX903-CHECK %s + +// GFX600-CHECK: #define __gfx600__ +// TAHITI-CHECK: #define __tahiti__ +// GFX601-CHECK: #define __gfx601__ +// PITCAIRN-CHECK: #define __pitcairn__ +// VERDE-CHECK: #define __verde__ +// OLAND-CHECK: #define __oland__ +// HAINAN-CHECK: #define __hainan__ +// GFX700-CHECK: #define __gfx700__ +// BONAIRE-CHECK: #define __bonaire__ +// KAVERI-CHECK: #define __kaveri__ +// GFX701-CHECK: #define __gfx701__ +// HAWAII-CHECK: #define __hawaii__ +// GFX702-CHECK: #define __gfx702__ +// GFX703-CHECK: #define __gfx703__ +// KABINI-CHECK: #define __kabini__ +// MULLINS-CHECK: #define __mullins__ +// GFX800-CHECK: #define __gfx800__ +// ICELAND-CHECK: #define __iceland__ +// GFX801-CHECK: #define __gfx801__ +// CARRIZO-CHECK: #define __carrizo__ +// GFX802-CHECK: #define __gfx802__ +// TONGA-CHECK: #define __tonga__ +// GFX803-CHECK: #define __gfx803__ +// FIJI-CHECK: #define __fiji__ +// POLARIS10-CHECK: #define __polaris10__ +// POLARIS11-CHECK: #define __polaris11__ +// GFX804-CHECK: #define __gfx804__ +// GFX810-CHECK: #define __gfx810__ +// STONEY-CHECK: #define __stoney__ +// GFX900-CHECK: #define __gfx900__ +// GFX901-CHECK: #define __gfx901__ +// GFX902-CHECK: #define __gfx902__ +// GFX903-CHECK: #define __gfx903__ Index: test/Driver/r600-mcpu-macro.cl =================================================================== --- test/Driver/r600-mcpu-macro.cl +++ test/Driver/r600-mcpu-macro.cl @@ -0,0 +1,42 @@ +// RUN: %clang -target r600 -mcpu=r600 -E -dM %s | FileCheck --check-prefix=R600-CHECK %s +// RUN: %clang -target r600 -mcpu=rv630 -E -dM %s | FileCheck --check-prefix=R600-CHECK %s +// RUN: %clang -target r600 -mcpu=rv635 -E -dM %s | FileCheck --check-prefix=R600-CHECK %s +// RUN: %clang -target r600 -mcpu=rv610 -E -dM %s | FileCheck --check-prefix=RS880-CHECK %s +// RUN: %clang -target r600 -mcpu=rv620 -E -dM %s | FileCheck --check-prefix=RS880-CHECK %s +// RUN: %clang -target r600 -mcpu=rs780 -E -dM %s | FileCheck --check-prefix=RS880-CHECK %s +// RUN: %clang -target r600 -mcpu=rs880 -E -dM %s | FileCheck --check-prefix=RS880-CHECK %s +// RUN: %clang -target r600 -mcpu=rv670 -E -dM %s | FileCheck --check-prefix=RV670-CHECK %s +// RUN: %clang -target r600 -mcpu=rv710 -E -dM %s | FileCheck --check-prefix=RV710-CHECK %s +// RUN: %clang -target r600 -mcpu=rv730 -E -dM %s | FileCheck --check-prefix=RV730-CHECK %s +// RUN: %clang -target r600 -mcpu=rv740 -E -dM %s | FileCheck --check-prefix=RV770-CHECK %s +// RUN: %clang -target r600 -mcpu=rv770 -E -dM %s | FileCheck --check-prefix=RV770-CHECK %s +// RUN: %clang -target r600 -mcpu=palm -E -dM %s | FileCheck --check-prefix=CEDAR-CHECK %s +// RUN: %clang -target r600 -mcpu=cedar -E -dM %s | FileCheck --check-prefix=CEDAR-CHECK %s +// RUN: %clang -target r600 -mcpu=sumo -E -dM %s | FileCheck --check-prefix=SUMO-CHECK %s +// RUN: %clang -target r600 -mcpu=sumo2 -E -dM %s | FileCheck --check-prefix=SUMO-CHECK %s +// RUN: %clang -target r600 -mcpu=redwood -E -dM %s | FileCheck --check-prefix=REDWOOD-CHECK %s +// RUN: %clang -target r600 -mcpu=juniper -E -dM %s | FileCheck --check-prefix=JUNIPER-CHECK %s +// RUN: %clang -target r600 -mcpu=juniper -E -dM %s | FileCheck --check-prefix=JUNIPER-CHECK %s +// RUN: %clang -target r600 -mcpu=hemlock -E -dM %s | FileCheck --check-prefix=CYPRESS-CHECK %s +// RUN: %clang -target r600 -mcpu=cypress -E -dM %s | FileCheck --check-prefix=CYPRESS-CHECK %s +// RUN: %clang -target r600 -mcpu=barts -E -dM %s | FileCheck --check-prefix=BARTS-CHECK %s +// RUN: %clang -target r600 -mcpu=turks -E -dM %s | FileCheck --check-prefix=TURKS-CHECK %s +// RUN: %clang -target r600 -mcpu=caicos -E -dM %s | FileCheck --check-prefix=CAICOS-CHECK %s +// RUN: %clang -target r600 -mcpu=cayman -E -dM %s | FileCheck --check-prefix=CAYMAN-CHECK %s +// RUN: %clang -target r600 -mcpu=aruba -E -dM %s | FileCheck --check-prefix=CAYMAN-CHECK %s + +// R600-CHECK: #define __r600__ +// RS880-CHECK: #define __rs880__ +// RV670-CHECK: #define __rv670__ +// RV710-CHECK: #define __rv710__ +// RV730-CHECK: #define __rv730__ +// RV770-CHECK: #define __rv770__ +// CEDAR-CHECK: #define __cedar__ +// REDWOOD-CHECK: #define __redwood__ +// SUMO-CHECK: #define __sumo__ +// JUNIPER-CHECK: #define __juniper__ +// CYPRESS-CHECK: #define __cypress__ +// BARTS-CHECK: #define __barts__ +// TURKS-CHECK: #define __turks__ +// CAICOS-CHECK: #define __caicos__ +// CAYMAN-CHECK: #define __cayman__ Index: test/Driver/r600-mcpu.cl =================================================================== --- test/Driver/r600-mcpu.cl +++ test/Driver/r600-mcpu.cl @@ -1,4 +1,4 @@ -t// Check that -mcpu works for all supported GPUs +// Check that -mcpu works for all supported GPUs // RUN: %clang -### -target r600 -x cl -S -emit-llvm -mcpu=r600 %s -o - 2>&1 | FileCheck --check-prefix=R600-CHECK %s // RUN: %clang -### -target r600 -x cl -S -emit-llvm -mcpu=rv630 %s -o - 2>&1 | FileCheck --check-prefix=R600-CHECK %s @@ -26,22 +26,6 @@ // RUN: %clang -### -target r600 -x cl -S -emit-llvm -mcpu=caicos %s -o - 2>&1 | FileCheck --check-prefix=CAICOS-CHECK %s // RUN: %clang -### -target r600 -x cl -S -emit-llvm -mcpu=cayman %s -o - 2>&1 | FileCheck --check-prefix=CAYMAN-CHECK %s // RUN: %clang -### -target r600 -x cl -S -emit-llvm -mcpu=aruba %s -o - 2>&1 | FileCheck --check-prefix=CAYMAN-CHECK %s -// RUN: %clang -### -target amdgcn -x cl -S -emit-llvm -mcpu=tahiti %s -o - 2>&1 | FileCheck --check-prefix=TAHITI-CHECK %s -// RUN: %clang -### -target amdgcn -x cl -S -emit-llvm -mcpu=pitcairn %s -o - 2>&1 | FileCheck --check-prefix=PITCAIRN-CHECK %s -// RUN: %clang -### -target amdgcn -x cl -S -emit-llvm -mcpu=verde %s -o - 2>&1 | FileCheck --check-prefix=VERDE-CHECK %s -// RUN: %clang -### -target amdgcn -x cl -S -emit-llvm -mcpu=oland %s -o - 2>&1 | FileCheck --check-prefix=OLAND-CHECK %s -// RUN: %clang -### -target amdgcn -x cl -S -emit-llvm -mcpu=bonaire %s -o - 2>&1 | FileCheck --check-prefix=BONAIRE-CHECK %s -// RUN: %clang -### -target amdgcn -x cl -S -emit-llvm -mcpu=kabini %s -o - 2>&1 | FileCheck --check-prefix=KABINI-CHECK %s -// RUN: %clang -### -target amdgcn -x cl -S -emit-llvm -mcpu=kaveri %s -o - 2>&1 | FileCheck --check-prefix=KAVERI-CHECK %s -// RUN: %clang -### -target amdgcn -x cl -S -emit-llvm -mcpu=hawaii %s -o - 2>&1 | FileCheck --check-prefix=HAWAII-CHECK %s -// RUN: %clang -### -target amdgcn -x cl -S -emit-llvm -mcpu=mullins %s -o - 2>&1 | FileCheck --check-prefix=MULLINS-CHECK %s -// RUN: %clang -### -target amdgcn -x cl -S -emit-llvm -mcpu=tonga %s -o - 2>&1 | FileCheck --check-prefix=TONGA-CHECK %s -// RUN: %clang -### -target amdgcn -x cl -S -emit-llvm -mcpu=iceland %s -o - 2>&1 | FileCheck --check-prefix=ICELAND-CHECK %s -// RUN: %clang -### -target amdgcn -x cl -S -emit-llvm -mcpu=carrizo %s -o - 2>&1 | FileCheck --check-prefix=CARRIZO-CHECK %s -// RUN: %clang -### -target amdgcn -x cl -S -emit-llvm -mcpu=fiji %s -o - 2>&1 | FileCheck --check-prefix=FIJI-CHECK %s -// RUN: %clang -### -target amdgcn -x cl -S -emit-llvm -mcpu=stoney %s -o - 2>&1 | FileCheck --check-prefix=STONEY-CHECK %s -// RUN: %clang -### -target amdgcn -x cl -S -emit-llvm -mcpu=gfx900 %s -o - 2>&1 | FileCheck --check-prefix=GFX900-CHECK %s -// RUN: %clang -### -target amdgcn -x cl -S -emit-llvm -mcpu=gfx901 %s -o - 2>&1 | FileCheck --check-prefix=GFX901-CHECK %s // R600-CHECK: "-target-cpu" "r600" // RS880-CHECK: "-target-cpu" "rs880" @@ -58,19 +42,71 @@ // TURKS-CHECK: "-target-cpu" "turks" // CAICOS-CHECK: "-target-cpu" "caicos" // CAYMAN-CHECK: "-target-cpu" "cayman" + +// RUN: %clang -### -target amdgcn -x cl -S -emit-llvm -mcpu=gfx600 %s -o - 2>&1 | FileCheck --check-prefix=GFX600-CHECK %s +// RUN: %clang -### -target amdgcn -x cl -S -emit-llvm -mcpu=tahiti %s -o - 2>&1 | FileCheck --check-prefix=TAHITI-CHECK %s +// RUN: %clang -### -target amdgcn -x cl -S -emit-llvm -mcpu=gfx601 %s -o - 2>&1 | FileCheck --check-prefix=GFX601-CHECK %s +// RUN: %clang -### -target amdgcn -x cl -S -emit-llvm -mcpu=pitcairn %s -o - 2>&1 | FileCheck --check-prefix=PITCAIRN-CHECK %s +// RUN: %clang -### -target amdgcn -x cl -S -emit-llvm -mcpu=verde %s -o - 2>&1 | FileCheck --check-prefix=VERDE-CHECK %s +// RUN: %clang -### -target amdgcn -x cl -S -emit-llvm -mcpu=oland %s -o - 2>&1 | FileCheck --check-prefix=OLAND-CHECK %s +// RUN: %clang -### -target amdgcn -x cl -S -emit-llvm -mcpu=hainan %s -o - 2>&1 | FileCheck --check-prefix=HAINAN-CHECK %s +// RUN: %clang -### -target amdgcn -x cl -S -emit-llvm -mcpu=gfx700 %s -o - 2>&1 | FileCheck --check-prefix=GFX700-CHECK %s +// RUN: %clang -### -target amdgcn -x cl -S -emit-llvm -mcpu=bonaire %s -o - 2>&1 | FileCheck --check-prefix=BONAIRE-CHECK %s +// RUN: %clang -### -target amdgcn -x cl -S -emit-llvm -mcpu=kaveri %s -o - 2>&1 | FileCheck --check-prefix=KAVERI-CHECK %s +// RUN: %clang -### -target amdgcn -x cl -S -emit-llvm -mcpu=gfx701 %s -o - 2>&1 | FileCheck --check-prefix=GFX701-CHECK %s +// RUN: %clang -### -target amdgcn -x cl -S -emit-llvm -mcpu=hawaii %s -o - 2>&1 | FileCheck --check-prefix=HAWAII-CHECK %s +// RUN: %clang -### -target amdgcn -x cl -S -emit-llvm -mcpu=gfx702 %s -o - 2>&1 | FileCheck --check-prefix=GFX702-CHECK %s +// RUN: %clang -### -target amdgcn -x cl -S -emit-llvm -mcpu=gfx703 %s -o - 2>&1 | FileCheck --check-prefix=GFX703-CHECK %s +// RUN: %clang -### -target amdgcn -x cl -S -emit-llvm -mcpu=kabini %s -o - 2>&1 | FileCheck --check-prefix=KABINI-CHECK %s +// RUN: %clang -### -target amdgcn -x cl -S -emit-llvm -mcpu=mullins %s -o - 2>&1 | FileCheck --check-prefix=MULLINS-CHECK %s +// RUN: %clang -### -target amdgcn -x cl -S -emit-llvm -mcpu=gfx800 %s -o - 2>&1 | FileCheck --check-prefix=GFX800-CHECK %s +// RUN: %clang -### -target amdgcn -x cl -S -emit-llvm -mcpu=iceland %s -o - 2>&1 | FileCheck --check-prefix=ICELAND-CHECK %s +// RUN: %clang -### -target amdgcn -x cl -S -emit-llvm -mcpu=gfx801 %s -o - 2>&1 | FileCheck --check-prefix=GFX801-CHECK %s +// RUN: %clang -### -target amdgcn -x cl -S -emit-llvm -mcpu=carrizo %s -o - 2>&1 | FileCheck --check-prefix=CARRIZO-CHECK %s +// RUN: %clang -### -target amdgcn -x cl -S -emit-llvm -mcpu=gfx802 %s -o - 2>&1 | FileCheck --check-prefix=GFX802-CHECK %s +// RUN: %clang -### -target amdgcn -x cl -S -emit-llvm -mcpu=tonga %s -o - 2>&1 | FileCheck --check-prefix=TONGA-CHECK %s +// RUN: %clang -### -target amdgcn -x cl -S -emit-llvm -mcpu=gfx803 %s -o - 2>&1 | FileCheck --check-prefix=GFX803-CHECK %s +// RUN: %clang -### -target amdgcn -x cl -S -emit-llvm -mcpu=fiji %s -o - 2>&1 | FileCheck --check-prefix=FIJI-CHECK %s +// RUN: %clang -### -target amdgcn -x cl -S -emit-llvm -mcpu=polaris10 %s -o - 2>&1 | FileCheck --check-prefix=POLARIS10-CHECK %s +// RUN: %clang -### -target amdgcn -x cl -S -emit-llvm -mcpu=polaris11 %s -o - 2>&1 | FileCheck --check-prefix=POLARIS11-CHECK %s +// RUN: %clang -### -target amdgcn -x cl -S -emit-llvm -mcpu=gfx804 %s -o - 2>&1 | FileCheck --check-prefix=GFX804-CHECK %s +// RUN: %clang -### -target amdgcn -x cl -S -emit-llvm -mcpu=gfx810 %s -o - 2>&1 | FileCheck --check-prefix=GFX810-CHECK %s +// RUN: %clang -### -target amdgcn -x cl -S -emit-llvm -mcpu=stoney %s -o - 2>&1 | FileCheck --check-prefix=STONEY-CHECK %s +// RUN: %clang -### -target amdgcn -x cl -S -emit-llvm -mcpu=gfx900 %s -o - 2>&1 | FileCheck --check-prefix=GFX900-CHECK %s +// RUN: %clang -### -target amdgcn -x cl -S -emit-llvm -mcpu=gfx901 %s -o - 2>&1 | FileCheck --check-prefix=GFX901-CHECK %s +// RUN: %clang -### -target amdgcn -x cl -S -emit-llvm -mcpu=gfx902 %s -o - 2>&1 | FileCheck --check-prefix=GFX902-CHECK %s +// RUN: %clang -### -target amdgcn -x cl -S -emit-llvm -mcpu=gfx903 %s -o - 2>&1 | FileCheck --check-prefix=GFX903-CHECK %s + +// GFX600-CHECK: "-target-cpu" "gfx600" // TAHITI-CHECK: "-target-cpu" "tahiti" +// GFX601-CHECK: "-target-cpu" "gfx601" // PITCAIRN-CHECK: "-target-cpu" "pitcairn" // VERDE-CHECK: "-target-cpu" "verde" // OLAND-CHECK: "-target-cpu" "oland" +// HAINAN-CHECK: "-target-cpu" "hainan" +// GFX700-CHECK: "-target-cpu" "gfx700" // BONAIRE-CHECK: "-target-cpu" "bonaire" -// KABINI-CHECK: "-target-cpu" "kabini" // KAVERI-CHECK: "-target-cpu" "kaveri" +// GFX701-CHECK: "-target-cpu" "gfx701" // HAWAII-CHECK: "-target-cpu" "hawaii" +// GFX702-CHECK: "-target-cpu" "gfx702" +// GFX703-CHECK: "-target-cpu" "gfx703" +// KABINI-CHECK: "-target-cpu" "kabini" // MULLINS-CHECK: "-target-cpu" "mullins" -// TONGA-CHECK: "-target-cpu" "tonga" +// GFX800-CHECK: "-target-cpu" "gfx800" // ICELAND-CHECK: "-target-cpu" "iceland" +// GFX801-CHECK: "-target-cpu" "gfx801" // CARRIZO-CHECK: "-target-cpu" "carrizo" +// GFX802-CHECK: "-target-cpu" "gfx802" +// TONGA-CHECK: "-target-cpu" "tonga" +// GFX803-CHECK: "-target-cpu" "gfx803" // FIJI-CHECK: "-target-cpu" "fiji" +// POLARIS10-CHECK: "-target-cpu" "polaris10" +// POLARIS11-CHECK: "-target-cpu" "polaris11" +// GFX804-CHECK: "-target-cpu" "gfx804" +// GFX810-CHECK: "-target-cpu" "gfx810" // STONEY-CHECK: "-target-cpu" "stoney" // GFX900-CHECK: "-target-cpu" "gfx900" // GFX901-CHECK: "-target-cpu" "gfx901" +// GFX902-CHECK: "-target-cpu" "gfx902" +// GFX903-CHECK: "-target-cpu" "gfx903"