r233715 - Add sm_37 target to Clang for NVPTX
Eli Bendersky
eliben at google.com
Tue Mar 31 10:03:16 PDT 2015
Author: eliben
Date: Tue Mar 31 12:03:16 2015
New Revision: 233715
URL: http://llvm.org/viewvc/llvm-project?rev=233715&view=rev
Log:
Add sm_37 target to Clang for NVPTX
Support for this target was added in LLVM r233575 and r233583
Modified:
cfe/trunk/lib/Basic/Targets.cpp
cfe/trunk/test/CodeGen/nvptx-cpus.c
Modified: cfe/trunk/lib/Basic/Targets.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/Targets.cpp?rev=233715&r1=233714&r2=233715&view=diff
==============================================================================
--- cfe/trunk/lib/Basic/Targets.cpp (original)
+++ cfe/trunk/lib/Basic/Targets.cpp Tue Mar 31 12:03:16 2015
@@ -1476,6 +1476,7 @@ public:
GK_SM21,
GK_SM30,
GK_SM35,
+ GK_SM37,
} GPU;
public:
@@ -1511,6 +1512,9 @@ public:
case GK_SM35:
CUDAArchCode = "350";
break;
+ case GK_SM37:
+ CUDAArchCode = "370";
+ break;
default:
llvm_unreachable("Unhandled target CPU");
}
@@ -1563,6 +1567,7 @@ public:
.Case("sm_21", GK_SM21)
.Case("sm_30", GK_SM30)
.Case("sm_35", GK_SM35)
+ .Case("sm_37", GK_SM37)
.Default(GK_NONE);
return GPU != GK_NONE;
Modified: cfe/trunk/test/CodeGen/nvptx-cpus.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/nvptx-cpus.c?rev=233715&r1=233714&r2=233715&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/nvptx-cpus.c (original)
+++ cfe/trunk/test/CodeGen/nvptx-cpus.c Tue Mar 31 12:03:16 2015
@@ -2,6 +2,7 @@
// RUN: %clang_cc1 -triple nvptx-unknown-unknown -target-cpu sm_21 -O3 -S -o %t %s -emit-llvm
// RUN: %clang_cc1 -triple nvptx-unknown-unknown -target-cpu sm_30 -O3 -S -o %t %s -emit-llvm
// RUN: %clang_cc1 -triple nvptx-unknown-unknown -target-cpu sm_35 -O3 -S -o %t %s -emit-llvm
+// RUN: %clang_cc1 -triple nvptx-unknown-unknown -target-cpu sm_37 -O3 -S -o %t %s -emit-llvm
// Make sure clang accepts all supported architectures.
More information about the cfe-commits
mailing list