Debian Codegraph @

clang/test/CodeGenCUDASPIRV/printf.cu

raw
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 }