diff options
Diffstat (limited to 'test/CodeGen/X86/win64_vararg.ll')
-rw-r--r-- | test/CodeGen/X86/win64_vararg.ll | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/test/CodeGen/X86/win64_vararg.ll b/test/CodeGen/X86/win64_vararg.ll index a451318f6e8c..efe8bcacbeae 100644 --- a/test/CodeGen/X86/win64_vararg.ll +++ b/test/CodeGen/X86/win64_vararg.ll @@ -18,3 +18,36 @@ entry: } declare void @llvm.va_start(i8*) nounwind + +; CHECK: f5: +; CHECK: pushq +; CHECK: leaq 56(%rsp), +define i8* @f5(i64 %a0, i64 %a1, i64 %a2, i64 %a3, i64 %a4, ...) nounwind { +entry: + %ap = alloca i8*, align 8 + %ap1 = bitcast i8** %ap to i8* + call void @llvm.va_start(i8* %ap1) + ret i8* %ap1 +} + +; CHECK: f4: +; CHECK: pushq +; CHECK: leaq 48(%rsp), +define i8* @f4(i64 %a0, i64 %a1, i64 %a2, i64 %a3, ...) nounwind { +entry: + %ap = alloca i8*, align 8 + %ap1 = bitcast i8** %ap to i8* + call void @llvm.va_start(i8* %ap1) + ret i8* %ap1 +} + +; CHECK: f3: +; CHECK: pushq +; CHECK: leaq 40(%rsp), +define i8* @f3(i64 %a0, i64 %a1, i64 %a2, ...) nounwind { +entry: + %ap = alloca i8*, align 8 + %ap1 = bitcast i8** %ap to i8* + call void @llvm.va_start(i8* %ap1) + ret i8* %ap1 +} |