1*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -march=x86 -tailcallopt=false | FileCheck %s 2*9880d681SAndroid Build Coastguard Worker 3*9880d681SAndroid Build Coastguard Worker %struct.foo = type { [4 x i32] } 4*9880d681SAndroid Build Coastguard Worker 5*9880d681SAndroid Build Coastguard Workerdefine fastcc void @bar(%struct.foo* noalias sret %agg.result) nounwind { 6*9880d681SAndroid Build Coastguard Workerentry: 7*9880d681SAndroid Build Coastguard Worker %tmp1 = getelementptr %struct.foo, %struct.foo* %agg.result, i32 0, i32 0 8*9880d681SAndroid Build Coastguard Worker %tmp3 = getelementptr [4 x i32], [4 x i32]* %tmp1, i32 0, i32 0 9*9880d681SAndroid Build Coastguard Worker store i32 1, i32* %tmp3, align 8 10*9880d681SAndroid Build Coastguard Worker ret void 11*9880d681SAndroid Build Coastguard Worker} 12*9880d681SAndroid Build Coastguard Worker; CHECK: bar 13*9880d681SAndroid Build Coastguard Worker; CHECK: ret{{[^4]*$}} 14*9880d681SAndroid Build Coastguard Worker 15*9880d681SAndroid Build Coastguard Worker@dst = external global i32 16*9880d681SAndroid Build Coastguard Worker 17*9880d681SAndroid Build Coastguard Workerdefine void @foo() nounwind { 18*9880d681SAndroid Build Coastguard Worker %memtmp = alloca %struct.foo, align 4 19*9880d681SAndroid Build Coastguard Worker call fastcc void @bar( %struct.foo* sret %memtmp ) nounwind 20*9880d681SAndroid Build Coastguard Worker %tmp4 = getelementptr %struct.foo, %struct.foo* %memtmp, i32 0, i32 0 21*9880d681SAndroid Build Coastguard Worker %tmp5 = getelementptr [4 x i32], [4 x i32]* %tmp4, i32 0, i32 0 22*9880d681SAndroid Build Coastguard Worker %tmp6 = load i32, i32* %tmp5 23*9880d681SAndroid Build Coastguard Worker store i32 %tmp6, i32* @dst 24*9880d681SAndroid Build Coastguard Worker ret void 25*9880d681SAndroid Build Coastguard Worker} 26*9880d681SAndroid Build Coastguard Worker; CHECK: foo 27*9880d681SAndroid Build Coastguard Worker; CHECK: ret{{[^4]*$}} 28