1 // REQUIRES: amdgpu-registered-target
2 // RUN: %clang_cc1 -triple amdgcn-unknown-unknown -S -emit-llvm -o - %s | FileCheck %s
4 // CHECK-NOT: %struct.single_element_struct_arg = type { i32 }
5 typedef struct single_element_struct_arg
8 } single_element_struct_arg_t;
10 // CHECK: %struct.struct_arg = type { i32, float, i32 }
11 typedef struct struct_arg
18 // CHECK: %struct.struct_of_arrays_arg = type { [2 x i32], float, [4 x i32], [3 x float], i32 }
19 typedef struct struct_of_arrays_arg
26 } struct_of_arrays_arg_t;
28 // CHECK: %struct.struct_of_structs_arg = type { i32, float, %struct.struct_arg, i32 }
29 typedef struct struct_of_structs_arg
35 } struct_of_structs_arg_t;
37 // CHECK-LABEL: @test_single_element_struct_arg
38 // CHECK: i32 %arg1.coerce
39 __kernel void test_single_element_struct_arg(single_element_struct_arg_t arg1)
43 // CHECK-LABEL: @test_struct_arg
44 // CHECK: %struct.struct_arg %arg1.coerce
45 __kernel void test_struct_arg(struct_arg_t arg1)
49 // CHECK-LABEL: @test_struct_of_arrays_arg
50 // CHECK: %struct.struct_of_arrays_arg %arg1.coerce
51 __kernel void test_struct_of_arrays_arg(struct_of_arrays_arg_t arg1)
55 // CHECK-LABEL: @test_struct_of_structs_arg
56 // CHECK: %struct.struct_of_structs_arg %arg1.coerce
57 __kernel void test_struct_of_structs_arg(struct_of_structs_arg_t arg1)
61 // CHECK-LABEL: @test_non_kernel_struct_arg
62 // CHECK-NOT: %struct.struct_arg %arg1.coerce
63 // CHECK: %struct.struct_arg* byval
64 void test_non_kernel_struct_arg(struct_arg_t arg1)