xref: /llvm-project/clang/test/CodeGenOpenCL/amdgpu-call-kernel.cl (revision 29441e4f5fa5f5c7709f7cf180815ba97f611297)
1// REQUIRES: amdgpu-registered-target
2// RUN: %clang_cc1 -triple amdgcn-unknown-unknown -emit-llvm -o - %s | FileCheck %s
3// CHECK: define{{.*}} amdgpu_kernel void @test_call_kernel(ptr addrspace(1) noundef writeonly align 4 captures(none) initializes((0, 4)) %out)
4// CHECK: store i32 4, ptr addrspace(1) %out, align 4
5
6kernel void test_kernel(global int *out)
7{
8  out[0] = 4;
9}
10
11__kernel void test_call_kernel(__global int *out)
12{
13  test_kernel(out);
14}
15