Skip to content

Commit 314f99e

Browse files
committed
[CUDA] Enable existing builtins for PTX7.0 as well.
Differential Revision: https://reviews.llvm.org/D79515
1 parent 9bb9ff0 commit 314f99e

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

clang/include/clang/Basic/BuiltinsNVPTX.def

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@
3434
#pragma push_macro("PTX63")
3535
#pragma push_macro("PTX64")
3636
#pragma push_macro("PTX65")
37-
#define PTX65 "ptx65"
37+
#pragma push_macro("PTX70")
38+
#define PTX70 "ptx70"
39+
#define PTX65 "ptx65|" PTX70
3840
#define PTX64 "ptx64|" PTX65
3941
#define PTX63 "ptx63|" PTX64
4042
#define PTX61 "ptx61|" PTX63
@@ -731,3 +733,4 @@ TARGET_BUILTIN(__imma_m8n8k32_st_c_i32, "vi*iC*UiIi", "", AND(SM_75,PTX63))
731733
#pragma pop_macro("PTX63")
732734
#pragma pop_macro("PTX64")
733735
#pragma pop_macro("PTX65")
736+
#pragma pop_macro("PTX70")

clang/test/CodeGen/builtins-nvptx-ptx60.cu

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@
66
// RUN: -fcuda-is-device -target-feature +ptx65 \
77
// RUN: -S -emit-llvm -o - -x cuda %s \
88
// RUN: | FileCheck -check-prefix=CHECK %s
9+
// RUN: %clang_cc1 -triple nvptx64-unknown-unknown -target-cpu sm_80 \
10+
// RUN: -fcuda-is-device -target-feature +ptx70 \
11+
// RUN: -S -emit-llvm -o - -x cuda %s \
12+
// RUN: | FileCheck -check-prefix=CHECK %s
913
// RUN: %clang_cc1 -triple nvptx-unknown-unknown -target-cpu sm_60 \
1014
// RUN: -fcuda-is-device -S -o /dev/null -x cuda -verify %s
1115

0 commit comments

Comments
 (0)