File tree 2 files changed +14
-2
lines changed
2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -58,8 +58,9 @@ static const unsigned SPIRDefIsPrivMap[] = {
58
58
// Used by both the SPIR and SPIR-V targets.
59
59
static const unsigned SPIRDefIsGenMap[] = {
60
60
4 , // Default
61
- // OpenCL address space values for this map are dummy and they can't be used
62
- 0 , // opencl_global
61
+ // Some OpenCL address space values for this map are dummy and they can't be
62
+ // used
63
+ 1 , // opencl_global
63
64
0 , // opencl_local
64
65
0 , // opencl_constant
65
66
0 , // opencl_private
Original file line number Diff line number Diff line change
1
+ // RUN: %clang_cc1 -fcuda-is-device -triple spirv32 -o - -emit-llvm -x cuda %s | FileCheck --check-prefix=CHECK-SPIRV32 %s
2
+ // RUN: %clang_cc1 -fcuda-is-device -triple spirv64 -o - -emit-llvm -x cuda %s | FileCheck --check-prefix=CHECK-SPIRV64 %s
3
+
4
+ // CHECK-SPIRV32: @.str = private unnamed_addr addrspace(4) constant [13 x i8] c"Hello World\0A\00", align 1
5
+ // CHECK-SPIRV64: @.str = private unnamed_addr addrspace(1) constant [13 x i8] c"Hello World\0A\00", align 1
6
+
7
+ extern " C" __attribute__((device)) int printf (const char * format, ...);
8
+
9
+ __attribute__ ((global)) void printf_kernel() {
10
+ printf (" Hello World\n " );
11
+ }
You can’t perform that action at this time.
0 commit comments