summaryrefslogtreecommitdiffstats
path: root/test/CodeGenOpenCL/byval.cl
blob: 592d96ffa66316dfe90e405a3ef2a700fb4691ec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// RUN: %clang_cc1 -emit-llvm -o - -triple amdgcn %s | FileCheck %s
// RUN: %clang_cc1 -emit-llvm -o - -triple amdgcn---opencl %s | FileCheck %s

struct A {
  int x[100];
};

int f(struct A a);

int g() {
  struct A a;
  // CHECK: call i32 @f(%struct.A addrspace(5)* byval{{.*}}%a)
  return f(a);
}

// CHECK: declare i32 @f(%struct.A addrspace(5)* byval{{.*}})