diff options
Diffstat (limited to 'test/CodeGenOpenCL/byval.cl')
-rw-r--r-- | test/CodeGenOpenCL/byval.cl | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/CodeGenOpenCL/byval.cl b/test/CodeGenOpenCL/byval.cl new file mode 100644 index 0000000000000..1a8105c5207f9 --- /dev/null +++ b/test/CodeGenOpenCL/byval.cl @@ -0,0 +1,18 @@ +// RUN: %clang_cc1 -emit-llvm -o - -triple amdgcn %s | FileCheck %s +// RUN: %clang_cc1 -emit-llvm -o - -triple amdgcn---amdgizcl %s | FileCheck %s -check-prefix=AMDGIZ + +struct A { + int x[100]; +}; + +int f(struct A a); + +int g() { + struct A a; + // CHECK: call i32 @f(%struct.A* byval{{.*}}%a) + // AMDGIZ: call i32 @f(%struct.A addrspace(5)* byval{{.*}}%a) + return f(a); +} + +// CHECK: declare i32 @f(%struct.A* byval{{.*}}) +// AMDGIZ: declare i32 @f(%struct.A addrspace(5)* byval{{.*}}) |