1 ; RUN: llc < %s -march=sparc | FileCheck %s
3 ; CHECK-LABEL: struct_ptr_test
4 ; CHECK: call struct_ptr_fn
5 ; CHECK-NEXT: st %i0, [%fp+-4]
10 define void @struct_ptr_test(i32 %i) {
12 %i.addr = alloca i32, align 4
13 store i32 %i, ptr %i.addr, align 4
14 %0 = bitcast ptr %i.addr to ptr
15 call void @struct_ptr_fn(ptr byval(%struct.S) align 1 %0)
19 declare void @struct_ptr_fn(ptr byval(%struct.S) align 1)
21 ; CHECK-LABEL: struct_test
22 ; CHECK: call struct_fn
28 @a = internal global [1 x %struct.U] zeroinitializer, align 1
30 define void @struct_test() {
32 tail call void @struct_fn(ptr byval(%struct.U) align 1 @a)
36 ; CHECK-LABEL: struct_arg_test
37 ; CHECK: call struct_arg_fn
41 declare void @struct_fn(ptr byval(%struct.U) align 1)
43 @b = internal global [1 x %struct.U] zeroinitializer, align 1
45 define void @struct_arg_test() {
47 tail call void @struct_arg_fn(ptr byval(%struct.U) align 1 @b)
51 declare void @struct_arg_fn(ptr byval(%struct.U) align 1)