llvm-project/clang/test/CodeGenOpenCL/amdgpu-call-kernel.cl
Nikolay Haustov 8c6538b86d AMDGPU: Set amdgpu_kernel calling convention for OpenCL kernels.
Summary:
Summary:
Change Clang calling convention SpirKernel to OpenCLKernel.
Set calling convention OpenCLKernel for amdgcn as well.
Add virtual method .getOpenCLKernelCallingConv() to TargetCodeGenInfo
and use it to set target calling convention for AMDGPU and SPIR.
Update tests.

Reviewers: rsmith, tstellarAMD, Anastasia, yaxunl

Subscribers: kzhuravl, cfe-commits

Differential Revision: http://reviews.llvm.org/D21367

llvm-svn: 274220
2016-06-30 09:06:33 +00:00

15 lines
403 B
Common Lisp
Executable File

// REQUIRES: amdgpu-registered-target
// RUN: %clang_cc1 -triple amdgcn-unknown-unknown -S -emit-llvm -o - %s | FileCheck %s
// CHECK: define amdgpu_kernel void @test_call_kernel(i32 addrspace(1)* nocapture %out)
// CHECK: store i32 4, i32 addrspace(1)* %out, align 4
kernel void test_kernel(global int *out)
{
out[0] = 4;
}
__kernel void test_call_kernel(__global int *out)
{
test_kernel(out);
}