1 // RUN: %clang_cc1 -triple aarch64_be-linux-gnu -ffreestanding -emit-llvm -O0 -o - %s | FileCheck %s
5 // A single member HFA must be aligned just like a non-HFA register argument.
6 double callee(int a
, ...) {
7 // CHECK: [[REGPP:%.*]] = getelementptr inbounds nuw %struct.__va_list, ptr [[VA:%.*]], i32 0, i32 2
8 // CHECK: [[REGP:%.*]] = load ptr, ptr [[REGPP]], align 8
9 // CHECK: [[OFFSET0:%.*]] = getelementptr inbounds i8, ptr [[REGP]], i32 {{.*}}
10 // CHECK: [[OFFSET1:%.*]] = getelementptr inbounds i8, ptr [[OFFSET0]], i64 8
12 // CHECK: [[MEMPP:%.*]] = getelementptr inbounds nuw %struct.__va_list, ptr [[VA:%.*]], i32 0, i32 0
13 // CHECK: [[MEMP:%.*]] = load ptr, ptr [[MEMPP]], align 8
14 // CHECK: [[NEXTP:%.*]] = getelementptr inbounds i8, ptr [[MEMP]], i64 8
15 // CHECK: store ptr [[NEXTP]], ptr [[MEMPP]], align 8
18 double result
= va_arg(vl
, struct { double a
; }).a
;