1*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -mtriple=x86_64-linux | FileCheck -check-prefix=X86-64 %s 2*9880d681SAndroid Build Coastguard Worker; Win64 has not supported byval yet. 3*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -march=x86 | FileCheck -check-prefix=X86 %s 4*9880d681SAndroid Build Coastguard Worker 5*9880d681SAndroid Build Coastguard Worker; X86: movl 4(%esp), %eax 6*9880d681SAndroid Build Coastguard Worker; X86: movl 8(%esp), %edx 7*9880d681SAndroid Build Coastguard Worker 8*9880d681SAndroid Build Coastguard Worker; X86-64: movq 8(%rsp), %rax 9*9880d681SAndroid Build Coastguard Worker 10*9880d681SAndroid Build Coastguard Worker%struct.s = type { i64, i64, i64 } 11*9880d681SAndroid Build Coastguard Worker 12*9880d681SAndroid Build Coastguard Workerdefine i64 @f(%struct.s* byval %a) { 13*9880d681SAndroid Build Coastguard Workerentry: 14*9880d681SAndroid Build Coastguard Worker %tmp2 = getelementptr %struct.s, %struct.s* %a, i32 0, i32 0 15*9880d681SAndroid Build Coastguard Worker %tmp3 = load i64, i64* %tmp2, align 8 16*9880d681SAndroid Build Coastguard Worker ret i64 %tmp3 17*9880d681SAndroid Build Coastguard Worker} 18