1*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -tailcallopt=false | FileCheck %s 2*9880d681SAndroid Build Coastguard Worker; CHECK: movl 8(%esp), %eax 3*9880d681SAndroid Build Coastguard Worker; CHECK: movl 8(%esp), %eax 4*9880d681SAndroid Build Coastguard Worker; CHECK-NOT: movl 8(%esp), %eax 5*9880d681SAndroid Build Coastguard Worker 6*9880d681SAndroid Build Coastguard Worker; PR3122 7*9880d681SAndroid Build Coastguard Worker; rdar://6400815 8*9880d681SAndroid Build Coastguard Worker 9*9880d681SAndroid Build Coastguard Worker; byval requires a copy, even with fastcc. 10*9880d681SAndroid Build Coastguard Worker 11*9880d681SAndroid Build Coastguard Workertarget datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128" 12*9880d681SAndroid Build Coastguard Workertarget triple = "i386-apple-darwin9.5" 13*9880d681SAndroid Build Coastguard Worker %struct.MVT = type { i32 } 14*9880d681SAndroid Build Coastguard Worker 15*9880d681SAndroid Build Coastguard Workerdefine fastcc i32 @bar() nounwind { 16*9880d681SAndroid Build Coastguard Worker %V = alloca %struct.MVT 17*9880d681SAndroid Build Coastguard Worker %a = getelementptr %struct.MVT, %struct.MVT* %V, i32 0, i32 0 18*9880d681SAndroid Build Coastguard Worker store i32 1, i32* %a 19*9880d681SAndroid Build Coastguard Worker call fastcc void @foo(%struct.MVT* byval %V) nounwind 20*9880d681SAndroid Build Coastguard Worker %t = load i32, i32* %a 21*9880d681SAndroid Build Coastguard Worker ret i32 %t 22*9880d681SAndroid Build Coastguard Worker} 23*9880d681SAndroid Build Coastguard Worker 24*9880d681SAndroid Build Coastguard Workerdeclare fastcc void @foo(%struct.MVT* byval) 25