From f33af75ca75ff58961a09d8dbc28c56fe9782acc Mon Sep 17 00:00:00 2001 From: Matt Arsenault Date: Sat, 18 Feb 2017 19:02:41 +0000 Subject: [PATCH] AMDGPU: Add gfx900 and gfx901 processors git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@295556 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Basic/Targets.cpp | 5 ++++- test/Driver/r600-mcpu.cl | 4 ++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/Basic/Targets.cpp b/lib/Basic/Targets.cpp index 647b14e16d..d69a0ff4ab 100644 --- a/lib/Basic/Targets.cpp +++ b/lib/Basic/Targets.cpp @@ -2034,7 +2034,8 @@ class AMDGPUTargetInfo final : public TargetInfo { GK_CAYMAN, GK_GFX6, GK_GFX7, - GK_GFX8 + GK_GFX8, + GK_GFX9 } GPU; bool hasFP64:1; @@ -2211,6 +2212,8 @@ public: .Case("gfx803", GK_GFX8) .Case("gfx804", GK_GFX8) .Case("gfx810", GK_GFX8) + .Case("gfx900", GK_GFX9) + .Case("gfx901", GK_GFX9) .Default(GK_NONE); } diff --git a/test/Driver/r600-mcpu.cl b/test/Driver/r600-mcpu.cl index 325e57174c..b99cac3bd7 100644 --- a/test/Driver/r600-mcpu.cl +++ b/test/Driver/r600-mcpu.cl @@ -40,6 +40,8 @@ t// Check that -mcpu works for all supported GPUs // 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" @@ -70,3 +72,5 @@ t// Check that -mcpu works for all supported GPUs // CARRIZO-CHECK: "-target-cpu" "carrizo" // FIJI-CHECK: "-target-cpu" "fiji" // STONEY-CHECK: "-target-cpu" "stoney" +// GFX900-CHECK: "-target-cpu" "gfx900" +// GFX901-CHECK: "-target-cpu" "gfx901" -- 2.40.0