blob: 072f36afb7b64d0b2b1c6b9166091ef7ebce710a [file] [log] [blame]
Anton Korobeynikove7beda12010-10-03 22:52:07 +00001; RUN: llc < %s -mtriple=x86_64-pc-win32 | FileCheck %s
2
3; Verify that the var arg parameters which are passed in registers are stored
4; in home stack slots allocated by the caller and that AP is correctly
5; calculated.
6define void @average_va(i32 %count, ...) nounwind {
7entry:
8; CHECK: subq $40, %rsp
9; CHECK: movq %r9, 72(%rsp)
10; CHECK: movq %r8, 64(%rsp)
11; CHECK: movq %rdx, 56(%rsp)
12; CHECK: leaq 56(%rsp), %rax
13
14 %ap = alloca i8*, align 8 ; <i8**> [#uses=1]
15 %ap1 = bitcast i8** %ap to i8* ; <i8*> [#uses=1]
16 call void @llvm.va_start(i8* %ap1)
17 ret void
18}
19
20declare void @llvm.va_start(i8*) nounwind