mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-26 01:06:06 +00:00

This is required for converting function calls such as get_global_id() into SPIR-V builtins. Differential Revision: https://reviews.llvm.org/D123049
13 lines
506 B
Plaintext
13 lines
506 B
Plaintext
// RUN: %clang_cc1 -fcuda-is-device -triple spirv32 -o - -emit-llvm -x cuda %s | FileCheck %s
|
|
// RUN: %clang_cc1 -fcuda-is-device -triple spirv64 -o - -emit-llvm -x cuda %s | FileCheck %s
|
|
|
|
// Verifies that building CUDA targeting SPIR-V {32,64} generates LLVM IR with
|
|
// spir_kernel attributes for kernel functions.
|
|
|
|
// CHECK: define spir_kernel void @_Z6kernelv()
|
|
|
|
__attribute__((global)) void kernel() { return; }
|
|
|
|
// CHECK: !opencl.ocl.version = !{[[OCL:![0-9]+]]}
|
|
// CHECK: [[OCL]] = !{i32 2, i32 0}
|