xref: /aosp_15_r20/external/llvm/test/CodeGen/ARM/2009-10-30.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s  -mtriple=armv6-linux-gnueabi  | FileCheck %s
2*9880d681SAndroid Build Coastguard Worker; This test checks that the address of the varg arguments is correctly
3*9880d681SAndroid Build Coastguard Worker; computed when there are 5 or more regular arguments.
4*9880d681SAndroid Build Coastguard Worker
5*9880d681SAndroid Build Coastguard Workerdefine void @f(i32 %a1, i32 %a2, i32 %a3, i32 %a4, i32 %a5, ...) {
6*9880d681SAndroid Build Coastguard Workerentry:
7*9880d681SAndroid Build Coastguard Worker;CHECK: sub	sp, sp, #4
8*9880d681SAndroid Build Coastguard Worker;CHECK: add	r{{[0-9]+}}, sp, #8
9*9880d681SAndroid Build Coastguard Worker;CHECK: str	r{{[0-9]+}}, [sp], #4
10*9880d681SAndroid Build Coastguard Worker;CHECK: bx	lr
11*9880d681SAndroid Build Coastguard Worker	%ap = alloca i8*, align 4
12*9880d681SAndroid Build Coastguard Worker	%ap1 = bitcast i8** %ap to i8*
13*9880d681SAndroid Build Coastguard Worker	call void @llvm.va_start(i8* %ap1)
14*9880d681SAndroid Build Coastguard Worker	ret void
15*9880d681SAndroid Build Coastguard Worker}
16*9880d681SAndroid Build Coastguard Worker
17*9880d681SAndroid Build Coastguard Workerdeclare void @llvm.va_start(i8*) nounwind
18