[OpenACC] Enable 'attach' clause for combined constructs
[llvm-project.git] / clang / test / CodeGenOpenCL / byval.cl
blob3dbe6f5d3fae9142c76870fd0323d2b6c2a52ab6
1 // RUN: %clang_cc1 -emit-llvm -o - -triple i686-pc-darwin %s | FileCheck -check-prefix=X86 %s
2 // RUN: %clang_cc1 -emit-llvm -o - -triple amdgcn %s | FileCheck -check-prefix=AMDGCN %s
3 struct A {
4 int x[100];
5 };
7 int f(struct A a);
9 int g() {
10 struct A a;
11 // X86: call i32 @f(ptr noundef nonnull byval(%struct.A) align 4 %a)
12 // AMDGCN: call i32 @f(ptr addrspace(5) noundef byref{{.*}}%a)
13 return f(a);
16 // X86: declare i32 @f(ptr noundef byval(%struct.A) align 4)
17 // AMDGCN: declare i32 @f(ptr addrspace(5) noundef byref{{.*}})