[clang] 314f99e - [CUDA] Enable existing builtins for PTX7.0 as well.
Artem Belevich via cfe-commits
cfe-commits at lists.llvm.org
Wed May 6 14:24:37 PDT 2020
Author: Artem Belevich
Date: 2020-05-06T14:24:21-07:00
New Revision: 314f99e7d42ded663386190a54b5831dc4a6f3c1
URL: https://github.com/llvm/llvm-project/commit/314f99e7d42ded663386190a54b5831dc4a6f3c1
DIFF: https://github.com/llvm/llvm-project/commit/314f99e7d42ded663386190a54b5831dc4a6f3c1.diff
LOG: [CUDA] Enable existing builtins for PTX7.0 as well.
Differential Revision: https://reviews.llvm.org/D79515
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 96455753ae4d..759c91290a60 100644
--- a/clang/include/clang/Basic/BuiltinsNVPTX.def
+++ b/clang/include/clang/Basic/BuiltinsNVPTX.def
@@ -34,7 +34,9 @@
#pragma push_macro("PTX63")
#pragma push_macro("PTX64")
#pragma push_macro("PTX65")
-#define PTX65 "ptx65"
+#pragma push_macro("PTX70")
+#define PTX70 "ptx70"
+#define PTX65 "ptx65|" PTX70
#define PTX64 "ptx64|" PTX65
#define PTX63 "ptx63|" PTX64
#define PTX61 "ptx61|" PTX63
@@ -731,3 +733,4 @@ TARGET_BUILTIN(__imma_m8n8k32_st_c_i32, "vi*iC*UiIi", "", AND(SM_75,PTX63))
#pragma pop_macro("PTX63")
#pragma pop_macro("PTX64")
#pragma pop_macro("PTX65")
+#pragma pop_macro("PTX70")
diff --git a/clang/test/CodeGen/builtins-nvptx-ptx60.cu b/clang/test/CodeGen/builtins-nvptx-ptx60.cu
index f6af9de6e8d7..ad5c48ef1662 100644
--- a/clang/test/CodeGen/builtins-nvptx-ptx60.cu
+++ b/clang/test/CodeGen/builtins-nvptx-ptx60.cu
@@ -6,6 +6,10 @@
// 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 nvptx64-unknown-unknown -target-cpu sm_80 \
+// RUN: -fcuda-is-device -target-feature +ptx70 \
+// 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