[clang] 844096b - [CUDA] Make NVVM builtins available with CUDA-11/PTX6.5
Artem Belevich via cfe-commits
cfe-commits at lists.llvm.org
Tue May 5 15:46:22 PDT 2020
Author: Artem Belevich
Date: 2020-05-05T15:43:32-07:00
New Revision: 844096b996a0b17d3f380af323614a5fe31b8a68
URL: https://github.com/llvm/llvm-project/commit/844096b996a0b17d3f380af323614a5fe31b8a68
DIFF: https://github.com/llvm/llvm-project/commit/844096b996a0b17d3f380af323614a5fe31b8a68.diff
LOG: [CUDA] Make NVVM builtins available with CUDA-11/PTX6.5
Differential Revision: https://reviews.llvm.org/D79449
Added:
Modified:
clang/include/clang/Basic/BuiltinsNVPTX.def
clang/test/CodeGen/builtins-nvptx-ptx60.cu
Removed:
################################################################################
diff --git a/clang/include/clang/Basic/BuiltinsNVPTX.def b/clang/include/clang/Basic/BuiltinsNVPTX.def
index 70be6182c7ac..96455753ae4d 100644
--- a/clang/include/clang/Basic/BuiltinsNVPTX.def
+++ b/clang/include/clang/Basic/BuiltinsNVPTX.def
@@ -20,7 +20,9 @@
#pragma push_macro("SM_70")
#pragma push_macro("SM_72")
#pragma push_macro("SM_75")
-#define SM_75 "sm_75"
+#pragma push_macro("SM_80")
+#define SM_80 "sm_80"
+#define SM_75 "sm_75|" SM_80
#define SM_72 "sm_72|" SM_75
#define SM_70 "sm_70|" SM_72
@@ -31,7 +33,9 @@
#pragma push_macro("PTX61")
#pragma push_macro("PTX63")
#pragma push_macro("PTX64")
-#define PTX64 "ptx64"
+#pragma push_macro("PTX65")
+#define PTX65 "ptx65"
+#define PTX64 "ptx64|" PTX65
#define PTX63 "ptx63|" PTX64
#define PTX61 "ptx61|" PTX63
#define PTX60 "ptx60|" PTX61
@@ -721,7 +725,9 @@ TARGET_BUILTIN(__imma_m8n8k32_st_c_i32, "vi*iC*UiIi", "", AND(SM_75,PTX63))
#pragma pop_macro("SM_70")
#pragma pop_macro("SM_72")
#pragma pop_macro("SM_75")
+#pragma pop_macro("SM_80")
#pragma pop_macro("PTX60")
#pragma pop_macro("PTX61")
#pragma pop_macro("PTX63")
#pragma pop_macro("PTX64")
+#pragma pop_macro("PTX65")
diff --git a/clang/test/CodeGen/builtins-nvptx-ptx60.cu b/clang/test/CodeGen/builtins-nvptx-ptx60.cu
index 11db9ac46ea5..f6af9de6e8d7 100644
--- a/clang/test/CodeGen/builtins-nvptx-ptx60.cu
+++ b/clang/test/CodeGen/builtins-nvptx-ptx60.cu
@@ -2,6 +2,10 @@
// RUN: -fcuda-is-device -target-feature +ptx60 \
// RUN: -S -emit-llvm -o - -x cuda %s \
// RUN: | FileCheck -check-prefix=CHECK %s
+// RUN: %clang_cc1 -triple nvptx64-unknown-unknown -target-cpu sm_80 \
+// RUN: -fcuda-is-device -target-feature +ptx65 \
+// RUN: -S -emit-llvm -o - -x cuda %s \
+// RUN: | FileCheck -check-prefix=CHECK %s
// RUN: %clang_cc1 -triple nvptx-unknown-unknown -target-cpu sm_60 \
// RUN: -fcuda-is-device -S -o /dev/null -x cuda -verify %s
More information about the cfe-commits
mailing list