| 1 |
// Tests CUDA kernel arguments get global address space when targetting SPIR-V. |
| 2 |
|
| 3 |
|
| 4 |
// RUN: %clang -emit-llvm --cuda-device-only --offload=spirv32 \ |
| 5 |
// RUN: -nocudalib -nocudainc %s -o %t.bc -c 2>&1 |
| 6 |
// RUN: llvm-dis %t.bc -o %t.ll |
| 7 |
// RUN: FileCheck %s --input-file=%t.ll |
| 8 |
|
| 9 |
// RUN: %clang -emit-llvm --cuda-device-only --offload=spirv64 \ |
| 10 |
// RUN: -nocudalib -nocudainc %s -o %t.bc -c 2>&1 |
| 11 |
// RUN: llvm-dis %t.bc -o %t.ll |
| 12 |
// RUN: FileCheck %s --input-file=%t.ll |
| 13 |
|
| 14 |
// CHECK: define |
| 15 |
// CHECK-SAME: spir_kernel void @_Z6kernelPi(ptr addrspace(1) noundef |
| 16 |
|
| 17 |
__attribute__((global)) void kernel(int* output) { *output = 1; } |