xref: /aosp_15_r20/external/llvm/test/CodeGen/ARM/2011-06-16-TailCallByVal.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s | FileCheck %s
2*9880d681SAndroid Build Coastguard Worker
3*9880d681SAndroid Build Coastguard Worker; tail call inside a function where byval argument is splitted between
4*9880d681SAndroid Build Coastguard Worker; registers and stack is currently unsupported.
5*9880d681SAndroid Build Coastguard Worker; XFAIL: *
6*9880d681SAndroid Build Coastguard Worker
7*9880d681SAndroid Build Coastguard Workertarget datalayout = "e-p:32:32:32-i1:8:32-i8:8:32-i16:16:32-i32:32:32-i64:32:32-f32:32:32-f64:32:32-v64:32:64-v128:32:128-a0:0:32-n32"
8*9880d681SAndroid Build Coastguard Workertarget triple = "thumbv7-apple-ios5.0"
9*9880d681SAndroid Build Coastguard Worker
10*9880d681SAndroid Build Coastguard Worker%struct.A = type <{ i16, i16, i32, i16, i16, i32, i16, [8 x %struct.B], [418 x i8], %struct.C }>
11*9880d681SAndroid Build Coastguard Worker%struct.B = type <{ i32, i16, i16 }>
12*9880d681SAndroid Build Coastguard Worker%struct.C = type { i16, i32, i16, i16 }
13*9880d681SAndroid Build Coastguard Worker
14*9880d681SAndroid Build Coastguard Worker; CHECK: f
15*9880d681SAndroid Build Coastguard Worker; CHECK: push {r1, r2, r3}
16*9880d681SAndroid Build Coastguard Worker; CHECK: add sp, #12
17*9880d681SAndroid Build Coastguard Worker; CHECK: b.w _puts
18*9880d681SAndroid Build Coastguard Worker
19*9880d681SAndroid Build Coastguard Workerdefine void @f(i8* %s, %struct.A* nocapture byval %a) nounwind optsize {
20*9880d681SAndroid Build Coastguard Workerentry:
21*9880d681SAndroid Build Coastguard Worker  %puts = tail call i32 @puts(i8* %s)
22*9880d681SAndroid Build Coastguard Worker  ret void
23*9880d681SAndroid Build Coastguard Worker}
24*9880d681SAndroid Build Coastguard Worker
25*9880d681SAndroid Build Coastguard Workerdeclare i32 @puts(i8* nocapture) nounwind
26