xref: /aosp_15_r20/external/llvm/test/CodeGen/AArch64/arm64-vaargs.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -march=arm64 | FileCheck %s
2*9880d681SAndroid Build Coastguard Workertarget datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-n32:64"
3*9880d681SAndroid Build Coastguard Workertarget triple = "arm64-apple-darwin11.0.0"
4*9880d681SAndroid Build Coastguard Worker
5*9880d681SAndroid Build Coastguard Workerdefine float @t1(i8* nocapture %fmt, ...) nounwind ssp {
6*9880d681SAndroid Build Coastguard Workerentry:
7*9880d681SAndroid Build Coastguard Worker; CHECK: t1
8*9880d681SAndroid Build Coastguard Worker; CHECK: fcvt
9*9880d681SAndroid Build Coastguard Worker  %argp = alloca i8*, align 8
10*9880d681SAndroid Build Coastguard Worker  %argp1 = bitcast i8** %argp to i8*
11*9880d681SAndroid Build Coastguard Worker  call void @llvm.va_start(i8* %argp1)
12*9880d681SAndroid Build Coastguard Worker  %0 = va_arg i8** %argp, i32
13*9880d681SAndroid Build Coastguard Worker  %1 = va_arg i8** %argp, float
14*9880d681SAndroid Build Coastguard Worker  call void @llvm.va_end(i8* %argp1)
15*9880d681SAndroid Build Coastguard Worker  ret float %1
16*9880d681SAndroid Build Coastguard Worker}
17*9880d681SAndroid Build Coastguard Worker
18*9880d681SAndroid Build Coastguard Workerdeclare void @llvm.va_start(i8*) nounwind
19*9880d681SAndroid Build Coastguard Worker
20*9880d681SAndroid Build Coastguard Workerdeclare void @llvm.va_end(i8*) nounwind
21