Skip to content
This repository was archived by the owner on Apr 23, 2020. It is now read-only.

Commit fd4aa4b

Browse files
committed
R600: Update GPU variants in -mcpu option
We've added the RS880 variant in the LLVM backend to represent an R600 GPU with no vertex cache, so we need to update the GPU mappings for -mcpu. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181202 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent 745dacf commit fd4aa4b

File tree

2 files changed

+11
-9
lines changed

2 files changed

+11
-9
lines changed

lib/Driver/Tools.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1135,11 +1135,11 @@ static std::string getR600TargetGPU(const ArgList &Args) {
11351135
if (Arg *A = Args.getLastArg(options::OPT_mcpu_EQ)) {
11361136
std::string GPUName = A->getValue();
11371137
return llvm::StringSwitch<const char *>(GPUName)
1138-
.Cases("rv610", "rv620", "rv630", "r600")
1139-
.Cases("rv635", "rs780", "rs880", "r600")
1138+
.Cases("rv630", "rv635", "r600")
1139+
.Cases("rv610", "rv620", "rs780", "rs880")
11401140
.Case("rv740", "rv770")
11411141
.Case("palm", "cedar")
1142-
.Cases("sumo", "sumo2", "redwood")
1142+
.Cases("sumo", "sumo2", "sumo")
11431143
.Case("hemlock", "cypress")
11441144
.Case("aruba", "cayman")
11451145
.Default(GPUName.c_str());

test/Driver/r600-mcpu.cl

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
// Check that -mcpu works for all supported GPUs
22

33
// RUN: %clang -### -target r600 -x cl -S -emit-llvm -mcpu=r600 %s -o - 2>&1 | FileCheck --check-prefix=R600-CHECK %s
4-
// RUN: %clang -### -target r600 -x cl -S -emit-llvm -mcpu=rv610 %s -o - 2>&1 | FileCheck --check-prefix=R600-CHECK %s
5-
// RUN: %clang -### -target r600 -x cl -S -emit-llvm -mcpu=rv620 %s -o - 2>&1 | FileCheck --check-prefix=R600-CHECK %s
64
// RUN: %clang -### -target r600 -x cl -S -emit-llvm -mcpu=rv630 %s -o - 2>&1 | FileCheck --check-prefix=R600-CHECK %s
75
// RUN: %clang -### -target r600 -x cl -S -emit-llvm -mcpu=rv635 %s -o - 2>&1 | FileCheck --check-prefix=R600-CHECK %s
8-
// RUN: %clang -### -target r600 -x cl -S -emit-llvm -mcpu=rs780 %s -o - 2>&1 | FileCheck --check-prefix=R600-CHECK %s
9-
// RUN: %clang -### -target r600 -x cl -S -emit-llvm -mcpu=rs880 %s -o - 2>&1 | FileCheck --check-prefix=R600-CHECK %s
6+
// RUN: %clang -### -target r600 -x cl -S -emit-llvm -mcpu=rv610 %s -o - 2>&1 | FileCheck --check-prefix=RS880-CHECK %s
7+
// RUN: %clang -### -target r600 -x cl -S -emit-llvm -mcpu=rv620 %s -o - 2>&1 | FileCheck --check-prefix=RS880-CHECK %s
8+
// RUN: %clang -### -target r600 -x cl -S -emit-llvm -mcpu=rs780 %s -o - 2>&1 | FileCheck --check-prefix=RS880-CHECK %s
9+
// RUN: %clang -### -target r600 -x cl -S -emit-llvm -mcpu=rs880 %s -o - 2>&1 | FileCheck --check-prefix=RS880-CHECK %s
1010
// RUN: %clang -### -target r600 -x cl -S -emit-llvm -mcpu=rv670 %s -o - 2>&1 | FileCheck --check-prefix=RV670-CHECK %s
1111
// RUN: %clang -### -target r600 -x cl -S -emit-llvm -mcpu=rv710 %s -o - 2>&1 | FileCheck --check-prefix=RV710-CHECK %s
1212
// RUN: %clang -### -target r600 -x cl -S -emit-llvm -mcpu=rv730 %s -o - 2>&1 | FileCheck --check-prefix=RV730-CHECK %s
1313
// RUN: %clang -### -target r600 -x cl -S -emit-llvm -mcpu=rv740 %s -o - 2>&1 | FileCheck --check-prefix=RV770-CHECK %s
1414
// RUN: %clang -### -target r600 -x cl -S -emit-llvm -mcpu=rv770 %s -o - 2>&1 | FileCheck --check-prefix=RV770-CHECK %s
1515
// RUN: %clang -### -target r600 -x cl -S -emit-llvm -mcpu=palm %s -o - 2>&1 | FileCheck --check-prefix=CEDAR-CHECK %s
1616
// RUN: %clang -### -target r600 -x cl -S -emit-llvm -mcpu=cedar %s -o - 2>&1 | FileCheck --check-prefix=CEDAR-CHECK %s
17-
// RUN: %clang -### -target r600 -x cl -S -emit-llvm -mcpu=sumo %s -o - 2>&1 | FileCheck --check-prefix=REDWOOD-CHECK %s
18-
// RUN: %clang -### -target r600 -x cl -S -emit-llvm -mcpu=sumo2 %s -o - 2>&1 | FileCheck --check-prefix=REDWOOD-CHECK %s
17+
// RUN: %clang -### -target r600 -x cl -S -emit-llvm -mcpu=sumo %s -o - 2>&1 | FileCheck --check-prefix=SUMO-CHECK %s
18+
// RUN: %clang -### -target r600 -x cl -S -emit-llvm -mcpu=sumo2 %s -o - 2>&1 | FileCheck --check-prefix=SUMO-CHECK %s
1919
// RUN: %clang -### -target r600 -x cl -S -emit-llvm -mcpu=redwood %s -o - 2>&1 | FileCheck --check-prefix=REDWOOD-CHECK %s
2020
// RUN: %clang -### -target r600 -x cl -S -emit-llvm -mcpu=juniper %s -o - 2>&1 | FileCheck --check-prefix=JUNIPER-CHECK %s
2121
// RUN: %clang -### -target r600 -x cl -S -emit-llvm -mcpu=juniper %s -o - 2>&1 | FileCheck --check-prefix=JUNIPER-CHECK %s
@@ -32,12 +32,14 @@
3232
// RUN: %clang -### -target r600 -x cl -S -emit-llvm -mcpu=oland %s -o - 2>&1 | FileCheck --check-prefix=OLAND-CHECK %s
3333

3434
// R600-CHECK: "-target-cpu" "r600"
35+
// RS880-CHECK: "-target-cpu" "rs880"
3536
// RV670-CHECK: "-target-cpu" "rv670"
3637
// RV710-CHECK: "-target-cpu" "rv710"
3738
// RV730-CHECK: "-target-cpu" "rv730"
3839
// RV770-CHECK: "-target-cpu" "rv770"
3940
// CEDAR-CHECK: "-target-cpu" "cedar"
4041
// REDWOOD-CHECK: "-target-cpu" "redwood"
42+
// SUMO-CHECK: "-target-cpu" "sumo"
4143
// JUNIPER-CHECK: "-target-cpu" "juniper"
4244
// CYPRESS-CHECK: "-target-cpu" "cypress"
4345
// BARTS-CHECK: "-target-cpu" "barts"

0 commit comments

Comments
 (0)