1 // RUN: %clang -mfloat-abi=soft -target arm-linux-gnu -emit-llvm -S -o - %s | FileCheck %s
7 void take_args(int a
, ...) {
8 // CHECK: [[ALLOCA_VA_LIST:%[a-zA-Z0-9._]+]] = alloca %struct.__va_list, align 4
9 // CHECK: call void @llvm.va_start
10 // CHECK-NEXT: [[LOAD_AP:%[a-zA-Z0-9._]+]] = load ptr, ptr [[ALLOCA_VA_LIST]], align 4
12 // It's conceivable that EMPTY_PTR may not actually be a valid pointer
13 // (e.g. it's at the very bottom of the stack and the next page is
14 // invalid). This doesn't matter provided it's never loaded (there's no
15 // well-defined way to tell), but it becomes a problem if we do try to use it.
16 // CHECK-NOT: load %struct.Empty, ptr [[LOAD_AP]]
18 __builtin_va_start(l
, a
);
19 emptyvar
= __builtin_va_arg(l
, struct Empty
);