llvm-project/clang/test/CodeGenOpenCL/spir-calling-conv.cl
Juneyoung Lee f193bcc701 Revert D105169 due to the two-stage failure in ASAN
This reverts the following commits:
37ca7a795b277c20c02a218bf44052278c03344b
9aa6c72b92b6c89cc6d23b693257df9af7de2d15
705387c5074bcca36d626882462ebbc2bcc3bed4
8ca4b3ef19fe82d7ad6a6e1515317dcc01b41515
80dba72a669b5416e97a42fd2c2a7bc5a6d3f44a
2021-10-18 23:52:46 +09:00

19 lines
550 B
Common Lisp

// RUN: %clang_cc1 %s -triple "spir-unknown-unknown" -emit-llvm -o - | FileCheck %s
int get_dummy_id(int D);
kernel void bar(global int *A);
kernel void foo(global int *A)
// CHECK: define{{.*}} spir_kernel void @foo(i32 addrspace(1)* %A)
{
int id = get_dummy_id(0);
// CHECK: %{{[a-z0-9_]+}} = tail call spir_func i32 @get_dummy_id(i32 0)
A[id] = id;
bar(A);
// CHECK: tail call spir_kernel void @bar(i32 addrspace(1)* %A)
}
// CHECK: declare spir_func i32 @get_dummy_id(i32)
// CHECK: declare spir_kernel void @bar(i32 addrspace(1)*)