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, i32* %i.addr, align 4
14 %0 = bitcast i32* %i.addr to %struct.S*
15 call void @struct_ptr_fn(%struct.S* byval align 1 %0)
19 declare void @struct_ptr_fn(%struct.S* byval 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(%struct.U* byval align 1 getelementptr inbounds ([1 x %struct.U], [1 x %struct.U]* @a, i32 0, i32 0))
36 ; CHECK-LABEL: struct_arg_test
37 ; CHECK: call struct_arg_fn
41 declare void @struct_fn(%struct.U* byval 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(%struct.U* byval align 1 getelementptr inbounds ([1 x %struct.U], [1 x %struct.U]* @b, i32 0, i32 0))
51 declare void @struct_arg_fn(%struct.U* byval align 1)