| 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 |
}; |
| 6 |
|
| 7 |
int f(struct A a); |
| 8 |
|
| 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); |
| 14 |
} |
| 15 |
|
| 16 |
// X86: declare i32 @f(ptr noundef byval(%struct.A) align 4) |
| 17 |
// AMDGCN: declare i32 @f(ptr addrspace(5) noundef byref{{.*}}) |